diff --git a/controllers/nginx/.dockerignore b/.dockerignore similarity index 100% rename from controllers/nginx/.dockerignore rename to .dockerignore diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 000000000..e8068da3a --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,45 @@ + + +**Is this a request for help?** (If yes, you should use our troubleshooting guide and community support channels, see https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/.): + +**What keywords did you search in NGINX Ingress controller issues before filing this one?** (If you have found any duplicates, you should instead reply there.): + +--- + +**Is this a BUG REPORT or FEATURE REQUEST?** (choose one): + + + +**Kubernetes version** (use `kubectl version`): + +**Environment**: + +- **Cloud provider or hardware configuration**: +- **OS** (e.g. from /etc/os-release): +- **Kernel** (e.g. `uname -a`): +- **Install tools**: +- **Others**: + + +**What happened**: + + +**What you expected to happen**: + + +**How to reproduce it** (as minimally and precisely as possible): + + +**Anything else we need to know**: diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..b0e8f5767 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,11 @@ + + +**What this PR does / why we need it**: + +**Which issue this PR fixes** *(optional, in `fixes #(, fixes #, ...)` format, will close that issue when PR gets merged)*: fixes # + +**Special notes for your reviewer**: diff --git a/.travis.yml b/.travis.yml index f858c0258..101218b43 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ notifications: go: - 1.9 -go_import_path: k8s.io/ingress +go_import_path: k8s.io/ingress-nginx jobs: include: diff --git a/controllers/nginx/Changelog.md b/Changelog.md similarity index 100% rename from controllers/nginx/Changelog.md rename to Changelog.md diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json deleted file mode 100644 index b3ccc51ce..000000000 --- a/Godeps/Godeps.json +++ /dev/null @@ -1,1429 +0,0 @@ -{ - "ImportPath": "k8s.io/ingress", - "GoVersion": "go1.8", - "GodepVersion": "v79", - "Packages": [ - "./..." - ], - "Deps": [ - { - "ImportPath": "cloud.google.com/go/compute/metadata", - "Comment": "v0.1.0-115-g3b1ae45", - "Rev": "3b1ae45394a234c385be014e9a488f2bb6eef821" - }, - { - "ImportPath": "cloud.google.com/go/internal", - "Comment": "v0.1.0-115-g3b1ae45", - "Rev": "3b1ae45394a234c385be014e9a488f2bb6eef821" - }, - { - "ImportPath": "github.com/PuerkitoBio/purell", - "Comment": "v1.0.0", - "Rev": "8a290539e2e8629dbc4e6bad948158f790ec31f4" - }, - { - "ImportPath": "github.com/PuerkitoBio/urlesc", - "Rev": "5bd2802263f21d8788851d5305584c82a5c75d7e" - }, - { - "ImportPath": "github.com/armon/go-proxyproto", - "Rev": "3daa90aec0039a806299b9078f4422fee950f33c" - }, - { - "ImportPath": "github.com/beorn7/perks/quantile", - "Rev": "3ac7bf7a47d159a033b107610db8a1b6575507a4" - }, - { - "ImportPath": "github.com/davecgh/go-spew/spew", - "Comment": "v1.1.0-1-g782f496", - "Rev": "782f4967f2dc4564575ca782fe2d04090b5faca8" - }, - { - "ImportPath": "github.com/dgrijalva/jwt-go", - "Comment": "v3.0.0-4-g01aeca5", - "Rev": "01aeca54ebda6e0fbfafd0a524d234159c05ec20" - }, - { - "ImportPath": "github.com/docker/distribution/digestset", - "Comment": "v2.6.0-rc.1-209-gedc3ab29", - "Rev": "edc3ab29cdff8694dd6feb85cfeb4b5f1b38ed9c" - }, - { - "ImportPath": "github.com/docker/distribution/reference", - "Comment": "v2.6.0-rc.1-209-gedc3ab29", - "Rev": "edc3ab29cdff8694dd6feb85cfeb4b5f1b38ed9c" - }, - { - "ImportPath": "github.com/emicklei/go-restful", - "Comment": "2.2.0-4-gff4f55a", - "Rev": "ff4f55a206334ef123e4f79bbf348980da81ca46" - }, - { - "ImportPath": "github.com/emicklei/go-restful-swagger12", - "Comment": "1.0.1", - "Rev": "dcef7f55730566d41eae5db10e7d6981829720f6" - }, - { - "ImportPath": "github.com/emicklei/go-restful/log", - "Comment": "2.2.0-4-gff4f55a", - "Rev": "ff4f55a206334ef123e4f79bbf348980da81ca46" - }, - { - "ImportPath": "github.com/fullsailor/pkcs7", - "Rev": "a009d8d7de53d9503c797cb8ec66fa3b21eed209" - }, - { - "ImportPath": "github.com/ghodss/yaml", - "Rev": "73d445a93680fa1a78ae23a5839bad48f32ba1ee" - }, - { - "ImportPath": "github.com/go-openapi/jsonpointer", - "Rev": "46af16f9f7b149af66e5d1bd010e3574dc06de98" - }, - { - "ImportPath": "github.com/go-openapi/jsonreference", - "Rev": "13c6e3589ad90f49bd3e3bbe2c2cb3d7a4142272" - }, - { - "ImportPath": "github.com/go-openapi/spec", - "Rev": "6aced65f8501fe1217321abf0749d354824ba2ff" - }, - { - "ImportPath": "github.com/go-openapi/swag", - "Rev": "1d0bd113de87027671077d3c71eb3ac5d7dbba72" - }, - { - "ImportPath": "github.com/gogo/protobuf/proto", - "Comment": "v0.4-3-gc0656edd", - "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" - }, - { - "ImportPath": "github.com/gogo/protobuf/sortkeys", - "Comment": "v0.4-3-gc0656edd", - "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" - }, - { - "ImportPath": "github.com/golang/glog", - "Rev": "44145f04b68cf362d9c4df2182967c2275eaefed" - }, - { - "ImportPath": "github.com/golang/groupcache/lru", - "Rev": "02826c3e79038b59d737d3b1c0a1d937f71a4433" - }, - { - "ImportPath": "github.com/golang/protobuf/proto", - "Rev": "4bd1920723d7b7c925de087aa32e2187708897f7" - }, - { - "ImportPath": "github.com/golang/protobuf/ptypes", - "Rev": "4bd1920723d7b7c925de087aa32e2187708897f7" - }, - { - "ImportPath": "github.com/golang/protobuf/ptypes/any", - "Rev": "4bd1920723d7b7c925de087aa32e2187708897f7" - }, - { - "ImportPath": "github.com/golang/protobuf/ptypes/duration", - "Rev": "4bd1920723d7b7c925de087aa32e2187708897f7" - }, - { - "ImportPath": "github.com/golang/protobuf/ptypes/timestamp", - "Rev": "4bd1920723d7b7c925de087aa32e2187708897f7" - }, - { - "ImportPath": "github.com/google/btree", - "Rev": "7d79101e329e5a3adf994758c578dab82b90c017" - }, - { - "ImportPath": "github.com/google/gofuzz", - "Rev": "44d81051d367757e1c7c6a5a86423ece9afcf63c" - }, - { - "ImportPath": "github.com/googleapis/gnostic/OpenAPIv2", - "Rev": "0c5108395e2debce0d731cf0287ddf7242066aba" - }, - { - "ImportPath": "github.com/googleapis/gnostic/compiler", - "Rev": "0c5108395e2debce0d731cf0287ddf7242066aba" - }, - { - "ImportPath": "github.com/googleapis/gnostic/extensions", - "Rev": "0c5108395e2debce0d731cf0287ddf7242066aba" - }, - { - "ImportPath": "github.com/gorilla/websocket", - "Rev": "6eb6ad425a89d9da7a5549bc6da8f79ba5c17844" - }, - { - "ImportPath": "github.com/gregjones/httpcache", - "Rev": "787624de3eb7bd915c329cba748687a3b22666a6" - }, - { - "ImportPath": "github.com/gregjones/httpcache/diskcache", - "Rev": "787624de3eb7bd915c329cba748687a3b22666a6" - }, - { - "ImportPath": "github.com/hashicorp/golang-lru", - "Rev": "a0d98a5f288019575c6d1f4bb1573fef2d1fcdc4" - }, - { - "ImportPath": "github.com/hashicorp/golang-lru/simplelru", - "Rev": "a0d98a5f288019575c6d1f4bb1573fef2d1fcdc4" - }, - { - "ImportPath": "github.com/howeyc/gopass", - "Rev": "bf9dde6d0d2c004a008c27aaee91170c786f6db8" - }, - { - "ImportPath": "github.com/imdario/mergo", - "Comment": "0.1.3-8-g6633656", - "Rev": "6633656539c1639d9d78127b7d47c622b5d7b6dc" - }, - { - "ImportPath": "github.com/json-iterator/go", - "Comment": "1.0.0", - "Rev": "36b14963da70d11297d313183d7e6388c8510e1e" - }, - { - "ImportPath": "github.com/juju/ratelimit", - "Rev": "5b9ff866471762aa2ab2dced63c9fb6f53921342" - }, - { - "ImportPath": "github.com/kylelemons/godebug/diff", - "Rev": "d99083b96f422f8fd5a93bc02040acec769e178f" - }, - { - "ImportPath": "github.com/kylelemons/godebug/pretty", - "Rev": "d99083b96f422f8fd5a93bc02040acec769e178f" - }, - { - "ImportPath": "github.com/mailru/easyjson/buffer", - "Rev": "d5b7844b561a7bc640052f1b935f7b800330d7e0" - }, - { - "ImportPath": "github.com/mailru/easyjson/jlexer", - "Rev": "d5b7844b561a7bc640052f1b935f7b800330d7e0" - }, - { - "ImportPath": "github.com/mailru/easyjson/jwriter", - "Rev": "d5b7844b561a7bc640052f1b935f7b800330d7e0" - }, - { - "ImportPath": "github.com/matttproud/golang_protobuf_extensions/pbutil", - "Rev": "fc2b8d3a73c4867e51861bbdd5ae3c1f0869dd6a" - }, - { - "ImportPath": "github.com/mitchellh/go-ps", - "Rev": "4fdf99ab29366514c69ccccddab5dc58b8d84062" - }, - { - "ImportPath": "github.com/mitchellh/mapstructure", - "Rev": "53818660ed4955e899c0bcafa97299a388bd7c8e" - }, - { - "ImportPath": "github.com/ncabatoff/process-exporter", - "Comment": "v0.1.0", - "Rev": "2942f905437b665326fe044c49edb2094df13b37" - }, - { - "ImportPath": "github.com/ncabatoff/process-exporter/proc", - "Comment": "v0.1.0", - "Rev": "2942f905437b665326fe044c49edb2094df13b37" - }, - { - "ImportPath": "github.com/opencontainers/go-digest", - "Rev": "a6d0ee40d4207ea02364bd3b9e8e77b9159ba1eb" - }, - { - "ImportPath": "github.com/paultag/sniff/parser", - "Rev": "87325c3dddf408cfb71f5044873d34ac426d5a59" - }, - { - "ImportPath": "github.com/pborman/uuid", - "Rev": "ca53cad383cad2479bbba7f7a1a05797ec1386e4" - }, - { - "ImportPath": "github.com/peterbourgon/diskv", - "Comment": "v2.0.1", - "Rev": "5f041e8faa004a95c88a202771f4cc3e991971e6" - }, - { - "ImportPath": "github.com/pkg/errors", - "Comment": "v0.7.0-13-ga221380", - "Rev": "a22138067af1c4942683050411a841ade67fe1eb" - }, - { - "ImportPath": "github.com/prometheus/client_golang/prometheus", - "Comment": "v0.8.0-83-ge7e9030", - "Rev": "e7e903064f5e9eb5da98208bae10b475d4db0f8c" - }, - { - "ImportPath": "github.com/prometheus/client_golang/prometheus/promhttp", - "Comment": "v0.8.0-83-ge7e9030", - "Rev": "e7e903064f5e9eb5da98208bae10b475d4db0f8c" - }, - { - "ImportPath": "github.com/prometheus/client_model/go", - "Comment": "model-0.0.2-12-gfa8ad6f", - "Rev": "fa8ad6fec33561be4280a8f0514318c79d7f6cb6" - }, - { - "ImportPath": "github.com/prometheus/common/expfmt", - "Rev": "13ba4ddd0caa9c28ca7b7bffe1dfa9ed8d5ef207" - }, - { - "ImportPath": "github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg", - "Rev": "13ba4ddd0caa9c28ca7b7bffe1dfa9ed8d5ef207" - }, - { - "ImportPath": "github.com/prometheus/common/model", - "Rev": "13ba4ddd0caa9c28ca7b7bffe1dfa9ed8d5ef207" - }, - { - "ImportPath": "github.com/prometheus/procfs", - "Rev": "65c1f6f8f0fc1e2185eb9863a3bc751496404259" - }, - { - "ImportPath": "github.com/prometheus/procfs/xfs", - "Rev": "65c1f6f8f0fc1e2185eb9863a3bc751496404259" - }, - { - "ImportPath": "github.com/spf13/pflag", - "Rev": "9ff6c6923cfffbcd502984b8e0c80539a94968b7" - }, - { - "ImportPath": "github.com/zakjan/cert-chain-resolver/certUtil", - "Comment": "1.0.1-2-g176864a", - "Rev": "176864ad3d2959f437789ea0a2cce95c92d0dc50" - } - { - "ImportPath": "golang.org/x/crypto/nacl/secretbox", - "Rev": "81e90905daefcd6fd217b62423c0908922eadb30" - }, - { - "ImportPath": "golang.org/x/crypto/poly1305", - "Rev": "81e90905daefcd6fd217b62423c0908922eadb30" - }, - { - "ImportPath": "golang.org/x/crypto/salsa20/salsa", - "Rev": "81e90905daefcd6fd217b62423c0908922eadb30" - }, - { - "ImportPath": "golang.org/x/crypto/ssh/terminal", - "Rev": "81e90905daefcd6fd217b62423c0908922eadb30" - }, - { - "ImportPath": "golang.org/x/net/context", - "Rev": "1c05540f6879653db88113bc4a2b70aec4bd491f" - }, - { - "ImportPath": "golang.org/x/net/context/ctxhttp", - "Rev": "1c05540f6879653db88113bc4a2b70aec4bd491f" - }, - { - "ImportPath": "golang.org/x/net/http2", - "Rev": "1c05540f6879653db88113bc4a2b70aec4bd491f" - }, - { - "ImportPath": "golang.org/x/net/http2/hpack", - "Rev": "1c05540f6879653db88113bc4a2b70aec4bd491f" - }, - { - "ImportPath": "golang.org/x/net/idna", - "Rev": "1c05540f6879653db88113bc4a2b70aec4bd491f" - }, - { - "ImportPath": "golang.org/x/net/lex/httplex", - "Rev": "1c05540f6879653db88113bc4a2b70aec4bd491f" - }, - { - "ImportPath": "golang.org/x/oauth2", - "Rev": "a6bd8cefa1811bd24b86f8902872e4e8225f74c4" - }, - { - "ImportPath": "golang.org/x/oauth2/google", - "Rev": "a6bd8cefa1811bd24b86f8902872e4e8225f74c4" - }, - { - "ImportPath": "golang.org/x/oauth2/internal", - "Rev": "a6bd8cefa1811bd24b86f8902872e4e8225f74c4" - }, - { - "ImportPath": "golang.org/x/oauth2/jws", - "Rev": "a6bd8cefa1811bd24b86f8902872e4e8225f74c4" - }, - { - "ImportPath": "golang.org/x/oauth2/jwt", - "Rev": "a6bd8cefa1811bd24b86f8902872e4e8225f74c4" - }, - { - "ImportPath": "golang.org/x/sys/unix", - "Rev": "7ddbeae9ae08c6a06a59597f0c9edbc5ff2444ce" - }, - { - "ImportPath": "golang.org/x/sys/windows", - "Rev": "7ddbeae9ae08c6a06a59597f0c9edbc5ff2444ce" - }, - { - "ImportPath": "golang.org/x/text/cases", - "Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01" - }, - { - "ImportPath": "golang.org/x/text/internal", - "Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01" - }, - { - "ImportPath": "golang.org/x/text/internal/tag", - "Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01" - }, - { - "ImportPath": "golang.org/x/text/language", - "Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01" - }, - { - "ImportPath": "golang.org/x/text/runes", - "Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01" - }, - { - "ImportPath": "golang.org/x/text/secure/bidirule", - "Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01" - }, - { - "ImportPath": "golang.org/x/text/secure/precis", - "Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01" - }, - { - "ImportPath": "golang.org/x/text/transform", - "Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01" - }, - { - "ImportPath": "golang.org/x/text/unicode/bidi", - "Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01" - }, - { - "ImportPath": "golang.org/x/text/unicode/norm", - "Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01" - }, - { - "ImportPath": "golang.org/x/text/width", - "Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01" - }, - { - "ImportPath": "google.golang.org/api/cloudkms/v1", - "Rev": "98825bb0065da4054e5da6db34f5fc598e50bc24" - }, - { - "ImportPath": "google.golang.org/api/compute/v0.alpha", - "Rev": "98825bb0065da4054e5da6db34f5fc598e50bc24" - }, - { - "ImportPath": "google.golang.org/api/compute/v0.beta", - "Rev": "98825bb0065da4054e5da6db34f5fc598e50bc24" - }, - { - "ImportPath": "google.golang.org/api/compute/v1", - "Rev": "98825bb0065da4054e5da6db34f5fc598e50bc24" - }, - { - "ImportPath": "google.golang.org/api/container/v1", - "Rev": "98825bb0065da4054e5da6db34f5fc598e50bc24" - }, - { - "ImportPath": "google.golang.org/api/gensupport", - "Rev": "98825bb0065da4054e5da6db34f5fc598e50bc24" - }, - { - "ImportPath": "google.golang.org/api/googleapi", - "Rev": "98825bb0065da4054e5da6db34f5fc598e50bc24" - }, - { - "ImportPath": "google.golang.org/api/googleapi/internal/uritemplates", - "Rev": "98825bb0065da4054e5da6db34f5fc598e50bc24" - }, - { - "ImportPath": "gopkg.in/fsnotify.v1", - "Comment": "v1.4.2", - "Rev": "629574ca2a5df945712d3079857300b5e4da0236" - }, - { - "ImportPath": "gopkg.in/gcfg.v1", - "Comment": "v1.2.0", - "Rev": "27e4946190b4a327b539185f2b5b1f7c84730728" - }, - { - "ImportPath": "gopkg.in/gcfg.v1/scanner", - "Comment": "v1.2.0", - "Rev": "27e4946190b4a327b539185f2b5b1f7c84730728" - }, - { - "ImportPath": "gopkg.in/gcfg.v1/token", - "Comment": "v1.2.0", - "Rev": "27e4946190b4a327b539185f2b5b1f7c84730728" - }, - { - "ImportPath": "gopkg.in/gcfg.v1/types", - "Comment": "v1.2.0", - "Rev": "27e4946190b4a327b539185f2b5b1f7c84730728" - }, - { - "ImportPath": "gopkg.in/go-playground/pool.v3", - "Comment": "v3.1.1", - "Rev": "e73cd3a5ded835540c5cf4778488579c5b357d68" - }, - { - "ImportPath": "gopkg.in/inf.v0", - "Comment": "v0.9.0", - "Rev": "3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4" - }, - { - "ImportPath": "gopkg.in/warnings.v0", - "Comment": "v0.1.1", - "Rev": "8a331561fe74dadba6edfc59f3be66c22c3b065d" - }, - { - "ImportPath": "gopkg.in/yaml.v2", - "Rev": "53feefa2559fb8dfa8d81baad31be332c97d6c77" - }, - { - "ImportPath": "k8s.io/api/admissionregistration/v1alpha1", - "Rev": "fe29995db37613b9c5b2a647544cf627bfa8d299" - }, - { - "ImportPath": "k8s.io/api/apps/v1beta1", - "Rev": "fe29995db37613b9c5b2a647544cf627bfa8d299" - }, - { - "ImportPath": "k8s.io/api/apps/v1beta2", - "Rev": "fe29995db37613b9c5b2a647544cf627bfa8d299" - }, - { - "ImportPath": "k8s.io/api/authentication/v1", - "Rev": "fe29995db37613b9c5b2a647544cf627bfa8d299" - }, - { - "ImportPath": "k8s.io/api/authentication/v1beta1", - "Rev": "fe29995db37613b9c5b2a647544cf627bfa8d299" - }, - { - "ImportPath": "k8s.io/api/authorization/v1", - "Rev": "fe29995db37613b9c5b2a647544cf627bfa8d299" - }, - { - "ImportPath": "k8s.io/api/authorization/v1beta1", - "Rev": "fe29995db37613b9c5b2a647544cf627bfa8d299" - }, - { - "ImportPath": "k8s.io/api/autoscaling/v1", - "Rev": "fe29995db37613b9c5b2a647544cf627bfa8d299" - }, - { - "ImportPath": "k8s.io/api/autoscaling/v2beta1", - "Rev": "fe29995db37613b9c5b2a647544cf627bfa8d299" - }, - { - "ImportPath": "k8s.io/api/batch/v1", - "Rev": "fe29995db37613b9c5b2a647544cf627bfa8d299" - }, - { - "ImportPath": "k8s.io/api/batch/v1beta1", - "Rev": "fe29995db37613b9c5b2a647544cf627bfa8d299" - }, - { - "ImportPath": "k8s.io/api/batch/v2alpha1", - "Rev": "fe29995db37613b9c5b2a647544cf627bfa8d299" - }, - { - "ImportPath": "k8s.io/api/certificates/v1beta1", - "Rev": "fe29995db37613b9c5b2a647544cf627bfa8d299" - }, - { - "ImportPath": "k8s.io/api/core/v1", - "Rev": "fe29995db37613b9c5b2a647544cf627bfa8d299" - }, - { - "ImportPath": "k8s.io/api/extensions/v1beta1", - "Rev": "fe29995db37613b9c5b2a647544cf627bfa8d299" - }, - { - "ImportPath": "k8s.io/api/networking/v1", - "Rev": "fe29995db37613b9c5b2a647544cf627bfa8d299" - }, - { - "ImportPath": "k8s.io/api/policy/v1beta1", - "Rev": "fe29995db37613b9c5b2a647544cf627bfa8d299" - }, - { - "ImportPath": "k8s.io/api/rbac/v1", - "Rev": "fe29995db37613b9c5b2a647544cf627bfa8d299" - }, - { - "ImportPath": "k8s.io/api/rbac/v1alpha1", - "Rev": "fe29995db37613b9c5b2a647544cf627bfa8d299" - }, - { - "ImportPath": "k8s.io/api/rbac/v1beta1", - "Rev": "fe29995db37613b9c5b2a647544cf627bfa8d299" - }, - { - "ImportPath": "k8s.io/api/scheduling/v1alpha1", - "Rev": "fe29995db37613b9c5b2a647544cf627bfa8d299" - }, - { - "ImportPath": "k8s.io/api/settings/v1alpha1", - "Rev": "fe29995db37613b9c5b2a647544cf627bfa8d299" - }, - { - "ImportPath": "k8s.io/api/storage/v1", - "Rev": "fe29995db37613b9c5b2a647544cf627bfa8d299" - }, - { - "ImportPath": "k8s.io/api/storage/v1beta1", - "Rev": "fe29995db37613b9c5b2a647544cf627bfa8d299" - }, - { - "ImportPath": "k8s.io/apiextensions-apiserver/pkg/features", - "Rev": "e15e93d7733a51122160e13ddb510a23f72bbe09" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/api/equality", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/api/errors", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/api/meta", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/api/resource", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/api/validation", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/apimachinery", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/apimachinery/announced", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/validation", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1alpha1", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/conversion", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/conversion/unstructured", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/fields", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/labels", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/runtime", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/runtime/schema", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/selection", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/types", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/util/cache", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/util/clock", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/util/diff", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/util/errors", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/util/framer", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/util/intstr", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/util/json", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/util/net", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/util/rand", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/util/runtime", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/util/sets", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/util/uuid", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/util/validation", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/util/validation/field", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/util/wait", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/util/yaml", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/version", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/watch", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect", - "Rev": "9d38e20d609d27e00d4ec18f7b9db67105a2bde0" - }, - { - "ImportPath": "k8s.io/apiserver/pkg/authentication/authenticator", - "Rev": "f9b476d61dbdf6474e3d42cc5e854d0d8b7f759e" - }, - { - "ImportPath": "k8s.io/apiserver/pkg/authentication/serviceaccount", - "Rev": "f9b476d61dbdf6474e3d42cc5e854d0d8b7f759e" - }, - { - "ImportPath": "k8s.io/apiserver/pkg/authentication/user", - "Rev": "f9b476d61dbdf6474e3d42cc5e854d0d8b7f759e" - }, - { - "ImportPath": "k8s.io/apiserver/pkg/features", - "Rev": "f9b476d61dbdf6474e3d42cc5e854d0d8b7f759e" - }, - { - "ImportPath": "k8s.io/apiserver/pkg/server/healthz", - "Rev": "f9b476d61dbdf6474e3d42cc5e854d0d8b7f759e" - }, - { - "ImportPath": "k8s.io/apiserver/pkg/server/options/encryptionconfig", - "Rev": "f9b476d61dbdf6474e3d42cc5e854d0d8b7f759e" - }, - { - "ImportPath": "k8s.io/apiserver/pkg/storage/value", - "Rev": "f9b476d61dbdf6474e3d42cc5e854d0d8b7f759e" - }, - { - "ImportPath": "k8s.io/apiserver/pkg/storage/value/encrypt/aes", - "Rev": "f9b476d61dbdf6474e3d42cc5e854d0d8b7f759e" - }, - { - "ImportPath": "k8s.io/apiserver/pkg/storage/value/encrypt/envelope", - "Rev": "f9b476d61dbdf6474e3d42cc5e854d0d8b7f759e" - }, - { - "ImportPath": "k8s.io/apiserver/pkg/storage/value/encrypt/identity", - "Rev": "f9b476d61dbdf6474e3d42cc5e854d0d8b7f759e" - }, - { - "ImportPath": "k8s.io/apiserver/pkg/storage/value/encrypt/secretbox", - "Rev": "f9b476d61dbdf6474e3d42cc5e854d0d8b7f759e" - }, - { - "ImportPath": "k8s.io/apiserver/pkg/util/feature", - "Rev": "f9b476d61dbdf6474e3d42cc5e854d0d8b7f759e" - }, - { - "ImportPath": "k8s.io/client-go/discovery", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/discovery/fake", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/informers/core/v1", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/informers/extensions/v1beta1", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/informers/internalinterfaces", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/fake", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/scheme", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/apps/v1beta1", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/apps/v1beta2", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/authentication/v1", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/authentication/v1/fake", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/authentication/v1beta1", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/authorization/v1", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/authorization/v1/fake", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/authorization/v1beta1", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/autoscaling/v1", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v1", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v1/fake", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v1beta1", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v2alpha1", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/certificates/v1beta1", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/core/v1", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/core/v1/fake", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/extensions/v1beta1", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/networking/v1", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/networking/v1/fake", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/policy/v1beta1", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/rbac/v1", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/rbac/v1/fake", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/rbac/v1beta1", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/settings/v1alpha1", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/storage/v1", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/storage/v1/fake", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/storage/v1beta1", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/listers/core/v1", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/listers/extensions/v1beta1", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/pkg/version", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/rest", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/rest/watch", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/testing", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/tools/auth", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/tools/cache", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/tools/cache/testing", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/tools/clientcmd", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/tools/clientcmd/api", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/tools/clientcmd/api/latest", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/tools/clientcmd/api/v1", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/tools/leaderelection", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/tools/leaderelection/resourcelock", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/tools/metrics", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/tools/pager", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/tools/record", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/tools/reference", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/transport", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/util/cert", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/util/cert/triple", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/util/flowcontrol", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/util/homedir", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/util/integer", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/util/retry", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/client-go/util/workqueue", - "Comment": "v2.0.0-alpha.0-638-g82aa0638", - "Rev": "82aa063804cf055e16e8911250f888bc216e8b61" - }, - { - "ImportPath": "k8s.io/kube-openapi/pkg/common", - "Rev": "868f2f29720b192240e18284659231b440f9cda5" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/api", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/api/helper", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/api/install", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/api/service", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/api/util", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/api/v1", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/api/v1/helper", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/api/v1/pod", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/api/v1/service", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/api/validation", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/apis/extensions", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/apis/networking", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/capabilities", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/cloudprovider", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/cloudprovider/providers/gce", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/controller", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/features", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/kubelet/apis", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/kubelet/types", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/master/ports", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/security/apparmor", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/serviceaccount", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/util/file", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/util/hash", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/util/io", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/util/mount", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/util/net/sets", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/util/parsers", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/util/pointer", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/util/sysctl", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/util/taints", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/util/version", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/volume", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/volume/util", - "Comment": "v1.8.0", - "Rev": "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" - }, - { - "ImportPath": "k8s.io/utils/exec", - "Rev": "9fdc871a36f37980dd85f96d576b20d564cc0784" - } - ] -} diff --git a/Godeps/Readme b/Godeps/Readme deleted file mode 100644 index 4cdaa53d5..000000000 --- a/Godeps/Readme +++ /dev/null @@ -1,5 +0,0 @@ -This directory tree is generated automatically by godep. - -Please do not edit. - -See https://github.com/tools/godep for more information. diff --git a/Gopkg.lock b/Gopkg.lock new file mode 100644 index 000000000..27041cb5a --- /dev/null +++ b/Gopkg.lock @@ -0,0 +1,405 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + name = "github.com/PuerkitoBio/purell" + packages = ["."] + revision = "0bcb03f4b4d0a9428594752bd2a3b9aa0a9d4bd4" + version = "v1.1.0" + +[[projects]] + branch = "master" + name = "github.com/PuerkitoBio/urlesc" + packages = ["."] + revision = "de5bf2ad457846296e2031421a34e2568e304e35" + +[[projects]] + branch = "master" + name = "github.com/armon/go-proxyproto" + packages = ["."] + revision = "48572f11356f1843b694f21a290d4f1006bc5e47" + +[[projects]] + branch = "master" + name = "github.com/beorn7/perks" + packages = ["quantile"] + revision = "4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9" + +[[projects]] + name = "github.com/davecgh/go-spew" + packages = ["spew"] + revision = "346938d642f2ec3594ed81d874461961cd0faa76" + version = "v1.1.0" + +[[projects]] + name = "github.com/dgrijalva/jwt-go" + packages = ["."] + revision = "d2709f9f1f31ebcda9651b03077758c1f3a0018c" + version = "v3.0.0" + +[[projects]] + name = "github.com/docker/distribution" + packages = ["digestset","reference"] + revision = "edc3ab29cdff8694dd6feb85cfeb4b5f1b38ed9c" + +[[projects]] + branch = "master" + name = "github.com/docker/spdystream" + packages = [".","spdy"] + revision = "bc6354cbbc295e925e4c611ffe90c1f287ee54db" + +[[projects]] + name = "github.com/emicklei/go-restful" + packages = [".","log"] + revision = "5741799b275a3c4a5a9623a993576d7545cf7b5c" + version = "v2.4.0" + +[[projects]] + name = "github.com/emicklei/go-restful-swagger12" + packages = ["."] + revision = "dcef7f55730566d41eae5db10e7d6981829720f6" + version = "1.0.1" + +[[projects]] + branch = "master" + name = "github.com/fullsailor/pkcs7" + packages = ["."] + revision = "a009d8d7de53d9503c797cb8ec66fa3b21eed209" + +[[projects]] + name = "github.com/ghodss/yaml" + packages = ["."] + revision = "0ca9ea5df5451ffdf184b4428c902747c2c11cd7" + version = "v1.0.0" + +[[projects]] + branch = "master" + name = "github.com/go-openapi/jsonpointer" + packages = ["."] + revision = "779f45308c19820f1a69e9a4cd965f496e0da10f" + +[[projects]] + branch = "master" + name = "github.com/go-openapi/jsonreference" + packages = ["."] + revision = "36d33bfe519efae5632669801b180bf1a245da3b" + +[[projects]] + branch = "master" + name = "github.com/go-openapi/spec" + packages = ["."] + revision = "48c2a7185575f9103a5a3863eff950bb776899d2" + +[[projects]] + branch = "master" + name = "github.com/go-openapi/swag" + packages = ["."] + revision = "f3f9494671f93fcff853e3c6e9e948b3eb71e590" + +[[projects]] + name = "github.com/gogo/protobuf" + packages = ["gogoproto","proto","protoc-gen-gogo/descriptor","sortkeys"] + revision = "100ba4e885062801d56799d78530b73b178a78f3" + version = "v0.4" + +[[projects]] + branch = "master" + name = "github.com/golang/glog" + packages = ["."] + revision = "23def4e6c14b4da8ac2ed8007337bc5eb5007998" + +[[projects]] + branch = "master" + name = "github.com/golang/groupcache" + packages = ["lru"] + revision = "b710c8433bd175204919eb38776e944233235d03" + +[[projects]] + branch = "master" + name = "github.com/golang/protobuf" + packages = ["proto","ptypes","ptypes/any","ptypes/duration","ptypes/timestamp"] + revision = "130e6b02ab059e7b717a096f397c5b60111cae74" + +[[projects]] + branch = "master" + name = "github.com/google/btree" + packages = ["."] + revision = "316fb6d3f031ae8f4d457c6c5186b9e3ded70435" + +[[projects]] + branch = "master" + name = "github.com/google/gofuzz" + packages = ["."] + revision = "24818f796faf91cd76ec7bddd72458fbced7a6c1" + +[[projects]] + name = "github.com/googleapis/gnostic" + packages = ["OpenAPIv2","compiler","extensions"] + revision = "ee43cbb60db7bd22502942cccbc39059117352ab" + version = "v0.1.0" + +[[projects]] + branch = "master" + name = "github.com/gregjones/httpcache" + packages = [".","diskcache"] + revision = "c1f8028e62adb3d518b823a2f8e6a95c38bdd3aa" + +[[projects]] + branch = "master" + name = "github.com/hashicorp/golang-lru" + packages = [".","simplelru"] + revision = "0a025b7e63adc15a622f29b0b2c4c3848243bbf6" + +[[projects]] + branch = "master" + name = "github.com/howeyc/gopass" + packages = ["."] + revision = "bf9dde6d0d2c004a008c27aaee91170c786f6db8" + +[[projects]] + name = "github.com/imdario/mergo" + packages = ["."] + revision = "3e95a51e0639b4cf372f2ccf74c86749d747fbdc" + version = "0.2.2" + +[[projects]] + name = "github.com/json-iterator/go" + packages = ["."] + revision = "6ed27152e0428abfde127acb33b08b03a1e67cac" + version = "1.0.2" + +[[projects]] + branch = "master" + name = "github.com/juju/ratelimit" + packages = ["."] + revision = "5b9ff866471762aa2ab2dced63c9fb6f53921342" + +[[projects]] + name = "github.com/kr/pty" + packages = ["."] + revision = "95d05c1eef33a45bd58676b6ce28d105839b8d0b" + version = "v1.0.1" + +[[projects]] + branch = "master" + name = "github.com/kylelemons/godebug" + packages = ["diff","pretty"] + revision = "d65d576e9348f5982d7f6d83682b694e731a45c6" + +[[projects]] + branch = "master" + name = "github.com/mailru/easyjson" + packages = ["buffer","jlexer","jwriter"] + revision = "2a92e673c9a6302dd05c3a691ae1f24aef46457d" + +[[projects]] + name = "github.com/matttproud/golang_protobuf_extensions" + packages = ["pbutil"] + revision = "3247c84500bff8d9fb6d579d800f20b3e091582c" + version = "v1.0.0" + +[[projects]] + branch = "master" + name = "github.com/mitchellh/go-ps" + packages = ["."] + revision = "4fdf99ab29366514c69ccccddab5dc58b8d84062" + +[[projects]] + branch = "master" + name = "github.com/mitchellh/mapstructure" + packages = ["."] + revision = "d0303fe809921458f417bcf828397a65db30a7e4" + +[[projects]] + branch = "master" + name = "github.com/ncabatoff/process-exporter" + packages = [".","proc"] + revision = "5917bc766b95a1fa3c2ae85340f4de02a6b7e15e" + source = "github.com/aledbf/process-exporter" + +[[projects]] + name = "github.com/opencontainers/go-digest" + packages = ["."] + revision = "279bed98673dd5bef374d3b6e4b09e2af76183bf" + version = "v1.0.0-rc1" + +[[projects]] + branch = "master" + name = "github.com/paultag/sniff" + packages = ["parser"] + revision = "87325c3dddf408cfb71f5044873d34ac426d5a59" + +[[projects]] + name = "github.com/pborman/uuid" + packages = ["."] + revision = "e790cca94e6cc75c7064b1332e63811d4aae1a53" + version = "v1.1" + +[[projects]] + branch = "master" + name = "github.com/petar/GoLLRB" + packages = ["llrb"] + revision = "53be0d36a84c2a886ca057d34b6aa4468df9ccb4" + +[[projects]] + name = "github.com/peterbourgon/diskv" + packages = ["."] + revision = "5f041e8faa004a95c88a202771f4cc3e991971e6" + version = "v2.0.1" + +[[projects]] + name = "github.com/pkg/errors" + packages = ["."] + revision = "645ef00459ed84a119197bfb8d8205042c6df63d" + version = "v0.8.0" + +[[projects]] + name = "github.com/prometheus/client_golang" + packages = ["prometheus","prometheus/promhttp"] + revision = "c5b7fccd204277076155f10851dad72b76a49317" + version = "v0.8.0" + +[[projects]] + branch = "master" + name = "github.com/prometheus/client_model" + packages = ["go"] + revision = "6f3806018612930941127f2a7c6c453ba2c527d2" + +[[projects]] + branch = "master" + name = "github.com/prometheus/common" + packages = ["expfmt","internal/bitbucket.org/ww/goautoneg","model"] + revision = "1bab55dd05dbff384524a6a1c99006d9eb5f139b" + +[[projects]] + branch = "master" + name = "github.com/prometheus/procfs" + packages = [".","xfs"] + revision = "e645f4e5aaa8506fc71d6edbc5c4ff02c04c46f2" + +[[projects]] + name = "github.com/spf13/pflag" + packages = ["."] + revision = "e57e3eeb33f795204c1ca35f56c44f83227c6e66" + version = "v1.0.0" + +[[projects]] + name = "github.com/zakjan/cert-chain-resolver" + packages = ["certUtil"] + revision = "c222fb53d84f5c835aab8027b5d422d4089f9d29" + version = "1.0.1" + +[[projects]] + branch = "master" + name = "golang.org/x/crypto" + packages = ["ssh/terminal"] + revision = "9419663f5a44be8b34ca85f08abc5fe1be11f8a3" + +[[projects]] + branch = "master" + name = "golang.org/x/net" + packages = ["context","http2","http2/hpack","idna","internal/timeseries","lex/httplex","trace"] + revision = "a04bdaca5b32abe1c069418fb7088ae607de5bd0" + +[[projects]] + branch = "master" + name = "golang.org/x/sys" + packages = ["unix","windows"] + revision = "ebfc5b4631820b793c9010c87fd8fef0f39eb082" + +[[projects]] + branch = "master" + name = "golang.org/x/text" + packages = ["collate","collate/build","internal/colltab","internal/gen","internal/tag","internal/triegen","internal/ucd","language","secure/bidirule","transform","unicode/bidi","unicode/cldr","unicode/norm","unicode/rangetable","width"] + revision = "825fc78a2fd6fa0a5447e300189e3219e05e1f25" + +[[projects]] + branch = "master" + name = "google.golang.org/genproto" + packages = ["googleapis/rpc/status"] + revision = "f676e0f3ac6395ff1a529ae59a6670878a8371a6" + +[[projects]] + name = "google.golang.org/grpc" + packages = [".","codes","connectivity","credentials","grpclb/grpc_lb_v1/messages","grpclog","internal","keepalive","metadata","naming","peer","stats","status","tap","transport"] + revision = "f92cdcd7dcdc69e81b2d7b338479a19a8723cfa3" + version = "v1.6.0" + +[[projects]] + name = "gopkg.in/fsnotify.v1" + packages = ["."] + revision = "629574ca2a5df945712d3079857300b5e4da0236" + version = "v1.4.2" + +[[projects]] + name = "gopkg.in/go-playground/pool.v3" + packages = ["."] + revision = "e73cd3a5ded835540c5cf4778488579c5b357d68" + version = "v3.1.1" + +[[projects]] + name = "gopkg.in/inf.v0" + packages = ["."] + revision = "3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4" + version = "v0.9.0" + +[[projects]] + branch = "v2" + name = "gopkg.in/yaml.v2" + packages = ["."] + revision = "eb3733d160e74a9c7e442f435eb3bea458e1d19f" + +[[projects]] + branch = "master" + name = "k8s.io/api" + packages = ["admissionregistration/v1alpha1","apps/v1beta1","apps/v1beta2","authentication/v1","authentication/v1beta1","authorization/v1","authorization/v1beta1","autoscaling/v1","autoscaling/v2beta1","batch/v1","batch/v1beta1","batch/v2alpha1","certificates/v1beta1","core/v1","extensions/v1beta1","networking/v1","policy/v1beta1","rbac/v1","rbac/v1alpha1","rbac/v1beta1","scheduling/v1alpha1","settings/v1alpha1","storage/v1","storage/v1beta1"] + revision = "81aa34336d28aadc3a8e8da7dfd9258c5157e5e4" + +[[projects]] + branch = "master" + name = "k8s.io/apiextensions-apiserver" + packages = ["pkg/features"] + revision = "a5bbfd114a9b122acd741c61d88c84812375d9e1" + +[[projects]] + branch = "master" + name = "k8s.io/apimachinery" + packages = ["pkg/api/equality","pkg/api/errors","pkg/api/meta","pkg/api/resource","pkg/api/validation","pkg/apimachinery","pkg/apimachinery/announced","pkg/apimachinery/registered","pkg/apis/meta/internalversion","pkg/apis/meta/v1","pkg/apis/meta/v1/unstructured","pkg/apis/meta/v1/validation","pkg/apis/meta/v1alpha1","pkg/conversion","pkg/conversion/queryparams","pkg/conversion/unstructured","pkg/fields","pkg/labels","pkg/runtime","pkg/runtime/schema","pkg/runtime/serializer","pkg/runtime/serializer/json","pkg/runtime/serializer/protobuf","pkg/runtime/serializer/recognizer","pkg/runtime/serializer/streaming","pkg/runtime/serializer/versioning","pkg/selection","pkg/types","pkg/util/cache","pkg/util/clock","pkg/util/diff","pkg/util/errors","pkg/util/framer","pkg/util/httpstream","pkg/util/httpstream/spdy","pkg/util/intstr","pkg/util/json","pkg/util/mergepatch","pkg/util/net","pkg/util/rand","pkg/util/remotecommand","pkg/util/runtime","pkg/util/sets","pkg/util/strategicpatch","pkg/util/validation","pkg/util/validation/field","pkg/util/wait","pkg/util/yaml","pkg/version","pkg/watch","third_party/forked/golang/json","third_party/forked/golang/netutil","third_party/forked/golang/reflect"] + revision = "3b05bbfa0a45413bfa184edbf9af617e277962fb" + +[[projects]] + branch = "master" + name = "k8s.io/apiserver" + packages = ["pkg/authentication/authenticator","pkg/authentication/serviceaccount","pkg/authentication/user","pkg/features","pkg/server/healthz","pkg/util/feature"] + revision = "c1e53d745d0fe45bf7d5d44697e6eface25fceca" + +[[projects]] + branch = "master" + name = "k8s.io/client-go" + packages = ["discovery","discovery/fake","kubernetes","kubernetes/fake","kubernetes/scheme","kubernetes/typed/admissionregistration/v1alpha1","kubernetes/typed/admissionregistration/v1alpha1/fake","kubernetes/typed/apps/v1beta1","kubernetes/typed/apps/v1beta1/fake","kubernetes/typed/apps/v1beta2","kubernetes/typed/apps/v1beta2/fake","kubernetes/typed/authentication/v1","kubernetes/typed/authentication/v1/fake","kubernetes/typed/authentication/v1beta1","kubernetes/typed/authentication/v1beta1/fake","kubernetes/typed/authorization/v1","kubernetes/typed/authorization/v1/fake","kubernetes/typed/authorization/v1beta1","kubernetes/typed/authorization/v1beta1/fake","kubernetes/typed/autoscaling/v1","kubernetes/typed/autoscaling/v1/fake","kubernetes/typed/autoscaling/v2beta1","kubernetes/typed/autoscaling/v2beta1/fake","kubernetes/typed/batch/v1","kubernetes/typed/batch/v1/fake","kubernetes/typed/batch/v1beta1","kubernetes/typed/batch/v1beta1/fake","kubernetes/typed/batch/v2alpha1","kubernetes/typed/batch/v2alpha1/fake","kubernetes/typed/certificates/v1beta1","kubernetes/typed/certificates/v1beta1/fake","kubernetes/typed/core/v1","kubernetes/typed/core/v1/fake","kubernetes/typed/extensions/v1beta1","kubernetes/typed/extensions/v1beta1/fake","kubernetes/typed/networking/v1","kubernetes/typed/networking/v1/fake","kubernetes/typed/policy/v1beta1","kubernetes/typed/policy/v1beta1/fake","kubernetes/typed/rbac/v1","kubernetes/typed/rbac/v1/fake","kubernetes/typed/rbac/v1alpha1","kubernetes/typed/rbac/v1alpha1/fake","kubernetes/typed/rbac/v1beta1","kubernetes/typed/rbac/v1beta1/fake","kubernetes/typed/scheduling/v1alpha1","kubernetes/typed/scheduling/v1alpha1/fake","kubernetes/typed/settings/v1alpha1","kubernetes/typed/settings/v1alpha1/fake","kubernetes/typed/storage/v1","kubernetes/typed/storage/v1/fake","kubernetes/typed/storage/v1beta1","kubernetes/typed/storage/v1beta1/fake","pkg/version","rest","rest/watch","testing","tools/auth","tools/cache","tools/cache/testing","tools/clientcmd","tools/clientcmd/api","tools/clientcmd/api/latest","tools/clientcmd/api/v1","tools/leaderelection","tools/leaderelection/resourcelock","tools/metrics","tools/pager","tools/record","tools/reference","tools/remotecommand","transport","transport/spdy","util/cert","util/cert/triple","util/exec","util/flowcontrol","util/homedir","util/integer","util/retry","util/workqueue"] + revision = "82aa063804cf055e16e8911250f888bc216e8b61" + +[[projects]] + branch = "master" + name = "k8s.io/kube-openapi" + packages = ["pkg/common"] + revision = "abfc5fbe1cf87ee697db107fdfd24c32fe4397a8" + +[[projects]] + name = "k8s.io/kubernetes" + packages = ["pkg/api","pkg/api/helper","pkg/api/install","pkg/api/service","pkg/api/util","pkg/api/v1","pkg/api/v1/helper","pkg/api/v1/pod","pkg/api/validation","pkg/apis/extensions","pkg/apis/networking","pkg/capabilities","pkg/cloudprovider","pkg/controller","pkg/features","pkg/kubelet/apis","pkg/kubelet/apis/cri/v1alpha1/runtime","pkg/kubelet/container","pkg/kubelet/types","pkg/kubelet/util/format","pkg/kubelet/util/ioutils","pkg/kubelet/util/sliceutils","pkg/security/apparmor","pkg/serviceaccount","pkg/util/file","pkg/util/hash","pkg/util/io","pkg/util/mount","pkg/util/net/sets","pkg/util/parsers","pkg/util/pointer","pkg/util/sysctl","pkg/util/taints","pkg/volume","pkg/volume/util","third_party/forked/golang/expansion"] + revision = "0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4" + version = "v1.8.0" + +[[projects]] + branch = "master" + name = "k8s.io/utils" + packages = ["exec"] + revision = "4fe312863be2155a7b68acd2aff1c9221b24e68c" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + inputs-digest = "4511b8e7ec7b35d8752f919dfe51b39a07852a98de8d765ce7f2512032450cde" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml new file mode 100644 index 000000000..e9490665c --- /dev/null +++ b/Gopkg.toml @@ -0,0 +1,110 @@ + +# Gopkg.toml example +# +# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md +# for detailed Gopkg.toml documentation. +# +# required = ["github.com/user/thing/cmd/thing"] +# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] +# +# [[constraint]] +# name = "github.com/user/project" +# version = "1.0.0" +# +# [[constraint]] +# name = "github.com/user/project2" +# branch = "dev" +# source = "github.com/myfork/project2" +# +# [[override]] +# name = "github.com/x/y" +# version = "2.4.0" + +[[override]] + name = "github.com/docker/distribution" + revision = "edc3ab29cdff8694dd6feb85cfeb4b5f1b38ed9c" + +[[constraint]] + name = "github.com/opencontainers/go-digest" + branch = "master" + +[[constraint]] + branch = "master" + name = "github.com/armon/go-proxyproto" + +[[constraint]] + branch = "master" + name = "github.com/golang/glog" + +[[constraint]] + name = "github.com/imdario/mergo" + version = "0.2.2" + +[[constraint]] + branch = "master" + name = "github.com/kylelemons/godebug" + +[[constraint]] + branch = "master" + name = "github.com/mitchellh/go-ps" + +[[constraint]] + branch = "master" + name = "github.com/mitchellh/mapstructure" + +[[constraint]] + name = "github.com/ncabatoff/process-exporter" + source = "github.com/aledbf/process-exporter" + branch = "master" + +[[constraint]] + branch = "master" + name = "github.com/paultag/sniff" + +[[constraint]] + name = "github.com/pborman/uuid" + version = "1.1.0" + +[[constraint]] + name = "github.com/pkg/errors" + version = "0.8.0" + +[[constraint]] + name = "github.com/prometheus/client_golang" + version = "0.8.0" + +[[constraint]] + name = "github.com/spf13/pflag" + version = "1.0.0" + +[[constraint]] + name = "github.com/zakjan/cert-chain-resolver" + version = "1.0.1" + +[[constraint]] + name = "gopkg.in/fsnotify.v1" + version = "1.4.2" + +[[constraint]] + name = "gopkg.in/go-playground/pool.v3" + version = "3.1.1" + +[[constraint]] + branch = "master" + name = "k8s.io/api" + +[[constraint]] + branch = "master" + name = "k8s.io/apimachinery" + +[[constraint]] + branch = "master" + name = "k8s.io/apiserver" + +[[constraint]] + branch = "master" + name = "k8s.io/client-go" + +[[constraint]] + name = "k8s.io/kubernetes" + version = "1.8.0" diff --git a/Makefile b/Makefile index ff2d71a2b..fc29c8885 100644 --- a/Makefile +++ b/Makefile @@ -1,58 +1,142 @@ -all: fmt lint vet +all: push BUILDTAGS= -# base package. It contains the common and backends code -PKG := "k8s.io/ingress" +# Use the 0.0 tag for testing, it shouldn't clobber any release builds +TAG?=0.9.0-beta.15 +REGISTRY?=gcr.io/google_containers +GOOS?=linux +DOCKER?=gcloud docker -- +SED_I?=sed -i +GOHOSTOS ?= $(shell go env GOHOSTOS) -GO_LIST_FILES=$(shell go list ${PKG}/... | grep -v vendor | grep -v -e "test/e2e") +ifeq ($(GOHOSTOS),darwin) + SED_I=sed -i '' +endif -.PHONY: fmt -fmt: - @go list -f '{{if len .TestGoFiles}}"gofmt -s -l {{.Dir}}"{{end}}' ${GO_LIST_FILES} | xargs -L 1 sh -c +REPO_INFO=$(shell git config --get remote.origin.url) -.PHONY: lint -lint: - @go list -f '{{if len .TestGoFiles}}"golint -min_confidence=0.85 {{.Dir}}/..."{{end}}' ${GO_LIST_FILES} | xargs -L 1 sh -c +ifndef COMMIT + COMMIT := git-$(shell git rev-parse --short HEAD) +endif -.PHONY: test -test: - @go test -v -race -tags "$(BUILDTAGS) cgo" ${GO_LIST_FILES} +PKG=k8s.io/ingress-nginx -.PHONY: test-e2e -test-e2e: ginkgo - @go run hack/e2e.go -v --up --test --down +ARCH ?= $(shell go env GOARCH) +GOARCH = ${ARCH} +DUMB_ARCH = ${ARCH} -.PHONY: cover -cover: - @go list -f '{{if len .TestGoFiles}}"go test -coverprofile={{.Dir}}/.coverprofile {{.ImportPath}}"{{end}}' ${GO_LIST_FILES} | xargs -L 1 sh -c - gover - goveralls -coverprofile=gover.coverprofile -service travis-ci +ALL_ARCH = amd64 arm arm64 ppc64le -.PHONY: vet -vet: - @go vet ${GO_LIST_FILES} +QEMUVERSION=v2.9.1 + +IMGNAME = nginx-ingress-controller +IMAGE = $(REGISTRY)/$(IMGNAME) +MULTI_ARCH_IMG = $(IMAGE)-$(ARCH) + +# Set default base image dynamically for each arch +BASEIMAGE?=gcr.io/google_containers/nginx-slim-$(ARCH):0.25 + +ifeq ($(ARCH),arm) + QEMUARCH=arm + GOARCH=arm + DUMB_ARCH=armhf +endif +ifeq ($(ARCH),arm64) + QEMUARCH=aarch64 +endif +ifeq ($(ARCH),ppc64le) + QEMUARCH=ppc64le + GOARCH=ppc64le + DUMB_ARCH=ppc64el +endif +#ifeq ($(ARCH),s390x) +# QEMUARCH=s390x +#endif + +TEMP_DIR := $(shell mktemp -d) + +DOCKERFILE := $(TEMP_DIR)/rootfs/Dockerfile + +all: all-container + +sub-container-%: + $(MAKE) ARCH=$* build container + +sub-push-%: + $(MAKE) ARCH=$* push + +all-container: $(addprefix sub-container-,$(ALL_ARCH)) + +all-push: $(addprefix sub-push-,$(ALL_ARCH)) + +container: .container-$(ARCH) +.container-$(ARCH): + cp -r ./* $(TEMP_DIR) + $(SED_I) 's|BASEIMAGE|$(BASEIMAGE)|g' $(DOCKERFILE) + $(SED_I) "s|QEMUARCH|$(QEMUARCH)|g" $(DOCKERFILE) + $(SED_I) "s|DUMB_ARCH|$(DUMB_ARCH)|g" $(DOCKERFILE) + +ifeq ($(ARCH),amd64) + # When building "normally" for amd64, remove the whole line, it has no part in the amd64 image + $(SED_I) "/CROSS_BUILD_/d" $(DOCKERFILE) +else + # When cross-building, only the placeholder "CROSS_BUILD_" should be removed + # Register /usr/bin/qemu-ARCH-static as the handler for ARM binaries in the kernel + $(DOCKER) run --rm --privileged multiarch/qemu-user-static:register --reset + curl -sSL https://github.com/multiarch/qemu-user-static/releases/download/$(QEMUVERSION)/x86_64_qemu-$(QEMUARCH)-static.tar.gz | tar -xz -C $(TEMP_DIR)/rootfs + $(SED_I) "s/CROSS_BUILD_//g" $(DOCKERFILE) +endif + + $(DOCKER) build -t $(MULTI_ARCH_IMG):$(TAG) $(TEMP_DIR)/rootfs + +ifeq ($(ARCH), amd64) + # This is for to maintain the backward compatibility + $(DOCKER) tag $(MULTI_ARCH_IMG):$(TAG) $(IMAGE):$(TAG) +endif + +push: .push-$(ARCH) +.push-$(ARCH): + $(DOCKER) push $(MULTI_ARCH_IMG):$(TAG) +ifeq ($(ARCH), amd64) + $(DOCKER) push $(IMAGE):$(TAG) +endif -.PHONY: clean clean: - make -C controllers/nginx clean + $(DOCKER) rmi -f $(MULTI_ARCH_IMG):$(TAG) || true -.PHONY: controllers -controllers: - make -C controllers/nginx build +build: clean + CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} go build -a -installsuffix cgo \ + -ldflags "-s -w -X ${PKG}/version.RELEASE=${TAG} -X ${PKG}/version.COMMIT=${COMMIT} -X ${PKG}/version.REPO=${REPO_INFO}" \ + -o ${TEMP_DIR}/rootfs/nginx-ingress-controller ${PKG}/cmd/nginx -.PHONY: docker-build -docker-build: - make -C controllers/nginx all-container +fmt: + @echo "+ $@" + @go list -f '{{if len .TestGoFiles}}"gofmt -s -l {{.Dir}}"{{end}}' $(shell go list ${PKG}/... | grep -v vendor) | xargs -L 1 sh -c -.PHONY: docker-push -docker-push: - make -C controllers/nginx all-push +lint: + @echo "+ $@" + @go list -f '{{if len .TestGoFiles}}"golint {{.Dir}}/..."{{end}}' $(shell go list ${PKG}/... | grep -v vendor) | xargs -L 1 sh -c -.PHONE: release -release: - make -C controllers/nginx release +test: fmt lint vet + @echo "+ $@" + @go test -v -race -tags "$(BUILDTAGS) cgo" $(shell go list ${PKG}/... | grep -v vendor) -.PHONY: ginkgo -ginkgo: - go get github.com/onsi/ginkgo/ginkgo +cover: + @echo "+ $@" + @go list -f '{{if len .TestGoFiles}}"go test -coverprofile={{.Dir}}/.coverprofile {{.ImportPath}}"{{end}}' $(shell go list ${PKG}/... | grep -v vendor) | xargs -L 1 sh -c + gover + goveralls -coverprofile=gover.coverprofile -service travis-ci -repotoken ${COVERALLS_TOKEN} + +vet: + @echo "+ $@" + @go vet $(shell go list ${PKG}/... | grep -v vendor) + +release: all-container all-push + echo "done" + +.PHONY: docker-build +docker-build: all-container + +.PHONY: docker-push +docker-push: all-push diff --git a/README.md b/README.md index 41606d8d3..eed8b46f0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# NGINX Ingress +# NGINX Ingress Controller [![Build Status](https://travis-ci.org/kubernetes/ingress-nginx.svg?branch=master)](https://travis-ci.org/kubernetes/ingress-nginx) [![Coverage Status](https://coveralls.io/repos/github/kubernetes/ingress-nginx/badge.svg?branch=master)](https://coveralls.io/github/kubernetes/ingress-nginx?branch=master) @@ -16,8 +16,6 @@ The GCE ingress controller was moved to [github.com/kubernetes/ingress-gce](http * Learn more about using Ingress * See our user documentation on [k8s.io](http://kubernetes.io/docs/user-guide/ingress/) * Follow through to the respective platform specific [examples](examples/README.md) -* Write your own Ingress controller - * See our [developer documentation](docs/dev/README.md) * Deploy existing Ingress controllers * See our [admin documentation](docs/admin.md) * Contribute @@ -25,3 +23,552 @@ The GCE ingress controller was moved to [github.com/kubernetes/ingress-gce](http * Debug * Peruse the [FAQ section](docs/faq/README.md) * Ask on one of the [user-support channels](CONTRIBUTING.md#support-channels) + +### What is an Ingress Controller? + +Configuring a webserver or loadbalancer is harder than it should be. Most webserver configuration files are very similar. There are some applications that have weird little quirks that tend to throw a wrench in things, but for the most part you can apply the same logic to them and achieve a desired result. + +The Ingress resource embodies this idea, and an Ingress controller is meant to handle all the quirks associated with a specific "class" of Ingress (be it a single instance of a loadbalancer, or a more complicated setup of frontends that provide GSLB, DDoS protection, etc). + +An Ingress Controller is a daemon, deployed as a Kubernetes Pod, that watches the apiserver's `/ingresses` endpoint for updates to the [Ingress resource](https://kubernetes.io/docs/concepts/services-networking/ingress/). Its job is to satisfy requests for Ingresses. + +### Introduction +This is an nginx Ingress controller that uses [ConfigMap](https://kubernetes.io/docs/tasks/configure-pod-container/configmap/#understanding-configmaps) to store the nginx configuration. See [Ingress controller documentation](../README.md) for details on how it works. + +## Contents + +* [Conventions](#conventions) +* [Requirements](#requirements) +* [Command line arguments](#command-line-arguments) +* [Dry running](#try-running-the-ingress-controller) +* [Deployment](#deployment) +* [HTTP](#http) +* [HTTPS](#https) + * [Default SSL Certificate](#default-ssl-certificate) + * [HTTPS enforcement](#server-side-https-enforcement) + * [HSTS](#http-strict-transport-security) + * [Kube-Lego](#automated-certificate-management-with-kube-lego) +* [Source IP address](#source-ip-address) +* [TCP Services](#exposing-tcp-services) +* [UDP Services](#exposing-udp-services) +* [Proxy Protocol](#proxy-protocol) +* [Opentracing](#opentracing) +* [NGINX customization](configuration.md) +* [Custom errors](#custom-errors) +* [NGINX status page](#nginx-status-page) +* [Running multiple ingress controllers](#running-multiple-ingress-controllers) +* [Running on Cloudproviders](#running-on-cloudproviders) +* [Disabling NGINX ingress controller](#disabling-nginx-ingress-controller) +* [Log format](#log-format) +* [Local cluster](#local-cluster) +* [Debug & Troubleshooting](#debug--troubleshooting) +* [Limitations](#limitations) +* [Why endpoints and not services?](#why-endpoints-and-not-services) +* [NGINX Notes](#nginx-notes) + +## Conventions + +Anytime we reference a tls secret, we mean (x509, pem encoded, RSA 2048, etc). You can generate such a certificate with: + `openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ${KEY_FILE} -out ${CERT_FILE} -subj "/CN=${HOST}/O=${HOST}"` + and create the secret via `kubectl create secret tls ${CERT_NAME} --key ${KEY_FILE} --cert ${CERT_FILE}` + +## Requirements +- Default backend [404-server](https://github.com/kubernetes/ingress/tree/master/images/404-server) + +## Command line arguments + +``` +Usage of : + --alsologtostderr log to standard error as well as files + --apiserver-host string The address of the Kubernetes Apiserver to connect to in the format of protocol://address:port, e.g., http://localhost:8080. If not specified, the assumption is that the binary runs inside a Kubernetes cluster and local discovery is attempted. + --configmap string Name of the ConfigMap that contains the custom configuration to use + --default-backend-service string Service used to serve a 404 page for the default backend. Takes the form + namespace/name. The controller uses the first node port of this Service for + the default backend. + --default-server-port int Default port to use for exposing the default server (catch all) (default 8181) + --default-ssl-certificate string Name of the secret + that contains a SSL certificate to be used as default for a HTTPS catch-all server + --disable-node-list Disable querying nodes. If --force-namespace-isolation is true, this should also be set. + --election-id string Election id to use for status update. (default "ingress-controller-leader") + --enable-ssl-passthrough Enable SSL passthrough feature. Default is disabled + --force-namespace-isolation Force namespace isolation. This flag is required to avoid the reference of secrets or + configmaps located in a different namespace than the specified in the flag --watch-namespace. + --health-check-path string Defines + the URL to be used as health check inside in the default server in NGINX. (default "/healthz") + --healthz-port int port for healthz endpoint. (default 10254) + --http-port int Indicates the port to use for HTTP traffic (default 80) + --https-port int Indicates the port to use for HTTPS traffic (default 443) + --ingress-class string Name of the ingress class to route through this controller. + --kubeconfig string Path to kubeconfig file with authorization and master location information. + --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) + --log_dir string If non-empty, write log files in this directory + --logtostderr log to standard error instead of files + --profiling Enable profiling via web interface host:port/debug/pprof/ (default true) + --publish-service string Service fronting the ingress controllers. Takes the form + namespace/name. The controller will set the endpoint records on the + ingress objects to reflect those on the service. + --sort-backends Defines if backends and it's endpoints should be sorted + --ssl-passtrough-proxy-port int Default port to use internally for SSL when SSL Passthgough is enabled (default 442) + --status-port int Indicates the TCP port to use for exposing the nginx status page (default 18080) + --stderrthreshold severity logs at or above this threshold go to stderr (default 2) + --sync-period duration Relist and confirm cloud resources this often. Default is 10 minutes (default 10m0s) + --tcp-services-configmap string Name of the ConfigMap that contains the definition of the TCP services to expose. + The key in the map indicates the external port to be used. The value is the name of the + service with the format namespace/serviceName and the port of the service could be a + number of the name of the port. + The ports 80 and 443 are not allowed as external ports. This ports are reserved for the backend + --udp-services-configmap string Name of the ConfigMap that contains the definition of the UDP services to expose. + The key in the map indicates the external port to be used. The value is the name of the + service with the format namespace/serviceName and the port of the service could be a + number of the name of the port. + --update-status Indicates if the + ingress controller should update the Ingress status IP/hostname. Default is true (default true) + --update-status-on-shutdown Indicates if the + ingress controller should update the Ingress status IP/hostname when the controller + is being stopped. Default is true (default true) + -v, --v Level log level for V logs + --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging + --watch-namespace string Namespace to watch for Ingress. Default is to watch all namespaces +``` + +## Deployment + +First create a default backend and it's corresponding service: +``` +$ kubectl create -f examples/default-backend.yaml +``` + +Follow the [example-deployment](../../examples/deployment/nginx/README.md) steps to deploy nginx-ingress-controller in Kubernetes cluster (you may prefer other type of workloads, like Daemonset, in production environment). +Loadbalancers are created via a ReplicationController or Daemonset: + +## HTTP + +First we need to deploy some application to publish. To keep this simple we will use the [echoheaders app](https://github.com/kubernetes/contrib/blob/master/ingress/echoheaders/echo-app.yaml) that just returns information about the http request as output +``` +kubectl run echoheaders --image=gcr.io/google_containers/echoserver:1.8 --replicas=1 --port=8080 +``` + +Now we expose the same application in two different services (so we can create different Ingress rules) +``` +kubectl expose deployment echoheaders --port=80 --target-port=8080 --name=echoheaders-x +kubectl expose deployment echoheaders --port=80 --target-port=8080 --name=echoheaders-y +``` + +Next we create a couple of Ingress rules +``` +kubectl create -f examples/ingress.yaml +``` + +we check that ingress rules are defined: +``` +$ kubectl get ing +NAME RULE BACKEND ADDRESS +echomap - + foo.bar.com + /foo echoheaders-x:80 + bar.baz.com + /bar echoheaders-y:80 + /foo echoheaders-x:80 +``` + +Before the deploy of the Ingress controller we need a default backend [404-server](https://github.com/kubernetes/contrib/tree/master/404-server) +``` +kubectl create -f examples/default-backend.yaml +kubectl expose rc default-http-backend --port=80 --target-port=8080 --name=default-http-backend +``` + +Check NGINX it is running with the defined Ingress rules: + +``` +$ LBIP=$(kubectl get node `kubectl get po -l name=nginx-ingress-lb --template '{{range .items}}{{.spec.nodeName}}{{end}}'` --template '{{range $i, $n := .status.addresses}}{{if eq $n.type "ExternalIP"}}{{$n.address}}{{end}}{{end}}') +$ curl $LBIP/foo -H 'Host: foo.bar.com' +``` + +## HTTPS + +You can secure an Ingress by specifying a secret that contains a TLS private key and certificate. Currently the Ingress only supports a single TLS port, 443, and assumes TLS termination. This controller supports SNI. The TLS secret must contain keys named tls.crt and tls.key that contain the certificate and private key to use for TLS, eg: + +``` +apiVersion: v1 +data: + tls.crt: base64 encoded cert + tls.key: base64 encoded key +kind: Secret +metadata: + name: foo-secret + namespace: default +type: kubernetes.io/tls +``` + +Referencing this secret in an Ingress will tell the Ingress controller to secure the channel from the client to the loadbalancer using TLS: + +``` +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: no-rules-map +spec: + tls: + secretName: foo-secret + backend: + serviceName: s1 + servicePort: 80 +``` +Please follow [PREREQUISITES](../../examples/PREREQUISITES.md) as a guide on how to generate secrets containing SSL certificates. The name of the secret can be different than the name of the certificate. + +Check the [example](../../examples/tls-termination/nginx) + +### Default SSL Certificate + +NGINX provides the option [server name](http://nginx.org/en/docs/http/server_names.html) as a catch-all in case of requests that do not match one of the configured server names. This configuration works without issues for HTTP traffic. In case of HTTPS NGINX requires a certificate. For this reason the Ingress controller provides the flag `--default-ssl-certificate`. The secret behind this flag contains the default certificate to be used in the mentioned case. +If this flag is not provided NGINX will use a self signed certificate. + +Running without the flag `--default-ssl-certificate`: + +``` +$ curl -v https://10.2.78.7:443 -k +* Rebuilt URL to: https://10.2.78.7:443/ +* Trying 10.2.78.4... +* Connected to 10.2.78.7 (10.2.78.7) port 443 (#0) +* ALPN, offering http/1.1 +* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH +* successfully set certificate verify locations: +* CAfile: /etc/ssl/certs/ca-certificates.crt + CApath: /etc/ssl/certs +* TLSv1.2 (OUT), TLS header, Certificate Status (22): +* TLSv1.2 (OUT), TLS handshake, Client hello (1): +* TLSv1.2 (IN), TLS handshake, Server hello (2): +* TLSv1.2 (IN), TLS handshake, Certificate (11): +* TLSv1.2 (IN), TLS handshake, Server key exchange (12): +* TLSv1.2 (IN), TLS handshake, Server finished (14): +* TLSv1.2 (OUT), TLS handshake, Client key exchange (16): +* TLSv1.2 (OUT), TLS change cipher, Client hello (1): +* TLSv1.2 (OUT), TLS handshake, Finished (20): +* TLSv1.2 (IN), TLS change cipher, Client hello (1): +* TLSv1.2 (IN), TLS handshake, Finished (20): +* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256 +* ALPN, server accepted to use http/1.1 +* Server certificate: +* subject: CN=foo.bar.com +* start date: Apr 13 00:50:56 2016 GMT +* expire date: Apr 13 00:50:56 2017 GMT +* issuer: CN=foo.bar.com +* SSL certificate verify result: self signed certificate (18), continuing anyway. +> GET / HTTP/1.1 +> Host: 10.2.78.7 +> User-Agent: curl/7.47.1 +> Accept: */* +> +< HTTP/1.1 404 Not Found +< Server: nginx/1.11.1 +< Date: Thu, 21 Jul 2016 15:38:46 GMT +< Content-Type: text/html +< Transfer-Encoding: chunked +< Connection: keep-alive +< Strict-Transport-Security: max-age=15724800; includeSubDomains; preload +< +The page you're looking for could not be found. + +* Connection #0 to host 10.2.78.7 left intact +``` + +Specifying `--default-ssl-certificate=default/foo-tls`: + +``` +core@localhost ~ $ curl -v https://10.2.78.7:443 -k +* Rebuilt URL to: https://10.2.78.7:443/ +* Trying 10.2.78.7... +* Connected to 10.2.78.7 (10.2.78.7) port 443 (#0) +* ALPN, offering http/1.1 +* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH +* successfully set certificate verify locations: +* CAfile: /etc/ssl/certs/ca-certificates.crt + CApath: /etc/ssl/certs +* TLSv1.2 (OUT), TLS header, Certificate Status (22): +* TLSv1.2 (OUT), TLS handshake, Client hello (1): +* TLSv1.2 (IN), TLS handshake, Server hello (2): +* TLSv1.2 (IN), TLS handshake, Certificate (11): +* TLSv1.2 (IN), TLS handshake, Server key exchange (12): +* TLSv1.2 (IN), TLS handshake, Server finished (14): +* TLSv1.2 (OUT), TLS handshake, Client key exchange (16): +* TLSv1.2 (OUT), TLS change cipher, Client hello (1): +* TLSv1.2 (OUT), TLS handshake, Finished (20): +* TLSv1.2 (IN), TLS change cipher, Client hello (1): +* TLSv1.2 (IN), TLS handshake, Finished (20): +* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256 +* ALPN, server accepted to use http/1.1 +* Server certificate: +* subject: CN=foo.bar.com +* start date: Apr 13 00:50:56 2016 GMT +* expire date: Apr 13 00:50:56 2017 GMT +* issuer: CN=foo.bar.com +* SSL certificate verify result: self signed certificate (18), continuing anyway. +> GET / HTTP/1.1 +> Host: 10.2.78.7 +> User-Agent: curl/7.47.1 +> Accept: */* +> +< HTTP/1.1 404 Not Found +< Server: nginx/1.11.1 +< Date: Mon, 18 Jul 2016 21:02:59 GMT +< Content-Type: text/html +< Transfer-Encoding: chunked +< Connection: keep-alive +< Strict-Transport-Security: max-age=15724800; includeSubDomains; preload +< +The page you're looking for could not be found. + +* Connection #0 to host 10.2.78.7 left intact +``` + + +### Server-side HTTPS enforcement + +By default the controller redirects (301) to HTTPS if TLS is enabled for that ingress . If you want to disable that behaviour globally, you can use `ssl-redirect: "false"` in the NGINX config map. + +To configure this feature for specific ingress resources, you can use the `ingress.kubernetes.io/ssl-redirect: "false"` annotation in the particular resource. + + +### HTTP Strict Transport Security + +HTTP Strict Transport Security (HSTS) is an opt-in security enhancement specified through the use of a special response header. Once a supported browser receives this header that browser will prevent any communications from being sent over HTTP to the specified domain and will instead send all communications over HTTPS. + +By default the controller redirects (301) to HTTPS if there is a TLS Ingress rule. + +To disable this behavior use `hsts=false` in the NGINX config map. + + +### Automated Certificate Management with Kube-Lego + +[Kube-Lego] automatically requests missing or expired certificates from +[Let's Encrypt] by monitoring ingress resources and their referenced secrets. To +enable this for an ingress resource you have to add an annotation: + +``` +kubectl annotate ing ingress-demo kubernetes.io/tls-acme="true" +``` + +To setup Kube-Lego you can take a look at this [full example]. The first +version to fully support Kube-Lego is nginx Ingress controller 0.8. + +[full example]:https://github.com/jetstack/kube-lego/tree/master/examples +[Kube-Lego]:https://github.com/jetstack/kube-lego +[Let's Encrypt]:https://letsencrypt.org + +## Source IP address + +By default NGINX uses the content of the header `X-Forwarded-For` as the source of truth to get information about the client IP address. This works without issues in L7 **if we configure the setting `proxy-real-ip-cidr`** with the correct information of the IP/network address of the external load balancer. +If the ingress controller is running in AWS we need to use the VPC IPv4 CIDR. This allows NGINX to avoid the spoofing of the header. +Another option is to enable proxy protocol using `use-proxy-protocol: "true"`. +In this mode NGINX do not uses the content of the header to get the source IP address of the connection. + +## Exposing TCP services + +Ingress does not support TCP services (yet). For this reason this Ingress controller uses the flag `--tcp-services-configmap` to point to an existing config map where the key is the external port to use and the value is `::[PROXY]:[PROXY]` +It is possible to use a number or the name of the port. The two last fields are optional. Adding `PROXY` in either or both of the two last fields we can use Proxy Protocol decoding (listen) and/or encoding (proxy_pass) in a TCP service (https://www.nginx.com/resources/admin-guide/proxy-protocol/). + +The next example shows how to expose the service `example-go` running in the namespace `default` in the port `8080` using the port `9000` +``` +apiVersion: v1 +kind: ConfigMap +metadata: + name: tcp-configmap-example +data: + 9000: "default/example-go:8080" +``` + + +Please check the [tcp services](../../examples/tcp/nginx/README.md) example + +## Exposing UDP services + +Since 1.9.13 NGINX provides [UDP Load Balancing](https://www.nginx.com/blog/announcing-udp-load-balancing/). + +Ingress does not support UDP services (yet). For this reason this Ingress controller uses the flag `--udp-services-configmap` to point to an existing config map where the key is the external port to use and the value is `:` +It is possible to use a number or the name of the port. + +The next example shows how to expose the service `kube-dns` running in the namespace `kube-system` in the port `53` using the port `53` +``` +apiVersion: v1 +kind: ConfigMap +metadata: + name: udp-configmap-example +data: + 53: "kube-system/kube-dns:53" +``` + + +Please check the [udp services](../../examples/udp/nginx/README.md) example + +## Proxy Protocol + +If you are using a L4 proxy to forward the traffic to the NGINX pods and terminate HTTP/HTTPS there, you will lose the remote endpoint's IP addresses. To prevent this you could use the [Proxy Protocol](http://www.haproxy.org/download/1.5/doc/proxy-protocol.txt) for forwarding traffic, this will send the connection details before forwarding the actual TCP connection itself. + +Amongst others [ELBs in AWS](http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/enable-proxy-protocol.html) and [HAProxy](http://www.haproxy.org/) support Proxy Protocol. + +Please check the [proxy-protocol](examples/proxy-protocol/) example + +### Opentracing + +Using the third party module [rnburn/nginx-opentracing](https://github.com/rnburn/nginx-opentracing) the NGINX ingress controller can configure NGINX to enable [OpenTracing](http://opentracing.io) instrumentation. +By default this feature is disabled. + +To enable the instrumentation we just need to enable the instrumentation in the configuration configmap and set the host where we should send the traces. + +In the [aledbf/zipkin-js-example](https://github.com/aledbf/zipkin-js-example) github repository is possible to see a dockerized version of zipkin-js-example with the required Kubernetes descriptors. +To install the example and the zipkin collector we just need to run: + +``` +$ kubectl create -f https://raw.githubusercontent.com/aledbf/zipkin-js-example/kubernetes/kubernetes/zipkin.yaml +$ kubectl create -f https://raw.githubusercontent.com/aledbf/zipkin-js-example/kubernetes/kubernetes/deployment.yaml +``` + +Also we need to configure the NGINX controller configmap with the required values: + +``` +apiVersion: v1 +data: + enable-opentracing: "true" + zipkin-collector-host: zipkin.default.svc.cluster.local +kind: ConfigMap +metadata: + labels: + k8s-app: nginx-ingress-controller + name: nginx-custom-configuration +``` + +Using curl we can generate some traces: +``` +$ curl -v http://$(minikube ip)/api -H 'Host: zipkin-js-example' +$ curl -v http://$(minikube ip)/api -H 'Host: zipkin-js-example' +``` + +In the zipkin inteface we can see the details: + +![zipkin screenshot](docs/images/zipkin-demo.png "zipkin collector screenshot") + +### Custom errors + +In case of an error in a request the body of the response is obtained from the `default backend`. +Each request to the default backend includes two headers: + +- `X-Code` indicates the HTTP code to be returned to the client. +- `X-Format` the value of the `Accept` header. + +**Important:** the custom backend must return the correct HTTP status code to be returned. NGINX do not changes the reponse from the custom default backend. + +Using this two headers is possible to use a custom backend service like [this one](https://github.com/kubernetes/ingress/tree/master/examples/customization/custom-errors/nginx) that inspect each request and returns a custom error page with the format expected by the client. Please check the example [custom-errors](examples/customization/custom-errors/nginx/README.md) + +NGINX sends aditional headers that can be used to build custom response: + +- X-Original-URI +- X-Namespace +- X-Ingress-Name +- X-Service-Name + +### NGINX status page + +The ngx_http_stub_status_module module provides access to basic status information. This is the default module active in the url `/nginx_status`. +This controller provides an alternative to this module using [nginx-module-vts](https://github.com/vozlt/nginx-module-vts) third party module. +To use this module just provide a config map with the key `enable-vts-status=true`. The URL is exposed in the port 18080. +Please check the example `example/rc-default.yaml` + +![nginx-module-vts screenshot](https://cloud.githubusercontent.com/assets/3648408/10876811/77a67b70-8183-11e5-9924-6a6d0c5dc73a.png "screenshot with filter") + +To extract the information in JSON format the module provides a custom URL: `/nginx_status/format/json` + +### Running multiple ingress controllers + +If you're running multiple ingress controllers, or running on a cloudprovider that natively handles +ingress, you need to specify the annotation `kubernetes.io/ingress.class: "nginx"` in all ingresses +that you would like this controller to claim. Not specifying the annotation will lead to multiple +ingress controllers claiming the same ingress. Specifying the wrong value will result in all ingress +controllers ignoring the ingress. Multiple ingress controllers running in the same cluster was not +supported in Kubernetes versions < 1.3. + +### Running on Cloudproviders + +If you're running this ingress controller on a cloudprovider, you should assume the provider also has a native +Ingress controller and specify the ingress.class annotation as indicated in this section. +In addition to this, you will need to add a firewall rule for each port this controller is listening on, i.e :80 and :443. + +### Disabling NGINX ingress controller + +Setting the annotation `kubernetes.io/ingress.class` to any value other than "nginx" or the empty string, will force the NGINX Ingress controller to ignore your Ingress. Do this if you wish to use one of the other Ingress controllers at the same time as the NGINX controller. + +### Log format + +The default configuration uses a custom logging format to add additional information about upstreams + +``` + log_format upstreaminfo '{{ if $cfg.useProxyProtocol }}$proxy_protocol_addr{{ else }}$remote_addr{{ end }} - ' + '[$proxy_add_x_forwarded_for] - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" ' + '$request_length $request_time [$proxy_upstream_name] $upstream_addr $upstream_response_length $upstream_response_time $upstream_status'; +``` + +Sources: + - [upstream variables](http://nginx.org/en/docs/http/ngx_http_upstream_module.html#variables) + - [embedded variables](http://nginx.org/en/docs/http/ngx_http_core_module.html#variables) + +Description: +- `$proxy_protocol_addr`: if PROXY protocol is enabled +- `$remote_addr`: if PROXY protocol is disabled (default) +- `$proxy_add_x_forwarded_for`: the `X-Forwarded-For` client request header field with the $remote_addr variable appended to it, separated by a comma +- `$remote_user`: user name supplied with the Basic authentication +- `$time_local`: local time in the Common Log Format +- `$request`: full original request line +- `$status`: response status +- `$body_bytes_sent`: number of bytes sent to a client, not counting the response header +- `$http_referer`: value of the Referer header +- `$http_user_agent`: value of User-Agent header +- `$request_length`: request length (including request line, header, and request body) +- `$request_time`: time elapsed since the first bytes were read from the client +- `$proxy_upstream_name`: name of the upstream. The format is `upstream---` +- `$upstream_addr`: keeps the IP address and port, or the path to the UNIX-domain socket of the upstream server. If several servers were contacted during request processing, their addresses are separated by commas +- `$upstream_response_length`: keeps the length of the response obtained from the upstream server +- `$upstream_response_time`: keeps time spent on receiving the response from the upstream server; the time is kept in seconds with millisecond resolution +- `$upstream_status`: keeps status code of the response obtained from the upstream server + +### Local cluster + +Using [`hack/local-up-cluster.sh`](https://github.com/kubernetes/kubernetes/blob/master/hack/local-up-cluster.sh) is possible to start a local kubernetes cluster consisting of a master and a single node. Please read [running-locally.md](https://github.com/kubernetes/community/blob/master/contributors/devel/running-locally.md) for more details. + +Use of `hostNetwork: true` in the ingress controller is required to falls back at localhost:8080 for the apiserver if every other client creation check fails (eg: service account not present, kubeconfig doesn't exist, no master env vars...) + +### Debug & Troubleshooting + +Using the flag `--v=XX` it is possible to increase the level of logging. +In particular: +- `--v=2` shows details using `diff` about the changes in the configuration in nginx + +``` +I0316 12:24:37.581267 1 utils.go:148] NGINX configuration diff a//etc/nginx/nginx.conf b//etc/nginx/nginx.conf +I0316 12:24:37.581356 1 utils.go:149] --- /tmp/922554809 2016-03-16 12:24:37.000000000 +0000 ++++ /tmp/079811012 2016-03-16 12:24:37.000000000 +0000 +@@ -235,7 +235,6 @@ + + upstream default-echoheadersx { + least_conn; +- server 10.2.112.124:5000; + server 10.2.208.50:5000; + + } +I0316 12:24:37.610073 1 command.go:69] change in configuration detected. Reloading... +``` + +- `--v=3` shows details about the service, Ingress rule, endpoint changes and it dumps the nginx configuration in JSON format +- `--v=5` configures NGINX in [debug mode](http://nginx.org/en/docs/debugging_log.html) + +### Limitations + +- Ingress rules for TLS require the definition of the field `host` + +### Why endpoints and not services + +The NGINX ingress controller does not uses [Services](http://kubernetes.io/docs/user-guide/services) to route traffic to the pods. Instead it uses the Endpoints API in order to bypass [kube-proxy](http://kubernetes.io/docs/admin/kube-proxy/) to allow NGINX features like session affinity and custom load balancing algorithms. It also removes some overhead, such as conntrack entries for iptables DNAT. + +### NGINX notes + +Since `gcr.io/google_containers/nginx-slim:0.8` NGINX contains the next patches: +- Dynamic TLS record size [nginx__dynamic_tls_records.patch](https://blog.cloudflare.com/optimizing-tls-over-tcp-to-reduce-latency/) +NGINX provides the parameter `ssl_buffer_size` to adjust the size of the buffer. Default value in NGINX is 16KB. The ingress controller changes the default to 4KB. This improves the [TLS Time To First Byte (TTTFB)](https://www.igvita.com/2013/12/16/optimizing-nginx-tls-time-to-first-byte/) but the size is fixed. This patches adapts the size of the buffer to the content is being served helping to improve the perceived latency. diff --git a/controllers/nginx/pkg/cmd/controller/main.go b/cmd/nginx/main.go similarity index 89% rename from controllers/nginx/pkg/cmd/controller/main.go rename to cmd/nginx/main.go index d9cdf95c1..165957e41 100644 --- a/controllers/nginx/pkg/cmd/controller/main.go +++ b/cmd/nginx/main.go @@ -22,12 +22,14 @@ import ( "syscall" "time" + "k8s.io/ingress-nginx/pkg/nginx/controller" + "github.com/golang/glog" ) func main() { // start a new nginx controller - ngx := newNGINXController() + ngx := controller.NewNGINXController() go handleSigterm(ngx) // start the controller @@ -40,7 +42,7 @@ func main() { } } -func handleSigterm(ngx *NGINXController) { +func handleSigterm(ngx *controller.NGINXController) { signalChan := make(chan os.Signal, 1) signal.Notify(signalChan, syscall.SIGTERM) <-signalChan diff --git a/code-of-conduct.md b/code-of-conduct.md new file mode 100644 index 000000000..622d4c1d1 --- /dev/null +++ b/code-of-conduct.md @@ -0,0 +1,5 @@ +## Kubernetes Community Code of Conduct + +Kubernetes follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). + +[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/code-of-conduct.md?pixel)]() diff --git a/controllers/nginx/configuration.md b/configuration.md similarity index 100% rename from controllers/nginx/configuration.md rename to configuration.md diff --git a/controllers/README.md b/controllers/README.md deleted file mode 100644 index e27700d0e..000000000 --- a/controllers/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Ingress controllers - -This directory contains Ingress controllers. - -Configuring a webserver or loadbalancer is harder than it should be. Most webserver configuration files are very similar. There are some applications that have weird little quirks that tend to throw a wrench in things, but for the most part you can apply the same logic to them and achieve a desired result. - -The Ingress resource embodies this idea, and an Ingress controller is meant to handle all the quirks associated with a specific "class" of Ingress (be it a single instance of a loadbalancer, or a more complicated setup of frontends that provide GSLB, DDoS protection, etc). - -## What is an Ingress Controller? - -An Ingress Controller is a daemon, deployed as a Kubernetes Pod, that watches the apiserver's `/ingresses` endpoint for updates to the [Ingress resource](https://kubernetes.io/docs/concepts/services-networking/ingress/). Its job is to satisfy requests for Ingresses. diff --git a/controllers/gce/.gitignore b/controllers/gce/.gitignore deleted file mode 100644 index f83466729..000000000 --- a/controllers/gce/.gitignore +++ /dev/null @@ -1 +0,0 @@ -glbc diff --git a/controllers/gce/BETA_LIMITATIONS.md b/controllers/gce/BETA_LIMITATIONS.md deleted file mode 100644 index 3642f38a2..000000000 --- a/controllers/gce/BETA_LIMITATIONS.md +++ /dev/null @@ -1,153 +0,0 @@ -# GLBC: Beta limitations - -As of the Kubernetes 1.7 release, the GCE L7 Loadbalancer controller is still a *beta* product. - -This is a list of beta limitations: - -* [IPs](#static-and-ephemeral-ips): Creating a simple HTTP Ingress will allocate an ephemeral IP. Creating an Ingress with a TLS section will allocate a static IP. -* [Latency](#latency): GLBC is not built for performance. Creating many Ingresses at a time can overwhelm it. It won't fall over, but will take its own time to churn through the Ingress queue. -* [Quota](#quota): By default, GCE projects are granted a quota of 3 Backend Services. This is insufficient for most Kubernetes clusters. -* [Oauth scopes](https://cloud.google.com/compute/docs/authentication): By default GKE/GCE clusters are granted "compute/rw" permissions. If you setup a cluster without these permissions, GLBC is useless and you should delete the controller as described in the [section below](#disabling-glbc). If you don't delete the controller it will keep restarting. -* [Default backends](https://cloud.google.com/compute/docs/load-balancing/http/url-map#url_map_simplest_case): All L7 Loadbalancers created by GLBC have a default backend. If you don't specify one in your Ingress, GLBC will assign the 404 default backend mentioned above. -* [Load Balancing Algorithms](#load-balancing-algorithms): The ingress controller doesn't support fine grained control over loadbalancing algorithms yet. -* [Large clusters](#large-clusters): Ingress on GCE isn't supported on large (>1000 nodes), single-zone clusters. -* [Teardown](README.md#deletion): The recommended way to tear down a cluster with active Ingresses is to either delete each Ingress, or hit the `/delete-all-and-quit` endpoint on GLBC, before invoking a cluster teardown script (eg: kube-down.sh). You will have to manually cleanup GCE resources through the [cloud console](https://cloud.google.com/compute/docs/console#access) or [gcloud CLI](https://cloud.google.com/compute/docs/gcloud-compute/) if you simply tear down the cluster with active Ingresses. -* [Changing UIDs](#changing-the-cluster-uid): You can change the UID used as a suffix for all your GCE cloud resources, but this requires you to delete existing Ingresses first. -* [Cleaning up](#cleaning-up-cloud-resources): You can delete loadbalancers that older clusters might've leaked due to premature teardown through the GCE console. - -## Prerequisites - -Before you can receive traffic through the GCE L7 Loadbalancer Controller you need: -* A Working Kubernetes cluster >= 1.1 -* At least 1 Kubernetes NodePort Service (this is the endpoint for your Ingress) -* A single instance of the L7 Loadbalancer Controller pod, if you're running Kubernetes < 1.3 (the GCP ingress controller runs on the master in later versions) - -## Quota - -GLBC is not aware of your GCE quota. As of this writing users get 5 [GCE Backend Services](https://cloud.google.com/compute/docs/load-balancing/http/backend-service) by default. If you plan on creating Ingresses for multiple Kubernetes Services, remember that each one requires a backend service, and request quota. Should you fail to do so the controller will poll periodically and grab the first free backend service slot it finds. You can view your quota: - -```console -$ gcloud compute project-info describe --project myproject -``` -See [GCE documentation](https://cloud.google.com/compute/docs/resource-quotas#checking_your_quota) for how to request more. - -## Latency - -It takes ~1m to spin up a loadbalancer (this includes acquiring the public ip), and ~5-6m before the GCE api starts healthchecking backends. So as far as latency goes, here's what to expect: - -Assume one creates the following simple Ingress: -```yaml -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: test-ingress -spec: - backend: - # This will just loopback to the default backend of GLBC - serviceName: default-http-backend - servicePort: 80 -``` - -* time, t=0 -```console -$ kubectl get ing -NAME RULE BACKEND ADDRESS -test-ingress - default-http-backend:80 -$ kubectl describe ing -No events. -``` - -* time, t=1m -```console -$ kubectl get ing -NAME RULE BACKEND ADDRESS -test-ingress - default-http-backend:80 130.211.5.27 - -$ kubectl describe ing -target-proxy: k8s-tp-default-test-ingress -url-map: k8s-um-default-test-ingress -backends: {"k8s-be-32342":"UNKNOWN"} -forwarding-rule: k8s-fw-default-test-ingress -Events: - FirstSeen LastSeen Count From SubobjectPath Reason Message - ───────── ──────── ───── ──── ───────────── ────── ─────── - 46s 46s 1 {loadbalancer-controller } Success Created loadbalancer 130.211.5.27 -``` - -* time, t=5m -```console -$ kubectl describe ing -target-proxy: k8s-tp-default-test-ingress -url-map: k8s-um-default-test-ingress -backends: {"k8s-be-32342":"HEALTHY"} -forwarding-rule: k8s-fw-default-test-ingress -Events: - FirstSeen LastSeen Count From SubobjectPath Reason Message - ───────── ──────── ───── ──── ───────────── ────── ─────── - 46s 46s 1 {loadbalancer-controller } Success Created loadbalancer 130.211.5.27 - -``` - -## Static and Ephemeral IPs - -GCE has a concept of [ephemeral](https://cloud.google.com/compute/docs/instances-and-network#ephemeraladdress) and [static](https://cloud.google.com/compute/docs/instances-and-network#reservedaddress) IPs. A production website would always want a static IP, which ephemeral IPs are cheaper (both in terms of quota and cost), and are therefore better suited for experimentation. -* Creating a HTTP Ingress (i.e an Ingress without a TLS section) allocates an ephemeral IP, because we don't believe HTTP is the right way to deploy an app. -* Creating an Ingress with a TLS section allocates a static IP, because GLBC assumes you mean business. -* Modifying an Ingress and adding a TLS section allocates a static IP, but the IP *will* change. This is a beta limitation. -* You can [promote](https://cloud.google.com/compute/docs/instances-and-network#promote_ephemeral_ip) an ephemeral to a static IP by hand, if required. - -## Load Balancing Algorithms - -Right now, a kube-proxy nodePort is a necessary condition for Ingress on GCP. This is because the cloud lb doesn't understand how to route directly to your pods. Incorporating kube-proxy and cloud lb algorithms so they cooperate toward a common goal is still a work in progress. If you really want fine grained control over the algorithm, you should deploy the nginx ingress controller. - -## Large clusters - -Ingress is not yet supported on single zone clusters of size > 1000 nodes ([issue](https://github.com/kubernetes/contrib/issues/1724)). If you'd like to use Ingress on a large cluster, spread it across 2 or more zones such that no single zone contains more than a 1000 nodes. This is because there is a [limit](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances) to the number of instances one can add to a single GCE Instance Group. In a multi-zone cluster, each zone gets its own instance group. - -## Disabling GLBC - -To completely stop the Ingress controller on GCE/GKE, please see [this] (/docs/faq/gce.md#how-do-i-disable-the-gce-ingress-controller) faq. - -## Changing the cluster UID - -The Ingress controller configures itself to add the UID it stores in a configmap in the `kube-system` namespace. - -```console -$ kubectl --namespace=kube-system get configmaps -NAME DATA AGE -ingress-uid 1 12d - -$ kubectl --namespace=kube-system get configmaps -o yaml -apiVersion: v1 -items: -- apiVersion: v1 - data: - uid: UID - kind: ConfigMap -... -``` - -You can pick a different UID, but this requires you to: - -1. Delete existing Ingresses -2. Edit the configmap using `kubectl edit` -3. Recreate the same Ingress - -After step 3 the Ingress should come up using the new UID as the suffix of all cloud resources. You can't simply change the UID if you have existing Ingresses, because -renaming a cloud resource requires a delete/create cycle that the Ingress controller does not currently automate. Note that the UID in step 1 might be an empty string, -if you had a working Ingress before upgrading to Kubernetes 1.3. - -__A note on setting the UID__: The Ingress controller uses the token `--` to split a machine generated prefix from the UID itself. If the user supplied UID is found to -contain `--` the controller will take the token after the last `--`, and use an empty string if it ends with `--`. For example, if you insert `foo--bar` as the UID, -the controller will assume `bar` is the UID. You can either edit the configmap and set the UID to `bar` to match the controller, or delete existing Ingresses as described -above, and reset it to a string bereft of `--`. - -## Cleaning up cloud resources - -If you deleted a GKE/GCE cluster without first deleting the associated Ingresses, the controller would not have deleted the associated cloud resources. If you find yourself in such a situation, you can delete the resources by hand: - -1. Navigate to the [cloud console](https://console.cloud.google.com/) and click on the "Networking" tab, then choose "LoadBalancing" -2. Find the loadbalancer you'd like to delete, it should have a name formatted as: k8s-um-ns-name--UUID -3. Delete it, check the boxes to also cascade the deletion down to associated resources (eg: backend-services) -4. Switch to the "Compute Engine" tab, then choose "Instance Groups" -5. Delete the Instance Group allocated for the leaked Ingress, it should have a name formatted as: k8s-ig-UUID diff --git a/controllers/gce/Dockerfile b/controllers/gce/Dockerfile deleted file mode 100644 index 2c0e9555a..000000000 --- a/controllers/gce/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 2015 The Kubernetes Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FROM alpine:3.6 - -RUN apk add --no-cache ca-certificates - -COPY glbc glbc -ENTRYPOINT ["/glbc"] diff --git a/controllers/gce/Makefile b/controllers/gce/Makefile deleted file mode 100644 index 02d8e97fe..000000000 --- a/controllers/gce/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -all: push - -# 0.0 shouldn't clobber any released builds -TAG = 0.9.6 -PREFIX = gcr.io/google_containers/glbc - -server: - CGO_ENABLED=0 GOOS=linux godep go build -a -installsuffix cgo -ldflags '-w' -o glbc *.go - -container: server - docker build --pull -t $(PREFIX):$(TAG) . - -push: container - gcloud docker -- push $(PREFIX):$(TAG) - -clean: - rm -f glbc diff --git a/controllers/gce/OWNERS b/controllers/gce/OWNERS deleted file mode 100644 index 5b12a649d..000000000 --- a/controllers/gce/OWNERS +++ /dev/null @@ -1,6 +0,0 @@ -approvers: -- nicksardo -- thockin -- freehan -- csbell -- bprashanth diff --git a/controllers/gce/README.md b/controllers/gce/README.md deleted file mode 100644 index 8f1498dbd..000000000 --- a/controllers/gce/README.md +++ /dev/null @@ -1,712 +0,0 @@ -# GLBC - -GLBC is a GCE L7 load balancer controller that manages external loadbalancers configured through the Kubernetes Ingress API. - -## A word to the wise - -Please read the [beta limitations](BETA_LIMITATIONS.md) doc to before using this controller. In summary: - -- This is a **work in progress**. -- It relies on a beta Kubernetes resource. -- The loadbalancer controller pod is not aware of your GCE quota. - -## Overview - -__A reminder on GCE L7__: Google Compute Engine does not have a single resource that represents a L7 loadbalancer. When a user request comes in, it is first handled by the global forwarding rule, which sends the traffic to an HTTP proxy service that sends the traffic to a URL map that parses the URL to see which backend service will handle the request. Each backend service is assigned a set of virtual machine instances grouped into instance groups. - -__A reminder on Services__: A Kubernetes Service defines a set of pods and a means by which to access them, such as single stable IP address and corresponding DNS name. This IP defaults to a cluster VIP in a private address range. You can direct ingress traffic to a particular Service by setting its `Type` to NodePort or LoadBalancer. NodePort opens up a port on *every* node in your cluster and proxies traffic to the endpoints of your service, while LoadBalancer allocates an L4 cloud loadbalancer. - -### L7 Load balancing on Kubernetes - -To achieve L7 loadbalancing through Kubernetes, we employ a resource called `Ingress`. The Ingress is consumed by this loadbalancer controller, which creates the following GCE resource graph: - -[Global Forwarding Rule](https://cloud.google.com/compute/docs/load-balancing/http/global-forwarding-rules) -> [TargetHttpProxy](https://cloud.google.com/compute/docs/load-balancing/http/target-proxies) -> [Url Map](https://cloud.google.com/compute/docs/load-balancing/http/url-map) -> [Backend Service](https://cloud.google.com/compute/docs/load-balancing/http/backend-service) -> [Instance Group](https://cloud.google.com/compute/docs/instance-groups/) - -The controller (glbc) manages the lifecycle of each component in the graph. It uses the Kubernetes resources as a spec for the desired state, and the GCE cloud resources as the observed state, and drives the observed to the desired. If an edge is disconnected, it fixes it. Each Ingress translates to a new GCE L7, and the rules on the Ingress become paths in the GCE Url Map. This allows you to route traffic to various backend Kubernetes Services through a single public IP, which is in contrast to `Type=LoadBalancer`, which allocates a public IP *per* Kubernetes Service. For this to work, the Kubernetes Service *must* have Type=NodePort. - -### The Ingress - -An Ingress in Kubernetes is a REST object, similar to a Service. A minimal Ingress might look like: - -```yaml -01. apiVersion: extensions/v1beta1 -02. kind: Ingress -03. metadata: -04. name: hostlessendpoint -05. spec: -06. rules: -07. - http: -08. paths: -09. - path: /hostless -10. backend: -11. serviceName: test -12. servicePort: 80 -``` - -POSTing this to the Kubernetes API server would result in glbc creating a GCE L7 that routes all traffic sent to `http://ip-of-loadbalancer/hostless` to :80 of the service named `test`. If the service doesn't exist yet, or doesn't have a nodePort, glbc will allocate an IP and wait till it does. Once the Service shows up, it will create the required path rules to route traffic to it. - -__Lines 1-4__: Resource metadata used to tag GCE resources. For example, if you go to the console you would see a url map called: k8-fw-default-hostlessendpoint, where default is the namespace and hostlessendpoint is the name of the resource. The Kubernetes API server ensures that namespace/name is unique so there will never be any collisions. - -__Lines 5-7__: Ingress Spec has all the information needed to configure a GCE L7. Most importantly, it contains a list of `rules`. A rule can take many forms, but the only rule relevant to glbc is the `http` rule. - -__Lines 8-9__: Each http rule contains the following information: A host (eg: foo.bar.com, defaults to `*` in this example), a list of paths (eg: `/hostless`) each of which has an associated backend (`test:80`). Both the `host` and `path` must match the content of an incoming request before the L7 directs traffic to the `backend`. - -__Lines 10-12__: A `backend` is a service:port combination. It selects a group of pods capable of servicing traffic sent to the path specified in the parent rule. The `port` is the desired `spec.ports[*].port` from the Service Spec -- Note, though, that the L7 actually directs traffic to the corresponding `NodePort`. - -__Global Parameters__: For the sake of simplicity the example Ingress has no global parameters. However, one can specify a default backend (see examples below) in the absence of which requests that don't match a path in the spec are sent to the default backend of glbc. - - -## Load Balancer Management - -You can manage a GCE L7 by creating/updating/deleting the associated Kubernetes Ingress. - -### Creation - -Before you can start creating Ingress you need to start up glbc. We can use the rc.yaml in this directory: -```shell -$ kubectl create -f rc.yaml -replicationcontroller "glbc" created -$ kubectl get pods -NAME READY STATUS RESTARTS AGE -glbc-6m6b6 2/2 Running 0 21s - -``` - -A couple of things to note about this controller: -* It needs a service with a node port to use as the default backend. This is the backend that's used when an Ingress does not specify the default. -* It has an intentionally long terminationGracePeriod, this is only required with the --delete-all-on-quit flag (see [Deletion](#deletion)) -* Don't start 2 instances of the controller in a single cluster, they will fight each other. - -The loadbalancer controller will watch for Services, Nodes and Ingress. Nodes already exist (the nodes in your cluster). We need to create the other 2. You can do so using the ingress-app.yaml in this directory. - -A couple of things to note about the Ingress: -* It creates a Replication Controller for a simple echoserver application, with 1 replica. -* It creates 3 services for the same application pod: echoheaders[x, y, default] -* It creates an Ingress with 2 hostnames and 3 endpoints (foo.bar.com{/foo} and bar.baz.com{/foo, /bar}) that access the given service - -```shell -$ kubectl create -f ingress-app.yaml -$ kubectl get svc -NAME CLUSTER_IP EXTERNAL_IP PORT(S) SELECTOR AGE -echoheadersdefault 10.0.43.119 nodes 80/TCP app=echoheaders 16m -echoheadersx 10.0.126.10 nodes 80/TCP app=echoheaders 16m -echoheadersy 10.0.134.238 nodes 80/TCP app=echoheaders 16m -Kubernetes 10.0.0.1 443/TCP 21h - -$ kubectl get ing -NAME RULE BACKEND ADDRESS -echomap - echoheadersdefault:80 - foo.bar.com - /foo echoheadersx:80 - bar.baz.com - /bar echoheadersy:80 - /foo echoheadersx:80 -``` - -You can tail the logs of the controller to observe its progress: -``` -$ kubectl logs --follow glbc-6m6b6 l7-lb-controller -I1005 22:11:26.731845 1 instances.go:48] Creating instance group k8-ig-foo -I1005 22:11:34.360689 1 controller.go:152] Created new loadbalancer controller -I1005 22:11:34.360737 1 controller.go:172] Starting loadbalancer controller -I1005 22:11:34.380757 1 controller.go:206] Syncing default/echomap -I1005 22:11:34.380763 1 loadbalancer.go:134] Syncing loadbalancers [default/echomap] -I1005 22:11:34.380810 1 loadbalancer.go:100] Creating l7 default-echomap -I1005 22:11:34.385161 1 utils.go:83] Syncing e2e-test-beeps-minion-ugv1 -... -``` - -When it's done, it will update the status of the Ingress with the ip of the L7 it created: -```shell -$ kubectl get ing -NAME RULE BACKEND ADDRESS -echomap - echoheadersdefault:80 107.178.254.239 - foo.bar.com - /foo echoheadersx:80 - bar.baz.com - /bar echoheadersy:80 - /foo echoheadersx:80 -``` - -Go to your GCE console and confirm that the following resources have been created through the HTTPLoadbalancing panel: -* A Global Forwarding Rule -* An UrlMap -* A TargetHTTPProxy -* BackendServices (one for each Kubernetes nodePort service) -* An Instance Group (with ports corresponding to the BackendServices) - -The HTTPLoadBalancing panel will also show you if your backends have responded to the health checks, wait till they do. This can take a few minutes. If you see `Health status will display here once configuration is complete.` the L7 is still bootstrapping. Wait till you have `Healthy instances: X`. Even though the GCE L7 is driven by our controller, which notices the Kubernetes healthchecks of a pod, we still need to wait on the first GCE L7 health check to complete. Once your backends are up and healthy: - -```shell -$ curl --resolve foo.bar.com:80:107.178.245.239 http://foo.bar.com/foo -CLIENT VALUES: -client_address=('10.240.29.196', 56401) (10.240.29.196) -command=GET -path=/echoheadersx -real path=/echoheadersx -query= -request_version=HTTP/1.1 - -SERVER VALUES: -server_version=BaseHTTP/0.6 -sys_version=Python/3.4.3 -protocol_version=HTTP/1.0 - -HEADERS RECEIVED: -Accept=*/* -Connection=Keep-Alive -Host=107.178.254.239 -User-Agent=curl/7.35.0 -Via=1.1 google -X-Forwarded-For=216.239.45.73, 107.178.254.239 -X-Forwarded-Proto=http -``` - -You can also edit `/etc/hosts` instead of using `--resolve`. - -#### Updates - -Say you don't want a default backend and you'd like to allow all traffic hitting your loadbalancer at /foo to reach your echoheaders backend service, not just the traffic for foo.bar.com. You can modify the Ingress Spec: - -```yaml -spec: - rules: - - http: - paths: - - path: /foo -.. -``` - -and replace the existing Ingress (ignore errors about replacing the Service, we're using the same .yaml file but we only care about the Ingress): - -``` -$ kubectl replace -f ingress-app.yaml -ingress "echomap" replaced - -$ curl http://107.178.254.239/foo -CLIENT VALUES: -client_address=('10.240.143.179', 59546) (10.240.143.179) -command=GET -path=/foo -real path=/foo -... - -$ curl http://107.178.254.239/ -
-INTRODUCTION
-============
-This is an nginx webserver for simple loadbalancer testing. It works well
-for me but it might not have some of the features you want. If you would
-...
-```
-
-A couple of things to note about this particular update:
-* An Ingress without a default backend inherits the backend of the Ingress controller.
-* A IngressRule without a host gets the wildcard. This is controller specific, some loadbalancer controllers do not respect anything but a DNS subdomain as the host. You *cannot* set the host to a regex.
-* You never want to delete then re-create an Ingress, as it will result in the controller tearing down and recreating the loadbalancer.
-
-__Unexpected updates__: Since glbc constantly runs a control loop it won't allow you to break links that black hole traffic. An easy link to break is the url map itself, but you can also disconnect a target proxy from the urlmap, or remove an instance from the instance group (note this is different from *deleting* the instance, the loadbalancer controller will not recreate it if you do so). Modify one of the url links in the map to point to another backend through the GCE Control Panel UI, and wait till the controller sync (this happens as frequently as you tell it to, via the --resync-period flag). The same goes for the Kubernetes side of things, the API server will validate against obviously bad updates, but if you relink an Ingress so it points to the wrong backends the controller will blindly follow.
-
-### Paths
-
-Till now, our examples were simplified in that they hit an endpoint with a catch-all path regex. Most real world backends have subresources. Let's create service to test how the loadbalancer handles paths:
-```yaml
-apiVersion: v1
-kind: ReplicationController
-metadata:
-  name: nginxtest
-spec:
-  replicas: 1
-  template:
-    metadata:
-      labels:
-        app: nginxtest
-    spec:
-      containers:
-      - name: nginxtest
-        image: bprashanth/nginxtest:1.0
-        ports:
-        - containerPort: 80
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: nginxtest
-  labels:
-    app: nginxtest
-spec:
-  type: NodePort
-  ports:
-  - port: 80
-    targetPort: 80
-    protocol: TCP
-    name: http
-  selector:
-    app: nginxtest
-```
-
-Running kubectl create against this manifest will give you a service with multiple endpoints:
-```shell
-$ kubectl get svc nginxtest -o yaml | grep -i nodeport:
-    nodePort: 30404
-$ curl nodeip:30404/
-ENDPOINTS
-=========
- hostname: An endpoint to query the hostname.
- stress: An endpoint to stress the host.
- fs: A file system for static content.
-
-```
-You can put the nodeip:port into your browser and play around with the endpoints so you're familiar with what to expect. We will test the `/hostname` and `/fs/files/nginx.html` endpoints. Modify/create your Ingress:
-```yaml
-apiVersion: extensions/v1beta1
-kind: Ingress
-metadata:
-  name: nginxtest-ingress
-spec:
-  rules:
-  - http:
-      paths:
-      - path: /hostname
-        backend:
-          serviceName: nginxtest
-          servicePort: 80
-```
-
-And check the endpoint (you will have to wait till the update takes effect, this could be a few minutes):
-```shell
-$ kubectl replace -f ingress.yaml
-$ curl loadbalancerip/hostname
-nginx-tester-pod-name
-```
-
-Note what just happened, the endpoint exposes /hostname, and the loadbalancer forwarded the entire matching url to the endpoint. This means if you had '/foo' in the Ingress and tried accessing /hostname, your endpoint would've received /foo/hostname and not known how to route it. Now update the Ingress to access static content via the /fs endpoint:
-```yaml
-apiVersion: extensions/v1beta1
-kind: Ingress
-metadata:
-  name: nginxtest-ingress
-spec:
-  rules:
-  - http:
-      paths:
-      - path: /fs/*
-        backend:
-          serviceName: nginxtest
-          servicePort: 80
-```
-
-As before, wait a while for the update to take effect, and try accessing `loadbalancerip/fs/files/nginx.html`.
-
-#### Deletion
-
-Most production loadbalancers live as long as the nodes in the cluster and are torn down when the nodes are destroyed. That said, there are plenty of use cases for deleting an Ingress, deleting a loadbalancer controller, or just purging external loadbalancer resources altogether. Deleting a loadbalancer controller pod will not affect the loadbalancers themselves, this way your backends won't suffer a loss of availability if the scheduler pre-empts your controller pod. Deleting a single loadbalancer is as easy as deleting an Ingress via kubectl:
-```shell
-$ kubectl delete ing echomap
-$ kubectl logs --follow glbc-6m6b6 l7-lb-controller
-I1007 00:25:45.099429       1 loadbalancer.go:144] Deleting lb default-echomap
-I1007 00:25:45.099432       1 loadbalancer.go:437] Deleting global forwarding rule k8-fw-default-echomap
-I1007 00:25:54.885823       1 loadbalancer.go:444] Deleting target proxy k8-tp-default-echomap
-I1007 00:25:58.446941       1 loadbalancer.go:451] Deleting url map k8-um-default-echomap
-I1007 00:26:02.043065       1 backends.go:176] Deleting backends []
-I1007 00:26:02.043188       1 backends.go:134] Deleting backend k8-be-30301
-I1007 00:26:05.591140       1 backends.go:134] Deleting backend k8-be-30284
-I1007 00:26:09.159016       1 controller.go:232] Finished syncing default/echomap
-```
-Note that it takes ~30 seconds to purge cloud resources, the API calls to create and delete are a onetime cost. GCE BackendServices are ref-counted and deleted by the controller as you delete Kubernetes Ingress'. This is not sufficient for cleanup, because you might have deleted the Ingress while glbc was down, in which case it would leak cloud resources. You can delete the glbc and purge cloud resources in 2 more ways:
-
-__The dev/test way__: If you want to delete everything in the cloud when the loadbalancer controller pod dies, start it with the --delete-all-on-quit flag. When a pod is killed it's first sent a SIGTERM, followed by a grace period (set to 10minutes for loadbalancer controllers), followed by a SIGKILL. The controller pod uses this time to delete cloud resources. Be careful with --delete-all-on-quit, because if you're running a production glbc and the scheduler re-schedules your pod for some reason, it will result in a loss of availability. You can do this because your rc.yaml has:
-```yaml
-args:
-# auto quit requires a high termination grace period.
-- --delete-all-on-quit=true
-```
-
-So simply delete the replication controller:
-```shell
-$ kubectl get rc glbc
-CONTROLLER   CONTAINER(S)           IMAGE(S)                                      SELECTOR                    REPLICAS   AGE
-glbc         default-http-backend   gcr.io/google_containers/defaultbackend:1.0   k8s-app=glbc,version=v0.5   1          2m
-             l7-lb-controller       gcr.io/google_containers/glbc:0.9.6
-
-$ kubectl delete rc glbc
-replicationcontroller "glbc" deleted
-
-$ kubectl get pods
-NAME                    READY     STATUS        RESTARTS   AGE
-glbc-6m6b6              1/1       Terminating   0          13m
-```
-
-__The prod way__: If you didn't start the controller with `--delete-all-on-quit`, you can execute a GET on the `/delete-all-and-quit` endpoint. This endpoint is deliberately not exported.
-
-```shell
-$ kubectl exec -it glbc-6m6b6  -- wget -q -O- http://localhost:8081/delete-all-and-quit
-..Hangs till quit is done..
-
-$ kubectl logs glbc-6m6b6  --follow
-I1007 00:26:09.159016       1 controller.go:232] Finished syncing default/echomap
-I1007 00:29:30.321419       1 controller.go:192] Shutting down controller queues.
-I1007 00:29:30.321970       1 controller.go:199] Shutting down cluster manager.
-I1007 00:29:30.321574       1 controller.go:178] Shutting down Loadbalancer Controller
-I1007 00:29:30.322378       1 main.go:160] Handled quit, awaiting pod deletion.
-I1007 00:29:30.321977       1 loadbalancer.go:154] Creating loadbalancers []
-I1007 00:29:30.322617       1 loadbalancer.go:192] Loadbalancer pool shutdown.
-I1007 00:29:30.322622       1 backends.go:176] Deleting backends []
-I1007 00:30:00.322528       1 main.go:160] Handled quit, awaiting pod deletion.
-I1007 00:30:30.322751       1 main.go:160] Handled quit, awaiting pod deletion
-```
-
-You just instructed the loadbalancer controller to quit, however if it had done so, the replication controller would've just created another pod, so it waits around till you delete the rc.
-
-#### Health checks
-
-Currently, all service backends must satisfy *either* of the following requirements to pass the HTTP(S) health checks sent to it from the GCE loadbalancer:
-1. Respond with a 200 on '/'. The content does not matter.
-2. Expose an arbitrary url as a `readiness` probe on the pods backing the Service.
-
-The Ingress controller looks for a compatible readiness probe first, if it finds one, it adopts it as the GCE loadbalancer's HTTP(S) health check. If there's no readiness probe, or the readiness probe requires special HTTP headers, the Ingress controller points the GCE loadbalancer's HTTP health check at '/'. [This is an example](examples/health_checks/README.md) of an Ingress that adopts the readiness probe from the endpoints as its health check.
-
-## Frontend HTTPS
-For encrypted communication between the client to the load balancer, you can secure an Ingress by specifying a [secret](http://kubernetes.io/docs/user-guide/secrets) that contains a TLS private key and certificate. Currently the Ingress only supports a single TLS port, 443, and assumes TLS termination. This controller does not support SNI, so it will ignore all but the first cert in the TLS configuration section. The TLS secret must [contain keys](https://github.com/kubernetes/kubernetes/blob/master/pkg/api/types.go#L2696) named `tls.crt` and `tls.key` that contain the certificate and private key to use for TLS, eg:
-
-```yaml
-apiVersion: v1
-kind: Secret
-metadata:
-  name: testsecret
-  namespace: default
-type: Opaque
-data:
-  tls.crt: base64 encoded cert
-  tls.key: base64 encoded key
-```
-
-Referencing this secret in an Ingress will tell the Ingress controller to secure the channel from the client to the loadbalancer using TLS.
-
-```yaml
-apiVersion: extensions/v1beta1
-kind: Ingress
-metadata:
-  name: no-rules-map
-spec:
-  tls:
-  - secretName: testsecret
-  backend:
-    serviceName: s1
-    servicePort: 80
-```
-
-This creates 2 GCE forwarding rules that use a single static ip. Both `:80` and `:443` will direct traffic to your backend, which serves HTTP requests on the target port mentioned in the Service associated with the Ingress.
-
-## Backend HTTPS
-For encrypted communication between the load balancer and your Kubernetes service, you need to decorate the service's port as expecting HTTPS. There's an alpha [Service annotation](examples/backside_https/app.yaml) for specifying the expected protocol per service port. Upon seeing the protocol as HTTPS, the ingress controller will assemble a GCP L7 load balancer with an HTTPS backend-service with a HTTPS health check.
-
-The annotation value is a stringified JSON map of port-name to "HTTPS" or "HTTP".  If you do not specify the port, "HTTP" is assumed.
-```yaml
-apiVersion: v1
-kind: Service
-metadata:
-  name: my-echo-svc
-  annotations:
-      service.alpha.kubernetes.io/app-protocols: '{"my-https-port":"HTTPS"}'
-  labels:
-    app: echo
-spec:
-  type: NodePort
-  ports:
-  - port: 443
-    protocol: TCP
-    name: my-https-port
-  selector:
-    app: echo
-```
-
-#### Redirecting HTTP to HTTPS
-
-To redirect traffic from `:80` to `:443` you need to examine the `x-forwarded-proto` header inserted by the GCE L7, since the Ingress does not support redirect rules. In nginx, this is as simple as adding the following lines to your config:
-```nginx
-# Replace '_' with your hostname.
-server_name _;
-if ($http_x_forwarded_proto = "http") {
-    return 301 https://$host$request_uri;
-}
-```
-
-Here's an example that demonstrates it, first lets create a self signed certificate valid for upto a year:
-
-```console
-$ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /tmp/tls.key -out /tmp/tls.crt -subj "/CN=foobar.com"
-$ kubectl create secret tls tls-secret --key=/tmp/tls.key --cert=/tmp/tls.crt
-secret "tls-secret" created
-```
-
-Then the Services/Ingress to use it:
-
-```yaml
-$ echo "
-apiVersion: v1
-kind: Service
-metadata:
-  name: echoheaders-https
-  labels:
-    app: echoheaders-https
-spec:
-  type: NodePort
-  ports:
-  - port: 80
-    targetPort: 8080
-    protocol: TCP
-    name: http
-  selector:
-    app: echoheaders-https
----
-apiVersion: v1
-kind: ReplicationController
-metadata:
-  name: echoheaders-https
-spec:
-  replicas: 2
-  template:
-    metadata:
-      labels:
-        app: echoheaders-https
-    spec:
-      containers:
-      - name: echoheaders-https
-        image: gcr.io/google_containers/echoserver:1.3
-        ports:
-        - containerPort: 8080
----
-apiVersion: extensions/v1beta1
-kind: Ingress
-metadata:
-  name: test
-spec:
-  tls:
-  - secretName: tls-secret
-  backend:
-    serviceName: echoheaders-https
-    servicePort: 80
-" | kubectl create -f -
-```
-
-This creates 2 GCE forwarding rules that use a single static ip. Port `80` redirects to port `443` which terminates TLS and sends traffic to your backend.
-
-```console
-$ kubectl get ing
-NAME      HOSTS     ADDRESS   PORTS     AGE
-test      *                   80, 443   5s
-
-$ kubectl describe ing
-Name:			test
-Namespace:		default
-Address:		130.211.21.233
-Default backend:	echoheaders-https:80 (10.180.1.7:8080,10.180.2.3:8080)
-TLS:
-  tls-secret terminates
-Rules:
-  Host	Path	Backends
-  ----	----	--------
-  *	* 	echoheaders-https:80 (10.180.1.7:8080,10.180.2.3:8080)
-Annotations:
-  url-map:			k8s-um-default-test--7d2d86e772b6c246
-  backends:			{"k8s-be-32327--7d2d86e772b6c246":"HEALTHY"}
-  forwarding-rule:		k8s-fw-default-test--7d2d86e772b6c246
-  https-forwarding-rule:	k8s-fws-default-test--7d2d86e772b6c246
-  https-target-proxy:		k8s-tps-default-test--7d2d86e772b6c246
-  static-ip:			k8s-fw-default-test--7d2d86e772b6c246
-  target-proxy:			k8s-tp-default-test--7d2d86e772b6c246
-Events:
-  FirstSeen	LastSeen	Count	From				SubobjectPath	Type		Reason		Message
-  ---------	--------	-----	----				-------------	--------	------		-------
-  12m		12m		1	{loadbalancer-controller }			Normal		ADD		default/test
-  4m		4m		1	{loadbalancer-controller }			Normal		CREATE		ip: 130.211.21.233
-```
-
-Testing reachability:
-```console
-$ curl 130.211.21.233 -kL
-CLIENT VALUES:
-client_address=10.240.0.4
-command=GET
-real path=/
-query=nil
-request_version=1.1
-request_uri=http://130.211.21.233:8080/
-...
-
-$ curl --resolve foobar.in:443:130.211.21.233 https://foobar.in --cacert /tmp/tls.crt
-CLIENT VALUES:
-client_address=10.240.0.4
-command=GET
-real path=/
-query=nil
-request_version=1.1
-request_uri=http://bitrot.com:8080/
-...
-
-$ curl --resolve bitrot.in:443:130.211.21.233 https://foobar.in --cacert /tmp/tls.crt
-curl: (51) SSL: certificate subject name 'foobar.in' does not match target host name 'foobar.in'
-```
-
-Note that the GCLB health checks *do not* get the `301` because they don't include `x-forwarded-proto`.
-
-#### Blocking HTTP
-
-You can block traffic on `:80` through an annotation. You might want to do this if all your clients are only going to hit the loadbalancer through https and you don't want to waste the extra GCE forwarding rule, eg:
-```yaml
-apiVersion: extensions/v1beta1
-kind: Ingress
-metadata:
-  name: test
-  annotations:
-    kubernetes.io/ingress.allow-http: "false"
-spec:
-  tls:
-  # This assumes tls-secret exists.
-  # To generate it run the make in this directory.
-  - secretName: tls-secret
-  backend:
-    serviceName: echoheaders-https
-    servicePort: 80
-```
-
-Upon describing it you should only see a single GCE forwarding rule:
-```console
-$ kubectl describe ing
-Name:			test
-Namespace:		default
-Address:		130.211.10.121
-Default backend:	echoheaders-https:80 (10.245.2.4:8080,10.245.3.4:8080)
-TLS:
-  tls-secret terminates
-Rules:
-  Host	Path	Backends
-  ----	----	--------
-Annotations:
-  https-target-proxy:		k8s-tps-default-test--uid
-  url-map:			k8s-um-default-test--uid
-  backends:			{"k8s-be-31644--uid":"Unknown"}
-  https-forwarding-rule:	k8s-fws-default-test--uid
-Events:
-  FirstSeen	LastSeen	Count	From				SubobjectPath	Type		Reason	Message
-  ---------	--------	-----	----				-------------	--------	------	-------
-  13m		13m		1	{loadbalancer-controller }			Normal		ADD	default/test
-  12m		12m		1	{loadbalancer-controller }			Normal		CREATE	ip: 130.211.10.121
-```
-
-And curling `:80` should just `404`:
-```console
-$ curl 130.211.10.121
-...
-  
-  

404. That’s an error. - -$ curl https://130.211.10.121 -k -... -SERVER VALUES: -server_version=nginx: 1.9.11 - lua: 10001 -``` - -## Troubleshooting: - -This controller is complicated because it exposes a tangled set of external resources as a single logical abstraction. It's recommended that you are at least *aware* of how one creates a GCE L7 [without a kubernetes Ingress](https://cloud.google.com/container-engine/docs/tutorials/http-balancer). If weird things happen, here are some basic debugging guidelines: - -* Check loadbalancer controller pod logs via kubectl -A typical sign of trouble is repeated retries in the logs: -```shell -I1006 18:58:53.451869 1 loadbalancer.go:268] Forwarding rule k8-fw-default-echomap already exists -I1006 18:58:53.451955 1 backends.go:162] Syncing backends [30301 30284 30301] -I1006 18:58:53.451998 1 backends.go:134] Deleting backend k8-be-30302 -E1006 18:58:57.029253 1 utils.go:71] Requeuing default/echomap, err googleapi: Error 400: The backendService resource 'projects/Kubernetesdev/global/backendServices/k8-be-30302' is already being used by 'projects/Kubernetesdev/global/urlMaps/k8-um-default-echomap' -I1006 18:58:57.029336 1 utils.go:83] Syncing default/echomap -``` - -This could be a bug or quota limitation. In the case of the former, please head over to slack or github. - -* If you see a GET hanging, followed by a 502 with the following response: - -``` - - -502 Server Error - - -

Error: Server Error

-

The server encountered a temporary error and could not complete your request.

Please try again in 30 seconds.

-

- -``` -The loadbalancer is probably bootstrapping itself. - -* If a GET responds with a 404 and the following response: -``` - -

404. That’s an error. -

The requested URL /hostless was not found on this server. That’s all we know. -``` -It means you have lost your IP somehow, or just typed in the wrong IP. - -* If you see requests taking an abnormal amount of time, run the echoheaders pod and look for the client address -```shell -CLIENT VALUES: -client_address=('10.240.29.196', 56401) (10.240.29.196) -``` - -Then head over to the GCE node with internal ip 10.240.29.196 and check that the [Service is functioning](https://github.com/kubernetes/kubernetes/blob/release-1.0/docs/user-guide/debugging-services.md) as expected. Remember that the GCE L7 is routing you through the NodePort service, and try to trace back. - -* Check if you can access the backend service directly via nodeip:nodeport -* Check the GCE console -* Make sure you only have a single loadbalancer controller running -* Make sure the initial GCE health checks have passed -* A crash loop looks like: -```shell -$ kubectl get pods -glbc-fjtlq 0/1 CrashLoopBackOff 17 1h -``` -If you hit that it means the controller isn't even starting. Re-check your input flags, especially the required ones. - -## Creating the firewall rule for GLBC health checks - -A default GKE/GCE cluster needs at least 1 firewall rule for GLBC to function. The Ingress controller should create this for you automatically. You can also create it thus: -```console -$ gcloud compute firewall-rules create allow-130-211-0-0-22 \ - --source-ranges 130.211.0.0/22,35.191.0.0/16 \ - --target-tags $TAG \ - --allow tcp:$NODE_PORT -``` - -Where `130.211.0.0/22` and `35.191.0.0/16` are the source ranges of the GCE L7, `$NODE_PORT` is the node port your Service is exposed on, i.e: -```console -$ kubectl get -o jsonpath="{.spec.ports[0].nodePort}" services ${SERVICE_NAME} -``` - -and `$TAG` is an optional list of GKE instance tags, i.e: -```console -$ kubectl get nodes | awk '{print $1}' | tail -n +2 | grep -Po 'gke-[0-9,a-z]+-[0-9,a-z]+-node' | uniq -``` - -## GLBC Implementation Details - -For the curious, here is a high level overview of how the GCE LoadBalancer controller manages cloud resources. - -The controller manages cloud resources through a notion of pools. Each pool is the representation of the last known state of a logical cloud resource. Pools are periodically synced with the desired state, as reflected by the Kubernetes api. When you create a new Ingress, the following happens: -* Create BackendServices for each Kubernetes backend in the Ingress, through the backend pool. -* Add nodePorts for each BackendService to an Instance Group with all the instances in your cluster, through the instance pool. -* Create a UrlMap, TargetHttpProxy, Global Forwarding Rule through the loadbalancer pool. -* Update the loadbalancer's urlmap according to the Ingress. - -Periodically, each pool checks that it has a valid connection to the next hop in the above resource graph. So for example, the backend pool will check that each backend is connected to the instance group and that the node ports match, the instance group will check that all the Kubernetes nodes are a part of the instance group, and so on. Since Backends are a limited resource, they're shared (well, everything is limited by your quota, this applies doubly to backend services). This means you can setup N Ingress' exposing M services through different paths and the controller will only create M backends. When all the Ingress' are deleted, the backend pool GCs the backend. - -## Wish list: - -* More E2e, integration tests -* Better events -* Detect leaked resources even if the Ingress has been deleted when the controller isn't around -* Specify health checks (currently we just rely on kubernetes service/pod liveness probes and force pods to have a `/` endpoint that responds with 200 for GCE) -* Alleviate the NodePort requirement for Service Type=LoadBalancer. -* Async pool management of backends/L7s etc -* Retry back-off when GCE Quota is done -* GCE Quota integration - -[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/contrib/service-loadbalancer/gce/README.md?pixel)]() diff --git a/controllers/gce/backends/backends.go b/controllers/gce/backends/backends.go deleted file mode 100644 index cdd2dd68d..000000000 --- a/controllers/gce/backends/backends.go +++ /dev/null @@ -1,491 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package backends - -import ( - "fmt" - "net/http" - "strconv" - "strings" - "time" - - "github.com/golang/glog" - - compute "google.golang.org/api/compute/v1" - - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/intstr" - "k8s.io/apimachinery/pkg/util/sets" - - "k8s.io/ingress/controllers/gce/healthchecks" - "k8s.io/ingress/controllers/gce/instances" - "k8s.io/ingress/controllers/gce/storage" - "k8s.io/ingress/controllers/gce/utils" -) - -// BalancingMode represents the loadbalancing configuration of an individual -// Backend in a BackendService. This is *effectively* a cluster wide setting -// since you can't mix modes across Backends pointing to the same IG, and you -// can't have a single node in more than 1 loadbalanced IG. -type BalancingMode string - -const ( - // Rate balances incoming requests based on observed RPS. - // As of this writing, it's the only balancing mode supported by GCE's - // internal LB. This setting doesn't make sense for Kubernets clusters - // because requests can get proxied between instance groups in different - // zones by kube-proxy without GCE even knowing it. Setting equal RPS on - // all IGs should achieve roughly equal distribution of requests. - Rate BalancingMode = "RATE" - // Utilization balances incoming requests based on observed utilization. - // This mode is only useful if you want to divert traffic away from IGs - // running other compute intensive workloads. Utilization statistics are - // aggregated per instances, not per container, and requests can get proxied - // between instance groups in different zones by kube-proxy without GCE even - // knowing about it. - Utilization BalancingMode = "UTILIZATION" - // Connections balances incoming requests based on a connection counter. - // This setting currently doesn't make sense for Kubernetes clusters, - // because we use NodePort Services as HTTP LB backends, so GCE's connection - // counters don't accurately represent connections per container. - Connections BalancingMode = "CONNECTION" -) - -// maxRPS is the RPS setting for all Backends with BalancingMode RATE. The exact -// value doesn't matter, as long as it's the same for all Backends. Requests -// received by GCLB above this RPS are NOT dropped, GCLB continues to distribute -// them across IGs. -// TODO: Should this be math.MaxInt64? -const maxRPS = 1 - -// Backends implements BackendPool. -type Backends struct { - cloud BackendServices - nodePool instances.NodePool - healthChecker healthchecks.HealthChecker - snapshotter storage.Snapshotter - prober probeProvider - // ignoredPorts are a set of ports excluded from GC, even - // after the Ingress has been deleted. Note that invoking - // a Delete() on these ports will still delete the backend. - ignoredPorts sets.String - namer *utils.Namer -} - -func portKey(port int64) string { - return fmt.Sprintf("%d", port) -} - -// ServicePort for tupling port and protocol -type ServicePort struct { - Port int64 - Protocol utils.AppProtocol - SvcName types.NamespacedName - SvcPort intstr.IntOrString -} - -// Description returns a string describing the ServicePort. -func (sp ServicePort) Description() string { - if sp.SvcName.String() == "" || sp.SvcPort.String() == "" { - return "" - } - return fmt.Sprintf(`{"kubernetes.io/service-name":"%s","kubernetes.io/service-port":"%s"}`, sp.SvcName.String(), sp.SvcPort.String()) -} - -// NewBackendPool returns a new backend pool. -// - cloud: implements BackendServices and syncs backends with a cloud provider -// - healthChecker: is capable of producing health checks for backends. -// - nodePool: implements NodePool, used to create/delete new instance groups. -// - namer: procudes names for backends. -// - ignorePorts: is a set of ports to avoid syncing/GCing. -// - resyncWithCloud: if true, periodically syncs with cloud resources. -func NewBackendPool( - cloud BackendServices, - healthChecker healthchecks.HealthChecker, - nodePool instances.NodePool, - namer *utils.Namer, - ignorePorts []int64, - resyncWithCloud bool) *Backends { - - ignored := []string{} - for _, p := range ignorePorts { - ignored = append(ignored, portKey(p)) - } - backendPool := &Backends{ - cloud: cloud, - nodePool: nodePool, - healthChecker: healthChecker, - namer: namer, - ignoredPorts: sets.NewString(ignored...), - } - if !resyncWithCloud { - backendPool.snapshotter = storage.NewInMemoryPool() - return backendPool - } - backendPool.snapshotter = storage.NewCloudListingPool( - func(i interface{}) (string, error) { - bs := i.(*compute.BackendService) - if !namer.NameBelongsToCluster(bs.Name) { - return "", fmt.Errorf("unrecognized name %v", bs.Name) - } - port, err := namer.BePort(bs.Name) - if err != nil { - return "", err - } - return port, nil - }, - backendPool, - 30*time.Second, - ) - return backendPool -} - -// Init sets the probeProvider interface value -func (b *Backends) Init(pp probeProvider) { - b.prober = pp -} - -// Get returns a single backend. -func (b *Backends) Get(port int64) (*compute.BackendService, error) { - be, err := b.cloud.GetGlobalBackendService(b.namer.BeName(port)) - if err != nil { - return nil, err - } - b.snapshotter.Add(portKey(port), be) - return be, nil -} - -func (b *Backends) ensureHealthCheck(sp ServicePort) (string, error) { - hc := b.healthChecker.New(sp.Port, sp.Protocol) - - existingLegacyHC, err := b.healthChecker.GetLegacy(sp.Port) - if err != nil && !utils.IsNotFoundError(err) { - return "", err - } - - if existingLegacyHC != nil { - glog.V(4).Infof("Applying settings of existing health check to newer health check on port %+v", sp) - applyLegacyHCToHC(existingLegacyHC, hc) - } else if b.prober != nil { - probe, err := b.prober.GetProbe(sp) - if err != nil { - return "", err - } - if probe != nil { - glog.V(4).Infof("Applying httpGet settings of readinessProbe to health check on port %+v", sp) - applyProbeSettingsToHC(probe, hc) - } - } - - return b.healthChecker.Sync(hc) -} - -func (b *Backends) create(namedPort *compute.NamedPort, hcLink string, sp ServicePort, name string) (*compute.BackendService, error) { - bs := &compute.BackendService{ - Name: name, - Description: sp.Description(), - Protocol: string(sp.Protocol), - HealthChecks: []string{hcLink}, - Port: namedPort.Port, - PortName: namedPort.Name, - } - if err := b.cloud.CreateGlobalBackendService(bs); err != nil { - return nil, err - } - return b.Get(namedPort.Port) -} - -// Ensure will update or create Backends for the given ports. -// Uses the given instance groups if non-nil, else creates instance groups. -func (b *Backends) Ensure(svcPorts []ServicePort, igs []*compute.InstanceGroup) error { - glog.V(3).Infof("Sync: backends %v", svcPorts) - // Ideally callers should pass the instance groups to prevent recomputing them here. - // Igs can be nil in scenarios where we do not have instance groups such as - // while syncing default backend service. - if igs == nil { - ports := []int64{} - for _, p := range svcPorts { - ports = append(ports, p.Port) - } - var err error - igs, _, err = instances.EnsureInstanceGroupsAndPorts(b.nodePool, b.namer, ports) - if err != nil { - return err - } - } - // create backends for new ports, perform an edge hop for existing ports - for _, port := range svcPorts { - if err := b.ensureBackendService(port, igs); err != nil { - return err - } - } - return nil -} - -// ensureBackendService will update or create a Backend for the given port. -// It assumes that the instance groups have been created and required named port has been added. -// If not, then Ensure should be called instead. -func (b *Backends) ensureBackendService(p ServicePort, igs []*compute.InstanceGroup) error { - // We must track the ports even if creating the backends failed, because - // we might've created health-check for them. - be := &compute.BackendService{} - defer func() { b.snapshotter.Add(portKey(p.Port), be) }() - - var err error - - // Ensure health check for backend service exists - hcLink, err := b.ensureHealthCheck(p) - if err != nil { - return err - } - - // Verify existance of a backend service for the proper port, but do not specify any backends/igs - pName := b.namer.BeName(p.Port) - be, _ = b.Get(p.Port) - if be == nil { - namedPort := utils.GetNamedPort(p.Port) - glog.V(2).Infof("Creating backend service for port %v named port %v", p.Port, namedPort) - be, err = b.create(namedPort, hcLink, p, pName) - if err != nil { - return err - } - } - - // Check that the backend service has the correct protocol and health check link - existingHCLink := "" - if len(be.HealthChecks) == 1 { - existingHCLink = be.HealthChecks[0] - } - if be.Protocol != string(p.Protocol) || existingHCLink != hcLink || be.Description != p.Description() { - glog.V(2).Infof("Updating backend protocol %v (%v) for change in protocol (%v) or health check", pName, be.Protocol, string(p.Protocol)) - be.Protocol = string(p.Protocol) - be.HealthChecks = []string{hcLink} - be.Description = p.Description() - if err = b.cloud.UpdateGlobalBackendService(be); err != nil { - return err - } - } - - // If previous health check was legacy type, we need to delete it. - if existingHCLink != hcLink && strings.Contains(existingHCLink, "/httpHealthChecks/") { - if err = b.healthChecker.DeleteLegacy(p.Port); err != nil { - glog.Warning("Failed to delete legacy HttpHealthCheck %v; Will not try again, err: %v", pName, err) - } - } - - // we won't find any igs till the node pool syncs nodes. - if len(igs) == 0 { - return nil - } - - // Verify that backend service contains links to all backends/instance-groups - return b.edgeHop(be, igs) -} - -// Delete deletes the Backend for the given port. -func (b *Backends) Delete(port int64) (err error) { - name := b.namer.BeName(port) - glog.V(2).Infof("Deleting backend service %v", name) - defer func() { - if utils.IsHTTPErrorCode(err, http.StatusNotFound) { - err = nil - } - if err == nil { - b.snapshotter.Delete(portKey(port)) - } - }() - // Try deleting health checks even if a backend is not found. - if err = b.cloud.DeleteGlobalBackendService(name); err != nil && !utils.IsHTTPErrorCode(err, http.StatusNotFound) { - return err - } - - return b.healthChecker.Delete(port) -} - -// List lists all backends. -func (b *Backends) List() ([]interface{}, error) { - // TODO: for consistency with the rest of this sub-package this method - // should return a list of backend ports. - interList := []interface{}{} - be, err := b.cloud.ListGlobalBackendServices() - if err != nil { - return interList, err - } - for i := range be.Items { - interList = append(interList, be.Items[i]) - } - return interList, nil -} - -func getBackendsForIGs(igs []*compute.InstanceGroup, bm BalancingMode) []*compute.Backend { - var backends []*compute.Backend - for _, ig := range igs { - b := &compute.Backend{ - Group: ig.SelfLink, - BalancingMode: string(bm), - } - switch bm { - case Rate: - b.MaxRatePerInstance = maxRPS - default: - // TODO: Set utilization and connection limits when we accept them - // as valid fields. - } - - backends = append(backends, b) - } - return backends -} - -// edgeHop checks the links of the given backend by executing an edge hop. -// It fixes broken links. -func (b *Backends) edgeHop(be *compute.BackendService, igs []*compute.InstanceGroup) error { - beIGs := sets.String{} - for _, beToIG := range be.Backends { - beIGs.Insert(beToIG.Group) - } - igLinks := sets.String{} - for _, igToBE := range igs { - igLinks.Insert(igToBE.SelfLink) - } - if beIGs.IsSuperset(igLinks) { - return nil - } - glog.V(2).Infof("Updating backend service %v with %d backends: expected igs %+v, current igs %+v", - be.Name, igLinks.Len(), igLinks.List(), beIGs.List()) - - originalBackends := be.Backends - var addIGs []*compute.InstanceGroup - for _, ig := range igs { - if !beIGs.Has(ig.SelfLink) { - addIGs = append(addIGs, ig) - } - } - - // We first try to create the backend with balancingMode=RATE. If this - // fails, it's mostly likely because there are existing backends with - // balancingMode=UTILIZATION. This failure mode throws a googleapi error - // which wraps a HTTP 400 status code. We handle it in the loop below - // and come around to retry with the right balancing mode. The goal is to - // switch everyone to using RATE. - var errs []string - for _, bm := range []BalancingMode{Rate, Utilization} { - // Generate backends with given instance groups with a specific mode - newBackends := getBackendsForIGs(addIGs, bm) - be.Backends = append(originalBackends, newBackends...) - - if err := b.cloud.UpdateGlobalBackendService(be); err != nil { - if utils.IsHTTPErrorCode(err, http.StatusBadRequest) { - glog.V(2).Infof("Updating backend service backends with balancing mode %v failed, will try another mode. err:%v", bm, err) - errs = append(errs, err.Error()) - // This is probably a failure because we tried to create the backend - // with balancingMode=RATE when there are already backends with - // balancingMode=UTILIZATION. Just ignore it and retry setting - // balancingMode=UTILIZATION (b/35102911). - continue - } - glog.V(2).Infof("Error updating backend service backends with balancing mode %v:%v", bm, err) - return err - } - return nil - } - return fmt.Errorf("received errors when updating backend service: %v", strings.Join(errs, "\n")) -} - -// GC garbage collects services corresponding to ports in the given list. -func (b *Backends) GC(svcNodePorts []ServicePort) error { - knownPorts := sets.NewString() - for _, p := range svcNodePorts { - knownPorts.Insert(portKey(p.Port)) - } - pool := b.snapshotter.Snapshot() - for port := range pool { - p, err := strconv.ParseUint(port, 10, 16) - if err != nil { - return err - } - nodePort := int64(p) - if knownPorts.Has(portKey(nodePort)) || b.ignoredPorts.Has(portKey(nodePort)) { - continue - } - glog.V(3).Infof("GCing backend for port %v", p) - if err := b.Delete(nodePort); err != nil && !utils.IsHTTPErrorCode(err, http.StatusNotFound) { - return err - } - } - return nil -} - -// Shutdown deletes all backends and the default backend. -// This will fail if one of the backends is being used by another resource. -func (b *Backends) Shutdown() error { - if err := b.GC([]ServicePort{}); err != nil { - return err - } - return nil -} - -// Status returns the status of the given backend by name. -func (b *Backends) Status(name string) string { - backend, err := b.cloud.GetGlobalBackendService(name) - if err != nil || len(backend.Backends) == 0 { - return "Unknown" - } - - // TODO: Look at more than one backend's status - // TODO: Include port, ip in the status, since it's in the health info. - hs, err := b.cloud.GetGlobalBackendServiceHealth(name, backend.Backends[0].Group) - if err != nil || len(hs.HealthStatus) == 0 || hs.HealthStatus[0] == nil { - return "Unknown" - } - // TODO: State transition are important, not just the latest. - return hs.HealthStatus[0].HealthState -} - -func applyLegacyHCToHC(existing *compute.HttpHealthCheck, hc *healthchecks.HealthCheck) { - hc.Description = existing.Description - hc.CheckIntervalSec = existing.CheckIntervalSec - hc.HealthyThreshold = existing.HealthyThreshold - hc.Host = existing.Host - hc.Port = existing.Port - hc.RequestPath = existing.RequestPath - hc.TimeoutSec = existing.TimeoutSec - hc.UnhealthyThreshold = existing.UnhealthyThreshold -} - -func applyProbeSettingsToHC(p *v1.Probe, hc *healthchecks.HealthCheck) { - healthPath := p.Handler.HTTPGet.Path - // GCE requires a leading "/" for health check urls. - if !strings.HasPrefix(healthPath, "/") { - healthPath = "/" + healthPath - } - // Extract host from HTTP headers - host := p.Handler.HTTPGet.Host - for _, header := range p.Handler.HTTPGet.HTTPHeaders { - if header.Name == "Host" { - host = header.Value - break - } - } - - hc.RequestPath = healthPath - hc.Host = host - hc.Description = "Kubernetes L7 health check generated with readiness probe settings." - hc.CheckIntervalSec = int64(p.PeriodSeconds) + int64(healthchecks.DefaultHealthCheckInterval.Seconds()) - hc.TimeoutSec = int64(p.TimeoutSeconds) -} diff --git a/controllers/gce/backends/backends_test.go b/controllers/gce/backends/backends_test.go deleted file mode 100644 index ba4ed51f5..000000000 --- a/controllers/gce/backends/backends_test.go +++ /dev/null @@ -1,505 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package backends - -import ( - "fmt" - "net/http" - "testing" - - compute "google.golang.org/api/compute/v1" - "google.golang.org/api/googleapi" - api_v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/util/intstr" - "k8s.io/apimachinery/pkg/util/sets" - - "k8s.io/ingress/controllers/gce/healthchecks" - "k8s.io/ingress/controllers/gce/instances" - "k8s.io/ingress/controllers/gce/storage" - "k8s.io/ingress/controllers/gce/utils" -) - -const defaultZone = "zone-a" - -var noOpErrFunc = func(op int, be *compute.BackendService) error { return nil } - -var existingProbe = &api_v1.Probe{ - Handler: api_v1.Handler{ - HTTPGet: &api_v1.HTTPGetAction{ - Scheme: api_v1.URISchemeHTTPS, - Path: "/my-special-path", - Port: intstr.IntOrString{ - Type: intstr.Int, - IntVal: 443, - }, - }, - }, -} - -func newTestJig(f BackendServices, fakeIGs instances.InstanceGroups, syncWithCloud bool) (*Backends, healthchecks.HealthCheckProvider) { - namer := &utils.Namer{} - nodePool := instances.NewNodePool(fakeIGs) - nodePool.Init(&instances.FakeZoneLister{Zones: []string{defaultZone}}) - healthCheckProvider := healthchecks.NewFakeHealthCheckProvider() - healthChecks := healthchecks.NewHealthChecker(healthCheckProvider, "/", namer) - bp := NewBackendPool(f, healthChecks, nodePool, namer, []int64{}, syncWithCloud) - probes := map[ServicePort]*api_v1.Probe{{Port: 443, Protocol: utils.ProtocolHTTPS}: existingProbe} - bp.Init(NewFakeProbeProvider(probes)) - - return bp, healthCheckProvider -} - -func TestBackendPoolAdd(t *testing.T) { - f := NewFakeBackendServices(noOpErrFunc) - fakeIGs := instances.NewFakeInstanceGroups(sets.NewString()) - pool, _ := newTestJig(f, fakeIGs, false) - namer := utils.Namer{} - - testCases := []ServicePort{ - {Port: 80, Protocol: utils.ProtocolHTTP}, - {Port: 443, Protocol: utils.ProtocolHTTPS}, - } - - for _, nodePort := range testCases { - // For simplicity, these tests use 80/443 as nodeports - t.Run(fmt.Sprintf("Port:%v Protocol:%v", nodePort.Port, nodePort.Protocol), func(t *testing.T) { - // Add a backend for a port, then re-add the same port and - // make sure it corrects a broken link from the backend to - // the instance group. - err := pool.Ensure([]ServicePort{nodePort}, nil) - if err != nil { - t.Fatalf("Did not find expect error when adding a nodeport: %v, err: %v", nodePort, err) - } - beName := namer.BeName(nodePort.Port) - - // Check that the new backend has the right port - be, err := f.GetGlobalBackendService(beName) - if err != nil { - t.Fatalf("Did not find expected backend %v", beName) - } - if be.Port != nodePort.Port { - t.Fatalf("Backend %v has wrong port %v, expected %v", be.Name, be.Port, nodePort) - } - - // Check that the instance group has the new port. - ig, err := fakeIGs.GetInstanceGroup(namer.IGName(), defaultZone) - var found bool - for _, port := range ig.NamedPorts { - if port.Port == nodePort.Port { - found = true - } - } - if !found { - t.Fatalf("Port %v not added to instance group", nodePort) - } - - // Check the created healthcheck is the correct protocol - hc, err := pool.healthChecker.Get(nodePort.Port) - if err != nil { - t.Fatalf("Unexpected err when querying fake healthchecker: %v", err) - } - - if hc.Protocol() != nodePort.Protocol { - t.Fatalf("Healthcheck scheme does not match nodeport scheme: hc:%v np:%v", hc.Protocol(), nodePort.Protocol) - } - - if nodePort.Port == 443 && hc.RequestPath != "/my-special-path" { - t.Fatalf("Healthcheck for 443 should have special request path from probe") - } - }) - } -} - -func TestHealthCheckMigration(t *testing.T) { - f := NewFakeBackendServices(noOpErrFunc) - fakeIGs := instances.NewFakeInstanceGroups(sets.NewString()) - pool, hcp := newTestJig(f, fakeIGs, false) - namer := utils.Namer{} - - p := ServicePort{Port: 7000, Protocol: utils.ProtocolHTTP} - - // Create a legacy health check and insert it into the HC provider. - legacyHC := &compute.HttpHealthCheck{ - Name: namer.BeName(p.Port), - RequestPath: "/my-healthz-path", - Host: "k8s.io", - Description: "My custom HC", - UnhealthyThreshold: 30, - CheckIntervalSec: 40, - } - hcp.CreateHttpHealthCheck(legacyHC) - - // Add the service port to the backend pool - pool.Ensure([]ServicePort{p}, nil) - - // Assert the proper health check was created - hc, _ := pool.healthChecker.Get(p.Port) - if hc == nil || hc.Protocol() != p.Protocol { - t.Fatalf("Expected %s health check, received %v: ", p.Protocol, hc) - } - - // Assert the newer health check has the legacy health check settings - if hc.RequestPath != legacyHC.RequestPath || - hc.Host != legacyHC.Host || - hc.UnhealthyThreshold != legacyHC.UnhealthyThreshold || - hc.CheckIntervalSec != legacyHC.CheckIntervalSec || - hc.Description != legacyHC.Description { - t.Fatalf("Expected newer health check to have identical settings to legacy health check. Legacy: %+v, New: %+v", legacyHC, hc) - } -} - -func TestBackendPoolUpdate(t *testing.T) { - f := NewFakeBackendServices(noOpErrFunc) - fakeIGs := instances.NewFakeInstanceGroups(sets.NewString()) - pool, _ := newTestJig(f, fakeIGs, false) - namer := utils.Namer{} - - p := ServicePort{Port: 3000, Protocol: utils.ProtocolHTTP} - pool.Ensure([]ServicePort{p}, nil) - beName := namer.BeName(p.Port) - - be, err := f.GetGlobalBackendService(beName) - if err != nil { - t.Fatalf("Unexpected err: %v", err) - } - - if utils.AppProtocol(be.Protocol) != p.Protocol { - t.Fatalf("Expected scheme %v but got %v", p.Protocol, be.Protocol) - } - - // Assert the proper health check was created - hc, _ := pool.healthChecker.Get(p.Port) - if hc == nil || hc.Protocol() != p.Protocol { - t.Fatalf("Expected %s health check, received %v: ", p.Protocol, hc) - } - - // Update service port to encrypted - p.Protocol = utils.ProtocolHTTPS - pool.Ensure([]ServicePort{p}, nil) - - be, err = f.GetGlobalBackendService(beName) - if err != nil { - t.Fatalf("Unexpected err retrieving backend service after update: %v", err) - } - - // Assert the backend has the correct protocol - if utils.AppProtocol(be.Protocol) != p.Protocol { - t.Fatalf("Expected scheme %v but got %v", p.Protocol, utils.AppProtocol(be.Protocol)) - } - - // Assert the proper health check was created - hc, _ = pool.healthChecker.Get(p.Port) - if hc == nil || hc.Protocol() != p.Protocol { - t.Fatalf("Expected %s health check, received %v: ", p.Protocol, hc) - } -} - -func TestBackendPoolChaosMonkey(t *testing.T) { - f := NewFakeBackendServices(noOpErrFunc) - fakeIGs := instances.NewFakeInstanceGroups(sets.NewString()) - pool, _ := newTestJig(f, fakeIGs, false) - namer := utils.Namer{} - - nodePort := ServicePort{Port: 8080, Protocol: utils.ProtocolHTTP} - pool.Ensure([]ServicePort{nodePort}, nil) - beName := namer.BeName(nodePort.Port) - - be, _ := f.GetGlobalBackendService(beName) - - // Mess up the link between backend service and instance group. - // This simulates a user doing foolish things through the UI. - be.Backends = []*compute.Backend{ - {Group: "test edge hop"}, - } - f.calls = []int{} - f.UpdateGlobalBackendService(be) - - pool.Ensure([]ServicePort{nodePort}, nil) - for _, call := range f.calls { - if call == utils.Create { - t.Fatalf("Unexpected create for existing backend service") - } - } - gotBackend, err := f.GetGlobalBackendService(beName) - if err != nil { - t.Fatalf("Failed to find a backend with name %v: %v", beName, err) - } - gotGroup, err := fakeIGs.GetInstanceGroup(namer.IGName(), defaultZone) - if err != nil { - t.Fatalf("Failed to find instance group %v", namer.IGName()) - } - backendLinks := sets.NewString() - for _, be := range gotBackend.Backends { - backendLinks.Insert(be.Group) - } - if !backendLinks.Has(gotGroup.SelfLink) { - t.Fatalf( - "Broken instance group link, got: %+v expected: %v", - backendLinks.List(), - gotGroup.SelfLink) - } -} - -func TestBackendPoolSync(t *testing.T) { - // Call sync on a backend pool with a list of ports, make sure the pool - // creates/deletes required ports. - svcNodePorts := []ServicePort{{Port: 81, Protocol: utils.ProtocolHTTP}, {Port: 82, Protocol: utils.ProtocolHTTPS}, {Port: 83, Protocol: utils.ProtocolHTTP}} - f := NewFakeBackendServices(noOpErrFunc) - fakeIGs := instances.NewFakeInstanceGroups(sets.NewString()) - pool, _ := newTestJig(f, fakeIGs, true) - pool.Ensure([]ServicePort{ServicePort{Port: 81}}, nil) - pool.Ensure([]ServicePort{ServicePort{Port: 90}}, nil) - if err := pool.Ensure(svcNodePorts, nil); err != nil { - t.Errorf("Expected backend pool to add node ports, err: %v", err) - } - if err := pool.GC(svcNodePorts); err != nil { - t.Errorf("Expected backend pool to GC, err: %v", err) - } - if _, err := pool.Get(90); err == nil { - t.Fatalf("Did not expect to find port 90") - } - for _, port := range svcNodePorts { - if _, err := pool.Get(port.Port); err != nil { - t.Fatalf("Expected to find port %v", port) - } - } - - svcNodePorts = []ServicePort{{Port: 81}} - deletedPorts := []ServicePort{{Port: 82}, {Port: 83}} - if err := pool.GC(svcNodePorts); err != nil { - t.Fatalf("Expected backend pool to GC, err: %v", err) - } - - for _, port := range deletedPorts { - if _, err := pool.Get(port.Port); err == nil { - t.Fatalf("Pool contains %v after deletion", port) - } - } - - // All these backends should be ignored because they don't belong to the cluster. - // foo - non k8s managed backend - // k8s-be-foo - foo is not a nodeport - // k8s--bar--foo - too many cluster delimiters - // k8s-be-3001--uid - another cluster tagged with uid - unrelatedBackends := sets.NewString([]string{"foo", "k8s-be-foo", "k8s--bar--foo", "k8s-be-30001--uid"}...) - for _, name := range unrelatedBackends.List() { - f.CreateGlobalBackendService(&compute.BackendService{Name: name}) - } - - namer := &utils.Namer{} - // This backend should get deleted again since it is managed by this cluster. - f.CreateGlobalBackendService(&compute.BackendService{Name: namer.BeName(deletedPorts[0].Port)}) - - // TODO: Avoid casting. - // Repopulate the pool with a cloud list, which now includes the 82 port - // backend. This would happen if, say, an ingress backend is removed - // while the controller is restarting. - pool.snapshotter.(*storage.CloudListingPool).ReplenishPool() - - pool.GC(svcNodePorts) - - currBackends, _ := f.ListGlobalBackendServices() - currSet := sets.NewString() - for _, b := range currBackends.Items { - currSet.Insert(b.Name) - } - // Port 81 still exists because it's an in-use service NodePort. - knownBe := namer.BeName(81) - if !currSet.Has(knownBe) { - t.Fatalf("Expected %v to exist in backend pool", knownBe) - } - currSet.Delete(knownBe) - if !currSet.Equal(unrelatedBackends) { - t.Fatalf("Some unrelated backends were deleted. Expected %+v, got %+v", unrelatedBackends, currSet) - } -} - -func TestBackendPoolDeleteLegacyHealthChecks(t *testing.T) { - namer := &utils.Namer{} - f := NewFakeBackendServices(noOpErrFunc) - fakeIGs := instances.NewFakeInstanceGroups(sets.NewString()) - nodePool := instances.NewNodePool(fakeIGs) - nodePool.Init(&instances.FakeZoneLister{Zones: []string{defaultZone}}) - hcp := healthchecks.NewFakeHealthCheckProvider() - healthChecks := healthchecks.NewHealthChecker(hcp, "/", namer) - bp := NewBackendPool(f, healthChecks, nodePool, namer, []int64{}, false) - probes := map[ServicePort]*api_v1.Probe{} - bp.Init(NewFakeProbeProvider(probes)) - - // Create a legacy HTTP health check - beName := namer.BeName(80) - if err := hcp.CreateHttpHealthCheck(&compute.HttpHealthCheck{ - Name: beName, - Port: 80, - }); err != nil { - t.Fatalf("unexpected error creating http health check %v", err) - } - - // Verify health check exists - hc, err := hcp.GetHttpHealthCheck(beName) - if err != nil { - t.Fatalf("unexpected error getting http health check %v", err) - } - - // Create backend service with expected name and link to legacy health check - f.CreateGlobalBackendService(&compute.BackendService{ - Name: beName, - HealthChecks: []string{hc.SelfLink}, - }) - - // Have pool sync the above backend service - bp.Ensure([]ServicePort{ServicePort{Port: 80, Protocol: utils.ProtocolHTTPS}}, nil) - - // Verify the legacy health check has been deleted - _, err = hcp.GetHttpHealthCheck(beName) - if err == nil { - t.Fatalf("expected error getting http health check %v", err) - } - - // Verify a newer health check exists - hcNew, err := hcp.GetHealthCheck(beName) - if err != nil { - t.Fatalf("unexpected error getting http health check %v", err) - } - - // Verify the newer health check is of type HTTPS - if hcNew.Type != string(utils.ProtocolHTTPS) { - t.Fatalf("expected health check type to be %v, actual %v", string(utils.ProtocolHTTPS), hcNew.Type) - } -} - -func TestBackendPoolShutdown(t *testing.T) { - f := NewFakeBackendServices(noOpErrFunc) - fakeIGs := instances.NewFakeInstanceGroups(sets.NewString()) - pool, _ := newTestJig(f, fakeIGs, false) - namer := utils.Namer{} - - // Add a backend-service and verify that it doesn't exist after Shutdown() - pool.Ensure([]ServicePort{ServicePort{Port: 80}}, nil) - pool.Shutdown() - if _, err := f.GetGlobalBackendService(namer.BeName(80)); err == nil { - t.Fatalf("%v", err) - } -} - -func TestBackendInstanceGroupClobbering(t *testing.T) { - f := NewFakeBackendServices(noOpErrFunc) - fakeIGs := instances.NewFakeInstanceGroups(sets.NewString()) - pool, _ := newTestJig(f, fakeIGs, false) - namer := utils.Namer{} - - // This will add the instance group k8s-ig to the instance pool - pool.Ensure([]ServicePort{ServicePort{Port: 80}}, nil) - - be, err := f.GetGlobalBackendService(namer.BeName(80)) - if err != nil { - t.Fatalf("%v", err) - } - // Simulate another controller updating the same backend service with - // a different instance group - newGroups := []*compute.Backend{ - {Group: "k8s-ig-bar"}, - {Group: "k8s-ig-foo"}, - } - be.Backends = append(be.Backends, newGroups...) - if err = f.UpdateGlobalBackendService(be); err != nil { - t.Fatalf("Failed to update backend service %v", be.Name) - } - - // Make sure repeated adds don't clobber the inserted instance group - pool.Ensure([]ServicePort{ServicePort{Port: 80}}, nil) - be, err = f.GetGlobalBackendService(namer.BeName(80)) - if err != nil { - t.Fatalf("%v", err) - } - gotGroups := sets.NewString() - for _, g := range be.Backends { - gotGroups.Insert(g.Group) - } - - // seed expectedGroups with the first group native to this controller - expectedGroups := sets.NewString("k8s-ig") - for _, newGroup := range newGroups { - expectedGroups.Insert(newGroup.Group) - } - if !expectedGroups.Equal(gotGroups) { - t.Fatalf("Expected %v Got %v", expectedGroups, gotGroups) - } -} - -func TestBackendCreateBalancingMode(t *testing.T) { - f := NewFakeBackendServices(noOpErrFunc) - - fakeIGs := instances.NewFakeInstanceGroups(sets.NewString()) - pool, _ := newTestJig(f, fakeIGs, false) - namer := utils.Namer{} - nodePort := ServicePort{Port: 8080} - modes := []BalancingMode{Rate, Utilization} - - // block the creation of Backends with the given balancingMode - // and verify that a backend with the other balancingMode is - // created - for i, bm := range modes { - f.errFunc = func(op int, be *compute.BackendService) error { - for _, b := range be.Backends { - if b.BalancingMode == string(bm) { - return &googleapi.Error{Code: http.StatusBadRequest} - } - } - return nil - } - - pool.Ensure([]ServicePort{nodePort}, nil) - be, err := f.GetGlobalBackendService(namer.BeName(nodePort.Port)) - if err != nil { - t.Fatalf("%v", err) - } - - for _, b := range be.Backends { - if b.BalancingMode != string(modes[(i+1)%len(modes)]) { - t.Fatalf("Wrong balancing mode, expected %v got %v", modes[(i+1)%len(modes)], b.BalancingMode) - } - } - pool.GC([]ServicePort{}) - } -} - -func TestApplyProbeSettingsToHC(t *testing.T) { - p := "healthz" - hc := healthchecks.DefaultHealthCheck(8080, utils.ProtocolHTTPS) - probe := &api_v1.Probe{ - Handler: api_v1.Handler{ - HTTPGet: &api_v1.HTTPGetAction{ - Scheme: api_v1.URISchemeHTTP, - Path: p, - Port: intstr.IntOrString{ - Type: intstr.Int, - IntVal: 80, - }, - }, - }, - } - - applyProbeSettingsToHC(probe, hc) - - if hc.Protocol() != utils.ProtocolHTTPS || hc.Port != 8080 { - t.Errorf("Basic HC settings changed") - } - if hc.RequestPath != "/"+p { - t.Errorf("Failed to apply probe's requestpath") - } -} diff --git a/controllers/gce/backends/fakes.go b/controllers/gce/backends/fakes.go deleted file mode 100644 index a054d8d2a..000000000 --- a/controllers/gce/backends/fakes.go +++ /dev/null @@ -1,144 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package backends - -import ( - "fmt" - - compute "google.golang.org/api/compute/v1" - api_v1 "k8s.io/api/core/v1" - "k8s.io/client-go/tools/cache" - - "k8s.io/ingress/controllers/gce/utils" -) - -// NewFakeBackendServices creates a new fake backend services manager. -func NewFakeBackendServices(ef func(op int, be *compute.BackendService) error) *FakeBackendServices { - return &FakeBackendServices{ - errFunc: ef, - backendServices: cache.NewStore(func(obj interface{}) (string, error) { - svc := obj.(*compute.BackendService) - return svc.Name, nil - }), - } -} - -// FakeBackendServices fakes out GCE backend services. -type FakeBackendServices struct { - backendServices cache.Store - calls []int - errFunc func(op int, be *compute.BackendService) error -} - -// GetGlobalBackendService fakes getting a backend service from the cloud. -func (f *FakeBackendServices) GetGlobalBackendService(name string) (*compute.BackendService, error) { - f.calls = append(f.calls, utils.Get) - obj, exists, err := f.backendServices.GetByKey(name) - if !exists { - return nil, fmt.Errorf("backend service %v not found", name) - } - if err != nil { - return nil, err - } - - svc := obj.(*compute.BackendService) - if name == svc.Name { - return svc, nil - } - return nil, fmt.Errorf("backend service %v not found", name) -} - -// CreateGlobalBackendService fakes backend service creation. -func (f *FakeBackendServices) CreateGlobalBackendService(be *compute.BackendService) error { - if f.errFunc != nil { - if err := f.errFunc(utils.Create, be); err != nil { - return err - } - } - f.calls = append(f.calls, utils.Create) - be.SelfLink = be.Name - return f.backendServices.Update(be) -} - -// DeleteGlobalBackendService fakes backend service deletion. -func (f *FakeBackendServices) DeleteGlobalBackendService(name string) error { - f.calls = append(f.calls, utils.Delete) - svc, exists, err := f.backendServices.GetByKey(name) - if !exists { - return fmt.Errorf("backend service %v not found", name) - } - if err != nil { - return err - } - return f.backendServices.Delete(svc) -} - -// ListGlobalBackendServices fakes backend service listing. -func (f *FakeBackendServices) ListGlobalBackendServices() (*compute.BackendServiceList, error) { - var svcs []*compute.BackendService - for _, s := range f.backendServices.List() { - svc := s.(*compute.BackendService) - svcs = append(svcs, svc) - } - return &compute.BackendServiceList{Items: svcs}, nil -} - -// UpdateGlobalBackendService fakes updating a backend service. -func (f *FakeBackendServices) UpdateGlobalBackendService(be *compute.BackendService) error { - if f.errFunc != nil { - if err := f.errFunc(utils.Update, be); err != nil { - return err - } - } - f.calls = append(f.calls, utils.Update) - return f.backendServices.Update(be) -} - -// GetGlobalBackendServiceHealth fakes getting backend service health. -func (f *FakeBackendServices) GetGlobalBackendServiceHealth(name, instanceGroupLink string) (*compute.BackendServiceGroupHealth, error) { - be, err := f.GetGlobalBackendService(name) - if err != nil { - return nil, err - } - states := []*compute.HealthStatus{ - { - HealthState: "HEALTHY", - IpAddress: "", - Port: be.Port, - }, - } - return &compute.BackendServiceGroupHealth{ - HealthStatus: states}, nil -} - -// FakeProbeProvider implements the probeProvider interface for tests. -type FakeProbeProvider struct { - probes map[ServicePort]*api_v1.Probe -} - -// NewFakeProbeProvider returns a struct which satisfies probeProvider interface -func NewFakeProbeProvider(probes map[ServicePort]*api_v1.Probe) *FakeProbeProvider { - return &FakeProbeProvider{probes} -} - -// GetProbe returns the probe for a given nodePort -func (pp *FakeProbeProvider) GetProbe(port ServicePort) (*api_v1.Probe, error) { - if probe, exists := pp.probes[port]; exists && probe.HTTPGet != nil { - return probe, nil - } - return nil, nil -} diff --git a/controllers/gce/backends/interfaces.go b/controllers/gce/backends/interfaces.go deleted file mode 100644 index 451d5ea73..000000000 --- a/controllers/gce/backends/interfaces.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package backends - -import ( - compute "google.golang.org/api/compute/v1" - api_v1 "k8s.io/api/core/v1" -) - -// ProbeProvider retrieves a probe struct given a nodePort -type probeProvider interface { - GetProbe(sp ServicePort) (*api_v1.Probe, error) -} - -// BackendPool is an interface to manage a pool of kubernetes nodePort services -// as gce backendServices, and sync them through the BackendServices interface. -type BackendPool interface { - Init(p probeProvider) - Ensure(ports []ServicePort, igs []*compute.InstanceGroup) error - Get(port int64) (*compute.BackendService, error) - Delete(port int64) error - GC(ports []ServicePort) error - Shutdown() error - Status(name string) string - List() ([]interface{}, error) -} - -// BackendServices is an interface for managing gce backend services. -type BackendServices interface { - GetGlobalBackendService(name string) (*compute.BackendService, error) - UpdateGlobalBackendService(bg *compute.BackendService) error - CreateGlobalBackendService(bg *compute.BackendService) error - DeleteGlobalBackendService(name string) error - ListGlobalBackendServices() (*compute.BackendServiceList, error) - GetGlobalBackendServiceHealth(name, instanceGroupLink string) (*compute.BackendServiceGroupHealth, error) -} diff --git a/controllers/gce/controller/cluster_manager.go b/controllers/gce/controller/cluster_manager.go deleted file mode 100644 index b8b995598..000000000 --- a/controllers/gce/controller/cluster_manager.go +++ /dev/null @@ -1,252 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package controller - -import ( - "net/http" - - "github.com/golang/glog" - - compute "google.golang.org/api/compute/v1" - gce "k8s.io/kubernetes/pkg/cloudprovider/providers/gce" - - "k8s.io/ingress/controllers/gce/backends" - "k8s.io/ingress/controllers/gce/firewalls" - "k8s.io/ingress/controllers/gce/healthchecks" - "k8s.io/ingress/controllers/gce/instances" - "k8s.io/ingress/controllers/gce/loadbalancers" - "k8s.io/ingress/controllers/gce/utils" -) - -const ( - defaultPort = 80 - defaultHealthCheckPath = "/" - - // A backend is created per nodePort, tagged with the nodeport. - // This allows sharing of backends across loadbalancers. - backendPrefix = "k8s-be" - - // A single target proxy/urlmap/forwarding rule is created per loadbalancer. - // Tagged with the namespace/name of the Ingress. - targetProxyPrefix = "k8s-tp" - forwardingRulePrefix = "k8s-fw" - urlMapPrefix = "k8s-um" - - // Used in the test RunServer method to denote a delete request. - deleteType = "del" - - // port 0 is used as a signal for port not found/no such port etc. - invalidPort = 0 - - // Names longer than this are truncated, because of GCE restrictions. - nameLenLimit = 62 -) - -// ClusterManager manages cluster resource pools. -type ClusterManager struct { - ClusterNamer *utils.Namer - defaultBackendNodePort backends.ServicePort - instancePool instances.NodePool - backendPool backends.BackendPool - l7Pool loadbalancers.LoadBalancerPool - firewallPool firewalls.SingleFirewallPool - - // TODO: Refactor so we simply init a health check pool. - // Currently health checks are tied to backends because each backend needs - // the link of the associated health, but both the backend pool and - // loadbalancer pool manage backends, because the lifetime of the default - // backend is tied to the last/first loadbalancer not the life of the - // nodeport service or Ingress. - healthCheckers []healthchecks.HealthChecker -} - -// Init initializes the cluster manager. -func (c *ClusterManager) Init(tr *GCETranslator) { - c.instancePool.Init(tr) - c.backendPool.Init(tr) - // TODO: Initialize other members as needed. -} - -// IsHealthy returns an error if the cluster manager is unhealthy. -func (c *ClusterManager) IsHealthy() (err error) { - // TODO: Expand on this, for now we just want to detect when the GCE client - // is broken. - _, err = c.backendPool.List() - - // If this container is scheduled on a node without compute/rw it is - // effectively useless, but it is healthy. Reporting it as unhealthy - // will lead to container crashlooping. - if utils.IsHTTPErrorCode(err, http.StatusForbidden) { - glog.Infof("Reporting cluster as healthy, but unable to list backends: %v", err) - return nil - } - return -} - -func (c *ClusterManager) shutdown() error { - if err := c.l7Pool.Shutdown(); err != nil { - return err - } - if err := c.firewallPool.Shutdown(); err != nil { - return err - } - // The backend pool will also delete instance groups. - return c.backendPool.Shutdown() -} - -// Checkpoint performs a checkpoint with the cloud. -// - lbs are the single cluster L7 loadbalancers we wish to exist. If they already -// exist, they should not have any broken links between say, a UrlMap and -// TargetHttpProxy. -// - nodeNames are the names of nodes we wish to add to all loadbalancer -// instance groups. -// - backendServicePorts are the ports for which we require BackendServices. -// - namedPorts are the ports which must be opened on instance groups. -// Returns the list of all instance groups corresponding to the given loadbalancers. -// If in performing the checkpoint the cluster manager runs out of quota, a -// googleapi 403 is returned. -func (c *ClusterManager) Checkpoint(lbs []*loadbalancers.L7RuntimeInfo, nodeNames []string, backendServicePorts []backends.ServicePort, namedPorts []backends.ServicePort) ([]*compute.InstanceGroup, error) { - if len(namedPorts) != 0 { - // Add the default backend node port to the list of named ports for instance groups. - namedPorts = append(namedPorts, c.defaultBackendNodePort) - } - // Multiple ingress paths can point to the same service (and hence nodePort) - // but each nodePort can only have one set of cloud resources behind it. So - // don't waste time double validating GCE BackendServices. - namedPorts = uniq(namedPorts) - backendServicePorts = uniq(backendServicePorts) - // Create Instance Groups. - igs, err := c.EnsureInstanceGroupsAndPorts(namedPorts) - if err != nil { - return igs, err - } - if err := c.backendPool.Ensure(backendServicePorts, igs); err != nil { - return igs, err - } - if err := c.instancePool.Sync(nodeNames); err != nil { - return igs, err - } - if err := c.l7Pool.Sync(lbs); err != nil { - return igs, err - } - - // TODO: Manage default backend and its firewall rule in a centralized way. - // DefaultBackend is managed in l7 pool, which doesn't understand instances, - // which the firewall rule requires. - fwNodePorts := backendServicePorts - if len(lbs) != 0 { - // If there are no Ingresses, we shouldn't be allowing traffic to the - // default backend. Equally importantly if the cluster gets torn down - // we shouldn't leak the firewall rule. - fwNodePorts = append(fwNodePorts, c.defaultBackendNodePort) - } - - var np []int64 - for _, p := range fwNodePorts { - np = append(np, p.Port) - } - if err := c.firewallPool.Sync(np, nodeNames); err != nil { - return igs, err - } - - return igs, nil -} - -func (c *ClusterManager) EnsureInstanceGroupsAndPorts(servicePorts []backends.ServicePort) ([]*compute.InstanceGroup, error) { - ports := []int64{} - for _, p := range servicePorts { - ports = append(ports, p.Port) - } - igs, _, err := instances.EnsureInstanceGroupsAndPorts(c.instancePool, c.ClusterNamer, ports) - return igs, err -} - -// GC garbage collects unused resources. -// - lbNames are the names of L7 loadbalancers we wish to exist. Those not in -// this list are removed from the cloud. -// - nodePorts are the ports for which we want BackendServies. BackendServices -// for ports not in this list are deleted. -// This method ignores googleapi 404 errors (StatusNotFound). -func (c *ClusterManager) GC(lbNames []string, nodePorts []backends.ServicePort) error { - - // On GC: - // * Loadbalancers need to get deleted before backends. - // * Backends are refcounted in a shared pool. - // * We always want to GC backends even if there was an error in GCing - // loadbalancers, because the next Sync could rely on the GC for quota. - // * There are at least 2 cases for backend GC: - // 1. The loadbalancer has been deleted. - // 2. An update to the url map drops the refcount of a backend. This can - // happen when an Ingress is updated, if we don't GC after the update - // we'll leak the backend. - - lbErr := c.l7Pool.GC(lbNames) - beErr := c.backendPool.GC(nodePorts) - if lbErr != nil { - return lbErr - } - if beErr != nil { - return beErr - } - - // TODO(ingress#120): Move this to the backend pool so it mirrors creation - var igErr error - if len(lbNames) == 0 { - igName := c.ClusterNamer.IGName() - glog.Infof("Deleting instance group %v", igName) - igErr = c.instancePool.DeleteInstanceGroup(igName) - } - if igErr != nil { - return igErr - } - return nil -} - -// NewClusterManager creates a cluster manager for shared resources. -// - namer: is the namer used to tag cluster wide shared resources. -// - defaultBackendNodePort: is the node port of glbc's default backend. This is -// the kubernetes Service that serves the 404 page if no urls match. -// - defaultHealthCheckPath: is the default path used for L7 health checks, eg: "/healthz". -func NewClusterManager( - cloud *gce.GCECloud, - namer *utils.Namer, - defaultBackendNodePort backends.ServicePort, - defaultHealthCheckPath string) (*ClusterManager, error) { - - // Names are fundamental to the cluster, the uid allocator makes sure names don't collide. - cluster := ClusterManager{ClusterNamer: namer} - - // NodePool stores GCE vms that are in this Kubernetes cluster. - cluster.instancePool = instances.NewNodePool(cloud) - - // BackendPool creates GCE BackendServices and associated health checks. - healthChecker := healthchecks.NewHealthChecker(cloud, defaultHealthCheckPath, cluster.ClusterNamer) - // Loadbalancer pool manages the default backend and its health check. - defaultBackendHealthChecker := healthchecks.NewHealthChecker(cloud, "/healthz", cluster.ClusterNamer) - - cluster.healthCheckers = []healthchecks.HealthChecker{healthChecker, defaultBackendHealthChecker} - - // TODO: This needs to change to a consolidated management of the default backend. - cluster.backendPool = backends.NewBackendPool(cloud, healthChecker, cluster.instancePool, cluster.ClusterNamer, []int64{defaultBackendNodePort.Port}, true) - defaultBackendPool := backends.NewBackendPool(cloud, defaultBackendHealthChecker, cluster.instancePool, cluster.ClusterNamer, []int64{}, false) - cluster.defaultBackendNodePort = defaultBackendNodePort - - // L7 pool creates targetHTTPProxy, ForwardingRules, UrlMaps, StaticIPs. - cluster.l7Pool = loadbalancers.NewLoadBalancerPool(cloud, defaultBackendPool, defaultBackendNodePort, cluster.ClusterNamer) - cluster.firewallPool = firewalls.NewFirewallPool(cloud, cluster.ClusterNamer) - return &cluster, nil -} diff --git a/controllers/gce/controller/controller.go b/controllers/gce/controller/controller.go deleted file mode 100644 index e0a8de1fa..000000000 --- a/controllers/gce/controller/controller.go +++ /dev/null @@ -1,498 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package controller - -import ( - "fmt" - "reflect" - "sync" - "time" - - "github.com/golang/glog" - - apiv1 "k8s.io/api/core/v1" - extensions "k8s.io/api/extensions/v1beta1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - informerv1 "k8s.io/client-go/informers/core/v1" - informerv1beta1 "k8s.io/client-go/informers/extensions/v1beta1" - "k8s.io/client-go/kubernetes" - scheme "k8s.io/client-go/kubernetes/scheme" - unversionedcore "k8s.io/client-go/kubernetes/typed/core/v1" - listers "k8s.io/client-go/listers/core/v1" - "k8s.io/client-go/tools/cache" - "k8s.io/client-go/tools/record" - - "k8s.io/ingress/controllers/gce/loadbalancers" -) - -var ( - keyFunc = cache.DeletionHandlingMetaNamespaceKeyFunc - - // DefaultClusterUID is the uid to use for clusters resources created by an - // L7 controller created without specifying the --cluster-uid flag. - DefaultClusterUID = "" - - // DefaultFirewallName is the name to user for firewall rules created - // by an L7 controller when the --fireall-rule is not used. - DefaultFirewallName = "" - - // Frequency to poll on local stores to sync. - storeSyncPollPeriod = 5 * time.Second -) - -// ControllerContext holds -type ControllerContext struct { - IngressInformer cache.SharedIndexInformer - ServiceInformer cache.SharedIndexInformer - PodInformer cache.SharedIndexInformer - NodeInformer cache.SharedIndexInformer - // Stop is the stop channel shared among controllers - StopCh chan struct{} -} - -func NewControllerContext(kubeClient kubernetes.Interface, namespace string, resyncPeriod time.Duration) *ControllerContext { - return &ControllerContext{ - IngressInformer: informerv1beta1.NewIngressInformer(kubeClient, namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}), - ServiceInformer: informerv1.NewServiceInformer(kubeClient, namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}), - PodInformer: informerv1.NewPodInformer(kubeClient, namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}), - NodeInformer: informerv1.NewNodeInformer(kubeClient, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}), - StopCh: make(chan struct{}), - } -} - -func (ctx *ControllerContext) Start() { - go ctx.IngressInformer.Run(ctx.StopCh) - go ctx.ServiceInformer.Run(ctx.StopCh) - go ctx.PodInformer.Run(ctx.StopCh) - go ctx.NodeInformer.Run(ctx.StopCh) -} - -// LoadBalancerController watches the kubernetes api and adds/removes services -// from the loadbalancer, via loadBalancerConfig. -type LoadBalancerController struct { - client kubernetes.Interface - - ingressSynced cache.InformerSynced - serviceSynced cache.InformerSynced - podSynced cache.InformerSynced - nodeSynced cache.InformerSynced - ingLister StoreToIngressLister - nodeLister StoreToNodeLister - svcLister StoreToServiceLister - // Health checks are the readiness probes of containers on pods. - podLister StoreToPodLister - // TODO: Watch secrets - CloudClusterManager *ClusterManager - recorder record.EventRecorder - nodeQueue *taskQueue - ingQueue *taskQueue - tr *GCETranslator - stopCh chan struct{} - // stopLock is used to enforce only a single call to Stop is active. - // Needed because we allow stopping through an http endpoint and - // allowing concurrent stoppers leads to stack traces. - stopLock sync.Mutex - shutdown bool - // tlsLoader loads secrets from the Kubernetes apiserver for Ingresses. - tlsLoader tlsLoader - // hasSynced returns true if all associated sub-controllers have synced. - // Abstracted into a func for testing. - hasSynced func() bool -} - -// NewLoadBalancerController creates a controller for gce loadbalancers. -// - kubeClient: A kubernetes REST client. -// - clusterManager: A ClusterManager capable of creating all cloud resources -// required for L7 loadbalancing. -// - resyncPeriod: Watchers relist from the Kubernetes API server this often. -func NewLoadBalancerController(kubeClient kubernetes.Interface, ctx *ControllerContext, clusterManager *ClusterManager) (*LoadBalancerController, error) { - eventBroadcaster := record.NewBroadcaster() - eventBroadcaster.StartLogging(glog.Infof) - eventBroadcaster.StartRecordingToSink(&unversionedcore.EventSinkImpl{ - Interface: kubeClient.Core().Events(""), - }) - lbc := LoadBalancerController{ - client: kubeClient, - CloudClusterManager: clusterManager, - stopCh: ctx.StopCh, - recorder: eventBroadcaster.NewRecorder(scheme.Scheme, - apiv1.EventSource{Component: "loadbalancer-controller"}), - } - lbc.nodeQueue = NewTaskQueue(lbc.syncNodes) - lbc.ingQueue = NewTaskQueue(lbc.sync) - lbc.hasSynced = lbc.storesSynced - - lbc.ingressSynced = ctx.IngressInformer.HasSynced - lbc.serviceSynced = ctx.ServiceInformer.HasSynced - lbc.podSynced = ctx.PodInformer.HasSynced - lbc.nodeSynced = ctx.NodeInformer.HasSynced - - lbc.ingLister.Store = ctx.IngressInformer.GetStore() - lbc.svcLister.Indexer = ctx.ServiceInformer.GetIndexer() - lbc.podLister.Indexer = ctx.PodInformer.GetIndexer() - lbc.nodeLister.Indexer = ctx.NodeInformer.GetIndexer() - // ingress event handler - ctx.IngressInformer.AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { - addIng := obj.(*extensions.Ingress) - if !isGCEIngress(addIng) && !isGCEMultiClusterIngress(addIng) { - glog.Infof("Ignoring add for ingress %v based on annotation %v", addIng.Name, ingressClassKey) - return - } - lbc.recorder.Eventf(addIng, apiv1.EventTypeNormal, "ADD", fmt.Sprintf("%s/%s", addIng.Namespace, addIng.Name)) - lbc.ingQueue.enqueue(obj) - }, - DeleteFunc: func(obj interface{}) { - delIng := obj.(*extensions.Ingress) - if !isGCEIngress(delIng) && !isGCEMultiClusterIngress(delIng) { - glog.Infof("Ignoring delete for ingress %v based on annotation %v", delIng.Name, ingressClassKey) - return - } - glog.Infof("Delete notification received for Ingress %v/%v", delIng.Namespace, delIng.Name) - lbc.ingQueue.enqueue(obj) - }, - UpdateFunc: func(old, cur interface{}) { - curIng := cur.(*extensions.Ingress) - if !isGCEIngress(curIng) && !isGCEMultiClusterIngress(curIng) { - return - } - if !reflect.DeepEqual(old, cur) { - glog.V(3).Infof("Ingress %v changed, syncing", curIng.Name) - } - lbc.ingQueue.enqueue(cur) - }, - }) - - // service event handler - ctx.ServiceInformer.AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: lbc.enqueueIngressForService, - UpdateFunc: func(old, cur interface{}) { - if !reflect.DeepEqual(old, cur) { - lbc.enqueueIngressForService(cur) - } - }, - // Ingress deletes matter, service deletes don't. - }) - - // node event handler - ctx.NodeInformer.AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: lbc.nodeQueue.enqueue, - DeleteFunc: lbc.nodeQueue.enqueue, - // Nodes are updated every 10s and we don't care, so no update handler. - }) - - lbc.tr = &GCETranslator{&lbc} - lbc.tlsLoader = &apiServerTLSLoader{client: lbc.client} - glog.V(3).Infof("Created new loadbalancer controller") - - return &lbc, nil -} - -// enqueueIngressForService enqueues all the Ingress' for a Service. -func (lbc *LoadBalancerController) enqueueIngressForService(obj interface{}) { - svc := obj.(*apiv1.Service) - ings, err := lbc.ingLister.GetServiceIngress(svc) - if err != nil { - glog.V(5).Infof("ignoring service %v: %v", svc.Name, err) - return - } - for _, ing := range ings { - if !isGCEIngress(&ing) { - continue - } - lbc.ingQueue.enqueue(&ing) - } -} - -// Run starts the loadbalancer controller. -func (lbc *LoadBalancerController) Run() { - glog.Infof("Starting loadbalancer controller") - go lbc.ingQueue.run(time.Second, lbc.stopCh) - go lbc.nodeQueue.run(time.Second, lbc.stopCh) - <-lbc.stopCh - glog.Infof("Shutting down Loadbalancer Controller") -} - -// Stop stops the loadbalancer controller. It also deletes cluster resources -// if deleteAll is true. -func (lbc *LoadBalancerController) Stop(deleteAll bool) error { - // Stop is invoked from the http endpoint. - lbc.stopLock.Lock() - defer lbc.stopLock.Unlock() - - // Only try draining the workqueue if we haven't already. - if !lbc.shutdown { - close(lbc.stopCh) - glog.Infof("Shutting down controller queues.") - lbc.ingQueue.shutdown() - lbc.nodeQueue.shutdown() - lbc.shutdown = true - } - - // Deleting shared cluster resources is idempotent. - if deleteAll { - glog.Infof("Shutting down cluster manager.") - return lbc.CloudClusterManager.shutdown() - } - return nil -} - -// storesSynced returns true if all the sub-controllers have finished their -// first sync with apiserver. -func (lbc *LoadBalancerController) storesSynced() bool { - return ( - // wait for pods to sync so we don't allocate a default health check when - // an endpoint has a readiness probe. - lbc.podSynced() && - // wait for services so we don't thrash on backend creation. - lbc.serviceSynced() && - // wait for nodes so we don't disconnect a backend from an instance - // group just because we don't realize there are nodes in that zone. - lbc.nodeSynced() && - // Wait for ingresses as a safety measure. We don't really need this. - lbc.ingressSynced()) -} - -// sync manages Ingress create/updates/deletes. -func (lbc *LoadBalancerController) sync(key string) (err error) { - if !lbc.hasSynced() { - time.Sleep(storeSyncPollPeriod) - return fmt.Errorf("waiting for stores to sync") - } - glog.V(3).Infof("Syncing %v", key) - - allIngresses, err := lbc.ingLister.ListAll() - if err != nil { - return err - } - gceIngresses, err := lbc.ingLister.ListGCEIngresses() - if err != nil { - return err - } - - allNodePorts := lbc.tr.toNodePorts(&allIngresses) - gceNodePorts := lbc.tr.toNodePorts(&gceIngresses) - lbNames := lbc.ingLister.Store.ListKeys() - lbs, err := lbc.toRuntimeInfo(gceIngresses) - if err != nil { - return err - } - nodeNames, err := lbc.getReadyNodeNames() - if err != nil { - return err - } - obj, ingExists, err := lbc.ingLister.Store.GetByKey(key) - if err != nil { - return err - } - - // This performs a 2 phase checkpoint with the cloud: - // * Phase 1 creates/verifies resources are as expected. At the end of a - // successful checkpoint we know that existing L7s are WAI, and the L7 - // for the Ingress associated with "key" is ready for a UrlMap update. - // If this encounters an error, eg for quota reasons, we want to invoke - // Phase 2 right away and retry checkpointing. - // * Phase 2 performs GC by refcounting shared resources. This needs to - // happen periodically whether or not stage 1 fails. At the end of a - // successful GC we know that there are no dangling cloud resources that - // don't have an associated Kubernetes Ingress/Service/Endpoint. - - var syncError error - defer func() { - if deferErr := lbc.CloudClusterManager.GC(lbNames, allNodePorts); deferErr != nil { - err = fmt.Errorf("error during sync %v, error during GC %v", syncError, deferErr) - } - glog.V(3).Infof("Finished syncing %v", key) - }() - // Record any errors during sync and throw a single error at the end. This - // allows us to free up associated cloud resources ASAP. - igs, err := lbc.CloudClusterManager.Checkpoint(lbs, nodeNames, gceNodePorts, allNodePorts) - if err != nil { - // TODO: Implement proper backoff for the queue. - eventMsg := "GCE" - if ingExists { - lbc.recorder.Eventf(obj.(*extensions.Ingress), apiv1.EventTypeWarning, eventMsg, err.Error()) - } else { - err = fmt.Errorf("%v, error: %v", eventMsg, err) - } - syncError = err - } - - if !ingExists { - return syncError - } - ing := *obj.(*extensions.Ingress) - if isGCEMultiClusterIngress(&ing) { - // Add instance group names as annotation on the ingress. - if ing.Annotations == nil { - ing.Annotations = map[string]string{} - } - err = setInstanceGroupsAnnotation(ing.Annotations, igs) - if err != nil { - return err - } - if err := lbc.updateAnnotations(ing.Name, ing.Namespace, ing.Annotations); err != nil { - return err - } - return nil - } - - // Update the UrlMap of the single loadbalancer that came through the watch. - l7, err := lbc.CloudClusterManager.l7Pool.Get(key) - if err != nil { - syncError = fmt.Errorf("%v, unable to get loadbalancer: %v", syncError, err) - return syncError - } - - if urlMap, err := lbc.tr.toURLMap(&ing); err != nil { - syncError = fmt.Errorf("%v, convert to url map error %v", syncError, err) - } else if err := l7.UpdateUrlMap(urlMap); err != nil { - lbc.recorder.Eventf(&ing, apiv1.EventTypeWarning, "UrlMap", err.Error()) - syncError = fmt.Errorf("%v, update url map error: %v", syncError, err) - } else if err := lbc.updateIngressStatus(l7, ing); err != nil { - lbc.recorder.Eventf(&ing, apiv1.EventTypeWarning, "Status", err.Error()) - syncError = fmt.Errorf("%v, update ingress error: %v", syncError, err) - } - return syncError -} - -// updateIngressStatus updates the IP and annotations of a loadbalancer. -// The annotations are parsed by kubectl describe. -func (lbc *LoadBalancerController) updateIngressStatus(l7 *loadbalancers.L7, ing extensions.Ingress) error { - ingClient := lbc.client.Extensions().Ingresses(ing.Namespace) - - // Update IP through update/status endpoint - ip := l7.GetIP() - currIng, err := ingClient.Get(ing.Name, metav1.GetOptions{}) - if err != nil { - return err - } - currIng.Status = extensions.IngressStatus{ - LoadBalancer: apiv1.LoadBalancerStatus{ - Ingress: []apiv1.LoadBalancerIngress{ - {IP: ip}, - }, - }, - } - if ip != "" { - lbIPs := ing.Status.LoadBalancer.Ingress - if len(lbIPs) == 0 || lbIPs[0].IP != ip { - // TODO: If this update fails it's probably resource version related, - // which means it's advantageous to retry right away vs requeuing. - glog.Infof("Updating loadbalancer %v/%v with IP %v", ing.Namespace, ing.Name, ip) - if _, err := ingClient.UpdateStatus(currIng); err != nil { - return err - } - lbc.recorder.Eventf(currIng, apiv1.EventTypeNormal, "CREATE", "ip: %v", ip) - } - } - annotations := loadbalancers.GetLBAnnotations(l7, currIng.Annotations, lbc.CloudClusterManager.backendPool) - if err := lbc.updateAnnotations(ing.Name, ing.Namespace, annotations); err != nil { - return err - } - return nil -} - -func (lbc *LoadBalancerController) updateAnnotations(name, namespace string, annotations map[string]string) error { - // Update annotations through /update endpoint - ingClient := lbc.client.Extensions().Ingresses(namespace) - currIng, err := ingClient.Get(name, metav1.GetOptions{}) - if err != nil { - return err - } - if !reflect.DeepEqual(currIng.Annotations, annotations) { - glog.V(3).Infof("Updating annotations of %v/%v", namespace, name) - currIng.Annotations = annotations - if _, err := ingClient.Update(currIng); err != nil { - return err - } - } - return nil -} - -// toRuntimeInfo returns L7RuntimeInfo for the given ingresses. -func (lbc *LoadBalancerController) toRuntimeInfo(ingList extensions.IngressList) (lbs []*loadbalancers.L7RuntimeInfo, err error) { - for _, ing := range ingList.Items { - k, err := keyFunc(&ing) - if err != nil { - glog.Warningf("Cannot get key for Ingress %v/%v: %v", ing.Namespace, ing.Name, err) - continue - } - - var tls *loadbalancers.TLSCerts - - annotations := ingAnnotations(ing.ObjectMeta.Annotations) - // Load the TLS cert from the API Spec if it is not specified in the annotation. - // TODO: enforce this with validation. - if annotations.useNamedTLS() == "" { - tls, err = lbc.tlsLoader.load(&ing) - if err != nil { - glog.Warningf("Cannot get certs for Ingress %v/%v: %v", ing.Namespace, ing.Name, err) - } - } - - lbs = append(lbs, &loadbalancers.L7RuntimeInfo{ - Name: k, - TLS: tls, - TLSName: annotations.useNamedTLS(), - AllowHTTP: annotations.allowHTTP(), - StaticIPName: annotations.staticIPName(), - }) - } - return lbs, nil -} - -// syncNodes manages the syncing of kubernetes nodes to gce instance groups. -// The instancegroups are referenced by loadbalancer backends. -func (lbc *LoadBalancerController) syncNodes(key string) error { - nodeNames, err := lbc.getReadyNodeNames() - if err != nil { - return err - } - if err := lbc.CloudClusterManager.instancePool.Sync(nodeNames); err != nil { - return err - } - return nil -} - -func getNodeReadyPredicate() listers.NodeConditionPredicate { - return func(node *apiv1.Node) bool { - for ix := range node.Status.Conditions { - condition := &node.Status.Conditions[ix] - if condition.Type == apiv1.NodeReady { - return condition.Status == apiv1.ConditionTrue - } - } - return false - } -} - -// getReadyNodeNames returns names of schedulable, ready nodes from the node lister. -func (lbc *LoadBalancerController) getReadyNodeNames() ([]string, error) { - nodeNames := []string{} - nodes, err := listers.NewNodeLister(lbc.nodeLister.Indexer).ListWithPredicate(getNodeReadyPredicate()) - if err != nil { - return nodeNames, err - } - for _, n := range nodes { - if n.Spec.Unschedulable { - continue - } - nodeNames = append(nodeNames, n.Name) - } - return nodeNames, nil -} diff --git a/controllers/gce/controller/controller_test.go b/controllers/gce/controller/controller_test.go deleted file mode 100644 index b12d01f1d..000000000 --- a/controllers/gce/controller/controller_test.go +++ /dev/null @@ -1,452 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package controller - -import ( - "fmt" - "math/rand" - "testing" - "time" - - compute "google.golang.org/api/compute/v1" - - api_v1 "k8s.io/api/core/v1" - extensions "k8s.io/api/extensions/v1beta1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/intstr" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/apimachinery/pkg/util/uuid" - "k8s.io/client-go/kubernetes/fake" - "k8s.io/kubernetes/pkg/api" - - "k8s.io/ingress/controllers/gce/firewalls" - "k8s.io/ingress/controllers/gce/loadbalancers" - "k8s.io/ingress/controllers/gce/utils" -) - -const testClusterName = "testcluster" - -var ( - testPathMap = map[string]string{"/foo": defaultBackendName(testClusterName)} - testIPManager = testIP{} -) - -// TODO: Use utils.Namer instead of this function. -func defaultBackendName(clusterName string) string { - return fmt.Sprintf("%v-%v", backendPrefix, clusterName) -} - -// newLoadBalancerController create a loadbalancer controller. -func newLoadBalancerController(t *testing.T, cm *fakeClusterManager) *LoadBalancerController { - kubeClient := fake.NewSimpleClientset() - ctx := NewControllerContext(kubeClient, api_v1.NamespaceAll, 1*time.Second) - lb, err := NewLoadBalancerController(kubeClient, ctx, cm.ClusterManager) - if err != nil { - t.Fatalf("%v", err) - } - lb.hasSynced = func() bool { return true } - return lb -} - -// toHTTPIngressPaths converts the given pathMap to a list of HTTPIngressPaths. -func toHTTPIngressPaths(pathMap map[string]string) []extensions.HTTPIngressPath { - httpPaths := []extensions.HTTPIngressPath{} - for path, backend := range pathMap { - httpPaths = append(httpPaths, extensions.HTTPIngressPath{ - Path: path, - Backend: extensions.IngressBackend{ - ServiceName: backend, - ServicePort: testBackendPort, - }, - }) - } - return httpPaths -} - -// toIngressRules converts the given ingressRule map to a list of IngressRules. -func toIngressRules(hostRules map[string]utils.FakeIngressRuleValueMap) []extensions.IngressRule { - rules := []extensions.IngressRule{} - for host, pathMap := range hostRules { - rules = append(rules, extensions.IngressRule{ - Host: host, - IngressRuleValue: extensions.IngressRuleValue{ - HTTP: &extensions.HTTPIngressRuleValue{ - Paths: toHTTPIngressPaths(pathMap), - }, - }, - }) - } - return rules -} - -// newIngress returns a new Ingress with the given path map. -func newIngress(hostRules map[string]utils.FakeIngressRuleValueMap) *extensions.Ingress { - return &extensions.Ingress{ - ObjectMeta: meta_v1.ObjectMeta{ - Name: fmt.Sprintf("%v", uuid.NewUUID()), - Namespace: api.NamespaceNone, - }, - Spec: extensions.IngressSpec{ - Backend: &extensions.IngressBackend{ - ServiceName: defaultBackendName(testClusterName), - ServicePort: testBackendPort, - }, - Rules: toIngressRules(hostRules), - }, - Status: extensions.IngressStatus{ - LoadBalancer: api_v1.LoadBalancerStatus{ - Ingress: []api_v1.LoadBalancerIngress{ - {IP: testIPManager.ip()}, - }, - }, - }, - } -} - -// validIngress returns a valid Ingress. -func validIngress() *extensions.Ingress { - return newIngress(map[string]utils.FakeIngressRuleValueMap{ - "foo.bar.com": testPathMap, - }) -} - -// getKey returns the key for an ingress. -func getKey(ing *extensions.Ingress, t *testing.T) string { - key, err := keyFunc(ing) - if err != nil { - t.Fatalf("Unexpected error getting key for Ingress %v: %v", ing.Name, err) - } - return key -} - -// nodePortManager is a helper to allocate ports to services and -// remember the allocations. -type nodePortManager struct { - portMap map[string]int - start int - end int - namer utils.Namer -} - -// randPort generated pseudo random port numbers. -func (p *nodePortManager) getNodePort(svcName string) int { - if port, ok := p.portMap[svcName]; ok { - return port - } - p.portMap[svcName] = rand.Intn(p.end-p.start) + p.start - return p.portMap[svcName] -} - -// toNodePortSvcNames converts all service names in the given map to gce node -// port names, eg foo -> k8-be- -func (p *nodePortManager) toNodePortSvcNames(inputMap map[string]utils.FakeIngressRuleValueMap) map[string]utils.FakeIngressRuleValueMap { - expectedMap := map[string]utils.FakeIngressRuleValueMap{} - for host, rules := range inputMap { - ruleMap := utils.FakeIngressRuleValueMap{} - for path, svc := range rules { - ruleMap[path] = p.namer.BeName(int64(p.portMap[svc])) - } - expectedMap[host] = ruleMap - } - return expectedMap -} - -func newPortManager(st, end int) *nodePortManager { - return &nodePortManager{map[string]int{}, st, end, utils.Namer{}} -} - -// addIngress adds an ingress to the loadbalancer controllers ingress store. If -// a nodePortManager is supplied, it also adds all backends to the service store -// with a nodePort acquired through it. -func addIngress(lbc *LoadBalancerController, ing *extensions.Ingress, pm *nodePortManager) { - lbc.ingLister.Store.Add(ing) - if pm == nil { - return - } - for _, rule := range ing.Spec.Rules { - for _, path := range rule.HTTP.Paths { - svc := &api_v1.Service{ - ObjectMeta: meta_v1.ObjectMeta{ - Name: path.Backend.ServiceName, - Namespace: ing.Namespace, - }, - } - var svcPort api_v1.ServicePort - switch path.Backend.ServicePort.Type { - case intstr.Int: - svcPort = api_v1.ServicePort{Port: path.Backend.ServicePort.IntVal} - default: - svcPort = api_v1.ServicePort{Name: path.Backend.ServicePort.StrVal} - } - svcPort.NodePort = int32(pm.getNodePort(path.Backend.ServiceName)) - svc.Spec.Ports = []api_v1.ServicePort{svcPort} - lbc.svcLister.Indexer.Add(svc) - } - } -} - -func TestLbCreateDelete(t *testing.T) { - testFirewallName := "quux" - cm := NewFakeClusterManager(DefaultClusterUID, testFirewallName) - lbc := newLoadBalancerController(t, cm) - inputMap1 := map[string]utils.FakeIngressRuleValueMap{ - "foo.example.com": { - "/foo1": "foo1svc", - "/foo2": "foo2svc", - }, - "bar.example.com": { - "/bar1": "bar1svc", - "/bar2": "bar2svc", - }, - } - inputMap2 := map[string]utils.FakeIngressRuleValueMap{ - "baz.foobar.com": { - "/foo": "foo1svc", - "/bar": "bar1svc", - }, - } - pm := newPortManager(1, 65536) - ings := []*extensions.Ingress{} - for _, m := range []map[string]utils.FakeIngressRuleValueMap{inputMap1, inputMap2} { - newIng := newIngress(m) - addIngress(lbc, newIng, pm) - ingStoreKey := getKey(newIng, t) - lbc.sync(ingStoreKey) - l7, err := cm.l7Pool.Get(ingStoreKey) - if err != nil { - t.Fatalf("%v", err) - } - cm.fakeLbs.CheckURLMap(t, l7, pm.toNodePortSvcNames(m)) - ings = append(ings, newIng) - } - lbc.ingLister.Store.Delete(ings[0]) - lbc.sync(getKey(ings[0], t)) - - // BackendServices associated with ports of deleted Ingress' should get gc'd - // when the Ingress is deleted, regardless of the service. At the same time - // we shouldn't pull shared backends out from existing loadbalancers. - unexpected := []int{pm.portMap["foo2svc"], pm.portMap["bar2svc"]} - expected := []int{pm.portMap["foo1svc"], pm.portMap["bar1svc"]} - firewallPorts := sets.NewString() - pm.namer.SetFirewallName(testFirewallName) - firewallName := pm.namer.FrName(pm.namer.FrSuffix()) - - if firewallRule, err := cm.firewallPool.(*firewalls.FirewallRules).GetFirewall(firewallName); err != nil { - t.Fatalf("%v", err) - } else { - if len(firewallRule.Allowed) != 1 { - t.Fatalf("Expected a single firewall rule") - } - for _, p := range firewallRule.Allowed[0].Ports { - firewallPorts.Insert(p) - } - } - - for _, port := range expected { - if _, err := cm.backendPool.Get(int64(port)); err != nil { - t.Fatalf("%v", err) - } - if !firewallPorts.Has(fmt.Sprintf("%v", port)) { - t.Fatalf("Expected a firewall rule for port %v", port) - } - } - for _, port := range unexpected { - if be, err := cm.backendPool.Get(int64(port)); err == nil { - t.Fatalf("Found backend %+v for port %v", be, port) - } - } - lbc.ingLister.Store.Delete(ings[1]) - lbc.sync(getKey(ings[1], t)) - - // No cluster resources (except the defaults used by the cluster manager) - // should exist at this point. - for _, port := range expected { - if be, err := cm.backendPool.Get(int64(port)); err == nil { - t.Fatalf("Found backend %+v for port %v", be, port) - } - } - if len(cm.fakeLbs.Fw) != 0 || len(cm.fakeLbs.Um) != 0 || len(cm.fakeLbs.Tp) != 0 { - t.Fatalf("Loadbalancer leaked resources") - } - for _, lbName := range []string{getKey(ings[0], t), getKey(ings[1], t)} { - if l7, err := cm.l7Pool.Get(lbName); err == nil { - t.Fatalf("Found unexpected loadbalandcer %+v: %v", l7, err) - } - } - if firewallRule, err := cm.firewallPool.(*firewalls.FirewallRules).GetFirewall(firewallName); err == nil { - t.Fatalf("Found unexpected firewall rule %v", firewallRule) - } -} - -func TestLbFaultyUpdate(t *testing.T) { - cm := NewFakeClusterManager(DefaultClusterUID, DefaultFirewallName) - lbc := newLoadBalancerController(t, cm) - inputMap := map[string]utils.FakeIngressRuleValueMap{ - "foo.example.com": { - "/foo1": "foo1svc", - "/foo2": "foo2svc", - }, - "bar.example.com": { - "/bar1": "bar1svc", - "/bar2": "bar2svc", - }, - } - ing := newIngress(inputMap) - pm := newPortManager(1, 65536) - addIngress(lbc, ing, pm) - - ingStoreKey := getKey(ing, t) - lbc.sync(ingStoreKey) - l7, err := cm.l7Pool.Get(ingStoreKey) - if err != nil { - t.Fatalf("%v", err) - } - cm.fakeLbs.CheckURLMap(t, l7, pm.toNodePortSvcNames(inputMap)) - - // Change the urlmap directly through the lb pool, resync, and - // make sure the controller corrects it. - l7.UpdateUrlMap(utils.GCEURLMap{ - "foo.example.com": { - "/foo1": &compute.BackendService{SelfLink: "foo2svc"}, - }, - }) - - lbc.sync(ingStoreKey) - cm.fakeLbs.CheckURLMap(t, l7, pm.toNodePortSvcNames(inputMap)) -} - -func TestLbDefaulting(t *testing.T) { - cm := NewFakeClusterManager(DefaultClusterUID, DefaultFirewallName) - lbc := newLoadBalancerController(t, cm) - // Make sure the controller plugs in the default values accepted by GCE. - ing := newIngress(map[string]utils.FakeIngressRuleValueMap{"": {"": "foo1svc"}}) - pm := newPortManager(1, 65536) - addIngress(lbc, ing, pm) - - ingStoreKey := getKey(ing, t) - lbc.sync(ingStoreKey) - l7, err := cm.l7Pool.Get(ingStoreKey) - if err != nil { - t.Fatalf("%v", err) - } - expectedMap := map[string]utils.FakeIngressRuleValueMap{loadbalancers.DefaultHost: {loadbalancers.DefaultPath: "foo1svc"}} - cm.fakeLbs.CheckURLMap(t, l7, pm.toNodePortSvcNames(expectedMap)) -} - -func TestLbNoService(t *testing.T) { - cm := NewFakeClusterManager(DefaultClusterUID, DefaultFirewallName) - lbc := newLoadBalancerController(t, cm) - inputMap := map[string]utils.FakeIngressRuleValueMap{ - "foo.example.com": { - "/foo1": "foo1svc", - }, - } - ing := newIngress(inputMap) - ing.Spec.Backend.ServiceName = "foo1svc" - ingStoreKey := getKey(ing, t) - - // Adds ingress to store, but doesn't create an associated service. - // This will still create the associated loadbalancer, it will just - // have empty rules. The rules will get corrected when the service - // pops up. - addIngress(lbc, ing, nil) - lbc.sync(ingStoreKey) - - l7, err := cm.l7Pool.Get(ingStoreKey) - if err != nil { - t.Fatalf("%v", err) - } - - // Creates the service, next sync should have complete url map. - pm := newPortManager(1, 65536) - addIngress(lbc, ing, pm) - lbc.enqueueIngressForService(&api_v1.Service{ - ObjectMeta: meta_v1.ObjectMeta{ - Name: "foo1svc", - Namespace: ing.Namespace, - }, - }) - // TODO: This will hang if the previous step failed to insert into queue - key, _ := lbc.ingQueue.queue.Get() - lbc.sync(key.(string)) - - inputMap[utils.DefaultBackendKey] = map[string]string{ - utils.DefaultBackendKey: "foo1svc", - } - expectedMap := pm.toNodePortSvcNames(inputMap) - cm.fakeLbs.CheckURLMap(t, l7, expectedMap) -} - -func TestLbChangeStaticIP(t *testing.T) { - cm := NewFakeClusterManager(DefaultClusterUID, DefaultFirewallName) - lbc := newLoadBalancerController(t, cm) - inputMap := map[string]utils.FakeIngressRuleValueMap{ - "foo.example.com": { - "/foo1": "foo1svc", - }, - } - ing := newIngress(inputMap) - ing.Spec.Backend.ServiceName = "foo1svc" - cert := extensions.IngressTLS{SecretName: "foo"} - ing.Spec.TLS = []extensions.IngressTLS{cert} - - // Add some certs so we get 2 forwarding rules, the changed static IP - // should be assigned to both the HTTP and HTTPS forwarding rules. - lbc.tlsLoader = &fakeTLSSecretLoader{ - fakeCerts: map[string]*loadbalancers.TLSCerts{ - cert.SecretName: {Key: "foo", Cert: "bar"}, - }, - } - - pm := newPortManager(1, 65536) - addIngress(lbc, ing, pm) - ingStoreKey := getKey(ing, t) - - // First sync creates forwarding rules and allocates an IP. - lbc.sync(ingStoreKey) - - // First allocate a static ip, then specify a userip in annotations. - // The forwarding rules should contain the user ip. - // The static ip should get cleaned up on lb tear down. - oldIP := ing.Status.LoadBalancer.Ingress[0].IP - oldRules := cm.fakeLbs.GetForwardingRulesWithIPs([]string{oldIP}) - if len(oldRules) != 2 || oldRules[0].IPAddress != oldRules[1].IPAddress { - t.Fatalf("Expected 2 forwarding rules with the same IP.") - } - - ing.Annotations = map[string]string{staticIPNameKey: "testip"} - cm.fakeLbs.ReserveGlobalAddress(&compute.Address{Name: "testip", Address: "1.2.3.4"}) - - // Second sync reassigns 1.2.3.4 to existing forwarding rule (by recreating it) - lbc.sync(ingStoreKey) - - newRules := cm.fakeLbs.GetForwardingRulesWithIPs([]string{"1.2.3.4"}) - if len(newRules) != 2 || newRules[0].IPAddress != newRules[1].IPAddress || newRules[1].IPAddress != "1.2.3.4" { - t.Fatalf("Found unexpected forwaring rules after changing static IP annotation.") - } -} - -type testIP struct { - start int -} - -func (t *testIP) ip() string { - t.start++ - return fmt.Sprintf("0.0.0.%v", t.start) -} - -// TODO: Test lb status update when annotation stabilize diff --git a/controllers/gce/controller/doc.go b/controllers/gce/controller/doc.go deleted file mode 100644 index b00d3295c..000000000 --- a/controllers/gce/controller/doc.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This is the structure of the gce l7 controller: -// apiserver <-> controller ---> pools --> cloud -// | | -// |-> Ingress |-> backends -// |-> Services | |-> health checks -// |-> Nodes | -// |-> instance groups -// | |-> port per backend -// | -// |-> loadbalancers -// |-> http proxy -// |-> forwarding rule -// |-> urlmap -// * apiserver: kubernetes api serer. -// * controller: gce l7 controller, watches apiserver and interacts -// with sync pools. The controller doesn't know anything about the cloud. -// Communication between the controller and pools is 1 way. -// * pool: the controller tells each pool about desired state by inserting -// into shared memory store. The pools sync this with the cloud. Pools are -// also responsible for periodically checking the edge links between various -// cloud resources. -// -// A note on sync pools: this package has 3 sync pools: for node, instances and -// loadbalancer resources. A sync pool is meant to record all creates/deletes -// performed by a controller and periodically verify that links are not broken. -// For example, the controller might create a backend via backendPool.Add(), -// the backend pool remembers this and continuously verifies that the backend -// is connected to the right instance group, and that the instance group has -// the right ports open. -// -// A note on naming convention: per golang style guide for Initialisms, Http -// should be HTTP and Url should be URL, however because these interfaces -// must match their siblings in the Kubernetes cloud provider, which are in turn -// consistent with GCE compute API, there might be inconsistencies. - -package controller diff --git a/controllers/gce/controller/fakes.go b/controllers/gce/controller/fakes.go deleted file mode 100644 index 113460e12..000000000 --- a/controllers/gce/controller/fakes.go +++ /dev/null @@ -1,77 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package controller - -import ( - compute "google.golang.org/api/compute/v1" - "k8s.io/apimachinery/pkg/util/intstr" - "k8s.io/apimachinery/pkg/util/sets" - - "k8s.io/ingress/controllers/gce/backends" - "k8s.io/ingress/controllers/gce/firewalls" - "k8s.io/ingress/controllers/gce/healthchecks" - "k8s.io/ingress/controllers/gce/instances" - "k8s.io/ingress/controllers/gce/loadbalancers" - "k8s.io/ingress/controllers/gce/utils" -) - -var ( - testDefaultBeNodePort = backends.ServicePort{Port: 3000, Protocol: utils.ProtocolHTTP} - testBackendPort = intstr.IntOrString{Type: intstr.Int, IntVal: 80} -) - -// ClusterManager fake -type fakeClusterManager struct { - *ClusterManager - fakeLbs *loadbalancers.FakeLoadBalancers - fakeBackends *backends.FakeBackendServices - fakeIGs *instances.FakeInstanceGroups -} - -// NewFakeClusterManager creates a new fake ClusterManager. -func NewFakeClusterManager(clusterName, firewallName string) *fakeClusterManager { - fakeLbs := loadbalancers.NewFakeLoadBalancers(clusterName) - fakeBackends := backends.NewFakeBackendServices(func(op int, be *compute.BackendService) error { return nil }) - fakeIGs := instances.NewFakeInstanceGroups(sets.NewString()) - fakeHCP := healthchecks.NewFakeHealthCheckProvider() - namer := utils.NewNamer(clusterName, firewallName) - - nodePool := instances.NewNodePool(fakeIGs) - nodePool.Init(&instances.FakeZoneLister{Zones: []string{"zone-a"}}) - - healthChecker := healthchecks.NewHealthChecker(fakeHCP, "/", namer) - - backendPool := backends.NewBackendPool( - fakeBackends, - healthChecker, nodePool, namer, []int64{}, false) - l7Pool := loadbalancers.NewLoadBalancerPool( - fakeLbs, - // TODO: change this - backendPool, - testDefaultBeNodePort, - namer, - ) - frPool := firewalls.NewFirewallPool(firewalls.NewFakeFirewallsProvider(), namer) - cm := &ClusterManager{ - ClusterNamer: namer, - instancePool: nodePool, - backendPool: backendPool, - l7Pool: l7Pool, - firewallPool: frPool, - } - return &fakeClusterManager{cm, fakeLbs, fakeBackends, fakeIGs} -} diff --git a/controllers/gce/controller/tls.go b/controllers/gce/controller/tls.go deleted file mode 100644 index 771b785cf..000000000 --- a/controllers/gce/controller/tls.go +++ /dev/null @@ -1,100 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package controller - -import ( - "fmt" - - "github.com/golang/glog" - - api_v1 "k8s.io/api/core/v1" - extensions "k8s.io/api/extensions/v1beta1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/kubernetes" - - "k8s.io/ingress/controllers/gce/loadbalancers" -) - -// secretLoaders returns a type containing all the secrets of an Ingress. -type tlsLoader interface { - load(ing *extensions.Ingress) (*loadbalancers.TLSCerts, error) - validate(certs *loadbalancers.TLSCerts) error -} - -// TODO: Add better cert validation. -type noOPValidator struct{} - -func (n *noOPValidator) validate(certs *loadbalancers.TLSCerts) error { - return nil -} - -// apiServerTLSLoader loads TLS certs from the apiserver. -type apiServerTLSLoader struct { - noOPValidator - client kubernetes.Interface -} - -func (t *apiServerTLSLoader) load(ing *extensions.Ingress) (*loadbalancers.TLSCerts, error) { - if len(ing.Spec.TLS) == 0 { - return nil, nil - } - // GCE L7s currently only support a single cert. - if len(ing.Spec.TLS) > 1 { - glog.Warningf("Ignoring %d certs and taking the first for ingress %v/%v", - len(ing.Spec.TLS)-1, ing.Namespace, ing.Name) - } - secretName := ing.Spec.TLS[0].SecretName - // TODO: Replace this for a secret watcher. - glog.V(3).Infof("Retrieving secret for ing %v with name %v", ing.Name, secretName) - secret, err := t.client.Core().Secrets(ing.Namespace).Get(secretName, meta_v1.GetOptions{}) - if err != nil { - return nil, err - } - cert, ok := secret.Data[api_v1.TLSCertKey] - if !ok { - return nil, fmt.Errorf("secret %v has no 'tls.crt'", secretName) - } - key, ok := secret.Data[api_v1.TLSPrivateKeyKey] - if !ok { - return nil, fmt.Errorf("secret %v has no 'tls.key'", secretName) - } - certs := &loadbalancers.TLSCerts{Key: string(key), Cert: string(cert)} - if err := t.validate(certs); err != nil { - return nil, err - } - return certs, nil -} - -// TODO: Add support for file loading so we can support HTTPS default backends. - -// fakeTLSSecretLoader fakes out TLS loading. -type fakeTLSSecretLoader struct { - noOPValidator - fakeCerts map[string]*loadbalancers.TLSCerts -} - -func (f *fakeTLSSecretLoader) load(ing *extensions.Ingress) (*loadbalancers.TLSCerts, error) { - if len(ing.Spec.TLS) == 0 { - return nil, nil - } - for name, cert := range f.fakeCerts { - if ing.Spec.TLS[0].SecretName == name { - return cert, nil - } - } - return nil, fmt.Errorf("couldn't find secret for ingress %v", ing.Name) -} diff --git a/controllers/gce/controller/utils.go b/controllers/gce/controller/utils.go deleted file mode 100644 index 192eaa414..000000000 --- a/controllers/gce/controller/utils.go +++ /dev/null @@ -1,706 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package controller - -import ( - "encoding/json" - "fmt" - "sort" - "strconv" - "time" - - "github.com/golang/glog" - - compute "google.golang.org/api/compute/v1" - - api_v1 "k8s.io/api/core/v1" - extensions "k8s.io/api/extensions/v1beta1" - "k8s.io/apimachinery/pkg/api/meta" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/intstr" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/apimachinery/pkg/util/wait" - listers "k8s.io/client-go/listers/core/v1" - "k8s.io/client-go/tools/cache" - "k8s.io/client-go/util/workqueue" - - "k8s.io/ingress/controllers/gce/backends" - "k8s.io/ingress/controllers/gce/loadbalancers" - "k8s.io/ingress/controllers/gce/utils" -) - -const ( - // allowHTTPKey tells the Ingress controller to allow/block HTTP access. - // If either unset or set to true, the controller will create a - // forwarding-rule for port 80, and any additional rules based on the TLS - // section of the Ingress. If set to false, the controller will only create - // rules for port 443 based on the TLS section. - allowHTTPKey = "kubernetes.io/ingress.allow-http" - - // staticIPNameKey tells the Ingress controller to use a specific GCE - // static ip for its forwarding rules. If specified, the Ingress controller - // assigns the static ip by this name to the forwarding rules of the given - // Ingress. The controller *does not* manage this ip, it is the users - // responsibility to create/delete it. - staticIPNameKey = "kubernetes.io/ingress.global-static-ip-name" - - // preSharedCertKey represents the specific pre-shared SSL - // certicate for the Ingress controller to use. The controller *does not* - // manage this certificate, it is the users responsibility to create/delete it. - // In GCP, the Ingress controller assigns the SSL certificate with this name - // to the target proxies of the Ingress. - preSharedCertKey = "ingress.gcp.kubernetes.io/pre-shared-cert" - - // serviceApplicationProtocolKey is a stringified JSON map of port names to - // protocol strings. Possible values are HTTP, HTTPS - // Example: - // '{"my-https-port":"HTTPS","my-http-port":"HTTP"}' - serviceApplicationProtocolKey = "service.alpha.kubernetes.io/app-protocols" - - // ingressClassKey picks a specific "class" for the Ingress. The controller - // only processes Ingresses with this annotation either unset, or set - // to either gceIngessClass or the empty string. - ingressClassKey = "kubernetes.io/ingress.class" - gceIngressClass = "gce" - gceMultiIngressClass = "gce-multi-cluster" - - // Label key to denote which GCE zone a Kubernetes node is in. - zoneKey = "failure-domain.beta.kubernetes.io/zone" - defaultZone = "" - - // instanceGroupsAnnotationKey is the annotation key used by controller to - // specify the name and zone of instance groups created for the ingress. - // This is read only for users. Controller will overrite any user updates. - // This is only set for ingresses with ingressClass = "gce-multi-cluster" - instanceGroupsAnnotationKey = "ingress.gcp.kubernetes.io/instance-groups" -) - -// ingAnnotations represents Ingress annotations. -type ingAnnotations map[string]string - -// allowHTTP returns the allowHTTP flag. True by default. -func (ing ingAnnotations) allowHTTP() bool { - val, ok := ing[allowHTTPKey] - if !ok { - return true - } - v, err := strconv.ParseBool(val) - if err != nil { - return true - } - return v -} - -// useNamedTLS returns the name of the GCE SSL certificate. Empty by default. -func (ing ingAnnotations) useNamedTLS() string { - val, ok := ing[preSharedCertKey] - if !ok { - return "" - } - - return val -} - -func (ing ingAnnotations) staticIPName() string { - val, ok := ing[staticIPNameKey] - if !ok { - return "" - } - return val -} - -func (ing ingAnnotations) ingressClass() string { - val, ok := ing[ingressClassKey] - if !ok { - return "" - } - return val -} - -// svcAnnotations represents Service annotations. -type svcAnnotations map[string]string - -func (svc svcAnnotations) ApplicationProtocols() (map[string]utils.AppProtocol, error) { - val, ok := svc[serviceApplicationProtocolKey] - if !ok { - return map[string]utils.AppProtocol{}, nil - } - - var portToProtos map[string]utils.AppProtocol - err := json.Unmarshal([]byte(val), &portToProtos) - - // Verify protocol is an accepted value - for _, proto := range portToProtos { - switch proto { - case utils.ProtocolHTTP, utils.ProtocolHTTPS: - default: - return nil, fmt.Errorf("invalid port application protocol: %v", proto) - } - } - - return portToProtos, err -} - -// isGCEIngress returns true if the given Ingress either doesn't specify the -// ingress.class annotation, or it's set to "gce". -func isGCEIngress(ing *extensions.Ingress) bool { - class := ingAnnotations(ing.ObjectMeta.Annotations).ingressClass() - return class == "" || class == gceIngressClass -} - -// isGCEMultiClusterIngress returns true if the given Ingress has -// ingress.class annotation set to "gce-multi-cluster". -func isGCEMultiClusterIngress(ing *extensions.Ingress) bool { - class := ingAnnotations(ing.ObjectMeta.Annotations).ingressClass() - return class == gceMultiIngressClass -} - -// errorNodePortNotFound is an implementation of error. -type errorNodePortNotFound struct { - backend extensions.IngressBackend - origErr error -} - -func (e errorNodePortNotFound) Error() string { - return fmt.Sprintf("Could not find nodeport for backend %+v: %v", - e.backend, e.origErr) -} - -type errorSvcAppProtosParsing struct { - svc *api_v1.Service - origErr error -} - -func (e errorSvcAppProtosParsing) Error() string { - return fmt.Sprintf("could not parse %v annotation on Service %v/%v, err: %v", serviceApplicationProtocolKey, e.svc.Namespace, e.svc.Name, e.origErr) -} - -// taskQueue manages a work queue through an independent worker that -// invokes the given sync function for every work item inserted. -type taskQueue struct { - // queue is the work queue the worker polls - queue workqueue.RateLimitingInterface - // sync is called for each item in the queue - sync func(string) error - // workerDone is closed when the worker exits - workerDone chan struct{} -} - -func (t *taskQueue) run(period time.Duration, stopCh <-chan struct{}) { - wait.Until(t.worker, period, stopCh) -} - -// enqueue enqueues ns/name of the given api object in the task queue. -func (t *taskQueue) enqueue(obj interface{}) { - key, err := keyFunc(obj) - if err != nil { - glog.Infof("Couldn't get key for object %+v: %v", obj, err) - return - } - t.queue.Add(key) -} - -// worker processes work in the queue through sync. -func (t *taskQueue) worker() { - for { - key, quit := t.queue.Get() - if quit { - close(t.workerDone) - return - } - glog.V(3).Infof("Syncing %v", key) - if err := t.sync(key.(string)); err != nil { - glog.Errorf("Requeuing %v, err %v", key, err) - t.queue.AddRateLimited(key) - } else { - t.queue.Forget(key) - } - t.queue.Done(key) - } -} - -// shutdown shuts down the work queue and waits for the worker to ACK -func (t *taskQueue) shutdown() { - t.queue.ShutDown() - <-t.workerDone -} - -// NewTaskQueue creates a new task queue with the given sync function. -// The sync function is called for every element inserted into the queue. -func NewTaskQueue(syncFn func(string) error) *taskQueue { - return &taskQueue{ - queue: workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter()), - sync: syncFn, - workerDone: make(chan struct{}), - } -} - -// compareLinks returns true if the 2 self links are equal. -func compareLinks(l1, l2 string) bool { - // TODO: These can be partial links - return l1 == l2 && l1 != "" -} - -// StoreToIngressLister makes a Store that lists Ingress. -// TODO: Move this to cache/listers post 1.1. -type StoreToIngressLister struct { - cache.Store -} - -// StoreToNodeLister makes a Store that lists Node. -type StoreToNodeLister struct { - cache.Indexer -} - -// StoreToServiceLister makes a Store that lists Service. -type StoreToServiceLister struct { - cache.Indexer -} - -// StoreToPodLister makes a Store that lists Pods. -type StoreToPodLister struct { - cache.Indexer -} - -// List returns a list of all pods based on selector -func (s *StoreToPodLister) List(selector labels.Selector) (ret []*api_v1.Pod, err error) { - err = ListAll(s.Indexer, selector, func(m interface{}) { - ret = append(ret, m.(*api_v1.Pod)) - }) - return ret, err -} - -// ListAll iterates a store and passes selected item to a func -func ListAll(store cache.Store, selector labels.Selector, appendFn cache.AppendFunc) error { - for _, m := range store.List() { - metadata, err := meta.Accessor(m) - if err != nil { - return err - } - if selector.Matches(labels.Set(metadata.GetLabels())) { - appendFn(m) - } - } - return nil -} - -// List lists all Ingress' in the store (both single and multi cluster ingresses). -func (s *StoreToIngressLister) ListAll() (ing extensions.IngressList, err error) { - for _, m := range s.Store.List() { - newIng := m.(*extensions.Ingress) - if isGCEIngress(newIng) || isGCEMultiClusterIngress(newIng) { - ing.Items = append(ing.Items, *newIng) - } - } - return ing, nil -} - -// ListGCEIngresses lists all GCE Ingress' in the store. -func (s *StoreToIngressLister) ListGCEIngresses() (ing extensions.IngressList, err error) { - for _, m := range s.Store.List() { - newIng := m.(*extensions.Ingress) - if isGCEIngress(newIng) { - ing.Items = append(ing.Items, *newIng) - } - } - return ing, nil -} - -// GetServiceIngress gets all the Ingress' that have rules pointing to a service. -// Note that this ignores services without the right nodePorts. -func (s *StoreToIngressLister) GetServiceIngress(svc *api_v1.Service) (ings []extensions.Ingress, err error) { -IngressLoop: - for _, m := range s.Store.List() { - ing := *m.(*extensions.Ingress) - if ing.Namespace != svc.Namespace { - continue - } - - // Check service of default backend - if ing.Spec.Backend != nil && ing.Spec.Backend.ServiceName == svc.Name { - ings = append(ings, ing) - continue - } - - // Check the target service for each path rule - for _, rule := range ing.Spec.Rules { - if rule.IngressRuleValue.HTTP == nil { - continue - } - for _, p := range rule.IngressRuleValue.HTTP.Paths { - if p.Backend.ServiceName == svc.Name { - ings = append(ings, ing) - // Skip the rest of the rules to avoid duplicate ingresses in list - continue IngressLoop - } - } - } - } - if len(ings) == 0 { - err = fmt.Errorf("no ingress for service %v", svc.Name) - } - return -} - -// GCETranslator helps with kubernetes -> gce api conversion. -type GCETranslator struct { - *LoadBalancerController -} - -// toURLMap converts an ingress to a map of subdomain: url-regex: gce backend. -func (t *GCETranslator) toURLMap(ing *extensions.Ingress) (utils.GCEURLMap, error) { - hostPathBackend := utils.GCEURLMap{} - for _, rule := range ing.Spec.Rules { - if rule.HTTP == nil { - glog.Errorf("Ignoring non http Ingress rule") - continue - } - pathToBackend := map[string]*compute.BackendService{} - for _, p := range rule.HTTP.Paths { - backend, err := t.toGCEBackend(&p.Backend, ing.Namespace) - if err != nil { - // If a service doesn't have a nodeport we can still forward traffic - // to all other services under the assumption that the user will - // modify nodeport. - if _, ok := err.(errorNodePortNotFound); ok { - t.recorder.Eventf(ing, api_v1.EventTypeWarning, "Service", err.(errorNodePortNotFound).Error()) - continue - } - - // If a service doesn't have a backend, there's nothing the user - // can do to correct this (the admin might've limited quota). - // So keep requeuing the l7 till all backends exist. - return utils.GCEURLMap{}, err - } - // The Ingress spec defines empty path as catch-all, so if a user - // asks for a single host and multiple empty paths, all traffic is - // sent to one of the last backend in the rules list. - path := p.Path - if path == "" { - path = loadbalancers.DefaultPath - } - pathToBackend[path] = backend - } - // If multiple hostless rule sets are specified, last one wins - host := rule.Host - if host == "" { - host = loadbalancers.DefaultHost - } - hostPathBackend[host] = pathToBackend - } - var defaultBackend *compute.BackendService - if ing.Spec.Backend != nil { - var err error - defaultBackend, err = t.toGCEBackend(ing.Spec.Backend, ing.Namespace) - if err != nil { - msg := fmt.Sprintf("%v", err) - if _, ok := err.(errorNodePortNotFound); ok { - msg = fmt.Sprintf("couldn't find nodeport for %v/%v", ing.Namespace, ing.Spec.Backend.ServiceName) - } - t.recorder.Eventf(ing, api_v1.EventTypeWarning, "Service", fmt.Sprintf("failed to identify user specified default backend, %v, using system default", msg)) - } else if defaultBackend != nil { - t.recorder.Eventf(ing, api_v1.EventTypeNormal, "Service", fmt.Sprintf("default backend set to %v:%v", ing.Spec.Backend.ServiceName, defaultBackend.Port)) - } - } else { - t.recorder.Eventf(ing, api_v1.EventTypeNormal, "Service", "no user specified default backend, using system default") - } - hostPathBackend.PutDefaultBackend(defaultBackend) - return hostPathBackend, nil -} - -func (t *GCETranslator) toGCEBackend(be *extensions.IngressBackend, ns string) (*compute.BackendService, error) { - if be == nil { - return nil, nil - } - port, err := t.getServiceNodePort(*be, ns) - if err != nil { - return nil, err - } - backend, err := t.CloudClusterManager.backendPool.Get(port.Port) - if err != nil { - return nil, fmt.Errorf("no GCE backend exists for port %v, kube backend %+v", port, be) - } - return backend, nil -} - -// getServiceNodePort looks in the svc store for a matching service:port, -// and returns the nodeport. -func (t *GCETranslator) getServiceNodePort(be extensions.IngressBackend, namespace string) (backends.ServicePort, error) { - obj, exists, err := t.svcLister.Indexer.Get( - &api_v1.Service{ - ObjectMeta: meta_v1.ObjectMeta{ - Name: be.ServiceName, - Namespace: namespace, - }, - }) - if !exists { - return backends.ServicePort{}, errorNodePortNotFound{be, fmt.Errorf("service %v/%v not found in store", namespace, be.ServiceName)} - } - if err != nil { - return backends.ServicePort{}, errorNodePortNotFound{be, err} - } - svc := obj.(*api_v1.Service) - appProtocols, err := svcAnnotations(svc.GetAnnotations()).ApplicationProtocols() - if err != nil { - return backends.ServicePort{}, errorSvcAppProtosParsing{svc, err} - } - - var port *api_v1.ServicePort -PortLoop: - for _, p := range svc.Spec.Ports { - np := p - switch be.ServicePort.Type { - case intstr.Int: - if p.Port == be.ServicePort.IntVal { - port = &np - break PortLoop - } - default: - if p.Name == be.ServicePort.StrVal { - port = &np - break PortLoop - } - } - } - - if port == nil { - return backends.ServicePort{}, errorNodePortNotFound{be, fmt.Errorf("could not find matching nodeport from service")} - } - - proto := utils.ProtocolHTTP - if protoStr, exists := appProtocols[port.Name]; exists { - proto = utils.AppProtocol(protoStr) - } - - p := backends.ServicePort{ - Port: int64(port.NodePort), - Protocol: proto, - SvcName: types.NamespacedName{Namespace: namespace, Name: be.ServiceName}, - SvcPort: be.ServicePort, - } - return p, nil -} - -// toNodePorts is a helper method over ingressToNodePorts to process a list of ingresses. -func (t *GCETranslator) toNodePorts(ings *extensions.IngressList) []backends.ServicePort { - var knownPorts []backends.ServicePort - for _, ing := range ings.Items { - knownPorts = append(knownPorts, t.ingressToNodePorts(&ing)...) - } - return knownPorts -} - -// ingressToNodePorts converts a pathlist to a flat list of nodeports for the given ingress. -func (t *GCETranslator) ingressToNodePorts(ing *extensions.Ingress) []backends.ServicePort { - var knownPorts []backends.ServicePort - defaultBackend := ing.Spec.Backend - if defaultBackend != nil { - port, err := t.getServiceNodePort(*defaultBackend, ing.Namespace) - if err != nil { - glog.Infof("%v", err) - } else { - knownPorts = append(knownPorts, port) - } - } - for _, rule := range ing.Spec.Rules { - if rule.HTTP == nil { - glog.Errorf("ignoring non http Ingress rule") - continue - } - for _, path := range rule.HTTP.Paths { - port, err := t.getServiceNodePort(path.Backend, ing.Namespace) - if err != nil { - glog.Infof("%v", err) - continue - } - knownPorts = append(knownPorts, port) - } - } - return knownPorts -} - -func getZone(n *api_v1.Node) string { - zone, ok := n.Labels[zoneKey] - if !ok { - return defaultZone - } - return zone -} - -// GetZoneForNode returns the zone for a given node by looking up its zone label. -func (t *GCETranslator) GetZoneForNode(name string) (string, error) { - nodes, err := listers.NewNodeLister(t.nodeLister.Indexer).ListWithPredicate(getNodeReadyPredicate()) - if err != nil { - return "", err - } - for _, n := range nodes { - if n.Name == name { - // TODO: Make this more resilient to label changes by listing - // cloud nodes and figuring out zone. - return getZone(n), nil - } - } - return "", fmt.Errorf("node not found %v", name) -} - -// ListZones returns a list of zones this Kubernetes cluster spans. -func (t *GCETranslator) ListZones() ([]string, error) { - zones := sets.String{} - readyNodes, err := listers.NewNodeLister(t.nodeLister.Indexer).ListWithPredicate(getNodeReadyPredicate()) - if err != nil { - return zones.List(), err - } - for _, n := range readyNodes { - zones.Insert(getZone(n)) - } - return zones.List(), nil -} - -// geHTTPProbe returns the http readiness probe from the first container -// that matches targetPort, from the set of pods matching the given labels. -func (t *GCETranslator) getHTTPProbe(svc api_v1.Service, targetPort intstr.IntOrString, protocol utils.AppProtocol) (*api_v1.Probe, error) { - l := svc.Spec.Selector - - // Lookup any container with a matching targetPort from the set of pods - // with a matching label selector. - pl, err := t.podLister.List(labels.SelectorFromSet(labels.Set(l))) - if err != nil { - return nil, err - } - - // If multiple endpoints have different health checks, take the first - sort.Sort(PodsByCreationTimestamp(pl)) - - for _, pod := range pl { - if pod.Namespace != svc.Namespace { - continue - } - logStr := fmt.Sprintf("Pod %v matching service selectors %v (targetport %+v)", pod.Name, l, targetPort) - for _, c := range pod.Spec.Containers { - if !isSimpleHTTPProbe(c.ReadinessProbe) || string(protocol) != string(c.ReadinessProbe.HTTPGet.Scheme) { - continue - } - - for _, p := range c.Ports { - if (targetPort.Type == intstr.Int && targetPort.IntVal == p.ContainerPort) || - (targetPort.Type == intstr.String && targetPort.StrVal == p.Name) { - - readinessProbePort := c.ReadinessProbe.Handler.HTTPGet.Port - switch readinessProbePort.Type { - case intstr.Int: - if readinessProbePort.IntVal == p.ContainerPort { - return c.ReadinessProbe, nil - } - case intstr.String: - if readinessProbePort.StrVal == p.Name { - return c.ReadinessProbe, nil - } - } - - glog.Infof("%v: found matching targetPort on container %v, but not on readinessProbe (%+v)", - logStr, c.Name, c.ReadinessProbe.Handler.HTTPGet.Port) - } - } - } - glog.V(4).Infof("%v: lacks a matching HTTP probe for use in health checks.", logStr) - } - return nil, nil -} - -// isSimpleHTTPProbe returns true if the given Probe is: -// - an HTTPGet probe, as opposed to a tcp or exec probe -// - has no special host or headers fields, except for possibly an HTTP Host header -func isSimpleHTTPProbe(probe *api_v1.Probe) bool { - return (probe != nil && probe.Handler.HTTPGet != nil && probe.Handler.HTTPGet.Host == "" && - (len(probe.Handler.HTTPGet.HTTPHeaders) == 0 || - (len(probe.Handler.HTTPGet.HTTPHeaders) == 1 && probe.Handler.HTTPGet.HTTPHeaders[0].Name == "Host"))) -} - -// GetProbe returns a probe that's used for the given nodeport -func (t *GCETranslator) GetProbe(port backends.ServicePort) (*api_v1.Probe, error) { - sl := t.svcLister.List() - - // Find the label and target port of the one service with the given nodePort - var service api_v1.Service - var svcPort api_v1.ServicePort - var found bool -OuterLoop: - for _, as := range sl { - service = *as.(*api_v1.Service) - for _, sp := range service.Spec.Ports { - svcPort = sp - // only one Service can match this nodePort, try and look up - // the readiness probe of the pods behind it - if int32(port.Port) == sp.NodePort { - found = true - break OuterLoop - } - } - } - - if !found { - return nil, fmt.Errorf("unable to find nodeport %v in any service", port) - } - - return t.getHTTPProbe(service, svcPort.TargetPort, port.Protocol) -} - -// PodsByCreationTimestamp sorts a list of Pods by creation timestamp, using their names as a tie breaker. -type PodsByCreationTimestamp []*api_v1.Pod - -func (o PodsByCreationTimestamp) Len() int { return len(o) } -func (o PodsByCreationTimestamp) Swap(i, j int) { o[i], o[j] = o[j], o[i] } - -func (o PodsByCreationTimestamp) Less(i, j int) bool { - if o[i].CreationTimestamp.Equal(&o[j].CreationTimestamp) { - return o[i].Name < o[j].Name - } - return o[i].CreationTimestamp.Before(&o[j].CreationTimestamp) -} - -// setInstanceGroupsAnnotation sets the instance-groups annotation with names of the given instance groups. -func setInstanceGroupsAnnotation(existing map[string]string, igs []*compute.InstanceGroup) error { - type Value struct { - Name string - Zone string - } - var instanceGroups []Value - for _, ig := range igs { - instanceGroups = append(instanceGroups, Value{Name: ig.Name, Zone: ig.Zone}) - } - jsonValue, err := json.Marshal(instanceGroups) - if err != nil { - return err - } - existing[instanceGroupsAnnotationKey] = string(jsonValue) - return nil -} - -// uniq returns an array of unique service ports from the given array. -func uniq(nodePorts []backends.ServicePort) []backends.ServicePort { - portMap := map[int64]backends.ServicePort{} - for _, p := range nodePorts { - portMap[p.Port] = p - } - nodePorts = make([]backends.ServicePort, 0, len(portMap)) - for _, sp := range portMap { - nodePorts = append(nodePorts, sp) - } - return nodePorts -} diff --git a/controllers/gce/controller/utils_test.go b/controllers/gce/controller/utils_test.go deleted file mode 100644 index 88c70b696..000000000 --- a/controllers/gce/controller/utils_test.go +++ /dev/null @@ -1,302 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package controller - -import ( - "fmt" - "testing" - "time" - - compute "google.golang.org/api/compute/v1" - - api_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/intstr" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/ingress/controllers/gce/backends" - "k8s.io/ingress/controllers/gce/utils" -) - -// Pods created in loops start from this time, for routines that -// sort on timestamp. -var firstPodCreationTime = time.Date(2006, 01, 02, 15, 04, 05, 0, time.UTC) - -func TestZoneListing(t *testing.T) { - cm := NewFakeClusterManager(DefaultClusterUID, DefaultFirewallName) - lbc := newLoadBalancerController(t, cm) - zoneToNode := map[string][]string{ - "zone-1": {"n1"}, - "zone-2": {"n2"}, - } - addNodes(lbc, zoneToNode) - zones, err := lbc.tr.ListZones() - if err != nil { - t.Errorf("Failed to list zones: %v", err) - } - for expectedZone := range zoneToNode { - found := false - for _, gotZone := range zones { - if gotZone == expectedZone { - found = true - } - } - if !found { - t.Fatalf("Expected zones %v; Got zones %v", zoneToNode, zones) - } - } -} - -func TestInstancesAddedToZones(t *testing.T) { - cm := NewFakeClusterManager(DefaultClusterUID, DefaultFirewallName) - lbc := newLoadBalancerController(t, cm) - zoneToNode := map[string][]string{ - "zone-1": {"n1", "n2"}, - "zone-2": {"n3"}, - } - addNodes(lbc, zoneToNode) - - // Create 2 igs, one per zone. - testIG := "test-ig" - lbc.CloudClusterManager.instancePool.AddInstanceGroup(testIG, []int64{int64(3001)}) - - // node pool syncs kube-nodes, this will add them to both igs. - lbc.CloudClusterManager.instancePool.Sync([]string{"n1", "n2", "n3"}) - gotZonesToNode := cm.fakeIGs.GetInstancesByZone() - - for z, nodeNames := range zoneToNode { - if ig, err := cm.fakeIGs.GetInstanceGroup(testIG, z); err != nil { - t.Errorf("Failed to find ig %v in zone %v, found %+v: %v", testIG, z, ig, err) - } - expNodes := sets.NewString(nodeNames...) - gotNodes := sets.NewString(gotZonesToNode[z]...) - if !gotNodes.Equal(expNodes) { - t.Errorf("Nodes not added to zones, expected %+v got %+v", expNodes, gotNodes) - } - } -} - -func TestProbeGetter(t *testing.T) { - cm := NewFakeClusterManager(DefaultClusterUID, DefaultFirewallName) - lbc := newLoadBalancerController(t, cm) - - nodePortToHealthCheck := map[backends.ServicePort]string{ - {Port: 3001, Protocol: utils.ProtocolHTTP}: "/healthz", - {Port: 3002, Protocol: utils.ProtocolHTTPS}: "/foo", - } - addPods(lbc, nodePortToHealthCheck, api_v1.NamespaceDefault) - for p, exp := range nodePortToHealthCheck { - got, err := lbc.tr.GetProbe(p) - if err != nil || got == nil { - t.Errorf("Failed to get probe for node port %v: %v", p, err) - } else if getProbePath(got) != exp { - t.Errorf("Wrong path for node port %v, got %v expected %v", p, getProbePath(got), exp) - } - } -} - -func TestProbeGetterNamedPort(t *testing.T) { - cm := NewFakeClusterManager(DefaultClusterUID, DefaultFirewallName) - lbc := newLoadBalancerController(t, cm) - nodePortToHealthCheck := map[backends.ServicePort]string{ - {Port: 3001, Protocol: utils.ProtocolHTTP}: "/healthz", - } - addPods(lbc, nodePortToHealthCheck, api_v1.NamespaceDefault) - for _, p := range lbc.podLister.Indexer.List() { - pod := p.(*api_v1.Pod) - pod.Spec.Containers[0].Ports[0].Name = "test" - pod.Spec.Containers[0].ReadinessProbe.Handler.HTTPGet.Port = intstr.IntOrString{Type: intstr.String, StrVal: "test"} - } - for p, exp := range nodePortToHealthCheck { - got, err := lbc.tr.GetProbe(p) - if err != nil || got == nil { - t.Errorf("Failed to get probe for node port %v: %v", p, err) - } else if getProbePath(got) != exp { - t.Errorf("Wrong path for node port %v, got %v expected %v", p, getProbePath(got), exp) - } - } - -} - -func TestProbeGetterCrossNamespace(t *testing.T) { - cm := NewFakeClusterManager(DefaultClusterUID, DefaultFirewallName) - lbc := newLoadBalancerController(t, cm) - - firstPod := &api_v1.Pod{ - ObjectMeta: meta_v1.ObjectMeta{ - // labels match those added by "addPods", but ns and health check - // path is different. If this pod was created in the same ns, it - // would become the health check. - Labels: map[string]string{"app-3001": "test"}, - Name: fmt.Sprintf("test-pod-new-ns"), - Namespace: "new-ns", - CreationTimestamp: meta_v1.NewTime(firstPodCreationTime.Add(-time.Duration(time.Hour))), - }, - Spec: api_v1.PodSpec{ - Containers: []api_v1.Container{ - { - Ports: []api_v1.ContainerPort{{ContainerPort: 80}}, - ReadinessProbe: &api_v1.Probe{ - Handler: api_v1.Handler{ - HTTPGet: &api_v1.HTTPGetAction{ - Scheme: api_v1.URISchemeHTTP, - Path: "/badpath", - Port: intstr.IntOrString{ - Type: intstr.Int, - IntVal: 80, - }, - }, - }, - }, - }, - }, - }, - } - lbc.podLister.Indexer.Add(firstPod) - nodePortToHealthCheck := map[backends.ServicePort]string{ - {Port: 3001, Protocol: utils.ProtocolHTTP}: "/healthz", - } - addPods(lbc, nodePortToHealthCheck, api_v1.NamespaceDefault) - - for p, exp := range nodePortToHealthCheck { - got, err := lbc.tr.GetProbe(p) - if err != nil || got == nil { - t.Errorf("Failed to get probe for node port %v: %v", p, err) - } else if getProbePath(got) != exp { - t.Errorf("Wrong path for node port %v, got %v expected %v", p, getProbePath(got), exp) - } - } -} - -func addPods(lbc *LoadBalancerController, nodePortToHealthCheck map[backends.ServicePort]string, ns string) { - delay := time.Minute - for np, u := range nodePortToHealthCheck { - l := map[string]string{fmt.Sprintf("app-%d", np.Port): "test"} - svc := &api_v1.Service{ - Spec: api_v1.ServiceSpec{ - Selector: l, - Ports: []api_v1.ServicePort{ - { - NodePort: int32(np.Port), - TargetPort: intstr.IntOrString{ - Type: intstr.Int, - IntVal: 80, - }, - }, - }, - }, - } - svc.Name = fmt.Sprintf("%d", np.Port) - svc.Namespace = ns - lbc.svcLister.Indexer.Add(svc) - - pod := &api_v1.Pod{ - ObjectMeta: meta_v1.ObjectMeta{ - Labels: l, - Name: fmt.Sprintf("%d", np.Port), - Namespace: ns, - CreationTimestamp: meta_v1.NewTime(firstPodCreationTime.Add(delay)), - }, - Spec: api_v1.PodSpec{ - Containers: []api_v1.Container{ - { - Ports: []api_v1.ContainerPort{{Name: "test", ContainerPort: 80}}, - ReadinessProbe: &api_v1.Probe{ - Handler: api_v1.Handler{ - HTTPGet: &api_v1.HTTPGetAction{ - Scheme: api_v1.URIScheme(string(np.Protocol)), - Path: u, - Port: intstr.IntOrString{ - Type: intstr.Int, - IntVal: 80, - }, - }, - }, - }, - }, - }, - }, - } - lbc.podLister.Indexer.Add(pod) - delay = 2 * delay - } -} - -func addNodes(lbc *LoadBalancerController, zoneToNode map[string][]string) { - for zone, nodes := range zoneToNode { - for _, node := range nodes { - n := &api_v1.Node{ - ObjectMeta: meta_v1.ObjectMeta{ - Name: node, - Labels: map[string]string{ - zoneKey: zone, - }, - }, - Status: api_v1.NodeStatus{ - Conditions: []api_v1.NodeCondition{ - {Type: api_v1.NodeReady, Status: api_v1.ConditionTrue}, - }, - }, - } - lbc.nodeLister.Indexer.Add(n) - } - } - lbc.CloudClusterManager.instancePool.Init(lbc.tr) -} - -func getProbePath(p *api_v1.Probe) string { - return p.Handler.HTTPGet.Path -} - -func TestAddInstanceGroupsAnnotation(t *testing.T) { - testCases := []struct { - Igs []*compute.InstanceGroup - ExpectedAnnotation string - }{ - { - // Single zone. - []*compute.InstanceGroup{&compute.InstanceGroup{ - Name: "ig-name", - Zone: "https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-b", - }}, - `[{"Name":"ig-name","Zone":"https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-b"}]`, - }, - { - // Multiple zones. - []*compute.InstanceGroup{ - &compute.InstanceGroup{ - Name: "ig-name-1", - Zone: "https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-b", - }, - &compute.InstanceGroup{ - Name: "ig-name-2", - Zone: "https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-a", - }, - }, - `[{"Name":"ig-name-1","Zone":"https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-b"},{"Name":"ig-name-2","Zone":"https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-a"}]`, - }, - } - for _, c := range testCases { - annotations := map[string]string{} - err := setInstanceGroupsAnnotation(annotations, c.Igs) - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - if annotations[instanceGroupsAnnotationKey] != c.ExpectedAnnotation { - t.Fatalf("Unexpected annotation value: %s, expected: %s", annotations[instanceGroupsAnnotationKey], c.ExpectedAnnotation) - } - } -} diff --git a/controllers/gce/examples/backside_https/app.yaml b/controllers/gce/examples/backside_https/app.yaml deleted file mode 100644 index 6a01803a7..000000000 --- a/controllers/gce/examples/backside_https/app.yaml +++ /dev/null @@ -1,50 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: my-echo-deploy -spec: - replicas: 2 - template: - metadata: - labels: - app: echo - spec: - containers: - - name: echoserver - image: nicksardo/echoserver:latest - imagePullPolicy: Always - ports: - - name: echo-443 - containerPort: 443 - # readinessProbe: # Health check settings can be retrieved from an HTTPS readinessProbe as well - # httpGet: - # path: /healthcheck # Custom health check path for testing - # scheme: HTTPS - # port: echo-443 ---- -apiVersion: v1 -kind: Service -metadata: - name: my-echo-svc - annotations: - service.alpha.kubernetes.io/app-protocols: '{"my-https-port":"HTTPS"}' # Must map port-name to HTTPS for the GCP ingress controller - labels: - app: echo -spec: - type: NodePort - ports: - - port: 12345 # Port doesn't matter as nodeport is used for Ingress - targetPort: echo-443 - protocol: TCP - name: my-https-port - selector: - app: echo ---- -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: my-echo-ingress -spec: - backend: - serviceName: my-echo-svc - servicePort: my-https-port diff --git a/controllers/gce/examples/health_checks/README.md b/controllers/gce/examples/health_checks/README.md deleted file mode 100644 index e7a4b35bf..000000000 --- a/controllers/gce/examples/health_checks/README.md +++ /dev/null @@ -1,72 +0,0 @@ -# Simple HTTP health check example - -The GCE Ingress controller adopts the readiness probe from the matching endpoints, provided the readiness probe doesn't require special headers. - -Create the following app: -```console -$ kubectl create -f health_check_app.yaml -replicationcontroller "echoheaders" created -You have exposed your service on an external port on all nodes in your -cluster. If you want to expose this service to the external internet, you may -need to set up firewall rules for the service port(s) (tcp:31165) to serve traffic. - -See http://releases.k8s.io/HEAD/docs/user-guide/services-firewalls.md for more details. -service "echoheadersx" created -You have exposed your service on an external port on all nodes in your -cluster. If you want to expose this service to the external internet, you may -need to set up firewall rules for the service port(s) (tcp:31020) to serve traffic. - -See http://releases.k8s.io/HEAD/docs/user-guide/services-firewalls.md for more details. -service "echoheadersy" created -ingress "echomap" created -``` - -You should soon find an Ingress that is backed by a GCE Loadbalancer. - -```console -$ kubectl describe ing echomap -Name: echomap -Namespace: default -Address: 107.178.255.228 -Default backend: default-http-backend:80 (10.180.0.9:8080,10.240.0.2:8080) -Rules: - Host Path Backends - ---- ---- -------- - foo.bar.com - /foo echoheadersx:80 () - bar.baz.com - /bar echoheadersy:80 () - /foo echoheadersx:80 () -Annotations: - target-proxy: k8s-tp-default-echomap--a9d60e8176d933ee - url-map: k8s-um-default-echomap--a9d60e8176d933ee - backends: {"k8s-be-31020--a9d60e8176d933ee":"HEALTHY","k8s-be-31165--a9d60e8176d933ee":"HEALTHY","k8s-be-31686--a9d60e8176d933ee":"HEALTHY"} - forwarding-rule: k8s-fw-default-echomap--a9d60e8176d933ee -Events: - FirstSeen LastSeen Count From SubobjectPath Type Reason Message - --------- -------- ----- ---- ------------- -------- ------ ------- - 17m 17m 1 {loadbalancer-controller } Normal ADD default/echomap - 15m 15m 1 {loadbalancer-controller } Normal CREATE ip: 107.178.255.228 - -$ curl 107.178.255.228/foo -H 'Host:foo.bar.com' -CLIENT VALUES: -client_address=10.240.0.5 -command=GET -real path=/foo -query=nil -request_version=1.1 -request_uri=http://foo.bar.com:8080/foo -... -``` - -You can confirm the health check endpoint point it's using one of 2 ways: -* Through the cloud console: compute > health checks > lookup your health check. It takes the form k8s-be-nodePort-hash, where nodePort in the example above is 31165 and 31020, as shown by the kubectl output. -* Through gcloud: Run `gcloud compute http-health-checks list` - -## Limitations - -A few points to note: -* The readiness probe must be exposed on the port matching the `servicePort` specified in the Ingress -* The readiness probe cannot have special requirements like headers -* The probe timeouts are translated to GCE health check timeouts -* You must create the pods backing the endpoints with the given readiness probe. This *will not* work if you update the replication controller with a different readiness probe. diff --git a/controllers/gce/examples/health_checks/health_check_app.yaml b/controllers/gce/examples/health_checks/health_check_app.yaml deleted file mode 100644 index 9b26cfed7..000000000 --- a/controllers/gce/examples/health_checks/health_check_app.yaml +++ /dev/null @@ -1,100 +0,0 @@ -apiVersion: v1 -kind: ReplicationController -metadata: - name: echoheaders -spec: - replicas: 1 - template: - metadata: - labels: - app: echoheaders - spec: - containers: - - name: echoheaders - image: gcr.io/google_containers/echoserver:1.8 - ports: - - containerPort: 8080 - readinessProbe: - httpGet: - path: /healthz - port: 8080 - periodSeconds: 1 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 10 - env: - - name: NODE_NAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: POD_IP - valueFrom: - fieldRef: - fieldPath: status.podIP - ---- -apiVersion: v1 -kind: Service -metadata: - name: echoheadersx - labels: - app: echoheaders -spec: - type: NodePort - ports: - - port: 80 - targetPort: 8080 - protocol: TCP - name: http - selector: - app: echoheaders ---- -apiVersion: v1 -kind: Service -metadata: - name: echoheadersy - labels: - app: echoheaders -spec: - type: NodePort - ports: - - port: 80 - targetPort: 8080 - protocol: TCP - name: http - selector: - app: echoheaders ---- -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: echomap -spec: - rules: - - host: foo.bar.com - http: - paths: - - path: /foo - backend: - serviceName: echoheadersx - servicePort: 80 - - host: bar.baz.com - http: - paths: - - path: /bar - backend: - serviceName: echoheadersy - servicePort: 80 - - path: /foo - backend: - serviceName: echoheadersx - servicePort: 80 - diff --git a/controllers/gce/examples/https/Makefile b/controllers/gce/examples/https/Makefile deleted file mode 100644 index 75a7b5e6a..000000000 --- a/controllers/gce/examples/https/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -all: - -KEY = /tmp/tls.key -CERT = /tmp/tls.crt -SECRET = /tmp/tls.json -HOST=example.com -NAME=tls-secret - -keys: - # The CName used here is specific to the service specified in nginx-app.yaml. - openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout $(KEY) -out $(CERT) -subj "/CN=$(HOST)/O=$(HOST)" - -secret: - godep go run make_secret.go -crt $(CERT) -key $(KEY) -name $(NAME) > $(SECRET) - -clean: - rm $(KEY) - rm $(CERT) diff --git a/controllers/gce/examples/https/README.md b/controllers/gce/examples/https/README.md deleted file mode 100644 index a58a43086..000000000 --- a/controllers/gce/examples/https/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# Simple TLS example - -Create secret -```console -$ make keys secret -$ kubectl create -f /tmp/tls.json -``` - -Make sure you have the l7 controller running: -```console -$ kubectl --namespace=kube-system get pod -l name=glbc -NAME -l7-lb-controller-v0.6.0-1770t ... -``` -Also make sure you have a [firewall rule](https://github.com/kubernetes/ingress/blob/master/controllers/gce/BETA_LIMITATIONS.md#creating-the-fir-glbc-health-checks) for the node port of the Service. - -Create Ingress -```console -$ kubectl create -f tls-app.yaml -``` diff --git a/controllers/gce/examples/https/make_secret.go b/controllers/gce/examples/https/make_secret.go deleted file mode 100644 index ab3537bd7..000000000 --- a/controllers/gce/examples/https/make_secret.go +++ /dev/null @@ -1,78 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// A small script that converts the given open ssl public/private keys to -// a secret that it writes to stdout as json. Most common use case is to -// create a secret from self signed certificates used to authenticate with -// a devserver. Usage: go run make_secret.go -crt ca.crt -key priv.key > secret.json -package main - -import ( - "flag" - "fmt" - "io/ioutil" - "log" - - api_v1 "k8s.io/api/core/v1" - registered "k8s.io/apimachinery/pkg/apimachinery/registered" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - - // This installs the legacy v1 API - "k8s.io/kubernetes/pkg/api" - _ "k8s.io/kubernetes/pkg/api/install" -) - -// TODO: -// Add a -o flag that writes to the specified destination file. -// Teach the script to create crt and key if -crt and -key aren't specified. -var ( - crt = flag.String("crt", "", "path to tls certificates.") - key = flag.String("key", "", "path to tls private key.") - name = flag.String("name", "tls-secret", "name of the secret.") -) - -func read(file string) []byte { - b, err := ioutil.ReadFile(file) - if err != nil { - log.Fatalf("Cannot read file %v, %v", file, err) - } - return b -} - -func main() { - flag.Parse() - if *crt == "" || *key == "" { - log.Fatalf("Need to specify -crt -key and -template") - } - tlsCrt := read(*crt) - tlsKey := read(*key) - secret := &api_v1.Secret{ - ObjectMeta: meta_v1.ObjectMeta{ - Name: *name, - }, - Data: map[string][]byte{ - api_v1.TLSCertKey: tlsCrt, - api_v1.TLSPrivateKeyKey: tlsKey, - }, - } - - arm, err := registered.NewAPIRegistrationManager("") - if err != nil { - log.Fatalf("%v", err) - } - fmt.Printf(runtime.EncodeOrDie(api.Codecs.LegacyCodec(arm.EnabledVersions()...), secret)) -} diff --git a/controllers/gce/examples/https/tls-app.yaml b/controllers/gce/examples/https/tls-app.yaml deleted file mode 100644 index 7de14d866..000000000 --- a/controllers/gce/examples/https/tls-app.yaml +++ /dev/null @@ -1,46 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: echoheaders-https - labels: - app: echoheaders-https -spec: - type: NodePort - ports: - - port: 80 - targetPort: 8080 - protocol: TCP - name: http - selector: - app: echoheaders-https ---- -apiVersion: v1 -kind: ReplicationController -metadata: - name: echoheaders-https -spec: - replicas: 2 - template: - metadata: - labels: - app: echoheaders-https - spec: - containers: - - name: echoheaders-https - image: gcr.io/google_containers/echoserver:1.3 - ports: - - containerPort: 8080 ---- -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: test -spec: - tls: - # This assumes tls-secret exists. - # To generate it run the make in this directory. - - secretName: tls-secret - backend: - serviceName: echoheaders-https - servicePort: 80 - diff --git a/controllers/gce/examples/websocket/Dockerfile b/controllers/gce/examples/websocket/Dockerfile deleted file mode 100644 index b5e679af2..000000000 --- a/controllers/gce/examples/websocket/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM alpine:3.5 - -COPY wsserver /wsserver - -CMD ["/wsserver"] diff --git a/controllers/gce/examples/websocket/README.md b/controllers/gce/examples/websocket/README.md deleted file mode 100644 index 4edad6cdd..000000000 --- a/controllers/gce/examples/websocket/README.md +++ /dev/null @@ -1,109 +0,0 @@ -# Simple Websocket Example - -Any websocket server will suffice; however, for the purpose of demonstration, we'll use the gorilla/websocket package in a Go process. - -### Build -```shell -➜ CGO_ENABLED=0 go build -o wsserver -``` - -### Containerize -```shell -➜ docker build -t nicksardo/websocketexample . -Sending build context to Docker daemon 6.134 MB -Step 1 : FROM alpine:3.5 - ---> 4a415e366388 -Step 2 : COPY wsserver /wsserver - ---> 8002887d752d -Removing intermediate container 7772a3e76155 -Step 3 : CMD /wsserver - ---> Running in 27c8ff226267 - ---> eecd0574e5d1 -Removing intermediate container 27c8ff226267 -Successfully built eecd0574e5d1 - -➜ docker push nicksardo/websocketexample:latest -... -``` - -### Deploy -Either update the image in the `Deployment` to your newly created image or continue using `nicksardo/websocketexample.` -```shell -➜ vi deployment.yaml -# Change image to your own -``` - -```shell -➜ kubectl create -f deployment.yaml -deployment "ws-example" created -service "ws-example-svc" created -ingress "ws-example-ing" created - -``` - -### Test -Retrieve the ingress external IP: -```shell -➜ kubectl get ing/ws-example-ing -NAME HOSTS ADDRESS PORTS AGE -ws-example-ing * xxx.xxx.xxx.xxx 80 3m -``` - -Wait for the loadbalancer to be created and functioning. When you receive a successful response, you can proceed. -``` -➜ curl http://xxx.xxx.xxx.xxx -Websocket example. Connect to /ws% -``` - -The binary we deployed does not have any html/javascript to demonstrate the websocket, so we'll use websocket.org's client. - -Visit http://www.websocket.org/echo.html. It's important to use `HTTP` instead of `HTTPS` since we assembled an `HTTP` load balancer. Browsers may prevent `HTTP` websocket connections as a security feature. -Set the `Location` to -``` -ws://xxx.xxx.xxx.xxx/ws -``` -Click 'Connect' and you should see messages received from server: -![Log screenshot](http://i.imgur.com/hlwwa0G.png) - - -### Change backend timeout - -At this point, the websocket connection will be destroyed by the HTTP(S) Load Balancer after 30 seconds, which is the default timeout. Note: this timeout is not an idle timeout - it's a timeout on the connection lifetime. - -Currently, the GCE ingress controller does not provide a way to set this timeout via Ingress specification. You'll need to change this value either through the GCP Cloud Console or through gcloud CLI. - - -```shell -➜ kubectl describe ingress/ws-example-ing -Name: ws-example-ing -Namespace: default -Address: xxxxxxxxxxxx -Default backend: ws-example-svc:80 (10.48.10.12:8080,10.48.5.14:8080,10.48.7.11:8080) -Rules: - Host Path Backends - ---- ---- -------- - * * ws-example-svc:80 (10.48.10.12:8080,10.48.5.14:8080,10.48.7.11:8080) -Annotations: - target-proxy: k8s-tp-default-ws-example-ing--52aa8ae8221ffa9c - url-map: k8s-um-default-ws-example-ing--52aa8ae8221ffa9c - backends: {"k8s-be-31127--52aa8ae8221ffa9c":"HEALTHY"} - forwarding-rule: k8s-fw-default-ws-example-ing--52aa8ae8221ffa9c -Events: - FirstSeen LastSeen Count From SubObjectPath Type Reason Message - --------- -------- ----- ---- ------------- -------- ------ ------- - 12m 12m 1 loadbalancer-controller Normal ADD default/ws-example-ing - 11m 11m 1 loadbalancer-controller Normal CREATE ip: xxxxxxxxxxxx - 11m 9m 5 loadbalancer-controller Normal Service default backend set to ws-example-svc:31127 -``` - -Retrieve the name of the backend service from within the annotation section. - -Update the timeout field for every backend that needs a higher timeout. - -```shell -➜ export BACKEND=k8s-be-31127--52aa8ae8221ffa9c -➜ gcloud compute backend-services update $BACKEND --global --timeout=86400 # seconds -Updated [https://www.googleapis.com/compute/v1/projects/xxxxxxxxx/global/backendServices/k8s-be-31127--52aa8ae8221ffa9c]. -``` - -Wait up to twenty minutes for this change to propagate. diff --git a/controllers/gce/examples/websocket/deployment.yaml b/controllers/gce/examples/websocket/deployment.yaml deleted file mode 100644 index e9c9d3917..000000000 --- a/controllers/gce/examples/websocket/deployment.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: ws-example -spec: - replicas: 3 - template: - metadata: - labels: - app: wseg - spec: - containers: - - name: websocketexample - image: nicksardo/websocketexample - imagePullPolicy: Always - ports: - - name: http - containerPort: 8080 - env: - - name: podname - valueFrom: - fieldRef: - fieldPath: metadata.name ---- -apiVersion: v1 -kind: Service -metadata: - name: ws-example-svc - labels: - app: wseg -spec: - type: NodePort - ports: - - port: 80 - targetPort: 8080 - protocol: TCP - selector: - app: wseg ---- -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: ws-example-ing -spec: - backend: - serviceName: ws-example-svc - servicePort: 80 diff --git a/controllers/gce/examples/websocket/server.go b/controllers/gce/examples/websocket/server.go deleted file mode 100644 index 0e9700cab..000000000 --- a/controllers/gce/examples/websocket/server.go +++ /dev/null @@ -1,81 +0,0 @@ -package main - -import ( - "fmt" - "log" - "net/http" - "os" - "time" - - "github.com/gorilla/websocket" -) - -var podName string -var upgrader = websocket.Upgrader{ - CheckOrigin: func(r *http.Request) bool { - return true // Ignore http origin - }, -} - -func init() { - podName = os.Getenv("podname") -} - -func ws(w http.ResponseWriter, r *http.Request) { - log.Println("Received request", r.RemoteAddr) - c, err := upgrader.Upgrade(w, r, nil) - if err != nil { - log.Println("failed to upgrade:", err) - return - } - defer c.Close() - - s := fmt.Sprintf("Connected to %v", podName) - c.WriteMessage(websocket.TextMessage, []byte(s)) - handleWSConn(c) -} - -func handleWSConn(c *websocket.Conn) { - stop := make(chan struct{}) - go func() { - for { - time.Sleep(5 * time.Second) - - select { - case <-stop: - return - default: - } - - s := fmt.Sprintf("%s reports time: %v", podName, time.Now().String()) - c.WriteMessage(websocket.TextMessage, []byte(s)) - } - }() - for { - mt, message, err := c.ReadMessage() - if err != nil { - log.Println("Error while reading:", err) - break - } - if err = c.WriteMessage(mt, message); err != nil { - log.Println("Error while writing:", err) - break - } - } - close(stop) -} - -func root(w http.ResponseWriter, r *http.Request) { - if r.URL.Path != "/" { - http.NotFound(w, r) - return - } - w.Write([]byte(`Websocket example. Connect to /ws`)) -} - -func main() { - log.Println("Starting") - http.HandleFunc("/ws", ws) - http.HandleFunc("/", root) - log.Fatal(http.ListenAndServe(":8080", nil)) -} diff --git a/controllers/gce/firewalls/fakes.go b/controllers/gce/firewalls/fakes.go deleted file mode 100644 index 8ee43ad3b..000000000 --- a/controllers/gce/firewalls/fakes.go +++ /dev/null @@ -1,83 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package firewalls - -import ( - "fmt" - - compute "google.golang.org/api/compute/v1" - - "k8s.io/ingress/controllers/gce/utils" -) - -type fakeFirewallsProvider struct { - fw map[string]*compute.Firewall - networkUrl string -} - -// NewFakeFirewallsProvider creates a fake for firewall rules. -func NewFakeFirewallsProvider() *fakeFirewallsProvider { - return &fakeFirewallsProvider{ - fw: make(map[string]*compute.Firewall), - } -} - -func (ff *fakeFirewallsProvider) GetFirewall(name string) (*compute.Firewall, error) { - rule, exists := ff.fw[name] - if exists { - return rule, nil - } - return nil, utils.FakeGoogleAPINotFoundErr() -} - -func (ff *fakeFirewallsProvider) CreateFirewall(f *compute.Firewall) error { - if _, exists := ff.fw[f.Name]; exists { - return fmt.Errorf("firewall rule %v already exists", f.Name) - } - ff.fw[f.Name] = f - return nil -} - -func (ff *fakeFirewallsProvider) DeleteFirewall(name string) error { - // We need the full name for the same reason as CreateFirewall. - _, exists := ff.fw[name] - if !exists { - return utils.FakeGoogleAPINotFoundErr() - } - - delete(ff.fw, name) - return nil -} - -func (ff *fakeFirewallsProvider) UpdateFirewall(f *compute.Firewall) error { - // We need the full name for the same reason as CreateFirewall. - _, exists := ff.fw[f.Name] - if !exists { - return fmt.Errorf("update failed for rule %v, srcRange %v ports %+v, rule not found", f.Name, f.SourceRanges, f.Allowed) - } - - ff.fw[f.Name] = f - return nil -} - -func (ff *fakeFirewallsProvider) NetworkURL() string { - return ff.networkUrl -} - -func (ff *fakeFirewallsProvider) GetNodeTags(nodeNames []string) ([]string, error) { - return nodeNames, nil -} diff --git a/controllers/gce/firewalls/firewalls.go b/controllers/gce/firewalls/firewalls.go deleted file mode 100644 index a8aceca39..000000000 --- a/controllers/gce/firewalls/firewalls.go +++ /dev/null @@ -1,143 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package firewalls - -import ( - "strconv" - - "github.com/golang/glog" - - compute "google.golang.org/api/compute/v1" - "k8s.io/apimachinery/pkg/util/sets" - netset "k8s.io/kubernetes/pkg/util/net/sets" - - "k8s.io/ingress/controllers/gce/utils" -) - -// Src ranges from which the GCE L7 performs health checks. -var l7SrcRanges = []string{"130.211.0.0/22", "35.191.0.0/16"} - -// FirewallRules manages firewall rules. -type FirewallRules struct { - cloud Firewall - namer *utils.Namer - srcRanges []string -} - -// NewFirewallPool creates a new firewall rule manager. -// cloud: the cloud object implementing Firewall. -// namer: cluster namer. -func NewFirewallPool(cloud Firewall, namer *utils.Namer) SingleFirewallPool { - _, err := netset.ParseIPNets(l7SrcRanges...) - if err != nil { - glog.Fatalf("Could not parse L7 src ranges %v for firewall rule: %v", l7SrcRanges, err) - } - return &FirewallRules{cloud: cloud, namer: namer, srcRanges: l7SrcRanges} -} - -// Sync sync firewall rules with the cloud. -func (fr *FirewallRules) Sync(nodePorts []int64, nodeNames []string) error { - if len(nodePorts) == 0 { - return fr.Shutdown() - } - // Firewall rule prefix must match that inserted by the gce library. - suffix := fr.namer.FrSuffix() - // TODO: Fix upstream gce cloudprovider lib so GET also takes the suffix - // instead of the whole name. - name := fr.namer.FrName(suffix) - rule, _ := fr.cloud.GetFirewall(name) - - firewall, err := fr.createFirewallObject(name, "GCE L7 firewall rule", nodePorts, nodeNames) - if err != nil { - return err - } - - if rule == nil { - glog.Infof("Creating global l7 firewall rule %v", name) - return fr.cloud.CreateFirewall(firewall) - } - - requiredPorts := sets.NewString() - for _, p := range nodePorts { - requiredPorts.Insert(strconv.Itoa(int(p))) - } - existingPorts := sets.NewString() - for _, allowed := range rule.Allowed { - for _, p := range allowed.Ports { - existingPorts.Insert(p) - } - } - - requiredCIDRs := sets.NewString(l7SrcRanges...) - existingCIDRs := sets.NewString(rule.SourceRanges...) - - // Do not update if ports and source cidrs are not outdated. - // NOTE: We are not checking if nodeNames matches the firewall targetTags - if requiredPorts.Equal(existingPorts) && requiredCIDRs.Equal(existingCIDRs) { - glog.V(4).Info("Firewall does not need update of ports or source ranges") - return nil - } - glog.V(3).Infof("Firewall %v already exists, updating nodeports %v", name, nodePorts) - return fr.cloud.UpdateFirewall(firewall) -} - -// Shutdown shuts down this firewall rules manager. -func (fr *FirewallRules) Shutdown() error { - name := fr.namer.FrName(fr.namer.FrSuffix()) - glog.Infof("Deleting firewall %v", name) - err := fr.cloud.DeleteFirewall(name) - if err != nil && utils.IsHTTPErrorCode(err, 404) { - glog.Infof("Firewall with name %v didn't exist at Shutdown", name) - return nil - } - return err -} - -// GetFirewall just returns the firewall object corresponding to the given name. -// TODO: Currently only used in testing. Modify so we don't leak compute -// objects out of this interface by returning just the (src, ports, error). -func (fr *FirewallRules) GetFirewall(name string) (*compute.Firewall, error) { - return fr.cloud.GetFirewall(name) -} - -func (fr *FirewallRules) createFirewallObject(firewallName, description string, nodePorts []int64, nodeNames []string) (*compute.Firewall, error) { - ports := make([]string, len(nodePorts)) - for ix := range nodePorts { - ports[ix] = strconv.Itoa(int(nodePorts[ix])) - } - - // If the node tags to be used for this cluster have been predefined in the - // provider config, just use them. Otherwise, invoke computeHostTags method to get the tags. - targetTags, err := fr.cloud.GetNodeTags(nodeNames) - if err != nil { - return nil, err - } - - return &compute.Firewall{ - Name: firewallName, - Description: description, - SourceRanges: fr.srcRanges, - Network: fr.cloud.NetworkURL(), - Allowed: []*compute.FirewallAllowed{ - { - IPProtocol: "tcp", - Ports: ports, - }, - }, - TargetTags: targetTags, - }, nil -} diff --git a/controllers/gce/firewalls/firewalls_test.go b/controllers/gce/firewalls/firewalls_test.go deleted file mode 100644 index 484ad90be..000000000 --- a/controllers/gce/firewalls/firewalls_test.go +++ /dev/null @@ -1,111 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package firewalls - -import ( - "strconv" - "testing" - - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/ingress/controllers/gce/utils" -) - -func TestSyncFirewallPool(t *testing.T) { - namer := utils.NewNamer("ABC", "XYZ") - fwp := NewFakeFirewallsProvider() - fp := NewFirewallPool(fwp, namer) - ruleName := namer.FrName(namer.FrSuffix()) - - // Test creating a firewall rule via Sync - nodePorts := []int64{80, 443, 3000} - nodes := []string{"node-a", "node-b", "node-c"} - err := fp.Sync(nodePorts, nodes) - if err != nil { - t.Errorf("unexpected err when syncing firewall, err: %v", err) - } - verifyFirewallRule(fwp, ruleName, nodePorts, nodes, l7SrcRanges, t) - - // Sync to fewer ports - nodePorts = []int64{80, 443} - err = fp.Sync(nodePorts, nodes) - if err != nil { - t.Errorf("unexpected err when syncing firewall, err: %v", err) - } - verifyFirewallRule(fwp, ruleName, nodePorts, nodes, l7SrcRanges, t) - - firewall, err := fp.(*FirewallRules).createFirewallObject(namer.FrName(namer.FrSuffix()), "", nodePorts, nodes) - if err != nil { - t.Errorf("unexpected err when creating firewall object, err: %v", err) - } - - err = fwp.UpdateFirewall(firewall) - if err != nil { - t.Errorf("failed to update firewall rule, err: %v", err) - } - verifyFirewallRule(fwp, ruleName, nodePorts, nodes, l7SrcRanges, t) - - // Run Sync and expect l7 src ranges to be returned - err = fp.Sync(nodePorts, nodes) - if err != nil { - t.Errorf("unexpected err when syncing firewall, err: %v", err) - } - verifyFirewallRule(fwp, ruleName, nodePorts, nodes, l7SrcRanges, t) - - // Add node and expect firewall to remain the same - // NOTE: See computeHostTag(..) in gce cloudprovider - nodes = []string{"node-a", "node-b", "node-c", "node-d"} - err = fp.Sync(nodePorts, nodes) - if err != nil { - t.Errorf("unexpected err when syncing firewall, err: %v", err) - } - verifyFirewallRule(fwp, ruleName, nodePorts, nodes, l7SrcRanges, t) - - // Remove all ports and expect firewall rule to disappear - nodePorts = []int64{} - err = fp.Sync(nodePorts, nodes) - if err != nil { - t.Errorf("unexpected err when syncing firewall, err: %v", err) - } - - err = fp.Shutdown() - if err != nil { - t.Errorf("unexpected err when deleting firewall, err: %v", err) - } -} - -func verifyFirewallRule(fwp *fakeFirewallsProvider, ruleName string, expectedPorts []int64, expectedNodes, expectedCIDRs []string, t *testing.T) { - var strPorts []string - for _, v := range expectedPorts { - strPorts = append(strPorts, strconv.FormatInt(v, 10)) - } - - // Verify firewall rule was created - f, err := fwp.GetFirewall(ruleName) - if err != nil { - t.Errorf("could not retrieve firewall via cloud api, err %v", err) - } - - // Verify firewall rule has correct ports - if !sets.NewString(f.Allowed[0].Ports...).Equal(sets.NewString(strPorts...)) { - t.Errorf("allowed ports doesn't equal expected ports, Actual: %v, Expected: %v", f.Allowed[0].Ports, strPorts) - } - - // Verify firewall rule has correct CIDRs - if !sets.NewString(f.SourceRanges...).Equal(sets.NewString(expectedCIDRs...)) { - t.Errorf("source CIDRs doesn't equal expected CIDRs. Actual: %v, Expected: %v", f.SourceRanges, expectedCIDRs) - } -} diff --git a/controllers/gce/firewalls/interfaces.go b/controllers/gce/firewalls/interfaces.go deleted file mode 100644 index 97fc6a74d..000000000 --- a/controllers/gce/firewalls/interfaces.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package firewalls - -import ( - compute "google.golang.org/api/compute/v1" -) - -// SingleFirewallPool syncs the firewall rule for L7 traffic. -type SingleFirewallPool interface { - // TODO: Take a list of node ports for the firewall. - Sync(nodePorts []int64, nodeNames []string) error - Shutdown() error -} - -// Firewall interfaces with the GCE firewall api. -// This interface is a little different from the rest because it dovetails into -// the same firewall methods used by the TCPLoadBalancer. -type Firewall interface { - CreateFirewall(f *compute.Firewall) error - GetFirewall(name string) (*compute.Firewall, error) - DeleteFirewall(name string) error - UpdateFirewall(f *compute.Firewall) error - GetNodeTags(nodeNames []string) ([]string, error) - NetworkURL() string -} diff --git a/controllers/gce/healthchecks/fakes.go b/controllers/gce/healthchecks/fakes.go deleted file mode 100644 index 013e3bf26..000000000 --- a/controllers/gce/healthchecks/fakes.go +++ /dev/null @@ -1,114 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package healthchecks - -import ( - compute "google.golang.org/api/compute/v1" - "google.golang.org/api/googleapi" -) - -func fakeNotFoundErr() *googleapi.Error { - return &googleapi.Error{Code: 404} -} - -// NewFakeHealthCheckProvider returns a new FakeHealthChecks. -func NewFakeHealthCheckProvider() *FakeHealthCheckProvider { - return &FakeHealthCheckProvider{ - http: make(map[string]compute.HttpHealthCheck), - generic: make(map[string]compute.HealthCheck), - } -} - -// FakeHealthCheckProvider fakes out health checks. -type FakeHealthCheckProvider struct { - http map[string]compute.HttpHealthCheck - generic map[string]compute.HealthCheck -} - -// CreateHttpHealthCheck fakes out http health check creation. -func (f *FakeHealthCheckProvider) CreateHttpHealthCheck(hc *compute.HttpHealthCheck) error { - v := *hc - v.SelfLink = "https://fake.google.com/compute/httpHealthChecks/" + hc.Name - f.http[hc.Name] = v - return nil -} - -// GetHttpHealthCheck fakes out getting a http health check from the cloud. -func (f *FakeHealthCheckProvider) GetHttpHealthCheck(name string) (*compute.HttpHealthCheck, error) { - if hc, found := f.http[name]; found { - return &hc, nil - } - - return nil, fakeNotFoundErr() -} - -// DeleteHttpHealthCheck fakes out deleting a http health check. -func (f *FakeHealthCheckProvider) DeleteHttpHealthCheck(name string) error { - if _, exists := f.http[name]; !exists { - return fakeNotFoundErr() - } - - delete(f.http, name) - return nil -} - -// UpdateHttpHealthCheck sends the given health check as an update. -func (f *FakeHealthCheckProvider) UpdateHttpHealthCheck(hc *compute.HttpHealthCheck) error { - if _, exists := f.http[hc.Name]; !exists { - return fakeNotFoundErr() - } - - f.http[hc.Name] = *hc - return nil -} - -// CreateHealthCheck fakes out http health check creation. -func (f *FakeHealthCheckProvider) CreateHealthCheck(hc *compute.HealthCheck) error { - v := *hc - v.SelfLink = "https://fake.google.com/compute/healthChecks/" + hc.Name - f.generic[hc.Name] = v - return nil -} - -// GetHealthCheck fakes out getting a http health check from the cloud. -func (f *FakeHealthCheckProvider) GetHealthCheck(name string) (*compute.HealthCheck, error) { - if hc, found := f.generic[name]; found { - return &hc, nil - } - - return nil, fakeNotFoundErr() -} - -// DeleteHealthCheck fakes out deleting a http health check. -func (f *FakeHealthCheckProvider) DeleteHealthCheck(name string) error { - if _, exists := f.generic[name]; !exists { - return fakeNotFoundErr() - } - - delete(f.generic, name) - return nil -} - -// UpdateHealthCheck sends the given health check as an update. -func (f *FakeHealthCheckProvider) UpdateHealthCheck(hc *compute.HealthCheck) error { - if _, exists := f.generic[hc.Name]; !exists { - return fakeNotFoundErr() - } - - f.generic[hc.Name] = *hc - return nil -} diff --git a/controllers/gce/healthchecks/healthchecks.go b/controllers/gce/healthchecks/healthchecks.go deleted file mode 100644 index b150f2f2a..000000000 --- a/controllers/gce/healthchecks/healthchecks.go +++ /dev/null @@ -1,223 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package healthchecks - -import ( - "net/http" - "time" - - compute "google.golang.org/api/compute/v1" - - "github.com/golang/glog" - - "k8s.io/ingress/controllers/gce/utils" -) - -const ( - // These values set a low health threshold and a high failure threshold. - // We're just trying to detect if the node networking is - // borked, service level outages will get detected sooner - // by kube-proxy. - // DefaultHealthCheckInterval defines how frequently a probe runs - DefaultHealthCheckInterval = 60 * time.Second - // DefaultHealthyThreshold defines the threshold of success probes that declare a backend "healthy" - DefaultHealthyThreshold = 1 - // DefaultUnhealthyThreshold defines the threshold of failure probes that declare a backend "unhealthy" - DefaultUnhealthyThreshold = 10 - // DefaultTimeout defines the timeout of each probe - DefaultTimeout = 60 * time.Second -) - -// HealthChecks manages health checks. -type HealthChecks struct { - cloud HealthCheckProvider - defaultPath string - namer *utils.Namer -} - -// NewHealthChecker creates a new health checker. -// cloud: the cloud object implementing SingleHealthCheck. -// defaultHealthCheckPath: is the HTTP path to use for health checks. -func NewHealthChecker(cloud HealthCheckProvider, defaultHealthCheckPath string, namer *utils.Namer) HealthChecker { - return &HealthChecks{cloud, defaultHealthCheckPath, namer} -} - -// New returns a *HealthCheck with default settings and specified port/protocol -func (h *HealthChecks) New(port int64, protocol utils.AppProtocol) *HealthCheck { - hc := DefaultHealthCheck(port, protocol) - hc.Name = h.namer.BeName(port) - return hc -} - -// Sync retrieves a health check based on port, checks type and settings and updates/creates if necessary. -// Sync is only called by the backends.Add func - it's not a pool like other resources. -func (h *HealthChecks) Sync(hc *HealthCheck) (string, error) { - // Verify default path - if hc.RequestPath == "" { - hc.RequestPath = h.defaultPath - } - - existingHC, err := h.Get(hc.Port) - if err != nil { - if !utils.IsHTTPErrorCode(err, http.StatusNotFound) { - return "", err - } - - glog.V(2).Infof("Creating health check for port %v with protocol %v", hc.Port, hc.Type) - if err = h.cloud.CreateHealthCheck(hc.ToComputeHealthCheck()); err != nil { - return "", err - } - - return h.getHealthCheckLink(hc.Port) - } - - if existingHC.Protocol() != hc.Protocol() { - glog.V(2).Infof("Updating health check %v because it has protocol %v but need %v", existingHC.Name, existingHC.Type, hc.Type) - err = h.cloud.UpdateHealthCheck(hc.ToComputeHealthCheck()) - return existingHC.SelfLink, err - } - - if existingHC.RequestPath != hc.RequestPath { - // TODO: reconcile health checks, and compare headers interval etc. - // Currently Ingress doesn't expose all the health check params - // natively, so some users prefer to hand modify the check. - glog.V(2).Infof("Unexpected request path on health check %v, has %v want %v, NOT reconciling", hc.Name, existingHC.RequestPath, hc.RequestPath) - } else { - glog.V(2).Infof("Health check %v already exists and has the expected path %v", hc.Name, hc.RequestPath) - } - - return existingHC.SelfLink, nil -} - -func (h *HealthChecks) getHealthCheckLink(port int64) (string, error) { - hc, err := h.Get(port) - if err != nil { - return "", err - } - return hc.SelfLink, nil -} - -// Delete deletes the health check by port. -func (h *HealthChecks) Delete(port int64) error { - name := h.namer.BeName(port) - glog.V(2).Infof("Deleting health check %v", name) - return h.cloud.DeleteHealthCheck(name) -} - -// Get returns the health check by port -func (h *HealthChecks) Get(port int64) (*HealthCheck, error) { - name := h.namer.BeName(port) - hc, err := h.cloud.GetHealthCheck(name) - return NewHealthCheck(hc), err -} - -// GetLegacy deletes legacy HTTP health checks -func (h *HealthChecks) GetLegacy(port int64) (*compute.HttpHealthCheck, error) { - name := h.namer.BeName(port) - return h.cloud.GetHttpHealthCheck(name) -} - -// DeleteLegacy deletes legacy HTTP health checks -func (h *HealthChecks) DeleteLegacy(port int64) error { - name := h.namer.BeName(port) - glog.V(2).Infof("Deleting legacy HTTP health check %v", name) - return h.cloud.DeleteHttpHealthCheck(name) -} - -// DefaultHealthCheck simply returns the default health check. -func DefaultHealthCheck(port int64, protocol utils.AppProtocol) *HealthCheck { - httpSettings := compute.HTTPHealthCheck{ - Port: port, - // Empty string is used as a signal to the caller to use the appropriate - // default. - RequestPath: "", - } - - hcSettings := compute.HealthCheck{ - // How often to health check. - CheckIntervalSec: int64(DefaultHealthCheckInterval.Seconds()), - // How long to wait before claiming failure of a health check. - TimeoutSec: int64(DefaultTimeout.Seconds()), - // Number of healthchecks to pass for a vm to be deemed healthy. - HealthyThreshold: DefaultHealthyThreshold, - // Number of healthchecks to fail before the vm is deemed unhealthy. - UnhealthyThreshold: DefaultUnhealthyThreshold, - Description: "Default kubernetes L7 Loadbalancing health check.", - Type: string(protocol), - } - - return &HealthCheck{ - HTTPHealthCheck: httpSettings, - HealthCheck: hcSettings, - } -} - -// HealthCheck embeds two types - the generic healthcheck compute.HealthCheck -// and the HTTP settings compute.HTTPHealthCheck. By embedding both, consumers can modify -// all relevant settings (HTTP specific and HealthCheck generic) regardless of Type -// Consumers should call .Out() func to generate a compute.HealthCheck -// with the proper child struct (.HttpHealthCheck, .HttpshealthCheck, etc). -type HealthCheck struct { - compute.HTTPHealthCheck - compute.HealthCheck -} - -// NewHealthCheck creates a HealthCheck which abstracts nested structs away -func NewHealthCheck(hc *compute.HealthCheck) *HealthCheck { - if hc == nil { - return nil - } - - v := &HealthCheck{HealthCheck: *hc} - switch utils.AppProtocol(hc.Type) { - case utils.ProtocolHTTP: - v.HTTPHealthCheck = *hc.HttpHealthCheck - case utils.ProtocolHTTPS: - // HTTPHealthCheck and HTTPSHealthChecks have identical fields - v.HTTPHealthCheck = compute.HTTPHealthCheck(*hc.HttpsHealthCheck) - } - - // Users should be modifying HTTP(S) specific settings on the embedded - // HTTPHealthCheck. Setting these to nil for preventing confusion. - v.HealthCheck.HttpHealthCheck = nil - v.HealthCheck.HttpsHealthCheck = nil - - return v -} - -// Protocol returns the type cased to AppProtocol -func (hc *HealthCheck) Protocol() utils.AppProtocol { - return utils.AppProtocol(hc.Type) -} - -// ToComputeHealthCheck returns a valid compute.HealthCheck object -func (hc *HealthCheck) ToComputeHealthCheck() *compute.HealthCheck { - // Zeroing out child settings as a precaution. GoogleAPI throws an error - // if the wrong child struct is set. - hc.HealthCheck.HttpsHealthCheck = nil - hc.HealthCheck.HttpHealthCheck = nil - - switch hc.Protocol() { - case utils.ProtocolHTTP: - hc.HealthCheck.HttpHealthCheck = &hc.HTTPHealthCheck - case utils.ProtocolHTTPS: - https := compute.HTTPSHealthCheck(hc.HTTPHealthCheck) - hc.HealthCheck.HttpsHealthCheck = &https - } - - return &hc.HealthCheck -} diff --git a/controllers/gce/healthchecks/healthchecks_test.go b/controllers/gce/healthchecks/healthchecks_test.go deleted file mode 100644 index 0f6abc358..000000000 --- a/controllers/gce/healthchecks/healthchecks_test.go +++ /dev/null @@ -1,186 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package healthchecks - -import ( - "net/http" - "testing" - - compute "google.golang.org/api/compute/v1" - - "k8s.io/ingress/controllers/gce/utils" -) - -func TestHealthCheckAdd(t *testing.T) { - namer := utils.NewNamer("ABC", "XYZ") - hcp := NewFakeHealthCheckProvider() - healthChecks := NewHealthChecker(hcp, "/", namer) - - hc := healthChecks.New(80, utils.ProtocolHTTP) - _, err := healthChecks.Sync(hc) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - // Verify the health check exists - _, err = hcp.GetHealthCheck(namer.BeName(80)) - if err != nil { - t.Fatalf("expected the health check to exist, err: %v", err) - } - - hc = healthChecks.New(443, utils.ProtocolHTTPS) - _, err = healthChecks.Sync(hc) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - // Verify the health check exists - _, err = hcp.GetHealthCheck(namer.BeName(443)) - if err != nil { - t.Fatalf("expected the health check to exist, err: %v", err) - } -} - -func TestHealthCheckAddExisting(t *testing.T) { - namer := &utils.Namer{} - hcp := NewFakeHealthCheckProvider() - healthChecks := NewHealthChecker(hcp, "/", namer) - - // HTTP - // Manually insert a health check - httpHC := DefaultHealthCheck(3000, utils.ProtocolHTTP) - httpHC.Name = namer.BeName(3000) - httpHC.RequestPath = "/my-probes-health" - hcp.CreateHealthCheck(httpHC.ToComputeHealthCheck()) - - // Should not fail adding the same type of health check - hc := healthChecks.New(3000, utils.ProtocolHTTP) - _, err := healthChecks.Sync(hc) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - // Verify the health check exists - _, err = hcp.GetHealthCheck(httpHC.Name) - if err != nil { - t.Fatalf("expected the health check to continue existing, err: %v", err) - } - - // HTTPS - // Manually insert a health check - httpsHC := DefaultHealthCheck(4000, utils.ProtocolHTTPS) - httpsHC.Name = namer.BeName(4000) - httpsHC.RequestPath = "/my-probes-health" - hcp.CreateHealthCheck(httpsHC.ToComputeHealthCheck()) - - hc = healthChecks.New(4000, utils.ProtocolHTTPS) - _, err = healthChecks.Sync(hc) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - // Verify the health check exists - _, err = hcp.GetHealthCheck(httpsHC.Name) - if err != nil { - t.Fatalf("expected the health check to continue existing, err: %v", err) - } -} - -func TestHealthCheckDelete(t *testing.T) { - namer := &utils.Namer{} - hcp := NewFakeHealthCheckProvider() - healthChecks := NewHealthChecker(hcp, "/", namer) - - // Create HTTP HC for 1234 - hc := DefaultHealthCheck(1234, utils.ProtocolHTTP) - hc.Name = namer.BeName(1234) - hcp.CreateHealthCheck(hc.ToComputeHealthCheck()) - - // Create HTTPS HC for 1234) - hc.Type = string(utils.ProtocolHTTPS) - hcp.CreateHealthCheck(hc.ToComputeHealthCheck()) - - // Delete only HTTP 1234 - err := healthChecks.Delete(1234) - if err != nil { - t.Errorf("unexpected error when deleting health check, err: %v", err) - } - - // Validate port is deleted - _, err = hcp.GetHealthCheck(hc.Name) - if !utils.IsHTTPErrorCode(err, http.StatusNotFound) { - t.Errorf("expected not-found error, actual: %v", err) - } - - // Delete only HTTP 1234 - err = healthChecks.Delete(1234) - if err == nil { - t.Errorf("expected not-found error when deleting health check, err: %v", err) - } -} - -func TestHealthCheckUpdate(t *testing.T) { - namer := &utils.Namer{} - hcp := NewFakeHealthCheckProvider() - healthChecks := NewHealthChecker(hcp, "/", namer) - - // HTTP - // Manually insert a health check - hc := DefaultHealthCheck(3000, utils.ProtocolHTTP) - hc.Name = namer.BeName(3000) - hc.RequestPath = "/my-probes-health" - hcp.CreateHealthCheck(hc.ToComputeHealthCheck()) - - // Verify the health check exists - _, err := healthChecks.Get(3000) - if err != nil { - t.Fatalf("expected the health check to exist, err: %v", err) - } - - // Change to HTTPS - hc.Type = string(utils.ProtocolHTTPS) - _, err = healthChecks.Sync(hc) - if err != nil { - t.Fatalf("unexpected err while syncing healthcheck, err %v", err) - } - - // Verify the health check exists - _, err = healthChecks.Get(3000) - if err != nil { - t.Fatalf("expected the health check to exist, err: %v", err) - } - - // Verify the check is now HTTPS - if hc.Protocol() != utils.ProtocolHTTPS { - t.Fatalf("expected check to be of type HTTPS") - } -} - -func TestHealthCheckDeleteLegacy(t *testing.T) { - namer := &utils.Namer{} - hcp := NewFakeHealthCheckProvider() - healthChecks := NewHealthChecker(hcp, "/", namer) - - err := hcp.CreateHttpHealthCheck(&compute.HttpHealthCheck{ - Name: namer.BeName(80), - }) - if err != nil { - t.Fatalf("expected health check to be created, err: %v", err) - } - - err = healthChecks.DeleteLegacy(80) - if err != nil { - t.Fatalf("expected health check to be deleted, err: %v", err) - } - -} diff --git a/controllers/gce/healthchecks/interfaces.go b/controllers/gce/healthchecks/interfaces.go deleted file mode 100644 index e63f1f491..000000000 --- a/controllers/gce/healthchecks/interfaces.go +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package healthchecks - -import ( - compute "google.golang.org/api/compute/v1" - - "k8s.io/ingress/controllers/gce/utils" -) - -// HealthCheckProvider is an interface to manage a single GCE health check. -type HealthCheckProvider interface { - CreateHttpHealthCheck(hc *compute.HttpHealthCheck) error - UpdateHttpHealthCheck(hc *compute.HttpHealthCheck) error - DeleteHttpHealthCheck(name string) error - GetHttpHealthCheck(name string) (*compute.HttpHealthCheck, error) - - CreateHealthCheck(hc *compute.HealthCheck) error - UpdateHealthCheck(hc *compute.HealthCheck) error - DeleteHealthCheck(name string) error - GetHealthCheck(name string) (*compute.HealthCheck, error) -} - -// HealthChecker is an interface to manage cloud HTTPHealthChecks. -type HealthChecker interface { - New(port int64, protocol utils.AppProtocol) *HealthCheck - Sync(hc *HealthCheck) (string, error) - Delete(port int64) error - Get(port int64) (*HealthCheck, error) - GetLegacy(port int64) (*compute.HttpHealthCheck, error) - DeleteLegacy(port int64) error -} diff --git a/controllers/gce/ingress-app.yaml b/controllers/gce/ingress-app.yaml deleted file mode 100644 index b9b3ade51..000000000 --- a/controllers/gce/ingress-app.yaml +++ /dev/null @@ -1,105 +0,0 @@ -# This Service writes the HTTP request headers out to the response. Access it -# through its NodePort, LoadBalancer or Ingress endpoint. -apiVersion: v1 -kind: Service -metadata: - name: echoheadersx - labels: - app: echoheaders -spec: - type: NodePort - ports: - - port: 80 - nodePort: 30301 - targetPort: 8080 - protocol: TCP - name: http - selector: - app: echoheaders ---- -apiVersion: v1 -kind: Service -metadata: - name: echoheadersy - labels: - app: echoheaders -spec: - type: NodePort - ports: - - port: 80 - nodePort: 30284 - targetPort: 8080 - protocol: TCP - name: http - selector: - app: echoheaders ---- -# This is a replication controller for the endpoint that services the 3 -# Services above. -apiVersion: v1 -kind: ReplicationController -metadata: - name: echoheaders -spec: - replicas: 1 - template: - metadata: - labels: - app: echoheaders - spec: - containers: - - name: echoheaders - image: gcr.io/google_containers/echoserver:1.8 - ports: - - containerPort: 8080 - env: - - name: NODE_NAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: POD_IP - valueFrom: - fieldRef: - fieldPath: status.podIP - ---- -# This is the Ingress resource that creates a HTTP Loadbalancer configured -# according to the Ingress rules. -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: echomap -spec: - backend: - # Re-use echoheadersx as the default backend so we stay under the default - # quota for gce BackendServices. - serviceName: echoheadersx - servicePort: 80 - rules: - - host: foo.bar.com - http: - paths: - - path: /foo - backend: - serviceName: echoheadersx - servicePort: 80 - - host: bar.baz.com - http: - paths: - - path: /bar - backend: - serviceName: echoheadersy - servicePort: 80 - - path: /foo - backend: - serviceName: echoheadersx - servicePort: 80 - diff --git a/controllers/gce/instances/fakes.go b/controllers/gce/instances/fakes.go deleted file mode 100644 index ca42f57fd..000000000 --- a/controllers/gce/instances/fakes.go +++ /dev/null @@ -1,204 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package instances - -import ( - "fmt" - "strings" - - compute "google.golang.org/api/compute/v1" - "k8s.io/apimachinery/pkg/util/sets" - - "k8s.io/ingress/controllers/gce/utils" -) - -// NewFakeInstanceGroups creates a new FakeInstanceGroups. -func NewFakeInstanceGroups(nodes sets.String) *FakeInstanceGroups { - return &FakeInstanceGroups{ - instances: nodes, - listResult: getInstanceList(nodes), - namer: utils.Namer{}, - zonesToInstances: map[string][]string{}, - } -} - -// InstanceGroup fakes - -// FakeZoneLister records zones for nodes. -type FakeZoneLister struct { - Zones []string -} - -// ListZones returns the list of zones. -func (z *FakeZoneLister) ListZones() ([]string, error) { - return z.Zones, nil -} - -// GetZoneForNode returns the only zone stored in the fake zone lister. -func (z *FakeZoneLister) GetZoneForNode(name string) (string, error) { - // TODO: evolve as required, it's currently needed just to satisfy the - // interface in unittests that don't care about zones. See unittests in - // controller/util_test for actual zoneLister testing. - return z.Zones[0], nil -} - -// FakeInstanceGroups fakes out the instance groups api. -type FakeInstanceGroups struct { - instances sets.String - instanceGroups []*compute.InstanceGroup - getResult *compute.InstanceGroup - listResult *compute.InstanceGroupsListInstances - calls []int - namer utils.Namer - zonesToInstances map[string][]string -} - -// GetInstanceGroup fakes getting an instance group from the cloud. -func (f *FakeInstanceGroups) GetInstanceGroup(name, zone string) (*compute.InstanceGroup, error) { - f.calls = append(f.calls, utils.Get) - for _, ig := range f.instanceGroups { - if ig.Name == name && ig.Zone == zone { - return ig, nil - } - } - - return nil, utils.FakeGoogleAPINotFoundErr() -} - -// CreateInstanceGroup fakes instance group creation. -func (f *FakeInstanceGroups) CreateInstanceGroup(ig *compute.InstanceGroup, zone string) error { - ig.SelfLink = ig.Name - ig.Zone = zone - f.instanceGroups = append(f.instanceGroups, ig) - return nil -} - -// DeleteInstanceGroup fakes instance group deletion. -func (f *FakeInstanceGroups) DeleteInstanceGroup(name, zone string) error { - newGroups := []*compute.InstanceGroup{} - found := false - for _, ig := range f.instanceGroups { - if ig.Name == name { - found = true - continue - } - newGroups = append(newGroups, ig) - } - if !found { - return fmt.Errorf("instance group %v not found", name) - } - f.instanceGroups = newGroups - return nil -} - -// ListInstancesInInstanceGroup fakes listing instances in an instance group. -func (f *FakeInstanceGroups) ListInstancesInInstanceGroup(name, zone string, state string) (*compute.InstanceGroupsListInstances, error) { - return f.listResult, nil -} - -// AddInstancesToInstanceGroup fakes adding instances to an instance group. -func (f *FakeInstanceGroups) AddInstancesToInstanceGroup(name, zone string, instanceRefs []*compute.InstanceReference) error { - instanceNames := toInstanceNames(instanceRefs) - f.calls = append(f.calls, utils.AddInstances) - f.instances.Insert(instanceNames...) - if _, ok := f.zonesToInstances[zone]; !ok { - f.zonesToInstances[zone] = []string{} - } - f.zonesToInstances[zone] = append(f.zonesToInstances[zone], instanceNames...) - return nil -} - -// GetInstancesByZone returns the zone to instances map. -func (f *FakeInstanceGroups) GetInstancesByZone() map[string][]string { - return f.zonesToInstances -} - -// RemoveInstancesFromInstanceGroup fakes removing instances from an instance group. -func (f *FakeInstanceGroups) RemoveInstancesFromInstanceGroup(name, zone string, instanceRefs []*compute.InstanceReference) error { - instanceNames := toInstanceNames(instanceRefs) - f.calls = append(f.calls, utils.RemoveInstances) - f.instances.Delete(instanceNames...) - l, ok := f.zonesToInstances[zone] - if !ok { - return nil - } - newIns := []string{} - delIns := sets.NewString(instanceNames...) - for _, oldIns := range l { - if delIns.Has(oldIns) { - continue - } - newIns = append(newIns, oldIns) - } - f.zonesToInstances[zone] = newIns - return nil -} - -func (f *FakeInstanceGroups) SetNamedPortsOfInstanceGroup(igName, zone string, namedPorts []*compute.NamedPort) error { - var ig *compute.InstanceGroup - for _, igp := range f.instanceGroups { - if igp.Name == igName && igp.Zone == zone { - ig = igp - break - } - } - if ig == nil { - return fmt.Errorf("Failed to find instance group %q in zone %q", igName, zone) - } - - ig.NamedPorts = namedPorts - return nil -} - -// getInstanceList returns an instance list based on the given names. -// The names cannot contain a '.', the real gce api validates against this. -func getInstanceList(nodeNames sets.String) *compute.InstanceGroupsListInstances { - instanceNames := nodeNames.List() - computeInstances := []*compute.InstanceWithNamedPorts{} - for _, name := range instanceNames { - instanceLink := getInstanceUrl(name) - computeInstances = append( - computeInstances, &compute.InstanceWithNamedPorts{ - Instance: instanceLink}) - } - return &compute.InstanceGroupsListInstances{ - Items: computeInstances, - } -} - -func (f *FakeInstanceGroups) ToInstanceReferences(zone string, instanceNames []string) (refs []*compute.InstanceReference) { - for _, ins := range instanceNames { - instanceLink := getInstanceUrl(ins) - refs = append(refs, &compute.InstanceReference{Instance: instanceLink}) - } - return refs -} - -func getInstanceUrl(instanceName string) string { - return fmt.Sprintf("https://www.googleapis.com/compute/v1/projects/%s/zones/%s/instances/%s", - "project", "zone", instanceName) -} - -func toInstanceNames(instanceRefs []*compute.InstanceReference) []string { - instanceNames := make([]string, len(instanceRefs)) - for ix := range instanceRefs { - url := instanceRefs[ix].Instance - parts := strings.Split(url, "/") - instanceNames[ix] = parts[len(parts)-1] - } - return instanceNames -} diff --git a/controllers/gce/instances/instances.go b/controllers/gce/instances/instances.go deleted file mode 100644 index 7efb8d37c..000000000 --- a/controllers/gce/instances/instances.go +++ /dev/null @@ -1,285 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package instances - -import ( - "fmt" - "net/http" - "strings" - - "github.com/golang/glog" - - compute "google.golang.org/api/compute/v1" - "k8s.io/apimachinery/pkg/util/sets" - - "k8s.io/ingress/controllers/gce/storage" - "k8s.io/ingress/controllers/gce/utils" -) - -const ( - // State string required by gce library to list all instances. - allInstances = "ALL" -) - -// Instances implements NodePool. -type Instances struct { - cloud InstanceGroups - // zones is a list of zones seeded by Kubernetes node zones. - // TODO: we can figure this out. - snapshotter storage.Snapshotter - zoneLister -} - -// NewNodePool creates a new node pool. -// - cloud: implements InstanceGroups, used to sync Kubernetes nodes with -// members of the cloud InstanceGroup. -func NewNodePool(cloud InstanceGroups) NodePool { - return &Instances{cloud, storage.NewInMemoryPool(), nil} -} - -// Init initializes the instance pool. The given zoneLister is used to list -// all zones that require an instance group, and to lookup which zone a -// given Kubernetes node is in so we can add it to the right instance group. -func (i *Instances) Init(zl zoneLister) { - i.zoneLister = zl -} - -// AddInstanceGroup creates or gets an instance group if it doesn't exist -// and adds the given ports to it. Returns a list of one instance group per zone, -// all of which have the exact same named ports. -func (i *Instances) AddInstanceGroup(name string, ports []int64) ([]*compute.InstanceGroup, []*compute.NamedPort, error) { - igs := []*compute.InstanceGroup{} - namedPorts := []*compute.NamedPort{} - for _, port := range ports { - namedPorts = append(namedPorts, utils.GetNamedPort(port)) - } - - zones, err := i.ListZones() - if err != nil { - return igs, namedPorts, err - } - - defer i.snapshotter.Add(name, struct{}{}) - for _, zone := range zones { - ig, err := i.Get(name, zone) - if err != nil && !utils.IsHTTPErrorCode(err, http.StatusNotFound) { - glog.Errorf("Failed to get instance group %v/%v, err: %v", zone, name, err) - return nil, nil, err - } - - if ig == nil { - glog.Infof("Creating instance group %v in zone %v", name, zone) - if err = i.cloud.CreateInstanceGroup(&compute.InstanceGroup{Name: name}, zone); err != nil { - // Error may come back with StatusConflict meaning the instance group was created by another controller - // possibly the Service Controller for internal load balancers. - if utils.IsHTTPErrorCode(err, http.StatusConflict) { - glog.Warningf("Failed to create instance group %v/%v due to conflict status, but continuing sync. err: %v", zone, name, err) - } else { - glog.Errorf("Failed to create instance group %v/%v, err: %v", zone, name, err) - return nil, nil, err - } - } - ig, err = i.cloud.GetInstanceGroup(name, zone) - if err != nil { - glog.Errorf("Failed to get instance group %v/%v after ensuring existence, err: %v", zone, name, err) - return nil, nil, err - } - } else { - glog.V(3).Infof("Instance group %v already exists in zone %v", name, zone) - } - - existingPorts := map[int64]bool{} - for _, np := range ig.NamedPorts { - existingPorts[np.Port] = true - } - var newPorts []*compute.NamedPort - for _, np := range namedPorts { - if existingPorts[np.Port] { - glog.V(3).Infof("Instance group %v already has named port %+v", ig.Name, np) - continue - } - newPorts = append(newPorts, np) - } - if len(newPorts) > 0 { - glog.V(5).Infof("Instance group %v/%v does not have ports %+v, adding them now.", zone, name, namedPorts) - if err := i.cloud.SetNamedPortsOfInstanceGroup(ig.Name, zone, append(ig.NamedPorts, namedPorts...)); err != nil { - return nil, nil, err - } - } - igs = append(igs, ig) - } - return igs, namedPorts, nil -} - -// DeleteInstanceGroup deletes the given IG by name, from all zones. -func (i *Instances) DeleteInstanceGroup(name string) error { - defer i.snapshotter.Delete(name) - errs := []error{} - - zones, err := i.ListZones() - if err != nil { - return err - } - for _, zone := range zones { - if err := i.cloud.DeleteInstanceGroup(name, zone); err != nil { - if utils.IsNotFoundError(err) { - glog.V(3).Infof("Instance group %v in zone %v did not exist", name, zone) - } else if utils.IsInUsedByError(err) { - glog.V(3).Infof("Could not delete instance group %v in zone %v because it's still in use. Ignoring: %v", name, zone, err) - } else { - errs = append(errs, err) - } - } else { - glog.V(3).Infof("Deleted instance group %v in zone %v", name, zone) - } - } - if len(errs) == 0 { - return nil - } - return fmt.Errorf("%v", errs) -} - -// list lists all instances in all zones. -func (i *Instances) list(name string) (sets.String, error) { - nodeNames := sets.NewString() - zones, err := i.ListZones() - if err != nil { - return nodeNames, err - } - - for _, zone := range zones { - instances, err := i.cloud.ListInstancesInInstanceGroup( - name, zone, allInstances) - if err != nil { - return nodeNames, err - } - for _, ins := range instances.Items { - // TODO: If round trips weren't so slow one would be inclided - // to GetInstance using this url and get the name. - parts := strings.Split(ins.Instance, "/") - nodeNames.Insert(parts[len(parts)-1]) - } - } - return nodeNames, nil -} - -// Get returns the Instance Group by name. -func (i *Instances) Get(name, zone string) (*compute.InstanceGroup, error) { - ig, err := i.cloud.GetInstanceGroup(name, zone) - if err != nil { - return nil, err - } - i.snapshotter.Add(name, struct{}{}) - return ig, nil -} - -// splitNodesByZones takes a list of node names and returns a map of zone:node names. -// It figures out the zones by asking the zoneLister. -func (i *Instances) splitNodesByZone(names []string) map[string][]string { - nodesByZone := map[string][]string{} - for _, name := range names { - zone, err := i.GetZoneForNode(name) - if err != nil { - glog.Errorf("Failed to get zones for %v: %v, skipping", name, err) - continue - } - if _, ok := nodesByZone[zone]; !ok { - nodesByZone[zone] = []string{} - } - nodesByZone[zone] = append(nodesByZone[zone], name) - } - return nodesByZone -} - -// Add adds the given instances to the appropriately zoned Instance Group. -func (i *Instances) Add(groupName string, names []string) error { - errs := []error{} - for zone, nodeNames := range i.splitNodesByZone(names) { - glog.V(1).Infof("Adding nodes %v to %v in zone %v", nodeNames, groupName, zone) - if err := i.cloud.AddInstancesToInstanceGroup(groupName, zone, i.cloud.ToInstanceReferences(zone, nodeNames)); err != nil { - errs = append(errs, err) - } - } - if len(errs) == 0 { - return nil - } - return fmt.Errorf("%v", errs) -} - -// Remove removes the given instances from the appropriately zoned Instance Group. -func (i *Instances) Remove(groupName string, names []string) error { - errs := []error{} - for zone, nodeNames := range i.splitNodesByZone(names) { - glog.V(1).Infof("Removing nodes %v from %v in zone %v", nodeNames, groupName, zone) - if err := i.cloud.RemoveInstancesFromInstanceGroup(groupName, zone, i.cloud.ToInstanceReferences(zone, nodeNames)); err != nil { - errs = append(errs, err) - } - } - if len(errs) == 0 { - return nil - } - return fmt.Errorf("%v", errs) -} - -// Sync syncs kubernetes instances with the instances in the instance group. -func (i *Instances) Sync(nodes []string) (err error) { - glog.V(4).Infof("Syncing nodes %v", nodes) - - defer func() { - // The node pool is only responsible for syncing nodes to instance - // groups. It never creates/deletes, so if an instance groups is - // not found there's nothing it can do about it anyway. Most cases - // this will happen because the backend pool has deleted the instance - // group, however if it happens because a user deletes the IG by mistake - // we should just wait till the backend pool fixes it. - if utils.IsHTTPErrorCode(err, http.StatusNotFound) { - glog.Infof("Node pool encountered a 404, ignoring: %v", err) - err = nil - } - }() - - pool := i.snapshotter.Snapshot() - for igName := range pool { - gceNodes := sets.NewString() - gceNodes, err = i.list(igName) - if err != nil { - return err - } - kubeNodes := sets.NewString(nodes...) - - // A node deleted via kubernetes could still exist as a gce vm. We don't - // want to route requests to it. Similarly, a node added to kubernetes - // needs to get added to the instance group so we do route requests to it. - - removeNodes := gceNodes.Difference(kubeNodes).List() - addNodes := kubeNodes.Difference(gceNodes).List() - if len(removeNodes) != 0 { - glog.V(4).Infof("Removing nodes from IG: %v", removeNodes) - if err = i.Remove(igName, removeNodes); err != nil { - return err - } - } - - if len(addNodes) != 0 { - glog.V(4).Infof("Adding nodes to IG: %v", addNodes) - if err = i.Add(igName, addNodes); err != nil { - return err - } - } - } - return nil -} diff --git a/controllers/gce/instances/instances_test.go b/controllers/gce/instances/instances_test.go deleted file mode 100644 index b7b559eed..000000000 --- a/controllers/gce/instances/instances_test.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package instances - -import ( - "testing" - - "k8s.io/apimachinery/pkg/util/sets" -) - -const defaultZone = "default-zone" - -func newNodePool(f *FakeInstanceGroups, zone string) NodePool { - pool := NewNodePool(f) - pool.Init(&FakeZoneLister{[]string{zone}}) - return pool -} - -func TestNodePoolSync(t *testing.T) { - f := NewFakeInstanceGroups(sets.NewString( - []string{"n1", "n2"}...)) - pool := newNodePool(f, defaultZone) - pool.AddInstanceGroup("test", []int64{80}) - - // KubeNodes: n1 - // GCENodes: n1, n2 - // Remove n2 from the instance group. - - f.calls = []int{} - kubeNodes := sets.NewString([]string{"n1"}...) - pool.Sync(kubeNodes.List()) - if f.instances.Len() != kubeNodes.Len() || !kubeNodes.IsSuperset(f.instances) { - t.Fatalf("%v != %v", kubeNodes, f.instances) - } - - // KubeNodes: n1, n2 - // GCENodes: n1 - // Try to add n2 to the instance group. - - f = NewFakeInstanceGroups(sets.NewString([]string{"n1"}...)) - pool = newNodePool(f, defaultZone) - pool.AddInstanceGroup("test", []int64{80}) - - f.calls = []int{} - kubeNodes = sets.NewString([]string{"n1", "n2"}...) - pool.Sync(kubeNodes.List()) - if f.instances.Len() != kubeNodes.Len() || - !kubeNodes.IsSuperset(f.instances) { - t.Fatalf("%v != %v", kubeNodes, f.instances) - } - - // KubeNodes: n1, n2 - // GCENodes: n1, n2 - // Do nothing. - - f = NewFakeInstanceGroups(sets.NewString([]string{"n1", "n2"}...)) - pool = newNodePool(f, defaultZone) - pool.AddInstanceGroup("test", []int64{80}) - - f.calls = []int{} - kubeNodes = sets.NewString([]string{"n1", "n2"}...) - pool.Sync(kubeNodes.List()) - if len(f.calls) != 0 { - t.Fatalf( - "Did not expect any calls, got %+v", f.calls) - } -} - -func TestSetNamedPorts(t *testing.T) { - f := NewFakeInstanceGroups(sets.NewString( - []string{"ig"}...)) - pool := newNodePool(f, defaultZone) - - testCases := []struct { - newPorts []int64 - expectedPorts []int64 - }{ - { - // Verify adding a port works as expected. - []int64{80}, - []int64{80}, - }, - { - // Verify adding multiple ports at once works as expected. - []int64{81, 82}, - []int64{80, 81, 82}, - }, - { - // Adding existing ports should have no impact. - []int64{80, 82}, - []int64{80, 81, 82}, - }, - // TODO: Add tests to remove named ports when we support that. - } - for _, test := range testCases { - igs, _, err := pool.AddInstanceGroup("ig", test.newPorts) - if err != nil { - t.Fatalf("unexpected error in adding ports %v to instance group: %s", test.newPorts, err) - } - if len(igs) != 1 { - t.Fatalf("expected a single instance group, got: %v", igs) - } - actualPorts := igs[0].NamedPorts - if len(actualPorts) != len(test.expectedPorts) { - t.Fatalf("unexpected named ports on instance group. expected: %v, got: %v", test.expectedPorts, actualPorts) - } - for i, p := range igs[0].NamedPorts { - if p.Port != test.expectedPorts[i] { - t.Fatalf("unexpected named ports on instance group. expected: %v, got: %v", test.expectedPorts, actualPorts) - } - } - } -} diff --git a/controllers/gce/instances/interfaces.go b/controllers/gce/instances/interfaces.go deleted file mode 100644 index f0d4f0096..000000000 --- a/controllers/gce/instances/interfaces.go +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package instances - -import ( - compute "google.golang.org/api/compute/v1" -) - -// zoneLister manages lookups for GCE instance groups/instances to zones. -type zoneLister interface { - ListZones() ([]string, error) - GetZoneForNode(name string) (string, error) -} - -// NodePool is an interface to manage a pool of kubernetes nodes synced with vm instances in the cloud -// through the InstanceGroups interface. It handles zones opaquely using the zoneLister. -type NodePool interface { - Init(zl zoneLister) - - // The following 2 methods operate on instance groups. - AddInstanceGroup(name string, ports []int64) ([]*compute.InstanceGroup, []*compute.NamedPort, error) - DeleteInstanceGroup(name string) error - - // TODO: Refactor for modularity - Add(groupName string, nodeNames []string) error - Remove(groupName string, nodeNames []string) error - Sync(nodeNames []string) error - Get(name, zone string) (*compute.InstanceGroup, error) -} - -// InstanceGroups is an interface for managing gce instances groups, and the instances therein. -type InstanceGroups interface { - GetInstanceGroup(name, zone string) (*compute.InstanceGroup, error) - CreateInstanceGroup(ig *compute.InstanceGroup, zone string) error - DeleteInstanceGroup(name, zone string) error - - // TODO: Refactor for modulatiry. - ListInstancesInInstanceGroup(name, zone string, state string) (*compute.InstanceGroupsListInstances, error) - AddInstancesToInstanceGroup(name, zone string, instanceRefs []*compute.InstanceReference) error - RemoveInstancesFromInstanceGroup(name, zone string, instanceRefs []*compute.InstanceReference) error - ToInstanceReferences(zone string, instanceNames []string) (refs []*compute.InstanceReference) - SetNamedPortsOfInstanceGroup(igName, zone string, namedPorts []*compute.NamedPort) error -} diff --git a/controllers/gce/instances/utils.go b/controllers/gce/instances/utils.go deleted file mode 100644 index 732ed9017..000000000 --- a/controllers/gce/instances/utils.go +++ /dev/null @@ -1,13 +0,0 @@ -package instances - -import ( - compute "google.golang.org/api/compute/v1" - - "k8s.io/ingress/controllers/gce/utils" -) - -// Helper method to create instance groups. -// This method exists to ensure that we are using the same logic at all places. -func EnsureInstanceGroupsAndPorts(nodePool NodePool, namer *utils.Namer, ports []int64) ([]*compute.InstanceGroup, []*compute.NamedPort, error) { - return nodePool.AddInstanceGroup(namer.IGName(), ports) -} diff --git a/controllers/gce/loadbalancers/fakes.go b/controllers/gce/loadbalancers/fakes.go deleted file mode 100644 index bcbfac5c9..000000000 --- a/controllers/gce/loadbalancers/fakes.go +++ /dev/null @@ -1,453 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package loadbalancers - -import ( - "fmt" - "testing" - - compute "google.golang.org/api/compute/v1" - "k8s.io/apimachinery/pkg/util/sets" - - "k8s.io/ingress/controllers/gce/utils" -) - -var testIPManager = testIP{} - -type testIP struct { - start int -} - -func (t *testIP) ip() string { - t.start++ - return fmt.Sprintf("0.0.0.%v", t.start) -} - -// Loadbalancer fakes - -// FakeLoadBalancers is a type that fakes out the loadbalancer interface. -type FakeLoadBalancers struct { - Fw []*compute.ForwardingRule - Um []*compute.UrlMap - Tp []*compute.TargetHttpProxy - Tps []*compute.TargetHttpsProxy - IP []*compute.Address - Certs []*compute.SslCertificate - name string - calls []string // list of calls that were made -} - -// TODO: There is some duplication between these functions and the name mungers in -// loadbalancer file. -func (f *FakeLoadBalancers) fwName(https bool) string { - if https { - return fmt.Sprintf("%v-%v", httpsForwardingRulePrefix, f.name) - } - return fmt.Sprintf("%v-%v", forwardingRulePrefix, f.name) -} - -func (f *FakeLoadBalancers) umName() string { - return fmt.Sprintf("%v-%v", urlMapPrefix, f.name) -} - -func (f *FakeLoadBalancers) tpName(https bool) string { - if https { - return fmt.Sprintf("%v-%v", targetHTTPSProxyPrefix, f.name) - } - return fmt.Sprintf("%v-%v", targetProxyPrefix, f.name) -} - -// String is the string method for FakeLoadBalancers. -func (f *FakeLoadBalancers) String() string { - msg := fmt.Sprintf( - "Loadbalancer %v,\nforwarding rules:\n", f.name) - for _, fw := range f.Fw { - msg += fmt.Sprintf("\t%v\n", fw.Name) - } - msg += fmt.Sprintf("Target proxies\n") - for _, tp := range f.Tp { - msg += fmt.Sprintf("\t%v\n", tp.Name) - } - msg += fmt.Sprintf("UrlMaps\n") - for _, um := range f.Um { - msg += fmt.Sprintf("%v\n", um.Name) - msg += fmt.Sprintf("\tHost Rules:\n") - for _, hostRule := range um.HostRules { - msg += fmt.Sprintf("\t\t%v\n", hostRule) - } - msg += fmt.Sprintf("\tPath Matcher:\n") - for _, pathMatcher := range um.PathMatchers { - msg += fmt.Sprintf("\t\t%v\n", pathMatcher.Name) - for _, pathRule := range pathMatcher.PathRules { - msg += fmt.Sprintf("\t\t\t%+v\n", pathRule) - } - } - } - return msg -} - -// Forwarding Rule fakes - -// GetGlobalForwardingRule returns a fake forwarding rule. -func (f *FakeLoadBalancers) GetGlobalForwardingRule(name string) (*compute.ForwardingRule, error) { - f.calls = append(f.calls, "GetGlobalForwardingRule") - for i := range f.Fw { - if f.Fw[i].Name == name { - return f.Fw[i], nil - } - } - return nil, fmt.Errorf("forwarding rule %v not found", name) -} - -// CreateGlobalForwardingRule fakes forwarding rule creation. -func (f *FakeLoadBalancers) CreateGlobalForwardingRule(rule *compute.ForwardingRule) error { - f.calls = append(f.calls, "CreateGlobalForwardingRule") - if rule.IPAddress == "" { - rule.IPAddress = fmt.Sprintf(testIPManager.ip()) - } - rule.SelfLink = rule.Name - f.Fw = append(f.Fw, rule) - return nil -} - -// SetProxyForGlobalForwardingRule fakes setting a global forwarding rule. -func (f *FakeLoadBalancers) SetProxyForGlobalForwardingRule(forwardingRuleName, proxyLink string) error { - f.calls = append(f.calls, "SetProxyForGlobalForwardingRule") - for i := range f.Fw { - if f.Fw[i].Name == forwardingRuleName { - f.Fw[i].Target = proxyLink - } - } - return nil -} - -// DeleteGlobalForwardingRule fakes deleting a global forwarding rule. -func (f *FakeLoadBalancers) DeleteGlobalForwardingRule(name string) error { - f.calls = append(f.calls, "DeleteGlobalForwardingRule") - fw := []*compute.ForwardingRule{} - for i := range f.Fw { - if f.Fw[i].Name != name { - fw = append(fw, f.Fw[i]) - } - } - f.Fw = fw - return nil -} - -// GetForwardingRulesWithIPs returns all forwarding rules that match the given ips. -func (f *FakeLoadBalancers) GetForwardingRulesWithIPs(ip []string) (fwRules []*compute.ForwardingRule) { - f.calls = append(f.calls, "GetForwardingRulesWithIPs") - ipSet := sets.NewString(ip...) - for i := range f.Fw { - if ipSet.Has(f.Fw[i].IPAddress) { - fwRules = append(fwRules, f.Fw[i]) - } - } - return fwRules -} - -// UrlMaps fakes - -// GetUrlMap fakes getting url maps from the cloud. -func (f *FakeLoadBalancers) GetUrlMap(name string) (*compute.UrlMap, error) { - f.calls = append(f.calls, "GetUrlMap") - for i := range f.Um { - if f.Um[i].Name == name { - return f.Um[i], nil - } - } - return nil, fmt.Errorf("url map %v not found", name) -} - -// CreateUrlMap fakes url-map creation. -func (f *FakeLoadBalancers) CreateUrlMap(urlMap *compute.UrlMap) error { - f.calls = append(f.calls, "CreateUrlMap") - urlMap.SelfLink = f.umName() - f.Um = append(f.Um, urlMap) - return nil -} - -// UpdateUrlMap fakes updating url-maps. -func (f *FakeLoadBalancers) UpdateUrlMap(urlMap *compute.UrlMap) error { - f.calls = append(f.calls, "UpdateUrlMap") - for i := range f.Um { - if f.Um[i].Name == urlMap.Name { - f.Um[i] = urlMap - return nil - } - } - return fmt.Errorf("url map %v not found", urlMap.Name) -} - -// DeleteUrlMap fakes url-map deletion. -func (f *FakeLoadBalancers) DeleteUrlMap(name string) error { - f.calls = append(f.calls, "DeleteUrlMap") - um := []*compute.UrlMap{} - for i := range f.Um { - if f.Um[i].Name != name { - um = append(um, f.Um[i]) - } - } - f.Um = um - return nil -} - -// TargetProxies fakes - -// GetTargetHttpProxy fakes getting target http proxies from the cloud. -func (f *FakeLoadBalancers) GetTargetHttpProxy(name string) (*compute.TargetHttpProxy, error) { - f.calls = append(f.calls, "GetTargetHttpProxy") - for i := range f.Tp { - if f.Tp[i].Name == name { - return f.Tp[i], nil - } - } - return nil, fmt.Errorf("target http proxy %v not found", name) -} - -// CreateTargetHttpProxy fakes creating a target http proxy. -func (f *FakeLoadBalancers) CreateTargetHttpProxy(proxy *compute.TargetHttpProxy) error { - f.calls = append(f.calls, "CreateTargetHttpProxy") - proxy.SelfLink = proxy.Name - f.Tp = append(f.Tp, proxy) - return nil -} - -// DeleteTargetHttpProxy fakes deleting a target http proxy. -func (f *FakeLoadBalancers) DeleteTargetHttpProxy(name string) error { - f.calls = append(f.calls, "DeleteTargetHttpProxy") - tp := []*compute.TargetHttpProxy{} - for i := range f.Tp { - if f.Tp[i].Name != name { - tp = append(tp, f.Tp[i]) - } - } - f.Tp = tp - return nil -} - -// SetUrlMapForTargetHttpProxy fakes setting an url-map for a target http proxy. -func (f *FakeLoadBalancers) SetUrlMapForTargetHttpProxy(proxy *compute.TargetHttpProxy, urlMap *compute.UrlMap) error { - f.calls = append(f.calls, "SetUrlMapForTargetHttpProxy") - for i := range f.Tp { - if f.Tp[i].Name == proxy.Name { - f.Tp[i].UrlMap = urlMap.SelfLink - } - } - return nil -} - -// TargetHttpsProxy fakes - -// GetTargetHttpsProxy fakes getting target http proxies from the cloud. -func (f *FakeLoadBalancers) GetTargetHttpsProxy(name string) (*compute.TargetHttpsProxy, error) { - f.calls = append(f.calls, "GetTargetHttpsProxy") - for i := range f.Tps { - if f.Tps[i].Name == name { - return f.Tps[i], nil - } - } - return nil, fmt.Errorf("target https proxy %v not found", name) -} - -// CreateTargetHttpsProxy fakes creating a target http proxy. -func (f *FakeLoadBalancers) CreateTargetHttpsProxy(proxy *compute.TargetHttpsProxy) error { - f.calls = append(f.calls, "CreateTargetHttpsProxy") - proxy.SelfLink = proxy.Name - f.Tps = append(f.Tps, proxy) - return nil -} - -// DeleteTargetHttpsProxy fakes deleting a target http proxy. -func (f *FakeLoadBalancers) DeleteTargetHttpsProxy(name string) error { - f.calls = append(f.calls, "DeleteTargetHttpsProxy") - tp := []*compute.TargetHttpsProxy{} - for i := range f.Tps { - if f.Tps[i].Name != name { - tp = append(tp, f.Tps[i]) - } - } - f.Tps = tp - return nil -} - -// SetUrlMapForTargetHttpsProxy fakes setting an url-map for a target http proxy. -func (f *FakeLoadBalancers) SetUrlMapForTargetHttpsProxy(proxy *compute.TargetHttpsProxy, urlMap *compute.UrlMap) error { - f.calls = append(f.calls, "SetUrlMapForTargetHttpsProxy") - for i := range f.Tps { - if f.Tps[i].Name == proxy.Name { - f.Tps[i].UrlMap = urlMap.SelfLink - } - } - return nil -} - -// SetSslCertificateForTargetHttpsProxy fakes out setting certificates. -func (f *FakeLoadBalancers) SetSslCertificateForTargetHttpsProxy(proxy *compute.TargetHttpsProxy, SSLCert *compute.SslCertificate) error { - f.calls = append(f.calls, "SetSslCertificateForTargetHttpsProxy") - found := false - for i := range f.Tps { - if f.Tps[i].Name == proxy.Name { - f.Tps[i].SslCertificates = []string{SSLCert.SelfLink} - found = true - } - } - if !found { - return fmt.Errorf("failed to find proxy %v", proxy.Name) - } - return nil -} - -// UrlMap fakes - -// CheckURLMap checks the URL map. -func (f *FakeLoadBalancers) CheckURLMap(t *testing.T, l7 *L7, expectedMap map[string]utils.FakeIngressRuleValueMap) { - f.calls = append(f.calls, "CheckURLMap") - um, err := f.GetUrlMap(l7.um.Name) - if err != nil || um == nil { - t.Fatalf("%v", err) - } - // Check the default backend - var d string - if h, ok := expectedMap[utils.DefaultBackendKey]; ok { - if d, ok = h[utils.DefaultBackendKey]; ok { - delete(h, utils.DefaultBackendKey) - } - delete(expectedMap, utils.DefaultBackendKey) - } - // The urlmap should have a default backend, and each path matcher. - if d != "" && l7.um.DefaultService != d { - t.Fatalf("Expected default backend %v found %v", - d, l7.um.DefaultService) - } - - for _, matcher := range l7.um.PathMatchers { - var hostname string - // There's a 1:1 mapping between pathmatchers and hosts - for _, hostRule := range l7.um.HostRules { - if matcher.Name == hostRule.PathMatcher { - if len(hostRule.Hosts) != 1 { - t.Fatalf("Unexpected hosts in hostrules %+v", hostRule) - } - if d != "" && matcher.DefaultService != d { - t.Fatalf("Expected default backend %v found %v", - d, matcher.DefaultService) - } - hostname = hostRule.Hosts[0] - break - } - } - // These are all pathrules for a single host, found above - for _, rule := range matcher.PathRules { - if len(rule.Paths) != 1 { - t.Fatalf("Unexpected rule in pathrules %+v", rule) - } - pathRule := rule.Paths[0] - if hostMap, ok := expectedMap[hostname]; !ok { - t.Fatalf("Expected map for host %v: %v", hostname, hostMap) - } else if svc, ok := expectedMap[hostname][pathRule]; !ok { - t.Fatalf("Expected rule %v in host map", pathRule) - } else if svc != rule.Service { - t.Fatalf("Expected service %v found %v", svc, rule.Service) - } - delete(expectedMap[hostname], pathRule) - if len(expectedMap[hostname]) == 0 { - delete(expectedMap, hostname) - } - } - } - if len(expectedMap) != 0 { - t.Fatalf("Untranslated entries %+v", expectedMap) - } -} - -// Static IP fakes - -// ReserveGlobalAddress fakes out static IP reservation. -func (f *FakeLoadBalancers) ReserveGlobalAddress(addr *compute.Address) error { - f.calls = append(f.calls, "ReserveGlobalAddress") - f.IP = append(f.IP, addr) - return nil -} - -// GetGlobalAddress fakes out static IP retrieval. -func (f *FakeLoadBalancers) GetGlobalAddress(name string) (*compute.Address, error) { - f.calls = append(f.calls, "GetGlobalAddress") - for i := range f.IP { - if f.IP[i].Name == name { - return f.IP[i], nil - } - } - return nil, fmt.Errorf("static IP %v not found", name) -} - -// DeleteGlobalAddress fakes out static IP deletion. -func (f *FakeLoadBalancers) DeleteGlobalAddress(name string) error { - f.calls = append(f.calls, "DeleteGlobalAddress") - ip := []*compute.Address{} - for i := range f.IP { - if f.IP[i].Name != name { - ip = append(ip, f.IP[i]) - } - } - f.IP = ip - return nil -} - -// SslCertificate fakes - -// GetSslCertificate fakes out getting ssl certs. -func (f *FakeLoadBalancers) GetSslCertificate(name string) (*compute.SslCertificate, error) { - f.calls = append(f.calls, "GetSslCertificate") - for i := range f.Certs { - if f.Certs[i].Name == name { - return f.Certs[i], nil - } - } - return nil, fmt.Errorf("cert %v not found", name) -} - -// CreateSslCertificate fakes out certificate creation. -func (f *FakeLoadBalancers) CreateSslCertificate(cert *compute.SslCertificate) (*compute.SslCertificate, error) { - f.calls = append(f.calls, "CreateSslCertificate") - cert.SelfLink = cert.Name - f.Certs = append(f.Certs, cert) - return cert, nil -} - -// DeleteSslCertificate fakes out certificate deletion. -func (f *FakeLoadBalancers) DeleteSslCertificate(name string) error { - f.calls = append(f.calls, "DeleteSslCertificate") - certs := []*compute.SslCertificate{} - for i := range f.Certs { - if f.Certs[i].Name != name { - certs = append(certs, f.Certs[i]) - } - } - f.Certs = certs - return nil -} - -// NewFakeLoadBalancers creates a fake cloud client. Name is the name -// inserted into the selfLink of the associated resources for testing. -// eg: forwardingRule.SelfLink == k8-fw-name. -func NewFakeLoadBalancers(name string) *FakeLoadBalancers { - return &FakeLoadBalancers{ - Fw: []*compute.ForwardingRule{}, - name: name, - } -} diff --git a/controllers/gce/loadbalancers/interfaces.go b/controllers/gce/loadbalancers/interfaces.go deleted file mode 100644 index de3504018..000000000 --- a/controllers/gce/loadbalancers/interfaces.go +++ /dev/null @@ -1,75 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package loadbalancers - -import ( - compute "google.golang.org/api/compute/v1" -) - -// LoadBalancers is an interface for managing all the gce resources needed by L7 -// loadbalancers. We don't have individual pools for each of these resources -// because none of them are usable (or acquirable) stand-alone, unlinke backends -// and instance groups. The dependency graph: -// ForwardingRule -> UrlMaps -> TargetProxies -type LoadBalancers interface { - // Forwarding Rules - GetGlobalForwardingRule(name string) (*compute.ForwardingRule, error) - CreateGlobalForwardingRule(rule *compute.ForwardingRule) error - DeleteGlobalForwardingRule(name string) error - SetProxyForGlobalForwardingRule(fw, proxy string) error - - // UrlMaps - GetUrlMap(name string) (*compute.UrlMap, error) - CreateUrlMap(urlMap *compute.UrlMap) error - UpdateUrlMap(urlMap *compute.UrlMap) error - DeleteUrlMap(name string) error - - // TargetProxies - GetTargetHttpProxy(name string) (*compute.TargetHttpProxy, error) - CreateTargetHttpProxy(proxy *compute.TargetHttpProxy) error - DeleteTargetHttpProxy(name string) error - SetUrlMapForTargetHttpProxy(proxy *compute.TargetHttpProxy, urlMap *compute.UrlMap) error - - // TargetHttpsProxies - GetTargetHttpsProxy(name string) (*compute.TargetHttpsProxy, error) - CreateTargetHttpsProxy(proxy *compute.TargetHttpsProxy) error - DeleteTargetHttpsProxy(name string) error - SetUrlMapForTargetHttpsProxy(proxy *compute.TargetHttpsProxy, urlMap *compute.UrlMap) error - SetSslCertificateForTargetHttpsProxy(proxy *compute.TargetHttpsProxy, SSLCerts *compute.SslCertificate) error - - // SslCertificates - GetSslCertificate(name string) (*compute.SslCertificate, error) - CreateSslCertificate(certs *compute.SslCertificate) (*compute.SslCertificate, error) - DeleteSslCertificate(name string) error - - // Static IP - - ReserveGlobalAddress(addr *compute.Address) error - GetGlobalAddress(name string) (*compute.Address, error) - DeleteGlobalAddress(name string) error -} - -// LoadBalancerPool is an interface to manage the cloud resources associated -// with a gce loadbalancer. -type LoadBalancerPool interface { - Get(name string) (*L7, error) - Add(ri *L7RuntimeInfo) error - Delete(name string) error - Sync(ri []*L7RuntimeInfo) error - GC(names []string) error - Shutdown() error -} diff --git a/controllers/gce/loadbalancers/loadbalancers.go b/controllers/gce/loadbalancers/loadbalancers.go deleted file mode 100644 index 2442cc2ee..000000000 --- a/controllers/gce/loadbalancers/loadbalancers.go +++ /dev/null @@ -1,1062 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package loadbalancers - -import ( - "crypto/md5" - "encoding/hex" - "encoding/json" - "fmt" - "net/http" - "reflect" - "strings" - - "github.com/golang/glog" - - compute "google.golang.org/api/compute/v1" - "k8s.io/apimachinery/pkg/util/sets" - - "k8s.io/ingress/controllers/gce/backends" - "k8s.io/ingress/controllers/gce/storage" - "k8s.io/ingress/controllers/gce/utils" -) - -const ( - - // The gce api uses the name of a path rule to match a host rule. - hostRulePrefix = "host" - - // DefaultHost is the host used if none is specified. It is a valid value - // for the "Host" field recognized by GCE. - DefaultHost = "*" - - // DefaultPath is the path used if none is specified. It is a valid path - // recognized by GCE. - DefaultPath = "/*" - - // A single target proxy/urlmap/forwarding rule is created per loadbalancer. - // Tagged with the namespace/name of the Ingress. - // TODO: Move the namer to its own package out of utils and move the prefix - // with it. Currently the construction of the loadbalancer resources names - // are split between the namer and the loadbalancers package. - targetProxyPrefix = "k8s-tp" - targetHTTPSProxyPrefix = "k8s-tps" - sslCertPrefix = "k8s-ssl" - forwardingRulePrefix = "k8s-fw" - httpsForwardingRulePrefix = "k8s-fws" - urlMapPrefix = "k8s-um" - httpDefaultPortRange = "80-80" - httpsDefaultPortRange = "443-443" -) - -// L7s implements LoadBalancerPool. -type L7s struct { - cloud LoadBalancers - snapshotter storage.Snapshotter - // TODO: Remove this field and always ask the BackendPool using the NodePort. - glbcDefaultBackend *compute.BackendService - defaultBackendPool backends.BackendPool - defaultBackendNodePort backends.ServicePort - namer *utils.Namer -} - -// NewLoadBalancerPool returns a new loadbalancer pool. -// - cloud: implements LoadBalancers. Used to sync L7 loadbalancer resources -// with the cloud. -// - defaultBackendPool: a BackendPool used to manage the GCE BackendService for -// the default backend. -// - defaultBackendNodePort: The nodePort of the Kubernetes service representing -// the default backend. -func NewLoadBalancerPool( - cloud LoadBalancers, - defaultBackendPool backends.BackendPool, - defaultBackendNodePort backends.ServicePort, namer *utils.Namer) LoadBalancerPool { - return &L7s{cloud, storage.NewInMemoryPool(), nil, defaultBackendPool, defaultBackendNodePort, namer} -} - -func (l *L7s) create(ri *L7RuntimeInfo) (*L7, error) { - if l.glbcDefaultBackend == nil { - glog.Warningf("Creating l7 without a default backend") - } - return &L7{ - runtimeInfo: ri, - Name: l.namer.LBName(ri.Name), - cloud: l.cloud, - glbcDefaultBackend: l.glbcDefaultBackend, - namer: l.namer, - sslCert: nil, - }, nil -} - -// Get returns the loadbalancer by name. -func (l *L7s) Get(name string) (*L7, error) { - name = l.namer.LBName(name) - lb, exists := l.snapshotter.Get(name) - if !exists { - return nil, fmt.Errorf("loadbalancer %v not in pool", name) - } - return lb.(*L7), nil -} - -// Add gets or creates a loadbalancer. -// If the loadbalancer already exists, it checks that its edges are valid. -func (l *L7s) Add(ri *L7RuntimeInfo) (err error) { - name := l.namer.LBName(ri.Name) - - lb, _ := l.Get(name) - if lb == nil { - glog.Infof("Creating l7 %v", name) - lb, err = l.create(ri) - if err != nil { - return err - } - } else { - if !reflect.DeepEqual(lb.runtimeInfo, ri) { - glog.Infof("LB %v runtime info changed, old %+v new %+v", lb.Name, lb.runtimeInfo, ri) - lb.runtimeInfo = ri - } - } - // Add the lb to the pool, in case we create an UrlMap but run out - // of quota in creating the ForwardingRule we still need to cleanup - // the UrlMap during GC. - defer l.snapshotter.Add(name, lb) - - // Why edge hop for the create? - // The loadbalancer is a fictitious resource, it doesn't exist in gce. To - // make it exist we need to create a collection of gce resources, done - // through the edge hop. - if err := lb.edgeHop(); err != nil { - return err - } - - return nil -} - -// Delete deletes a loadbalancer by name. -func (l *L7s) Delete(name string) error { - name = l.namer.LBName(name) - lb, err := l.Get(name) - if err != nil { - return err - } - glog.Infof("Deleting lb %v", name) - if err := lb.Cleanup(); err != nil { - return err - } - l.snapshotter.Delete(name) - return nil -} - -// Sync loadbalancers with the given runtime info from the controller. -func (l *L7s) Sync(lbs []*L7RuntimeInfo) error { - glog.V(3).Infof("Syncing loadbalancers %v", lbs) - - if len(lbs) != 0 { - // Lazily create a default backend so we don't tax users who don't care - // about Ingress by consuming 1 of their 3 GCE BackendServices. This - // BackendService is GC'd when there are no more Ingresses. - if err := l.defaultBackendPool.Ensure([]backends.ServicePort{l.defaultBackendNodePort}, nil); err != nil { - return err - } - defaultBackend, err := l.defaultBackendPool.Get(l.defaultBackendNodePort.Port) - if err != nil { - return err - } - l.glbcDefaultBackend = defaultBackend - } - // create new loadbalancers, validate existing - for _, ri := range lbs { - if err := l.Add(ri); err != nil { - return err - } - } - return nil -} - -// GC garbage collects loadbalancers not in the input list. -func (l *L7s) GC(names []string) error { - knownLoadBalancers := sets.NewString() - for _, n := range names { - knownLoadBalancers.Insert(l.namer.LBName(n)) - } - pool := l.snapshotter.Snapshot() - - // Delete unknown loadbalancers - for name := range pool { - if knownLoadBalancers.Has(name) { - continue - } - glog.V(3).Infof("GCing loadbalancer %v", name) - if err := l.Delete(name); err != nil { - return err - } - } - // Tear down the default backend when there are no more loadbalancers. - // This needs to happen after we've deleted all url-maps that might be - // using it. - if len(names) == 0 { - if err := l.defaultBackendPool.Delete(l.defaultBackendNodePort.Port); err != nil { - return err - } - l.glbcDefaultBackend = nil - } - return nil -} - -// Shutdown logs whether or not the pool is empty. -func (l *L7s) Shutdown() error { - if err := l.GC([]string{}); err != nil { - return err - } - if err := l.defaultBackendPool.Shutdown(); err != nil { - return err - } - glog.Infof("Loadbalancer pool shutdown.") - return nil -} - -// TLSCerts encapsulates .pem encoded TLS information. -type TLSCerts struct { - // Key is private key. - Key string - // Cert is a public key. - Cert string - // Chain is a certificate chain. - Chain string -} - -// L7RuntimeInfo is info passed to this module from the controller runtime. -type L7RuntimeInfo struct { - // Name is the name of a loadbalancer. - Name string - // IP is the desired ip of the loadbalancer, eg from a staticIP. - IP string - // TLS are the tls certs to use in termination. - TLS *TLSCerts - // TLSName is the name of/for the tls cert to use. - TLSName string - // AllowHTTP will not setup :80, if TLS is nil and AllowHTTP is set, - // no loadbalancer is created. - AllowHTTP bool - // The name of a Global Static IP. If specified, the IP associated with - // this name is used in the Forwarding Rules for this loadbalancer. - StaticIPName string -} - -// String returns the load balancer name -func (l *L7RuntimeInfo) String() string { - return l.Name -} - -// L7 represents a single L7 loadbalancer. -type L7 struct { - Name string - // runtimeInfo is non-cloudprovider information passed from the controller. - runtimeInfo *L7RuntimeInfo - // cloud is an interface to manage loadbalancers in the GCE cloud. - cloud LoadBalancers - // um is the UrlMap associated with this L7. - um *compute.UrlMap - // tp is the TargetHTTPProxy associated with this L7. - tp *compute.TargetHttpProxy - // tps is the TargetHTTPSProxy associated with this L7. - tps *compute.TargetHttpsProxy - // fw is the GlobalForwardingRule that points to the TargetHTTPProxy. - fw *compute.ForwardingRule - // fws is the GlobalForwardingRule that points to the TargetHTTPSProxy. - fws *compute.ForwardingRule - // ip is the static-ip associated with both GlobalForwardingRules. - ip *compute.Address - // sslCert is the ssl cert associated with the targetHTTPSProxy. - // TODO: Make this a custom type that contains crt+key - sslCert *compute.SslCertificate - // oldSSLCert is the certificate that used to be hooked up to the - // targetHTTPSProxy. We can't update a cert in place, so we need - // to create - update - delete and storing the old cert in a field - // prevents leakage if there's a failure along the way. - oldSSLCert *compute.SslCertificate - // glbcDefaultBacked is the backend to use if no path rules match. - // TODO: Expose this to users. - glbcDefaultBackend *compute.BackendService - // namer is used to compute names of the various sub-components of an L7. - namer *utils.Namer -} - -func (l *L7) checkUrlMap(backend *compute.BackendService) (err error) { - if l.glbcDefaultBackend == nil { - return fmt.Errorf("cannot create urlmap without default backend") - } - urlMapName := l.namer.Truncate(fmt.Sprintf("%v-%v", urlMapPrefix, l.Name)) - urlMap, _ := l.cloud.GetUrlMap(urlMapName) - if urlMap != nil { - glog.V(3).Infof("Url map %v already exists", urlMap.Name) - l.um = urlMap - return nil - } - - glog.Infof("Creating url map %v for backend %v", urlMapName, l.glbcDefaultBackend.Name) - newUrlMap := &compute.UrlMap{ - Name: urlMapName, - DefaultService: l.glbcDefaultBackend.SelfLink, - } - if err = l.cloud.CreateUrlMap(newUrlMap); err != nil { - return err - } - urlMap, err = l.cloud.GetUrlMap(urlMapName) - if err != nil { - return err - } - l.um = urlMap - return nil -} - -func (l *L7) checkProxy() (err error) { - if l.um == nil { - return fmt.Errorf("cannot create proxy without urlmap") - } - proxyName := l.namer.Truncate(fmt.Sprintf("%v-%v", targetProxyPrefix, l.Name)) - proxy, _ := l.cloud.GetTargetHttpProxy(proxyName) - if proxy == nil { - glog.Infof("Creating new http proxy for urlmap %v", l.um.Name) - newProxy := &compute.TargetHttpProxy{ - Name: proxyName, - UrlMap: l.um.SelfLink, - } - if err = l.cloud.CreateTargetHttpProxy(newProxy); err != nil { - return err - } - proxy, err = l.cloud.GetTargetHttpProxy(proxyName) - if err != nil { - return err - } - l.tp = proxy - return nil - } - if !utils.CompareLinks(proxy.UrlMap, l.um.SelfLink) { - glog.Infof("Proxy %v has the wrong url map, setting %v overwriting %v", - proxy.Name, l.um, proxy.UrlMap) - if err := l.cloud.SetUrlMapForTargetHttpProxy(proxy, l.um); err != nil { - return err - } - } - l.tp = proxy - return nil -} - -func (l *L7) deleteOldSSLCert() (err error) { - if l.oldSSLCert == nil || l.sslCert == nil || - l.oldSSLCert.Name == l.sslCert.Name || !strings.HasPrefix(l.oldSSLCert.Name, sslCertPrefix) { - return nil - } - glog.Infof("Cleaning up old SSL Certificate %v, current name %v", l.oldSSLCert.Name, l.sslCert.Name) - if err := utils.IgnoreHTTPNotFound(l.cloud.DeleteSslCertificate(l.oldSSLCert.Name)); err != nil { - return err - } - l.oldSSLCert = nil - return nil -} - -// Returns the name portion of a link - which is the last section -func getResourceNameFromLink(link string) string { - s := strings.Split(link, "/") - if len(s) == 0 { - return "" - } - return s[len(s)-1] -} - -func (l *L7) usePreSharedCert() (bool, error) { - // Use the named GCE cert when it is specified by the annotation. - preSharedCertName := l.runtimeInfo.TLSName - if preSharedCertName == "" { - return false, nil - } - - // Ask GCE for the cert, checking for problems and existence. - cert, err := l.cloud.GetSslCertificate(preSharedCertName) - if err != nil { - return true, err - } - if cert == nil { - return true, fmt.Errorf("cannot find existing sslCertificate %v for %v", preSharedCertName, l.Name) - } - - glog.V(2).Infof("Using existing sslCertificate %v for %v", preSharedCertName, l.Name) - l.sslCert = cert - return true, nil -} - -func (l *L7) populateSSLCert() error { - // Determine what certificate name is being used - var expectedCertName string - if l.sslCert != nil { - expectedCertName = l.sslCert.Name - } else { - // Retrieve the ssl certificate in use by the expected target proxy (if exists) - expectedCertName = getResourceNameFromLink(l.getSslCertLinkInUse()) - } - - var err error - if expectedCertName != "" { - // Retrieve the certificate and ignore error if certificate wasn't found - l.sslCert, err = l.cloud.GetSslCertificate(expectedCertName) - if err != nil { - return utils.IgnoreHTTPNotFound(err) - } - } - return nil -} - -func (l *L7) nextCertificateName() string { - // The name of the cert for this lb flip-flops between these 2 on - // every certificate update. We don't append the index at the end so we're - // sure it isn't truncated. - // TODO: Clean this code up into a ring buffer. - primaryCertName := l.namer.Truncate(fmt.Sprintf("%v-%v", sslCertPrefix, l.Name)) - secondaryCertName := l.namer.Truncate(fmt.Sprintf("%v-%d-%v", sslCertPrefix, 1, l.Name)) - - if l.sslCert != nil && l.sslCert.Name == primaryCertName { - return secondaryCertName - } - return primaryCertName -} - -func (l *L7) checkSSLCert() error { - // Handle Pre-Shared cert and early return if used - if used, err := l.usePreSharedCert(); used { - return err - } - - // Get updated value of certificate for comparison - if err := l.populateSSLCert(); err != nil { - return err - } - - // TODO: Currently, GCE only supports a single certificate per static IP - // so we don't need to bother with disambiguation. Naming the cert after - // the loadbalancer is a simplification. - ingCert := l.runtimeInfo.TLS.Cert - ingKey := l.runtimeInfo.TLS.Key - - // PrivateKey is write only, so compare certs alone. We're assuming that - // no one will change just the key. We can remember the key and compare, - // but a bug could end up leaking it, which feels worse. - if l.sslCert != nil && ingCert == l.sslCert.Certificate { - return nil - } - - // Controller needs to create or update the certificate. - // Generate the next certificate name to use. - newCertName := l.nextCertificateName() - - // Perform a delete in case a certificate exists with the exact name - // This certificate should be unused since we check the target proxy's certificate prior - // to this point. Although, it's possible an actor pointed a target proxy to this certificate. - if err := utils.IgnoreHTTPNotFound(l.cloud.DeleteSslCertificate(newCertName)); err != nil { - return fmt.Errorf("unable to delete ssl certificate with name %q, expected it to be unused. err: %v", newCertName, err) - } - - glog.V(2).Infof("Creating new sslCertificate %v for %v", newCertName, l.Name) - cert, err := l.cloud.CreateSslCertificate(&compute.SslCertificate{ - Name: newCertName, - Certificate: ingCert, - PrivateKey: ingKey, - }) - if err != nil { - return err - } - // Save the current cert for cleanup after we update the target proxy. - l.oldSSLCert = l.sslCert - l.sslCert = cert - - return nil -} - -func (l *L7) getSslCertLinkInUse() string { - proxyName := l.namer.Truncate(fmt.Sprintf("%v-%v", targetHTTPSProxyPrefix, l.Name)) - proxy, _ := l.cloud.GetTargetHttpsProxy(proxyName) - if proxy != nil && len(proxy.SslCertificates) > 0 { - return proxy.SslCertificates[0] - } - return "" -} - -func (l *L7) checkHttpsProxy() (err error) { - if l.sslCert == nil { - glog.V(3).Infof("No SSL certificates for %v, will not create HTTPS proxy.", l.Name) - return nil - } - if l.um == nil { - return fmt.Errorf("no UrlMap for %v, will not create HTTPS proxy", l.Name) - } - proxyName := l.namer.Truncate(fmt.Sprintf("%v-%v", targetHTTPSProxyPrefix, l.Name)) - proxy, _ := l.cloud.GetTargetHttpsProxy(proxyName) - if proxy == nil { - glog.Infof("Creating new https proxy for urlmap %v", l.um.Name) - newProxy := &compute.TargetHttpsProxy{ - Name: proxyName, - UrlMap: l.um.SelfLink, - SslCertificates: []string{l.sslCert.SelfLink}, - } - if err = l.cloud.CreateTargetHttpsProxy(newProxy); err != nil { - return err - } - - proxy, err = l.cloud.GetTargetHttpsProxy(proxyName) - if err != nil { - return err - } - - l.tps = proxy - return nil - } - if !utils.CompareLinks(proxy.UrlMap, l.um.SelfLink) { - glog.Infof("Https proxy %v has the wrong url map, setting %v overwriting %v", - proxy.Name, l.um, proxy.UrlMap) - if err := l.cloud.SetUrlMapForTargetHttpsProxy(proxy, l.um); err != nil { - return err - } - } - cert := proxy.SslCertificates[0] - if !utils.CompareLinks(cert, l.sslCert.SelfLink) { - glog.Infof("Https proxy %v has the wrong ssl certs, setting %v overwriting %v", - proxy.Name, l.sslCert.SelfLink, cert) - if err := l.cloud.SetSslCertificateForTargetHttpsProxy(proxy, l.sslCert); err != nil { - return err - } - } - glog.V(3).Infof("Created target https proxy %v", proxy.Name) - l.tps = proxy - return nil -} - -func (l *L7) checkForwardingRule(name, proxyLink, ip, portRange string) (fw *compute.ForwardingRule, err error) { - fw, _ = l.cloud.GetGlobalForwardingRule(name) - if fw != nil && (ip != "" && fw.IPAddress != ip || fw.PortRange != portRange) { - glog.Warningf("Recreating forwarding rule %v(%v), so it has %v(%v)", - fw.IPAddress, fw.PortRange, ip, portRange) - if err = utils.IgnoreHTTPNotFound(l.cloud.DeleteGlobalForwardingRule(name)); err != nil { - return nil, err - } - fw = nil - } - if fw == nil { - parts := strings.Split(proxyLink, "/") - glog.Infof("Creating forwarding rule for proxy %v and ip %v:%v", parts[len(parts)-1:], ip, portRange) - rule := &compute.ForwardingRule{ - Name: name, - IPAddress: ip, - Target: proxyLink, - PortRange: portRange, - IPProtocol: "TCP", - } - if err = l.cloud.CreateGlobalForwardingRule(rule); err != nil { - return nil, err - } - fw, err = l.cloud.GetGlobalForwardingRule(name) - if err != nil { - return nil, err - } - } - // TODO: If the port range and protocol don't match, recreate the rule - if utils.CompareLinks(fw.Target, proxyLink) { - glog.V(3).Infof("Forwarding rule %v already exists", fw.Name) - } else { - glog.Infof("Forwarding rule %v has the wrong proxy, setting %v overwriting %v", - fw.Name, fw.Target, proxyLink) - if err := l.cloud.SetProxyForGlobalForwardingRule(fw.Name, proxyLink); err != nil { - return nil, err - } - } - return fw, nil -} - -// getEffectiveIP returns a string with the IP to use in the HTTP and HTTPS -// forwarding rules, and a boolean indicating if this is an IP the controller -// should manage or not. -func (l *L7) getEffectiveIP() (string, bool) { - - // A note on IP management: - // User specifies a different IP on startup: - // - We create a forwarding rule with the given IP. - // - If this ip doesn't exist in GCE, we create another one in the hope - // that they will rectify it later on. - // - In the happy case, no static ip is created or deleted by this controller. - // Controller allocates a staticIP/ephemeralIP, but user changes it: - // - We still delete the old static IP, but only when we tear down the - // Ingress in Cleanup(). Till then the static IP stays around, but - // the forwarding rules get deleted/created with the new IP. - // - There will be a period of downtime as we flip IPs. - // User specifies the same static IP to 2 Ingresses: - // - GCE will throw a 400, and the controller will keep trying to use - // the IP in the hope that the user manually resolves the conflict - // or deletes/modifies the Ingress. - // TODO: Handle the last case better. - - if l.runtimeInfo.StaticIPName != "" { - // Existing static IPs allocated to forwarding rules will get orphaned - // till the Ingress is torn down. - if ip, err := l.cloud.GetGlobalAddress(l.runtimeInfo.StaticIPName); err != nil || ip == nil { - glog.Warningf("The given static IP name %v doesn't translate to an existing global static IP, ignoring it and allocating a new IP: %v", - l.runtimeInfo.StaticIPName, err) - } else { - return ip.Address, false - } - } - if l.ip != nil { - return l.ip.Address, true - } - return "", true -} - -func (l *L7) checkHttpForwardingRule() (err error) { - if l.tp == nil { - return fmt.Errorf("cannot create forwarding rule without proxy") - } - name := l.namer.Truncate(fmt.Sprintf("%v-%v", forwardingRulePrefix, l.Name)) - address, _ := l.getEffectiveIP() - fw, err := l.checkForwardingRule(name, l.tp.SelfLink, address, httpDefaultPortRange) - if err != nil { - return err - } - l.fw = fw - return nil -} - -func (l *L7) checkHttpsForwardingRule() (err error) { - if l.tps == nil { - glog.V(3).Infof("No https target proxy for %v, not created https forwarding rule", l.Name) - return nil - } - name := l.namer.Truncate(fmt.Sprintf("%v-%v", httpsForwardingRulePrefix, l.Name)) - address, _ := l.getEffectiveIP() - fws, err := l.checkForwardingRule(name, l.tps.SelfLink, address, httpsDefaultPortRange) - if err != nil { - return err - } - l.fws = fws - return nil -} - -// checkStaticIP reserves a static IP allocated to the Forwarding Rule. -func (l *L7) checkStaticIP() (err error) { - if l.fw == nil || l.fw.IPAddress == "" { - return fmt.Errorf("will not create static IP without a forwarding rule") - } - // Don't manage staticIPs if the user has specified an IP. - if address, manageStaticIP := l.getEffectiveIP(); !manageStaticIP { - glog.V(3).Infof("Not managing user specified static IP %v", address) - return nil - } - staticIPName := l.namer.Truncate(fmt.Sprintf("%v-%v", forwardingRulePrefix, l.Name)) - ip, _ := l.cloud.GetGlobalAddress(staticIPName) - if ip == nil { - glog.Infof("Creating static ip %v", staticIPName) - err = l.cloud.ReserveGlobalAddress(&compute.Address{Name: staticIPName, Address: l.fw.IPAddress}) - if err != nil { - if utils.IsHTTPErrorCode(err, http.StatusConflict) || - utils.IsHTTPErrorCode(err, http.StatusBadRequest) { - glog.V(3).Infof("IP %v(%v) is already reserved, assuming it is OK to use.", - l.fw.IPAddress, staticIPName) - return nil - } - return err - } - ip, err = l.cloud.GetGlobalAddress(staticIPName) - if err != nil { - return err - } - } - l.ip = ip - return nil -} - -func (l *L7) edgeHop() error { - if err := l.checkUrlMap(l.glbcDefaultBackend); err != nil { - return err - } - if l.runtimeInfo.AllowHTTP { - if err := l.edgeHopHttp(); err != nil { - return err - } - } - // Defer promoting an ephemeral to a static IP until it's really needed. - if l.runtimeInfo.AllowHTTP && (l.runtimeInfo.TLS != nil || l.runtimeInfo.TLSName != "") { - glog.V(3).Infof("checking static ip for %v", l.Name) - if err := l.checkStaticIP(); err != nil { - return err - } - } - if l.runtimeInfo.TLS != nil || l.runtimeInfo.TLSName != "" { - glog.V(3).Infof("validating https for %v", l.Name) - if err := l.edgeHopHttps(); err != nil { - return err - } - } - return nil -} - -func (l *L7) edgeHopHttp() error { - if err := l.checkProxy(); err != nil { - return err - } - if err := l.checkHttpForwardingRule(); err != nil { - return err - } - return nil -} - -func (l *L7) edgeHopHttps() error { - if err := l.checkSSLCert(); err != nil { - return err - } - if err := l.checkHttpsProxy(); err != nil { - return err - } - if err := l.checkHttpsForwardingRule(); err != nil { - return err - } - if err := l.deleteOldSSLCert(); err != nil { - return err - } - return nil -} - -// GetIP returns the ip associated with the forwarding rule for this l7. -func (l *L7) GetIP() string { - if l.fw != nil { - return l.fw.IPAddress - } - if l.fws != nil { - return l.fws.IPAddress - } - return "" -} - -// getNameForPathMatcher returns a name for a pathMatcher based on the given host rule. -// The host rule can be a regex, the path matcher name used to associate the 2 cannot. -func getNameForPathMatcher(hostRule string) string { - hasher := md5.New() - hasher.Write([]byte(hostRule)) - return fmt.Sprintf("%v%v", hostRulePrefix, hex.EncodeToString(hasher.Sum(nil))) -} - -// UpdateUrlMap translates the given hostname: endpoint->port mapping into a gce url map. -// -// HostRule: Conceptually contains all PathRules for a given host. -// PathMatcher: Associates a path rule with a host rule. Mostly an optimization. -// PathRule: Maps a single path regex to a backend. -// -// The GCE url map allows multiple hosts to share url->backend mappings without duplication, eg: -// Host: foo(PathMatcher1), bar(PathMatcher1,2) -// PathMatcher1: -// /a -> b1 -// /b -> b2 -// PathMatcher2: -// /c -> b1 -// This leads to a lot of complexity in the common case, where all we want is a mapping of -// host->{/path: backend}. -// -// Consider some alternatives: -// 1. Using a single backend per PathMatcher: -// Host: foo(PathMatcher1,3) bar(PathMatcher1,2,3) -// PathMatcher1: -// /a -> b1 -// PathMatcher2: -// /c -> b1 -// PathMatcher3: -// /b -> b2 -// 2. Using a single host per PathMatcher: -// Host: foo(PathMatcher1) -// PathMatcher1: -// /a -> b1 -// /b -> b2 -// Host: bar(PathMatcher2) -// PathMatcher2: -// /a -> b1 -// /b -> b2 -// /c -> b1 -// In the context of kubernetes services, 2 makes more sense, because we -// rarely want to lookup backends (service:nodeport). When a service is -// deleted, we need to find all host PathMatchers that have the backend -// and remove the mapping. When a new path is added to a host (happens -// more frequently than service deletion) we just need to lookup the 1 -// pathmatcher of the host. -func (l *L7) UpdateUrlMap(ingressRules utils.GCEURLMap) error { - if l.um == nil { - return fmt.Errorf("cannot add url without an urlmap") - } - - // All UrlMaps must have a default backend. If the Ingress has a default - // backend, it applies to all host rules as well as to the urlmap itself. - // If it doesn't the urlmap might have a stale default, so replace it with - // glbc's default backend. - defaultBackend := ingressRules.GetDefaultBackend() - if defaultBackend != nil { - l.um.DefaultService = defaultBackend.SelfLink - } else { - l.um.DefaultService = l.glbcDefaultBackend.SelfLink - } - - // Every update replaces the entire urlmap. - // TODO: when we have multiple loadbalancers point to a single gce url map - // this needs modification. For now, there is a 1:1 mapping of urlmaps to - // Ingresses, so if the given Ingress doesn't have a host rule we should - // delete the path to that backend. - l.um.HostRules = []*compute.HostRule{} - l.um.PathMatchers = []*compute.PathMatcher{} - - for hostname, urlToBackend := range ingressRules { - // Create a host rule - // Create a path matcher - // Add all given endpoint:backends to pathRules in path matcher - pmName := getNameForPathMatcher(hostname) - l.um.HostRules = append(l.um.HostRules, &compute.HostRule{ - Hosts: []string{hostname}, - PathMatcher: pmName, - }) - - pathMatcher := &compute.PathMatcher{ - Name: pmName, - DefaultService: l.um.DefaultService, - PathRules: []*compute.PathRule{}, - } - - // Longest prefix wins. For equal rules, first hit wins, i.e the second - // /foo rule when the first is deleted. - for expr, be := range urlToBackend { - pathMatcher.PathRules = append( - pathMatcher.PathRules, &compute.PathRule{Paths: []string{expr}, Service: be.SelfLink}) - } - l.um.PathMatchers = append(l.um.PathMatchers, pathMatcher) - } - oldMap, _ := l.cloud.GetUrlMap(l.um.Name) - if oldMap != nil && mapsEqual(oldMap, l.um) { - glog.Infof("UrlMap for l7 %v is unchanged", l.Name) - return nil - } - - glog.V(3).Infof("Updating URLMap: %q", l.Name) - if err := l.cloud.UpdateUrlMap(l.um); err != nil { - return err - } - - um, err := l.cloud.GetUrlMap(l.um.Name) - if err != nil { - return err - } - - l.um = um - return nil -} - -func mapsEqual(a, b *compute.UrlMap) bool { - if a.DefaultService != b.DefaultService { - return false - } - if len(a.HostRules) != len(b.HostRules) { - return false - } - for i := range a.HostRules { - a := a.HostRules[i] - b := b.HostRules[i] - if a.Description != b.Description { - return false - } - if len(a.Hosts) != len(b.Hosts) { - return false - } - for i := range a.Hosts { - if a.Hosts[i] != b.Hosts[i] { - return false - } - } - if a.PathMatcher != b.PathMatcher { - return false - } - } - if len(a.PathMatchers) != len(b.PathMatchers) { - return false - } - for i := range a.PathMatchers { - a := a.PathMatchers[i] - b := b.PathMatchers[i] - if a.DefaultService != b.DefaultService { - return false - } - if a.Description != b.Description { - return false - } - if a.Name != b.Name { - return false - } - if len(a.PathRules) != len(b.PathRules) { - return false - } - for i := range a.PathRules { - a := a.PathRules[i] - b := b.PathRules[i] - if len(a.Paths) != len(b.Paths) { - return false - } - for i := range a.Paths { - if a.Paths[i] != b.Paths[i] { - return false - } - } - if a.Service != b.Service { - return false - } - } - } - return true -} - -// Cleanup deletes resources specific to this l7 in the right order. -// forwarding rule -> target proxy -> url map -// This leaves backends and health checks, which are shared across loadbalancers. -func (l *L7) Cleanup() error { - if l.fw != nil { - glog.V(2).Infof("Deleting global forwarding rule %v", l.fw.Name) - if err := utils.IgnoreHTTPNotFound(l.cloud.DeleteGlobalForwardingRule(l.fw.Name)); err != nil { - return err - } - l.fw = nil - } - if l.fws != nil { - glog.V(2).Infof("Deleting global forwarding rule %v", l.fws.Name) - if err := utils.IgnoreHTTPNotFound(l.cloud.DeleteGlobalForwardingRule(l.fws.Name)); err != nil { - return err - } - l.fws = nil - } - if l.ip != nil { - glog.V(2).Infof("Deleting static IP %v(%v)", l.ip.Name, l.ip.Address) - if err := utils.IgnoreHTTPNotFound(l.cloud.DeleteGlobalAddress(l.ip.Name)); err != nil { - return err - } - l.ip = nil - } - if l.tps != nil { - glog.V(2).Infof("Deleting target https proxy %v", l.tps.Name) - if err := utils.IgnoreHTTPNotFound(l.cloud.DeleteTargetHttpsProxy(l.tps.Name)); err != nil { - return err - } - l.tps = nil - } - // Delete the SSL cert if it is from a secret, not referencing a pre-created GCE cert. - if l.sslCert != nil && l.runtimeInfo.TLSName == "" { - glog.V(2).Infof("Deleting sslcert %v", l.sslCert.Name) - if err := utils.IgnoreHTTPNotFound(l.cloud.DeleteSslCertificate(l.sslCert.Name)); err != nil { - return err - } - l.sslCert = nil - } - if l.tp != nil { - glog.V(2).Infof("Deleting target http proxy %v", l.tp.Name) - if err := utils.IgnoreHTTPNotFound(l.cloud.DeleteTargetHttpProxy(l.tp.Name)); err != nil { - return err - } - l.tp = nil - } - if l.um != nil { - glog.V(2).Infof("Deleting url map %v", l.um.Name) - if err := utils.IgnoreHTTPNotFound(l.cloud.DeleteUrlMap(l.um.Name)); err != nil { - return err - } - l.um = nil - } - return nil -} - -// getBackendNames returns the names of backends in this L7 urlmap. -func (l *L7) getBackendNames() []string { - if l.um == nil { - return []string{} - } - beNames := sets.NewString() - for _, pathMatcher := range l.um.PathMatchers { - for _, pathRule := range pathMatcher.PathRules { - // This is gross, but the urlmap only has links to backend services. - parts := strings.Split(pathRule.Service, "/") - name := parts[len(parts)-1] - if name != "" { - beNames.Insert(name) - } - } - } - // The default Service recorded in the urlMap is a link to the backend. - // Note that this can either be user specified, or the L7 controller's - // global default. - parts := strings.Split(l.um.DefaultService, "/") - defaultBackendName := parts[len(parts)-1] - if defaultBackendName != "" { - beNames.Insert(defaultBackendName) - } - return beNames.List() -} - -// GetLBAnnotations returns the annotations of an l7. This includes it's current status. -func GetLBAnnotations(l7 *L7, existing map[string]string, backendPool backends.BackendPool) map[string]string { - if existing == nil { - existing = map[string]string{} - } - backends := l7.getBackendNames() - backendState := map[string]string{} - for _, beName := range backends { - backendState[beName] = backendPool.Status(beName) - } - jsonBackendState := "Unknown" - b, err := json.Marshal(backendState) - if err == nil { - jsonBackendState = string(b) - } - existing[fmt.Sprintf("%v/url-map", utils.K8sAnnotationPrefix)] = l7.um.Name - // Forwarding rule and target proxy might not exist if allowHTTP == false - if l7.fw != nil { - existing[fmt.Sprintf("%v/forwarding-rule", utils.K8sAnnotationPrefix)] = l7.fw.Name - } - if l7.tp != nil { - existing[fmt.Sprintf("%v/target-proxy", utils.K8sAnnotationPrefix)] = l7.tp.Name - } - // HTTPs resources might not exist if TLS == nil - if l7.fws != nil { - existing[fmt.Sprintf("%v/https-forwarding-rule", utils.K8sAnnotationPrefix)] = l7.fws.Name - } - if l7.tps != nil { - existing[fmt.Sprintf("%v/https-target-proxy", utils.K8sAnnotationPrefix)] = l7.tps.Name - } - if l7.ip != nil { - existing[fmt.Sprintf("%v/static-ip", utils.K8sAnnotationPrefix)] = l7.ip.Name - } - if l7.sslCert != nil { - existing[fmt.Sprintf("%v/ssl-cert", utils.K8sAnnotationPrefix)] = l7.sslCert.Name - } - // TODO: We really want to know *when* a backend flipped states. - existing[fmt.Sprintf("%v/backends", utils.K8sAnnotationPrefix)] = jsonBackendState - return existing -} - -// GCEResourceName retrieves the name of the gce resource created for this -// Ingress, of the given resource type, by inspecting the map of ingress -// annotations. -func GCEResourceName(ingAnnotations map[string]string, resourceName string) string { - // Even though this function is trivial, it exists to keep the annotation - // parsing logic in a single location. - resourceName, _ = ingAnnotations[fmt.Sprintf("%v/%v", utils.K8sAnnotationPrefix, resourceName)] - return resourceName -} diff --git a/controllers/gce/loadbalancers/loadbalancers_test.go b/controllers/gce/loadbalancers/loadbalancers_test.go deleted file mode 100644 index dc44e12dd..000000000 --- a/controllers/gce/loadbalancers/loadbalancers_test.go +++ /dev/null @@ -1,478 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package loadbalancers - -import ( - "fmt" - "testing" - - compute "google.golang.org/api/compute/v1" - "k8s.io/apimachinery/pkg/util/sets" - - "k8s.io/ingress/controllers/gce/backends" - "k8s.io/ingress/controllers/gce/healthchecks" - "k8s.io/ingress/controllers/gce/instances" - "k8s.io/ingress/controllers/gce/utils" -) - -const ( - defaultZone = "zone-a" -) - -var ( - testDefaultBeNodePort = backends.ServicePort{Port: 3000, Protocol: utils.ProtocolHTTP} -) - -func newFakeLoadBalancerPool(f LoadBalancers, t *testing.T) LoadBalancerPool { - fakeBackends := backends.NewFakeBackendServices(func(op int, be *compute.BackendService) error { return nil }) - fakeIGs := instances.NewFakeInstanceGroups(sets.NewString()) - fakeHCP := healthchecks.NewFakeHealthCheckProvider() - namer := &utils.Namer{} - healthChecker := healthchecks.NewHealthChecker(fakeHCP, "/", namer) - nodePool := instances.NewNodePool(fakeIGs) - nodePool.Init(&instances.FakeZoneLister{Zones: []string{defaultZone}}) - backendPool := backends.NewBackendPool( - fakeBackends, healthChecker, nodePool, namer, []int64{}, false) - return NewLoadBalancerPool(f, backendPool, testDefaultBeNodePort, namer) -} - -func TestCreateHTTPLoadBalancer(t *testing.T) { - // This should NOT create the forwarding rule and target proxy - // associated with the HTTPS branch of this loadbalancer. - lbInfo := &L7RuntimeInfo{Name: "test", AllowHTTP: true} - f := NewFakeLoadBalancers(lbInfo.Name) - pool := newFakeLoadBalancerPool(f, t) - pool.Sync([]*L7RuntimeInfo{lbInfo}) - l7, err := pool.Get(lbInfo.Name) - if err != nil || l7 == nil { - t.Fatalf("Expected l7 not created") - } - um, err := f.GetUrlMap(f.umName()) - if err != nil || - um.DefaultService != pool.(*L7s).glbcDefaultBackend.SelfLink { - t.Fatalf("%v", err) - } - tp, err := f.GetTargetHttpProxy(f.tpName(false)) - if err != nil || tp.UrlMap != um.SelfLink { - t.Fatalf("%v", err) - } - fw, err := f.GetGlobalForwardingRule(f.fwName(false)) - if err != nil || fw.Target != tp.SelfLink { - t.Fatalf("%v", err) - } -} - -func TestCreateHTTPSLoadBalancer(t *testing.T) { - // This should NOT create the forwarding rule and target proxy - // associated with the HTTP branch of this loadbalancer. - lbInfo := &L7RuntimeInfo{ - Name: "test", - AllowHTTP: false, - TLS: &TLSCerts{Key: "key", Cert: "cert"}, - } - f := NewFakeLoadBalancers(lbInfo.Name) - pool := newFakeLoadBalancerPool(f, t) - pool.Sync([]*L7RuntimeInfo{lbInfo}) - l7, err := pool.Get(lbInfo.Name) - if err != nil || l7 == nil { - t.Fatalf("Expected l7 not created") - } - um, err := f.GetUrlMap(f.umName()) - if err != nil || - um.DefaultService != pool.(*L7s).glbcDefaultBackend.SelfLink { - t.Fatalf("%v", err) - } - tps, err := f.GetTargetHttpsProxy(f.tpName(true)) - if err != nil || tps.UrlMap != um.SelfLink { - t.Fatalf("%v", err) - } - fws, err := f.GetGlobalForwardingRule(f.fwName(true)) - if err != nil || fws.Target != tps.SelfLink { - t.Fatalf("%v", err) - } -} - -// Tests that a certificate is created from the provided Key/Cert combo -// and the proxy is updated to another cert when the provided cert changes -func TestCertUpdate(t *testing.T) { - primaryCertName := "k8s-ssl-test" - secondaryCertName := "k8s-ssl-1-test" - lbInfo := &L7RuntimeInfo{ - Name: "test", - AllowHTTP: false, - TLS: &TLSCerts{Key: "key", Cert: "cert"}, - } - - f := NewFakeLoadBalancers(lbInfo.Name) - pool := newFakeLoadBalancerPool(f, t) - - // Sync first cert - pool.Sync([]*L7RuntimeInfo{lbInfo}) - verifyCertAndProxyLink(primaryCertName, lbInfo.TLS.Cert, f, t) - - // Sync with different cert - lbInfo.TLS = &TLSCerts{Key: "key2", Cert: "cert2"} - pool.Sync([]*L7RuntimeInfo{lbInfo}) - verifyCertAndProxyLink(secondaryCertName, lbInfo.TLS.Cert, f, t) -} - -// Tests that controller can overwrite existing, unused certificates -func TestCertCreationWithCollision(t *testing.T) { - primaryCertName := "k8s-ssl-test" - secondaryCertName := "k8s-ssl-1-test" - lbInfo := &L7RuntimeInfo{ - Name: "test", - AllowHTTP: false, - TLS: &TLSCerts{Key: "key", Cert: "cert"}, - } - - f := NewFakeLoadBalancers(lbInfo.Name) - pool := newFakeLoadBalancerPool(f, t) - - // Have both names already used by orphaned certs - f.CreateSslCertificate(&compute.SslCertificate{ - Name: primaryCertName, - Certificate: "abc", - SelfLink: "existing", - }) - f.CreateSslCertificate(&compute.SslCertificate{ - Name: secondaryCertName, - Certificate: "xyz", - SelfLink: "existing", - }) - - // Sync first cert - pool.Sync([]*L7RuntimeInfo{lbInfo}) - verifyCertAndProxyLink(primaryCertName, lbInfo.TLS.Cert, f, t) - - // Sync with different cert - lbInfo.TLS = &TLSCerts{Key: "key2", Cert: "cert2"} - pool.Sync([]*L7RuntimeInfo{lbInfo}) - verifyCertAndProxyLink(secondaryCertName, lbInfo.TLS.Cert, f, t) -} - -func TestCertRetentionAfterRestart(t *testing.T) { - primaryCertName := "k8s-ssl-test" - secondaryCertName := "k8s-ssl-1-test" - lbInfo := &L7RuntimeInfo{ - Name: "test", - AllowHTTP: false, - TLS: &TLSCerts{Key: "key", Cert: "cert"}, - } - - f := NewFakeLoadBalancers(lbInfo.Name) - firstPool := newFakeLoadBalancerPool(f, t) - - // Sync twice so the expected certificate uses the secondary name - firstPool.Sync([]*L7RuntimeInfo{lbInfo}) - verifyCertAndProxyLink(primaryCertName, lbInfo.TLS.Cert, f, t) - lbInfo.TLS = &TLSCerts{Key: "key2", Cert: "cert2"} - firstPool.Sync([]*L7RuntimeInfo{lbInfo}) - verifyCertAndProxyLink(secondaryCertName, lbInfo.TLS.Cert, f, t) - - // Restart of controller represented by a new pool - secondPool := newFakeLoadBalancerPool(f, t) - secondPool.Sync([]*L7RuntimeInfo{lbInfo}) - - // Verify second name is still used - verifyCertAndProxyLink(secondaryCertName, lbInfo.TLS.Cert, f, t) - - // Update cert one more time to verify loop - lbInfo.TLS = &TLSCerts{Key: "key3", Cert: "cert3"} - secondPool.Sync([]*L7RuntimeInfo{lbInfo}) - verifyCertAndProxyLink(primaryCertName, lbInfo.TLS.Cert, f, t) - -} - -func verifyCertAndProxyLink(certName, certValue string, f *FakeLoadBalancers, t *testing.T) { - cert, err := f.GetSslCertificate(certName) - if err != nil { - t.Fatalf("expected ssl certificate to exist: %v, err: %v", certName, err) - } - - if cert.Certificate != certValue { - t.Fatalf("unexpected certificate value; expected %v, actual %v", certValue, cert.Certificate) - } - - tps, err := f.GetTargetHttpsProxy(f.tpName(true)) - if err != nil { - t.Fatalf("expected https proxy to exist: %v, err: %v", certName, err) - } - - if len(tps.SslCertificates) == 0 || tps.SslCertificates[0] != cert.SelfLink { - t.Fatalf("expected ssl certificate to be linked in target proxy; Cert Link: %q; Target Proxy Certs: %v", cert.SelfLink, tps.SslCertificates) - } -} - -func TestCreateHTTPSLoadBalancerAnnotationCert(t *testing.T) { - // This should NOT create the forwarding rule and target proxy - // associated with the HTTP branch of this loadbalancer. - tlsName := "external-cert-name" - lbInfo := &L7RuntimeInfo{ - Name: "test", - AllowHTTP: false, - TLSName: tlsName, - } - f := NewFakeLoadBalancers(lbInfo.Name) - f.CreateSslCertificate(&compute.SslCertificate{ - Name: tlsName, - }) - pool := newFakeLoadBalancerPool(f, t) - pool.Sync([]*L7RuntimeInfo{lbInfo}) - l7, err := pool.Get(lbInfo.Name) - if err != nil || l7 == nil { - t.Fatalf("Expected l7 not created") - } - um, err := f.GetUrlMap(f.umName()) - if err != nil || - um.DefaultService != pool.(*L7s).glbcDefaultBackend.SelfLink { - t.Fatalf("%v", err) - } - tps, err := f.GetTargetHttpsProxy(f.tpName(true)) - if err != nil || tps.UrlMap != um.SelfLink { - t.Fatalf("%v", err) - } - fws, err := f.GetGlobalForwardingRule(f.fwName(true)) - if err != nil || fws.Target != tps.SelfLink { - t.Fatalf("%v", err) - } -} - -func TestCreateBothLoadBalancers(t *testing.T) { - // This should create 2 forwarding rules and target proxies - // but they should use the same urlmap, and have the same - // static ip. - lbInfo := &L7RuntimeInfo{ - Name: "test", - AllowHTTP: true, - TLS: &TLSCerts{Key: "key", Cert: "cert"}, - } - f := NewFakeLoadBalancers(lbInfo.Name) - pool := newFakeLoadBalancerPool(f, t) - pool.Sync([]*L7RuntimeInfo{lbInfo}) - l7, err := pool.Get(lbInfo.Name) - if err != nil || l7 == nil { - t.Fatalf("Expected l7 not created") - } - um, err := f.GetUrlMap(f.umName()) - if err != nil || - um.DefaultService != pool.(*L7s).glbcDefaultBackend.SelfLink { - t.Fatalf("%v", err) - } - tps, err := f.GetTargetHttpsProxy(f.tpName(true)) - if err != nil || tps.UrlMap != um.SelfLink { - t.Fatalf("%v", err) - } - tp, err := f.GetTargetHttpProxy(f.tpName(false)) - if err != nil || tp.UrlMap != um.SelfLink { - t.Fatalf("%v", err) - } - fws, err := f.GetGlobalForwardingRule(f.fwName(true)) - if err != nil || fws.Target != tps.SelfLink { - t.Fatalf("%v", err) - } - fw, err := f.GetGlobalForwardingRule(f.fwName(false)) - if err != nil || fw.Target != tp.SelfLink { - t.Fatalf("%v", err) - } - ip, err := f.GetGlobalAddress(f.fwName(false)) - if err != nil || ip.Address != fw.IPAddress || ip.Address != fws.IPAddress { - t.Fatalf("%v", err) - } -} - -func TestUpdateUrlMap(t *testing.T) { - um1 := utils.GCEURLMap{ - "bar.example.com": { - "/bar2": &compute.BackendService{SelfLink: "bar2svc"}, - }, - } - um2 := utils.GCEURLMap{ - "foo.example.com": { - "/foo1": &compute.BackendService{SelfLink: "foo1svc"}, - "/foo2": &compute.BackendService{SelfLink: "foo2svc"}, - }, - "bar.example.com": { - "/bar1": &compute.BackendService{SelfLink: "bar1svc"}, - }, - } - um2.PutDefaultBackend(&compute.BackendService{SelfLink: "default"}) - - lbInfo := &L7RuntimeInfo{Name: "test", AllowHTTP: true} - f := NewFakeLoadBalancers(lbInfo.Name) - pool := newFakeLoadBalancerPool(f, t) - pool.Sync([]*L7RuntimeInfo{lbInfo}) - l7, err := pool.Get(lbInfo.Name) - if err != nil { - t.Fatalf("%v", err) - } - for _, ir := range []utils.GCEURLMap{um1, um2} { - if err := l7.UpdateUrlMap(ir); err != nil { - t.Fatalf("%v", err) - } - } - // The final map doesn't contain /bar2 - expectedMap := map[string]utils.FakeIngressRuleValueMap{ - utils.DefaultBackendKey: { - utils.DefaultBackendKey: "default", - }, - "foo.example.com": { - "/foo1": "foo1svc", - "/foo2": "foo2svc", - }, - "bar.example.com": { - "/bar1": "bar1svc", - }, - } - f.CheckURLMap(t, l7, expectedMap) -} - -func TestUpdateUrlMapNoChanges(t *testing.T) { - um1 := utils.GCEURLMap{ - "foo.example.com": { - "/foo1": &compute.BackendService{SelfLink: "foo1svc"}, - "/foo2": &compute.BackendService{SelfLink: "foo2svc"}, - }, - "bar.example.com": { - "/bar1": &compute.BackendService{SelfLink: "bar1svc"}, - }, - } - um1.PutDefaultBackend(&compute.BackendService{SelfLink: "default"}) - um2 := utils.GCEURLMap{ - "foo.example.com": { - "/foo1": &compute.BackendService{SelfLink: "foo1svc"}, - "/foo2": &compute.BackendService{SelfLink: "foo2svc"}, - }, - "bar.example.com": { - "/bar1": &compute.BackendService{SelfLink: "bar1svc"}, - }, - } - um2.PutDefaultBackend(&compute.BackendService{SelfLink: "default"}) - - lbInfo := &L7RuntimeInfo{Name: "test", AllowHTTP: true} - f := NewFakeLoadBalancers(lbInfo.Name) - pool := newFakeLoadBalancerPool(f, t) - pool.Sync([]*L7RuntimeInfo{lbInfo}) - l7, err := pool.Get(lbInfo.Name) - if err != nil { - t.Fatalf("%v", err) - } - for _, ir := range []utils.GCEURLMap{um1, um2} { - if err := l7.UpdateUrlMap(ir); err != nil { - t.Fatalf("%v", err) - } - } - for _, call := range f.calls { - if call == "UpdateUrlMap" { - t.Errorf("UpdateUrlMap() should not have been called") - } - } -} - -func TestNameParsing(t *testing.T) { - clusterName := "123" - firewallName := clusterName - namer := utils.NewNamer(clusterName, firewallName) - fullName := namer.Truncate(fmt.Sprintf("%v-%v", forwardingRulePrefix, namer.LBName("testlb"))) - annotationsMap := map[string]string{ - fmt.Sprintf("%v/forwarding-rule", utils.K8sAnnotationPrefix): fullName, - } - components := namer.ParseName(GCEResourceName(annotationsMap, "forwarding-rule")) - t.Logf("%+v", components) - if components.ClusterName != clusterName { - t.Errorf("Failed to parse cluster name from %v, expected %v got %v", fullName, clusterName, components.ClusterName) - } - resourceName := "fw" - if components.Resource != resourceName { - t.Errorf("Failed to parse resource from %v, expected %v got %v", fullName, resourceName, components.Resource) - } -} - -func TestClusterNameChange(t *testing.T) { - lbInfo := &L7RuntimeInfo{ - Name: "test", - TLS: &TLSCerts{Key: "key", Cert: "cert"}, - } - f := NewFakeLoadBalancers(lbInfo.Name) - pool := newFakeLoadBalancerPool(f, t) - pool.Sync([]*L7RuntimeInfo{lbInfo}) - l7, err := pool.Get(lbInfo.Name) - if err != nil || l7 == nil { - t.Fatalf("Expected l7 not created") - } - um, err := f.GetUrlMap(f.umName()) - if err != nil || - um.DefaultService != pool.(*L7s).glbcDefaultBackend.SelfLink { - t.Fatalf("%v", err) - } - tps, err := f.GetTargetHttpsProxy(f.tpName(true)) - if err != nil || tps.UrlMap != um.SelfLink { - t.Fatalf("%v", err) - } - fws, err := f.GetGlobalForwardingRule(f.fwName(true)) - if err != nil || fws.Target != tps.SelfLink { - t.Fatalf("%v", err) - } - newName := "newName" - namer := pool.(*L7s).namer - namer.SetClusterName(newName) - f.name = fmt.Sprintf("%v--%v", lbInfo.Name, newName) - - // Now the components should get renamed with the next suffix. - pool.Sync([]*L7RuntimeInfo{lbInfo}) - l7, err = pool.Get(lbInfo.Name) - if err != nil || namer.ParseName(l7.Name).ClusterName != newName { - t.Fatalf("Expected L7 name to change.") - } - um, err = f.GetUrlMap(f.umName()) - if err != nil || namer.ParseName(um.Name).ClusterName != newName { - t.Fatalf("Expected urlmap name to change.") - } - if err != nil || - um.DefaultService != pool.(*L7s).glbcDefaultBackend.SelfLink { - t.Fatalf("%v", err) - } - - tps, err = f.GetTargetHttpsProxy(f.tpName(true)) - if err != nil || tps.UrlMap != um.SelfLink { - t.Fatalf("%v", err) - } - fws, err = f.GetGlobalForwardingRule(f.fwName(true)) - if err != nil || fws.Target != tps.SelfLink { - t.Fatalf("%v", err) - } -} - -func TestInvalidClusterNameChange(t *testing.T) { - namer := utils.NewNamer("test--123", "test--123") - if got := namer.GetClusterName(); got != "123" { - t.Fatalf("Expected name 123, got %v", got) - } - // A name with `--` should take the last token - for _, testCase := range []struct{ newName, expected string }{ - {"foo--bar", "bar"}, - {"--", ""}, - {"", ""}, - {"foo--bar--com", "com"}, - } { - namer.SetClusterName(testCase.newName) - if got := namer.GetClusterName(); got != testCase.expected { - t.Fatalf("Expected %q got %q", testCase.expected, got) - } - } - -} diff --git a/controllers/gce/main.go b/controllers/gce/main.go deleted file mode 100644 index 35d9145bd..000000000 --- a/controllers/gce/main.go +++ /dev/null @@ -1,516 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package main - -import ( - "bytes" - go_flag "flag" - "fmt" - "io" - "io/ioutil" - "net/http" - "os" - "os/signal" - "strings" - "syscall" - "time" - - "github.com/golang/glog" - - "github.com/prometheus/client_golang/prometheus/promhttp" - flag "github.com/spf13/pflag" - "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/intstr" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/client-go/kubernetes" - "k8s.io/client-go/rest" - "k8s.io/client-go/tools/clientcmd" - clientcmdapi "k8s.io/client-go/tools/clientcmd/api" - - "k8s.io/ingress/controllers/gce/backends" - "k8s.io/ingress/controllers/gce/controller" - "k8s.io/ingress/controllers/gce/loadbalancers" - "k8s.io/ingress/controllers/gce/storage" - "k8s.io/ingress/controllers/gce/utils" - "k8s.io/kubernetes/pkg/cloudprovider" - "k8s.io/kubernetes/pkg/cloudprovider/providers/gce" -) - -// Entrypoint of GLBC. Example invocation: -// 1. In a pod: -// glbc --delete-all-on-quit -// 2. Dry run (on localhost): -// $ kubectl proxy --api-prefix="/" -// $ glbc --proxy="http://localhost:proxyport" - -const ( - // lbAPIPort is the port on which the loadbalancer controller serves a - // minimal api (/healthz, /delete-all-and-quit etc). - lbAPIPort = 8081 - - // A delimiter used for clarity in naming GCE resources. - clusterNameDelimiter = "--" - - // Arbitrarily chosen alphanumeric character to use in constructing resource - // names, eg: to avoid cases where we end up with a name ending in '-'. - alphaNumericChar = "0" - - // Current docker image version. Only used in debug logging. - imageVersion = "glbc:0.9.6" - - // Key used to persist UIDs to configmaps. - uidConfigMapName = "ingress-uid" - - // Sleep interval to retry cloud client creation. - cloudClientRetryInterval = 10 * time.Second -) - -var ( - flags = flag.NewFlagSet( - `glbc: glbc --running-in-cluster=false`, - flag.ExitOnError) - - clusterName = flags.String("cluster-uid", controller.DefaultClusterUID, - `Optional, used to tag cluster wide, shared loadbalancer resources such - as instance groups. Use this flag if you'd like to continue using the - same resources across a pod restart. Note that this does not need to - match the name of you Kubernetes cluster, it's just an arbitrary name - used to tag/lookup cloud resources.`) - - inCluster = flags.Bool("running-in-cluster", true, - `Optional, if this controller is running in a kubernetes cluster, use the - pod secrets for creating a Kubernetes client.`) - - apiServerHost = flags.String("apiserver-host", "", "The address of the Kubernetes Apiserver "+ - "to connect to in the format of protocol://address:port, e.g., "+ - "http://localhost:8080. If not specified, the assumption is that the binary runs inside a "+ - "Kubernetes cluster and local discovery is attempted.") - kubeConfigFile = flags.String("kubeconfig", "", "Path to kubeconfig file with authorization and master location information.") - - // TODO: Consolidate this flag and running-in-cluster. People already use - // the first one to mean "running in dev", unfortunately. - useRealCloud = flags.Bool("use-real-cloud", false, - `Optional, if set a real cloud client is created. Only matters with - --running-in-cluster=false, i.e a real cloud is always used when this - controller is running on a Kubernetes node.`) - - resyncPeriod = flags.Duration("sync-period", 30*time.Second, - `Relist and confirm cloud resources this often.`) - - deleteAllOnQuit = flags.Bool("delete-all-on-quit", false, - `If true, the controller will delete all Ingress and the associated - external cloud resources as it's shutting down. Mostly used for - testing. In normal environments the controller should only delete - a loadbalancer if the associated Ingress is deleted.`) - - defaultSvc = flags.String("default-backend-service", "kube-system/default-http-backend", - `Service used to serve a 404 page for the default backend. Takes the form - namespace/name. The controller uses the first node port of this Service for - the default backend.`) - - healthCheckPath = flags.String("health-check-path", "/", - `Path used to health-check a backend service. All Services must serve - a 200 page on this path. Currently this is only configurable globally.`) - - watchNamespace = flags.String("watch-namespace", v1.NamespaceAll, - `Namespace to watch for Ingress/Services/Endpoints.`) - - verbose = flags.Bool("verbose", false, - `If true, logs are displayed at V(4), otherwise V(2).`) - - configFilePath = flags.String("config-file-path", "", - `Path to a file containing the gce config. If left unspecified this - controller only works with default zones.`) - - healthzPort = flags.Int("healthz-port", lbAPIPort, - `Port to run healthz server. Must match the health check port in yaml.`) -) - -func registerHandlers(lbc *controller.LoadBalancerController) { - http.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) { - if err := lbc.CloudClusterManager.IsHealthy(); err != nil { - w.WriteHeader(500) - w.Write([]byte(fmt.Sprintf("Cluster unhealthy: %v", err))) - return - } - w.WriteHeader(200) - w.Write([]byte("ok")) - }) - http.Handle("/metrics", promhttp.Handler()) - http.HandleFunc("/delete-all-and-quit", func(w http.ResponseWriter, r *http.Request) { - // TODO: Retry failures during shutdown. - lbc.Stop(true) - }) - - glog.Fatal(http.ListenAndServe(fmt.Sprintf(":%v", *healthzPort), nil)) -} - -func handleSigterm(lbc *controller.LoadBalancerController, deleteAll bool) { - // Multiple SIGTERMs will get dropped - signalChan := make(chan os.Signal, 1) - signal.Notify(signalChan, syscall.SIGTERM) - <-signalChan - glog.Infof("Received SIGTERM, shutting down") - - // TODO: Better retires than relying on restartPolicy. - exitCode := 0 - if err := lbc.Stop(deleteAll); err != nil { - glog.Infof("Error during shutdown %v", err) - exitCode = 1 - } - glog.Infof("Exiting with %v", exitCode) - os.Exit(exitCode) -} - -// main function for GLBC. -func main() { - // TODO: Add a healthz endpoint - var err error - var clusterManager *controller.ClusterManager - - // TODO: We can simply parse all go flags with - // flags.AddGoFlagSet(go_flag.CommandLine) - // but that pollutes --help output with a ton of standard go flags. - // We only really need a binary switch from light, v(2) logging to - // heavier debug style V(4) logging, which we use --verbose for. - flags.Parse(os.Args) - - // Set glog verbosity levels, unconditionally set --alsologtostderr. - go_flag.Lookup("logtostderr").Value.Set("true") - if *verbose { - go_flag.Set("v", "4") - } - glog.Infof("Starting GLBC image: %v, cluster name %v", imageVersion, *clusterName) - if *defaultSvc == "" { - glog.Fatalf("Please specify --default-backend") - } - - var config *rest.Config - // Create kubeclient - if *inCluster { - if config, err = rest.InClusterConfig(); err != nil { - glog.Fatalf("error creating client configuration: %v", err) - } - } else { - if *apiServerHost == "" { - glog.Fatalf("please specify the api server address using the flag --apiserver-host") - } - - config, err = clientcmd.NewNonInteractiveDeferredLoadingClientConfig( - &clientcmd.ClientConfigLoadingRules{ExplicitPath: *kubeConfigFile}, - &clientcmd.ConfigOverrides{ - ClusterInfo: clientcmdapi.Cluster{ - Server: *apiServerHost, - }, - }).ClientConfig() - if err != nil { - glog.Fatalf("error creating client configuration: %v", err) - } - } - - kubeClient, err := kubernetes.NewForConfig(config) - if err != nil { - glog.Fatalf("Failed to create client: %v.", err) - } - - // Wait for the default backend Service. There's no pretty way to do this. - parts := strings.Split(*defaultSvc, "/") - if len(parts) != 2 { - glog.Fatalf("Default backend should take the form namespace/name: %v", - *defaultSvc) - } - port, nodePort, err := getNodePort(kubeClient, parts[0], parts[1]) - if err != nil { - glog.Fatalf("Could not configure default backend %v: %v", - *defaultSvc, err) - } - // The default backend is known to be HTTP - defaultBackendNodePort := backends.ServicePort{ - Port: int64(nodePort), - Protocol: utils.ProtocolHTTP, - SvcName: types.NamespacedName{Namespace: parts[0], Name: parts[1]}, - SvcPort: intstr.FromInt(int(port)), - } - - var cloud *gce.GCECloud - if *inCluster || *useRealCloud { - // Create cluster manager - namer, err := newNamer(kubeClient, *clusterName, controller.DefaultFirewallName) - if err != nil { - glog.Fatalf("%v", err) - } - - // TODO: Make this more resilient. Currently we create the cloud client - // and pass it through to all the pools. This makes unit testing easier. - // However if the cloud client suddenly fails, we should try to re-create it - // and continue. - if *configFilePath != "" { - glog.Infof("Reading config from path %v", configFilePath) - config, err := os.Open(*configFilePath) - if err != nil { - glog.Fatalf("%v", err) - } - defer config.Close() - cloud = getGCEClient(config) - glog.Infof("Successfully loaded cloudprovider using config %q", configFilePath) - } else { - // While you might be tempted to refactor so we simply assing nil to the - // config and only invoke getGCEClient once, that will not do the right - // thing because a nil check against an interface isn't true in golang. - cloud = getGCEClient(nil) - glog.Infof("Created GCE client without a config file") - } - - clusterManager, err = controller.NewClusterManager(cloud, namer, defaultBackendNodePort, *healthCheckPath) - if err != nil { - glog.Fatalf("%v", err) - } - } else { - // Create fake cluster manager - clusterManager = controller.NewFakeClusterManager(*clusterName, controller.DefaultFirewallName).ClusterManager - } - - ctx := controller.NewControllerContext(kubeClient, *watchNamespace, *resyncPeriod) - - // Start loadbalancer controller - lbc, err := controller.NewLoadBalancerController(kubeClient, ctx, clusterManager) - if err != nil { - glog.Fatalf("%v", err) - } - - if clusterManager.ClusterNamer.GetClusterName() != "" { - glog.V(3).Infof("Cluster name %+v", clusterManager.ClusterNamer.GetClusterName()) - } - clusterManager.Init(&controller.GCETranslator{LoadBalancerController: lbc}) - go registerHandlers(lbc) - go handleSigterm(lbc, *deleteAllOnQuit) - - ctx.Start() - lbc.Run() - for { - glog.Infof("Handled quit, awaiting pod deletion.") - time.Sleep(30 * time.Second) - } -} - -func newNamer(kubeClient kubernetes.Interface, clusterName string, fwName string) (*utils.Namer, error) { - name, err := getClusterUID(kubeClient, clusterName) - if err != nil { - return nil, err - } - fw_name, err := getFirewallName(kubeClient, fwName, name) - if err != nil { - return nil, err - } - - namer := utils.NewNamer(name, fw_name) - uidVault := storage.NewConfigMapVault(kubeClient, metav1.NamespaceSystem, uidConfigMapName) - - // Start a goroutine to poll the cluster UID config map - // We don't watch because we know exactly which configmap we want and this - // controller already watches 5 other resources, so it isn't worth the cost - // of another connection and complexity. - go wait.Forever(func() { - for _, key := range [...]string{storage.UidDataKey, storage.ProviderDataKey} { - val, found, err := uidVault.Get(key) - if err != nil { - glog.Errorf("Can't read uidConfigMap %v", uidConfigMapName) - } else if !found { - errmsg := fmt.Sprintf("Can't read %v from uidConfigMap %v", key, uidConfigMapName) - if key == storage.UidDataKey { - glog.Errorf(errmsg) - } else { - glog.V(4).Infof(errmsg) - } - } else { - - switch key { - case storage.UidDataKey: - if uid := namer.GetClusterName(); uid != val { - glog.Infof("Cluster uid changed from %v -> %v", uid, val) - namer.SetClusterName(val) - } - case storage.ProviderDataKey: - if fw_name := namer.GetFirewallName(); fw_name != val { - glog.Infof("Cluster firewall name changed from %v -> %v", fw_name, val) - namer.SetFirewallName(val) - } - } - } - } - }, 5*time.Second) - return namer, nil -} - -// useDefaultOrLookupVault returns either a 'default_name' or if unset, obtains a name from a ConfigMap. -// The returned value follows this priority: -// If the provided 'default_name' is not empty, that name is used. -// This is effectively a client override via a command line flag. -// else, check cfgVault with 'cm_key' as a key and if found, use the associated value -// else, return an empty 'name' and pass along an error iff the configmap lookup is erroneous. -func useDefaultOrLookupVault(cfgVault *storage.ConfigMapVault, cm_key, default_name string) (string, error) { - if default_name != "" { - glog.Infof("Using user provided %v %v", cm_key, default_name) - // Don't save the uid in the vault, so users can rollback through - // setting the accompany flag to "" - return default_name, nil - } - val, found, err := cfgVault.Get(cm_key) - if err != nil { - // This can fail because of: - // 1. No such config map - found=false, err=nil - // 2. No such key in config map - found=false, err=nil - // 3. Apiserver flake - found=false, err!=nil - // It is not safe to proceed in 3. - return "", fmt.Errorf("failed to retrieve %v: %v, returning empty name", cm_key, err) - } else if !found { - // Not found but safe to proceed. - return "", nil - } - glog.Infof("Using %v = %q saved in ConfigMap", cm_key, val) - return val, nil -} - -// getFirewallName returns the firewall rule name to use for this cluster. For -// backwards compatibility, the firewall name will default to the cluster UID. -// Use getFlagOrLookupVault to obtain a stored or overridden value for the firewall name. -// else, use the cluster UID as a backup (this retains backwards compatibility). -func getFirewallName(kubeClient kubernetes.Interface, name, cluster_uid string) (string, error) { - cfgVault := storage.NewConfigMapVault(kubeClient, metav1.NamespaceSystem, uidConfigMapName) - if fw_name, err := useDefaultOrLookupVault(cfgVault, storage.ProviderDataKey, name); err != nil { - return "", err - } else if fw_name != "" { - return fw_name, cfgVault.Put(storage.ProviderDataKey, fw_name) - } else { - glog.Infof("Using cluster UID %v as firewall name", cluster_uid) - return cluster_uid, cfgVault.Put(storage.ProviderDataKey, cluster_uid) - } -} - -// getClusterUID returns the cluster UID. Rules for UID generation: -// If the user specifies a --cluster-uid param it overwrites everything -// else, check UID config map for a previously recorded uid -// else, check if there are any working Ingresses -// - remember that "" is the cluster uid -// else, allocate a new uid -func getClusterUID(kubeClient kubernetes.Interface, name string) (string, error) { - cfgVault := storage.NewConfigMapVault(kubeClient, metav1.NamespaceSystem, uidConfigMapName) - if name, err := useDefaultOrLookupVault(cfgVault, storage.UidDataKey, name); err != nil { - return "", err - } else if name != "" { - return name, nil - } - - // Check if the cluster has an Ingress with ip - ings, err := kubeClient.Extensions().Ingresses(metav1.NamespaceAll).List(metav1.ListOptions{ - LabelSelector: labels.Everything().String(), - }) - if err != nil { - return "", err - } - namer := utils.Namer{} - for _, ing := range ings.Items { - if len(ing.Status.LoadBalancer.Ingress) != 0 { - c := namer.ParseName(loadbalancers.GCEResourceName(ing.Annotations, "forwarding-rule")) - if c.ClusterName != "" { - return c.ClusterName, cfgVault.Put(storage.UidDataKey, c.ClusterName) - } - glog.Infof("Found a working Ingress, assuming uid is empty string") - return "", cfgVault.Put(storage.UidDataKey, "") - } - } - - // Allocate new uid - f, err := os.Open("/dev/urandom") - if err != nil { - return "", err - } - defer f.Close() - b := make([]byte, 8) - if _, err := f.Read(b); err != nil { - return "", err - } - uid := fmt.Sprintf("%x", b) - return uid, cfgVault.Put(storage.UidDataKey, uid) -} - -// getNodePort waits for the Service, and returns it's first node port. -func getNodePort(client kubernetes.Interface, ns, name string) (port, nodePort int32, err error) { - var svc *v1.Service - glog.V(3).Infof("Waiting for %v/%v", ns, name) - wait.Poll(1*time.Second, 5*time.Minute, func() (bool, error) { - svc, err = client.Core().Services(ns).Get(name, metav1.GetOptions{}) - if err != nil { - return false, nil - } - for _, p := range svc.Spec.Ports { - if p.NodePort != 0 { - port = p.Port - nodePort = p.NodePort - glog.V(3).Infof("Node port %v", nodePort) - break - } - } - return true, nil - }) - return -} - -func getGCEClient(config io.Reader) *gce.GCECloud { - getConfigReader := func() io.Reader { return nil } - - if config != nil { - allConfig, err := ioutil.ReadAll(config) - if err != nil { - glog.Fatalf("Error while reading entire config: %v", err) - } - glog.V(2).Infof("Using cloudprovider config file:\n%v ", string(allConfig)) - - getConfigReader = func() io.Reader { - return bytes.NewReader(allConfig) - } - } else { - glog.V(2).Infoln("No cloudprovider config file provided. Continuing with default values.") - } - - // Creating the cloud interface involves resolving the metadata server to get - // an oauth token. If this fails, the token provider assumes it's not on GCE. - // No errors are thrown. So we need to keep retrying till it works because - // we know we're on GCE. - for { - cloudInterface, err := cloudprovider.GetCloudProvider("gce", getConfigReader()) - if err == nil { - cloud := cloudInterface.(*gce.GCECloud) - - // If this controller is scheduled on a node without compute/rw - // it won't be allowed to list backends. We can assume that the - // user has no need for Ingress in this case. If they grant - // permissions to the node they will have to restart the controller - // manually to re-create the client. - if _, err = cloud.ListGlobalBackendServices(); err == nil || utils.IsHTTPErrorCode(err, http.StatusForbidden) { - return cloud - } - glog.Warningf("Failed to list backend services, retrying: %v", err) - } else { - glog.Warningf("Failed to retrieve cloud interface, retrying: %v", err) - } - time.Sleep(cloudClientRetryInterval) - } -} diff --git a/controllers/gce/rc.yaml b/controllers/gce/rc.yaml deleted file mode 100644 index 252bc1175..000000000 --- a/controllers/gce/rc.yaml +++ /dev/null @@ -1,83 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - # This must match the --default-backend-service argument of the l7 lb - # controller and is required because GCE mandates a default backend. - name: default-http-backend - labels: - k8s-app: glbc -spec: - # The default backend must be of type NodePort. - type: NodePort - ports: - - port: 80 - targetPort: 8080 - protocol: TCP - name: http - selector: - k8s-app: glbc - ---- -apiVersion: v1 -kind: ReplicationController -metadata: - name: l7-lb-controller - labels: - k8s-app: glbc - version: v0.9.6 -spec: - # There should never be more than 1 controller alive simultaneously. - replicas: 1 - selector: - k8s-app: glbc - version: v0.9.6 - template: - metadata: - labels: - k8s-app: glbc - version: v0.9.6 - name: glbc - spec: - terminationGracePeriodSeconds: 600 - containers: - - name: default-http-backend - # Any image is permissable as long as: - # 1. It serves a 404 page at / - # 2. It serves 200 on a /healthz endpoint - image: gcr.io/google_containers/defaultbackend:1.0 - livenessProbe: - httpGet: - path: /healthz - port: 8080 - scheme: HTTP - initialDelaySeconds: 30 - timeoutSeconds: 5 - ports: - - containerPort: 8080 - resources: - limits: - cpu: 10m - memory: 20Mi - requests: - cpu: 10m - memory: 20Mi - - image: gcr.io/google_containers/glbc:0.9.6 - livenessProbe: - httpGet: - path: /healthz - port: 8081 - scheme: HTTP - initialDelaySeconds: 30 - timeoutSeconds: 5 - name: l7-lb-controller - resources: - limits: - cpu: 100m - memory: 100Mi - requests: - cpu: 100m - memory: 50Mi - args: - - --apiserver-host=http://localhost:8080 - - --default-backend-service=default/default-http-backend - - --sync-period=300s diff --git a/controllers/gce/storage/configmaps.go b/controllers/gce/storage/configmaps.go deleted file mode 100644 index 1c3089c15..000000000 --- a/controllers/gce/storage/configmaps.go +++ /dev/null @@ -1,199 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package storage - -import ( - "fmt" - "strings" - "sync" - - "github.com/golang/glog" - - api_v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/kubernetes" - "k8s.io/client-go/tools/cache" -) - -const ( - // UidDataKey is the key used in config maps to store the UID. - UidDataKey = "uid" - // ProviderDataKey is the key used in config maps to store the Provider - // UID which we use to ensure unique firewalls. - ProviderDataKey = "provider-uid" -) - -// ConfigMapVault stores cluster UIDs in config maps. -// It's a layer on top of ConfigMapStore that just implements the utils.uidVault -// interface. -type ConfigMapVault struct { - storeLock sync.Mutex - ConfigMapStore cache.Store - namespace string - name string -} - -// Get retrieves the value associated to the provided 'key' from the cluster config map. -// If this method returns an error, it's guaranteed to be apiserver flake. -// If the error is a not found error it sets the boolean to false and -// returns and error of nil instead. -func (c *ConfigMapVault) Get(key string) (string, bool, error) { - keyStore := fmt.Sprintf("%v/%v", c.namespace, c.name) - item, found, err := c.ConfigMapStore.GetByKey(keyStore) - if err != nil || !found { - return "", false, err - } - data := item.(*api_v1.ConfigMap).Data - c.storeLock.Lock() - defer c.storeLock.Unlock() - if k, ok := data[key]; ok { - return k, true, nil - } - glog.Infof("Found config map %v but it doesn't contain key %v: %+v", keyStore, key, data) - return "", false, nil -} - -// Put inserts a key/value pair in the cluster config map. -// If the key already exists, the value provided is stored. -func (c *ConfigMapVault) Put(key, val string) error { - c.storeLock.Lock() - defer c.storeLock.Unlock() - apiObj := &api_v1.ConfigMap{ - ObjectMeta: metav1.ObjectMeta{ - Name: c.name, - Namespace: c.namespace, - }, - } - cfgMapKey := fmt.Sprintf("%v/%v", c.namespace, c.name) - - item, exists, err := c.ConfigMapStore.GetByKey(cfgMapKey) - if err == nil && exists { - data := item.(*api_v1.ConfigMap).Data - existingVal, ok := data[key] - if ok && existingVal == val { - // duplicate, no need to update. - return nil - } - data[key] = val - apiObj.Data = data - if existingVal != val { - glog.Infof("Configmap %v has key %v but wrong value %v, updating to %v", cfgMapKey, key, existingVal, val) - } else { - glog.Infof("Configmap %v will be updated with %v = %v", cfgMapKey, key, val) - } - if err := c.ConfigMapStore.Update(apiObj); err != nil { - return fmt.Errorf("failed to update %v: %v", cfgMapKey, err) - } - } else { - apiObj.Data = map[string]string{key: val} - if err := c.ConfigMapStore.Add(apiObj); err != nil { - return fmt.Errorf("failed to add %v: %v", cfgMapKey, err) - } - } - glog.Infof("Successfully stored key %v = %v in config map %v", key, val, cfgMapKey) - return nil -} - -// Delete deletes the ConfigMapStore. -func (c *ConfigMapVault) Delete() error { - cfgMapKey := fmt.Sprintf("%v/%v", c.namespace, c.name) - item, _, err := c.ConfigMapStore.GetByKey(cfgMapKey) - if err == nil { - return c.ConfigMapStore.Delete(item) - } - glog.Warningf("Couldn't find item %v in vault, unable to delete", cfgMapKey) - return nil -} - -// NewConfigMapVault creates a config map client. -// This client is essentially meant to abstract out the details of -// configmaps and the API, and just store/retrieve a single value, the cluster uid. -func NewConfigMapVault(c kubernetes.Interface, uidNs, uidConfigMapName string) *ConfigMapVault { - return &ConfigMapVault{ - ConfigMapStore: NewConfigMapStore(c), - namespace: uidNs, - name: uidConfigMapName} -} - -// NewFakeConfigMapVault is an implementation of the ConfigMapStore that doesn't -// persist configmaps. Only used in testing. -func NewFakeConfigMapVault(ns, name string) *ConfigMapVault { - return &ConfigMapVault{ - ConfigMapStore: cache.NewStore(cache.MetaNamespaceKeyFunc), - namespace: ns, - name: name} -} - -// ConfigMapStore wraps the store interface. Implementations usually persist -// contents of the store transparently. -type ConfigMapStore interface { - cache.Store -} - -// APIServerConfigMapStore only services Add and GetByKey from apiserver. -// TODO: Implement all the other store methods and make this a write -// through cache. -type APIServerConfigMapStore struct { - ConfigMapStore - client kubernetes.Interface -} - -// Add adds the given config map to the apiserver's store. -func (a *APIServerConfigMapStore) Add(obj interface{}) error { - cfg := obj.(*api_v1.ConfigMap) - _, err := a.client.Core().ConfigMaps(cfg.Namespace).Create(cfg) - return err -} - -// Update updates the existing config map object. -func (a *APIServerConfigMapStore) Update(obj interface{}) error { - cfg := obj.(*api_v1.ConfigMap) - _, err := a.client.Core().ConfigMaps(cfg.Namespace).Update(cfg) - return err -} - -// Delete deletes the existing config map object. -func (a *APIServerConfigMapStore) Delete(obj interface{}) error { - cfg := obj.(*api_v1.ConfigMap) - return a.client.Core().ConfigMaps(cfg.Namespace).Delete(cfg.Name, &metav1.DeleteOptions{}) -} - -// GetByKey returns the config map for a given key. -// The key must take the form namespace/name. -func (a *APIServerConfigMapStore) GetByKey(key string) (item interface{}, exists bool, err error) { - nsName := strings.Split(key, "/") - if len(nsName) != 2 { - return nil, false, fmt.Errorf("failed to get key %v, unexpecte format, expecting ns/name", key) - } - ns, name := nsName[0], nsName[1] - cfg, err := a.client.Core().ConfigMaps(ns).Get(name, metav1.GetOptions{}) - if err != nil { - // Translate not found errors to found=false, err=nil - if errors.IsNotFound(err) { - return nil, false, nil - } - return nil, false, err - } - return cfg, true, nil -} - -// NewConfigMapStore returns a config map store capable of persisting updates -// to apiserver. -func NewConfigMapStore(c kubernetes.Interface) ConfigMapStore { - return &APIServerConfigMapStore{ConfigMapStore: cache.NewStore(cache.MetaNamespaceKeyFunc), client: c} -} diff --git a/controllers/gce/storage/configmaps_test.go b/controllers/gce/storage/configmaps_test.go deleted file mode 100644 index 2c40fdeae..000000000 --- a/controllers/gce/storage/configmaps_test.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package storage - -import ( - "testing" - - api "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -func TestConfigMapUID(t *testing.T) { - vault := NewFakeConfigMapVault(api.NamespaceSystem, "ingress-uid") - // Get value from an empty vault. - val, exists, err := vault.Get(UidDataKey) - if exists { - t.Errorf("Got value from an empty vault") - } - - // Store empty value for UidDataKey. - uid := "" - vault.Put(UidDataKey, uid) - val, exists, err = vault.Get(UidDataKey) - if !exists || err != nil { - t.Errorf("Failed to retrieve value from vault: %v", err) - } - if val != "" { - t.Errorf("Failed to store empty string as a key in the vault") - } - - // Store actual value in key. - storedVal := "newuid" - vault.Put(UidDataKey, storedVal) - val, exists, err = vault.Get(UidDataKey) - if !exists || err != nil { - t.Errorf("Failed to retrieve value from vault") - } else if val != storedVal { - t.Errorf("Failed to store empty string as a key in the vault") - } - - // Store second value which will have the affect of updating to Store - // rather than adding. - secondVal := "bar" - vault.Put("foo", secondVal) - val, exists, err = vault.Get("foo") - if !exists || err != nil || val != secondVal { - t.Errorf("Failed to retrieve second value from vault") - } - val, exists, err = vault.Get(UidDataKey) - if !exists || err != nil || val != storedVal { - t.Errorf("Failed to retrieve first value from vault") - } - - // Delete value. - if err := vault.Delete(); err != nil { - t.Errorf("Failed to delete uid %v", err) - } - if _, exists, _ := vault.Get(UidDataKey); exists { - t.Errorf("Found uid but expected none after deletion") - } -} diff --git a/controllers/gce/storage/doc.go b/controllers/gce/storage/doc.go deleted file mode 100644 index 492d30a49..000000000 --- a/controllers/gce/storage/doc.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Storage backends used by the Ingress controller. -// Ingress controllers require their own storage for the following reasons: -// 1. There is only so much information we can pack into 64 chars allowed -// by GCE for resource names. -// 2. An Ingress controller cannot assume total control over a project, in -// fact in a majority of cases (ubernetes, tests, multiple gke clusters in -// same project) there *will* be multiple controllers in a project. -// 3. If the Ingress controller pod is killed, an Ingress is deleted while -// the pod is down, and then the controller is re-scheduled on another node, -// it will leak resources. Note that this will happen today because -// the only implemented storage backend is InMemoryPool. -// 4. Listing from cloudproviders is really slow. - -package storage diff --git a/controllers/gce/storage/pools.go b/controllers/gce/storage/pools.go deleted file mode 100644 index 2ced272de..000000000 --- a/controllers/gce/storage/pools.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package storage - -import ( - "sync" - "time" - - "github.com/golang/glog" - - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/client-go/tools/cache" -) - -// Snapshotter is an interface capable of providing a consistent snapshot of -// the underlying storage implementation of a pool. It does not guarantee -// thread safety of snapshots, so they should be treated as read only unless -// the implementation specifies otherwise. -type Snapshotter interface { - Snapshot() map[string]interface{} - cache.ThreadSafeStore -} - -// InMemoryPool is used as a cache for cluster resource pools. -type InMemoryPool struct { - cache.ThreadSafeStore -} - -// Snapshot returns a read only copy of the k:v pairs in the store. -// Caller beware: Violates traditional snapshot guarantees. -func (p *InMemoryPool) Snapshot() map[string]interface{} { - snap := map[string]interface{}{} - for _, key := range p.ListKeys() { - if item, ok := p.Get(key); ok { - snap[key] = item - } - } - return snap -} - -// NewInMemoryPool creates an InMemoryPool. -func NewInMemoryPool() *InMemoryPool { - return &InMemoryPool{ - cache.NewThreadSafeStore(cache.Indexers{}, cache.Indices{})} -} - -type keyFunc func(interface{}) (string, error) - -type cloudLister interface { - List() ([]interface{}, error) -} - -// CloudListingPool wraps InMemoryPool but relists from the cloud periodically. -type CloudListingPool struct { - // A lock to protect against concurrent mutation of the pool - lock sync.Mutex - // The pool that is re-populated via re-list from cloud, and written to - // from controller - *InMemoryPool - // An interface that lists objects from the cloud. - lister cloudLister - // A function capable of producing a key for a given object. - // This key must match the key used to store the same object in the user of - // this cache. - keyGetter keyFunc -} - -// ReplenishPool lists through the cloudLister and inserts into the pool. This -// is especially useful in scenarios like deleting an Ingress while the -// controller is restarting. As long as the resource exists in the shared -// memory pool, it is visible to the caller and they can take corrective -// actions, eg: backend pool deletes backends with non-matching node ports -// in its sync method. -func (c *CloudListingPool) ReplenishPool() { - c.lock.Lock() - defer c.lock.Unlock() - glog.V(4).Infof("Replenishing pool") - - // We must list with the lock, because the controller also lists through - // Snapshot(). It's ok if the controller takes a snpshot, we list, we - // delete, because we have delete based on the most recent state. Worst - // case we thrash. It's not ok if we list, the controller lists and - // creates a backend, and we delete that backend based on stale state. - items, err := c.lister.List() - if err != nil { - glog.Warningf("Failed to list: %v", err) - return - } - - for i := range items { - key, err := c.keyGetter(items[i]) - if err != nil { - glog.V(5).Infof("CloudListingPool: %v", err) - continue - } - c.InMemoryPool.Add(key, items[i]) - } -} - -// Snapshot just snapshots the underlying pool. -func (c *CloudListingPool) Snapshot() map[string]interface{} { - c.lock.Lock() - defer c.lock.Unlock() - return c.InMemoryPool.Snapshot() -} - -// Add simply adds to the underlying pool. -func (c *CloudListingPool) Add(key string, obj interface{}) { - c.lock.Lock() - defer c.lock.Unlock() - c.InMemoryPool.Add(key, obj) -} - -// Delete just deletes from underlying pool. -func (c *CloudListingPool) Delete(key string) { - c.lock.Lock() - defer c.lock.Unlock() - c.InMemoryPool.Delete(key) -} - -// NewCloudListingPool replenishes the InMemoryPool through a background -// goroutine that lists from the given cloudLister. -func NewCloudListingPool(k keyFunc, lister cloudLister, relistPeriod time.Duration) *CloudListingPool { - cl := &CloudListingPool{ - InMemoryPool: NewInMemoryPool(), - lister: lister, - keyGetter: k, - } - glog.V(4).Infof("Starting pool replenish goroutine") - go wait.Until(cl.ReplenishPool, relistPeriod, make(chan struct{})) - return cl -} diff --git a/controllers/gce/utils/utils.go b/controllers/gce/utils/utils.go deleted file mode 100644 index c0486f557..000000000 --- a/controllers/gce/utils/utils.go +++ /dev/null @@ -1,361 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package utils - -import ( - "fmt" - "net/http" - "regexp" - "strconv" - "strings" - "sync" - - "github.com/golang/glog" - compute "google.golang.org/api/compute/v1" - "google.golang.org/api/googleapi" -) - -const ( - // Add used to record additions in a sync pool. - Add = iota - // Remove used to record removals from a sync pool. - Remove - // Sync used to record syncs of a sync pool. - Sync - // Get used to record Get from a sync pool. - Get - // Create used to record creations in a sync pool. - Create - // Update used to record updates in a sync pool. - Update - // Delete used to record deltions from a sync pool. - Delete - // AddInstances used to record a call to AddInstances. - AddInstances - // RemoveInstances used to record a call to RemoveInstances. - RemoveInstances - - // This allows sharing of backends across loadbalancers. - backendPrefix = "k8s-be" - backendRegex = "k8s-be-([0-9]+).*" - - // Prefix used for instance groups involved in L7 balancing. - igPrefix = "k8s-ig" - - // Suffix used in the l7 firewall rule. There is currently only one. - // Note that this name is used by the cloudprovider lib that inserts its - // own k8s-fw prefix. - globalFirewallSuffix = "l7" - - // A delimiter used for clarity in naming GCE resources. - clusterNameDelimiter = "--" - - // Arbitrarily chosen alphanumeric character to use in constructing resource - // names, eg: to avoid cases where we end up with a name ending in '-'. - alphaNumericChar = "0" - - // Names longer than this are truncated, because of GCE restrictions. - nameLenLimit = 62 - - // DefaultBackendKey is the key used to transmit the defaultBackend through - // a urlmap. It's not a valid subdomain, and it is a catch all path. - // TODO: Find a better way to transmit this, once we've decided on default - // backend semantics (i.e do we want a default per host, per lb etc). - DefaultBackendKey = "DefaultBackend" - - // K8sAnnotationPrefix is the prefix used in annotations used to record - // debug information in the Ingress annotations. - K8sAnnotationPrefix = "ingress.kubernetes.io" - - // ProtocolHTTP protocol for a service - ProtocolHTTP AppProtocol = "HTTP" - // ProtocolHTTPS protocol for a service - ProtocolHTTPS AppProtocol = "HTTPS" -) - -type AppProtocol string - -// Namer handles centralized naming for the cluster. -type Namer struct { - clusterName string - firewallName string - nameLock sync.Mutex -} - -// NewNamer creates a new namer with a Cluster and Firewall name. -func NewNamer(clusterName, firewallName string) *Namer { - namer := &Namer{} - namer.SetClusterName(clusterName) - namer.SetFirewallName(firewallName) - return namer -} - -// NameComponents is a struct representing the components of a a GCE resource -// name constructed by the namer. The format of such a name is: -// k8s-resource---uid -type NameComponents struct { - ClusterName, Resource, Metadata string -} - -// SetClusterName sets the UID/name of this cluster. -func (n *Namer) SetClusterName(name string) { - n.nameLock.Lock() - defer n.nameLock.Unlock() - if strings.Contains(name, clusterNameDelimiter) { - tokens := strings.Split(name, clusterNameDelimiter) - glog.Warningf("Given name %v contains %v, taking last token in: %+v", name, clusterNameDelimiter, tokens) - name = tokens[len(tokens)-1] - } - glog.Infof("Changing cluster name from %v to %v", n.clusterName, name) - n.clusterName = name -} - -// SetFirewallName sets the firewall name of this cluster. -func (n *Namer) SetFirewallName(firewall_name string) { - n.nameLock.Lock() - defer n.nameLock.Unlock() - if n.firewallName != firewall_name { - glog.Infof("Changing firewall name from %v to %v", n.firewallName, firewall_name) - n.firewallName = firewall_name - } -} - -// GetClusterName returns the UID/name of this cluster. -func (n *Namer) GetClusterName() string { - n.nameLock.Lock() - defer n.nameLock.Unlock() - return n.clusterName -} - -// GetFirewallName returns the firewall name of this cluster. -func (n *Namer) GetFirewallName() string { - n.nameLock.Lock() - defer n.nameLock.Unlock() - // Retain backwards compatible behavior where firewallName == clusterName. - if n.firewallName == "" { - return n.clusterName - } else { - return n.firewallName - } -} - -// Truncate truncates the given key to a GCE length limit. -func (n *Namer) Truncate(key string) string { - if len(key) > nameLenLimit { - // GCE requires names to end with an albhanumeric, but allows characters - // like '-', so make sure the trucated name ends legally. - return fmt.Sprintf("%v%v", key[:nameLenLimit], alphaNumericChar) - } - return key -} - -func (n *Namer) decorateName(name string) string { - clusterName := n.GetClusterName() - if clusterName == "" { - return name - } - return n.Truncate(fmt.Sprintf("%v%v%v", name, clusterNameDelimiter, clusterName)) -} - -// ParseName parses the name of a resource generated by the namer. -func (n *Namer) ParseName(name string) *NameComponents { - l := strings.Split(name, clusterNameDelimiter) - var uid, resource string - if len(l) >= 2 { - uid = l[len(l)-1] - } - c := strings.Split(name, "-") - if len(c) >= 2 { - resource = c[1] - } - return &NameComponents{ - ClusterName: uid, - Resource: resource, - } -} - -// NameBelongsToCluster checks if a given name is tagged with this cluster's UID. -func (n *Namer) NameBelongsToCluster(name string) bool { - if !strings.HasPrefix(name, "k8s-") { - return false - } - parts := strings.Split(name, clusterNameDelimiter) - clusterName := n.GetClusterName() - if len(parts) == 1 { - if clusterName == "" { - return true - } - return false - } - if len(parts) > 2 { - return false - } - return parts[1] == clusterName -} - -// BeName constructs the name for a backend. -func (n *Namer) BeName(port int64) string { - return n.decorateName(fmt.Sprintf("%v-%d", backendPrefix, port)) -} - -// BePort retrieves the port from the given backend name. -func (n *Namer) BePort(beName string) (string, error) { - r, err := regexp.Compile(backendRegex) - if err != nil { - return "", err - } - match := r.FindStringSubmatch(beName) - if len(match) < 2 { - return "", fmt.Errorf("unable to lookup port for %v", beName) - } - _, err = strconv.Atoi(match[1]) - if err != nil { - return "", fmt.Errorf("unexpected regex match: %v", beName) - } - return match[1], nil -} - -// IGName constructs the name for an Instance Group. -func (n *Namer) IGName() string { - // Currently all ports are added to a single instance group. - return n.decorateName(igPrefix) -} - -// FrSuffix constructs the glbc specific suffix for the FirewallRule. -func (n *Namer) FrSuffix() string { - firewallName := n.GetFirewallName() - // The entire cluster only needs a single firewall rule. - if firewallName == "" { - return globalFirewallSuffix - } - return n.Truncate(fmt.Sprintf("%v%v%v", globalFirewallSuffix, clusterNameDelimiter, firewallName)) -} - -// FrName constructs the full firewall rule name, this is the name assigned by -// the cloudprovider lib + suffix from glbc, so we don't mix this rule with a -// rule created for L4 loadbalancing. -func (n *Namer) FrName(suffix string) string { - return fmt.Sprintf("k8s-fw-%s", suffix) -} - -// LBName constructs a loadbalancer name from the given key. The key is usually -// the namespace/name of a Kubernetes Ingress. -func (n *Namer) LBName(key string) string { - // TODO: Pipe the clusterName through, for now it saves code churn to just - // grab it globally, especially since we haven't decided how to handle - // namespace conflicts in the Ubernetes context. - parts := strings.Split(key, clusterNameDelimiter) - scrubbedName := strings.Replace(key, "/", "-", -1) - clusterName := n.GetClusterName() - if clusterName == "" || parts[len(parts)-1] == clusterName { - return scrubbedName - } - return n.Truncate(fmt.Sprintf("%v%v%v", scrubbedName, clusterNameDelimiter, clusterName)) -} - -// GCEURLMap is a nested map of hostname->path regex->backend -type GCEURLMap map[string]map[string]*compute.BackendService - -// GetDefaultBackend performs a destructive read and returns the default -// backend of the urlmap. -func (g GCEURLMap) GetDefaultBackend() *compute.BackendService { - var d *compute.BackendService - var exists bool - if h, ok := g[DefaultBackendKey]; ok { - if d, exists = h[DefaultBackendKey]; exists { - delete(h, DefaultBackendKey) - } - delete(g, DefaultBackendKey) - } - return d -} - -// String implements the string interface for the GCEURLMap. -func (g GCEURLMap) String() string { - msg := "" - for host, um := range g { - msg += fmt.Sprintf("%v\n", host) - for url, be := range um { - msg += fmt.Sprintf("\t%v: ", url) - if be == nil { - msg += fmt.Sprintf("No backend\n") - } else { - msg += fmt.Sprintf("%v\n", be.Name) - } - } - } - return msg -} - -// PutDefaultBackend performs a destructive write replacing the -// default backend of the url map with the given backend. -func (g GCEURLMap) PutDefaultBackend(d *compute.BackendService) { - g[DefaultBackendKey] = map[string]*compute.BackendService{ - DefaultBackendKey: d, - } -} - -// FakeGoogleAPINotFoundErr creates a NotFound error with type googleapi.Error -func FakeGoogleAPINotFoundErr() *googleapi.Error { - return &googleapi.Error{Code: 404} -} - -// IsHTTPErrorCode checks if the given error matches the given HTTP Error code. -// For this to work the error must be a googleapi Error. -func IsHTTPErrorCode(err error, code int) bool { - apiErr, ok := err.(*googleapi.Error) - return ok && apiErr.Code == code -} - -// IgnoreHTTPNotFound returns the passed err if it's not a GoogleAPI error -// with a NotFound status code. -func IgnoreHTTPNotFound(err error) error { - if err != nil && IsHTTPErrorCode(err, http.StatusNotFound) { - return nil - } - return err -} - -// IsInUsedByError returns true if the resource is being used by another GCP resource -func IsInUsedByError(err error) bool { - apiErr, ok := err.(*googleapi.Error) - if !ok || apiErr.Code != http.StatusBadRequest { - return false - } - return strings.Contains(apiErr.Message, "being used by") -} - -// IsNotFoundError returns true if the resource does not exist -func IsNotFoundError(err error) bool { - return IsHTTPErrorCode(err, http.StatusNotFound) -} - -// CompareLinks returns true if the 2 self links are equal. -func CompareLinks(l1, l2 string) bool { - // TODO: These can be partial links - return l1 == l2 && l1 != "" -} - -// FakeIngressRuleValueMap is a convenience type used by multiple submodules -// that share the same testing methods. -type FakeIngressRuleValueMap map[string]string - -// GetNamedPort creates the NamedPort API object for the given port. -func GetNamedPort(port int64) *compute.NamedPort { - // TODO: move port naming to namer - return &compute.NamedPort{Name: fmt.Sprintf("port%v", port), Port: port} -} diff --git a/controllers/nginx/.gitignore b/controllers/nginx/.gitignore deleted file mode 100644 index f7fc6d3ef..000000000 --- a/controllers/nginx/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -rootfs/nginx-ingress-controller -*/**/.coverprofile \ No newline at end of file diff --git a/controllers/nginx/Makefile b/controllers/nginx/Makefile deleted file mode 100644 index d467e0c20..000000000 --- a/controllers/nginx/Makefile +++ /dev/null @@ -1,136 +0,0 @@ -all: push - -BUILDTAGS= - -# Use the 0.0 tag for testing, it shouldn't clobber any release builds -TAG?=0.9.0-beta.15 -REGISTRY?=gcr.io/google_containers -GOOS?=linux -DOCKER?=gcloud docker -- -SED_I?=sed -i -GOHOSTOS ?= $(shell go env GOHOSTOS) - -ifeq ($(GOHOSTOS),darwin) - SED_I=sed -i '' -endif - -REPO_INFO=$(shell git config --get remote.origin.url) - -ifndef COMMIT - COMMIT := git-$(shell git rev-parse --short HEAD) -endif - -PKG=k8s.io/ingress/controllers/nginx - -ARCH ?= $(shell go env GOARCH) -GOARCH = ${ARCH} -DUMB_ARCH = ${ARCH} - -ALL_ARCH = amd64 arm arm64 ppc64le - -QEMUVERSION=v2.9.1 - -IMGNAME = nginx-ingress-controller -IMAGE = $(REGISTRY)/$(IMGNAME) -MULTI_ARCH_IMG = $(IMAGE)-$(ARCH) - -# Set default base image dynamically for each arch -BASEIMAGE?=gcr.io/google_containers/nginx-slim-$(ARCH):0.25 - -ifeq ($(ARCH),arm) - QEMUARCH=arm - GOARCH=arm - DUMB_ARCH=armhf -endif -ifeq ($(ARCH),arm64) - QEMUARCH=aarch64 -endif -ifeq ($(ARCH),ppc64le) - QEMUARCH=ppc64le - GOARCH=ppc64le - DUMB_ARCH=ppc64el -endif -#ifeq ($(ARCH),s390x) -# QEMUARCH=s390x -#endif - -TEMP_DIR := $(shell mktemp -d) - -DOCKERFILE := $(TEMP_DIR)/rootfs/Dockerfile - -all: all-container - -sub-container-%: - $(MAKE) ARCH=$* build container - -sub-push-%: - $(MAKE) ARCH=$* push - -all-container: $(addprefix sub-container-,$(ALL_ARCH)) - -all-push: $(addprefix sub-push-,$(ALL_ARCH)) - -container: .container-$(ARCH) -.container-$(ARCH): - cp -r ./* $(TEMP_DIR) - $(SED_I) 's|BASEIMAGE|$(BASEIMAGE)|g' $(DOCKERFILE) - $(SED_I) "s|QEMUARCH|$(QEMUARCH)|g" $(DOCKERFILE) - $(SED_I) "s|DUMB_ARCH|$(DUMB_ARCH)|g" $(DOCKERFILE) - -ifeq ($(ARCH),amd64) - # When building "normally" for amd64, remove the whole line, it has no part in the amd64 image - $(SED_I) "/CROSS_BUILD_/d" $(DOCKERFILE) -else - # When cross-building, only the placeholder "CROSS_BUILD_" should be removed - # Register /usr/bin/qemu-ARCH-static as the handler for ARM binaries in the kernel - $(DOCKER) run --rm --privileged multiarch/qemu-user-static:register --reset - curl -sSL https://github.com/multiarch/qemu-user-static/releases/download/$(QEMUVERSION)/x86_64_qemu-$(QEMUARCH)-static.tar.gz | tar -xz -C $(TEMP_DIR)/rootfs - $(SED_I) "s/CROSS_BUILD_//g" $(DOCKERFILE) -endif - - $(DOCKER) build -t $(MULTI_ARCH_IMG):$(TAG) $(TEMP_DIR)/rootfs - -ifeq ($(ARCH), amd64) - # This is for to maintain the backward compatibility - $(DOCKER) tag $(MULTI_ARCH_IMG):$(TAG) $(IMAGE):$(TAG) -endif - -push: .push-$(ARCH) -.push-$(ARCH): - $(DOCKER) push $(MULTI_ARCH_IMG):$(TAG) -ifeq ($(ARCH), amd64) - $(DOCKER) push $(IMAGE):$(TAG) -endif - -clean: - $(DOCKER) rmi -f $(MULTI_ARCH_IMG):$(TAG) || true - -build: clean - CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} go build -a -installsuffix cgo \ - -ldflags "-s -w -X ${PKG}/pkg/version.RELEASE=${TAG} -X ${PKG}/pkg/version.COMMIT=${COMMIT} -X ${PKG}/pkg/version.REPO=${REPO_INFO}" \ - -o ${TEMP_DIR}/rootfs/nginx-ingress-controller ${PKG}/pkg/cmd/controller - -fmt: - @echo "+ $@" - @go list -f '{{if len .TestGoFiles}}"gofmt -s -l {{.Dir}}"{{end}}' $(shell go list ${PKG}/... | grep -v vendor) | xargs -L 1 sh -c - -lint: - @echo "+ $@" - @go list -f '{{if len .TestGoFiles}}"golint {{.Dir}}/..."{{end}}' $(shell go list ${PKG}/... | grep -v vendor) | xargs -L 1 sh -c - -test: fmt lint vet - @echo "+ $@" - @go test -v -race -tags "$(BUILDTAGS) cgo" $(shell go list ${PKG}/... | grep -v vendor) - -cover: - @echo "+ $@" - @go list -f '{{if len .TestGoFiles}}"go test -coverprofile={{.Dir}}/.coverprofile {{.ImportPath}}"{{end}}' $(shell go list ${PKG}/... | grep -v vendor) | xargs -L 1 sh -c - gover - goveralls -coverprofile=gover.coverprofile -service travis-ci -repotoken ${COVERALLS_TOKEN} - -vet: - @echo "+ $@" - @go vet $(shell go list ${PKG}/... | grep -v vendor) - -release: all-container all-push - echo "done" diff --git a/controllers/nginx/README.md b/controllers/nginx/README.md deleted file mode 100644 index 11c3f6816..000000000 --- a/controllers/nginx/README.md +++ /dev/null @@ -1,553 +0,0 @@ -# Nginx Ingress Controller - -This is an nginx Ingress controller that uses [ConfigMap](https://kubernetes.io/docs/tasks/configure-pod-container/configmap/#understanding-configmaps) to store the nginx configuration. See [Ingress controller documentation](../README.md) for details on how it works. - -## Contents -* [Conventions](#conventions) -* [Requirements](#requirements) -* [Command line arguments](#command-line-arguments) -* [Dry running](#try-running-the-ingress-controller) -* [Deployment](#deployment) -* [HTTP](#http) -* [HTTPS](#https) - * [Default SSL Certificate](#default-ssl-certificate) - * [HTTPS enforcement](#server-side-https-enforcement) - * [HSTS](#http-strict-transport-security) - * [Kube-Lego](#automated-certificate-management-with-kube-lego) -* [Source IP address](#source-ip-address) -* [TCP Services](#exposing-tcp-services) -* [UDP Services](#exposing-udp-services) -* [Proxy Protocol](#proxy-protocol) -* [Opentracing](#opentracing) -* [NGINX customization](configuration.md) -* [Custom errors](#custom-errors) -* [NGINX status page](#nginx-status-page) -* [Running multiple ingress controllers](#running-multiple-ingress-controllers) -* [Running on Cloudproviders](#running-on-cloudproviders) -* [Disabling NGINX ingress controller](#disabling-nginx-ingress-controller) -* [Log format](#log-format) -* [Local cluster](#local-cluster) -* [Debug & Troubleshooting](#debug--troubleshooting) -* [Limitations](#limitations) -* [Why endpoints and not services?](#why-endpoints-and-not-services) -* [NGINX Notes](#nginx-notes) - -## Conventions - -Anytime we reference a tls secret, we mean (x509, pem encoded, RSA 2048, etc). You can generate such a certificate with: - `openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ${KEY_FILE} -out ${CERT_FILE} -subj "/CN=${HOST}/O=${HOST}"` - and create the secret via `kubectl create secret tls ${CERT_NAME} --key ${KEY_FILE} --cert ${CERT_FILE}` - - - -## Requirements -- Default backend [404-server](https://github.com/kubernetes/ingress/tree/master/images/404-server) - - -## Command line arguments -``` -Usage of : - --alsologtostderr log to standard error as well as files - --apiserver-host string The address of the Kubernetes Apiserver to connect to in the format of protocol://address:port, e.g., http://localhost:8080. If not specified, the assumption is that the binary runs inside a Kubernetes cluster and local discovery is attempted. - --configmap string Name of the ConfigMap that contains the custom configuration to use - --default-backend-service string Service used to serve a 404 page for the default backend. Takes the form - namespace/name. The controller uses the first node port of this Service for - the default backend. - --default-server-port int Default port to use for exposing the default server (catch all) (default 8181) - --default-ssl-certificate string Name of the secret - that contains a SSL certificate to be used as default for a HTTPS catch-all server - --disable-node-list Disable querying nodes. If --force-namespace-isolation is true, this should also be set. - --election-id string Election id to use for status update. (default "ingress-controller-leader") - --enable-ssl-passthrough Enable SSL passthrough feature. Default is disabled - --force-namespace-isolation Force namespace isolation. This flag is required to avoid the reference of secrets or - configmaps located in a different namespace than the specified in the flag --watch-namespace. - --health-check-path string Defines - the URL to be used as health check inside in the default server in NGINX. (default "/healthz") - --healthz-port int port for healthz endpoint. (default 10254) - --http-port int Indicates the port to use for HTTP traffic (default 80) - --https-port int Indicates the port to use for HTTPS traffic (default 443) - --ingress-class string Name of the ingress class to route through this controller. - --kubeconfig string Path to kubeconfig file with authorization and master location information. - --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) - --log_dir string If non-empty, write log files in this directory - --logtostderr log to standard error instead of files - --profiling Enable profiling via web interface host:port/debug/pprof/ (default true) - --publish-service string Service fronting the ingress controllers. Takes the form - namespace/name. The controller will set the endpoint records on the - ingress objects to reflect those on the service. - --sort-backends Defines if backends and it's endpoints should be sorted - --ssl-passtrough-proxy-port int Default port to use internally for SSL when SSL Passthgough is enabled (default 442) - --status-port int Indicates the TCP port to use for exposing the nginx status page (default 18080) - --stderrthreshold severity logs at or above this threshold go to stderr (default 2) - --sync-period duration Relist and confirm cloud resources this often. Default is 10 minutes (default 10m0s) - --tcp-services-configmap string Name of the ConfigMap that contains the definition of the TCP services to expose. - The key in the map indicates the external port to be used. The value is the name of the - service with the format namespace/serviceName and the port of the service could be a - number of the name of the port. - The ports 80 and 443 are not allowed as external ports. This ports are reserved for the backend - --udp-services-configmap string Name of the ConfigMap that contains the definition of the UDP services to expose. - The key in the map indicates the external port to be used. The value is the name of the - service with the format namespace/serviceName and the port of the service could be a - number of the name of the port. - --update-status Indicates if the - ingress controller should update the Ingress status IP/hostname. Default is true (default true) - --update-status-on-shutdown Indicates if the - ingress controller should update the Ingress status IP/hostname when the controller - is being stopped. Default is true (default true) - -v, --v Level log level for V logs - --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging - --watch-namespace string Namespace to watch for Ingress. Default is to watch all namespaces -``` - -## Try running the Ingress controller - -Before deploying the controller to production you might want to run it outside the cluster and observe it. - -```console -$ make build -$ mkdir /etc/nginx-ssl -$ ./rootfs/nginx-ingress-controller --running-in-cluster=false --default-backend-service=kube-system/default-http-backend -``` - -## Deployment - -First create a default backend and it's corresponding service: -``` -$ kubectl create -f examples/default-backend.yaml -``` - -Follow the [example-deployment](../../examples/deployment/nginx/README.md) steps to deploy nginx-ingress-controller in Kubernetes cluster (you may prefer other type of workloads, like Daemonset, in production environment). -Loadbalancers are created via a ReplicationController or Daemonset: - - -## HTTP - -First we need to deploy some application to publish. To keep this simple we will use the [echoheaders app](https://github.com/kubernetes/contrib/blob/master/ingress/echoheaders/echo-app.yaml) that just returns information about the http request as output -``` -kubectl run echoheaders --image=gcr.io/google_containers/echoserver:1.8 --replicas=1 --port=8080 -``` - -Now we expose the same application in two different services (so we can create different Ingress rules) -``` -kubectl expose deployment echoheaders --port=80 --target-port=8080 --name=echoheaders-x -kubectl expose deployment echoheaders --port=80 --target-port=8080 --name=echoheaders-y -``` - -Next we create a couple of Ingress rules -``` -kubectl create -f examples/ingress.yaml -``` - -we check that ingress rules are defined: -``` -$ kubectl get ing -NAME RULE BACKEND ADDRESS -echomap - - foo.bar.com - /foo echoheaders-x:80 - bar.baz.com - /bar echoheaders-y:80 - /foo echoheaders-x:80 -``` - -Before the deploy of the Ingress controller we need a default backend [404-server](https://github.com/kubernetes/contrib/tree/master/404-server) -``` -kubectl create -f examples/default-backend.yaml -kubectl expose rc default-http-backend --port=80 --target-port=8080 --name=default-http-backend -``` - -Check NGINX it is running with the defined Ingress rules: - -``` -$ LBIP=$(kubectl get node `kubectl get po -l name=nginx-ingress-lb --template '{{range .items}}{{.spec.nodeName}}{{end}}'` --template '{{range $i, $n := .status.addresses}}{{if eq $n.type "ExternalIP"}}{{$n.address}}{{end}}{{end}}') -$ curl $LBIP/foo -H 'Host: foo.bar.com' -``` - -## HTTPS - -You can secure an Ingress by specifying a secret that contains a TLS private key and certificate. Currently the Ingress only supports a single TLS port, 443, and assumes TLS termination. This controller supports SNI. The TLS secret must contain keys named tls.crt and tls.key that contain the certificate and private key to use for TLS, eg: - -``` -apiVersion: v1 -data: - tls.crt: base64 encoded cert - tls.key: base64 encoded key -kind: Secret -metadata: - name: foo-secret - namespace: default -type: kubernetes.io/tls -``` - -Referencing this secret in an Ingress will tell the Ingress controller to secure the channel from the client to the loadbalancer using TLS: - -``` -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: no-rules-map -spec: - tls: - secretName: foo-secret - backend: - serviceName: s1 - servicePort: 80 -``` -Please follow [PREREQUISITES](../../examples/PREREQUISITES.md) as a guide on how to generate secrets containing SSL certificates. The name of the secret can be different than the name of the certificate. - -Check the [example](../../examples/tls-termination/nginx) - -### Default SSL Certificate - -NGINX provides the option [server name](http://nginx.org/en/docs/http/server_names.html) as a catch-all in case of requests that do not match one of the configured server names. This configuration works without issues for HTTP traffic. In case of HTTPS NGINX requires a certificate. For this reason the Ingress controller provides the flag `--default-ssl-certificate`. The secret behind this flag contains the default certificate to be used in the mentioned case. -If this flag is not provided NGINX will use a self signed certificate. - -Running without the flag `--default-ssl-certificate`: - -``` -$ curl -v https://10.2.78.7:443 -k -* Rebuilt URL to: https://10.2.78.7:443/ -* Trying 10.2.78.4... -* Connected to 10.2.78.7 (10.2.78.7) port 443 (#0) -* ALPN, offering http/1.1 -* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH -* successfully set certificate verify locations: -* CAfile: /etc/ssl/certs/ca-certificates.crt - CApath: /etc/ssl/certs -* TLSv1.2 (OUT), TLS header, Certificate Status (22): -* TLSv1.2 (OUT), TLS handshake, Client hello (1): -* TLSv1.2 (IN), TLS handshake, Server hello (2): -* TLSv1.2 (IN), TLS handshake, Certificate (11): -* TLSv1.2 (IN), TLS handshake, Server key exchange (12): -* TLSv1.2 (IN), TLS handshake, Server finished (14): -* TLSv1.2 (OUT), TLS handshake, Client key exchange (16): -* TLSv1.2 (OUT), TLS change cipher, Client hello (1): -* TLSv1.2 (OUT), TLS handshake, Finished (20): -* TLSv1.2 (IN), TLS change cipher, Client hello (1): -* TLSv1.2 (IN), TLS handshake, Finished (20): -* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256 -* ALPN, server accepted to use http/1.1 -* Server certificate: -* subject: CN=foo.bar.com -* start date: Apr 13 00:50:56 2016 GMT -* expire date: Apr 13 00:50:56 2017 GMT -* issuer: CN=foo.bar.com -* SSL certificate verify result: self signed certificate (18), continuing anyway. -> GET / HTTP/1.1 -> Host: 10.2.78.7 -> User-Agent: curl/7.47.1 -> Accept: */* -> -< HTTP/1.1 404 Not Found -< Server: nginx/1.11.1 -< Date: Thu, 21 Jul 2016 15:38:46 GMT -< Content-Type: text/html -< Transfer-Encoding: chunked -< Connection: keep-alive -< Strict-Transport-Security: max-age=15724800; includeSubDomains; preload -< -The page you're looking for could not be found. - -* Connection #0 to host 10.2.78.7 left intact -``` - -Specifying `--default-ssl-certificate=default/foo-tls`: - -``` -core@localhost ~ $ curl -v https://10.2.78.7:443 -k -* Rebuilt URL to: https://10.2.78.7:443/ -* Trying 10.2.78.7... -* Connected to 10.2.78.7 (10.2.78.7) port 443 (#0) -* ALPN, offering http/1.1 -* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH -* successfully set certificate verify locations: -* CAfile: /etc/ssl/certs/ca-certificates.crt - CApath: /etc/ssl/certs -* TLSv1.2 (OUT), TLS header, Certificate Status (22): -* TLSv1.2 (OUT), TLS handshake, Client hello (1): -* TLSv1.2 (IN), TLS handshake, Server hello (2): -* TLSv1.2 (IN), TLS handshake, Certificate (11): -* TLSv1.2 (IN), TLS handshake, Server key exchange (12): -* TLSv1.2 (IN), TLS handshake, Server finished (14): -* TLSv1.2 (OUT), TLS handshake, Client key exchange (16): -* TLSv1.2 (OUT), TLS change cipher, Client hello (1): -* TLSv1.2 (OUT), TLS handshake, Finished (20): -* TLSv1.2 (IN), TLS change cipher, Client hello (1): -* TLSv1.2 (IN), TLS handshake, Finished (20): -* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256 -* ALPN, server accepted to use http/1.1 -* Server certificate: -* subject: CN=foo.bar.com -* start date: Apr 13 00:50:56 2016 GMT -* expire date: Apr 13 00:50:56 2017 GMT -* issuer: CN=foo.bar.com -* SSL certificate verify result: self signed certificate (18), continuing anyway. -> GET / HTTP/1.1 -> Host: 10.2.78.7 -> User-Agent: curl/7.47.1 -> Accept: */* -> -< HTTP/1.1 404 Not Found -< Server: nginx/1.11.1 -< Date: Mon, 18 Jul 2016 21:02:59 GMT -< Content-Type: text/html -< Transfer-Encoding: chunked -< Connection: keep-alive -< Strict-Transport-Security: max-age=15724800; includeSubDomains; preload -< -The page you're looking for could not be found. - -* Connection #0 to host 10.2.78.7 left intact -``` - - -### Server-side HTTPS enforcement - -By default the controller redirects (301) to HTTPS if TLS is enabled for that ingress . If you want to disable that behaviour globally, you can use `ssl-redirect: "false"` in the NGINX config map. - -To configure this feature for specific ingress resources, you can use the `ingress.kubernetes.io/ssl-redirect: "false"` annotation in the particular resource. - - -### HTTP Strict Transport Security - -HTTP Strict Transport Security (HSTS) is an opt-in security enhancement specified through the use of a special response header. Once a supported browser receives this header that browser will prevent any communications from being sent over HTTP to the specified domain and will instead send all communications over HTTPS. - -By default the controller redirects (301) to HTTPS if there is a TLS Ingress rule. - -To disable this behavior use `hsts=false` in the NGINX config map. - - -### Automated Certificate Management with Kube-Lego - -[Kube-Lego] automatically requests missing or expired certificates from -[Let's Encrypt] by monitoring ingress resources and their referenced secrets. To -enable this for an ingress resource you have to add an annotation: - -``` -kubectl annotate ing ingress-demo kubernetes.io/tls-acme="true" -``` - -To setup Kube-Lego you can take a look at this [full example]. The first -version to fully support Kube-Lego is nginx Ingress controller 0.8. - -[full example]:https://github.com/jetstack/kube-lego/tree/master/examples -[Kube-Lego]:https://github.com/jetstack/kube-lego -[Let's Encrypt]:https://letsencrypt.org - -## Source IP address - -By default NGINX uses the content of the header `X-Forwarded-For` as the source of truth to get information about the client IP address. This works without issues in L7 **if we configure the setting `proxy-real-ip-cidr`** with the correct information of the IP/network address of the external load balancer. -If the ingress controller is running in AWS we need to use the VPC IPv4 CIDR. This allows NGINX to avoid the spoofing of the header. -Another option is to enable proxy protocol using `use-proxy-protocol: "true"`. -In this mode NGINX do not uses the content of the header to get the source IP address of the connection. - -## Exposing TCP services - -Ingress does not support TCP services (yet). For this reason this Ingress controller uses the flag `--tcp-services-configmap` to point to an existing config map where the key is the external port to use and the value is `::[PROXY]:[PROXY]` -It is possible to use a number or the name of the port. The two last fields are optional. Adding `PROXY` in either or both of the two last fields we can use Proxy Protocol decoding (listen) and/or encoding (proxy_pass) in a TCP service (https://www.nginx.com/resources/admin-guide/proxy-protocol/). - -The next example shows how to expose the service `example-go` running in the namespace `default` in the port `8080` using the port `9000` -``` -apiVersion: v1 -kind: ConfigMap -metadata: - name: tcp-configmap-example -data: - 9000: "default/example-go:8080" -``` - - -Please check the [tcp services](../../examples/tcp/nginx/README.md) example - -## Exposing UDP services - -Since 1.9.13 NGINX provides [UDP Load Balancing](https://www.nginx.com/blog/announcing-udp-load-balancing/). - -Ingress does not support UDP services (yet). For this reason this Ingress controller uses the flag `--udp-services-configmap` to point to an existing config map where the key is the external port to use and the value is `:` -It is possible to use a number or the name of the port. - -The next example shows how to expose the service `kube-dns` running in the namespace `kube-system` in the port `53` using the port `53` -``` -apiVersion: v1 -kind: ConfigMap -metadata: - name: udp-configmap-example -data: - 53: "kube-system/kube-dns:53" -``` - - -Please check the [udp services](../../examples/udp/nginx/README.md) example - -## Proxy Protocol - -If you are using a L4 proxy to forward the traffic to the NGINX pods and terminate HTTP/HTTPS there, you will lose the remote endpoint's IP addresses. To prevent this you could use the [Proxy Protocol](http://www.haproxy.org/download/1.5/doc/proxy-protocol.txt) for forwarding traffic, this will send the connection details before forwarding the actual TCP connection itself. - -Amongst others [ELBs in AWS](http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/enable-proxy-protocol.html) and [HAProxy](http://www.haproxy.org/) support Proxy Protocol. - -Please check the [proxy-protocol](examples/proxy-protocol/) example - -### Opentracing - -Using the third party module [rnburn/nginx-opentracing](https://github.com/rnburn/nginx-opentracing) the NGINX ingress controller can configure NGINX to enable [OpenTracing](http://opentracing.io) instrumentation. -By default this feature is disabled. - -To enable the instrumentation we just need to enable the instrumentation in the configuration configmap and set the host where we should send the traces. - -In the [aledbf/zipkin-js-example](https://github.com/aledbf/zipkin-js-example) github repository is possible to see a dockerized version of zipkin-js-example with the required Kubernetes descriptors. -To install the example and the zipkin collector we just need to run: - -``` -$ kubectl create -f https://raw.githubusercontent.com/aledbf/zipkin-js-example/kubernetes/kubernetes/zipkin.yaml -$ kubectl create -f https://raw.githubusercontent.com/aledbf/zipkin-js-example/kubernetes/kubernetes/deployment.yaml -``` - -Also we need to configure the NGINX controller configmap with the required values: - -``` -apiVersion: v1 -data: - enable-opentracing: "true" - zipkin-collector-host: zipkin.default.svc.cluster.local -kind: ConfigMap -metadata: - labels: - k8s-app: nginx-ingress-controller - name: nginx-custom-configuration -``` - -Using curl we can generate some traces: -``` -$ curl -v http://$(minikube ip)/api -H 'Host: zipkin-js-example' -$ curl -v http://$(minikube ip)/api -H 'Host: zipkin-js-example' -``` - -In the zipkin inteface we can see the details: - -![zipkin screenshot](docs/images/zipkin-demo.png "zipkin collector screenshot") - -### Custom errors - -In case of an error in a request the body of the response is obtained from the `default backend`. -Each request to the default backend includes two headers: - -- `X-Code` indicates the HTTP code to be returned to the client. -- `X-Format` the value of the `Accept` header. - -**Important:** the custom backend must return the correct HTTP status code to be returned. NGINX do not changes the reponse from the custom default backend. - -Using this two headers is possible to use a custom backend service like [this one](https://github.com/kubernetes/ingress/tree/master/examples/customization/custom-errors/nginx) that inspect each request and returns a custom error page with the format expected by the client. Please check the example [custom-errors](examples/customization/custom-errors/nginx/README.md) - -NGINX sends aditional headers that can be used to build custom response: - -- X-Original-URI -- X-Namespace -- X-Ingress-Name -- X-Service-Name - -### NGINX status page - -The ngx_http_stub_status_module module provides access to basic status information. This is the default module active in the url `/nginx_status`. -This controller provides an alternative to this module using [nginx-module-vts](https://github.com/vozlt/nginx-module-vts) third party module. -To use this module just provide a config map with the key `enable-vts-status=true`. The URL is exposed in the port 18080. -Please check the example `example/rc-default.yaml` - -![nginx-module-vts screenshot](https://cloud.githubusercontent.com/assets/3648408/10876811/77a67b70-8183-11e5-9924-6a6d0c5dc73a.png "screenshot with filter") - -To extract the information in JSON format the module provides a custom URL: `/nginx_status/format/json` - -### Running multiple ingress controllers - -If you're running multiple ingress controllers, or running on a cloudprovider that natively handles -ingress, you need to specify the annotation `kubernetes.io/ingress.class: "nginx"` in all ingresses -that you would like this controller to claim. Not specifying the annotation will lead to multiple -ingress controllers claiming the same ingress. Specifying the wrong value will result in all ingress -controllers ignoring the ingress. Multiple ingress controllers running in the same cluster was not -supported in Kubernetes versions < 1.3. - -### Running on Cloudproviders - -If you're running this ingress controller on a cloudprovider, you should assume the provider also has a native -Ingress controller and specify the ingress.class annotation as indicated in this section. -In addition to this, you will need to add a firewall rule for each port this controller is listening on, i.e :80 and :443. - -### Disabling NGINX ingress controller - -Setting the annotation `kubernetes.io/ingress.class` to any value other than "nginx" or the empty string, will force the NGINX Ingress controller to ignore your Ingress. Do this if you wish to use one of the other Ingress controllers at the same time as the NGINX controller. - -### Log format - -The default configuration uses a custom logging format to add additional information about upstreams - -``` - log_format upstreaminfo '{{ if $cfg.useProxyProtocol }}$proxy_protocol_addr{{ else }}$remote_addr{{ end }} - ' - '[$proxy_add_x_forwarded_for] - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" ' - '$request_length $request_time [$proxy_upstream_name] $upstream_addr $upstream_response_length $upstream_response_time $upstream_status'; -``` - -Sources: - - [upstream variables](http://nginx.org/en/docs/http/ngx_http_upstream_module.html#variables) - - [embedded variables](http://nginx.org/en/docs/http/ngx_http_core_module.html#variables) - -Description: -- `$proxy_protocol_addr`: if PROXY protocol is enabled -- `$remote_addr`: if PROXY protocol is disabled (default) -- `$proxy_add_x_forwarded_for`: the `X-Forwarded-For` client request header field with the $remote_addr variable appended to it, separated by a comma -- `$remote_user`: user name supplied with the Basic authentication -- `$time_local`: local time in the Common Log Format -- `$request`: full original request line -- `$status`: response status -- `$body_bytes_sent`: number of bytes sent to a client, not counting the response header -- `$http_referer`: value of the Referer header -- `$http_user_agent`: value of User-Agent header -- `$request_length`: request length (including request line, header, and request body) -- `$request_time`: time elapsed since the first bytes were read from the client -- `$proxy_upstream_name`: name of the upstream. The format is `upstream---` -- `$upstream_addr`: keeps the IP address and port, or the path to the UNIX-domain socket of the upstream server. If several servers were contacted during request processing, their addresses are separated by commas -- `$upstream_response_length`: keeps the length of the response obtained from the upstream server -- `$upstream_response_time`: keeps time spent on receiving the response from the upstream server; the time is kept in seconds with millisecond resolution -- `$upstream_status`: keeps status code of the response obtained from the upstream server - -### Local cluster - -Using [`hack/local-up-cluster.sh`](https://github.com/kubernetes/kubernetes/blob/master/hack/local-up-cluster.sh) is possible to start a local kubernetes cluster consisting of a master and a single node. Please read [running-locally.md](https://github.com/kubernetes/community/blob/master/contributors/devel/running-locally.md) for more details. - -Use of `hostNetwork: true` in the ingress controller is required to falls back at localhost:8080 for the apiserver if every other client creation check fails (eg: service account not present, kubeconfig doesn't exist, no master env vars...) - -### Debug & Troubleshooting - -Using the flag `--v=XX` it is possible to increase the level of logging. -In particular: -- `--v=2` shows details using `diff` about the changes in the configuration in nginx - -``` -I0316 12:24:37.581267 1 utils.go:148] NGINX configuration diff a//etc/nginx/nginx.conf b//etc/nginx/nginx.conf -I0316 12:24:37.581356 1 utils.go:149] --- /tmp/922554809 2016-03-16 12:24:37.000000000 +0000 -+++ /tmp/079811012 2016-03-16 12:24:37.000000000 +0000 -@@ -235,7 +235,6 @@ - - upstream default-echoheadersx { - least_conn; -- server 10.2.112.124:5000; - server 10.2.208.50:5000; - - } -I0316 12:24:37.610073 1 command.go:69] change in configuration detected. Reloading... -``` - -- `--v=3` shows details about the service, Ingress rule, endpoint changes and it dumps the nginx configuration in JSON format -- `--v=5` configures NGINX in [debug mode](http://nginx.org/en/docs/debugging_log.html) - -### Limitations - -- Ingress rules for TLS require the definition of the field `host` - -### Why endpoints and not services - -The NGINX ingress controller does not uses [Services](http://kubernetes.io/docs/user-guide/services) to route traffic to the pods. Instead it uses the Endpoints API in order to bypass [kube-proxy](http://kubernetes.io/docs/admin/kube-proxy/) to allow NGINX features like session affinity and custom load balancing algorithms. It also removes some overhead, such as conntrack entries for iptables DNAT. - -### NGINX notes - -Since `gcr.io/google_containers/nginx-slim:0.8` NGINX contains the next patches: -- Dynamic TLS record size [nginx__dynamic_tls_records.patch](https://blog.cloudflare.com/optimizing-tls-over-tcp-to-reduce-latency/) -NGINX provides the parameter `ssl_buffer_size` to adjust the size of the buffer. Default value in NGINX is 16KB. The ingress controller changes the default to 4KB. This improves the [TLS Time To First Byte (TTTFB)](https://www.igvita.com/2013/12/16/optimizing-nginx-tls-time-to-first-byte/) but the size is fixed. This patches adapts the size of the buffer to the content is being served helping to improve the perceived latency. diff --git a/core/pkg/strings/string_test.go b/core/pkg/strings/string_test.go deleted file mode 100644 index 2de3e4c51..000000000 --- a/core/pkg/strings/string_test.go +++ /dev/null @@ -1,45 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package strings - -import ( - "testing" -) - -var testDatas = []struct { - a string - slice []string - er bool -}{ - {"first", []string{"first", "second"}, true}, - {"FIRST", []string{"first", "second"}, false}, - {"third", []string{"first", "second"}, false}, - {"first", nil, false}, - - {"", []string{"first", "second"}, false}, - {"", []string{"first", "second", ""}, true}, - {"", nil, false}, -} - -func TestStringInSlice(t *testing.T) { - for _, testData := range testDatas { - r := StringInSlice(testData.a, testData.slice) - if r != testData.er { - t.Errorf("getted result is '%t', but expected is '%t'", r, testData.er) - } - } -} diff --git a/controllers/nginx/docs/images/zipkin-demo.png b/docs/images/zipkin-demo.png similarity index 100% rename from controllers/nginx/docs/images/zipkin-demo.png rename to docs/images/zipkin-demo.png diff --git a/examples/custom-controller/Dockerfile b/examples/custom-controller/Dockerfile deleted file mode 100644 index d28b94dbf..000000000 --- a/examples/custom-controller/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 2017 The Kubernetes Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# TODO(ingress#191): Change this to something more appropriate, like busybox -From ubuntu:15.10 -MAINTAINER Prashanth B -RUN apt-get update && apt-get install ssl-cert -y -COPY server / -ENTRYPOINT ["/server"] diff --git a/examples/custom-controller/Makefile b/examples/custom-controller/Makefile deleted file mode 100644 index 5e613a31b..000000000 --- a/examples/custom-controller/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 2017 The Kubernetes Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Build the default backend binary or image for amd64, arm, arm64 and ppc64le -# -# Usage: -# [PREFIX=gcr.io/google_containers/dummy-ingress-controller] [ARCH=amd64] [TAG=1.1] make (server|container|push) - -all: push - -TAG=0.1 -PREFIX?=bprashanth/dummy-ingress-controller -ARCH?=amd64 -GOLANG_VERSION=1.6 -TEMP_DIR:=$(shell mktemp -d) - -server: server.go - CGO_ENABLED=0 GOOS=linux GOARCH=$(ARCH) GOARM=6 godep go build -a -installsuffix cgo -ldflags '-w' -o server ./server.go - -container: server - docker build --pull -t $(PREFIX)-$(ARCH):$(TAG) . - -push: container - gcloud docker -- push $(PREFIX)-$(ARCH):$(TAG) - -clean: - rm -f server - diff --git a/examples/custom-controller/README.md b/examples/custom-controller/README.md deleted file mode 100644 index 64c439cea..000000000 --- a/examples/custom-controller/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# Dummy controller - -This example contains the source code of a simple dummy controller. If you want -more details on the interface, or what the generic controller is actually doing, -please read [this doc](/docs/dev/getting-started.md). You can deploy the controller as -follows: - -```console -$ kubectl create -f deployment.yaml -service "default-backend" created -deployment "dummy-ingress-controller" created - -$ kubectl get po -NAME READY STATUS RESTARTS AGE -dummy-ingress-controller-3685541482-082nl 1/1 Running 0 10m - -$ kubectl logs dummy-ingress-controller-3685541482-082nl -I0131 02:29:02.462123 1 launch.go:92] &{dummy 0.0.0 git-00000000 git://foo.bar.com} -I0131 02:29:02.462513 1 launch.go:221] Creating API server client for https://10.0.0.1:443 -I0131 02:29:02.494571 1 launch.go:111] validated default/default-backend as the default backend -I0131 02:29:02.503180 1 controller.go:1038] starting Ingress controller -I0131 02:29:02.513528 1 leaderelection.go:247] lock is held by dummy-ingress-controller-3685541482-50jh0 and has not yet expired -W0131 02:29:03.510699 1 queue.go:87] requeuing kube-system/kube-scheduler, err deferring sync till endpoints controller has synced -W0131 02:29:03.514445 1 queue.go:87] requeuing kube-system/node-controller-token-826dl, err deferring sync till endpoints controller has synced -2017/01/31 02:29:12 Received OnUpdate notification -2017/01/31 02:29:12 upstream-default-backend: 10.180.1.20 -``` - - diff --git a/examples/custom-controller/deployment.yaml b/examples/custom-controller/deployment.yaml deleted file mode 100644 index cf924b7f7..000000000 --- a/examples/custom-controller/deployment.yaml +++ /dev/null @@ -1,51 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: default-backend - namespace: default - labels: - name: default-backend - app: dummy-ingress-controller -spec: - ports: - - port: 80 - targetPort: 10254 - selector: - # Point back the the dummy controller's - # healthz port - app: dummy-ingress-controller ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: dummy-ingress-controller - namespace: default - labels: - app: dummy-ingress-controller -spec: - selector: - matchLabels: - app: dummy-ingress-controller - template: - metadata: - labels: - app: dummy-ingress-controller - spec: - containers: - - name: server - image: bprashanth/dummy-ingress-controller-amd64:0.1 - imagePullPolicy: Always - ports: - - containerPort: 10254 - env: - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - args: - - /server - - --default-backend-service=$(POD_NAMESPACE)/default-backend diff --git a/examples/custom-controller/server.go b/examples/custom-controller/server.go deleted file mode 100644 index 4a2c0ab40..000000000 --- a/examples/custom-controller/server.go +++ /dev/null @@ -1,121 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package main - -import ( - "log" - "net/http" - "os/exec" - "strings" - - "github.com/spf13/pflag" - - api "k8s.io/api/core/v1" - extensions "k8s.io/api/extensions/v1beta1" - - nginxconfig "k8s.io/ingress/controllers/nginx/pkg/config" - "k8s.io/ingress/core/pkg/ingress" - "k8s.io/ingress/core/pkg/ingress/controller" - "k8s.io/ingress/core/pkg/ingress/defaults" -) - -func main() { - dc := newDummyController() - ic := controller.NewIngressController(dc) - defer func() { - log.Printf("Shutting down ingress controller...") - ic.Stop() - }() - ic.Start() -} - -func newDummyController() ingress.Controller { - return &DummyController{} -} - -type DummyController struct{} - -func (dc DummyController) SetConfig(cfgMap *api.ConfigMap) { - log.Printf("Config map %+v", cfgMap) -} - -func (dc DummyController) Test(file string) *exec.Cmd { - return exec.Command("echo", file) -} - -func (dc DummyController) OnUpdate(updatePayload ingress.Configuration) error { - log.Printf("Received OnUpdate notification") - for _, b := range updatePayload.Backends { - eps := []string{} - for _, e := range b.Endpoints { - eps = append(eps, e.Address) - } - log.Printf("%v: %v", b.Name, strings.Join(eps, ", ")) - } - - log.Printf("Reloaded new config") - return nil -} - -func (dc DummyController) BackendDefaults() defaults.Backend { - // Just adopt nginx's default backend config - return nginxconfig.NewDefault().Backend -} - -func (n DummyController) Name() string { - return "dummy Controller" -} - -func (n DummyController) Check(_ *http.Request) error { - return nil -} - -func (dc DummyController) Info() *ingress.BackendInfo { - return &ingress.BackendInfo{ - Name: "dummy", - Release: "0.0.0", - Build: "git-00000000", - Repository: "git://foo.bar.com", - } -} - -func (n DummyController) ConfigureFlags(*pflag.FlagSet) { -} - -func (n DummyController) OverrideFlags(*pflag.FlagSet) { -} - -func (n DummyController) SetListers(lister *ingress.StoreLister) { - -} - -func (n DummyController) DefaultIngressClass() string { - return "dummy" -} - -func (n DummyController) UpdateIngressStatus(*extensions.Ingress) []api.LoadBalancerIngress { - return nil -} - -// DefaultEndpoint returns the default endpoint to be use as default server that returns 404. -func (n DummyController) DefaultEndpoint() ingress.Endpoint { - return ingress.Endpoint{ - Address: "127.0.0.1", - Port: "8181", - Target: &api.ObjectReference{}, - } -} diff --git a/controllers/nginx/examples/default-backend.yaml b/examples/default-backend.yaml similarity index 100% rename from controllers/nginx/examples/default-backend.yaml rename to examples/default-backend.yaml diff --git a/examples/deployment/gce/README.md b/examples/deployment/gce/README.md deleted file mode 100644 index 229478917..000000000 --- a/examples/deployment/gce/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# Deploying the GCE Ingress controller - -This example demonstrates the deployment of a GCE Ingress controller. - -Note: __all GCE/GKE clusters already have an Ingress controller running -on the master. The only reason to deploy another GCE controller is if you want -to debug or otherwise observe its operation (eg via kubectl logs).__ - -__Before deploying another one in your cluster, make sure you disable the master controller.__ - -## Disabling the master controller - -See the hard disable options [here](/docs/faq/gce.md#how-do-i-disable-the-gce-ingress-controller). - -## Deploying a new controller - -The following command deploys a GCE Ingress controller in your cluster: - -```console -$ kubectl create -f gce-ingress-controller.yaml -service "default-http-backend" created -replicationcontroller "l7-lb-controller" created - -$ kubectl get po -l name=glbc -NAME READY STATUS RESTARTS AGE -l7-lb-controller-1s22c 2/2 Running 0 27s -``` - -Now you can create an Ingress and observe the controller: - -```console -$ kubectl create -f gce-tls-ingress.yaml -ingress "test" created - -$ kubectl logs l7-lb-controller-1s22c -c l7-lb-controller -I0201 01:03:17.387548 1 main.go:179] Starting GLBC image: glbc:0.9.2, cluster name -I0201 01:03:18.459740 1 main.go:291] Using saved cluster uid "32658fa96c080068" -I0201 01:03:18.459771 1 utils.go:122] Changing cluster name from to 32658fa96c080068 -I0201 01:03:18.461652 1 gce.go:331] Using existing Token Source &oauth2.reuseTokenSource{new:google.computeSource{account:""}, mu:sync.Mutex{state:0, sema:0x0}, t:(*oauth2.Token)(nil)} -I0201 01:03:18.553142 1 cluster_manager.go:264] Created GCE client without a config file -I0201 01:03:18.553773 1 controller.go:234] Starting loadbalancer controller -I0201 01:04:58.314271 1 event.go:217] Event(api.ObjectReference{Kind:"Ingress", Namespace:"default", Name:"test", UID:"73549716-e81a-11e6-a8c5-42010af00002", APIVersion:"extensions", ResourceVersion:"673016", FieldPath:""}): type: 'Normal' reason: 'ADD' default/test -I0201 01:04:58.413616 1 instances.go:76] Creating instance group k8s-ig--32658fa96c080068 in zone us-central1-b -I0201 01:05:01.998169 1 gce.go:2084] Adding port 30301 to instance group k8s-ig--32658fa96c080068 with 0 ports -I0201 01:05:02.444014 1 backends.go:149] Creating backend for 1 instance groups, port 30301 named port &{port30301 30301 []} -I0201 01:05:02.444175 1 utils.go:495] No pod in service http-svc with node port 30301 has declared a matching readiness probe for health checks. -I0201 01:05:02.555599 1 healthchecks.go:62] Creating health check k8s-be-30301--32658fa96c080068 -I0201 01:05:11.300165 1 gce.go:2084] Adding port 31938 to instance group k8s-ig--32658fa96c080068 with 1 ports -I0201 01:05:11.743914 1 backends.go:149] Creating backend for 1 instance groups, port 31938 named port &{port31938 31938 []} -I0201 01:05:11.744008 1 utils.go:495] No pod in service default-http-backend with node port 31938 has declared a matching readiness probe for health checks. -I0201 01:05:11.811972 1 healthchecks.go:62] Creating health check k8s-be-31938--32658fa96c080068 -I0201 01:05:19.871791 1 loadbalancers.go:121] Creating l7 default-test--32658fa96c080068 -... - -$ kubectl get ing test -NAME HOSTS ADDRESS PORTS AGE -test * 35.186.208.106 80, 443 4m - -$ curl 35.186.208.106 -kL -CLIENT VALUES: -client_address=10.180.3.1 -command=GET -real path=/ -query=nil -request_version=1.1 -request_uri=http://35.186.208.106:8080/ -... -``` diff --git a/examples/deployment/gce/gce-ingress-controller.yaml b/examples/deployment/gce/gce-ingress-controller.yaml deleted file mode 100644 index 8bbee4bba..000000000 --- a/examples/deployment/gce/gce-ingress-controller.yaml +++ /dev/null @@ -1,82 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - # This must match the --default-backend-service argument of the l7 lb - # controller and is required because GCE mandates a default backend. - name: default-http-backend - labels: - k8s-app: glbc -spec: - # The default backend must be of type NodePort. - type: NodePort - ports: - - port: 80 - targetPort: 8080 - protocol: TCP - name: http - selector: - k8s-app: glbc - ---- -apiVersion: v1 -kind: ReplicationController -metadata: - name: l7-lb-controller - labels: - k8s-app: glbc - version: v0.9.0 -spec: - # There should never be more than 1 controller alive simultaneously. - replicas: 1 - selector: - k8s-app: glbc - version: v0.9.0 - template: - metadata: - labels: - k8s-app: glbc - version: v0.9.0 - name: glbc - spec: - terminationGracePeriodSeconds: 600 - containers: - - name: default-http-backend - # Any image is permissable as long as: - # 1. It serves a 404 page at / - # 2. It serves 200 on a /healthz endpoint - image: gcr.io/google_containers/defaultbackend:1.0 - livenessProbe: - httpGet: - path: /healthz - port: 8080 - scheme: HTTP - initialDelaySeconds: 30 - timeoutSeconds: 5 - ports: - - containerPort: 8080 - resources: - limits: - cpu: 10m - memory: 20Mi - requests: - cpu: 10m - memory: 20Mi - - image: gcr.io/google_containers/glbc:0.9.2 - livenessProbe: - httpGet: - path: /healthz - port: 8081 - scheme: HTTP - initialDelaySeconds: 30 - timeoutSeconds: 5 - name: l7-lb-controller - resources: - limits: - cpu: 100m - memory: 100Mi - requests: - cpu: 100m - memory: 50Mi - args: - - --default-backend-service=default/default-http-backend - - --sync-period=300s diff --git a/examples/deployment/gce/gce-tls-ingress.yaml b/examples/deployment/gce/gce-tls-ingress.yaml deleted file mode 100644 index 705a17d36..000000000 --- a/examples/deployment/gce/gce-tls-ingress.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: test - annotations: - kubernetes.io/ingress.class: "gce" -spec: - tls: - # This assumes tls-secret exists. - - secretName: tls-secret - backend: - # This assumes http-svc exists and routes to healthy endpoints. - serviceName: http-svc - servicePort: 80 - diff --git a/controllers/nginx/examples/echo-header.yaml b/examples/echo-header.yaml similarity index 100% rename from controllers/nginx/examples/echo-header.yaml rename to examples/echo-header.yaml diff --git a/examples/health-checks/gce/README.md b/examples/health-checks/gce/README.md deleted file mode 100644 index a2d6e710a..000000000 --- a/examples/health-checks/gce/README.md +++ /dev/null @@ -1,72 +0,0 @@ -# Simple HTTP health check example - -The GCE Ingress controller adopts the readiness probe from the matching endpoints, provided the readiness probe doesn't require HTTPS or special headers. - -Create the following app: -```console -$ kubectl create -f health_check_app.yaml -replicationcontroller "echoheaders" created -You have exposed your service on an external port on all nodes in your -cluster. If you want to expose this service to the external internet, you may -need to set up firewall rules for the service port(s) (tcp:31165) to serve traffic. - -See http://releases.k8s.io/HEAD/docs/user-guide/services-firewalls.md for more details. -service "echoheadersx" created -You have exposed your service on an external port on all nodes in your -cluster. If you want to expose this service to the external internet, you may -need to set up firewall rules for the service port(s) (tcp:31020) to serve traffic. - -See http://releases.k8s.io/HEAD/docs/user-guide/services-firewalls.md for more details. -service "echoheadersy" created -ingress "echomap" created -``` - -You should soon find an Ingress that is backed by a GCE Loadbalancer. - -```console -$ kubectl describe ing echomap -Name: echomap -Namespace: default -Address: 107.178.255.228 -Default backend: default-http-backend:80 (10.180.0.9:8080,10.240.0.2:8080) -Rules: - Host Path Backends - ---- ---- -------- - foo.bar.com - /foo echoheadersx:80 () - bar.baz.com - /bar echoheadersy:80 () - /foo echoheadersx:80 () -Annotations: - target-proxy: k8s-tp-default-echomap--a9d60e8176d933ee - url-map: k8s-um-default-echomap--a9d60e8176d933ee - backends: {"k8s-be-31020--a9d60e8176d933ee":"HEALTHY","k8s-be-31165--a9d60e8176d933ee":"HEALTHY","k8s-be-31686--a9d60e8176d933ee":"HEALTHY"} - forwarding-rule: k8s-fw-default-echomap--a9d60e8176d933ee -Events: - FirstSeen LastSeen Count From SubobjectPath Type Reason Message - --------- -------- ----- ---- ------------- -------- ------ ------- - 17m 17m 1 {loadbalancer-controller } Normal ADD default/echomap - 15m 15m 1 {loadbalancer-controller } Normal CREATE ip: 107.178.255.228 - -$ curl 107.178.255.228/foo -H 'Host:foo.bar.com' -CLIENT VALUES: -client_address=10.240.0.5 -command=GET -real path=/foo -query=nil -request_version=1.1 -request_uri=http://foo.bar.com:8080/foo -... -``` - -You can confirm the health check endpoint point it's using one of 2 ways: -* Through the cloud console: compute > health checks > lookup your health check. It takes the form k8s-be-nodePort-hash, where nodePort in the example above is 31165 and 31020, as shown by the kubectl output. -* Through gcloud: Run `gcloud compute http-health-checks list` - -## Limitations - -A few points to note: -* The readiness probe must be exposed on the port matching the `servicePort` specified in the Ingress -* The readiness probe cannot have special requirements like headers -* The probe timeouts are translated to GCE health check timeouts -* You must create the pods backing the endpoints with the given readiness probe. This *will not* work if you update the replication controller with a different readiness probe. diff --git a/examples/health-checks/gce/health_check_app.yaml b/examples/health-checks/gce/health_check_app.yaml deleted file mode 100644 index b8d36bf38..000000000 --- a/examples/health-checks/gce/health_check_app.yaml +++ /dev/null @@ -1,100 +0,0 @@ -apiVersion: v1 -kind: ReplicationController -metadata: - name: echoheaders -spec: - replicas: 1 - template: - metadata: - labels: - app: echoheaders - spec: - containers: - - name: echoheaders - image: gcr.io/google_containers/echoserver:1.8 - ports: - - containerPort: 8080 - readinessProbe: - httpGet: - path: /healthz - port: 8080 - periodSeconds: 1 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 10 - env: - - name: NODE_NAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: POD_IP - valueFrom: - fieldRef: - fieldPath: status.podIP - ---- -apiVersion: v1 -kind: Service -metadata: - name: echoheadersx - labels: - app: echoheaders -spec: - type: NodePort - ports: - - port: 80 - targetPort: 8080 - protocol: TCP - name: http - selector: - app: echoheaders ---- -apiVersion: v1 -kind: Service -metadata: - name: echoheadersy - labels: - app: echoheaders -spec: - type: NodePort - ports: - - port: 80 - targetPort: 8080 - protocol: TCP - name: http - selector: - app: echoheaders ---- -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: echomap -spec: - rules: - - host: foo.bar.com - http: - paths: - - path: /foo - backend: - serviceName: echoheadersx - servicePort: 80 - - host: bar.baz.com - http: - paths: - - path: /bar - backend: - serviceName: echoheadersy - servicePort: 80 - - path: /foo - backend: - serviceName: echoheadersx - servicePort: 80 - diff --git a/controllers/nginx/examples/ingress.yaml b/examples/ingress.yaml similarity index 100% rename from controllers/nginx/examples/ingress.yaml rename to examples/ingress.yaml diff --git a/examples/static-ip/gce/README.md b/examples/static-ip/gce/README.md deleted file mode 100644 index 07917ac50..000000000 --- a/examples/static-ip/gce/README.md +++ /dev/null @@ -1,129 +0,0 @@ -# Static IPs - -This example demonstrates how to assign a [static-ip](https://cloud.google.com/compute/docs/configure-instance-ip-addresses#reserve_new_static) to an Ingress on GCE. - -## Prerequisites - -You need a [TLS cert](/examples/PREREQUISITES.md#tls-certificates) and a [test HTTP service](/examples/PREREQUISITES.md#test-http-service) for this example. -You will also need to make sure you Ingress targets exactly one Ingress -controller by specifying the [ingress.class annotation](/examples/PREREQUISITES.md#ingress-class), -and that you have an ingress controller [running](/examples/deployment) in your cluster. - -## Acquiring a static IP - -In GCE, static IP belongs to a given project until the owner decides to release -it. If you create a static IP and assign it to an Ingress, deleting the Ingress -or tearing down the GKE cluster *will not* delete the static IP. You can check -the static IPs you have as follows - -```console -$ gcloud compute addresses list --global -NAME REGION ADDRESS STATUS -test-ip 35.186.221.137 RESERVED - -$ gcloud compute addresses list -NAME REGION ADDRESS STATUS -test-ip 35.186.221.137 RESERVED -test-ip us-central1 35.184.21.228 RESERVED -``` - -Note the difference between a regional and a global static ip. Only global -static-ips will work with Ingress. If you don't already have an IP, you can -create it - -```console -$ gcloud compute addresses create test-ip --global -Created [https://www.googleapis.com/compute/v1/projects/kubernetesdev/global/addresses/test-ip]. ---- -address: 35.186.221.137 -creationTimestamp: '2017-01-31T10:32:29.889-08:00' -description: '' -id: '9221457935391876818' -kind: compute#address -name: test-ip -selfLink: https://www.googleapis.com/compute/v1/projects/kubernetesdev/global/addresses/test-ip -status: RESERVED -``` - -## Assigning a static IP to an Ingress - -You can now add the static IP from the previous step to an Ingress, -by specifying the `kubernetes.io/global-static-ip-name` annotation, -the example yaml in this directory already has it set to `test-ip` - -```console -$ kubectl create -f gce-static-ip-ingress.yaml -ingress "static-ip" created - -$ gcloud compute addresses list test-ip -NAME REGION ADDRESS STATUS -test-ip 35.186.221.137 IN_USE -test-ip us-central1 35.184.21.228 RESERVED - -$ kubectl get ing -NAME HOSTS ADDRESS PORTS AGE -static-ip * 35.186.221.137 80, 443 1m - -$ curl 35.186.221.137 -Lk -CLIENT VALUES: -client_address=10.180.1.1 -command=GET -real path=/ -query=nil -request_version=1.1 -request_uri=http://35.186.221.137:8080/ -... -``` - -## Retaining the static IP - -You can test retention by deleting the Ingress - -```console -$ kubectl delete -f gce-static-ip-ingress.yaml -ingress "static-ip" deleted - -$ kubectl get ing -No resources found. - -$ gcloud compute addresses list test-ip --global -NAME REGION ADDRESS STATUS -test-ip 35.186.221.137 RESERVED -``` - -## Promote ephemeral to static IP - -If you simply create a HTTP Ingress resource, it gets an ephemeral IP - -```console -$ kubectl create -f gce-http-ingress.yaml -ingress "http-ingress" created - -$ kubectl get ing -NAME HOSTS ADDRESS PORTS AGE -http-ingress * 35.186.195.33 80 1h - -$ gcloud compute forwarding-rules list -NAME REGION IP_ADDRESS IP_PROTOCOL TARGET -k8s-fw-default-http-ingress--32658fa96c080068 35.186.195.33 TCP k8s-tp-default-http-ingress--32658fa96c080068 -``` - -Note that because this is an ephemeral IP, it won't show up in the output of -`gcloud compute addresses list`. - -If you either directly create an Ingress with a TLS section, or modify a HTTP -Ingress to have a TLS section, it gets a static IP. - -```console -$ kubectl patch ing http-ingress -p '{"spec":{"tls":[{"secretName":"tls-secret"}]}}' -"http-ingress" patched - -$ kubectl get ing -NAME HOSTS ADDRESS PORTS AGE -http-ingress * 35.186.195.33 80, 443 1h - -$ gcloud compute addresses list -NAME REGION ADDRESS STATUS -k8s-fw-default-http-ingress--32658fa96c080068 35.186.195.33 IN_USE -``` - diff --git a/examples/static-ip/gce/gce-http-ingress.yaml b/examples/static-ip/gce/gce-http-ingress.yaml deleted file mode 100644 index ca0e34ca5..000000000 --- a/examples/static-ip/gce/gce-http-ingress.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: http-ingress - annotations: - kubernetes.io/ingress.class: "gce" -spec: - backend: - # This assumes http-svc exists and routes to healthy endpoints. - serviceName: http-svc - servicePort: 80 - diff --git a/examples/static-ip/gce/gce-static-ip-ingress.yaml b/examples/static-ip/gce/gce-static-ip-ingress.yaml deleted file mode 100644 index 7742b8705..000000000 --- a/examples/static-ip/gce/gce-static-ip-ingress.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: static-ip - # Assumes a global static ip with the same name exists. - # You can acquire a static IP by running - # gcloud compute addresses create test-ip --global - annotations: - kubernetes.io/ingress.global-static-ip-name: "test-ip" - kubernetes.io/ingress.class: "gce" -spec: - tls: - # This assumes tls-secret exists. - - secretName: tls-secret - backend: - # This assumes http-svc exists and routes to healthy endpoints. - serviceName: http-svc - servicePort: 80 - diff --git a/examples/tls-termination/gce/README.md b/examples/tls-termination/gce/README.md deleted file mode 100644 index bc674d8a2..000000000 --- a/examples/tls-termination/gce/README.md +++ /dev/null @@ -1,79 +0,0 @@ -# TLS termination - -This example demonstrates how to terminate TLS through the GCE Ingress controller. - -## Prerequisites - -You need a [TLS cert](/examples/PREREQUISITES.md#tls-certificates) and a [test HTTP service](/examples/PREREQUISITES.md#test-http-service) for this example. -You will also need to make sure you Ingress targets exactly one Ingress -controller by specifying the [ingress.class annotation](/examples/PREREQUISITES.md#ingress-class), -and that you have an ingress controller [running](/examples/deployment) in your cluster. - -## Deployment - -The following command instructs the controller to terminate traffic using -the provided TLS cert, and forward un-encrypted HTTP traffic to the test -HTTP service. - -```console -$ kubectl create -f gce-tls-ingress.yaml -``` - -## Validation - -You can confirm that the Ingress works. - -```console -$ kubectl describe ing gce-test -Name: gce-test -Namespace: default -Address: 35.186.221.137 -Default backend: http-svc:80 (10.180.1.9:8080,10.180.3.6:8080) -TLS: - tls-secret terminates -Rules: - Host Path Backends - ---- ---- -------- - * * http-svc:80 (10.180.1.9:8080,10.180.3.6:8080) -Annotations: - target-proxy: k8s-tp-default-gce-test--32658fa96c080068 - url-map: k8s-um-default-gce-test--32658fa96c080068 - backends: {"k8s-be-30301--32658fa96c080068":"Unknown"} - forwarding-rule: k8s-fw-default-gce-test--32658fa96c080068 - https-forwarding-rule: k8s-fws-default-gce-test--32658fa96c080068 - https-target-proxy: k8s-tps-default-gce-test--32658fa96c080068 - static-ip: k8s-fw-default-gce-test--32658fa96c080068 -Events: - FirstSeen LastSeen Count From SubObjectPath Type Reason Message - --------- -------- ----- ---- ------------- -------- ------ ------- - 2m 2m 1 {loadbalancer-controller } Normal ADD default/gce-test - 1m 1m 1 {loadbalancer-controller } Normal CREATE ip: 35.186.221.137 - 1m 1m 3 {loadbalancer-controller } Normal Service default backend set to http-svc:30301 - -$ curl 35.186.221.137 -k -curl 35.186.221.137 -L -curl: (60) SSL certificate problem: self signed certificate -More details here: http://curl.haxx.se/docs/sslcerts.html - -$ curl 35.186.221.137 -kl -CLIENT VALUES: -client_address=10.240.0.3 -command=GET -real path=/ -query=nil -request_version=1.1 -request_uri=http://35.186.221.137:8080/ - -SERVER VALUES: -server_version=nginx: 1.9.11 - lua: 10001 - -HEADERS RECEIVED: -accept=*/* -connection=Keep-Alive -host=35.186.221.137 -user-agent=curl/7.46.0 -via=1.1 google -x-cloud-trace-context=bfa123130fd623989cca0192e43d9ba4/8610689379063045825 -x-forwarded-for=104.132.0.80, 35.186.221.137 -x-forwarded-proto=https -``` diff --git a/examples/tls-termination/gce/gce-tls-ingress.yaml b/examples/tls-termination/gce/gce-tls-ingress.yaml deleted file mode 100644 index 705a17d36..000000000 --- a/examples/tls-termination/gce/gce-tls-ingress.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: test - annotations: - kubernetes.io/ingress.class: "gce" -spec: - tls: - # This assumes tls-secret exists. - - secretName: tls-secret - backend: - # This assumes http-svc exists and routes to healthy endpoints. - serviceName: http-svc - servicePort: 80 - diff --git a/hack/e2e-internal/e2e-down.sh b/hack/e2e-internal/e2e-down.sh deleted file mode 100755 index 62ee7aec2..000000000 --- a/hack/e2e-internal/e2e-down.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -[[ $DEBUG ]] && set -x - -set -eof pipefail - -# include env -. hack/e2e-internal/e2e-env.sh - -echo "Destroying running docker containers..." -# do not failt if the container is not running -docker rm -f kubelet || true -docker rm -f apiserver || true -docker rm -f etcd || true diff --git a/hack/e2e-internal/e2e-env.sh b/hack/e2e-internal/e2e-env.sh deleted file mode 100755 index d0747bb6e..000000000 --- a/hack/e2e-internal/e2e-env.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -[[ $DEBUG ]] && set -x - -export ETCD_VERSION=3.0.14 -export K8S_VERSION=1.4.5 - -export PWD=`pwd` -export BASEDIR="$(dirname ${BASH_SOURCE})" -export KUBECTL="${BASEDIR}/kubectl" -export GOOS="${GOOS:-linux}" - -if [ ! -e ${KUBECTL} ]; then - echo "kubectl binary is missing. downloading..." - curl -sSL http://storage.googleapis.com/kubernetes-release/release/v${K8S_VERSION}/bin/${GOOS}/amd64/kubectl -o ${KUBECTL} - chmod u+x ${KUBECTL} -fi - -${KUBECTL} config set-cluster travis --server=http://0.0.0.0:8080 -${KUBECTL} config set-context travis --cluster=travis -${KUBECTL} config use-context travis diff --git a/hack/e2e-internal/e2e-status.sh b/hack/e2e-internal/e2e-status.sh deleted file mode 100755 index 21a4e9b29..000000000 --- a/hack/e2e-internal/e2e-status.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -[[ $DEBUG ]] && set -x - -set -eof pipefail - -# include env -. hack/e2e-internal/e2e-env.sh - -echo "Kubernetes information:" -${KUBECTL} version diff --git a/hack/e2e-internal/e2e-up.sh b/hack/e2e-internal/e2e-up.sh deleted file mode 100755 index 15b2d4631..000000000 --- a/hack/e2e-internal/e2e-up.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env bash - -[[ $DEBUG ]] && set -x - -set -eof pipefail - -# include env -. hack/e2e-internal/e2e-env.sh - -echo "Starting etcd..." -docker run -d \ - --net=host \ - --name=etcd \ - quay.io/coreos/etcd:v$ETCD_VERSION - -echo "Starting kubernetes..." - -docker run -d --name=apiserver \ - --net=host \ - --pid=host \ - --privileged=true \ - gcr.io/google_containers/hyperkube:v${K8S_VERSION} \ - /hyperkube apiserver \ - --insecure-bind-address=0.0.0.0 \ - --service-cluster-ip-range=10.0.0.1/24 \ - --etcd_servers=http://127.0.0.1:4001 \ - --v=2 - -docker run -d --name=kubelet \ - --volume=/:/rootfs:ro \ - --volume=/sys:/sys:ro \ - --volume=/dev:/dev \ - --volume=/var/lib/docker/:/var/lib/docker:rw \ - --volume=/var/lib/kubelet/:/var/lib/kubelet:rw \ - --volume=/var/run:/var/run:rw \ - --net=host \ - --pid=host \ - --privileged=true \ - gcr.io/google_containers/hyperkube:v${K8S_VERSION} \ - /hyperkube kubelet \ - --containerized \ - --hostname-override="0.0.0.0" \ - --address="0.0.0.0" \ - --cluster_dns=10.0.0.10 --cluster_domain=cluster.local \ - --api-servers=http://localhost:8080 \ - --config=/etc/kubernetes/manifests-multi - -echo "waiting until api server is available..." -until curl -o /dev/null -sIf http://0.0.0.0:8080; do \ - sleep 10; -done; - -echo "Kubernetes started" -echo "Kubernetes information:" -${KUBECTL} version diff --git a/hack/e2e-internal/ginkgo-e2e.sh b/hack/e2e-internal/ginkgo-e2e.sh deleted file mode 100755 index aa3c61ce6..000000000 --- a/hack/e2e-internal/ginkgo-e2e.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -echo "running ginkgo" \ No newline at end of file diff --git a/hack/e2e.go b/hack/e2e.go deleted file mode 100644 index be9f2aa28..000000000 --- a/hack/e2e.go +++ /dev/null @@ -1,285 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// e2e.go runs the e2e test suite. No non-standard package dependencies; call with "go run". -package main - -import ( - "encoding/xml" - "flag" - "fmt" - "io/ioutil" - "log" - "os" - "os/exec" - "path/filepath" - "strings" - "time" -) - -var ( - build = flag.Bool("build", true, "Build the backends images indicated by the env var BACKENDS required to run e2e tests.") - up = flag.Bool("up", true, "Creates a kubernetes cluster using hyperkube (containerized kubelet).") - down = flag.Bool("down", true, "destroys the created cluster.") - test = flag.Bool("test", true, "Run Ginkgo tests.") - dump = flag.String("dump", "", "If set, dump cluster logs to this location on test or cluster-up failure") - testArgs = flag.String("test-args", "", "Space-separated list of arguments to pass to Ginkgo test runner.") - deployment = flag.String("deployment", "bash", "up/down mechanism") - verbose = flag.Bool("v", false, "If true, print all command output.") -) - -func appendError(errs []error, err error) []error { - if err != nil { - return append(errs, err) - } - return errs -} - -func validWorkingDirectory() error { - cwd, err := os.Getwd() - if err != nil { - return fmt.Errorf("could not get pwd: %v", err) - } - acwd, err := filepath.Abs(cwd) - if err != nil { - return fmt.Errorf("failed to convert %s to an absolute path: %v", cwd, err) - } - if !strings.Contains(filepath.Base(acwd), "ingress") { - return fmt.Errorf("must run from git root directory: %v", acwd) - } - return nil -} - -type TestCase struct { - XMLName xml.Name `xml:"testcase"` - ClassName string `xml:"classname,attr"` - Name string `xml:"name,attr"` - Time float64 `xml:"time,attr"` - Failure string `xml:"failure,omitempty"` -} - -type TestSuite struct { - XMLName xml.Name `xml:"testsuite"` - Failures int `xml:"failures,attr"` - Tests int `xml:"tests,attr"` - Time float64 `xml:"time,attr"` - Cases []TestCase -} - -var suite TestSuite - -func xmlWrap(name string, f func() error) error { - start := time.Now() - err := f() - duration := time.Since(start) - c := TestCase{ - Name: name, - ClassName: "e2e.go", - Time: duration.Seconds(), - } - if err != nil { - c.Failure = err.Error() - suite.Failures++ - } - suite.Cases = append(suite.Cases, c) - suite.Tests++ - return err -} - -func writeXML(start time.Time) { - suite.Time = time.Since(start).Seconds() - out, err := xml.MarshalIndent(&suite, "", " ") - if err != nil { - log.Fatalf("Could not marshal XML: %s", err) - } - path := filepath.Join(*dump, "junit_runner.xml") - f, err := os.Create(path) - if err != nil { - log.Fatalf("Could not create file: %s", err) - } - defer f.Close() - if _, err := f.WriteString(xml.Header); err != nil { - log.Fatalf("Error writing XML header: %s", err) - } - if _, err := f.Write(out); err != nil { - log.Fatalf("Error writing XML data: %s", err) - } - log.Printf("Saved XML output to %s.", path) -} - -func main() { - log.SetFlags(log.LstdFlags | log.Lshortfile) - flag.Parse() - - if err := validWorkingDirectory(); err != nil { - log.Fatalf("Called from invalid working directory: %v", err) - } - - deploy, err := getDeployer() - if err != nil { - log.Fatalf("Error creating deployer: %v", err) - } - - if err := run(deploy); err != nil { - log.Fatalf("Something went wrong: %s", err) - } -} - -func run(deploy deployer) error { - if *dump != "" { - defer writeXML(time.Now()) - } - - if *build { - if err := xmlWrap("Build", Build); err != nil { - return fmt.Errorf("error building: %s", err) - } - } - - if *up { - if err := xmlWrap("TearDown", deploy.Down); err != nil { - return fmt.Errorf("error tearing down previous cluster: %s", err) - } - } - - var errs []error - - if *up { - // If we tried to bring the cluster up, make a courtesy - // attempt to bring it down so we're not leaving resources around. - // - // TODO: We should try calling deploy.Down exactly once. Though to - // stop the leaking resources for now, we want to be on the safe side - // and call it explicitly in defer if the other one is not called. - if *down { - defer xmlWrap("Deferred TearDown", deploy.Down) - } - // Start the cluster using this version. - if err := xmlWrap("Up", deploy.Up); err != nil { - return fmt.Errorf("starting e2e cluster: %s", err) - } - if *dump != "" { - cmd := exec.Command("./cluster/kubectl.sh", "--match-server-version=false", "get", "nodes", "-oyaml") - b, err := cmd.CombinedOutput() - if *verbose { - log.Printf("kubectl get nodes:\n%s", string(b)) - } - if err == nil { - if err := ioutil.WriteFile(filepath.Join(*dump, "nodes.yaml"), b, 0644); err != nil { - errs = appendError(errs, fmt.Errorf("error writing nodes.yaml: %v", err)) - } - } else { - errs = appendError(errs, fmt.Errorf("error running get nodes: %v", err)) - } - } - } - - if *test { - if err := xmlWrap("IsUp", deploy.IsUp); err != nil { - errs = appendError(errs, err) - } else { - errs = appendError(errs, Test()) - } - } - - if len(errs) > 0 && *dump != "" { - errs = appendError(errs, xmlWrap("DumpClusterLogs", func() error { - return DumpClusterLogs(*dump) - })) - } - - if *down { - errs = appendError(errs, xmlWrap("TearDown", deploy.Down)) - } - - if len(errs) != 0 { - return fmt.Errorf("encountered %d errors: %v", len(errs), errs) - } - return nil -} - -func Build() error { - // The build-release script needs stdin to ask the user whether - // it's OK to download the docker image. - cmd := exec.Command("make", "docker-build") - cmd.Stdin = os.Stdin - if err := finishRunning("build-release", cmd); err != nil { - return fmt.Errorf("error building: %v", err) - } - return nil -} - -type deployer interface { - Up() error - IsUp() error - SetupKubecfg() error - Down() error -} - -func getDeployer() (deployer, error) { - switch *deployment { - case "bash": - return bash{}, nil - default: - return nil, fmt.Errorf("unknown deployment strategy %q", *deployment) - } -} - -type bash struct{} - -func (b bash) Up() error { - return finishRunning("up", exec.Command("./hack/e2e-internal/e2e-up.sh")) -} - -func (b bash) IsUp() error { - return finishRunning("get status", exec.Command("./hack/e2e-internal/e2e-status.sh")) -} - -func (b bash) SetupKubecfg() error { - return nil -} - -func (b bash) Down() error { - return finishRunning("teardown", exec.Command("./hack/e2e-internal/e2e-down.sh")) -} - -func DumpClusterLogs(location string) error { - log.Printf("Dumping cluster logs to: %v", location) - return finishRunning("dump cluster logs", exec.Command("./hack/e2e-internal/log-dump.sh", location)) -} - -func Test() error { - if *testArgs == "" { - *testArgs = "--ginkgo.focus=\\[Feature:Ingress\\]" - } - return finishRunning("Ginkgo tests", exec.Command("./hack/e2e-internal/ginkgo-e2e.sh", strings.Fields(*testArgs)...)) -} - -func finishRunning(stepName string, cmd *exec.Cmd) error { - if *verbose { - cmd.Stdout = os.Stdout - cmd.Stderr = os.Stderr - } - log.Printf("Running: %v", stepName) - defer func(start time.Time) { - log.Printf("Step '%s' finished in %s", stepName, time.Since(start)) - }(time.Now()) - - if err := cmd.Run(); err != nil { - return fmt.Errorf("error running %v: %v", stepName, err) - } - return nil -} diff --git a/core/pkg/file/file.go b/pkg/file/file.go similarity index 100% rename from core/pkg/file/file.go rename to pkg/file/file.go diff --git a/core/pkg/ingress/annotations/alias/main.go b/pkg/ingress/annotations/alias/main.go similarity index 95% rename from core/pkg/ingress/annotations/alias/main.go rename to pkg/ingress/annotations/alias/main.go index 3f22f41e8..cde40e2ba 100644 --- a/core/pkg/ingress/annotations/alias/main.go +++ b/pkg/ingress/annotations/alias/main.go @@ -19,7 +19,7 @@ package alias import ( extensions "k8s.io/api/extensions/v1beta1" - "k8s.io/ingress/core/pkg/ingress/annotations/parser" + "k8s.io/ingress-nginx/pkg/ingress/annotations/parser" ) const ( diff --git a/core/pkg/ingress/annotations/alias/main_test.go b/pkg/ingress/annotations/alias/main_test.go similarity index 100% rename from core/pkg/ingress/annotations/alias/main_test.go rename to pkg/ingress/annotations/alias/main_test.go diff --git a/core/pkg/ingress/annotations/auth/main.go b/pkg/ingress/annotations/auth/main.go similarity index 95% rename from core/pkg/ingress/annotations/auth/main.go rename to pkg/ingress/annotations/auth/main.go index 34e056c52..5830f0f71 100644 --- a/core/pkg/ingress/annotations/auth/main.go +++ b/pkg/ingress/annotations/auth/main.go @@ -27,10 +27,10 @@ import ( api "k8s.io/api/core/v1" extensions "k8s.io/api/extensions/v1beta1" - "k8s.io/ingress/core/pkg/file" - "k8s.io/ingress/core/pkg/ingress/annotations/parser" - ing_errors "k8s.io/ingress/core/pkg/ingress/errors" - "k8s.io/ingress/core/pkg/ingress/resolver" + "k8s.io/ingress-nginx/pkg/file" + "k8s.io/ingress-nginx/pkg/ingress/annotations/parser" + ing_errors "k8s.io/ingress-nginx/pkg/ingress/errors" + "k8s.io/ingress-nginx/pkg/ingress/resolver" ) const ( diff --git a/core/pkg/ingress/annotations/auth/main_test.go b/pkg/ingress/annotations/auth/main_test.go similarity index 100% rename from core/pkg/ingress/annotations/auth/main_test.go rename to pkg/ingress/annotations/auth/main_test.go diff --git a/core/pkg/ingress/annotations/authreq/main.go b/pkg/ingress/annotations/authreq/main.go similarity index 97% rename from core/pkg/ingress/annotations/authreq/main.go rename to pkg/ingress/annotations/authreq/main.go index 4c46dd4d5..1ca77c7ac 100644 --- a/core/pkg/ingress/annotations/authreq/main.go +++ b/pkg/ingress/annotations/authreq/main.go @@ -23,8 +23,8 @@ import ( extensions "k8s.io/api/extensions/v1beta1" - "k8s.io/ingress/core/pkg/ingress/annotations/parser" - ing_errors "k8s.io/ingress/core/pkg/ingress/errors" + "k8s.io/ingress-nginx/pkg/ingress/annotations/parser" + ing_errors "k8s.io/ingress-nginx/pkg/ingress/errors" ) const ( diff --git a/core/pkg/ingress/annotations/authreq/main_test.go b/pkg/ingress/annotations/authreq/main_test.go similarity index 100% rename from core/pkg/ingress/annotations/authreq/main_test.go rename to pkg/ingress/annotations/authreq/main_test.go diff --git a/core/pkg/ingress/annotations/authtls/main.go b/pkg/ingress/annotations/authtls/main.go similarity index 95% rename from core/pkg/ingress/annotations/authtls/main.go rename to pkg/ingress/annotations/authtls/main.go index dd8885eb5..7b2746435 100644 --- a/core/pkg/ingress/annotations/authtls/main.go +++ b/pkg/ingress/annotations/authtls/main.go @@ -20,10 +20,10 @@ import ( "github.com/pkg/errors" extensions "k8s.io/api/extensions/v1beta1" - "k8s.io/ingress/core/pkg/ingress/annotations/parser" - ing_errors "k8s.io/ingress/core/pkg/ingress/errors" - "k8s.io/ingress/core/pkg/ingress/resolver" - "k8s.io/ingress/core/pkg/k8s" + "k8s.io/ingress-nginx/pkg/ingress/annotations/parser" + ing_errors "k8s.io/ingress-nginx/pkg/ingress/errors" + "k8s.io/ingress-nginx/pkg/ingress/resolver" + "k8s.io/ingress-nginx/pkg/k8s" "regexp" ) diff --git a/core/pkg/ingress/annotations/authtls/main_test.go b/pkg/ingress/annotations/authtls/main_test.go similarity index 100% rename from core/pkg/ingress/annotations/authtls/main_test.go rename to pkg/ingress/annotations/authtls/main_test.go diff --git a/core/pkg/ingress/annotations/class/main.go b/pkg/ingress/annotations/class/main.go similarity index 94% rename from core/pkg/ingress/annotations/class/main.go rename to pkg/ingress/annotations/class/main.go index 2ff73914c..1d1d6d0ba 100644 --- a/core/pkg/ingress/annotations/class/main.go +++ b/pkg/ingress/annotations/class/main.go @@ -20,8 +20,8 @@ import ( "github.com/golang/glog" extensions "k8s.io/api/extensions/v1beta1" - "k8s.io/ingress/core/pkg/ingress/annotations/parser" - "k8s.io/ingress/core/pkg/ingress/errors" + "k8s.io/ingress-nginx/pkg/ingress/annotations/parser" + "k8s.io/ingress-nginx/pkg/ingress/errors" ) const ( diff --git a/core/pkg/ingress/annotations/class/main_test.go b/pkg/ingress/annotations/class/main_test.go similarity index 100% rename from core/pkg/ingress/annotations/class/main_test.go rename to pkg/ingress/annotations/class/main_test.go diff --git a/core/pkg/ingress/annotations/clientbodybuffersize/main.go b/pkg/ingress/annotations/clientbodybuffersize/main.go similarity index 95% rename from core/pkg/ingress/annotations/clientbodybuffersize/main.go rename to pkg/ingress/annotations/clientbodybuffersize/main.go index bf67f819f..08547d1e8 100644 --- a/core/pkg/ingress/annotations/clientbodybuffersize/main.go +++ b/pkg/ingress/annotations/clientbodybuffersize/main.go @@ -19,7 +19,7 @@ package clientbodybuffersize import ( extensions "k8s.io/api/extensions/v1beta1" - "k8s.io/ingress/core/pkg/ingress/annotations/parser" + "k8s.io/ingress-nginx/pkg/ingress/annotations/parser" ) const ( diff --git a/core/pkg/ingress/annotations/clientbodybuffersize/main_test.go b/pkg/ingress/annotations/clientbodybuffersize/main_test.go similarity index 100% rename from core/pkg/ingress/annotations/clientbodybuffersize/main_test.go rename to pkg/ingress/annotations/clientbodybuffersize/main_test.go diff --git a/core/pkg/ingress/annotations/cors/main.go b/pkg/ingress/annotations/cors/main.go similarity index 95% rename from core/pkg/ingress/annotations/cors/main.go rename to pkg/ingress/annotations/cors/main.go index 37aca7986..8ea55bb1f 100644 --- a/core/pkg/ingress/annotations/cors/main.go +++ b/pkg/ingress/annotations/cors/main.go @@ -19,7 +19,7 @@ package cors import ( extensions "k8s.io/api/extensions/v1beta1" - "k8s.io/ingress/core/pkg/ingress/annotations/parser" + "k8s.io/ingress-nginx/pkg/ingress/annotations/parser" ) const ( diff --git a/core/pkg/ingress/annotations/cors/main_test.go b/pkg/ingress/annotations/cors/main_test.go similarity index 100% rename from core/pkg/ingress/annotations/cors/main_test.go rename to pkg/ingress/annotations/cors/main_test.go diff --git a/core/pkg/ingress/annotations/defaultbackend/main.go b/pkg/ingress/annotations/defaultbackend/main.go similarity index 93% rename from core/pkg/ingress/annotations/defaultbackend/main.go rename to pkg/ingress/annotations/defaultbackend/main.go index f9bb440c2..8fc6f0d4e 100644 --- a/core/pkg/ingress/annotations/defaultbackend/main.go +++ b/pkg/ingress/annotations/defaultbackend/main.go @@ -22,8 +22,8 @@ import ( "github.com/pkg/errors" extensions "k8s.io/api/extensions/v1beta1" - "k8s.io/ingress/core/pkg/ingress/annotations/parser" - "k8s.io/ingress/core/pkg/ingress/resolver" + "k8s.io/ingress-nginx/pkg/ingress/annotations/parser" + "k8s.io/ingress-nginx/pkg/ingress/resolver" ) const ( diff --git a/core/pkg/ingress/annotations/healthcheck/main.go b/pkg/ingress/annotations/healthcheck/main.go similarity index 94% rename from core/pkg/ingress/annotations/healthcheck/main.go rename to pkg/ingress/annotations/healthcheck/main.go index 7b63f068d..5d3850d90 100644 --- a/core/pkg/ingress/annotations/healthcheck/main.go +++ b/pkg/ingress/annotations/healthcheck/main.go @@ -19,8 +19,8 @@ package healthcheck import ( extensions "k8s.io/api/extensions/v1beta1" - "k8s.io/ingress/core/pkg/ingress/annotations/parser" - "k8s.io/ingress/core/pkg/ingress/resolver" + "k8s.io/ingress-nginx/pkg/ingress/annotations/parser" + "k8s.io/ingress-nginx/pkg/ingress/resolver" ) const ( diff --git a/core/pkg/ingress/annotations/healthcheck/main_test.go b/pkg/ingress/annotations/healthcheck/main_test.go similarity index 97% rename from core/pkg/ingress/annotations/healthcheck/main_test.go rename to pkg/ingress/annotations/healthcheck/main_test.go index 14786bacc..afcc9540d 100644 --- a/core/pkg/ingress/annotations/healthcheck/main_test.go +++ b/pkg/ingress/annotations/healthcheck/main_test.go @@ -24,7 +24,7 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" - "k8s.io/ingress/core/pkg/ingress/defaults" + "k8s.io/ingress-nginx/pkg/ingress/defaults" ) func buildIngress() *extensions.Ingress { diff --git a/core/pkg/ingress/annotations/ipwhitelist/main.go b/pkg/ingress/annotations/ipwhitelist/main.go similarity index 93% rename from core/pkg/ingress/annotations/ipwhitelist/main.go rename to pkg/ingress/annotations/ipwhitelist/main.go index e775abe3a..df2fe522c 100644 --- a/core/pkg/ingress/annotations/ipwhitelist/main.go +++ b/pkg/ingress/annotations/ipwhitelist/main.go @@ -23,11 +23,11 @@ import ( "github.com/pkg/errors" extensions "k8s.io/api/extensions/v1beta1" - "k8s.io/ingress/core/pkg/net" + "k8s.io/ingress-nginx/pkg/net" - "k8s.io/ingress/core/pkg/ingress/annotations/parser" - ing_errors "k8s.io/ingress/core/pkg/ingress/errors" - "k8s.io/ingress/core/pkg/ingress/resolver" + "k8s.io/ingress-nginx/pkg/ingress/annotations/parser" + ing_errors "k8s.io/ingress-nginx/pkg/ingress/errors" + "k8s.io/ingress-nginx/pkg/ingress/resolver" ) const ( diff --git a/core/pkg/ingress/annotations/ipwhitelist/main_test.go b/pkg/ingress/annotations/ipwhitelist/main_test.go similarity index 99% rename from core/pkg/ingress/annotations/ipwhitelist/main_test.go rename to pkg/ingress/annotations/ipwhitelist/main_test.go index b5ab5ed2f..66899a517 100644 --- a/core/pkg/ingress/annotations/ipwhitelist/main_test.go +++ b/pkg/ingress/annotations/ipwhitelist/main_test.go @@ -24,7 +24,7 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" - "k8s.io/ingress/core/pkg/ingress/defaults" + "k8s.io/ingress-nginx/pkg/ingress/defaults" ) func buildIngress() *extensions.Ingress { diff --git a/core/pkg/ingress/annotations/parser/main.go b/pkg/ingress/annotations/parser/main.go similarity index 98% rename from core/pkg/ingress/annotations/parser/main.go rename to pkg/ingress/annotations/parser/main.go index 929ff657f..2ef0a81ea 100644 --- a/core/pkg/ingress/annotations/parser/main.go +++ b/pkg/ingress/annotations/parser/main.go @@ -21,7 +21,7 @@ import ( extensions "k8s.io/api/extensions/v1beta1" - "k8s.io/ingress/core/pkg/ingress/errors" + "k8s.io/ingress-nginx/pkg/ingress/errors" ) // IngressAnnotation has a method to parse annotations located in Ingress diff --git a/core/pkg/ingress/annotations/parser/main_test.go b/pkg/ingress/annotations/parser/main_test.go similarity index 100% rename from core/pkg/ingress/annotations/parser/main_test.go rename to pkg/ingress/annotations/parser/main_test.go diff --git a/core/pkg/ingress/annotations/portinredirect/main.go b/pkg/ingress/annotations/portinredirect/main.go similarity index 92% rename from core/pkg/ingress/annotations/portinredirect/main.go rename to pkg/ingress/annotations/portinredirect/main.go index 3854f7602..90386cc8f 100644 --- a/core/pkg/ingress/annotations/portinredirect/main.go +++ b/pkg/ingress/annotations/portinredirect/main.go @@ -19,8 +19,8 @@ package portinredirect import ( extensions "k8s.io/api/extensions/v1beta1" - "k8s.io/ingress/core/pkg/ingress/annotations/parser" - "k8s.io/ingress/core/pkg/ingress/resolver" + "k8s.io/ingress-nginx/pkg/ingress/annotations/parser" + "k8s.io/ingress-nginx/pkg/ingress/resolver" ) const ( diff --git a/core/pkg/ingress/annotations/portinredirect/main_test.go b/pkg/ingress/annotations/portinredirect/main_test.go similarity index 98% rename from core/pkg/ingress/annotations/portinredirect/main_test.go rename to pkg/ingress/annotations/portinredirect/main_test.go index 4c43e2895..44b0444e9 100644 --- a/core/pkg/ingress/annotations/portinredirect/main_test.go +++ b/pkg/ingress/annotations/portinredirect/main_test.go @@ -26,7 +26,7 @@ import ( "fmt" - "k8s.io/ingress/core/pkg/ingress/defaults" + "k8s.io/ingress-nginx/pkg/ingress/defaults" ) func buildIngress() *extensions.Ingress { diff --git a/core/pkg/ingress/annotations/proxy/main.go b/pkg/ingress/annotations/proxy/main.go similarity index 97% rename from core/pkg/ingress/annotations/proxy/main.go rename to pkg/ingress/annotations/proxy/main.go index e31fb4ba7..b35696b97 100644 --- a/core/pkg/ingress/annotations/proxy/main.go +++ b/pkg/ingress/annotations/proxy/main.go @@ -19,8 +19,8 @@ package proxy import ( extensions "k8s.io/api/extensions/v1beta1" - "k8s.io/ingress/core/pkg/ingress/annotations/parser" - "k8s.io/ingress/core/pkg/ingress/resolver" + "k8s.io/ingress-nginx/pkg/ingress/annotations/parser" + "k8s.io/ingress-nginx/pkg/ingress/resolver" ) const ( diff --git a/core/pkg/ingress/annotations/proxy/main_test.go b/pkg/ingress/annotations/proxy/main_test.go similarity index 93% rename from core/pkg/ingress/annotations/proxy/main_test.go rename to pkg/ingress/annotations/proxy/main_test.go index 8700457f1..04ffbda53 100644 --- a/core/pkg/ingress/annotations/proxy/main_test.go +++ b/pkg/ingress/annotations/proxy/main_test.go @@ -24,7 +24,7 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" - "k8s.io/ingress/core/pkg/ingress/defaults" + "k8s.io/ingress-nginx/pkg/ingress/defaults" ) func buildIngress() *extensions.Ingress { @@ -67,14 +67,14 @@ type mockBackend struct { func (m mockBackend) GetDefaultBackend() defaults.Backend { return defaults.Backend{ - UpstreamFailTimeout: 1, - ProxyConnectTimeout: 10, - ProxySendTimeout: 15, - ProxyReadTimeout: 20, - ProxyBufferSize: "10k", - ProxyBodySize: "3k", - ProxyNextUpstream: "error", - ProxyPassParams: "nocanon keepalive=On", + UpstreamFailTimeout: 1, + ProxyConnectTimeout: 10, + ProxySendTimeout: 15, + ProxyReadTimeout: 20, + ProxyBufferSize: "10k", + ProxyBodySize: "3k", + ProxyNextUpstream: "error", + ProxyPassParams: "nocanon keepalive=On", ProxyRequestBuffering: "on", } } diff --git a/core/pkg/ingress/annotations/ratelimit/main.go b/pkg/ingress/annotations/ratelimit/main.go similarity index 97% rename from core/pkg/ingress/annotations/ratelimit/main.go rename to pkg/ingress/annotations/ratelimit/main.go index b2d8979f1..651b71859 100644 --- a/core/pkg/ingress/annotations/ratelimit/main.go +++ b/pkg/ingress/annotations/ratelimit/main.go @@ -24,9 +24,9 @@ import ( extensions "k8s.io/api/extensions/v1beta1" - "k8s.io/ingress/core/pkg/ingress/annotations/parser" - "k8s.io/ingress/core/pkg/ingress/resolver" - "k8s.io/ingress/core/pkg/net" + "k8s.io/ingress-nginx/pkg/ingress/annotations/parser" + "k8s.io/ingress-nginx/pkg/ingress/resolver" + "k8s.io/ingress-nginx/pkg/net" ) const ( diff --git a/core/pkg/ingress/annotations/ratelimit/main_test.go b/pkg/ingress/annotations/ratelimit/main_test.go similarity index 98% rename from core/pkg/ingress/annotations/ratelimit/main_test.go rename to pkg/ingress/annotations/ratelimit/main_test.go index e7d405c03..9b079f293 100644 --- a/core/pkg/ingress/annotations/ratelimit/main_test.go +++ b/pkg/ingress/annotations/ratelimit/main_test.go @@ -24,7 +24,7 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" - "k8s.io/ingress/core/pkg/ingress/defaults" + "k8s.io/ingress-nginx/pkg/ingress/defaults" ) func buildIngress() *extensions.Ingress { diff --git a/core/pkg/ingress/annotations/redirect/redirect.go b/pkg/ingress/annotations/redirect/redirect.go similarity index 96% rename from core/pkg/ingress/annotations/redirect/redirect.go rename to pkg/ingress/annotations/redirect/redirect.go index b5e366580..5fd64a2ee 100644 --- a/core/pkg/ingress/annotations/redirect/redirect.go +++ b/pkg/ingress/annotations/redirect/redirect.go @@ -23,8 +23,8 @@ import ( extensions "k8s.io/api/extensions/v1beta1" - "k8s.io/ingress/core/pkg/ingress/annotations/parser" - "k8s.io/ingress/core/pkg/ingress/errors" + "k8s.io/ingress-nginx/pkg/ingress/annotations/parser" + "k8s.io/ingress-nginx/pkg/ingress/errors" ) const ( diff --git a/core/pkg/ingress/annotations/rewrite/main.go b/pkg/ingress/annotations/rewrite/main.go similarity index 97% rename from core/pkg/ingress/annotations/rewrite/main.go rename to pkg/ingress/annotations/rewrite/main.go index 32cc421ae..ce97f657d 100644 --- a/core/pkg/ingress/annotations/rewrite/main.go +++ b/pkg/ingress/annotations/rewrite/main.go @@ -19,8 +19,8 @@ package rewrite import ( extensions "k8s.io/api/extensions/v1beta1" - "k8s.io/ingress/core/pkg/ingress/annotations/parser" - "k8s.io/ingress/core/pkg/ingress/resolver" + "k8s.io/ingress-nginx/pkg/ingress/annotations/parser" + "k8s.io/ingress-nginx/pkg/ingress/resolver" ) const ( diff --git a/core/pkg/ingress/annotations/rewrite/main_test.go b/pkg/ingress/annotations/rewrite/main_test.go similarity index 98% rename from core/pkg/ingress/annotations/rewrite/main_test.go rename to pkg/ingress/annotations/rewrite/main_test.go index 6529857f9..5da0cfeee 100644 --- a/core/pkg/ingress/annotations/rewrite/main_test.go +++ b/pkg/ingress/annotations/rewrite/main_test.go @@ -24,7 +24,7 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" - "k8s.io/ingress/core/pkg/ingress/defaults" + "k8s.io/ingress-nginx/pkg/ingress/defaults" ) const ( diff --git a/core/pkg/ingress/annotations/secureupstream/main.go b/pkg/ingress/annotations/secureupstream/main.go similarity index 95% rename from core/pkg/ingress/annotations/secureupstream/main.go rename to pkg/ingress/annotations/secureupstream/main.go index 33c979819..119041cac 100644 --- a/core/pkg/ingress/annotations/secureupstream/main.go +++ b/pkg/ingress/annotations/secureupstream/main.go @@ -22,8 +22,8 @@ import ( "github.com/pkg/errors" extensions "k8s.io/api/extensions/v1beta1" - "k8s.io/ingress/core/pkg/ingress/annotations/parser" - "k8s.io/ingress/core/pkg/ingress/resolver" + "k8s.io/ingress-nginx/pkg/ingress/annotations/parser" + "k8s.io/ingress-nginx/pkg/ingress/resolver" ) const ( diff --git a/core/pkg/ingress/annotations/secureupstream/main_test.go b/pkg/ingress/annotations/secureupstream/main_test.go similarity index 98% rename from core/pkg/ingress/annotations/secureupstream/main_test.go rename to pkg/ingress/annotations/secureupstream/main_test.go index 961721b4f..27e4f22d7 100644 --- a/core/pkg/ingress/annotations/secureupstream/main_test.go +++ b/pkg/ingress/annotations/secureupstream/main_test.go @@ -26,7 +26,7 @@ import ( "fmt" "k8s.io/apimachinery/pkg/util/intstr" - "k8s.io/ingress/core/pkg/ingress/resolver" + "k8s.io/ingress-nginx/pkg/ingress/resolver" ) func buildIngress() *extensions.Ingress { diff --git a/core/pkg/ingress/annotations/serversnippet/main.go b/pkg/ingress/annotations/serversnippet/main.go similarity index 95% rename from core/pkg/ingress/annotations/serversnippet/main.go rename to pkg/ingress/annotations/serversnippet/main.go index 0062bfdd5..a67cae177 100644 --- a/core/pkg/ingress/annotations/serversnippet/main.go +++ b/pkg/ingress/annotations/serversnippet/main.go @@ -19,7 +19,7 @@ package serversnippet import ( extensions "k8s.io/api/extensions/v1beta1" - "k8s.io/ingress/core/pkg/ingress/annotations/parser" + "k8s.io/ingress-nginx/pkg/ingress/annotations/parser" ) const ( diff --git a/core/pkg/ingress/annotations/serversnippet/main_test.go b/pkg/ingress/annotations/serversnippet/main_test.go similarity index 100% rename from core/pkg/ingress/annotations/serversnippet/main_test.go rename to pkg/ingress/annotations/serversnippet/main_test.go diff --git a/core/pkg/ingress/annotations/serviceupstream/main.go b/pkg/ingress/annotations/serviceupstream/main.go similarity index 95% rename from core/pkg/ingress/annotations/serviceupstream/main.go rename to pkg/ingress/annotations/serviceupstream/main.go index a92d4a67c..0a21fde5f 100644 --- a/core/pkg/ingress/annotations/serviceupstream/main.go +++ b/pkg/ingress/annotations/serviceupstream/main.go @@ -18,7 +18,7 @@ package serviceupstream import ( extensions "k8s.io/api/extensions/v1beta1" - "k8s.io/ingress/core/pkg/ingress/annotations/parser" + "k8s.io/ingress-nginx/pkg/ingress/annotations/parser" ) const ( diff --git a/core/pkg/ingress/annotations/serviceupstream/main_test.go b/pkg/ingress/annotations/serviceupstream/main_test.go similarity index 100% rename from core/pkg/ingress/annotations/serviceupstream/main_test.go rename to pkg/ingress/annotations/serviceupstream/main_test.go diff --git a/core/pkg/ingress/annotations/sessionaffinity/main.go b/pkg/ingress/annotations/sessionaffinity/main.go similarity index 98% rename from core/pkg/ingress/annotations/sessionaffinity/main.go rename to pkg/ingress/annotations/sessionaffinity/main.go index 032af3b77..c0b274b09 100644 --- a/core/pkg/ingress/annotations/sessionaffinity/main.go +++ b/pkg/ingress/annotations/sessionaffinity/main.go @@ -23,7 +23,7 @@ import ( extensions "k8s.io/api/extensions/v1beta1" - "k8s.io/ingress/core/pkg/ingress/annotations/parser" + "k8s.io/ingress-nginx/pkg/ingress/annotations/parser" ) const ( diff --git a/core/pkg/ingress/annotations/sessionaffinity/main_test.go b/pkg/ingress/annotations/sessionaffinity/main_test.go similarity index 100% rename from core/pkg/ingress/annotations/sessionaffinity/main_test.go rename to pkg/ingress/annotations/sessionaffinity/main_test.go diff --git a/core/pkg/ingress/annotations/snippet/main.go b/pkg/ingress/annotations/snippet/main.go similarity index 95% rename from core/pkg/ingress/annotations/snippet/main.go rename to pkg/ingress/annotations/snippet/main.go index 3c1e5a212..3e37fb5a6 100644 --- a/core/pkg/ingress/annotations/snippet/main.go +++ b/pkg/ingress/annotations/snippet/main.go @@ -19,7 +19,7 @@ package snippet import ( extensions "k8s.io/api/extensions/v1beta1" - "k8s.io/ingress/core/pkg/ingress/annotations/parser" + "k8s.io/ingress-nginx/pkg/ingress/annotations/parser" ) const ( diff --git a/core/pkg/ingress/annotations/snippet/main_test.go b/pkg/ingress/annotations/snippet/main_test.go similarity index 100% rename from core/pkg/ingress/annotations/snippet/main_test.go rename to pkg/ingress/annotations/snippet/main_test.go diff --git a/core/pkg/ingress/annotations/sslpassthrough/main.go b/pkg/ingress/annotations/sslpassthrough/main.go similarity index 91% rename from core/pkg/ingress/annotations/sslpassthrough/main.go rename to pkg/ingress/annotations/sslpassthrough/main.go index d08634e02..a4fcca83e 100644 --- a/core/pkg/ingress/annotations/sslpassthrough/main.go +++ b/pkg/ingress/annotations/sslpassthrough/main.go @@ -19,8 +19,8 @@ package sslpassthrough import ( extensions "k8s.io/api/extensions/v1beta1" - "k8s.io/ingress/core/pkg/ingress/annotations/parser" - ing_errors "k8s.io/ingress/core/pkg/ingress/errors" + "k8s.io/ingress-nginx/pkg/ingress/annotations/parser" + ing_errors "k8s.io/ingress-nginx/pkg/ingress/errors" ) const ( diff --git a/core/pkg/ingress/annotations/sslpassthrough/main_test.go b/pkg/ingress/annotations/sslpassthrough/main_test.go similarity index 100% rename from core/pkg/ingress/annotations/sslpassthrough/main_test.go rename to pkg/ingress/annotations/sslpassthrough/main_test.go diff --git a/core/pkg/ingress/annotations/upstreamvhost/main.go b/pkg/ingress/annotations/upstreamvhost/main.go similarity index 95% rename from core/pkg/ingress/annotations/upstreamvhost/main.go rename to pkg/ingress/annotations/upstreamvhost/main.go index 1603905d0..c7af79246 100644 --- a/core/pkg/ingress/annotations/upstreamvhost/main.go +++ b/pkg/ingress/annotations/upstreamvhost/main.go @@ -19,7 +19,7 @@ package upstreamvhost import ( extensions "k8s.io/api/extensions/v1beta1" - "k8s.io/ingress/core/pkg/ingress/annotations/parser" + "k8s.io/ingress-nginx/pkg/ingress/annotations/parser" ) const ( diff --git a/core/pkg/ingress/annotations/vtsfilterkey/main.go b/pkg/ingress/annotations/vtsfilterkey/main.go similarity index 95% rename from core/pkg/ingress/annotations/vtsfilterkey/main.go rename to pkg/ingress/annotations/vtsfilterkey/main.go index 401e9b7e8..04965bbf2 100644 --- a/core/pkg/ingress/annotations/vtsfilterkey/main.go +++ b/pkg/ingress/annotations/vtsfilterkey/main.go @@ -19,7 +19,7 @@ package vtsfilterkey import ( extensions "k8s.io/api/extensions/v1beta1" - "k8s.io/ingress/core/pkg/ingress/annotations/parser" + "k8s.io/ingress-nginx/pkg/ingress/annotations/parser" ) const ( diff --git a/core/pkg/ingress/controller/annotations.go b/pkg/ingress/controller/annotations.go similarity index 78% rename from core/pkg/ingress/controller/annotations.go rename to pkg/ingress/controller/annotations.go index 40f623bcf..caeed0c41 100644 --- a/core/pkg/ingress/controller/annotations.go +++ b/pkg/ingress/controller/annotations.go @@ -20,31 +20,31 @@ import ( "github.com/golang/glog" extensions "k8s.io/api/extensions/v1beta1" - "k8s.io/ingress/core/pkg/ingress/annotations/alias" - "k8s.io/ingress/core/pkg/ingress/annotations/auth" - "k8s.io/ingress/core/pkg/ingress/annotations/authreq" - "k8s.io/ingress/core/pkg/ingress/annotations/authtls" - "k8s.io/ingress/core/pkg/ingress/annotations/clientbodybuffersize" - "k8s.io/ingress/core/pkg/ingress/annotations/cors" - "k8s.io/ingress/core/pkg/ingress/annotations/defaultbackend" - "k8s.io/ingress/core/pkg/ingress/annotations/healthcheck" - "k8s.io/ingress/core/pkg/ingress/annotations/ipwhitelist" - "k8s.io/ingress/core/pkg/ingress/annotations/parser" - "k8s.io/ingress/core/pkg/ingress/annotations/portinredirect" - "k8s.io/ingress/core/pkg/ingress/annotations/proxy" - "k8s.io/ingress/core/pkg/ingress/annotations/ratelimit" - "k8s.io/ingress/core/pkg/ingress/annotations/redirect" - "k8s.io/ingress/core/pkg/ingress/annotations/rewrite" - "k8s.io/ingress/core/pkg/ingress/annotations/secureupstream" - "k8s.io/ingress/core/pkg/ingress/annotations/serversnippet" - "k8s.io/ingress/core/pkg/ingress/annotations/serviceupstream" - "k8s.io/ingress/core/pkg/ingress/annotations/sessionaffinity" - "k8s.io/ingress/core/pkg/ingress/annotations/snippet" - "k8s.io/ingress/core/pkg/ingress/annotations/sslpassthrough" - "k8s.io/ingress/core/pkg/ingress/annotations/upstreamvhost" - "k8s.io/ingress/core/pkg/ingress/annotations/vtsfilterkey" - "k8s.io/ingress/core/pkg/ingress/errors" - "k8s.io/ingress/core/pkg/ingress/resolver" + "k8s.io/ingress-nginx/pkg/ingress/annotations/alias" + "k8s.io/ingress-nginx/pkg/ingress/annotations/auth" + "k8s.io/ingress-nginx/pkg/ingress/annotations/authreq" + "k8s.io/ingress-nginx/pkg/ingress/annotations/authtls" + "k8s.io/ingress-nginx/pkg/ingress/annotations/clientbodybuffersize" + "k8s.io/ingress-nginx/pkg/ingress/annotations/cors" + "k8s.io/ingress-nginx/pkg/ingress/annotations/defaultbackend" + "k8s.io/ingress-nginx/pkg/ingress/annotations/healthcheck" + "k8s.io/ingress-nginx/pkg/ingress/annotations/ipwhitelist" + "k8s.io/ingress-nginx/pkg/ingress/annotations/parser" + "k8s.io/ingress-nginx/pkg/ingress/annotations/portinredirect" + "k8s.io/ingress-nginx/pkg/ingress/annotations/proxy" + "k8s.io/ingress-nginx/pkg/ingress/annotations/ratelimit" + "k8s.io/ingress-nginx/pkg/ingress/annotations/redirect" + "k8s.io/ingress-nginx/pkg/ingress/annotations/rewrite" + "k8s.io/ingress-nginx/pkg/ingress/annotations/secureupstream" + "k8s.io/ingress-nginx/pkg/ingress/annotations/serversnippet" + "k8s.io/ingress-nginx/pkg/ingress/annotations/serviceupstream" + "k8s.io/ingress-nginx/pkg/ingress/annotations/sessionaffinity" + "k8s.io/ingress-nginx/pkg/ingress/annotations/snippet" + "k8s.io/ingress-nginx/pkg/ingress/annotations/sslpassthrough" + "k8s.io/ingress-nginx/pkg/ingress/annotations/upstreamvhost" + "k8s.io/ingress-nginx/pkg/ingress/annotations/vtsfilterkey" + "k8s.io/ingress-nginx/pkg/ingress/errors" + "k8s.io/ingress-nginx/pkg/ingress/resolver" ) type extractorConfig interface { diff --git a/core/pkg/ingress/controller/annotations_test.go b/pkg/ingress/controller/annotations_test.go similarity index 98% rename from core/pkg/ingress/controller/annotations_test.go rename to pkg/ingress/controller/annotations_test.go index 47106d8e7..edc4694ab 100644 --- a/core/pkg/ingress/controller/annotations_test.go +++ b/pkg/ingress/controller/annotations_test.go @@ -24,8 +24,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" - "k8s.io/ingress/core/pkg/ingress/defaults" - "k8s.io/ingress/core/pkg/ingress/resolver" + "k8s.io/ingress-nginx/pkg/ingress/defaults" + "k8s.io/ingress-nginx/pkg/ingress/resolver" ) const ( diff --git a/core/pkg/ingress/controller/backend_ssl.go b/pkg/ingress/controller/backend_ssl.go similarity index 96% rename from core/pkg/ingress/controller/backend_ssl.go rename to pkg/ingress/controller/backend_ssl.go index 6fbaf303b..a82bfd854 100644 --- a/core/pkg/ingress/controller/backend_ssl.go +++ b/pkg/ingress/controller/backend_ssl.go @@ -27,10 +27,10 @@ import ( extensions "k8s.io/api/extensions/v1beta1" "k8s.io/client-go/tools/cache" - "k8s.io/ingress/core/pkg/ingress" - "k8s.io/ingress/core/pkg/ingress/annotations/class" - "k8s.io/ingress/core/pkg/ingress/annotations/parser" - "k8s.io/ingress/core/pkg/net/ssl" + "k8s.io/ingress-nginx/pkg/ingress" + "k8s.io/ingress-nginx/pkg/ingress/annotations/class" + "k8s.io/ingress-nginx/pkg/ingress/annotations/parser" + "k8s.io/ingress-nginx/pkg/net/ssl" ) // syncSecret keeps in sync Secrets used by Ingress rules with the files on diff --git a/core/pkg/ingress/controller/backend_ssl_test.go b/pkg/ingress/controller/backend_ssl_test.go similarity index 98% rename from core/pkg/ingress/controller/backend_ssl_test.go rename to pkg/ingress/controller/backend_ssl_test.go index a6416b61b..69b49cf74 100644 --- a/core/pkg/ingress/controller/backend_ssl_test.go +++ b/pkg/ingress/controller/backend_ssl_test.go @@ -28,9 +28,9 @@ import ( cache_client "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/flowcontrol" - "k8s.io/ingress/core/pkg/ingress" - "k8s.io/ingress/core/pkg/ingress/store" - "k8s.io/ingress/core/pkg/task" + "k8s.io/ingress-nginx/pkg/ingress" + "k8s.io/ingress-nginx/pkg/ingress/store" + "k8s.io/ingress-nginx/pkg/task" "k8s.io/kubernetes/pkg/api" ) diff --git a/core/pkg/ingress/controller/controller.go b/pkg/ingress/controller/controller.go similarity index 98% rename from core/pkg/ingress/controller/controller.go rename to pkg/ingress/controller/controller.go index 84d9155be..e127f3cb9 100644 --- a/core/pkg/ingress/controller/controller.go +++ b/pkg/ingress/controller/controller.go @@ -41,19 +41,19 @@ import ( v1core "k8s.io/client-go/kubernetes/typed/core/v1" "k8s.io/client-go/tools/record" "k8s.io/client-go/util/flowcontrol" + "k8s.io/kubernetes/pkg/kubelet/util/sliceutils" - "k8s.io/ingress/core/pkg/ingress" - "k8s.io/ingress/core/pkg/ingress/annotations/class" - "k8s.io/ingress/core/pkg/ingress/annotations/healthcheck" - "k8s.io/ingress/core/pkg/ingress/annotations/parser" - "k8s.io/ingress/core/pkg/ingress/annotations/proxy" - "k8s.io/ingress/core/pkg/ingress/defaults" - "k8s.io/ingress/core/pkg/ingress/resolver" - "k8s.io/ingress/core/pkg/ingress/status" - "k8s.io/ingress/core/pkg/k8s" - "k8s.io/ingress/core/pkg/net/ssl" - local_strings "k8s.io/ingress/core/pkg/strings" - "k8s.io/ingress/core/pkg/task" + "k8s.io/ingress-nginx/pkg/ingress" + "k8s.io/ingress-nginx/pkg/ingress/annotations/class" + "k8s.io/ingress-nginx/pkg/ingress/annotations/healthcheck" + "k8s.io/ingress-nginx/pkg/ingress/annotations/parser" + "k8s.io/ingress-nginx/pkg/ingress/annotations/proxy" + "k8s.io/ingress-nginx/pkg/ingress/defaults" + "k8s.io/ingress-nginx/pkg/ingress/resolver" + "k8s.io/ingress-nginx/pkg/ingress/status" + "k8s.io/ingress-nginx/pkg/k8s" + "k8s.io/ingress-nginx/pkg/net/ssl" + "k8s.io/ingress-nginx/pkg/task" ) const ( @@ -351,7 +351,7 @@ func (ic *GenericController) getStreamServices(configmapName string, proto apiv1 } // this ports used by the backend - if local_strings.StringInSlice(k, reservedPorts) { + if sliceutils.StringInSlice(k, reservedPorts) { glog.Warningf("port %v cannot be used for TCP or UDP services. It is reserved for the Ingress controller", k) continue } diff --git a/core/pkg/ingress/controller/launch.go b/pkg/ingress/controller/launch.go similarity index 99% rename from core/pkg/ingress/controller/launch.go rename to pkg/ingress/controller/launch.go index b1155c730..a8aedebd3 100644 --- a/core/pkg/ingress/controller/launch.go +++ b/pkg/ingress/controller/launch.go @@ -23,8 +23,8 @@ import ( "k8s.io/client-go/tools/clientcmd" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" - "k8s.io/ingress/core/pkg/ingress" - "k8s.io/ingress/core/pkg/k8s" + "k8s.io/ingress-nginx/pkg/ingress" + "k8s.io/ingress-nginx/pkg/k8s" ) // NewIngressController returns a configured Ingress controller diff --git a/core/pkg/ingress/controller/listers.go b/pkg/ingress/controller/listers.go similarity index 98% rename from core/pkg/ingress/controller/listers.go rename to pkg/ingress/controller/listers.go index 6765f3478..e59af7088 100644 --- a/core/pkg/ingress/controller/listers.go +++ b/pkg/ingress/controller/listers.go @@ -29,9 +29,9 @@ import ( "k8s.io/client-go/tools/cache" fcache "k8s.io/client-go/tools/cache/testing" - "k8s.io/ingress/core/pkg/ingress" - "k8s.io/ingress/core/pkg/ingress/annotations/class" - "k8s.io/ingress/core/pkg/ingress/annotations/parser" + "k8s.io/ingress-nginx/pkg/ingress" + "k8s.io/ingress-nginx/pkg/ingress/annotations/class" + "k8s.io/ingress-nginx/pkg/ingress/annotations/parser" ) type cacheController struct { diff --git a/core/pkg/ingress/controller/metrics.go b/pkg/ingress/controller/metrics.go similarity index 98% rename from core/pkg/ingress/controller/metrics.go rename to pkg/ingress/controller/metrics.go index e02773c6c..d51845fec 100644 --- a/core/pkg/ingress/controller/metrics.go +++ b/pkg/ingress/controller/metrics.go @@ -19,7 +19,7 @@ package controller import ( "github.com/prometheus/client_golang/prometheus" - "k8s.io/ingress/core/pkg/ingress" + "k8s.io/ingress-nginx/pkg/ingress" ) const ( diff --git a/core/pkg/ingress/controller/util.go b/pkg/ingress/controller/util.go similarity index 97% rename from core/pkg/ingress/controller/util.go rename to pkg/ingress/controller/util.go index 30d93c8b3..09be63aa4 100644 --- a/core/pkg/ingress/controller/util.go +++ b/pkg/ingress/controller/util.go @@ -23,7 +23,7 @@ import ( api "k8s.io/api/core/v1" - "k8s.io/ingress/core/pkg/ingress" + "k8s.io/ingress-nginx/pkg/ingress" ) // DeniedKeyName name of the key that contains the reason to deny a location diff --git a/core/pkg/ingress/controller/util_test.go b/pkg/ingress/controller/util_test.go similarity index 83% rename from core/pkg/ingress/controller/util_test.go rename to pkg/ingress/controller/util_test.go index 3847cb2ba..c0e0dad2f 100644 --- a/core/pkg/ingress/controller/util_test.go +++ b/pkg/ingress/controller/util_test.go @@ -20,14 +20,14 @@ import ( "reflect" "testing" - "k8s.io/ingress/core/pkg/ingress" - "k8s.io/ingress/core/pkg/ingress/annotations/auth" - "k8s.io/ingress/core/pkg/ingress/annotations/authreq" - "k8s.io/ingress/core/pkg/ingress/annotations/ipwhitelist" - "k8s.io/ingress/core/pkg/ingress/annotations/proxy" - "k8s.io/ingress/core/pkg/ingress/annotations/ratelimit" - "k8s.io/ingress/core/pkg/ingress/annotations/redirect" - "k8s.io/ingress/core/pkg/ingress/annotations/rewrite" + "k8s.io/ingress-nginx/pkg/ingress" + "k8s.io/ingress-nginx/pkg/ingress/annotations/auth" + "k8s.io/ingress-nginx/pkg/ingress/annotations/authreq" + "k8s.io/ingress-nginx/pkg/ingress/annotations/ipwhitelist" + "k8s.io/ingress-nginx/pkg/ingress/annotations/proxy" + "k8s.io/ingress-nginx/pkg/ingress/annotations/ratelimit" + "k8s.io/ingress-nginx/pkg/ingress/annotations/redirect" + "k8s.io/ingress-nginx/pkg/ingress/annotations/rewrite" ) type fakeError struct{} diff --git a/core/pkg/ingress/defaults/main.go b/pkg/ingress/defaults/main.go similarity index 100% rename from core/pkg/ingress/defaults/main.go rename to pkg/ingress/defaults/main.go diff --git a/core/pkg/ingress/doc.go b/pkg/ingress/doc.go similarity index 100% rename from core/pkg/ingress/doc.go rename to pkg/ingress/doc.go diff --git a/core/pkg/ingress/errors/errors.go b/pkg/ingress/errors/errors.go similarity index 100% rename from core/pkg/ingress/errors/errors.go rename to pkg/ingress/errors/errors.go diff --git a/core/pkg/ingress/errors/errors_test.go b/pkg/ingress/errors/errors_test.go similarity index 100% rename from core/pkg/ingress/errors/errors_test.go rename to pkg/ingress/errors/errors_test.go diff --git a/core/pkg/ingress/resolver/main.go b/pkg/ingress/resolver/main.go similarity index 98% rename from core/pkg/ingress/resolver/main.go rename to pkg/ingress/resolver/main.go index d4672aa76..e024df933 100644 --- a/core/pkg/ingress/resolver/main.go +++ b/pkg/ingress/resolver/main.go @@ -19,7 +19,7 @@ package resolver import ( apiv1 "k8s.io/api/core/v1" - "k8s.io/ingress/core/pkg/ingress/defaults" + "k8s.io/ingress-nginx/pkg/ingress/defaults" ) // DefaultBackend has a method that returns the backend diff --git a/core/pkg/ingress/sort_ingress.go b/pkg/ingress/sort_ingress.go similarity index 100% rename from core/pkg/ingress/sort_ingress.go rename to pkg/ingress/sort_ingress.go diff --git a/core/pkg/ingress/sort_ingress_test.go b/pkg/ingress/sort_ingress_test.go similarity index 100% rename from core/pkg/ingress/sort_ingress_test.go rename to pkg/ingress/sort_ingress_test.go diff --git a/core/pkg/ingress/status/status.go b/pkg/ingress/status/status.go similarity index 97% rename from core/pkg/ingress/status/status.go rename to pkg/ingress/status/status.go index 56cf2774a..ce4af0bf0 100644 --- a/core/pkg/ingress/status/status.go +++ b/pkg/ingress/status/status.go @@ -38,12 +38,12 @@ import ( "k8s.io/client-go/tools/leaderelection" "k8s.io/client-go/tools/leaderelection/resourcelock" "k8s.io/client-go/tools/record" + "k8s.io/kubernetes/pkg/kubelet/util/sliceutils" - "k8s.io/ingress/core/pkg/ingress/annotations/class" - "k8s.io/ingress/core/pkg/ingress/store" - "k8s.io/ingress/core/pkg/k8s" - ingress_strings "k8s.io/ingress/core/pkg/strings" - "k8s.io/ingress/core/pkg/task" + "k8s.io/ingress-nginx/pkg/ingress/annotations/class" + "k8s.io/ingress-nginx/pkg/ingress/store" + "k8s.io/ingress-nginx/pkg/k8s" + "k8s.io/ingress-nginx/pkg/task" ) const ( @@ -268,7 +268,7 @@ func (s *statusSync) runningAddresses() ([]string, error) { addrs := []string{} for _, pod := range pods.Items { name := k8s.GetNodeIP(s.Client, pod.Spec.NodeName) - if !ingress_strings.StringInSlice(name, addrs) { + if !sliceutils.StringInSlice(name, addrs) { addrs = append(addrs, name) } } diff --git a/core/pkg/ingress/status/status_test.go b/pkg/ingress/status/status_test.go similarity index 98% rename from core/pkg/ingress/status/status_test.go rename to pkg/ingress/status/status_test.go index 103b5e473..a4b6b24b8 100644 --- a/core/pkg/ingress/status/status_test.go +++ b/pkg/ingress/status/status_test.go @@ -28,10 +28,10 @@ import ( "k8s.io/client-go/tools/cache" "k8s.io/kubernetes/pkg/api" - "k8s.io/ingress/core/pkg/ingress/annotations/class" - "k8s.io/ingress/core/pkg/ingress/store" - "k8s.io/ingress/core/pkg/k8s" - "k8s.io/ingress/core/pkg/task" + "k8s.io/ingress-nginx/pkg/ingress/annotations/class" + "k8s.io/ingress-nginx/pkg/ingress/store" + "k8s.io/ingress-nginx/pkg/k8s" + "k8s.io/ingress-nginx/pkg/task" ) func buildLoadBalancerIngressByIP() []apiv1.LoadBalancerIngress { diff --git a/core/pkg/ingress/store/main.go b/pkg/ingress/store/main.go similarity index 100% rename from core/pkg/ingress/store/main.go rename to pkg/ingress/store/main.go diff --git a/core/pkg/ingress/type_equals_test.go b/pkg/ingress/type_equals_test.go similarity index 87% rename from core/pkg/ingress/type_equals_test.go rename to pkg/ingress/type_equals_test.go index 26960cb82..2f59fae6f 100644 --- a/core/pkg/ingress/type_equals_test.go +++ b/pkg/ingress/type_equals_test.go @@ -24,19 +24,19 @@ import ( ) func TestEqualConfiguration(t *testing.T) { - ap, _ := filepath.Abs("../../../tests/manifests/configuration-a.json") + ap, _ := filepath.Abs("../../tests/manifests/configuration-a.json") a, err := readJSON(ap) if err != nil { t.Errorf("unexpected error reading JSON file: %v", err) } - bp, _ := filepath.Abs("../../../tests/manifests/configuration-b.json") + bp, _ := filepath.Abs("../../tests/manifests/configuration-b.json") b, err := readJSON(bp) if err != nil { t.Errorf("unexpected error reading JSON file: %v", err) } - cp, _ := filepath.Abs("../../../tests/manifests/configuration-c.json") + cp, _ := filepath.Abs("../../tests/manifests/configuration-c.json") c, err := readJSON(cp) if err != nil { t.Errorf("unexpected error reading JSON file: %v", err) diff --git a/core/pkg/ingress/types.go b/pkg/ingress/types.go similarity index 96% rename from core/pkg/ingress/types.go rename to pkg/ingress/types.go index 52ba386f5..2f3bbeb1c 100644 --- a/core/pkg/ingress/types.go +++ b/pkg/ingress/types.go @@ -26,17 +26,17 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/apiserver/pkg/server/healthz" - "k8s.io/ingress/core/pkg/ingress/annotations/auth" - "k8s.io/ingress/core/pkg/ingress/annotations/authreq" - "k8s.io/ingress/core/pkg/ingress/annotations/authtls" - "k8s.io/ingress/core/pkg/ingress/annotations/ipwhitelist" - "k8s.io/ingress/core/pkg/ingress/annotations/proxy" - "k8s.io/ingress/core/pkg/ingress/annotations/ratelimit" - "k8s.io/ingress/core/pkg/ingress/annotations/redirect" - "k8s.io/ingress/core/pkg/ingress/annotations/rewrite" - "k8s.io/ingress/core/pkg/ingress/defaults" - "k8s.io/ingress/core/pkg/ingress/resolver" - "k8s.io/ingress/core/pkg/ingress/store" + "k8s.io/ingress-nginx/pkg/ingress/annotations/auth" + "k8s.io/ingress-nginx/pkg/ingress/annotations/authreq" + "k8s.io/ingress-nginx/pkg/ingress/annotations/authtls" + "k8s.io/ingress-nginx/pkg/ingress/annotations/ipwhitelist" + "k8s.io/ingress-nginx/pkg/ingress/annotations/proxy" + "k8s.io/ingress-nginx/pkg/ingress/annotations/ratelimit" + "k8s.io/ingress-nginx/pkg/ingress/annotations/redirect" + "k8s.io/ingress-nginx/pkg/ingress/annotations/rewrite" + "k8s.io/ingress-nginx/pkg/ingress/defaults" + "k8s.io/ingress-nginx/pkg/ingress/resolver" + "k8s.io/ingress-nginx/pkg/ingress/store" ) var ( diff --git a/core/pkg/ingress/types_equals.go b/pkg/ingress/types_equals.go similarity index 100% rename from core/pkg/ingress/types_equals.go rename to pkg/ingress/types_equals.go diff --git a/core/pkg/ingress/zz_generated.types.go b/pkg/ingress/zz_generated.types.go similarity index 100% rename from core/pkg/ingress/zz_generated.types.go rename to pkg/ingress/zz_generated.types.go diff --git a/core/pkg/k8s/main.go b/pkg/k8s/main.go similarity index 100% rename from core/pkg/k8s/main.go rename to pkg/k8s/main.go diff --git a/core/pkg/k8s/main_test.go b/pkg/k8s/main_test.go similarity index 100% rename from core/pkg/k8s/main_test.go rename to pkg/k8s/main_test.go diff --git a/core/pkg/net/dns/dns.go b/pkg/net/dns/dns.go similarity index 100% rename from core/pkg/net/dns/dns.go rename to pkg/net/dns/dns.go diff --git a/core/pkg/net/dns/dns_test.go b/pkg/net/dns/dns_test.go similarity index 100% rename from core/pkg/net/dns/dns_test.go rename to pkg/net/dns/dns_test.go diff --git a/core/pkg/net/ipnet.go b/pkg/net/ipnet.go similarity index 100% rename from core/pkg/net/ipnet.go rename to pkg/net/ipnet.go diff --git a/core/pkg/net/ipnet_test.go b/pkg/net/ipnet_test.go similarity index 100% rename from core/pkg/net/ipnet_test.go rename to pkg/net/ipnet_test.go diff --git a/core/pkg/net/net.go b/pkg/net/net.go similarity index 100% rename from core/pkg/net/net.go rename to pkg/net/net.go diff --git a/core/pkg/net/net_test.go b/pkg/net/net_test.go similarity index 100% rename from core/pkg/net/net_test.go rename to pkg/net/net_test.go diff --git a/core/pkg/net/ssl/ssl.go b/pkg/net/ssl/ssl.go similarity index 99% rename from core/pkg/net/ssl/ssl.go rename to pkg/net/ssl/ssl.go index 799cb835c..591b4bcb6 100644 --- a/core/pkg/net/ssl/ssl.go +++ b/pkg/net/ssl/ssl.go @@ -38,8 +38,8 @@ import ( "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/ingress/core/pkg/file" - "k8s.io/ingress/core/pkg/ingress" + "k8s.io/ingress-nginx/pkg/file" + "k8s.io/ingress-nginx/pkg/ingress" ) var ( diff --git a/core/pkg/net/ssl/ssl_test.go b/pkg/net/ssl/ssl_test.go similarity index 99% rename from core/pkg/net/ssl/ssl_test.go rename to pkg/net/ssl/ssl_test.go index d682a17a7..477444ec9 100644 --- a/core/pkg/net/ssl/ssl_test.go +++ b/pkg/net/ssl/ssl_test.go @@ -26,7 +26,7 @@ import ( certutil "k8s.io/client-go/util/cert" "k8s.io/client-go/util/cert/triple" - "k8s.io/ingress/core/pkg/ingress" + "k8s.io/ingress-nginx/pkg/ingress" ) // generateRSACerts generates a self signed certificate using a self generated ca diff --git a/controllers/nginx/pkg/config/config.go b/pkg/nginx/config/config.go similarity index 99% rename from controllers/nginx/pkg/config/config.go rename to pkg/nginx/config/config.go index 50f88f58f..6f29cba7e 100644 --- a/controllers/nginx/pkg/config/config.go +++ b/pkg/nginx/config/config.go @@ -25,8 +25,8 @@ import ( apiv1 "k8s.io/api/core/v1" - "k8s.io/ingress/core/pkg/ingress" - "k8s.io/ingress/core/pkg/ingress/defaults" + "k8s.io/ingress-nginx/pkg/ingress" + "k8s.io/ingress-nginx/pkg/ingress/defaults" ) const ( diff --git a/controllers/nginx/pkg/config/config_test.go b/pkg/nginx/config/config_test.go similarity index 100% rename from controllers/nginx/pkg/config/config_test.go rename to pkg/nginx/config/config_test.go diff --git a/controllers/nginx/pkg/cmd/controller/metrics.go b/pkg/nginx/controller/metrics.go similarity index 97% rename from controllers/nginx/pkg/cmd/controller/metrics.go rename to pkg/nginx/controller/metrics.go index ee33c6c5e..acf25c808 100644 --- a/controllers/nginx/pkg/cmd/controller/metrics.go +++ b/pkg/nginx/controller/metrics.go @@ -14,13 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package controller import ( "github.com/golang/glog" "github.com/prometheus/client_golang/prometheus" - "k8s.io/ingress/controllers/nginx/pkg/metric/collector" + "k8s.io/ingress-nginx/pkg/nginx/metric/collector" ) const ( diff --git a/controllers/nginx/pkg/cmd/controller/nginx.go b/pkg/nginx/controller/nginx.go similarity index 97% rename from controllers/nginx/pkg/cmd/controller/nginx.go rename to pkg/nginx/controller/nginx.go index f9e034800..3139fcb7e 100644 --- a/controllers/nginx/pkg/cmd/controller/nginx.go +++ b/pkg/nginx/controller/nginx.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package controller import ( "bytes" @@ -39,14 +39,14 @@ import ( apiv1 "k8s.io/api/core/v1" extensions "k8s.io/api/extensions/v1beta1" - "k8s.io/ingress/controllers/nginx/pkg/config" - ngx_template "k8s.io/ingress/controllers/nginx/pkg/template" - "k8s.io/ingress/controllers/nginx/pkg/version" - "k8s.io/ingress/core/pkg/ingress" - "k8s.io/ingress/core/pkg/ingress/controller" - "k8s.io/ingress/core/pkg/ingress/defaults" - "k8s.io/ingress/core/pkg/net/dns" - "k8s.io/ingress/core/pkg/net/ssl" + "k8s.io/ingress-nginx/pkg/ingress" + "k8s.io/ingress-nginx/pkg/ingress/controller" + "k8s.io/ingress-nginx/pkg/ingress/defaults" + "k8s.io/ingress-nginx/pkg/net/dns" + "k8s.io/ingress-nginx/pkg/net/ssl" + "k8s.io/ingress-nginx/pkg/nginx/config" + ngx_template "k8s.io/ingress-nginx/pkg/nginx/template" + "k8s.io/ingress-nginx/version" ) type statusModule string @@ -67,10 +67,10 @@ var ( defIngressClass = "nginx" ) -// newNGINXController creates a new NGINX Ingress controller. +// NewNGINXController creates a new NGINX Ingress controller. // If the environment variable NGINX_BINARY exists it will be used // as source for nginx commands -func newNGINXController() *NGINXController { +func NewNGINXController() *NGINXController { ngx := os.Getenv("NGINX_BINARY") if ngx == "" { ngx = nginxBinary diff --git a/controllers/nginx/pkg/cmd/controller/nginx_test.go b/pkg/nginx/controller/nginx_test.go similarity index 98% rename from controllers/nginx/pkg/cmd/controller/nginx_test.go rename to pkg/nginx/controller/nginx_test.go index 3fc1677d7..106683bf4 100644 --- a/controllers/nginx/pkg/cmd/controller/nginx_test.go +++ b/pkg/nginx/controller/nginx_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package controller import "testing" diff --git a/controllers/nginx/pkg/cmd/controller/tcp.go b/pkg/nginx/controller/tcp.go similarity index 99% rename from controllers/nginx/pkg/cmd/controller/tcp.go rename to pkg/nginx/controller/tcp.go index 7c7d6bcaa..596d693f4 100644 --- a/controllers/nginx/pkg/cmd/controller/tcp.go +++ b/pkg/nginx/controller/tcp.go @@ -1,4 +1,4 @@ -package main +package controller import ( "fmt" diff --git a/controllers/nginx/pkg/cmd/controller/utils.go b/pkg/nginx/controller/utils.go similarity index 99% rename from controllers/nginx/pkg/cmd/controller/utils.go rename to pkg/nginx/controller/utils.go index 9bf526134..07259883b 100644 --- a/controllers/nginx/pkg/cmd/controller/utils.go +++ b/pkg/nginx/controller/utils.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package controller import ( "fmt" diff --git a/controllers/nginx/pkg/cmd/controller/utils_test.go b/pkg/nginx/controller/utils_test.go similarity index 98% rename from controllers/nginx/pkg/cmd/controller/utils_test.go rename to pkg/nginx/controller/utils_test.go index c506525c2..f11f813c3 100644 --- a/controllers/nginx/pkg/cmd/controller/utils_test.go +++ b/pkg/nginx/controller/utils_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package controller import "testing" diff --git a/controllers/nginx/pkg/metric/collector/nginx.go b/pkg/nginx/metric/collector/nginx.go similarity index 99% rename from controllers/nginx/pkg/metric/collector/nginx.go rename to pkg/nginx/metric/collector/nginx.go index 7aeb5083a..4ed6db57f 100644 --- a/controllers/nginx/pkg/metric/collector/nginx.go +++ b/pkg/nginx/metric/collector/nginx.go @@ -18,7 +18,7 @@ package collector import ( "github.com/golang/glog" - + "github.com/prometheus/client_golang/prometheus" ) diff --git a/controllers/nginx/pkg/metric/collector/process.go b/pkg/nginx/metric/collector/process.go similarity index 99% rename from controllers/nginx/pkg/metric/collector/process.go rename to pkg/nginx/metric/collector/process.go index 16c898fc5..016798525 100644 --- a/controllers/nginx/pkg/metric/collector/process.go +++ b/pkg/nginx/metric/collector/process.go @@ -20,7 +20,7 @@ import ( "path/filepath" "github.com/golang/glog" - + common "github.com/ncabatoff/process-exporter" "github.com/ncabatoff/process-exporter/proc" "github.com/prometheus/client_golang/prometheus" diff --git a/controllers/nginx/pkg/metric/collector/scrape.go b/pkg/nginx/metric/collector/scrape.go similarity index 100% rename from controllers/nginx/pkg/metric/collector/scrape.go rename to pkg/nginx/metric/collector/scrape.go diff --git a/controllers/nginx/pkg/metric/collector/status.go b/pkg/nginx/metric/collector/status.go similarity index 100% rename from controllers/nginx/pkg/metric/collector/status.go rename to pkg/nginx/metric/collector/status.go diff --git a/controllers/nginx/pkg/metric/collector/status_test.go b/pkg/nginx/metric/collector/status_test.go similarity index 100% rename from controllers/nginx/pkg/metric/collector/status_test.go rename to pkg/nginx/metric/collector/status_test.go diff --git a/controllers/nginx/pkg/metric/collector/vts.go b/pkg/nginx/metric/collector/vts.go similarity index 100% rename from controllers/nginx/pkg/metric/collector/vts.go rename to pkg/nginx/metric/collector/vts.go diff --git a/controllers/nginx/pkg/template/configmap.go b/pkg/nginx/template/configmap.go similarity index 97% rename from controllers/nginx/pkg/template/configmap.go rename to pkg/nginx/template/configmap.go index f07ef46b6..b6ebb3e04 100644 --- a/controllers/nginx/pkg/template/configmap.go +++ b/pkg/nginx/template/configmap.go @@ -26,8 +26,8 @@ import ( "github.com/mitchellh/mapstructure" - "k8s.io/ingress/controllers/nginx/pkg/config" - ing_net "k8s.io/ingress/core/pkg/net" + ing_net "k8s.io/ingress-nginx/pkg/net" + "k8s.io/ingress-nginx/pkg/nginx/config" ) const ( diff --git a/controllers/nginx/pkg/template/configmap_test.go b/pkg/nginx/template/configmap_test.go similarity index 98% rename from controllers/nginx/pkg/template/configmap_test.go rename to pkg/nginx/template/configmap_test.go index 59bddbc56..fc176a433 100644 --- a/controllers/nginx/pkg/template/configmap_test.go +++ b/pkg/nginx/template/configmap_test.go @@ -21,7 +21,7 @@ import ( "github.com/kylelemons/godebug/pretty" - "k8s.io/ingress/controllers/nginx/pkg/config" + "k8s.io/ingress-nginx/pkg/nginx/config" ) func TestFilterErrors(t *testing.T) { diff --git a/controllers/nginx/pkg/template/template.go b/pkg/nginx/template/template.go similarity index 98% rename from controllers/nginx/pkg/template/template.go rename to pkg/nginx/template/template.go index cde9a2ac5..e498b9584 100644 --- a/controllers/nginx/pkg/template/template.go +++ b/pkg/nginx/template/template.go @@ -35,11 +35,11 @@ import ( extensions "k8s.io/api/extensions/v1beta1" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/ingress/controllers/nginx/pkg/config" - "k8s.io/ingress/core/pkg/ingress" - "k8s.io/ingress/core/pkg/ingress/annotations/ratelimit" - ing_net "k8s.io/ingress/core/pkg/net" - "k8s.io/ingress/core/pkg/watch" + "k8s.io/ingress-nginx/pkg/ingress" + "k8s.io/ingress-nginx/pkg/ingress/annotations/ratelimit" + ing_net "k8s.io/ingress-nginx/pkg/net" + "k8s.io/ingress-nginx/pkg/nginx/config" + "k8s.io/ingress-nginx/pkg/watch" ) const ( diff --git a/controllers/nginx/pkg/template/template_test.go b/pkg/nginx/template/template_test.go similarity index 96% rename from controllers/nginx/pkg/template/template_test.go rename to pkg/nginx/template/template_test.go index 1360eba4a..9e68c70a2 100644 --- a/controllers/nginx/pkg/template/template_test.go +++ b/pkg/nginx/template/template_test.go @@ -26,10 +26,10 @@ import ( "strings" "testing" - "k8s.io/ingress/controllers/nginx/pkg/config" - "k8s.io/ingress/core/pkg/ingress" - "k8s.io/ingress/core/pkg/ingress/annotations/authreq" - "k8s.io/ingress/core/pkg/ingress/annotations/rewrite" + "k8s.io/ingress-nginx/pkg/ingress" + "k8s.io/ingress-nginx/pkg/ingress/annotations/authreq" + "k8s.io/ingress-nginx/pkg/ingress/annotations/rewrite" + "k8s.io/ingress-nginx/pkg/nginx/config" ) var ( @@ -163,7 +163,7 @@ func TestBuildAuthResponseHeaders(t *testing.T) { func TestTemplateWithData(t *testing.T) { pwd, _ := os.Getwd() - f, err := os.Open(path.Join(pwd, "../../test/data/config.json")) + f, err := os.Open(path.Join(pwd, "../../../tests/data/config.json")) if err != nil { t.Errorf("unexpected error reading json file: %v", err) } @@ -179,7 +179,7 @@ func TestTemplateWithData(t *testing.T) { if dat.ListenPorts == nil { dat.ListenPorts = &config.ListenPorts{} } - tf, err := os.Open(path.Join(pwd, "../../rootfs/etc/nginx/template/nginx.tmpl")) + tf, err := os.Open(path.Join(pwd, "../../../rootfs/etc/nginx/template/nginx.tmpl")) if err != nil { t.Errorf("unexpected error reading json file: %v", err) } @@ -198,7 +198,7 @@ func TestTemplateWithData(t *testing.T) { func BenchmarkTemplateWithData(b *testing.B) { pwd, _ := os.Getwd() - f, err := os.Open(path.Join(pwd, "../../test/data/config.json")) + f, err := os.Open(path.Join(pwd, "../../../test/data/config.json")) if err != nil { b.Errorf("unexpected error reading json file: %v", err) } diff --git a/core/pkg/task/queue.go b/pkg/task/queue.go similarity index 100% rename from core/pkg/task/queue.go rename to pkg/task/queue.go diff --git a/core/pkg/task/queue_test.go b/pkg/task/queue_test.go similarity index 100% rename from core/pkg/task/queue_test.go rename to pkg/task/queue_test.go diff --git a/core/pkg/watch/file_watcher.go b/pkg/watch/file_watcher.go similarity index 100% rename from core/pkg/watch/file_watcher.go rename to pkg/watch/file_watcher.go diff --git a/core/pkg/watch/file_watcher_test.go b/pkg/watch/file_watcher_test.go similarity index 100% rename from core/pkg/watch/file_watcher_test.go rename to pkg/watch/file_watcher_test.go diff --git a/controllers/nginx/rootfs/Dockerfile b/rootfs/Dockerfile similarity index 100% rename from controllers/nginx/rootfs/Dockerfile rename to rootfs/Dockerfile diff --git a/controllers/nginx/rootfs/etc/nginx/nginx.conf b/rootfs/etc/nginx/nginx.conf similarity index 100% rename from controllers/nginx/rootfs/etc/nginx/nginx.conf rename to rootfs/etc/nginx/nginx.conf diff --git a/controllers/nginx/rootfs/etc/nginx/template/nginx.tmpl b/rootfs/etc/nginx/template/nginx.tmpl similarity index 100% rename from controllers/nginx/rootfs/etc/nginx/template/nginx.tmpl rename to rootfs/etc/nginx/template/nginx.tmpl diff --git a/controllers/nginx/rootfs/ingress-controller/clean-nginx-conf.sh b/rootfs/ingress-controller/clean-nginx-conf.sh similarity index 100% rename from controllers/nginx/rootfs/ingress-controller/clean-nginx-conf.sh rename to rootfs/ingress-controller/clean-nginx-conf.sh diff --git a/controllers/nginx/test/data/config.json b/tests/data/config.json similarity index 100% rename from controllers/nginx/test/data/config.json rename to tests/data/config.json diff --git a/vendor/cloud.google.com/go/AUTHORS b/vendor/cloud.google.com/go/AUTHORS deleted file mode 100644 index c364af1da..000000000 --- a/vendor/cloud.google.com/go/AUTHORS +++ /dev/null @@ -1,15 +0,0 @@ -# This is the official list of cloud authors for copyright purposes. -# This file is distinct from the CONTRIBUTORS files. -# See the latter for an explanation. - -# Names should be added to this file as: -# Name or Organization -# The email address is not required for organizations. - -Filippo Valsorda -Google Inc. -Ingo Oeser -Palm Stone Games, Inc. -Paweł Knap -Péter Szilágyi -Tyler Treat diff --git a/vendor/cloud.google.com/go/CONTRIBUTORS b/vendor/cloud.google.com/go/CONTRIBUTORS deleted file mode 100644 index 07509ccb7..000000000 --- a/vendor/cloud.google.com/go/CONTRIBUTORS +++ /dev/null @@ -1,34 +0,0 @@ -# People who have agreed to one of the CLAs and can contribute patches. -# The AUTHORS file lists the copyright holders; this file -# lists people. For example, Google employees are listed here -# but not in AUTHORS, because Google holds the copyright. -# -# https://developers.google.com/open-source/cla/individual -# https://developers.google.com/open-source/cla/corporate -# -# Names should be added to this file as: -# Name - -# Keep the list alphabetically sorted. - -Andreas Litt -Andrew Gerrand -Brad Fitzpatrick -Burcu Dogan -Dave Day -David Sansome -David Symonds -Filippo Valsorda -Glenn Lewis -Ingo Oeser -Johan Euphrosine -Jonathan Amsterdam -Luna Duclos -Michael McGreevy -Omar Jarjur -Paweł Knap -Péter Szilágyi -Sarah Adams -Toby Burress -Tuo Shan -Tyler Treat diff --git a/vendor/cloud.google.com/go/compute/metadata/metadata.go b/vendor/cloud.google.com/go/compute/metadata/metadata.go deleted file mode 100644 index 5c6f3bf38..000000000 --- a/vendor/cloud.google.com/go/compute/metadata/metadata.go +++ /dev/null @@ -1,438 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package metadata provides access to Google Compute Engine (GCE) -// metadata and API service accounts. -// -// This package is a wrapper around the GCE metadata service, -// as documented at https://developers.google.com/compute/docs/metadata. -package metadata - -import ( - "encoding/json" - "fmt" - "io/ioutil" - "net" - "net/http" - "net/url" - "os" - "runtime" - "strings" - "sync" - "time" - - "golang.org/x/net/context" - "golang.org/x/net/context/ctxhttp" - - "cloud.google.com/go/internal" -) - -const ( - // metadataIP is the documented metadata server IP address. - metadataIP = "169.254.169.254" - - // metadataHostEnv is the environment variable specifying the - // GCE metadata hostname. If empty, the default value of - // metadataIP ("169.254.169.254") is used instead. - // This is variable name is not defined by any spec, as far as - // I know; it was made up for the Go package. - metadataHostEnv = "GCE_METADATA_HOST" -) - -type cachedValue struct { - k string - trim bool - mu sync.Mutex - v string -} - -var ( - projID = &cachedValue{k: "project/project-id", trim: true} - projNum = &cachedValue{k: "project/numeric-project-id", trim: true} - instID = &cachedValue{k: "instance/id", trim: true} -) - -var ( - metaClient = &http.Client{ - Transport: &internal.Transport{ - Base: &http.Transport{ - Dial: (&net.Dialer{ - Timeout: 2 * time.Second, - KeepAlive: 30 * time.Second, - }).Dial, - ResponseHeaderTimeout: 2 * time.Second, - }, - }, - } - subscribeClient = &http.Client{ - Transport: &internal.Transport{ - Base: &http.Transport{ - Dial: (&net.Dialer{ - Timeout: 2 * time.Second, - KeepAlive: 30 * time.Second, - }).Dial, - }, - }, - } -) - -// NotDefinedError is returned when requested metadata is not defined. -// -// The underlying string is the suffix after "/computeMetadata/v1/". -// -// This error is not returned if the value is defined to be the empty -// string. -type NotDefinedError string - -func (suffix NotDefinedError) Error() string { - return fmt.Sprintf("metadata: GCE metadata %q not defined", string(suffix)) -} - -// Get returns a value from the metadata service. -// The suffix is appended to "http://${GCE_METADATA_HOST}/computeMetadata/v1/". -// -// If the GCE_METADATA_HOST environment variable is not defined, a default of -// 169.254.169.254 will be used instead. -// -// If the requested metadata is not defined, the returned error will -// be of type NotDefinedError. -func Get(suffix string) (string, error) { - val, _, err := getETag(metaClient, suffix) - return val, err -} - -// getETag returns a value from the metadata service as well as the associated -// ETag using the provided client. This func is otherwise equivalent to Get. -func getETag(client *http.Client, suffix string) (value, etag string, err error) { - // Using a fixed IP makes it very difficult to spoof the metadata service in - // a container, which is an important use-case for local testing of cloud - // deployments. To enable spoofing of the metadata service, the environment - // variable GCE_METADATA_HOST is first inspected to decide where metadata - // requests shall go. - host := os.Getenv(metadataHostEnv) - if host == "" { - // Using 169.254.169.254 instead of "metadata" here because Go - // binaries built with the "netgo" tag and without cgo won't - // know the search suffix for "metadata" is - // ".google.internal", and this IP address is documented as - // being stable anyway. - host = metadataIP - } - url := "http://" + host + "/computeMetadata/v1/" + suffix - req, _ := http.NewRequest("GET", url, nil) - req.Header.Set("Metadata-Flavor", "Google") - res, err := client.Do(req) - if err != nil { - return "", "", err - } - defer res.Body.Close() - if res.StatusCode == http.StatusNotFound { - return "", "", NotDefinedError(suffix) - } - if res.StatusCode != 200 { - return "", "", fmt.Errorf("status code %d trying to fetch %s", res.StatusCode, url) - } - all, err := ioutil.ReadAll(res.Body) - if err != nil { - return "", "", err - } - return string(all), res.Header.Get("Etag"), nil -} - -func getTrimmed(suffix string) (s string, err error) { - s, err = Get(suffix) - s = strings.TrimSpace(s) - return -} - -func (c *cachedValue) get() (v string, err error) { - defer c.mu.Unlock() - c.mu.Lock() - if c.v != "" { - return c.v, nil - } - if c.trim { - v, err = getTrimmed(c.k) - } else { - v, err = Get(c.k) - } - if err == nil { - c.v = v - } - return -} - -var ( - onGCEOnce sync.Once - onGCE bool -) - -// OnGCE reports whether this process is running on Google Compute Engine. -func OnGCE() bool { - onGCEOnce.Do(initOnGCE) - return onGCE -} - -func initOnGCE() { - onGCE = testOnGCE() -} - -func testOnGCE() bool { - // The user explicitly said they're on GCE, so trust them. - if os.Getenv(metadataHostEnv) != "" { - return true - } - - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - - resc := make(chan bool, 2) - - // Try two strategies in parallel. - // See https://github.com/GoogleCloudPlatform/google-cloud-go/issues/194 - go func() { - res, err := ctxhttp.Get(ctx, metaClient, "http://"+metadataIP) - if err != nil { - resc <- false - return - } - defer res.Body.Close() - resc <- res.Header.Get("Metadata-Flavor") == "Google" - }() - - go func() { - addrs, err := net.LookupHost("metadata.google.internal") - if err != nil || len(addrs) == 0 { - resc <- false - return - } - resc <- strsContains(addrs, metadataIP) - }() - - tryHarder := systemInfoSuggestsGCE() - if tryHarder { - res := <-resc - if res { - // The first strategy succeeded, so let's use it. - return true - } - // Wait for either the DNS or metadata server probe to - // contradict the other one and say we are running on - // GCE. Give it a lot of time to do so, since the system - // info already suggests we're running on a GCE BIOS. - timer := time.NewTimer(5 * time.Second) - defer timer.Stop() - select { - case res = <-resc: - return res - case <-timer.C: - // Too slow. Who knows what this system is. - return false - } - } - - // There's no hint from the system info that we're running on - // GCE, so use the first probe's result as truth, whether it's - // true or false. The goal here is to optimize for speed for - // users who are NOT running on GCE. We can't assume that - // either a DNS lookup or an HTTP request to a blackholed IP - // address is fast. Worst case this should return when the - // metaClient's Transport.ResponseHeaderTimeout or - // Transport.Dial.Timeout fires (in two seconds). - return <-resc -} - -// systemInfoSuggestsGCE reports whether the local system (without -// doing network requests) suggests that we're running on GCE. If this -// returns true, testOnGCE tries a bit harder to reach its metadata -// server. -func systemInfoSuggestsGCE() bool { - if runtime.GOOS != "linux" { - // We don't have any non-Linux clues available, at least yet. - return false - } - slurp, _ := ioutil.ReadFile("/sys/class/dmi/id/product_name") - name := strings.TrimSpace(string(slurp)) - return name == "Google" || name == "Google Compute Engine" -} - -// Subscribe subscribes to a value from the metadata service. -// The suffix is appended to "http://${GCE_METADATA_HOST}/computeMetadata/v1/". -// The suffix may contain query parameters. -// -// Subscribe calls fn with the latest metadata value indicated by the provided -// suffix. If the metadata value is deleted, fn is called with the empty string -// and ok false. Subscribe blocks until fn returns a non-nil error or the value -// is deleted. Subscribe returns the error value returned from the last call to -// fn, which may be nil when ok == false. -func Subscribe(suffix string, fn func(v string, ok bool) error) error { - const failedSubscribeSleep = time.Second * 5 - - // First check to see if the metadata value exists at all. - val, lastETag, err := getETag(subscribeClient, suffix) - if err != nil { - return err - } - - if err := fn(val, true); err != nil { - return err - } - - ok := true - if strings.ContainsRune(suffix, '?') { - suffix += "&wait_for_change=true&last_etag=" - } else { - suffix += "?wait_for_change=true&last_etag=" - } - for { - val, etag, err := getETag(subscribeClient, suffix+url.QueryEscape(lastETag)) - if err != nil { - if _, deleted := err.(NotDefinedError); !deleted { - time.Sleep(failedSubscribeSleep) - continue // Retry on other errors. - } - ok = false - } - lastETag = etag - - if err := fn(val, ok); err != nil || !ok { - return err - } - } -} - -// ProjectID returns the current instance's project ID string. -func ProjectID() (string, error) { return projID.get() } - -// NumericProjectID returns the current instance's numeric project ID. -func NumericProjectID() (string, error) { return projNum.get() } - -// InternalIP returns the instance's primary internal IP address. -func InternalIP() (string, error) { - return getTrimmed("instance/network-interfaces/0/ip") -} - -// ExternalIP returns the instance's primary external (public) IP address. -func ExternalIP() (string, error) { - return getTrimmed("instance/network-interfaces/0/access-configs/0/external-ip") -} - -// Hostname returns the instance's hostname. This will be of the form -// ".c..internal". -func Hostname() (string, error) { - return getTrimmed("instance/hostname") -} - -// InstanceTags returns the list of user-defined instance tags, -// assigned when initially creating a GCE instance. -func InstanceTags() ([]string, error) { - var s []string - j, err := Get("instance/tags") - if err != nil { - return nil, err - } - if err := json.NewDecoder(strings.NewReader(j)).Decode(&s); err != nil { - return nil, err - } - return s, nil -} - -// InstanceID returns the current VM's numeric instance ID. -func InstanceID() (string, error) { - return instID.get() -} - -// InstanceName returns the current VM's instance ID string. -func InstanceName() (string, error) { - host, err := Hostname() - if err != nil { - return "", err - } - return strings.Split(host, ".")[0], nil -} - -// Zone returns the current VM's zone, such as "us-central1-b". -func Zone() (string, error) { - zone, err := getTrimmed("instance/zone") - // zone is of the form "projects//zones/". - if err != nil { - return "", err - } - return zone[strings.LastIndex(zone, "/")+1:], nil -} - -// InstanceAttributes returns the list of user-defined attributes, -// assigned when initially creating a GCE VM instance. The value of an -// attribute can be obtained with InstanceAttributeValue. -func InstanceAttributes() ([]string, error) { return lines("instance/attributes/") } - -// ProjectAttributes returns the list of user-defined attributes -// applying to the project as a whole, not just this VM. The value of -// an attribute can be obtained with ProjectAttributeValue. -func ProjectAttributes() ([]string, error) { return lines("project/attributes/") } - -func lines(suffix string) ([]string, error) { - j, err := Get(suffix) - if err != nil { - return nil, err - } - s := strings.Split(strings.TrimSpace(j), "\n") - for i := range s { - s[i] = strings.TrimSpace(s[i]) - } - return s, nil -} - -// InstanceAttributeValue returns the value of the provided VM -// instance attribute. -// -// If the requested attribute is not defined, the returned error will -// be of type NotDefinedError. -// -// InstanceAttributeValue may return ("", nil) if the attribute was -// defined to be the empty string. -func InstanceAttributeValue(attr string) (string, error) { - return Get("instance/attributes/" + attr) -} - -// ProjectAttributeValue returns the value of the provided -// project attribute. -// -// If the requested attribute is not defined, the returned error will -// be of type NotDefinedError. -// -// ProjectAttributeValue may return ("", nil) if the attribute was -// defined to be the empty string. -func ProjectAttributeValue(attr string) (string, error) { - return Get("project/attributes/" + attr) -} - -// Scopes returns the service account scopes for the given account. -// The account may be empty or the string "default" to use the instance's -// main account. -func Scopes(serviceAccount string) ([]string, error) { - if serviceAccount == "" { - serviceAccount = "default" - } - return lines("instance/service-accounts/" + serviceAccount + "/scopes") -} - -func strsContains(ss []string, s string) bool { - for _, v := range ss { - if v == s { - return true - } - } - return false -} diff --git a/vendor/cloud.google.com/go/internal/cloud.go b/vendor/cloud.google.com/go/internal/cloud.go deleted file mode 100644 index 8e0c8f8e5..000000000 --- a/vendor/cloud.google.com/go/internal/cloud.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package internal provides support for the cloud packages. -// -// Users should not import this package directly. -package internal - -import ( - "fmt" - "net/http" -) - -const userAgent = "gcloud-golang/0.1" - -// Transport is an http.RoundTripper that appends Google Cloud client's -// user-agent to the original request's user-agent header. -type Transport struct { - // TODO(bradfitz): delete internal.Transport. It's too wrappy for what it does. - // Do User-Agent some other way. - - // Base is the actual http.RoundTripper - // requests will use. It must not be nil. - Base http.RoundTripper -} - -// RoundTrip appends a user-agent to the existing user-agent -// header and delegates the request to the base http.RoundTripper. -func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) { - req = cloneRequest(req) - ua := req.Header.Get("User-Agent") - if ua == "" { - ua = userAgent - } else { - ua = fmt.Sprintf("%s %s", ua, userAgent) - } - req.Header.Set("User-Agent", ua) - return t.Base.RoundTrip(req) -} - -// cloneRequest returns a clone of the provided *http.Request. -// The clone is a shallow copy of the struct and its Header map. -func cloneRequest(r *http.Request) *http.Request { - // shallow copy of the struct - r2 := new(http.Request) - *r2 = *r - // deep copy of the Header - r2.Header = make(http.Header) - for k, s := range r.Header { - r2.Header[k] = s - } - return r2 -} diff --git a/vendor/github.com/PuerkitoBio/purell/README.md b/vendor/github.com/PuerkitoBio/purell/README.md index a78a3df65..09e8a32cb 100644 --- a/vendor/github.com/PuerkitoBio/purell/README.md +++ b/vendor/github.com/PuerkitoBio/purell/README.md @@ -12,6 +12,7 @@ Based on the [wikipedia paper][wiki] and the [RFC 3986 document][rfc]. ## Changelog +* **2016-11-14 (v1.1.0)** : IDN: Conform to RFC 5895: Fold character width (thanks to @beeker1121). * **2016-07-27 (v1.0.0)** : Normalize IDN to ASCII (thanks to @zenovich). * **2015-02-08** : Add fix for relative paths issue ([PR #5][pr5]) and add fix for unnecessary encoding of reserved characters ([see issue #7][iss7]). * **v0.2.0** : Add benchmarks, Attempt IDN support. @@ -172,6 +173,7 @@ And with `FlagsUnsafeGreedy`: @opennota @pchristopher1275 @zenovich +@beeker1121 ## License diff --git a/vendor/github.com/PuerkitoBio/purell/bench_test.go b/vendor/github.com/PuerkitoBio/purell/bench_test.go new file mode 100644 index 000000000..7549731fc --- /dev/null +++ b/vendor/github.com/PuerkitoBio/purell/bench_test.go @@ -0,0 +1,57 @@ +package purell + +import ( + "testing" +) + +var ( + safeUrl = "HttPS://..iaMHost..Test:443/paTh^A%ef//./%41PaTH/..//?" + usuallySafeUrl = "HttPS://..iaMHost..Test:443/paTh^A%ef//./%41PaTH/../final/" + unsafeUrl = "HttPS://..www.iaMHost..Test:443/paTh^A%ef//./%41PaTH/../final/index.html?t=val1&a=val4&z=val5&a=val1#fragment" + allDWORDUrl = "HttPS://1113982867:/paTh^A%ef//./%41PaTH/../final/index.html?t=val1&a=val4&z=val5&a=val1#fragment" + allOctalUrl = "HttPS://0102.0146.07.0223:/paTh^A%ef//./%41PaTH/../final/index.html?t=val1&a=val4&z=val5&a=val1#fragment" + allHexUrl = "HttPS://0x42660793:/paTh^A%ef//./%41PaTH/../final/index.html?t=val1&a=val4&z=val5&a=val1#fragment" + allCombinedUrl = "HttPS://..0x42660793.:/paTh^A%ef//./%41PaTH/../final/index.html?t=val1&a=val4&z=val5&a=val1#fragment" +) + +func BenchmarkSafe(b *testing.B) { + for i := 0; i < b.N; i++ { + NormalizeURLString(safeUrl, FlagsSafe) + } +} + +func BenchmarkUsuallySafe(b *testing.B) { + for i := 0; i < b.N; i++ { + NormalizeURLString(usuallySafeUrl, FlagsUsuallySafeGreedy) + } +} + +func BenchmarkUnsafe(b *testing.B) { + for i := 0; i < b.N; i++ { + NormalizeURLString(unsafeUrl, FlagsUnsafeGreedy) + } +} + +func BenchmarkAllDWORD(b *testing.B) { + for i := 0; i < b.N; i++ { + NormalizeURLString(allDWORDUrl, FlagsAllGreedy) + } +} + +func BenchmarkAllOctal(b *testing.B) { + for i := 0; i < b.N; i++ { + NormalizeURLString(allOctalUrl, FlagsAllGreedy) + } +} + +func BenchmarkAllHex(b *testing.B) { + for i := 0; i < b.N; i++ { + NormalizeURLString(allHexUrl, FlagsAllGreedy) + } +} + +func BenchmarkAllCombined(b *testing.B) { + for i := 0; i < b.N; i++ { + NormalizeURLString(allCombinedUrl, FlagsAllGreedy) + } +} diff --git a/vendor/github.com/PuerkitoBio/purell/example_test.go b/vendor/github.com/PuerkitoBio/purell/example_test.go new file mode 100644 index 000000000..997b95369 --- /dev/null +++ b/vendor/github.com/PuerkitoBio/purell/example_test.go @@ -0,0 +1,35 @@ +package purell + +import ( + "fmt" + "net/url" +) + +func ExampleNormalizeURLString() { + if normalized, err := NormalizeURLString("hTTp://someWEBsite.com:80/Amazing%3f/url/", + FlagLowercaseScheme|FlagLowercaseHost|FlagUppercaseEscapes); err != nil { + panic(err) + } else { + fmt.Print(normalized) + } + // Output: http://somewebsite.com:80/Amazing%3F/url/ +} + +func ExampleMustNormalizeURLString() { + normalized := MustNormalizeURLString("hTTpS://someWEBsite.com:443/Amazing%fa/url/", + FlagsUnsafeGreedy) + fmt.Print(normalized) + + // Output: http://somewebsite.com/Amazing%FA/url +} + +func ExampleNormalizeURL() { + if u, err := url.Parse("Http://SomeUrl.com:8080/a/b/.././c///g?c=3&a=1&b=9&c=0#target"); err != nil { + panic(err) + } else { + normalized := NormalizeURL(u, FlagsUsuallySafeGreedy|FlagRemoveDuplicateSlashes|FlagRemoveFragment) + fmt.Print(normalized) + } + + // Output: http://someurl.com:8080/a/c/g?c=3&a=1&b=9&c=0 +} diff --git a/vendor/github.com/PuerkitoBio/purell/purell.go b/vendor/github.com/PuerkitoBio/purell/purell.go index b79da64b3..645e1b76f 100644 --- a/vendor/github.com/PuerkitoBio/purell/purell.go +++ b/vendor/github.com/PuerkitoBio/purell/purell.go @@ -15,8 +15,8 @@ import ( "github.com/PuerkitoBio/urlesc" "golang.org/x/net/idna" - "golang.org/x/text/secure/precis" "golang.org/x/text/unicode/norm" + "golang.org/x/text/width" ) // A set of normalization flags determines how a URL will @@ -150,22 +150,26 @@ func MustNormalizeURLString(u string, f NormalizationFlags) string { // NormalizeURLString returns the normalized string, or an error if it can't be parsed into an URL object. // It takes an URL string as input, as well as the normalization flags. func NormalizeURLString(u string, f NormalizationFlags) (string, error) { - if parsed, e := url.Parse(u); e != nil { - return "", e - } else { - options := make([]precis.Option, 1, 3) - options[0] = precis.IgnoreCase - if f&FlagLowercaseHost == FlagLowercaseHost { - options = append(options, precis.FoldCase()) - } - options = append(options, precis.Norm(norm.NFC)) - profile := precis.NewFreeform(options...) - if parsed.Host, e = idna.ToASCII(profile.NewTransformer().String(parsed.Host)); e != nil { - return "", e - } - return NormalizeURL(parsed, f), nil + parsed, err := url.Parse(u) + if err != nil { + return "", err } - panic("Unreachable code.") + + if f&FlagLowercaseHost == FlagLowercaseHost { + parsed.Host = strings.ToLower(parsed.Host) + } + + // The idna package doesn't fully conform to RFC 5895 + // (https://tools.ietf.org/html/rfc5895), so we do it here. + // Taken from Go 1.8 cycle source, courtesy of bradfitz. + // TODO: Remove when (if?) idna package conforms to RFC 5895. + parsed.Host = width.Fold.String(parsed.Host) + parsed.Host = norm.NFC.String(parsed.Host) + if parsed.Host, err = idna.ToASCII(parsed.Host); err != nil { + return "", err + } + + return NormalizeURL(parsed, f), nil } // NormalizeURL returns the normalized string. diff --git a/vendor/github.com/PuerkitoBio/purell/purell_test.go b/vendor/github.com/PuerkitoBio/purell/purell_test.go new file mode 100644 index 000000000..a3732e5a3 --- /dev/null +++ b/vendor/github.com/PuerkitoBio/purell/purell_test.go @@ -0,0 +1,768 @@ +package purell + +import ( + "fmt" + "net/url" + "testing" +) + +type testCase struct { + nm string + src string + flgs NormalizationFlags + res string + parsed bool +} + +var ( + cases = [...]*testCase{ + &testCase{ + "LowerScheme", + "HTTP://www.SRC.ca", + FlagLowercaseScheme, + "http://www.SRC.ca", + false, + }, + &testCase{ + "LowerScheme2", + "http://www.SRC.ca", + FlagLowercaseScheme, + "http://www.SRC.ca", + false, + }, + &testCase{ + "LowerHost", + "HTTP://www.SRC.ca/", + FlagLowercaseHost, + "http://www.src.ca/", // Since Go1.1, scheme is automatically lowercased + false, + }, + &testCase{ + "UpperEscapes", + `http://www.whatever.com/Some%aa%20Special%8Ecases/`, + FlagUppercaseEscapes, + "http://www.whatever.com/Some%AA%20Special%8Ecases/", + false, + }, + &testCase{ + "UnnecessaryEscapes", + `http://www.toto.com/%41%42%2E%44/%32%33%52%2D/%5f%7E`, + FlagDecodeUnnecessaryEscapes, + "http://www.toto.com/AB.D/23R-/_~", + false, + }, + &testCase{ + "RemoveDefaultPort", + "HTTP://www.SRC.ca:80/", + FlagRemoveDefaultPort, + "http://www.SRC.ca/", // Since Go1.1, scheme is automatically lowercased + false, + }, + &testCase{ + "RemoveDefaultPort2", + "HTTP://www.SRC.ca:80", + FlagRemoveDefaultPort, + "http://www.SRC.ca", // Since Go1.1, scheme is automatically lowercased + false, + }, + &testCase{ + "RemoveDefaultPort3", + "HTTP://www.SRC.ca:8080", + FlagRemoveDefaultPort, + "http://www.SRC.ca:8080", // Since Go1.1, scheme is automatically lowercased + false, + }, + &testCase{ + "Safe", + "HTTP://www.SRC.ca:80/to%1ato%8b%ee/OKnow%41%42%43%7e", + FlagsSafe, + "http://www.src.ca/to%1Ato%8B%EE/OKnowABC~", + false, + }, + &testCase{ + "BothLower", + "HTTP://www.SRC.ca:80/to%1ato%8b%ee/OKnow%41%42%43%7e", + FlagLowercaseHost | FlagLowercaseScheme, + "http://www.src.ca:80/to%1Ato%8B%EE/OKnowABC~", + false, + }, + &testCase{ + "RemoveTrailingSlash", + "HTTP://www.SRC.ca:80/", + FlagRemoveTrailingSlash, + "http://www.SRC.ca:80", // Since Go1.1, scheme is automatically lowercased + false, + }, + &testCase{ + "RemoveTrailingSlash2", + "HTTP://www.SRC.ca:80/toto/titi/", + FlagRemoveTrailingSlash, + "http://www.SRC.ca:80/toto/titi", // Since Go1.1, scheme is automatically lowercased + false, + }, + &testCase{ + "RemoveTrailingSlash3", + "HTTP://www.SRC.ca:80/toto/titi/fin/?a=1", + FlagRemoveTrailingSlash, + "http://www.SRC.ca:80/toto/titi/fin?a=1", // Since Go1.1, scheme is automatically lowercased + false, + }, + &testCase{ + "AddTrailingSlash", + "HTTP://www.SRC.ca:80", + FlagAddTrailingSlash, + "http://www.SRC.ca:80/", // Since Go1.1, scheme is automatically lowercased + false, + }, + &testCase{ + "AddTrailingSlash2", + "HTTP://www.SRC.ca:80/toto/titi.html", + FlagAddTrailingSlash, + "http://www.SRC.ca:80/toto/titi.html/", // Since Go1.1, scheme is automatically lowercased + false, + }, + &testCase{ + "AddTrailingSlash3", + "HTTP://www.SRC.ca:80/toto/titi/fin?a=1", + FlagAddTrailingSlash, + "http://www.SRC.ca:80/toto/titi/fin/?a=1", // Since Go1.1, scheme is automatically lowercased + false, + }, + &testCase{ + "RemoveDotSegments", + "HTTP://root/a/b/./../../c/", + FlagRemoveDotSegments, + "http://root/c/", // Since Go1.1, scheme is automatically lowercased + false, + }, + &testCase{ + "RemoveDotSegments2", + "HTTP://root/../a/b/./../c/../d", + FlagRemoveDotSegments, + "http://root/a/d", // Since Go1.1, scheme is automatically lowercased + false, + }, + &testCase{ + "UsuallySafe", + "HTTP://www.SRC.ca:80/to%1ato%8b%ee/./c/d/../OKnow%41%42%43%7e/?a=b#test", + FlagsUsuallySafeGreedy, + "http://www.src.ca/to%1Ato%8B%EE/c/OKnowABC~?a=b#test", + false, + }, + &testCase{ + "RemoveDirectoryIndex", + "HTTP://root/a/b/c/default.aspx", + FlagRemoveDirectoryIndex, + "http://root/a/b/c/", // Since Go1.1, scheme is automatically lowercased + false, + }, + &testCase{ + "RemoveDirectoryIndex2", + "HTTP://root/a/b/c/default#a=b", + FlagRemoveDirectoryIndex, + "http://root/a/b/c/default#a=b", // Since Go1.1, scheme is automatically lowercased + false, + }, + &testCase{ + "RemoveFragment", + "HTTP://root/a/b/c/default#toto=tata", + FlagRemoveFragment, + "http://root/a/b/c/default", // Since Go1.1, scheme is automatically lowercased + false, + }, + &testCase{ + "ForceHTTP", + "https://root/a/b/c/default#toto=tata", + FlagForceHTTP, + "http://root/a/b/c/default#toto=tata", + false, + }, + &testCase{ + "RemoveDuplicateSlashes", + "https://root/a//b///c////default#toto=tata", + FlagRemoveDuplicateSlashes, + "https://root/a/b/c/default#toto=tata", + false, + }, + &testCase{ + "RemoveDuplicateSlashes2", + "https://root//a//b///c////default#toto=tata", + FlagRemoveDuplicateSlashes, + "https://root/a/b/c/default#toto=tata", + false, + }, + &testCase{ + "RemoveWWW", + "https://www.root/a/b/c/", + FlagRemoveWWW, + "https://root/a/b/c/", + false, + }, + &testCase{ + "RemoveWWW2", + "https://WwW.Root/a/b/c/", + FlagRemoveWWW, + "https://Root/a/b/c/", + false, + }, + &testCase{ + "AddWWW", + "https://Root/a/b/c/", + FlagAddWWW, + "https://www.Root/a/b/c/", + false, + }, + &testCase{ + "SortQuery", + "http://root/toto/?b=4&a=1&c=3&b=2&a=5", + FlagSortQuery, + "http://root/toto/?a=1&a=5&b=2&b=4&c=3", + false, + }, + &testCase{ + "RemoveEmptyQuerySeparator", + "http://root/toto/?", + FlagRemoveEmptyQuerySeparator, + "http://root/toto/", + false, + }, + &testCase{ + "Unsafe", + "HTTPS://www.RooT.com/toto/t%45%1f///a/./b/../c/?z=3&w=2&a=4&w=1#invalid", + FlagsUnsafeGreedy, + "http://root.com/toto/tE%1F/a/c?a=4&w=1&w=2&z=3", + false, + }, + &testCase{ + "Safe2", + "HTTPS://www.RooT.com/toto/t%45%1f///a/./b/../c/?z=3&w=2&a=4&w=1#invalid", + FlagsSafe, + "https://www.root.com/toto/tE%1F///a/./b/../c/?z=3&w=2&a=4&w=1#invalid", + false, + }, + &testCase{ + "UsuallySafe2", + "HTTPS://www.RooT.com/toto/t%45%1f///a/./b/../c/?z=3&w=2&a=4&w=1#invalid", + FlagsUsuallySafeGreedy, + "https://www.root.com/toto/tE%1F///a/c?z=3&w=2&a=4&w=1#invalid", + false, + }, + &testCase{ + "AddTrailingSlashBug", + "http://src.ca/", + FlagsAllNonGreedy, + "http://www.src.ca/", + false, + }, + &testCase{ + "SourceModified", + "HTTPS://www.RooT.com/toto/t%45%1f///a/./b/../c/?z=3&w=2&a=4&w=1#invalid", + FlagsUnsafeGreedy, + "http://root.com/toto/tE%1F/a/c?a=4&w=1&w=2&z=3", + true, + }, + &testCase{ + "IPv6-1", + "http://[2001:db8:1f70::999:de8:7648:6e8]/test", + FlagsSafe | FlagRemoveDotSegments, + "http://[2001:db8:1f70::999:de8:7648:6e8]/test", + false, + }, + &testCase{ + "IPv6-2", + "http://[::ffff:192.168.1.1]/test", + FlagsSafe | FlagRemoveDotSegments, + "http://[::ffff:192.168.1.1]/test", + false, + }, + &testCase{ + "IPv6-3", + "http://[::ffff:192.168.1.1]:80/test", + FlagsSafe | FlagRemoveDotSegments, + "http://[::ffff:192.168.1.1]/test", + false, + }, + &testCase{ + "IPv6-4", + "htTps://[::fFff:192.168.1.1]:443/test", + FlagsSafe | FlagRemoveDotSegments, + "https://[::ffff:192.168.1.1]/test", + false, + }, + &testCase{ + "FTP", + "ftp://user:pass@ftp.foo.net/foo/bar", + FlagsSafe | FlagRemoveDotSegments, + "ftp://user:pass@ftp.foo.net/foo/bar", + false, + }, + &testCase{ + "Standard-1", + "http://www.foo.com:80/foo", + FlagsSafe | FlagRemoveDotSegments, + "http://www.foo.com/foo", + false, + }, + &testCase{ + "Standard-2", + "http://www.foo.com:8000/foo", + FlagsSafe | FlagRemoveDotSegments, + "http://www.foo.com:8000/foo", + false, + }, + &testCase{ + "Standard-3", + "http://www.foo.com/%7ebar", + FlagsSafe | FlagRemoveDotSegments, + "http://www.foo.com/~bar", + false, + }, + &testCase{ + "Standard-4", + "http://www.foo.com/%7Ebar", + FlagsSafe | FlagRemoveDotSegments, + "http://www.foo.com/~bar", + false, + }, + &testCase{ + "Standard-5", + "http://USER:pass@www.Example.COM/foo/bar", + FlagsSafe | FlagRemoveDotSegments, + "http://USER:pass@www.example.com/foo/bar", + false, + }, + &testCase{ + "Standard-6", + "http://test.example/?a=%26&b=1", + FlagsSafe | FlagRemoveDotSegments, + "http://test.example/?a=%26&b=1", + false, + }, + &testCase{ + "Standard-7", + "http://test.example/%25/?p=%20val%20%25", + FlagsSafe | FlagRemoveDotSegments, + "http://test.example/%25/?p=%20val%20%25", + false, + }, + &testCase{ + "Standard-8", + "http://test.example/path/with a%20space+/", + FlagsSafe | FlagRemoveDotSegments, + "http://test.example/path/with%20a%20space+/", + false, + }, + &testCase{ + "Standard-9", + "http://test.example/?", + FlagsSafe | FlagRemoveDotSegments, + "http://test.example/", + false, + }, + &testCase{ + "Standard-10", + "http://a.COM/path/?b&a", + FlagsSafe | FlagRemoveDotSegments, + "http://a.com/path/?b&a", + false, + }, + &testCase{ + "StandardCasesAddTrailingSlash", + "http://test.example?", + FlagsSafe | FlagAddTrailingSlash, + "http://test.example/", + false, + }, + &testCase{ + "OctalIP-1", + "http://0123.011.0.4/", + FlagsSafe | FlagDecodeOctalHost, + "http://0123.011.0.4/", + false, + }, + &testCase{ + "OctalIP-2", + "http://0102.0146.07.0223/", + FlagsSafe | FlagDecodeOctalHost, + "http://66.102.7.147/", + false, + }, + &testCase{ + "OctalIP-3", + "http://0102.0146.07.0223.:23/", + FlagsSafe | FlagDecodeOctalHost, + "http://66.102.7.147.:23/", + false, + }, + &testCase{ + "OctalIP-4", + "http://USER:pass@0102.0146.07.0223../", + FlagsSafe | FlagDecodeOctalHost, + "http://USER:pass@66.102.7.147../", + false, + }, + &testCase{ + "DWORDIP-1", + "http://123.1113982867/", + FlagsSafe | FlagDecodeDWORDHost, + "http://123.1113982867/", + false, + }, + &testCase{ + "DWORDIP-2", + "http://1113982867/", + FlagsSafe | FlagDecodeDWORDHost, + "http://66.102.7.147/", + false, + }, + &testCase{ + "DWORDIP-3", + "http://1113982867.:23/", + FlagsSafe | FlagDecodeDWORDHost, + "http://66.102.7.147.:23/", + false, + }, + &testCase{ + "DWORDIP-4", + "http://USER:pass@1113982867../", + FlagsSafe | FlagDecodeDWORDHost, + "http://USER:pass@66.102.7.147../", + false, + }, + &testCase{ + "HexIP-1", + "http://0x123.1113982867/", + FlagsSafe | FlagDecodeHexHost, + "http://0x123.1113982867/", + false, + }, + &testCase{ + "HexIP-2", + "http://0x42660793/", + FlagsSafe | FlagDecodeHexHost, + "http://66.102.7.147/", + false, + }, + &testCase{ + "HexIP-3", + "http://0x42660793.:23/", + FlagsSafe | FlagDecodeHexHost, + "http://66.102.7.147.:23/", + false, + }, + &testCase{ + "HexIP-4", + "http://USER:pass@0x42660793../", + FlagsSafe | FlagDecodeHexHost, + "http://USER:pass@66.102.7.147../", + false, + }, + &testCase{ + "UnnecessaryHostDots-1", + "http://.www.foo.com../foo/bar.html", + FlagsSafe | FlagRemoveUnnecessaryHostDots, + "http://www.foo.com/foo/bar.html", + false, + }, + &testCase{ + "UnnecessaryHostDots-2", + "http://www.foo.com./foo/bar.html", + FlagsSafe | FlagRemoveUnnecessaryHostDots, + "http://www.foo.com/foo/bar.html", + false, + }, + &testCase{ + "UnnecessaryHostDots-3", + "http://www.foo.com.:81/foo", + FlagsSafe | FlagRemoveUnnecessaryHostDots, + "http://www.foo.com:81/foo", + false, + }, + &testCase{ + "UnnecessaryHostDots-4", + "http://www.example.com./", + FlagsSafe | FlagRemoveUnnecessaryHostDots, + "http://www.example.com/", + false, + }, + &testCase{ + "EmptyPort-1", + "http://www.thedraymin.co.uk:/main/?p=308", + FlagsSafe | FlagRemoveEmptyPortSeparator, + "http://www.thedraymin.co.uk/main/?p=308", + false, + }, + &testCase{ + "EmptyPort-2", + "http://www.src.ca:", + FlagsSafe | FlagRemoveEmptyPortSeparator, + "http://www.src.ca", + false, + }, + &testCase{ + "Slashes-1", + "http://test.example/foo/bar/.", + FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes, + "http://test.example/foo/bar/", + false, + }, + &testCase{ + "Slashes-2", + "http://test.example/foo/bar/./", + FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes, + "http://test.example/foo/bar/", + false, + }, + &testCase{ + "Slashes-3", + "http://test.example/foo/bar/..", + FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes, + "http://test.example/foo/", + false, + }, + &testCase{ + "Slashes-4", + "http://test.example/foo/bar/../", + FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes, + "http://test.example/foo/", + false, + }, + &testCase{ + "Slashes-5", + "http://test.example/foo/bar/../baz", + FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes, + "http://test.example/foo/baz", + false, + }, + &testCase{ + "Slashes-6", + "http://test.example/foo/bar/../..", + FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes, + "http://test.example/", + false, + }, + &testCase{ + "Slashes-7", + "http://test.example/foo/bar/../../", + FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes, + "http://test.example/", + false, + }, + &testCase{ + "Slashes-8", + "http://test.example/foo/bar/../../baz", + FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes, + "http://test.example/baz", + false, + }, + &testCase{ + "Slashes-9", + "http://test.example/foo/bar/../../../baz", + FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes, + "http://test.example/baz", + false, + }, + &testCase{ + "Slashes-10", + "http://test.example/foo/bar/../../../../baz", + FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes, + "http://test.example/baz", + false, + }, + &testCase{ + "Slashes-11", + "http://test.example/./foo", + FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes, + "http://test.example/foo", + false, + }, + &testCase{ + "Slashes-12", + "http://test.example/../foo", + FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes, + "http://test.example/foo", + false, + }, + &testCase{ + "Slashes-13", + "http://test.example/foo.", + FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes, + "http://test.example/foo.", + false, + }, + &testCase{ + "Slashes-14", + "http://test.example/.foo", + FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes, + "http://test.example/.foo", + false, + }, + &testCase{ + "Slashes-15", + "http://test.example/foo..", + FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes, + "http://test.example/foo..", + false, + }, + &testCase{ + "Slashes-16", + "http://test.example/..foo", + FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes, + "http://test.example/..foo", + false, + }, + &testCase{ + "Slashes-17", + "http://test.example/./../foo", + FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes, + "http://test.example/foo", + false, + }, + &testCase{ + "Slashes-18", + "http://test.example/./foo/.", + FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes, + "http://test.example/foo/", + false, + }, + &testCase{ + "Slashes-19", + "http://test.example/foo/./bar", + FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes, + "http://test.example/foo/bar", + false, + }, + &testCase{ + "Slashes-20", + "http://test.example/foo/../bar", + FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes, + "http://test.example/bar", + false, + }, + &testCase{ + "Slashes-21", + "http://test.example/foo//", + FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes, + "http://test.example/foo/", + false, + }, + &testCase{ + "Slashes-22", + "http://test.example/foo///bar//", + FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes, + "http://test.example/foo/bar/", + false, + }, + &testCase{ + "Relative", + "foo/bar", + FlagsAllGreedy, + "foo/bar", + false, + }, + &testCase{ + "Relative-1", + "./../foo", + FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes, + "foo", + false, + }, + &testCase{ + "Relative-2", + "./foo/bar/../baz/../bang/..", + FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes, + "foo/", + false, + }, + &testCase{ + "Relative-3", + "foo///bar//", + FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes, + "foo/bar/", + false, + }, + &testCase{ + "Relative-4", + "www.youtube.com", + FlagsUsuallySafeGreedy, + "www.youtube.com", + false, + }, + /*&testCase{ + "UrlNorm-5", + "http://ja.wikipedia.org/wiki/%E3%82%AD%E3%83%A3%E3%82%BF%E3%83%94%E3%83%A9%E3%83%BC%E3%82%B8%E3%83%A3%E3%83%91%E3%83%B3", + FlagsSafe | FlagRemoveDotSegments, + "http://ja.wikipedia.org/wiki/\xe3\x82\xad\xe3\x83\xa3\xe3\x82\xbf\xe3\x83\x94\xe3\x83\xa9\xe3\x83\xbc\xe3\x82\xb8\xe3\x83\xa3\xe3\x83\x91\xe3\x83\xb3", + false, + }, + &testCase{ + "UrlNorm-1", + "http://test.example/?a=%e3%82%82%26", + FlagsAllGreedy, + "http://test.example/?a=\xe3\x82\x82%26", + false, + },*/ + } +) + +func TestRunner(t *testing.T) { + for _, tc := range cases { + runCase(tc, t) + } +} + +func runCase(tc *testCase, t *testing.T) { + t.Logf("running %s...", tc.nm) + if tc.parsed { + u, e := url.Parse(tc.src) + if e != nil { + t.Errorf("%s - FAIL : %s", tc.nm, e) + return + } else { + NormalizeURL(u, tc.flgs) + if s := u.String(); s != tc.res { + t.Errorf("%s - FAIL expected '%s', got '%s'", tc.nm, tc.res, s) + } + } + } else { + if s, e := NormalizeURLString(tc.src, tc.flgs); e != nil { + t.Errorf("%s - FAIL : %s", tc.nm, e) + } else if s != tc.res { + t.Errorf("%s - FAIL expected '%s', got '%s'", tc.nm, tc.res, s) + } + } +} + +func TestDecodeUnnecessaryEscapesAll(t *testing.T) { + var url = "http://host/" + + for i := 0; i < 256; i++ { + url += fmt.Sprintf("%%%02x", i) + } + if s, e := NormalizeURLString(url, FlagDecodeUnnecessaryEscapes); e != nil { + t.Fatalf("Got error %s", e.Error()) + } else { + const want = "http://host/%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%20!%22%23$%25&'()*+,-./0123456789:;%3C=%3E%3F@ABCDEFGHIJKLMNOPQRSTUVWXYZ[%5C]%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D~%7F%80%81%82%83%84%85%86%87%88%89%8A%8B%8C%8D%8E%8F%90%91%92%93%94%95%96%97%98%99%9A%9B%9C%9D%9E%9F%A0%A1%A2%A3%A4%A5%A6%A7%A8%A9%AA%AB%AC%AD%AE%AF%B0%B1%B2%B3%B4%B5%B6%B7%B8%B9%BA%BB%BC%BD%BE%BF%C0%C1%C2%C3%C4%C5%C6%C7%C8%C9%CA%CB%CC%CD%CE%CF%D0%D1%D2%D3%D4%D5%D6%D7%D8%D9%DA%DB%DC%DD%DE%DF%E0%E1%E2%E3%E4%E5%E6%E7%E8%E9%EA%EB%EC%ED%EE%EF%F0%F1%F2%F3%F4%F5%F6%F7%F8%F9%FA%FB%FC%FD%FE%FF" + if s != want { + t.Errorf("DecodeUnnecessaryEscapesAll:\nwant\n%s\ngot\n%s", want, s) + } + } +} + +func TestEncodeNecessaryEscapesAll(t *testing.T) { + var url = "http://host/" + + for i := 0; i < 256; i++ { + if i != 0x25 { + url += string(i) + } + } + if s, e := NormalizeURLString(url, FlagEncodeNecessaryEscapes); e != nil { + t.Fatalf("Got error %s", e.Error()) + } else { + const want = "http://host/%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%20!%22#$&'()*+,-./0123456789:;%3C=%3E?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[%5C]%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D~%7F%C2%80%C2%81%C2%82%C2%83%C2%84%C2%85%C2%86%C2%87%C2%88%C2%89%C2%8A%C2%8B%C2%8C%C2%8D%C2%8E%C2%8F%C2%90%C2%91%C2%92%C2%93%C2%94%C2%95%C2%96%C2%97%C2%98%C2%99%C2%9A%C2%9B%C2%9C%C2%9D%C2%9E%C2%9F%C2%A0%C2%A1%C2%A2%C2%A3%C2%A4%C2%A5%C2%A6%C2%A7%C2%A8%C2%A9%C2%AA%C2%AB%C2%AC%C2%AD%C2%AE%C2%AF%C2%B0%C2%B1%C2%B2%C2%B3%C2%B4%C2%B5%C2%B6%C2%B7%C2%B8%C2%B9%C2%BA%C2%BB%C2%BC%C2%BD%C2%BE%C2%BF%C3%80%C3%81%C3%82%C3%83%C3%84%C3%85%C3%86%C3%87%C3%88%C3%89%C3%8A%C3%8B%C3%8C%C3%8D%C3%8E%C3%8F%C3%90%C3%91%C3%92%C3%93%C3%94%C3%95%C3%96%C3%97%C3%98%C3%99%C3%9A%C3%9B%C3%9C%C3%9D%C3%9E%C3%9F%C3%A0%C3%A1%C3%A2%C3%A3%C3%A4%C3%A5%C3%A6%C3%A7%C3%A8%C3%A9%C3%AA%C3%AB%C3%AC%C3%AD%C3%AE%C3%AF%C3%B0%C3%B1%C3%B2%C3%B3%C3%B4%C3%B5%C3%B6%C3%B7%C3%B8%C3%B9%C3%BA%C3%BB%C3%BC%C3%BD%C3%BE%C3%BF" + if s != want { + t.Errorf("EncodeNecessaryEscapesAll:\nwant\n%s\ngot\n%s", want, s) + } + } +} diff --git a/vendor/github.com/PuerkitoBio/purell/urlnorm_test.go b/vendor/github.com/PuerkitoBio/purell/urlnorm_test.go new file mode 100644 index 000000000..d1b2ca6c0 --- /dev/null +++ b/vendor/github.com/PuerkitoBio/purell/urlnorm_test.go @@ -0,0 +1,53 @@ +package purell + +import ( + "testing" +) + +// Test cases merged from PR #1 +// Originally from https://github.com/jehiah/urlnorm/blob/master/test_urlnorm.py + +func assertMap(t *testing.T, cases map[string]string, f NormalizationFlags) { + for bad, good := range cases { + s, e := NormalizeURLString(bad, f) + if e != nil { + t.Errorf("%s normalizing %v to %v", e.Error(), bad, good) + } else { + if s != good { + t.Errorf("source: %v expected: %v got: %v", bad, good, s) + } + } + } +} + +// This tests normalization to a unicode representation +// precent escapes for unreserved values are unescaped to their unicode value +// tests normalization to idna domains +// test ip word handling, ipv6 address handling, and trailing domain periods +// in general, this matches google chromes unescaping for things in the address bar. +// spaces are converted to '+' (perhaphs controversial) +// http://code.google.com/p/google-url/ probably is another good reference for this approach +func TestUrlnorm(t *testing.T) { + testcases := map[string]string{ + "http://test.example/?a=%e3%82%82%26": "http://test.example/?a=%e3%82%82%26", + //"http://test.example/?a=%e3%82%82%26": "http://test.example/?a=\xe3\x82\x82%26", //should return a unicode character + "http://s.xn--q-bga.DE/": "http://s.xn--q-bga.de/", //should be in idna format + "http://XBLA\u306eXbox.com": "http://xn--xblaxbox-jf4g.com", //test utf8 and unicode + "http://президент.рф": "http://xn--d1abbgf6aiiy.xn--p1ai", + "http://ПРЕЗИДЕНТ.РФ": "http://xn--d1abbgf6aiiy.xn--p1ai", + "http://ab¥ヲ₩○.com": "http://xn--ab-ida8983azmfnvs.com", //test width folding + "http://\u00e9.com": "http://xn--9ca.com", + "http://e\u0301.com": "http://xn--9ca.com", + "http://ja.wikipedia.org/wiki/%E3%82%AD%E3%83%A3%E3%82%BF%E3%83%94%E3%83%A9%E3%83%BC%E3%82%B8%E3%83%A3%E3%83%91%E3%83%B3": "http://ja.wikipedia.org/wiki/%E3%82%AD%E3%83%A3%E3%82%BF%E3%83%94%E3%83%A9%E3%83%BC%E3%82%B8%E3%83%A3%E3%83%91%E3%83%B3", + //"http://ja.wikipedia.org/wiki/%E3%82%AD%E3%83%A3%E3%82%BF%E3%83%94%E3%83%A9%E3%83%BC%E3%82%B8%E3%83%A3%E3%83%91%E3%83%B3": "http://ja.wikipedia.org/wiki/\xe3\x82\xad\xe3\x83\xa3\xe3\x82\xbf\xe3\x83\x94\xe3\x83\xa9\xe3\x83\xbc\xe3\x82\xb8\xe3\x83\xa3\xe3\x83\x91\xe3\x83\xb3", + + "http://test.example/\xe3\x82\xad": "http://test.example/%E3%82%AD", + //"http://test.example/\xe3\x82\xad": "http://test.example/\xe3\x82\xad", + "http://test.example/?p=%23val#test-%23-val%25": "http://test.example/?p=%23val#test-%23-val%25", //check that %23 (#) is not escaped where it shouldn't be + + "http://test.domain/I%C3%B1t%C3%ABrn%C3%A2ti%C3%B4n%EF%BF%BDliz%C3%A6ti%C3%B8n": "http://test.domain/I%C3%B1t%C3%ABrn%C3%A2ti%C3%B4n%EF%BF%BDliz%C3%A6ti%C3%B8n", + //"http://test.domain/I%C3%B1t%C3%ABrn%C3%A2ti%C3%B4n%EF%BF%BDliz%C3%A6ti%C3%B8n": "http://test.domain/I\xc3\xb1t\xc3\xabrn\xc3\xa2ti\xc3\xb4n\xef\xbf\xbdliz\xc3\xa6ti\xc3\xb8n", + } + + assertMap(t, testcases, FlagsSafe|FlagRemoveDotSegments) +} diff --git a/vendor/github.com/PuerkitoBio/urlesc/.travis.yml b/vendor/github.com/PuerkitoBio/urlesc/.travis.yml index 478630e50..ba6b225f9 100644 --- a/vendor/github.com/PuerkitoBio/urlesc/.travis.yml +++ b/vendor/github.com/PuerkitoBio/urlesc/.travis.yml @@ -1,7 +1,11 @@ language: go go: - - 1.4 + - 1.4.x + - 1.5.x + - 1.6.x + - 1.7.x + - 1.8.x - tip install: diff --git a/vendor/github.com/PuerkitoBio/urlesc/README.md b/vendor/github.com/PuerkitoBio/urlesc/README.md index bebe305e0..57aff0a53 100644 --- a/vendor/github.com/PuerkitoBio/urlesc/README.md +++ b/vendor/github.com/PuerkitoBio/urlesc/README.md @@ -1,4 +1,4 @@ -urlesc [![Build Status](https://travis-ci.org/PuerkitoBio/urlesc.png?branch=master)](https://travis-ci.org/PuerkitoBio/urlesc) [![GoDoc](http://godoc.org/github.com/PuerkitoBio/urlesc?status.svg)](http://godoc.org/github.com/PuerkitoBio/urlesc) +urlesc [![Build Status](https://travis-ci.org/PuerkitoBio/urlesc.svg?branch=master)](https://travis-ci.org/PuerkitoBio/urlesc) [![GoDoc](http://godoc.org/github.com/PuerkitoBio/urlesc?status.svg)](http://godoc.org/github.com/PuerkitoBio/urlesc) ====== Package urlesc implements query escaping as per RFC 3986. diff --git a/vendor/github.com/PuerkitoBio/urlesc/urlesc_test.go b/vendor/github.com/PuerkitoBio/urlesc/urlesc_test.go new file mode 100644 index 000000000..45202e1dd --- /dev/null +++ b/vendor/github.com/PuerkitoBio/urlesc/urlesc_test.go @@ -0,0 +1,641 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package urlesc + +import ( + "net/url" + "testing" +) + +type URLTest struct { + in string + out *url.URL + roundtrip string // expected result of reserializing the URL; empty means same as "in". +} + +var urltests = []URLTest{ + // no path + { + "http://www.google.com", + &url.URL{ + Scheme: "http", + Host: "www.google.com", + }, + "", + }, + // path + { + "http://www.google.com/", + &url.URL{ + Scheme: "http", + Host: "www.google.com", + Path: "/", + }, + "", + }, + // path with hex escaping + { + "http://www.google.com/file%20one%26two", + &url.URL{ + Scheme: "http", + Host: "www.google.com", + Path: "/file one&two", + }, + "http://www.google.com/file%20one&two", + }, + // user + { + "ftp://webmaster@www.google.com/", + &url.URL{ + Scheme: "ftp", + User: url.User("webmaster"), + Host: "www.google.com", + Path: "/", + }, + "", + }, + // escape sequence in username + { + "ftp://john%20doe@www.google.com/", + &url.URL{ + Scheme: "ftp", + User: url.User("john doe"), + Host: "www.google.com", + Path: "/", + }, + "ftp://john%20doe@www.google.com/", + }, + // query + { + "http://www.google.com/?q=go+language", + &url.URL{ + Scheme: "http", + Host: "www.google.com", + Path: "/", + RawQuery: "q=go+language", + }, + "", + }, + // query with hex escaping: NOT parsed + { + "http://www.google.com/?q=go%20language", + &url.URL{ + Scheme: "http", + Host: "www.google.com", + Path: "/", + RawQuery: "q=go%20language", + }, + "", + }, + // %20 outside query + { + "http://www.google.com/a%20b?q=c+d", + &url.URL{ + Scheme: "http", + Host: "www.google.com", + Path: "/a b", + RawQuery: "q=c+d", + }, + "", + }, + // path without leading /, so no parsing + { + "http:www.google.com/?q=go+language", + &url.URL{ + Scheme: "http", + Opaque: "www.google.com/", + RawQuery: "q=go+language", + }, + "http:www.google.com/?q=go+language", + }, + // path without leading /, so no parsing + { + "http:%2f%2fwww.google.com/?q=go+language", + &url.URL{ + Scheme: "http", + Opaque: "%2f%2fwww.google.com/", + RawQuery: "q=go+language", + }, + "http:%2f%2fwww.google.com/?q=go+language", + }, + // non-authority with path + { + "mailto:/webmaster@golang.org", + &url.URL{ + Scheme: "mailto", + Path: "/webmaster@golang.org", + }, + "mailto:///webmaster@golang.org", // unfortunate compromise + }, + // non-authority + { + "mailto:webmaster@golang.org", + &url.URL{ + Scheme: "mailto", + Opaque: "webmaster@golang.org", + }, + "", + }, + // unescaped :// in query should not create a scheme + { + "/foo?query=http://bad", + &url.URL{ + Path: "/foo", + RawQuery: "query=http://bad", + }, + "", + }, + // leading // without scheme should create an authority + { + "//foo", + &url.URL{ + Host: "foo", + }, + "", + }, + // leading // without scheme, with userinfo, path, and query + { + "//user@foo/path?a=b", + &url.URL{ + User: url.User("user"), + Host: "foo", + Path: "/path", + RawQuery: "a=b", + }, + "", + }, + // Three leading slashes isn't an authority, but doesn't return an error. + // (We can't return an error, as this code is also used via + // ServeHTTP -> ReadRequest -> Parse, which is arguably a + // different URL parsing context, but currently shares the + // same codepath) + { + "///threeslashes", + &url.URL{ + Path: "///threeslashes", + }, + "", + }, + { + "http://user:password@google.com", + &url.URL{ + Scheme: "http", + User: url.UserPassword("user", "password"), + Host: "google.com", + }, + "http://user:password@google.com", + }, + // unescaped @ in username should not confuse host + { + "http://j@ne:password@google.com", + &url.URL{ + Scheme: "http", + User: url.UserPassword("j@ne", "password"), + Host: "google.com", + }, + "http://j%40ne:password@google.com", + }, + // unescaped @ in password should not confuse host + { + "http://jane:p@ssword@google.com", + &url.URL{ + Scheme: "http", + User: url.UserPassword("jane", "p@ssword"), + Host: "google.com", + }, + "http://jane:p%40ssword@google.com", + }, + { + "http://j@ne:password@google.com/p@th?q=@go", + &url.URL{ + Scheme: "http", + User: url.UserPassword("j@ne", "password"), + Host: "google.com", + Path: "/p@th", + RawQuery: "q=@go", + }, + "http://j%40ne:password@google.com/p@th?q=@go", + }, + { + "http://www.google.com/?q=go+language#foo", + &url.URL{ + Scheme: "http", + Host: "www.google.com", + Path: "/", + RawQuery: "q=go+language", + Fragment: "foo", + }, + "", + }, + { + "http://www.google.com/?q=go+language#foo%26bar", + &url.URL{ + Scheme: "http", + Host: "www.google.com", + Path: "/", + RawQuery: "q=go+language", + Fragment: "foo&bar", + }, + "http://www.google.com/?q=go+language#foo&bar", + }, + { + "file:///home/adg/rabbits", + &url.URL{ + Scheme: "file", + Host: "", + Path: "/home/adg/rabbits", + }, + "file:///home/adg/rabbits", + }, + // "Windows" paths are no exception to the rule. + // See golang.org/issue/6027, especially comment #9. + { + "file:///C:/FooBar/Baz.txt", + &url.URL{ + Scheme: "file", + Host: "", + Path: "/C:/FooBar/Baz.txt", + }, + "file:///C:/FooBar/Baz.txt", + }, + // case-insensitive scheme + { + "MaIlTo:webmaster@golang.org", + &url.URL{ + Scheme: "mailto", + Opaque: "webmaster@golang.org", + }, + "mailto:webmaster@golang.org", + }, + // Relative path + { + "a/b/c", + &url.URL{ + Path: "a/b/c", + }, + "a/b/c", + }, + // escaped '?' in username and password + { + "http://%3Fam:pa%3Fsword@google.com", + &url.URL{ + Scheme: "http", + User: url.UserPassword("?am", "pa?sword"), + Host: "google.com", + }, + "", + }, + // escaped '?' and '#' in path + { + "http://example.com/%3F%23", + &url.URL{ + Scheme: "http", + Host: "example.com", + Path: "?#", + }, + "", + }, + // unescaped [ ] ! ' ( ) * in path + { + "http://example.com/[]!'()*", + &url.URL{ + Scheme: "http", + Host: "example.com", + Path: "[]!'()*", + }, + "http://example.com/[]!'()*", + }, + // escaped : / ? # [ ] @ in username and password + { + "http://%3A%2F%3F:%23%5B%5D%40@example.com", + &url.URL{ + Scheme: "http", + User: url.UserPassword(":/?", "#[]@"), + Host: "example.com", + }, + "", + }, + // unescaped ! $ & ' ( ) * + , ; = in username and password + { + "http://!$&'():*+,;=@example.com", + &url.URL{ + Scheme: "http", + User: url.UserPassword("!$&'()", "*+,;="), + Host: "example.com", + }, + "", + }, + // unescaped = : / . ? = in query component + { + "http://example.com/?q=http://google.com/?q=", + &url.URL{ + Scheme: "http", + Host: "example.com", + Path: "/", + RawQuery: "q=http://google.com/?q=", + }, + "", + }, + // unescaped : / ? [ ] @ ! $ & ' ( ) * + , ; = in fragment + { + "http://example.com/#:/?%23[]@!$&'()*+,;=", + &url.URL{ + Scheme: "http", + Host: "example.com", + Path: "/", + Fragment: ":/?#[]@!$&'()*+,;=", + }, + "", + }, +} + +func DoTestString(t *testing.T, parse func(string) (*url.URL, error), name string, tests []URLTest) { + for _, tt := range tests { + u, err := parse(tt.in) + if err != nil { + t.Errorf("%s(%q) returned error %s", name, tt.in, err) + continue + } + expected := tt.in + if len(tt.roundtrip) > 0 { + expected = tt.roundtrip + } + s := Escape(u) + if s != expected { + t.Errorf("Escape(%s(%q)) == %q (expected %q)", name, tt.in, s, expected) + } + } +} + +func TestURLString(t *testing.T) { + DoTestString(t, url.Parse, "Parse", urltests) + + // no leading slash on path should prepend + // slash on String() call + noslash := URLTest{ + "http://www.google.com/search", + &url.URL{ + Scheme: "http", + Host: "www.google.com", + Path: "search", + }, + "", + } + s := Escape(noslash.out) + if s != noslash.in { + t.Errorf("Expected %s; go %s", noslash.in, s) + } +} + +type EscapeTest struct { + in string + out string + err error +} + +var escapeTests = []EscapeTest{ + { + "", + "", + nil, + }, + { + "abc", + "abc", + nil, + }, + { + "one two", + "one+two", + nil, + }, + { + "10%", + "10%25", + nil, + }, + { + " ?&=#+%!<>#\"{}|\\^[]`☺\t:/@$'()*,;", + "+?%26%3D%23%2B%25%21%3C%3E%23%22%7B%7D%7C%5C%5E%5B%5D%60%E2%98%BA%09%3A/%40%24%27%28%29%2A%2C%3B", + nil, + }, +} + +func TestEscape(t *testing.T) { + for _, tt := range escapeTests { + actual := QueryEscape(tt.in) + if tt.out != actual { + t.Errorf("QueryEscape(%q) = %q, want %q", tt.in, actual, tt.out) + } + + // for bonus points, verify that escape:unescape is an identity. + roundtrip, err := url.QueryUnescape(actual) + if roundtrip != tt.in || err != nil { + t.Errorf("QueryUnescape(%q) = %q, %s; want %q, %s", actual, roundtrip, err, tt.in, "[no error]") + } + } +} + +var resolveReferenceTests = []struct { + base, rel, expected string +}{ + // Absolute URL references + {"http://foo.com?a=b", "https://bar.com/", "https://bar.com/"}, + {"http://foo.com/", "https://bar.com/?a=b", "https://bar.com/?a=b"}, + {"http://foo.com/bar", "mailto:foo@example.com", "mailto:foo@example.com"}, + + // Path-absolute references + {"http://foo.com/bar", "/baz", "http://foo.com/baz"}, + {"http://foo.com/bar?a=b#f", "/baz", "http://foo.com/baz"}, + {"http://foo.com/bar?a=b", "/baz?c=d", "http://foo.com/baz?c=d"}, + + // Scheme-relative + {"https://foo.com/bar?a=b", "//bar.com/quux", "https://bar.com/quux"}, + + // Path-relative references: + + // ... current directory + {"http://foo.com", ".", "http://foo.com/"}, + {"http://foo.com/bar", ".", "http://foo.com/"}, + {"http://foo.com/bar/", ".", "http://foo.com/bar/"}, + + // ... going down + {"http://foo.com", "bar", "http://foo.com/bar"}, + {"http://foo.com/", "bar", "http://foo.com/bar"}, + {"http://foo.com/bar/baz", "quux", "http://foo.com/bar/quux"}, + + // ... going up + {"http://foo.com/bar/baz", "../quux", "http://foo.com/quux"}, + {"http://foo.com/bar/baz", "../../../../../quux", "http://foo.com/quux"}, + {"http://foo.com/bar", "..", "http://foo.com/"}, + {"http://foo.com/bar/baz", "./..", "http://foo.com/"}, + // ".." in the middle (issue 3560) + {"http://foo.com/bar/baz", "quux/dotdot/../tail", "http://foo.com/bar/quux/tail"}, + {"http://foo.com/bar/baz", "quux/./dotdot/../tail", "http://foo.com/bar/quux/tail"}, + {"http://foo.com/bar/baz", "quux/./dotdot/.././tail", "http://foo.com/bar/quux/tail"}, + {"http://foo.com/bar/baz", "quux/./dotdot/./../tail", "http://foo.com/bar/quux/tail"}, + {"http://foo.com/bar/baz", "quux/./dotdot/dotdot/././../../tail", "http://foo.com/bar/quux/tail"}, + {"http://foo.com/bar/baz", "quux/./dotdot/dotdot/./.././../tail", "http://foo.com/bar/quux/tail"}, + {"http://foo.com/bar/baz", "quux/./dotdot/dotdot/dotdot/./../../.././././tail", "http://foo.com/bar/quux/tail"}, + {"http://foo.com/bar/baz", "quux/./dotdot/../dotdot/../dot/./tail/..", "http://foo.com/bar/quux/dot/"}, + + // Remove any dot-segments prior to forming the target URI. + // http://tools.ietf.org/html/rfc3986#section-5.2.4 + {"http://foo.com/dot/./dotdot/../foo/bar", "../baz", "http://foo.com/dot/baz"}, + + // Triple dot isn't special + {"http://foo.com/bar", "...", "http://foo.com/..."}, + + // Fragment + {"http://foo.com/bar", ".#frag", "http://foo.com/#frag"}, + + // RFC 3986: Normal Examples + // http://tools.ietf.org/html/rfc3986#section-5.4.1 + {"http://a/b/c/d;p?q", "g:h", "g:h"}, + {"http://a/b/c/d;p?q", "g", "http://a/b/c/g"}, + {"http://a/b/c/d;p?q", "./g", "http://a/b/c/g"}, + {"http://a/b/c/d;p?q", "g/", "http://a/b/c/g/"}, + {"http://a/b/c/d;p?q", "/g", "http://a/g"}, + {"http://a/b/c/d;p?q", "//g", "http://g"}, + {"http://a/b/c/d;p?q", "?y", "http://a/b/c/d;p?y"}, + {"http://a/b/c/d;p?q", "g?y", "http://a/b/c/g?y"}, + {"http://a/b/c/d;p?q", "#s", "http://a/b/c/d;p?q#s"}, + {"http://a/b/c/d;p?q", "g#s", "http://a/b/c/g#s"}, + {"http://a/b/c/d;p?q", "g?y#s", "http://a/b/c/g?y#s"}, + {"http://a/b/c/d;p?q", ";x", "http://a/b/c/;x"}, + {"http://a/b/c/d;p?q", "g;x", "http://a/b/c/g;x"}, + {"http://a/b/c/d;p?q", "g;x?y#s", "http://a/b/c/g;x?y#s"}, + {"http://a/b/c/d;p?q", "", "http://a/b/c/d;p?q"}, + {"http://a/b/c/d;p?q", ".", "http://a/b/c/"}, + {"http://a/b/c/d;p?q", "./", "http://a/b/c/"}, + {"http://a/b/c/d;p?q", "..", "http://a/b/"}, + {"http://a/b/c/d;p?q", "../", "http://a/b/"}, + {"http://a/b/c/d;p?q", "../g", "http://a/b/g"}, + {"http://a/b/c/d;p?q", "../..", "http://a/"}, + {"http://a/b/c/d;p?q", "../../", "http://a/"}, + {"http://a/b/c/d;p?q", "../../g", "http://a/g"}, + + // RFC 3986: Abnormal Examples + // http://tools.ietf.org/html/rfc3986#section-5.4.2 + {"http://a/b/c/d;p?q", "../../../g", "http://a/g"}, + {"http://a/b/c/d;p?q", "../../../../g", "http://a/g"}, + {"http://a/b/c/d;p?q", "/./g", "http://a/g"}, + {"http://a/b/c/d;p?q", "/../g", "http://a/g"}, + {"http://a/b/c/d;p?q", "g.", "http://a/b/c/g."}, + {"http://a/b/c/d;p?q", ".g", "http://a/b/c/.g"}, + {"http://a/b/c/d;p?q", "g..", "http://a/b/c/g.."}, + {"http://a/b/c/d;p?q", "..g", "http://a/b/c/..g"}, + {"http://a/b/c/d;p?q", "./../g", "http://a/b/g"}, + {"http://a/b/c/d;p?q", "./g/.", "http://a/b/c/g/"}, + {"http://a/b/c/d;p?q", "g/./h", "http://a/b/c/g/h"}, + {"http://a/b/c/d;p?q", "g/../h", "http://a/b/c/h"}, + {"http://a/b/c/d;p?q", "g;x=1/./y", "http://a/b/c/g;x=1/y"}, + {"http://a/b/c/d;p?q", "g;x=1/../y", "http://a/b/c/y"}, + {"http://a/b/c/d;p?q", "g?y/./x", "http://a/b/c/g?y/./x"}, + {"http://a/b/c/d;p?q", "g?y/../x", "http://a/b/c/g?y/../x"}, + {"http://a/b/c/d;p?q", "g#s/./x", "http://a/b/c/g#s/./x"}, + {"http://a/b/c/d;p?q", "g#s/../x", "http://a/b/c/g#s/../x"}, + + // Extras. + {"https://a/b/c/d;p?q", "//g?q", "https://g?q"}, + {"https://a/b/c/d;p?q", "//g#s", "https://g#s"}, + {"https://a/b/c/d;p?q", "//g/d/e/f?y#s", "https://g/d/e/f?y#s"}, + {"https://a/b/c/d;p#s", "?y", "https://a/b/c/d;p?y"}, + {"https://a/b/c/d;p?q#s", "?y", "https://a/b/c/d;p?y"}, +} + +func TestResolveReference(t *testing.T) { + mustParse := func(url_ string) *url.URL { + u, err := url.Parse(url_) + if err != nil { + t.Fatalf("Expected URL to parse: %q, got error: %v", url_, err) + } + return u + } + opaque := &url.URL{Scheme: "scheme", Opaque: "opaque"} + for _, test := range resolveReferenceTests { + base := mustParse(test.base) + rel := mustParse(test.rel) + url := base.ResolveReference(rel) + if Escape(url) != test.expected { + t.Errorf("URL(%q).ResolveReference(%q) == %q, got %q", test.base, test.rel, test.expected, Escape(url)) + } + // Ensure that new instances are returned. + if base == url { + t.Errorf("Expected URL.ResolveReference to return new URL instance.") + } + // Test the convenience wrapper too. + url, err := base.Parse(test.rel) + if err != nil { + t.Errorf("URL(%q).Parse(%q) failed: %v", test.base, test.rel, err) + } else if Escape(url) != test.expected { + t.Errorf("URL(%q).Parse(%q) == %q, got %q", test.base, test.rel, test.expected, Escape(url)) + } else if base == url { + // Ensure that new instances are returned for the wrapper too. + t.Errorf("Expected URL.Parse to return new URL instance.") + } + // Ensure Opaque resets the URL. + url = base.ResolveReference(opaque) + if *url != *opaque { + t.Errorf("ResolveReference failed to resolve opaque URL: want %#v, got %#v", url, opaque) + } + // Test the convenience wrapper with an opaque URL too. + url, err = base.Parse("scheme:opaque") + if err != nil { + t.Errorf(`URL(%q).Parse("scheme:opaque") failed: %v`, test.base, err) + } else if *url != *opaque { + t.Errorf("Parse failed to resolve opaque URL: want %#v, got %#v", url, opaque) + } else if base == url { + // Ensure that new instances are returned, again. + t.Errorf("Expected URL.Parse to return new URL instance.") + } + } +} + +type shouldEscapeTest struct { + in byte + mode encoding + escape bool +} + +var shouldEscapeTests = []shouldEscapeTest{ + // Unreserved characters (§2.3) + {'a', encodePath, false}, + {'a', encodeUserPassword, false}, + {'a', encodeQueryComponent, false}, + {'a', encodeFragment, false}, + {'z', encodePath, false}, + {'A', encodePath, false}, + {'Z', encodePath, false}, + {'0', encodePath, false}, + {'9', encodePath, false}, + {'-', encodePath, false}, + {'-', encodeUserPassword, false}, + {'-', encodeQueryComponent, false}, + {'-', encodeFragment, false}, + {'.', encodePath, false}, + {'_', encodePath, false}, + {'~', encodePath, false}, + + // User information (§3.2.1) + {':', encodeUserPassword, true}, + {'/', encodeUserPassword, true}, + {'?', encodeUserPassword, true}, + {'@', encodeUserPassword, true}, + {'$', encodeUserPassword, false}, + {'&', encodeUserPassword, false}, + {'+', encodeUserPassword, false}, + {',', encodeUserPassword, false}, + {';', encodeUserPassword, false}, + {'=', encodeUserPassword, false}, +} + +func TestShouldEscape(t *testing.T) { + for _, tt := range shouldEscapeTests { + if shouldEscape(tt.in, tt.mode) != tt.escape { + t.Errorf("shouldEscape(%q, %v) returned %v; expected %v", tt.in, tt.mode, !tt.escape, tt.escape) + } + } +} diff --git a/vendor/github.com/armon/go-proxyproto/protocol.go b/vendor/github.com/armon/go-proxyproto/protocol.go index dfa6eb001..576507294 100644 --- a/vendor/github.com/armon/go-proxyproto/protocol.go +++ b/vendor/github.com/armon/go-proxyproto/protocol.go @@ -3,6 +3,7 @@ package proxyproto import ( "bufio" "bytes" + "errors" "fmt" "io" "log" @@ -18,8 +19,24 @@ var ( // to check if this connection is using the proxy protocol prefix = []byte("PROXY ") prefixLen = len(prefix) + + ErrInvalidUpstream = errors.New("upstream connection address not trusted for PROXY information") ) +// SourceChecker can be used to decide whether to trust the PROXY info or pass +// the original connection address through. If set, the connecting address is +// passed in as an argument. If the function returns an error due to the source +// being disallowed, it should return ErrInvalidUpstream. +// +// Behavior is as follows: +// * If error is not nil, the call to Accept() will fail. If the reason for +// triggering this failure is due to a disallowed source, it should return +// ErrInvalidUpstream. +// * If bool is true, the PROXY-set address is used. +// * If bool is false, the connection's remote address is used, rather than the +// address claimed in the PROXY info. +type SourceChecker func(net.Addr) (bool, error) + // Listener is used to wrap an underlying listener, // whose connections may be using the HAProxy Proxy Protocol (version 1). // If the connection is using the protocol, the RemoteAddr() will return @@ -30,6 +47,7 @@ var ( type Listener struct { Listener net.Listener ProxyHeaderTimeout time.Duration + SourceCheck SourceChecker } // Conn is used to wrap and underlying connection which @@ -40,6 +58,7 @@ type Conn struct { conn net.Conn dstAddr *net.TCPAddr srcAddr *net.TCPAddr + useConnRemoteAddr bool once sync.Once proxyHeaderTimeout time.Duration } @@ -51,7 +70,19 @@ func (p *Listener) Accept() (net.Conn, error) { if err != nil { return nil, err } - return NewConn(conn, p.ProxyHeaderTimeout), nil + var useConnRemoteAddr bool + if p.SourceCheck != nil { + allowed, err := p.SourceCheck(conn.RemoteAddr()) + if err != nil { + return nil, err + } + if !allowed { + useConnRemoteAddr = true + } + } + newConn := NewConn(conn, p.ProxyHeaderTimeout) + newConn.useConnRemoteAddr = useConnRemoteAddr + return newConn, nil } // Close closes the underlying listener. @@ -114,7 +145,7 @@ func (p *Conn) RemoteAddr() net.Addr { p.bufReader = bufio.NewReader(p.conn) } }) - if p.srcAddr != nil { + if p.srcAddr != nil && !p.useConnRemoteAddr { return p.srcAddr } return p.conn.RemoteAddr() diff --git a/vendor/github.com/armon/go-proxyproto/protocol_test.go b/vendor/github.com/armon/go-proxyproto/protocol_test.go new file mode 100644 index 000000000..04a9bc859 --- /dev/null +++ b/vendor/github.com/armon/go-proxyproto/protocol_test.go @@ -0,0 +1,383 @@ +package proxyproto + +import ( + "bytes" + "net" + "testing" + "time" +) + +const ( + goodAddr = "127.0.0.1" + badAddr = "127.0.0.2" + errAddr = "9999.0.0.2" +) + +var ( + checkAddr string +) + +func TestPassthrough(t *testing.T) { + l, err := net.Listen("tcp", "127.0.0.1:0") + if err != nil { + t.Fatalf("err: %v", err) + } + + pl := &Listener{Listener: l} + + go func() { + conn, err := net.Dial("tcp", pl.Addr().String()) + if err != nil { + t.Fatalf("err: %v", err) + } + defer conn.Close() + + conn.Write([]byte("ping")) + recv := make([]byte, 4) + _, err = conn.Read(recv) + if err != nil { + t.Fatalf("err: %v", err) + } + if !bytes.Equal(recv, []byte("pong")) { + t.Fatalf("bad: %v", recv) + } + }() + + conn, err := pl.Accept() + if err != nil { + t.Fatalf("err: %v", err) + } + defer conn.Close() + + recv := make([]byte, 4) + _, err = conn.Read(recv) + if err != nil { + t.Fatalf("err: %v", err) + } + if !bytes.Equal(recv, []byte("ping")) { + t.Fatalf("bad: %v", recv) + } + + if _, err := conn.Write([]byte("pong")); err != nil { + t.Fatalf("err: %v", err) + } +} + +func TestTimeout(t *testing.T) { + l, err := net.Listen("tcp", "127.0.0.1:0") + if err != nil { + t.Fatalf("err: %v", err) + } + + clientWriteDelay := 200 * time.Millisecond + proxyHeaderTimeout := 50 * time.Millisecond + pl := &Listener{Listener: l, ProxyHeaderTimeout: proxyHeaderTimeout} + + go func() { + conn, err := net.Dial("tcp", pl.Addr().String()) + if err != nil { + t.Fatalf("err: %v", err) + } + defer conn.Close() + + // Do not send data for a while + time.Sleep(clientWriteDelay) + + conn.Write([]byte("ping")) + recv := make([]byte, 4) + _, err = conn.Read(recv) + if err != nil { + t.Fatalf("err: %v", err) + } + if !bytes.Equal(recv, []byte("pong")) { + t.Fatalf("bad: %v", recv) + } + }() + + conn, err := pl.Accept() + if err != nil { + t.Fatalf("err: %v", err) + } + defer conn.Close() + + // Check the remote addr is the original 127.0.0.1 + remoteAddrStartTime := time.Now() + addr := conn.RemoteAddr().(*net.TCPAddr) + if addr.IP.String() != "127.0.0.1" { + t.Fatalf("bad: %v", addr) + } + remoteAddrDuration := time.Since(remoteAddrStartTime) + + // Check RemoteAddr() call did timeout + if remoteAddrDuration >= clientWriteDelay { + t.Fatalf("RemoteAddr() took longer than the specified timeout: %v < %v", proxyHeaderTimeout, remoteAddrDuration) + } + + recv := make([]byte, 4) + _, err = conn.Read(recv) + if err != nil { + t.Fatalf("err: %v", err) + } + if !bytes.Equal(recv, []byte("ping")) { + t.Fatalf("bad: %v", recv) + } + + if _, err := conn.Write([]byte("pong")); err != nil { + t.Fatalf("err: %v", err) + } +} + +func TestParse_ipv4(t *testing.T) { + l, err := net.Listen("tcp", "127.0.0.1:0") + if err != nil { + t.Fatalf("err: %v", err) + } + + pl := &Listener{Listener: l} + + go func() { + conn, err := net.Dial("tcp", pl.Addr().String()) + if err != nil { + t.Fatalf("err: %v", err) + } + defer conn.Close() + + // Write out the header! + header := "PROXY TCP4 10.1.1.1 20.2.2.2 1000 2000\r\n" + conn.Write([]byte(header)) + + conn.Write([]byte("ping")) + recv := make([]byte, 4) + _, err = conn.Read(recv) + if err != nil { + t.Fatalf("err: %v", err) + } + if !bytes.Equal(recv, []byte("pong")) { + t.Fatalf("bad: %v", recv) + } + }() + + conn, err := pl.Accept() + if err != nil { + t.Fatalf("err: %v", err) + } + defer conn.Close() + + recv := make([]byte, 4) + _, err = conn.Read(recv) + if err != nil { + t.Fatalf("err: %v", err) + } + if !bytes.Equal(recv, []byte("ping")) { + t.Fatalf("bad: %v", recv) + } + + if _, err := conn.Write([]byte("pong")); err != nil { + t.Fatalf("err: %v", err) + } + + // Check the remote addr + addr := conn.RemoteAddr().(*net.TCPAddr) + if addr.IP.String() != "10.1.1.1" { + t.Fatalf("bad: %v", addr) + } + if addr.Port != 1000 { + t.Fatalf("bad: %v", addr) + } +} + +func TestParse_ipv6(t *testing.T) { + l, err := net.Listen("tcp", "127.0.0.1:0") + if err != nil { + t.Fatalf("err: %v", err) + } + + pl := &Listener{Listener: l} + + go func() { + conn, err := net.Dial("tcp", pl.Addr().String()) + if err != nil { + t.Fatalf("err: %v", err) + } + defer conn.Close() + + // Write out the header! + header := "PROXY TCP6 ffff::ffff ffff::ffff 1000 2000\r\n" + conn.Write([]byte(header)) + + conn.Write([]byte("ping")) + recv := make([]byte, 4) + _, err = conn.Read(recv) + if err != nil { + t.Fatalf("err: %v", err) + } + if !bytes.Equal(recv, []byte("pong")) { + t.Fatalf("bad: %v", recv) + } + }() + + conn, err := pl.Accept() + if err != nil { + t.Fatalf("err: %v", err) + } + defer conn.Close() + + recv := make([]byte, 4) + _, err = conn.Read(recv) + if err != nil { + t.Fatalf("err: %v", err) + } + if !bytes.Equal(recv, []byte("ping")) { + t.Fatalf("bad: %v", recv) + } + + if _, err := conn.Write([]byte("pong")); err != nil { + t.Fatalf("err: %v", err) + } + + // Check the remote addr + addr := conn.RemoteAddr().(*net.TCPAddr) + if addr.IP.String() != "ffff::ffff" { + t.Fatalf("bad: %v", addr) + } + if addr.Port != 1000 { + t.Fatalf("bad: %v", addr) + } +} + +func TestParse_BadHeader(t *testing.T) { + l, err := net.Listen("tcp", "127.0.0.1:0") + if err != nil { + t.Fatalf("err: %v", err) + } + + pl := &Listener{Listener: l} + + go func() { + conn, err := net.Dial("tcp", pl.Addr().String()) + if err != nil { + t.Fatalf("err: %v", err) + } + defer conn.Close() + + // Write out the header! + header := "PROXY TCP4 what 127.0.0.1 1000 2000\r\n" + conn.Write([]byte(header)) + + conn.Write([]byte("ping")) + + recv := make([]byte, 4) + _, err = conn.Read(recv) + if err == nil { + t.Fatalf("err: %v", err) + } + }() + + conn, err := pl.Accept() + if err != nil { + t.Fatalf("err: %v", err) + } + defer conn.Close() + + // Check the remote addr, should be the local addr + addr := conn.RemoteAddr().(*net.TCPAddr) + if addr.IP.String() != "127.0.0.1" { + t.Fatalf("bad: %v", addr) + } + + // Read should fail + recv := make([]byte, 4) + _, err = conn.Read(recv) + if err == nil { + t.Fatalf("err: %v", err) + } +} + +func TestParse_ipv4_checkfunc(t *testing.T) { + checkAddr = goodAddr + testParse_ipv4_checkfunc(t) + checkAddr = badAddr + testParse_ipv4_checkfunc(t) + checkAddr = errAddr + testParse_ipv4_checkfunc(t) +} + +func testParse_ipv4_checkfunc(t *testing.T) { + l, err := net.Listen("tcp", "127.0.0.1:0") + if err != nil { + t.Fatalf("err: %v", err) + } + + checkFunc := func(addr net.Addr) (bool, error) { + tcpAddr := addr.(*net.TCPAddr) + if tcpAddr.IP.String() == checkAddr { + return true, nil + } + return false, nil + } + + pl := &Listener{Listener: l, SourceCheck: checkFunc} + + go func() { + conn, err := net.Dial("tcp", pl.Addr().String()) + if err != nil { + t.Fatalf("err: %v", err) + } + defer conn.Close() + + // Write out the header! + header := "PROXY TCP4 10.1.1.1 20.2.2.2 1000 2000\r\n" + conn.Write([]byte(header)) + + conn.Write([]byte("ping")) + recv := make([]byte, 4) + _, err = conn.Read(recv) + if err != nil { + t.Fatalf("err: %v", err) + } + if !bytes.Equal(recv, []byte("pong")) { + t.Fatalf("bad: %v", recv) + } + }() + + conn, err := pl.Accept() + if err != nil { + if checkAddr == badAddr { + return + } + t.Fatalf("err: %v", err) + } + defer conn.Close() + + recv := make([]byte, 4) + _, err = conn.Read(recv) + if err != nil { + t.Fatalf("err: %v", err) + } + if !bytes.Equal(recv, []byte("ping")) { + t.Fatalf("bad: %v", recv) + } + + if _, err := conn.Write([]byte("pong")); err != nil { + t.Fatalf("err: %v", err) + } + + // Check the remote addr + addr := conn.RemoteAddr().(*net.TCPAddr) + switch checkAddr { + case goodAddr: + if addr.IP.String() != "10.1.1.1" { + t.Fatalf("bad: %v", addr) + } + if addr.Port != 1000 { + t.Fatalf("bad: %v", addr) + } + case badAddr: + if addr.IP.String() != "127.0.0.1" { + t.Fatalf("bad: %v", addr) + } + if addr.Port == 1000 { + t.Fatalf("bad: %v", addr) + } + } +} diff --git a/vendor/github.com/beorn7/perks/.gitignore b/vendor/github.com/beorn7/perks/.gitignore new file mode 100644 index 000000000..1bd9209aa --- /dev/null +++ b/vendor/github.com/beorn7/perks/.gitignore @@ -0,0 +1,2 @@ +*.test +*.prof diff --git a/vendor/github.com/beorn7/perks/README.md b/vendor/github.com/beorn7/perks/README.md new file mode 100644 index 000000000..fc0577770 --- /dev/null +++ b/vendor/github.com/beorn7/perks/README.md @@ -0,0 +1,31 @@ +# Perks for Go (golang.org) + +Perks contains the Go package quantile that computes approximate quantiles over +an unbounded data stream within low memory and CPU bounds. + +For more information and examples, see: +http://godoc.org/github.com/bmizerany/perks + +A very special thank you and shout out to Graham Cormode (Rutgers University), +Flip Korn (AT&T Labs–Research), S. Muthukrishnan (Rutgers University), and +Divesh Srivastava (AT&T Labs–Research) for their research and publication of +[Effective Computation of Biased Quantiles over Data Streams](http://www.cs.rutgers.edu/~muthu/bquant.pdf) + +Thank you, also: +* Armon Dadgar (@armon) +* Andrew Gerrand (@nf) +* Brad Fitzpatrick (@bradfitz) +* Keith Rarick (@kr) + +FAQ: + +Q: Why not move the quantile package into the project root? +A: I want to add more packages to perks later. + +Copyright (C) 2013 Blake Mizerany + +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/vendor/github.com/beorn7/perks/quantile/bench_test.go b/vendor/github.com/beorn7/perks/quantile/bench_test.go new file mode 100644 index 000000000..0bd0e4e77 --- /dev/null +++ b/vendor/github.com/beorn7/perks/quantile/bench_test.go @@ -0,0 +1,63 @@ +package quantile + +import ( + "testing" +) + +func BenchmarkInsertTargeted(b *testing.B) { + b.ReportAllocs() + + s := NewTargeted(Targets) + b.ResetTimer() + for i := float64(0); i < float64(b.N); i++ { + s.Insert(i) + } +} + +func BenchmarkInsertTargetedSmallEpsilon(b *testing.B) { + s := NewTargeted(TargetsSmallEpsilon) + b.ResetTimer() + for i := float64(0); i < float64(b.N); i++ { + s.Insert(i) + } +} + +func BenchmarkInsertBiased(b *testing.B) { + s := NewLowBiased(0.01) + b.ResetTimer() + for i := float64(0); i < float64(b.N); i++ { + s.Insert(i) + } +} + +func BenchmarkInsertBiasedSmallEpsilon(b *testing.B) { + s := NewLowBiased(0.0001) + b.ResetTimer() + for i := float64(0); i < float64(b.N); i++ { + s.Insert(i) + } +} + +func BenchmarkQuery(b *testing.B) { + s := NewTargeted(Targets) + for i := float64(0); i < 1e6; i++ { + s.Insert(i) + } + b.ResetTimer() + n := float64(b.N) + for i := float64(0); i < n; i++ { + s.Query(i / n) + } +} + +func BenchmarkQuerySmallEpsilon(b *testing.B) { + s := NewTargeted(TargetsSmallEpsilon) + for i := float64(0); i < 1e6; i++ { + s.Insert(i) + } + b.ResetTimer() + n := float64(b.N) + for i := float64(0); i < n; i++ { + s.Query(i / n) + } +} diff --git a/vendor/github.com/beorn7/perks/quantile/example_test.go b/vendor/github.com/beorn7/perks/quantile/example_test.go new file mode 100644 index 000000000..ab3293aaf --- /dev/null +++ b/vendor/github.com/beorn7/perks/quantile/example_test.go @@ -0,0 +1,121 @@ +// +build go1.1 + +package quantile_test + +import ( + "bufio" + "fmt" + "log" + "os" + "strconv" + "time" + + "github.com/beorn7/perks/quantile" +) + +func Example_simple() { + ch := make(chan float64) + go sendFloats(ch) + + // Compute the 50th, 90th, and 99th percentile. + q := quantile.NewTargeted(map[float64]float64{ + 0.50: 0.005, + 0.90: 0.001, + 0.99: 0.0001, + }) + for v := range ch { + q.Insert(v) + } + + fmt.Println("perc50:", q.Query(0.50)) + fmt.Println("perc90:", q.Query(0.90)) + fmt.Println("perc99:", q.Query(0.99)) + fmt.Println("count:", q.Count()) + // Output: + // perc50: 5 + // perc90: 16 + // perc99: 223 + // count: 2388 +} + +func Example_mergeMultipleStreams() { + // Scenario: + // We have multiple database shards. On each shard, there is a process + // collecting query response times from the database logs and inserting + // them into a Stream (created via NewTargeted(0.90)), much like the + // Simple example. These processes expose a network interface for us to + // ask them to serialize and send us the results of their + // Stream.Samples so we may Merge and Query them. + // + // NOTES: + // * These sample sets are small, allowing us to get them + // across the network much faster than sending the entire list of data + // points. + // + // * For this to work correctly, we must supply the same quantiles + // a priori the process collecting the samples supplied to NewTargeted, + // even if we do not plan to query them all here. + ch := make(chan quantile.Samples) + getDBQuerySamples(ch) + q := quantile.NewTargeted(map[float64]float64{0.90: 0.001}) + for samples := range ch { + q.Merge(samples) + } + fmt.Println("perc90:", q.Query(0.90)) +} + +func Example_window() { + // Scenario: We want the 90th, 95th, and 99th percentiles for each + // minute. + + ch := make(chan float64) + go sendStreamValues(ch) + + tick := time.NewTicker(1 * time.Minute) + q := quantile.NewTargeted(map[float64]float64{ + 0.90: 0.001, + 0.95: 0.0005, + 0.99: 0.0001, + }) + for { + select { + case t := <-tick.C: + flushToDB(t, q.Samples()) + q.Reset() + case v := <-ch: + q.Insert(v) + } + } +} + +func sendStreamValues(ch chan float64) { + // Use your imagination +} + +func flushToDB(t time.Time, samples quantile.Samples) { + // Use your imagination +} + +// This is a stub for the above example. In reality this would hit the remote +// servers via http or something like it. +func getDBQuerySamples(ch chan quantile.Samples) {} + +func sendFloats(ch chan<- float64) { + f, err := os.Open("exampledata.txt") + if err != nil { + log.Fatal(err) + } + sc := bufio.NewScanner(f) + for sc.Scan() { + b := sc.Bytes() + v, err := strconv.ParseFloat(string(b), 64) + if err != nil { + log.Fatal(err) + } + ch <- v + } + if sc.Err() != nil { + log.Fatal(sc.Err()) + } + close(ch) +} diff --git a/vendor/github.com/beorn7/perks/quantile/stream.go b/vendor/github.com/beorn7/perks/quantile/stream.go index 587b1fc5b..f4cabd669 100644 --- a/vendor/github.com/beorn7/perks/quantile/stream.go +++ b/vendor/github.com/beorn7/perks/quantile/stream.go @@ -133,7 +133,7 @@ func (s *Stream) Query(q float64) float64 { if l == 0 { return 0 } - i := int(float64(l) * q) + i := int(math.Ceil(float64(l) * q)) if i > 0 { i -= 1 } diff --git a/vendor/github.com/beorn7/perks/quantile/stream_test.go b/vendor/github.com/beorn7/perks/quantile/stream_test.go new file mode 100644 index 000000000..855195097 --- /dev/null +++ b/vendor/github.com/beorn7/perks/quantile/stream_test.go @@ -0,0 +1,215 @@ +package quantile + +import ( + "math" + "math/rand" + "sort" + "testing" +) + +var ( + Targets = map[float64]float64{ + 0.01: 0.001, + 0.10: 0.01, + 0.50: 0.05, + 0.90: 0.01, + 0.99: 0.001, + } + TargetsSmallEpsilon = map[float64]float64{ + 0.01: 0.0001, + 0.10: 0.001, + 0.50: 0.005, + 0.90: 0.001, + 0.99: 0.0001, + } + LowQuantiles = []float64{0.01, 0.1, 0.5} + HighQuantiles = []float64{0.99, 0.9, 0.5} +) + +const RelativeEpsilon = 0.01 + +func verifyPercsWithAbsoluteEpsilon(t *testing.T, a []float64, s *Stream) { + sort.Float64s(a) + for quantile, epsilon := range Targets { + n := float64(len(a)) + k := int(quantile * n) + if k < 1 { + k = 1 + } + lower := int((quantile - epsilon) * n) + if lower < 1 { + lower = 1 + } + upper := int(math.Ceil((quantile + epsilon) * n)) + if upper > len(a) { + upper = len(a) + } + w, min, max := a[k-1], a[lower-1], a[upper-1] + if g := s.Query(quantile); g < min || g > max { + t.Errorf("q=%f: want %v [%f,%f], got %v", quantile, w, min, max, g) + } + } +} + +func verifyLowPercsWithRelativeEpsilon(t *testing.T, a []float64, s *Stream) { + sort.Float64s(a) + for _, qu := range LowQuantiles { + n := float64(len(a)) + k := int(qu * n) + + lowerRank := int((1 - RelativeEpsilon) * qu * n) + upperRank := int(math.Ceil((1 + RelativeEpsilon) * qu * n)) + w, min, max := a[k-1], a[lowerRank-1], a[upperRank-1] + if g := s.Query(qu); g < min || g > max { + t.Errorf("q=%f: want %v [%f,%f], got %v", qu, w, min, max, g) + } + } +} + +func verifyHighPercsWithRelativeEpsilon(t *testing.T, a []float64, s *Stream) { + sort.Float64s(a) + for _, qu := range HighQuantiles { + n := float64(len(a)) + k := int(qu * n) + + lowerRank := int((1 - (1+RelativeEpsilon)*(1-qu)) * n) + upperRank := int(math.Ceil((1 - (1-RelativeEpsilon)*(1-qu)) * n)) + w, min, max := a[k-1], a[lowerRank-1], a[upperRank-1] + if g := s.Query(qu); g < min || g > max { + t.Errorf("q=%f: want %v [%f,%f], got %v", qu, w, min, max, g) + } + } +} + +func populateStream(s *Stream) []float64 { + a := make([]float64, 0, 1e5+100) + for i := 0; i < cap(a); i++ { + v := rand.NormFloat64() + // Add 5% asymmetric outliers. + if i%20 == 0 { + v = v*v + 1 + } + s.Insert(v) + a = append(a, v) + } + return a +} + +func TestTargetedQuery(t *testing.T) { + rand.Seed(42) + s := NewTargeted(Targets) + a := populateStream(s) + verifyPercsWithAbsoluteEpsilon(t, a, s) +} + +func TestTargetedQuerySmallSampleSize(t *testing.T) { + rand.Seed(42) + s := NewTargeted(TargetsSmallEpsilon) + a := []float64{1, 2, 3, 4, 5} + for _, v := range a { + s.Insert(v) + } + verifyPercsWithAbsoluteEpsilon(t, a, s) + // If not yet flushed, results should be precise: + if !s.flushed() { + for φ, want := range map[float64]float64{ + 0.01: 1, + 0.10: 1, + 0.50: 3, + 0.90: 5, + 0.99: 5, + } { + if got := s.Query(φ); got != want { + t.Errorf("want %f for φ=%f, got %f", want, φ, got) + } + } + } +} + +func TestLowBiasedQuery(t *testing.T) { + rand.Seed(42) + s := NewLowBiased(RelativeEpsilon) + a := populateStream(s) + verifyLowPercsWithRelativeEpsilon(t, a, s) +} + +func TestHighBiasedQuery(t *testing.T) { + rand.Seed(42) + s := NewHighBiased(RelativeEpsilon) + a := populateStream(s) + verifyHighPercsWithRelativeEpsilon(t, a, s) +} + +// BrokenTestTargetedMerge is broken, see Merge doc comment. +func BrokenTestTargetedMerge(t *testing.T) { + rand.Seed(42) + s1 := NewTargeted(Targets) + s2 := NewTargeted(Targets) + a := populateStream(s1) + a = append(a, populateStream(s2)...) + s1.Merge(s2.Samples()) + verifyPercsWithAbsoluteEpsilon(t, a, s1) +} + +// BrokenTestLowBiasedMerge is broken, see Merge doc comment. +func BrokenTestLowBiasedMerge(t *testing.T) { + rand.Seed(42) + s1 := NewLowBiased(RelativeEpsilon) + s2 := NewLowBiased(RelativeEpsilon) + a := populateStream(s1) + a = append(a, populateStream(s2)...) + s1.Merge(s2.Samples()) + verifyLowPercsWithRelativeEpsilon(t, a, s2) +} + +// BrokenTestHighBiasedMerge is broken, see Merge doc comment. +func BrokenTestHighBiasedMerge(t *testing.T) { + rand.Seed(42) + s1 := NewHighBiased(RelativeEpsilon) + s2 := NewHighBiased(RelativeEpsilon) + a := populateStream(s1) + a = append(a, populateStream(s2)...) + s1.Merge(s2.Samples()) + verifyHighPercsWithRelativeEpsilon(t, a, s2) +} + +func TestUncompressed(t *testing.T) { + q := NewTargeted(Targets) + for i := 100; i > 0; i-- { + q.Insert(float64(i)) + } + if g := q.Count(); g != 100 { + t.Errorf("want count 100, got %d", g) + } + // Before compression, Query should have 100% accuracy. + for quantile := range Targets { + w := quantile * 100 + if g := q.Query(quantile); g != w { + t.Errorf("want %f, got %f", w, g) + } + } +} + +func TestUncompressedSamples(t *testing.T) { + q := NewTargeted(map[float64]float64{0.99: 0.001}) + for i := 1; i <= 100; i++ { + q.Insert(float64(i)) + } + if g := q.Samples().Len(); g != 100 { + t.Errorf("want count 100, got %d", g) + } +} + +func TestUncompressedOne(t *testing.T) { + q := NewTargeted(map[float64]float64{0.99: 0.01}) + q.Insert(3.14) + if g := q.Query(0.90); g != 3.14 { + t.Error("want PI, got", g) + } +} + +func TestDefaults(t *testing.T) { + if g := NewTargeted(map[float64]float64{0.99: 0.001}).Query(0.99); g != 0 { + t.Errorf("want 0, got %f", g) + } +} diff --git a/vendor/github.com/gorilla/websocket/.gitignore b/vendor/github.com/davecgh/go-spew/.gitignore similarity index 100% rename from vendor/github.com/gorilla/websocket/.gitignore rename to vendor/github.com/davecgh/go-spew/.gitignore diff --git a/vendor/github.com/davecgh/go-spew/.travis.yml b/vendor/github.com/davecgh/go-spew/.travis.yml new file mode 100644 index 000000000..984e0736e --- /dev/null +++ b/vendor/github.com/davecgh/go-spew/.travis.yml @@ -0,0 +1,14 @@ +language: go +go: + - 1.5.4 + - 1.6.3 + - 1.7 +install: + - go get -v golang.org/x/tools/cmd/cover +script: + - go test -v -tags=safe ./spew + - go test -v -tags=testcgo ./spew -covermode=count -coverprofile=profile.cov +after_success: + - go get -v github.com/mattn/goveralls + - export PATH=$PATH:$HOME/gopath/bin + - goveralls -coverprofile=profile.cov -service=travis-ci diff --git a/vendor/github.com/davecgh/go-spew/README.md b/vendor/github.com/davecgh/go-spew/README.md new file mode 100644 index 000000000..262430449 --- /dev/null +++ b/vendor/github.com/davecgh/go-spew/README.md @@ -0,0 +1,205 @@ +go-spew +======= + +[![Build Status](https://img.shields.io/travis/davecgh/go-spew.svg)] +(https://travis-ci.org/davecgh/go-spew) [![ISC License] +(http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org) [![Coverage Status] +(https://img.shields.io/coveralls/davecgh/go-spew.svg)] +(https://coveralls.io/r/davecgh/go-spew?branch=master) + + +Go-spew implements a deep pretty printer for Go data structures to aid in +debugging. A comprehensive suite of tests with 100% test coverage is provided +to ensure proper functionality. See `test_coverage.txt` for the gocov coverage +report. Go-spew is licensed under the liberal ISC license, so it may be used in +open source or commercial projects. + +If you're interested in reading about how this package came to life and some +of the challenges involved in providing a deep pretty printer, there is a blog +post about it +[here](https://web.archive.org/web/20160304013555/https://blog.cyphertite.com/go-spew-a-journey-into-dumping-go-data-structures/). + +## Documentation + +[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)] +(http://godoc.org/github.com/davecgh/go-spew/spew) + +Full `go doc` style documentation for the project can be viewed online without +installing this package by using the excellent GoDoc site here: +http://godoc.org/github.com/davecgh/go-spew/spew + +You can also view the documentation locally once the package is installed with +the `godoc` tool by running `godoc -http=":6060"` and pointing your browser to +http://localhost:6060/pkg/github.com/davecgh/go-spew/spew + +## Installation + +```bash +$ go get -u github.com/davecgh/go-spew/spew +``` + +## Quick Start + +Add this import line to the file you're working in: + +```Go +import "github.com/davecgh/go-spew/spew" +``` + +To dump a variable with full newlines, indentation, type, and pointer +information use Dump, Fdump, or Sdump: + +```Go +spew.Dump(myVar1, myVar2, ...) +spew.Fdump(someWriter, myVar1, myVar2, ...) +str := spew.Sdump(myVar1, myVar2, ...) +``` + +Alternatively, if you would prefer to use format strings with a compacted inline +printing style, use the convenience wrappers Printf, Fprintf, etc with %v (most +compact), %+v (adds pointer addresses), %#v (adds types), or %#+v (adds types +and pointer addresses): + +```Go +spew.Printf("myVar1: %v -- myVar2: %+v", myVar1, myVar2) +spew.Printf("myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) +spew.Fprintf(someWriter, "myVar1: %v -- myVar2: %+v", myVar1, myVar2) +spew.Fprintf(someWriter, "myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) +``` + +## Debugging a Web Application Example + +Here is an example of how you can use `spew.Sdump()` to help debug a web application. Please be sure to wrap your output using the `html.EscapeString()` function for safety reasons. You should also only use this debugging technique in a development environment, never in production. + +```Go +package main + +import ( + "fmt" + "html" + "net/http" + + "github.com/davecgh/go-spew/spew" +) + +func handler(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "text/html") + fmt.Fprintf(w, "Hi there, %s!", r.URL.Path[1:]) + fmt.Fprintf(w, "") +} + +func main() { + http.HandleFunc("/", handler) + http.ListenAndServe(":8080", nil) +} +``` + +## Sample Dump Output + +``` +(main.Foo) { + unexportedField: (*main.Bar)(0xf84002e210)({ + flag: (main.Flag) flagTwo, + data: (uintptr) + }), + ExportedField: (map[interface {}]interface {}) { + (string) "one": (bool) true + } +} +([]uint8) { + 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 |............... | + 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 |!"#$%&'()*+,-./0| + 00000020 31 32 |12| +} +``` + +## Sample Formatter Output + +Double pointer to a uint8: +``` + %v: <**>5 + %+v: <**>(0xf8400420d0->0xf8400420c8)5 + %#v: (**uint8)5 + %#+v: (**uint8)(0xf8400420d0->0xf8400420c8)5 +``` + +Pointer to circular struct with a uint8 field and a pointer to itself: +``` + %v: <*>{1 <*>} + %+v: <*>(0xf84003e260){ui8:1 c:<*>(0xf84003e260)} + %#v: (*main.circular){ui8:(uint8)1 c:(*main.circular)} + %#+v: (*main.circular)(0xf84003e260){ui8:(uint8)1 c:(*main.circular)(0xf84003e260)} +``` + +## Configuration Options + +Configuration of spew is handled by fields in the ConfigState type. For +convenience, all of the top-level functions use a global state available via the +spew.Config global. + +It is also possible to create a ConfigState instance that provides methods +equivalent to the top-level functions. This allows concurrent configuration +options. See the ConfigState documentation for more details. + +``` +* Indent + String to use for each indentation level for Dump functions. + It is a single space by default. A popular alternative is "\t". + +* MaxDepth + Maximum number of levels to descend into nested data structures. + There is no limit by default. + +* DisableMethods + Disables invocation of error and Stringer interface methods. + Method invocation is enabled by default. + +* DisablePointerMethods + Disables invocation of error and Stringer interface methods on types + which only accept pointer receivers from non-pointer variables. This option + relies on access to the unsafe package, so it will not have any effect when + running in environments without access to the unsafe package such as Google + App Engine or with the "safe" build tag specified. + Pointer method invocation is enabled by default. + +* DisablePointerAddresses + DisablePointerAddresses specifies whether to disable the printing of + pointer addresses. This is useful when diffing data structures in tests. + +* DisableCapacities + DisableCapacities specifies whether to disable the printing of capacities + for arrays, slices, maps and channels. This is useful when diffing data + structures in tests. + +* ContinueOnMethod + Enables recursion into types after invoking error and Stringer interface + methods. Recursion after method invocation is disabled by default. + +* SortKeys + Specifies map keys should be sorted before being printed. Use + this to have a more deterministic, diffable output. Note that + only native types (bool, int, uint, floats, uintptr and string) + and types which implement error or Stringer interfaces are supported, + with other types sorted according to the reflect.Value.String() output + which guarantees display stability. Natural map order is used by + default. + +* SpewKeys + SpewKeys specifies that, as a last resort attempt, map keys should be + spewed to strings and sorted by those strings. This is only considered + if SortKeys is true. + +``` + +## Unsafe Package Dependency + +This package relies on the unsafe package to perform some of the more advanced +features, however it also supports a "limited" mode which allows it to work in +environments where the unsafe package is not available. By default, it will +operate in this mode on Google App Engine and when compiled with GopherJS. The +"safe" build tag may also be specified to force the package to build without +using the unsafe package. + +## License + +Go-spew is licensed under the [copyfree](http://copyfree.org) ISC License. diff --git a/vendor/github.com/davecgh/go-spew/cov_report.sh b/vendor/github.com/davecgh/go-spew/cov_report.sh new file mode 100644 index 000000000..9579497e4 --- /dev/null +++ b/vendor/github.com/davecgh/go-spew/cov_report.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +# This script uses gocov to generate a test coverage report. +# The gocov tool my be obtained with the following command: +# go get github.com/axw/gocov/gocov +# +# It will be installed to $GOPATH/bin, so ensure that location is in your $PATH. + +# Check for gocov. +if ! type gocov >/dev/null 2>&1; then + echo >&2 "This script requires the gocov tool." + echo >&2 "You may obtain it with the following command:" + echo >&2 "go get github.com/axw/gocov/gocov" + exit 1 +fi + +# Only run the cgo tests if gcc is installed. +if type gcc >/dev/null 2>&1; then + (cd spew && gocov test -tags testcgo | gocov report) +else + (cd spew && gocov test | gocov report) +fi diff --git a/vendor/github.com/davecgh/go-spew/spew/common.go b/vendor/github.com/davecgh/go-spew/spew/common.go index 1be8ce945..7c519ff47 100644 --- a/vendor/github.com/davecgh/go-spew/spew/common.go +++ b/vendor/github.com/davecgh/go-spew/spew/common.go @@ -180,7 +180,7 @@ func printComplex(w io.Writer, c complex128, floatPrecision int) { w.Write(closeParenBytes) } -// printHexPtr outputs a uintptr formatted as hexadecimal with a leading '0x' +// printHexPtr outputs a uintptr formatted as hexidecimal with a leading '0x' // prefix to Writer w. func printHexPtr(w io.Writer, p uintptr) { // Null pointer. diff --git a/vendor/github.com/davecgh/go-spew/spew/common_test.go b/vendor/github.com/davecgh/go-spew/spew/common_test.go new file mode 100644 index 000000000..0f5ce47dc --- /dev/null +++ b/vendor/github.com/davecgh/go-spew/spew/common_test.go @@ -0,0 +1,298 @@ +/* + * Copyright (c) 2013-2016 Dave Collins + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +package spew_test + +import ( + "fmt" + "reflect" + "testing" + + "github.com/davecgh/go-spew/spew" +) + +// custom type to test Stinger interface on non-pointer receiver. +type stringer string + +// String implements the Stringer interface for testing invocation of custom +// stringers on types with non-pointer receivers. +func (s stringer) String() string { + return "stringer " + string(s) +} + +// custom type to test Stinger interface on pointer receiver. +type pstringer string + +// String implements the Stringer interface for testing invocation of custom +// stringers on types with only pointer receivers. +func (s *pstringer) String() string { + return "stringer " + string(*s) +} + +// xref1 and xref2 are cross referencing structs for testing circular reference +// detection. +type xref1 struct { + ps2 *xref2 +} +type xref2 struct { + ps1 *xref1 +} + +// indirCir1, indirCir2, and indirCir3 are used to generate an indirect circular +// reference for testing detection. +type indirCir1 struct { + ps2 *indirCir2 +} +type indirCir2 struct { + ps3 *indirCir3 +} +type indirCir3 struct { + ps1 *indirCir1 +} + +// embed is used to test embedded structures. +type embed struct { + a string +} + +// embedwrap is used to test embedded structures. +type embedwrap struct { + *embed + e *embed +} + +// panicer is used to intentionally cause a panic for testing spew properly +// handles them +type panicer int + +func (p panicer) String() string { + panic("test panic") +} + +// customError is used to test custom error interface invocation. +type customError int + +func (e customError) Error() string { + return fmt.Sprintf("error: %d", int(e)) +} + +// stringizeWants converts a slice of wanted test output into a format suitable +// for a test error message. +func stringizeWants(wants []string) string { + s := "" + for i, want := range wants { + if i > 0 { + s += fmt.Sprintf("want%d: %s", i+1, want) + } else { + s += "want: " + want + } + } + return s +} + +// testFailed returns whether or not a test failed by checking if the result +// of the test is in the slice of wanted strings. +func testFailed(result string, wants []string) bool { + for _, want := range wants { + if result == want { + return false + } + } + return true +} + +type sortableStruct struct { + x int +} + +func (ss sortableStruct) String() string { + return fmt.Sprintf("ss.%d", ss.x) +} + +type unsortableStruct struct { + x int +} + +type sortTestCase struct { + input []reflect.Value + expected []reflect.Value +} + +func helpTestSortValues(tests []sortTestCase, cs *spew.ConfigState, t *testing.T) { + getInterfaces := func(values []reflect.Value) []interface{} { + interfaces := []interface{}{} + for _, v := range values { + interfaces = append(interfaces, v.Interface()) + } + return interfaces + } + + for _, test := range tests { + spew.SortValues(test.input, cs) + // reflect.DeepEqual cannot really make sense of reflect.Value, + // probably because of all the pointer tricks. For instance, + // v(2.0) != v(2.0) on a 32-bits system. Turn them into interface{} + // instead. + input := getInterfaces(test.input) + expected := getInterfaces(test.expected) + if !reflect.DeepEqual(input, expected) { + t.Errorf("Sort mismatch:\n %v != %v", input, expected) + } + } +} + +// TestSortValues ensures the sort functionality for relect.Value based sorting +// works as intended. +func TestSortValues(t *testing.T) { + v := reflect.ValueOf + + a := v("a") + b := v("b") + c := v("c") + embedA := v(embed{"a"}) + embedB := v(embed{"b"}) + embedC := v(embed{"c"}) + tests := []sortTestCase{ + // No values. + { + []reflect.Value{}, + []reflect.Value{}, + }, + // Bools. + { + []reflect.Value{v(false), v(true), v(false)}, + []reflect.Value{v(false), v(false), v(true)}, + }, + // Ints. + { + []reflect.Value{v(2), v(1), v(3)}, + []reflect.Value{v(1), v(2), v(3)}, + }, + // Uints. + { + []reflect.Value{v(uint8(2)), v(uint8(1)), v(uint8(3))}, + []reflect.Value{v(uint8(1)), v(uint8(2)), v(uint8(3))}, + }, + // Floats. + { + []reflect.Value{v(2.0), v(1.0), v(3.0)}, + []reflect.Value{v(1.0), v(2.0), v(3.0)}, + }, + // Strings. + { + []reflect.Value{b, a, c}, + []reflect.Value{a, b, c}, + }, + // Array + { + []reflect.Value{v([3]int{3, 2, 1}), v([3]int{1, 3, 2}), v([3]int{1, 2, 3})}, + []reflect.Value{v([3]int{1, 2, 3}), v([3]int{1, 3, 2}), v([3]int{3, 2, 1})}, + }, + // Uintptrs. + { + []reflect.Value{v(uintptr(2)), v(uintptr(1)), v(uintptr(3))}, + []reflect.Value{v(uintptr(1)), v(uintptr(2)), v(uintptr(3))}, + }, + // SortableStructs. + { + // Note: not sorted - DisableMethods is set. + []reflect.Value{v(sortableStruct{2}), v(sortableStruct{1}), v(sortableStruct{3})}, + []reflect.Value{v(sortableStruct{2}), v(sortableStruct{1}), v(sortableStruct{3})}, + }, + // UnsortableStructs. + { + // Note: not sorted - SpewKeys is false. + []reflect.Value{v(unsortableStruct{2}), v(unsortableStruct{1}), v(unsortableStruct{3})}, + []reflect.Value{v(unsortableStruct{2}), v(unsortableStruct{1}), v(unsortableStruct{3})}, + }, + // Invalid. + { + []reflect.Value{embedB, embedA, embedC}, + []reflect.Value{embedB, embedA, embedC}, + }, + } + cs := spew.ConfigState{DisableMethods: true, SpewKeys: false} + helpTestSortValues(tests, &cs, t) +} + +// TestSortValuesWithMethods ensures the sort functionality for relect.Value +// based sorting works as intended when using string methods. +func TestSortValuesWithMethods(t *testing.T) { + v := reflect.ValueOf + + a := v("a") + b := v("b") + c := v("c") + tests := []sortTestCase{ + // Ints. + { + []reflect.Value{v(2), v(1), v(3)}, + []reflect.Value{v(1), v(2), v(3)}, + }, + // Strings. + { + []reflect.Value{b, a, c}, + []reflect.Value{a, b, c}, + }, + // SortableStructs. + { + []reflect.Value{v(sortableStruct{2}), v(sortableStruct{1}), v(sortableStruct{3})}, + []reflect.Value{v(sortableStruct{1}), v(sortableStruct{2}), v(sortableStruct{3})}, + }, + // UnsortableStructs. + { + // Note: not sorted - SpewKeys is false. + []reflect.Value{v(unsortableStruct{2}), v(unsortableStruct{1}), v(unsortableStruct{3})}, + []reflect.Value{v(unsortableStruct{2}), v(unsortableStruct{1}), v(unsortableStruct{3})}, + }, + } + cs := spew.ConfigState{DisableMethods: false, SpewKeys: false} + helpTestSortValues(tests, &cs, t) +} + +// TestSortValuesWithSpew ensures the sort functionality for relect.Value +// based sorting works as intended when using spew to stringify keys. +func TestSortValuesWithSpew(t *testing.T) { + v := reflect.ValueOf + + a := v("a") + b := v("b") + c := v("c") + tests := []sortTestCase{ + // Ints. + { + []reflect.Value{v(2), v(1), v(3)}, + []reflect.Value{v(1), v(2), v(3)}, + }, + // Strings. + { + []reflect.Value{b, a, c}, + []reflect.Value{a, b, c}, + }, + // SortableStructs. + { + []reflect.Value{v(sortableStruct{2}), v(sortableStruct{1}), v(sortableStruct{3})}, + []reflect.Value{v(sortableStruct{1}), v(sortableStruct{2}), v(sortableStruct{3})}, + }, + // UnsortableStructs. + { + []reflect.Value{v(unsortableStruct{2}), v(unsortableStruct{1}), v(unsortableStruct{3})}, + []reflect.Value{v(unsortableStruct{1}), v(unsortableStruct{2}), v(unsortableStruct{3})}, + }, + } + cs := spew.ConfigState{DisableMethods: true, SpewKeys: true} + helpTestSortValues(tests, &cs, t) +} diff --git a/vendor/github.com/davecgh/go-spew/spew/dump_test.go b/vendor/github.com/davecgh/go-spew/spew/dump_test.go new file mode 100644 index 000000000..5aad9c7af --- /dev/null +++ b/vendor/github.com/davecgh/go-spew/spew/dump_test.go @@ -0,0 +1,1042 @@ +/* + * Copyright (c) 2013-2016 Dave Collins + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* +Test Summary: +NOTE: For each test, a nil pointer, a single pointer and double pointer to the +base test element are also tested to ensure proper indirection across all types. + +- Max int8, int16, int32, int64, int +- Max uint8, uint16, uint32, uint64, uint +- Boolean true and false +- Standard complex64 and complex128 +- Array containing standard ints +- Array containing type with custom formatter on pointer receiver only +- Array containing interfaces +- Array containing bytes +- Slice containing standard float32 values +- Slice containing type with custom formatter on pointer receiver only +- Slice containing interfaces +- Slice containing bytes +- Nil slice +- Standard string +- Nil interface +- Sub-interface +- Map with string keys and int vals +- Map with custom formatter type on pointer receiver only keys and vals +- Map with interface keys and values +- Map with nil interface value +- Struct with primitives +- Struct that contains another struct +- Struct that contains custom type with Stringer pointer interface via both + exported and unexported fields +- Struct that contains embedded struct and field to same struct +- Uintptr to 0 (null pointer) +- Uintptr address of real variable +- Unsafe.Pointer to 0 (null pointer) +- Unsafe.Pointer to address of real variable +- Nil channel +- Standard int channel +- Function with no params and no returns +- Function with param and no returns +- Function with multiple params and multiple returns +- Struct that is circular through self referencing +- Structs that are circular through cross referencing +- Structs that are indirectly circular +- Type that panics in its Stringer interface +*/ + +package spew_test + +import ( + "bytes" + "fmt" + "testing" + "unsafe" + + "github.com/davecgh/go-spew/spew" +) + +// dumpTest is used to describe a test to be performed against the Dump method. +type dumpTest struct { + in interface{} + wants []string +} + +// dumpTests houses all of the tests to be performed against the Dump method. +var dumpTests = make([]dumpTest, 0) + +// addDumpTest is a helper method to append the passed input and desired result +// to dumpTests +func addDumpTest(in interface{}, wants ...string) { + test := dumpTest{in, wants} + dumpTests = append(dumpTests, test) +} + +func addIntDumpTests() { + // Max int8. + v := int8(127) + nv := (*int8)(nil) + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "int8" + vs := "127" + addDumpTest(v, "("+vt+") "+vs+"\n") + addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") + addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") + addDumpTest(nv, "(*"+vt+")()\n") + + // Max int16. + v2 := int16(32767) + nv2 := (*int16)(nil) + pv2 := &v2 + v2Addr := fmt.Sprintf("%p", pv2) + pv2Addr := fmt.Sprintf("%p", &pv2) + v2t := "int16" + v2s := "32767" + addDumpTest(v2, "("+v2t+") "+v2s+"\n") + addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") + addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") + addDumpTest(nv2, "(*"+v2t+")()\n") + + // Max int32. + v3 := int32(2147483647) + nv3 := (*int32)(nil) + pv3 := &v3 + v3Addr := fmt.Sprintf("%p", pv3) + pv3Addr := fmt.Sprintf("%p", &pv3) + v3t := "int32" + v3s := "2147483647" + addDumpTest(v3, "("+v3t+") "+v3s+"\n") + addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3s+")\n") + addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3s+")\n") + addDumpTest(nv3, "(*"+v3t+")()\n") + + // Max int64. + v4 := int64(9223372036854775807) + nv4 := (*int64)(nil) + pv4 := &v4 + v4Addr := fmt.Sprintf("%p", pv4) + pv4Addr := fmt.Sprintf("%p", &pv4) + v4t := "int64" + v4s := "9223372036854775807" + addDumpTest(v4, "("+v4t+") "+v4s+"\n") + addDumpTest(pv4, "(*"+v4t+")("+v4Addr+")("+v4s+")\n") + addDumpTest(&pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")("+v4s+")\n") + addDumpTest(nv4, "(*"+v4t+")()\n") + + // Max int. + v5 := int(2147483647) + nv5 := (*int)(nil) + pv5 := &v5 + v5Addr := fmt.Sprintf("%p", pv5) + pv5Addr := fmt.Sprintf("%p", &pv5) + v5t := "int" + v5s := "2147483647" + addDumpTest(v5, "("+v5t+") "+v5s+"\n") + addDumpTest(pv5, "(*"+v5t+")("+v5Addr+")("+v5s+")\n") + addDumpTest(&pv5, "(**"+v5t+")("+pv5Addr+"->"+v5Addr+")("+v5s+")\n") + addDumpTest(nv5, "(*"+v5t+")()\n") +} + +func addUintDumpTests() { + // Max uint8. + v := uint8(255) + nv := (*uint8)(nil) + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "uint8" + vs := "255" + addDumpTest(v, "("+vt+") "+vs+"\n") + addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") + addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") + addDumpTest(nv, "(*"+vt+")()\n") + + // Max uint16. + v2 := uint16(65535) + nv2 := (*uint16)(nil) + pv2 := &v2 + v2Addr := fmt.Sprintf("%p", pv2) + pv2Addr := fmt.Sprintf("%p", &pv2) + v2t := "uint16" + v2s := "65535" + addDumpTest(v2, "("+v2t+") "+v2s+"\n") + addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") + addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") + addDumpTest(nv2, "(*"+v2t+")()\n") + + // Max uint32. + v3 := uint32(4294967295) + nv3 := (*uint32)(nil) + pv3 := &v3 + v3Addr := fmt.Sprintf("%p", pv3) + pv3Addr := fmt.Sprintf("%p", &pv3) + v3t := "uint32" + v3s := "4294967295" + addDumpTest(v3, "("+v3t+") "+v3s+"\n") + addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3s+")\n") + addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3s+")\n") + addDumpTest(nv3, "(*"+v3t+")()\n") + + // Max uint64. + v4 := uint64(18446744073709551615) + nv4 := (*uint64)(nil) + pv4 := &v4 + v4Addr := fmt.Sprintf("%p", pv4) + pv4Addr := fmt.Sprintf("%p", &pv4) + v4t := "uint64" + v4s := "18446744073709551615" + addDumpTest(v4, "("+v4t+") "+v4s+"\n") + addDumpTest(pv4, "(*"+v4t+")("+v4Addr+")("+v4s+")\n") + addDumpTest(&pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")("+v4s+")\n") + addDumpTest(nv4, "(*"+v4t+")()\n") + + // Max uint. + v5 := uint(4294967295) + nv5 := (*uint)(nil) + pv5 := &v5 + v5Addr := fmt.Sprintf("%p", pv5) + pv5Addr := fmt.Sprintf("%p", &pv5) + v5t := "uint" + v5s := "4294967295" + addDumpTest(v5, "("+v5t+") "+v5s+"\n") + addDumpTest(pv5, "(*"+v5t+")("+v5Addr+")("+v5s+")\n") + addDumpTest(&pv5, "(**"+v5t+")("+pv5Addr+"->"+v5Addr+")("+v5s+")\n") + addDumpTest(nv5, "(*"+v5t+")()\n") +} + +func addBoolDumpTests() { + // Boolean true. + v := bool(true) + nv := (*bool)(nil) + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "bool" + vs := "true" + addDumpTest(v, "("+vt+") "+vs+"\n") + addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") + addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") + addDumpTest(nv, "(*"+vt+")()\n") + + // Boolean false. + v2 := bool(false) + pv2 := &v2 + v2Addr := fmt.Sprintf("%p", pv2) + pv2Addr := fmt.Sprintf("%p", &pv2) + v2t := "bool" + v2s := "false" + addDumpTest(v2, "("+v2t+") "+v2s+"\n") + addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") + addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") +} + +func addFloatDumpTests() { + // Standard float32. + v := float32(3.1415) + nv := (*float32)(nil) + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "float32" + vs := "3.1415" + addDumpTest(v, "("+vt+") "+vs+"\n") + addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") + addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") + addDumpTest(nv, "(*"+vt+")()\n") + + // Standard float64. + v2 := float64(3.1415926) + nv2 := (*float64)(nil) + pv2 := &v2 + v2Addr := fmt.Sprintf("%p", pv2) + pv2Addr := fmt.Sprintf("%p", &pv2) + v2t := "float64" + v2s := "3.1415926" + addDumpTest(v2, "("+v2t+") "+v2s+"\n") + addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") + addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") + addDumpTest(nv2, "(*"+v2t+")()\n") +} + +func addComplexDumpTests() { + // Standard complex64. + v := complex(float32(6), -2) + nv := (*complex64)(nil) + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "complex64" + vs := "(6-2i)" + addDumpTest(v, "("+vt+") "+vs+"\n") + addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") + addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") + addDumpTest(nv, "(*"+vt+")()\n") + + // Standard complex128. + v2 := complex(float64(-6), 2) + nv2 := (*complex128)(nil) + pv2 := &v2 + v2Addr := fmt.Sprintf("%p", pv2) + pv2Addr := fmt.Sprintf("%p", &pv2) + v2t := "complex128" + v2s := "(-6+2i)" + addDumpTest(v2, "("+v2t+") "+v2s+"\n") + addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") + addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") + addDumpTest(nv2, "(*"+v2t+")()\n") +} + +func addArrayDumpTests() { + // Array containing standard ints. + v := [3]int{1, 2, 3} + vLen := fmt.Sprintf("%d", len(v)) + vCap := fmt.Sprintf("%d", cap(v)) + nv := (*[3]int)(nil) + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "int" + vs := "(len=" + vLen + " cap=" + vCap + ") {\n (" + vt + ") 1,\n (" + + vt + ") 2,\n (" + vt + ") 3\n}" + addDumpTest(v, "([3]"+vt+") "+vs+"\n") + addDumpTest(pv, "(*[3]"+vt+")("+vAddr+")("+vs+")\n") + addDumpTest(&pv, "(**[3]"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") + addDumpTest(nv, "(*[3]"+vt+")()\n") + + // Array containing type with custom formatter on pointer receiver only. + v2i0 := pstringer("1") + v2i1 := pstringer("2") + v2i2 := pstringer("3") + v2 := [3]pstringer{v2i0, v2i1, v2i2} + v2i0Len := fmt.Sprintf("%d", len(v2i0)) + v2i1Len := fmt.Sprintf("%d", len(v2i1)) + v2i2Len := fmt.Sprintf("%d", len(v2i2)) + v2Len := fmt.Sprintf("%d", len(v2)) + v2Cap := fmt.Sprintf("%d", cap(v2)) + nv2 := (*[3]pstringer)(nil) + pv2 := &v2 + v2Addr := fmt.Sprintf("%p", pv2) + pv2Addr := fmt.Sprintf("%p", &pv2) + v2t := "spew_test.pstringer" + v2sp := "(len=" + v2Len + " cap=" + v2Cap + ") {\n (" + v2t + + ") (len=" + v2i0Len + ") stringer 1,\n (" + v2t + + ") (len=" + v2i1Len + ") stringer 2,\n (" + v2t + + ") (len=" + v2i2Len + ") " + "stringer 3\n}" + v2s := v2sp + if spew.UnsafeDisabled { + v2s = "(len=" + v2Len + " cap=" + v2Cap + ") {\n (" + v2t + + ") (len=" + v2i0Len + ") \"1\",\n (" + v2t + ") (len=" + + v2i1Len + ") \"2\",\n (" + v2t + ") (len=" + v2i2Len + + ") " + "\"3\"\n}" + } + addDumpTest(v2, "([3]"+v2t+") "+v2s+"\n") + addDumpTest(pv2, "(*[3]"+v2t+")("+v2Addr+")("+v2sp+")\n") + addDumpTest(&pv2, "(**[3]"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2sp+")\n") + addDumpTest(nv2, "(*[3]"+v2t+")()\n") + + // Array containing interfaces. + v3i0 := "one" + v3 := [3]interface{}{v3i0, int(2), uint(3)} + v3i0Len := fmt.Sprintf("%d", len(v3i0)) + v3Len := fmt.Sprintf("%d", len(v3)) + v3Cap := fmt.Sprintf("%d", cap(v3)) + nv3 := (*[3]interface{})(nil) + pv3 := &v3 + v3Addr := fmt.Sprintf("%p", pv3) + pv3Addr := fmt.Sprintf("%p", &pv3) + v3t := "[3]interface {}" + v3t2 := "string" + v3t3 := "int" + v3t4 := "uint" + v3s := "(len=" + v3Len + " cap=" + v3Cap + ") {\n (" + v3t2 + ") " + + "(len=" + v3i0Len + ") \"one\",\n (" + v3t3 + ") 2,\n (" + + v3t4 + ") 3\n}" + addDumpTest(v3, "("+v3t+") "+v3s+"\n") + addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3s+")\n") + addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3s+")\n") + addDumpTest(nv3, "(*"+v3t+")()\n") + + // Array containing bytes. + v4 := [34]byte{ + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, + 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, + 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, + 0x31, 0x32, + } + v4Len := fmt.Sprintf("%d", len(v4)) + v4Cap := fmt.Sprintf("%d", cap(v4)) + nv4 := (*[34]byte)(nil) + pv4 := &v4 + v4Addr := fmt.Sprintf("%p", pv4) + pv4Addr := fmt.Sprintf("%p", &pv4) + v4t := "[34]uint8" + v4s := "(len=" + v4Len + " cap=" + v4Cap + ") " + + "{\n 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20" + + " |............... |\n" + + " 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30" + + " |!\"#$%&'()*+,-./0|\n" + + " 00000020 31 32 " + + " |12|\n}" + addDumpTest(v4, "("+v4t+") "+v4s+"\n") + addDumpTest(pv4, "(*"+v4t+")("+v4Addr+")("+v4s+")\n") + addDumpTest(&pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")("+v4s+")\n") + addDumpTest(nv4, "(*"+v4t+")()\n") +} + +func addSliceDumpTests() { + // Slice containing standard float32 values. + v := []float32{3.14, 6.28, 12.56} + vLen := fmt.Sprintf("%d", len(v)) + vCap := fmt.Sprintf("%d", cap(v)) + nv := (*[]float32)(nil) + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "float32" + vs := "(len=" + vLen + " cap=" + vCap + ") {\n (" + vt + ") 3.14,\n (" + + vt + ") 6.28,\n (" + vt + ") 12.56\n}" + addDumpTest(v, "([]"+vt+") "+vs+"\n") + addDumpTest(pv, "(*[]"+vt+")("+vAddr+")("+vs+")\n") + addDumpTest(&pv, "(**[]"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") + addDumpTest(nv, "(*[]"+vt+")()\n") + + // Slice containing type with custom formatter on pointer receiver only. + v2i0 := pstringer("1") + v2i1 := pstringer("2") + v2i2 := pstringer("3") + v2 := []pstringer{v2i0, v2i1, v2i2} + v2i0Len := fmt.Sprintf("%d", len(v2i0)) + v2i1Len := fmt.Sprintf("%d", len(v2i1)) + v2i2Len := fmt.Sprintf("%d", len(v2i2)) + v2Len := fmt.Sprintf("%d", len(v2)) + v2Cap := fmt.Sprintf("%d", cap(v2)) + nv2 := (*[]pstringer)(nil) + pv2 := &v2 + v2Addr := fmt.Sprintf("%p", pv2) + pv2Addr := fmt.Sprintf("%p", &pv2) + v2t := "spew_test.pstringer" + v2s := "(len=" + v2Len + " cap=" + v2Cap + ") {\n (" + v2t + ") (len=" + + v2i0Len + ") stringer 1,\n (" + v2t + ") (len=" + v2i1Len + + ") stringer 2,\n (" + v2t + ") (len=" + v2i2Len + ") " + + "stringer 3\n}" + addDumpTest(v2, "([]"+v2t+") "+v2s+"\n") + addDumpTest(pv2, "(*[]"+v2t+")("+v2Addr+")("+v2s+")\n") + addDumpTest(&pv2, "(**[]"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") + addDumpTest(nv2, "(*[]"+v2t+")()\n") + + // Slice containing interfaces. + v3i0 := "one" + v3 := []interface{}{v3i0, int(2), uint(3), nil} + v3i0Len := fmt.Sprintf("%d", len(v3i0)) + v3Len := fmt.Sprintf("%d", len(v3)) + v3Cap := fmt.Sprintf("%d", cap(v3)) + nv3 := (*[]interface{})(nil) + pv3 := &v3 + v3Addr := fmt.Sprintf("%p", pv3) + pv3Addr := fmt.Sprintf("%p", &pv3) + v3t := "[]interface {}" + v3t2 := "string" + v3t3 := "int" + v3t4 := "uint" + v3t5 := "interface {}" + v3s := "(len=" + v3Len + " cap=" + v3Cap + ") {\n (" + v3t2 + ") " + + "(len=" + v3i0Len + ") \"one\",\n (" + v3t3 + ") 2,\n (" + + v3t4 + ") 3,\n (" + v3t5 + ") \n}" + addDumpTest(v3, "("+v3t+") "+v3s+"\n") + addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3s+")\n") + addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3s+")\n") + addDumpTest(nv3, "(*"+v3t+")()\n") + + // Slice containing bytes. + v4 := []byte{ + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, + 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, + 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, + 0x31, 0x32, + } + v4Len := fmt.Sprintf("%d", len(v4)) + v4Cap := fmt.Sprintf("%d", cap(v4)) + nv4 := (*[]byte)(nil) + pv4 := &v4 + v4Addr := fmt.Sprintf("%p", pv4) + pv4Addr := fmt.Sprintf("%p", &pv4) + v4t := "[]uint8" + v4s := "(len=" + v4Len + " cap=" + v4Cap + ") " + + "{\n 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20" + + " |............... |\n" + + " 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30" + + " |!\"#$%&'()*+,-./0|\n" + + " 00000020 31 32 " + + " |12|\n}" + addDumpTest(v4, "("+v4t+") "+v4s+"\n") + addDumpTest(pv4, "(*"+v4t+")("+v4Addr+")("+v4s+")\n") + addDumpTest(&pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")("+v4s+")\n") + addDumpTest(nv4, "(*"+v4t+")()\n") + + // Nil slice. + v5 := []int(nil) + nv5 := (*[]int)(nil) + pv5 := &v5 + v5Addr := fmt.Sprintf("%p", pv5) + pv5Addr := fmt.Sprintf("%p", &pv5) + v5t := "[]int" + v5s := "" + addDumpTest(v5, "("+v5t+") "+v5s+"\n") + addDumpTest(pv5, "(*"+v5t+")("+v5Addr+")("+v5s+")\n") + addDumpTest(&pv5, "(**"+v5t+")("+pv5Addr+"->"+v5Addr+")("+v5s+")\n") + addDumpTest(nv5, "(*"+v5t+")()\n") +} + +func addStringDumpTests() { + // Standard string. + v := "test" + vLen := fmt.Sprintf("%d", len(v)) + nv := (*string)(nil) + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "string" + vs := "(len=" + vLen + ") \"test\"" + addDumpTest(v, "("+vt+") "+vs+"\n") + addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") + addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") + addDumpTest(nv, "(*"+vt+")()\n") +} + +func addInterfaceDumpTests() { + // Nil interface. + var v interface{} + nv := (*interface{})(nil) + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "interface {}" + vs := "" + addDumpTest(v, "("+vt+") "+vs+"\n") + addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") + addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") + addDumpTest(nv, "(*"+vt+")()\n") + + // Sub-interface. + v2 := interface{}(uint16(65535)) + pv2 := &v2 + v2Addr := fmt.Sprintf("%p", pv2) + pv2Addr := fmt.Sprintf("%p", &pv2) + v2t := "uint16" + v2s := "65535" + addDumpTest(v2, "("+v2t+") "+v2s+"\n") + addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") + addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") +} + +func addMapDumpTests() { + // Map with string keys and int vals. + k := "one" + kk := "two" + m := map[string]int{k: 1, kk: 2} + klen := fmt.Sprintf("%d", len(k)) // not kLen to shut golint up + kkLen := fmt.Sprintf("%d", len(kk)) + mLen := fmt.Sprintf("%d", len(m)) + nilMap := map[string]int(nil) + nm := (*map[string]int)(nil) + pm := &m + mAddr := fmt.Sprintf("%p", pm) + pmAddr := fmt.Sprintf("%p", &pm) + mt := "map[string]int" + mt1 := "string" + mt2 := "int" + ms := "(len=" + mLen + ") {\n (" + mt1 + ") (len=" + klen + ") " + + "\"one\": (" + mt2 + ") 1,\n (" + mt1 + ") (len=" + kkLen + + ") \"two\": (" + mt2 + ") 2\n}" + ms2 := "(len=" + mLen + ") {\n (" + mt1 + ") (len=" + kkLen + ") " + + "\"two\": (" + mt2 + ") 2,\n (" + mt1 + ") (len=" + klen + + ") \"one\": (" + mt2 + ") 1\n}" + addDumpTest(m, "("+mt+") "+ms+"\n", "("+mt+") "+ms2+"\n") + addDumpTest(pm, "(*"+mt+")("+mAddr+")("+ms+")\n", + "(*"+mt+")("+mAddr+")("+ms2+")\n") + addDumpTest(&pm, "(**"+mt+")("+pmAddr+"->"+mAddr+")("+ms+")\n", + "(**"+mt+")("+pmAddr+"->"+mAddr+")("+ms2+")\n") + addDumpTest(nm, "(*"+mt+")()\n") + addDumpTest(nilMap, "("+mt+") \n") + + // Map with custom formatter type on pointer receiver only keys and vals. + k2 := pstringer("one") + v2 := pstringer("1") + m2 := map[pstringer]pstringer{k2: v2} + k2Len := fmt.Sprintf("%d", len(k2)) + v2Len := fmt.Sprintf("%d", len(v2)) + m2Len := fmt.Sprintf("%d", len(m2)) + nilMap2 := map[pstringer]pstringer(nil) + nm2 := (*map[pstringer]pstringer)(nil) + pm2 := &m2 + m2Addr := fmt.Sprintf("%p", pm2) + pm2Addr := fmt.Sprintf("%p", &pm2) + m2t := "map[spew_test.pstringer]spew_test.pstringer" + m2t1 := "spew_test.pstringer" + m2t2 := "spew_test.pstringer" + m2s := "(len=" + m2Len + ") {\n (" + m2t1 + ") (len=" + k2Len + ") " + + "stringer one: (" + m2t2 + ") (len=" + v2Len + ") stringer 1\n}" + if spew.UnsafeDisabled { + m2s = "(len=" + m2Len + ") {\n (" + m2t1 + ") (len=" + k2Len + + ") " + "\"one\": (" + m2t2 + ") (len=" + v2Len + + ") \"1\"\n}" + } + addDumpTest(m2, "("+m2t+") "+m2s+"\n") + addDumpTest(pm2, "(*"+m2t+")("+m2Addr+")("+m2s+")\n") + addDumpTest(&pm2, "(**"+m2t+")("+pm2Addr+"->"+m2Addr+")("+m2s+")\n") + addDumpTest(nm2, "(*"+m2t+")()\n") + addDumpTest(nilMap2, "("+m2t+") \n") + + // Map with interface keys and values. + k3 := "one" + k3Len := fmt.Sprintf("%d", len(k3)) + m3 := map[interface{}]interface{}{k3: 1} + m3Len := fmt.Sprintf("%d", len(m3)) + nilMap3 := map[interface{}]interface{}(nil) + nm3 := (*map[interface{}]interface{})(nil) + pm3 := &m3 + m3Addr := fmt.Sprintf("%p", pm3) + pm3Addr := fmt.Sprintf("%p", &pm3) + m3t := "map[interface {}]interface {}" + m3t1 := "string" + m3t2 := "int" + m3s := "(len=" + m3Len + ") {\n (" + m3t1 + ") (len=" + k3Len + ") " + + "\"one\": (" + m3t2 + ") 1\n}" + addDumpTest(m3, "("+m3t+") "+m3s+"\n") + addDumpTest(pm3, "(*"+m3t+")("+m3Addr+")("+m3s+")\n") + addDumpTest(&pm3, "(**"+m3t+")("+pm3Addr+"->"+m3Addr+")("+m3s+")\n") + addDumpTest(nm3, "(*"+m3t+")()\n") + addDumpTest(nilMap3, "("+m3t+") \n") + + // Map with nil interface value. + k4 := "nil" + k4Len := fmt.Sprintf("%d", len(k4)) + m4 := map[string]interface{}{k4: nil} + m4Len := fmt.Sprintf("%d", len(m4)) + nilMap4 := map[string]interface{}(nil) + nm4 := (*map[string]interface{})(nil) + pm4 := &m4 + m4Addr := fmt.Sprintf("%p", pm4) + pm4Addr := fmt.Sprintf("%p", &pm4) + m4t := "map[string]interface {}" + m4t1 := "string" + m4t2 := "interface {}" + m4s := "(len=" + m4Len + ") {\n (" + m4t1 + ") (len=" + k4Len + ")" + + " \"nil\": (" + m4t2 + ") \n}" + addDumpTest(m4, "("+m4t+") "+m4s+"\n") + addDumpTest(pm4, "(*"+m4t+")("+m4Addr+")("+m4s+")\n") + addDumpTest(&pm4, "(**"+m4t+")("+pm4Addr+"->"+m4Addr+")("+m4s+")\n") + addDumpTest(nm4, "(*"+m4t+")()\n") + addDumpTest(nilMap4, "("+m4t+") \n") +} + +func addStructDumpTests() { + // Struct with primitives. + type s1 struct { + a int8 + b uint8 + } + v := s1{127, 255} + nv := (*s1)(nil) + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "spew_test.s1" + vt2 := "int8" + vt3 := "uint8" + vs := "{\n a: (" + vt2 + ") 127,\n b: (" + vt3 + ") 255\n}" + addDumpTest(v, "("+vt+") "+vs+"\n") + addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") + addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") + addDumpTest(nv, "(*"+vt+")()\n") + + // Struct that contains another struct. + type s2 struct { + s1 s1 + b bool + } + v2 := s2{s1{127, 255}, true} + nv2 := (*s2)(nil) + pv2 := &v2 + v2Addr := fmt.Sprintf("%p", pv2) + pv2Addr := fmt.Sprintf("%p", &pv2) + v2t := "spew_test.s2" + v2t2 := "spew_test.s1" + v2t3 := "int8" + v2t4 := "uint8" + v2t5 := "bool" + v2s := "{\n s1: (" + v2t2 + ") {\n a: (" + v2t3 + ") 127,\n b: (" + + v2t4 + ") 255\n },\n b: (" + v2t5 + ") true\n}" + addDumpTest(v2, "("+v2t+") "+v2s+"\n") + addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") + addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") + addDumpTest(nv2, "(*"+v2t+")()\n") + + // Struct that contains custom type with Stringer pointer interface via both + // exported and unexported fields. + type s3 struct { + s pstringer + S pstringer + } + v3 := s3{"test", "test2"} + nv3 := (*s3)(nil) + pv3 := &v3 + v3Addr := fmt.Sprintf("%p", pv3) + pv3Addr := fmt.Sprintf("%p", &pv3) + v3t := "spew_test.s3" + v3t2 := "spew_test.pstringer" + v3s := "{\n s: (" + v3t2 + ") (len=4) stringer test,\n S: (" + v3t2 + + ") (len=5) stringer test2\n}" + v3sp := v3s + if spew.UnsafeDisabled { + v3s = "{\n s: (" + v3t2 + ") (len=4) \"test\",\n S: (" + + v3t2 + ") (len=5) \"test2\"\n}" + v3sp = "{\n s: (" + v3t2 + ") (len=4) \"test\",\n S: (" + + v3t2 + ") (len=5) stringer test2\n}" + } + addDumpTest(v3, "("+v3t+") "+v3s+"\n") + addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3sp+")\n") + addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3sp+")\n") + addDumpTest(nv3, "(*"+v3t+")()\n") + + // Struct that contains embedded struct and field to same struct. + e := embed{"embedstr"} + eLen := fmt.Sprintf("%d", len("embedstr")) + v4 := embedwrap{embed: &e, e: &e} + nv4 := (*embedwrap)(nil) + pv4 := &v4 + eAddr := fmt.Sprintf("%p", &e) + v4Addr := fmt.Sprintf("%p", pv4) + pv4Addr := fmt.Sprintf("%p", &pv4) + v4t := "spew_test.embedwrap" + v4t2 := "spew_test.embed" + v4t3 := "string" + v4s := "{\n embed: (*" + v4t2 + ")(" + eAddr + ")({\n a: (" + v4t3 + + ") (len=" + eLen + ") \"embedstr\"\n }),\n e: (*" + v4t2 + + ")(" + eAddr + ")({\n a: (" + v4t3 + ") (len=" + eLen + ")" + + " \"embedstr\"\n })\n}" + addDumpTest(v4, "("+v4t+") "+v4s+"\n") + addDumpTest(pv4, "(*"+v4t+")("+v4Addr+")("+v4s+")\n") + addDumpTest(&pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")("+v4s+")\n") + addDumpTest(nv4, "(*"+v4t+")()\n") +} + +func addUintptrDumpTests() { + // Null pointer. + v := uintptr(0) + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "uintptr" + vs := "" + addDumpTest(v, "("+vt+") "+vs+"\n") + addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") + addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") + + // Address of real variable. + i := 1 + v2 := uintptr(unsafe.Pointer(&i)) + nv2 := (*uintptr)(nil) + pv2 := &v2 + v2Addr := fmt.Sprintf("%p", pv2) + pv2Addr := fmt.Sprintf("%p", &pv2) + v2t := "uintptr" + v2s := fmt.Sprintf("%p", &i) + addDumpTest(v2, "("+v2t+") "+v2s+"\n") + addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") + addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") + addDumpTest(nv2, "(*"+v2t+")()\n") +} + +func addUnsafePointerDumpTests() { + // Null pointer. + v := unsafe.Pointer(uintptr(0)) + nv := (*unsafe.Pointer)(nil) + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "unsafe.Pointer" + vs := "" + addDumpTest(v, "("+vt+") "+vs+"\n") + addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") + addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") + addDumpTest(nv, "(*"+vt+")()\n") + + // Address of real variable. + i := 1 + v2 := unsafe.Pointer(&i) + pv2 := &v2 + v2Addr := fmt.Sprintf("%p", pv2) + pv2Addr := fmt.Sprintf("%p", &pv2) + v2t := "unsafe.Pointer" + v2s := fmt.Sprintf("%p", &i) + addDumpTest(v2, "("+v2t+") "+v2s+"\n") + addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") + addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") + addDumpTest(nv, "(*"+vt+")()\n") +} + +func addChanDumpTests() { + // Nil channel. + var v chan int + pv := &v + nv := (*chan int)(nil) + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "chan int" + vs := "" + addDumpTest(v, "("+vt+") "+vs+"\n") + addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") + addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") + addDumpTest(nv, "(*"+vt+")()\n") + + // Real channel. + v2 := make(chan int) + pv2 := &v2 + v2Addr := fmt.Sprintf("%p", pv2) + pv2Addr := fmt.Sprintf("%p", &pv2) + v2t := "chan int" + v2s := fmt.Sprintf("%p", v2) + addDumpTest(v2, "("+v2t+") "+v2s+"\n") + addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") + addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") +} + +func addFuncDumpTests() { + // Function with no params and no returns. + v := addIntDumpTests + nv := (*func())(nil) + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "func()" + vs := fmt.Sprintf("%p", v) + addDumpTest(v, "("+vt+") "+vs+"\n") + addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") + addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") + addDumpTest(nv, "(*"+vt+")()\n") + + // Function with param and no returns. + v2 := TestDump + nv2 := (*func(*testing.T))(nil) + pv2 := &v2 + v2Addr := fmt.Sprintf("%p", pv2) + pv2Addr := fmt.Sprintf("%p", &pv2) + v2t := "func(*testing.T)" + v2s := fmt.Sprintf("%p", v2) + addDumpTest(v2, "("+v2t+") "+v2s+"\n") + addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") + addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") + addDumpTest(nv2, "(*"+v2t+")()\n") + + // Function with multiple params and multiple returns. + var v3 = func(i int, s string) (b bool, err error) { + return true, nil + } + nv3 := (*func(int, string) (bool, error))(nil) + pv3 := &v3 + v3Addr := fmt.Sprintf("%p", pv3) + pv3Addr := fmt.Sprintf("%p", &pv3) + v3t := "func(int, string) (bool, error)" + v3s := fmt.Sprintf("%p", v3) + addDumpTest(v3, "("+v3t+") "+v3s+"\n") + addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3s+")\n") + addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3s+")\n") + addDumpTest(nv3, "(*"+v3t+")()\n") +} + +func addCircularDumpTests() { + // Struct that is circular through self referencing. + type circular struct { + c *circular + } + v := circular{nil} + v.c = &v + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "spew_test.circular" + vs := "{\n c: (*" + vt + ")(" + vAddr + ")({\n c: (*" + vt + ")(" + + vAddr + ")()\n })\n}" + vs2 := "{\n c: (*" + vt + ")(" + vAddr + ")()\n}" + addDumpTest(v, "("+vt+") "+vs+"\n") + addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs2+")\n") + addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs2+")\n") + + // Structs that are circular through cross referencing. + v2 := xref1{nil} + ts2 := xref2{&v2} + v2.ps2 = &ts2 + pv2 := &v2 + ts2Addr := fmt.Sprintf("%p", &ts2) + v2Addr := fmt.Sprintf("%p", pv2) + pv2Addr := fmt.Sprintf("%p", &pv2) + v2t := "spew_test.xref1" + v2t2 := "spew_test.xref2" + v2s := "{\n ps2: (*" + v2t2 + ")(" + ts2Addr + ")({\n ps1: (*" + v2t + + ")(" + v2Addr + ")({\n ps2: (*" + v2t2 + ")(" + ts2Addr + + ")()\n })\n })\n}" + v2s2 := "{\n ps2: (*" + v2t2 + ")(" + ts2Addr + ")({\n ps1: (*" + v2t + + ")(" + v2Addr + ")()\n })\n}" + addDumpTest(v2, "("+v2t+") "+v2s+"\n") + addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s2+")\n") + addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s2+")\n") + + // Structs that are indirectly circular. + v3 := indirCir1{nil} + tic2 := indirCir2{nil} + tic3 := indirCir3{&v3} + tic2.ps3 = &tic3 + v3.ps2 = &tic2 + pv3 := &v3 + tic2Addr := fmt.Sprintf("%p", &tic2) + tic3Addr := fmt.Sprintf("%p", &tic3) + v3Addr := fmt.Sprintf("%p", pv3) + pv3Addr := fmt.Sprintf("%p", &pv3) + v3t := "spew_test.indirCir1" + v3t2 := "spew_test.indirCir2" + v3t3 := "spew_test.indirCir3" + v3s := "{\n ps2: (*" + v3t2 + ")(" + tic2Addr + ")({\n ps3: (*" + v3t3 + + ")(" + tic3Addr + ")({\n ps1: (*" + v3t + ")(" + v3Addr + + ")({\n ps2: (*" + v3t2 + ")(" + tic2Addr + + ")()\n })\n })\n })\n}" + v3s2 := "{\n ps2: (*" + v3t2 + ")(" + tic2Addr + ")({\n ps3: (*" + v3t3 + + ")(" + tic3Addr + ")({\n ps1: (*" + v3t + ")(" + v3Addr + + ")()\n })\n })\n}" + addDumpTest(v3, "("+v3t+") "+v3s+"\n") + addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3s2+")\n") + addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3s2+")\n") +} + +func addPanicDumpTests() { + // Type that panics in its Stringer interface. + v := panicer(127) + nv := (*panicer)(nil) + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "spew_test.panicer" + vs := "(PANIC=test panic)127" + addDumpTest(v, "("+vt+") "+vs+"\n") + addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") + addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") + addDumpTest(nv, "(*"+vt+")()\n") +} + +func addErrorDumpTests() { + // Type that has a custom Error interface. + v := customError(127) + nv := (*customError)(nil) + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "spew_test.customError" + vs := "error: 127" + addDumpTest(v, "("+vt+") "+vs+"\n") + addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") + addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") + addDumpTest(nv, "(*"+vt+")()\n") +} + +// TestDump executes all of the tests described by dumpTests. +func TestDump(t *testing.T) { + // Setup tests. + addIntDumpTests() + addUintDumpTests() + addBoolDumpTests() + addFloatDumpTests() + addComplexDumpTests() + addArrayDumpTests() + addSliceDumpTests() + addStringDumpTests() + addInterfaceDumpTests() + addMapDumpTests() + addStructDumpTests() + addUintptrDumpTests() + addUnsafePointerDumpTests() + addChanDumpTests() + addFuncDumpTests() + addCircularDumpTests() + addPanicDumpTests() + addErrorDumpTests() + addCgoDumpTests() + + t.Logf("Running %d tests", len(dumpTests)) + for i, test := range dumpTests { + buf := new(bytes.Buffer) + spew.Fdump(buf, test.in) + s := buf.String() + if testFailed(s, test.wants) { + t.Errorf("Dump #%d\n got: %s %s", i, s, stringizeWants(test.wants)) + continue + } + } +} + +func TestDumpSortedKeys(t *testing.T) { + cfg := spew.ConfigState{SortKeys: true} + s := cfg.Sdump(map[int]string{1: "1", 3: "3", 2: "2"}) + expected := "(map[int]string) (len=3) {\n(int) 1: (string) (len=1) " + + "\"1\",\n(int) 2: (string) (len=1) \"2\",\n(int) 3: (string) " + + "(len=1) \"3\"\n" + + "}\n" + if s != expected { + t.Errorf("Sorted keys mismatch:\n %v %v", s, expected) + } + + s = cfg.Sdump(map[stringer]int{"1": 1, "3": 3, "2": 2}) + expected = "(map[spew_test.stringer]int) (len=3) {\n" + + "(spew_test.stringer) (len=1) stringer 1: (int) 1,\n" + + "(spew_test.stringer) (len=1) stringer 2: (int) 2,\n" + + "(spew_test.stringer) (len=1) stringer 3: (int) 3\n" + + "}\n" + if s != expected { + t.Errorf("Sorted keys mismatch:\n %v %v", s, expected) + } + + s = cfg.Sdump(map[pstringer]int{pstringer("1"): 1, pstringer("3"): 3, pstringer("2"): 2}) + expected = "(map[spew_test.pstringer]int) (len=3) {\n" + + "(spew_test.pstringer) (len=1) stringer 1: (int) 1,\n" + + "(spew_test.pstringer) (len=1) stringer 2: (int) 2,\n" + + "(spew_test.pstringer) (len=1) stringer 3: (int) 3\n" + + "}\n" + if spew.UnsafeDisabled { + expected = "(map[spew_test.pstringer]int) (len=3) {\n" + + "(spew_test.pstringer) (len=1) \"1\": (int) 1,\n" + + "(spew_test.pstringer) (len=1) \"2\": (int) 2,\n" + + "(spew_test.pstringer) (len=1) \"3\": (int) 3\n" + + "}\n" + } + if s != expected { + t.Errorf("Sorted keys mismatch:\n %v %v", s, expected) + } + + s = cfg.Sdump(map[customError]int{customError(1): 1, customError(3): 3, customError(2): 2}) + expected = "(map[spew_test.customError]int) (len=3) {\n" + + "(spew_test.customError) error: 1: (int) 1,\n" + + "(spew_test.customError) error: 2: (int) 2,\n" + + "(spew_test.customError) error: 3: (int) 3\n" + + "}\n" + if s != expected { + t.Errorf("Sorted keys mismatch:\n %v %v", s, expected) + } + +} diff --git a/vendor/github.com/davecgh/go-spew/spew/dumpcgo_test.go b/vendor/github.com/davecgh/go-spew/spew/dumpcgo_test.go new file mode 100644 index 000000000..6ab180809 --- /dev/null +++ b/vendor/github.com/davecgh/go-spew/spew/dumpcgo_test.go @@ -0,0 +1,99 @@ +// Copyright (c) 2013-2016 Dave Collins +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +// NOTE: Due to the following build constraints, this file will only be compiled +// when both cgo is supported and "-tags testcgo" is added to the go test +// command line. This means the cgo tests are only added (and hence run) when +// specifially requested. This configuration is used because spew itself +// does not require cgo to run even though it does handle certain cgo types +// specially. Rather than forcing all clients to require cgo and an external +// C compiler just to run the tests, this scheme makes them optional. +// +build cgo,testcgo + +package spew_test + +import ( + "fmt" + + "github.com/davecgh/go-spew/spew/testdata" +) + +func addCgoDumpTests() { + // C char pointer. + v := testdata.GetCgoCharPointer() + nv := testdata.GetCgoNullCharPointer() + pv := &v + vcAddr := fmt.Sprintf("%p", v) + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "*testdata._Ctype_char" + vs := "116" + addDumpTest(v, "("+vt+")("+vcAddr+")("+vs+")\n") + addDumpTest(pv, "(*"+vt+")("+vAddr+"->"+vcAddr+")("+vs+")\n") + addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+"->"+vcAddr+")("+vs+")\n") + addDumpTest(nv, "("+vt+")()\n") + + // C char array. + v2, v2l, v2c := testdata.GetCgoCharArray() + v2Len := fmt.Sprintf("%d", v2l) + v2Cap := fmt.Sprintf("%d", v2c) + v2t := "[6]testdata._Ctype_char" + v2s := "(len=" + v2Len + " cap=" + v2Cap + ") " + + "{\n 00000000 74 65 73 74 32 00 " + + " |test2.|\n}" + addDumpTest(v2, "("+v2t+") "+v2s+"\n") + + // C unsigned char array. + v3, v3l, v3c := testdata.GetCgoUnsignedCharArray() + v3Len := fmt.Sprintf("%d", v3l) + v3Cap := fmt.Sprintf("%d", v3c) + v3t := "[6]testdata._Ctype_unsignedchar" + v3t2 := "[6]testdata._Ctype_uchar" + v3s := "(len=" + v3Len + " cap=" + v3Cap + ") " + + "{\n 00000000 74 65 73 74 33 00 " + + " |test3.|\n}" + addDumpTest(v3, "("+v3t+") "+v3s+"\n", "("+v3t2+") "+v3s+"\n") + + // C signed char array. + v4, v4l, v4c := testdata.GetCgoSignedCharArray() + v4Len := fmt.Sprintf("%d", v4l) + v4Cap := fmt.Sprintf("%d", v4c) + v4t := "[6]testdata._Ctype_schar" + v4t2 := "testdata._Ctype_schar" + v4s := "(len=" + v4Len + " cap=" + v4Cap + ") " + + "{\n (" + v4t2 + ") 116,\n (" + v4t2 + ") 101,\n (" + v4t2 + + ") 115,\n (" + v4t2 + ") 116,\n (" + v4t2 + ") 52,\n (" + v4t2 + + ") 0\n}" + addDumpTest(v4, "("+v4t+") "+v4s+"\n") + + // C uint8_t array. + v5, v5l, v5c := testdata.GetCgoUint8tArray() + v5Len := fmt.Sprintf("%d", v5l) + v5Cap := fmt.Sprintf("%d", v5c) + v5t := "[6]testdata._Ctype_uint8_t" + v5s := "(len=" + v5Len + " cap=" + v5Cap + ") " + + "{\n 00000000 74 65 73 74 35 00 " + + " |test5.|\n}" + addDumpTest(v5, "("+v5t+") "+v5s+"\n") + + // C typedefed unsigned char array. + v6, v6l, v6c := testdata.GetCgoTypdefedUnsignedCharArray() + v6Len := fmt.Sprintf("%d", v6l) + v6Cap := fmt.Sprintf("%d", v6c) + v6t := "[6]testdata._Ctype_custom_uchar_t" + v6s := "(len=" + v6Len + " cap=" + v6Cap + ") " + + "{\n 00000000 74 65 73 74 36 00 " + + " |test6.|\n}" + addDumpTest(v6, "("+v6t+") "+v6s+"\n") +} diff --git a/vendor/github.com/davecgh/go-spew/spew/dumpnocgo_test.go b/vendor/github.com/davecgh/go-spew/spew/dumpnocgo_test.go new file mode 100644 index 000000000..52a0971fb --- /dev/null +++ b/vendor/github.com/davecgh/go-spew/spew/dumpnocgo_test.go @@ -0,0 +1,26 @@ +// Copyright (c) 2013 Dave Collins +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +// NOTE: Due to the following build constraints, this file will only be compiled +// when either cgo is not supported or "-tags testcgo" is not added to the go +// test command line. This file intentionally does not setup any cgo tests in +// this scenario. +// +build !cgo !testcgo + +package spew_test + +func addCgoDumpTests() { + // Don't add any tests for cgo since this file is only compiled when + // there should not be any cgo tests. +} diff --git a/vendor/github.com/davecgh/go-spew/spew/example_test.go b/vendor/github.com/davecgh/go-spew/spew/example_test.go new file mode 100644 index 000000000..c6ec8c6d5 --- /dev/null +++ b/vendor/github.com/davecgh/go-spew/spew/example_test.go @@ -0,0 +1,226 @@ +/* + * Copyright (c) 2013-2016 Dave Collins + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +package spew_test + +import ( + "fmt" + + "github.com/davecgh/go-spew/spew" +) + +type Flag int + +const ( + flagOne Flag = iota + flagTwo +) + +var flagStrings = map[Flag]string{ + flagOne: "flagOne", + flagTwo: "flagTwo", +} + +func (f Flag) String() string { + if s, ok := flagStrings[f]; ok { + return s + } + return fmt.Sprintf("Unknown flag (%d)", int(f)) +} + +type Bar struct { + data uintptr +} + +type Foo struct { + unexportedField Bar + ExportedField map[interface{}]interface{} +} + +// This example demonstrates how to use Dump to dump variables to stdout. +func ExampleDump() { + // The following package level declarations are assumed for this example: + /* + type Flag int + + const ( + flagOne Flag = iota + flagTwo + ) + + var flagStrings = map[Flag]string{ + flagOne: "flagOne", + flagTwo: "flagTwo", + } + + func (f Flag) String() string { + if s, ok := flagStrings[f]; ok { + return s + } + return fmt.Sprintf("Unknown flag (%d)", int(f)) + } + + type Bar struct { + data uintptr + } + + type Foo struct { + unexportedField Bar + ExportedField map[interface{}]interface{} + } + */ + + // Setup some sample data structures for the example. + bar := Bar{uintptr(0)} + s1 := Foo{bar, map[interface{}]interface{}{"one": true}} + f := Flag(5) + b := []byte{ + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, + 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, + 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, + 0x31, 0x32, + } + + // Dump! + spew.Dump(s1, f, b) + + // Output: + // (spew_test.Foo) { + // unexportedField: (spew_test.Bar) { + // data: (uintptr) + // }, + // ExportedField: (map[interface {}]interface {}) (len=1) { + // (string) (len=3) "one": (bool) true + // } + // } + // (spew_test.Flag) Unknown flag (5) + // ([]uint8) (len=34 cap=34) { + // 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 |............... | + // 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 |!"#$%&'()*+,-./0| + // 00000020 31 32 |12| + // } + // +} + +// This example demonstrates how to use Printf to display a variable with a +// format string and inline formatting. +func ExamplePrintf() { + // Create a double pointer to a uint 8. + ui8 := uint8(5) + pui8 := &ui8 + ppui8 := &pui8 + + // Create a circular data type. + type circular struct { + ui8 uint8 + c *circular + } + c := circular{ui8: 1} + c.c = &c + + // Print! + spew.Printf("ppui8: %v\n", ppui8) + spew.Printf("circular: %v\n", c) + + // Output: + // ppui8: <**>5 + // circular: {1 <*>{1 <*>}} +} + +// This example demonstrates how to use a ConfigState. +func ExampleConfigState() { + // Modify the indent level of the ConfigState only. The global + // configuration is not modified. + scs := spew.ConfigState{Indent: "\t"} + + // Output using the ConfigState instance. + v := map[string]int{"one": 1} + scs.Printf("v: %v\n", v) + scs.Dump(v) + + // Output: + // v: map[one:1] + // (map[string]int) (len=1) { + // (string) (len=3) "one": (int) 1 + // } +} + +// This example demonstrates how to use ConfigState.Dump to dump variables to +// stdout +func ExampleConfigState_Dump() { + // See the top-level Dump example for details on the types used in this + // example. + + // Create two ConfigState instances with different indentation. + scs := spew.ConfigState{Indent: "\t"} + scs2 := spew.ConfigState{Indent: " "} + + // Setup some sample data structures for the example. + bar := Bar{uintptr(0)} + s1 := Foo{bar, map[interface{}]interface{}{"one": true}} + + // Dump using the ConfigState instances. + scs.Dump(s1) + scs2.Dump(s1) + + // Output: + // (spew_test.Foo) { + // unexportedField: (spew_test.Bar) { + // data: (uintptr) + // }, + // ExportedField: (map[interface {}]interface {}) (len=1) { + // (string) (len=3) "one": (bool) true + // } + // } + // (spew_test.Foo) { + // unexportedField: (spew_test.Bar) { + // data: (uintptr) + // }, + // ExportedField: (map[interface {}]interface {}) (len=1) { + // (string) (len=3) "one": (bool) true + // } + // } + // +} + +// This example demonstrates how to use ConfigState.Printf to display a variable +// with a format string and inline formatting. +func ExampleConfigState_Printf() { + // See the top-level Dump example for details on the types used in this + // example. + + // Create two ConfigState instances and modify the method handling of the + // first ConfigState only. + scs := spew.NewDefaultConfig() + scs2 := spew.NewDefaultConfig() + scs.DisableMethods = true + + // Alternatively + // scs := spew.ConfigState{Indent: " ", DisableMethods: true} + // scs2 := spew.ConfigState{Indent: " "} + + // This is of type Flag which implements a Stringer and has raw value 1. + f := flagTwo + + // Dump using the ConfigState instances. + scs.Printf("f: %v\n", f) + scs2.Printf("f: %v\n", f) + + // Output: + // f: 1 + // f: flagTwo +} diff --git a/vendor/github.com/davecgh/go-spew/spew/format_test.go b/vendor/github.com/davecgh/go-spew/spew/format_test.go new file mode 100644 index 000000000..f9b93abe8 --- /dev/null +++ b/vendor/github.com/davecgh/go-spew/spew/format_test.go @@ -0,0 +1,1558 @@ +/* + * Copyright (c) 2013-2016 Dave Collins + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* +Test Summary: +NOTE: For each test, a nil pointer, a single pointer and double pointer to the +base test element are also tested to ensure proper indirection across all types. + +- Max int8, int16, int32, int64, int +- Max uint8, uint16, uint32, uint64, uint +- Boolean true and false +- Standard complex64 and complex128 +- Array containing standard ints +- Array containing type with custom formatter on pointer receiver only +- Array containing interfaces +- Slice containing standard float32 values +- Slice containing type with custom formatter on pointer receiver only +- Slice containing interfaces +- Nil slice +- Standard string +- Nil interface +- Sub-interface +- Map with string keys and int vals +- Map with custom formatter type on pointer receiver only keys and vals +- Map with interface keys and values +- Map with nil interface value +- Struct with primitives +- Struct that contains another struct +- Struct that contains custom type with Stringer pointer interface via both + exported and unexported fields +- Struct that contains embedded struct and field to same struct +- Uintptr to 0 (null pointer) +- Uintptr address of real variable +- Unsafe.Pointer to 0 (null pointer) +- Unsafe.Pointer to address of real variable +- Nil channel +- Standard int channel +- Function with no params and no returns +- Function with param and no returns +- Function with multiple params and multiple returns +- Struct that is circular through self referencing +- Structs that are circular through cross referencing +- Structs that are indirectly circular +- Type that panics in its Stringer interface +- Type that has a custom Error interface +- %x passthrough with uint +- %#x passthrough with uint +- %f passthrough with precision +- %f passthrough with width and precision +- %d passthrough with width +- %q passthrough with string +*/ + +package spew_test + +import ( + "bytes" + "fmt" + "testing" + "unsafe" + + "github.com/davecgh/go-spew/spew" +) + +// formatterTest is used to describe a test to be performed against NewFormatter. +type formatterTest struct { + format string + in interface{} + wants []string +} + +// formatterTests houses all of the tests to be performed against NewFormatter. +var formatterTests = make([]formatterTest, 0) + +// addFormatterTest is a helper method to append the passed input and desired +// result to formatterTests. +func addFormatterTest(format string, in interface{}, wants ...string) { + test := formatterTest{format, in, wants} + formatterTests = append(formatterTests, test) +} + +func addIntFormatterTests() { + // Max int8. + v := int8(127) + nv := (*int8)(nil) + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "int8" + vs := "127" + addFormatterTest("%v", v, vs) + addFormatterTest("%v", pv, "<*>"+vs) + addFormatterTest("%v", &pv, "<**>"+vs) + addFormatterTest("%v", nv, "") + addFormatterTest("%+v", v, vs) + addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) + addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) + addFormatterTest("%+v", nv, "") + addFormatterTest("%#v", v, "("+vt+")"+vs) + addFormatterTest("%#v", pv, "(*"+vt+")"+vs) + addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) + addFormatterTest("%#v", nv, "(*"+vt+")"+"") + addFormatterTest("%#+v", v, "("+vt+")"+vs) + addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) + addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) + addFormatterTest("%#+v", nv, "(*"+vt+")"+"") + + // Max int16. + v2 := int16(32767) + nv2 := (*int16)(nil) + pv2 := &v2 + v2Addr := fmt.Sprintf("%p", pv2) + pv2Addr := fmt.Sprintf("%p", &pv2) + v2t := "int16" + v2s := "32767" + addFormatterTest("%v", v2, v2s) + addFormatterTest("%v", pv2, "<*>"+v2s) + addFormatterTest("%v", &pv2, "<**>"+v2s) + addFormatterTest("%v", nv2, "") + addFormatterTest("%+v", v2, v2s) + addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) + addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) + addFormatterTest("%+v", nv2, "") + addFormatterTest("%#v", v2, "("+v2t+")"+v2s) + addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) + addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) + addFormatterTest("%#v", nv2, "(*"+v2t+")"+"") + addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) + addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) + addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) + addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") + + // Max int32. + v3 := int32(2147483647) + nv3 := (*int32)(nil) + pv3 := &v3 + v3Addr := fmt.Sprintf("%p", pv3) + pv3Addr := fmt.Sprintf("%p", &pv3) + v3t := "int32" + v3s := "2147483647" + addFormatterTest("%v", v3, v3s) + addFormatterTest("%v", pv3, "<*>"+v3s) + addFormatterTest("%v", &pv3, "<**>"+v3s) + addFormatterTest("%v", nv3, "") + addFormatterTest("%+v", v3, v3s) + addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s) + addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s) + addFormatterTest("%+v", nv3, "") + addFormatterTest("%#v", v3, "("+v3t+")"+v3s) + addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s) + addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s) + addFormatterTest("%#v", nv3, "(*"+v3t+")"+"") + addFormatterTest("%#+v", v3, "("+v3t+")"+v3s) + addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s) + addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s) + addFormatterTest("%#v", nv3, "(*"+v3t+")"+"") + + // Max int64. + v4 := int64(9223372036854775807) + nv4 := (*int64)(nil) + pv4 := &v4 + v4Addr := fmt.Sprintf("%p", pv4) + pv4Addr := fmt.Sprintf("%p", &pv4) + v4t := "int64" + v4s := "9223372036854775807" + addFormatterTest("%v", v4, v4s) + addFormatterTest("%v", pv4, "<*>"+v4s) + addFormatterTest("%v", &pv4, "<**>"+v4s) + addFormatterTest("%v", nv4, "") + addFormatterTest("%+v", v4, v4s) + addFormatterTest("%+v", pv4, "<*>("+v4Addr+")"+v4s) + addFormatterTest("%+v", &pv4, "<**>("+pv4Addr+"->"+v4Addr+")"+v4s) + addFormatterTest("%+v", nv4, "") + addFormatterTest("%#v", v4, "("+v4t+")"+v4s) + addFormatterTest("%#v", pv4, "(*"+v4t+")"+v4s) + addFormatterTest("%#v", &pv4, "(**"+v4t+")"+v4s) + addFormatterTest("%#v", nv4, "(*"+v4t+")"+"") + addFormatterTest("%#+v", v4, "("+v4t+")"+v4s) + addFormatterTest("%#+v", pv4, "(*"+v4t+")("+v4Addr+")"+v4s) + addFormatterTest("%#+v", &pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")"+v4s) + addFormatterTest("%#+v", nv4, "(*"+v4t+")"+"") + + // Max int. + v5 := int(2147483647) + nv5 := (*int)(nil) + pv5 := &v5 + v5Addr := fmt.Sprintf("%p", pv5) + pv5Addr := fmt.Sprintf("%p", &pv5) + v5t := "int" + v5s := "2147483647" + addFormatterTest("%v", v5, v5s) + addFormatterTest("%v", pv5, "<*>"+v5s) + addFormatterTest("%v", &pv5, "<**>"+v5s) + addFormatterTest("%v", nv5, "") + addFormatterTest("%+v", v5, v5s) + addFormatterTest("%+v", pv5, "<*>("+v5Addr+")"+v5s) + addFormatterTest("%+v", &pv5, "<**>("+pv5Addr+"->"+v5Addr+")"+v5s) + addFormatterTest("%+v", nv5, "") + addFormatterTest("%#v", v5, "("+v5t+")"+v5s) + addFormatterTest("%#v", pv5, "(*"+v5t+")"+v5s) + addFormatterTest("%#v", &pv5, "(**"+v5t+")"+v5s) + addFormatterTest("%#v", nv5, "(*"+v5t+")"+"") + addFormatterTest("%#+v", v5, "("+v5t+")"+v5s) + addFormatterTest("%#+v", pv5, "(*"+v5t+")("+v5Addr+")"+v5s) + addFormatterTest("%#+v", &pv5, "(**"+v5t+")("+pv5Addr+"->"+v5Addr+")"+v5s) + addFormatterTest("%#+v", nv5, "(*"+v5t+")"+"") +} + +func addUintFormatterTests() { + // Max uint8. + v := uint8(255) + nv := (*uint8)(nil) + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "uint8" + vs := "255" + addFormatterTest("%v", v, vs) + addFormatterTest("%v", pv, "<*>"+vs) + addFormatterTest("%v", &pv, "<**>"+vs) + addFormatterTest("%v", nv, "") + addFormatterTest("%+v", v, vs) + addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) + addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) + addFormatterTest("%+v", nv, "") + addFormatterTest("%#v", v, "("+vt+")"+vs) + addFormatterTest("%#v", pv, "(*"+vt+")"+vs) + addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) + addFormatterTest("%#v", nv, "(*"+vt+")"+"") + addFormatterTest("%#+v", v, "("+vt+")"+vs) + addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) + addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) + addFormatterTest("%#+v", nv, "(*"+vt+")"+"") + + // Max uint16. + v2 := uint16(65535) + nv2 := (*uint16)(nil) + pv2 := &v2 + v2Addr := fmt.Sprintf("%p", pv2) + pv2Addr := fmt.Sprintf("%p", &pv2) + v2t := "uint16" + v2s := "65535" + addFormatterTest("%v", v2, v2s) + addFormatterTest("%v", pv2, "<*>"+v2s) + addFormatterTest("%v", &pv2, "<**>"+v2s) + addFormatterTest("%v", nv2, "") + addFormatterTest("%+v", v2, v2s) + addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) + addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) + addFormatterTest("%+v", nv2, "") + addFormatterTest("%#v", v2, "("+v2t+")"+v2s) + addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) + addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) + addFormatterTest("%#v", nv2, "(*"+v2t+")"+"") + addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) + addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) + addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) + addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") + + // Max uint32. + v3 := uint32(4294967295) + nv3 := (*uint32)(nil) + pv3 := &v3 + v3Addr := fmt.Sprintf("%p", pv3) + pv3Addr := fmt.Sprintf("%p", &pv3) + v3t := "uint32" + v3s := "4294967295" + addFormatterTest("%v", v3, v3s) + addFormatterTest("%v", pv3, "<*>"+v3s) + addFormatterTest("%v", &pv3, "<**>"+v3s) + addFormatterTest("%v", nv3, "") + addFormatterTest("%+v", v3, v3s) + addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s) + addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s) + addFormatterTest("%+v", nv3, "") + addFormatterTest("%#v", v3, "("+v3t+")"+v3s) + addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s) + addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s) + addFormatterTest("%#v", nv3, "(*"+v3t+")"+"") + addFormatterTest("%#+v", v3, "("+v3t+")"+v3s) + addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s) + addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s) + addFormatterTest("%#v", nv3, "(*"+v3t+")"+"") + + // Max uint64. + v4 := uint64(18446744073709551615) + nv4 := (*uint64)(nil) + pv4 := &v4 + v4Addr := fmt.Sprintf("%p", pv4) + pv4Addr := fmt.Sprintf("%p", &pv4) + v4t := "uint64" + v4s := "18446744073709551615" + addFormatterTest("%v", v4, v4s) + addFormatterTest("%v", pv4, "<*>"+v4s) + addFormatterTest("%v", &pv4, "<**>"+v4s) + addFormatterTest("%v", nv4, "") + addFormatterTest("%+v", v4, v4s) + addFormatterTest("%+v", pv4, "<*>("+v4Addr+")"+v4s) + addFormatterTest("%+v", &pv4, "<**>("+pv4Addr+"->"+v4Addr+")"+v4s) + addFormatterTest("%+v", nv4, "") + addFormatterTest("%#v", v4, "("+v4t+")"+v4s) + addFormatterTest("%#v", pv4, "(*"+v4t+")"+v4s) + addFormatterTest("%#v", &pv4, "(**"+v4t+")"+v4s) + addFormatterTest("%#v", nv4, "(*"+v4t+")"+"") + addFormatterTest("%#+v", v4, "("+v4t+")"+v4s) + addFormatterTest("%#+v", pv4, "(*"+v4t+")("+v4Addr+")"+v4s) + addFormatterTest("%#+v", &pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")"+v4s) + addFormatterTest("%#+v", nv4, "(*"+v4t+")"+"") + + // Max uint. + v5 := uint(4294967295) + nv5 := (*uint)(nil) + pv5 := &v5 + v5Addr := fmt.Sprintf("%p", pv5) + pv5Addr := fmt.Sprintf("%p", &pv5) + v5t := "uint" + v5s := "4294967295" + addFormatterTest("%v", v5, v5s) + addFormatterTest("%v", pv5, "<*>"+v5s) + addFormatterTest("%v", &pv5, "<**>"+v5s) + addFormatterTest("%v", nv5, "") + addFormatterTest("%+v", v5, v5s) + addFormatterTest("%+v", pv5, "<*>("+v5Addr+")"+v5s) + addFormatterTest("%+v", &pv5, "<**>("+pv5Addr+"->"+v5Addr+")"+v5s) + addFormatterTest("%+v", nv5, "") + addFormatterTest("%#v", v5, "("+v5t+")"+v5s) + addFormatterTest("%#v", pv5, "(*"+v5t+")"+v5s) + addFormatterTest("%#v", &pv5, "(**"+v5t+")"+v5s) + addFormatterTest("%#v", nv5, "(*"+v5t+")"+"") + addFormatterTest("%#+v", v5, "("+v5t+")"+v5s) + addFormatterTest("%#+v", pv5, "(*"+v5t+")("+v5Addr+")"+v5s) + addFormatterTest("%#+v", &pv5, "(**"+v5t+")("+pv5Addr+"->"+v5Addr+")"+v5s) + addFormatterTest("%#v", nv5, "(*"+v5t+")"+"") +} + +func addBoolFormatterTests() { + // Boolean true. + v := bool(true) + nv := (*bool)(nil) + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "bool" + vs := "true" + addFormatterTest("%v", v, vs) + addFormatterTest("%v", pv, "<*>"+vs) + addFormatterTest("%v", &pv, "<**>"+vs) + addFormatterTest("%v", nv, "") + addFormatterTest("%+v", v, vs) + addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) + addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) + addFormatterTest("%+v", nv, "") + addFormatterTest("%#v", v, "("+vt+")"+vs) + addFormatterTest("%#v", pv, "(*"+vt+")"+vs) + addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) + addFormatterTest("%#v", nv, "(*"+vt+")"+"") + addFormatterTest("%#+v", v, "("+vt+")"+vs) + addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) + addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) + addFormatterTest("%#+v", nv, "(*"+vt+")"+"") + + // Boolean false. + v2 := bool(false) + pv2 := &v2 + v2Addr := fmt.Sprintf("%p", pv2) + pv2Addr := fmt.Sprintf("%p", &pv2) + v2t := "bool" + v2s := "false" + addFormatterTest("%v", v2, v2s) + addFormatterTest("%v", pv2, "<*>"+v2s) + addFormatterTest("%v", &pv2, "<**>"+v2s) + addFormatterTest("%+v", v2, v2s) + addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) + addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) + addFormatterTest("%#v", v2, "("+v2t+")"+v2s) + addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) + addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) + addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) + addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) + addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) +} + +func addFloatFormatterTests() { + // Standard float32. + v := float32(3.1415) + nv := (*float32)(nil) + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "float32" + vs := "3.1415" + addFormatterTest("%v", v, vs) + addFormatterTest("%v", pv, "<*>"+vs) + addFormatterTest("%v", &pv, "<**>"+vs) + addFormatterTest("%v", nv, "") + addFormatterTest("%+v", v, vs) + addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) + addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) + addFormatterTest("%+v", nv, "") + addFormatterTest("%#v", v, "("+vt+")"+vs) + addFormatterTest("%#v", pv, "(*"+vt+")"+vs) + addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) + addFormatterTest("%#v", nv, "(*"+vt+")"+"") + addFormatterTest("%#+v", v, "("+vt+")"+vs) + addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) + addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) + addFormatterTest("%#+v", nv, "(*"+vt+")"+"") + + // Standard float64. + v2 := float64(3.1415926) + nv2 := (*float64)(nil) + pv2 := &v2 + v2Addr := fmt.Sprintf("%p", pv2) + pv2Addr := fmt.Sprintf("%p", &pv2) + v2t := "float64" + v2s := "3.1415926" + addFormatterTest("%v", v2, v2s) + addFormatterTest("%v", pv2, "<*>"+v2s) + addFormatterTest("%v", &pv2, "<**>"+v2s) + addFormatterTest("%+v", nv2, "") + addFormatterTest("%+v", v2, v2s) + addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) + addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) + addFormatterTest("%+v", nv2, "") + addFormatterTest("%#v", v2, "("+v2t+")"+v2s) + addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) + addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) + addFormatterTest("%#v", nv2, "(*"+v2t+")"+"") + addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) + addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) + addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) + addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") +} + +func addComplexFormatterTests() { + // Standard complex64. + v := complex(float32(6), -2) + nv := (*complex64)(nil) + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "complex64" + vs := "(6-2i)" + addFormatterTest("%v", v, vs) + addFormatterTest("%v", pv, "<*>"+vs) + addFormatterTest("%v", &pv, "<**>"+vs) + addFormatterTest("%+v", nv, "") + addFormatterTest("%+v", v, vs) + addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) + addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) + addFormatterTest("%+v", nv, "") + addFormatterTest("%#v", v, "("+vt+")"+vs) + addFormatterTest("%#v", pv, "(*"+vt+")"+vs) + addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) + addFormatterTest("%#v", nv, "(*"+vt+")"+"") + addFormatterTest("%#+v", v, "("+vt+")"+vs) + addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) + addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) + addFormatterTest("%#+v", nv, "(*"+vt+")"+"") + + // Standard complex128. + v2 := complex(float64(-6), 2) + nv2 := (*complex128)(nil) + pv2 := &v2 + v2Addr := fmt.Sprintf("%p", pv2) + pv2Addr := fmt.Sprintf("%p", &pv2) + v2t := "complex128" + v2s := "(-6+2i)" + addFormatterTest("%v", v2, v2s) + addFormatterTest("%v", pv2, "<*>"+v2s) + addFormatterTest("%v", &pv2, "<**>"+v2s) + addFormatterTest("%+v", nv2, "") + addFormatterTest("%+v", v2, v2s) + addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) + addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) + addFormatterTest("%+v", nv2, "") + addFormatterTest("%#v", v2, "("+v2t+")"+v2s) + addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) + addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) + addFormatterTest("%#v", nv2, "(*"+v2t+")"+"") + addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) + addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) + addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) + addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") +} + +func addArrayFormatterTests() { + // Array containing standard ints. + v := [3]int{1, 2, 3} + nv := (*[3]int)(nil) + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "[3]int" + vs := "[1 2 3]" + addFormatterTest("%v", v, vs) + addFormatterTest("%v", pv, "<*>"+vs) + addFormatterTest("%v", &pv, "<**>"+vs) + addFormatterTest("%+v", nv, "") + addFormatterTest("%+v", v, vs) + addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) + addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) + addFormatterTest("%+v", nv, "") + addFormatterTest("%#v", v, "("+vt+")"+vs) + addFormatterTest("%#v", pv, "(*"+vt+")"+vs) + addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) + addFormatterTest("%#v", nv, "(*"+vt+")"+"") + addFormatterTest("%#+v", v, "("+vt+")"+vs) + addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) + addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) + addFormatterTest("%#+v", nv, "(*"+vt+")"+"") + + // Array containing type with custom formatter on pointer receiver only. + v2 := [3]pstringer{"1", "2", "3"} + nv2 := (*[3]pstringer)(nil) + pv2 := &v2 + v2Addr := fmt.Sprintf("%p", pv2) + pv2Addr := fmt.Sprintf("%p", &pv2) + v2t := "[3]spew_test.pstringer" + v2sp := "[stringer 1 stringer 2 stringer 3]" + v2s := v2sp + if spew.UnsafeDisabled { + v2s = "[1 2 3]" + } + addFormatterTest("%v", v2, v2s) + addFormatterTest("%v", pv2, "<*>"+v2sp) + addFormatterTest("%v", &pv2, "<**>"+v2sp) + addFormatterTest("%+v", nv2, "") + addFormatterTest("%+v", v2, v2s) + addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2sp) + addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2sp) + addFormatterTest("%+v", nv2, "") + addFormatterTest("%#v", v2, "("+v2t+")"+v2s) + addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2sp) + addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2sp) + addFormatterTest("%#v", nv2, "(*"+v2t+")"+"") + addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) + addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2sp) + addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2sp) + addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") + + // Array containing interfaces. + v3 := [3]interface{}{"one", int(2), uint(3)} + nv3 := (*[3]interface{})(nil) + pv3 := &v3 + v3Addr := fmt.Sprintf("%p", pv3) + pv3Addr := fmt.Sprintf("%p", &pv3) + v3t := "[3]interface {}" + v3t2 := "string" + v3t3 := "int" + v3t4 := "uint" + v3s := "[one 2 3]" + v3s2 := "[(" + v3t2 + ")one (" + v3t3 + ")2 (" + v3t4 + ")3]" + addFormatterTest("%v", v3, v3s) + addFormatterTest("%v", pv3, "<*>"+v3s) + addFormatterTest("%v", &pv3, "<**>"+v3s) + addFormatterTest("%+v", nv3, "") + addFormatterTest("%+v", v3, v3s) + addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s) + addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s) + addFormatterTest("%+v", nv3, "") + addFormatterTest("%#v", v3, "("+v3t+")"+v3s2) + addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s2) + addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s2) + addFormatterTest("%#v", nv3, "(*"+v3t+")"+"") + addFormatterTest("%#+v", v3, "("+v3t+")"+v3s2) + addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s2) + addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s2) + addFormatterTest("%#+v", nv3, "(*"+v3t+")"+"") +} + +func addSliceFormatterTests() { + // Slice containing standard float32 values. + v := []float32{3.14, 6.28, 12.56} + nv := (*[]float32)(nil) + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "[]float32" + vs := "[3.14 6.28 12.56]" + addFormatterTest("%v", v, vs) + addFormatterTest("%v", pv, "<*>"+vs) + addFormatterTest("%v", &pv, "<**>"+vs) + addFormatterTest("%+v", nv, "") + addFormatterTest("%+v", v, vs) + addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) + addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) + addFormatterTest("%+v", nv, "") + addFormatterTest("%#v", v, "("+vt+")"+vs) + addFormatterTest("%#v", pv, "(*"+vt+")"+vs) + addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) + addFormatterTest("%#v", nv, "(*"+vt+")"+"") + addFormatterTest("%#+v", v, "("+vt+")"+vs) + addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) + addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) + addFormatterTest("%#+v", nv, "(*"+vt+")"+"") + + // Slice containing type with custom formatter on pointer receiver only. + v2 := []pstringer{"1", "2", "3"} + nv2 := (*[]pstringer)(nil) + pv2 := &v2 + v2Addr := fmt.Sprintf("%p", pv2) + pv2Addr := fmt.Sprintf("%p", &pv2) + v2t := "[]spew_test.pstringer" + v2s := "[stringer 1 stringer 2 stringer 3]" + addFormatterTest("%v", v2, v2s) + addFormatterTest("%v", pv2, "<*>"+v2s) + addFormatterTest("%v", &pv2, "<**>"+v2s) + addFormatterTest("%+v", nv2, "") + addFormatterTest("%+v", v2, v2s) + addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) + addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) + addFormatterTest("%+v", nv2, "") + addFormatterTest("%#v", v2, "("+v2t+")"+v2s) + addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) + addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) + addFormatterTest("%#v", nv2, "(*"+v2t+")"+"") + addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) + addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) + addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) + addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") + + // Slice containing interfaces. + v3 := []interface{}{"one", int(2), uint(3), nil} + nv3 := (*[]interface{})(nil) + pv3 := &v3 + v3Addr := fmt.Sprintf("%p", pv3) + pv3Addr := fmt.Sprintf("%p", &pv3) + v3t := "[]interface {}" + v3t2 := "string" + v3t3 := "int" + v3t4 := "uint" + v3t5 := "interface {}" + v3s := "[one 2 3 ]" + v3s2 := "[(" + v3t2 + ")one (" + v3t3 + ")2 (" + v3t4 + ")3 (" + v3t5 + + ")]" + addFormatterTest("%v", v3, v3s) + addFormatterTest("%v", pv3, "<*>"+v3s) + addFormatterTest("%v", &pv3, "<**>"+v3s) + addFormatterTest("%+v", nv3, "") + addFormatterTest("%+v", v3, v3s) + addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s) + addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s) + addFormatterTest("%+v", nv3, "") + addFormatterTest("%#v", v3, "("+v3t+")"+v3s2) + addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s2) + addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s2) + addFormatterTest("%#v", nv3, "(*"+v3t+")"+"") + addFormatterTest("%#+v", v3, "("+v3t+")"+v3s2) + addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s2) + addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s2) + addFormatterTest("%#+v", nv3, "(*"+v3t+")"+"") + + // Nil slice. + var v4 []int + nv4 := (*[]int)(nil) + pv4 := &v4 + v4Addr := fmt.Sprintf("%p", pv4) + pv4Addr := fmt.Sprintf("%p", &pv4) + v4t := "[]int" + v4s := "" + addFormatterTest("%v", v4, v4s) + addFormatterTest("%v", pv4, "<*>"+v4s) + addFormatterTest("%v", &pv4, "<**>"+v4s) + addFormatterTest("%+v", nv4, "") + addFormatterTest("%+v", v4, v4s) + addFormatterTest("%+v", pv4, "<*>("+v4Addr+")"+v4s) + addFormatterTest("%+v", &pv4, "<**>("+pv4Addr+"->"+v4Addr+")"+v4s) + addFormatterTest("%+v", nv4, "") + addFormatterTest("%#v", v4, "("+v4t+")"+v4s) + addFormatterTest("%#v", pv4, "(*"+v4t+")"+v4s) + addFormatterTest("%#v", &pv4, "(**"+v4t+")"+v4s) + addFormatterTest("%#v", nv4, "(*"+v4t+")"+"") + addFormatterTest("%#+v", v4, "("+v4t+")"+v4s) + addFormatterTest("%#+v", pv4, "(*"+v4t+")("+v4Addr+")"+v4s) + addFormatterTest("%#+v", &pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")"+v4s) + addFormatterTest("%#+v", nv4, "(*"+v4t+")"+"") +} + +func addStringFormatterTests() { + // Standard string. + v := "test" + nv := (*string)(nil) + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "string" + vs := "test" + addFormatterTest("%v", v, vs) + addFormatterTest("%v", pv, "<*>"+vs) + addFormatterTest("%v", &pv, "<**>"+vs) + addFormatterTest("%+v", nv, "") + addFormatterTest("%+v", v, vs) + addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) + addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) + addFormatterTest("%+v", nv, "") + addFormatterTest("%#v", v, "("+vt+")"+vs) + addFormatterTest("%#v", pv, "(*"+vt+")"+vs) + addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) + addFormatterTest("%#v", nv, "(*"+vt+")"+"") + addFormatterTest("%#+v", v, "("+vt+")"+vs) + addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) + addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) + addFormatterTest("%#+v", nv, "(*"+vt+")"+"") +} + +func addInterfaceFormatterTests() { + // Nil interface. + var v interface{} + nv := (*interface{})(nil) + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "interface {}" + vs := "" + addFormatterTest("%v", v, vs) + addFormatterTest("%v", pv, "<*>"+vs) + addFormatterTest("%v", &pv, "<**>"+vs) + addFormatterTest("%+v", nv, "") + addFormatterTest("%+v", v, vs) + addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) + addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) + addFormatterTest("%+v", nv, "") + addFormatterTest("%#v", v, "("+vt+")"+vs) + addFormatterTest("%#v", pv, "(*"+vt+")"+vs) + addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) + addFormatterTest("%#v", nv, "(*"+vt+")"+"") + addFormatterTest("%#+v", v, "("+vt+")"+vs) + addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) + addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) + addFormatterTest("%#+v", nv, "(*"+vt+")"+"") + + // Sub-interface. + v2 := interface{}(uint16(65535)) + pv2 := &v2 + v2Addr := fmt.Sprintf("%p", pv2) + pv2Addr := fmt.Sprintf("%p", &pv2) + v2t := "uint16" + v2s := "65535" + addFormatterTest("%v", v2, v2s) + addFormatterTest("%v", pv2, "<*>"+v2s) + addFormatterTest("%v", &pv2, "<**>"+v2s) + addFormatterTest("%+v", v2, v2s) + addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) + addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) + addFormatterTest("%#v", v2, "("+v2t+")"+v2s) + addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) + addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) + addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) + addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) + addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) +} + +func addMapFormatterTests() { + // Map with string keys and int vals. + v := map[string]int{"one": 1, "two": 2} + nilMap := map[string]int(nil) + nv := (*map[string]int)(nil) + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "map[string]int" + vs := "map[one:1 two:2]" + vs2 := "map[two:2 one:1]" + addFormatterTest("%v", v, vs, vs2) + addFormatterTest("%v", pv, "<*>"+vs, "<*>"+vs2) + addFormatterTest("%v", &pv, "<**>"+vs, "<**>"+vs2) + addFormatterTest("%+v", nilMap, "") + addFormatterTest("%+v", nv, "") + addFormatterTest("%+v", v, vs, vs2) + addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs, "<*>("+vAddr+")"+vs2) + addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs, + "<**>("+pvAddr+"->"+vAddr+")"+vs2) + addFormatterTest("%+v", nilMap, "") + addFormatterTest("%+v", nv, "") + addFormatterTest("%#v", v, "("+vt+")"+vs, "("+vt+")"+vs2) + addFormatterTest("%#v", pv, "(*"+vt+")"+vs, "(*"+vt+")"+vs2) + addFormatterTest("%#v", &pv, "(**"+vt+")"+vs, "(**"+vt+")"+vs2) + addFormatterTest("%#v", nilMap, "("+vt+")"+"") + addFormatterTest("%#v", nv, "(*"+vt+")"+"") + addFormatterTest("%#+v", v, "("+vt+")"+vs, "("+vt+")"+vs2) + addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs, + "(*"+vt+")("+vAddr+")"+vs2) + addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs, + "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs2) + addFormatterTest("%#+v", nilMap, "("+vt+")"+"") + addFormatterTest("%#+v", nv, "(*"+vt+")"+"") + + // Map with custom formatter type on pointer receiver only keys and vals. + v2 := map[pstringer]pstringer{"one": "1"} + nv2 := (*map[pstringer]pstringer)(nil) + pv2 := &v2 + v2Addr := fmt.Sprintf("%p", pv2) + pv2Addr := fmt.Sprintf("%p", &pv2) + v2t := "map[spew_test.pstringer]spew_test.pstringer" + v2s := "map[stringer one:stringer 1]" + if spew.UnsafeDisabled { + v2s = "map[one:1]" + } + addFormatterTest("%v", v2, v2s) + addFormatterTest("%v", pv2, "<*>"+v2s) + addFormatterTest("%v", &pv2, "<**>"+v2s) + addFormatterTest("%+v", nv2, "") + addFormatterTest("%+v", v2, v2s) + addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) + addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) + addFormatterTest("%+v", nv2, "") + addFormatterTest("%#v", v2, "("+v2t+")"+v2s) + addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) + addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) + addFormatterTest("%#v", nv2, "(*"+v2t+")"+"") + addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) + addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) + addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) + addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") + + // Map with interface keys and values. + v3 := map[interface{}]interface{}{"one": 1} + nv3 := (*map[interface{}]interface{})(nil) + pv3 := &v3 + v3Addr := fmt.Sprintf("%p", pv3) + pv3Addr := fmt.Sprintf("%p", &pv3) + v3t := "map[interface {}]interface {}" + v3t1 := "string" + v3t2 := "int" + v3s := "map[one:1]" + v3s2 := "map[(" + v3t1 + ")one:(" + v3t2 + ")1]" + addFormatterTest("%v", v3, v3s) + addFormatterTest("%v", pv3, "<*>"+v3s) + addFormatterTest("%v", &pv3, "<**>"+v3s) + addFormatterTest("%+v", nv3, "") + addFormatterTest("%+v", v3, v3s) + addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s) + addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s) + addFormatterTest("%+v", nv3, "") + addFormatterTest("%#v", v3, "("+v3t+")"+v3s2) + addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s2) + addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s2) + addFormatterTest("%#v", nv3, "(*"+v3t+")"+"") + addFormatterTest("%#+v", v3, "("+v3t+")"+v3s2) + addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s2) + addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s2) + addFormatterTest("%#+v", nv3, "(*"+v3t+")"+"") + + // Map with nil interface value + v4 := map[string]interface{}{"nil": nil} + nv4 := (*map[string]interface{})(nil) + pv4 := &v4 + v4Addr := fmt.Sprintf("%p", pv4) + pv4Addr := fmt.Sprintf("%p", &pv4) + v4t := "map[string]interface {}" + v4t1 := "interface {}" + v4s := "map[nil:]" + v4s2 := "map[nil:(" + v4t1 + ")]" + addFormatterTest("%v", v4, v4s) + addFormatterTest("%v", pv4, "<*>"+v4s) + addFormatterTest("%v", &pv4, "<**>"+v4s) + addFormatterTest("%+v", nv4, "") + addFormatterTest("%+v", v4, v4s) + addFormatterTest("%+v", pv4, "<*>("+v4Addr+")"+v4s) + addFormatterTest("%+v", &pv4, "<**>("+pv4Addr+"->"+v4Addr+")"+v4s) + addFormatterTest("%+v", nv4, "") + addFormatterTest("%#v", v4, "("+v4t+")"+v4s2) + addFormatterTest("%#v", pv4, "(*"+v4t+")"+v4s2) + addFormatterTest("%#v", &pv4, "(**"+v4t+")"+v4s2) + addFormatterTest("%#v", nv4, "(*"+v4t+")"+"") + addFormatterTest("%#+v", v4, "("+v4t+")"+v4s2) + addFormatterTest("%#+v", pv4, "(*"+v4t+")("+v4Addr+")"+v4s2) + addFormatterTest("%#+v", &pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")"+v4s2) + addFormatterTest("%#+v", nv4, "(*"+v4t+")"+"") +} + +func addStructFormatterTests() { + // Struct with primitives. + type s1 struct { + a int8 + b uint8 + } + v := s1{127, 255} + nv := (*s1)(nil) + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "spew_test.s1" + vt2 := "int8" + vt3 := "uint8" + vs := "{127 255}" + vs2 := "{a:127 b:255}" + vs3 := "{a:(" + vt2 + ")127 b:(" + vt3 + ")255}" + addFormatterTest("%v", v, vs) + addFormatterTest("%v", pv, "<*>"+vs) + addFormatterTest("%v", &pv, "<**>"+vs) + addFormatterTest("%+v", nv, "") + addFormatterTest("%+v", v, vs2) + addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs2) + addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs2) + addFormatterTest("%+v", nv, "") + addFormatterTest("%#v", v, "("+vt+")"+vs3) + addFormatterTest("%#v", pv, "(*"+vt+")"+vs3) + addFormatterTest("%#v", &pv, "(**"+vt+")"+vs3) + addFormatterTest("%#v", nv, "(*"+vt+")"+"") + addFormatterTest("%#+v", v, "("+vt+")"+vs3) + addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs3) + addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs3) + addFormatterTest("%#+v", nv, "(*"+vt+")"+"") + + // Struct that contains another struct. + type s2 struct { + s1 s1 + b bool + } + v2 := s2{s1{127, 255}, true} + nv2 := (*s2)(nil) + pv2 := &v2 + v2Addr := fmt.Sprintf("%p", pv2) + pv2Addr := fmt.Sprintf("%p", &pv2) + v2t := "spew_test.s2" + v2t2 := "spew_test.s1" + v2t3 := "int8" + v2t4 := "uint8" + v2t5 := "bool" + v2s := "{{127 255} true}" + v2s2 := "{s1:{a:127 b:255} b:true}" + v2s3 := "{s1:(" + v2t2 + "){a:(" + v2t3 + ")127 b:(" + v2t4 + ")255} b:(" + + v2t5 + ")true}" + addFormatterTest("%v", v2, v2s) + addFormatterTest("%v", pv2, "<*>"+v2s) + addFormatterTest("%v", &pv2, "<**>"+v2s) + addFormatterTest("%+v", nv2, "") + addFormatterTest("%+v", v2, v2s2) + addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s2) + addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s2) + addFormatterTest("%+v", nv2, "") + addFormatterTest("%#v", v2, "("+v2t+")"+v2s3) + addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s3) + addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s3) + addFormatterTest("%#v", nv2, "(*"+v2t+")"+"") + addFormatterTest("%#+v", v2, "("+v2t+")"+v2s3) + addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s3) + addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s3) + addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") + + // Struct that contains custom type with Stringer pointer interface via both + // exported and unexported fields. + type s3 struct { + s pstringer + S pstringer + } + v3 := s3{"test", "test2"} + nv3 := (*s3)(nil) + pv3 := &v3 + v3Addr := fmt.Sprintf("%p", pv3) + pv3Addr := fmt.Sprintf("%p", &pv3) + v3t := "spew_test.s3" + v3t2 := "spew_test.pstringer" + v3s := "{stringer test stringer test2}" + v3sp := v3s + v3s2 := "{s:stringer test S:stringer test2}" + v3s2p := v3s2 + v3s3 := "{s:(" + v3t2 + ")stringer test S:(" + v3t2 + ")stringer test2}" + v3s3p := v3s3 + if spew.UnsafeDisabled { + v3s = "{test test2}" + v3sp = "{test stringer test2}" + v3s2 = "{s:test S:test2}" + v3s2p = "{s:test S:stringer test2}" + v3s3 = "{s:(" + v3t2 + ")test S:(" + v3t2 + ")test2}" + v3s3p = "{s:(" + v3t2 + ")test S:(" + v3t2 + ")stringer test2}" + } + addFormatterTest("%v", v3, v3s) + addFormatterTest("%v", pv3, "<*>"+v3sp) + addFormatterTest("%v", &pv3, "<**>"+v3sp) + addFormatterTest("%+v", nv3, "") + addFormatterTest("%+v", v3, v3s2) + addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s2p) + addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s2p) + addFormatterTest("%+v", nv3, "") + addFormatterTest("%#v", v3, "("+v3t+")"+v3s3) + addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s3p) + addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s3p) + addFormatterTest("%#v", nv3, "(*"+v3t+")"+"") + addFormatterTest("%#+v", v3, "("+v3t+")"+v3s3) + addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s3p) + addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s3p) + addFormatterTest("%#+v", nv3, "(*"+v3t+")"+"") + + // Struct that contains embedded struct and field to same struct. + e := embed{"embedstr"} + v4 := embedwrap{embed: &e, e: &e} + nv4 := (*embedwrap)(nil) + pv4 := &v4 + eAddr := fmt.Sprintf("%p", &e) + v4Addr := fmt.Sprintf("%p", pv4) + pv4Addr := fmt.Sprintf("%p", &pv4) + v4t := "spew_test.embedwrap" + v4t2 := "spew_test.embed" + v4t3 := "string" + v4s := "{<*>{embedstr} <*>{embedstr}}" + v4s2 := "{embed:<*>(" + eAddr + "){a:embedstr} e:<*>(" + eAddr + + "){a:embedstr}}" + v4s3 := "{embed:(*" + v4t2 + "){a:(" + v4t3 + ")embedstr} e:(*" + v4t2 + + "){a:(" + v4t3 + ")embedstr}}" + v4s4 := "{embed:(*" + v4t2 + ")(" + eAddr + "){a:(" + v4t3 + + ")embedstr} e:(*" + v4t2 + ")(" + eAddr + "){a:(" + v4t3 + ")embedstr}}" + addFormatterTest("%v", v4, v4s) + addFormatterTest("%v", pv4, "<*>"+v4s) + addFormatterTest("%v", &pv4, "<**>"+v4s) + addFormatterTest("%+v", nv4, "") + addFormatterTest("%+v", v4, v4s2) + addFormatterTest("%+v", pv4, "<*>("+v4Addr+")"+v4s2) + addFormatterTest("%+v", &pv4, "<**>("+pv4Addr+"->"+v4Addr+")"+v4s2) + addFormatterTest("%+v", nv4, "") + addFormatterTest("%#v", v4, "("+v4t+")"+v4s3) + addFormatterTest("%#v", pv4, "(*"+v4t+")"+v4s3) + addFormatterTest("%#v", &pv4, "(**"+v4t+")"+v4s3) + addFormatterTest("%#v", nv4, "(*"+v4t+")"+"") + addFormatterTest("%#+v", v4, "("+v4t+")"+v4s4) + addFormatterTest("%#+v", pv4, "(*"+v4t+")("+v4Addr+")"+v4s4) + addFormatterTest("%#+v", &pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")"+v4s4) + addFormatterTest("%#+v", nv4, "(*"+v4t+")"+"") +} + +func addUintptrFormatterTests() { + // Null pointer. + v := uintptr(0) + nv := (*uintptr)(nil) + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "uintptr" + vs := "" + addFormatterTest("%v", v, vs) + addFormatterTest("%v", pv, "<*>"+vs) + addFormatterTest("%v", &pv, "<**>"+vs) + addFormatterTest("%+v", nv, "") + addFormatterTest("%+v", v, vs) + addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) + addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) + addFormatterTest("%+v", nv, "") + addFormatterTest("%#v", v, "("+vt+")"+vs) + addFormatterTest("%#v", pv, "(*"+vt+")"+vs) + addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) + addFormatterTest("%#v", nv, "(*"+vt+")"+"") + addFormatterTest("%#+v", v, "("+vt+")"+vs) + addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) + addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) + addFormatterTest("%#+v", nv, "(*"+vt+")"+"") + + // Address of real variable. + i := 1 + v2 := uintptr(unsafe.Pointer(&i)) + pv2 := &v2 + v2Addr := fmt.Sprintf("%p", pv2) + pv2Addr := fmt.Sprintf("%p", &pv2) + v2t := "uintptr" + v2s := fmt.Sprintf("%p", &i) + addFormatterTest("%v", v2, v2s) + addFormatterTest("%v", pv2, "<*>"+v2s) + addFormatterTest("%v", &pv2, "<**>"+v2s) + addFormatterTest("%+v", v2, v2s) + addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) + addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) + addFormatterTest("%#v", v2, "("+v2t+")"+v2s) + addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) + addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) + addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) + addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) + addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) +} + +func addUnsafePointerFormatterTests() { + // Null pointer. + v := unsafe.Pointer(uintptr(0)) + nv := (*unsafe.Pointer)(nil) + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "unsafe.Pointer" + vs := "" + addFormatterTest("%v", v, vs) + addFormatterTest("%v", pv, "<*>"+vs) + addFormatterTest("%v", &pv, "<**>"+vs) + addFormatterTest("%+v", nv, "") + addFormatterTest("%+v", v, vs) + addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) + addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) + addFormatterTest("%+v", nv, "") + addFormatterTest("%#v", v, "("+vt+")"+vs) + addFormatterTest("%#v", pv, "(*"+vt+")"+vs) + addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) + addFormatterTest("%#v", nv, "(*"+vt+")"+"") + addFormatterTest("%#+v", v, "("+vt+")"+vs) + addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) + addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) + addFormatterTest("%#+v", nv, "(*"+vt+")"+"") + + // Address of real variable. + i := 1 + v2 := unsafe.Pointer(&i) + pv2 := &v2 + v2Addr := fmt.Sprintf("%p", pv2) + pv2Addr := fmt.Sprintf("%p", &pv2) + v2t := "unsafe.Pointer" + v2s := fmt.Sprintf("%p", &i) + addFormatterTest("%v", v2, v2s) + addFormatterTest("%v", pv2, "<*>"+v2s) + addFormatterTest("%v", &pv2, "<**>"+v2s) + addFormatterTest("%+v", v2, v2s) + addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) + addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) + addFormatterTest("%#v", v2, "("+v2t+")"+v2s) + addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) + addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) + addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) + addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) + addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) +} + +func addChanFormatterTests() { + // Nil channel. + var v chan int + pv := &v + nv := (*chan int)(nil) + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "chan int" + vs := "" + addFormatterTest("%v", v, vs) + addFormatterTest("%v", pv, "<*>"+vs) + addFormatterTest("%v", &pv, "<**>"+vs) + addFormatterTest("%+v", nv, "") + addFormatterTest("%+v", v, vs) + addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) + addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) + addFormatterTest("%+v", nv, "") + addFormatterTest("%#v", v, "("+vt+")"+vs) + addFormatterTest("%#v", pv, "(*"+vt+")"+vs) + addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) + addFormatterTest("%#v", nv, "(*"+vt+")"+"") + addFormatterTest("%#+v", v, "("+vt+")"+vs) + addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) + addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) + addFormatterTest("%#+v", nv, "(*"+vt+")"+"") + + // Real channel. + v2 := make(chan int) + pv2 := &v2 + v2Addr := fmt.Sprintf("%p", pv2) + pv2Addr := fmt.Sprintf("%p", &pv2) + v2t := "chan int" + v2s := fmt.Sprintf("%p", v2) + addFormatterTest("%v", v2, v2s) + addFormatterTest("%v", pv2, "<*>"+v2s) + addFormatterTest("%v", &pv2, "<**>"+v2s) + addFormatterTest("%+v", v2, v2s) + addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) + addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) + addFormatterTest("%#v", v2, "("+v2t+")"+v2s) + addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) + addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) + addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) + addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) + addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) +} + +func addFuncFormatterTests() { + // Function with no params and no returns. + v := addIntFormatterTests + nv := (*func())(nil) + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "func()" + vs := fmt.Sprintf("%p", v) + addFormatterTest("%v", v, vs) + addFormatterTest("%v", pv, "<*>"+vs) + addFormatterTest("%v", &pv, "<**>"+vs) + addFormatterTest("%+v", nv, "") + addFormatterTest("%+v", v, vs) + addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) + addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) + addFormatterTest("%+v", nv, "") + addFormatterTest("%#v", v, "("+vt+")"+vs) + addFormatterTest("%#v", pv, "(*"+vt+")"+vs) + addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) + addFormatterTest("%#v", nv, "(*"+vt+")"+"") + addFormatterTest("%#+v", v, "("+vt+")"+vs) + addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) + addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) + addFormatterTest("%#+v", nv, "(*"+vt+")"+"") + + // Function with param and no returns. + v2 := TestFormatter + nv2 := (*func(*testing.T))(nil) + pv2 := &v2 + v2Addr := fmt.Sprintf("%p", pv2) + pv2Addr := fmt.Sprintf("%p", &pv2) + v2t := "func(*testing.T)" + v2s := fmt.Sprintf("%p", v2) + addFormatterTest("%v", v2, v2s) + addFormatterTest("%v", pv2, "<*>"+v2s) + addFormatterTest("%v", &pv2, "<**>"+v2s) + addFormatterTest("%+v", nv2, "") + addFormatterTest("%+v", v2, v2s) + addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) + addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) + addFormatterTest("%+v", nv2, "") + addFormatterTest("%#v", v2, "("+v2t+")"+v2s) + addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) + addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) + addFormatterTest("%#v", nv2, "(*"+v2t+")"+"") + addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) + addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) + addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) + addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") + + // Function with multiple params and multiple returns. + var v3 = func(i int, s string) (b bool, err error) { + return true, nil + } + nv3 := (*func(int, string) (bool, error))(nil) + pv3 := &v3 + v3Addr := fmt.Sprintf("%p", pv3) + pv3Addr := fmt.Sprintf("%p", &pv3) + v3t := "func(int, string) (bool, error)" + v3s := fmt.Sprintf("%p", v3) + addFormatterTest("%v", v3, v3s) + addFormatterTest("%v", pv3, "<*>"+v3s) + addFormatterTest("%v", &pv3, "<**>"+v3s) + addFormatterTest("%+v", nv3, "") + addFormatterTest("%+v", v3, v3s) + addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s) + addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s) + addFormatterTest("%+v", nv3, "") + addFormatterTest("%#v", v3, "("+v3t+")"+v3s) + addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s) + addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s) + addFormatterTest("%#v", nv3, "(*"+v3t+")"+"") + addFormatterTest("%#+v", v3, "("+v3t+")"+v3s) + addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s) + addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s) + addFormatterTest("%#+v", nv3, "(*"+v3t+")"+"") +} + +func addCircularFormatterTests() { + // Struct that is circular through self referencing. + type circular struct { + c *circular + } + v := circular{nil} + v.c = &v + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "spew_test.circular" + vs := "{<*>{<*>}}" + vs2 := "{<*>}" + vs3 := "{c:<*>(" + vAddr + "){c:<*>(" + vAddr + ")}}" + vs4 := "{c:<*>(" + vAddr + ")}" + vs5 := "{c:(*" + vt + "){c:(*" + vt + ")}}" + vs6 := "{c:(*" + vt + ")}" + vs7 := "{c:(*" + vt + ")(" + vAddr + "){c:(*" + vt + ")(" + vAddr + + ")}}" + vs8 := "{c:(*" + vt + ")(" + vAddr + ")}" + addFormatterTest("%v", v, vs) + addFormatterTest("%v", pv, "<*>"+vs2) + addFormatterTest("%v", &pv, "<**>"+vs2) + addFormatterTest("%+v", v, vs3) + addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs4) + addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs4) + addFormatterTest("%#v", v, "("+vt+")"+vs5) + addFormatterTest("%#v", pv, "(*"+vt+")"+vs6) + addFormatterTest("%#v", &pv, "(**"+vt+")"+vs6) + addFormatterTest("%#+v", v, "("+vt+")"+vs7) + addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs8) + addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs8) + + // Structs that are circular through cross referencing. + v2 := xref1{nil} + ts2 := xref2{&v2} + v2.ps2 = &ts2 + pv2 := &v2 + ts2Addr := fmt.Sprintf("%p", &ts2) + v2Addr := fmt.Sprintf("%p", pv2) + pv2Addr := fmt.Sprintf("%p", &pv2) + v2t := "spew_test.xref1" + v2t2 := "spew_test.xref2" + v2s := "{<*>{<*>{<*>}}}" + v2s2 := "{<*>{<*>}}" + v2s3 := "{ps2:<*>(" + ts2Addr + "){ps1:<*>(" + v2Addr + "){ps2:<*>(" + + ts2Addr + ")}}}" + v2s4 := "{ps2:<*>(" + ts2Addr + "){ps1:<*>(" + v2Addr + ")}}" + v2s5 := "{ps2:(*" + v2t2 + "){ps1:(*" + v2t + "){ps2:(*" + v2t2 + + ")}}}" + v2s6 := "{ps2:(*" + v2t2 + "){ps1:(*" + v2t + ")}}" + v2s7 := "{ps2:(*" + v2t2 + ")(" + ts2Addr + "){ps1:(*" + v2t + + ")(" + v2Addr + "){ps2:(*" + v2t2 + ")(" + ts2Addr + + ")}}}" + v2s8 := "{ps2:(*" + v2t2 + ")(" + ts2Addr + "){ps1:(*" + v2t + + ")(" + v2Addr + ")}}" + addFormatterTest("%v", v2, v2s) + addFormatterTest("%v", pv2, "<*>"+v2s2) + addFormatterTest("%v", &pv2, "<**>"+v2s2) + addFormatterTest("%+v", v2, v2s3) + addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s4) + addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s4) + addFormatterTest("%#v", v2, "("+v2t+")"+v2s5) + addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s6) + addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s6) + addFormatterTest("%#+v", v2, "("+v2t+")"+v2s7) + addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s8) + addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s8) + + // Structs that are indirectly circular. + v3 := indirCir1{nil} + tic2 := indirCir2{nil} + tic3 := indirCir3{&v3} + tic2.ps3 = &tic3 + v3.ps2 = &tic2 + pv3 := &v3 + tic2Addr := fmt.Sprintf("%p", &tic2) + tic3Addr := fmt.Sprintf("%p", &tic3) + v3Addr := fmt.Sprintf("%p", pv3) + pv3Addr := fmt.Sprintf("%p", &pv3) + v3t := "spew_test.indirCir1" + v3t2 := "spew_test.indirCir2" + v3t3 := "spew_test.indirCir3" + v3s := "{<*>{<*>{<*>{<*>}}}}" + v3s2 := "{<*>{<*>{<*>}}}" + v3s3 := "{ps2:<*>(" + tic2Addr + "){ps3:<*>(" + tic3Addr + "){ps1:<*>(" + + v3Addr + "){ps2:<*>(" + tic2Addr + ")}}}}" + v3s4 := "{ps2:<*>(" + tic2Addr + "){ps3:<*>(" + tic3Addr + "){ps1:<*>(" + + v3Addr + ")}}}" + v3s5 := "{ps2:(*" + v3t2 + "){ps3:(*" + v3t3 + "){ps1:(*" + v3t + + "){ps2:(*" + v3t2 + ")}}}}" + v3s6 := "{ps2:(*" + v3t2 + "){ps3:(*" + v3t3 + "){ps1:(*" + v3t + + ")}}}" + v3s7 := "{ps2:(*" + v3t2 + ")(" + tic2Addr + "){ps3:(*" + v3t3 + ")(" + + tic3Addr + "){ps1:(*" + v3t + ")(" + v3Addr + "){ps2:(*" + v3t2 + + ")(" + tic2Addr + ")}}}}" + v3s8 := "{ps2:(*" + v3t2 + ")(" + tic2Addr + "){ps3:(*" + v3t3 + ")(" + + tic3Addr + "){ps1:(*" + v3t + ")(" + v3Addr + ")}}}" + addFormatterTest("%v", v3, v3s) + addFormatterTest("%v", pv3, "<*>"+v3s2) + addFormatterTest("%v", &pv3, "<**>"+v3s2) + addFormatterTest("%+v", v3, v3s3) + addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s4) + addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s4) + addFormatterTest("%#v", v3, "("+v3t+")"+v3s5) + addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s6) + addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s6) + addFormatterTest("%#+v", v3, "("+v3t+")"+v3s7) + addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s8) + addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s8) +} + +func addPanicFormatterTests() { + // Type that panics in its Stringer interface. + v := panicer(127) + nv := (*panicer)(nil) + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "spew_test.panicer" + vs := "(PANIC=test panic)127" + addFormatterTest("%v", v, vs) + addFormatterTest("%v", pv, "<*>"+vs) + addFormatterTest("%v", &pv, "<**>"+vs) + addFormatterTest("%v", nv, "") + addFormatterTest("%+v", v, vs) + addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) + addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) + addFormatterTest("%+v", nv, "") + addFormatterTest("%#v", v, "("+vt+")"+vs) + addFormatterTest("%#v", pv, "(*"+vt+")"+vs) + addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) + addFormatterTest("%#v", nv, "(*"+vt+")"+"") + addFormatterTest("%#+v", v, "("+vt+")"+vs) + addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) + addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) + addFormatterTest("%#+v", nv, "(*"+vt+")"+"") +} + +func addErrorFormatterTests() { + // Type that has a custom Error interface. + v := customError(127) + nv := (*customError)(nil) + pv := &v + vAddr := fmt.Sprintf("%p", pv) + pvAddr := fmt.Sprintf("%p", &pv) + vt := "spew_test.customError" + vs := "error: 127" + addFormatterTest("%v", v, vs) + addFormatterTest("%v", pv, "<*>"+vs) + addFormatterTest("%v", &pv, "<**>"+vs) + addFormatterTest("%v", nv, "") + addFormatterTest("%+v", v, vs) + addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) + addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) + addFormatterTest("%+v", nv, "") + addFormatterTest("%#v", v, "("+vt+")"+vs) + addFormatterTest("%#v", pv, "(*"+vt+")"+vs) + addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) + addFormatterTest("%#v", nv, "(*"+vt+")"+"") + addFormatterTest("%#+v", v, "("+vt+")"+vs) + addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) + addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) + addFormatterTest("%#+v", nv, "(*"+vt+")"+"") +} + +func addPassthroughFormatterTests() { + // %x passthrough with uint. + v := uint(4294967295) + pv := &v + vAddr := fmt.Sprintf("%x", pv) + pvAddr := fmt.Sprintf("%x", &pv) + vs := "ffffffff" + addFormatterTest("%x", v, vs) + addFormatterTest("%x", pv, vAddr) + addFormatterTest("%x", &pv, pvAddr) + + // %#x passthrough with uint. + v2 := int(2147483647) + pv2 := &v2 + v2Addr := fmt.Sprintf("%#x", pv2) + pv2Addr := fmt.Sprintf("%#x", &pv2) + v2s := "0x7fffffff" + addFormatterTest("%#x", v2, v2s) + addFormatterTest("%#x", pv2, v2Addr) + addFormatterTest("%#x", &pv2, pv2Addr) + + // %f passthrough with precision. + addFormatterTest("%.2f", 3.1415, "3.14") + addFormatterTest("%.3f", 3.1415, "3.142") + addFormatterTest("%.4f", 3.1415, "3.1415") + + // %f passthrough with width and precision. + addFormatterTest("%5.2f", 3.1415, " 3.14") + addFormatterTest("%6.3f", 3.1415, " 3.142") + addFormatterTest("%7.4f", 3.1415, " 3.1415") + + // %d passthrough with width. + addFormatterTest("%3d", 127, "127") + addFormatterTest("%4d", 127, " 127") + addFormatterTest("%5d", 127, " 127") + + // %q passthrough with string. + addFormatterTest("%q", "test", "\"test\"") +} + +// TestFormatter executes all of the tests described by formatterTests. +func TestFormatter(t *testing.T) { + // Setup tests. + addIntFormatterTests() + addUintFormatterTests() + addBoolFormatterTests() + addFloatFormatterTests() + addComplexFormatterTests() + addArrayFormatterTests() + addSliceFormatterTests() + addStringFormatterTests() + addInterfaceFormatterTests() + addMapFormatterTests() + addStructFormatterTests() + addUintptrFormatterTests() + addUnsafePointerFormatterTests() + addChanFormatterTests() + addFuncFormatterTests() + addCircularFormatterTests() + addPanicFormatterTests() + addErrorFormatterTests() + addPassthroughFormatterTests() + + t.Logf("Running %d tests", len(formatterTests)) + for i, test := range formatterTests { + buf := new(bytes.Buffer) + spew.Fprintf(buf, test.format, test.in) + s := buf.String() + if testFailed(s, test.wants) { + t.Errorf("Formatter #%d format: %s got: %s %s", i, test.format, s, + stringizeWants(test.wants)) + continue + } + } +} + +type testStruct struct { + x int +} + +func (ts testStruct) String() string { + return fmt.Sprintf("ts.%d", ts.x) +} + +type testStructP struct { + x int +} + +func (ts *testStructP) String() string { + return fmt.Sprintf("ts.%d", ts.x) +} + +func TestPrintSortedKeys(t *testing.T) { + cfg := spew.ConfigState{SortKeys: true} + s := cfg.Sprint(map[int]string{1: "1", 3: "3", 2: "2"}) + expected := "map[1:1 2:2 3:3]" + if s != expected { + t.Errorf("Sorted keys mismatch 1:\n %v %v", s, expected) + } + + s = cfg.Sprint(map[stringer]int{"1": 1, "3": 3, "2": 2}) + expected = "map[stringer 1:1 stringer 2:2 stringer 3:3]" + if s != expected { + t.Errorf("Sorted keys mismatch 2:\n %v %v", s, expected) + } + + s = cfg.Sprint(map[pstringer]int{pstringer("1"): 1, pstringer("3"): 3, pstringer("2"): 2}) + expected = "map[stringer 1:1 stringer 2:2 stringer 3:3]" + if spew.UnsafeDisabled { + expected = "map[1:1 2:2 3:3]" + } + if s != expected { + t.Errorf("Sorted keys mismatch 3:\n %v %v", s, expected) + } + + s = cfg.Sprint(map[testStruct]int{testStruct{1}: 1, testStruct{3}: 3, testStruct{2}: 2}) + expected = "map[ts.1:1 ts.2:2 ts.3:3]" + if s != expected { + t.Errorf("Sorted keys mismatch 4:\n %v %v", s, expected) + } + + if !spew.UnsafeDisabled { + s = cfg.Sprint(map[testStructP]int{testStructP{1}: 1, testStructP{3}: 3, testStructP{2}: 2}) + expected = "map[ts.1:1 ts.2:2 ts.3:3]" + if s != expected { + t.Errorf("Sorted keys mismatch 5:\n %v %v", s, expected) + } + } + + s = cfg.Sprint(map[customError]int{customError(1): 1, customError(3): 3, customError(2): 2}) + expected = "map[error: 1:1 error: 2:2 error: 3:3]" + if s != expected { + t.Errorf("Sorted keys mismatch 6:\n %v %v", s, expected) + } +} diff --git a/vendor/github.com/davecgh/go-spew/spew/internal_test.go b/vendor/github.com/davecgh/go-spew/spew/internal_test.go new file mode 100644 index 000000000..20a9cfefc --- /dev/null +++ b/vendor/github.com/davecgh/go-spew/spew/internal_test.go @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2013-2016 Dave Collins + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* +This test file is part of the spew package rather than than the spew_test +package because it needs access to internals to properly test certain cases +which are not possible via the public interface since they should never happen. +*/ + +package spew + +import ( + "bytes" + "reflect" + "testing" +) + +// dummyFmtState implements a fake fmt.State to use for testing invalid +// reflect.Value handling. This is necessary because the fmt package catches +// invalid values before invoking the formatter on them. +type dummyFmtState struct { + bytes.Buffer +} + +func (dfs *dummyFmtState) Flag(f int) bool { + if f == int('+') { + return true + } + return false +} + +func (dfs *dummyFmtState) Precision() (int, bool) { + return 0, false +} + +func (dfs *dummyFmtState) Width() (int, bool) { + return 0, false +} + +// TestInvalidReflectValue ensures the dump and formatter code handles an +// invalid reflect value properly. This needs access to internal state since it +// should never happen in real code and therefore can't be tested via the public +// API. +func TestInvalidReflectValue(t *testing.T) { + i := 1 + + // Dump invalid reflect value. + v := new(reflect.Value) + buf := new(bytes.Buffer) + d := dumpState{w: buf, cs: &Config} + d.dump(*v) + s := buf.String() + want := "" + if s != want { + t.Errorf("InvalidReflectValue #%d\n got: %s want: %s", i, s, want) + } + i++ + + // Formatter invalid reflect value. + buf2 := new(dummyFmtState) + f := formatState{value: *v, cs: &Config, fs: buf2} + f.format(*v) + s = buf2.String() + want = "" + if s != want { + t.Errorf("InvalidReflectValue #%d got: %s want: %s", i, s, want) + } +} + +// SortValues makes the internal sortValues function available to the test +// package. +func SortValues(values []reflect.Value, cs *ConfigState) { + sortValues(values, cs) +} diff --git a/vendor/github.com/davecgh/go-spew/spew/internalunsafe_test.go b/vendor/github.com/davecgh/go-spew/spew/internalunsafe_test.go new file mode 100644 index 000000000..a0c612ec3 --- /dev/null +++ b/vendor/github.com/davecgh/go-spew/spew/internalunsafe_test.go @@ -0,0 +1,102 @@ +// Copyright (c) 2013-2016 Dave Collins + +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. + +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +// NOTE: Due to the following build constraints, this file will only be compiled +// when the code is not running on Google App Engine, compiled by GopherJS, and +// "-tags safe" is not added to the go build command line. The "disableunsafe" +// tag is deprecated and thus should not be used. +// +build !js,!appengine,!safe,!disableunsafe + +/* +This test file is part of the spew package rather than than the spew_test +package because it needs access to internals to properly test certain cases +which are not possible via the public interface since they should never happen. +*/ + +package spew + +import ( + "bytes" + "reflect" + "testing" + "unsafe" +) + +// changeKind uses unsafe to intentionally change the kind of a reflect.Value to +// the maximum kind value which does not exist. This is needed to test the +// fallback code which punts to the standard fmt library for new types that +// might get added to the language. +func changeKind(v *reflect.Value, readOnly bool) { + rvf := (*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(v)) + offsetFlag)) + *rvf = *rvf | ((1< + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +package spew_test + +import ( + "bytes" + "fmt" + "io/ioutil" + "os" + "testing" + + "github.com/davecgh/go-spew/spew" +) + +// spewFunc is used to identify which public function of the spew package or +// ConfigState a test applies to. +type spewFunc int + +const ( + fCSFdump spewFunc = iota + fCSFprint + fCSFprintf + fCSFprintln + fCSPrint + fCSPrintln + fCSSdump + fCSSprint + fCSSprintf + fCSSprintln + fCSErrorf + fCSNewFormatter + fErrorf + fFprint + fFprintln + fPrint + fPrintln + fSdump + fSprint + fSprintf + fSprintln +) + +// Map of spewFunc values to names for pretty printing. +var spewFuncStrings = map[spewFunc]string{ + fCSFdump: "ConfigState.Fdump", + fCSFprint: "ConfigState.Fprint", + fCSFprintf: "ConfigState.Fprintf", + fCSFprintln: "ConfigState.Fprintln", + fCSSdump: "ConfigState.Sdump", + fCSPrint: "ConfigState.Print", + fCSPrintln: "ConfigState.Println", + fCSSprint: "ConfigState.Sprint", + fCSSprintf: "ConfigState.Sprintf", + fCSSprintln: "ConfigState.Sprintln", + fCSErrorf: "ConfigState.Errorf", + fCSNewFormatter: "ConfigState.NewFormatter", + fErrorf: "spew.Errorf", + fFprint: "spew.Fprint", + fFprintln: "spew.Fprintln", + fPrint: "spew.Print", + fPrintln: "spew.Println", + fSdump: "spew.Sdump", + fSprint: "spew.Sprint", + fSprintf: "spew.Sprintf", + fSprintln: "spew.Sprintln", +} + +func (f spewFunc) String() string { + if s, ok := spewFuncStrings[f]; ok { + return s + } + return fmt.Sprintf("Unknown spewFunc (%d)", int(f)) +} + +// spewTest is used to describe a test to be performed against the public +// functions of the spew package or ConfigState. +type spewTest struct { + cs *spew.ConfigState + f spewFunc + format string + in interface{} + want string +} + +// spewTests houses the tests to be performed against the public functions of +// the spew package and ConfigState. +// +// These tests are only intended to ensure the public functions are exercised +// and are intentionally not exhaustive of types. The exhaustive type +// tests are handled in the dump and format tests. +var spewTests []spewTest + +// redirStdout is a helper function to return the standard output from f as a +// byte slice. +func redirStdout(f func()) ([]byte, error) { + tempFile, err := ioutil.TempFile("", "ss-test") + if err != nil { + return nil, err + } + fileName := tempFile.Name() + defer os.Remove(fileName) // Ignore error + + origStdout := os.Stdout + os.Stdout = tempFile + f() + os.Stdout = origStdout + tempFile.Close() + + return ioutil.ReadFile(fileName) +} + +func initSpewTests() { + // Config states with various settings. + scsDefault := spew.NewDefaultConfig() + scsNoMethods := &spew.ConfigState{Indent: " ", DisableMethods: true} + scsNoPmethods := &spew.ConfigState{Indent: " ", DisablePointerMethods: true} + scsMaxDepth := &spew.ConfigState{Indent: " ", MaxDepth: 1} + scsContinue := &spew.ConfigState{Indent: " ", ContinueOnMethod: true} + scsNoPtrAddr := &spew.ConfigState{DisablePointerAddresses: true} + scsNoCap := &spew.ConfigState{DisableCapacities: true} + + // Variables for tests on types which implement Stringer interface with and + // without a pointer receiver. + ts := stringer("test") + tps := pstringer("test") + + type ptrTester struct { + s *struct{} + } + tptr := &ptrTester{s: &struct{}{}} + + // depthTester is used to test max depth handling for structs, array, slices + // and maps. + type depthTester struct { + ic indirCir1 + arr [1]string + slice []string + m map[string]int + } + dt := depthTester{indirCir1{nil}, [1]string{"arr"}, []string{"slice"}, + map[string]int{"one": 1}} + + // Variable for tests on types which implement error interface. + te := customError(10) + + spewTests = []spewTest{ + {scsDefault, fCSFdump, "", int8(127), "(int8) 127\n"}, + {scsDefault, fCSFprint, "", int16(32767), "32767"}, + {scsDefault, fCSFprintf, "%v", int32(2147483647), "2147483647"}, + {scsDefault, fCSFprintln, "", int(2147483647), "2147483647\n"}, + {scsDefault, fCSPrint, "", int64(9223372036854775807), "9223372036854775807"}, + {scsDefault, fCSPrintln, "", uint8(255), "255\n"}, + {scsDefault, fCSSdump, "", uint8(64), "(uint8) 64\n"}, + {scsDefault, fCSSprint, "", complex(1, 2), "(1+2i)"}, + {scsDefault, fCSSprintf, "%v", complex(float32(3), 4), "(3+4i)"}, + {scsDefault, fCSSprintln, "", complex(float64(5), 6), "(5+6i)\n"}, + {scsDefault, fCSErrorf, "%#v", uint16(65535), "(uint16)65535"}, + {scsDefault, fCSNewFormatter, "%v", uint32(4294967295), "4294967295"}, + {scsDefault, fErrorf, "%v", uint64(18446744073709551615), "18446744073709551615"}, + {scsDefault, fFprint, "", float32(3.14), "3.14"}, + {scsDefault, fFprintln, "", float64(6.28), "6.28\n"}, + {scsDefault, fPrint, "", true, "true"}, + {scsDefault, fPrintln, "", false, "false\n"}, + {scsDefault, fSdump, "", complex(-10, -20), "(complex128) (-10-20i)\n"}, + {scsDefault, fSprint, "", complex(-1, -2), "(-1-2i)"}, + {scsDefault, fSprintf, "%v", complex(float32(-3), -4), "(-3-4i)"}, + {scsDefault, fSprintln, "", complex(float64(-5), -6), "(-5-6i)\n"}, + {scsNoMethods, fCSFprint, "", ts, "test"}, + {scsNoMethods, fCSFprint, "", &ts, "<*>test"}, + {scsNoMethods, fCSFprint, "", tps, "test"}, + {scsNoMethods, fCSFprint, "", &tps, "<*>test"}, + {scsNoPmethods, fCSFprint, "", ts, "stringer test"}, + {scsNoPmethods, fCSFprint, "", &ts, "<*>stringer test"}, + {scsNoPmethods, fCSFprint, "", tps, "test"}, + {scsNoPmethods, fCSFprint, "", &tps, "<*>stringer test"}, + {scsMaxDepth, fCSFprint, "", dt, "{{} [] [] map[]}"}, + {scsMaxDepth, fCSFdump, "", dt, "(spew_test.depthTester) {\n" + + " ic: (spew_test.indirCir1) {\n \n },\n" + + " arr: ([1]string) (len=1 cap=1) {\n \n },\n" + + " slice: ([]string) (len=1 cap=1) {\n \n },\n" + + " m: (map[string]int) (len=1) {\n \n }\n}\n"}, + {scsContinue, fCSFprint, "", ts, "(stringer test) test"}, + {scsContinue, fCSFdump, "", ts, "(spew_test.stringer) " + + "(len=4) (stringer test) \"test\"\n"}, + {scsContinue, fCSFprint, "", te, "(error: 10) 10"}, + {scsContinue, fCSFdump, "", te, "(spew_test.customError) " + + "(error: 10) 10\n"}, + {scsNoPtrAddr, fCSFprint, "", tptr, "<*>{<*>{}}"}, + {scsNoPtrAddr, fCSSdump, "", tptr, "(*spew_test.ptrTester)({\ns: (*struct {})({\n})\n})\n"}, + {scsNoCap, fCSSdump, "", make([]string, 0, 10), "([]string) {\n}\n"}, + {scsNoCap, fCSSdump, "", make([]string, 1, 10), "([]string) (len=1) {\n(string) \"\"\n}\n"}, + } +} + +// TestSpew executes all of the tests described by spewTests. +func TestSpew(t *testing.T) { + initSpewTests() + + t.Logf("Running %d tests", len(spewTests)) + for i, test := range spewTests { + buf := new(bytes.Buffer) + switch test.f { + case fCSFdump: + test.cs.Fdump(buf, test.in) + + case fCSFprint: + test.cs.Fprint(buf, test.in) + + case fCSFprintf: + test.cs.Fprintf(buf, test.format, test.in) + + case fCSFprintln: + test.cs.Fprintln(buf, test.in) + + case fCSPrint: + b, err := redirStdout(func() { test.cs.Print(test.in) }) + if err != nil { + t.Errorf("%v #%d %v", test.f, i, err) + continue + } + buf.Write(b) + + case fCSPrintln: + b, err := redirStdout(func() { test.cs.Println(test.in) }) + if err != nil { + t.Errorf("%v #%d %v", test.f, i, err) + continue + } + buf.Write(b) + + case fCSSdump: + str := test.cs.Sdump(test.in) + buf.WriteString(str) + + case fCSSprint: + str := test.cs.Sprint(test.in) + buf.WriteString(str) + + case fCSSprintf: + str := test.cs.Sprintf(test.format, test.in) + buf.WriteString(str) + + case fCSSprintln: + str := test.cs.Sprintln(test.in) + buf.WriteString(str) + + case fCSErrorf: + err := test.cs.Errorf(test.format, test.in) + buf.WriteString(err.Error()) + + case fCSNewFormatter: + fmt.Fprintf(buf, test.format, test.cs.NewFormatter(test.in)) + + case fErrorf: + err := spew.Errorf(test.format, test.in) + buf.WriteString(err.Error()) + + case fFprint: + spew.Fprint(buf, test.in) + + case fFprintln: + spew.Fprintln(buf, test.in) + + case fPrint: + b, err := redirStdout(func() { spew.Print(test.in) }) + if err != nil { + t.Errorf("%v #%d %v", test.f, i, err) + continue + } + buf.Write(b) + + case fPrintln: + b, err := redirStdout(func() { spew.Println(test.in) }) + if err != nil { + t.Errorf("%v #%d %v", test.f, i, err) + continue + } + buf.Write(b) + + case fSdump: + str := spew.Sdump(test.in) + buf.WriteString(str) + + case fSprint: + str := spew.Sprint(test.in) + buf.WriteString(str) + + case fSprintf: + str := spew.Sprintf(test.format, test.in) + buf.WriteString(str) + + case fSprintln: + str := spew.Sprintln(test.in) + buf.WriteString(str) + + default: + t.Errorf("%v #%d unrecognized function", test.f, i) + continue + } + s := buf.String() + if test.want != s { + t.Errorf("ConfigState #%d\n got: %s want: %s", i, s, test.want) + continue + } + } +} diff --git a/vendor/github.com/davecgh/go-spew/test_coverage.txt b/vendor/github.com/davecgh/go-spew/test_coverage.txt new file mode 100644 index 000000000..2cd087a2a --- /dev/null +++ b/vendor/github.com/davecgh/go-spew/test_coverage.txt @@ -0,0 +1,61 @@ + +github.com/davecgh/go-spew/spew/dump.go dumpState.dump 100.00% (88/88) +github.com/davecgh/go-spew/spew/format.go formatState.format 100.00% (82/82) +github.com/davecgh/go-spew/spew/format.go formatState.formatPtr 100.00% (52/52) +github.com/davecgh/go-spew/spew/dump.go dumpState.dumpPtr 100.00% (44/44) +github.com/davecgh/go-spew/spew/dump.go dumpState.dumpSlice 100.00% (39/39) +github.com/davecgh/go-spew/spew/common.go handleMethods 100.00% (30/30) +github.com/davecgh/go-spew/spew/common.go printHexPtr 100.00% (18/18) +github.com/davecgh/go-spew/spew/common.go unsafeReflectValue 100.00% (13/13) +github.com/davecgh/go-spew/spew/format.go formatState.constructOrigFormat 100.00% (12/12) +github.com/davecgh/go-spew/spew/dump.go fdump 100.00% (11/11) +github.com/davecgh/go-spew/spew/format.go formatState.Format 100.00% (11/11) +github.com/davecgh/go-spew/spew/common.go init 100.00% (10/10) +github.com/davecgh/go-spew/spew/common.go printComplex 100.00% (9/9) +github.com/davecgh/go-spew/spew/common.go valuesSorter.Less 100.00% (8/8) +github.com/davecgh/go-spew/spew/format.go formatState.buildDefaultFormat 100.00% (7/7) +github.com/davecgh/go-spew/spew/format.go formatState.unpackValue 100.00% (5/5) +github.com/davecgh/go-spew/spew/dump.go dumpState.indent 100.00% (4/4) +github.com/davecgh/go-spew/spew/common.go catchPanic 100.00% (4/4) +github.com/davecgh/go-spew/spew/config.go ConfigState.convertArgs 100.00% (4/4) +github.com/davecgh/go-spew/spew/spew.go convertArgs 100.00% (4/4) +github.com/davecgh/go-spew/spew/format.go newFormatter 100.00% (3/3) +github.com/davecgh/go-spew/spew/dump.go Sdump 100.00% (3/3) +github.com/davecgh/go-spew/spew/common.go printBool 100.00% (3/3) +github.com/davecgh/go-spew/spew/common.go sortValues 100.00% (3/3) +github.com/davecgh/go-spew/spew/config.go ConfigState.Sdump 100.00% (3/3) +github.com/davecgh/go-spew/spew/dump.go dumpState.unpackValue 100.00% (3/3) +github.com/davecgh/go-spew/spew/spew.go Printf 100.00% (1/1) +github.com/davecgh/go-spew/spew/spew.go Println 100.00% (1/1) +github.com/davecgh/go-spew/spew/spew.go Sprint 100.00% (1/1) +github.com/davecgh/go-spew/spew/spew.go Sprintf 100.00% (1/1) +github.com/davecgh/go-spew/spew/spew.go Sprintln 100.00% (1/1) +github.com/davecgh/go-spew/spew/common.go printFloat 100.00% (1/1) +github.com/davecgh/go-spew/spew/config.go NewDefaultConfig 100.00% (1/1) +github.com/davecgh/go-spew/spew/common.go printInt 100.00% (1/1) +github.com/davecgh/go-spew/spew/common.go printUint 100.00% (1/1) +github.com/davecgh/go-spew/spew/common.go valuesSorter.Len 100.00% (1/1) +github.com/davecgh/go-spew/spew/common.go valuesSorter.Swap 100.00% (1/1) +github.com/davecgh/go-spew/spew/config.go ConfigState.Errorf 100.00% (1/1) +github.com/davecgh/go-spew/spew/config.go ConfigState.Fprint 100.00% (1/1) +github.com/davecgh/go-spew/spew/config.go ConfigState.Fprintf 100.00% (1/1) +github.com/davecgh/go-spew/spew/config.go ConfigState.Fprintln 100.00% (1/1) +github.com/davecgh/go-spew/spew/config.go ConfigState.Print 100.00% (1/1) +github.com/davecgh/go-spew/spew/config.go ConfigState.Printf 100.00% (1/1) +github.com/davecgh/go-spew/spew/config.go ConfigState.Println 100.00% (1/1) +github.com/davecgh/go-spew/spew/config.go ConfigState.Sprint 100.00% (1/1) +github.com/davecgh/go-spew/spew/config.go ConfigState.Sprintf 100.00% (1/1) +github.com/davecgh/go-spew/spew/config.go ConfigState.Sprintln 100.00% (1/1) +github.com/davecgh/go-spew/spew/config.go ConfigState.NewFormatter 100.00% (1/1) +github.com/davecgh/go-spew/spew/config.go ConfigState.Fdump 100.00% (1/1) +github.com/davecgh/go-spew/spew/config.go ConfigState.Dump 100.00% (1/1) +github.com/davecgh/go-spew/spew/dump.go Fdump 100.00% (1/1) +github.com/davecgh/go-spew/spew/dump.go Dump 100.00% (1/1) +github.com/davecgh/go-spew/spew/spew.go Fprintln 100.00% (1/1) +github.com/davecgh/go-spew/spew/format.go NewFormatter 100.00% (1/1) +github.com/davecgh/go-spew/spew/spew.go Errorf 100.00% (1/1) +github.com/davecgh/go-spew/spew/spew.go Fprint 100.00% (1/1) +github.com/davecgh/go-spew/spew/spew.go Fprintf 100.00% (1/1) +github.com/davecgh/go-spew/spew/spew.go Print 100.00% (1/1) +github.com/davecgh/go-spew/spew ------------------------------- 100.00% (505/505) + diff --git a/vendor/github.com/dgrijalva/jwt-go/README.md b/vendor/github.com/dgrijalva/jwt-go/README.md index f48365faf..00f613672 100644 --- a/vendor/github.com/dgrijalva/jwt-go/README.md +++ b/vendor/github.com/dgrijalva/jwt-go/README.md @@ -25,8 +25,8 @@ This library supports the parsing and verification as well as the generation and See [the project documentation](https://godoc.org/github.com/dgrijalva/jwt-go) for examples of usage: -* [Simple example of parsing and validating a token](https://godoc.org/github.com/dgrijalva/jwt-go#example-Parse--Hmac) -* [Simple example of building and signing a token](https://godoc.org/github.com/dgrijalva/jwt-go#example-New--Hmac) +* [Simple example of parsing and validating a token](https://godoc.org/github.com/dgrijalva/jwt-go#example_Parse_hmac) +* [Simple example of building and signing a token](https://godoc.org/github.com/dgrijalva/jwt-go#example_New_hmac) * [Directory of Examples](https://godoc.org/github.com/dgrijalva/jwt-go#pkg-examples) ## Extensions diff --git a/vendor/github.com/dgrijalva/jwt-go/ecdsa_test.go b/vendor/github.com/dgrijalva/jwt-go/ecdsa_test.go new file mode 100644 index 000000000..753047b1e --- /dev/null +++ b/vendor/github.com/dgrijalva/jwt-go/ecdsa_test.go @@ -0,0 +1,100 @@ +package jwt_test + +import ( + "crypto/ecdsa" + "io/ioutil" + "strings" + "testing" + + "github.com/dgrijalva/jwt-go" +) + +var ecdsaTestData = []struct { + name string + keys map[string]string + tokenString string + alg string + claims map[string]interface{} + valid bool +}{ + { + "Basic ES256", + map[string]string{"private": "test/ec256-private.pem", "public": "test/ec256-public.pem"}, + "eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJmb28iOiJiYXIifQ.feG39E-bn8HXAKhzDZq7yEAPWYDhZlwTn3sePJnU9VrGMmwdXAIEyoOnrjreYlVM_Z4N13eK9-TmMTWyfKJtHQ", + "ES256", + map[string]interface{}{"foo": "bar"}, + true, + }, + { + "Basic ES384", + map[string]string{"private": "test/ec384-private.pem", "public": "test/ec384-public.pem"}, + "eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzM4NCJ9.eyJmb28iOiJiYXIifQ.ngAfKMbJUh0WWubSIYe5GMsA-aHNKwFbJk_wq3lq23aPp8H2anb1rRILIzVR0gUf4a8WzDtrzmiikuPWyCS6CN4-PwdgTk-5nehC7JXqlaBZU05p3toM3nWCwm_LXcld", + "ES384", + map[string]interface{}{"foo": "bar"}, + true, + }, + { + "Basic ES512", + map[string]string{"private": "test/ec512-private.pem", "public": "test/ec512-public.pem"}, + "eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzUxMiJ9.eyJmb28iOiJiYXIifQ.AAU0TvGQOcdg2OvrwY73NHKgfk26UDekh9Prz-L_iWuTBIBqOFCWwwLsRiHB1JOddfKAls5do1W0jR_F30JpVd-6AJeTjGKA4C1A1H6gIKwRY0o_tFDIydZCl_lMBMeG5VNFAjO86-WCSKwc3hqaGkq1MugPRq_qrF9AVbuEB4JPLyL5", + "ES512", + map[string]interface{}{"foo": "bar"}, + true, + }, + { + "basic ES256 invalid: foo => bar", + map[string]string{"private": "test/ec256-private.pem", "public": "test/ec256-public.pem"}, + "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIifQ.MEQCIHoSJnmGlPaVQDqacx_2XlXEhhqtWceVopjomc2PJLtdAiAUTeGPoNYxZw0z8mgOnnIcjoxRuNDVZvybRZF3wR1l8W", + "ES256", + map[string]interface{}{"foo": "bar"}, + false, + }, +} + +func TestECDSAVerify(t *testing.T) { + for _, data := range ecdsaTestData { + var err error + + key, _ := ioutil.ReadFile(data.keys["public"]) + + var ecdsaKey *ecdsa.PublicKey + if ecdsaKey, err = jwt.ParseECPublicKeyFromPEM(key); err != nil { + t.Errorf("Unable to parse ECDSA public key: %v", err) + } + + parts := strings.Split(data.tokenString, ".") + + method := jwt.GetSigningMethod(data.alg) + err = method.Verify(strings.Join(parts[0:2], "."), parts[2], ecdsaKey) + if data.valid && err != nil { + t.Errorf("[%v] Error while verifying key: %v", data.name, err) + } + if !data.valid && err == nil { + t.Errorf("[%v] Invalid key passed validation", data.name) + } + } +} + +func TestECDSASign(t *testing.T) { + for _, data := range ecdsaTestData { + var err error + key, _ := ioutil.ReadFile(data.keys["private"]) + + var ecdsaKey *ecdsa.PrivateKey + if ecdsaKey, err = jwt.ParseECPrivateKeyFromPEM(key); err != nil { + t.Errorf("Unable to parse ECDSA private key: %v", err) + } + + if data.valid { + parts := strings.Split(data.tokenString, ".") + method := jwt.GetSigningMethod(data.alg) + sig, err := method.Sign(strings.Join(parts[0:2], "."), ecdsaKey) + if err != nil { + t.Errorf("[%v] Error signing token: %v", data.name, err) + } + if sig == parts[2] { + t.Errorf("[%v] Identical signatures\nbefore:\n%v\nafter:\n%v", data.name, parts[2], sig) + } + } + } +} diff --git a/vendor/github.com/dgrijalva/jwt-go/example_test.go b/vendor/github.com/dgrijalva/jwt-go/example_test.go new file mode 100644 index 000000000..ae8b788a0 --- /dev/null +++ b/vendor/github.com/dgrijalva/jwt-go/example_test.go @@ -0,0 +1,114 @@ +package jwt_test + +import ( + "fmt" + "github.com/dgrijalva/jwt-go" + "time" +) + +// Example (atypical) using the StandardClaims type by itself to parse a token. +// The StandardClaims type is designed to be embedded into your custom types +// to provide standard validation features. You can use it alone, but there's +// no way to retrieve other fields after parsing. +// See the CustomClaimsType example for intended usage. +func ExampleNewWithClaims_standardClaims() { + mySigningKey := []byte("AllYourBase") + + // Create the Claims + claims := &jwt.StandardClaims{ + ExpiresAt: 15000, + Issuer: "test", + } + + token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims) + ss, err := token.SignedString(mySigningKey) + fmt.Printf("%v %v", ss, err) + //Output: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MDAwLCJpc3MiOiJ0ZXN0In0.QsODzZu3lUZMVdhbO76u3Jv02iYCvEHcYVUI1kOWEU0 +} + +// Example creating a token using a custom claims type. The StandardClaim is embedded +// in the custom type to allow for easy encoding, parsing and validation of standard claims. +func ExampleNewWithClaims_customClaimsType() { + mySigningKey := []byte("AllYourBase") + + type MyCustomClaims struct { + Foo string `json:"foo"` + jwt.StandardClaims + } + + // Create the Claims + claims := MyCustomClaims{ + "bar", + jwt.StandardClaims{ + ExpiresAt: 15000, + Issuer: "test", + }, + } + + token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims) + ss, err := token.SignedString(mySigningKey) + fmt.Printf("%v %v", ss, err) + //Output: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIiLCJleHAiOjE1MDAwLCJpc3MiOiJ0ZXN0In0.HE7fK0xOQwFEr4WDgRWj4teRPZ6i3GLwD5YCm6Pwu_c +} + +// Example creating a token using a custom claims type. The StandardClaim is embedded +// in the custom type to allow for easy encoding, parsing and validation of standard claims. +func ExampleParseWithClaims_customClaimsType() { + tokenString := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIiLCJleHAiOjE1MDAwLCJpc3MiOiJ0ZXN0In0.HE7fK0xOQwFEr4WDgRWj4teRPZ6i3GLwD5YCm6Pwu_c" + + type MyCustomClaims struct { + Foo string `json:"foo"` + jwt.StandardClaims + } + + // sample token is expired. override time so it parses as valid + at(time.Unix(0, 0), func() { + token, err := jwt.ParseWithClaims(tokenString, &MyCustomClaims{}, func(token *jwt.Token) (interface{}, error) { + return []byte("AllYourBase"), nil + }) + + if claims, ok := token.Claims.(*MyCustomClaims); ok && token.Valid { + fmt.Printf("%v %v", claims.Foo, claims.StandardClaims.ExpiresAt) + } else { + fmt.Println(err) + } + }) + + // Output: bar 15000 +} + +// Override time value for tests. Restore default value after. +func at(t time.Time, f func()) { + jwt.TimeFunc = func() time.Time { + return t + } + f() + jwt.TimeFunc = time.Now +} + +// An example of parsing the error types using bitfield checks +func ExampleParse_errorChecking() { + // Token from another example. This token is expired + var tokenString = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIiLCJleHAiOjE1MDAwLCJpc3MiOiJ0ZXN0In0.HE7fK0xOQwFEr4WDgRWj4teRPZ6i3GLwD5YCm6Pwu_c" + + token, err := jwt.Parse(tokenString, func(token *jwt.Token) (interface{}, error) { + return []byte("AllYourBase"), nil + }) + + if token.Valid { + fmt.Println("You look nice today") + } else if ve, ok := err.(*jwt.ValidationError); ok { + if ve.Errors&jwt.ValidationErrorMalformed != 0 { + fmt.Println("That's not even a token") + } else if ve.Errors&(jwt.ValidationErrorExpired|jwt.ValidationErrorNotValidYet) != 0 { + // Token is either expired or not active yet + fmt.Println("Timing is everything") + } else { + fmt.Println("Couldn't handle this token:", err) + } + } else { + fmt.Println("Couldn't handle this token:", err) + } + + // Output: Timing is everything +} diff --git a/vendor/github.com/dgrijalva/jwt-go/hmac_example_test.go b/vendor/github.com/dgrijalva/jwt-go/hmac_example_test.go new file mode 100644 index 000000000..8fb567820 --- /dev/null +++ b/vendor/github.com/dgrijalva/jwt-go/hmac_example_test.go @@ -0,0 +1,64 @@ +package jwt_test + +import ( + "fmt" + "github.com/dgrijalva/jwt-go" + "io/ioutil" + "time" +) + +// For HMAC signing method, the key can be any []byte. It is recommended to generate +// a key using crypto/rand or something equivalent. You need the same key for signing +// and validating. +var hmacSampleSecret []byte + +func init() { + // Load sample key data + if keyData, e := ioutil.ReadFile("test/hmacTestKey"); e == nil { + hmacSampleSecret = keyData + } else { + panic(e) + } +} + +// Example creating, signing, and encoding a JWT token using the HMAC signing method +func ExampleNew_hmac() { + // Create a new token object, specifying signing method and the claims + // you would like it to contain. + token := jwt.NewWithClaims(jwt.SigningMethodHS256, jwt.MapClaims{ + "foo": "bar", + "nbf": time.Date(2015, 10, 10, 12, 0, 0, 0, time.UTC).Unix(), + }) + + // Sign and get the complete encoded token as a string using the secret + tokenString, err := token.SignedString(hmacSampleSecret) + + fmt.Println(tokenString, err) + // Output: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIiLCJuYmYiOjE0NDQ0Nzg0MDB9.u1riaD1rW97opCoAuRCTy4w58Br-Zk-bh7vLiRIsrpU +} + +// Example parsing and validating a token using the HMAC signing method +func ExampleParse_hmac() { + // sample token string taken from the New example + tokenString := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIiLCJuYmYiOjE0NDQ0Nzg0MDB9.u1riaD1rW97opCoAuRCTy4w58Br-Zk-bh7vLiRIsrpU" + + // Parse takes the token string and a function for looking up the key. The latter is especially + // useful if you use multiple keys for your application. The standard is to use 'kid' in the + // head of the token to identify which key to use, but the parsed token (head and claims) is provided + // to the callback, providing flexibility. + token, err := jwt.Parse(tokenString, func(token *jwt.Token) (interface{}, error) { + // Don't forget to validate the alg is what you expect: + if _, ok := token.Method.(*jwt.SigningMethodHMAC); !ok { + return nil, fmt.Errorf("Unexpected signing method: %v", token.Header["alg"]) + } + return hmacSampleSecret, nil + }) + + if claims, ok := token.Claims.(jwt.MapClaims); ok && token.Valid { + fmt.Println(claims["foo"], claims["nbf"]) + } else { + fmt.Println(err) + } + + // Output: bar 1.4444784e+09 +} diff --git a/vendor/github.com/dgrijalva/jwt-go/hmac_test.go b/vendor/github.com/dgrijalva/jwt-go/hmac_test.go new file mode 100644 index 000000000..c7e114f4f --- /dev/null +++ b/vendor/github.com/dgrijalva/jwt-go/hmac_test.go @@ -0,0 +1,91 @@ +package jwt_test + +import ( + "github.com/dgrijalva/jwt-go" + "io/ioutil" + "strings" + "testing" +) + +var hmacTestData = []struct { + name string + tokenString string + alg string + claims map[string]interface{} + valid bool +}{ + { + "web sample", + "eyJ0eXAiOiJKV1QiLA0KICJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFtcGxlLmNvbS9pc19yb290Ijp0cnVlfQ.dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk", + "HS256", + map[string]interface{}{"iss": "joe", "exp": 1300819380, "http://example.com/is_root": true}, + true, + }, + { + "HS384", + "eyJhbGciOiJIUzM4NCIsInR5cCI6IkpXVCJ9.eyJleHAiOjEuMzAwODE5MzhlKzA5LCJodHRwOi8vZXhhbXBsZS5jb20vaXNfcm9vdCI6dHJ1ZSwiaXNzIjoiam9lIn0.KWZEuOD5lbBxZ34g7F-SlVLAQ_r5KApWNWlZIIMyQVz5Zs58a7XdNzj5_0EcNoOy", + "HS384", + map[string]interface{}{"iss": "joe", "exp": 1300819380, "http://example.com/is_root": true}, + true, + }, + { + "HS512", + "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJleHAiOjEuMzAwODE5MzhlKzA5LCJodHRwOi8vZXhhbXBsZS5jb20vaXNfcm9vdCI6dHJ1ZSwiaXNzIjoiam9lIn0.CN7YijRX6Aw1n2jyI2Id1w90ja-DEMYiWixhYCyHnrZ1VfJRaFQz1bEbjjA5Fn4CLYaUG432dEYmSbS4Saokmw", + "HS512", + map[string]interface{}{"iss": "joe", "exp": 1300819380, "http://example.com/is_root": true}, + true, + }, + { + "web sample: invalid", + "eyJ0eXAiOiJKV1QiLA0KICJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFtcGxlLmNvbS9pc19yb290Ijp0cnVlfQ.dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXo", + "HS256", + map[string]interface{}{"iss": "joe", "exp": 1300819380, "http://example.com/is_root": true}, + false, + }, +} + +// Sample data from http://tools.ietf.org/html/draft-jones-json-web-signature-04#appendix-A.1 +var hmacTestKey, _ = ioutil.ReadFile("test/hmacTestKey") + +func TestHMACVerify(t *testing.T) { + for _, data := range hmacTestData { + parts := strings.Split(data.tokenString, ".") + + method := jwt.GetSigningMethod(data.alg) + err := method.Verify(strings.Join(parts[0:2], "."), parts[2], hmacTestKey) + if data.valid && err != nil { + t.Errorf("[%v] Error while verifying key: %v", data.name, err) + } + if !data.valid && err == nil { + t.Errorf("[%v] Invalid key passed validation", data.name) + } + } +} + +func TestHMACSign(t *testing.T) { + for _, data := range hmacTestData { + if data.valid { + parts := strings.Split(data.tokenString, ".") + method := jwt.GetSigningMethod(data.alg) + sig, err := method.Sign(strings.Join(parts[0:2], "."), hmacTestKey) + if err != nil { + t.Errorf("[%v] Error signing token: %v", data.name, err) + } + if sig != parts[2] { + t.Errorf("[%v] Incorrect signature.\nwas:\n%v\nexpecting:\n%v", data.name, sig, parts[2]) + } + } + } +} + +func BenchmarkHS256Signing(b *testing.B) { + benchmarkSigning(b, jwt.SigningMethodHS256, hmacTestKey) +} + +func BenchmarkHS384Signing(b *testing.B) { + benchmarkSigning(b, jwt.SigningMethodHS384, hmacTestKey) +} + +func BenchmarkHS512Signing(b *testing.B) { + benchmarkSigning(b, jwt.SigningMethodHS512, hmacTestKey) +} diff --git a/vendor/github.com/dgrijalva/jwt-go/http_example_test.go b/vendor/github.com/dgrijalva/jwt-go/http_example_test.go new file mode 100644 index 000000000..82e9c50a4 --- /dev/null +++ b/vendor/github.com/dgrijalva/jwt-go/http_example_test.go @@ -0,0 +1,216 @@ +package jwt_test + +// Example HTTP auth using asymmetric crypto/RSA keys +// This is based on a (now outdated) example at https://gist.github.com/cryptix/45c33ecf0ae54828e63b + +import ( + "bytes" + "crypto/rsa" + "fmt" + "github.com/dgrijalva/jwt-go" + "github.com/dgrijalva/jwt-go/request" + "io" + "io/ioutil" + "log" + "net" + "net/http" + "net/url" + "strings" + "time" +) + +// location of the files used for signing and verification +const ( + privKeyPath = "test/sample_key" // openssl genrsa -out app.rsa keysize + pubKeyPath = "test/sample_key.pub" // openssl rsa -in app.rsa -pubout > app.rsa.pub +) + +var ( + verifyKey *rsa.PublicKey + signKey *rsa.PrivateKey + serverPort int + // storing sample username/password pairs + // don't do this on a real server + users = map[string]string{ + "test": "known", + } +) + +// read the key files before starting http handlers +func init() { + signBytes, err := ioutil.ReadFile(privKeyPath) + fatal(err) + + signKey, err = jwt.ParseRSAPrivateKeyFromPEM(signBytes) + fatal(err) + + verifyBytes, err := ioutil.ReadFile(pubKeyPath) + fatal(err) + + verifyKey, err = jwt.ParseRSAPublicKeyFromPEM(verifyBytes) + fatal(err) + + http.HandleFunc("/authenticate", authHandler) + http.HandleFunc("/restricted", restrictedHandler) + + // Setup listener + listener, err := net.ListenTCP("tcp", &net.TCPAddr{}) + serverPort = listener.Addr().(*net.TCPAddr).Port + + log.Println("Listening...") + go func() { + fatal(http.Serve(listener, nil)) + }() +} + +var start func() + +func fatal(err error) { + if err != nil { + log.Fatal(err) + } +} + +// Define some custom types were going to use within our tokens +type CustomerInfo struct { + Name string + Kind string +} + +type CustomClaimsExample struct { + *jwt.StandardClaims + TokenType string + CustomerInfo +} + +func Example_getTokenViaHTTP() { + // See func authHandler for an example auth handler that produces a token + res, err := http.PostForm(fmt.Sprintf("http://localhost:%v/authenticate", serverPort), url.Values{ + "user": {"test"}, + "pass": {"known"}, + }) + if err != nil { + fatal(err) + } + + if res.StatusCode != 200 { + fmt.Println("Unexpected status code", res.StatusCode) + } + + // Read the token out of the response body + buf := new(bytes.Buffer) + io.Copy(buf, res.Body) + res.Body.Close() + tokenString := strings.TrimSpace(buf.String()) + + // Parse the token + token, err := jwt.ParseWithClaims(tokenString, &CustomClaimsExample{}, func(token *jwt.Token) (interface{}, error) { + // since we only use the one private key to sign the tokens, + // we also only use its public counter part to verify + return verifyKey, nil + }) + fatal(err) + + claims := token.Claims.(*CustomClaimsExample) + fmt.Println(claims.CustomerInfo.Name) + + //Output: test +} + +func Example_useTokenViaHTTP() { + + // Make a sample token + // In a real world situation, this token will have been acquired from + // some other API call (see Example_getTokenViaHTTP) + token, err := createToken("foo") + fatal(err) + + // Make request. See func restrictedHandler for example request processor + req, err := http.NewRequest("GET", fmt.Sprintf("http://localhost:%v/restricted", serverPort), nil) + fatal(err) + req.Header.Set("Authorization", fmt.Sprintf("Bearer %v", token)) + res, err := http.DefaultClient.Do(req) + fatal(err) + + // Read the response body + buf := new(bytes.Buffer) + io.Copy(buf, res.Body) + res.Body.Close() + fmt.Println(buf.String()) + + // Output: Welcome, foo +} + +func createToken(user string) (string, error) { + // create a signer for rsa 256 + t := jwt.New(jwt.GetSigningMethod("RS256")) + + // set our claims + t.Claims = &CustomClaimsExample{ + &jwt.StandardClaims{ + // set the expire time + // see http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-20#section-4.1.4 + ExpiresAt: time.Now().Add(time.Minute * 1).Unix(), + }, + "level1", + CustomerInfo{user, "human"}, + } + + // Creat token string + return t.SignedString(signKey) +} + +// reads the form values, checks them and creates the token +func authHandler(w http.ResponseWriter, r *http.Request) { + // make sure its post + if r.Method != "POST" { + w.WriteHeader(http.StatusBadRequest) + fmt.Fprintln(w, "No POST", r.Method) + return + } + + user := r.FormValue("user") + pass := r.FormValue("pass") + + log.Printf("Authenticate: user[%s] pass[%s]\n", user, pass) + + // check values + if user != "test" || pass != "known" { + w.WriteHeader(http.StatusForbidden) + fmt.Fprintln(w, "Wrong info") + return + } + + tokenString, err := createToken(user) + if err != nil { + w.WriteHeader(http.StatusInternalServerError) + fmt.Fprintln(w, "Sorry, error while Signing Token!") + log.Printf("Token Signing error: %v\n", err) + return + } + + w.Header().Set("Content-Type", "application/jwt") + w.WriteHeader(http.StatusOK) + fmt.Fprintln(w, tokenString) +} + +// only accessible with a valid token +func restrictedHandler(w http.ResponseWriter, r *http.Request) { + // Get token from request + token, err := request.ParseFromRequestWithClaims(r, request.OAuth2Extractor, &CustomClaimsExample{}, func(token *jwt.Token) (interface{}, error) { + // since we only use the one private key to sign the tokens, + // we also only use its public counter part to verify + return verifyKey, nil + }) + + // If the token is missing or invalid, return error + if err != nil { + w.WriteHeader(http.StatusUnauthorized) + fmt.Fprintln(w, "Invalid token:", err) + return + } + + // Token is valid + fmt.Fprintln(w, "Welcome,", token.Claims.(*CustomClaimsExample).Name) + return +} diff --git a/vendor/github.com/dgrijalva/jwt-go/none_test.go b/vendor/github.com/dgrijalva/jwt-go/none_test.go new file mode 100644 index 000000000..29a69efef --- /dev/null +++ b/vendor/github.com/dgrijalva/jwt-go/none_test.go @@ -0,0 +1,72 @@ +package jwt_test + +import ( + "github.com/dgrijalva/jwt-go" + "strings" + "testing" +) + +var noneTestData = []struct { + name string + tokenString string + alg string + key interface{} + claims map[string]interface{} + valid bool +}{ + { + "Basic", + "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJmb28iOiJiYXIifQ.", + "none", + jwt.UnsafeAllowNoneSignatureType, + map[string]interface{}{"foo": "bar"}, + true, + }, + { + "Basic - no key", + "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJmb28iOiJiYXIifQ.", + "none", + nil, + map[string]interface{}{"foo": "bar"}, + false, + }, + { + "Signed", + "eyJhbGciOiJSUzM4NCIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIifQ.W-jEzRfBigtCWsinvVVuldiuilzVdU5ty0MvpLaSaqK9PlAWWlDQ1VIQ_qSKzwL5IXaZkvZFJXT3yL3n7OUVu7zCNJzdwznbC8Z-b0z2lYvcklJYi2VOFRcGbJtXUqgjk2oGsiqUMUMOLP70TTefkpsgqDxbRh9CDUfpOJgW-dU7cmgaoswe3wjUAUi6B6G2YEaiuXC0XScQYSYVKIzgKXJV8Zw-7AN_DBUI4GkTpsvQ9fVVjZM9csQiEXhYekyrKu1nu_POpQonGd8yqkIyXPECNmmqH5jH4sFiF67XhD7_JpkvLziBpI-uh86evBUadmHhb9Otqw3uV3NTaXLzJw", + "none", + jwt.UnsafeAllowNoneSignatureType, + map[string]interface{}{"foo": "bar"}, + false, + }, +} + +func TestNoneVerify(t *testing.T) { + for _, data := range noneTestData { + parts := strings.Split(data.tokenString, ".") + + method := jwt.GetSigningMethod(data.alg) + err := method.Verify(strings.Join(parts[0:2], "."), parts[2], data.key) + if data.valid && err != nil { + t.Errorf("[%v] Error while verifying key: %v", data.name, err) + } + if !data.valid && err == nil { + t.Errorf("[%v] Invalid key passed validation", data.name) + } + } +} + +func TestNoneSign(t *testing.T) { + for _, data := range noneTestData { + if data.valid { + parts := strings.Split(data.tokenString, ".") + method := jwt.GetSigningMethod(data.alg) + sig, err := method.Sign(strings.Join(parts[0:2], "."), data.key) + if err != nil { + t.Errorf("[%v] Error signing token: %v", data.name, err) + } + if sig != parts[2] { + t.Errorf("[%v] Incorrect signature.\nwas:\n%v\nexpecting:\n%v", data.name, sig, parts[2]) + } + } + } +} diff --git a/vendor/github.com/dgrijalva/jwt-go/parser.go b/vendor/github.com/dgrijalva/jwt-go/parser.go index 7bf1c4ea0..7020c52a1 100644 --- a/vendor/github.com/dgrijalva/jwt-go/parser.go +++ b/vendor/github.com/dgrijalva/jwt-go/parser.go @@ -8,9 +8,8 @@ import ( ) type Parser struct { - ValidMethods []string // If populated, only these methods will be considered valid - UseJSONNumber bool // Use JSON Number format in JSON decoder - SkipClaimsValidation bool // Skip claims validation during token parsing + ValidMethods []string // If populated, only these methods will be considered valid + UseJSONNumber bool // Use JSON Number format in JSON decoder } // Parse, validate, and return a token. @@ -102,16 +101,14 @@ func (p *Parser) ParseWithClaims(tokenString string, claims Claims, keyFunc Keyf vErr := &ValidationError{} // Validate Claims - if !p.SkipClaimsValidation { - if err := token.Claims.Valid(); err != nil { + if err := token.Claims.Valid(); err != nil { - // If the Claims Valid returned an error, check if it is a validation error, - // If it was another error type, create a ValidationError with a generic ClaimsInvalid flag set - if e, ok := err.(*ValidationError); !ok { - vErr = &ValidationError{Inner: err, Errors: ValidationErrorClaimsInvalid} - } else { - vErr = e - } + // If the Claims Valid returned an error, check if it is a validation error, + // If it was another error type, create a ValidationError with a generic ClaimsInvalid flag set + if e, ok := err.(*ValidationError); !ok { + vErr = &ValidationError{Inner: err, Errors: ValidationErrorClaimsInvalid} + } else { + vErr = e } } diff --git a/vendor/github.com/dgrijalva/jwt-go/parser_test.go b/vendor/github.com/dgrijalva/jwt-go/parser_test.go new file mode 100644 index 000000000..0c86801b9 --- /dev/null +++ b/vendor/github.com/dgrijalva/jwt-go/parser_test.go @@ -0,0 +1,252 @@ +package jwt_test + +import ( + "crypto/rsa" + "encoding/json" + "fmt" + "reflect" + "testing" + "time" + + "github.com/dgrijalva/jwt-go" + "github.com/dgrijalva/jwt-go/test" +) + +var keyFuncError error = fmt.Errorf("error loading key") + +var ( + jwtTestDefaultKey *rsa.PublicKey + defaultKeyFunc jwt.Keyfunc = func(t *jwt.Token) (interface{}, error) { return jwtTestDefaultKey, nil } + emptyKeyFunc jwt.Keyfunc = func(t *jwt.Token) (interface{}, error) { return nil, nil } + errorKeyFunc jwt.Keyfunc = func(t *jwt.Token) (interface{}, error) { return nil, keyFuncError } + nilKeyFunc jwt.Keyfunc = nil +) + +func init() { + jwtTestDefaultKey = test.LoadRSAPublicKeyFromDisk("test/sample_key.pub") +} + +var jwtTestData = []struct { + name string + tokenString string + keyfunc jwt.Keyfunc + claims jwt.Claims + valid bool + errors uint32 + parser *jwt.Parser +}{ + { + "basic", + "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJmb28iOiJiYXIifQ.FhkiHkoESI_cG3NPigFrxEk9Z60_oXrOT2vGm9Pn6RDgYNovYORQmmA0zs1AoAOf09ly2Nx2YAg6ABqAYga1AcMFkJljwxTT5fYphTuqpWdy4BELeSYJx5Ty2gmr8e7RonuUztrdD5WfPqLKMm1Ozp_T6zALpRmwTIW0QPnaBXaQD90FplAg46Iy1UlDKr-Eupy0i5SLch5Q-p2ZpaL_5fnTIUDlxC3pWhJTyx_71qDI-mAA_5lE_VdroOeflG56sSmDxopPEG3bFlSu1eowyBfxtu0_CuVd-M42RU75Zc4Gsj6uV77MBtbMrf4_7M_NUTSgoIF3fRqxrj0NzihIBg", + defaultKeyFunc, + jwt.MapClaims{"foo": "bar"}, + true, + 0, + nil, + }, + { + "basic expired", + "", // autogen + defaultKeyFunc, + jwt.MapClaims{"foo": "bar", "exp": float64(time.Now().Unix() - 100)}, + false, + jwt.ValidationErrorExpired, + nil, + }, + { + "basic nbf", + "", // autogen + defaultKeyFunc, + jwt.MapClaims{"foo": "bar", "nbf": float64(time.Now().Unix() + 100)}, + false, + jwt.ValidationErrorNotValidYet, + nil, + }, + { + "expired and nbf", + "", // autogen + defaultKeyFunc, + jwt.MapClaims{"foo": "bar", "nbf": float64(time.Now().Unix() + 100), "exp": float64(time.Now().Unix() - 100)}, + false, + jwt.ValidationErrorNotValidYet | jwt.ValidationErrorExpired, + nil, + }, + { + "basic invalid", + "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJmb28iOiJiYXIifQ.EhkiHkoESI_cG3NPigFrxEk9Z60_oXrOT2vGm9Pn6RDgYNovYORQmmA0zs1AoAOf09ly2Nx2YAg6ABqAYga1AcMFkJljwxTT5fYphTuqpWdy4BELeSYJx5Ty2gmr8e7RonuUztrdD5WfPqLKMm1Ozp_T6zALpRmwTIW0QPnaBXaQD90FplAg46Iy1UlDKr-Eupy0i5SLch5Q-p2ZpaL_5fnTIUDlxC3pWhJTyx_71qDI-mAA_5lE_VdroOeflG56sSmDxopPEG3bFlSu1eowyBfxtu0_CuVd-M42RU75Zc4Gsj6uV77MBtbMrf4_7M_NUTSgoIF3fRqxrj0NzihIBg", + defaultKeyFunc, + jwt.MapClaims{"foo": "bar"}, + false, + jwt.ValidationErrorSignatureInvalid, + nil, + }, + { + "basic nokeyfunc", + "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJmb28iOiJiYXIifQ.FhkiHkoESI_cG3NPigFrxEk9Z60_oXrOT2vGm9Pn6RDgYNovYORQmmA0zs1AoAOf09ly2Nx2YAg6ABqAYga1AcMFkJljwxTT5fYphTuqpWdy4BELeSYJx5Ty2gmr8e7RonuUztrdD5WfPqLKMm1Ozp_T6zALpRmwTIW0QPnaBXaQD90FplAg46Iy1UlDKr-Eupy0i5SLch5Q-p2ZpaL_5fnTIUDlxC3pWhJTyx_71qDI-mAA_5lE_VdroOeflG56sSmDxopPEG3bFlSu1eowyBfxtu0_CuVd-M42RU75Zc4Gsj6uV77MBtbMrf4_7M_NUTSgoIF3fRqxrj0NzihIBg", + nilKeyFunc, + jwt.MapClaims{"foo": "bar"}, + false, + jwt.ValidationErrorUnverifiable, + nil, + }, + { + "basic nokey", + "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJmb28iOiJiYXIifQ.FhkiHkoESI_cG3NPigFrxEk9Z60_oXrOT2vGm9Pn6RDgYNovYORQmmA0zs1AoAOf09ly2Nx2YAg6ABqAYga1AcMFkJljwxTT5fYphTuqpWdy4BELeSYJx5Ty2gmr8e7RonuUztrdD5WfPqLKMm1Ozp_T6zALpRmwTIW0QPnaBXaQD90FplAg46Iy1UlDKr-Eupy0i5SLch5Q-p2ZpaL_5fnTIUDlxC3pWhJTyx_71qDI-mAA_5lE_VdroOeflG56sSmDxopPEG3bFlSu1eowyBfxtu0_CuVd-M42RU75Zc4Gsj6uV77MBtbMrf4_7M_NUTSgoIF3fRqxrj0NzihIBg", + emptyKeyFunc, + jwt.MapClaims{"foo": "bar"}, + false, + jwt.ValidationErrorSignatureInvalid, + nil, + }, + { + "basic errorkey", + "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJmb28iOiJiYXIifQ.FhkiHkoESI_cG3NPigFrxEk9Z60_oXrOT2vGm9Pn6RDgYNovYORQmmA0zs1AoAOf09ly2Nx2YAg6ABqAYga1AcMFkJljwxTT5fYphTuqpWdy4BELeSYJx5Ty2gmr8e7RonuUztrdD5WfPqLKMm1Ozp_T6zALpRmwTIW0QPnaBXaQD90FplAg46Iy1UlDKr-Eupy0i5SLch5Q-p2ZpaL_5fnTIUDlxC3pWhJTyx_71qDI-mAA_5lE_VdroOeflG56sSmDxopPEG3bFlSu1eowyBfxtu0_CuVd-M42RU75Zc4Gsj6uV77MBtbMrf4_7M_NUTSgoIF3fRqxrj0NzihIBg", + errorKeyFunc, + jwt.MapClaims{"foo": "bar"}, + false, + jwt.ValidationErrorUnverifiable, + nil, + }, + { + "invalid signing method", + "", + defaultKeyFunc, + jwt.MapClaims{"foo": "bar"}, + false, + jwt.ValidationErrorSignatureInvalid, + &jwt.Parser{ValidMethods: []string{"HS256"}}, + }, + { + "valid signing method", + "", + defaultKeyFunc, + jwt.MapClaims{"foo": "bar"}, + true, + 0, + &jwt.Parser{ValidMethods: []string{"RS256", "HS256"}}, + }, + { + "JSON Number", + "", + defaultKeyFunc, + jwt.MapClaims{"foo": json.Number("123.4")}, + true, + 0, + &jwt.Parser{UseJSONNumber: true}, + }, + { + "Standard Claims", + "", + defaultKeyFunc, + &jwt.StandardClaims{ + ExpiresAt: time.Now().Add(time.Second * 10).Unix(), + }, + true, + 0, + &jwt.Parser{UseJSONNumber: true}, + }, + { + "JSON Number - basic expired", + "", // autogen + defaultKeyFunc, + jwt.MapClaims{"foo": "bar", "exp": json.Number(fmt.Sprintf("%v", time.Now().Unix()-100))}, + false, + jwt.ValidationErrorExpired, + &jwt.Parser{UseJSONNumber: true}, + }, + { + "JSON Number - basic nbf", + "", // autogen + defaultKeyFunc, + jwt.MapClaims{"foo": "bar", "nbf": json.Number(fmt.Sprintf("%v", time.Now().Unix()+100))}, + false, + jwt.ValidationErrorNotValidYet, + &jwt.Parser{UseJSONNumber: true}, + }, + { + "JSON Number - expired and nbf", + "", // autogen + defaultKeyFunc, + jwt.MapClaims{"foo": "bar", "nbf": json.Number(fmt.Sprintf("%v", time.Now().Unix()+100)), "exp": json.Number(fmt.Sprintf("%v", time.Now().Unix()-100))}, + false, + jwt.ValidationErrorNotValidYet | jwt.ValidationErrorExpired, + &jwt.Parser{UseJSONNumber: true}, + }, +} + +func TestParser_Parse(t *testing.T) { + privateKey := test.LoadRSAPrivateKeyFromDisk("test/sample_key") + + // Iterate over test data set and run tests + for _, data := range jwtTestData { + // If the token string is blank, use helper function to generate string + if data.tokenString == "" { + data.tokenString = test.MakeSampleToken(data.claims, privateKey) + } + + // Parse the token + var token *jwt.Token + var err error + var parser = data.parser + if parser == nil { + parser = new(jwt.Parser) + } + // Figure out correct claims type + switch data.claims.(type) { + case jwt.MapClaims: + token, err = parser.ParseWithClaims(data.tokenString, jwt.MapClaims{}, data.keyfunc) + case *jwt.StandardClaims: + token, err = parser.ParseWithClaims(data.tokenString, &jwt.StandardClaims{}, data.keyfunc) + } + + // Verify result matches expectation + if !reflect.DeepEqual(data.claims, token.Claims) { + t.Errorf("[%v] Claims mismatch. Expecting: %v Got: %v", data.name, data.claims, token.Claims) + } + + if data.valid && err != nil { + t.Errorf("[%v] Error while verifying token: %T:%v", data.name, err, err) + } + + if !data.valid && err == nil { + t.Errorf("[%v] Invalid token passed validation", data.name) + } + + if (err == nil && !token.Valid) || (err != nil && token.Valid) { + t.Errorf("[%v] Inconsistent behavior between returned error and token.Valid") + } + + if data.errors != 0 { + if err == nil { + t.Errorf("[%v] Expecting error. Didn't get one.", data.name) + } else { + + ve := err.(*jwt.ValidationError) + // compare the bitfield part of the error + if e := ve.Errors; e != data.errors { + t.Errorf("[%v] Errors don't match expectation. %v != %v", data.name, e, data.errors) + } + + if err.Error() == keyFuncError.Error() && ve.Inner != keyFuncError { + t.Errorf("[%v] Inner error does not match expectation. %v != %v", data.name, ve.Inner, keyFuncError) + } + } + } + if data.valid && token.Signature == "" { + t.Errorf("[%v] Signature is left unpopulated after parsing", data.name) + } + } +} + +// Helper method for benchmarking various methods +func benchmarkSigning(b *testing.B, method jwt.SigningMethod, key interface{}) { + t := jwt.New(method) + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + if _, err := t.SignedString(key); err != nil { + b.Fatal(err) + } + } + }) + +} diff --git a/vendor/github.com/dgrijalva/jwt-go/rsa_pss_test.go b/vendor/github.com/dgrijalva/jwt-go/rsa_pss_test.go new file mode 100644 index 000000000..9045aaf34 --- /dev/null +++ b/vendor/github.com/dgrijalva/jwt-go/rsa_pss_test.go @@ -0,0 +1,96 @@ +// +build go1.4 + +package jwt_test + +import ( + "crypto/rsa" + "io/ioutil" + "strings" + "testing" + + "github.com/dgrijalva/jwt-go" +) + +var rsaPSSTestData = []struct { + name string + tokenString string + alg string + claims map[string]interface{} + valid bool +}{ + { + "Basic PS256", + "eyJhbGciOiJQUzI1NiIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIifQ.PPG4xyDVY8ffp4CcxofNmsTDXsrVG2npdQuibLhJbv4ClyPTUtR5giNSvuxo03kB6I8VXVr0Y9X7UxhJVEoJOmULAwRWaUsDnIewQa101cVhMa6iR8X37kfFoiZ6NkS-c7henVkkQWu2HtotkEtQvN5hFlk8IevXXPmvZlhQhwzB1sGzGYnoi1zOfuL98d3BIjUjtlwii5w6gYG2AEEzp7HnHCsb3jIwUPdq86Oe6hIFjtBwduIK90ca4UqzARpcfwxHwVLMpatKask00AgGVI0ysdk0BLMjmLutquD03XbThHScC2C2_Pp4cHWgMzvbgLU2RYYZcZRKr46QeNgz9w", + "PS256", + map[string]interface{}{"foo": "bar"}, + true, + }, + { + "Basic PS384", + "eyJhbGciOiJQUzM4NCIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIifQ.w7-qqgj97gK4fJsq_DCqdYQiylJjzWONvD0qWWWhqEOFk2P1eDULPnqHRnjgTXoO4HAw4YIWCsZPet7nR3Xxq4ZhMqvKW8b7KlfRTb9cH8zqFvzMmybQ4jv2hKc3bXYqVow3AoR7hN_CWXI3Dv6Kd2X5xhtxRHI6IL39oTVDUQ74LACe-9t4c3QRPuj6Pq1H4FAT2E2kW_0KOc6EQhCLWEhm2Z2__OZskDC8AiPpP8Kv4k2vB7l0IKQu8Pr4RcNBlqJdq8dA5D3hk5TLxP8V5nG1Ib80MOMMqoS3FQvSLyolFX-R_jZ3-zfq6Ebsqr0yEb0AH2CfsECF7935Pa0FKQ", + "PS384", + map[string]interface{}{"foo": "bar"}, + true, + }, + { + "Basic PS512", + "eyJhbGciOiJQUzUxMiIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIifQ.GX1HWGzFaJevuSLavqqFYaW8_TpvcjQ8KfC5fXiSDzSiT9UD9nB_ikSmDNyDILNdtjZLSvVKfXxZJqCfefxAtiozEDDdJthZ-F0uO4SPFHlGiXszvKeodh7BuTWRI2wL9-ZO4mFa8nq3GMeQAfo9cx11i7nfN8n2YNQ9SHGovG7_T_AvaMZB_jT6jkDHpwGR9mz7x1sycckEo6teLdHRnH_ZdlHlxqknmyTu8Odr5Xh0sJFOL8BepWbbvIIn-P161rRHHiDWFv6nhlHwZnVzjx7HQrWSGb6-s2cdLie9QL_8XaMcUpjLkfOMKkDOfHo6AvpL7Jbwi83Z2ZTHjJWB-A", + "PS512", + map[string]interface{}{"foo": "bar"}, + true, + }, + { + "basic PS256 invalid: foo => bar", + "eyJhbGciOiJQUzI1NiIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIifQ.PPG4xyDVY8ffp4CcxofNmsTDXsrVG2npdQuibLhJbv4ClyPTUtR5giNSvuxo03kB6I8VXVr0Y9X7UxhJVEoJOmULAwRWaUsDnIewQa101cVhMa6iR8X37kfFoiZ6NkS-c7henVkkQWu2HtotkEtQvN5hFlk8IevXXPmvZlhQhwzB1sGzGYnoi1zOfuL98d3BIjUjtlwii5w6gYG2AEEzp7HnHCsb3jIwUPdq86Oe6hIFjtBwduIK90ca4UqzARpcfwxHwVLMpatKask00AgGVI0ysdk0BLMjmLutquD03XbThHScC2C2_Pp4cHWgMzvbgLU2RYYZcZRKr46QeNgz9W", + "PS256", + map[string]interface{}{"foo": "bar"}, + false, + }, +} + +func TestRSAPSSVerify(t *testing.T) { + var err error + + key, _ := ioutil.ReadFile("test/sample_key.pub") + var rsaPSSKey *rsa.PublicKey + if rsaPSSKey, err = jwt.ParseRSAPublicKeyFromPEM(key); err != nil { + t.Errorf("Unable to parse RSA public key: %v", err) + } + + for _, data := range rsaPSSTestData { + parts := strings.Split(data.tokenString, ".") + + method := jwt.GetSigningMethod(data.alg) + err := method.Verify(strings.Join(parts[0:2], "."), parts[2], rsaPSSKey) + if data.valid && err != nil { + t.Errorf("[%v] Error while verifying key: %v", data.name, err) + } + if !data.valid && err == nil { + t.Errorf("[%v] Invalid key passed validation", data.name) + } + } +} + +func TestRSAPSSSign(t *testing.T) { + var err error + + key, _ := ioutil.ReadFile("test/sample_key") + var rsaPSSKey *rsa.PrivateKey + if rsaPSSKey, err = jwt.ParseRSAPrivateKeyFromPEM(key); err != nil { + t.Errorf("Unable to parse RSA private key: %v", err) + } + + for _, data := range rsaPSSTestData { + if data.valid { + parts := strings.Split(data.tokenString, ".") + method := jwt.GetSigningMethod(data.alg) + sig, err := method.Sign(strings.Join(parts[0:2], "."), rsaPSSKey) + if err != nil { + t.Errorf("[%v] Error signing token: %v", data.name, err) + } + if sig == parts[2] { + t.Errorf("[%v] Signatures shouldn't match\nnew:\n%v\noriginal:\n%v", data.name, sig, parts[2]) + } + } + } +} diff --git a/vendor/github.com/dgrijalva/jwt-go/rsa_test.go b/vendor/github.com/dgrijalva/jwt-go/rsa_test.go new file mode 100644 index 000000000..2e0f78536 --- /dev/null +++ b/vendor/github.com/dgrijalva/jwt-go/rsa_test.go @@ -0,0 +1,176 @@ +package jwt_test + +import ( + "github.com/dgrijalva/jwt-go" + "io/ioutil" + "strings" + "testing" +) + +var rsaTestData = []struct { + name string + tokenString string + alg string + claims map[string]interface{} + valid bool +}{ + { + "Basic RS256", + "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJmb28iOiJiYXIifQ.FhkiHkoESI_cG3NPigFrxEk9Z60_oXrOT2vGm9Pn6RDgYNovYORQmmA0zs1AoAOf09ly2Nx2YAg6ABqAYga1AcMFkJljwxTT5fYphTuqpWdy4BELeSYJx5Ty2gmr8e7RonuUztrdD5WfPqLKMm1Ozp_T6zALpRmwTIW0QPnaBXaQD90FplAg46Iy1UlDKr-Eupy0i5SLch5Q-p2ZpaL_5fnTIUDlxC3pWhJTyx_71qDI-mAA_5lE_VdroOeflG56sSmDxopPEG3bFlSu1eowyBfxtu0_CuVd-M42RU75Zc4Gsj6uV77MBtbMrf4_7M_NUTSgoIF3fRqxrj0NzihIBg", + "RS256", + map[string]interface{}{"foo": "bar"}, + true, + }, + { + "Basic RS384", + "eyJhbGciOiJSUzM4NCIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIifQ.W-jEzRfBigtCWsinvVVuldiuilzVdU5ty0MvpLaSaqK9PlAWWlDQ1VIQ_qSKzwL5IXaZkvZFJXT3yL3n7OUVu7zCNJzdwznbC8Z-b0z2lYvcklJYi2VOFRcGbJtXUqgjk2oGsiqUMUMOLP70TTefkpsgqDxbRh9CDUfpOJgW-dU7cmgaoswe3wjUAUi6B6G2YEaiuXC0XScQYSYVKIzgKXJV8Zw-7AN_DBUI4GkTpsvQ9fVVjZM9csQiEXhYekyrKu1nu_POpQonGd8yqkIyXPECNmmqH5jH4sFiF67XhD7_JpkvLziBpI-uh86evBUadmHhb9Otqw3uV3NTaXLzJw", + "RS384", + map[string]interface{}{"foo": "bar"}, + true, + }, + { + "Basic RS512", + "eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIifQ.zBlLlmRrUxx4SJPUbV37Q1joRcI9EW13grnKduK3wtYKmDXbgDpF1cZ6B-2Jsm5RB8REmMiLpGms-EjXhgnyh2TSHE-9W2gA_jvshegLWtwRVDX40ODSkTb7OVuaWgiy9y7llvcknFBTIg-FnVPVpXMmeV_pvwQyhaz1SSwSPrDyxEmksz1hq7YONXhXPpGaNbMMeDTNP_1oj8DZaqTIL9TwV8_1wb2Odt_Fy58Ke2RVFijsOLdnyEAjt2n9Mxihu9i3PhNBkkxa2GbnXBfq3kzvZ_xxGGopLdHhJjcGWXO-NiwI9_tiu14NRv4L2xC0ItD9Yz68v2ZIZEp_DuzwRQ", + "RS512", + map[string]interface{}{"foo": "bar"}, + true, + }, + { + "basic invalid: foo => bar", + "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJmb28iOiJiYXIifQ.EhkiHkoESI_cG3NPigFrxEk9Z60_oXrOT2vGm9Pn6RDgYNovYORQmmA0zs1AoAOf09ly2Nx2YAg6ABqAYga1AcMFkJljwxTT5fYphTuqpWdy4BELeSYJx5Ty2gmr8e7RonuUztrdD5WfPqLKMm1Ozp_T6zALpRmwTIW0QPnaBXaQD90FplAg46Iy1UlDKr-Eupy0i5SLch5Q-p2ZpaL_5fnTIUDlxC3pWhJTyx_71qDI-mAA_5lE_VdroOeflG56sSmDxopPEG3bFlSu1eowyBfxtu0_CuVd-M42RU75Zc4Gsj6uV77MBtbMrf4_7M_NUTSgoIF3fRqxrj0NzihIBg", + "RS256", + map[string]interface{}{"foo": "bar"}, + false, + }, +} + +func TestRSAVerify(t *testing.T) { + keyData, _ := ioutil.ReadFile("test/sample_key.pub") + key, _ := jwt.ParseRSAPublicKeyFromPEM(keyData) + + for _, data := range rsaTestData { + parts := strings.Split(data.tokenString, ".") + + method := jwt.GetSigningMethod(data.alg) + err := method.Verify(strings.Join(parts[0:2], "."), parts[2], key) + if data.valid && err != nil { + t.Errorf("[%v] Error while verifying key: %v", data.name, err) + } + if !data.valid && err == nil { + t.Errorf("[%v] Invalid key passed validation", data.name) + } + } +} + +func TestRSASign(t *testing.T) { + keyData, _ := ioutil.ReadFile("test/sample_key") + key, _ := jwt.ParseRSAPrivateKeyFromPEM(keyData) + + for _, data := range rsaTestData { + if data.valid { + parts := strings.Split(data.tokenString, ".") + method := jwt.GetSigningMethod(data.alg) + sig, err := method.Sign(strings.Join(parts[0:2], "."), key) + if err != nil { + t.Errorf("[%v] Error signing token: %v", data.name, err) + } + if sig != parts[2] { + t.Errorf("[%v] Incorrect signature.\nwas:\n%v\nexpecting:\n%v", data.name, sig, parts[2]) + } + } + } +} + +func TestRSAVerifyWithPreParsedPrivateKey(t *testing.T) { + key, _ := ioutil.ReadFile("test/sample_key.pub") + parsedKey, err := jwt.ParseRSAPublicKeyFromPEM(key) + if err != nil { + t.Fatal(err) + } + testData := rsaTestData[0] + parts := strings.Split(testData.tokenString, ".") + err = jwt.SigningMethodRS256.Verify(strings.Join(parts[0:2], "."), parts[2], parsedKey) + if err != nil { + t.Errorf("[%v] Error while verifying key: %v", testData.name, err) + } +} + +func TestRSAWithPreParsedPrivateKey(t *testing.T) { + key, _ := ioutil.ReadFile("test/sample_key") + parsedKey, err := jwt.ParseRSAPrivateKeyFromPEM(key) + if err != nil { + t.Fatal(err) + } + testData := rsaTestData[0] + parts := strings.Split(testData.tokenString, ".") + sig, err := jwt.SigningMethodRS256.Sign(strings.Join(parts[0:2], "."), parsedKey) + if err != nil { + t.Errorf("[%v] Error signing token: %v", testData.name, err) + } + if sig != parts[2] { + t.Errorf("[%v] Incorrect signature.\nwas:\n%v\nexpecting:\n%v", testData.name, sig, parts[2]) + } +} + +func TestRSAKeyParsing(t *testing.T) { + key, _ := ioutil.ReadFile("test/sample_key") + pubKey, _ := ioutil.ReadFile("test/sample_key.pub") + badKey := []byte("All your base are belong to key") + + // Test parsePrivateKey + if _, e := jwt.ParseRSAPrivateKeyFromPEM(key); e != nil { + t.Errorf("Failed to parse valid private key: %v", e) + } + + if k, e := jwt.ParseRSAPrivateKeyFromPEM(pubKey); e == nil { + t.Errorf("Parsed public key as valid private key: %v", k) + } + + if k, e := jwt.ParseRSAPrivateKeyFromPEM(badKey); e == nil { + t.Errorf("Parsed invalid key as valid private key: %v", k) + } + + // Test parsePublicKey + if _, e := jwt.ParseRSAPublicKeyFromPEM(pubKey); e != nil { + t.Errorf("Failed to parse valid public key: %v", e) + } + + if k, e := jwt.ParseRSAPublicKeyFromPEM(key); e == nil { + t.Errorf("Parsed private key as valid public key: %v", k) + } + + if k, e := jwt.ParseRSAPublicKeyFromPEM(badKey); e == nil { + t.Errorf("Parsed invalid key as valid private key: %v", k) + } + +} + +func BenchmarkRS256Signing(b *testing.B) { + key, _ := ioutil.ReadFile("test/sample_key") + parsedKey, err := jwt.ParseRSAPrivateKeyFromPEM(key) + if err != nil { + b.Fatal(err) + } + + benchmarkSigning(b, jwt.SigningMethodRS256, parsedKey) +} + +func BenchmarkRS384Signing(b *testing.B) { + key, _ := ioutil.ReadFile("test/sample_key") + parsedKey, err := jwt.ParseRSAPrivateKeyFromPEM(key) + if err != nil { + b.Fatal(err) + } + + benchmarkSigning(b, jwt.SigningMethodRS384, parsedKey) +} + +func BenchmarkRS512Signing(b *testing.B) { + key, _ := ioutil.ReadFile("test/sample_key") + parsedKey, err := jwt.ParseRSAPrivateKeyFromPEM(key) + if err != nil { + b.Fatal(err) + } + + benchmarkSigning(b, jwt.SigningMethodRS512, parsedKey) +} diff --git a/vendor/github.com/docker/distribution/.gitignore b/vendor/github.com/docker/distribution/.gitignore new file mode 100644 index 000000000..1c3ae0a77 --- /dev/null +++ b/vendor/github.com/docker/distribution/.gitignore @@ -0,0 +1,37 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof + +# never checkin from the bin file (for now) +bin/* + +# Test key files +*.pem + +# Cover profiles +*.out + +# Editor/IDE specific files. +*.sublime-project +*.sublime-workspace diff --git a/vendor/github.com/docker/distribution/.mailmap b/vendor/github.com/docker/distribution/.mailmap new file mode 100644 index 000000000..d99106019 --- /dev/null +++ b/vendor/github.com/docker/distribution/.mailmap @@ -0,0 +1,18 @@ +Stephen J Day Stephen Day +Stephen J Day Stephen Day +Olivier Gambier Olivier Gambier +Brian Bland Brian Bland +Brian Bland Brian Bland +Josh Hawn Josh Hawn +Richard Scothern Richard +Richard Scothern Richard Scothern +Andrew Meredith Andrew Meredith +harche harche +Jessie Frazelle +Sharif Nassar Sharif Nassar +Sven Dowideit Sven Dowideit +Vincent Giersch Vincent Giersch +davidli davidli +Omer Cohen Omer Cohen +Eric Yang Eric Yang +Nikita Tarasov Nikita diff --git a/vendor/github.com/docker/distribution/BUILDING.md b/vendor/github.com/docker/distribution/BUILDING.md new file mode 100644 index 000000000..c59828182 --- /dev/null +++ b/vendor/github.com/docker/distribution/BUILDING.md @@ -0,0 +1,117 @@ + +# Building the registry source + +## Use-case + +This is useful if you intend to actively work on the registry. + +### Alternatives + +Most people should use the [official Registry docker image](https://hub.docker.com/r/library/registry/). + +People looking for advanced operational use cases might consider rolling their own image with a custom Dockerfile inheriting `FROM registry:2`. + +OS X users who want to run natively can do so following [the instructions here](https://github.com/docker/docker.github.io/blob/master/registry/recipes/osx-setup-guide.md). + +### Gotchas + +You are expected to know your way around with go & git. + +If you are a casual user with no development experience, and no preliminary knowledge of go, building from source is probably not a good solution for you. + +## Build the development environment + +The first prerequisite of properly building distribution targets is to have a Go +development environment setup. Please follow [How to Write Go Code](https://golang.org/doc/code.html) +for proper setup. If done correctly, you should have a GOROOT and GOPATH set in the +environment. + +If a Go development environment is setup, one can use `go get` to install the +`registry` command from the current latest: + + go get github.com/docker/distribution/cmd/registry + +The above will install the source repository into the `GOPATH`. + +Now create the directory for the registry data (this might require you to set permissions properly) + + mkdir -p /var/lib/registry + +... or alternatively `export REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/somewhere` if you want to store data into another location. + +The `registry` +binary can then be run with the following: + + $ $GOPATH/bin/registry --version + $GOPATH/bin/registry github.com/docker/distribution v2.0.0-alpha.1+unknown + +> __NOTE:__ While you do not need to use `go get` to checkout the distribution +> project, for these build instructions to work, the project must be checked +> out in the correct location in the `GOPATH`. This should almost always be +> `$GOPATH/src/github.com/docker/distribution`. + +The registry can be run with the default config using the following +incantation: + + $ $GOPATH/bin/registry serve $GOPATH/src/github.com/docker/distribution/cmd/registry/config-example.yml + INFO[0000] endpoint local-5003 disabled, skipping app.id=34bbec38-a91a-494a-9a3f-b72f9010081f version=v2.0.0-alpha.1+unknown + INFO[0000] endpoint local-8083 disabled, skipping app.id=34bbec38-a91a-494a-9a3f-b72f9010081f version=v2.0.0-alpha.1+unknown + INFO[0000] listening on :5000 app.id=34bbec38-a91a-494a-9a3f-b72f9010081f version=v2.0.0-alpha.1+unknown + INFO[0000] debug server listening localhost:5001 + +If it is working, one should see the above log messages. + +### Repeatable Builds + +For the full development experience, one should `cd` into +`$GOPATH/src/github.com/docker/distribution`. From there, the regular `go` +commands, such as `go test`, should work per package (please see +[Developing](#developing) if they don't work). + +A `Makefile` has been provided as a convenience to support repeatable builds. +Please install the following into `GOPATH` for it to work: + + go get github.com/golang/lint/golint + +Once these commands are available in the `GOPATH`, run `make` to get a full +build: + + $ make + + clean + + fmt + + vet + + lint + + build + github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar + github.com/sirupsen/logrus + github.com/docker/libtrust + ... + github.com/yvasiyarov/gorelic + github.com/docker/distribution/registry/handlers + github.com/docker/distribution/cmd/registry + + test + ... + ok github.com/docker/distribution/digest 7.875s + ok github.com/docker/distribution/manifest 0.028s + ok github.com/docker/distribution/notifications 17.322s + ? github.com/docker/distribution/registry [no test files] + ok github.com/docker/distribution/registry/api/v2 0.101s + ? github.com/docker/distribution/registry/auth [no test files] + ok github.com/docker/distribution/registry/auth/silly 0.011s + ... + + /Users/sday/go/src/github.com/docker/distribution/bin/registry + + /Users/sday/go/src/github.com/docker/distribution/bin/registry-api-descriptor-template + + binaries + +The above provides a repeatable build using the contents of the vendor +directory. This includes formatting, vetting, linting, building, +testing and generating tagged binaries. We can verify this worked by running +the registry binary generated in the "./bin" directory: + + $ ./bin/registry -version + ./bin/registry github.com/docker/distribution v2.0.0-alpha.2-80-g16d8b2c.m + +### Optional build tags + +Optional [build tags](http://golang.org/pkg/go/build/) can be provided using +the environment variable `DOCKER_BUILDTAGS`. diff --git a/vendor/github.com/docker/distribution/CHANGELOG.md b/vendor/github.com/docker/distribution/CHANGELOG.md new file mode 100644 index 000000000..e7b16b3c2 --- /dev/null +++ b/vendor/github.com/docker/distribution/CHANGELOG.md @@ -0,0 +1,108 @@ +# Changelog + +## 2.6.0 (2017-01-18) + +#### Storage +- S3: fixed bug in delete due to read-after-write inconsistency +- S3: allow EC2 IAM roles to be used when authorizing region endpoints +- S3: add Object ACL Support +- S3: fix delete method's notion of subpaths +- S3: use multipart upload API in `Move` method for performance +- S3: add v2 signature signing for legacy S3 clones +- Swift: add simple heuristic to detect incomplete DLOs during read ops +- Swift: support different user and tenant domains +- Swift: bulk deletes in chunks +- Aliyun OSS: fix delete method's notion of subpaths +- Aliyun OSS: optimize data copy after upload finishes +- Azure: close leaking response body +- Fix storage drivers dropping non-EOF errors when listing repositories +- Compare path properly when listing repositories in catalog +- Add a foreign layer URL host whitelist +- Improve catalog enumerate runtime + +#### Registry +- Export `storage.CreateOptions` in top-level package +- Enable notifications to endpoints that use self-signed certificates +- Properly validate multi-URL foreign layers +- Add control over validation of URLs in pushed manifests +- Proxy mode: fix socket leak when pull is cancelled +- Tag service: properly handle error responses on HEAD request +- Support for custom authentication URL in proxying registry +- Add configuration option to disable access logging +- Add notification filtering by target media type +- Manifest: `References()` returns all children +- Honor `X-Forwarded-Port` and Forwarded headers +- Reference: Preserve tag and digest in With* functions +- Add policy configuration for enforcing repository classes + +#### Client +- Changes the client Tags `All()` method to follow links +- Allow registry clients to connect via HTTP2 +- Better handling of OAuth errors in client + +#### Spec +- Manifest: clarify relationship between urls and foreign layers +- Authorization: add support for repository classes + +#### Manifest +- Override media type returned from `Stat()` for existing manifests +- Add plugin mediatype to distribution manifest + +#### Docs +- Document `TOOMANYREQUESTS` error code +- Document required Let's Encrypt port +- Improve documentation around implementation of OAuth2 +- Improve documentation for configuration + +#### Auth +- Add support for registry type in scope +- Add support for using v2 ping challenges for v1 +- Add leeway to JWT `nbf` and `exp` checking +- htpasswd: dynamically parse htpasswd file +- Fix missing auth headers with PATCH HTTP request when pushing to default port + +#### Dockerfile +- Update to go1.7 +- Reorder Dockerfile steps for better layer caching + +#### Notes + +Documentation has moved to the documentation repository at +`github.com/docker/docker.github.io/tree/master/registry` + +The registry is go 1.7 compliant, and passes newer, more restrictive `lint` and `vet` ing. + + +## 2.5.0 (2016-06-14) + +#### Storage +- Ensure uploads directory is cleaned after upload is committed +- Add ability to cap concurrent operations in filesystem driver +- S3: Add 'us-gov-west-1' to the valid region list +- Swift: Handle ceph not returning Last-Modified header for HEAD requests +- Add redirect middleware + +#### Registry +- Add support for blobAccessController middleware +- Add support for layers from foreign sources +- Remove signature store +- Add support for Let's Encrypt +- Correct yaml key names in configuration + +#### Client +- Add option to get content digest from manifest get + +#### Spec +- Update the auth spec scope grammar to reflect the fact that hostnames are optionally supported +- Clarify API documentation around catalog fetch behavior + +#### API +- Support returning HTTP 429 (Too Many Requests) + +#### Documentation +- Update auth documentation examples to show "expires in" as int + +#### Docker Image +- Use Alpine Linux as base image + + diff --git a/vendor/github.com/docker/distribution/CONTRIBUTING.md b/vendor/github.com/docker/distribution/CONTRIBUTING.md new file mode 100644 index 000000000..1f1441bee --- /dev/null +++ b/vendor/github.com/docker/distribution/CONTRIBUTING.md @@ -0,0 +1,148 @@ +# Contributing to the registry + +## Before reporting an issue... + +### If your problem is with... + + - automated builds + - your account on the [Docker Hub](https://hub.docker.com/) + - any other [Docker Hub](https://hub.docker.com/) issue + +Then please do not report your issue here - you should instead report it to [https://support.docker.com](https://support.docker.com) + +### If you... + + - need help setting up your registry + - can't figure out something + - are not sure what's going on or what your problem is + +Then please do not open an issue here yet - you should first try one of the following support forums: + + - irc: #docker-distribution on freenode + - mailing-list: or https://groups.google.com/a/dockerproject.org/forum/#!forum/distribution + +### Reporting security issues + +The Docker maintainers take security seriously. If you discover a security +issue, please bring it to their attention right away! + +Please **DO NOT** file a public issue, instead send your report privately to +[security@docker.com](mailto:security@docker.com). + +## Reporting an issue properly + +By following these simple rules you will get better and faster feedback on your issue. + + - search the bugtracker for an already reported issue + +### If you found an issue that describes your problem: + + - please read other user comments first, and confirm this is the same issue: a given error condition might be indicative of different problems - you may also find a workaround in the comments + - please refrain from adding "same thing here" or "+1" comments + - you don't need to comment on an issue to get notified of updates: just hit the "subscribe" button + - comment if you have some new, technical and relevant information to add to the case + - __DO NOT__ comment on closed issues or merged PRs. If you think you have a related problem, open up a new issue and reference the PR or issue. + +### If you have not found an existing issue that describes your problem: + + 1. create a new issue, with a succinct title that describes your issue: + - bad title: "It doesn't work with my docker" + - good title: "Private registry push fail: 400 error with E_INVALID_DIGEST" + 2. copy the output of: + - `docker version` + - `docker info` + - `docker exec registry -version` + 3. copy the command line you used to launch your Registry + 4. restart your docker daemon in debug mode (add `-D` to the daemon launch arguments) + 5. reproduce your problem and get your docker daemon logs showing the error + 6. if relevant, copy your registry logs that show the error + 7. provide any relevant detail about your specific Registry configuration (e.g., storage backend used) + 8. indicate if you are using an enterprise proxy, Nginx, or anything else between you and your Registry + +## Contributing a patch for a known bug, or a small correction + +You should follow the basic GitHub workflow: + + 1. fork + 2. commit a change + 3. make sure the tests pass + 4. PR + +Additionally, you must [sign your commits](https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work). It's very simple: + + - configure your name with git: `git config user.name "Real Name" && git config user.email mail@example.com` + - sign your commits using `-s`: `git commit -s -m "My commit"` + +Some simple rules to ensure quick merge: + + - clearly point to the issue(s) you want to fix in your PR comment (e.g., `closes #12345`) + - prefer multiple (smaller) PRs addressing individual issues over a big one trying to address multiple issues at once + - if you need to amend your PR following comments, please squash instead of adding more commits + +## Contributing new features + +You are heavily encouraged to first discuss what you want to do. You can do so on the irc channel, or by opening an issue that clearly describes the use case you want to fulfill, or the problem you are trying to solve. + +If this is a major new feature, you should then submit a proposal that describes your technical solution and reasoning. +If you did discuss it first, this will likely be greenlighted very fast. It's advisable to address all feedback on this proposal before starting actual work. + +Then you should submit your implementation, clearly linking to the issue (and possible proposal). + +Your PR will be reviewed by the community, then ultimately by the project maintainers, before being merged. + +It's mandatory to: + + - interact respectfully with other community members and maintainers - more generally, you are expected to abide by the [Docker community rules](https://github.com/docker/docker/blob/master/CONTRIBUTING.md#docker-community-guidelines) + - address maintainers' comments and modify your submission accordingly + - write tests for any new code + +Complying to these simple rules will greatly accelerate the review process, and will ensure you have a pleasant experience in contributing code to the Registry. + +Have a look at a great, successful contribution: the [Swift driver PR](https://github.com/docker/distribution/pull/493) + +## Coding Style + +Unless explicitly stated, we follow all coding guidelines from the Go +community. While some of these standards may seem arbitrary, they somehow seem +to result in a solid, consistent codebase. + +It is possible that the code base does not currently comply with these +guidelines. We are not looking for a massive PR that fixes this, since that +goes against the spirit of the guidelines. All new contributions should make a +best effort to clean up and make the code base better than they left it. +Obviously, apply your best judgement. Remember, the goal here is to make the +code base easier for humans to navigate and understand. Always keep that in +mind when nudging others to comply. + +The rules: + +1. All code should be formatted with `gofmt -s`. +2. All code should pass the default levels of + [`golint`](https://github.com/golang/lint). +3. All code should follow the guidelines covered in [Effective + Go](http://golang.org/doc/effective_go.html) and [Go Code Review + Comments](https://github.com/golang/go/wiki/CodeReviewComments). +4. Comment the code. Tell us the why, the history and the context. +5. Document _all_ declarations and methods, even private ones. Declare + expectations, caveats and anything else that may be important. If a type + gets exported, having the comments already there will ensure it's ready. +6. Variable name length should be proportional to its context and no longer. + `noCommaALongVariableNameLikeThisIsNotMoreClearWhenASimpleCommentWouldDo`. + In practice, short methods will have short variable names and globals will + have longer names. +7. No underscores in package names. If you need a compound name, step back, + and re-examine why you need a compound name. If you still think you need a + compound name, lose the underscore. +8. No utils or helpers packages. If a function is not general enough to + warrant its own package, it has not been written generally enough to be a + part of a util package. Just leave it unexported and well-documented. +9. All tests should run with `go test` and outside tooling should not be + required. No, we don't need another unit testing framework. Assertion + packages are acceptable if they provide _real_ incremental value. +10. Even though we call these "rules" above, they are actually just + guidelines. Since you've read all the rules, you now know that. + +If you are having trouble getting into the mood of idiomatic Go, we recommend +reading through [Effective Go](http://golang.org/doc/effective_go.html). The +[Go Blog](http://blog.golang.org/) is also a great resource. Drinking the +kool-aid is a lot easier than going thirsty. diff --git a/vendor/github.com/docker/distribution/Dockerfile b/vendor/github.com/docker/distribution/Dockerfile new file mode 100644 index 000000000..ac8dbca2f --- /dev/null +++ b/vendor/github.com/docker/distribution/Dockerfile @@ -0,0 +1,21 @@ +FROM golang:1.8-alpine + +ENV DISTRIBUTION_DIR /go/src/github.com/docker/distribution +ENV DOCKER_BUILDTAGS include_oss include_gcs + +ARG GOOS=linux +ARG GOARCH=amd64 + +RUN set -ex \ + && apk add --no-cache make git + +WORKDIR $DISTRIBUTION_DIR +COPY . $DISTRIBUTION_DIR +COPY cmd/registry/config-dev.yml /etc/docker/registry/config.yml + +RUN make PREFIX=/go clean binaries + +VOLUME ["/var/lib/registry"] +EXPOSE 5000 +ENTRYPOINT ["registry"] +CMD ["serve", "/etc/docker/registry/config.yml"] diff --git a/vendor/github.com/docker/distribution/MAINTAINERS b/vendor/github.com/docker/distribution/MAINTAINERS new file mode 100644 index 000000000..bda400150 --- /dev/null +++ b/vendor/github.com/docker/distribution/MAINTAINERS @@ -0,0 +1,58 @@ +# Distribution maintainers file +# +# This file describes who runs the docker/distribution project and how. +# This is a living document - if you see something out of date or missing, speak up! +# +# It is structured to be consumable by both humans and programs. +# To extract its contents programmatically, use any TOML-compliant parser. +# +# This file is compiled into the MAINTAINERS file in docker/opensource. +# +[Org] + [Org."Core maintainers"] + people = [ + "aaronlehmann", + "dmcgowan", + "dmp42", + "richardscothern", + "shykes", + "stevvooe", + ] + +[people] + +# A reference list of all people associated with the project. +# All other sections should refer to people by their canonical key +# in the people section. + + # ADD YOURSELF HERE IN ALPHABETICAL ORDER + + [people.aaronlehmann] + Name = "Aaron Lehmann" + Email = "aaron.lehmann@docker.com" + GitHub = "aaronlehmann" + + [people.dmcgowan] + Name = "Derek McGowan" + Email = "derek@mcgstyle.net" + GitHub = "dmcgowan" + + [people.dmp42] + Name = "Olivier Gambier" + Email = "olivier@docker.com" + GitHub = "dmp42" + + [people.richardscothern] + Name = "Richard Scothern" + Email = "richard.scothern@gmail.com" + GitHub = "richardscothern" + + [people.shykes] + Name = "Solomon Hykes" + Email = "solomon@docker.com" + GitHub = "shykes" + + [people.stevvooe] + Name = "Stephen Day" + Email = "stephen.day@docker.com" + GitHub = "stevvooe" diff --git a/vendor/github.com/docker/distribution/Makefile b/vendor/github.com/docker/distribution/Makefile new file mode 100644 index 000000000..7c6f9c7a6 --- /dev/null +++ b/vendor/github.com/docker/distribution/Makefile @@ -0,0 +1,99 @@ +# Set an output prefix, which is the local directory if not specified +PREFIX?=$(shell pwd) + + +# Used to populate version variable in main package. +VERSION=$(shell git describe --match 'v[0-9]*' --dirty='.m' --always) + +# Allow turning off function inlining and variable registerization +ifeq (${DISABLE_OPTIMIZATION},true) + GO_GCFLAGS=-gcflags "-N -l" + VERSION:="$(VERSION)-noopt" +endif + +GO_LDFLAGS=-ldflags "-X `go list ./version`.Version=$(VERSION)" + +.PHONY: all build binaries clean dep-restore dep-save dep-validate fmt lint test test-full vet +.DEFAULT: all +all: fmt vet lint build test binaries + +AUTHORS: .mailmap .git/HEAD + git log --format='%aN <%aE>' | sort -fu > $@ + +# This only needs to be generated by hand when cutting full releases. +version/version.go: + ./version/version.sh > $@ + +# Required for go 1.5 to build +GO15VENDOREXPERIMENT := 1 + +# Go files +GOFILES=$(shell find . -type f -name '*.go') + +# Package list +PKGS=$(shell go list -tags "${DOCKER_BUILDTAGS}" ./... | grep -v ^github.com/docker/distribution/vendor/) + +# Resolving binary dependencies for specific targets +GOLINT=$(shell which golint || echo '') +VNDR=$(shell which vndr || echo '') + +${PREFIX}/bin/registry: $(GOFILES) + @echo "+ $@" + @go build -tags "${DOCKER_BUILDTAGS}" -o $@ ${GO_LDFLAGS} ${GO_GCFLAGS} ./cmd/registry + +${PREFIX}/bin/digest: $(GOFILES) + @echo "+ $@" + @go build -tags "${DOCKER_BUILDTAGS}" -o $@ ${GO_LDFLAGS} ${GO_GCFLAGS} ./cmd/digest + +${PREFIX}/bin/registry-api-descriptor-template: $(GOFILES) + @echo "+ $@" + @go build -o $@ ${GO_LDFLAGS} ${GO_GCFLAGS} ./cmd/registry-api-descriptor-template + +docs/spec/api.md: docs/spec/api.md.tmpl ${PREFIX}/bin/registry-api-descriptor-template + ./bin/registry-api-descriptor-template $< > $@ + +vet: + @echo "+ $@" + @go vet -tags "${DOCKER_BUILDTAGS}" $(PKGS) + +fmt: + @echo "+ $@" + @test -z "$$(gofmt -s -l . 2>&1 | grep -v ^vendor/ | tee /dev/stderr)" || \ + (echo >&2 "+ please format Go code with 'gofmt -s'" && false) + +lint: + @echo "+ $@" + $(if $(GOLINT), , \ + $(error Please install golint: `go get -u github.com/golang/lint/golint`)) + @test -z "$$($(GOLINT) ./... 2>&1 | grep -v ^vendor/ | tee /dev/stderr)" + +build: + @echo "+ $@" + @go build -tags "${DOCKER_BUILDTAGS}" -v ${GO_LDFLAGS} $(PKGS) + +test: + @echo "+ $@" + @go test -test.short -tags "${DOCKER_BUILDTAGS}" $(PKGS) + +test-full: + @echo "+ $@" + @go test -tags "${DOCKER_BUILDTAGS}" $(PKGS) + +binaries: ${PREFIX}/bin/registry ${PREFIX}/bin/digest ${PREFIX}/bin/registry-api-descriptor-template + @echo "+ $@" + +clean: + @echo "+ $@" + @rm -rf "${PREFIX}/bin/registry" "${PREFIX}/bin/digest" "${PREFIX}/bin/registry-api-descriptor-template" + +dep-validate: + @echo "+ $@" + $(if $(VNDR), , \ + $(error Please install vndr: go get github.com/lk4d4/vndr)) + @rm -Rf .vendor.bak + @mv vendor .vendor.bak + @$(VNDR) + @test -z "$$(diff -r vendor .vendor.bak 2>&1 | tee /dev/stderr)" || \ + (echo >&2 "+ inconsistent dependencies! what you have in vendor.conf does not match with what you have in vendor" && false) + @rm -Rf vendor + @mv .vendor.bak vendor diff --git a/vendor/github.com/docker/distribution/README.md b/vendor/github.com/docker/distribution/README.md new file mode 100644 index 000000000..998878850 --- /dev/null +++ b/vendor/github.com/docker/distribution/README.md @@ -0,0 +1,130 @@ +# Distribution + +The Docker toolset to pack, ship, store, and deliver content. + +This repository's main product is the Docker Registry 2.0 implementation +for storing and distributing Docker images. It supersedes the +[docker/docker-registry](https://github.com/docker/docker-registry) +project with a new API design, focused around security and performance. + + + +[![Circle CI](https://circleci.com/gh/docker/distribution/tree/master.svg?style=svg)](https://circleci.com/gh/docker/distribution/tree/master) +[![GoDoc](https://godoc.org/github.com/docker/distribution?status.svg)](https://godoc.org/github.com/docker/distribution) + +This repository contains the following components: + +|**Component** |Description | +|--------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **registry** | An implementation of the [Docker Registry HTTP API V2](docs/spec/api.md) for use with docker 1.6+. | +| **libraries** | A rich set of libraries for interacting with distribution components. Please see [godoc](https://godoc.org/github.com/docker/distribution) for details. **Note**: These libraries are **unstable**. | +| **specifications** | _Distribution_ related specifications are available in [docs/spec](docs/spec) | +| **documentation** | Docker's full documentation set is available at [docs.docker.com](https://docs.docker.com). This repository [contains the subset](docs/) related just to the registry. | + +### How does this integrate with Docker engine? + +This project should provide an implementation to a V2 API for use in the [Docker +core project](https://github.com/docker/docker). The API should be embeddable +and simplify the process of securely pulling and pushing content from `docker` +daemons. + +### What are the long term goals of the Distribution project? + +The _Distribution_ project has the further long term goal of providing a +secure tool chain for distributing content. The specifications, APIs and tools +should be as useful with Docker as they are without. + +Our goal is to design a professional grade and extensible content distribution +system that allow users to: + +* Enjoy an efficient, secured and reliable way to store, manage, package and + exchange content +* Hack/roll their own on top of healthy open-source components +* Implement their own home made solution through good specs, and solid + extensions mechanism. + +## More about Registry 2.0 + +The new registry implementation provides the following benefits: + +- faster push and pull +- new, more efficient implementation +- simplified deployment +- pluggable storage backend +- webhook notifications + +For information on upcoming functionality, please see [ROADMAP.md](ROADMAP.md). + +### Who needs to deploy a registry? + +By default, Docker users pull images from Docker's public registry instance. +[Installing Docker](https://docs.docker.com/engine/installation/) gives users this +ability. Users can also push images to a repository on Docker's public registry, +if they have a [Docker Hub](https://hub.docker.com/) account. + +For some users and even companies, this default behavior is sufficient. For +others, it is not. + +For example, users with their own software products may want to maintain a +registry for private, company images. Also, you may wish to deploy your own +image repository for images used to test or in continuous integration. For these +use cases and others, [deploying your own registry instance](https://github.com/docker/docker.github.io/blob/master/registry/deploying.md) +may be the better choice. + +### Migration to Registry 2.0 + +For those who have previously deployed their own registry based on the Registry +1.0 implementation and wish to deploy a Registry 2.0 while retaining images, +data migration is required. A tool to assist with migration efforts has been +created. For more information see [docker/migrator](https://github.com/docker/migrator). + +## Contribute + +Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute +issues, fixes, and patches to this project. If you are contributing code, see +the instructions for [building a development environment](BUILDING.md). + +## Support + +If any issues are encountered while using the _Distribution_ project, several +avenues are available for support: + + + + + + + + + + + + + + + + + + +
+ IRC + + #docker-distribution on FreeNode +
+ Issue Tracker + + github.com/docker/distribution/issues +
+ Google Groups + + https://groups.google.com/a/dockerproject.org/forum/#!forum/distribution +
+ Mailing List + + docker@dockerproject.org +
+ + +## License + +This project is distributed under [Apache License, Version 2.0](LICENSE). diff --git a/vendor/github.com/docker/distribution/RELEASE-CHECKLIST.md b/vendor/github.com/docker/distribution/RELEASE-CHECKLIST.md new file mode 100644 index 000000000..73eba5a87 --- /dev/null +++ b/vendor/github.com/docker/distribution/RELEASE-CHECKLIST.md @@ -0,0 +1,44 @@ +## Registry Release Checklist + +10. Compile release notes detailing features and since the last release. + + Update the `CHANGELOG.md` file and create a PR to master with the updates. +Once that PR has been approved by maintainers the change may be cherry-picked +to the release branch (new release branches may be forked from this commit). + +20. Update the version file: `https://github.com/docker/distribution/blob/master/version/version.go` + +30. Update the `MAINTAINERS` (if necessary), `AUTHORS` and `.mailmap` files. + +``` +make AUTHORS +``` + +40. Create a signed tag. + + Distribution uses semantic versioning. Tags are of the format +`vx.y.z[-rcn]`. You will need PGP installed and a PGP key which has been added +to your Github account. The comment for the tag should include the release +notes, use previous tags as a guide for formatting consistently. Run +`git tag -s vx.y.z[-rcn]` to create tag and `git -v vx.y.z[-rcn]` to verify tag, +check comment and correct commit hash. + +50. Push the signed tag + +60. Create a new [release](https://github.com/docker/distribution/releases). In the case of a release candidate, tick the `pre-release` checkbox. + +70. Update the registry binary in [distribution library image repo](https://github.com/docker/distribution-library-image) by running the update script and opening a pull request. + +80. Update the official image. Add the new version in the [official images repo](https://github.com/docker-library/official-images) by appending a new version to the `registry/registry` file with the git hash pointed to by the signed tag. Update the major version to point to the latest version and the minor version to point to new patch release if necessary. +e.g. to release `2.3.1` + + `2.3.1 (new)` + + `2.3.0 -> 2.3.0` can be removed + + `2 -> 2.3.1` + + `2.3 -> 2.3.1` + +90. Build a new distribution/registry image on [Docker hub](https://hub.docker.com/u/distribution/dashboard) by adding a new automated build with the new tag and re-building the images. + diff --git a/vendor/github.com/docker/distribution/ROADMAP.md b/vendor/github.com/docker/distribution/ROADMAP.md new file mode 100644 index 000000000..701127afe --- /dev/null +++ b/vendor/github.com/docker/distribution/ROADMAP.md @@ -0,0 +1,267 @@ +# Roadmap + +The Distribution Project consists of several components, some of which are +still being defined. This document defines the high-level goals of the +project, identifies the current components, and defines the release- +relationship to the Docker Platform. + +* [Distribution Goals](#distribution-goals) +* [Distribution Components](#distribution-components) +* [Project Planning](#project-planning): release-relationship to the Docker Platform. + +This road map is a living document, providing an overview of the goals and +considerations made in respect of the future of the project. + +## Distribution Goals + +- Replace the existing [docker registry](github.com/docker/docker-registry) + implementation as the primary implementation. +- Replace the existing push and pull code in the docker engine with the + distribution package. +- Define a strong data model for distributing docker images +- Provide a flexible distribution tool kit for use in the docker platform +- Unlock new distribution models + +## Distribution Components + +Components of the Distribution Project are managed via github [milestones](https://github.com/docker/distribution/milestones). Upcoming +features and bugfixes for a component will be added to the relevant milestone. If a feature or +bugfix is not part of a milestone, it is currently unscheduled for +implementation. + +* [Registry](#registry) +* [Distribution Package](#distribution-package) + +*** + +### Registry + +The new Docker registry is the main portion of the distribution repository. +Registry 2.0 is the first release of the next-generation registry. This was +primarily focused on implementing the [new registry +API](https://github.com/docker/distribution/blob/master/docs/spec/api.md), +with a focus on security and performance. + +Following from the Distribution project goals above, we have a set of goals +for registry v2 that we would like to follow in the design. New features +should be compared against these goals. + +#### Data Storage and Distribution First + +The registry's first goal is to provide a reliable, consistent storage +location for Docker images. The registry should only provide the minimal +amount of indexing required to fetch image data and no more. + +This means we should be selective in new features and API additions, including +those that may require expensive, ever growing indexes. Requests should be +servable in "constant time". + +#### Content Addressability + +All data objects used in the registry API should be content addressable. +Content identifiers should be secure and verifiable. This provides a secure, +reliable base from which to build more advanced content distribution systems. + +#### Content Agnostic + +In the past, changes to the image format would require large changes in Docker +and the Registry. By decoupling the distribution and image format, we can +allow the formats to progress without having to coordinate between the two. +This means that we should be focused on decoupling Docker from the registry +just as much as decoupling the registry from Docker. Such an approach will +allow us to unlock new distribution models that haven't been possible before. + +We can take this further by saying that the new registry should be content +agnostic. The registry provides a model of names, tags, manifests and content +addresses and that model can be used to work with content. + +#### Simplicity + +The new registry should be closer to a microservice component than its +predecessor. This means it should have a narrower API and a low number of +service dependencies. It should be easy to deploy. + +This means that other solutions should be explored before changing the API or +adding extra dependencies. If functionality is required, can it be added as an +extension or companion service. + +#### Extensibility + +The registry should provide extension points to add functionality. By keeping +the scope narrow, but providing the ability to add functionality. + +Features like search, indexing, synchronization and registry explorers fall +into this category. No such feature should be added unless we've found it +impossible to do through an extension. + +#### Active Feature Discussions + +The following are feature discussions that are currently active. + +If you don't see your favorite, unimplemented feature, feel free to contact us +via IRC or the mailing list and we can talk about adding it. The goal here is +to make sure that new features go through a rigid design process before +landing in the registry. + +##### Proxying to other Registries + +A _pull-through caching_ mode exists for the registry, but is restricted from +within the docker client to only mirror the official Docker Hub. This functionality +can be expanded when image provenance has been specified and implemented in the +distribution project. + +##### Metadata storage + +Metadata for the registry is currently stored with the manifest and layer data on +the storage backend. While this is a big win for simplicity and reliably maintaining +state, it comes with the cost of consistency and high latency. The mutable registry +metadata operations should be abstracted behind an API which will allow ACID compliant +storage systems to handle metadata. + +##### Peer to Peer transfer + +Discussion has started here: https://docs.google.com/document/d/1rYDpSpJiQWmCQy8Cuiaa3NH-Co33oK_SC9HeXYo87QA/edit + +##### Indexing, Search and Discovery + +The original registry provided some implementation of search for use with +private registries. Support has been elided from V2 since we'd like to both +decouple search functionality from the registry. The makes the registry +simpler to deploy, especially in use cases where search is not needed, and +let's us decouple the image format from the registry. + +There are explorations into using the catalog API and notification system to +build external indexes. The current line of thought is that we will define a +common search API to index and query docker images. Such a system could be run +as a companion to a registry or set of registries to power discovery. + +The main issue with search and discovery is that there are so many ways to +accomplish it. There are two aspects to this project. The first is deciding on +how it will be done, including an API definition that can work with changing +data formats. The second is the process of integrating with `docker search`. +We expect that someone attempts to address the problem with the existing tools +and propose it as a standard search API or uses it to inform a standardization +process. Once this has been explored, we integrate with the docker client. + +Please see the following for more detail: + +- https://github.com/docker/distribution/issues/206 + +##### Deletes + +> __NOTE:__ Deletes are a much asked for feature. Before requesting this +feature or participating in discussion, we ask that you read this section in +full and understand the problems behind deletes. + +While, at first glance, implementing deleting seems simple, there are a number +mitigating factors that make many solutions not ideal or even pathological in +the context of a registry. The following paragraph discuss the background and +approaches that could be applied to arrive at a solution. + +The goal of deletes in any system is to remove unused or unneeded data. Only +data requested for deletion should be removed and no other data. Removing +unintended data is worse than _not_ removing data that was requested for +removal but ideally, both are supported. Generally, according to this rule, we +err on holding data longer than needed, ensuring that it is only removed when +we can be certain that it can be removed. With the current behavior, we opt to +hold onto the data forever, ensuring that data cannot be incorrectly removed. + +To understand the problems with implementing deletes, one must understand the +data model. All registry data is stored in a filesystem layout, implemented on +a "storage driver", effectively a _virtual file system_ (VFS). The storage +system must assume that this VFS layer will be eventually consistent and has +poor read- after-write consistency, since this is the lower common denominator +among the storage drivers. This is mitigated by writing values in reverse- +dependent order, but makes wider transactional operations unsafe. + +Layered on the VFS model is a content-addressable _directed, acyclic graph_ +(DAG) made up of blobs. Manifests reference layers. Tags reference manifests. +Since the same data can be referenced by multiple manifests, we only store +data once, even if it is in different repositories. Thus, we have a set of +blobs, referenced by tags and manifests. If we want to delete a blob we need +to be certain that it is no longer referenced by another manifest or tag. When +we delete a manifest, we also can try to delete the referenced blobs. Deciding +whether or not a blob has an active reference is the crux of the problem. + +Conceptually, deleting a manifest and its resources is quite simple. Just find +all the manifests, enumerate the referenced blobs and delete the blobs not in +that set. An astute observer will recognize this as a garbage collection +problem. As with garbage collection in programming languages, this is very +simple when one always has a consistent view. When one adds parallelism and an +inconsistent view of data, it becomes very challenging. + +A simple example can demonstrate this. Let's say we are deleting a manifest +_A_ in one process. We scan the manifest and decide that all the blobs are +ready for deletion. Concurrently, we have another process accepting a new +manifest _B_ referencing one or more blobs from the manifest _A_. Manifest _B_ +is accepted and all the blobs are considered present, so the operation +proceeds. The original process then deletes the referenced blobs, assuming +they were unreferenced. The manifest _B_, which we thought had all of its data +present, can no longer be served by the registry, since the dependent data has +been deleted. + +Deleting data from the registry safely requires some way to coordinate this +operation. The following approaches are being considered: + +- _Reference Counting_ - Maintain a count of references to each blob. This is + challenging for a number of reasons: 1. maintaining a consistent consensus + of reference counts across a set of Registries and 2. Building the initial + list of reference counts for an existing registry. These challenges can be + met with a consensus protocol like Paxos or Raft in the first case and a + necessary but simple scan in the second.. +- _Lock the World GC_ - Halt all writes to the data store. Walk the data store + and find all blob references. Delete all unreferenced blobs. This approach + is very simple but requires disabling writes for a period of time while the + service reads all data. This is slow and expensive but very accurate and + effective. +- _Generational GC_ - Do something similar to above but instead of blocking + writes, writes are sent to another storage backend while reads are broadcast + to the new and old backends. GC is then performed on the read-only portion. + Because writes land in the new backend, the data in the read-only section + can be safely deleted. The main drawbacks of this approach are complexity + and coordination. +- _Centralized Oracle_ - Using a centralized, transactional database, we can + know exactly which data is referenced at any given time. This avoids + coordination problem by managing this data in a single location. We trade + off metadata scalability for simplicity and performance. This is a very good + option for most registry deployments. This would create a bottleneck for + registry metadata. However, metadata is generally not the main bottleneck + when serving images. + +Please let us know if other solutions exist that we have yet to enumerate. +Note that for any approach, implementation is a massive consideration. For +example, a mark-sweep based solution may seem simple but the amount of work in +coordination offset the extra work it might take to build a _Centralized +Oracle_. We'll accept proposals for any solution but please coordinate with us +before dropping code. + +At this time, we have traded off simplicity and ease of deployment for disk +space. Simplicity and ease of deployment tend to reduce developer involvement, +which is currently the most expensive resource in software engineering. Taking +on any solution for deletes will greatly effect these factors, trading off +very cheap disk space for a complex deployment and operational story. + +Please see the following issues for more detail: + +- https://github.com/docker/distribution/issues/422 +- https://github.com/docker/distribution/issues/461 +- https://github.com/docker/distribution/issues/462 + +### Distribution Package + +At its core, the Distribution Project is a set of Go packages that make up +Distribution Components. At this time, most of these packages make up the +Registry implementation. + +The package itself is considered unstable. If you're using it, please take care to vendor the dependent version. + +For feature additions, please see the Registry section. In the future, we may break out a +separate Roadmap for distribution-specific features that apply to more than +just the registry. + +*** + +### Project Planning + +An [Open-Source Planning Process](https://github.com/docker/distribution/wiki/Open-Source-Planning-Process) is used to define the Roadmap. [Project Pages](https://github.com/docker/distribution/wiki) define the goals for each Milestone and identify current progress. + diff --git a/vendor/github.com/docker/distribution/blobs.go b/vendor/github.com/docker/distribution/blobs.go new file mode 100644 index 000000000..01d309029 --- /dev/null +++ b/vendor/github.com/docker/distribution/blobs.go @@ -0,0 +1,257 @@ +package distribution + +import ( + "errors" + "fmt" + "io" + "net/http" + "time" + + "github.com/docker/distribution/context" + "github.com/docker/distribution/reference" + "github.com/opencontainers/go-digest" +) + +var ( + // ErrBlobExists returned when blob already exists + ErrBlobExists = errors.New("blob exists") + + // ErrBlobDigestUnsupported when blob digest is an unsupported version. + ErrBlobDigestUnsupported = errors.New("unsupported blob digest") + + // ErrBlobUnknown when blob is not found. + ErrBlobUnknown = errors.New("unknown blob") + + // ErrBlobUploadUnknown returned when upload is not found. + ErrBlobUploadUnknown = errors.New("blob upload unknown") + + // ErrBlobInvalidLength returned when the blob has an expected length on + // commit, meaning mismatched with the descriptor or an invalid value. + ErrBlobInvalidLength = errors.New("blob invalid length") +) + +// ErrBlobInvalidDigest returned when digest check fails. +type ErrBlobInvalidDigest struct { + Digest digest.Digest + Reason error +} + +func (err ErrBlobInvalidDigest) Error() string { + return fmt.Sprintf("invalid digest for referenced layer: %v, %v", + err.Digest, err.Reason) +} + +// ErrBlobMounted returned when a blob is mounted from another repository +// instead of initiating an upload session. +type ErrBlobMounted struct { + From reference.Canonical + Descriptor Descriptor +} + +func (err ErrBlobMounted) Error() string { + return fmt.Sprintf("blob mounted from: %v to: %v", + err.From, err.Descriptor) +} + +// Descriptor describes targeted content. Used in conjunction with a blob +// store, a descriptor can be used to fetch, store and target any kind of +// blob. The struct also describes the wire protocol format. Fields should +// only be added but never changed. +type Descriptor struct { + // MediaType describe the type of the content. All text based formats are + // encoded as utf-8. + MediaType string `json:"mediaType,omitempty"` + + // Size in bytes of content. + Size int64 `json:"size,omitempty"` + + // Digest uniquely identifies the content. A byte stream can be verified + // against against this digest. + Digest digest.Digest `json:"digest,omitempty"` + + // URLs contains the source URLs of this content. + URLs []string `json:"urls,omitempty"` + + // NOTE: Before adding a field here, please ensure that all + // other options have been exhausted. Much of the type relationships + // depend on the simplicity of this type. +} + +// Descriptor returns the descriptor, to make it satisfy the Describable +// interface. Note that implementations of Describable are generally objects +// which can be described, not simply descriptors; this exception is in place +// to make it more convenient to pass actual descriptors to functions that +// expect Describable objects. +func (d Descriptor) Descriptor() Descriptor { + return d +} + +// BlobStatter makes blob descriptors available by digest. The service may +// provide a descriptor of a different digest if the provided digest is not +// canonical. +type BlobStatter interface { + // Stat provides metadata about a blob identified by the digest. If the + // blob is unknown to the describer, ErrBlobUnknown will be returned. + Stat(ctx context.Context, dgst digest.Digest) (Descriptor, error) +} + +// BlobDeleter enables deleting blobs from storage. +type BlobDeleter interface { + Delete(ctx context.Context, dgst digest.Digest) error +} + +// BlobEnumerator enables iterating over blobs from storage +type BlobEnumerator interface { + Enumerate(ctx context.Context, ingester func(dgst digest.Digest) error) error +} + +// BlobDescriptorService manages metadata about a blob by digest. Most +// implementations will not expose such an interface explicitly. Such mappings +// should be maintained by interacting with the BlobIngester. Hence, this is +// left off of BlobService and BlobStore. +type BlobDescriptorService interface { + BlobStatter + + // SetDescriptor assigns the descriptor to the digest. The provided digest and + // the digest in the descriptor must map to identical content but they may + // differ on their algorithm. The descriptor must have the canonical + // digest of the content and the digest algorithm must match the + // annotators canonical algorithm. + // + // Such a facility can be used to map blobs between digest domains, with + // the restriction that the algorithm of the descriptor must match the + // canonical algorithm (ie sha256) of the annotator. + SetDescriptor(ctx context.Context, dgst digest.Digest, desc Descriptor) error + + // Clear enables descriptors to be unlinked + Clear(ctx context.Context, dgst digest.Digest) error +} + +// BlobDescriptorServiceFactory creates middleware for BlobDescriptorService. +type BlobDescriptorServiceFactory interface { + BlobAccessController(svc BlobDescriptorService) BlobDescriptorService +} + +// ReadSeekCloser is the primary reader type for blob data, combining +// io.ReadSeeker with io.Closer. +type ReadSeekCloser interface { + io.ReadSeeker + io.Closer +} + +// BlobProvider describes operations for getting blob data. +type BlobProvider interface { + // Get returns the entire blob identified by digest along with the descriptor. + Get(ctx context.Context, dgst digest.Digest) ([]byte, error) + + // Open provides a ReadSeekCloser to the blob identified by the provided + // descriptor. If the blob is not known to the service, an error will be + // returned. + Open(ctx context.Context, dgst digest.Digest) (ReadSeekCloser, error) +} + +// BlobServer can serve blobs via http. +type BlobServer interface { + // ServeBlob attempts to serve the blob, identified by dgst, via http. The + // service may decide to redirect the client elsewhere or serve the data + // directly. + // + // This handler only issues successful responses, such as 2xx or 3xx, + // meaning it serves data or issues a redirect. If the blob is not + // available, an error will be returned and the caller may still issue a + // response. + // + // The implementation may serve the same blob from a different digest + // domain. The appropriate headers will be set for the blob, unless they + // have already been set by the caller. + ServeBlob(ctx context.Context, w http.ResponseWriter, r *http.Request, dgst digest.Digest) error +} + +// BlobIngester ingests blob data. +type BlobIngester interface { + // Put inserts the content p into the blob service, returning a descriptor + // or an error. + Put(ctx context.Context, mediaType string, p []byte) (Descriptor, error) + + // Create allocates a new blob writer to add a blob to this service. The + // returned handle can be written to and later resumed using an opaque + // identifier. With this approach, one can Close and Resume a BlobWriter + // multiple times until the BlobWriter is committed or cancelled. + Create(ctx context.Context, options ...BlobCreateOption) (BlobWriter, error) + + // Resume attempts to resume a write to a blob, identified by an id. + Resume(ctx context.Context, id string) (BlobWriter, error) +} + +// BlobCreateOption is a general extensible function argument for blob creation +// methods. A BlobIngester may choose to honor any or none of the given +// BlobCreateOptions, which can be specific to the implementation of the +// BlobIngester receiving them. +// TODO (brianbland): unify this with ManifestServiceOption in the future +type BlobCreateOption interface { + Apply(interface{}) error +} + +// CreateOptions is a collection of blob creation modifiers relevant to general +// blob storage intended to be configured by the BlobCreateOption.Apply method. +type CreateOptions struct { + Mount struct { + ShouldMount bool + From reference.Canonical + // Stat allows to pass precalculated descriptor to link and return. + // Blob access check will be skipped if set. + Stat *Descriptor + } +} + +// BlobWriter provides a handle for inserting data into a blob store. +// Instances should be obtained from BlobWriteService.Writer and +// BlobWriteService.Resume. If supported by the store, a writer can be +// recovered with the id. +type BlobWriter interface { + io.WriteCloser + io.ReaderFrom + + // Size returns the number of bytes written to this blob. + Size() int64 + + // ID returns the identifier for this writer. The ID can be used with the + // Blob service to later resume the write. + ID() string + + // StartedAt returns the time this blob write was started. + StartedAt() time.Time + + // Commit completes the blob writer process. The content is verified + // against the provided provisional descriptor, which may result in an + // error. Depending on the implementation, written data may be validated + // against the provisional descriptor fields. If MediaType is not present, + // the implementation may reject the commit or assign "application/octet- + // stream" to the blob. The returned descriptor may have a different + // digest depending on the blob store, referred to as the canonical + // descriptor. + Commit(ctx context.Context, provisional Descriptor) (canonical Descriptor, err error) + + // Cancel ends the blob write without storing any data and frees any + // associated resources. Any data written thus far will be lost. Cancel + // implementations should allow multiple calls even after a commit that + // result in a no-op. This allows use of Cancel in a defer statement, + // increasing the assurance that it is correctly called. + Cancel(ctx context.Context) error +} + +// BlobService combines the operations to access, read and write blobs. This +// can be used to describe remote blob services. +type BlobService interface { + BlobStatter + BlobProvider + BlobIngester +} + +// BlobStore represent the entire suite of blob related operations. Such an +// implementation can access, read, write, delete and serve blobs. +type BlobStore interface { + BlobService + BlobServer + BlobDeleter +} diff --git a/vendor/github.com/docker/distribution/circle.yml b/vendor/github.com/docker/distribution/circle.yml new file mode 100644 index 000000000..ddc76c86c --- /dev/null +++ b/vendor/github.com/docker/distribution/circle.yml @@ -0,0 +1,94 @@ +# Pony-up! +machine: + pre: + # Install gvm + - bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/1.0.22/binscripts/gvm-installer) + # Install codecov for coverage + - pip install --user codecov + + post: + # go + - gvm install go1.8 --prefer-binary --name=stable + + environment: + # Convenient shortcuts to "common" locations + CHECKOUT: /home/ubuntu/$CIRCLE_PROJECT_REPONAME + BASE_DIR: src/github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME + # Trick circle brainflat "no absolute path" behavior + BASE_STABLE: ../../../$HOME/.gvm/pkgsets/stable/global/$BASE_DIR + DOCKER_BUILDTAGS: "include_oss include_gcs" + # Workaround Circle parsing dumb bugs and/or YAML wonkyness + CIRCLE_PAIN: "mode: set" + + hosts: + # Not used yet + fancy: 127.0.0.1 + +dependencies: + pre: + # Copy the code to the gopath of all go versions + - > + gvm use stable && + mkdir -p "$(dirname $BASE_STABLE)" && + cp -R "$CHECKOUT" "$BASE_STABLE" + + override: + # Install dependencies for every copied clone/go version + - gvm use stable && go get github.com/lk4d4/vndr: + pwd: $BASE_STABLE + + post: + # For the stable go version, additionally install linting tools + - > + gvm use stable && + go get github.com/axw/gocov/gocov github.com/golang/lint/golint + +test: + pre: + # Output the go versions we are going to test + # - gvm use old && go version + - gvm use stable && go version + + # Ensure validation of dependencies + - git fetch origin: + pwd: $BASE_STABLE + - gvm use stable && if test -n "`git diff --stat=1000 origin/master | grep -E \"^[[:space:]]*vendor\"`"; then make dep-validate; fi: + pwd: $BASE_STABLE + + # First thing: build everything. This will catch compile errors, and it's + # also necessary for go vet to work properly (see #807). + - gvm use stable && go install $(go list ./... | grep -v "/vendor/"): + pwd: $BASE_STABLE + + # FMT + - gvm use stable && make fmt: + pwd: $BASE_STABLE + + # VET + - gvm use stable && make vet: + pwd: $BASE_STABLE + + # LINT + - gvm use stable && make lint: + pwd: $BASE_STABLE + + override: + # Test stable, and report + - gvm use stable; export ROOT_PACKAGE=$(go list .); go list -tags "$DOCKER_BUILDTAGS" ./... | grep -v "/vendor/" | xargs -L 1 -I{} bash -c 'export PACKAGE={}; go test -tags "$DOCKER_BUILDTAGS" -test.short -coverprofile=$GOPATH/src/$PACKAGE/coverage.out -coverpkg=$(./coverpkg.sh $PACKAGE $ROOT_PACKAGE) $PACKAGE': + timeout: 1000 + pwd: $BASE_STABLE + + # Test stable with race + - gvm use stable; export ROOT_PACKAGE=$(go list .); go list -tags "$DOCKER_BUILDTAGS" ./... | grep -v "/vendor/" | grep -v "registry/handlers" | grep -v "registry/storage/driver" | xargs -L 1 -I{} bash -c 'export PACKAGE={}; go test -race -tags "$DOCKER_BUILDTAGS" -test.short $PACKAGE': + timeout: 1000 + pwd: $BASE_STABLE + post: + # Report to codecov + - bash <(curl -s https://codecov.io/bash): + pwd: $BASE_STABLE + + ## Notes + # Do we want these as well? + # - go get code.google.com/p/go.tools/cmd/goimports + # - test -z "$(goimports -l -w ./... | tee /dev/stderr)" + # http://labix.org/gocheck diff --git a/vendor/github.com/docker/distribution/coverpkg.sh b/vendor/github.com/docker/distribution/coverpkg.sh new file mode 100755 index 000000000..25d419ae8 --- /dev/null +++ b/vendor/github.com/docker/distribution/coverpkg.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# Given a subpackage and the containing package, figures out which packages +# need to be passed to `go test -coverpkg`: this includes all of the +# subpackage's dependencies within the containing package, as well as the +# subpackage itself. +DEPENDENCIES="$(go list -f $'{{range $f := .Deps}}{{$f}}\n{{end}}' ${1} | grep ${2} | grep -v github.com/docker/distribution/vendor)" +echo "${1} ${DEPENDENCIES}" | xargs echo -n | tr ' ' ',' diff --git a/vendor/github.com/docker/distribution/digestset/set_test.go b/vendor/github.com/docker/distribution/digestset/set_test.go new file mode 100644 index 000000000..89c5729d0 --- /dev/null +++ b/vendor/github.com/docker/distribution/digestset/set_test.go @@ -0,0 +1,371 @@ +package digestset + +import ( + "crypto/sha256" + _ "crypto/sha512" + "encoding/binary" + "math/rand" + "testing" + + digest "github.com/opencontainers/go-digest" +) + +func assertEqualDigests(t *testing.T, d1, d2 digest.Digest) { + if d1 != d2 { + t.Fatalf("Digests do not match:\n\tActual: %s\n\tExpected: %s", d1, d2) + } +} + +func TestLookup(t *testing.T) { + digests := []digest.Digest{ + "sha256:1234511111111111111111111111111111111111111111111111111111111111", + "sha256:1234111111111111111111111111111111111111111111111111111111111111", + "sha256:1234611111111111111111111111111111111111111111111111111111111111", + "sha256:5432111111111111111111111111111111111111111111111111111111111111", + "sha256:6543111111111111111111111111111111111111111111111111111111111111", + "sha256:6432111111111111111111111111111111111111111111111111111111111111", + "sha256:6542111111111111111111111111111111111111111111111111111111111111", + "sha256:6532111111111111111111111111111111111111111111111111111111111111", + } + + dset := NewSet() + for i := range digests { + if err := dset.Add(digests[i]); err != nil { + t.Fatal(err) + } + } + + dgst, err := dset.Lookup("54") + if err != nil { + t.Fatal(err) + } + assertEqualDigests(t, dgst, digests[3]) + + dgst, err = dset.Lookup("1234") + if err == nil { + t.Fatal("Expected ambiguous error looking up: 1234") + } + if err != ErrDigestAmbiguous { + t.Fatal(err) + } + + dgst, err = dset.Lookup("9876") + if err == nil { + t.Fatal("Expected ambiguous error looking up: 9876") + } + if err != ErrDigestNotFound { + t.Fatal(err) + } + + dgst, err = dset.Lookup("sha256:1234") + if err == nil { + t.Fatal("Expected ambiguous error looking up: sha256:1234") + } + if err != ErrDigestAmbiguous { + t.Fatal(err) + } + + dgst, err = dset.Lookup("sha256:12345") + if err != nil { + t.Fatal(err) + } + assertEqualDigests(t, dgst, digests[0]) + + dgst, err = dset.Lookup("sha256:12346") + if err != nil { + t.Fatal(err) + } + assertEqualDigests(t, dgst, digests[2]) + + dgst, err = dset.Lookup("12346") + if err != nil { + t.Fatal(err) + } + assertEqualDigests(t, dgst, digests[2]) + + dgst, err = dset.Lookup("12345") + if err != nil { + t.Fatal(err) + } + assertEqualDigests(t, dgst, digests[0]) +} + +func TestAddDuplication(t *testing.T) { + digests := []digest.Digest{ + "sha256:1234111111111111111111111111111111111111111111111111111111111111", + "sha256:1234511111111111111111111111111111111111111111111111111111111111", + "sha256:1234611111111111111111111111111111111111111111111111111111111111", + "sha256:5432111111111111111111111111111111111111111111111111111111111111", + "sha256:6543111111111111111111111111111111111111111111111111111111111111", + "sha512:65431111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", + "sha512:65421111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", + "sha512:65321111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", + } + + dset := NewSet() + for i := range digests { + if err := dset.Add(digests[i]); err != nil { + t.Fatal(err) + } + } + + if len(dset.entries) != 8 { + t.Fatal("Invalid dset size") + } + + if err := dset.Add(digest.Digest("sha256:1234511111111111111111111111111111111111111111111111111111111111")); err != nil { + t.Fatal(err) + } + + if len(dset.entries) != 8 { + t.Fatal("Duplicate digest insert allowed") + } + + if err := dset.Add(digest.Digest("sha384:123451111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111")); err != nil { + t.Fatal(err) + } + + if len(dset.entries) != 9 { + t.Fatal("Insert with different algorithm not allowed") + } +} + +func TestRemove(t *testing.T) { + digests, err := createDigests(10) + if err != nil { + t.Fatal(err) + } + + dset := NewSet() + for i := range digests { + if err := dset.Add(digests[i]); err != nil { + t.Fatal(err) + } + } + + dgst, err := dset.Lookup(digests[0].String()) + if err != nil { + t.Fatal(err) + } + if dgst != digests[0] { + t.Fatalf("Unexpected digest value:\n\tExpected: %s\n\tActual: %s", digests[0], dgst) + } + + if err := dset.Remove(digests[0]); err != nil { + t.Fatal(err) + } + + if _, err := dset.Lookup(digests[0].String()); err != ErrDigestNotFound { + t.Fatalf("Expected error %v when looking up removed digest, got %v", ErrDigestNotFound, err) + } +} + +func TestAll(t *testing.T) { + digests, err := createDigests(100) + if err != nil { + t.Fatal(err) + } + + dset := NewSet() + for i := range digests { + if err := dset.Add(digests[i]); err != nil { + t.Fatal(err) + } + } + + all := map[digest.Digest]struct{}{} + for _, dgst := range dset.All() { + all[dgst] = struct{}{} + } + + if len(all) != len(digests) { + t.Fatalf("Unexpected number of unique digests found:\n\tExpected: %d\n\tActual: %d", len(digests), len(all)) + } + + for i, dgst := range digests { + if _, ok := all[dgst]; !ok { + t.Fatalf("Missing element at position %d: %s", i, dgst) + } + } + +} + +func assertEqualShort(t *testing.T, actual, expected string) { + if actual != expected { + t.Fatalf("Unexpected short value:\n\tExpected: %s\n\tActual: %s", expected, actual) + } +} + +func TestShortCodeTable(t *testing.T) { + digests := []digest.Digest{ + "sha256:1234111111111111111111111111111111111111111111111111111111111111", + "sha256:1234511111111111111111111111111111111111111111111111111111111111", + "sha256:1234611111111111111111111111111111111111111111111111111111111111", + "sha256:5432111111111111111111111111111111111111111111111111111111111111", + "sha256:6543111111111111111111111111111111111111111111111111111111111111", + "sha256:6432111111111111111111111111111111111111111111111111111111111111", + "sha256:6542111111111111111111111111111111111111111111111111111111111111", + "sha256:6532111111111111111111111111111111111111111111111111111111111111", + } + + dset := NewSet() + for i := range digests { + if err := dset.Add(digests[i]); err != nil { + t.Fatal(err) + } + } + + dump := ShortCodeTable(dset, 2) + + if len(dump) < len(digests) { + t.Fatalf("Error unexpected size: %d, expecting %d", len(dump), len(digests)) + } + assertEqualShort(t, dump[digests[0]], "12341") + assertEqualShort(t, dump[digests[1]], "12345") + assertEqualShort(t, dump[digests[2]], "12346") + assertEqualShort(t, dump[digests[3]], "54") + assertEqualShort(t, dump[digests[4]], "6543") + assertEqualShort(t, dump[digests[5]], "64") + assertEqualShort(t, dump[digests[6]], "6542") + assertEqualShort(t, dump[digests[7]], "653") +} + +func createDigests(count int) ([]digest.Digest, error) { + r := rand.New(rand.NewSource(25823)) + digests := make([]digest.Digest, count) + for i := range digests { + h := sha256.New() + if err := binary.Write(h, binary.BigEndian, r.Int63()); err != nil { + return nil, err + } + digests[i] = digest.NewDigest("sha256", h) + } + return digests, nil +} + +func benchAddNTable(b *testing.B, n int) { + digests, err := createDigests(n) + if err != nil { + b.Fatal(err) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dset := &Set{entries: digestEntries(make([]*digestEntry, 0, n))} + for j := range digests { + if err = dset.Add(digests[j]); err != nil { + b.Fatal(err) + } + } + } +} + +func benchLookupNTable(b *testing.B, n int, shortLen int) { + digests, err := createDigests(n) + if err != nil { + b.Fatal(err) + } + dset := &Set{entries: digestEntries(make([]*digestEntry, 0, n))} + for i := range digests { + if err := dset.Add(digests[i]); err != nil { + b.Fatal(err) + } + } + shorts := make([]string, 0, n) + for _, short := range ShortCodeTable(dset, shortLen) { + shorts = append(shorts, short) + } + + b.ResetTimer() + for i := 0; i < b.N; i++ { + if _, err = dset.Lookup(shorts[i%n]); err != nil { + b.Fatal(err) + } + } +} + +func benchRemoveNTable(b *testing.B, n int) { + digests, err := createDigests(n) + if err != nil { + b.Fatal(err) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dset := &Set{entries: digestEntries(make([]*digestEntry, 0, n))} + b.StopTimer() + for j := range digests { + if err = dset.Add(digests[j]); err != nil { + b.Fatal(err) + } + } + b.StartTimer() + for j := range digests { + if err = dset.Remove(digests[j]); err != nil { + b.Fatal(err) + } + } + } +} + +func benchShortCodeNTable(b *testing.B, n int, shortLen int) { + digests, err := createDigests(n) + if err != nil { + b.Fatal(err) + } + dset := &Set{entries: digestEntries(make([]*digestEntry, 0, n))} + for i := range digests { + if err := dset.Add(digests[i]); err != nil { + b.Fatal(err) + } + } + + b.ResetTimer() + for i := 0; i < b.N; i++ { + ShortCodeTable(dset, shortLen) + } +} + +func BenchmarkAdd10(b *testing.B) { + benchAddNTable(b, 10) +} + +func BenchmarkAdd100(b *testing.B) { + benchAddNTable(b, 100) +} + +func BenchmarkAdd1000(b *testing.B) { + benchAddNTable(b, 1000) +} + +func BenchmarkRemove10(b *testing.B) { + benchRemoveNTable(b, 10) +} + +func BenchmarkRemove100(b *testing.B) { + benchRemoveNTable(b, 100) +} + +func BenchmarkRemove1000(b *testing.B) { + benchRemoveNTable(b, 1000) +} + +func BenchmarkLookup10(b *testing.B) { + benchLookupNTable(b, 10, 12) +} + +func BenchmarkLookup100(b *testing.B) { + benchLookupNTable(b, 100, 12) +} + +func BenchmarkLookup1000(b *testing.B) { + benchLookupNTable(b, 1000, 12) +} + +func BenchmarkShortCode10(b *testing.B) { + benchShortCodeNTable(b, 10, 12) +} +func BenchmarkShortCode100(b *testing.B) { + benchShortCodeNTable(b, 100, 12) +} +func BenchmarkShortCode1000(b *testing.B) { + benchShortCodeNTable(b, 1000, 12) +} diff --git a/vendor/github.com/docker/distribution/doc.go b/vendor/github.com/docker/distribution/doc.go new file mode 100644 index 000000000..bdd8cb708 --- /dev/null +++ b/vendor/github.com/docker/distribution/doc.go @@ -0,0 +1,7 @@ +// Package distribution will define the interfaces for the components of +// docker distribution. The goal is to allow users to reliably package, ship +// and store content related to docker images. +// +// This is currently a work in progress. More details are available in the +// README.md. +package distribution diff --git a/vendor/github.com/docker/distribution/errors.go b/vendor/github.com/docker/distribution/errors.go new file mode 100644 index 000000000..020d33258 --- /dev/null +++ b/vendor/github.com/docker/distribution/errors.go @@ -0,0 +1,115 @@ +package distribution + +import ( + "errors" + "fmt" + "strings" + + "github.com/opencontainers/go-digest" +) + +// ErrAccessDenied is returned when an access to a requested resource is +// denied. +var ErrAccessDenied = errors.New("access denied") + +// ErrManifestNotModified is returned when a conditional manifest GetByTag +// returns nil due to the client indicating it has the latest version +var ErrManifestNotModified = errors.New("manifest not modified") + +// ErrUnsupported is returned when an unimplemented or unsupported action is +// performed +var ErrUnsupported = errors.New("operation unsupported") + +// ErrTagUnknown is returned if the given tag is not known by the tag service +type ErrTagUnknown struct { + Tag string +} + +func (err ErrTagUnknown) Error() string { + return fmt.Sprintf("unknown tag=%s", err.Tag) +} + +// ErrRepositoryUnknown is returned if the named repository is not known by +// the registry. +type ErrRepositoryUnknown struct { + Name string +} + +func (err ErrRepositoryUnknown) Error() string { + return fmt.Sprintf("unknown repository name=%s", err.Name) +} + +// ErrRepositoryNameInvalid should be used to denote an invalid repository +// name. Reason may set, indicating the cause of invalidity. +type ErrRepositoryNameInvalid struct { + Name string + Reason error +} + +func (err ErrRepositoryNameInvalid) Error() string { + return fmt.Sprintf("repository name %q invalid: %v", err.Name, err.Reason) +} + +// ErrManifestUnknown is returned if the manifest is not known by the +// registry. +type ErrManifestUnknown struct { + Name string + Tag string +} + +func (err ErrManifestUnknown) Error() string { + return fmt.Sprintf("unknown manifest name=%s tag=%s", err.Name, err.Tag) +} + +// ErrManifestUnknownRevision is returned when a manifest cannot be found by +// revision within a repository. +type ErrManifestUnknownRevision struct { + Name string + Revision digest.Digest +} + +func (err ErrManifestUnknownRevision) Error() string { + return fmt.Sprintf("unknown manifest name=%s revision=%s", err.Name, err.Revision) +} + +// ErrManifestUnverified is returned when the registry is unable to verify +// the manifest. +type ErrManifestUnverified struct{} + +func (ErrManifestUnverified) Error() string { + return "unverified manifest" +} + +// ErrManifestVerification provides a type to collect errors encountered +// during manifest verification. Currently, it accepts errors of all types, +// but it may be narrowed to those involving manifest verification. +type ErrManifestVerification []error + +func (errs ErrManifestVerification) Error() string { + var parts []string + for _, err := range errs { + parts = append(parts, err.Error()) + } + + return fmt.Sprintf("errors verifying manifest: %v", strings.Join(parts, ",")) +} + +// ErrManifestBlobUnknown returned when a referenced blob cannot be found. +type ErrManifestBlobUnknown struct { + Digest digest.Digest +} + +func (err ErrManifestBlobUnknown) Error() string { + return fmt.Sprintf("unknown blob %v on manifest", err.Digest) +} + +// ErrManifestNameInvalid should be used to denote an invalid manifest +// name. Reason may set, indicating the cause of invalidity. +type ErrManifestNameInvalid struct { + Name string + Reason error +} + +func (err ErrManifestNameInvalid) Error() string { + return fmt.Sprintf("manifest name %q invalid: %v", err.Name, err.Reason) +} diff --git a/vendor/github.com/docker/distribution/manifests.go b/vendor/github.com/docker/distribution/manifests.go new file mode 100644 index 000000000..2c99f25d3 --- /dev/null +++ b/vendor/github.com/docker/distribution/manifests.go @@ -0,0 +1,125 @@ +package distribution + +import ( + "fmt" + "mime" + + "github.com/docker/distribution/context" + "github.com/opencontainers/go-digest" +) + +// Manifest represents a registry object specifying a set of +// references and an optional target +type Manifest interface { + // References returns a list of objects which make up this manifest. + // A reference is anything which can be represented by a + // distribution.Descriptor. These can consist of layers, resources or other + // manifests. + // + // While no particular order is required, implementations should return + // them from highest to lowest priority. For example, one might want to + // return the base layer before the top layer. + References() []Descriptor + + // Payload provides the serialized format of the manifest, in addition to + // the media type. + Payload() (mediaType string, payload []byte, err error) +} + +// ManifestBuilder creates a manifest allowing one to include dependencies. +// Instances can be obtained from a version-specific manifest package. Manifest +// specific data is passed into the function which creates the builder. +type ManifestBuilder interface { + // Build creates the manifest from his builder. + Build(ctx context.Context) (Manifest, error) + + // References returns a list of objects which have been added to this + // builder. The dependencies are returned in the order they were added, + // which should be from base to head. + References() []Descriptor + + // AppendReference includes the given object in the manifest after any + // existing dependencies. If the add fails, such as when adding an + // unsupported dependency, an error may be returned. + // + // The destination of the reference is dependent on the manifest type and + // the dependency type. + AppendReference(dependency Describable) error +} + +// ManifestService describes operations on image manifests. +type ManifestService interface { + // Exists returns true if the manifest exists. + Exists(ctx context.Context, dgst digest.Digest) (bool, error) + + // Get retrieves the manifest specified by the given digest + Get(ctx context.Context, dgst digest.Digest, options ...ManifestServiceOption) (Manifest, error) + + // Put creates or updates the given manifest returning the manifest digest + Put(ctx context.Context, manifest Manifest, options ...ManifestServiceOption) (digest.Digest, error) + + // Delete removes the manifest specified by the given digest. Deleting + // a manifest that doesn't exist will return ErrManifestNotFound + Delete(ctx context.Context, dgst digest.Digest) error +} + +// ManifestEnumerator enables iterating over manifests +type ManifestEnumerator interface { + // Enumerate calls ingester for each manifest. + Enumerate(ctx context.Context, ingester func(digest.Digest) error) error +} + +// Describable is an interface for descriptors +type Describable interface { + Descriptor() Descriptor +} + +// ManifestMediaTypes returns the supported media types for manifests. +func ManifestMediaTypes() (mediaTypes []string) { + for t := range mappings { + if t != "" { + mediaTypes = append(mediaTypes, t) + } + } + return +} + +// UnmarshalFunc implements manifest unmarshalling a given MediaType +type UnmarshalFunc func([]byte) (Manifest, Descriptor, error) + +var mappings = make(map[string]UnmarshalFunc, 0) + +// UnmarshalManifest looks up manifest unmarshal functions based on +// MediaType +func UnmarshalManifest(ctHeader string, p []byte) (Manifest, Descriptor, error) { + // Need to look up by the actual media type, not the raw contents of + // the header. Strip semicolons and anything following them. + var mediaType string + if ctHeader != "" { + var err error + mediaType, _, err = mime.ParseMediaType(ctHeader) + if err != nil { + return nil, Descriptor{}, err + } + } + + unmarshalFunc, ok := mappings[mediaType] + if !ok { + unmarshalFunc, ok = mappings[""] + if !ok { + return nil, Descriptor{}, fmt.Errorf("unsupported manifest media type and no default available: %s", mediaType) + } + } + + return unmarshalFunc(p) +} + +// RegisterManifestSchema registers an UnmarshalFunc for a given schema type. This +// should be called from specific +func RegisterManifestSchema(mediaType string, u UnmarshalFunc) error { + if _, ok := mappings[mediaType]; ok { + return fmt.Errorf("manifest media type registration would overwrite existing: %s", mediaType) + } + mappings[mediaType] = u + return nil +} diff --git a/vendor/github.com/docker/distribution/reference/normalize_test.go b/vendor/github.com/docker/distribution/reference/normalize_test.go new file mode 100644 index 000000000..a881972ac --- /dev/null +++ b/vendor/github.com/docker/distribution/reference/normalize_test.go @@ -0,0 +1,625 @@ +package reference + +import ( + "strconv" + "testing" + + "github.com/docker/distribution/digestset" + "github.com/opencontainers/go-digest" +) + +func TestValidateReferenceName(t *testing.T) { + validRepoNames := []string{ + "docker/docker", + "library/debian", + "debian", + "docker.io/docker/docker", + "docker.io/library/debian", + "docker.io/debian", + "index.docker.io/docker/docker", + "index.docker.io/library/debian", + "index.docker.io/debian", + "127.0.0.1:5000/docker/docker", + "127.0.0.1:5000/library/debian", + "127.0.0.1:5000/debian", + "thisisthesongthatneverendsitgoesonandonandonthisisthesongthatnev", + + // This test case was moved from invalid to valid since it is valid input + // when specified with a hostname, it removes the ambiguity from about + // whether the value is an identifier or repository name + "docker.io/1a3f5e7d9c1b3a5f7e9d1c3b5a7f9e1d3c5b7a9f1e3d5d7c9b1a3f5e7d9c1b3a", + } + invalidRepoNames := []string{ + "https://github.com/docker/docker", + "docker/Docker", + "-docker", + "-docker/docker", + "-docker.io/docker/docker", + "docker///docker", + "docker.io/docker/Docker", + "docker.io/docker///docker", + "1a3f5e7d9c1b3a5f7e9d1c3b5a7f9e1d3c5b7a9f1e3d5d7c9b1a3f5e7d9c1b3a", + } + + for _, name := range invalidRepoNames { + _, err := ParseNormalizedNamed(name) + if err == nil { + t.Fatalf("Expected invalid repo name for %q", name) + } + } + + for _, name := range validRepoNames { + _, err := ParseNormalizedNamed(name) + if err != nil { + t.Fatalf("Error parsing repo name %s, got: %q", name, err) + } + } +} + +func TestValidateRemoteName(t *testing.T) { + validRepositoryNames := []string{ + // Sanity check. + "docker/docker", + + // Allow 64-character non-hexadecimal names (hexadecimal names are forbidden). + "thisisthesongthatneverendsitgoesonandonandonthisisthesongthatnev", + + // Allow embedded hyphens. + "docker-rules/docker", + + // Allow multiple hyphens as well. + "docker---rules/docker", + + //Username doc and image name docker being tested. + "doc/docker", + + // single character names are now allowed. + "d/docker", + "jess/t", + + // Consecutive underscores. + "dock__er/docker", + } + for _, repositoryName := range validRepositoryNames { + _, err := ParseNormalizedNamed(repositoryName) + if err != nil { + t.Errorf("Repository name should be valid: %v. Error: %v", repositoryName, err) + } + } + + invalidRepositoryNames := []string{ + // Disallow capital letters. + "docker/Docker", + + // Only allow one slash. + "docker///docker", + + // Disallow 64-character hexadecimal. + "1a3f5e7d9c1b3a5f7e9d1c3b5a7f9e1d3c5b7a9f1e3d5d7c9b1a3f5e7d9c1b3a", + + // Disallow leading and trailing hyphens in namespace. + "-docker/docker", + "docker-/docker", + "-docker-/docker", + + // Don't allow underscores everywhere (as opposed to hyphens). + "____/____", + + "_docker/_docker", + + // Disallow consecutive periods. + "dock..er/docker", + "dock_.er/docker", + "dock-.er/docker", + + // No repository. + "docker/", + + //namespace too long + "this_is_not_a_valid_namespace_because_its_lenth_is_greater_than_255_this_is_not_a_valid_namespace_because_its_lenth_is_greater_than_255_this_is_not_a_valid_namespace_because_its_lenth_is_greater_than_255_this_is_not_a_valid_namespace_because_its_lenth_is_greater_than_255/docker", + } + for _, repositoryName := range invalidRepositoryNames { + if _, err := ParseNormalizedNamed(repositoryName); err == nil { + t.Errorf("Repository name should be invalid: %v", repositoryName) + } + } +} + +func TestParseRepositoryInfo(t *testing.T) { + type tcase struct { + RemoteName, FamiliarName, FullName, AmbiguousName, Domain string + } + + tcases := []tcase{ + { + RemoteName: "fooo/bar", + FamiliarName: "fooo/bar", + FullName: "docker.io/fooo/bar", + AmbiguousName: "index.docker.io/fooo/bar", + Domain: "docker.io", + }, + { + RemoteName: "library/ubuntu", + FamiliarName: "ubuntu", + FullName: "docker.io/library/ubuntu", + AmbiguousName: "library/ubuntu", + Domain: "docker.io", + }, + { + RemoteName: "nonlibrary/ubuntu", + FamiliarName: "nonlibrary/ubuntu", + FullName: "docker.io/nonlibrary/ubuntu", + AmbiguousName: "", + Domain: "docker.io", + }, + { + RemoteName: "other/library", + FamiliarName: "other/library", + FullName: "docker.io/other/library", + AmbiguousName: "", + Domain: "docker.io", + }, + { + RemoteName: "private/moonbase", + FamiliarName: "127.0.0.1:8000/private/moonbase", + FullName: "127.0.0.1:8000/private/moonbase", + AmbiguousName: "", + Domain: "127.0.0.1:8000", + }, + { + RemoteName: "privatebase", + FamiliarName: "127.0.0.1:8000/privatebase", + FullName: "127.0.0.1:8000/privatebase", + AmbiguousName: "", + Domain: "127.0.0.1:8000", + }, + { + RemoteName: "private/moonbase", + FamiliarName: "example.com/private/moonbase", + FullName: "example.com/private/moonbase", + AmbiguousName: "", + Domain: "example.com", + }, + { + RemoteName: "privatebase", + FamiliarName: "example.com/privatebase", + FullName: "example.com/privatebase", + AmbiguousName: "", + Domain: "example.com", + }, + { + RemoteName: "private/moonbase", + FamiliarName: "example.com:8000/private/moonbase", + FullName: "example.com:8000/private/moonbase", + AmbiguousName: "", + Domain: "example.com:8000", + }, + { + RemoteName: "privatebasee", + FamiliarName: "example.com:8000/privatebasee", + FullName: "example.com:8000/privatebasee", + AmbiguousName: "", + Domain: "example.com:8000", + }, + { + RemoteName: "library/ubuntu-12.04-base", + FamiliarName: "ubuntu-12.04-base", + FullName: "docker.io/library/ubuntu-12.04-base", + AmbiguousName: "index.docker.io/library/ubuntu-12.04-base", + Domain: "docker.io", + }, + { + RemoteName: "library/foo", + FamiliarName: "foo", + FullName: "docker.io/library/foo", + AmbiguousName: "docker.io/foo", + Domain: "docker.io", + }, + { + RemoteName: "library/foo/bar", + FamiliarName: "library/foo/bar", + FullName: "docker.io/library/foo/bar", + AmbiguousName: "", + Domain: "docker.io", + }, + { + RemoteName: "store/foo/bar", + FamiliarName: "store/foo/bar", + FullName: "docker.io/store/foo/bar", + AmbiguousName: "", + Domain: "docker.io", + }, + } + + for _, tcase := range tcases { + refStrings := []string{tcase.FamiliarName, tcase.FullName} + if tcase.AmbiguousName != "" { + refStrings = append(refStrings, tcase.AmbiguousName) + } + + var refs []Named + for _, r := range refStrings { + named, err := ParseNormalizedNamed(r) + if err != nil { + t.Fatal(err) + } + refs = append(refs, named) + } + + for _, r := range refs { + if expected, actual := tcase.FamiliarName, FamiliarName(r); expected != actual { + t.Fatalf("Invalid normalized reference for %q. Expected %q, got %q", r, expected, actual) + } + if expected, actual := tcase.FullName, r.String(); expected != actual { + t.Fatalf("Invalid canonical reference for %q. Expected %q, got %q", r, expected, actual) + } + if expected, actual := tcase.Domain, Domain(r); expected != actual { + t.Fatalf("Invalid domain for %q. Expected %q, got %q", r, expected, actual) + } + if expected, actual := tcase.RemoteName, Path(r); expected != actual { + t.Fatalf("Invalid remoteName for %q. Expected %q, got %q", r, expected, actual) + } + + } + } +} + +func TestParseReferenceWithTagAndDigest(t *testing.T) { + shortRef := "busybox:latest@sha256:86e0e091d0da6bde2456dbb48306f3956bbeb2eae1b5b9a43045843f69fe4aaa" + ref, err := ParseNormalizedNamed(shortRef) + if err != nil { + t.Fatal(err) + } + if expected, actual := "docker.io/library/"+shortRef, ref.String(); actual != expected { + t.Fatalf("Invalid parsed reference for %q: expected %q, got %q", ref, expected, actual) + } + + if _, isTagged := ref.(NamedTagged); !isTagged { + t.Fatalf("Reference from %q should support tag", ref) + } + if _, isCanonical := ref.(Canonical); !isCanonical { + t.Fatalf("Reference from %q should support digest", ref) + } + if expected, actual := shortRef, FamiliarString(ref); actual != expected { + t.Fatalf("Invalid parsed reference for %q: expected %q, got %q", ref, expected, actual) + } +} + +func TestInvalidReferenceComponents(t *testing.T) { + if _, err := ParseNormalizedNamed("-foo"); err == nil { + t.Fatal("Expected WithName to detect invalid name") + } + ref, err := ParseNormalizedNamed("busybox") + if err != nil { + t.Fatal(err) + } + if _, err := WithTag(ref, "-foo"); err == nil { + t.Fatal("Expected WithName to detect invalid tag") + } + if _, err := WithDigest(ref, digest.Digest("foo")); err == nil { + t.Fatal("Expected WithDigest to detect invalid digest") + } +} + +func equalReference(r1, r2 Reference) bool { + switch v1 := r1.(type) { + case digestReference: + if v2, ok := r2.(digestReference); ok { + return v1 == v2 + } + case repository: + if v2, ok := r2.(repository); ok { + return v1 == v2 + } + case taggedReference: + if v2, ok := r2.(taggedReference); ok { + return v1 == v2 + } + case canonicalReference: + if v2, ok := r2.(canonicalReference); ok { + return v1 == v2 + } + case reference: + if v2, ok := r2.(reference); ok { + return v1 == v2 + } + } + return false +} + +func TestParseAnyReference(t *testing.T) { + tcases := []struct { + Reference string + Equivalent string + Expected Reference + Digests []digest.Digest + }{ + { + Reference: "redis", + Equivalent: "docker.io/library/redis", + }, + { + Reference: "redis:latest", + Equivalent: "docker.io/library/redis:latest", + }, + { + Reference: "docker.io/library/redis:latest", + Equivalent: "docker.io/library/redis:latest", + }, + { + Reference: "redis@sha256:dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c", + Equivalent: "docker.io/library/redis@sha256:dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c", + }, + { + Reference: "docker.io/library/redis@sha256:dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c", + Equivalent: "docker.io/library/redis@sha256:dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c", + }, + { + Reference: "dmcgowan/myapp", + Equivalent: "docker.io/dmcgowan/myapp", + }, + { + Reference: "dmcgowan/myapp:latest", + Equivalent: "docker.io/dmcgowan/myapp:latest", + }, + { + Reference: "docker.io/mcgowan/myapp:latest", + Equivalent: "docker.io/mcgowan/myapp:latest", + }, + { + Reference: "dmcgowan/myapp@sha256:dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c", + Equivalent: "docker.io/dmcgowan/myapp@sha256:dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c", + }, + { + Reference: "docker.io/dmcgowan/myapp@sha256:dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c", + Equivalent: "docker.io/dmcgowan/myapp@sha256:dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c", + }, + { + Reference: "dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c", + Expected: digestReference("sha256:dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c"), + Equivalent: "sha256:dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c", + }, + { + Reference: "sha256:dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c", + Expected: digestReference("sha256:dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c"), + Equivalent: "sha256:dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c", + }, + { + Reference: "dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9", + Equivalent: "docker.io/library/dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9", + }, + { + Reference: "dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9", + Expected: digestReference("sha256:dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c"), + Equivalent: "sha256:dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c", + Digests: []digest.Digest{ + digest.Digest("sha256:dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c"), + digest.Digest("sha256:abcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c"), + }, + }, + { + Reference: "dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9", + Equivalent: "docker.io/library/dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9", + Digests: []digest.Digest{ + digest.Digest("sha256:abcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c"), + }, + }, + { + Reference: "dbcc1c", + Expected: digestReference("sha256:dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c"), + Equivalent: "sha256:dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c", + Digests: []digest.Digest{ + digest.Digest("sha256:dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c"), + digest.Digest("sha256:abcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c"), + }, + }, + { + Reference: "dbcc1", + Equivalent: "docker.io/library/dbcc1", + Digests: []digest.Digest{ + digest.Digest("sha256:dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c"), + digest.Digest("sha256:abcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c"), + }, + }, + { + Reference: "dbcc1c", + Equivalent: "docker.io/library/dbcc1c", + Digests: []digest.Digest{ + digest.Digest("sha256:abcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c"), + }, + }, + } + + for _, tcase := range tcases { + var ref Reference + var err error + if len(tcase.Digests) == 0 { + ref, err = ParseAnyReference(tcase.Reference) + } else { + ds := digestset.NewSet() + for _, dgst := range tcase.Digests { + if err := ds.Add(dgst); err != nil { + t.Fatalf("Error adding digest %s: %v", dgst.String(), err) + } + } + ref, err = ParseAnyReferenceWithSet(tcase.Reference, ds) + } + if err != nil { + t.Fatalf("Error parsing reference %s: %v", tcase.Reference, err) + } + if ref.String() != tcase.Equivalent { + t.Fatalf("Unexpected string: %s, expected %s", ref.String(), tcase.Equivalent) + } + + expected := tcase.Expected + if expected == nil { + expected, err = Parse(tcase.Equivalent) + if err != nil { + t.Fatalf("Error parsing reference %s: %v", tcase.Equivalent, err) + } + } + if !equalReference(ref, expected) { + t.Errorf("Unexpected reference %#v, expected %#v", ref, expected) + } + } +} + +func TestNormalizedSplitHostname(t *testing.T) { + testcases := []struct { + input string + domain string + name string + }{ + { + input: "test.com/foo", + domain: "test.com", + name: "foo", + }, + { + input: "test_com/foo", + domain: "docker.io", + name: "test_com/foo", + }, + { + input: "docker/migrator", + domain: "docker.io", + name: "docker/migrator", + }, + { + input: "test.com:8080/foo", + domain: "test.com:8080", + name: "foo", + }, + { + input: "test-com:8080/foo", + domain: "test-com:8080", + name: "foo", + }, + { + input: "foo", + domain: "docker.io", + name: "library/foo", + }, + { + input: "xn--n3h.com/foo", + domain: "xn--n3h.com", + name: "foo", + }, + { + input: "xn--n3h.com:18080/foo", + domain: "xn--n3h.com:18080", + name: "foo", + }, + { + input: "docker.io/foo", + domain: "docker.io", + name: "library/foo", + }, + { + input: "docker.io/library/foo", + domain: "docker.io", + name: "library/foo", + }, + { + input: "docker.io/library/foo/bar", + domain: "docker.io", + name: "library/foo/bar", + }, + } + for _, testcase := range testcases { + failf := func(format string, v ...interface{}) { + t.Logf(strconv.Quote(testcase.input)+": "+format, v...) + t.Fail() + } + + named, err := ParseNormalizedNamed(testcase.input) + if err != nil { + failf("error parsing name: %s", err) + } + domain, name := SplitHostname(named) + if domain != testcase.domain { + failf("unexpected domain: got %q, expected %q", domain, testcase.domain) + } + if name != testcase.name { + failf("unexpected name: got %q, expected %q", name, testcase.name) + } + } +} + +func TestMatchError(t *testing.T) { + named, err := ParseAnyReference("foo") + if err != nil { + t.Fatal(err) + } + _, err = FamiliarMatch("[-x]", named) + if err == nil { + t.Fatalf("expected an error, got nothing") + } +} + +func TestMatch(t *testing.T) { + matchCases := []struct { + reference string + pattern string + expected bool + }{ + { + reference: "foo", + pattern: "foo/**/ba[rz]", + expected: false, + }, + { + reference: "foo/any/bat", + pattern: "foo/**/ba[rz]", + expected: false, + }, + { + reference: "foo/a/bar", + pattern: "foo/**/ba[rz]", + expected: true, + }, + { + reference: "foo/b/baz", + pattern: "foo/**/ba[rz]", + expected: true, + }, + { + reference: "foo/c/baz:tag", + pattern: "foo/**/ba[rz]", + expected: true, + }, + { + reference: "foo/c/baz:tag", + pattern: "foo/*/baz:tag", + expected: true, + }, + { + reference: "foo/c/baz:tag", + pattern: "foo/c/baz:tag", + expected: true, + }, + { + reference: "example.com/foo/c/baz:tag", + pattern: "*/foo/c/baz", + expected: true, + }, + { + reference: "example.com/foo/c/baz:tag", + pattern: "example.com/foo/c/baz", + expected: true, + }, + } + for _, c := range matchCases { + named, err := ParseAnyReference(c.reference) + if err != nil { + t.Fatal(err) + } + actual, err := FamiliarMatch(c.pattern, named) + if err != nil { + t.Fatal(err) + } + if actual != c.expected { + t.Fatalf("expected %s match %s to be %v, was %v", c.reference, c.pattern, c.expected, actual) + } + } +} diff --git a/vendor/github.com/docker/distribution/reference/reference_test.go b/vendor/github.com/docker/distribution/reference/reference_test.go new file mode 100644 index 000000000..16b871f98 --- /dev/null +++ b/vendor/github.com/docker/distribution/reference/reference_test.go @@ -0,0 +1,659 @@ +package reference + +import ( + _ "crypto/sha256" + _ "crypto/sha512" + "encoding/json" + "strconv" + "strings" + "testing" + + "github.com/opencontainers/go-digest" +) + +func TestReferenceParse(t *testing.T) { + // referenceTestcases is a unified set of testcases for + // testing the parsing of references + referenceTestcases := []struct { + // input is the repository name or name component testcase + input string + // err is the error expected from Parse, or nil + err error + // repository is the string representation for the reference + repository string + // domain is the domain expected in the reference + domain string + // tag is the tag for the reference + tag string + // digest is the digest for the reference (enforces digest reference) + digest string + }{ + { + input: "test_com", + repository: "test_com", + }, + { + input: "test.com:tag", + repository: "test.com", + tag: "tag", + }, + { + input: "test.com:5000", + repository: "test.com", + tag: "5000", + }, + { + input: "test.com/repo:tag", + domain: "test.com", + repository: "test.com/repo", + tag: "tag", + }, + { + input: "test:5000/repo", + domain: "test:5000", + repository: "test:5000/repo", + }, + { + input: "test:5000/repo:tag", + domain: "test:5000", + repository: "test:5000/repo", + tag: "tag", + }, + { + input: "test:5000/repo@sha256:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + domain: "test:5000", + repository: "test:5000/repo", + digest: "sha256:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + }, + { + input: "test:5000/repo:tag@sha256:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + domain: "test:5000", + repository: "test:5000/repo", + tag: "tag", + digest: "sha256:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + }, + { + input: "test:5000/repo", + domain: "test:5000", + repository: "test:5000/repo", + }, + { + input: "", + err: ErrNameEmpty, + }, + { + input: ":justtag", + err: ErrReferenceInvalidFormat, + }, + { + input: "@sha256:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + err: ErrReferenceInvalidFormat, + }, + { + input: "repo@sha256:ffffffffffffffffffffffffffffffffff", + err: digest.ErrDigestInvalidLength, + }, + { + input: "validname@invaliddigest:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + err: digest.ErrDigestUnsupported, + }, + { + input: "Uppercase:tag", + err: ErrNameContainsUppercase, + }, + // FIXME "Uppercase" is incorrectly handled as a domain-name here, therefore passes. + // See https://github.com/docker/distribution/pull/1778, and https://github.com/docker/docker/pull/20175 + //{ + // input: "Uppercase/lowercase:tag", + // err: ErrNameContainsUppercase, + //}, + { + input: "test:5000/Uppercase/lowercase:tag", + err: ErrNameContainsUppercase, + }, + { + input: "lowercase:Uppercase", + repository: "lowercase", + tag: "Uppercase", + }, + { + input: strings.Repeat("a/", 128) + "a:tag", + err: ErrNameTooLong, + }, + { + input: strings.Repeat("a/", 127) + "a:tag-puts-this-over-max", + domain: "a", + repository: strings.Repeat("a/", 127) + "a", + tag: "tag-puts-this-over-max", + }, + { + input: "aa/asdf$$^/aa", + err: ErrReferenceInvalidFormat, + }, + { + input: "sub-dom1.foo.com/bar/baz/quux", + domain: "sub-dom1.foo.com", + repository: "sub-dom1.foo.com/bar/baz/quux", + }, + { + input: "sub-dom1.foo.com/bar/baz/quux:some-long-tag", + domain: "sub-dom1.foo.com", + repository: "sub-dom1.foo.com/bar/baz/quux", + tag: "some-long-tag", + }, + { + input: "b.gcr.io/test.example.com/my-app:test.example.com", + domain: "b.gcr.io", + repository: "b.gcr.io/test.example.com/my-app", + tag: "test.example.com", + }, + { + input: "xn--n3h.com/myimage:xn--n3h.com", // ☃.com in punycode + domain: "xn--n3h.com", + repository: "xn--n3h.com/myimage", + tag: "xn--n3h.com", + }, + { + input: "xn--7o8h.com/myimage:xn--7o8h.com@sha512:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", // 🐳.com in punycode + domain: "xn--7o8h.com", + repository: "xn--7o8h.com/myimage", + tag: "xn--7o8h.com", + digest: "sha512:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + }, + { + input: "foo_bar.com:8080", + repository: "foo_bar.com", + tag: "8080", + }, + { + input: "foo/foo_bar.com:8080", + domain: "foo", + repository: "foo/foo_bar.com", + tag: "8080", + }, + } + for _, testcase := range referenceTestcases { + failf := func(format string, v ...interface{}) { + t.Logf(strconv.Quote(testcase.input)+": "+format, v...) + t.Fail() + } + + repo, err := Parse(testcase.input) + if testcase.err != nil { + if err == nil { + failf("missing expected error: %v", testcase.err) + } else if testcase.err != err { + failf("mismatched error: got %v, expected %v", err, testcase.err) + } + continue + } else if err != nil { + failf("unexpected parse error: %v", err) + continue + } + if repo.String() != testcase.input { + failf("mismatched repo: got %q, expected %q", repo.String(), testcase.input) + } + + if named, ok := repo.(Named); ok { + if named.Name() != testcase.repository { + failf("unexpected repository: got %q, expected %q", named.Name(), testcase.repository) + } + domain, _ := SplitHostname(named) + if domain != testcase.domain { + failf("unexpected domain: got %q, expected %q", domain, testcase.domain) + } + } else if testcase.repository != "" || testcase.domain != "" { + failf("expected named type, got %T", repo) + } + + tagged, ok := repo.(Tagged) + if testcase.tag != "" { + if ok { + if tagged.Tag() != testcase.tag { + failf("unexpected tag: got %q, expected %q", tagged.Tag(), testcase.tag) + } + } else { + failf("expected tagged type, got %T", repo) + } + } else if ok { + failf("unexpected tagged type") + } + + digested, ok := repo.(Digested) + if testcase.digest != "" { + if ok { + if digested.Digest().String() != testcase.digest { + failf("unexpected digest: got %q, expected %q", digested.Digest().String(), testcase.digest) + } + } else { + failf("expected digested type, got %T", repo) + } + } else if ok { + failf("unexpected digested type") + } + + } +} + +// TestWithNameFailure tests cases where WithName should fail. Cases where it +// should succeed are covered by TestSplitHostname, below. +func TestWithNameFailure(t *testing.T) { + testcases := []struct { + input string + err error + }{ + { + input: "", + err: ErrNameEmpty, + }, + { + input: ":justtag", + err: ErrReferenceInvalidFormat, + }, + { + input: "@sha256:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + err: ErrReferenceInvalidFormat, + }, + { + input: "validname@invaliddigest:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + err: ErrReferenceInvalidFormat, + }, + { + input: strings.Repeat("a/", 128) + "a:tag", + err: ErrNameTooLong, + }, + { + input: "aa/asdf$$^/aa", + err: ErrReferenceInvalidFormat, + }, + } + for _, testcase := range testcases { + failf := func(format string, v ...interface{}) { + t.Logf(strconv.Quote(testcase.input)+": "+format, v...) + t.Fail() + } + + _, err := WithName(testcase.input) + if err == nil { + failf("no error parsing name. expected: %s", testcase.err) + } + } +} + +func TestSplitHostname(t *testing.T) { + testcases := []struct { + input string + domain string + name string + }{ + { + input: "test.com/foo", + domain: "test.com", + name: "foo", + }, + { + input: "test_com/foo", + domain: "", + name: "test_com/foo", + }, + { + input: "test:8080/foo", + domain: "test:8080", + name: "foo", + }, + { + input: "test.com:8080/foo", + domain: "test.com:8080", + name: "foo", + }, + { + input: "test-com:8080/foo", + domain: "test-com:8080", + name: "foo", + }, + { + input: "xn--n3h.com:18080/foo", + domain: "xn--n3h.com:18080", + name: "foo", + }, + } + for _, testcase := range testcases { + failf := func(format string, v ...interface{}) { + t.Logf(strconv.Quote(testcase.input)+": "+format, v...) + t.Fail() + } + + named, err := WithName(testcase.input) + if err != nil { + failf("error parsing name: %s", err) + } + domain, name := SplitHostname(named) + if domain != testcase.domain { + failf("unexpected domain: got %q, expected %q", domain, testcase.domain) + } + if name != testcase.name { + failf("unexpected name: got %q, expected %q", name, testcase.name) + } + } +} + +type serializationType struct { + Description string + Field Field +} + +func TestSerialization(t *testing.T) { + testcases := []struct { + description string + input string + name string + tag string + digest string + err error + }{ + { + description: "empty value", + err: ErrNameEmpty, + }, + { + description: "just a name", + input: "example.com:8000/named", + name: "example.com:8000/named", + }, + { + description: "name with a tag", + input: "example.com:8000/named:tagged", + name: "example.com:8000/named", + tag: "tagged", + }, + { + description: "name with digest", + input: "other.com/named@sha256:1234567890098765432112345667890098765432112345667890098765432112", + name: "other.com/named", + digest: "sha256:1234567890098765432112345667890098765432112345667890098765432112", + }, + } + for _, testcase := range testcases { + failf := func(format string, v ...interface{}) { + t.Logf(strconv.Quote(testcase.input)+": "+format, v...) + t.Fail() + } + + m := map[string]string{ + "Description": testcase.description, + "Field": testcase.input, + } + b, err := json.Marshal(m) + if err != nil { + failf("error marshalling: %v", err) + } + t := serializationType{} + + if err := json.Unmarshal(b, &t); err != nil { + if testcase.err == nil { + failf("error unmarshalling: %v", err) + } + if err != testcase.err { + failf("wrong error, expected %v, got %v", testcase.err, err) + } + + continue + } else if testcase.err != nil { + failf("expected error unmarshalling: %v", testcase.err) + } + + if t.Description != testcase.description { + failf("wrong description, expected %q, got %q", testcase.description, t.Description) + } + + ref := t.Field.Reference() + + if named, ok := ref.(Named); ok { + if named.Name() != testcase.name { + failf("unexpected repository: got %q, expected %q", named.Name(), testcase.name) + } + } else if testcase.name != "" { + failf("expected named type, got %T", ref) + } + + tagged, ok := ref.(Tagged) + if testcase.tag != "" { + if ok { + if tagged.Tag() != testcase.tag { + failf("unexpected tag: got %q, expected %q", tagged.Tag(), testcase.tag) + } + } else { + failf("expected tagged type, got %T", ref) + } + } else if ok { + failf("unexpected tagged type") + } + + digested, ok := ref.(Digested) + if testcase.digest != "" { + if ok { + if digested.Digest().String() != testcase.digest { + failf("unexpected digest: got %q, expected %q", digested.Digest().String(), testcase.digest) + } + } else { + failf("expected digested type, got %T", ref) + } + } else if ok { + failf("unexpected digested type") + } + + t = serializationType{ + Description: testcase.description, + Field: AsField(ref), + } + + b2, err := json.Marshal(t) + if err != nil { + failf("error marshing serialization type: %v", err) + } + + if string(b) != string(b2) { + failf("unexpected serialized value: expected %q, got %q", string(b), string(b2)) + } + + // Ensure t.Field is not implementing "Reference" directly, getting + // around the Reference type system + var fieldInterface interface{} = t.Field + if _, ok := fieldInterface.(Reference); ok { + failf("field should not implement Reference interface") + } + + } +} + +func TestWithTag(t *testing.T) { + testcases := []struct { + name string + digest digest.Digest + tag string + combined string + }{ + { + name: "test.com/foo", + tag: "tag", + combined: "test.com/foo:tag", + }, + { + name: "foo", + tag: "tag2", + combined: "foo:tag2", + }, + { + name: "test.com:8000/foo", + tag: "tag4", + combined: "test.com:8000/foo:tag4", + }, + { + name: "test.com:8000/foo", + tag: "TAG5", + combined: "test.com:8000/foo:TAG5", + }, + { + name: "test.com:8000/foo", + digest: "sha256:1234567890098765432112345667890098765", + tag: "TAG5", + combined: "test.com:8000/foo:TAG5@sha256:1234567890098765432112345667890098765", + }, + } + for _, testcase := range testcases { + failf := func(format string, v ...interface{}) { + t.Logf(strconv.Quote(testcase.name)+": "+format, v...) + t.Fail() + } + + named, err := WithName(testcase.name) + if err != nil { + failf("error parsing name: %s", err) + } + if testcase.digest != "" { + canonical, err := WithDigest(named, testcase.digest) + if err != nil { + failf("error adding digest") + } + named = canonical + } + + tagged, err := WithTag(named, testcase.tag) + if err != nil { + failf("WithTag failed: %s", err) + } + if tagged.String() != testcase.combined { + failf("unexpected: got %q, expected %q", tagged.String(), testcase.combined) + } + } +} + +func TestWithDigest(t *testing.T) { + testcases := []struct { + name string + digest digest.Digest + tag string + combined string + }{ + { + name: "test.com/foo", + digest: "sha256:1234567890098765432112345667890098765", + combined: "test.com/foo@sha256:1234567890098765432112345667890098765", + }, + { + name: "foo", + digest: "sha256:1234567890098765432112345667890098765", + combined: "foo@sha256:1234567890098765432112345667890098765", + }, + { + name: "test.com:8000/foo", + digest: "sha256:1234567890098765432112345667890098765", + combined: "test.com:8000/foo@sha256:1234567890098765432112345667890098765", + }, + { + name: "test.com:8000/foo", + digest: "sha256:1234567890098765432112345667890098765", + tag: "latest", + combined: "test.com:8000/foo:latest@sha256:1234567890098765432112345667890098765", + }, + } + for _, testcase := range testcases { + failf := func(format string, v ...interface{}) { + t.Logf(strconv.Quote(testcase.name)+": "+format, v...) + t.Fail() + } + + named, err := WithName(testcase.name) + if err != nil { + failf("error parsing name: %s", err) + } + if testcase.tag != "" { + tagged, err := WithTag(named, testcase.tag) + if err != nil { + failf("error adding tag") + } + named = tagged + } + digested, err := WithDigest(named, testcase.digest) + if err != nil { + failf("WithDigest failed: %s", err) + } + if digested.String() != testcase.combined { + failf("unexpected: got %q, expected %q", digested.String(), testcase.combined) + } + } +} + +func TestParseNamed(t *testing.T) { + testcases := []struct { + input string + domain string + name string + err error + }{ + { + input: "test.com/foo", + domain: "test.com", + name: "foo", + }, + { + input: "test:8080/foo", + domain: "test:8080", + name: "foo", + }, + { + input: "test_com/foo", + err: ErrNameNotCanonical, + }, + { + input: "test.com", + err: ErrNameNotCanonical, + }, + { + input: "foo", + err: ErrNameNotCanonical, + }, + { + input: "library/foo", + err: ErrNameNotCanonical, + }, + { + input: "docker.io/library/foo", + domain: "docker.io", + name: "library/foo", + }, + // Ambiguous case, parser will add "library/" to foo + { + input: "docker.io/foo", + err: ErrNameNotCanonical, + }, + } + for _, testcase := range testcases { + failf := func(format string, v ...interface{}) { + t.Logf(strconv.Quote(testcase.input)+": "+format, v...) + t.Fail() + } + + named, err := ParseNamed(testcase.input) + if err != nil && testcase.err == nil { + failf("error parsing name: %s", err) + continue + } else if err == nil && testcase.err != nil { + failf("parsing succeded: expected error %v", testcase.err) + continue + } else if err != testcase.err { + failf("unexpected error %v, expected %v", err, testcase.err) + continue + } else if err != nil { + continue + } + + domain, name := SplitHostname(named) + if domain != testcase.domain { + failf("unexpected domain: got %q, expected %q", domain, testcase.domain) + } + if name != testcase.name { + failf("unexpected name: got %q, expected %q", name, testcase.name) + } + } +} diff --git a/vendor/github.com/docker/distribution/reference/regexp_test.go b/vendor/github.com/docker/distribution/reference/regexp_test.go new file mode 100644 index 000000000..09bc81927 --- /dev/null +++ b/vendor/github.com/docker/distribution/reference/regexp_test.go @@ -0,0 +1,553 @@ +package reference + +import ( + "regexp" + "strings" + "testing" +) + +type regexpMatch struct { + input string + match bool + subs []string +} + +func checkRegexp(t *testing.T, r *regexp.Regexp, m regexpMatch) { + matches := r.FindStringSubmatch(m.input) + if m.match && matches != nil { + if len(matches) != (r.NumSubexp()+1) || matches[0] != m.input { + t.Fatalf("Bad match result %#v for %q", matches, m.input) + } + if len(matches) < (len(m.subs) + 1) { + t.Errorf("Expected %d sub matches, only have %d for %q", len(m.subs), len(matches)-1, m.input) + } + for i := range m.subs { + if m.subs[i] != matches[i+1] { + t.Errorf("Unexpected submatch %d: %q, expected %q for %q", i+1, matches[i+1], m.subs[i], m.input) + } + } + } else if m.match { + t.Errorf("Expected match for %q", m.input) + } else if matches != nil { + t.Errorf("Unexpected match for %q", m.input) + } +} + +func TestDomainRegexp(t *testing.T) { + hostcases := []regexpMatch{ + { + input: "test.com", + match: true, + }, + { + input: "test.com:10304", + match: true, + }, + { + input: "test.com:http", + match: false, + }, + { + input: "localhost", + match: true, + }, + { + input: "localhost:8080", + match: true, + }, + { + input: "a", + match: true, + }, + { + input: "a.b", + match: true, + }, + { + input: "ab.cd.com", + match: true, + }, + { + input: "a-b.com", + match: true, + }, + { + input: "-ab.com", + match: false, + }, + { + input: "ab-.com", + match: false, + }, + { + input: "ab.c-om", + match: true, + }, + { + input: "ab.-com", + match: false, + }, + { + input: "ab.com-", + match: false, + }, + { + input: "0101.com", + match: true, // TODO(dmcgowan): valid if this should be allowed + }, + { + input: "001a.com", + match: true, + }, + { + input: "b.gbc.io:443", + match: true, + }, + { + input: "b.gbc.io", + match: true, + }, + { + input: "xn--n3h.com", // ☃.com in punycode + match: true, + }, + { + input: "Asdf.com", // uppercase character + match: true, + }, + } + r := regexp.MustCompile(`^` + DomainRegexp.String() + `$`) + for i := range hostcases { + checkRegexp(t, r, hostcases[i]) + } +} + +func TestFullNameRegexp(t *testing.T) { + if anchoredNameRegexp.NumSubexp() != 2 { + t.Fatalf("anchored name regexp should have two submatches: %v, %v != 2", + anchoredNameRegexp, anchoredNameRegexp.NumSubexp()) + } + + testcases := []regexpMatch{ + { + input: "", + match: false, + }, + { + input: "short", + match: true, + subs: []string{"", "short"}, + }, + { + input: "simple/name", + match: true, + subs: []string{"simple", "name"}, + }, + { + input: "library/ubuntu", + match: true, + subs: []string{"library", "ubuntu"}, + }, + { + input: "docker/stevvooe/app", + match: true, + subs: []string{"docker", "stevvooe/app"}, + }, + { + input: "aa/aa/aa/aa/aa/aa/aa/aa/aa/bb/bb/bb/bb/bb/bb", + match: true, + subs: []string{"aa", "aa/aa/aa/aa/aa/aa/aa/aa/bb/bb/bb/bb/bb/bb"}, + }, + { + input: "aa/aa/bb/bb/bb", + match: true, + subs: []string{"aa", "aa/bb/bb/bb"}, + }, + { + input: "a/a/a/a", + match: true, + subs: []string{"a", "a/a/a"}, + }, + { + input: "a/a/a/a/", + match: false, + }, + { + input: "a//a/a", + match: false, + }, + { + input: "a", + match: true, + subs: []string{"", "a"}, + }, + { + input: "a/aa", + match: true, + subs: []string{"a", "aa"}, + }, + { + input: "a/aa/a", + match: true, + subs: []string{"a", "aa/a"}, + }, + { + input: "foo.com", + match: true, + subs: []string{"", "foo.com"}, + }, + { + input: "foo.com/", + match: false, + }, + { + input: "foo.com:8080/bar", + match: true, + subs: []string{"foo.com:8080", "bar"}, + }, + { + input: "foo.com:http/bar", + match: false, + }, + { + input: "foo.com/bar", + match: true, + subs: []string{"foo.com", "bar"}, + }, + { + input: "foo.com/bar/baz", + match: true, + subs: []string{"foo.com", "bar/baz"}, + }, + { + input: "localhost:8080/bar", + match: true, + subs: []string{"localhost:8080", "bar"}, + }, + { + input: "sub-dom1.foo.com/bar/baz/quux", + match: true, + subs: []string{"sub-dom1.foo.com", "bar/baz/quux"}, + }, + { + input: "blog.foo.com/bar/baz", + match: true, + subs: []string{"blog.foo.com", "bar/baz"}, + }, + { + input: "a^a", + match: false, + }, + { + input: "aa/asdf$$^/aa", + match: false, + }, + { + input: "asdf$$^/aa", + match: false, + }, + { + input: "aa-a/a", + match: true, + subs: []string{"aa-a", "a"}, + }, + { + input: strings.Repeat("a/", 128) + "a", + match: true, + subs: []string{"a", strings.Repeat("a/", 127) + "a"}, + }, + { + input: "a-/a/a/a", + match: false, + }, + { + input: "foo.com/a-/a/a", + match: false, + }, + { + input: "-foo/bar", + match: false, + }, + { + input: "foo/bar-", + match: false, + }, + { + input: "foo-/bar", + match: false, + }, + { + input: "foo/-bar", + match: false, + }, + { + input: "_foo/bar", + match: false, + }, + { + input: "foo_bar", + match: true, + subs: []string{"", "foo_bar"}, + }, + { + input: "foo_bar.com", + match: true, + subs: []string{"", "foo_bar.com"}, + }, + { + input: "foo_bar.com:8080", + match: false, + }, + { + input: "foo_bar.com:8080/app", + match: false, + }, + { + input: "foo.com/foo_bar", + match: true, + subs: []string{"foo.com", "foo_bar"}, + }, + { + input: "____/____", + match: false, + }, + { + input: "_docker/_docker", + match: false, + }, + { + input: "docker_/docker_", + match: false, + }, + { + input: "b.gcr.io/test.example.com/my-app", + match: true, + subs: []string{"b.gcr.io", "test.example.com/my-app"}, + }, + { + input: "xn--n3h.com/myimage", // ☃.com in punycode + match: true, + subs: []string{"xn--n3h.com", "myimage"}, + }, + { + input: "xn--7o8h.com/myimage", // 🐳.com in punycode + match: true, + subs: []string{"xn--7o8h.com", "myimage"}, + }, + { + input: "example.com/xn--7o8h.com/myimage", // 🐳.com in punycode + match: true, + subs: []string{"example.com", "xn--7o8h.com/myimage"}, + }, + { + input: "example.com/some_separator__underscore/myimage", + match: true, + subs: []string{"example.com", "some_separator__underscore/myimage"}, + }, + { + input: "example.com/__underscore/myimage", + match: false, + }, + { + input: "example.com/..dots/myimage", + match: false, + }, + { + input: "example.com/.dots/myimage", + match: false, + }, + { + input: "example.com/nodouble..dots/myimage", + match: false, + }, + { + input: "example.com/nodouble..dots/myimage", + match: false, + }, + { + input: "docker./docker", + match: false, + }, + { + input: ".docker/docker", + match: false, + }, + { + input: "docker-/docker", + match: false, + }, + { + input: "-docker/docker", + match: false, + }, + { + input: "do..cker/docker", + match: false, + }, + { + input: "do__cker:8080/docker", + match: false, + }, + { + input: "do__cker/docker", + match: true, + subs: []string{"", "do__cker/docker"}, + }, + { + input: "b.gcr.io/test.example.com/my-app", + match: true, + subs: []string{"b.gcr.io", "test.example.com/my-app"}, + }, + { + input: "registry.io/foo/project--id.module--name.ver---sion--name", + match: true, + subs: []string{"registry.io", "foo/project--id.module--name.ver---sion--name"}, + }, + { + input: "Asdf.com/foo/bar", // uppercase character in hostname + match: true, + }, + { + input: "Foo/FarB", // uppercase characters in remote name + match: false, + }, + } + for i := range testcases { + checkRegexp(t, anchoredNameRegexp, testcases[i]) + } +} + +func TestReferenceRegexp(t *testing.T) { + if ReferenceRegexp.NumSubexp() != 3 { + t.Fatalf("anchored name regexp should have three submatches: %v, %v != 3", + ReferenceRegexp, ReferenceRegexp.NumSubexp()) + } + + testcases := []regexpMatch{ + { + input: "registry.com:8080/myapp:tag", + match: true, + subs: []string{"registry.com:8080/myapp", "tag", ""}, + }, + { + input: "registry.com:8080/myapp@sha256:be178c0543eb17f5f3043021c9e5fcf30285e557a4fc309cce97ff9ca6182912", + match: true, + subs: []string{"registry.com:8080/myapp", "", "sha256:be178c0543eb17f5f3043021c9e5fcf30285e557a4fc309cce97ff9ca6182912"}, + }, + { + input: "registry.com:8080/myapp:tag2@sha256:be178c0543eb17f5f3043021c9e5fcf30285e557a4fc309cce97ff9ca6182912", + match: true, + subs: []string{"registry.com:8080/myapp", "tag2", "sha256:be178c0543eb17f5f3043021c9e5fcf30285e557a4fc309cce97ff9ca6182912"}, + }, + { + input: "registry.com:8080/myapp@sha256:badbadbadbad", + match: false, + }, + { + input: "registry.com:8080/myapp:invalid~tag", + match: false, + }, + { + input: "bad_hostname.com:8080/myapp:tag", + match: false, + }, + { + input:// localhost treated as name, missing tag with 8080 as tag + "localhost:8080@sha256:be178c0543eb17f5f3043021c9e5fcf30285e557a4fc309cce97ff9ca6182912", + match: true, + subs: []string{"localhost", "8080", "sha256:be178c0543eb17f5f3043021c9e5fcf30285e557a4fc309cce97ff9ca6182912"}, + }, + { + input: "localhost:8080/name@sha256:be178c0543eb17f5f3043021c9e5fcf30285e557a4fc309cce97ff9ca6182912", + match: true, + subs: []string{"localhost:8080/name", "", "sha256:be178c0543eb17f5f3043021c9e5fcf30285e557a4fc309cce97ff9ca6182912"}, + }, + { + input: "localhost:http/name@sha256:be178c0543eb17f5f3043021c9e5fcf30285e557a4fc309cce97ff9ca6182912", + match: false, + }, + { + // localhost will be treated as an image name without a host + input: "localhost@sha256:be178c0543eb17f5f3043021c9e5fcf30285e557a4fc309cce97ff9ca6182912", + match: true, + subs: []string{"localhost", "", "sha256:be178c0543eb17f5f3043021c9e5fcf30285e557a4fc309cce97ff9ca6182912"}, + }, + { + input: "registry.com:8080/myapp@bad", + match: false, + }, + { + input: "registry.com:8080/myapp@2bad", + match: false, // TODO(dmcgowan): Support this as valid + }, + } + + for i := range testcases { + checkRegexp(t, ReferenceRegexp, testcases[i]) + } + +} + +func TestIdentifierRegexp(t *testing.T) { + fullCases := []regexpMatch{ + { + input: "da304e823d8ca2b9d863a3c897baeb852ba21ea9a9f1414736394ae7fcaf9821", + match: true, + }, + { + input: "7EC43B381E5AEFE6E04EFB0B3F0693FF2A4A50652D64AEC573905F2DB5889A1C", + match: false, + }, + { + input: "da304e823d8ca2b9d863a3c897baeb852ba21ea9a9f1414736394ae7fcaf", + match: false, + }, + { + input: "sha256:da304e823d8ca2b9d863a3c897baeb852ba21ea9a9f1414736394ae7fcaf9821", + match: false, + }, + { + input: "da304e823d8ca2b9d863a3c897baeb852ba21ea9a9f1414736394ae7fcaf98218482", + match: false, + }, + } + + shortCases := []regexpMatch{ + { + input: "da304e823d8ca2b9d863a3c897baeb852ba21ea9a9f1414736394ae7fcaf9821", + match: true, + }, + { + input: "7EC43B381E5AEFE6E04EFB0B3F0693FF2A4A50652D64AEC573905F2DB5889A1C", + match: false, + }, + { + input: "da304e823d8ca2b9d863a3c897baeb852ba21ea9a9f1414736394ae7fcaf", + match: true, + }, + { + input: "sha256:da304e823d8ca2b9d863a3c897baeb852ba21ea9a9f1414736394ae7fcaf9821", + match: false, + }, + { + input: "da304e823d8ca2b9d863a3c897baeb852ba21ea9a9f1414736394ae7fcaf98218482", + match: false, + }, + { + input: "da304", + match: false, + }, + { + input: "da304e", + match: true, + }, + } + + for i := range fullCases { + checkRegexp(t, anchoredIdentifierRegexp, fullCases[i]) + } + + for i := range shortCases { + checkRegexp(t, anchoredShortIdentifierRegexp, shortCases[i]) + } +} diff --git a/vendor/github.com/docker/distribution/registry.go b/vendor/github.com/docker/distribution/registry.go new file mode 100644 index 000000000..1da1d533f --- /dev/null +++ b/vendor/github.com/docker/distribution/registry.go @@ -0,0 +1,97 @@ +package distribution + +import ( + "github.com/docker/distribution/context" + "github.com/docker/distribution/reference" +) + +// Scope defines the set of items that match a namespace. +type Scope interface { + // Contains returns true if the name belongs to the namespace. + Contains(name string) bool +} + +type fullScope struct{} + +func (f fullScope) Contains(string) bool { + return true +} + +// GlobalScope represents the full namespace scope which contains +// all other scopes. +var GlobalScope = Scope(fullScope{}) + +// Namespace represents a collection of repositories, addressable by name. +// Generally, a namespace is backed by a set of one or more services, +// providing facilities such as registry access, trust, and indexing. +type Namespace interface { + // Scope describes the names that can be used with this Namespace. The + // global namespace will have a scope that matches all names. The scope + // effectively provides an identity for the namespace. + Scope() Scope + + // Repository should return a reference to the named repository. The + // registry may or may not have the repository but should always return a + // reference. + Repository(ctx context.Context, name reference.Named) (Repository, error) + + // Repositories fills 'repos' with a lexicographically sorted catalog of repositories + // up to the size of 'repos' and returns the value 'n' for the number of entries + // which were filled. 'last' contains an offset in the catalog, and 'err' will be + // set to io.EOF if there are no more entries to obtain. + Repositories(ctx context.Context, repos []string, last string) (n int, err error) + + // Blobs returns a blob enumerator to access all blobs + Blobs() BlobEnumerator + + // BlobStatter returns a BlobStatter to control + BlobStatter() BlobStatter +} + +// RepositoryEnumerator describes an operation to enumerate repositories +type RepositoryEnumerator interface { + Enumerate(ctx context.Context, ingester func(string) error) error +} + +// ManifestServiceOption is a function argument for Manifest Service methods +type ManifestServiceOption interface { + Apply(ManifestService) error +} + +// WithTag allows a tag to be passed into Put +func WithTag(tag string) ManifestServiceOption { + return WithTagOption{tag} +} + +// WithTagOption holds a tag +type WithTagOption struct{ Tag string } + +// Apply conforms to the ManifestServiceOption interface +func (o WithTagOption) Apply(m ManifestService) error { + // no implementation + return nil +} + +// Repository is a named collection of manifests and layers. +type Repository interface { + // Named returns the name of the repository. + Named() reference.Named + + // Manifests returns a reference to this repository's manifest service. + // with the supplied options applied. + Manifests(ctx context.Context, options ...ManifestServiceOption) (ManifestService, error) + + // Blobs returns a reference to this repository's blob service. + Blobs(ctx context.Context) BlobStore + + // TODO(stevvooe): The above BlobStore return can probably be relaxed to + // be a BlobService for use with clients. This will allow such + // implementations to avoid implementing ServeBlob. + + // Tags returns a reference to this repositories tag service + Tags(ctx context.Context) TagService +} + +// TODO(stevvooe): Must add close methods to all these. May want to change the +// way instances are created to better reflect internal dependency +// relationships. diff --git a/vendor/github.com/docker/distribution/tags.go b/vendor/github.com/docker/distribution/tags.go new file mode 100644 index 000000000..503056596 --- /dev/null +++ b/vendor/github.com/docker/distribution/tags.go @@ -0,0 +1,27 @@ +package distribution + +import ( + "github.com/docker/distribution/context" +) + +// TagService provides access to information about tagged objects. +type TagService interface { + // Get retrieves the descriptor identified by the tag. Some + // implementations may differentiate between "trusted" tags and + // "untrusted" tags. If a tag is "untrusted", the mapping will be returned + // as an ErrTagUntrusted error, with the target descriptor. + Get(ctx context.Context, tag string) (Descriptor, error) + + // Tag associates the tag with the provided descriptor, updating the + // current association, if needed. + Tag(ctx context.Context, tag string, desc Descriptor) error + + // Untag removes the given tag association + Untag(ctx context.Context, tag string) error + + // All returns the set of tags managed by this tag service + All(ctx context.Context) ([]string, error) + + // Lookup returns the set of tags referencing the given digest. + Lookup(ctx context.Context, digest Descriptor) ([]string, error) +} diff --git a/vendor/github.com/docker/distribution/vendor.conf b/vendor/github.com/docker/distribution/vendor.conf new file mode 100644 index 000000000..d67edd779 --- /dev/null +++ b/vendor/github.com/docker/distribution/vendor.conf @@ -0,0 +1,43 @@ +github.com/Azure/azure-sdk-for-go 088007b3b08cc02b27f2eadfdcd870958460ce7e +github.com/Azure/go-autorest ec5f4903f77ed9927ac95b19ab8e44ada64c1356 +github.com/sirupsen/logrus 3d4380f53a34dcdc95f0c1db702615992b38d9a4 +github.com/aws/aws-sdk-go c6fc52983ea2375810aa38ddb5370e9cdf611716 +github.com/bshuster-repo/logrus-logstash-hook d2c0ecc1836d91814e15e23bb5dc309c3ef51f4a +github.com/bugsnag/bugsnag-go b1d153021fcd90ca3f080db36bec96dc690fb274 +github.com/bugsnag/osext 0dd3f918b21bec95ace9dc86c7e70266cfc5c702 +github.com/bugsnag/panicwrap e2c28503fcd0675329da73bf48b33404db873782 +github.com/denverdino/aliyungo afedced274aa9a7fcdd47ac97018f0f8db4e5de2 +github.com/dgrijalva/jwt-go a601269ab70c205d26370c16f7c81e9017c14e04 +github.com/docker/goamz f0a21f5b2e12f83a505ecf79b633bb2035cf6f85 +github.com/docker/libtrust fa567046d9b14f6aa788882a950d69651d230b21 +github.com/garyburd/redigo 535138d7bcd717d6531c701ef5933d98b1866257 +github.com/go-ini/ini 2ba15ac2dc9cdf88c110ec2dc0ced7fa45f5678c +github.com/golang/protobuf 8d92cf5fc15a4382f8964b08e1f42a75c0591aa3 +github.com/gorilla/context 14f550f51af52180c2eefed15e5fd18d63c0a64a +github.com/gorilla/handlers 60c7bfde3e33c201519a200a4507a158cc03a17b +github.com/gorilla/mux 599cba5e7b6137d46ddf58fb1765f5d928e69604 +github.com/inconshreveable/mousetrap 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75 +github.com/jmespath/go-jmespath bd40a432e4c76585ef6b72d3fd96fb9b6dc7b68d +github.com/miekg/dns 271c58e0c14f552178ea321a545ff9af38930f39 +github.com/mitchellh/mapstructure 482a9fd5fa83e8c4e7817413b80f3eb8feec03ef +github.com/ncw/swift b964f2ca856aac39885e258ad25aec08d5f64ee6 +github.com/spf13/cobra 312092086bed4968099259622145a0c9ae280064 +github.com/spf13/pflag 5644820622454e71517561946e3d94b9f9db6842 +github.com/stevvooe/resumable 2aaf90b2ceea5072cb503ef2a620b08ff3119870 +github.com/xenolf/lego a9d8cec0e6563575e5868a005359ac97911b5985 +github.com/yvasiyarov/go-metrics 57bccd1ccd43f94bb17fdd8bf3007059b802f85e +github.com/yvasiyarov/gorelic a9bba5b9ab508a086f9a12b8c51fab68478e2128 +github.com/yvasiyarov/newrelic_platform_go b21fdbd4370f3717f3bbd2bf41c223bc273068e6 +golang.org/x/crypto c10c31b5e94b6f7a0283272dc2bb27163dcea24b +golang.org/x/net 4876518f9e71663000c348837735820161a42df7 +golang.org/x/oauth2 045497edb6234273d67dbc25da3f2ddbc4c4cacf +golang.org/x/time a4bde12657593d5e90d0533a3e4fd95e635124cb +google.golang.org/api 9bf6e6e569ff057f75d9604a46c52928f17d2b54 +google.golang.org/appengine 12d5545dc1cfa6047a286d5e853841b6471f4c19 +google.golang.org/cloud 975617b05ea8a58727e6c1a06b6161ff4185a9f2 +google.golang.org/grpc d3ddb4469d5a1b949fc7a7da7c1d6a0d1b6de994 +gopkg.in/check.v1 64131543e7896d5bcc6bd5a76287eb75ea96c673 +gopkg.in/square/go-jose.v1 40d457b439244b546f023d056628e5184136899b +gopkg.in/yaml.v2 bef53efd0c76e49e6de55ead051f886bea7e9420 +rsc.io/letsencrypt e770c10b0f1a64775ae91d240407ce00d1a5bdeb https://github.com/dmcgowan/letsencrypt.git +github.com/opencontainers/go-digest a6d0ee40d4207ea02364bd3b9e8e77b9159ba1eb diff --git a/vendor/github.com/docker/spdystream/CONTRIBUTING.md b/vendor/github.com/docker/spdystream/CONTRIBUTING.md new file mode 100644 index 000000000..d4eddcc53 --- /dev/null +++ b/vendor/github.com/docker/spdystream/CONTRIBUTING.md @@ -0,0 +1,13 @@ +# Contributing to SpdyStream + +Want to hack on spdystream? Awesome! Here are instructions to get you +started. + +SpdyStream is a part of the [Docker](https://docker.io) project, and follows +the same rules and principles. If you're already familiar with the way +Docker does things, you'll feel right at home. + +Otherwise, go read +[Docker's contributions guidelines](https://github.com/dotcloud/docker/blob/master/CONTRIBUTING.md). + +Happy hacking! diff --git a/vendor/github.com/docker/spdystream/LICENSE b/vendor/github.com/docker/spdystream/LICENSE new file mode 100644 index 000000000..9e4bd4dbe --- /dev/null +++ b/vendor/github.com/docker/spdystream/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014-2015 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/docker/spdystream/LICENSE.docs b/vendor/github.com/docker/spdystream/LICENSE.docs new file mode 100644 index 000000000..e26cd4fc8 --- /dev/null +++ b/vendor/github.com/docker/spdystream/LICENSE.docs @@ -0,0 +1,425 @@ +Attribution-ShareAlike 4.0 International + +======================================================================= + +Creative Commons Corporation ("Creative Commons") is not a law firm and +does not provide legal services or legal advice. Distribution of +Creative Commons public licenses does not create a lawyer-client or +other relationship. Creative Commons makes its licenses and related +information available on an "as-is" basis. Creative Commons gives no +warranties regarding its licenses, any material licensed under their +terms and conditions, or any related information. Creative Commons +disclaims all liability for damages resulting from their use to the +fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and +conditions that creators and other rights holders may use to share +original works of authorship and other material subject to copyright +and certain other rights specified in the public license below. The +following considerations are for informational purposes only, are not +exhaustive, and do not form part of our licenses. + + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More_considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees + +======================================================================= + +Creative Commons Attribution-ShareAlike 4.0 International Public +License + +By exercising the Licensed Rights (defined below), You accept and agree +to be bound by the terms and conditions of this Creative Commons +Attribution-ShareAlike 4.0 International Public License ("Public +License"). To the extent this Public License may be interpreted as a +contract, You are granted the Licensed Rights in consideration of Your +acceptance of these terms and conditions, and the Licensor grants You +such rights in consideration of benefits the Licensor receives from +making the Licensed Material available under these terms and +conditions. + + +Section 1 -- Definitions. + + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. + + b. Adapter's License means the license You apply to Your Copyright + and Similar Rights in Your contributions to Adapted Material in + accordance with the terms and conditions of this Public License. + + c. BY-SA Compatible License means a license listed at + creativecommons.org/compatiblelicenses, approved by Creative + Commons as essentially the equivalent of this Public License. + + d. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. + + e. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. + + f. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. + + g. License Elements means the license attributes listed in the name + of a Creative Commons Public License. The License Elements of this + Public License are Attribution and ShareAlike. + + h. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. + + i. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. + + j. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + + k. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. + + l. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. + + m. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. + + +Section 2 -- Scope. + + a. License grant. + + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: + + a. reproduce and Share the Licensed Material, in whole or + in part; and + + b. produce, reproduce, and Share Adapted Material. + + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + + 3. Term. The term of this Public License is specified in Section + 6(a). + + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + + 5. Downstream recipients. + + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + + b. Additional offer from the Licensor -- Adapted Material. + Every recipient of Adapted Material from You + automatically receives an offer from the Licensor to + exercise the Licensed Rights in the Adapted Material + under the conditions of the Adapter's License You apply. + + c. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this + Public License. + + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties. + + +Section 3 -- License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the +following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material (including in modified + form), You must: + + a. retain the following if it is supplied by the Licensor + with the Licensed Material: + + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of + warranties; + + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; + + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and + + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. + + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. + + b. ShareAlike. + + In addition to the conditions in Section 3(a), if You Share + Adapted Material You produce, the following conditions also apply. + + 1. The Adapter's License You apply must be a Creative Commons + license with the same License Elements, this version or + later, or a BY-SA Compatible License. + + 2. You must include the text of, or the URI or hyperlink to, the + Adapter's License You apply. You may satisfy this condition + in any reasonable manner based on the medium, means, and + context in which You Share Adapted Material. + + 3. You may not offer or impose any additional or different terms + or conditions on, or apply any Effective Technological + Measures to, Adapted Material that restrict exercise of the + rights granted under the Adapter's License You apply. + + +Section 4 -- Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that +apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database; + + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material, + + including for purposes of Section 3(b); and + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not +replace Your obligations under this Public License where the Licensed +Rights include other Copyright and Similar Rights. + + +Section 5 -- Disclaimer of Warranties and Limitation of Liability. + + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. + + +Section 6 -- Term and Termination. + + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + + +Section 7 -- Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. + + +Section 8 -- Interpretation. + + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. + + +======================================================================= + +Creative Commons is not a party to its public licenses. +Notwithstanding, Creative Commons may elect to apply one of its public +licenses to material it publishes and in those instances will be +considered the "Licensor." Except for the limited purpose of indicating +that material is shared under a Creative Commons public license or as +otherwise permitted by the Creative Commons policies published at +creativecommons.org/policies, Creative Commons does not authorize the +use of the trademark "Creative Commons" or any other trademark or logo +of Creative Commons without its prior written consent including, +without limitation, in connection with any unauthorized modifications +to any of its public licenses or any other arrangements, +understandings, or agreements concerning use of licensed material. For +the avoidance of doubt, this paragraph does not form part of the public +licenses. + +Creative Commons may be contacted at creativecommons.org. diff --git a/vendor/github.com/docker/spdystream/MAINTAINERS b/vendor/github.com/docker/spdystream/MAINTAINERS new file mode 100644 index 000000000..14e263325 --- /dev/null +++ b/vendor/github.com/docker/spdystream/MAINTAINERS @@ -0,0 +1,28 @@ +# Spdystream maintainers file +# +# This file describes who runs the docker/spdystream project and how. +# This is a living document - if you see something out of date or missing, speak up! +# +# It is structured to be consumable by both humans and programs. +# To extract its contents programmatically, use any TOML-compliant parser. +# +# This file is compiled into the MAINTAINERS file in docker/opensource. +# +[Org] + [Org."Core maintainers"] + people = [ + "dmcgowan", + ] + +[people] + +# A reference list of all people associated with the project. +# All other sections should refer to people by their canonical key +# in the people section. + + # ADD YOURSELF HERE IN ALPHABETICAL ORDER + + [people.dmcgowan] + Name = "Derek McGowan" + Email = "derek@docker.com" + GitHub = "dmcgowan" diff --git a/vendor/github.com/docker/spdystream/README.md b/vendor/github.com/docker/spdystream/README.md new file mode 100644 index 000000000..11cccd0a0 --- /dev/null +++ b/vendor/github.com/docker/spdystream/README.md @@ -0,0 +1,77 @@ +# SpdyStream + +A multiplexed stream library using spdy + +## Usage + +Client example (connecting to mirroring server without auth) + +```go +package main + +import ( + "fmt" + "github.com/docker/spdystream" + "net" + "net/http" +) + +func main() { + conn, err := net.Dial("tcp", "localhost:8080") + if err != nil { + panic(err) + } + spdyConn, err := spdystream.NewConnection(conn, false) + if err != nil { + panic(err) + } + go spdyConn.Serve(spdystream.NoOpStreamHandler) + stream, err := spdyConn.CreateStream(http.Header{}, nil, false) + if err != nil { + panic(err) + } + + stream.Wait() + + fmt.Fprint(stream, "Writing to stream") + + buf := make([]byte, 25) + stream.Read(buf) + fmt.Println(string(buf)) + + stream.Close() +} +``` + +Server example (mirroring server without auth) + +```go +package main + +import ( + "github.com/docker/spdystream" + "net" +) + +func main() { + listener, err := net.Listen("tcp", "localhost:8080") + if err != nil { + panic(err) + } + for { + conn, err := listener.Accept() + if err != nil { + panic(err) + } + spdyConn, err := spdystream.NewConnection(conn, true) + if err != nil { + panic(err) + } + go spdyConn.Serve(spdystream.MirrorStreamHandler) + } +} +``` + +## Copyright and license + +Copyright © 2014-2015 Docker, Inc. All rights reserved, except as follows. Code is released under the Apache 2.0 license. The README.md file, and files in the "docs" folder are licensed under the Creative Commons Attribution 4.0 International License under the terms and conditions set forth in the file "LICENSE.docs". You may obtain a duplicate copy of the same license, titled CC-BY-SA-4.0, at http://creativecommons.org/licenses/by/4.0/. diff --git a/vendor/github.com/docker/spdystream/connection.go b/vendor/github.com/docker/spdystream/connection.go new file mode 100644 index 000000000..2023ecf84 --- /dev/null +++ b/vendor/github.com/docker/spdystream/connection.go @@ -0,0 +1,959 @@ +package spdystream + +import ( + "errors" + "fmt" + "io" + "net" + "net/http" + "sync" + "time" + + "github.com/docker/spdystream/spdy" +) + +var ( + ErrInvalidStreamId = errors.New("Invalid stream id") + ErrTimeout = errors.New("Timeout occurred") + ErrReset = errors.New("Stream reset") + ErrWriteClosedStream = errors.New("Write on closed stream") +) + +const ( + FRAME_WORKERS = 5 + QUEUE_SIZE = 50 +) + +type StreamHandler func(stream *Stream) + +type AuthHandler func(header http.Header, slot uint8, parent uint32) bool + +type idleAwareFramer struct { + f *spdy.Framer + conn *Connection + writeLock sync.Mutex + resetChan chan struct{} + setTimeoutLock sync.Mutex + setTimeoutChan chan time.Duration + timeout time.Duration +} + +func newIdleAwareFramer(framer *spdy.Framer) *idleAwareFramer { + iaf := &idleAwareFramer{ + f: framer, + resetChan: make(chan struct{}, 2), + // setTimeoutChan needs to be buffered to avoid deadlocks when calling setIdleTimeout at about + // the same time the connection is being closed + setTimeoutChan: make(chan time.Duration, 1), + } + return iaf +} + +func (i *idleAwareFramer) monitor() { + var ( + timer *time.Timer + expired <-chan time.Time + resetChan = i.resetChan + setTimeoutChan = i.setTimeoutChan + ) +Loop: + for { + select { + case timeout := <-i.setTimeoutChan: + i.timeout = timeout + if timeout == 0 { + if timer != nil { + timer.Stop() + } + } else { + if timer == nil { + timer = time.NewTimer(timeout) + expired = timer.C + } else { + timer.Reset(timeout) + } + } + case <-resetChan: + if timer != nil && i.timeout > 0 { + timer.Reset(i.timeout) + } + case <-expired: + i.conn.streamCond.L.Lock() + streams := i.conn.streams + i.conn.streams = make(map[spdy.StreamId]*Stream) + i.conn.streamCond.Broadcast() + i.conn.streamCond.L.Unlock() + go func() { + for _, stream := range streams { + stream.resetStream() + } + i.conn.Close() + }() + case <-i.conn.closeChan: + if timer != nil { + timer.Stop() + } + + // Start a goroutine to drain resetChan. This is needed because we've seen + // some unit tests with large numbers of goroutines get into a situation + // where resetChan fills up, at least 1 call to Write() is still trying to + // send to resetChan, the connection gets closed, and this case statement + // attempts to grab the write lock that Write() already has, causing a + // deadlock. + // + // See https://github.com/docker/spdystream/issues/49 for more details. + go func() { + for _ = range resetChan { + } + }() + + go func() { + for _ = range setTimeoutChan { + } + }() + + i.writeLock.Lock() + close(resetChan) + i.resetChan = nil + i.writeLock.Unlock() + + i.setTimeoutLock.Lock() + close(i.setTimeoutChan) + i.setTimeoutChan = nil + i.setTimeoutLock.Unlock() + + break Loop + } + } + + // Drain resetChan + for _ = range resetChan { + } +} + +func (i *idleAwareFramer) WriteFrame(frame spdy.Frame) error { + i.writeLock.Lock() + defer i.writeLock.Unlock() + if i.resetChan == nil { + return io.EOF + } + err := i.f.WriteFrame(frame) + if err != nil { + return err + } + + i.resetChan <- struct{}{} + + return nil +} + +func (i *idleAwareFramer) ReadFrame() (spdy.Frame, error) { + frame, err := i.f.ReadFrame() + if err != nil { + return nil, err + } + + // resetChan should never be closed since it is only closed + // when the connection has closed its closeChan. This closure + // only occurs after all Reads have finished + // TODO (dmcgowan): refactor relationship into connection + i.resetChan <- struct{}{} + + return frame, nil +} + +func (i *idleAwareFramer) setIdleTimeout(timeout time.Duration) { + i.setTimeoutLock.Lock() + defer i.setTimeoutLock.Unlock() + + if i.setTimeoutChan == nil { + return + } + + i.setTimeoutChan <- timeout +} + +type Connection struct { + conn net.Conn + framer *idleAwareFramer + + closeChan chan bool + goneAway bool + lastStreamChan chan<- *Stream + goAwayTimeout time.Duration + closeTimeout time.Duration + + streamLock *sync.RWMutex + streamCond *sync.Cond + streams map[spdy.StreamId]*Stream + + nextIdLock sync.Mutex + receiveIdLock sync.Mutex + nextStreamId spdy.StreamId + receivedStreamId spdy.StreamId + + pingIdLock sync.Mutex + pingId uint32 + pingChans map[uint32]chan error + + shutdownLock sync.Mutex + shutdownChan chan error + hasShutdown bool + + // for testing https://github.com/docker/spdystream/pull/56 + dataFrameHandler func(*spdy.DataFrame) error +} + +// NewConnection creates a new spdy connection from an existing +// network connection. +func NewConnection(conn net.Conn, server bool) (*Connection, error) { + framer, framerErr := spdy.NewFramer(conn, conn) + if framerErr != nil { + return nil, framerErr + } + idleAwareFramer := newIdleAwareFramer(framer) + var sid spdy.StreamId + var rid spdy.StreamId + var pid uint32 + if server { + sid = 2 + rid = 1 + pid = 2 + } else { + sid = 1 + rid = 2 + pid = 1 + } + + streamLock := new(sync.RWMutex) + streamCond := sync.NewCond(streamLock) + + session := &Connection{ + conn: conn, + framer: idleAwareFramer, + + closeChan: make(chan bool), + goAwayTimeout: time.Duration(0), + closeTimeout: time.Duration(0), + + streamLock: streamLock, + streamCond: streamCond, + streams: make(map[spdy.StreamId]*Stream), + nextStreamId: sid, + receivedStreamId: rid, + + pingId: pid, + pingChans: make(map[uint32]chan error), + + shutdownChan: make(chan error), + } + session.dataFrameHandler = session.handleDataFrame + idleAwareFramer.conn = session + go idleAwareFramer.monitor() + + return session, nil +} + +// Ping sends a ping frame across the connection and +// returns the response time +func (s *Connection) Ping() (time.Duration, error) { + pid := s.pingId + s.pingIdLock.Lock() + if s.pingId > 0x7ffffffe { + s.pingId = s.pingId - 0x7ffffffe + } else { + s.pingId = s.pingId + 2 + } + s.pingIdLock.Unlock() + pingChan := make(chan error) + s.pingChans[pid] = pingChan + defer delete(s.pingChans, pid) + + frame := &spdy.PingFrame{Id: pid} + startTime := time.Now() + writeErr := s.framer.WriteFrame(frame) + if writeErr != nil { + return time.Duration(0), writeErr + } + select { + case <-s.closeChan: + return time.Duration(0), errors.New("connection closed") + case err, ok := <-pingChan: + if ok && err != nil { + return time.Duration(0), err + } + break + } + return time.Now().Sub(startTime), nil +} + +// Serve handles frames sent from the server, including reply frames +// which are needed to fully initiate connections. Both clients and servers +// should call Serve in a separate goroutine before creating streams. +func (s *Connection) Serve(newHandler StreamHandler) { + // use a WaitGroup to wait for all frames to be drained after receiving + // go-away. + var wg sync.WaitGroup + + // Parition queues to ensure stream frames are handled + // by the same worker, ensuring order is maintained + frameQueues := make([]*PriorityFrameQueue, FRAME_WORKERS) + for i := 0; i < FRAME_WORKERS; i++ { + frameQueues[i] = NewPriorityFrameQueue(QUEUE_SIZE) + + // Ensure frame queue is drained when connection is closed + go func(frameQueue *PriorityFrameQueue) { + <-s.closeChan + frameQueue.Drain() + }(frameQueues[i]) + + wg.Add(1) + go func(frameQueue *PriorityFrameQueue) { + // let the WaitGroup know this worker is done + defer wg.Done() + + s.frameHandler(frameQueue, newHandler) + }(frameQueues[i]) + } + + var ( + partitionRoundRobin int + goAwayFrame *spdy.GoAwayFrame + ) +Loop: + for { + readFrame, err := s.framer.ReadFrame() + if err != nil { + if err != io.EOF { + debugMessage("frame read error: %s", err) + } else { + debugMessage("(%p) EOF received", s) + } + break + } + var priority uint8 + var partition int + switch frame := readFrame.(type) { + case *spdy.SynStreamFrame: + if s.checkStreamFrame(frame) { + priority = frame.Priority + partition = int(frame.StreamId % FRAME_WORKERS) + debugMessage("(%p) Add stream frame: %d ", s, frame.StreamId) + s.addStreamFrame(frame) + } else { + debugMessage("(%p) Rejected stream frame: %d ", s, frame.StreamId) + continue + } + case *spdy.SynReplyFrame: + priority = s.getStreamPriority(frame.StreamId) + partition = int(frame.StreamId % FRAME_WORKERS) + case *spdy.DataFrame: + priority = s.getStreamPriority(frame.StreamId) + partition = int(frame.StreamId % FRAME_WORKERS) + case *spdy.RstStreamFrame: + priority = s.getStreamPriority(frame.StreamId) + partition = int(frame.StreamId % FRAME_WORKERS) + case *spdy.HeadersFrame: + priority = s.getStreamPriority(frame.StreamId) + partition = int(frame.StreamId % FRAME_WORKERS) + case *spdy.PingFrame: + priority = 0 + partition = partitionRoundRobin + partitionRoundRobin = (partitionRoundRobin + 1) % FRAME_WORKERS + case *spdy.GoAwayFrame: + // hold on to the go away frame and exit the loop + goAwayFrame = frame + break Loop + default: + priority = 7 + partition = partitionRoundRobin + partitionRoundRobin = (partitionRoundRobin + 1) % FRAME_WORKERS + } + frameQueues[partition].Push(readFrame, priority) + } + close(s.closeChan) + + // wait for all frame handler workers to indicate they've drained their queues + // before handling the go away frame + wg.Wait() + + if goAwayFrame != nil { + s.handleGoAwayFrame(goAwayFrame) + } + + // now it's safe to close remote channels and empty s.streams + s.streamCond.L.Lock() + // notify streams that they're now closed, which will + // unblock any stream Read() calls + for _, stream := range s.streams { + stream.closeRemoteChannels() + } + s.streams = make(map[spdy.StreamId]*Stream) + s.streamCond.Broadcast() + s.streamCond.L.Unlock() +} + +func (s *Connection) frameHandler(frameQueue *PriorityFrameQueue, newHandler StreamHandler) { + for { + popFrame := frameQueue.Pop() + if popFrame == nil { + return + } + + var frameErr error + switch frame := popFrame.(type) { + case *spdy.SynStreamFrame: + frameErr = s.handleStreamFrame(frame, newHandler) + case *spdy.SynReplyFrame: + frameErr = s.handleReplyFrame(frame) + case *spdy.DataFrame: + frameErr = s.dataFrameHandler(frame) + case *spdy.RstStreamFrame: + frameErr = s.handleResetFrame(frame) + case *spdy.HeadersFrame: + frameErr = s.handleHeaderFrame(frame) + case *spdy.PingFrame: + frameErr = s.handlePingFrame(frame) + case *spdy.GoAwayFrame: + frameErr = s.handleGoAwayFrame(frame) + default: + frameErr = fmt.Errorf("unhandled frame type: %T", frame) + } + + if frameErr != nil { + debugMessage("frame handling error: %s", frameErr) + } + } +} + +func (s *Connection) getStreamPriority(streamId spdy.StreamId) uint8 { + stream, streamOk := s.getStream(streamId) + if !streamOk { + return 7 + } + return stream.priority +} + +func (s *Connection) addStreamFrame(frame *spdy.SynStreamFrame) { + var parent *Stream + if frame.AssociatedToStreamId != spdy.StreamId(0) { + parent, _ = s.getStream(frame.AssociatedToStreamId) + } + + stream := &Stream{ + streamId: frame.StreamId, + parent: parent, + conn: s, + startChan: make(chan error), + headers: frame.Headers, + finished: (frame.CFHeader.Flags & spdy.ControlFlagUnidirectional) != 0x00, + replyCond: sync.NewCond(new(sync.Mutex)), + dataChan: make(chan []byte), + headerChan: make(chan http.Header), + closeChan: make(chan bool), + priority: frame.Priority, + } + if frame.CFHeader.Flags&spdy.ControlFlagFin != 0x00 { + stream.closeRemoteChannels() + } + + s.addStream(stream) +} + +// checkStreamFrame checks to see if a stream frame is allowed. +// If the stream is invalid, then a reset frame with protocol error +// will be returned. +func (s *Connection) checkStreamFrame(frame *spdy.SynStreamFrame) bool { + s.receiveIdLock.Lock() + defer s.receiveIdLock.Unlock() + if s.goneAway { + return false + } + validationErr := s.validateStreamId(frame.StreamId) + if validationErr != nil { + go func() { + resetErr := s.sendResetFrame(spdy.ProtocolError, frame.StreamId) + if resetErr != nil { + debugMessage("reset error: %s", resetErr) + } + }() + return false + } + return true +} + +func (s *Connection) handleStreamFrame(frame *spdy.SynStreamFrame, newHandler StreamHandler) error { + stream, ok := s.getStream(frame.StreamId) + if !ok { + return fmt.Errorf("Missing stream: %d", frame.StreamId) + } + + newHandler(stream) + + return nil +} + +func (s *Connection) handleReplyFrame(frame *spdy.SynReplyFrame) error { + debugMessage("(%p) Reply frame received for %d", s, frame.StreamId) + stream, streamOk := s.getStream(frame.StreamId) + if !streamOk { + debugMessage("Reply frame gone away for %d", frame.StreamId) + // Stream has already gone away + return nil + } + if stream.replied { + // Stream has already received reply + return nil + } + stream.replied = true + + // TODO Check for error + if (frame.CFHeader.Flags & spdy.ControlFlagFin) != 0x00 { + s.remoteStreamFinish(stream) + } + + close(stream.startChan) + + return nil +} + +func (s *Connection) handleResetFrame(frame *spdy.RstStreamFrame) error { + stream, streamOk := s.getStream(frame.StreamId) + if !streamOk { + // Stream has already been removed + return nil + } + s.removeStream(stream) + stream.closeRemoteChannels() + + if !stream.replied { + stream.replied = true + stream.startChan <- ErrReset + close(stream.startChan) + } + + stream.finishLock.Lock() + stream.finished = true + stream.finishLock.Unlock() + + return nil +} + +func (s *Connection) handleHeaderFrame(frame *spdy.HeadersFrame) error { + stream, streamOk := s.getStream(frame.StreamId) + if !streamOk { + // Stream has already gone away + return nil + } + if !stream.replied { + // No reply received...Protocol error? + return nil + } + + // TODO limit headers while not blocking (use buffered chan or goroutine?) + select { + case <-stream.closeChan: + return nil + case stream.headerChan <- frame.Headers: + } + + if (frame.CFHeader.Flags & spdy.ControlFlagFin) != 0x00 { + s.remoteStreamFinish(stream) + } + + return nil +} + +func (s *Connection) handleDataFrame(frame *spdy.DataFrame) error { + debugMessage("(%p) Data frame received for %d", s, frame.StreamId) + stream, streamOk := s.getStream(frame.StreamId) + if !streamOk { + debugMessage("(%p) Data frame gone away for %d", s, frame.StreamId) + // Stream has already gone away + return nil + } + if !stream.replied { + debugMessage("(%p) Data frame not replied %d", s, frame.StreamId) + // No reply received...Protocol error? + return nil + } + + debugMessage("(%p) (%d) Data frame handling", stream, stream.streamId) + if len(frame.Data) > 0 { + stream.dataLock.RLock() + select { + case <-stream.closeChan: + debugMessage("(%p) (%d) Data frame not sent (stream shut down)", stream, stream.streamId) + case stream.dataChan <- frame.Data: + debugMessage("(%p) (%d) Data frame sent", stream, stream.streamId) + } + stream.dataLock.RUnlock() + } + if (frame.Flags & spdy.DataFlagFin) != 0x00 { + s.remoteStreamFinish(stream) + } + return nil +} + +func (s *Connection) handlePingFrame(frame *spdy.PingFrame) error { + if s.pingId&0x01 != frame.Id&0x01 { + return s.framer.WriteFrame(frame) + } + pingChan, pingOk := s.pingChans[frame.Id] + if pingOk { + close(pingChan) + } + return nil +} + +func (s *Connection) handleGoAwayFrame(frame *spdy.GoAwayFrame) error { + debugMessage("(%p) Go away received", s) + s.receiveIdLock.Lock() + if s.goneAway { + s.receiveIdLock.Unlock() + return nil + } + s.goneAway = true + s.receiveIdLock.Unlock() + + if s.lastStreamChan != nil { + stream, _ := s.getStream(frame.LastGoodStreamId) + go func() { + s.lastStreamChan <- stream + }() + } + + // Do not block frame handler waiting for closure + go s.shutdown(s.goAwayTimeout) + + return nil +} + +func (s *Connection) remoteStreamFinish(stream *Stream) { + stream.closeRemoteChannels() + + stream.finishLock.Lock() + if stream.finished { + // Stream is fully closed, cleanup + s.removeStream(stream) + } + stream.finishLock.Unlock() +} + +// CreateStream creates a new spdy stream using the parameters for +// creating the stream frame. The stream frame will be sent upon +// calling this function, however this function does not wait for +// the reply frame. If waiting for the reply is desired, use +// the stream Wait or WaitTimeout function on the stream returned +// by this function. +func (s *Connection) CreateStream(headers http.Header, parent *Stream, fin bool) (*Stream, error) { + // MUST synchronize stream creation (all the way to writing the frame) + // as stream IDs **MUST** increase monotonically. + s.nextIdLock.Lock() + defer s.nextIdLock.Unlock() + + streamId := s.getNextStreamId() + if streamId == 0 { + return nil, fmt.Errorf("Unable to get new stream id") + } + + stream := &Stream{ + streamId: streamId, + parent: parent, + conn: s, + startChan: make(chan error), + headers: headers, + dataChan: make(chan []byte), + headerChan: make(chan http.Header), + closeChan: make(chan bool), + } + + debugMessage("(%p) (%p) Create stream", s, stream) + + s.addStream(stream) + + return stream, s.sendStream(stream, fin) +} + +func (s *Connection) shutdown(closeTimeout time.Duration) { + // TODO Ensure this isn't called multiple times + s.shutdownLock.Lock() + if s.hasShutdown { + s.shutdownLock.Unlock() + return + } + s.hasShutdown = true + s.shutdownLock.Unlock() + + var timeout <-chan time.Time + if closeTimeout > time.Duration(0) { + timeout = time.After(closeTimeout) + } + streamsClosed := make(chan bool) + + go func() { + s.streamCond.L.Lock() + for len(s.streams) > 0 { + debugMessage("Streams opened: %d, %#v", len(s.streams), s.streams) + s.streamCond.Wait() + } + s.streamCond.L.Unlock() + close(streamsClosed) + }() + + var err error + select { + case <-streamsClosed: + // No active streams, close should be safe + err = s.conn.Close() + case <-timeout: + // Force ungraceful close + err = s.conn.Close() + // Wait for cleanup to clear active streams + <-streamsClosed + } + + if err != nil { + duration := 10 * time.Minute + time.AfterFunc(duration, func() { + select { + case err, ok := <-s.shutdownChan: + if ok { + debugMessage("Unhandled close error after %s: %s", duration, err) + } + default: + } + }) + s.shutdownChan <- err + } + close(s.shutdownChan) + + return +} + +// Closes spdy connection by sending GoAway frame and initiating shutdown +func (s *Connection) Close() error { + s.receiveIdLock.Lock() + if s.goneAway { + s.receiveIdLock.Unlock() + return nil + } + s.goneAway = true + s.receiveIdLock.Unlock() + + var lastStreamId spdy.StreamId + if s.receivedStreamId > 2 { + lastStreamId = s.receivedStreamId - 2 + } + + goAwayFrame := &spdy.GoAwayFrame{ + LastGoodStreamId: lastStreamId, + Status: spdy.GoAwayOK, + } + + err := s.framer.WriteFrame(goAwayFrame) + if err != nil { + return err + } + + go s.shutdown(s.closeTimeout) + + return nil +} + +// CloseWait closes the connection and waits for shutdown +// to finish. Note the underlying network Connection +// is not closed until the end of shutdown. +func (s *Connection) CloseWait() error { + closeErr := s.Close() + if closeErr != nil { + return closeErr + } + shutdownErr, ok := <-s.shutdownChan + if ok { + return shutdownErr + } + return nil +} + +// Wait waits for the connection to finish shutdown or for +// the wait timeout duration to expire. This needs to be +// called either after Close has been called or the GOAWAYFRAME +// has been received. If the wait timeout is 0, this function +// will block until shutdown finishes. If wait is never called +// and a shutdown error occurs, that error will be logged as an +// unhandled error. +func (s *Connection) Wait(waitTimeout time.Duration) error { + var timeout <-chan time.Time + if waitTimeout > time.Duration(0) { + timeout = time.After(waitTimeout) + } + + select { + case err, ok := <-s.shutdownChan: + if ok { + return err + } + case <-timeout: + return ErrTimeout + } + return nil +} + +// NotifyClose registers a channel to be called when the remote +// peer inidicates connection closure. The last stream to be +// received by the remote will be sent on the channel. The notify +// timeout will determine the duration between go away received +// and the connection being closed. +func (s *Connection) NotifyClose(c chan<- *Stream, timeout time.Duration) { + s.goAwayTimeout = timeout + s.lastStreamChan = c +} + +// SetCloseTimeout sets the amount of time close will wait for +// streams to finish before terminating the underlying network +// connection. Setting the timeout to 0 will cause close to +// wait forever, which is the default. +func (s *Connection) SetCloseTimeout(timeout time.Duration) { + s.closeTimeout = timeout +} + +// SetIdleTimeout sets the amount of time the connection may sit idle before +// it is forcefully terminated. +func (s *Connection) SetIdleTimeout(timeout time.Duration) { + s.framer.setIdleTimeout(timeout) +} + +func (s *Connection) sendHeaders(headers http.Header, stream *Stream, fin bool) error { + var flags spdy.ControlFlags + if fin { + flags = spdy.ControlFlagFin + } + + headerFrame := &spdy.HeadersFrame{ + StreamId: stream.streamId, + Headers: headers, + CFHeader: spdy.ControlFrameHeader{Flags: flags}, + } + + return s.framer.WriteFrame(headerFrame) +} + +func (s *Connection) sendReply(headers http.Header, stream *Stream, fin bool) error { + var flags spdy.ControlFlags + if fin { + flags = spdy.ControlFlagFin + } + + replyFrame := &spdy.SynReplyFrame{ + StreamId: stream.streamId, + Headers: headers, + CFHeader: spdy.ControlFrameHeader{Flags: flags}, + } + + return s.framer.WriteFrame(replyFrame) +} + +func (s *Connection) sendResetFrame(status spdy.RstStreamStatus, streamId spdy.StreamId) error { + resetFrame := &spdy.RstStreamFrame{ + StreamId: streamId, + Status: status, + } + + return s.framer.WriteFrame(resetFrame) +} + +func (s *Connection) sendReset(status spdy.RstStreamStatus, stream *Stream) error { + return s.sendResetFrame(status, stream.streamId) +} + +func (s *Connection) sendStream(stream *Stream, fin bool) error { + var flags spdy.ControlFlags + if fin { + flags = spdy.ControlFlagFin + stream.finished = true + } + + var parentId spdy.StreamId + if stream.parent != nil { + parentId = stream.parent.streamId + } + + streamFrame := &spdy.SynStreamFrame{ + StreamId: spdy.StreamId(stream.streamId), + AssociatedToStreamId: spdy.StreamId(parentId), + Headers: stream.headers, + CFHeader: spdy.ControlFrameHeader{Flags: flags}, + } + + return s.framer.WriteFrame(streamFrame) +} + +// getNextStreamId returns the next sequential id +// every call should produce a unique value or an error +func (s *Connection) getNextStreamId() spdy.StreamId { + sid := s.nextStreamId + if sid > 0x7fffffff { + return 0 + } + s.nextStreamId = s.nextStreamId + 2 + return sid +} + +// PeekNextStreamId returns the next sequential id and keeps the next id untouched +func (s *Connection) PeekNextStreamId() spdy.StreamId { + sid := s.nextStreamId + return sid +} + +func (s *Connection) validateStreamId(rid spdy.StreamId) error { + if rid > 0x7fffffff || rid < s.receivedStreamId { + return ErrInvalidStreamId + } + s.receivedStreamId = rid + 2 + return nil +} + +func (s *Connection) addStream(stream *Stream) { + s.streamCond.L.Lock() + s.streams[stream.streamId] = stream + debugMessage("(%p) (%p) Stream added, broadcasting: %d", s, stream, stream.streamId) + s.streamCond.Broadcast() + s.streamCond.L.Unlock() +} + +func (s *Connection) removeStream(stream *Stream) { + s.streamCond.L.Lock() + delete(s.streams, stream.streamId) + debugMessage("(%p) (%p) Stream removed, broadcasting: %d", s, stream, stream.streamId) + s.streamCond.Broadcast() + s.streamCond.L.Unlock() +} + +func (s *Connection) getStream(streamId spdy.StreamId) (stream *Stream, ok bool) { + s.streamLock.RLock() + stream, ok = s.streams[streamId] + s.streamLock.RUnlock() + return +} + +// FindStream looks up the given stream id and either waits for the +// stream to be found or returns nil if the stream id is no longer +// valid. +func (s *Connection) FindStream(streamId uint32) *Stream { + var stream *Stream + var ok bool + s.streamCond.L.Lock() + stream, ok = s.streams[spdy.StreamId(streamId)] + debugMessage("(%p) Found stream %d? %t", s, spdy.StreamId(streamId), ok) + for !ok && streamId >= uint32(s.receivedStreamId) { + s.streamCond.Wait() + stream, ok = s.streams[spdy.StreamId(streamId)] + } + s.streamCond.L.Unlock() + return stream +} + +func (s *Connection) CloseChan() <-chan bool { + return s.closeChan +} diff --git a/vendor/github.com/docker/spdystream/handlers.go b/vendor/github.com/docker/spdystream/handlers.go new file mode 100644 index 000000000..b59fa5fdc --- /dev/null +++ b/vendor/github.com/docker/spdystream/handlers.go @@ -0,0 +1,38 @@ +package spdystream + +import ( + "io" + "net/http" +) + +// MirrorStreamHandler mirrors all streams. +func MirrorStreamHandler(stream *Stream) { + replyErr := stream.SendReply(http.Header{}, false) + if replyErr != nil { + return + } + + go func() { + io.Copy(stream, stream) + stream.Close() + }() + go func() { + for { + header, receiveErr := stream.ReceiveHeader() + if receiveErr != nil { + return + } + sendErr := stream.SendHeader(header, false) + if sendErr != nil { + return + } + } + }() +} + +// NoopStreamHandler does nothing when stream connects, most +// likely used with RejectAuthHandler which will not allow any +// streams to make it to the stream handler. +func NoOpStreamHandler(stream *Stream) { + stream.SendReply(http.Header{}, false) +} diff --git a/vendor/github.com/docker/spdystream/priority.go b/vendor/github.com/docker/spdystream/priority.go new file mode 100644 index 000000000..fc8582b5c --- /dev/null +++ b/vendor/github.com/docker/spdystream/priority.go @@ -0,0 +1,98 @@ +package spdystream + +import ( + "container/heap" + "sync" + + "github.com/docker/spdystream/spdy" +) + +type prioritizedFrame struct { + frame spdy.Frame + priority uint8 + insertId uint64 +} + +type frameQueue []*prioritizedFrame + +func (fq frameQueue) Len() int { + return len(fq) +} + +func (fq frameQueue) Less(i, j int) bool { + if fq[i].priority == fq[j].priority { + return fq[i].insertId < fq[j].insertId + } + return fq[i].priority < fq[j].priority +} + +func (fq frameQueue) Swap(i, j int) { + fq[i], fq[j] = fq[j], fq[i] +} + +func (fq *frameQueue) Push(x interface{}) { + *fq = append(*fq, x.(*prioritizedFrame)) +} + +func (fq *frameQueue) Pop() interface{} { + old := *fq + n := len(old) + *fq = old[0 : n-1] + return old[n-1] +} + +type PriorityFrameQueue struct { + queue *frameQueue + c *sync.Cond + size int + nextInsertId uint64 + drain bool +} + +func NewPriorityFrameQueue(size int) *PriorityFrameQueue { + queue := make(frameQueue, 0, size) + heap.Init(&queue) + + return &PriorityFrameQueue{ + queue: &queue, + size: size, + c: sync.NewCond(&sync.Mutex{}), + } +} + +func (q *PriorityFrameQueue) Push(frame spdy.Frame, priority uint8) { + q.c.L.Lock() + defer q.c.L.Unlock() + for q.queue.Len() >= q.size { + q.c.Wait() + } + pFrame := &prioritizedFrame{ + frame: frame, + priority: priority, + insertId: q.nextInsertId, + } + q.nextInsertId = q.nextInsertId + 1 + heap.Push(q.queue, pFrame) + q.c.Signal() +} + +func (q *PriorityFrameQueue) Pop() spdy.Frame { + q.c.L.Lock() + defer q.c.L.Unlock() + for q.queue.Len() == 0 { + if q.drain { + return nil + } + q.c.Wait() + } + frame := heap.Pop(q.queue).(*prioritizedFrame).frame + q.c.Signal() + return frame +} + +func (q *PriorityFrameQueue) Drain() { + q.c.L.Lock() + defer q.c.L.Unlock() + q.drain = true + q.c.Broadcast() +} diff --git a/vendor/github.com/docker/spdystream/priority_test.go b/vendor/github.com/docker/spdystream/priority_test.go new file mode 100644 index 000000000..0746be2a8 --- /dev/null +++ b/vendor/github.com/docker/spdystream/priority_test.go @@ -0,0 +1,108 @@ +package spdystream + +import ( + "sync" + "testing" + "time" + + "github.com/docker/spdystream/spdy" +) + +func TestPriorityQueueOrdering(t *testing.T) { + queue := NewPriorityFrameQueue(150) + data1 := &spdy.DataFrame{} + data2 := &spdy.DataFrame{} + data3 := &spdy.DataFrame{} + data4 := &spdy.DataFrame{} + queue.Push(data1, 2) + queue.Push(data2, 1) + queue.Push(data3, 1) + queue.Push(data4, 0) + + if queue.Pop() != data4 { + t.Fatalf("Wrong order, expected data4 first") + } + if queue.Pop() != data2 { + t.Fatalf("Wrong order, expected data2 second") + } + if queue.Pop() != data3 { + t.Fatalf("Wrong order, expected data3 third") + } + if queue.Pop() != data1 { + t.Fatalf("Wrong order, expected data1 fourth") + } + + // Insert 50 Medium priority frames + for i := spdy.StreamId(50); i < 100; i++ { + queue.Push(&spdy.DataFrame{StreamId: i}, 1) + } + // Insert 50 low priority frames + for i := spdy.StreamId(100); i < 150; i++ { + queue.Push(&spdy.DataFrame{StreamId: i}, 2) + } + // Insert 50 high priority frames + for i := spdy.StreamId(0); i < 50; i++ { + queue.Push(&spdy.DataFrame{StreamId: i}, 0) + } + + for i := spdy.StreamId(0); i < 150; i++ { + frame := queue.Pop() + if frame.(*spdy.DataFrame).StreamId != i { + t.Fatalf("Wrong frame\nActual: %d\nExpecting: %d", frame.(*spdy.DataFrame).StreamId, i) + } + } +} + +func TestPriorityQueueSync(t *testing.T) { + queue := NewPriorityFrameQueue(150) + var wg sync.WaitGroup + insertRange := func(start, stop spdy.StreamId, priority uint8) { + for i := start; i < stop; i++ { + queue.Push(&spdy.DataFrame{StreamId: i}, priority) + } + wg.Done() + } + wg.Add(3) + go insertRange(spdy.StreamId(100), spdy.StreamId(150), 2) + go insertRange(spdy.StreamId(0), spdy.StreamId(50), 0) + go insertRange(spdy.StreamId(50), spdy.StreamId(100), 1) + + wg.Wait() + for i := spdy.StreamId(0); i < 150; i++ { + frame := queue.Pop() + if frame.(*spdy.DataFrame).StreamId != i { + t.Fatalf("Wrong frame\nActual: %d\nExpecting: %d", frame.(*spdy.DataFrame).StreamId, i) + } + } +} + +func TestPriorityQueueBlocking(t *testing.T) { + queue := NewPriorityFrameQueue(15) + for i := 0; i < 15; i++ { + queue.Push(&spdy.DataFrame{}, 2) + } + doneChan := make(chan bool) + go func() { + queue.Push(&spdy.DataFrame{}, 2) + close(doneChan) + }() + select { + case <-doneChan: + t.Fatalf("Push succeeded, expected to block") + case <-time.After(time.Millisecond): + break + } + + queue.Pop() + + select { + case <-doneChan: + break + case <-time.After(time.Millisecond): + t.Fatalf("Push should have succeeded, but timeout reached") + } + + for i := 0; i < 15; i++ { + queue.Pop() + } +} diff --git a/vendor/github.com/docker/spdystream/spdy/dictionary.go b/vendor/github.com/docker/spdystream/spdy/dictionary.go new file mode 100644 index 000000000..5a5ff0e14 --- /dev/null +++ b/vendor/github.com/docker/spdystream/spdy/dictionary.go @@ -0,0 +1,187 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package spdy + +// headerDictionary is the dictionary sent to the zlib compressor/decompressor. +var headerDictionary = []byte{ + 0x00, 0x00, 0x00, 0x07, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x00, 0x00, 0x00, 0x04, 0x68, + 0x65, 0x61, 0x64, 0x00, 0x00, 0x00, 0x04, 0x70, + 0x6f, 0x73, 0x74, 0x00, 0x00, 0x00, 0x03, 0x70, + 0x75, 0x74, 0x00, 0x00, 0x00, 0x06, 0x64, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x00, 0x00, 0x00, 0x05, + 0x74, 0x72, 0x61, 0x63, 0x65, 0x00, 0x00, 0x00, + 0x06, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x00, + 0x00, 0x00, 0x0e, 0x61, 0x63, 0x63, 0x65, 0x70, + 0x74, 0x2d, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, + 0x74, 0x00, 0x00, 0x00, 0x0f, 0x61, 0x63, 0x63, + 0x65, 0x70, 0x74, 0x2d, 0x65, 0x6e, 0x63, 0x6f, + 0x64, 0x69, 0x6e, 0x67, 0x00, 0x00, 0x00, 0x0f, + 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x6c, + 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x00, + 0x00, 0x00, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x70, + 0x74, 0x2d, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, + 0x00, 0x00, 0x00, 0x03, 0x61, 0x67, 0x65, 0x00, + 0x00, 0x00, 0x05, 0x61, 0x6c, 0x6c, 0x6f, 0x77, + 0x00, 0x00, 0x00, 0x0d, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x00, 0x00, 0x00, 0x0d, 0x63, 0x61, 0x63, + 0x68, 0x65, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x00, 0x00, 0x00, 0x0a, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x00, 0x00, 0x00, 0x0c, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x2d, 0x62, 0x61, 0x73, 0x65, + 0x00, 0x00, 0x00, 0x10, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x2d, 0x65, 0x6e, 0x63, 0x6f, + 0x64, 0x69, 0x6e, 0x67, 0x00, 0x00, 0x00, 0x10, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, + 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, + 0x00, 0x00, 0x00, 0x0e, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x00, 0x00, 0x00, 0x10, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, + 0x00, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x2d, 0x6d, 0x64, 0x35, 0x00, 0x00, 0x00, + 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x2d, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x00, 0x00, + 0x00, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x00, 0x00, + 0x00, 0x04, 0x64, 0x61, 0x74, 0x65, 0x00, 0x00, + 0x00, 0x04, 0x65, 0x74, 0x61, 0x67, 0x00, 0x00, + 0x00, 0x06, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, + 0x00, 0x00, 0x00, 0x07, 0x65, 0x78, 0x70, 0x69, + 0x72, 0x65, 0x73, 0x00, 0x00, 0x00, 0x04, 0x66, + 0x72, 0x6f, 0x6d, 0x00, 0x00, 0x00, 0x04, 0x68, + 0x6f, 0x73, 0x74, 0x00, 0x00, 0x00, 0x08, 0x69, + 0x66, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x00, + 0x00, 0x00, 0x11, 0x69, 0x66, 0x2d, 0x6d, 0x6f, + 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x2d, 0x73, + 0x69, 0x6e, 0x63, 0x65, 0x00, 0x00, 0x00, 0x0d, + 0x69, 0x66, 0x2d, 0x6e, 0x6f, 0x6e, 0x65, 0x2d, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x00, 0x00, 0x00, + 0x08, 0x69, 0x66, 0x2d, 0x72, 0x61, 0x6e, 0x67, + 0x65, 0x00, 0x00, 0x00, 0x13, 0x69, 0x66, 0x2d, + 0x75, 0x6e, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x2d, 0x73, 0x69, 0x6e, 0x63, 0x65, + 0x00, 0x00, 0x00, 0x0d, 0x6c, 0x61, 0x73, 0x74, + 0x2d, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x00, 0x00, 0x00, 0x08, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, + 0x0c, 0x6d, 0x61, 0x78, 0x2d, 0x66, 0x6f, 0x72, + 0x77, 0x61, 0x72, 0x64, 0x73, 0x00, 0x00, 0x00, + 0x06, 0x70, 0x72, 0x61, 0x67, 0x6d, 0x61, 0x00, + 0x00, 0x00, 0x12, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2d, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x00, 0x00, 0x00, + 0x13, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2d, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, + 0x72, 0x61, 0x6e, 0x67, 0x65, 0x00, 0x00, 0x00, + 0x07, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x72, + 0x00, 0x00, 0x00, 0x0b, 0x72, 0x65, 0x74, 0x72, + 0x79, 0x2d, 0x61, 0x66, 0x74, 0x65, 0x72, 0x00, + 0x00, 0x00, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x00, 0x00, 0x00, 0x02, 0x74, 0x65, 0x00, + 0x00, 0x00, 0x07, 0x74, 0x72, 0x61, 0x69, 0x6c, + 0x65, 0x72, 0x00, 0x00, 0x00, 0x11, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2d, 0x65, + 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x00, + 0x00, 0x00, 0x07, 0x75, 0x70, 0x67, 0x72, 0x61, + 0x64, 0x65, 0x00, 0x00, 0x00, 0x0a, 0x75, 0x73, + 0x65, 0x72, 0x2d, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x00, 0x00, 0x00, 0x04, 0x76, 0x61, 0x72, 0x79, + 0x00, 0x00, 0x00, 0x03, 0x76, 0x69, 0x61, 0x00, + 0x00, 0x00, 0x07, 0x77, 0x61, 0x72, 0x6e, 0x69, + 0x6e, 0x67, 0x00, 0x00, 0x00, 0x10, 0x77, 0x77, + 0x77, 0x2d, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, + 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x00, 0x00, + 0x00, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x00, 0x00, 0x00, 0x03, 0x67, 0x65, 0x74, 0x00, + 0x00, 0x00, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x00, 0x00, 0x00, 0x06, 0x32, 0x30, 0x30, + 0x20, 0x4f, 0x4b, 0x00, 0x00, 0x00, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x00, 0x00, + 0x00, 0x08, 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, + 0x2e, 0x31, 0x00, 0x00, 0x00, 0x03, 0x75, 0x72, + 0x6c, 0x00, 0x00, 0x00, 0x06, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x00, 0x00, 0x00, 0x0a, 0x73, + 0x65, 0x74, 0x2d, 0x63, 0x6f, 0x6f, 0x6b, 0x69, + 0x65, 0x00, 0x00, 0x00, 0x0a, 0x6b, 0x65, 0x65, + 0x70, 0x2d, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x00, + 0x00, 0x00, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x31, 0x30, 0x30, 0x31, 0x30, 0x31, 0x32, + 0x30, 0x31, 0x32, 0x30, 0x32, 0x32, 0x30, 0x35, + 0x32, 0x30, 0x36, 0x33, 0x30, 0x30, 0x33, 0x30, + 0x32, 0x33, 0x30, 0x33, 0x33, 0x30, 0x34, 0x33, + 0x30, 0x35, 0x33, 0x30, 0x36, 0x33, 0x30, 0x37, + 0x34, 0x30, 0x32, 0x34, 0x30, 0x35, 0x34, 0x30, + 0x36, 0x34, 0x30, 0x37, 0x34, 0x30, 0x38, 0x34, + 0x30, 0x39, 0x34, 0x31, 0x30, 0x34, 0x31, 0x31, + 0x34, 0x31, 0x32, 0x34, 0x31, 0x33, 0x34, 0x31, + 0x34, 0x34, 0x31, 0x35, 0x34, 0x31, 0x36, 0x34, + 0x31, 0x37, 0x35, 0x30, 0x32, 0x35, 0x30, 0x34, + 0x35, 0x30, 0x35, 0x32, 0x30, 0x33, 0x20, 0x4e, + 0x6f, 0x6e, 0x2d, 0x41, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x74, 0x61, 0x74, 0x69, 0x76, 0x65, + 0x20, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x30, 0x34, 0x20, + 0x4e, 0x6f, 0x20, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x33, 0x30, 0x31, 0x20, 0x4d, 0x6f, + 0x76, 0x65, 0x64, 0x20, 0x50, 0x65, 0x72, 0x6d, + 0x61, 0x6e, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x34, + 0x30, 0x30, 0x20, 0x42, 0x61, 0x64, 0x20, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x34, 0x30, + 0x31, 0x20, 0x55, 0x6e, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x34, 0x30, + 0x33, 0x20, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, + 0x64, 0x65, 0x6e, 0x34, 0x30, 0x34, 0x20, 0x4e, + 0x6f, 0x74, 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, + 0x35, 0x30, 0x30, 0x20, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x20, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x35, 0x30, 0x31, 0x20, 0x4e, 0x6f, 0x74, + 0x20, 0x49, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x65, 0x64, 0x35, 0x30, 0x33, 0x20, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, + 0x55, 0x6e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, + 0x62, 0x6c, 0x65, 0x4a, 0x61, 0x6e, 0x20, 0x46, + 0x65, 0x62, 0x20, 0x4d, 0x61, 0x72, 0x20, 0x41, + 0x70, 0x72, 0x20, 0x4d, 0x61, 0x79, 0x20, 0x4a, + 0x75, 0x6e, 0x20, 0x4a, 0x75, 0x6c, 0x20, 0x41, + 0x75, 0x67, 0x20, 0x53, 0x65, 0x70, 0x74, 0x20, + 0x4f, 0x63, 0x74, 0x20, 0x4e, 0x6f, 0x76, 0x20, + 0x44, 0x65, 0x63, 0x20, 0x30, 0x30, 0x3a, 0x30, + 0x30, 0x3a, 0x30, 0x30, 0x20, 0x4d, 0x6f, 0x6e, + 0x2c, 0x20, 0x54, 0x75, 0x65, 0x2c, 0x20, 0x57, + 0x65, 0x64, 0x2c, 0x20, 0x54, 0x68, 0x75, 0x2c, + 0x20, 0x46, 0x72, 0x69, 0x2c, 0x20, 0x53, 0x61, + 0x74, 0x2c, 0x20, 0x53, 0x75, 0x6e, 0x2c, 0x20, + 0x47, 0x4d, 0x54, 0x63, 0x68, 0x75, 0x6e, 0x6b, + 0x65, 0x64, 0x2c, 0x74, 0x65, 0x78, 0x74, 0x2f, + 0x68, 0x74, 0x6d, 0x6c, 0x2c, 0x69, 0x6d, 0x61, + 0x67, 0x65, 0x2f, 0x70, 0x6e, 0x67, 0x2c, 0x69, + 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x6a, 0x70, 0x67, + 0x2c, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x67, + 0x69, 0x66, 0x2c, 0x61, 0x70, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, + 0x6d, 0x6c, 0x2c, 0x61, 0x70, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, + 0x68, 0x74, 0x6d, 0x6c, 0x2b, 0x78, 0x6d, 0x6c, + 0x2c, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x70, 0x6c, + 0x61, 0x69, 0x6e, 0x2c, 0x74, 0x65, 0x78, 0x74, + 0x2f, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x2c, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x6d, 0x61, 0x78, 0x2d, 0x61, 0x67, 0x65, + 0x3d, 0x67, 0x7a, 0x69, 0x70, 0x2c, 0x64, 0x65, + 0x66, 0x6c, 0x61, 0x74, 0x65, 0x2c, 0x73, 0x64, + 0x63, 0x68, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, + 0x74, 0x3d, 0x75, 0x74, 0x66, 0x2d, 0x38, 0x63, + 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x3d, 0x69, + 0x73, 0x6f, 0x2d, 0x38, 0x38, 0x35, 0x39, 0x2d, + 0x31, 0x2c, 0x75, 0x74, 0x66, 0x2d, 0x2c, 0x2a, + 0x2c, 0x65, 0x6e, 0x71, 0x3d, 0x30, 0x2e, +} diff --git a/vendor/github.com/docker/spdystream/spdy/read.go b/vendor/github.com/docker/spdystream/spdy/read.go new file mode 100644 index 000000000..9359a9501 --- /dev/null +++ b/vendor/github.com/docker/spdystream/spdy/read.go @@ -0,0 +1,348 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package spdy + +import ( + "compress/zlib" + "encoding/binary" + "io" + "net/http" + "strings" +) + +func (frame *SynStreamFrame) read(h ControlFrameHeader, f *Framer) error { + return f.readSynStreamFrame(h, frame) +} + +func (frame *SynReplyFrame) read(h ControlFrameHeader, f *Framer) error { + return f.readSynReplyFrame(h, frame) +} + +func (frame *RstStreamFrame) read(h ControlFrameHeader, f *Framer) error { + frame.CFHeader = h + if err := binary.Read(f.r, binary.BigEndian, &frame.StreamId); err != nil { + return err + } + if err := binary.Read(f.r, binary.BigEndian, &frame.Status); err != nil { + return err + } + if frame.Status == 0 { + return &Error{InvalidControlFrame, frame.StreamId} + } + if frame.StreamId == 0 { + return &Error{ZeroStreamId, 0} + } + return nil +} + +func (frame *SettingsFrame) read(h ControlFrameHeader, f *Framer) error { + frame.CFHeader = h + var numSettings uint32 + if err := binary.Read(f.r, binary.BigEndian, &numSettings); err != nil { + return err + } + frame.FlagIdValues = make([]SettingsFlagIdValue, numSettings) + for i := uint32(0); i < numSettings; i++ { + if err := binary.Read(f.r, binary.BigEndian, &frame.FlagIdValues[i].Id); err != nil { + return err + } + frame.FlagIdValues[i].Flag = SettingsFlag((frame.FlagIdValues[i].Id & 0xff000000) >> 24) + frame.FlagIdValues[i].Id &= 0xffffff + if err := binary.Read(f.r, binary.BigEndian, &frame.FlagIdValues[i].Value); err != nil { + return err + } + } + return nil +} + +func (frame *PingFrame) read(h ControlFrameHeader, f *Framer) error { + frame.CFHeader = h + if err := binary.Read(f.r, binary.BigEndian, &frame.Id); err != nil { + return err + } + if frame.Id == 0 { + return &Error{ZeroStreamId, 0} + } + if frame.CFHeader.Flags != 0 { + return &Error{InvalidControlFrame, StreamId(frame.Id)} + } + return nil +} + +func (frame *GoAwayFrame) read(h ControlFrameHeader, f *Framer) error { + frame.CFHeader = h + if err := binary.Read(f.r, binary.BigEndian, &frame.LastGoodStreamId); err != nil { + return err + } + if frame.CFHeader.Flags != 0 { + return &Error{InvalidControlFrame, frame.LastGoodStreamId} + } + if frame.CFHeader.length != 8 { + return &Error{InvalidControlFrame, frame.LastGoodStreamId} + } + if err := binary.Read(f.r, binary.BigEndian, &frame.Status); err != nil { + return err + } + return nil +} + +func (frame *HeadersFrame) read(h ControlFrameHeader, f *Framer) error { + return f.readHeadersFrame(h, frame) +} + +func (frame *WindowUpdateFrame) read(h ControlFrameHeader, f *Framer) error { + frame.CFHeader = h + if err := binary.Read(f.r, binary.BigEndian, &frame.StreamId); err != nil { + return err + } + if frame.CFHeader.Flags != 0 { + return &Error{InvalidControlFrame, frame.StreamId} + } + if frame.CFHeader.length != 8 { + return &Error{InvalidControlFrame, frame.StreamId} + } + if err := binary.Read(f.r, binary.BigEndian, &frame.DeltaWindowSize); err != nil { + return err + } + return nil +} + +func newControlFrame(frameType ControlFrameType) (controlFrame, error) { + ctor, ok := cframeCtor[frameType] + if !ok { + return nil, &Error{Err: InvalidControlFrame} + } + return ctor(), nil +} + +var cframeCtor = map[ControlFrameType]func() controlFrame{ + TypeSynStream: func() controlFrame { return new(SynStreamFrame) }, + TypeSynReply: func() controlFrame { return new(SynReplyFrame) }, + TypeRstStream: func() controlFrame { return new(RstStreamFrame) }, + TypeSettings: func() controlFrame { return new(SettingsFrame) }, + TypePing: func() controlFrame { return new(PingFrame) }, + TypeGoAway: func() controlFrame { return new(GoAwayFrame) }, + TypeHeaders: func() controlFrame { return new(HeadersFrame) }, + TypeWindowUpdate: func() controlFrame { return new(WindowUpdateFrame) }, +} + +func (f *Framer) uncorkHeaderDecompressor(payloadSize int64) error { + if f.headerDecompressor != nil { + f.headerReader.N = payloadSize + return nil + } + f.headerReader = io.LimitedReader{R: f.r, N: payloadSize} + decompressor, err := zlib.NewReaderDict(&f.headerReader, []byte(headerDictionary)) + if err != nil { + return err + } + f.headerDecompressor = decompressor + return nil +} + +// ReadFrame reads SPDY encoded data and returns a decompressed Frame. +func (f *Framer) ReadFrame() (Frame, error) { + var firstWord uint32 + if err := binary.Read(f.r, binary.BigEndian, &firstWord); err != nil { + return nil, err + } + if firstWord&0x80000000 != 0 { + frameType := ControlFrameType(firstWord & 0xffff) + version := uint16(firstWord >> 16 & 0x7fff) + return f.parseControlFrame(version, frameType) + } + return f.parseDataFrame(StreamId(firstWord & 0x7fffffff)) +} + +func (f *Framer) parseControlFrame(version uint16, frameType ControlFrameType) (Frame, error) { + var length uint32 + if err := binary.Read(f.r, binary.BigEndian, &length); err != nil { + return nil, err + } + flags := ControlFlags((length & 0xff000000) >> 24) + length &= 0xffffff + header := ControlFrameHeader{version, frameType, flags, length} + cframe, err := newControlFrame(frameType) + if err != nil { + return nil, err + } + if err = cframe.read(header, f); err != nil { + return nil, err + } + return cframe, nil +} + +func parseHeaderValueBlock(r io.Reader, streamId StreamId) (http.Header, error) { + var numHeaders uint32 + if err := binary.Read(r, binary.BigEndian, &numHeaders); err != nil { + return nil, err + } + var e error + h := make(http.Header, int(numHeaders)) + for i := 0; i < int(numHeaders); i++ { + var length uint32 + if err := binary.Read(r, binary.BigEndian, &length); err != nil { + return nil, err + } + nameBytes := make([]byte, length) + if _, err := io.ReadFull(r, nameBytes); err != nil { + return nil, err + } + name := string(nameBytes) + if name != strings.ToLower(name) { + e = &Error{UnlowercasedHeaderName, streamId} + name = strings.ToLower(name) + } + if h[name] != nil { + e = &Error{DuplicateHeaders, streamId} + } + if err := binary.Read(r, binary.BigEndian, &length); err != nil { + return nil, err + } + value := make([]byte, length) + if _, err := io.ReadFull(r, value); err != nil { + return nil, err + } + valueList := strings.Split(string(value), headerValueSeparator) + for _, v := range valueList { + h.Add(name, v) + } + } + if e != nil { + return h, e + } + return h, nil +} + +func (f *Framer) readSynStreamFrame(h ControlFrameHeader, frame *SynStreamFrame) error { + frame.CFHeader = h + var err error + if err = binary.Read(f.r, binary.BigEndian, &frame.StreamId); err != nil { + return err + } + if err = binary.Read(f.r, binary.BigEndian, &frame.AssociatedToStreamId); err != nil { + return err + } + if err = binary.Read(f.r, binary.BigEndian, &frame.Priority); err != nil { + return err + } + frame.Priority >>= 5 + if err = binary.Read(f.r, binary.BigEndian, &frame.Slot); err != nil { + return err + } + reader := f.r + if !f.headerCompressionDisabled { + err := f.uncorkHeaderDecompressor(int64(h.length - 10)) + if err != nil { + return err + } + reader = f.headerDecompressor + } + frame.Headers, err = parseHeaderValueBlock(reader, frame.StreamId) + if !f.headerCompressionDisabled && (err == io.EOF && f.headerReader.N == 0 || f.headerReader.N != 0) { + err = &Error{WrongCompressedPayloadSize, 0} + } + if err != nil { + return err + } + for h := range frame.Headers { + if invalidReqHeaders[h] { + return &Error{InvalidHeaderPresent, frame.StreamId} + } + } + if frame.StreamId == 0 { + return &Error{ZeroStreamId, 0} + } + return nil +} + +func (f *Framer) readSynReplyFrame(h ControlFrameHeader, frame *SynReplyFrame) error { + frame.CFHeader = h + var err error + if err = binary.Read(f.r, binary.BigEndian, &frame.StreamId); err != nil { + return err + } + reader := f.r + if !f.headerCompressionDisabled { + err := f.uncorkHeaderDecompressor(int64(h.length - 4)) + if err != nil { + return err + } + reader = f.headerDecompressor + } + frame.Headers, err = parseHeaderValueBlock(reader, frame.StreamId) + if !f.headerCompressionDisabled && (err == io.EOF && f.headerReader.N == 0 || f.headerReader.N != 0) { + err = &Error{WrongCompressedPayloadSize, 0} + } + if err != nil { + return err + } + for h := range frame.Headers { + if invalidRespHeaders[h] { + return &Error{InvalidHeaderPresent, frame.StreamId} + } + } + if frame.StreamId == 0 { + return &Error{ZeroStreamId, 0} + } + return nil +} + +func (f *Framer) readHeadersFrame(h ControlFrameHeader, frame *HeadersFrame) error { + frame.CFHeader = h + var err error + if err = binary.Read(f.r, binary.BigEndian, &frame.StreamId); err != nil { + return err + } + reader := f.r + if !f.headerCompressionDisabled { + err := f.uncorkHeaderDecompressor(int64(h.length - 4)) + if err != nil { + return err + } + reader = f.headerDecompressor + } + frame.Headers, err = parseHeaderValueBlock(reader, frame.StreamId) + if !f.headerCompressionDisabled && (err == io.EOF && f.headerReader.N == 0 || f.headerReader.N != 0) { + err = &Error{WrongCompressedPayloadSize, 0} + } + if err != nil { + return err + } + var invalidHeaders map[string]bool + if frame.StreamId%2 == 0 { + invalidHeaders = invalidReqHeaders + } else { + invalidHeaders = invalidRespHeaders + } + for h := range frame.Headers { + if invalidHeaders[h] { + return &Error{InvalidHeaderPresent, frame.StreamId} + } + } + if frame.StreamId == 0 { + return &Error{ZeroStreamId, 0} + } + return nil +} + +func (f *Framer) parseDataFrame(streamId StreamId) (*DataFrame, error) { + var length uint32 + if err := binary.Read(f.r, binary.BigEndian, &length); err != nil { + return nil, err + } + var frame DataFrame + frame.StreamId = streamId + frame.Flags = DataFlags(length >> 24) + length &= 0xffffff + frame.Data = make([]byte, length) + if _, err := io.ReadFull(f.r, frame.Data); err != nil { + return nil, err + } + if frame.StreamId == 0 { + return nil, &Error{ZeroStreamId, 0} + } + return &frame, nil +} diff --git a/vendor/github.com/docker/spdystream/spdy/spdy_test.go b/vendor/github.com/docker/spdystream/spdy/spdy_test.go new file mode 100644 index 000000000..ce581f1d0 --- /dev/null +++ b/vendor/github.com/docker/spdystream/spdy/spdy_test.go @@ -0,0 +1,644 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package spdy + +import ( + "bytes" + "compress/zlib" + "encoding/base64" + "io" + "io/ioutil" + "net/http" + "reflect" + "testing" +) + +var HeadersFixture = http.Header{ + "Url": []string{"http://www.google.com/"}, + "Method": []string{"get"}, + "Version": []string{"http/1.1"}, +} + +func TestHeaderParsing(t *testing.T) { + var headerValueBlockBuf bytes.Buffer + writeHeaderValueBlock(&headerValueBlockBuf, HeadersFixture) + const bogusStreamId = 1 + newHeaders, err := parseHeaderValueBlock(&headerValueBlockBuf, bogusStreamId) + if err != nil { + t.Fatal("parseHeaderValueBlock:", err) + } + if !reflect.DeepEqual(HeadersFixture, newHeaders) { + t.Fatal("got: ", newHeaders, "\nwant: ", HeadersFixture) + } +} + +func TestCreateParseSynStreamFrameCompressionDisable(t *testing.T) { + buffer := new(bytes.Buffer) + // Fixture framer for no compression test. + framer := &Framer{ + headerCompressionDisabled: true, + w: buffer, + headerBuf: new(bytes.Buffer), + r: buffer, + } + synStreamFrame := SynStreamFrame{ + CFHeader: ControlFrameHeader{ + version: Version, + frameType: TypeSynStream, + }, + StreamId: 2, + Headers: HeadersFixture, + } + if err := framer.WriteFrame(&synStreamFrame); err != nil { + t.Fatal("WriteFrame without compression:", err) + } + frame, err := framer.ReadFrame() + if err != nil { + t.Fatal("ReadFrame without compression:", err) + } + parsedSynStreamFrame, ok := frame.(*SynStreamFrame) + if !ok { + t.Fatal("Parsed incorrect frame type:", frame) + } + if !reflect.DeepEqual(synStreamFrame, *parsedSynStreamFrame) { + t.Fatal("got: ", *parsedSynStreamFrame, "\nwant: ", synStreamFrame) + } +} + +func TestCreateParseSynStreamFrameCompressionEnable(t *testing.T) { + buffer := new(bytes.Buffer) + framer, err := NewFramer(buffer, buffer) + synStreamFrame := SynStreamFrame{ + CFHeader: ControlFrameHeader{ + version: Version, + frameType: TypeSynStream, + }, + StreamId: 2, + Headers: HeadersFixture, + } + if err != nil { + t.Fatal("Failed to create new framer:", err) + } + if err := framer.WriteFrame(&synStreamFrame); err != nil { + t.Fatal("WriteFrame with compression:", err) + } + frame, err := framer.ReadFrame() + if err != nil { + t.Fatal("ReadFrame with compression:", err) + } + parsedSynStreamFrame, ok := frame.(*SynStreamFrame) + if !ok { + t.Fatal("Parsed incorrect frame type:", frame) + } + if !reflect.DeepEqual(synStreamFrame, *parsedSynStreamFrame) { + t.Fatal("got: ", *parsedSynStreamFrame, "\nwant: ", synStreamFrame) + } +} + +func TestCreateParseSynReplyFrameCompressionDisable(t *testing.T) { + buffer := new(bytes.Buffer) + framer := &Framer{ + headerCompressionDisabled: true, + w: buffer, + headerBuf: new(bytes.Buffer), + r: buffer, + } + synReplyFrame := SynReplyFrame{ + CFHeader: ControlFrameHeader{ + version: Version, + frameType: TypeSynReply, + }, + StreamId: 2, + Headers: HeadersFixture, + } + if err := framer.WriteFrame(&synReplyFrame); err != nil { + t.Fatal("WriteFrame without compression:", err) + } + frame, err := framer.ReadFrame() + if err != nil { + t.Fatal("ReadFrame without compression:", err) + } + parsedSynReplyFrame, ok := frame.(*SynReplyFrame) + if !ok { + t.Fatal("Parsed incorrect frame type:", frame) + } + if !reflect.DeepEqual(synReplyFrame, *parsedSynReplyFrame) { + t.Fatal("got: ", *parsedSynReplyFrame, "\nwant: ", synReplyFrame) + } +} + +func TestCreateParseSynReplyFrameCompressionEnable(t *testing.T) { + buffer := new(bytes.Buffer) + framer, err := NewFramer(buffer, buffer) + synReplyFrame := SynReplyFrame{ + CFHeader: ControlFrameHeader{ + version: Version, + frameType: TypeSynReply, + }, + StreamId: 2, + Headers: HeadersFixture, + } + if err != nil { + t.Fatal("Failed to create new framer:", err) + } + if err := framer.WriteFrame(&synReplyFrame); err != nil { + t.Fatal("WriteFrame with compression:", err) + } + frame, err := framer.ReadFrame() + if err != nil { + t.Fatal("ReadFrame with compression:", err) + } + parsedSynReplyFrame, ok := frame.(*SynReplyFrame) + if !ok { + t.Fatal("Parsed incorrect frame type:", frame) + } + if !reflect.DeepEqual(synReplyFrame, *parsedSynReplyFrame) { + t.Fatal("got: ", *parsedSynReplyFrame, "\nwant: ", synReplyFrame) + } +} + +func TestCreateParseRstStream(t *testing.T) { + buffer := new(bytes.Buffer) + framer, err := NewFramer(buffer, buffer) + if err != nil { + t.Fatal("Failed to create new framer:", err) + } + rstStreamFrame := RstStreamFrame{ + CFHeader: ControlFrameHeader{ + version: Version, + frameType: TypeRstStream, + }, + StreamId: 1, + Status: InvalidStream, + } + if err := framer.WriteFrame(&rstStreamFrame); err != nil { + t.Fatal("WriteFrame:", err) + } + frame, err := framer.ReadFrame() + if err != nil { + t.Fatal("ReadFrame:", err) + } + parsedRstStreamFrame, ok := frame.(*RstStreamFrame) + if !ok { + t.Fatal("Parsed incorrect frame type:", frame) + } + if !reflect.DeepEqual(rstStreamFrame, *parsedRstStreamFrame) { + t.Fatal("got: ", *parsedRstStreamFrame, "\nwant: ", rstStreamFrame) + } +} + +func TestCreateParseSettings(t *testing.T) { + buffer := new(bytes.Buffer) + framer, err := NewFramer(buffer, buffer) + if err != nil { + t.Fatal("Failed to create new framer:", err) + } + settingsFrame := SettingsFrame{ + CFHeader: ControlFrameHeader{ + version: Version, + frameType: TypeSettings, + }, + FlagIdValues: []SettingsFlagIdValue{ + {FlagSettingsPersistValue, SettingsCurrentCwnd, 10}, + {FlagSettingsPersisted, SettingsUploadBandwidth, 1}, + }, + } + if err := framer.WriteFrame(&settingsFrame); err != nil { + t.Fatal("WriteFrame:", err) + } + frame, err := framer.ReadFrame() + if err != nil { + t.Fatal("ReadFrame:", err) + } + parsedSettingsFrame, ok := frame.(*SettingsFrame) + if !ok { + t.Fatal("Parsed incorrect frame type:", frame) + } + if !reflect.DeepEqual(settingsFrame, *parsedSettingsFrame) { + t.Fatal("got: ", *parsedSettingsFrame, "\nwant: ", settingsFrame) + } +} + +func TestCreateParsePing(t *testing.T) { + buffer := new(bytes.Buffer) + framer, err := NewFramer(buffer, buffer) + if err != nil { + t.Fatal("Failed to create new framer:", err) + } + pingFrame := PingFrame{ + CFHeader: ControlFrameHeader{ + version: Version, + frameType: TypePing, + }, + Id: 31337, + } + if err := framer.WriteFrame(&pingFrame); err != nil { + t.Fatal("WriteFrame:", err) + } + if pingFrame.CFHeader.Flags != 0 { + t.Fatal("Incorrect frame type:", pingFrame) + } + frame, err := framer.ReadFrame() + if err != nil { + t.Fatal("ReadFrame:", err) + } + parsedPingFrame, ok := frame.(*PingFrame) + if !ok { + t.Fatal("Parsed incorrect frame type:", frame) + } + if parsedPingFrame.CFHeader.Flags != 0 { + t.Fatal("Parsed incorrect frame type:", parsedPingFrame) + } + if !reflect.DeepEqual(pingFrame, *parsedPingFrame) { + t.Fatal("got: ", *parsedPingFrame, "\nwant: ", pingFrame) + } +} + +func TestCreateParseGoAway(t *testing.T) { + buffer := new(bytes.Buffer) + framer, err := NewFramer(buffer, buffer) + if err != nil { + t.Fatal("Failed to create new framer:", err) + } + goAwayFrame := GoAwayFrame{ + CFHeader: ControlFrameHeader{ + version: Version, + frameType: TypeGoAway, + }, + LastGoodStreamId: 31337, + Status: 1, + } + if err := framer.WriteFrame(&goAwayFrame); err != nil { + t.Fatal("WriteFrame:", err) + } + if goAwayFrame.CFHeader.Flags != 0 { + t.Fatal("Incorrect frame type:", goAwayFrame) + } + if goAwayFrame.CFHeader.length != 8 { + t.Fatal("Incorrect frame type:", goAwayFrame) + } + frame, err := framer.ReadFrame() + if err != nil { + t.Fatal("ReadFrame:", err) + } + parsedGoAwayFrame, ok := frame.(*GoAwayFrame) + if !ok { + t.Fatal("Parsed incorrect frame type:", frame) + } + if parsedGoAwayFrame.CFHeader.Flags != 0 { + t.Fatal("Incorrect frame type:", parsedGoAwayFrame) + } + if parsedGoAwayFrame.CFHeader.length != 8 { + t.Fatal("Incorrect frame type:", parsedGoAwayFrame) + } + if !reflect.DeepEqual(goAwayFrame, *parsedGoAwayFrame) { + t.Fatal("got: ", *parsedGoAwayFrame, "\nwant: ", goAwayFrame) + } +} + +func TestCreateParseHeadersFrame(t *testing.T) { + buffer := new(bytes.Buffer) + framer := &Framer{ + headerCompressionDisabled: true, + w: buffer, + headerBuf: new(bytes.Buffer), + r: buffer, + } + headersFrame := HeadersFrame{ + CFHeader: ControlFrameHeader{ + version: Version, + frameType: TypeHeaders, + }, + StreamId: 2, + } + headersFrame.Headers = HeadersFixture + if err := framer.WriteFrame(&headersFrame); err != nil { + t.Fatal("WriteFrame without compression:", err) + } + frame, err := framer.ReadFrame() + if err != nil { + t.Fatal("ReadFrame without compression:", err) + } + parsedHeadersFrame, ok := frame.(*HeadersFrame) + if !ok { + t.Fatal("Parsed incorrect frame type:", frame) + } + if !reflect.DeepEqual(headersFrame, *parsedHeadersFrame) { + t.Fatal("got: ", *parsedHeadersFrame, "\nwant: ", headersFrame) + } +} + +func TestCreateParseHeadersFrameCompressionEnable(t *testing.T) { + buffer := new(bytes.Buffer) + headersFrame := HeadersFrame{ + CFHeader: ControlFrameHeader{ + version: Version, + frameType: TypeHeaders, + }, + StreamId: 2, + } + headersFrame.Headers = HeadersFixture + + framer, err := NewFramer(buffer, buffer) + if err := framer.WriteFrame(&headersFrame); err != nil { + t.Fatal("WriteFrame with compression:", err) + } + frame, err := framer.ReadFrame() + if err != nil { + t.Fatal("ReadFrame with compression:", err) + } + parsedHeadersFrame, ok := frame.(*HeadersFrame) + if !ok { + t.Fatal("Parsed incorrect frame type:", frame) + } + if !reflect.DeepEqual(headersFrame, *parsedHeadersFrame) { + t.Fatal("got: ", *parsedHeadersFrame, "\nwant: ", headersFrame) + } +} + +func TestCreateParseWindowUpdateFrame(t *testing.T) { + buffer := new(bytes.Buffer) + framer, err := NewFramer(buffer, buffer) + if err != nil { + t.Fatal("Failed to create new framer:", err) + } + windowUpdateFrame := WindowUpdateFrame{ + CFHeader: ControlFrameHeader{ + version: Version, + frameType: TypeWindowUpdate, + }, + StreamId: 31337, + DeltaWindowSize: 1, + } + if err := framer.WriteFrame(&windowUpdateFrame); err != nil { + t.Fatal("WriteFrame:", err) + } + if windowUpdateFrame.CFHeader.Flags != 0 { + t.Fatal("Incorrect frame type:", windowUpdateFrame) + } + if windowUpdateFrame.CFHeader.length != 8 { + t.Fatal("Incorrect frame type:", windowUpdateFrame) + } + frame, err := framer.ReadFrame() + if err != nil { + t.Fatal("ReadFrame:", err) + } + parsedWindowUpdateFrame, ok := frame.(*WindowUpdateFrame) + if !ok { + t.Fatal("Parsed incorrect frame type:", frame) + } + if parsedWindowUpdateFrame.CFHeader.Flags != 0 { + t.Fatal("Incorrect frame type:", parsedWindowUpdateFrame) + } + if parsedWindowUpdateFrame.CFHeader.length != 8 { + t.Fatal("Incorrect frame type:", parsedWindowUpdateFrame) + } + if !reflect.DeepEqual(windowUpdateFrame, *parsedWindowUpdateFrame) { + t.Fatal("got: ", *parsedWindowUpdateFrame, "\nwant: ", windowUpdateFrame) + } +} + +func TestCreateParseDataFrame(t *testing.T) { + buffer := new(bytes.Buffer) + framer, err := NewFramer(buffer, buffer) + if err != nil { + t.Fatal("Failed to create new framer:", err) + } + dataFrame := DataFrame{ + StreamId: 1, + Data: []byte{'h', 'e', 'l', 'l', 'o'}, + } + if err := framer.WriteFrame(&dataFrame); err != nil { + t.Fatal("WriteFrame:", err) + } + frame, err := framer.ReadFrame() + if err != nil { + t.Fatal("ReadFrame:", err) + } + parsedDataFrame, ok := frame.(*DataFrame) + if !ok { + t.Fatal("Parsed incorrect frame type:", frame) + } + if !reflect.DeepEqual(dataFrame, *parsedDataFrame) { + t.Fatal("got: ", *parsedDataFrame, "\nwant: ", dataFrame) + } +} + +func TestCompressionContextAcrossFrames(t *testing.T) { + buffer := new(bytes.Buffer) + framer, err := NewFramer(buffer, buffer) + if err != nil { + t.Fatal("Failed to create new framer:", err) + } + headersFrame := HeadersFrame{ + CFHeader: ControlFrameHeader{ + version: Version, + frameType: TypeHeaders, + }, + StreamId: 2, + Headers: HeadersFixture, + } + if err := framer.WriteFrame(&headersFrame); err != nil { + t.Fatal("WriteFrame (HEADERS):", err) + } + synStreamFrame := SynStreamFrame{ + ControlFrameHeader{ + Version, + TypeSynStream, + 0, // Flags + 0, // length + }, + 2, // StreamId + 0, // AssociatedTOStreamID + 0, // Priority + 1, // Slot + nil, // Headers + } + synStreamFrame.Headers = HeadersFixture + + if err := framer.WriteFrame(&synStreamFrame); err != nil { + t.Fatal("WriteFrame (SYN_STREAM):", err) + } + frame, err := framer.ReadFrame() + if err != nil { + t.Fatal("ReadFrame (HEADERS):", err, buffer.Bytes()) + } + parsedHeadersFrame, ok := frame.(*HeadersFrame) + if !ok { + t.Fatalf("expected HeadersFrame; got %T %v", frame, frame) + } + if !reflect.DeepEqual(headersFrame, *parsedHeadersFrame) { + t.Fatal("got: ", *parsedHeadersFrame, "\nwant: ", headersFrame) + } + frame, err = framer.ReadFrame() + if err != nil { + t.Fatal("ReadFrame (SYN_STREAM):", err, buffer.Bytes()) + } + parsedSynStreamFrame, ok := frame.(*SynStreamFrame) + if !ok { + t.Fatalf("expected SynStreamFrame; got %T %v", frame, frame) + } + if !reflect.DeepEqual(synStreamFrame, *parsedSynStreamFrame) { + t.Fatal("got: ", *parsedSynStreamFrame, "\nwant: ", synStreamFrame) + } +} + +func TestMultipleSPDYFrames(t *testing.T) { + // Initialize the framers. + pr1, pw1 := io.Pipe() + pr2, pw2 := io.Pipe() + writer, err := NewFramer(pw1, pr2) + if err != nil { + t.Fatal("Failed to create writer:", err) + } + reader, err := NewFramer(pw2, pr1) + if err != nil { + t.Fatal("Failed to create reader:", err) + } + + // Set up the frames we're actually transferring. + headersFrame := HeadersFrame{ + CFHeader: ControlFrameHeader{ + version: Version, + frameType: TypeHeaders, + }, + StreamId: 2, + Headers: HeadersFixture, + } + synStreamFrame := SynStreamFrame{ + CFHeader: ControlFrameHeader{ + version: Version, + frameType: TypeSynStream, + }, + StreamId: 2, + Headers: HeadersFixture, + } + + // Start the goroutines to write the frames. + go func() { + if err := writer.WriteFrame(&headersFrame); err != nil { + t.Fatal("WriteFrame (HEADERS): ", err) + } + if err := writer.WriteFrame(&synStreamFrame); err != nil { + t.Fatal("WriteFrame (SYN_STREAM): ", err) + } + }() + + // Read the frames and verify they look as expected. + frame, err := reader.ReadFrame() + if err != nil { + t.Fatal("ReadFrame (HEADERS): ", err) + } + parsedHeadersFrame, ok := frame.(*HeadersFrame) + if !ok { + t.Fatal("Parsed incorrect frame type:", frame) + } + if !reflect.DeepEqual(headersFrame, *parsedHeadersFrame) { + t.Fatal("got: ", *parsedHeadersFrame, "\nwant: ", headersFrame) + } + frame, err = reader.ReadFrame() + if err != nil { + t.Fatal("ReadFrame (SYN_STREAM):", err) + } + parsedSynStreamFrame, ok := frame.(*SynStreamFrame) + if !ok { + t.Fatal("Parsed incorrect frame type.") + } + if !reflect.DeepEqual(synStreamFrame, *parsedSynStreamFrame) { + t.Fatal("got: ", *parsedSynStreamFrame, "\nwant: ", synStreamFrame) + } +} + +func TestReadMalformedZlibHeader(t *testing.T) { + // These were constructed by corrupting the first byte of the zlib + // header after writing. + malformedStructs := map[string]string{ + "SynStreamFrame": "gAIAAQAAABgAAAACAAAAAAAAF/nfolGyYmAAAAAA//8=", + "SynReplyFrame": "gAIAAgAAABQAAAACAAAX+d+iUbJiYAAAAAD//w==", + "HeadersFrame": "gAIACAAAABQAAAACAAAX+d+iUbJiYAAAAAD//w==", + } + for name, bad := range malformedStructs { + b, err := base64.StdEncoding.DecodeString(bad) + if err != nil { + t.Errorf("Unable to decode base64 encoded frame %s: %v", name, err) + } + buf := bytes.NewBuffer(b) + reader, err := NewFramer(buf, buf) + if err != nil { + t.Fatalf("NewFramer: %v", err) + } + _, err = reader.ReadFrame() + if err != zlib.ErrHeader { + t.Errorf("Frame %s, expected: %#v, actual: %#v", name, zlib.ErrHeader, err) + } + } +} + +// TODO: these tests are too weak for updating SPDY spec. Fix me. + +type zeroStream struct { + frame Frame + encoded string +} + +var streamIdZeroFrames = map[string]zeroStream{ + "SynStreamFrame": { + &SynStreamFrame{StreamId: 0}, + "gAIAAQAAABgAAAAAAAAAAAAAePnfolGyYmAAAAAA//8=", + }, + "SynReplyFrame": { + &SynReplyFrame{StreamId: 0}, + "gAIAAgAAABQAAAAAAAB4+d+iUbJiYAAAAAD//w==", + }, + "RstStreamFrame": { + &RstStreamFrame{StreamId: 0}, + "gAIAAwAAAAgAAAAAAAAAAA==", + }, + "HeadersFrame": { + &HeadersFrame{StreamId: 0}, + "gAIACAAAABQAAAAAAAB4+d+iUbJiYAAAAAD//w==", + }, + "DataFrame": { + &DataFrame{StreamId: 0}, + "AAAAAAAAAAA=", + }, + "PingFrame": { + &PingFrame{Id: 0}, + "gAIABgAAAAQAAAAA", + }, +} + +func TestNoZeroStreamId(t *testing.T) { + t.Log("skipping") // TODO: update to work with SPDY3 + return + + for name, f := range streamIdZeroFrames { + b, err := base64.StdEncoding.DecodeString(f.encoded) + if err != nil { + t.Errorf("Unable to decode base64 encoded frame %s: %v", f, err) + continue + } + framer, err := NewFramer(ioutil.Discard, bytes.NewReader(b)) + if err != nil { + t.Fatalf("NewFramer: %v", err) + } + err = framer.WriteFrame(f.frame) + checkZeroStreamId(t, name, "WriteFrame", err) + + _, err = framer.ReadFrame() + checkZeroStreamId(t, name, "ReadFrame", err) + } +} + +func checkZeroStreamId(t *testing.T, frame string, method string, err error) { + if err == nil { + t.Errorf("%s ZeroStreamId, no error on %s", method, frame) + return + } + eerr, ok := err.(*Error) + if !ok || eerr.Err != ZeroStreamId { + t.Errorf("%s ZeroStreamId, incorrect error %#v, frame %s", method, eerr, frame) + } +} diff --git a/vendor/github.com/docker/spdystream/spdy/types.go b/vendor/github.com/docker/spdystream/spdy/types.go new file mode 100644 index 000000000..7b6ee9c6f --- /dev/null +++ b/vendor/github.com/docker/spdystream/spdy/types.go @@ -0,0 +1,275 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package spdy implements the SPDY protocol (currently SPDY/3), described in +// http://www.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3. +package spdy + +import ( + "bytes" + "compress/zlib" + "io" + "net/http" +) + +// Version is the protocol version number that this package implements. +const Version = 3 + +// ControlFrameType stores the type field in a control frame header. +type ControlFrameType uint16 + +const ( + TypeSynStream ControlFrameType = 0x0001 + TypeSynReply = 0x0002 + TypeRstStream = 0x0003 + TypeSettings = 0x0004 + TypePing = 0x0006 + TypeGoAway = 0x0007 + TypeHeaders = 0x0008 + TypeWindowUpdate = 0x0009 +) + +// ControlFlags are the flags that can be set on a control frame. +type ControlFlags uint8 + +const ( + ControlFlagFin ControlFlags = 0x01 + ControlFlagUnidirectional = 0x02 + ControlFlagSettingsClearSettings = 0x01 +) + +// DataFlags are the flags that can be set on a data frame. +type DataFlags uint8 + +const ( + DataFlagFin DataFlags = 0x01 +) + +// MaxDataLength is the maximum number of bytes that can be stored in one frame. +const MaxDataLength = 1<<24 - 1 + +// headerValueSepator separates multiple header values. +const headerValueSeparator = "\x00" + +// Frame is a single SPDY frame in its unpacked in-memory representation. Use +// Framer to read and write it. +type Frame interface { + write(f *Framer) error +} + +// ControlFrameHeader contains all the fields in a control frame header, +// in its unpacked in-memory representation. +type ControlFrameHeader struct { + // Note, high bit is the "Control" bit. + version uint16 // spdy version number + frameType ControlFrameType + Flags ControlFlags + length uint32 // length of data field +} + +type controlFrame interface { + Frame + read(h ControlFrameHeader, f *Framer) error +} + +// StreamId represents a 31-bit value identifying the stream. +type StreamId uint32 + +// SynStreamFrame is the unpacked, in-memory representation of a SYN_STREAM +// frame. +type SynStreamFrame struct { + CFHeader ControlFrameHeader + StreamId StreamId + AssociatedToStreamId StreamId // stream id for a stream which this stream is associated to + Priority uint8 // priority of this frame (3-bit) + Slot uint8 // index in the server's credential vector of the client certificate + Headers http.Header +} + +// SynReplyFrame is the unpacked, in-memory representation of a SYN_REPLY frame. +type SynReplyFrame struct { + CFHeader ControlFrameHeader + StreamId StreamId + Headers http.Header +} + +// RstStreamStatus represents the status that led to a RST_STREAM. +type RstStreamStatus uint32 + +const ( + ProtocolError RstStreamStatus = iota + 1 + InvalidStream + RefusedStream + UnsupportedVersion + Cancel + InternalError + FlowControlError + StreamInUse + StreamAlreadyClosed + InvalidCredentials + FrameTooLarge +) + +// RstStreamFrame is the unpacked, in-memory representation of a RST_STREAM +// frame. +type RstStreamFrame struct { + CFHeader ControlFrameHeader + StreamId StreamId + Status RstStreamStatus +} + +// SettingsFlag represents a flag in a SETTINGS frame. +type SettingsFlag uint8 + +const ( + FlagSettingsPersistValue SettingsFlag = 0x1 + FlagSettingsPersisted = 0x2 +) + +// SettingsFlag represents the id of an id/value pair in a SETTINGS frame. +type SettingsId uint32 + +const ( + SettingsUploadBandwidth SettingsId = iota + 1 + SettingsDownloadBandwidth + SettingsRoundTripTime + SettingsMaxConcurrentStreams + SettingsCurrentCwnd + SettingsDownloadRetransRate + SettingsInitialWindowSize + SettingsClientCretificateVectorSize +) + +// SettingsFlagIdValue is the unpacked, in-memory representation of the +// combined flag/id/value for a setting in a SETTINGS frame. +type SettingsFlagIdValue struct { + Flag SettingsFlag + Id SettingsId + Value uint32 +} + +// SettingsFrame is the unpacked, in-memory representation of a SPDY +// SETTINGS frame. +type SettingsFrame struct { + CFHeader ControlFrameHeader + FlagIdValues []SettingsFlagIdValue +} + +// PingFrame is the unpacked, in-memory representation of a PING frame. +type PingFrame struct { + CFHeader ControlFrameHeader + Id uint32 // unique id for this ping, from server is even, from client is odd. +} + +// GoAwayStatus represents the status in a GoAwayFrame. +type GoAwayStatus uint32 + +const ( + GoAwayOK GoAwayStatus = iota + GoAwayProtocolError + GoAwayInternalError +) + +// GoAwayFrame is the unpacked, in-memory representation of a GOAWAY frame. +type GoAwayFrame struct { + CFHeader ControlFrameHeader + LastGoodStreamId StreamId // last stream id which was accepted by sender + Status GoAwayStatus +} + +// HeadersFrame is the unpacked, in-memory representation of a HEADERS frame. +type HeadersFrame struct { + CFHeader ControlFrameHeader + StreamId StreamId + Headers http.Header +} + +// WindowUpdateFrame is the unpacked, in-memory representation of a +// WINDOW_UPDATE frame. +type WindowUpdateFrame struct { + CFHeader ControlFrameHeader + StreamId StreamId + DeltaWindowSize uint32 // additional number of bytes to existing window size +} + +// TODO: Implement credential frame and related methods. + +// DataFrame is the unpacked, in-memory representation of a DATA frame. +type DataFrame struct { + // Note, high bit is the "Control" bit. Should be 0 for data frames. + StreamId StreamId + Flags DataFlags + Data []byte // payload data of this frame +} + +// A SPDY specific error. +type ErrorCode string + +const ( + UnlowercasedHeaderName ErrorCode = "header was not lowercased" + DuplicateHeaders = "multiple headers with same name" + WrongCompressedPayloadSize = "compressed payload size was incorrect" + UnknownFrameType = "unknown frame type" + InvalidControlFrame = "invalid control frame" + InvalidDataFrame = "invalid data frame" + InvalidHeaderPresent = "frame contained invalid header" + ZeroStreamId = "stream id zero is disallowed" +) + +// Error contains both the type of error and additional values. StreamId is 0 +// if Error is not associated with a stream. +type Error struct { + Err ErrorCode + StreamId StreamId +} + +func (e *Error) Error() string { + return string(e.Err) +} + +var invalidReqHeaders = map[string]bool{ + "Connection": true, + "Host": true, + "Keep-Alive": true, + "Proxy-Connection": true, + "Transfer-Encoding": true, +} + +var invalidRespHeaders = map[string]bool{ + "Connection": true, + "Keep-Alive": true, + "Proxy-Connection": true, + "Transfer-Encoding": true, +} + +// Framer handles serializing/deserializing SPDY frames, including compressing/ +// decompressing payloads. +type Framer struct { + headerCompressionDisabled bool + w io.Writer + headerBuf *bytes.Buffer + headerCompressor *zlib.Writer + r io.Reader + headerReader io.LimitedReader + headerDecompressor io.ReadCloser +} + +// NewFramer allocates a new Framer for a given SPDY connection, represented by +// a io.Writer and io.Reader. Note that Framer will read and write individual fields +// from/to the Reader and Writer, so the caller should pass in an appropriately +// buffered implementation to optimize performance. +func NewFramer(w io.Writer, r io.Reader) (*Framer, error) { + compressBuf := new(bytes.Buffer) + compressor, err := zlib.NewWriterLevelDict(compressBuf, zlib.BestCompression, []byte(headerDictionary)) + if err != nil { + return nil, err + } + framer := &Framer{ + w: w, + headerBuf: compressBuf, + headerCompressor: compressor, + r: r, + } + return framer, nil +} diff --git a/vendor/github.com/docker/spdystream/spdy/write.go b/vendor/github.com/docker/spdystream/spdy/write.go new file mode 100644 index 000000000..b212f66a2 --- /dev/null +++ b/vendor/github.com/docker/spdystream/spdy/write.go @@ -0,0 +1,318 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package spdy + +import ( + "encoding/binary" + "io" + "net/http" + "strings" +) + +func (frame *SynStreamFrame) write(f *Framer) error { + return f.writeSynStreamFrame(frame) +} + +func (frame *SynReplyFrame) write(f *Framer) error { + return f.writeSynReplyFrame(frame) +} + +func (frame *RstStreamFrame) write(f *Framer) (err error) { + if frame.StreamId == 0 { + return &Error{ZeroStreamId, 0} + } + frame.CFHeader.version = Version + frame.CFHeader.frameType = TypeRstStream + frame.CFHeader.Flags = 0 + frame.CFHeader.length = 8 + + // Serialize frame to Writer. + if err = writeControlFrameHeader(f.w, frame.CFHeader); err != nil { + return + } + if err = binary.Write(f.w, binary.BigEndian, frame.StreamId); err != nil { + return + } + if frame.Status == 0 { + return &Error{InvalidControlFrame, frame.StreamId} + } + if err = binary.Write(f.w, binary.BigEndian, frame.Status); err != nil { + return + } + return +} + +func (frame *SettingsFrame) write(f *Framer) (err error) { + frame.CFHeader.version = Version + frame.CFHeader.frameType = TypeSettings + frame.CFHeader.length = uint32(len(frame.FlagIdValues)*8 + 4) + + // Serialize frame to Writer. + if err = writeControlFrameHeader(f.w, frame.CFHeader); err != nil { + return + } + if err = binary.Write(f.w, binary.BigEndian, uint32(len(frame.FlagIdValues))); err != nil { + return + } + for _, flagIdValue := range frame.FlagIdValues { + flagId := uint32(flagIdValue.Flag)<<24 | uint32(flagIdValue.Id) + if err = binary.Write(f.w, binary.BigEndian, flagId); err != nil { + return + } + if err = binary.Write(f.w, binary.BigEndian, flagIdValue.Value); err != nil { + return + } + } + return +} + +func (frame *PingFrame) write(f *Framer) (err error) { + if frame.Id == 0 { + return &Error{ZeroStreamId, 0} + } + frame.CFHeader.version = Version + frame.CFHeader.frameType = TypePing + frame.CFHeader.Flags = 0 + frame.CFHeader.length = 4 + + // Serialize frame to Writer. + if err = writeControlFrameHeader(f.w, frame.CFHeader); err != nil { + return + } + if err = binary.Write(f.w, binary.BigEndian, frame.Id); err != nil { + return + } + return +} + +func (frame *GoAwayFrame) write(f *Framer) (err error) { + frame.CFHeader.version = Version + frame.CFHeader.frameType = TypeGoAway + frame.CFHeader.Flags = 0 + frame.CFHeader.length = 8 + + // Serialize frame to Writer. + if err = writeControlFrameHeader(f.w, frame.CFHeader); err != nil { + return + } + if err = binary.Write(f.w, binary.BigEndian, frame.LastGoodStreamId); err != nil { + return + } + if err = binary.Write(f.w, binary.BigEndian, frame.Status); err != nil { + return + } + return nil +} + +func (frame *HeadersFrame) write(f *Framer) error { + return f.writeHeadersFrame(frame) +} + +func (frame *WindowUpdateFrame) write(f *Framer) (err error) { + frame.CFHeader.version = Version + frame.CFHeader.frameType = TypeWindowUpdate + frame.CFHeader.Flags = 0 + frame.CFHeader.length = 8 + + // Serialize frame to Writer. + if err = writeControlFrameHeader(f.w, frame.CFHeader); err != nil { + return + } + if err = binary.Write(f.w, binary.BigEndian, frame.StreamId); err != nil { + return + } + if err = binary.Write(f.w, binary.BigEndian, frame.DeltaWindowSize); err != nil { + return + } + return nil +} + +func (frame *DataFrame) write(f *Framer) error { + return f.writeDataFrame(frame) +} + +// WriteFrame writes a frame. +func (f *Framer) WriteFrame(frame Frame) error { + return frame.write(f) +} + +func writeControlFrameHeader(w io.Writer, h ControlFrameHeader) error { + if err := binary.Write(w, binary.BigEndian, 0x8000|h.version); err != nil { + return err + } + if err := binary.Write(w, binary.BigEndian, h.frameType); err != nil { + return err + } + flagsAndLength := uint32(h.Flags)<<24 | h.length + if err := binary.Write(w, binary.BigEndian, flagsAndLength); err != nil { + return err + } + return nil +} + +func writeHeaderValueBlock(w io.Writer, h http.Header) (n int, err error) { + n = 0 + if err = binary.Write(w, binary.BigEndian, uint32(len(h))); err != nil { + return + } + n += 2 + for name, values := range h { + if err = binary.Write(w, binary.BigEndian, uint32(len(name))); err != nil { + return + } + n += 2 + name = strings.ToLower(name) + if _, err = io.WriteString(w, name); err != nil { + return + } + n += len(name) + v := strings.Join(values, headerValueSeparator) + if err = binary.Write(w, binary.BigEndian, uint32(len(v))); err != nil { + return + } + n += 2 + if _, err = io.WriteString(w, v); err != nil { + return + } + n += len(v) + } + return +} + +func (f *Framer) writeSynStreamFrame(frame *SynStreamFrame) (err error) { + if frame.StreamId == 0 { + return &Error{ZeroStreamId, 0} + } + // Marshal the headers. + var writer io.Writer = f.headerBuf + if !f.headerCompressionDisabled { + writer = f.headerCompressor + } + if _, err = writeHeaderValueBlock(writer, frame.Headers); err != nil { + return + } + if !f.headerCompressionDisabled { + f.headerCompressor.Flush() + } + + // Set ControlFrameHeader. + frame.CFHeader.version = Version + frame.CFHeader.frameType = TypeSynStream + frame.CFHeader.length = uint32(len(f.headerBuf.Bytes()) + 10) + + // Serialize frame to Writer. + if err = writeControlFrameHeader(f.w, frame.CFHeader); err != nil { + return err + } + if err = binary.Write(f.w, binary.BigEndian, frame.StreamId); err != nil { + return err + } + if err = binary.Write(f.w, binary.BigEndian, frame.AssociatedToStreamId); err != nil { + return err + } + if err = binary.Write(f.w, binary.BigEndian, frame.Priority<<5); err != nil { + return err + } + if err = binary.Write(f.w, binary.BigEndian, frame.Slot); err != nil { + return err + } + if _, err = f.w.Write(f.headerBuf.Bytes()); err != nil { + return err + } + f.headerBuf.Reset() + return nil +} + +func (f *Framer) writeSynReplyFrame(frame *SynReplyFrame) (err error) { + if frame.StreamId == 0 { + return &Error{ZeroStreamId, 0} + } + // Marshal the headers. + var writer io.Writer = f.headerBuf + if !f.headerCompressionDisabled { + writer = f.headerCompressor + } + if _, err = writeHeaderValueBlock(writer, frame.Headers); err != nil { + return + } + if !f.headerCompressionDisabled { + f.headerCompressor.Flush() + } + + // Set ControlFrameHeader. + frame.CFHeader.version = Version + frame.CFHeader.frameType = TypeSynReply + frame.CFHeader.length = uint32(len(f.headerBuf.Bytes()) + 4) + + // Serialize frame to Writer. + if err = writeControlFrameHeader(f.w, frame.CFHeader); err != nil { + return + } + if err = binary.Write(f.w, binary.BigEndian, frame.StreamId); err != nil { + return + } + if _, err = f.w.Write(f.headerBuf.Bytes()); err != nil { + return + } + f.headerBuf.Reset() + return +} + +func (f *Framer) writeHeadersFrame(frame *HeadersFrame) (err error) { + if frame.StreamId == 0 { + return &Error{ZeroStreamId, 0} + } + // Marshal the headers. + var writer io.Writer = f.headerBuf + if !f.headerCompressionDisabled { + writer = f.headerCompressor + } + if _, err = writeHeaderValueBlock(writer, frame.Headers); err != nil { + return + } + if !f.headerCompressionDisabled { + f.headerCompressor.Flush() + } + + // Set ControlFrameHeader. + frame.CFHeader.version = Version + frame.CFHeader.frameType = TypeHeaders + frame.CFHeader.length = uint32(len(f.headerBuf.Bytes()) + 4) + + // Serialize frame to Writer. + if err = writeControlFrameHeader(f.w, frame.CFHeader); err != nil { + return + } + if err = binary.Write(f.w, binary.BigEndian, frame.StreamId); err != nil { + return + } + if _, err = f.w.Write(f.headerBuf.Bytes()); err != nil { + return + } + f.headerBuf.Reset() + return +} + +func (f *Framer) writeDataFrame(frame *DataFrame) (err error) { + if frame.StreamId == 0 { + return &Error{ZeroStreamId, 0} + } + if frame.StreamId&0x80000000 != 0 || len(frame.Data) > MaxDataLength { + return &Error{InvalidDataFrame, frame.StreamId} + } + + // Serialize frame to Writer. + if err = binary.Write(f.w, binary.BigEndian, frame.StreamId); err != nil { + return + } + flagsAndLength := uint32(frame.Flags)<<24 | uint32(len(frame.Data)) + if err = binary.Write(f.w, binary.BigEndian, flagsAndLength); err != nil { + return + } + if _, err = f.w.Write(frame.Data); err != nil { + return + } + return nil +} diff --git a/vendor/github.com/docker/spdystream/spdy_bench_test.go b/vendor/github.com/docker/spdystream/spdy_bench_test.go new file mode 100644 index 000000000..6f9e49101 --- /dev/null +++ b/vendor/github.com/docker/spdystream/spdy_bench_test.go @@ -0,0 +1,113 @@ +package spdystream + +import ( + "fmt" + "io" + "net" + "net/http" + "sync" + "testing" +) + +func configureServer() (io.Closer, string, *sync.WaitGroup) { + authenticated = true + wg := &sync.WaitGroup{} + server, listen, serverErr := runServer(wg) + + if serverErr != nil { + panic(serverErr) + } + + return server, listen, wg +} + +func BenchmarkDial10000(b *testing.B) { + server, addr, wg := configureServer() + + defer func() { + server.Close() + wg.Wait() + }() + + for i := 0; i < b.N; i++ { + conn, dialErr := net.Dial("tcp", addr) + if dialErr != nil { + panic(fmt.Sprintf("Error dialing server: %s", dialErr)) + } + conn.Close() + } +} + +func BenchmarkDialWithSPDYStream10000(b *testing.B) { + server, addr, wg := configureServer() + + defer func() { + server.Close() + wg.Wait() + }() + + for i := 0; i < b.N; i++ { + conn, dialErr := net.Dial("tcp", addr) + if dialErr != nil { + b.Fatalf("Error dialing server: %s", dialErr) + } + + spdyConn, spdyErr := NewConnection(conn, false) + if spdyErr != nil { + b.Fatalf("Error creating spdy connection: %s", spdyErr) + } + go spdyConn.Serve(NoOpStreamHandler) + + closeErr := spdyConn.Close() + if closeErr != nil { + b.Fatalf("Error closing connection: %s, closeErr") + } + } +} + +func benchmarkStreamWithDataAndSize(size uint64, b *testing.B) { + server, addr, wg := configureServer() + + defer func() { + server.Close() + wg.Wait() + }() + + for i := 0; i < b.N; i++ { + conn, dialErr := net.Dial("tcp", addr) + if dialErr != nil { + b.Fatalf("Error dialing server: %s", dialErr) + } + + spdyConn, spdyErr := NewConnection(conn, false) + if spdyErr != nil { + b.Fatalf("Error creating spdy connection: %s", spdyErr) + } + + go spdyConn.Serve(MirrorStreamHandler) + + stream, err := spdyConn.CreateStream(http.Header{}, nil, false) + + writer := make([]byte, size) + + stream.Write(writer) + + if err != nil { + panic(err) + } + + reader := make([]byte, size) + stream.Read(reader) + + stream.Close() + + closeErr := spdyConn.Close() + if closeErr != nil { + b.Fatalf("Error closing connection: %s, closeErr") + } + } +} + +func BenchmarkStreamWith1Byte10000(b *testing.B) { benchmarkStreamWithDataAndSize(1, b) } +func BenchmarkStreamWith1KiloByte10000(b *testing.B) { benchmarkStreamWithDataAndSize(1024, b) } +func BenchmarkStreamWith1Megabyte10000(b *testing.B) { benchmarkStreamWithDataAndSize(1024*1024, b) } diff --git a/vendor/github.com/docker/spdystream/spdy_test.go b/vendor/github.com/docker/spdystream/spdy_test.go new file mode 100644 index 000000000..7f0e3a448 --- /dev/null +++ b/vendor/github.com/docker/spdystream/spdy_test.go @@ -0,0 +1,1171 @@ +package spdystream + +import ( + "bufio" + "bytes" + "fmt" + "io" + "io/ioutil" + "net" + "net/http" + "net/http/httptest" + "sync" + "testing" + "time" + + "github.com/docker/spdystream/spdy" +) + +func TestSpdyStreams(t *testing.T) { + var wg sync.WaitGroup + server, listen, serverErr := runServer(&wg) + if serverErr != nil { + t.Fatalf("Error initializing server: %s", serverErr) + } + + conn, dialErr := net.Dial("tcp", listen) + if dialErr != nil { + t.Fatalf("Error dialing server: %s", dialErr) + } + + spdyConn, spdyErr := NewConnection(conn, false) + if spdyErr != nil { + t.Fatalf("Error creating spdy connection: %s", spdyErr) + } + go spdyConn.Serve(NoOpStreamHandler) + + authenticated = true + stream, streamErr := spdyConn.CreateStream(http.Header{}, nil, false) + if streamErr != nil { + t.Fatalf("Error creating stream: %s", streamErr) + } + + waitErr := stream.Wait() + if waitErr != nil { + t.Fatalf("Error waiting for stream: %s", waitErr) + } + + message := []byte("hello") + writeErr := stream.WriteData(message, false) + if writeErr != nil { + t.Fatalf("Error writing data") + } + + buf := make([]byte, 10) + n, readErr := stream.Read(buf) + if readErr != nil { + t.Fatalf("Error reading data from stream: %s", readErr) + } + if n != 5 { + t.Fatalf("Unexpected number of bytes read:\nActual: %d\nExpected: 5", n) + } + if bytes.Compare(buf[:n], message) != 0 { + t.Fatalf("Did not receive expected message:\nActual: %s\nExpectd: %s", buf, message) + } + + headers := http.Header{ + "TestKey": []string{"TestVal"}, + } + sendErr := stream.SendHeader(headers, false) + if sendErr != nil { + t.Fatalf("Error sending headers: %s", sendErr) + } + receiveHeaders, receiveErr := stream.ReceiveHeader() + if receiveErr != nil { + t.Fatalf("Error receiving headers: %s", receiveErr) + } + if len(receiveHeaders) != 1 { + t.Fatalf("Unexpected number of headers:\nActual: %d\nExpecting:%d", len(receiveHeaders), 1) + } + testVal := receiveHeaders.Get("TestKey") + if testVal != "TestVal" { + t.Fatalf("Wrong test value:\nActual: %q\nExpecting: %q", testVal, "TestVal") + } + + writeErr = stream.WriteData(message, true) + if writeErr != nil { + t.Fatalf("Error writing data") + } + + smallBuf := make([]byte, 3) + n, readErr = stream.Read(smallBuf) + if readErr != nil { + t.Fatalf("Error reading data from stream: %s", readErr) + } + if n != 3 { + t.Fatalf("Unexpected number of bytes read:\nActual: %d\nExpected: 3", n) + } + if bytes.Compare(smallBuf[:n], []byte("hel")) != 0 { + t.Fatalf("Did not receive expected message:\nActual: %s\nExpectd: %s", smallBuf[:n], message) + } + n, readErr = stream.Read(smallBuf) + if readErr != nil { + t.Fatalf("Error reading data from stream: %s", readErr) + } + if n != 2 { + t.Fatalf("Unexpected number of bytes read:\nActual: %d\nExpected: 2", n) + } + if bytes.Compare(smallBuf[:n], []byte("lo")) != 0 { + t.Fatalf("Did not receive expected message:\nActual: %s\nExpected: lo", smallBuf[:n]) + } + + n, readErr = stream.Read(buf) + if readErr != io.EOF { + t.Fatalf("Expected EOF reading from finished stream, read %d bytes", n) + } + + // Closing again should return error since stream is already closed + streamCloseErr := stream.Close() + if streamCloseErr == nil { + t.Fatalf("No error closing finished stream") + } + if streamCloseErr != ErrWriteClosedStream { + t.Fatalf("Unexpected error closing stream: %s", streamCloseErr) + } + + streamResetErr := stream.Reset() + if streamResetErr != nil { + t.Fatalf("Error reseting stream: %s", streamResetErr) + } + + authenticated = false + badStream, badStreamErr := spdyConn.CreateStream(http.Header{}, nil, false) + if badStreamErr != nil { + t.Fatalf("Error creating stream: %s", badStreamErr) + } + + waitErr = badStream.Wait() + if waitErr == nil { + t.Fatalf("Did not receive error creating stream") + } + if waitErr != ErrReset { + t.Fatalf("Unexpected error creating stream: %s", waitErr) + } + streamCloseErr = badStream.Close() + if streamCloseErr == nil { + t.Fatalf("No error closing bad stream") + } + + spdyCloseErr := spdyConn.Close() + if spdyCloseErr != nil { + t.Fatalf("Error closing spdy connection: %s", spdyCloseErr) + } + + closeErr := server.Close() + if closeErr != nil { + t.Fatalf("Error shutting down server: %s", closeErr) + } + wg.Wait() +} + +func TestPing(t *testing.T) { + var wg sync.WaitGroup + server, listen, serverErr := runServer(&wg) + if serverErr != nil { + t.Fatalf("Error initializing server: %s", serverErr) + } + + conn, dialErr := net.Dial("tcp", listen) + if dialErr != nil { + t.Fatalf("Error dialing server: %s", dialErr) + } + + spdyConn, spdyErr := NewConnection(conn, false) + if spdyErr != nil { + t.Fatalf("Error creating spdy connection: %s", spdyErr) + } + go spdyConn.Serve(NoOpStreamHandler) + + pingTime, pingErr := spdyConn.Ping() + if pingErr != nil { + t.Fatalf("Error pinging server: %s", pingErr) + } + if pingTime == time.Duration(0) { + t.Fatalf("Expecting non-zero ping time") + } + + closeErr := server.Close() + if closeErr != nil { + t.Fatalf("Error shutting down server: %s", closeErr) + } + wg.Wait() +} + +func TestHalfClose(t *testing.T) { + var wg sync.WaitGroup + server, listen, serverErr := runServer(&wg) + if serverErr != nil { + t.Fatalf("Error initializing server: %s", serverErr) + } + + conn, dialErr := net.Dial("tcp", listen) + if dialErr != nil { + t.Fatalf("Error dialing server: %s", dialErr) + } + + spdyConn, spdyErr := NewConnection(conn, false) + if spdyErr != nil { + t.Fatalf("Error creating spdy connection: %s", spdyErr) + } + go spdyConn.Serve(NoOpStreamHandler) + + authenticated = true + stream, streamErr := spdyConn.CreateStream(http.Header{}, nil, false) + if streamErr != nil { + t.Fatalf("Error creating stream: %s", streamErr) + } + + waitErr := stream.Wait() + if waitErr != nil { + t.Fatalf("Error waiting for stream: %s", waitErr) + } + + message := []byte("hello and will read after close") + writeErr := stream.WriteData(message, false) + if writeErr != nil { + t.Fatalf("Error writing data") + } + + streamCloseErr := stream.Close() + if streamCloseErr != nil { + t.Fatalf("Error closing stream: %s", streamCloseErr) + } + + buf := make([]byte, 40) + n, readErr := stream.Read(buf) + if readErr != nil { + t.Fatalf("Error reading data from stream: %s", readErr) + } + if n != 31 { + t.Fatalf("Unexpected number of bytes read:\nActual: %d\nExpected: 5", n) + } + if bytes.Compare(buf[:n], message) != 0 { + t.Fatalf("Did not receive expected message:\nActual: %s\nExpectd: %s", buf, message) + } + + spdyCloseErr := spdyConn.Close() + if spdyCloseErr != nil { + t.Fatalf("Error closing spdy connection: %s", spdyCloseErr) + } + + closeErr := server.Close() + if closeErr != nil { + t.Fatalf("Error shutting down server: %s", closeErr) + } + wg.Wait() +} + +func TestUnexpectedRemoteConnectionClosed(t *testing.T) { + tt := []struct { + closeReceiver bool + closeSender bool + }{ + {closeReceiver: true, closeSender: false}, + {closeReceiver: false, closeSender: true}, + {closeReceiver: false, closeSender: false}, + } + for tix, tc := range tt { + listener, listenErr := net.Listen("tcp", "localhost:0") + if listenErr != nil { + t.Fatalf("Error listening: %v", listenErr) + } + + var serverConn net.Conn + var connErr error + go func() { + serverConn, connErr = listener.Accept() + if connErr != nil { + t.Fatalf("Error accepting: %v", connErr) + } + + serverSpdyConn, _ := NewConnection(serverConn, true) + go serverSpdyConn.Serve(func(stream *Stream) { + stream.SendReply(http.Header{}, tc.closeSender) + }) + }() + + conn, dialErr := net.Dial("tcp", listener.Addr().String()) + if dialErr != nil { + t.Fatalf("Error dialing server: %s", dialErr) + } + + spdyConn, spdyErr := NewConnection(conn, false) + if spdyErr != nil { + t.Fatalf("Error creating spdy connection: %s", spdyErr) + } + go spdyConn.Serve(NoOpStreamHandler) + + authenticated = true + stream, streamErr := spdyConn.CreateStream(http.Header{}, nil, false) + if streamErr != nil { + t.Fatalf("Error creating stream: %s", streamErr) + } + + waitErr := stream.Wait() + if waitErr != nil { + t.Fatalf("Error waiting for stream: %s", waitErr) + } + + if tc.closeReceiver { + // make stream half closed, receive only + stream.Close() + } + + streamch := make(chan error, 1) + go func() { + b := make([]byte, 1) + _, err := stream.Read(b) + streamch <- err + }() + + closeErr := serverConn.Close() + if closeErr != nil { + t.Fatalf("Error shutting down server: %s", closeErr) + } + + select { + case e := <-streamch: + if e == nil || e != io.EOF { + t.Fatalf("(%d) Expected to get an EOF stream error", tix) + } + } + + closeErr = conn.Close() + if closeErr != nil { + t.Fatalf("Error closing client connection: %s", closeErr) + } + + listenErr = listener.Close() + if listenErr != nil { + t.Fatalf("Error closing listener: %s", listenErr) + } + } +} + +func TestCloseNotification(t *testing.T) { + listener, listenErr := net.Listen("tcp", "localhost:0") + if listenErr != nil { + t.Fatalf("Error listening: %v", listenErr) + } + listen := listener.Addr().String() + + serverConnChan := make(chan net.Conn) + go func() { + serverConn, err := listener.Accept() + if err != nil { + t.Fatalf("Error accepting: %v", err) + } + + serverSpdyConn, err := NewConnection(serverConn, true) + if err != nil { + t.Fatalf("Error creating server connection: %v", err) + } + go serverSpdyConn.Serve(NoOpStreamHandler) + <-serverSpdyConn.CloseChan() + serverConnChan <- serverConn + }() + + conn, dialErr := net.Dial("tcp", listen) + if dialErr != nil { + t.Fatalf("Error dialing server: %s", dialErr) + } + + spdyConn, spdyErr := NewConnection(conn, false) + if spdyErr != nil { + t.Fatalf("Error creating spdy connection: %s", spdyErr) + } + go spdyConn.Serve(NoOpStreamHandler) + + // close client conn + err := conn.Close() + if err != nil { + t.Fatalf("Error closing client connection: %v", err) + } + + var serverConn net.Conn + select { + case serverConn = <-serverConnChan: + } + + err = serverConn.Close() + if err != nil { + t.Fatalf("Error closing serverConn: %v", err) + } + + listenErr = listener.Close() + if listenErr != nil { + t.Fatalf("Error closing listener: %s", listenErr) + } +} + +func TestIdleShutdownRace(t *testing.T) { + var wg sync.WaitGroup + server, listen, serverErr := runServer(&wg) + if serverErr != nil { + t.Fatalf("Error initializing server: %s", serverErr) + } + + conn, dialErr := net.Dial("tcp", listen) + if dialErr != nil { + t.Fatalf("Error dialing server: %s", dialErr) + } + + spdyConn, spdyErr := NewConnection(conn, false) + if spdyErr != nil { + t.Fatalf("Error creating spdy connection: %s", spdyErr) + } + go spdyConn.Serve(NoOpStreamHandler) + + authenticated = true + stream, err := spdyConn.CreateStream(http.Header{}, nil, false) + if err != nil { + t.Fatalf("Error creating stream: %v", err) + } + + spdyConn.SetIdleTimeout(5 * time.Millisecond) + go func() { + time.Sleep(5 * time.Millisecond) + stream.Reset() + }() + + select { + case <-spdyConn.CloseChan(): + case <-time.After(20 * time.Millisecond): + t.Fatal("Timed out waiting for idle connection closure") + } + + closeErr := server.Close() + if closeErr != nil { + t.Fatalf("Error shutting down server: %s", closeErr) + } + wg.Wait() +} + +func TestIdleNoTimeoutSet(t *testing.T) { + var wg sync.WaitGroup + server, listen, serverErr := runServer(&wg) + if serverErr != nil { + t.Fatalf("Error initializing server: %s", serverErr) + } + + conn, dialErr := net.Dial("tcp", listen) + if dialErr != nil { + t.Fatalf("Error dialing server: %s", dialErr) + } + + spdyConn, spdyErr := NewConnection(conn, false) + if spdyErr != nil { + t.Fatalf("Error creating spdy connection: %s", spdyErr) + } + go spdyConn.Serve(NoOpStreamHandler) + + select { + case <-spdyConn.CloseChan(): + t.Fatal("Unexpected connection closure") + case <-time.After(10 * time.Millisecond): + } + + closeErr := server.Close() + if closeErr != nil { + t.Fatalf("Error shutting down server: %s", closeErr) + } + wg.Wait() +} + +func TestIdleClearTimeout(t *testing.T) { + var wg sync.WaitGroup + server, listen, serverErr := runServer(&wg) + if serverErr != nil { + t.Fatalf("Error initializing server: %s", serverErr) + } + + conn, dialErr := net.Dial("tcp", listen) + if dialErr != nil { + t.Fatalf("Error dialing server: %s", dialErr) + } + + spdyConn, spdyErr := NewConnection(conn, false) + if spdyErr != nil { + t.Fatalf("Error creating spdy connection: %s", spdyErr) + } + go spdyConn.Serve(NoOpStreamHandler) + + spdyConn.SetIdleTimeout(10 * time.Millisecond) + spdyConn.SetIdleTimeout(0) + select { + case <-spdyConn.CloseChan(): + t.Fatal("Unexpected connection closure") + case <-time.After(20 * time.Millisecond): + } + + closeErr := server.Close() + if closeErr != nil { + t.Fatalf("Error shutting down server: %s", closeErr) + } + wg.Wait() +} + +func TestIdleNoData(t *testing.T) { + var wg sync.WaitGroup + server, listen, serverErr := runServer(&wg) + if serverErr != nil { + t.Fatalf("Error initializing server: %s", serverErr) + } + + conn, dialErr := net.Dial("tcp", listen) + if dialErr != nil { + t.Fatalf("Error dialing server: %s", dialErr) + } + + spdyConn, spdyErr := NewConnection(conn, false) + if spdyErr != nil { + t.Fatalf("Error creating spdy connection: %s", spdyErr) + } + go spdyConn.Serve(NoOpStreamHandler) + + spdyConn.SetIdleTimeout(10 * time.Millisecond) + <-spdyConn.CloseChan() + + closeErr := server.Close() + if closeErr != nil { + t.Fatalf("Error shutting down server: %s", closeErr) + } + wg.Wait() +} + +func TestIdleWithData(t *testing.T) { + var wg sync.WaitGroup + server, listen, serverErr := runServer(&wg) + if serverErr != nil { + t.Fatalf("Error initializing server: %s", serverErr) + } + + conn, dialErr := net.Dial("tcp", listen) + if dialErr != nil { + t.Fatalf("Error dialing server: %s", dialErr) + } + + spdyConn, spdyErr := NewConnection(conn, false) + if spdyErr != nil { + t.Fatalf("Error creating spdy connection: %s", spdyErr) + } + go spdyConn.Serve(NoOpStreamHandler) + + spdyConn.SetIdleTimeout(25 * time.Millisecond) + + authenticated = true + stream, err := spdyConn.CreateStream(http.Header{}, nil, false) + if err != nil { + t.Fatalf("Error creating stream: %v", err) + } + + writeCh := make(chan struct{}) + + go func() { + b := []byte{1, 2, 3, 4, 5} + for i := 0; i < 10; i++ { + _, err = stream.Write(b) + if err != nil { + t.Fatalf("Error writing to stream: %v", err) + } + time.Sleep(10 * time.Millisecond) + } + close(writeCh) + }() + + writesFinished := false + +Loop: + for { + select { + case <-writeCh: + writesFinished = true + case <-spdyConn.CloseChan(): + if !writesFinished { + t.Fatal("Connection closed before all writes finished") + } + break Loop + } + } + + closeErr := server.Close() + if closeErr != nil { + t.Fatalf("Error shutting down server: %s", closeErr) + } + wg.Wait() +} + +func TestIdleRace(t *testing.T) { + var wg sync.WaitGroup + server, listen, serverErr := runServer(&wg) + if serverErr != nil { + t.Fatalf("Error initializing server: %s", serverErr) + } + + conn, dialErr := net.Dial("tcp", listen) + if dialErr != nil { + t.Fatalf("Error dialing server: %s", dialErr) + } + + spdyConn, spdyErr := NewConnection(conn, false) + if spdyErr != nil { + t.Fatalf("Error creating spdy connection: %s", spdyErr) + } + go spdyConn.Serve(NoOpStreamHandler) + + spdyConn.SetIdleTimeout(10 * time.Millisecond) + + authenticated = true + + for i := 0; i < 10; i++ { + _, err := spdyConn.CreateStream(http.Header{}, nil, false) + if err != nil { + t.Fatalf("Error creating stream: %v", err) + } + } + + <-spdyConn.CloseChan() + + closeErr := server.Close() + if closeErr != nil { + t.Fatalf("Error shutting down server: %s", closeErr) + } + wg.Wait() +} + +func TestHalfClosedIdleTimeout(t *testing.T) { + listener, listenErr := net.Listen("tcp", "localhost:0") + if listenErr != nil { + t.Fatalf("Error listening: %v", listenErr) + } + listen := listener.Addr().String() + + go func() { + serverConn, err := listener.Accept() + if err != nil { + t.Fatalf("Error accepting: %v", err) + } + + serverSpdyConn, err := NewConnection(serverConn, true) + if err != nil { + t.Fatalf("Error creating server connection: %v", err) + } + go serverSpdyConn.Serve(func(s *Stream) { + s.SendReply(http.Header{}, true) + }) + serverSpdyConn.SetIdleTimeout(10 * time.Millisecond) + }() + + conn, dialErr := net.Dial("tcp", listen) + if dialErr != nil { + t.Fatalf("Error dialing server: %s", dialErr) + } + + spdyConn, spdyErr := NewConnection(conn, false) + if spdyErr != nil { + t.Fatalf("Error creating spdy connection: %s", spdyErr) + } + go spdyConn.Serve(NoOpStreamHandler) + + stream, err := spdyConn.CreateStream(http.Header{}, nil, false) + if err != nil { + t.Fatalf("Error creating stream: %v", err) + } + + time.Sleep(20 * time.Millisecond) + + stream.Reset() + + err = spdyConn.Close() + if err != nil { + t.Fatalf("Error closing client spdy conn: %v", err) + } +} + +func TestStreamReset(t *testing.T) { + var wg sync.WaitGroup + server, listen, serverErr := runServer(&wg) + if serverErr != nil { + t.Fatalf("Error initializing server: %s", serverErr) + } + + conn, dialErr := net.Dial("tcp", listen) + if dialErr != nil { + t.Fatalf("Error dialing server: %s", dialErr) + } + + spdyConn, spdyErr := NewConnection(conn, false) + if spdyErr != nil { + t.Fatalf("Error creating spdy connection: %s", spdyErr) + } + go spdyConn.Serve(NoOpStreamHandler) + + authenticated = true + stream, streamErr := spdyConn.CreateStream(http.Header{}, nil, false) + if streamErr != nil { + t.Fatalf("Error creating stream: %s", streamErr) + } + + buf := []byte("dskjahfkdusahfkdsahfkdsafdkas") + for i := 0; i < 10; i++ { + if _, err := stream.Write(buf); err != nil { + t.Fatalf("Error writing to stream: %s", err) + } + } + for i := 0; i < 10; i++ { + if _, err := stream.Read(buf); err != nil { + t.Fatalf("Error reading from stream: %s", err) + } + } + + // fmt.Printf("Resetting...\n") + if err := stream.Reset(); err != nil { + t.Fatalf("Error reseting stream: %s", err) + } + + closeErr := server.Close() + if closeErr != nil { + t.Fatalf("Error shutting down server: %s", closeErr) + } + wg.Wait() +} + +func TestStreamResetWithDataRemaining(t *testing.T) { + var wg sync.WaitGroup + server, listen, serverErr := runServer(&wg) + if serverErr != nil { + t.Fatalf("Error initializing server: %s", serverErr) + } + + conn, dialErr := net.Dial("tcp", listen) + if dialErr != nil { + t.Fatalf("Error dialing server: %s", dialErr) + } + + spdyConn, spdyErr := NewConnection(conn, false) + if spdyErr != nil { + t.Fatalf("Error creating spdy connection: %s", spdyErr) + } + go spdyConn.Serve(NoOpStreamHandler) + + authenticated = true + stream, streamErr := spdyConn.CreateStream(http.Header{}, nil, false) + if streamErr != nil { + t.Fatalf("Error creating stream: %s", streamErr) + } + + buf := []byte("dskjahfkdusahfkdsahfkdsafdkas") + for i := 0; i < 10; i++ { + if _, err := stream.Write(buf); err != nil { + t.Fatalf("Error writing to stream: %s", err) + } + } + + // read a bit to make sure a goroutine gets to <-dataChan + if _, err := stream.Read(buf); err != nil { + t.Fatalf("Error reading from stream: %s", err) + } + + // fmt.Printf("Resetting...\n") + if err := stream.Reset(); err != nil { + t.Fatalf("Error reseting stream: %s", err) + } + + closeErr := server.Close() + if closeErr != nil { + t.Fatalf("Error shutting down server: %s", closeErr) + } + wg.Wait() +} + +type roundTripper struct { + conn net.Conn +} + +func (s *roundTripper) RoundTrip(req *http.Request) (*http.Response, error) { + r := *req + req = &r + + conn, err := net.Dial("tcp", req.URL.Host) + if err != nil { + return nil, err + } + + err = req.Write(conn) + if err != nil { + return nil, err + } + + resp, err := http.ReadResponse(bufio.NewReader(conn), req) + if err != nil { + return nil, err + } + + s.conn = conn + + return resp, nil +} + +// see https://github.com/GoogleCloudPlatform/kubernetes/issues/4882 +func TestFramingAfterRemoteConnectionClosed(t *testing.T) { + server := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + streamCh := make(chan *Stream) + + w.WriteHeader(http.StatusSwitchingProtocols) + + netconn, _, _ := w.(http.Hijacker).Hijack() + conn, _ := NewConnection(netconn, true) + go conn.Serve(func(s *Stream) { + s.SendReply(http.Header{}, false) + streamCh <- s + }) + + stream := <-streamCh + io.Copy(stream, stream) + + closeChan := make(chan struct{}) + go func() { + stream.Reset() + conn.Close() + close(closeChan) + }() + + <-closeChan + })) + + server.Start() + defer server.Close() + + req, err := http.NewRequest("GET", server.URL, nil) + if err != nil { + t.Fatalf("Error creating request: %s", err) + } + + rt := &roundTripper{} + client := &http.Client{Transport: rt} + + _, err = client.Do(req) + if err != nil { + t.Fatalf("unexpected error from client.Do: %s", err) + } + + conn, err := NewConnection(rt.conn, false) + go conn.Serve(NoOpStreamHandler) + + stream, err := conn.CreateStream(http.Header{}, nil, false) + if err != nil { + t.Fatalf("error creating client stream: %s", err) + } + + n, err := stream.Write([]byte("hello")) + if err != nil { + t.Fatalf("error writing to stream: %s", err) + } + if n != 5 { + t.Fatalf("Expected to write 5 bytes, but actually wrote %d", n) + } + + b := make([]byte, 5) + n, err = stream.Read(b) + if err != nil { + t.Fatalf("error reading from stream: %s", err) + } + if n != 5 { + t.Fatalf("Expected to read 5 bytes, but actually read %d", n) + } + if e, a := "hello", string(b[0:n]); e != a { + t.Fatalf("expected '%s', got '%s'", e, a) + } + + stream.Reset() + conn.Close() +} + +func TestGoAwayRace(t *testing.T) { + var done sync.WaitGroup + listener, err := net.Listen("tcp", "localhost:0") + if err != nil { + t.Fatalf("Error listening: %v", err) + } + listen := listener.Addr().String() + + processDataFrame := make(chan struct{}) + serverClosed := make(chan struct{}) + + done.Add(1) + go func() { + defer done.Done() + serverConn, err := listener.Accept() + if err != nil { + t.Fatalf("Error accepting: %v", err) + } + + serverSpdyConn, err := NewConnection(serverConn, true) + if err != nil { + t.Fatalf("Error creating server connection: %v", err) + } + go func() { + <-serverSpdyConn.CloseChan() + close(serverClosed) + }() + + // force the data frame handler to sleep before delivering the frame + serverSpdyConn.dataFrameHandler = func(frame *spdy.DataFrame) error { + <-processDataFrame + return serverSpdyConn.handleDataFrame(frame) + } + + streamCh := make(chan *Stream) + go serverSpdyConn.Serve(func(s *Stream) { + s.SendReply(http.Header{}, false) + streamCh <- s + }) + + stream, ok := <-streamCh + if !ok { + t.Fatalf("didn't get a stream") + } + stream.Close() + data, err := ioutil.ReadAll(stream) + if err != nil { + t.Error(err) + } + if e, a := "hello1hello2hello3hello4hello5", string(data); e != a { + t.Errorf("Expected %q, got %q", e, a) + } + }() + + dialConn, err := net.Dial("tcp", listen) + if err != nil { + t.Fatalf("Error dialing server: %s", err) + } + conn, err := NewConnection(dialConn, false) + if err != nil { + t.Fatalf("Error creating client connectin: %v", err) + } + go conn.Serve(NoOpStreamHandler) + + stream, err := conn.CreateStream(http.Header{}, nil, false) + if err != nil { + t.Fatalf("error creating client stream: %s", err) + } + if err := stream.Wait(); err != nil { + t.Fatalf("error waiting for stream creation: %v", err) + } + + fmt.Fprint(stream, "hello1") + fmt.Fprint(stream, "hello2") + fmt.Fprint(stream, "hello3") + fmt.Fprint(stream, "hello4") + fmt.Fprint(stream, "hello5") + + stream.Close() + conn.Close() + + // wait for the server to get the go away frame + <-serverClosed + + // allow the data frames to be delivered to the server's stream + close(processDataFrame) + + done.Wait() +} + +func TestSetIdleTimeoutAfterRemoteConnectionClosed(t *testing.T) { + listener, err := net.Listen("tcp", "localhost:0") + if err != nil { + t.Fatalf("Error listening: %v", err) + } + listen := listener.Addr().String() + + serverConns := make(chan *Connection, 1) + go func() { + conn, connErr := listener.Accept() + if connErr != nil { + t.Fatal(connErr) + } + serverSpdyConn, err := NewConnection(conn, true) + if err != nil { + t.Fatalf("Error creating server connection: %v", err) + } + go serverSpdyConn.Serve(NoOpStreamHandler) + serverConns <- serverSpdyConn + }() + + conn, dialErr := net.Dial("tcp", listen) + if dialErr != nil { + t.Fatalf("Error dialing server: %s", dialErr) + } + + spdyConn, spdyErr := NewConnection(conn, false) + if spdyErr != nil { + t.Fatalf("Error creating spdy connection: %s", spdyErr) + } + go spdyConn.Serve(NoOpStreamHandler) + + if err := spdyConn.Close(); err != nil { + t.Fatal(err) + } + + serverConn := <-serverConns + defer serverConn.Close() + <-serverConn.closeChan + + serverConn.SetIdleTimeout(10 * time.Second) +} + +func TestClientConnectionStopsServingAfterGoAway(t *testing.T) { + listener, err := net.Listen("tcp", "localhost:0") + if err != nil { + t.Fatalf("Error listening: %v", err) + } + listen := listener.Addr().String() + + serverConns := make(chan *Connection, 1) + go func() { + conn, connErr := listener.Accept() + if connErr != nil { + t.Fatal(connErr) + } + serverSpdyConn, err := NewConnection(conn, true) + if err != nil { + t.Fatalf("Error creating server connection: %v", err) + } + go serverSpdyConn.Serve(NoOpStreamHandler) + serverConns <- serverSpdyConn + }() + + conn, dialErr := net.Dial("tcp", listen) + if dialErr != nil { + t.Fatalf("Error dialing server: %s", dialErr) + } + + spdyConn, spdyErr := NewConnection(conn, false) + if spdyErr != nil { + t.Fatalf("Error creating spdy connection: %s", spdyErr) + } + go spdyConn.Serve(NoOpStreamHandler) + + stream, err := spdyConn.CreateStream(http.Header{}, nil, false) + if err != nil { + t.Fatalf("Error creating stream: %v", err) + } + if err := stream.WaitTimeout(30 * time.Second); err != nil { + t.Fatalf("Timed out waiting for stream: %v", err) + } + + readChan := make(chan struct{}) + go func() { + _, err := ioutil.ReadAll(stream) + if err != nil { + t.Fatalf("Error reading stream: %v", err) + } + close(readChan) + }() + + serverConn := <-serverConns + serverConn.Close() + + // make sure the client conn breaks out of the main loop in Serve() + <-spdyConn.closeChan + // make sure the remote channels are closed and the stream read is unblocked + <-readChan +} + +func TestStreamReadUnblocksAfterCloseThenReset(t *testing.T) { + listener, err := net.Listen("tcp", "localhost:0") + if err != nil { + t.Fatalf("Error listening: %v", err) + } + listen := listener.Addr().String() + + serverConns := make(chan *Connection, 1) + go func() { + conn, connErr := listener.Accept() + if connErr != nil { + t.Fatal(connErr) + } + serverSpdyConn, err := NewConnection(conn, true) + if err != nil { + t.Fatalf("Error creating server connection: %v", err) + } + go serverSpdyConn.Serve(NoOpStreamHandler) + serverConns <- serverSpdyConn + }() + + conn, dialErr := net.Dial("tcp", listen) + if dialErr != nil { + t.Fatalf("Error dialing server: %s", dialErr) + } + + spdyConn, spdyErr := NewConnection(conn, false) + if spdyErr != nil { + t.Fatalf("Error creating spdy connection: %s", spdyErr) + } + go spdyConn.Serve(NoOpStreamHandler) + + stream, err := spdyConn.CreateStream(http.Header{}, nil, false) + if err != nil { + t.Fatalf("Error creating stream: %v", err) + } + if err := stream.WaitTimeout(30 * time.Second); err != nil { + t.Fatalf("Timed out waiting for stream: %v", err) + } + + readChan := make(chan struct{}) + go func() { + _, err := ioutil.ReadAll(stream) + if err != nil { + t.Fatalf("Error reading stream: %v", err) + } + close(readChan) + }() + + serverConn := <-serverConns + defer serverConn.Close() + + if err := stream.Close(); err != nil { + t.Fatal(err) + } + if err := stream.Reset(); err != nil { + t.Fatal(err) + } + + // make sure close followed by reset unblocks stream.Read() + select { + case <-readChan: + case <-time.After(10 * time.Second): + t.Fatal("Timed out waiting for stream read to unblock") + } +} + +var authenticated bool + +func authStreamHandler(stream *Stream) { + if !authenticated { + stream.Refuse() + } + MirrorStreamHandler(stream) +} + +func runServer(wg *sync.WaitGroup) (io.Closer, string, error) { + listener, listenErr := net.Listen("tcp", "localhost:0") + if listenErr != nil { + return nil, "", listenErr + } + wg.Add(1) + go func() { + for { + conn, connErr := listener.Accept() + if connErr != nil { + break + } + + spdyConn, _ := NewConnection(conn, true) + go spdyConn.Serve(authStreamHandler) + + } + wg.Done() + }() + return listener, listener.Addr().String(), nil +} diff --git a/vendor/github.com/docker/spdystream/stream.go b/vendor/github.com/docker/spdystream/stream.go new file mode 100644 index 000000000..f9e9ee267 --- /dev/null +++ b/vendor/github.com/docker/spdystream/stream.go @@ -0,0 +1,327 @@ +package spdystream + +import ( + "errors" + "fmt" + "io" + "net" + "net/http" + "sync" + "time" + + "github.com/docker/spdystream/spdy" +) + +var ( + ErrUnreadPartialData = errors.New("unread partial data") +) + +type Stream struct { + streamId spdy.StreamId + parent *Stream + conn *Connection + startChan chan error + + dataLock sync.RWMutex + dataChan chan []byte + unread []byte + + priority uint8 + headers http.Header + headerChan chan http.Header + finishLock sync.Mutex + finished bool + replyCond *sync.Cond + replied bool + closeLock sync.Mutex + closeChan chan bool +} + +// WriteData writes data to stream, sending a dataframe per call +func (s *Stream) WriteData(data []byte, fin bool) error { + s.waitWriteReply() + var flags spdy.DataFlags + + if fin { + flags = spdy.DataFlagFin + s.finishLock.Lock() + if s.finished { + s.finishLock.Unlock() + return ErrWriteClosedStream + } + s.finished = true + s.finishLock.Unlock() + } + + dataFrame := &spdy.DataFrame{ + StreamId: s.streamId, + Flags: flags, + Data: data, + } + + debugMessage("(%p) (%d) Writing data frame", s, s.streamId) + return s.conn.framer.WriteFrame(dataFrame) +} + +// Write writes bytes to a stream, calling write data for each call. +func (s *Stream) Write(data []byte) (n int, err error) { + err = s.WriteData(data, false) + if err == nil { + n = len(data) + } + return +} + +// Read reads bytes from a stream, a single read will never get more +// than what is sent on a single data frame, but a multiple calls to +// read may get data from the same data frame. +func (s *Stream) Read(p []byte) (n int, err error) { + if s.unread == nil { + select { + case <-s.closeChan: + return 0, io.EOF + case read, ok := <-s.dataChan: + if !ok { + return 0, io.EOF + } + s.unread = read + } + } + n = copy(p, s.unread) + if n < len(s.unread) { + s.unread = s.unread[n:] + } else { + s.unread = nil + } + return +} + +// ReadData reads an entire data frame and returns the byte array +// from the data frame. If there is unread data from the result +// of a Read call, this function will return an ErrUnreadPartialData. +func (s *Stream) ReadData() ([]byte, error) { + debugMessage("(%p) Reading data from %d", s, s.streamId) + if s.unread != nil { + return nil, ErrUnreadPartialData + } + select { + case <-s.closeChan: + return nil, io.EOF + case read, ok := <-s.dataChan: + if !ok { + return nil, io.EOF + } + return read, nil + } +} + +func (s *Stream) waitWriteReply() { + if s.replyCond != nil { + s.replyCond.L.Lock() + for !s.replied { + s.replyCond.Wait() + } + s.replyCond.L.Unlock() + } +} + +// Wait waits for the stream to receive a reply. +func (s *Stream) Wait() error { + return s.WaitTimeout(time.Duration(0)) +} + +// WaitTimeout waits for the stream to receive a reply or for timeout. +// When the timeout is reached, ErrTimeout will be returned. +func (s *Stream) WaitTimeout(timeout time.Duration) error { + var timeoutChan <-chan time.Time + if timeout > time.Duration(0) { + timeoutChan = time.After(timeout) + } + + select { + case err := <-s.startChan: + if err != nil { + return err + } + break + case <-timeoutChan: + return ErrTimeout + } + return nil +} + +// Close closes the stream by sending an empty data frame with the +// finish flag set, indicating this side is finished with the stream. +func (s *Stream) Close() error { + select { + case <-s.closeChan: + // Stream is now fully closed + s.conn.removeStream(s) + default: + break + } + return s.WriteData([]byte{}, true) +} + +// Reset sends a reset frame, putting the stream into the fully closed state. +func (s *Stream) Reset() error { + s.conn.removeStream(s) + return s.resetStream() +} + +func (s *Stream) resetStream() error { + // Always call closeRemoteChannels, even if s.finished is already true. + // This makes it so that stream.Close() followed by stream.Reset() allows + // stream.Read() to unblock. + s.closeRemoteChannels() + + s.finishLock.Lock() + if s.finished { + s.finishLock.Unlock() + return nil + } + s.finished = true + s.finishLock.Unlock() + + resetFrame := &spdy.RstStreamFrame{ + StreamId: s.streamId, + Status: spdy.Cancel, + } + return s.conn.framer.WriteFrame(resetFrame) +} + +// CreateSubStream creates a stream using the current as the parent +func (s *Stream) CreateSubStream(headers http.Header, fin bool) (*Stream, error) { + return s.conn.CreateStream(headers, s, fin) +} + +// SetPriority sets the stream priority, does not affect the +// remote priority of this stream after Open has been called. +// Valid values are 0 through 7, 0 being the highest priority +// and 7 the lowest. +func (s *Stream) SetPriority(priority uint8) { + s.priority = priority +} + +// SendHeader sends a header frame across the stream +func (s *Stream) SendHeader(headers http.Header, fin bool) error { + return s.conn.sendHeaders(headers, s, fin) +} + +// SendReply sends a reply on a stream, only valid to be called once +// when handling a new stream +func (s *Stream) SendReply(headers http.Header, fin bool) error { + if s.replyCond == nil { + return errors.New("cannot reply on initiated stream") + } + s.replyCond.L.Lock() + defer s.replyCond.L.Unlock() + if s.replied { + return nil + } + + err := s.conn.sendReply(headers, s, fin) + if err != nil { + return err + } + + s.replied = true + s.replyCond.Broadcast() + return nil +} + +// Refuse sends a reset frame with the status refuse, only +// valid to be called once when handling a new stream. This +// may be used to indicate that a stream is not allowed +// when http status codes are not being used. +func (s *Stream) Refuse() error { + if s.replied { + return nil + } + s.replied = true + return s.conn.sendReset(spdy.RefusedStream, s) +} + +// Cancel sends a reset frame with the status canceled. This +// can be used at any time by the creator of the Stream to +// indicate the stream is no longer needed. +func (s *Stream) Cancel() error { + return s.conn.sendReset(spdy.Cancel, s) +} + +// ReceiveHeader receives a header sent on the other side +// of the stream. This function will block until a header +// is received or stream is closed. +func (s *Stream) ReceiveHeader() (http.Header, error) { + select { + case <-s.closeChan: + break + case header, ok := <-s.headerChan: + if !ok { + return nil, fmt.Errorf("header chan closed") + } + return header, nil + } + return nil, fmt.Errorf("stream closed") +} + +// Parent returns the parent stream +func (s *Stream) Parent() *Stream { + return s.parent +} + +// Headers returns the headers used to create the stream +func (s *Stream) Headers() http.Header { + return s.headers +} + +// String returns the string version of stream using the +// streamId to uniquely identify the stream +func (s *Stream) String() string { + return fmt.Sprintf("stream:%d", s.streamId) +} + +// Identifier returns a 32 bit identifier for the stream +func (s *Stream) Identifier() uint32 { + return uint32(s.streamId) +} + +// IsFinished returns whether the stream has finished +// sending data +func (s *Stream) IsFinished() bool { + return s.finished +} + +// Implement net.Conn interface + +func (s *Stream) LocalAddr() net.Addr { + return s.conn.conn.LocalAddr() +} + +func (s *Stream) RemoteAddr() net.Addr { + return s.conn.conn.RemoteAddr() +} + +// TODO set per stream values instead of connection-wide + +func (s *Stream) SetDeadline(t time.Time) error { + return s.conn.conn.SetDeadline(t) +} + +func (s *Stream) SetReadDeadline(t time.Time) error { + return s.conn.conn.SetReadDeadline(t) +} + +func (s *Stream) SetWriteDeadline(t time.Time) error { + return s.conn.conn.SetWriteDeadline(t) +} + +func (s *Stream) closeRemoteChannels() { + s.closeLock.Lock() + defer s.closeLock.Unlock() + select { + case <-s.closeChan: + default: + close(s.closeChan) + } +} diff --git a/vendor/github.com/docker/spdystream/utils.go b/vendor/github.com/docker/spdystream/utils.go new file mode 100644 index 000000000..1b2c199a4 --- /dev/null +++ b/vendor/github.com/docker/spdystream/utils.go @@ -0,0 +1,16 @@ +package spdystream + +import ( + "log" + "os" +) + +var ( + DEBUG = os.Getenv("DEBUG") +) + +func debugMessage(fmt string, args ...interface{}) { + if DEBUG != "" { + log.Printf(fmt, args...) + } +} diff --git a/vendor/github.com/emicklei/go-restful-swagger12/model_builder_test.go b/vendor/github.com/emicklei/go-restful-swagger12/model_builder_test.go new file mode 100644 index 000000000..a2d2f126f --- /dev/null +++ b/vendor/github.com/emicklei/go-restful-swagger12/model_builder_test.go @@ -0,0 +1,1283 @@ +package swagger + +import ( + "encoding/xml" + "net" + "reflect" + "testing" + "time" +) + +type YesNo bool + +func (y YesNo) MarshalJSON() ([]byte, error) { + if y { + return []byte("yes"), nil + } + return []byte("no"), nil +} + +// clear && go test -v -test.run TestRef_Issue190 ...swagger +func TestRef_Issue190(t *testing.T) { + type User struct { + items []string + } + testJsonFromStruct(t, User{}, `{ + "swagger.User": { + "id": "swagger.User", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }`) +} + +func TestWithoutAdditionalFormat(t *testing.T) { + type mytime struct { + time.Time + } + type usemytime struct { + t mytime + } + testJsonFromStruct(t, usemytime{}, `{ + "swagger.usemytime": { + "id": "swagger.usemytime", + "required": [ + "t" + ], + "properties": { + "t": { + "type": "string" + } + } + } + }`) +} + +func TestWithAdditionalFormat(t *testing.T) { + type mytime struct { + time.Time + } + type usemytime struct { + t mytime + } + testJsonFromStructWithConfig(t, usemytime{}, `{ + "swagger.usemytime": { + "id": "swagger.usemytime", + "required": [ + "t" + ], + "properties": { + "t": { + "type": "string", + "format": "date-time" + } + } + } + }`, &Config{ + SchemaFormatHandler: func(typeName string) string { + switch typeName { + case "swagger.mytime": + return "date-time" + } + return "" + }, + }) +} + +// clear && go test -v -test.run TestCustomMarshaller_Issue96 ...swagger +func TestCustomMarshaller_Issue96(t *testing.T) { + type Vote struct { + What YesNo + } + testJsonFromStruct(t, Vote{}, `{ + "swagger.Vote": { + "id": "swagger.Vote", + "required": [ + "What" + ], + "properties": { + "What": { + "type": "string" + } + } + } + }`) +} + +// clear && go test -v -test.run TestPrimitiveTypes ...swagger +func TestPrimitiveTypes(t *testing.T) { + type Prims struct { + f float64 + t time.Time + } + testJsonFromStruct(t, Prims{}, `{ + "swagger.Prims": { + "id": "swagger.Prims", + "required": [ + "f", + "t" + ], + "properties": { + "f": { + "type": "number", + "format": "double" + }, + "t": { + "type": "string", + "format": "date-time" + } + } + } + }`) +} + +// clear && go test -v -test.run TestPrimitivePtrTypes ...swagger +func TestPrimitivePtrTypes(t *testing.T) { + type Prims struct { + f *float64 + t *time.Time + b *bool + s *string + i *int + } + testJsonFromStruct(t, Prims{}, `{ + "swagger.Prims": { + "id": "swagger.Prims", + "required": [ + "f", + "t", + "b", + "s", + "i" + ], + "properties": { + "b": { + "type": "boolean" + }, + "f": { + "type": "number", + "format": "double" + }, + "i": { + "type": "integer", + "format": "int32" + }, + "s": { + "type": "string" + }, + "t": { + "type": "string", + "format": "date-time" + } + } + } + }`) +} + +// clear && go test -v -test.run TestS1 ...swagger +func TestS1(t *testing.T) { + type S1 struct { + Id string + } + testJsonFromStruct(t, S1{}, `{ + "swagger.S1": { + "id": "swagger.S1", + "required": [ + "Id" + ], + "properties": { + "Id": { + "type": "string" + } + } + } + }`) +} + +// clear && go test -v -test.run TestS2 ...swagger +func TestS2(t *testing.T) { + type S2 struct { + Ids []string + } + testJsonFromStruct(t, S2{}, `{ + "swagger.S2": { + "id": "swagger.S2", + "required": [ + "Ids" + ], + "properties": { + "Ids": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }`) +} + +// clear && go test -v -test.run TestS3 ...swagger +func TestS3(t *testing.T) { + type NestedS3 struct { + Id string + } + type S3 struct { + Nested NestedS3 + } + testJsonFromStruct(t, S3{}, `{ + "swagger.NestedS3": { + "id": "swagger.NestedS3", + "required": [ + "Id" + ], + "properties": { + "Id": { + "type": "string" + } + } + }, + "swagger.S3": { + "id": "swagger.S3", + "required": [ + "Nested" + ], + "properties": { + "Nested": { + "$ref": "swagger.NestedS3" + } + } + } + }`) +} + +type sample struct { + id string `swagger:"required"` // TODO + items []item + rootItem item `json:"root" description:"root desc"` +} + +type item struct { + itemName string `json:"name"` +} + +// clear && go test -v -test.run TestSampleToModelAsJson ...swagger +func TestSampleToModelAsJson(t *testing.T) { + testJsonFromStruct(t, sample{items: []item{}}, `{ + "swagger.item": { + "id": "swagger.item", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "swagger.sample": { + "id": "swagger.sample", + "required": [ + "id", + "items", + "root" + ], + "properties": { + "id": { + "type": "string" + }, + "items": { + "type": "array", + "items": { + "$ref": "swagger.item" + } + }, + "root": { + "$ref": "swagger.item", + "description": "root desc" + } + } + } + }`) +} + +func TestJsonTags(t *testing.T) { + type X struct { + A string + B string `json:"-"` + C int `json:",string"` + D int `json:","` + } + + expected := `{ + "swagger.X": { + "id": "swagger.X", + "required": [ + "A", + "C", + "D" + ], + "properties": { + "A": { + "type": "string" + }, + "C": { + "type": "string" + }, + "D": { + "type": "integer", + "format": "int32" + } + } + } + }` + + testJsonFromStruct(t, X{}, expected) +} + +func TestJsonTagOmitempty(t *testing.T) { + type X struct { + A int `json:",omitempty"` + B int `json:"C,omitempty"` + } + + expected := `{ + "swagger.X": { + "id": "swagger.X", + "properties": { + "A": { + "type": "integer", + "format": "int32" + }, + "C": { + "type": "integer", + "format": "int32" + } + } + } + }` + + testJsonFromStruct(t, X{}, expected) +} + +func TestJsonTagName(t *testing.T) { + type X struct { + A string `json:"B"` + } + + expected := `{ + "swagger.X": { + "id": "swagger.X", + "required": [ + "B" + ], + "properties": { + "B": { + "type": "string" + } + } + } + }` + + testJsonFromStruct(t, X{}, expected) +} + +func TestAnonymousStruct(t *testing.T) { + type X struct { + A struct { + B int + } + } + + expected := `{ + "swagger.X": { + "id": "swagger.X", + "required": [ + "A" + ], + "properties": { + "A": { + "$ref": "swagger.X.A" + } + } + }, + "swagger.X.A": { + "id": "swagger.X.A", + "required": [ + "B" + ], + "properties": { + "B": { + "type": "integer", + "format": "int32" + } + } + } + }` + + testJsonFromStruct(t, X{}, expected) +} + +func TestAnonymousPtrStruct(t *testing.T) { + type X struct { + A *struct { + B int + } + } + + expected := `{ + "swagger.X": { + "id": "swagger.X", + "required": [ + "A" + ], + "properties": { + "A": { + "$ref": "swagger.X.A" + } + } + }, + "swagger.X.A": { + "id": "swagger.X.A", + "required": [ + "B" + ], + "properties": { + "B": { + "type": "integer", + "format": "int32" + } + } + } + }` + + testJsonFromStruct(t, X{}, expected) +} + +func TestAnonymousArrayStruct(t *testing.T) { + type X struct { + A []struct { + B int + } + } + + expected := `{ + "swagger.X": { + "id": "swagger.X", + "required": [ + "A" + ], + "properties": { + "A": { + "type": "array", + "items": { + "$ref": "swagger.X.A" + } + } + } + }, + "swagger.X.A": { + "id": "swagger.X.A", + "required": [ + "B" + ], + "properties": { + "B": { + "type": "integer", + "format": "int32" + } + } + } + }` + + testJsonFromStruct(t, X{}, expected) +} + +func TestAnonymousPtrArrayStruct(t *testing.T) { + type X struct { + A *[]struct { + B int + } + } + + expected := `{ + "swagger.X": { + "id": "swagger.X", + "required": [ + "A" + ], + "properties": { + "A": { + "type": "array", + "items": { + "$ref": "swagger.X.A" + } + } + } + }, + "swagger.X.A": { + "id": "swagger.X.A", + "required": [ + "B" + ], + "properties": { + "B": { + "type": "integer", + "format": "int32" + } + } + } + }` + + testJsonFromStruct(t, X{}, expected) +} + +// go test -v -test.run TestEmbeddedStruct_Issue98 ...swagger +func TestEmbeddedStruct_Issue98(t *testing.T) { + type Y struct { + A int + } + type X struct { + Y + } + testJsonFromStruct(t, X{}, `{ + "swagger.X": { + "id": "swagger.X", + "required": [ + "A" + ], + "properties": { + "A": { + "type": "integer", + "format": "int32" + } + } + } + }`) +} + +type Dataset struct { + Names []string +} + +// clear && go test -v -test.run TestIssue85 ...swagger +func TestIssue85(t *testing.T) { + anon := struct{ Datasets []Dataset }{} + testJsonFromStruct(t, anon, `{ + "struct { Datasets ||swagger.Dataset }": { + "id": "struct { Datasets ||swagger.Dataset }", + "required": [ + "Datasets" + ], + "properties": { + "Datasets": { + "type": "array", + "items": { + "$ref": "swagger.Dataset" + } + } + } + }, + "swagger.Dataset": { + "id": "swagger.Dataset", + "required": [ + "Names" + ], + "properties": { + "Names": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }`) +} + +type File struct { + History []File + HistoryPtrs []*File +} + +// go test -v -test.run TestRecursiveStructure ...swagger +func TestRecursiveStructure(t *testing.T) { + testJsonFromStruct(t, File{}, `{ + "swagger.File": { + "id": "swagger.File", + "required": [ + "History", + "HistoryPtrs" + ], + "properties": { + "History": { + "type": "array", + "items": { + "$ref": "swagger.File" + } + }, + "HistoryPtrs": { + "type": "array", + "items": { + "$ref": "swagger.File" + } + } + } + } + }`) +} + +type A1 struct { + B struct { + Id int + Comment string `json:"comment,omitempty"` + } +} + +// go test -v -test.run TestEmbeddedStructA1 ...swagger +func TestEmbeddedStructA1(t *testing.T) { + testJsonFromStruct(t, A1{}, `{ + "swagger.A1": { + "id": "swagger.A1", + "required": [ + "B" + ], + "properties": { + "B": { + "$ref": "swagger.A1.B" + } + } + }, + "swagger.A1.B": { + "id": "swagger.A1.B", + "required": [ + "Id" + ], + "properties": { + "Id": { + "type": "integer", + "format": "int32" + }, + "comment": { + "type": "string" + } + } + } + }`) +} + +type A2 struct { + C +} +type C struct { + Id int `json:"B"` + Comment string `json:"comment,omitempty"` + Secure bool `json:"secure"` +} + +// go test -v -test.run TestEmbeddedStructA2 ...swagger +func TestEmbeddedStructA2(t *testing.T) { + testJsonFromStruct(t, A2{}, `{ + "swagger.A2": { + "id": "swagger.A2", + "required": [ + "B", + "secure" + ], + "properties": { + "B": { + "type": "integer", + "format": "int32" + }, + "comment": { + "type": "string" + }, + "secure": { + "type": "boolean" + } + } + } + }`) +} + +type A3 struct { + B D +} + +type D struct { + Id int +} + +// clear && go test -v -test.run TestStructA3 ...swagger +func TestStructA3(t *testing.T) { + testJsonFromStruct(t, A3{}, `{ + "swagger.A3": { + "id": "swagger.A3", + "required": [ + "B" + ], + "properties": { + "B": { + "$ref": "swagger.D" + } + } + }, + "swagger.D": { + "id": "swagger.D", + "required": [ + "Id" + ], + "properties": { + "Id": { + "type": "integer", + "format": "int32" + } + } + } + }`) +} + +type A4 struct { + D "json:,inline" +} + +// clear && go test -v -test.run TestStructA4 ...swagger +func TestEmbeddedStructA4(t *testing.T) { + testJsonFromStruct(t, A4{}, `{ + "swagger.A4": { + "id": "swagger.A4", + "required": [ + "Id" + ], + "properties": { + "Id": { + "type": "integer", + "format": "int32" + } + } + } + }`) +} + +type A5 struct { + D `json:"d"` +} + +// clear && go test -v -test.run TestStructA5 ...swagger +func TestEmbeddedStructA5(t *testing.T) { + testJsonFromStruct(t, A5{}, `{ + "swagger.A5": { + "id": "swagger.A5", + "required": [ + "d" + ], + "properties": { + "d": { + "$ref": "swagger.D" + } + } + }, + "swagger.D": { + "id": "swagger.D", + "required": [ + "Id" + ], + "properties": { + "Id": { + "type": "integer", + "format": "int32" + } + } + } + }`) +} + +type D2 struct { + id int + D []D +} + +type A6 struct { + D2 "json:,inline" +} + +// clear && go test -v -test.run TestStructA4 ...swagger +func TestEmbeddedStructA6(t *testing.T) { + testJsonFromStruct(t, A6{}, `{ + "swagger.A6": { + "id": "swagger.A6", + "required": [ + "id", + "D" + ], + "properties": { + "D": { + "type": "array", + "items": { + "$ref": "swagger.D" + } + }, + "id": { + "type": "integer", + "format": "int32" + } + } + }, + "swagger.D": { + "id": "swagger.D", + "required": [ + "Id" + ], + "properties": { + "Id": { + "type": "integer", + "format": "int32" + } + } + } + }`) +} + +type ObjectId []byte + +type Region struct { + Id ObjectId `bson:"_id" json:"id"` + Name string `bson:"name" json:"name"` + Type string `bson:"type" json:"type"` +} + +// clear && go test -v -test.run TestRegion_Issue113 ...swagger +func TestRegion_Issue113(t *testing.T) { + testJsonFromStruct(t, []Region{}, `{ + "||swagger.Region": { + "id": "||swagger.Region", + "properties": {} + }, + "swagger.Region": { + "id": "swagger.Region", + "required": [ + "id", + "name", + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + } + }`) +} + +// clear && go test -v -test.run TestIssue158 ...swagger +func TestIssue158(t *testing.T) { + type Address struct { + Country string `json:"country,omitempty"` + } + + type Customer struct { + Name string `json:"name"` + Address Address `json:"address"` + } + expected := `{ + "swagger.Address": { + "id": "swagger.Address", + "properties": { + "country": { + "type": "string" + } + } + }, + "swagger.Customer": { + "id": "swagger.Customer", + "required": [ + "name", + "address" + ], + "properties": { + "address": { + "$ref": "swagger.Address" + }, + "name": { + "type": "string" + } + } + } + }` + testJsonFromStruct(t, Customer{}, expected) +} + +func TestPointers(t *testing.T) { + type Vote struct { + What YesNo + } + testJsonFromStruct(t, &Vote{}, `{ + "swagger.Vote": { + "id": "swagger.Vote", + "required": [ + "What" + ], + "properties": { + "What": { + "type": "string" + } + } + } + }`) +} + +func TestSlices(t *testing.T) { + type Address struct { + Country string `json:"country,omitempty"` + } + expected := `{ + "swagger.Address": { + "id": "swagger.Address", + "properties": { + "country": { + "type": "string" + } + } + }, + "swagger.Customer": { + "id": "swagger.Customer", + "required": [ + "name", + "addresses" + ], + "properties": { + "addresses": { + "type": "array", + "items": { + "$ref": "swagger.Address" + } + }, + "name": { + "type": "string" + } + } + } + }` + // both slices (with pointer value and with type value) should have equal swagger representation + { + type Customer struct { + Name string `json:"name"` + Addresses []Address `json:"addresses"` + } + testJsonFromStruct(t, Customer{}, expected) + } + { + type Customer struct { + Name string `json:"name"` + Addresses []*Address `json:"addresses"` + } + testJsonFromStruct(t, Customer{}, expected) + } + +} + +type Name struct { + Value string +} + +func (n Name) PostBuildModel(m *Model) *Model { + m.Description = "titles must be upcase" + return m +} + +type TOC struct { + Titles []Name +} + +type Discography struct { + Title Name + TOC +} + +// clear && go test -v -test.run TestEmbeddedStructPull204 ...swagger +func TestEmbeddedStructPull204(t *testing.T) { + b := Discography{} + testJsonFromStruct(t, b, ` +{ + "swagger.Discography": { + "id": "swagger.Discography", + "required": [ + "Title", + "Titles" + ], + "properties": { + "Title": { + "$ref": "swagger.Name" + }, + "Titles": { + "type": "array", + "items": { + "$ref": "swagger.Name" + } + } + } + }, + "swagger.Name": { + "id": "swagger.Name", + "required": [ + "Value" + ], + "properties": { + "Value": { + "type": "string" + } + } + } + } +`) +} + +type AddressWithMethod struct { + Country string `json:"country,omitempty"` + PostCode int `json:"postcode,omitempty"` +} + +func (AddressWithMethod) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Address doc", + "country": "Country doc", + "postcode": "PostCode doc", + } +} + +func TestDocInMethodSwaggerDoc(t *testing.T) { + expected := `{ + "swagger.AddressWithMethod": { + "id": "swagger.AddressWithMethod", + "description": "Address doc", + "properties": { + "country": { + "type": "string", + "description": "Country doc" + }, + "postcode": { + "type": "integer", + "format": "int32", + "description": "PostCode doc" + } + } + } + }` + testJsonFromStruct(t, AddressWithMethod{}, expected) +} + +type RefDesc struct { + f1 *int64 `description:"desc"` +} + +func TestPtrDescription(t *testing.T) { + b := RefDesc{} + expected := `{ + "swagger.RefDesc": { + "id": "swagger.RefDesc", + "required": [ + "f1" + ], + "properties": { + "f1": { + "type": "integer", + "format": "int64", + "description": "desc" + } + } + } + }` + testJsonFromStruct(t, b, expected) +} + +type A struct { + B `json:",inline"` + C1 `json:"metadata,omitempty"` +} + +type B struct { + SB string +} + +type C1 struct { + SC string +} + +func (A) SwaggerDoc() map[string]string { + return map[string]string{ + "": "A struct", + "B": "B field", // We should not get anything from this + "metadata": "C1 field", + } +} + +func (B) SwaggerDoc() map[string]string { + return map[string]string{ + "": "B struct", + "SB": "SB field", + } +} + +func (C1) SwaggerDoc() map[string]string { + return map[string]string{ + "": "C1 struct", + "SC": "SC field", + } +} + +func TestNestedStructDescription(t *testing.T) { + expected := ` +{ + "swagger.A": { + "id": "swagger.A", + "description": "A struct", + "required": [ + "SB" + ], + "properties": { + "SB": { + "type": "string", + "description": "SB field" + }, + "metadata": { + "$ref": "swagger.C1", + "description": "C1 field" + } + } + }, + "swagger.C1": { + "id": "swagger.C1", + "description": "C1 struct", + "required": [ + "SC" + ], + "properties": { + "SC": { + "type": "string", + "description": "SC field" + } + } + } + } +` + testJsonFromStruct(t, A{}, expected) +} + +// This tests a primitive with type overrides in the struct tags +type FakeInt int +type E struct { + Id FakeInt `type:"integer"` + IP net.IP `type:"string"` +} + +func TestOverridenTypeTagE1(t *testing.T) { + expected := ` +{ + "swagger.E": { + "id": "swagger.E", + "required": [ + "Id", + "IP" + ], + "properties": { + "Id": { + "type": "integer" + }, + "IP": { + "type": "string" + } + } + } + } +` + testJsonFromStruct(t, E{}, expected) +} + +type XmlNamed struct { + XMLName xml.Name `xml:"user"` + Id string `json:"id" xml:"id"` + Name string `json:"name" xml:"name"` +} + +func TestXmlNameStructs(t *testing.T) { + expected := ` +{ + "swagger.XmlNamed": { + "id": "swagger.XmlNamed", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + } +` + testJsonFromStruct(t, XmlNamed{}, expected) +} + +func TestNameCustomization(t *testing.T) { + expected := ` +{ + "swagger.A": { + "id": "swagger.A", + "description": "A struct", + "required": [ + "SB" + ], + "properties": { + "SB": { + "type": "string", + "description": "SB field" + }, + "metadata": { + "$ref": "new.swagger.SpecialC1", + "description": "C1 field" + } + } + }, + "new.swagger.SpecialC1": { + "id": "new.swagger.SpecialC1", + "description": "C1 struct", + "required": [ + "SC" + ], + "properties": { + "SC": { + "type": "string", + "description": "SC field" + } + } + } + }` + + testJsonFromStructWithConfig(t, A{}, expected, &Config{ + ModelTypeNameHandler: func(t reflect.Type) (string, bool) { + if t == reflect.TypeOf(C1{}) { + return "new.swagger.SpecialC1", true + } + return "", false + }, + }) +} diff --git a/vendor/github.com/emicklei/go-restful-swagger12/model_list_test.go b/vendor/github.com/emicklei/go-restful-swagger12/model_list_test.go new file mode 100644 index 000000000..9a9ab919b --- /dev/null +++ b/vendor/github.com/emicklei/go-restful-swagger12/model_list_test.go @@ -0,0 +1,48 @@ +package swagger + +import ( + "encoding/json" + "testing" +) + +func TestModelList(t *testing.T) { + m := Model{} + m.Id = "m" + l := ModelList{} + l.Put("m", m) + k, ok := l.At("m") + if !ok { + t.Error("want model back") + } + if got, want := k.Id, "m"; got != want { + t.Errorf("got %v want %v", got, want) + } +} + +func TestModelList_Marshal(t *testing.T) { + l := ModelList{} + m := Model{Id: "myid"} + l.Put("myid", m) + data, err := json.Marshal(l) + if err != nil { + t.Error(err) + } + if got, want := string(data), `{"myid":{"id":"myid","properties":{}}}`; got != want { + t.Errorf("got %v want %v", got, want) + } +} + +func TestModelList_Unmarshal(t *testing.T) { + data := `{"myid":{"id":"myid","properties":{}}}` + l := ModelList{} + if err := json.Unmarshal([]byte(data), &l); err != nil { + t.Error(err) + } + m, ok := l.At("myid") + if !ok { + t.Error("expected myid") + } + if got, want := m.Id, "myid"; got != want { + t.Errorf("got %v want %v", got, want) + } +} diff --git a/vendor/github.com/emicklei/go-restful-swagger12/model_property_ext_test.go b/vendor/github.com/emicklei/go-restful-swagger12/model_property_ext_test.go new file mode 100644 index 000000000..1123ed992 --- /dev/null +++ b/vendor/github.com/emicklei/go-restful-swagger12/model_property_ext_test.go @@ -0,0 +1,70 @@ +package swagger + +import ( + "net" + "testing" +) + +// clear && go test -v -test.run TestThatExtraTagsAreReadIntoModel ...swagger +func TestThatExtraTagsAreReadIntoModel(t *testing.T) { + type fakeint int + type fakearray string + type Anything struct { + Name string `description:"name" modelDescription:"a test"` + Size int `minimum:"0" maximum:"10"` + Stati string `enum:"off|on" default:"on" modelDescription:"more description"` + ID string `unique:"true"` + FakeInt fakeint `type:"integer"` + FakeArray fakearray `type:"[]string"` + IP net.IP `type:"string"` + Password string + } + m := modelsFromStruct(Anything{}) + props, _ := m.At("swagger.Anything") + p1, _ := props.Properties.At("Name") + if got, want := p1.Description, "name"; got != want { + t.Errorf("got %v want %v", got, want) + } + p2, _ := props.Properties.At("Size") + if got, want := p2.Minimum, "0"; got != want { + t.Errorf("got %v want %v", got, want) + } + if got, want := p2.Maximum, "10"; got != want { + t.Errorf("got %v want %v", got, want) + } + p3, _ := props.Properties.At("Stati") + if got, want := p3.Enum[0], "off"; got != want { + t.Errorf("got %v want %v", got, want) + } + if got, want := p3.Enum[1], "on"; got != want { + t.Errorf("got %v want %v", got, want) + } + p4, _ := props.Properties.At("ID") + if got, want := *p4.UniqueItems, true; got != want { + t.Errorf("got %v want %v", got, want) + } + p5, _ := props.Properties.At("Password") + if got, want := *p5.Type, "string"; got != want { + t.Errorf("got %v want %v", got, want) + } + p6, _ := props.Properties.At("FakeInt") + if got, want := *p6.Type, "integer"; got != want { + t.Errorf("got %v want %v", got, want) + } + p7, _ := props.Properties.At("FakeArray") + if got, want := *p7.Type, "array"; got != want { + t.Errorf("got %v want %v", got, want) + } + p7p, _ := props.Properties.At("FakeArray") + if got, want := *p7p.Items.Type, "string"; got != want { + t.Errorf("got %v want %v", got, want) + } + p8, _ := props.Properties.At("IP") + if got, want := *p8.Type, "string"; got != want { + t.Errorf("got %v want %v", got, want) + } + + if got, want := props.Description, "a test\nmore description"; got != want { + t.Errorf("got %v want %v", got, want) + } +} diff --git a/vendor/github.com/emicklei/go-restful-swagger12/model_property_list_test.go b/vendor/github.com/emicklei/go-restful-swagger12/model_property_list_test.go new file mode 100644 index 000000000..2833ad8fd --- /dev/null +++ b/vendor/github.com/emicklei/go-restful-swagger12/model_property_list_test.go @@ -0,0 +1,47 @@ +package swagger + +import ( + "encoding/json" + "testing" +) + +func TestModelPropertyList(t *testing.T) { + l := ModelPropertyList{} + p := ModelProperty{Description: "d"} + l.Put("p", p) + q, ok := l.At("p") + if !ok { + t.Error("expected p") + } + if got, want := q.Description, "d"; got != want { + t.Errorf("got %v want %v", got, want) + } +} + +func TestModelPropertyList_Marshal(t *testing.T) { + l := ModelPropertyList{} + p := ModelProperty{Description: "d"} + l.Put("p", p) + data, err := json.Marshal(l) + if err != nil { + t.Error(err) + } + if got, want := string(data), `{"p":{"description":"d"}}`; got != want { + t.Errorf("got %v want %v", got, want) + } +} + +func TestModelPropertyList_Unmarshal(t *testing.T) { + data := `{"p":{"description":"d"}}` + l := ModelPropertyList{} + if err := json.Unmarshal([]byte(data), &l); err != nil { + t.Error(err) + } + m, ok := l.At("p") + if !ok { + t.Error("expected p") + } + if got, want := m.Description, "d"; got != want { + t.Errorf("got %v want %v", got, want) + } +} diff --git a/vendor/github.com/emicklei/go-restful-swagger12/ordered_route_map_test.go b/vendor/github.com/emicklei/go-restful-swagger12/ordered_route_map_test.go new file mode 100644 index 000000000..964e7da05 --- /dev/null +++ b/vendor/github.com/emicklei/go-restful-swagger12/ordered_route_map_test.go @@ -0,0 +1,29 @@ +package swagger + +import ( + "testing" + + "github.com/emicklei/go-restful" +) + +// go test -v -test.run TestOrderedRouteMap ...swagger +func TestOrderedRouteMap(t *testing.T) { + m := newOrderedRouteMap() + r1 := restful.Route{Path: "/r1"} + r2 := restful.Route{Path: "/r2"} + m.Add("a", r1) + m.Add("b", r2) + m.Add("b", r1) + m.Add("d", r2) + m.Add("c", r2) + order := "" + m.Do(func(k string, routes []restful.Route) { + order += k + if len(routes) == 0 { + t.Fail() + } + }) + if order != "abdc" { + t.Fail() + } +} diff --git a/vendor/github.com/emicklei/go-restful-swagger12/postbuild_model_test.go b/vendor/github.com/emicklei/go-restful-swagger12/postbuild_model_test.go new file mode 100644 index 000000000..3e20d2f5b --- /dev/null +++ b/vendor/github.com/emicklei/go-restful-swagger12/postbuild_model_test.go @@ -0,0 +1,42 @@ +package swagger + +import "testing" + +type Boat struct { + Length int `json:"-"` // on default, this makes the fields not required + Weight int `json:"-"` +} + +// PostBuildModel is from swagger.ModelBuildable +func (b Boat) PostBuildModel(m *Model) *Model { + // override required + m.Required = []string{"Length", "Weight"} + + // add model property (just to test is can be added; is this a real usecase?) + extraType := "string" + m.Properties.Put("extra", ModelProperty{ + Description: "extra description", + DataTypeFields: DataTypeFields{ + Type: &extraType, + }, + }) + return m +} + +func TestCustomPostModelBuilde(t *testing.T) { + testJsonFromStruct(t, Boat{}, `{ + "swagger.Boat": { + "id": "swagger.Boat", + "required": [ + "Length", + "Weight" + ], + "properties": { + "extra": { + "type": "string", + "description": "extra description" + } + } + } +}`) +} diff --git a/vendor/github.com/emicklei/go-restful-swagger12/swagger_test.go b/vendor/github.com/emicklei/go-restful-swagger12/swagger_test.go new file mode 100644 index 000000000..3db904afc --- /dev/null +++ b/vendor/github.com/emicklei/go-restful-swagger12/swagger_test.go @@ -0,0 +1,318 @@ +package swagger + +import ( + "encoding/json" + "testing" + + "github.com/emicklei/go-restful" + "github.com/emicklei/go-restful-swagger12/test_package" +) + +func TestInfoStruct_Issue231(t *testing.T) { + config := Config{ + Info: Info{ + Title: "Title", + Description: "Description", + TermsOfServiceUrl: "http://example.com", + Contact: "example@example.com", + License: "License", + LicenseUrl: "http://example.com/license.txt", + }, + } + sws := newSwaggerService(config) + str, err := json.MarshalIndent(sws.produceListing(), "", " ") + if err != nil { + t.Fatal(err) + } + compareJson(t, string(str), ` + { + "apiVersion": "", + "swaggerVersion": "1.2", + "apis": null, + "info": { + "title": "Title", + "description": "Description", + "termsOfServiceUrl": "http://example.com", + "contact": "example@example.com", + "license": "License", + "licenseUrl": "http://example.com/license.txt" + } + } + `) +} + +// go test -v -test.run TestThatMultiplePathsOnRootAreHandled ...swagger +func TestThatMultiplePathsOnRootAreHandled(t *testing.T) { + ws1 := new(restful.WebService) + ws1.Route(ws1.GET("/_ping").To(dummy)) + ws1.Route(ws1.GET("/version").To(dummy)) + + cfg := Config{ + WebServicesUrl: "http://here.com", + ApiPath: "/apipath", + WebServices: []*restful.WebService{ws1}, + } + sws := newSwaggerService(cfg) + decl := sws.composeDeclaration(ws1, "/") + if got, want := len(decl.Apis), 2; got != want { + t.Errorf("got %v want %v", got, want) + } +} + +func TestWriteSamples(t *testing.T) { + ws1 := new(restful.WebService) + ws1.Route(ws1.GET("/object").To(dummy).Writes(test_package.TestStruct{})) + ws1.Route(ws1.GET("/array").To(dummy).Writes([]test_package.TestStruct{})) + ws1.Route(ws1.GET("/object_and_array").To(dummy).Writes(struct{ Abc test_package.TestStruct }{})) + + cfg := Config{ + WebServicesUrl: "http://here.com", + ApiPath: "/apipath", + WebServices: []*restful.WebService{ws1}, + } + sws := newSwaggerService(cfg) + + decl := sws.composeDeclaration(ws1, "/") + + str, err := json.MarshalIndent(decl.Apis, "", " ") + if err != nil { + t.Fatal(err) + } + + compareJson(t, string(str), ` + [ + { + "path": "/object", + "description": "", + "operations": [ + { + "type": "test_package.TestStruct", + "method": "GET", + "nickname": "dummy", + "parameters": [] + } + ] + }, + { + "path": "/array", + "description": "", + "operations": [ + { + "type": "array", + "items": { + "$ref": "test_package.TestStruct" + }, + "method": "GET", + "nickname": "dummy", + "parameters": [] + } + ] + }, + { + "path": "/object_and_array", + "description": "", + "operations": [ + { + "type": "struct { Abc test_package.TestStruct }", + "method": "GET", + "nickname": "dummy", + "parameters": [] + } + ] + } + ]`) + + str, err = json.MarshalIndent(decl.Models, "", " ") + if err != nil { + t.Fatal(err) + } + compareJson(t, string(str), ` + { + "test_package.TestStruct": { + "id": "test_package.TestStruct", + "required": [ + "TestField" + ], + "properties": { + "TestField": { + "type": "string" + } + } + }, + "||test_package.TestStruct": { + "id": "||test_package.TestStruct", + "properties": {} + }, + "struct { Abc test_package.TestStruct }": { + "id": "struct { Abc test_package.TestStruct }", + "required": [ + "Abc" + ], + "properties": { + "Abc": { + "$ref": "test_package.TestStruct" + } + } + } + }`) +} + +func TestRoutesWithCommonPart(t *testing.T) { + ws1 := new(restful.WebService) + ws1.Path("/") + ws1.Route(ws1.GET("/foobar").To(dummy).Writes(test_package.TestStruct{})) + ws1.Route(ws1.HEAD("/foobar").To(dummy).Writes(test_package.TestStruct{})) + ws1.Route(ws1.GET("/foo").To(dummy).Writes([]test_package.TestStruct{})) + ws1.Route(ws1.HEAD("/foo").To(dummy).Writes(test_package.TestStruct{})) + + cfg := Config{ + WebServicesUrl: "http://here.com", + ApiPath: "/apipath", + WebServices: []*restful.WebService{ws1}, + } + sws := newSwaggerService(cfg) + + decl := sws.composeDeclaration(ws1, "/foo") + + str, err := json.MarshalIndent(decl.Apis, "", " ") + if err != nil { + t.Fatal(err) + } + + compareJson(t, string(str), `[ + { + "path": "/foo", + "description": "", + "operations": [ + { + "type": "array", + "items": { + "$ref": "test_package.TestStruct" + }, + "method": "GET", + "nickname": "dummy", + "parameters": [] + }, + { + "type": "test_package.TestStruct", + "method": "HEAD", + "nickname": "dummy", + "parameters": [] + } + ] + } + ]`) +} + +// go test -v -test.run TestServiceToApi ...swagger +func TestServiceToApi(t *testing.T) { + ws := new(restful.WebService) + ws.Path("/tests") + ws.Consumes(restful.MIME_JSON) + ws.Produces(restful.MIME_XML) + ws.Route(ws.GET("/a").To(dummy).Writes(sample{})) + ws.Route(ws.PUT("/b").To(dummy).Writes(sample{})) + ws.Route(ws.POST("/c").To(dummy).Writes(sample{})) + ws.Route(ws.DELETE("/d").To(dummy).Writes(sample{})) + + ws.Route(ws.GET("/d").To(dummy).Writes(sample{})) + ws.Route(ws.PUT("/c").To(dummy).Writes(sample{})) + ws.Route(ws.POST("/b").To(dummy).Writes(sample{})) + ws.Route(ws.DELETE("/a").To(dummy).Writes(sample{})) + ws.ApiVersion("1.2.3") + cfg := Config{ + WebServicesUrl: "http://here.com", + ApiPath: "/apipath", + WebServices: []*restful.WebService{ws}, + PostBuildHandler: func(in *ApiDeclarationList) {}, + } + sws := newSwaggerService(cfg) + decl := sws.composeDeclaration(ws, "/tests") + // checks + if decl.ApiVersion != "1.2.3" { + t.Errorf("got %v want %v", decl.ApiVersion, "1.2.3") + } + if decl.BasePath != "http://here.com" { + t.Errorf("got %v want %v", decl.BasePath, "http://here.com") + } + if len(decl.Apis) != 4 { + t.Errorf("got %v want %v", len(decl.Apis), 4) + } + pathOrder := "" + for _, each := range decl.Apis { + pathOrder += each.Path + for _, other := range each.Operations { + pathOrder += other.Method + } + } + + if pathOrder != "/tests/aGETDELETE/tests/bPUTPOST/tests/cPOSTPUT/tests/dDELETEGET" { + t.Errorf("got %v want %v", pathOrder, "see test source") + } +} + +func dummy(i *restful.Request, o *restful.Response) {} + +// go test -v -test.run TestIssue78 ...swagger +type Response struct { + Code int + Users *[]User + Items *[]TestItem +} +type User struct { + Id, Name string +} +type TestItem struct { + Id, Name string +} + +// clear && go test -v -test.run TestComposeResponseMessages ...swagger +func TestComposeResponseMessages(t *testing.T) { + responseErrors := map[int]restful.ResponseError{} + responseErrors[400] = restful.ResponseError{Code: 400, Message: "Bad Request", Model: TestItem{}} + route := restful.Route{ResponseErrors: responseErrors} + decl := new(ApiDeclaration) + decl.Models = ModelList{} + msgs := composeResponseMessages(route, decl, &Config{}) + if msgs[0].ResponseModel != "swagger.TestItem" { + t.Errorf("got %s want swagger.TestItem", msgs[0].ResponseModel) + } +} + +func TestIssue78(t *testing.T) { + sws := newSwaggerService(Config{}) + models := new(ModelList) + sws.addModelFromSampleTo(&Operation{}, true, Response{Items: &[]TestItem{}}, models) + model, ok := models.At("swagger.Response") + if !ok { + t.Fatal("missing response model") + } + if "swagger.Response" != model.Id { + t.Fatal("wrong model id:" + model.Id) + } + code, ok := model.Properties.At("Code") + if !ok { + t.Fatal("missing code") + } + if "integer" != *code.Type { + t.Fatal("wrong code type:" + *code.Type) + } + items, ok := model.Properties.At("Items") + if !ok { + t.Fatal("missing items") + } + if "array" != *items.Type { + t.Fatal("wrong items type:" + *items.Type) + } + items_items := items.Items + if items_items == nil { + t.Fatal("missing items->items") + } + ref := items_items.Ref + if ref == nil { + t.Fatal("missing $ref") + } + if *ref != "swagger.TestItem" { + t.Fatal("wrong $ref:" + *ref) + } +} diff --git a/vendor/github.com/emicklei/go-restful-swagger12/utils_test.go b/vendor/github.com/emicklei/go-restful-swagger12/utils_test.go new file mode 100644 index 000000000..220289af3 --- /dev/null +++ b/vendor/github.com/emicklei/go-restful-swagger12/utils_test.go @@ -0,0 +1,86 @@ +package swagger + +import ( + "bytes" + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" +) + +func testJsonFromStructWithConfig(t *testing.T, sample interface{}, expectedJson string, config *Config) bool { + m := modelsFromStructWithConfig(sample, config) + data, _ := json.MarshalIndent(m, " ", " ") + return compareJson(t, string(data), expectedJson) +} + +func modelsFromStructWithConfig(sample interface{}, config *Config) *ModelList { + models := new(ModelList) + builder := modelBuilder{Models: models, Config: config} + builder.addModelFrom(sample) + return models +} + +func testJsonFromStruct(t *testing.T, sample interface{}, expectedJson string) bool { + return testJsonFromStructWithConfig(t, sample, expectedJson, &Config{}) +} + +func modelsFromStruct(sample interface{}) *ModelList { + return modelsFromStructWithConfig(sample, &Config{}) +} + +func compareJson(t *testing.T, actualJsonAsString string, expectedJsonAsString string) bool { + success := false + var actualMap map[string]interface{} + json.Unmarshal([]byte(actualJsonAsString), &actualMap) + var expectedMap map[string]interface{} + err := json.Unmarshal([]byte(expectedJsonAsString), &expectedMap) + if err != nil { + var actualArray []interface{} + json.Unmarshal([]byte(actualJsonAsString), &actualArray) + var expectedArray []interface{} + err := json.Unmarshal([]byte(expectedJsonAsString), &expectedArray) + success = reflect.DeepEqual(actualArray, expectedArray) + if err != nil { + t.Fatalf("Unparsable expected JSON: %s, actual: %v, expected: %v", err, actualJsonAsString, expectedJsonAsString) + } + } else { + success = reflect.DeepEqual(actualMap, expectedMap) + } + if !success { + t.Log("---- expected -----") + t.Log(withLineNumbers(expectedJsonAsString)) + t.Log("---- actual -----") + t.Log(withLineNumbers(actualJsonAsString)) + t.Log("---- raw -----") + t.Log(actualJsonAsString) + t.Error("there are differences") + return false + } + return true +} + +func indexOfNonMatchingLine(actual, expected string) int { + a := strings.Split(actual, "\n") + e := strings.Split(expected, "\n") + size := len(a) + if len(e) < len(a) { + size = len(e) + } + for i := 0; i < size; i++ { + if a[i] != e[i] { + return i + } + } + return -1 +} + +func withLineNumbers(content string) string { + var buffer bytes.Buffer + lines := strings.Split(content, "\n") + for i, each := range lines { + buffer.WriteString(fmt.Sprintf("%d:%s\n", i, each)) + } + return buffer.String() +} diff --git a/vendor/github.com/emicklei/go-restful/CHANGES.md b/vendor/github.com/emicklei/go-restful/CHANGES.md index 0adca766f..d90aaa22e 100644 --- a/vendor/github.com/emicklei/go-restful/CHANGES.md +++ b/vendor/github.com/emicklei/go-restful/CHANGES.md @@ -1,5 +1,8 @@ Change history of go-restful = +2017-09-13 +- added route condition functions using `.If(func)` in route building. + 2017-02-16 - solved issue #304, make operation names unique diff --git a/vendor/github.com/emicklei/go-restful/README.md b/vendor/github.com/emicklei/go-restful/README.md index cd1f2d0cc..002a08d96 100644 --- a/vendor/github.com/emicklei/go-restful/README.md +++ b/vendor/github.com/emicklei/go-restful/README.md @@ -56,7 +56,7 @@ func (u UserResource) findUser(request *restful.Request, response *restful.Respo - Content encoding (gzip,deflate) of request and response payloads - Automatic responses on OPTIONS (using a filter) - Automatic CORS request handling (using a filter) -- API declaration for Swagger UI (see [go-restful-swagger12](https://github.com/emicklei/go-restful-swagger12),[go-restful-openapi](https://github.com/emicklei/go-restful-openapi)) +- API declaration for Swagger UI ([go-restful-openapi](https://github.com/emicklei/go-restful-openapi), see [go-restful-swagger12](https://github.com/emicklei/go-restful-swagger12)) - Panic recovery to produce HTTP 500, customizable using RecoverHandler(...) - Route errors produce HTTP 404/405/406/415 errors, customizable using ServiceErrorHandler(...) - Configurable (trace) logging @@ -67,8 +67,9 @@ func (u UserResource) findUser(request *restful.Request, response *restful.Respo - [Example posted on blog](http://ernestmicklei.com/2012/11/go-restful-first-working-example/) - [Design explained on blog](http://ernestmicklei.com/2012/11/go-restful-api-design/) - [sourcegraph](https://sourcegraph.com/github.com/emicklei/go-restful) +- [showcase: Zazkia - tcp proxy for testing resiliency](https://github.com/emicklei/zazkia) - [showcase: Mora - MongoDB REST Api server](https://github.com/emicklei/mora) Type ```git shortlog -s``` for a full list of contributors. -© 2012 - 2017, http://ernestmicklei.com. MIT License. Contributions are welcome. \ No newline at end of file +© 2012 - 2017, http://ernestmicklei.com. MIT License. Contributions are welcome. diff --git a/vendor/github.com/emicklei/go-restful/bench_curly_test.go b/vendor/github.com/emicklei/go-restful/bench_curly_test.go new file mode 100644 index 000000000..db6a1a752 --- /dev/null +++ b/vendor/github.com/emicklei/go-restful/bench_curly_test.go @@ -0,0 +1,51 @@ +package restful + +import ( + "fmt" + "net/http" + "net/http/httptest" + "testing" +) + +func setupCurly(container *Container) []string { + wsCount := 26 + rtCount := 26 + urisCurly := []string{} + + container.Router(CurlyRouter{}) + for i := 0; i < wsCount; i++ { + root := fmt.Sprintf("/%s/{%s}/", string(i+97), string(i+97)) + ws := new(WebService).Path(root) + for j := 0; j < rtCount; j++ { + sub := fmt.Sprintf("/%s2/{%s2}", string(j+97), string(j+97)) + ws.Route(ws.GET(sub).Consumes("application/xml").Produces("application/xml").To(echoCurly)) + } + container.Add(ws) + for _, each := range ws.Routes() { + urisCurly = append(urisCurly, "http://bench.com"+each.Path) + } + } + return urisCurly +} + +func echoCurly(req *Request, resp *Response) {} + +func BenchmarkManyCurly(b *testing.B) { + container := NewContainer() + urisCurly := setupCurly(container) + b.ResetTimer() + for t := 0; t < b.N; t++ { + for r := 0; r < 1000; r++ { + for _, each := range urisCurly { + sendNoReturnTo(each, container, t) + } + } + } +} + +func sendNoReturnTo(address string, container *Container, t int) { + httpRequest, _ := http.NewRequest("GET", address, nil) + httpRequest.Header.Set("Accept", "application/xml") + httpWriter := httptest.NewRecorder() + container.dispatch(httpWriter, httpRequest) +} diff --git a/vendor/github.com/emicklei/go-restful/bench_test.go b/vendor/github.com/emicklei/go-restful/bench_test.go new file mode 100644 index 000000000..3e77c2d29 --- /dev/null +++ b/vendor/github.com/emicklei/go-restful/bench_test.go @@ -0,0 +1,43 @@ +package restful + +import ( + "fmt" + "io" + "testing" +) + +var uris = []string{} + +func setup(container *Container) { + wsCount := 26 + rtCount := 26 + + for i := 0; i < wsCount; i++ { + root := fmt.Sprintf("/%s/{%s}/", string(i+97), string(i+97)) + ws := new(WebService).Path(root) + for j := 0; j < rtCount; j++ { + sub := fmt.Sprintf("/%s2/{%s2}", string(j+97), string(j+97)) + ws.Route(ws.GET(sub).To(echo)) + } + container.Add(ws) + for _, each := range ws.Routes() { + uris = append(uris, "http://bench.com"+each.Path) + } + } +} + +func echo(req *Request, resp *Response) { + io.WriteString(resp.ResponseWriter, "echo") +} + +func BenchmarkMany(b *testing.B) { + container := NewContainer() + setup(container) + b.ResetTimer() + for t := 0; t < b.N; t++ { + for _, each := range uris { + // println(each) + sendItTo(each, container) + } + } +} diff --git a/vendor/github.com/emicklei/go-restful/compress_test.go b/vendor/github.com/emicklei/go-restful/compress_test.go new file mode 100644 index 000000000..cc3e93d54 --- /dev/null +++ b/vendor/github.com/emicklei/go-restful/compress_test.go @@ -0,0 +1,125 @@ +package restful + +import ( + "bytes" + "compress/gzip" + "compress/zlib" + "io" + "io/ioutil" + "net/http" + "net/http/httptest" + "testing" +) + +// go test -v -test.run TestGzip ...restful +func TestGzip(t *testing.T) { + EnableContentEncoding = true + httpRequest, _ := http.NewRequest("GET", "/test", nil) + httpRequest.Header.Set("Accept-Encoding", "gzip,deflate") + httpWriter := httptest.NewRecorder() + wanted, encoding := wantsCompressedResponse(httpRequest) + if !wanted { + t.Fatal("should accept gzip") + } + if encoding != "gzip" { + t.Fatal("expected gzip") + } + c, err := NewCompressingResponseWriter(httpWriter, encoding) + if err != nil { + t.Fatal(err.Error()) + } + c.Write([]byte("Hello World")) + c.Close() + if httpWriter.Header().Get("Content-Encoding") != "gzip" { + t.Fatal("Missing gzip header") + } + reader, err := gzip.NewReader(httpWriter.Body) + if err != nil { + t.Fatal(err.Error()) + } + data, err := ioutil.ReadAll(reader) + if err != nil { + t.Fatal(err.Error()) + } + if got, want := string(data), "Hello World"; got != want { + t.Errorf("got %v want %v", got, want) + } +} + +func TestDeflate(t *testing.T) { + EnableContentEncoding = true + httpRequest, _ := http.NewRequest("GET", "/test", nil) + httpRequest.Header.Set("Accept-Encoding", "deflate,gzip") + httpWriter := httptest.NewRecorder() + wanted, encoding := wantsCompressedResponse(httpRequest) + if !wanted { + t.Fatal("should accept deflate") + } + if encoding != "deflate" { + t.Fatal("expected deflate") + } + c, err := NewCompressingResponseWriter(httpWriter, encoding) + if err != nil { + t.Fatal(err.Error()) + } + c.Write([]byte("Hello World")) + c.Close() + if httpWriter.Header().Get("Content-Encoding") != "deflate" { + t.Fatal("Missing deflate header") + } + reader, err := zlib.NewReader(httpWriter.Body) + if err != nil { + t.Fatal(err.Error()) + } + data, err := ioutil.ReadAll(reader) + if err != nil { + t.Fatal(err.Error()) + } + if got, want := string(data), "Hello World"; got != want { + t.Errorf("got %v want %v", got, want) + } +} + +func TestGzipDecompressRequestBody(t *testing.T) { + b := new(bytes.Buffer) + w := newGzipWriter() + w.Reset(b) + io.WriteString(w, `{"msg":"hi"}`) + w.Flush() + w.Close() + + req := new(Request) + httpRequest, _ := http.NewRequest("GET", "/", bytes.NewReader(b.Bytes())) + httpRequest.Header.Set("Content-Type", "application/json") + httpRequest.Header.Set("Content-Encoding", "gzip") + req.Request = httpRequest + + doc := make(map[string]interface{}) + req.ReadEntity(&doc) + + if got, want := doc["msg"], "hi"; got != want { + t.Errorf("got %v want %v", got, want) + } +} + +func TestZlibDecompressRequestBody(t *testing.T) { + b := new(bytes.Buffer) + w := newZlibWriter() + w.Reset(b) + io.WriteString(w, `{"msg":"hi"}`) + w.Flush() + w.Close() + + req := new(Request) + httpRequest, _ := http.NewRequest("GET", "/", bytes.NewReader(b.Bytes())) + httpRequest.Header.Set("Content-Type", "application/json") + httpRequest.Header.Set("Content-Encoding", "deflate") + req.Request = httpRequest + + doc := make(map[string]interface{}) + req.ReadEntity(&doc) + + if got, want := doc["msg"], "hi"; got != want { + t.Errorf("got %v want %v", got, want) + } +} diff --git a/vendor/github.com/emicklei/go-restful/compressors.go b/vendor/github.com/emicklei/go-restful/compressors.go index cb32f7ef5..9db4a8c8e 100644 --- a/vendor/github.com/emicklei/go-restful/compressors.go +++ b/vendor/github.com/emicklei/go-restful/compressors.go @@ -15,20 +15,20 @@ type CompressorProvider interface { // Before using it, call Reset(). AcquireGzipWriter() *gzip.Writer - // Releases an aqcuired *gzip.Writer. + // Releases an acquired *gzip.Writer. ReleaseGzipWriter(w *gzip.Writer) // Returns a *gzip.Reader which needs to be released later. AcquireGzipReader() *gzip.Reader - // Releases an aqcuired *gzip.Reader. + // Releases an acquired *gzip.Reader. ReleaseGzipReader(w *gzip.Reader) // Returns a *zlib.Writer which needs to be released later. // Before using it, call Reset(). AcquireZlibWriter() *zlib.Writer - // Releases an aqcuired *zlib.Writer. + // Releases an acquired *zlib.Writer. ReleaseZlibWriter(w *zlib.Writer) } @@ -45,7 +45,7 @@ func CurrentCompressorProvider() CompressorProvider { return currentCompressorProvider } -// CompressorProvider sets the actual provider of compressors (zlib or gzip). +// SetCompressorProvider sets the actual provider of compressors (zlib or gzip). func SetCompressorProvider(p CompressorProvider) { if p == nil { panic("cannot set compressor provider to nil") diff --git a/vendor/github.com/emicklei/go-restful/container.go b/vendor/github.com/emicklei/go-restful/container.go index 657d5b6dd..4196180e5 100644 --- a/vendor/github.com/emicklei/go-restful/container.go +++ b/vendor/github.com/emicklei/go-restful/container.go @@ -140,7 +140,7 @@ func (c *Container) addHandler(service *WebService, serveMux *http.ServeMux) boo func (c *Container) Remove(ws *WebService) error { if c.ServeMux == http.DefaultServeMux { errMsg := fmt.Sprintf("[restful] cannot remove a WebService from a Container using the DefaultServeMux: ['%v']", ws) - log.Printf(errMsg) + log.Print(errMsg) return errors.New(errMsg) } c.webServicesLock.Lock() diff --git a/vendor/github.com/emicklei/go-restful/container_test.go b/vendor/github.com/emicklei/go-restful/container_test.go new file mode 100644 index 000000000..491c793ab --- /dev/null +++ b/vendor/github.com/emicklei/go-restful/container_test.go @@ -0,0 +1,83 @@ +package restful + +import ( + "net/http" + "net/http/httptest" + "testing" +) + +// go test -v -test.run TestContainer_computeAllowedMethods ...restful +func TestContainer_computeAllowedMethods(t *testing.T) { + wc := NewContainer() + ws1 := new(WebService).Path("/users") + ws1.Route(ws1.GET("{i}").To(dummy)) + ws1.Route(ws1.POST("{i}").To(dummy)) + wc.Add(ws1) + httpRequest, _ := http.NewRequest("GET", "http://api.his.com/users/1", nil) + rreq := Request{Request: httpRequest} + m := wc.computeAllowedMethods(&rreq) + if len(m) != 2 { + t.Errorf("got %d expected 2 methods, %v", len(m), m) + } +} + +func TestContainer_HandleWithFilter(t *testing.T) { + prefilterCalled := false + postfilterCalled := false + httpHandlerCalled := false + + wc := NewContainer() + wc.Filter(func(request *Request, response *Response, chain *FilterChain) { + prefilterCalled = true + chain.ProcessFilter(request, response) + }) + wc.HandleWithFilter("/", http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + httpHandlerCalled = true + w.Write([]byte("ok")) + })) + wc.Filter(func(request *Request, response *Response, chain *FilterChain) { + postfilterCalled = true + chain.ProcessFilter(request, response) + }) + + recorder := httptest.NewRecorder() + request, _ := http.NewRequest("GET", "/", nil) + wc.ServeHTTP(recorder, request) + if recorder.Code != http.StatusOK { + t.Errorf("unexpected code %d", recorder.Code) + } + if recorder.Body.String() != "ok" { + t.Errorf("unexpected body %s", recorder.Body.String()) + } + if !prefilterCalled { + t.Errorf("filter added before calling HandleWithFilter wasn't called") + } + if !postfilterCalled { + t.Errorf("filter added after calling HandleWithFilter wasn't called") + } + if !httpHandlerCalled { + t.Errorf("handler added by calling HandleWithFilter wasn't called") + } +} + +func TestContainerAddAndRemove(t *testing.T) { + ws1 := new(WebService).Path("/") + ws2 := new(WebService).Path("/users") + wc := NewContainer() + wc.Add(ws1) + wc.Add(ws2) + wc.Remove(ws2) + if len(wc.webServices) != 1 { + t.Errorf("expected one webservices") + } + if !wc.isRegisteredOnRoot { + t.Errorf("expected on root registered") + } + wc.Remove(ws1) + if len(wc.webServices) > 0 { + t.Errorf("expected zero webservices") + } + if wc.isRegisteredOnRoot { + t.Errorf("expected not on root registered") + } +} diff --git a/vendor/github.com/emicklei/go-restful/cors_filter_test.go b/vendor/github.com/emicklei/go-restful/cors_filter_test.go new file mode 100644 index 000000000..09c5d3300 --- /dev/null +++ b/vendor/github.com/emicklei/go-restful/cors_filter_test.go @@ -0,0 +1,129 @@ +package restful + +import ( + "net/http" + "net/http/httptest" + "testing" +) + +// go test -v -test.run TestCORSFilter_Preflight ...restful +// http://www.html5rocks.com/en/tutorials/cors/#toc-handling-a-not-so-simple-request +func TestCORSFilter_Preflight(t *testing.T) { + tearDown() + ws := new(WebService) + ws.Route(ws.PUT("/cors").To(dummy)) + Add(ws) + + cors := CrossOriginResourceSharing{ + ExposeHeaders: []string{"X-Custom-Header"}, + AllowedHeaders: []string{"X-Custom-Header", "X-Additional-Header"}, + CookiesAllowed: true, + Container: DefaultContainer} + Filter(cors.Filter) + + // Preflight + httpRequest, _ := http.NewRequest("OPTIONS", "http://api.alice.com/cors", nil) + httpRequest.Method = "OPTIONS" + httpRequest.Header.Set(HEADER_Origin, "http://api.bob.com") + httpRequest.Header.Set(HEADER_AccessControlRequestMethod, "PUT") + httpRequest.Header.Set(HEADER_AccessControlRequestHeaders, "X-Custom-Header, X-Additional-Header") + + httpWriter := httptest.NewRecorder() + DefaultContainer.Dispatch(httpWriter, httpRequest) + + actual := httpWriter.Header().Get(HEADER_AccessControlAllowOrigin) + if "http://api.bob.com" != actual { + t.Fatal("expected: http://api.bob.com but got:" + actual) + } + actual = httpWriter.Header().Get(HEADER_AccessControlAllowMethods) + if "PUT" != actual { + t.Fatal("expected: PUT but got:" + actual) + } + actual = httpWriter.Header().Get(HEADER_AccessControlAllowHeaders) + if "X-Custom-Header, X-Additional-Header" != actual { + t.Fatal("expected: X-Custom-Header, X-Additional-Header but got:" + actual) + } + + if !cors.isOriginAllowed("somewhere") { + t.Fatal("origin expected to be allowed") + } + cors.AllowedDomains = []string{"overthere.com"} + if cors.isOriginAllowed("somewhere") { + t.Fatal("origin [somewhere] expected NOT to be allowed") + } + if !cors.isOriginAllowed("overthere.com") { + t.Fatal("origin [overthere] expected to be allowed") + } + +} + +// go test -v -test.run TestCORSFilter_Actual ...restful +// http://www.html5rocks.com/en/tutorials/cors/#toc-handling-a-not-so-simple-request +func TestCORSFilter_Actual(t *testing.T) { + tearDown() + ws := new(WebService) + ws.Route(ws.PUT("/cors").To(dummy)) + Add(ws) + + cors := CrossOriginResourceSharing{ + ExposeHeaders: []string{"X-Custom-Header"}, + AllowedHeaders: []string{"X-Custom-Header", "X-Additional-Header"}, + CookiesAllowed: true, + Container: DefaultContainer} + Filter(cors.Filter) + + // Actual + httpRequest, _ := http.NewRequest("PUT", "http://api.alice.com/cors", nil) + httpRequest.Header.Set(HEADER_Origin, "http://api.bob.com") + httpRequest.Header.Set("X-Custom-Header", "value") + + httpWriter := httptest.NewRecorder() + DefaultContainer.Dispatch(httpWriter, httpRequest) + actual := httpWriter.Header().Get(HEADER_AccessControlAllowOrigin) + if "http://api.bob.com" != actual { + t.Fatal("expected: http://api.bob.com but got:" + actual) + } + if httpWriter.Body.String() != "dummy" { + t.Fatal("expected: dummy but got:" + httpWriter.Body.String()) + } +} + +var allowedDomainInput = []struct { + domains []string + origin string + allowed bool +}{ + {[]string{}, "http://anything.com", true}, + {[]string{"example.com"}, "example.com", true}, + {[]string{"example.com"}, "not-allowed", false}, + {[]string{"not-matching.com", "example.com"}, "example.com", true}, + {[]string{".*"}, "example.com", true}, +} + +// go test -v -test.run TestCORSFilter_AllowedDomains ...restful +func TestCORSFilter_AllowedDomains(t *testing.T) { + for _, each := range allowedDomainInput { + tearDown() + ws := new(WebService) + ws.Route(ws.PUT("/cors").To(dummy)) + Add(ws) + + cors := CrossOriginResourceSharing{ + AllowedDomains: each.domains, + CookiesAllowed: true, + Container: DefaultContainer} + Filter(cors.Filter) + + httpRequest, _ := http.NewRequest("PUT", "http://api.his.com/cors", nil) + httpRequest.Header.Set(HEADER_Origin, each.origin) + httpWriter := httptest.NewRecorder() + DefaultContainer.Dispatch(httpWriter, httpRequest) + actual := httpWriter.Header().Get(HEADER_AccessControlAllowOrigin) + if actual != each.origin && each.allowed { + t.Fatal("expected to be accepted") + } + if actual == each.origin && !each.allowed { + t.Fatal("did not expect to be accepted") + } + } +} diff --git a/vendor/github.com/emicklei/go-restful/curly_test.go b/vendor/github.com/emicklei/go-restful/curly_test.go new file mode 100644 index 000000000..bec017ca7 --- /dev/null +++ b/vendor/github.com/emicklei/go-restful/curly_test.go @@ -0,0 +1,231 @@ +package restful + +import ( + "io" + "net/http" + "testing" +) + +var requestPaths = []struct { + // url with path (1) is handled by service with root (2) and remainder has value final (3) + path, root string +}{ + {"/", "/"}, + {"/p", "/p"}, + {"/p/x", "/p/{q}"}, + {"/q/x", "/q"}, + {"/p/x/", "/p/{q}"}, + {"/p/x/y", "/p/{q}"}, + {"/q/x/y", "/q"}, + {"/z/q", "/{p}/q"}, + {"/a/b/c/q", "/"}, +} + +// go test -v -test.run TestCurlyDetectWebService ...restful +func TestCurlyDetectWebService(t *testing.T) { + ws1 := new(WebService).Path("/") + ws2 := new(WebService).Path("/p") + ws3 := new(WebService).Path("/q") + ws4 := new(WebService).Path("/p/q") + ws5 := new(WebService).Path("/p/{q}") + ws7 := new(WebService).Path("/{p}/q") + var wss = []*WebService{ws1, ws2, ws3, ws4, ws5, ws7} + + for _, each := range wss { + t.Logf("path=%s,toks=%v\n", each.pathExpr.Source, each.pathExpr.tokens) + } + + router := CurlyRouter{} + + ok := true + for i, fixture := range requestPaths { + requestTokens := tokenizePath(fixture.path) + who := router.detectWebService(requestTokens, wss) + if who != nil && who.RootPath() != fixture.root { + t.Logf("[line:%v] Unexpected dispatcher, expected:%v, actual:%v", i, fixture.root, who.RootPath()) + ok = false + } + } + if !ok { + t.Fail() + } +} + +var serviceDetects = []struct { + path string + found bool + root string +}{ + {"/a/b", true, "/{p}/{q}/{r}"}, + {"/p/q", true, "/p/q"}, + {"/q/p", true, "/q"}, + {"/", true, "/"}, + {"/p/q/r", true, "/p/q"}, +} + +// go test -v -test.run Test_detectWebService ...restful +func Test_detectWebService(t *testing.T) { + router := CurlyRouter{} + ws1 := new(WebService).Path("/") + ws2 := new(WebService).Path("/p") + ws3 := new(WebService).Path("/q") + ws4 := new(WebService).Path("/p/q") + ws5 := new(WebService).Path("/p/{q}") + ws6 := new(WebService).Path("/p/{q}/") + ws7 := new(WebService).Path("/{p}/q") + ws8 := new(WebService).Path("/{p}/{q}/{r}") + var wss = []*WebService{ws8, ws7, ws6, ws5, ws4, ws3, ws2, ws1} + for _, fix := range serviceDetects { + requestPath := fix.path + requestTokens := tokenizePath(requestPath) + for _, ws := range wss { + serviceTokens := ws.pathExpr.tokens + matches, score := router.computeWebserviceScore(requestTokens, serviceTokens) + t.Logf("req=%s,toks:%v,ws=%s,toks:%v,score=%d,matches=%v", requestPath, requestTokens, ws.RootPath(), serviceTokens, score, matches) + } + best := router.detectWebService(requestTokens, wss) + if best != nil { + if fix.found { + t.Logf("best=%s", best.RootPath()) + } else { + t.Fatalf("should have found:%s", fix.root) + } + } + } +} + +var routeMatchers = []struct { + route string + path string + matches bool + paramCount int + staticCount int +}{ + // route, request-path + {"/a", "/a", true, 0, 1}, + {"/a", "/b", false, 0, 0}, + {"/a", "/b", false, 0, 0}, + {"/a/{b}/c/", "/a/2/c", true, 1, 2}, + {"/{a}/{b}/{c}/", "/a/b", false, 0, 0}, + {"/{x:*}", "/", false, 0, 0}, + {"/{x:*}", "/a", true, 1, 0}, + {"/{x:*}", "/a/b", true, 1, 0}, + {"/a/{x:*}", "/a/b", true, 1, 1}, + {"/a/{x:[A-Z][A-Z]}", "/a/ZX", true, 1, 1}, + {"/basepath/{resource:*}", "/basepath/some/other/location/test.xml", true, 1, 1}, +} + +// clear && go test -v -test.run Test_matchesRouteByPathTokens ...restful +func Test_matchesRouteByPathTokens(t *testing.T) { + router := CurlyRouter{} + for i, each := range routeMatchers { + routeToks := tokenizePath(each.route) + reqToks := tokenizePath(each.path) + matches, pCount, sCount := router.matchesRouteByPathTokens(routeToks, reqToks) + if matches != each.matches { + t.Fatalf("[%d] unexpected matches outcome route:%s, path:%s, matches:%v", i, each.route, each.path, matches) + } + if pCount != each.paramCount { + t.Fatalf("[%d] unexpected paramCount got:%d want:%d ", i, pCount, each.paramCount) + } + if sCount != each.staticCount { + t.Fatalf("[%d] unexpected staticCount got:%d want:%d ", i, sCount, each.staticCount) + } + } +} + +// clear && go test -v -test.run TestExtractParameters_Wildcard1 ...restful +func TestExtractParameters_Wildcard1(t *testing.T) { + params := doExtractParams("/fixed/{var:*}", 2, "/fixed/remainder", t) + if params["var"] != "remainder" { + t.Errorf("parameter mismatch var: %s", params["var"]) + } +} + +// clear && go test -v -test.run TestExtractParameters_Wildcard2 ...restful +func TestExtractParameters_Wildcard2(t *testing.T) { + params := doExtractParams("/fixed/{var:*}", 2, "/fixed/remain/der", t) + if params["var"] != "remain/der" { + t.Errorf("parameter mismatch var: %s", params["var"]) + } +} + +// clear && go test -v -test.run TestExtractParameters_Wildcard3 ...restful +func TestExtractParameters_Wildcard3(t *testing.T) { + params := doExtractParams("/static/{var:*}", 2, "/static/test/sub/hi.html", t) + if params["var"] != "test/sub/hi.html" { + t.Errorf("parameter mismatch var: %s", params["var"]) + } +} + +// clear && go test -v -test.run TestCurly_ISSUE_34 ...restful +func TestCurly_ISSUE_34(t *testing.T) { + ws1 := new(WebService).Path("/") + ws1.Route(ws1.GET("/{type}/{id}").To(curlyDummy)) + ws1.Route(ws1.GET("/network/{id}").To(curlyDummy)) + croutes := CurlyRouter{}.selectRoutes(ws1, tokenizePath("/network/12")) + if len(croutes) != 2 { + t.Fatal("expected 2 routes") + } + if got, want := croutes[0].route.Path, "/network/{id}"; got != want { + t.Errorf("got %v want %v", got, want) + } +} + +// clear && go test -v -test.run TestCurly_ISSUE_34_2 ...restful +func TestCurly_ISSUE_34_2(t *testing.T) { + ws1 := new(WebService) + ws1.Route(ws1.GET("/network/{id}").To(curlyDummy)) + ws1.Route(ws1.GET("/{type}/{id}").To(curlyDummy)) + croutes := CurlyRouter{}.selectRoutes(ws1, tokenizePath("/network/12")) + if len(croutes) != 2 { + t.Fatal("expected 2 routes") + } + if got, want := croutes[0].route.Path, "/network/{id}"; got != want { + t.Errorf("got %v want %v", got, want) + } +} + +// clear && go test -v -test.run TestCurly_JsonHtml ...restful +func TestCurly_JsonHtml(t *testing.T) { + ws1 := new(WebService) + ws1.Path("/") + ws1.Route(ws1.GET("/some.html").To(curlyDummy).Consumes("*/*").Produces("text/html")) + req, _ := http.NewRequest("GET", "/some.html", nil) + req.Header.Set("Accept", "application/json") + _, route, err := CurlyRouter{}.SelectRoute([]*WebService{ws1}, req) + if err == nil { + t.Error("error expected") + } + if route != nil { + t.Error("no route expected") + } +} + +// go test -v -test.run TestCurly_ISSUE_137 ...restful +func TestCurly_ISSUE_137(t *testing.T) { + ws1 := new(WebService) + ws1.Route(ws1.GET("/hello").To(curlyDummy)) + ws1.Path("/") + req, _ := http.NewRequest("GET", "/", nil) + _, route, _ := CurlyRouter{}.SelectRoute([]*WebService{ws1}, req) + t.Log(route) + if route != nil { + t.Error("no route expected") + } +} + +// go test -v -test.run TestCurly_ISSUE_137_2 ...restful +func TestCurly_ISSUE_137_2(t *testing.T) { + ws1 := new(WebService) + ws1.Route(ws1.GET("/hello").To(curlyDummy)) + ws1.Path("/") + req, _ := http.NewRequest("GET", "/hello/bob", nil) + _, route, _ := CurlyRouter{}.SelectRoute([]*WebService{ws1}, req) + t.Log(route) + if route != nil { + t.Errorf("no route expected, got %v", route) + } +} + +func curlyDummy(req *Request, resp *Response) { io.WriteString(resp.ResponseWriter, "curlyDummy") } diff --git a/vendor/github.com/emicklei/go-restful/doc_examples_test.go b/vendor/github.com/emicklei/go-restful/doc_examples_test.go new file mode 100644 index 000000000..0af636e55 --- /dev/null +++ b/vendor/github.com/emicklei/go-restful/doc_examples_test.go @@ -0,0 +1,41 @@ +package restful + +import "net/http" + +func ExampleOPTIONSFilter() { + // Install the OPTIONS filter on the default Container + Filter(OPTIONSFilter()) +} +func ExampleContainer_OPTIONSFilter() { + // Install the OPTIONS filter on a Container + myContainer := new(Container) + myContainer.Filter(myContainer.OPTIONSFilter) +} + +func ExampleContainer() { + // The Default container of go-restful uses the http.DefaultServeMux. + // You can create your own Container using restful.NewContainer() and create a new http.Server for that particular container + + ws := new(WebService) + wsContainer := NewContainer() + wsContainer.Add(ws) + server := &http.Server{Addr: ":8080", Handler: wsContainer} + server.ListenAndServe() +} + +func ExampleCrossOriginResourceSharing() { + // To install this filter on the Default Container use: + cors := CrossOriginResourceSharing{ExposeHeaders: []string{"X-My-Header"}, CookiesAllowed: false, Container: DefaultContainer} + Filter(cors.Filter) +} + +func ExampleServiceError() { + resp := new(Response) + resp.WriteEntity(NewError(http.StatusBadRequest, "Non-integer {id} path parameter")) +} + +func ExampleBoundedCachedCompressors() { + // Register a compressor provider (gzip/deflate read/write) that uses + // a bounded cache with a maximum of 20 writers and 20 readers. + SetCompressorProvider(NewBoundedCachedCompressors(20, 20)) +} diff --git a/vendor/github.com/emicklei/go-restful/entity_accessors_test.go b/vendor/github.com/emicklei/go-restful/entity_accessors_test.go new file mode 100644 index 000000000..d1c1e1585 --- /dev/null +++ b/vendor/github.com/emicklei/go-restful/entity_accessors_test.go @@ -0,0 +1,69 @@ +package restful + +import ( + "bytes" + "fmt" + "io" + "net/http" + "net/http/httptest" + "reflect" + "testing" +) + +type keyvalue struct { + readCalled bool + writeCalled bool +} + +func (kv *keyvalue) Read(req *Request, v interface{}) error { + //t := reflect.TypeOf(v) + //rv := reflect.ValueOf(v) + kv.readCalled = true + return nil +} + +func (kv *keyvalue) Write(resp *Response, status int, v interface{}) error { + t := reflect.TypeOf(v) + rv := reflect.ValueOf(v) + for ix := 0; ix < t.NumField(); ix++ { + sf := t.Field(ix) + io.WriteString(resp, sf.Name) + io.WriteString(resp, "=") + io.WriteString(resp, fmt.Sprintf("%v\n", rv.Field(ix).Interface())) + } + kv.writeCalled = true + return nil +} + +// go test -v -test.run TestKeyValueEncoding ...restful +func TestKeyValueEncoding(t *testing.T) { + type Book struct { + Title string + Author string + PublishedYear int + } + kv := new(keyvalue) + RegisterEntityAccessor("application/kv", kv) + b := Book{"Singing for Dummies", "john doe", 2015} + + // Write + httpWriter := httptest.NewRecorder() + // Accept Produces + resp := Response{ResponseWriter: httpWriter, requestAccept: "application/kv,*/*;q=0.8", routeProduces: []string{"application/kv"}, prettyPrint: true} + resp.WriteEntity(b) + t.Log(string(httpWriter.Body.Bytes())) + if !kv.writeCalled { + t.Error("Write never called") + } + + // Read + bodyReader := bytes.NewReader(httpWriter.Body.Bytes()) + httpRequest, _ := http.NewRequest("GET", "/test", bodyReader) + httpRequest.Header.Set("Content-Type", "application/kv; charset=UTF-8") + request := NewRequest(httpRequest) + var bb Book + request.ReadEntity(&bb) + if !kv.readCalled { + t.Error("Read never called") + } +} diff --git a/vendor/github.com/emicklei/go-restful/filter_test.go b/vendor/github.com/emicklei/go-restful/filter_test.go new file mode 100644 index 000000000..fadfb570f --- /dev/null +++ b/vendor/github.com/emicklei/go-restful/filter_test.go @@ -0,0 +1,141 @@ +package restful + +import ( + "io" + "net/http" + "net/http/httptest" + "testing" +) + +func setupServices(addGlobalFilter bool, addServiceFilter bool, addRouteFilter bool) { + if addGlobalFilter { + Filter(globalFilter) + } + Add(newTestService(addServiceFilter, addRouteFilter)) +} + +func tearDown() { + DefaultContainer.webServices = []*WebService{} + DefaultContainer.isRegisteredOnRoot = true // this allows for setupServices multiple times + DefaultContainer.containerFilters = []FilterFunction{} +} + +func newTestService(addServiceFilter bool, addRouteFilter bool) *WebService { + ws := new(WebService).Path("") + if addServiceFilter { + ws.Filter(serviceFilter) + } + rb := ws.GET("/foo").To(foo) + if addRouteFilter { + rb.Filter(routeFilter) + } + ws.Route(rb) + ws.Route(ws.GET("/bar").To(bar)) + return ws +} + +func foo(req *Request, resp *Response) { + io.WriteString(resp.ResponseWriter, "foo") +} + +func bar(req *Request, resp *Response) { + io.WriteString(resp.ResponseWriter, "bar") +} + +func fail(req *Request, resp *Response) { + http.Error(resp.ResponseWriter, "something failed", http.StatusInternalServerError) +} + +func globalFilter(req *Request, resp *Response, chain *FilterChain) { + io.WriteString(resp.ResponseWriter, "global-") + chain.ProcessFilter(req, resp) +} + +func serviceFilter(req *Request, resp *Response, chain *FilterChain) { + io.WriteString(resp.ResponseWriter, "service-") + chain.ProcessFilter(req, resp) +} + +func routeFilter(req *Request, resp *Response, chain *FilterChain) { + io.WriteString(resp.ResponseWriter, "route-") + chain.ProcessFilter(req, resp) +} + +func TestNoFilter(t *testing.T) { + tearDown() + setupServices(false, false, false) + actual := sendIt("http://example.com/foo") + if "foo" != actual { + t.Fatal("expected: foo but got:" + actual) + } +} + +func TestGlobalFilter(t *testing.T) { + tearDown() + setupServices(true, false, false) + actual := sendIt("http://example.com/foo") + if "global-foo" != actual { + t.Fatal("expected: global-foo but got:" + actual) + } +} + +func TestWebServiceFilter(t *testing.T) { + tearDown() + setupServices(true, true, false) + actual := sendIt("http://example.com/foo") + if "global-service-foo" != actual { + t.Fatal("expected: global-service-foo but got:" + actual) + } +} + +func TestRouteFilter(t *testing.T) { + tearDown() + setupServices(true, true, true) + actual := sendIt("http://example.com/foo") + if "global-service-route-foo" != actual { + t.Fatal("expected: global-service-route-foo but got:" + actual) + } +} + +func TestRouteFilterOnly(t *testing.T) { + tearDown() + setupServices(false, false, true) + actual := sendIt("http://example.com/foo") + if "route-foo" != actual { + t.Fatal("expected: route-foo but got:" + actual) + } +} + +func TestBar(t *testing.T) { + tearDown() + setupServices(false, true, false) + actual := sendIt("http://example.com/bar") + if "service-bar" != actual { + t.Fatal("expected: service-bar but got:" + actual) + } +} + +func TestAllFiltersBar(t *testing.T) { + tearDown() + setupServices(true, true, true) + actual := sendIt("http://example.com/bar") + if "global-service-bar" != actual { + t.Fatal("expected: global-service-bar but got:" + actual) + } +} + +func sendIt(address string) string { + httpRequest, _ := http.NewRequest("GET", address, nil) + httpRequest.Header.Set("Accept", "*/*") + httpWriter := httptest.NewRecorder() + DefaultContainer.dispatch(httpWriter, httpRequest) + return httpWriter.Body.String() +} + +func sendItTo(address string, container *Container) string { + httpRequest, _ := http.NewRequest("GET", address, nil) + httpRequest.Header.Set("Accept", "*/*") + httpWriter := httptest.NewRecorder() + container.dispatch(httpWriter, httpRequest) + return httpWriter.Body.String() +} diff --git a/vendor/github.com/emicklei/go-restful/jsr311.go b/vendor/github.com/emicklei/go-restful/jsr311.go index 511444ac6..9e8122416 100644 --- a/vendor/github.com/emicklei/go-restful/jsr311.go +++ b/vendor/github.com/emicklei/go-restful/jsr311.go @@ -41,9 +41,29 @@ func (r RouterJSR311) SelectRoute( // http://jsr311.java.net/nonav/releases/1.1/spec/spec3.html#x3-360003.7.2 func (r RouterJSR311) detectRoute(routes []Route, httpRequest *http.Request) (*Route, error) { + ifOk := []Route{} + for _, each := range routes { + ok := true + for _, fn := range each.If { + if !fn(httpRequest) { + ok = false + break + } + } + if ok { + ifOk = append(ifOk, each) + } + } + if len(ifOk) == 0 { + if trace { + traceLogger.Printf("no Route found (from %d) that passes conditional checks", len(routes)) + } + return nil, NewError(http.StatusNotFound, "404: Not Found") + } + // http method methodOk := []Route{} - for _, each := range routes { + for _, each := range ifOk { if httpRequest.Method == each.Method { methodOk = append(methodOk, each) } diff --git a/vendor/github.com/emicklei/go-restful/jsr311_test.go b/vendor/github.com/emicklei/go-restful/jsr311_test.go new file mode 100644 index 000000000..ecde60366 --- /dev/null +++ b/vendor/github.com/emicklei/go-restful/jsr311_test.go @@ -0,0 +1,251 @@ +package restful + +import ( + "io" + "net/http" + "sort" + "testing" +) + +// +// Step 1 tests +// +var paths = []struct { + // url with path (1) is handled by service with root (2) and last capturing group has value final (3) + path, root, final string +}{ + {"/", "/", "/"}, + {"/p", "/p", ""}, + {"/p/x", "/p/{q}", ""}, + {"/q/x", "/q", "/x"}, + {"/p/x/", "/p/{q}", "/"}, + {"/p/x/y", "/p/{q}", "/y"}, + {"/q/x/y", "/q", "/x/y"}, + {"/z/q", "/{p}/q", ""}, + {"/a/b/c/q", "/", "/a/b/c/q"}, +} + +func TestDetectDispatcher(t *testing.T) { + ws1 := new(WebService).Path("/") + ws2 := new(WebService).Path("/p") + ws3 := new(WebService).Path("/q") + ws4 := new(WebService).Path("/p/q") + ws5 := new(WebService).Path("/p/{q}") + ws6 := new(WebService).Path("/p/{q}/") + ws7 := new(WebService).Path("/{p}/q") + var dispatchers = []*WebService{ws1, ws2, ws3, ws4, ws5, ws6, ws7} + + wc := NewContainer() + for _, each := range dispatchers { + wc.Add(each) + } + + router := RouterJSR311{} + + ok := true + for i, fixture := range paths { + who, final, err := router.detectDispatcher(fixture.path, dispatchers) + if err != nil { + t.Logf("error in detection:%v", err) + ok = false + } + if who.RootPath() != fixture.root { + t.Logf("[line:%v] Unexpected dispatcher, expected:%v, actual:%v", i, fixture.root, who.RootPath()) + ok = false + } + if final != fixture.final { + t.Logf("[line:%v] Unexpected final, expected:%v, actual:%v", i, fixture.final, final) + ok = false + } + } + if !ok { + t.Fail() + } +} + +// +// Step 2 tests +// + +// go test -v -test.run TestISSUE_179 ...restful +func TestISSUE_179(t *testing.T) { + ws1 := new(WebService) + ws1.Route(ws1.GET("/v1/category/{param:*}").To(dummy)) + routes := RouterJSR311{}.selectRoutes(ws1, "/v1/category/sub/sub") + t.Logf("%v", routes) +} + +// go test -v -test.run TestISSUE_30 ...restful +func TestISSUE_30(t *testing.T) { + ws1 := new(WebService).Path("/users") + ws1.Route(ws1.GET("/{id}").To(dummy)) + ws1.Route(ws1.POST("/login").To(dummy)) + routes := RouterJSR311{}.selectRoutes(ws1, "/login") + if len(routes) != 2 { + t.Fatal("expected 2 routes") + } + if routes[0].Path != "/users/login" { + t.Error("first is", routes[0].Path) + t.Logf("routes:%v", routes) + } +} + +// go test -v -test.run TestISSUE_34 ...restful +func TestISSUE_34(t *testing.T) { + ws1 := new(WebService).Path("/") + ws1.Route(ws1.GET("/{type}/{id}").To(dummy)) + ws1.Route(ws1.GET("/network/{id}").To(dummy)) + routes := RouterJSR311{}.selectRoutes(ws1, "/network/12") + if len(routes) != 2 { + t.Fatal("expected 2 routes") + } + if routes[0].Path != "/network/{id}" { + t.Error("first is", routes[0].Path) + t.Logf("routes:%v", routes) + } +} + +// go test -v -test.run TestISSUE_34_2 ...restful +func TestISSUE_34_2(t *testing.T) { + ws1 := new(WebService).Path("/") + // change the registration order + ws1.Route(ws1.GET("/network/{id}").To(dummy)) + ws1.Route(ws1.GET("/{type}/{id}").To(dummy)) + routes := RouterJSR311{}.selectRoutes(ws1, "/network/12") + if len(routes) != 2 { + t.Fatal("expected 2 routes") + } + if routes[0].Path != "/network/{id}" { + t.Error("first is", routes[0].Path) + } +} + +// go test -v -test.run TestISSUE_137 ...restful +func TestISSUE_137(t *testing.T) { + ws1 := new(WebService) + ws1.Route(ws1.GET("/hello").To(dummy)) + routes := RouterJSR311{}.selectRoutes(ws1, "/") + t.Log(routes) + if len(routes) > 0 { + t.Error("no route expected") + } +} + +func TestSelectRoutesSlash(t *testing.T) { + ws1 := new(WebService).Path("/") + ws1.Route(ws1.GET("").To(dummy)) + ws1.Route(ws1.GET("/").To(dummy)) + ws1.Route(ws1.GET("/u").To(dummy)) + ws1.Route(ws1.POST("/u").To(dummy)) + ws1.Route(ws1.POST("/u/v").To(dummy)) + ws1.Route(ws1.POST("/u/{w}").To(dummy)) + ws1.Route(ws1.POST("/u/{w}/z").To(dummy)) + routes := RouterJSR311{}.selectRoutes(ws1, "/u") + checkRoutesContains(routes, "/u", t) + checkRoutesContainsNo(routes, "/u/v", t) + checkRoutesContainsNo(routes, "/", t) + checkRoutesContainsNo(routes, "/u/{w}/z", t) +} +func TestSelectRoutesU(t *testing.T) { + ws1 := new(WebService).Path("/u") + ws1.Route(ws1.GET("").To(dummy)) + ws1.Route(ws1.GET("/").To(dummy)) + ws1.Route(ws1.GET("/v").To(dummy)) + ws1.Route(ws1.POST("/{w}").To(dummy)) + ws1.Route(ws1.POST("/{w}/z").To(dummy)) // so full path = /u/{w}/z + routes := RouterJSR311{}.selectRoutes(ws1, "/v") // test against /u/v + checkRoutesContains(routes, "/u/{w}", t) +} + +func TestSelectRoutesUsers1(t *testing.T) { + ws1 := new(WebService).Path("/users") + ws1.Route(ws1.POST("").To(dummy)) + ws1.Route(ws1.POST("/").To(dummy)) + ws1.Route(ws1.PUT("/{id}").To(dummy)) + routes := RouterJSR311{}.selectRoutes(ws1, "/1") + checkRoutesContains(routes, "/users/{id}", t) +} +func checkRoutesContains(routes []Route, path string, t *testing.T) { + if !containsRoutePath(routes, path, t) { + for _, r := range routes { + t.Logf("route %v %v", r.Method, r.Path) + } + t.Fatalf("routes should include [%v]:", path) + } +} +func checkRoutesContainsNo(routes []Route, path string, t *testing.T) { + if containsRoutePath(routes, path, t) { + for _, r := range routes { + t.Logf("route %v %v", r.Method, r.Path) + } + t.Fatalf("routes should not include [%v]:", path) + } +} +func containsRoutePath(routes []Route, path string, t *testing.T) bool { + for _, each := range routes { + if each.Path == path { + return true + } + } + return false +} + +// go test -v -test.run TestSortableRouteCandidates ...restful +func TestSortableRouteCandidates(t *testing.T) { + fixture := &sortableRouteCandidates{} + r1 := routeCandidate{matchesCount: 0, literalCount: 0, nonDefaultCount: 0} + r2 := routeCandidate{matchesCount: 0, literalCount: 0, nonDefaultCount: 1} + r3 := routeCandidate{matchesCount: 0, literalCount: 1, nonDefaultCount: 1} + r4 := routeCandidate{matchesCount: 1, literalCount: 1, nonDefaultCount: 0} + r5 := routeCandidate{matchesCount: 1, literalCount: 0, nonDefaultCount: 0} + fixture.candidates = append(fixture.candidates, r5, r4, r3, r2, r1) + sort.Sort(sort.Reverse(fixture)) + first := fixture.candidates[0] + if first.matchesCount != 1 && first.literalCount != 1 && first.nonDefaultCount != 0 { + t.Fatal("expected r4") + } + last := fixture.candidates[len(fixture.candidates)-1] + if last.matchesCount != 0 && last.literalCount != 0 && last.nonDefaultCount != 0 { + t.Fatal("expected r1") + } +} + +func TestDetectRouteReturns404IfNoRoutePassesConditions(t *testing.T) { + called := false + shouldNotBeCalledButWas := false + + routes := []Route{ + new(RouteBuilder).To(dummy). + If(func(req *http.Request) bool { return false }). + Build(), + + // check that condition functions are called in order + new(RouteBuilder). + To(dummy). + If(func(req *http.Request) bool { return true }). + If(func(req *http.Request) bool { called = true; return false }). + Build(), + + // check that condition functions short circuit + new(RouteBuilder). + To(dummy). + If(func(req *http.Request) bool { return false }). + If(func(req *http.Request) bool { shouldNotBeCalledButWas = true; return false }). + Build(), + } + + _, err := RouterJSR311{}.detectRoute(routes, (*http.Request)(nil)) + if se := err.(ServiceError); se.Code != 404 { + t.Fatalf("expected 404, got %d", se.Code) + } + + if !called { + t.Fatal("expected condition function to get called, but it wasn't") + } + + if shouldNotBeCalledButWas { + t.Fatal("expected condition function to not be called, but it was") + } +} + +func dummy(req *Request, resp *Response) { io.WriteString(resp.ResponseWriter, "dummy") } diff --git a/vendor/github.com/emicklei/go-restful/logger.go b/vendor/github.com/emicklei/go-restful/logger.go index 3f1c4db86..6595df002 100644 --- a/vendor/github.com/emicklei/go-restful/logger.go +++ b/vendor/github.com/emicklei/go-restful/logger.go @@ -21,7 +21,7 @@ func TraceLogger(logger log.StdLogger) { EnableTracing(logger != nil) } -// expose the setter for the global logger on the top-level package +// SetLogger exposes the setter for the global logger on the top-level package func SetLogger(customLogger log.StdLogger) { log.SetLogger(customLogger) } diff --git a/vendor/github.com/emicklei/go-restful/mime_test.go b/vendor/github.com/emicklei/go-restful/mime_test.go new file mode 100644 index 000000000..a910bb100 --- /dev/null +++ b/vendor/github.com/emicklei/go-restful/mime_test.go @@ -0,0 +1,17 @@ +package restful + +import ( + "fmt" + "testing" +) + +// go test -v -test.run TestSortMimes ...restful +func TestSortMimes(t *testing.T) { + accept := "text/html; q=0.8, text/plain, image/gif, */*; q=0.01, image/jpeg" + result := sortedMimes(accept) + got := fmt.Sprintf("%v", result) + want := "[{text/plain 1} {image/gif 1} {image/jpeg 1} {text/html 0.8} {*/* 0.01}]" + if got != want { + t.Errorf("bad sort order of mime types:%s", got) + } +} diff --git a/vendor/github.com/emicklei/go-restful/options_filter.go b/vendor/github.com/emicklei/go-restful/options_filter.go index 4514eadcf..5c1b34251 100644 --- a/vendor/github.com/emicklei/go-restful/options_filter.go +++ b/vendor/github.com/emicklei/go-restful/options_filter.go @@ -15,7 +15,15 @@ func (c *Container) OPTIONSFilter(req *Request, resp *Response, chain *FilterCha chain.ProcessFilter(req, resp) return } - resp.AddHeader(HEADER_Allow, strings.Join(c.computeAllowedMethods(req), ",")) + + archs := req.Request.Header.Get(HEADER_AccessControlRequestHeaders) + methods := strings.Join(c.computeAllowedMethods(req), ",") + origin := req.Request.Header.Get(HEADER_Origin) + + resp.AddHeader(HEADER_Allow, methods) + resp.AddHeader(HEADER_AccessControlAllowOrigin, origin) + resp.AddHeader(HEADER_AccessControlAllowHeaders, archs) + resp.AddHeader(HEADER_AccessControlAllowMethods, methods) } // OPTIONSFilter is a filter function that inspects the Http Request for the OPTIONS method diff --git a/vendor/github.com/emicklei/go-restful/options_filter_test.go b/vendor/github.com/emicklei/go-restful/options_filter_test.go new file mode 100644 index 000000000..f0fceb834 --- /dev/null +++ b/vendor/github.com/emicklei/go-restful/options_filter_test.go @@ -0,0 +1,34 @@ +package restful + +import ( + "net/http" + "net/http/httptest" + "testing" +) + +// go test -v -test.run TestOptionsFilter ...restful +func TestOptionsFilter(t *testing.T) { + tearDown() + ws := new(WebService) + ws.Route(ws.GET("/candy/{kind}").To(dummy)) + ws.Route(ws.DELETE("/candy/{kind}").To(dummy)) + ws.Route(ws.POST("/candies").To(dummy)) + Add(ws) + Filter(OPTIONSFilter()) + + httpRequest, _ := http.NewRequest("OPTIONS", "http://here.io/candy/gum", nil) + httpWriter := httptest.NewRecorder() + DefaultContainer.dispatch(httpWriter, httpRequest) + actual := httpWriter.Header().Get(HEADER_Allow) + if "GET,DELETE" != actual { + t.Fatal("expected: GET,DELETE but got:" + actual) + } + + httpRequest, _ = http.NewRequest("OPTIONS", "http://here.io/candies", nil) + httpWriter = httptest.NewRecorder() + DefaultContainer.dispatch(httpWriter, httpRequest) + actual = httpWriter.Header().Get(HEADER_Allow) + if "POST" != actual { + t.Fatal("expected: POST but got:" + actual) + } +} diff --git a/vendor/github.com/emicklei/go-restful/path_expression_test.go b/vendor/github.com/emicklei/go-restful/path_expression_test.go new file mode 100644 index 000000000..334fcef73 --- /dev/null +++ b/vendor/github.com/emicklei/go-restful/path_expression_test.go @@ -0,0 +1,37 @@ +package restful + +import "testing" + +var tempregexs = []struct { + template, regex string + literalCount, varCount int +}{ + {"", "^(/.*)?$", 0, 0}, + {"/a/{b}/c/", "^/a/([^/]+?)/c(/.*)?$", 2, 1}, + {"/{a}/{b}/{c-d-e}/", "^/([^/]+?)/([^/]+?)/([^/]+?)(/.*)?$", 0, 3}, + {"/{p}/abcde", "^/([^/]+?)/abcde(/.*)?$", 5, 1}, + {"/a/{b:*}", "^/a/(.*)(/.*)?$", 1, 1}, + {"/a/{b:[a-z]+}", "^/a/([a-z]+)(/.*)?$", 1, 1}, +} + +func TestTemplateToRegularExpression(t *testing.T) { + ok := true + for i, fixture := range tempregexs { + actual, lCount, vCount, _ := templateToRegularExpression(fixture.template) + if actual != fixture.regex { + t.Logf("regex mismatch, expected:%v , actual:%v, line:%v\n", fixture.regex, actual, i) // 11 = where the data starts + ok = false + } + if lCount != fixture.literalCount { + t.Logf("literal count mismatch, expected:%v , actual:%v, line:%v\n", fixture.literalCount, lCount, i) + ok = false + } + if vCount != fixture.varCount { + t.Logf("variable count mismatch, expected:%v , actual:%v, line:%v\n", fixture.varCount, vCount, i) + ok = false + } + } + if !ok { + t.Fatal("one or more expression did not match") + } +} diff --git a/vendor/github.com/emicklei/go-restful/request_test.go b/vendor/github.com/emicklei/go-restful/request_test.go new file mode 100644 index 000000000..31f509659 --- /dev/null +++ b/vendor/github.com/emicklei/go-restful/request_test.go @@ -0,0 +1,141 @@ +package restful + +import ( + "encoding/json" + "net/http" + "net/url" + "strconv" + "strings" + "testing" +) + +func TestQueryParameter(t *testing.T) { + hreq := http.Request{Method: "GET"} + hreq.URL, _ = url.Parse("http://www.google.com/search?q=foo&q=bar") + rreq := Request{Request: &hreq} + if rreq.QueryParameter("q") != "foo" { + t.Errorf("q!=foo %#v", rreq) + } +} + +type Anything map[string]interface{} + +type Number struct { + ValueFloat float64 + ValueInt int64 +} + +type Sample struct { + Value string +} + +func TestReadEntityJson(t *testing.T) { + bodyReader := strings.NewReader(`{"Value" : "42"}`) + httpRequest, _ := http.NewRequest("GET", "/test", bodyReader) + httpRequest.Header.Set("Content-Type", "application/json") + request := &Request{Request: httpRequest} + sam := new(Sample) + request.ReadEntity(sam) + if sam.Value != "42" { + t.Fatal("read failed") + } +} + +func TestReadEntityJsonCharset(t *testing.T) { + bodyReader := strings.NewReader(`{"Value" : "42"}`) + httpRequest, _ := http.NewRequest("GET", "/test", bodyReader) + httpRequest.Header.Set("Content-Type", "application/json; charset=UTF-8") + request := NewRequest(httpRequest) + sam := new(Sample) + request.ReadEntity(sam) + if sam.Value != "42" { + t.Fatal("read failed") + } +} + +func TestReadEntityJsonNumber(t *testing.T) { + bodyReader := strings.NewReader(`{"Value" : 4899710515899924123}`) + httpRequest, _ := http.NewRequest("GET", "/test", bodyReader) + httpRequest.Header.Set("Content-Type", "application/json") + request := &Request{Request: httpRequest} + any := make(Anything) + request.ReadEntity(&any) + number, ok := any["Value"].(json.Number) + if !ok { + t.Fatal("read failed") + } + vint, err := number.Int64() + if err != nil { + t.Fatal("convert failed") + } + if vint != 4899710515899924123 { + t.Fatal("read failed") + } + vfloat, err := number.Float64() + if err != nil { + t.Fatal("convert failed") + } + // match the default behaviour + vstring := strconv.FormatFloat(vfloat, 'e', 15, 64) + if vstring != "4.899710515899924e+18" { + t.Fatal("convert float64 failed") + } +} + +func TestReadEntityJsonLong(t *testing.T) { + bodyReader := strings.NewReader(`{"ValueFloat" : 4899710515899924123, "ValueInt": 4899710515899924123}`) + httpRequest, _ := http.NewRequest("GET", "/test", bodyReader) + httpRequest.Header.Set("Content-Type", "application/json") + request := &Request{Request: httpRequest} + number := new(Number) + request.ReadEntity(&number) + if number.ValueInt != 4899710515899924123 { + t.Fatal("read failed") + } + // match the default behaviour + vstring := strconv.FormatFloat(number.ValueFloat, 'e', 15, 64) + if vstring != "4.899710515899924e+18" { + t.Fatal("convert float64 failed") + } +} + +func TestBodyParameter(t *testing.T) { + bodyReader := strings.NewReader(`value1=42&value2=43`) + httpRequest, _ := http.NewRequest("POST", "/test?value1=44", bodyReader) // POST and PUT body parameters take precedence over URL query string + httpRequest.Header.Set("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8") + request := NewRequest(httpRequest) + v1, err := request.BodyParameter("value1") + if err != nil { + t.Error(err) + } + v2, err := request.BodyParameter("value2") + if err != nil { + t.Error(err) + } + if v1 != "42" || v2 != "43" { + t.Fatal("read failed") + } +} + +func TestReadEntityUnkown(t *testing.T) { + bodyReader := strings.NewReader("?") + httpRequest, _ := http.NewRequest("GET", "/test", bodyReader) + httpRequest.Header.Set("Content-Type", "application/rubbish") + request := NewRequest(httpRequest) + sam := new(Sample) + err := request.ReadEntity(sam) + if err == nil { + t.Fatal("read should be in error") + } +} + +func TestSetAttribute(t *testing.T) { + bodyReader := strings.NewReader("?") + httpRequest, _ := http.NewRequest("GET", "/test", bodyReader) + request := NewRequest(httpRequest) + request.SetAttribute("go", "there") + there := request.Attribute("go") + if there != "there" { + t.Fatalf("missing request attribute:%v", there) + } +} diff --git a/vendor/github.com/emicklei/go-restful/response.go b/vendor/github.com/emicklei/go-restful/response.go index 3b33ab220..4d987d130 100644 --- a/vendor/github.com/emicklei/go-restful/response.go +++ b/vendor/github.com/emicklei/go-restful/response.go @@ -5,7 +5,9 @@ package restful // that can be found in the LICENSE file. import ( + "bufio" "errors" + "net" "net/http" ) @@ -19,17 +21,19 @@ var PrettyPrintResponses = true // It provides several convenience methods to prepare and write response content. type Response struct { http.ResponseWriter - requestAccept string // mime-type what the Http Request says it wants to receive - routeProduces []string // mime-types what the Route says it can produce - statusCode int // HTTP status code that has been written explicity (if zero then net/http has written 200) - contentLength int // number of bytes written for the response body - prettyPrint bool // controls the indentation feature of XML and JSON serialization. It is initialized using var PrettyPrintResponses. - err error // err property is kept when WriteError is called + requestAccept string // mime-type what the Http Request says it wants to receive + routeProduces []string // mime-types what the Route says it can produce + statusCode int // HTTP status code that has been written explicitly (if zero then net/http has written 200) + contentLength int // number of bytes written for the response body + prettyPrint bool // controls the indentation feature of XML and JSON serialization. It is initialized using var PrettyPrintResponses. + err error // err property is kept when WriteError is called + hijacker http.Hijacker // if underlying ResponseWriter supports it } // NewResponse creates a new response based on a http ResponseWriter. func NewResponse(httpWriter http.ResponseWriter) *Response { - return &Response{httpWriter, "", []string{}, http.StatusOK, 0, PrettyPrintResponses, nil} // empty content-types + hijacker, _ := httpWriter.(http.Hijacker) + return &Response{ResponseWriter: httpWriter, routeProduces: []string{}, statusCode: http.StatusOK, prettyPrint: PrettyPrintResponses, hijacker: hijacker} } // DefaultResponseContentType set a default. @@ -48,6 +52,16 @@ func (r Response) InternalServerError() Response { return r } +// Hijack implements the http.Hijacker interface. This expands +// the Response to fulfill http.Hijacker if the underlying +// http.ResponseWriter supports it. +func (r *Response) Hijack() (net.Conn, *bufio.ReadWriter, error) { + if r.hijacker == nil { + return nil, nil, errors.New("http.Hijacker not implemented by underlying http.ResponseWriter") + } + return r.hijacker.Hijack() +} + // PrettyPrint changes whether this response must produce pretty (line-by-line, indented) JSON or XML output. func (r *Response) PrettyPrint(bePretty bool) { r.prettyPrint = bePretty diff --git a/vendor/github.com/emicklei/go-restful/response_test.go b/vendor/github.com/emicklei/go-restful/response_test.go new file mode 100644 index 000000000..0587c40b4 --- /dev/null +++ b/vendor/github.com/emicklei/go-restful/response_test.go @@ -0,0 +1,213 @@ +package restful + +import ( + "errors" + "net/http" + "net/http/httptest" + "strings" + "testing" +) + +func TestWriteHeader(t *testing.T) { + httpWriter := httptest.NewRecorder() + resp := Response{ResponseWriter: httpWriter, requestAccept: "*/*", routeProduces: []string{"*/*"}, prettyPrint: true} + resp.WriteHeader(123) + if resp.StatusCode() != 123 { + t.Errorf("Unexpected status code:%d", resp.StatusCode()) + } +} + +func TestNoWriteHeader(t *testing.T) { + httpWriter := httptest.NewRecorder() + resp := Response{ResponseWriter: httpWriter, requestAccept: "*/*", routeProduces: []string{"*/*"}, prettyPrint: true} + if resp.StatusCode() != http.StatusOK { + t.Errorf("Unexpected status code:%d", resp.StatusCode()) + } +} + +type food struct { + Kind string +} + +// go test -v -test.run TestMeasureContentLengthXml ...restful +func TestMeasureContentLengthXml(t *testing.T) { + httpWriter := httptest.NewRecorder() + resp := Response{ResponseWriter: httpWriter, requestAccept: "*/*", routeProduces: []string{"*/*"}, prettyPrint: true} + resp.WriteAsXml(food{"apple"}) + if resp.ContentLength() != 76 { + t.Errorf("Incorrect measured length:%d", resp.ContentLength()) + } +} + +// go test -v -test.run TestMeasureContentLengthJson ...restful +func TestMeasureContentLengthJson(t *testing.T) { + httpWriter := httptest.NewRecorder() + resp := Response{ResponseWriter: httpWriter, requestAccept: "*/*", routeProduces: []string{"*/*"}, prettyPrint: true} + resp.WriteAsJson(food{"apple"}) + if resp.ContentLength() != 22 { + t.Errorf("Incorrect measured length:%d", resp.ContentLength()) + } +} + +// go test -v -test.run TestMeasureContentLengthJsonNotPretty ...restful +func TestMeasureContentLengthJsonNotPretty(t *testing.T) { + httpWriter := httptest.NewRecorder() + resp := Response{ResponseWriter: httpWriter, requestAccept: "*/*", routeProduces: []string{"*/*"}} + resp.WriteAsJson(food{"apple"}) + if resp.ContentLength() != 17 { // 16+1 using the Encoder directly yields another /n + t.Errorf("Incorrect measured length:%d", resp.ContentLength()) + } +} + +// go test -v -test.run TestMeasureContentLengthWriteErrorString ...restful +func TestMeasureContentLengthWriteErrorString(t *testing.T) { + httpWriter := httptest.NewRecorder() + resp := Response{ResponseWriter: httpWriter, requestAccept: "*/*", routeProduces: []string{"*/*"}, prettyPrint: true} + resp.WriteErrorString(404, "Invalid") + if resp.ContentLength() != len("Invalid") { + t.Errorf("Incorrect measured length:%d", resp.ContentLength()) + } +} + +// go test -v -test.run TestStatusIsPassedToResponse ...restful +func TestStatusIsPassedToResponse(t *testing.T) { + for _, each := range []struct { + write, read int + }{ + {write: 204, read: 204}, + {write: 304, read: 304}, + {write: 200, read: 200}, + {write: 400, read: 400}, + } { + httpWriter := httptest.NewRecorder() + resp := Response{ResponseWriter: httpWriter, requestAccept: "*/*", routeProduces: []string{"*/*"}, prettyPrint: true} + resp.WriteHeader(each.write) + if got, want := httpWriter.Code, each.read; got != want { + t.Errorf("got %v want %v", got, want) + } + } +} + +// go test -v -test.run TestStatusCreatedAndContentTypeJson_Issue54 ...restful +func TestStatusCreatedAndContentTypeJson_Issue54(t *testing.T) { + httpWriter := httptest.NewRecorder() + resp := Response{ResponseWriter: httpWriter, requestAccept: "application/json", routeProduces: []string{"application/json"}, prettyPrint: true} + resp.WriteHeader(201) + resp.WriteAsJson(food{"Juicy"}) + if httpWriter.HeaderMap.Get("Content-Type") != "application/json" { + t.Errorf("Expected content type json but got:%s", httpWriter.HeaderMap.Get("Content-Type")) + } + if httpWriter.Code != 201 { + t.Errorf("Expected status 201 but got:%d", httpWriter.Code) + } +} + +type errorOnWriteRecorder struct { + *httptest.ResponseRecorder +} + +func (e errorOnWriteRecorder) Write(bytes []byte) (int, error) { + return 0, errors.New("fail") +} + +// go test -v -test.run TestLastWriteErrorCaught ...restful +func TestLastWriteErrorCaught(t *testing.T) { + httpWriter := errorOnWriteRecorder{httptest.NewRecorder()} + resp := Response{ResponseWriter: httpWriter, requestAccept: "application/json", routeProduces: []string{"application/json"}, prettyPrint: true} + err := resp.WriteAsJson(food{"Juicy"}) + if err.Error() != "fail" { + t.Errorf("Unexpected error message:%v", err) + } +} + +// go test -v -test.run TestAcceptStarStar_Issue83 ...restful +func TestAcceptStarStar_Issue83(t *testing.T) { + httpWriter := httptest.NewRecorder() + // Accept Produces + resp := Response{ResponseWriter: httpWriter, requestAccept: "application/bogus,*/*;q=0.8", routeProduces: []string{"application/json"}, prettyPrint: true} + resp.WriteEntity(food{"Juicy"}) + ct := httpWriter.Header().Get("Content-Type") + if "application/json" != ct { + t.Errorf("Unexpected content type:%s", ct) + } +} + +// go test -v -test.run TestAcceptSkipStarStar_Issue83 ...restful +func TestAcceptSkipStarStar_Issue83(t *testing.T) { + httpWriter := httptest.NewRecorder() + // Accept Produces + resp := Response{ResponseWriter: httpWriter, requestAccept: " application/xml ,*/* ; q=0.8", routeProduces: []string{"application/json", "application/xml"}, prettyPrint: true} + resp.WriteEntity(food{"Juicy"}) + ct := httpWriter.Header().Get("Content-Type") + if "application/xml" != ct { + t.Errorf("Unexpected content type:%s", ct) + } +} + +// go test -v -test.run TestAcceptXmlBeforeStarStar_Issue83 ...restful +func TestAcceptXmlBeforeStarStar_Issue83(t *testing.T) { + httpWriter := httptest.NewRecorder() + // Accept Produces + resp := Response{ResponseWriter: httpWriter, requestAccept: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", routeProduces: []string{"application/json"}, prettyPrint: true} + resp.WriteEntity(food{"Juicy"}) + ct := httpWriter.Header().Get("Content-Type") + if "application/json" != ct { + t.Errorf("Unexpected content type:%s", ct) + } +} + +// go test -v -test.run TestWriteHeaderNoContent_Issue124 ...restful +func TestWriteHeaderNoContent_Issue124(t *testing.T) { + httpWriter := httptest.NewRecorder() + resp := Response{ResponseWriter: httpWriter, requestAccept: "text/plain", routeProduces: []string{"text/plain"}, prettyPrint: true} + resp.WriteHeader(http.StatusNoContent) + if httpWriter.Code != http.StatusNoContent { + t.Errorf("got %d want %d", httpWriter.Code, http.StatusNoContent) + } +} + +// go test -v -test.run TestStatusCreatedAndContentTypeJson_Issue163 ...restful +func TestStatusCreatedAndContentTypeJson_Issue163(t *testing.T) { + httpWriter := httptest.NewRecorder() + resp := Response{ResponseWriter: httpWriter, requestAccept: "application/json", routeProduces: []string{"application/json"}, prettyPrint: true} + resp.WriteHeader(http.StatusNotModified) + if httpWriter.Code != http.StatusNotModified { + t.Errorf("Got %d want %d", httpWriter.Code, http.StatusNotModified) + } +} + +func TestWriteHeaderAndEntity_Issue235(t *testing.T) { + httpWriter := httptest.NewRecorder() + resp := Response{ResponseWriter: httpWriter, requestAccept: "application/json", routeProduces: []string{"application/json"}, prettyPrint: true} + var pong = struct { + Foo string `json:"foo"` + }{Foo: "123"} + resp.WriteHeaderAndEntity(404, pong) + if httpWriter.Code != http.StatusNotFound { + t.Errorf("got %d want %d", httpWriter.Code, http.StatusNoContent) + } + if got, want := httpWriter.Header().Get("Content-Type"), "application/json"; got != want { + t.Errorf("got %v want %v", got, want) + } + if !strings.HasPrefix(httpWriter.Body.String(), "{") { + t.Errorf("expected pong struct in json:%s", httpWriter.Body.String()) + } +} + +func TestWriteEntityNoAcceptMatchWithProduces(t *testing.T) { + httpWriter := httptest.NewRecorder() + resp := Response{ResponseWriter: httpWriter, requestAccept: "application/bogus", routeProduces: []string{"application/json"}, prettyPrint: true} + resp.WriteEntity("done") + if httpWriter.Code != http.StatusOK { + t.Errorf("got %d want %d", httpWriter.Code, http.StatusOK) + } +} + +func TestWriteEntityNoAcceptMatchNoProduces(t *testing.T) { + httpWriter := httptest.NewRecorder() + resp := Response{ResponseWriter: httpWriter, requestAccept: "application/bogus", routeProduces: []string{}, prettyPrint: true} + resp.WriteEntity("done") + if httpWriter.Code != http.StatusNotAcceptable { + t.Errorf("got %d want %d", httpWriter.Code, http.StatusNotAcceptable) + } +} diff --git a/vendor/github.com/emicklei/go-restful/route.go b/vendor/github.com/emicklei/go-restful/route.go index 3dd520eec..9d5b156e0 100644 --- a/vendor/github.com/emicklei/go-restful/route.go +++ b/vendor/github.com/emicklei/go-restful/route.go @@ -13,6 +13,11 @@ import ( // RouteFunction declares the signature of a function that can be bound to a Route. type RouteFunction func(*Request, *Response) +// RouteSelectionConditionFunction declares the signature of a function that +// can be used to add extra conditional logic when selecting whether the route +// matches the HTTP request. +type RouteSelectionConditionFunction func(httpRequest *http.Request) bool + // Route binds a HTTP Method,Path,Consumes combination to a RouteFunction. type Route struct { Method string @@ -21,6 +26,7 @@ type Route struct { Path string // webservice root path + described path Function RouteFunction Filters []FilterFunction + If []RouteSelectionConditionFunction // cached values for dispatching relativePath string @@ -100,7 +106,7 @@ func (r Route) matchesContentType(mimeTypes string) bool { } if len(mimeTypes) == 0 { - // idempotent methods with (most-likely or garanteed) empty content match missing Content-Type + // idempotent methods with (most-likely or guaranteed) empty content match missing Content-Type m := r.Method if m == "GET" || m == "HEAD" || m == "OPTIONS" || m == "DELETE" || m == "TRACE" { return true diff --git a/vendor/github.com/emicklei/go-restful/route_builder.go b/vendor/github.com/emicklei/go-restful/route_builder.go index 5ad4a3a7c..83db02b7c 100644 --- a/vendor/github.com/emicklei/go-restful/route_builder.go +++ b/vendor/github.com/emicklei/go-restful/route_builder.go @@ -24,6 +24,7 @@ type RouteBuilder struct { httpMethod string // required function RouteFunction // required filters []FilterFunction + conditions []RouteSelectionConditionFunction typeNameHandleFunc TypeNameHandleFunction // required @@ -89,7 +90,7 @@ func (b *RouteBuilder) Doc(documentation string) *RouteBuilder { return b } -// A verbose explanation of the operation behavior. Optional. +// Notes is a verbose explanation of the operation behavior. Optional. func (b *RouteBuilder) Notes(notes string) *RouteBuilder { b.notes = notes return b @@ -212,6 +213,21 @@ func (b *RouteBuilder) Filter(filter FilterFunction) *RouteBuilder { return b } +// If sets a condition function that controls matching the Route based on custom logic. +// The condition function is provided the HTTP request and should return true if the route +// should be considered. +// +// Efficiency note: the condition function is called before checking the method, produces, and +// consumes criteria, so that the correct HTTP status code can be returned. +// +// Lifecycle note: no filter functions have been called prior to calling the condition function, +// so the condition function should not depend on any context that might be set up by container +// or route filters. +func (b *RouteBuilder) If(condition RouteSelectionConditionFunction) *RouteBuilder { + b.conditions = append(b.conditions, condition) + return b +} + // If no specific Route path then set to rootPath // If no specific Produces then set to rootProduces // If no specific Consumes then set to rootConsumes @@ -254,6 +270,7 @@ func (b *RouteBuilder) Build() Route { Consumes: b.consumes, Function: b.function, Filters: b.filters, + If: b.conditions, relativePath: b.currentPath, pathExpr: pathExpr, Doc: b.doc, diff --git a/vendor/github.com/emicklei/go-restful/route_builder_test.go b/vendor/github.com/emicklei/go-restful/route_builder_test.go new file mode 100644 index 000000000..25881d5eb --- /dev/null +++ b/vendor/github.com/emicklei/go-restful/route_builder_test.go @@ -0,0 +1,76 @@ +package restful + +import ( + "testing" + "time" +) + +func TestRouteBuilder_PathParameter(t *testing.T) { + p := &Parameter{&ParameterData{Name: "name", Description: "desc"}} + p.AllowMultiple(true) + p.DataType("int") + p.Required(true) + values := map[string]string{"a": "b"} + p.AllowableValues(values) + p.bePath() + + b := new(RouteBuilder) + b.function = dummy + b.Param(p) + r := b.Build() + if !r.ParameterDocs[0].Data().AllowMultiple { + t.Error("AllowMultiple invalid") + } + if r.ParameterDocs[0].Data().DataType != "int" { + t.Error("dataType invalid") + } + if !r.ParameterDocs[0].Data().Required { + t.Error("required invalid") + } + if r.ParameterDocs[0].Data().Kind != PathParameterKind { + t.Error("kind invalid") + } + if r.ParameterDocs[0].Data().AllowableValues["a"] != "b" { + t.Error("allowableValues invalid") + } + if b.ParameterNamed("name") == nil { + t.Error("access to parameter failed") + } +} + +func TestRouteBuilder(t *testing.T) { + json := "application/json" + b := new(RouteBuilder) + b.To(dummy) + b.Path("/routes").Method("HEAD").Consumes(json).Produces(json).Metadata("test", "test-value").DefaultReturns("default", time.Now()) + r := b.Build() + if r.Path != "/routes" { + t.Error("path invalid") + } + if r.Produces[0] != json { + t.Error("produces invalid") + } + if r.Consumes[0] != json { + t.Error("consumes invalid") + } + if r.Operation != "dummy" { + t.Error("Operation not set") + } + if r.Metadata["test"] != "test-value" { + t.Errorf("Metadata not set") + } + if _, ok := r.ResponseErrors[0]; !ok { + t.Fatal("expected default response") + } +} + +func TestAnonymousFuncNaming(t *testing.T) { + f1 := func() {} + f2 := func() {} + if got, want := nameOfFunction(f1), "func1"; got != want { + t.Errorf("got %v want %v", got, want) + } + if got, want := nameOfFunction(f2), "func2"; got != want { + t.Errorf("got %v want %v", got, want) + } +} diff --git a/vendor/github.com/emicklei/go-restful/route_test.go b/vendor/github.com/emicklei/go-restful/route_test.go new file mode 100644 index 000000000..6a104aff8 --- /dev/null +++ b/vendor/github.com/emicklei/go-restful/route_test.go @@ -0,0 +1,127 @@ +package restful + +import ( + "testing" +) + +// accept should match produces +func TestMatchesAcceptPlainTextWhenProducePlainTextAsLast(t *testing.T) { + r := Route{Produces: []string{"application/json", "text/plain"}} + if !r.matchesAccept("text/plain") { + t.Errorf("accept should match text/plain") + } +} + +// accept should match produces +func TestMatchesAcceptStar(t *testing.T) { + r := Route{Produces: []string{"application/xml"}} + if !r.matchesAccept("*/*") { + t.Errorf("accept should match star") + } +} + +// accept should match produces +func TestMatchesAcceptIE(t *testing.T) { + r := Route{Produces: []string{"application/xml"}} + if !r.matchesAccept("text/html, application/xhtml+xml, */*") { + t.Errorf("accept should match star") + } +} + +// accept should match produces +func TestMatchesAcceptXml(t *testing.T) { + r := Route{Produces: []string{"application/xml"}} + if r.matchesAccept("application/json") { + t.Errorf("accept should not match json") + } + if !r.matchesAccept("application/xml") { + t.Errorf("accept should match xml") + } +} + +// accept should match produces +func TestMatchesAcceptAny(t *testing.T) { + r := Route{Produces: []string{"*/*"}} + if !r.matchesAccept("application/json") { + t.Errorf("accept should match json") + } + if !r.matchesAccept("application/xml") { + t.Errorf("accept should match xml") + } +} + +// content type should match consumes +func TestMatchesContentTypeXml(t *testing.T) { + r := Route{Consumes: []string{"application/xml"}} + if r.matchesContentType("application/json") { + t.Errorf("accept should not match json") + } + if !r.matchesContentType("application/xml") { + t.Errorf("accept should match xml") + } +} + +// content type should match consumes +func TestMatchesContentTypeCharsetInformation(t *testing.T) { + r := Route{Consumes: []string{"application/json"}} + if !r.matchesContentType("application/json; charset=UTF-8") { + t.Errorf("matchesContentType should ignore charset information") + } +} + +func TestMatchesPath_OneParam(t *testing.T) { + params := doExtractParams("/from/{source}", 2, "/from/here", t) + if params["source"] != "here" { + t.Errorf("parameter mismatch here") + } +} + +func TestMatchesPath_Slash(t *testing.T) { + params := doExtractParams("/", 0, "/", t) + if len(params) != 0 { + t.Errorf("expected empty parameters") + } +} + +func TestMatchesPath_SlashNonVar(t *testing.T) { + params := doExtractParams("/any", 1, "/any", t) + if len(params) != 0 { + t.Errorf("expected empty parameters") + } +} + +func TestMatchesPath_TwoVars(t *testing.T) { + params := doExtractParams("/from/{source}/to/{destination}", 4, "/from/AMS/to/NY", t) + if params["source"] != "AMS" { + t.Errorf("parameter mismatch AMS") + } +} + +func TestMatchesPath_VarOnFront(t *testing.T) { + params := doExtractParams("{what}/from/{source}/", 3, "who/from/SOS/", t) + if params["source"] != "SOS" { + t.Errorf("parameter mismatch SOS") + } +} + +func TestExtractParameters_EmptyValue(t *testing.T) { + params := doExtractParams("/fixed/{var}", 2, "/fixed/", t) + if params["var"] != "" { + t.Errorf("parameter mismatch var") + } +} + +func TestTokenizePath(t *testing.T) { + if len(tokenizePath("/")) != 0 { + t.Errorf("not empty path tokens") + } +} + +func doExtractParams(routePath string, size int, urlPath string, t *testing.T) map[string]string { + r := Route{Path: routePath} + r.postBuild() + if len(r.pathParts) != size { + t.Fatalf("len not %v %v, but %v", size, r.pathParts, len(r.pathParts)) + } + return r.extractParameters(urlPath) +} diff --git a/vendor/github.com/emicklei/go-restful/tracer_test.go b/vendor/github.com/emicklei/go-restful/tracer_test.go new file mode 100644 index 000000000..60c1e9fc0 --- /dev/null +++ b/vendor/github.com/emicklei/go-restful/tracer_test.go @@ -0,0 +1,18 @@ +package restful + +import "testing" + +// Use like this: +// +// TraceLogger(testLogger{t}) +type testLogger struct { + t *testing.T +} + +func (l testLogger) Print(v ...interface{}) { + l.t.Log(v...) +} + +func (l testLogger) Printf(format string, v ...interface{}) { + l.t.Logf(format, v...) +} diff --git a/vendor/github.com/emicklei/go-restful/web_service.go b/vendor/github.com/emicklei/go-restful/web_service.go index 7af60233a..094c0a02a 100644 --- a/vendor/github.com/emicklei/go-restful/web_service.go +++ b/vendor/github.com/emicklei/go-restful/web_service.go @@ -233,7 +233,7 @@ func (w *WebService) RootPath() string { return w.rootPath } -// PathParameters return the path parameter names for (shared amoung its Routes) +// PathParameters return the path parameter names for (shared among its Routes) func (w *WebService) PathParameters() []*Parameter { return w.pathParameters } diff --git a/vendor/github.com/emicklei/go-restful/web_service_test.go b/vendor/github.com/emicklei/go-restful/web_service_test.go new file mode 100644 index 000000000..734938134 --- /dev/null +++ b/vendor/github.com/emicklei/go-restful/web_service_test.go @@ -0,0 +1,343 @@ +package restful + +import ( + "net/http" + "net/http/httptest" + "testing" +) + +const ( + pathGetFriends = "/get/{userId}/friends" +) + +func TestParameter(t *testing.T) { + p := &Parameter{&ParameterData{Name: "name", Description: "desc"}} + p.AllowMultiple(true) + p.DataType("int") + p.Required(true) + values := map[string]string{"a": "b"} + p.AllowableValues(values) + p.bePath() + + ws := new(WebService) + ws.Param(p) + if ws.pathParameters[0].Data().Name != "name" { + t.Error("path parameter (or name) invalid") + } +} +func TestWebService_CanCreateParameterKinds(t *testing.T) { + ws := new(WebService) + if ws.BodyParameter("b", "b").Kind() != BodyParameterKind { + t.Error("body parameter expected") + } + if ws.PathParameter("p", "p").Kind() != PathParameterKind { + t.Error("path parameter expected") + } + if ws.QueryParameter("q", "q").Kind() != QueryParameterKind { + t.Error("query parameter expected") + } +} + +func TestCapturePanic(t *testing.T) { + tearDown() + Add(newPanicingService()) + httpRequest, _ := http.NewRequest("GET", "http://here.com/fire", nil) + httpRequest.Header.Set("Accept", "*/*") + httpWriter := httptest.NewRecorder() + // override the default here + DefaultContainer.DoNotRecover(false) + DefaultContainer.dispatch(httpWriter, httpRequest) + if 500 != httpWriter.Code { + t.Error("500 expected on fire") + } +} + +func TestCapturePanicWithEncoded(t *testing.T) { + tearDown() + Add(newPanicingService()) + DefaultContainer.EnableContentEncoding(true) + httpRequest, _ := http.NewRequest("GET", "http://here.com/fire", nil) + httpRequest.Header.Set("Accept", "*/*") + httpRequest.Header.Set("Accept-Encoding", "gzip") + httpWriter := httptest.NewRecorder() + DefaultContainer.dispatch(httpWriter, httpRequest) + if 500 != httpWriter.Code { + t.Error("500 expected on fire, got", httpWriter.Code) + } +} + +func TestNotFound(t *testing.T) { + tearDown() + httpRequest, _ := http.NewRequest("GET", "http://here.com/missing", nil) + httpRequest.Header.Set("Accept", "*/*") + httpWriter := httptest.NewRecorder() + DefaultContainer.dispatch(httpWriter, httpRequest) + if 404 != httpWriter.Code { + t.Error("404 expected on missing") + } +} + +func TestMethodNotAllowed(t *testing.T) { + tearDown() + Add(newGetOnlyService()) + httpRequest, _ := http.NewRequest("POST", "http://here.com/get", nil) + httpRequest.Header.Set("Accept", "*/*") + httpWriter := httptest.NewRecorder() + DefaultContainer.dispatch(httpWriter, httpRequest) + if 405 != httpWriter.Code { + t.Error("405 expected method not allowed") + } +} + +func TestSelectedRoutePath_Issue100(t *testing.T) { + tearDown() + Add(newSelectedRouteTestingService()) + httpRequest, _ := http.NewRequest("GET", "http://here.com/get/232452/friends", nil) + httpRequest.Header.Set("Accept", "*/*") + httpWriter := httptest.NewRecorder() + DefaultContainer.dispatch(httpWriter, httpRequest) + if http.StatusOK != httpWriter.Code { + t.Error(http.StatusOK, "expected,", httpWriter.Code, "received.") + } +} + +func TestContentType415_Issue170(t *testing.T) { + tearDown() + Add(newGetOnlyJsonOnlyService()) + httpRequest, _ := http.NewRequest("GET", "http://here.com/get", nil) + httpWriter := httptest.NewRecorder() + DefaultContainer.dispatch(httpWriter, httpRequest) + if 200 != httpWriter.Code { + t.Errorf("Expected 200, got %d", httpWriter.Code) + } +} + +func TestNoContentTypePOST(t *testing.T) { + tearDown() + Add(newPostNoConsumesService()) + httpRequest, _ := http.NewRequest("POST", "http://here.com/post", nil) + httpWriter := httptest.NewRecorder() + DefaultContainer.dispatch(httpWriter, httpRequest) + if 204 != httpWriter.Code { + t.Errorf("Expected 204, got %d", httpWriter.Code) + } +} + +func TestContentType415_POST_Issue170(t *testing.T) { + tearDown() + Add(newPostOnlyJsonOnlyService()) + httpRequest, _ := http.NewRequest("POST", "http://here.com/post", nil) + httpRequest.Header.Set("Content-Type", "application/json") + httpWriter := httptest.NewRecorder() + DefaultContainer.dispatch(httpWriter, httpRequest) + if 200 != httpWriter.Code { + t.Errorf("Expected 200, got %d", httpWriter.Code) + } +} + +// go test -v -test.run TestContentType406PlainJson ...restful +func TestContentType406PlainJson(t *testing.T) { + tearDown() + TraceLogger(testLogger{t}) + Add(newGetPlainTextOrJsonService()) + httpRequest, _ := http.NewRequest("GET", "http://here.com/get", nil) + httpRequest.Header.Set("Accept", "text/plain") + httpWriter := httptest.NewRecorder() + DefaultContainer.dispatch(httpWriter, httpRequest) + if got, want := httpWriter.Code, 200; got != want { + t.Errorf("got %v, want %v", got, want) + } +} + +func TestRemoveRoute(t *testing.T) { + tearDown() + TraceLogger(testLogger{t}) + ws := newGetPlainTextOrJsonService() + Add(ws) + httpRequest, _ := http.NewRequest("GET", "http://here.com/get", nil) + httpRequest.Header.Set("Accept", "text/plain") + httpWriter := httptest.NewRecorder() + DefaultContainer.dispatch(httpWriter, httpRequest) + if got, want := httpWriter.Code, 200; got != want { + t.Errorf("got %v, want %v", got, want) + } + + // dynamic apis are disabled, should error and do nothing + if err := ws.RemoveRoute("/get", "GET"); err == nil { + t.Error("unexpected non-error") + } + + httpWriter = httptest.NewRecorder() + DefaultContainer.dispatch(httpWriter, httpRequest) + if got, want := httpWriter.Code, 200; got != want { + t.Errorf("got %v, want %v", got, want) + } + + ws.SetDynamicRoutes(true) + if err := ws.RemoveRoute("/get", "GET"); err != nil { + t.Errorf("unexpected error %v", err) + } + + httpWriter = httptest.NewRecorder() + DefaultContainer.dispatch(httpWriter, httpRequest) + if got, want := httpWriter.Code, 404; got != want { + t.Errorf("got %v, want %v", got, want) + } +} +func TestRemoveLastRoute(t *testing.T) { + tearDown() + TraceLogger(testLogger{t}) + ws := newGetPlainTextOrJsonServiceMultiRoute() + Add(ws) + httpRequest, _ := http.NewRequest("GET", "http://here.com/get", nil) + httpRequest.Header.Set("Accept", "text/plain") + httpWriter := httptest.NewRecorder() + DefaultContainer.dispatch(httpWriter, httpRequest) + if got, want := httpWriter.Code, 200; got != want { + t.Errorf("got %v, want %v", got, want) + } + + // dynamic apis are disabled, should error and do nothing + if err := ws.RemoveRoute("/get", "GET"); err == nil { + t.Error("unexpected non-error") + } + + httpWriter = httptest.NewRecorder() + DefaultContainer.dispatch(httpWriter, httpRequest) + if got, want := httpWriter.Code, 200; got != want { + t.Errorf("got %v, want %v", got, want) + } + + ws.SetDynamicRoutes(true) + if err := ws.RemoveRoute("/get", "GET"); err != nil { + t.Errorf("unexpected error %v", err) + } + + httpWriter = httptest.NewRecorder() + DefaultContainer.dispatch(httpWriter, httpRequest) + if got, want := httpWriter.Code, 404; got != want { + t.Errorf("got %v, want %v", got, want) + } +} + +// go test -v -test.run TestContentTypeOctet_Issue170 ...restful +func TestContentTypeOctet_Issue170(t *testing.T) { + tearDown() + Add(newGetConsumingOctetStreamService()) + // with content-type + httpRequest, _ := http.NewRequest("GET", "http://here.com/get", nil) + httpRequest.Header.Set("Content-Type", MIME_OCTET) + httpWriter := httptest.NewRecorder() + DefaultContainer.dispatch(httpWriter, httpRequest) + if 200 != httpWriter.Code { + t.Errorf("Expected 200, got %d", httpWriter.Code) + } + // without content-type + httpRequest, _ = http.NewRequest("GET", "http://here.com/get", nil) + httpWriter = httptest.NewRecorder() + DefaultContainer.dispatch(httpWriter, httpRequest) + if 200 != httpWriter.Code { + t.Errorf("Expected 200, got %d", httpWriter.Code) + } +} + +type exampleBody struct{} + +func TestParameterDataTypeDefaults(t *testing.T) { + tearDown() + ws := new(WebService) + route := ws.POST("/post").Reads(&exampleBody{}) + if route.parameters[0].data.DataType != "*restful.exampleBody" { + t.Errorf("body parameter incorrect name: %#v", route.parameters[0].data) + } +} + +func TestParameterDataTypeCustomization(t *testing.T) { + tearDown() + ws := new(WebService) + ws.TypeNameHandler(func(sample interface{}) string { + return "my.custom.type.name" + }) + route := ws.POST("/post").Reads(&exampleBody{}) + if route.parameters[0].data.DataType != "my.custom.type.name" { + t.Errorf("body parameter incorrect name: %#v", route.parameters[0].data) + } +} + +func newPanicingService() *WebService { + ws := new(WebService).Path("") + ws.Route(ws.GET("/fire").To(doPanic)) + return ws +} + +func newGetOnlyService() *WebService { + ws := new(WebService).Path("") + ws.Route(ws.GET("/get").To(doPanic)) + return ws +} + +func newPostOnlyJsonOnlyService() *WebService { + ws := new(WebService).Path("") + ws.Consumes("application/json") + ws.Route(ws.POST("/post").To(doNothing)) + return ws +} + +func newGetOnlyJsonOnlyService() *WebService { + ws := new(WebService).Path("") + ws.Consumes("application/json") + ws.Route(ws.GET("/get").To(doNothing)) + return ws +} + +func newGetPlainTextOrJsonService() *WebService { + ws := new(WebService).Path("") + ws.Produces("text/plain", "application/json") + ws.Route(ws.GET("/get").To(doNothing)) + return ws +} + +func newGetPlainTextOrJsonServiceMultiRoute() *WebService { + ws := new(WebService).Path("") + ws.Produces("text/plain", "application/json") + ws.Route(ws.GET("/get").To(doNothing)) + ws.Route(ws.GET("/status").To(doNothing)) + return ws +} + +func newGetConsumingOctetStreamService() *WebService { + ws := new(WebService).Path("") + ws.Consumes("application/octet-stream") + ws.Route(ws.GET("/get").To(doNothing)) + return ws +} + +func newPostNoConsumesService() *WebService { + ws := new(WebService).Path("") + ws.Route(ws.POST("/post").To(return204)) + return ws +} + +func newSelectedRouteTestingService() *WebService { + ws := new(WebService).Path("") + ws.Route(ws.GET(pathGetFriends).To(selectedRouteChecker)) + return ws +} + +func selectedRouteChecker(req *Request, resp *Response) { + if req.SelectedRoutePath() != pathGetFriends { + resp.InternalServerError() + } +} + +func doPanic(req *Request, resp *Response) { + println("lightning...") + panic("fire") +} + +func doNothing(req *Request, resp *Response) { +} + +func return204(req *Request, resp *Response) { + resp.WriteHeader(204) +} diff --git a/vendor/github.com/fullsailor/pkcs7/ber_test.go b/vendor/github.com/fullsailor/pkcs7/ber_test.go new file mode 100644 index 000000000..19a0f514c --- /dev/null +++ b/vendor/github.com/fullsailor/pkcs7/ber_test.go @@ -0,0 +1,97 @@ +package pkcs7 + +import ( + "bytes" + "encoding/asn1" + "strings" + "testing" +) + +func TestBer2Der(t *testing.T) { + // indefinite length fixture + ber := []byte{0x30, 0x80, 0x02, 0x01, 0x01, 0x00, 0x00} + expected := []byte{0x30, 0x03, 0x02, 0x01, 0x01} + der, err := ber2der(ber) + if err != nil { + t.Fatalf("ber2der failed with error: %v", err) + } + if bytes.Compare(der, expected) != 0 { + t.Errorf("ber2der result did not match.\n\tExpected: % X\n\tActual: % X", expected, der) + } + + if der2, err := ber2der(der); err != nil { + t.Errorf("ber2der on DER bytes failed with error: %v", err) + } else { + if !bytes.Equal(der, der2) { + t.Error("ber2der is not idempotent") + } + } + var thing struct { + Number int + } + rest, err := asn1.Unmarshal(der, &thing) + if err != nil { + t.Errorf("Cannot parse resulting DER because: %v", err) + } else if len(rest) > 0 { + t.Errorf("Resulting DER has trailing data: % X", rest) + } +} + +func TestBer2Der_Negatives(t *testing.T) { + fixtures := []struct { + Input []byte + ErrorContains string + }{ + {[]byte{0x30, 0x85}, "length too long"}, + {[]byte{0x30, 0x84, 0x80, 0x0, 0x0, 0x0}, "length is negative"}, + {[]byte{0x30, 0x82, 0x0, 0x1}, "length has leading zero"}, + {[]byte{0x30, 0x80, 0x1, 0x2, 0x1, 0x2}, "Invalid BER format"}, + {[]byte{0x30, 0x03, 0x01, 0x02}, "length is more than available data"}, + } + + for _, fixture := range fixtures { + _, err := ber2der(fixture.Input) + if err == nil { + t.Errorf("No error thrown. Expected: %s", fixture.ErrorContains) + } + if !strings.Contains(err.Error(), fixture.ErrorContains) { + t.Errorf("Unexpected error thrown.\n\tExpected: /%s/\n\tActual: %s", fixture.ErrorContains, err.Error()) + } + } +} + +func TestBer2Der_NestedMultipleIndefinite(t *testing.T) { + // indefinite length fixture + ber := []byte{0x30, 0x80, 0x30, 0x80, 0x02, 0x01, 0x01, 0x00, 0x00, 0x30, 0x80, 0x02, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00} + expected := []byte{0x30, 0x0A, 0x30, 0x03, 0x02, 0x01, 0x01, 0x30, 0x03, 0x02, 0x01, 0x02} + + der, err := ber2der(ber) + if err != nil { + t.Fatalf("ber2der failed with error: %v", err) + } + if bytes.Compare(der, expected) != 0 { + t.Errorf("ber2der result did not match.\n\tExpected: % X\n\tActual: % X", expected, der) + } + + if der2, err := ber2der(der); err != nil { + t.Errorf("ber2der on DER bytes failed with error: %v", err) + } else { + if !bytes.Equal(der, der2) { + t.Error("ber2der is not idempotent") + } + } + var thing struct { + Nest1 struct { + Number int + } + Nest2 struct { + Number int + } + } + rest, err := asn1.Unmarshal(der, &thing) + if err != nil { + t.Errorf("Cannot parse resulting DER because: %v", err) + } else if len(rest) > 0 { + t.Errorf("Resulting DER has trailing data: % X", rest) + } +} diff --git a/vendor/github.com/fullsailor/pkcs7/pkcs7_test.go b/vendor/github.com/fullsailor/pkcs7/pkcs7_test.go new file mode 100644 index 000000000..cbe2c5cad --- /dev/null +++ b/vendor/github.com/fullsailor/pkcs7/pkcs7_test.go @@ -0,0 +1,678 @@ +package pkcs7 + +import ( + "bytes" + "crypto" + "crypto/rand" + "crypto/rsa" + "crypto/x509" + "crypto/x509/pkix" + "encoding/asn1" + "encoding/pem" + "fmt" + "io" + "io/ioutil" + "math/big" + "os" + "os/exec" + "testing" + "time" +) + +func TestVerify(t *testing.T) { + fixture := UnmarshalTestFixture(SignedTestFixture) + p7, err := Parse(fixture.Input) + if err != nil { + t.Errorf("Parse encountered unexpected error: %v", err) + } + + if err := p7.Verify(); err != nil { + t.Errorf("Verify failed with error: %v", err) + } + expected := []byte("We the People") + if bytes.Compare(p7.Content, expected) != 0 { + t.Errorf("Signed content does not match.\n\tExpected:%s\n\tActual:%s", expected, p7.Content) + + } +} + +func TestVerifyEC2(t *testing.T) { + fixture := UnmarshalTestFixture(EC2IdentityDocumentFixture) + p7, err := Parse(fixture.Input) + if err != nil { + t.Errorf("Parse encountered unexpected error: %v", err) + } + p7.Certificates = []*x509.Certificate{fixture.Certificate} + if err := p7.Verify(); err != nil { + t.Errorf("Verify failed with error: %v", err) + } +} + +func TestVerifyAppStore(t *testing.T) { + fixture := UnmarshalTestFixture(AppStoreRecieptFixture) + p7, err := Parse(fixture.Input) + if err != nil { + t.Errorf("Parse encountered unexpected error: %v", err) + } + if err := p7.Verify(); err != nil { + t.Errorf("Verify failed with error: %v", err) + } +} + +func TestDecrypt(t *testing.T) { + fixture := UnmarshalTestFixture(EncryptedTestFixture) + p7, err := Parse(fixture.Input) + if err != nil { + t.Fatal(err) + } + content, err := p7.Decrypt(fixture.Certificate, fixture.PrivateKey) + if err != nil { + t.Errorf("Cannot Decrypt with error: %v", err) + } + expected := []byte("This is a test") + if bytes.Compare(content, expected) != 0 { + t.Errorf("Decrypted result does not match.\n\tExpected:%s\n\tActual:%s", expected, content) + } +} + +func TestDegenerateCertificate(t *testing.T) { + cert, err := createTestCertificate() + if err != nil { + t.Fatal(err) + } + deg, err := DegenerateCertificate(cert.Certificate.Raw) + if err != nil { + t.Fatal(err) + } + testOpenSSLParse(t, deg) + pem.Encode(os.Stdout, &pem.Block{Type: "PKCS7", Bytes: deg}) +} + +// writes the cert to a temporary file and tests that openssl can read it. +func testOpenSSLParse(t *testing.T, certBytes []byte) { + tmpCertFile, err := ioutil.TempFile("", "testCertificate") + if err != nil { + t.Fatal(err) + } + defer os.Remove(tmpCertFile.Name()) // clean up + + if _, err := tmpCertFile.Write(certBytes); err != nil { + t.Fatal(err) + } + + opensslCMD := exec.Command("openssl", "pkcs7", "-inform", "der", "-in", tmpCertFile.Name()) + _, err = opensslCMD.Output() + if err != nil { + t.Fatal(err) + } + + if err := tmpCertFile.Close(); err != nil { + t.Fatal(err) + } + +} + +func TestSign(t *testing.T) { + cert, err := createTestCertificate() + if err != nil { + t.Fatal(err) + } + content := []byte("Hello World") + for _, testDetach := range []bool{false, true} { + toBeSigned, err := NewSignedData(content) + if err != nil { + t.Fatalf("Cannot initialize signed data: %s", err) + } + if err := toBeSigned.AddSigner(cert.Certificate, cert.PrivateKey, SignerInfoConfig{}); err != nil { + t.Fatalf("Cannot add signer: %s", err) + } + if testDetach { + t.Log("Testing detached signature") + toBeSigned.Detach() + } else { + t.Log("Testing attached signature") + } + signed, err := toBeSigned.Finish() + if err != nil { + t.Fatalf("Cannot finish signing data: %s", err) + } + pem.Encode(os.Stdout, &pem.Block{Type: "PKCS7", Bytes: signed}) + p7, err := Parse(signed) + if err != nil { + t.Fatalf("Cannot parse our signed data: %s", err) + } + if testDetach { + p7.Content = content + } + if bytes.Compare(content, p7.Content) != 0 { + t.Errorf("Our content was not in the parsed data:\n\tExpected: %s\n\tActual: %s", content, p7.Content) + } + if err := p7.Verify(); err != nil { + t.Errorf("Cannot verify our signed data: %s", err) + } + } +} + +func ExampleSignedData() { + // generate a signing cert or load a key pair + cert, err := createTestCertificate() + if err != nil { + fmt.Printf("Cannot create test certificates: %s", err) + } + + // Initialize a SignedData struct with content to be signed + signedData, err := NewSignedData([]byte("Example data to be signed")) + if err != nil { + fmt.Printf("Cannot initialize signed data: %s", err) + } + + // Add the signing cert and private key + if err := signedData.AddSigner(cert.Certificate, cert.PrivateKey, SignerInfoConfig{}); err != nil { + fmt.Printf("Cannot add signer: %s", err) + } + + // Call Detach() is you want to remove content from the signature + // and generate an S/MIME detached signature + signedData.Detach() + + // Finish() to obtain the signature bytes + detachedSignature, err := signedData.Finish() + if err != nil { + fmt.Printf("Cannot finish signing data: %s", err) + } + pem.Encode(os.Stdout, &pem.Block{Type: "PKCS7", Bytes: detachedSignature}) +} + +func TestOpenSSLVerifyDetachedSignature(t *testing.T) { + rootCert, err := createTestCertificateByIssuer("PKCS7 Test Root CA", nil) + if err != nil { + t.Fatalf("Cannot generate root cert: %s", err) + } + signerCert, err := createTestCertificateByIssuer("PKCS7 Test Signer Cert", rootCert) + if err != nil { + t.Fatalf("Cannot generate signer cert: %s", err) + } + content := []byte("Hello World") + toBeSigned, err := NewSignedData(content) + if err != nil { + t.Fatalf("Cannot initialize signed data: %s", err) + } + if err := toBeSigned.AddSigner(signerCert.Certificate, signerCert.PrivateKey, SignerInfoConfig{}); err != nil { + t.Fatalf("Cannot add signer: %s", err) + } + toBeSigned.Detach() + signed, err := toBeSigned.Finish() + if err != nil { + t.Fatalf("Cannot finish signing data: %s", err) + } + + // write the root cert to a temp file + tmpRootCertFile, err := ioutil.TempFile("", "pkcs7TestRootCA") + if err != nil { + t.Fatal(err) + } + defer os.Remove(tmpRootCertFile.Name()) // clean up + fd, err := os.OpenFile(tmpRootCertFile.Name(), os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0755) + if err != nil { + t.Fatal(err) + } + pem.Encode(fd, &pem.Block{Type: "CERTIFICATE", Bytes: rootCert.Certificate.Raw}) + fd.Close() + + // write the signature to a temp file + tmpSignatureFile, err := ioutil.TempFile("", "pkcs7Signature") + if err != nil { + t.Fatal(err) + } + defer os.Remove(tmpSignatureFile.Name()) // clean up + ioutil.WriteFile(tmpSignatureFile.Name(), signed, 0755) + + // write the content to a temp file + tmpContentFile, err := ioutil.TempFile("", "pkcs7Content") + if err != nil { + t.Fatal(err) + } + defer os.Remove(tmpContentFile.Name()) // clean up + ioutil.WriteFile(tmpContentFile.Name(), content, 0755) + + // call openssl to verify the signature on the content using the root + opensslCMD := exec.Command("openssl", "smime", "-verify", + "-in", tmpSignatureFile.Name(), "-inform", "DER", + "-content", tmpContentFile.Name(), + "-CAfile", tmpRootCertFile.Name()) + out, err := opensslCMD.Output() + t.Logf("%s", out) + if err != nil { + t.Fatalf("openssl command failed with %s", err) + } +} + +func TestEncrypt(t *testing.T) { + modes := []int{ + EncryptionAlgorithmDESCBC, + EncryptionAlgorithmAES128GCM, + } + + for _, mode := range modes { + ContentEncryptionAlgorithm = mode + + plaintext := []byte("Hello Secret World!") + cert, err := createTestCertificate() + if err != nil { + t.Fatal(err) + } + encrypted, err := Encrypt(plaintext, []*x509.Certificate{cert.Certificate}) + if err != nil { + t.Fatal(err) + } + p7, err := Parse(encrypted) + if err != nil { + t.Fatalf("cannot Parse encrypted result: %s", err) + } + result, err := p7.Decrypt(cert.Certificate, cert.PrivateKey) + if err != nil { + t.Fatalf("cannot Decrypt encrypted result: %s", err) + } + if bytes.Compare(plaintext, result) != 0 { + t.Errorf("encrypted data does not match plaintext:\n\tExpected: %s\n\tActual: %s", plaintext, result) + } + } +} + +func TestUnmarshalSignedAttribute(t *testing.T) { + cert, err := createTestCertificate() + if err != nil { + t.Fatal(err) + } + content := []byte("Hello World") + toBeSigned, err := NewSignedData(content) + if err != nil { + t.Fatalf("Cannot initialize signed data: %s", err) + } + oidTest := asn1.ObjectIdentifier{2, 3, 4, 5, 6, 7} + testValue := "TestValue" + if err := toBeSigned.AddSigner(cert.Certificate, cert.PrivateKey, SignerInfoConfig{ + ExtraSignedAttributes: []Attribute{Attribute{Type: oidTest, Value: testValue}}, + }); err != nil { + t.Fatalf("Cannot add signer: %s", err) + } + signed, err := toBeSigned.Finish() + if err != nil { + t.Fatalf("Cannot finish signing data: %s", err) + } + p7, err := Parse(signed) + var actual string + err = p7.UnmarshalSignedAttribute(oidTest, &actual) + if err != nil { + t.Fatalf("Cannot unmarshal test value: %s", err) + } + if testValue != actual { + t.Errorf("Attribute does not match test value\n\tExpected: %s\n\tActual: %s", testValue, actual) + } +} + +func TestPad(t *testing.T) { + tests := []struct { + Original []byte + Expected []byte + BlockSize int + }{ + {[]byte{0x1, 0x2, 0x3, 0x10}, []byte{0x1, 0x2, 0x3, 0x10, 0x4, 0x4, 0x4, 0x4}, 8}, + {[]byte{0x1, 0x2, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0}, []byte{0x1, 0x2, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8}, 8}, + } + for _, test := range tests { + padded, err := pad(test.Original, test.BlockSize) + if err != nil { + t.Errorf("pad encountered error: %s", err) + continue + } + if bytes.Compare(test.Expected, padded) != 0 { + t.Errorf("pad results mismatch:\n\tExpected: %X\n\tActual: %X", test.Expected, padded) + } + } +} + +type certKeyPair struct { + Certificate *x509.Certificate + PrivateKey *rsa.PrivateKey +} + +func createTestCertificate() (certKeyPair, error) { + signer, err := createTestCertificateByIssuer("Eddard Stark", nil) + if err != nil { + return certKeyPair{}, err + } + fmt.Println("Created root cert") + pem.Encode(os.Stdout, &pem.Block{Type: "CERTIFICATE", Bytes: signer.Certificate.Raw}) + pair, err := createTestCertificateByIssuer("Jon Snow", signer) + if err != nil { + return certKeyPair{}, err + } + fmt.Println("Created signer cert") + pem.Encode(os.Stdout, &pem.Block{Type: "CERTIFICATE", Bytes: pair.Certificate.Raw}) + return *pair, nil +} + +func createTestCertificateByIssuer(name string, issuer *certKeyPair) (*certKeyPair, error) { + priv, err := rsa.GenerateKey(rand.Reader, 1024) + if err != nil { + return nil, err + } + serialNumberLimit := new(big.Int).Lsh(big.NewInt(1), 32) + serialNumber, err := rand.Int(rand.Reader, serialNumberLimit) + if err != nil { + return nil, err + } + + template := x509.Certificate{ + SerialNumber: serialNumber, + SignatureAlgorithm: x509.SHA256WithRSA, + Subject: pkix.Name{ + CommonName: name, + Organization: []string{"Acme Co"}, + }, + NotBefore: time.Now(), + NotAfter: time.Now().AddDate(1, 0, 0), + KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature, + ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageEmailProtection}, + } + var issuerCert *x509.Certificate + var issuerKey crypto.PrivateKey + if issuer != nil { + issuerCert = issuer.Certificate + issuerKey = issuer.PrivateKey + } else { + template.IsCA = true + template.KeyUsage |= x509.KeyUsageCertSign + issuerCert = &template + issuerKey = priv + } + cert, err := x509.CreateCertificate(rand.Reader, &template, issuerCert, priv.Public(), issuerKey) + if err != nil { + return nil, err + } + leaf, err := x509.ParseCertificate(cert) + if err != nil { + return nil, err + } + return &certKeyPair{ + Certificate: leaf, + PrivateKey: priv, + }, nil +} + +type TestFixture struct { + Input []byte + Certificate *x509.Certificate + PrivateKey *rsa.PrivateKey +} + +func UnmarshalTestFixture(testPEMBlock string) TestFixture { + var result TestFixture + var derBlock *pem.Block + var pemBlock = []byte(testPEMBlock) + for { + derBlock, pemBlock = pem.Decode(pemBlock) + if derBlock == nil { + break + } + switch derBlock.Type { + case "PKCS7": + result.Input = derBlock.Bytes + case "CERTIFICATE": + result.Certificate, _ = x509.ParseCertificate(derBlock.Bytes) + case "PRIVATE KEY": + result.PrivateKey, _ = x509.ParsePKCS1PrivateKey(derBlock.Bytes) + } + } + + return result +} + +func MarshalTestFixture(t TestFixture, w io.Writer) { + if t.Input != nil { + pem.Encode(w, &pem.Block{Type: "PKCS7", Bytes: t.Input}) + } + if t.Certificate != nil { + pem.Encode(w, &pem.Block{Type: "CERTIFICATE", Bytes: t.Certificate.Raw}) + } + if t.PrivateKey != nil { + pem.Encode(w, &pem.Block{Type: "PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(t.PrivateKey)}) + } +} + +var SignedTestFixture = ` +-----BEGIN PKCS7----- +MIIDVgYJKoZIhvcNAQcCoIIDRzCCA0MCAQExCTAHBgUrDgMCGjAcBgkqhkiG9w0B +BwGgDwQNV2UgdGhlIFBlb3BsZaCCAdkwggHVMIIBQKADAgECAgRpuDctMAsGCSqG +SIb3DQEBCzApMRAwDgYDVQQKEwdBY21lIENvMRUwEwYDVQQDEwxFZGRhcmQgU3Rh +cmswHhcNMTUwNTA2MDQyNDQ4WhcNMTYwNTA2MDQyNDQ4WjAlMRAwDgYDVQQKEwdB +Y21lIENvMREwDwYDVQQDEwhKb24gU25vdzCBnzANBgkqhkiG9w0BAQEFAAOBjQAw +gYkCgYEAqr+tTF4mZP5rMwlXp1y+crRtFpuLXF1zvBZiYMfIvAHwo1ta8E1IcyEP +J1jIiKMcwbzeo6kAmZzIJRCTezq9jwXUsKbQTvcfOH9HmjUmXBRWFXZYoQs/OaaF +a45deHmwEeMQkuSWEtYiVKKZXtJOtflKIT3MryJEDiiItMkdybUCAwEAAaMSMBAw +DgYDVR0PAQH/BAQDAgCgMAsGCSqGSIb3DQEBCwOBgQDK1EweZWRL+f7Z+J0kVzY8 +zXptcBaV4Lf5wGZJLJVUgp33bpLNpT3yadS++XQJ+cvtW3wADQzBSTMduyOF8Zf+ +L7TjjrQ2+F2HbNbKUhBQKudxTfv9dJHdKbD+ngCCdQJYkIy2YexsoNG0C8nQkggy +axZd/J69xDVx6pui3Sj8sDGCATYwggEyAgEBMDEwKTEQMA4GA1UEChMHQWNtZSBD +bzEVMBMGA1UEAxMMRWRkYXJkIFN0YXJrAgRpuDctMAcGBSsOAwIaoGEwGAYJKoZI +hvcNAQkDMQsGCSqGSIb3DQEHATAgBgkqhkiG9w0BCQUxExcRMTUwNTA2MDAyNDQ4 +LTA0MDAwIwYJKoZIhvcNAQkEMRYEFG9D7gcTh9zfKiYNJ1lgB0yTh4sZMAsGCSqG +SIb3DQEBAQSBgFF3sGDU9PtXty/QMtpcFa35vvIOqmWQAIZt93XAskQOnBq4OloX +iL9Ct7t1m4pzjRm0o9nDkbaSLZe7HKASHdCqijroScGlI8M+alJ8drHSFv6ZIjnM +FIwIf0B2Lko6nh9/6mUXq7tbbIHa3Gd1JUVire/QFFtmgRXMbXYk8SIS +-----END PKCS7----- +-----BEGIN CERTIFICATE----- +MIIB1TCCAUCgAwIBAgIEabg3LTALBgkqhkiG9w0BAQswKTEQMA4GA1UEChMHQWNt +ZSBDbzEVMBMGA1UEAxMMRWRkYXJkIFN0YXJrMB4XDTE1MDUwNjA0MjQ0OFoXDTE2 +MDUwNjA0MjQ0OFowJTEQMA4GA1UEChMHQWNtZSBDbzERMA8GA1UEAxMISm9uIFNu +b3cwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKq/rUxeJmT+azMJV6dcvnK0 +bRabi1xdc7wWYmDHyLwB8KNbWvBNSHMhDydYyIijHMG83qOpAJmcyCUQk3s6vY8F +1LCm0E73Hzh/R5o1JlwUVhV2WKELPzmmhWuOXXh5sBHjEJLklhLWIlSimV7STrX5 +SiE9zK8iRA4oiLTJHcm1AgMBAAGjEjAQMA4GA1UdDwEB/wQEAwIAoDALBgkqhkiG +9w0BAQsDgYEAytRMHmVkS/n+2fidJFc2PM16bXAWleC3+cBmSSyVVIKd926SzaU9 +8mnUvvl0CfnL7Vt8AA0MwUkzHbsjhfGX/i+04460Nvhdh2zWylIQUCrncU37/XSR +3Smw/p4AgnUCWJCMtmHsbKDRtAvJ0JIIMmsWXfyevcQ1ceqbot0o/LA= +-----END CERTIFICATE----- +-----BEGIN PRIVATE KEY----- +MIICXgIBAAKBgQCqv61MXiZk/mszCVenXL5ytG0Wm4tcXXO8FmJgx8i8AfCjW1rw +TUhzIQ8nWMiIoxzBvN6jqQCZnMglEJN7Or2PBdSwptBO9x84f0eaNSZcFFYVdlih +Cz85poVrjl14ebAR4xCS5JYS1iJUople0k61+UohPcyvIkQOKIi0yR3JtQIDAQAB +AoGBAIPLCR9N+IKxodq11lNXEaUFwMHXc1zqwP8no+2hpz3+nVfplqqubEJ4/PJY +5AgbJoIfnxVhyBXJXu7E+aD/OPneKZrgp58YvHKgGvvPyJg2gpC/1Fh0vQB0HNpI +1ZzIZUl8ZTUtVgtnCBUOh5JGI4bFokAqrT//Uvcfd+idgxqBAkEA1ZbP/Kseld14 +qbWmgmU5GCVxsZRxgR1j4lG3UVjH36KXMtRTm1atAam1uw3OEGa6Y3ANjpU52FaB +Hep5rkk4FQJBAMynMo1L1uiN5GP+KYLEF5kKRxK+FLjXR0ywnMh+gpGcZDcOae+J ++t1gLoWBIESH/Xt639T7smuSfrZSA9V0EyECQA8cvZiWDvLxmaEAXkipmtGPjKzQ +4PsOtkuEFqFl07aKDYKmLUg3aMROWrJidqsIabWxbvQgsNgSvs38EiH3wkUCQQCg +ndxb7piVXb9RBwm3OoU2tE1BlXMX+sVXmAkEhd2dwDsaxrI3sHf1xGXem5AimQRF +JBOFyaCnMotGNioSHY5hAkEAxyXcNixQ2RpLXJTQZtwnbk0XDcbgB+fBgXnv/4f3 +BCvcu85DqJeJyQv44Oe1qsXEX9BfcQIOVaoep35RPlKi9g== +-----END PRIVATE KEY-----` + +// Content is "This is a test" +var EncryptedTestFixture = ` +-----BEGIN PKCS7----- +MIIBFwYJKoZIhvcNAQcDoIIBCDCCAQQCAQAxgcowgccCAQAwMjApMRAwDgYDVQQK +EwdBY21lIENvMRUwEwYDVQQDEwxFZGRhcmQgU3RhcmsCBQDL+CvWMAsGCSqGSIb3 +DQEBAQSBgKyP/5WlRTZD3dWMrLOX6QRNDrXEkQjhmToRwFZdY3LgUh25ZU0S/q4G +dHPV21Fv9lQD+q7l3vfeHw8M6Z1PKi9sHMVfxAkQpvaI96DTIT3YHtuLC1w3geCO +8eFWTq2qS4WChSuS/yhYosjA1kTkE0eLnVZcGw0z/WVuEZznkdyIMDIGCSqGSIb3 +DQEHATARBgUrDgMCBwQImpKsUyMPpQigEgQQRcWWrCRXqpD5Njs0GkJl+g== +-----END PKCS7----- +-----BEGIN CERTIFICATE----- +MIIB1jCCAUGgAwIBAgIFAMv4K9YwCwYJKoZIhvcNAQELMCkxEDAOBgNVBAoTB0Fj +bWUgQ28xFTATBgNVBAMTDEVkZGFyZCBTdGFyazAeFw0xNTA1MDYwMzU2NDBaFw0x +NjA1MDYwMzU2NDBaMCUxEDAOBgNVBAoTB0FjbWUgQ28xETAPBgNVBAMTCEpvbiBT +bm93MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDK6NU0R0eiCYVquU4RcjKc +LzGfx0aa1lMr2TnLQUSeLFZHFxsyyMXXuMPig3HK4A7SGFHupO+/1H/sL4xpH5zg +8+Zg2r8xnnney7abxcuv0uATWSIeKlNnb1ZO1BAxFnESc3GtyOCr2dUwZHX5mRVP ++Zxp2ni5qHNraf3wE2VPIQIDAQABoxIwEDAOBgNVHQ8BAf8EBAMCAKAwCwYJKoZI +hvcNAQELA4GBAIr2F7wsqmEU/J/kLyrCgEVXgaV/sKZq4pPNnzS0tBYk8fkV3V18 +sBJyHKRLL/wFZASvzDcVGCplXyMdAOCyfd8jO3F9Ac/xdlz10RrHJT75hNu3a7/n +9KNwKhfN4A1CQv2x372oGjRhCW5bHNCWx4PIVeNzCyq/KZhyY9sxHE6f +-----END CERTIFICATE----- +-----BEGIN PRIVATE KEY----- +MIICXgIBAAKBgQDK6NU0R0eiCYVquU4RcjKcLzGfx0aa1lMr2TnLQUSeLFZHFxsy +yMXXuMPig3HK4A7SGFHupO+/1H/sL4xpH5zg8+Zg2r8xnnney7abxcuv0uATWSIe +KlNnb1ZO1BAxFnESc3GtyOCr2dUwZHX5mRVP+Zxp2ni5qHNraf3wE2VPIQIDAQAB +AoGBALyvnSt7KUquDen7nXQtvJBudnf9KFPt//OjkdHHxNZNpoF/JCSqfQeoYkeu +MdAVYNLQGMiRifzZz4dDhA9xfUAuy7lcGQcMCxEQ1dwwuFaYkawbS0Tvy2PFlq2d +H5/HeDXU4EDJ3BZg0eYj2Bnkt1sJI35UKQSxblQ0MY2q0uFBAkEA5MMOogkgUx1C +67S1tFqMUSM8D0mZB0O5vOJZC5Gtt2Urju6vywge2ArExWRXlM2qGl8afFy2SgSv +Xk5eybcEiQJBAOMRwwbEoW5NYHuFFbSJyWll4n71CYuWuQOCzehDPyTb80WFZGLV +i91kFIjeERyq88eDE5xVB3ZuRiXqaShO/9kCQQCKOEkpInaDgZSjskZvuJ47kByD +6CYsO4GIXQMMeHML8ncFH7bb6AYq5ybJVb2NTU7QLFJmfeYuhvIm+xdOreRxAkEA +o5FC5Jg2FUfFzZSDmyZ6IONUsdF/i78KDV5nRv1R+hI6/oRlWNCtTNBv/lvBBd6b +dseUE9QoaQZsn5lpILEvmQJAZ0B+Or1rAYjnbjnUhdVZoy9kC4Zov+4UH3N/BtSy +KJRWUR0wTWfZBPZ5hAYZjTBEAFULaYCXlQKsODSp0M1aQA== +-----END PRIVATE KEY-----` + +var EC2IdentityDocumentFixture = ` +-----BEGIN PKCS7----- +MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAaCA +JIAEggGmewogICJwcml2YXRlSXAiIDogIjE3Mi4zMC4wLjI1MiIsCiAgImRldnBh +eVByb2R1Y3RDb2RlcyIgOiBudWxsLAogICJhdmFpbGFiaWxpdHlab25lIiA6ICJ1 +cy1lYXN0LTFhIiwKICAidmVyc2lvbiIgOiAiMjAxMC0wOC0zMSIsCiAgImluc3Rh +bmNlSWQiIDogImktZjc5ZmU1NmMiLAogICJiaWxsaW5nUHJvZHVjdHMiIDogbnVs +bCwKICAiaW5zdGFuY2VUeXBlIiA6ICJ0Mi5taWNybyIsCiAgImFjY291bnRJZCIg +OiAiMTIxNjU5MDE0MzM0IiwKICAiaW1hZ2VJZCIgOiAiYW1pLWZjZTNjNjk2IiwK +ICAicGVuZGluZ1RpbWUiIDogIjIwMTYtMDQtMDhUMDM6MDE6MzhaIiwKICAiYXJj +aGl0ZWN0dXJlIiA6ICJ4ODZfNjQiLAogICJrZXJuZWxJZCIgOiBudWxsLAogICJy +YW1kaXNrSWQiIDogbnVsbCwKICAicmVnaW9uIiA6ICJ1cy1lYXN0LTEiCn0AAAAA +AAAxggEYMIIBFAIBATBpMFwxCzAJBgNVBAYTAlVTMRkwFwYDVQQIExBXYXNoaW5n +dG9uIFN0YXRlMRAwDgYDVQQHEwdTZWF0dGxlMSAwHgYDVQQKExdBbWF6b24gV2Vi +IFNlcnZpY2VzIExMQwIJAJa6SNnlXhpnMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0B +CQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0xNjA0MDgwMzAxNDRaMCMG +CSqGSIb3DQEJBDEWBBTuUc28eBXmImAautC+wOjqcFCBVjAJBgcqhkjOOAQDBC8w +LQIVAKA54NxGHWWCz5InboDmY/GHs33nAhQ6O/ZI86NwjA9Vz3RNMUJrUPU5tAAA +AAAAAA== +-----END PKCS7----- +-----BEGIN CERTIFICATE----- +MIIC7TCCAq0CCQCWukjZ5V4aZzAJBgcqhkjOOAQDMFwxCzAJBgNVBAYTAlVTMRkw +FwYDVQQIExBXYXNoaW5ndG9uIFN0YXRlMRAwDgYDVQQHEwdTZWF0dGxlMSAwHgYD +VQQKExdBbWF6b24gV2ViIFNlcnZpY2VzIExMQzAeFw0xMjAxMDUxMjU2MTJaFw0z +ODAxMDUxMjU2MTJaMFwxCzAJBgNVBAYTAlVTMRkwFwYDVQQIExBXYXNoaW5ndG9u +IFN0YXRlMRAwDgYDVQQHEwdTZWF0dGxlMSAwHgYDVQQKExdBbWF6b24gV2ViIFNl +cnZpY2VzIExMQzCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQCjkvcS2bb1VQ4yt/5e +ih5OO6kK/n1Lzllr7D8ZwtQP8fOEpp5E2ng+D6Ud1Z1gYipr58Kj3nssSNpI6bX3 +VyIQzK7wLclnd/YozqNNmgIyZecN7EglK9ITHJLP+x8FtUpt3QbyYXJdmVMegN6P +hviYt5JH/nYl4hh3Pa1HJdskgQIVALVJ3ER11+Ko4tP6nwvHwh6+ERYRAoGBAI1j +k+tkqMVHuAFcvAGKocTgsjJem6/5qomzJuKDmbJNu9Qxw3rAotXau8Qe+MBcJl/U +hhy1KHVpCGl9fueQ2s6IL0CaO/buycU1CiYQk40KNHCcHfNiZbdlx1E9rpUp7bnF +lRa2v1ntMX3caRVDdbtPEWmdxSCYsYFDk4mZrOLBA4GEAAKBgEbmeve5f8LIE/Gf +MNmP9CM5eovQOGx5ho8WqD+aTebs+k2tn92BBPqeZqpWRa5P/+jrdKml1qx4llHW +MXrs3IgIb6+hUIB+S8dz8/mmO0bpr76RoZVCXYab2CZedFut7qc3WUH9+EUAH5mw +vSeDCOUMYQR7R9LINYwouHIziqQYMAkGByqGSM44BAMDLwAwLAIUWXBlk40xTwSw +7HX32MxXYruse9ACFBNGmdX2ZBrVNGrN9N2f6ROk0k9K +-----END CERTIFICATE-----` + +var AppStoreRecieptFixture = ` +-----BEGIN PKCS7----- +MIITtgYJKoZIhvcNAQcCoIITpzCCE6MCAQExCzAJBgUrDgMCGgUAMIIDVwYJKoZI +hvcNAQcBoIIDSASCA0QxggNAMAoCAQgCAQEEAhYAMAoCARQCAQEEAgwAMAsCAQEC +AQEEAwIBADALAgEDAgEBBAMMATEwCwIBCwIBAQQDAgEAMAsCAQ8CAQEEAwIBADAL +AgEQAgEBBAMCAQAwCwIBGQIBAQQDAgEDMAwCAQoCAQEEBBYCNCswDAIBDgIBAQQE +AgIAjTANAgENAgEBBAUCAwFgvTANAgETAgEBBAUMAzEuMDAOAgEJAgEBBAYCBFAy +NDcwGAIBAgIBAQQQDA5jb20uemhpaHUudGVzdDAYAgEEAgECBBCS+ZODNMHwT1Nz +gWYDXyWZMBsCAQACAQEEEwwRUHJvZHVjdGlvblNhbmRib3gwHAIBBQIBAQQU4nRh +YCEZx70Flzv7hvJRjJZckYIwHgIBDAIBAQQWFhQyMDE2LTA3LTIzVDA2OjIxOjEx +WjAeAgESAgEBBBYWFDIwMTMtMDgtMDFUMDc6MDA6MDBaMD0CAQYCAQEENbR21I+a +8+byMXo3NPRoDWQmSXQF2EcCeBoD4GaL//ZCRETp9rGFPSg1KekCP7Kr9HAqw09m +MEICAQcCAQEEOlVJozYYBdugybShbiiMsejDMNeCbZq6CrzGBwW6GBy+DGWxJI91 +Y3ouXN4TZUhuVvLvN1b0m5T3ggQwggFaAgERAgEBBIIBUDGCAUwwCwICBqwCAQEE +AhYAMAsCAgatAgEBBAIMADALAgIGsAIBAQQCFgAwCwICBrICAQEEAgwAMAsCAgaz +AgEBBAIMADALAgIGtAIBAQQCDAAwCwICBrUCAQEEAgwAMAsCAga2AgEBBAIMADAM +AgIGpQIBAQQDAgEBMAwCAgarAgEBBAMCAQEwDAICBq4CAQEEAwIBADAMAgIGrwIB +AQQDAgEAMAwCAgaxAgEBBAMCAQAwGwICBqcCAQEEEgwQMTAwMDAwMDIyNTMyNTkw +MTAbAgIGqQIBAQQSDBAxMDAwMDAwMjI1MzI1OTAxMB8CAgaoAgEBBBYWFDIwMTYt +MDctMjNUMDY6MjE6MTFaMB8CAgaqAgEBBBYWFDIwMTYtMDctMjNUMDY6MjE6MTFa +MCACAgamAgEBBBcMFWNvbS56aGlodS50ZXN0LnRlc3RfMaCCDmUwggV8MIIEZKAD +AgECAggO61eH554JjTANBgkqhkiG9w0BAQUFADCBljELMAkGA1UEBhMCVVMxEzAR +BgNVBAoMCkFwcGxlIEluYy4xLDAqBgNVBAsMI0FwcGxlIFdvcmxkd2lkZSBEZXZl +bG9wZXIgUmVsYXRpb25zMUQwQgYDVQQDDDtBcHBsZSBXb3JsZHdpZGUgRGV2ZWxv +cGVyIFJlbGF0aW9ucyBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0xNTExMTMw +MjE1MDlaFw0yMzAyMDcyMTQ4NDdaMIGJMTcwNQYDVQQDDC5NYWMgQXBwIFN0b3Jl +IGFuZCBpVHVuZXMgU3RvcmUgUmVjZWlwdCBTaWduaW5nMSwwKgYDVQQLDCNBcHBs +ZSBXb3JsZHdpZGUgRGV2ZWxvcGVyIFJlbGF0aW9uczETMBEGA1UECgwKQXBwbGUg +SW5jLjELMAkGA1UEBhMCVVMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB +AQClz4H9JaKBW9aH7SPaMxyO4iPApcQmyz3Gn+xKDVWG/6QC15fKOVRtfX+yVBid +xCxScY5ke4LOibpJ1gjltIhxzz9bRi7GxB24A6lYogQ+IXjV27fQjhKNg0xbKmg3 +k8LyvR7E0qEMSlhSqxLj7d0fmBWQNS3CzBLKjUiB91h4VGvojDE2H0oGDEdU8zeQ +uLKSiX1fpIVK4cCc4Lqku4KXY/Qrk8H9Pm/KwfU8qY9SGsAlCnYO3v6Z/v/Ca/Vb +XqxzUUkIVonMQ5DMjoEC0KCXtlyxoWlph5AQaCYmObgdEHOwCl3Fc9DfdjvYLdmI +HuPsB8/ijtDT+iZVge/iA0kjAgMBAAGjggHXMIIB0zA/BggrBgEFBQcBAQQzMDEw +LwYIKwYBBQUHMAGGI2h0dHA6Ly9vY3NwLmFwcGxlLmNvbS9vY3NwMDMtd3dkcjA0 +MB0GA1UdDgQWBBSRpJz8xHa3n6CK9E31jzZd7SsEhTAMBgNVHRMBAf8EAjAAMB8G +A1UdIwQYMBaAFIgnFwmpthhgi+zruvZHWcVSVKO3MIIBHgYDVR0gBIIBFTCCAREw +ggENBgoqhkiG92NkBQYBMIH+MIHDBggrBgEFBQcCAjCBtgyBs1JlbGlhbmNlIG9u +IHRoaXMgY2VydGlmaWNhdGUgYnkgYW55IHBhcnR5IGFzc3VtZXMgYWNjZXB0YW5j +ZSBvZiB0aGUgdGhlbiBhcHBsaWNhYmxlIHN0YW5kYXJkIHRlcm1zIGFuZCBjb25k +aXRpb25zIG9mIHVzZSwgY2VydGlmaWNhdGUgcG9saWN5IGFuZCBjZXJ0aWZpY2F0 +aW9uIHByYWN0aWNlIHN0YXRlbWVudHMuMDYGCCsGAQUFBwIBFipodHRwOi8vd3d3 +LmFwcGxlLmNvbS9jZXJ0aWZpY2F0ZWF1dGhvcml0eS8wDgYDVR0PAQH/BAQDAgeA +MBAGCiqGSIb3Y2QGCwEEAgUAMA0GCSqGSIb3DQEBBQUAA4IBAQANphvTLj3jWysH +bkKWbNPojEMwgl/gXNGNvr0PvRr8JZLbjIXDgFnf4+LXLgUUrA3btrj+/DUufMut +F2uOfx/kd7mxZ5W0E16mGYZ2+FogledjjA9z/Ojtxh+umfhlSFyg4Cg6wBA3Lbmg +BDkfc7nIBf3y3n8aKipuKwH8oCBc2et9J6Yz+PWY4L5E27FMZ/xuCk/J4gao0pfz +p45rUaJahHVl0RYEYuPBX/UIqc9o2ZIAycGMs/iNAGS6WGDAfK+PdcppuVsq1h1o +bphC9UynNxmbzDscehlD86Ntv0hgBgw2kivs3hi1EdotI9CO/KBpnBcbnoB7OUdF +MGEvxxOoMIIEIjCCAwqgAwIBAgIIAd68xDltoBAwDQYJKoZIhvcNAQEFBQAwYjEL +MAkGA1UEBhMCVVMxEzARBgNVBAoTCkFwcGxlIEluYy4xJjAkBgNVBAsTHUFwcGxl +IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRYwFAYDVQQDEw1BcHBsZSBSb290IENB +MB4XDTEzMDIwNzIxNDg0N1oXDTIzMDIwNzIxNDg0N1owgZYxCzAJBgNVBAYTAlVT +MRMwEQYDVQQKDApBcHBsZSBJbmMuMSwwKgYDVQQLDCNBcHBsZSBXb3JsZHdpZGUg +RGV2ZWxvcGVyIFJlbGF0aW9uczFEMEIGA1UEAww7QXBwbGUgV29ybGR3aWRlIERl +dmVsb3BlciBSZWxhdGlvbnMgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEiMA0G +CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDKOFSmy1aqyCQ5SOmM7uxfuH8mkbw0 +U3rOfGOAYXdkXqUHI7Y5/lAtFVZYcC1+xG7BSoU+L/DehBqhV8mvexj/avoVEkkV +CBmsqtsqMu2WY2hSFT2Miuy/axiV4AOsAX2XBWfODoWVN2rtCbauZ81RZJ/GXNG8 +V25nNYB2NqSHgW44j9grFU57Jdhav06DwY3Sk9UacbVgnJ0zTlX5ElgMhrgWDcHl +d0WNUEi6Ky3klIXh6MSdxmilsKP8Z35wugJZS3dCkTm59c3hTO/AO0iMpuUhXf1q +arunFjVg0uat80YpyejDi+l5wGphZxWy8P3laLxiX27Pmd3vG2P+kmWrAgMBAAGj +gaYwgaMwHQYDVR0OBBYEFIgnFwmpthhgi+zruvZHWcVSVKO3MA8GA1UdEwEB/wQF +MAMBAf8wHwYDVR0jBBgwFoAUK9BpR5R2Cf70a40uQKb3R01/CF4wLgYDVR0fBCcw +JTAjoCGgH4YdaHR0cDovL2NybC5hcHBsZS5jb20vcm9vdC5jcmwwDgYDVR0PAQH/ +BAQDAgGGMBAGCiqGSIb3Y2QGAgEEAgUAMA0GCSqGSIb3DQEBBQUAA4IBAQBPz+9Z +viz1smwvj+4ThzLoBTWobot9yWkMudkXvHcs1Gfi/ZptOllc34MBvbKuKmFysa/N +w0Uwj6ODDc4dR7Txk4qjdJukw5hyhzs+r0ULklS5MruQGFNrCk4QttkdUGwhgAqJ +TleMa1s8Pab93vcNIx0LSiaHP7qRkkykGRIZbVf1eliHe2iK5IaMSuviSRSqpd1V +AKmuu0swruGgsbwpgOYJd+W+NKIByn/c4grmO7i77LpilfMFY0GCzQ87HUyVpNur ++cmV6U/kTecmmYHpvPm0KdIBembhLoz2IYrF+Hjhga6/05Cdqa3zr/04GpZnMBxR +pVzscYqCtGwPDBUfMIIEuzCCA6OgAwIBAgIBAjANBgkqhkiG9w0BAQUFADBiMQsw +CQYDVQQGEwJVUzETMBEGA1UEChMKQXBwbGUgSW5jLjEmMCQGA1UECxMdQXBwbGUg +Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkxFjAUBgNVBAMTDUFwcGxlIFJvb3QgQ0Ew +HhcNMDYwNDI1MjE0MDM2WhcNMzUwMjA5MjE0MDM2WjBiMQswCQYDVQQGEwJVUzET +MBEGA1UEChMKQXBwbGUgSW5jLjEmMCQGA1UECxMdQXBwbGUgQ2VydGlmaWNhdGlv +biBBdXRob3JpdHkxFjAUBgNVBAMTDUFwcGxlIFJvb3QgQ0EwggEiMA0GCSqGSIb3 +DQEBAQUAA4IBDwAwggEKAoIBAQDkkakJH5HbHkdQ6wXtXnmELes2oldMVeyLGYne ++Uts9QerIjAC6Bg++FAJ039BqJj50cpmnCRrEdCju+QbKsMflZ56DKRHi1vUFjcz +y8QPTc4UadHJGXL1XQ7Vf1+b8iUDulWPTV0N8WQ1IxVLFVkds5T39pyez1C6wVhQ +Z48ItCD3y6wsIG9wtj8BMIy3Q88PnT3zK0koGsj+zrW5DtleHNbLPbU6rfQPDgCS +C7EhFi501TwN22IWq6NxkkdTVcGvL0Gz+PvjcM3mo0xFfh9Ma1CWQYnEdGILEINB +hzOKgbEwWOxaBDKMaLOPHd5lc/9nXmW8Sdh2nzMUZaF3lMktAgMBAAGjggF6MIIB +djAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUK9Bp +R5R2Cf70a40uQKb3R01/CF4wHwYDVR0jBBgwFoAUK9BpR5R2Cf70a40uQKb3R01/ +CF4wggERBgNVHSAEggEIMIIBBDCCAQAGCSqGSIb3Y2QFATCB8jAqBggrBgEFBQcC +ARYeaHR0cHM6Ly93d3cuYXBwbGUuY29tL2FwcGxlY2EvMIHDBggrBgEFBQcCAjCB +thqBs1JlbGlhbmNlIG9uIHRoaXMgY2VydGlmaWNhdGUgYnkgYW55IHBhcnR5IGFz +c3VtZXMgYWNjZXB0YW5jZSBvZiB0aGUgdGhlbiBhcHBsaWNhYmxlIHN0YW5kYXJk +IHRlcm1zIGFuZCBjb25kaXRpb25zIG9mIHVzZSwgY2VydGlmaWNhdGUgcG9saWN5 +IGFuZCBjZXJ0aWZpY2F0aW9uIHByYWN0aWNlIHN0YXRlbWVudHMuMA0GCSqGSIb3 +DQEBBQUAA4IBAQBcNplMLXi37Yyb3PN3m/J20ncwT8EfhYOFG5k9RzfyqZtAjizU +sZAS2L70c5vu0mQPy3lPNNiiPvl4/2vIB+x9OYOLUyDTOMSxv5pPCmv/K/xZpwUJ +fBdAVhEedNO3iyM7R6PVbyTi69G3cN8PReEnyvFteO3ntRcXqNx+IjXKJdXZD9Zr +1KIkIxH3oayPc4FgxhtbCS+SsvhESPBgOJ4V9T0mZyCKM2r3DYLP3uujL/lTaltk +wGMzd/c6ByxW69oPIQ7aunMZT7XZNn/Bh1XZp5m5MkL72NVxnn6hUrcbvZNCJBIq +xw8dtk2cXmPIS4AXUKqK1drk/NAJBzewdXUhMYIByzCCAccCAQEwgaMwgZYxCzAJ +BgNVBAYTAlVTMRMwEQYDVQQKDApBcHBsZSBJbmMuMSwwKgYDVQQLDCNBcHBsZSBX +b3JsZHdpZGUgRGV2ZWxvcGVyIFJlbGF0aW9uczFEMEIGA1UEAww7QXBwbGUgV29y +bGR3aWRlIERldmVsb3BlciBSZWxhdGlvbnMgQ2VydGlmaWNhdGlvbiBBdXRob3Jp +dHkCCA7rV4fnngmNMAkGBSsOAwIaBQAwDQYJKoZIhvcNAQEBBQAEggEAasPtnide +NWyfUtewW9OSgcQA8pW+5tWMR0469cBPZR84uJa0gyfmPspySvbNOAwnrwzZHYLa +ujOxZLip4DUw4F5s3QwUa3y4BXpF4J+NSn9XNvxNtnT/GcEQtCuFwgJ0o3F0ilhv +MTHrwiwyx/vr+uNDqlORK8lfK+1qNp+A/kzh8eszMrn4JSeTh9ZYxLHE56WkTQGD +VZXl0gKgxSOmDrcp1eQxdlymzrPv9U60wUJ0bkPfrU9qZj3mJrmrkQk61JTe3j6/ +QfjfFBG9JG2mUmYQP1KQ3SypGHzDW8vngvsGu//tNU0NFfOqQu4bYU4VpQl0nPtD +4B85NkrgvQsWAQ== +-----END PKCS7-----` diff --git a/vendor/github.com/ghodss/yaml/README.md b/vendor/github.com/ghodss/yaml/README.md index f8f7e3695..0200f75b4 100644 --- a/vendor/github.com/ghodss/yaml/README.md +++ b/vendor/github.com/ghodss/yaml/README.md @@ -4,13 +4,13 @@ ## Introduction -A wrapper around [go-yaml](https://github.com/go-yaml/yaml) designed to enable a better way of handling YAML when marshaling to and from structs. +A wrapper around [go-yaml](https://github.com/go-yaml/yaml) designed to enable a better way of handling YAML when marshaling to and from structs. In short, this library first converts YAML to JSON using go-yaml and then uses `json.Marshal` and `json.Unmarshal` to convert to or from the struct. This means that it effectively reuses the JSON struct tags as well as the custom JSON methods `MarshalJSON` and `UnmarshalJSON` unlike go-yaml. For a detailed overview of the rationale behind this method, [see this blog post](http://ghodss.com/2014/the-right-way-to-handle-yaml-in-golang/). ## Compatibility -This package uses [go-yaml v2](https://github.com/go-yaml/yaml) and therefore supports [everything go-yaml supports](https://github.com/go-yaml/yaml#compatibility). +This package uses [go-yaml](https://github.com/go-yaml/yaml) and therefore supports [everything go-yaml supports](https://github.com/go-yaml/yaml#compatibility). ## Caveats @@ -44,6 +44,8 @@ import "github.com/ghodss/yaml" Usage is very similar to the JSON library: ```go +package main + import ( "fmt" @@ -51,8 +53,8 @@ import ( ) type Person struct { - Name string `json:"name"` // Affects YAML field names too. - Age int `json:"name"` + Name string `json:"name"` // Affects YAML field names too. + Age int `json:"age"` } func main() { @@ -65,13 +67,13 @@ func main() { } fmt.Println(string(y)) /* Output: - name: John age: 30 + name: John */ // Unmarshal the YAML back into a Person struct. var p2 Person - err := yaml.Unmarshal(y, &p2) + err = yaml.Unmarshal(y, &p2) if err != nil { fmt.Printf("err: %v\n", err) return @@ -86,11 +88,14 @@ func main() { `yaml.YAMLToJSON` and `yaml.JSONToYAML` methods are also available: ```go +package main + import ( "fmt" "github.com/ghodss/yaml" ) + func main() { j := []byte(`{"name": "John", "age": 30}`) y, err := yaml.JSONToYAML(j) diff --git a/vendor/github.com/ghodss/yaml/fields.go b/vendor/github.com/ghodss/yaml/fields.go index 0bd3c2b46..586007402 100644 --- a/vendor/github.com/ghodss/yaml/fields.go +++ b/vendor/github.com/ghodss/yaml/fields.go @@ -45,7 +45,11 @@ func indirect(v reflect.Value, decodingNull bool) (json.Unmarshaler, encoding.Te break } if v.IsNil() { - v.Set(reflect.New(v.Type().Elem())) + if v.CanSet() { + v.Set(reflect.New(v.Type().Elem())) + } else { + v = reflect.New(v.Type().Elem()) + } } if v.Type().NumMethod() > 0 { if u, ok := v.Interface().(json.Unmarshaler); ok { diff --git a/vendor/github.com/ghodss/yaml/yaml.go b/vendor/github.com/ghodss/yaml/yaml.go index c02beacb9..4fb4054a8 100644 --- a/vendor/github.com/ghodss/yaml/yaml.go +++ b/vendor/github.com/ghodss/yaml/yaml.go @@ -15,12 +15,12 @@ import ( func Marshal(o interface{}) ([]byte, error) { j, err := json.Marshal(o) if err != nil { - return nil, fmt.Errorf("error marshaling into JSON: ", err) + return nil, fmt.Errorf("error marshaling into JSON: %v", err) } y, err := JSONToYAML(j) if err != nil { - return nil, fmt.Errorf("error converting JSON to YAML: ", err) + return nil, fmt.Errorf("error converting JSON to YAML: %v", err) } return y, nil @@ -48,7 +48,7 @@ func JSONToYAML(j []byte) ([]byte, error) { var jsonObj interface{} // We are using yaml.Unmarshal here (instead of json.Unmarshal) because the // Go JSON library doesn't try to pick the right number type (int, float, - // etc.) when unmarshling to interface{}, it just picks float64 + // etc.) when unmarshalling to interface{}, it just picks float64 // universally. go-yaml does go through the effort of picking the right // number type, so we can preserve number type throughout this process. err := yaml.Unmarshal(j, &jsonObj) diff --git a/vendor/github.com/ghodss/yaml/yaml_test.go b/vendor/github.com/ghodss/yaml/yaml_test.go new file mode 100644 index 000000000..505af4530 --- /dev/null +++ b/vendor/github.com/ghodss/yaml/yaml_test.go @@ -0,0 +1,287 @@ +package yaml + +import ( + "fmt" + "math" + "reflect" + "strconv" + "testing" +) + +type MarshalTest struct { + A string + B int64 + // Would like to test float64, but it's not supported in go-yaml. + // (See https://github.com/go-yaml/yaml/issues/83.) + C float32 +} + +func TestMarshal(t *testing.T) { + f32String := strconv.FormatFloat(math.MaxFloat32, 'g', -1, 32) + s := MarshalTest{"a", math.MaxInt64, math.MaxFloat32} + e := []byte(fmt.Sprintf("A: a\nB: %d\nC: %s\n", math.MaxInt64, f32String)) + + y, err := Marshal(s) + if err != nil { + t.Errorf("error marshaling YAML: %v", err) + } + + if !reflect.DeepEqual(y, e) { + t.Errorf("marshal YAML was unsuccessful, expected: %#v, got: %#v", + string(e), string(y)) + } +} + +type UnmarshalString struct { + A string + True string +} + +type UnmarshalStringMap struct { + A map[string]string +} + +type UnmarshalNestedString struct { + A NestedString +} + +type NestedString struct { + A string +} + +type UnmarshalSlice struct { + A []NestedSlice +} + +type NestedSlice struct { + B string + C *string +} + +func TestUnmarshal(t *testing.T) { + y := []byte("a: 1") + s1 := UnmarshalString{} + e1 := UnmarshalString{A: "1"} + unmarshal(t, y, &s1, &e1) + + y = []byte("a: true") + s1 = UnmarshalString{} + e1 = UnmarshalString{A: "true"} + unmarshal(t, y, &s1, &e1) + + y = []byte("true: 1") + s1 = UnmarshalString{} + e1 = UnmarshalString{True: "1"} + unmarshal(t, y, &s1, &e1) + + y = []byte("a:\n a: 1") + s2 := UnmarshalNestedString{} + e2 := UnmarshalNestedString{NestedString{"1"}} + unmarshal(t, y, &s2, &e2) + + y = []byte("a:\n - b: abc\n c: def\n - b: 123\n c: 456\n") + s3 := UnmarshalSlice{} + e3 := UnmarshalSlice{[]NestedSlice{NestedSlice{"abc", strPtr("def")}, NestedSlice{"123", strPtr("456")}}} + unmarshal(t, y, &s3, &e3) + + y = []byte("a:\n b: 1") + s4 := UnmarshalStringMap{} + e4 := UnmarshalStringMap{map[string]string{"b": "1"}} + unmarshal(t, y, &s4, &e4) + + y = []byte(` +a: + name: TestA +b: + name: TestB +`) + type NamedThing struct { + Name string `json:"name"` + } + s5 := map[string]*NamedThing{} + e5 := map[string]*NamedThing{ + "a": &NamedThing{Name: "TestA"}, + "b": &NamedThing{Name: "TestB"}, + } + unmarshal(t, y, &s5, &e5) +} + +func unmarshal(t *testing.T, y []byte, s, e interface{}) { + err := Unmarshal(y, s) + if err != nil { + t.Errorf("error unmarshaling YAML: %v", err) + } + + if !reflect.DeepEqual(s, e) { + t.Errorf("unmarshal YAML was unsuccessful, expected: %+#v, got: %+#v", + e, s) + } +} + +type Case struct { + input string + output string + // By default we test that reversing the output == input. But if there is a + // difference in the reversed output, you can optionally specify it here. + reverse *string +} + +type RunType int + +const ( + RunTypeJSONToYAML RunType = iota + RunTypeYAMLToJSON +) + +func TestJSONToYAML(t *testing.T) { + cases := []Case{ + { + `{"t":"a"}`, + "t: a\n", + nil, + }, { + `{"t":null}`, + "t: null\n", + nil, + }, + } + + runCases(t, RunTypeJSONToYAML, cases) +} + +func TestYAMLToJSON(t *testing.T) { + cases := []Case{ + { + "t: a\n", + `{"t":"a"}`, + nil, + }, { + "t: \n", + `{"t":null}`, + strPtr("t: null\n"), + }, { + "t: null\n", + `{"t":null}`, + nil, + }, { + "1: a\n", + `{"1":"a"}`, + strPtr("\"1\": a\n"), + }, { + "1000000000000000000000000000000000000: a\n", + `{"1e+36":"a"}`, + strPtr("\"1e+36\": a\n"), + }, { + "1e+36: a\n", + `{"1e+36":"a"}`, + strPtr("\"1e+36\": a\n"), + }, { + "\"1e+36\": a\n", + `{"1e+36":"a"}`, + nil, + }, { + "\"1.2\": a\n", + `{"1.2":"a"}`, + nil, + }, { + "- t: a\n", + `[{"t":"a"}]`, + nil, + }, { + "- t: a\n" + + "- t:\n" + + " b: 1\n" + + " c: 2\n", + `[{"t":"a"},{"t":{"b":1,"c":2}}]`, + nil, + }, { + `[{t: a}, {t: {b: 1, c: 2}}]`, + `[{"t":"a"},{"t":{"b":1,"c":2}}]`, + strPtr("- t: a\n" + + "- t:\n" + + " b: 1\n" + + " c: 2\n"), + }, { + "- t: \n", + `[{"t":null}]`, + strPtr("- t: null\n"), + }, { + "- t: null\n", + `[{"t":null}]`, + nil, + }, + } + + // Cases that should produce errors. + _ = []Case{ + { + "~: a", + `{"null":"a"}`, + nil, + }, { + "a: !!binary gIGC\n", + "{\"a\":\"\x80\x81\x82\"}", + nil, + }, + } + + runCases(t, RunTypeYAMLToJSON, cases) +} + +func runCases(t *testing.T, runType RunType, cases []Case) { + var f func([]byte) ([]byte, error) + var invF func([]byte) ([]byte, error) + var msg string + var invMsg string + if runType == RunTypeJSONToYAML { + f = JSONToYAML + invF = YAMLToJSON + msg = "JSON to YAML" + invMsg = "YAML back to JSON" + } else { + f = YAMLToJSON + invF = JSONToYAML + msg = "YAML to JSON" + invMsg = "JSON back to YAML" + } + + for _, c := range cases { + // Convert the string. + t.Logf("converting %s\n", c.input) + output, err := f([]byte(c.input)) + if err != nil { + t.Errorf("Failed to convert %s, input: `%s`, err: %v", msg, c.input, err) + } + + // Check it against the expected output. + if string(output) != c.output { + t.Errorf("Failed to convert %s, input: `%s`, expected `%s`, got `%s`", + msg, c.input, c.output, string(output)) + } + + // Set the string that we will compare the reversed output to. + reverse := c.input + // If a special reverse string was specified, use that instead. + if c.reverse != nil { + reverse = *c.reverse + } + + // Reverse the output. + input, err := invF(output) + if err != nil { + t.Errorf("Failed to convert %s, input: `%s`, err: %v", invMsg, string(output), err) + } + + // Check the reverse is equal to the input (or to *c.reverse). + if string(input) != reverse { + t.Errorf("Failed to convert %s, input: `%s`, expected `%s`, got `%s`", + invMsg, string(output), reverse, string(input)) + } + } + +} + +// To be able to easily fill in the *Case.reverse string above. +func strPtr(s string) *string { + return &s +} diff --git a/vendor/github.com/go-openapi/jsonpointer/.drone.yml b/vendor/github.com/go-openapi/jsonpointer/.drone.yml deleted file mode 100644 index cb8c7b50a..000000000 --- a/vendor/github.com/go-openapi/jsonpointer/.drone.yml +++ /dev/null @@ -1,32 +0,0 @@ -clone: - path: github.com/go-openapi/jsonpointer - -matrix: - GO_VERSION: - - "1.6" - -build: - integration: - image: golang:$$GO_VERSION - pull: true - commands: - - go get -u github.com/stretchr/testify/assert - - go get -u github.com/go-openapi/swag - - go test -race - - go test -v -cover -coverprofile=coverage.out -covermode=count ./... - -notify: - slack: - channel: bots - webhook_url: $$SLACK_URL - username: drone - -publish: - coverage: - server: https://coverage.vmware.run - token: $$GITHUB_TOKEN - # threshold: 70 - # must_increase: true - when: - matrix: - GO_VERSION: "1.6" diff --git a/vendor/github.com/go-openapi/jsonpointer/.editorconfig b/vendor/github.com/go-openapi/jsonpointer/.editorconfig new file mode 100644 index 000000000..3152da69a --- /dev/null +++ b/vendor/github.com/go-openapi/jsonpointer/.editorconfig @@ -0,0 +1,26 @@ +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true + +# Set default charset +[*.{js,py,go,scala,rb,java,html,css,less,sass,md}] +charset = utf-8 + +# Tab indentation (no size specified) +[*.go] +indent_style = tab + +[*.md] +trim_trailing_whitespace = false + +# Matches the exact files either package.json or .travis.yml +[{package.json,.travis.yml}] +indent_style = space +indent_size = 2 diff --git a/vendor/github.com/go-openapi/jsonpointer/.pullapprove.yml b/vendor/github.com/go-openapi/jsonpointer/.pullapprove.yml deleted file mode 100644 index 5ec183e22..000000000 --- a/vendor/github.com/go-openapi/jsonpointer/.pullapprove.yml +++ /dev/null @@ -1,13 +0,0 @@ -approve_by_comment: true -approve_regex: '^(:shipit:|:\+1:|\+1|LGTM|lgtm|Approved)' -reject_regex: ^[Rr]ejected -reset_on_push: false -reviewers: - members: - - casualjim - - chancez - - frapposelli - - vburenin - - pytlesk4 - name: pullapprove - required: 1 diff --git a/vendor/github.com/go-openapi/jsonpointer/.travis.yml b/vendor/github.com/go-openapi/jsonpointer/.travis.yml new file mode 100644 index 000000000..d0f383a26 --- /dev/null +++ b/vendor/github.com/go-openapi/jsonpointer/.travis.yml @@ -0,0 +1,13 @@ +language: go +go: +- 1.7 +install: +- go get -u github.com/stretchr/testify/assert +- go get -u github.com/go-openapi/swag +script: +- go test -v -race -cover -coverprofile=coverage.txt -covermode=atomic ./... +after_success: +- bash <(curl -s https://codecov.io/bash) +notifications: + slack: + secure: a5VgoiwB1G/AZqzmephPZIhEB9avMlsWSlVnM1dSAtYAwdrQHGTQxAmpOxYIoSPDhWNN5bfZmjd29++UlTwLcHSR+e0kJhH6IfDlsHj/HplNCJ9tyI0zYc7XchtdKgeMxMzBKCzgwFXGSbQGydXTliDNBo0HOzmY3cou/daMFTP60K+offcjS+3LRAYb1EroSRXZqrk1nuF/xDL3792DZUdPMiFR/L/Df6y74D6/QP4sTkTDFQitz4Wy/7jbsfj8dG6qK2zivgV6/l+w4OVjFkxVpPXogDWY10vVXNVynqxfJ7to2d1I9lNCHE2ilBCkWMIPdyJF7hjF8pKW+82yP4EzRh0vu8Xn0HT5MZpQxdRY/YMxNrWaG7SxsoEaO4q5uhgdzAqLYY3TRa7MjIK+7Ur+aqOeTXn6OKwVi0CjvZ6mIU3WUKSwiwkFZMbjRAkSb5CYwMEfGFO/z964xz83qGt6WAtBXNotqCQpTIiKtDHQeLOMfksHImCg6JLhQcWBVxamVgu0G3Pdh8Y6DyPnxraXY95+QDavbjqv7TeYT9T/FNnrkXaTTK0s4iWE5H4ACU0Qvz0wUYgfQrZv0/Hp7V17+rabUwnzYySHCy9SWX/7OV9Cfh31iMp9ZIffr76xmmThtOEqs8TrTtU6BWI3rWwvA9cXQipZTVtL0oswrGw= diff --git a/vendor/github.com/go-openapi/jsonpointer/README.md b/vendor/github.com/go-openapi/jsonpointer/README.md index 9c9b1fd48..813788aff 100644 --- a/vendor/github.com/go-openapi/jsonpointer/README.md +++ b/vendor/github.com/go-openapi/jsonpointer/README.md @@ -1,4 +1,4 @@ -# gojsonpointer [![Build Status](https://ci.vmware.run/api/badges/go-openapi/jsonpointer/status.svg)](https://ci.vmware.run/go-openapi/jsonpointer) [![Coverage](https://coverage.vmware.run/badges/go-openapi/jsonpointer/coverage.svg)](https://coverage.vmware.run/go-openapi/jsonpointer) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) +# gojsonpointer [![Build Status](https://travis-ci.org/go-openapi/jsonpointer.svg?branch=master)](https://travis-ci.org/go-openapi/jsonpointer) [![codecov](https://codecov.io/gh/go-openapi/jsonpointer/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/jsonpointer) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) [![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/jsonpointer/master/LICENSE) [![GoDoc](https://godoc.org/github.com/go-openapi/jsonpointer?status.svg)](http://godoc.org/github.com/go-openapi/jsonpointer) An implementation of JSON Pointer - Go language diff --git a/vendor/github.com/go-openapi/jsonpointer/pointer.go b/vendor/github.com/go-openapi/jsonpointer/pointer.go index 39dd012c2..fe2d6ee57 100644 --- a/vendor/github.com/go-openapi/jsonpointer/pointer.go +++ b/vendor/github.com/go-openapi/jsonpointer/pointer.go @@ -43,6 +43,7 @@ const ( ) var jsonPointableType = reflect.TypeOf(new(JSONPointable)).Elem() +var jsonSetableType = reflect.TypeOf(new(JSONSetable)).Elem() // JSONPointable is an interface for structs to implement when they need to customize the // json pointer process @@ -50,16 +51,10 @@ type JSONPointable interface { JSONLookup(string) (interface{}, error) } -type implStruct struct { - mode string // "SET" or "GET" - - inDocument interface{} - - setInValue interface{} - - getOutNode interface{} - getOutKind reflect.Kind - outError error +// JSONSetable is an interface for structs to implement when they need to customize the +// json pointer process +type JSONSetable interface { + JSONSet(string, interface{}) error } // New creates a new json pointer for the given string @@ -100,15 +95,25 @@ func (p *Pointer) Get(document interface{}) (interface{}, reflect.Kind, error) { return p.get(document, swag.DefaultJSONNameProvider) } +// Set uses the pointer to set a value from a JSON document +func (p *Pointer) Set(document interface{}, value interface{}) (interface{}, error) { + return document, p.set(document, value, swag.DefaultJSONNameProvider) +} + // GetForToken gets a value for a json pointer token 1 level deep func GetForToken(document interface{}, decodedToken string) (interface{}, reflect.Kind, error) { return getSingleImpl(document, decodedToken, swag.DefaultJSONNameProvider) } +// SetForToken gets a value for a json pointer token 1 level deep +func SetForToken(document interface{}, decodedToken string, value interface{}) (interface{}, error) { + return document, setSingleImpl(document, value, decodedToken, swag.DefaultJSONNameProvider) +} + func getSingleImpl(node interface{}, decodedToken string, nameProvider *swag.NameProvider) (interface{}, reflect.Kind, error) { - kind := reflect.Invalid rValue := reflect.Indirect(reflect.ValueOf(node)) - kind = rValue.Kind() + kind := rValue.Kind() + switch kind { case reflect.Struct: @@ -129,6 +134,7 @@ func getSingleImpl(node interface{}, decodedToken string, nameProvider *swag.Nam case reflect.Map: kv := reflect.ValueOf(decodedToken) mv := rValue.MapIndex(kv) + if mv.IsValid() && !swag.IsZero(mv) { return mv.Interface(), kind, nil } @@ -141,7 +147,7 @@ func getSingleImpl(node interface{}, decodedToken string, nameProvider *swag.Nam } sLength := rValue.Len() if tokenIndex < 0 || tokenIndex >= sLength { - return nil, kind, fmt.Errorf("index out of bounds array[0,%d] index '%d'", sLength, tokenIndex) + return nil, kind, fmt.Errorf("index out of bounds array[0,%d] index '%d'", sLength-1, tokenIndex) } elem := rValue.Index(tokenIndex) @@ -153,6 +159,57 @@ func getSingleImpl(node interface{}, decodedToken string, nameProvider *swag.Nam } +func setSingleImpl(node, data interface{}, decodedToken string, nameProvider *swag.NameProvider) error { + rValue := reflect.Indirect(reflect.ValueOf(node)) + switch rValue.Kind() { + + case reflect.Struct: + if ns, ok := node.(JSONSetable); ok { // pointer impl + return ns.JSONSet(decodedToken, data) + } + + if rValue.Type().Implements(jsonSetableType) { + return node.(JSONSetable).JSONSet(decodedToken, data) + } + + nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken) + if !ok { + return fmt.Errorf("object has no field %q", decodedToken) + } + fld := rValue.FieldByName(nm) + if fld.IsValid() { + fld.Set(reflect.ValueOf(data)) + } + return nil + + case reflect.Map: + kv := reflect.ValueOf(decodedToken) + rValue.SetMapIndex(kv, reflect.ValueOf(data)) + return nil + + case reflect.Slice: + tokenIndex, err := strconv.Atoi(decodedToken) + if err != nil { + return err + } + sLength := rValue.Len() + if tokenIndex < 0 || tokenIndex >= sLength { + return fmt.Errorf("index out of bounds array[0,%d] index '%d'", sLength, tokenIndex) + } + + elem := rValue.Index(tokenIndex) + if !elem.CanSet() { + return fmt.Errorf("can't set slice index %s to %v", decodedToken, data) + } + elem.Set(reflect.ValueOf(data)) + return nil + + default: + return fmt.Errorf("invalid token reference %q", decodedToken) + } + +} + func (p *Pointer) get(node interface{}, nameProvider *swag.NameProvider) (interface{}, reflect.Kind, error) { if nameProvider == nil { @@ -184,6 +241,101 @@ func (p *Pointer) get(node interface{}, nameProvider *swag.NameProvider) (interf return node, kind, nil } +func (p *Pointer) set(node, data interface{}, nameProvider *swag.NameProvider) error { + knd := reflect.ValueOf(node).Kind() + + if knd != reflect.Ptr && knd != reflect.Struct && knd != reflect.Map && knd != reflect.Slice && knd != reflect.Array { + return fmt.Errorf("only structs, pointers, maps and slices are supported for setting values") + } + + if nameProvider == nil { + nameProvider = swag.DefaultJSONNameProvider + } + + // Full document when empty + if len(p.referenceTokens) == 0 { + return nil + } + + lastI := len(p.referenceTokens) - 1 + for i, token := range p.referenceTokens { + isLastToken := i == lastI + decodedToken := Unescape(token) + + if isLastToken { + + return setSingleImpl(node, data, decodedToken, nameProvider) + } + + rValue := reflect.Indirect(reflect.ValueOf(node)) + kind := rValue.Kind() + + switch kind { + + case reflect.Struct: + if rValue.Type().Implements(jsonPointableType) { + r, err := node.(JSONPointable).JSONLookup(decodedToken) + if err != nil { + return err + } + fld := reflect.ValueOf(r) + if fld.CanAddr() && fld.Kind() != reflect.Interface && fld.Kind() != reflect.Map && fld.Kind() != reflect.Slice && fld.Kind() != reflect.Ptr { + node = fld.Addr().Interface() + continue + } + node = r + continue + } + nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken) + if !ok { + return fmt.Errorf("object has no field %q", decodedToken) + } + fld := rValue.FieldByName(nm) + if fld.CanAddr() && fld.Kind() != reflect.Interface && fld.Kind() != reflect.Map && fld.Kind() != reflect.Slice && fld.Kind() != reflect.Ptr { + node = fld.Addr().Interface() + continue + } + node = fld.Interface() + + case reflect.Map: + kv := reflect.ValueOf(decodedToken) + mv := rValue.MapIndex(kv) + + if !mv.IsValid() { + return fmt.Errorf("object has no key %q", decodedToken) + } + if mv.CanAddr() && mv.Kind() != reflect.Interface && mv.Kind() != reflect.Map && mv.Kind() != reflect.Slice && mv.Kind() != reflect.Ptr { + node = mv.Addr().Interface() + continue + } + node = mv.Interface() + + case reflect.Slice: + tokenIndex, err := strconv.Atoi(decodedToken) + if err != nil { + return err + } + sLength := rValue.Len() + if tokenIndex < 0 || tokenIndex >= sLength { + return fmt.Errorf("index out of bounds array[0,%d] index '%d'", sLength, tokenIndex) + } + + elem := rValue.Index(tokenIndex) + if elem.CanAddr() && elem.Kind() != reflect.Interface && elem.Kind() != reflect.Map && elem.Kind() != reflect.Slice && elem.Kind() != reflect.Ptr { + node = elem.Addr().Interface() + continue + } + node = elem.Interface() + + default: + return fmt.Errorf("invalid token reference %q", decodedToken) + } + + } + + return nil +} + // DecodedTokens returns the decoded tokens func (p *Pointer) DecodedTokens() []string { result := make([]string, 0, len(p.referenceTokens)) diff --git a/vendor/github.com/go-openapi/jsonpointer/pointer_test.go b/vendor/github.com/go-openapi/jsonpointer/pointer_test.go new file mode 100644 index 000000000..eabd58603 --- /dev/null +++ b/vendor/github.com/go-openapi/jsonpointer/pointer_test.go @@ -0,0 +1,573 @@ +// Copyright 2013 sigu-399 ( https://github.com/sigu-399 ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author sigu-399 +// author-github https://github.com/sigu-399 +// author-mail sigu.399@gmail.com +// +// repository-name jsonpointer +// repository-desc An implementation of JSON Pointer - Go language +// +// description Automated tests on package. +// +// created 03-03-2013 + +package jsonpointer + +import ( + "encoding/json" + "fmt" + "strconv" + "testing" + + "github.com/stretchr/testify/assert" +) + +const ( + TestDocumentNBItems = 11 + TestNodeObjNBItems = 4 + TestDocumentString = `{ +"foo": ["bar", "baz"], +"obj": { "a":1, "b":2, "c":[3,4], "d":[ {"e":9}, {"f":[50,51]} ] }, +"": 0, +"a/b": 1, +"c%d": 2, +"e^f": 3, +"g|h": 4, +"i\\j": 5, +"k\"l": 6, +" ": 7, +"m~n": 8 +}` +) + +var testDocumentJSON interface{} + +type testStructJSON struct { + Foo []string `json:"foo"` + Obj struct { + A int `json:"a"` + B int `json:"b"` + C []int `json:"c"` + D []struct { + E int `json:"e"` + F []int `json:"f"` + } `json:"d"` + } `json:"obj"` +} + +type aliasedMap map[string]interface{} + +var testStructJSONDoc testStructJSON +var testStructJSONPtr *testStructJSON + +func init() { + json.Unmarshal([]byte(TestDocumentString), &testDocumentJSON) + json.Unmarshal([]byte(TestDocumentString), &testStructJSONDoc) + testStructJSONPtr = &testStructJSONDoc +} + +func TestEscaping(t *testing.T) { + + ins := []string{`/`, `/`, `/a~1b`, `/a~1b`, `/c%d`, `/e^f`, `/g|h`, `/i\j`, `/k"l`, `/ `, `/m~0n`} + outs := []float64{0, 0, 1, 1, 2, 3, 4, 5, 6, 7, 8} + + for i := range ins { + p, err := New(ins[i]) + if assert.NoError(t, err, "input: %v", ins[i]) { + result, _, err := p.Get(testDocumentJSON) + if assert.NoError(t, err, "input: %v", ins[i]) { + assert.Equal(t, outs[i], result, "input: %v", ins[i]) + } + } + } + +} + +func TestFullDocument(t *testing.T) { + + in := `` + + p, err := New(in) + if err != nil { + t.Errorf("New(%v) error %v", in, err.Error()) + } + + result, _, err := p.Get(testDocumentJSON) + if err != nil { + t.Errorf("Get(%v) error %v", in, err.Error()) + } + + if len(result.(map[string]interface{})) != TestDocumentNBItems { + t.Errorf("Get(%v) = %v, expect full document", in, result) + } + + result, _, err = p.get(testDocumentJSON, nil) + if err != nil { + t.Errorf("Get(%v) error %v", in, err.Error()) + } + + if len(result.(map[string]interface{})) != TestDocumentNBItems { + t.Errorf("Get(%v) = %v, expect full document", in, result) + } +} + +func TestDecodedTokens(t *testing.T) { + p, err := New("/obj/a~1b") + assert.NoError(t, err) + assert.Equal(t, []string{"obj", "a/b"}, p.DecodedTokens()) +} + +func TestIsEmpty(t *testing.T) { + p, err := New("") + assert.NoError(t, err) + assert.True(t, p.IsEmpty()) + p, err = New("/obj") + assert.NoError(t, err) + assert.False(t, p.IsEmpty()) +} + +func TestGetSingle(t *testing.T) { + in := `/obj` + + _, err := New(in) + assert.NoError(t, err) + result, _, err := GetForToken(testDocumentJSON, "obj") + assert.NoError(t, err) + assert.Len(t, result, TestNodeObjNBItems) + + result, _, err = GetForToken(testStructJSONDoc, "Obj") + assert.Error(t, err) + assert.Nil(t, result) + + result, _, err = GetForToken(testStructJSONDoc, "Obj2") + assert.Error(t, err) + assert.Nil(t, result) +} + +type pointableImpl struct { + a string +} + +func (p pointableImpl) JSONLookup(token string) (interface{}, error) { + if token == "some" { + return p.a, nil + } + return nil, fmt.Errorf("object has no field %q", token) +} + +func TestPointableInterface(t *testing.T) { + p := &pointableImpl{"hello"} + + result, _, err := GetForToken(p, "some") + assert.NoError(t, err) + assert.Equal(t, p.a, result) + + result, _, err = GetForToken(p, "something") + assert.Error(t, err) + assert.Nil(t, result) +} + +func TestGetNode(t *testing.T) { + + in := `/obj` + + p, err := New(in) + assert.NoError(t, err) + result, _, err := p.Get(testDocumentJSON) + assert.NoError(t, err) + assert.Len(t, result, TestNodeObjNBItems) + + result, _, err = p.Get(aliasedMap(testDocumentJSON.(map[string]interface{}))) + assert.NoError(t, err) + assert.Len(t, result, TestNodeObjNBItems) + + result, _, err = p.Get(testStructJSONDoc) + assert.NoError(t, err) + assert.Equal(t, testStructJSONDoc.Obj, result) + + result, _, err = p.Get(testStructJSONPtr) + assert.NoError(t, err) + assert.Equal(t, testStructJSONDoc.Obj, result) +} + +func TestArray(t *testing.T) { + + ins := []string{`/foo/0`, `/foo/0`, `/foo/1`} + outs := []string{"bar", "bar", "baz"} + + for i := range ins { + p, err := New(ins[i]) + assert.NoError(t, err) + + result, _, err := p.Get(testStructJSONDoc) + assert.NoError(t, err) + assert.Equal(t, outs[i], result) + + result, _, err = p.Get(testStructJSONPtr) + assert.NoError(t, err) + assert.Equal(t, outs[i], result) + + result, _, err = p.Get(testDocumentJSON) + assert.NoError(t, err) + assert.Equal(t, outs[i], result) + } +} + +func TestOtherThings(t *testing.T) { + _, err := New("abc") + assert.Error(t, err) + + p, err := New("") + assert.NoError(t, err) + assert.Equal(t, "", p.String()) + + p, err = New("/obj/a") + assert.Equal(t, "/obj/a", p.String()) + + s := Escape("m~n") + assert.Equal(t, "m~0n", s) + s = Escape("m/n") + assert.Equal(t, "m~1n", s) + + p, err = New("/foo/3") + assert.NoError(t, err) + _, _, err = p.Get(testDocumentJSON) + assert.Error(t, err) + + p, err = New("/foo/a") + assert.NoError(t, err) + _, _, err = p.Get(testDocumentJSON) + assert.Error(t, err) + + p, err = New("/notthere") + assert.NoError(t, err) + _, _, err = p.Get(testDocumentJSON) + assert.Error(t, err) + + p, err = New("/invalid") + assert.NoError(t, err) + _, _, err = p.Get(1234) + assert.Error(t, err) + + p, err = New("/foo/1") + assert.NoError(t, err) + expected := "hello" + bbb := testDocumentJSON.(map[string]interface{})["foo"] + bbb.([]interface{})[1] = "hello" + + v, _, err := p.Get(testDocumentJSON) + assert.NoError(t, err) + assert.Equal(t, expected, v) + + esc := Escape("a/") + assert.Equal(t, "a~1", esc) + unesc := Unescape(esc) + assert.Equal(t, "a/", unesc) + + unesc = Unescape("~01") + assert.Equal(t, "~1", unesc) + assert.Equal(t, "~0~1", Escape("~/")) + assert.Equal(t, "~/", Unescape("~0~1")) +} + +func TestObject(t *testing.T) { + + ins := []string{`/obj/a`, `/obj/b`, `/obj/c/0`, `/obj/c/1`, `/obj/c/1`, `/obj/d/1/f/0`} + outs := []float64{1, 2, 3, 4, 4, 50} + + for i := range ins { + + p, err := New(ins[i]) + assert.NoError(t, err) + + result, _, err := p.Get(testDocumentJSON) + assert.NoError(t, err) + assert.Equal(t, outs[i], result) + + result, _, err = p.Get(testStructJSONDoc) + assert.NoError(t, err) + assert.EqualValues(t, outs[i], result) + + result, _, err = p.Get(testStructJSONPtr) + assert.NoError(t, err) + assert.EqualValues(t, outs[i], result) + } +} + +type setJsonDocEle struct { + B int `json:"b"` + C int `json:"c"` +} +type setJsonDoc struct { + A []struct { + B int `json:"b"` + C int `json:"c"` + } `json:"a"` + D int `json:"d"` +} + +type settableDoc struct { + Coll settableColl + Int settableInt +} + +func (s settableDoc) MarshalJSON() ([]byte, error) { + var res struct { + A settableColl `json:"a"` + D settableInt `json:"d"` + } + res.A = s.Coll + res.D = s.Int + return json.Marshal(res) +} +func (s *settableDoc) UnmarshalJSON(data []byte) error { + var res struct { + A settableColl `json:"a"` + D settableInt `json:"d"` + } + + if err := json.Unmarshal(data, &res); err != nil { + return err + } + s.Coll = res.A + s.Int = res.D + return nil +} + +// JSONLookup implements an interface to customize json pointer lookup +func (s settableDoc) JSONLookup(token string) (interface{}, error) { + switch token { + case "a": + return &s.Coll, nil + case "d": + return &s.Int, nil + default: + return nil, fmt.Errorf("%s is not a known field", token) + } +} + +// JSONLookup implements an interface to customize json pointer lookup +func (s *settableDoc) JSONSet(token string, data interface{}) error { + switch token { + case "a": + switch dt := data.(type) { + case settableColl: + s.Coll = dt + return nil + case *settableColl: + if dt != nil { + s.Coll = *dt + } else { + s.Coll = settableColl{} + } + return nil + case []settableCollItem: + s.Coll.Items = dt + return nil + } + case "d": + switch dt := data.(type) { + case settableInt: + s.Int = dt + return nil + case int: + s.Int.Value = dt + return nil + case int8: + s.Int.Value = int(dt) + return nil + case int16: + s.Int.Value = int(dt) + return nil + case int32: + s.Int.Value = int(dt) + return nil + case int64: + s.Int.Value = int(dt) + return nil + default: + return fmt.Errorf("invalid type %T for %s", data, token) + } + } + return fmt.Errorf("%s is not a known field", token) +} + +type settableColl struct { + Items []settableCollItem +} + +func (s settableColl) MarshalJSON() ([]byte, error) { + return json.Marshal(s.Items) +} +func (s *settableColl) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &s.Items) +} + +// JSONLookup implements an interface to customize json pointer lookup +func (s settableColl) JSONLookup(token string) (interface{}, error) { + if tok, err := strconv.Atoi(token); err == nil { + return &s.Items[tok], nil + } + return nil, fmt.Errorf("%s is not a valid index", token) +} + +// JSONLookup implements an interface to customize json pointer lookup +func (s *settableColl) JSONSet(token string, data interface{}) error { + if _, err := strconv.Atoi(token); err == nil { + _, err := SetForToken(s.Items, token, data) + return err + } + return fmt.Errorf("%s is not a valid index", token) +} + +type settableCollItem struct { + B int `json:"b"` + C int `json:"c"` +} + +type settableInt struct { + Value int +} + +func (s settableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(s.Value) +} +func (s *settableInt) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &s.Value) +} + +func TestSetNode(t *testing.T) { + + jsonText := `{"a":[{"b": 1, "c": 2}], "d": 3}` + + var jsonDocument interface{} + if assert.NoError(t, json.Unmarshal([]byte(jsonText), &jsonDocument)) { + in := "/a/0/c" + p, err := New(in) + if assert.NoError(t, err) { + + _, err = p.Set(jsonDocument, 999) + assert.NoError(t, err) + + firstNode := jsonDocument.(map[string]interface{}) + assert.Len(t, firstNode, 2) + + sliceNode := firstNode["a"].([]interface{}) + assert.Len(t, sliceNode, 1) + + changedNode := sliceNode[0].(map[string]interface{}) + chNodeVI := changedNode["c"] + if assert.IsType(t, 0, chNodeVI) { + changedNodeValue := chNodeVI.(int) + if assert.Equal(t, 999, changedNodeValue) { + assert.Len(t, sliceNode, 1) + } + } + } + + v, err := New("/a/0") + if assert.NoError(t, err) { + _, err = v.Set(jsonDocument, map[string]interface{}{"b": 3, "c": 8}) + if assert.NoError(t, err) { + firstNode := jsonDocument.(map[string]interface{}) + assert.Len(t, firstNode, 2) + + sliceNode := firstNode["a"].([]interface{}) + assert.Len(t, sliceNode, 1) + changedNode := sliceNode[0].(map[string]interface{}) + assert.Equal(t, 3, changedNode["b"]) + assert.Equal(t, 8, changedNode["c"]) + } + } + } + + var structDoc setJsonDoc + if assert.NoError(t, json.Unmarshal([]byte(jsonText), &structDoc)) { + g, err := New("/a") + if assert.NoError(t, err) { + _, err = g.Set(&structDoc, []struct { + B int `json:"b"` + C int `json:"c"` + }{{B: 4, C: 7}}) + + if assert.NoError(t, err) { + assert.Len(t, structDoc.A, 1) + changedNode := structDoc.A[0] + assert.Equal(t, 4, changedNode.B) + assert.Equal(t, 7, changedNode.C) + } + } + + v, err := New("/a/0") + if assert.NoError(t, err) { + _, err = v.Set(structDoc, struct { + B int `json:"b"` + C int `json:"c"` + }{B: 3, C: 8}) + + if assert.NoError(t, err) { + assert.Len(t, structDoc.A, 1) + changedNode := structDoc.A[0] + assert.Equal(t, 3, changedNode.B) + assert.Equal(t, 8, changedNode.C) + } + } + + p, err := New("/a/0/c") + if assert.NoError(t, err) { + _, err = p.Set(&structDoc, 999) + assert.NoError(t, err) + if assert.Len(t, structDoc.A, 1) { + assert.Equal(t, 999, structDoc.A[0].C) + } + } + } + + var setDoc settableDoc + if assert.NoError(t, json.Unmarshal([]byte(jsonText), &setDoc)) { + g, err := New("/a") + if assert.NoError(t, err) { + _, err = g.Set(&setDoc, []settableCollItem{{B: 4, C: 7}}) + + if assert.NoError(t, err) { + assert.Len(t, setDoc.Coll.Items, 1) + changedNode := setDoc.Coll.Items[0] + assert.Equal(t, 4, changedNode.B) + assert.Equal(t, 7, changedNode.C) + } + } + + v, err := New("/a/0") + if assert.NoError(t, err) { + _, err = v.Set(setDoc, settableCollItem{B: 3, C: 8}) + + if assert.NoError(t, err) { + assert.Len(t, setDoc.Coll.Items, 1) + changedNode := setDoc.Coll.Items[0] + assert.Equal(t, 3, changedNode.B) + assert.Equal(t, 8, changedNode.C) + } + } + + p, err := New("/a/0/c") + if assert.NoError(t, err) { + _, err = p.Set(setDoc, 999) + assert.NoError(t, err) + if assert.Len(t, setDoc.Coll.Items, 1) { + assert.Equal(t, 999, setDoc.Coll.Items[0].C) + } + } + } +} diff --git a/vendor/github.com/go-openapi/jsonreference/.drone.yml b/vendor/github.com/go-openapi/jsonreference/.drone.yml deleted file mode 100644 index 157ffe579..000000000 --- a/vendor/github.com/go-openapi/jsonreference/.drone.yml +++ /dev/null @@ -1,33 +0,0 @@ -clone: - path: github.com/go-openapi/jsonreference - -matrix: - GO_VERSION: - - "1.6" - -build: - integration: - image: golang:$$GO_VERSION - pull: true - commands: - - go get -u github.com/stretchr/testify/assert - - go get -u github.com/PuerkitoBio/purell - - go get -u github.com/go-openapi/jsonpointer - - go test -race - - go test -v -cover -coverprofile=coverage.out -covermode=count ./... - -notify: - slack: - channel: bots - webhook_url: $$SLACK_URL - username: drone - -publish: - coverage: - server: https://coverage.vmware.run - token: $$GITHUB_TOKEN - # threshold: 70 - # must_increase: true - when: - matrix: - GO_VERSION: "1.6" diff --git a/vendor/github.com/go-openapi/jsonreference/.pullapprove.yml b/vendor/github.com/go-openapi/jsonreference/.pullapprove.yml deleted file mode 100644 index 5ec183e22..000000000 --- a/vendor/github.com/go-openapi/jsonreference/.pullapprove.yml +++ /dev/null @@ -1,13 +0,0 @@ -approve_by_comment: true -approve_regex: '^(:shipit:|:\+1:|\+1|LGTM|lgtm|Approved)' -reject_regex: ^[Rr]ejected -reset_on_push: false -reviewers: - members: - - casualjim - - chancez - - frapposelli - - vburenin - - pytlesk4 - name: pullapprove - required: 1 diff --git a/vendor/github.com/go-openapi/jsonreference/.travis.yml b/vendor/github.com/go-openapi/jsonreference/.travis.yml new file mode 100644 index 000000000..5b31a1b3e --- /dev/null +++ b/vendor/github.com/go-openapi/jsonreference/.travis.yml @@ -0,0 +1,14 @@ +language: go +go: +- 1.7 +install: +- go get -u github.com/stretchr/testify/assert +- go get -u github.com/PuerkitoBio/purell +- go get -u github.com/go-openapi/jsonpointer +script: +- go test -v -race -cover -coverprofile=coverage.txt -covermode=atomic ./... +after_success: +- bash <(curl -s https://codecov.io/bash) +notifications: + slack: + secure: OpQG/36F7DSF00HLm9WZMhyqFCYYyYTsVDObW226cWiR8PWYiNfLZiSEvIzT1Gx4dDjhigKTIqcLhG34CkL5iNXDjm9Yyo2RYhQPlK8NErNqUEXuBqn4RqYHW48VGhEhOyDd4Ei0E2FN5ZbgpvHgtpkdZ6XDi64r3Ac89isP9aPHXQTuv2Jog6b4/OKKiUTftLcTIst0p4Cp3gqOJWf1wnoj+IadWiECNVQT6zb47IYjtyw6+uV8iUjTzdKcRB6Zc6b4Dq7JAg1Zd7Jfxkql3hlKp4PNlRf9Cy7y5iA3G7MLyg3FcPX5z2kmcyPt2jOTRMBWUJ5zIQpOxizAcN8WsT3WWBL5KbuYK6k0PzujrIDLqdxGpNmjkkMfDBT9cKmZpm2FdW+oZgPFJP+oKmAo4u4KJz/vjiPTXgQlN5bmrLuRMCp+AwC5wkIohTqWZVPE2TK6ZSnMYcg/W39s+RP/9mJoyryAvPSpBOLTI+biCgaUCTOAZxNTWpMFc3tPYntc41WWkdKcooZ9JA5DwfcaVFyTGQ3YXz+HvX6G1z/gW0Q/A4dBi9mj2iE1xm7tRTT+4VQ2AXFvSEI1HJpfPgYnwAtwOD1v3Qm2EUHk9sCdtEDR4wVGEPIVn44GnwFMnGKx9JWppMPYwFu3SVDdHt+E+LOlhZUply11Aa+IVrT2KUQ= diff --git a/vendor/github.com/go-openapi/jsonreference/README.md b/vendor/github.com/go-openapi/jsonreference/README.md index 5f7881274..66345f4c6 100644 --- a/vendor/github.com/go-openapi/jsonreference/README.md +++ b/vendor/github.com/go-openapi/jsonreference/README.md @@ -1,4 +1,4 @@ -# gojsonreference [![Build Status](https://ci.vmware.run/api/badges/go-openapi/jsonreference/status.svg)](https://ci.vmware.run/go-openapi/jsonreference) [![Coverage](https://coverage.vmware.run/badges/go-openapi/jsonreference/coverage.svg)](https://coverage.vmware.run/go-openapi/jsonreference) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) +# gojsonreference [![Build Status](https://travis-ci.org/go-openapi/jsonreference.svg?branch=master)](https://travis-ci.org/go-openapi/jsonreference) [![codecov](https://codecov.io/gh/go-openapi/jsonreference/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/jsonreference) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) [![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/jsonreference/master/LICENSE) [![GoDoc](https://godoc.org/github.com/go-openapi/jsonreference?status.svg)](http://godoc.org/github.com/go-openapi/jsonreference) An implementation of JSON Reference - Go language @@ -7,7 +7,7 @@ An implementation of JSON Reference - Go language Work in progress ( 90% done ) ## Dependencies -https://github.com/xeipuuv/gojsonpointer +https://github.com/go-openapi/jsonpointer ## References http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-07 diff --git a/vendor/github.com/go-openapi/jsonreference/reference_test.go b/vendor/github.com/go-openapi/jsonreference/reference_test.go new file mode 100644 index 000000000..499c634c5 --- /dev/null +++ b/vendor/github.com/go-openapi/jsonreference/reference_test.go @@ -0,0 +1,420 @@ +// Copyright 2013 sigu-399 ( https://github.com/sigu-399 ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author sigu-399 +// author-github https://github.com/sigu-399 +// author-mail sigu.399@gmail.com +// +// repository-name jsonreference +// repository-desc An implementation of JSON Reference - Go language +// +// description Automated tests on package. +// +// created 03-03-2013 + +package jsonreference + +import ( + "testing" + + "github.com/go-openapi/jsonpointer" + "github.com/stretchr/testify/assert" +) + +func TestIsRoot(t *testing.T) { + in := "#" + r1, err := New(in) + assert.NoError(t, err) + assert.True(t, r1.IsRoot()) + + in = "#/ok" + r1 = MustCreateRef(in) + assert.False(t, r1.IsRoot()) + + assert.Panics(t, assert.PanicTestFunc(func() { + MustCreateRef("%2") + })) +} + +func TestFull(t *testing.T) { + + in := "http://host/path/a/b/c#/f/a/b" + + r1, err := New(in) + if err != nil { + t.Errorf("New(%v) error %s", in, err.Error()) + } + + if in != r1.String() { + t.Errorf("New(%v) = %v, expect %v", in, r1.String(), in) + } + + if r1.HasFragmentOnly != false { + t.Errorf("New(%v)::HasFragmentOnly %v expect %v", in, r1.HasFragmentOnly, false) + } + + if r1.HasFullURL != true { + t.Errorf("New(%v)::HasFullURL %v expect %v", in, r1.HasFullURL, true) + } + + if r1.HasURLPathOnly != false { + t.Errorf("New(%v)::HasURLPathOnly %v expect %v", in, r1.HasURLPathOnly, false) + } + + if r1.HasFileScheme != false { + t.Errorf("New(%v)::HasFileScheme %v expect %v", in, r1.HasFileScheme, false) + } + + if r1.GetPointer().String() != "/f/a/b" { + t.Errorf("New(%v)::GetPointer() %v expect %v", in, r1.GetPointer().String(), "/f/a/b") + } +} + +func TestFullURL(t *testing.T) { + + in := "http://host/path/a/b/c" + + r1, err := New(in) + if err != nil { + t.Errorf("New(%v) error %s", in, err.Error()) + } + + if in != r1.String() { + t.Errorf("New(%v) = %v, expect %v", in, r1.String(), in) + } + + if r1.HasFragmentOnly != false { + t.Errorf("New(%v)::HasFragmentOnly %v expect %v", in, r1.HasFragmentOnly, false) + } + + if r1.HasFullURL != true { + t.Errorf("New(%v)::HasFullURL %v expect %v", in, r1.HasFullURL, true) + } + + if r1.HasURLPathOnly != false { + t.Errorf("New(%v)::HasURLPathOnly %v expect %v", in, r1.HasURLPathOnly, false) + } + + if r1.HasFileScheme != false { + t.Errorf("New(%v)::HasFileScheme %v expect %v", in, r1.HasFileScheme, false) + } + + if r1.GetPointer().String() != "" { + t.Errorf("New(%v)::GetPointer() %v expect %v", in, r1.GetPointer().String(), "") + } +} + +func TestFragmentOnly(t *testing.T) { + + in := "#/fragment/only" + + r1, err := New(in) + if err != nil { + t.Errorf("New(%v) error %s", in, err.Error()) + } + + if in != r1.String() { + t.Errorf("New(%v) = %v, expect %v", in, r1.String(), in) + } + + if r1.HasFragmentOnly != true { + t.Errorf("New(%v)::HasFragmentOnly %v expect %v", in, r1.HasFragmentOnly, true) + } + + if r1.HasFullURL != false { + t.Errorf("New(%v)::HasFullURL %v expect %v", in, r1.HasFullURL, false) + } + + if r1.HasURLPathOnly != false { + t.Errorf("New(%v)::HasURLPathOnly %v expect %v", in, r1.HasURLPathOnly, false) + } + + if r1.HasFileScheme != false { + t.Errorf("New(%v)::HasFileScheme %v expect %v", in, r1.HasFileScheme, false) + } + + if r1.GetPointer().String() != "/fragment/only" { + t.Errorf("New(%v)::GetPointer() %v expect %v", in, r1.GetPointer().String(), "/fragment/only") + } + + p, _ := jsonpointer.New(r1.referenceURL.Fragment) + r2 := Ref{referencePointer: p, HasFragmentOnly: true} + assert.Equal(t, r2.String(), in) + + r3 := Ref{referencePointer: p, HasFragmentOnly: false} + assert.Equal(t, r3.String(), in[1:]) +} + +func TestURLPathOnly(t *testing.T) { + + in := "/documents/document.json" + + r1, err := New(in) + if err != nil { + t.Errorf("New(%v) error %s", in, err.Error()) + } + + if in != r1.String() { + t.Errorf("New(%v) = %v, expect %v", in, r1.String(), in) + } + + if r1.HasFragmentOnly != false { + t.Errorf("New(%v)::HasFragmentOnly %v expect %v", in, r1.HasFragmentOnly, false) + } + + if r1.HasFullURL != false { + t.Errorf("New(%v)::HasFullURL %v expect %v", in, r1.HasFullURL, false) + } + + if r1.HasURLPathOnly != true { + t.Errorf("New(%v)::HasURLPathOnly %v expect %v", in, r1.HasURLPathOnly, true) + } + + if r1.HasFileScheme != false { + t.Errorf("New(%v)::HasFileScheme %v expect %v", in, r1.HasFileScheme, false) + } + + if r1.GetPointer().String() != "" { + t.Errorf("New(%v)::GetPointer() %v expect %v", in, r1.GetPointer().String(), "") + } +} + +func TestURLRelativePathOnly(t *testing.T) { + + in := "document.json" + + r1, err := New(in) + if err != nil { + t.Errorf("New(%v) error %s", in, err.Error()) + } + + if in != r1.String() { + t.Errorf("New(%v) = %v, expect %v", in, r1.String(), in) + } + + if r1.HasFragmentOnly != false { + t.Errorf("New(%v)::HasFragmentOnly %v expect %v", in, r1.HasFragmentOnly, false) + } + + if r1.HasFullURL != false { + t.Errorf("New(%v)::HasFullURL %v expect %v", in, r1.HasFullURL, false) + } + + if r1.HasURLPathOnly != true { + t.Errorf("New(%v)::HasURLPathOnly %v expect %v", in, r1.HasURLPathOnly, true) + } + + if r1.HasFileScheme != false { + t.Errorf("New(%v)::HasFileScheme %v expect %v", in, r1.HasFileScheme, false) + } + + if r1.GetPointer().String() != "" { + t.Errorf("New(%v)::GetPointer() %v expect %v", in, r1.GetPointer().String(), "") + } +} + +func TestInheritsInValid(t *testing.T) { + in1 := "http://www.test.com/doc.json" + in2 := "#/a/b" + + r1, _ := New(in1) + r2 := Ref{} + result, err := r1.Inherits(r2) + assert.Error(t, err) + assert.Nil(t, result) + + r1 = Ref{} + r2, _ = New(in2) + result, err = r1.Inherits(r2) + assert.NoError(t, err) + assert.Equal(t, r2, *result) +} + +func TestInheritsValid(t *testing.T) { + + in1 := "http://www.test.com/doc.json" + in2 := "#/a/b" + out := in1 + in2 + + r1, _ := New(in1) + r2, _ := New(in2) + + result, err := r1.Inherits(r2) + if err != nil { + t.Errorf("Inherits(%s,%s) error %s", r1.String(), r2.String(), err.Error()) + } + + if result.String() != out { + t.Errorf("Inherits(%s,%s) = %s, expect %s", r1.String(), r2.String(), result.String(), out) + } + + if result.GetPointer().String() != "/a/b" { + t.Errorf("result(%v)::GetPointer() %v expect %v", result.String(), result.GetPointer().String(), "/a/b") + } +} + +func TestInheritsDifferentHost(t *testing.T) { + + in1 := "http://www.test.com/doc.json" + in2 := "http://www.test2.com/doc.json#bla" + + r1, _ := New(in1) + r2, _ := New(in2) + + result, err := r1.Inherits(r2) + + if err != nil { + t.Errorf("Inherits(%s,%s) should not fail. Error: %s", r1.String(), r2.String(), err.Error()) + } + + if result.String() != in2 { + t.Errorf("Inherits(%s,%s) should be %s but is %s", in1, in2, in2, result) + } + + if result.GetPointer().String() != "" { + t.Errorf("result(%v)::GetPointer() %v expect %v", result.String(), result.GetPointer().String(), "") + } +} + +func TestFileScheme(t *testing.T) { + + in1 := "file:///Users/mac/1.json#a" + in2 := "file:///Users/mac/2.json#b" + + r1, _ := New(in1) + r2, _ := New(in2) + + if r1.HasFragmentOnly != false { + t.Errorf("New(%v)::HasFragmentOnly %v expect %v", in1, r1.HasFragmentOnly, false) + } + + if r1.HasFileScheme != true { + t.Errorf("New(%v)::HasFileScheme %v expect %v", in1, r1.HasFileScheme, true) + } + + if r1.HasFullFilePath != true { + t.Errorf("New(%v)::HasFullFilePath %v expect %v", in1, r1.HasFullFilePath, true) + } + + if r1.IsCanonical() != true { + t.Errorf("New(%v)::IsCanonical %v expect %v", in1, r1.IsCanonical, true) + } + + result, err := r1.Inherits(r2) + if err != nil { + t.Errorf("Inherits(%s,%s) should not fail. Error: %s", r1.String(), r2.String(), err.Error()) + } + if result.String() != in2 { + t.Errorf("Inherits(%s,%s) should be %s but is %s", in1, in2, in2, result) + } + + if result.GetPointer().String() != "" { + t.Errorf("result(%v)::GetPointer() %v expect %v", result.String(), result.GetPointer().String(), "") + } +} + +func TestReferenceResolution(t *testing.T) { + + // 5.4. Reference Resolution Examples + // http://tools.ietf.org/html/rfc3986#section-5.4 + + base := "http://a/b/c/d;p?q" + baseRef, err := New(base) + + if err != nil { + t.Errorf("New(%s) failed error: %s", base, err.Error()) + } + if baseRef.String() != base { + t.Errorf("New(%s) %s expected %s", base, baseRef.String(), base) + } + + checks := []string{ + // 5.4.1. Normal Examples + // http://tools.ietf.org/html/rfc3986#section-5.4.1 + + "g:h", "g:h", + "g", "http://a/b/c/g", + "./g", "http://a/b/c/g", + "g/", "http://a/b/c/g/", + "/g", "http://a/g", + "//g", "http://g", + "?y", "http://a/b/c/d;p?y", + "g?y", "http://a/b/c/g?y", + "#s", "http://a/b/c/d;p?q#s", + "g#s", "http://a/b/c/g#s", + "g?y#s", "http://a/b/c/g?y#s", + ";x", "http://a/b/c/;x", + "g;x", "http://a/b/c/g;x", + "g;x?y#s", "http://a/b/c/g;x?y#s", + "", "http://a/b/c/d;p?q", + ".", "http://a/b/c/", + "./", "http://a/b/c/", + "..", "http://a/b/", + "../", "http://a/b/", + "../g", "http://a/b/g", + "../..", "http://a/", + "../../", "http://a/", + "../../g", "http://a/g", + + // 5.4.2. Abnormal Examples + // http://tools.ietf.org/html/rfc3986#section-5.4.2 + + "../../../g", "http://a/g", + "../../../../g", "http://a/g", + + "/./g", "http://a/g", + "/../g", "http://a/g", + "g.", "http://a/b/c/g.", + ".g", "http://a/b/c/.g", + "g..", "http://a/b/c/g..", + "..g", "http://a/b/c/..g", + + "./../g", "http://a/b/g", + "./g/.", "http://a/b/c/g/", + "g/./h", "http://a/b/c/g/h", + "g/../h", "http://a/b/c/h", + "g;x=1/./y", "http://a/b/c/g;x=1/y", + "g;x=1/../y", "http://a/b/c/y", + + "g?y/./x", "http://a/b/c/g?y/./x", + "g?y/../x", "http://a/b/c/g?y/../x", + "g#s/./x", "http://a/b/c/g#s/./x", + "g#s/../x", "http://a/b/c/g#s/../x", + + "http:g", "http:g", // for strict parsers + //"http:g", "http://a/b/c/g", // for backward compatibility + + } + for i := 0; i < len(checks); i += 2 { + child := checks[i] + expected := checks[i+1] + // fmt.Printf("%d: %v -> %v\n", i/2, child, expected) + + childRef, e := New(child) + if e != nil { + t.Errorf("%d: New(%s) failed error: %s", i/2, child, e.Error()) + } + + res, e := baseRef.Inherits(childRef) + if res == nil { + t.Errorf("%d: Inherits(%s, %s) nil not expected", i/2, base, child) + } + if e != nil { + t.Errorf("%d: Inherits(%s) failed error: %s", i/2, child, e.Error()) + } + if res.String() != expected { + t.Errorf("%d: Inherits(%s, %s) %s expected %s", i/2, base, child, res.String(), expected) + } + } +} diff --git a/vendor/github.com/go-openapi/spec/.drone.yml b/vendor/github.com/go-openapi/spec/.drone.yml deleted file mode 100644 index 6d0442737..000000000 --- a/vendor/github.com/go-openapi/spec/.drone.yml +++ /dev/null @@ -1,35 +0,0 @@ -clone: - path: github.com/go-openapi/spec - -matrix: - GO_VERSION: - - "1.6" - -build: - integration: - image: golang:$$GO_VERSION - pull: true - commands: - - go get -u github.com/stretchr/testify/assert - - go get -u gopkg.in/yaml.v2 - - go get -u github.com/go-openapi/swag - - go get -u github.com/go-openapi/jsonpointer - - go get -u github.com/go-openapi/jsonreference - - go test -race - - go test -v -cover -coverprofile=coverage.out -covermode=count ./... - -notify: - slack: - channel: bots - webhook_url: $$SLACK_URL - username: drone - -publish: - coverage: - server: https://coverage.vmware.run - token: $$GITHUB_TOKEN - # threshold: 70 - # must_increase: true - when: - matrix: - GO_VERSION: "1.6" diff --git a/vendor/github.com/go-openapi/spec/.editorconfig b/vendor/github.com/go-openapi/spec/.editorconfig new file mode 100644 index 000000000..3152da69a --- /dev/null +++ b/vendor/github.com/go-openapi/spec/.editorconfig @@ -0,0 +1,26 @@ +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true + +# Set default charset +[*.{js,py,go,scala,rb,java,html,css,less,sass,md}] +charset = utf-8 + +# Tab indentation (no size specified) +[*.go] +indent_style = tab + +[*.md] +trim_trailing_whitespace = false + +# Matches the exact files either package.json or .travis.yml +[{package.json,.travis.yml}] +indent_style = space +indent_size = 2 diff --git a/vendor/github.com/go-openapi/spec/.pullapprove.yml b/vendor/github.com/go-openapi/spec/.pullapprove.yml deleted file mode 100644 index 5ec183e22..000000000 --- a/vendor/github.com/go-openapi/spec/.pullapprove.yml +++ /dev/null @@ -1,13 +0,0 @@ -approve_by_comment: true -approve_regex: '^(:shipit:|:\+1:|\+1|LGTM|lgtm|Approved)' -reject_regex: ^[Rr]ejected -reset_on_push: false -reviewers: - members: - - casualjim - - chancez - - frapposelli - - vburenin - - pytlesk4 - name: pullapprove - required: 1 diff --git a/vendor/github.com/go-openapi/spec/.travis.yml b/vendor/github.com/go-openapi/spec/.travis.yml new file mode 100644 index 000000000..ea80ef2a7 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/.travis.yml @@ -0,0 +1,16 @@ +language: go +go: +- 1.7 +install: +- go get -u github.com/stretchr/testify +- go get -u github.com/go-openapi/swag +- go get -u gopkg.in/yaml.v2 +- go get -u github.com/go-openapi/jsonpointer +- go get -u github.com/go-openapi/jsonreference +script: +- go test -v -race -cover -coverprofile=coverage.txt -covermode=atomic ./... +after_success: +- bash <(curl -s https://codecov.io/bash) +notifications: + slack: + secure: QUWvCkBBK09GF7YtEvHHVt70JOkdlNBG0nIKu/5qc4/nW5HP8I2w0SEf/XR2je0eED1Qe3L/AfMCWwrEj+IUZc3l4v+ju8X8R3Lomhme0Eb0jd1MTMCuPcBT47YCj0M7RON7vXtbFfm1hFJ/jLe5+9FXz0hpXsR24PJc5ZIi/ogNwkaPqG4BmndzecpSh0vc2FJPZUD9LT0I09REY/vXR0oQAalLkW0asGD5taHZTUZq/kBpsNxaAFrLM23i4mUcf33M5fjLpvx5LRICrX/57XpBrDh2TooBU6Qj3CgoY0uPRYUmSNxbVx1czNzl2JtEpb5yjoxfVPQeg0BvQM00G8LJINISR+ohrjhkZmAqchDupAX+yFrxTtORa78CtnIL6z/aTNlgwwVD8kvL/1pFA/JWYmKDmz93mV/+6wubGzNSQCstzjkFA4/iZEKewKUoRIAi/fxyscP6L/rCpmY/4llZZvrnyTqVbt6URWpopUpH4rwYqreXAtJxJsfBJIeSmUIiDIOMGkCTvyTEW3fWGmGoqWtSHLoaWDyAIGb7azb+KvfpWtEcoPFWfSWU+LGee0A/YsUhBl7ADB9A0CJEuR8q4BPpKpfLwPKSiKSAXL7zDkyjExyhtgqbSl2jS+rKIHOZNL8JkCcTP2MKMVd563C5rC5FMKqu3S9m2b6380E= diff --git a/vendor/github.com/go-openapi/spec/README.md b/vendor/github.com/go-openapi/spec/README.md index 4b2af124a..1d1622082 100644 --- a/vendor/github.com/go-openapi/spec/README.md +++ b/vendor/github.com/go-openapi/spec/README.md @@ -1,5 +1,5 @@ -# OAI object model [![Build Status](https://ci.vmware.run/api/badges/go-openapi/spec/status.svg)](https://ci.vmware.run/go-openapi/spec) [![Coverage](https://coverage.vmware.run/badges/go-openapi/spec/coverage.svg)](https://coverage.vmware.run/go-openapi/spec) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) +# OAI object model [![Build Status](https://travis-ci.org/go-openapi/spec.svg?branch=master)](https://travis-ci.org/go-openapi/spec) [![codecov](https://codecov.io/gh/go-openapi/spec/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/spec) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) [![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/spec/master/LICENSE) [![GoDoc](https://godoc.org/github.com/go-openapi/spec?status.svg)](http://godoc.org/github.com/go-openapi/spec) -The object model for OpenAPI specification documents \ No newline at end of file +The object model for OpenAPI specification documents diff --git a/vendor/github.com/go-openapi/spec/auth_test.go b/vendor/github.com/go-openapi/spec/auth_test.go new file mode 100644 index 000000000..5449fdec9 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/auth_test.go @@ -0,0 +1,128 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "testing" +) + +func TestSerialization_AuthSerialization(t *testing.T) { + assertSerializeJSON(t, BasicAuth(), `{"type":"basic"}`) + + assertSerializeJSON(t, APIKeyAuth("api-key", "header"), `{"type":"apiKey","name":"api-key","in":"header"}`) + + assertSerializeJSON( + t, + OAuth2Implicit("http://foo.com/authorization"), + `{"type":"oauth2","flow":"implicit","authorizationUrl":"http://foo.com/authorization"}`) + + assertSerializeJSON( + t, + OAuth2Password("http://foo.com/token"), + `{"type":"oauth2","flow":"password","tokenUrl":"http://foo.com/token"}`) + + assertSerializeJSON(t, + OAuth2Application("http://foo.com/token"), + `{"type":"oauth2","flow":"application","tokenUrl":"http://foo.com/token"}`) + + assertSerializeJSON( + t, + OAuth2AccessToken("http://foo.com/authorization", "http://foo.com/token"), + `{"type":"oauth2","flow":"accessCode","authorizationUrl":"http://foo.com/authorization","tokenUrl":"http://foo.com/token"}`) + + auth1 := OAuth2Implicit("http://foo.com/authorization") + auth1.AddScope("email", "read your email") + assertSerializeJSON( + t, + auth1, + `{"type":"oauth2","flow":"implicit","authorizationUrl":"http://foo.com/authorization","scopes":{"email":"read your email"}}`) + + auth2 := OAuth2Password("http://foo.com/authorization") + auth2.AddScope("email", "read your email") + assertSerializeJSON( + t, + auth2, + `{"type":"oauth2","flow":"password","tokenUrl":"http://foo.com/authorization","scopes":{"email":"read your email"}}`) + + auth3 := OAuth2Application("http://foo.com/token") + auth3.AddScope("email", "read your email") + assertSerializeJSON( + t, + auth3, + `{"type":"oauth2","flow":"application","tokenUrl":"http://foo.com/token","scopes":{"email":"read your email"}}`) + + auth4 := OAuth2AccessToken("http://foo.com/authorization", "http://foo.com/token") + auth4.AddScope("email", "read your email") + assertSerializeJSON( + t, + auth4, + `{"type":"oauth2","flow":"accessCode","authorizationUrl":"http://foo.com/authorization","tokenUrl":"http://foo.com/token","scopes":{"email":"read your email"}}`) +} + +func TestSerialization_AuthDeserialization(t *testing.T) { + + assertParsesJSON(t, `{"type":"basic"}`, BasicAuth()) + + assertParsesJSON( + t, + `{"in":"header","name":"api-key","type":"apiKey"}`, + APIKeyAuth("api-key", "header")) + + assertParsesJSON( + t, + `{"authorizationUrl":"http://foo.com/authorization","flow":"implicit","type":"oauth2"}`, + OAuth2Implicit("http://foo.com/authorization")) + + assertParsesJSON( + t, + `{"flow":"password","tokenUrl":"http://foo.com/token","type":"oauth2"}`, + OAuth2Password("http://foo.com/token")) + + assertParsesJSON( + t, + `{"flow":"application","tokenUrl":"http://foo.com/token","type":"oauth2"}`, + OAuth2Application("http://foo.com/token")) + + assertParsesJSON( + t, + `{"authorizationUrl":"http://foo.com/authorization","flow":"accessCode","tokenUrl":"http://foo.com/token","type":"oauth2"}`, + OAuth2AccessToken("http://foo.com/authorization", "http://foo.com/token")) + + auth1 := OAuth2Implicit("http://foo.com/authorization") + auth1.AddScope("email", "read your email") + assertParsesJSON(t, + `{"authorizationUrl":"http://foo.com/authorization","flow":"implicit","scopes":{"email":"read your email"},"type":"oauth2"}`, + auth1) + + auth2 := OAuth2Password("http://foo.com/token") + auth2.AddScope("email", "read your email") + assertParsesJSON(t, + `{"flow":"password","scopes":{"email":"read your email"},"tokenUrl":"http://foo.com/token","type":"oauth2"}`, + auth2) + + auth3 := OAuth2Application("http://foo.com/token") + auth3.AddScope("email", "read your email") + assertParsesJSON(t, + `{"flow":"application","scopes":{"email":"read your email"},"tokenUrl":"http://foo.com/token","type":"oauth2"}`, + auth3) + + auth4 := OAuth2AccessToken("http://foo.com/authorization", "http://foo.com/token") + auth4.AddScope("email", "read your email") + assertParsesJSON( + t, + `{"authorizationUrl":"http://foo.com/authorization","flow":"accessCode","scopes":{"email":"read your email"},"tokenUrl":"http://foo.com/token","type":"oauth2"}`, + auth4) + +} diff --git a/vendor/github.com/go-openapi/spec/bindata.go b/vendor/github.com/go-openapi/spec/bindata.go index 294cbccf7..9afb5df19 100644 --- a/vendor/github.com/go-openapi/spec/bindata.go +++ b/vendor/github.com/go-openapi/spec/bindata.go @@ -1,17 +1,3 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - // Code generated by go-bindata. // sources: // schemas/jsonschema-draft-04.json @@ -83,7 +69,7 @@ func (fi bindataFileInfo) Sys() interface{} { return nil } -var _jsonschemaDraft04JSON = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xcc\x57\x3b\x6f\xdb\x30\x10\xde\xfd\x2b\x04\xa5\x63\x52\xb9\x40\xa7\x6c\x45\xbb\x18\x68\xd1\x0c\xdd\x0c\x0f\xb4\x75\xb2\x19\x50\xa4\x42\x51\x85\x0d\x43\xff\xbd\xa4\xa8\x07\x29\x91\x92\x2d\xbb\x48\xb4\xc4\xe1\xbd\xbe\x3b\xde\x8b\xe7\x45\x20\xbf\x10\xc7\xe1\x73\x10\x1e\x84\xc8\x9e\xa3\xe8\x35\x67\xf4\x29\xdf\x1d\x20\x45\x9f\x19\xdf\x47\x31\x47\x89\x78\x5a\x7e\x8d\xf4\xd9\x43\xf8\xa8\x85\x3e\xe9\xff\x67\x48\xc6\x90\xef\x38\xce\x04\x66\x54\x49\x7f\x67\x1c\x02\xcd\x12\xa4\x20\x50\xad\xa2\xe3\x4e\x30\xc5\x8a\x39\x97\xdc\x1a\x71\x45\xd0\x6c\xdf\x38\x47\x27\x8b\x50\x11\xc5\x29\x03\xa5\x1c\x55\xe4\x47\x9b\x98\x62\xba\x12\x90\x2a\x7d\x5f\x7a\x24\x5c\x9f\x9f\xa5\x83\x1c\x12\xa5\xe2\x21\x0c\xca\x96\xa9\xec\xf8\xc3\x8c\xe5\x12\xd7\x5f\x58\x51\x01\x7b\xe0\x7e\x10\xb8\x66\x18\xc2\xc0\x69\x91\x4a\x8e\xe5\x25\xfa\x7f\x40\x82\x0a\x22\x96\x43\x3b\x88\x90\xdf\x0a\xea\xda\x82\x1d\x19\x91\x8b\xfa\x58\xa5\x21\xc5\x1c\x6b\x9d\x0a\x42\x50\x06\x1b\x27\x8c\x1c\xa7\x19\x81\x3f\xd2\x97\x7c\x68\x1a\x68\xe5\xc0\xba\x8d\x74\x10\x6e\x19\x23\x80\xa8\xfa\xd9\x3a\x1e\x84\xb4\x20\x44\xff\x4d\xb7\xfa\x84\x6d\x5f\x61\x27\xd4\xaf\x5c\x70\x4c\xf7\xa1\xcf\x7e\x45\x9d\x73\xcf\xc6\x65\x36\x7c\x8d\xa9\xf2\xf2\x94\x28\x28\x7e\x2b\xa0\xa1\x0a\x5e\x40\x07\x73\x61\x80\x6d\x6d\x34\x8e\xe9\xd3\x8c\xb3\x0c\xb8\xc0\xbd\xe8\xe9\xa2\xf3\x78\x53\xa3\xec\x01\x49\x18\x4f\x91\xba\xab\xb0\xe0\x38\x74\xc6\xaa\x2b\xca\x7b\x6b\x16\x58\x10\x98\xd4\xeb\x14\xb5\xeb\x7d\x96\x82\x26\x4b\xcf\xe6\x71\x2a\xcf\xb0\x4c\xcd\x2a\xf7\x3d\x6a\x9b\x74\xf3\x56\x5e\x8f\x02\xc7\x1d\x29\x72\x59\x28\xbf\x5a\x16\xfb\xc6\x4d\xfb\xe8\x58\xb3\x8c\x1b\x77\x0a\x77\x86\xa6\xb4\xb4\xf5\x64\x93\xbb\xa0\x24\x88\xe4\x1e\x84\xad\x13\x37\x21\x9c\xd2\x72\x0b\x42\x74\xfc\x09\x74\x2f\x0e\xbd\x9e\x3b\xd5\xbc\x2c\x1f\xaf\xd6\xd0\xb6\x52\xbb\xdf\x22\x21\x80\x4f\xe7\xa8\xb7\x78\xb8\xd4\x7d\x74\x07\x13\xc5\x71\x05\x05\x91\xa6\x91\xf4\x7b\x38\x3d\xe9\x1e\x6e\x1d\xab\xef\x3c\x0c\x74\xbf\x7d\xd5\x6c\xce\x89\xa5\xbe\x8d\xf7\x66\xce\xee\xd1\x86\x67\x80\x34\xad\x8f\xc3\xb3\xae\xc6\x1c\xe3\xb7\xc2\x96\xd9\xb4\x72\x0c\xf0\xab\x92\xe9\x5a\x05\xee\x5c\xb2\x87\xc6\x7f\xa9\x9b\x17\x6b\xb0\xcc\x75\x77\x96\x16\xb7\xcf\x1c\xde\x0a\xcc\x21\x1e\x53\x64\x0e\x73\x4f\x81\xbc\xb8\x07\xa6\xe6\xfa\x50\x55\xe2\x5b\x4d\xad\x4b\xb6\xb6\x81\x49\x77\xc7\xca\x68\x1a\x90\x67\xd7\x78\x3f\x3c\xba\xa3\x8e\xdd\xe8\x7b\xc0\x8a\x21\x03\x1a\x03\xdd\xdd\x11\xd1\x20\xd3\x46\x72\x55\x7d\x93\x0d\xb3\xcf\x34\x52\x46\x03\xd9\x8d\x75\xe2\x0e\x42\xbd\xb9\xdf\xe9\xdd\x34\xb6\x24\x9b\x5b\xa4\x56\x3f\x6b\xac\xd8\x01\x30\x1e\x25\xce\x3a\x77\xc6\x73\xd4\xbd\x96\xc9\xf5\x06\xbc\xca\xf8\x44\xb0\x2e\x09\x5a\xf3\xf5\x3a\x94\x7b\xb7\xa8\x9f\x7f\x17\x8e\x58\x53\xb2\x0e\xfc\xf5\x92\x8c\xc2\x4c\x49\xca\x84\xe7\x7d\x5d\xb6\x2f\x7e\x4f\x79\xba\x96\xe6\x75\xb7\x87\x9b\x0d\xdc\xb5\xbd\xae\xbb\x85\xb8\x8e\x64\x67\xd1\xe8\x18\xe5\xe2\x5f\x00\x00\x00\xff\xff\x4e\x9b\x8d\xdf\x17\x11\x00\x00") +var _jsonschemaDraft04JSON = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xc4\x57\x3b\x6f\xdb\x3e\x10\xdf\xf3\x29\x08\x26\x63\xf2\x97\xff\x40\x27\x6f\x45\xbb\x18\x68\xd1\x0c\xdd\x0c\x0f\xb4\x75\xb2\x19\x50\xa4\x42\x51\x81\x0d\x43\xdf\xbd\xa0\xa8\x07\x29\x91\x92\x2d\xbb\x8d\x97\x28\xbc\xd7\xef\x8e\xf7\xe2\xf9\x01\x21\x84\x30\x8d\xf1\x12\xe1\x83\x52\xd9\x32\x8a\xde\x72\xc1\x5f\xf2\xdd\x01\x52\xf2\x9f\x90\xfb\x28\x96\x24\x51\x2f\x8b\x2f\x91\x39\x7b\xc4\xcf\x46\xe8\xc9\xfc\x3f\x43\x32\x86\x7c\x27\x69\xa6\xa8\xe0\x5a\xfa\x9b\x90\x80\x0c\x0b\x4a\x41\x91\x5a\x45\xc7\x9d\x50\x4e\x35\x73\x8e\x97\xc8\x20\xae\x08\x86\xed\xab\x94\xe4\xe4\x10\x2a\xa2\x3a\x65\xa0\x95\x93\x8a\xfc\xec\x12\x53\xca\x57\x0a\x52\xad\xef\xff\x1e\x89\xd6\xe7\x67\x84\x9f\x24\x24\x5a\xc5\x23\x46\x65\xcb\x54\x76\xfc\x38\x13\x39\x55\xf4\x03\x56\x5c\xc1\x1e\x64\x18\x04\xad\x19\x86\x30\x68\x5a\xa4\x78\x89\x16\x97\xe8\xff\x0e\x09\x29\x98\x5a\x0c\xed\x10\xc6\x7e\x69\xa8\x6b\x07\x76\x64\x45\x2e\xea\x63\x45\xe5\xb3\x66\x8e\x8d\x4e\x0d\x01\x95\x68\xe3\x85\x91\xd3\x34\x63\xf0\xfb\x94\x41\x3e\x34\x0d\xbc\x72\x60\xdd\x46\x1a\xe1\xad\x10\x0c\x08\xd7\x9f\xad\xe3\x08\xf3\x82\x31\xf3\x37\xdd\x9a\x13\xb1\x7d\x83\x9d\xd2\x5f\xb9\x92\x94\xef\x71\xc8\x7e\x45\x9d\x73\xcf\xd6\x65\x36\x7c\x8d\xa9\xf2\xf2\x94\x28\x38\x7d\x2f\xa0\xa1\x2a\x59\x40\x07\xf3\xc1\x02\xdb\xda\x68\x1c\x33\xa7\x99\x14\x19\x48\x45\x7b\xd1\x33\x45\x17\xf0\xa6\x46\xd9\x03\x92\x08\x99\x12\x7d\x57\xb8\x90\x14\x7b\x63\xd5\x15\xe5\xbd\x35\x2b\xaa\x18\x4c\xea\xf5\x8a\xba\xf5\x3e\x4b\x41\x93\xa5\x67\xfb\x38\x2d\x98\xa2\x19\x83\x2a\xf7\x03\x6a\x9b\x74\x0b\x56\x5e\x8f\x02\xc7\x1d\x2b\x72\xfa\x01\x3f\x5b\x16\xf7\xc6\x6d\xfb\xe4\x58\xb3\x8c\x1b\xf7\x0a\x77\x86\xa6\xb4\xb4\xf5\xe4\x92\xbb\xa0\x24\x84\xe5\x01\x84\xad\x13\x37\x21\x9c\xd2\x72\x0b\x42\x72\xfc\x01\x7c\xaf\x0e\xbd\x9e\x3b\xd5\xbc\x1c\x1f\xaf\xd6\xd0\xb6\x52\xb7\xdf\x12\xa5\x40\x4e\xe7\x68\xb0\x78\x24\xec\xe1\xe8\x0f\x26\x89\xe3\x0a\x0a\x61\x4d\x23\xe9\xf7\x70\x7e\x32\x3d\xdc\x39\xd6\xbf\xf3\x30\xd0\xfd\xf6\x55\xb3\x79\x27\x96\xfe\x6d\x82\x37\x73\xf6\x8f\x36\x3a\x03\xa4\x6d\x7d\x1c\x9e\x73\x35\xf6\x18\xbf\x15\x76\x4a\x8e\x2b\xcf\x00\xbf\x2a\x99\xae\x55\xe0\xcf\x25\x77\x68\xfc\x95\xba\x79\x75\x06\xcb\x5c\x77\x67\x69\xf1\xfb\x2c\xe1\xbd\xa0\x12\xe2\x31\x45\xf6\x30\x0f\x14\xc8\xab\x7f\x60\x4e\x27\xe0\x3f\xaf\x92\xd0\x6a\x8a\x82\xdb\xc0\xa4\xbb\x63\x65\x34\x0d\x28\xb0\x6b\x7c\x1e\x1e\xd3\x51\xc7\x6e\xf4\x33\x60\xc5\x90\x01\x8f\x81\xef\xee\x88\x68\x90\x69\x23\xb9\x8a\x2e\x69\x98\x7d\xa6\x91\x32\x1a\xc8\x6e\x9c\x13\x7f\x10\xea\xcd\xfd\x4e\xef\xa6\xb1\x25\xd9\xde\x22\x8d\xfa\x59\x63\xc5\x0d\x80\xf5\x28\xf1\xd6\xb9\x37\x9e\xa3\xee\xb5\x4c\xbe\x37\xe0\x55\xc6\x27\x82\x75\x49\xd0\xda\xe0\xb9\x1d\xca\xbf\x5b\xd4\xcf\xbf\x0b\x47\xac\x2d\x59\x07\xfe\x7a\x49\xc1\x61\xa6\x24\x17\x2a\xf0\xbe\x2e\xdb\x17\x7f\xa0\x3c\x7d\x4b\xf3\xba\xdb\xc3\xed\x06\xee\xdb\x5e\xd7\xdd\x42\x5c\x47\xb2\xb3\x68\x75\x8c\xf2\xe1\x4f\x00\x00\x00\xff\xff\x4e\x9b\x8d\xdf\x17\x11\x00\x00") func jsonschemaDraft04JSONBytes() ([]byte, error) { return bindataRead( @@ -98,12 +84,12 @@ func jsonschemaDraft04JSON() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "jsonschema-draft-04.json", size: 4375, mode: os.FileMode(420), modTime: time.Unix(1441640690, 0)} + info := bindataFileInfo{name: "jsonschema-draft-04.json", size: 4375, mode: os.FileMode(420), modTime: time.Unix(1482389892, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _v2SchemaJSON = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xec\x5d\xdf\x73\xdc\xb6\xf1\x7f\xcf\x5f\x81\xb9\x78\x46\xf6\x24\xd6\x39\xfe\x7e\x5f\xea\x97\x8c\x1a\x39\x89\x5a\xbb\xd2\xf8\x9c\xf6\xc1\x95\x67\x70\x24\x4e\x87\x84\x3f\x2e\x04\x29\xe9\xea\xea\x7f\xef\x02\xfc\x71\x04\x01\x90\x20\x89\x3b\x9d\x6d\x7a\xa6\x8d\x8e\x04\x16\x8b\xc5\x62\xf7\xb3\x0b\x10\xf8\xf4\x0d\x42\xb3\x94\xa6\x01\x99\xbd\x42\xb3\x33\xf4\xb7\xc5\xe5\x3f\xd0\xc2\x5b\x93\x10\xa3\x55\x9c\xa0\xc5\x1d\xbe\xb9\x21\x09\x7a\x79\xfa\x02\x9d\x5d\x5d\x9c\xce\xbe\xe7\x15\xa8\xcf\x4b\xaf\xd3\x74\xf3\x6a\x3e\x67\x79\x91\x53\x1a\xcf\x6f\x5f\xce\x99\xa8\x7b\xfa\x3b\x8b\xa3\x6f\xf3\xc2\x4f\xf2\x47\xb5\x1a\xfc\xe5\xf3\xa2\x60\x9c\xdc\xcc\xfd\x04\xaf\xd2\xe7\x2f\xfe\xbf\xa8\x5c\xd4\x4b\xb7\x1b\xc1\x54\xbc\xfc\x9d\x78\x69\xfe\x2c\x21\x7f\x66\x34\x21\xbc\xf9\x0f\xf0\x1b\x9e\x14\xad\x8b\xd7\x9c\xb3\x68\x15\x97\x7f\x6f\x70\xba\x66\x33\xf8\xfb\x5a\xd4\xc5\xbe\x4f\x53\x1a\x47\x38\xb8\x4a\xe2\x0d\x49\x52\x4a\x18\xd0\x59\xe1\x80\x11\x51\x00\xca\xa7\x24\x89\xa4\xb7\x9f\x72\x52\x1f\xef\x9f\x57\x3f\x78\x97\x12\xb2\xe2\xac\x7d\x3b\xf7\xc9\x8a\x46\x82\x2c\x9b\xdf\x92\xc8\x8f\x93\xd7\xf7\x29\x89\x18\x3c\x98\x89\xd2\x0f\xf0\xff\x0f\x39\x79\x0d\xdd\x92\xfb\x1a\xed\xb2\xdb\x2c\x4d\x68\x74\x53\xf4\x05\x9e\x93\x28\x0b\xab\x6e\x8b\x27\x30\x26\xb3\xe2\xd7\x75\x55\xcc\x27\xcc\x4b\xe8\x86\x73\xc4\xa9\xbc\x5f\x93\x6a\x0c\x6f\x49\xc2\xf9\x42\xf1\x0a\xa5\x6b\xca\x90\x1f\x7b\x59\x48\xa2\xf4\xb4\xe0\xb4\x2e\xc2\xce\xce\x8a\x52\x52\xbd\x75\xcc\x52\x9b\x8e\x14\x62\xe6\xaf\x3e\x7e\xf8\xf8\xe9\x61\x8e\x5e\xfd\x1b\xfe\x5d\x7f\xf7\xf4\xc7\x57\xf0\x97\xff\xdd\xb3\x1f\x9f\xcc\xda\xfa\xc3\x1b\x42\x4f\x23\x1c\x12\x04\x1a\x4a\x37\xcf\xf2\x1e\x11\xa1\xa0\xe8\xf5\x3d\x0e\x37\x01\x79\x85\x4e\x76\x8a\x79\x22\x73\xba\xc4\x8c\x5c\x81\x72\xf4\xe5\x76\xde\xca\x16\xa7\x8a\xb8\xce\xa1\x34\xd6\xb1\x33\xc7\x1b\x7a\xd2\x90\xb5\x50\xf8\x9a\x42\x18\xc5\x5d\x14\x7c\x43\x41\xc6\x12\x05\x0f\xde\x66\x0d\x12\x0d\xe6\xce\x50\x00\xd5\xb8\x90\xde\x5e\xbc\x7d\x8d\x78\x4f\x19\xc2\x9e\x47\x36\x29\xf1\xd1\x72\x5b\x31\xbb\xeb\x9e\x9e\x89\x90\xf8\x14\xbf\x87\xea\x2a\x1b\xa0\xdc\x7e\xe6\xf5\x67\xa3\x68\x1a\x79\x38\x42\x05\x8d\x51\x6c\x88\x29\xdf\x29\xcd\xca\x32\xec\x6a\xd6\x5e\x77\xd7\xaf\x17\x6e\xb4\x9f\x80\x5a\x82\xc2\x58\x31\x51\x94\x3d\x37\x51\x4b\x08\xdb\xc0\x43\x1b\xfd\x28\x8b\x1a\x69\x31\xe2\x65\x09\x4d\xb7\x16\xaa\x56\x96\xd4\xd6\x3f\xef\x23\x27\x5d\x25\x89\x6a\x8a\x6f\x98\x6e\x16\xe2\x24\xc1\xdb\x9d\x1e\xd0\x94\x84\xf5\x72\xc6\x06\x81\x5e\x69\x12\x1f\xaa\xda\x59\x44\xff\xcc\xc8\x45\x41\x23\x4d\x32\x22\xf1\x40\xee\xf9\x04\xc7\xc1\x79\xec\x59\x74\x49\x2a\xdd\xb0\xf0\x3a\x1d\x52\xcc\xa9\xc6\xad\xe9\x66\xcb\x2f\x24\x22\x09\x0e\x10\xaf\x9e\x84\x98\x3f\x46\x78\x19\x67\xa9\x66\xb6\x2a\x5e\x51\x3c\x2d\xcc\x7d\x55\xac\x72\xf4\x8a\xcf\xe8\xf2\x8c\xe5\xd4\x32\x78\x47\xf1\x5a\xf6\x90\x2d\x02\xd4\x7a\xc9\x52\x8e\xf2\xc0\x69\x3c\x66\xad\x1b\x8d\xd6\x0c\x06\x5c\x27\xdb\x33\x94\xab\x04\xc2\x91\x0f\x56\x87\x78\x14\x2c\xb7\x20\x5a\xf7\x24\x35\xce\xbe\x57\xa5\x3a\xa6\x75\x06\x20\x27\x4a\xa9\x57\x79\x64\x70\xed\x4b\x70\xd0\x9d\x8d\xcb\x94\x86\x33\x10\xc4\x11\x07\x04\xb5\xe7\x92\x0b\x5d\xac\xe3\x2c\x00\xcf\x40\x90\x4f\x57\x2b\x92\x00\x46\x40\xab\x24\x0e\x45\x09\x21\xa7\x53\x84\x7e\xa1\xe9\xaf\xd9\x12\xfd\x1c\xe0\xdb\x18\x74\x0f\xbd\xc5\xc9\x1f\x7e\x7c\x17\x21\x40\x16\x38\x08\xe2\x3b\xe2\x1b\x7a\x01\x6a\x14\xb2\xcb\xd5\x82\x24\xb7\xd4\x1b\x33\x8e\xdc\xeb\x0a\x62\x9c\x7b\x96\x93\x13\xa8\xb5\x5d\x8a\xe0\x32\x53\xec\xa5\x76\xea\x5a\x16\xd6\x52\x0a\xa0\x41\x30\xba\x76\x94\xca\xc2\xaa\xc2\x37\x1d\x7a\x83\x3b\x5b\x93\xf1\x53\x5e\x53\x32\x19\xa5\x34\x60\x60\x40\xd7\x24\x0d\xeb\x39\xfd\x0d\x73\x91\xc3\xb0\x91\x43\x48\x7d\x50\x30\xba\xda\x42\x59\x94\xa3\xba\x9c\xcb\x42\x12\x08\xda\x85\x80\x61\x0e\x91\x02\x8e\xe8\x7f\x44\xbf\x0c\x23\x9b\x25\xc1\x48\x5e\x7e\x7b\xf7\x06\x6d\x62\x0a\xfc\x00\x33\x05\x8e\xf3\x54\xb9\x9e\xca\x84\xf2\xe7\x9c\x06\xb8\x3b\x3d\x6b\x30\xe5\xe9\x58\xe6\x04\x0d\x04\xc3\x05\xde\x9e\x59\x49\xc9\xc0\x65\xce\x4c\x9b\xe5\x3d\x98\xb1\x97\x74\x5f\x9d\x4f\x46\xdd\xd7\xfb\x3c\xa1\x8d\x03\xfd\xdb\xfe\x14\xbc\xae\xd4\x45\x17\x05\xfc\x3d\x45\x17\xe9\x09\x43\x24\xf2\xe2\x2c\xc1\x37\x60\x44\x41\xe3\x32\xc6\xfd\x12\xba\x5c\x00\x28\x8e\x43\x18\x08\xba\x0c\xaa\x6a\x07\xd5\xfb\xaa\x4d\x2b\x5d\x3f\x16\x1d\x52\x42\x00\x4b\xeb\xf9\x8e\x04\x20\xeb\xdb\x3c\x84\x63\xa5\x0c\x68\xe4\xd3\x5b\xea\x67\x80\xc4\x80\x0d\x21\x21\x76\x8a\x40\x62\x5b\x14\x66\x10\xcd\x80\x8f\x4c\xca\x8a\x45\x95\x93\x32\xbc\x3c\x39\x55\xc2\xc8\x3d\x0a\xa3\xa6\x0e\x10\xa8\x5a\x11\xe3\x3d\xe5\xb0\xb8\x6d\x14\xdb\xe6\x8e\x4d\x00\x65\x92\xbe\x81\x6e\x27\xc2\x2f\x92\x49\x0a\x9f\x8d\xd1\xbc\x8c\x44\x72\x20\x04\x68\x92\xe7\xb4\xf2\xf6\x59\x81\x79\x96\x42\xcd\x61\xb0\x72\x72\x0c\xc6\x91\x3f\x29\x82\x69\xbf\x00\x86\x22\x1c\x95\x23\xe4\x86\xaa\x69\x22\xb8\x3d\xf6\xbd\x6a\xaf\x7f\xf7\x13\x02\x38\x97\x81\x9f\x15\x8e\x81\x09\x5c\x50\x0b\x56\xa5\x6e\xe9\x62\xc9\x3d\xf6\xaa\x6c\x6e\xbf\x9d\x32\x45\x79\x3d\x7b\x23\xfb\x8c\x06\x83\x6a\xac\x56\xb6\x5a\xe5\xda\xc4\xcb\x2e\x2f\xc6\xcd\xb9\xe2\xc4\x4c\xfe\xc9\x3e\x26\x70\xe1\x3a\x8e\xdd\xfa\x93\x3c\xdd\x36\x66\x88\x95\x04\x41\x48\x43\xf2\x3e\xa7\xd1\x99\x2e\xd4\xb8\xd6\x2a\xdb\x55\x42\x80\x5f\xdf\xbf\xbf\x42\x21\x40\x38\x70\xf9\x0d\x8b\xc2\xd9\xc0\x8d\xa1\xec\x09\x81\x76\x49\xa3\x81\x38\xe8\x88\xe2\x7c\x39\x3b\x24\x09\x43\xce\x10\x89\x57\x6a\x96\x48\x37\x54\xb5\x97\x0f\x52\x75\x43\x9a\xa8\x51\x70\x06\x0e\x22\xc4\xc9\x76\x54\xfc\xbd\x4c\x28\x81\x88\x35\xa7\x54\xaa\x45\x35\xf6\x8f\x16\xfc\x57\x1c\x7c\x3f\x22\xba\x37\x18\x5a\xf1\xce\x36\xa5\xd6\xa4\x59\x31\x76\xe1\xbb\x48\xfb\x14\x01\x27\xdd\xa5\x5c\xba\x64\xaf\x49\x6f\x1b\x84\xdb\x33\xc5\xdd\x22\x16\x4d\x9a\xbb\xc9\x96\x26\xf9\x3f\x88\xad\x82\x8e\x2b\xb6\xb4\x59\xf0\x16\x92\xbb\xf2\x66\x9a\xba\x5c\x78\x0b\x49\xc5\x0a\x36\x26\xb1\xb2\xee\xd2\x42\x4b\x59\x7b\x69\x52\xf3\x39\x0e\xf1\x70\x4a\x8c\xda\xb9\x8c\xe3\x80\xe0\xa8\xa9\x9e\x2b\x9c\x05\xa9\x84\xa6\x15\x46\xd5\xb4\x7d\x1b\xa7\x52\xea\x5e\xd0\x32\xc6\x48\x02\xf8\xbb\x02\x42\x47\xe4\x34\x0a\xc2\xbd\x81\xd0\x0d\xb1\xcc\x08\xee\x7c\xb4\x5e\xf9\x33\x47\x74\xe4\xe5\xd4\xe1\x84\x7c\x12\xc0\xdc\x72\x42\x2a\xde\x34\xa3\x81\xe1\xb4\xd6\x04\x2b\xd3\x65\x98\xa0\x70\xea\xad\x1d\x51\x72\x64\xb7\xb4\x93\x4e\xbb\x9a\x67\x9d\x9c\xc8\xeb\x56\x61\x2c\x4f\x29\x31\x61\xbb\x09\x05\x4b\x9e\xf0\x44\x04\x8e\xb6\xe8\x16\x07\xd4\xcf\x11\x26\x83\x60\x23\x83\x32\xb1\x2f\xc2\xa6\x93\xc2\xdc\xd4\xb3\x12\x21\x95\xa7\xec\x0f\x6e\x67\xfd\xd3\x0f\x2f\x9e\xff\xe5\xfa\xd3\xff\x3d\x3c\x7b\xf2\xdf\x8f\x4f\x8b\xf6\x9f\x3d\xe9\x67\xc1\xff\x89\x83\x8c\x18\xf2\x1c\x7b\x30\x2b\x51\x9c\x36\x40\xa8\x7e\x84\x2c\x65\xd4\x29\x25\x6d\x37\xfa\x77\x64\xd7\x95\x2e\xf5\xcb\xe5\x59\x53\xc1\x38\x22\x97\x2b\x29\x86\xe8\x31\x3a\xda\x81\xb1\xa8\xcf\xb7\x00\xbd\x23\x62\x6d\xc9\xd3\x2c\x89\x5c\x6b\x59\x1f\x1e\x14\xd5\xa7\x53\xd9\xc4\xbe\x23\xeb\x6a\xdb\x93\x54\x53\x95\x76\x53\x62\x2d\x52\x93\x93\x5f\x4a\x93\x3d\x28\xad\x68\x40\x16\x3a\x6a\xb5\x5f\xd7\x46\xbb\x6d\x6d\x21\xcb\xc2\x86\x48\x41\x89\xd5\x5b\x48\x55\xa5\x5b\x26\xef\x91\x61\x15\x49\x89\x55\xb9\x39\xcf\xa4\xe5\x4d\xcc\x5a\x9a\x77\x06\xf8\xf4\xd3\x4c\x90\xb4\x9e\x5f\xa9\x9c\x53\x91\x98\xd2\x85\x73\xca\x0e\x38\xf1\x54\x53\x92\x9b\x71\xb1\xa2\xde\x7c\x4a\xa3\x94\xdc\xa8\x8f\x75\xe8\x1c\x95\x29\x86\xce\x09\x51\xa5\xc4\x7a\x5b\x08\x5d\xc2\xc2\x04\x35\x12\x1a\x52\xbe\xca\xc0\xf2\x04\x85\x96\x9e\x17\x07\x01\x0c\x25\x54\xf8\x59\xcb\x93\x69\x85\xbb\x51\xcb\x80\x22\xcb\x60\xc5\x82\x64\x59\x58\x4b\x29\xc4\xf7\x34\xcc\x42\x3b\x4a\x65\x61\x83\x01\xf1\x82\x8c\x81\x50\xde\xf6\x21\xa9\xd4\xd2\x73\x09\xe5\xed\xb9\x2c\x0a\x77\x70\xd9\x87\xa4\x52\xcb\x24\xcb\x37\x24\xba\x49\x2d\xf1\xef\xae\xb8\xa9\xcf\xbd\xa8\x55\xc5\x4d\xb8\xbc\xd8\x39\x69\xb7\x14\x25\x0a\x9b\x7a\x79\x61\x3f\x55\xaa\xd2\xa6\x3e\xf6\xa1\x55\x96\xd6\xd2\x92\x33\x86\x16\xe4\xea\x15\xf4\xba\x12\x59\xeb\x47\x64\xd4\x09\x98\x79\x14\x3c\xe5\xa5\x12\x06\x1b\xfa\xb8\x2b\x6f\x98\xf9\xfd\x61\x90\xe2\x99\x1f\xc9\xe9\x36\x8b\xb7\xec\x4e\x85\xe0\xa9\x70\x54\x5b\x1e\x3a\x25\x62\x25\xfc\x0e\x82\x2b\x74\xff\x9c\x67\x3d\x45\x64\xd5\xbd\x6b\x86\xe7\x8d\x35\x65\x8c\xbb\x0f\x97\xb1\xbf\xbd\xaa\xd6\xf5\xc6\x6d\x7c\xa8\xbb\x16\x69\xdf\x9f\x8c\x1b\xaf\x8f\x31\x6d\xe3\x2a\xbb\x9d\xa7\xd6\x35\xc9\xed\x2a\x58\xe7\xcb\xf7\x94\xc7\xc5\x7c\x8f\x9b\xd8\x3d\x43\x21\x8a\x2e\xd0\x25\x2f\x9d\xb1\x71\xfb\xdb\x1c\xef\x18\xd9\x31\x6e\x40\x11\x63\x04\x76\xce\x09\x83\x95\x2b\x12\xc2\x41\xec\x61\xbd\xd0\x6c\xa0\x18\xd7\xe5\x6e\xbc\x54\x53\xe0\x3e\xb9\x52\x13\xdb\x77\x6b\x22\x12\x20\x71\x82\x20\x76\xcf\xbf\x6c\xa8\xd8\xe6\x83\x55\xb6\xc7\x4b\xe4\x09\x2c\x1c\x9c\x0e\xc8\xc4\x6a\xc3\x39\xbb\x38\x6d\xc4\xb6\x8a\x1c\xb7\x57\x16\x62\x91\x2d\x17\x4d\x46\x8e\x2d\xec\xe9\x9c\xeb\x9f\xa9\x06\x1c\xcf\x44\x93\x03\x3d\xfe\x4f\x3f\xd5\x26\xa3\x3a\xd4\xa8\x1e\x3e\x36\x35\x04\xa1\x86\x90\x75\x8a\x4d\xa7\xd8\x74\x8a\x4d\x5b\x7b\x3d\xc5\xa6\x5f\x68\x6c\xfa\x4d\xfd\xbf\x25\x4e\x02\xde\x93\xed\x04\x93\x26\x98\x54\x7b\x2a\x74\x62\x42\x49\xfb\x43\x49\x82\x99\xd7\xe1\x26\xdd\x36\x57\x15\xa5\x96\x6d\x76\xbf\xb4\xb1\x25\x9a\x61\x88\xc1\x94\xe2\x49\x19\x5c\x53\xdb\xe5\xb6\x60\x38\x0a\xb6\x5c\x6f\x45\xc2\x86\xaf\x8a\x73\xa6\x78\xce\x26\x33\x7d\x33\x31\x21\xbc\xa3\x44\x78\xff\x82\x01\x7c\xcb\xad\xfe\x04\xf5\xd0\x04\xf5\x26\xa8\x37\x41\x3d\xd4\x84\x7a\xdc\xe4\x9d\xe3\x14\x4f\x68\x6f\x42\x7b\xb5\xa7\xa5\x5a\x4c\x80\x6f\x02\x7c\x3a\xde\x3f\x0f\xc0\xd7\x78\xc8\xf7\x69\x4d\x20\x10\x4d\x20\x70\x02\x81\x5d\xbd\x9e\x40\xe0\xd7\x04\x02\xf9\x27\x2c\x9f\x27\x00\x34\x7d\xb6\x59\x3c\x2d\x1e\x75\x6f\x9f\x1c\x04\x18\xb5\x4e\x4d\xfa\xd6\xb1\xd6\xb4\xa8\xe1\x1c\x62\x1e\x39\x8c\xe4\x8a\x35\x41\xc8\x69\x65\xb5\xfa\xf7\x75\x40\xae\x09\x69\xa1\x09\x69\x4d\x48\x6b\x42\x5a\xa8\x89\xb4\xa2\x38\xfa\xeb\x21\x36\xa9\xea\x3f\x1e\x19\xf4\x75\x9a\x71\xd3\x9c\x4e\x74\x16\xf4\x5a\x32\x8e\x03\x29\x9a\x96\xab\x07\x92\x33\xa0\x61\x65\x64\xaf\x1b\x18\x5a\x33\xa4\x83\x04\x2e\xef\x62\x1e\xd8\x09\x45\xd1\x3a\xd8\x57\x76\x64\xda\x7e\x4d\x7b\x06\x80\x2b\x47\x8c\x94\xd5\x8f\xe1\x04\x04\x83\xa5\x13\xd0\x73\x3a\x07\x3d\xc6\x4b\x09\x17\x5c\x7f\xe7\x3e\x1c\xb8\x68\x8f\x5d\x2d\xfb\x67\x79\xb4\xfb\x7c\xd7\x9d\xb9\x74\x1a\xad\x35\xbc\x1e\xd1\xa0\xe6\x2b\xd0\x5e\x70\x67\x50\x93\x6d\x98\xa8\xd3\x66\x0f\x68\xb1\xeb\x73\x8e\x0e\x20\x36\xa4\x45\x17\x68\x6d\x40\xbb\x4e\x20\xdd\x90\xfe\xba\xc0\x7d\xa3\xfa\x3b\x0a\x1c\xda\xb6\x2c\xf9\x97\x98\x89\x38\xe4\xa2\x88\x99\x86\x01\x49\x07\x2d\x9f\xe7\xf3\xe9\xc5\x20\xf0\x39\x40\xe6\xa3\x10\xea\x3e\x25\xbd\xef\x86\xdb\x05\x6d\x81\x81\x07\x08\xbb\x13\x28\x83\xc0\xcd\xc7\x28\x1c\x42\xea\x07\x69\xbd\x5d\xf4\xa6\xb4\xdf\x18\x06\x72\xaf\x7f\x26\x67\x3e\x6c\x23\x94\x21\x96\xcc\x18\xc6\x74\x7e\xfa\xce\xcb\x44\xdb\xc3\x1e\xa1\xd0\xcc\xa8\xca\x95\x6b\xbf\x9a\x99\xd3\x0a\x4d\x3c\xe8\x01\x95\x26\x15\x36\x06\x4f\xd5\x02\x28\x8b\x94\xd3\xa3\x89\x51\xb7\xd0\x29\x1b\xb5\x1f\x94\x97\xfa\xb3\xfd\x7a\x32\x28\x0f\xd6\xa8\xa1\xc3\x41\xa0\xa2\xb6\x96\xb3\x09\x4d\x9d\x33\x1d\x5a\x68\xdb\x29\x3d\x77\x86\x98\xc1\x1c\x21\xe5\x7d\xea\x9e\x7b\x7d\x38\xeb\x27\x50\x9f\x72\x6c\x0e\x62\xc2\x69\x9c\x0c\x89\x4e\x12\x88\xf9\x2f\xa3\xc0\x78\x30\xe3\xe0\x23\xd8\xee\x43\xe5\x84\x54\xbd\x0c\x78\x41\x03\x26\x74\x7f\x24\x62\xb1\x02\x50\x17\xe8\x2e\x66\xb4\xfe\xba\xb0\x76\x0c\xcc\x17\x1e\x46\xbb\x38\xb0\x64\x0a\x9d\x8f\x26\x74\x7e\x14\x14\xe4\x66\xe9\xca\x6e\x4b\xcf\xde\xcc\xd9\xf1\x1a\xa3\xe6\x6a\x97\x85\x45\x1a\x75\xb3\xc3\x74\xfe\xd0\xb4\x12\xd9\x45\x69\x5a\x89\x9c\x56\x22\xa7\x95\xc8\xc7\x5b\x89\x7c\x04\xc8\x28\xf9\x24\xdd\xb5\x89\x63\x2f\x29\x2c\x69\xbe\xcb\x31\x0c\xbf\x16\x62\xa6\xf4\xb7\xe3\xd2\x42\x1d\x8d\xe1\xfe\x52\x75\x8a\x4a\x0c\xab\x77\x16\x56\x37\x4c\x98\xce\xd5\x97\x25\x2d\x87\x59\xfb\xf1\xf8\x16\x5b\x9d\xb4\x5d\x10\xa7\xed\x6e\x70\xe7\x65\x75\x7a\x3b\x04\x4a\x40\xef\x87\xd4\x04\x95\x4f\xe8\x32\x53\x0f\x6f\x1e\x0d\x02\xef\x12\xbc\xd9\xb8\x3a\xae\xfc\x58\xe6\x2a\xbf\xfc\xd3\x95\x06\xf5\xb9\x5e\xcc\xb5\xb6\x8d\x3c\x77\xd6\x19\xc0\x3f\x96\x71\xed\xb8\x7a\x76\xb8\xad\xd3\x9d\xc5\x6b\x95\xed\x5a\x62\x46\xbd\xb3\x2c\x5d\xf3\x7b\x24\xf2\xcd\xa6\x0b\xe5\xe8\xfd\x46\x0a\xcc\x8a\x30\xde\xd0\xbf\x93\xad\x1b\x5a\x31\x06\x06\x5f\x5e\x40\x60\x46\x3d\x9a\xba\xa4\x79\x85\x19\xbb\x8b\x13\xdf\x25\xcd\xb3\x0d\xe7\xd3\xa1\x28\x0b\xb2\x9e\x47\x18\xfb\x29\xf6\x89\x96\x6a\xf5\xf7\xb5\x56\xf3\xda\xc6\x79\xbf\x96\xe6\x31\x4e\xd2\x15\xbd\x75\xb9\xf5\xf9\xf8\x4c\x49\x63\x7e\x1d\x60\x0c\x1b\x28\xa2\xb1\xfd\xed\xc0\x23\x9c\x77\xbf\x7b\x88\x87\x7a\xae\x7e\xbb\xf8\x5b\xcf\x36\x6b\xe4\x42\x9c\x1f\xe5\x71\x7c\xba\x69\xb0\xd7\x87\xd5\xd1\x55\x10\xdf\x49\x77\x1c\x00\x4f\x71\x52\xdc\x27\xfb\x5b\x9f\x7b\xe9\xdc\x68\x6c\x2e\x14\x8b\x24\x18\xe7\x7b\x74\x6b\xb4\x10\x7e\x77\x7b\xcc\x83\x5e\xdb\x5e\x84\x22\xfa\xb0\xc8\x6b\x68\xa9\x29\x52\xee\xd1\x13\x8b\xbb\x87\x3f\xff\x59\xa1\x20\x8e\xc7\x9d\x15\x69\xfc\x07\xf9\xf2\x67\xc3\xa6\x10\xfa\xa1\x67\x43\x25\xdd\x69\x16\xc8\xb3\x40\x87\x91\xa7\x89\x50\xb4\xbc\xc7\x89\x80\x77\x72\x9f\xe6\xc2\xb1\xcc\x05\x35\xb0\x3b\x32\xa4\xf4\xf5\x4d\x93\x6a\x48\xbe\x30\xfc\x34\x4d\x42\xa4\x9f\x84\x8b\xe6\x28\x3a\x58\x78\x90\xbb\x2c\xb7\x2a\xdf\x3d\xea\x70\x49\xa6\xba\xe2\x59\x91\x6f\xc7\x3a\x4c\xe3\x0a\xc0\x6e\x96\x34\x5f\x4f\xef\x68\xa0\x88\x10\x9f\xf8\x28\x8d\xc5\xd9\x37\x08\x17\xf7\xf9\xe5\xf7\xb4\x06\x81\xf6\xfa\x89\x92\x37\xd9\x88\x69\xba\x3e\x38\xdd\xa9\xdc\x3b\x2f\x89\xc8\x9a\x8c\xe1\xce\x37\x6d\x1a\xce\x7a\x1d\xac\x76\x37\xeb\x20\xe1\xa7\x09\x8e\x18\xf0\xc4\x2f\xff\x48\x63\x2f\x0e\xca\xef\xd8\xc5\x75\xff\x6d\xe2\x34\xce\x7e\x9d\x79\x14\x1b\x92\x64\x0b\xc1\x9f\x30\xf9\xd1\x9d\xf2\xbb\x66\xf0\x7a\xcb\xa6\x65\x3b\x86\x89\x79\x95\xf5\x99\xc7\x6e\xa5\xab\x44\xe4\x9f\xa9\xfc\x73\x43\x37\xba\x8b\xc7\x77\x4b\x47\x82\x5c\x2b\x97\xbb\xb3\x7f\x0e\xc5\x6e\xed\x41\x58\x3f\x74\xc8\x8e\xff\xe6\xd6\x3e\x47\xdb\xfa\x4a\xf2\x7a\x27\xe1\x74\x2b\xdf\xae\xa9\xe6\x16\x1b\x67\xdb\xf7\x2a\x03\xae\xdb\x1b\xe0\xf2\x6b\xb7\xaa\x21\x65\x47\x8e\xb3\x2f\xdc\xca\x26\x5a\x76\xff\xb8\xff\xaa\xad\xea\x97\xb2\x87\xc7\xd9\x97\x6c\x6a\xbf\x9c\xb6\xa5\xdf\x50\x54\x1b\x2f\x65\xeb\x8f\xfb\x2f\x7a\x6a\x52\xdc\x6b\x6b\xf2\x17\x3c\x3b\xac\xd0\xdc\x90\xe4\xec\xcb\xb4\x9a\x18\x95\xbd\x93\xfb\x94\xe2\x3e\x1b\xd3\x0b\x51\xbf\xe7\xc9\xe9\x57\x67\xd5\x44\x88\xdc\x29\x7f\xd4\x54\x78\x19\x0c\x59\x20\x68\x7d\x54\x2a\x78\x52\xfc\xd5\xa8\x4d\x32\xbd\x3e\x2c\x97\x61\xfa\x37\xfc\x7f\x0f\xff\x0b\x00\x00\xff\xff\x31\x8b\xeb\xb6\x54\x9c\x00\x00") +var _v2SchemaJSON = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xec\x5d\x4f\x93\xdb\x36\xb2\xbf\xfb\x53\xa0\x14\x57\xd9\xae\xd8\x92\xe3\xf7\x2e\xcf\x97\xd4\xbc\xd8\x49\x66\x37\x5e\x4f\x79\x26\xbb\x87\x78\x5c\x05\x91\x2d\x09\x09\x09\x30\x00\x38\x33\x5a\xef\x7c\xf7\x2d\xf0\x9f\x08\x02\x20\x41\x8a\xd2\xc8\x0e\x0f\xa9\x78\x28\xa0\xd1\xdd\x68\x34\x7e\xdd\xf8\xf7\xf9\x11\x42\x33\x49\x64\x04\xb3\xd7\x68\x76\x86\xfe\x76\xf9\xfe\x1f\xe8\x32\xd8\x40\x8c\xd1\x8a\x71\x74\x79\x8b\xd7\x6b\xe0\xe8\xd5\xfc\x25\x3a\xbb\x38\x9f\xcf\x9e\xab\x0a\x24\x54\xa5\x37\x52\x26\xaf\x17\x0b\x91\x17\x99\x13\xb6\xb8\x79\xb5\x10\x59\xdd\xf9\xef\x82\xd1\x6f\xf2\xc2\x8f\xf3\x4f\xb5\x1a\xea\xc7\x17\x45\x41\xc6\xd7\x8b\x90\xe3\x95\x7c\xf1\xf2\x7f\x8b\xca\x45\x3d\xb9\x4d\x32\xa6\xd8\xf2\x77\x08\x64\xfe\x8d\xc3\x9f\x29\xe1\xa0\x9a\xff\xed\x11\x42\x08\xcd\x8a\xd6\xb3\x9f\x15\x67\x74\xc5\xca\x7f\x27\x58\x6e\xc4\xec\x11\x42\xd7\x59\x5d\x1c\x86\x44\x12\x46\x71\x74\xc1\x59\x02\x5c\x12\x10\xb3\xd7\x68\x85\x23\x01\x59\x81\x04\x4b\x09\x9c\x6a\xbf\x7e\xce\x49\x7d\xba\x7b\x51\xfd\xa1\x44\xe2\xb0\x52\xac\x7d\xb3\x08\x61\x45\x68\x46\x56\x2c\x6e\x80\x86\x8c\xbf\xbd\x93\x40\x05\x61\x74\x96\x95\xbe\x7f\x84\xd0\x7d\x4e\xde\x42\xb7\xe4\xbe\x46\xbb\x14\x5b\x48\x4e\xe8\xba\x90\x05\xa1\x19\xd0\x34\xae\xc4\xce\xbe\xbc\x9a\xbf\x9c\x15\x7f\x5d\x57\xc5\x42\x10\x01\x27\x89\xe2\x48\x51\xb9\xda\x40\xd5\x87\x37\xc0\x15\x5f\x88\xad\x90\xdc\x10\x81\x42\x16\xa4\x31\x50\x39\x2f\x38\xad\xab\xb0\x53\xd8\xac\x94\x56\x6f\xc3\x84\xf4\x11\xa4\x50\xb3\xfa\xe9\xd3\x6f\x9f\x3e\xdf\x2f\xd0\xeb\x8f\x1f\x3f\x7e\xbc\xfe\xf6\xe9\xf7\xaf\x5f\x7f\xfc\x18\x7e\xfb\xec\xfb\xc7\xb3\x36\x79\x54\x43\xe8\x29\xc5\x31\x20\xc6\x11\x49\x9e\xe5\x12\x41\x66\xa0\xe8\xed\x1d\x8e\x93\x08\x5e\xa3\x27\x3b\xc3\x7c\xa2\x73\xba\xc4\x02\x2e\xb0\xdc\xf4\xe5\x76\xd1\xca\x96\xa2\x8a\x94\xcd\x21\xc9\x6c\xec\x2c\x70\x42\x9e\x34\x74\x9d\x19\x7c\xcd\x20\x9c\xea\x2e\x0a\xfe\x42\x84\xd4\x29\x04\x8c\x8a\xb4\x41\xa2\xc1\xdc\x19\x8a\x88\x90\x4a\x49\xef\xce\xdf\xbd\x45\x4a\x52\x81\x70\x10\x40\x22\x21\x44\xcb\x6d\xc5\xec\x4e\x3c\x1c\x45\xef\x57\x9a\xb5\x7d\xae\xfe\xe5\xe4\x31\x86\x90\xe0\xab\x6d\x02\x3b\x2e\xcb\x11\x90\xd9\xa8\xc6\x77\xc2\x59\x98\x06\xfd\xf9\x2e\x78\x45\x01\xa6\xa8\xa0\x71\x5c\xbe\x33\xa7\xd2\xd9\x5f\x95\xef\xd9\xd5\xac\xfd\xdc\x5d\xbf\x5e\xb8\xd1\x3e\xc7\x31\x48\xe0\x5e\x4c\x14\x65\xdf\xb8\xa8\x71\x10\x09\xa3\xc2\xc7\x02\xcb\xa2\x4e\x5a\x02\x82\x94\x13\xb9\xf5\x30\xe6\xb2\xa4\xb5\xfe\x9b\x3e\x7a\xb2\x55\xd2\xa8\x4a\xbc\x16\xb6\x71\x8e\x39\xc7\xdb\x9d\xe1\x10\x09\x71\xbd\x9c\xb3\x41\x89\xd7\xa5\x89\xdc\x57\xb5\x53\x4a\xfe\x4c\xe1\xbc\xa0\x21\x79\x0a\x1a\x0f\x70\xa7\x5c\x08\x8e\xde\xb0\xc0\x43\x24\xad\x74\x63\x0e\xb1\xd9\x90\xe1\xb0\x2d\x13\xa7\x6d\x78\xfd\x04\x14\x38\x8e\x90\xaa\xce\x63\xac\x3e\x23\xbc\x64\xa9\xb4\xf8\x03\x63\xde\xcd\xbe\x16\x13\x4a\x55\xac\x82\x12\xc6\xac\xd4\x35\xf7\x22\xd4\x3a\xff\x22\x73\x0e\x6e\x51\xa0\x75\x1e\xae\x8f\xe8\x5d\xc7\x59\xe6\xe4\x9a\x18\x8d\xd6\x1c\x53\x84\x4d\xb7\x67\x28\x37\x09\x84\x69\x88\x12\x0e\x01\x11\x80\x32\xa2\xf5\xb9\xaa\xc6\xd9\x73\x53\xab\xfb\xb4\x2e\x20\xc6\x54\x92\xa0\x9a\xf3\x69\x1a\x2f\x81\x77\x37\xae\x53\x1a\xce\x40\xc4\xa8\x82\x1c\xb5\xef\xda\x24\x7d\xb9\x61\x69\x14\xa2\x25\xa0\x90\xac\x56\xc0\x81\x4a\xb4\xe2\x2c\xce\x4a\x64\x7a\x9a\x23\xf4\x13\x91\x3f\xa7\x4b\xf4\x63\x84\x6f\x18\x87\x10\xbd\xc3\xfc\x8f\x90\xdd\x52\x44\x04\xc2\x51\xc4\x6e\x21\x74\x48\x21\x81\xc7\xe2\xfd\xea\x12\xf8\x0d\x09\xf6\xe9\x47\x35\xaf\x67\xc4\x14\xf7\x22\x27\x97\xe1\xe2\x76\x2d\x06\x8c\x4a\x1c\x48\x3f\x73\x2d\x0b\x5b\x29\x45\x24\x00\x2a\x0c\x11\xec\x94\xca\xc2\xa6\xc1\x37\x21\x43\x83\x3b\x5f\x97\xf1\x43\x5e\x53\x73\x19\xa5\x36\xd8\x2d\x05\x2e\x34\x0b\xeb\x39\xfc\x1d\x63\x51\x01\xbd\x3d\xbb\x90\x84\x40\x25\x59\x6d\x09\x5d\xa3\x1c\x37\xe6\x5c\x16\x9a\x40\x09\x70\xc1\xe8\x82\xf1\x35\xa6\xe4\xdf\x99\x5c\x8e\x9e\x4d\x79\xb4\x27\x2f\xbf\x7e\xf8\x05\x25\x8c\x50\xa9\x98\x29\x90\x62\x60\xea\x75\xae\x13\xca\xbf\x2b\x1a\x29\x27\x76\xd6\x20\xc6\x64\x5f\xe6\x32\x1a\x08\x87\x21\x07\x21\xbc\xb4\xe4\xe0\x32\x67\xa6\xcd\xf3\x1e\xcd\xd9\x6b\xb6\x6f\x8e\x27\xa7\xed\xdb\xe7\xbc\xcc\x1a\x07\xce\x6f\x87\x33\xf0\xba\x51\x17\x22\x66\x78\x79\x8e\xce\xe5\x13\x81\x80\x06\x2c\xe5\x78\x0d\xa1\xb2\xb8\x54\xa8\x79\x09\xbd\xbf\x3c\x47\x01\x8b\x13\x2c\xc9\x32\xaa\xaa\x1d\xd5\xee\xab\x36\xbd\x6c\xfd\x54\x6c\xc8\x08\x01\x3c\xbd\xe7\x07\x88\xb0\x24\x37\x79\x90\x28\x4a\x1d\x10\x1a\x92\x1b\x12\xa6\x38\x42\x40\xc3\x4c\x43\x62\x8e\xae\x36\xb0\x45\x71\x2a\xa4\x9a\x23\x79\x59\xb1\xa8\xf2\xa4\x0c\x60\x9f\xcc\x8d\x40\xf5\x80\xca\xa8\x99\xc3\xa7\x85\x1f\x31\x25\xa9\x82\xc5\x6d\xbd\xd8\x36\x76\x7c\x02\x28\x97\xf6\x1d\x74\x3b\x11\x7e\x91\xae\x32\xf8\x6c\xf4\xe6\x7b\x9a\xa5\x1f\x62\xc6\x21\xcf\x9a\xe5\xed\x8b\x02\xf3\x2c\x33\x33\xdf\x00\xca\xc9\x09\xb4\x04\xf5\xa5\x08\xd7\xc3\x02\x18\x66\xf1\xab\x1e\x83\x37\x4c\xcd\x12\xc1\x1d\x50\xf6\xaa\xbd\xfe\xe2\x73\x48\x38\x08\xa0\x32\x9b\x18\x44\x86\x0b\x6a\xc1\xaa\x26\x96\x2d\x96\x3c\xa0\x54\x65\x73\x87\x15\xca\x15\xe5\xf5\x94\x46\x9f\x33\x1a\x0c\x9a\xb1\x5a\xd9\x6a\x95\xcd\xcb\x7e\xec\x9a\xc5\x94\x3b\x37\x26\x31\xd7\xfc\xe4\x1f\x13\x8c\x31\x75\x9c\xba\xf7\x87\x3c\xa1\xb7\x4f\x17\x1b\x09\x82\x98\xc4\x70\x95\xd3\xe8\x4c\x48\x5a\xa6\xd6\x2a\x3d\x56\x42\x80\x9f\xaf\xae\x2e\x50\x0c\x42\xe0\x35\x34\x3c\x8a\x62\x03\x37\xba\xb2\x27\x04\xda\x25\x8d\x06\xe2\xa0\x13\x8a\xf3\xf5\xec\x10\x72\x67\x88\x90\x3d\x4b\x64\xeb\xaa\xda\x8f\xf7\x5a\x75\x47\x9a\xa8\x51\x70\x26\xd2\x38\xc6\x7c\xbb\x57\xfc\xbd\xe4\x04\x56\xa8\xa0\x54\x9a\x45\xd5\xf7\x0f\x16\xfc\x57\x1c\x3c\xdf\x23\xba\x77\x38\xda\x16\x4b\x31\x53\x6a\x4d\x9a\x15\x63\xe7\xe1\x18\x69\x9f\x22\xe0\x24\xbb\x94\x4b\x97\xee\x2d\xf9\x70\x87\x72\x7b\xe6\xc4\x33\x2a\x66\x5e\x1c\x35\x72\xe3\x2d\xda\x73\xe4\xc7\x51\x6d\xa4\xa1\x2a\x4f\xde\x94\xcb\xb2\x3e\x31\x48\xae\x82\xce\xc9\xc8\x65\xcd\xc3\xb7\x34\xb6\x2b\xdf\x58\x65\x78\x6e\x73\xac\x5e\x24\x0d\x3f\xdc\x70\x23\xc6\xda\x52\x0b\x2d\x63\x7d\xa9\x49\x2d\x54\x48\x28\xc0\x12\x9c\xe3\x63\xc9\x58\x04\x98\x36\x07\xc8\x0a\xa7\x91\xd4\xf0\xbc\xc1\xa8\xb9\x70\xd0\xc6\xa9\xb6\x78\x80\x5a\xa3\xb4\x2c\xf4\x18\x0b\x8a\x9d\xd0\xb4\x55\x10\xee\x0d\xc5\xd6\xe0\x99\x93\xdc\xa1\x04\xbb\xf1\xa7\x23\xd1\xd1\x97\x8c\x87\x13\x0a\x21\x02\xe9\x99\x25\xed\x20\xc5\x92\x66\x3c\x32\x9c\xd6\x06\xb0\x31\x5c\x86\x29\x0a\xcb\x60\x33\x12\xa5\x91\xfc\x96\x75\xd0\x59\xd7\x13\xbd\xd3\x23\x79\xdd\x2a\x90\xa6\x38\x06\x91\x39\x7f\x20\x72\x03\x1c\x2d\x01\x61\xba\x45\x37\x38\x22\x61\x8e\x71\x85\xc4\x32\x15\x28\x60\x61\x16\xb8\x3d\x29\xdc\x4d\x3d\x2f\x12\x13\x7d\xc8\x7e\x37\xee\xa8\x7f\xfa\xdb\xcb\x17\xff\x77\xfd\xf9\x7f\xee\x9f\x3d\xfe\xcf\xa7\xa7\x45\xfb\xcf\x1e\xf7\xf3\xe0\xff\xc4\x51\x0a\x8e\x4c\xcb\x01\xdc\x0a\x65\xb2\x01\x83\xed\x3d\xe4\xa9\xa3\x4e\x2d\x59\xc5\xe8\x2f\x48\x7d\x5a\x6e\x37\xbf\x5c\x9f\x35\x13\x64\x14\xfa\xef\x0b\x68\xa6\x0d\xb4\x8e\xf1\xa8\xff\xbb\x60\xf4\x03\x64\xab\x5b\x81\x65\x51\xe6\xda\xca\xfa\xf0\xb0\xac\x3e\x9c\xca\x26\x0e\x1d\xdb\x57\x5b\xbb\xb4\x9a\xa6\xb6\x9b\x1a\x6b\xd1\x9a\x9e\x7e\x33\x9a\xec\x41\x69\x45\x22\xb8\xb4\x51\xeb\x04\x77\xca\x6f\x7b\x7b\xc8\xb2\xb0\x95\x92\x25\x5b\xd0\x42\xaa\x2a\xdd\x32\x78\x4f\x0c\xab\x68\x46\x6c\xea\x6d\xf4\x5c\x5e\xde\xc4\xac\xa5\xf9\xd1\x00\x9f\x7d\x98\x65\x24\xbd\xc7\x97\xd4\xb3\x3a\xa8\x2b\xa0\x34\x76\xf9\x65\x5f\x2d\x25\x95\x1b\xcf\xd6\xf4\x9b\x5f\x09\x95\xb0\x36\x3f\xdb\xd0\x39\x2a\x93\x1c\x9d\x03\xa2\x4a\xca\xf5\xf6\x10\xb6\x94\x89\x0b\x6a\x70\x12\x13\x49\x6e\x40\xe4\x29\x12\x2b\xbd\x80\x45\x11\x04\xaa\xc2\x8f\x56\x9e\x5c\x6b\xec\x8d\x5a\x0e\x14\x59\x06\x2b\x1e\x24\xcb\xc2\x56\x4a\x31\xbe\x23\x71\x1a\xfb\x51\x2a\x0b\x3b\x1c\x48\x10\xa5\x82\xdc\xc0\xbb\x3e\x24\x8d\x5a\x76\x2e\x09\xed\xc1\x65\x51\xb8\x83\xcb\x3e\x24\x8d\x5a\x2e\x5d\xfe\x02\x74\x2d\x3d\xf1\xef\xae\xb8\x4b\xe6\x5e\xd4\xaa\xe2\x2e\x5c\x5e\xec\x0e\xf5\x5b\x0c\xcb\x0a\xbb\xa4\x3c\xf7\x1f\x2a\x55\x69\x97\x8c\x7d\x68\x95\xa5\xad\xb4\xf4\x9c\xa5\x07\xb9\x7a\x05\xbb\xad\x50\x6f\xfb\xa0\x4e\x9b\x48\x23\x49\x92\x28\x87\x19\x3e\x32\xee\xca\x3b\x46\x7e\x7f\x18\x64\xcc\xcc\x0f\x34\xe9\x36\x8b\xb7\x6c\xa8\xa5\x5b\x54\x4c\x54\x5b\x15\x3a\xf1\x6c\x2d\xfe\x96\xc8\x0d\xba\x7b\x81\x88\xc8\x23\xab\xee\x7d\x3b\x92\xa7\x60\x29\xe3\xdc\xff\xb8\x64\xe1\xf6\xa2\x5a\x59\xdc\x6f\xeb\x45\x7d\x6a\xd1\x76\x1e\xea\xb8\xf1\xfa\x14\xd3\x36\x63\xe5\xd7\xf3\xe4\xbe\x25\xbd\x5e\x05\xeb\x73\x74\xb5\x21\x2a\x2e\x4e\xa3\x30\xdf\xbf\x43\x28\x2a\xd1\xa5\x2a\x9d\x8a\xfd\x76\xd8\x8d\xbc\x67\x65\xc7\xb8\x03\x45\xec\xa3\xb0\x37\x8a\x70\x4c\x68\x91\x51\x8e\x58\x80\xed\x4a\xf3\x81\x62\xca\x96\xbb\xf1\x52\xcd\x80\xfb\xe4\x4a\x5d\x6c\xdf\x6e\x20\x4b\x80\x30\x8e\x28\x93\xf9\xe9\x8d\x8a\x6d\xd5\x59\x65\x7b\xaa\x44\x9e\xc0\xc2\xd1\x7c\x40\x26\xd6\x1a\xce\xf9\xc5\x69\x7b\x6c\xec\xc8\x71\x7b\xe5\x21\x2e\xd3\xe5\x65\x93\x91\x53\x0b\x7b\x3a\xc7\xfa\x17\x6a\x01\xa7\x33\xd0\xf4\x40\x0f\x39\x87\xda\xe4\x54\x87\x3a\xd5\xe3\xc7\xa6\x8e\x20\xd4\x11\xb2\x4e\xb1\xe9\x14\x9b\x4e\xb1\xe9\x14\x9b\xfe\x15\x63\xd3\x47\xf5\xff\x97\x38\xe9\xcf\x14\xf8\x76\x82\x49\x13\x4c\xaa\x7d\xcd\x6c\x62\x42\x49\x87\x43\x49\x19\x33\x6f\xe3\x44\x6e\x9b\xab\x8a\x3e\x86\xaa\x99\x52\x1b\x5b\x59\x33\x02\x09\xa0\x21\xa1\x6b\x84\x6b\x66\xbb\xdc\x16\x0c\xd3\x68\xab\xec\x36\x4b\xd8\x60\x8a\x40\x31\x85\x6e\x14\x57\x13\xc2\xfb\x92\x10\xde\xbf\x88\xdc\xbc\x53\x5e\x7f\x82\x7a\x13\xd4\x9b\xa0\xde\x04\xf5\x90\x01\xf5\x94\xcb\x7b\x83\x25\x9e\xd0\xde\x84\xf6\x6a\x5f\x4b\xb3\x98\x00\xdf\x04\xf8\x6c\xbc\x7f\x19\x80\xaf\xf1\x71\x45\x22\x98\x40\xe0\x04\x02\x27\x10\xd8\x29\xf5\x04\x02\xff\x4a\x20\x30\xc1\x72\xf3\x65\x02\x40\xd7\xc1\xd1\xe2\x6b\xf1\xa9\x7b\xfb\xe4\x20\xc0\x68\x9d\xd4\xb4\xd3\x96\xb5\xa6\xd1\x41\x20\xe6\x89\xc3\x48\x65\x58\x13\x84\x9c\x56\x56\x3b\x0c\xe0\x6b\x83\x5c\x13\xd2\x9a\x90\xd6\x84\xb4\x26\xa4\x85\x0c\xa4\x45\x19\xfd\xff\x63\x6c\x52\xb5\x1f\x1e\x19\x74\x3a\xcd\xb9\x69\xce\xa6\x3a\x0f\x7a\x2d\x19\xc7\x81\x14\x5d\xcb\xd5\x03\xc9\x39\xd0\xb0\xd1\xb3\xcd\xfb\x7a\x2d\x5d\x3a\x48\xe1\xfa\x2e\xe6\x81\x42\x18\x86\xd6\xc1\xbe\xb1\x23\xd3\xf7\x34\xed\x19\x0a\x0b\xc4\x48\x44\xfd\x22\x50\xb6\x42\x58\xbb\xe5\x3d\xa7\x73\xd4\x8b\xc4\x8c\x70\x61\xec\x73\xee\xc3\x81\x8b\xf5\xe2\xd7\x52\x3e\xcf\xeb\xeb\x17\x3b\x71\x16\xda\x7d\xb8\xde\xf0\x7a\x8f\x06\x2d\xa7\x40\x7b\xc1\x9d\x41\x4d\xb6\x61\xa2\x4e\x9f\x3d\xa0\xc5\xae\xe3\x1c\x1d\x40\x6c\x48\x8b\x63\xa0\xb5\x01\xed\x8e\x02\xe9\x86\xc8\x3b\x06\xee\xdb\x4b\xde\xbd\xc0\xa1\x6f\xcb\xda\xfc\xc2\x44\x16\x87\x9c\x17\x31\xd3\x30\x20\x39\x42\xcb\x6f\xf2\xf1\xf4\x72\x10\xf8\x1c\xa0\xf3\xbd\x10\xea\x21\x35\x7d\xe8\x86\xdb\x15\xed\x81\x81\x07\x28\xbb\x13\x28\xc7\xf8\xce\x7d\x8d\xc2\x31\xb4\x7e\x94\xd6\xdb\x55\xef\x4a\xfb\xed\xc3\x40\x3e\xeb\x9f\xe9\x99\x0f\xdf\x08\x65\x88\x27\x73\x86\x31\x9d\x47\xdf\x55\x19\xba\x3d\xee\x15\x0a\xcd\x8c\xaa\x5e\xb9\xf6\x57\x33\x73\x5a\xa1\x89\x7b\x3b\xa0\xb2\xa4\xc2\xf6\xc1\x53\xb5\x00\xca\x23\xe5\xf4\x60\x6a\xb4\x2d\x74\xea\x4e\xed\x3b\xe3\x47\xfb\xed\x82\x3d\x19\xd4\x3b\x6b\xaf\xae\x2b\x2f\x57\xb3\x82\x68\xcb\xed\x88\x2e\xe1\x5c\xd7\x26\xfa\x0a\x65\xe7\xce\x11\x33\xb4\xdd\x66\xe3\x37\xf6\xfa\x70\xd6\x4f\xa1\x21\x51\xd8\x3c\x26\x14\x4b\xc6\x87\x44\x27\x1c\x70\xf8\x9e\x46\xce\xab\x21\x07\x5f\xc1\x76\x17\x1b\x77\xb4\xda\x75\xa0\x0a\x3a\x30\xe1\xf8\x97\x32\x16\x2b\x00\x75\x85\xee\x62\x46\xef\xd3\x85\xb5\x6b\x60\xbe\xf2\x30\x7a\x8c\x0b\x4b\xa6\xd0\xf9\x64\x42\xe7\x07\x41\x41\xe3\x2c\x5d\xf9\x6d\xe9\x39\x98\x3b\x3b\x5d\x67\xd4\x5c\xed\xf2\xf0\x48\x7b\xbd\x2d\x31\xdd\x3f\x34\xad\x44\x76\x51\x9a\x56\x22\xa7\x95\xc8\x69\x25\xf2\xe1\x56\x22\x1f\x00\x32\x6a\x73\x92\xed\xe1\xc6\x7d\x9f\x49\x2c\x69\x7e\xc8\x31\x4c\x0c\xb4\xf2\x54\x3b\x79\x3b\x9e\x4d\xb4\xd1\x18\x3e\x5f\x9a\x93\xa2\x11\xc3\xda\x27\x0b\xaf\x37\x2e\x5c\x37\xfb\xeb\x9a\xd6\xc3\xac\xc3\xcc\xf8\x1e\x5b\x9d\xac\x22\x64\xb7\xed\x26\xb8\xf3\xb9\x3c\xbb\x1f\xe2\xb0\x22\x77\x43\x6a\x62\x29\x39\x59\xa6\xe6\xe5\xcd\x7b\x83\xc0\x5b\x8e\x93\x64\xac\xeb\xca\x4f\x65\xac\x4a\xbc\x1e\xcd\x82\xfa\x3c\x70\x36\xb6\xb5\xed\x79\xef\xec\x68\x00\xff\x54\xfa\xb5\xe3\xf1\xdb\xe1\xbe\xce\x76\x17\xaf\x57\xb6\x6b\x89\x05\x09\xce\x52\xb9\x01\x2a\x49\xbe\xd9\xf4\xd2\xb8\x7a\xbf\x91\x02\xf3\x22\x8c\x13\xf2\x77\xd8\x8e\x43\x8b\xe1\x54\x6e\x5e\x9d\xc7\x49\x44\x02\x22\xc7\xa4\x79\x81\x85\xb8\x65\x3c\x1c\x93\xe6\x59\xa2\xf8\x1c\x51\x95\x05\xd9\x20\x00\x21\x7e\x60\x21\x58\xa9\x56\xff\xbe\xb6\x5a\x5e\x5b\x3f\x1f\xd6\xd3\x3c\xc4\x4d\xba\x99\xb4\x63\x6e\x7d\x3e\x3d\x57\xd2\x18\x5f\x47\xe8\xc3\x06\x8a\x68\x6c\x7f\x3b\x72\x0f\xe7\xe2\x77\x77\xf1\xd0\x99\xab\xdf\x2e\xfe\xd6\xbb\xcd\x1a\xb9\x90\xd1\xaf\xf2\x38\x3d\xdb\x74\xf8\xeb\xe3\xda\xe8\x2a\x62\xb7\xda\x1b\x07\xa9\xdc\x30\x5e\xbc\x68\xfb\x6b\x9f\x97\xf1\xc6\xb1\xd8\x5c\x29\x1e\x49\x30\xc5\xf7\xde\xad\x91\x42\xf9\xdd\xed\x89\x80\x25\xbe\x37\xd7\xe7\x32\x5c\xe6\x35\xac\xd4\x0c\x2d\xf7\x90\xc4\xe3\xf5\xe3\x2f\x7f\x54\x18\x88\xe3\x61\x47\x85\x64\x7f\xc0\xd7\x3f\x1a\x92\x42\xe9\xc7\x1e\x0d\x95\x76\xa7\x51\xa0\x8f\x02\x1b\x46\x9e\x06\x42\xd1\xf2\x01\x07\x02\xde\xe9\x7d\x1a\x0b\xa7\x32\x16\xcc\xc0\xee\xc4\x90\xd2\x5f\x6f\x98\x54\x5d\xf2\x95\xe1\xa7\x69\x10\x3a\x06\xe1\x65\xb3\x17\x47\x58\x78\xd0\x45\xd6\x5b\xd5\x5f\x25\x1d\x71\x49\xa6\x7a\x64\xda\xd0\x6f\xc7\x3a\x4c\xe3\x09\xc0\x6e\x96\x2c\xa7\xa7\x77\x34\x10\x05\x08\x21\x44\x92\x65\x77\xdf\x20\x5c\xbc\xe7\x97\x3f\xf4\x1a\x45\xd6\xe7\x27\x4a\xde\x74\x27\x66\x11\x7d\x70\xba\xd3\x78\xf9\x1e\x0d\xca\xc8\x39\xde\x7c\xb3\xa6\xe1\xbc\xd7\xc1\x6a\x6f\xb3\x0e\x52\xbe\xe4\x98\x8a\x15\x70\x94\x70\x26\x59\xc0\xa2\xf2\x1c\xfb\xd9\xc5\xf9\xbc\xd5\x92\x9c\xa3\xdf\xe6\x1e\xb3\x0d\x49\xba\x87\x50\x5f\x84\xfe\xe9\xd6\xf8\xbb\xe6\xf0\x7a\xeb\xa6\x65\x3b\x86\x8b\x79\x93\xf5\x59\x20\x6e\xb4\xa7\x44\xf4\x3f\xa5\xfe\x67\x42\x12\xdb\xd3\xe7\xbb\xa5\xa3\x8c\x5c\x2b\x97\xbb\xbb\x7f\x8e\xc5\x6e\xed\x43\x5c\xbf\x74\xc8\x8f\xff\xe6\xd6\xbe\x91\xb6\xf5\x95\xe4\xed\x93\xc4\xa8\x5b\xf9\x76\x4d\x35\xb7\xd8\x8c\xb6\x7d\xaf\x72\xe0\xb6\xbd\x01\x63\x9e\x76\xab\x1a\x32\x76\xe4\x8c\x76\xc2\xad\x6c\xa2\x65\xf7\xcf\xf8\xa7\xda\x2a\xb9\x8c\x3d\x3c\xa3\x9d\x64\x33\xe5\x1a\xb5\x2d\xfb\x86\xa2\x5a\x7f\x19\x5b\x7f\xc6\x3f\xd1\x53\xd3\xe2\x41\x5b\xd3\x4f\xf0\xec\xb0\x42\x73\x43\xd2\x68\x27\xd3\x6a\x6a\x34\xf6\x4e\x1e\x52\x8b\x87\x6c\xcc\xae\x44\xfb\x9e\xa7\x51\x4f\x9d\x55\x03\x81\x8e\x67\xfc\xb4\x69\xf0\x3a\x18\xf2\x40\xd0\xf6\xa8\x34\xe3\xc9\x98\xaf\xf6\xda\x24\xd3\xeb\x60\xb9\x0e\xd3\x1f\xa9\xff\xee\x1f\xfd\x37\x00\x00\xff\xff\x69\x5d\x0a\x6a\x39\x9d\x00\x00") func v2SchemaJSONBytes() ([]byte, error) { return bindataRead( @@ -118,7 +104,7 @@ func v2SchemaJSON() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "v2/schema.json", size: 40020, mode: os.FileMode(420), modTime: time.Unix(1446147817, 0)} + info := bindataFileInfo{name: "v2/schema.json", size: 40249, mode: os.FileMode(420), modTime: time.Unix(1482389892, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -176,7 +162,7 @@ func AssetNames() []string { // _bindata is a table, holding each asset generator, mapped to its name. var _bindata = map[string]func() (*asset, error){ "jsonschema-draft-04.json": jsonschemaDraft04JSON, - "v2/schema.json": v2SchemaJSON, + "v2/schema.json": v2SchemaJSON, } // AssetDir returns the file names below a certain @@ -218,7 +204,6 @@ type bintree struct { Func func() (*asset, error) Children map[string]*bintree } - var _bintree = &bintree{nil, map[string]*bintree{ "jsonschema-draft-04.json": &bintree{jsonschemaDraft04JSON, map[string]*bintree{}}, "v2": &bintree{nil, map[string]*bintree{ @@ -272,3 +257,4 @@ func _filePath(dir, name string) string { cannonicalName := strings.Replace(name, "\\", "/", -1) return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...) } + diff --git a/vendor/github.com/go-openapi/spec/contact_info_test.go b/vendor/github.com/go-openapi/spec/contact_info_test.go new file mode 100644 index 000000000..5e644d0f0 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/contact_info_test.go @@ -0,0 +1,37 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "testing" +) + +var contactInfoJSON = `{"name":"wordnik api team","url":"http://developer.wordnik.com","email":"some@mailayada.dkdkd"}` +var contactInfoYAML = `name: wordnik api team +url: http://developer.wordnik.com +email: some@mailayada.dkdkd +` +var contactInfo = ContactInfo{ + Name: "wordnik api team", + URL: "http://developer.wordnik.com", + Email: "some@mailayada.dkdkd", +} + +func TestIntegrationContactInfo(t *testing.T) { + assertSerializeJSON(t, contactInfo, contactInfoJSON) + assertSerializeYAML(t, contactInfo, contactInfoYAML) + assertParsesJSON(t, contactInfoJSON, contactInfo) + assertParsesYAML(t, contactInfoYAML, contactInfo) +} diff --git a/vendor/github.com/go-openapi/spec/expander.go b/vendor/github.com/go-openapi/spec/expander.go index eb1490b05..b4429a21c 100644 --- a/vendor/github.com/go-openapi/spec/expander.go +++ b/vendor/github.com/go-openapi/spec/expander.go @@ -17,7 +17,10 @@ package spec import ( "encoding/json" "fmt" + "log" "net/url" + "os" + "path/filepath" "reflect" "strings" "sync" @@ -26,6 +29,18 @@ import ( "github.com/go-openapi/swag" ) +var ( + // Debug enables logging when SWAGGER_DEBUG env var is not empty + Debug = os.Getenv("SWAGGER_DEBUG") != "" +) + +// ExpandOptions provides options for expand. +type ExpandOptions struct { + RelativeBase string + SkipSchemas bool + ContinueOnError bool +} + // ResolutionCache a cache for resolving urls type ResolutionCache interface { Get(string) (interface{}, bool) @@ -37,7 +52,11 @@ type simpleCache struct { store map[string]interface{} } -var resCache = initResolutionCache() +var resCache ResolutionCache + +func init() { + resCache = initResolutionCache() +} func initResolutionCache() ResolutionCache { return &simpleCache{store: map[string]interface{}{ @@ -47,8 +66,11 @@ func initResolutionCache() ResolutionCache { } func (s *simpleCache) Get(uri string) (interface{}, bool) { + debugLog("getting %q from resolution cache", uri) s.lock.Lock() v, ok := s.store[uri] + debugLog("got %q from resolution cache: %t", uri, ok) + s.lock.Unlock() return v, ok } @@ -59,9 +81,9 @@ func (s *simpleCache) Set(uri string, data interface{}) { s.lock.Unlock() } -// ResolveRef resolves a reference against a context root -func ResolveRef(root interface{}, ref *Ref) (*Schema, error) { - resolver, err := defaultSchemaLoader(root, nil, nil) +// ResolveRefWithBase resolves a reference against a context root with preservation of base path +func ResolveRefWithBase(root interface{}, ref *Ref, opts *ExpandOptions) (*Schema, error) { + resolver, err := defaultSchemaLoader(root, nil, opts, nil) if err != nil { return nil, err } @@ -73,9 +95,19 @@ func ResolveRef(root interface{}, ref *Ref) (*Schema, error) { return result, nil } +// ResolveRef resolves a reference against a context root +func ResolveRef(root interface{}, ref *Ref) (*Schema, error) { + return ResolveRefWithBase(root, ref, nil) +} + // ResolveParameter resolves a paramter reference against a context root func ResolveParameter(root interface{}, ref Ref) (*Parameter, error) { - resolver, err := defaultSchemaLoader(root, nil, nil) + return ResolveParameterWithBase(root, ref, nil) +} + +// ResolveParameterWithBase resolves a paramter reference against a context root and base path +func ResolveParameterWithBase(root interface{}, ref Ref, opts *ExpandOptions) (*Parameter, error) { + resolver, err := defaultSchemaLoader(root, nil, opts, nil) if err != nil { return nil, err } @@ -89,7 +121,12 @@ func ResolveParameter(root interface{}, ref Ref) (*Parameter, error) { // ResolveResponse resolves response a reference against a context root func ResolveResponse(root interface{}, ref Ref) (*Response, error) { - resolver, err := defaultSchemaLoader(root, nil, nil) + return ResolveResponseWithBase(root, ref, nil) +} + +// ResolveResponseWithBase resolves response a reference against a context root and base path +func ResolveResponseWithBase(root interface{}, ref Ref, opts *ExpandOptions) (*Response, error) { + resolver, err := defaultSchemaLoader(root, nil, opts, nil) if err != nil { return nil, err } @@ -101,23 +138,72 @@ func ResolveResponse(root interface{}, ref Ref) (*Response, error) { return result, nil } +// ResolveItems resolves header and parameter items reference against a context root and base path +func ResolveItems(root interface{}, ref Ref, opts *ExpandOptions) (*Items, error) { + resolver, err := defaultSchemaLoader(root, nil, opts, nil) + if err != nil { + return nil, err + } + + result := new(Items) + if err := resolver.Resolve(&ref, result); err != nil { + return nil, err + } + return result, nil +} + +// ResolvePathItem resolves response a path item against a context root and base path +func ResolvePathItem(root interface{}, ref Ref, opts *ExpandOptions) (*PathItem, error) { + resolver, err := defaultSchemaLoader(root, nil, opts, nil) + if err != nil { + return nil, err + } + + result := new(PathItem) + if err := resolver.Resolve(&ref, result); err != nil { + return nil, err + } + return result, nil +} + type schemaLoader struct { loadingRef *Ref startingRef *Ref currentRef *Ref root interface{} + options *ExpandOptions cache ResolutionCache loadDoc func(string) (json.RawMessage, error) } var idPtr, _ = jsonpointer.New("/id") -var schemaPtr, _ = jsonpointer.New("/$schema") var refPtr, _ = jsonpointer.New("/$ref") -func defaultSchemaLoader(root interface{}, ref *Ref, cache ResolutionCache) (*schemaLoader, error) { +// PathLoader function to use when loading remote refs +var PathLoader func(string) (json.RawMessage, error) + +func init() { + PathLoader = func(path string) (json.RawMessage, error) { + data, err := swag.LoadFromFileOrHTTP(path) + if err != nil { + return nil, err + } + return json.RawMessage(data), nil + } +} + +func defaultSchemaLoader( + root interface{}, + ref *Ref, + expandOptions *ExpandOptions, + cache ResolutionCache) (*schemaLoader, error) { + if cache == nil { cache = resCache } + if expandOptions == nil { + expandOptions = &ExpandOptions{} + } var ptr *jsonpointer.Pointer if ref != nil { @@ -127,18 +213,16 @@ func defaultSchemaLoader(root interface{}, ref *Ref, cache ResolutionCache) (*sc currentRef := nextRef(root, ref, ptr) return &schemaLoader{ - root: root, loadingRef: ref, startingRef: ref, + currentRef: currentRef, + root: root, + options: expandOptions, cache: cache, loadDoc: func(path string) (json.RawMessage, error) { - data, err := swag.LoadFromFileOrHTTP(path) - if err != nil { - return nil, err - } - return json.RawMessage(data), nil + debugLog("fetching document at %q", path) + return PathLoader(path) }, - currentRef: currentRef, }, nil } @@ -159,6 +243,7 @@ func nextRef(startingNode interface{}, startingRef *Ref, ptr *jsonpointer.Pointe if startingRef == nil { return nil } + if ptr == nil { return startingRef } @@ -184,32 +269,111 @@ func nextRef(startingNode interface{}, startingRef *Ref, ptr *jsonpointer.Pointe refRef, _, _ := refPtr.Get(node) if refRef != nil { - rf, _ := NewRef(refRef.(string)) + var rf Ref + switch value := refRef.(type) { + case string: + rf, _ = NewRef(value) + } nw, err := ret.Inherits(rf) if err != nil { break } + nwURL := nw.GetURL() + if nwURL.Scheme == "file" || (nwURL.Scheme == "" && nwURL.Host == "") { + nwpt := filepath.ToSlash(nwURL.Path) + if filepath.IsAbs(nwpt) { + _, err := os.Stat(nwpt) + if err != nil { + nwURL.Path = filepath.Join(".", nwpt) + } + } + } + ret = nw } } + return ret } +func debugLog(msg string, args ...interface{}) { + if Debug { + log.Printf(msg, args...) + } +} + +func normalizeFileRef(ref *Ref, relativeBase string) *Ref { + refURL := ref.GetURL() + debugLog("normalizing %s against %s (%s)", ref.String(), relativeBase, refURL.String()) + if strings.HasPrefix(refURL.String(), "#") { + return ref + } + + if refURL.Scheme == "file" || (refURL.Scheme == "" && refURL.Host == "") { + filePath := refURL.Path + debugLog("normalizing file path: %s", filePath) + + if !filepath.IsAbs(filepath.FromSlash(filePath)) && len(relativeBase) != 0 { + debugLog("joining %s with %s", relativeBase, filePath) + if fi, err := os.Stat(filepath.FromSlash(relativeBase)); err == nil { + if !fi.IsDir() { + relativeBase = filepath.Dir(filepath.FromSlash(relativeBase)) + } + } + filePath = filepath.Join(filepath.FromSlash(relativeBase), filepath.FromSlash(filePath)) + } + if !filepath.IsAbs(filepath.FromSlash(filePath)) { + pwd, err := os.Getwd() + if err == nil { + debugLog("joining cwd %s with %s", pwd, filePath) + filePath = filepath.Join(pwd, filepath.FromSlash(filePath)) + } + } + + debugLog("cleaning %s", filePath) + filePath = filepath.Clean(filepath.FromSlash(filePath)) + _, err := os.Stat(filepath.FromSlash(filePath)) + if err == nil { + debugLog("rewriting url %s to scheme \"\" path %s", refURL.String(), filePath) + slp := filepath.FromSlash(filePath) + if filepath.IsAbs(slp) && filepath.Separator == '\\' && len(slp) > 1 && slp[1] == ':' && ('a' <= slp[0] && slp[0] <= 'z' || 'A' <= slp[0] && slp[0] <= 'Z') { + slp = slp[2:] + } + refURL.Scheme = "" + refURL.Path = filepath.ToSlash(slp) + debugLog("new url with joined filepath: %s", refURL.String()) + *ref = MustCreateRef(refURL.String()) + } + } + + debugLog("refurl: %s", ref.GetURL().String()) + return ref +} + func (r *schemaLoader) resolveRef(currentRef, ref *Ref, node, target interface{}) error { + tgt := reflect.ValueOf(target) if tgt.Kind() != reflect.Ptr { return fmt.Errorf("resolve ref: target needs to be a pointer") } oldRef := currentRef + if currentRef != nil { + debugLog("resolve ref current %s new %s", currentRef.String(), ref.String()) + nextRef := nextRef(node, ref, currentRef.GetPointer()) + if nextRef == nil || nextRef.GetURL() == nil { + return nil + } var err error - currentRef, err = currentRef.Inherits(*nextRef(node, ref, currentRef.GetPointer())) + currentRef, err = currentRef.Inherits(*nextRef) + debugLog("resolved ref current %s", currentRef.String()) if err != nil { return err } } + if currentRef == nil { currentRef = ref } @@ -245,42 +409,71 @@ func (r *schemaLoader) resolveRef(currentRef, ref *Ref, node, target interface{} return nil } - if refURL.Scheme != "" && refURL.Host != "" { - // most definitely take the red pill - data, _, _, err := r.load(refURL) + relativeBase := "" + if r.options != nil && r.options.RelativeBase != "" { + relativeBase = r.options.RelativeBase + } + normalizeFileRef(currentRef, relativeBase) + debugLog("current ref normalized file: %s", currentRef.String()) + normalizeFileRef(ref, relativeBase) + debugLog("ref normalized file: %s", currentRef.String()) + + data, _, _, err := r.load(currentRef.GetURL()) + if err != nil { + return err + } + + if ((oldRef == nil && currentRef != nil) || + (oldRef != nil && currentRef == nil) || + oldRef.String() != currentRef.String()) && + ((oldRef == nil && ref != nil) || + (oldRef != nil && ref == nil) || + (oldRef.String() != ref.String())) { + + return r.resolveRef(currentRef, ref, data, target) + } + + var res interface{} + if currentRef.String() != "" { + res, _, err = currentRef.GetPointer().Get(data) if err != nil { - return err - } + if strings.HasPrefix(ref.String(), "#") { + if r.loadingRef != nil { + rr, er := r.loadingRef.Inherits(*ref) + if er != nil { + return er + } + refURL = rr.GetURL() - if ((oldRef == nil && currentRef != nil) || - (oldRef != nil && currentRef == nil) || - oldRef.String() != currentRef.String()) && - ((oldRef == nil && ref != nil) || - (oldRef != nil && ref == nil) || - (oldRef.String() != ref.String())) { + data, _, _, err = r.load(refURL) + if err != nil { + return err + } + } else { + data = r.root + } + } - return r.resolveRef(currentRef, ref, data, target) - } - - var res interface{} - if currentRef.String() != "" { - res, _, err = currentRef.GetPointer().Get(data) + res, _, err = ref.GetPointer().Get(data) if err != nil { return err } - } else { - res = data } - - if err := swag.DynamicJSONToStruct(res, target); err != nil { - return err - } - + } else { + res = data } + + if err := swag.DynamicJSONToStruct(res, target); err != nil { + return err + } + + r.currentRef = currentRef + return nil } func (r *schemaLoader) load(refURL *url.URL) (interface{}, url.URL, bool, error) { + debugLog("loading schema from url: %s", refURL) toFetch := *refURL toFetch.Fragment = "" @@ -299,44 +492,51 @@ func (r *schemaLoader) load(refURL *url.URL) (interface{}, url.URL, bool, error) return data, toFetch, fromCache, nil } -func (r *schemaLoader) Resolve(ref *Ref, target interface{}) error { - if err := r.resolveRef(r.currentRef, ref, r.root, target); err != nil { - return err - } - return nil +func (r *schemaLoader) Resolve(ref *Ref, target interface{}) error { + return r.resolveRef(r.currentRef, ref, r.root, target) } -type specExpander struct { - spec *Swagger - resolver *schemaLoader +func (r *schemaLoader) reset() { + ref := r.startingRef + + var ptr *jsonpointer.Pointer + if ref != nil { + ptr = ref.GetPointer() + } + + r.currentRef = nextRef(r.root, ref, ptr) } // ExpandSpec expands the references in a swagger spec -func ExpandSpec(spec *Swagger) error { - resolver, err := defaultSchemaLoader(spec, nil, nil) - if err != nil { +func ExpandSpec(spec *Swagger, options *ExpandOptions) error { + resolver, err := defaultSchemaLoader(spec, nil, options, nil) + // Just in case this ever returns an error. + if shouldStopOnError(err, resolver.options) { return err } - for key, defintition := range spec.Definitions { - var def *Schema - var err error - if def, err = expandSchema(defintition, []string{"#/definitions/" + key}, resolver); err != nil { - return err + if options == nil || !options.SkipSchemas { + for key, definition := range spec.Definitions { + var def *Schema + var err error + if def, err = expandSchema(definition, []string{"#/definitions/" + key}, resolver); shouldStopOnError(err, resolver.options) { + return err + } + resolver.reset() + spec.Definitions[key] = *def } - spec.Definitions[key] = *def } for key, parameter := range spec.Parameters { - if err := expandParameter(¶meter, resolver); err != nil { + if err := expandParameter(¶meter, resolver); shouldStopOnError(err, resolver.options) { return err } spec.Parameters[key] = parameter } for key, response := range spec.Responses { - if err := expandResponse(&response, resolver); err != nil { + if err := expandResponse(&response, resolver); shouldStopOnError(err, resolver.options) { return err } spec.Responses[key] = response @@ -344,7 +544,7 @@ func ExpandSpec(spec *Swagger) error { if spec.Paths != nil { for key, path := range spec.Paths.Paths { - if err := expandPathItem(&path, resolver); err != nil { + if err := expandPathItem(&path, resolver); shouldStopOnError(err, resolver.options) { return err } spec.Paths.Paths[key] = path @@ -354,9 +554,25 @@ func ExpandSpec(spec *Swagger) error { return nil } +func shouldStopOnError(err error, opts *ExpandOptions) bool { + if err != nil && !opts.ContinueOnError { + return true + } + + if err != nil { + log.Println(err) + } + + return false +} + // ExpandSchema expands the refs in the schema object func ExpandSchema(schema *Schema, root interface{}, cache ResolutionCache) error { + return ExpandSchemaWithBasePath(schema, root, cache, nil) +} +// ExpandSchemaWithBasePath expands the refs in the schema object, base path configured through expand options +func ExpandSchemaWithBasePath(schema *Schema, root interface{}, cache ResolutionCache, opts *ExpandOptions) error { if schema == nil { return nil } @@ -367,18 +583,17 @@ func ExpandSchema(schema *Schema, root interface{}, cache ResolutionCache) error nrr, _ := NewRef(schema.ID) var rrr *Ref if nrr.String() != "" { - switch root.(type) { + switch rt := root.(type) { case *Schema: - rid, _ := NewRef(root.(*Schema).ID) + rid, _ := NewRef(rt.ID) rrr, _ = rid.Inherits(nrr) case *Swagger: - rid, _ := NewRef(root.(*Swagger).ID) + rid, _ := NewRef(rt.ID) rrr, _ = rid.Inherits(nrr) } - } - resolver, err := defaultSchemaLoader(root, rrr, cache) + resolver, err := defaultSchemaLoader(root, rrr, opts, cache) if err != nil { return err } @@ -389,7 +604,7 @@ func ExpandSchema(schema *Schema, root interface{}, cache ResolutionCache) error } var s *Schema if s, err = expandSchema(*schema, refs, resolver); err != nil { - return nil + return err } *schema = *s return nil @@ -400,7 +615,15 @@ func expandItems(target Schema, parentRefs []string, resolver *schemaLoader) (*S if target.Items.Schema != nil { t, err := expandSchema(*target.Items.Schema, parentRefs, resolver) if err != nil { - return nil, err + if target.Items.Schema.ID == "" { + target.Items.Schema.ID = target.ID + if err != nil { + t, err = expandSchema(*target.Items.Schema, parentRefs, resolver) + if err != nil { + return nil, err + } + } + } } *target.Items.Schema = *t } @@ -415,137 +638,173 @@ func expandItems(target Schema, parentRefs []string, resolver *schemaLoader) (*S return &target, nil } -func expandSchema(target Schema, parentRefs []string, resolver *schemaLoader) (schema *Schema, err error) { - defer func() { - schema = &target - }() +func expandSchema(target Schema, parentRefs []string, resolver *schemaLoader) (*Schema, error) { if target.Ref.String() == "" && target.Ref.IsRoot() { - target = *resolver.root.(*Schema) - return + debugLog("skipping expand schema for no ref and root: %v", resolver.root) + + return resolver.root.(*Schema), nil } // t is the new expanded schema var t *Schema + for target.Ref.String() != "" { - // var newTarget Schema - pRefs := strings.Join(parentRefs, ",") - pRefs += "," - if strings.Contains(pRefs, target.Ref.String()+",") { - err = nil - return + if swag.ContainsStringsCI(parentRefs, target.Ref.String()) { + return &target, nil } - if err = resolver.Resolve(&target.Ref, &t); err != nil { - return + if err := resolver.Resolve(&target.Ref, &t); shouldStopOnError(err, resolver.options) { + return &target, err + } + + if swag.ContainsStringsCI(parentRefs, target.Ref.String()) { + debugLog("ref already exists in parent") + return &target, nil } parentRefs = append(parentRefs, target.Ref.String()) + if t != nil { + target = *t + } + } + + t, err := expandItems(target, parentRefs, resolver) + if shouldStopOnError(err, resolver.options) { + return &target, err + } + if t != nil { target = *t } - if t, err = expandItems(target, parentRefs, resolver); err != nil { - return - } - target = *t - for i := range target.AllOf { - if t, err = expandSchema(target.AllOf[i], parentRefs, resolver); err != nil { - return + t, err := expandSchema(target.AllOf[i], parentRefs, resolver) + if shouldStopOnError(err, resolver.options) { + return &target, err + } + if t != nil { + target.AllOf[i] = *t } - target.AllOf[i] = *t } for i := range target.AnyOf { - if t, err = expandSchema(target.AnyOf[i], parentRefs, resolver); err != nil { - return + t, err := expandSchema(target.AnyOf[i], parentRefs, resolver) + if shouldStopOnError(err, resolver.options) { + return &target, err } target.AnyOf[i] = *t } for i := range target.OneOf { - if t, err = expandSchema(target.OneOf[i], parentRefs, resolver); err != nil { - return + t, err := expandSchema(target.OneOf[i], parentRefs, resolver) + if shouldStopOnError(err, resolver.options) { + return &target, err + } + if t != nil { + target.OneOf[i] = *t } - target.OneOf[i] = *t } if target.Not != nil { - if t, err = expandSchema(*target.Not, parentRefs, resolver); err != nil { - return + t, err := expandSchema(*target.Not, parentRefs, resolver) + if shouldStopOnError(err, resolver.options) { + return &target, err + } + if t != nil { + *target.Not = *t } - *target.Not = *t } - for k, _ := range target.Properties { - if t, err = expandSchema(target.Properties[k], parentRefs, resolver); err != nil { - return + for k := range target.Properties { + t, err := expandSchema(target.Properties[k], parentRefs, resolver) + if shouldStopOnError(err, resolver.options) { + return &target, err + } + if t != nil { + target.Properties[k] = *t } - target.Properties[k] = *t } if target.AdditionalProperties != nil && target.AdditionalProperties.Schema != nil { - if t, err = expandSchema(*target.AdditionalProperties.Schema, parentRefs, resolver); err != nil { - return + t, err := expandSchema(*target.AdditionalProperties.Schema, parentRefs, resolver) + if shouldStopOnError(err, resolver.options) { + return &target, err } - *target.AdditionalProperties.Schema = *t - } - for k, _ := range target.PatternProperties { - if t, err = expandSchema(target.PatternProperties[k], parentRefs, resolver); err != nil { - return + if t != nil { + *target.AdditionalProperties.Schema = *t } - target.PatternProperties[k] = *t } - for k, _ := range target.Dependencies { + for k := range target.PatternProperties { + t, err := expandSchema(target.PatternProperties[k], parentRefs, resolver) + if shouldStopOnError(err, resolver.options) { + return &target, err + } + if t != nil { + target.PatternProperties[k] = *t + } + } + for k := range target.Dependencies { if target.Dependencies[k].Schema != nil { - if t, err = expandSchema(*target.Dependencies[k].Schema, parentRefs, resolver); err != nil { - return + t, err := expandSchema(*target.Dependencies[k].Schema, parentRefs, resolver) + if shouldStopOnError(err, resolver.options) { + return &target, err + } + if t != nil { + *target.Dependencies[k].Schema = *t } - *target.Dependencies[k].Schema = *t } } if target.AdditionalItems != nil && target.AdditionalItems.Schema != nil { - if t, err = expandSchema(*target.AdditionalItems.Schema, parentRefs, resolver); err != nil { - return + t, err := expandSchema(*target.AdditionalItems.Schema, parentRefs, resolver) + if shouldStopOnError(err, resolver.options) { + return &target, err } - *target.AdditionalItems.Schema = *t - } - for k, _ := range target.Definitions { - if t, err = expandSchema(target.Definitions[k], parentRefs, resolver); err != nil { - return + if t != nil { + *target.AdditionalItems.Schema = *t } - target.Definitions[k] = *t } - return + for k := range target.Definitions { + t, err := expandSchema(target.Definitions[k], parentRefs, resolver) + if shouldStopOnError(err, resolver.options) { + return &target, err + } + if t != nil { + target.Definitions[k] = *t + } + } + return &target, nil } func expandPathItem(pathItem *PathItem, resolver *schemaLoader) error { if pathItem == nil { return nil } + if pathItem.Ref.String() != "" { if err := resolver.Resolve(&pathItem.Ref, &pathItem); err != nil { return err } + resolver.reset() + pathItem.Ref = Ref{} } for idx := range pathItem.Parameters { - if err := expandParameter(&(pathItem.Parameters[idx]), resolver); err != nil { + if err := expandParameter(&(pathItem.Parameters[idx]), resolver); shouldStopOnError(err, resolver.options) { return err } } - if err := expandOperation(pathItem.Get, resolver); err != nil { + if err := expandOperation(pathItem.Get, resolver); shouldStopOnError(err, resolver.options) { return err } - if err := expandOperation(pathItem.Head, resolver); err != nil { + if err := expandOperation(pathItem.Head, resolver); shouldStopOnError(err, resolver.options) { return err } - if err := expandOperation(pathItem.Options, resolver); err != nil { + if err := expandOperation(pathItem.Options, resolver); shouldStopOnError(err, resolver.options) { return err } - if err := expandOperation(pathItem.Put, resolver); err != nil { + if err := expandOperation(pathItem.Put, resolver); shouldStopOnError(err, resolver.options) { return err } - if err := expandOperation(pathItem.Post, resolver); err != nil { + if err := expandOperation(pathItem.Post, resolver); shouldStopOnError(err, resolver.options) { return err } - if err := expandOperation(pathItem.Patch, resolver); err != nil { + if err := expandOperation(pathItem.Patch, resolver); shouldStopOnError(err, resolver.options) { return err } - if err := expandOperation(pathItem.Delete, resolver); err != nil { + if err := expandOperation(pathItem.Delete, resolver); shouldStopOnError(err, resolver.options) { return err } return nil @@ -555,8 +814,9 @@ func expandOperation(op *Operation, resolver *schemaLoader) error { if op == nil { return nil } + for i, param := range op.Parameters { - if err := expandParameter(¶m, resolver); err != nil { + if err := expandParameter(¶m, resolver); shouldStopOnError(err, resolver.options) { return err } op.Parameters[i] = param @@ -564,11 +824,11 @@ func expandOperation(op *Operation, resolver *schemaLoader) error { if op.Responses != nil { responses := op.Responses - if err := expandResponse(responses.Default, resolver); err != nil { + if err := expandResponse(responses.Default, resolver); shouldStopOnError(err, resolver.options) { return err } for code, response := range responses.StatusCodeResponses { - if err := expandResponse(&response, resolver); err != nil { + if err := expandResponse(&response, resolver); shouldStopOnError(err, resolver.options) { return err } responses.StatusCodeResponses[code] = response @@ -582,22 +842,29 @@ func expandResponse(response *Response, resolver *schemaLoader) error { return nil } + var parentRefs []string + if response.Ref.String() != "" { - if err := resolver.Resolve(&response.Ref, response); err != nil { + parentRefs = append(parentRefs, response.Ref.String()) + if err := resolver.Resolve(&response.Ref, response); shouldStopOnError(err, resolver.options) { return err } + resolver.reset() + response.Ref = Ref{} } - if response.Schema != nil { - parentRefs := []string{response.Schema.Ref.String()} - if err := resolver.Resolve(&response.Schema.Ref, &response.Schema); err != nil { + if !resolver.options.SkipSchemas && response.Schema != nil { + parentRefs = append(parentRefs, response.Schema.Ref.String()) + debugLog("response ref: %s", response.Schema.Ref) + if err := resolver.Resolve(&response.Schema.Ref, &response.Schema); shouldStopOnError(err, resolver.options) { return err } - if s, err := expandSchema(*response.Schema, parentRefs, resolver); err != nil { + s, err := expandSchema(*response.Schema, parentRefs, resolver) + if shouldStopOnError(err, resolver.options) { return err - } else { - *response.Schema = *s } + resolver.reset() + *response.Schema = *s } return nil } @@ -606,21 +873,28 @@ func expandParameter(parameter *Parameter, resolver *schemaLoader) error { if parameter == nil { return nil } + + var parentRefs []string + if parameter.Ref.String() != "" { - if err := resolver.Resolve(¶meter.Ref, parameter); err != nil { + parentRefs = append(parentRefs, parameter.Ref.String()) + if err := resolver.Resolve(¶meter.Ref, parameter); shouldStopOnError(err, resolver.options) { return err } + resolver.reset() + parameter.Ref = Ref{} } - if parameter.Schema != nil { - parentRefs := []string{parameter.Schema.Ref.String()} - if err := resolver.Resolve(¶meter.Schema.Ref, ¶meter.Schema); err != nil { + if !resolver.options.SkipSchemas && parameter.Schema != nil { + parentRefs = append(parentRefs, parameter.Schema.Ref.String()) + if err := resolver.Resolve(¶meter.Schema.Ref, ¶meter.Schema); shouldStopOnError(err, resolver.options) { return err } - if s, err := expandSchema(*parameter.Schema, parentRefs, resolver); err != nil { + s, err := expandSchema(*parameter.Schema, parentRefs, resolver) + if shouldStopOnError(err, resolver.options) { return err - } else { - *parameter.Schema = *s } + resolver.reset() + *parameter.Schema = *s } return nil } diff --git a/vendor/github.com/go-openapi/spec/expander_test.go b/vendor/github.com/go-openapi/spec/expander_test.go new file mode 100644 index 000000000..09c8573cf --- /dev/null +++ b/vendor/github.com/go-openapi/spec/expander_test.go @@ -0,0 +1,1162 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "encoding/json" + "io/ioutil" + "net/http" + "net/http/httptest" + "testing" + + "github.com/go-openapi/jsonpointer" + "github.com/go-openapi/swag" + "github.com/stretchr/testify/assert" +) + +func jsonDoc(path string) (json.RawMessage, error) { + data, err := swag.LoadFromFileOrHTTP(path) + if err != nil { + return nil, err + } + return json.RawMessage(data), nil +} + +func TestExpandsKnownRef(t *testing.T) { + schema := RefProperty("http://json-schema.org/draft-04/schema#") + if assert.NoError(t, ExpandSchema(schema, nil, nil)) { + assert.Equal(t, "Core schema meta-schema", schema.Description) + } +} + +func TestExpandResponseSchema(t *testing.T) { + fp := "./fixtures/local_expansion/spec.json" + b, err := jsonDoc(fp) + if assert.NoError(t, err) { + var spec Swagger + if err := json.Unmarshal(b, &spec); assert.NoError(t, err) { + err := ExpandSpec(&spec, &ExpandOptions{RelativeBase: fp}) + if assert.NoError(t, err) { + sch := spec.Paths.Paths["/item"].Get.Responses.StatusCodeResponses[200].Schema + if assert.NotNil(t, sch) { + assert.Empty(t, sch.Ref.String()) + assert.Contains(t, sch.Type, "object") + assert.Len(t, sch.Properties, 2) + } + } + } + } +} + +func TestSpecExpansion(t *testing.T) { + spec := new(Swagger) + // resolver, err := defaultSchemaLoader(spec, nil, nil) + // assert.NoError(t, err) + + err := ExpandSpec(spec, nil) + assert.NoError(t, err) + + specDoc, err := jsonDoc("fixtures/expansion/all-the-things.json") + assert.NoError(t, err) + + spec = new(Swagger) + err = json.Unmarshal(specDoc, spec) + assert.NoError(t, err) + + pet := spec.Definitions["pet"] + errorModel := spec.Definitions["errorModel"] + petResponse := spec.Responses["petResponse"] + petResponse.Schema = &pet + stringResponse := spec.Responses["stringResponse"] + tagParam := spec.Parameters["tag"] + idParam := spec.Parameters["idParam"] + + err = ExpandSpec(spec, nil) + assert.NoError(t, err) + + assert.Equal(t, tagParam, spec.Parameters["query"]) + assert.Equal(t, petResponse, spec.Responses["petResponse"]) + assert.Equal(t, petResponse, spec.Responses["anotherPet"]) + assert.Equal(t, pet, *spec.Responses["petResponse"].Schema) + assert.Equal(t, stringResponse, *spec.Paths.Paths["/"].Get.Responses.Default) + assert.Equal(t, petResponse, spec.Paths.Paths["/"].Get.Responses.StatusCodeResponses[200]) + assert.Equal(t, pet, *spec.Paths.Paths["/pets"].Get.Responses.StatusCodeResponses[200].Schema.Items.Schema) + assert.Equal(t, errorModel, *spec.Paths.Paths["/pets"].Get.Responses.Default.Schema) + assert.Equal(t, pet, spec.Definitions["petInput"].AllOf[0]) + assert.Equal(t, spec.Definitions["petInput"], *spec.Paths.Paths["/pets"].Post.Parameters[0].Schema) + assert.Equal(t, petResponse, spec.Paths.Paths["/pets"].Post.Responses.StatusCodeResponses[200]) + assert.Equal(t, errorModel, *spec.Paths.Paths["/pets"].Post.Responses.Default.Schema) + pi := spec.Paths.Paths["/pets/{id}"] + assert.Equal(t, idParam, pi.Get.Parameters[0]) + assert.Equal(t, petResponse, pi.Get.Responses.StatusCodeResponses[200]) + assert.Equal(t, errorModel, *pi.Get.Responses.Default.Schema) + assert.Equal(t, idParam, pi.Delete.Parameters[0]) + assert.Equal(t, errorModel, *pi.Delete.Responses.Default.Schema) +} + +func TestResponseExpansion(t *testing.T) { + specDoc, err := jsonDoc("fixtures/expansion/all-the-things.json") + assert.NoError(t, err) + + spec := new(Swagger) + err = json.Unmarshal(specDoc, spec) + assert.NoError(t, err) + + resolver, err := defaultSchemaLoader(spec, nil, nil, nil) + assert.NoError(t, err) + + resp := spec.Responses["anotherPet"] + expected := spec.Responses["petResponse"] + + err = expandResponse(&resp, resolver) + assert.NoError(t, err) + assert.Equal(t, expected, resp) + + resp2 := spec.Paths.Paths["/"].Get.Responses.Default + expected = spec.Responses["stringResponse"] + + err = expandResponse(resp2, resolver) + assert.NoError(t, err) + assert.Equal(t, expected, *resp2) + + resp = spec.Paths.Paths["/"].Get.Responses.StatusCodeResponses[200] + expected = spec.Responses["petResponse"] + + err = expandResponse(&resp, resolver) + assert.NoError(t, err) + // assert.Equal(t, expected, resp) +} + +func TestIssue3(t *testing.T) { + spec := new(Swagger) + specDoc, err := jsonDoc("fixtures/expansion/overflow.json") + assert.NoError(t, err) + + err = json.Unmarshal(specDoc, spec) + assert.NoError(t, err) + + assert.NotPanics(t, func() { + err = ExpandSpec(spec, nil) + assert.NoError(t, err) + }, "Calling expand spec with circular refs, should not panic!") +} + +func TestParameterExpansion(t *testing.T) { + paramDoc, err := jsonDoc("fixtures/expansion/params.json") + assert.NoError(t, err) + + spec := new(Swagger) + err = json.Unmarshal(paramDoc, spec) + assert.NoError(t, err) + + resolver, err := defaultSchemaLoader(spec, nil, nil, nil) + assert.NoError(t, err) + + param := spec.Parameters["query"] + expected := spec.Parameters["tag"] + + err = expandParameter(¶m, resolver) + assert.NoError(t, err) + assert.Equal(t, expected, param) + + param = spec.Paths.Paths["/cars/{id}"].Parameters[0] + expected = spec.Parameters["id"] + + err = expandParameter(¶m, resolver) + assert.NoError(t, err) + assert.Equal(t, expected, param) +} + +func TestCircularRefsExpansion(t *testing.T) { + carsDoc, err := jsonDoc("fixtures/expansion/circularRefs.json") + assert.NoError(t, err) + + spec := new(Swagger) + err = json.Unmarshal(carsDoc, spec) + assert.NoError(t, err) + + resolver, err := defaultSchemaLoader(spec, nil, nil, nil) + assert.NoError(t, err) + schema := spec.Definitions["car"] + + assert.NotPanics(t, func() { + _, err = expandSchema(schema, []string{"#/definitions/car"}, resolver) + assert.NoError(t, err) + }, "Calling expand schema with circular refs, should not panic!") +} + +func TestContinueOnErrorExpansion(t *testing.T) { + missingRefDoc, err := jsonDoc("fixtures/expansion/missingRef.json") + assert.NoError(t, err) + + testCase := struct { + Input *Swagger `json:"input"` + Expected *Swagger `json:"expected"` + }{} + err = json.Unmarshal(missingRefDoc, &testCase) + assert.NoError(t, err) + + opts := &ExpandOptions{ + ContinueOnError: true, + } + err = ExpandSpec(testCase.Input, opts) + assert.NoError(t, err) + assert.Equal(t, testCase.Input, testCase.Expected, "Should continue expanding spec when a definition can't be found.") + + doc, err := jsonDoc("fixtures/expansion/missingItemRef.json") + spec := new(Swagger) + err = json.Unmarshal(doc, spec) + assert.NoError(t, err) + + assert.NotPanics(t, func() { + err = ExpandSpec(spec, opts) + assert.NoError(t, err) + }, "Array of missing refs should not cause a panic, and continue to expand spec.") +} + +func TestIssue415(t *testing.T) { + doc, err := jsonDoc("fixtures/expansion/clickmeter.json") + assert.NoError(t, err) + + spec := new(Swagger) + err = json.Unmarshal(doc, spec) + assert.NoError(t, err) + + assert.NotPanics(t, func() { + err = ExpandSpec(spec, nil) + assert.NoError(t, err) + }, "Calling expand spec with response schemas that have circular refs, should not panic!") +} + +func TestCircularSpecExpansion(t *testing.T) { + doc, err := jsonDoc("fixtures/expansion/circularSpec.json") + assert.NoError(t, err) + + spec := new(Swagger) + err = json.Unmarshal(doc, spec) + assert.NoError(t, err) + + assert.NotPanics(t, func() { + err = ExpandSpec(spec, nil) + assert.NoError(t, err) + }, "Calling expand spec with circular refs, should not panic!") +} + +func TestItemsExpansion(t *testing.T) { + carsDoc, err := jsonDoc("fixtures/expansion/schemas2.json") + assert.NoError(t, err) + + spec := new(Swagger) + err = json.Unmarshal(carsDoc, spec) + assert.NoError(t, err) + + resolver, err := defaultSchemaLoader(spec, nil, nil, nil) + assert.NoError(t, err) + + schema := spec.Definitions["car"] + oldBrand := schema.Properties["brand"] + assert.NotEmpty(t, oldBrand.Items.Schema.Ref.String()) + assert.NotEqual(t, spec.Definitions["brand"], oldBrand) + + _, err = expandSchema(schema, []string{"#/definitions/car"}, resolver) + assert.NoError(t, err) + + newBrand := schema.Properties["brand"] + assert.Empty(t, newBrand.Items.Schema.Ref.String()) + assert.Equal(t, spec.Definitions["brand"], *newBrand.Items.Schema) + + schema = spec.Definitions["truck"] + assert.NotEmpty(t, schema.Items.Schema.Ref.String()) + + s, err := expandSchema(schema, []string{"#/definitions/truck"}, resolver) + schema = *s + assert.NoError(t, err) + assert.Empty(t, schema.Items.Schema.Ref.String()) + assert.Equal(t, spec.Definitions["car"], *schema.Items.Schema) + + sch := new(Schema) + _, err = expandSchema(*sch, []string{""}, resolver) + assert.NoError(t, err) + + schema = spec.Definitions["batch"] + s, err = expandSchema(schema, []string{"#/definitions/batch"}, resolver) + schema = *s + assert.NoError(t, err) + assert.Empty(t, schema.Items.Schema.Items.Schema.Ref.String()) + assert.Equal(t, *schema.Items.Schema.Items.Schema, spec.Definitions["brand"]) + + schema = spec.Definitions["batch2"] + s, err = expandSchema(schema, []string{"#/definitions/batch2"}, resolver) + schema = *s + assert.NoError(t, err) + assert.Empty(t, schema.Items.Schemas[0].Items.Schema.Ref.String()) + assert.Empty(t, schema.Items.Schemas[1].Items.Schema.Ref.String()) + assert.Equal(t, *schema.Items.Schemas[0].Items.Schema, spec.Definitions["brand"]) + assert.Equal(t, *schema.Items.Schemas[1].Items.Schema, spec.Definitions["tag"]) + + schema = spec.Definitions["allofBoth"] + s, err = expandSchema(schema, []string{"#/definitions/allofBoth"}, resolver) + schema = *s + assert.NoError(t, err) + assert.Empty(t, schema.AllOf[0].Items.Schema.Ref.String()) + assert.Empty(t, schema.AllOf[1].Items.Schema.Ref.String()) + assert.Equal(t, *schema.AllOf[0].Items.Schema, spec.Definitions["brand"]) + assert.Equal(t, *schema.AllOf[1].Items.Schema, spec.Definitions["tag"]) + + schema = spec.Definitions["anyofBoth"] + s, err = expandSchema(schema, []string{"#/definitions/anyofBoth"}, resolver) + schema = *s + assert.NoError(t, err) + assert.Empty(t, schema.AnyOf[0].Items.Schema.Ref.String()) + assert.Empty(t, schema.AnyOf[1].Items.Schema.Ref.String()) + assert.Equal(t, *schema.AnyOf[0].Items.Schema, spec.Definitions["brand"]) + assert.Equal(t, *schema.AnyOf[1].Items.Schema, spec.Definitions["tag"]) + + schema = spec.Definitions["oneofBoth"] + s, err = expandSchema(schema, []string{"#/definitions/oneofBoth"}, resolver) + schema = *s + assert.NoError(t, err) + assert.Empty(t, schema.OneOf[0].Items.Schema.Ref.String()) + assert.Empty(t, schema.OneOf[1].Items.Schema.Ref.String()) + assert.Equal(t, *schema.OneOf[0].Items.Schema, spec.Definitions["brand"]) + assert.Equal(t, *schema.OneOf[1].Items.Schema, spec.Definitions["tag"]) + + schema = spec.Definitions["notSomething"] + s, err = expandSchema(schema, []string{"#/definitions/notSomething"}, resolver) + schema = *s + assert.NoError(t, err) + assert.Empty(t, schema.Not.Items.Schema.Ref.String()) + assert.Equal(t, *schema.Not.Items.Schema, spec.Definitions["tag"]) + + schema = spec.Definitions["withAdditional"] + s, err = expandSchema(schema, []string{"#/definitions/withAdditional"}, resolver) + schema = *s + assert.NoError(t, err) + assert.Empty(t, schema.AdditionalProperties.Schema.Items.Schema.Ref.String()) + assert.Equal(t, *schema.AdditionalProperties.Schema.Items.Schema, spec.Definitions["tag"]) + + schema = spec.Definitions["withAdditionalItems"] + s, err = expandSchema(schema, []string{"#/definitions/withAdditionalItems"}, resolver) + schema = *s + assert.NoError(t, err) + assert.Empty(t, schema.AdditionalItems.Schema.Items.Schema.Ref.String()) + assert.Equal(t, *schema.AdditionalItems.Schema.Items.Schema, spec.Definitions["tag"]) + + schema = spec.Definitions["withPattern"] + s, err = expandSchema(schema, []string{"#/definitions/withPattern"}, resolver) + schema = *s + assert.NoError(t, err) + prop := schema.PatternProperties["^x-ab"] + assert.Empty(t, prop.Items.Schema.Ref.String()) + assert.Equal(t, *prop.Items.Schema, spec.Definitions["tag"]) + + schema = spec.Definitions["deps"] + s, err = expandSchema(schema, []string{"#/definitions/deps"}, resolver) + schema = *s + assert.NoError(t, err) + prop2 := schema.Dependencies["something"] + assert.Empty(t, prop2.Schema.Items.Schema.Ref.String()) + assert.Equal(t, *prop2.Schema.Items.Schema, spec.Definitions["tag"]) + + schema = spec.Definitions["defined"] + s, err = expandSchema(schema, []string{"#/definitions/defined"}, resolver) + schema = *s + assert.NoError(t, err) + prop = schema.Definitions["something"] + assert.Empty(t, prop.Items.Schema.Ref.String()) + assert.Equal(t, *prop.Items.Schema, spec.Definitions["tag"]) +} + +func TestSchemaExpansion(t *testing.T) { + carsDoc, err := jsonDoc("fixtures/expansion/schemas1.json") + assert.NoError(t, err) + + spec := new(Swagger) + err = json.Unmarshal(carsDoc, spec) + assert.NoError(t, err) + + resolver, err := defaultSchemaLoader(spec, nil, nil, nil) + assert.NoError(t, err) + + schema := spec.Definitions["car"] + oldBrand := schema.Properties["brand"] + assert.NotEmpty(t, oldBrand.Ref.String()) + assert.NotEqual(t, spec.Definitions["brand"], oldBrand) + + s, err := expandSchema(schema, []string{"#/definitions/car"}, resolver) + schema = *s + assert.NoError(t, err) + + newBrand := schema.Properties["brand"] + assert.Empty(t, newBrand.Ref.String()) + assert.Equal(t, spec.Definitions["brand"], newBrand) + + schema = spec.Definitions["truck"] + assert.NotEmpty(t, schema.Ref.String()) + + s, err = expandSchema(schema, []string{"#/definitions/truck"}, resolver) + schema = *s + assert.NoError(t, err) + assert.Empty(t, schema.Ref.String()) + assert.Equal(t, spec.Definitions["car"], schema) + + sch := new(Schema) + _, err = expandSchema(*sch, []string{""}, resolver) + assert.NoError(t, err) + + schema = spec.Definitions["batch"] + s, err = expandSchema(schema, []string{"#/definitions/batch"}, resolver) + schema = *s + assert.NoError(t, err) + assert.Empty(t, schema.Items.Schema.Ref.String()) + assert.Equal(t, *schema.Items.Schema, spec.Definitions["brand"]) + + schema = spec.Definitions["batch2"] + s, err = expandSchema(schema, []string{"#/definitions/batch2"}, resolver) + schema = *s + assert.NoError(t, err) + assert.Empty(t, schema.Items.Schemas[0].Ref.String()) + assert.Empty(t, schema.Items.Schemas[1].Ref.String()) + assert.Equal(t, schema.Items.Schemas[0], spec.Definitions["brand"]) + assert.Equal(t, schema.Items.Schemas[1], spec.Definitions["tag"]) + + schema = spec.Definitions["allofBoth"] + s, err = expandSchema(schema, []string{"#/definitions/allofBoth"}, resolver) + schema = *s + assert.NoError(t, err) + assert.Empty(t, schema.AllOf[0].Ref.String()) + assert.Empty(t, schema.AllOf[1].Ref.String()) + assert.Equal(t, schema.AllOf[0], spec.Definitions["brand"]) + assert.Equal(t, schema.AllOf[1], spec.Definitions["tag"]) + + schema = spec.Definitions["anyofBoth"] + s, err = expandSchema(schema, []string{"#/definitions/anyofBoth"}, resolver) + schema = *s + assert.NoError(t, err) + assert.Empty(t, schema.AnyOf[0].Ref.String()) + assert.Empty(t, schema.AnyOf[1].Ref.String()) + assert.Equal(t, schema.AnyOf[0], spec.Definitions["brand"]) + assert.Equal(t, schema.AnyOf[1], spec.Definitions["tag"]) + + schema = spec.Definitions["oneofBoth"] + s, err = expandSchema(schema, []string{"#/definitions/oneofBoth"}, resolver) + schema = *s + assert.NoError(t, err) + assert.Empty(t, schema.OneOf[0].Ref.String()) + assert.Empty(t, schema.OneOf[1].Ref.String()) + assert.Equal(t, schema.OneOf[0], spec.Definitions["brand"]) + assert.Equal(t, schema.OneOf[1], spec.Definitions["tag"]) + + schema = spec.Definitions["notSomething"] + s, err = expandSchema(schema, []string{"#/definitions/notSomething"}, resolver) + schema = *s + assert.NoError(t, err) + assert.Empty(t, schema.Not.Ref.String()) + assert.Equal(t, *schema.Not, spec.Definitions["tag"]) + + schema = spec.Definitions["withAdditional"] + s, err = expandSchema(schema, []string{"#/definitions/withAdditional"}, resolver) + schema = *s + assert.NoError(t, err) + assert.Empty(t, schema.AdditionalProperties.Schema.Ref.String()) + assert.Equal(t, *schema.AdditionalProperties.Schema, spec.Definitions["tag"]) + + schema = spec.Definitions["withAdditionalItems"] + s, err = expandSchema(schema, []string{"#/definitions/withAdditionalItems"}, resolver) + schema = *s + assert.NoError(t, err) + assert.Empty(t, schema.AdditionalItems.Schema.Ref.String()) + assert.Equal(t, *schema.AdditionalItems.Schema, spec.Definitions["tag"]) + + schema = spec.Definitions["withPattern"] + s, err = expandSchema(schema, []string{"#/definitions/withPattern"}, resolver) + schema = *s + assert.NoError(t, err) + prop := schema.PatternProperties["^x-ab"] + assert.Empty(t, prop.Ref.String()) + assert.Equal(t, prop, spec.Definitions["tag"]) + + schema = spec.Definitions["deps"] + s, err = expandSchema(schema, []string{"#/definitions/deps"}, resolver) + schema = *s + assert.NoError(t, err) + prop2 := schema.Dependencies["something"] + assert.Empty(t, prop2.Schema.Ref.String()) + assert.Equal(t, *prop2.Schema, spec.Definitions["tag"]) + + schema = spec.Definitions["defined"] + s, err = expandSchema(schema, []string{"#/definitions/defined"}, resolver) + schema = *s + assert.NoError(t, err) + prop = schema.Definitions["something"] + assert.Empty(t, prop.Ref.String()) + assert.Equal(t, prop, spec.Definitions["tag"]) + +} + +func TestDefaultResolutionCache(t *testing.T) { + + cache := initResolutionCache() + + sch, ok := cache.Get("not there") + assert.False(t, ok) + assert.Nil(t, sch) + + sch, ok = cache.Get("http://swagger.io/v2/schema.json") + assert.True(t, ok) + assert.Equal(t, swaggerSchema, sch) + + sch, ok = cache.Get("http://json-schema.org/draft-04/schema") + assert.True(t, ok) + assert.Equal(t, jsonSchema, sch) + + cache.Set("something", "here") + sch, ok = cache.Get("something") + assert.True(t, ok) + assert.Equal(t, "here", sch) +} + +func resolutionContextServer() *httptest.Server { + var servedAt string + server := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { + // fmt.Println("got a request for", req.URL.String()) + if req.URL.Path == "/resolution.json" { + + b, _ := ioutil.ReadFile("fixtures/specs/resolution.json") + var ctnt map[string]interface{} + json.Unmarshal(b, &ctnt) + ctnt["id"] = servedAt + + rw.Header().Set("Content-Type", "application/json") + rw.WriteHeader(200) + bb, _ := json.Marshal(ctnt) + rw.Write(bb) + return + } + if req.URL.Path == "/resolution2.json" { + b, _ := ioutil.ReadFile("fixtures/specs/resolution2.json") + var ctnt map[string]interface{} + json.Unmarshal(b, &ctnt) + ctnt["id"] = servedAt + + rw.Header().Set("Content-Type", "application/json") + rw.WriteHeader(200) + bb, _ := json.Marshal(ctnt) + rw.Write(bb) + return + } + + if req.URL.Path == "/boolProp.json" { + rw.Header().Set("Content-Type", "application/json") + rw.WriteHeader(200) + b, _ := json.Marshal(map[string]interface{}{ + "type": "boolean", + }) + _, _ = rw.Write(b) + return + } + + if req.URL.Path == "/deeper/stringProp.json" { + rw.Header().Set("Content-Type", "application/json") + rw.WriteHeader(200) + b, _ := json.Marshal(map[string]interface{}{ + "type": "string", + }) + rw.Write(b) + return + } + + if req.URL.Path == "/deeper/arrayProp.json" { + rw.Header().Set("Content-Type", "application/json") + rw.WriteHeader(200) + b, _ := json.Marshal(map[string]interface{}{ + "type": "array", + "items": map[string]interface{}{ + "type": "file", + }, + }) + rw.Write(b) + return + } + + rw.WriteHeader(http.StatusNotFound) + })) + servedAt = server.URL + return server +} + +func TestResolveRemoteRef_RootSame(t *testing.T) { + specs := "fixtures/specs" + fileserver := http.FileServer(http.Dir(specs)) + server := httptest.NewServer(fileserver) + defer server.Close() + + rootDoc := new(Swagger) + b, err := ioutil.ReadFile("fixtures/specs/refed.json") + if assert.NoError(t, err) && assert.NoError(t, json.Unmarshal(b, rootDoc)) { + var result_0 Swagger + ref_0, _ := NewRef(server.URL + "/refed.json#") + resolver_0, _ := defaultSchemaLoader(rootDoc, nil, nil, nil) + if assert.NoError(t, resolver_0.Resolve(&ref_0, &result_0)) { + assertSpecs(t, result_0, *rootDoc) + } + + var result_1 Swagger + ref_1, _ := NewRef("./refed.json") + resolver_1, _ := defaultSchemaLoader(rootDoc, nil, &ExpandOptions{ + RelativeBase: (specs), + }, nil) + if assert.NoError(t, resolver_1.Resolve(&ref_1, &result_1)) { + assertSpecs(t, result_1, *rootDoc) + } + } +} + +func TestResolveRemoteRef_FromFragment(t *testing.T) { + specs := "fixtures/specs" + fileserver := http.FileServer(http.Dir(specs)) + server := httptest.NewServer(fileserver) + defer server.Close() + + rootDoc := new(Swagger) + b, err := ioutil.ReadFile("fixtures/specs/refed.json") + if assert.NoError(t, err) && assert.NoError(t, json.Unmarshal(b, rootDoc)) { + var tgt Schema + ref, err := NewRef(server.URL + "/refed.json#/definitions/pet") + if assert.NoError(t, err) { + resolver := &schemaLoader{root: rootDoc, cache: initResolutionCache(), loadDoc: jsonDoc} + if assert.NoError(t, resolver.Resolve(&ref, &tgt)) { + assert.Equal(t, []string{"id", "name"}, tgt.Required) + } + } + } +} + +func TestResolveRemoteRef_FromInvalidFragment(t *testing.T) { + specs := "fixtures/specs" + fileserver := http.FileServer(http.Dir(specs)) + server := httptest.NewServer(fileserver) + defer server.Close() + + rootDoc := new(Swagger) + b, err := ioutil.ReadFile("fixtures/specs/refed.json") + if assert.NoError(t, err) && assert.NoError(t, json.Unmarshal(b, rootDoc)) { + var tgt Schema + ref, err := NewRef(server.URL + "/refed.json#/definitions/NotThere") + if assert.NoError(t, err) { + resolver, _ := defaultSchemaLoader(rootDoc, nil, nil, nil) + assert.Error(t, resolver.Resolve(&ref, &tgt)) + } + } +} + +func TestResolveRemoteRef_WithResolutionContext(t *testing.T) { + server := resolutionContextServer() + defer server.Close() + + rootDoc := new(Swagger) + b, err := ioutil.ReadFile("fixtures/specs/refed.json") + if assert.NoError(t, err) && assert.NoError(t, json.Unmarshal(b, rootDoc)) { + var tgt Schema + ref, err := NewRef(server.URL + "/resolution.json#/definitions/bool") + if assert.NoError(t, err) { + resolver, _ := defaultSchemaLoader(rootDoc, nil, nil, nil) + if assert.NoError(t, resolver.Resolve(&ref, &tgt)) { + assert.Equal(t, StringOrArray([]string{"boolean"}), tgt.Type) + } + } + } +} + +func TestResolveRemoteRef_WithNestedResolutionContext(t *testing.T) { + server := resolutionContextServer() + defer server.Close() + + rootDoc := new(Swagger) + b, err := ioutil.ReadFile("fixtures/specs/refed.json") + if assert.NoError(t, err) && assert.NoError(t, json.Unmarshal(b, rootDoc)) { + var tgt Schema + ref, err := NewRef(server.URL + "/resolution.json#/items/items") + if assert.NoError(t, err) { + resolver, _ := defaultSchemaLoader(rootDoc, nil, nil, nil) + if assert.NoError(t, resolver.Resolve(&ref, &tgt)) { + assert.Equal(t, StringOrArray([]string{"string"}), tgt.Type) + } + } + } +} + +func TestResolveRemoteRef_WithNestedResolutionContextWithFragment(t *testing.T) { + server := resolutionContextServer() + defer server.Close() + + rootDoc := new(Swagger) + b, err := ioutil.ReadFile("fixtures/specs/refed.json") + if assert.NoError(t, err) && assert.NoError(t, json.Unmarshal(b, rootDoc)) { + var tgt Schema + ref, err := NewRef(server.URL + "/resolution2.json#/items/items") + if assert.NoError(t, err) { + resolver, _ := defaultSchemaLoader(rootDoc, nil, nil, nil) + if assert.NoError(t, resolver.Resolve(&ref, &tgt)) { + assert.Equal(t, StringOrArray([]string{"file"}), tgt.Type) + } + } + } +} + +func TestResolveRemoteRef_ToParameter(t *testing.T) { + specs := "fixtures/specs" + fileserver := http.FileServer(http.Dir(specs)) + server := httptest.NewServer(fileserver) + defer server.Close() + + rootDoc := new(Swagger) + b, err := ioutil.ReadFile("fixtures/specs/refed.json") + if assert.NoError(t, err) && assert.NoError(t, json.Unmarshal(b, rootDoc)) { + var tgt Parameter + ref, err := NewRef(server.URL + "/refed.json#/parameters/idParam") + if assert.NoError(t, err) { + + resolver, _ := defaultSchemaLoader(rootDoc, nil, nil, nil) + if assert.NoError(t, resolver.Resolve(&ref, &tgt)) { + assert.Equal(t, "id", tgt.Name) + assert.Equal(t, "path", tgt.In) + assert.Equal(t, "ID of pet to fetch", tgt.Description) + assert.True(t, tgt.Required) + assert.Equal(t, "integer", tgt.Type) + assert.Equal(t, "int64", tgt.Format) + } + } + } +} + +func TestResolveRemoteRef_ToPathItem(t *testing.T) { + specs := "fixtures/specs" + fileserver := http.FileServer(http.Dir(specs)) + server := httptest.NewServer(fileserver) + defer server.Close() + + rootDoc := new(Swagger) + b, err := ioutil.ReadFile("fixtures/specs/refed.json") + if assert.NoError(t, err) && assert.NoError(t, json.Unmarshal(b, rootDoc)) { + var tgt PathItem + ref, err := NewRef(server.URL + "/refed.json#/paths/" + jsonpointer.Escape("/pets/{id}")) + if assert.NoError(t, err) { + + resolver, _ := defaultSchemaLoader(rootDoc, nil, nil, nil) + if assert.NoError(t, resolver.Resolve(&ref, &tgt)) { + assert.Equal(t, rootDoc.Paths.Paths["/pets/{id}"].Get, tgt.Get) + } + } + } +} + +func TestResolveRemoteRef_ToResponse(t *testing.T) { + specs := "fixtures/specs" + fileserver := http.FileServer(http.Dir(specs)) + server := httptest.NewServer(fileserver) + defer server.Close() + + rootDoc := new(Swagger) + b, err := ioutil.ReadFile("fixtures/specs/refed.json") + if assert.NoError(t, err) && assert.NoError(t, json.Unmarshal(b, rootDoc)) { + var tgt Response + ref, err := NewRef(server.URL + "/refed.json#/responses/petResponse") + if assert.NoError(t, err) { + + resolver, _ := defaultSchemaLoader(rootDoc, nil, nil, nil) + if assert.NoError(t, resolver.Resolve(&ref, &tgt)) { + assert.Equal(t, rootDoc.Responses["petResponse"], tgt) + } + } + } +} + +func TestResolveLocalRef_SameRoot(t *testing.T) { + rootDoc := new(Swagger) + json.Unmarshal(PetStoreJSONMessage, rootDoc) + + result := new(Swagger) + ref, _ := NewRef("#") + resolver, _ := defaultSchemaLoader(rootDoc, nil, nil, nil) + err := resolver.Resolve(&ref, result) + if assert.NoError(t, err) { + assert.Equal(t, rootDoc, result) + } +} + +func TestResolveLocalRef_FromFragment(t *testing.T) { + rootDoc := new(Swagger) + json.Unmarshal(PetStoreJSONMessage, rootDoc) + + var tgt Schema + ref, err := NewRef("#/definitions/Category") + if assert.NoError(t, err) { + resolver, _ := defaultSchemaLoader(rootDoc, nil, nil, nil) + err := resolver.Resolve(&ref, &tgt) + if assert.NoError(t, err) { + assert.Equal(t, "Category", tgt.ID) + } + } +} + +func TestResolveLocalRef_FromInvalidFragment(t *testing.T) { + rootDoc := new(Swagger) + json.Unmarshal(PetStoreJSONMessage, rootDoc) + + var tgt Schema + ref, err := NewRef("#/definitions/NotThere") + if assert.NoError(t, err) { + resolver, _ := defaultSchemaLoader(rootDoc, nil, nil, nil) + err := resolver.Resolve(&ref, &tgt) + assert.Error(t, err) + } +} + +func TestResolveLocalRef_Parameter(t *testing.T) { + rootDoc := new(Swagger) + b, err := ioutil.ReadFile("fixtures/specs/refed.json") + if assert.NoError(t, err) && assert.NoError(t, json.Unmarshal(b, rootDoc)) { + var tgt Parameter + ref, err := NewRef("#/parameters/idParam") + if assert.NoError(t, err) { + resolver, _ := defaultSchemaLoader(rootDoc, nil, nil, nil) + if assert.NoError(t, resolver.Resolve(&ref, &tgt)) { + assert.Equal(t, "id", tgt.Name) + assert.Equal(t, "path", tgt.In) + assert.Equal(t, "ID of pet to fetch", tgt.Description) + assert.True(t, tgt.Required) + assert.Equal(t, "integer", tgt.Type) + assert.Equal(t, "int64", tgt.Format) + } + } + } +} + +func TestResolveLocalRef_PathItem(t *testing.T) { + rootDoc := new(Swagger) + b, err := ioutil.ReadFile("fixtures/specs/refed.json") + if assert.NoError(t, err) && assert.NoError(t, json.Unmarshal(b, rootDoc)) { + var tgt PathItem + ref, err := NewRef("#/paths/" + jsonpointer.Escape("/pets/{id}")) + if assert.NoError(t, err) { + resolver, _ := defaultSchemaLoader(rootDoc, nil, nil, nil) + if assert.NoError(t, resolver.Resolve(&ref, &tgt)) { + assert.Equal(t, rootDoc.Paths.Paths["/pets/{id}"].Get, tgt.Get) + } + } + } +} + +func TestResolveLocalRef_Response(t *testing.T) { + rootDoc := new(Swagger) + b, err := ioutil.ReadFile("fixtures/specs/refed.json") + if assert.NoError(t, err) && assert.NoError(t, json.Unmarshal(b, rootDoc)) { + var tgt Response + ref, err := NewRef("#/responses/petResponse") + if assert.NoError(t, err) { + resolver, _ := defaultSchemaLoader(rootDoc, nil, nil, nil) + if assert.NoError(t, resolver.Resolve(&ref, &tgt)) { + assert.Equal(t, rootDoc.Responses["petResponse"], tgt) + } + } + } +} + +// PetStoreJSONMessage json raw message for Petstore20 +var PetStoreJSONMessage = json.RawMessage([]byte(PetStore20)) + +// PetStore20 json doc for swagger 2.0 pet store +const PetStore20 = `{ + "swagger": "2.0", + "info": { + "version": "1.0.0", + "title": "Swagger Petstore", + "contact": { + "name": "Wordnik API Team", + "url": "http://developer.wordnik.com" + }, + "license": { + "name": "Creative Commons 4.0 International", + "url": "http://creativecommons.org/licenses/by/4.0/" + } + }, + "host": "petstore.swagger.wordnik.com", + "basePath": "/api", + "schemes": [ + "http" + ], + "paths": { + "/pets": { + "get": { + "security": [ + { + "basic": [] + } + ], + "tags": [ "Pet Operations" ], + "operationId": "getAllPets", + "parameters": [ + { + "name": "status", + "in": "query", + "description": "The status to filter by", + "type": "string" + }, + { + "name": "limit", + "in": "query", + "description": "The maximum number of results to return", + "type": "integer", + "format": "int64" + } + ], + "summary": "Finds all pets in the system", + "responses": { + "200": { + "description": "Pet response", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Pet" + } + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + }, + "post": { + "security": [ + { + "basic": [] + } + ], + "tags": [ "Pet Operations" ], + "operationId": "createPet", + "summary": "Creates a new pet", + "consumes": ["application/x-yaml"], + "produces": ["application/x-yaml"], + "parameters": [ + { + "name": "pet", + "in": "body", + "description": "The Pet to create", + "required": true, + "schema": { + "$ref": "#/definitions/newPet" + } + } + ], + "responses": { + "200": { + "description": "Created Pet response", + "schema": { + "$ref": "#/definitions/Pet" + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/pets/{id}": { + "delete": { + "security": [ + { + "apiKey": [] + } + ], + "description": "Deletes the Pet by id", + "operationId": "deletePet", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of pet to delete", + "required": true, + "type": "integer", + "format": "int64" + } + ], + "responses": { + "204": { + "description": "pet deleted" + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + }, + "get": { + "tags": [ "Pet Operations" ], + "operationId": "getPetById", + "summary": "Finds the pet by id", + "responses": { + "200": { + "description": "Pet response", + "schema": { + "$ref": "#/definitions/Pet" + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of pet", + "required": true, + "type": "integer", + "format": "int64" + } + ] + } + }, + "definitions": { + "Category": { + "id": "Category", + "properties": { + "id": { + "format": "int64", + "type": "integer" + }, + "name": { + "type": "string" + } + } + }, + "Pet": { + "id": "Pet", + "properties": { + "category": { + "$ref": "#/definitions/Category" + }, + "id": { + "description": "unique identifier for the pet", + "format": "int64", + "maximum": 100.0, + "minimum": 0.0, + "type": "integer" + }, + "name": { + "type": "string" + }, + "photoUrls": { + "items": { + "type": "string" + }, + "type": "array" + }, + "status": { + "description": "pet status in the store", + "enum": [ + "available", + "pending", + "sold" + ], + "type": "string" + }, + "tags": { + "items": { + "$ref": "#/definitions/Tag" + }, + "type": "array" + } + }, + "required": [ + "id", + "name" + ] + }, + "newPet": { + "anyOf": [ + { + "$ref": "#/definitions/Pet" + }, + { + "required": [ + "name" + ] + } + ] + }, + "Tag": { + "id": "Tag", + "properties": { + "id": { + "format": "int64", + "type": "integer" + }, + "name": { + "type": "string" + } + } + }, + "Error": { + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + } + } + } + }, + "consumes": [ + "application/json", + "application/xml" + ], + "produces": [ + "application/json", + "application/xml", + "text/plain", + "text/html" + ], + "securityDefinitions": { + "basic": { + "type": "basic" + }, + "apiKey": { + "type": "apiKey", + "in": "header", + "name": "X-API-KEY" + } + } +} +` diff --git a/vendor/github.com/go-openapi/spec/external_docs_test.go b/vendor/github.com/go-openapi/spec/external_docs_test.go new file mode 100644 index 000000000..14c5ef156 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/external_docs_test.go @@ -0,0 +1,29 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "testing" +) + +func TestIntegrationExternalDocs(t *testing.T) { + var extDocs = ExternalDocumentation{"the name", "the url"} + const extDocsYAML = "description: the name\nurl: the url\n" + const extDocsJSON = `{"description":"the name","url":"the url"}` + assertSerializeJSON(t, extDocs, extDocsJSON) + assertSerializeYAML(t, extDocs, extDocsYAML) + assertParsesJSON(t, extDocsJSON, extDocs) + assertParsesYAML(t, extDocsYAML, extDocs) +} diff --git a/vendor/github.com/go-openapi/spec/header.go b/vendor/github.com/go-openapi/spec/header.go index 758b84531..85c4d454c 100644 --- a/vendor/github.com/go-openapi/spec/header.go +++ b/vendor/github.com/go-openapi/spec/header.go @@ -16,7 +16,9 @@ package spec import ( "encoding/json" + "strings" + "github.com/go-openapi/jsonpointer" "github.com/go-openapi/swag" ) @@ -30,6 +32,7 @@ type HeaderProps struct { type Header struct { CommonValidations SimpleSchema + VendorExtensible HeaderProps } @@ -158,8 +161,35 @@ func (h *Header) UnmarshalJSON(data []byte) error { if err := json.Unmarshal(data, &h.SimpleSchema); err != nil { return err } + if err := json.Unmarshal(data, &h.VendorExtensible); err != nil { + return err + } if err := json.Unmarshal(data, &h.HeaderProps); err != nil { return err } return nil } + +// JSONLookup look up a value by the json property name +func (p Header) JSONLookup(token string) (interface{}, error) { + if ex, ok := p.Extensions[token]; ok { + return &ex, nil + } + + r, _, err := jsonpointer.GetForToken(p.CommonValidations, token) + if err != nil && !strings.HasPrefix(err.Error(), "object has no field") { + return nil, err + } + if r != nil { + return r, nil + } + r, _, err = jsonpointer.GetForToken(p.SimpleSchema, token) + if err != nil && !strings.HasPrefix(err.Error(), "object has no field") { + return nil, err + } + if r != nil { + return r, nil + } + r, _, err = jsonpointer.GetForToken(p.HeaderProps, token) + return r, err +} diff --git a/vendor/github.com/go-openapi/spec/header_test.go b/vendor/github.com/go-openapi/spec/header_test.go new file mode 100644 index 000000000..a07d174fd --- /dev/null +++ b/vendor/github.com/go-openapi/spec/header_test.go @@ -0,0 +1,90 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "encoding/json" + "testing" + + "github.com/stretchr/testify/assert" +) + +func float64Ptr(f float64) *float64 { + return &f +} +func int64Ptr(f int64) *int64 { + return &f +} + +var header = Header{ + VendorExtensible: VendorExtensible{Extensions: map[string]interface{}{ + "x-framework": "swagger-go", + }}, + HeaderProps: HeaderProps{Description: "the description of this header"}, + SimpleSchema: SimpleSchema{ + Items: &Items{ + Refable: Refable{Ref: MustCreateRef("Cat")}, + }, + Type: "string", + Format: "date", + Default: "8", + }, + CommonValidations: CommonValidations{ + Maximum: float64Ptr(100), + ExclusiveMaximum: true, + ExclusiveMinimum: true, + Minimum: float64Ptr(5), + MaxLength: int64Ptr(100), + MinLength: int64Ptr(5), + Pattern: "\\w{1,5}\\w+", + MaxItems: int64Ptr(100), + MinItems: int64Ptr(5), + UniqueItems: true, + MultipleOf: float64Ptr(5), + Enum: []interface{}{"hello", "world"}, + }, +} + +var headerJSON = `{ + "items": { + "$ref": "Cat" + }, + "x-framework": "swagger-go", + "description": "the description of this header", + "maximum": 100, + "minimum": 5, + "exclusiveMaximum": true, + "exclusiveMinimum": true, + "maxLength": 100, + "minLength": 5, + "pattern": "\\w{1,5}\\w+", + "maxItems": 100, + "minItems": 5, + "uniqueItems": true, + "multipleOf": 5, + "enum": ["hello", "world"], + "type": "string", + "format": "date", + "default": "8" +}` + +func TestIntegrationHeader(t *testing.T) { + var actual Header + if assert.NoError(t, json.Unmarshal([]byte(headerJSON), &actual)) { + assert.EqualValues(t, actual, header) + } + + assertParsesJSON(t, headerJSON, header) +} diff --git a/vendor/github.com/go-openapi/spec/info_test.go b/vendor/github.com/go-openapi/spec/info_test.go new file mode 100644 index 000000000..fc40c1630 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/info_test.go @@ -0,0 +1,65 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "encoding/json" + "testing" + + "github.com/stretchr/testify/assert" +) + +var infoJSON = `{ + "description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification", + "title": "Swagger Sample API", + "termsOfService": "http://helloreverb.com/terms/", + "contact": { + "name": "wordnik api team", + "url": "http://developer.wordnik.com" + }, + "license": { + "name": "Creative Commons 4.0 International", + "url": "http://creativecommons.org/licenses/by/4.0/" + }, + "version": "1.0.9-abcd", + "x-framework": "go-swagger" +}` + +var info = Info{ + InfoProps: InfoProps{ + Version: "1.0.9-abcd", + Title: "Swagger Sample API", + Description: "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification", + TermsOfService: "http://helloreverb.com/terms/", + Contact: &ContactInfo{Name: "wordnik api team", URL: "http://developer.wordnik.com"}, + License: &License{Name: "Creative Commons 4.0 International", URL: "http://creativecommons.org/licenses/by/4.0/"}, + }, + VendorExtensible: VendorExtensible{map[string]interface{}{"x-framework": "go-swagger"}}, +} + +func TestIntegrationInfo_Serialize(t *testing.T) { + b, err := json.MarshalIndent(info, "", "\t") + if assert.NoError(t, err) { + assert.Equal(t, infoJSON, string(b)) + } +} + +func TestIntegrationInfo_Deserialize(t *testing.T) { + actual := Info{} + err := json.Unmarshal([]byte(infoJSON), &actual) + if assert.NoError(t, err) { + assert.EqualValues(t, info, actual) + } +} diff --git a/vendor/github.com/go-openapi/spec/items.go b/vendor/github.com/go-openapi/spec/items.go index 4d57ea5ca..07ac88e66 100644 --- a/vendor/github.com/go-openapi/spec/items.go +++ b/vendor/github.com/go-openapi/spec/items.go @@ -16,7 +16,9 @@ package spec import ( "encoding/json" + "strings" + "github.com/go-openapi/jsonpointer" "github.com/go-openapi/swag" ) @@ -60,11 +62,12 @@ type CommonValidations struct { // Items a limited subset of JSON-Schema's items object. // It is used by parameter definitions that are not located in "body". // -// For more information: http://goo.gl/8us55a#items-object- +// For more information: http://goo.gl/8us55a#items-object type Items struct { Refable CommonValidations SimpleSchema + VendorExtensible } // NewItems creates a new instance of items @@ -175,9 +178,14 @@ func (i *Items) UnmarshalJSON(data []byte) error { if err := json.Unmarshal(data, &simpleSchema); err != nil { return err } + var vendorExtensible VendorExtensible + if err := json.Unmarshal(data, &vendorExtensible); err != nil { + return err + } i.Refable = ref i.CommonValidations = validations i.SimpleSchema = simpleSchema + i.VendorExtensible = vendorExtensible return nil } @@ -195,5 +203,26 @@ func (i Items) MarshalJSON() ([]byte, error) { if err != nil { return nil, err } - return swag.ConcatJSON(b3, b1, b2), nil + b4, err := json.Marshal(i.VendorExtensible) + if err != nil { + return nil, err + } + return swag.ConcatJSON(b4, b3, b1, b2), nil +} + +// JSONLookup look up a value by the json property name +func (p Items) JSONLookup(token string) (interface{}, error) { + if token == "$ref" { + return &p.Ref, nil + } + + r, _, err := jsonpointer.GetForToken(p.CommonValidations, token) + if err != nil && !strings.HasPrefix(err.Error(), "object has no field") { + return nil, err + } + if r != nil { + return r, nil + } + r, _, err = jsonpointer.GetForToken(p.SimpleSchema, token) + return r, err } diff --git a/vendor/github.com/go-openapi/spec/items_test.go b/vendor/github.com/go-openapi/spec/items_test.go new file mode 100644 index 000000000..2f9ac11b4 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/items_test.go @@ -0,0 +1,81 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "encoding/json" + "testing" + + "github.com/stretchr/testify/assert" +) + +var items = Items{ + Refable: Refable{Ref: MustCreateRef("Dog")}, + CommonValidations: CommonValidations{ + Maximum: float64Ptr(100), + ExclusiveMaximum: true, + ExclusiveMinimum: true, + Minimum: float64Ptr(5), + MaxLength: int64Ptr(100), + MinLength: int64Ptr(5), + Pattern: "\\w{1,5}\\w+", + MaxItems: int64Ptr(100), + MinItems: int64Ptr(5), + UniqueItems: true, + MultipleOf: float64Ptr(5), + Enum: []interface{}{"hello", "world"}, + }, + SimpleSchema: SimpleSchema{ + Type: "string", + Format: "date", + Items: &Items{ + Refable: Refable{Ref: MustCreateRef("Cat")}, + }, + CollectionFormat: "csv", + Default: "8", + }, +} + +var itemsJSON = `{ + "items": { + "$ref": "Cat" + }, + "$ref": "Dog", + "maximum": 100, + "minimum": 5, + "exclusiveMaximum": true, + "exclusiveMinimum": true, + "maxLength": 100, + "minLength": 5, + "pattern": "\\w{1,5}\\w+", + "maxItems": 100, + "minItems": 5, + "uniqueItems": true, + "multipleOf": 5, + "enum": ["hello", "world"], + "type": "string", + "format": "date", + "collectionFormat": "csv", + "default": "8" +}` + +func TestIntegrationItems(t *testing.T) { + var actual Items + if assert.NoError(t, json.Unmarshal([]byte(itemsJSON), &actual)) { + assert.EqualValues(t, actual, items) + } + + assertParsesJSON(t, itemsJSON, items) +} diff --git a/vendor/github.com/go-openapi/spec/license_test.go b/vendor/github.com/go-openapi/spec/license_test.go new file mode 100644 index 000000000..8ed51a352 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/license_test.go @@ -0,0 +1,28 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import "testing" + +func TestIntegrationLicense(t *testing.T) { + license := License{"the name", "the url"} + const licenseJSON = `{"name":"the name","url":"the url"}` + const licenseYAML = "name: the name\nurl: the url\n" + + assertSerializeJSON(t, license, licenseJSON) + assertSerializeYAML(t, license, licenseYAML) + assertParsesJSON(t, licenseJSON, license) + assertParsesYAML(t, licenseYAML, license) +} diff --git a/vendor/github.com/go-openapi/spec/operation_test.go b/vendor/github.com/go-openapi/spec/operation_test.go new file mode 100644 index 000000000..113bf6c06 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/operation_test.go @@ -0,0 +1,85 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "encoding/json" + "testing" + + "github.com/stretchr/testify/assert" +) + +var operation = Operation{ + VendorExtensible: VendorExtensible{ + Extensions: map[string]interface{}{ + "x-framework": "go-swagger", + }, + }, + OperationProps: OperationProps{ + Description: "operation description", + Consumes: []string{"application/json", "application/x-yaml"}, + Produces: []string{"application/json", "application/x-yaml"}, + Schemes: []string{"http", "https"}, + Tags: []string{"dogs"}, + Summary: "the summary of the operation", + ID: "sendCat", + Deprecated: true, + Security: []map[string][]string{ + map[string][]string{ + "apiKey": []string{}, + }, + }, + Parameters: []Parameter{ + Parameter{Refable: Refable{Ref: MustCreateRef("Cat")}}, + }, + Responses: &Responses{ + ResponsesProps: ResponsesProps{ + Default: &Response{ + ResponseProps: ResponseProps{ + Description: "void response", + }, + }, + }, + }, + }, +} + +var operationJSON = `{ + "description": "operation description", + "x-framework": "go-swagger", + "consumes": [ "application/json", "application/x-yaml" ], + "produces": [ "application/json", "application/x-yaml" ], + "schemes": ["http", "https"], + "tags": ["dogs"], + "summary": "the summary of the operation", + "operationId": "sendCat", + "deprecated": true, + "security": [ { "apiKey": [] } ], + "parameters": [{"$ref":"Cat"}], + "responses": { + "default": { + "description": "void response" + } + } +}` + +func TestIntegrationOperation(t *testing.T) { + var actual Operation + if assert.NoError(t, json.Unmarshal([]byte(operationJSON), &actual)) { + assert.EqualValues(t, actual, operation) + } + + assertParsesJSON(t, operationJSON, operation) +} diff --git a/vendor/github.com/go-openapi/spec/parameter.go b/vendor/github.com/go-openapi/spec/parameter.go index 8fb66d12a..71aee1e80 100644 --- a/vendor/github.com/go-openapi/spec/parameter.go +++ b/vendor/github.com/go-openapi/spec/parameter.go @@ -16,6 +16,7 @@ package spec import ( "encoding/json" + "strings" "github.com/go-openapi/jsonpointer" "github.com/go-openapi/swag" @@ -100,15 +101,16 @@ func (p Parameter) JSONLookup(token string) (interface{}, error) { if token == "$ref" { return &p.Ref, nil } + r, _, err := jsonpointer.GetForToken(p.CommonValidations, token) - if err != nil { + if err != nil && !strings.HasPrefix(err.Error(), "object has no field") { return nil, err } if r != nil { return r, nil } r, _, err = jsonpointer.GetForToken(p.SimpleSchema, token) - if err != nil { + if err != nil && !strings.HasPrefix(err.Error(), "object has no field") { return nil, err } if r != nil { diff --git a/vendor/github.com/go-openapi/spec/parameters_test.go b/vendor/github.com/go-openapi/spec/parameters_test.go new file mode 100644 index 000000000..424f66332 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/parameters_test.go @@ -0,0 +1,156 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "encoding/json" + "testing" + + "github.com/stretchr/testify/assert" +) + +var parameter = Parameter{ + VendorExtensible: VendorExtensible{Extensions: map[string]interface{}{ + "x-framework": "swagger-go", + }}, + Refable: Refable{Ref: MustCreateRef("Dog")}, + CommonValidations: CommonValidations{ + Maximum: float64Ptr(100), + ExclusiveMaximum: true, + ExclusiveMinimum: true, + Minimum: float64Ptr(5), + MaxLength: int64Ptr(100), + MinLength: int64Ptr(5), + Pattern: "\\w{1,5}\\w+", + MaxItems: int64Ptr(100), + MinItems: int64Ptr(5), + UniqueItems: true, + MultipleOf: float64Ptr(5), + Enum: []interface{}{"hello", "world"}, + }, + SimpleSchema: SimpleSchema{ + Type: "string", + Format: "date", + CollectionFormat: "csv", + Items: &Items{ + Refable: Refable{Ref: MustCreateRef("Cat")}, + }, + Default: "8", + }, + ParamProps: ParamProps{ + Name: "param-name", + In: "header", + Required: true, + Schema: &Schema{SchemaProps: SchemaProps{Type: []string{"string"}}}, + Description: "the description of this parameter", + }, +} + +var parameterJSON = `{ + "items": { + "$ref": "Cat" + }, + "x-framework": "swagger-go", + "$ref": "Dog", + "description": "the description of this parameter", + "maximum": 100, + "minimum": 5, + "exclusiveMaximum": true, + "exclusiveMinimum": true, + "maxLength": 100, + "minLength": 5, + "pattern": "\\w{1,5}\\w+", + "maxItems": 100, + "minItems": 5, + "uniqueItems": true, + "multipleOf": 5, + "enum": ["hello", "world"], + "type": "string", + "format": "date", + "name": "param-name", + "in": "header", + "required": true, + "schema": { + "type": "string" + }, + "collectionFormat": "csv", + "default": "8" +}` + +func TestIntegrationParameter(t *testing.T) { + var actual Parameter + if assert.NoError(t, json.Unmarshal([]byte(parameterJSON), &actual)) { + assert.EqualValues(t, actual, parameter) + } + + assertParsesJSON(t, parameterJSON, parameter) +} + +func TestParameterSerialization(t *testing.T) { + items := &Items{ + SimpleSchema: SimpleSchema{Type: "string"}, + } + + intItems := &Items{ + SimpleSchema: SimpleSchema{Type: "int", Format: "int32"}, + } + + assertSerializeJSON(t, QueryParam("").Typed("string", ""), `{"type":"string","in":"query"}`) + + assertSerializeJSON(t, + QueryParam("").CollectionOf(items, "multi"), + `{"type":"array","items":{"type":"string"},"collectionFormat":"multi","in":"query"}`) + + assertSerializeJSON(t, PathParam("").Typed("string", ""), `{"type":"string","in":"path","required":true}`) + + assertSerializeJSON(t, + PathParam("").CollectionOf(items, "multi"), + `{"type":"array","items":{"type":"string"},"collectionFormat":"multi","in":"path","required":true}`) + + assertSerializeJSON(t, + PathParam("").CollectionOf(intItems, "multi"), + `{"type":"array","items":{"type":"int","format":"int32"},"collectionFormat":"multi","in":"path","required":true}`) + + assertSerializeJSON(t, HeaderParam("").Typed("string", ""), `{"type":"string","in":"header","required":true}`) + + assertSerializeJSON(t, + HeaderParam("").CollectionOf(items, "multi"), + `{"type":"array","items":{"type":"string"},"collectionFormat":"multi","in":"header","required":true}`) + schema := &Schema{SchemaProps: SchemaProps{ + Properties: map[string]Schema{ + "name": Schema{SchemaProps: SchemaProps{ + Type: []string{"string"}, + }}, + }, + }} + + refSchema := &Schema{ + SchemaProps: SchemaProps{Ref: MustCreateRef("Cat")}, + } + + assertSerializeJSON(t, + BodyParam("", schema), + `{"type":"object","in":"body","schema":{"properties":{"name":{"type":"string"}}}}`) + + assertSerializeJSON(t, + BodyParam("", refSchema), + `{"type":"object","in":"body","schema":{"$ref":"Cat"}}`) + + // array body param + assertSerializeJSON(t, + BodyParam("", ArrayProperty(RefProperty("Cat"))), + `{"type":"object","in":"body","schema":{"type":"array","items":{"$ref":"Cat"}}}`) + +} diff --git a/vendor/github.com/go-openapi/spec/path_item_test.go b/vendor/github.com/go-openapi/spec/path_item_test.go new file mode 100644 index 000000000..ea77e6a9b --- /dev/null +++ b/vendor/github.com/go-openapi/spec/path_item_test.go @@ -0,0 +1,81 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "encoding/json" + "testing" + + "github.com/stretchr/testify/assert" +) + +var pathItem = PathItem{ + Refable: Refable{Ref: MustCreateRef("Dog")}, + VendorExtensible: VendorExtensible{ + Extensions: map[string]interface{}{ + "x-framework": "go-swagger", + }, + }, + PathItemProps: PathItemProps{ + Get: &Operation{ + OperationProps: OperationProps{Description: "get operation description"}, + }, + Put: &Operation{ + OperationProps: OperationProps{Description: "put operation description"}, + }, + Post: &Operation{ + OperationProps: OperationProps{Description: "post operation description"}, + }, + Delete: &Operation{ + OperationProps: OperationProps{Description: "delete operation description"}, + }, + Options: &Operation{ + OperationProps: OperationProps{Description: "options operation description"}, + }, + Head: &Operation{ + OperationProps: OperationProps{Description: "head operation description"}, + }, + Patch: &Operation{ + OperationProps: OperationProps{Description: "patch operation description"}, + }, + Parameters: []Parameter{ + Parameter{ + ParamProps: ParamProps{In: "path"}, + }, + }, + }, +} + +var pathItemJSON = `{ + "$ref": "Dog", + "x-framework": "go-swagger", + "get": { "description": "get operation description" }, + "put": { "description": "put operation description" }, + "post": { "description": "post operation description" }, + "delete": { "description": "delete operation description" }, + "options": { "description": "options operation description" }, + "head": { "description": "head operation description" }, + "patch": { "description": "patch operation description" }, + "parameters": [{"in":"path"}] +}` + +func TestIntegrationPathItem(t *testing.T) { + var actual PathItem + if assert.NoError(t, json.Unmarshal([]byte(pathItemJSON), &actual)) { + assert.EqualValues(t, actual, pathItem) + } + + assertParsesJSON(t, pathItemJSON, pathItem) +} diff --git a/vendor/github.com/go-openapi/spec/paths_test.go b/vendor/github.com/go-openapi/spec/paths_test.go new file mode 100644 index 000000000..5ccfd4a0a --- /dev/null +++ b/vendor/github.com/go-openapi/spec/paths_test.go @@ -0,0 +1,43 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "encoding/json" + "testing" + + "github.com/stretchr/testify/assert" +) + +var paths = Paths{ + VendorExtensible: VendorExtensible{Extensions: map[string]interface{}{"x-framework": "go-swagger"}}, + Paths: map[string]PathItem{ + "/": PathItem{ + Refable: Refable{Ref: MustCreateRef("cats")}, + }, + }, +} + +var pathsJSON = `{"x-framework":"go-swagger","/":{"$ref":"cats"}}` + +func TestIntegrationPaths(t *testing.T) { + var actual Paths + if assert.NoError(t, json.Unmarshal([]byte(pathsJSON), &actual)) { + assert.EqualValues(t, actual, paths) + } + + assertParsesJSON(t, pathsJSON, paths) + +} diff --git a/vendor/github.com/go-openapi/spec/properties_test.go b/vendor/github.com/go-openapi/spec/properties_test.go new file mode 100644 index 000000000..90bd32c9e --- /dev/null +++ b/vendor/github.com/go-openapi/spec/properties_test.go @@ -0,0 +1,58 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "testing" +) + +func TestPropertySerialization(t *testing.T) { + strProp := StringProperty() + strProp.Enum = append(strProp.Enum, "a", "b") + + prop := &Schema{SchemaProps: SchemaProps{ + Items: &SchemaOrArray{Schemas: []Schema{ + Schema{SchemaProps: SchemaProps{Type: []string{"string"}}}, + Schema{SchemaProps: SchemaProps{Type: []string{"string"}}}, + }}, + }} + + var propSerData = []struct { + Schema *Schema + JSON string + }{ + {BooleanProperty(), `{"type":"boolean"}`}, + {DateProperty(), `{"type":"string","format":"date"}`}, + {DateTimeProperty(), `{"type":"string","format":"date-time"}`}, + {Float64Property(), `{"type":"number","format":"double"}`}, + {Float32Property(), `{"type":"number","format":"float"}`}, + {Int32Property(), `{"type":"integer","format":"int32"}`}, + {Int64Property(), `{"type":"integer","format":"int64"}`}, + {MapProperty(StringProperty()), `{"type":"object","additionalProperties":{"type":"string"}}`}, + {MapProperty(Int32Property()), `{"type":"object","additionalProperties":{"type":"integer","format":"int32"}}`}, + {RefProperty("Dog"), `{"$ref":"Dog"}`}, + {StringProperty(), `{"type":"string"}`}, + {strProp, `{"type":"string","enum":["a","b"]}`}, + {ArrayProperty(StringProperty()), `{"type":"array","items":{"type":"string"}}`}, + {prop, `{"items":[{"type":"string"},{"type":"string"}]}`}, + } + + for _, v := range propSerData { + t.Log("roundtripping for", v.JSON) + assertSerializeJSON(t, v.Schema, v.JSON) + assertParsesJSON(t, v.JSON, v.Schema) + } + +} diff --git a/vendor/github.com/go-openapi/spec/ref.go b/vendor/github.com/go-openapi/spec/ref.go index 68631df8b..4833b87e2 100644 --- a/vendor/github.com/go-openapi/spec/ref.go +++ b/vendor/github.com/go-openapi/spec/ref.go @@ -55,7 +55,7 @@ func (r *Ref) RemoteURI() string { } // IsValidURI returns true when the url the ref points to can be found -func (r *Ref) IsValidURI() bool { +func (r *Ref) IsValidURI(basepaths ...string) bool { if r.String() == "" { return true } @@ -81,14 +81,18 @@ func (r *Ref) IsValidURI() bool { // check for local file pth := v if r.HasURLPathOnly { - p, e := filepath.Abs(pth) + base := "." + if len(basepaths) > 0 { + base = filepath.Dir(filepath.Join(basepaths...)) + } + p, e := filepath.Abs(filepath.ToSlash(filepath.Join(base, pth))) if e != nil { return false } pth = p } - fi, err := os.Stat(pth) + fi, err := os.Stat(filepath.ToSlash(pth)) if err != nil { return false } @@ -116,25 +120,18 @@ func NewRef(refURI string) (Ref, error) { return Ref{Ref: ref}, nil } -// MustCreateRef creates a ref object but +// MustCreateRef creates a ref object but panics when refURI is invalid. +// Use the NewRef method for a version that returns an error. func MustCreateRef(refURI string) Ref { return Ref{Ref: jsonreference.MustCreateRef(refURI)} } -// // NewResolvedRef creates a resolved ref -// func NewResolvedRef(refURI string, data interface{}) Ref { -// return Ref{ -// Ref: jsonreference.MustCreateRef(refURI), -// Resolved: data, -// } -// } - // MarshalJSON marshals this ref into a JSON object func (r Ref) MarshalJSON() ([]byte, error) { str := r.String() if str == "" { if r.IsRoot() { - return []byte(`{"$ref":"#"}`), nil + return []byte(`{"$ref":""}`), nil } return []byte("{}"), nil } diff --git a/vendor/github.com/go-openapi/spec/response.go b/vendor/github.com/go-openapi/spec/response.go index 308cc8478..a32b039ea 100644 --- a/vendor/github.com/go-openapi/spec/response.go +++ b/vendor/github.com/go-openapi/spec/response.go @@ -17,6 +17,7 @@ package spec import ( "encoding/json" + "github.com/go-openapi/jsonpointer" "github.com/go-openapi/swag" ) @@ -34,6 +35,19 @@ type ResponseProps struct { type Response struct { Refable ResponseProps + VendorExtensible +} + +// JSONLookup look up a value by the json property name +func (p Response) JSONLookup(token string) (interface{}, error) { + if ex, ok := p.Extensions[token]; ok { + return &ex, nil + } + if token == "$ref" { + return &p.Ref, nil + } + r, _, err := jsonpointer.GetForToken(p.ResponseProps, token) + return r, err } // UnmarshalJSON hydrates this items instance with the data from JSON @@ -44,6 +58,9 @@ func (r *Response) UnmarshalJSON(data []byte) error { if err := json.Unmarshal(data, &r.Refable); err != nil { return err } + if err := json.Unmarshal(data, &r.VendorExtensible); err != nil { + return err + } return nil } @@ -57,7 +74,11 @@ func (r Response) MarshalJSON() ([]byte, error) { if err != nil { return nil, err } - return swag.ConcatJSON(b1, b2), nil + b3, err := json.Marshal(r.VendorExtensible) + if err != nil { + return nil, err + } + return swag.ConcatJSON(b1, b2, b3), nil } // NewResponse creates a new response instance diff --git a/vendor/github.com/go-openapi/spec/response_test.go b/vendor/github.com/go-openapi/spec/response_test.go new file mode 100644 index 000000000..2a3ca4093 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/response_test.go @@ -0,0 +1,53 @@ +// Copyright 2017 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "encoding/json" + "testing" + + "github.com/stretchr/testify/assert" +) + +var response = Response{ + Refable: Refable{Ref: MustCreateRef("Dog")}, + VendorExtensible: VendorExtensible{ + Extensions: map[string]interface{}{ + "x-go-name": "PutDogExists", + }, + }, + ResponseProps: ResponseProps{ + Description: "Dog exists", + Schema: &Schema{SchemaProps: SchemaProps{Type: []string{"string"}}}, + }, +} + +var responseJSON = `{ + "$ref": "Dog", + "x-go-name": "PutDogExists", + "description": "Dog exists", + "schema": { + "type": "string" + } +}` + +func TestIntegrationResponse(t *testing.T) { + var actual Response + if assert.NoError(t, json.Unmarshal([]byte(responseJSON), &actual)) { + assert.EqualValues(t, actual, response) + } + + assertParsesJSON(t, responseJSON, response) +} diff --git a/vendor/github.com/go-openapi/spec/responses.go b/vendor/github.com/go-openapi/spec/responses.go index ea071ca63..3ab06697f 100644 --- a/vendor/github.com/go-openapi/spec/responses.go +++ b/vendor/github.com/go-openapi/spec/responses.go @@ -51,7 +51,7 @@ func (r Responses) JSONLookup(token string) (interface{}, error) { } if i, err := strconv.Atoi(token); err == nil { if scr, ok := r.StatusCodeResponses[i]; ok { - return &scr, nil + return scr, nil } } return nil, fmt.Errorf("object has no field %q", token) diff --git a/vendor/github.com/go-openapi/spec/schema.go b/vendor/github.com/go-openapi/spec/schema.go index eb88f005c..1cdcc163f 100644 --- a/vendor/github.com/go-openapi/spec/schema.go +++ b/vendor/github.com/go-openapi/spec/schema.go @@ -201,8 +201,8 @@ func (r *SchemaURL) UnmarshalJSON(data []byte) error { type SchemaProps struct { ID string `json:"id,omitempty"` - Ref Ref `json:"-,omitempty"` - Schema SchemaURL `json:"-,omitempty"` + Ref Ref `json:"-"` + Schema SchemaURL `json:"-"` Description string `json:"description,omitempty"` Type StringOrArray `json:"type,omitempty"` Format string `json:"format,omitempty"` @@ -269,7 +269,7 @@ func (s Schema) JSONLookup(token string) (interface{}, error) { } r, _, err := jsonpointer.GetForToken(s.SchemaProps, token) - if r != nil || err != nil { + if r != nil || (err != nil && !strings.HasPrefix(err.Error(), "object has no field")) { return r, err } r, _, err = jsonpointer.GetForToken(s.SwaggerSchemaProps, token) diff --git a/vendor/github.com/go-openapi/spec/schema_test.go b/vendor/github.com/go-openapi/spec/schema_test.go new file mode 100644 index 000000000..2e49fbc15 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/schema_test.go @@ -0,0 +1,205 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "encoding/json" + "testing" + + "github.com/stretchr/testify/assert" +) + +var schema = Schema{ + VendorExtensible: VendorExtensible{Extensions: map[string]interface{}{"x-framework": "go-swagger"}}, + SchemaProps: SchemaProps{ + Ref: MustCreateRef("Cat"), + Type: []string{"string"}, + Format: "date", + Description: "the description of this schema", + Title: "the title", + Default: "blah", + Maximum: float64Ptr(100), + ExclusiveMaximum: true, + ExclusiveMinimum: true, + Minimum: float64Ptr(5), + MaxLength: int64Ptr(100), + MinLength: int64Ptr(5), + Pattern: "\\w{1,5}\\w+", + MaxItems: int64Ptr(100), + MinItems: int64Ptr(5), + UniqueItems: true, + MultipleOf: float64Ptr(5), + Enum: []interface{}{"hello", "world"}, + MaxProperties: int64Ptr(5), + MinProperties: int64Ptr(1), + Required: []string{"id", "name"}, + Items: &SchemaOrArray{Schema: &Schema{SchemaProps: SchemaProps{Type: []string{"string"}}}}, + AllOf: []Schema{Schema{SchemaProps: SchemaProps{Type: []string{"string"}}}}, + Properties: map[string]Schema{ + "id": Schema{SchemaProps: SchemaProps{Type: []string{"integer"}, Format: "int64"}}, + "name": Schema{SchemaProps: SchemaProps{Type: []string{"string"}}}, + }, + AdditionalProperties: &SchemaOrBool{Allows: true, Schema: &Schema{SchemaProps: SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }}}, + }, + SwaggerSchemaProps: SwaggerSchemaProps{ + Discriminator: "not this", + ReadOnly: true, + XML: &XMLObject{"sch", "io", "sw", true, true}, + ExternalDocs: &ExternalDocumentation{ + Description: "the documentation etc", + URL: "http://readthedocs.org/swagger", + }, + Example: []interface{}{ + map[string]interface{}{ + "id": 1, + "name": "a book", + }, + map[string]interface{}{ + "id": 2, + "name": "the thing", + }, + }, + }, +} + +var schemaJSON = `{ + "x-framework": "go-swagger", + "$ref": "Cat", + "description": "the description of this schema", + "maximum": 100, + "minimum": 5, + "exclusiveMaximum": true, + "exclusiveMinimum": true, + "maxLength": 100, + "minLength": 5, + "pattern": "\\w{1,5}\\w+", + "maxItems": 100, + "minItems": 5, + "uniqueItems": true, + "multipleOf": 5, + "enum": ["hello", "world"], + "type": "string", + "format": "date", + "title": "the title", + "default": "blah", + "maxProperties": 5, + "minProperties": 1, + "required": ["id", "name"], + "items": { + "type": "string" + }, + "allOf": [ + { + "type": "string" + } + ], + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + }, + "discriminator": "not this", + "readOnly": true, + "xml": { + "name": "sch", + "namespace": "io", + "prefix": "sw", + "wrapped": true, + "attribute": true + }, + "externalDocs": { + "description": "the documentation etc", + "url": "http://readthedocs.org/swagger" + }, + "example": [ + { + "id": 1, + "name": "a book" + }, + { + "id": 2, + "name": "the thing" + } + ], + "additionalProperties": { + "type": "integer", + "format": "int32" + } +} +` + +func TestSchema(t *testing.T) { + + expected := map[string]interface{}{} + json.Unmarshal([]byte(schemaJSON), &expected) + b, err := json.Marshal(schema) + if assert.NoError(t, err) { + var actual map[string]interface{} + json.Unmarshal(b, &actual) + assert.Equal(t, expected, actual) + } + + actual2 := Schema{} + if assert.NoError(t, json.Unmarshal([]byte(schemaJSON), &actual2)) { + assert.Equal(t, schema.Ref, actual2.Ref) + assert.Equal(t, schema.Description, actual2.Description) + assert.Equal(t, schema.Maximum, actual2.Maximum) + assert.Equal(t, schema.Minimum, actual2.Minimum) + assert.Equal(t, schema.ExclusiveMinimum, actual2.ExclusiveMinimum) + assert.Equal(t, schema.ExclusiveMaximum, actual2.ExclusiveMaximum) + assert.Equal(t, schema.MaxLength, actual2.MaxLength) + assert.Equal(t, schema.MinLength, actual2.MinLength) + assert.Equal(t, schema.Pattern, actual2.Pattern) + assert.Equal(t, schema.MaxItems, actual2.MaxItems) + assert.Equal(t, schema.MinItems, actual2.MinItems) + assert.True(t, actual2.UniqueItems) + assert.Equal(t, schema.MultipleOf, actual2.MultipleOf) + assert.Equal(t, schema.Enum, actual2.Enum) + assert.Equal(t, schema.Type, actual2.Type) + assert.Equal(t, schema.Format, actual2.Format) + assert.Equal(t, schema.Title, actual2.Title) + assert.Equal(t, schema.MaxProperties, actual2.MaxProperties) + assert.Equal(t, schema.MinProperties, actual2.MinProperties) + assert.Equal(t, schema.Required, actual2.Required) + assert.Equal(t, schema.Items, actual2.Items) + assert.Equal(t, schema.AllOf, actual2.AllOf) + assert.Equal(t, schema.Properties, actual2.Properties) + assert.Equal(t, schema.Discriminator, actual2.Discriminator) + assert.Equal(t, schema.ReadOnly, actual2.ReadOnly) + assert.Equal(t, schema.XML, actual2.XML) + assert.Equal(t, schema.ExternalDocs, actual2.ExternalDocs) + assert.Equal(t, schema.AdditionalProperties, actual2.AdditionalProperties) + assert.Equal(t, schema.Extensions, actual2.Extensions) + examples := actual2.Example.([]interface{}) + expEx := schema.Example.([]interface{}) + ex1 := examples[0].(map[string]interface{}) + ex2 := examples[1].(map[string]interface{}) + exp1 := expEx[0].(map[string]interface{}) + exp2 := expEx[1].(map[string]interface{}) + + assert.EqualValues(t, exp1["id"], ex1["id"]) + assert.Equal(t, exp1["name"], ex1["name"]) + assert.EqualValues(t, exp2["id"], ex2["id"]) + assert.Equal(t, exp2["name"], ex2["name"]) + } + +} diff --git a/vendor/github.com/go-openapi/spec/spec.go b/vendor/github.com/go-openapi/spec/spec.go index cc2ae56b2..0bb045bc0 100644 --- a/vendor/github.com/go-openapi/spec/spec.go +++ b/vendor/github.com/go-openapi/spec/spec.go @@ -16,6 +16,8 @@ package spec import "encoding/json" +//go:generate curl -L --progress -o ./schemas/v2/schema.json http://swagger.io/v2/schema.json +//go:generate curl -L --progress -o ./schemas/jsonschema-draft-04.json http://json-schema.org/draft-04/schema //go:generate go-bindata -pkg=spec -prefix=./schemas -ignore=.*\.md ./schemas/... //go:generate perl -pi -e s,Json,JSON,g bindata.go @@ -27,10 +29,15 @@ const ( ) var ( - jsonSchema = MustLoadJSONSchemaDraft04() - swaggerSchema = MustLoadSwagger20Schema() + jsonSchema *Schema + swaggerSchema *Schema ) +func init() { + jsonSchema = MustLoadJSONSchemaDraft04() + swaggerSchema = MustLoadSwagger20Schema() +} + // MustLoadJSONSchemaDraft04 panics when Swagger20Schema returns an error func MustLoadJSONSchemaDraft04() *Schema { d, e := JSONSchemaDraft04() diff --git a/vendor/github.com/go-openapi/spec/structs_test.go b/vendor/github.com/go-openapi/spec/structs_test.go new file mode 100644 index 000000000..bfa59ee03 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/structs_test.go @@ -0,0 +1,110 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "encoding/json" + "reflect" + "testing" + + "github.com/stretchr/testify/assert" + "gopkg.in/yaml.v2" +) + +func assertSerializeJSON(t testing.TB, actual interface{}, expected string) bool { + ser, err := json.Marshal(actual) + if err != nil { + return assert.Fail(t, "unable to marshal to json (%s): %#v", err, actual) + } + return assert.Equal(t, string(ser), expected) +} + +func assertParsesJSON(t testing.TB, actual string, expected interface{}) bool { + tpe := reflect.TypeOf(expected) + var pointed bool + if tpe.Kind() == reflect.Ptr { + tpe = tpe.Elem() + pointed = true + } + + parsed := reflect.New(tpe) + err := json.Unmarshal([]byte(actual), parsed.Interface()) + if err != nil { + return assert.Fail(t, "unable to unmarshal from json (%s): %s", err, actual) + } + act := parsed.Interface() + if !pointed { + act = reflect.Indirect(parsed).Interface() + } + return assert.Equal(t, act, expected) +} + +func assertSerializeYAML(t testing.TB, actual interface{}, expected string) bool { + ser, err := yaml.Marshal(actual) + if err != nil { + return assert.Fail(t, "unable to marshal to yaml (%s): %#v", err, actual) + } + return assert.Equal(t, string(ser), expected) +} + +func assertParsesYAML(t testing.TB, actual string, expected interface{}) bool { + tpe := reflect.TypeOf(expected) + var pointed bool + if tpe.Kind() == reflect.Ptr { + tpe = tpe.Elem() + pointed = true + } + parsed := reflect.New(tpe) + err := yaml.Unmarshal([]byte(actual), parsed.Interface()) + if err != nil { + return assert.Fail(t, "unable to unmarshal from yaml (%s): %s", err, actual) + } + act := parsed.Interface() + if !pointed { + act = reflect.Indirect(parsed).Interface() + } + return assert.EqualValues(t, act, expected) +} + +func TestSerialization_SerializeJSON(t *testing.T) { + assertSerializeJSON(t, []string{"hello"}, "[\"hello\"]") + assertSerializeJSON(t, []string{"hello", "world", "and", "stuff"}, "[\"hello\",\"world\",\"and\",\"stuff\"]") + assertSerializeJSON(t, StringOrArray(nil), "null") + assertSerializeJSON(t, SchemaOrArray{Schemas: []Schema{Schema{SchemaProps: SchemaProps{Type: []string{"string"}}}}}, "[{\"type\":\"string\"}]") + assertSerializeJSON(t, SchemaOrArray{ + Schemas: []Schema{ + Schema{SchemaProps: SchemaProps{Type: []string{"string"}}}, + Schema{SchemaProps: SchemaProps{Type: []string{"string"}}}, + }}, "[{\"type\":\"string\"},{\"type\":\"string\"}]") + assertSerializeJSON(t, SchemaOrArray{}, "null") +} + +func TestSerialization_DeserializeJSON(t *testing.T) { + // String + assertParsesJSON(t, "\"hello\"", StringOrArray([]string{"hello"})) + assertParsesJSON(t, "[\"hello\",\"world\",\"and\",\"stuff\"]", StringOrArray([]string{"hello", "world", "and", "stuff"})) + assertParsesJSON(t, "[\"hello\",\"world\",null,\"stuff\"]", StringOrArray([]string{"hello", "world", "", "stuff"})) + assertParsesJSON(t, "null", StringOrArray(nil)) + + // Schema + assertParsesJSON(t, "{\"type\":\"string\"}", SchemaOrArray{Schema: &Schema{SchemaProps: SchemaProps{Type: []string{"string"}}}}) + assertParsesJSON(t, "[{\"type\":\"string\"},{\"type\":\"string\"}]", &SchemaOrArray{ + Schemas: []Schema{ + Schema{SchemaProps: SchemaProps{Type: []string{"string"}}}, + Schema{SchemaProps: SchemaProps{Type: []string{"string"}}}, + }, + }) + assertParsesJSON(t, "null", SchemaOrArray{}) +} diff --git a/vendor/github.com/go-openapi/spec/swagger.go b/vendor/github.com/go-openapi/spec/swagger.go index ff3ef875e..23780c78a 100644 --- a/vendor/github.com/go-openapi/spec/swagger.go +++ b/vendor/github.com/go-openapi/spec/swagger.go @@ -77,7 +77,7 @@ type SwaggerProps struct { Host string `json:"host,omitempty"` BasePath string `json:"basePath,omitempty"` // must start with a leading "/" Paths *Paths `json:"paths"` // required - Definitions Definitions `json:"definitions"` + Definitions Definitions `json:"definitions,omitempty"` Parameters map[string]Parameter `json:"parameters,omitempty"` Responses map[string]Response `json:"responses,omitempty"` SecurityDefinitions SecurityDefinitions `json:"securityDefinitions,omitempty"` @@ -156,7 +156,7 @@ func (s SchemaOrStringArray) MarshalJSON() ([]byte, error) { if s.Schema != nil { return json.Marshal(s.Schema) } - return nil, nil + return []byte("null"), nil } // UnmarshalJSON converts this schema object or array from a JSON structure diff --git a/vendor/github.com/go-openapi/spec/swagger_test.go b/vendor/github.com/go-openapi/spec/swagger_test.go new file mode 100644 index 000000000..f7b3d9022 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/swagger_test.go @@ -0,0 +1,365 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "encoding/json" + "fmt" + "reflect" + "testing" + + "github.com/go-openapi/swag" + "github.com/stretchr/testify/assert" +) + +var spec = Swagger{ + SwaggerProps: SwaggerProps{ + ID: "http://localhost:3849/api-docs", + Swagger: "2.0", + Consumes: []string{"application/json", "application/x-yaml"}, + Produces: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Info: &info, + Host: "some.api.out.there", + BasePath: "/", + Paths: &paths, + Definitions: map[string]Schema{"Category": {SchemaProps: SchemaProps{Type: []string{"string"}}}}, + Parameters: map[string]Parameter{ + "categoryParam": {ParamProps: ParamProps{Name: "category", In: "query"}, SimpleSchema: SimpleSchema{Type: "string"}}, + }, + Responses: map[string]Response{ + "EmptyAnswer": { + ResponseProps: ResponseProps{ + Description: "no data to return for this operation", + }, + }, + }, + SecurityDefinitions: map[string]*SecurityScheme{ + "internalApiKey": APIKeyAuth("api_key", "header"), + }, + Security: []map[string][]string{ + {"internalApiKey": {}}, + }, + Tags: []Tag{NewTag("pets", "", nil)}, + ExternalDocs: &ExternalDocumentation{"the name", "the url"}, + }, + VendorExtensible: VendorExtensible{map[string]interface{}{ + "x-some-extension": "vendor", + "x-schemes": []interface{}{"unix", "amqp"}, + }}, +} + +var specJSON = `{ + "id": "http://localhost:3849/api-docs", + "consumes": ["application/json", "application/x-yaml"], + "produces": ["application/json"], + "schemes": ["http", "https"], + "swagger": "2.0", + "info": { + "contact": { + "name": "wordnik api team", + "url": "http://developer.wordnik.com" + }, + "description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification", + "license": { + "name": "Creative Commons 4.0 International", + "url": "http://creativecommons.org/licenses/by/4.0/" + }, + "termsOfService": "http://helloreverb.com/terms/", + "title": "Swagger Sample API", + "version": "1.0.9-abcd", + "x-framework": "go-swagger" + }, + "host": "some.api.out.there", + "basePath": "/", + "paths": {"x-framework":"go-swagger","/":{"$ref":"cats"}}, + "definitions": { "Category": { "type": "string"} }, + "parameters": { + "categoryParam": { + "name": "category", + "in": "query", + "type": "string" + } + }, + "responses": { "EmptyAnswer": { "description": "no data to return for this operation" } }, + "securityDefinitions": { + "internalApiKey": { + "type": "apiKey", + "in": "header", + "name": "api_key" + } + }, + "security": [{"internalApiKey":[]}], + "tags": [{"name":"pets"}], + "externalDocs": {"description":"the name","url":"the url"}, + "x-some-extension": "vendor", + "x-schemes": ["unix","amqp"] +}` + +// +// func verifySpecSerialize(specJSON []byte, spec Swagger) { +// expected := map[string]interface{}{} +// json.Unmarshal(specJSON, &expected) +// b, err := json.MarshalIndent(spec, "", " ") +// So(err, ShouldBeNil) +// var actual map[string]interface{} +// err = json.Unmarshal(b, &actual) +// So(err, ShouldBeNil) +// compareSpecMaps(actual, expected) +// } + +func assertEquivalent(t testing.TB, actual, expected interface{}) bool { + if actual == nil || expected == nil || reflect.DeepEqual(actual, expected) { + return true + } + + actualType := reflect.TypeOf(actual) + expectedType := reflect.TypeOf(expected) + if reflect.TypeOf(actual).ConvertibleTo(expectedType) { + expectedValue := reflect.ValueOf(expected) + if swag.IsZero(expectedValue) && swag.IsZero(reflect.ValueOf(actual)) { + return true + } + + // Attempt comparison after type conversion + if reflect.DeepEqual(actual, expectedValue.Convert(actualType).Interface()) { + return true + } + } + + // Last ditch effort + if fmt.Sprintf("%#v", expected) == fmt.Sprintf("%#v", actual) { + return true + } + errFmt := "Expected: '%T(%#v)'\nActual: '%T(%#v)'\n(Should be equivalent)!" + return assert.Fail(t, errFmt, expected, expected, actual, actual) +} + +func ShouldBeEquivalentTo(actual interface{}, expecteds ...interface{}) string { + expected := expecteds[0] + if actual == nil || expected == nil { + return "" + } + + if reflect.DeepEqual(expected, actual) { + return "" + } + + actualType := reflect.TypeOf(actual) + expectedType := reflect.TypeOf(expected) + if reflect.TypeOf(actual).ConvertibleTo(expectedType) { + expectedValue := reflect.ValueOf(expected) + if swag.IsZero(expectedValue) && swag.IsZero(reflect.ValueOf(actual)) { + return "" + } + + // Attempt comparison after type conversion + if reflect.DeepEqual(actual, expectedValue.Convert(actualType).Interface()) { + return "" + } + } + + // Last ditch effort + if fmt.Sprintf("%#v", expected) == fmt.Sprintf("%#v", actual) { + return "" + } + errFmt := "Expected: '%T(%#v)'\nActual: '%T(%#v)'\n(Should be equivalent)!" + return fmt.Sprintf(errFmt, expected, expected, actual, actual) + +} + +func assertSpecMaps(t testing.TB, actual, expected map[string]interface{}) bool { + res := true + if id, ok := expected["id"]; ok { + res = assert.Equal(t, id, actual["id"]) + } + res = res && assert.Equal(t, expected["consumes"], actual["consumes"]) + res = res && assert.Equal(t, expected["produces"], actual["produces"]) + res = res && assert.Equal(t, expected["schemes"], actual["schemes"]) + res = res && assert.Equal(t, expected["swagger"], actual["swagger"]) + res = res && assert.Equal(t, expected["info"], actual["info"]) + res = res && assert.Equal(t, expected["host"], actual["host"]) + res = res && assert.Equal(t, expected["basePath"], actual["basePath"]) + res = res && assert.Equal(t, expected["paths"], actual["paths"]) + res = res && assert.Equal(t, expected["definitions"], actual["definitions"]) + res = res && assert.Equal(t, expected["responses"], actual["responses"]) + res = res && assert.Equal(t, expected["securityDefinitions"], actual["securityDefinitions"]) + res = res && assert.Equal(t, expected["tags"], actual["tags"]) + res = res && assert.Equal(t, expected["externalDocs"], actual["externalDocs"]) + res = res && assert.Equal(t, expected["x-some-extension"], actual["x-some-extension"]) + res = res && assert.Equal(t, expected["x-schemes"], actual["x-schemes"]) + + return res +} + +// +// func compareSpecMaps(actual, expected map[string]interface{}) { +// if id, ok := expected["id"]; ok { +// So(actual["id"], ShouldEqual, id) +// } +// //So(actual["$schema"], ShouldEqual, SwaggerSchemaURL) +// So(actual["consumes"], ShouldResemble, expected["consumes"]) +// So(actual["produces"], ShouldResemble, expected["produces"]) +// So(actual["schemes"], ShouldResemble, expected["schemes"]) +// So(actual["swagger"], ShouldEqual, expected["swagger"]) +// So(actual["info"], ShouldResemble, expected["info"]) +// So(actual["host"], ShouldEqual, expected["host"]) +// So(actual["basePath"], ShouldEqual, expected["basePath"]) +// So(actual["paths"], ShouldBeEquivalentTo, expected["paths"]) +// So(actual["definitions"], ShouldBeEquivalentTo, expected["definitions"]) +// So(actual["responses"], ShouldBeEquivalentTo, expected["responses"]) +// So(actual["securityDefinitions"], ShouldResemble, expected["securityDefinitions"]) +// So(actual["tags"], ShouldResemble, expected["tags"]) +// So(actual["externalDocs"], ShouldResemble, expected["externalDocs"]) +// So(actual["x-some-extension"], ShouldResemble, expected["x-some-extension"]) +// So(actual["x-schemes"], ShouldResemble, expected["x-schemes"]) +// } + +func assertSpecs(t testing.TB, actual, expected Swagger) bool { + expected.Swagger = "2.0" + return assert.Equal(t, actual, expected) +} + +// +// func compareSpecs(actual Swagger, spec Swagger) { +// spec.Swagger = "2.0" +// So(actual, ShouldBeEquivalentTo, spec) +// } + +func assertSpecJSON(t testing.TB, specJSON []byte) bool { + var expected map[string]interface{} + if !assert.NoError(t, json.Unmarshal(specJSON, &expected)) { + return false + } + + obj := Swagger{} + if !assert.NoError(t, json.Unmarshal(specJSON, &obj)) { + return false + } + + cb, err := json.MarshalIndent(obj, "", " ") + if assert.NoError(t, err) { + return false + } + var actual map[string]interface{} + if !assert.NoError(t, json.Unmarshal(cb, &actual)) { + return false + } + return assertSpecMaps(t, actual, expected) +} + +// func verifySpecJSON(specJSON []byte) { +// //Println() +// //Println("json to verify", string(specJson)) +// var expected map[string]interface{} +// err := json.Unmarshal(specJSON, &expected) +// So(err, ShouldBeNil) +// +// obj := Swagger{} +// err = json.Unmarshal(specJSON, &obj) +// So(err, ShouldBeNil) +// +// //spew.Dump(obj) +// +// cb, err := json.MarshalIndent(obj, "", " ") +// So(err, ShouldBeNil) +// //Println() +// //Println("Marshalling to json returned", string(cb)) +// +// var actual map[string]interface{} +// err = json.Unmarshal(cb, &actual) +// So(err, ShouldBeNil) +// //Println() +// //spew.Dump(expected) +// //spew.Dump(actual) +// //fmt.Printf("comparing %s\n\t%#v\nto\n\t%#+v\n", fileName, expected, actual) +// compareSpecMaps(actual, expected) +// } + +func TestSwaggerSpec_Serialize(t *testing.T) { + expected := make(map[string]interface{}) + json.Unmarshal([]byte(specJSON), &expected) + b, err := json.MarshalIndent(spec, "", " ") + if assert.NoError(t, err) { + var actual map[string]interface{} + err := json.Unmarshal(b, &actual) + if assert.NoError(t, err) { + assert.EqualValues(t, actual, expected) + } + } +} + +func TestSwaggerSpec_Deserialize(t *testing.T) { + var actual Swagger + err := json.Unmarshal([]byte(specJSON), &actual) + if assert.NoError(t, err) { + assert.EqualValues(t, actual, spec) + } +} + +func TestVendorExtensionStringSlice(t *testing.T) { + var actual Swagger + err := json.Unmarshal([]byte(specJSON), &actual) + if assert.NoError(t, err) { + schemes, ok := actual.Extensions.GetStringSlice("x-schemes") + if assert.True(t, ok) { + assert.EqualValues(t, []string{"unix", "amqp"}, schemes) + } + } +} + +func TestOptionalSwaggerProps_Serialize(t *testing.T) { + minimalJsonSpec := []byte(`{ + "swagger": "2.0", + "info": { + "version": "0.0.0", + "title": "Simple API" + }, + "paths": { + "/": { + "get": { + "responses": { + "200": { + "description": "OK" + } + } + } + } + } +}`) + + var minimalSpec Swagger + err := json.Unmarshal(minimalJsonSpec, &minimalSpec) + if assert.NoError(t, err) { + bytes, err := json.Marshal(&minimalSpec) + if assert.NoError(t, err) { + var ms map[string]interface{} + if err := json.Unmarshal(bytes, &ms); assert.NoError(t, err) { + assert.NotContains(t, ms, "consumes") + assert.NotContains(t, ms, "produces") + assert.NotContains(t, ms, "schemes") + assert.NotContains(t, ms, "host") + assert.NotContains(t, ms, "basePath") + assert.NotContains(t, ms, "definitions") + assert.NotContains(t, ms, "parameters") + assert.NotContains(t, ms, "responses") + assert.NotContains(t, ms, "securityDefinitions") + assert.NotContains(t, ms, "security") + assert.NotContains(t, ms, "tags") + assert.NotContains(t, ms, "externalDocs") + } + } + } +} diff --git a/vendor/github.com/go-openapi/spec/xml_object_test.go b/vendor/github.com/go-openapi/spec/xml_object_test.go new file mode 100644 index 000000000..fda3b1084 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/xml_object_test.go @@ -0,0 +1,65 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "encoding/json" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestXmlObject_Serialize(t *testing.T) { + obj1 := XMLObject{} + actual, err := json.Marshal(obj1) + if assert.NoError(t, err) { + assert.Equal(t, "{}", string(actual)) + } + + obj2 := XMLObject{ + Name: "the name", + Namespace: "the namespace", + Prefix: "the prefix", + Attribute: true, + Wrapped: true, + } + + actual, err = json.Marshal(obj2) + if assert.NoError(t, err) { + var ad map[string]interface{} + if assert.NoError(t, json.Unmarshal(actual, &ad)) { + assert.Equal(t, obj2.Name, ad["name"]) + assert.Equal(t, obj2.Namespace, ad["namespace"]) + assert.Equal(t, obj2.Prefix, ad["prefix"]) + assert.True(t, ad["attribute"].(bool)) + assert.True(t, ad["wrapped"].(bool)) + } + } +} + +func TestXmlObject_Deserialize(t *testing.T) { + expected := XMLObject{} + actual := XMLObject{} + if assert.NoError(t, json.Unmarshal([]byte("{}"), &actual)) { + assert.Equal(t, expected, actual) + } + + completed := `{"name":"the name","namespace":"the namespace","prefix":"the prefix","attribute":true,"wrapped":true}` + expected = XMLObject{"the name", "the namespace", "the prefix", true, true} + actual = XMLObject{} + if assert.NoError(t, json.Unmarshal([]byte(completed), &actual)) { + assert.Equal(t, expected, actual) + } +} diff --git a/vendor/github.com/go-openapi/swag/.drone.yml b/vendor/github.com/go-openapi/swag/.drone.yml deleted file mode 100644 index acf10fdfb..000000000 --- a/vendor/github.com/go-openapi/swag/.drone.yml +++ /dev/null @@ -1,32 +0,0 @@ -clone: - path: github.com/go-openapi/swag - -matrix: - GO_VERSION: - - "1.6" - -build: - integration: - image: golang:$$GO_VERSION - pull: true - commands: - - go get -u github.com/stretchr/testify - - go get -u github.com/mailru/easyjson - - go test -race - - go test -v -cover -coverprofile=coverage.out -covermode=count ./... - -notify: - slack: - channel: bots - webhook_url: $$SLACK_URL - username: drone - -publish: - coverage: - server: https://coverage.vmware.run - token: $$GITHUB_TOKEN - # threshold: 70 - # must_increase: true - when: - matrix: - GO_VERSION: "1.6" diff --git a/vendor/github.com/go-openapi/swag/.editorconfig b/vendor/github.com/go-openapi/swag/.editorconfig new file mode 100644 index 000000000..3152da69a --- /dev/null +++ b/vendor/github.com/go-openapi/swag/.editorconfig @@ -0,0 +1,26 @@ +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true + +# Set default charset +[*.{js,py,go,scala,rb,java,html,css,less,sass,md}] +charset = utf-8 + +# Tab indentation (no size specified) +[*.go] +indent_style = tab + +[*.md] +trim_trailing_whitespace = false + +# Matches the exact files either package.json or .travis.yml +[{package.json,.travis.yml}] +indent_style = space +indent_size = 2 diff --git a/vendor/github.com/go-openapi/swag/.pullapprove.yml b/vendor/github.com/go-openapi/swag/.pullapprove.yml deleted file mode 100644 index 5ec183e22..000000000 --- a/vendor/github.com/go-openapi/swag/.pullapprove.yml +++ /dev/null @@ -1,13 +0,0 @@ -approve_by_comment: true -approve_regex: '^(:shipit:|:\+1:|\+1|LGTM|lgtm|Approved)' -reject_regex: ^[Rr]ejected -reset_on_push: false -reviewers: - members: - - casualjim - - chancez - - frapposelli - - vburenin - - pytlesk4 - name: pullapprove - required: 1 diff --git a/vendor/github.com/go-openapi/swag/.travis.yml b/vendor/github.com/go-openapi/swag/.travis.yml new file mode 100644 index 000000000..24c69bdf3 --- /dev/null +++ b/vendor/github.com/go-openapi/swag/.travis.yml @@ -0,0 +1,14 @@ +language: go +go: +- 1.8 +install: +- go get -u github.com/stretchr/testify +- go get -u github.com/mailru/easyjson +- go get -u gopkg.in/yaml.v2 +script: +- go test -v -race -cover -coverprofile=coverage.txt -covermode=atomic ./... +after_success: +- bash <(curl -s https://codecov.io/bash) +notifications: + slack: + secure: QUWvCkBBK09GF7YtEvHHVt70JOkdlNBG0nIKu/5qc4/nW5HP8I2w0SEf/XR2je0eED1Qe3L/AfMCWwrEj+IUZc3l4v+ju8X8R3Lomhme0Eb0jd1MTMCuPcBT47YCj0M7RON7vXtbFfm1hFJ/jLe5+9FXz0hpXsR24PJc5ZIi/ogNwkaPqG4BmndzecpSh0vc2FJPZUD9LT0I09REY/vXR0oQAalLkW0asGD5taHZTUZq/kBpsNxaAFrLM23i4mUcf33M5fjLpvx5LRICrX/57XpBrDh2TooBU6Qj3CgoY0uPRYUmSNxbVx1czNzl2JtEpb5yjoxfVPQeg0BvQM00G8LJINISR+ohrjhkZmAqchDupAX+yFrxTtORa78CtnIL6z/aTNlgwwVD8kvL/1pFA/JWYmKDmz93mV/+6wubGzNSQCstzjkFA4/iZEKewKUoRIAi/fxyscP6L/rCpmY/4llZZvrnyTqVbt6URWpopUpH4rwYqreXAtJxJsfBJIeSmUIiDIOMGkCTvyTEW3fWGmGoqWtSHLoaWDyAIGb7azb+KvfpWtEcoPFWfSWU+LGee0A/YsUhBl7ADB9A0CJEuR8q4BPpKpfLwPKSiKSAXL7zDkyjExyhtgqbSl2jS+rKIHOZNL8JkCcTP2MKMVd563C5rC5FMKqu3S9m2b6380E= diff --git a/vendor/github.com/go-openapi/swag/README.md b/vendor/github.com/go-openapi/swag/README.md index c1d3c196c..5d43728e8 100644 --- a/vendor/github.com/go-openapi/swag/README.md +++ b/vendor/github.com/go-openapi/swag/README.md @@ -1,4 +1,4 @@ -# Swag [![Build Status](https://ci.vmware.run/api/badges/go-openapi/swag/status.svg)](https://ci.vmware.run/go-openapi/swag) [![Coverage](https://coverage.vmware.run/badges/go-openapi/swag/coverage.svg)](https://coverage.vmware.run/go-openapi/swag) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) +# Swag [![Build Status](https://travis-ci.org/go-openapi/swag.svg?branch=master)](https://travis-ci.org/go-openapi/swag) [![codecov](https://codecov.io/gh/go-openapi/swag/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/swag) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) [![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/swag/master/LICENSE) [![GoDoc](https://godoc.org/github.com/go-openapi/swag?status.svg)](http://godoc.org/github.com/go-openapi/swag) diff --git a/vendor/github.com/go-openapi/swag/convert.go b/vendor/github.com/go-openapi/swag/convert.go index 28d912410..2bf5ecbba 100644 --- a/vendor/github.com/go-openapi/swag/convert.go +++ b/vendor/github.com/go-openapi/swag/convert.go @@ -159,7 +159,7 @@ func FormatInt16(value int16) string { // FormatInt32 turns an int32 into a string func FormatInt32(value int32) string { - return strconv.FormatInt(int64(value), 10) + return strconv.Itoa(int(value)) } // FormatInt64 turns an int64 into a string diff --git a/vendor/github.com/go-openapi/swag/convert_test.go b/vendor/github.com/go-openapi/swag/convert_test.go new file mode 100644 index 000000000..2f0073236 --- /dev/null +++ b/vendor/github.com/go-openapi/swag/convert_test.go @@ -0,0 +1,215 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package swag + +import ( + "math" + "strconv" + "testing" + + "github.com/stretchr/testify/assert" +) + +// These are really dumb tests + +func TestConvertBool(t *testing.T) { + for k := range evaluatesAsTrue { + r, err := ConvertBool(k) + if assert.NoError(t, err) { + assert.True(t, r) + } + } + for _, k := range []string{"a", "", "0", "false", "unchecked"} { + r, err := ConvertBool(k) + if assert.NoError(t, err) { + assert.False(t, r) + } + } +} + +func TestConvertFloat32(t *testing.T) { + validFloats := []float32{1.0, -1, math.MaxFloat32, math.SmallestNonzeroFloat32, 0, 5.494430303} + invalidFloats := []string{"a", strconv.FormatFloat(math.MaxFloat64, 'f', -1, 64), "true"} + + for _, f := range validFloats { + c, err := ConvertFloat32(FormatFloat32(f)) + if assert.NoError(t, err) { + assert.EqualValues(t, f, c) + } + } + for _, f := range invalidFloats { + _, err := ConvertFloat32(f) + assert.Error(t, err, "expected '"+f+"' to generate an error") + } +} + +func TestConvertFloat64(t *testing.T) { + validFloats := []float64{1.0, -1, float64(math.MaxFloat32), float64(math.SmallestNonzeroFloat32), math.MaxFloat64, math.SmallestNonzeroFloat64, 0, 5.494430303} + invalidFloats := []string{"a", "true"} + + for _, f := range validFloats { + c, err := ConvertFloat64(FormatFloat64(f)) + if assert.NoError(t, err) { + assert.EqualValues(t, f, c) + } + } + for _, f := range invalidFloats { + _, err := ConvertFloat64(f) + assert.Error(t, err, "expected '"+f+"' to generate an error") + } +} + +func TestConvertInt8(t *testing.T) { + validInts := []int8{0, 1, -1, math.MaxInt8, math.MinInt8} + invalidInts := []string{"1.233", "a", "false", strconv.Itoa(int(math.MaxInt64))} + + for _, f := range validInts { + c, err := ConvertInt8(FormatInt8(f)) + if assert.NoError(t, err) { + assert.EqualValues(t, f, c) + } + } + for _, f := range invalidInts { + _, err := ConvertInt8(f) + assert.Error(t, err, "expected '"+f+"' to generate an error") + } +} + +func TestConvertInt16(t *testing.T) { + validInts := []int16{0, 1, -1, math.MaxInt8, math.MinInt8, math.MaxInt16, math.MinInt16} + invalidInts := []string{"1.233", "a", "false", strconv.Itoa(int(math.MaxInt64))} + + for _, f := range validInts { + c, err := ConvertInt16(FormatInt16(f)) + if assert.NoError(t, err) { + assert.EqualValues(t, f, c) + } + } + for _, f := range invalidInts { + _, err := ConvertInt16(f) + assert.Error(t, err, "expected '"+f+"' to generate an error") + } +} + +func TestConvertInt32(t *testing.T) { + validInts := []int32{0, 1, -1, math.MaxInt8, math.MinInt8, math.MaxInt16, math.MinInt16, math.MinInt32, math.MaxInt32} + invalidInts := []string{"1.233", "a", "false", strconv.Itoa(int(math.MaxInt64))} + + for _, f := range validInts { + c, err := ConvertInt32(FormatInt32(f)) + if assert.NoError(t, err) { + assert.EqualValues(t, f, c) + } + } + for _, f := range invalidInts { + _, err := ConvertInt32(f) + assert.Error(t, err, "expected '"+f+"' to generate an error") + } +} + +func TestConvertInt64(t *testing.T) { + validInts := []int64{0, 1, -1, math.MaxInt8, math.MinInt8, math.MaxInt16, math.MinInt16, math.MinInt32, math.MaxInt32, math.MaxInt64, math.MinInt64} + invalidInts := []string{"1.233", "a", "false"} + + for _, f := range validInts { + c, err := ConvertInt64(FormatInt64(f)) + if assert.NoError(t, err) { + assert.EqualValues(t, f, c) + } + } + for _, f := range invalidInts { + _, err := ConvertInt64(f) + assert.Error(t, err, "expected '"+f+"' to generate an error") + } +} + +func TestConvertUint8(t *testing.T) { + validInts := []uint8{0, 1, math.MaxUint8} + invalidInts := []string{"1.233", "a", "false", strconv.FormatUint(math.MaxUint64, 10)} + + for _, f := range validInts { + c, err := ConvertUint8(FormatUint8(f)) + if assert.NoError(t, err) { + assert.EqualValues(t, f, c) + } + } + for _, f := range invalidInts { + _, err := ConvertUint8(f) + assert.Error(t, err, "expected '"+f+"' to generate an error") + } +} + +func TestConvertUint16(t *testing.T) { + validUints := []uint16{0, 1, math.MaxUint8, math.MaxUint16} + invalidUints := []string{"1.233", "a", "false", strconv.FormatUint(math.MaxUint64, 10)} + + for _, f := range validUints { + c, err := ConvertUint16(FormatUint16(f)) + if assert.NoError(t, err) { + assert.EqualValues(t, f, c) + } + } + for _, f := range invalidUints { + _, err := ConvertUint16(f) + assert.Error(t, err, "expected '"+f+"' to generate an error") + } +} + +func TestConvertUint32(t *testing.T) { + validUints := []uint32{0, 1, math.MaxUint8, math.MaxUint16, math.MaxUint32} + invalidUints := []string{"1.233", "a", "false", strconv.FormatUint(math.MaxUint64, 10)} + + for _, f := range validUints { + c, err := ConvertUint32(FormatUint32(f)) + if assert.NoError(t, err) { + assert.EqualValues(t, f, c) + } + } + for _, f := range invalidUints { + _, err := ConvertUint32(f) + assert.Error(t, err, "expected '"+f+"' to generate an error") + } +} + +func TestConvertUint64(t *testing.T) { + validUints := []uint64{0, 1, math.MaxUint8, math.MaxUint16, math.MaxUint32, math.MaxUint64} + invalidUints := []string{"1.233", "a", "false"} + + for _, f := range validUints { + c, err := ConvertUint64(FormatUint64(f)) + if assert.NoError(t, err) { + assert.EqualValues(t, f, c) + } + } + for _, f := range invalidUints { + _, err := ConvertUint64(f) + assert.Error(t, err, "expected '"+f+"' to generate an error") + } +} + +func TestIsFloat64AJSONInteger(t *testing.T) { + assert.False(t, IsFloat64AJSONInteger(math.Inf(1))) + assert.False(t, IsFloat64AJSONInteger(maxJSONFloat+1)) + + assert.False(t, IsFloat64AJSONInteger(minJSONFloat-1)) + assert.True(t, IsFloat64AJSONInteger(1.0)) + assert.True(t, IsFloat64AJSONInteger(maxJSONFloat)) + assert.True(t, IsFloat64AJSONInteger(minJSONFloat)) +} + +func TestFormatBool(t *testing.T) { + assert.Equal(t, "true", FormatBool(true)) + assert.Equal(t, "false", FormatBool(false)) +} diff --git a/vendor/github.com/go-openapi/swag/convert_types_test.go b/vendor/github.com/go-openapi/swag/convert_types_test.go new file mode 100644 index 000000000..978cf3a1d --- /dev/null +++ b/vendor/github.com/go-openapi/swag/convert_types_test.go @@ -0,0 +1,579 @@ +package swag + +import ( + "testing" + "time" + + "github.com/stretchr/testify/assert" +) + +var testCasesStringSlice = [][]string{ + {"a", "b", "c", "d", "e"}, + {"a", "b", "", "", "e"}, +} + +func TestStringSlice(t *testing.T) { + for idx, in := range testCasesStringSlice { + if in == nil { + continue + } + out := StringSlice(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + } + + out2 := StringValueSlice(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + } +} + +var testCasesStringValueSlice = [][]*string{ + {String("a"), String("b"), nil, String("c")}, +} + +func TestStringValueSlice(t *testing.T) { + for idx, in := range testCasesStringValueSlice { + if in == nil { + continue + } + out := StringValueSlice(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + if in[i] == nil { + assert.Empty(t, out[i], "Unexpected value at idx %d", idx) + } else { + assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx) + } + } + + out2 := StringSlice(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + for i := range out2 { + if in[i] == nil { + assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx) + } else { + assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx) + } + } + } +} + +var testCasesStringMap = []map[string]string{ + {"a": "1", "b": "2", "c": "3"}, +} + +func TestStringMap(t *testing.T) { + for idx, in := range testCasesStringMap { + if in == nil { + continue + } + out := StringMap(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + } + + out2 := StringValueMap(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + } +} + +var testCasesBoolSlice = [][]bool{ + {true, true, false, false}, +} + +func TestBoolSlice(t *testing.T) { + for idx, in := range testCasesBoolSlice { + if in == nil { + continue + } + out := BoolSlice(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + } + + out2 := BoolValueSlice(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + } +} + +var testCasesBoolValueSlice = [][]*bool{} + +func TestBoolValueSlice(t *testing.T) { + for idx, in := range testCasesBoolValueSlice { + if in == nil { + continue + } + out := BoolValueSlice(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + if in[i] == nil { + assert.Empty(t, out[i], "Unexpected value at idx %d", idx) + } else { + assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx) + } + } + + out2 := BoolSlice(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + for i := range out2 { + if in[i] == nil { + assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx) + } else { + assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx) + } + } + } +} + +var testCasesBoolMap = []map[string]bool{ + {"a": true, "b": false, "c": true}, +} + +func TestBoolMap(t *testing.T) { + for idx, in := range testCasesBoolMap { + if in == nil { + continue + } + out := BoolMap(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + } + + out2 := BoolValueMap(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + } +} + +var testCasesIntSlice = [][]int{ + {1, 2, 3, 4}, +} + +func TestIntSlice(t *testing.T) { + for idx, in := range testCasesIntSlice { + if in == nil { + continue + } + out := IntSlice(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + } + + out2 := IntValueSlice(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + } +} + +var testCasesIntValueSlice = [][]*int{} + +func TestIntValueSlice(t *testing.T) { + for idx, in := range testCasesIntValueSlice { + if in == nil { + continue + } + out := IntValueSlice(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + if in[i] == nil { + assert.Empty(t, out[i], "Unexpected value at idx %d", idx) + } else { + assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx) + } + } + + out2 := IntSlice(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + for i := range out2 { + if in[i] == nil { + assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx) + } else { + assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx) + } + } + } +} + +var testCasesIntMap = []map[string]int{ + {"a": 3, "b": 2, "c": 1}, +} + +func TestIntMap(t *testing.T) { + for idx, in := range testCasesIntMap { + if in == nil { + continue + } + out := IntMap(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + } + + out2 := IntValueMap(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + } +} + +var testCasesInt64Slice = [][]int64{ + {1, 2, 3, 4}, +} + +func TestInt64Slice(t *testing.T) { + for idx, in := range testCasesInt64Slice { + if in == nil { + continue + } + out := Int64Slice(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + } + + out2 := Int64ValueSlice(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + } +} + +var testCasesInt64ValueSlice = [][]*int64{} + +func TestInt64ValueSlice(t *testing.T) { + for idx, in := range testCasesInt64ValueSlice { + if in == nil { + continue + } + out := Int64ValueSlice(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + if in[i] == nil { + assert.Empty(t, out[i], "Unexpected value at idx %d", idx) + } else { + assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx) + } + } + + out2 := Int64Slice(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + for i := range out2 { + if in[i] == nil { + assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx) + } else { + assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx) + } + } + } +} + +var testCasesInt64Map = []map[string]int64{ + {"a": 3, "b": 2, "c": 1}, +} + +func TestInt64Map(t *testing.T) { + for idx, in := range testCasesInt64Map { + if in == nil { + continue + } + out := Int64Map(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + } + + out2 := Int64ValueMap(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + } +} + +var testCasesFloat64Slice = [][]float64{ + {1, 2, 3, 4}, +} + +func TestFloat64Slice(t *testing.T) { + for idx, in := range testCasesFloat64Slice { + if in == nil { + continue + } + out := Float64Slice(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + } + + out2 := Float64ValueSlice(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + } +} + +var testCasesUintSlice = [][]uint{ + {1, 2, 3, 4}, +} + +func TestUintSlice(t *testing.T) { + for idx, in := range testCasesUintSlice { + if in == nil { + continue + } + out := UintSlice(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + } + + out2 := UintValueSlice(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + } +} + +var testCasesUintValueSlice = [][]*uint{} + +func TestUintValueSlice(t *testing.T) { + for idx, in := range testCasesUintValueSlice { + if in == nil { + continue + } + out := UintValueSlice(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + if in[i] == nil { + assert.Empty(t, out[i], "Unexpected value at idx %d", idx) + } else { + assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx) + } + } + + out2 := UintSlice(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + for i := range out2 { + if in[i] == nil { + assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx) + } else { + assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx) + } + } + } +} + +var testCasesUintMap = []map[string]uint{ + {"a": 3, "b": 2, "c": 1}, +} + +func TestUintMap(t *testing.T) { + for idx, in := range testCasesUintMap { + if in == nil { + continue + } + out := UintMap(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + } + + out2 := UintValueMap(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + } +} + +var testCasesUint64Slice = [][]uint64{ + {1, 2, 3, 4}, +} + +func TestUint64Slice(t *testing.T) { + for idx, in := range testCasesUint64Slice { + if in == nil { + continue + } + out := Uint64Slice(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + } + + out2 := Uint64ValueSlice(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + } +} + +var testCasesUint64ValueSlice = [][]*uint64{} + +func TestUint64ValueSlice(t *testing.T) { + for idx, in := range testCasesUint64ValueSlice { + if in == nil { + continue + } + out := Uint64ValueSlice(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + if in[i] == nil { + assert.Empty(t, out[i], "Unexpected value at idx %d", idx) + } else { + assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx) + } + } + + out2 := Uint64Slice(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + for i := range out2 { + if in[i] == nil { + assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx) + } else { + assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx) + } + } + } +} + +var testCasesUint64Map = []map[string]uint64{ + {"a": 3, "b": 2, "c": 1}, +} + +func TestUint64Map(t *testing.T) { + for idx, in := range testCasesUint64Map { + if in == nil { + continue + } + out := Uint64Map(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + } + + out2 := Uint64ValueMap(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + } +} + +var testCasesFloat64ValueSlice = [][]*float64{} + +func TestFloat64ValueSlice(t *testing.T) { + for idx, in := range testCasesFloat64ValueSlice { + if in == nil { + continue + } + out := Float64ValueSlice(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + if in[i] == nil { + assert.Empty(t, out[i], "Unexpected value at idx %d", idx) + } else { + assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx) + } + } + + out2 := Float64Slice(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + for i := range out2 { + if in[i] == nil { + assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx) + } else { + assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx) + } + } + } +} + +var testCasesFloat64Map = []map[string]float64{ + {"a": 3, "b": 2, "c": 1}, +} + +func TestFloat64Map(t *testing.T) { + for idx, in := range testCasesFloat64Map { + if in == nil { + continue + } + out := Float64Map(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + } + + out2 := Float64ValueMap(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + } +} + +var testCasesTimeSlice = [][]time.Time{ + {time.Now(), time.Now().AddDate(100, 0, 0)}, +} + +func TestTimeSlice(t *testing.T) { + for idx, in := range testCasesTimeSlice { + if in == nil { + continue + } + out := TimeSlice(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + } + + out2 := TimeValueSlice(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + } +} + +var testCasesTimeValueSlice = [][]*time.Time{} + +func TestTimeValueSlice(t *testing.T) { + for idx, in := range testCasesTimeValueSlice { + if in == nil { + continue + } + out := TimeValueSlice(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + if in[i] == nil { + assert.Empty(t, out[i], "Unexpected value at idx %d", idx) + } else { + assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx) + } + } + + out2 := TimeSlice(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + for i := range out2 { + if in[i] == nil { + assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx) + } else { + assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx) + } + } + } +} + +var testCasesTimeMap = []map[string]time.Time{ + {"a": time.Now().AddDate(-100, 0, 0), "b": time.Now()}, +} + +func TestTimeMap(t *testing.T) { + for idx, in := range testCasesTimeMap { + if in == nil { + continue + } + out := TimeMap(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + } + + out2 := TimeValueMap(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + } +} diff --git a/vendor/github.com/go-openapi/swag/json.go b/vendor/github.com/go-openapi/swag/json.go index 6e9ec20fc..cb20a6a0f 100644 --- a/vendor/github.com/go-openapi/swag/json.go +++ b/vendor/github.com/go-openapi/swag/json.go @@ -17,6 +17,7 @@ package swag import ( "bytes" "encoding/json" + "log" "reflect" "strings" "sync" @@ -110,28 +111,40 @@ func ConcatJSON(blobs ...[]byte) []byte { if len(b) < 3 { // yep empty but also the last one, so closing this thing if i == last && a > 0 { - buf.WriteByte(closing) + if err := buf.WriteByte(closing); err != nil { + log.Println(err) + } } continue } idx = 0 if a > 0 { // we need to join with a comma for everything beyond the first non-empty item - buf.WriteByte(comma) + if err := buf.WriteByte(comma); err != nil { + log.Println(err) + } idx = 1 // this is not the first or the last so we want to drop the leading bracket } if i != last { // not the last one, strip brackets - buf.Write(b[idx : len(b)-1]) + if _, err := buf.Write(b[idx : len(b)-1]); err != nil { + log.Println(err) + } } else { // last one, strip only the leading bracket - buf.Write(b[idx:]) + if _, err := buf.Write(b[idx:]); err != nil { + log.Println(err) + } } a++ } // somehow it ended up being empty, so provide a default value if buf.Len() == 0 { - buf.WriteByte(opening) - buf.WriteByte(closing) + if err := buf.WriteByte(opening); err != nil { + log.Println(err) + } + if err := buf.WriteByte(closing); err != nil { + log.Println(err) + } } return buf.Bytes() } @@ -139,15 +152,23 @@ func ConcatJSON(blobs ...[]byte) []byte { // ToDynamicJSON turns an object into a properly JSON typed structure func ToDynamicJSON(data interface{}) interface{} { // TODO: convert straight to a json typed map (mergo + iterate?) - b, _ := json.Marshal(data) + b, err := json.Marshal(data) + if err != nil { + log.Println(err) + } var res interface{} - json.Unmarshal(b, &res) + if err := json.Unmarshal(b, &res); err != nil { + log.Println(err) + } return res } // FromDynamicJSON turns an object into a properly JSON typed structure func FromDynamicJSON(data, target interface{}) error { - b, _ := json.Marshal(data) + b, err := json.Marshal(data) + if err != nil { + log.Println(err) + } return json.Unmarshal(b, target) } @@ -216,6 +237,8 @@ func newNameIndex(tpe reflect.Type) nameIndex { // GetJSONNames gets all the json property names for a type func (n *NameProvider) GetJSONNames(subject interface{}) []string { + n.lock.Lock() + defer n.lock.Unlock() tpe := reflect.Indirect(reflect.ValueOf(subject)).Type() names, ok := n.index[tpe] if !ok { @@ -237,6 +260,8 @@ func (n *NameProvider) GetJSONName(subject interface{}, name string) (string, bo // GetJSONNameForType gets the json name for a go property name on a given type func (n *NameProvider) GetJSONNameForType(tpe reflect.Type, name string) (string, bool) { + n.lock.Lock() + defer n.lock.Unlock() names, ok := n.index[tpe] if !ok { names = n.makeNameIndex(tpe) @@ -246,8 +271,6 @@ func (n *NameProvider) GetJSONNameForType(tpe reflect.Type, name string) (string } func (n *NameProvider) makeNameIndex(tpe reflect.Type) nameIndex { - n.lock.Lock() - defer n.lock.Unlock() names := newNameIndex(tpe) n.index[tpe] = names return names @@ -261,6 +284,8 @@ func (n *NameProvider) GetGoName(subject interface{}, name string) (string, bool // GetGoNameForType gets the go name for a given type for a json property name func (n *NameProvider) GetGoNameForType(tpe reflect.Type, name string) (string, bool) { + n.lock.Lock() + defer n.lock.Unlock() names, ok := n.index[tpe] if !ok { names = n.makeNameIndex(tpe) diff --git a/vendor/github.com/go-openapi/swag/json_test.go b/vendor/github.com/go-openapi/swag/json_test.go new file mode 100644 index 000000000..a7d0d9821 --- /dev/null +++ b/vendor/github.com/go-openapi/swag/json_test.go @@ -0,0 +1,163 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package swag + +import ( + "reflect" + "testing" + + "github.com/stretchr/testify/assert" +) + +type testNameStruct struct { + Name string `json:"name"` + NotTheSame int64 `json:"plain"` + Ignored string `json:"-"` +} + +func TestNameProvider(t *testing.T) { + + provider := NewNameProvider() + + var obj = testNameStruct{} + + nm, ok := provider.GetGoName(obj, "name") + assert.True(t, ok) + assert.Equal(t, "Name", nm) + + nm, ok = provider.GetGoName(obj, "plain") + assert.True(t, ok) + assert.Equal(t, "NotTheSame", nm) + + nm, ok = provider.GetGoName(obj, "doesNotExist") + assert.False(t, ok) + assert.Empty(t, nm) + + nm, ok = provider.GetGoName(obj, "ignored") + assert.False(t, ok) + assert.Empty(t, nm) + + tpe := reflect.TypeOf(obj) + nm, ok = provider.GetGoNameForType(tpe, "name") + assert.True(t, ok) + assert.Equal(t, "Name", nm) + + nm, ok = provider.GetGoNameForType(tpe, "plain") + assert.True(t, ok) + assert.Equal(t, "NotTheSame", nm) + + nm, ok = provider.GetGoNameForType(tpe, "doesNotExist") + assert.False(t, ok) + assert.Empty(t, nm) + + nm, ok = provider.GetGoNameForType(tpe, "ignored") + assert.False(t, ok) + assert.Empty(t, nm) + + ptr := &obj + nm, ok = provider.GetGoName(ptr, "name") + assert.True(t, ok) + assert.Equal(t, "Name", nm) + + nm, ok = provider.GetGoName(ptr, "plain") + assert.True(t, ok) + assert.Equal(t, "NotTheSame", nm) + + nm, ok = provider.GetGoName(ptr, "doesNotExist") + assert.False(t, ok) + assert.Empty(t, nm) + + nm, ok = provider.GetGoName(ptr, "ignored") + assert.False(t, ok) + assert.Empty(t, nm) + + nm, ok = provider.GetJSONName(obj, "Name") + assert.True(t, ok) + assert.Equal(t, "name", nm) + + nm, ok = provider.GetJSONName(obj, "NotTheSame") + assert.True(t, ok) + assert.Equal(t, "plain", nm) + + nm, ok = provider.GetJSONName(obj, "DoesNotExist") + assert.False(t, ok) + assert.Empty(t, nm) + + nm, ok = provider.GetJSONName(obj, "Ignored") + assert.False(t, ok) + assert.Empty(t, nm) + + nm, ok = provider.GetJSONNameForType(tpe, "Name") + assert.True(t, ok) + assert.Equal(t, "name", nm) + + nm, ok = provider.GetJSONNameForType(tpe, "NotTheSame") + assert.True(t, ok) + assert.Equal(t, "plain", nm) + + nm, ok = provider.GetJSONNameForType(tpe, "doesNotExist") + assert.False(t, ok) + assert.Empty(t, nm) + + nm, ok = provider.GetJSONNameForType(tpe, "Ignored") + assert.False(t, ok) + assert.Empty(t, nm) + + nm, ok = provider.GetJSONName(ptr, "Name") + assert.True(t, ok) + assert.Equal(t, "name", nm) + + nm, ok = provider.GetJSONName(ptr, "NotTheSame") + assert.True(t, ok) + assert.Equal(t, "plain", nm) + + nm, ok = provider.GetJSONName(ptr, "doesNotExist") + assert.False(t, ok) + assert.Empty(t, nm) + + nm, ok = provider.GetJSONName(ptr, "Ignored") + assert.False(t, ok) + assert.Empty(t, nm) + + nms := provider.GetJSONNames(ptr) + assert.Len(t, nms, 2) + + assert.Len(t, provider.index, 1) + +} + +func TestJSONConcatenation(t *testing.T) { + assert.Nil(t, ConcatJSON()) + assert.Equal(t, ConcatJSON([]byte(`{"id":1}`)), []byte(`{"id":1}`)) + assert.Equal(t, ConcatJSON([]byte(`{}`), []byte(`{}`)), []byte(`{}`)) + assert.Equal(t, ConcatJSON([]byte(`[]`), []byte(`[]`)), []byte(`[]`)) + assert.Equal(t, ConcatJSON([]byte(`{"id":1}`), []byte(`{"name":"Rachel"}`)), []byte(`{"id":1,"name":"Rachel"}`)) + assert.Equal(t, ConcatJSON([]byte(`[{"id":1}]`), []byte(`[{"name":"Rachel"}]`)), []byte(`[{"id":1},{"name":"Rachel"}]`)) + assert.Equal(t, ConcatJSON([]byte(`{}`), []byte(`{"name":"Rachel"}`)), []byte(`{"name":"Rachel"}`)) + assert.Equal(t, ConcatJSON([]byte(`[]`), []byte(`[{"name":"Rachel"}]`)), []byte(`[{"name":"Rachel"}]`)) + assert.Equal(t, ConcatJSON([]byte(`{"id":1}`), []byte(`{}`)), []byte(`{"id":1}`)) + assert.Equal(t, ConcatJSON([]byte(`[{"id":1}]`), []byte(`[]`)), []byte(`[{"id":1}]`)) + assert.Equal(t, ConcatJSON([]byte(`{}`), []byte(`{}`), []byte(`{}`)), []byte(`{}`)) + assert.Equal(t, ConcatJSON([]byte(`[]`), []byte(`[]`), []byte(`[]`)), []byte(`[]`)) + assert.Equal(t, ConcatJSON([]byte(`{"id":1}`), []byte(`{"name":"Rachel"}`), []byte(`{"age":32}`)), []byte(`{"id":1,"name":"Rachel","age":32}`)) + assert.Equal(t, ConcatJSON([]byte(`[{"id":1}]`), []byte(`[{"name":"Rachel"}]`), []byte(`[{"age":32}]`)), []byte(`[{"id":1},{"name":"Rachel"},{"age":32}]`)) + assert.Equal(t, ConcatJSON([]byte(`{}`), []byte(`{"name":"Rachel"}`), []byte(`{"age":32}`)), []byte(`{"name":"Rachel","age":32}`)) + assert.Equal(t, ConcatJSON([]byte(`[]`), []byte(`[{"name":"Rachel"}]`), []byte(`[{"age":32}]`)), []byte(`[{"name":"Rachel"},{"age":32}]`)) + assert.Equal(t, ConcatJSON([]byte(`{"id":1}`), []byte(`{}`), []byte(`{"age":32}`)), []byte(`{"id":1,"age":32}`)) + assert.Equal(t, ConcatJSON([]byte(`[{"id":1}]`), []byte(`[]`), []byte(`[{"age":32}]`)), []byte(`[{"id":1},{"age":32}]`)) + assert.Equal(t, ConcatJSON([]byte(`{"id":1}`), []byte(`{"name":"Rachel"}`), []byte(`{}`)), []byte(`{"id":1,"name":"Rachel"}`)) + assert.Equal(t, ConcatJSON([]byte(`[{"id":1}]`), []byte(`[{"name":"Rachel"}]`), []byte(`[]`)), []byte(`[{"id":1},{"name":"Rachel"}]`)) + +} diff --git a/vendor/github.com/go-openapi/swag/loading.go b/vendor/github.com/go-openapi/swag/loading.go index 6dbc31330..62ed1e80a 100644 --- a/vendor/github.com/go-openapi/swag/loading.go +++ b/vendor/github.com/go-openapi/swag/loading.go @@ -17,13 +17,25 @@ package swag import ( "fmt" "io/ioutil" + "log" "net/http" + "path/filepath" "strings" + "time" ) +// LoadHTTPTimeout the default timeout for load requests +var LoadHTTPTimeout = 30 * time.Second + // LoadFromFileOrHTTP loads the bytes from a file or a remote http server based on the path passed in func LoadFromFileOrHTTP(path string) ([]byte, error) { - return LoadStrategy(path, ioutil.ReadFile, loadHTTPBytes)(path) + return LoadStrategy(path, ioutil.ReadFile, loadHTTPBytes(LoadHTTPTimeout))(path) +} + +// LoadFromFileOrHTTPWithTimeout loads the bytes from a file or a remote http server based on the path passed in +// timeout arg allows for per request overriding of the request timeout +func LoadFromFileOrHTTPWithTimeout(path string, timeout time.Duration) ([]byte, error) { + return LoadStrategy(path, ioutil.ReadFile, loadHTTPBytes(timeout))(path) } // LoadStrategy returns a loader function for a given path or uri @@ -31,19 +43,32 @@ func LoadStrategy(path string, local, remote func(string) ([]byte, error)) func( if strings.HasPrefix(path, "http") { return remote } - return local + return func(pth string) ([]byte, error) { return local(filepath.FromSlash(pth)) } } -func loadHTTPBytes(path string) ([]byte, error) { - resp, err := http.Get(path) - if err != nil { - return nil, err - } - defer resp.Body.Close() +func loadHTTPBytes(timeout time.Duration) func(path string) ([]byte, error) { + return func(path string) ([]byte, error) { + client := &http.Client{Timeout: timeout} + req, err := http.NewRequest("GET", path, nil) + if err != nil { + return nil, err + } + resp, err := client.Do(req) + defer func() { + if resp != nil { + if e := resp.Body.Close(); e != nil { + log.Println(e) + } + } + }() + if err != nil { + return nil, err + } - if resp.StatusCode != http.StatusOK { - return nil, fmt.Errorf("could not access document at %q [%s] ", path, resp.Status) - } + if resp.StatusCode != http.StatusOK { + return nil, fmt.Errorf("could not access document at %q [%s] ", path, resp.Status) + } - return ioutil.ReadAll(resp.Body) + return ioutil.ReadAll(resp.Body) + } } diff --git a/vendor/github.com/go-openapi/swag/loading_test.go b/vendor/github.com/go-openapi/swag/loading_test.go new file mode 100644 index 000000000..7b8bdf48d --- /dev/null +++ b/vendor/github.com/go-openapi/swag/loading_test.go @@ -0,0 +1,47 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package swag + +import ( + "net/http" + "net/http/httptest" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestLoadFromHTTP(t *testing.T) { + + _, err := LoadFromFileOrHTTP("httx://12394:abd") + assert.Error(t, err) + + serv := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { + rw.WriteHeader(http.StatusNotFound) + })) + defer serv.Close() + + _, err = LoadFromFileOrHTTP(serv.URL) + assert.Error(t, err) + + ts2 := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { + rw.WriteHeader(http.StatusOK) + rw.Write([]byte("the content")) + })) + defer ts2.Close() + + d, err := LoadFromFileOrHTTP(ts2.URL) + assert.NoError(t, err) + assert.Equal(t, []byte("the content"), d) +} diff --git a/vendor/github.com/go-openapi/swag/net_test.go b/vendor/github.com/go-openapi/swag/net_test.go new file mode 100644 index 000000000..041db60a2 --- /dev/null +++ b/vendor/github.com/go-openapi/swag/net_test.go @@ -0,0 +1,30 @@ +package swag + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestSplitHostPort(t *testing.T) { + data := []struct { + Input string + Host string + Port int + Err bool + }{ + {"localhost:3933", "localhost", 3933, false}, + {"localhost:yellow", "", -1, true}, + {"localhost", "", -1, true}, + {"localhost:", "", -1, true}, + {"localhost:3933", "localhost", 3933, false}, + } + + for _, e := range data { + h, p, err := SplitHostPort(e.Input) + if (!e.Err && assert.NoError(t, err)) || (e.Err && assert.Error(t, err)) { + assert.Equal(t, e.Host, h) + assert.Equal(t, e.Port, p) + } + } +} diff --git a/vendor/github.com/go-openapi/swag/path.go b/vendor/github.com/go-openapi/swag/path.go index 273e9fbed..941bd0176 100644 --- a/vendor/github.com/go-openapi/swag/path.go +++ b/vendor/github.com/go-openapi/swag/path.go @@ -47,6 +47,9 @@ func FindInGoSearchPath(pkg string) string { // FullGoSearchPath gets the search paths for finding packages func FullGoSearchPath() string { allPaths := os.Getenv(GOPATHKey) + if allPaths == "" { + allPaths = filepath.Join(os.Getenv("HOME"), "go") + } if allPaths != "" { allPaths = strings.Join([]string{allPaths, runtime.GOROOT()}, ":") } else { diff --git a/vendor/github.com/go-openapi/swag/path_test.go b/vendor/github.com/go-openapi/swag/path_test.go new file mode 100644 index 000000000..743bba534 --- /dev/null +++ b/vendor/github.com/go-openapi/swag/path_test.go @@ -0,0 +1,118 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package swag + +import ( + "io/ioutil" + "os" + "path/filepath" + "path" + "runtime" + "testing" + + "github.com/stretchr/testify/assert" +) + +func makeDirStructure(t *testing.T, tgt string) (string, string, error) { + if tgt == "" { + tgt = "pkgpaths" + } + td, err := ioutil.TempDir("", tgt) + if err != nil { + return "", "", err + } + td2, err := ioutil.TempDir("", tgt+"-2") + if err != nil { + return "", "", err + } + realPath := filepath.Join(td, "src", "foo", "bar") + if err := os.MkdirAll(realPath, os.ModePerm); err != nil { + return "", "", err + } + linkPathBase := filepath.Join(td, "src", "baz") + if err := os.MkdirAll(linkPathBase, os.ModePerm); err != nil { + return "", "", err + } + linkPath := filepath.Join(linkPathBase, "das") + if err := os.Symlink(realPath, linkPath); err != nil { + return "", "", err + } + + realPath = filepath.Join(td2, "src", "fuu", "bir") + if err := os.MkdirAll(realPath, os.ModePerm); err != nil { + return "", "", err + } + linkPathBase = filepath.Join(td2, "src", "biz") + if err := os.MkdirAll(linkPathBase, os.ModePerm); err != nil { + return "", "", err + } + linkPath = filepath.Join(linkPathBase, "dis") + if err := os.Symlink(realPath, linkPath); err != nil { + return "", "", err + } + return td, td2, nil +} + +func TestFindPackage(t *testing.T) { + pth, pth2, err := makeDirStructure(t, "") + if err != nil { + t.Fatal(err) + } + defer func() { + os.RemoveAll(pth) + os.RemoveAll(pth2) + }() + + searchPath := pth + string(filepath.ListSeparator) + pth2 + // finds package when real name mentioned + pkg := FindInSearchPath(searchPath, "foo/bar") + assert.NotEmpty(t, pkg) + assertPath(t, path.Join(pth, "src", "foo", "bar"), pkg) + // finds package when real name is mentioned in secondary + pkg = FindInSearchPath(searchPath, "fuu/bir") + assert.NotEmpty(t, pkg) + assertPath(t, path.Join(pth2, "src", "fuu", "bir"), pkg) + // finds package when symlinked + pkg = FindInSearchPath(searchPath, "baz/das") + assert.NotEmpty(t, pkg) + assertPath(t, path.Join(pth, "src", "foo", "bar"), pkg) + // finds package when symlinked in secondary + pkg = FindInSearchPath(searchPath, "biz/dis") + assert.NotEmpty(t, pkg) + assertPath(t, path.Join(pth2, "src", "fuu", "bir"), pkg) + // return empty string when nothing is found + pkg = FindInSearchPath(searchPath, "not/there") + assert.Empty(t, pkg) +} + +func assertPath(t testing.TB, expected, actual string) bool { + fp, err := filepath.EvalSymlinks(expected) + if assert.NoError(t, err) { + return assert.Equal(t, fp, actual) + } + return true +} + +func TestFullGOPATH(t *testing.T) { + os.Unsetenv(GOPATHKey) + ngp := "/some/where:/other/place" + os.Setenv(GOPATHKey, ngp) + + ogp := os.Getenv(GOPATHKey) + defer os.Setenv(GOPATHKey, ogp) + + expected := ngp + ":" + runtime.GOROOT() + assert.Equal(t, expected, FullGoSearchPath()) +} diff --git a/vendor/github.com/go-openapi/swag/util.go b/vendor/github.com/go-openapi/swag/util.go index d8b54ee61..40751aab4 100644 --- a/vendor/github.com/go-openapi/swag/util.go +++ b/vendor/github.com/go-openapi/swag/util.go @@ -20,10 +20,12 @@ import ( "regexp" "sort" "strings" + "unicode" ) -// Taken from https://github.com/golang/lint/blob/1fab560e16097e5b69afb66eb93aab843ef77845/lint.go#L663-L698 +// Taken from https://github.com/golang/lint/blob/3390df4df2787994aea98de825b964ac7944b817/lint.go#L732-L769 var commonInitialisms = map[string]bool{ + "ACL": true, "API": true, "ASCII": true, "CPU": true, @@ -44,19 +46,21 @@ var commonInitialisms = map[string]bool{ "RPC": true, "SLA": true, "SMTP": true, + "SQL": true, "SSH": true, "TCP": true, "TLS": true, "TTL": true, "UDP": true, - "UUID": true, - "UID": true, "UI": true, + "UID": true, + "UUID": true, "URI": true, "URL": true, "UTF8": true, "VM": true, "XML": true, + "XMPP": true, "XSRF": true, "XSS": true, } @@ -246,6 +250,9 @@ func ToJSONName(name string) string { // ToVarName camelcases a name which can be underscored or pascal cased func ToVarName(name string) string { res := ToGoName(name) + if _, ok := commonInitialisms[res]; ok { + return lower(res) + } if len(res) <= 1 { return lower(res) } @@ -263,7 +270,18 @@ func ToGoName(name string) string { } out = append(out, uw) } - return strings.Join(out, "") + + result := strings.Join(out, "") + if len(result) > 0 { + ud := upper(result[:1]) + ru := []rune(ud) + if unicode.IsUpper(ru[0]) { + result = ud + result[1:] + } else { + result = "X" + ud + result[1:] + } + } + return result } // ContainsStringsCI searches a slice of strings for a case-insensitive match diff --git a/vendor/github.com/go-openapi/swag/util_test.go b/vendor/github.com/go-openapi/swag/util_test.go new file mode 100644 index 000000000..5db20b90f --- /dev/null +++ b/vendor/github.com/go-openapi/swag/util_test.go @@ -0,0 +1,277 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package swag + +import ( + "fmt" + "strings" + "testing" + "time" + + "github.com/stretchr/testify/assert" +) + +type translationSample struct { + str, out string +} + +func titleize(s string) string { return strings.ToTitle(s[:1]) + lower(s[1:]) } + +func TestToGoName(t *testing.T) { + samples := []translationSample{ + {"sample text", "SampleText"}, + {"sample-text", "SampleText"}, + {"sample_text", "SampleText"}, + {"sampleText", "SampleText"}, + {"sample 2 Text", "Sample2Text"}, + {"findThingById", "FindThingByID"}, + {"日本語sample 2 Text", "X日本語sample2Text"}, + {"日本語findThingById", "X日本語findThingByID"}, + } + + for k := range commonInitialisms { + samples = append(samples, + translationSample{"sample " + lower(k) + " text", "Sample" + k + "Text"}, + translationSample{"sample-" + lower(k) + "-text", "Sample" + k + "Text"}, + translationSample{"sample_" + lower(k) + "_text", "Sample" + k + "Text"}, + translationSample{"sample" + titleize(k) + "Text", "Sample" + k + "Text"}, + translationSample{"sample " + lower(k), "Sample" + k}, + translationSample{"sample-" + lower(k), "Sample" + k}, + translationSample{"sample_" + lower(k), "Sample" + k}, + translationSample{"sample" + titleize(k), "Sample" + k}, + translationSample{"sample " + titleize(k) + " text", "Sample" + k + "Text"}, + translationSample{"sample-" + titleize(k) + "-text", "Sample" + k + "Text"}, + translationSample{"sample_" + titleize(k) + "_text", "Sample" + k + "Text"}, + ) + } + + for _, sample := range samples { + assert.Equal(t, sample.out, ToGoName(sample.str)) + } +} + +func TestContainsStringsCI(t *testing.T) { + list := []string{"hello", "world", "and", "such"} + + assert.True(t, ContainsStringsCI(list, "hELLo")) + assert.True(t, ContainsStringsCI(list, "world")) + assert.True(t, ContainsStringsCI(list, "AND")) + assert.False(t, ContainsStringsCI(list, "nuts")) +} + +func TestSplitByFormat(t *testing.T) { + expected := []string{"one", "two", "three"} + for _, fmt := range []string{"csv", "pipes", "tsv", "ssv", "multi"} { + + var actual []string + switch fmt { + case "multi": + assert.Nil(t, SplitByFormat("", fmt)) + assert.Nil(t, SplitByFormat("blah", fmt)) + case "ssv": + actual = SplitByFormat(strings.Join(expected, " "), fmt) + assert.EqualValues(t, expected, actual) + case "pipes": + actual = SplitByFormat(strings.Join(expected, "|"), fmt) + assert.EqualValues(t, expected, actual) + case "tsv": + actual = SplitByFormat(strings.Join(expected, "\t"), fmt) + assert.EqualValues(t, expected, actual) + default: + actual = SplitByFormat(strings.Join(expected, ","), fmt) + assert.EqualValues(t, expected, actual) + } + } +} + +func TestJoinByFormat(t *testing.T) { + for _, fmt := range []string{"csv", "pipes", "tsv", "ssv", "multi"} { + + lval := []string{"one", "two", "three"} + var expected []string + switch fmt { + case "multi": + expected = lval + case "ssv": + expected = []string{strings.Join(lval, " ")} + case "pipes": + expected = []string{strings.Join(lval, "|")} + case "tsv": + expected = []string{strings.Join(lval, "\t")} + default: + expected = []string{strings.Join(lval, ",")} + } + assert.Nil(t, JoinByFormat(nil, fmt)) + assert.EqualValues(t, expected, JoinByFormat(lval, fmt)) + } +} + +func TestToFileName(t *testing.T) { + samples := []translationSample{ + {"SampleText", "sample_text"}, + {"FindThingByID", "find_thing_by_id"}, + } + + for k := range commonInitialisms { + samples = append(samples, + translationSample{"Sample" + k + "Text", "sample_" + lower(k) + "_text"}, + ) + } + + for _, sample := range samples { + assert.Equal(t, sample.out, ToFileName(sample.str)) + } +} + +func TestToCommandName(t *testing.T) { + samples := []translationSample{ + {"SampleText", "sample-text"}, + {"FindThingByID", "find-thing-by-id"}, + } + + for k := range commonInitialisms { + samples = append(samples, + translationSample{"Sample" + k + "Text", "sample-" + lower(k) + "-text"}, + ) + } + + for _, sample := range samples { + assert.Equal(t, sample.out, ToCommandName(sample.str)) + } +} + +func TestToHumanName(t *testing.T) { + samples := []translationSample{ + {"SampleText", "sample text"}, + {"FindThingByID", "find thing by ID"}, + } + + for k := range commonInitialisms { + samples = append(samples, + translationSample{"Sample" + k + "Text", "sample " + k + " text"}, + ) + } + + for _, sample := range samples { + assert.Equal(t, sample.out, ToHumanNameLower(sample.str)) + } +} + +func TestToJSONName(t *testing.T) { + samples := []translationSample{ + {"SampleText", "sampleText"}, + {"FindThingByID", "findThingById"}, + } + + for k := range commonInitialisms { + samples = append(samples, + translationSample{"Sample" + k + "Text", "sample" + titleize(k) + "Text"}, + ) + } + + for _, sample := range samples { + assert.Equal(t, sample.out, ToJSONName(sample.str)) + } +} + +type SimpleZeroes struct { + ID string + Name string +} +type ZeroesWithTime struct { + Time time.Time +} + +func TestIsZero(t *testing.T) { + var strs [5]string + var strss []string + var a int + var b int8 + var c int16 + var d int32 + var e int64 + var f uint + var g uint8 + var h uint16 + var i uint32 + var j uint64 + var k map[string]string + var l interface{} + var m *SimpleZeroes + var n string + var o SimpleZeroes + var p ZeroesWithTime + var q time.Time + data := []struct { + Data interface{} + Expected bool + }{ + {a, true}, + {b, true}, + {c, true}, + {d, true}, + {e, true}, + {f, true}, + {g, true}, + {h, true}, + {i, true}, + {j, true}, + {k, true}, + {l, true}, + {m, true}, + {n, true}, + {o, true}, + {p, true}, + {q, true}, + {strss, true}, + {strs, true}, + {"", true}, + {nil, true}, + {1, false}, + {0, true}, + {int8(1), false}, + {int8(0), true}, + {int16(1), false}, + {int16(0), true}, + {int32(1), false}, + {int32(0), true}, + {int64(1), false}, + {int64(0), true}, + {uint(1), false}, + {uint(0), true}, + {uint8(1), false}, + {uint8(0), true}, + {uint16(1), false}, + {uint16(0), true}, + {uint32(1), false}, + {uint32(0), true}, + {uint64(1), false}, + {uint64(0), true}, + {0.0, true}, + {0.1, false}, + {float32(0.0), true}, + {float32(0.1), false}, + {float64(0.0), true}, + {float64(0.1), false}, + {[...]string{}, true}, + {[...]string{"hello"}, false}, + {[]string(nil), true}, + {[]string{"a"}, false}, + } + + for _, it := range data { + assert.Equal(t, it.Expected, IsZero(it.Data), fmt.Sprintf("%#v", it.Data)) + } +} diff --git a/vendor/github.com/go-openapi/swag/yaml.go b/vendor/github.com/go-openapi/swag/yaml.go new file mode 100644 index 000000000..26502f21d --- /dev/null +++ b/vendor/github.com/go-openapi/swag/yaml.go @@ -0,0 +1,215 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package swag + +import ( + "encoding/json" + "fmt" + "path/filepath" + "strconv" + + "github.com/mailru/easyjson/jlexer" + "github.com/mailru/easyjson/jwriter" + + yaml "gopkg.in/yaml.v2" +) + +// YAMLMatcher matches yaml +func YAMLMatcher(path string) bool { + ext := filepath.Ext(path) + return ext == ".yaml" || ext == ".yml" +} + +// YAMLToJSON converts YAML unmarshaled data into json compatible data +func YAMLToJSON(data interface{}) (json.RawMessage, error) { + jm, err := transformData(data) + if err != nil { + return nil, err + } + b, err := WriteJSON(jm) + return json.RawMessage(b), err +} + +func BytesToYAMLDoc(data []byte) (interface{}, error) { + var canary map[interface{}]interface{} // validate this is an object and not a different type + if err := yaml.Unmarshal(data, &canary); err != nil { + return nil, err + } + + var document yaml.MapSlice // preserve order that is present in the document + if err := yaml.Unmarshal(data, &document); err != nil { + return nil, err + } + return document, nil +} + +type JSONMapSlice []JSONMapItem + +func (s JSONMapSlice) MarshalJSON() ([]byte, error) { + w := &jwriter.Writer{Flags: jwriter.NilMapAsEmpty | jwriter.NilSliceAsEmpty} + s.MarshalEasyJSON(w) + return w.BuildBytes() +} + +func (s JSONMapSlice) MarshalEasyJSON(w *jwriter.Writer) { + w.RawByte('{') + + ln := len(s) + last := ln - 1 + for i := 0; i < ln; i++ { + s[i].MarshalEasyJSON(w) + if i != last { // last item + w.RawByte(',') + } + } + + w.RawByte('}') +} + +func (s *JSONMapSlice) UnmarshalJSON(data []byte) error { + l := jlexer.Lexer{Data: data} + s.UnmarshalEasyJSON(&l) + return l.Error() +} +func (s *JSONMapSlice) UnmarshalEasyJSON(in *jlexer.Lexer) { + if in.IsNull() { + in.Skip() + return + } + + var result JSONMapSlice + in.Delim('{') + for !in.IsDelim('}') { + var mi JSONMapItem + mi.UnmarshalEasyJSON(in) + result = append(result, mi) + } + *s = result +} + +type JSONMapItem struct { + Key string + Value interface{} +} + +func (s JSONMapItem) MarshalJSON() ([]byte, error) { + w := &jwriter.Writer{Flags: jwriter.NilMapAsEmpty | jwriter.NilSliceAsEmpty} + s.MarshalEasyJSON(w) + return w.BuildBytes() +} + +func (s JSONMapItem) MarshalEasyJSON(w *jwriter.Writer) { + w.String(s.Key) + w.RawByte(':') + w.Raw(WriteJSON(s.Value)) +} + +func (s *JSONMapItem) UnmarshalEasyJSON(in *jlexer.Lexer) { + key := in.UnsafeString() + in.WantColon() + value := in.Interface() + in.WantComma() + s.Key = key + s.Value = value +} +func (s *JSONMapItem) UnmarshalJSON(data []byte) error { + l := jlexer.Lexer{Data: data} + s.UnmarshalEasyJSON(&l) + return l.Error() +} + +func transformData(input interface{}) (out interface{}, err error) { + switch in := input.(type) { + case yaml.MapSlice: + + o := make(JSONMapSlice, len(in)) + for i, mi := range in { + var nmi JSONMapItem + switch k := mi.Key.(type) { + case string: + nmi.Key = k + case int: + nmi.Key = strconv.Itoa(k) + default: + return nil, fmt.Errorf("types don't match expect map key string or int got: %T", mi.Key) + } + + v, err := transformData(mi.Value) + if err != nil { + return nil, err + } + nmi.Value = v + o[i] = nmi + } + return o, nil + case map[interface{}]interface{}: + o := make(JSONMapSlice, 0, len(in)) + for ke, va := range in { + var nmi JSONMapItem + switch k := ke.(type) { + case string: + nmi.Key = k + case int: + nmi.Key = strconv.Itoa(k) + default: + return nil, fmt.Errorf("types don't match expect map key string or int got: %T", ke) + } + + v, err := transformData(va) + if err != nil { + return nil, err + } + nmi.Value = v + o = append(o, nmi) + } + return o, nil + case []interface{}: + len1 := len(in) + o := make([]interface{}, len1) + for i := 0; i < len1; i++ { + o[i], err = transformData(in[i]) + if err != nil { + return nil, err + } + } + return o, nil + } + return input, nil +} + +// YAMLDoc loads a yaml document from either http or a file and converts it to json +func YAMLDoc(path string) (json.RawMessage, error) { + yamlDoc, err := YAMLData(path) + if err != nil { + return nil, err + } + + data, err := YAMLToJSON(yamlDoc) + if err != nil { + return nil, err + } + + return json.RawMessage(data), nil +} + +// YAMLData loads a yaml document from either http or a file +func YAMLData(path string) (interface{}, error) { + data, err := LoadFromFileOrHTTP(path) + if err != nil { + return nil, err + } + + return BytesToYAMLDoc(data) +} diff --git a/vendor/github.com/go-openapi/swag/yaml_test.go b/vendor/github.com/go-openapi/swag/yaml_test.go new file mode 100644 index 000000000..ee32fab7d --- /dev/null +++ b/vendor/github.com/go-openapi/swag/yaml_test.go @@ -0,0 +1,444 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package swag + +import ( + "encoding/json" + "errors" + "net/http" + "net/http/httptest" + "testing" + + yaml "gopkg.in/yaml.v2" + + "github.com/stretchr/testify/assert" +) + +type failJSONMarhal struct { +} + +func (f failJSONMarhal) MarshalJSON() ([]byte, error) { + return nil, errors.New("expected") +} + +func TestLoadHTTPBytes(t *testing.T) { + _, err := LoadFromFileOrHTTP("httx://12394:abd") + assert.Error(t, err) + + serv := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { + rw.WriteHeader(http.StatusNotFound) + })) + defer serv.Close() + + _, err = LoadFromFileOrHTTP(serv.URL) + assert.Error(t, err) + + ts2 := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { + rw.WriteHeader(http.StatusOK) + rw.Write([]byte("the content")) + })) + defer ts2.Close() + + d, err := LoadFromFileOrHTTP(ts2.URL) + assert.NoError(t, err) + assert.Equal(t, []byte("the content"), d) +} + +func TestYAMLToJSON(t *testing.T) { + + sd := `--- +1: the int key value +name: a string value +'y': some value +` + var data yaml.MapSlice + yaml.Unmarshal([]byte(sd), &data) + + d, err := YAMLToJSON(data) + if assert.NoError(t, err) { + assert.Equal(t, `{"1":"the int key value","name":"a string value","y":"some value"}`, string(d)) + } + + data = append(data, yaml.MapItem{Key: true, Value: "the bool value"}) + d, err = YAMLToJSON(data) + assert.Error(t, err) + assert.Nil(t, d) + + data = data[:len(data)-1] + + tag := yaml.MapSlice{{Key: "name", Value: "tag name"}} + data = append(data, yaml.MapItem{Key: "tag", Value: tag}) + + d, err = YAMLToJSON(data) + assert.NoError(t, err) + assert.Equal(t, `{"1":"the int key value","name":"a string value","y":"some value","tag":{"name":"tag name"}}`, string(d)) + + tag = yaml.MapSlice{{Key: true, Value: "bool tag name"}} + data = append(data[:len(data)-1], yaml.MapItem{Key: "tag", Value: tag}) + + d, err = YAMLToJSON(data) + assert.Error(t, err) + assert.Nil(t, d) + + var lst []interface{} + lst = append(lst, "hello") + + d, err = YAMLToJSON(lst) + assert.NoError(t, err) + assert.Equal(t, []byte(`["hello"]`), []byte(d)) + + lst = append(lst, data) + + d, err = YAMLToJSON(lst) + assert.Error(t, err) + assert.Nil(t, d) + + // _, err := yamlToJSON(failJSONMarhal{}) + // assert.Error(t, err) + + _, err = BytesToYAMLDoc([]byte("- name: hello\n")) + assert.Error(t, err) + + dd, err := BytesToYAMLDoc([]byte("description: 'object created'\n")) + assert.NoError(t, err) + + d, err = YAMLToJSON(dd) + assert.NoError(t, err) + assert.Equal(t, json.RawMessage(`{"description":"object created"}`), d) +} + +func TestLoadStrategy(t *testing.T) { + + loader := func(p string) ([]byte, error) { + return []byte(yamlPetStore), nil + } + remLoader := func(p string) ([]byte, error) { + return []byte("not it"), nil + } + + ld := LoadStrategy("blah", loader, remLoader) + b, _ := ld("") + assert.Equal(t, []byte(yamlPetStore), b) + + serv := httptest.NewServer(http.HandlerFunc(yamlPestoreServer)) + defer serv.Close() + + s, err := YAMLDoc(serv.URL) + assert.NoError(t, err) + assert.NotNil(t, s) + + ts2 := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { + rw.WriteHeader(http.StatusNotFound) + rw.Write([]byte("\n")) + })) + defer ts2.Close() + _, err = YAMLDoc(ts2.URL) + assert.Error(t, err) +} + +var yamlPestoreServer = func(rw http.ResponseWriter, r *http.Request) { + rw.WriteHeader(http.StatusOK) + rw.Write([]byte(yamlPetStore)) +} + +func TestWithYKey(t *testing.T) { + doc, err := BytesToYAMLDoc([]byte(withYKey)) + if assert.NoError(t, err) { + _, err := YAMLToJSON(doc) + if assert.Error(t, err) { + doc, err := BytesToYAMLDoc([]byte(withQuotedYKey)) + if assert.NoError(t, err) { + jsond, err := YAMLToJSON(doc) + if assert.NoError(t, err) { + var yt struct { + Definitions struct { + Viewbox struct { + Properties struct { + Y struct { + Type string `json:"type"` + } `json:"y"` + } `json:"properties"` + } `json:"viewbox"` + } `json:"definitions"` + } + if assert.NoError(t, json.Unmarshal(jsond, &yt)) { + assert.Equal(t, "integer", yt.Definitions.Viewbox.Properties.Y.Type) + } + } + } + } + + } +} + +const withQuotedYKey = `consumes: +- application/json +definitions: + viewBox: + type: object + properties: + x: + type: integer + format: int16 + # y -> types don't match: expect map key string or int get: bool + "y": + type: integer + format: int16 + width: + type: integer + format: int16 + height: + type: integer + format: int16 +info: + description: Test RESTful APIs + title: Test Server + version: 1.0.0 +basePath: /api +paths: + /test: + get: + operationId: findAll + parameters: + - name: since + in: query + type: integer + format: int64 + - name: limit + in: query + type: integer + format: int32 + default: 20 + responses: + 200: + description: Array[Trigger] + schema: + type: array + items: + $ref: "#/definitions/viewBox" +produces: +- application/json +schemes: +- https +swagger: "2.0" +` + +const withYKey = `consumes: +- application/json +definitions: + viewBox: + type: object + properties: + x: + type: integer + format: int16 + # y -> types don't match: expect map key string or int get: bool + y: + type: integer + format: int16 + width: + type: integer + format: int16 + height: + type: integer + format: int16 +info: + description: Test RESTful APIs + title: Test Server + version: 1.0.0 +basePath: /api +paths: + /test: + get: + operationId: findAll + parameters: + - name: since + in: query + type: integer + format: int64 + - name: limit + in: query + type: integer + format: int32 + default: 20 + responses: + 200: + description: Array[Trigger] + schema: + type: array + items: + $ref: "#/definitions/viewBox" +produces: +- application/json +schemes: +- https +swagger: "2.0" +` + +const yamlPetStore = `swagger: '2.0' +info: + version: '1.0.0' + title: Swagger Petstore + description: A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification + termsOfService: http://helloreverb.com/terms/ + contact: + name: Swagger API team + email: foo@example.com + url: http://swagger.io + license: + name: MIT + url: http://opensource.org/licenses/MIT +host: petstore.swagger.wordnik.com +basePath: /api +schemes: + - http +consumes: + - application/json +produces: + - application/json +paths: + /pets: + get: + description: Returns all pets from the system that the user has access to + operationId: findPets + produces: + - application/json + - application/xml + - text/xml + - text/html + parameters: + - name: tags + in: query + description: tags to filter by + required: false + type: array + items: + type: string + collectionFormat: csv + - name: limit + in: query + description: maximum number of results to return + required: false + type: integer + format: int32 + responses: + '200': + description: pet response + schema: + type: array + items: + $ref: '#/definitions/pet' + default: + description: unexpected error + schema: + $ref: '#/definitions/errorModel' + post: + description: Creates a new pet in the store. Duplicates are allowed + operationId: addPet + produces: + - application/json + parameters: + - name: pet + in: body + description: Pet to add to the store + required: true + schema: + $ref: '#/definitions/newPet' + responses: + '200': + description: pet response + schema: + $ref: '#/definitions/pet' + default: + description: unexpected error + schema: + $ref: '#/definitions/errorModel' + /pets/{id}: + get: + description: Returns a user based on a single ID, if the user does not have access to the pet + operationId: findPetById + produces: + - application/json + - application/xml + - text/xml + - text/html + parameters: + - name: id + in: path + description: ID of pet to fetch + required: true + type: integer + format: int64 + responses: + '200': + description: pet response + schema: + $ref: '#/definitions/pet' + default: + description: unexpected error + schema: + $ref: '#/definitions/errorModel' + delete: + description: deletes a single pet based on the ID supplied + operationId: deletePet + parameters: + - name: id + in: path + description: ID of pet to delete + required: true + type: integer + format: int64 + responses: + '204': + description: pet deleted + default: + description: unexpected error + schema: + $ref: '#/definitions/errorModel' +definitions: + pet: + required: + - id + - name + properties: + id: + type: integer + format: int64 + name: + type: string + tag: + type: string + newPet: + allOf: + - $ref: '#/definitions/pet' + - required: + - name + properties: + id: + type: integer + format: int64 + name: + type: string + errorModel: + required: + - code + - message + properties: + code: + type: integer + format: int32 + message: + type: string +` diff --git a/vendor/github.com/gogo/protobuf/.gitignore b/vendor/github.com/gogo/protobuf/.gitignore new file mode 100644 index 000000000..76009479d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/.gitignore @@ -0,0 +1,3 @@ +._* +*.js +*.js.map diff --git a/vendor/github.com/gogo/protobuf/.mailmap b/vendor/github.com/gogo/protobuf/.mailmap new file mode 100644 index 000000000..bc0010219 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/.mailmap @@ -0,0 +1,8 @@ +Walter Schulze Walter Schulze +Walter Schulze +Walter Schulze awalterschulze +Walter Schulze awalterschulze@gmail.com +John Tuley +Anton Povarov +Denis Smirnov dennwc +DongYun Kang \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/.travis.yml b/vendor/github.com/gogo/protobuf/.travis.yml new file mode 100644 index 000000000..31ebd3150 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/.travis.yml @@ -0,0 +1,24 @@ +env: + - PROTOBUF_VERSION=2.6.1 + - PROTOBUF_VERSION=3.0.2 + - PROTOBUF_VERSION=3.1.0 + +before_install: + - ./install-protobuf.sh + - PATH=/home/travis/bin:$PATH protoc --version + +script: + - PATH=/home/travis/bin:$PATH make buildserverall + - echo $TRAVIS_GO_VERSION + - if [ "$TRAVIS_GO_VERSION" == 1.8 ] && [[ "$PROTOBUF_VERSION" == 3.1.0 ]]; then ! git status --porcelain | read || (git status; git diff; exit 1); fi + +language: go + +go: + - 1.6.3 + - 1.7.1 + - 1.8 + +matrix: + allow_failures: + - go: 1.6.3 diff --git a/vendor/golang.org/x/oauth2/CONTRIBUTORS b/vendor/github.com/gogo/protobuf/GOLANG_CONTRIBUTORS similarity index 55% rename from vendor/golang.org/x/oauth2/CONTRIBUTORS rename to vendor/github.com/gogo/protobuf/GOLANG_CONTRIBUTORS index 1c4577e96..b368efb7f 100644 --- a/vendor/golang.org/x/oauth2/CONTRIBUTORS +++ b/vendor/github.com/gogo/protobuf/GOLANG_CONTRIBUTORS @@ -1,3 +1,5 @@ +The contributors to the Go protobuf repository: + # This source code was written by the Go contributors. # The master list of contributors is in the main Go distribution, -# visible at http://tip.golang.org/CONTRIBUTORS. +# visible at http://tip.golang.org/CONTRIBUTORS. \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/Makefile b/vendor/github.com/gogo/protobuf/Makefile new file mode 100644 index 000000000..0dcb4ab71 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/Makefile @@ -0,0 +1,154 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# 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. +# +# 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. + +GO_VERSION:=$(shell go version) + +.PHONY: nuke regenerate tests clean install gofmt vet contributors + +all: clean install regenerate install tests errcheck vet + +buildserverall: clean install regenerate install tests vet js + +install: + go install ./proto + go install ./gogoproto + go install ./jsonpb + go install ./protoc-gen-gogo + go install ./protoc-gen-gofast + go install ./protoc-gen-gogofast + go install ./protoc-gen-gogofaster + go install ./protoc-gen-gogoslick + go install ./protoc-gen-gostring + go install ./protoc-min-version + go install ./protoc-gen-combo + go install ./gogoreplace + +clean: + go clean ./... + +nuke: + go clean -i ./... + +gofmt: + gofmt -l -s -w . + +regenerate: + make -C protoc-gen-gogo/descriptor regenerate + make -C protoc-gen-gogo/plugin regenerate + make -C protoc-gen-gogo/testdata regenerate + make -C gogoproto regenerate + make -C proto/testdata regenerate + make -C jsonpb/jsonpb_test_proto regenerate + make -C _conformance regenerate + make -C types regenerate + make -C test regenerate + make -C test/example regenerate + make -C test/unrecognized regenerate + make -C test/group regenerate + make -C test/unrecognizedgroup regenerate + make -C test/enumstringer regenerate + make -C test/unmarshalmerge regenerate + make -C test/moredefaults regenerate + make -C test/issue8 regenerate + make -C test/enumprefix regenerate + make -C test/enumcustomname regenerate + make -C test/packed regenerate + make -C test/protosize regenerate + make -C test/tags regenerate + make -C test/oneof regenerate + make -C test/oneof3 regenerate + make -C test/theproto3 regenerate + make -C test/mapsproto2 regenerate + make -C test/issue42order regenerate + make -C proto generate-test-pbs + make -C test/importdedup regenerate + make -C test/custombytesnonstruct regenerate + make -C test/required regenerate + make -C test/casttype regenerate + make -C test/castvalue regenerate + make -C vanity/test regenerate + make -C test/sizeunderscore regenerate + make -C test/issue34 regenerate + make -C test/empty-issue70 regenerate + make -C test/indeximport-issue72 regenerate + make -C test/fuzztests regenerate + make -C test/oneofembed regenerate + make -C test/asymetric-issue125 regenerate + make -C test/filedotname regenerate + make -C test/nopackage regenerate + make -C test/types regenerate + make -C test/proto3extension regenerate + make -C test/stdtypes regenerate + make -C test/data regenerate + make -C test/typedecl regenerate + make -C test/issue260 regenerate + make -C test/issue261 regenerate + make -C test/issue262 regenerate + make -C test/enumdecl regenerate + make -C test/typedecl_all regenerate + make -C test/enumdecl_all regenerate + make gofmt + +tests: + go build ./test/enumprefix + go test ./... + +vet: + go vet ./... + go tool vet --shadow . + +errcheck: + go get github.com/kisielk/errcheck + errcheck ./test/... + +drone: + sudo apt-get install protobuf-compiler + (cd $(GOPATH)/src/github.com/gogo/protobuf && make buildserverall) + +testall: + go get -u github.com/golang/protobuf/proto + make -C protoc-gen-gogo/testdata test + make -C vanity/test test + make -C test/registration test + make tests + +bench: + (cd test/mixbench && go build .) + (cd test/mixbench && ./mixbench) + +contributors: + git log --format='%aN <%aE>' | sort -fu > CONTRIBUTORS + +js: +ifeq (go1.8, $(findstring go1.8, $(GO_VERSION))) + go get github.com/gopherjs/gopherjs + gopherjs build github.com/gogo/protobuf/protoc-gen-gogo +endif + +update: + (cd protobuf && make update) diff --git a/vendor/github.com/gogo/protobuf/README b/vendor/github.com/gogo/protobuf/README new file mode 100644 index 000000000..0ad513633 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/README @@ -0,0 +1,258 @@ +GoGoProtobuf http://github.com/gogo/protobuf extends +GoProtobuf http://github.com/golang/protobuf + +# Go support for Protocol Buffers + +Google's data interchange format. +Copyright 2010 The Go Authors. +https://github.com/golang/protobuf + +This package and the code it generates requires at least Go 1.4. + +This software implements Go bindings for protocol buffers. For +information about protocol buffers themselves, see + https://developers.google.com/protocol-buffers/ + +## Installation ## + +To use this software, you must: +- Install the standard C++ implementation of protocol buffers from + https://developers.google.com/protocol-buffers/ +- Of course, install the Go compiler and tools from + https://golang.org/ + See + https://golang.org/doc/install + for details or, if you are using gccgo, follow the instructions at + https://golang.org/doc/install/gccgo +- Grab the code from the repository and install the proto package. + The simplest way is to run `go get -u github.com/golang/protobuf/{proto,protoc-gen-go}`. + The compiler plugin, protoc-gen-go, will be installed in $GOBIN, + defaulting to $GOPATH/bin. It must be in your $PATH for the protocol + compiler, protoc, to find it. + +This software has two parts: a 'protocol compiler plugin' that +generates Go source files that, once compiled, can access and manage +protocol buffers; and a library that implements run-time support for +encoding (marshaling), decoding (unmarshaling), and accessing protocol +buffers. + +There is support for gRPC in Go using protocol buffers. +See the note at the bottom of this file for details. + +There are no insertion points in the plugin. + +GoGoProtobuf provides extensions for protocol buffers and GoProtobuf +see http://github.com/gogo/protobuf/gogoproto/doc.go + +## Using protocol buffers with Go ## + +Once the software is installed, there are two steps to using it. +First you must compile the protocol buffer definitions and then import +them, with the support library, into your program. + +To compile the protocol buffer definition, run protoc with the --gogo_out +parameter set to the directory you want to output the Go code to. + + protoc --gogo_out=. *.proto + +The generated files will be suffixed .pb.go. See the Test code below +for an example using such a file. + +The package comment for the proto library contains text describing +the interface provided in Go for protocol buffers. Here is an edited +version. + +If you are using any gogo.proto extensions you will need to specify the +proto_path to include the descriptor.proto and gogo.proto. +gogo.proto is located in github.com/gogo/protobuf/gogoproto +This should be fine, since your import is the same. +descriptor.proto is located in either github.com/gogo/protobuf/protobuf +or code.google.com/p/protobuf/trunk/src/ +Its import is google/protobuf/descriptor.proto so it might need some help. + + protoc --gogo_out=. -I=.:github.com/gogo/protobuf/protobuf *.proto + +========== + +The proto package converts data structures to and from the +wire format of protocol buffers. It works in concert with the +Go source code generated for .proto files by the protocol compiler. + +A summary of the properties of the protocol buffer interface +for a protocol buffer variable v: + + - Names are turned from camel_case to CamelCase for export. + - There are no methods on v to set fields; just treat + them as structure fields. + - There are getters that return a field's value if set, + and return the field's default value if unset. + The getters work even if the receiver is a nil message. + - The zero value for a struct is its correct initialization state. + All desired fields must be set before marshaling. + - A Reset() method will restore a protobuf struct to its zero state. + - Non-repeated fields are pointers to the values; nil means unset. + That is, optional or required field int32 f becomes F *int32. + - Repeated fields are slices. + - Helper functions are available to aid the setting of fields. + Helpers for getting values are superseded by the + GetFoo methods and their use is deprecated. + msg.Foo = proto.String("hello") // set field + - Constants are defined to hold the default values of all fields that + have them. They have the form Default_StructName_FieldName. + Because the getter methods handle defaulted values, + direct use of these constants should be rare. + - Enums are given type names and maps from names to values. + Enum values are prefixed with the enum's type name. Enum types have + a String method, and a Enum method to assist in message construction. + - Nested groups and enums have type names prefixed with the name of + the surrounding message type. + - Extensions are given descriptor names that start with E_, + followed by an underscore-delimited list of the nested messages + that contain it (if any) followed by the CamelCased name of the + extension field itself. HasExtension, ClearExtension, GetExtension + and SetExtension are functions for manipulating extensions. + - Oneof field sets are given a single field in their message, + with distinguished wrapper types for each possible field value. + - Marshal and Unmarshal are functions to encode and decode the wire format. + +When the .proto file specifies `syntax="proto3"`, there are some differences: + + - Non-repeated fields of non-message type are values instead of pointers. + - Getters are only generated for message and oneof fields. + - Enum types do not get an Enum method. + +Consider file test.proto, containing + +```proto + package example; + + enum FOO { X = 17; }; + + message Test { + required string label = 1; + optional int32 type = 2 [default=77]; + repeated int64 reps = 3; + optional group OptionalGroup = 4 { + required string RequiredField = 5; + } + } +``` + +To create and play with a Test object from the example package, + +```go + package main + + import ( + "log" + + "github.com/gogo/protobuf/proto" + "path/to/example" + ) + + func main() { + test := &example.Test { + Label: proto.String("hello"), + Type: proto.Int32(17), + Reps: []int64{1, 2, 3}, + Optionalgroup: &example.Test_OptionalGroup { + RequiredField: proto.String("good bye"), + }, + } + data, err := proto.Marshal(test) + if err != nil { + log.Fatal("marshaling error: ", err) + } + newTest := &example.Test{} + err = proto.Unmarshal(data, newTest) + if err != nil { + log.Fatal("unmarshaling error: ", err) + } + // Now test and newTest contain the same data. + if test.GetLabel() != newTest.GetLabel() { + log.Fatalf("data mismatch %q != %q", test.GetLabel(), newTest.GetLabel()) + } + // etc. + } +``` + + +## Parameters ## + +To pass extra parameters to the plugin, use a comma-separated +parameter list separated from the output directory by a colon: + + + protoc --gogo_out=plugins=grpc,import_path=mypackage:. *.proto + + +- `import_prefix=xxx` - a prefix that is added onto the beginning of + all imports. Useful for things like generating protos in a + subdirectory, or regenerating vendored protobufs in-place. +- `import_path=foo/bar` - used as the package if no input files + declare `go_package`. If it contains slashes, everything up to the + rightmost slash is ignored. +- `plugins=plugin1+plugin2` - specifies the list of sub-plugins to + load. The only plugin in this repo is `grpc`. +- `Mfoo/bar.proto=quux/shme` - declares that foo/bar.proto is + associated with Go package quux/shme. This is subject to the + import_prefix parameter. + +## gRPC Support ## + +If a proto file specifies RPC services, protoc-gen-go can be instructed to +generate code compatible with gRPC (http://www.grpc.io/). To do this, pass +the `plugins` parameter to protoc-gen-go; the usual way is to insert it into +the --go_out argument to protoc: + + protoc --gogo_out=plugins=grpc:. *.proto + +## Compatibility ## + +The library and the generated code are expected to be stable over time. +However, we reserve the right to make breaking changes without notice for the +following reasons: + +- Security. A security issue in the specification or implementation may come to + light whose resolution requires breaking compatibility. We reserve the right + to address such security issues. +- Unspecified behavior. There are some aspects of the Protocol Buffers + specification that are undefined. Programs that depend on such unspecified + behavior may break in future releases. +- Specification errors or changes. If it becomes necessary to address an + inconsistency, incompleteness, or change in the Protocol Buffers + specification, resolving the issue could affect the meaning or legality of + existing programs. We reserve the right to address such issues, including + updating the implementations. +- Bugs. If the library has a bug that violates the specification, a program + that depends on the buggy behavior may break if the bug is fixed. We reserve + the right to fix such bugs. +- Adding methods or fields to generated structs. These may conflict with field + names that already exist in a schema, causing applications to break. When the + code generator encounters a field in the schema that would collide with a + generated field or method name, the code generator will append an underscore + to the generated field or method name. +- Adding, removing, or changing methods or fields in generated structs that + start with `XXX`. These parts of the generated code are exported out of + necessity, but should not be considered part of the public API. +- Adding, removing, or changing unexported symbols in generated code. + +Any breaking changes outside of these will be announced 6 months in advance to +protobuf@googlegroups.com. + +You should, whenever possible, use generated code created by the `protoc-gen-go` +tool built at the same commit as the `proto` package. The `proto` package +declares package-level constants in the form `ProtoPackageIsVersionX`. +Application code and generated code may depend on one of these constants to +ensure that compilation will fail if the available version of the proto library +is too old. Whenever we make a change to the generated code that requires newer +library support, in the same commit we will increment the version number of the +generated code and declare a new package-level constant whose name incorporates +the latest version number. Removing a compatibility constant is considered a +breaking change and would be subject to the announcement policy stated above. + +## Plugins ## + +The `protoc-gen-go/generator` package exposes a plugin interface, +which is used by the gRPC code generation. This interface is not +supported and is subject to incompatible changes without notice. diff --git a/vendor/github.com/gogo/protobuf/Readme.md b/vendor/github.com/gogo/protobuf/Readme.md new file mode 100644 index 000000000..d31c13f83 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/Readme.md @@ -0,0 +1,117 @@ +# Protocol Buffers for Go with Gadgets + +[![Build Status](https://travis-ci.org/gogo/protobuf.svg?branch=master)](https://travis-ci.org/gogo/protobuf) + +gogoprotobuf is a fork of golang/protobuf with extra code generation features. + +This code generation is used to achieve: + + - fast marshalling and unmarshalling + - more canonical Go structures + - goprotobuf compatibility + - less typing by optionally generating extra helper code + - peace of mind by optionally generating test and benchmark code + - other serialization formats + +Keeping track of how up to date gogoprotobuf is relative to golang/protobuf is done in this +issue + +## Users + +These projects use gogoprotobuf: + + - etcd - blog - sample proto file + - spacemonkey - blog + - badoo - sample proto file + - mesos-go - sample proto file + - heka - the switch from golang/protobuf to gogo/protobuf when it was still on code.google.com + - cockroachdb - sample proto file + - go-ipfs - sample proto file + - rkive-go - sample proto file + - dropbox + - srclib - sample proto file + - adyoulike + - cloudfoundry - sample proto file + - kubernetes - go2idl built on top of gogoprotobuf + - dgraph - release notes - benchmarks + - centrifugo - release notes - blog + - docker swarmkit - sample proto file + - nats.io - go-nats-streaming + - tidb - Communication between tidb and tikv + - protoactor-go - vanity command that also generates actors from service definitions + +Please lets us know if you are using gogoprotobuf by posting on our GoogleGroup. + +### Mentioned + + - Cloudflare - go serialization talk - Albert Strasheim + - gophercon + - alecthomas' go serialization benchmarks + +## Getting Started + +There are several ways to use gogoprotobuf, but for all you need to install go and protoc. +After that you can choose: + + - Speed + - More Speed and more generated code + - Most Speed and most customization + +### Installation + +To install it, you must first have Go (at least version 1.6.3) installed (see [http://golang.org/doc/install](http://golang.org/doc/install)). Go 1.7.1 and 1.8 is continuously tested. + +Next, install the standard protocol buffer implementation from [https://github.com/google/protobuf](https://github.com/google/protobuf). +Most versions from 2.3.1 should not give any problems, but 2.6.1, 3.0.2 and 3.1.0 are continuously tested. + +### Speed + +Install the protoc-gen-gofast binary + + go get github.com/gogo/protobuf/protoc-gen-gofast + +Use it to generate faster marshaling and unmarshaling go code for your protocol buffers. + + protoc --gofast_out=. myproto.proto + +This does not allow you to use any of the other gogoprotobuf [extensions](https://github.com/gogo/protobuf/blob/master/extensions.md). + +### More Speed and more generated code + +Fields without pointers cause less time in the garbage collector. +More code generation results in more convenient methods. + +Other binaries are also included: + + protoc-gen-gogofast (same as gofast, but imports gogoprotobuf) + protoc-gen-gogofaster (same as gogofast, without XXX_unrecognized, less pointer fields) + protoc-gen-gogoslick (same as gogofaster, but with generated string, gostring and equal methods) + +Installing any of these binaries is easy. Simply run: + + go get github.com/gogo/protobuf/proto + go get github.com/gogo/protobuf/{binary} + go get github.com/gogo/protobuf/gogoproto + +These binaries allow you to using gogoprotobuf [extensions](https://github.com/gogo/protobuf/blob/master/extensions.md). + +### Most Speed and most customization + +Customizing the fields of the messages to be the fields that you actually want to use removes the need to copy between the structs you use and structs you use to serialize. +gogoprotobuf also offers more serialization formats and generation of tests and even more methods. + +Please visit the [extensions](https://github.com/gogo/protobuf/blob/master/extensions.md) page for more documentation. + +Install protoc-gen-gogo: + + go get github.com/gogo/protobuf/proto + go get github.com/gogo/protobuf/jsonpb + go get github.com/gogo/protobuf/protoc-gen-gogo + go get github.com/gogo/protobuf/gogoproto + +## GRPC + +It works the same as golang/protobuf, simply specify the plugin. +Here is an example using gofast: + + protoc --gofast_out=plugins=grpc:. my.proto diff --git a/vendor/github.com/gogo/protobuf/bench.md b/vendor/github.com/gogo/protobuf/bench.md new file mode 100644 index 000000000..16da66ad2 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/bench.md @@ -0,0 +1,190 @@ +# Benchmarks + +## How to reproduce + +For a comparison run: + + make bench + +followed by [benchcmp](http://code.google.com/p/go/source/browse/misc/benchcmp benchcmp) on the resulting files: + + $GOROOT/misc/benchcmp $GOPATH/src/github.com/gogo/protobuf/test/mixbench/marshal.txt $GOPATH/src/github.com/gogo/protobuf/test/mixbench/marshaler.txt + $GOROOT/misc/benchcmp $GOPATH/src/github.com/gogo/protobuf/test/mixbench/unmarshal.txt $GOPATH/src/github.com/gogo/protobuf/test/mixbench/unmarshaler.txt + +Benchmarks ran on Revision: 11c56be39364 + +June 2013 + +Processor 2,66 GHz Intel Core i7 + +Memory 8 GB 1067 MHz DDR3 + +## Marshaler + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
benchmarkold ns/opnew ns/opdelta
BenchmarkNidOptNativeProtoMarshal2656889-66.53%
BenchmarkNinOptNativeProtoMarshal26511015-61.71%
BenchmarkNidRepNativeProtoMarshal4266112519-70.65%
BenchmarkNinRepNativeProtoMarshal4230612354-70.80%
BenchmarkNidRepPackedNativeProtoMarshal3414811902-65.15%
BenchmarkNinRepPackedNativeProtoMarshal3337511969-64.14%
BenchmarkNidOptStructProtoMarshal71483727-47.86%
BenchmarkNinOptStructProtoMarshal69563481-49.96%
BenchmarkNidRepStructProtoMarshal4655119492-58.13%
BenchmarkNinRepStructProtoMarshal4671519043-59.24%
BenchmarkNidEmbeddedStructProtoMarshal52312050-60.81%
BenchmarkNinEmbeddedStructProtoMarshal46652000-57.13%
BenchmarkNidNestedStructProtoMarshal181106103604-42.79%
BenchmarkNinNestedStructProtoMarshal182053102069-43.93%
BenchmarkNidOptCustomProtoMarshal1209310-74.36%
BenchmarkNinOptCustomProtoMarshal1435277-80.70%
BenchmarkNidRepCustomProtoMarshal4126763-81.51%
BenchmarkNinRepCustomProtoMarshal3972769-80.64%
BenchmarkNinOptNativeUnionProtoMarshal973303-68.86%
BenchmarkNinOptStructUnionProtoMarshal1536521-66.08%
BenchmarkNinEmbeddedStructUnionProtoMarshal2327884-62.01%
BenchmarkNinNestedStructUnionProtoMarshal2070743-64.11%
BenchmarkTreeProtoMarshal1554838-46.07%
BenchmarkOrBranchProtoMarshal31562012-36.25%
BenchmarkAndBranchProtoMarshal31831996-37.29%
BenchmarkLeafProtoMarshal965606-37.20%
BenchmarkDeepTreeProtoMarshal23161283-44.60%
BenchmarkADeepBranchProtoMarshal27191492-45.13%
BenchmarkAndDeepBranchProtoMarshal46632922-37.34%
BenchmarkDeepLeafProtoMarshal18491016-45.05%
BenchmarkNilProtoMarshal43976-82.53%
BenchmarkNidOptEnumProtoMarshal514152-70.43%
BenchmarkNinOptEnumProtoMarshal550158-71.27%
BenchmarkNidRepEnumProtoMarshal647207-68.01%
BenchmarkNinRepEnumProtoMarshal662213-67.82%
BenchmarkTimerProtoMarshal934271-70.99%
BenchmarkMyExtendableProtoMarshal608185-69.57%
BenchmarkOtherExtenableProtoMarshal1112332-70.14%
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
benchmarkold MB/snew MB/sspeedup
BenchmarkNidOptNativeProtoMarshal126.86378.862.99x
BenchmarkNinOptNativeProtoMarshal114.27298.422.61x
BenchmarkNidRepNativeProtoMarshal164.25561.203.42x
BenchmarkNinRepNativeProtoMarshal166.10568.233.42x
BenchmarkNidRepPackedNativeProtoMarshal99.10283.972.87x
BenchmarkNinRepPackedNativeProtoMarshal101.30282.312.79x
BenchmarkNidOptStructProtoMarshal176.83339.071.92x
BenchmarkNinOptStructProtoMarshal163.59326.572.00x
BenchmarkNidRepStructProtoMarshal178.84427.492.39x
BenchmarkNinRepStructProtoMarshal178.70437.692.45x
BenchmarkNidEmbeddedStructProtoMarshal124.24317.562.56x
BenchmarkNinEmbeddedStructProtoMarshal132.03307.992.33x
BenchmarkNidNestedStructProtoMarshal192.91337.861.75x
BenchmarkNinNestedStructProtoMarshal192.44344.451.79x
BenchmarkNidOptCustomProtoMarshal29.77116.033.90x
BenchmarkNinOptCustomProtoMarshal22.29115.385.18x
BenchmarkNidRepCustomProtoMarshal35.14189.805.40x
BenchmarkNinRepCustomProtoMarshal36.50188.405.16x
BenchmarkNinOptNativeUnionProtoMarshal32.87105.393.21x
BenchmarkNinOptStructUnionProtoMarshal66.40195.762.95x
BenchmarkNinEmbeddedStructUnionProtoMarshal93.24245.262.63x
BenchmarkNinNestedStructUnionProtoMarshal57.49160.062.78x
BenchmarkTreeProtoMarshal137.64255.121.85x
BenchmarkOrBranchProtoMarshal137.80216.101.57x
BenchmarkAndBranchProtoMarshal136.64217.891.59x
BenchmarkLeafProtoMarshal214.48341.531.59x
BenchmarkDeepTreeProtoMarshal95.85173.031.81x
BenchmarkADeepBranchProtoMarshal82.73150.781.82x
BenchmarkAndDeepBranchProtoMarshal96.72153.981.59x
BenchmarkDeepLeafProtoMarshal117.34213.411.82x
BenchmarkNidOptEnumProtoMarshal3.8913.163.38x
BenchmarkNinOptEnumProtoMarshal1.826.303.46x
BenchmarkNidRepEnumProtoMarshal12.3638.503.11x
BenchmarkNinRepEnumProtoMarshal12.0837.533.11x
BenchmarkTimerProtoMarshal73.81253.873.44x
BenchmarkMyExtendableProtoMarshal13.1543.083.28x
BenchmarkOtherExtenableProtoMarshal24.2881.093.34x
+ +## Unmarshaler + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
benchmarkold ns/opnew ns/opdelta
BenchmarkNidOptNativeProtoUnmarshal25211006-60.10%
BenchmarkNinOptNativeProtoUnmarshal25291750-30.80%
BenchmarkNidRepNativeProtoUnmarshal4906735299-28.06%
BenchmarkNinRepNativeProtoUnmarshal4799035456-26.12%
BenchmarkNidRepPackedNativeProtoUnmarshal2645623950-9.47%
BenchmarkNinRepPackedNativeProtoUnmarshal2649924037-9.29%
BenchmarkNidOptStructProtoUnmarshal68033873-43.07%
BenchmarkNinOptStructProtoUnmarshal67864154-38.79%
BenchmarkNidRepStructProtoUnmarshal5627631970-43.19%
BenchmarkNinRepStructProtoUnmarshal4875031832-34.70%
BenchmarkNidEmbeddedStructProtoUnmarshal45561973-56.69%
BenchmarkNinEmbeddedStructProtoUnmarshal44851975-55.96%
BenchmarkNidNestedStructProtoUnmarshal223395135844-39.19%
BenchmarkNinNestedStructProtoUnmarshal226446134022-40.82%
BenchmarkNidOptCustomProtoUnmarshal1859300-83.86%
BenchmarkNinOptCustomProtoUnmarshal1486402-72.95%
BenchmarkNidRepCustomProtoUnmarshal82291669-79.72%
BenchmarkNinRepCustomProtoUnmarshal82531649-80.02%
BenchmarkNinOptNativeUnionProtoUnmarshal840307-63.45%
BenchmarkNinOptStructUnionProtoUnmarshal1395639-54.19%
BenchmarkNinEmbeddedStructUnionProtoUnmarshal22971167-49.19%
BenchmarkNinNestedStructUnionProtoUnmarshal1820889-51.15%
BenchmarkTreeProtoUnmarshal1521720-52.66%
BenchmarkOrBranchProtoUnmarshal26691385-48.11%
BenchmarkAndBranchProtoUnmarshal26671420-46.76%
BenchmarkLeafProtoUnmarshal1171584-50.13%
BenchmarkDeepTreeProtoUnmarshal20651081-47.65%
BenchmarkADeepBranchProtoUnmarshal26951178-56.29%
BenchmarkAndDeepBranchProtoUnmarshal40551918-52.70%
BenchmarkDeepLeafProtoUnmarshal1758865-50.80%
BenchmarkNilProtoUnmarshal56463-88.79%
BenchmarkNidOptEnumProtoUnmarshal76273-90.34%
BenchmarkNinOptEnumProtoUnmarshal764163-78.66%
BenchmarkNidRepEnumProtoUnmarshal1078447-58.53%
BenchmarkNinRepEnumProtoUnmarshal1071479-55.28%
BenchmarkTimerProtoUnmarshal1128362-67.91%
BenchmarkMyExtendableProtoUnmarshal808217-73.14%
BenchmarkOtherExtenableProtoUnmarshal1233517-58.07%
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
benchmarkold MB/snew MB/sspeedup
BenchmarkNidOptNativeProtoUnmarshal133.67334.982.51x
BenchmarkNinOptNativeProtoUnmarshal119.77173.081.45x
BenchmarkNidRepNativeProtoUnmarshal143.23199.121.39x
BenchmarkNinRepNativeProtoUnmarshal146.07198.161.36x
BenchmarkNidRepPackedNativeProtoUnmarshal127.80141.041.10x
BenchmarkNinRepPackedNativeProtoUnmarshal127.55140.781.10x
BenchmarkNidOptStructProtoUnmarshal185.79326.311.76x
BenchmarkNinOptStructProtoUnmarshal167.68273.661.63x
BenchmarkNidRepStructProtoUnmarshal147.88260.391.76x
BenchmarkNinRepStructProtoUnmarshal171.20261.971.53x
BenchmarkNidEmbeddedStructProtoUnmarshal142.86329.422.31x
BenchmarkNinEmbeddedStructProtoUnmarshal137.33311.832.27x
BenchmarkNidNestedStructProtoUnmarshal154.97259.471.67x
BenchmarkNinNestedStructProtoUnmarshal154.32258.421.67x
BenchmarkNidOptCustomProtoUnmarshal19.36119.666.18x
BenchmarkNinOptCustomProtoUnmarshal21.5279.503.69x
BenchmarkNidRepCustomProtoUnmarshal17.6286.864.93x
BenchmarkNinRepCustomProtoUnmarshal17.5787.925.00x
BenchmarkNinOptNativeUnionProtoUnmarshal38.07104.122.73x
BenchmarkNinOptStructUnionProtoUnmarshal73.08159.542.18x
BenchmarkNinEmbeddedStructUnionProtoUnmarshal94.00185.921.98x
BenchmarkNinNestedStructUnionProtoUnmarshal65.35133.752.05x
BenchmarkTreeProtoUnmarshal141.28297.132.10x
BenchmarkOrBranchProtoUnmarshal162.56313.961.93x
BenchmarkAndBranchProtoUnmarshal163.06306.151.88x
BenchmarkLeafProtoUnmarshal176.72354.192.00x
BenchmarkDeepTreeProtoUnmarshal107.50205.301.91x
BenchmarkADeepBranchProtoUnmarshal83.48190.882.29x
BenchmarkAndDeepBranchProtoUnmarshal110.97234.602.11x
BenchmarkDeepLeafProtoUnmarshal123.40250.732.03x
BenchmarkNidOptEnumProtoUnmarshal2.6227.1610.37x
BenchmarkNinOptEnumProtoUnmarshal1.316.114.66x
BenchmarkNidRepEnumProtoUnmarshal7.4217.882.41x
BenchmarkNinRepEnumProtoUnmarshal7.4716.692.23x
BenchmarkTimerProtoUnmarshal61.12190.343.11x
BenchmarkMyExtendableProtoUnmarshal9.9036.713.71x
BenchmarkOtherExtenableProtoUnmarshal21.9052.132.38x
\ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/custom_types.md b/vendor/github.com/gogo/protobuf/custom_types.md new file mode 100644 index 000000000..3eed249b5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/custom_types.md @@ -0,0 +1,68 @@ +# Custom types + +Custom types is a gogo protobuf extensions that allows for using a custom +struct type to decorate the underlying structure of the protocol message. + +# How to use + +## Defining the protobuf message + +```proto +message CustomType { + optional ProtoType Field = 1 [(gogoproto.customtype) = "T"]; +} + +message ProtoType { + optional string Field = 1; +} +``` + +or alternatively you can declare the field type in the protocol message to be +`bytes`: + +```proto +message BytesCustomType { + optional bytes Field = 1 [(gogoproto.customtype) = "T"]; +} +``` + +The downside of using `bytes` is that it makes it harder to generate protobuf +code in other languages. In either case, it is the user responsibility to +ensure that the custom type marshals and unmarshals to the expected wire +format. That is, in the first example, gogo protobuf will not attempt to ensure +that the wire format of `ProtoType` and `T` are wire compatible. + +## Custom type method signatures + +The custom type must define the following methods with the given +signatures. Assuming the custom type is called `T`: + +```go +func (t T) Marshal() ([]byte, error) {} +func (t *T) MarshalTo(data []byte) (n int, err error) {} +func (t *T) Unmarshal(data []byte) error {} + +func (t T) MarshalJSON() ([]byte, error) {} +func (t *T) UnmarshalJSON(data []byte) error {} + +// only required if the compare option is set +func (t T) Compare(other T) int {} +// only required if the equal option is set +func (t T) Equal(other T) bool {} +// only required if populate option is set +func NewPopulatedT(r randyThetest) *T {} +``` + +Check [t.go](test/t.go) for a full example + +# Warnings and issues + +`Warning about customtype: It is your responsibility to test all cases of your marshaling, unmarshaling and size methods implemented for your custom type.` + +Issues with customtype include: + * A Bytes method is not allowed. + * Defining a customtype as a fake proto message is broken. + * proto.Clone is broken. + * Using a proto message as a customtype is not allowed. + * cusomtype of type map can not UnmarshalText + * customtype of type struct cannot jsonpb unmarshal diff --git a/vendor/github.com/gogo/protobuf/extensions.md b/vendor/github.com/gogo/protobuf/extensions.md new file mode 100644 index 000000000..891359ac7 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/extensions.md @@ -0,0 +1,161 @@ +# gogoprotobuf Extensions + +Here is an [example.proto](https://github.com/gogo/protobuf/blob/master/test/example/example.proto) which uses most of the gogoprotobuf code generation plugins. + +Please also look at the example [Makefile](https://github.com/gogo/protobuf/blob/master/test/example/Makefile) which shows how to specify the `descriptor.proto` and `gogo.proto` in your proto_path + +The documentation at [http://godoc.org/github.com/gogo/protobuf/gogoproto](http://godoc.org/github.com/gogo/protobuf/gogoproto) describes the extensions made to goprotobuf in more detail. + +Also see [http://godoc.org/github.com/gogo/protobuf/plugin/](http://godoc.org/github.com/gogo/protobuf/plugin/) for documentation of each of the extensions which have their own plugins. + +# Fast Marshalling and Unmarshalling + +Generating a `Marshal`, `MarshalTo`, `Size` (or `ProtoSize`) and `Unmarshal` method for a struct results in faster marshalling and unmarshalling than when using reflect. + +See [BenchComparison](https://github.com/gogo/protobuf/blob/master/bench.md) for a comparison between reflect and generated code used for marshalling and unmarshalling. + + + + + + + + + + + +
NameOptionTypeDescriptionDefault
marshalerMessageboolif true, a Marshal and MarshalTo method is generated for the specific messagefalse
sizerMessageboolif true, a Size method is generated for the specific messagefalse
unmarshaler Message bool if true, an Unmarshal method is generated for the specific message false
protosizerMessageboolif true, a ProtoSize method is generated for the specific messagefalse
unsafe_marshaler Message bool if true, a Marshal and MarshalTo method is generated for the specific message. The generated code uses the unsafe package and is not compatible with big endian CPUs. false
unsafe_unmarshaler Message bool if true, an Unmarshal method is generated for the specific message. The generated code uses the unsafe package and is not compatible with big endian CPUs. false
stable_marshaler Message bool if true, a Marshal and MarshalTo method is generated for the specific message, but unlike marshaler the output is guaranteed to be deterministic, at the sacrifice of some speed false
typedecl (beta) Message bool if false, type declaration of the message is excluded from the generated output. Requires the marshaler and unmarshaler to be generated. true
+ +# More Canonical Go Structures + +Lots of times working with a goprotobuf struct will lead you to a place where you create another struct that is easier to work with and then have a function to copy the values between the two structs. + +You might also find that basic structs that started their life as part of an API need to be sent over the wire. With gob, you could just send it. With goprotobuf, you need to make a new struct. + +`gogoprotobuf` tries to fix these problems with the nullable, embed, customtype, customname, casttype, castkey and castvalue field extensions. + + + + + + + + + + + + + + + +
NameOptionTypeDescriptionDefault
nullable Field bool if false, a field is generated without a pointer (see warning below). true
embed Field bool if true, the field is generated as an embedded field. false
customtype Field string It works with the Marshal and Unmarshal methods, to allow you to have your own types in your struct, but marshal to bytes. For example, custom.Uuid or custom.Fixed128. For more information please refer to the CustomTypes document goprotobuf type
customname (beta) Field string Changes the generated fieldname. This is especially useful when generated methods conflict with fieldnames. goprotobuf field name
casttype (beta) Field string Changes the generated field type. It assumes that this type is castable to the original goprotobuf field type. It currently does not support maps, structs or enums. goprotobuf field type
castkey (beta) Field string Changes the generated fieldtype for a map key. All generated code assumes that this type is castable to the protocol buffer field type. Only supported on maps. goprotobuf field type
castvalue (beta) Field string Changes the generated fieldtype for a map value. All generated code assumes that this type is castable to the protocol buffer field type. Only supported on maps. goprotobuf field type
enum_customname (beta) Enum string Sets the type name of an enum. If goproto_enum_prefix is enabled, this value will be used as a prefix when generating enum values.goprotobuf enum type name. Helps with golint issues.
enumdecl (beta) Enum bool if false, type declaration of the enum is excluded from the generated output. Requires the marshaler and unmarshaler to be generated. true
enumvalue_customname (beta) Enum Value string Changes the generated enum name. Helps with golint issues.goprotobuf enum value name
stdtime Timestamp Field bool Changes the Well Known Timestamp Type to time.TimeTimestamp
stdduration Duration Field bool Changes the Well Known Duration Type to time.DurationDuration
+ +`Warning about nullable: according to the Protocol Buffer specification, you should be able to tell whether a field is set or unset. With the option nullable=false this feature is lost, since your non-nullable fields will always be set.` + +# Goprotobuf Compatibility + +Gogoprotobuf is compatible with Goprotobuf, because it is compatible with protocol buffers (see the section on tests below). + +Gogoprotobuf generates the same code as goprotobuf if no extensions are used. + +The enumprefix, getters and stringer extensions can be used to remove some of the unnecessary code generated by goprotobuf. + + + + + + + + + + +
NameOptionTypeDescriptionDefault
gogoproto_import File bool if false, the generated code imports github.com/golang/protobuf/proto instead of github.com/gogo/protobuf/proto. true
goproto_enum_prefix Enum bool if false, generates the enum constant names without the messagetype prefix true
goproto_getters Message bool if false, the message is generated without get methods, this is useful when you would rather want to use face true
goproto_stringer Message bool if false, the message is generated without the default string method, this is useful for rather using stringer true
goproto_enum_stringer (experimental) Enum bool if false, the enum is generated without the default string method, this is useful for rather using enum_stringer true
goproto_extensions_map (beta) Message bool if false, the extensions field is generated as type []byte instead of type map[int32]proto.Extension true
goproto_unrecognized (beta) Message bool if false, XXX_unrecognized field is not generated. This is useful to reduce GC pressure at the cost of losing information about unrecognized fields. true
+ +# Less Typing + +The Protocol Buffer language is very parseable and extra code can be easily generated for structures. + +Helper methods, functions and interfaces can be generated by triggering certain extensions like gostring. + + + + + + + + + + + + + +
NameOptionTypeDescriptionDefault
gostring Message bool if true, a `GoString` method is generated. This returns a string representing valid go code to reproduce the current state of the struct. false
onlyone (deprecated) Message bool if true, all fields must be nullable and only one of the fields may be set, like a union. Two methods are generated: `GetValue() interface{}` and `SetValue(v interface{}) (set bool)`. These provide easier interaction with a union. false
equal Message bool if true, an Equal method is generated false
compare Message bool if true, a Compare method is generated. This is very useful for quickly implementing sort on a list of protobuf structs false
verbose_equal Message bool if true, a verbose equal method is generated for the message. This returns an error which describes the exact element which is not equal to the exact element in the other struct. false
stringer Message bool if true, a String method is generated for the message. false
face Message bool if true, a function will be generated which can convert a structure which satisfies an interface (face) to the specified structure. This interface contains getters for each of the fields in the struct. The specified struct is also generated with the getters. This allows it to satisfy its own face. false
description (beta) Message bool if true, a Description method is generated for the message. false
populate Message bool if true, a `NewPopulated` function is generated. This is necessary for generated tests. false
enum_stringer (experimental) Enum bool if true, a String method is generated for an Enum false
+ +Issues with Compare include: + * Oneof is not supported yet + * Not all Well Known Types are supported yet + * Maps are not supported + +#Peace of Mind + +Test and Benchmark generation is done with the following extensions: + + + + +
testgen Message bool if true, tests are generated for proto, json and prototext marshalling as well as for some of the other enabled plugins false
benchgen Message bool if true, benchmarks are generated for proto, json and prototext marshalling as well as for some of the other enabled plugins false
+ +# More Serialization Formats + +Other serialization formats like xml and json typically use reflect to marshal and unmarshal structured data. Manipulating these structs into something other than the default Go requires editing tags. The following extensions provide ways of editing these tags for the generated protobuf structs. + + + + +
jsontag (beta) Field string if set, the json tag value between the double quotes is replaced with this string fieldname
moretags (beta) Field string if set, this string is appended to the tag string empty
+ +Here is a longer explanation of jsontag and moretags + +# File Options + +Each of the boolean message and enum extensions also have a file extension: + + * `marshaler_all` + * `sizer_all` + * `protosizer_all` + * `unmarshaler_all` + * `unsafe_marshaler_all` + * `unsafe_unmarshaler_all` + * `stable_marshaler_all` + * `goproto_enum_prefix_all` + * `goproto_getters_all` + * `goproto_stringer_all` + * `goproto_enum_stringer_all` + * `goproto_extensions_map_all` + * `goproto_unrecognized_all` + * `gostring_all` + * `onlyone_all` + * `equal_all` + * `compare_all` + * `verbose_equal_all` + * `stringer_all` + * `enum_stringer_all` + * `face_all` + * `description_all` + * `populate_all` + * `testgen_all` + * `benchgen_all` + * `enumdecl_all` + * `typedecl_all` + +Each of these are the same as their Message Option counterparts, except they apply to all messages in the file. Their Message option counterparts can also be used to overwrite their effect. + +# Tests + + * The normal barrage of tests are run with: `make tests` + * A few weird tests: `make testall` + * Tests for compatibility with [golang/protobuf](https://github.com/golang/protobuf) are handled by a different project [harmonytests](https://github.com/gogo/harmonytests), since it requires goprotobuf. + * Cross version tests are made with [Travis CI](https://travis-ci.org/gogo/protobuf). + * GRPC Tests are also handled by a different project [grpctests](https://github.com/gogo/grpctests), since it depends on a lot of grpc libraries. + * Thanks to [go-fuzz](https://github.com/dvyukov/go-fuzz/) we have proper [fuzztests](https://github.com/gogo/fuzztests). + diff --git a/vendor/github.com/gogo/protobuf/gogoproto/Makefile b/vendor/github.com/gogo/protobuf/gogoproto/Makefile new file mode 100644 index 000000000..02f9c62c2 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/gogoproto/Makefile @@ -0,0 +1,37 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# 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. +# +# 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. + +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc --gogo_out=Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor:. --proto_path=../../../../:../protobuf/:. *.proto + +restore: + cp gogo.pb.golden gogo.pb.go + +preserve: + cp gogo.pb.go gogo.pb.golden diff --git a/vendor/github.com/gogo/protobuf/gogoproto/doc.go b/vendor/github.com/gogo/protobuf/gogoproto/doc.go new file mode 100644 index 000000000..147b5ecc6 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/gogoproto/doc.go @@ -0,0 +1,169 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// 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. +// +// 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. + +/* +Package gogoproto provides extensions for protocol buffers to achieve: + + - fast marshalling and unmarshalling. + - peace of mind by optionally generating test and benchmark code. + - more canonical Go structures. + - less typing by optionally generating extra helper code. + - goprotobuf compatibility + +More Canonical Go Structures + +A lot of time working with a goprotobuf struct will lead you to a place where you create another struct that is easier to work with and then have a function to copy the values between the two structs. +You might also find that basic structs that started their life as part of an API need to be sent over the wire. With gob, you could just send it. With goprotobuf, you need to make a parallel struct. +Gogoprotobuf tries to fix these problems with the nullable, embed, customtype and customname field extensions. + + - nullable, if false, a field is generated without a pointer (see warning below). + - embed, if true, the field is generated as an embedded field. + - customtype, It works with the Marshal and Unmarshal methods, to allow you to have your own types in your struct, but marshal to bytes. For example, custom.Uuid or custom.Fixed128 + - customname (beta), Changes the generated fieldname. This is especially useful when generated methods conflict with fieldnames. + - casttype (beta), Changes the generated fieldtype. All generated code assumes that this type is castable to the protocol buffer field type. It does not work for structs or enums. + - castkey (beta), Changes the generated fieldtype for a map key. All generated code assumes that this type is castable to the protocol buffer field type. Only supported on maps. + - castvalue (beta), Changes the generated fieldtype for a map value. All generated code assumes that this type is castable to the protocol buffer field type. Only supported on maps. + +Warning about nullable: According to the Protocol Buffer specification, you should be able to tell whether a field is set or unset. With the option nullable=false this feature is lost, since your non-nullable fields will always be set. It can be seen as a layer on top of Protocol Buffers, where before and after marshalling all non-nullable fields are set and they cannot be unset. + +Let us look at: + + github.com/gogo/protobuf/test/example/example.proto + +for a quicker overview. + +The following message: + + package test; + + import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + + message A { + optional string Description = 1 [(gogoproto.nullable) = false]; + optional int64 Number = 2 [(gogoproto.nullable) = false]; + optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uuid", (gogoproto.nullable) = false]; + } + +Will generate a go struct which looks a lot like this: + + type A struct { + Description string + Number int64 + Id github_com_gogo_protobuf_test_custom.Uuid + } + +You will see there are no pointers, since all fields are non-nullable. +You will also see a custom type which marshals to a string. +Be warned it is your responsibility to test your custom types thoroughly. +You should think of every possible empty and nil case for your marshaling, unmarshaling and size methods. + +Next we will embed the message A in message B. + + message B { + optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; + repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; + } + +See below that A is embedded in B. + + type B struct { + A + G []github_com_gogo_protobuf_test_custom.Uint128 + } + +Also see the repeated custom type. + + type Uint128 [2]uint64 + +Next we will create a custom name for one of our fields. + + message C { + optional int64 size = 1 [(gogoproto.customname) = "MySize"]; + } + +See below that the field's name is MySize and not Size. + + type C struct { + MySize *int64 + } + +The is useful when having a protocol buffer message with a field name which conflicts with a generated method. +As an example, having a field name size and using the sizer plugin to generate a Size method will cause a go compiler error. +Using customname you can fix this error without changing the field name. +This is typically useful when working with a protocol buffer that was designed before these methods and/or the go language were avialable. + +Gogoprotobuf also has some more subtle changes, these could be changed back: + + - the generated package name for imports do not have the extra /filename.pb, + but are actually the imports specified in the .proto file. + +Gogoprotobuf also has lost some features which should be brought back with time: + + - Marshalling and unmarshalling with reflect and without the unsafe package, + this requires work in pointer_reflect.go + +Why does nullable break protocol buffer specifications: + +The protocol buffer specification states, somewhere, that you should be able to tell whether a +field is set or unset. With the option nullable=false this feature is lost, +since your non-nullable fields will always be set. It can be seen as a layer on top of +protocol buffers, where before and after marshalling all non-nullable fields are set +and they cannot be unset. + +Goprotobuf Compatibility: + +Gogoprotobuf is compatible with Goprotobuf, because it is compatible with protocol buffers. +Gogoprotobuf generates the same code as goprotobuf if no extensions are used. +The enumprefix, getters and stringer extensions can be used to remove some of the unnecessary code generated by goprotobuf: + + - gogoproto_import, if false, the generated code imports github.com/golang/protobuf/proto instead of github.com/gogo/protobuf/proto. + - goproto_enum_prefix, if false, generates the enum constant names without the messagetype prefix + - goproto_enum_stringer (experimental), if false, the enum is generated without the default string method, this is useful for rather using enum_stringer, or allowing you to write your own string method. + - goproto_getters, if false, the message is generated without get methods, this is useful when you would rather want to use face + - goproto_stringer, if false, the message is generated without the default string method, this is useful for rather using stringer, or allowing you to write your own string method. + - goproto_extensions_map (beta), if false, the extensions field is generated as type []byte instead of type map[int32]proto.Extension + - goproto_unrecognized (beta), if false, XXX_unrecognized field is not generated. This is useful in conjunction with gogoproto.nullable=false, to generate structures completely devoid of pointers and reduce GC pressure at the cost of losing information about unrecognized fields. + - goproto_registration (beta), if true, the generated files will register all messages and types against both gogo/protobuf and golang/protobuf. This is necessary when using third-party packages which read registrations from golang/protobuf (such as the grpc-gateway). + +Less Typing and Peace of Mind is explained in their specific plugin folders godoc: + + - github.com/gogo/protobuf/plugin/ + +If you do not use any of these extension the code that is generated +will be the same as if goprotobuf has generated it. + +The most complete way to see examples is to look at + + github.com/gogo/protobuf/test/thetest.proto + +Gogoprototest is a seperate project, +because we want to keep gogoprotobuf independant of goprotobuf, +but we still want to test it thoroughly. + +*/ +package gogoproto diff --git a/vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.go b/vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.go new file mode 100644 index 000000000..9506b6fb2 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.go @@ -0,0 +1,804 @@ +// Code generated by protoc-gen-gogo. +// source: gogo.proto +// DO NOT EDIT! + +/* +Package gogoproto is a generated protocol buffer package. + +It is generated from these files: + gogo.proto + +It has these top-level messages: +*/ +package gogoproto + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import google_protobuf "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +var E_GoprotoEnumPrefix = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.EnumOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 62001, + Name: "gogoproto.goproto_enum_prefix", + Tag: "varint,62001,opt,name=goproto_enum_prefix,json=goprotoEnumPrefix", + Filename: "gogo.proto", +} + +var E_GoprotoEnumStringer = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.EnumOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 62021, + Name: "gogoproto.goproto_enum_stringer", + Tag: "varint,62021,opt,name=goproto_enum_stringer,json=goprotoEnumStringer", + Filename: "gogo.proto", +} + +var E_EnumStringer = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.EnumOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 62022, + Name: "gogoproto.enum_stringer", + Tag: "varint,62022,opt,name=enum_stringer,json=enumStringer", + Filename: "gogo.proto", +} + +var E_EnumCustomname = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.EnumOptions)(nil), + ExtensionType: (*string)(nil), + Field: 62023, + Name: "gogoproto.enum_customname", + Tag: "bytes,62023,opt,name=enum_customname,json=enumCustomname", + Filename: "gogo.proto", +} + +var E_Enumdecl = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.EnumOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 62024, + Name: "gogoproto.enumdecl", + Tag: "varint,62024,opt,name=enumdecl", + Filename: "gogo.proto", +} + +var E_EnumvalueCustomname = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.EnumValueOptions)(nil), + ExtensionType: (*string)(nil), + Field: 66001, + Name: "gogoproto.enumvalue_customname", + Tag: "bytes,66001,opt,name=enumvalue_customname,json=enumvalueCustomname", + Filename: "gogo.proto", +} + +var E_GoprotoGettersAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63001, + Name: "gogoproto.goproto_getters_all", + Tag: "varint,63001,opt,name=goproto_getters_all,json=goprotoGettersAll", + Filename: "gogo.proto", +} + +var E_GoprotoEnumPrefixAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63002, + Name: "gogoproto.goproto_enum_prefix_all", + Tag: "varint,63002,opt,name=goproto_enum_prefix_all,json=goprotoEnumPrefixAll", + Filename: "gogo.proto", +} + +var E_GoprotoStringerAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63003, + Name: "gogoproto.goproto_stringer_all", + Tag: "varint,63003,opt,name=goproto_stringer_all,json=goprotoStringerAll", + Filename: "gogo.proto", +} + +var E_VerboseEqualAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63004, + Name: "gogoproto.verbose_equal_all", + Tag: "varint,63004,opt,name=verbose_equal_all,json=verboseEqualAll", + Filename: "gogo.proto", +} + +var E_FaceAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63005, + Name: "gogoproto.face_all", + Tag: "varint,63005,opt,name=face_all,json=faceAll", + Filename: "gogo.proto", +} + +var E_GostringAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63006, + Name: "gogoproto.gostring_all", + Tag: "varint,63006,opt,name=gostring_all,json=gostringAll", + Filename: "gogo.proto", +} + +var E_PopulateAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63007, + Name: "gogoproto.populate_all", + Tag: "varint,63007,opt,name=populate_all,json=populateAll", + Filename: "gogo.proto", +} + +var E_StringerAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63008, + Name: "gogoproto.stringer_all", + Tag: "varint,63008,opt,name=stringer_all,json=stringerAll", + Filename: "gogo.proto", +} + +var E_OnlyoneAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63009, + Name: "gogoproto.onlyone_all", + Tag: "varint,63009,opt,name=onlyone_all,json=onlyoneAll", + Filename: "gogo.proto", +} + +var E_EqualAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63013, + Name: "gogoproto.equal_all", + Tag: "varint,63013,opt,name=equal_all,json=equalAll", + Filename: "gogo.proto", +} + +var E_DescriptionAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63014, + Name: "gogoproto.description_all", + Tag: "varint,63014,opt,name=description_all,json=descriptionAll", + Filename: "gogo.proto", +} + +var E_TestgenAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63015, + Name: "gogoproto.testgen_all", + Tag: "varint,63015,opt,name=testgen_all,json=testgenAll", + Filename: "gogo.proto", +} + +var E_BenchgenAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63016, + Name: "gogoproto.benchgen_all", + Tag: "varint,63016,opt,name=benchgen_all,json=benchgenAll", + Filename: "gogo.proto", +} + +var E_MarshalerAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63017, + Name: "gogoproto.marshaler_all", + Tag: "varint,63017,opt,name=marshaler_all,json=marshalerAll", + Filename: "gogo.proto", +} + +var E_UnmarshalerAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63018, + Name: "gogoproto.unmarshaler_all", + Tag: "varint,63018,opt,name=unmarshaler_all,json=unmarshalerAll", + Filename: "gogo.proto", +} + +var E_StableMarshalerAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63019, + Name: "gogoproto.stable_marshaler_all", + Tag: "varint,63019,opt,name=stable_marshaler_all,json=stableMarshalerAll", + Filename: "gogo.proto", +} + +var E_SizerAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63020, + Name: "gogoproto.sizer_all", + Tag: "varint,63020,opt,name=sizer_all,json=sizerAll", + Filename: "gogo.proto", +} + +var E_GoprotoEnumStringerAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63021, + Name: "gogoproto.goproto_enum_stringer_all", + Tag: "varint,63021,opt,name=goproto_enum_stringer_all,json=goprotoEnumStringerAll", + Filename: "gogo.proto", +} + +var E_EnumStringerAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63022, + Name: "gogoproto.enum_stringer_all", + Tag: "varint,63022,opt,name=enum_stringer_all,json=enumStringerAll", + Filename: "gogo.proto", +} + +var E_UnsafeMarshalerAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63023, + Name: "gogoproto.unsafe_marshaler_all", + Tag: "varint,63023,opt,name=unsafe_marshaler_all,json=unsafeMarshalerAll", + Filename: "gogo.proto", +} + +var E_UnsafeUnmarshalerAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63024, + Name: "gogoproto.unsafe_unmarshaler_all", + Tag: "varint,63024,opt,name=unsafe_unmarshaler_all,json=unsafeUnmarshalerAll", + Filename: "gogo.proto", +} + +var E_GoprotoExtensionsMapAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63025, + Name: "gogoproto.goproto_extensions_map_all", + Tag: "varint,63025,opt,name=goproto_extensions_map_all,json=goprotoExtensionsMapAll", + Filename: "gogo.proto", +} + +var E_GoprotoUnrecognizedAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63026, + Name: "gogoproto.goproto_unrecognized_all", + Tag: "varint,63026,opt,name=goproto_unrecognized_all,json=goprotoUnrecognizedAll", + Filename: "gogo.proto", +} + +var E_GogoprotoImport = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63027, + Name: "gogoproto.gogoproto_import", + Tag: "varint,63027,opt,name=gogoproto_import,json=gogoprotoImport", + Filename: "gogo.proto", +} + +var E_ProtosizerAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63028, + Name: "gogoproto.protosizer_all", + Tag: "varint,63028,opt,name=protosizer_all,json=protosizerAll", + Filename: "gogo.proto", +} + +var E_CompareAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63029, + Name: "gogoproto.compare_all", + Tag: "varint,63029,opt,name=compare_all,json=compareAll", + Filename: "gogo.proto", +} + +var E_TypedeclAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63030, + Name: "gogoproto.typedecl_all", + Tag: "varint,63030,opt,name=typedecl_all,json=typedeclAll", + Filename: "gogo.proto", +} + +var E_EnumdeclAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63031, + Name: "gogoproto.enumdecl_all", + Tag: "varint,63031,opt,name=enumdecl_all,json=enumdeclAll", + Filename: "gogo.proto", +} + +var E_GoprotoRegistration = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63032, + Name: "gogoproto.goproto_registration", + Tag: "varint,63032,opt,name=goproto_registration,json=goprotoRegistration", + Filename: "gogo.proto", +} + +var E_GoprotoGetters = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64001, + Name: "gogoproto.goproto_getters", + Tag: "varint,64001,opt,name=goproto_getters,json=goprotoGetters", + Filename: "gogo.proto", +} + +var E_GoprotoStringer = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64003, + Name: "gogoproto.goproto_stringer", + Tag: "varint,64003,opt,name=goproto_stringer,json=goprotoStringer", + Filename: "gogo.proto", +} + +var E_VerboseEqual = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64004, + Name: "gogoproto.verbose_equal", + Tag: "varint,64004,opt,name=verbose_equal,json=verboseEqual", + Filename: "gogo.proto", +} + +var E_Face = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64005, + Name: "gogoproto.face", + Tag: "varint,64005,opt,name=face", + Filename: "gogo.proto", +} + +var E_Gostring = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64006, + Name: "gogoproto.gostring", + Tag: "varint,64006,opt,name=gostring", + Filename: "gogo.proto", +} + +var E_Populate = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64007, + Name: "gogoproto.populate", + Tag: "varint,64007,opt,name=populate", + Filename: "gogo.proto", +} + +var E_Stringer = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 67008, + Name: "gogoproto.stringer", + Tag: "varint,67008,opt,name=stringer", + Filename: "gogo.proto", +} + +var E_Onlyone = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64009, + Name: "gogoproto.onlyone", + Tag: "varint,64009,opt,name=onlyone", + Filename: "gogo.proto", +} + +var E_Equal = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64013, + Name: "gogoproto.equal", + Tag: "varint,64013,opt,name=equal", + Filename: "gogo.proto", +} + +var E_Description = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64014, + Name: "gogoproto.description", + Tag: "varint,64014,opt,name=description", + Filename: "gogo.proto", +} + +var E_Testgen = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64015, + Name: "gogoproto.testgen", + Tag: "varint,64015,opt,name=testgen", + Filename: "gogo.proto", +} + +var E_Benchgen = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64016, + Name: "gogoproto.benchgen", + Tag: "varint,64016,opt,name=benchgen", + Filename: "gogo.proto", +} + +var E_Marshaler = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64017, + Name: "gogoproto.marshaler", + Tag: "varint,64017,opt,name=marshaler", + Filename: "gogo.proto", +} + +var E_Unmarshaler = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64018, + Name: "gogoproto.unmarshaler", + Tag: "varint,64018,opt,name=unmarshaler", + Filename: "gogo.proto", +} + +var E_StableMarshaler = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64019, + Name: "gogoproto.stable_marshaler", + Tag: "varint,64019,opt,name=stable_marshaler,json=stableMarshaler", + Filename: "gogo.proto", +} + +var E_Sizer = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64020, + Name: "gogoproto.sizer", + Tag: "varint,64020,opt,name=sizer", + Filename: "gogo.proto", +} + +var E_UnsafeMarshaler = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64023, + Name: "gogoproto.unsafe_marshaler", + Tag: "varint,64023,opt,name=unsafe_marshaler,json=unsafeMarshaler", + Filename: "gogo.proto", +} + +var E_UnsafeUnmarshaler = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64024, + Name: "gogoproto.unsafe_unmarshaler", + Tag: "varint,64024,opt,name=unsafe_unmarshaler,json=unsafeUnmarshaler", + Filename: "gogo.proto", +} + +var E_GoprotoExtensionsMap = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64025, + Name: "gogoproto.goproto_extensions_map", + Tag: "varint,64025,opt,name=goproto_extensions_map,json=goprotoExtensionsMap", + Filename: "gogo.proto", +} + +var E_GoprotoUnrecognized = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64026, + Name: "gogoproto.goproto_unrecognized", + Tag: "varint,64026,opt,name=goproto_unrecognized,json=goprotoUnrecognized", + Filename: "gogo.proto", +} + +var E_Protosizer = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64028, + Name: "gogoproto.protosizer", + Tag: "varint,64028,opt,name=protosizer", + Filename: "gogo.proto", +} + +var E_Compare = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64029, + Name: "gogoproto.compare", + Tag: "varint,64029,opt,name=compare", + Filename: "gogo.proto", +} + +var E_Typedecl = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64030, + Name: "gogoproto.typedecl", + Tag: "varint,64030,opt,name=typedecl", + Filename: "gogo.proto", +} + +var E_Nullable = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 65001, + Name: "gogoproto.nullable", + Tag: "varint,65001,opt,name=nullable", + Filename: "gogo.proto", +} + +var E_Embed = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 65002, + Name: "gogoproto.embed", + Tag: "varint,65002,opt,name=embed", + Filename: "gogo.proto", +} + +var E_Customtype = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65003, + Name: "gogoproto.customtype", + Tag: "bytes,65003,opt,name=customtype", + Filename: "gogo.proto", +} + +var E_Customname = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65004, + Name: "gogoproto.customname", + Tag: "bytes,65004,opt,name=customname", + Filename: "gogo.proto", +} + +var E_Jsontag = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65005, + Name: "gogoproto.jsontag", + Tag: "bytes,65005,opt,name=jsontag", + Filename: "gogo.proto", +} + +var E_Moretags = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65006, + Name: "gogoproto.moretags", + Tag: "bytes,65006,opt,name=moretags", + Filename: "gogo.proto", +} + +var E_Casttype = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65007, + Name: "gogoproto.casttype", + Tag: "bytes,65007,opt,name=casttype", + Filename: "gogo.proto", +} + +var E_Castkey = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65008, + Name: "gogoproto.castkey", + Tag: "bytes,65008,opt,name=castkey", + Filename: "gogo.proto", +} + +var E_Castvalue = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65009, + Name: "gogoproto.castvalue", + Tag: "bytes,65009,opt,name=castvalue", + Filename: "gogo.proto", +} + +var E_Stdtime = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 65010, + Name: "gogoproto.stdtime", + Tag: "varint,65010,opt,name=stdtime", + Filename: "gogo.proto", +} + +var E_Stdduration = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 65011, + Name: "gogoproto.stdduration", + Tag: "varint,65011,opt,name=stdduration", + Filename: "gogo.proto", +} + +func init() { + proto.RegisterExtension(E_GoprotoEnumPrefix) + proto.RegisterExtension(E_GoprotoEnumStringer) + proto.RegisterExtension(E_EnumStringer) + proto.RegisterExtension(E_EnumCustomname) + proto.RegisterExtension(E_Enumdecl) + proto.RegisterExtension(E_EnumvalueCustomname) + proto.RegisterExtension(E_GoprotoGettersAll) + proto.RegisterExtension(E_GoprotoEnumPrefixAll) + proto.RegisterExtension(E_GoprotoStringerAll) + proto.RegisterExtension(E_VerboseEqualAll) + proto.RegisterExtension(E_FaceAll) + proto.RegisterExtension(E_GostringAll) + proto.RegisterExtension(E_PopulateAll) + proto.RegisterExtension(E_StringerAll) + proto.RegisterExtension(E_OnlyoneAll) + proto.RegisterExtension(E_EqualAll) + proto.RegisterExtension(E_DescriptionAll) + proto.RegisterExtension(E_TestgenAll) + proto.RegisterExtension(E_BenchgenAll) + proto.RegisterExtension(E_MarshalerAll) + proto.RegisterExtension(E_UnmarshalerAll) + proto.RegisterExtension(E_StableMarshalerAll) + proto.RegisterExtension(E_SizerAll) + proto.RegisterExtension(E_GoprotoEnumStringerAll) + proto.RegisterExtension(E_EnumStringerAll) + proto.RegisterExtension(E_UnsafeMarshalerAll) + proto.RegisterExtension(E_UnsafeUnmarshalerAll) + proto.RegisterExtension(E_GoprotoExtensionsMapAll) + proto.RegisterExtension(E_GoprotoUnrecognizedAll) + proto.RegisterExtension(E_GogoprotoImport) + proto.RegisterExtension(E_ProtosizerAll) + proto.RegisterExtension(E_CompareAll) + proto.RegisterExtension(E_TypedeclAll) + proto.RegisterExtension(E_EnumdeclAll) + proto.RegisterExtension(E_GoprotoRegistration) + proto.RegisterExtension(E_GoprotoGetters) + proto.RegisterExtension(E_GoprotoStringer) + proto.RegisterExtension(E_VerboseEqual) + proto.RegisterExtension(E_Face) + proto.RegisterExtension(E_Gostring) + proto.RegisterExtension(E_Populate) + proto.RegisterExtension(E_Stringer) + proto.RegisterExtension(E_Onlyone) + proto.RegisterExtension(E_Equal) + proto.RegisterExtension(E_Description) + proto.RegisterExtension(E_Testgen) + proto.RegisterExtension(E_Benchgen) + proto.RegisterExtension(E_Marshaler) + proto.RegisterExtension(E_Unmarshaler) + proto.RegisterExtension(E_StableMarshaler) + proto.RegisterExtension(E_Sizer) + proto.RegisterExtension(E_UnsafeMarshaler) + proto.RegisterExtension(E_UnsafeUnmarshaler) + proto.RegisterExtension(E_GoprotoExtensionsMap) + proto.RegisterExtension(E_GoprotoUnrecognized) + proto.RegisterExtension(E_Protosizer) + proto.RegisterExtension(E_Compare) + proto.RegisterExtension(E_Typedecl) + proto.RegisterExtension(E_Nullable) + proto.RegisterExtension(E_Embed) + proto.RegisterExtension(E_Customtype) + proto.RegisterExtension(E_Customname) + proto.RegisterExtension(E_Jsontag) + proto.RegisterExtension(E_Moretags) + proto.RegisterExtension(E_Casttype) + proto.RegisterExtension(E_Castkey) + proto.RegisterExtension(E_Castvalue) + proto.RegisterExtension(E_Stdtime) + proto.RegisterExtension(E_Stdduration) +} + +func init() { proto.RegisterFile("gogo.proto", fileDescriptorGogo) } + +var fileDescriptorGogo = []byte{ + // 1201 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x98, 0xcb, 0x6f, 0x1c, 0x45, + 0x13, 0xc0, 0xf5, 0xe9, 0x73, 0x64, 0x6f, 0xf9, 0x85, 0xd7, 0xc6, 0x84, 0x08, 0x44, 0x72, 0xe3, + 0xe4, 0x9c, 0x22, 0x94, 0xb6, 0x22, 0xcb, 0xb1, 0x1c, 0x2b, 0x11, 0x06, 0x63, 0xe2, 0x00, 0xe2, + 0xb0, 0x9a, 0xdd, 0x6d, 0x4f, 0x06, 0x66, 0xa6, 0x87, 0x99, 0x9e, 0x28, 0xce, 0x0d, 0x85, 0x87, + 0x10, 0xe2, 0x8d, 0x04, 0x09, 0x49, 0x80, 0x03, 0xef, 0x67, 0x78, 0x1f, 0xb9, 0xf0, 0xb8, 0xf2, + 0x3f, 0x70, 0x01, 0xcc, 0xdb, 0x37, 0x5f, 0x50, 0xcd, 0x56, 0xcd, 0xf6, 0xac, 0x57, 0xea, 0xde, + 0xdb, 0xec, 0xba, 0x7f, 0xbf, 0xad, 0xa9, 0x9a, 0xae, 0xea, 0x31, 0x80, 0xaf, 0x7c, 0x35, 0x97, + 0xa4, 0x4a, 0xab, 0x7a, 0x0d, 0xaf, 0x8b, 0xcb, 0x03, 0x07, 0x7d, 0xa5, 0xfc, 0x50, 0x1e, 0x2e, + 0x3e, 0x35, 0xf3, 0xcd, 0xc3, 0x6d, 0x99, 0xb5, 0xd2, 0x20, 0xd1, 0x2a, 0xed, 0x2c, 0x16, 0x77, + 0xc1, 0x34, 0x2d, 0x6e, 0xc8, 0x38, 0x8f, 0x1a, 0x49, 0x2a, 0x37, 0x83, 0xf3, 0xf5, 0x5b, 0xe6, + 0x3a, 0xe4, 0x1c, 0x93, 0x73, 0xcb, 0x71, 0x1e, 0xdd, 0x9d, 0xe8, 0x40, 0xc5, 0xd9, 0xfe, 0xeb, + 0x3f, 0xff, 0xff, 0xe0, 0xff, 0x6e, 0x1f, 0x59, 0x9f, 0x22, 0x14, 0xff, 0xb6, 0x56, 0x80, 0x62, + 0x1d, 0x6e, 0xac, 0xf8, 0x32, 0x9d, 0x06, 0xb1, 0x2f, 0x53, 0x8b, 0xf1, 0x3b, 0x32, 0x4e, 0x1b, + 0xc6, 0x7b, 0x09, 0x15, 0x4b, 0x30, 0x3e, 0x88, 0xeb, 0x7b, 0x72, 0x8d, 0x49, 0x53, 0xb2, 0x02, + 0x93, 0x85, 0xa4, 0x95, 0x67, 0x5a, 0x45, 0xb1, 0x17, 0x49, 0x8b, 0xe6, 0x87, 0x42, 0x53, 0x5b, + 0x9f, 0x40, 0x6c, 0xa9, 0xa4, 0x84, 0x80, 0x11, 0xfc, 0xa6, 0x2d, 0x5b, 0xa1, 0xc5, 0xf0, 0x23, + 0x05, 0x52, 0xae, 0x17, 0x67, 0x60, 0x06, 0xaf, 0xcf, 0x79, 0x61, 0x2e, 0xcd, 0x48, 0x0e, 0xf5, + 0xf5, 0x9c, 0xc1, 0x65, 0x2c, 0xfb, 0xe9, 0xe2, 0x50, 0x11, 0xce, 0x74, 0x29, 0x30, 0x62, 0x32, + 0xaa, 0xe8, 0x4b, 0xad, 0x65, 0x9a, 0x35, 0xbc, 0xb0, 0x5f, 0x78, 0x27, 0x82, 0xb0, 0x34, 0x5e, + 0xda, 0xae, 0x56, 0x71, 0xa5, 0x43, 0x2e, 0x86, 0xa1, 0xd8, 0x80, 0x9b, 0xfa, 0x3c, 0x15, 0x0e, + 0xce, 0xcb, 0xe4, 0x9c, 0xd9, 0xf3, 0x64, 0xa0, 0x76, 0x0d, 0xf8, 0xfb, 0xb2, 0x96, 0x0e, 0xce, + 0xd7, 0xc8, 0x59, 0x27, 0x96, 0x4b, 0x8a, 0xc6, 0x53, 0x30, 0x75, 0x4e, 0xa6, 0x4d, 0x95, 0xc9, + 0x86, 0x7c, 0x24, 0xf7, 0x42, 0x07, 0xdd, 0x15, 0xd2, 0x4d, 0x12, 0xb8, 0x8c, 0x1c, 0xba, 0x8e, + 0xc2, 0xc8, 0xa6, 0xd7, 0x92, 0x0e, 0x8a, 0xab, 0xa4, 0x18, 0xc6, 0xf5, 0x88, 0x2e, 0xc2, 0x98, + 0xaf, 0x3a, 0xb7, 0xe4, 0x80, 0x5f, 0x23, 0x7c, 0x94, 0x19, 0x52, 0x24, 0x2a, 0xc9, 0x43, 0x4f, + 0xbb, 0x44, 0xf0, 0x3a, 0x2b, 0x98, 0x21, 0xc5, 0x00, 0x69, 0x7d, 0x83, 0x15, 0x99, 0x91, 0xcf, + 0x05, 0x18, 0x55, 0x71, 0xb8, 0xa5, 0x62, 0x97, 0x20, 0xde, 0x24, 0x03, 0x10, 0x82, 0x82, 0x79, + 0xa8, 0xb9, 0x16, 0xe2, 0xad, 0x6d, 0xde, 0x1e, 0x5c, 0x81, 0x15, 0x98, 0xe4, 0x06, 0x15, 0xa8, + 0xd8, 0x41, 0xf1, 0x36, 0x29, 0x26, 0x0c, 0x8c, 0x6e, 0x43, 0xcb, 0x4c, 0xfb, 0xd2, 0x45, 0xf2, + 0x0e, 0xdf, 0x06, 0x21, 0x94, 0xca, 0xa6, 0x8c, 0x5b, 0x67, 0xdd, 0x0c, 0xef, 0x72, 0x2a, 0x99, + 0x41, 0xc5, 0x12, 0x8c, 0x47, 0x5e, 0x9a, 0x9d, 0xf5, 0x42, 0xa7, 0x72, 0xbc, 0x47, 0x8e, 0xb1, + 0x12, 0xa2, 0x8c, 0xe4, 0xf1, 0x20, 0x9a, 0xf7, 0x39, 0x23, 0x06, 0x46, 0x5b, 0x2f, 0xd3, 0x5e, + 0x33, 0x94, 0x8d, 0x41, 0x6c, 0x1f, 0xf0, 0xd6, 0xeb, 0xb0, 0xab, 0xa6, 0x71, 0x1e, 0x6a, 0x59, + 0x70, 0xc1, 0x49, 0xf3, 0x21, 0x57, 0xba, 0x00, 0x10, 0x7e, 0x00, 0x6e, 0xee, 0x3b, 0x26, 0x1c, + 0x64, 0x1f, 0x91, 0x6c, 0xb6, 0xcf, 0xa8, 0xa0, 0x96, 0x30, 0xa8, 0xf2, 0x63, 0x6e, 0x09, 0xb2, + 0xc7, 0xb5, 0x06, 0x33, 0x79, 0x9c, 0x79, 0x9b, 0x83, 0x65, 0xed, 0x13, 0xce, 0x5a, 0x87, 0xad, + 0x64, 0xed, 0x34, 0xcc, 0x92, 0x71, 0xb0, 0xba, 0x7e, 0xca, 0x8d, 0xb5, 0x43, 0x6f, 0x54, 0xab, + 0xfb, 0x20, 0x1c, 0x28, 0xd3, 0x79, 0x5e, 0xcb, 0x38, 0x43, 0xa6, 0x11, 0x79, 0x89, 0x83, 0xf9, + 0x3a, 0x99, 0xb9, 0xe3, 0x2f, 0x97, 0x82, 0x55, 0x2f, 0x41, 0xf9, 0xfd, 0xb0, 0x9f, 0xe5, 0x79, + 0x9c, 0xca, 0x96, 0xf2, 0xe3, 0xe0, 0x82, 0x6c, 0x3b, 0xa8, 0x3f, 0xeb, 0x29, 0xd5, 0x86, 0x81, + 0xa3, 0xf9, 0x24, 0xdc, 0x50, 0x9e, 0x55, 0x1a, 0x41, 0x94, 0xa8, 0x54, 0x5b, 0x8c, 0x9f, 0x73, + 0xa5, 0x4a, 0xee, 0x64, 0x81, 0x89, 0x65, 0x98, 0x28, 0x3e, 0xba, 0x3e, 0x92, 0x5f, 0x90, 0x68, + 0xbc, 0x4b, 0x51, 0xe3, 0x68, 0xa9, 0x28, 0xf1, 0x52, 0x97, 0xfe, 0xf7, 0x25, 0x37, 0x0e, 0x42, + 0xa8, 0x71, 0xe8, 0xad, 0x44, 0xe2, 0xb4, 0x77, 0x30, 0x7c, 0xc5, 0x8d, 0x83, 0x19, 0x52, 0xf0, + 0x81, 0xc1, 0x41, 0xf1, 0x35, 0x2b, 0x98, 0x41, 0xc5, 0x3d, 0xdd, 0x41, 0x9b, 0x4a, 0x3f, 0xc8, + 0x74, 0xea, 0xe1, 0x6a, 0x8b, 0xea, 0x9b, 0xed, 0xea, 0x21, 0x6c, 0xdd, 0x40, 0xc5, 0x29, 0x98, + 0xec, 0x39, 0x62, 0xd4, 0x6f, 0xdb, 0x63, 0x5b, 0x95, 0x59, 0xe6, 0xf9, 0xa5, 0xf0, 0xd1, 0x1d, + 0x6a, 0x46, 0xd5, 0x13, 0x86, 0xb8, 0x13, 0xeb, 0x5e, 0x3d, 0x07, 0xd8, 0x65, 0x17, 0x77, 0xca, + 0xd2, 0x57, 0x8e, 0x01, 0xe2, 0x04, 0x8c, 0x57, 0xce, 0x00, 0x76, 0xd5, 0x63, 0xa4, 0x1a, 0x33, + 0x8f, 0x00, 0xe2, 0x08, 0x0c, 0xe1, 0x3c, 0xb7, 0xe3, 0x8f, 0x13, 0x5e, 0x2c, 0x17, 0xc7, 0x60, + 0x84, 0xe7, 0xb8, 0x1d, 0x7d, 0x82, 0xd0, 0x12, 0x41, 0x9c, 0x67, 0xb8, 0x1d, 0x7f, 0x92, 0x71, + 0x46, 0x10, 0x77, 0x4f, 0xe1, 0xb7, 0x4f, 0x0f, 0x51, 0x1f, 0xe6, 0xdc, 0xcd, 0xc3, 0x30, 0x0d, + 0x6f, 0x3b, 0xfd, 0x14, 0xfd, 0x38, 0x13, 0xe2, 0x0e, 0xd8, 0xe7, 0x98, 0xf0, 0x67, 0x08, 0xed, + 0xac, 0x17, 0x4b, 0x30, 0x6a, 0x0c, 0x6c, 0x3b, 0xfe, 0x2c, 0xe1, 0x26, 0x85, 0xa1, 0xd3, 0xc0, + 0xb6, 0x0b, 0x9e, 0xe3, 0xd0, 0x89, 0xc0, 0xb4, 0xf1, 0xac, 0xb6, 0xd3, 0xcf, 0x73, 0xd6, 0x19, + 0x11, 0x0b, 0x50, 0x2b, 0xfb, 0xaf, 0x9d, 0x7f, 0x81, 0xf8, 0x2e, 0x83, 0x19, 0x30, 0xfa, 0xbf, + 0x5d, 0xf1, 0x22, 0x67, 0xc0, 0xa0, 0x70, 0x1b, 0xf5, 0xce, 0x74, 0xbb, 0xe9, 0x25, 0xde, 0x46, + 0x3d, 0x23, 0x1d, 0xab, 0x59, 0xb4, 0x41, 0xbb, 0xe2, 0x65, 0xae, 0x66, 0xb1, 0x1e, 0xc3, 0xe8, + 0x1d, 0x92, 0x76, 0xc7, 0x2b, 0x1c, 0x46, 0xcf, 0x8c, 0x14, 0x6b, 0x50, 0xdf, 0x3b, 0x20, 0xed, + 0xbe, 0x57, 0xc9, 0x37, 0xb5, 0x67, 0x3e, 0x8a, 0xfb, 0x60, 0xb6, 0xff, 0x70, 0xb4, 0x5b, 0x2f, + 0xed, 0xf4, 0xbc, 0xce, 0x98, 0xb3, 0x51, 0x9c, 0xee, 0x76, 0x59, 0x73, 0x30, 0xda, 0xb5, 0x97, + 0x77, 0xaa, 0x8d, 0xd6, 0x9c, 0x8b, 0x62, 0x11, 0xa0, 0x3b, 0x93, 0xec, 0xae, 0x2b, 0xe4, 0x32, + 0x20, 0xdc, 0x1a, 0x34, 0x92, 0xec, 0xfc, 0x55, 0xde, 0x1a, 0x44, 0xe0, 0xd6, 0xe0, 0x69, 0x64, + 0xa7, 0xaf, 0xf1, 0xd6, 0x60, 0x44, 0xcc, 0xc3, 0x48, 0x9c, 0x87, 0x21, 0x3e, 0x5b, 0xf5, 0x5b, + 0xfb, 0x8c, 0x1b, 0x19, 0xb6, 0x19, 0xfe, 0x65, 0x97, 0x60, 0x06, 0xc4, 0x11, 0xd8, 0x27, 0xa3, + 0xa6, 0x6c, 0xdb, 0xc8, 0x5f, 0x77, 0xb9, 0x9f, 0xe0, 0x6a, 0xb1, 0x00, 0xd0, 0x79, 0x99, 0xc6, + 0x28, 0x6c, 0xec, 0x6f, 0xbb, 0x9d, 0xf7, 0x7a, 0x03, 0xe9, 0x0a, 0x8a, 0xb7, 0x71, 0x8b, 0x60, + 0xbb, 0x2a, 0x28, 0x5e, 0xc0, 0x8f, 0xc2, 0xf0, 0x43, 0x99, 0x8a, 0xb5, 0xe7, 0xdb, 0xe8, 0xdf, + 0x89, 0xe6, 0xf5, 0x98, 0xb0, 0x48, 0xa5, 0x52, 0x7b, 0x7e, 0x66, 0x63, 0xff, 0x20, 0xb6, 0x04, + 0x10, 0x6e, 0x79, 0x99, 0x76, 0xb9, 0xef, 0x3f, 0x19, 0x66, 0x00, 0x83, 0xc6, 0xeb, 0x87, 0xe5, + 0x96, 0x8d, 0xfd, 0x8b, 0x83, 0xa6, 0xf5, 0xe2, 0x18, 0xd4, 0xf0, 0xb2, 0xf8, 0x3f, 0x84, 0x0d, + 0xfe, 0x9b, 0xe0, 0x2e, 0x81, 0xbf, 0x9c, 0xe9, 0xb6, 0x0e, 0xec, 0xc9, 0xfe, 0x87, 0x2a, 0xcd, + 0xeb, 0xc5, 0x22, 0x8c, 0x66, 0xba, 0xdd, 0xce, 0xe9, 0x44, 0x63, 0xc1, 0xff, 0xdd, 0x2d, 0x5f, + 0x72, 0x4b, 0xe6, 0xf8, 0x21, 0x98, 0x6e, 0xa9, 0xa8, 0x17, 0x3c, 0x0e, 0x2b, 0x6a, 0x45, 0xad, + 0x15, 0xbb, 0xe8, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0a, 0x9c, 0xec, 0xd8, 0x50, 0x13, 0x00, + 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.golden b/vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.golden new file mode 100644 index 000000000..f6502e4b9 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.golden @@ -0,0 +1,45 @@ +// Code generated by protoc-gen-go. +// source: gogo.proto +// DO NOT EDIT! + +package gogoproto + +import proto "github.com/gogo/protobuf/proto" +import json "encoding/json" +import math "math" +import google_protobuf "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + +// Reference proto, json, and math imports to suppress error if they are not otherwise used. +var _ = proto.Marshal +var _ = &json.SyntaxError{} +var _ = math.Inf + +var E_Nullable = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 51235, + Name: "gogoproto.nullable", + Tag: "varint,51235,opt,name=nullable", +} + +var E_Embed = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 51236, + Name: "gogoproto.embed", + Tag: "varint,51236,opt,name=embed", +} + +var E_Customtype = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 51237, + Name: "gogoproto.customtype", + Tag: "bytes,51237,opt,name=customtype", +} + +func init() { + proto.RegisterExtension(E_Nullable) + proto.RegisterExtension(E_Embed) + proto.RegisterExtension(E_Customtype) +} diff --git a/vendor/github.com/gogo/protobuf/gogoproto/gogo.proto b/vendor/github.com/gogo/protobuf/gogoproto/gogo.proto new file mode 100644 index 000000000..fbca44cd4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/gogoproto/gogo.proto @@ -0,0 +1,132 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// 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. +// +// 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. + +syntax = "proto2"; +package gogoproto; + +import "google/protobuf/descriptor.proto"; + +option java_package = "com.google.protobuf"; +option java_outer_classname = "GoGoProtos"; + +extend google.protobuf.EnumOptions { + optional bool goproto_enum_prefix = 62001; + optional bool goproto_enum_stringer = 62021; + optional bool enum_stringer = 62022; + optional string enum_customname = 62023; + optional bool enumdecl = 62024; +} + +extend google.protobuf.EnumValueOptions { + optional string enumvalue_customname = 66001; +} + +extend google.protobuf.FileOptions { + optional bool goproto_getters_all = 63001; + optional bool goproto_enum_prefix_all = 63002; + optional bool goproto_stringer_all = 63003; + optional bool verbose_equal_all = 63004; + optional bool face_all = 63005; + optional bool gostring_all = 63006; + optional bool populate_all = 63007; + optional bool stringer_all = 63008; + optional bool onlyone_all = 63009; + + optional bool equal_all = 63013; + optional bool description_all = 63014; + optional bool testgen_all = 63015; + optional bool benchgen_all = 63016; + optional bool marshaler_all = 63017; + optional bool unmarshaler_all = 63018; + optional bool stable_marshaler_all = 63019; + + optional bool sizer_all = 63020; + + optional bool goproto_enum_stringer_all = 63021; + optional bool enum_stringer_all = 63022; + + optional bool unsafe_marshaler_all = 63023; + optional bool unsafe_unmarshaler_all = 63024; + + optional bool goproto_extensions_map_all = 63025; + optional bool goproto_unrecognized_all = 63026; + optional bool gogoproto_import = 63027; + optional bool protosizer_all = 63028; + optional bool compare_all = 63029; + optional bool typedecl_all = 63030; + optional bool enumdecl_all = 63031; + + optional bool goproto_registration = 63032; +} + +extend google.protobuf.MessageOptions { + optional bool goproto_getters = 64001; + optional bool goproto_stringer = 64003; + optional bool verbose_equal = 64004; + optional bool face = 64005; + optional bool gostring = 64006; + optional bool populate = 64007; + optional bool stringer = 67008; + optional bool onlyone = 64009; + + optional bool equal = 64013; + optional bool description = 64014; + optional bool testgen = 64015; + optional bool benchgen = 64016; + optional bool marshaler = 64017; + optional bool unmarshaler = 64018; + optional bool stable_marshaler = 64019; + + optional bool sizer = 64020; + + optional bool unsafe_marshaler = 64023; + optional bool unsafe_unmarshaler = 64024; + + optional bool goproto_extensions_map = 64025; + optional bool goproto_unrecognized = 64026; + + optional bool protosizer = 64028; + optional bool compare = 64029; + + optional bool typedecl = 64030; +} + +extend google.protobuf.FieldOptions { + optional bool nullable = 65001; + optional bool embed = 65002; + optional string customtype = 65003; + optional string customname = 65004; + optional string jsontag = 65005; + optional string moretags = 65006; + optional string casttype = 65007; + optional string castkey = 65008; + optional string castvalue = 65009; + + optional bool stdtime = 65010; + optional bool stdduration = 65011; +} diff --git a/vendor/github.com/gogo/protobuf/gogoproto/helper.go b/vendor/github.com/gogo/protobuf/gogoproto/helper.go new file mode 100644 index 000000000..6b851c562 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/gogoproto/helper.go @@ -0,0 +1,357 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// 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. +// +// 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. + +package gogoproto + +import google_protobuf "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import proto "github.com/gogo/protobuf/proto" + +func IsEmbed(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Embed, false) +} + +func IsNullable(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Nullable, true) +} + +func IsStdTime(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Stdtime, false) +} + +func IsStdDuration(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Stdduration, false) +} + +func NeedsNilCheck(proto3 bool, field *google_protobuf.FieldDescriptorProto) bool { + nullable := IsNullable(field) + if field.IsMessage() || IsCustomType(field) { + return nullable + } + if proto3 { + return false + } + return nullable || *field.Type == google_protobuf.FieldDescriptorProto_TYPE_BYTES +} + +func IsCustomType(field *google_protobuf.FieldDescriptorProto) bool { + typ := GetCustomType(field) + if len(typ) > 0 { + return true + } + return false +} + +func IsCastType(field *google_protobuf.FieldDescriptorProto) bool { + typ := GetCastType(field) + if len(typ) > 0 { + return true + } + return false +} + +func IsCastKey(field *google_protobuf.FieldDescriptorProto) bool { + typ := GetCastKey(field) + if len(typ) > 0 { + return true + } + return false +} + +func IsCastValue(field *google_protobuf.FieldDescriptorProto) bool { + typ := GetCastValue(field) + if len(typ) > 0 { + return true + } + return false +} + +func HasEnumDecl(file *google_protobuf.FileDescriptorProto, enum *google_protobuf.EnumDescriptorProto) bool { + return proto.GetBoolExtension(enum.Options, E_Enumdecl, proto.GetBoolExtension(file.Options, E_EnumdeclAll, true)) +} + +func HasTypeDecl(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Typedecl, proto.GetBoolExtension(file.Options, E_TypedeclAll, true)) +} + +func GetCustomType(field *google_protobuf.FieldDescriptorProto) string { + if field == nil { + return "" + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_Customtype) + if err == nil && v.(*string) != nil { + return *(v.(*string)) + } + } + return "" +} + +func GetCastType(field *google_protobuf.FieldDescriptorProto) string { + if field == nil { + return "" + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_Casttype) + if err == nil && v.(*string) != nil { + return *(v.(*string)) + } + } + return "" +} + +func GetCastKey(field *google_protobuf.FieldDescriptorProto) string { + if field == nil { + return "" + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_Castkey) + if err == nil && v.(*string) != nil { + return *(v.(*string)) + } + } + return "" +} + +func GetCastValue(field *google_protobuf.FieldDescriptorProto) string { + if field == nil { + return "" + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_Castvalue) + if err == nil && v.(*string) != nil { + return *(v.(*string)) + } + } + return "" +} + +func IsCustomName(field *google_protobuf.FieldDescriptorProto) bool { + name := GetCustomName(field) + if len(name) > 0 { + return true + } + return false +} + +func IsEnumCustomName(field *google_protobuf.EnumDescriptorProto) bool { + name := GetEnumCustomName(field) + if len(name) > 0 { + return true + } + return false +} + +func IsEnumValueCustomName(field *google_protobuf.EnumValueDescriptorProto) bool { + name := GetEnumValueCustomName(field) + if len(name) > 0 { + return true + } + return false +} + +func GetCustomName(field *google_protobuf.FieldDescriptorProto) string { + if field == nil { + return "" + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_Customname) + if err == nil && v.(*string) != nil { + return *(v.(*string)) + } + } + return "" +} + +func GetEnumCustomName(field *google_protobuf.EnumDescriptorProto) string { + if field == nil { + return "" + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_EnumCustomname) + if err == nil && v.(*string) != nil { + return *(v.(*string)) + } + } + return "" +} + +func GetEnumValueCustomName(field *google_protobuf.EnumValueDescriptorProto) string { + if field == nil { + return "" + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_EnumvalueCustomname) + if err == nil && v.(*string) != nil { + return *(v.(*string)) + } + } + return "" +} + +func GetJsonTag(field *google_protobuf.FieldDescriptorProto) *string { + if field == nil { + return nil + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_Jsontag) + if err == nil && v.(*string) != nil { + return (v.(*string)) + } + } + return nil +} + +func GetMoreTags(field *google_protobuf.FieldDescriptorProto) *string { + if field == nil { + return nil + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_Moretags) + if err == nil && v.(*string) != nil { + return (v.(*string)) + } + } + return nil +} + +type EnableFunc func(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool + +func EnabledGoEnumPrefix(file *google_protobuf.FileDescriptorProto, enum *google_protobuf.EnumDescriptorProto) bool { + return proto.GetBoolExtension(enum.Options, E_GoprotoEnumPrefix, proto.GetBoolExtension(file.Options, E_GoprotoEnumPrefixAll, true)) +} + +func EnabledGoStringer(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_GoprotoStringer, proto.GetBoolExtension(file.Options, E_GoprotoStringerAll, true)) +} + +func HasGoGetters(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_GoprotoGetters, proto.GetBoolExtension(file.Options, E_GoprotoGettersAll, true)) +} + +func IsUnion(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Onlyone, proto.GetBoolExtension(file.Options, E_OnlyoneAll, false)) +} + +func HasGoString(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Gostring, proto.GetBoolExtension(file.Options, E_GostringAll, false)) +} + +func HasEqual(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Equal, proto.GetBoolExtension(file.Options, E_EqualAll, false)) +} + +func HasVerboseEqual(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_VerboseEqual, proto.GetBoolExtension(file.Options, E_VerboseEqualAll, false)) +} + +func IsStringer(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Stringer, proto.GetBoolExtension(file.Options, E_StringerAll, false)) +} + +func IsFace(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Face, proto.GetBoolExtension(file.Options, E_FaceAll, false)) +} + +func HasDescription(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Description, proto.GetBoolExtension(file.Options, E_DescriptionAll, false)) +} + +func HasPopulate(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Populate, proto.GetBoolExtension(file.Options, E_PopulateAll, false)) +} + +func HasTestGen(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Testgen, proto.GetBoolExtension(file.Options, E_TestgenAll, false)) +} + +func HasBenchGen(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Benchgen, proto.GetBoolExtension(file.Options, E_BenchgenAll, false)) +} + +func IsMarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Marshaler, proto.GetBoolExtension(file.Options, E_MarshalerAll, false)) +} + +func IsUnmarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Unmarshaler, proto.GetBoolExtension(file.Options, E_UnmarshalerAll, false)) +} + +func IsStableMarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_StableMarshaler, proto.GetBoolExtension(file.Options, E_StableMarshalerAll, false)) +} + +func IsSizer(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Sizer, proto.GetBoolExtension(file.Options, E_SizerAll, false)) +} + +func IsProtoSizer(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Protosizer, proto.GetBoolExtension(file.Options, E_ProtosizerAll, false)) +} + +func IsGoEnumStringer(file *google_protobuf.FileDescriptorProto, enum *google_protobuf.EnumDescriptorProto) bool { + return proto.GetBoolExtension(enum.Options, E_GoprotoEnumStringer, proto.GetBoolExtension(file.Options, E_GoprotoEnumStringerAll, true)) +} + +func IsEnumStringer(file *google_protobuf.FileDescriptorProto, enum *google_protobuf.EnumDescriptorProto) bool { + return proto.GetBoolExtension(enum.Options, E_EnumStringer, proto.GetBoolExtension(file.Options, E_EnumStringerAll, false)) +} + +func IsUnsafeMarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_UnsafeMarshaler, proto.GetBoolExtension(file.Options, E_UnsafeMarshalerAll, false)) +} + +func IsUnsafeUnmarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_UnsafeUnmarshaler, proto.GetBoolExtension(file.Options, E_UnsafeUnmarshalerAll, false)) +} + +func HasExtensionsMap(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_GoprotoExtensionsMap, proto.GetBoolExtension(file.Options, E_GoprotoExtensionsMapAll, true)) +} + +func HasUnrecognized(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + if IsProto3(file) { + return false + } + return proto.GetBoolExtension(message.Options, E_GoprotoUnrecognized, proto.GetBoolExtension(file.Options, E_GoprotoUnrecognizedAll, true)) +} + +func IsProto3(file *google_protobuf.FileDescriptorProto) bool { + return file.GetSyntax() == "proto3" +} + +func ImportsGoGoProto(file *google_protobuf.FileDescriptorProto) bool { + return proto.GetBoolExtension(file.Options, E_GogoprotoImport, true) +} + +func HasCompare(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Compare, proto.GetBoolExtension(file.Options, E_CompareAll, false)) +} + +func RegistersGolangProto(file *google_protobuf.FileDescriptorProto) bool { + return proto.GetBoolExtension(file.Options, E_GoprotoRegistration, false) +} diff --git a/vendor/github.com/gogo/protobuf/install-protobuf.sh b/vendor/github.com/gogo/protobuf/install-protobuf.sh new file mode 100755 index 000000000..10c9320ea --- /dev/null +++ b/vendor/github.com/gogo/protobuf/install-protobuf.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +set -ex + +die() { + echo "$@" >&2 + exit 1 +} + +case "$PROTOBUF_VERSION" in +2*) + basename=protobuf-$PROTOBUF_VERSION + ;; +3*) + basename=protobuf-cpp-$PROTOBUF_VERSION + ;; +*) + die "unknown protobuf version: $PROTOBUF_VERSION" + ;; +esac + +cd /home/travis + +wget https://github.com/google/protobuf/releases/download/v$PROTOBUF_VERSION/$basename.tar.gz +tar xzf $basename.tar.gz + +cd protobuf-$PROTOBUF_VERSION + +./configure --prefix=/home/travis && make -j2 && make install diff --git a/vendor/github.com/gogo/protobuf/proto/all_test.go b/vendor/github.com/gogo/protobuf/proto/all_test.go new file mode 100644 index 000000000..b5f8709d8 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/all_test.go @@ -0,0 +1,2278 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto_test + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "math" + "math/rand" + "reflect" + "runtime/debug" + "strings" + "testing" + "time" + + . "github.com/gogo/protobuf/proto" + . "github.com/gogo/protobuf/proto/testdata" +) + +var globalO *Buffer + +func old() *Buffer { + if globalO == nil { + globalO = NewBuffer(nil) + } + globalO.Reset() + return globalO +} + +func equalbytes(b1, b2 []byte, t *testing.T) { + if len(b1) != len(b2) { + t.Errorf("wrong lengths: 2*%d != %d", len(b1), len(b2)) + return + } + for i := 0; i < len(b1); i++ { + if b1[i] != b2[i] { + t.Errorf("bad byte[%d]:%x %x: %s %s", i, b1[i], b2[i], b1, b2) + } + } +} + +func initGoTestField() *GoTestField { + f := new(GoTestField) + f.Label = String("label") + f.Type = String("type") + return f +} + +// These are all structurally equivalent but the tag numbers differ. +// (It's remarkable that required, optional, and repeated all have +// 8 letters.) +func initGoTest_RequiredGroup() *GoTest_RequiredGroup { + return &GoTest_RequiredGroup{ + RequiredField: String("required"), + } +} + +func initGoTest_OptionalGroup() *GoTest_OptionalGroup { + return &GoTest_OptionalGroup{ + RequiredField: String("optional"), + } +} + +func initGoTest_RepeatedGroup() *GoTest_RepeatedGroup { + return &GoTest_RepeatedGroup{ + RequiredField: String("repeated"), + } +} + +func initGoTest(setdefaults bool) *GoTest { + pb := new(GoTest) + if setdefaults { + pb.F_BoolDefaulted = Bool(Default_GoTest_F_BoolDefaulted) + pb.F_Int32Defaulted = Int32(Default_GoTest_F_Int32Defaulted) + pb.F_Int64Defaulted = Int64(Default_GoTest_F_Int64Defaulted) + pb.F_Fixed32Defaulted = Uint32(Default_GoTest_F_Fixed32Defaulted) + pb.F_Fixed64Defaulted = Uint64(Default_GoTest_F_Fixed64Defaulted) + pb.F_Uint32Defaulted = Uint32(Default_GoTest_F_Uint32Defaulted) + pb.F_Uint64Defaulted = Uint64(Default_GoTest_F_Uint64Defaulted) + pb.F_FloatDefaulted = Float32(Default_GoTest_F_FloatDefaulted) + pb.F_DoubleDefaulted = Float64(Default_GoTest_F_DoubleDefaulted) + pb.F_StringDefaulted = String(Default_GoTest_F_StringDefaulted) + pb.F_BytesDefaulted = Default_GoTest_F_BytesDefaulted + pb.F_Sint32Defaulted = Int32(Default_GoTest_F_Sint32Defaulted) + pb.F_Sint64Defaulted = Int64(Default_GoTest_F_Sint64Defaulted) + } + + pb.Kind = GoTest_TIME.Enum() + pb.RequiredField = initGoTestField() + pb.F_BoolRequired = Bool(true) + pb.F_Int32Required = Int32(3) + pb.F_Int64Required = Int64(6) + pb.F_Fixed32Required = Uint32(32) + pb.F_Fixed64Required = Uint64(64) + pb.F_Uint32Required = Uint32(3232) + pb.F_Uint64Required = Uint64(6464) + pb.F_FloatRequired = Float32(3232) + pb.F_DoubleRequired = Float64(6464) + pb.F_StringRequired = String("string") + pb.F_BytesRequired = []byte("bytes") + pb.F_Sint32Required = Int32(-32) + pb.F_Sint64Required = Int64(-64) + pb.Requiredgroup = initGoTest_RequiredGroup() + + return pb +} + +func fail(msg string, b *bytes.Buffer, s string, t *testing.T) { + data := b.Bytes() + ld := len(data) + ls := len(s) / 2 + + fmt.Printf("fail %s ld=%d ls=%d\n", msg, ld, ls) + + // find the interesting spot - n + n := ls + if ld < ls { + n = ld + } + j := 0 + for i := 0; i < n; i++ { + bs := hex(s[j])*16 + hex(s[j+1]) + j += 2 + if data[i] == bs { + continue + } + n = i + break + } + l := n - 10 + if l < 0 { + l = 0 + } + h := n + 10 + + // find the interesting spot - n + fmt.Printf("is[%d]:", l) + for i := l; i < h; i++ { + if i >= ld { + fmt.Printf(" --") + continue + } + fmt.Printf(" %.2x", data[i]) + } + fmt.Printf("\n") + + fmt.Printf("sb[%d]:", l) + for i := l; i < h; i++ { + if i >= ls { + fmt.Printf(" --") + continue + } + bs := hex(s[j])*16 + hex(s[j+1]) + j += 2 + fmt.Printf(" %.2x", bs) + } + fmt.Printf("\n") + + t.Fail() + + // t.Errorf("%s: \ngood: %s\nbad: %x", msg, s, b.Bytes()) + // Print the output in a partially-decoded format; can + // be helpful when updating the test. It produces the output + // that is pasted, with minor edits, into the argument to verify(). + // data := b.Bytes() + // nesting := 0 + // for b.Len() > 0 { + // start := len(data) - b.Len() + // var u uint64 + // u, err := DecodeVarint(b) + // if err != nil { + // fmt.Printf("decode error on varint:", err) + // return + // } + // wire := u & 0x7 + // tag := u >> 3 + // switch wire { + // case WireVarint: + // v, err := DecodeVarint(b) + // if err != nil { + // fmt.Printf("decode error on varint:", err) + // return + // } + // fmt.Printf("\t\t\"%x\" // field %d, encoding %d, value %d\n", + // data[start:len(data)-b.Len()], tag, wire, v) + // case WireFixed32: + // v, err := DecodeFixed32(b) + // if err != nil { + // fmt.Printf("decode error on fixed32:", err) + // return + // } + // fmt.Printf("\t\t\"%x\" // field %d, encoding %d, value %d\n", + // data[start:len(data)-b.Len()], tag, wire, v) + // case WireFixed64: + // v, err := DecodeFixed64(b) + // if err != nil { + // fmt.Printf("decode error on fixed64:", err) + // return + // } + // fmt.Printf("\t\t\"%x\" // field %d, encoding %d, value %d\n", + // data[start:len(data)-b.Len()], tag, wire, v) + // case WireBytes: + // nb, err := DecodeVarint(b) + // if err != nil { + // fmt.Printf("decode error on bytes:", err) + // return + // } + // after_tag := len(data) - b.Len() + // str := make([]byte, nb) + // _, err = b.Read(str) + // if err != nil { + // fmt.Printf("decode error on bytes:", err) + // return + // } + // fmt.Printf("\t\t\"%x\" \"%x\" // field %d, encoding %d (FIELD)\n", + // data[start:after_tag], str, tag, wire) + // case WireStartGroup: + // nesting++ + // fmt.Printf("\t\t\"%x\"\t\t// start group field %d level %d\n", + // data[start:len(data)-b.Len()], tag, nesting) + // case WireEndGroup: + // fmt.Printf("\t\t\"%x\"\t\t// end group field %d level %d\n", + // data[start:len(data)-b.Len()], tag, nesting) + // nesting-- + // default: + // fmt.Printf("unrecognized wire type %d\n", wire) + // return + // } + // } +} + +func hex(c uint8) uint8 { + if '0' <= c && c <= '9' { + return c - '0' + } + if 'a' <= c && c <= 'f' { + return 10 + c - 'a' + } + if 'A' <= c && c <= 'F' { + return 10 + c - 'A' + } + return 0 +} + +func equal(b []byte, s string, t *testing.T) bool { + if 2*len(b) != len(s) { + // fail(fmt.Sprintf("wrong lengths: 2*%d != %d", len(b), len(s)), b, s, t) + fmt.Printf("wrong lengths: 2*%d != %d\n", len(b), len(s)) + return false + } + for i, j := 0, 0; i < len(b); i, j = i+1, j+2 { + x := hex(s[j])*16 + hex(s[j+1]) + if b[i] != x { + // fail(fmt.Sprintf("bad byte[%d]:%x %x", i, b[i], x), b, s, t) + fmt.Printf("bad byte[%d]:%x %x", i, b[i], x) + return false + } + } + return true +} + +func overify(t *testing.T, pb *GoTest, expected string) { + o := old() + err := o.Marshal(pb) + if err != nil { + fmt.Printf("overify marshal-1 err = %v", err) + o.DebugPrint("", o.Bytes()) + t.Fatalf("expected = %s", expected) + } + if !equal(o.Bytes(), expected, t) { + o.DebugPrint("overify neq 1", o.Bytes()) + t.Fatalf("expected = %s", expected) + } + + // Now test Unmarshal by recreating the original buffer. + pbd := new(GoTest) + err = o.Unmarshal(pbd) + if err != nil { + t.Fatalf("overify unmarshal err = %v", err) + o.DebugPrint("", o.Bytes()) + t.Fatalf("string = %s", expected) + } + o.Reset() + err = o.Marshal(pbd) + if err != nil { + t.Errorf("overify marshal-2 err = %v", err) + o.DebugPrint("", o.Bytes()) + t.Fatalf("string = %s", expected) + } + if !equal(o.Bytes(), expected, t) { + o.DebugPrint("overify neq 2", o.Bytes()) + t.Fatalf("string = %s", expected) + } +} + +// Simple tests for numeric encode/decode primitives (varint, etc.) +func TestNumericPrimitives(t *testing.T) { + for i := uint64(0); i < 1e6; i += 111 { + o := old() + if o.EncodeVarint(i) != nil { + t.Error("EncodeVarint") + break + } + x, e := o.DecodeVarint() + if e != nil { + t.Fatal("DecodeVarint") + } + if x != i { + t.Fatal("varint decode fail:", i, x) + } + + o = old() + if o.EncodeFixed32(i) != nil { + t.Fatal("encFixed32") + } + x, e = o.DecodeFixed32() + if e != nil { + t.Fatal("decFixed32") + } + if x != i { + t.Fatal("fixed32 decode fail:", i, x) + } + + o = old() + if o.EncodeFixed64(i*1234567) != nil { + t.Error("encFixed64") + break + } + x, e = o.DecodeFixed64() + if e != nil { + t.Error("decFixed64") + break + } + if x != i*1234567 { + t.Error("fixed64 decode fail:", i*1234567, x) + break + } + + o = old() + i32 := int32(i - 12345) + if o.EncodeZigzag32(uint64(i32)) != nil { + t.Fatal("EncodeZigzag32") + } + x, e = o.DecodeZigzag32() + if e != nil { + t.Fatal("DecodeZigzag32") + } + if x != uint64(uint32(i32)) { + t.Fatal("zigzag32 decode fail:", i32, x) + } + + o = old() + i64 := int64(i - 12345) + if o.EncodeZigzag64(uint64(i64)) != nil { + t.Fatal("EncodeZigzag64") + } + x, e = o.DecodeZigzag64() + if e != nil { + t.Fatal("DecodeZigzag64") + } + if x != uint64(i64) { + t.Fatal("zigzag64 decode fail:", i64, x) + } + } +} + +// fakeMarshaler is a simple struct implementing Marshaler and Message interfaces. +type fakeMarshaler struct { + b []byte + err error +} + +func (f *fakeMarshaler) Marshal() ([]byte, error) { return f.b, f.err } +func (f *fakeMarshaler) String() string { return fmt.Sprintf("Bytes: %v Error: %v", f.b, f.err) } +func (f *fakeMarshaler) ProtoMessage() {} +func (f *fakeMarshaler) Reset() {} + +type msgWithFakeMarshaler struct { + M *fakeMarshaler `protobuf:"bytes,1,opt,name=fake"` +} + +func (m *msgWithFakeMarshaler) String() string { return CompactTextString(m) } +func (m *msgWithFakeMarshaler) ProtoMessage() {} +func (m *msgWithFakeMarshaler) Reset() {} + +// Simple tests for proto messages that implement the Marshaler interface. +func TestMarshalerEncoding(t *testing.T) { + tests := []struct { + name string + m Message + want []byte + errType reflect.Type + }{ + { + name: "Marshaler that fails", + m: &fakeMarshaler{ + err: errors.New("some marshal err"), + b: []byte{5, 6, 7}, + }, + // Since the Marshal method returned bytes, they should be written to the + // buffer. (For efficiency, we assume that Marshal implementations are + // always correct w.r.t. RequiredNotSetError and output.) + want: []byte{5, 6, 7}, + errType: reflect.TypeOf(errors.New("some marshal err")), + }, + { + name: "Marshaler that fails with RequiredNotSetError", + m: &msgWithFakeMarshaler{ + M: &fakeMarshaler{ + err: &RequiredNotSetError{}, + b: []byte{5, 6, 7}, + }, + }, + // Since there's an error that can be continued after, + // the buffer should be written. + want: []byte{ + 10, 3, // for &msgWithFakeMarshaler + 5, 6, 7, // for &fakeMarshaler + }, + errType: reflect.TypeOf(&RequiredNotSetError{}), + }, + { + name: "Marshaler that succeeds", + m: &fakeMarshaler{ + b: []byte{0, 1, 2, 3, 4, 127, 255}, + }, + want: []byte{0, 1, 2, 3, 4, 127, 255}, + }, + } + for _, test := range tests { + b := NewBuffer(nil) + err := b.Marshal(test.m) + if reflect.TypeOf(err) != test.errType { + t.Errorf("%s: got err %T(%v) wanted %T", test.name, err, err, test.errType) + } + if !reflect.DeepEqual(test.want, b.Bytes()) { + t.Errorf("%s: got bytes %v wanted %v", test.name, b.Bytes(), test.want) + } + if size := Size(test.m); size != len(b.Bytes()) { + t.Errorf("%s: Size(_) = %v, but marshaled to %v bytes", test.name, size, len(b.Bytes())) + } + + m, mErr := Marshal(test.m) + if !bytes.Equal(b.Bytes(), m) { + t.Errorf("%s: Marshal returned %v, but (*Buffer).Marshal wrote %v", test.name, m, b.Bytes()) + } + if !reflect.DeepEqual(err, mErr) { + t.Errorf("%s: Marshal err = %q, but (*Buffer).Marshal returned %q", + test.name, fmt.Sprint(mErr), fmt.Sprint(err)) + } + } +} + +// Simple tests for bytes +func TestBytesPrimitives(t *testing.T) { + o := old() + bytes := []byte{'n', 'o', 'w', ' ', 'i', 's', ' ', 't', 'h', 'e', ' ', 't', 'i', 'm', 'e'} + if o.EncodeRawBytes(bytes) != nil { + t.Error("EncodeRawBytes") + } + decb, e := o.DecodeRawBytes(false) + if e != nil { + t.Error("DecodeRawBytes") + } + equalbytes(bytes, decb, t) +} + +// Simple tests for strings +func TestStringPrimitives(t *testing.T) { + o := old() + s := "now is the time" + if o.EncodeStringBytes(s) != nil { + t.Error("enc_string") + } + decs, e := o.DecodeStringBytes() + if e != nil { + t.Error("dec_string") + } + if s != decs { + t.Error("string encode/decode fail:", s, decs) + } +} + +// Do we catch the "required bit not set" case? +func TestRequiredBit(t *testing.T) { + o := old() + pb := new(GoTest) + err := o.Marshal(pb) + if err == nil { + t.Error("did not catch missing required fields") + } else if strings.Index(err.Error(), "Kind") < 0 { + t.Error("wrong error type:", err) + } +} + +// Check that all fields are nil. +// Clearly silly, and a residue from a more interesting test with an earlier, +// different initialization property, but it once caught a compiler bug so +// it lives. +func checkInitialized(pb *GoTest, t *testing.T) { + if pb.F_BoolDefaulted != nil { + t.Error("New or Reset did not set boolean:", *pb.F_BoolDefaulted) + } + if pb.F_Int32Defaulted != nil { + t.Error("New or Reset did not set int32:", *pb.F_Int32Defaulted) + } + if pb.F_Int64Defaulted != nil { + t.Error("New or Reset did not set int64:", *pb.F_Int64Defaulted) + } + if pb.F_Fixed32Defaulted != nil { + t.Error("New or Reset did not set fixed32:", *pb.F_Fixed32Defaulted) + } + if pb.F_Fixed64Defaulted != nil { + t.Error("New or Reset did not set fixed64:", *pb.F_Fixed64Defaulted) + } + if pb.F_Uint32Defaulted != nil { + t.Error("New or Reset did not set uint32:", *pb.F_Uint32Defaulted) + } + if pb.F_Uint64Defaulted != nil { + t.Error("New or Reset did not set uint64:", *pb.F_Uint64Defaulted) + } + if pb.F_FloatDefaulted != nil { + t.Error("New or Reset did not set float:", *pb.F_FloatDefaulted) + } + if pb.F_DoubleDefaulted != nil { + t.Error("New or Reset did not set double:", *pb.F_DoubleDefaulted) + } + if pb.F_StringDefaulted != nil { + t.Error("New or Reset did not set string:", *pb.F_StringDefaulted) + } + if pb.F_BytesDefaulted != nil { + t.Error("New or Reset did not set bytes:", string(pb.F_BytesDefaulted)) + } + if pb.F_Sint32Defaulted != nil { + t.Error("New or Reset did not set int32:", *pb.F_Sint32Defaulted) + } + if pb.F_Sint64Defaulted != nil { + t.Error("New or Reset did not set int64:", *pb.F_Sint64Defaulted) + } +} + +// Does Reset() reset? +func TestReset(t *testing.T) { + pb := initGoTest(true) + // muck with some values + pb.F_BoolDefaulted = Bool(false) + pb.F_Int32Defaulted = Int32(237) + pb.F_Int64Defaulted = Int64(12346) + pb.F_Fixed32Defaulted = Uint32(32000) + pb.F_Fixed64Defaulted = Uint64(666) + pb.F_Uint32Defaulted = Uint32(323232) + pb.F_Uint64Defaulted = nil + pb.F_FloatDefaulted = nil + pb.F_DoubleDefaulted = Float64(0) + pb.F_StringDefaulted = String("gotcha") + pb.F_BytesDefaulted = []byte("asdfasdf") + pb.F_Sint32Defaulted = Int32(123) + pb.F_Sint64Defaulted = Int64(789) + pb.Reset() + checkInitialized(pb, t) +} + +// All required fields set, no defaults provided. +func TestEncodeDecode1(t *testing.T) { + pb := initGoTest(false) + overify(t, pb, + "0807"+ // field 1, encoding 0, value 7 + "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) + "5001"+ // field 10, encoding 0, value 1 + "5803"+ // field 11, encoding 0, value 3 + "6006"+ // field 12, encoding 0, value 6 + "6d20000000"+ // field 13, encoding 5, value 0x20 + "714000000000000000"+ // field 14, encoding 1, value 0x40 + "78a019"+ // field 15, encoding 0, value 0xca0 = 3232 + "8001c032"+ // field 16, encoding 0, value 0x1940 = 6464 + "8d0100004a45"+ // field 17, encoding 5, value 3232.0 + "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 + "9a0106"+"737472696e67"+ // field 19, encoding 2, string "string" + "b304"+ // field 70, encoding 3, start group + "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" + "b404"+ // field 70, encoding 4, end group + "aa0605"+"6279746573"+ // field 101, encoding 2, string "bytes" + "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 + "b8067f") // field 103, encoding 0, 0x7f zigzag64 +} + +// All required fields set, defaults provided. +func TestEncodeDecode2(t *testing.T) { + pb := initGoTest(true) + overify(t, pb, + "0807"+ // field 1, encoding 0, value 7 + "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) + "5001"+ // field 10, encoding 0, value 1 + "5803"+ // field 11, encoding 0, value 3 + "6006"+ // field 12, encoding 0, value 6 + "6d20000000"+ // field 13, encoding 5, value 32 + "714000000000000000"+ // field 14, encoding 1, value 64 + "78a019"+ // field 15, encoding 0, value 3232 + "8001c032"+ // field 16, encoding 0, value 6464 + "8d0100004a45"+ // field 17, encoding 5, value 3232.0 + "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 + "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" + "c00201"+ // field 40, encoding 0, value 1 + "c80220"+ // field 41, encoding 0, value 32 + "d00240"+ // field 42, encoding 0, value 64 + "dd0240010000"+ // field 43, encoding 5, value 320 + "e1028002000000000000"+ // field 44, encoding 1, value 640 + "e8028019"+ // field 45, encoding 0, value 3200 + "f0028032"+ // field 46, encoding 0, value 6400 + "fd02e0659948"+ // field 47, encoding 5, value 314159.0 + "81030000000050971041"+ // field 48, encoding 1, value 271828.0 + "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" + "b304"+ // start group field 70 level 1 + "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" + "b404"+ // end group field 70 level 1 + "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" + "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 + "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 + "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" + "90193f"+ // field 402, encoding 0, value 63 + "98197f") // field 403, encoding 0, value 127 + +} + +// All default fields set to their default value by hand +func TestEncodeDecode3(t *testing.T) { + pb := initGoTest(false) + pb.F_BoolDefaulted = Bool(true) + pb.F_Int32Defaulted = Int32(32) + pb.F_Int64Defaulted = Int64(64) + pb.F_Fixed32Defaulted = Uint32(320) + pb.F_Fixed64Defaulted = Uint64(640) + pb.F_Uint32Defaulted = Uint32(3200) + pb.F_Uint64Defaulted = Uint64(6400) + pb.F_FloatDefaulted = Float32(314159) + pb.F_DoubleDefaulted = Float64(271828) + pb.F_StringDefaulted = String("hello, \"world!\"\n") + pb.F_BytesDefaulted = []byte("Bignose") + pb.F_Sint32Defaulted = Int32(-32) + pb.F_Sint64Defaulted = Int64(-64) + + overify(t, pb, + "0807"+ // field 1, encoding 0, value 7 + "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) + "5001"+ // field 10, encoding 0, value 1 + "5803"+ // field 11, encoding 0, value 3 + "6006"+ // field 12, encoding 0, value 6 + "6d20000000"+ // field 13, encoding 5, value 32 + "714000000000000000"+ // field 14, encoding 1, value 64 + "78a019"+ // field 15, encoding 0, value 3232 + "8001c032"+ // field 16, encoding 0, value 6464 + "8d0100004a45"+ // field 17, encoding 5, value 3232.0 + "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 + "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" + "c00201"+ // field 40, encoding 0, value 1 + "c80220"+ // field 41, encoding 0, value 32 + "d00240"+ // field 42, encoding 0, value 64 + "dd0240010000"+ // field 43, encoding 5, value 320 + "e1028002000000000000"+ // field 44, encoding 1, value 640 + "e8028019"+ // field 45, encoding 0, value 3200 + "f0028032"+ // field 46, encoding 0, value 6400 + "fd02e0659948"+ // field 47, encoding 5, value 314159.0 + "81030000000050971041"+ // field 48, encoding 1, value 271828.0 + "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" + "b304"+ // start group field 70 level 1 + "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" + "b404"+ // end group field 70 level 1 + "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" + "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 + "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 + "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" + "90193f"+ // field 402, encoding 0, value 63 + "98197f") // field 403, encoding 0, value 127 + +} + +// All required fields set, defaults provided, all non-defaulted optional fields have values. +func TestEncodeDecode4(t *testing.T) { + pb := initGoTest(true) + pb.Table = String("hello") + pb.Param = Int32(7) + pb.OptionalField = initGoTestField() + pb.F_BoolOptional = Bool(true) + pb.F_Int32Optional = Int32(32) + pb.F_Int64Optional = Int64(64) + pb.F_Fixed32Optional = Uint32(3232) + pb.F_Fixed64Optional = Uint64(6464) + pb.F_Uint32Optional = Uint32(323232) + pb.F_Uint64Optional = Uint64(646464) + pb.F_FloatOptional = Float32(32.) + pb.F_DoubleOptional = Float64(64.) + pb.F_StringOptional = String("hello") + pb.F_BytesOptional = []byte("Bignose") + pb.F_Sint32Optional = Int32(-32) + pb.F_Sint64Optional = Int64(-64) + pb.Optionalgroup = initGoTest_OptionalGroup() + + overify(t, pb, + "0807"+ // field 1, encoding 0, value 7 + "1205"+"68656c6c6f"+ // field 2, encoding 2, string "hello" + "1807"+ // field 3, encoding 0, value 7 + "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) + "320d"+"0a056c6162656c120474797065"+ // field 6, encoding 2 (GoTestField) + "5001"+ // field 10, encoding 0, value 1 + "5803"+ // field 11, encoding 0, value 3 + "6006"+ // field 12, encoding 0, value 6 + "6d20000000"+ // field 13, encoding 5, value 32 + "714000000000000000"+ // field 14, encoding 1, value 64 + "78a019"+ // field 15, encoding 0, value 3232 + "8001c032"+ // field 16, encoding 0, value 6464 + "8d0100004a45"+ // field 17, encoding 5, value 3232.0 + "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 + "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" + "f00101"+ // field 30, encoding 0, value 1 + "f80120"+ // field 31, encoding 0, value 32 + "800240"+ // field 32, encoding 0, value 64 + "8d02a00c0000"+ // field 33, encoding 5, value 3232 + "91024019000000000000"+ // field 34, encoding 1, value 6464 + "9802a0dd13"+ // field 35, encoding 0, value 323232 + "a002c0ba27"+ // field 36, encoding 0, value 646464 + "ad0200000042"+ // field 37, encoding 5, value 32.0 + "b1020000000000005040"+ // field 38, encoding 1, value 64.0 + "ba0205"+"68656c6c6f"+ // field 39, encoding 2, string "hello" + "c00201"+ // field 40, encoding 0, value 1 + "c80220"+ // field 41, encoding 0, value 32 + "d00240"+ // field 42, encoding 0, value 64 + "dd0240010000"+ // field 43, encoding 5, value 320 + "e1028002000000000000"+ // field 44, encoding 1, value 640 + "e8028019"+ // field 45, encoding 0, value 3200 + "f0028032"+ // field 46, encoding 0, value 6400 + "fd02e0659948"+ // field 47, encoding 5, value 314159.0 + "81030000000050971041"+ // field 48, encoding 1, value 271828.0 + "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" + "b304"+ // start group field 70 level 1 + "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" + "b404"+ // end group field 70 level 1 + "d305"+ // start group field 90 level 1 + "da0508"+"6f7074696f6e616c"+ // field 91, encoding 2, string "optional" + "d405"+ // end group field 90 level 1 + "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" + "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 + "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 + "ea1207"+"4269676e6f7365"+ // field 301, encoding 2, string "Bignose" + "f0123f"+ // field 302, encoding 0, value 63 + "f8127f"+ // field 303, encoding 0, value 127 + "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" + "90193f"+ // field 402, encoding 0, value 63 + "98197f") // field 403, encoding 0, value 127 + +} + +// All required fields set, defaults provided, all repeated fields given two values. +func TestEncodeDecode5(t *testing.T) { + pb := initGoTest(true) + pb.RepeatedField = []*GoTestField{initGoTestField(), initGoTestField()} + pb.F_BoolRepeated = []bool{false, true} + pb.F_Int32Repeated = []int32{32, 33} + pb.F_Int64Repeated = []int64{64, 65} + pb.F_Fixed32Repeated = []uint32{3232, 3333} + pb.F_Fixed64Repeated = []uint64{6464, 6565} + pb.F_Uint32Repeated = []uint32{323232, 333333} + pb.F_Uint64Repeated = []uint64{646464, 656565} + pb.F_FloatRepeated = []float32{32., 33.} + pb.F_DoubleRepeated = []float64{64., 65.} + pb.F_StringRepeated = []string{"hello", "sailor"} + pb.F_BytesRepeated = [][]byte{[]byte("big"), []byte("nose")} + pb.F_Sint32Repeated = []int32{32, -32} + pb.F_Sint64Repeated = []int64{64, -64} + pb.Repeatedgroup = []*GoTest_RepeatedGroup{initGoTest_RepeatedGroup(), initGoTest_RepeatedGroup()} + + overify(t, pb, + "0807"+ // field 1, encoding 0, value 7 + "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) + "2a0d"+"0a056c6162656c120474797065"+ // field 5, encoding 2 (GoTestField) + "2a0d"+"0a056c6162656c120474797065"+ // field 5, encoding 2 (GoTestField) + "5001"+ // field 10, encoding 0, value 1 + "5803"+ // field 11, encoding 0, value 3 + "6006"+ // field 12, encoding 0, value 6 + "6d20000000"+ // field 13, encoding 5, value 32 + "714000000000000000"+ // field 14, encoding 1, value 64 + "78a019"+ // field 15, encoding 0, value 3232 + "8001c032"+ // field 16, encoding 0, value 6464 + "8d0100004a45"+ // field 17, encoding 5, value 3232.0 + "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 + "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" + "a00100"+ // field 20, encoding 0, value 0 + "a00101"+ // field 20, encoding 0, value 1 + "a80120"+ // field 21, encoding 0, value 32 + "a80121"+ // field 21, encoding 0, value 33 + "b00140"+ // field 22, encoding 0, value 64 + "b00141"+ // field 22, encoding 0, value 65 + "bd01a00c0000"+ // field 23, encoding 5, value 3232 + "bd01050d0000"+ // field 23, encoding 5, value 3333 + "c1014019000000000000"+ // field 24, encoding 1, value 6464 + "c101a519000000000000"+ // field 24, encoding 1, value 6565 + "c801a0dd13"+ // field 25, encoding 0, value 323232 + "c80195ac14"+ // field 25, encoding 0, value 333333 + "d001c0ba27"+ // field 26, encoding 0, value 646464 + "d001b58928"+ // field 26, encoding 0, value 656565 + "dd0100000042"+ // field 27, encoding 5, value 32.0 + "dd0100000442"+ // field 27, encoding 5, value 33.0 + "e1010000000000005040"+ // field 28, encoding 1, value 64.0 + "e1010000000000405040"+ // field 28, encoding 1, value 65.0 + "ea0105"+"68656c6c6f"+ // field 29, encoding 2, string "hello" + "ea0106"+"7361696c6f72"+ // field 29, encoding 2, string "sailor" + "c00201"+ // field 40, encoding 0, value 1 + "c80220"+ // field 41, encoding 0, value 32 + "d00240"+ // field 42, encoding 0, value 64 + "dd0240010000"+ // field 43, encoding 5, value 320 + "e1028002000000000000"+ // field 44, encoding 1, value 640 + "e8028019"+ // field 45, encoding 0, value 3200 + "f0028032"+ // field 46, encoding 0, value 6400 + "fd02e0659948"+ // field 47, encoding 5, value 314159.0 + "81030000000050971041"+ // field 48, encoding 1, value 271828.0 + "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" + "b304"+ // start group field 70 level 1 + "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" + "b404"+ // end group field 70 level 1 + "8305"+ // start group field 80 level 1 + "8a0508"+"7265706561746564"+ // field 81, encoding 2, string "repeated" + "8405"+ // end group field 80 level 1 + "8305"+ // start group field 80 level 1 + "8a0508"+"7265706561746564"+ // field 81, encoding 2, string "repeated" + "8405"+ // end group field 80 level 1 + "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" + "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 + "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 + "ca0c03"+"626967"+ // field 201, encoding 2, string "big" + "ca0c04"+"6e6f7365"+ // field 201, encoding 2, string "nose" + "d00c40"+ // field 202, encoding 0, value 32 + "d00c3f"+ // field 202, encoding 0, value -32 + "d80c8001"+ // field 203, encoding 0, value 64 + "d80c7f"+ // field 203, encoding 0, value -64 + "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" + "90193f"+ // field 402, encoding 0, value 63 + "98197f") // field 403, encoding 0, value 127 + +} + +// All required fields set, all packed repeated fields given two values. +func TestEncodeDecode6(t *testing.T) { + pb := initGoTest(false) + pb.F_BoolRepeatedPacked = []bool{false, true} + pb.F_Int32RepeatedPacked = []int32{32, 33} + pb.F_Int64RepeatedPacked = []int64{64, 65} + pb.F_Fixed32RepeatedPacked = []uint32{3232, 3333} + pb.F_Fixed64RepeatedPacked = []uint64{6464, 6565} + pb.F_Uint32RepeatedPacked = []uint32{323232, 333333} + pb.F_Uint64RepeatedPacked = []uint64{646464, 656565} + pb.F_FloatRepeatedPacked = []float32{32., 33.} + pb.F_DoubleRepeatedPacked = []float64{64., 65.} + pb.F_Sint32RepeatedPacked = []int32{32, -32} + pb.F_Sint64RepeatedPacked = []int64{64, -64} + + overify(t, pb, + "0807"+ // field 1, encoding 0, value 7 + "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) + "5001"+ // field 10, encoding 0, value 1 + "5803"+ // field 11, encoding 0, value 3 + "6006"+ // field 12, encoding 0, value 6 + "6d20000000"+ // field 13, encoding 5, value 32 + "714000000000000000"+ // field 14, encoding 1, value 64 + "78a019"+ // field 15, encoding 0, value 3232 + "8001c032"+ // field 16, encoding 0, value 6464 + "8d0100004a45"+ // field 17, encoding 5, value 3232.0 + "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 + "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" + "9203020001"+ // field 50, encoding 2, 2 bytes, value 0, value 1 + "9a03022021"+ // field 51, encoding 2, 2 bytes, value 32, value 33 + "a203024041"+ // field 52, encoding 2, 2 bytes, value 64, value 65 + "aa0308"+ // field 53, encoding 2, 8 bytes + "a00c0000050d0000"+ // value 3232, value 3333 + "b20310"+ // field 54, encoding 2, 16 bytes + "4019000000000000a519000000000000"+ // value 6464, value 6565 + "ba0306"+ // field 55, encoding 2, 6 bytes + "a0dd1395ac14"+ // value 323232, value 333333 + "c20306"+ // field 56, encoding 2, 6 bytes + "c0ba27b58928"+ // value 646464, value 656565 + "ca0308"+ // field 57, encoding 2, 8 bytes + "0000004200000442"+ // value 32.0, value 33.0 + "d20310"+ // field 58, encoding 2, 16 bytes + "00000000000050400000000000405040"+ // value 64.0, value 65.0 + "b304"+ // start group field 70 level 1 + "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" + "b404"+ // end group field 70 level 1 + "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" + "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 + "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 + "b21f02"+ // field 502, encoding 2, 2 bytes + "403f"+ // value 32, value -32 + "ba1f03"+ // field 503, encoding 2, 3 bytes + "80017f") // value 64, value -64 +} + +// Test that we can encode empty bytes fields. +func TestEncodeDecodeBytes1(t *testing.T) { + pb := initGoTest(false) + + // Create our bytes + pb.F_BytesRequired = []byte{} + pb.F_BytesRepeated = [][]byte{{}} + pb.F_BytesOptional = []byte{} + + d, err := Marshal(pb) + if err != nil { + t.Error(err) + } + + pbd := new(GoTest) + if err := Unmarshal(d, pbd); err != nil { + t.Error(err) + } + + if pbd.F_BytesRequired == nil || len(pbd.F_BytesRequired) != 0 { + t.Error("required empty bytes field is incorrect") + } + if pbd.F_BytesRepeated == nil || len(pbd.F_BytesRepeated) == 1 && pbd.F_BytesRepeated[0] == nil { + t.Error("repeated empty bytes field is incorrect") + } + if pbd.F_BytesOptional == nil || len(pbd.F_BytesOptional) != 0 { + t.Error("optional empty bytes field is incorrect") + } +} + +// Test that we encode nil-valued fields of a repeated bytes field correctly. +// Since entries in a repeated field cannot be nil, nil must mean empty value. +func TestEncodeDecodeBytes2(t *testing.T) { + pb := initGoTest(false) + + // Create our bytes + pb.F_BytesRepeated = [][]byte{nil} + + d, err := Marshal(pb) + if err != nil { + t.Error(err) + } + + pbd := new(GoTest) + if err := Unmarshal(d, pbd); err != nil { + t.Error(err) + } + + if len(pbd.F_BytesRepeated) != 1 || pbd.F_BytesRepeated[0] == nil { + t.Error("Unexpected value for repeated bytes field") + } +} + +// All required fields set, defaults provided, all repeated fields given two values. +func TestSkippingUnrecognizedFields(t *testing.T) { + o := old() + pb := initGoTestField() + + // Marshal it normally. + o.Marshal(pb) + + // Now new a GoSkipTest record. + skip := &GoSkipTest{ + SkipInt32: Int32(32), + SkipFixed32: Uint32(3232), + SkipFixed64: Uint64(6464), + SkipString: String("skipper"), + Skipgroup: &GoSkipTest_SkipGroup{ + GroupInt32: Int32(75), + GroupString: String("wxyz"), + }, + } + + // Marshal it into same buffer. + o.Marshal(skip) + + pbd := new(GoTestField) + o.Unmarshal(pbd) + + // The __unrecognized field should be a marshaling of GoSkipTest + skipd := new(GoSkipTest) + + o.SetBuf(pbd.XXX_unrecognized) + o.Unmarshal(skipd) + + if *skipd.SkipInt32 != *skip.SkipInt32 { + t.Error("skip int32", skipd.SkipInt32) + } + if *skipd.SkipFixed32 != *skip.SkipFixed32 { + t.Error("skip fixed32", skipd.SkipFixed32) + } + if *skipd.SkipFixed64 != *skip.SkipFixed64 { + t.Error("skip fixed64", skipd.SkipFixed64) + } + if *skipd.SkipString != *skip.SkipString { + t.Error("skip string", *skipd.SkipString) + } + if *skipd.Skipgroup.GroupInt32 != *skip.Skipgroup.GroupInt32 { + t.Error("skip group int32", skipd.Skipgroup.GroupInt32) + } + if *skipd.Skipgroup.GroupString != *skip.Skipgroup.GroupString { + t.Error("skip group string", *skipd.Skipgroup.GroupString) + } +} + +// Check that unrecognized fields of a submessage are preserved. +func TestSubmessageUnrecognizedFields(t *testing.T) { + nm := &NewMessage{ + Nested: &NewMessage_Nested{ + Name: String("Nigel"), + FoodGroup: String("carbs"), + }, + } + b, err := Marshal(nm) + if err != nil { + t.Fatalf("Marshal of NewMessage: %v", err) + } + + // Unmarshal into an OldMessage. + om := new(OldMessage) + if err = Unmarshal(b, om); err != nil { + t.Fatalf("Unmarshal to OldMessage: %v", err) + } + exp := &OldMessage{ + Nested: &OldMessage_Nested{ + Name: String("Nigel"), + // normal protocol buffer users should not do this + XXX_unrecognized: []byte("\x12\x05carbs"), + }, + } + if !Equal(om, exp) { + t.Errorf("om = %v, want %v", om, exp) + } + + // Clone the OldMessage. + om = Clone(om).(*OldMessage) + if !Equal(om, exp) { + t.Errorf("Clone(om) = %v, want %v", om, exp) + } + + // Marshal the OldMessage, then unmarshal it into an empty NewMessage. + if b, err = Marshal(om); err != nil { + t.Fatalf("Marshal of OldMessage: %v", err) + } + t.Logf("Marshal(%v) -> %q", om, b) + nm2 := new(NewMessage) + if err := Unmarshal(b, nm2); err != nil { + t.Fatalf("Unmarshal to NewMessage: %v", err) + } + if !Equal(nm, nm2) { + t.Errorf("NewMessage round-trip: %v => %v", nm, nm2) + } +} + +// Check that an int32 field can be upgraded to an int64 field. +func TestNegativeInt32(t *testing.T) { + om := &OldMessage{ + Num: Int32(-1), + } + b, err := Marshal(om) + if err != nil { + t.Fatalf("Marshal of OldMessage: %v", err) + } + + // Check the size. It should be 11 bytes; + // 1 for the field/wire type, and 10 for the negative number. + if len(b) != 11 { + t.Errorf("%v marshaled as %q, wanted 11 bytes", om, b) + } + + // Unmarshal into a NewMessage. + nm := new(NewMessage) + if err := Unmarshal(b, nm); err != nil { + t.Fatalf("Unmarshal to NewMessage: %v", err) + } + want := &NewMessage{ + Num: Int64(-1), + } + if !Equal(nm, want) { + t.Errorf("nm = %v, want %v", nm, want) + } +} + +// Check that we can grow an array (repeated field) to have many elements. +// This test doesn't depend only on our encoding; for variety, it makes sure +// we create, encode, and decode the correct contents explicitly. It's therefore +// a bit messier. +// This test also uses (and hence tests) the Marshal/Unmarshal functions +// instead of the methods. +func TestBigRepeated(t *testing.T) { + pb := initGoTest(true) + + // Create the arrays + const N = 50 // Internally the library starts much smaller. + pb.Repeatedgroup = make([]*GoTest_RepeatedGroup, N) + pb.F_Sint64Repeated = make([]int64, N) + pb.F_Sint32Repeated = make([]int32, N) + pb.F_BytesRepeated = make([][]byte, N) + pb.F_StringRepeated = make([]string, N) + pb.F_DoubleRepeated = make([]float64, N) + pb.F_FloatRepeated = make([]float32, N) + pb.F_Uint64Repeated = make([]uint64, N) + pb.F_Uint32Repeated = make([]uint32, N) + pb.F_Fixed64Repeated = make([]uint64, N) + pb.F_Fixed32Repeated = make([]uint32, N) + pb.F_Int64Repeated = make([]int64, N) + pb.F_Int32Repeated = make([]int32, N) + pb.F_BoolRepeated = make([]bool, N) + pb.RepeatedField = make([]*GoTestField, N) + + // Fill in the arrays with checkable values. + igtf := initGoTestField() + igtrg := initGoTest_RepeatedGroup() + for i := 0; i < N; i++ { + pb.Repeatedgroup[i] = igtrg + pb.F_Sint64Repeated[i] = int64(i) + pb.F_Sint32Repeated[i] = int32(i) + s := fmt.Sprint(i) + pb.F_BytesRepeated[i] = []byte(s) + pb.F_StringRepeated[i] = s + pb.F_DoubleRepeated[i] = float64(i) + pb.F_FloatRepeated[i] = float32(i) + pb.F_Uint64Repeated[i] = uint64(i) + pb.F_Uint32Repeated[i] = uint32(i) + pb.F_Fixed64Repeated[i] = uint64(i) + pb.F_Fixed32Repeated[i] = uint32(i) + pb.F_Int64Repeated[i] = int64(i) + pb.F_Int32Repeated[i] = int32(i) + pb.F_BoolRepeated[i] = i%2 == 0 + pb.RepeatedField[i] = igtf + } + + // Marshal. + buf, _ := Marshal(pb) + + // Now test Unmarshal by recreating the original buffer. + pbd := new(GoTest) + Unmarshal(buf, pbd) + + // Check the checkable values + for i := uint64(0); i < N; i++ { + if pbd.Repeatedgroup[i] == nil { // TODO: more checking? + t.Error("pbd.Repeatedgroup bad") + } + var x uint64 + x = uint64(pbd.F_Sint64Repeated[i]) + if x != i { + t.Error("pbd.F_Sint64Repeated bad", x, i) + } + x = uint64(pbd.F_Sint32Repeated[i]) + if x != i { + t.Error("pbd.F_Sint32Repeated bad", x, i) + } + s := fmt.Sprint(i) + equalbytes(pbd.F_BytesRepeated[i], []byte(s), t) + if pbd.F_StringRepeated[i] != s { + t.Error("pbd.F_Sint32Repeated bad", pbd.F_StringRepeated[i], i) + } + x = uint64(pbd.F_DoubleRepeated[i]) + if x != i { + t.Error("pbd.F_DoubleRepeated bad", x, i) + } + x = uint64(pbd.F_FloatRepeated[i]) + if x != i { + t.Error("pbd.F_FloatRepeated bad", x, i) + } + x = pbd.F_Uint64Repeated[i] + if x != i { + t.Error("pbd.F_Uint64Repeated bad", x, i) + } + x = uint64(pbd.F_Uint32Repeated[i]) + if x != i { + t.Error("pbd.F_Uint32Repeated bad", x, i) + } + x = pbd.F_Fixed64Repeated[i] + if x != i { + t.Error("pbd.F_Fixed64Repeated bad", x, i) + } + x = uint64(pbd.F_Fixed32Repeated[i]) + if x != i { + t.Error("pbd.F_Fixed32Repeated bad", x, i) + } + x = uint64(pbd.F_Int64Repeated[i]) + if x != i { + t.Error("pbd.F_Int64Repeated bad", x, i) + } + x = uint64(pbd.F_Int32Repeated[i]) + if x != i { + t.Error("pbd.F_Int32Repeated bad", x, i) + } + if pbd.F_BoolRepeated[i] != (i%2 == 0) { + t.Error("pbd.F_BoolRepeated bad", x, i) + } + if pbd.RepeatedField[i] == nil { // TODO: more checking? + t.Error("pbd.RepeatedField bad") + } + } +} + +// Verify we give a useful message when decoding to the wrong structure type. +func TestTypeMismatch(t *testing.T) { + pb1 := initGoTest(true) + + // Marshal + o := old() + o.Marshal(pb1) + + // Now Unmarshal it to the wrong type. + pb2 := initGoTestField() + err := o.Unmarshal(pb2) + if err == nil { + t.Error("expected error, got no error") + } else if !strings.Contains(err.Error(), "bad wiretype") { + t.Error("expected bad wiretype error, got", err) + } +} + +func encodeDecode(t *testing.T, in, out Message, msg string) { + buf, err := Marshal(in) + if err != nil { + t.Fatalf("failed marshaling %v: %v", msg, err) + } + if err := Unmarshal(buf, out); err != nil { + t.Fatalf("failed unmarshaling %v: %v", msg, err) + } +} + +func TestPackedNonPackedDecoderSwitching(t *testing.T) { + np, p := new(NonPackedTest), new(PackedTest) + + // non-packed -> packed + np.A = []int32{0, 1, 1, 2, 3, 5} + encodeDecode(t, np, p, "non-packed -> packed") + if !reflect.DeepEqual(np.A, p.B) { + t.Errorf("failed non-packed -> packed; np.A=%+v, p.B=%+v", np.A, p.B) + } + + // packed -> non-packed + np.Reset() + p.B = []int32{3, 1, 4, 1, 5, 9} + encodeDecode(t, p, np, "packed -> non-packed") + if !reflect.DeepEqual(p.B, np.A) { + t.Errorf("failed packed -> non-packed; p.B=%+v, np.A=%+v", p.B, np.A) + } +} + +func TestProto1RepeatedGroup(t *testing.T) { + pb := &MessageList{ + Message: []*MessageList_Message{ + { + Name: String("blah"), + Count: Int32(7), + }, + // NOTE: pb.Message[1] is a nil + nil, + }, + } + + o := old() + err := o.Marshal(pb) + if err == nil || !strings.Contains(err.Error(), "repeated field Message has nil") { + t.Fatalf("unexpected or no error when marshaling: %v", err) + } +} + +// Test that enums work. Checks for a bug introduced by making enums +// named types instead of int32: newInt32FromUint64 would crash with +// a type mismatch in reflect.PointTo. +func TestEnum(t *testing.T) { + pb := new(GoEnum) + pb.Foo = FOO_FOO1.Enum() + o := old() + if err := o.Marshal(pb); err != nil { + t.Fatal("error encoding enum:", err) + } + pb1 := new(GoEnum) + if err := o.Unmarshal(pb1); err != nil { + t.Fatal("error decoding enum:", err) + } + if *pb1.Foo != FOO_FOO1 { + t.Error("expected 7 but got ", *pb1.Foo) + } +} + +// Enum types have String methods. Check that enum fields can be printed. +// We don't care what the value actually is, just as long as it doesn't crash. +func TestPrintingNilEnumFields(t *testing.T) { + pb := new(GoEnum) + _ = fmt.Sprintf("%+v", pb) +} + +// Verify that absent required fields cause Marshal/Unmarshal to return errors. +func TestRequiredFieldEnforcement(t *testing.T) { + pb := new(GoTestField) + _, err := Marshal(pb) + if err == nil { + t.Error("marshal: expected error, got nil") + } else if _, ok := err.(*RequiredNotSetError); !ok || !strings.Contains(err.Error(), "Label") { + t.Errorf("marshal: bad error type: %v", err) + } + + // A slightly sneaky, yet valid, proto. It encodes the same required field twice, + // so simply counting the required fields is insufficient. + // field 1, encoding 2, value "hi" + buf := []byte("\x0A\x02hi\x0A\x02hi") + err = Unmarshal(buf, pb) + if err == nil { + t.Error("unmarshal: expected error, got nil") + } else if _, ok := err.(*RequiredNotSetError); !ok || !strings.Contains(err.Error(), "{Unknown}") { + t.Errorf("unmarshal: bad error type: %v", err) + } +} + +// Verify that absent required fields in groups cause Marshal/Unmarshal to return errors. +func TestRequiredFieldEnforcementGroups(t *testing.T) { + pb := &GoTestRequiredGroupField{Group: &GoTestRequiredGroupField_Group{}} + if _, err := Marshal(pb); err == nil { + t.Error("marshal: expected error, got nil") + } else if _, ok := err.(*RequiredNotSetError); !ok || !strings.Contains(err.Error(), "Group.Field") { + t.Errorf("marshal: bad error type: %v", err) + } + + buf := []byte{11, 12} + if err := Unmarshal(buf, pb); err == nil { + t.Error("unmarshal: expected error, got nil") + } else if _, ok := err.(*RequiredNotSetError); !ok || !strings.Contains(err.Error(), "Group.{Unknown}") { + t.Errorf("unmarshal: bad error type: %v", err) + } +} + +func TestTypedNilMarshal(t *testing.T) { + // A typed nil should return ErrNil and not crash. + { + var m *GoEnum + if _, err := Marshal(m); err != ErrNil { + t.Errorf("Marshal(%#v): got %v, want ErrNil", m, err) + } + } + + { + m := &Communique{Union: &Communique_Msg{Msg: nil}} + if _, err := Marshal(m); err == nil || err == ErrNil { + t.Errorf("Marshal(%#v): got %v, want errOneofHasNil", m, err) + } + } +} + +// A type that implements the Marshaler interface, but is not nillable. +type nonNillableInt uint64 + +func (nni nonNillableInt) Marshal() ([]byte, error) { + return EncodeVarint(uint64(nni)), nil +} + +type NNIMessage struct { + nni nonNillableInt +} + +func (*NNIMessage) Reset() {} +func (*NNIMessage) String() string { return "" } +func (*NNIMessage) ProtoMessage() {} + +// A type that implements the Marshaler interface and is nillable. +type nillableMessage struct { + x uint64 +} + +func (nm *nillableMessage) Marshal() ([]byte, error) { + return EncodeVarint(nm.x), nil +} + +type NMMessage struct { + nm *nillableMessage +} + +func (*NMMessage) Reset() {} +func (*NMMessage) String() string { return "" } +func (*NMMessage) ProtoMessage() {} + +// Verify a type that uses the Marshaler interface, but has a nil pointer. +func TestNilMarshaler(t *testing.T) { + // Try a struct with a Marshaler field that is nil. + // It should be directly marshable. + nmm := new(NMMessage) + if _, err := Marshal(nmm); err != nil { + t.Error("unexpected error marshaling nmm: ", err) + } + + // Try a struct with a Marshaler field that is not nillable. + nnim := new(NNIMessage) + nnim.nni = 7 + var _ Marshaler = nnim.nni // verify it is truly a Marshaler + if _, err := Marshal(nnim); err != nil { + t.Error("unexpected error marshaling nnim: ", err) + } +} + +func TestAllSetDefaults(t *testing.T) { + // Exercise SetDefaults with all scalar field types. + m := &Defaults{ + // NaN != NaN, so override that here. + F_Nan: Float32(1.7), + } + expected := &Defaults{ + F_Bool: Bool(true), + F_Int32: Int32(32), + F_Int64: Int64(64), + F_Fixed32: Uint32(320), + F_Fixed64: Uint64(640), + F_Uint32: Uint32(3200), + F_Uint64: Uint64(6400), + F_Float: Float32(314159), + F_Double: Float64(271828), + F_String: String(`hello, "world!"` + "\n"), + F_Bytes: []byte("Bignose"), + F_Sint32: Int32(-32), + F_Sint64: Int64(-64), + F_Enum: Defaults_GREEN.Enum(), + F_Pinf: Float32(float32(math.Inf(1))), + F_Ninf: Float32(float32(math.Inf(-1))), + F_Nan: Float32(1.7), + StrZero: String(""), + } + SetDefaults(m) + if !Equal(m, expected) { + t.Errorf("SetDefaults failed\n got %v\nwant %v", m, expected) + } +} + +func TestSetDefaultsWithSetField(t *testing.T) { + // Check that a set value is not overridden. + m := &Defaults{ + F_Int32: Int32(12), + } + SetDefaults(m) + if v := m.GetF_Int32(); v != 12 { + t.Errorf("m.FInt32 = %v, want 12", v) + } +} + +func TestSetDefaultsWithSubMessage(t *testing.T) { + m := &OtherMessage{ + Key: Int64(123), + Inner: &InnerMessage{ + Host: String("gopher"), + }, + } + expected := &OtherMessage{ + Key: Int64(123), + Inner: &InnerMessage{ + Host: String("gopher"), + Port: Int32(4000), + }, + } + SetDefaults(m) + if !Equal(m, expected) { + t.Errorf("\n got %v\nwant %v", m, expected) + } +} + +func TestSetDefaultsWithRepeatedSubMessage(t *testing.T) { + m := &MyMessage{ + RepInner: []*InnerMessage{{}}, + } + expected := &MyMessage{ + RepInner: []*InnerMessage{{ + Port: Int32(4000), + }}, + } + SetDefaults(m) + if !Equal(m, expected) { + t.Errorf("\n got %v\nwant %v", m, expected) + } +} + +func TestSetDefaultWithRepeatedNonMessage(t *testing.T) { + m := &MyMessage{ + Pet: []string{"turtle", "wombat"}, + } + expected := Clone(m) + SetDefaults(m) + if !Equal(m, expected) { + t.Errorf("\n got %v\nwant %v", m, expected) + } +} + +func TestMaximumTagNumber(t *testing.T) { + m := &MaxTag{ + LastField: String("natural goat essence"), + } + buf, err := Marshal(m) + if err != nil { + t.Fatalf("proto.Marshal failed: %v", err) + } + m2 := new(MaxTag) + if err := Unmarshal(buf, m2); err != nil { + t.Fatalf("proto.Unmarshal failed: %v", err) + } + if got, want := m2.GetLastField(), *m.LastField; got != want { + t.Errorf("got %q, want %q", got, want) + } +} + +func TestJSON(t *testing.T) { + m := &MyMessage{ + Count: Int32(4), + Pet: []string{"bunny", "kitty"}, + Inner: &InnerMessage{ + Host: String("cauchy"), + }, + Bikeshed: MyMessage_GREEN.Enum(), + } + const expected = `{"count":4,"pet":["bunny","kitty"],"inner":{"host":"cauchy"},"bikeshed":1}` + + b, err := json.Marshal(m) + if err != nil { + t.Fatalf("json.Marshal failed: %v", err) + } + s := string(b) + if s != expected { + t.Errorf("got %s\nwant %s", s, expected) + } + + received := new(MyMessage) + if err := json.Unmarshal(b, received); err != nil { + t.Fatalf("json.Unmarshal failed: %v", err) + } + if !Equal(received, m) { + t.Fatalf("got %s, want %s", received, m) + } + + // Test unmarshalling of JSON with symbolic enum name. + const old = `{"count":4,"pet":["bunny","kitty"],"inner":{"host":"cauchy"},"bikeshed":"GREEN"}` + received.Reset() + if err := json.Unmarshal([]byte(old), received); err != nil { + t.Fatalf("json.Unmarshal failed: %v", err) + } + if !Equal(received, m) { + t.Fatalf("got %s, want %s", received, m) + } +} + +func TestBadWireType(t *testing.T) { + b := []byte{7<<3 | 6} // field 7, wire type 6 + pb := new(OtherMessage) + if err := Unmarshal(b, pb); err == nil { + t.Errorf("Unmarshal did not fail") + } else if !strings.Contains(err.Error(), "unknown wire type") { + t.Errorf("wrong error: %v", err) + } +} + +func TestBytesWithInvalidLength(t *testing.T) { + // If a byte sequence has an invalid (negative) length, Unmarshal should not panic. + b := []byte{2<<3 | WireBytes, 0xff, 0xff, 0xff, 0xff, 0xff, 0} + Unmarshal(b, new(MyMessage)) +} + +func TestLengthOverflow(t *testing.T) { + // Overflowing a length should not panic. + b := []byte{2<<3 | WireBytes, 1, 1, 3<<3 | WireBytes, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x01} + Unmarshal(b, new(MyMessage)) +} + +func TestVarintOverflow(t *testing.T) { + // Overflowing a 64-bit length should not be allowed. + b := []byte{1<<3 | WireVarint, 0x01, 3<<3 | WireBytes, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x01} + if err := Unmarshal(b, new(MyMessage)); err == nil { + t.Fatalf("Overflowed uint64 length without error") + } +} + +func TestUnmarshalFuzz(t *testing.T) { + const N = 1000 + seed := time.Now().UnixNano() + t.Logf("RNG seed is %d", seed) + rng := rand.New(rand.NewSource(seed)) + buf := make([]byte, 20) + for i := 0; i < N; i++ { + for j := range buf { + buf[j] = byte(rng.Intn(256)) + } + fuzzUnmarshal(t, buf) + } +} + +func TestMergeMessages(t *testing.T) { + pb := &MessageList{Message: []*MessageList_Message{{Name: String("x"), Count: Int32(1)}}} + data, err := Marshal(pb) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + + pb1 := new(MessageList) + if err := Unmarshal(data, pb1); err != nil { + t.Fatalf("first Unmarshal: %v", err) + } + if err := Unmarshal(data, pb1); err != nil { + t.Fatalf("second Unmarshal: %v", err) + } + if len(pb1.Message) != 1 { + t.Errorf("two Unmarshals produced %d Messages, want 1", len(pb1.Message)) + } + + pb2 := new(MessageList) + if err := UnmarshalMerge(data, pb2); err != nil { + t.Fatalf("first UnmarshalMerge: %v", err) + } + if err := UnmarshalMerge(data, pb2); err != nil { + t.Fatalf("second UnmarshalMerge: %v", err) + } + if len(pb2.Message) != 2 { + t.Errorf("two UnmarshalMerges produced %d Messages, want 2", len(pb2.Message)) + } +} + +func TestExtensionMarshalOrder(t *testing.T) { + m := &MyMessage{Count: Int(123)} + if err := SetExtension(m, E_Ext_More, &Ext{Data: String("alpha")}); err != nil { + t.Fatalf("SetExtension: %v", err) + } + if err := SetExtension(m, E_Ext_Text, String("aleph")); err != nil { + t.Fatalf("SetExtension: %v", err) + } + if err := SetExtension(m, E_Ext_Number, Int32(1)); err != nil { + t.Fatalf("SetExtension: %v", err) + } + + // Serialize m several times, and check we get the same bytes each time. + var orig []byte + for i := 0; i < 100; i++ { + b, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + if i == 0 { + orig = b + continue + } + if !bytes.Equal(b, orig) { + t.Errorf("Bytes differ on attempt #%d", i) + } + } +} + +// Many extensions, because small maps might not iterate differently on each iteration. +var exts = []*ExtensionDesc{ + E_X201, + E_X202, + E_X203, + E_X204, + E_X205, + E_X206, + E_X207, + E_X208, + E_X209, + E_X210, + E_X211, + E_X212, + E_X213, + E_X214, + E_X215, + E_X216, + E_X217, + E_X218, + E_X219, + E_X220, + E_X221, + E_X222, + E_X223, + E_X224, + E_X225, + E_X226, + E_X227, + E_X228, + E_X229, + E_X230, + E_X231, + E_X232, + E_X233, + E_X234, + E_X235, + E_X236, + E_X237, + E_X238, + E_X239, + E_X240, + E_X241, + E_X242, + E_X243, + E_X244, + E_X245, + E_X246, + E_X247, + E_X248, + E_X249, + E_X250, +} + +func TestMessageSetMarshalOrder(t *testing.T) { + m := &MyMessageSet{} + for _, x := range exts { + if err := SetExtension(m, x, &Empty{}); err != nil { + t.Fatalf("SetExtension: %v", err) + } + } + + buf, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + + // Serialize m several times, and check we get the same bytes each time. + for i := 0; i < 10; i++ { + b1, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + if !bytes.Equal(b1, buf) { + t.Errorf("Bytes differ on re-Marshal #%d", i) + } + + m2 := &MyMessageSet{} + if err = Unmarshal(buf, m2); err != nil { + t.Errorf("Unmarshal: %v", err) + } + b2, err := Marshal(m2) + if err != nil { + t.Errorf("re-Marshal: %v", err) + } + if !bytes.Equal(b2, buf) { + t.Errorf("Bytes differ on round-trip #%d", i) + } + } +} + +func TestUnmarshalMergesMessages(t *testing.T) { + // If a nested message occurs twice in the input, + // the fields should be merged when decoding. + a := &OtherMessage{ + Key: Int64(123), + Inner: &InnerMessage{ + Host: String("polhode"), + Port: Int32(1234), + }, + } + aData, err := Marshal(a) + if err != nil { + t.Fatalf("Marshal(a): %v", err) + } + b := &OtherMessage{ + Weight: Float32(1.2), + Inner: &InnerMessage{ + Host: String("herpolhode"), + Connected: Bool(true), + }, + } + bData, err := Marshal(b) + if err != nil { + t.Fatalf("Marshal(b): %v", err) + } + want := &OtherMessage{ + Key: Int64(123), + Weight: Float32(1.2), + Inner: &InnerMessage{ + Host: String("herpolhode"), + Port: Int32(1234), + Connected: Bool(true), + }, + } + got := new(OtherMessage) + if err := Unmarshal(append(aData, bData...), got); err != nil { + t.Fatalf("Unmarshal: %v", err) + } + if !Equal(got, want) { + t.Errorf("\n got %v\nwant %v", got, want) + } +} + +func TestEncodingSizes(t *testing.T) { + tests := []struct { + m Message + n int + }{ + {&Defaults{F_Int32: Int32(math.MaxInt32)}, 6}, + {&Defaults{F_Int32: Int32(math.MinInt32)}, 11}, + {&Defaults{F_Uint32: Uint32(uint32(math.MaxInt32) + 1)}, 6}, + {&Defaults{F_Uint32: Uint32(math.MaxUint32)}, 6}, + } + for _, test := range tests { + b, err := Marshal(test.m) + if err != nil { + t.Errorf("Marshal(%v): %v", test.m, err) + continue + } + if len(b) != test.n { + t.Errorf("Marshal(%v) yielded %d bytes, want %d bytes", test.m, len(b), test.n) + } + } +} + +func TestRequiredNotSetError(t *testing.T) { + pb := initGoTest(false) + pb.RequiredField.Label = nil + pb.F_Int32Required = nil + pb.F_Int64Required = nil + + expected := "0807" + // field 1, encoding 0, value 7 + "2206" + "120474797065" + // field 4, encoding 2 (GoTestField) + "5001" + // field 10, encoding 0, value 1 + "6d20000000" + // field 13, encoding 5, value 0x20 + "714000000000000000" + // field 14, encoding 1, value 0x40 + "78a019" + // field 15, encoding 0, value 0xca0 = 3232 + "8001c032" + // field 16, encoding 0, value 0x1940 = 6464 + "8d0100004a45" + // field 17, encoding 5, value 3232.0 + "9101000000000040b940" + // field 18, encoding 1, value 6464.0 + "9a0106" + "737472696e67" + // field 19, encoding 2, string "string" + "b304" + // field 70, encoding 3, start group + "ba0408" + "7265717569726564" + // field 71, encoding 2, string "required" + "b404" + // field 70, encoding 4, end group + "aa0605" + "6279746573" + // field 101, encoding 2, string "bytes" + "b0063f" + // field 102, encoding 0, 0x3f zigzag32 + "b8067f" // field 103, encoding 0, 0x7f zigzag64 + + o := old() + mbytes, err := Marshal(pb) + if _, ok := err.(*RequiredNotSetError); !ok { + fmt.Printf("marshal-1 err = %v, want *RequiredNotSetError", err) + o.DebugPrint("", mbytes) + t.Fatalf("expected = %s", expected) + } + if strings.Index(err.Error(), "RequiredField.Label") < 0 { + t.Errorf("marshal-1 wrong err msg: %v", err) + } + if !equal(mbytes, expected, t) { + o.DebugPrint("neq 1", mbytes) + t.Fatalf("expected = %s", expected) + } + + // Now test Unmarshal by recreating the original buffer. + pbd := new(GoTest) + err = Unmarshal(mbytes, pbd) + if _, ok := err.(*RequiredNotSetError); !ok { + t.Fatalf("unmarshal err = %v, want *RequiredNotSetError", err) + o.DebugPrint("", mbytes) + t.Fatalf("string = %s", expected) + } + if strings.Index(err.Error(), "RequiredField.{Unknown}") < 0 { + t.Errorf("unmarshal wrong err msg: %v", err) + } + mbytes, err = Marshal(pbd) + if _, ok := err.(*RequiredNotSetError); !ok { + t.Errorf("marshal-2 err = %v, want *RequiredNotSetError", err) + o.DebugPrint("", mbytes) + t.Fatalf("string = %s", expected) + } + if strings.Index(err.Error(), "RequiredField.Label") < 0 { + t.Errorf("marshal-2 wrong err msg: %v", err) + } + if !equal(mbytes, expected, t) { + o.DebugPrint("neq 2", mbytes) + t.Fatalf("string = %s", expected) + } +} + +func fuzzUnmarshal(t *testing.T, data []byte) { + defer func() { + if e := recover(); e != nil { + t.Errorf("These bytes caused a panic: %+v", data) + t.Logf("Stack:\n%s", debug.Stack()) + t.FailNow() + } + }() + + pb := new(MyMessage) + Unmarshal(data, pb) +} + +func TestMapFieldMarshal(t *testing.T) { + m := &MessageWithMap{ + NameMapping: map[int32]string{ + 1: "Rob", + 4: "Ian", + 8: "Dave", + }, + } + b, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + + // b should be the concatenation of these three byte sequences in some order. + parts := []string{ + "\n\a\b\x01\x12\x03Rob", + "\n\a\b\x04\x12\x03Ian", + "\n\b\b\x08\x12\x04Dave", + } + ok := false + for i := range parts { + for j := range parts { + if j == i { + continue + } + for k := range parts { + if k == i || k == j { + continue + } + try := parts[i] + parts[j] + parts[k] + if bytes.Equal(b, []byte(try)) { + ok = true + break + } + } + } + } + if !ok { + t.Fatalf("Incorrect Marshal output.\n got %q\nwant %q (or a permutation of that)", b, parts[0]+parts[1]+parts[2]) + } + t.Logf("FYI b: %q", b) + + (new(Buffer)).DebugPrint("Dump of b", b) +} + +func TestMapFieldRoundTrips(t *testing.T) { + m := &MessageWithMap{ + NameMapping: map[int32]string{ + 1: "Rob", + 4: "Ian", + 8: "Dave", + }, + MsgMapping: map[int64]*FloatingPoint{ + 0x7001: {F: Float64(2.0)}, + }, + ByteMapping: map[bool][]byte{ + false: []byte("that's not right!"), + true: []byte("aye, 'tis true!"), + }, + } + b, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + t.Logf("FYI b: %q", b) + m2 := new(MessageWithMap) + if err := Unmarshal(b, m2); err != nil { + t.Fatalf("Unmarshal: %v", err) + } + for _, pair := range [][2]interface{}{ + {m.NameMapping, m2.NameMapping}, + {m.MsgMapping, m2.MsgMapping}, + {m.ByteMapping, m2.ByteMapping}, + } { + if !reflect.DeepEqual(pair[0], pair[1]) { + t.Errorf("Map did not survive a round trip.\ninitial: %v\n final: %v", pair[0], pair[1]) + } + } +} + +func TestMapFieldWithNil(t *testing.T) { + m1 := &MessageWithMap{ + MsgMapping: map[int64]*FloatingPoint{ + 1: nil, + }, + } + b, err := Marshal(m1) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + m2 := new(MessageWithMap) + if err := Unmarshal(b, m2); err != nil { + t.Fatalf("Unmarshal: %v, got these bytes: %v", err, b) + } + if v, ok := m2.MsgMapping[1]; !ok { + t.Error("msg_mapping[1] not present") + } else if v != nil { + t.Errorf("msg_mapping[1] not nil: %v", v) + } +} + +func TestMapFieldWithNilBytes(t *testing.T) { + m1 := &MessageWithMap{ + ByteMapping: map[bool][]byte{ + false: {}, + true: nil, + }, + } + n := Size(m1) + b, err := Marshal(m1) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + if n != len(b) { + t.Errorf("Size(m1) = %d; want len(Marshal(m1)) = %d", n, len(b)) + } + m2 := new(MessageWithMap) + if err := Unmarshal(b, m2); err != nil { + t.Fatalf("Unmarshal: %v, got these bytes: %v", err, b) + } + if v, ok := m2.ByteMapping[false]; !ok { + t.Error("byte_mapping[false] not present") + } else if len(v) != 0 { + t.Errorf("byte_mapping[false] not empty: %#v", v) + } + if v, ok := m2.ByteMapping[true]; !ok { + t.Error("byte_mapping[true] not present") + } else if len(v) != 0 { + t.Errorf("byte_mapping[true] not empty: %#v", v) + } +} + +func TestDecodeMapFieldMissingKey(t *testing.T) { + b := []byte{ + 0x0A, 0x03, // message, tag 1 (name_mapping), of length 3 bytes + // no key + 0x12, 0x01, 0x6D, // string value of length 1 byte, value "m" + } + got := &MessageWithMap{} + err := Unmarshal(b, got) + if err != nil { + t.Fatalf("failed to marshal map with missing key: %v", err) + } + want := &MessageWithMap{NameMapping: map[int32]string{0: "m"}} + if !Equal(got, want) { + t.Errorf("Unmarshaled map with no key was not as expected. got: %v, want %v", got, want) + } +} + +func TestDecodeMapFieldMissingValue(t *testing.T) { + b := []byte{ + 0x0A, 0x02, // message, tag 1 (name_mapping), of length 2 bytes + 0x08, 0x01, // varint key, value 1 + // no value + } + got := &MessageWithMap{} + err := Unmarshal(b, got) + if err != nil { + t.Fatalf("failed to marshal map with missing value: %v", err) + } + want := &MessageWithMap{NameMapping: map[int32]string{1: ""}} + if !Equal(got, want) { + t.Errorf("Unmarshaled map with no value was not as expected. got: %v, want %v", got, want) + } +} + +func TestOneof(t *testing.T) { + m := &Communique{} + b, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal of empty message with oneof: %v", err) + } + if len(b) != 0 { + t.Errorf("Marshal of empty message yielded too many bytes: %v", b) + } + + m = &Communique{ + Union: &Communique_Name{Name: "Barry"}, + } + + // Round-trip. + b, err = Marshal(m) + if err != nil { + t.Fatalf("Marshal of message with oneof: %v", err) + } + if len(b) != 7 { // name tag/wire (1) + name len (1) + name (5) + t.Errorf("Incorrect marshal of message with oneof: %v", b) + } + m.Reset() + if err = Unmarshal(b, m); err != nil { + t.Fatalf("Unmarshal of message with oneof: %v", err) + } + if x, ok := m.Union.(*Communique_Name); !ok || x.Name != "Barry" { + t.Errorf("After round trip, Union = %+v", m.Union) + } + if name := m.GetName(); name != "Barry" { + t.Errorf("After round trip, GetName = %q, want %q", name, "Barry") + } + + // Let's try with a message in the oneof. + m.Union = &Communique_Msg{Msg: &Strings{StringField: String("deep deep string")}} + b, err = Marshal(m) + if err != nil { + t.Fatalf("Marshal of message with oneof set to message: %v", err) + } + if len(b) != 20 { // msg tag/wire (1) + msg len (1) + msg (1 + 1 + 16) + t.Errorf("Incorrect marshal of message with oneof set to message: %v", b) + } + m.Reset() + if err := Unmarshal(b, m); err != nil { + t.Fatalf("Unmarshal of message with oneof set to message: %v", err) + } + ss, ok := m.Union.(*Communique_Msg) + if !ok || ss.Msg.GetStringField() != "deep deep string" { + t.Errorf("After round trip with oneof set to message, Union = %+v", m.Union) + } +} + +func TestInefficientPackedBool(t *testing.T) { + // https://github.com/golang/protobuf/issues/76 + inp := []byte{ + 0x12, 0x02, // 0x12 = 2<<3|2; 2 bytes + // Usually a bool should take a single byte, + // but it is permitted to be any varint. + 0xb9, 0x30, + } + if err := Unmarshal(inp, new(MoreRepeated)); err != nil { + t.Error(err) + } +} + +// Benchmarks + +func testMsg() *GoTest { + pb := initGoTest(true) + const N = 1000 // Internally the library starts much smaller. + pb.F_Int32Repeated = make([]int32, N) + pb.F_DoubleRepeated = make([]float64, N) + for i := 0; i < N; i++ { + pb.F_Int32Repeated[i] = int32(i) + pb.F_DoubleRepeated[i] = float64(i) + } + return pb +} + +func bytesMsg() *GoTest { + pb := initGoTest(true) + buf := make([]byte, 4000) + for i := range buf { + buf[i] = byte(i) + } + pb.F_BytesDefaulted = buf + return pb +} + +func benchmarkMarshal(b *testing.B, pb Message, marshal func(Message) ([]byte, error)) { + d, _ := marshal(pb) + b.SetBytes(int64(len(d))) + b.ResetTimer() + for i := 0; i < b.N; i++ { + marshal(pb) + } +} + +func benchmarkBufferMarshal(b *testing.B, pb Message) { + p := NewBuffer(nil) + benchmarkMarshal(b, pb, func(pb0 Message) ([]byte, error) { + p.Reset() + err := p.Marshal(pb0) + return p.Bytes(), err + }) +} + +func benchmarkSize(b *testing.B, pb Message) { + benchmarkMarshal(b, pb, func(pb0 Message) ([]byte, error) { + Size(pb) + return nil, nil + }) +} + +func newOf(pb Message) Message { + in := reflect.ValueOf(pb) + if in.IsNil() { + return pb + } + return reflect.New(in.Type().Elem()).Interface().(Message) +} + +func benchmarkUnmarshal(b *testing.B, pb Message, unmarshal func([]byte, Message) error) { + d, _ := Marshal(pb) + b.SetBytes(int64(len(d))) + pbd := newOf(pb) + + b.ResetTimer() + for i := 0; i < b.N; i++ { + unmarshal(d, pbd) + } +} + +func benchmarkBufferUnmarshal(b *testing.B, pb Message) { + p := NewBuffer(nil) + benchmarkUnmarshal(b, pb, func(d []byte, pb0 Message) error { + p.SetBuf(d) + return p.Unmarshal(pb0) + }) +} + +// Benchmark{Marshal,BufferMarshal,Size,Unmarshal,BufferUnmarshal}{,Bytes} + +func BenchmarkMarshal(b *testing.B) { + benchmarkMarshal(b, testMsg(), Marshal) +} + +func BenchmarkBufferMarshal(b *testing.B) { + benchmarkBufferMarshal(b, testMsg()) +} + +func BenchmarkSize(b *testing.B) { + benchmarkSize(b, testMsg()) +} + +func BenchmarkUnmarshal(b *testing.B) { + benchmarkUnmarshal(b, testMsg(), Unmarshal) +} + +func BenchmarkBufferUnmarshal(b *testing.B) { + benchmarkBufferUnmarshal(b, testMsg()) +} + +func BenchmarkMarshalBytes(b *testing.B) { + benchmarkMarshal(b, bytesMsg(), Marshal) +} + +func BenchmarkBufferMarshalBytes(b *testing.B) { + benchmarkBufferMarshal(b, bytesMsg()) +} + +func BenchmarkSizeBytes(b *testing.B) { + benchmarkSize(b, bytesMsg()) +} + +func BenchmarkUnmarshalBytes(b *testing.B) { + benchmarkUnmarshal(b, bytesMsg(), Unmarshal) +} + +func BenchmarkBufferUnmarshalBytes(b *testing.B) { + benchmarkBufferUnmarshal(b, bytesMsg()) +} + +func BenchmarkUnmarshalUnrecognizedFields(b *testing.B) { + b.StopTimer() + pb := initGoTestField() + skip := &GoSkipTest{ + SkipInt32: Int32(32), + SkipFixed32: Uint32(3232), + SkipFixed64: Uint64(6464), + SkipString: String("skipper"), + Skipgroup: &GoSkipTest_SkipGroup{ + GroupInt32: Int32(75), + GroupString: String("wxyz"), + }, + } + + pbd := new(GoTestField) + p := NewBuffer(nil) + p.Marshal(pb) + p.Marshal(skip) + p2 := NewBuffer(nil) + + b.StartTimer() + for i := 0; i < b.N; i++ { + p2.SetBuf(p.Bytes()) + p2.Unmarshal(pbd) + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/any_test.go b/vendor/github.com/gogo/protobuf/proto/any_test.go new file mode 100644 index 000000000..f098d8287 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/any_test.go @@ -0,0 +1,300 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto_test + +import ( + "strings" + "testing" + + "github.com/gogo/protobuf/proto" + + pb "github.com/gogo/protobuf/proto/proto3_proto" + testpb "github.com/gogo/protobuf/proto/testdata" + "github.com/gogo/protobuf/types" +) + +var ( + expandedMarshaler = proto.TextMarshaler{ExpandAny: true} + expandedCompactMarshaler = proto.TextMarshaler{Compact: true, ExpandAny: true} +) + +// anyEqual reports whether two messages which may be google.protobuf.Any or may +// contain google.protobuf.Any fields are equal. We can't use proto.Equal for +// comparison, because semantically equivalent messages may be marshaled to +// binary in different tag order. Instead, trust that TextMarshaler with +// ExpandAny option works and compare the text marshaling results. +func anyEqual(got, want proto.Message) bool { + // if messages are proto.Equal, no need to marshal. + if proto.Equal(got, want) { + return true + } + g := expandedMarshaler.Text(got) + w := expandedMarshaler.Text(want) + return g == w +} + +type golden struct { + m proto.Message + t, c string +} + +var goldenMessages = makeGolden() + +func makeGolden() []golden { + nested := &pb.Nested{Bunny: "Monty"} + nb, err := proto.Marshal(nested) + if err != nil { + panic(err) + } + m1 := &pb.Message{ + Name: "David", + ResultCount: 47, + Anything: &types.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(nested), Value: nb}, + } + m2 := &pb.Message{ + Name: "David", + ResultCount: 47, + Anything: &types.Any{TypeUrl: "http://[::1]/type.googleapis.com/" + proto.MessageName(nested), Value: nb}, + } + m3 := &pb.Message{ + Name: "David", + ResultCount: 47, + Anything: &types.Any{TypeUrl: `type.googleapis.com/"/` + proto.MessageName(nested), Value: nb}, + } + m4 := &pb.Message{ + Name: "David", + ResultCount: 47, + Anything: &types.Any{TypeUrl: "type.googleapis.com/a/path/" + proto.MessageName(nested), Value: nb}, + } + m5 := &types.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(nested), Value: nb} + + any1 := &testpb.MyMessage{Count: proto.Int32(47), Name: proto.String("David")} + proto.SetExtension(any1, testpb.E_Ext_More, &testpb.Ext{Data: proto.String("foo")}) + proto.SetExtension(any1, testpb.E_Ext_Text, proto.String("bar")) + any1b, err := proto.Marshal(any1) + if err != nil { + panic(err) + } + any2 := &testpb.MyMessage{Count: proto.Int32(42), Bikeshed: testpb.MyMessage_GREEN.Enum(), RepBytes: [][]byte{[]byte("roboto")}} + proto.SetExtension(any2, testpb.E_Ext_More, &testpb.Ext{Data: proto.String("baz")}) + any2b, err := proto.Marshal(any2) + if err != nil { + panic(err) + } + m6 := &pb.Message{ + Name: "David", + ResultCount: 47, + Anything: &types.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(any1), Value: any1b}, + ManyThings: []*types.Any{ + {TypeUrl: "type.googleapis.com/" + proto.MessageName(any2), Value: any2b}, + {TypeUrl: "type.googleapis.com/" + proto.MessageName(any1), Value: any1b}, + }, + } + + const ( + m1Golden = ` +name: "David" +result_count: 47 +anything: < + [type.googleapis.com/proto3_proto.Nested]: < + bunny: "Monty" + > +> +` + m2Golden = ` +name: "David" +result_count: 47 +anything: < + ["http://[::1]/type.googleapis.com/proto3_proto.Nested"]: < + bunny: "Monty" + > +> +` + m3Golden = ` +name: "David" +result_count: 47 +anything: < + ["type.googleapis.com/\"/proto3_proto.Nested"]: < + bunny: "Monty" + > +> +` + m4Golden = ` +name: "David" +result_count: 47 +anything: < + [type.googleapis.com/a/path/proto3_proto.Nested]: < + bunny: "Monty" + > +> +` + m5Golden = ` +[type.googleapis.com/proto3_proto.Nested]: < + bunny: "Monty" +> +` + m6Golden = ` +name: "David" +result_count: 47 +anything: < + [type.googleapis.com/testdata.MyMessage]: < + count: 47 + name: "David" + [testdata.Ext.more]: < + data: "foo" + > + [testdata.Ext.text]: "bar" + > +> +many_things: < + [type.googleapis.com/testdata.MyMessage]: < + count: 42 + bikeshed: GREEN + rep_bytes: "roboto" + [testdata.Ext.more]: < + data: "baz" + > + > +> +many_things: < + [type.googleapis.com/testdata.MyMessage]: < + count: 47 + name: "David" + [testdata.Ext.more]: < + data: "foo" + > + [testdata.Ext.text]: "bar" + > +> +` + ) + return []golden{ + {m1, strings.TrimSpace(m1Golden) + "\n", strings.TrimSpace(compact(m1Golden)) + " "}, + {m2, strings.TrimSpace(m2Golden) + "\n", strings.TrimSpace(compact(m2Golden)) + " "}, + {m3, strings.TrimSpace(m3Golden) + "\n", strings.TrimSpace(compact(m3Golden)) + " "}, + {m4, strings.TrimSpace(m4Golden) + "\n", strings.TrimSpace(compact(m4Golden)) + " "}, + {m5, strings.TrimSpace(m5Golden) + "\n", strings.TrimSpace(compact(m5Golden)) + " "}, + {m6, strings.TrimSpace(m6Golden) + "\n", strings.TrimSpace(compact(m6Golden)) + " "}, + } +} + +func TestMarshalGolden(t *testing.T) { + for _, tt := range goldenMessages { + if got, want := expandedMarshaler.Text(tt.m), tt.t; got != want { + t.Errorf("message %v: got:\n%s\nwant:\n%s", tt.m, got, want) + } + if got, want := expandedCompactMarshaler.Text(tt.m), tt.c; got != want { + t.Errorf("message %v: got:\n`%s`\nwant:\n`%s`", tt.m, got, want) + } + } +} + +func TestUnmarshalGolden(t *testing.T) { + for _, tt := range goldenMessages { + want := tt.m + got := proto.Clone(tt.m) + got.Reset() + if err := proto.UnmarshalText(tt.t, got); err != nil { + t.Errorf("failed to unmarshal\n%s\nerror: %v", tt.t, err) + } + if !anyEqual(got, want) { + t.Errorf("message:\n%s\ngot:\n%s\nwant:\n%s", tt.t, got, want) + } + got.Reset() + if err := proto.UnmarshalText(tt.c, got); err != nil { + t.Errorf("failed to unmarshal\n%s\nerror: %v", tt.c, err) + } + if !anyEqual(got, want) { + t.Errorf("message:\n%s\ngot:\n%s\nwant:\n%s", tt.c, got, want) + } + } +} + +func TestMarshalUnknownAny(t *testing.T) { + m := &pb.Message{ + Anything: &types.Any{ + TypeUrl: "foo", + Value: []byte("bar"), + }, + } + want := `anything: < + type_url: "foo" + value: "bar" +> +` + got := expandedMarshaler.Text(m) + if got != want { + t.Errorf("got\n`%s`\nwant\n`%s`", got, want) + } +} + +func TestAmbiguousAny(t *testing.T) { + pb := &types.Any{} + err := proto.UnmarshalText(` + type_url: "ttt/proto3_proto.Nested" + value: "\n\x05Monty" + `, pb) + t.Logf("result: %v (error: %v)", expandedMarshaler.Text(pb), err) + if err != nil { + t.Errorf("failed to parse ambiguous Any message: %v", err) + } +} + +func TestUnmarshalOverwriteAny(t *testing.T) { + pb := &types.Any{} + err := proto.UnmarshalText(` + [type.googleapis.com/a/path/proto3_proto.Nested]: < + bunny: "Monty" + > + [type.googleapis.com/a/path/proto3_proto.Nested]: < + bunny: "Rabbit of Caerbannog" + > + `, pb) + want := `line 7: Any message unpacked multiple times, or "type_url" already set` + if err.Error() != want { + t.Errorf("incorrect error.\nHave: %v\nWant: %v", err.Error(), want) + } +} + +func TestUnmarshalAnyMixAndMatch(t *testing.T) { + pb := &types.Any{} + err := proto.UnmarshalText(` + value: "\n\x05Monty" + [type.googleapis.com/a/path/proto3_proto.Nested]: < + bunny: "Rabbit of Caerbannog" + > + `, pb) + want := `line 5: Any message unpacked multiple times, or "value" already set` + if err.Error() != want { + t.Errorf("incorrect error.\nHave: %v\nWant: %v", err.Error(), want) + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/clone_test.go b/vendor/github.com/gogo/protobuf/proto/clone_test.go new file mode 100644 index 000000000..1a16eb554 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/clone_test.go @@ -0,0 +1,300 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2011 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto_test + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + + proto3pb "github.com/gogo/protobuf/proto/proto3_proto" + pb "github.com/gogo/protobuf/proto/testdata" +) + +var cloneTestMessage = &pb.MyMessage{ + Count: proto.Int32(42), + Name: proto.String("Dave"), + Pet: []string{"bunny", "kitty", "horsey"}, + Inner: &pb.InnerMessage{ + Host: proto.String("niles"), + Port: proto.Int32(9099), + Connected: proto.Bool(true), + }, + Others: []*pb.OtherMessage{ + { + Value: []byte("some bytes"), + }, + }, + Somegroup: &pb.MyMessage_SomeGroup{ + GroupField: proto.Int32(6), + }, + RepBytes: [][]byte{[]byte("sham"), []byte("wow")}, +} + +func init() { + ext := &pb.Ext{ + Data: proto.String("extension"), + } + if err := proto.SetExtension(cloneTestMessage, pb.E_Ext_More, ext); err != nil { + panic("SetExtension: " + err.Error()) + } +} + +func TestClone(t *testing.T) { + m := proto.Clone(cloneTestMessage).(*pb.MyMessage) + if !proto.Equal(m, cloneTestMessage) { + t.Errorf("Clone(%v) = %v", cloneTestMessage, m) + } + + // Verify it was a deep copy. + *m.Inner.Port++ + if proto.Equal(m, cloneTestMessage) { + t.Error("Mutating clone changed the original") + } + // Byte fields and repeated fields should be copied. + if &m.Pet[0] == &cloneTestMessage.Pet[0] { + t.Error("Pet: repeated field not copied") + } + if &m.Others[0] == &cloneTestMessage.Others[0] { + t.Error("Others: repeated field not copied") + } + if &m.Others[0].Value[0] == &cloneTestMessage.Others[0].Value[0] { + t.Error("Others[0].Value: bytes field not copied") + } + if &m.RepBytes[0] == &cloneTestMessage.RepBytes[0] { + t.Error("RepBytes: repeated field not copied") + } + if &m.RepBytes[0][0] == &cloneTestMessage.RepBytes[0][0] { + t.Error("RepBytes[0]: bytes field not copied") + } +} + +func TestCloneNil(t *testing.T) { + var m *pb.MyMessage + if c := proto.Clone(m); !proto.Equal(m, c) { + t.Errorf("Clone(%v) = %v", m, c) + } +} + +var mergeTests = []struct { + src, dst, want proto.Message +}{ + { + src: &pb.MyMessage{ + Count: proto.Int32(42), + }, + dst: &pb.MyMessage{ + Name: proto.String("Dave"), + }, + want: &pb.MyMessage{ + Count: proto.Int32(42), + Name: proto.String("Dave"), + }, + }, + { + src: &pb.MyMessage{ + Inner: &pb.InnerMessage{ + Host: proto.String("hey"), + Connected: proto.Bool(true), + }, + Pet: []string{"horsey"}, + Others: []*pb.OtherMessage{ + { + Value: []byte("some bytes"), + }, + }, + }, + dst: &pb.MyMessage{ + Inner: &pb.InnerMessage{ + Host: proto.String("niles"), + Port: proto.Int32(9099), + }, + Pet: []string{"bunny", "kitty"}, + Others: []*pb.OtherMessage{ + { + Key: proto.Int64(31415926535), + }, + { + // Explicitly test a src=nil field + Inner: nil, + }, + }, + }, + want: &pb.MyMessage{ + Inner: &pb.InnerMessage{ + Host: proto.String("hey"), + Connected: proto.Bool(true), + Port: proto.Int32(9099), + }, + Pet: []string{"bunny", "kitty", "horsey"}, + Others: []*pb.OtherMessage{ + { + Key: proto.Int64(31415926535), + }, + {}, + { + Value: []byte("some bytes"), + }, + }, + }, + }, + { + src: &pb.MyMessage{ + RepBytes: [][]byte{[]byte("wow")}, + }, + dst: &pb.MyMessage{ + Somegroup: &pb.MyMessage_SomeGroup{ + GroupField: proto.Int32(6), + }, + RepBytes: [][]byte{[]byte("sham")}, + }, + want: &pb.MyMessage{ + Somegroup: &pb.MyMessage_SomeGroup{ + GroupField: proto.Int32(6), + }, + RepBytes: [][]byte{[]byte("sham"), []byte("wow")}, + }, + }, + // Check that a scalar bytes field replaces rather than appends. + { + src: &pb.OtherMessage{Value: []byte("foo")}, + dst: &pb.OtherMessage{Value: []byte("bar")}, + want: &pb.OtherMessage{Value: []byte("foo")}, + }, + { + src: &pb.MessageWithMap{ + NameMapping: map[int32]string{6: "Nigel"}, + MsgMapping: map[int64]*pb.FloatingPoint{ + 0x4001: {F: proto.Float64(2.0)}, + 0x4002: { + F: proto.Float64(2.0), + }, + }, + ByteMapping: map[bool][]byte{true: []byte("wowsa")}, + }, + dst: &pb.MessageWithMap{ + NameMapping: map[int32]string{ + 6: "Bruce", // should be overwritten + 7: "Andrew", + }, + MsgMapping: map[int64]*pb.FloatingPoint{ + 0x4002: { + F: proto.Float64(3.0), + Exact: proto.Bool(true), + }, // the entire message should be overwritten + }, + }, + want: &pb.MessageWithMap{ + NameMapping: map[int32]string{ + 6: "Nigel", + 7: "Andrew", + }, + MsgMapping: map[int64]*pb.FloatingPoint{ + 0x4001: {F: proto.Float64(2.0)}, + 0x4002: { + F: proto.Float64(2.0), + }, + }, + ByteMapping: map[bool][]byte{true: []byte("wowsa")}, + }, + }, + // proto3 shouldn't merge zero values, + // in the same way that proto2 shouldn't merge nils. + { + src: &proto3pb.Message{ + Name: "Aaron", + Data: []byte(""), // zero value, but not nil + }, + dst: &proto3pb.Message{ + HeightInCm: 176, + Data: []byte("texas!"), + }, + want: &proto3pb.Message{ + Name: "Aaron", + HeightInCm: 176, + Data: []byte("texas!"), + }, + }, + // Oneof fields should merge by assignment. + { + src: &pb.Communique{ + Union: &pb.Communique_Number{Number: 41}, + }, + dst: &pb.Communique{ + Union: &pb.Communique_Name{Name: "Bobby Tables"}, + }, + want: &pb.Communique{ + Union: &pb.Communique_Number{Number: 41}, + }, + }, + // Oneof nil is the same as not set. + { + src: &pb.Communique{}, + dst: &pb.Communique{ + Union: &pb.Communique_Name{Name: "Bobby Tables"}, + }, + want: &pb.Communique{ + Union: &pb.Communique_Name{Name: "Bobby Tables"}, + }, + }, + { + src: &proto3pb.Message{ + Terrain: map[string]*proto3pb.Nested{ + "kay_a": {Cute: true}, // replace + "kay_b": {Bunny: "rabbit"}, // insert + }, + }, + dst: &proto3pb.Message{ + Terrain: map[string]*proto3pb.Nested{ + "kay_a": {Bunny: "lost"}, // replaced + "kay_c": {Bunny: "bunny"}, // keep + }, + }, + want: &proto3pb.Message{ + Terrain: map[string]*proto3pb.Nested{ + "kay_a": {Cute: true}, + "kay_b": {Bunny: "rabbit"}, + "kay_c": {Bunny: "bunny"}, + }, + }, + }, +} + +func TestMerge(t *testing.T) { + for _, m := range mergeTests { + got := proto.Clone(m.dst) + proto.Merge(got, m.src) + if !proto.Equal(got, m.want) { + t.Errorf("Merge(%v, %v)\n got %v\nwant %v\n", m.dst, m.src, got, m.want) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/decode_test.go b/vendor/github.com/gogo/protobuf/proto/decode_test.go new file mode 100644 index 000000000..0cfae71ec --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/decode_test.go @@ -0,0 +1,260 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto_test + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + tpb "github.com/gogo/protobuf/proto/proto3_proto" +) + +var ( + bytesBlackhole []byte + msgBlackhole = new(tpb.Message) +) + +// Disabled this Benchmark because it is using features (b.Run) from go1.7 and gogoprotobuf still have compatibility with go1.5 +// BenchmarkVarint32ArraySmall shows the performance on an array of small int32 fields (1 and +// 2 bytes long). +// func BenchmarkVarint32ArraySmall(b *testing.B) { +// for i := uint(1); i <= 10; i++ { +// dist := genInt32Dist([7]int{0, 3, 1}, 1<unmarshal. +} + +func TestMarshalUnmarshalRepeatedExtension(t *testing.T) { + // Add a repeated extension to the result. + tests := []struct { + name string + ext []*pb.ComplexExtension + }{ + { + "two fields", + []*pb.ComplexExtension{ + {First: proto.Int32(7)}, + {Second: proto.Int32(11)}, + }, + }, + { + "repeated field", + []*pb.ComplexExtension{ + {Third: []int32{1000}}, + {Third: []int32{2000}}, + }, + }, + { + "two fields and repeated field", + []*pb.ComplexExtension{ + {Third: []int32{1000}}, + {First: proto.Int32(9)}, + {Second: proto.Int32(21)}, + {Third: []int32{2000}}, + }, + }, + } + for _, test := range tests { + // Marshal message with a repeated extension. + msg1 := new(pb.OtherMessage) + err := proto.SetExtension(msg1, pb.E_RComplex, test.ext) + if err != nil { + t.Fatalf("[%s] Error setting extension: %v", test.name, err) + } + b, err := proto.Marshal(msg1) + if err != nil { + t.Fatalf("[%s] Error marshaling message: %v", test.name, err) + } + + // Unmarshal and read the merged proto. + msg2 := new(pb.OtherMessage) + err = proto.Unmarshal(b, msg2) + if err != nil { + t.Fatalf("[%s] Error unmarshaling message: %v", test.name, err) + } + e, err := proto.GetExtension(msg2, pb.E_RComplex) + if err != nil { + t.Fatalf("[%s] Error getting extension: %v", test.name, err) + } + ext := e.([]*pb.ComplexExtension) + if ext == nil { + t.Fatalf("[%s] Invalid extension", test.name) + } + if !reflect.DeepEqual(ext, test.ext) { + t.Errorf("[%s] Wrong value for ComplexExtension: got: %v want: %v\n", test.name, ext, test.ext) + } + } +} + +func TestUnmarshalRepeatingNonRepeatedExtension(t *testing.T) { + // We may see multiple instances of the same extension in the wire + // format. For example, the proto compiler may encode custom options in + // this way. Here, we verify that we merge the extensions together. + tests := []struct { + name string + ext []*pb.ComplexExtension + }{ + { + "two fields", + []*pb.ComplexExtension{ + {First: proto.Int32(7)}, + {Second: proto.Int32(11)}, + }, + }, + { + "repeated field", + []*pb.ComplexExtension{ + {Third: []int32{1000}}, + {Third: []int32{2000}}, + }, + }, + { + "two fields and repeated field", + []*pb.ComplexExtension{ + {Third: []int32{1000}}, + {First: proto.Int32(9)}, + {Second: proto.Int32(21)}, + {Third: []int32{2000}}, + }, + }, + } + for _, test := range tests { + var buf bytes.Buffer + var want pb.ComplexExtension + + // Generate a serialized representation of a repeated extension + // by catenating bytes together. + for i, e := range test.ext { + // Merge to create the wanted proto. + proto.Merge(&want, e) + + // serialize the message + msg := new(pb.OtherMessage) + err := proto.SetExtension(msg, pb.E_Complex, e) + if err != nil { + t.Fatalf("[%s] Error setting extension %d: %v", test.name, i, err) + } + b, err := proto.Marshal(msg) + if err != nil { + t.Fatalf("[%s] Error marshaling message %d: %v", test.name, i, err) + } + buf.Write(b) + } + + // Unmarshal and read the merged proto. + msg2 := new(pb.OtherMessage) + err := proto.Unmarshal(buf.Bytes(), msg2) + if err != nil { + t.Fatalf("[%s] Error unmarshaling message: %v", test.name, err) + } + e, err := proto.GetExtension(msg2, pb.E_Complex) + if err != nil { + t.Fatalf("[%s] Error getting extension: %v", test.name, err) + } + ext := e.(*pb.ComplexExtension) + if ext == nil { + t.Fatalf("[%s] Invalid extension", test.name) + } + if !reflect.DeepEqual(*ext, want) { + t.Errorf("[%s] Wrong value for ComplexExtension: got: %v want: %v\n", test.name, ext, want) + } + } +} + +func TestClearAllExtensions(t *testing.T) { + // unregistered extension + desc := &proto.ExtensionDesc{ + ExtendedType: (*pb.MyMessage)(nil), + ExtensionType: (*bool)(nil), + Field: 101010100, + Name: "emptyextension", + Tag: "varint,0,opt", + } + m := &pb.MyMessage{} + if proto.HasExtension(m, desc) { + t.Errorf("proto.HasExtension(%s): got true, want false", proto.MarshalTextString(m)) + } + if err := proto.SetExtension(m, desc, proto.Bool(true)); err != nil { + t.Errorf("proto.SetExtension(m, desc, true): got error %q, want nil", err) + } + if !proto.HasExtension(m, desc) { + t.Errorf("proto.HasExtension(%s): got false, want true", proto.MarshalTextString(m)) + } + proto.ClearAllExtensions(m) + if proto.HasExtension(m, desc) { + t.Errorf("proto.HasExtension(%s): got true, want false", proto.MarshalTextString(m)) + } +} + +func TestMarshalRace(t *testing.T) { + // unregistered extension + desc := &proto.ExtensionDesc{ + ExtendedType: (*pb.MyMessage)(nil), + ExtensionType: (*bool)(nil), + Field: 101010100, + Name: "emptyextension", + Tag: "varint,0,opt", + } + + m := &pb.MyMessage{Count: proto.Int32(4)} + if err := proto.SetExtension(m, desc, proto.Bool(true)); err != nil { + t.Errorf("proto.SetExtension(m, desc, true): got error %q, want nil", err) + } + + errChan := make(chan error, 3) + for n := 3; n > 0; n-- { + go func() { + _, err := proto.Marshal(m) + errChan <- err + }() + } + for i := 0; i < 3; i++ { + err := <-errChan + if err != nil { + t.Fatal(err) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/map_test.go b/vendor/github.com/gogo/protobuf/proto/map_test.go new file mode 100644 index 000000000..18b946d00 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/map_test.go @@ -0,0 +1,46 @@ +package proto_test + +import ( + "fmt" + "testing" + + "github.com/gogo/protobuf/proto" + ppb "github.com/gogo/protobuf/proto/proto3_proto" +) + +func marshalled() []byte { + m := &ppb.IntMaps{} + for i := 0; i < 1000; i++ { + m.Maps = append(m.Maps, &ppb.IntMap{ + Rtt: map[int32]int32{1: 2}, + }) + } + b, err := proto.Marshal(m) + if err != nil { + panic(fmt.Sprintf("Can't marshal %+v: %v", m, err)) + } + return b +} + +func BenchmarkConcurrentMapUnmarshal(b *testing.B) { + in := marshalled() + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + var out ppb.IntMaps + if err := proto.Unmarshal(in, &out); err != nil { + b.Errorf("Can't unmarshal ppb.IntMaps: %v", err) + } + } + }) +} + +func BenchmarkSequentialMapUnmarshal(b *testing.B) { + in := marshalled() + b.ResetTimer() + for i := 0; i < b.N; i++ { + var out ppb.IntMaps + if err := proto.Unmarshal(in, &out); err != nil { + b.Errorf("Can't unmarshal ppb.IntMaps: %v", err) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/message_set_test.go b/vendor/github.com/gogo/protobuf/proto/message_set_test.go new file mode 100644 index 000000000..353a3ea76 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/message_set_test.go @@ -0,0 +1,66 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto + +import ( + "bytes" + "testing" +) + +func TestUnmarshalMessageSetWithDuplicate(t *testing.T) { + // Check that a repeated message set entry will be concatenated. + in := &messageSet{ + Item: []*_MessageSet_Item{ + {TypeId: Int32(12345), Message: []byte("hoo")}, + {TypeId: Int32(12345), Message: []byte("hah")}, + }, + } + b, err := Marshal(in) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + t.Logf("Marshaled bytes: %q", b) + + var extensions XXX_InternalExtensions + if err := UnmarshalMessageSet(b, &extensions); err != nil { + t.Fatalf("UnmarshalMessageSet: %v", err) + } + ext, ok := extensions.p.extensionMap[12345] + if !ok { + t.Fatalf("Didn't retrieve extension 12345; map is %v", extensions.p.extensionMap) + } + // Skip wire type/field number and length varints. + got := skipVarint(skipVarint(ext.enc)) + if want := []byte("hoohah"); !bytes.Equal(got, want) { + t.Errorf("Combined extension is %q, want %q", got, want) + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/proto3_test.go b/vendor/github.com/gogo/protobuf/proto/proto3_test.go new file mode 100644 index 000000000..75b66c179 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/proto3_test.go @@ -0,0 +1,135 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto_test + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + pb "github.com/gogo/protobuf/proto/proto3_proto" + tpb "github.com/gogo/protobuf/proto/testdata" +) + +func TestProto3ZeroValues(t *testing.T) { + tests := []struct { + desc string + m proto.Message + }{ + {"zero message", &pb.Message{}}, + {"empty bytes field", &pb.Message{Data: []byte{}}}, + } + for _, test := range tests { + b, err := proto.Marshal(test.m) + if err != nil { + t.Errorf("%s: proto.Marshal: %v", test.desc, err) + continue + } + if len(b) > 0 { + t.Errorf("%s: Encoding is non-empty: %q", test.desc, b) + } + } +} + +func TestRoundTripProto3(t *testing.T) { + m := &pb.Message{ + Name: "David", // (2 | 1<<3): 0x0a 0x05 "David" + Hilarity: pb.Message_PUNS, // (0 | 2<<3): 0x10 0x01 + HeightInCm: 178, // (0 | 3<<3): 0x18 0xb2 0x01 + Data: []byte("roboto"), // (2 | 4<<3): 0x20 0x06 "roboto" + ResultCount: 47, // (0 | 7<<3): 0x38 0x2f + TrueScotsman: true, // (0 | 8<<3): 0x40 0x01 + Score: 8.1, // (5 | 9<<3): 0x4d <8.1> + + Key: []uint64{1, 0xdeadbeef}, + Nested: &pb.Nested{ + Bunny: "Monty", + }, + } + t.Logf(" m: %v", m) + + b, err := proto.Marshal(m) + if err != nil { + t.Fatalf("proto.Marshal: %v", err) + } + t.Logf(" b: %q", b) + + m2 := new(pb.Message) + if err := proto.Unmarshal(b, m2); err != nil { + t.Fatalf("proto.Unmarshal: %v", err) + } + t.Logf("m2: %v", m2) + + if !proto.Equal(m, m2) { + t.Errorf("proto.Equal returned false:\n m: %v\nm2: %v", m, m2) + } +} + +func TestGettersForBasicTypesExist(t *testing.T) { + var m pb.Message + if got := m.GetNested().GetBunny(); got != "" { + t.Errorf("m.GetNested().GetBunny() = %q, want empty string", got) + } + if got := m.GetNested().GetCute(); got { + t.Errorf("m.GetNested().GetCute() = %t, want false", got) + } +} + +func TestProto3SetDefaults(t *testing.T) { + in := &pb.Message{ + Terrain: map[string]*pb.Nested{ + "meadow": new(pb.Nested), + }, + Proto2Field: new(tpb.SubDefaults), + Proto2Value: map[string]*tpb.SubDefaults{ + "badlands": new(tpb.SubDefaults), + }, + } + + got := proto.Clone(in).(*pb.Message) + proto.SetDefaults(got) + + // There are no defaults in proto3. Everything should be the zero value, but + // we need to remember to set defaults for nested proto2 messages. + want := &pb.Message{ + Terrain: map[string]*pb.Nested{ + "meadow": new(pb.Nested), + }, + Proto2Field: &tpb.SubDefaults{N: proto.Int64(7)}, + Proto2Value: map[string]*tpb.SubDefaults{ + "badlands": {N: proto.Int64(7)}, + }, + } + + if !proto.Equal(got, want) { + t.Errorf("with in = %v\nproto.SetDefaults(in) =>\ngot %v\nwant %v", in, got, want) + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/size2_test.go b/vendor/github.com/gogo/protobuf/proto/size2_test.go new file mode 100644 index 000000000..a2729c39a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/size2_test.go @@ -0,0 +1,63 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2012 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto + +import ( + "testing" +) + +// This is a separate file and package from size_test.go because that one uses +// generated messages and thus may not be in package proto without having a circular +// dependency, whereas this file tests unexported details of size.go. + +func TestVarintSize(t *testing.T) { + // Check the edge cases carefully. + testCases := []struct { + n uint64 + size int + }{ + {0, 1}, + {1, 1}, + {127, 1}, + {128, 2}, + {16383, 2}, + {16384, 3}, + {1<<63 - 1, 9}, + {1 << 63, 10}, + } + for _, tc := range testCases { + size := sizeVarint(tc.n) + if size != tc.size { + t.Errorf("sizeVarint(%d) = %d, want %d", tc.n, size, tc.size) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/size_test.go b/vendor/github.com/gogo/protobuf/proto/size_test.go new file mode 100644 index 000000000..0a6c1772b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/size_test.go @@ -0,0 +1,164 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2012 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto_test + +import ( + "log" + "strings" + "testing" + + . "github.com/gogo/protobuf/proto" + proto3pb "github.com/gogo/protobuf/proto/proto3_proto" + pb "github.com/gogo/protobuf/proto/testdata" +) + +var messageWithExtension1 = &pb.MyMessage{Count: Int32(7)} + +// messageWithExtension2 is in equal_test.go. +var messageWithExtension3 = &pb.MyMessage{Count: Int32(8)} + +func init() { + if err := SetExtension(messageWithExtension1, pb.E_Ext_More, &pb.Ext{Data: String("Abbott")}); err != nil { + log.Panicf("SetExtension: %v", err) + } + if err := SetExtension(messageWithExtension3, pb.E_Ext_More, &pb.Ext{Data: String("Costello")}); err != nil { + log.Panicf("SetExtension: %v", err) + } + + // Force messageWithExtension3 to have the extension encoded. + Marshal(messageWithExtension3) + +} + +var SizeTests = []struct { + desc string + pb Message +}{ + {"empty", &pb.OtherMessage{}}, + // Basic types. + {"bool", &pb.Defaults{F_Bool: Bool(true)}}, + {"int32", &pb.Defaults{F_Int32: Int32(12)}}, + {"negative int32", &pb.Defaults{F_Int32: Int32(-1)}}, + {"small int64", &pb.Defaults{F_Int64: Int64(1)}}, + {"big int64", &pb.Defaults{F_Int64: Int64(1 << 20)}}, + {"negative int64", &pb.Defaults{F_Int64: Int64(-1)}}, + {"fixed32", &pb.Defaults{F_Fixed32: Uint32(71)}}, + {"fixed64", &pb.Defaults{F_Fixed64: Uint64(72)}}, + {"uint32", &pb.Defaults{F_Uint32: Uint32(123)}}, + {"uint64", &pb.Defaults{F_Uint64: Uint64(124)}}, + {"float", &pb.Defaults{F_Float: Float32(12.6)}}, + {"double", &pb.Defaults{F_Double: Float64(13.9)}}, + {"string", &pb.Defaults{F_String: String("niles")}}, + {"bytes", &pb.Defaults{F_Bytes: []byte("wowsa")}}, + {"bytes, empty", &pb.Defaults{F_Bytes: []byte{}}}, + {"sint32", &pb.Defaults{F_Sint32: Int32(65)}}, + {"sint64", &pb.Defaults{F_Sint64: Int64(67)}}, + {"enum", &pb.Defaults{F_Enum: pb.Defaults_BLUE.Enum()}}, + // Repeated. + {"empty repeated bool", &pb.MoreRepeated{Bools: []bool{}}}, + {"repeated bool", &pb.MoreRepeated{Bools: []bool{false, true, true, false}}}, + {"packed repeated bool", &pb.MoreRepeated{BoolsPacked: []bool{false, true, true, false, true, true, true}}}, + {"repeated int32", &pb.MoreRepeated{Ints: []int32{1, 12203, 1729, -1}}}, + {"repeated int32 packed", &pb.MoreRepeated{IntsPacked: []int32{1, 12203, 1729}}}, + {"repeated int64 packed", &pb.MoreRepeated{Int64SPacked: []int64{ + // Need enough large numbers to verify that the header is counting the number of bytes + // for the field, not the number of elements. + 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, + 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, + }}}, + {"repeated string", &pb.MoreRepeated{Strings: []string{"r", "ken", "gri"}}}, + {"repeated fixed", &pb.MoreRepeated{Fixeds: []uint32{1, 2, 3, 4}}}, + // Nested. + {"nested", &pb.OldMessage{Nested: &pb.OldMessage_Nested{Name: String("whatever")}}}, + {"group", &pb.GroupOld{G: &pb.GroupOld_G{X: Int32(12345)}}}, + // Other things. + {"unrecognized", &pb.MoreRepeated{XXX_unrecognized: []byte{13<<3 | 0, 4}}}, + {"extension (unencoded)", messageWithExtension1}, + {"extension (encoded)", messageWithExtension3}, + // proto3 message + {"proto3 empty", &proto3pb.Message{}}, + {"proto3 bool", &proto3pb.Message{TrueScotsman: true}}, + {"proto3 int64", &proto3pb.Message{ResultCount: 1}}, + {"proto3 uint32", &proto3pb.Message{HeightInCm: 123}}, + {"proto3 float", &proto3pb.Message{Score: 12.6}}, + {"proto3 string", &proto3pb.Message{Name: "Snezana"}}, + {"proto3 bytes", &proto3pb.Message{Data: []byte("wowsa")}}, + {"proto3 bytes, empty", &proto3pb.Message{Data: []byte{}}}, + {"proto3 enum", &proto3pb.Message{Hilarity: proto3pb.Message_PUNS}}, + {"proto3 map field with empty bytes", &proto3pb.MessageWithMap{ByteMapping: map[bool][]byte{false: {}}}}, + + {"map field", &pb.MessageWithMap{NameMapping: map[int32]string{1: "Rob", 7: "Andrew"}}}, + {"map field with message", &pb.MessageWithMap{MsgMapping: map[int64]*pb.FloatingPoint{0x7001: {F: Float64(2.0)}}}}, + {"map field with bytes", &pb.MessageWithMap{ByteMapping: map[bool][]byte{true: []byte("this time for sure")}}}, + {"map field with empty bytes", &pb.MessageWithMap{ByteMapping: map[bool][]byte{true: {}}}}, + + {"map field with big entry", &pb.MessageWithMap{NameMapping: map[int32]string{8: strings.Repeat("x", 125)}}}, + {"map field with big key and val", &pb.MessageWithMap{StrToStr: map[string]string{strings.Repeat("x", 70): strings.Repeat("y", 70)}}}, + {"map field with big numeric key", &pb.MessageWithMap{NameMapping: map[int32]string{0xf00d: "om nom nom"}}}, + + {"oneof not set", &pb.Oneof{}}, + {"oneof bool", &pb.Oneof{Union: &pb.Oneof_F_Bool{F_Bool: true}}}, + {"oneof zero int32", &pb.Oneof{Union: &pb.Oneof_F_Int32{F_Int32: 0}}}, + {"oneof big int32", &pb.Oneof{Union: &pb.Oneof_F_Int32{F_Int32: 1 << 20}}}, + {"oneof int64", &pb.Oneof{Union: &pb.Oneof_F_Int64{F_Int64: 42}}}, + {"oneof fixed32", &pb.Oneof{Union: &pb.Oneof_F_Fixed32{F_Fixed32: 43}}}, + {"oneof fixed64", &pb.Oneof{Union: &pb.Oneof_F_Fixed64{F_Fixed64: 44}}}, + {"oneof uint32", &pb.Oneof{Union: &pb.Oneof_F_Uint32{F_Uint32: 45}}}, + {"oneof uint64", &pb.Oneof{Union: &pb.Oneof_F_Uint64{F_Uint64: 46}}}, + {"oneof float", &pb.Oneof{Union: &pb.Oneof_F_Float{F_Float: 47.1}}}, + {"oneof double", &pb.Oneof{Union: &pb.Oneof_F_Double{F_Double: 48.9}}}, + {"oneof string", &pb.Oneof{Union: &pb.Oneof_F_String{F_String: "Rhythmic Fman"}}}, + {"oneof bytes", &pb.Oneof{Union: &pb.Oneof_F_Bytes{F_Bytes: []byte("let go")}}}, + {"oneof sint32", &pb.Oneof{Union: &pb.Oneof_F_Sint32{F_Sint32: 50}}}, + {"oneof sint64", &pb.Oneof{Union: &pb.Oneof_F_Sint64{F_Sint64: 51}}}, + {"oneof enum", &pb.Oneof{Union: &pb.Oneof_F_Enum{F_Enum: pb.MyMessage_BLUE}}}, + {"message for oneof", &pb.GoTestField{Label: String("k"), Type: String("v")}}, + {"oneof message", &pb.Oneof{Union: &pb.Oneof_F_Message{F_Message: &pb.GoTestField{Label: String("k"), Type: String("v")}}}}, + {"oneof group", &pb.Oneof{Union: &pb.Oneof_FGroup{FGroup: &pb.Oneof_F_Group{X: Int32(52)}}}}, + {"oneof largest tag", &pb.Oneof{Union: &pb.Oneof_F_Largest_Tag{F_Largest_Tag: 1}}}, + {"multiple oneofs", &pb.Oneof{Union: &pb.Oneof_F_Int32{F_Int32: 1}, Tormato: &pb.Oneof_Value{Value: 2}}}, +} + +func TestSize(t *testing.T) { + for _, tc := range SizeTests { + size := Size(tc.pb) + b, err := Marshal(tc.pb) + if err != nil { + t.Errorf("%v: Marshal failed: %v", tc.desc, err) + continue + } + if size != len(b) { + t.Errorf("%v: Size(%v) = %d, want %d", tc.desc, tc.pb, size, len(b)) + t.Logf("%v: bytes: %#v", tc.desc, b) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/text_parser_test.go b/vendor/github.com/gogo/protobuf/proto/text_parser_test.go new file mode 100644 index 000000000..9a3a447ce --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/text_parser_test.go @@ -0,0 +1,673 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto_test + +import ( + "math" + "reflect" + "testing" + + . "github.com/gogo/protobuf/proto" + proto3pb "github.com/gogo/protobuf/proto/proto3_proto" + . "github.com/gogo/protobuf/proto/testdata" +) + +type UnmarshalTextTest struct { + in string + err string // if "", no error expected + out *MyMessage +} + +func buildExtStructTest(text string) UnmarshalTextTest { + msg := &MyMessage{ + Count: Int32(42), + } + SetExtension(msg, E_Ext_More, &Ext{ + Data: String("Hello, world!"), + }) + return UnmarshalTextTest{in: text, out: msg} +} + +func buildExtDataTest(text string) UnmarshalTextTest { + msg := &MyMessage{ + Count: Int32(42), + } + SetExtension(msg, E_Ext_Text, String("Hello, world!")) + SetExtension(msg, E_Ext_Number, Int32(1729)) + return UnmarshalTextTest{in: text, out: msg} +} + +func buildExtRepStringTest(text string) UnmarshalTextTest { + msg := &MyMessage{ + Count: Int32(42), + } + if err := SetExtension(msg, E_Greeting, []string{"bula", "hola"}); err != nil { + panic(err) + } + return UnmarshalTextTest{in: text, out: msg} +} + +var unMarshalTextTests = []UnmarshalTextTest{ + // Basic + { + in: " count:42\n name:\"Dave\" ", + out: &MyMessage{ + Count: Int32(42), + Name: String("Dave"), + }, + }, + + // Empty quoted string + { + in: `count:42 name:""`, + out: &MyMessage{ + Count: Int32(42), + Name: String(""), + }, + }, + + // Quoted string concatenation with double quotes + { + in: `count:42 name: "My name is "` + "\n" + `"elsewhere"`, + out: &MyMessage{ + Count: Int32(42), + Name: String("My name is elsewhere"), + }, + }, + + // Quoted string concatenation with single quotes + { + in: "count:42 name: 'My name is '\n'elsewhere'", + out: &MyMessage{ + Count: Int32(42), + Name: String("My name is elsewhere"), + }, + }, + + // Quoted string concatenations with mixed quotes + { + in: "count:42 name: 'My name is '\n\"elsewhere\"", + out: &MyMessage{ + Count: Int32(42), + Name: String("My name is elsewhere"), + }, + }, + { + in: "count:42 name: \"My name is \"\n'elsewhere'", + out: &MyMessage{ + Count: Int32(42), + Name: String("My name is elsewhere"), + }, + }, + + // Quoted string with escaped apostrophe + { + in: `count:42 name: "HOLIDAY - New Year\'s Day"`, + out: &MyMessage{ + Count: Int32(42), + Name: String("HOLIDAY - New Year's Day"), + }, + }, + + // Quoted string with single quote + { + in: `count:42 name: 'Roger "The Ramster" Ramjet'`, + out: &MyMessage{ + Count: Int32(42), + Name: String(`Roger "The Ramster" Ramjet`), + }, + }, + + // Quoted string with all the accepted special characters from the C++ test + { + in: `count:42 name: ` + "\"\\\"A string with \\' characters \\n and \\r newlines and \\t tabs and \\001 slashes \\\\ and multiple spaces\"", + out: &MyMessage{ + Count: Int32(42), + Name: String("\"A string with ' characters \n and \r newlines and \t tabs and \001 slashes \\ and multiple spaces"), + }, + }, + + // Quoted string with quoted backslash + { + in: `count:42 name: "\\'xyz"`, + out: &MyMessage{ + Count: Int32(42), + Name: String(`\'xyz`), + }, + }, + + // Quoted string with UTF-8 bytes. + { + in: "count:42 name: '\303\277\302\201\xAB'", + out: &MyMessage{ + Count: Int32(42), + Name: String("\303\277\302\201\xAB"), + }, + }, + + // Bad quoted string + { + in: `inner: < host: "\0" >` + "\n", + err: `line 1.15: invalid quoted string "\0": \0 requires 2 following digits`, + }, + + // Number too large for int64 + { + in: "count: 1 others { key: 123456789012345678901 }", + err: "line 1.23: invalid int64: 123456789012345678901", + }, + + // Number too large for int32 + { + in: "count: 1234567890123", + err: "line 1.7: invalid int32: 1234567890123", + }, + + // Number in hexadecimal + { + in: "count: 0x2beef", + out: &MyMessage{ + Count: Int32(0x2beef), + }, + }, + + // Number in octal + { + in: "count: 024601", + out: &MyMessage{ + Count: Int32(024601), + }, + }, + + // Floating point number with "f" suffix + { + in: "count: 4 others:< weight: 17.0f >", + out: &MyMessage{ + Count: Int32(4), + Others: []*OtherMessage{ + { + Weight: Float32(17), + }, + }, + }, + }, + + // Floating point positive infinity + { + in: "count: 4 bigfloat: inf", + out: &MyMessage{ + Count: Int32(4), + Bigfloat: Float64(math.Inf(1)), + }, + }, + + // Floating point negative infinity + { + in: "count: 4 bigfloat: -inf", + out: &MyMessage{ + Count: Int32(4), + Bigfloat: Float64(math.Inf(-1)), + }, + }, + + // Number too large for float32 + { + in: "others:< weight: 12345678901234567890123456789012345678901234567890 >", + err: "line 1.17: invalid float32: 12345678901234567890123456789012345678901234567890", + }, + + // Number posing as a quoted string + { + in: `inner: < host: 12 >` + "\n", + err: `line 1.15: invalid string: 12`, + }, + + // Quoted string posing as int32 + { + in: `count: "12"`, + err: `line 1.7: invalid int32: "12"`, + }, + + // Quoted string posing a float32 + { + in: `others:< weight: "17.4" >`, + err: `line 1.17: invalid float32: "17.4"`, + }, + + // Enum + { + in: `count:42 bikeshed: BLUE`, + out: &MyMessage{ + Count: Int32(42), + Bikeshed: MyMessage_BLUE.Enum(), + }, + }, + + // Repeated field + { + in: `count:42 pet: "horsey" pet:"bunny"`, + out: &MyMessage{ + Count: Int32(42), + Pet: []string{"horsey", "bunny"}, + }, + }, + + // Repeated field with list notation + { + in: `count:42 pet: ["horsey", "bunny"]`, + out: &MyMessage{ + Count: Int32(42), + Pet: []string{"horsey", "bunny"}, + }, + }, + + // Repeated message with/without colon and <>/{} + { + in: `count:42 others:{} others{} others:<> others:{}`, + out: &MyMessage{ + Count: Int32(42), + Others: []*OtherMessage{ + {}, + {}, + {}, + {}, + }, + }, + }, + + // Missing colon for inner message + { + in: `count:42 inner < host: "cauchy.syd" >`, + out: &MyMessage{ + Count: Int32(42), + Inner: &InnerMessage{ + Host: String("cauchy.syd"), + }, + }, + }, + + // Missing colon for string field + { + in: `name "Dave"`, + err: `line 1.5: expected ':', found "\"Dave\""`, + }, + + // Missing colon for int32 field + { + in: `count 42`, + err: `line 1.6: expected ':', found "42"`, + }, + + // Missing required field + { + in: `name: "Pawel"`, + err: `proto: required field "testdata.MyMessage.count" not set`, + out: &MyMessage{ + Name: String("Pawel"), + }, + }, + + // Missing required field in a required submessage + { + in: `count: 42 we_must_go_deeper < leo_finally_won_an_oscar <> >`, + err: `proto: required field "testdata.InnerMessage.host" not set`, + out: &MyMessage{ + Count: Int32(42), + WeMustGoDeeper: &RequiredInnerMessage{LeoFinallyWonAnOscar: &InnerMessage{}}, + }, + }, + + // Repeated non-repeated field + { + in: `name: "Rob" name: "Russ"`, + err: `line 1.12: non-repeated field "name" was repeated`, + }, + + // Group + { + in: `count: 17 SomeGroup { group_field: 12 }`, + out: &MyMessage{ + Count: Int32(17), + Somegroup: &MyMessage_SomeGroup{ + GroupField: Int32(12), + }, + }, + }, + + // Semicolon between fields + { + in: `count:3;name:"Calvin"`, + out: &MyMessage{ + Count: Int32(3), + Name: String("Calvin"), + }, + }, + // Comma between fields + { + in: `count:4,name:"Ezekiel"`, + out: &MyMessage{ + Count: Int32(4), + Name: String("Ezekiel"), + }, + }, + + // Boolean false + { + in: `count:42 inner { host: "example.com" connected: false }`, + out: &MyMessage{ + Count: Int32(42), + Inner: &InnerMessage{ + Host: String("example.com"), + Connected: Bool(false), + }, + }, + }, + // Boolean true + { + in: `count:42 inner { host: "example.com" connected: true }`, + out: &MyMessage{ + Count: Int32(42), + Inner: &InnerMessage{ + Host: String("example.com"), + Connected: Bool(true), + }, + }, + }, + // Boolean 0 + { + in: `count:42 inner { host: "example.com" connected: 0 }`, + out: &MyMessage{ + Count: Int32(42), + Inner: &InnerMessage{ + Host: String("example.com"), + Connected: Bool(false), + }, + }, + }, + // Boolean 1 + { + in: `count:42 inner { host: "example.com" connected: 1 }`, + out: &MyMessage{ + Count: Int32(42), + Inner: &InnerMessage{ + Host: String("example.com"), + Connected: Bool(true), + }, + }, + }, + // Boolean f + { + in: `count:42 inner { host: "example.com" connected: f }`, + out: &MyMessage{ + Count: Int32(42), + Inner: &InnerMessage{ + Host: String("example.com"), + Connected: Bool(false), + }, + }, + }, + // Boolean t + { + in: `count:42 inner { host: "example.com" connected: t }`, + out: &MyMessage{ + Count: Int32(42), + Inner: &InnerMessage{ + Host: String("example.com"), + Connected: Bool(true), + }, + }, + }, + // Boolean False + { + in: `count:42 inner { host: "example.com" connected: False }`, + out: &MyMessage{ + Count: Int32(42), + Inner: &InnerMessage{ + Host: String("example.com"), + Connected: Bool(false), + }, + }, + }, + // Boolean True + { + in: `count:42 inner { host: "example.com" connected: True }`, + out: &MyMessage{ + Count: Int32(42), + Inner: &InnerMessage{ + Host: String("example.com"), + Connected: Bool(true), + }, + }, + }, + + // Extension + buildExtStructTest(`count: 42 [testdata.Ext.more]:`), + buildExtStructTest(`count: 42 [testdata.Ext.more] {data:"Hello, world!"}`), + buildExtDataTest(`count: 42 [testdata.Ext.text]:"Hello, world!" [testdata.Ext.number]:1729`), + buildExtRepStringTest(`count: 42 [testdata.greeting]:"bula" [testdata.greeting]:"hola"`), + + // Big all-in-one + { + in: "count:42 # Meaning\n" + + `name:"Dave" ` + + `quote:"\"I didn't want to go.\"" ` + + `pet:"bunny" ` + + `pet:"kitty" ` + + `pet:"horsey" ` + + `inner:<` + + ` host:"footrest.syd" ` + + ` port:7001 ` + + ` connected:true ` + + `> ` + + `others:<` + + ` key:3735928559 ` + + ` value:"\x01A\a\f" ` + + `> ` + + `others:<` + + " weight:58.9 # Atomic weight of Co\n" + + ` inner:<` + + ` host:"lesha.mtv" ` + + ` port:8002 ` + + ` >` + + `>`, + out: &MyMessage{ + Count: Int32(42), + Name: String("Dave"), + Quote: String(`"I didn't want to go."`), + Pet: []string{"bunny", "kitty", "horsey"}, + Inner: &InnerMessage{ + Host: String("footrest.syd"), + Port: Int32(7001), + Connected: Bool(true), + }, + Others: []*OtherMessage{ + { + Key: Int64(3735928559), + Value: []byte{0x1, 'A', '\a', '\f'}, + }, + { + Weight: Float32(58.9), + Inner: &InnerMessage{ + Host: String("lesha.mtv"), + Port: Int32(8002), + }, + }, + }, + }, + }, +} + +func TestUnmarshalText(t *testing.T) { + for i, test := range unMarshalTextTests { + pb := new(MyMessage) + err := UnmarshalText(test.in, pb) + if test.err == "" { + // We don't expect failure. + if err != nil { + t.Errorf("Test %d: Unexpected error: %v", i, err) + } else if !reflect.DeepEqual(pb, test.out) { + t.Errorf("Test %d: Incorrect populated \nHave: %v\nWant: %v", + i, pb, test.out) + } + } else { + // We do expect failure. + if err == nil { + t.Errorf("Test %d: Didn't get expected error: %v", i, test.err) + } else if err.Error() != test.err { + t.Errorf("Test %d: Incorrect error.\nHave: %v\nWant: %v", + i, err.Error(), test.err) + } else if _, ok := err.(*RequiredNotSetError); ok && test.out != nil && !reflect.DeepEqual(pb, test.out) { + t.Errorf("Test %d: Incorrect populated \nHave: %v\nWant: %v", + i, pb, test.out) + } + } + } +} + +func TestUnmarshalTextCustomMessage(t *testing.T) { + msg := &textMessage{} + if err := UnmarshalText("custom", msg); err != nil { + t.Errorf("Unexpected error from custom unmarshal: %v", err) + } + if UnmarshalText("not custom", msg) == nil { + t.Errorf("Didn't get expected error from custom unmarshal") + } +} + +// Regression test; this caused a panic. +func TestRepeatedEnum(t *testing.T) { + pb := new(RepeatedEnum) + if err := UnmarshalText("color: RED", pb); err != nil { + t.Fatal(err) + } + exp := &RepeatedEnum{ + Color: []RepeatedEnum_Color{RepeatedEnum_RED}, + } + if !Equal(pb, exp) { + t.Errorf("Incorrect populated \nHave: %v\nWant: %v", pb, exp) + } +} + +func TestProto3TextParsing(t *testing.T) { + m := new(proto3pb.Message) + const in = `name: "Wallace" true_scotsman: true` + want := &proto3pb.Message{ + Name: "Wallace", + TrueScotsman: true, + } + if err := UnmarshalText(in, m); err != nil { + t.Fatal(err) + } + if !Equal(m, want) { + t.Errorf("\n got %v\nwant %v", m, want) + } +} + +func TestMapParsing(t *testing.T) { + m := new(MessageWithMap) + const in = `name_mapping: name_mapping:` + + `msg_mapping:,>` + // separating commas are okay + `msg_mapping>` + // no colon after "value" + `msg_mapping:>` + // omitted key + `msg_mapping:` + // omitted value + `byte_mapping:` + + `byte_mapping:<>` // omitted key and value + want := &MessageWithMap{ + NameMapping: map[int32]string{ + 1: "Beatles", + 1234: "Feist", + }, + MsgMapping: map[int64]*FloatingPoint{ + -4: {F: Float64(2.0)}, + -2: {F: Float64(4.0)}, + 0: {F: Float64(5.0)}, + 1: nil, + }, + ByteMapping: map[bool][]byte{ + false: nil, + true: []byte("so be it"), + }, + } + if err := UnmarshalText(in, m); err != nil { + t.Fatal(err) + } + if !Equal(m, want) { + t.Errorf("\n got %v\nwant %v", m, want) + } +} + +func TestOneofParsing(t *testing.T) { + const in = `name:"Shrek"` + m := new(Communique) + want := &Communique{Union: &Communique_Name{Name: "Shrek"}} + if err := UnmarshalText(in, m); err != nil { + t.Fatal(err) + } + if !Equal(m, want) { + t.Errorf("\n got %v\nwant %v", m, want) + } + + const inOverwrite = `name:"Shrek" number:42` + m = new(Communique) + testErr := "line 1.13: field 'number' would overwrite already parsed oneof 'Union'" + if err := UnmarshalText(inOverwrite, m); err == nil { + t.Errorf("TestOneofParsing: Didn't get expected error: %v", testErr) + } else if err.Error() != testErr { + t.Errorf("TestOneofParsing: Incorrect error.\nHave: %v\nWant: %v", + err.Error(), testErr) + } + +} + +var benchInput string + +func init() { + benchInput = "count: 4\n" + for i := 0; i < 1000; i++ { + benchInput += "pet: \"fido\"\n" + } + + // Check it is valid input. + pb := new(MyMessage) + err := UnmarshalText(benchInput, pb) + if err != nil { + panic("Bad benchmark input: " + err.Error()) + } +} + +func BenchmarkUnmarshalText(b *testing.B) { + pb := new(MyMessage) + for i := 0; i < b.N; i++ { + UnmarshalText(benchInput, pb) + } + b.SetBytes(int64(len(benchInput))) +} diff --git a/vendor/github.com/gogo/protobuf/proto/text_test.go b/vendor/github.com/gogo/protobuf/proto/text_test.go new file mode 100644 index 000000000..652404842 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/text_test.go @@ -0,0 +1,474 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto_test + +import ( + "bytes" + "errors" + "io/ioutil" + "math" + "strings" + "testing" + + "github.com/gogo/protobuf/proto" + + proto3pb "github.com/gogo/protobuf/proto/proto3_proto" + pb "github.com/gogo/protobuf/proto/testdata" +) + +// textMessage implements the methods that allow it to marshal and unmarshal +// itself as text. +type textMessage struct { +} + +func (*textMessage) MarshalText() ([]byte, error) { + return []byte("custom"), nil +} + +func (*textMessage) UnmarshalText(bytes []byte) error { + if string(bytes) != "custom" { + return errors.New("expected 'custom'") + } + return nil +} + +func (*textMessage) Reset() {} +func (*textMessage) String() string { return "" } +func (*textMessage) ProtoMessage() {} + +func newTestMessage() *pb.MyMessage { + msg := &pb.MyMessage{ + Count: proto.Int32(42), + Name: proto.String("Dave"), + Quote: proto.String(`"I didn't want to go."`), + Pet: []string{"bunny", "kitty", "horsey"}, + Inner: &pb.InnerMessage{ + Host: proto.String("footrest.syd"), + Port: proto.Int32(7001), + Connected: proto.Bool(true), + }, + Others: []*pb.OtherMessage{ + { + Key: proto.Int64(0xdeadbeef), + Value: []byte{1, 65, 7, 12}, + }, + { + Weight: proto.Float32(6.022), + Inner: &pb.InnerMessage{ + Host: proto.String("lesha.mtv"), + Port: proto.Int32(8002), + }, + }, + }, + Bikeshed: pb.MyMessage_BLUE.Enum(), + Somegroup: &pb.MyMessage_SomeGroup{ + GroupField: proto.Int32(8), + }, + // One normally wouldn't do this. + // This is an undeclared tag 13, as a varint (wire type 0) with value 4. + XXX_unrecognized: []byte{13<<3 | 0, 4}, + } + ext := &pb.Ext{ + Data: proto.String("Big gobs for big rats"), + } + if err := proto.SetExtension(msg, pb.E_Ext_More, ext); err != nil { + panic(err) + } + greetings := []string{"adg", "easy", "cow"} + if err := proto.SetExtension(msg, pb.E_Greeting, greetings); err != nil { + panic(err) + } + + // Add an unknown extension. We marshal a pb.Ext, and fake the ID. + b, err := proto.Marshal(&pb.Ext{Data: proto.String("3G skiing")}) + if err != nil { + panic(err) + } + b = append(proto.EncodeVarint(201<<3|proto.WireBytes), b...) + proto.SetRawExtension(msg, 201, b) + + // Extensions can be plain fields, too, so let's test that. + b = append(proto.EncodeVarint(202<<3|proto.WireVarint), 19) + proto.SetRawExtension(msg, 202, b) + + return msg +} + +const text = `count: 42 +name: "Dave" +quote: "\"I didn't want to go.\"" +pet: "bunny" +pet: "kitty" +pet: "horsey" +inner: < + host: "footrest.syd" + port: 7001 + connected: true +> +others: < + key: 3735928559 + value: "\001A\007\014" +> +others: < + weight: 6.022 + inner: < + host: "lesha.mtv" + port: 8002 + > +> +bikeshed: BLUE +SomeGroup { + group_field: 8 +} +/* 2 unknown bytes */ +13: 4 +[testdata.Ext.more]: < + data: "Big gobs for big rats" +> +[testdata.greeting]: "adg" +[testdata.greeting]: "easy" +[testdata.greeting]: "cow" +/* 13 unknown bytes */ +201: "\t3G skiing" +/* 3 unknown bytes */ +202: 19 +` + +func TestMarshalText(t *testing.T) { + buf := new(bytes.Buffer) + if err := proto.MarshalText(buf, newTestMessage()); err != nil { + t.Fatalf("proto.MarshalText: %v", err) + } + s := buf.String() + if s != text { + t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v===\n", s, text) + } +} + +func TestMarshalTextCustomMessage(t *testing.T) { + buf := new(bytes.Buffer) + if err := proto.MarshalText(buf, &textMessage{}); err != nil { + t.Fatalf("proto.MarshalText: %v", err) + } + s := buf.String() + if s != "custom" { + t.Errorf("Got %q, expected %q", s, "custom") + } +} +func TestMarshalTextNil(t *testing.T) { + want := "" + tests := []proto.Message{nil, (*pb.MyMessage)(nil)} + for i, test := range tests { + buf := new(bytes.Buffer) + if err := proto.MarshalText(buf, test); err != nil { + t.Fatal(err) + } + if got := buf.String(); got != want { + t.Errorf("%d: got %q want %q", i, got, want) + } + } +} + +func TestMarshalTextUnknownEnum(t *testing.T) { + // The Color enum only specifies values 0-2. + m := &pb.MyMessage{Bikeshed: pb.MyMessage_Color(3).Enum()} + got := m.String() + const want = `bikeshed:3 ` + if got != want { + t.Errorf("\n got %q\nwant %q", got, want) + } +} + +func TestTextOneof(t *testing.T) { + tests := []struct { + m proto.Message + want string + }{ + // zero message + {&pb.Communique{}, ``}, + // scalar field + {&pb.Communique{Union: &pb.Communique_Number{Number: 4}}, `number:4`}, + // message field + {&pb.Communique{Union: &pb.Communique_Msg{ + Msg: &pb.Strings{StringField: proto.String("why hello!")}, + }}, `msg:`}, + // bad oneof (should not panic) + {&pb.Communique{Union: &pb.Communique_Msg{Msg: nil}}, `msg:/* nil */`}, + } + for _, test := range tests { + got := strings.TrimSpace(test.m.String()) + if got != test.want { + t.Errorf("\n got %s\nwant %s", got, test.want) + } + } +} + +func BenchmarkMarshalTextBuffered(b *testing.B) { + buf := new(bytes.Buffer) + m := newTestMessage() + for i := 0; i < b.N; i++ { + buf.Reset() + proto.MarshalText(buf, m) + } +} + +func BenchmarkMarshalTextUnbuffered(b *testing.B) { + w := ioutil.Discard + m := newTestMessage() + for i := 0; i < b.N; i++ { + proto.MarshalText(w, m) + } +} + +func compact(src string) string { + // s/[ \n]+/ /g; s/ $//; + dst := make([]byte, len(src)) + space, comment := false, false + j := 0 + for i := 0; i < len(src); i++ { + if strings.HasPrefix(src[i:], "/*") { + comment = true + i++ + continue + } + if comment && strings.HasPrefix(src[i:], "*/") { + comment = false + i++ + continue + } + if comment { + continue + } + c := src[i] + if c == ' ' || c == '\n' { + space = true + continue + } + if j > 0 && (dst[j-1] == ':' || dst[j-1] == '<' || dst[j-1] == '{') { + space = false + } + if c == '{' { + space = false + } + if space { + dst[j] = ' ' + j++ + space = false + } + dst[j] = c + j++ + } + if space { + dst[j] = ' ' + j++ + } + return string(dst[0:j]) +} + +var compactText = compact(text) + +func TestCompactText(t *testing.T) { + s := proto.CompactTextString(newTestMessage()) + if s != compactText { + t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v\n===\n", s, compactText) + } +} + +func TestStringEscaping(t *testing.T) { + testCases := []struct { + in *pb.Strings + out string + }{ + { + // Test data from C++ test (TextFormatTest.StringEscape). + // Single divergence: we don't escape apostrophes. + &pb.Strings{StringField: proto.String("\"A string with ' characters \n and \r newlines and \t tabs and \001 slashes \\ and multiple spaces")}, + "string_field: \"\\\"A string with ' characters \\n and \\r newlines and \\t tabs and \\001 slashes \\\\ and multiple spaces\"\n", + }, + { + // Test data from the same C++ test. + &pb.Strings{StringField: proto.String("\350\260\267\346\255\214")}, + "string_field: \"\\350\\260\\267\\346\\255\\214\"\n", + }, + { + // Some UTF-8. + &pb.Strings{StringField: proto.String("\x00\x01\xff\x81")}, + `string_field: "\000\001\377\201"` + "\n", + }, + } + + for i, tc := range testCases { + var buf bytes.Buffer + if err := proto.MarshalText(&buf, tc.in); err != nil { + t.Errorf("proto.MarsalText: %v", err) + continue + } + s := buf.String() + if s != tc.out { + t.Errorf("#%d: Got:\n%s\nExpected:\n%s\n", i, s, tc.out) + continue + } + + // Check round-trip. + pb := new(pb.Strings) + if err := proto.UnmarshalText(s, pb); err != nil { + t.Errorf("#%d: UnmarshalText: %v", i, err) + continue + } + if !proto.Equal(pb, tc.in) { + t.Errorf("#%d: Round-trip failed:\nstart: %v\n end: %v", i, tc.in, pb) + } + } +} + +// A limitedWriter accepts some output before it fails. +// This is a proxy for something like a nearly-full or imminently-failing disk, +// or a network connection that is about to die. +type limitedWriter struct { + b bytes.Buffer + limit int +} + +var outOfSpace = errors.New("proto: insufficient space") + +func (w *limitedWriter) Write(p []byte) (n int, err error) { + var avail = w.limit - w.b.Len() + if avail <= 0 { + return 0, outOfSpace + } + if len(p) <= avail { + return w.b.Write(p) + } + n, _ = w.b.Write(p[:avail]) + return n, outOfSpace +} + +func TestMarshalTextFailing(t *testing.T) { + // Try lots of different sizes to exercise more error code-paths. + for lim := 0; lim < len(text); lim++ { + buf := new(limitedWriter) + buf.limit = lim + err := proto.MarshalText(buf, newTestMessage()) + // We expect a certain error, but also some partial results in the buffer. + if err != outOfSpace { + t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v===\n", err, outOfSpace) + } + s := buf.b.String() + x := text[:buf.limit] + if s != x { + t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v===\n", s, x) + } + } +} + +func TestFloats(t *testing.T) { + tests := []struct { + f float64 + want string + }{ + {0, "0"}, + {4.7, "4.7"}, + {math.Inf(1), "inf"}, + {math.Inf(-1), "-inf"}, + {math.NaN(), "nan"}, + } + for _, test := range tests { + msg := &pb.FloatingPoint{F: &test.f} + got := strings.TrimSpace(msg.String()) + want := `f:` + test.want + if got != want { + t.Errorf("f=%f: got %q, want %q", test.f, got, want) + } + } +} + +func TestRepeatedNilText(t *testing.T) { + m := &pb.MessageList{ + Message: []*pb.MessageList_Message{ + nil, + { + Name: proto.String("Horse"), + }, + nil, + }, + } + want := `Message +Message { + name: "Horse" +} +Message +` + if s := proto.MarshalTextString(m); s != want { + t.Errorf(" got: %s\nwant: %s", s, want) + } +} + +func TestProto3Text(t *testing.T) { + tests := []struct { + m proto.Message + want string + }{ + // zero message + {&proto3pb.Message{}, ``}, + // zero message except for an empty byte slice + {&proto3pb.Message{Data: []byte{}}, ``}, + // trivial case + {&proto3pb.Message{Name: "Rob", HeightInCm: 175}, `name:"Rob" height_in_cm:175`}, + // empty map + {&pb.MessageWithMap{}, ``}, + // non-empty map; map format is the same as a repeated struct, + // and they are sorted by key (numerically for numeric keys). + { + &pb.MessageWithMap{NameMapping: map[int32]string{ + -1: "Negatory", + 7: "Lucky", + 1234: "Feist", + 6345789: "Otis", + }}, + `name_mapping: ` + + `name_mapping: ` + + `name_mapping: ` + + `name_mapping:`, + }, + // map with nil value; not well-defined, but we shouldn't crash + { + &pb.MessageWithMap{MsgMapping: map[int64]*pb.FloatingPoint{7: nil}}, + `msg_mapping:`, + }, + } + for _, test := range tests { + got := strings.TrimSpace(test.m.String()) + if got != test.want { + t.Errorf("\n got %s\nwant %s", got, test.want) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/Makefile b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/Makefile new file mode 100644 index 000000000..a42cc3717 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/Makefile @@ -0,0 +1,33 @@ +# Go support for Protocol Buffers - Google's data interchange format +# +# Copyright 2010 The Go Authors. All rights reserved. +# https://github.com/golang/protobuf +# +# 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. + +test: + cd testdata && make test diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/Makefile b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/Makefile new file mode 100644 index 000000000..3496dc99d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/Makefile @@ -0,0 +1,36 @@ +# Go support for Protocol Buffers - Google's data interchange format +# +# Copyright 2010 The Go Authors. All rights reserved. +# https://github.com/golang/protobuf +# +# 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. + +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + go install github.com/gogo/protobuf/protoc-gen-gostring + protoc --gogo_out=. -I=../../protobuf/google/protobuf ../../protobuf/google/protobuf/descriptor.proto + protoc --gostring_out=. -I=../../protobuf/google/protobuf ../../protobuf/google/protobuf/descriptor.proto diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor.go new file mode 100644 index 000000000..a85bf1984 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor.go @@ -0,0 +1,118 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +// Package descriptor provides functions for obtaining protocol buffer +// descriptors for generated Go types. +// +// These functions cannot go in package proto because they depend on the +// generated protobuf descriptor messages, which themselves depend on proto. +package descriptor + +import ( + "bytes" + "compress/gzip" + "fmt" + "io/ioutil" + + "github.com/gogo/protobuf/proto" +) + +// extractFile extracts a FileDescriptorProto from a gzip'd buffer. +func extractFile(gz []byte) (*FileDescriptorProto, error) { + r, err := gzip.NewReader(bytes.NewReader(gz)) + if err != nil { + return nil, fmt.Errorf("failed to open gzip reader: %v", err) + } + defer r.Close() + + b, err := ioutil.ReadAll(r) + if err != nil { + return nil, fmt.Errorf("failed to uncompress descriptor: %v", err) + } + + fd := new(FileDescriptorProto) + if err := proto.Unmarshal(b, fd); err != nil { + return nil, fmt.Errorf("malformed FileDescriptorProto: %v", err) + } + + return fd, nil +} + +// Message is a proto.Message with a method to return its descriptor. +// +// Message types generated by the protocol compiler always satisfy +// the Message interface. +type Message interface { + proto.Message + Descriptor() ([]byte, []int) +} + +// ForMessage returns a FileDescriptorProto and a DescriptorProto from within it +// describing the given message. +func ForMessage(msg Message) (fd *FileDescriptorProto, md *DescriptorProto) { + gz, path := msg.Descriptor() + fd, err := extractFile(gz) + if err != nil { + panic(fmt.Sprintf("invalid FileDescriptorProto for %T: %v", msg, err)) + } + + md = fd.MessageType[path[0]] + for _, i := range path[1:] { + md = md.NestedType[i] + } + return fd, md +} + +// Is this field a scalar numeric type? +func (field *FieldDescriptorProto) IsScalar() bool { + if field.Type == nil { + return false + } + switch *field.Type { + case FieldDescriptorProto_TYPE_DOUBLE, + FieldDescriptorProto_TYPE_FLOAT, + FieldDescriptorProto_TYPE_INT64, + FieldDescriptorProto_TYPE_UINT64, + FieldDescriptorProto_TYPE_INT32, + FieldDescriptorProto_TYPE_FIXED64, + FieldDescriptorProto_TYPE_FIXED32, + FieldDescriptorProto_TYPE_BOOL, + FieldDescriptorProto_TYPE_UINT32, + FieldDescriptorProto_TYPE_ENUM, + FieldDescriptorProto_TYPE_SFIXED32, + FieldDescriptorProto_TYPE_SFIXED64, + FieldDescriptorProto_TYPE_SINT32, + FieldDescriptorProto_TYPE_SINT64: + return true + default: + return false + } +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor.pb.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor.pb.go new file mode 100644 index 000000000..1427b0358 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor.pb.go @@ -0,0 +1,2088 @@ +// Code generated by protoc-gen-gogo. +// source: descriptor.proto +// DO NOT EDIT! + +/* +Package descriptor is a generated protocol buffer package. + +It is generated from these files: + descriptor.proto + +It has these top-level messages: + FileDescriptorSet + FileDescriptorProto + DescriptorProto + FieldDescriptorProto + OneofDescriptorProto + EnumDescriptorProto + EnumValueDescriptorProto + ServiceDescriptorProto + MethodDescriptorProto + FileOptions + MessageOptions + FieldOptions + OneofOptions + EnumOptions + EnumValueOptions + ServiceOptions + MethodOptions + UninterpretedOption + SourceCodeInfo + GeneratedCodeInfo +*/ +package descriptor + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type FieldDescriptorProto_Type int32 + +const ( + // 0 is reserved for errors. + // Order is weird for historical reasons. + FieldDescriptorProto_TYPE_DOUBLE FieldDescriptorProto_Type = 1 + FieldDescriptorProto_TYPE_FLOAT FieldDescriptorProto_Type = 2 + // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if + // negative values are likely. + FieldDescriptorProto_TYPE_INT64 FieldDescriptorProto_Type = 3 + FieldDescriptorProto_TYPE_UINT64 FieldDescriptorProto_Type = 4 + // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if + // negative values are likely. + FieldDescriptorProto_TYPE_INT32 FieldDescriptorProto_Type = 5 + FieldDescriptorProto_TYPE_FIXED64 FieldDescriptorProto_Type = 6 + FieldDescriptorProto_TYPE_FIXED32 FieldDescriptorProto_Type = 7 + FieldDescriptorProto_TYPE_BOOL FieldDescriptorProto_Type = 8 + FieldDescriptorProto_TYPE_STRING FieldDescriptorProto_Type = 9 + FieldDescriptorProto_TYPE_GROUP FieldDescriptorProto_Type = 10 + FieldDescriptorProto_TYPE_MESSAGE FieldDescriptorProto_Type = 11 + // New in version 2. + FieldDescriptorProto_TYPE_BYTES FieldDescriptorProto_Type = 12 + FieldDescriptorProto_TYPE_UINT32 FieldDescriptorProto_Type = 13 + FieldDescriptorProto_TYPE_ENUM FieldDescriptorProto_Type = 14 + FieldDescriptorProto_TYPE_SFIXED32 FieldDescriptorProto_Type = 15 + FieldDescriptorProto_TYPE_SFIXED64 FieldDescriptorProto_Type = 16 + FieldDescriptorProto_TYPE_SINT32 FieldDescriptorProto_Type = 17 + FieldDescriptorProto_TYPE_SINT64 FieldDescriptorProto_Type = 18 +) + +var FieldDescriptorProto_Type_name = map[int32]string{ + 1: "TYPE_DOUBLE", + 2: "TYPE_FLOAT", + 3: "TYPE_INT64", + 4: "TYPE_UINT64", + 5: "TYPE_INT32", + 6: "TYPE_FIXED64", + 7: "TYPE_FIXED32", + 8: "TYPE_BOOL", + 9: "TYPE_STRING", + 10: "TYPE_GROUP", + 11: "TYPE_MESSAGE", + 12: "TYPE_BYTES", + 13: "TYPE_UINT32", + 14: "TYPE_ENUM", + 15: "TYPE_SFIXED32", + 16: "TYPE_SFIXED64", + 17: "TYPE_SINT32", + 18: "TYPE_SINT64", +} +var FieldDescriptorProto_Type_value = map[string]int32{ + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18, +} + +func (x FieldDescriptorProto_Type) Enum() *FieldDescriptorProto_Type { + p := new(FieldDescriptorProto_Type) + *p = x + return p +} +func (x FieldDescriptorProto_Type) String() string { + return proto.EnumName(FieldDescriptorProto_Type_name, int32(x)) +} +func (x *FieldDescriptorProto_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FieldDescriptorProto_Type_value, data, "FieldDescriptorProto_Type") + if err != nil { + return err + } + *x = FieldDescriptorProto_Type(value) + return nil +} +func (FieldDescriptorProto_Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptorDescriptor, []int{3, 0} +} + +type FieldDescriptorProto_Label int32 + +const ( + // 0 is reserved for errors + FieldDescriptorProto_LABEL_OPTIONAL FieldDescriptorProto_Label = 1 + FieldDescriptorProto_LABEL_REQUIRED FieldDescriptorProto_Label = 2 + FieldDescriptorProto_LABEL_REPEATED FieldDescriptorProto_Label = 3 +) + +var FieldDescriptorProto_Label_name = map[int32]string{ + 1: "LABEL_OPTIONAL", + 2: "LABEL_REQUIRED", + 3: "LABEL_REPEATED", +} +var FieldDescriptorProto_Label_value = map[string]int32{ + "LABEL_OPTIONAL": 1, + "LABEL_REQUIRED": 2, + "LABEL_REPEATED": 3, +} + +func (x FieldDescriptorProto_Label) Enum() *FieldDescriptorProto_Label { + p := new(FieldDescriptorProto_Label) + *p = x + return p +} +func (x FieldDescriptorProto_Label) String() string { + return proto.EnumName(FieldDescriptorProto_Label_name, int32(x)) +} +func (x *FieldDescriptorProto_Label) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FieldDescriptorProto_Label_value, data, "FieldDescriptorProto_Label") + if err != nil { + return err + } + *x = FieldDescriptorProto_Label(value) + return nil +} +func (FieldDescriptorProto_Label) EnumDescriptor() ([]byte, []int) { + return fileDescriptorDescriptor, []int{3, 1} +} + +// Generated classes can be optimized for speed or code size. +type FileOptions_OptimizeMode int32 + +const ( + FileOptions_SPEED FileOptions_OptimizeMode = 1 + // etc. + FileOptions_CODE_SIZE FileOptions_OptimizeMode = 2 + FileOptions_LITE_RUNTIME FileOptions_OptimizeMode = 3 +) + +var FileOptions_OptimizeMode_name = map[int32]string{ + 1: "SPEED", + 2: "CODE_SIZE", + 3: "LITE_RUNTIME", +} +var FileOptions_OptimizeMode_value = map[string]int32{ + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3, +} + +func (x FileOptions_OptimizeMode) Enum() *FileOptions_OptimizeMode { + p := new(FileOptions_OptimizeMode) + *p = x + return p +} +func (x FileOptions_OptimizeMode) String() string { + return proto.EnumName(FileOptions_OptimizeMode_name, int32(x)) +} +func (x *FileOptions_OptimizeMode) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FileOptions_OptimizeMode_value, data, "FileOptions_OptimizeMode") + if err != nil { + return err + } + *x = FileOptions_OptimizeMode(value) + return nil +} +func (FileOptions_OptimizeMode) EnumDescriptor() ([]byte, []int) { + return fileDescriptorDescriptor, []int{9, 0} +} + +type FieldOptions_CType int32 + +const ( + // Default mode. + FieldOptions_STRING FieldOptions_CType = 0 + FieldOptions_CORD FieldOptions_CType = 1 + FieldOptions_STRING_PIECE FieldOptions_CType = 2 +) + +var FieldOptions_CType_name = map[int32]string{ + 0: "STRING", + 1: "CORD", + 2: "STRING_PIECE", +} +var FieldOptions_CType_value = map[string]int32{ + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2, +} + +func (x FieldOptions_CType) Enum() *FieldOptions_CType { + p := new(FieldOptions_CType) + *p = x + return p +} +func (x FieldOptions_CType) String() string { + return proto.EnumName(FieldOptions_CType_name, int32(x)) +} +func (x *FieldOptions_CType) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FieldOptions_CType_value, data, "FieldOptions_CType") + if err != nil { + return err + } + *x = FieldOptions_CType(value) + return nil +} +func (FieldOptions_CType) EnumDescriptor() ([]byte, []int) { + return fileDescriptorDescriptor, []int{11, 0} +} + +type FieldOptions_JSType int32 + +const ( + // Use the default type. + FieldOptions_JS_NORMAL FieldOptions_JSType = 0 + // Use JavaScript strings. + FieldOptions_JS_STRING FieldOptions_JSType = 1 + // Use JavaScript numbers. + FieldOptions_JS_NUMBER FieldOptions_JSType = 2 +) + +var FieldOptions_JSType_name = map[int32]string{ + 0: "JS_NORMAL", + 1: "JS_STRING", + 2: "JS_NUMBER", +} +var FieldOptions_JSType_value = map[string]int32{ + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2, +} + +func (x FieldOptions_JSType) Enum() *FieldOptions_JSType { + p := new(FieldOptions_JSType) + *p = x + return p +} +func (x FieldOptions_JSType) String() string { + return proto.EnumName(FieldOptions_JSType_name, int32(x)) +} +func (x *FieldOptions_JSType) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FieldOptions_JSType_value, data, "FieldOptions_JSType") + if err != nil { + return err + } + *x = FieldOptions_JSType(value) + return nil +} +func (FieldOptions_JSType) EnumDescriptor() ([]byte, []int) { + return fileDescriptorDescriptor, []int{11, 1} +} + +// The protocol compiler can output a FileDescriptorSet containing the .proto +// files it parses. +type FileDescriptorSet struct { + File []*FileDescriptorProto `protobuf:"bytes,1,rep,name=file" json:"file,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FileDescriptorSet) Reset() { *m = FileDescriptorSet{} } +func (m *FileDescriptorSet) String() string { return proto.CompactTextString(m) } +func (*FileDescriptorSet) ProtoMessage() {} +func (*FileDescriptorSet) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{0} } + +func (m *FileDescriptorSet) GetFile() []*FileDescriptorProto { + if m != nil { + return m.File + } + return nil +} + +// Describes a complete .proto file. +type FileDescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Package *string `protobuf:"bytes,2,opt,name=package" json:"package,omitempty"` + // Names of files imported by this file. + Dependency []string `protobuf:"bytes,3,rep,name=dependency" json:"dependency,omitempty"` + // Indexes of the public imported files in the dependency list above. + PublicDependency []int32 `protobuf:"varint,10,rep,name=public_dependency,json=publicDependency" json:"public_dependency,omitempty"` + // Indexes of the weak imported files in the dependency list. + // For Google-internal migration only. Do not use. + WeakDependency []int32 `protobuf:"varint,11,rep,name=weak_dependency,json=weakDependency" json:"weak_dependency,omitempty"` + // All top-level definitions in this file. + MessageType []*DescriptorProto `protobuf:"bytes,4,rep,name=message_type,json=messageType" json:"message_type,omitempty"` + EnumType []*EnumDescriptorProto `protobuf:"bytes,5,rep,name=enum_type,json=enumType" json:"enum_type,omitempty"` + Service []*ServiceDescriptorProto `protobuf:"bytes,6,rep,name=service" json:"service,omitempty"` + Extension []*FieldDescriptorProto `protobuf:"bytes,7,rep,name=extension" json:"extension,omitempty"` + Options *FileOptions `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"` + // This field contains optional information about the original source code. + // You may safely remove this entire field without harming runtime + // functionality of the descriptors -- the information is needed only by + // development tools. + SourceCodeInfo *SourceCodeInfo `protobuf:"bytes,9,opt,name=source_code_info,json=sourceCodeInfo" json:"source_code_info,omitempty"` + // The syntax of the proto file. + // The supported values are "proto2" and "proto3". + Syntax *string `protobuf:"bytes,12,opt,name=syntax" json:"syntax,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FileDescriptorProto) Reset() { *m = FileDescriptorProto{} } +func (m *FileDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*FileDescriptorProto) ProtoMessage() {} +func (*FileDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{1} } + +func (m *FileDescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *FileDescriptorProto) GetPackage() string { + if m != nil && m.Package != nil { + return *m.Package + } + return "" +} + +func (m *FileDescriptorProto) GetDependency() []string { + if m != nil { + return m.Dependency + } + return nil +} + +func (m *FileDescriptorProto) GetPublicDependency() []int32 { + if m != nil { + return m.PublicDependency + } + return nil +} + +func (m *FileDescriptorProto) GetWeakDependency() []int32 { + if m != nil { + return m.WeakDependency + } + return nil +} + +func (m *FileDescriptorProto) GetMessageType() []*DescriptorProto { + if m != nil { + return m.MessageType + } + return nil +} + +func (m *FileDescriptorProto) GetEnumType() []*EnumDescriptorProto { + if m != nil { + return m.EnumType + } + return nil +} + +func (m *FileDescriptorProto) GetService() []*ServiceDescriptorProto { + if m != nil { + return m.Service + } + return nil +} + +func (m *FileDescriptorProto) GetExtension() []*FieldDescriptorProto { + if m != nil { + return m.Extension + } + return nil +} + +func (m *FileDescriptorProto) GetOptions() *FileOptions { + if m != nil { + return m.Options + } + return nil +} + +func (m *FileDescriptorProto) GetSourceCodeInfo() *SourceCodeInfo { + if m != nil { + return m.SourceCodeInfo + } + return nil +} + +func (m *FileDescriptorProto) GetSyntax() string { + if m != nil && m.Syntax != nil { + return *m.Syntax + } + return "" +} + +// Describes a message type. +type DescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Field []*FieldDescriptorProto `protobuf:"bytes,2,rep,name=field" json:"field,omitempty"` + Extension []*FieldDescriptorProto `protobuf:"bytes,6,rep,name=extension" json:"extension,omitempty"` + NestedType []*DescriptorProto `protobuf:"bytes,3,rep,name=nested_type,json=nestedType" json:"nested_type,omitempty"` + EnumType []*EnumDescriptorProto `protobuf:"bytes,4,rep,name=enum_type,json=enumType" json:"enum_type,omitempty"` + ExtensionRange []*DescriptorProto_ExtensionRange `protobuf:"bytes,5,rep,name=extension_range,json=extensionRange" json:"extension_range,omitempty"` + OneofDecl []*OneofDescriptorProto `protobuf:"bytes,8,rep,name=oneof_decl,json=oneofDecl" json:"oneof_decl,omitempty"` + Options *MessageOptions `protobuf:"bytes,7,opt,name=options" json:"options,omitempty"` + ReservedRange []*DescriptorProto_ReservedRange `protobuf:"bytes,9,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"` + // Reserved field names, which may not be used by fields in the same message. + // A given name may only be reserved once. + ReservedName []string `protobuf:"bytes,10,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DescriptorProto) Reset() { *m = DescriptorProto{} } +func (m *DescriptorProto) String() string { return proto.CompactTextString(m) } +func (*DescriptorProto) ProtoMessage() {} +func (*DescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{2} } + +func (m *DescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *DescriptorProto) GetField() []*FieldDescriptorProto { + if m != nil { + return m.Field + } + return nil +} + +func (m *DescriptorProto) GetExtension() []*FieldDescriptorProto { + if m != nil { + return m.Extension + } + return nil +} + +func (m *DescriptorProto) GetNestedType() []*DescriptorProto { + if m != nil { + return m.NestedType + } + return nil +} + +func (m *DescriptorProto) GetEnumType() []*EnumDescriptorProto { + if m != nil { + return m.EnumType + } + return nil +} + +func (m *DescriptorProto) GetExtensionRange() []*DescriptorProto_ExtensionRange { + if m != nil { + return m.ExtensionRange + } + return nil +} + +func (m *DescriptorProto) GetOneofDecl() []*OneofDescriptorProto { + if m != nil { + return m.OneofDecl + } + return nil +} + +func (m *DescriptorProto) GetOptions() *MessageOptions { + if m != nil { + return m.Options + } + return nil +} + +func (m *DescriptorProto) GetReservedRange() []*DescriptorProto_ReservedRange { + if m != nil { + return m.ReservedRange + } + return nil +} + +func (m *DescriptorProto) GetReservedName() []string { + if m != nil { + return m.ReservedName + } + return nil +} + +type DescriptorProto_ExtensionRange struct { + Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` + End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DescriptorProto_ExtensionRange) Reset() { *m = DescriptorProto_ExtensionRange{} } +func (m *DescriptorProto_ExtensionRange) String() string { return proto.CompactTextString(m) } +func (*DescriptorProto_ExtensionRange) ProtoMessage() {} +func (*DescriptorProto_ExtensionRange) Descriptor() ([]byte, []int) { + return fileDescriptorDescriptor, []int{2, 0} +} + +func (m *DescriptorProto_ExtensionRange) GetStart() int32 { + if m != nil && m.Start != nil { + return *m.Start + } + return 0 +} + +func (m *DescriptorProto_ExtensionRange) GetEnd() int32 { + if m != nil && m.End != nil { + return *m.End + } + return 0 +} + +// Range of reserved tag numbers. Reserved tag numbers may not be used by +// fields or extension ranges in the same message. Reserved ranges may +// not overlap. +type DescriptorProto_ReservedRange struct { + Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` + End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DescriptorProto_ReservedRange) Reset() { *m = DescriptorProto_ReservedRange{} } +func (m *DescriptorProto_ReservedRange) String() string { return proto.CompactTextString(m) } +func (*DescriptorProto_ReservedRange) ProtoMessage() {} +func (*DescriptorProto_ReservedRange) Descriptor() ([]byte, []int) { + return fileDescriptorDescriptor, []int{2, 1} +} + +func (m *DescriptorProto_ReservedRange) GetStart() int32 { + if m != nil && m.Start != nil { + return *m.Start + } + return 0 +} + +func (m *DescriptorProto_ReservedRange) GetEnd() int32 { + if m != nil && m.End != nil { + return *m.End + } + return 0 +} + +// Describes a field within a message. +type FieldDescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Number *int32 `protobuf:"varint,3,opt,name=number" json:"number,omitempty"` + Label *FieldDescriptorProto_Label `protobuf:"varint,4,opt,name=label,enum=google.protobuf.FieldDescriptorProto_Label" json:"label,omitempty"` + // If type_name is set, this need not be set. If both this and type_name + // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. + Type *FieldDescriptorProto_Type `protobuf:"varint,5,opt,name=type,enum=google.protobuf.FieldDescriptorProto_Type" json:"type,omitempty"` + // For message and enum types, this is the name of the type. If the name + // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping + // rules are used to find the type (i.e. first the nested types within this + // message are searched, then within the parent, on up to the root + // namespace). + TypeName *string `protobuf:"bytes,6,opt,name=type_name,json=typeName" json:"type_name,omitempty"` + // For extensions, this is the name of the type being extended. It is + // resolved in the same manner as type_name. + Extendee *string `protobuf:"bytes,2,opt,name=extendee" json:"extendee,omitempty"` + // For numeric types, contains the original text representation of the value. + // For booleans, "true" or "false". + // For strings, contains the default text contents (not escaped in any way). + // For bytes, contains the C escaped value. All bytes >= 128 are escaped. + // TODO(kenton): Base-64 encode? + DefaultValue *string `protobuf:"bytes,7,opt,name=default_value,json=defaultValue" json:"default_value,omitempty"` + // If set, gives the index of a oneof in the containing type's oneof_decl + // list. This field is a member of that oneof. + OneofIndex *int32 `protobuf:"varint,9,opt,name=oneof_index,json=oneofIndex" json:"oneof_index,omitempty"` + // JSON name of this field. The value is set by protocol compiler. If the + // user has set a "json_name" option on this field, that option's value + // will be used. Otherwise, it's deduced from the field's name by converting + // it to camelCase. + JsonName *string `protobuf:"bytes,10,opt,name=json_name,json=jsonName" json:"json_name,omitempty"` + Options *FieldOptions `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FieldDescriptorProto) Reset() { *m = FieldDescriptorProto{} } +func (m *FieldDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*FieldDescriptorProto) ProtoMessage() {} +func (*FieldDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{3} } + +func (m *FieldDescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *FieldDescriptorProto) GetNumber() int32 { + if m != nil && m.Number != nil { + return *m.Number + } + return 0 +} + +func (m *FieldDescriptorProto) GetLabel() FieldDescriptorProto_Label { + if m != nil && m.Label != nil { + return *m.Label + } + return FieldDescriptorProto_LABEL_OPTIONAL +} + +func (m *FieldDescriptorProto) GetType() FieldDescriptorProto_Type { + if m != nil && m.Type != nil { + return *m.Type + } + return FieldDescriptorProto_TYPE_DOUBLE +} + +func (m *FieldDescriptorProto) GetTypeName() string { + if m != nil && m.TypeName != nil { + return *m.TypeName + } + return "" +} + +func (m *FieldDescriptorProto) GetExtendee() string { + if m != nil && m.Extendee != nil { + return *m.Extendee + } + return "" +} + +func (m *FieldDescriptorProto) GetDefaultValue() string { + if m != nil && m.DefaultValue != nil { + return *m.DefaultValue + } + return "" +} + +func (m *FieldDescriptorProto) GetOneofIndex() int32 { + if m != nil && m.OneofIndex != nil { + return *m.OneofIndex + } + return 0 +} + +func (m *FieldDescriptorProto) GetJsonName() string { + if m != nil && m.JsonName != nil { + return *m.JsonName + } + return "" +} + +func (m *FieldDescriptorProto) GetOptions() *FieldOptions { + if m != nil { + return m.Options + } + return nil +} + +// Describes a oneof. +type OneofDescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Options *OneofOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OneofDescriptorProto) Reset() { *m = OneofDescriptorProto{} } +func (m *OneofDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*OneofDescriptorProto) ProtoMessage() {} +func (*OneofDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{4} } + +func (m *OneofDescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *OneofDescriptorProto) GetOptions() *OneofOptions { + if m != nil { + return m.Options + } + return nil +} + +// Describes an enum type. +type EnumDescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Value []*EnumValueDescriptorProto `protobuf:"bytes,2,rep,name=value" json:"value,omitempty"` + Options *EnumOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *EnumDescriptorProto) Reset() { *m = EnumDescriptorProto{} } +func (m *EnumDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*EnumDescriptorProto) ProtoMessage() {} +func (*EnumDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{5} } + +func (m *EnumDescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *EnumDescriptorProto) GetValue() []*EnumValueDescriptorProto { + if m != nil { + return m.Value + } + return nil +} + +func (m *EnumDescriptorProto) GetOptions() *EnumOptions { + if m != nil { + return m.Options + } + return nil +} + +// Describes a value within an enum. +type EnumValueDescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Number *int32 `protobuf:"varint,2,opt,name=number" json:"number,omitempty"` + Options *EnumValueOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *EnumValueDescriptorProto) Reset() { *m = EnumValueDescriptorProto{} } +func (m *EnumValueDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*EnumValueDescriptorProto) ProtoMessage() {} +func (*EnumValueDescriptorProto) Descriptor() ([]byte, []int) { + return fileDescriptorDescriptor, []int{6} +} + +func (m *EnumValueDescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *EnumValueDescriptorProto) GetNumber() int32 { + if m != nil && m.Number != nil { + return *m.Number + } + return 0 +} + +func (m *EnumValueDescriptorProto) GetOptions() *EnumValueOptions { + if m != nil { + return m.Options + } + return nil +} + +// Describes a service. +type ServiceDescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Method []*MethodDescriptorProto `protobuf:"bytes,2,rep,name=method" json:"method,omitempty"` + Options *ServiceOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ServiceDescriptorProto) Reset() { *m = ServiceDescriptorProto{} } +func (m *ServiceDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*ServiceDescriptorProto) ProtoMessage() {} +func (*ServiceDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{7} } + +func (m *ServiceDescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *ServiceDescriptorProto) GetMethod() []*MethodDescriptorProto { + if m != nil { + return m.Method + } + return nil +} + +func (m *ServiceDescriptorProto) GetOptions() *ServiceOptions { + if m != nil { + return m.Options + } + return nil +} + +// Describes a method of a service. +type MethodDescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Input and output type names. These are resolved in the same way as + // FieldDescriptorProto.type_name, but must refer to a message type. + InputType *string `protobuf:"bytes,2,opt,name=input_type,json=inputType" json:"input_type,omitempty"` + OutputType *string `protobuf:"bytes,3,opt,name=output_type,json=outputType" json:"output_type,omitempty"` + Options *MethodOptions `protobuf:"bytes,4,opt,name=options" json:"options,omitempty"` + // Identifies if client streams multiple client messages + ClientStreaming *bool `protobuf:"varint,5,opt,name=client_streaming,json=clientStreaming,def=0" json:"client_streaming,omitempty"` + // Identifies if server streams multiple server messages + ServerStreaming *bool `protobuf:"varint,6,opt,name=server_streaming,json=serverStreaming,def=0" json:"server_streaming,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MethodDescriptorProto) Reset() { *m = MethodDescriptorProto{} } +func (m *MethodDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*MethodDescriptorProto) ProtoMessage() {} +func (*MethodDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{8} } + +const Default_MethodDescriptorProto_ClientStreaming bool = false +const Default_MethodDescriptorProto_ServerStreaming bool = false + +func (m *MethodDescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *MethodDescriptorProto) GetInputType() string { + if m != nil && m.InputType != nil { + return *m.InputType + } + return "" +} + +func (m *MethodDescriptorProto) GetOutputType() string { + if m != nil && m.OutputType != nil { + return *m.OutputType + } + return "" +} + +func (m *MethodDescriptorProto) GetOptions() *MethodOptions { + if m != nil { + return m.Options + } + return nil +} + +func (m *MethodDescriptorProto) GetClientStreaming() bool { + if m != nil && m.ClientStreaming != nil { + return *m.ClientStreaming + } + return Default_MethodDescriptorProto_ClientStreaming +} + +func (m *MethodDescriptorProto) GetServerStreaming() bool { + if m != nil && m.ServerStreaming != nil { + return *m.ServerStreaming + } + return Default_MethodDescriptorProto_ServerStreaming +} + +type FileOptions struct { + // Sets the Java package where classes generated from this .proto will be + // placed. By default, the proto package is used, but this is often + // inappropriate because proto packages do not normally start with backwards + // domain names. + JavaPackage *string `protobuf:"bytes,1,opt,name=java_package,json=javaPackage" json:"java_package,omitempty"` + // If set, all the classes from the .proto file are wrapped in a single + // outer class with the given name. This applies to both Proto1 + // (equivalent to the old "--one_java_file" option) and Proto2 (where + // a .proto always translates to a single class, but you may want to + // explicitly choose the class name). + JavaOuterClassname *string `protobuf:"bytes,8,opt,name=java_outer_classname,json=javaOuterClassname" json:"java_outer_classname,omitempty"` + // If set true, then the Java code generator will generate a separate .java + // file for each top-level message, enum, and service defined in the .proto + // file. Thus, these types will *not* be nested inside the outer class + // named by java_outer_classname. However, the outer class will still be + // generated to contain the file's getDescriptor() method as well as any + // top-level extensions defined in the file. + JavaMultipleFiles *bool `protobuf:"varint,10,opt,name=java_multiple_files,json=javaMultipleFiles,def=0" json:"java_multiple_files,omitempty"` + // If set true, then the Java code generator will generate equals() and + // hashCode() methods for all messages defined in the .proto file. + // This increases generated code size, potentially substantially for large + // protos, which may harm a memory-constrained application. + // - In the full runtime this is a speed optimization, as the + // AbstractMessage base class includes reflection-based implementations of + // these methods. + // - In the lite runtime, setting this option changes the semantics of + // equals() and hashCode() to more closely match those of the full runtime; + // the generated methods compute their results based on field values rather + // than object identity. (Implementations should not assume that hashcodes + // will be consistent across runtimes or versions of the protocol compiler.) + JavaGenerateEqualsAndHash *bool `protobuf:"varint,20,opt,name=java_generate_equals_and_hash,json=javaGenerateEqualsAndHash,def=0" json:"java_generate_equals_and_hash,omitempty"` + // If set true, then the Java2 code generator will generate code that + // throws an exception whenever an attempt is made to assign a non-UTF-8 + // byte sequence to a string field. + // Message reflection will do the same. + // However, an extension field still accepts non-UTF-8 byte sequences. + // This option has no effect on when used with the lite runtime. + JavaStringCheckUtf8 *bool `protobuf:"varint,27,opt,name=java_string_check_utf8,json=javaStringCheckUtf8,def=0" json:"java_string_check_utf8,omitempty"` + OptimizeFor *FileOptions_OptimizeMode `protobuf:"varint,9,opt,name=optimize_for,json=optimizeFor,enum=google.protobuf.FileOptions_OptimizeMode,def=1" json:"optimize_for,omitempty"` + // Sets the Go package where structs generated from this .proto will be + // placed. If omitted, the Go package will be derived from the following: + // - The basename of the package import path, if provided. + // - Otherwise, the package statement in the .proto file, if present. + // - Otherwise, the basename of the .proto file, without extension. + GoPackage *string `protobuf:"bytes,11,opt,name=go_package,json=goPackage" json:"go_package,omitempty"` + // Should generic services be generated in each language? "Generic" services + // are not specific to any particular RPC system. They are generated by the + // main code generators in each language (without additional plugins). + // Generic services were the only kind of service generation supported by + // early versions of google.protobuf. + // + // Generic services are now considered deprecated in favor of using plugins + // that generate code specific to your particular RPC system. Therefore, + // these default to false. Old code which depends on generic services should + // explicitly set them to true. + CcGenericServices *bool `protobuf:"varint,16,opt,name=cc_generic_services,json=ccGenericServices,def=0" json:"cc_generic_services,omitempty"` + JavaGenericServices *bool `protobuf:"varint,17,opt,name=java_generic_services,json=javaGenericServices,def=0" json:"java_generic_services,omitempty"` + PyGenericServices *bool `protobuf:"varint,18,opt,name=py_generic_services,json=pyGenericServices,def=0" json:"py_generic_services,omitempty"` + // Is this file deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for everything in the file, or it will be completely ignored; in the very + // least, this is a formalization for deprecating files. + Deprecated *bool `protobuf:"varint,23,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // Enables the use of arenas for the proto messages in this file. This applies + // only to generated classes for C++. + CcEnableArenas *bool `protobuf:"varint,31,opt,name=cc_enable_arenas,json=ccEnableArenas,def=0" json:"cc_enable_arenas,omitempty"` + // Sets the objective c class prefix which is prepended to all objective c + // generated classes from this .proto. There is no default. + ObjcClassPrefix *string `protobuf:"bytes,36,opt,name=objc_class_prefix,json=objcClassPrefix" json:"objc_class_prefix,omitempty"` + // Namespace for generated classes; defaults to the package. + CsharpNamespace *string `protobuf:"bytes,37,opt,name=csharp_namespace,json=csharpNamespace" json:"csharp_namespace,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FileOptions) Reset() { *m = FileOptions{} } +func (m *FileOptions) String() string { return proto.CompactTextString(m) } +func (*FileOptions) ProtoMessage() {} +func (*FileOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{9} } + +var extRange_FileOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*FileOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_FileOptions +} + +const Default_FileOptions_JavaMultipleFiles bool = false +const Default_FileOptions_JavaGenerateEqualsAndHash bool = false +const Default_FileOptions_JavaStringCheckUtf8 bool = false +const Default_FileOptions_OptimizeFor FileOptions_OptimizeMode = FileOptions_SPEED +const Default_FileOptions_CcGenericServices bool = false +const Default_FileOptions_JavaGenericServices bool = false +const Default_FileOptions_PyGenericServices bool = false +const Default_FileOptions_Deprecated bool = false +const Default_FileOptions_CcEnableArenas bool = false + +func (m *FileOptions) GetJavaPackage() string { + if m != nil && m.JavaPackage != nil { + return *m.JavaPackage + } + return "" +} + +func (m *FileOptions) GetJavaOuterClassname() string { + if m != nil && m.JavaOuterClassname != nil { + return *m.JavaOuterClassname + } + return "" +} + +func (m *FileOptions) GetJavaMultipleFiles() bool { + if m != nil && m.JavaMultipleFiles != nil { + return *m.JavaMultipleFiles + } + return Default_FileOptions_JavaMultipleFiles +} + +func (m *FileOptions) GetJavaGenerateEqualsAndHash() bool { + if m != nil && m.JavaGenerateEqualsAndHash != nil { + return *m.JavaGenerateEqualsAndHash + } + return Default_FileOptions_JavaGenerateEqualsAndHash +} + +func (m *FileOptions) GetJavaStringCheckUtf8() bool { + if m != nil && m.JavaStringCheckUtf8 != nil { + return *m.JavaStringCheckUtf8 + } + return Default_FileOptions_JavaStringCheckUtf8 +} + +func (m *FileOptions) GetOptimizeFor() FileOptions_OptimizeMode { + if m != nil && m.OptimizeFor != nil { + return *m.OptimizeFor + } + return Default_FileOptions_OptimizeFor +} + +func (m *FileOptions) GetGoPackage() string { + if m != nil && m.GoPackage != nil { + return *m.GoPackage + } + return "" +} + +func (m *FileOptions) GetCcGenericServices() bool { + if m != nil && m.CcGenericServices != nil { + return *m.CcGenericServices + } + return Default_FileOptions_CcGenericServices +} + +func (m *FileOptions) GetJavaGenericServices() bool { + if m != nil && m.JavaGenericServices != nil { + return *m.JavaGenericServices + } + return Default_FileOptions_JavaGenericServices +} + +func (m *FileOptions) GetPyGenericServices() bool { + if m != nil && m.PyGenericServices != nil { + return *m.PyGenericServices + } + return Default_FileOptions_PyGenericServices +} + +func (m *FileOptions) GetDeprecated() bool { + if m != nil && m.Deprecated != nil { + return *m.Deprecated + } + return Default_FileOptions_Deprecated +} + +func (m *FileOptions) GetCcEnableArenas() bool { + if m != nil && m.CcEnableArenas != nil { + return *m.CcEnableArenas + } + return Default_FileOptions_CcEnableArenas +} + +func (m *FileOptions) GetObjcClassPrefix() string { + if m != nil && m.ObjcClassPrefix != nil { + return *m.ObjcClassPrefix + } + return "" +} + +func (m *FileOptions) GetCsharpNamespace() string { + if m != nil && m.CsharpNamespace != nil { + return *m.CsharpNamespace + } + return "" +} + +func (m *FileOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +type MessageOptions struct { + // Set true to use the old proto1 MessageSet wire format for extensions. + // This is provided for backwards-compatibility with the MessageSet wire + // format. You should not use this for any other reason: It's less + // efficient, has fewer features, and is more complicated. + // + // The message must be defined exactly as follows: + // message Foo { + // option message_set_wire_format = true; + // extensions 4 to max; + // } + // Note that the message cannot have any defined fields; MessageSets only + // have extensions. + // + // All extensions of your type must be singular messages; e.g. they cannot + // be int32s, enums, or repeated messages. + // + // Because this is an option, the above two restrictions are not enforced by + // the protocol compiler. + MessageSetWireFormat *bool `protobuf:"varint,1,opt,name=message_set_wire_format,json=messageSetWireFormat,def=0" json:"message_set_wire_format,omitempty"` + // Disables the generation of the standard "descriptor()" accessor, which can + // conflict with a field of the same name. This is meant to make migration + // from proto1 easier; new code should avoid fields named "descriptor". + NoStandardDescriptorAccessor *bool `protobuf:"varint,2,opt,name=no_standard_descriptor_accessor,json=noStandardDescriptorAccessor,def=0" json:"no_standard_descriptor_accessor,omitempty"` + // Is this message deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the message, or it will be completely ignored; in the very least, + // this is a formalization for deprecating messages. + Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // Whether the message is an automatically generated map entry type for the + // maps field. + // + // For maps fields: + // map map_field = 1; + // The parsed descriptor looks like: + // message MapFieldEntry { + // option map_entry = true; + // optional KeyType key = 1; + // optional ValueType value = 2; + // } + // repeated MapFieldEntry map_field = 1; + // + // Implementations may choose not to generate the map_entry=true message, but + // use a native map in the target language to hold the keys and values. + // The reflection APIs in such implementions still need to work as + // if the field is a repeated message field. + // + // NOTE: Do not set the option in .proto files. Always use the maps syntax + // instead. The option should only be implicitly set by the proto compiler + // parser. + MapEntry *bool `protobuf:"varint,7,opt,name=map_entry,json=mapEntry" json:"map_entry,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MessageOptions) Reset() { *m = MessageOptions{} } +func (m *MessageOptions) String() string { return proto.CompactTextString(m) } +func (*MessageOptions) ProtoMessage() {} +func (*MessageOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{10} } + +var extRange_MessageOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*MessageOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MessageOptions +} + +const Default_MessageOptions_MessageSetWireFormat bool = false +const Default_MessageOptions_NoStandardDescriptorAccessor bool = false +const Default_MessageOptions_Deprecated bool = false + +func (m *MessageOptions) GetMessageSetWireFormat() bool { + if m != nil && m.MessageSetWireFormat != nil { + return *m.MessageSetWireFormat + } + return Default_MessageOptions_MessageSetWireFormat +} + +func (m *MessageOptions) GetNoStandardDescriptorAccessor() bool { + if m != nil && m.NoStandardDescriptorAccessor != nil { + return *m.NoStandardDescriptorAccessor + } + return Default_MessageOptions_NoStandardDescriptorAccessor +} + +func (m *MessageOptions) GetDeprecated() bool { + if m != nil && m.Deprecated != nil { + return *m.Deprecated + } + return Default_MessageOptions_Deprecated +} + +func (m *MessageOptions) GetMapEntry() bool { + if m != nil && m.MapEntry != nil { + return *m.MapEntry + } + return false +} + +func (m *MessageOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +type FieldOptions struct { + // The ctype option instructs the C++ code generator to use a different + // representation of the field than it normally would. See the specific + // options below. This option is not yet implemented in the open source + // release -- sorry, we'll try to include it in a future version! + Ctype *FieldOptions_CType `protobuf:"varint,1,opt,name=ctype,enum=google.protobuf.FieldOptions_CType,def=0" json:"ctype,omitempty"` + // The packed option can be enabled for repeated primitive fields to enable + // a more efficient representation on the wire. Rather than repeatedly + // writing the tag and type for each element, the entire array is encoded as + // a single length-delimited blob. In proto3, only explicit setting it to + // false will avoid using packed encoding. + Packed *bool `protobuf:"varint,2,opt,name=packed" json:"packed,omitempty"` + // The jstype option determines the JavaScript type used for values of the + // field. The option is permitted only for 64 bit integral and fixed types + // (int64, uint64, sint64, fixed64, sfixed64). By default these types are + // represented as JavaScript strings. This avoids loss of precision that can + // happen when a large value is converted to a floating point JavaScript + // numbers. Specifying JS_NUMBER for the jstype causes the generated + // JavaScript code to use the JavaScript "number" type instead of strings. + // This option is an enum to permit additional types to be added, + // e.g. goog.math.Integer. + Jstype *FieldOptions_JSType `protobuf:"varint,6,opt,name=jstype,enum=google.protobuf.FieldOptions_JSType,def=0" json:"jstype,omitempty"` + // Should this field be parsed lazily? Lazy applies only to message-type + // fields. It means that when the outer message is initially parsed, the + // inner message's contents will not be parsed but instead stored in encoded + // form. The inner message will actually be parsed when it is first accessed. + // + // This is only a hint. Implementations are free to choose whether to use + // eager or lazy parsing regardless of the value of this option. However, + // setting this option true suggests that the protocol author believes that + // using lazy parsing on this field is worth the additional bookkeeping + // overhead typically needed to implement it. + // + // This option does not affect the public interface of any generated code; + // all method signatures remain the same. Furthermore, thread-safety of the + // interface is not affected by this option; const methods remain safe to + // call from multiple threads concurrently, while non-const methods continue + // to require exclusive access. + // + // + // Note that implementations may choose not to check required fields within + // a lazy sub-message. That is, calling IsInitialized() on the outher message + // may return true even if the inner message has missing required fields. + // This is necessary because otherwise the inner message would have to be + // parsed in order to perform the check, defeating the purpose of lazy + // parsing. An implementation which chooses not to check required fields + // must be consistent about it. That is, for any particular sub-message, the + // implementation must either *always* check its required fields, or *never* + // check its required fields, regardless of whether or not the message has + // been parsed. + Lazy *bool `protobuf:"varint,5,opt,name=lazy,def=0" json:"lazy,omitempty"` + // Is this field deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for accessors, or it will be completely ignored; in the very least, this + // is a formalization for deprecating fields. + Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // For Google-internal migration only. Do not use. + Weak *bool `protobuf:"varint,10,opt,name=weak,def=0" json:"weak,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FieldOptions) Reset() { *m = FieldOptions{} } +func (m *FieldOptions) String() string { return proto.CompactTextString(m) } +func (*FieldOptions) ProtoMessage() {} +func (*FieldOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{11} } + +var extRange_FieldOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*FieldOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_FieldOptions +} + +const Default_FieldOptions_Ctype FieldOptions_CType = FieldOptions_STRING +const Default_FieldOptions_Jstype FieldOptions_JSType = FieldOptions_JS_NORMAL +const Default_FieldOptions_Lazy bool = false +const Default_FieldOptions_Deprecated bool = false +const Default_FieldOptions_Weak bool = false + +func (m *FieldOptions) GetCtype() FieldOptions_CType { + if m != nil && m.Ctype != nil { + return *m.Ctype + } + return Default_FieldOptions_Ctype +} + +func (m *FieldOptions) GetPacked() bool { + if m != nil && m.Packed != nil { + return *m.Packed + } + return false +} + +func (m *FieldOptions) GetJstype() FieldOptions_JSType { + if m != nil && m.Jstype != nil { + return *m.Jstype + } + return Default_FieldOptions_Jstype +} + +func (m *FieldOptions) GetLazy() bool { + if m != nil && m.Lazy != nil { + return *m.Lazy + } + return Default_FieldOptions_Lazy +} + +func (m *FieldOptions) GetDeprecated() bool { + if m != nil && m.Deprecated != nil { + return *m.Deprecated + } + return Default_FieldOptions_Deprecated +} + +func (m *FieldOptions) GetWeak() bool { + if m != nil && m.Weak != nil { + return *m.Weak + } + return Default_FieldOptions_Weak +} + +func (m *FieldOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +type OneofOptions struct { + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OneofOptions) Reset() { *m = OneofOptions{} } +func (m *OneofOptions) String() string { return proto.CompactTextString(m) } +func (*OneofOptions) ProtoMessage() {} +func (*OneofOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{12} } + +var extRange_OneofOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*OneofOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OneofOptions +} + +func (m *OneofOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +type EnumOptions struct { + // Set this option to true to allow mapping different tag names to the same + // value. + AllowAlias *bool `protobuf:"varint,2,opt,name=allow_alias,json=allowAlias" json:"allow_alias,omitempty"` + // Is this enum deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the enum, or it will be completely ignored; in the very least, this + // is a formalization for deprecating enums. + Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *EnumOptions) Reset() { *m = EnumOptions{} } +func (m *EnumOptions) String() string { return proto.CompactTextString(m) } +func (*EnumOptions) ProtoMessage() {} +func (*EnumOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{13} } + +var extRange_EnumOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*EnumOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_EnumOptions +} + +const Default_EnumOptions_Deprecated bool = false + +func (m *EnumOptions) GetAllowAlias() bool { + if m != nil && m.AllowAlias != nil { + return *m.AllowAlias + } + return false +} + +func (m *EnumOptions) GetDeprecated() bool { + if m != nil && m.Deprecated != nil { + return *m.Deprecated + } + return Default_EnumOptions_Deprecated +} + +func (m *EnumOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +type EnumValueOptions struct { + // Is this enum value deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the enum value, or it will be completely ignored; in the very least, + // this is a formalization for deprecating enum values. + Deprecated *bool `protobuf:"varint,1,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *EnumValueOptions) Reset() { *m = EnumValueOptions{} } +func (m *EnumValueOptions) String() string { return proto.CompactTextString(m) } +func (*EnumValueOptions) ProtoMessage() {} +func (*EnumValueOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{14} } + +var extRange_EnumValueOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*EnumValueOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_EnumValueOptions +} + +const Default_EnumValueOptions_Deprecated bool = false + +func (m *EnumValueOptions) GetDeprecated() bool { + if m != nil && m.Deprecated != nil { + return *m.Deprecated + } + return Default_EnumValueOptions_Deprecated +} + +func (m *EnumValueOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +type ServiceOptions struct { + // Is this service deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the service, or it will be completely ignored; in the very least, + // this is a formalization for deprecating services. + Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ServiceOptions) Reset() { *m = ServiceOptions{} } +func (m *ServiceOptions) String() string { return proto.CompactTextString(m) } +func (*ServiceOptions) ProtoMessage() {} +func (*ServiceOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{15} } + +var extRange_ServiceOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*ServiceOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_ServiceOptions +} + +const Default_ServiceOptions_Deprecated bool = false + +func (m *ServiceOptions) GetDeprecated() bool { + if m != nil && m.Deprecated != nil { + return *m.Deprecated + } + return Default_ServiceOptions_Deprecated +} + +func (m *ServiceOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +type MethodOptions struct { + // Is this method deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the method, or it will be completely ignored; in the very least, + // this is a formalization for deprecating methods. + Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MethodOptions) Reset() { *m = MethodOptions{} } +func (m *MethodOptions) String() string { return proto.CompactTextString(m) } +func (*MethodOptions) ProtoMessage() {} +func (*MethodOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{16} } + +var extRange_MethodOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*MethodOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MethodOptions +} + +const Default_MethodOptions_Deprecated bool = false + +func (m *MethodOptions) GetDeprecated() bool { + if m != nil && m.Deprecated != nil { + return *m.Deprecated + } + return Default_MethodOptions_Deprecated +} + +func (m *MethodOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +// A message representing a option the parser does not recognize. This only +// appears in options protos created by the compiler::Parser class. +// DescriptorPool resolves these when building Descriptor objects. Therefore, +// options protos in descriptor objects (e.g. returned by Descriptor::options(), +// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions +// in them. +type UninterpretedOption struct { + Name []*UninterpretedOption_NamePart `protobuf:"bytes,2,rep,name=name" json:"name,omitempty"` + // The value of the uninterpreted option, in whatever type the tokenizer + // identified it as during parsing. Exactly one of these should be set. + IdentifierValue *string `protobuf:"bytes,3,opt,name=identifier_value,json=identifierValue" json:"identifier_value,omitempty"` + PositiveIntValue *uint64 `protobuf:"varint,4,opt,name=positive_int_value,json=positiveIntValue" json:"positive_int_value,omitempty"` + NegativeIntValue *int64 `protobuf:"varint,5,opt,name=negative_int_value,json=negativeIntValue" json:"negative_int_value,omitempty"` + DoubleValue *float64 `protobuf:"fixed64,6,opt,name=double_value,json=doubleValue" json:"double_value,omitempty"` + StringValue []byte `protobuf:"bytes,7,opt,name=string_value,json=stringValue" json:"string_value,omitempty"` + AggregateValue *string `protobuf:"bytes,8,opt,name=aggregate_value,json=aggregateValue" json:"aggregate_value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UninterpretedOption) Reset() { *m = UninterpretedOption{} } +func (m *UninterpretedOption) String() string { return proto.CompactTextString(m) } +func (*UninterpretedOption) ProtoMessage() {} +func (*UninterpretedOption) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{17} } + +func (m *UninterpretedOption) GetName() []*UninterpretedOption_NamePart { + if m != nil { + return m.Name + } + return nil +} + +func (m *UninterpretedOption) GetIdentifierValue() string { + if m != nil && m.IdentifierValue != nil { + return *m.IdentifierValue + } + return "" +} + +func (m *UninterpretedOption) GetPositiveIntValue() uint64 { + if m != nil && m.PositiveIntValue != nil { + return *m.PositiveIntValue + } + return 0 +} + +func (m *UninterpretedOption) GetNegativeIntValue() int64 { + if m != nil && m.NegativeIntValue != nil { + return *m.NegativeIntValue + } + return 0 +} + +func (m *UninterpretedOption) GetDoubleValue() float64 { + if m != nil && m.DoubleValue != nil { + return *m.DoubleValue + } + return 0 +} + +func (m *UninterpretedOption) GetStringValue() []byte { + if m != nil { + return m.StringValue + } + return nil +} + +func (m *UninterpretedOption) GetAggregateValue() string { + if m != nil && m.AggregateValue != nil { + return *m.AggregateValue + } + return "" +} + +// The name of the uninterpreted option. Each string represents a segment in +// a dot-separated name. is_extension is true iff a segment represents an +// extension (denoted with parentheses in options specs in .proto files). +// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents +// "foo.(bar.baz).qux". +type UninterpretedOption_NamePart struct { + NamePart *string `protobuf:"bytes,1,req,name=name_part,json=namePart" json:"name_part,omitempty"` + IsExtension *bool `protobuf:"varint,2,req,name=is_extension,json=isExtension" json:"is_extension,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UninterpretedOption_NamePart) Reset() { *m = UninterpretedOption_NamePart{} } +func (m *UninterpretedOption_NamePart) String() string { return proto.CompactTextString(m) } +func (*UninterpretedOption_NamePart) ProtoMessage() {} +func (*UninterpretedOption_NamePart) Descriptor() ([]byte, []int) { + return fileDescriptorDescriptor, []int{17, 0} +} + +func (m *UninterpretedOption_NamePart) GetNamePart() string { + if m != nil && m.NamePart != nil { + return *m.NamePart + } + return "" +} + +func (m *UninterpretedOption_NamePart) GetIsExtension() bool { + if m != nil && m.IsExtension != nil { + return *m.IsExtension + } + return false +} + +// Encapsulates information about the original source file from which a +// FileDescriptorProto was generated. +type SourceCodeInfo struct { + // A Location identifies a piece of source code in a .proto file which + // corresponds to a particular definition. This information is intended + // to be useful to IDEs, code indexers, documentation generators, and similar + // tools. + // + // For example, say we have a file like: + // message Foo { + // optional string foo = 1; + // } + // Let's look at just the field definition: + // optional string foo = 1; + // ^ ^^ ^^ ^ ^^^ + // a bc de f ghi + // We have the following locations: + // span path represents + // [a,i) [ 4, 0, 2, 0 ] The whole field definition. + // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). + // [c,d) [ 4, 0, 2, 0, 5 ] The type (string). + // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). + // [g,h) [ 4, 0, 2, 0, 3 ] The number (1). + // + // Notes: + // - A location may refer to a repeated field itself (i.e. not to any + // particular index within it). This is used whenever a set of elements are + // logically enclosed in a single code segment. For example, an entire + // extend block (possibly containing multiple extension definitions) will + // have an outer location whose path refers to the "extensions" repeated + // field without an index. + // - Multiple locations may have the same path. This happens when a single + // logical declaration is spread out across multiple places. The most + // obvious example is the "extend" block again -- there may be multiple + // extend blocks in the same scope, each of which will have the same path. + // - A location's span is not always a subset of its parent's span. For + // example, the "extendee" of an extension declaration appears at the + // beginning of the "extend" block and is shared by all extensions within + // the block. + // - Just because a location's span is a subset of some other location's span + // does not mean that it is a descendent. For example, a "group" defines + // both a type and a field in a single declaration. Thus, the locations + // corresponding to the type and field and their components will overlap. + // - Code which tries to interpret locations should probably be designed to + // ignore those that it doesn't understand, as more types of locations could + // be recorded in the future. + Location []*SourceCodeInfo_Location `protobuf:"bytes,1,rep,name=location" json:"location,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SourceCodeInfo) Reset() { *m = SourceCodeInfo{} } +func (m *SourceCodeInfo) String() string { return proto.CompactTextString(m) } +func (*SourceCodeInfo) ProtoMessage() {} +func (*SourceCodeInfo) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{18} } + +func (m *SourceCodeInfo) GetLocation() []*SourceCodeInfo_Location { + if m != nil { + return m.Location + } + return nil +} + +type SourceCodeInfo_Location struct { + // Identifies which part of the FileDescriptorProto was defined at this + // location. + // + // Each element is a field number or an index. They form a path from + // the root FileDescriptorProto to the place where the definition. For + // example, this path: + // [ 4, 3, 2, 7, 1 ] + // refers to: + // file.message_type(3) // 4, 3 + // .field(7) // 2, 7 + // .name() // 1 + // This is because FileDescriptorProto.message_type has field number 4: + // repeated DescriptorProto message_type = 4; + // and DescriptorProto.field has field number 2: + // repeated FieldDescriptorProto field = 2; + // and FieldDescriptorProto.name has field number 1: + // optional string name = 1; + // + // Thus, the above path gives the location of a field name. If we removed + // the last element: + // [ 4, 3, 2, 7 ] + // this path refers to the whole field declaration (from the beginning + // of the label to the terminating semicolon). + Path []int32 `protobuf:"varint,1,rep,packed,name=path" json:"path,omitempty"` + // Always has exactly three or four elements: start line, start column, + // end line (optional, otherwise assumed same as start line), end column. + // These are packed into a single field for efficiency. Note that line + // and column numbers are zero-based -- typically you will want to add + // 1 to each before displaying to a user. + Span []int32 `protobuf:"varint,2,rep,packed,name=span" json:"span,omitempty"` + // If this SourceCodeInfo represents a complete declaration, these are any + // comments appearing before and after the declaration which appear to be + // attached to the declaration. + // + // A series of line comments appearing on consecutive lines, with no other + // tokens appearing on those lines, will be treated as a single comment. + // + // leading_detached_comments will keep paragraphs of comments that appear + // before (but not connected to) the current element. Each paragraph, + // separated by empty lines, will be one comment element in the repeated + // field. + // + // Only the comment content is provided; comment markers (e.g. //) are + // stripped out. For block comments, leading whitespace and an asterisk + // will be stripped from the beginning of each line other than the first. + // Newlines are included in the output. + // + // Examples: + // + // optional int32 foo = 1; // Comment attached to foo. + // // Comment attached to bar. + // optional int32 bar = 2; + // + // optional string baz = 3; + // // Comment attached to baz. + // // Another line attached to baz. + // + // // Comment attached to qux. + // // + // // Another line attached to qux. + // optional double qux = 4; + // + // // Detached comment for corge. This is not leading or trailing comments + // // to qux or corge because there are blank lines separating it from + // // both. + // + // // Detached comment for corge paragraph 2. + // + // optional string corge = 5; + // /* Block comment attached + // * to corge. Leading asterisks + // * will be removed. */ + // /* Block comment attached to + // * grault. */ + // optional int32 grault = 6; + // + // // ignored detached comments. + LeadingComments *string `protobuf:"bytes,3,opt,name=leading_comments,json=leadingComments" json:"leading_comments,omitempty"` + TrailingComments *string `protobuf:"bytes,4,opt,name=trailing_comments,json=trailingComments" json:"trailing_comments,omitempty"` + LeadingDetachedComments []string `protobuf:"bytes,6,rep,name=leading_detached_comments,json=leadingDetachedComments" json:"leading_detached_comments,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SourceCodeInfo_Location) Reset() { *m = SourceCodeInfo_Location{} } +func (m *SourceCodeInfo_Location) String() string { return proto.CompactTextString(m) } +func (*SourceCodeInfo_Location) ProtoMessage() {} +func (*SourceCodeInfo_Location) Descriptor() ([]byte, []int) { + return fileDescriptorDescriptor, []int{18, 0} +} + +func (m *SourceCodeInfo_Location) GetPath() []int32 { + if m != nil { + return m.Path + } + return nil +} + +func (m *SourceCodeInfo_Location) GetSpan() []int32 { + if m != nil { + return m.Span + } + return nil +} + +func (m *SourceCodeInfo_Location) GetLeadingComments() string { + if m != nil && m.LeadingComments != nil { + return *m.LeadingComments + } + return "" +} + +func (m *SourceCodeInfo_Location) GetTrailingComments() string { + if m != nil && m.TrailingComments != nil { + return *m.TrailingComments + } + return "" +} + +func (m *SourceCodeInfo_Location) GetLeadingDetachedComments() []string { + if m != nil { + return m.LeadingDetachedComments + } + return nil +} + +// Describes the relationship between generated code and its original source +// file. A GeneratedCodeInfo message is associated with only one generated +// source file, but may contain references to different source .proto files. +type GeneratedCodeInfo struct { + // An Annotation connects some span of text in generated code to an element + // of its generating .proto file. + Annotation []*GeneratedCodeInfo_Annotation `protobuf:"bytes,1,rep,name=annotation" json:"annotation,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GeneratedCodeInfo) Reset() { *m = GeneratedCodeInfo{} } +func (m *GeneratedCodeInfo) String() string { return proto.CompactTextString(m) } +func (*GeneratedCodeInfo) ProtoMessage() {} +func (*GeneratedCodeInfo) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{19} } + +func (m *GeneratedCodeInfo) GetAnnotation() []*GeneratedCodeInfo_Annotation { + if m != nil { + return m.Annotation + } + return nil +} + +type GeneratedCodeInfo_Annotation struct { + // Identifies the element in the original source .proto file. This field + // is formatted the same as SourceCodeInfo.Location.path. + Path []int32 `protobuf:"varint,1,rep,packed,name=path" json:"path,omitempty"` + // Identifies the filesystem path to the original source .proto. + SourceFile *string `protobuf:"bytes,2,opt,name=source_file,json=sourceFile" json:"source_file,omitempty"` + // Identifies the starting offset in bytes in the generated code + // that relates to the identified object. + Begin *int32 `protobuf:"varint,3,opt,name=begin" json:"begin,omitempty"` + // Identifies the ending offset in bytes in the generated code that + // relates to the identified offset. The end offset should be one past + // the last relevant byte (so the length of the text = end - begin). + End *int32 `protobuf:"varint,4,opt,name=end" json:"end,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GeneratedCodeInfo_Annotation) Reset() { *m = GeneratedCodeInfo_Annotation{} } +func (m *GeneratedCodeInfo_Annotation) String() string { return proto.CompactTextString(m) } +func (*GeneratedCodeInfo_Annotation) ProtoMessage() {} +func (*GeneratedCodeInfo_Annotation) Descriptor() ([]byte, []int) { + return fileDescriptorDescriptor, []int{19, 0} +} + +func (m *GeneratedCodeInfo_Annotation) GetPath() []int32 { + if m != nil { + return m.Path + } + return nil +} + +func (m *GeneratedCodeInfo_Annotation) GetSourceFile() string { + if m != nil && m.SourceFile != nil { + return *m.SourceFile + } + return "" +} + +func (m *GeneratedCodeInfo_Annotation) GetBegin() int32 { + if m != nil && m.Begin != nil { + return *m.Begin + } + return 0 +} + +func (m *GeneratedCodeInfo_Annotation) GetEnd() int32 { + if m != nil && m.End != nil { + return *m.End + } + return 0 +} + +func init() { + proto.RegisterType((*FileDescriptorSet)(nil), "google.protobuf.FileDescriptorSet") + proto.RegisterType((*FileDescriptorProto)(nil), "google.protobuf.FileDescriptorProto") + proto.RegisterType((*DescriptorProto)(nil), "google.protobuf.DescriptorProto") + proto.RegisterType((*DescriptorProto_ExtensionRange)(nil), "google.protobuf.DescriptorProto.ExtensionRange") + proto.RegisterType((*DescriptorProto_ReservedRange)(nil), "google.protobuf.DescriptorProto.ReservedRange") + proto.RegisterType((*FieldDescriptorProto)(nil), "google.protobuf.FieldDescriptorProto") + proto.RegisterType((*OneofDescriptorProto)(nil), "google.protobuf.OneofDescriptorProto") + proto.RegisterType((*EnumDescriptorProto)(nil), "google.protobuf.EnumDescriptorProto") + proto.RegisterType((*EnumValueDescriptorProto)(nil), "google.protobuf.EnumValueDescriptorProto") + proto.RegisterType((*ServiceDescriptorProto)(nil), "google.protobuf.ServiceDescriptorProto") + proto.RegisterType((*MethodDescriptorProto)(nil), "google.protobuf.MethodDescriptorProto") + proto.RegisterType((*FileOptions)(nil), "google.protobuf.FileOptions") + proto.RegisterType((*MessageOptions)(nil), "google.protobuf.MessageOptions") + proto.RegisterType((*FieldOptions)(nil), "google.protobuf.FieldOptions") + proto.RegisterType((*OneofOptions)(nil), "google.protobuf.OneofOptions") + proto.RegisterType((*EnumOptions)(nil), "google.protobuf.EnumOptions") + proto.RegisterType((*EnumValueOptions)(nil), "google.protobuf.EnumValueOptions") + proto.RegisterType((*ServiceOptions)(nil), "google.protobuf.ServiceOptions") + proto.RegisterType((*MethodOptions)(nil), "google.protobuf.MethodOptions") + proto.RegisterType((*UninterpretedOption)(nil), "google.protobuf.UninterpretedOption") + proto.RegisterType((*UninterpretedOption_NamePart)(nil), "google.protobuf.UninterpretedOption.NamePart") + proto.RegisterType((*SourceCodeInfo)(nil), "google.protobuf.SourceCodeInfo") + proto.RegisterType((*SourceCodeInfo_Location)(nil), "google.protobuf.SourceCodeInfo.Location") + proto.RegisterType((*GeneratedCodeInfo)(nil), "google.protobuf.GeneratedCodeInfo") + proto.RegisterType((*GeneratedCodeInfo_Annotation)(nil), "google.protobuf.GeneratedCodeInfo.Annotation") + proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Type", FieldDescriptorProto_Type_name, FieldDescriptorProto_Type_value) + proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Label", FieldDescriptorProto_Label_name, FieldDescriptorProto_Label_value) + proto.RegisterEnum("google.protobuf.FileOptions_OptimizeMode", FileOptions_OptimizeMode_name, FileOptions_OptimizeMode_value) + proto.RegisterEnum("google.protobuf.FieldOptions_CType", FieldOptions_CType_name, FieldOptions_CType_value) + proto.RegisterEnum("google.protobuf.FieldOptions_JSType", FieldOptions_JSType_name, FieldOptions_JSType_value) +} + +func init() { proto.RegisterFile("descriptor.proto", fileDescriptorDescriptor) } + +var fileDescriptorDescriptor = []byte{ + // 2273 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0xcd, 0x6f, 0xdb, 0xc8, + 0x15, 0x5f, 0xea, 0xcb, 0xd2, 0x93, 0x2c, 0x8f, 0xc7, 0xde, 0x84, 0x71, 0x36, 0x1b, 0x47, 0x9b, + 0x34, 0x4e, 0xd2, 0x3a, 0x0b, 0xe7, 0x63, 0xb3, 0xde, 0x62, 0x0b, 0x59, 0x62, 0xbc, 0x0a, 0x64, + 0x4b, 0xa5, 0xec, 0x36, 0xbb, 0x3d, 0x10, 0x63, 0x72, 0x24, 0x33, 0xa1, 0x86, 0x2c, 0x49, 0x25, + 0xf1, 0x9e, 0x02, 0xf4, 0x54, 0xf4, 0x1f, 0x28, 0xda, 0xa2, 0x28, 0xf6, 0xb2, 0x40, 0xff, 0x80, + 0x1e, 0x7a, 0xef, 0xb5, 0x40, 0xef, 0x3d, 0x16, 0x68, 0xff, 0x83, 0x5e, 0x8b, 0x99, 0x21, 0x29, + 0xea, 0x6b, 0xe3, 0x2e, 0xb0, 0x1f, 0x27, 0x6b, 0x7e, 0xef, 0xf7, 0x1e, 0xdf, 0xbc, 0x79, 0x7c, + 0xef, 0x71, 0x0c, 0xc8, 0xa2, 0x81, 0xe9, 0xdb, 0x5e, 0xe8, 0xfa, 0xdb, 0x9e, 0xef, 0x86, 0x2e, + 0x5e, 0x19, 0xb8, 0xee, 0xc0, 0xa1, 0x72, 0x75, 0x32, 0xea, 0xd7, 0x0e, 0x60, 0xf5, 0xb1, 0xed, + 0xd0, 0x66, 0x42, 0xec, 0xd1, 0x10, 0x3f, 0x82, 0x5c, 0xdf, 0x76, 0xa8, 0xaa, 0x6c, 0x66, 0xb7, + 0xca, 0x3b, 0xd7, 0xb7, 0xa7, 0x94, 0xb6, 0x27, 0x35, 0xba, 0x1c, 0xd6, 0x85, 0x46, 0xed, 0x5f, + 0x39, 0x58, 0x9b, 0x23, 0xc5, 0x18, 0x72, 0x8c, 0x0c, 0xb9, 0x45, 0x65, 0xab, 0xa4, 0x8b, 0xdf, + 0x58, 0x85, 0x25, 0x8f, 0x98, 0xcf, 0xc9, 0x80, 0xaa, 0x19, 0x01, 0xc7, 0x4b, 0xfc, 0x2e, 0x80, + 0x45, 0x3d, 0xca, 0x2c, 0xca, 0xcc, 0x33, 0x35, 0xbb, 0x99, 0xdd, 0x2a, 0xe9, 0x29, 0x04, 0xdf, + 0x81, 0x55, 0x6f, 0x74, 0xe2, 0xd8, 0xa6, 0x91, 0xa2, 0xc1, 0x66, 0x76, 0x2b, 0xaf, 0x23, 0x29, + 0x68, 0x8e, 0xc9, 0x37, 0x61, 0xe5, 0x25, 0x25, 0xcf, 0xd3, 0xd4, 0xb2, 0xa0, 0x56, 0x39, 0x9c, + 0x22, 0x36, 0xa0, 0x32, 0xa4, 0x41, 0x40, 0x06, 0xd4, 0x08, 0xcf, 0x3c, 0xaa, 0xe6, 0xc4, 0xee, + 0x37, 0x67, 0x76, 0x3f, 0xbd, 0xf3, 0x72, 0xa4, 0x75, 0x74, 0xe6, 0x51, 0x5c, 0x87, 0x12, 0x65, + 0xa3, 0xa1, 0xb4, 0x90, 0x5f, 0x10, 0x3f, 0x8d, 0x8d, 0x86, 0xd3, 0x56, 0x8a, 0x5c, 0x2d, 0x32, + 0xb1, 0x14, 0x50, 0xff, 0x85, 0x6d, 0x52, 0xb5, 0x20, 0x0c, 0xdc, 0x9c, 0x31, 0xd0, 0x93, 0xf2, + 0x69, 0x1b, 0xb1, 0x1e, 0x6e, 0x40, 0x89, 0xbe, 0x0a, 0x29, 0x0b, 0x6c, 0x97, 0xa9, 0x4b, 0xc2, + 0xc8, 0x8d, 0x39, 0xa7, 0x48, 0x1d, 0x6b, 0xda, 0xc4, 0x58, 0x0f, 0x3f, 0x84, 0x25, 0xd7, 0x0b, + 0x6d, 0x97, 0x05, 0x6a, 0x71, 0x53, 0xd9, 0x2a, 0xef, 0xbc, 0x33, 0x37, 0x11, 0x3a, 0x92, 0xa3, + 0xc7, 0x64, 0xdc, 0x02, 0x14, 0xb8, 0x23, 0xdf, 0xa4, 0x86, 0xe9, 0x5a, 0xd4, 0xb0, 0x59, 0xdf, + 0x55, 0x4b, 0xc2, 0xc0, 0xd5, 0xd9, 0x8d, 0x08, 0x62, 0xc3, 0xb5, 0x68, 0x8b, 0xf5, 0x5d, 0xbd, + 0x1a, 0x4c, 0xac, 0xf1, 0x05, 0x28, 0x04, 0x67, 0x2c, 0x24, 0xaf, 0xd4, 0x8a, 0xc8, 0x90, 0x68, + 0x55, 0xfb, 0x6f, 0x1e, 0x56, 0xce, 0x93, 0x62, 0x1f, 0x41, 0xbe, 0xcf, 0x77, 0xa9, 0x66, 0xfe, + 0x9f, 0x18, 0x48, 0x9d, 0xc9, 0x20, 0x16, 0xbe, 0x66, 0x10, 0xeb, 0x50, 0x66, 0x34, 0x08, 0xa9, + 0x25, 0x33, 0x22, 0x7b, 0xce, 0x9c, 0x02, 0xa9, 0x34, 0x9b, 0x52, 0xb9, 0xaf, 0x95, 0x52, 0x4f, + 0x61, 0x25, 0x71, 0xc9, 0xf0, 0x09, 0x1b, 0xc4, 0xb9, 0x79, 0xf7, 0x4d, 0x9e, 0x6c, 0x6b, 0xb1, + 0x9e, 0xce, 0xd5, 0xf4, 0x2a, 0x9d, 0x58, 0xe3, 0x26, 0x80, 0xcb, 0xa8, 0xdb, 0x37, 0x2c, 0x6a, + 0x3a, 0x6a, 0x71, 0x41, 0x94, 0x3a, 0x9c, 0x32, 0x13, 0x25, 0x57, 0xa2, 0xa6, 0x83, 0x3f, 0x1c, + 0xa7, 0xda, 0xd2, 0x82, 0x4c, 0x39, 0x90, 0x2f, 0xd9, 0x4c, 0xb6, 0x1d, 0x43, 0xd5, 0xa7, 0x3c, + 0xef, 0xa9, 0x15, 0xed, 0xac, 0x24, 0x9c, 0xd8, 0x7e, 0xe3, 0xce, 0xf4, 0x48, 0x4d, 0x6e, 0x6c, + 0xd9, 0x4f, 0x2f, 0xf1, 0x7b, 0x90, 0x00, 0x86, 0x48, 0x2b, 0x10, 0x55, 0xa8, 0x12, 0x83, 0x87, + 0x64, 0x48, 0x37, 0x1e, 0x41, 0x75, 0x32, 0x3c, 0x78, 0x1d, 0xf2, 0x41, 0x48, 0xfc, 0x50, 0x64, + 0x61, 0x5e, 0x97, 0x0b, 0x8c, 0x20, 0x4b, 0x99, 0x25, 0xaa, 0x5c, 0x5e, 0xe7, 0x3f, 0x37, 0x3e, + 0x80, 0xe5, 0x89, 0xc7, 0x9f, 0x57, 0xb1, 0xf6, 0xdb, 0x02, 0xac, 0xcf, 0xcb, 0xb9, 0xb9, 0xe9, + 0x7f, 0x01, 0x0a, 0x6c, 0x34, 0x3c, 0xa1, 0xbe, 0x9a, 0x15, 0x16, 0xa2, 0x15, 0xae, 0x43, 0xde, + 0x21, 0x27, 0xd4, 0x51, 0x73, 0x9b, 0xca, 0x56, 0x75, 0xe7, 0xce, 0xb9, 0xb2, 0x7a, 0xbb, 0xcd, + 0x55, 0x74, 0xa9, 0x89, 0x3f, 0x86, 0x5c, 0x54, 0xe2, 0xb8, 0x85, 0xdb, 0xe7, 0xb3, 0xc0, 0x73, + 0x51, 0x17, 0x7a, 0xf8, 0x32, 0x94, 0xf8, 0x5f, 0x19, 0xdb, 0x82, 0xf0, 0xb9, 0xc8, 0x01, 0x1e, + 0x57, 0xbc, 0x01, 0x45, 0x91, 0x66, 0x16, 0x8d, 0x5b, 0x43, 0xb2, 0xe6, 0x07, 0x63, 0xd1, 0x3e, + 0x19, 0x39, 0xa1, 0xf1, 0x82, 0x38, 0x23, 0x2a, 0x12, 0xa6, 0xa4, 0x57, 0x22, 0xf0, 0x67, 0x1c, + 0xc3, 0x57, 0xa1, 0x2c, 0xb3, 0xd2, 0x66, 0x16, 0x7d, 0x25, 0xaa, 0x4f, 0x5e, 0x97, 0x89, 0xda, + 0xe2, 0x08, 0x7f, 0xfc, 0xb3, 0xc0, 0x65, 0xf1, 0xd1, 0x8a, 0x47, 0x70, 0x40, 0x3c, 0xfe, 0x83, + 0xe9, 0xc2, 0x77, 0x65, 0xfe, 0xf6, 0xa6, 0x73, 0xb1, 0xf6, 0x97, 0x0c, 0xe4, 0xc4, 0xfb, 0xb6, + 0x02, 0xe5, 0xa3, 0x4f, 0xbb, 0x9a, 0xd1, 0xec, 0x1c, 0xef, 0xb5, 0x35, 0xa4, 0xe0, 0x2a, 0x80, + 0x00, 0x1e, 0xb7, 0x3b, 0xf5, 0x23, 0x94, 0x49, 0xd6, 0xad, 0xc3, 0xa3, 0x87, 0xf7, 0x51, 0x36, + 0x51, 0x38, 0x96, 0x40, 0x2e, 0x4d, 0xb8, 0xb7, 0x83, 0xf2, 0x18, 0x41, 0x45, 0x1a, 0x68, 0x3d, + 0xd5, 0x9a, 0x0f, 0xef, 0xa3, 0xc2, 0x24, 0x72, 0x6f, 0x07, 0x2d, 0xe1, 0x65, 0x28, 0x09, 0x64, + 0xaf, 0xd3, 0x69, 0xa3, 0x62, 0x62, 0xb3, 0x77, 0xa4, 0xb7, 0x0e, 0xf7, 0x51, 0x29, 0xb1, 0xb9, + 0xaf, 0x77, 0x8e, 0xbb, 0x08, 0x12, 0x0b, 0x07, 0x5a, 0xaf, 0x57, 0xdf, 0xd7, 0x50, 0x39, 0x61, + 0xec, 0x7d, 0x7a, 0xa4, 0xf5, 0x50, 0x65, 0xc2, 0xad, 0x7b, 0x3b, 0x68, 0x39, 0x79, 0x84, 0x76, + 0x78, 0x7c, 0x80, 0xaa, 0x78, 0x15, 0x96, 0xe5, 0x23, 0x62, 0x27, 0x56, 0xa6, 0xa0, 0x87, 0xf7, + 0x11, 0x1a, 0x3b, 0x22, 0xad, 0xac, 0x4e, 0x00, 0x0f, 0xef, 0x23, 0x5c, 0x6b, 0x40, 0x5e, 0x64, + 0x17, 0xc6, 0x50, 0x6d, 0xd7, 0xf7, 0xb4, 0xb6, 0xd1, 0xe9, 0x1e, 0xb5, 0x3a, 0x87, 0xf5, 0x36, + 0x52, 0xc6, 0x98, 0xae, 0xfd, 0xf4, 0xb8, 0xa5, 0x6b, 0x4d, 0x94, 0x49, 0x63, 0x5d, 0xad, 0x7e, + 0xa4, 0x35, 0x51, 0xb6, 0x66, 0xc2, 0xfa, 0xbc, 0x3a, 0x33, 0xf7, 0xcd, 0x48, 0x1d, 0x71, 0x66, + 0xc1, 0x11, 0x0b, 0x5b, 0x33, 0x47, 0xfc, 0x85, 0x02, 0x6b, 0x73, 0x6a, 0xed, 0xdc, 0x87, 0xfc, + 0x04, 0xf2, 0x32, 0x45, 0x65, 0xf7, 0xb9, 0x35, 0xb7, 0x68, 0x8b, 0x84, 0x9d, 0xe9, 0x40, 0x42, + 0x2f, 0xdd, 0x81, 0xb3, 0x0b, 0x3a, 0x30, 0x37, 0x31, 0xe3, 0xe4, 0xaf, 0x14, 0x50, 0x17, 0xd9, + 0x7e, 0x43, 0xa1, 0xc8, 0x4c, 0x14, 0x8a, 0x8f, 0xa6, 0x1d, 0xb8, 0xb6, 0x78, 0x0f, 0x33, 0x5e, + 0x7c, 0xa9, 0xc0, 0x85, 0xf9, 0x83, 0xca, 0x5c, 0x1f, 0x3e, 0x86, 0xc2, 0x90, 0x86, 0xa7, 0x6e, + 0xdc, 0xac, 0x7f, 0x30, 0xa7, 0x05, 0x70, 0xf1, 0x74, 0xac, 0x22, 0xad, 0x74, 0x0f, 0xc9, 0x2e, + 0x9a, 0x36, 0xa4, 0x37, 0x33, 0x9e, 0xfe, 0x3a, 0x03, 0x6f, 0xcf, 0x35, 0x3e, 0xd7, 0xd1, 0x2b, + 0x00, 0x36, 0xf3, 0x46, 0xa1, 0x6c, 0xc8, 0xb2, 0x3e, 0x95, 0x04, 0x22, 0xde, 0x7d, 0x5e, 0x7b, + 0x46, 0x61, 0x22, 0xcf, 0x0a, 0x39, 0x48, 0x48, 0x10, 0x1e, 0x8d, 0x1d, 0xcd, 0x09, 0x47, 0xdf, + 0x5d, 0xb0, 0xd3, 0x99, 0x5e, 0xf7, 0x3e, 0x20, 0xd3, 0xb1, 0x29, 0x0b, 0x8d, 0x20, 0xf4, 0x29, + 0x19, 0xda, 0x6c, 0x20, 0x0a, 0x70, 0x71, 0x37, 0xdf, 0x27, 0x4e, 0x40, 0xf5, 0x15, 0x29, 0xee, + 0xc5, 0x52, 0xae, 0x21, 0xba, 0x8c, 0x9f, 0xd2, 0x28, 0x4c, 0x68, 0x48, 0x71, 0xa2, 0x51, 0xfb, + 0xcd, 0x12, 0x94, 0x53, 0x63, 0x1d, 0xbe, 0x06, 0x95, 0x67, 0xe4, 0x05, 0x31, 0xe2, 0x51, 0x5d, + 0x46, 0xa2, 0xcc, 0xb1, 0x6e, 0x34, 0xae, 0xbf, 0x0f, 0xeb, 0x82, 0xe2, 0x8e, 0x42, 0xea, 0x1b, + 0xa6, 0x43, 0x82, 0x40, 0x04, 0xad, 0x28, 0xa8, 0x98, 0xcb, 0x3a, 0x5c, 0xd4, 0x88, 0x25, 0xf8, + 0x01, 0xac, 0x09, 0x8d, 0xe1, 0xc8, 0x09, 0x6d, 0xcf, 0xa1, 0x06, 0xff, 0x78, 0x08, 0x44, 0x21, + 0x4e, 0x3c, 0x5b, 0xe5, 0x8c, 0x83, 0x88, 0xc0, 0x3d, 0x0a, 0xf0, 0x3e, 0x5c, 0x11, 0x6a, 0x03, + 0xca, 0xa8, 0x4f, 0x42, 0x6a, 0xd0, 0x5f, 0x8e, 0x88, 0x13, 0x18, 0x84, 0x59, 0xc6, 0x29, 0x09, + 0x4e, 0xd5, 0xf5, 0xb4, 0x81, 0x4b, 0x9c, 0xbb, 0x1f, 0x51, 0x35, 0xc1, 0xac, 0x33, 0xeb, 0x13, + 0x12, 0x9c, 0xe2, 0x5d, 0xb8, 0x20, 0x0c, 0x05, 0xa1, 0x6f, 0xb3, 0x81, 0x61, 0x9e, 0x52, 0xf3, + 0xb9, 0x31, 0x0a, 0xfb, 0x8f, 0xd4, 0xcb, 0x69, 0x0b, 0xc2, 0xc9, 0x9e, 0xe0, 0x34, 0x38, 0xe5, + 0x38, 0xec, 0x3f, 0xc2, 0x3d, 0xa8, 0xf0, 0xf3, 0x18, 0xda, 0x9f, 0x53, 0xa3, 0xef, 0xfa, 0xa2, + 0xb9, 0x54, 0xe7, 0xbc, 0xdc, 0xa9, 0x20, 0x6e, 0x77, 0x22, 0x85, 0x03, 0xd7, 0xa2, 0xbb, 0xf9, + 0x5e, 0x57, 0xd3, 0x9a, 0x7a, 0x39, 0xb6, 0xf2, 0xd8, 0xf5, 0x79, 0x4e, 0x0d, 0xdc, 0x24, 0xc6, + 0x65, 0x99, 0x53, 0x03, 0x37, 0x8e, 0xf0, 0x03, 0x58, 0x33, 0x4d, 0xb9, 0x6d, 0xdb, 0x34, 0xa2, + 0x29, 0x3f, 0x50, 0xd1, 0x44, 0xbc, 0x4c, 0x73, 0x5f, 0x12, 0xa2, 0x34, 0x0f, 0xf0, 0x87, 0xf0, + 0xf6, 0x38, 0x5e, 0x69, 0xc5, 0xd5, 0x99, 0x5d, 0x4e, 0xab, 0x3e, 0x80, 0x35, 0xef, 0x6c, 0x56, + 0x11, 0x4f, 0x3c, 0xd1, 0x3b, 0x9b, 0x56, 0xbb, 0x21, 0xbe, 0xdc, 0x7c, 0x6a, 0x92, 0x90, 0x5a, + 0xea, 0xc5, 0x34, 0x3b, 0x25, 0xc0, 0x77, 0x01, 0x99, 0xa6, 0x41, 0x19, 0x39, 0x71, 0xa8, 0x41, + 0x7c, 0xca, 0x48, 0xa0, 0x5e, 0x4d, 0x93, 0xab, 0xa6, 0xa9, 0x09, 0x69, 0x5d, 0x08, 0xf1, 0x6d, + 0x58, 0x75, 0x4f, 0x9e, 0x99, 0x32, 0xb9, 0x0c, 0xcf, 0xa7, 0x7d, 0xfb, 0x95, 0x7a, 0x5d, 0x84, + 0x69, 0x85, 0x0b, 0x44, 0x6a, 0x75, 0x05, 0x8c, 0x6f, 0x01, 0x32, 0x83, 0x53, 0xe2, 0x7b, 0xa2, + 0xbb, 0x07, 0x1e, 0x31, 0xa9, 0x7a, 0x43, 0x52, 0x25, 0x7e, 0x18, 0xc3, 0xf8, 0x29, 0xac, 0x8f, + 0x98, 0xcd, 0x42, 0xea, 0x7b, 0x3e, 0xe5, 0x43, 0xba, 0x7c, 0xd3, 0xd4, 0x7f, 0x2f, 0x2d, 0x18, + 0xb3, 0x8f, 0xd3, 0x6c, 0x79, 0xba, 0xfa, 0xda, 0x68, 0x16, 0xac, 0xed, 0x42, 0x25, 0x7d, 0xe8, + 0xb8, 0x04, 0xf2, 0xd8, 0x91, 0xc2, 0x7b, 0x68, 0xa3, 0xd3, 0xe4, 0xdd, 0xef, 0x33, 0x0d, 0x65, + 0x78, 0x17, 0x6e, 0xb7, 0x8e, 0x34, 0x43, 0x3f, 0x3e, 0x3c, 0x6a, 0x1d, 0x68, 0x28, 0x7b, 0xbb, + 0x54, 0xfc, 0xcf, 0x12, 0x7a, 0xfd, 0xfa, 0xf5, 0xeb, 0x4c, 0xed, 0x6f, 0x19, 0xa8, 0x4e, 0x4e, + 0xbe, 0xf8, 0xc7, 0x70, 0x31, 0xfe, 0x4c, 0x0d, 0x68, 0x68, 0xbc, 0xb4, 0x7d, 0x91, 0x87, 0x43, + 0x22, 0x67, 0xc7, 0x24, 0x84, 0xeb, 0x11, 0xab, 0x47, 0xc3, 0x9f, 0xdb, 0x3e, 0xcf, 0xb2, 0x21, + 0x09, 0x71, 0x1b, 0xae, 0x32, 0xd7, 0x08, 0x42, 0xc2, 0x2c, 0xe2, 0x5b, 0xc6, 0xf8, 0x82, 0xc0, + 0x20, 0xa6, 0x49, 0x83, 0xc0, 0x95, 0x2d, 0x20, 0xb1, 0xf2, 0x0e, 0x73, 0x7b, 0x11, 0x79, 0x5c, + 0x1b, 0xeb, 0x11, 0x75, 0xea, 0xb8, 0xb3, 0x8b, 0x8e, 0xfb, 0x32, 0x94, 0x86, 0xc4, 0x33, 0x28, + 0x0b, 0xfd, 0x33, 0x31, 0xaf, 0x15, 0xf5, 0xe2, 0x90, 0x78, 0x1a, 0x5f, 0x7f, 0x73, 0x67, 0x90, + 0x8e, 0xe3, 0x3f, 0xb3, 0x50, 0x49, 0xcf, 0x6c, 0x7c, 0x04, 0x36, 0x45, 0x7d, 0x56, 0xc4, 0xeb, + 0xfb, 0xde, 0x57, 0x4e, 0x78, 0xdb, 0x0d, 0x5e, 0xb8, 0x77, 0x0b, 0x72, 0x92, 0xd2, 0xa5, 0x26, + 0x6f, 0x9a, 0xfc, 0x85, 0xa5, 0x72, 0x3e, 0x2f, 0xea, 0xd1, 0x0a, 0xef, 0x43, 0xe1, 0x59, 0x20, + 0x6c, 0x17, 0x84, 0xed, 0xeb, 0x5f, 0x6d, 0xfb, 0x49, 0x4f, 0x18, 0x2f, 0x3d, 0xe9, 0x19, 0x87, + 0x1d, 0xfd, 0xa0, 0xde, 0xd6, 0x23, 0x75, 0x7c, 0x09, 0x72, 0x0e, 0xf9, 0xfc, 0x6c, 0xb2, 0xc4, + 0x0b, 0xe8, 0xbc, 0x81, 0xbf, 0x04, 0xb9, 0x97, 0x94, 0x3c, 0x9f, 0x2c, 0xac, 0x02, 0xfa, 0x06, + 0x53, 0xff, 0x2e, 0xe4, 0x45, 0xbc, 0x30, 0x40, 0x14, 0x31, 0xf4, 0x16, 0x2e, 0x42, 0xae, 0xd1, + 0xd1, 0x79, 0xfa, 0x23, 0xa8, 0x48, 0xd4, 0xe8, 0xb6, 0xb4, 0x86, 0x86, 0x32, 0xb5, 0x07, 0x50, + 0x90, 0x41, 0xe0, 0xaf, 0x46, 0x12, 0x06, 0xf4, 0x56, 0xb4, 0x8c, 0x6c, 0x28, 0xb1, 0xf4, 0xf8, + 0x60, 0x4f, 0xd3, 0x51, 0x26, 0x7d, 0xbc, 0x01, 0x54, 0xd2, 0xe3, 0xda, 0xb7, 0x93, 0x53, 0x7f, + 0x55, 0xa0, 0x9c, 0x1a, 0xbf, 0x78, 0xe3, 0x27, 0x8e, 0xe3, 0xbe, 0x34, 0x88, 0x63, 0x93, 0x20, + 0x4a, 0x0a, 0x10, 0x50, 0x9d, 0x23, 0xe7, 0x3d, 0xb4, 0x6f, 0xc5, 0xf9, 0x3f, 0x2a, 0x80, 0xa6, + 0x47, 0xb7, 0x29, 0x07, 0x95, 0xef, 0xd4, 0xc1, 0x3f, 0x28, 0x50, 0x9d, 0x9c, 0xd7, 0xa6, 0xdc, + 0xbb, 0xf6, 0x9d, 0xba, 0xf7, 0x7b, 0x05, 0x96, 0x27, 0xa6, 0xb4, 0xef, 0x95, 0x77, 0xbf, 0xcb, + 0xc2, 0xda, 0x1c, 0x3d, 0x5c, 0x8f, 0xc6, 0x59, 0x39, 0x61, 0xff, 0xe8, 0x3c, 0xcf, 0xda, 0xe6, + 0xdd, 0xb2, 0x4b, 0xfc, 0x30, 0x9a, 0x7e, 0x6f, 0x01, 0xb2, 0x2d, 0xca, 0x42, 0xbb, 0x6f, 0x53, + 0x3f, 0xfa, 0x04, 0x97, 0x33, 0xee, 0xca, 0x18, 0x97, 0x5f, 0xe1, 0x3f, 0x04, 0xec, 0xb9, 0x81, + 0x1d, 0xda, 0x2f, 0xa8, 0x61, 0xb3, 0xf8, 0x7b, 0x9d, 0xcf, 0xbc, 0x39, 0x1d, 0xc5, 0x92, 0x16, + 0x0b, 0x13, 0x36, 0xa3, 0x03, 0x32, 0xc5, 0xe6, 0xb5, 0x2f, 0xab, 0xa3, 0x58, 0x92, 0xb0, 0xaf, + 0x41, 0xc5, 0x72, 0x47, 0x7c, 0x7c, 0x90, 0x3c, 0x5e, 0x6a, 0x15, 0xbd, 0x2c, 0xb1, 0x84, 0x12, + 0xcd, 0x77, 0xe3, 0x8b, 0x82, 0x8a, 0x5e, 0x96, 0x98, 0xa4, 0xdc, 0x84, 0x15, 0x32, 0x18, 0xf8, + 0xdc, 0x78, 0x6c, 0x48, 0x0e, 0xad, 0xd5, 0x04, 0x16, 0xc4, 0x8d, 0x27, 0x50, 0x8c, 0xe3, 0xc0, + 0xbb, 0x19, 0x8f, 0x84, 0xe1, 0xc9, 0xeb, 0x9a, 0xcc, 0x56, 0x49, 0x2f, 0xb2, 0x58, 0x78, 0x0d, + 0x2a, 0x76, 0x60, 0x8c, 0xef, 0x0d, 0x33, 0x9b, 0x99, 0xad, 0xa2, 0x5e, 0xb6, 0x83, 0xe4, 0xa2, + 0xa8, 0xf6, 0x65, 0x06, 0xaa, 0x93, 0xf7, 0x9e, 0xb8, 0x09, 0x45, 0xc7, 0x35, 0x89, 0x48, 0x04, + 0x79, 0xe9, 0xbe, 0xf5, 0x86, 0xab, 0xd2, 0xed, 0x76, 0xc4, 0xd7, 0x13, 0xcd, 0x8d, 0xbf, 0x2b, + 0x50, 0x8c, 0x61, 0x7c, 0x01, 0x72, 0x1e, 0x09, 0x4f, 0x85, 0xb9, 0xfc, 0x5e, 0x06, 0x29, 0xba, + 0x58, 0x73, 0x3c, 0xf0, 0x08, 0x13, 0x29, 0x10, 0xe1, 0x7c, 0xcd, 0xcf, 0xd5, 0xa1, 0xc4, 0x12, + 0xe3, 0xb0, 0x3b, 0x1c, 0x52, 0x16, 0x06, 0xf1, 0xb9, 0x46, 0x78, 0x23, 0x82, 0xf1, 0x1d, 0x58, + 0x0d, 0x7d, 0x62, 0x3b, 0x13, 0xdc, 0x9c, 0xe0, 0xa2, 0x58, 0x90, 0x90, 0x77, 0xe1, 0x52, 0x6c, + 0xd7, 0xa2, 0x21, 0x31, 0x4f, 0xa9, 0x35, 0x56, 0x2a, 0x88, 0x4b, 0xb5, 0x8b, 0x11, 0xa1, 0x19, + 0xc9, 0x63, 0xdd, 0xda, 0x3f, 0x14, 0x58, 0x8d, 0x07, 0x78, 0x2b, 0x09, 0xd6, 0x01, 0x00, 0x61, + 0xcc, 0x0d, 0xd3, 0xe1, 0x9a, 0x4d, 0xe5, 0x19, 0xbd, 0xed, 0x7a, 0xa2, 0xa4, 0xa7, 0x0c, 0x6c, + 0x0c, 0x01, 0xc6, 0x92, 0x85, 0x61, 0xbb, 0x0a, 0xe5, 0xe8, 0x52, 0x5b, 0xfc, 0x67, 0x44, 0x7e, + 0xf5, 0x81, 0x84, 0xf8, 0xa4, 0x8f, 0xd7, 0x21, 0x7f, 0x42, 0x07, 0x36, 0x8b, 0xae, 0xda, 0xe4, + 0x22, 0xbe, 0xc0, 0xcb, 0x25, 0x17, 0x78, 0x7b, 0xbf, 0x80, 0x35, 0xd3, 0x1d, 0x4e, 0xbb, 0xbb, + 0x87, 0xa6, 0xbe, 0x3c, 0x83, 0x4f, 0x94, 0xcf, 0x60, 0x3c, 0x9d, 0xfd, 0x49, 0x51, 0xbe, 0xc8, + 0x64, 0xf7, 0xbb, 0x7b, 0x7f, 0xce, 0x6c, 0xec, 0x4b, 0xd5, 0x6e, 0xbc, 0x53, 0x9d, 0xf6, 0x1d, + 0x6a, 0x72, 0xef, 0xff, 0x17, 0x00, 0x00, 0xff, 0xff, 0xd0, 0xf2, 0xf3, 0xa9, 0xf1, 0x19, 0x00, + 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_gostring.gen.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_gostring.gen.go new file mode 100644 index 000000000..785d6f9fe --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_gostring.gen.go @@ -0,0 +1,715 @@ +// Code generated by protoc-gen-gogo. +// source: descriptor.proto +// DO NOT EDIT! + +/* +Package descriptor is a generated protocol buffer package. + +It is generated from these files: + descriptor.proto + +It has these top-level messages: + FileDescriptorSet + FileDescriptorProto + DescriptorProto + FieldDescriptorProto + OneofDescriptorProto + EnumDescriptorProto + EnumValueDescriptorProto + ServiceDescriptorProto + MethodDescriptorProto + FileOptions + MessageOptions + FieldOptions + OneofOptions + EnumOptions + EnumValueOptions + ServiceOptions + MethodOptions + UninterpretedOption + SourceCodeInfo + GeneratedCodeInfo +*/ +package descriptor + +import fmt "fmt" +import strings "strings" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import sort "sort" +import strconv "strconv" +import reflect "reflect" +import proto "github.com/gogo/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func (this *FileDescriptorSet) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&descriptor.FileDescriptorSet{") + if this.File != nil { + s = append(s, "File: "+fmt.Sprintf("%#v", this.File)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FileDescriptorProto) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 16) + s = append(s, "&descriptor.FileDescriptorProto{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") + } + if this.Package != nil { + s = append(s, "Package: "+valueToGoStringDescriptor(this.Package, "string")+",\n") + } + if this.Dependency != nil { + s = append(s, "Dependency: "+fmt.Sprintf("%#v", this.Dependency)+",\n") + } + if this.PublicDependency != nil { + s = append(s, "PublicDependency: "+fmt.Sprintf("%#v", this.PublicDependency)+",\n") + } + if this.WeakDependency != nil { + s = append(s, "WeakDependency: "+fmt.Sprintf("%#v", this.WeakDependency)+",\n") + } + if this.MessageType != nil { + s = append(s, "MessageType: "+fmt.Sprintf("%#v", this.MessageType)+",\n") + } + if this.EnumType != nil { + s = append(s, "EnumType: "+fmt.Sprintf("%#v", this.EnumType)+",\n") + } + if this.Service != nil { + s = append(s, "Service: "+fmt.Sprintf("%#v", this.Service)+",\n") + } + if this.Extension != nil { + s = append(s, "Extension: "+fmt.Sprintf("%#v", this.Extension)+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.SourceCodeInfo != nil { + s = append(s, "SourceCodeInfo: "+fmt.Sprintf("%#v", this.SourceCodeInfo)+",\n") + } + if this.Syntax != nil { + s = append(s, "Syntax: "+valueToGoStringDescriptor(this.Syntax, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *DescriptorProto) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&descriptor.DescriptorProto{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") + } + if this.Field != nil { + s = append(s, "Field: "+fmt.Sprintf("%#v", this.Field)+",\n") + } + if this.Extension != nil { + s = append(s, "Extension: "+fmt.Sprintf("%#v", this.Extension)+",\n") + } + if this.NestedType != nil { + s = append(s, "NestedType: "+fmt.Sprintf("%#v", this.NestedType)+",\n") + } + if this.EnumType != nil { + s = append(s, "EnumType: "+fmt.Sprintf("%#v", this.EnumType)+",\n") + } + if this.ExtensionRange != nil { + s = append(s, "ExtensionRange: "+fmt.Sprintf("%#v", this.ExtensionRange)+",\n") + } + if this.OneofDecl != nil { + s = append(s, "OneofDecl: "+fmt.Sprintf("%#v", this.OneofDecl)+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.ReservedRange != nil { + s = append(s, "ReservedRange: "+fmt.Sprintf("%#v", this.ReservedRange)+",\n") + } + if this.ReservedName != nil { + s = append(s, "ReservedName: "+fmt.Sprintf("%#v", this.ReservedName)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *DescriptorProto_ExtensionRange) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&descriptor.DescriptorProto_ExtensionRange{") + if this.Start != nil { + s = append(s, "Start: "+valueToGoStringDescriptor(this.Start, "int32")+",\n") + } + if this.End != nil { + s = append(s, "End: "+valueToGoStringDescriptor(this.End, "int32")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *DescriptorProto_ReservedRange) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&descriptor.DescriptorProto_ReservedRange{") + if this.Start != nil { + s = append(s, "Start: "+valueToGoStringDescriptor(this.Start, "int32")+",\n") + } + if this.End != nil { + s = append(s, "End: "+valueToGoStringDescriptor(this.End, "int32")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FieldDescriptorProto) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&descriptor.FieldDescriptorProto{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") + } + if this.Number != nil { + s = append(s, "Number: "+valueToGoStringDescriptor(this.Number, "int32")+",\n") + } + if this.Label != nil { + s = append(s, "Label: "+valueToGoStringDescriptor(this.Label, "descriptor.FieldDescriptorProto_Label")+",\n") + } + if this.Type != nil { + s = append(s, "Type: "+valueToGoStringDescriptor(this.Type, "descriptor.FieldDescriptorProto_Type")+",\n") + } + if this.TypeName != nil { + s = append(s, "TypeName: "+valueToGoStringDescriptor(this.TypeName, "string")+",\n") + } + if this.Extendee != nil { + s = append(s, "Extendee: "+valueToGoStringDescriptor(this.Extendee, "string")+",\n") + } + if this.DefaultValue != nil { + s = append(s, "DefaultValue: "+valueToGoStringDescriptor(this.DefaultValue, "string")+",\n") + } + if this.OneofIndex != nil { + s = append(s, "OneofIndex: "+valueToGoStringDescriptor(this.OneofIndex, "int32")+",\n") + } + if this.JsonName != nil { + s = append(s, "JsonName: "+valueToGoStringDescriptor(this.JsonName, "string")+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OneofDescriptorProto) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&descriptor.OneofDescriptorProto{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *EnumDescriptorProto) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&descriptor.EnumDescriptorProto{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *EnumValueDescriptorProto) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&descriptor.EnumValueDescriptorProto{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") + } + if this.Number != nil { + s = append(s, "Number: "+valueToGoStringDescriptor(this.Number, "int32")+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ServiceDescriptorProto) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&descriptor.ServiceDescriptorProto{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") + } + if this.Method != nil { + s = append(s, "Method: "+fmt.Sprintf("%#v", this.Method)+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MethodDescriptorProto) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&descriptor.MethodDescriptorProto{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") + } + if this.InputType != nil { + s = append(s, "InputType: "+valueToGoStringDescriptor(this.InputType, "string")+",\n") + } + if this.OutputType != nil { + s = append(s, "OutputType: "+valueToGoStringDescriptor(this.OutputType, "string")+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.ClientStreaming != nil { + s = append(s, "ClientStreaming: "+valueToGoStringDescriptor(this.ClientStreaming, "bool")+",\n") + } + if this.ServerStreaming != nil { + s = append(s, "ServerStreaming: "+valueToGoStringDescriptor(this.ServerStreaming, "bool")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FileOptions) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&descriptor.FileOptions{") + if this.JavaPackage != nil { + s = append(s, "JavaPackage: "+valueToGoStringDescriptor(this.JavaPackage, "string")+",\n") + } + if this.JavaOuterClassname != nil { + s = append(s, "JavaOuterClassname: "+valueToGoStringDescriptor(this.JavaOuterClassname, "string")+",\n") + } + if this.JavaMultipleFiles != nil { + s = append(s, "JavaMultipleFiles: "+valueToGoStringDescriptor(this.JavaMultipleFiles, "bool")+",\n") + } + if this.JavaGenerateEqualsAndHash != nil { + s = append(s, "JavaGenerateEqualsAndHash: "+valueToGoStringDescriptor(this.JavaGenerateEqualsAndHash, "bool")+",\n") + } + if this.JavaStringCheckUtf8 != nil { + s = append(s, "JavaStringCheckUtf8: "+valueToGoStringDescriptor(this.JavaStringCheckUtf8, "bool")+",\n") + } + if this.OptimizeFor != nil { + s = append(s, "OptimizeFor: "+valueToGoStringDescriptor(this.OptimizeFor, "descriptor.FileOptions_OptimizeMode")+",\n") + } + if this.GoPackage != nil { + s = append(s, "GoPackage: "+valueToGoStringDescriptor(this.GoPackage, "string")+",\n") + } + if this.CcGenericServices != nil { + s = append(s, "CcGenericServices: "+valueToGoStringDescriptor(this.CcGenericServices, "bool")+",\n") + } + if this.JavaGenericServices != nil { + s = append(s, "JavaGenericServices: "+valueToGoStringDescriptor(this.JavaGenericServices, "bool")+",\n") + } + if this.PyGenericServices != nil { + s = append(s, "PyGenericServices: "+valueToGoStringDescriptor(this.PyGenericServices, "bool")+",\n") + } + if this.Deprecated != nil { + s = append(s, "Deprecated: "+valueToGoStringDescriptor(this.Deprecated, "bool")+",\n") + } + if this.CcEnableArenas != nil { + s = append(s, "CcEnableArenas: "+valueToGoStringDescriptor(this.CcEnableArenas, "bool")+",\n") + } + if this.ObjcClassPrefix != nil { + s = append(s, "ObjcClassPrefix: "+valueToGoStringDescriptor(this.ObjcClassPrefix, "string")+",\n") + } + if this.CsharpNamespace != nil { + s = append(s, "CsharpNamespace: "+valueToGoStringDescriptor(this.CsharpNamespace, "string")+",\n") + } + if this.UninterpretedOption != nil { + s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringDescriptor(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MessageOptions) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&descriptor.MessageOptions{") + if this.MessageSetWireFormat != nil { + s = append(s, "MessageSetWireFormat: "+valueToGoStringDescriptor(this.MessageSetWireFormat, "bool")+",\n") + } + if this.NoStandardDescriptorAccessor != nil { + s = append(s, "NoStandardDescriptorAccessor: "+valueToGoStringDescriptor(this.NoStandardDescriptorAccessor, "bool")+",\n") + } + if this.Deprecated != nil { + s = append(s, "Deprecated: "+valueToGoStringDescriptor(this.Deprecated, "bool")+",\n") + } + if this.MapEntry != nil { + s = append(s, "MapEntry: "+valueToGoStringDescriptor(this.MapEntry, "bool")+",\n") + } + if this.UninterpretedOption != nil { + s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringDescriptor(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FieldOptions) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 11) + s = append(s, "&descriptor.FieldOptions{") + if this.Ctype != nil { + s = append(s, "Ctype: "+valueToGoStringDescriptor(this.Ctype, "descriptor.FieldOptions_CType")+",\n") + } + if this.Packed != nil { + s = append(s, "Packed: "+valueToGoStringDescriptor(this.Packed, "bool")+",\n") + } + if this.Jstype != nil { + s = append(s, "Jstype: "+valueToGoStringDescriptor(this.Jstype, "descriptor.FieldOptions_JSType")+",\n") + } + if this.Lazy != nil { + s = append(s, "Lazy: "+valueToGoStringDescriptor(this.Lazy, "bool")+",\n") + } + if this.Deprecated != nil { + s = append(s, "Deprecated: "+valueToGoStringDescriptor(this.Deprecated, "bool")+",\n") + } + if this.Weak != nil { + s = append(s, "Weak: "+valueToGoStringDescriptor(this.Weak, "bool")+",\n") + } + if this.UninterpretedOption != nil { + s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringDescriptor(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OneofOptions) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&descriptor.OneofOptions{") + if this.UninterpretedOption != nil { + s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringDescriptor(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *EnumOptions) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&descriptor.EnumOptions{") + if this.AllowAlias != nil { + s = append(s, "AllowAlias: "+valueToGoStringDescriptor(this.AllowAlias, "bool")+",\n") + } + if this.Deprecated != nil { + s = append(s, "Deprecated: "+valueToGoStringDescriptor(this.Deprecated, "bool")+",\n") + } + if this.UninterpretedOption != nil { + s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringDescriptor(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *EnumValueOptions) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&descriptor.EnumValueOptions{") + if this.Deprecated != nil { + s = append(s, "Deprecated: "+valueToGoStringDescriptor(this.Deprecated, "bool")+",\n") + } + if this.UninterpretedOption != nil { + s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringDescriptor(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ServiceOptions) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&descriptor.ServiceOptions{") + if this.Deprecated != nil { + s = append(s, "Deprecated: "+valueToGoStringDescriptor(this.Deprecated, "bool")+",\n") + } + if this.UninterpretedOption != nil { + s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringDescriptor(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MethodOptions) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&descriptor.MethodOptions{") + if this.Deprecated != nil { + s = append(s, "Deprecated: "+valueToGoStringDescriptor(this.Deprecated, "bool")+",\n") + } + if this.UninterpretedOption != nil { + s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringDescriptor(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UninterpretedOption) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 11) + s = append(s, "&descriptor.UninterpretedOption{") + if this.Name != nil { + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + } + if this.IdentifierValue != nil { + s = append(s, "IdentifierValue: "+valueToGoStringDescriptor(this.IdentifierValue, "string")+",\n") + } + if this.PositiveIntValue != nil { + s = append(s, "PositiveIntValue: "+valueToGoStringDescriptor(this.PositiveIntValue, "uint64")+",\n") + } + if this.NegativeIntValue != nil { + s = append(s, "NegativeIntValue: "+valueToGoStringDescriptor(this.NegativeIntValue, "int64")+",\n") + } + if this.DoubleValue != nil { + s = append(s, "DoubleValue: "+valueToGoStringDescriptor(this.DoubleValue, "float64")+",\n") + } + if this.StringValue != nil { + s = append(s, "StringValue: "+valueToGoStringDescriptor(this.StringValue, "byte")+",\n") + } + if this.AggregateValue != nil { + s = append(s, "AggregateValue: "+valueToGoStringDescriptor(this.AggregateValue, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UninterpretedOption_NamePart) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&descriptor.UninterpretedOption_NamePart{") + if this.NamePart != nil { + s = append(s, "NamePart: "+valueToGoStringDescriptor(this.NamePart, "string")+",\n") + } + if this.IsExtension != nil { + s = append(s, "IsExtension: "+valueToGoStringDescriptor(this.IsExtension, "bool")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SourceCodeInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&descriptor.SourceCodeInfo{") + if this.Location != nil { + s = append(s, "Location: "+fmt.Sprintf("%#v", this.Location)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SourceCodeInfo_Location) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&descriptor.SourceCodeInfo_Location{") + if this.Path != nil { + s = append(s, "Path: "+fmt.Sprintf("%#v", this.Path)+",\n") + } + if this.Span != nil { + s = append(s, "Span: "+fmt.Sprintf("%#v", this.Span)+",\n") + } + if this.LeadingComments != nil { + s = append(s, "LeadingComments: "+valueToGoStringDescriptor(this.LeadingComments, "string")+",\n") + } + if this.TrailingComments != nil { + s = append(s, "TrailingComments: "+valueToGoStringDescriptor(this.TrailingComments, "string")+",\n") + } + if this.LeadingDetachedComments != nil { + s = append(s, "LeadingDetachedComments: "+fmt.Sprintf("%#v", this.LeadingDetachedComments)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GeneratedCodeInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&descriptor.GeneratedCodeInfo{") + if this.Annotation != nil { + s = append(s, "Annotation: "+fmt.Sprintf("%#v", this.Annotation)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GeneratedCodeInfo_Annotation) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&descriptor.GeneratedCodeInfo_Annotation{") + if this.Path != nil { + s = append(s, "Path: "+fmt.Sprintf("%#v", this.Path)+",\n") + } + if this.SourceFile != nil { + s = append(s, "SourceFile: "+valueToGoStringDescriptor(this.SourceFile, "string")+",\n") + } + if this.Begin != nil { + s = append(s, "Begin: "+valueToGoStringDescriptor(this.Begin, "int32")+",\n") + } + if this.End != nil { + s = append(s, "End: "+valueToGoStringDescriptor(this.End, "int32")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringDescriptor(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func extensionToGoStringDescriptor(m github_com_gogo_protobuf_proto.Message) string { + e := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(m) + if e == nil { + return "nil" + } + s := "proto.NewUnsafeXXX_InternalExtensions(map[int32]proto.Extension{" + keys := make([]int, 0, len(e)) + for k := range e { + keys = append(keys, int(k)) + } + sort.Ints(keys) + ss := []string{} + for _, k := range keys { + ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) + } + s += strings.Join(ss, ",") + "})" + return s +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_test.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_test.go new file mode 100644 index 000000000..d4248b483 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_test.go @@ -0,0 +1,31 @@ +package descriptor_test + +import ( + "fmt" + "testing" + + tpb "github.com/gogo/protobuf/proto/testdata" + "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +) + +func TestMessage(t *testing.T) { + var msg *descriptor.DescriptorProto + fd, md := descriptor.ForMessage(msg) + if pkg, want := fd.GetPackage(), "google.protobuf"; pkg != want { + t.Errorf("descriptor.ForMessage(%T).GetPackage() = %q; want %q", msg, pkg, want) + } + if name, want := md.GetName(), "DescriptorProto"; name != want { + t.Fatalf("descriptor.ForMessage(%T).GetName() = %q; want %q", msg, name, want) + } +} + +func Example_Options() { + var msg *tpb.MyMessageSet + _, md := descriptor.ForMessage(msg) + if md.GetOptions().GetMessageSetWireFormat() { + fmt.Printf("%v uses option message_set_wire_format.\n", md.GetName()) + } + + // Output: + // MyMessageSet uses option message_set_wire_format. +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/helper.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/helper.go new file mode 100644 index 000000000..e0846a357 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/helper.go @@ -0,0 +1,390 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// 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. +// +// 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. + +package descriptor + +import ( + "strings" +) + +func (msg *DescriptorProto) GetMapFields() (*FieldDescriptorProto, *FieldDescriptorProto) { + if !msg.GetOptions().GetMapEntry() { + return nil, nil + } + return msg.GetField()[0], msg.GetField()[1] +} + +func dotToUnderscore(r rune) rune { + if r == '.' { + return '_' + } + return r +} + +func (field *FieldDescriptorProto) WireType() (wire int) { + switch *field.Type { + case FieldDescriptorProto_TYPE_DOUBLE: + return 1 + case FieldDescriptorProto_TYPE_FLOAT: + return 5 + case FieldDescriptorProto_TYPE_INT64: + return 0 + case FieldDescriptorProto_TYPE_UINT64: + return 0 + case FieldDescriptorProto_TYPE_INT32: + return 0 + case FieldDescriptorProto_TYPE_UINT32: + return 0 + case FieldDescriptorProto_TYPE_FIXED64: + return 1 + case FieldDescriptorProto_TYPE_FIXED32: + return 5 + case FieldDescriptorProto_TYPE_BOOL: + return 0 + case FieldDescriptorProto_TYPE_STRING: + return 2 + case FieldDescriptorProto_TYPE_GROUP: + return 2 + case FieldDescriptorProto_TYPE_MESSAGE: + return 2 + case FieldDescriptorProto_TYPE_BYTES: + return 2 + case FieldDescriptorProto_TYPE_ENUM: + return 0 + case FieldDescriptorProto_TYPE_SFIXED32: + return 5 + case FieldDescriptorProto_TYPE_SFIXED64: + return 1 + case FieldDescriptorProto_TYPE_SINT32: + return 0 + case FieldDescriptorProto_TYPE_SINT64: + return 0 + } + panic("unreachable") +} + +func (field *FieldDescriptorProto) GetKeyUint64() (x uint64) { + packed := field.IsPacked() + wireType := field.WireType() + fieldNumber := field.GetNumber() + if packed { + wireType = 2 + } + x = uint64(uint32(fieldNumber)<<3 | uint32(wireType)) + return x +} + +func (field *FieldDescriptorProto) GetKey3Uint64() (x uint64) { + packed := field.IsPacked3() + wireType := field.WireType() + fieldNumber := field.GetNumber() + if packed { + wireType = 2 + } + x = uint64(uint32(fieldNumber)<<3 | uint32(wireType)) + return x +} + +func (field *FieldDescriptorProto) GetKey() []byte { + x := field.GetKeyUint64() + i := 0 + keybuf := make([]byte, 0) + for i = 0; x > 127; i++ { + keybuf = append(keybuf, 0x80|uint8(x&0x7F)) + x >>= 7 + } + keybuf = append(keybuf, uint8(x)) + return keybuf +} + +func (field *FieldDescriptorProto) GetKey3() []byte { + x := field.GetKey3Uint64() + i := 0 + keybuf := make([]byte, 0) + for i = 0; x > 127; i++ { + keybuf = append(keybuf, 0x80|uint8(x&0x7F)) + x >>= 7 + } + keybuf = append(keybuf, uint8(x)) + return keybuf +} + +func (desc *FileDescriptorSet) GetField(packageName, messageName, fieldName string) *FieldDescriptorProto { + msg := desc.GetMessage(packageName, messageName) + if msg == nil { + return nil + } + for _, field := range msg.GetField() { + if field.GetName() == fieldName { + return field + } + } + return nil +} + +func (file *FileDescriptorProto) GetMessage(typeName string) *DescriptorProto { + for _, msg := range file.GetMessageType() { + if msg.GetName() == typeName { + return msg + } + nes := file.GetNestedMessage(msg, strings.TrimPrefix(typeName, msg.GetName()+".")) + if nes != nil { + return nes + } + } + return nil +} + +func (file *FileDescriptorProto) GetNestedMessage(msg *DescriptorProto, typeName string) *DescriptorProto { + for _, nes := range msg.GetNestedType() { + if nes.GetName() == typeName { + return nes + } + res := file.GetNestedMessage(nes, strings.TrimPrefix(typeName, nes.GetName()+".")) + if res != nil { + return res + } + } + return nil +} + +func (desc *FileDescriptorSet) GetMessage(packageName string, typeName string) *DescriptorProto { + for _, file := range desc.GetFile() { + if strings.Map(dotToUnderscore, file.GetPackage()) != strings.Map(dotToUnderscore, packageName) { + continue + } + for _, msg := range file.GetMessageType() { + if msg.GetName() == typeName { + return msg + } + } + for _, msg := range file.GetMessageType() { + for _, nes := range msg.GetNestedType() { + if nes.GetName() == typeName { + return nes + } + if msg.GetName()+"."+nes.GetName() == typeName { + return nes + } + } + } + } + return nil +} + +func (desc *FileDescriptorSet) IsProto3(packageName string, typeName string) bool { + for _, file := range desc.GetFile() { + if strings.Map(dotToUnderscore, file.GetPackage()) != strings.Map(dotToUnderscore, packageName) { + continue + } + for _, msg := range file.GetMessageType() { + if msg.GetName() == typeName { + return file.GetSyntax() == "proto3" + } + } + for _, msg := range file.GetMessageType() { + for _, nes := range msg.GetNestedType() { + if nes.GetName() == typeName { + return file.GetSyntax() == "proto3" + } + if msg.GetName()+"."+nes.GetName() == typeName { + return file.GetSyntax() == "proto3" + } + } + } + } + return false +} + +func (msg *DescriptorProto) IsExtendable() bool { + return len(msg.GetExtensionRange()) > 0 +} + +func (desc *FileDescriptorSet) FindExtension(packageName string, typeName string, fieldName string) (extPackageName string, field *FieldDescriptorProto) { + parent := desc.GetMessage(packageName, typeName) + if parent == nil { + return "", nil + } + if !parent.IsExtendable() { + return "", nil + } + extendee := "." + packageName + "." + typeName + for _, file := range desc.GetFile() { + for _, ext := range file.GetExtension() { + if strings.Map(dotToUnderscore, file.GetPackage()) == strings.Map(dotToUnderscore, packageName) { + if !(ext.GetExtendee() == typeName || ext.GetExtendee() == extendee) { + continue + } + } else { + if ext.GetExtendee() != extendee { + continue + } + } + if ext.GetName() == fieldName { + return file.GetPackage(), ext + } + } + } + return "", nil +} + +func (desc *FileDescriptorSet) FindExtensionByFieldNumber(packageName string, typeName string, fieldNum int32) (extPackageName string, field *FieldDescriptorProto) { + parent := desc.GetMessage(packageName, typeName) + if parent == nil { + return "", nil + } + if !parent.IsExtendable() { + return "", nil + } + extendee := "." + packageName + "." + typeName + for _, file := range desc.GetFile() { + for _, ext := range file.GetExtension() { + if strings.Map(dotToUnderscore, file.GetPackage()) == strings.Map(dotToUnderscore, packageName) { + if !(ext.GetExtendee() == typeName || ext.GetExtendee() == extendee) { + continue + } + } else { + if ext.GetExtendee() != extendee { + continue + } + } + if ext.GetNumber() == fieldNum { + return file.GetPackage(), ext + } + } + } + return "", nil +} + +func (desc *FileDescriptorSet) FindMessage(packageName string, typeName string, fieldName string) (msgPackageName string, msgName string) { + parent := desc.GetMessage(packageName, typeName) + if parent == nil { + return "", "" + } + field := parent.GetFieldDescriptor(fieldName) + if field == nil { + var extPackageName string + extPackageName, field = desc.FindExtension(packageName, typeName, fieldName) + if field == nil { + return "", "" + } + packageName = extPackageName + } + typeNames := strings.Split(field.GetTypeName(), ".") + if len(typeNames) == 1 { + msg := desc.GetMessage(packageName, typeName) + if msg == nil { + return "", "" + } + return packageName, msg.GetName() + } + if len(typeNames) > 2 { + for i := 1; i < len(typeNames)-1; i++ { + packageName = strings.Join(typeNames[1:len(typeNames)-i], ".") + typeName = strings.Join(typeNames[len(typeNames)-i:], ".") + msg := desc.GetMessage(packageName, typeName) + if msg != nil { + typeNames := strings.Split(msg.GetName(), ".") + if len(typeNames) == 1 { + return packageName, msg.GetName() + } + return strings.Join(typeNames[1:len(typeNames)-1], "."), typeNames[len(typeNames)-1] + } + } + } + return "", "" +} + +func (msg *DescriptorProto) GetFieldDescriptor(fieldName string) *FieldDescriptorProto { + for _, field := range msg.GetField() { + if field.GetName() == fieldName { + return field + } + } + return nil +} + +func (desc *FileDescriptorSet) GetEnum(packageName string, typeName string) *EnumDescriptorProto { + for _, file := range desc.GetFile() { + if strings.Map(dotToUnderscore, file.GetPackage()) != strings.Map(dotToUnderscore, packageName) { + continue + } + for _, enum := range file.GetEnumType() { + if enum.GetName() == typeName { + return enum + } + } + } + return nil +} + +func (f *FieldDescriptorProto) IsEnum() bool { + return *f.Type == FieldDescriptorProto_TYPE_ENUM +} + +func (f *FieldDescriptorProto) IsMessage() bool { + return *f.Type == FieldDescriptorProto_TYPE_MESSAGE +} + +func (f *FieldDescriptorProto) IsBytes() bool { + return *f.Type == FieldDescriptorProto_TYPE_BYTES +} + +func (f *FieldDescriptorProto) IsRepeated() bool { + return f.Label != nil && *f.Label == FieldDescriptorProto_LABEL_REPEATED +} + +func (f *FieldDescriptorProto) IsString() bool { + return *f.Type == FieldDescriptorProto_TYPE_STRING +} + +func (f *FieldDescriptorProto) IsBool() bool { + return *f.Type == FieldDescriptorProto_TYPE_BOOL +} + +func (f *FieldDescriptorProto) IsRequired() bool { + return f.Label != nil && *f.Label == FieldDescriptorProto_LABEL_REQUIRED +} + +func (f *FieldDescriptorProto) IsPacked() bool { + return f.Options != nil && f.GetOptions().GetPacked() +} + +func (f *FieldDescriptorProto) IsPacked3() bool { + if f.IsRepeated() && f.IsScalar() { + if f.Options == nil || f.GetOptions().Packed == nil { + return true + } + return f.Options != nil && f.GetOptions().GetPacked() + } + return false +} + +func (m *DescriptorProto) HasExtension() bool { + return len(m.ExtensionRange) > 0 +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/doc.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/doc.go new file mode 100644 index 000000000..15c7cf43c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/doc.go @@ -0,0 +1,51 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +/* + A plugin for the Google protocol buffer compiler to generate Go code. + Run it by building this program and putting it in your path with the name + protoc-gen-gogo + That word 'gogo' at the end becomes part of the option string set for the + protocol compiler, so once the protocol compiler (protoc) is installed + you can run + protoc --gogo_out=output_directory input_directory/file.proto + to generate Go bindings for the protocol defined by file.proto. + With that input, the output will be written to + output_directory/go_package/file.pb.go + + The generated code is documented in the package comment for + the library. + + See the README and documentation for protocol buffers to learn more: + https://developers.google.com/protocol-buffers/ + +*/ +package documentation diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/main.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/main.go new file mode 100644 index 000000000..dd8e79503 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/main.go @@ -0,0 +1,57 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +// protoc-gen-go is a plugin for the Google protocol buffer compiler to generate +// Go code. Run it by building this program and putting it in your path with +// the name +// protoc-gen-gogo +// That word 'gogo' at the end becomes part of the option string set for the +// protocol compiler, so once the protocol compiler (protoc) is installed +// you can run +// protoc --gogo_out=output_directory input_directory/file.proto +// to generate Go bindings for the protocol defined by file.proto. +// With that input, the output will be written to +// output_directory/file.pb.go +// +// The generated code is documented in the package comment for +// the library. +// +// See the README and documentation for protocol buffers to learn more: +// https://developers.google.com/protocol-buffers/ +package main + +import ( + "github.com/gogo/protobuf/vanity/command" +) + +func main() { + command.Write(command.Generate(command.Read())) +} diff --git a/vendor/github.com/golang/glog/README b/vendor/github.com/golang/glog/README index 5f9c11485..387b4eb68 100644 --- a/vendor/github.com/golang/glog/README +++ b/vendor/github.com/golang/glog/README @@ -5,7 +5,7 @@ Leveled execution logs for Go. This is an efficient pure Go implementation of leveled logs in the manner of the open source C++ package - http://code.google.com/p/google-glog + https://github.com/google/glog By binding methods to booleans it is possible to use the log package without paying the expense of evaluating the arguments to the log. diff --git a/vendor/github.com/golang/glog/glog.go b/vendor/github.com/golang/glog/glog.go index 3e63fffd5..54bd7afdc 100644 --- a/vendor/github.com/golang/glog/glog.go +++ b/vendor/github.com/golang/glog/glog.go @@ -676,7 +676,10 @@ func (l *loggingT) output(s severity, buf *buffer, file string, line int, alsoTo } } data := buf.Bytes() - if l.toStderr { + if !flag.Parsed() { + os.Stderr.Write([]byte("ERROR: logging before flag.Parse: ")) + os.Stderr.Write(data) + } else if l.toStderr { os.Stderr.Write(data) } else { if alsoToStderr || l.alsoToStderr || s >= l.stderrThreshold.get() { diff --git a/vendor/github.com/golang/glog/glog_test.go b/vendor/github.com/golang/glog/glog_test.go new file mode 100644 index 000000000..0fb376e1f --- /dev/null +++ b/vendor/github.com/golang/glog/glog_test.go @@ -0,0 +1,415 @@ +// Go support for leveled logs, analogous to https://code.google.com/p/google-glog/ +// +// Copyright 2013 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package glog + +import ( + "bytes" + "fmt" + stdLog "log" + "path/filepath" + "runtime" + "strconv" + "strings" + "testing" + "time" +) + +// Test that shortHostname works as advertised. +func TestShortHostname(t *testing.T) { + for hostname, expect := range map[string]string{ + "": "", + "host": "host", + "host.google.com": "host", + } { + if got := shortHostname(hostname); expect != got { + t.Errorf("shortHostname(%q): expected %q, got %q", hostname, expect, got) + } + } +} + +// flushBuffer wraps a bytes.Buffer to satisfy flushSyncWriter. +type flushBuffer struct { + bytes.Buffer +} + +func (f *flushBuffer) Flush() error { + return nil +} + +func (f *flushBuffer) Sync() error { + return nil +} + +// swap sets the log writers and returns the old array. +func (l *loggingT) swap(writers [numSeverity]flushSyncWriter) (old [numSeverity]flushSyncWriter) { + l.mu.Lock() + defer l.mu.Unlock() + old = l.file + for i, w := range writers { + logging.file[i] = w + } + return +} + +// newBuffers sets the log writers to all new byte buffers and returns the old array. +func (l *loggingT) newBuffers() [numSeverity]flushSyncWriter { + return l.swap([numSeverity]flushSyncWriter{new(flushBuffer), new(flushBuffer), new(flushBuffer), new(flushBuffer)}) +} + +// contents returns the specified log value as a string. +func contents(s severity) string { + return logging.file[s].(*flushBuffer).String() +} + +// contains reports whether the string is contained in the log. +func contains(s severity, str string, t *testing.T) bool { + return strings.Contains(contents(s), str) +} + +// setFlags configures the logging flags how the test expects them. +func setFlags() { + logging.toStderr = false +} + +// Test that Info works as advertised. +func TestInfo(t *testing.T) { + setFlags() + defer logging.swap(logging.newBuffers()) + Info("test") + if !contains(infoLog, "I", t) { + t.Errorf("Info has wrong character: %q", contents(infoLog)) + } + if !contains(infoLog, "test", t) { + t.Error("Info failed") + } +} + +func TestInfoDepth(t *testing.T) { + setFlags() + defer logging.swap(logging.newBuffers()) + + f := func() { InfoDepth(1, "depth-test1") } + + // The next three lines must stay together + _, _, wantLine, _ := runtime.Caller(0) + InfoDepth(0, "depth-test0") + f() + + msgs := strings.Split(strings.TrimSuffix(contents(infoLog), "\n"), "\n") + if len(msgs) != 2 { + t.Fatalf("Got %d lines, expected 2", len(msgs)) + } + + for i, m := range msgs { + if !strings.HasPrefix(m, "I") { + t.Errorf("InfoDepth[%d] has wrong character: %q", i, m) + } + w := fmt.Sprintf("depth-test%d", i) + if !strings.Contains(m, w) { + t.Errorf("InfoDepth[%d] missing %q: %q", i, w, m) + } + + // pull out the line number (between : and ]) + msg := m[strings.LastIndex(m, ":")+1:] + x := strings.Index(msg, "]") + if x < 0 { + t.Errorf("InfoDepth[%d]: missing ']': %q", i, m) + continue + } + line, err := strconv.Atoi(msg[:x]) + if err != nil { + t.Errorf("InfoDepth[%d]: bad line number: %q", i, m) + continue + } + wantLine++ + if wantLine != line { + t.Errorf("InfoDepth[%d]: got line %d, want %d", i, line, wantLine) + } + } +} + +func init() { + CopyStandardLogTo("INFO") +} + +// Test that CopyStandardLogTo panics on bad input. +func TestCopyStandardLogToPanic(t *testing.T) { + defer func() { + if s, ok := recover().(string); !ok || !strings.Contains(s, "LOG") { + t.Errorf(`CopyStandardLogTo("LOG") should have panicked: %v`, s) + } + }() + CopyStandardLogTo("LOG") +} + +// Test that using the standard log package logs to INFO. +func TestStandardLog(t *testing.T) { + setFlags() + defer logging.swap(logging.newBuffers()) + stdLog.Print("test") + if !contains(infoLog, "I", t) { + t.Errorf("Info has wrong character: %q", contents(infoLog)) + } + if !contains(infoLog, "test", t) { + t.Error("Info failed") + } +} + +// Test that the header has the correct format. +func TestHeader(t *testing.T) { + setFlags() + defer logging.swap(logging.newBuffers()) + defer func(previous func() time.Time) { timeNow = previous }(timeNow) + timeNow = func() time.Time { + return time.Date(2006, 1, 2, 15, 4, 5, .067890e9, time.Local) + } + pid = 1234 + Info("test") + var line int + format := "I0102 15:04:05.067890 1234 glog_test.go:%d] test\n" + n, err := fmt.Sscanf(contents(infoLog), format, &line) + if n != 1 || err != nil { + t.Errorf("log format error: %d elements, error %s:\n%s", n, err, contents(infoLog)) + } + // Scanf treats multiple spaces as equivalent to a single space, + // so check for correct space-padding also. + want := fmt.Sprintf(format, line) + if contents(infoLog) != want { + t.Errorf("log format error: got:\n\t%q\nwant:\t%q", contents(infoLog), want) + } +} + +// Test that an Error log goes to Warning and Info. +// Even in the Info log, the source character will be E, so the data should +// all be identical. +func TestError(t *testing.T) { + setFlags() + defer logging.swap(logging.newBuffers()) + Error("test") + if !contains(errorLog, "E", t) { + t.Errorf("Error has wrong character: %q", contents(errorLog)) + } + if !contains(errorLog, "test", t) { + t.Error("Error failed") + } + str := contents(errorLog) + if !contains(warningLog, str, t) { + t.Error("Warning failed") + } + if !contains(infoLog, str, t) { + t.Error("Info failed") + } +} + +// Test that a Warning log goes to Info. +// Even in the Info log, the source character will be W, so the data should +// all be identical. +func TestWarning(t *testing.T) { + setFlags() + defer logging.swap(logging.newBuffers()) + Warning("test") + if !contains(warningLog, "W", t) { + t.Errorf("Warning has wrong character: %q", contents(warningLog)) + } + if !contains(warningLog, "test", t) { + t.Error("Warning failed") + } + str := contents(warningLog) + if !contains(infoLog, str, t) { + t.Error("Info failed") + } +} + +// Test that a V log goes to Info. +func TestV(t *testing.T) { + setFlags() + defer logging.swap(logging.newBuffers()) + logging.verbosity.Set("2") + defer logging.verbosity.Set("0") + V(2).Info("test") + if !contains(infoLog, "I", t) { + t.Errorf("Info has wrong character: %q", contents(infoLog)) + } + if !contains(infoLog, "test", t) { + t.Error("Info failed") + } +} + +// Test that a vmodule enables a log in this file. +func TestVmoduleOn(t *testing.T) { + setFlags() + defer logging.swap(logging.newBuffers()) + logging.vmodule.Set("glog_test=2") + defer logging.vmodule.Set("") + if !V(1) { + t.Error("V not enabled for 1") + } + if !V(2) { + t.Error("V not enabled for 2") + } + if V(3) { + t.Error("V enabled for 3") + } + V(2).Info("test") + if !contains(infoLog, "I", t) { + t.Errorf("Info has wrong character: %q", contents(infoLog)) + } + if !contains(infoLog, "test", t) { + t.Error("Info failed") + } +} + +// Test that a vmodule of another file does not enable a log in this file. +func TestVmoduleOff(t *testing.T) { + setFlags() + defer logging.swap(logging.newBuffers()) + logging.vmodule.Set("notthisfile=2") + defer logging.vmodule.Set("") + for i := 1; i <= 3; i++ { + if V(Level(i)) { + t.Errorf("V enabled for %d", i) + } + } + V(2).Info("test") + if contents(infoLog) != "" { + t.Error("V logged incorrectly") + } +} + +// vGlobs are patterns that match/don't match this file at V=2. +var vGlobs = map[string]bool{ + // Easy to test the numeric match here. + "glog_test=1": false, // If -vmodule sets V to 1, V(2) will fail. + "glog_test=2": true, + "glog_test=3": true, // If -vmodule sets V to 1, V(3) will succeed. + // These all use 2 and check the patterns. All are true. + "*=2": true, + "?l*=2": true, + "????_*=2": true, + "??[mno]?_*t=2": true, + // These all use 2 and check the patterns. All are false. + "*x=2": false, + "m*=2": false, + "??_*=2": false, + "?[abc]?_*t=2": false, +} + +// Test that vmodule globbing works as advertised. +func testVmoduleGlob(pat string, match bool, t *testing.T) { + setFlags() + defer logging.swap(logging.newBuffers()) + defer logging.vmodule.Set("") + logging.vmodule.Set(pat) + if V(2) != Verbose(match) { + t.Errorf("incorrect match for %q: got %t expected %t", pat, V(2), match) + } +} + +// Test that a vmodule globbing works as advertised. +func TestVmoduleGlob(t *testing.T) { + for glob, match := range vGlobs { + testVmoduleGlob(glob, match, t) + } +} + +func TestRollover(t *testing.T) { + setFlags() + var err error + defer func(previous func(error)) { logExitFunc = previous }(logExitFunc) + logExitFunc = func(e error) { + err = e + } + defer func(previous uint64) { MaxSize = previous }(MaxSize) + MaxSize = 512 + + Info("x") // Be sure we have a file. + info, ok := logging.file[infoLog].(*syncBuffer) + if !ok { + t.Fatal("info wasn't created") + } + if err != nil { + t.Fatalf("info has initial error: %v", err) + } + fname0 := info.file.Name() + Info(strings.Repeat("x", int(MaxSize))) // force a rollover + if err != nil { + t.Fatalf("info has error after big write: %v", err) + } + + // Make sure the next log file gets a file name with a different + // time stamp. + // + // TODO: determine whether we need to support subsecond log + // rotation. C++ does not appear to handle this case (nor does it + // handle Daylight Savings Time properly). + time.Sleep(1 * time.Second) + + Info("x") // create a new file + if err != nil { + t.Fatalf("error after rotation: %v", err) + } + fname1 := info.file.Name() + if fname0 == fname1 { + t.Errorf("info.f.Name did not change: %v", fname0) + } + if info.nbytes >= MaxSize { + t.Errorf("file size was not reset: %d", info.nbytes) + } +} + +func TestLogBacktraceAt(t *testing.T) { + setFlags() + defer logging.swap(logging.newBuffers()) + // The peculiar style of this code simplifies line counting and maintenance of the + // tracing block below. + var infoLine string + setTraceLocation := func(file string, line int, ok bool, delta int) { + if !ok { + t.Fatal("could not get file:line") + } + _, file = filepath.Split(file) + infoLine = fmt.Sprintf("%s:%d", file, line+delta) + err := logging.traceLocation.Set(infoLine) + if err != nil { + t.Fatal("error setting log_backtrace_at: ", err) + } + } + { + // Start of tracing block. These lines know about each other's relative position. + _, file, line, ok := runtime.Caller(0) + setTraceLocation(file, line, ok, +2) // Two lines between Caller and Info calls. + Info("we want a stack trace here") + } + numAppearances := strings.Count(contents(infoLog), infoLine) + if numAppearances < 2 { + // Need 2 appearances, one in the log header and one in the trace: + // log_test.go:281: I0511 16:36:06.952398 02238 log_test.go:280] we want a stack trace here + // ... + // github.com/glog/glog_test.go:280 (0x41ba91) + // ... + // We could be more precise but that would require knowing the details + // of the traceback format, which may not be dependable. + t.Fatal("got no trace back; log is ", contents(infoLog)) + } +} + +func BenchmarkHeader(b *testing.B) { + for i := 0; i < b.N; i++ { + buf, _, _ := logging.header(infoLog, 0) + logging.putBuffer(buf) + } +} diff --git a/vendor/github.com/golang/groupcache/.gitignore b/vendor/github.com/golang/groupcache/.gitignore new file mode 100644 index 000000000..b25c15b81 --- /dev/null +++ b/vendor/github.com/golang/groupcache/.gitignore @@ -0,0 +1 @@ +*~ diff --git a/vendor/github.com/golang/groupcache/README.md b/vendor/github.com/golang/groupcache/README.md new file mode 100644 index 000000000..70c29da16 --- /dev/null +++ b/vendor/github.com/golang/groupcache/README.md @@ -0,0 +1,73 @@ +# groupcache + +## Summary + +groupcache is a caching and cache-filling library, intended as a +replacement for memcached in many cases. + +For API docs and examples, see http://godoc.org/github.com/golang/groupcache + +## Comparison to memcached + +### **Like memcached**, groupcache: + + * shards by key to select which peer is responsible for that key + +### **Unlike memcached**, groupcache: + + * does not require running a separate set of servers, thus massively + reducing deployment/configuration pain. groupcache is a client + library as well as a server. It connects to its own peers. + + * comes with a cache filling mechanism. Whereas memcached just says + "Sorry, cache miss", often resulting in a thundering herd of + database (or whatever) loads from an unbounded number of clients + (which has resulted in several fun outages), groupcache coordinates + cache fills such that only one load in one process of an entire + replicated set of processes populates the cache, then multiplexes + the loaded value to all callers. + + * does not support versioned values. If key "foo" is value "bar", + key "foo" must always be "bar". There are neither cache expiration + times, nor explicit cache evictions. Thus there is also no CAS, + nor Increment/Decrement. This also means that groupcache.... + + * ... supports automatic mirroring of super-hot items to multiple + processes. This prevents memcached hot spotting where a machine's + CPU and/or NIC are overloaded by very popular keys/values. + + * is currently only available for Go. It's very unlikely that I + (bradfitz@) will port the code to any other language. + +## Loading process + +In a nutshell, a groupcache lookup of **Get("foo")** looks like: + +(On machine #5 of a set of N machines running the same code) + + 1. Is the value of "foo" in local memory because it's super hot? If so, use it. + + 2. Is the value of "foo" in local memory because peer #5 (the current + peer) is the owner of it? If so, use it. + + 3. Amongst all the peers in my set of N, am I the owner of the key + "foo"? (e.g. does it consistent hash to 5?) If so, load it. If + other callers come in, via the same process or via RPC requests + from peers, they block waiting for the load to finish and get the + same answer. If not, RPC to the peer that's the owner and get + the answer. If the RPC fails, just load it locally (still with + local dup suppression). + +## Users + +groupcache is in production use by dl.google.com (its original user), +parts of Blogger, parts of Google Code, parts of Google Fiber, parts +of Google production monitoring systems, etc. + +## Presentations + +See http://talks.golang.org/2013/oscon-dl.slide + +## Help + +Use the golang-nuts mailing list for any discussion or questions. diff --git a/vendor/github.com/golang/groupcache/byteview.go b/vendor/github.com/golang/groupcache/byteview.go new file mode 100644 index 000000000..a2c2c493d --- /dev/null +++ b/vendor/github.com/golang/groupcache/byteview.go @@ -0,0 +1,175 @@ +/* +Copyright 2012 Google Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package groupcache + +import ( + "bytes" + "errors" + "io" + "strings" +) + +// A ByteView holds an immutable view of bytes. +// Internally it wraps either a []byte or a string, +// but that detail is invisible to callers. +// +// A ByteView is meant to be used as a value type, not +// a pointer (like a time.Time). +type ByteView struct { + // If b is non-nil, b is used, else s is used. + b []byte + s string +} + +// Len returns the view's length. +func (v ByteView) Len() int { + if v.b != nil { + return len(v.b) + } + return len(v.s) +} + +// ByteSlice returns a copy of the data as a byte slice. +func (v ByteView) ByteSlice() []byte { + if v.b != nil { + return cloneBytes(v.b) + } + return []byte(v.s) +} + +// String returns the data as a string, making a copy if necessary. +func (v ByteView) String() string { + if v.b != nil { + return string(v.b) + } + return v.s +} + +// At returns the byte at index i. +func (v ByteView) At(i int) byte { + if v.b != nil { + return v.b[i] + } + return v.s[i] +} + +// Slice slices the view between the provided from and to indices. +func (v ByteView) Slice(from, to int) ByteView { + if v.b != nil { + return ByteView{b: v.b[from:to]} + } + return ByteView{s: v.s[from:to]} +} + +// SliceFrom slices the view from the provided index until the end. +func (v ByteView) SliceFrom(from int) ByteView { + if v.b != nil { + return ByteView{b: v.b[from:]} + } + return ByteView{s: v.s[from:]} +} + +// Copy copies b into dest and returns the number of bytes copied. +func (v ByteView) Copy(dest []byte) int { + if v.b != nil { + return copy(dest, v.b) + } + return copy(dest, v.s) +} + +// Equal returns whether the bytes in b are the same as the bytes in +// b2. +func (v ByteView) Equal(b2 ByteView) bool { + if b2.b == nil { + return v.EqualString(b2.s) + } + return v.EqualBytes(b2.b) +} + +// EqualString returns whether the bytes in b are the same as the bytes +// in s. +func (v ByteView) EqualString(s string) bool { + if v.b == nil { + return v.s == s + } + l := v.Len() + if len(s) != l { + return false + } + for i, bi := range v.b { + if bi != s[i] { + return false + } + } + return true +} + +// EqualBytes returns whether the bytes in b are the same as the bytes +// in b2. +func (v ByteView) EqualBytes(b2 []byte) bool { + if v.b != nil { + return bytes.Equal(v.b, b2) + } + l := v.Len() + if len(b2) != l { + return false + } + for i, bi := range b2 { + if bi != v.s[i] { + return false + } + } + return true +} + +// Reader returns an io.ReadSeeker for the bytes in v. +func (v ByteView) Reader() io.ReadSeeker { + if v.b != nil { + return bytes.NewReader(v.b) + } + return strings.NewReader(v.s) +} + +// ReadAt implements io.ReaderAt on the bytes in v. +func (v ByteView) ReadAt(p []byte, off int64) (n int, err error) { + if off < 0 { + return 0, errors.New("view: invalid offset") + } + if off >= int64(v.Len()) { + return 0, io.EOF + } + n = v.SliceFrom(int(off)).Copy(p) + if n < len(p) { + err = io.EOF + } + return +} + +// WriteTo implements io.WriterTo on the bytes in v. +func (v ByteView) WriteTo(w io.Writer) (n int64, err error) { + var m int + if v.b != nil { + m, err = w.Write(v.b) + } else { + m, err = io.WriteString(w, v.s) + } + if err == nil && m < v.Len() { + err = io.ErrShortWrite + } + n = int64(m) + return +} diff --git a/vendor/github.com/golang/groupcache/byteview_test.go b/vendor/github.com/golang/groupcache/byteview_test.go new file mode 100644 index 000000000..a09757aa8 --- /dev/null +++ b/vendor/github.com/golang/groupcache/byteview_test.go @@ -0,0 +1,147 @@ +/* +Copyright 2012 Google Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package groupcache + +import ( + "bytes" + "fmt" + "io" + "io/ioutil" + "testing" +) + +func TestByteView(t *testing.T) { + for _, s := range []string{"", "x", "yy"} { + for _, v := range []ByteView{of([]byte(s)), of(s)} { + name := fmt.Sprintf("string %q, view %+v", s, v) + if v.Len() != len(s) { + t.Errorf("%s: Len = %d; want %d", name, v.Len(), len(s)) + } + if v.String() != s { + t.Errorf("%s: String = %q; want %q", name, v.String(), s) + } + var longDest [3]byte + if n := v.Copy(longDest[:]); n != len(s) { + t.Errorf("%s: long Copy = %d; want %d", name, n, len(s)) + } + var shortDest [1]byte + if n := v.Copy(shortDest[:]); n != min(len(s), 1) { + t.Errorf("%s: short Copy = %d; want %d", name, n, min(len(s), 1)) + } + if got, err := ioutil.ReadAll(v.Reader()); err != nil || string(got) != s { + t.Errorf("%s: Reader = %q, %v; want %q", name, got, err, s) + } + if got, err := ioutil.ReadAll(io.NewSectionReader(v, 0, int64(len(s)))); err != nil || string(got) != s { + t.Errorf("%s: SectionReader of ReaderAt = %q, %v; want %q", name, got, err, s) + } + var dest bytes.Buffer + if _, err := v.WriteTo(&dest); err != nil || !bytes.Equal(dest.Bytes(), []byte(s)) { + t.Errorf("%s: WriteTo = %q, %v; want %q", name, dest.Bytes(), err, s) + } + } + } +} + +// of returns a byte view of the []byte or string in x. +func of(x interface{}) ByteView { + if bytes, ok := x.([]byte); ok { + return ByteView{b: bytes} + } + return ByteView{s: x.(string)} +} + +func TestByteViewEqual(t *testing.T) { + tests := []struct { + a interface{} // string or []byte + b interface{} // string or []byte + want bool + }{ + {"x", "x", true}, + {"x", "y", false}, + {"x", "yy", false}, + {[]byte("x"), []byte("x"), true}, + {[]byte("x"), []byte("y"), false}, + {[]byte("x"), []byte("yy"), false}, + {[]byte("x"), "x", true}, + {[]byte("x"), "y", false}, + {[]byte("x"), "yy", false}, + {"x", []byte("x"), true}, + {"x", []byte("y"), false}, + {"x", []byte("yy"), false}, + } + for i, tt := range tests { + va := of(tt.a) + if bytes, ok := tt.b.([]byte); ok { + if got := va.EqualBytes(bytes); got != tt.want { + t.Errorf("%d. EqualBytes = %v; want %v", i, got, tt.want) + } + } else { + if got := va.EqualString(tt.b.(string)); got != tt.want { + t.Errorf("%d. EqualString = %v; want %v", i, got, tt.want) + } + } + if got := va.Equal(of(tt.b)); got != tt.want { + t.Errorf("%d. Equal = %v; want %v", i, got, tt.want) + } + } +} + +func TestByteViewSlice(t *testing.T) { + tests := []struct { + in string + from int + to interface{} // nil to mean the end (SliceFrom); else int + want string + }{ + { + in: "abc", + from: 1, + to: 2, + want: "b", + }, + { + in: "abc", + from: 1, + want: "bc", + }, + { + in: "abc", + to: 2, + want: "ab", + }, + } + for i, tt := range tests { + for _, v := range []ByteView{of([]byte(tt.in)), of(tt.in)} { + name := fmt.Sprintf("test %d, view %+v", i, v) + if tt.to != nil { + v = v.Slice(tt.from, tt.to.(int)) + } else { + v = v.SliceFrom(tt.from) + } + if v.String() != tt.want { + t.Errorf("%s: got %q; want %q", name, v.String(), tt.want) + } + } + } +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} diff --git a/vendor/github.com/golang/groupcache/groupcache.go b/vendor/github.com/golang/groupcache/groupcache.go new file mode 100644 index 000000000..316ca4940 --- /dev/null +++ b/vendor/github.com/golang/groupcache/groupcache.go @@ -0,0 +1,491 @@ +/* +Copyright 2012 Google Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package groupcache provides a data loading mechanism with caching +// and de-duplication that works across a set of peer processes. +// +// Each data Get first consults its local cache, otherwise delegates +// to the requested key's canonical owner, which then checks its cache +// or finally gets the data. In the common case, many concurrent +// cache misses across a set of peers for the same key result in just +// one cache fill. +package groupcache + +import ( + "errors" + "math/rand" + "strconv" + "sync" + "sync/atomic" + + pb "github.com/golang/groupcache/groupcachepb" + "github.com/golang/groupcache/lru" + "github.com/golang/groupcache/singleflight" +) + +// A Getter loads data for a key. +type Getter interface { + // Get returns the value identified by key, populating dest. + // + // The returned data must be unversioned. That is, key must + // uniquely describe the loaded data, without an implicit + // current time, and without relying on cache expiration + // mechanisms. + Get(ctx Context, key string, dest Sink) error +} + +// A GetterFunc implements Getter with a function. +type GetterFunc func(ctx Context, key string, dest Sink) error + +func (f GetterFunc) Get(ctx Context, key string, dest Sink) error { + return f(ctx, key, dest) +} + +var ( + mu sync.RWMutex + groups = make(map[string]*Group) + + initPeerServerOnce sync.Once + initPeerServer func() +) + +// GetGroup returns the named group previously created with NewGroup, or +// nil if there's no such group. +func GetGroup(name string) *Group { + mu.RLock() + g := groups[name] + mu.RUnlock() + return g +} + +// NewGroup creates a coordinated group-aware Getter from a Getter. +// +// The returned Getter tries (but does not guarantee) to run only one +// Get call at once for a given key across an entire set of peer +// processes. Concurrent callers both in the local process and in +// other processes receive copies of the answer once the original Get +// completes. +// +// The group name must be unique for each getter. +func NewGroup(name string, cacheBytes int64, getter Getter) *Group { + return newGroup(name, cacheBytes, getter, nil) +} + +// If peers is nil, the peerPicker is called via a sync.Once to initialize it. +func newGroup(name string, cacheBytes int64, getter Getter, peers PeerPicker) *Group { + if getter == nil { + panic("nil Getter") + } + mu.Lock() + defer mu.Unlock() + initPeerServerOnce.Do(callInitPeerServer) + if _, dup := groups[name]; dup { + panic("duplicate registration of group " + name) + } + g := &Group{ + name: name, + getter: getter, + peers: peers, + cacheBytes: cacheBytes, + loadGroup: &singleflight.Group{}, + } + if fn := newGroupHook; fn != nil { + fn(g) + } + groups[name] = g + return g +} + +// newGroupHook, if non-nil, is called right after a new group is created. +var newGroupHook func(*Group) + +// RegisterNewGroupHook registers a hook that is run each time +// a group is created. +func RegisterNewGroupHook(fn func(*Group)) { + if newGroupHook != nil { + panic("RegisterNewGroupHook called more than once") + } + newGroupHook = fn +} + +// RegisterServerStart registers a hook that is run when the first +// group is created. +func RegisterServerStart(fn func()) { + if initPeerServer != nil { + panic("RegisterServerStart called more than once") + } + initPeerServer = fn +} + +func callInitPeerServer() { + if initPeerServer != nil { + initPeerServer() + } +} + +// A Group is a cache namespace and associated data loaded spread over +// a group of 1 or more machines. +type Group struct { + name string + getter Getter + peersOnce sync.Once + peers PeerPicker + cacheBytes int64 // limit for sum of mainCache and hotCache size + + // mainCache is a cache of the keys for which this process + // (amongst its peers) is authoritative. That is, this cache + // contains keys which consistent hash on to this process's + // peer number. + mainCache cache + + // hotCache contains keys/values for which this peer is not + // authoritative (otherwise they would be in mainCache), but + // are popular enough to warrant mirroring in this process to + // avoid going over the network to fetch from a peer. Having + // a hotCache avoids network hotspotting, where a peer's + // network card could become the bottleneck on a popular key. + // This cache is used sparingly to maximize the total number + // of key/value pairs that can be stored globally. + hotCache cache + + // loadGroup ensures that each key is only fetched once + // (either locally or remotely), regardless of the number of + // concurrent callers. + loadGroup flightGroup + + _ int32 // force Stats to be 8-byte aligned on 32-bit platforms + + // Stats are statistics on the group. + Stats Stats +} + +// flightGroup is defined as an interface which flightgroup.Group +// satisfies. We define this so that we may test with an alternate +// implementation. +type flightGroup interface { + // Done is called when Do is done. + Do(key string, fn func() (interface{}, error)) (interface{}, error) +} + +// Stats are per-group statistics. +type Stats struct { + Gets AtomicInt // any Get request, including from peers + CacheHits AtomicInt // either cache was good + PeerLoads AtomicInt // either remote load or remote cache hit (not an error) + PeerErrors AtomicInt + Loads AtomicInt // (gets - cacheHits) + LoadsDeduped AtomicInt // after singleflight + LocalLoads AtomicInt // total good local loads + LocalLoadErrs AtomicInt // total bad local loads + ServerRequests AtomicInt // gets that came over the network from peers +} + +// Name returns the name of the group. +func (g *Group) Name() string { + return g.name +} + +func (g *Group) initPeers() { + if g.peers == nil { + g.peers = getPeers(g.name) + } +} + +func (g *Group) Get(ctx Context, key string, dest Sink) error { + g.peersOnce.Do(g.initPeers) + g.Stats.Gets.Add(1) + if dest == nil { + return errors.New("groupcache: nil dest Sink") + } + value, cacheHit := g.lookupCache(key) + + if cacheHit { + g.Stats.CacheHits.Add(1) + return setSinkView(dest, value) + } + + // Optimization to avoid double unmarshalling or copying: keep + // track of whether the dest was already populated. One caller + // (if local) will set this; the losers will not. The common + // case will likely be one caller. + destPopulated := false + value, destPopulated, err := g.load(ctx, key, dest) + if err != nil { + return err + } + if destPopulated { + return nil + } + return setSinkView(dest, value) +} + +// load loads key either by invoking the getter locally or by sending it to another machine. +func (g *Group) load(ctx Context, key string, dest Sink) (value ByteView, destPopulated bool, err error) { + g.Stats.Loads.Add(1) + viewi, err := g.loadGroup.Do(key, func() (interface{}, error) { + // Check the cache again because singleflight can only dedup calls + // that overlap concurrently. It's possible for 2 concurrent + // requests to miss the cache, resulting in 2 load() calls. An + // unfortunate goroutine scheduling would result in this callback + // being run twice, serially. If we don't check the cache again, + // cache.nbytes would be incremented below even though there will + // be only one entry for this key. + // + // Consider the following serialized event ordering for two + // goroutines in which this callback gets called twice for hte + // same key: + // 1: Get("key") + // 2: Get("key") + // 1: lookupCache("key") + // 2: lookupCache("key") + // 1: load("key") + // 2: load("key") + // 1: loadGroup.Do("key", fn) + // 1: fn() + // 2: loadGroup.Do("key", fn) + // 2: fn() + if value, cacheHit := g.lookupCache(key); cacheHit { + g.Stats.CacheHits.Add(1) + return value, nil + } + g.Stats.LoadsDeduped.Add(1) + var value ByteView + var err error + if peer, ok := g.peers.PickPeer(key); ok { + value, err = g.getFromPeer(ctx, peer, key) + if err == nil { + g.Stats.PeerLoads.Add(1) + return value, nil + } + g.Stats.PeerErrors.Add(1) + // TODO(bradfitz): log the peer's error? keep + // log of the past few for /groupcachez? It's + // probably boring (normal task movement), so not + // worth logging I imagine. + } + value, err = g.getLocally(ctx, key, dest) + if err != nil { + g.Stats.LocalLoadErrs.Add(1) + return nil, err + } + g.Stats.LocalLoads.Add(1) + destPopulated = true // only one caller of load gets this return value + g.populateCache(key, value, &g.mainCache) + return value, nil + }) + if err == nil { + value = viewi.(ByteView) + } + return +} + +func (g *Group) getLocally(ctx Context, key string, dest Sink) (ByteView, error) { + err := g.getter.Get(ctx, key, dest) + if err != nil { + return ByteView{}, err + } + return dest.view() +} + +func (g *Group) getFromPeer(ctx Context, peer ProtoGetter, key string) (ByteView, error) { + req := &pb.GetRequest{ + Group: &g.name, + Key: &key, + } + res := &pb.GetResponse{} + err := peer.Get(ctx, req, res) + if err != nil { + return ByteView{}, err + } + value := ByteView{b: res.Value} + // TODO(bradfitz): use res.MinuteQps or something smart to + // conditionally populate hotCache. For now just do it some + // percentage of the time. + if rand.Intn(10) == 0 { + g.populateCache(key, value, &g.hotCache) + } + return value, nil +} + +func (g *Group) lookupCache(key string) (value ByteView, ok bool) { + if g.cacheBytes <= 0 { + return + } + value, ok = g.mainCache.get(key) + if ok { + return + } + value, ok = g.hotCache.get(key) + return +} + +func (g *Group) populateCache(key string, value ByteView, cache *cache) { + if g.cacheBytes <= 0 { + return + } + cache.add(key, value) + + // Evict items from cache(s) if necessary. + for { + mainBytes := g.mainCache.bytes() + hotBytes := g.hotCache.bytes() + if mainBytes+hotBytes <= g.cacheBytes { + return + } + + // TODO(bradfitz): this is good-enough-for-now logic. + // It should be something based on measurements and/or + // respecting the costs of different resources. + victim := &g.mainCache + if hotBytes > mainBytes/8 { + victim = &g.hotCache + } + victim.removeOldest() + } +} + +// CacheType represents a type of cache. +type CacheType int + +const ( + // The MainCache is the cache for items that this peer is the + // owner for. + MainCache CacheType = iota + 1 + + // The HotCache is the cache for items that seem popular + // enough to replicate to this node, even though it's not the + // owner. + HotCache +) + +// CacheStats returns stats about the provided cache within the group. +func (g *Group) CacheStats(which CacheType) CacheStats { + switch which { + case MainCache: + return g.mainCache.stats() + case HotCache: + return g.hotCache.stats() + default: + return CacheStats{} + } +} + +// cache is a wrapper around an *lru.Cache that adds synchronization, +// makes values always be ByteView, and counts the size of all keys and +// values. +type cache struct { + mu sync.RWMutex + nbytes int64 // of all keys and values + lru *lru.Cache + nhit, nget int64 + nevict int64 // number of evictions +} + +func (c *cache) stats() CacheStats { + c.mu.RLock() + defer c.mu.RUnlock() + return CacheStats{ + Bytes: c.nbytes, + Items: c.itemsLocked(), + Gets: c.nget, + Hits: c.nhit, + Evictions: c.nevict, + } +} + +func (c *cache) add(key string, value ByteView) { + c.mu.Lock() + defer c.mu.Unlock() + if c.lru == nil { + c.lru = &lru.Cache{ + OnEvicted: func(key lru.Key, value interface{}) { + val := value.(ByteView) + c.nbytes -= int64(len(key.(string))) + int64(val.Len()) + c.nevict++ + }, + } + } + c.lru.Add(key, value) + c.nbytes += int64(len(key)) + int64(value.Len()) +} + +func (c *cache) get(key string) (value ByteView, ok bool) { + c.mu.Lock() + defer c.mu.Unlock() + c.nget++ + if c.lru == nil { + return + } + vi, ok := c.lru.Get(key) + if !ok { + return + } + c.nhit++ + return vi.(ByteView), true +} + +func (c *cache) removeOldest() { + c.mu.Lock() + defer c.mu.Unlock() + if c.lru != nil { + c.lru.RemoveOldest() + } +} + +func (c *cache) bytes() int64 { + c.mu.RLock() + defer c.mu.RUnlock() + return c.nbytes +} + +func (c *cache) items() int64 { + c.mu.RLock() + defer c.mu.RUnlock() + return c.itemsLocked() +} + +func (c *cache) itemsLocked() int64 { + if c.lru == nil { + return 0 + } + return int64(c.lru.Len()) +} + +// An AtomicInt is an int64 to be accessed atomically. +type AtomicInt int64 + +// Add atomically adds n to i. +func (i *AtomicInt) Add(n int64) { + atomic.AddInt64((*int64)(i), n) +} + +// Get atomically gets the value of i. +func (i *AtomicInt) Get() int64 { + return atomic.LoadInt64((*int64)(i)) +} + +func (i *AtomicInt) String() string { + return strconv.FormatInt(i.Get(), 10) +} + +// CacheStats are returned by stats accessors on Group. +type CacheStats struct { + Bytes int64 + Items int64 + Gets int64 + Hits int64 + Evictions int64 +} diff --git a/vendor/github.com/golang/groupcache/groupcache_test.go b/vendor/github.com/golang/groupcache/groupcache_test.go new file mode 100644 index 000000000..ea05cac4a --- /dev/null +++ b/vendor/github.com/golang/groupcache/groupcache_test.go @@ -0,0 +1,456 @@ +/* +Copyright 2012 Google Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Tests for groupcache. + +package groupcache + +import ( + "errors" + "fmt" + "hash/crc32" + "math/rand" + "reflect" + "sync" + "testing" + "time" + "unsafe" + + "github.com/golang/protobuf/proto" + + pb "github.com/golang/groupcache/groupcachepb" + testpb "github.com/golang/groupcache/testpb" +) + +var ( + once sync.Once + stringGroup, protoGroup Getter + + stringc = make(chan string) + + dummyCtx Context + + // cacheFills is the number of times stringGroup or + // protoGroup's Getter have been called. Read using the + // cacheFills function. + cacheFills AtomicInt +) + +const ( + stringGroupName = "string-group" + protoGroupName = "proto-group" + testMessageType = "google3/net/groupcache/go/test_proto.TestMessage" + fromChan = "from-chan" + cacheSize = 1 << 20 +) + +func testSetup() { + stringGroup = NewGroup(stringGroupName, cacheSize, GetterFunc(func(_ Context, key string, dest Sink) error { + if key == fromChan { + key = <-stringc + } + cacheFills.Add(1) + return dest.SetString("ECHO:" + key) + })) + + protoGroup = NewGroup(protoGroupName, cacheSize, GetterFunc(func(_ Context, key string, dest Sink) error { + if key == fromChan { + key = <-stringc + } + cacheFills.Add(1) + return dest.SetProto(&testpb.TestMessage{ + Name: proto.String("ECHO:" + key), + City: proto.String("SOME-CITY"), + }) + })) +} + +// tests that a Getter's Get method is only called once with two +// outstanding callers. This is the string variant. +func TestGetDupSuppressString(t *testing.T) { + once.Do(testSetup) + // Start two getters. The first should block (waiting reading + // from stringc) and the second should latch on to the first + // one. + resc := make(chan string, 2) + for i := 0; i < 2; i++ { + go func() { + var s string + if err := stringGroup.Get(dummyCtx, fromChan, StringSink(&s)); err != nil { + resc <- "ERROR:" + err.Error() + return + } + resc <- s + }() + } + + // Wait a bit so both goroutines get merged together via + // singleflight. + // TODO(bradfitz): decide whether there are any non-offensive + // debug/test hooks that could be added to singleflight to + // make a sleep here unnecessary. + time.Sleep(250 * time.Millisecond) + + // Unblock the first getter, which should unblock the second + // as well. + stringc <- "foo" + + for i := 0; i < 2; i++ { + select { + case v := <-resc: + if v != "ECHO:foo" { + t.Errorf("got %q; want %q", v, "ECHO:foo") + } + case <-time.After(5 * time.Second): + t.Errorf("timeout waiting on getter #%d of 2", i+1) + } + } +} + +// tests that a Getter's Get method is only called once with two +// outstanding callers. This is the proto variant. +func TestGetDupSuppressProto(t *testing.T) { + once.Do(testSetup) + // Start two getters. The first should block (waiting reading + // from stringc) and the second should latch on to the first + // one. + resc := make(chan *testpb.TestMessage, 2) + for i := 0; i < 2; i++ { + go func() { + tm := new(testpb.TestMessage) + if err := protoGroup.Get(dummyCtx, fromChan, ProtoSink(tm)); err != nil { + tm.Name = proto.String("ERROR:" + err.Error()) + } + resc <- tm + }() + } + + // Wait a bit so both goroutines get merged together via + // singleflight. + // TODO(bradfitz): decide whether there are any non-offensive + // debug/test hooks that could be added to singleflight to + // make a sleep here unnecessary. + time.Sleep(250 * time.Millisecond) + + // Unblock the first getter, which should unblock the second + // as well. + stringc <- "Fluffy" + want := &testpb.TestMessage{ + Name: proto.String("ECHO:Fluffy"), + City: proto.String("SOME-CITY"), + } + for i := 0; i < 2; i++ { + select { + case v := <-resc: + if !reflect.DeepEqual(v, want) { + t.Errorf(" Got: %v\nWant: %v", proto.CompactTextString(v), proto.CompactTextString(want)) + } + case <-time.After(5 * time.Second): + t.Errorf("timeout waiting on getter #%d of 2", i+1) + } + } +} + +func countFills(f func()) int64 { + fills0 := cacheFills.Get() + f() + return cacheFills.Get() - fills0 +} + +func TestCaching(t *testing.T) { + once.Do(testSetup) + fills := countFills(func() { + for i := 0; i < 10; i++ { + var s string + if err := stringGroup.Get(dummyCtx, "TestCaching-key", StringSink(&s)); err != nil { + t.Fatal(err) + } + } + }) + if fills != 1 { + t.Errorf("expected 1 cache fill; got %d", fills) + } +} + +func TestCacheEviction(t *testing.T) { + once.Do(testSetup) + testKey := "TestCacheEviction-key" + getTestKey := func() { + var res string + for i := 0; i < 10; i++ { + if err := stringGroup.Get(dummyCtx, testKey, StringSink(&res)); err != nil { + t.Fatal(err) + } + } + } + fills := countFills(getTestKey) + if fills != 1 { + t.Fatalf("expected 1 cache fill; got %d", fills) + } + + g := stringGroup.(*Group) + evict0 := g.mainCache.nevict + + // Trash the cache with other keys. + var bytesFlooded int64 + // cacheSize/len(testKey) is approximate + for bytesFlooded < cacheSize+1024 { + var res string + key := fmt.Sprintf("dummy-key-%d", bytesFlooded) + stringGroup.Get(dummyCtx, key, StringSink(&res)) + bytesFlooded += int64(len(key) + len(res)) + } + evicts := g.mainCache.nevict - evict0 + if evicts <= 0 { + t.Errorf("evicts = %v; want more than 0", evicts) + } + + // Test that the key is gone. + fills = countFills(getTestKey) + if fills != 1 { + t.Fatalf("expected 1 cache fill after cache trashing; got %d", fills) + } +} + +type fakePeer struct { + hits int + fail bool +} + +func (p *fakePeer) Get(_ Context, in *pb.GetRequest, out *pb.GetResponse) error { + p.hits++ + if p.fail { + return errors.New("simulated error from peer") + } + out.Value = []byte("got:" + in.GetKey()) + return nil +} + +type fakePeers []ProtoGetter + +func (p fakePeers) PickPeer(key string) (peer ProtoGetter, ok bool) { + if len(p) == 0 { + return + } + n := crc32.Checksum([]byte(key), crc32.IEEETable) % uint32(len(p)) + return p[n], p[n] != nil +} + +// tests that peers (virtual, in-process) are hit, and how much. +func TestPeers(t *testing.T) { + once.Do(testSetup) + rand.Seed(123) + peer0 := &fakePeer{} + peer1 := &fakePeer{} + peer2 := &fakePeer{} + peerList := fakePeers([]ProtoGetter{peer0, peer1, peer2, nil}) + const cacheSize = 0 // disabled + localHits := 0 + getter := func(_ Context, key string, dest Sink) error { + localHits++ + return dest.SetString("got:" + key) + } + testGroup := newGroup("TestPeers-group", cacheSize, GetterFunc(getter), peerList) + run := func(name string, n int, wantSummary string) { + // Reset counters + localHits = 0 + for _, p := range []*fakePeer{peer0, peer1, peer2} { + p.hits = 0 + } + + for i := 0; i < n; i++ { + key := fmt.Sprintf("key-%d", i) + want := "got:" + key + var got string + err := testGroup.Get(dummyCtx, key, StringSink(&got)) + if err != nil { + t.Errorf("%s: error on key %q: %v", name, key, err) + continue + } + if got != want { + t.Errorf("%s: for key %q, got %q; want %q", name, key, got, want) + } + } + summary := func() string { + return fmt.Sprintf("localHits = %d, peers = %d %d %d", localHits, peer0.hits, peer1.hits, peer2.hits) + } + if got := summary(); got != wantSummary { + t.Errorf("%s: got %q; want %q", name, got, wantSummary) + } + } + resetCacheSize := func(maxBytes int64) { + g := testGroup + g.cacheBytes = maxBytes + g.mainCache = cache{} + g.hotCache = cache{} + } + + // Base case; peers all up, with no problems. + resetCacheSize(1 << 20) + run("base", 200, "localHits = 49, peers = 51 49 51") + + // Verify cache was hit. All localHits are gone, and some of + // the peer hits (the ones randomly selected to be maybe hot) + run("cached_base", 200, "localHits = 0, peers = 49 47 48") + resetCacheSize(0) + + // With one of the peers being down. + // TODO(bradfitz): on a peer number being unavailable, the + // consistent hashing should maybe keep trying others to + // spread the load out. Currently it fails back to local + // execution if the first consistent-hash slot is unavailable. + peerList[0] = nil + run("one_peer_down", 200, "localHits = 100, peers = 0 49 51") + + // Failing peer + peerList[0] = peer0 + peer0.fail = true + run("peer0_failing", 200, "localHits = 100, peers = 51 49 51") +} + +func TestTruncatingByteSliceTarget(t *testing.T) { + var buf [100]byte + s := buf[:] + if err := stringGroup.Get(dummyCtx, "short", TruncatingByteSliceSink(&s)); err != nil { + t.Fatal(err) + } + if want := "ECHO:short"; string(s) != want { + t.Errorf("short key got %q; want %q", s, want) + } + + s = buf[:6] + if err := stringGroup.Get(dummyCtx, "truncated", TruncatingByteSliceSink(&s)); err != nil { + t.Fatal(err) + } + if want := "ECHO:t"; string(s) != want { + t.Errorf("truncated key got %q; want %q", s, want) + } +} + +func TestAllocatingByteSliceTarget(t *testing.T) { + var dst []byte + sink := AllocatingByteSliceSink(&dst) + + inBytes := []byte("some bytes") + sink.SetBytes(inBytes) + if want := "some bytes"; string(dst) != want { + t.Errorf("SetBytes resulted in %q; want %q", dst, want) + } + v, err := sink.view() + if err != nil { + t.Fatalf("view after SetBytes failed: %v", err) + } + if &inBytes[0] == &dst[0] { + t.Error("inBytes and dst share memory") + } + if &inBytes[0] == &v.b[0] { + t.Error("inBytes and view share memory") + } + if &dst[0] == &v.b[0] { + t.Error("dst and view share memory") + } +} + +// orderedFlightGroup allows the caller to force the schedule of when +// orig.Do will be called. This is useful to serialize calls such +// that singleflight cannot dedup them. +type orderedFlightGroup struct { + mu sync.Mutex + stage1 chan bool + stage2 chan bool + orig flightGroup +} + +func (g *orderedFlightGroup) Do(key string, fn func() (interface{}, error)) (interface{}, error) { + <-g.stage1 + <-g.stage2 + g.mu.Lock() + defer g.mu.Unlock() + return g.orig.Do(key, fn) +} + +// TestNoDedup tests invariants on the cache size when singleflight is +// unable to dedup calls. +func TestNoDedup(t *testing.T) { + const testkey = "testkey" + const testval = "testval" + g := newGroup("testgroup", 1024, GetterFunc(func(_ Context, key string, dest Sink) error { + return dest.SetString(testval) + }), nil) + + orderedGroup := &orderedFlightGroup{ + stage1: make(chan bool), + stage2: make(chan bool), + orig: g.loadGroup, + } + // Replace loadGroup with our wrapper so we can control when + // loadGroup.Do is entered for each concurrent request. + g.loadGroup = orderedGroup + + // Issue two idential requests concurrently. Since the cache is + // empty, it will miss. Both will enter load(), but we will only + // allow one at a time to enter singleflight.Do, so the callback + // function will be called twice. + resc := make(chan string, 2) + for i := 0; i < 2; i++ { + go func() { + var s string + if err := g.Get(dummyCtx, testkey, StringSink(&s)); err != nil { + resc <- "ERROR:" + err.Error() + return + } + resc <- s + }() + } + + // Ensure both goroutines have entered the Do routine. This implies + // both concurrent requests have checked the cache, found it empty, + // and called load(). + orderedGroup.stage1 <- true + orderedGroup.stage1 <- true + orderedGroup.stage2 <- true + orderedGroup.stage2 <- true + + for i := 0; i < 2; i++ { + if s := <-resc; s != testval { + t.Errorf("result is %s want %s", s, testval) + } + } + + const wantItems = 1 + if g.mainCache.items() != wantItems { + t.Errorf("mainCache has %d items, want %d", g.mainCache.items(), wantItems) + } + + // If the singleflight callback doesn't double-check the cache again + // upon entry, we would increment nbytes twice but the entry would + // only be in the cache once. + const wantBytes = int64(len(testkey) + len(testval)) + if g.mainCache.nbytes != wantBytes { + t.Errorf("cache has %d bytes, want %d", g.mainCache.nbytes, wantBytes) + } +} + +func TestGroupStatsAlignment(t *testing.T) { + var g Group + off := unsafe.Offsetof(g.Stats) + if off%8 != 0 { + t.Fatal("Stats structure is not 8-byte aligned.") + } +} + +// TODO(bradfitz): port the Google-internal full integration test into here, +// using HTTP requests instead of our RPC system. diff --git a/vendor/github.com/golang/groupcache/http.go b/vendor/github.com/golang/groupcache/http.go new file mode 100644 index 000000000..f37467a78 --- /dev/null +++ b/vendor/github.com/golang/groupcache/http.go @@ -0,0 +1,227 @@ +/* +Copyright 2013 Google Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package groupcache + +import ( + "bytes" + "fmt" + "io" + "net/http" + "net/url" + "strings" + "sync" + + "github.com/golang/groupcache/consistenthash" + pb "github.com/golang/groupcache/groupcachepb" + "github.com/golang/protobuf/proto" +) + +const defaultBasePath = "/_groupcache/" + +const defaultReplicas = 50 + +// HTTPPool implements PeerPicker for a pool of HTTP peers. +type HTTPPool struct { + // Context optionally specifies a context for the server to use when it + // receives a request. + // If nil, the server uses a nil Context. + Context func(*http.Request) Context + + // Transport optionally specifies an http.RoundTripper for the client + // to use when it makes a request. + // If nil, the client uses http.DefaultTransport. + Transport func(Context) http.RoundTripper + + // this peer's base URL, e.g. "https://example.net:8000" + self string + + // opts specifies the options. + opts HTTPPoolOptions + + mu sync.Mutex // guards peers and httpGetters + peers *consistenthash.Map + httpGetters map[string]*httpGetter // keyed by e.g. "http://10.0.0.2:8008" +} + +// HTTPPoolOptions are the configurations of a HTTPPool. +type HTTPPoolOptions struct { + // BasePath specifies the HTTP path that will serve groupcache requests. + // If blank, it defaults to "/_groupcache/". + BasePath string + + // Replicas specifies the number of key replicas on the consistent hash. + // If blank, it defaults to 50. + Replicas int + + // HashFn specifies the hash function of the consistent hash. + // If blank, it defaults to crc32.ChecksumIEEE. + HashFn consistenthash.Hash +} + +// NewHTTPPool initializes an HTTP pool of peers, and registers itself as a PeerPicker. +// For convenience, it also registers itself as an http.Handler with http.DefaultServeMux. +// The self argument should be a valid base URL that points to the current server, +// for example "http://example.net:8000". +func NewHTTPPool(self string) *HTTPPool { + p := NewHTTPPoolOpts(self, nil) + http.Handle(p.opts.BasePath, p) + return p +} + +var httpPoolMade bool + +// NewHTTPPoolOpts initializes an HTTP pool of peers with the given options. +// Unlike NewHTTPPool, this function does not register the created pool as an HTTP handler. +// The returned *HTTPPool implements http.Handler and must be registered using http.Handle. +func NewHTTPPoolOpts(self string, o *HTTPPoolOptions) *HTTPPool { + if httpPoolMade { + panic("groupcache: NewHTTPPool must be called only once") + } + httpPoolMade = true + + p := &HTTPPool{ + self: self, + httpGetters: make(map[string]*httpGetter), + } + if o != nil { + p.opts = *o + } + if p.opts.BasePath == "" { + p.opts.BasePath = defaultBasePath + } + if p.opts.Replicas == 0 { + p.opts.Replicas = defaultReplicas + } + p.peers = consistenthash.New(p.opts.Replicas, p.opts.HashFn) + + RegisterPeerPicker(func() PeerPicker { return p }) + return p +} + +// Set updates the pool's list of peers. +// Each peer value should be a valid base URL, +// for example "http://example.net:8000". +func (p *HTTPPool) Set(peers ...string) { + p.mu.Lock() + defer p.mu.Unlock() + p.peers = consistenthash.New(p.opts.Replicas, p.opts.HashFn) + p.peers.Add(peers...) + p.httpGetters = make(map[string]*httpGetter, len(peers)) + for _, peer := range peers { + p.httpGetters[peer] = &httpGetter{transport: p.Transport, baseURL: peer + p.opts.BasePath} + } +} + +func (p *HTTPPool) PickPeer(key string) (ProtoGetter, bool) { + p.mu.Lock() + defer p.mu.Unlock() + if p.peers.IsEmpty() { + return nil, false + } + if peer := p.peers.Get(key); peer != p.self { + return p.httpGetters[peer], true + } + return nil, false +} + +func (p *HTTPPool) ServeHTTP(w http.ResponseWriter, r *http.Request) { + // Parse request. + if !strings.HasPrefix(r.URL.Path, p.opts.BasePath) { + panic("HTTPPool serving unexpected path: " + r.URL.Path) + } + parts := strings.SplitN(r.URL.Path[len(p.opts.BasePath):], "/", 2) + if len(parts) != 2 { + http.Error(w, "bad request", http.StatusBadRequest) + return + } + groupName := parts[0] + key := parts[1] + + // Fetch the value for this group/key. + group := GetGroup(groupName) + if group == nil { + http.Error(w, "no such group: "+groupName, http.StatusNotFound) + return + } + var ctx Context + if p.Context != nil { + ctx = p.Context(r) + } + + group.Stats.ServerRequests.Add(1) + var value []byte + err := group.Get(ctx, key, AllocatingByteSliceSink(&value)) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + + // Write the value to the response body as a proto message. + body, err := proto.Marshal(&pb.GetResponse{Value: value}) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + w.Header().Set("Content-Type", "application/x-protobuf") + w.Write(body) +} + +type httpGetter struct { + transport func(Context) http.RoundTripper + baseURL string +} + +var bufferPool = sync.Pool{ + New: func() interface{} { return new(bytes.Buffer) }, +} + +func (h *httpGetter) Get(context Context, in *pb.GetRequest, out *pb.GetResponse) error { + u := fmt.Sprintf( + "%v%v/%v", + h.baseURL, + url.QueryEscape(in.GetGroup()), + url.QueryEscape(in.GetKey()), + ) + req, err := http.NewRequest("GET", u, nil) + if err != nil { + return err + } + tr := http.DefaultTransport + if h.transport != nil { + tr = h.transport(context) + } + res, err := tr.RoundTrip(req) + if err != nil { + return err + } + defer res.Body.Close() + if res.StatusCode != http.StatusOK { + return fmt.Errorf("server returned: %v", res.Status) + } + b := bufferPool.Get().(*bytes.Buffer) + b.Reset() + defer bufferPool.Put(b) + _, err = io.Copy(b, res.Body) + if err != nil { + return fmt.Errorf("reading response body: %v", err) + } + err = proto.Unmarshal(b.Bytes(), out) + if err != nil { + return fmt.Errorf("decoding response body: %v", err) + } + return nil +} diff --git a/vendor/github.com/golang/groupcache/http_test.go b/vendor/github.com/golang/groupcache/http_test.go new file mode 100644 index 000000000..b42edd7f0 --- /dev/null +++ b/vendor/github.com/golang/groupcache/http_test.go @@ -0,0 +1,166 @@ +/* +Copyright 2013 Google Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package groupcache + +import ( + "errors" + "flag" + "log" + "net" + "net/http" + "os" + "os/exec" + "strconv" + "strings" + "sync" + "testing" + "time" +) + +var ( + peerAddrs = flag.String("test_peer_addrs", "", "Comma-separated list of peer addresses; used by TestHTTPPool") + peerIndex = flag.Int("test_peer_index", -1, "Index of which peer this child is; used by TestHTTPPool") + peerChild = flag.Bool("test_peer_child", false, "True if running as a child process; used by TestHTTPPool") +) + +func TestHTTPPool(t *testing.T) { + if *peerChild { + beChildForTestHTTPPool() + os.Exit(0) + } + + const ( + nChild = 4 + nGets = 100 + ) + + var childAddr []string + for i := 0; i < nChild; i++ { + childAddr = append(childAddr, pickFreeAddr(t)) + } + + var cmds []*exec.Cmd + var wg sync.WaitGroup + for i := 0; i < nChild; i++ { + cmd := exec.Command(os.Args[0], + "--test.run=TestHTTPPool", + "--test_peer_child", + "--test_peer_addrs="+strings.Join(childAddr, ","), + "--test_peer_index="+strconv.Itoa(i), + ) + cmds = append(cmds, cmd) + wg.Add(1) + if err := cmd.Start(); err != nil { + t.Fatal("failed to start child process: ", err) + } + go awaitAddrReady(t, childAddr[i], &wg) + } + defer func() { + for i := 0; i < nChild; i++ { + if cmds[i].Process != nil { + cmds[i].Process.Kill() + } + } + }() + wg.Wait() + + // Use a dummy self address so that we don't handle gets in-process. + p := NewHTTPPool("should-be-ignored") + p.Set(addrToURL(childAddr)...) + + // Dummy getter function. Gets should go to children only. + // The only time this process will handle a get is when the + // children can't be contacted for some reason. + getter := GetterFunc(func(ctx Context, key string, dest Sink) error { + return errors.New("parent getter called; something's wrong") + }) + g := NewGroup("httpPoolTest", 1<<20, getter) + + for _, key := range testKeys(nGets) { + var value string + if err := g.Get(nil, key, StringSink(&value)); err != nil { + t.Fatal(err) + } + if suffix := ":" + key; !strings.HasSuffix(value, suffix) { + t.Errorf("Get(%q) = %q, want value ending in %q", key, value, suffix) + } + t.Logf("Get key=%q, value=%q (peer:key)", key, value) + } +} + +func testKeys(n int) (keys []string) { + keys = make([]string, n) + for i := range keys { + keys[i] = strconv.Itoa(i) + } + return +} + +func beChildForTestHTTPPool() { + addrs := strings.Split(*peerAddrs, ",") + + p := NewHTTPPool("http://" + addrs[*peerIndex]) + p.Set(addrToURL(addrs)...) + + getter := GetterFunc(func(ctx Context, key string, dest Sink) error { + dest.SetString(strconv.Itoa(*peerIndex) + ":" + key) + return nil + }) + NewGroup("httpPoolTest", 1<<20, getter) + + log.Fatal(http.ListenAndServe(addrs[*peerIndex], p)) +} + +// This is racy. Another process could swoop in and steal the port between the +// call to this function and the next listen call. Should be okay though. +// The proper way would be to pass the l.File() as ExtraFiles to the child +// process, and then close your copy once the child starts. +func pickFreeAddr(t *testing.T) string { + l, err := net.Listen("tcp", "127.0.0.1:0") + if err != nil { + t.Fatal(err) + } + defer l.Close() + return l.Addr().String() +} + +func addrToURL(addr []string) []string { + url := make([]string, len(addr)) + for i := range addr { + url[i] = "http://" + addr[i] + } + return url +} + +func awaitAddrReady(t *testing.T, addr string, wg *sync.WaitGroup) { + defer wg.Done() + const max = 1 * time.Second + tries := 0 + for { + tries++ + c, err := net.Dial("tcp", addr) + if err == nil { + c.Close() + return + } + delay := time.Duration(tries) * 25 * time.Millisecond + if delay > max { + delay = max + } + time.Sleep(delay) + } +} diff --git a/vendor/github.com/golang/groupcache/lru/lru.go b/vendor/github.com/golang/groupcache/lru/lru.go index cdfe2991f..532cc45e6 100644 --- a/vendor/github.com/golang/groupcache/lru/lru.go +++ b/vendor/github.com/golang/groupcache/lru/lru.go @@ -119,3 +119,15 @@ func (c *Cache) Len() int { } return c.ll.Len() } + +// Clear purges all stored items from the cache. +func (c *Cache) Clear() { + if c.OnEvicted != nil { + for _, e := range c.cache { + kv := e.Value.(*entry) + c.OnEvicted(kv.key, kv.value) + } + } + c.ll = nil + c.cache = nil +} diff --git a/vendor/github.com/golang/groupcache/lru/lru_test.go b/vendor/github.com/golang/groupcache/lru/lru_test.go new file mode 100644 index 000000000..98a2656e8 --- /dev/null +++ b/vendor/github.com/golang/groupcache/lru/lru_test.go @@ -0,0 +1,73 @@ +/* +Copyright 2013 Google Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package lru + +import ( + "testing" +) + +type simpleStruct struct { + int + string +} + +type complexStruct struct { + int + simpleStruct +} + +var getTests = []struct { + name string + keyToAdd interface{} + keyToGet interface{} + expectedOk bool +}{ + {"string_hit", "myKey", "myKey", true}, + {"string_miss", "myKey", "nonsense", false}, + {"simple_struct_hit", simpleStruct{1, "two"}, simpleStruct{1, "two"}, true}, + {"simeple_struct_miss", simpleStruct{1, "two"}, simpleStruct{0, "noway"}, false}, + {"complex_struct_hit", complexStruct{1, simpleStruct{2, "three"}}, + complexStruct{1, simpleStruct{2, "three"}}, true}, +} + +func TestGet(t *testing.T) { + for _, tt := range getTests { + lru := New(0) + lru.Add(tt.keyToAdd, 1234) + val, ok := lru.Get(tt.keyToGet) + if ok != tt.expectedOk { + t.Fatalf("%s: cache hit = %v; want %v", tt.name, ok, !ok) + } else if ok && val != 1234 { + t.Fatalf("%s expected get to return 1234 but got %v", tt.name, val) + } + } +} + +func TestRemove(t *testing.T) { + lru := New(0) + lru.Add("myKey", 1234) + if val, ok := lru.Get("myKey"); !ok { + t.Fatal("TestRemove returned no match") + } else if val != 1234 { + t.Fatalf("TestRemove failed. Expected %d, got %v", 1234, val) + } + + lru.Remove("myKey") + if _, ok := lru.Get("myKey"); ok { + t.Fatal("TestRemove returned a removed entry") + } +} diff --git a/vendor/github.com/golang/groupcache/peers.go b/vendor/github.com/golang/groupcache/peers.go new file mode 100644 index 000000000..1625ff043 --- /dev/null +++ b/vendor/github.com/golang/groupcache/peers.go @@ -0,0 +1,85 @@ +/* +Copyright 2012 Google Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// peers.go defines how processes find and communicate with their peers. + +package groupcache + +import ( + pb "github.com/golang/groupcache/groupcachepb" +) + +// Context is an opaque value passed through calls to the +// ProtoGetter. It may be nil if your ProtoGetter implementation does +// not require a context. +type Context interface{} + +// ProtoGetter is the interface that must be implemented by a peer. +type ProtoGetter interface { + Get(context Context, in *pb.GetRequest, out *pb.GetResponse) error +} + +// PeerPicker is the interface that must be implemented to locate +// the peer that owns a specific key. +type PeerPicker interface { + // PickPeer returns the peer that owns the specific key + // and true to indicate that a remote peer was nominated. + // It returns nil, false if the key owner is the current peer. + PickPeer(key string) (peer ProtoGetter, ok bool) +} + +// NoPeers is an implementation of PeerPicker that never finds a peer. +type NoPeers struct{} + +func (NoPeers) PickPeer(key string) (peer ProtoGetter, ok bool) { return } + +var ( + portPicker func(groupName string) PeerPicker +) + +// RegisterPeerPicker registers the peer initialization function. +// It is called once, when the first group is created. +// Either RegisterPeerPicker or RegisterPerGroupPeerPicker should be +// called exactly once, but not both. +func RegisterPeerPicker(fn func() PeerPicker) { + if portPicker != nil { + panic("RegisterPeerPicker called more than once") + } + portPicker = func(_ string) PeerPicker { return fn() } +} + +// RegisterPerGroupPeerPicker registers the peer initialization function, +// which takes the groupName, to be used in choosing a PeerPicker. +// It is called once, when the first group is created. +// Either RegisterPeerPicker or RegisterPerGroupPeerPicker should be +// called exactly once, but not both. +func RegisterPerGroupPeerPicker(fn func(groupName string) PeerPicker) { + if portPicker != nil { + panic("RegisterPeerPicker called more than once") + } + portPicker = fn +} + +func getPeers(groupName string) PeerPicker { + if portPicker == nil { + return NoPeers{} + } + pk := portPicker(groupName) + if pk == nil { + pk = NoPeers{} + } + return pk +} diff --git a/vendor/github.com/golang/groupcache/sinks.go b/vendor/github.com/golang/groupcache/sinks.go new file mode 100644 index 000000000..cb42b41b4 --- /dev/null +++ b/vendor/github.com/golang/groupcache/sinks.go @@ -0,0 +1,322 @@ +/* +Copyright 2012 Google Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package groupcache + +import ( + "errors" + + "github.com/golang/protobuf/proto" +) + +// A Sink receives data from a Get call. +// +// Implementation of Getter must call exactly one of the Set methods +// on success. +type Sink interface { + // SetString sets the value to s. + SetString(s string) error + + // SetBytes sets the value to the contents of v. + // The caller retains ownership of v. + SetBytes(v []byte) error + + // SetProto sets the value to the encoded version of m. + // The caller retains ownership of m. + SetProto(m proto.Message) error + + // view returns a frozen view of the bytes for caching. + view() (ByteView, error) +} + +func cloneBytes(b []byte) []byte { + c := make([]byte, len(b)) + copy(c, b) + return c +} + +func setSinkView(s Sink, v ByteView) error { + // A viewSetter is a Sink that can also receive its value from + // a ByteView. This is a fast path to minimize copies when the + // item was already cached locally in memory (where it's + // cached as a ByteView) + type viewSetter interface { + setView(v ByteView) error + } + if vs, ok := s.(viewSetter); ok { + return vs.setView(v) + } + if v.b != nil { + return s.SetBytes(v.b) + } + return s.SetString(v.s) +} + +// StringSink returns a Sink that populates the provided string pointer. +func StringSink(sp *string) Sink { + return &stringSink{sp: sp} +} + +type stringSink struct { + sp *string + v ByteView + // TODO(bradfitz): track whether any Sets were called. +} + +func (s *stringSink) view() (ByteView, error) { + // TODO(bradfitz): return an error if no Set was called + return s.v, nil +} + +func (s *stringSink) SetString(v string) error { + s.v.b = nil + s.v.s = v + *s.sp = v + return nil +} + +func (s *stringSink) SetBytes(v []byte) error { + return s.SetString(string(v)) +} + +func (s *stringSink) SetProto(m proto.Message) error { + b, err := proto.Marshal(m) + if err != nil { + return err + } + s.v.b = b + *s.sp = string(b) + return nil +} + +// ByteViewSink returns a Sink that populates a ByteView. +func ByteViewSink(dst *ByteView) Sink { + if dst == nil { + panic("nil dst") + } + return &byteViewSink{dst: dst} +} + +type byteViewSink struct { + dst *ByteView + + // if this code ever ends up tracking that at least one set* + // method was called, don't make it an error to call set + // methods multiple times. Lorry's payload.go does that, and + // it makes sense. The comment at the top of this file about + // "exactly one of the Set methods" is overly strict. We + // really care about at least once (in a handler), but if + // multiple handlers fail (or multiple functions in a program + // using a Sink), it's okay to re-use the same one. +} + +func (s *byteViewSink) setView(v ByteView) error { + *s.dst = v + return nil +} + +func (s *byteViewSink) view() (ByteView, error) { + return *s.dst, nil +} + +func (s *byteViewSink) SetProto(m proto.Message) error { + b, err := proto.Marshal(m) + if err != nil { + return err + } + *s.dst = ByteView{b: b} + return nil +} + +func (s *byteViewSink) SetBytes(b []byte) error { + *s.dst = ByteView{b: cloneBytes(b)} + return nil +} + +func (s *byteViewSink) SetString(v string) error { + *s.dst = ByteView{s: v} + return nil +} + +// ProtoSink returns a sink that unmarshals binary proto values into m. +func ProtoSink(m proto.Message) Sink { + return &protoSink{ + dst: m, + } +} + +type protoSink struct { + dst proto.Message // authorative value + typ string + + v ByteView // encoded +} + +func (s *protoSink) view() (ByteView, error) { + return s.v, nil +} + +func (s *protoSink) SetBytes(b []byte) error { + err := proto.Unmarshal(b, s.dst) + if err != nil { + return err + } + s.v.b = cloneBytes(b) + s.v.s = "" + return nil +} + +func (s *protoSink) SetString(v string) error { + b := []byte(v) + err := proto.Unmarshal(b, s.dst) + if err != nil { + return err + } + s.v.b = b + s.v.s = "" + return nil +} + +func (s *protoSink) SetProto(m proto.Message) error { + b, err := proto.Marshal(m) + if err != nil { + return err + } + // TODO(bradfitz): optimize for same-task case more and write + // right through? would need to document ownership rules at + // the same time. but then we could just assign *dst = *m + // here. This works for now: + err = proto.Unmarshal(b, s.dst) + if err != nil { + return err + } + s.v.b = b + s.v.s = "" + return nil +} + +// AllocatingByteSliceSink returns a Sink that allocates +// a byte slice to hold the received value and assigns +// it to *dst. The memory is not retained by groupcache. +func AllocatingByteSliceSink(dst *[]byte) Sink { + return &allocBytesSink{dst: dst} +} + +type allocBytesSink struct { + dst *[]byte + v ByteView +} + +func (s *allocBytesSink) view() (ByteView, error) { + return s.v, nil +} + +func (s *allocBytesSink) setView(v ByteView) error { + if v.b != nil { + *s.dst = cloneBytes(v.b) + } else { + *s.dst = []byte(v.s) + } + s.v = v + return nil +} + +func (s *allocBytesSink) SetProto(m proto.Message) error { + b, err := proto.Marshal(m) + if err != nil { + return err + } + return s.setBytesOwned(b) +} + +func (s *allocBytesSink) SetBytes(b []byte) error { + return s.setBytesOwned(cloneBytes(b)) +} + +func (s *allocBytesSink) setBytesOwned(b []byte) error { + if s.dst == nil { + return errors.New("nil AllocatingByteSliceSink *[]byte dst") + } + *s.dst = cloneBytes(b) // another copy, protecting the read-only s.v.b view + s.v.b = b + s.v.s = "" + return nil +} + +func (s *allocBytesSink) SetString(v string) error { + if s.dst == nil { + return errors.New("nil AllocatingByteSliceSink *[]byte dst") + } + *s.dst = []byte(v) + s.v.b = nil + s.v.s = v + return nil +} + +// TruncatingByteSliceSink returns a Sink that writes up to len(*dst) +// bytes to *dst. If more bytes are available, they're silently +// truncated. If fewer bytes are available than len(*dst), *dst +// is shrunk to fit the number of bytes available. +func TruncatingByteSliceSink(dst *[]byte) Sink { + return &truncBytesSink{dst: dst} +} + +type truncBytesSink struct { + dst *[]byte + v ByteView +} + +func (s *truncBytesSink) view() (ByteView, error) { + return s.v, nil +} + +func (s *truncBytesSink) SetProto(m proto.Message) error { + b, err := proto.Marshal(m) + if err != nil { + return err + } + return s.setBytesOwned(b) +} + +func (s *truncBytesSink) SetBytes(b []byte) error { + return s.setBytesOwned(cloneBytes(b)) +} + +func (s *truncBytesSink) setBytesOwned(b []byte) error { + if s.dst == nil { + return errors.New("nil TruncatingByteSliceSink *[]byte dst") + } + n := copy(*s.dst, b) + if n < len(*s.dst) { + *s.dst = (*s.dst)[:n] + } + s.v.b = b + s.v.s = "" + return nil +} + +func (s *truncBytesSink) SetString(v string) error { + if s.dst == nil { + return errors.New("nil TruncatingByteSliceSink *[]byte dst") + } + n := copy(*s.dst, v) + if n < len(*s.dst) { + *s.dst = (*s.dst)[:n] + } + s.v.b = nil + s.v.s = v + return nil +} diff --git a/vendor/github.com/golang/protobuf/.gitignore b/vendor/github.com/golang/protobuf/.gitignore new file mode 100644 index 000000000..8f5b596b1 --- /dev/null +++ b/vendor/github.com/golang/protobuf/.gitignore @@ -0,0 +1,16 @@ +.DS_Store +*.[568ao] +*.ao +*.so +*.pyc +._* +.nfs.* +[568a].out +*~ +*.orig +core +_obj +_test +_testmain.go +protoc-gen-go/testdata/multi/*.pb.go +_conformance/_conformance diff --git a/vendor/github.com/golang/protobuf/.travis.yml b/vendor/github.com/golang/protobuf/.travis.yml new file mode 100644 index 000000000..93c67805b --- /dev/null +++ b/vendor/github.com/golang/protobuf/.travis.yml @@ -0,0 +1,18 @@ +sudo: false +language: go +go: +- 1.6.x +- 1.7.x +- 1.8.x +- 1.9.x + +install: + - go get -v -d -t github.com/golang/protobuf/... + - curl -L https://github.com/google/protobuf/releases/download/v3.3.0/protoc-3.3.0-linux-x86_64.zip -o /tmp/protoc.zip + - unzip /tmp/protoc.zip -d $HOME/protoc + +env: + - PATH=$HOME/protoc/bin:$PATH + +script: + - make all test diff --git a/vendor/github.com/golang/protobuf/Make.protobuf b/vendor/github.com/golang/protobuf/Make.protobuf new file mode 100644 index 000000000..15071de10 --- /dev/null +++ b/vendor/github.com/golang/protobuf/Make.protobuf @@ -0,0 +1,40 @@ +# Go support for Protocol Buffers - Google's data interchange format +# +# Copyright 2010 The Go Authors. All rights reserved. +# https://github.com/golang/protobuf +# +# 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. + +# Includable Makefile to add a rule for generating .pb.go files from .proto files +# (Google protocol buffer descriptions). +# Typical use if myproto.proto is a file in package mypackage in this directory: +# +# include $(GOROOT)/src/pkg/github.com/golang/protobuf/Make.protobuf + +%.pb.go: %.proto + protoc --go_out=. $< + diff --git a/vendor/github.com/golang/protobuf/Makefile b/vendor/github.com/golang/protobuf/Makefile new file mode 100644 index 000000000..a1421d8b7 --- /dev/null +++ b/vendor/github.com/golang/protobuf/Makefile @@ -0,0 +1,55 @@ +# Go support for Protocol Buffers - Google's data interchange format +# +# Copyright 2010 The Go Authors. All rights reserved. +# https://github.com/golang/protobuf +# +# 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. + + +all: install + +install: + go install ./proto ./jsonpb ./ptypes + go install ./protoc-gen-go + +test: + go test ./proto ./jsonpb ./ptypes + make -C protoc-gen-go/testdata test + +clean: + go clean ./... + +nuke: + go clean -i ./... + +regenerate: + make -C protoc-gen-go/descriptor regenerate + make -C protoc-gen-go/plugin regenerate + make -C protoc-gen-go/testdata regenerate + make -C proto/testdata regenerate + make -C jsonpb/jsonpb_test_proto regenerate + make -C _conformance regenerate diff --git a/vendor/github.com/golang/protobuf/README.md b/vendor/github.com/golang/protobuf/README.md new file mode 100644 index 000000000..207eb6b48 --- /dev/null +++ b/vendor/github.com/golang/protobuf/README.md @@ -0,0 +1,243 @@ +# Go support for Protocol Buffers + +[![Build Status](https://travis-ci.org/golang/protobuf.svg?branch=master)](https://travis-ci.org/golang/protobuf) + +Google's data interchange format. +Copyright 2010 The Go Authors. +https://github.com/golang/protobuf + +This package and the code it generates requires at least Go 1.4. + +This software implements Go bindings for protocol buffers. For +information about protocol buffers themselves, see + https://developers.google.com/protocol-buffers/ + +## Installation ## + +To use this software, you must: +- Install the standard C++ implementation of protocol buffers from + https://developers.google.com/protocol-buffers/ +- Of course, install the Go compiler and tools from + https://golang.org/ + See + https://golang.org/doc/install + for details or, if you are using gccgo, follow the instructions at + https://golang.org/doc/install/gccgo +- Grab the code from the repository and install the proto package. + The simplest way is to run `go get -u github.com/golang/protobuf/protoc-gen-go`. + The compiler plugin, protoc-gen-go, will be installed in $GOBIN, + defaulting to $GOPATH/bin. It must be in your $PATH for the protocol + compiler, protoc, to find it. + +This software has two parts: a 'protocol compiler plugin' that +generates Go source files that, once compiled, can access and manage +protocol buffers; and a library that implements run-time support for +encoding (marshaling), decoding (unmarshaling), and accessing protocol +buffers. + +There is support for gRPC in Go using protocol buffers. +See the note at the bottom of this file for details. + +There are no insertion points in the plugin. + + +## Using protocol buffers with Go ## + +Once the software is installed, there are two steps to using it. +First you must compile the protocol buffer definitions and then import +them, with the support library, into your program. + +To compile the protocol buffer definition, run protoc with the --go_out +parameter set to the directory you want to output the Go code to. + + protoc --go_out=. *.proto + +The generated files will be suffixed .pb.go. See the Test code below +for an example using such a file. + + +The package comment for the proto library contains text describing +the interface provided in Go for protocol buffers. Here is an edited +version. + +========== + +The proto package converts data structures to and from the +wire format of protocol buffers. It works in concert with the +Go source code generated for .proto files by the protocol compiler. + +A summary of the properties of the protocol buffer interface +for a protocol buffer variable v: + + - Names are turned from camel_case to CamelCase for export. + - There are no methods on v to set fields; just treat + them as structure fields. + - There are getters that return a field's value if set, + and return the field's default value if unset. + The getters work even if the receiver is a nil message. + - The zero value for a struct is its correct initialization state. + All desired fields must be set before marshaling. + - A Reset() method will restore a protobuf struct to its zero state. + - Non-repeated fields are pointers to the values; nil means unset. + That is, optional or required field int32 f becomes F *int32. + - Repeated fields are slices. + - Helper functions are available to aid the setting of fields. + Helpers for getting values are superseded by the + GetFoo methods and their use is deprecated. + msg.Foo = proto.String("hello") // set field + - Constants are defined to hold the default values of all fields that + have them. They have the form Default_StructName_FieldName. + Because the getter methods handle defaulted values, + direct use of these constants should be rare. + - Enums are given type names and maps from names to values. + Enum values are prefixed with the enum's type name. Enum types have + a String method, and a Enum method to assist in message construction. + - Nested groups and enums have type names prefixed with the name of + the surrounding message type. + - Extensions are given descriptor names that start with E_, + followed by an underscore-delimited list of the nested messages + that contain it (if any) followed by the CamelCased name of the + extension field itself. HasExtension, ClearExtension, GetExtension + and SetExtension are functions for manipulating extensions. + - Oneof field sets are given a single field in their message, + with distinguished wrapper types for each possible field value. + - Marshal and Unmarshal are functions to encode and decode the wire format. + +When the .proto file specifies `syntax="proto3"`, there are some differences: + + - Non-repeated fields of non-message type are values instead of pointers. + - Enum types do not get an Enum method. + +Consider file test.proto, containing + +```proto + syntax = "proto2"; + package example; + + enum FOO { X = 17; }; + + message Test { + required string label = 1; + optional int32 type = 2 [default=77]; + repeated int64 reps = 3; + optional group OptionalGroup = 4 { + required string RequiredField = 5; + } + } +``` + +To create and play with a Test object from the example package, + +```go + package main + + import ( + "log" + + "github.com/golang/protobuf/proto" + "path/to/example" + ) + + func main() { + test := &example.Test { + Label: proto.String("hello"), + Type: proto.Int32(17), + Reps: []int64{1, 2, 3}, + Optionalgroup: &example.Test_OptionalGroup { + RequiredField: proto.String("good bye"), + }, + } + data, err := proto.Marshal(test) + if err != nil { + log.Fatal("marshaling error: ", err) + } + newTest := &example.Test{} + err = proto.Unmarshal(data, newTest) + if err != nil { + log.Fatal("unmarshaling error: ", err) + } + // Now test and newTest contain the same data. + if test.GetLabel() != newTest.GetLabel() { + log.Fatalf("data mismatch %q != %q", test.GetLabel(), newTest.GetLabel()) + } + // etc. + } +``` + +## Parameters ## + +To pass extra parameters to the plugin, use a comma-separated +parameter list separated from the output directory by a colon: + + + protoc --go_out=plugins=grpc,import_path=mypackage:. *.proto + + +- `import_prefix=xxx` - a prefix that is added onto the beginning of + all imports. Useful for things like generating protos in a + subdirectory, or regenerating vendored protobufs in-place. +- `import_path=foo/bar` - used as the package if no input files + declare `go_package`. If it contains slashes, everything up to the + rightmost slash is ignored. +- `plugins=plugin1+plugin2` - specifies the list of sub-plugins to + load. The only plugin in this repo is `grpc`. +- `Mfoo/bar.proto=quux/shme` - declares that foo/bar.proto is + associated with Go package quux/shme. This is subject to the + import_prefix parameter. + +## gRPC Support ## + +If a proto file specifies RPC services, protoc-gen-go can be instructed to +generate code compatible with gRPC (http://www.grpc.io/). To do this, pass +the `plugins` parameter to protoc-gen-go; the usual way is to insert it into +the --go_out argument to protoc: + + protoc --go_out=plugins=grpc:. *.proto + +## Compatibility ## + +The library and the generated code are expected to be stable over time. +However, we reserve the right to make breaking changes without notice for the +following reasons: + +- Security. A security issue in the specification or implementation may come to + light whose resolution requires breaking compatibility. We reserve the right + to address such security issues. +- Unspecified behavior. There are some aspects of the Protocol Buffers + specification that are undefined. Programs that depend on such unspecified + behavior may break in future releases. +- Specification errors or changes. If it becomes necessary to address an + inconsistency, incompleteness, or change in the Protocol Buffers + specification, resolving the issue could affect the meaning or legality of + existing programs. We reserve the right to address such issues, including + updating the implementations. +- Bugs. If the library has a bug that violates the specification, a program + that depends on the buggy behavior may break if the bug is fixed. We reserve + the right to fix such bugs. +- Adding methods or fields to generated structs. These may conflict with field + names that already exist in a schema, causing applications to break. When the + code generator encounters a field in the schema that would collide with a + generated field or method name, the code generator will append an underscore + to the generated field or method name. +- Adding, removing, or changing methods or fields in generated structs that + start with `XXX`. These parts of the generated code are exported out of + necessity, but should not be considered part of the public API. +- Adding, removing, or changing unexported symbols in generated code. + +Any breaking changes outside of these will be announced 6 months in advance to +protobuf@googlegroups.com. + +You should, whenever possible, use generated code created by the `protoc-gen-go` +tool built at the same commit as the `proto` package. The `proto` package +declares package-level constants in the form `ProtoPackageIsVersionX`. +Application code and generated code may depend on one of these constants to +ensure that compilation will fail if the available version of the proto library +is too old. Whenever we make a change to the generated code that requires newer +library support, in the same commit we will increment the version number of the +generated code and declare a new package-level constant whose name incorporates +the latest version number. Removing a compatibility constant is considered a +breaking change and would be subject to the announcement policy stated above. + +The `protoc-gen-go/generator` package exposes a plugin interface, +which is used by the gRPC code generation. This interface is not +supported and is subject to incompatible changes without notice. diff --git a/vendor/github.com/golang/protobuf/proto/all_test.go b/vendor/github.com/golang/protobuf/proto/all_test.go new file mode 100644 index 000000000..41451a407 --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/all_test.go @@ -0,0 +1,2278 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto_test + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "math" + "math/rand" + "reflect" + "runtime/debug" + "strings" + "testing" + "time" + + . "github.com/golang/protobuf/proto" + . "github.com/golang/protobuf/proto/testdata" +) + +var globalO *Buffer + +func old() *Buffer { + if globalO == nil { + globalO = NewBuffer(nil) + } + globalO.Reset() + return globalO +} + +func equalbytes(b1, b2 []byte, t *testing.T) { + if len(b1) != len(b2) { + t.Errorf("wrong lengths: 2*%d != %d", len(b1), len(b2)) + return + } + for i := 0; i < len(b1); i++ { + if b1[i] != b2[i] { + t.Errorf("bad byte[%d]:%x %x: %s %s", i, b1[i], b2[i], b1, b2) + } + } +} + +func initGoTestField() *GoTestField { + f := new(GoTestField) + f.Label = String("label") + f.Type = String("type") + return f +} + +// These are all structurally equivalent but the tag numbers differ. +// (It's remarkable that required, optional, and repeated all have +// 8 letters.) +func initGoTest_RequiredGroup() *GoTest_RequiredGroup { + return &GoTest_RequiredGroup{ + RequiredField: String("required"), + } +} + +func initGoTest_OptionalGroup() *GoTest_OptionalGroup { + return &GoTest_OptionalGroup{ + RequiredField: String("optional"), + } +} + +func initGoTest_RepeatedGroup() *GoTest_RepeatedGroup { + return &GoTest_RepeatedGroup{ + RequiredField: String("repeated"), + } +} + +func initGoTest(setdefaults bool) *GoTest { + pb := new(GoTest) + if setdefaults { + pb.F_BoolDefaulted = Bool(Default_GoTest_F_BoolDefaulted) + pb.F_Int32Defaulted = Int32(Default_GoTest_F_Int32Defaulted) + pb.F_Int64Defaulted = Int64(Default_GoTest_F_Int64Defaulted) + pb.F_Fixed32Defaulted = Uint32(Default_GoTest_F_Fixed32Defaulted) + pb.F_Fixed64Defaulted = Uint64(Default_GoTest_F_Fixed64Defaulted) + pb.F_Uint32Defaulted = Uint32(Default_GoTest_F_Uint32Defaulted) + pb.F_Uint64Defaulted = Uint64(Default_GoTest_F_Uint64Defaulted) + pb.F_FloatDefaulted = Float32(Default_GoTest_F_FloatDefaulted) + pb.F_DoubleDefaulted = Float64(Default_GoTest_F_DoubleDefaulted) + pb.F_StringDefaulted = String(Default_GoTest_F_StringDefaulted) + pb.F_BytesDefaulted = Default_GoTest_F_BytesDefaulted + pb.F_Sint32Defaulted = Int32(Default_GoTest_F_Sint32Defaulted) + pb.F_Sint64Defaulted = Int64(Default_GoTest_F_Sint64Defaulted) + } + + pb.Kind = GoTest_TIME.Enum() + pb.RequiredField = initGoTestField() + pb.F_BoolRequired = Bool(true) + pb.F_Int32Required = Int32(3) + pb.F_Int64Required = Int64(6) + pb.F_Fixed32Required = Uint32(32) + pb.F_Fixed64Required = Uint64(64) + pb.F_Uint32Required = Uint32(3232) + pb.F_Uint64Required = Uint64(6464) + pb.F_FloatRequired = Float32(3232) + pb.F_DoubleRequired = Float64(6464) + pb.F_StringRequired = String("string") + pb.F_BytesRequired = []byte("bytes") + pb.F_Sint32Required = Int32(-32) + pb.F_Sint64Required = Int64(-64) + pb.Requiredgroup = initGoTest_RequiredGroup() + + return pb +} + +func fail(msg string, b *bytes.Buffer, s string, t *testing.T) { + data := b.Bytes() + ld := len(data) + ls := len(s) / 2 + + fmt.Printf("fail %s ld=%d ls=%d\n", msg, ld, ls) + + // find the interesting spot - n + n := ls + if ld < ls { + n = ld + } + j := 0 + for i := 0; i < n; i++ { + bs := hex(s[j])*16 + hex(s[j+1]) + j += 2 + if data[i] == bs { + continue + } + n = i + break + } + l := n - 10 + if l < 0 { + l = 0 + } + h := n + 10 + + // find the interesting spot - n + fmt.Printf("is[%d]:", l) + for i := l; i < h; i++ { + if i >= ld { + fmt.Printf(" --") + continue + } + fmt.Printf(" %.2x", data[i]) + } + fmt.Printf("\n") + + fmt.Printf("sb[%d]:", l) + for i := l; i < h; i++ { + if i >= ls { + fmt.Printf(" --") + continue + } + bs := hex(s[j])*16 + hex(s[j+1]) + j += 2 + fmt.Printf(" %.2x", bs) + } + fmt.Printf("\n") + + t.Fail() + + // t.Errorf("%s: \ngood: %s\nbad: %x", msg, s, b.Bytes()) + // Print the output in a partially-decoded format; can + // be helpful when updating the test. It produces the output + // that is pasted, with minor edits, into the argument to verify(). + // data := b.Bytes() + // nesting := 0 + // for b.Len() > 0 { + // start := len(data) - b.Len() + // var u uint64 + // u, err := DecodeVarint(b) + // if err != nil { + // fmt.Printf("decode error on varint:", err) + // return + // } + // wire := u & 0x7 + // tag := u >> 3 + // switch wire { + // case WireVarint: + // v, err := DecodeVarint(b) + // if err != nil { + // fmt.Printf("decode error on varint:", err) + // return + // } + // fmt.Printf("\t\t\"%x\" // field %d, encoding %d, value %d\n", + // data[start:len(data)-b.Len()], tag, wire, v) + // case WireFixed32: + // v, err := DecodeFixed32(b) + // if err != nil { + // fmt.Printf("decode error on fixed32:", err) + // return + // } + // fmt.Printf("\t\t\"%x\" // field %d, encoding %d, value %d\n", + // data[start:len(data)-b.Len()], tag, wire, v) + // case WireFixed64: + // v, err := DecodeFixed64(b) + // if err != nil { + // fmt.Printf("decode error on fixed64:", err) + // return + // } + // fmt.Printf("\t\t\"%x\" // field %d, encoding %d, value %d\n", + // data[start:len(data)-b.Len()], tag, wire, v) + // case WireBytes: + // nb, err := DecodeVarint(b) + // if err != nil { + // fmt.Printf("decode error on bytes:", err) + // return + // } + // after_tag := len(data) - b.Len() + // str := make([]byte, nb) + // _, err = b.Read(str) + // if err != nil { + // fmt.Printf("decode error on bytes:", err) + // return + // } + // fmt.Printf("\t\t\"%x\" \"%x\" // field %d, encoding %d (FIELD)\n", + // data[start:after_tag], str, tag, wire) + // case WireStartGroup: + // nesting++ + // fmt.Printf("\t\t\"%x\"\t\t// start group field %d level %d\n", + // data[start:len(data)-b.Len()], tag, nesting) + // case WireEndGroup: + // fmt.Printf("\t\t\"%x\"\t\t// end group field %d level %d\n", + // data[start:len(data)-b.Len()], tag, nesting) + // nesting-- + // default: + // fmt.Printf("unrecognized wire type %d\n", wire) + // return + // } + // } +} + +func hex(c uint8) uint8 { + if '0' <= c && c <= '9' { + return c - '0' + } + if 'a' <= c && c <= 'f' { + return 10 + c - 'a' + } + if 'A' <= c && c <= 'F' { + return 10 + c - 'A' + } + return 0 +} + +func equal(b []byte, s string, t *testing.T) bool { + if 2*len(b) != len(s) { + // fail(fmt.Sprintf("wrong lengths: 2*%d != %d", len(b), len(s)), b, s, t) + fmt.Printf("wrong lengths: 2*%d != %d\n", len(b), len(s)) + return false + } + for i, j := 0, 0; i < len(b); i, j = i+1, j+2 { + x := hex(s[j])*16 + hex(s[j+1]) + if b[i] != x { + // fail(fmt.Sprintf("bad byte[%d]:%x %x", i, b[i], x), b, s, t) + fmt.Printf("bad byte[%d]:%x %x", i, b[i], x) + return false + } + } + return true +} + +func overify(t *testing.T, pb *GoTest, expected string) { + o := old() + err := o.Marshal(pb) + if err != nil { + fmt.Printf("overify marshal-1 err = %v", err) + o.DebugPrint("", o.Bytes()) + t.Fatalf("expected = %s", expected) + } + if !equal(o.Bytes(), expected, t) { + o.DebugPrint("overify neq 1", o.Bytes()) + t.Fatalf("expected = %s", expected) + } + + // Now test Unmarshal by recreating the original buffer. + pbd := new(GoTest) + err = o.Unmarshal(pbd) + if err != nil { + t.Fatalf("overify unmarshal err = %v", err) + o.DebugPrint("", o.Bytes()) + t.Fatalf("string = %s", expected) + } + o.Reset() + err = o.Marshal(pbd) + if err != nil { + t.Errorf("overify marshal-2 err = %v", err) + o.DebugPrint("", o.Bytes()) + t.Fatalf("string = %s", expected) + } + if !equal(o.Bytes(), expected, t) { + o.DebugPrint("overify neq 2", o.Bytes()) + t.Fatalf("string = %s", expected) + } +} + +// Simple tests for numeric encode/decode primitives (varint, etc.) +func TestNumericPrimitives(t *testing.T) { + for i := uint64(0); i < 1e6; i += 111 { + o := old() + if o.EncodeVarint(i) != nil { + t.Error("EncodeVarint") + break + } + x, e := o.DecodeVarint() + if e != nil { + t.Fatal("DecodeVarint") + } + if x != i { + t.Fatal("varint decode fail:", i, x) + } + + o = old() + if o.EncodeFixed32(i) != nil { + t.Fatal("encFixed32") + } + x, e = o.DecodeFixed32() + if e != nil { + t.Fatal("decFixed32") + } + if x != i { + t.Fatal("fixed32 decode fail:", i, x) + } + + o = old() + if o.EncodeFixed64(i*1234567) != nil { + t.Error("encFixed64") + break + } + x, e = o.DecodeFixed64() + if e != nil { + t.Error("decFixed64") + break + } + if x != i*1234567 { + t.Error("fixed64 decode fail:", i*1234567, x) + break + } + + o = old() + i32 := int32(i - 12345) + if o.EncodeZigzag32(uint64(i32)) != nil { + t.Fatal("EncodeZigzag32") + } + x, e = o.DecodeZigzag32() + if e != nil { + t.Fatal("DecodeZigzag32") + } + if x != uint64(uint32(i32)) { + t.Fatal("zigzag32 decode fail:", i32, x) + } + + o = old() + i64 := int64(i - 12345) + if o.EncodeZigzag64(uint64(i64)) != nil { + t.Fatal("EncodeZigzag64") + } + x, e = o.DecodeZigzag64() + if e != nil { + t.Fatal("DecodeZigzag64") + } + if x != uint64(i64) { + t.Fatal("zigzag64 decode fail:", i64, x) + } + } +} + +// fakeMarshaler is a simple struct implementing Marshaler and Message interfaces. +type fakeMarshaler struct { + b []byte + err error +} + +func (f *fakeMarshaler) Marshal() ([]byte, error) { return f.b, f.err } +func (f *fakeMarshaler) String() string { return fmt.Sprintf("Bytes: %v Error: %v", f.b, f.err) } +func (f *fakeMarshaler) ProtoMessage() {} +func (f *fakeMarshaler) Reset() {} + +type msgWithFakeMarshaler struct { + M *fakeMarshaler `protobuf:"bytes,1,opt,name=fake"` +} + +func (m *msgWithFakeMarshaler) String() string { return CompactTextString(m) } +func (m *msgWithFakeMarshaler) ProtoMessage() {} +func (m *msgWithFakeMarshaler) Reset() {} + +// Simple tests for proto messages that implement the Marshaler interface. +func TestMarshalerEncoding(t *testing.T) { + tests := []struct { + name string + m Message + want []byte + errType reflect.Type + }{ + { + name: "Marshaler that fails", + m: &fakeMarshaler{ + err: errors.New("some marshal err"), + b: []byte{5, 6, 7}, + }, + // Since the Marshal method returned bytes, they should be written to the + // buffer. (For efficiency, we assume that Marshal implementations are + // always correct w.r.t. RequiredNotSetError and output.) + want: []byte{5, 6, 7}, + errType: reflect.TypeOf(errors.New("some marshal err")), + }, + { + name: "Marshaler that fails with RequiredNotSetError", + m: &msgWithFakeMarshaler{ + M: &fakeMarshaler{ + err: &RequiredNotSetError{}, + b: []byte{5, 6, 7}, + }, + }, + // Since there's an error that can be continued after, + // the buffer should be written. + want: []byte{ + 10, 3, // for &msgWithFakeMarshaler + 5, 6, 7, // for &fakeMarshaler + }, + errType: reflect.TypeOf(&RequiredNotSetError{}), + }, + { + name: "Marshaler that succeeds", + m: &fakeMarshaler{ + b: []byte{0, 1, 2, 3, 4, 127, 255}, + }, + want: []byte{0, 1, 2, 3, 4, 127, 255}, + }, + } + for _, test := range tests { + b := NewBuffer(nil) + err := b.Marshal(test.m) + if reflect.TypeOf(err) != test.errType { + t.Errorf("%s: got err %T(%v) wanted %T", test.name, err, err, test.errType) + } + if !reflect.DeepEqual(test.want, b.Bytes()) { + t.Errorf("%s: got bytes %v wanted %v", test.name, b.Bytes(), test.want) + } + if size := Size(test.m); size != len(b.Bytes()) { + t.Errorf("%s: Size(_) = %v, but marshaled to %v bytes", test.name, size, len(b.Bytes())) + } + + m, mErr := Marshal(test.m) + if !bytes.Equal(b.Bytes(), m) { + t.Errorf("%s: Marshal returned %v, but (*Buffer).Marshal wrote %v", test.name, m, b.Bytes()) + } + if !reflect.DeepEqual(err, mErr) { + t.Errorf("%s: Marshal err = %q, but (*Buffer).Marshal returned %q", + test.name, fmt.Sprint(mErr), fmt.Sprint(err)) + } + } +} + +// Simple tests for bytes +func TestBytesPrimitives(t *testing.T) { + o := old() + bytes := []byte{'n', 'o', 'w', ' ', 'i', 's', ' ', 't', 'h', 'e', ' ', 't', 'i', 'm', 'e'} + if o.EncodeRawBytes(bytes) != nil { + t.Error("EncodeRawBytes") + } + decb, e := o.DecodeRawBytes(false) + if e != nil { + t.Error("DecodeRawBytes") + } + equalbytes(bytes, decb, t) +} + +// Simple tests for strings +func TestStringPrimitives(t *testing.T) { + o := old() + s := "now is the time" + if o.EncodeStringBytes(s) != nil { + t.Error("enc_string") + } + decs, e := o.DecodeStringBytes() + if e != nil { + t.Error("dec_string") + } + if s != decs { + t.Error("string encode/decode fail:", s, decs) + } +} + +// Do we catch the "required bit not set" case? +func TestRequiredBit(t *testing.T) { + o := old() + pb := new(GoTest) + err := o.Marshal(pb) + if err == nil { + t.Error("did not catch missing required fields") + } else if strings.Index(err.Error(), "Kind") < 0 { + t.Error("wrong error type:", err) + } +} + +// Check that all fields are nil. +// Clearly silly, and a residue from a more interesting test with an earlier, +// different initialization property, but it once caught a compiler bug so +// it lives. +func checkInitialized(pb *GoTest, t *testing.T) { + if pb.F_BoolDefaulted != nil { + t.Error("New or Reset did not set boolean:", *pb.F_BoolDefaulted) + } + if pb.F_Int32Defaulted != nil { + t.Error("New or Reset did not set int32:", *pb.F_Int32Defaulted) + } + if pb.F_Int64Defaulted != nil { + t.Error("New or Reset did not set int64:", *pb.F_Int64Defaulted) + } + if pb.F_Fixed32Defaulted != nil { + t.Error("New or Reset did not set fixed32:", *pb.F_Fixed32Defaulted) + } + if pb.F_Fixed64Defaulted != nil { + t.Error("New or Reset did not set fixed64:", *pb.F_Fixed64Defaulted) + } + if pb.F_Uint32Defaulted != nil { + t.Error("New or Reset did not set uint32:", *pb.F_Uint32Defaulted) + } + if pb.F_Uint64Defaulted != nil { + t.Error("New or Reset did not set uint64:", *pb.F_Uint64Defaulted) + } + if pb.F_FloatDefaulted != nil { + t.Error("New or Reset did not set float:", *pb.F_FloatDefaulted) + } + if pb.F_DoubleDefaulted != nil { + t.Error("New or Reset did not set double:", *pb.F_DoubleDefaulted) + } + if pb.F_StringDefaulted != nil { + t.Error("New or Reset did not set string:", *pb.F_StringDefaulted) + } + if pb.F_BytesDefaulted != nil { + t.Error("New or Reset did not set bytes:", string(pb.F_BytesDefaulted)) + } + if pb.F_Sint32Defaulted != nil { + t.Error("New or Reset did not set int32:", *pb.F_Sint32Defaulted) + } + if pb.F_Sint64Defaulted != nil { + t.Error("New or Reset did not set int64:", *pb.F_Sint64Defaulted) + } +} + +// Does Reset() reset? +func TestReset(t *testing.T) { + pb := initGoTest(true) + // muck with some values + pb.F_BoolDefaulted = Bool(false) + pb.F_Int32Defaulted = Int32(237) + pb.F_Int64Defaulted = Int64(12346) + pb.F_Fixed32Defaulted = Uint32(32000) + pb.F_Fixed64Defaulted = Uint64(666) + pb.F_Uint32Defaulted = Uint32(323232) + pb.F_Uint64Defaulted = nil + pb.F_FloatDefaulted = nil + pb.F_DoubleDefaulted = Float64(0) + pb.F_StringDefaulted = String("gotcha") + pb.F_BytesDefaulted = []byte("asdfasdf") + pb.F_Sint32Defaulted = Int32(123) + pb.F_Sint64Defaulted = Int64(789) + pb.Reset() + checkInitialized(pb, t) +} + +// All required fields set, no defaults provided. +func TestEncodeDecode1(t *testing.T) { + pb := initGoTest(false) + overify(t, pb, + "0807"+ // field 1, encoding 0, value 7 + "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) + "5001"+ // field 10, encoding 0, value 1 + "5803"+ // field 11, encoding 0, value 3 + "6006"+ // field 12, encoding 0, value 6 + "6d20000000"+ // field 13, encoding 5, value 0x20 + "714000000000000000"+ // field 14, encoding 1, value 0x40 + "78a019"+ // field 15, encoding 0, value 0xca0 = 3232 + "8001c032"+ // field 16, encoding 0, value 0x1940 = 6464 + "8d0100004a45"+ // field 17, encoding 5, value 3232.0 + "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 + "9a0106"+"737472696e67"+ // field 19, encoding 2, string "string" + "b304"+ // field 70, encoding 3, start group + "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" + "b404"+ // field 70, encoding 4, end group + "aa0605"+"6279746573"+ // field 101, encoding 2, string "bytes" + "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 + "b8067f") // field 103, encoding 0, 0x7f zigzag64 +} + +// All required fields set, defaults provided. +func TestEncodeDecode2(t *testing.T) { + pb := initGoTest(true) + overify(t, pb, + "0807"+ // field 1, encoding 0, value 7 + "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) + "5001"+ // field 10, encoding 0, value 1 + "5803"+ // field 11, encoding 0, value 3 + "6006"+ // field 12, encoding 0, value 6 + "6d20000000"+ // field 13, encoding 5, value 32 + "714000000000000000"+ // field 14, encoding 1, value 64 + "78a019"+ // field 15, encoding 0, value 3232 + "8001c032"+ // field 16, encoding 0, value 6464 + "8d0100004a45"+ // field 17, encoding 5, value 3232.0 + "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 + "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" + "c00201"+ // field 40, encoding 0, value 1 + "c80220"+ // field 41, encoding 0, value 32 + "d00240"+ // field 42, encoding 0, value 64 + "dd0240010000"+ // field 43, encoding 5, value 320 + "e1028002000000000000"+ // field 44, encoding 1, value 640 + "e8028019"+ // field 45, encoding 0, value 3200 + "f0028032"+ // field 46, encoding 0, value 6400 + "fd02e0659948"+ // field 47, encoding 5, value 314159.0 + "81030000000050971041"+ // field 48, encoding 1, value 271828.0 + "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" + "b304"+ // start group field 70 level 1 + "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" + "b404"+ // end group field 70 level 1 + "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" + "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 + "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 + "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" + "90193f"+ // field 402, encoding 0, value 63 + "98197f") // field 403, encoding 0, value 127 + +} + +// All default fields set to their default value by hand +func TestEncodeDecode3(t *testing.T) { + pb := initGoTest(false) + pb.F_BoolDefaulted = Bool(true) + pb.F_Int32Defaulted = Int32(32) + pb.F_Int64Defaulted = Int64(64) + pb.F_Fixed32Defaulted = Uint32(320) + pb.F_Fixed64Defaulted = Uint64(640) + pb.F_Uint32Defaulted = Uint32(3200) + pb.F_Uint64Defaulted = Uint64(6400) + pb.F_FloatDefaulted = Float32(314159) + pb.F_DoubleDefaulted = Float64(271828) + pb.F_StringDefaulted = String("hello, \"world!\"\n") + pb.F_BytesDefaulted = []byte("Bignose") + pb.F_Sint32Defaulted = Int32(-32) + pb.F_Sint64Defaulted = Int64(-64) + + overify(t, pb, + "0807"+ // field 1, encoding 0, value 7 + "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) + "5001"+ // field 10, encoding 0, value 1 + "5803"+ // field 11, encoding 0, value 3 + "6006"+ // field 12, encoding 0, value 6 + "6d20000000"+ // field 13, encoding 5, value 32 + "714000000000000000"+ // field 14, encoding 1, value 64 + "78a019"+ // field 15, encoding 0, value 3232 + "8001c032"+ // field 16, encoding 0, value 6464 + "8d0100004a45"+ // field 17, encoding 5, value 3232.0 + "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 + "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" + "c00201"+ // field 40, encoding 0, value 1 + "c80220"+ // field 41, encoding 0, value 32 + "d00240"+ // field 42, encoding 0, value 64 + "dd0240010000"+ // field 43, encoding 5, value 320 + "e1028002000000000000"+ // field 44, encoding 1, value 640 + "e8028019"+ // field 45, encoding 0, value 3200 + "f0028032"+ // field 46, encoding 0, value 6400 + "fd02e0659948"+ // field 47, encoding 5, value 314159.0 + "81030000000050971041"+ // field 48, encoding 1, value 271828.0 + "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" + "b304"+ // start group field 70 level 1 + "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" + "b404"+ // end group field 70 level 1 + "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" + "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 + "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 + "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" + "90193f"+ // field 402, encoding 0, value 63 + "98197f") // field 403, encoding 0, value 127 + +} + +// All required fields set, defaults provided, all non-defaulted optional fields have values. +func TestEncodeDecode4(t *testing.T) { + pb := initGoTest(true) + pb.Table = String("hello") + pb.Param = Int32(7) + pb.OptionalField = initGoTestField() + pb.F_BoolOptional = Bool(true) + pb.F_Int32Optional = Int32(32) + pb.F_Int64Optional = Int64(64) + pb.F_Fixed32Optional = Uint32(3232) + pb.F_Fixed64Optional = Uint64(6464) + pb.F_Uint32Optional = Uint32(323232) + pb.F_Uint64Optional = Uint64(646464) + pb.F_FloatOptional = Float32(32.) + pb.F_DoubleOptional = Float64(64.) + pb.F_StringOptional = String("hello") + pb.F_BytesOptional = []byte("Bignose") + pb.F_Sint32Optional = Int32(-32) + pb.F_Sint64Optional = Int64(-64) + pb.Optionalgroup = initGoTest_OptionalGroup() + + overify(t, pb, + "0807"+ // field 1, encoding 0, value 7 + "1205"+"68656c6c6f"+ // field 2, encoding 2, string "hello" + "1807"+ // field 3, encoding 0, value 7 + "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) + "320d"+"0a056c6162656c120474797065"+ // field 6, encoding 2 (GoTestField) + "5001"+ // field 10, encoding 0, value 1 + "5803"+ // field 11, encoding 0, value 3 + "6006"+ // field 12, encoding 0, value 6 + "6d20000000"+ // field 13, encoding 5, value 32 + "714000000000000000"+ // field 14, encoding 1, value 64 + "78a019"+ // field 15, encoding 0, value 3232 + "8001c032"+ // field 16, encoding 0, value 6464 + "8d0100004a45"+ // field 17, encoding 5, value 3232.0 + "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 + "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" + "f00101"+ // field 30, encoding 0, value 1 + "f80120"+ // field 31, encoding 0, value 32 + "800240"+ // field 32, encoding 0, value 64 + "8d02a00c0000"+ // field 33, encoding 5, value 3232 + "91024019000000000000"+ // field 34, encoding 1, value 6464 + "9802a0dd13"+ // field 35, encoding 0, value 323232 + "a002c0ba27"+ // field 36, encoding 0, value 646464 + "ad0200000042"+ // field 37, encoding 5, value 32.0 + "b1020000000000005040"+ // field 38, encoding 1, value 64.0 + "ba0205"+"68656c6c6f"+ // field 39, encoding 2, string "hello" + "c00201"+ // field 40, encoding 0, value 1 + "c80220"+ // field 41, encoding 0, value 32 + "d00240"+ // field 42, encoding 0, value 64 + "dd0240010000"+ // field 43, encoding 5, value 320 + "e1028002000000000000"+ // field 44, encoding 1, value 640 + "e8028019"+ // field 45, encoding 0, value 3200 + "f0028032"+ // field 46, encoding 0, value 6400 + "fd02e0659948"+ // field 47, encoding 5, value 314159.0 + "81030000000050971041"+ // field 48, encoding 1, value 271828.0 + "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" + "b304"+ // start group field 70 level 1 + "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" + "b404"+ // end group field 70 level 1 + "d305"+ // start group field 90 level 1 + "da0508"+"6f7074696f6e616c"+ // field 91, encoding 2, string "optional" + "d405"+ // end group field 90 level 1 + "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" + "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 + "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 + "ea1207"+"4269676e6f7365"+ // field 301, encoding 2, string "Bignose" + "f0123f"+ // field 302, encoding 0, value 63 + "f8127f"+ // field 303, encoding 0, value 127 + "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" + "90193f"+ // field 402, encoding 0, value 63 + "98197f") // field 403, encoding 0, value 127 + +} + +// All required fields set, defaults provided, all repeated fields given two values. +func TestEncodeDecode5(t *testing.T) { + pb := initGoTest(true) + pb.RepeatedField = []*GoTestField{initGoTestField(), initGoTestField()} + pb.F_BoolRepeated = []bool{false, true} + pb.F_Int32Repeated = []int32{32, 33} + pb.F_Int64Repeated = []int64{64, 65} + pb.F_Fixed32Repeated = []uint32{3232, 3333} + pb.F_Fixed64Repeated = []uint64{6464, 6565} + pb.F_Uint32Repeated = []uint32{323232, 333333} + pb.F_Uint64Repeated = []uint64{646464, 656565} + pb.F_FloatRepeated = []float32{32., 33.} + pb.F_DoubleRepeated = []float64{64., 65.} + pb.F_StringRepeated = []string{"hello", "sailor"} + pb.F_BytesRepeated = [][]byte{[]byte("big"), []byte("nose")} + pb.F_Sint32Repeated = []int32{32, -32} + pb.F_Sint64Repeated = []int64{64, -64} + pb.Repeatedgroup = []*GoTest_RepeatedGroup{initGoTest_RepeatedGroup(), initGoTest_RepeatedGroup()} + + overify(t, pb, + "0807"+ // field 1, encoding 0, value 7 + "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) + "2a0d"+"0a056c6162656c120474797065"+ // field 5, encoding 2 (GoTestField) + "2a0d"+"0a056c6162656c120474797065"+ // field 5, encoding 2 (GoTestField) + "5001"+ // field 10, encoding 0, value 1 + "5803"+ // field 11, encoding 0, value 3 + "6006"+ // field 12, encoding 0, value 6 + "6d20000000"+ // field 13, encoding 5, value 32 + "714000000000000000"+ // field 14, encoding 1, value 64 + "78a019"+ // field 15, encoding 0, value 3232 + "8001c032"+ // field 16, encoding 0, value 6464 + "8d0100004a45"+ // field 17, encoding 5, value 3232.0 + "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 + "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" + "a00100"+ // field 20, encoding 0, value 0 + "a00101"+ // field 20, encoding 0, value 1 + "a80120"+ // field 21, encoding 0, value 32 + "a80121"+ // field 21, encoding 0, value 33 + "b00140"+ // field 22, encoding 0, value 64 + "b00141"+ // field 22, encoding 0, value 65 + "bd01a00c0000"+ // field 23, encoding 5, value 3232 + "bd01050d0000"+ // field 23, encoding 5, value 3333 + "c1014019000000000000"+ // field 24, encoding 1, value 6464 + "c101a519000000000000"+ // field 24, encoding 1, value 6565 + "c801a0dd13"+ // field 25, encoding 0, value 323232 + "c80195ac14"+ // field 25, encoding 0, value 333333 + "d001c0ba27"+ // field 26, encoding 0, value 646464 + "d001b58928"+ // field 26, encoding 0, value 656565 + "dd0100000042"+ // field 27, encoding 5, value 32.0 + "dd0100000442"+ // field 27, encoding 5, value 33.0 + "e1010000000000005040"+ // field 28, encoding 1, value 64.0 + "e1010000000000405040"+ // field 28, encoding 1, value 65.0 + "ea0105"+"68656c6c6f"+ // field 29, encoding 2, string "hello" + "ea0106"+"7361696c6f72"+ // field 29, encoding 2, string "sailor" + "c00201"+ // field 40, encoding 0, value 1 + "c80220"+ // field 41, encoding 0, value 32 + "d00240"+ // field 42, encoding 0, value 64 + "dd0240010000"+ // field 43, encoding 5, value 320 + "e1028002000000000000"+ // field 44, encoding 1, value 640 + "e8028019"+ // field 45, encoding 0, value 3200 + "f0028032"+ // field 46, encoding 0, value 6400 + "fd02e0659948"+ // field 47, encoding 5, value 314159.0 + "81030000000050971041"+ // field 48, encoding 1, value 271828.0 + "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" + "b304"+ // start group field 70 level 1 + "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" + "b404"+ // end group field 70 level 1 + "8305"+ // start group field 80 level 1 + "8a0508"+"7265706561746564"+ // field 81, encoding 2, string "repeated" + "8405"+ // end group field 80 level 1 + "8305"+ // start group field 80 level 1 + "8a0508"+"7265706561746564"+ // field 81, encoding 2, string "repeated" + "8405"+ // end group field 80 level 1 + "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" + "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 + "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 + "ca0c03"+"626967"+ // field 201, encoding 2, string "big" + "ca0c04"+"6e6f7365"+ // field 201, encoding 2, string "nose" + "d00c40"+ // field 202, encoding 0, value 32 + "d00c3f"+ // field 202, encoding 0, value -32 + "d80c8001"+ // field 203, encoding 0, value 64 + "d80c7f"+ // field 203, encoding 0, value -64 + "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" + "90193f"+ // field 402, encoding 0, value 63 + "98197f") // field 403, encoding 0, value 127 + +} + +// All required fields set, all packed repeated fields given two values. +func TestEncodeDecode6(t *testing.T) { + pb := initGoTest(false) + pb.F_BoolRepeatedPacked = []bool{false, true} + pb.F_Int32RepeatedPacked = []int32{32, 33} + pb.F_Int64RepeatedPacked = []int64{64, 65} + pb.F_Fixed32RepeatedPacked = []uint32{3232, 3333} + pb.F_Fixed64RepeatedPacked = []uint64{6464, 6565} + pb.F_Uint32RepeatedPacked = []uint32{323232, 333333} + pb.F_Uint64RepeatedPacked = []uint64{646464, 656565} + pb.F_FloatRepeatedPacked = []float32{32., 33.} + pb.F_DoubleRepeatedPacked = []float64{64., 65.} + pb.F_Sint32RepeatedPacked = []int32{32, -32} + pb.F_Sint64RepeatedPacked = []int64{64, -64} + + overify(t, pb, + "0807"+ // field 1, encoding 0, value 7 + "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) + "5001"+ // field 10, encoding 0, value 1 + "5803"+ // field 11, encoding 0, value 3 + "6006"+ // field 12, encoding 0, value 6 + "6d20000000"+ // field 13, encoding 5, value 32 + "714000000000000000"+ // field 14, encoding 1, value 64 + "78a019"+ // field 15, encoding 0, value 3232 + "8001c032"+ // field 16, encoding 0, value 6464 + "8d0100004a45"+ // field 17, encoding 5, value 3232.0 + "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 + "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" + "9203020001"+ // field 50, encoding 2, 2 bytes, value 0, value 1 + "9a03022021"+ // field 51, encoding 2, 2 bytes, value 32, value 33 + "a203024041"+ // field 52, encoding 2, 2 bytes, value 64, value 65 + "aa0308"+ // field 53, encoding 2, 8 bytes + "a00c0000050d0000"+ // value 3232, value 3333 + "b20310"+ // field 54, encoding 2, 16 bytes + "4019000000000000a519000000000000"+ // value 6464, value 6565 + "ba0306"+ // field 55, encoding 2, 6 bytes + "a0dd1395ac14"+ // value 323232, value 333333 + "c20306"+ // field 56, encoding 2, 6 bytes + "c0ba27b58928"+ // value 646464, value 656565 + "ca0308"+ // field 57, encoding 2, 8 bytes + "0000004200000442"+ // value 32.0, value 33.0 + "d20310"+ // field 58, encoding 2, 16 bytes + "00000000000050400000000000405040"+ // value 64.0, value 65.0 + "b304"+ // start group field 70 level 1 + "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" + "b404"+ // end group field 70 level 1 + "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" + "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 + "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 + "b21f02"+ // field 502, encoding 2, 2 bytes + "403f"+ // value 32, value -32 + "ba1f03"+ // field 503, encoding 2, 3 bytes + "80017f") // value 64, value -64 +} + +// Test that we can encode empty bytes fields. +func TestEncodeDecodeBytes1(t *testing.T) { + pb := initGoTest(false) + + // Create our bytes + pb.F_BytesRequired = []byte{} + pb.F_BytesRepeated = [][]byte{{}} + pb.F_BytesOptional = []byte{} + + d, err := Marshal(pb) + if err != nil { + t.Error(err) + } + + pbd := new(GoTest) + if err := Unmarshal(d, pbd); err != nil { + t.Error(err) + } + + if pbd.F_BytesRequired == nil || len(pbd.F_BytesRequired) != 0 { + t.Error("required empty bytes field is incorrect") + } + if pbd.F_BytesRepeated == nil || len(pbd.F_BytesRepeated) == 1 && pbd.F_BytesRepeated[0] == nil { + t.Error("repeated empty bytes field is incorrect") + } + if pbd.F_BytesOptional == nil || len(pbd.F_BytesOptional) != 0 { + t.Error("optional empty bytes field is incorrect") + } +} + +// Test that we encode nil-valued fields of a repeated bytes field correctly. +// Since entries in a repeated field cannot be nil, nil must mean empty value. +func TestEncodeDecodeBytes2(t *testing.T) { + pb := initGoTest(false) + + // Create our bytes + pb.F_BytesRepeated = [][]byte{nil} + + d, err := Marshal(pb) + if err != nil { + t.Error(err) + } + + pbd := new(GoTest) + if err := Unmarshal(d, pbd); err != nil { + t.Error(err) + } + + if len(pbd.F_BytesRepeated) != 1 || pbd.F_BytesRepeated[0] == nil { + t.Error("Unexpected value for repeated bytes field") + } +} + +// All required fields set, defaults provided, all repeated fields given two values. +func TestSkippingUnrecognizedFields(t *testing.T) { + o := old() + pb := initGoTestField() + + // Marshal it normally. + o.Marshal(pb) + + // Now new a GoSkipTest record. + skip := &GoSkipTest{ + SkipInt32: Int32(32), + SkipFixed32: Uint32(3232), + SkipFixed64: Uint64(6464), + SkipString: String("skipper"), + Skipgroup: &GoSkipTest_SkipGroup{ + GroupInt32: Int32(75), + GroupString: String("wxyz"), + }, + } + + // Marshal it into same buffer. + o.Marshal(skip) + + pbd := new(GoTestField) + o.Unmarshal(pbd) + + // The __unrecognized field should be a marshaling of GoSkipTest + skipd := new(GoSkipTest) + + o.SetBuf(pbd.XXX_unrecognized) + o.Unmarshal(skipd) + + if *skipd.SkipInt32 != *skip.SkipInt32 { + t.Error("skip int32", skipd.SkipInt32) + } + if *skipd.SkipFixed32 != *skip.SkipFixed32 { + t.Error("skip fixed32", skipd.SkipFixed32) + } + if *skipd.SkipFixed64 != *skip.SkipFixed64 { + t.Error("skip fixed64", skipd.SkipFixed64) + } + if *skipd.SkipString != *skip.SkipString { + t.Error("skip string", *skipd.SkipString) + } + if *skipd.Skipgroup.GroupInt32 != *skip.Skipgroup.GroupInt32 { + t.Error("skip group int32", skipd.Skipgroup.GroupInt32) + } + if *skipd.Skipgroup.GroupString != *skip.Skipgroup.GroupString { + t.Error("skip group string", *skipd.Skipgroup.GroupString) + } +} + +// Check that unrecognized fields of a submessage are preserved. +func TestSubmessageUnrecognizedFields(t *testing.T) { + nm := &NewMessage{ + Nested: &NewMessage_Nested{ + Name: String("Nigel"), + FoodGroup: String("carbs"), + }, + } + b, err := Marshal(nm) + if err != nil { + t.Fatalf("Marshal of NewMessage: %v", err) + } + + // Unmarshal into an OldMessage. + om := new(OldMessage) + if err := Unmarshal(b, om); err != nil { + t.Fatalf("Unmarshal to OldMessage: %v", err) + } + exp := &OldMessage{ + Nested: &OldMessage_Nested{ + Name: String("Nigel"), + // normal protocol buffer users should not do this + XXX_unrecognized: []byte("\x12\x05carbs"), + }, + } + if !Equal(om, exp) { + t.Errorf("om = %v, want %v", om, exp) + } + + // Clone the OldMessage. + om = Clone(om).(*OldMessage) + if !Equal(om, exp) { + t.Errorf("Clone(om) = %v, want %v", om, exp) + } + + // Marshal the OldMessage, then unmarshal it into an empty NewMessage. + if b, err = Marshal(om); err != nil { + t.Fatalf("Marshal of OldMessage: %v", err) + } + t.Logf("Marshal(%v) -> %q", om, b) + nm2 := new(NewMessage) + if err := Unmarshal(b, nm2); err != nil { + t.Fatalf("Unmarshal to NewMessage: %v", err) + } + if !Equal(nm, nm2) { + t.Errorf("NewMessage round-trip: %v => %v", nm, nm2) + } +} + +// Check that an int32 field can be upgraded to an int64 field. +func TestNegativeInt32(t *testing.T) { + om := &OldMessage{ + Num: Int32(-1), + } + b, err := Marshal(om) + if err != nil { + t.Fatalf("Marshal of OldMessage: %v", err) + } + + // Check the size. It should be 11 bytes; + // 1 for the field/wire type, and 10 for the negative number. + if len(b) != 11 { + t.Errorf("%v marshaled as %q, wanted 11 bytes", om, b) + } + + // Unmarshal into a NewMessage. + nm := new(NewMessage) + if err := Unmarshal(b, nm); err != nil { + t.Fatalf("Unmarshal to NewMessage: %v", err) + } + want := &NewMessage{ + Num: Int64(-1), + } + if !Equal(nm, want) { + t.Errorf("nm = %v, want %v", nm, want) + } +} + +// Check that we can grow an array (repeated field) to have many elements. +// This test doesn't depend only on our encoding; for variety, it makes sure +// we create, encode, and decode the correct contents explicitly. It's therefore +// a bit messier. +// This test also uses (and hence tests) the Marshal/Unmarshal functions +// instead of the methods. +func TestBigRepeated(t *testing.T) { + pb := initGoTest(true) + + // Create the arrays + const N = 50 // Internally the library starts much smaller. + pb.Repeatedgroup = make([]*GoTest_RepeatedGroup, N) + pb.F_Sint64Repeated = make([]int64, N) + pb.F_Sint32Repeated = make([]int32, N) + pb.F_BytesRepeated = make([][]byte, N) + pb.F_StringRepeated = make([]string, N) + pb.F_DoubleRepeated = make([]float64, N) + pb.F_FloatRepeated = make([]float32, N) + pb.F_Uint64Repeated = make([]uint64, N) + pb.F_Uint32Repeated = make([]uint32, N) + pb.F_Fixed64Repeated = make([]uint64, N) + pb.F_Fixed32Repeated = make([]uint32, N) + pb.F_Int64Repeated = make([]int64, N) + pb.F_Int32Repeated = make([]int32, N) + pb.F_BoolRepeated = make([]bool, N) + pb.RepeatedField = make([]*GoTestField, N) + + // Fill in the arrays with checkable values. + igtf := initGoTestField() + igtrg := initGoTest_RepeatedGroup() + for i := 0; i < N; i++ { + pb.Repeatedgroup[i] = igtrg + pb.F_Sint64Repeated[i] = int64(i) + pb.F_Sint32Repeated[i] = int32(i) + s := fmt.Sprint(i) + pb.F_BytesRepeated[i] = []byte(s) + pb.F_StringRepeated[i] = s + pb.F_DoubleRepeated[i] = float64(i) + pb.F_FloatRepeated[i] = float32(i) + pb.F_Uint64Repeated[i] = uint64(i) + pb.F_Uint32Repeated[i] = uint32(i) + pb.F_Fixed64Repeated[i] = uint64(i) + pb.F_Fixed32Repeated[i] = uint32(i) + pb.F_Int64Repeated[i] = int64(i) + pb.F_Int32Repeated[i] = int32(i) + pb.F_BoolRepeated[i] = i%2 == 0 + pb.RepeatedField[i] = igtf + } + + // Marshal. + buf, _ := Marshal(pb) + + // Now test Unmarshal by recreating the original buffer. + pbd := new(GoTest) + Unmarshal(buf, pbd) + + // Check the checkable values + for i := uint64(0); i < N; i++ { + if pbd.Repeatedgroup[i] == nil { // TODO: more checking? + t.Error("pbd.Repeatedgroup bad") + } + var x uint64 + x = uint64(pbd.F_Sint64Repeated[i]) + if x != i { + t.Error("pbd.F_Sint64Repeated bad", x, i) + } + x = uint64(pbd.F_Sint32Repeated[i]) + if x != i { + t.Error("pbd.F_Sint32Repeated bad", x, i) + } + s := fmt.Sprint(i) + equalbytes(pbd.F_BytesRepeated[i], []byte(s), t) + if pbd.F_StringRepeated[i] != s { + t.Error("pbd.F_Sint32Repeated bad", pbd.F_StringRepeated[i], i) + } + x = uint64(pbd.F_DoubleRepeated[i]) + if x != i { + t.Error("pbd.F_DoubleRepeated bad", x, i) + } + x = uint64(pbd.F_FloatRepeated[i]) + if x != i { + t.Error("pbd.F_FloatRepeated bad", x, i) + } + x = pbd.F_Uint64Repeated[i] + if x != i { + t.Error("pbd.F_Uint64Repeated bad", x, i) + } + x = uint64(pbd.F_Uint32Repeated[i]) + if x != i { + t.Error("pbd.F_Uint32Repeated bad", x, i) + } + x = pbd.F_Fixed64Repeated[i] + if x != i { + t.Error("pbd.F_Fixed64Repeated bad", x, i) + } + x = uint64(pbd.F_Fixed32Repeated[i]) + if x != i { + t.Error("pbd.F_Fixed32Repeated bad", x, i) + } + x = uint64(pbd.F_Int64Repeated[i]) + if x != i { + t.Error("pbd.F_Int64Repeated bad", x, i) + } + x = uint64(pbd.F_Int32Repeated[i]) + if x != i { + t.Error("pbd.F_Int32Repeated bad", x, i) + } + if pbd.F_BoolRepeated[i] != (i%2 == 0) { + t.Error("pbd.F_BoolRepeated bad", x, i) + } + if pbd.RepeatedField[i] == nil { // TODO: more checking? + t.Error("pbd.RepeatedField bad") + } + } +} + +// Verify we give a useful message when decoding to the wrong structure type. +func TestTypeMismatch(t *testing.T) { + pb1 := initGoTest(true) + + // Marshal + o := old() + o.Marshal(pb1) + + // Now Unmarshal it to the wrong type. + pb2 := initGoTestField() + err := o.Unmarshal(pb2) + if err == nil { + t.Error("expected error, got no error") + } else if !strings.Contains(err.Error(), "bad wiretype") { + t.Error("expected bad wiretype error, got", err) + } +} + +func encodeDecode(t *testing.T, in, out Message, msg string) { + buf, err := Marshal(in) + if err != nil { + t.Fatalf("failed marshaling %v: %v", msg, err) + } + if err := Unmarshal(buf, out); err != nil { + t.Fatalf("failed unmarshaling %v: %v", msg, err) + } +} + +func TestPackedNonPackedDecoderSwitching(t *testing.T) { + np, p := new(NonPackedTest), new(PackedTest) + + // non-packed -> packed + np.A = []int32{0, 1, 1, 2, 3, 5} + encodeDecode(t, np, p, "non-packed -> packed") + if !reflect.DeepEqual(np.A, p.B) { + t.Errorf("failed non-packed -> packed; np.A=%+v, p.B=%+v", np.A, p.B) + } + + // packed -> non-packed + np.Reset() + p.B = []int32{3, 1, 4, 1, 5, 9} + encodeDecode(t, p, np, "packed -> non-packed") + if !reflect.DeepEqual(p.B, np.A) { + t.Errorf("failed packed -> non-packed; p.B=%+v, np.A=%+v", p.B, np.A) + } +} + +func TestProto1RepeatedGroup(t *testing.T) { + pb := &MessageList{ + Message: []*MessageList_Message{ + { + Name: String("blah"), + Count: Int32(7), + }, + // NOTE: pb.Message[1] is a nil + nil, + }, + } + + o := old() + err := o.Marshal(pb) + if err == nil || !strings.Contains(err.Error(), "repeated field Message has nil") { + t.Fatalf("unexpected or no error when marshaling: %v", err) + } +} + +// Test that enums work. Checks for a bug introduced by making enums +// named types instead of int32: newInt32FromUint64 would crash with +// a type mismatch in reflect.PointTo. +func TestEnum(t *testing.T) { + pb := new(GoEnum) + pb.Foo = FOO_FOO1.Enum() + o := old() + if err := o.Marshal(pb); err != nil { + t.Fatal("error encoding enum:", err) + } + pb1 := new(GoEnum) + if err := o.Unmarshal(pb1); err != nil { + t.Fatal("error decoding enum:", err) + } + if *pb1.Foo != FOO_FOO1 { + t.Error("expected 7 but got ", *pb1.Foo) + } +} + +// Enum types have String methods. Check that enum fields can be printed. +// We don't care what the value actually is, just as long as it doesn't crash. +func TestPrintingNilEnumFields(t *testing.T) { + pb := new(GoEnum) + _ = fmt.Sprintf("%+v", pb) +} + +// Verify that absent required fields cause Marshal/Unmarshal to return errors. +func TestRequiredFieldEnforcement(t *testing.T) { + pb := new(GoTestField) + _, err := Marshal(pb) + if err == nil { + t.Error("marshal: expected error, got nil") + } else if _, ok := err.(*RequiredNotSetError); !ok || !strings.Contains(err.Error(), "Label") { + t.Errorf("marshal: bad error type: %v", err) + } + + // A slightly sneaky, yet valid, proto. It encodes the same required field twice, + // so simply counting the required fields is insufficient. + // field 1, encoding 2, value "hi" + buf := []byte("\x0A\x02hi\x0A\x02hi") + err = Unmarshal(buf, pb) + if err == nil { + t.Error("unmarshal: expected error, got nil") + } else if _, ok := err.(*RequiredNotSetError); !ok || !strings.Contains(err.Error(), "{Unknown}") { + t.Errorf("unmarshal: bad error type: %v", err) + } +} + +// Verify that absent required fields in groups cause Marshal/Unmarshal to return errors. +func TestRequiredFieldEnforcementGroups(t *testing.T) { + pb := &GoTestRequiredGroupField{Group: &GoTestRequiredGroupField_Group{}} + if _, err := Marshal(pb); err == nil { + t.Error("marshal: expected error, got nil") + } else if _, ok := err.(*RequiredNotSetError); !ok || !strings.Contains(err.Error(), "Group.Field") { + t.Errorf("marshal: bad error type: %v", err) + } + + buf := []byte{11, 12} + if err := Unmarshal(buf, pb); err == nil { + t.Error("unmarshal: expected error, got nil") + } else if _, ok := err.(*RequiredNotSetError); !ok || !strings.Contains(err.Error(), "Group.{Unknown}") { + t.Errorf("unmarshal: bad error type: %v", err) + } +} + +func TestTypedNilMarshal(t *testing.T) { + // A typed nil should return ErrNil and not crash. + { + var m *GoEnum + if _, err := Marshal(m); err != ErrNil { + t.Errorf("Marshal(%#v): got %v, want ErrNil", m, err) + } + } + + { + m := &Communique{Union: &Communique_Msg{nil}} + if _, err := Marshal(m); err == nil || err == ErrNil { + t.Errorf("Marshal(%#v): got %v, want errOneofHasNil", m, err) + } + } +} + +// A type that implements the Marshaler interface, but is not nillable. +type nonNillableInt uint64 + +func (nni nonNillableInt) Marshal() ([]byte, error) { + return EncodeVarint(uint64(nni)), nil +} + +type NNIMessage struct { + nni nonNillableInt +} + +func (*NNIMessage) Reset() {} +func (*NNIMessage) String() string { return "" } +func (*NNIMessage) ProtoMessage() {} + +// A type that implements the Marshaler interface and is nillable. +type nillableMessage struct { + x uint64 +} + +func (nm *nillableMessage) Marshal() ([]byte, error) { + return EncodeVarint(nm.x), nil +} + +type NMMessage struct { + nm *nillableMessage +} + +func (*NMMessage) Reset() {} +func (*NMMessage) String() string { return "" } +func (*NMMessage) ProtoMessage() {} + +// Verify a type that uses the Marshaler interface, but has a nil pointer. +func TestNilMarshaler(t *testing.T) { + // Try a struct with a Marshaler field that is nil. + // It should be directly marshable. + nmm := new(NMMessage) + if _, err := Marshal(nmm); err != nil { + t.Error("unexpected error marshaling nmm: ", err) + } + + // Try a struct with a Marshaler field that is not nillable. + nnim := new(NNIMessage) + nnim.nni = 7 + var _ Marshaler = nnim.nni // verify it is truly a Marshaler + if _, err := Marshal(nnim); err != nil { + t.Error("unexpected error marshaling nnim: ", err) + } +} + +func TestAllSetDefaults(t *testing.T) { + // Exercise SetDefaults with all scalar field types. + m := &Defaults{ + // NaN != NaN, so override that here. + F_Nan: Float32(1.7), + } + expected := &Defaults{ + F_Bool: Bool(true), + F_Int32: Int32(32), + F_Int64: Int64(64), + F_Fixed32: Uint32(320), + F_Fixed64: Uint64(640), + F_Uint32: Uint32(3200), + F_Uint64: Uint64(6400), + F_Float: Float32(314159), + F_Double: Float64(271828), + F_String: String(`hello, "world!"` + "\n"), + F_Bytes: []byte("Bignose"), + F_Sint32: Int32(-32), + F_Sint64: Int64(-64), + F_Enum: Defaults_GREEN.Enum(), + F_Pinf: Float32(float32(math.Inf(1))), + F_Ninf: Float32(float32(math.Inf(-1))), + F_Nan: Float32(1.7), + StrZero: String(""), + } + SetDefaults(m) + if !Equal(m, expected) { + t.Errorf("SetDefaults failed\n got %v\nwant %v", m, expected) + } +} + +func TestSetDefaultsWithSetField(t *testing.T) { + // Check that a set value is not overridden. + m := &Defaults{ + F_Int32: Int32(12), + } + SetDefaults(m) + if v := m.GetF_Int32(); v != 12 { + t.Errorf("m.FInt32 = %v, want 12", v) + } +} + +func TestSetDefaultsWithSubMessage(t *testing.T) { + m := &OtherMessage{ + Key: Int64(123), + Inner: &InnerMessage{ + Host: String("gopher"), + }, + } + expected := &OtherMessage{ + Key: Int64(123), + Inner: &InnerMessage{ + Host: String("gopher"), + Port: Int32(4000), + }, + } + SetDefaults(m) + if !Equal(m, expected) { + t.Errorf("\n got %v\nwant %v", m, expected) + } +} + +func TestSetDefaultsWithRepeatedSubMessage(t *testing.T) { + m := &MyMessage{ + RepInner: []*InnerMessage{{}}, + } + expected := &MyMessage{ + RepInner: []*InnerMessage{{ + Port: Int32(4000), + }}, + } + SetDefaults(m) + if !Equal(m, expected) { + t.Errorf("\n got %v\nwant %v", m, expected) + } +} + +func TestSetDefaultWithRepeatedNonMessage(t *testing.T) { + m := &MyMessage{ + Pet: []string{"turtle", "wombat"}, + } + expected := Clone(m) + SetDefaults(m) + if !Equal(m, expected) { + t.Errorf("\n got %v\nwant %v", m, expected) + } +} + +func TestMaximumTagNumber(t *testing.T) { + m := &MaxTag{ + LastField: String("natural goat essence"), + } + buf, err := Marshal(m) + if err != nil { + t.Fatalf("proto.Marshal failed: %v", err) + } + m2 := new(MaxTag) + if err := Unmarshal(buf, m2); err != nil { + t.Fatalf("proto.Unmarshal failed: %v", err) + } + if got, want := m2.GetLastField(), *m.LastField; got != want { + t.Errorf("got %q, want %q", got, want) + } +} + +func TestJSON(t *testing.T) { + m := &MyMessage{ + Count: Int32(4), + Pet: []string{"bunny", "kitty"}, + Inner: &InnerMessage{ + Host: String("cauchy"), + }, + Bikeshed: MyMessage_GREEN.Enum(), + } + const expected = `{"count":4,"pet":["bunny","kitty"],"inner":{"host":"cauchy"},"bikeshed":1}` + + b, err := json.Marshal(m) + if err != nil { + t.Fatalf("json.Marshal failed: %v", err) + } + s := string(b) + if s != expected { + t.Errorf("got %s\nwant %s", s, expected) + } + + received := new(MyMessage) + if err := json.Unmarshal(b, received); err != nil { + t.Fatalf("json.Unmarshal failed: %v", err) + } + if !Equal(received, m) { + t.Fatalf("got %s, want %s", received, m) + } + + // Test unmarshalling of JSON with symbolic enum name. + const old = `{"count":4,"pet":["bunny","kitty"],"inner":{"host":"cauchy"},"bikeshed":"GREEN"}` + received.Reset() + if err := json.Unmarshal([]byte(old), received); err != nil { + t.Fatalf("json.Unmarshal failed: %v", err) + } + if !Equal(received, m) { + t.Fatalf("got %s, want %s", received, m) + } +} + +func TestBadWireType(t *testing.T) { + b := []byte{7<<3 | 6} // field 7, wire type 6 + pb := new(OtherMessage) + if err := Unmarshal(b, pb); err == nil { + t.Errorf("Unmarshal did not fail") + } else if !strings.Contains(err.Error(), "unknown wire type") { + t.Errorf("wrong error: %v", err) + } +} + +func TestBytesWithInvalidLength(t *testing.T) { + // If a byte sequence has an invalid (negative) length, Unmarshal should not panic. + b := []byte{2<<3 | WireBytes, 0xff, 0xff, 0xff, 0xff, 0xff, 0} + Unmarshal(b, new(MyMessage)) +} + +func TestLengthOverflow(t *testing.T) { + // Overflowing a length should not panic. + b := []byte{2<<3 | WireBytes, 1, 1, 3<<3 | WireBytes, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x01} + Unmarshal(b, new(MyMessage)) +} + +func TestVarintOverflow(t *testing.T) { + // Overflowing a 64-bit length should not be allowed. + b := []byte{1<<3 | WireVarint, 0x01, 3<<3 | WireBytes, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x01} + if err := Unmarshal(b, new(MyMessage)); err == nil { + t.Fatalf("Overflowed uint64 length without error") + } +} + +func TestUnmarshalFuzz(t *testing.T) { + const N = 1000 + seed := time.Now().UnixNano() + t.Logf("RNG seed is %d", seed) + rng := rand.New(rand.NewSource(seed)) + buf := make([]byte, 20) + for i := 0; i < N; i++ { + for j := range buf { + buf[j] = byte(rng.Intn(256)) + } + fuzzUnmarshal(t, buf) + } +} + +func TestMergeMessages(t *testing.T) { + pb := &MessageList{Message: []*MessageList_Message{{Name: String("x"), Count: Int32(1)}}} + data, err := Marshal(pb) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + + pb1 := new(MessageList) + if err := Unmarshal(data, pb1); err != nil { + t.Fatalf("first Unmarshal: %v", err) + } + if err := Unmarshal(data, pb1); err != nil { + t.Fatalf("second Unmarshal: %v", err) + } + if len(pb1.Message) != 1 { + t.Errorf("two Unmarshals produced %d Messages, want 1", len(pb1.Message)) + } + + pb2 := new(MessageList) + if err := UnmarshalMerge(data, pb2); err != nil { + t.Fatalf("first UnmarshalMerge: %v", err) + } + if err := UnmarshalMerge(data, pb2); err != nil { + t.Fatalf("second UnmarshalMerge: %v", err) + } + if len(pb2.Message) != 2 { + t.Errorf("two UnmarshalMerges produced %d Messages, want 2", len(pb2.Message)) + } +} + +func TestExtensionMarshalOrder(t *testing.T) { + m := &MyMessage{Count: Int(123)} + if err := SetExtension(m, E_Ext_More, &Ext{Data: String("alpha")}); err != nil { + t.Fatalf("SetExtension: %v", err) + } + if err := SetExtension(m, E_Ext_Text, String("aleph")); err != nil { + t.Fatalf("SetExtension: %v", err) + } + if err := SetExtension(m, E_Ext_Number, Int32(1)); err != nil { + t.Fatalf("SetExtension: %v", err) + } + + // Serialize m several times, and check we get the same bytes each time. + var orig []byte + for i := 0; i < 100; i++ { + b, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + if i == 0 { + orig = b + continue + } + if !bytes.Equal(b, orig) { + t.Errorf("Bytes differ on attempt #%d", i) + } + } +} + +// Many extensions, because small maps might not iterate differently on each iteration. +var exts = []*ExtensionDesc{ + E_X201, + E_X202, + E_X203, + E_X204, + E_X205, + E_X206, + E_X207, + E_X208, + E_X209, + E_X210, + E_X211, + E_X212, + E_X213, + E_X214, + E_X215, + E_X216, + E_X217, + E_X218, + E_X219, + E_X220, + E_X221, + E_X222, + E_X223, + E_X224, + E_X225, + E_X226, + E_X227, + E_X228, + E_X229, + E_X230, + E_X231, + E_X232, + E_X233, + E_X234, + E_X235, + E_X236, + E_X237, + E_X238, + E_X239, + E_X240, + E_X241, + E_X242, + E_X243, + E_X244, + E_X245, + E_X246, + E_X247, + E_X248, + E_X249, + E_X250, +} + +func TestMessageSetMarshalOrder(t *testing.T) { + m := &MyMessageSet{} + for _, x := range exts { + if err := SetExtension(m, x, &Empty{}); err != nil { + t.Fatalf("SetExtension: %v", err) + } + } + + buf, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + + // Serialize m several times, and check we get the same bytes each time. + for i := 0; i < 10; i++ { + b1, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + if !bytes.Equal(b1, buf) { + t.Errorf("Bytes differ on re-Marshal #%d", i) + } + + m2 := &MyMessageSet{} + if err := Unmarshal(buf, m2); err != nil { + t.Errorf("Unmarshal: %v", err) + } + b2, err := Marshal(m2) + if err != nil { + t.Errorf("re-Marshal: %v", err) + } + if !bytes.Equal(b2, buf) { + t.Errorf("Bytes differ on round-trip #%d", i) + } + } +} + +func TestUnmarshalMergesMessages(t *testing.T) { + // If a nested message occurs twice in the input, + // the fields should be merged when decoding. + a := &OtherMessage{ + Key: Int64(123), + Inner: &InnerMessage{ + Host: String("polhode"), + Port: Int32(1234), + }, + } + aData, err := Marshal(a) + if err != nil { + t.Fatalf("Marshal(a): %v", err) + } + b := &OtherMessage{ + Weight: Float32(1.2), + Inner: &InnerMessage{ + Host: String("herpolhode"), + Connected: Bool(true), + }, + } + bData, err := Marshal(b) + if err != nil { + t.Fatalf("Marshal(b): %v", err) + } + want := &OtherMessage{ + Key: Int64(123), + Weight: Float32(1.2), + Inner: &InnerMessage{ + Host: String("herpolhode"), + Port: Int32(1234), + Connected: Bool(true), + }, + } + got := new(OtherMessage) + if err := Unmarshal(append(aData, bData...), got); err != nil { + t.Fatalf("Unmarshal: %v", err) + } + if !Equal(got, want) { + t.Errorf("\n got %v\nwant %v", got, want) + } +} + +func TestEncodingSizes(t *testing.T) { + tests := []struct { + m Message + n int + }{ + {&Defaults{F_Int32: Int32(math.MaxInt32)}, 6}, + {&Defaults{F_Int32: Int32(math.MinInt32)}, 11}, + {&Defaults{F_Uint32: Uint32(uint32(math.MaxInt32) + 1)}, 6}, + {&Defaults{F_Uint32: Uint32(math.MaxUint32)}, 6}, + } + for _, test := range tests { + b, err := Marshal(test.m) + if err != nil { + t.Errorf("Marshal(%v): %v", test.m, err) + continue + } + if len(b) != test.n { + t.Errorf("Marshal(%v) yielded %d bytes, want %d bytes", test.m, len(b), test.n) + } + } +} + +func TestRequiredNotSetError(t *testing.T) { + pb := initGoTest(false) + pb.RequiredField.Label = nil + pb.F_Int32Required = nil + pb.F_Int64Required = nil + + expected := "0807" + // field 1, encoding 0, value 7 + "2206" + "120474797065" + // field 4, encoding 2 (GoTestField) + "5001" + // field 10, encoding 0, value 1 + "6d20000000" + // field 13, encoding 5, value 0x20 + "714000000000000000" + // field 14, encoding 1, value 0x40 + "78a019" + // field 15, encoding 0, value 0xca0 = 3232 + "8001c032" + // field 16, encoding 0, value 0x1940 = 6464 + "8d0100004a45" + // field 17, encoding 5, value 3232.0 + "9101000000000040b940" + // field 18, encoding 1, value 6464.0 + "9a0106" + "737472696e67" + // field 19, encoding 2, string "string" + "b304" + // field 70, encoding 3, start group + "ba0408" + "7265717569726564" + // field 71, encoding 2, string "required" + "b404" + // field 70, encoding 4, end group + "aa0605" + "6279746573" + // field 101, encoding 2, string "bytes" + "b0063f" + // field 102, encoding 0, 0x3f zigzag32 + "b8067f" // field 103, encoding 0, 0x7f zigzag64 + + o := old() + bytes, err := Marshal(pb) + if _, ok := err.(*RequiredNotSetError); !ok { + fmt.Printf("marshal-1 err = %v, want *RequiredNotSetError", err) + o.DebugPrint("", bytes) + t.Fatalf("expected = %s", expected) + } + if strings.Index(err.Error(), "RequiredField.Label") < 0 { + t.Errorf("marshal-1 wrong err msg: %v", err) + } + if !equal(bytes, expected, t) { + o.DebugPrint("neq 1", bytes) + t.Fatalf("expected = %s", expected) + } + + // Now test Unmarshal by recreating the original buffer. + pbd := new(GoTest) + err = Unmarshal(bytes, pbd) + if _, ok := err.(*RequiredNotSetError); !ok { + t.Fatalf("unmarshal err = %v, want *RequiredNotSetError", err) + o.DebugPrint("", bytes) + t.Fatalf("string = %s", expected) + } + if strings.Index(err.Error(), "RequiredField.{Unknown}") < 0 { + t.Errorf("unmarshal wrong err msg: %v", err) + } + bytes, err = Marshal(pbd) + if _, ok := err.(*RequiredNotSetError); !ok { + t.Errorf("marshal-2 err = %v, want *RequiredNotSetError", err) + o.DebugPrint("", bytes) + t.Fatalf("string = %s", expected) + } + if strings.Index(err.Error(), "RequiredField.Label") < 0 { + t.Errorf("marshal-2 wrong err msg: %v", err) + } + if !equal(bytes, expected, t) { + o.DebugPrint("neq 2", bytes) + t.Fatalf("string = %s", expected) + } +} + +func fuzzUnmarshal(t *testing.T, data []byte) { + defer func() { + if e := recover(); e != nil { + t.Errorf("These bytes caused a panic: %+v", data) + t.Logf("Stack:\n%s", debug.Stack()) + t.FailNow() + } + }() + + pb := new(MyMessage) + Unmarshal(data, pb) +} + +func TestMapFieldMarshal(t *testing.T) { + m := &MessageWithMap{ + NameMapping: map[int32]string{ + 1: "Rob", + 4: "Ian", + 8: "Dave", + }, + } + b, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + + // b should be the concatenation of these three byte sequences in some order. + parts := []string{ + "\n\a\b\x01\x12\x03Rob", + "\n\a\b\x04\x12\x03Ian", + "\n\b\b\x08\x12\x04Dave", + } + ok := false + for i := range parts { + for j := range parts { + if j == i { + continue + } + for k := range parts { + if k == i || k == j { + continue + } + try := parts[i] + parts[j] + parts[k] + if bytes.Equal(b, []byte(try)) { + ok = true + break + } + } + } + } + if !ok { + t.Fatalf("Incorrect Marshal output.\n got %q\nwant %q (or a permutation of that)", b, parts[0]+parts[1]+parts[2]) + } + t.Logf("FYI b: %q", b) + + (new(Buffer)).DebugPrint("Dump of b", b) +} + +func TestMapFieldRoundTrips(t *testing.T) { + m := &MessageWithMap{ + NameMapping: map[int32]string{ + 1: "Rob", + 4: "Ian", + 8: "Dave", + }, + MsgMapping: map[int64]*FloatingPoint{ + 0x7001: &FloatingPoint{F: Float64(2.0)}, + }, + ByteMapping: map[bool][]byte{ + false: []byte("that's not right!"), + true: []byte("aye, 'tis true!"), + }, + } + b, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + t.Logf("FYI b: %q", b) + m2 := new(MessageWithMap) + if err := Unmarshal(b, m2); err != nil { + t.Fatalf("Unmarshal: %v", err) + } + for _, pair := range [][2]interface{}{ + {m.NameMapping, m2.NameMapping}, + {m.MsgMapping, m2.MsgMapping}, + {m.ByteMapping, m2.ByteMapping}, + } { + if !reflect.DeepEqual(pair[0], pair[1]) { + t.Errorf("Map did not survive a round trip.\ninitial: %v\n final: %v", pair[0], pair[1]) + } + } +} + +func TestMapFieldWithNil(t *testing.T) { + m1 := &MessageWithMap{ + MsgMapping: map[int64]*FloatingPoint{ + 1: nil, + }, + } + b, err := Marshal(m1) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + m2 := new(MessageWithMap) + if err := Unmarshal(b, m2); err != nil { + t.Fatalf("Unmarshal: %v, got these bytes: %v", err, b) + } + if v, ok := m2.MsgMapping[1]; !ok { + t.Error("msg_mapping[1] not present") + } else if v != nil { + t.Errorf("msg_mapping[1] not nil: %v", v) + } +} + +func TestMapFieldWithNilBytes(t *testing.T) { + m1 := &MessageWithMap{ + ByteMapping: map[bool][]byte{ + false: []byte{}, + true: nil, + }, + } + n := Size(m1) + b, err := Marshal(m1) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + if n != len(b) { + t.Errorf("Size(m1) = %d; want len(Marshal(m1)) = %d", n, len(b)) + } + m2 := new(MessageWithMap) + if err := Unmarshal(b, m2); err != nil { + t.Fatalf("Unmarshal: %v, got these bytes: %v", err, b) + } + if v, ok := m2.ByteMapping[false]; !ok { + t.Error("byte_mapping[false] not present") + } else if len(v) != 0 { + t.Errorf("byte_mapping[false] not empty: %#v", v) + } + if v, ok := m2.ByteMapping[true]; !ok { + t.Error("byte_mapping[true] not present") + } else if len(v) != 0 { + t.Errorf("byte_mapping[true] not empty: %#v", v) + } +} + +func TestDecodeMapFieldMissingKey(t *testing.T) { + b := []byte{ + 0x0A, 0x03, // message, tag 1 (name_mapping), of length 3 bytes + // no key + 0x12, 0x01, 0x6D, // string value of length 1 byte, value "m" + } + got := &MessageWithMap{} + err := Unmarshal(b, got) + if err != nil { + t.Fatalf("failed to marshal map with missing key: %v", err) + } + want := &MessageWithMap{NameMapping: map[int32]string{0: "m"}} + if !Equal(got, want) { + t.Errorf("Unmarshaled map with no key was not as expected. got: %v, want %v", got, want) + } +} + +func TestDecodeMapFieldMissingValue(t *testing.T) { + b := []byte{ + 0x0A, 0x02, // message, tag 1 (name_mapping), of length 2 bytes + 0x08, 0x01, // varint key, value 1 + // no value + } + got := &MessageWithMap{} + err := Unmarshal(b, got) + if err != nil { + t.Fatalf("failed to marshal map with missing value: %v", err) + } + want := &MessageWithMap{NameMapping: map[int32]string{1: ""}} + if !Equal(got, want) { + t.Errorf("Unmarshaled map with no value was not as expected. got: %v, want %v", got, want) + } +} + +func TestOneof(t *testing.T) { + m := &Communique{} + b, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal of empty message with oneof: %v", err) + } + if len(b) != 0 { + t.Errorf("Marshal of empty message yielded too many bytes: %v", b) + } + + m = &Communique{ + Union: &Communique_Name{"Barry"}, + } + + // Round-trip. + b, err = Marshal(m) + if err != nil { + t.Fatalf("Marshal of message with oneof: %v", err) + } + if len(b) != 7 { // name tag/wire (1) + name len (1) + name (5) + t.Errorf("Incorrect marshal of message with oneof: %v", b) + } + m.Reset() + if err := Unmarshal(b, m); err != nil { + t.Fatalf("Unmarshal of message with oneof: %v", err) + } + if x, ok := m.Union.(*Communique_Name); !ok || x.Name != "Barry" { + t.Errorf("After round trip, Union = %+v", m.Union) + } + if name := m.GetName(); name != "Barry" { + t.Errorf("After round trip, GetName = %q, want %q", name, "Barry") + } + + // Let's try with a message in the oneof. + m.Union = &Communique_Msg{&Strings{StringField: String("deep deep string")}} + b, err = Marshal(m) + if err != nil { + t.Fatalf("Marshal of message with oneof set to message: %v", err) + } + if len(b) != 20 { // msg tag/wire (1) + msg len (1) + msg (1 + 1 + 16) + t.Errorf("Incorrect marshal of message with oneof set to message: %v", b) + } + m.Reset() + if err := Unmarshal(b, m); err != nil { + t.Fatalf("Unmarshal of message with oneof set to message: %v", err) + } + ss, ok := m.Union.(*Communique_Msg) + if !ok || ss.Msg.GetStringField() != "deep deep string" { + t.Errorf("After round trip with oneof set to message, Union = %+v", m.Union) + } +} + +func TestInefficientPackedBool(t *testing.T) { + // https://github.com/golang/protobuf/issues/76 + inp := []byte{ + 0x12, 0x02, // 0x12 = 2<<3|2; 2 bytes + // Usually a bool should take a single byte, + // but it is permitted to be any varint. + 0xb9, 0x30, + } + if err := Unmarshal(inp, new(MoreRepeated)); err != nil { + t.Error(err) + } +} + +// Benchmarks + +func testMsg() *GoTest { + pb := initGoTest(true) + const N = 1000 // Internally the library starts much smaller. + pb.F_Int32Repeated = make([]int32, N) + pb.F_DoubleRepeated = make([]float64, N) + for i := 0; i < N; i++ { + pb.F_Int32Repeated[i] = int32(i) + pb.F_DoubleRepeated[i] = float64(i) + } + return pb +} + +func bytesMsg() *GoTest { + pb := initGoTest(true) + buf := make([]byte, 4000) + for i := range buf { + buf[i] = byte(i) + } + pb.F_BytesDefaulted = buf + return pb +} + +func benchmarkMarshal(b *testing.B, pb Message, marshal func(Message) ([]byte, error)) { + d, _ := marshal(pb) + b.SetBytes(int64(len(d))) + b.ResetTimer() + for i := 0; i < b.N; i++ { + marshal(pb) + } +} + +func benchmarkBufferMarshal(b *testing.B, pb Message) { + p := NewBuffer(nil) + benchmarkMarshal(b, pb, func(pb0 Message) ([]byte, error) { + p.Reset() + err := p.Marshal(pb0) + return p.Bytes(), err + }) +} + +func benchmarkSize(b *testing.B, pb Message) { + benchmarkMarshal(b, pb, func(pb0 Message) ([]byte, error) { + Size(pb) + return nil, nil + }) +} + +func newOf(pb Message) Message { + in := reflect.ValueOf(pb) + if in.IsNil() { + return pb + } + return reflect.New(in.Type().Elem()).Interface().(Message) +} + +func benchmarkUnmarshal(b *testing.B, pb Message, unmarshal func([]byte, Message) error) { + d, _ := Marshal(pb) + b.SetBytes(int64(len(d))) + pbd := newOf(pb) + + b.ResetTimer() + for i := 0; i < b.N; i++ { + unmarshal(d, pbd) + } +} + +func benchmarkBufferUnmarshal(b *testing.B, pb Message) { + p := NewBuffer(nil) + benchmarkUnmarshal(b, pb, func(d []byte, pb0 Message) error { + p.SetBuf(d) + return p.Unmarshal(pb0) + }) +} + +// Benchmark{Marshal,BufferMarshal,Size,Unmarshal,BufferUnmarshal}{,Bytes} + +func BenchmarkMarshal(b *testing.B) { + benchmarkMarshal(b, testMsg(), Marshal) +} + +func BenchmarkBufferMarshal(b *testing.B) { + benchmarkBufferMarshal(b, testMsg()) +} + +func BenchmarkSize(b *testing.B) { + benchmarkSize(b, testMsg()) +} + +func BenchmarkUnmarshal(b *testing.B) { + benchmarkUnmarshal(b, testMsg(), Unmarshal) +} + +func BenchmarkBufferUnmarshal(b *testing.B) { + benchmarkBufferUnmarshal(b, testMsg()) +} + +func BenchmarkMarshalBytes(b *testing.B) { + benchmarkMarshal(b, bytesMsg(), Marshal) +} + +func BenchmarkBufferMarshalBytes(b *testing.B) { + benchmarkBufferMarshal(b, bytesMsg()) +} + +func BenchmarkSizeBytes(b *testing.B) { + benchmarkSize(b, bytesMsg()) +} + +func BenchmarkUnmarshalBytes(b *testing.B) { + benchmarkUnmarshal(b, bytesMsg(), Unmarshal) +} + +func BenchmarkBufferUnmarshalBytes(b *testing.B) { + benchmarkBufferUnmarshal(b, bytesMsg()) +} + +func BenchmarkUnmarshalUnrecognizedFields(b *testing.B) { + b.StopTimer() + pb := initGoTestField() + skip := &GoSkipTest{ + SkipInt32: Int32(32), + SkipFixed32: Uint32(3232), + SkipFixed64: Uint64(6464), + SkipString: String("skipper"), + Skipgroup: &GoSkipTest_SkipGroup{ + GroupInt32: Int32(75), + GroupString: String("wxyz"), + }, + } + + pbd := new(GoTestField) + p := NewBuffer(nil) + p.Marshal(pb) + p.Marshal(skip) + p2 := NewBuffer(nil) + + b.StartTimer() + for i := 0; i < b.N; i++ { + p2.SetBuf(p.Bytes()) + p2.Unmarshal(pbd) + } +} diff --git a/vendor/github.com/golang/protobuf/proto/any_test.go b/vendor/github.com/golang/protobuf/proto/any_test.go new file mode 100644 index 000000000..1a3c22ed4 --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/any_test.go @@ -0,0 +1,300 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto_test + +import ( + "strings" + "testing" + + "github.com/golang/protobuf/proto" + + pb "github.com/golang/protobuf/proto/proto3_proto" + testpb "github.com/golang/protobuf/proto/testdata" + anypb "github.com/golang/protobuf/ptypes/any" +) + +var ( + expandedMarshaler = proto.TextMarshaler{ExpandAny: true} + expandedCompactMarshaler = proto.TextMarshaler{Compact: true, ExpandAny: true} +) + +// anyEqual reports whether two messages which may be google.protobuf.Any or may +// contain google.protobuf.Any fields are equal. We can't use proto.Equal for +// comparison, because semantically equivalent messages may be marshaled to +// binary in different tag order. Instead, trust that TextMarshaler with +// ExpandAny option works and compare the text marshaling results. +func anyEqual(got, want proto.Message) bool { + // if messages are proto.Equal, no need to marshal. + if proto.Equal(got, want) { + return true + } + g := expandedMarshaler.Text(got) + w := expandedMarshaler.Text(want) + return g == w +} + +type golden struct { + m proto.Message + t, c string +} + +var goldenMessages = makeGolden() + +func makeGolden() []golden { + nested := &pb.Nested{Bunny: "Monty"} + nb, err := proto.Marshal(nested) + if err != nil { + panic(err) + } + m1 := &pb.Message{ + Name: "David", + ResultCount: 47, + Anything: &anypb.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(nested), Value: nb}, + } + m2 := &pb.Message{ + Name: "David", + ResultCount: 47, + Anything: &anypb.Any{TypeUrl: "http://[::1]/type.googleapis.com/" + proto.MessageName(nested), Value: nb}, + } + m3 := &pb.Message{ + Name: "David", + ResultCount: 47, + Anything: &anypb.Any{TypeUrl: `type.googleapis.com/"/` + proto.MessageName(nested), Value: nb}, + } + m4 := &pb.Message{ + Name: "David", + ResultCount: 47, + Anything: &anypb.Any{TypeUrl: "type.googleapis.com/a/path/" + proto.MessageName(nested), Value: nb}, + } + m5 := &anypb.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(nested), Value: nb} + + any1 := &testpb.MyMessage{Count: proto.Int32(47), Name: proto.String("David")} + proto.SetExtension(any1, testpb.E_Ext_More, &testpb.Ext{Data: proto.String("foo")}) + proto.SetExtension(any1, testpb.E_Ext_Text, proto.String("bar")) + any1b, err := proto.Marshal(any1) + if err != nil { + panic(err) + } + any2 := &testpb.MyMessage{Count: proto.Int32(42), Bikeshed: testpb.MyMessage_GREEN.Enum(), RepBytes: [][]byte{[]byte("roboto")}} + proto.SetExtension(any2, testpb.E_Ext_More, &testpb.Ext{Data: proto.String("baz")}) + any2b, err := proto.Marshal(any2) + if err != nil { + panic(err) + } + m6 := &pb.Message{ + Name: "David", + ResultCount: 47, + Anything: &anypb.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(any1), Value: any1b}, + ManyThings: []*anypb.Any{ + &anypb.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(any2), Value: any2b}, + &anypb.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(any1), Value: any1b}, + }, + } + + const ( + m1Golden = ` +name: "David" +result_count: 47 +anything: < + [type.googleapis.com/proto3_proto.Nested]: < + bunny: "Monty" + > +> +` + m2Golden = ` +name: "David" +result_count: 47 +anything: < + ["http://[::1]/type.googleapis.com/proto3_proto.Nested"]: < + bunny: "Monty" + > +> +` + m3Golden = ` +name: "David" +result_count: 47 +anything: < + ["type.googleapis.com/\"/proto3_proto.Nested"]: < + bunny: "Monty" + > +> +` + m4Golden = ` +name: "David" +result_count: 47 +anything: < + [type.googleapis.com/a/path/proto3_proto.Nested]: < + bunny: "Monty" + > +> +` + m5Golden = ` +[type.googleapis.com/proto3_proto.Nested]: < + bunny: "Monty" +> +` + m6Golden = ` +name: "David" +result_count: 47 +anything: < + [type.googleapis.com/testdata.MyMessage]: < + count: 47 + name: "David" + [testdata.Ext.more]: < + data: "foo" + > + [testdata.Ext.text]: "bar" + > +> +many_things: < + [type.googleapis.com/testdata.MyMessage]: < + count: 42 + bikeshed: GREEN + rep_bytes: "roboto" + [testdata.Ext.more]: < + data: "baz" + > + > +> +many_things: < + [type.googleapis.com/testdata.MyMessage]: < + count: 47 + name: "David" + [testdata.Ext.more]: < + data: "foo" + > + [testdata.Ext.text]: "bar" + > +> +` + ) + return []golden{ + {m1, strings.TrimSpace(m1Golden) + "\n", strings.TrimSpace(compact(m1Golden)) + " "}, + {m2, strings.TrimSpace(m2Golden) + "\n", strings.TrimSpace(compact(m2Golden)) + " "}, + {m3, strings.TrimSpace(m3Golden) + "\n", strings.TrimSpace(compact(m3Golden)) + " "}, + {m4, strings.TrimSpace(m4Golden) + "\n", strings.TrimSpace(compact(m4Golden)) + " "}, + {m5, strings.TrimSpace(m5Golden) + "\n", strings.TrimSpace(compact(m5Golden)) + " "}, + {m6, strings.TrimSpace(m6Golden) + "\n", strings.TrimSpace(compact(m6Golden)) + " "}, + } +} + +func TestMarshalGolden(t *testing.T) { + for _, tt := range goldenMessages { + if got, want := expandedMarshaler.Text(tt.m), tt.t; got != want { + t.Errorf("message %v: got:\n%s\nwant:\n%s", tt.m, got, want) + } + if got, want := expandedCompactMarshaler.Text(tt.m), tt.c; got != want { + t.Errorf("message %v: got:\n`%s`\nwant:\n`%s`", tt.m, got, want) + } + } +} + +func TestUnmarshalGolden(t *testing.T) { + for _, tt := range goldenMessages { + want := tt.m + got := proto.Clone(tt.m) + got.Reset() + if err := proto.UnmarshalText(tt.t, got); err != nil { + t.Errorf("failed to unmarshal\n%s\nerror: %v", tt.t, err) + } + if !anyEqual(got, want) { + t.Errorf("message:\n%s\ngot:\n%s\nwant:\n%s", tt.t, got, want) + } + got.Reset() + if err := proto.UnmarshalText(tt.c, got); err != nil { + t.Errorf("failed to unmarshal\n%s\nerror: %v", tt.c, err) + } + if !anyEqual(got, want) { + t.Errorf("message:\n%s\ngot:\n%s\nwant:\n%s", tt.c, got, want) + } + } +} + +func TestMarshalUnknownAny(t *testing.T) { + m := &pb.Message{ + Anything: &anypb.Any{ + TypeUrl: "foo", + Value: []byte("bar"), + }, + } + want := `anything: < + type_url: "foo" + value: "bar" +> +` + got := expandedMarshaler.Text(m) + if got != want { + t.Errorf("got\n`%s`\nwant\n`%s`", got, want) + } +} + +func TestAmbiguousAny(t *testing.T) { + pb := &anypb.Any{} + err := proto.UnmarshalText(` + type_url: "ttt/proto3_proto.Nested" + value: "\n\x05Monty" + `, pb) + t.Logf("result: %v (error: %v)", expandedMarshaler.Text(pb), err) + if err != nil { + t.Errorf("failed to parse ambiguous Any message: %v", err) + } +} + +func TestUnmarshalOverwriteAny(t *testing.T) { + pb := &anypb.Any{} + err := proto.UnmarshalText(` + [type.googleapis.com/a/path/proto3_proto.Nested]: < + bunny: "Monty" + > + [type.googleapis.com/a/path/proto3_proto.Nested]: < + bunny: "Rabbit of Caerbannog" + > + `, pb) + want := `line 7: Any message unpacked multiple times, or "type_url" already set` + if err.Error() != want { + t.Errorf("incorrect error.\nHave: %v\nWant: %v", err.Error(), want) + } +} + +func TestUnmarshalAnyMixAndMatch(t *testing.T) { + pb := &anypb.Any{} + err := proto.UnmarshalText(` + value: "\n\x05Monty" + [type.googleapis.com/a/path/proto3_proto.Nested]: < + bunny: "Rabbit of Caerbannog" + > + `, pb) + want := `line 5: Any message unpacked multiple times, or "value" already set` + if err.Error() != want { + t.Errorf("incorrect error.\nHave: %v\nWant: %v", err.Error(), want) + } +} diff --git a/vendor/github.com/golang/protobuf/proto/clone_test.go b/vendor/github.com/golang/protobuf/proto/clone_test.go new file mode 100644 index 000000000..f607ff49e --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/clone_test.go @@ -0,0 +1,300 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2011 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto_test + +import ( + "testing" + + "github.com/golang/protobuf/proto" + + proto3pb "github.com/golang/protobuf/proto/proto3_proto" + pb "github.com/golang/protobuf/proto/testdata" +) + +var cloneTestMessage = &pb.MyMessage{ + Count: proto.Int32(42), + Name: proto.String("Dave"), + Pet: []string{"bunny", "kitty", "horsey"}, + Inner: &pb.InnerMessage{ + Host: proto.String("niles"), + Port: proto.Int32(9099), + Connected: proto.Bool(true), + }, + Others: []*pb.OtherMessage{ + { + Value: []byte("some bytes"), + }, + }, + Somegroup: &pb.MyMessage_SomeGroup{ + GroupField: proto.Int32(6), + }, + RepBytes: [][]byte{[]byte("sham"), []byte("wow")}, +} + +func init() { + ext := &pb.Ext{ + Data: proto.String("extension"), + } + if err := proto.SetExtension(cloneTestMessage, pb.E_Ext_More, ext); err != nil { + panic("SetExtension: " + err.Error()) + } +} + +func TestClone(t *testing.T) { + m := proto.Clone(cloneTestMessage).(*pb.MyMessage) + if !proto.Equal(m, cloneTestMessage) { + t.Errorf("Clone(%v) = %v", cloneTestMessage, m) + } + + // Verify it was a deep copy. + *m.Inner.Port++ + if proto.Equal(m, cloneTestMessage) { + t.Error("Mutating clone changed the original") + } + // Byte fields and repeated fields should be copied. + if &m.Pet[0] == &cloneTestMessage.Pet[0] { + t.Error("Pet: repeated field not copied") + } + if &m.Others[0] == &cloneTestMessage.Others[0] { + t.Error("Others: repeated field not copied") + } + if &m.Others[0].Value[0] == &cloneTestMessage.Others[0].Value[0] { + t.Error("Others[0].Value: bytes field not copied") + } + if &m.RepBytes[0] == &cloneTestMessage.RepBytes[0] { + t.Error("RepBytes: repeated field not copied") + } + if &m.RepBytes[0][0] == &cloneTestMessage.RepBytes[0][0] { + t.Error("RepBytes[0]: bytes field not copied") + } +} + +func TestCloneNil(t *testing.T) { + var m *pb.MyMessage + if c := proto.Clone(m); !proto.Equal(m, c) { + t.Errorf("Clone(%v) = %v", m, c) + } +} + +var mergeTests = []struct { + src, dst, want proto.Message +}{ + { + src: &pb.MyMessage{ + Count: proto.Int32(42), + }, + dst: &pb.MyMessage{ + Name: proto.String("Dave"), + }, + want: &pb.MyMessage{ + Count: proto.Int32(42), + Name: proto.String("Dave"), + }, + }, + { + src: &pb.MyMessage{ + Inner: &pb.InnerMessage{ + Host: proto.String("hey"), + Connected: proto.Bool(true), + }, + Pet: []string{"horsey"}, + Others: []*pb.OtherMessage{ + { + Value: []byte("some bytes"), + }, + }, + }, + dst: &pb.MyMessage{ + Inner: &pb.InnerMessage{ + Host: proto.String("niles"), + Port: proto.Int32(9099), + }, + Pet: []string{"bunny", "kitty"}, + Others: []*pb.OtherMessage{ + { + Key: proto.Int64(31415926535), + }, + { + // Explicitly test a src=nil field + Inner: nil, + }, + }, + }, + want: &pb.MyMessage{ + Inner: &pb.InnerMessage{ + Host: proto.String("hey"), + Connected: proto.Bool(true), + Port: proto.Int32(9099), + }, + Pet: []string{"bunny", "kitty", "horsey"}, + Others: []*pb.OtherMessage{ + { + Key: proto.Int64(31415926535), + }, + {}, + { + Value: []byte("some bytes"), + }, + }, + }, + }, + { + src: &pb.MyMessage{ + RepBytes: [][]byte{[]byte("wow")}, + }, + dst: &pb.MyMessage{ + Somegroup: &pb.MyMessage_SomeGroup{ + GroupField: proto.Int32(6), + }, + RepBytes: [][]byte{[]byte("sham")}, + }, + want: &pb.MyMessage{ + Somegroup: &pb.MyMessage_SomeGroup{ + GroupField: proto.Int32(6), + }, + RepBytes: [][]byte{[]byte("sham"), []byte("wow")}, + }, + }, + // Check that a scalar bytes field replaces rather than appends. + { + src: &pb.OtherMessage{Value: []byte("foo")}, + dst: &pb.OtherMessage{Value: []byte("bar")}, + want: &pb.OtherMessage{Value: []byte("foo")}, + }, + { + src: &pb.MessageWithMap{ + NameMapping: map[int32]string{6: "Nigel"}, + MsgMapping: map[int64]*pb.FloatingPoint{ + 0x4001: &pb.FloatingPoint{F: proto.Float64(2.0)}, + 0x4002: &pb.FloatingPoint{ + F: proto.Float64(2.0), + }, + }, + ByteMapping: map[bool][]byte{true: []byte("wowsa")}, + }, + dst: &pb.MessageWithMap{ + NameMapping: map[int32]string{ + 6: "Bruce", // should be overwritten + 7: "Andrew", + }, + MsgMapping: map[int64]*pb.FloatingPoint{ + 0x4002: &pb.FloatingPoint{ + F: proto.Float64(3.0), + Exact: proto.Bool(true), + }, // the entire message should be overwritten + }, + }, + want: &pb.MessageWithMap{ + NameMapping: map[int32]string{ + 6: "Nigel", + 7: "Andrew", + }, + MsgMapping: map[int64]*pb.FloatingPoint{ + 0x4001: &pb.FloatingPoint{F: proto.Float64(2.0)}, + 0x4002: &pb.FloatingPoint{ + F: proto.Float64(2.0), + }, + }, + ByteMapping: map[bool][]byte{true: []byte("wowsa")}, + }, + }, + // proto3 shouldn't merge zero values, + // in the same way that proto2 shouldn't merge nils. + { + src: &proto3pb.Message{ + Name: "Aaron", + Data: []byte(""), // zero value, but not nil + }, + dst: &proto3pb.Message{ + HeightInCm: 176, + Data: []byte("texas!"), + }, + want: &proto3pb.Message{ + Name: "Aaron", + HeightInCm: 176, + Data: []byte("texas!"), + }, + }, + // Oneof fields should merge by assignment. + { + src: &pb.Communique{ + Union: &pb.Communique_Number{41}, + }, + dst: &pb.Communique{ + Union: &pb.Communique_Name{"Bobby Tables"}, + }, + want: &pb.Communique{ + Union: &pb.Communique_Number{41}, + }, + }, + // Oneof nil is the same as not set. + { + src: &pb.Communique{}, + dst: &pb.Communique{ + Union: &pb.Communique_Name{"Bobby Tables"}, + }, + want: &pb.Communique{ + Union: &pb.Communique_Name{"Bobby Tables"}, + }, + }, + { + src: &proto3pb.Message{ + Terrain: map[string]*proto3pb.Nested{ + "kay_a": &proto3pb.Nested{Cute: true}, // replace + "kay_b": &proto3pb.Nested{Bunny: "rabbit"}, // insert + }, + }, + dst: &proto3pb.Message{ + Terrain: map[string]*proto3pb.Nested{ + "kay_a": &proto3pb.Nested{Bunny: "lost"}, // replaced + "kay_c": &proto3pb.Nested{Bunny: "bunny"}, // keep + }, + }, + want: &proto3pb.Message{ + Terrain: map[string]*proto3pb.Nested{ + "kay_a": &proto3pb.Nested{Cute: true}, + "kay_b": &proto3pb.Nested{Bunny: "rabbit"}, + "kay_c": &proto3pb.Nested{Bunny: "bunny"}, + }, + }, + }, +} + +func TestMerge(t *testing.T) { + for _, m := range mergeTests { + got := proto.Clone(m.dst) + proto.Merge(got, m.src) + if !proto.Equal(got, m.want) { + t.Errorf("Merge(%v, %v)\n got %v\nwant %v\n", m.dst, m.src, got, m.want) + } + } +} diff --git a/vendor/github.com/golang/protobuf/proto/decode_test.go b/vendor/github.com/golang/protobuf/proto/decode_test.go new file mode 100644 index 000000000..2c4c31d12 --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/decode_test.go @@ -0,0 +1,258 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +// +build go1.7 + +package proto_test + +import ( + "fmt" + "testing" + + "github.com/golang/protobuf/proto" + tpb "github.com/golang/protobuf/proto/proto3_proto" +) + +var ( + bytesBlackhole []byte + msgBlackhole = new(tpb.Message) +) + +// BenchmarkVarint32ArraySmall shows the performance on an array of small int32 fields (1 and +// 2 bytes long). +func BenchmarkVarint32ArraySmall(b *testing.B) { + for i := uint(1); i <= 10; i++ { + dist := genInt32Dist([7]int{0, 3, 1}, 1<> 63)))) + return p.EncodeVarint((x << 1) ^ uint64((int64(x) >> 63))) } func sizeZigzag64(x uint64) int { - return sizeVarint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + return sizeVarint((x << 1) ^ uint64((int64(x) >> 63))) } // EncodeZigzag32 writes a zigzag-encoded 32-bit integer @@ -1075,10 +1075,17 @@ func (o *Buffer) enc_map(p *Properties, base structPointer) error { func (o *Buffer) enc_exts(p *Properties, base structPointer) error { exts := structPointer_Extensions(base, p.field) - if err := encodeExtensions(exts); err != nil { + + v, mu := exts.extensionsRead() + if v == nil { + return nil + } + + mu.Lock() + defer mu.Unlock() + if err := encodeExtensionsMap(v); err != nil { return err } - v, _ := exts.extensionsRead() return o.enc_map_body(v) } diff --git a/vendor/github.com/golang/protobuf/proto/encode_test.go b/vendor/github.com/golang/protobuf/proto/encode_test.go new file mode 100644 index 000000000..a7209475f --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/encode_test.go @@ -0,0 +1,85 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +// +build go1.7 + +package proto_test + +import ( + "strconv" + "testing" + + "github.com/golang/protobuf/proto" + tpb "github.com/golang/protobuf/proto/proto3_proto" + "github.com/golang/protobuf/ptypes" +) + +var ( + blackhole []byte +) + +// BenchmarkAny creates increasingly large arbitrary Any messages. The type is always the +// same. +func BenchmarkAny(b *testing.B) { + data := make([]byte, 1<<20) + quantum := 1 << 10 + for i := uint(0); i <= 10; i++ { + b.Run(strconv.Itoa(quantum<unmarshal. +} + +func TestMarshalUnmarshalRepeatedExtension(t *testing.T) { + // Add a repeated extension to the result. + tests := []struct { + name string + ext []*pb.ComplexExtension + }{ + { + "two fields", + []*pb.ComplexExtension{ + {First: proto.Int32(7)}, + {Second: proto.Int32(11)}, + }, + }, + { + "repeated field", + []*pb.ComplexExtension{ + {Third: []int32{1000}}, + {Third: []int32{2000}}, + }, + }, + { + "two fields and repeated field", + []*pb.ComplexExtension{ + {Third: []int32{1000}}, + {First: proto.Int32(9)}, + {Second: proto.Int32(21)}, + {Third: []int32{2000}}, + }, + }, + } + for _, test := range tests { + // Marshal message with a repeated extension. + msg1 := new(pb.OtherMessage) + err := proto.SetExtension(msg1, pb.E_RComplex, test.ext) + if err != nil { + t.Fatalf("[%s] Error setting extension: %v", test.name, err) + } + b, err := proto.Marshal(msg1) + if err != nil { + t.Fatalf("[%s] Error marshaling message: %v", test.name, err) + } + + // Unmarshal and read the merged proto. + msg2 := new(pb.OtherMessage) + err = proto.Unmarshal(b, msg2) + if err != nil { + t.Fatalf("[%s] Error unmarshaling message: %v", test.name, err) + } + e, err := proto.GetExtension(msg2, pb.E_RComplex) + if err != nil { + t.Fatalf("[%s] Error getting extension: %v", test.name, err) + } + ext := e.([]*pb.ComplexExtension) + if ext == nil { + t.Fatalf("[%s] Invalid extension", test.name) + } + if !reflect.DeepEqual(ext, test.ext) { + t.Errorf("[%s] Wrong value for ComplexExtension: got: %v want: %v\n", test.name, ext, test.ext) + } + } +} + +func TestUnmarshalRepeatingNonRepeatedExtension(t *testing.T) { + // We may see multiple instances of the same extension in the wire + // format. For example, the proto compiler may encode custom options in + // this way. Here, we verify that we merge the extensions together. + tests := []struct { + name string + ext []*pb.ComplexExtension + }{ + { + "two fields", + []*pb.ComplexExtension{ + {First: proto.Int32(7)}, + {Second: proto.Int32(11)}, + }, + }, + { + "repeated field", + []*pb.ComplexExtension{ + {Third: []int32{1000}}, + {Third: []int32{2000}}, + }, + }, + { + "two fields and repeated field", + []*pb.ComplexExtension{ + {Third: []int32{1000}}, + {First: proto.Int32(9)}, + {Second: proto.Int32(21)}, + {Third: []int32{2000}}, + }, + }, + } + for _, test := range tests { + var buf bytes.Buffer + var want pb.ComplexExtension + + // Generate a serialized representation of a repeated extension + // by catenating bytes together. + for i, e := range test.ext { + // Merge to create the wanted proto. + proto.Merge(&want, e) + + // serialize the message + msg := new(pb.OtherMessage) + err := proto.SetExtension(msg, pb.E_Complex, e) + if err != nil { + t.Fatalf("[%s] Error setting extension %d: %v", test.name, i, err) + } + b, err := proto.Marshal(msg) + if err != nil { + t.Fatalf("[%s] Error marshaling message %d: %v", test.name, i, err) + } + buf.Write(b) + } + + // Unmarshal and read the merged proto. + msg2 := new(pb.OtherMessage) + err := proto.Unmarshal(buf.Bytes(), msg2) + if err != nil { + t.Fatalf("[%s] Error unmarshaling message: %v", test.name, err) + } + e, err := proto.GetExtension(msg2, pb.E_Complex) + if err != nil { + t.Fatalf("[%s] Error getting extension: %v", test.name, err) + } + ext := e.(*pb.ComplexExtension) + if ext == nil { + t.Fatalf("[%s] Invalid extension", test.name) + } + if !reflect.DeepEqual(*ext, want) { + t.Errorf("[%s] Wrong value for ComplexExtension: got: %s want: %s\n", test.name, ext, want) + } + } +} + +func TestClearAllExtensions(t *testing.T) { + // unregistered extension + desc := &proto.ExtensionDesc{ + ExtendedType: (*pb.MyMessage)(nil), + ExtensionType: (*bool)(nil), + Field: 101010100, + Name: "emptyextension", + Tag: "varint,0,opt", + } + m := &pb.MyMessage{} + if proto.HasExtension(m, desc) { + t.Errorf("proto.HasExtension(%s): got true, want false", proto.MarshalTextString(m)) + } + if err := proto.SetExtension(m, desc, proto.Bool(true)); err != nil { + t.Errorf("proto.SetExtension(m, desc, true): got error %q, want nil", err) + } + if !proto.HasExtension(m, desc) { + t.Errorf("proto.HasExtension(%s): got false, want true", proto.MarshalTextString(m)) + } + proto.ClearAllExtensions(m) + if proto.HasExtension(m, desc) { + t.Errorf("proto.HasExtension(%s): got true, want false", proto.MarshalTextString(m)) + } +} + +func TestMarshalRace(t *testing.T) { + // unregistered extension + desc := &proto.ExtensionDesc{ + ExtendedType: (*pb.MyMessage)(nil), + ExtensionType: (*bool)(nil), + Field: 101010100, + Name: "emptyextension", + Tag: "varint,0,opt", + } + + m := &pb.MyMessage{Count: proto.Int32(4)} + if err := proto.SetExtension(m, desc, proto.Bool(true)); err != nil { + t.Errorf("proto.SetExtension(m, desc, true): got error %q, want nil", err) + } + + var g errgroup.Group + for n := 3; n > 0; n-- { + g.Go(func() error { + _, err := proto.Marshal(m) + return err + }) + } + if err := g.Wait(); err != nil { + t.Fatal(err) + } +} diff --git a/vendor/github.com/golang/protobuf/proto/lib.go b/vendor/github.com/golang/protobuf/proto/lib.go index ac4ddbc07..1c225504a 100644 --- a/vendor/github.com/golang/protobuf/proto/lib.go +++ b/vendor/github.com/golang/protobuf/proto/lib.go @@ -73,7 +73,6 @@ for a protocol buffer variable v: When the .proto file specifies `syntax="proto3"`, there are some differences: - Non-repeated fields of non-message type are values instead of pointers. - - Getters are only generated for message and oneof fields. - Enum types do not get an Enum method. The simplest way to describe this is to see an example. diff --git a/vendor/github.com/golang/protobuf/proto/map_test.go b/vendor/github.com/golang/protobuf/proto/map_test.go new file mode 100644 index 000000000..313e87924 --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/map_test.go @@ -0,0 +1,46 @@ +package proto_test + +import ( + "fmt" + "testing" + + "github.com/golang/protobuf/proto" + ppb "github.com/golang/protobuf/proto/proto3_proto" +) + +func marshalled() []byte { + m := &ppb.IntMaps{} + for i := 0; i < 1000; i++ { + m.Maps = append(m.Maps, &ppb.IntMap{ + Rtt: map[int32]int32{1: 2}, + }) + } + b, err := proto.Marshal(m) + if err != nil { + panic(fmt.Sprintf("Can't marshal %+v: %v", m, err)) + } + return b +} + +func BenchmarkConcurrentMapUnmarshal(b *testing.B) { + in := marshalled() + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + var out ppb.IntMaps + if err := proto.Unmarshal(in, &out); err != nil { + b.Errorf("Can't unmarshal ppb.IntMaps: %v", err) + } + } + }) +} + +func BenchmarkSequentialMapUnmarshal(b *testing.B) { + in := marshalled() + b.ResetTimer() + for i := 0; i < b.N; i++ { + var out ppb.IntMaps + if err := proto.Unmarshal(in, &out); err != nil { + b.Errorf("Can't unmarshal ppb.IntMaps: %v", err) + } + } +} diff --git a/vendor/github.com/golang/protobuf/proto/message_set_test.go b/vendor/github.com/golang/protobuf/proto/message_set_test.go new file mode 100644 index 000000000..353a3ea76 --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/message_set_test.go @@ -0,0 +1,66 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto + +import ( + "bytes" + "testing" +) + +func TestUnmarshalMessageSetWithDuplicate(t *testing.T) { + // Check that a repeated message set entry will be concatenated. + in := &messageSet{ + Item: []*_MessageSet_Item{ + {TypeId: Int32(12345), Message: []byte("hoo")}, + {TypeId: Int32(12345), Message: []byte("hah")}, + }, + } + b, err := Marshal(in) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + t.Logf("Marshaled bytes: %q", b) + + var extensions XXX_InternalExtensions + if err := UnmarshalMessageSet(b, &extensions); err != nil { + t.Fatalf("UnmarshalMessageSet: %v", err) + } + ext, ok := extensions.p.extensionMap[12345] + if !ok { + t.Fatalf("Didn't retrieve extension 12345; map is %v", extensions.p.extensionMap) + } + // Skip wire type/field number and length varints. + got := skipVarint(skipVarint(ext.enc)) + if want := []byte("hoohah"); !bytes.Equal(got, want) { + t.Errorf("Combined extension is %q, want %q", got, want) + } +} diff --git a/vendor/github.com/golang/protobuf/proto/proto3_test.go b/vendor/github.com/golang/protobuf/proto/proto3_test.go new file mode 100644 index 000000000..735837f2d --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/proto3_test.go @@ -0,0 +1,135 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto_test + +import ( + "testing" + + "github.com/golang/protobuf/proto" + pb "github.com/golang/protobuf/proto/proto3_proto" + tpb "github.com/golang/protobuf/proto/testdata" +) + +func TestProto3ZeroValues(t *testing.T) { + tests := []struct { + desc string + m proto.Message + }{ + {"zero message", &pb.Message{}}, + {"empty bytes field", &pb.Message{Data: []byte{}}}, + } + for _, test := range tests { + b, err := proto.Marshal(test.m) + if err != nil { + t.Errorf("%s: proto.Marshal: %v", test.desc, err) + continue + } + if len(b) > 0 { + t.Errorf("%s: Encoding is non-empty: %q", test.desc, b) + } + } +} + +func TestRoundTripProto3(t *testing.T) { + m := &pb.Message{ + Name: "David", // (2 | 1<<3): 0x0a 0x05 "David" + Hilarity: pb.Message_PUNS, // (0 | 2<<3): 0x10 0x01 + HeightInCm: 178, // (0 | 3<<3): 0x18 0xb2 0x01 + Data: []byte("roboto"), // (2 | 4<<3): 0x20 0x06 "roboto" + ResultCount: 47, // (0 | 7<<3): 0x38 0x2f + TrueScotsman: true, // (0 | 8<<3): 0x40 0x01 + Score: 8.1, // (5 | 9<<3): 0x4d <8.1> + + Key: []uint64{1, 0xdeadbeef}, + Nested: &pb.Nested{ + Bunny: "Monty", + }, + } + t.Logf(" m: %v", m) + + b, err := proto.Marshal(m) + if err != nil { + t.Fatalf("proto.Marshal: %v", err) + } + t.Logf(" b: %q", b) + + m2 := new(pb.Message) + if err := proto.Unmarshal(b, m2); err != nil { + t.Fatalf("proto.Unmarshal: %v", err) + } + t.Logf("m2: %v", m2) + + if !proto.Equal(m, m2) { + t.Errorf("proto.Equal returned false:\n m: %v\nm2: %v", m, m2) + } +} + +func TestGettersForBasicTypesExist(t *testing.T) { + var m pb.Message + if got := m.GetNested().GetBunny(); got != "" { + t.Errorf("m.GetNested().GetBunny() = %q, want empty string", got) + } + if got := m.GetNested().GetCute(); got { + t.Errorf("m.GetNested().GetCute() = %t, want false", got) + } +} + +func TestProto3SetDefaults(t *testing.T) { + in := &pb.Message{ + Terrain: map[string]*pb.Nested{ + "meadow": new(pb.Nested), + }, + Proto2Field: new(tpb.SubDefaults), + Proto2Value: map[string]*tpb.SubDefaults{ + "badlands": new(tpb.SubDefaults), + }, + } + + got := proto.Clone(in).(*pb.Message) + proto.SetDefaults(got) + + // There are no defaults in proto3. Everything should be the zero value, but + // we need to remember to set defaults for nested proto2 messages. + want := &pb.Message{ + Terrain: map[string]*pb.Nested{ + "meadow": new(pb.Nested), + }, + Proto2Field: &tpb.SubDefaults{N: proto.Int64(7)}, + Proto2Value: map[string]*tpb.SubDefaults{ + "badlands": &tpb.SubDefaults{N: proto.Int64(7)}, + }, + } + + if !proto.Equal(got, want) { + t.Errorf("with in = %v\nproto.SetDefaults(in) =>\ngot %v\nwant %v", in, got, want) + } +} diff --git a/vendor/github.com/golang/protobuf/proto/size2_test.go b/vendor/github.com/golang/protobuf/proto/size2_test.go new file mode 100644 index 000000000..a2729c39a --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/size2_test.go @@ -0,0 +1,63 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2012 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto + +import ( + "testing" +) + +// This is a separate file and package from size_test.go because that one uses +// generated messages and thus may not be in package proto without having a circular +// dependency, whereas this file tests unexported details of size.go. + +func TestVarintSize(t *testing.T) { + // Check the edge cases carefully. + testCases := []struct { + n uint64 + size int + }{ + {0, 1}, + {1, 1}, + {127, 1}, + {128, 2}, + {16383, 2}, + {16384, 3}, + {1<<63 - 1, 9}, + {1 << 63, 10}, + } + for _, tc := range testCases { + size := sizeVarint(tc.n) + if size != tc.size { + t.Errorf("sizeVarint(%d) = %d, want %d", tc.n, size, tc.size) + } + } +} diff --git a/vendor/github.com/golang/protobuf/proto/size_test.go b/vendor/github.com/golang/protobuf/proto/size_test.go new file mode 100644 index 000000000..af1034dc7 --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/size_test.go @@ -0,0 +1,164 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2012 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto_test + +import ( + "log" + "strings" + "testing" + + . "github.com/golang/protobuf/proto" + proto3pb "github.com/golang/protobuf/proto/proto3_proto" + pb "github.com/golang/protobuf/proto/testdata" +) + +var messageWithExtension1 = &pb.MyMessage{Count: Int32(7)} + +// messageWithExtension2 is in equal_test.go. +var messageWithExtension3 = &pb.MyMessage{Count: Int32(8)} + +func init() { + if err := SetExtension(messageWithExtension1, pb.E_Ext_More, &pb.Ext{Data: String("Abbott")}); err != nil { + log.Panicf("SetExtension: %v", err) + } + if err := SetExtension(messageWithExtension3, pb.E_Ext_More, &pb.Ext{Data: String("Costello")}); err != nil { + log.Panicf("SetExtension: %v", err) + } + + // Force messageWithExtension3 to have the extension encoded. + Marshal(messageWithExtension3) + +} + +var SizeTests = []struct { + desc string + pb Message +}{ + {"empty", &pb.OtherMessage{}}, + // Basic types. + {"bool", &pb.Defaults{F_Bool: Bool(true)}}, + {"int32", &pb.Defaults{F_Int32: Int32(12)}}, + {"negative int32", &pb.Defaults{F_Int32: Int32(-1)}}, + {"small int64", &pb.Defaults{F_Int64: Int64(1)}}, + {"big int64", &pb.Defaults{F_Int64: Int64(1 << 20)}}, + {"negative int64", &pb.Defaults{F_Int64: Int64(-1)}}, + {"fixed32", &pb.Defaults{F_Fixed32: Uint32(71)}}, + {"fixed64", &pb.Defaults{F_Fixed64: Uint64(72)}}, + {"uint32", &pb.Defaults{F_Uint32: Uint32(123)}}, + {"uint64", &pb.Defaults{F_Uint64: Uint64(124)}}, + {"float", &pb.Defaults{F_Float: Float32(12.6)}}, + {"double", &pb.Defaults{F_Double: Float64(13.9)}}, + {"string", &pb.Defaults{F_String: String("niles")}}, + {"bytes", &pb.Defaults{F_Bytes: []byte("wowsa")}}, + {"bytes, empty", &pb.Defaults{F_Bytes: []byte{}}}, + {"sint32", &pb.Defaults{F_Sint32: Int32(65)}}, + {"sint64", &pb.Defaults{F_Sint64: Int64(67)}}, + {"enum", &pb.Defaults{F_Enum: pb.Defaults_BLUE.Enum()}}, + // Repeated. + {"empty repeated bool", &pb.MoreRepeated{Bools: []bool{}}}, + {"repeated bool", &pb.MoreRepeated{Bools: []bool{false, true, true, false}}}, + {"packed repeated bool", &pb.MoreRepeated{BoolsPacked: []bool{false, true, true, false, true, true, true}}}, + {"repeated int32", &pb.MoreRepeated{Ints: []int32{1, 12203, 1729, -1}}}, + {"repeated int32 packed", &pb.MoreRepeated{IntsPacked: []int32{1, 12203, 1729}}}, + {"repeated int64 packed", &pb.MoreRepeated{Int64SPacked: []int64{ + // Need enough large numbers to verify that the header is counting the number of bytes + // for the field, not the number of elements. + 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, + 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, + }}}, + {"repeated string", &pb.MoreRepeated{Strings: []string{"r", "ken", "gri"}}}, + {"repeated fixed", &pb.MoreRepeated{Fixeds: []uint32{1, 2, 3, 4}}}, + // Nested. + {"nested", &pb.OldMessage{Nested: &pb.OldMessage_Nested{Name: String("whatever")}}}, + {"group", &pb.GroupOld{G: &pb.GroupOld_G{X: Int32(12345)}}}, + // Other things. + {"unrecognized", &pb.MoreRepeated{XXX_unrecognized: []byte{13<<3 | 0, 4}}}, + {"extension (unencoded)", messageWithExtension1}, + {"extension (encoded)", messageWithExtension3}, + // proto3 message + {"proto3 empty", &proto3pb.Message{}}, + {"proto3 bool", &proto3pb.Message{TrueScotsman: true}}, + {"proto3 int64", &proto3pb.Message{ResultCount: 1}}, + {"proto3 uint32", &proto3pb.Message{HeightInCm: 123}}, + {"proto3 float", &proto3pb.Message{Score: 12.6}}, + {"proto3 string", &proto3pb.Message{Name: "Snezana"}}, + {"proto3 bytes", &proto3pb.Message{Data: []byte("wowsa")}}, + {"proto3 bytes, empty", &proto3pb.Message{Data: []byte{}}}, + {"proto3 enum", &proto3pb.Message{Hilarity: proto3pb.Message_PUNS}}, + {"proto3 map field with empty bytes", &proto3pb.MessageWithMap{ByteMapping: map[bool][]byte{false: []byte{}}}}, + + {"map field", &pb.MessageWithMap{NameMapping: map[int32]string{1: "Rob", 7: "Andrew"}}}, + {"map field with message", &pb.MessageWithMap{MsgMapping: map[int64]*pb.FloatingPoint{0x7001: &pb.FloatingPoint{F: Float64(2.0)}}}}, + {"map field with bytes", &pb.MessageWithMap{ByteMapping: map[bool][]byte{true: []byte("this time for sure")}}}, + {"map field with empty bytes", &pb.MessageWithMap{ByteMapping: map[bool][]byte{true: []byte{}}}}, + + {"map field with big entry", &pb.MessageWithMap{NameMapping: map[int32]string{8: strings.Repeat("x", 125)}}}, + {"map field with big key and val", &pb.MessageWithMap{StrToStr: map[string]string{strings.Repeat("x", 70): strings.Repeat("y", 70)}}}, + {"map field with big numeric key", &pb.MessageWithMap{NameMapping: map[int32]string{0xf00d: "om nom nom"}}}, + + {"oneof not set", &pb.Oneof{}}, + {"oneof bool", &pb.Oneof{Union: &pb.Oneof_F_Bool{true}}}, + {"oneof zero int32", &pb.Oneof{Union: &pb.Oneof_F_Int32{0}}}, + {"oneof big int32", &pb.Oneof{Union: &pb.Oneof_F_Int32{1 << 20}}}, + {"oneof int64", &pb.Oneof{Union: &pb.Oneof_F_Int64{42}}}, + {"oneof fixed32", &pb.Oneof{Union: &pb.Oneof_F_Fixed32{43}}}, + {"oneof fixed64", &pb.Oneof{Union: &pb.Oneof_F_Fixed64{44}}}, + {"oneof uint32", &pb.Oneof{Union: &pb.Oneof_F_Uint32{45}}}, + {"oneof uint64", &pb.Oneof{Union: &pb.Oneof_F_Uint64{46}}}, + {"oneof float", &pb.Oneof{Union: &pb.Oneof_F_Float{47.1}}}, + {"oneof double", &pb.Oneof{Union: &pb.Oneof_F_Double{48.9}}}, + {"oneof string", &pb.Oneof{Union: &pb.Oneof_F_String{"Rhythmic Fman"}}}, + {"oneof bytes", &pb.Oneof{Union: &pb.Oneof_F_Bytes{[]byte("let go")}}}, + {"oneof sint32", &pb.Oneof{Union: &pb.Oneof_F_Sint32{50}}}, + {"oneof sint64", &pb.Oneof{Union: &pb.Oneof_F_Sint64{51}}}, + {"oneof enum", &pb.Oneof{Union: &pb.Oneof_F_Enum{pb.MyMessage_BLUE}}}, + {"message for oneof", &pb.GoTestField{Label: String("k"), Type: String("v")}}, + {"oneof message", &pb.Oneof{Union: &pb.Oneof_F_Message{&pb.GoTestField{Label: String("k"), Type: String("v")}}}}, + {"oneof group", &pb.Oneof{Union: &pb.Oneof_FGroup{&pb.Oneof_F_Group{X: Int32(52)}}}}, + {"oneof largest tag", &pb.Oneof{Union: &pb.Oneof_F_Largest_Tag{1}}}, + {"multiple oneofs", &pb.Oneof{Union: &pb.Oneof_F_Int32{1}, Tormato: &pb.Oneof_Value{2}}}, +} + +func TestSize(t *testing.T) { + for _, tc := range SizeTests { + size := Size(tc.pb) + b, err := Marshal(tc.pb) + if err != nil { + t.Errorf("%v: Marshal failed: %v", tc.desc, err) + continue + } + if size != len(b) { + t.Errorf("%v: Size(%v) = %d, want %d", tc.desc, tc.pb, size, len(b)) + t.Logf("%v: bytes: %#v", tc.desc, b) + } + } +} diff --git a/vendor/github.com/golang/protobuf/proto/text_parser.go b/vendor/github.com/golang/protobuf/proto/text_parser.go index 61f83c1e1..5e14513f2 100644 --- a/vendor/github.com/golang/protobuf/proto/text_parser.go +++ b/vendor/github.com/golang/protobuf/proto/text_parser.go @@ -865,7 +865,7 @@ func (p *textParser) readAny(v reflect.Value, props *Properties) error { return p.readStruct(fv, terminator) case reflect.Uint32: if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil { - fv.SetUint(uint64(x)) + fv.SetUint(x) return nil } case reflect.Uint64: diff --git a/vendor/github.com/golang/protobuf/proto/text_parser_test.go b/vendor/github.com/golang/protobuf/proto/text_parser_test.go new file mode 100644 index 000000000..8f7cb4d27 --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/text_parser_test.go @@ -0,0 +1,673 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto_test + +import ( + "math" + "reflect" + "testing" + + . "github.com/golang/protobuf/proto" + proto3pb "github.com/golang/protobuf/proto/proto3_proto" + . "github.com/golang/protobuf/proto/testdata" +) + +type UnmarshalTextTest struct { + in string + err string // if "", no error expected + out *MyMessage +} + +func buildExtStructTest(text string) UnmarshalTextTest { + msg := &MyMessage{ + Count: Int32(42), + } + SetExtension(msg, E_Ext_More, &Ext{ + Data: String("Hello, world!"), + }) + return UnmarshalTextTest{in: text, out: msg} +} + +func buildExtDataTest(text string) UnmarshalTextTest { + msg := &MyMessage{ + Count: Int32(42), + } + SetExtension(msg, E_Ext_Text, String("Hello, world!")) + SetExtension(msg, E_Ext_Number, Int32(1729)) + return UnmarshalTextTest{in: text, out: msg} +} + +func buildExtRepStringTest(text string) UnmarshalTextTest { + msg := &MyMessage{ + Count: Int32(42), + } + if err := SetExtension(msg, E_Greeting, []string{"bula", "hola"}); err != nil { + panic(err) + } + return UnmarshalTextTest{in: text, out: msg} +} + +var unMarshalTextTests = []UnmarshalTextTest{ + // Basic + { + in: " count:42\n name:\"Dave\" ", + out: &MyMessage{ + Count: Int32(42), + Name: String("Dave"), + }, + }, + + // Empty quoted string + { + in: `count:42 name:""`, + out: &MyMessage{ + Count: Int32(42), + Name: String(""), + }, + }, + + // Quoted string concatenation with double quotes + { + in: `count:42 name: "My name is "` + "\n" + `"elsewhere"`, + out: &MyMessage{ + Count: Int32(42), + Name: String("My name is elsewhere"), + }, + }, + + // Quoted string concatenation with single quotes + { + in: "count:42 name: 'My name is '\n'elsewhere'", + out: &MyMessage{ + Count: Int32(42), + Name: String("My name is elsewhere"), + }, + }, + + // Quoted string concatenations with mixed quotes + { + in: "count:42 name: 'My name is '\n\"elsewhere\"", + out: &MyMessage{ + Count: Int32(42), + Name: String("My name is elsewhere"), + }, + }, + { + in: "count:42 name: \"My name is \"\n'elsewhere'", + out: &MyMessage{ + Count: Int32(42), + Name: String("My name is elsewhere"), + }, + }, + + // Quoted string with escaped apostrophe + { + in: `count:42 name: "HOLIDAY - New Year\'s Day"`, + out: &MyMessage{ + Count: Int32(42), + Name: String("HOLIDAY - New Year's Day"), + }, + }, + + // Quoted string with single quote + { + in: `count:42 name: 'Roger "The Ramster" Ramjet'`, + out: &MyMessage{ + Count: Int32(42), + Name: String(`Roger "The Ramster" Ramjet`), + }, + }, + + // Quoted string with all the accepted special characters from the C++ test + { + in: `count:42 name: ` + "\"\\\"A string with \\' characters \\n and \\r newlines and \\t tabs and \\001 slashes \\\\ and multiple spaces\"", + out: &MyMessage{ + Count: Int32(42), + Name: String("\"A string with ' characters \n and \r newlines and \t tabs and \001 slashes \\ and multiple spaces"), + }, + }, + + // Quoted string with quoted backslash + { + in: `count:42 name: "\\'xyz"`, + out: &MyMessage{ + Count: Int32(42), + Name: String(`\'xyz`), + }, + }, + + // Quoted string with UTF-8 bytes. + { + in: "count:42 name: '\303\277\302\201\xAB'", + out: &MyMessage{ + Count: Int32(42), + Name: String("\303\277\302\201\xAB"), + }, + }, + + // Bad quoted string + { + in: `inner: < host: "\0" >` + "\n", + err: `line 1.15: invalid quoted string "\0": \0 requires 2 following digits`, + }, + + // Number too large for int64 + { + in: "count: 1 others { key: 123456789012345678901 }", + err: "line 1.23: invalid int64: 123456789012345678901", + }, + + // Number too large for int32 + { + in: "count: 1234567890123", + err: "line 1.7: invalid int32: 1234567890123", + }, + + // Number in hexadecimal + { + in: "count: 0x2beef", + out: &MyMessage{ + Count: Int32(0x2beef), + }, + }, + + // Number in octal + { + in: "count: 024601", + out: &MyMessage{ + Count: Int32(024601), + }, + }, + + // Floating point number with "f" suffix + { + in: "count: 4 others:< weight: 17.0f >", + out: &MyMessage{ + Count: Int32(4), + Others: []*OtherMessage{ + { + Weight: Float32(17), + }, + }, + }, + }, + + // Floating point positive infinity + { + in: "count: 4 bigfloat: inf", + out: &MyMessage{ + Count: Int32(4), + Bigfloat: Float64(math.Inf(1)), + }, + }, + + // Floating point negative infinity + { + in: "count: 4 bigfloat: -inf", + out: &MyMessage{ + Count: Int32(4), + Bigfloat: Float64(math.Inf(-1)), + }, + }, + + // Number too large for float32 + { + in: "others:< weight: 12345678901234567890123456789012345678901234567890 >", + err: "line 1.17: invalid float32: 12345678901234567890123456789012345678901234567890", + }, + + // Number posing as a quoted string + { + in: `inner: < host: 12 >` + "\n", + err: `line 1.15: invalid string: 12`, + }, + + // Quoted string posing as int32 + { + in: `count: "12"`, + err: `line 1.7: invalid int32: "12"`, + }, + + // Quoted string posing a float32 + { + in: `others:< weight: "17.4" >`, + err: `line 1.17: invalid float32: "17.4"`, + }, + + // Enum + { + in: `count:42 bikeshed: BLUE`, + out: &MyMessage{ + Count: Int32(42), + Bikeshed: MyMessage_BLUE.Enum(), + }, + }, + + // Repeated field + { + in: `count:42 pet: "horsey" pet:"bunny"`, + out: &MyMessage{ + Count: Int32(42), + Pet: []string{"horsey", "bunny"}, + }, + }, + + // Repeated field with list notation + { + in: `count:42 pet: ["horsey", "bunny"]`, + out: &MyMessage{ + Count: Int32(42), + Pet: []string{"horsey", "bunny"}, + }, + }, + + // Repeated message with/without colon and <>/{} + { + in: `count:42 others:{} others{} others:<> others:{}`, + out: &MyMessage{ + Count: Int32(42), + Others: []*OtherMessage{ + {}, + {}, + {}, + {}, + }, + }, + }, + + // Missing colon for inner message + { + in: `count:42 inner < host: "cauchy.syd" >`, + out: &MyMessage{ + Count: Int32(42), + Inner: &InnerMessage{ + Host: String("cauchy.syd"), + }, + }, + }, + + // Missing colon for string field + { + in: `name "Dave"`, + err: `line 1.5: expected ':', found "\"Dave\""`, + }, + + // Missing colon for int32 field + { + in: `count 42`, + err: `line 1.6: expected ':', found "42"`, + }, + + // Missing required field + { + in: `name: "Pawel"`, + err: `proto: required field "testdata.MyMessage.count" not set`, + out: &MyMessage{ + Name: String("Pawel"), + }, + }, + + // Missing required field in a required submessage + { + in: `count: 42 we_must_go_deeper < leo_finally_won_an_oscar <> >`, + err: `proto: required field "testdata.InnerMessage.host" not set`, + out: &MyMessage{ + Count: Int32(42), + WeMustGoDeeper: &RequiredInnerMessage{LeoFinallyWonAnOscar: &InnerMessage{}}, + }, + }, + + // Repeated non-repeated field + { + in: `name: "Rob" name: "Russ"`, + err: `line 1.12: non-repeated field "name" was repeated`, + }, + + // Group + { + in: `count: 17 SomeGroup { group_field: 12 }`, + out: &MyMessage{ + Count: Int32(17), + Somegroup: &MyMessage_SomeGroup{ + GroupField: Int32(12), + }, + }, + }, + + // Semicolon between fields + { + in: `count:3;name:"Calvin"`, + out: &MyMessage{ + Count: Int32(3), + Name: String("Calvin"), + }, + }, + // Comma between fields + { + in: `count:4,name:"Ezekiel"`, + out: &MyMessage{ + Count: Int32(4), + Name: String("Ezekiel"), + }, + }, + + // Boolean false + { + in: `count:42 inner { host: "example.com" connected: false }`, + out: &MyMessage{ + Count: Int32(42), + Inner: &InnerMessage{ + Host: String("example.com"), + Connected: Bool(false), + }, + }, + }, + // Boolean true + { + in: `count:42 inner { host: "example.com" connected: true }`, + out: &MyMessage{ + Count: Int32(42), + Inner: &InnerMessage{ + Host: String("example.com"), + Connected: Bool(true), + }, + }, + }, + // Boolean 0 + { + in: `count:42 inner { host: "example.com" connected: 0 }`, + out: &MyMessage{ + Count: Int32(42), + Inner: &InnerMessage{ + Host: String("example.com"), + Connected: Bool(false), + }, + }, + }, + // Boolean 1 + { + in: `count:42 inner { host: "example.com" connected: 1 }`, + out: &MyMessage{ + Count: Int32(42), + Inner: &InnerMessage{ + Host: String("example.com"), + Connected: Bool(true), + }, + }, + }, + // Boolean f + { + in: `count:42 inner { host: "example.com" connected: f }`, + out: &MyMessage{ + Count: Int32(42), + Inner: &InnerMessage{ + Host: String("example.com"), + Connected: Bool(false), + }, + }, + }, + // Boolean t + { + in: `count:42 inner { host: "example.com" connected: t }`, + out: &MyMessage{ + Count: Int32(42), + Inner: &InnerMessage{ + Host: String("example.com"), + Connected: Bool(true), + }, + }, + }, + // Boolean False + { + in: `count:42 inner { host: "example.com" connected: False }`, + out: &MyMessage{ + Count: Int32(42), + Inner: &InnerMessage{ + Host: String("example.com"), + Connected: Bool(false), + }, + }, + }, + // Boolean True + { + in: `count:42 inner { host: "example.com" connected: True }`, + out: &MyMessage{ + Count: Int32(42), + Inner: &InnerMessage{ + Host: String("example.com"), + Connected: Bool(true), + }, + }, + }, + + // Extension + buildExtStructTest(`count: 42 [testdata.Ext.more]:`), + buildExtStructTest(`count: 42 [testdata.Ext.more] {data:"Hello, world!"}`), + buildExtDataTest(`count: 42 [testdata.Ext.text]:"Hello, world!" [testdata.Ext.number]:1729`), + buildExtRepStringTest(`count: 42 [testdata.greeting]:"bula" [testdata.greeting]:"hola"`), + + // Big all-in-one + { + in: "count:42 # Meaning\n" + + `name:"Dave" ` + + `quote:"\"I didn't want to go.\"" ` + + `pet:"bunny" ` + + `pet:"kitty" ` + + `pet:"horsey" ` + + `inner:<` + + ` host:"footrest.syd" ` + + ` port:7001 ` + + ` connected:true ` + + `> ` + + `others:<` + + ` key:3735928559 ` + + ` value:"\x01A\a\f" ` + + `> ` + + `others:<` + + " weight:58.9 # Atomic weight of Co\n" + + ` inner:<` + + ` host:"lesha.mtv" ` + + ` port:8002 ` + + ` >` + + `>`, + out: &MyMessage{ + Count: Int32(42), + Name: String("Dave"), + Quote: String(`"I didn't want to go."`), + Pet: []string{"bunny", "kitty", "horsey"}, + Inner: &InnerMessage{ + Host: String("footrest.syd"), + Port: Int32(7001), + Connected: Bool(true), + }, + Others: []*OtherMessage{ + { + Key: Int64(3735928559), + Value: []byte{0x1, 'A', '\a', '\f'}, + }, + { + Weight: Float32(58.9), + Inner: &InnerMessage{ + Host: String("lesha.mtv"), + Port: Int32(8002), + }, + }, + }, + }, + }, +} + +func TestUnmarshalText(t *testing.T) { + for i, test := range unMarshalTextTests { + pb := new(MyMessage) + err := UnmarshalText(test.in, pb) + if test.err == "" { + // We don't expect failure. + if err != nil { + t.Errorf("Test %d: Unexpected error: %v", i, err) + } else if !reflect.DeepEqual(pb, test.out) { + t.Errorf("Test %d: Incorrect populated \nHave: %v\nWant: %v", + i, pb, test.out) + } + } else { + // We do expect failure. + if err == nil { + t.Errorf("Test %d: Didn't get expected error: %v", i, test.err) + } else if err.Error() != test.err { + t.Errorf("Test %d: Incorrect error.\nHave: %v\nWant: %v", + i, err.Error(), test.err) + } else if _, ok := err.(*RequiredNotSetError); ok && test.out != nil && !reflect.DeepEqual(pb, test.out) { + t.Errorf("Test %d: Incorrect populated \nHave: %v\nWant: %v", + i, pb, test.out) + } + } + } +} + +func TestUnmarshalTextCustomMessage(t *testing.T) { + msg := &textMessage{} + if err := UnmarshalText("custom", msg); err != nil { + t.Errorf("Unexpected error from custom unmarshal: %v", err) + } + if UnmarshalText("not custom", msg) == nil { + t.Errorf("Didn't get expected error from custom unmarshal") + } +} + +// Regression test; this caused a panic. +func TestRepeatedEnum(t *testing.T) { + pb := new(RepeatedEnum) + if err := UnmarshalText("color: RED", pb); err != nil { + t.Fatal(err) + } + exp := &RepeatedEnum{ + Color: []RepeatedEnum_Color{RepeatedEnum_RED}, + } + if !Equal(pb, exp) { + t.Errorf("Incorrect populated \nHave: %v\nWant: %v", pb, exp) + } +} + +func TestProto3TextParsing(t *testing.T) { + m := new(proto3pb.Message) + const in = `name: "Wallace" true_scotsman: true` + want := &proto3pb.Message{ + Name: "Wallace", + TrueScotsman: true, + } + if err := UnmarshalText(in, m); err != nil { + t.Fatal(err) + } + if !Equal(m, want) { + t.Errorf("\n got %v\nwant %v", m, want) + } +} + +func TestMapParsing(t *testing.T) { + m := new(MessageWithMap) + const in = `name_mapping: name_mapping:` + + `msg_mapping:,>` + // separating commas are okay + `msg_mapping>` + // no colon after "value" + `msg_mapping:>` + // omitted key + `msg_mapping:` + // omitted value + `byte_mapping:` + + `byte_mapping:<>` // omitted key and value + want := &MessageWithMap{ + NameMapping: map[int32]string{ + 1: "Beatles", + 1234: "Feist", + }, + MsgMapping: map[int64]*FloatingPoint{ + -4: {F: Float64(2.0)}, + -2: {F: Float64(4.0)}, + 0: {F: Float64(5.0)}, + 1: nil, + }, + ByteMapping: map[bool][]byte{ + false: nil, + true: []byte("so be it"), + }, + } + if err := UnmarshalText(in, m); err != nil { + t.Fatal(err) + } + if !Equal(m, want) { + t.Errorf("\n got %v\nwant %v", m, want) + } +} + +func TestOneofParsing(t *testing.T) { + const in = `name:"Shrek"` + m := new(Communique) + want := &Communique{Union: &Communique_Name{"Shrek"}} + if err := UnmarshalText(in, m); err != nil { + t.Fatal(err) + } + if !Equal(m, want) { + t.Errorf("\n got %v\nwant %v", m, want) + } + + const inOverwrite = `name:"Shrek" number:42` + m = new(Communique) + testErr := "line 1.13: field 'number' would overwrite already parsed oneof 'Union'" + if err := UnmarshalText(inOverwrite, m); err == nil { + t.Errorf("TestOneofParsing: Didn't get expected error: %v", testErr) + } else if err.Error() != testErr { + t.Errorf("TestOneofParsing: Incorrect error.\nHave: %v\nWant: %v", + err.Error(), testErr) + } + +} + +var benchInput string + +func init() { + benchInput = "count: 4\n" + for i := 0; i < 1000; i++ { + benchInput += "pet: \"fido\"\n" + } + + // Check it is valid input. + pb := new(MyMessage) + err := UnmarshalText(benchInput, pb) + if err != nil { + panic("Bad benchmark input: " + err.Error()) + } +} + +func BenchmarkUnmarshalText(b *testing.B) { + pb := new(MyMessage) + for i := 0; i < b.N; i++ { + UnmarshalText(benchInput, pb) + } + b.SetBytes(int64(len(benchInput))) +} diff --git a/vendor/github.com/golang/protobuf/proto/text_test.go b/vendor/github.com/golang/protobuf/proto/text_test.go new file mode 100644 index 000000000..3eabacac8 --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/text_test.go @@ -0,0 +1,474 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto_test + +import ( + "bytes" + "errors" + "io/ioutil" + "math" + "strings" + "testing" + + "github.com/golang/protobuf/proto" + + proto3pb "github.com/golang/protobuf/proto/proto3_proto" + pb "github.com/golang/protobuf/proto/testdata" +) + +// textMessage implements the methods that allow it to marshal and unmarshal +// itself as text. +type textMessage struct { +} + +func (*textMessage) MarshalText() ([]byte, error) { + return []byte("custom"), nil +} + +func (*textMessage) UnmarshalText(bytes []byte) error { + if string(bytes) != "custom" { + return errors.New("expected 'custom'") + } + return nil +} + +func (*textMessage) Reset() {} +func (*textMessage) String() string { return "" } +func (*textMessage) ProtoMessage() {} + +func newTestMessage() *pb.MyMessage { + msg := &pb.MyMessage{ + Count: proto.Int32(42), + Name: proto.String("Dave"), + Quote: proto.String(`"I didn't want to go."`), + Pet: []string{"bunny", "kitty", "horsey"}, + Inner: &pb.InnerMessage{ + Host: proto.String("footrest.syd"), + Port: proto.Int32(7001), + Connected: proto.Bool(true), + }, + Others: []*pb.OtherMessage{ + { + Key: proto.Int64(0xdeadbeef), + Value: []byte{1, 65, 7, 12}, + }, + { + Weight: proto.Float32(6.022), + Inner: &pb.InnerMessage{ + Host: proto.String("lesha.mtv"), + Port: proto.Int32(8002), + }, + }, + }, + Bikeshed: pb.MyMessage_BLUE.Enum(), + Somegroup: &pb.MyMessage_SomeGroup{ + GroupField: proto.Int32(8), + }, + // One normally wouldn't do this. + // This is an undeclared tag 13, as a varint (wire type 0) with value 4. + XXX_unrecognized: []byte{13<<3 | 0, 4}, + } + ext := &pb.Ext{ + Data: proto.String("Big gobs for big rats"), + } + if err := proto.SetExtension(msg, pb.E_Ext_More, ext); err != nil { + panic(err) + } + greetings := []string{"adg", "easy", "cow"} + if err := proto.SetExtension(msg, pb.E_Greeting, greetings); err != nil { + panic(err) + } + + // Add an unknown extension. We marshal a pb.Ext, and fake the ID. + b, err := proto.Marshal(&pb.Ext{Data: proto.String("3G skiing")}) + if err != nil { + panic(err) + } + b = append(proto.EncodeVarint(201<<3|proto.WireBytes), b...) + proto.SetRawExtension(msg, 201, b) + + // Extensions can be plain fields, too, so let's test that. + b = append(proto.EncodeVarint(202<<3|proto.WireVarint), 19) + proto.SetRawExtension(msg, 202, b) + + return msg +} + +const text = `count: 42 +name: "Dave" +quote: "\"I didn't want to go.\"" +pet: "bunny" +pet: "kitty" +pet: "horsey" +inner: < + host: "footrest.syd" + port: 7001 + connected: true +> +others: < + key: 3735928559 + value: "\001A\007\014" +> +others: < + weight: 6.022 + inner: < + host: "lesha.mtv" + port: 8002 + > +> +bikeshed: BLUE +SomeGroup { + group_field: 8 +} +/* 2 unknown bytes */ +13: 4 +[testdata.Ext.more]: < + data: "Big gobs for big rats" +> +[testdata.greeting]: "adg" +[testdata.greeting]: "easy" +[testdata.greeting]: "cow" +/* 13 unknown bytes */ +201: "\t3G skiing" +/* 3 unknown bytes */ +202: 19 +` + +func TestMarshalText(t *testing.T) { + buf := new(bytes.Buffer) + if err := proto.MarshalText(buf, newTestMessage()); err != nil { + t.Fatalf("proto.MarshalText: %v", err) + } + s := buf.String() + if s != text { + t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v===\n", s, text) + } +} + +func TestMarshalTextCustomMessage(t *testing.T) { + buf := new(bytes.Buffer) + if err := proto.MarshalText(buf, &textMessage{}); err != nil { + t.Fatalf("proto.MarshalText: %v", err) + } + s := buf.String() + if s != "custom" { + t.Errorf("Got %q, expected %q", s, "custom") + } +} +func TestMarshalTextNil(t *testing.T) { + want := "" + tests := []proto.Message{nil, (*pb.MyMessage)(nil)} + for i, test := range tests { + buf := new(bytes.Buffer) + if err := proto.MarshalText(buf, test); err != nil { + t.Fatal(err) + } + if got := buf.String(); got != want { + t.Errorf("%d: got %q want %q", i, got, want) + } + } +} + +func TestMarshalTextUnknownEnum(t *testing.T) { + // The Color enum only specifies values 0-2. + m := &pb.MyMessage{Bikeshed: pb.MyMessage_Color(3).Enum()} + got := m.String() + const want = `bikeshed:3 ` + if got != want { + t.Errorf("\n got %q\nwant %q", got, want) + } +} + +func TestTextOneof(t *testing.T) { + tests := []struct { + m proto.Message + want string + }{ + // zero message + {&pb.Communique{}, ``}, + // scalar field + {&pb.Communique{Union: &pb.Communique_Number{4}}, `number:4`}, + // message field + {&pb.Communique{Union: &pb.Communique_Msg{ + &pb.Strings{StringField: proto.String("why hello!")}, + }}, `msg:`}, + // bad oneof (should not panic) + {&pb.Communique{Union: &pb.Communique_Msg{nil}}, `msg:/* nil */`}, + } + for _, test := range tests { + got := strings.TrimSpace(test.m.String()) + if got != test.want { + t.Errorf("\n got %s\nwant %s", got, test.want) + } + } +} + +func BenchmarkMarshalTextBuffered(b *testing.B) { + buf := new(bytes.Buffer) + m := newTestMessage() + for i := 0; i < b.N; i++ { + buf.Reset() + proto.MarshalText(buf, m) + } +} + +func BenchmarkMarshalTextUnbuffered(b *testing.B) { + w := ioutil.Discard + m := newTestMessage() + for i := 0; i < b.N; i++ { + proto.MarshalText(w, m) + } +} + +func compact(src string) string { + // s/[ \n]+/ /g; s/ $//; + dst := make([]byte, len(src)) + space, comment := false, false + j := 0 + for i := 0; i < len(src); i++ { + if strings.HasPrefix(src[i:], "/*") { + comment = true + i++ + continue + } + if comment && strings.HasPrefix(src[i:], "*/") { + comment = false + i++ + continue + } + if comment { + continue + } + c := src[i] + if c == ' ' || c == '\n' { + space = true + continue + } + if j > 0 && (dst[j-1] == ':' || dst[j-1] == '<' || dst[j-1] == '{') { + space = false + } + if c == '{' { + space = false + } + if space { + dst[j] = ' ' + j++ + space = false + } + dst[j] = c + j++ + } + if space { + dst[j] = ' ' + j++ + } + return string(dst[0:j]) +} + +var compactText = compact(text) + +func TestCompactText(t *testing.T) { + s := proto.CompactTextString(newTestMessage()) + if s != compactText { + t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v\n===\n", s, compactText) + } +} + +func TestStringEscaping(t *testing.T) { + testCases := []struct { + in *pb.Strings + out string + }{ + { + // Test data from C++ test (TextFormatTest.StringEscape). + // Single divergence: we don't escape apostrophes. + &pb.Strings{StringField: proto.String("\"A string with ' characters \n and \r newlines and \t tabs and \001 slashes \\ and multiple spaces")}, + "string_field: \"\\\"A string with ' characters \\n and \\r newlines and \\t tabs and \\001 slashes \\\\ and multiple spaces\"\n", + }, + { + // Test data from the same C++ test. + &pb.Strings{StringField: proto.String("\350\260\267\346\255\214")}, + "string_field: \"\\350\\260\\267\\346\\255\\214\"\n", + }, + { + // Some UTF-8. + &pb.Strings{StringField: proto.String("\x00\x01\xff\x81")}, + `string_field: "\000\001\377\201"` + "\n", + }, + } + + for i, tc := range testCases { + var buf bytes.Buffer + if err := proto.MarshalText(&buf, tc.in); err != nil { + t.Errorf("proto.MarsalText: %v", err) + continue + } + s := buf.String() + if s != tc.out { + t.Errorf("#%d: Got:\n%s\nExpected:\n%s\n", i, s, tc.out) + continue + } + + // Check round-trip. + pb := new(pb.Strings) + if err := proto.UnmarshalText(s, pb); err != nil { + t.Errorf("#%d: UnmarshalText: %v", i, err) + continue + } + if !proto.Equal(pb, tc.in) { + t.Errorf("#%d: Round-trip failed:\nstart: %v\n end: %v", i, tc.in, pb) + } + } +} + +// A limitedWriter accepts some output before it fails. +// This is a proxy for something like a nearly-full or imminently-failing disk, +// or a network connection that is about to die. +type limitedWriter struct { + b bytes.Buffer + limit int +} + +var outOfSpace = errors.New("proto: insufficient space") + +func (w *limitedWriter) Write(p []byte) (n int, err error) { + var avail = w.limit - w.b.Len() + if avail <= 0 { + return 0, outOfSpace + } + if len(p) <= avail { + return w.b.Write(p) + } + n, _ = w.b.Write(p[:avail]) + return n, outOfSpace +} + +func TestMarshalTextFailing(t *testing.T) { + // Try lots of different sizes to exercise more error code-paths. + for lim := 0; lim < len(text); lim++ { + buf := new(limitedWriter) + buf.limit = lim + err := proto.MarshalText(buf, newTestMessage()) + // We expect a certain error, but also some partial results in the buffer. + if err != outOfSpace { + t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v===\n", err, outOfSpace) + } + s := buf.b.String() + x := text[:buf.limit] + if s != x { + t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v===\n", s, x) + } + } +} + +func TestFloats(t *testing.T) { + tests := []struct { + f float64 + want string + }{ + {0, "0"}, + {4.7, "4.7"}, + {math.Inf(1), "inf"}, + {math.Inf(-1), "-inf"}, + {math.NaN(), "nan"}, + } + for _, test := range tests { + msg := &pb.FloatingPoint{F: &test.f} + got := strings.TrimSpace(msg.String()) + want := `f:` + test.want + if got != want { + t.Errorf("f=%f: got %q, want %q", test.f, got, want) + } + } +} + +func TestRepeatedNilText(t *testing.T) { + m := &pb.MessageList{ + Message: []*pb.MessageList_Message{ + nil, + &pb.MessageList_Message{ + Name: proto.String("Horse"), + }, + nil, + }, + } + want := `Message +Message { + name: "Horse" +} +Message +` + if s := proto.MarshalTextString(m); s != want { + t.Errorf(" got: %s\nwant: %s", s, want) + } +} + +func TestProto3Text(t *testing.T) { + tests := []struct { + m proto.Message + want string + }{ + // zero message + {&proto3pb.Message{}, ``}, + // zero message except for an empty byte slice + {&proto3pb.Message{Data: []byte{}}, ``}, + // trivial case + {&proto3pb.Message{Name: "Rob", HeightInCm: 175}, `name:"Rob" height_in_cm:175`}, + // empty map + {&pb.MessageWithMap{}, ``}, + // non-empty map; map format is the same as a repeated struct, + // and they are sorted by key (numerically for numeric keys). + { + &pb.MessageWithMap{NameMapping: map[int32]string{ + -1: "Negatory", + 7: "Lucky", + 1234: "Feist", + 6345789: "Otis", + }}, + `name_mapping: ` + + `name_mapping: ` + + `name_mapping: ` + + `name_mapping:`, + }, + // map with nil value; not well-defined, but we shouldn't crash + { + &pb.MessageWithMap{MsgMapping: map[int64]*pb.FloatingPoint{7: nil}}, + `msg_mapping:`, + }, + } + for _, test := range tests { + got := strings.TrimSpace(test.m.String()) + if got != test.want { + t.Errorf("\n got %s\nwant %s", got, test.want) + } + } +} diff --git a/vendor/github.com/golang/protobuf/ptypes/any.go b/vendor/github.com/golang/protobuf/ptypes/any.go index 89e07ae19..b2af97f4a 100644 --- a/vendor/github.com/golang/protobuf/ptypes/any.go +++ b/vendor/github.com/golang/protobuf/ptypes/any.go @@ -51,6 +51,9 @@ const googleApis = "type.googleapis.com/" // function. AnyMessageName is provided for less common use cases like filtering a // sequence of Any messages based on a set of allowed message type names. func AnyMessageName(any *any.Any) (string, error) { + if any == nil { + return "", fmt.Errorf("message is nil") + } slash := strings.LastIndex(any.TypeUrl, "/") if slash < 0 { return "", fmt.Errorf("message type url %q is invalid", any.TypeUrl) diff --git a/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go b/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go index f2c6906b9..f34601723 100644 --- a/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go +++ b/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go @@ -1,12 +1,11 @@ -// Code generated by protoc-gen-go. -// source: github.com/golang/protobuf/ptypes/any/any.proto -// DO NOT EDIT! +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: google/protobuf/any.proto /* Package any is a generated protocol buffer package. It is generated from these files: - github.com/golang/protobuf/ptypes/any/any.proto + google/protobuf/any.proto It has these top-level messages: Any @@ -63,6 +62,16 @@ const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package // any.Unpack(foo) // ... // +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := ptypes.MarshalAny(foo) +// ... +// foo := &pb.Foo{} +// if err := ptypes.UnmarshalAny(any, foo); err != nil { +// ... +// } +// // The pack methods provided by protobuf library will by default use // 'type.googleapis.com/full.type.name' as the type URL and the unpack // methods only use the fully qualified type name after the last '/' @@ -132,24 +141,38 @@ func (*Any) ProtoMessage() {} func (*Any) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } func (*Any) XXX_WellKnownType() string { return "Any" } +func (m *Any) GetTypeUrl() string { + if m != nil { + return m.TypeUrl + } + return "" +} + +func (m *Any) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + func init() { proto.RegisterType((*Any)(nil), "google.protobuf.Any") } -func init() { proto.RegisterFile("github.com/golang/protobuf/ptypes/any/any.proto", fileDescriptor0) } +func init() { proto.RegisterFile("google/protobuf/any.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 187 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xd2, 0x4f, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x2f, 0x28, - 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0x28, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x4f, 0xcc, - 0xab, 0x04, 0x61, 0x3d, 0xb0, 0xb8, 0x10, 0x7f, 0x7a, 0x7e, 0x7e, 0x7a, 0x4e, 0xaa, 0x1e, 0x4c, - 0x95, 0x92, 0x19, 0x17, 0xb3, 0x63, 0x5e, 0xa5, 0x90, 0x24, 0x17, 0x07, 0x48, 0x79, 0x7c, 0x69, - 0x51, 0x8e, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x3b, 0x88, 0x1f, 0x5a, 0x94, 0x23, 0x24, - 0xc2, 0xc5, 0x5a, 0x96, 0x98, 0x53, 0x9a, 0x2a, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0x13, 0x04, 0xe1, - 0x38, 0x15, 0x71, 0x09, 0x27, 0xe7, 0xe7, 0xea, 0xa1, 0x19, 0xe7, 0xc4, 0xe1, 0x98, 0x57, 0x19, - 0x00, 0xe2, 0x04, 0x30, 0x46, 0xa9, 0x12, 0xe5, 0xb8, 0x05, 0x8c, 0x8c, 0x8b, 0x98, 0x98, 0xdd, - 0x03, 0x9c, 0x56, 0x31, 0xc9, 0xb9, 0x43, 0x4c, 0x0b, 0x80, 0xaa, 0xd2, 0x0b, 0x4f, 0xcd, 0xc9, - 0xf1, 0xce, 0xcb, 0x2f, 0xcf, 0x0b, 0x01, 0xa9, 0x4e, 0x62, 0x03, 0x6b, 0x37, 0x06, 0x04, 0x00, - 0x00, 0xff, 0xff, 0xc6, 0x4d, 0x03, 0x23, 0xf6, 0x00, 0x00, 0x00, + // 185 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4c, 0xcf, 0xcf, 0x4f, + 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcc, 0xab, 0xd4, + 0x03, 0x73, 0x84, 0xf8, 0x21, 0x52, 0x7a, 0x30, 0x29, 0x25, 0x33, 0x2e, 0x66, 0xc7, 0xbc, 0x4a, + 0x21, 0x49, 0x2e, 0x8e, 0x92, 0xca, 0x82, 0xd4, 0xf8, 0xd2, 0xa2, 0x1c, 0x09, 0x46, 0x05, 0x46, + 0x0d, 0xce, 0x20, 0x76, 0x10, 0x3f, 0xb4, 0x28, 0x47, 0x48, 0x84, 0x8b, 0xb5, 0x2c, 0x31, 0xa7, + 0x34, 0x55, 0x82, 0x49, 0x81, 0x51, 0x83, 0x27, 0x08, 0xc2, 0x71, 0xca, 0xe7, 0x12, 0x4e, 0xce, + 0xcf, 0xd5, 0x43, 0x33, 0xce, 0x89, 0xc3, 0x31, 0xaf, 0x32, 0x00, 0xc4, 0x09, 0x60, 0x8c, 0x52, + 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, + 0x4b, 0x47, 0xb8, 0xa8, 0x00, 0x64, 0x7a, 0x31, 0xc8, 0x61, 0x8b, 0x98, 0x98, 0xdd, 0x03, 0x9c, + 0x56, 0x31, 0xc9, 0xb9, 0x43, 0x8c, 0x0a, 0x80, 0x2a, 0xd1, 0x0b, 0x4f, 0xcd, 0xc9, 0xf1, 0xce, + 0xcb, 0x2f, 0xcf, 0x0b, 0x01, 0x29, 0x4d, 0x62, 0x03, 0xeb, 0x35, 0x06, 0x04, 0x00, 0x00, 0xff, + 0xff, 0x13, 0xf8, 0xe8, 0x42, 0xdd, 0x00, 0x00, 0x00, } diff --git a/vendor/github.com/golang/protobuf/ptypes/any/any.proto b/vendor/github.com/golang/protobuf/ptypes/any/any.proto index 81dcf46cc..c74866762 100644 --- a/vendor/github.com/golang/protobuf/ptypes/any/any.proto +++ b/vendor/github.com/golang/protobuf/ptypes/any/any.proto @@ -37,7 +37,6 @@ option go_package = "github.com/golang/protobuf/ptypes/any"; option java_package = "com.google.protobuf"; option java_outer_classname = "AnyProto"; option java_multiple_files = true; -option java_generate_equals_and_hash = true; option objc_class_prefix = "GPB"; // `Any` contains an arbitrary serialized protocol buffer message along with a @@ -75,6 +74,16 @@ option objc_class_prefix = "GPB"; // any.Unpack(foo) // ... // +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := ptypes.MarshalAny(foo) +// ... +// foo := &pb.Foo{} +// if err := ptypes.UnmarshalAny(any, foo); err != nil { +// ... +// } +// // The pack methods provided by protobuf library will by default use // 'type.googleapis.com/full.type.name' as the type URL and the unpack // methods only use the fully qualified type name after the last '/' diff --git a/vendor/github.com/golang/protobuf/ptypes/any_test.go b/vendor/github.com/golang/protobuf/ptypes/any_test.go new file mode 100644 index 000000000..ed675b489 --- /dev/null +++ b/vendor/github.com/golang/protobuf/ptypes/any_test.go @@ -0,0 +1,113 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package ptypes + +import ( + "testing" + + "github.com/golang/protobuf/proto" + pb "github.com/golang/protobuf/protoc-gen-go/descriptor" + "github.com/golang/protobuf/ptypes/any" +) + +func TestMarshalUnmarshal(t *testing.T) { + orig := &any.Any{Value: []byte("test")} + + packed, err := MarshalAny(orig) + if err != nil { + t.Errorf("MarshalAny(%+v): got: _, %v exp: _, nil", orig, err) + } + + unpacked := &any.Any{} + err = UnmarshalAny(packed, unpacked) + if err != nil || !proto.Equal(unpacked, orig) { + t.Errorf("got: %v, %+v; want nil, %+v", err, unpacked, orig) + } +} + +func TestIs(t *testing.T) { + a, err := MarshalAny(&pb.FileDescriptorProto{}) + if err != nil { + t.Fatal(err) + } + if Is(a, &pb.DescriptorProto{}) { + t.Error("FileDescriptorProto is not a DescriptorProto, but Is says it is") + } + if !Is(a, &pb.FileDescriptorProto{}) { + t.Error("FileDescriptorProto is indeed a FileDescriptorProto, but Is says it is not") + } +} + +func TestIsDifferentUrlPrefixes(t *testing.T) { + m := &pb.FileDescriptorProto{} + a := &any.Any{TypeUrl: "foo/bar/" + proto.MessageName(m)} + if !Is(a, m) { + t.Errorf("message with type url %q didn't satisfy Is for type %q", a.TypeUrl, proto.MessageName(m)) + } +} + +func TestUnmarshalDynamic(t *testing.T) { + want := &pb.FileDescriptorProto{Name: proto.String("foo")} + a, err := MarshalAny(want) + if err != nil { + t.Fatal(err) + } + var got DynamicAny + if err := UnmarshalAny(a, &got); err != nil { + t.Fatal(err) + } + if !proto.Equal(got.Message, want) { + t.Errorf("invalid result from UnmarshalAny, got %q want %q", got.Message, want) + } +} + +func TestEmpty(t *testing.T) { + want := &pb.FileDescriptorProto{} + a, err := MarshalAny(want) + if err != nil { + t.Fatal(err) + } + got, err := Empty(a) + if err != nil { + t.Fatal(err) + } + if !proto.Equal(got, want) { + t.Errorf("unequal empty message, got %q, want %q", got, want) + } + + // that's a valid type_url for a message which shouldn't be linked into this + // test binary. We want an error. + a.TypeUrl = "type.googleapis.com/google.protobuf.FieldMask" + if _, err := Empty(a); err == nil { + t.Errorf("got no error for an attempt to create a message of type %q, which shouldn't be linked in", a.TypeUrl) + } +} diff --git a/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go b/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go index 569748346..b2410a098 100644 --- a/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go +++ b/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go @@ -1,12 +1,11 @@ -// Code generated by protoc-gen-go. -// source: github.com/golang/protobuf/ptypes/duration/duration.proto -// DO NOT EDIT! +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: google/protobuf/duration.proto /* Package duration is a generated protocol buffer package. It is generated from these files: - github.com/golang/protobuf/ptypes/duration/duration.proto + google/protobuf/duration.proto It has these top-level messages: Duration @@ -35,6 +34,8 @@ const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package // two Timestamp values is a Duration and it can be added or subtracted // from a Timestamp. Range is approximately +-10,000 years. // +// # Examples +// // Example 1: Compute Duration from two Timestamps in pseudo code. // // Timestamp start = ...; @@ -69,10 +70,27 @@ const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package // end.nanos -= 1000000000; // } // +// Example 3: Compute Duration from datetime.timedelta in Python. +// +// td = datetime.timedelta(days=3, minutes=10) +// duration = Duration() +// duration.FromTimedelta(td) +// +// # JSON Mapping +// +// In JSON format, the Duration type is encoded as a string rather than an +// object, where the string ends in the suffix "s" (indicating seconds) and +// is preceded by the number of seconds, with nanoseconds expressed as +// fractional seconds. For example, 3 seconds with 0 nanoseconds should be +// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should +// be expressed in JSON format as "3.000000001s", and 3 seconds and 1 +// microsecond should be expressed in JSON format as "3.000001s". +// // type Duration struct { // Signed seconds of the span of time. Must be from -315,576,000,000 - // to +315,576,000,000 inclusive. + // to +315,576,000,000 inclusive. Note: these bounds are computed from: + // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years Seconds int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"` // Signed fractions of a second at nanosecond resolution of the span // of time. Durations less than one second are represented with a 0 @@ -89,26 +107,38 @@ func (*Duration) ProtoMessage() {} func (*Duration) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } func (*Duration) XXX_WellKnownType() string { return "Duration" } +func (m *Duration) GetSeconds() int64 { + if m != nil { + return m.Seconds + } + return 0 +} + +func (m *Duration) GetNanos() int32 { + if m != nil { + return m.Nanos + } + return 0 +} + func init() { proto.RegisterType((*Duration)(nil), "google.protobuf.Duration") } -func init() { - proto.RegisterFile("github.com/golang/protobuf/ptypes/duration/duration.proto", fileDescriptor0) -} +func init() { proto.RegisterFile("google/protobuf/duration.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 189 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xb2, 0x4c, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x2f, 0x28, - 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0x28, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x4f, 0x29, - 0x2d, 0x4a, 0x2c, 0xc9, 0xcc, 0xcf, 0x83, 0x33, 0xf4, 0xc0, 0x2a, 0x84, 0xf8, 0xd3, 0xf3, 0xf3, - 0xd3, 0x73, 0x52, 0xf5, 0x60, 0xea, 0x95, 0xac, 0xb8, 0x38, 0x5c, 0xa0, 0x4a, 0x84, 0x24, 0xb8, - 0xd8, 0x8b, 0x53, 0x93, 0xf3, 0xf3, 0x52, 0x8a, 0x25, 0x18, 0x15, 0x18, 0x35, 0x98, 0x83, 0x60, - 0x5c, 0x21, 0x11, 0x2e, 0xd6, 0xbc, 0xc4, 0xbc, 0xfc, 0x62, 0x09, 0x26, 0x05, 0x46, 0x0d, 0xd6, - 0x20, 0x08, 0xc7, 0xa9, 0x86, 0x4b, 0x38, 0x39, 0x3f, 0x57, 0x0f, 0xcd, 0x48, 0x27, 0x5e, 0x98, - 0x81, 0x01, 0x20, 0x91, 0x00, 0xc6, 0x28, 0x2d, 0xe2, 0xdd, 0xbb, 0x80, 0x91, 0x71, 0x11, 0x13, - 0xb3, 0x7b, 0x80, 0xd3, 0x2a, 0x26, 0x39, 0x77, 0x88, 0xb9, 0x01, 0x50, 0xa5, 0x7a, 0xe1, 0xa9, - 0x39, 0x39, 0xde, 0x79, 0xf9, 0xe5, 0x79, 0x21, 0x20, 0x2d, 0x49, 0x6c, 0x60, 0x33, 0x8c, 0x01, - 0x01, 0x00, 0x00, 0xff, 0xff, 0x62, 0xfb, 0xb1, 0x51, 0x0e, 0x01, 0x00, 0x00, + // 190 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xcf, 0xcf, 0x4f, + 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0x29, 0x2d, 0x4a, + 0x2c, 0xc9, 0xcc, 0xcf, 0xd3, 0x03, 0x8b, 0x08, 0xf1, 0x43, 0xe4, 0xf5, 0x60, 0xf2, 0x4a, 0x56, + 0x5c, 0x1c, 0x2e, 0x50, 0x25, 0x42, 0x12, 0x5c, 0xec, 0xc5, 0xa9, 0xc9, 0xf9, 0x79, 0x29, 0xc5, + 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0xcc, 0x41, 0x30, 0xae, 0x90, 0x08, 0x17, 0x6b, 0x5e, 0x62, 0x5e, + 0x7e, 0xb1, 0x04, 0x93, 0x02, 0xa3, 0x06, 0x6b, 0x10, 0x84, 0xe3, 0x54, 0xc3, 0x25, 0x9c, 0x9c, + 0x9f, 0xab, 0x87, 0x66, 0xa4, 0x13, 0x2f, 0xcc, 0xc0, 0x00, 0x90, 0x48, 0x00, 0x63, 0x94, 0x56, + 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x7a, 0x7e, 0x4e, 0x62, 0x5e, + 0x3a, 0xc2, 0x7d, 0x05, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x70, 0x67, 0xfe, 0x60, 0x64, 0x5c, 0xc4, + 0xc4, 0xec, 0x1e, 0xe0, 0xb4, 0x8a, 0x49, 0xce, 0x1d, 0x62, 0x6e, 0x00, 0x54, 0xa9, 0x5e, 0x78, + 0x6a, 0x4e, 0x8e, 0x77, 0x5e, 0x7e, 0x79, 0x5e, 0x08, 0x48, 0x4b, 0x12, 0x1b, 0xd8, 0x0c, 0x63, + 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdc, 0x84, 0x30, 0xff, 0xf3, 0x00, 0x00, 0x00, } diff --git a/vendor/github.com/golang/protobuf/ptypes/duration/duration.proto b/vendor/github.com/golang/protobuf/ptypes/duration/duration.proto index 96c1796d6..975fce41a 100644 --- a/vendor/github.com/golang/protobuf/ptypes/duration/duration.proto +++ b/vendor/github.com/golang/protobuf/ptypes/duration/duration.proto @@ -33,11 +33,11 @@ syntax = "proto3"; package google.protobuf; option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option cc_enable_arenas = true; option go_package = "github.com/golang/protobuf/ptypes/duration"; option java_package = "com.google.protobuf"; option java_outer_classname = "DurationProto"; option java_multiple_files = true; -option java_generate_equals_and_hash = true; option objc_class_prefix = "GPB"; // A Duration represents a signed, fixed-length span of time represented @@ -47,6 +47,8 @@ option objc_class_prefix = "GPB"; // two Timestamp values is a Duration and it can be added or subtracted // from a Timestamp. Range is approximately +-10,000 years. // +// # Examples +// // Example 1: Compute Duration from two Timestamps in pseudo code. // // Timestamp start = ...; @@ -81,11 +83,28 @@ option objc_class_prefix = "GPB"; // end.nanos -= 1000000000; // } // +// Example 3: Compute Duration from datetime.timedelta in Python. +// +// td = datetime.timedelta(days=3, minutes=10) +// duration = Duration() +// duration.FromTimedelta(td) +// +// # JSON Mapping +// +// In JSON format, the Duration type is encoded as a string rather than an +// object, where the string ends in the suffix "s" (indicating seconds) and +// is preceded by the number of seconds, with nanoseconds expressed as +// fractional seconds. For example, 3 seconds with 0 nanoseconds should be +// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should +// be expressed in JSON format as "3.000000001s", and 3 seconds and 1 +// microsecond should be expressed in JSON format as "3.000001s". +// // message Duration { // Signed seconds of the span of time. Must be from -315,576,000,000 - // to +315,576,000,000 inclusive. + // to +315,576,000,000 inclusive. Note: these bounds are computed from: + // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years int64 seconds = 1; // Signed fractions of a second at nanosecond resolution of the span diff --git a/vendor/github.com/golang/protobuf/ptypes/duration_test.go b/vendor/github.com/golang/protobuf/ptypes/duration_test.go new file mode 100644 index 000000000..e00491a34 --- /dev/null +++ b/vendor/github.com/golang/protobuf/ptypes/duration_test.go @@ -0,0 +1,121 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package ptypes + +import ( + "math" + "testing" + "time" + + "github.com/golang/protobuf/proto" + durpb "github.com/golang/protobuf/ptypes/duration" +) + +const ( + minGoSeconds = math.MinInt64 / int64(1e9) + maxGoSeconds = math.MaxInt64 / int64(1e9) +) + +var durationTests = []struct { + proto *durpb.Duration + isValid bool + inRange bool + dur time.Duration +}{ + // The zero duration. + {&durpb.Duration{Seconds: 0, Nanos: 0}, true, true, 0}, + // Some ordinary non-zero durations. + {&durpb.Duration{Seconds: 100, Nanos: 0}, true, true, 100 * time.Second}, + {&durpb.Duration{Seconds: -100, Nanos: 0}, true, true, -100 * time.Second}, + {&durpb.Duration{Seconds: 100, Nanos: 987}, true, true, 100*time.Second + 987}, + {&durpb.Duration{Seconds: -100, Nanos: -987}, true, true, -(100*time.Second + 987)}, + // The largest duration representable in Go. + {&durpb.Duration{Seconds: maxGoSeconds, Nanos: int32(math.MaxInt64 - 1e9*maxGoSeconds)}, true, true, math.MaxInt64}, + // The smallest duration representable in Go. + {&durpb.Duration{Seconds: minGoSeconds, Nanos: int32(math.MinInt64 - 1e9*minGoSeconds)}, true, true, math.MinInt64}, + {nil, false, false, 0}, + {&durpb.Duration{Seconds: -100, Nanos: 987}, false, false, 0}, + {&durpb.Duration{Seconds: 100, Nanos: -987}, false, false, 0}, + {&durpb.Duration{Seconds: math.MinInt64, Nanos: 0}, false, false, 0}, + {&durpb.Duration{Seconds: math.MaxInt64, Nanos: 0}, false, false, 0}, + // The largest valid duration. + {&durpb.Duration{Seconds: maxSeconds, Nanos: 1e9 - 1}, true, false, 0}, + // The smallest valid duration. + {&durpb.Duration{Seconds: minSeconds, Nanos: -(1e9 - 1)}, true, false, 0}, + // The smallest invalid duration above the valid range. + {&durpb.Duration{Seconds: maxSeconds + 1, Nanos: 0}, false, false, 0}, + // The largest invalid duration below the valid range. + {&durpb.Duration{Seconds: minSeconds - 1, Nanos: -(1e9 - 1)}, false, false, 0}, + // One nanosecond past the largest duration representable in Go. + {&durpb.Duration{Seconds: maxGoSeconds, Nanos: int32(math.MaxInt64-1e9*maxGoSeconds) + 1}, true, false, 0}, + // One nanosecond past the smallest duration representable in Go. + {&durpb.Duration{Seconds: minGoSeconds, Nanos: int32(math.MinInt64-1e9*minGoSeconds) - 1}, true, false, 0}, + // One second past the largest duration representable in Go. + {&durpb.Duration{Seconds: maxGoSeconds + 1, Nanos: int32(math.MaxInt64 - 1e9*maxGoSeconds)}, true, false, 0}, + // One second past the smallest duration representable in Go. + {&durpb.Duration{Seconds: minGoSeconds - 1, Nanos: int32(math.MinInt64 - 1e9*minGoSeconds)}, true, false, 0}, +} + +func TestValidateDuration(t *testing.T) { + for _, test := range durationTests { + err := validateDuration(test.proto) + gotValid := (err == nil) + if gotValid != test.isValid { + t.Errorf("validateDuration(%v) = %t, want %t", test.proto, gotValid, test.isValid) + } + } +} + +func TestDuration(t *testing.T) { + for _, test := range durationTests { + got, err := Duration(test.proto) + gotOK := (err == nil) + wantOK := test.isValid && test.inRange + if gotOK != wantOK { + t.Errorf("Duration(%v) ok = %t, want %t", test.proto, gotOK, wantOK) + } + if err == nil && got != test.dur { + t.Errorf("Duration(%v) = %v, want %v", test.proto, got, test.dur) + } + } +} + +func TestDurationProto(t *testing.T) { + for _, test := range durationTests { + if test.isValid && test.inRange { + got := DurationProto(test.dur) + if !proto.Equal(got, test.proto) { + t.Errorf("DurationProto(%v) = %v, want %v", test.dur, got, test.proto) + } + } + } +} diff --git a/vendor/github.com/golang/protobuf/ptypes/regen.sh b/vendor/github.com/golang/protobuf/ptypes/regen.sh index 2a5b4e8bd..b50a9414a 100755 --- a/vendor/github.com/golang/protobuf/ptypes/regen.sh +++ b/vendor/github.com/golang/protobuf/ptypes/regen.sh @@ -8,14 +8,7 @@ PKG=github.com/golang/protobuf/ptypes UPSTREAM=https://github.com/google/protobuf UPSTREAM_SUBDIR=src/google/protobuf -PROTO_FILES=' - any.proto - duration.proto - empty.proto - struct.proto - timestamp.proto - wrappers.proto -' +PROTO_FILES=(any duration empty struct timestamp wrappers) function die() { echo 1>&2 $* @@ -36,31 +29,15 @@ pkgdir=$(go list -f '{{.Dir}}' $PKG) echo 1>&2 $pkgdir base=$(echo $pkgdir | sed "s,/$PKG\$,,") echo 1>&2 "base: $base" -cd $base +cd "$base" echo 1>&2 "fetching latest protos... " git clone -q $UPSTREAM $tmpdir -# Pass 1: build mapping from upstream filename to our filename. -declare -A filename_map -for f in $(cd $PKG && find * -name '*.proto'); do - echo -n 1>&2 "looking for latest version of $f... " - up=$(cd $tmpdir/$UPSTREAM_SUBDIR && find * -name $(basename $f) | grep -v /testdata/) - echo 1>&2 $up - if [ $(echo $up | wc -w) != "1" ]; then - die "not exactly one match" - fi - filename_map[$up]=$f -done -# Pass 2: copy files -for up in "${!filename_map[@]}"; do - f=${filename_map[$up]} - shortname=$(basename $f | sed 's,\.proto$,,') - cp $tmpdir/$UPSTREAM_SUBDIR/$up $PKG/$f + +for file in ${PROTO_FILES[@]}; do + echo 1>&2 "* $file" + protoc --go_out=. -I$tmpdir/src $tmpdir/src/google/protobuf/$file.proto || die + cp $tmpdir/src/google/protobuf/$file.proto $PKG/$file done -# Run protoc once per package. -for dir in $(find $PKG -name '*.proto' | xargs dirname | sort | uniq); do - echo 1>&2 "* $dir" - protoc --go_out=. $dir/*.proto -done echo 1>&2 "All OK" diff --git a/vendor/github.com/golang/protobuf/ptypes/timestamp.go b/vendor/github.com/golang/protobuf/ptypes/timestamp.go index 1b3657622..47f10dbc2 100644 --- a/vendor/github.com/golang/protobuf/ptypes/timestamp.go +++ b/vendor/github.com/golang/protobuf/ptypes/timestamp.go @@ -99,6 +99,15 @@ func Timestamp(ts *tspb.Timestamp) (time.Time, error) { return t, validateTimestamp(ts) } +// TimestampNow returns a google.protobuf.Timestamp for the current time. +func TimestampNow() *tspb.Timestamp { + ts, err := TimestampProto(time.Now()) + if err != nil { + panic("ptypes: time.Now() out of Timestamp range") + } + return ts +} + // TimestampProto converts the time.Time to a google.protobuf.Timestamp proto. // It returns an error if the resulting Timestamp is invalid. func TimestampProto(t time.Time) (*tspb.Timestamp, error) { diff --git a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go b/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go index ffcc51594..e23e4a25d 100644 --- a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go +++ b/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go @@ -1,12 +1,11 @@ -// Code generated by protoc-gen-go. -// source: github.com/golang/protobuf/ptypes/timestamp/timestamp.proto -// DO NOT EDIT! +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: google/protobuf/timestamp.proto /* Package timestamp is a generated protocol buffer package. It is generated from these files: - github.com/golang/protobuf/ptypes/timestamp/timestamp.proto + google/protobuf/timestamp.proto It has these top-level messages: Timestamp @@ -40,6 +39,8 @@ const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package // and from RFC 3339 date strings. // See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). // +// # Examples +// // Example 1: Compute Timestamp from POSIX `time()`. // // Timestamp timestamp; @@ -77,15 +78,36 @@ const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package // // Example 5: Compute Timestamp from current time in Python. // -// now = time.time() -// seconds = int(now) -// nanos = int((now - seconds) * 10**9) -// timestamp = Timestamp(seconds=seconds, nanos=nanos) +// timestamp = Timestamp() +// timestamp.GetCurrentTime() +// +// # JSON Mapping +// +// In JSON format, the Timestamp type is encoded as a string in the +// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the +// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" +// where {year} is always expressed using four digits while {month}, {day}, +// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional +// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), +// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone +// is required, though only UTC (as indicated by "Z") is presently supported. +// +// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past +// 01:30 UTC on January 15, 2017. +// +// In JavaScript, one can convert a Date object to this format using the +// standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] +// method. In Python, a standard `datetime.datetime` object can be converted +// to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) +// with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one +// can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( +// http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) +// to obtain a formatter capable of generating timestamps in this format. // // type Timestamp struct { // Represents seconds of UTC time since Unix epoch - // 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to + // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to // 9999-12-31T23:59:59Z inclusive. Seconds int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"` // Non-negative fractions of a second at nanosecond resolution. Negative @@ -101,27 +123,38 @@ func (*Timestamp) ProtoMessage() {} func (*Timestamp) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } func (*Timestamp) XXX_WellKnownType() string { return "Timestamp" } +func (m *Timestamp) GetSeconds() int64 { + if m != nil { + return m.Seconds + } + return 0 +} + +func (m *Timestamp) GetNanos() int32 { + if m != nil { + return m.Nanos + } + return 0 +} + func init() { proto.RegisterType((*Timestamp)(nil), "google.protobuf.Timestamp") } -func init() { - proto.RegisterFile("github.com/golang/protobuf/ptypes/timestamp/timestamp.proto", fileDescriptor0) -} +func init() { proto.RegisterFile("google/protobuf/timestamp.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 194 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xb2, 0x4e, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x2f, 0x28, - 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0x28, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2f, 0xc9, - 0xcc, 0x4d, 0x2d, 0x2e, 0x49, 0xcc, 0x2d, 0x40, 0xb0, 0xf4, 0xc0, 0x6a, 0x84, 0xf8, 0xd3, 0xf3, - 0xf3, 0xd3, 0x73, 0x52, 0xf5, 0x60, 0x3a, 0x94, 0xac, 0xb9, 0x38, 0x43, 0x60, 0x6a, 0x84, 0x24, - 0xb8, 0xd8, 0x8b, 0x53, 0x93, 0xf3, 0xf3, 0x52, 0x8a, 0x25, 0x18, 0x15, 0x18, 0x35, 0x98, 0x83, - 0x60, 0x5c, 0x21, 0x11, 0x2e, 0xd6, 0xbc, 0xc4, 0xbc, 0xfc, 0x62, 0x09, 0x26, 0x05, 0x46, 0x0d, - 0xd6, 0x20, 0x08, 0xc7, 0xa9, 0x91, 0x91, 0x4b, 0x38, 0x39, 0x3f, 0x57, 0x0f, 0xcd, 0x50, 0x27, - 0x3e, 0xb8, 0x91, 0x01, 0x20, 0xa1, 0x00, 0xc6, 0x28, 0x6d, 0x12, 0x1c, 0xbd, 0x80, 0x91, 0xf1, - 0x07, 0x23, 0xe3, 0x22, 0x26, 0x66, 0xf7, 0x00, 0xa7, 0x55, 0x4c, 0x72, 0xee, 0x10, 0xc3, 0x03, - 0xa0, 0xca, 0xf5, 0xc2, 0x53, 0x73, 0x72, 0xbc, 0xf3, 0xf2, 0xcb, 0xf3, 0x42, 0x40, 0xda, 0x92, - 0xd8, 0xc0, 0xe6, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x17, 0x5f, 0xb7, 0xdc, 0x17, 0x01, - 0x00, 0x00, + // 191 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xcf, 0xcf, 0x4f, + 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0xc9, 0xcc, 0x4d, + 0x2d, 0x2e, 0x49, 0xcc, 0x2d, 0xd0, 0x03, 0x0b, 0x09, 0xf1, 0x43, 0x14, 0xe8, 0xc1, 0x14, 0x28, + 0x59, 0x73, 0x71, 0x86, 0xc0, 0xd4, 0x08, 0x49, 0x70, 0xb1, 0x17, 0xa7, 0x26, 0xe7, 0xe7, 0xa5, + 0x14, 0x4b, 0x30, 0x2a, 0x30, 0x6a, 0x30, 0x07, 0xc1, 0xb8, 0x42, 0x22, 0x5c, 0xac, 0x79, 0x89, + 0x79, 0xf9, 0xc5, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0xac, 0x41, 0x10, 0x8e, 0x53, 0x1d, 0x97, 0x70, + 0x72, 0x7e, 0xae, 0x1e, 0x9a, 0x99, 0x4e, 0x7c, 0x70, 0x13, 0x03, 0x40, 0x42, 0x01, 0x8c, 0x51, + 0xda, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, 0x39, 0x89, + 0x79, 0xe9, 0x08, 0x27, 0x16, 0x94, 0x54, 0x16, 0xa4, 0x16, 0x23, 0x5c, 0xfa, 0x83, 0x91, 0x71, + 0x11, 0x13, 0xb3, 0x7b, 0x80, 0xd3, 0x2a, 0x26, 0x39, 0x77, 0x88, 0xc9, 0x01, 0x50, 0xb5, 0x7a, + 0xe1, 0xa9, 0x39, 0x39, 0xde, 0x79, 0xf9, 0xe5, 0x79, 0x21, 0x20, 0x3d, 0x49, 0x6c, 0x60, 0x43, + 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xbc, 0x77, 0x4a, 0x07, 0xf7, 0x00, 0x00, 0x00, } diff --git a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto b/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto index 7992a8588..b7cbd1750 100644 --- a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto +++ b/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto @@ -38,7 +38,6 @@ option go_package = "github.com/golang/protobuf/ptypes/timestamp"; option java_package = "com.google.protobuf"; option java_outer_classname = "TimestampProto"; option java_multiple_files = true; -option java_generate_equals_and_hash = true; option objc_class_prefix = "GPB"; // A Timestamp represents a point in time independent of any time zone @@ -53,6 +52,8 @@ option objc_class_prefix = "GPB"; // and from RFC 3339 date strings. // See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). // +// # Examples +// // Example 1: Compute Timestamp from POSIX `time()`. // // Timestamp timestamp; @@ -90,16 +91,37 @@ option objc_class_prefix = "GPB"; // // Example 5: Compute Timestamp from current time in Python. // -// now = time.time() -// seconds = int(now) -// nanos = int((now - seconds) * 10**9) -// timestamp = Timestamp(seconds=seconds, nanos=nanos) +// timestamp = Timestamp() +// timestamp.GetCurrentTime() +// +// # JSON Mapping +// +// In JSON format, the Timestamp type is encoded as a string in the +// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the +// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" +// where {year} is always expressed using four digits while {month}, {day}, +// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional +// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), +// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone +// is required, though only UTC (as indicated by "Z") is presently supported. +// +// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past +// 01:30 UTC on January 15, 2017. +// +// In JavaScript, one can convert a Date object to this format using the +// standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] +// method. In Python, a standard `datetime.datetime` object can be converted +// to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) +// with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one +// can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( +// http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) +// to obtain a formatter capable of generating timestamps in this format. // // message Timestamp { // Represents seconds of UTC time since Unix epoch - // 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to + // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to // 9999-12-31T23:59:59Z inclusive. int64 seconds = 1; diff --git a/vendor/github.com/golang/protobuf/ptypes/timestamp_test.go b/vendor/github.com/golang/protobuf/ptypes/timestamp_test.go new file mode 100644 index 000000000..6e3c969b9 --- /dev/null +++ b/vendor/github.com/golang/protobuf/ptypes/timestamp_test.go @@ -0,0 +1,153 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package ptypes + +import ( + "math" + "testing" + "time" + + "github.com/golang/protobuf/proto" + tspb "github.com/golang/protobuf/ptypes/timestamp" +) + +var tests = []struct { + ts *tspb.Timestamp + valid bool + t time.Time +}{ + // The timestamp representing the Unix epoch date. + {&tspb.Timestamp{Seconds: 0, Nanos: 0}, true, utcDate(1970, 1, 1)}, + // The smallest representable timestamp. + {&tspb.Timestamp{Seconds: math.MinInt64, Nanos: math.MinInt32}, false, + time.Unix(math.MinInt64, math.MinInt32).UTC()}, + // The smallest representable timestamp with non-negative nanos. + {&tspb.Timestamp{Seconds: math.MinInt64, Nanos: 0}, false, time.Unix(math.MinInt64, 0).UTC()}, + // The earliest valid timestamp. + {&tspb.Timestamp{Seconds: minValidSeconds, Nanos: 0}, true, utcDate(1, 1, 1)}, + //"0001-01-01T00:00:00Z"}, + // The largest representable timestamp. + {&tspb.Timestamp{Seconds: math.MaxInt64, Nanos: math.MaxInt32}, false, + time.Unix(math.MaxInt64, math.MaxInt32).UTC()}, + // The largest representable timestamp with nanos in range. + {&tspb.Timestamp{Seconds: math.MaxInt64, Nanos: 1e9 - 1}, false, + time.Unix(math.MaxInt64, 1e9-1).UTC()}, + // The largest valid timestamp. + {&tspb.Timestamp{Seconds: maxValidSeconds - 1, Nanos: 1e9 - 1}, true, + time.Date(9999, 12, 31, 23, 59, 59, 1e9-1, time.UTC)}, + // The smallest invalid timestamp that is larger than the valid range. + {&tspb.Timestamp{Seconds: maxValidSeconds, Nanos: 0}, false, time.Unix(maxValidSeconds, 0).UTC()}, + // A date before the epoch. + {&tspb.Timestamp{Seconds: -281836800, Nanos: 0}, true, utcDate(1961, 1, 26)}, + // A date after the epoch. + {&tspb.Timestamp{Seconds: 1296000000, Nanos: 0}, true, utcDate(2011, 1, 26)}, + // A date after the epoch, in the middle of the day. + {&tspb.Timestamp{Seconds: 1296012345, Nanos: 940483}, true, + time.Date(2011, 1, 26, 3, 25, 45, 940483, time.UTC)}, +} + +func TestValidateTimestamp(t *testing.T) { + for _, s := range tests { + got := validateTimestamp(s.ts) + if (got == nil) != s.valid { + t.Errorf("validateTimestamp(%v) = %v, want %v", s.ts, got, s.valid) + } + } +} + +func TestTimestamp(t *testing.T) { + for _, s := range tests { + got, err := Timestamp(s.ts) + if (err == nil) != s.valid { + t.Errorf("Timestamp(%v) error = %v, but valid = %t", s.ts, err, s.valid) + } else if s.valid && got != s.t { + t.Errorf("Timestamp(%v) = %v, want %v", s.ts, got, s.t) + } + } + // Special case: a nil Timestamp is an error, but returns the 0 Unix time. + got, err := Timestamp(nil) + want := time.Unix(0, 0).UTC() + if got != want { + t.Errorf("Timestamp(nil) = %v, want %v", got, want) + } + if err == nil { + t.Errorf("Timestamp(nil) error = nil, expected error") + } +} + +func TestTimestampProto(t *testing.T) { + for _, s := range tests { + got, err := TimestampProto(s.t) + if (err == nil) != s.valid { + t.Errorf("TimestampProto(%v) error = %v, but valid = %t", s.t, err, s.valid) + } else if s.valid && !proto.Equal(got, s.ts) { + t.Errorf("TimestampProto(%v) = %v, want %v", s.t, got, s.ts) + } + } + // No corresponding special case here: no time.Time results in a nil Timestamp. +} + +func TestTimestampString(t *testing.T) { + for _, test := range []struct { + ts *tspb.Timestamp + want string + }{ + // Not much testing needed because presumably time.Format is + // well-tested. + {&tspb.Timestamp{Seconds: 0, Nanos: 0}, "1970-01-01T00:00:00Z"}, + {&tspb.Timestamp{Seconds: minValidSeconds - 1, Nanos: 0}, "(timestamp: seconds:-62135596801 before 0001-01-01)"}, + } { + got := TimestampString(test.ts) + if got != test.want { + t.Errorf("TimestampString(%v) = %q, want %q", test.ts, got, test.want) + } + } +} + +func utcDate(year, month, day int) time.Time { + return time.Date(year, time.Month(month), day, 0, 0, 0, 0, time.UTC) +} + +func TestTimestampNow(t *testing.T) { + // Bracket the expected time. + before := time.Now() + ts := TimestampNow() + after := time.Now() + + tm, err := Timestamp(ts) + if err != nil { + t.Errorf("between %v and %v\nTimestampNow() = %v\nwhich is invalid (%v)", before, after, ts, err) + } + if tm.Before(before) || tm.After(after) { + t.Errorf("between %v and %v\nTimestamp(TimestampNow()) = %v", before, after, tm) + } +} diff --git a/vendor/github.com/google/btree/btree.go b/vendor/github.com/google/btree/btree.go index fc5aaaa13..eb74b1d39 100644 --- a/vendor/github.com/google/btree/btree.go +++ b/vendor/github.com/google/btree/btree.go @@ -22,7 +22,7 @@ // See some discussion on the matter here: // http://google-opensource.blogspot.com/2013/01/c-containers-that-save-memory-and-time.html // Note, though, that this project is in no way related to the C++ B-Tree -// implmentation written about there. +// implementation written about there. // // Within this tree, each node contains a slice of items and a (possibly nil) // slice of children. For basic numeric values or raw structs, this can cause @@ -44,7 +44,7 @@ // widely used ordered tree implementation in the Go ecosystem currently. // Its functions, therefore, exactly mirror those of // llrb.LLRB where possible. Unlike gollrb, though, we currently don't -// support storing multiple equivalent values or backwards iteration. +// support storing multiple equivalent values. package btree import ( @@ -52,6 +52,7 @@ import ( "io" "sort" "strings" + "sync" ) // Item represents a single object in the tree. @@ -68,11 +69,17 @@ const ( DefaultFreeListSize = 32 ) +var ( + nilItems = make(items, 16) + nilChildren = make(children, 16) +) + // FreeList represents a free list of btree nodes. By default each // BTree has its own FreeList, but multiple BTrees can share the same // FreeList. -// Two Btrees using the same freelist are not safe for concurrent write access. +// Two Btrees using the same freelist are safe for concurrent write access. type FreeList struct { + mu sync.Mutex freelist []*node } @@ -83,18 +90,25 @@ func NewFreeList(size int) *FreeList { } func (f *FreeList) newNode() (n *node) { + f.mu.Lock() index := len(f.freelist) - 1 if index < 0 { + f.mu.Unlock() return new(node) } - f.freelist, n = f.freelist[:index], f.freelist[index] + n = f.freelist[index] + f.freelist[index] = nil + f.freelist = f.freelist[:index] + f.mu.Unlock() return } func (f *FreeList) freeNode(n *node) { + f.mu.Lock() if len(f.freelist) < cap(f.freelist) { f.freelist = append(f.freelist, n) } + f.mu.Unlock() } // ItemIterator allows callers of Ascend* to iterate in-order over portions of @@ -116,8 +130,8 @@ func NewWithFreeList(degree int, f *FreeList) *BTree { panic("bad degree") } return &BTree{ - degree: degree, - freelist: f, + degree: degree, + cow: ©OnWriteContext{freelist: f}, } } @@ -138,8 +152,8 @@ func (s *items) insertAt(index int, item Item) { // back. func (s *items) removeAt(index int) Item { item := (*s)[index] - (*s)[index] = nil copy((*s)[index:], (*s)[index+1:]) + (*s)[len(*s)-1] = nil *s = (*s)[:len(*s)-1] return item } @@ -153,6 +167,16 @@ func (s *items) pop() (out Item) { return } +// truncate truncates this instance at index so that it contains only the +// first index items. index must be less than or equal to length. +func (s *items) truncate(index int) { + var toClear items + *s, toClear = (*s)[:index], (*s)[index:] + for len(toClear) > 0 { + toClear = toClear[copy(toClear, nilItems):] + } +} + // find returns the index where the given item should be inserted into this // list. 'found' is true if the item already exists in the list at the given // index. @@ -183,8 +207,8 @@ func (s *children) insertAt(index int, n *node) { // back. func (s *children) removeAt(index int) *node { n := (*s)[index] - (*s)[index] = nil copy((*s)[index:], (*s)[index+1:]) + (*s)[len(*s)-1] = nil *s = (*s)[:len(*s)-1] return n } @@ -198,6 +222,16 @@ func (s *children) pop() (out *node) { return } +// truncate truncates this instance at index so that it contains only the +// first index children. index must be less than or equal to length. +func (s *children) truncate(index int) { + var toClear children + *s, toClear = (*s)[:index], (*s)[index:] + for len(toClear) > 0 { + toClear = toClear[copy(toClear, nilChildren):] + } +} + // node is an internal node in a tree. // // It must at all times maintain the invariant that either @@ -206,7 +240,34 @@ func (s *children) pop() (out *node) { type node struct { items items children children - t *BTree + cow *copyOnWriteContext +} + +func (n *node) mutableFor(cow *copyOnWriteContext) *node { + if n.cow == cow { + return n + } + out := cow.newNode() + if cap(out.items) >= len(n.items) { + out.items = out.items[:len(n.items)] + } else { + out.items = make(items, len(n.items), cap(n.items)) + } + copy(out.items, n.items) + // Copy children + if cap(out.children) >= len(n.children) { + out.children = out.children[:len(n.children)] + } else { + out.children = make(children, len(n.children), cap(n.children)) + } + copy(out.children, n.children) + return out +} + +func (n *node) mutableChild(i int) *node { + c := n.children[i].mutableFor(n.cow) + n.children[i] = c + return c } // split splits the given node at the given index. The current node shrinks, @@ -214,12 +275,12 @@ type node struct { // containing all items/children after it. func (n *node) split(i int) (Item, *node) { item := n.items[i] - next := n.t.newNode() + next := n.cow.newNode() next.items = append(next.items, n.items[i+1:]...) - n.items = n.items[:i] + n.items.truncate(i) if len(n.children) > 0 { next.children = append(next.children, n.children[i+1:]...) - n.children = n.children[:i+1] + n.children.truncate(i + 1) } return item, next } @@ -230,7 +291,7 @@ func (n *node) maybeSplitChild(i, maxItems int) bool { if len(n.children[i].items) < maxItems { return false } - first := n.children[i] + first := n.mutableChild(i) item, second := first.split(maxItems / 2) n.items.insertAt(i, item) n.children.insertAt(i+1, second) @@ -264,7 +325,7 @@ func (n *node) insert(item Item, maxItems int) Item { return out } } - return n.children[i].insert(item, maxItems) + return n.mutableChild(i).insert(item, maxItems) } // get finds the given key in the subtree and returns it. @@ -342,10 +403,10 @@ func (n *node) remove(item Item, minItems int, typ toRemove) Item { panic("invalid type") } // If we get to here, we have children. - child := n.children[i] - if len(child.items) <= minItems { + if len(n.children[i].items) <= minItems { return n.growChildAndRemove(i, item, minItems, typ) } + child := n.mutableChild(i) // Either we had enough items to begin with, or we've done some // merging/stealing, because we've got enough now and we're ready to return // stuff. @@ -384,10 +445,10 @@ func (n *node) remove(item Item, minItems int, typ toRemove) Item { // whether we're in case 1 or 2), we'll have enough items and can guarantee // that we hit case A. func (n *node) growChildAndRemove(i int, item Item, minItems int, typ toRemove) Item { - child := n.children[i] if i > 0 && len(n.children[i-1].items) > minItems { // Steal from left child - stealFrom := n.children[i-1] + child := n.mutableChild(i) + stealFrom := n.mutableChild(i - 1) stolenItem := stealFrom.items.pop() child.items.insertAt(0, n.items[i-1]) n.items[i-1] = stolenItem @@ -396,7 +457,8 @@ func (n *node) growChildAndRemove(i int, item Item, minItems int, typ toRemove) } } else if i < len(n.items) && len(n.children[i+1].items) > minItems { // steal from right child - stealFrom := n.children[i+1] + child := n.mutableChild(i) + stealFrom := n.mutableChild(i + 1) stolenItem := stealFrom.items.removeAt(0) child.items = append(child.items, n.items[i]) n.items[i] = stolenItem @@ -406,47 +468,90 @@ func (n *node) growChildAndRemove(i int, item Item, minItems int, typ toRemove) } else { if i >= len(n.items) { i-- - child = n.children[i] } + child := n.mutableChild(i) // merge with right child mergeItem := n.items.removeAt(i) mergeChild := n.children.removeAt(i + 1) child.items = append(child.items, mergeItem) child.items = append(child.items, mergeChild.items...) child.children = append(child.children, mergeChild.children...) - n.t.freeNode(mergeChild) + n.cow.freeNode(mergeChild) } return n.remove(item, minItems, typ) } +type direction int + +const ( + descend = direction(-1) + ascend = direction(+1) +) + // iterate provides a simple method for iterating over elements in the tree. -// It could probably use some work to be extra-efficient (it calls from() a -// little more than it should), but it works pretty well for now. // -// It requires that 'from' and 'to' both return true for values we should hit -// with the iterator. It should also be the case that 'from' returns true for -// values less than or equal to values 'to' returns true for, and 'to' -// returns true for values greater than or equal to those that 'from' -// does. -func (n *node) iterate(from, to func(Item) bool, iter ItemIterator) bool { - for i, item := range n.items { - if !from(item) { - continue +// When ascending, the 'start' should be less than 'stop' and when descending, +// the 'start' should be greater than 'stop'. Setting 'includeStart' to true +// will force the iterator to include the first item when it equals 'start', +// thus creating a "greaterOrEqual" or "lessThanEqual" rather than just a +// "greaterThan" or "lessThan" queries. +func (n *node) iterate(dir direction, start, stop Item, includeStart bool, hit bool, iter ItemIterator) (bool, bool) { + var ok bool + switch dir { + case ascend: + for i := 0; i < len(n.items); i++ { + if start != nil && n.items[i].Less(start) { + continue + } + if len(n.children) > 0 { + if hit, ok = n.children[i].iterate(dir, start, stop, includeStart, hit, iter); !ok { + return hit, false + } + } + if !includeStart && !hit && start != nil && !start.Less(n.items[i]) { + hit = true + continue + } + hit = true + if stop != nil && !n.items[i].Less(stop) { + return hit, false + } + if !iter(n.items[i]) { + return hit, false + } } - if len(n.children) > 0 && !n.children[i].iterate(from, to, iter) { - return false + if len(n.children) > 0 { + if hit, ok = n.children[len(n.children)-1].iterate(dir, start, stop, includeStart, hit, iter); !ok { + return hit, false + } } - if !to(item) { - return false + case descend: + for i := len(n.items) - 1; i >= 0; i-- { + if start != nil && !n.items[i].Less(start) { + if !includeStart || hit || start.Less(n.items[i]) { + continue + } + } + if len(n.children) > 0 { + if hit, ok = n.children[i+1].iterate(dir, start, stop, includeStart, hit, iter); !ok { + return hit, false + } + } + if stop != nil && !stop.Less(n.items[i]) { + return hit, false // continue + } + hit = true + if !iter(n.items[i]) { + return hit, false + } } - if !iter(item) { - return false + if len(n.children) > 0 { + if hit, ok = n.children[0].iterate(dir, start, stop, includeStart, hit, iter); !ok { + return hit, false + } } } - if len(n.children) > 0 { - return n.children[len(n.children)-1].iterate(from, to, iter) - } - return true + return hit, true } // Used for testing/debugging purposes. @@ -465,12 +570,54 @@ func (n *node) print(w io.Writer, level int) { // Write operations are not safe for concurrent mutation by multiple // goroutines, but Read operations are. type BTree struct { - degree int - length int - root *node + degree int + length int + root *node + cow *copyOnWriteContext +} + +// copyOnWriteContext pointers determine node ownership... a tree with a write +// context equivalent to a node's write context is allowed to modify that node. +// A tree whose write context does not match a node's is not allowed to modify +// it, and must create a new, writable copy (IE: it's a Clone). +// +// When doing any write operation, we maintain the invariant that the current +// node's context is equal to the context of the tree that requested the write. +// We do this by, before we descend into any node, creating a copy with the +// correct context if the contexts don't match. +// +// Since the node we're currently visiting on any write has the requesting +// tree's context, that node is modifiable in place. Children of that node may +// not share context, but before we descend into them, we'll make a mutable +// copy. +type copyOnWriteContext struct { freelist *FreeList } +// Clone clones the btree, lazily. Clone should not be called concurrently, +// but the original tree (t) and the new tree (t2) can be used concurrently +// once the Clone call completes. +// +// The internal tree structure of b is marked read-only and shared between t and +// t2. Writes to both t and t2 use copy-on-write logic, creating new nodes +// whenever one of b's original nodes would have been modified. Read operations +// should have no performance degredation. Write operations for both t and t2 +// will initially experience minor slow-downs caused by additional allocs and +// copies due to the aforementioned copy-on-write logic, but should converge to +// the original performance characteristics of the original tree. +func (t *BTree) Clone() (t2 *BTree) { + // Create two entirely new copy-on-write contexts. + // This operation effectively creates three trees: + // the original, shared nodes (old b.cow) + // the new b.cow nodes + // the new out.cow nodes + cow1, cow2 := *t.cow, *t.cow + out := *t + t.cow = &cow1 + out.cow = &cow2 + return &out +} + // maxItems returns the max number of items to allow per node. func (t *BTree) maxItems() int { return t.degree*2 - 1 @@ -482,23 +629,20 @@ func (t *BTree) minItems() int { return t.degree - 1 } -func (t *BTree) newNode() (n *node) { - n = t.freelist.newNode() - n.t = t +func (c *copyOnWriteContext) newNode() (n *node) { + n = c.freelist.newNode() + n.cow = c return } -func (t *BTree) freeNode(n *node) { - for i := range n.items { - n.items[i] = nil // clear to allow GC +func (c *copyOnWriteContext) freeNode(n *node) { + if n.cow == c { + // clear to allow GC + n.items.truncate(0) + n.children.truncate(0) + n.cow = nil + c.freelist.freeNode(n) } - n.items = n.items[:0] - for i := range n.children { - n.children[i] = nil // clear to allow GC - } - n.children = n.children[:0] - n.t = nil // clear to allow GC - t.freelist.freeNode(n) } // ReplaceOrInsert adds the given item to the tree. If an item in the tree @@ -511,16 +655,19 @@ func (t *BTree) ReplaceOrInsert(item Item) Item { panic("nil item being added to BTree") } if t.root == nil { - t.root = t.newNode() + t.root = t.cow.newNode() t.root.items = append(t.root.items, item) t.length++ return nil - } else if len(t.root.items) >= t.maxItems() { - item2, second := t.root.split(t.maxItems() / 2) - oldroot := t.root - t.root = t.newNode() - t.root.items = append(t.root.items, item2) - t.root.children = append(t.root.children, oldroot, second) + } else { + t.root = t.root.mutableFor(t.cow) + if len(t.root.items) >= t.maxItems() { + item2, second := t.root.split(t.maxItems() / 2) + oldroot := t.root + t.root = t.cow.newNode() + t.root.items = append(t.root.items, item2) + t.root.children = append(t.root.children, oldroot, second) + } } out := t.root.insert(item, t.maxItems()) if out == nil { @@ -551,11 +698,12 @@ func (t *BTree) deleteItem(item Item, typ toRemove) Item { if t.root == nil || len(t.root.items) == 0 { return nil } + t.root = t.root.mutableFor(t.cow) out := t.root.remove(item, t.minItems(), typ) if len(t.root.items) == 0 && len(t.root.children) > 0 { oldroot := t.root t.root = t.root.children[0] - t.freeNode(oldroot) + t.cow.freeNode(oldroot) } if out != nil { t.length-- @@ -569,10 +717,7 @@ func (t *BTree) AscendRange(greaterOrEqual, lessThan Item, iterator ItemIterator if t.root == nil { return } - t.root.iterate( - func(a Item) bool { return !a.Less(greaterOrEqual) }, - func(a Item) bool { return a.Less(lessThan) }, - iterator) + t.root.iterate(ascend, greaterOrEqual, lessThan, true, false, iterator) } // AscendLessThan calls the iterator for every value in the tree within the range @@ -581,10 +726,7 @@ func (t *BTree) AscendLessThan(pivot Item, iterator ItemIterator) { if t.root == nil { return } - t.root.iterate( - func(a Item) bool { return true }, - func(a Item) bool { return a.Less(pivot) }, - iterator) + t.root.iterate(ascend, nil, pivot, false, false, iterator) } // AscendGreaterOrEqual calls the iterator for every value in the tree within @@ -593,10 +735,7 @@ func (t *BTree) AscendGreaterOrEqual(pivot Item, iterator ItemIterator) { if t.root == nil { return } - t.root.iterate( - func(a Item) bool { return !a.Less(pivot) }, - func(a Item) bool { return true }, - iterator) + t.root.iterate(ascend, pivot, nil, true, false, iterator) } // Ascend calls the iterator for every value in the tree within the range @@ -605,10 +744,43 @@ func (t *BTree) Ascend(iterator ItemIterator) { if t.root == nil { return } - t.root.iterate( - func(a Item) bool { return true }, - func(a Item) bool { return true }, - iterator) + t.root.iterate(ascend, nil, nil, false, false, iterator) +} + +// DescendRange calls the iterator for every value in the tree within the range +// [lessOrEqual, greaterThan), until iterator returns false. +func (t *BTree) DescendRange(lessOrEqual, greaterThan Item, iterator ItemIterator) { + if t.root == nil { + return + } + t.root.iterate(descend, lessOrEqual, greaterThan, true, false, iterator) +} + +// DescendLessOrEqual calls the iterator for every value in the tree within the range +// [pivot, first], until iterator returns false. +func (t *BTree) DescendLessOrEqual(pivot Item, iterator ItemIterator) { + if t.root == nil { + return + } + t.root.iterate(descend, pivot, nil, true, false, iterator) +} + +// DescendGreaterThan calls the iterator for every value in the tree within +// the range (pivot, last], until iterator returns false. +func (t *BTree) DescendGreaterThan(pivot Item, iterator ItemIterator) { + if t.root == nil { + return + } + t.root.iterate(descend, nil, pivot, false, false, iterator) +} + +// Descend calls the iterator for every value in the tree within the range +// [last, first], until iterator returns false. +func (t *BTree) Descend(iterator ItemIterator) { + if t.root == nil { + return + } + t.root.iterate(descend, nil, nil, false, false, iterator) } // Get looks for the key item in the tree, returning it. It returns nil if diff --git a/vendor/github.com/google/btree/btree_test.go b/vendor/github.com/google/btree/btree_test.go new file mode 100644 index 000000000..5da9d8b69 --- /dev/null +++ b/vendor/github.com/google/btree/btree_test.go @@ -0,0 +1,689 @@ +// Copyright 2014 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package btree + +import ( + "flag" + "fmt" + "math/rand" + "reflect" + "sort" + "sync" + "testing" + "time" +) + +func init() { + seed := time.Now().Unix() + fmt.Println(seed) + rand.Seed(seed) +} + +// perm returns a random permutation of n Int items in the range [0, n). +func perm(n int) (out []Item) { + for _, v := range rand.Perm(n) { + out = append(out, Int(v)) + } + return +} + +// rang returns an ordered list of Int items in the range [0, n). +func rang(n int) (out []Item) { + for i := 0; i < n; i++ { + out = append(out, Int(i)) + } + return +} + +// all extracts all items from a tree in order as a slice. +func all(t *BTree) (out []Item) { + t.Ascend(func(a Item) bool { + out = append(out, a) + return true + }) + return +} + +// rangerev returns a reversed ordered list of Int items in the range [0, n). +func rangrev(n int) (out []Item) { + for i := n - 1; i >= 0; i-- { + out = append(out, Int(i)) + } + return +} + +// allrev extracts all items from a tree in reverse order as a slice. +func allrev(t *BTree) (out []Item) { + t.Descend(func(a Item) bool { + out = append(out, a) + return true + }) + return +} + +var btreeDegree = flag.Int("degree", 32, "B-Tree degree") + +func TestBTree(t *testing.T) { + tr := New(*btreeDegree) + const treeSize = 10000 + for i := 0; i < 10; i++ { + if min := tr.Min(); min != nil { + t.Fatalf("empty min, got %+v", min) + } + if max := tr.Max(); max != nil { + t.Fatalf("empty max, got %+v", max) + } + for _, item := range perm(treeSize) { + if x := tr.ReplaceOrInsert(item); x != nil { + t.Fatal("insert found item", item) + } + } + for _, item := range perm(treeSize) { + if x := tr.ReplaceOrInsert(item); x == nil { + t.Fatal("insert didn't find item", item) + } + } + if min, want := tr.Min(), Item(Int(0)); min != want { + t.Fatalf("min: want %+v, got %+v", want, min) + } + if max, want := tr.Max(), Item(Int(treeSize-1)); max != want { + t.Fatalf("max: want %+v, got %+v", want, max) + } + got := all(tr) + want := rang(treeSize) + if !reflect.DeepEqual(got, want) { + t.Fatalf("mismatch:\n got: %v\nwant: %v", got, want) + } + + gotrev := allrev(tr) + wantrev := rangrev(treeSize) + if !reflect.DeepEqual(gotrev, wantrev) { + t.Fatalf("mismatch:\n got: %v\nwant: %v", got, want) + } + + for _, item := range perm(treeSize) { + if x := tr.Delete(item); x == nil { + t.Fatalf("didn't find %v", item) + } + } + if got = all(tr); len(got) > 0 { + t.Fatalf("some left!: %v", got) + } + } +} + +func ExampleBTree() { + tr := New(*btreeDegree) + for i := Int(0); i < 10; i++ { + tr.ReplaceOrInsert(i) + } + fmt.Println("len: ", tr.Len()) + fmt.Println("get3: ", tr.Get(Int(3))) + fmt.Println("get100: ", tr.Get(Int(100))) + fmt.Println("del4: ", tr.Delete(Int(4))) + fmt.Println("del100: ", tr.Delete(Int(100))) + fmt.Println("replace5: ", tr.ReplaceOrInsert(Int(5))) + fmt.Println("replace100:", tr.ReplaceOrInsert(Int(100))) + fmt.Println("min: ", tr.Min()) + fmt.Println("delmin: ", tr.DeleteMin()) + fmt.Println("max: ", tr.Max()) + fmt.Println("delmax: ", tr.DeleteMax()) + fmt.Println("len: ", tr.Len()) + // Output: + // len: 10 + // get3: 3 + // get100: + // del4: 4 + // del100: + // replace5: 5 + // replace100: + // min: 0 + // delmin: 0 + // max: 100 + // delmax: 100 + // len: 8 +} + +func TestDeleteMin(t *testing.T) { + tr := New(3) + for _, v := range perm(100) { + tr.ReplaceOrInsert(v) + } + var got []Item + for v := tr.DeleteMin(); v != nil; v = tr.DeleteMin() { + got = append(got, v) + } + if want := rang(100); !reflect.DeepEqual(got, want) { + t.Fatalf("ascendrange:\n got: %v\nwant: %v", got, want) + } +} + +func TestDeleteMax(t *testing.T) { + tr := New(3) + for _, v := range perm(100) { + tr.ReplaceOrInsert(v) + } + var got []Item + for v := tr.DeleteMax(); v != nil; v = tr.DeleteMax() { + got = append(got, v) + } + // Reverse our list. + for i := 0; i < len(got)/2; i++ { + got[i], got[len(got)-i-1] = got[len(got)-i-1], got[i] + } + if want := rang(100); !reflect.DeepEqual(got, want) { + t.Fatalf("ascendrange:\n got: %v\nwant: %v", got, want) + } +} + +func TestAscendRange(t *testing.T) { + tr := New(2) + for _, v := range perm(100) { + tr.ReplaceOrInsert(v) + } + var got []Item + tr.AscendRange(Int(40), Int(60), func(a Item) bool { + got = append(got, a) + return true + }) + if want := rang(100)[40:60]; !reflect.DeepEqual(got, want) { + t.Fatalf("ascendrange:\n got: %v\nwant: %v", got, want) + } + got = got[:0] + tr.AscendRange(Int(40), Int(60), func(a Item) bool { + if a.(Int) > 50 { + return false + } + got = append(got, a) + return true + }) + if want := rang(100)[40:51]; !reflect.DeepEqual(got, want) { + t.Fatalf("ascendrange:\n got: %v\nwant: %v", got, want) + } +} + +func TestDescendRange(t *testing.T) { + tr := New(2) + for _, v := range perm(100) { + tr.ReplaceOrInsert(v) + } + var got []Item + tr.DescendRange(Int(60), Int(40), func(a Item) bool { + got = append(got, a) + return true + }) + if want := rangrev(100)[39:59]; !reflect.DeepEqual(got, want) { + t.Fatalf("descendrange:\n got: %v\nwant: %v", got, want) + } + got = got[:0] + tr.DescendRange(Int(60), Int(40), func(a Item) bool { + if a.(Int) < 50 { + return false + } + got = append(got, a) + return true + }) + if want := rangrev(100)[39:50]; !reflect.DeepEqual(got, want) { + t.Fatalf("descendrange:\n got: %v\nwant: %v", got, want) + } +} +func TestAscendLessThan(t *testing.T) { + tr := New(*btreeDegree) + for _, v := range perm(100) { + tr.ReplaceOrInsert(v) + } + var got []Item + tr.AscendLessThan(Int(60), func(a Item) bool { + got = append(got, a) + return true + }) + if want := rang(100)[:60]; !reflect.DeepEqual(got, want) { + t.Fatalf("ascendrange:\n got: %v\nwant: %v", got, want) + } + got = got[:0] + tr.AscendLessThan(Int(60), func(a Item) bool { + if a.(Int) > 50 { + return false + } + got = append(got, a) + return true + }) + if want := rang(100)[:51]; !reflect.DeepEqual(got, want) { + t.Fatalf("ascendrange:\n got: %v\nwant: %v", got, want) + } +} + +func TestDescendLessOrEqual(t *testing.T) { + tr := New(*btreeDegree) + for _, v := range perm(100) { + tr.ReplaceOrInsert(v) + } + var got []Item + tr.DescendLessOrEqual(Int(40), func(a Item) bool { + got = append(got, a) + return true + }) + if want := rangrev(100)[59:]; !reflect.DeepEqual(got, want) { + t.Fatalf("descendlessorequal:\n got: %v\nwant: %v", got, want) + } + got = got[:0] + tr.DescendLessOrEqual(Int(60), func(a Item) bool { + if a.(Int) < 50 { + return false + } + got = append(got, a) + return true + }) + if want := rangrev(100)[39:50]; !reflect.DeepEqual(got, want) { + t.Fatalf("descendlessorequal:\n got: %v\nwant: %v", got, want) + } +} +func TestAscendGreaterOrEqual(t *testing.T) { + tr := New(*btreeDegree) + for _, v := range perm(100) { + tr.ReplaceOrInsert(v) + } + var got []Item + tr.AscendGreaterOrEqual(Int(40), func(a Item) bool { + got = append(got, a) + return true + }) + if want := rang(100)[40:]; !reflect.DeepEqual(got, want) { + t.Fatalf("ascendrange:\n got: %v\nwant: %v", got, want) + } + got = got[:0] + tr.AscendGreaterOrEqual(Int(40), func(a Item) bool { + if a.(Int) > 50 { + return false + } + got = append(got, a) + return true + }) + if want := rang(100)[40:51]; !reflect.DeepEqual(got, want) { + t.Fatalf("ascendrange:\n got: %v\nwant: %v", got, want) + } +} + +func TestDescendGreaterThan(t *testing.T) { + tr := New(*btreeDegree) + for _, v := range perm(100) { + tr.ReplaceOrInsert(v) + } + var got []Item + tr.DescendGreaterThan(Int(40), func(a Item) bool { + got = append(got, a) + return true + }) + if want := rangrev(100)[:59]; !reflect.DeepEqual(got, want) { + t.Fatalf("descendgreaterthan:\n got: %v\nwant: %v", got, want) + } + got = got[:0] + tr.DescendGreaterThan(Int(40), func(a Item) bool { + if a.(Int) < 50 { + return false + } + got = append(got, a) + return true + }) + if want := rangrev(100)[:50]; !reflect.DeepEqual(got, want) { + t.Fatalf("descendgreaterthan:\n got: %v\nwant: %v", got, want) + } +} + +const benchmarkTreeSize = 10000 + +func BenchmarkInsert(b *testing.B) { + b.StopTimer() + insertP := perm(benchmarkTreeSize) + b.StartTimer() + i := 0 + for i < b.N { + tr := New(*btreeDegree) + for _, item := range insertP { + tr.ReplaceOrInsert(item) + i++ + if i >= b.N { + return + } + } + } +} + +func BenchmarkDeleteInsert(b *testing.B) { + b.StopTimer() + insertP := perm(benchmarkTreeSize) + tr := New(*btreeDegree) + for _, item := range insertP { + tr.ReplaceOrInsert(item) + } + b.StartTimer() + for i := 0; i < b.N; i++ { + tr.Delete(insertP[i%benchmarkTreeSize]) + tr.ReplaceOrInsert(insertP[i%benchmarkTreeSize]) + } +} + +func BenchmarkDeleteInsertCloneOnce(b *testing.B) { + b.StopTimer() + insertP := perm(benchmarkTreeSize) + tr := New(*btreeDegree) + for _, item := range insertP { + tr.ReplaceOrInsert(item) + } + tr = tr.Clone() + b.StartTimer() + for i := 0; i < b.N; i++ { + tr.Delete(insertP[i%benchmarkTreeSize]) + tr.ReplaceOrInsert(insertP[i%benchmarkTreeSize]) + } +} + +func BenchmarkDeleteInsertCloneEachTime(b *testing.B) { + b.StopTimer() + insertP := perm(benchmarkTreeSize) + tr := New(*btreeDegree) + for _, item := range insertP { + tr.ReplaceOrInsert(item) + } + b.StartTimer() + for i := 0; i < b.N; i++ { + tr = tr.Clone() + tr.Delete(insertP[i%benchmarkTreeSize]) + tr.ReplaceOrInsert(insertP[i%benchmarkTreeSize]) + } +} + +func BenchmarkDelete(b *testing.B) { + b.StopTimer() + insertP := perm(benchmarkTreeSize) + removeP := perm(benchmarkTreeSize) + b.StartTimer() + i := 0 + for i < b.N { + b.StopTimer() + tr := New(*btreeDegree) + for _, v := range insertP { + tr.ReplaceOrInsert(v) + } + b.StartTimer() + for _, item := range removeP { + tr.Delete(item) + i++ + if i >= b.N { + return + } + } + if tr.Len() > 0 { + panic(tr.Len()) + } + } +} + +func BenchmarkGet(b *testing.B) { + b.StopTimer() + insertP := perm(benchmarkTreeSize) + removeP := perm(benchmarkTreeSize) + b.StartTimer() + i := 0 + for i < b.N { + b.StopTimer() + tr := New(*btreeDegree) + for _, v := range insertP { + tr.ReplaceOrInsert(v) + } + b.StartTimer() + for _, item := range removeP { + tr.Get(item) + i++ + if i >= b.N { + return + } + } + } +} + +func BenchmarkGetCloneEachTime(b *testing.B) { + b.StopTimer() + insertP := perm(benchmarkTreeSize) + removeP := perm(benchmarkTreeSize) + b.StartTimer() + i := 0 + for i < b.N { + b.StopTimer() + tr := New(*btreeDegree) + for _, v := range insertP { + tr.ReplaceOrInsert(v) + } + b.StartTimer() + for _, item := range removeP { + tr = tr.Clone() + tr.Get(item) + i++ + if i >= b.N { + return + } + } + } +} + +type byInts []Item + +func (a byInts) Len() int { + return len(a) +} + +func (a byInts) Less(i, j int) bool { + return a[i].(Int) < a[j].(Int) +} + +func (a byInts) Swap(i, j int) { + a[i], a[j] = a[j], a[i] +} + +func BenchmarkAscend(b *testing.B) { + arr := perm(benchmarkTreeSize) + tr := New(*btreeDegree) + for _, v := range arr { + tr.ReplaceOrInsert(v) + } + sort.Sort(byInts(arr)) + b.ResetTimer() + for i := 0; i < b.N; i++ { + j := 0 + tr.Ascend(func(item Item) bool { + if item.(Int) != arr[j].(Int) { + b.Fatalf("mismatch: expected: %v, got %v", arr[j].(Int), item.(Int)) + } + j++ + return true + }) + } +} + +func BenchmarkDescend(b *testing.B) { + arr := perm(benchmarkTreeSize) + tr := New(*btreeDegree) + for _, v := range arr { + tr.ReplaceOrInsert(v) + } + sort.Sort(byInts(arr)) + b.ResetTimer() + for i := 0; i < b.N; i++ { + j := len(arr) - 1 + tr.Descend(func(item Item) bool { + if item.(Int) != arr[j].(Int) { + b.Fatalf("mismatch: expected: %v, got %v", arr[j].(Int), item.(Int)) + } + j-- + return true + }) + } +} +func BenchmarkAscendRange(b *testing.B) { + arr := perm(benchmarkTreeSize) + tr := New(*btreeDegree) + for _, v := range arr { + tr.ReplaceOrInsert(v) + } + sort.Sort(byInts(arr)) + b.ResetTimer() + for i := 0; i < b.N; i++ { + j := 100 + tr.AscendRange(Int(100), arr[len(arr)-100], func(item Item) bool { + if item.(Int) != arr[j].(Int) { + b.Fatalf("mismatch: expected: %v, got %v", arr[j].(Int), item.(Int)) + } + j++ + return true + }) + if j != len(arr)-100 { + b.Fatalf("expected: %v, got %v", len(arr)-100, j) + } + } +} + +func BenchmarkDescendRange(b *testing.B) { + arr := perm(benchmarkTreeSize) + tr := New(*btreeDegree) + for _, v := range arr { + tr.ReplaceOrInsert(v) + } + sort.Sort(byInts(arr)) + b.ResetTimer() + for i := 0; i < b.N; i++ { + j := len(arr) - 100 + tr.DescendRange(arr[len(arr)-100], Int(100), func(item Item) bool { + if item.(Int) != arr[j].(Int) { + b.Fatalf("mismatch: expected: %v, got %v", arr[j].(Int), item.(Int)) + } + j-- + return true + }) + if j != 100 { + b.Fatalf("expected: %v, got %v", len(arr)-100, j) + } + } +} +func BenchmarkAscendGreaterOrEqual(b *testing.B) { + arr := perm(benchmarkTreeSize) + tr := New(*btreeDegree) + for _, v := range arr { + tr.ReplaceOrInsert(v) + } + sort.Sort(byInts(arr)) + b.ResetTimer() + for i := 0; i < b.N; i++ { + j := 100 + k := 0 + tr.AscendGreaterOrEqual(Int(100), func(item Item) bool { + if item.(Int) != arr[j].(Int) { + b.Fatalf("mismatch: expected: %v, got %v", arr[j].(Int), item.(Int)) + } + j++ + k++ + return true + }) + if j != len(arr) { + b.Fatalf("expected: %v, got %v", len(arr), j) + } + if k != len(arr)-100 { + b.Fatalf("expected: %v, got %v", len(arr)-100, k) + } + } +} +func BenchmarkDescendLessOrEqual(b *testing.B) { + arr := perm(benchmarkTreeSize) + tr := New(*btreeDegree) + for _, v := range arr { + tr.ReplaceOrInsert(v) + } + sort.Sort(byInts(arr)) + b.ResetTimer() + for i := 0; i < b.N; i++ { + j := len(arr) - 100 + k := len(arr) + tr.DescendLessOrEqual(arr[len(arr)-100], func(item Item) bool { + if item.(Int) != arr[j].(Int) { + b.Fatalf("mismatch: expected: %v, got %v", arr[j].(Int), item.(Int)) + } + j-- + k-- + return true + }) + if j != -1 { + b.Fatalf("expected: %v, got %v", -1, j) + } + if k != 99 { + b.Fatalf("expected: %v, got %v", 99, k) + } + } +} + +const cloneTestSize = 10000 + +func cloneTest(t *testing.T, b *BTree, start int, p []Item, wg *sync.WaitGroup, trees *[]*BTree) { + t.Logf("Starting new clone at %v", start) + *trees = append(*trees, b) + for i := start; i < cloneTestSize; i++ { + b.ReplaceOrInsert(p[i]) + if i%(cloneTestSize/5) == 0 { + wg.Add(1) + go cloneTest(t, b.Clone(), i+1, p, wg, trees) + } + } + wg.Done() +} + +func TestCloneConcurrentOperations(t *testing.T) { + b := New(*btreeDegree) + trees := []*BTree{} + p := perm(cloneTestSize) + var wg sync.WaitGroup + wg.Add(1) + go cloneTest(t, b, 0, p, &wg, &trees) + wg.Wait() + want := rang(cloneTestSize) + t.Logf("Starting equality checks on %d trees", len(trees)) + for i, tree := range trees { + if !reflect.DeepEqual(want, all(tree)) { + t.Errorf("tree %v mismatch", i) + } + } + t.Log("Removing half from first half") + toRemove := rang(cloneTestSize)[cloneTestSize/2:] + for i := 0; i < len(trees)/2; i++ { + tree := trees[i] + wg.Add(1) + go func() { + for _, item := range toRemove { + tree.Delete(item) + } + wg.Done() + }() + } + wg.Wait() + t.Log("Checking all values again") + for i, tree := range trees { + var wantpart []Item + if i < len(trees)/2 { + wantpart = want[:cloneTestSize/2] + } else { + wantpart = want + } + if got := all(tree); !reflect.DeepEqual(wantpart, got) { + t.Errorf("tree %v mismatch, want %v got %v", i, len(want), len(got)) + } + } +} diff --git a/vendor/github.com/google/gofuzz/example_test.go b/vendor/github.com/google/gofuzz/example_test.go new file mode 100644 index 000000000..792707a3a --- /dev/null +++ b/vendor/github.com/google/gofuzz/example_test.go @@ -0,0 +1,225 @@ +/* +Copyright 2014 Google Inc. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fuzz_test + +import ( + "encoding/json" + "fmt" + "math/rand" + + "github.com/google/gofuzz" +) + +func ExampleSimple() { + type MyType struct { + A string + B string + C int + D struct { + E float64 + } + } + + f := fuzz.New() + object := MyType{} + + uniqueObjects := map[MyType]int{} + + for i := 0; i < 1000; i++ { + f.Fuzz(&object) + uniqueObjects[object]++ + } + fmt.Printf("Got %v unique objects.\n", len(uniqueObjects)) + // Output: + // Got 1000 unique objects. +} + +func ExampleCustom() { + type MyType struct { + A int + B string + } + + counter := 0 + f := fuzz.New().Funcs( + func(i *int, c fuzz.Continue) { + *i = counter + counter++ + }, + ) + object := MyType{} + + uniqueObjects := map[MyType]int{} + + for i := 0; i < 100; i++ { + f.Fuzz(&object) + if object.A != i { + fmt.Printf("Unexpected value: %#v\n", object) + } + uniqueObjects[object]++ + } + fmt.Printf("Got %v unique objects.\n", len(uniqueObjects)) + // Output: + // Got 100 unique objects. +} + +func ExampleComplex() { + type OtherType struct { + A string + B string + } + type MyType struct { + Pointer *OtherType + Map map[string]OtherType + PointerMap *map[string]OtherType + Slice []OtherType + SlicePointer []*OtherType + PointerSlicePointer *[]*OtherType + } + + f := fuzz.New().RandSource(rand.NewSource(0)).NilChance(0).NumElements(1, 1).Funcs( + func(o *OtherType, c fuzz.Continue) { + o.A = "Foo" + o.B = "Bar" + }, + func(op **OtherType, c fuzz.Continue) { + *op = &OtherType{"A", "B"} + }, + func(m map[string]OtherType, c fuzz.Continue) { + m["Works Because"] = OtherType{ + "Fuzzer", + "Preallocated", + } + }, + ) + object := MyType{} + f.Fuzz(&object) + bytes, err := json.MarshalIndent(&object, "", " ") + if err != nil { + fmt.Printf("error: %v\n", err) + } + fmt.Printf("%s\n", string(bytes)) + // Output: + // { + // "Pointer": { + // "A": "A", + // "B": "B" + // }, + // "Map": { + // "Works Because": { + // "A": "Fuzzer", + // "B": "Preallocated" + // } + // }, + // "PointerMap": { + // "Works Because": { + // "A": "Fuzzer", + // "B": "Preallocated" + // } + // }, + // "Slice": [ + // { + // "A": "Foo", + // "B": "Bar" + // } + // ], + // "SlicePointer": [ + // { + // "A": "A", + // "B": "B" + // } + // ], + // "PointerSlicePointer": [ + // { + // "A": "A", + // "B": "B" + // } + // ] + // } +} + +func ExampleMap() { + f := fuzz.New().NilChance(0).NumElements(1, 1) + var myMap map[struct{ A, B, C int }]string + f.Fuzz(&myMap) + fmt.Printf("myMap has %v element(s).\n", len(myMap)) + // Output: + // myMap has 1 element(s). +} + +func ExampleSingle() { + f := fuzz.New() + var i int + f.Fuzz(&i) + + // Technically, we'd expect this to fail one out of 2 billion attempts... + fmt.Printf("(i == 0) == %v", i == 0) + // Output: + // (i == 0) == false +} + +func ExampleEnum() { + type MyEnum string + const ( + A MyEnum = "A" + B MyEnum = "B" + ) + type MyInfo struct { + Type MyEnum + AInfo *string + BInfo *string + } + + f := fuzz.New().NilChance(0).Funcs( + func(e *MyInfo, c fuzz.Continue) { + // Note c's embedded Rand allows for direct use. + // We could also use c.RandBool() here. + switch c.Intn(2) { + case 0: + e.Type = A + c.Fuzz(&e.AInfo) + case 1: + e.Type = B + c.Fuzz(&e.BInfo) + } + }, + ) + + for i := 0; i < 100; i++ { + var myObject MyInfo + f.Fuzz(&myObject) + switch myObject.Type { + case A: + if myObject.AInfo == nil { + fmt.Println("AInfo should have been set!") + } + if myObject.BInfo != nil { + fmt.Println("BInfo should NOT have been set!") + } + case B: + if myObject.BInfo == nil { + fmt.Println("BInfo should have been set!") + } + if myObject.AInfo != nil { + fmt.Println("AInfo should NOT have been set!") + } + default: + fmt.Println("Invalid enum value!") + } + } + // Output: +} diff --git a/vendor/github.com/google/gofuzz/fuzz.go b/vendor/github.com/google/gofuzz/fuzz.go index 4f888fbc8..1dfa80a6f 100644 --- a/vendor/github.com/google/gofuzz/fuzz.go +++ b/vendor/github.com/google/gofuzz/fuzz.go @@ -34,21 +34,27 @@ type Fuzzer struct { nilChance float64 minElements int maxElements int + maxDepth int } // New returns a new Fuzzer. Customize your Fuzzer further by calling Funcs, // RandSource, NilChance, or NumElements in any order. func New() *Fuzzer { + return NewWithSeed(time.Now().UnixNano()) +} + +func NewWithSeed(seed int64) *Fuzzer { f := &Fuzzer{ defaultFuzzFuncs: fuzzFuncMap{ reflect.TypeOf(&time.Time{}): reflect.ValueOf(fuzzTime), }, fuzzFuncs: fuzzFuncMap{}, - r: rand.New(rand.NewSource(time.Now().UnixNano())), + r: rand.New(rand.NewSource(seed)), nilChance: .2, minElements: 1, maxElements: 10, + maxDepth: 100, } return f } @@ -136,6 +142,14 @@ func (f *Fuzzer) genShouldFill() bool { return f.r.Float64() > f.nilChance } +// MaxDepth sets the maximum number of recursive fuzz calls that will be made +// before stopping. This includes struct members, pointers, and map and slice +// elements. +func (f *Fuzzer) MaxDepth(d int) *Fuzzer { + f.maxDepth = d + return f +} + // Fuzz recursively fills all of obj's fields with something random. First // this tries to find a custom fuzz function (see Funcs). If there is no // custom function this tests whether the object implements fuzz.Interface and, @@ -144,17 +158,19 @@ func (f *Fuzzer) genShouldFill() bool { // fails, this will generate random values for all primitive fields and then // recurse for all non-primitives. // -// Not safe for cyclic or tree-like structs! +// This is safe for cyclic or tree-like structs, up to a limit. Use the +// MaxDepth method to adjust how deep you need it to recurse. // -// obj must be a pointer. Only exported (public) fields can be set (thanks, golang :/ ) -// Intended for tests, so will panic on bad input or unimplemented fields. +// obj must be a pointer. Only exported (public) fields can be set (thanks, +// golang :/ ) Intended for tests, so will panic on bad input or unimplemented +// fields. func (f *Fuzzer) Fuzz(obj interface{}) { v := reflect.ValueOf(obj) if v.Kind() != reflect.Ptr { panic("needed ptr!") } v = v.Elem() - f.doFuzz(v, 0) + f.fuzzWithContext(v, 0) } // FuzzNoCustom is just like Fuzz, except that any custom fuzz function for @@ -170,7 +186,7 @@ func (f *Fuzzer) FuzzNoCustom(obj interface{}) { panic("needed ptr!") } v = v.Elem() - f.doFuzz(v, flagNoCustomFuzz) + f.fuzzWithContext(v, flagNoCustomFuzz) } const ( @@ -178,69 +194,87 @@ const ( flagNoCustomFuzz uint64 = 1 << iota ) -func (f *Fuzzer) doFuzz(v reflect.Value, flags uint64) { +func (f *Fuzzer) fuzzWithContext(v reflect.Value, flags uint64) { + fc := &fuzzerContext{fuzzer: f} + fc.doFuzz(v, flags) +} + +// fuzzerContext carries context about a single fuzzing run, which lets Fuzzer +// be thread-safe. +type fuzzerContext struct { + fuzzer *Fuzzer + curDepth int +} + +func (fc *fuzzerContext) doFuzz(v reflect.Value, flags uint64) { + if fc.curDepth >= fc.fuzzer.maxDepth { + return + } + fc.curDepth++ + defer func() { fc.curDepth-- }() + if !v.CanSet() { return } if flags&flagNoCustomFuzz == 0 { // Check for both pointer and non-pointer custom functions. - if v.CanAddr() && f.tryCustom(v.Addr()) { + if v.CanAddr() && fc.tryCustom(v.Addr()) { return } - if f.tryCustom(v) { + if fc.tryCustom(v) { return } } if fn, ok := fillFuncMap[v.Kind()]; ok { - fn(v, f.r) + fn(v, fc.fuzzer.r) return } switch v.Kind() { case reflect.Map: - if f.genShouldFill() { + if fc.fuzzer.genShouldFill() { v.Set(reflect.MakeMap(v.Type())) - n := f.genElementCount() + n := fc.fuzzer.genElementCount() for i := 0; i < n; i++ { key := reflect.New(v.Type().Key()).Elem() - f.doFuzz(key, 0) + fc.doFuzz(key, 0) val := reflect.New(v.Type().Elem()).Elem() - f.doFuzz(val, 0) + fc.doFuzz(val, 0) v.SetMapIndex(key, val) } return } v.Set(reflect.Zero(v.Type())) case reflect.Ptr: - if f.genShouldFill() { + if fc.fuzzer.genShouldFill() { v.Set(reflect.New(v.Type().Elem())) - f.doFuzz(v.Elem(), 0) + fc.doFuzz(v.Elem(), 0) return } v.Set(reflect.Zero(v.Type())) case reflect.Slice: - if f.genShouldFill() { - n := f.genElementCount() + if fc.fuzzer.genShouldFill() { + n := fc.fuzzer.genElementCount() v.Set(reflect.MakeSlice(v.Type(), n, n)) for i := 0; i < n; i++ { - f.doFuzz(v.Index(i), 0) + fc.doFuzz(v.Index(i), 0) } return } v.Set(reflect.Zero(v.Type())) case reflect.Array: - if f.genShouldFill() { + if fc.fuzzer.genShouldFill() { n := v.Len() for i := 0; i < n; i++ { - f.doFuzz(v.Index(i), 0) + fc.doFuzz(v.Index(i), 0) } return } v.Set(reflect.Zero(v.Type())) case reflect.Struct: for i := 0; i < v.NumField(); i++ { - f.doFuzz(v.Field(i), 0) + fc.doFuzz(v.Field(i), 0) } case reflect.Chan: fallthrough @@ -255,20 +289,20 @@ func (f *Fuzzer) doFuzz(v reflect.Value, flags uint64) { // tryCustom searches for custom handlers, and returns true iff it finds a match // and successfully randomizes v. -func (f *Fuzzer) tryCustom(v reflect.Value) bool { +func (fc *fuzzerContext) tryCustom(v reflect.Value) bool { // First: see if we have a fuzz function for it. - doCustom, ok := f.fuzzFuncs[v.Type()] + doCustom, ok := fc.fuzzer.fuzzFuncs[v.Type()] if !ok { // Second: see if it can fuzz itself. if v.CanInterface() { intf := v.Interface() if fuzzable, ok := intf.(Interface); ok { - fuzzable.Fuzz(Continue{f: f, Rand: f.r}) + fuzzable.Fuzz(Continue{fc: fc, Rand: fc.fuzzer.r}) return true } } // Finally: see if there is a default fuzz function. - doCustom, ok = f.defaultFuzzFuncs[v.Type()] + doCustom, ok = fc.fuzzer.defaultFuzzFuncs[v.Type()] if !ok { return false } @@ -294,8 +328,8 @@ func (f *Fuzzer) tryCustom(v reflect.Value) bool { } doCustom.Call([]reflect.Value{v, reflect.ValueOf(Continue{ - f: f, - Rand: f.r, + fc: fc, + Rand: fc.fuzzer.r, })}) return true } @@ -310,7 +344,7 @@ type Interface interface { // Continue can be passed to custom fuzzing functions to allow them to use // the correct source of randomness and to continue fuzzing their members. type Continue struct { - f *Fuzzer + fc *fuzzerContext // For convenience, Continue implements rand.Rand via embedding. // Use this for generating any randomness if you want your fuzzing @@ -325,7 +359,7 @@ func (c Continue) Fuzz(obj interface{}) { panic("needed ptr!") } v = v.Elem() - c.f.doFuzz(v, 0) + c.fc.doFuzz(v, 0) } // FuzzNoCustom continues fuzzing obj, except that any custom fuzz function for @@ -338,7 +372,7 @@ func (c Continue) FuzzNoCustom(obj interface{}) { panic("needed ptr!") } v = v.Elem() - c.f.doFuzz(v, flagNoCustomFuzz) + c.fc.doFuzz(v, flagNoCustomFuzz) } // RandString makes a random string up to 20 characters long. The returned string diff --git a/vendor/github.com/google/gofuzz/fuzz_test.go b/vendor/github.com/google/gofuzz/fuzz_test.go new file mode 100644 index 000000000..4059ea6fe --- /dev/null +++ b/vendor/github.com/google/gofuzz/fuzz_test.go @@ -0,0 +1,472 @@ +/* +Copyright 2014 Google Inc. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fuzz + +import ( + "reflect" + "testing" + "time" +) + +func TestFuzz_basic(t *testing.T) { + obj := &struct { + I int + I8 int8 + I16 int16 + I32 int32 + I64 int64 + U uint + U8 uint8 + U16 uint16 + U32 uint32 + U64 uint64 + Uptr uintptr + S string + B bool + T time.Time + }{} + + failed := map[string]int{} + for i := 0; i < 10; i++ { + New().Fuzz(obj) + + if n, v := "i", obj.I; v == 0 { + failed[n] = failed[n] + 1 + } + if n, v := "i8", obj.I8; v == 0 { + failed[n] = failed[n] + 1 + } + if n, v := "i16", obj.I16; v == 0 { + failed[n] = failed[n] + 1 + } + if n, v := "i32", obj.I32; v == 0 { + failed[n] = failed[n] + 1 + } + if n, v := "i64", obj.I64; v == 0 { + failed[n] = failed[n] + 1 + } + if n, v := "u", obj.U; v == 0 { + failed[n] = failed[n] + 1 + } + if n, v := "u8", obj.U8; v == 0 { + failed[n] = failed[n] + 1 + } + if n, v := "u16", obj.U16; v == 0 { + failed[n] = failed[n] + 1 + } + if n, v := "u32", obj.U32; v == 0 { + failed[n] = failed[n] + 1 + } + if n, v := "u64", obj.U64; v == 0 { + failed[n] = failed[n] + 1 + } + if n, v := "uptr", obj.Uptr; v == 0 { + failed[n] = failed[n] + 1 + } + if n, v := "s", obj.S; v == "" { + failed[n] = failed[n] + 1 + } + if n, v := "b", obj.B; v == false { + failed[n] = failed[n] + 1 + } + if n, v := "t", obj.T; v.IsZero() { + failed[n] = failed[n] + 1 + } + } + checkFailed(t, failed) +} + +func checkFailed(t *testing.T, failed map[string]int) { + for k, v := range failed { + if v > 8 { + t.Errorf("%v seems to not be getting set, was zero value %v times", k, v) + } + } +} + +func TestFuzz_structptr(t *testing.T) { + obj := &struct { + A *struct { + S string + } + }{} + + f := New().NilChance(.5) + failed := map[string]int{} + for i := 0; i < 10; i++ { + f.Fuzz(obj) + + if n, v := "a not nil", obj.A; v == nil { + failed[n] = failed[n] + 1 + } + if n, v := "a nil", obj.A; v != nil { + failed[n] = failed[n] + 1 + } + if n, v := "as", obj.A; v == nil || v.S == "" { + failed[n] = failed[n] + 1 + } + } + checkFailed(t, failed) +} + +// tryFuzz tries fuzzing up to 20 times. Fail if check() never passes, report the highest +// stage it ever got to. +func tryFuzz(t *testing.T, f *Fuzzer, obj interface{}, check func() (stage int, passed bool)) { + maxStage := 0 + for i := 0; i < 20; i++ { + f.Fuzz(obj) + stage, passed := check() + if stage > maxStage { + maxStage = stage + } + if passed { + return + } + } + t.Errorf("Only ever got to stage %v", maxStage) +} + +func TestFuzz_structmap(t *testing.T) { + obj := &struct { + A map[struct { + S string + }]struct { + S2 string + } + B map[string]string + }{} + + tryFuzz(t, New(), obj, func() (int, bool) { + if obj.A == nil { + return 1, false + } + if len(obj.A) == 0 { + return 2, false + } + for k, v := range obj.A { + if k.S == "" { + return 3, false + } + if v.S2 == "" { + return 4, false + } + } + + if obj.B == nil { + return 5, false + } + if len(obj.B) == 0 { + return 6, false + } + for k, v := range obj.B { + if k == "" { + return 7, false + } + if v == "" { + return 8, false + } + } + return 9, true + }) +} + +func TestFuzz_structslice(t *testing.T) { + obj := &struct { + A []struct { + S string + } + B []string + }{} + + tryFuzz(t, New(), obj, func() (int, bool) { + if obj.A == nil { + return 1, false + } + if len(obj.A) == 0 { + return 2, false + } + for _, v := range obj.A { + if v.S == "" { + return 3, false + } + } + + if obj.B == nil { + return 4, false + } + if len(obj.B) == 0 { + return 5, false + } + for _, v := range obj.B { + if v == "" { + return 6, false + } + } + return 7, true + }) +} + +func TestFuzz_structarray(t *testing.T) { + obj := &struct { + A [3]struct { + S string + } + B [2]int + }{} + + tryFuzz(t, New(), obj, func() (int, bool) { + for _, v := range obj.A { + if v.S == "" { + return 1, false + } + } + + for _, v := range obj.B { + if v == 0 { + return 2, false + } + } + return 3, true + }) +} + +func TestFuzz_custom(t *testing.T) { + obj := &struct { + A string + B *string + C map[string]string + D *map[string]string + }{} + + testPhrase := "gotcalled" + testMap := map[string]string{"C": "D"} + f := New().Funcs( + func(s *string, c Continue) { + *s = testPhrase + }, + func(m map[string]string, c Continue) { + m["C"] = "D" + }, + ) + + tryFuzz(t, f, obj, func() (int, bool) { + if obj.A != testPhrase { + return 1, false + } + if obj.B == nil { + return 2, false + } + if *obj.B != testPhrase { + return 3, false + } + if e, a := testMap, obj.C; !reflect.DeepEqual(e, a) { + return 4, false + } + if obj.D == nil { + return 5, false + } + if e, a := testMap, *obj.D; !reflect.DeepEqual(e, a) { + return 6, false + } + return 7, true + }) +} + +type SelfFuzzer string + +// Implement fuzz.Interface. +func (sf *SelfFuzzer) Fuzz(c Continue) { + *sf = selfFuzzerTestPhrase +} + +const selfFuzzerTestPhrase = "was fuzzed" + +func TestFuzz_interface(t *testing.T) { + f := New() + + var obj1 SelfFuzzer + tryFuzz(t, f, &obj1, func() (int, bool) { + if obj1 != selfFuzzerTestPhrase { + return 1, false + } + return 1, true + }) + + var obj2 map[int]SelfFuzzer + tryFuzz(t, f, &obj2, func() (int, bool) { + for _, v := range obj2 { + if v != selfFuzzerTestPhrase { + return 1, false + } + } + return 1, true + }) +} + +func TestFuzz_interfaceAndFunc(t *testing.T) { + const privateTestPhrase = "private phrase" + f := New().Funcs( + // This should take precedence over SelfFuzzer.Fuzz(). + func(s *SelfFuzzer, c Continue) { + *s = privateTestPhrase + }, + ) + + var obj1 SelfFuzzer + tryFuzz(t, f, &obj1, func() (int, bool) { + if obj1 != privateTestPhrase { + return 1, false + } + return 1, true + }) + + var obj2 map[int]SelfFuzzer + tryFuzz(t, f, &obj2, func() (int, bool) { + for _, v := range obj2 { + if v != privateTestPhrase { + return 1, false + } + } + return 1, true + }) +} + +func TestFuzz_noCustom(t *testing.T) { + type Inner struct { + Str string + } + type Outer struct { + Str string + In Inner + } + + testPhrase := "gotcalled" + f := New().Funcs( + func(outer *Outer, c Continue) { + outer.Str = testPhrase + c.Fuzz(&outer.In) + }, + func(inner *Inner, c Continue) { + inner.Str = testPhrase + }, + ) + c := Continue{fc: &fuzzerContext{fuzzer: f}, Rand: f.r} + + // Fuzzer.Fuzz() + obj1 := Outer{} + f.Fuzz(&obj1) + if obj1.Str != testPhrase { + t.Errorf("expected Outer custom function to have been called") + } + if obj1.In.Str != testPhrase { + t.Errorf("expected Inner custom function to have been called") + } + + // Continue.Fuzz() + obj2 := Outer{} + c.Fuzz(&obj2) + if obj2.Str != testPhrase { + t.Errorf("expected Outer custom function to have been called") + } + if obj2.In.Str != testPhrase { + t.Errorf("expected Inner custom function to have been called") + } + + // Fuzzer.FuzzNoCustom() + obj3 := Outer{} + f.FuzzNoCustom(&obj3) + if obj3.Str == testPhrase { + t.Errorf("expected Outer custom function to not have been called") + } + if obj3.In.Str != testPhrase { + t.Errorf("expected Inner custom function to have been called") + } + + // Continue.FuzzNoCustom() + obj4 := Outer{} + c.FuzzNoCustom(&obj4) + if obj4.Str == testPhrase { + t.Errorf("expected Outer custom function to not have been called") + } + if obj4.In.Str != testPhrase { + t.Errorf("expected Inner custom function to have been called") + } +} + +func TestFuzz_NumElements(t *testing.T) { + f := New().NilChance(0).NumElements(0, 1) + obj := &struct { + A []int + }{} + + tryFuzz(t, f, obj, func() (int, bool) { + if obj.A == nil { + return 1, false + } + return 2, len(obj.A) == 0 + }) + tryFuzz(t, f, obj, func() (int, bool) { + if obj.A == nil { + return 3, false + } + return 4, len(obj.A) == 1 + }) +} + +func TestFuzz_Maxdepth(t *testing.T) { + type S struct { + S *S + } + + f := New().NilChance(0) + + f.MaxDepth(1) + for i := 0; i < 100; i++ { + obj := S{} + f.Fuzz(&obj) + + if obj.S != nil { + t.Errorf("Expected nil") + } + } + + f.MaxDepth(3) // field, ptr + for i := 0; i < 100; i++ { + obj := S{} + f.Fuzz(&obj) + + if obj.S == nil { + t.Errorf("Expected obj.S not nil") + } else if obj.S.S != nil { + t.Errorf("Expected obj.S.S nil") + } + } + + f.MaxDepth(5) // field, ptr, field, ptr + for i := 0; i < 100; i++ { + obj := S{} + f.Fuzz(&obj) + + if obj.S == nil { + t.Errorf("Expected obj.S not nil") + } else if obj.S.S == nil { + t.Errorf("Expected obj.S.S not nil") + } else if obj.S.S.S != nil { + t.Errorf("Expected obj.S.S.S nil") + } + } +} diff --git a/vendor/github.com/googleapis/gnostic/.gitignore b/vendor/github.com/googleapis/gnostic/.gitignore new file mode 100644 index 000000000..63149fdda --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/.gitignore @@ -0,0 +1,14 @@ +# Eclipse +.checkstyle +.project +.settings +# Swift +.build +Packages +# vi +*.swp +# vscode +.vscode +.DS_Store +*~ +Package.resolved diff --git a/vendor/github.com/googleapis/gnostic/.travis-install.sh b/vendor/github.com/googleapis/gnostic/.travis-install.sh new file mode 100755 index 000000000..83319ae4c --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/.travis-install.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +# +# Install dependencies that aren't available as Ubuntu packages. +# +# Everything goes into $HOME/local. +# +# Scripts should add +# - $HOME/local/bin to PATH +# - $HOME/local/lib to LD_LIBRARY_PATH +# + +cd +mkdir -p local + +# Install swift +SWIFT_URL=https://swift.org/builds/swift-4.0-branch/ubuntu1404/swift-4.0-DEVELOPMENT-SNAPSHOT-2017-09-01-a/swift-4.0-DEVELOPMENT-SNAPSHOT-2017-09-01-a-ubuntu14.04.tar.gz +echo $SWIFT_URL +curl -fSsL $SWIFT_URL -o swift.tar.gz +tar -xzf swift.tar.gz --strip-components=2 --directory=local + +# Install protoc +PROTOC_URL=https://github.com/google/protobuf/releases/download/v3.4.0/protoc-3.4.0-linux-x86_64.zip +echo $PROTOC_URL +curl -fSsL $PROTOC_URL -o protoc.zip +unzip protoc.zip -d local + +# Verify installation +find local diff --git a/vendor/github.com/googleapis/gnostic/.travis.yml b/vendor/github.com/googleapis/gnostic/.travis.yml new file mode 100644 index 000000000..d31126d16 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/.travis.yml @@ -0,0 +1,46 @@ +# Travis CI build file for OpenAPI Compiler, including Go and Swift plugins + +# Use Ubuntu 14.04 +dist: trusty + +sudo: false + +language: go + +addons: + apt: + packages: + - clang-3.8 + - lldb-3.8 + - libicu-dev + - libtool + - libcurl4-openssl-dev + - libbsd-dev + - build-essential + - libssl-dev + - uuid-dev + - curl + - unzip + +install: + - ./.travis-install.sh + - export PATH=.:$HOME/local/bin:$PATH + - make + +script: + - go test . -v + - pushd plugins/gnostic-go-generator/examples/v2.0/bookstore + - make test + - popd + - pushd plugins/gnostic-go-generator/examples/v3.0/bookstore + - make test + - popd + - export PATH=.:$HOME/local/bin:$PATH + - export LD_LIBRARY_PATH=$HOME/local/lib + - pushd plugins/gnostic-swift-generator + - make + - cd examples/bookstore + - make + - .build/debug/Server & + - make test + diff --git a/vendor/github.com/googleapis/gnostic/COMPILE-PROTOS.sh b/vendor/github.com/googleapis/gnostic/COMPILE-PROTOS.sh new file mode 100755 index 000000000..017dab670 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/COMPILE-PROTOS.sh @@ -0,0 +1,34 @@ +#!/bin/sh +# +# Copyright 2016 Google Inc. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +go get github.com/golang/protobuf/protoc-gen-go + +protoc \ +--go_out=Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any:. \ +OpenAPIv2/OpenAPIv2.proto + +protoc \ +--go_out=:. \ +plugins/plugin.proto + +protoc \ +--go_out=Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any:. \ +OpenAPIv3/OpenAPIv3.proto + +protoc \ +--go_out=Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any:. \ +discovery/discovery.proto diff --git a/vendor/github.com/googleapis/gnostic/CONTRIBUTING.md b/vendor/github.com/googleapis/gnostic/CONTRIBUTING.md new file mode 100644 index 000000000..6736efd94 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/CONTRIBUTING.md @@ -0,0 +1,35 @@ +# How to become a contributor and submit your own code + +## Contributor License Agreements + +We'd love to accept your sample apps and patches! Before we can take them, we +have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement +(CLA). + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual CLA] + (https://developers.google.com/open-source/cla/individual). + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA] + (https://developers.google.com/open-source/cla/corporate). + +Follow either of the two links above to access the appropriate CLA and +instructions for how to sign and return it. Once we receive it, we'll be able to +accept your pull requests. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the repo in question. +1. The repo owner will respond to your issue promptly. +1. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement (see details above). +1. Fork the desired repo, develop and test your code changes. +1. Ensure that your code adheres to the existing style in the sample to which + you are contributing. Refer to the + [Google Cloud Platform Samples Style Guide] + (https://github.com/GoogleCloudPlatform/Template/wiki/style.html) for the + recommended coding standards for this organization. +1. Ensure that your code has an appropriate set of unit tests which all pass. +1. Submit a pull request. diff --git a/vendor/github.com/googleapis/gnostic/Makefile b/vendor/github.com/googleapis/gnostic/Makefile new file mode 100644 index 000000000..8a772811e --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/Makefile @@ -0,0 +1,16 @@ + +build: + go get + go install + cd generate-gnostic; go get; go install + cd apps/disco; go get; go install + cd apps/report; go get; go install + cd apps/petstore-builder; go get; go install + cd plugins/gnostic-summary; go get; go install + cd plugins/gnostic-analyze; go get; go install + cd plugins/gnostic-go-generator; go get; go install + rm -f $(GOPATH)/bin/gnostic-go-client $(GOPATH)/bin/gnostic-go-server + ln -s $(GOPATH)/bin/gnostic-go-generator $(GOPATH)/bin/gnostic-go-client + ln -s $(GOPATH)/bin/gnostic-go-generator $(GOPATH)/bin/gnostic-go-server + cd extensions/sample; make + diff --git a/vendor/github.com/googleapis/gnostic/README.md b/vendor/github.com/googleapis/gnostic/README.md new file mode 100644 index 000000000..d350f3f01 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/README.md @@ -0,0 +1,103 @@ +[![Build Status](https://travis-ci.org/googleapis/gnostic.svg?branch=master)](https://travis-ci.org/googleapis/gnostic) + +# ⨁ gnostic + +This repository contains a Go command line tool which converts +JSON and YAML [OpenAPI](https://github.com/OAI/OpenAPI-Specification) +descriptions to and from equivalent Protocol Buffer representations. + +[Protocol Buffers](https://developers.google.com/protocol-buffers/) +provide a language-neutral, platform-neutral, extensible mechanism +for serializing structured data. +**gnostic**'s Protocol Buffer models for the OpenAPI Specification +can be used to generate code that includes data structures with +explicit fields for the elements of an OpenAPI description. +This makes it possible for developers to work with OpenAPI +descriptions in type-safe ways, which is particularly useful +in strongly-typed languages like Go and Swift. + +**gnostic** reads OpenAPI descriptions into +these generated data structures, reports errors, +resolves internal dependencies, and writes the results +in a binary form that can be used in any language that is +supported by the Protocol Buffer tools. +A plugin interface simplifies integration with API +tools written in a variety of different languages, +and when necessary, Protocol Buffer OpenAPI descriptions +can be reexported as JSON or YAML. + +**gnostic** compilation code and OpenAPI Protocol Buffer +models are automatically generated from an +[OpenAPI JSON Schema](https://github.com/OAI/OpenAPI-Specification/blob/master/schemas/v2.0/schema.json). +Source code for the generator is in the [generate-gnostic](generate-gnostic) directory. + +## Disclaimer + +This is prerelease software and work in progress. Feedback and +contributions are welcome, but we currently make no guarantees of +function or stability. + +## Requirements + +**gnostic** can be run in any environment that supports [Go](http://golang.org) +and the [Google Protocol Buffer Compiler](https://github.com/google/protobuf). + +## Installation + +1. Get this package by downloading it with `go get`. + + go get github.com/googleapis/gnostic + +2. [Optional] Build and run the compiler generator. +This uses the OpenAPI JSON schema to generate a Protocol Buffer language file +that describes the OpenAPI specification and a Go-language file of code that +will read a JSON or YAML OpenAPI representation into the generated protocol +buffers. Pre-generated versions of these files are in the OpenAPIv2 directory. + + cd $GOPATH/src/github.com/googleapis/gnostic/generate-gnostic + go install + cd .. + generate-gnostic --v2 + +3. [Optional] Generate Protocol Buffer support code. +A pre-generated version of this file is checked into the OpenAPIv2 directory. +This step requires a local installation of protoc, the Protocol Buffer Compiler. +You can get protoc [here](https://github.com/google/protobuf). + + ./COMPILE-PROTOS.sh + +4. [Optional] Rebuild **gnostic**. This is only necessary if you've performed steps +2 or 3 above. + + go install github.com/googleapis/gnostic + +5. Run **gnostic**. This will create a file in the current directory named "petstore.pb" that contains a binary +Protocol Buffer description of a sample API. + + gnostic --pb-out=. examples/petstore.json + +6. You can also compile files that you specify with a URL. Here's another way to compile the previous +example. This time we're creating "petstore.text", which contains a textual representation of the +Protocol Buffer description. This is mainly for use in testing and debugging. + + gnostic --text-out=petstore.text https://raw.githubusercontent.com/googleapis/gnostic/master/examples/petstore.json + +7. For a sample application, see apps/report. + + go install github.com/googleapis/gnostic/apps/report + report petstore.pb + +8. **gnostic** supports plugins. This builds and runs a sample plugin +that reports some basic information about an API. The "-" causes the plugin to +write its output to stdout. + + go install github.com/googleapis/gnostic/plugins/gnostic-go-sample + gnostic examples/petstore.json --go-sample-out=- + +## Copyright + +Copyright 2017, Google Inc. + +## License + +Released under the Apache 2.0 license. diff --git a/vendor/github.com/googleapis/gnostic/compiler/reader.go b/vendor/github.com/googleapis/gnostic/compiler/reader.go index 604a46a6a..2d4b3303d 100644 --- a/vendor/github.com/googleapis/gnostic/compiler/reader.go +++ b/vendor/github.com/googleapis/gnostic/compiler/reader.go @@ -15,6 +15,7 @@ package compiler import ( + "errors" "fmt" "gopkg.in/yaml.v2" "io/ioutil" @@ -53,11 +54,16 @@ func FetchFile(fileurl string) ([]byte, error) { } return bytes, nil } - log.Printf("Fetching %s", fileurl) + if verboseReader { + log.Printf("Fetching %s", fileurl) + } response, err := http.Get(fileurl) if err != nil { return nil, err } + if response.StatusCode != 200 { + return nil, errors.New(fmt.Sprintf("Error downloading %s: %s", fileurl, response.Status)) + } defer response.Body.Close() bytes, err = ioutil.ReadAll(response.Body) if err == nil { diff --git a/vendor/github.com/googleapis/gnostic/extensions/extension.pb.go b/vendor/github.com/googleapis/gnostic/extensions/extension.pb.go index b14f1f945..7c6b91496 100644 --- a/vendor/github.com/googleapis/gnostic/extensions/extension.pb.go +++ b/vendor/github.com/googleapis/gnostic/extensions/extension.pb.go @@ -193,7 +193,7 @@ func init() { proto.RegisterFile("extension.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ // 355 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x91, 0x4d, 0x4b, 0xf3, 0x40, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x4d, 0x4b, 0xf3, 0x40, 0x1c, 0xc4, 0x49, 0xdf, 0xf2, 0x64, 0x1f, 0xb4, 0xb2, 0x16, 0x8d, 0xe2, 0xa1, 0x04, 0x84, 0x22, 0xb8, 0xa5, 0x0a, 0xde, 0x5b, 0x28, 0xea, 0xc5, 0x96, 0x3d, 0xd4, 0x9b, 0x65, 0x9b, 0xfe, 0xdb, 0x46, 0x92, 0xdd, 0x75, 0xf3, 0x62, 0xfb, 0x55, 0x3c, 0xfa, 0x49, 0x25, 0xbb, 0xd9, 0x7a, 0x50, diff --git a/vendor/github.com/googleapis/gnostic/gnostic.go b/vendor/github.com/googleapis/gnostic/gnostic.go new file mode 100644 index 000000000..80e050503 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/gnostic.go @@ -0,0 +1,550 @@ +// Copyright 2017 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:generate ./COMPILE-PROTOS.sh + +// Gnostic is a tool for building better REST APIs through knowledge. +// +// Gnostic reads declarative descriptions of REST APIs that conform +// to the OpenAPI Specification, reports errors, resolves internal +// dependencies, and puts the results in a binary form that can +// be used in any language that is supported by the Protocol Buffer +// tools. +// +// Gnostic models are validated and typed. This allows API tool +// developers to focus on their product and not worry about input +// validation and type checking. +// +// Gnostic calls plugins that implement a variety of API implementation +// and support features including generation of client and server +// support code. +package main + +import ( + "bytes" + "errors" + "fmt" + "io" + "os" + "os/exec" + "path/filepath" + "regexp" + "strings" + + "github.com/golang/protobuf/proto" + "github.com/googleapis/gnostic/OpenAPIv2" + "github.com/googleapis/gnostic/OpenAPIv3" + "github.com/googleapis/gnostic/compiler" + "github.com/googleapis/gnostic/discovery" + "github.com/googleapis/gnostic/jsonwriter" + plugins "github.com/googleapis/gnostic/plugins" + surface "github.com/googleapis/gnostic/surface" + "gopkg.in/yaml.v2" +) + +const ( // Source Format + SourceFormatUnknown = 0 + SourceFormatOpenAPI2 = 2 + SourceFormatOpenAPI3 = 3 + SourceFormatDiscovery = 4 +) + +// Determine the version of an OpenAPI description read from JSON or YAML. +func getOpenAPIVersionFromInfo(info interface{}) int { + m, ok := compiler.UnpackMap(info) + if !ok { + return SourceFormatUnknown + } + swagger, ok := compiler.MapValueForKey(m, "swagger").(string) + if ok && strings.HasPrefix(swagger, "2.0") { + return SourceFormatOpenAPI2 + } + openapi, ok := compiler.MapValueForKey(m, "openapi").(string) + if ok && strings.HasPrefix(openapi, "3.0") { + return SourceFormatOpenAPI3 + } + kind, ok := compiler.MapValueForKey(m, "kind").(string) + if ok && kind == "discovery#restDescription" { + return SourceFormatDiscovery + } + return SourceFormatUnknown +} + +const ( + pluginPrefix = "gnostic-" + extensionPrefix = "gnostic-x-" +) + +type pluginCall struct { + Name string + Invocation string +} + +// Invokes a plugin. +func (p *pluginCall) perform(document proto.Message, sourceFormat int, sourceName string) error { + if p.Name != "" { + request := &plugins.Request{} + + // Infer the name of the executable by adding the prefix. + executableName := pluginPrefix + p.Name + + // Validate invocation string with regular expression. + invocation := p.Invocation + + // + // Plugin invocations must consist of + // zero or more comma-separated key=value pairs followed by a path. + // If pairs are present, a colon separates them from the path. + // Keys and values must be alphanumeric strings and may contain + // dashes, underscores, periods, or forward slashes. + // A path can contain any characters other than the separators ',', ':', and '='. + // + invocationRegex := regexp.MustCompile(`^([\w-_\/\.]+=[\w-_\/\.]+(,[\w-_\/\.]+=[\w-_\/\.]+)*:)?[^,:=]+$`) + if !invocationRegex.Match([]byte(p.Invocation)) { + return fmt.Errorf("Invalid invocation of %s: %s", executableName, invocation) + } + + invocationParts := strings.Split(p.Invocation, ":") + var outputLocation string + switch len(invocationParts) { + case 1: + outputLocation = invocationParts[0] + case 2: + parameters := strings.Split(invocationParts[0], ",") + for _, keyvalue := range parameters { + pair := strings.Split(keyvalue, "=") + if len(pair) == 2 { + request.Parameters = append(request.Parameters, &plugins.Parameter{Name: pair[0], Value: pair[1]}) + } + } + outputLocation = invocationParts[1] + default: + // badly-formed request + outputLocation = invocationParts[len(invocationParts)-1] + } + + version := &plugins.Version{} + version.Major = 0 + version.Minor = 1 + version.Patch = 0 + request.CompilerVersion = version + + request.OutputPath = outputLocation + + request.SourceName = sourceName + switch sourceFormat { + case SourceFormatOpenAPI2: + request.Openapi2 = document.(*openapi_v2.Document) + request.Surface, _ = surface.NewModelFromOpenAPI2(request.Openapi2) + case SourceFormatOpenAPI3: + request.Openapi3 = document.(*openapi_v3.Document) + request.Surface, _ = surface.NewModelFromOpenAPI3(request.Openapi3) + default: + } + + requestBytes, _ := proto.Marshal(request) + + cmd := exec.Command(executableName, "-plugin") + cmd.Stdin = bytes.NewReader(requestBytes) + cmd.Stderr = os.Stderr + output, err := cmd.Output() + if err != nil { + return err + } + response := &plugins.Response{} + err = proto.Unmarshal(output, response) + if err != nil { + return err + } + + plugins.HandleResponse(response, outputLocation) + } + return nil +} + +func isFile(path string) bool { + fileInfo, err := os.Stat(path) + if err != nil { + return false + } + return !fileInfo.IsDir() +} + +func isDirectory(path string) bool { + fileInfo, err := os.Stat(path) + if err != nil { + return false + } + return fileInfo.IsDir() +} + +// Write bytes to a named file. +// Certain names have special meaning: +// ! writes nothing +// - writes to stdout +// = writes to stderr +// If a directory name is given, the file is written there with +// a name derived from the source and extension arguments. +func writeFile(name string, bytes []byte, source string, extension string) { + var writer io.Writer + if name == "!" { + return + } else if name == "-" { + writer = os.Stdout + } else if name == "=" { + writer = os.Stderr + } else if isDirectory(name) { + base := filepath.Base(source) + // Remove the original source extension. + base = base[0 : len(base)-len(filepath.Ext(base))] + // Build the path that puts the result in the passed-in directory. + filename := name + "/" + base + "." + extension + file, _ := os.Create(filename) + defer file.Close() + writer = file + } else { + file, _ := os.Create(name) + defer file.Close() + writer = file + } + writer.Write(bytes) + if name == "-" || name == "=" { + writer.Write([]byte("\n")) + } +} + +// The Gnostic structure holds global state information for gnostic. +type Gnostic struct { + usage string + sourceName string + binaryOutputPath string + textOutputPath string + yamlOutputPath string + jsonOutputPath string + errorOutputPath string + resolveReferences bool + pluginCalls []*pluginCall + extensionHandlers []compiler.ExtensionHandler + sourceFormat int +} + +// Initialize a structure to store global application state. +func newGnostic() *Gnostic { + g := &Gnostic{} + // Option fields initialize to their default values. + g.usage = ` +Usage: gnostic OPENAPI_SOURCE [OPTIONS] + OPENAPI_SOURCE is the filename or URL of an OpenAPI description to read. +Options: + --pb-out=PATH Write a binary proto to the specified location. + --text-out=PATH Write a text proto to the specified location. + --json-out=PATH Write a json API description to the specified location. + --yaml-out=PATH Write a yaml API description to the specified location. + --errors-out=PATH Write compilation errors to the specified location. + --PLUGIN-out=PATH Run the plugin named gnostic_PLUGIN and write results + to the specified location. + --x-EXTENSION Use the extension named gnostic-x-EXTENSION + to process OpenAPI specification extensions. + --resolve-refs Explicitly resolve $ref references. + This could have problems with recursive definitions. +` + // Initialize internal structures. + g.pluginCalls = make([]*pluginCall, 0) + g.extensionHandlers = make([]compiler.ExtensionHandler, 0) + return g +} + +// Parse command-line options. +func (g *Gnostic) readOptions() { + // plugin processing matches patterns of the form "--PLUGIN-out=PATH" and "--PLUGIN_out=PATH" + pluginRegex := regexp.MustCompile("--(.+)[-_]out=(.+)") + + // extension processing matches patterns of the form "--x-EXTENSION" + extensionRegex := regexp.MustCompile("--x-(.+)") + + for i, arg := range os.Args { + if i == 0 { + continue // skip the tool name + } + var m [][]byte + if m = pluginRegex.FindSubmatch([]byte(arg)); m != nil { + pluginName := string(m[1]) + invocation := string(m[2]) + switch pluginName { + case "pb": + g.binaryOutputPath = invocation + case "text": + g.textOutputPath = invocation + case "json": + g.jsonOutputPath = invocation + case "yaml": + g.yamlOutputPath = invocation + case "errors": + g.errorOutputPath = invocation + default: + p := &pluginCall{Name: pluginName, Invocation: invocation} + g.pluginCalls = append(g.pluginCalls, p) + } + } else if m = extensionRegex.FindSubmatch([]byte(arg)); m != nil { + extensionName := string(m[1]) + extensionHandler := compiler.ExtensionHandler{Name: extensionPrefix + extensionName} + g.extensionHandlers = append(g.extensionHandlers, extensionHandler) + } else if arg == "--resolve-refs" { + g.resolveReferences = true + } else if arg[0] == '-' { + fmt.Fprintf(os.Stderr, "Unknown option: %s.\n%s\n", arg, g.usage) + os.Exit(-1) + } else { + g.sourceName = arg + } + } +} + +// Validate command-line options. +func (g *Gnostic) validateOptions() { + if g.binaryOutputPath == "" && + g.textOutputPath == "" && + g.yamlOutputPath == "" && + g.jsonOutputPath == "" && + g.errorOutputPath == "" && + len(g.pluginCalls) == 0 { + fmt.Fprintf(os.Stderr, "Missing output directives.\n%s\n", g.usage) + os.Exit(-1) + } + if g.sourceName == "" { + fmt.Fprintf(os.Stderr, "No input specified.\n%s\n", g.usage) + os.Exit(-1) + } + // If we get here and the error output is unspecified, write errors to stderr. + if g.errorOutputPath == "" { + g.errorOutputPath = "=" + } +} + +// Generate an error message to be written to stderr or a file. +func (g *Gnostic) errorBytes(err error) []byte { + return []byte("Errors reading " + g.sourceName + "\n" + err.Error()) +} + +// Read an OpenAPI description from YAML or JSON. +func (g *Gnostic) readOpenAPIText(bytes []byte) (message proto.Message, err error) { + info, err := compiler.ReadInfoFromBytes(g.sourceName, bytes) + if err != nil { + return nil, err + } + // Determine the OpenAPI version. + g.sourceFormat = getOpenAPIVersionFromInfo(info) + if g.sourceFormat == SourceFormatUnknown { + return nil, errors.New("unable to identify OpenAPI version") + } + // Compile to the proto model. + if g.sourceFormat == SourceFormatOpenAPI2 { + document, err := openapi_v2.NewDocument(info, compiler.NewContextWithExtensions("$root", nil, &g.extensionHandlers)) + if err != nil { + return nil, err + } + message = document + } else if g.sourceFormat == SourceFormatOpenAPI3 { + document, err := openapi_v3.NewDocument(info, compiler.NewContextWithExtensions("$root", nil, &g.extensionHandlers)) + if err != nil { + return nil, err + } + message = document + } else { + document, err := discovery_v1.NewDocument(info, compiler.NewContextWithExtensions("$root", nil, &g.extensionHandlers)) + if err != nil { + return nil, err + } + message = document + } + return message, err +} + +// Read an OpenAPI binary file. +func (g *Gnostic) readOpenAPIBinary(data []byte) (message proto.Message, err error) { + // try to read an OpenAPI v3 document + documentV3 := &openapi_v3.Document{} + err = proto.Unmarshal(data, documentV3) + if err == nil && strings.HasPrefix(documentV3.Openapi, "3.0") { + g.sourceFormat = SourceFormatOpenAPI3 + return documentV3, nil + } + // if that failed, try to read an OpenAPI v2 document + documentV2 := &openapi_v2.Document{} + err = proto.Unmarshal(data, documentV2) + if err == nil && strings.HasPrefix(documentV2.Swagger, "2.0") { + g.sourceFormat = SourceFormatOpenAPI2 + return documentV2, nil + } + // if that failed, try to read a Discovery Format document + discoveryDocument := &discovery_v1.Document{} + err = proto.Unmarshal(data, discoveryDocument) + if err == nil { // && strings.HasPrefix(documentV2.Swagger, "2.0") { + g.sourceFormat = SourceFormatDiscovery + return discoveryDocument, nil + } + return nil, err +} + +// Write a binary pb representation. +func (g *Gnostic) writeBinaryOutput(message proto.Message) { + protoBytes, err := proto.Marshal(message) + if err != nil { + writeFile(g.errorOutputPath, g.errorBytes(err), g.sourceName, "errors") + defer os.Exit(-1) + } else { + writeFile(g.binaryOutputPath, protoBytes, g.sourceName, "pb") + } +} + +// Write a text pb representation. +func (g *Gnostic) writeTextOutput(message proto.Message) { + bytes := []byte(proto.MarshalTextString(message)) + writeFile(g.textOutputPath, bytes, g.sourceName, "text") +} + +// Write JSON/YAML OpenAPI representations. +func (g *Gnostic) writeJSONYAMLOutput(message proto.Message) { + // Convert the OpenAPI document into an exportable MapSlice. + var rawInfo yaml.MapSlice + var ok bool + var err error + if g.sourceFormat == SourceFormatOpenAPI2 { + document := message.(*openapi_v2.Document) + rawInfo, ok = document.ToRawInfo().(yaml.MapSlice) + if !ok { + rawInfo = nil + } + } else if g.sourceFormat == SourceFormatOpenAPI3 { + document := message.(*openapi_v3.Document) + rawInfo, ok = document.ToRawInfo().(yaml.MapSlice) + if !ok { + rawInfo = nil + } + } else if g.sourceFormat == SourceFormatDiscovery { + document := message.(*discovery_v1.Document) + rawInfo, ok = document.ToRawInfo().(yaml.MapSlice) + if !ok { + rawInfo = nil + } + } + // Optionally write description in yaml format. + if g.yamlOutputPath != "" { + var bytes []byte + if rawInfo != nil { + bytes, err = yaml.Marshal(rawInfo) + if err != nil { + fmt.Fprintf(os.Stderr, "Error generating yaml output %s\n", err.Error()) + } + writeFile(g.yamlOutputPath, bytes, g.sourceName, "yaml") + } else { + fmt.Fprintf(os.Stderr, "No yaml output available.\n") + } + } + // Optionally write description in json format. + if g.jsonOutputPath != "" { + var bytes []byte + if rawInfo != nil { + bytes, _ = jsonwriter.Marshal(rawInfo) + if err != nil { + fmt.Fprintf(os.Stderr, "Error generating json output %s\n", err.Error()) + } + writeFile(g.jsonOutputPath, bytes, g.sourceName, "json") + } else { + fmt.Fprintf(os.Stderr, "No json output available.\n") + } + } +} + +// Perform all actions specified in the command-line options. +func (g *Gnostic) performActions(message proto.Message) (err error) { + // Optionally resolve internal references. + if g.resolveReferences { + if g.sourceFormat == SourceFormatOpenAPI2 { + document := message.(*openapi_v2.Document) + _, err = document.ResolveReferences(g.sourceName) + } else if g.sourceFormat == SourceFormatOpenAPI3 { + document := message.(*openapi_v3.Document) + _, err = document.ResolveReferences(g.sourceName) + } + if err != nil { + return err + } + } + // Optionally write proto in binary format. + if g.binaryOutputPath != "" { + g.writeBinaryOutput(message) + } + // Optionally write proto in text format. + if g.textOutputPath != "" { + g.writeTextOutput(message) + } + // Optionaly write document in yaml and/or json formats. + if g.yamlOutputPath != "" || g.jsonOutputPath != "" { + g.writeJSONYAMLOutput(message) + } + // Call all specified plugins. + for _, p := range g.pluginCalls { + err := p.perform(message, g.sourceFormat, g.sourceName) + if err != nil { + writeFile(g.errorOutputPath, g.errorBytes(err), g.sourceName, "errors") + defer os.Exit(-1) // run all plugins, even when some have errors + } + } + return nil +} + +func (g *Gnostic) main() { + var err error + g.readOptions() + g.validateOptions() + // Read the OpenAPI source. + bytes, err := compiler.ReadBytesForFile(g.sourceName) + if err != nil { + writeFile(g.errorOutputPath, g.errorBytes(err), g.sourceName, "errors") + os.Exit(-1) + } + extension := strings.ToLower(filepath.Ext(g.sourceName)) + var message proto.Message + if extension == ".json" || extension == ".yaml" { + // Try to read the source as JSON/YAML. + message, err = g.readOpenAPIText(bytes) + if err != nil { + writeFile(g.errorOutputPath, g.errorBytes(err), g.sourceName, "errors") + os.Exit(-1) + } + } else if extension == ".pb" { + // Try to read the source as a binary protocol buffer. + message, err = g.readOpenAPIBinary(bytes) + if err != nil { + writeFile(g.errorOutputPath, g.errorBytes(err), g.sourceName, "errors") + os.Exit(-1) + } + } else { + err = errors.New("unknown file extension. 'json', 'yaml', and 'pb' are accepted") + writeFile(g.errorOutputPath, g.errorBytes(err), g.sourceName, "errors") + os.Exit(-1) + } + // Perform actions specified by command options. + err = g.performActions(message) + if err != nil { + writeFile(g.errorOutputPath, g.errorBytes(err), g.sourceName, "errors") + os.Exit(-1) + } +} + +func main() { + g := newGnostic() + g.main() +} diff --git a/vendor/github.com/googleapis/gnostic/gnostic_test.go b/vendor/github.com/googleapis/gnostic/gnostic_test.go new file mode 100644 index 000000000..22eaee827 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/gnostic_test.go @@ -0,0 +1,453 @@ +package main + +import ( + "io/ioutil" + "os" + "os/exec" + "path/filepath" + "strings" + "testing" +) + +func testCompiler(t *testing.T, inputFile string, referenceFile string, expectErrors bool) { + textFile := strings.Replace(filepath.Base(inputFile), filepath.Ext(inputFile), ".text", 1) + errorsFile := strings.Replace(filepath.Base(inputFile), filepath.Ext(inputFile), ".errors", 1) + // remove any preexisting output files + os.Remove(textFile) + os.Remove(errorsFile) + // run the compiler + var err error + var cmd = exec.Command( + "gnostic", + inputFile, + "--text-out=.", + "--errors-out=.", + "--resolve-refs") + //t.Log(cmd.Args) + err = cmd.Run() + if err != nil && !expectErrors { + t.Logf("Compile failed: %+v", err) + t.FailNow() + } + // verify the output against a reference + var outputFile string + if expectErrors { + outputFile = errorsFile + } else { + outputFile = textFile + } + err = exec.Command("diff", outputFile, referenceFile).Run() + if err != nil { + t.Logf("Diff failed: %+v", err) + t.FailNow() + } else { + // if the test succeeded, clean up + os.Remove(textFile) + os.Remove(errorsFile) + } +} + +func testNormal(t *testing.T, inputFile string, referenceFile string) { + testCompiler(t, inputFile, referenceFile, false) +} + +func testErrors(t *testing.T, inputFile string, referenceFile string) { + testCompiler(t, inputFile, referenceFile, true) +} + +func TestPetstoreJSON(t *testing.T) { + testNormal(t, + "examples/v2.0/json/petstore.json", + "test/v2.0/petstore.text") +} + +func TestPetstoreYAML(t *testing.T) { + testNormal(t, + "examples/v2.0/yaml/petstore.yaml", + "test/v2.0/petstore.text") +} + +func TestSeparateYAML(t *testing.T) { + testNormal(t, + "examples/v2.0/yaml/petstore-separate/spec/swagger.yaml", + "test/v2.0/yaml/petstore-separate/spec/swagger.text") +} + +func TestSeparateJSON(t *testing.T) { + testNormal(t, + "examples/v2.0/json/petstore-separate/spec/swagger.json", + "test/v2.0/yaml/petstore-separate/spec/swagger.text") // yaml and json results should be identical +} + +func TestRemotePetstoreJSON(t *testing.T) { + testNormal(t, + "https://raw.githubusercontent.com/googleapis/openapi-compiler/master/examples/v2.0/json/petstore.json", + "test/v2.0/petstore.text") +} + +func TestRemotePetstoreYAML(t *testing.T) { + testNormal(t, + "https://raw.githubusercontent.com/googleapis/openapi-compiler/master/examples/v2.0/yaml/petstore.yaml", + "test/v2.0/petstore.text") +} + +func TestRemoteSeparateYAML(t *testing.T) { + testNormal(t, + "https://raw.githubusercontent.com/googleapis/openapi-compiler/master/examples/v2.0/yaml/petstore-separate/spec/swagger.yaml", + "test/v2.0/yaml/petstore-separate/spec/swagger.text") +} + +func TestRemoteSeparateJSON(t *testing.T) { + testNormal(t, + "https://raw.githubusercontent.com/googleapis/openapi-compiler/master/examples/v2.0/json/petstore-separate/spec/swagger.json", + "test/v2.0/yaml/petstore-separate/spec/swagger.text") +} + +func TestErrorBadProperties(t *testing.T) { + testErrors(t, + "examples/errors/petstore-badproperties.yaml", + "test/errors/petstore-badproperties.errors") +} + +func TestErrorUnresolvedRefs(t *testing.T) { + testErrors(t, + "examples/errors/petstore-unresolvedrefs.yaml", + "test/errors/petstore-unresolvedrefs.errors") +} + +func TestErrorMissingVersion(t *testing.T) { + testErrors(t, + "examples/errors/petstore-missingversion.yaml", + "test/errors/petstore-missingversion.errors") +} + +func testPlugin(t *testing.T, plugin string, inputFile string, outputFile string, referenceFile string) { + // remove any preexisting output files + os.Remove(outputFile) + // run the compiler + var err error + output, err := exec.Command( + "gnostic", + "--"+plugin+"-out=-", + inputFile).Output() + if err != nil { + t.Logf("Compile failed: %+v", err) + t.FailNow() + } + _ = ioutil.WriteFile(outputFile, output, 0644) + err = exec.Command("diff", outputFile, referenceFile).Run() + if err != nil { + t.Logf("Diff failed: %+v", err) + t.FailNow() + } else { + // if the test succeeded, clean up + os.Remove(outputFile) + } +} + +func TestSamplePluginWithPetstore(t *testing.T) { + testPlugin(t, + "summary", + "examples/v2.0/yaml/petstore.yaml", + "sample-petstore.out", + "test/v2.0/yaml/sample-petstore.out") +} + +func TestErrorInvalidPluginInvocations(t *testing.T) { + var err error + output, err := exec.Command( + "gnostic", + "examples/v2.0/yaml/petstore.yaml", + "--errors-out=-", + "--plugin-out=foo=bar,:abc", + "--plugin-out=,foo=bar:abc", + "--plugin-out=foo=:abc", + "--plugin-out==bar:abc", + "--plugin-out=,,:abc", + "--plugin-out=foo=bar=baz:abc", + ).Output() + if err == nil { + t.Logf("Invalid invocations were accepted") + t.FailNow() + } + outputFile := "invalid-plugin-invocation.errors" + _ = ioutil.WriteFile(outputFile, output, 0644) + err = exec.Command("diff", outputFile, "test/errors/invalid-plugin-invocation.errors").Run() + if err != nil { + t.Logf("Diff failed: %+v", err) + t.FailNow() + } else { + // if the test succeeded, clean up + os.Remove(outputFile) + } +} + +func TestValidPluginInvocations(t *testing.T) { + var err error + output, err := exec.Command( + "gnostic", + "examples/v2.0/yaml/petstore.yaml", + "--errors-out=-", + // verify an invocation with no parameters + "--summary-out=!", // "!" indicates that no output should be generated + // verify single pair of parameters + "--summary-out=a=b:!", + // verify multiple parameters + "--summary-out=a=b,c=123,xyz=alphabetagammadelta:!", + // verify that special characters / . - _ can be included in parameter keys and values + "--summary-out=a/b/c=x/y/z:!", + "--summary-out=a.b.c=x.y.z:!", + "--summary-out=a-b-c=x-y-z:!", + "--summary-out=a_b_c=x_y_z:!", + ).Output() + if len(output) != 0 { + t.Logf("Valid invocations generated invalid errors\n%s", string(output)) + t.FailNow() + } + if err != nil { + t.Logf("Valid invocations were not accepted") + t.FailNow() + } +} + +func TestExtensionHandlerWithLibraryExample(t *testing.T) { + outputFile := "library-example-with-ext.text.out" + inputFile := "test/library-example-with-ext.json" + referenceFile := "test/library-example-with-ext.text.out" + + os.Remove(outputFile) + // run the compiler + var err error + + command := exec.Command( + "gnostic", + "--x-sampleone", + "--x-sampletwo", + "--text-out="+outputFile, + "--resolve-refs", + inputFile) + + _, err = command.Output() + if err != nil { + t.Logf("Compile failed for command %v: %+v", command, err) + t.FailNow() + } + //_ = ioutil.WriteFile(outputFile, output, 0644) + err = exec.Command("diff", outputFile, referenceFile).Run() + if err != nil { + t.Logf("Diff failed: %+v", err) + t.FailNow() + } else { + // if the test succeeded, clean up + os.Remove(outputFile) + } +} + +func TestJSONOutput(t *testing.T) { + inputFile := "test/library-example-with-ext.json" + + textFile := "sample.text" + jsonFile := "sample.json" + textFile2 := "sample2.text" + jsonFile2 := "sample2.json" + + os.Remove(textFile) + os.Remove(jsonFile) + os.Remove(textFile2) + os.Remove(jsonFile2) + + var err error + + // Run the compiler once. + command := exec.Command( + "gnostic", + "--text-out="+textFile, + "--json-out="+jsonFile, + inputFile) + _, err = command.Output() + if err != nil { + t.Logf("Compile failed for command %v: %+v", command, err) + t.FailNow() + } + + // Run the compiler again, this time on the generated output. + command = exec.Command( + "gnostic", + "--text-out="+textFile2, + "--json-out="+jsonFile2, + jsonFile) + _, err = command.Output() + if err != nil { + t.Logf("Compile failed for command %v: %+v", command, err) + t.FailNow() + } + + // Verify that both models have the same internal representation. + err = exec.Command("diff", textFile, textFile2).Run() + if err != nil { + t.Logf("Diff failed: %+v", err) + t.FailNow() + } else { + // if the test succeeded, clean up + os.Remove(textFile) + os.Remove(jsonFile) + os.Remove(textFile2) + os.Remove(jsonFile2) + } +} + +func TestYAMLOutput(t *testing.T) { + inputFile := "test/library-example-with-ext.json" + + textFile := "sample.text" + yamlFile := "sample.yaml" + textFile2 := "sample2.text" + yamlFile2 := "sample2.yaml" + + os.Remove(textFile) + os.Remove(yamlFile) + os.Remove(textFile2) + os.Remove(yamlFile2) + + var err error + + // Run the compiler once. + command := exec.Command( + "gnostic", + "--text-out="+textFile, + "--yaml-out="+yamlFile, + inputFile) + _, err = command.Output() + if err != nil { + t.Logf("Compile failed for command %v: %+v", command, err) + t.FailNow() + } + + // Run the compiler again, this time on the generated output. + command = exec.Command( + "gnostic", + "--text-out="+textFile2, + "--yaml-out="+yamlFile2, + yamlFile) + _, err = command.Output() + if err != nil { + t.Logf("Compile failed for command %v: %+v", command, err) + t.FailNow() + } + + // Verify that both models have the same internal representation. + err = exec.Command("diff", textFile, textFile2).Run() + if err != nil { + t.Logf("Diff failed: %+v", err) + t.FailNow() + } else { + // if the test succeeded, clean up + os.Remove(textFile) + os.Remove(yamlFile) + os.Remove(textFile2) + os.Remove(yamlFile2) + } +} + +func testBuilder(version string, t *testing.T) { + var err error + + pbFile := "petstore-" + version + ".pb" + yamlFile := "petstore.yaml" + jsonFile := "petstore.json" + textFile := "petstore.text" + textReference := "test/" + version + ".0/petstore.text" + + os.Remove(pbFile) + os.Remove(textFile) + os.Remove(yamlFile) + os.Remove(jsonFile) + + // Generate petstore.pb. + command := exec.Command( + "petstore-builder", + "--"+version) + _, err = command.Output() + if err != nil { + t.Logf("Command %v failed: %+v", command, err) + t.FailNow() + } + + // Convert petstore.pb to yaml and json. + command = exec.Command( + "gnostic", + pbFile, + "--json-out="+jsonFile, + "--yaml-out="+yamlFile) + _, err = command.Output() + if err != nil { + t.Logf("Command %v failed: %+v", command, err) + t.FailNow() + } + + // Read petstore.yaml, resolve references, and export text. + command = exec.Command( + "gnostic", + yamlFile, + "--resolve-refs", + "--text-out="+textFile) + _, err = command.Output() + if err != nil { + t.Logf("Command %v failed: %+v", command, err) + t.FailNow() + } + + // Verify that the generated text matches our reference. + err = exec.Command("diff", textFile, textReference).Run() + if err != nil { + t.Logf("Diff failed: %+v", err) + t.FailNow() + } + + // Read petstore.json, resolve references, and export text. + command = exec.Command( + "gnostic", + jsonFile, + "--resolve-refs", + "--text-out="+textFile) + _, err = command.Output() + if err != nil { + t.Logf("Command %v failed: %+v", command, err) + t.FailNow() + } + + // Verify that the generated text matches our reference. + err = exec.Command("diff", textFile, textReference).Run() + if err != nil { + t.Logf("Diff failed: %+v", err) + t.FailNow() + } + + // if the test succeeded, clean up + os.Remove(pbFile) + os.Remove(textFile) + os.Remove(yamlFile) + os.Remove(jsonFile) +} + +func TestBuilderV2(t *testing.T) { + testBuilder("v2", t) +} + +func TestBuilderV3(t *testing.T) { + testBuilder("v3", t) +} + +// OpenAPI 3.0 tests + +func TestPetstoreYAML_30(t *testing.T) { + testNormal(t, + "examples/v3.0/yaml/petstore.yaml", + "test/v3.0/petstore.text") +} + +func TestPetstoreJSON_30(t *testing.T) { + testNormal(t, + "examples/v3.0/json/petstore.json", + "test/v3.0/petstore.text") +} diff --git a/vendor/github.com/gorilla/websocket/AUTHORS b/vendor/github.com/gorilla/websocket/AUTHORS deleted file mode 100644 index b003eca0c..000000000 --- a/vendor/github.com/gorilla/websocket/AUTHORS +++ /dev/null @@ -1,8 +0,0 @@ -# This is the official list of Gorilla WebSocket authors for copyright -# purposes. -# -# Please keep the list sorted. - -Gary Burd -Joachim Bauch - diff --git a/vendor/github.com/gorilla/websocket/LICENSE b/vendor/github.com/gorilla/websocket/LICENSE deleted file mode 100644 index 9171c9722..000000000 --- a/vendor/github.com/gorilla/websocket/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2013 The Gorilla WebSocket Authors. 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. - -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 HOLDER 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/vendor/github.com/gorilla/websocket/README.md b/vendor/github.com/gorilla/websocket/README.md deleted file mode 100644 index 9ad75a0f5..000000000 --- a/vendor/github.com/gorilla/websocket/README.md +++ /dev/null @@ -1,59 +0,0 @@ -# Gorilla WebSocket - -Gorilla WebSocket is a [Go](http://golang.org/) implementation of the -[WebSocket](http://www.rfc-editor.org/rfc/rfc6455.txt) protocol. - -### Documentation - -* [API Reference](http://godoc.org/github.com/gorilla/websocket) -* [Chat example](https://github.com/gorilla/websocket/tree/master/examples/chat) -* [File watch example](https://github.com/gorilla/websocket/tree/master/examples/filewatch) - -### Status - -The Gorilla WebSocket package provides a complete and tested implementation of -the [WebSocket](http://www.rfc-editor.org/rfc/rfc6455.txt) protocol. The -package API is stable. - -### Installation - - go get github.com/gorilla/websocket - -### Protocol Compliance - -The Gorilla WebSocket package passes the server tests in the [Autobahn Test -Suite](http://autobahn.ws/testsuite) using the application in the [examples/autobahn -subdirectory](https://github.com/gorilla/websocket/tree/master/examples/autobahn). - -### Gorilla WebSocket compared with other packages - - - - - - - - - - - - - - - - - - -
github.com/gorillagolang.org/x/net
RFC 6455 Features
Passes Autobahn Test SuiteYesNo
Receive fragmented messageYesNo, see note 1
Send close messageYesNo
Send pings and receive pongsYesNo
Get the type of a received data messageYesYes, see note 2
Other Features
Limit size of received messageYesNo
Read message using io.ReaderYesNo, see note 3
Write message using io.WriteCloserYesNo, see note 3
- -Notes: - -1. Large messages are fragmented in [Chrome's new WebSocket implementation](http://www.ietf.org/mail-archive/web/hybi/current/msg10503.html). -2. The application can get the type of a received data message by implementing - a [Codec marshal](http://godoc.org/golang.org/x/net/websocket#Codec.Marshal) - function. -3. The go.net io.Reader and io.Writer operate across WebSocket frame boundaries. - Read returns when the input buffer is full or a frame boundary is - encountered. Each call to Write sends a single frame message. The Gorilla - io.Reader and io.WriteCloser operate on a single WebSocket message. - diff --git a/vendor/github.com/gorilla/websocket/client.go b/vendor/github.com/gorilla/websocket/client.go deleted file mode 100644 index 93db8ddc3..000000000 --- a/vendor/github.com/gorilla/websocket/client.go +++ /dev/null @@ -1,269 +0,0 @@ -// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package websocket - -import ( - "bytes" - "crypto/tls" - "errors" - "io" - "io/ioutil" - "net" - "net/http" - "net/url" - "strings" - "time" -) - -// ErrBadHandshake is returned when the server response to opening handshake is -// invalid. -var ErrBadHandshake = errors.New("websocket: bad handshake") - -// NewClient creates a new client connection using the given net connection. -// The URL u specifies the host and request URI. Use requestHeader to specify -// the origin (Origin), subprotocols (Sec-WebSocket-Protocol) and cookies -// (Cookie). Use the response.Header to get the selected subprotocol -// (Sec-WebSocket-Protocol) and cookies (Set-Cookie). -// -// If the WebSocket handshake fails, ErrBadHandshake is returned along with a -// non-nil *http.Response so that callers can handle redirects, authentication, -// etc. -func NewClient(netConn net.Conn, u *url.URL, requestHeader http.Header, readBufSize, writeBufSize int) (c *Conn, response *http.Response, err error) { - challengeKey, err := generateChallengeKey() - if err != nil { - return nil, nil, err - } - acceptKey := computeAcceptKey(challengeKey) - - c = newConn(netConn, false, readBufSize, writeBufSize) - p := c.writeBuf[:0] - p = append(p, "GET "...) - p = append(p, u.RequestURI()...) - p = append(p, " HTTP/1.1\r\nHost: "...) - p = append(p, u.Host...) - // "Upgrade" is capitalized for servers that do not use case insensitive - // comparisons on header tokens. - p = append(p, "\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Version: 13\r\nSec-WebSocket-Key: "...) - p = append(p, challengeKey...) - p = append(p, "\r\n"...) - for k, vs := range requestHeader { - for _, v := range vs { - p = append(p, k...) - p = append(p, ": "...) - p = append(p, v...) - p = append(p, "\r\n"...) - } - } - p = append(p, "\r\n"...) - - if _, err := netConn.Write(p); err != nil { - return nil, nil, err - } - - resp, err := http.ReadResponse(c.br, &http.Request{Method: "GET", URL: u}) - if err != nil { - return nil, nil, err - } - if resp.StatusCode != 101 || - !strings.EqualFold(resp.Header.Get("Upgrade"), "websocket") || - !strings.EqualFold(resp.Header.Get("Connection"), "upgrade") || - resp.Header.Get("Sec-Websocket-Accept") != acceptKey { - return nil, resp, ErrBadHandshake - } - c.subprotocol = resp.Header.Get("Sec-Websocket-Protocol") - return c, resp, nil -} - -// A Dialer contains options for connecting to WebSocket server. -type Dialer struct { - // NetDial specifies the dial function for creating TCP connections. If - // NetDial is nil, net.Dial is used. - NetDial func(network, addr string) (net.Conn, error) - - // TLSClientConfig specifies the TLS configuration to use with tls.Client. - // If nil, the default configuration is used. - TLSClientConfig *tls.Config - - // HandshakeTimeout specifies the duration for the handshake to complete. - HandshakeTimeout time.Duration - - // Input and output buffer sizes. If the buffer size is zero, then a - // default value of 4096 is used. - ReadBufferSize, WriteBufferSize int - - // Subprotocols specifies the client's requested subprotocols. - Subprotocols []string -} - -var errMalformedURL = errors.New("malformed ws or wss URL") - -// parseURL parses the URL. The url.Parse function is not used here because -// url.Parse mangles the path. -func parseURL(s string) (*url.URL, error) { - // From the RFC: - // - // ws-URI = "ws:" "//" host [ ":" port ] path [ "?" query ] - // wss-URI = "wss:" "//" host [ ":" port ] path [ "?" query ] - // - // We don't use the net/url parser here because the dialer interface does - // not provide a way for applications to work around percent deocding in - // the net/url parser. - - var u url.URL - switch { - case strings.HasPrefix(s, "ws://"): - u.Scheme = "ws" - s = s[len("ws://"):] - case strings.HasPrefix(s, "wss://"): - u.Scheme = "wss" - s = s[len("wss://"):] - default: - return nil, errMalformedURL - } - - u.Host = s - u.Opaque = "/" - if i := strings.Index(s, "/"); i >= 0 { - u.Host = s[:i] - u.Opaque = s[i:] - } - - if strings.Contains(u.Host, "@") { - // WebSocket URIs do not contain user information. - return nil, errMalformedURL - } - - return &u, nil -} - -func hostPortNoPort(u *url.URL) (hostPort, hostNoPort string) { - hostPort = u.Host - hostNoPort = u.Host - if i := strings.LastIndex(u.Host, ":"); i > strings.LastIndex(u.Host, "]") { - hostNoPort = hostNoPort[:i] - } else { - if u.Scheme == "wss" { - hostPort += ":443" - } else { - hostPort += ":80" - } - } - return hostPort, hostNoPort -} - -// DefaultDialer is a dialer with all fields set to the default zero values. -var DefaultDialer *Dialer - -// Dial creates a new client connection. Use requestHeader to specify the -// origin (Origin), subprotocols (Sec-WebSocket-Protocol) and cookies (Cookie). -// Use the response.Header to get the selected subprotocol -// (Sec-WebSocket-Protocol) and cookies (Set-Cookie). -// -// If the WebSocket handshake fails, ErrBadHandshake is returned along with a -// non-nil *http.Response so that callers can handle redirects, authentication, -// etcetera. The response body may not contain the entire response and does not -// need to be closed by the application. -func (d *Dialer) Dial(urlStr string, requestHeader http.Header) (*Conn, *http.Response, error) { - u, err := parseURL(urlStr) - if err != nil { - return nil, nil, err - } - - hostPort, hostNoPort := hostPortNoPort(u) - - if d == nil { - d = &Dialer{} - } - - var deadline time.Time - if d.HandshakeTimeout != 0 { - deadline = time.Now().Add(d.HandshakeTimeout) - } - - netDial := d.NetDial - if netDial == nil { - netDialer := &net.Dialer{Deadline: deadline} - netDial = netDialer.Dial - } - - netConn, err := netDial("tcp", hostPort) - if err != nil { - return nil, nil, err - } - - defer func() { - if netConn != nil { - netConn.Close() - } - }() - - if err := netConn.SetDeadline(deadline); err != nil { - return nil, nil, err - } - - if u.Scheme == "wss" { - cfg := d.TLSClientConfig - if cfg == nil { - cfg = &tls.Config{ServerName: hostNoPort} - } else if cfg.ServerName == "" { - shallowCopy := *cfg - cfg = &shallowCopy - cfg.ServerName = hostNoPort - } - tlsConn := tls.Client(netConn, cfg) - netConn = tlsConn - if err := tlsConn.Handshake(); err != nil { - return nil, nil, err - } - if !cfg.InsecureSkipVerify { - if err := tlsConn.VerifyHostname(cfg.ServerName); err != nil { - return nil, nil, err - } - } - } - - if len(d.Subprotocols) > 0 { - h := http.Header{} - for k, v := range requestHeader { - h[k] = v - } - h.Set("Sec-Websocket-Protocol", strings.Join(d.Subprotocols, ", ")) - requestHeader = h - } - - if len(requestHeader["Host"]) > 0 { - // This can be used to supply a Host: header which is different from - // the dial address. - u.Host = requestHeader.Get("Host") - - // Drop "Host" header - h := http.Header{} - for k, v := range requestHeader { - if k == "Host" { - continue - } - h[k] = v - } - requestHeader = h - } - - conn, resp, err := NewClient(netConn, u, requestHeader, d.ReadBufferSize, d.WriteBufferSize) - - if err != nil { - if err == ErrBadHandshake { - // Before closing the network connection on return from this - // function, slurp up some of the response to aid application - // debugging. - buf := make([]byte, 1024) - n, _ := io.ReadFull(resp.Body, buf) - resp.Body = ioutil.NopCloser(bytes.NewReader(buf[:n])) - } - return nil, resp, err - } - - netConn.SetDeadline(time.Time{}) - netConn = nil // to avoid close in defer. - return conn, resp, nil -} diff --git a/vendor/github.com/gorilla/websocket/conn.go b/vendor/github.com/gorilla/websocket/conn.go deleted file mode 100644 index e719f1ce6..000000000 --- a/vendor/github.com/gorilla/websocket/conn.go +++ /dev/null @@ -1,825 +0,0 @@ -// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package websocket - -import ( - "bufio" - "encoding/binary" - "errors" - "io" - "io/ioutil" - "math/rand" - "net" - "strconv" - "time" -) - -const ( - maxFrameHeaderSize = 2 + 8 + 4 // Fixed header + length + mask - maxControlFramePayloadSize = 125 - finalBit = 1 << 7 - maskBit = 1 << 7 - writeWait = time.Second - - defaultReadBufferSize = 4096 - defaultWriteBufferSize = 4096 - - continuationFrame = 0 - noFrame = -1 -) - -// Close codes defined in RFC 6455, section 11.7. -const ( - CloseNormalClosure = 1000 - CloseGoingAway = 1001 - CloseProtocolError = 1002 - CloseUnsupportedData = 1003 - CloseNoStatusReceived = 1005 - CloseAbnormalClosure = 1006 - CloseInvalidFramePayloadData = 1007 - ClosePolicyViolation = 1008 - CloseMessageTooBig = 1009 - CloseMandatoryExtension = 1010 - CloseInternalServerErr = 1011 - CloseTLSHandshake = 1015 -) - -// The message types are defined in RFC 6455, section 11.8. -const ( - // TextMessage denotes a text data message. The text message payload is - // interpreted as UTF-8 encoded text data. - TextMessage = 1 - - // BinaryMessage denotes a binary data message. - BinaryMessage = 2 - - // CloseMessage denotes a close control message. The optional message - // payload contains a numeric code and text. Use the FormatCloseMessage - // function to format a close message payload. - CloseMessage = 8 - - // PingMessage denotes a ping control message. The optional message payload - // is UTF-8 encoded text. - PingMessage = 9 - - // PongMessage denotes a ping control message. The optional message payload - // is UTF-8 encoded text. - PongMessage = 10 -) - -// ErrCloseSent is returned when the application writes a message to the -// connection after sending a close message. -var ErrCloseSent = errors.New("websocket: close sent") - -// ErrReadLimit is returned when reading a message that is larger than the -// read limit set for the connection. -var ErrReadLimit = errors.New("websocket: read limit exceeded") - -// netError satisfies the net Error interface. -type netError struct { - msg string - temporary bool - timeout bool -} - -func (e *netError) Error() string { return e.msg } -func (e *netError) Temporary() bool { return e.temporary } -func (e *netError) Timeout() bool { return e.timeout } - -// closeError represents close frame. -type closeError struct { - code int - text string -} - -func (e *closeError) Error() string { - return "websocket: close " + strconv.Itoa(e.code) + " " + e.text -} - -var ( - errWriteTimeout = &netError{msg: "websocket: write timeout", timeout: true} - errUnexpectedEOF = &closeError{code: CloseAbnormalClosure, text: io.ErrUnexpectedEOF.Error()} - errBadWriteOpCode = errors.New("websocket: bad write message type") - errWriteClosed = errors.New("websocket: write closed") - errInvalidControlFrame = errors.New("websocket: invalid control frame") -) - -func hideTempErr(err error) error { - if e, ok := err.(net.Error); ok && e.Temporary() { - err = &netError{msg: e.Error(), timeout: e.Timeout()} - } - return err -} - -func isControl(frameType int) bool { - return frameType == CloseMessage || frameType == PingMessage || frameType == PongMessage -} - -func isData(frameType int) bool { - return frameType == TextMessage || frameType == BinaryMessage -} - -func maskBytes(key [4]byte, pos int, b []byte) int { - for i := range b { - b[i] ^= key[pos&3] - pos++ - } - return pos & 3 -} - -func newMaskKey() [4]byte { - n := rand.Uint32() - return [4]byte{byte(n), byte(n >> 8), byte(n >> 16), byte(n >> 24)} -} - -// Conn represents a WebSocket connection. -type Conn struct { - conn net.Conn - isServer bool - subprotocol string - - // Write fields - mu chan bool // used as mutex to protect write to conn and closeSent - closeSent bool // true if close message was sent - - // Message writer fields. - writeErr error - writeBuf []byte // frame is constructed in this buffer. - writePos int // end of data in writeBuf. - writeFrameType int // type of the current frame. - writeSeq int // incremented to invalidate message writers. - writeDeadline time.Time - - // Read fields - readErr error - br *bufio.Reader - readRemaining int64 // bytes remaining in current frame. - readFinal bool // true the current message has more frames. - readSeq int // incremented to invalidate message readers. - readLength int64 // Message size. - readLimit int64 // Maximum message size. - readMaskPos int - readMaskKey [4]byte - handlePong func(string) error - handlePing func(string) error -} - -func newConn(conn net.Conn, isServer bool, readBufferSize, writeBufferSize int) *Conn { - mu := make(chan bool, 1) - mu <- true - - if readBufferSize == 0 { - readBufferSize = defaultReadBufferSize - } - if writeBufferSize == 0 { - writeBufferSize = defaultWriteBufferSize - } - - c := &Conn{ - isServer: isServer, - br: bufio.NewReaderSize(conn, readBufferSize), - conn: conn, - mu: mu, - readFinal: true, - writeBuf: make([]byte, writeBufferSize+maxFrameHeaderSize), - writeFrameType: noFrame, - writePos: maxFrameHeaderSize, - } - c.SetPingHandler(nil) - c.SetPongHandler(nil) - return c -} - -// Subprotocol returns the negotiated protocol for the connection. -func (c *Conn) Subprotocol() string { - return c.subprotocol -} - -// Close closes the underlying network connection without sending or waiting for a close frame. -func (c *Conn) Close() error { - return c.conn.Close() -} - -// LocalAddr returns the local network address. -func (c *Conn) LocalAddr() net.Addr { - return c.conn.LocalAddr() -} - -// RemoteAddr returns the remote network address. -func (c *Conn) RemoteAddr() net.Addr { - return c.conn.RemoteAddr() -} - -// Write methods - -func (c *Conn) write(frameType int, deadline time.Time, bufs ...[]byte) error { - <-c.mu - defer func() { c.mu <- true }() - - if c.closeSent { - return ErrCloseSent - } else if frameType == CloseMessage { - c.closeSent = true - } - - c.conn.SetWriteDeadline(deadline) - for _, buf := range bufs { - if len(buf) > 0 { - n, err := c.conn.Write(buf) - if n != len(buf) { - // Close on partial write. - c.conn.Close() - } - if err != nil { - return err - } - } - } - return nil -} - -// WriteControl writes a control message with the given deadline. The allowed -// message types are CloseMessage, PingMessage and PongMessage. -func (c *Conn) WriteControl(messageType int, data []byte, deadline time.Time) error { - if !isControl(messageType) { - return errBadWriteOpCode - } - if len(data) > maxControlFramePayloadSize { - return errInvalidControlFrame - } - - b0 := byte(messageType) | finalBit - b1 := byte(len(data)) - if !c.isServer { - b1 |= maskBit - } - - buf := make([]byte, 0, maxFrameHeaderSize+maxControlFramePayloadSize) - buf = append(buf, b0, b1) - - if c.isServer { - buf = append(buf, data...) - } else { - key := newMaskKey() - buf = append(buf, key[:]...) - buf = append(buf, data...) - maskBytes(key, 0, buf[6:]) - } - - d := time.Hour * 1000 - if !deadline.IsZero() { - d = deadline.Sub(time.Now()) - if d < 0 { - return errWriteTimeout - } - } - - timer := time.NewTimer(d) - select { - case <-c.mu: - timer.Stop() - case <-timer.C: - return errWriteTimeout - } - defer func() { c.mu <- true }() - - if c.closeSent { - return ErrCloseSent - } else if messageType == CloseMessage { - c.closeSent = true - } - - c.conn.SetWriteDeadline(deadline) - n, err := c.conn.Write(buf) - if n != 0 && n != len(buf) { - c.conn.Close() - } - return err -} - -// NextWriter returns a writer for the next message to send. The writer's -// Close method flushes the complete message to the network. -// -// There can be at most one open writer on a connection. NextWriter closes the -// previous writer if the application has not already done so. -// -// The NextWriter method and the writers returned from the method cannot be -// accessed by more than one goroutine at a time. -func (c *Conn) NextWriter(messageType int) (io.WriteCloser, error) { - if c.writeErr != nil { - return nil, c.writeErr - } - - if c.writeFrameType != noFrame { - if err := c.flushFrame(true, nil); err != nil { - return nil, err - } - } - - if !isControl(messageType) && !isData(messageType) { - return nil, errBadWriteOpCode - } - - c.writeFrameType = messageType - return messageWriter{c, c.writeSeq}, nil -} - -func (c *Conn) flushFrame(final bool, extra []byte) error { - length := c.writePos - maxFrameHeaderSize + len(extra) - - // Check for invalid control frames. - if isControl(c.writeFrameType) && - (!final || length > maxControlFramePayloadSize) { - c.writeSeq++ - c.writeFrameType = noFrame - c.writePos = maxFrameHeaderSize - return errInvalidControlFrame - } - - b0 := byte(c.writeFrameType) - if final { - b0 |= finalBit - } - b1 := byte(0) - if !c.isServer { - b1 |= maskBit - } - - // Assume that the frame starts at beginning of c.writeBuf. - framePos := 0 - if c.isServer { - // Adjust up if mask not included in the header. - framePos = 4 - } - - switch { - case length >= 65536: - c.writeBuf[framePos] = b0 - c.writeBuf[framePos+1] = b1 | 127 - binary.BigEndian.PutUint64(c.writeBuf[framePos+2:], uint64(length)) - case length > 125: - framePos += 6 - c.writeBuf[framePos] = b0 - c.writeBuf[framePos+1] = b1 | 126 - binary.BigEndian.PutUint16(c.writeBuf[framePos+2:], uint16(length)) - default: - framePos += 8 - c.writeBuf[framePos] = b0 - c.writeBuf[framePos+1] = b1 | byte(length) - } - - if !c.isServer { - key := newMaskKey() - copy(c.writeBuf[maxFrameHeaderSize-4:], key[:]) - maskBytes(key, 0, c.writeBuf[maxFrameHeaderSize:c.writePos]) - if len(extra) > 0 { - c.writeErr = errors.New("websocket: internal error, extra used in client mode") - return c.writeErr - } - } - - // Write the buffers to the connection. - c.writeErr = c.write(c.writeFrameType, c.writeDeadline, c.writeBuf[framePos:c.writePos], extra) - - // Setup for next frame. - c.writePos = maxFrameHeaderSize - c.writeFrameType = continuationFrame - if final { - c.writeSeq++ - c.writeFrameType = noFrame - } - return c.writeErr -} - -type messageWriter struct { - c *Conn - seq int -} - -func (w messageWriter) err() error { - c := w.c - if c.writeSeq != w.seq { - return errWriteClosed - } - if c.writeErr != nil { - return c.writeErr - } - return nil -} - -func (w messageWriter) ncopy(max int) (int, error) { - n := len(w.c.writeBuf) - w.c.writePos - if n <= 0 { - if err := w.c.flushFrame(false, nil); err != nil { - return 0, err - } - n = len(w.c.writeBuf) - w.c.writePos - } - if n > max { - n = max - } - return n, nil -} - -func (w messageWriter) write(final bool, p []byte) (int, error) { - if err := w.err(); err != nil { - return 0, err - } - - if len(p) > 2*len(w.c.writeBuf) && w.c.isServer { - // Don't buffer large messages. - err := w.c.flushFrame(final, p) - if err != nil { - return 0, err - } - return len(p), nil - } - - nn := len(p) - for len(p) > 0 { - n, err := w.ncopy(len(p)) - if err != nil { - return 0, err - } - copy(w.c.writeBuf[w.c.writePos:], p[:n]) - w.c.writePos += n - p = p[n:] - } - return nn, nil -} - -func (w messageWriter) Write(p []byte) (int, error) { - return w.write(false, p) -} - -func (w messageWriter) WriteString(p string) (int, error) { - if err := w.err(); err != nil { - return 0, err - } - - nn := len(p) - for len(p) > 0 { - n, err := w.ncopy(len(p)) - if err != nil { - return 0, err - } - copy(w.c.writeBuf[w.c.writePos:], p[:n]) - w.c.writePos += n - p = p[n:] - } - return nn, nil -} - -func (w messageWriter) ReadFrom(r io.Reader) (nn int64, err error) { - if err := w.err(); err != nil { - return 0, err - } - for { - if w.c.writePos == len(w.c.writeBuf) { - err = w.c.flushFrame(false, nil) - if err != nil { - break - } - } - var n int - n, err = r.Read(w.c.writeBuf[w.c.writePos:]) - w.c.writePos += n - nn += int64(n) - if err != nil { - if err == io.EOF { - err = nil - } - break - } - } - return nn, err -} - -func (w messageWriter) Close() error { - if err := w.err(); err != nil { - return err - } - return w.c.flushFrame(true, nil) -} - -// WriteMessage is a helper method for getting a writer using NextWriter, -// writing the message and closing the writer. -func (c *Conn) WriteMessage(messageType int, data []byte) error { - wr, err := c.NextWriter(messageType) - if err != nil { - return err - } - w := wr.(messageWriter) - if _, err := w.write(true, data); err != nil { - return err - } - if c.writeSeq == w.seq { - if err := c.flushFrame(true, nil); err != nil { - return err - } - } - return nil -} - -// SetWriteDeadline sets the write deadline on the underlying network -// connection. After a write has timed out, the websocket state is corrupt and -// all future writes will return an error. A zero value for t means writes will -// not time out. -func (c *Conn) SetWriteDeadline(t time.Time) error { - c.writeDeadline = t - return nil -} - -// Read methods - -// readFull is like io.ReadFull except that io.EOF is never returned. -func (c *Conn) readFull(p []byte) (err error) { - var n int - for n < len(p) && err == nil { - var nn int - nn, err = c.br.Read(p[n:]) - n += nn - } - if n == len(p) { - err = nil - } else if err == io.EOF { - err = errUnexpectedEOF - } - return -} - -func (c *Conn) advanceFrame() (int, error) { - - // 1. Skip remainder of previous frame. - - if c.readRemaining > 0 { - if _, err := io.CopyN(ioutil.Discard, c.br, c.readRemaining); err != nil { - return noFrame, err - } - } - - // 2. Read and parse first two bytes of frame header. - - var b [8]byte - if err := c.readFull(b[:2]); err != nil { - return noFrame, err - } - - final := b[0]&finalBit != 0 - frameType := int(b[0] & 0xf) - reserved := int((b[0] >> 4) & 0x7) - mask := b[1]&maskBit != 0 - c.readRemaining = int64(b[1] & 0x7f) - - if reserved != 0 { - return noFrame, c.handleProtocolError("unexpected reserved bits " + strconv.Itoa(reserved)) - } - - switch frameType { - case CloseMessage, PingMessage, PongMessage: - if c.readRemaining > maxControlFramePayloadSize { - return noFrame, c.handleProtocolError("control frame length > 125") - } - if !final { - return noFrame, c.handleProtocolError("control frame not final") - } - case TextMessage, BinaryMessage: - if !c.readFinal { - return noFrame, c.handleProtocolError("message start before final message frame") - } - c.readFinal = final - case continuationFrame: - if c.readFinal { - return noFrame, c.handleProtocolError("continuation after final message frame") - } - c.readFinal = final - default: - return noFrame, c.handleProtocolError("unknown opcode " + strconv.Itoa(frameType)) - } - - // 3. Read and parse frame length. - - switch c.readRemaining { - case 126: - if err := c.readFull(b[:2]); err != nil { - return noFrame, err - } - c.readRemaining = int64(binary.BigEndian.Uint16(b[:2])) - case 127: - if err := c.readFull(b[:8]); err != nil { - return noFrame, err - } - c.readRemaining = int64(binary.BigEndian.Uint64(b[:8])) - } - - // 4. Handle frame masking. - - if mask != c.isServer { - return noFrame, c.handleProtocolError("incorrect mask flag") - } - - if mask { - c.readMaskPos = 0 - if err := c.readFull(c.readMaskKey[:]); err != nil { - return noFrame, err - } - } - - // 5. For text and binary messages, enforce read limit and return. - - if frameType == continuationFrame || frameType == TextMessage || frameType == BinaryMessage { - - c.readLength += c.readRemaining - if c.readLimit > 0 && c.readLength > c.readLimit { - c.WriteControl(CloseMessage, FormatCloseMessage(CloseMessageTooBig, ""), time.Now().Add(writeWait)) - return noFrame, ErrReadLimit - } - - return frameType, nil - } - - // 6. Read control frame payload. - - var payload []byte - if c.readRemaining > 0 { - payload = make([]byte, c.readRemaining) - c.readRemaining = 0 - if err := c.readFull(payload); err != nil { - return noFrame, err - } - if c.isServer { - maskBytes(c.readMaskKey, 0, payload) - } - } - - // 7. Process control frame payload. - - switch frameType { - case PongMessage: - if err := c.handlePong(string(payload)); err != nil { - return noFrame, err - } - case PingMessage: - if err := c.handlePing(string(payload)); err != nil { - return noFrame, err - } - case CloseMessage: - c.WriteControl(CloseMessage, []byte{}, time.Now().Add(writeWait)) - closeCode := CloseNoStatusReceived - closeText := "" - if len(payload) >= 2 { - closeCode = int(binary.BigEndian.Uint16(payload)) - closeText = string(payload[2:]) - } - switch closeCode { - case CloseNormalClosure, CloseGoingAway: - return noFrame, io.EOF - default: - return noFrame, &closeError{code: closeCode, text: closeText} - } - } - - return frameType, nil -} - -func (c *Conn) handleProtocolError(message string) error { - c.WriteControl(CloseMessage, FormatCloseMessage(CloseProtocolError, message), time.Now().Add(writeWait)) - return errors.New("websocket: " + message) -} - -// NextReader returns the next data message received from the peer. The -// returned messageType is either TextMessage or BinaryMessage. -// -// There can be at most one open reader on a connection. NextReader discards -// the previous message if the application has not already consumed it. -// -// The NextReader method and the readers returned from the method cannot be -// accessed by more than one goroutine at a time. -func (c *Conn) NextReader() (messageType int, r io.Reader, err error) { - - c.readSeq++ - c.readLength = 0 - - for c.readErr == nil { - frameType, err := c.advanceFrame() - if err != nil { - c.readErr = hideTempErr(err) - break - } - if frameType == TextMessage || frameType == BinaryMessage { - return frameType, messageReader{c, c.readSeq}, nil - } - } - return noFrame, nil, c.readErr -} - -type messageReader struct { - c *Conn - seq int -} - -func (r messageReader) Read(b []byte) (int, error) { - - if r.seq != r.c.readSeq { - return 0, io.EOF - } - - for r.c.readErr == nil { - - if r.c.readRemaining > 0 { - if int64(len(b)) > r.c.readRemaining { - b = b[:r.c.readRemaining] - } - n, err := r.c.br.Read(b) - r.c.readErr = hideTempErr(err) - if r.c.isServer { - r.c.readMaskPos = maskBytes(r.c.readMaskKey, r.c.readMaskPos, b[:n]) - } - r.c.readRemaining -= int64(n) - return n, r.c.readErr - } - - if r.c.readFinal { - r.c.readSeq++ - return 0, io.EOF - } - - frameType, err := r.c.advanceFrame() - switch { - case err != nil: - r.c.readErr = hideTempErr(err) - case frameType == TextMessage || frameType == BinaryMessage: - r.c.readErr = errors.New("websocket: internal error, unexpected text or binary in Reader") - } - } - - err := r.c.readErr - if err == io.EOF && r.seq == r.c.readSeq { - err = errUnexpectedEOF - } - return 0, err -} - -// ReadMessage is a helper method for getting a reader using NextReader and -// reading from that reader to a buffer. -func (c *Conn) ReadMessage() (messageType int, p []byte, err error) { - var r io.Reader - messageType, r, err = c.NextReader() - if err != nil { - return messageType, nil, err - } - p, err = ioutil.ReadAll(r) - return messageType, p, err -} - -// SetReadDeadline sets the read deadline on the underlying network connection. -// After a read has timed out, the websocket connection state is corrupt and -// all future reads will return an error. A zero value for t means reads will -// not time out. -func (c *Conn) SetReadDeadline(t time.Time) error { - return c.conn.SetReadDeadline(t) -} - -// SetReadLimit sets the maximum size for a message read from the peer. If a -// message exceeds the limit, the connection sends a close frame to the peer -// and returns ErrReadLimit to the application. -func (c *Conn) SetReadLimit(limit int64) { - c.readLimit = limit -} - -// SetPingHandler sets the handler for ping messages received from the peer. -// The default ping handler sends a pong to the peer. -func (c *Conn) SetPingHandler(h func(string) error) { - if h == nil { - h = func(message string) error { - c.WriteControl(PongMessage, []byte(message), time.Now().Add(writeWait)) - return nil - } - } - c.handlePing = h -} - -// SetPongHandler sets the handler for pong messages received from the peer. -// The default pong handler does nothing. -func (c *Conn) SetPongHandler(h func(string) error) { - if h == nil { - h = func(string) error { return nil } - } - c.handlePong = h -} - -// UnderlyingConn returns the internal net.Conn. This can be used to further -// modifications to connection specific flags. -func (c *Conn) UnderlyingConn() net.Conn { - return c.conn -} - -// FormatCloseMessage formats closeCode and text as a WebSocket close message. -func FormatCloseMessage(closeCode int, text string) []byte { - buf := make([]byte, 2+len(text)) - binary.BigEndian.PutUint16(buf, uint16(closeCode)) - copy(buf[2:], text) - return buf -} diff --git a/vendor/github.com/gorilla/websocket/doc.go b/vendor/github.com/gorilla/websocket/doc.go deleted file mode 100644 index f52925dd1..000000000 --- a/vendor/github.com/gorilla/websocket/doc.go +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package websocket implements the WebSocket protocol defined in RFC 6455. -// -// Overview -// -// The Conn type represents a WebSocket connection. A server application uses -// the Upgrade function from an Upgrader object with a HTTP request handler -// to get a pointer to a Conn: -// -// var upgrader = websocket.Upgrader{ -// ReadBufferSize: 1024, -// WriteBufferSize: 1024, -// } -// -// func handler(w http.ResponseWriter, r *http.Request) { -// conn, err := upgrader.Upgrade(w, r, nil) -// if err != nil { -// log.Println(err) -// return -// } -// ... Use conn to send and receive messages. -// } -// -// Call the connection's WriteMessage and ReadMessage methods to send and -// receive messages as a slice of bytes. This snippet of code shows how to echo -// messages using these methods: -// -// for { -// messageType, p, err := conn.ReadMessage() -// if err != nil { -// return -// } -// if err = conn.WriteMessage(messageType, p); err != nil { -// return err -// } -// } -// -// In above snippet of code, p is a []byte and messageType is an int with value -// websocket.BinaryMessage or websocket.TextMessage. -// -// An application can also send and receive messages using the io.WriteCloser -// and io.Reader interfaces. To send a message, call the connection NextWriter -// method to get an io.WriteCloser, write the message to the writer and close -// the writer when done. To receive a message, call the connection NextReader -// method to get an io.Reader and read until io.EOF is returned. This snippet -// snippet shows how to echo messages using the NextWriter and NextReader -// methods: -// -// for { -// messageType, r, err := conn.NextReader() -// if err != nil { -// return -// } -// w, err := conn.NextWriter(messageType) -// if err != nil { -// return err -// } -// if _, err := io.Copy(w, r); err != nil { -// return err -// } -// if err := w.Close(); err != nil { -// return err -// } -// } -// -// Data Messages -// -// The WebSocket protocol distinguishes between text and binary data messages. -// Text messages are interpreted as UTF-8 encoded text. The interpretation of -// binary messages is left to the application. -// -// This package uses the TextMessage and BinaryMessage integer constants to -// identify the two data message types. The ReadMessage and NextReader methods -// return the type of the received message. The messageType argument to the -// WriteMessage and NextWriter methods specifies the type of a sent message. -// -// It is the application's responsibility to ensure that text messages are -// valid UTF-8 encoded text. -// -// Control Messages -// -// The WebSocket protocol defines three types of control messages: close, ping -// and pong. Call the connection WriteControl, WriteMessage or NextWriter -// methods to send a control message to the peer. -// -// Connections handle received ping and pong messages by invoking a callback -// function set with SetPingHandler and SetPongHandler methods. These callback -// functions can be invoked from the ReadMessage method, the NextReader method -// or from a call to the data message reader returned from NextReader. -// -// Connections handle received close messages by returning an error from the -// ReadMessage method, the NextReader method or from a call to the data message -// reader returned from NextReader. -// -// Concurrency -// -// Connections do not support concurrent calls to the write methods -// (NextWriter, SetWriteDeadline, WriteMessage) or concurrent calls to the read -// methods methods (NextReader, SetReadDeadline, ReadMessage). Connections do -// support a concurrent reader and writer. -// -// The Close and WriteControl methods can be called concurrently with all other -// methods. -// -// Read is Required -// -// The application must read the connection to process ping and close messages -// sent from the peer. If the application is not otherwise interested in -// messages from the peer, then the application should start a goroutine to read -// and discard messages from the peer. A simple example is: -// -// func readLoop(c *websocket.Conn) { -// for { -// if _, _, err := c.NextReader(); err != nil { -// c.Close() -// break -// } -// } -// } -// -// Origin Considerations -// -// Web browsers allow Javascript applications to open a WebSocket connection to -// any host. It's up to the server to enforce an origin policy using the Origin -// request header sent by the browser. -// -// The Upgrader calls the function specified in the CheckOrigin field to check -// the origin. If the CheckOrigin function returns false, then the Upgrade -// method fails the WebSocket handshake with HTTP status 403. -// -// If the CheckOrigin field is nil, then the Upgrader uses a safe default: fail -// the handshake if the Origin request header is present and not equal to the -// Host request header. -// -// An application can allow connections from any origin by specifying a -// function that always returns true: -// -// var upgrader = websocket.Upgrader{ -// CheckOrigin: func(r *http.Request) bool { return true }, -// } -// -// The deprecated Upgrade function does not enforce an origin policy. It's the -// application's responsibility to check the Origin header before calling -// Upgrade. -package websocket diff --git a/vendor/github.com/gorilla/websocket/json.go b/vendor/github.com/gorilla/websocket/json.go deleted file mode 100644 index 18e62f225..000000000 --- a/vendor/github.com/gorilla/websocket/json.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package websocket - -import ( - "encoding/json" - "io" -) - -// WriteJSON is deprecated, use c.WriteJSON instead. -func WriteJSON(c *Conn, v interface{}) error { - return c.WriteJSON(v) -} - -// WriteJSON writes the JSON encoding of v to the connection. -// -// See the documentation for encoding/json Marshal for details about the -// conversion of Go values to JSON. -func (c *Conn) WriteJSON(v interface{}) error { - w, err := c.NextWriter(TextMessage) - if err != nil { - return err - } - err1 := json.NewEncoder(w).Encode(v) - err2 := w.Close() - if err1 != nil { - return err1 - } - return err2 -} - -// ReadJSON is deprecated, use c.ReadJSON instead. -func ReadJSON(c *Conn, v interface{}) error { - return c.ReadJSON(v) -} - -// ReadJSON reads the next JSON-encoded message from the connection and stores -// it in the value pointed to by v. -// -// See the documentation for the encoding/json Unmarshal function for details -// about the conversion of JSON to a Go value. -func (c *Conn) ReadJSON(v interface{}) error { - _, r, err := c.NextReader() - if err != nil { - return err - } - err = json.NewDecoder(r).Decode(v) - if err == io.EOF { - // Decode returns io.EOF when the message is empty or all whitespace. - // Convert to io.ErrUnexpectedEOF so that application can distinguish - // between an error reading the JSON value and the connection closing. - err = io.ErrUnexpectedEOF - } - return err -} diff --git a/vendor/github.com/gorilla/websocket/server.go b/vendor/github.com/gorilla/websocket/server.go deleted file mode 100644 index e56a00493..000000000 --- a/vendor/github.com/gorilla/websocket/server.go +++ /dev/null @@ -1,247 +0,0 @@ -// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package websocket - -import ( - "bufio" - "errors" - "net" - "net/http" - "net/url" - "strings" - "time" -) - -// HandshakeError describes an error with the handshake from the peer. -type HandshakeError struct { - message string -} - -func (e HandshakeError) Error() string { return e.message } - -// Upgrader specifies parameters for upgrading an HTTP connection to a -// WebSocket connection. -type Upgrader struct { - // HandshakeTimeout specifies the duration for the handshake to complete. - HandshakeTimeout time.Duration - - // ReadBufferSize and WriteBufferSize specify I/O buffer sizes. If a buffer - // size is zero, then a default value of 4096 is used. The I/O buffer sizes - // do not limit the size of the messages that can be sent or received. - ReadBufferSize, WriteBufferSize int - - // Subprotocols specifies the server's supported protocols in order of - // preference. If this field is set, then the Upgrade method negotiates a - // subprotocol by selecting the first match in this list with a protocol - // requested by the client. - Subprotocols []string - - // Error specifies the function for generating HTTP error responses. If Error - // is nil, then http.Error is used to generate the HTTP response. - Error func(w http.ResponseWriter, r *http.Request, status int, reason error) - - // CheckOrigin returns true if the request Origin header is acceptable. If - // CheckOrigin is nil, the host in the Origin header must not be set or - // must match the host of the request. - CheckOrigin func(r *http.Request) bool -} - -func (u *Upgrader) returnError(w http.ResponseWriter, r *http.Request, status int, reason string) (*Conn, error) { - err := HandshakeError{reason} - if u.Error != nil { - u.Error(w, r, status, err) - } else { - http.Error(w, http.StatusText(status), status) - } - return nil, err -} - -// checkSameOrigin returns true if the origin is not set or is equal to the request host. -func checkSameOrigin(r *http.Request) bool { - origin := r.Header["Origin"] - if len(origin) == 0 { - return true - } - u, err := url.Parse(origin[0]) - if err != nil { - return false - } - return u.Host == r.Host -} - -func (u *Upgrader) selectSubprotocol(r *http.Request, responseHeader http.Header) string { - if u.Subprotocols != nil { - clientProtocols := Subprotocols(r) - for _, serverProtocol := range u.Subprotocols { - for _, clientProtocol := range clientProtocols { - if clientProtocol == serverProtocol { - return clientProtocol - } - } - } - } else if responseHeader != nil { - return responseHeader.Get("Sec-Websocket-Protocol") - } - return "" -} - -// Upgrade upgrades the HTTP server connection to the WebSocket protocol. -// -// The responseHeader is included in the response to the client's upgrade -// request. Use the responseHeader to specify cookies (Set-Cookie) and the -// application negotiated subprotocol (Sec-Websocket-Protocol). -func (u *Upgrader) Upgrade(w http.ResponseWriter, r *http.Request, responseHeader http.Header) (*Conn, error) { - if values := r.Header["Sec-Websocket-Version"]; len(values) == 0 || values[0] != "13" { - return u.returnError(w, r, http.StatusBadRequest, "websocket: version != 13") - } - - if !tokenListContainsValue(r.Header, "Connection", "upgrade") { - return u.returnError(w, r, http.StatusBadRequest, "websocket: could not find connection header with token 'upgrade'") - } - - if !tokenListContainsValue(r.Header, "Upgrade", "websocket") { - return u.returnError(w, r, http.StatusBadRequest, "websocket: could not find upgrade header with token 'websocket'") - } - - checkOrigin := u.CheckOrigin - if checkOrigin == nil { - checkOrigin = checkSameOrigin - } - if !checkOrigin(r) { - return u.returnError(w, r, http.StatusForbidden, "websocket: origin not allowed") - } - - challengeKey := r.Header.Get("Sec-Websocket-Key") - if challengeKey == "" { - return u.returnError(w, r, http.StatusBadRequest, "websocket: key missing or blank") - } - - subprotocol := u.selectSubprotocol(r, responseHeader) - - var ( - netConn net.Conn - br *bufio.Reader - err error - ) - - h, ok := w.(http.Hijacker) - if !ok { - return u.returnError(w, r, http.StatusInternalServerError, "websocket: response does not implement http.Hijacker") - } - var rw *bufio.ReadWriter - netConn, rw, err = h.Hijack() - if err != nil { - return u.returnError(w, r, http.StatusInternalServerError, err.Error()) - } - br = rw.Reader - - if br.Buffered() > 0 { - netConn.Close() - return nil, errors.New("websocket: client sent data before handshake is complete") - } - - c := newConn(netConn, true, u.ReadBufferSize, u.WriteBufferSize) - c.subprotocol = subprotocol - - p := c.writeBuf[:0] - p = append(p, "HTTP/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: "...) - p = append(p, computeAcceptKey(challengeKey)...) - p = append(p, "\r\n"...) - if c.subprotocol != "" { - p = append(p, "Sec-Websocket-Protocol: "...) - p = append(p, c.subprotocol...) - p = append(p, "\r\n"...) - } - for k, vs := range responseHeader { - if k == "Sec-Websocket-Protocol" { - continue - } - for _, v := range vs { - p = append(p, k...) - p = append(p, ": "...) - for i := 0; i < len(v); i++ { - b := v[i] - if b <= 31 { - // prevent response splitting. - b = ' ' - } - p = append(p, b) - } - p = append(p, "\r\n"...) - } - } - p = append(p, "\r\n"...) - - // Clear deadlines set by HTTP server. - netConn.SetDeadline(time.Time{}) - - if u.HandshakeTimeout > 0 { - netConn.SetWriteDeadline(time.Now().Add(u.HandshakeTimeout)) - } - if _, err = netConn.Write(p); err != nil { - netConn.Close() - return nil, err - } - if u.HandshakeTimeout > 0 { - netConn.SetWriteDeadline(time.Time{}) - } - - return c, nil -} - -// Upgrade upgrades the HTTP server connection to the WebSocket protocol. -// -// This function is deprecated, use websocket.Upgrader instead. -// -// The application is responsible for checking the request origin before -// calling Upgrade. An example implementation of the same origin policy is: -// -// if req.Header.Get("Origin") != "http://"+req.Host { -// http.Error(w, "Origin not allowed", 403) -// return -// } -// -// If the endpoint supports subprotocols, then the application is responsible -// for negotiating the protocol used on the connection. Use the Subprotocols() -// function to get the subprotocols requested by the client. Use the -// Sec-Websocket-Protocol response header to specify the subprotocol selected -// by the application. -// -// The responseHeader is included in the response to the client's upgrade -// request. Use the responseHeader to specify cookies (Set-Cookie) and the -// negotiated subprotocol (Sec-Websocket-Protocol). -// -// The connection buffers IO to the underlying network connection. The -// readBufSize and writeBufSize parameters specify the size of the buffers to -// use. Messages can be larger than the buffers. -// -// If the request is not a valid WebSocket handshake, then Upgrade returns an -// error of type HandshakeError. Applications should handle this error by -// replying to the client with an HTTP error response. -func Upgrade(w http.ResponseWriter, r *http.Request, responseHeader http.Header, readBufSize, writeBufSize int) (*Conn, error) { - u := Upgrader{ReadBufferSize: readBufSize, WriteBufferSize: writeBufSize} - u.Error = func(w http.ResponseWriter, r *http.Request, status int, reason error) { - // don't return errors to maintain backwards compatibility - } - u.CheckOrigin = func(r *http.Request) bool { - // allow all connections by default - return true - } - return u.Upgrade(w, r, responseHeader) -} - -// Subprotocols returns the subprotocols requested by the client in the -// Sec-Websocket-Protocol header. -func Subprotocols(r *http.Request) []string { - h := strings.TrimSpace(r.Header.Get("Sec-Websocket-Protocol")) - if h == "" { - return nil - } - protocols := strings.Split(h, ",") - for i := range protocols { - protocols[i] = strings.TrimSpace(protocols[i]) - } - return protocols -} diff --git a/vendor/github.com/gorilla/websocket/util.go b/vendor/github.com/gorilla/websocket/util.go deleted file mode 100644 index ffdc265ed..000000000 --- a/vendor/github.com/gorilla/websocket/util.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package websocket - -import ( - "crypto/rand" - "crypto/sha1" - "encoding/base64" - "io" - "net/http" - "strings" -) - -// tokenListContainsValue returns true if the 1#token header with the given -// name contains token. -func tokenListContainsValue(header http.Header, name string, value string) bool { - for _, v := range header[name] { - for _, s := range strings.Split(v, ",") { - if strings.EqualFold(value, strings.TrimSpace(s)) { - return true - } - } - } - return false -} - -var keyGUID = []byte("258EAFA5-E914-47DA-95CA-C5AB0DC85B11") - -func computeAcceptKey(challengeKey string) string { - h := sha1.New() - h.Write([]byte(challengeKey)) - h.Write(keyGUID) - return base64.StdEncoding.EncodeToString(h.Sum(nil)) -} - -func generateChallengeKey() (string, error) { - p := make([]byte, 16) - if _, err := io.ReadFull(rand.Reader, p); err != nil { - return "", err - } - return base64.StdEncoding.EncodeToString(p), nil -} diff --git a/vendor/github.com/gregjones/httpcache/.travis.yml b/vendor/github.com/gregjones/httpcache/.travis.yml index 2bca4c599..b5ffbe03d 100644 --- a/vendor/github.com/gregjones/httpcache/.travis.yml +++ b/vendor/github.com/gregjones/httpcache/.travis.yml @@ -4,6 +4,7 @@ go: - 1.6.x - 1.7.x - 1.8.x + - 1.9.x - master matrix: allow_failures: diff --git a/vendor/github.com/gregjones/httpcache/diskcache/diskcache_test.go b/vendor/github.com/gregjones/httpcache/diskcache/diskcache_test.go new file mode 100644 index 000000000..35c76cbd1 --- /dev/null +++ b/vendor/github.com/gregjones/httpcache/diskcache/diskcache_test.go @@ -0,0 +1,42 @@ +package diskcache + +import ( + "bytes" + "io/ioutil" + "os" + "testing" +) + +func TestDiskCache(t *testing.T) { + tempDir, err := ioutil.TempDir("", "httpcache") + if err != nil { + t.Fatalf("TempDir: %v", err) + } + defer os.RemoveAll(tempDir) + + cache := New(tempDir) + + key := "testKey" + _, ok := cache.Get(key) + if ok { + t.Fatal("retrieved key before adding it") + } + + val := []byte("some bytes") + cache.Set(key, val) + + retVal, ok := cache.Get(key) + if !ok { + t.Fatal("could not retrieve an element we just added") + } + if !bytes.Equal(retVal, val) { + t.Fatal("retrieved a different value than what we put in") + } + + cache.Delete(key) + + _, ok = cache.Get(key) + if ok { + t.Fatal("deleted key still present") + } +} diff --git a/vendor/github.com/gregjones/httpcache/httpcache.go b/vendor/github.com/gregjones/httpcache/httpcache.go index 8239edc2c..b26e167f0 100644 --- a/vendor/github.com/gregjones/httpcache/httpcache.go +++ b/vendor/github.com/gregjones/httpcache/httpcache.go @@ -41,7 +41,11 @@ type Cache interface { // cacheKey returns the cache key for req. func cacheKey(req *http.Request) string { - return req.URL.String() + if req.Method == http.MethodGet { + return req.URL.String() + } else { + return req.Method + " " + req.URL.String() + } } // CachedResponse returns the cached http.Response for req if present, and nil diff --git a/vendor/github.com/gregjones/httpcache/httpcache_test.go b/vendor/github.com/gregjones/httpcache/httpcache_test.go new file mode 100644 index 000000000..f22ed837f --- /dev/null +++ b/vendor/github.com/gregjones/httpcache/httpcache_test.go @@ -0,0 +1,1384 @@ +package httpcache + +import ( + "bytes" + "errors" + "flag" + "io" + "io/ioutil" + "net/http" + "net/http/httptest" + "os" + "strconv" + "testing" + "time" +) + +var s struct { + server *httptest.Server + client http.Client + transport *Transport + done chan struct{} // Closed to unlock infinite handlers. +} + +type fakeClock struct { + elapsed time.Duration +} + +func (c *fakeClock) since(t time.Time) time.Duration { + return c.elapsed +} + +func TestMain(m *testing.M) { + flag.Parse() + setup() + code := m.Run() + teardown() + os.Exit(code) +} + +func setup() { + tp := NewMemoryCacheTransport() + client := http.Client{Transport: tp} + s.transport = tp + s.client = client + s.done = make(chan struct{}) + + mux := http.NewServeMux() + s.server = httptest.NewServer(mux) + + mux.HandleFunc("/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Cache-Control", "max-age=3600") + })) + + mux.HandleFunc("/method", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Cache-Control", "max-age=3600") + w.Write([]byte(r.Method)) + })) + + mux.HandleFunc("/range", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + lm := "Fri, 14 Dec 2010 01:01:50 GMT" + if r.Header.Get("if-modified-since") == lm { + w.WriteHeader(http.StatusNotModified) + return + } + w.Header().Set("last-modified", lm) + if r.Header.Get("range") == "bytes=4-9" { + w.WriteHeader(http.StatusPartialContent) + w.Write([]byte(" text ")) + return + } + w.Write([]byte("Some text content")) + })) + + mux.HandleFunc("/nostore", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Cache-Control", "no-store") + })) + + mux.HandleFunc("/etag", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + etag := "124567" + if r.Header.Get("if-none-match") == etag { + w.WriteHeader(http.StatusNotModified) + return + } + w.Header().Set("etag", etag) + })) + + mux.HandleFunc("/lastmodified", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + lm := "Fri, 14 Dec 2010 01:01:50 GMT" + if r.Header.Get("if-modified-since") == lm { + w.WriteHeader(http.StatusNotModified) + return + } + w.Header().Set("last-modified", lm) + })) + + mux.HandleFunc("/varyaccept", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Cache-Control", "max-age=3600") + w.Header().Set("Content-Type", "text/plain") + w.Header().Set("Vary", "Accept") + w.Write([]byte("Some text content")) + })) + + mux.HandleFunc("/doublevary", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Cache-Control", "max-age=3600") + w.Header().Set("Content-Type", "text/plain") + w.Header().Set("Vary", "Accept, Accept-Language") + w.Write([]byte("Some text content")) + })) + mux.HandleFunc("/2varyheaders", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Cache-Control", "max-age=3600") + w.Header().Set("Content-Type", "text/plain") + w.Header().Add("Vary", "Accept") + w.Header().Add("Vary", "Accept-Language") + w.Write([]byte("Some text content")) + })) + mux.HandleFunc("/varyunused", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Cache-Control", "max-age=3600") + w.Header().Set("Content-Type", "text/plain") + w.Header().Set("Vary", "X-Madeup-Header") + w.Write([]byte("Some text content")) + })) + + updateFieldsCounter := 0 + mux.HandleFunc("/updatefields", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("X-Counter", strconv.Itoa(updateFieldsCounter)) + w.Header().Set("Etag", `"e"`) + updateFieldsCounter++ + if r.Header.Get("if-none-match") != "" { + w.WriteHeader(http.StatusNotModified) + return + } + w.Write([]byte("Some text content")) + })) + + // Take 3 seconds to return 200 OK (for testing client timeouts). + mux.HandleFunc("/3seconds", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + time.Sleep(3 * time.Second) + })) + + mux.HandleFunc("/infinite", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + for { + select { + case <-s.done: + return + default: + w.Write([]byte{0}) + } + } + })) +} + +func teardown() { + close(s.done) + s.server.Close() +} + +func resetTest() { + s.transport.Cache = NewMemoryCache() + clock = &realClock{} +} + +// TestCacheableMethod ensures that uncacheable method does not get stored +// in cache and get incorrectly used for a following cacheable method request. +func TestCacheableMethod(t *testing.T) { + resetTest() + { + req, err := http.NewRequest("POST", s.server.URL+"/method", nil) + if err != nil { + t.Fatal(err) + } + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + var buf bytes.Buffer + _, err = io.Copy(&buf, resp.Body) + if err != nil { + t.Fatal(err) + } + err = resp.Body.Close() + if err != nil { + t.Fatal(err) + } + if got, want := buf.String(), "POST"; got != want { + t.Errorf("got %q, want %q", got, want) + } + if resp.StatusCode != http.StatusOK { + t.Errorf("response status code isn't 200 OK: %v", resp.StatusCode) + } + } + { + req, err := http.NewRequest("GET", s.server.URL+"/method", nil) + if err != nil { + t.Fatal(err) + } + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + var buf bytes.Buffer + _, err = io.Copy(&buf, resp.Body) + if err != nil { + t.Fatal(err) + } + err = resp.Body.Close() + if err != nil { + t.Fatal(err) + } + if got, want := buf.String(), "GET"; got != want { + t.Errorf("got wrong body %q, want %q", got, want) + } + if resp.StatusCode != http.StatusOK { + t.Errorf("response status code isn't 200 OK: %v", resp.StatusCode) + } + if resp.Header.Get(XFromCache) != "" { + t.Errorf("XFromCache header isn't blank") + } + } +} + +func TestDontServeHeadResponseToGetRequest(t *testing.T) { + resetTest() + url := s.server.URL + "/" + req, err := http.NewRequest(http.MethodHead, url, nil) + if err != nil { + t.Fatal(err) + } + _, err = s.client.Do(req) + if err != nil { + t.Fatal(err) + } + req, err = http.NewRequest(http.MethodGet, url, nil) + if err != nil { + t.Fatal(err) + } + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + if resp.Header.Get(XFromCache) != "" { + t.Errorf("Cache should not match") + } +} + +func TestDontStorePartialRangeInCache(t *testing.T) { + resetTest() + { + req, err := http.NewRequest("GET", s.server.URL+"/range", nil) + if err != nil { + t.Fatal(err) + } + req.Header.Set("range", "bytes=4-9") + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + var buf bytes.Buffer + _, err = io.Copy(&buf, resp.Body) + if err != nil { + t.Fatal(err) + } + err = resp.Body.Close() + if err != nil { + t.Fatal(err) + } + if got, want := buf.String(), " text "; got != want { + t.Errorf("got %q, want %q", got, want) + } + if resp.StatusCode != http.StatusPartialContent { + t.Errorf("response status code isn't 206 Partial Content: %v", resp.StatusCode) + } + } + { + req, err := http.NewRequest("GET", s.server.URL+"/range", nil) + if err != nil { + t.Fatal(err) + } + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + var buf bytes.Buffer + _, err = io.Copy(&buf, resp.Body) + if err != nil { + t.Fatal(err) + } + err = resp.Body.Close() + if err != nil { + t.Fatal(err) + } + if got, want := buf.String(), "Some text content"; got != want { + t.Errorf("got %q, want %q", got, want) + } + if resp.StatusCode != http.StatusOK { + t.Errorf("response status code isn't 200 OK: %v", resp.StatusCode) + } + if resp.Header.Get(XFromCache) != "" { + t.Error("XFromCache header isn't blank") + } + } + { + req, err := http.NewRequest("GET", s.server.URL+"/range", nil) + if err != nil { + t.Fatal(err) + } + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + var buf bytes.Buffer + _, err = io.Copy(&buf, resp.Body) + if err != nil { + t.Fatal(err) + } + err = resp.Body.Close() + if err != nil { + t.Fatal(err) + } + if got, want := buf.String(), "Some text content"; got != want { + t.Errorf("got %q, want %q", got, want) + } + if resp.StatusCode != http.StatusOK { + t.Errorf("response status code isn't 200 OK: %v", resp.StatusCode) + } + if resp.Header.Get(XFromCache) != "1" { + t.Errorf(`XFromCache header isn't "1": %v`, resp.Header.Get(XFromCache)) + } + } + { + req, err := http.NewRequest("GET", s.server.URL+"/range", nil) + if err != nil { + t.Fatal(err) + } + req.Header.Set("range", "bytes=4-9") + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + var buf bytes.Buffer + _, err = io.Copy(&buf, resp.Body) + if err != nil { + t.Fatal(err) + } + err = resp.Body.Close() + if err != nil { + t.Fatal(err) + } + if got, want := buf.String(), " text "; got != want { + t.Errorf("got %q, want %q", got, want) + } + if resp.StatusCode != http.StatusPartialContent { + t.Errorf("response status code isn't 206 Partial Content: %v", resp.StatusCode) + } + } +} + +func TestCacheOnlyIfBodyRead(t *testing.T) { + resetTest() + { + req, err := http.NewRequest("GET", s.server.URL, nil) + if err != nil { + t.Fatal(err) + } + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + if resp.Header.Get(XFromCache) != "" { + t.Fatal("XFromCache header isn't blank") + } + // We do not read the body + resp.Body.Close() + } + { + req, err := http.NewRequest("GET", s.server.URL, nil) + if err != nil { + t.Fatal(err) + } + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + if resp.Header.Get(XFromCache) != "" { + t.Fatalf("XFromCache header isn't blank") + } + } +} + +func TestOnlyReadBodyOnDemand(t *testing.T) { + resetTest() + + req, err := http.NewRequest("GET", s.server.URL+"/infinite", nil) + if err != nil { + t.Fatal(err) + } + resp, err := s.client.Do(req) // This shouldn't hang forever. + if err != nil { + t.Fatal(err) + } + buf := make([]byte, 10) // Only partially read the body. + _, err = resp.Body.Read(buf) + if err != nil { + t.Fatal(err) + } + resp.Body.Close() +} + +func TestGetOnlyIfCachedHit(t *testing.T) { + resetTest() + { + req, err := http.NewRequest("GET", s.server.URL, nil) + if err != nil { + t.Fatal(err) + } + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + if resp.Header.Get(XFromCache) != "" { + t.Fatal("XFromCache header isn't blank") + } + _, err = ioutil.ReadAll(resp.Body) + if err != nil { + t.Fatal(err) + } + } + { + req, err := http.NewRequest("GET", s.server.URL, nil) + if err != nil { + t.Fatal(err) + } + req.Header.Add("cache-control", "only-if-cached") + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + if resp.Header.Get(XFromCache) != "1" { + t.Fatalf(`XFromCache header isn't "1": %v`, resp.Header.Get(XFromCache)) + } + if resp.StatusCode != http.StatusOK { + t.Fatalf("response status code isn't 200 OK: %v", resp.StatusCode) + } + } +} + +func TestGetOnlyIfCachedMiss(t *testing.T) { + resetTest() + req, err := http.NewRequest("GET", s.server.URL, nil) + if err != nil { + t.Fatal(err) + } + req.Header.Add("cache-control", "only-if-cached") + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + if resp.Header.Get(XFromCache) != "" { + t.Fatal("XFromCache header isn't blank") + } + if resp.StatusCode != http.StatusGatewayTimeout { + t.Fatalf("response status code isn't 504 GatewayTimeout: %v", resp.StatusCode) + } +} + +func TestGetNoStoreRequest(t *testing.T) { + resetTest() + req, err := http.NewRequest("GET", s.server.URL, nil) + if err != nil { + t.Fatal(err) + } + req.Header.Add("Cache-Control", "no-store") + { + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + if resp.Header.Get(XFromCache) != "" { + t.Fatal("XFromCache header isn't blank") + } + } + { + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + if resp.Header.Get(XFromCache) != "" { + t.Fatal("XFromCache header isn't blank") + } + } +} + +func TestGetNoStoreResponse(t *testing.T) { + resetTest() + req, err := http.NewRequest("GET", s.server.URL+"/nostore", nil) + if err != nil { + t.Fatal(err) + } + { + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + if resp.Header.Get(XFromCache) != "" { + t.Fatal("XFromCache header isn't blank") + } + } + { + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + if resp.Header.Get(XFromCache) != "" { + t.Fatal("XFromCache header isn't blank") + } + } +} + +func TestGetWithEtag(t *testing.T) { + resetTest() + req, err := http.NewRequest("GET", s.server.URL+"/etag", nil) + if err != nil { + t.Fatal(err) + } + { + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + if resp.Header.Get(XFromCache) != "" { + t.Fatal("XFromCache header isn't blank") + } + _, err = ioutil.ReadAll(resp.Body) + if err != nil { + t.Fatal(err) + } + + } + { + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + if resp.Header.Get(XFromCache) != "1" { + t.Fatalf(`XFromCache header isn't "1": %v`, resp.Header.Get(XFromCache)) + } + // additional assertions to verify that 304 response is converted properly + if resp.StatusCode != http.StatusOK { + t.Fatalf("response status code isn't 200 OK: %v", resp.StatusCode) + } + if _, ok := resp.Header["Connection"]; ok { + t.Fatalf("Connection header isn't absent") + } + } +} + +func TestGetWithLastModified(t *testing.T) { + resetTest() + req, err := http.NewRequest("GET", s.server.URL+"/lastmodified", nil) + if err != nil { + t.Fatal(err) + } + { + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + if resp.Header.Get(XFromCache) != "" { + t.Fatal("XFromCache header isn't blank") + } + _, err = ioutil.ReadAll(resp.Body) + if err != nil { + t.Fatal(err) + } + } + { + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + if resp.Header.Get(XFromCache) != "1" { + t.Fatalf(`XFromCache header isn't "1": %v`, resp.Header.Get(XFromCache)) + } + } +} + +func TestGetWithVary(t *testing.T) { + resetTest() + req, err := http.NewRequest("GET", s.server.URL+"/varyaccept", nil) + if err != nil { + t.Fatal(err) + } + req.Header.Set("Accept", "text/plain") + { + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + if resp.Header.Get("Vary") != "Accept" { + t.Fatalf(`Vary header isn't "Accept": %v`, resp.Header.Get("Vary")) + } + _, err = ioutil.ReadAll(resp.Body) + if err != nil { + t.Fatal(err) + } + } + { + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + if resp.Header.Get(XFromCache) != "1" { + t.Fatalf(`XFromCache header isn't "1": %v`, resp.Header.Get(XFromCache)) + } + } + req.Header.Set("Accept", "text/html") + { + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + if resp.Header.Get(XFromCache) != "" { + t.Fatal("XFromCache header isn't blank") + } + } + req.Header.Set("Accept", "") + { + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + if resp.Header.Get(XFromCache) != "" { + t.Fatal("XFromCache header isn't blank") + } + } +} + +func TestGetWithDoubleVary(t *testing.T) { + resetTest() + req, err := http.NewRequest("GET", s.server.URL+"/doublevary", nil) + if err != nil { + t.Fatal(err) + } + req.Header.Set("Accept", "text/plain") + req.Header.Set("Accept-Language", "da, en-gb;q=0.8, en;q=0.7") + { + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + if resp.Header.Get("Vary") == "" { + t.Fatalf(`Vary header is blank`) + } + _, err = ioutil.ReadAll(resp.Body) + if err != nil { + t.Fatal(err) + } + } + { + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + if resp.Header.Get(XFromCache) != "1" { + t.Fatalf(`XFromCache header isn't "1": %v`, resp.Header.Get(XFromCache)) + } + } + req.Header.Set("Accept-Language", "") + { + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + if resp.Header.Get(XFromCache) != "" { + t.Fatal("XFromCache header isn't blank") + } + } + req.Header.Set("Accept-Language", "da") + { + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + if resp.Header.Get(XFromCache) != "" { + t.Fatal("XFromCache header isn't blank") + } + } +} + +func TestGetWith2VaryHeaders(t *testing.T) { + resetTest() + // Tests that multiple Vary headers' comma-separated lists are + // merged. See https://github.com/gregjones/httpcache/issues/27. + const ( + accept = "text/plain" + acceptLanguage = "da, en-gb;q=0.8, en;q=0.7" + ) + req, err := http.NewRequest("GET", s.server.URL+"/2varyheaders", nil) + if err != nil { + t.Fatal(err) + } + req.Header.Set("Accept", accept) + req.Header.Set("Accept-Language", acceptLanguage) + { + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + if resp.Header.Get("Vary") == "" { + t.Fatalf(`Vary header is blank`) + } + _, err = ioutil.ReadAll(resp.Body) + if err != nil { + t.Fatal(err) + } + } + { + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + if resp.Header.Get(XFromCache) != "1" { + t.Fatalf(`XFromCache header isn't "1": %v`, resp.Header.Get(XFromCache)) + } + } + req.Header.Set("Accept-Language", "") + { + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + if resp.Header.Get(XFromCache) != "" { + t.Fatal("XFromCache header isn't blank") + } + } + req.Header.Set("Accept-Language", "da") + { + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + if resp.Header.Get(XFromCache) != "" { + t.Fatal("XFromCache header isn't blank") + } + } + req.Header.Set("Accept-Language", acceptLanguage) + req.Header.Set("Accept", "") + { + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + if resp.Header.Get(XFromCache) != "" { + t.Fatal("XFromCache header isn't blank") + } + } + req.Header.Set("Accept", "image/png") + { + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + if resp.Header.Get(XFromCache) != "" { + t.Fatal("XFromCache header isn't blank") + } + _, err = ioutil.ReadAll(resp.Body) + if err != nil { + t.Fatal(err) + } + } + { + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + if resp.Header.Get(XFromCache) != "1" { + t.Fatalf(`XFromCache header isn't "1": %v`, resp.Header.Get(XFromCache)) + } + } +} + +func TestGetVaryUnused(t *testing.T) { + resetTest() + req, err := http.NewRequest("GET", s.server.URL+"/varyunused", nil) + if err != nil { + t.Fatal(err) + } + req.Header.Set("Accept", "text/plain") + { + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + if resp.Header.Get("Vary") == "" { + t.Fatalf(`Vary header is blank`) + } + _, err = ioutil.ReadAll(resp.Body) + if err != nil { + t.Fatal(err) + } + } + { + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + if resp.Header.Get(XFromCache) != "1" { + t.Fatalf(`XFromCache header isn't "1": %v`, resp.Header.Get(XFromCache)) + } + } +} + +func TestUpdateFields(t *testing.T) { + resetTest() + req, err := http.NewRequest("GET", s.server.URL+"/updatefields", nil) + if err != nil { + t.Fatal(err) + } + var counter, counter2 string + { + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + counter = resp.Header.Get("x-counter") + _, err = ioutil.ReadAll(resp.Body) + if err != nil { + t.Fatal(err) + } + } + { + resp, err := s.client.Do(req) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + if resp.Header.Get(XFromCache) != "1" { + t.Fatalf(`XFromCache header isn't "1": %v`, resp.Header.Get(XFromCache)) + } + counter2 = resp.Header.Get("x-counter") + } + if counter == counter2 { + t.Fatalf(`both "x-counter" values are equal: %v %v`, counter, counter2) + } +} + +func TestParseCacheControl(t *testing.T) { + resetTest() + h := http.Header{} + for range parseCacheControl(h) { + t.Fatal("cacheControl should be empty") + } + + h.Set("cache-control", "no-cache") + { + cc := parseCacheControl(h) + if _, ok := cc["foo"]; ok { + t.Error(`Value "foo" shouldn't exist`) + } + noCache, ok := cc["no-cache"] + if !ok { + t.Fatalf(`"no-cache" value isn't set`) + } + if noCache != "" { + t.Fatalf(`"no-cache" value isn't blank: %v`, noCache) + } + } + h.Set("cache-control", "no-cache, max-age=3600") + { + cc := parseCacheControl(h) + noCache, ok := cc["no-cache"] + if !ok { + t.Fatalf(`"no-cache" value isn't set`) + } + if noCache != "" { + t.Fatalf(`"no-cache" value isn't blank: %v`, noCache) + } + if cc["max-age"] != "3600" { + t.Fatalf(`"max-age" value isn't "3600": %v`, cc["max-age"]) + } + } +} + +func TestNoCacheRequestExpiration(t *testing.T) { + resetTest() + respHeaders := http.Header{} + respHeaders.Set("Cache-Control", "max-age=7200") + + reqHeaders := http.Header{} + reqHeaders.Set("Cache-Control", "no-cache") + if getFreshness(respHeaders, reqHeaders) != transparent { + t.Fatal("freshness isn't transparent") + } +} + +func TestNoCacheResponseExpiration(t *testing.T) { + resetTest() + respHeaders := http.Header{} + respHeaders.Set("Cache-Control", "no-cache") + respHeaders.Set("Expires", "Wed, 19 Apr 3000 11:43:00 GMT") + + reqHeaders := http.Header{} + if getFreshness(respHeaders, reqHeaders) != stale { + t.Fatal("freshness isn't stale") + } +} + +func TestReqMustRevalidate(t *testing.T) { + resetTest() + // not paying attention to request setting max-stale means never returning stale + // responses, so always acting as if must-revalidate is set + respHeaders := http.Header{} + + reqHeaders := http.Header{} + reqHeaders.Set("Cache-Control", "must-revalidate") + if getFreshness(respHeaders, reqHeaders) != stale { + t.Fatal("freshness isn't stale") + } +} + +func TestRespMustRevalidate(t *testing.T) { + resetTest() + respHeaders := http.Header{} + respHeaders.Set("Cache-Control", "must-revalidate") + + reqHeaders := http.Header{} + if getFreshness(respHeaders, reqHeaders) != stale { + t.Fatal("freshness isn't stale") + } +} + +func TestFreshExpiration(t *testing.T) { + resetTest() + now := time.Now() + respHeaders := http.Header{} + respHeaders.Set("date", now.Format(time.RFC1123)) + respHeaders.Set("expires", now.Add(time.Duration(2)*time.Second).Format(time.RFC1123)) + + reqHeaders := http.Header{} + if getFreshness(respHeaders, reqHeaders) != fresh { + t.Fatal("freshness isn't fresh") + } + + clock = &fakeClock{elapsed: 3 * time.Second} + if getFreshness(respHeaders, reqHeaders) != stale { + t.Fatal("freshness isn't stale") + } +} + +func TestMaxAge(t *testing.T) { + resetTest() + now := time.Now() + respHeaders := http.Header{} + respHeaders.Set("date", now.Format(time.RFC1123)) + respHeaders.Set("cache-control", "max-age=2") + + reqHeaders := http.Header{} + if getFreshness(respHeaders, reqHeaders) != fresh { + t.Fatal("freshness isn't fresh") + } + + clock = &fakeClock{elapsed: 3 * time.Second} + if getFreshness(respHeaders, reqHeaders) != stale { + t.Fatal("freshness isn't stale") + } +} + +func TestMaxAgeZero(t *testing.T) { + resetTest() + now := time.Now() + respHeaders := http.Header{} + respHeaders.Set("date", now.Format(time.RFC1123)) + respHeaders.Set("cache-control", "max-age=0") + + reqHeaders := http.Header{} + if getFreshness(respHeaders, reqHeaders) != stale { + t.Fatal("freshness isn't stale") + } +} + +func TestBothMaxAge(t *testing.T) { + resetTest() + now := time.Now() + respHeaders := http.Header{} + respHeaders.Set("date", now.Format(time.RFC1123)) + respHeaders.Set("cache-control", "max-age=2") + + reqHeaders := http.Header{} + reqHeaders.Set("cache-control", "max-age=0") + if getFreshness(respHeaders, reqHeaders) != stale { + t.Fatal("freshness isn't stale") + } +} + +func TestMinFreshWithExpires(t *testing.T) { + resetTest() + now := time.Now() + respHeaders := http.Header{} + respHeaders.Set("date", now.Format(time.RFC1123)) + respHeaders.Set("expires", now.Add(time.Duration(2)*time.Second).Format(time.RFC1123)) + + reqHeaders := http.Header{} + reqHeaders.Set("cache-control", "min-fresh=1") + if getFreshness(respHeaders, reqHeaders) != fresh { + t.Fatal("freshness isn't fresh") + } + + reqHeaders = http.Header{} + reqHeaders.Set("cache-control", "min-fresh=2") + if getFreshness(respHeaders, reqHeaders) != stale { + t.Fatal("freshness isn't stale") + } +} + +func TestEmptyMaxStale(t *testing.T) { + resetTest() + now := time.Now() + respHeaders := http.Header{} + respHeaders.Set("date", now.Format(time.RFC1123)) + respHeaders.Set("cache-control", "max-age=20") + + reqHeaders := http.Header{} + reqHeaders.Set("cache-control", "max-stale") + clock = &fakeClock{elapsed: 10 * time.Second} + if getFreshness(respHeaders, reqHeaders) != fresh { + t.Fatal("freshness isn't fresh") + } + + clock = &fakeClock{elapsed: 60 * time.Second} + if getFreshness(respHeaders, reqHeaders) != fresh { + t.Fatal("freshness isn't fresh") + } +} + +func TestMaxStaleValue(t *testing.T) { + resetTest() + now := time.Now() + respHeaders := http.Header{} + respHeaders.Set("date", now.Format(time.RFC1123)) + respHeaders.Set("cache-control", "max-age=10") + + reqHeaders := http.Header{} + reqHeaders.Set("cache-control", "max-stale=20") + clock = &fakeClock{elapsed: 5 * time.Second} + if getFreshness(respHeaders, reqHeaders) != fresh { + t.Fatal("freshness isn't fresh") + } + + clock = &fakeClock{elapsed: 15 * time.Second} + if getFreshness(respHeaders, reqHeaders) != fresh { + t.Fatal("freshness isn't fresh") + } + + clock = &fakeClock{elapsed: 30 * time.Second} + if getFreshness(respHeaders, reqHeaders) != stale { + t.Fatal("freshness isn't stale") + } +} + +func containsHeader(headers []string, header string) bool { + for _, v := range headers { + if http.CanonicalHeaderKey(v) == http.CanonicalHeaderKey(header) { + return true + } + } + return false +} + +func TestGetEndToEndHeaders(t *testing.T) { + resetTest() + var ( + headers http.Header + end2end []string + ) + + headers = http.Header{} + headers.Set("content-type", "text/html") + headers.Set("te", "deflate") + + end2end = getEndToEndHeaders(headers) + if !containsHeader(end2end, "content-type") { + t.Fatal(`doesn't contain "content-type" header`) + } + if containsHeader(end2end, "te") { + t.Fatal(`doesn't contain "te" header`) + } + + headers = http.Header{} + headers.Set("connection", "content-type") + headers.Set("content-type", "text/csv") + headers.Set("te", "deflate") + end2end = getEndToEndHeaders(headers) + if containsHeader(end2end, "connection") { + t.Fatal(`doesn't contain "connection" header`) + } + if containsHeader(end2end, "content-type") { + t.Fatal(`doesn't contain "content-type" header`) + } + if containsHeader(end2end, "te") { + t.Fatal(`doesn't contain "te" header`) + } + + headers = http.Header{} + end2end = getEndToEndHeaders(headers) + if len(end2end) != 0 { + t.Fatal(`non-zero end2end headers`) + } + + headers = http.Header{} + headers.Set("connection", "content-type") + end2end = getEndToEndHeaders(headers) + if len(end2end) != 0 { + t.Fatal(`non-zero end2end headers`) + } +} + +type transportMock struct { + response *http.Response + err error +} + +func (t transportMock) RoundTrip(req *http.Request) (resp *http.Response, err error) { + return t.response, t.err +} + +func TestStaleIfErrorRequest(t *testing.T) { + resetTest() + now := time.Now() + tmock := transportMock{ + response: &http.Response{ + Status: http.StatusText(http.StatusOK), + StatusCode: http.StatusOK, + Header: http.Header{ + "Date": []string{now.Format(time.RFC1123)}, + "Cache-Control": []string{"no-cache"}, + }, + Body: ioutil.NopCloser(bytes.NewBuffer([]byte("some data"))), + }, + err: nil, + } + tp := NewMemoryCacheTransport() + tp.Transport = &tmock + + // First time, response is cached on success + r, _ := http.NewRequest("GET", "http://somewhere.com/", nil) + r.Header.Set("Cache-Control", "stale-if-error") + resp, err := tp.RoundTrip(r) + if err != nil { + t.Fatal(err) + } + if resp == nil { + t.Fatal("resp is nil") + } + _, err = ioutil.ReadAll(resp.Body) + if err != nil { + t.Fatal(err) + } + + // On failure, response is returned from the cache + tmock.response = nil + tmock.err = errors.New("some error") + resp, err = tp.RoundTrip(r) + if err != nil { + t.Fatal(err) + } + if resp == nil { + t.Fatal("resp is nil") + } +} + +func TestStaleIfErrorRequestLifetime(t *testing.T) { + resetTest() + now := time.Now() + tmock := transportMock{ + response: &http.Response{ + Status: http.StatusText(http.StatusOK), + StatusCode: http.StatusOK, + Header: http.Header{ + "Date": []string{now.Format(time.RFC1123)}, + "Cache-Control": []string{"no-cache"}, + }, + Body: ioutil.NopCloser(bytes.NewBuffer([]byte("some data"))), + }, + err: nil, + } + tp := NewMemoryCacheTransport() + tp.Transport = &tmock + + // First time, response is cached on success + r, _ := http.NewRequest("GET", "http://somewhere.com/", nil) + r.Header.Set("Cache-Control", "stale-if-error=100") + resp, err := tp.RoundTrip(r) + if err != nil { + t.Fatal(err) + } + if resp == nil { + t.Fatal("resp is nil") + } + _, err = ioutil.ReadAll(resp.Body) + if err != nil { + t.Fatal(err) + } + + // On failure, response is returned from the cache + tmock.response = nil + tmock.err = errors.New("some error") + resp, err = tp.RoundTrip(r) + if err != nil { + t.Fatal(err) + } + if resp == nil { + t.Fatal("resp is nil") + } + + // Same for http errors + tmock.response = &http.Response{StatusCode: http.StatusInternalServerError} + tmock.err = nil + resp, err = tp.RoundTrip(r) + if err != nil { + t.Fatal(err) + } + if resp == nil { + t.Fatal("resp is nil") + } + + // If failure last more than max stale, error is returned + clock = &fakeClock{elapsed: 200 * time.Second} + _, err = tp.RoundTrip(r) + if err != tmock.err { + t.Fatalf("got err %v, want %v", err, tmock.err) + } +} + +func TestStaleIfErrorResponse(t *testing.T) { + resetTest() + now := time.Now() + tmock := transportMock{ + response: &http.Response{ + Status: http.StatusText(http.StatusOK), + StatusCode: http.StatusOK, + Header: http.Header{ + "Date": []string{now.Format(time.RFC1123)}, + "Cache-Control": []string{"no-cache, stale-if-error"}, + }, + Body: ioutil.NopCloser(bytes.NewBuffer([]byte("some data"))), + }, + err: nil, + } + tp := NewMemoryCacheTransport() + tp.Transport = &tmock + + // First time, response is cached on success + r, _ := http.NewRequest("GET", "http://somewhere.com/", nil) + resp, err := tp.RoundTrip(r) + if err != nil { + t.Fatal(err) + } + if resp == nil { + t.Fatal("resp is nil") + } + _, err = ioutil.ReadAll(resp.Body) + if err != nil { + t.Fatal(err) + } + + // On failure, response is returned from the cache + tmock.response = nil + tmock.err = errors.New("some error") + resp, err = tp.RoundTrip(r) + if err != nil { + t.Fatal(err) + } + if resp == nil { + t.Fatal("resp is nil") + } +} + +func TestStaleIfErrorResponseLifetime(t *testing.T) { + resetTest() + now := time.Now() + tmock := transportMock{ + response: &http.Response{ + Status: http.StatusText(http.StatusOK), + StatusCode: http.StatusOK, + Header: http.Header{ + "Date": []string{now.Format(time.RFC1123)}, + "Cache-Control": []string{"no-cache, stale-if-error=100"}, + }, + Body: ioutil.NopCloser(bytes.NewBuffer([]byte("some data"))), + }, + err: nil, + } + tp := NewMemoryCacheTransport() + tp.Transport = &tmock + + // First time, response is cached on success + r, _ := http.NewRequest("GET", "http://somewhere.com/", nil) + resp, err := tp.RoundTrip(r) + if err != nil { + t.Fatal(err) + } + if resp == nil { + t.Fatal("resp is nil") + } + _, err = ioutil.ReadAll(resp.Body) + if err != nil { + t.Fatal(err) + } + + // On failure, response is returned from the cache + tmock.response = nil + tmock.err = errors.New("some error") + resp, err = tp.RoundTrip(r) + if err != nil { + t.Fatal(err) + } + if resp == nil { + t.Fatal("resp is nil") + } + + // If failure last more than max stale, error is returned + clock = &fakeClock{elapsed: 200 * time.Second} + _, err = tp.RoundTrip(r) + if err != tmock.err { + t.Fatalf("got err %v, want %v", err, tmock.err) + } +} + +// Test that http.Client.Timeout is respected when cache transport is used. +// That is so as long as request cancellation is propagated correctly. +// In the past, that required CancelRequest to be implemented correctly, +// but modern http.Client uses Request.Cancel (or request context) instead, +// so we don't have to do anything. +func TestClientTimeout(t *testing.T) { + if testing.Short() { + t.Skip("skipping timeout test in short mode") // Because it takes at least 3 seconds to run. + } + resetTest() + client := &http.Client{ + Transport: NewMemoryCacheTransport(), + Timeout: time.Second, + } + started := time.Now() + resp, err := client.Get(s.server.URL + "/3seconds") + taken := time.Since(started) + if err == nil { + t.Error("got nil error, want timeout error") + } + if resp != nil { + t.Error("got non-nil resp, want nil resp") + } + if taken >= 2*time.Second { + t.Error("client.Do took 2+ seconds, want < 2 seconds") + } +} diff --git a/vendor/github.com/hashicorp/golang-lru/2q_test.go b/vendor/github.com/hashicorp/golang-lru/2q_test.go new file mode 100644 index 000000000..1b0f35181 --- /dev/null +++ b/vendor/github.com/hashicorp/golang-lru/2q_test.go @@ -0,0 +1,306 @@ +package lru + +import ( + "math/rand" + "testing" +) + +func Benchmark2Q_Rand(b *testing.B) { + l, err := New2Q(8192) + if err != nil { + b.Fatalf("err: %v", err) + } + + trace := make([]int64, b.N*2) + for i := 0; i < b.N*2; i++ { + trace[i] = rand.Int63() % 32768 + } + + b.ResetTimer() + + var hit, miss int + for i := 0; i < 2*b.N; i++ { + if i%2 == 0 { + l.Add(trace[i], trace[i]) + } else { + _, ok := l.Get(trace[i]) + if ok { + hit++ + } else { + miss++ + } + } + } + b.Logf("hit: %d miss: %d ratio: %f", hit, miss, float64(hit)/float64(miss)) +} + +func Benchmark2Q_Freq(b *testing.B) { + l, err := New2Q(8192) + if err != nil { + b.Fatalf("err: %v", err) + } + + trace := make([]int64, b.N*2) + for i := 0; i < b.N*2; i++ { + if i%2 == 0 { + trace[i] = rand.Int63() % 16384 + } else { + trace[i] = rand.Int63() % 32768 + } + } + + b.ResetTimer() + + for i := 0; i < b.N; i++ { + l.Add(trace[i], trace[i]) + } + var hit, miss int + for i := 0; i < b.N; i++ { + _, ok := l.Get(trace[i]) + if ok { + hit++ + } else { + miss++ + } + } + b.Logf("hit: %d miss: %d ratio: %f", hit, miss, float64(hit)/float64(miss)) +} + +func Test2Q_RandomOps(t *testing.T) { + size := 128 + l, err := New2Q(128) + if err != nil { + t.Fatalf("err: %v", err) + } + + n := 200000 + for i := 0; i < n; i++ { + key := rand.Int63() % 512 + r := rand.Int63() + switch r % 3 { + case 0: + l.Add(key, key) + case 1: + l.Get(key) + case 2: + l.Remove(key) + } + + if l.recent.Len()+l.frequent.Len() > size { + t.Fatalf("bad: recent: %d freq: %d", + l.recent.Len(), l.frequent.Len()) + } + } +} + +func Test2Q_Get_RecentToFrequent(t *testing.T) { + l, err := New2Q(128) + if err != nil { + t.Fatalf("err: %v", err) + } + + // Touch all the entries, should be in t1 + for i := 0; i < 128; i++ { + l.Add(i, i) + } + if n := l.recent.Len(); n != 128 { + t.Fatalf("bad: %d", n) + } + if n := l.frequent.Len(); n != 0 { + t.Fatalf("bad: %d", n) + } + + // Get should upgrade to t2 + for i := 0; i < 128; i++ { + _, ok := l.Get(i) + if !ok { + t.Fatalf("missing: %d", i) + } + } + if n := l.recent.Len(); n != 0 { + t.Fatalf("bad: %d", n) + } + if n := l.frequent.Len(); n != 128 { + t.Fatalf("bad: %d", n) + } + + // Get be from t2 + for i := 0; i < 128; i++ { + _, ok := l.Get(i) + if !ok { + t.Fatalf("missing: %d", i) + } + } + if n := l.recent.Len(); n != 0 { + t.Fatalf("bad: %d", n) + } + if n := l.frequent.Len(); n != 128 { + t.Fatalf("bad: %d", n) + } +} + +func Test2Q_Add_RecentToFrequent(t *testing.T) { + l, err := New2Q(128) + if err != nil { + t.Fatalf("err: %v", err) + } + + // Add initially to recent + l.Add(1, 1) + if n := l.recent.Len(); n != 1 { + t.Fatalf("bad: %d", n) + } + if n := l.frequent.Len(); n != 0 { + t.Fatalf("bad: %d", n) + } + + // Add should upgrade to frequent + l.Add(1, 1) + if n := l.recent.Len(); n != 0 { + t.Fatalf("bad: %d", n) + } + if n := l.frequent.Len(); n != 1 { + t.Fatalf("bad: %d", n) + } + + // Add should remain in frequent + l.Add(1, 1) + if n := l.recent.Len(); n != 0 { + t.Fatalf("bad: %d", n) + } + if n := l.frequent.Len(); n != 1 { + t.Fatalf("bad: %d", n) + } +} + +func Test2Q_Add_RecentEvict(t *testing.T) { + l, err := New2Q(4) + if err != nil { + t.Fatalf("err: %v", err) + } + + // Add 1,2,3,4,5 -> Evict 1 + l.Add(1, 1) + l.Add(2, 2) + l.Add(3, 3) + l.Add(4, 4) + l.Add(5, 5) + if n := l.recent.Len(); n != 4 { + t.Fatalf("bad: %d", n) + } + if n := l.recentEvict.Len(); n != 1 { + t.Fatalf("bad: %d", n) + } + if n := l.frequent.Len(); n != 0 { + t.Fatalf("bad: %d", n) + } + + // Pull in the recently evicted + l.Add(1, 1) + if n := l.recent.Len(); n != 3 { + t.Fatalf("bad: %d", n) + } + if n := l.recentEvict.Len(); n != 1 { + t.Fatalf("bad: %d", n) + } + if n := l.frequent.Len(); n != 1 { + t.Fatalf("bad: %d", n) + } + + // Add 6, should cause another recent evict + l.Add(6, 6) + if n := l.recent.Len(); n != 3 { + t.Fatalf("bad: %d", n) + } + if n := l.recentEvict.Len(); n != 2 { + t.Fatalf("bad: %d", n) + } + if n := l.frequent.Len(); n != 1 { + t.Fatalf("bad: %d", n) + } +} + +func Test2Q(t *testing.T) { + l, err := New2Q(128) + if err != nil { + t.Fatalf("err: %v", err) + } + + for i := 0; i < 256; i++ { + l.Add(i, i) + } + if l.Len() != 128 { + t.Fatalf("bad len: %v", l.Len()) + } + + for i, k := range l.Keys() { + if v, ok := l.Get(k); !ok || v != k || v != i+128 { + t.Fatalf("bad key: %v", k) + } + } + for i := 0; i < 128; i++ { + _, ok := l.Get(i) + if ok { + t.Fatalf("should be evicted") + } + } + for i := 128; i < 256; i++ { + _, ok := l.Get(i) + if !ok { + t.Fatalf("should not be evicted") + } + } + for i := 128; i < 192; i++ { + l.Remove(i) + _, ok := l.Get(i) + if ok { + t.Fatalf("should be deleted") + } + } + + l.Purge() + if l.Len() != 0 { + t.Fatalf("bad len: %v", l.Len()) + } + if _, ok := l.Get(200); ok { + t.Fatalf("should contain nothing") + } +} + +// Test that Contains doesn't update recent-ness +func Test2Q_Contains(t *testing.T) { + l, err := New2Q(2) + if err != nil { + t.Fatalf("err: %v", err) + } + + l.Add(1, 1) + l.Add(2, 2) + if !l.Contains(1) { + t.Errorf("1 should be contained") + } + + l.Add(3, 3) + if l.Contains(1) { + t.Errorf("Contains should not have updated recent-ness of 1") + } +} + +// Test that Peek doesn't update recent-ness +func Test2Q_Peek(t *testing.T) { + l, err := New2Q(2) + if err != nil { + t.Fatalf("err: %v", err) + } + + l.Add(1, 1) + l.Add(2, 2) + if v, ok := l.Peek(1); !ok || v != 1 { + t.Errorf("1 should be set to 1: %v, %v", v, ok) + } + + l.Add(3, 3) + if l.Contains(1) { + t.Errorf("should not have updated recent-ness of 1") + } +} diff --git a/vendor/github.com/hashicorp/golang-lru/arc_test.go b/vendor/github.com/hashicorp/golang-lru/arc_test.go new file mode 100644 index 000000000..e2d9b68c6 --- /dev/null +++ b/vendor/github.com/hashicorp/golang-lru/arc_test.go @@ -0,0 +1,377 @@ +package lru + +import ( + "math/rand" + "testing" + "time" +) + +func init() { + rand.Seed(time.Now().Unix()) +} + +func BenchmarkARC_Rand(b *testing.B) { + l, err := NewARC(8192) + if err != nil { + b.Fatalf("err: %v", err) + } + + trace := make([]int64, b.N*2) + for i := 0; i < b.N*2; i++ { + trace[i] = rand.Int63() % 32768 + } + + b.ResetTimer() + + var hit, miss int + for i := 0; i < 2*b.N; i++ { + if i%2 == 0 { + l.Add(trace[i], trace[i]) + } else { + _, ok := l.Get(trace[i]) + if ok { + hit++ + } else { + miss++ + } + } + } + b.Logf("hit: %d miss: %d ratio: %f", hit, miss, float64(hit)/float64(miss)) +} + +func BenchmarkARC_Freq(b *testing.B) { + l, err := NewARC(8192) + if err != nil { + b.Fatalf("err: %v", err) + } + + trace := make([]int64, b.N*2) + for i := 0; i < b.N*2; i++ { + if i%2 == 0 { + trace[i] = rand.Int63() % 16384 + } else { + trace[i] = rand.Int63() % 32768 + } + } + + b.ResetTimer() + + for i := 0; i < b.N; i++ { + l.Add(trace[i], trace[i]) + } + var hit, miss int + for i := 0; i < b.N; i++ { + _, ok := l.Get(trace[i]) + if ok { + hit++ + } else { + miss++ + } + } + b.Logf("hit: %d miss: %d ratio: %f", hit, miss, float64(hit)/float64(miss)) +} + +func TestARC_RandomOps(t *testing.T) { + size := 128 + l, err := NewARC(128) + if err != nil { + t.Fatalf("err: %v", err) + } + + n := 200000 + for i := 0; i < n; i++ { + key := rand.Int63() % 512 + r := rand.Int63() + switch r % 3 { + case 0: + l.Add(key, key) + case 1: + l.Get(key) + case 2: + l.Remove(key) + } + + if l.t1.Len()+l.t2.Len() > size { + t.Fatalf("bad: t1: %d t2: %d b1: %d b2: %d p: %d", + l.t1.Len(), l.t2.Len(), l.b1.Len(), l.b2.Len(), l.p) + } + if l.b1.Len()+l.b2.Len() > size { + t.Fatalf("bad: t1: %d t2: %d b1: %d b2: %d p: %d", + l.t1.Len(), l.t2.Len(), l.b1.Len(), l.b2.Len(), l.p) + } + } +} + +func TestARC_Get_RecentToFrequent(t *testing.T) { + l, err := NewARC(128) + if err != nil { + t.Fatalf("err: %v", err) + } + + // Touch all the entries, should be in t1 + for i := 0; i < 128; i++ { + l.Add(i, i) + } + if n := l.t1.Len(); n != 128 { + t.Fatalf("bad: %d", n) + } + if n := l.t2.Len(); n != 0 { + t.Fatalf("bad: %d", n) + } + + // Get should upgrade to t2 + for i := 0; i < 128; i++ { + _, ok := l.Get(i) + if !ok { + t.Fatalf("missing: %d", i) + } + } + if n := l.t1.Len(); n != 0 { + t.Fatalf("bad: %d", n) + } + if n := l.t2.Len(); n != 128 { + t.Fatalf("bad: %d", n) + } + + // Get be from t2 + for i := 0; i < 128; i++ { + _, ok := l.Get(i) + if !ok { + t.Fatalf("missing: %d", i) + } + } + if n := l.t1.Len(); n != 0 { + t.Fatalf("bad: %d", n) + } + if n := l.t2.Len(); n != 128 { + t.Fatalf("bad: %d", n) + } +} + +func TestARC_Add_RecentToFrequent(t *testing.T) { + l, err := NewARC(128) + if err != nil { + t.Fatalf("err: %v", err) + } + + // Add initially to t1 + l.Add(1, 1) + if n := l.t1.Len(); n != 1 { + t.Fatalf("bad: %d", n) + } + if n := l.t2.Len(); n != 0 { + t.Fatalf("bad: %d", n) + } + + // Add should upgrade to t2 + l.Add(1, 1) + if n := l.t1.Len(); n != 0 { + t.Fatalf("bad: %d", n) + } + if n := l.t2.Len(); n != 1 { + t.Fatalf("bad: %d", n) + } + + // Add should remain in t2 + l.Add(1, 1) + if n := l.t1.Len(); n != 0 { + t.Fatalf("bad: %d", n) + } + if n := l.t2.Len(); n != 1 { + t.Fatalf("bad: %d", n) + } +} + +func TestARC_Adaptive(t *testing.T) { + l, err := NewARC(4) + if err != nil { + t.Fatalf("err: %v", err) + } + + // Fill t1 + for i := 0; i < 4; i++ { + l.Add(i, i) + } + if n := l.t1.Len(); n != 4 { + t.Fatalf("bad: %d", n) + } + + // Move to t2 + l.Get(0) + l.Get(1) + if n := l.t2.Len(); n != 2 { + t.Fatalf("bad: %d", n) + } + + // Evict from t1 + l.Add(4, 4) + if n := l.b1.Len(); n != 1 { + t.Fatalf("bad: %d", n) + } + + // Current state + // t1 : (MRU) [4, 3] (LRU) + // t2 : (MRU) [1, 0] (LRU) + // b1 : (MRU) [2] (LRU) + // b2 : (MRU) [] (LRU) + + // Add 2, should cause hit on b1 + l.Add(2, 2) + if n := l.b1.Len(); n != 1 { + t.Fatalf("bad: %d", n) + } + if l.p != 1 { + t.Fatalf("bad: %d", l.p) + } + if n := l.t2.Len(); n != 3 { + t.Fatalf("bad: %d", n) + } + + // Current state + // t1 : (MRU) [4] (LRU) + // t2 : (MRU) [2, 1, 0] (LRU) + // b1 : (MRU) [3] (LRU) + // b2 : (MRU) [] (LRU) + + // Add 4, should migrate to t2 + l.Add(4, 4) + if n := l.t1.Len(); n != 0 { + t.Fatalf("bad: %d", n) + } + if n := l.t2.Len(); n != 4 { + t.Fatalf("bad: %d", n) + } + + // Current state + // t1 : (MRU) [] (LRU) + // t2 : (MRU) [4, 2, 1, 0] (LRU) + // b1 : (MRU) [3] (LRU) + // b2 : (MRU) [] (LRU) + + // Add 4, should evict to b2 + l.Add(5, 5) + if n := l.t1.Len(); n != 1 { + t.Fatalf("bad: %d", n) + } + if n := l.t2.Len(); n != 3 { + t.Fatalf("bad: %d", n) + } + if n := l.b2.Len(); n != 1 { + t.Fatalf("bad: %d", n) + } + + // Current state + // t1 : (MRU) [5] (LRU) + // t2 : (MRU) [4, 2, 1] (LRU) + // b1 : (MRU) [3] (LRU) + // b2 : (MRU) [0] (LRU) + + // Add 0, should decrease p + l.Add(0, 0) + if n := l.t1.Len(); n != 0 { + t.Fatalf("bad: %d", n) + } + if n := l.t2.Len(); n != 4 { + t.Fatalf("bad: %d", n) + } + if n := l.b1.Len(); n != 2 { + t.Fatalf("bad: %d", n) + } + if n := l.b2.Len(); n != 0 { + t.Fatalf("bad: %d", n) + } + if l.p != 0 { + t.Fatalf("bad: %d", l.p) + } + + // Current state + // t1 : (MRU) [] (LRU) + // t2 : (MRU) [0, 4, 2, 1] (LRU) + // b1 : (MRU) [5, 3] (LRU) + // b2 : (MRU) [0] (LRU) +} + +func TestARC(t *testing.T) { + l, err := NewARC(128) + if err != nil { + t.Fatalf("err: %v", err) + } + + for i := 0; i < 256; i++ { + l.Add(i, i) + } + if l.Len() != 128 { + t.Fatalf("bad len: %v", l.Len()) + } + + for i, k := range l.Keys() { + if v, ok := l.Get(k); !ok || v != k || v != i+128 { + t.Fatalf("bad key: %v", k) + } + } + for i := 0; i < 128; i++ { + _, ok := l.Get(i) + if ok { + t.Fatalf("should be evicted") + } + } + for i := 128; i < 256; i++ { + _, ok := l.Get(i) + if !ok { + t.Fatalf("should not be evicted") + } + } + for i := 128; i < 192; i++ { + l.Remove(i) + _, ok := l.Get(i) + if ok { + t.Fatalf("should be deleted") + } + } + + l.Purge() + if l.Len() != 0 { + t.Fatalf("bad len: %v", l.Len()) + } + if _, ok := l.Get(200); ok { + t.Fatalf("should contain nothing") + } +} + +// Test that Contains doesn't update recent-ness +func TestARC_Contains(t *testing.T) { + l, err := NewARC(2) + if err != nil { + t.Fatalf("err: %v", err) + } + + l.Add(1, 1) + l.Add(2, 2) + if !l.Contains(1) { + t.Errorf("1 should be contained") + } + + l.Add(3, 3) + if l.Contains(1) { + t.Errorf("Contains should not have updated recent-ness of 1") + } +} + +// Test that Peek doesn't update recent-ness +func TestARC_Peek(t *testing.T) { + l, err := NewARC(2) + if err != nil { + t.Fatalf("err: %v", err) + } + + l.Add(1, 1) + l.Add(2, 2) + if v, ok := l.Peek(1); !ok || v != 1 { + t.Errorf("1 should be set to 1: %v, %v", v, ok) + } + + l.Add(3, 3) + if l.Contains(1) { + t.Errorf("should not have updated recent-ness of 1") + } +} diff --git a/vendor/github.com/hashicorp/golang-lru/lru_test.go b/vendor/github.com/hashicorp/golang-lru/lru_test.go new file mode 100644 index 000000000..2b31218b0 --- /dev/null +++ b/vendor/github.com/hashicorp/golang-lru/lru_test.go @@ -0,0 +1,221 @@ +package lru + +import ( + "math/rand" + "testing" +) + +func BenchmarkLRU_Rand(b *testing.B) { + l, err := New(8192) + if err != nil { + b.Fatalf("err: %v", err) + } + + trace := make([]int64, b.N*2) + for i := 0; i < b.N*2; i++ { + trace[i] = rand.Int63() % 32768 + } + + b.ResetTimer() + + var hit, miss int + for i := 0; i < 2*b.N; i++ { + if i%2 == 0 { + l.Add(trace[i], trace[i]) + } else { + _, ok := l.Get(trace[i]) + if ok { + hit++ + } else { + miss++ + } + } + } + b.Logf("hit: %d miss: %d ratio: %f", hit, miss, float64(hit)/float64(miss)) +} + +func BenchmarkLRU_Freq(b *testing.B) { + l, err := New(8192) + if err != nil { + b.Fatalf("err: %v", err) + } + + trace := make([]int64, b.N*2) + for i := 0; i < b.N*2; i++ { + if i%2 == 0 { + trace[i] = rand.Int63() % 16384 + } else { + trace[i] = rand.Int63() % 32768 + } + } + + b.ResetTimer() + + for i := 0; i < b.N; i++ { + l.Add(trace[i], trace[i]) + } + var hit, miss int + for i := 0; i < b.N; i++ { + _, ok := l.Get(trace[i]) + if ok { + hit++ + } else { + miss++ + } + } + b.Logf("hit: %d miss: %d ratio: %f", hit, miss, float64(hit)/float64(miss)) +} + +func TestLRU(t *testing.T) { + evictCounter := 0 + onEvicted := func(k interface{}, v interface{}) { + if k != v { + t.Fatalf("Evict values not equal (%v!=%v)", k, v) + } + evictCounter += 1 + } + l, err := NewWithEvict(128, onEvicted) + if err != nil { + t.Fatalf("err: %v", err) + } + + for i := 0; i < 256; i++ { + l.Add(i, i) + } + if l.Len() != 128 { + t.Fatalf("bad len: %v", l.Len()) + } + + if evictCounter != 128 { + t.Fatalf("bad evict count: %v", evictCounter) + } + + for i, k := range l.Keys() { + if v, ok := l.Get(k); !ok || v != k || v != i+128 { + t.Fatalf("bad key: %v", k) + } + } + for i := 0; i < 128; i++ { + _, ok := l.Get(i) + if ok { + t.Fatalf("should be evicted") + } + } + for i := 128; i < 256; i++ { + _, ok := l.Get(i) + if !ok { + t.Fatalf("should not be evicted") + } + } + for i := 128; i < 192; i++ { + l.Remove(i) + _, ok := l.Get(i) + if ok { + t.Fatalf("should be deleted") + } + } + + l.Get(192) // expect 192 to be last key in l.Keys() + + for i, k := range l.Keys() { + if (i < 63 && k != i+193) || (i == 63 && k != 192) { + t.Fatalf("out of order key: %v", k) + } + } + + l.Purge() + if l.Len() != 0 { + t.Fatalf("bad len: %v", l.Len()) + } + if _, ok := l.Get(200); ok { + t.Fatalf("should contain nothing") + } +} + +// test that Add returns true/false if an eviction occurred +func TestLRUAdd(t *testing.T) { + evictCounter := 0 + onEvicted := func(k interface{}, v interface{}) { + evictCounter += 1 + } + + l, err := NewWithEvict(1, onEvicted) + if err != nil { + t.Fatalf("err: %v", err) + } + + if l.Add(1, 1) == true || evictCounter != 0 { + t.Errorf("should not have an eviction") + } + if l.Add(2, 2) == false || evictCounter != 1 { + t.Errorf("should have an eviction") + } +} + +// test that Contains doesn't update recent-ness +func TestLRUContains(t *testing.T) { + l, err := New(2) + if err != nil { + t.Fatalf("err: %v", err) + } + + l.Add(1, 1) + l.Add(2, 2) + if !l.Contains(1) { + t.Errorf("1 should be contained") + } + + l.Add(3, 3) + if l.Contains(1) { + t.Errorf("Contains should not have updated recent-ness of 1") + } +} + +// test that Contains doesn't update recent-ness +func TestLRUContainsOrAdd(t *testing.T) { + l, err := New(2) + if err != nil { + t.Fatalf("err: %v", err) + } + + l.Add(1, 1) + l.Add(2, 2) + contains, evict := l.ContainsOrAdd(1, 1) + if !contains { + t.Errorf("1 should be contained") + } + if evict { + t.Errorf("nothing should be evicted here") + } + + l.Add(3, 3) + contains, evict = l.ContainsOrAdd(1, 1) + if contains { + t.Errorf("1 should not have been contained") + } + if !evict { + t.Errorf("an eviction should have occurred") + } + if !l.Contains(1) { + t.Errorf("now 1 should be contained") + } +} + +// test that Peek doesn't update recent-ness +func TestLRUPeek(t *testing.T) { + l, err := New(2) + if err != nil { + t.Fatalf("err: %v", err) + } + + l.Add(1, 1) + l.Add(2, 2) + if v, ok := l.Peek(1); !ok || v != 1 { + t.Errorf("1 should be set to 1: %v, %v", v, ok) + } + + l.Add(3, 3) + if l.Contains(1) { + t.Errorf("should not have updated recent-ness of 1") + } +} diff --git a/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go b/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go index 68d097a1c..cb416b394 100644 --- a/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go +++ b/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go @@ -47,7 +47,7 @@ func (c *LRU) Purge() { c.evictList.Init() } -// Add adds a value to the cache. Returns true if an eviction occured. +// Add adds a value to the cache. Returns true if an eviction occurred. func (c *LRU) Add(key, value interface{}) bool { // Check for existing item if ent, ok := c.items[key]; ok { diff --git a/vendor/github.com/hashicorp/golang-lru/simplelru/lru_test.go b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_test.go new file mode 100644 index 000000000..a958934f6 --- /dev/null +++ b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_test.go @@ -0,0 +1,167 @@ +package simplelru + +import "testing" + +func TestLRU(t *testing.T) { + evictCounter := 0 + onEvicted := func(k interface{}, v interface{}) { + if k != v { + t.Fatalf("Evict values not equal (%v!=%v)", k, v) + } + evictCounter += 1 + } + l, err := NewLRU(128, onEvicted) + if err != nil { + t.Fatalf("err: %v", err) + } + + for i := 0; i < 256; i++ { + l.Add(i, i) + } + if l.Len() != 128 { + t.Fatalf("bad len: %v", l.Len()) + } + + if evictCounter != 128 { + t.Fatalf("bad evict count: %v", evictCounter) + } + + for i, k := range l.Keys() { + if v, ok := l.Get(k); !ok || v != k || v != i+128 { + t.Fatalf("bad key: %v", k) + } + } + for i := 0; i < 128; i++ { + _, ok := l.Get(i) + if ok { + t.Fatalf("should be evicted") + } + } + for i := 128; i < 256; i++ { + _, ok := l.Get(i) + if !ok { + t.Fatalf("should not be evicted") + } + } + for i := 128; i < 192; i++ { + ok := l.Remove(i) + if !ok { + t.Fatalf("should be contained") + } + ok = l.Remove(i) + if ok { + t.Fatalf("should not be contained") + } + _, ok = l.Get(i) + if ok { + t.Fatalf("should be deleted") + } + } + + l.Get(192) // expect 192 to be last key in l.Keys() + + for i, k := range l.Keys() { + if (i < 63 && k != i+193) || (i == 63 && k != 192) { + t.Fatalf("out of order key: %v", k) + } + } + + l.Purge() + if l.Len() != 0 { + t.Fatalf("bad len: %v", l.Len()) + } + if _, ok := l.Get(200); ok { + t.Fatalf("should contain nothing") + } +} + +func TestLRU_GetOldest_RemoveOldest(t *testing.T) { + l, err := NewLRU(128, nil) + if err != nil { + t.Fatalf("err: %v", err) + } + for i := 0; i < 256; i++ { + l.Add(i, i) + } + k, _, ok := l.GetOldest() + if !ok { + t.Fatalf("missing") + } + if k.(int) != 128 { + t.Fatalf("bad: %v", k) + } + + k, _, ok = l.RemoveOldest() + if !ok { + t.Fatalf("missing") + } + if k.(int) != 128 { + t.Fatalf("bad: %v", k) + } + + k, _, ok = l.RemoveOldest() + if !ok { + t.Fatalf("missing") + } + if k.(int) != 129 { + t.Fatalf("bad: %v", k) + } +} + +// Test that Add returns true/false if an eviction occurred +func TestLRU_Add(t *testing.T) { + evictCounter := 0 + onEvicted := func(k interface{}, v interface{}) { + evictCounter += 1 + } + + l, err := NewLRU(1, onEvicted) + if err != nil { + t.Fatalf("err: %v", err) + } + + if l.Add(1, 1) == true || evictCounter != 0 { + t.Errorf("should not have an eviction") + } + if l.Add(2, 2) == false || evictCounter != 1 { + t.Errorf("should have an eviction") + } +} + +// Test that Contains doesn't update recent-ness +func TestLRU_Contains(t *testing.T) { + l, err := NewLRU(2, nil) + if err != nil { + t.Fatalf("err: %v", err) + } + + l.Add(1, 1) + l.Add(2, 2) + if !l.Contains(1) { + t.Errorf("1 should be contained") + } + + l.Add(3, 3) + if l.Contains(1) { + t.Errorf("Contains should not have updated recent-ness of 1") + } +} + +// Test that Peek doesn't update recent-ness +func TestLRU_Peek(t *testing.T) { + l, err := NewLRU(2, nil) + if err != nil { + t.Fatalf("err: %v", err) + } + + l.Add(1, 1) + l.Add(2, 2) + if v, ok := l.Peek(1); !ok || v != 1 { + t.Errorf("1 should be set to 1: %v, %v", v, ok) + } + + l.Add(3, 3) + if l.Contains(1) { + t.Errorf("should not have updated recent-ness of 1") + } +} diff --git a/vendor/github.com/howeyc/gopass/pass_test.go b/vendor/github.com/howeyc/gopass/pass_test.go new file mode 100644 index 000000000..7ac315135 --- /dev/null +++ b/vendor/github.com/howeyc/gopass/pass_test.go @@ -0,0 +1,225 @@ +package gopass + +import ( + "bufio" + "bytes" + "fmt" + "io" + "io/ioutil" + "os" + "testing" + "time" +) + +// TestGetPasswd tests the password creation and output based on a byte buffer +// as input to mock the underlying getch() methods. +func TestGetPasswd(t *testing.T) { + type testData struct { + input []byte + + // Due to how backspaces are written, it is easier to manually write + // each expected output for the masked cases. + masked string + password string + byesLeft int + reason string + } + + ds := []testData{ + testData{[]byte("abc\n"), "***", "abc", 0, "Password parsing should stop at \\n"}, + testData{[]byte("abc\r"), "***", "abc", 0, "Password parsing should stop at \\r"}, + testData{[]byte("a\nbc\n"), "*", "a", 3, "Password parsing should stop at \\n"}, + testData{[]byte("*!]|\n"), "****", "*!]|", 0, "Special characters shouldn't affect the password."}, + + testData{[]byte("abc\r\n"), "***", "abc", 1, + "Password parsing should stop at \\r; Windows LINE_MODE should be unset so \\r is not converted to \\r\\n."}, + + testData{[]byte{'a', 'b', 'c', 8, '\n'}, "***\b \b", "ab", 0, "Backspace byte should remove the last read byte."}, + testData{[]byte{'a', 'b', 127, 'c', '\n'}, "**\b \b*", "ac", 0, "Delete byte should remove the last read byte."}, + testData{[]byte{'a', 'b', 127, 'c', 8, 127, '\n'}, "**\b \b*\b \b\b \b", "", 0, "Successive deletes continue to delete."}, + testData{[]byte{8, 8, 8, '\n'}, "", "", 0, "Deletes before characters are noops."}, + testData{[]byte{8, 8, 8, 'a', 'b', 'c', '\n'}, "***", "abc", 0, "Deletes before characters are noops."}, + + testData{[]byte{'a', 'b', 0, 'c', '\n'}, "***", "abc", 0, + "Nil byte should be ignored due; may get unintended nil bytes from syscalls on Windows."}, + } + + // Redirecting output for tests as they print to os.Stdout but we want to + // capture and test the output. + for _, masked := range []bool{true, false} { + for _, d := range ds { + pipeBytesToStdin(d.input) + + r, w, err := os.Pipe() + if err != nil { + t.Fatal(err.Error()) + } + + result, err := getPasswd("", masked, os.Stdin, w) + if err != nil { + t.Errorf("Error getting password: %s", err.Error()) + } + leftOnBuffer := flushStdin() + + // Test output (masked and unmasked). Delete/backspace actually + // deletes, overwrites and deletes again. As a result, we need to + // remove those from the pipe afterwards to mimic the console's + // interpretation of those bytes. + w.Close() + output, err := ioutil.ReadAll(r) + if err != nil { + t.Fatal(err.Error()) + } + var expectedOutput []byte + if masked { + expectedOutput = []byte(d.masked) + } else { + expectedOutput = []byte("") + } + if bytes.Compare(expectedOutput, output) != 0 { + t.Errorf("Expected output to equal %v (%q) but got %v (%q) instead when masked=%v. %s", expectedOutput, string(expectedOutput), output, string(output), masked, d.reason) + } + + if string(result) != d.password { + t.Errorf("Expected %q but got %q instead when masked=%v. %s", d.password, result, masked, d.reason) + } + + if leftOnBuffer != d.byesLeft { + t.Errorf("Expected %v bytes left on buffer but instead got %v when masked=%v. %s", d.byesLeft, leftOnBuffer, masked, d.reason) + } + } + } +} + +// TestPipe ensures we get our expected pipe behavior. +func TestPipe(t *testing.T) { + type testData struct { + input string + password string + expError error + } + ds := []testData{ + testData{"abc", "abc", io.EOF}, + testData{"abc\n", "abc", nil}, + testData{"abc\r", "abc", nil}, + testData{"abc\r\n", "abc", nil}, + } + + for _, d := range ds { + _, err := pipeToStdin(d.input) + if err != nil { + t.Log("Error writing input to stdin:", err) + t.FailNow() + } + pass, err := GetPasswd() + if string(pass) != d.password { + t.Errorf("Expected %q but got %q instead.", d.password, string(pass)) + } + if err != d.expError { + t.Errorf("Expected %v but got %q instead.", d.expError, err) + } + } +} + +// flushStdin reads from stdin for .5 seconds to ensure no bytes are left on +// the buffer. Returns the number of bytes read. +func flushStdin() int { + ch := make(chan byte) + go func(ch chan byte) { + reader := bufio.NewReader(os.Stdin) + for { + b, err := reader.ReadByte() + if err != nil { // Maybe log non io.EOF errors, if you want + close(ch) + return + } + ch <- b + } + close(ch) + }(ch) + + numBytes := 0 + for { + select { + case _, ok := <-ch: + if !ok { + return numBytes + } + numBytes++ + case <-time.After(500 * time.Millisecond): + return numBytes + } + } + return numBytes +} + +// pipeToStdin pipes the given string onto os.Stdin by replacing it with an +// os.Pipe. The write end of the pipe is closed so that EOF is read after the +// final byte. +func pipeToStdin(s string) (int, error) { + pipeReader, pipeWriter, err := os.Pipe() + if err != nil { + fmt.Println("Error getting os pipes:", err) + os.Exit(1) + } + os.Stdin = pipeReader + w, err := pipeWriter.WriteString(s) + pipeWriter.Close() + return w, err +} + +func pipeBytesToStdin(b []byte) (int, error) { + return pipeToStdin(string(b)) +} + +// TestGetPasswd_Err tests errors are properly handled from getch() +func TestGetPasswd_Err(t *testing.T) { + var inBuffer *bytes.Buffer + getch = func(io.Reader) (byte, error) { + b, err := inBuffer.ReadByte() + if err != nil { + return 13, err + } + if b == 'z' { + return 'z', fmt.Errorf("Forced error; byte returned should not be considered accurate.") + } + return b, nil + } + defer func() { getch = defaultGetCh }() + + for input, expectedPassword := range map[string]string{"abc": "abc", "abzc": "ab"} { + inBuffer = bytes.NewBufferString(input) + p, err := GetPasswdMasked() + if string(p) != expectedPassword { + t.Errorf("Expected %q but got %q instead.", expectedPassword, p) + } + if err == nil { + t.Errorf("Expected error to be returned.") + } + } +} + +func TestMaxPasswordLength(t *testing.T) { + type testData struct { + input []byte + expectedErr error + + // Helper field to output in case of failure; rather than hundreds of + // bytes. + inputDesc string + } + + ds := []testData{ + testData{append(bytes.Repeat([]byte{'a'}, maxLength), '\n'), nil, fmt.Sprintf("%v 'a' bytes followed by a newline", maxLength)}, + testData{append(bytes.Repeat([]byte{'a'}, maxLength+1), '\n'), ErrMaxLengthExceeded, fmt.Sprintf("%v 'a' bytes followed by a newline", maxLength+1)}, + testData{append(bytes.Repeat([]byte{0x00}, maxLength+1), '\n'), ErrMaxLengthExceeded, fmt.Sprintf("%v 0x00 bytes followed by a newline", maxLength+1)}, + } + + for _, d := range ds { + pipeBytesToStdin(d.input) + _, err := GetPasswd() + if err != d.expectedErr { + t.Errorf("Expected error to be %v; isntead got %v from %v", d.expectedErr, err, d.inputDesc) + } + } +} diff --git a/vendor/github.com/imdario/mergo/README.md b/vendor/github.com/imdario/mergo/README.md index cdcea0f65..f4769cdd7 100644 --- a/vendor/github.com/imdario/mergo/README.md +++ b/vendor/github.com/imdario/mergo/README.md @@ -8,8 +8,31 @@ Also a lovely [comune](http://en.wikipedia.org/wiki/Mergo) (municipality) in the ## Status -It is ready for production use. It works fine although it may use more of testing. Here some projects in the wild using Mergo: +It is ready for production use. It works fine after extensive use in the wild. +[![Build Status][1]][2] +[![GoDoc][3]][4] +[![GoCard][5]][6] + +[1]: https://travis-ci.org/imdario/mergo.png +[2]: https://travis-ci.org/imdario/mergo +[3]: https://godoc.org/github.com/imdario/mergo?status.svg +[4]: https://godoc.org/github.com/imdario/mergo +[5]: https://goreportcard.com/badge/imdario/mergo +[6]: https://goreportcard.com/report/github.com/imdario/mergo + +### Important note + +Mergo is intended to assign **only** zero value fields on destination with source value. Since April 6th it works like this. Before it didn't work properly, causing some random overwrites. After some issues and PRs I found it didn't merge as I designed it. Thanks to [imdario/mergo#8](https://github.com/imdario/mergo/pull/8) overwriting functions were added and the wrong behavior was clearly detected. + +If you were using Mergo **before** April 6th 2015, please check your project works as intended after updating your local copy with ```go get -u github.com/imdario/mergo```. I apologize for any issue caused by its previous behavior and any future bug that Mergo could cause (I hope it won't!) in existing projects after the change (release 0.2.0). + +### Mergo in the wild + +- [docker/docker](https://github.com/docker/docker/) +- [GoogleCloudPlatform/kubernetes](https://github.com/GoogleCloudPlatform/kubernetes) +- [imdario/zas](https://github.com/imdario/zas) +- [soniah/dnsmadeeasy](https://github.com/soniah/dnsmadeeasy) - [EagerIO/Stout](https://github.com/EagerIO/Stout) - [lynndylanhurley/defsynth-api](https://github.com/lynndylanhurley/defsynth-api) - [russross/canvasassignments](https://github.com/russross/canvasassignments) @@ -17,12 +40,16 @@ It is ready for production use. It works fine although it may use more of testin - [casualjim/exeggutor](https://github.com/casualjim/exeggutor) - [divshot/gitling](https://github.com/divshot/gitling) - [RWJMurphy/gorl](https://github.com/RWJMurphy/gorl) - -[![Build Status][1]][2] -[![GoDoc](https://godoc.org/github.com/imdario/mergo?status.svg)](https://godoc.org/github.com/imdario/mergo) - -[1]: https://travis-ci.org/imdario/mergo.png -[2]: https://travis-ci.org/imdario/mergo +- [andrerocker/deploy42](https://github.com/andrerocker/deploy42) +- [elwinar/rambler](https://github.com/elwinar/rambler) +- [tmaiaroto/gopartman](https://github.com/tmaiaroto/gopartman) +- [jfbus/impressionist](https://github.com/jfbus/impressionist) +- [Jmeyering/zealot](https://github.com/Jmeyering/zealot) +- [godep-migrator/rigger-host](https://github.com/godep-migrator/rigger-host) +- [Dronevery/MultiwaySwitch-Go](https://github.com/Dronevery/MultiwaySwitch-Go) +- [thoas/picfit](https://github.com/thoas/picfit) +- [mantasmatelis/whooplist-server](https://github.com/mantasmatelis/whooplist-server) +- [jnuthong/item_search](https://github.com/jnuthong/item_search) ## Installation @@ -51,6 +78,39 @@ Warning: if you map a struct to map, it won't do it recursively. Don't expect Me More information and examples in [godoc documentation](http://godoc.org/github.com/imdario/mergo). +### Nice example + +```go +package main + +import ( + "fmt" + "github.com/imdario/mergo" +) + +type Foo struct { + A string + B int64 +} + +func main() { + src := Foo{ + A: "one", + } + + dest := Foo{ + A: "two", + B: 2, + } + + mergo.Merge(&dest, src) + + fmt.Println(dest) + // Will print + // {two 2} +} +``` + Note: if test are failing due missing package, please execute: go get gopkg.in/yaml.v1 diff --git a/vendor/github.com/imdario/mergo/issue17_test.go b/vendor/github.com/imdario/mergo/issue17_test.go new file mode 100644 index 000000000..0ee96f377 --- /dev/null +++ b/vendor/github.com/imdario/mergo/issue17_test.go @@ -0,0 +1,25 @@ +package mergo + +import ( + "encoding/json" + "testing" +) + +var ( + request = `{"timestamp":null, "name": "foo"}` + maprequest = map[string]interface{}{ + "timestamp": nil, + "name": "foo", + "newStuff": "foo", + } +) + +func TestIssue17MergeWithOverwrite(t *testing.T) { + var something map[string]interface{} + if err := json.Unmarshal([]byte(request), &something); err != nil { + t.Errorf("Error while Unmarshalling maprequest %s", err) + } + if err := MergeWithOverwrite(&something, maprequest); err != nil { + t.Errorf("Error while merging %s", err) + } +} diff --git a/vendor/github.com/imdario/mergo/map.go b/vendor/github.com/imdario/mergo/map.go index 44361e88b..8e8c4ba8e 100644 --- a/vendor/github.com/imdario/mergo/map.go +++ b/vendor/github.com/imdario/mergo/map.go @@ -31,7 +31,7 @@ func isExported(field reflect.StructField) bool { // Traverses recursively both values, assigning src's fields values to dst. // The map argument tracks comparisons that have already been seen, which allows // short circuiting on recursive types. -func deepMap(dst, src reflect.Value, visited map[uintptr]*visit, depth int) (err error) { +func deepMap(dst, src reflect.Value, visited map[uintptr]*visit, depth int, overwrite bool) (err error) { if dst.CanAddr() { addr := dst.UnsafeAddr() h := 17 * addr @@ -57,7 +57,7 @@ func deepMap(dst, src reflect.Value, visited map[uintptr]*visit, depth int) (err } fieldName := field.Name fieldName = changeInitialCase(fieldName, unicode.ToLower) - if v, ok := dstMap[fieldName]; !ok || isEmptyValue(reflect.ValueOf(v)) { + if v, ok := dstMap[fieldName]; !ok || (isEmptyValue(reflect.ValueOf(v)) || overwrite) { dstMap[fieldName] = src.Field(i).Interface() } } @@ -89,12 +89,12 @@ func deepMap(dst, src reflect.Value, visited map[uintptr]*visit, depth int) (err continue } if srcKind == dstKind { - if err = deepMerge(dstElement, srcElement, visited, depth+1); err != nil { + if err = deepMerge(dstElement, srcElement, visited, depth+1, overwrite); err != nil { return } } else { if srcKind == reflect.Map { - if err = deepMap(dstElement, srcElement, visited, depth+1); err != nil { + if err = deepMap(dstElement, srcElement, visited, depth+1, overwrite); err != nil { return } } else { @@ -118,6 +118,16 @@ func deepMap(dst, src reflect.Value, visited map[uintptr]*visit, depth int) (err // This is separated method from Merge because it is cleaner and it keeps sane // semantics: merging equal types, mapping different (restricted) types. func Map(dst, src interface{}) error { + return _map(dst, src, false) +} + +// MapWithOverwrite will do the same as Map except that non-empty dst attributes will be overriden by +// non-empty src attribute values. +func MapWithOverwrite(dst, src interface{}) error { + return _map(dst, src, true) +} + +func _map(dst, src interface{}, overwrite bool) error { var ( vDst, vSrc reflect.Value err error @@ -128,7 +138,7 @@ func Map(dst, src interface{}) error { // To be friction-less, we redirect equal-type arguments // to deepMerge. Only because arguments can be anything. if vSrc.Kind() == vDst.Kind() { - return deepMerge(vDst, vSrc, make(map[uintptr]*visit), 0) + return deepMerge(vDst, vSrc, make(map[uintptr]*visit), 0, overwrite) } switch vSrc.Kind() { case reflect.Struct: @@ -142,5 +152,5 @@ func Map(dst, src interface{}) error { default: return ErrNotSupported } - return deepMap(vDst, vSrc, make(map[uintptr]*visit), 0) + return deepMap(vDst, vSrc, make(map[uintptr]*visit), 0, overwrite) } diff --git a/vendor/github.com/imdario/mergo/merge.go b/vendor/github.com/imdario/mergo/merge.go index 5d328b1fe..11e55b1e2 100644 --- a/vendor/github.com/imdario/mergo/merge.go +++ b/vendor/github.com/imdario/mergo/merge.go @@ -15,7 +15,7 @@ import ( // Traverses recursively both values, assigning src's fields values to dst. // The map argument tracks comparisons that have already been seen, which allows // short circuiting on recursive types. -func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int) (err error) { +func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int, overwrite bool) (err error) { if !src.IsValid() { return } @@ -35,7 +35,7 @@ func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int) (e switch dst.Kind() { case reflect.Struct: for i, n := 0, dst.NumField(); i < n; i++ { - if err = deepMerge(dst.Field(i), src.Field(i), visited, depth+1); err != nil { + if err = deepMerge(dst.Field(i), src.Field(i), visited, depth+1, overwrite); err != nil { return } } @@ -46,15 +46,31 @@ func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int) (e continue } dstElement := dst.MapIndex(key) - switch reflect.TypeOf(srcElement.Interface()).Kind() { - case reflect.Struct: + switch srcElement.Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.Interface, reflect.Slice: + if srcElement.IsNil() { + continue + } fallthrough - case reflect.Map: - if err = deepMerge(dstElement, srcElement, visited, depth+1); err != nil { - return + default: + if !srcElement.CanInterface() { + continue + } + switch reflect.TypeOf(srcElement.Interface()).Kind() { + case reflect.Struct: + fallthrough + case reflect.Ptr: + fallthrough + case reflect.Map: + if err = deepMerge(dstElement, srcElement, visited, depth+1, overwrite); err != nil { + return + } } } - if !dstElement.IsValid() { + if !isEmptyValue(srcElement) && (overwrite || (!dstElement.IsValid() || isEmptyValue(dst))) { + if dst.IsNil() { + dst.Set(reflect.MakeMap(dst.Type())) + } dst.SetMapIndex(key, srcElement) } } @@ -64,27 +80,35 @@ func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int) (e if src.IsNil() { break } else if dst.IsNil() { - if dst.CanSet() && isEmptyValue(dst) { + if dst.CanSet() && (overwrite || isEmptyValue(dst)) { dst.Set(src) } - } else if err = deepMerge(dst.Elem(), src.Elem(), visited, depth+1); err != nil { + } else if err = deepMerge(dst.Elem(), src.Elem(), visited, depth+1, overwrite); err != nil { return } default: - if dst.CanSet() && !isEmptyValue(src) { + if dst.CanSet() && !isEmptyValue(src) && (overwrite || isEmptyValue(dst)) { dst.Set(src) } } return } -// Merge sets fields' values in dst from src if they have a zero -// value of their type. -// dst and src must be valid same-type structs and dst must be -// a pointer to struct. -// It won't merge unexported (private) fields and will do recursively -// any exported field. +// Merge will fill any empty for value type attributes on the dst struct using corresponding +// src attributes if they themselves are not empty. dst and src must be valid same-type structs +// and dst must be a pointer to struct. +// It won't merge unexported (private) fields and will do recursively any exported field. func Merge(dst, src interface{}) error { + return merge(dst, src, false) +} + +// MergeWithOverwrite will do the same as Merge except that non-empty dst attributes will be overriden by +// non-empty src attribute values. +func MergeWithOverwrite(dst, src interface{}) error { + return merge(dst, src, true) +} + +func merge(dst, src interface{}, overwrite bool) error { var ( vDst, vSrc reflect.Value err error @@ -95,5 +119,5 @@ func Merge(dst, src interface{}) error { if vDst.Type() != vSrc.Type() { return ErrDifferentArgumentsTypes } - return deepMerge(vDst, vSrc, make(map[uintptr]*visit), 0) + return deepMerge(vDst, vSrc, make(map[uintptr]*visit), 0, overwrite) } diff --git a/vendor/github.com/imdario/mergo/mergo_test.go b/vendor/github.com/imdario/mergo/mergo_test.go new file mode 100644 index 000000000..dd2651b31 --- /dev/null +++ b/vendor/github.com/imdario/mergo/mergo_test.go @@ -0,0 +1,525 @@ +// Copyright 2013 Dario Castañé. All rights reserved. +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package mergo + +import ( + "io/ioutil" + "reflect" + "testing" + "time" + + "gopkg.in/yaml.v1" +) + +type simpleTest struct { + Value int +} + +type complexTest struct { + St simpleTest + sz int + ID string +} + +type moreComplextText struct { + Ct complexTest + St simpleTest + Nt simpleTest +} + +type pointerTest struct { + C *simpleTest +} + +type sliceTest struct { + S []int +} + +func TestKb(t *testing.T) { + type testStruct struct { + Name string + KeyValue map[string]interface{} + } + + akv := make(map[string]interface{}) + akv["Key1"] = "not value 1" + akv["Key2"] = "value2" + a := testStruct{} + a.Name = "A" + a.KeyValue = akv + + bkv := make(map[string]interface{}) + bkv["Key1"] = "value1" + bkv["Key3"] = "value3" + b := testStruct{} + b.Name = "B" + b.KeyValue = bkv + + ekv := make(map[string]interface{}) + ekv["Key1"] = "value1" + ekv["Key2"] = "value2" + ekv["Key3"] = "value3" + expected := testStruct{} + expected.Name = "B" + expected.KeyValue = ekv + + Merge(&b, a) + + if !reflect.DeepEqual(b, expected) { + t.Errorf("Actual: %#v did not match \nExpected: %#v", b, expected) + } +} + +func TestNil(t *testing.T) { + if err := Merge(nil, nil); err != ErrNilArguments { + t.Fail() + } +} + +func TestDifferentTypes(t *testing.T) { + a := simpleTest{42} + b := 42 + if err := Merge(&a, b); err != ErrDifferentArgumentsTypes { + t.Fail() + } +} + +func TestSimpleStruct(t *testing.T) { + a := simpleTest{} + b := simpleTest{42} + if err := Merge(&a, b); err != nil { + t.FailNow() + } + if a.Value != 42 { + t.Fatalf("b not merged in properly: a.Value(%d) != b.Value(%d)", a.Value, b.Value) + } + if !reflect.DeepEqual(a, b) { + t.FailNow() + } +} + +func TestComplexStruct(t *testing.T) { + a := complexTest{} + a.ID = "athing" + b := complexTest{simpleTest{42}, 1, "bthing"} + if err := Merge(&a, b); err != nil { + t.FailNow() + } + if a.St.Value != 42 { + t.Fatalf("b not merged in properly: a.St.Value(%d) != b.St.Value(%d)", a.St.Value, b.St.Value) + } + if a.sz == 1 { + t.Fatalf("a's private field sz not preserved from merge: a.sz(%d) == b.sz(%d)", a.sz, b.sz) + } + if a.ID == b.ID { + t.Fatalf("a's field ID merged unexpectedly: a.ID(%s) == b.ID(%s)", a.ID, b.ID) + } +} + +func TestComplexStructWithOverwrite(t *testing.T) { + a := complexTest{simpleTest{1}, 1, "do-not-overwrite-with-empty-value"} + b := complexTest{simpleTest{42}, 2, ""} + + expect := complexTest{simpleTest{42}, 1, "do-not-overwrite-with-empty-value"} + if err := MergeWithOverwrite(&a, b); err != nil { + t.FailNow() + } + + if !reflect.DeepEqual(a, expect) { + t.Fatalf("Test failed:\ngot :\n%#v\n\nwant :\n%#v\n\n", a, expect) + } +} + +func TestPointerStruct(t *testing.T) { + s1 := simpleTest{} + s2 := simpleTest{19} + a := pointerTest{&s1} + b := pointerTest{&s2} + if err := Merge(&a, b); err != nil { + t.FailNow() + } + if a.C.Value != b.C.Value { + t.Fatalf("b not merged in properly: a.C.Value(%d) != b.C.Value(%d)", a.C.Value, b.C.Value) + } +} + +type embeddingStruct struct { + embeddedStruct +} + +type embeddedStruct struct { + A string +} + +func TestEmbeddedStruct(t *testing.T) { + tests := []struct { + src embeddingStruct + dst embeddingStruct + expected embeddingStruct + }{ + { + src: embeddingStruct{ + embeddedStruct{"foo"}, + }, + dst: embeddingStruct{ + embeddedStruct{""}, + }, + expected: embeddingStruct{ + embeddedStruct{"foo"}, + }, + }, + { + src: embeddingStruct{ + embeddedStruct{""}, + }, + dst: embeddingStruct{ + embeddedStruct{"bar"}, + }, + expected: embeddingStruct{ + embeddedStruct{"bar"}, + }, + }, + { + src: embeddingStruct{ + embeddedStruct{"foo"}, + }, + dst: embeddingStruct{ + embeddedStruct{"bar"}, + }, + expected: embeddingStruct{ + embeddedStruct{"bar"}, + }, + }, + } + + for _, test := range tests { + err := Merge(&test.dst, test.src) + if err != nil { + t.Errorf("unexpected error: %v", err) + continue + } + if !reflect.DeepEqual(test.dst, test.expected) { + t.Errorf("unexpected output\nexpected:\n%+v\nsaw:\n%+v\n", test.expected, test.dst) + } + } +} + +func TestPointerStructNil(t *testing.T) { + a := pointerTest{nil} + b := pointerTest{&simpleTest{19}} + if err := Merge(&a, b); err != nil { + t.FailNow() + } + if a.C.Value != b.C.Value { + t.Fatalf("b not merged in a properly: a.C.Value(%d) != b.C.Value(%d)", a.C.Value, b.C.Value) + } +} + +func TestSliceStruct(t *testing.T) { + a := sliceTest{} + b := sliceTest{[]int{1, 2, 3}} + if err := Merge(&a, b); err != nil { + t.FailNow() + } + if len(b.S) != 3 { + t.FailNow() + } + if len(a.S) != len(b.S) { + t.Fatalf("b not merged in a proper way %d != %d", len(a.S), len(b.S)) + } + + a = sliceTest{[]int{1}} + b = sliceTest{[]int{1, 2, 3}} + if err := Merge(&a, b); err != nil { + t.FailNow() + } + if len(a.S) != 1 { + t.FailNow() + } + if len(a.S) == len(b.S) { + t.Fatalf("b merged unexpectedly %d != %d", len(a.S), len(b.S)) + } +} + +func TestMapsWithOverwrite(t *testing.T) { + m := map[string]simpleTest{ + "a": {}, // overwritten by 16 + "b": {42}, // not overwritten by empty value + "c": {13}, // overwritten by 12 + "d": {61}, + } + n := map[string]simpleTest{ + "a": {16}, + "b": {}, + "c": {12}, + "e": {14}, + } + expect := map[string]simpleTest{ + "a": {16}, + "b": {}, + "c": {12}, + "d": {61}, + "e": {14}, + } + + if err := MergeWithOverwrite(&m, n); err != nil { + t.Fatalf(err.Error()) + } + + if !reflect.DeepEqual(m, expect) { + t.Fatalf("Test failed:\ngot :\n%#v\n\nwant :\n%#v\n\n", m, expect) + } +} + +func TestMaps(t *testing.T) { + m := map[string]simpleTest{ + "a": {}, + "b": {42}, + "c": {13}, + "d": {61}, + } + n := map[string]simpleTest{ + "a": {16}, + "b": {}, + "c": {12}, + "e": {14}, + } + expect := map[string]simpleTest{ + "a": {0}, + "b": {42}, + "c": {13}, + "d": {61}, + "e": {14}, + } + + if err := Merge(&m, n); err != nil { + t.Fatalf(err.Error()) + } + + if !reflect.DeepEqual(m, expect) { + t.Fatalf("Test failed:\ngot :\n%#v\n\nwant :\n%#v\n\n", m, expect) + } + if m["a"].Value != 0 { + t.Fatalf(`n merged in m because I solved non-addressable map values TODO: m["a"].Value(%d) != n["a"].Value(%d)`, m["a"].Value, n["a"].Value) + } + if m["b"].Value != 42 { + t.Fatalf(`n wrongly merged in m: m["b"].Value(%d) != n["b"].Value(%d)`, m["b"].Value, n["b"].Value) + } + if m["c"].Value != 13 { + t.Fatalf(`n overwritten in m: m["c"].Value(%d) != n["c"].Value(%d)`, m["c"].Value, n["c"].Value) + } +} + +func TestYAMLMaps(t *testing.T) { + thing := loadYAML("testdata/thing.yml") + license := loadYAML("testdata/license.yml") + ft := thing["fields"].(map[interface{}]interface{}) + fl := license["fields"].(map[interface{}]interface{}) + expectedLength := len(ft) + len(fl) + if err := Merge(&license, thing); err != nil { + t.Fatal(err.Error()) + } + currentLength := len(license["fields"].(map[interface{}]interface{})) + if currentLength != expectedLength { + t.Fatalf(`thing not merged in license properly, license must have %d elements instead of %d`, expectedLength, currentLength) + } + fields := license["fields"].(map[interface{}]interface{}) + if _, ok := fields["id"]; !ok { + t.Fatalf(`thing not merged in license properly, license must have a new id field from thing`) + } +} + +func TestTwoPointerValues(t *testing.T) { + a := &simpleTest{} + b := &simpleTest{42} + if err := Merge(a, b); err != nil { + t.Fatalf(`Boom. You crossed the streams: %s`, err) + } +} + +func TestMap(t *testing.T) { + a := complexTest{} + a.ID = "athing" + c := moreComplextText{a, simpleTest{}, simpleTest{}} + b := map[string]interface{}{ + "ct": map[string]interface{}{ + "st": map[string]interface{}{ + "value": 42, + }, + "sz": 1, + "id": "bthing", + }, + "st": &simpleTest{144}, // Mapping a reference + "zt": simpleTest{299}, // Mapping a missing field (zt doesn't exist) + "nt": simpleTest{3}, + } + if err := Map(&c, b); err != nil { + t.FailNow() + } + m := b["ct"].(map[string]interface{}) + n := m["st"].(map[string]interface{}) + o := b["st"].(*simpleTest) + p := b["nt"].(simpleTest) + if c.Ct.St.Value != 42 { + t.Fatalf("b not merged in properly: c.Ct.St.Value(%d) != b.Ct.St.Value(%d)", c.Ct.St.Value, n["value"]) + } + if c.St.Value != 144 { + t.Fatalf("b not merged in properly: c.St.Value(%d) != b.St.Value(%d)", c.St.Value, o.Value) + } + if c.Nt.Value != 3 { + t.Fatalf("b not merged in properly: c.Nt.Value(%d) != b.Nt.Value(%d)", c.St.Value, p.Value) + } + if c.Ct.sz == 1 { + t.Fatalf("a's private field sz not preserved from merge: c.Ct.sz(%d) == b.Ct.sz(%d)", c.Ct.sz, m["sz"]) + } + if c.Ct.ID == m["id"] { + t.Fatalf("a's field ID merged unexpectedly: c.Ct.ID(%s) == b.Ct.ID(%s)", c.Ct.ID, m["id"]) + } +} + +func TestSimpleMap(t *testing.T) { + a := simpleTest{} + b := map[string]interface{}{ + "value": 42, + } + if err := Map(&a, b); err != nil { + t.FailNow() + } + if a.Value != 42 { + t.Fatalf("b not merged in properly: a.Value(%d) != b.Value(%v)", a.Value, b["value"]) + } +} + +type pointerMapTest struct { + A int + hidden int + B *simpleTest +} + +func TestBackAndForth(t *testing.T) { + pt := pointerMapTest{42, 1, &simpleTest{66}} + m := make(map[string]interface{}) + if err := Map(&m, pt); err != nil { + t.FailNow() + } + var ( + v interface{} + ok bool + ) + if v, ok = m["a"]; v.(int) != pt.A || !ok { + t.Fatalf("pt not merged in properly: m[`a`](%d) != pt.A(%d)", v, pt.A) + } + if v, ok = m["b"]; !ok { + t.Fatalf("pt not merged in properly: B is missing in m") + } + var st *simpleTest + if st = v.(*simpleTest); st.Value != 66 { + t.Fatalf("something went wrong while mapping pt on m, B wasn't copied") + } + bpt := pointerMapTest{} + if err := Map(&bpt, m); err != nil { + t.Fatal(err) + } + if bpt.A != pt.A { + t.Fatalf("pt not merged in properly: bpt.A(%d) != pt.A(%d)", bpt.A, pt.A) + } + if bpt.hidden == pt.hidden { + t.Fatalf("pt unexpectedly merged: bpt.hidden(%d) == pt.hidden(%d)", bpt.hidden, pt.hidden) + } + if bpt.B.Value != pt.B.Value { + t.Fatalf("pt not merged in properly: bpt.B.Value(%d) != pt.B.Value(%d)", bpt.B.Value, pt.B.Value) + } +} + +type structWithTimePointer struct { + Birth *time.Time +} + +func TestTime(t *testing.T) { + now := time.Now() + dataStruct := structWithTimePointer{ + Birth: &now, + } + dataMap := map[string]interface{}{ + "Birth": &now, + } + b := structWithTimePointer{} + if err := Merge(&b, dataStruct); err != nil { + t.FailNow() + } + if b.Birth.IsZero() { + t.Fatalf("time.Time not merged in properly: b.Birth(%v) != dataStruct['Birth'](%v)", b.Birth, dataStruct.Birth) + } + if b.Birth != dataStruct.Birth { + t.Fatalf("time.Time not merged in properly: b.Birth(%v) != dataStruct['Birth'](%v)", b.Birth, dataStruct.Birth) + } + b = structWithTimePointer{} + if err := Map(&b, dataMap); err != nil { + t.FailNow() + } + if b.Birth.IsZero() { + t.Fatalf("time.Time not merged in properly: b.Birth(%v) != dataMap['Birth'](%v)", b.Birth, dataMap["Birth"]) + } +} + +type simpleNested struct { + A int +} + +type structWithNestedPtrValueMap struct { + NestedPtrValue map[string]*simpleNested +} + +func TestNestedPtrValueInMap(t *testing.T) { + src := &structWithNestedPtrValueMap{ + NestedPtrValue: map[string]*simpleNested{ + "x": { + A: 1, + }, + }, + } + dst := &structWithNestedPtrValueMap{ + NestedPtrValue: map[string]*simpleNested{ + "x": {}, + }, + } + if err := Map(dst, src); err != nil { + t.FailNow() + } + if dst.NestedPtrValue["x"].A == 0 { + t.Fatalf("Nested Ptr value not merged in properly: dst.NestedPtrValue[\"x\"].A(%v) != src.NestedPtrValue[\"x\"].A(%v)", dst.NestedPtrValue["x"].A, src.NestedPtrValue["x"].A) + } +} + +func loadYAML(path string) (m map[string]interface{}) { + m = make(map[string]interface{}) + raw, _ := ioutil.ReadFile(path) + _ = yaml.Unmarshal(raw, &m) + return +} + +type structWithMap struct { + m map[string]structWithUnexportedProperty +} + +type structWithUnexportedProperty struct { + s string +} + +func TestUnexportedProperty(t *testing.T) { + a := structWithMap{map[string]structWithUnexportedProperty{ + "key": structWithUnexportedProperty{"hello"}, + }} + b := structWithMap{map[string]structWithUnexportedProperty{ + "key": structWithUnexportedProperty{"hi"}, + }} + defer func() { + if r := recover(); r != nil { + t.Errorf("Should not have panicked") + } + }() + Merge(&a, b) +} diff --git a/vendor/github.com/json-iterator/go/.travis.yml b/vendor/github.com/json-iterator/go/.travis.yml index 945b9c594..449e67cd0 100644 --- a/vendor/github.com/json-iterator/go/.travis.yml +++ b/vendor/github.com/json-iterator/go/.travis.yml @@ -2,6 +2,7 @@ language: go go: - 1.8.x + - 1.x before_install: - go get -t -v ./... diff --git a/vendor/github.com/json-iterator/go/README.md b/vendor/github.com/json-iterator/go/README.md index 23a4b57c8..bff7544ce 100644 --- a/vendor/github.com/json-iterator/go/README.md +++ b/vendor/github.com/json-iterator/go/README.md @@ -76,5 +76,7 @@ Contributors * [thockin](https://github.com/thockin) * [mattn](https://github.com/mattn) * [cch123](https://github.com/cch123) +* [Oleg Shaldybin](https://github.com/olegshaldybin) +* [Jason Toffaletti](https://github.com/toffaletti) Report issue or pull request, or email taowen@gmail.com, or [![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/json-iterator/Lobby) diff --git a/vendor/github.com/json-iterator/go/example_test.go b/vendor/github.com/json-iterator/go/example_test.go new file mode 100644 index 000000000..1c8f341c1 --- /dev/null +++ b/vendor/github.com/json-iterator/go/example_test.go @@ -0,0 +1,95 @@ +package jsoniter + +import ( + "fmt" + "os" +) + +func ExampleMarshal() { + type ColorGroup struct { + ID int + Name string + Colors []string + } + group := ColorGroup{ + ID: 1, + Name: "Reds", + Colors: []string{"Crimson", "Red", "Ruby", "Maroon"}, + } + b, err := Marshal(group) + if err != nil { + fmt.Println("error:", err) + } + os.Stdout.Write(b) + // Output: + // {"ID":1,"Name":"Reds","Colors":["Crimson","Red","Ruby","Maroon"]} +} + +func ExampleUnmarshal() { + var jsonBlob = []byte(`[ + {"Name": "Platypus", "Order": "Monotremata"}, + {"Name": "Quoll", "Order": "Dasyuromorphia"} + ]`) + type Animal struct { + Name string + Order string + } + var animals []Animal + err := Unmarshal(jsonBlob, &animals) + if err != nil { + fmt.Println("error:", err) + } + fmt.Printf("%+v", animals) + // Output: + // [{Name:Platypus Order:Monotremata} {Name:Quoll Order:Dasyuromorphia}] +} + +func ExampleConfigFastest_Marshal() { + type ColorGroup struct { + ID int + Name string + Colors []string + } + group := ColorGroup{ + ID: 1, + Name: "Reds", + Colors: []string{"Crimson", "Red", "Ruby", "Maroon"}, + } + stream := ConfigFastest.BorrowStream(nil) + defer ConfigFastest.ReturnStream(stream) + stream.WriteVal(group) + if stream.Error != nil { + fmt.Println("error:", stream.Error) + } + os.Stdout.Write(stream.Buffer()) + // Output: + // {"ID":1,"Name":"Reds","Colors":["Crimson","Red","Ruby","Maroon"]} +} + +func ExampleConfigFastest_Unmarshal() { + var jsonBlob = []byte(`[ + {"Name": "Platypus", "Order": "Monotremata"}, + {"Name": "Quoll", "Order": "Dasyuromorphia"} + ]`) + type Animal struct { + Name string + Order string + } + var animals []Animal + iter := ConfigFastest.BorrowIterator(jsonBlob) + defer ConfigFastest.ReturnIterator(iter) + iter.ReadVal(&animals) + if iter.Error != nil { + fmt.Println("error:", iter.Error) + } + fmt.Printf("%+v", animals) + // Output: + // [{Name:Platypus Order:Monotremata} {Name:Quoll Order:Dasyuromorphia}] +} + +func ExampleGet() { + val := []byte(`{"ID":1,"Name":"Reds","Colors":["Crimson","Red","Ruby","Maroon"]}`) + fmt.Printf(Get(val, "Colors", 0).ToString()) + // Output: + // Crimson +} diff --git a/vendor/github.com/json-iterator/go/feature_config.go b/vendor/github.com/json-iterator/go/feature_config.go index fc055d504..3201bcdcd 100644 --- a/vendor/github.com/json-iterator/go/feature_config.go +++ b/vendor/github.com/json-iterator/go/feature_config.go @@ -18,6 +18,7 @@ type Config struct { SortMapKeys bool UseNumber bool TagKey string + ValidateJsonRawMessage bool } type frozenConfig struct { @@ -53,8 +54,9 @@ var ConfigDefault = Config{ // ConfigCompatibleWithStandardLibrary tries to be 100% compatible with standard library behavior var ConfigCompatibleWithStandardLibrary = Config{ - EscapeHTML: true, - SortMapKeys: true, + EscapeHTML: true, + SortMapKeys: true, + ValidateJsonRawMessage: true, }.Froze() // ConfigFastest marshals float with only 6 digits precision @@ -83,10 +85,31 @@ func (cfg Config) Froze() API { if cfg.UseNumber { frozenConfig.useNumber() } + if cfg.ValidateJsonRawMessage { + frozenConfig.validateJsonRawMessage() + } frozenConfig.configBeforeFrozen = cfg return frozenConfig } +func (cfg *frozenConfig) validateJsonRawMessage() { + encoder := &funcEncoder{func(ptr unsafe.Pointer, stream *Stream) { + rawMessage := *(*json.RawMessage)(ptr) + iter := cfg.BorrowIterator([]byte(rawMessage)) + iter.Read() + if iter.Error != nil { + stream.WriteRaw("null") + } else { + cfg.ReturnIterator(iter) + stream.WriteRaw(string(rawMessage)) + } + }, func(ptr unsafe.Pointer) bool { + return false + }} + cfg.addEncoderToCache(reflect.TypeOf((*json.RawMessage)(nil)).Elem(), encoder) + cfg.addEncoderToCache(reflect.TypeOf((*RawMessage)(nil)).Elem(), encoder) +} + func (cfg *frozenConfig) useNumber() { cfg.addDecoderToCache(reflect.TypeOf((*interface{})(nil)).Elem(), &funcDecoder{func(ptr unsafe.Pointer, iter *Iterator) { if iter.WhatIsNext() == NumberValue { diff --git a/vendor/github.com/json-iterator/go/feature_iter_skip_strict.go b/vendor/github.com/json-iterator/go/feature_iter_skip_strict.go index d26763825..cc1933de2 100644 --- a/vendor/github.com/json-iterator/go/feature_iter_skip_strict.go +++ b/vendor/github.com/json-iterator/go/feature_iter_skip_strict.go @@ -64,7 +64,7 @@ func (iter *Iterator) trySkipString() bool { } else if c == '\\' { return false } else if c < ' ' { - iter.ReportError("ReadString", + iter.ReportError("trySkipString", fmt.Sprintf(`invalid control character found: %d`, c)) return true // already failed } diff --git a/vendor/github.com/json-iterator/go/feature_iter_string.go b/vendor/github.com/json-iterator/go/feature_iter_string.go index b76460046..59174ea4b 100644 --- a/vendor/github.com/json-iterator/go/feature_iter_string.go +++ b/vendor/github.com/json-iterator/go/feature_iter_string.go @@ -47,7 +47,7 @@ func (iter *Iterator) readStringSlowPath() (ret string) { str = append(str, c) } } - iter.ReportError("ReadString", "unexpected end of input") + iter.ReportError("readStringSlowPath", "unexpected end of input") return } @@ -104,7 +104,7 @@ func (iter *Iterator) readEscapedChar(c byte, str []byte) []byte { case 't': str = append(str, '\t') default: - iter.ReportError("ReadString", + iter.ReportError("readEscapedChar", `invalid escape char after \`) return nil } @@ -139,7 +139,7 @@ func (iter *Iterator) ReadStringAsSlice() (ret []byte) { } return copied } - iter.ReportError("ReadString", `expects " or n`) + iter.ReportError("ReadStringAsSlice", `expects " or n`) return } diff --git a/vendor/github.com/json-iterator/go/feature_reflect.go b/vendor/github.com/json-iterator/go/feature_reflect.go index 05d91b49c..4483e34b8 100644 --- a/vendor/github.com/json-iterator/go/feature_reflect.go +++ b/vendor/github.com/json-iterator/go/feature_reflect.go @@ -154,11 +154,11 @@ func (encoder *placeholderEncoder) IsEmpty(ptr unsafe.Pointer) bool { } func (encoder *placeholderEncoder) getRealEncoder() ValEncoder { - for i := 0; i < 30; i++ { + for i := 0; i < 500; i++ { realDecoder := encoder.cfg.getEncoderFromCache(encoder.cacheKey) _, isPlaceholder := realDecoder.(*placeholderEncoder) if isPlaceholder { - time.Sleep(time.Second) + time.Sleep(10 * time.Millisecond) } else { return realDecoder } @@ -172,11 +172,11 @@ type placeholderDecoder struct { } func (decoder *placeholderDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { - for i := 0; i < 30; i++ { + for i := 0; i < 500; i++ { realDecoder := decoder.cfg.getDecoderFromCache(decoder.cacheKey) _, isPlaceholder := realDecoder.(*placeholderDecoder) if isPlaceholder { - time.Sleep(time.Second) + time.Sleep(10 * time.Millisecond) } else { realDecoder.Decode(ptr, iter) return @@ -466,6 +466,18 @@ func createEncoderOfType(cfg *frozenConfig, typ reflect.Type) (ValEncoder, error } return encoder, nil } + if reflect.PtrTo(typ).Implements(marshalerType) { + checkIsEmpty, err := createCheckIsEmpty(reflect.PtrTo(typ)) + if err != nil { + return nil, err + } + templateInterface := reflect.New(typ).Interface() + var encoder ValEncoder = &marshalerEncoder{ + templateInterface: extractInterface(templateInterface), + checkIsEmpty: checkIsEmpty, + } + return encoder, nil + } if typ.Implements(textMarshalerType) { checkIsEmpty, err := createCheckIsEmpty(typ) if err != nil { diff --git a/vendor/github.com/json-iterator/go/feature_reflect_native.go b/vendor/github.com/json-iterator/go/feature_reflect_native.go index b37dab3d8..332b9e013 100644 --- a/vendor/github.com/json-iterator/go/feature_reflect_native.go +++ b/vendor/github.com/json-iterator/go/feature_reflect_native.go @@ -4,6 +4,7 @@ import ( "encoding" "encoding/base64" "encoding/json" + "reflect" "unsafe" ) @@ -31,7 +32,9 @@ type intCodec struct { } func (codec *intCodec) Decode(ptr unsafe.Pointer, iter *Iterator) { - *((*int)(ptr)) = iter.ReadInt() + if !iter.ReadNil() { + *((*int)(ptr)) = iter.ReadInt() + } } func (codec *intCodec) Encode(ptr unsafe.Pointer, stream *Stream) { @@ -50,7 +53,9 @@ type uintptrCodec struct { } func (codec *uintptrCodec) Decode(ptr unsafe.Pointer, iter *Iterator) { - *((*uintptr)(ptr)) = uintptr(iter.ReadUint64()) + if !iter.ReadNil() { + *((*uintptr)(ptr)) = uintptr(iter.ReadUint64()) + } } func (codec *uintptrCodec) Encode(ptr unsafe.Pointer, stream *Stream) { @@ -69,7 +74,9 @@ type int8Codec struct { } func (codec *int8Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { - *((*int8)(ptr)) = iter.ReadInt8() + if !iter.ReadNil() { + *((*int8)(ptr)) = iter.ReadInt8() + } } func (codec *int8Codec) Encode(ptr unsafe.Pointer, stream *Stream) { @@ -88,7 +95,9 @@ type int16Codec struct { } func (codec *int16Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { - *((*int16)(ptr)) = iter.ReadInt16() + if !iter.ReadNil() { + *((*int16)(ptr)) = iter.ReadInt16() + } } func (codec *int16Codec) Encode(ptr unsafe.Pointer, stream *Stream) { @@ -107,7 +116,9 @@ type int32Codec struct { } func (codec *int32Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { - *((*int32)(ptr)) = iter.ReadInt32() + if !iter.ReadNil() { + *((*int32)(ptr)) = iter.ReadInt32() + } } func (codec *int32Codec) Encode(ptr unsafe.Pointer, stream *Stream) { @@ -126,7 +137,9 @@ type int64Codec struct { } func (codec *int64Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { - *((*int64)(ptr)) = iter.ReadInt64() + if !iter.ReadNil() { + *((*int64)(ptr)) = iter.ReadInt64() + } } func (codec *int64Codec) Encode(ptr unsafe.Pointer, stream *Stream) { @@ -145,7 +158,10 @@ type uintCodec struct { } func (codec *uintCodec) Decode(ptr unsafe.Pointer, iter *Iterator) { - *((*uint)(ptr)) = iter.ReadUint() + if !iter.ReadNil() { + *((*uint)(ptr)) = iter.ReadUint() + return + } } func (codec *uintCodec) Encode(ptr unsafe.Pointer, stream *Stream) { @@ -164,7 +180,9 @@ type uint8Codec struct { } func (codec *uint8Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { - *((*uint8)(ptr)) = iter.ReadUint8() + if !iter.ReadNil() { + *((*uint8)(ptr)) = iter.ReadUint8() + } } func (codec *uint8Codec) Encode(ptr unsafe.Pointer, stream *Stream) { @@ -183,7 +201,9 @@ type uint16Codec struct { } func (codec *uint16Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { - *((*uint16)(ptr)) = iter.ReadUint16() + if !iter.ReadNil() { + *((*uint16)(ptr)) = iter.ReadUint16() + } } func (codec *uint16Codec) Encode(ptr unsafe.Pointer, stream *Stream) { @@ -202,7 +222,9 @@ type uint32Codec struct { } func (codec *uint32Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { - *((*uint32)(ptr)) = iter.ReadUint32() + if !iter.ReadNil() { + *((*uint32)(ptr)) = iter.ReadUint32() + } } func (codec *uint32Codec) Encode(ptr unsafe.Pointer, stream *Stream) { @@ -221,7 +243,9 @@ type uint64Codec struct { } func (codec *uint64Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { - *((*uint64)(ptr)) = iter.ReadUint64() + if !iter.ReadNil() { + *((*uint64)(ptr)) = iter.ReadUint64() + } } func (codec *uint64Codec) Encode(ptr unsafe.Pointer, stream *Stream) { @@ -240,7 +264,9 @@ type float32Codec struct { } func (codec *float32Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { - *((*float32)(ptr)) = iter.ReadFloat32() + if !iter.ReadNil() { + *((*float32)(ptr)) = iter.ReadFloat32() + } } func (codec *float32Codec) Encode(ptr unsafe.Pointer, stream *Stream) { @@ -259,7 +285,9 @@ type float64Codec struct { } func (codec *float64Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { - *((*float64)(ptr)) = iter.ReadFloat64() + if !iter.ReadNil() { + *((*float64)(ptr)) = iter.ReadFloat64() + } } func (codec *float64Codec) Encode(ptr unsafe.Pointer, stream *Stream) { @@ -278,7 +306,9 @@ type boolCodec struct { } func (codec *boolCodec) Decode(ptr unsafe.Pointer, iter *Iterator) { - *((*bool)(ptr)) = iter.ReadBool() + if !iter.ReadNil() { + *((*bool)(ptr)) = iter.ReadBool() + } } func (codec *boolCodec) Encode(ptr unsafe.Pointer, stream *Stream) { @@ -297,7 +327,42 @@ type emptyInterfaceCodec struct { } func (codec *emptyInterfaceCodec) Decode(ptr unsafe.Pointer, iter *Iterator) { - *((*interface{})(ptr)) = iter.Read() + existing := *((*interface{})(ptr)) + + // Checking for both typed and untyped nil pointers. + if existing != nil && + reflect.TypeOf(existing).Kind() == reflect.Ptr && + !reflect.ValueOf(existing).IsNil() { + + var ptrToExisting interface{} + for { + elem := reflect.ValueOf(existing).Elem() + if elem.Kind() != reflect.Ptr || elem.IsNil() { + break + } + ptrToExisting = existing + existing = elem.Interface() + } + + if iter.ReadNil() { + if ptrToExisting != nil { + nilPtr := reflect.Zero(reflect.TypeOf(ptrToExisting).Elem()) + reflect.ValueOf(ptrToExisting).Elem().Set(nilPtr) + } else { + *((*interface{})(ptr)) = nil + } + } else { + iter.ReadVal(existing) + } + + return + } + + if iter.ReadNil() { + *((*interface{})(ptr)) = nil + } else { + *((*interface{})(ptr)) = iter.Read() + } } func (codec *emptyInterfaceCodec) Encode(ptr unsafe.Pointer, stream *Stream) { @@ -309,7 +374,8 @@ func (codec *emptyInterfaceCodec) EncodeInterface(val interface{}, stream *Strea } func (codec *emptyInterfaceCodec) IsEmpty(ptr unsafe.Pointer) bool { - return ptr == nil + emptyInterface := (*emptyInterface)(ptr) + return emptyInterface.typ == nil } type nonEmptyInterfaceCodec struct { @@ -326,15 +392,20 @@ func (codec *nonEmptyInterfaceCodec) Decode(ptr unsafe.Pointer, iter *Iterator) e.typ = nonEmptyInterface.itab.typ e.word = nonEmptyInterface.word iter.ReadVal(&i) + if e.word == nil { + nonEmptyInterface.itab = nil + } nonEmptyInterface.word = e.word } func (codec *nonEmptyInterfaceCodec) Encode(ptr unsafe.Pointer, stream *Stream) { nonEmptyInterface := (*nonEmptyInterface)(ptr) var i interface{} - e := (*emptyInterface)(unsafe.Pointer(&i)) - e.typ = nonEmptyInterface.itab.typ - e.word = nonEmptyInterface.word + if nonEmptyInterface.itab != nil { + e := (*emptyInterface)(unsafe.Pointer(&i)) + e.typ = nonEmptyInterface.itab.typ + e.word = nonEmptyInterface.word + } stream.WriteVal(i) } @@ -595,7 +666,12 @@ func (encoder *marshalerEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { templateInterface := encoder.templateInterface templateInterface.word = ptr realInterface := (*interface{})(unsafe.Pointer(&templateInterface)) - marshaler := (*realInterface).(json.Marshaler) + marshaler, ok := (*realInterface).(json.Marshaler) + if !ok { + stream.WriteVal(nil) + return + } + bytes, err := marshaler.MarshalJSON() if err != nil { stream.Error = err diff --git a/vendor/github.com/json-iterator/go/jsoniter_1dot8_only_test.go b/vendor/github.com/json-iterator/go/jsoniter_1dot8_only_test.go new file mode 100644 index 000000000..7a0886a2d --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_1dot8_only_test.go @@ -0,0 +1,45 @@ +// +build go1.8 + +package jsoniter + +import ( + "bytes" + "encoding/json" + "testing" + "unicode/utf8" + + "github.com/stretchr/testify/require" +) + +func Test_new_encoder(t *testing.T) { + should := require.New(t) + buf1 := &bytes.Buffer{} + encoder1 := json.NewEncoder(buf1) + encoder1.SetEscapeHTML(false) + encoder1.Encode([]int{1}) + should.Equal("[1]\n", buf1.String()) + buf2 := &bytes.Buffer{} + encoder2 := NewEncoder(buf2) + encoder2.SetEscapeHTML(false) + encoder2.Encode([]int{1}) + should.Equal("[1]", buf2.String()) +} + +func Test_string_encode_with_std_without_html_escape(t *testing.T) { + api := Config{EscapeHTML: false}.Froze() + should := require.New(t) + for i := 0; i < utf8.RuneSelf; i++ { + input := string([]byte{byte(i)}) + buf := &bytes.Buffer{} + encoder := json.NewEncoder(buf) + encoder.SetEscapeHTML(false) + err := encoder.Encode(input) + should.Nil(err) + stdOutput := buf.String() + stdOutput = stdOutput[:len(stdOutput)-1] + jsoniterOutputBytes, err := api.Marshal(input) + should.Nil(err) + jsoniterOutput := string(jsoniterOutputBytes) + should.Equal(stdOutput, jsoniterOutput) + } +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_adapter_test.go b/vendor/github.com/json-iterator/go/jsoniter_adapter_test.go new file mode 100644 index 000000000..30f03deb6 --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_adapter_test.go @@ -0,0 +1,84 @@ +package jsoniter + +import ( + "bytes" + "encoding/json" + "github.com/stretchr/testify/require" + "io/ioutil" + "testing" +) + +func Test_new_decoder(t *testing.T) { + should := require.New(t) + decoder1 := json.NewDecoder(bytes.NewBufferString(`[1][2]`)) + decoder2 := NewDecoder(bytes.NewBufferString(`[1][2]`)) + arr1 := []int{} + should.Nil(decoder1.Decode(&arr1)) + should.Equal([]int{1}, arr1) + arr2 := []int{} + should.True(decoder1.More()) + buffered, _ := ioutil.ReadAll(decoder1.Buffered()) + should.Equal("[2]", string(buffered)) + should.Nil(decoder2.Decode(&arr2)) + should.Equal([]int{1}, arr2) + should.True(decoder2.More()) + buffered, _ = ioutil.ReadAll(decoder2.Buffered()) + should.Equal("[2]", string(buffered)) + + should.Nil(decoder1.Decode(&arr1)) + should.Equal([]int{2}, arr1) + should.False(decoder1.More()) + should.Nil(decoder2.Decode(&arr2)) + should.Equal([]int{2}, arr2) + should.False(decoder2.More()) +} + +func Test_use_number(t *testing.T) { + should := require.New(t) + decoder1 := json.NewDecoder(bytes.NewBufferString(`123`)) + decoder1.UseNumber() + decoder2 := NewDecoder(bytes.NewBufferString(`123`)) + decoder2.UseNumber() + var obj1 interface{} + should.Nil(decoder1.Decode(&obj1)) + should.Equal(json.Number("123"), obj1) + var obj2 interface{} + should.Nil(decoder2.Decode(&obj2)) + should.Equal(json.Number("123"), obj2) +} + +func Test_use_number_for_unmarshal(t *testing.T) { + should := require.New(t) + api := Config{UseNumber: true}.Froze() + var obj interface{} + should.Nil(api.UnmarshalFromString("123", &obj)) + should.Equal(json.Number("123"), obj) +} + +func Test_marshal_indent(t *testing.T) { + should := require.New(t) + obj := struct { + F1 int + F2 []int + }{1, []int{2, 3, 4}} + output, err := json.MarshalIndent(obj, "", " ") + should.Nil(err) + should.Equal("{\n \"F1\": 1,\n \"F2\": [\n 2,\n 3,\n 4\n ]\n}", string(output)) + output, err = MarshalIndent(obj, "", " ") + should.Nil(err) + should.Equal("{\n \"F1\": 1,\n \"F2\": [\n 2,\n 3,\n 4\n ]\n}", string(output)) +} + +func Test_marshal_indent_map(t *testing.T) { + should := require.New(t) + obj := map[int]int{1: 2} + output, err := json.MarshalIndent(obj, "", " ") + should.Nil(err) + should.Equal("{\n \"1\": 2\n}", string(output)) + output, err = MarshalIndent(obj, "", " ") + should.Nil(err) + should.Equal("{\n \"1\": 2\n}", string(output)) + output, err = ConfigCompatibleWithStandardLibrary.MarshalIndent(obj, "", " ") + should.Nil(err) + should.Equal("{\n \"1\": 2\n}", string(output)) +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_alias_test.go b/vendor/github.com/json-iterator/go/jsoniter_alias_test.go new file mode 100644 index 000000000..246651f75 --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_alias_test.go @@ -0,0 +1,62 @@ +package jsoniter + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func Test_alias(t *testing.T) { + should := require.New(t) + type myint int + type myint8 int8 + type myint16 int16 + type myint32 int32 + type myint64 int64 + type myuint uint + type myuint8 uint8 + type myuint16 uint16 + type myuint32 uint32 + type myuint64 uint64 + type myfloat32 float32 + type myfloat64 float64 + type mystring string + type mybool bool + type myuintptr uintptr + var a struct { + A myint8 `json:"a"` + B myint16 `json:"stream"` + C myint32 `json:"c"` + D myint64 `json:"d"` + E myuint8 `json:"e"` + F myuint16 `json:"f"` + G myuint32 `json:"g"` + H myuint64 `json:"h"` + I myfloat32 `json:"i"` + J myfloat64 `json:"j"` + K mystring `json:"k"` + L myint `json:"l"` + M myuint `json:"m"` + N mybool `json:"n"` + O myuintptr `json:"o"` + } + + should.Nil(UnmarshalFromString(`{"a" : 1, "stream" : 1, "c": 1, "d" : 1, "e" : 1, "f" : 1, "g" : 1, "h": 1, "i" : 1, "j" : 1, "k" :"xxxx", "l" : 1, "m":1, "n": true, "o" : 1}`, &a)) + should.Equal(myfloat32(1), a.I) + should.Equal(myfloat64(1), a.J) + should.Equal(myint8(1), a.A) + should.Equal(myint16(1), a.B) + should.Equal(myint32(1), a.C) + should.Equal(myint64(1), a.D) + should.Equal(myuint8(1), a.E) + should.Equal(myuint16(1), a.F) + should.Equal(myuint32(1), a.G) + should.Equal(myuint64(1), a.H) + should.Equal(mystring("xxxx"), a.K) + should.Equal(mybool(true), a.N) + should.Equal(myuintptr(1), a.O) + b, err := Marshal(a) + should.Nil(err) + should.Equal(`{"a":1,"stream":1,"c":1,"d":1,"e":1,"f":1,"g":1,"h":1,"i":1,"j":1,"k":"xxxx","l":1,"m":1,"n":true,"o":1}`, string(b)) + +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_any_array_test.go b/vendor/github.com/json-iterator/go/jsoniter_any_array_test.go new file mode 100644 index 000000000..dbffd822d --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_any_array_test.go @@ -0,0 +1,122 @@ +package jsoniter + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func Test_read_empty_array_as_any(t *testing.T) { + should := require.New(t) + any := Get([]byte("[]")) + should.Equal(ArrayValue, any.Get().ValueType()) + should.Equal(InvalidValue, any.Get(0.3).ValueType()) + should.Equal(0, any.Size()) + should.Equal(ArrayValue, any.ValueType()) + should.Nil(any.LastError()) + should.Equal(0, any.ToInt()) + should.Equal(int32(0), any.ToInt32()) + should.Equal(int64(0), any.ToInt64()) + should.Equal(uint(0), any.ToUint()) + should.Equal(uint32(0), any.ToUint32()) + should.Equal(uint64(0), any.ToUint64()) + should.Equal(float32(0), any.ToFloat32()) + should.Equal(float64(0), any.ToFloat64()) +} + +func Test_read_one_element_array_as_any(t *testing.T) { + should := require.New(t) + any := Get([]byte("[1]")) + should.Equal(1, any.Size()) +} + +func Test_read_two_element_array_as_any(t *testing.T) { + should := require.New(t) + any := Get([]byte("[1,2]")) + should.Equal(1, any.Get(0).ToInt()) + should.Equal(2, any.Size()) + should.True(any.ToBool()) + should.Equal(1, any.ToInt()) + should.Equal([]interface{}{float64(1), float64(2)}, any.GetInterface()) + stream := NewStream(ConfigDefault, nil, 32) + any.WriteTo(stream) + should.Equal("[1,2]", string(stream.Buffer())) + arr := []int{} + any.ToVal(&arr) + should.Equal([]int{1, 2}, arr) +} + +func Test_wrap_array_and_convert_to_any(t *testing.T) { + should := require.New(t) + any := Wrap([]int{1, 2, 3}) + any2 := Wrap([]int{}) + + should.Equal("[1,2,3]", any.ToString()) + should.True(any.ToBool()) + should.False(any2.ToBool()) + + should.Equal(1, any.ToInt()) + should.Equal(0, any2.ToInt()) + should.Equal(int32(1), any.ToInt32()) + should.Equal(int32(0), any2.ToInt32()) + should.Equal(int64(1), any.ToInt64()) + should.Equal(int64(0), any2.ToInt64()) + should.Equal(uint(1), any.ToUint()) + should.Equal(uint(0), any2.ToUint()) + should.Equal(uint32(1), any.ToUint32()) + should.Equal(uint32(0), any2.ToUint32()) + should.Equal(uint64(1), any.ToUint64()) + should.Equal(uint64(0), any2.ToUint64()) + should.Equal(float32(1), any.ToFloat32()) + should.Equal(float32(0), any2.ToFloat32()) + should.Equal(float64(1), any.ToFloat64()) + should.Equal(float64(0), any2.ToFloat64()) + should.Equal(3, any.Size()) + should.Equal(0, any2.Size()) + + var i interface{} = []int{1, 2, 3} + should.Equal(i, any.GetInterface()) +} + +func Test_array_lazy_any_get(t *testing.T) { + should := require.New(t) + any := Get([]byte("[1,[2,3],4]")) + should.Equal(3, any.Get(1, 1).ToInt()) + should.Equal("[1,[2,3],4]", any.ToString()) +} + +func Test_array_lazy_any_get_all(t *testing.T) { + should := require.New(t) + any := Get([]byte("[[1],[2],[3,4]]")) + should.Equal("[1,2,3]", any.Get('*', 0).ToString()) + any = Get([]byte("[[[1],[2],[3,4]]]"), 0, '*', 0) + should.Equal("[1,2,3]", any.ToString()) +} + +func Test_array_wrapper_any_get_all(t *testing.T) { + should := require.New(t) + any := wrapArray([][]int{ + {1, 2}, + {3, 4}, + {5, 6}, + }) + should.Equal("[1,3,5]", any.Get('*', 0).ToString()) + should.Equal(ArrayValue, any.ValueType()) + should.True(any.ToBool()) + should.Equal(1, any.Get(0, 0).ToInt()) +} + +func Test_array_lazy_any_get_invalid(t *testing.T) { + should := require.New(t) + any := Get([]byte("[]")) + should.Equal(InvalidValue, any.Get(1, 1).ValueType()) + should.NotNil(any.Get(1, 1).LastError()) + should.Equal(InvalidValue, any.Get("1").ValueType()) + should.NotNil(any.Get("1").LastError()) +} + +func Test_invalid_array(t *testing.T) { + should := require.New(t) + any := Get([]byte("["), 0) + should.Equal(InvalidValue, any.ValueType()) +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_any_bool_test.go b/vendor/github.com/json-iterator/go/jsoniter_any_bool_test.go new file mode 100644 index 000000000..a71743a64 --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_any_bool_test.go @@ -0,0 +1,64 @@ +package jsoniter + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/require" +) + +var boolConvertMap = map[string]bool{ + "null": false, + "true": true, + "false": false, + + `"true"`: true, + `"false"`: true, + + "123": true, + `"123"`: true, + "0": false, + `"0"`: false, + "-1": true, + `"-1"`: true, + + "1.1": true, + "0.0": false, + "-1.1": true, + `""`: false, + "[1,2]": true, + "[]": false, + "{}": true, + `{"abc":1}`: true, +} + +func Test_read_bool_as_any(t *testing.T) { + should := require.New(t) + + var any Any + for k, v := range boolConvertMap { + any = Get([]byte(k)) + if v { + should.True(any.ToBool(), fmt.Sprintf("origin val is %v", k)) + } else { + should.False(any.ToBool(), fmt.Sprintf("origin val is %v", k)) + } + } + +} + +func Test_write_bool_to_stream(t *testing.T) { + should := require.New(t) + any := Get([]byte("true")) + stream := NewStream(ConfigDefault, nil, 32) + any.WriteTo(stream) + should.Equal("true", string(stream.Buffer())) + should.Equal(any.ValueType(), BoolValue) + + any = Get([]byte("false")) + stream = NewStream(ConfigDefault, nil, 32) + any.WriteTo(stream) + should.Equal("false", string(stream.Buffer())) + + should.Equal(any.ValueType(), BoolValue) +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_any_float_test.go b/vendor/github.com/json-iterator/go/jsoniter_any_float_test.go new file mode 100644 index 000000000..391ac32a8 --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_any_float_test.go @@ -0,0 +1,102 @@ +package jsoniter + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +var floatConvertMap = map[string]float64{ + "null": 0, + "true": 1, + "false": 0, + + `"true"`: 0, + `"false"`: 0, + + "1e1": 10, + "1e+1": 10, + "1e-1": .1, + "1E1": 10, + "1E+1": 10, + "1E-1": .1, + + "-1e1": -10, + "-1e+1": -10, + "-1e-1": -.1, + "-1E1": -10, + "-1E+1": -10, + "-1E-1": -.1, + + `"1e1"`: 10, + `"1e+1"`: 10, + `"1e-1"`: .1, + `"1E1"`: 10, + `"1E+1"`: 10, + `"1E-1"`: .1, + + `"-1e1"`: -10, + `"-1e+1"`: -10, + `"-1e-1"`: -.1, + `"-1E1"`: -10, + `"-1E+1"`: -10, + `"-1E-1"`: -.1, + + "123": 123, + `"123true"`: 123, + `"+"`: 0, + `"-"`: 0, + + `"-123true"`: -123, + `"-99.9true"`: -99.9, + "0": 0, + `"0"`: 0, + "-1": -1, + + "1.1": 1.1, + "0.0": 0, + "-1.1": -1.1, + `"+1.1"`: 1.1, + `""`: 0, + "[1,2]": 1, + "[]": 0, + "{}": 0, + `{"abc":1}`: 0, +} + +func Test_read_any_to_float(t *testing.T) { + should := require.New(t) + for k, v := range floatConvertMap { + any := Get([]byte(k)) + should.Equal(float64(v), any.ToFloat64(), "the original val is "+k) + } + + for k, v := range floatConvertMap { + any := Get([]byte(k)) + should.Equal(float32(v), any.ToFloat32(), "the original val is "+k) + } +} + +func Test_read_float_to_any(t *testing.T) { + should := require.New(t) + any := WrapFloat64(12.3) + anyFloat64 := float64(12.3) + //negaAnyFloat64 := float64(-1.1) + any2 := WrapFloat64(-1.1) + should.Equal(float64(12.3), any.ToFloat64()) + //should.Equal("12.3", any.ToString()) + should.True(any.ToBool()) + should.Equal(float32(anyFloat64), any.ToFloat32()) + should.Equal(int(anyFloat64), any.ToInt()) + should.Equal(int32(anyFloat64), any.ToInt32()) + should.Equal(int64(anyFloat64), any.ToInt64()) + should.Equal(uint(anyFloat64), any.ToUint()) + should.Equal(uint32(anyFloat64), any.ToUint32()) + should.Equal(uint64(anyFloat64), any.ToUint64()) + should.Equal(uint(0), any2.ToUint()) + should.Equal(uint32(0), any2.ToUint32()) + should.Equal(uint64(0), any2.ToUint64()) + should.Equal(any.ValueType(), NumberValue) + + should.Equal("1.23E+01", any.ToString()) +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_any_int_test.go b/vendor/github.com/json-iterator/go/jsoniter_any_int_test.go new file mode 100644 index 000000000..232808528 --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_any_int_test.go @@ -0,0 +1,197 @@ +package jsoniter + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/require" +) + +var intConvertMap = map[string]int{ + "null": 0, + "321.1": 321, + "-321.1": -321, + `"1.1"`: 1, + `"-321.1"`: -321, + "0.0": 0, + "0": 0, + `"0"`: 0, + `"0.0"`: 0, + "-1.1": -1, + "true": 1, + "false": 0, + `"true"`: 0, + `"false"`: 0, + `"true123"`: 0, + `"123true"`: 123, + `"-123true"`: -123, + `"1.2332e6"`: 1, + `""`: 0, + "+": 0, + "-": 0, + "[]": 0, + "[1,2]": 1, + `["1","2"]`: 1, + // object in php cannot convert to int + "{}": 0, +} + +func Test_read_any_to_int(t *testing.T) { + should := require.New(t) + + // int + for k, v := range intConvertMap { + any := Get([]byte(k)) + should.Equal(v, any.ToInt(), fmt.Sprintf("origin val %v", k)) + } + + // int32 + for k, v := range intConvertMap { + any := Get([]byte(k)) + should.Equal(int32(v), any.ToInt32(), fmt.Sprintf("original val is %v", k)) + } + + // int64 + for k, v := range intConvertMap { + any := Get([]byte(k)) + should.Equal(int64(v), any.ToInt64(), fmt.Sprintf("original val is %v", k)) + } + +} + +var uintConvertMap = map[string]int{ + "null": 0, + "321.1": 321, + `"1.1"`: 1, + `"-123.1"`: 0, + "0.0": 0, + "0": 0, + `"0"`: 0, + `"0.0"`: 0, + `"00.0"`: 0, + "true": 1, + "false": 0, + `"true"`: 0, + `"false"`: 0, + `"true123"`: 0, + `"+1"`: 1, + `"123true"`: 123, + `"-123true"`: 0, + `"1.2332e6"`: 1, + `""`: 0, + "+": 0, + "-": 0, + ".": 0, + "[]": 0, + "[1,2]": 1, + "{}": 0, + "{1,2}": 0, + "-1.1": 0, + "-321.1": 0, +} + +func Test_read_any_to_uint(t *testing.T) { + should := require.New(t) + + for k, v := range uintConvertMap { + any := Get([]byte(k)) + should.Equal(uint64(v), any.ToUint64(), fmt.Sprintf("origin val %v", k)) + } + + for k, v := range uintConvertMap { + any := Get([]byte(k)) + should.Equal(uint32(v), any.ToUint32(), fmt.Sprintf("origin val %v", k)) + } + + for k, v := range uintConvertMap { + any := Get([]byte(k)) + should.Equal(uint(v), any.ToUint(), fmt.Sprintf("origin val %v", k)) + } + +} + +func Test_read_int64_to_any(t *testing.T) { + should := require.New(t) + any := WrapInt64(12345) + should.Equal(12345, any.ToInt()) + should.Equal(int32(12345), any.ToInt32()) + should.Equal(int64(12345), any.ToInt64()) + should.Equal(uint(12345), any.ToUint()) + should.Equal(uint32(12345), any.ToUint32()) + should.Equal(uint64(12345), any.ToUint64()) + should.Equal(float32(12345), any.ToFloat32()) + should.Equal(float64(12345), any.ToFloat64()) + should.Equal("12345", any.ToString()) + should.Equal(true, any.ToBool()) + should.Equal(any.ValueType(), NumberValue) + stream := NewStream(ConfigDefault, nil, 32) + any.WriteTo(stream) + should.Equal("12345", string(stream.Buffer())) +} +func Test_read_int32_to_any(t *testing.T) { + should := require.New(t) + any := WrapInt32(12345) + should.Equal(12345, any.ToInt()) + should.Equal(int32(12345), any.ToInt32()) + should.Equal(int64(12345), any.ToInt64()) + should.Equal(uint(12345), any.ToUint()) + should.Equal(uint32(12345), any.ToUint32()) + should.Equal(uint64(12345), any.ToUint64()) + should.Equal(float32(12345), any.ToFloat32()) + should.Equal(float64(12345), any.ToFloat64()) + should.Equal("12345", any.ToString()) + should.Equal(true, any.ToBool()) + should.Equal(any.ValueType(), NumberValue) + stream := NewStream(ConfigDefault, nil, 32) + any.WriteTo(stream) + should.Equal("12345", string(stream.Buffer())) +} + +func Test_read_uint32_to_any(t *testing.T) { + should := require.New(t) + any := WrapUint32(12345) + should.Equal(12345, any.ToInt()) + should.Equal(int32(12345), any.ToInt32()) + should.Equal(int64(12345), any.ToInt64()) + should.Equal(uint(12345), any.ToUint()) + should.Equal(uint32(12345), any.ToUint32()) + should.Equal(uint64(12345), any.ToUint64()) + should.Equal(float32(12345), any.ToFloat32()) + should.Equal(float64(12345), any.ToFloat64()) + should.Equal("12345", any.ToString()) + should.Equal(true, any.ToBool()) + should.Equal(any.ValueType(), NumberValue) + stream := NewStream(ConfigDefault, nil, 32) + any.WriteTo(stream) + should.Equal("12345", string(stream.Buffer())) +} + +func Test_read_uint64_to_any(t *testing.T) { + should := require.New(t) + any := WrapUint64(12345) + should.Equal(12345, any.ToInt()) + should.Equal(int32(12345), any.ToInt32()) + should.Equal(int64(12345), any.ToInt64()) + should.Equal(uint(12345), any.ToUint()) + should.Equal(uint32(12345), any.ToUint32()) + should.Equal(uint64(12345), any.ToUint64()) + should.Equal(float32(12345), any.ToFloat32()) + should.Equal(float64(12345), any.ToFloat64()) + should.Equal("12345", any.ToString()) + should.Equal(true, any.ToBool()) + should.Equal(any.ValueType(), NumberValue) + stream := NewStream(ConfigDefault, nil, 32) + any.WriteTo(stream) + should.Equal("12345", string(stream.Buffer())) + stream = NewStream(ConfigDefault, nil, 32) + stream.WriteUint(uint(123)) + should.Equal("123", string(stream.Buffer())) +} + +func Test_int_lazy_any_get(t *testing.T) { + should := require.New(t) + any := Get([]byte("1234")) + // panic!! + //should.Equal(any.LastError(), io.EOF) + should.Equal(InvalidValue, any.Get(1, "2").ValueType()) +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_any_map_test.go b/vendor/github.com/json-iterator/go/jsoniter_any_map_test.go new file mode 100644 index 000000000..f93ea4e61 --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_any_map_test.go @@ -0,0 +1,14 @@ +package jsoniter + +import ( + "github.com/stretchr/testify/require" + "testing" +) + +func Test_wrap_map(t *testing.T) { + should := require.New(t) + any := Wrap(map[string]string{"Field1": "hello"}) + should.Equal("hello", any.Get("Field1").ToString()) + any = Wrap(map[string]string{"Field1": "hello"}) + should.Equal(1, any.Size()) +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_any_null_test.go b/vendor/github.com/json-iterator/go/jsoniter_any_null_test.go new file mode 100644 index 000000000..eb09497b9 --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_any_null_test.go @@ -0,0 +1,15 @@ +package jsoniter + +import ( + "github.com/stretchr/testify/require" + "testing" +) + +func Test_read_null_as_any(t *testing.T) { + should := require.New(t) + any := Get([]byte(`null`)) + should.Equal(0, any.ToInt()) + should.Equal(float64(0), any.ToFloat64()) + should.Equal("", any.ToString()) + should.False(any.ToBool()) +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_any_object_test.go b/vendor/github.com/json-iterator/go/jsoniter_any_object_test.go new file mode 100644 index 000000000..9b215f95e --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_any_object_test.go @@ -0,0 +1,107 @@ +package jsoniter + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func Test_read_object_as_any(t *testing.T) { + should := require.New(t) + any := Get([]byte(`{"a":"stream","c":"d"}`)) + should.Equal(`{"a":"stream","c":"d"}`, any.ToString()) + // partial parse + should.Equal("stream", any.Get("a").ToString()) + should.Equal("d", any.Get("c").ToString()) + should.Equal(2, len(any.Keys())) + any = Get([]byte(`{"a":"stream","c":"d"}`)) + // full parse + should.Equal(2, len(any.Keys())) + should.Equal(2, any.Size()) + should.True(any.ToBool()) + should.Equal(0, any.ToInt()) + should.Equal(ObjectValue, any.ValueType()) + should.Nil(any.LastError()) + obj := struct { + A string + }{} + any.ToVal(&obj) + should.Equal("stream", obj.A) +} + +func Test_object_lazy_any_get(t *testing.T) { + should := require.New(t) + any := Get([]byte(`{"a":{"stream":{"c":"d"}}}`)) + should.Equal("d", any.Get("a", "stream", "c").ToString()) +} + +func Test_object_lazy_any_get_all(t *testing.T) { + should := require.New(t) + any := Get([]byte(`{"a":[0],"stream":[1]}`)) + should.Contains(any.Get('*', 0).ToString(), `"a":0`) +} + +func Test_object_lazy_any_get_invalid(t *testing.T) { + should := require.New(t) + any := Get([]byte(`{}`)) + should.Equal(InvalidValue, any.Get("a", "stream", "c").ValueType()) + should.Equal(InvalidValue, any.Get(1).ValueType()) +} + +func Test_wrap_map_and_convert_to_any(t *testing.T) { + should := require.New(t) + any := Wrap(map[string]interface{}{"a": 1}) + should.True(any.ToBool()) + should.Equal(0, any.ToInt()) + should.Equal(int32(0), any.ToInt32()) + should.Equal(int64(0), any.ToInt64()) + should.Equal(float32(0), any.ToFloat32()) + should.Equal(float64(0), any.ToFloat64()) + should.Equal(uint(0), any.ToUint()) + should.Equal(uint32(0), any.ToUint32()) + should.Equal(uint64(0), any.ToUint64()) +} + +func Test_wrap_object_and_convert_to_any(t *testing.T) { + should := require.New(t) + type TestObject struct { + Field1 string + field2 string + } + any := Wrap(TestObject{"hello", "world"}) + should.Equal("hello", any.Get("Field1").ToString()) + any = Wrap(TestObject{"hello", "world"}) + should.Equal(2, any.Size()) + should.Equal(`{"Field1":"hello"}`, any.Get('*').ToString()) + + should.Equal(0, any.ToInt()) + should.Equal(int32(0), any.ToInt32()) + should.Equal(int64(0), any.ToInt64()) + should.Equal(float32(0), any.ToFloat32()) + should.Equal(float64(0), any.ToFloat64()) + should.Equal(uint(0), any.ToUint()) + should.Equal(uint32(0), any.ToUint32()) + should.Equal(uint64(0), any.ToUint64()) + should.True(any.ToBool()) + should.Equal(`{"Field1":"hello"}`, any.ToString()) + + // cannot pass! + //stream := NewStream(ConfigDefault, nil, 32) + //any.WriteTo(stream) + //should.Equal(`{"Field1":"hello"}`, string(stream.Buffer())) + // cannot pass! + +} + +func Test_any_within_struct(t *testing.T) { + should := require.New(t) + type TestObject struct { + Field1 Any + Field2 Any + } + obj := TestObject{} + err := UnmarshalFromString(`{"Field1": "hello", "Field2": [1,2,3]}`, &obj) + should.Nil(err) + should.Equal("hello", obj.Field1.ToString()) + should.Equal("[1,2,3]", obj.Field2.ToString()) +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_any_string_test.go b/vendor/github.com/json-iterator/go/jsoniter_any_string_test.go new file mode 100644 index 000000000..119f7d27d --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_any_string_test.go @@ -0,0 +1,56 @@ +package jsoniter + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +var stringConvertMap = map[string]string{ + "null": "", + "321.1": "321.1", + `"1.1"`: "1.1", + `"-123.1"`: "-123.1", + "0.0": "0.0", + "0": "0", + `"0"`: "0", + `"0.0"`: "0.0", + `"00.0"`: "00.0", + "true": "true", + "false": "false", + `"true"`: "true", + `"false"`: "false", + `"true123"`: "true123", + `"+1"`: "+1", + "[]": "[]", + "[1,2]": "[1,2]", + "{}": "{}", + `{"a":1, "stream":true}`: `{"a":1, "stream":true}`, +} + +func Test_read_any_to_string(t *testing.T) { + should := require.New(t) + for k, v := range stringConvertMap { + any := Get([]byte(k)) + should.Equal(v, any.ToString(), "original val "+k) + } +} + +func Test_read_string_as_any(t *testing.T) { + should := require.New(t) + any := Get([]byte(`"hello"`)) + should.Equal("hello", any.ToString()) + should.True(any.ToBool()) + any = Get([]byte(`" "`)) + should.False(any.ToBool()) + any = Get([]byte(`"false"`)) + should.True(any.ToBool()) + any = Get([]byte(`"123"`)) + should.Equal(123, any.ToInt()) +} + +func Test_wrap_string(t *testing.T) { + should := require.New(t) + any := WrapString("123") + should.Equal(123, any.ToInt()) +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_array_test.go b/vendor/github.com/json-iterator/go/jsoniter_array_test.go new file mode 100644 index 000000000..0f71ecb68 --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_array_test.go @@ -0,0 +1,213 @@ +package jsoniter + +import ( + "bytes" + "encoding/json" + "github.com/stretchr/testify/require" + "testing" +) + +func Test_empty_array(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, `[]`) + cont := iter.ReadArray() + should.False(cont) + iter = ParseString(ConfigDefault, `[]`) + iter.ReadArrayCB(func(iter *Iterator) bool { + should.FailNow("should not call") + return true + }) +} + +func Test_one_element(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, `[1]`) + should.True(iter.ReadArray()) + should.Equal(1, iter.ReadInt()) + should.False(iter.ReadArray()) + iter = ParseString(ConfigDefault, `[1]`) + iter.ReadArrayCB(func(iter *Iterator) bool { + should.Equal(1, iter.ReadInt()) + return true + }) +} + +func Test_two_elements(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, `[1,2]`) + should.True(iter.ReadArray()) + should.Equal(int64(1), iter.ReadInt64()) + should.True(iter.ReadArray()) + should.Equal(int64(2), iter.ReadInt64()) + should.False(iter.ReadArray()) + iter = ParseString(ConfigDefault, `[1,2]`) + should.Equal([]interface{}{float64(1), float64(2)}, iter.Read()) +} + +func Test_whitespace_in_head(t *testing.T) { + iter := ParseString(ConfigDefault, ` [1]`) + cont := iter.ReadArray() + if cont != true { + t.FailNow() + } + if iter.ReadUint64() != 1 { + t.FailNow() + } +} + +func Test_whitespace_after_array_start(t *testing.T) { + iter := ParseString(ConfigDefault, `[ 1]`) + cont := iter.ReadArray() + if cont != true { + t.FailNow() + } + if iter.ReadUint64() != 1 { + t.FailNow() + } +} + +func Test_whitespace_before_array_end(t *testing.T) { + iter := ParseString(ConfigDefault, `[1 ]`) + cont := iter.ReadArray() + if cont != true { + t.FailNow() + } + if iter.ReadUint64() != 1 { + t.FailNow() + } + cont = iter.ReadArray() + if cont != false { + t.FailNow() + } +} + +func Test_whitespace_before_comma(t *testing.T) { + iter := ParseString(ConfigDefault, `[1 ,2]`) + cont := iter.ReadArray() + if cont != true { + t.FailNow() + } + if iter.ReadUint64() != 1 { + t.FailNow() + } + cont = iter.ReadArray() + if cont != true { + t.FailNow() + } + if iter.ReadUint64() != 2 { + t.FailNow() + } + cont = iter.ReadArray() + if cont != false { + t.FailNow() + } +} + +func Test_write_array(t *testing.T) { + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(Config{IndentionStep: 2}.Froze(), buf, 4096) + stream.WriteArrayStart() + stream.WriteInt(1) + stream.WriteMore() + stream.WriteInt(2) + stream.WriteArrayEnd() + stream.Flush() + should.Nil(stream.Error) + should.Equal("[\n 1,\n 2\n]", buf.String()) +} + +func Test_write_val_array(t *testing.T) { + should := require.New(t) + val := []int{1, 2, 3} + str, err := MarshalToString(&val) + should.Nil(err) + should.Equal("[1,2,3]", str) +} + +func Test_write_val_empty_array(t *testing.T) { + should := require.New(t) + val := []int{} + str, err := MarshalToString(val) + should.Nil(err) + should.Equal("[]", str) +} + +func Test_write_array_of_interface_in_struct(t *testing.T) { + should := require.New(t) + type TestObject struct { + Field []interface{} + Field2 string + } + val := TestObject{[]interface{}{1, 2}, ""} + str, err := MarshalToString(val) + should.Nil(err) + should.Contains(str, `"Field":[1,2]`) + should.Contains(str, `"Field2":""`) +} + +func Test_encode_byte_array(t *testing.T) { + should := require.New(t) + bytes, err := json.Marshal([]byte{1, 2, 3}) + should.Nil(err) + should.Equal(`"AQID"`, string(bytes)) + bytes, err = Marshal([]byte{1, 2, 3}) + should.Nil(err) + should.Equal(`"AQID"`, string(bytes)) +} + +func Test_decode_byte_array_from_base64(t *testing.T) { + should := require.New(t) + data := []byte{} + err := json.Unmarshal([]byte(`"AQID"`), &data) + should.Nil(err) + should.Equal([]byte{1, 2, 3}, data) + err = Unmarshal([]byte(`"AQID"`), &data) + should.Nil(err) + should.Equal([]byte{1, 2, 3}, data) +} + +func Test_decode_byte_array_from_array(t *testing.T) { + should := require.New(t) + data := []byte{} + err := json.Unmarshal([]byte(`[1,2,3]`), &data) + should.Nil(err) + should.Equal([]byte{1, 2, 3}, data) + err = Unmarshal([]byte(`[1,2,3]`), &data) + should.Nil(err) + should.Equal([]byte{1, 2, 3}, data) +} + +func Test_decode_slice(t *testing.T) { + should := require.New(t) + slice := make([]string, 0, 5) + UnmarshalFromString(`["hello", "world"]`, &slice) + should.Equal([]string{"hello", "world"}, slice) +} + +func Test_decode_large_slice(t *testing.T) { + should := require.New(t) + slice := make([]int, 0, 1) + UnmarshalFromString(`[1,2,3,4,5,6,7,8,9]`, &slice) + should.Equal([]int{1, 2, 3, 4, 5, 6, 7, 8, 9}, slice) +} + +func Benchmark_jsoniter_array(b *testing.B) { + b.ReportAllocs() + input := []byte(`[1,2,3,4,5,6,7,8,9]`) + iter := ParseBytes(ConfigDefault, input) + b.ResetTimer() + for n := 0; n < b.N; n++ { + iter.ResetBytes(input) + for iter.ReadArray() { + iter.ReadUint64() + } + } +} + +func Benchmark_json_array(b *testing.B) { + for n := 0; n < b.N; n++ { + result := []interface{}{} + json.Unmarshal([]byte(`[1,2,3]`), &result) + } +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_bool_test.go b/vendor/github.com/json-iterator/go/jsoniter_bool_test.go new file mode 100644 index 000000000..461b88ba3 --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_bool_test.go @@ -0,0 +1,113 @@ +package jsoniter + +import ( + "bytes" + "encoding/json" + "testing" + + "github.com/stretchr/testify/require" +) + +func Test_true(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, `true`) + should.True(iter.ReadBool()) + iter = ParseString(ConfigDefault, `true`) + should.Equal(true, iter.Read()) +} + +func Test_false(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, `false`) + should.False(iter.ReadBool()) +} + +func Test_write_true_false(t *testing.T) { + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 4096) + stream.WriteTrue() + stream.WriteFalse() + stream.WriteBool(false) + stream.Flush() + should.Nil(stream.Error) + should.Equal("truefalsefalse", buf.String()) +} + +func Test_write_val_bool(t *testing.T) { + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 4096) + stream.WriteVal(true) + should.Equal(stream.Buffered(), 4) + stream.Flush() + should.Equal(stream.Buffered(), 0) + should.Nil(stream.Error) + should.Equal("true", buf.String()) +} + +func Test_encode_string_bool(t *testing.T) { + type TestObject struct { + Field bool `json:",omitempty,string"` + } + should := require.New(t) + output, err := json.Marshal(TestObject{true}) + should.Nil(err) + should.Equal(`{"Field":"true"}`, string(output)) + output, err = Marshal(TestObject{true}) + should.Nil(err) + should.Equal(`{"Field":"true"}`, string(output)) +} + +func Test_decode_string_bool(t *testing.T) { + type TestObject struct { + Field bool `json:",omitempty,string"` + } + should := require.New(t) + obj := TestObject{} + err := json.Unmarshal([]byte(`{"Field":"true"}`), &obj) + should.Nil(err) + should.True(obj.Field) + + obj = TestObject{} + err = json.Unmarshal([]byte(`{"Field":true}`), &obj) + should.NotNil(err) + + obj = TestObject{} + err = Unmarshal([]byte(`{"Field":"true"}`), &obj) + should.Nil(err) + should.True(obj.Field) + + obj = TestObject{} + err = Unmarshal([]byte(`{"Field":true}`), &obj) + should.NotNil(err) +} + +func Test_bool_can_be_null(t *testing.T) { + type TestData struct { + Field bool `json:"field"` + } + should := require.New(t) + + obj := TestData{} + data1 := []byte(`{"field": true}`) + err := Unmarshal(data1, &obj) + should.NoError(err) + should.Equal(true, obj.Field) + + data2 := []byte(`{"field": null}`) + err = Unmarshal(data2, &obj) + should.NoError(err) + // Same behavior as stdlib, not touching the existing value. + should.Equal(true, obj.Field) + + // Checking stdlib behavior as well + obj2 := TestData{} + err = json.Unmarshal(data1, &obj2) + should.NoError(err) + should.Equal(true, obj2.Field) + + err = json.Unmarshal(data2, &obj2) + should.NoError(err) + should.Equal(true, obj2.Field) +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_customize_test.go b/vendor/github.com/json-iterator/go/jsoniter_customize_test.go new file mode 100644 index 000000000..b4bf5294b --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_customize_test.go @@ -0,0 +1,340 @@ +package jsoniter + +import ( + "encoding/json" + "github.com/stretchr/testify/require" + "strconv" + "testing" + "time" + "unsafe" +) + +func Test_customize_type_decoder(t *testing.T) { + RegisterTypeDecoderFunc("time.Time", func(ptr unsafe.Pointer, iter *Iterator) { + t, err := time.ParseInLocation("2006-01-02 15:04:05", iter.ReadString(), time.UTC) + if err != nil { + iter.Error = err + return + } + *((*time.Time)(ptr)) = t + }) + defer ConfigDefault.(*frozenConfig).cleanDecoders() + val := time.Time{} + err := Unmarshal([]byte(`"2016-12-05 08:43:28"`), &val) + if err != nil { + t.Fatal(err) + } + year, month, day := val.Date() + if year != 2016 || month != 12 || day != 5 { + t.Fatal(val) + } +} + +func Test_customize_type_encoder(t *testing.T) { + should := require.New(t) + RegisterTypeEncoderFunc("time.Time", func(ptr unsafe.Pointer, stream *Stream) { + t := *((*time.Time)(ptr)) + stream.WriteString(t.UTC().Format("2006-01-02 15:04:05")) + }, nil) + defer ConfigDefault.(*frozenConfig).cleanEncoders() + val := time.Unix(0, 0) + str, err := MarshalToString(val) + should.Nil(err) + should.Equal(`"1970-01-01 00:00:00"`, str) +} + +func Test_customize_byte_array_encoder(t *testing.T) { + ConfigDefault.(*frozenConfig).cleanEncoders() + should := require.New(t) + RegisterTypeEncoderFunc("[]uint8", func(ptr unsafe.Pointer, stream *Stream) { + t := *((*[]byte)(ptr)) + stream.WriteString(string(t)) + }, nil) + defer ConfigDefault.(*frozenConfig).cleanEncoders() + val := []byte("abc") + str, err := MarshalToString(val) + should.Nil(err) + should.Equal(`"abc"`, str) +} + +func Test_customize_float_marshal(t *testing.T) { + should := require.New(t) + json := Config{MarshalFloatWith6Digits: true}.Froze() + str, err := json.MarshalToString(float32(1.23456789)) + should.Nil(err) + should.Equal("1.234568", str) +} + +type Tom struct { + field1 string +} + +func Test_customize_field_decoder(t *testing.T) { + RegisterFieldDecoderFunc("jsoniter.Tom", "field1", func(ptr unsafe.Pointer, iter *Iterator) { + *((*string)(ptr)) = strconv.Itoa(iter.ReadInt()) + }) + defer ConfigDefault.(*frozenConfig).cleanDecoders() + tom := Tom{} + err := Unmarshal([]byte(`{"field1": 100}`), &tom) + if err != nil { + t.Fatal(err) + } +} + +type TestObject1 struct { + field1 string +} + +type testExtension struct { + DummyExtension +} + +func (extension *testExtension) UpdateStructDescriptor(structDescriptor *StructDescriptor) { + if structDescriptor.Type.String() != "jsoniter.TestObject1" { + return + } + binding := structDescriptor.GetField("field1") + binding.Encoder = &funcEncoder{fun: func(ptr unsafe.Pointer, stream *Stream) { + str := *((*string)(ptr)) + val, _ := strconv.Atoi(str) + stream.WriteInt(val) + }} + binding.Decoder = &funcDecoder{func(ptr unsafe.Pointer, iter *Iterator) { + *((*string)(ptr)) = strconv.Itoa(iter.ReadInt()) + }} + binding.ToNames = []string{"field-1"} + binding.FromNames = []string{"field-1"} +} + +func Test_customize_field_by_extension(t *testing.T) { + should := require.New(t) + RegisterExtension(&testExtension{}) + obj := TestObject1{} + err := UnmarshalFromString(`{"field-1": 100}`, &obj) + should.Nil(err) + should.Equal("100", obj.field1) + str, err := MarshalToString(obj) + should.Nil(err) + should.Equal(`{"field-1":100}`, str) +} + +type timeImplementedMarshaler time.Time + +func (obj timeImplementedMarshaler) MarshalJSON() ([]byte, error) { + seconds := time.Time(obj).Unix() + return []byte(strconv.FormatInt(seconds, 10)), nil +} + +func Test_marshaler(t *testing.T) { + type TestObject struct { + Field timeImplementedMarshaler + } + should := require.New(t) + val := timeImplementedMarshaler(time.Unix(123, 0)) + obj := TestObject{val} + bytes, err := json.Marshal(obj) + should.Nil(err) + should.Equal(`{"Field":123}`, string(bytes)) + str, err := MarshalToString(obj) + should.Nil(err) + should.Equal(`{"Field":123}`, str) +} + +func Test_marshaler_and_encoder(t *testing.T) { + type TestObject struct { + Field *timeImplementedMarshaler + } + ConfigDefault.(*frozenConfig).cleanEncoders() + should := require.New(t) + RegisterTypeEncoderFunc("jsoniter.timeImplementedMarshaler", func(ptr unsafe.Pointer, stream *Stream) { + stream.WriteString("hello from encoder") + }, nil) + val := timeImplementedMarshaler(time.Unix(123, 0)) + obj := TestObject{&val} + bytes, err := json.Marshal(obj) + should.Nil(err) + should.Equal(`{"Field":123}`, string(bytes)) + str, err := MarshalToString(obj) + should.Nil(err) + should.Equal(`{"Field":"hello from encoder"}`, str) +} + +type ObjectImplementedUnmarshaler int + +func (obj *ObjectImplementedUnmarshaler) UnmarshalJSON(s []byte) error { + val, _ := strconv.ParseInt(string(s[1:len(s)-1]), 10, 64) + *obj = ObjectImplementedUnmarshaler(val) + return nil +} + +func Test_unmarshaler(t *testing.T) { + should := require.New(t) + var obj ObjectImplementedUnmarshaler + err := json.Unmarshal([]byte(` "100" `), &obj) + should.Nil(err) + should.Equal(100, int(obj)) + iter := ParseString(ConfigDefault, ` "100" `) + iter.ReadVal(&obj) + should.Nil(err) + should.Equal(100, int(obj)) +} + +func Test_unmarshaler_and_decoder(t *testing.T) { + type TestObject struct { + Field *ObjectImplementedUnmarshaler + Field2 string + } + ConfigDefault.(*frozenConfig).cleanDecoders() + should := require.New(t) + RegisterTypeDecoderFunc("jsoniter.ObjectImplementedUnmarshaler", func(ptr unsafe.Pointer, iter *Iterator) { + *(*ObjectImplementedUnmarshaler)(ptr) = 10 + iter.Skip() + }) + obj := TestObject{} + val := ObjectImplementedUnmarshaler(0) + obj.Field = &val + err := json.Unmarshal([]byte(`{"Field":"100"}`), &obj) + should.Nil(err) + should.Equal(100, int(*obj.Field)) + err = Unmarshal([]byte(`{"Field":"100"}`), &obj) + should.Nil(err) + should.Equal(10, int(*obj.Field)) +} + +type tmString string +type tmStruct struct { + String tmString +} + +func (s tmStruct) MarshalJSON() ([]byte, error) { + var b []byte + b = append(b, '"') + b = append(b, s.String...) + b = append(b, '"') + return b, nil +} + +func Test_marshaler_on_struct(t *testing.T) { + fixed := tmStruct{"hello"} + //json.Marshal(fixed) + Marshal(fixed) +} + +type withChan struct { + F2 chan []byte +} + +func (q withChan) MarshalJSON() ([]byte, error) { + return []byte(`""`), nil +} + +func (q *withChan) UnmarshalJSON(value []byte) error { + return nil +} + +func Test_marshal_json_with_chan(t *testing.T) { + type TestObject struct { + F1 withChan + } + should := require.New(t) + output, err := MarshalToString(TestObject{}) + should.Nil(err) + should.Equal(`{"F1":""}`, output) +} + +type withTime struct { + time.Time +} + +func (t *withTime) UnmarshalJSON(b []byte) error { + return nil +} +func (t withTime) MarshalJSON() ([]byte, error) { + return []byte(`"fake"`), nil +} + +func Test_marshal_json_with_time(t *testing.T) { + type S1 struct { + F1 withTime + F2 *withTime + } + type TestObject struct { + TF1 S1 + } + should := require.New(t) + obj := TestObject{ + S1{ + F1: withTime{ + time.Unix(0, 0), + }, + F2: &withTime{ + time.Unix(0, 0), + }, + }, + } + output, err := json.Marshal(obj) + should.Nil(err) + should.Equal(`{"TF1":{"F1":"fake","F2":"fake"}}`, string(output)) + output, err = Marshal(obj) + should.Nil(err) + should.Equal(`{"TF1":{"F1":"fake","F2":"fake"}}`, string(output)) + obj = TestObject{} + should.Nil(json.Unmarshal([]byte(`{"TF1":{"F1":"fake","F2":"fake"}}`), &obj)) + should.NotNil(obj.TF1.F2) + obj = TestObject{} + should.Nil(Unmarshal([]byte(`{"TF1":{"F1":"fake","F2":"fake"}}`), &obj)) + should.NotNil(obj.TF1.F2) +} + +func Test_customize_tag_key(t *testing.T) { + + type TestObject struct { + Field string `orm:"field"` + } + + should := require.New(t) + json := Config{TagKey: "orm"}.Froze() + str, err := json.MarshalToString(TestObject{"hello"}) + should.Nil(err) + should.Equal(`{"field":"hello"}`, str) +} + +func Test_recursive_empty_interface_customization(t *testing.T) { + t.Skip() + var obj interface{} + RegisterTypeDecoderFunc("interface {}", func(ptr unsafe.Pointer, iter *Iterator) { + switch iter.WhatIsNext() { + case NumberValue: + *(*interface{})(ptr) = iter.ReadInt64() + default: + *(*interface{})(ptr) = iter.Read() + } + }) + should := require.New(t) + Unmarshal([]byte("[100]"), &obj) + should.Equal([]interface{}{int64(100)}, obj) +} + +type GeoLocation struct { + Id string `json:"id,omitempty" db:"id"` +} + +func (p *GeoLocation) MarshalJSON() ([]byte, error) { + return []byte(`{}`), nil +} + +func (p *GeoLocation) UnmarshalJSON(input []byte) error { + p.Id = "hello" + return nil +} + +func Test_marshal_and_unmarshal_on_non_pointer(t *testing.T) { + should := require.New(t) + locations := []GeoLocation{{"000"}} + bytes, err := Marshal(locations) + should.Nil(err) + should.Equal("[{}]", string(bytes)) + err = Unmarshal([]byte("[1]"), &locations) + should.Nil(err) + should.Equal("hello", locations[0].Id) +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_demo_test.go b/vendor/github.com/json-iterator/go/jsoniter_demo_test.go new file mode 100644 index 000000000..85718d1b2 --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_demo_test.go @@ -0,0 +1,87 @@ +package jsoniter + +import ( + "encoding/json" + "testing" + + "github.com/stretchr/testify/require" +) + +func Test_bind_api_demo(t *testing.T) { + should := require.New(t) + val := []int{} + err := UnmarshalFromString(`[0,1,2,3] `, &val) + should.Nil(err) + should.Equal([]int{0, 1, 2, 3}, val) +} + +func Test_iterator_api_demo(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, `[0,1,2,3]`) + total := 0 + for iter.ReadArray() { + total += iter.ReadInt() + } + should.Equal(6, total) +} + +type People struct { + Name string + Gender string + Age int + Address string + Mobile string + Country string + Height int +} + +func jsoniterMarshal(p *People) error { + _, err := Marshal(p) + if nil != err { + return err + } + return nil +} +func stdMarshal(p *People) error { + _, err := json.Marshal(p) + if nil != err { + return err + } + return nil +} + +func BenchmarkJosniterMarshal(b *testing.B) { + var p People + p.Address = "上海市徐汇区漕宝路" + p.Age = 30 + p.Country = "中国" + p.Gender = "male" + p.Height = 170 + p.Mobile = "18502120533" + p.Name = "Elvin" + b.ReportAllocs() + for i := 0; i < b.N; i++ { + err := jsoniterMarshal(&p) + if nil != err { + b.Error(err) + } + } +} + +func BenchmarkStdMarshal(b *testing.B) { + var p People + p.Address = "上海市徐汇区漕宝路" + p.Age = 30 + p.Country = "中国" + p.Gender = "male" + p.Height = 170 + p.Mobile = "18502120533" + p.Name = "Elvin" + b.ReportAllocs() + for i := 0; i < b.N; i++ { + err := stdMarshal(&p) + if nil != err { + b.Error(err) + } + } +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_encode_interface_test.go b/vendor/github.com/json-iterator/go/jsoniter_encode_interface_test.go new file mode 100644 index 000000000..14b7add9a --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_encode_interface_test.go @@ -0,0 +1,42 @@ +package jsoniter + +import ( + "encoding/json" + "testing" + + "github.com/stretchr/testify/require" +) + +func Test_encode_interface(t *testing.T) { + should := require.New(t) + var a interface{} + a = int8(10) + str, err := MarshalToString(a) + should.Nil(err) + should.Equal(str, "10") + a = float32(3) + str, err = MarshalToString(a) + should.Nil(err) + should.Equal(str, "3") + a = map[string]interface{}{"abc": 1} + str, err = MarshalToString(a) + should.Nil(err) + should.Equal(str, `{"abc":1}`) + a = uintptr(1) + str, err = MarshalToString(a) + should.Nil(err) + should.Equal(str, "1") + a = uint(1) + str, err = MarshalToString(a) + should.Nil(err) + should.Equal(str, "1") + a = uint8(1) + str, err = MarshalToString(a) + should.Nil(err) + should.Equal(str, "1") + a = json.RawMessage("abc") + MarshalToString(a) + str, err = MarshalToString(a) + should.Nil(err) + should.Equal(str, "abc") +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_enum_marshaler_test.go b/vendor/github.com/json-iterator/go/jsoniter_enum_marshaler_test.go new file mode 100644 index 000000000..69e1e8cd3 --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_enum_marshaler_test.go @@ -0,0 +1,50 @@ +package jsoniter + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/require" +) + +type MyEnum int64 + +const ( + MyEnumA MyEnum = iota + MyEnumB +) + +func (m *MyEnum) MarshalJSON() ([]byte, error) { + return []byte(fmt.Sprintf(`"foo-%d"`, int(*m))), nil +} + +func (m *MyEnum) UnmarshalJSON(jb []byte) error { + switch string(jb) { + case `"foo-1"`: + *m = MyEnumB + default: + *m = MyEnumA + } + return nil +} + +func Test_custom_marshaler_on_enum(t *testing.T) { + type Wrapper struct { + Payload interface{} + } + type Wrapper2 struct { + Payload MyEnum + } + should := require.New(t) + + w := Wrapper{Payload: MyEnumB} + + jb, err := Marshal(w) + should.NoError(err) + should.Equal(`{"Payload":"foo-1"}`, string(jb)) + + var w2 Wrapper2 + err = Unmarshal(jb, &w2) + should.NoError(err) + should.Equal(MyEnumB, w2.Payload) +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_fixed_array_test.go b/vendor/github.com/json-iterator/go/jsoniter_fixed_array_test.go new file mode 100644 index 000000000..6824b1196 --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_fixed_array_test.go @@ -0,0 +1,37 @@ +package jsoniter + +import ( + "encoding/json" + "github.com/stretchr/testify/require" + "testing" +) + +func Test_encode_fixed_array(t *testing.T) { + should := require.New(t) + type FixedArray [2]float64 + fixed := FixedArray{0.1, 1.0} + output, err := MarshalToString(fixed) + should.Nil(err) + should.Equal("[0.1,1]", output) +} + +func Test_encode_fixed_array_of_map(t *testing.T) { + should := require.New(t) + type FixedArray [2]map[string]string + fixed := FixedArray{map[string]string{"1": "2"}, map[string]string{"3": "4"}} + output, err := MarshalToString(fixed) + should.Nil(err) + should.Equal(`[{"1":"2"},{"3":"4"}]`, output) +} + +func Test_decode_fixed_array(t *testing.T) { + should := require.New(t) + type FixedArray [2]float64 + var fixed FixedArray + should.Nil(json.Unmarshal([]byte("[1,2,3]"), &fixed)) + should.Equal(float64(1), fixed[0]) + should.Equal(float64(2), fixed[1]) + should.Nil(Unmarshal([]byte("[1,2,3]"), &fixed)) + should.Equal(float64(1), fixed[0]) + should.Equal(float64(2), fixed[1]) +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_float_test.go b/vendor/github.com/json-iterator/go/jsoniter_float_test.go new file mode 100644 index 000000000..d90ff2bd5 --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_float_test.go @@ -0,0 +1,210 @@ +// +build go1.8 + +package jsoniter + +import ( + "bytes" + "encoding/json" + "fmt" + "strconv" + "testing" + + "github.com/stretchr/testify/require" +) + +func Test_read_big_float(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, `12.3`) + val := iter.ReadBigFloat() + val64, _ := val.Float64() + should.Equal(12.3, val64) +} + +func Test_read_big_int(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, `92233720368547758079223372036854775807`) + val := iter.ReadBigInt() + should.NotNil(val) + should.Equal(`92233720368547758079223372036854775807`, val.String()) +} + +func Test_read_float(t *testing.T) { + inputs := []string{ + `1.1`, `1000`, `9223372036854775807`, `12.3`, `-12.3`, `720368.54775807`, `720368.547758075`, + `1e1`, `1e+1`, `1e-1`, `1E1`, `1E+1`, `1E-1`, `-1e1`, `-1e+1`, `-1e-1`, + } + for _, input := range inputs { + // non-streaming + t.Run(fmt.Sprintf("%v", input), func(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, input+",") + expected, err := strconv.ParseFloat(input, 32) + should.Nil(err) + should.Equal(float32(expected), iter.ReadFloat32()) + }) + t.Run(fmt.Sprintf("%v", input), func(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, input+",") + expected, err := strconv.ParseFloat(input, 64) + should.Nil(err) + should.Equal(expected, iter.ReadFloat64()) + }) + // streaming + t.Run(fmt.Sprintf("%v", input), func(t *testing.T) { + should := require.New(t) + iter := Parse(ConfigDefault, bytes.NewBufferString(input+","), 2) + expected, err := strconv.ParseFloat(input, 32) + should.Nil(err) + should.Equal(float32(expected), iter.ReadFloat32()) + }) + t.Run(fmt.Sprintf("%v", input), func(t *testing.T) { + should := require.New(t) + iter := Parse(ConfigDefault, bytes.NewBufferString(input+","), 2) + val := float64(0) + err := json.Unmarshal([]byte(input), &val) + should.Nil(err) + should.Equal(val, iter.ReadFloat64()) + }) + } +} + +func Test_read_float_as_interface(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, `12.3`) + should.Equal(float64(12.3), iter.Read()) +} + +func Test_wrap_float(t *testing.T) { + should := require.New(t) + str, err := MarshalToString(WrapFloat64(12.3)) + should.Nil(err) + should.Equal("12.3", str) +} + +func Test_write_float32(t *testing.T) { + vals := []float32{0, 1, -1, 99, 0xff, 0xfff, 0xffff, 0xfffff, 0xffffff, 0x4ffffff, 0xfffffff, + -0x4ffffff, -0xfffffff, 1.2345, 1.23456, 1.234567, 1.001} + for _, val := range vals { + t.Run(fmt.Sprintf("%v", val), func(t *testing.T) { + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 4096) + stream.WriteFloat32Lossy(val) + stream.Flush() + should.Nil(stream.Error) + output, err := json.Marshal(val) + should.Nil(err) + should.Equal(string(output), buf.String()) + }) + t.Run(fmt.Sprintf("%v", val), func(t *testing.T) { + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 4096) + stream.WriteVal(val) + stream.Flush() + should.Nil(stream.Error) + output, err := json.Marshal(val) + should.Nil(err) + should.Equal(string(output), buf.String()) + }) + } + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 10) + stream.WriteRaw("abcdefg") + stream.WriteFloat32Lossy(1.123456) + stream.Flush() + should.Nil(stream.Error) + should.Equal("abcdefg1.123456", buf.String()) + + stream = NewStream(ConfigDefault, nil, 0) + stream.WriteFloat32(float32(0.0000001)) + should.Equal("1e-07", string(stream.buf)) +} + +func Test_write_float64(t *testing.T) { + vals := []float64{0, 1, -1, 99, 0xff, 0xfff, 0xffff, 0xfffff, 0xffffff, 0x4ffffff, 0xfffffff, + -0x4ffffff, -0xfffffff, 1.2345, 1.23456, 1.234567, 1.001} + for _, val := range vals { + t.Run(fmt.Sprintf("%v", val), func(t *testing.T) { + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 4096) + stream.WriteFloat64Lossy(val) + stream.Flush() + should.Nil(stream.Error) + should.Equal(strconv.FormatFloat(val, 'f', -1, 64), buf.String()) + }) + t.Run(fmt.Sprintf("%v", val), func(t *testing.T) { + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 4096) + stream.WriteVal(val) + stream.Flush() + should.Nil(stream.Error) + should.Equal(strconv.FormatFloat(val, 'f', -1, 64), buf.String()) + }) + } + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 10) + stream.WriteRaw("abcdefg") + stream.WriteFloat64Lossy(1.123456) + stream.Flush() + should.Nil(stream.Error) + should.Equal("abcdefg1.123456", buf.String()) + + stream = NewStream(ConfigDefault, nil, 0) + stream.WriteFloat64(float64(0.0000001)) + should.Equal("1e-07", string(stream.buf)) +} + +func Test_read_float64_cursor(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, "[1.23456789\n,2,3]") + should.True(iter.ReadArray()) + should.Equal(1.23456789, iter.Read()) + should.True(iter.ReadArray()) + should.Equal(float64(2), iter.Read()) +} + +func Test_read_float_scientific(t *testing.T) { + should := require.New(t) + var obj interface{} + should.Nil(UnmarshalFromString(`1e1`, &obj)) + should.Equal(float64(10), obj) + should.Nil(json.Unmarshal([]byte(`1e1`), &obj)) + should.Equal(float64(10), obj) + should.Nil(UnmarshalFromString(`1.0e1`, &obj)) + should.Equal(float64(10), obj) + should.Nil(json.Unmarshal([]byte(`1.0e1`), &obj)) + should.Equal(float64(10), obj) +} + +func Test_lossy_float_marshal(t *testing.T) { + should := require.New(t) + api := Config{MarshalFloatWith6Digits: true}.Froze() + output, err := api.MarshalToString(float64(0.1234567)) + should.Nil(err) + should.Equal("0.123457", output) + output, err = api.MarshalToString(float32(0.1234567)) + should.Nil(err) + should.Equal("0.123457", output) +} + +func Benchmark_jsoniter_float(b *testing.B) { + b.ReportAllocs() + input := []byte(`1.1123,`) + iter := NewIterator(ConfigDefault) + for n := 0; n < b.N; n++ { + iter.ResetBytes(input) + iter.ReadFloat64() + } +} + +func Benchmark_json_float(b *testing.B) { + for n := 0; n < b.N; n++ { + result := float64(0) + json.Unmarshal([]byte(`1.1`), &result) + } +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_int_test.go b/vendor/github.com/json-iterator/go/jsoniter_int_test.go new file mode 100644 index 000000000..79670c77c --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_int_test.go @@ -0,0 +1,537 @@ +// +build go1.8 + +package jsoniter + +import ( + "bytes" + "encoding/json" + "fmt" + "io/ioutil" + "strconv" + "testing" + + "github.com/stretchr/testify/require" +) + +func Test_read_uint64_invalid(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, ",") + iter.ReadUint64() + should.NotNil(iter.Error) +} + +func Test_read_int_from_null(t *testing.T) { + + type TestObject struct { + F1 int8 + F2 int16 + F3 int32 + F4 int64 + F5 int + F6 uint8 + F7 uint16 + F8 uint32 + F9 uint64 + F10 uint + F11 float32 + F12 float64 + F13 uintptr + } + + should := require.New(t) + obj := TestObject{} + err := Unmarshal([]byte(`{ + "f1":null, + "f2":null, + "f3":null, + "f4":null, + "f5":null, + "f6":null, + "f7":null, + "f8":null, + "f9":null, + "f10":null, + "f11":null, + "f12":null, + "f13":null + }`), &obj) + should.Nil(err) +} + +func _int8(t *testing.T) { + inputs := []string{`127`, `-128`} + for _, input := range inputs { + t.Run(fmt.Sprintf("%v", input), func(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, input) + expected, err := strconv.ParseInt(input, 10, 8) + should.Nil(err) + should.Equal(int8(expected), iter.ReadInt8()) + }) + } +} + +func Test_read_int16(t *testing.T) { + inputs := []string{`32767`, `-32768`} + for _, input := range inputs { + t.Run(fmt.Sprintf("%v", input), func(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, input) + expected, err := strconv.ParseInt(input, 10, 16) + should.Nil(err) + should.Equal(int16(expected), iter.ReadInt16()) + }) + } +} + +func Test_read_int32(t *testing.T) { + inputs := []string{`1`, `12`, `123`, `1234`, `12345`, `123456`, `2147483647`, `-2147483648`} + for _, input := range inputs { + t.Run(fmt.Sprintf("%v", input), func(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, input) + expected, err := strconv.ParseInt(input, 10, 32) + should.Nil(err) + should.Equal(int32(expected), iter.ReadInt32()) + }) + t.Run(fmt.Sprintf("%v", input), func(t *testing.T) { + should := require.New(t) + iter := Parse(ConfigDefault, bytes.NewBufferString(input), 2) + expected, err := strconv.ParseInt(input, 10, 32) + should.Nil(err) + should.Equal(int32(expected), iter.ReadInt32()) + }) + } +} + +func Test_read_int32_array(t *testing.T) { + should := require.New(t) + input := `[123,456,789]` + val := make([]int32, 0) + UnmarshalFromString(input, &val) + should.Equal(3, len(val)) +} + +func Test_read_int64_array(t *testing.T) { + should := require.New(t) + input := `[123,456,789]` + val := make([]int64, 0) + UnmarshalFromString(input, &val) + should.Equal(3, len(val)) +} + +func Test_read_int_overflow(t *testing.T) { + should := require.New(t) + inputArr := []string{"123451", "-123451"} + for _, s := range inputArr { + iter := ParseString(ConfigDefault, s) + iter.ReadInt8() + should.NotNil(iter.Error) + + iterU := ParseString(ConfigDefault, s) + iterU.ReadUint8() + should.NotNil(iterU.Error) + + } + + inputArr = []string{"12345678912", "-12345678912"} + for _, s := range inputArr { + iter := ParseString(ConfigDefault, s) + iter.ReadInt16() + should.NotNil(iter.Error) + + iterUint := ParseString(ConfigDefault, s) + iterUint.ReadUint16() + should.NotNil(iterUint.Error) + } + + inputArr = []string{"3111111111", "-3111111111", "1234232323232323235678912", "-1234567892323232323212"} + for _, s := range inputArr { + iter := ParseString(ConfigDefault, s) + iter.ReadInt32() + should.NotNil(iter.Error) + + iterUint := ParseString(ConfigDefault, s) + iterUint.ReadUint32() + should.NotNil(iterUint.Error) + } + + inputArr = []string{"9223372036854775811", "-9523372036854775807", "1234232323232323235678912", "-1234567892323232323212"} + for _, s := range inputArr { + iter := ParseString(ConfigDefault, s) + iter.ReadInt64() + should.NotNil(iter.Error) + + iterUint := ParseString(ConfigDefault, s) + iterUint.ReadUint64() + should.NotNil(iterUint.Error) + } +} + +func Test_read_int64(t *testing.T) { + inputs := []string{`1`, `12`, `123`, `1234`, `12345`, `123456`, `9223372036854775807`, `-9223372036854775808`} + for _, input := range inputs { + t.Run(fmt.Sprintf("%v", input), func(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, input) + expected, err := strconv.ParseInt(input, 10, 64) + should.Nil(err) + should.Equal(expected, iter.ReadInt64()) + }) + t.Run(fmt.Sprintf("%v", input), func(t *testing.T) { + should := require.New(t) + iter := Parse(ConfigDefault, bytes.NewBufferString(input), 2) + expected, err := strconv.ParseInt(input, 10, 64) + should.Nil(err) + should.Equal(expected, iter.ReadInt64()) + }) + } +} + +func Test_read_int64_overflow(t *testing.T) { + should := require.New(t) + input := "123456789123456789123456789123456789," + iter := ParseString(ConfigDefault, input) + iter.ReadInt64() + should.NotNil(iter.Error) +} + +func Test_wrap_int(t *testing.T) { + should := require.New(t) + str, err := MarshalToString(WrapInt64(100)) + should.Nil(err) + should.Equal("100", str) +} + +func Test_write_uint8(t *testing.T) { + vals := []uint8{0, 1, 11, 111, 255} + for _, val := range vals { + t.Run(fmt.Sprintf("%v", val), func(t *testing.T) { + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 4096) + stream.WriteUint8(val) + stream.Flush() + should.Nil(stream.Error) + should.Equal(strconv.FormatUint(uint64(val), 10), buf.String()) + }) + t.Run(fmt.Sprintf("%v", val), func(t *testing.T) { + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 4096) + stream.WriteVal(val) + stream.Flush() + should.Nil(stream.Error) + should.Equal(strconv.FormatUint(uint64(val), 10), buf.String()) + }) + } + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 3) + stream.WriteRaw("a") + stream.WriteUint8(100) // should clear buffer + stream.Flush() + should.Nil(stream.Error) + should.Equal("a100", buf.String()) +} + +func Test_write_int8(t *testing.T) { + vals := []int8{0, 1, -1, 99, 0x7f, -0x80} + for _, val := range vals { + t.Run(fmt.Sprintf("%v", val), func(t *testing.T) { + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 4096) + stream.WriteInt8(val) + stream.Flush() + should.Nil(stream.Error) + should.Equal(strconv.FormatInt(int64(val), 10), buf.String()) + }) + t.Run(fmt.Sprintf("%v", val), func(t *testing.T) { + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 4096) + stream.WriteVal(val) + stream.Flush() + should.Nil(stream.Error) + should.Equal(strconv.FormatInt(int64(val), 10), buf.String()) + }) + } + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 4) + stream.WriteRaw("a") + stream.WriteInt8(-100) // should clear buffer + stream.Flush() + should.Nil(stream.Error) + should.Equal("a-100", buf.String()) +} + +func Test_write_uint16(t *testing.T) { + vals := []uint16{0, 1, 11, 111, 255, 0xfff, 0xffff} + for _, val := range vals { + t.Run(fmt.Sprintf("%v", val), func(t *testing.T) { + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 4096) + stream.WriteUint16(val) + stream.Flush() + should.Nil(stream.Error) + should.Equal(strconv.FormatUint(uint64(val), 10), buf.String()) + }) + t.Run(fmt.Sprintf("%v", val), func(t *testing.T) { + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 4096) + stream.WriteVal(val) + stream.Flush() + should.Nil(stream.Error) + should.Equal(strconv.FormatUint(uint64(val), 10), buf.String()) + }) + } + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 5) + stream.WriteRaw("a") + stream.WriteUint16(10000) // should clear buffer + stream.Flush() + should.Nil(stream.Error) + should.Equal("a10000", buf.String()) +} + +func Test_write_int16(t *testing.T) { + vals := []int16{0, 1, 11, 111, 255, 0xfff, 0x7fff, -0x8000} + for _, val := range vals { + t.Run(fmt.Sprintf("%v", val), func(t *testing.T) { + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 4096) + stream.WriteInt16(val) + stream.Flush() + should.Nil(stream.Error) + should.Equal(strconv.FormatInt(int64(val), 10), buf.String()) + }) + t.Run(fmt.Sprintf("%v", val), func(t *testing.T) { + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 4096) + stream.WriteVal(val) + stream.Flush() + should.Nil(stream.Error) + should.Equal(strconv.FormatInt(int64(val), 10), buf.String()) + }) + } + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 6) + stream.WriteRaw("a") + stream.WriteInt16(-10000) // should clear buffer + stream.Flush() + should.Nil(stream.Error) + should.Equal("a-10000", buf.String()) +} + +func Test_write_uint32(t *testing.T) { + vals := []uint32{0, 1, 11, 111, 255, 999999, 0xfff, 0xffff, 0xfffff, 0xffffff, 0xfffffff, 0xffffffff} + for _, val := range vals { + t.Run(fmt.Sprintf("%v", val), func(t *testing.T) { + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 4096) + stream.WriteUint32(val) + stream.Flush() + should.Nil(stream.Error) + should.Equal(strconv.FormatUint(uint64(val), 10), buf.String()) + }) + t.Run(fmt.Sprintf("%v", val), func(t *testing.T) { + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 4096) + stream.WriteVal(val) + stream.Flush() + should.Nil(stream.Error) + should.Equal(strconv.FormatUint(uint64(val), 10), buf.String()) + }) + } + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 10) + stream.WriteRaw("a") + stream.WriteUint32(0xffffffff) // should clear buffer + stream.Flush() + should.Nil(stream.Error) + should.Equal("a4294967295", buf.String()) +} + +func Test_write_int32(t *testing.T) { + vals := []int32{0, 1, 11, 111, 255, 999999, 0xfff, 0xffff, 0xfffff, 0xffffff, 0xfffffff, 0x7fffffff, -0x80000000} + for _, val := range vals { + t.Run(fmt.Sprintf("%v", val), func(t *testing.T) { + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 4096) + stream.WriteInt32(val) + stream.Flush() + should.Nil(stream.Error) + should.Equal(strconv.FormatInt(int64(val), 10), buf.String()) + }) + t.Run(fmt.Sprintf("%v", val), func(t *testing.T) { + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 4096) + stream.WriteVal(val) + stream.Flush() + should.Nil(stream.Error) + should.Equal(strconv.FormatInt(int64(val), 10), buf.String()) + }) + } + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 11) + stream.WriteRaw("a") + stream.WriteInt32(-0x7fffffff) // should clear buffer + stream.Flush() + should.Nil(stream.Error) + should.Equal("a-2147483647", buf.String()) +} + +func Test_write_uint64(t *testing.T) { + vals := []uint64{0, 1, 11, 111, 255, 999999, 0xfff, 0xffff, 0xfffff, 0xffffff, 0xfffffff, 0xffffffff, + 0xfffffffff, 0xffffffffff, 0xfffffffffff, 0xffffffffffff, 0xfffffffffffff, 0xffffffffffffff, + 0xfffffffffffffff, 0xffffffffffffffff} + for _, val := range vals { + t.Run(fmt.Sprintf("%v", val), func(t *testing.T) { + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 4096) + stream.WriteUint64(val) + stream.Flush() + should.Nil(stream.Error) + should.Equal(strconv.FormatUint(uint64(val), 10), buf.String()) + }) + t.Run(fmt.Sprintf("%v", val), func(t *testing.T) { + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 4096) + stream.WriteVal(val) + stream.Flush() + should.Nil(stream.Error) + should.Equal(strconv.FormatUint(uint64(val), 10), buf.String()) + }) + } + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 10) + stream.WriteRaw("a") + stream.WriteUint64(0xffffffff) // should clear buffer + stream.Flush() + should.Nil(stream.Error) + should.Equal("a4294967295", buf.String()) +} + +func Test_write_int64(t *testing.T) { + vals := []int64{0, 1, 11, 111, 255, 999999, 0xfff, 0xffff, 0xfffff, 0xffffff, 0xfffffff, 0xffffffff, + 0xfffffffff, 0xffffffffff, 0xfffffffffff, 0xffffffffffff, 0xfffffffffffff, 0xffffffffffffff, + 0xfffffffffffffff, 0x7fffffffffffffff, -0x8000000000000000} + for _, val := range vals { + t.Run(fmt.Sprintf("%v", val), func(t *testing.T) { + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 4096) + stream.WriteInt64(val) + stream.Flush() + should.Nil(stream.Error) + should.Equal(strconv.FormatInt(val, 10), buf.String()) + }) + t.Run(fmt.Sprintf("%v", val), func(t *testing.T) { + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 4096) + stream.WriteVal(val) + stream.Flush() + should.Nil(stream.Error) + should.Equal(strconv.FormatInt(val, 10), buf.String()) + }) + } + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 10) + stream.WriteRaw("a") + stream.WriteInt64(0xffffffff) // should clear buffer + stream.Flush() + should.Nil(stream.Error) + should.Equal("a4294967295", buf.String()) +} + +func Test_write_val_int(t *testing.T) { + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 4096) + stream.WriteVal(1001) + stream.Flush() + should.Nil(stream.Error) + should.Equal("1001", buf.String()) +} + +func Test_write_val_int_ptr(t *testing.T) { + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 4096) + val := 1001 + stream.WriteVal(&val) + stream.Flush() + should.Nil(stream.Error) + should.Equal("1001", buf.String()) +} + +func Test_json_number(t *testing.T) { + should := require.New(t) + var arr []json.Number + err := Unmarshal([]byte(`[1]`), &arr) + should.Nil(err) + should.Equal(json.Number("1"), arr[0]) + str, err := MarshalToString(arr) + should.Nil(err) + should.Equal(`[1]`, str) +} + +func Test_jsoniter_number(t *testing.T) { + should := require.New(t) + var arr []Number + err := Unmarshal([]byte(`[1]`), &arr) + should.Nil(err) + should.Equal(Number("1"), arr[0]) + str, isNumber := CastJsonNumber(arr[0]) + should.True(isNumber) + should.Equal("1", str) +} + +func Benchmark_jsoniter_encode_int(b *testing.B) { + stream := NewStream(ConfigDefault, ioutil.Discard, 64) + for n := 0; n < b.N; n++ { + stream.n = 0 + stream.WriteUint64(0xffffffff) + } +} + +func Benchmark_itoa(b *testing.B) { + for n := 0; n < b.N; n++ { + strconv.FormatInt(0xffffffff, 10) + } +} + +func Benchmark_jsoniter_int(b *testing.B) { + iter := NewIterator(ConfigDefault) + input := []byte(`100`) + for n := 0; n < b.N; n++ { + iter.ResetBytes(input) + iter.ReadInt64() + } +} + +func Benchmark_json_int(b *testing.B) { + for n := 0; n < b.N; n++ { + result := int64(0) + json.Unmarshal([]byte(`-100`), &result) + } +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_interface_test.go b/vendor/github.com/json-iterator/go/jsoniter_interface_test.go new file mode 100644 index 000000000..5a0528865 --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_interface_test.go @@ -0,0 +1,560 @@ +package jsoniter + +import ( + "encoding/json" + "fmt" + "testing" + "unsafe" + + "github.com/stretchr/testify/require" +) + +func Test_write_array_of_interface(t *testing.T) { + should := require.New(t) + array := []interface{}{"hello"} + str, err := MarshalToString(array) + should.Nil(err) + should.Equal(`["hello"]`, str) +} + +func Test_write_map_of_interface(t *testing.T) { + should := require.New(t) + val := map[string]interface{}{"hello": "world"} + str, err := MarshalToString(val) + should.Nil(err) + should.Equal(`{"hello":"world"}`, str) +} + +func Test_write_map_of_interface_in_struct(t *testing.T) { + type TestObject struct { + Field map[string]interface{} + } + should := require.New(t) + val := TestObject{map[string]interface{}{"hello": "world"}} + str, err := MarshalToString(val) + should.Nil(err) + should.Equal(`{"Field":{"hello":"world"}}`, str) +} + +func Test_write_map_of_interface_in_struct_with_two_fields(t *testing.T) { + type TestObject struct { + Field map[string]interface{} + Field2 string + } + should := require.New(t) + val := TestObject{map[string]interface{}{"hello": "world"}, ""} + str, err := MarshalToString(val) + should.Nil(err) + should.Contains(str, `"Field":{"hello":"world"}`) +} + +type MyInterface interface { + Hello() string +} + +type MyString string + +func (ms MyString) Hello() string { + return string(ms) +} + +func Test_write_map_of_custom_interface(t *testing.T) { + should := require.New(t) + myStr := MyString("world") + should.Equal("world", myStr.Hello()) + val := map[string]MyInterface{"hello": myStr} + str, err := MarshalToString(val) + should.Nil(err) + should.Equal(`{"hello":"world"}`, str) +} + +func Test_write_interface(t *testing.T) { + should := require.New(t) + var val interface{} + val = "hello" + str, err := MarshalToString(val) + should.Nil(err) + should.Equal(`"hello"`, str) +} + +func Test_read_interface(t *testing.T) { + should := require.New(t) + var val interface{} + err := UnmarshalFromString(`"hello"`, &val) + should.Nil(err) + should.Equal("hello", val) + err = UnmarshalFromString(`1e1`, &val) + should.Nil(err) + should.Equal(float64(10), val) + err = UnmarshalFromString(`1.0e1`, &val) + should.Nil(err) + should.Equal(float64(10), val) + err = json.Unmarshal([]byte(`1.0e1`), &val) + should.Nil(err) + should.Equal(float64(10), val) +} + +func Test_read_custom_interface(t *testing.T) { + should := require.New(t) + var val MyInterface + RegisterTypeDecoderFunc("jsoniter.MyInterface", func(ptr unsafe.Pointer, iter *Iterator) { + *((*MyInterface)(ptr)) = MyString(iter.ReadString()) + }) + err := UnmarshalFromString(`"hello"`, &val) + should.Nil(err) + should.Equal("hello", val.Hello()) +} + +func Test_decode_object_contain_empty_interface(t *testing.T) { + type TestObject struct { + Field interface{} + } + should := require.New(t) + obj := TestObject{} + obj.Field = 1024 + should.Nil(UnmarshalFromString(`{"Field": "hello"}`, &obj)) + should.Equal("hello", obj.Field) +} + +func Test_decode_object_contain_non_empty_interface(t *testing.T) { + type TestObject struct { + Field MyInterface + } + should := require.New(t) + obj := TestObject{} + obj.Field = MyString("abc") + should.Nil(UnmarshalFromString(`{"Field": "hello"}`, &obj)) + should.Equal(MyString("hello"), obj.Field) +} + +func Test_encode_object_contain_empty_interface(t *testing.T) { + type TestObject struct { + Field interface{} + } + should := require.New(t) + obj := TestObject{} + obj.Field = 1024 + str, err := MarshalToString(obj) + should.Nil(err) + should.Equal(`{"Field":1024}`, str) +} + +func Test_encode_object_contain_non_empty_interface(t *testing.T) { + type TestObject struct { + Field MyInterface + } + should := require.New(t) + obj := TestObject{} + obj.Field = MyString("hello") + str, err := MarshalToString(obj) + should.Nil(err) + should.Equal(`{"Field":"hello"}`, str) +} + +func Test_nil_non_empty_interface(t *testing.T) { + ConfigDefault.(*frozenConfig).cleanEncoders() + ConfigDefault.(*frozenConfig).cleanDecoders() + type TestObject struct { + Field []MyInterface + } + should := require.New(t) + obj := TestObject{} + b := []byte(`{"Field":["AAA"]}`) + should.NotNil(json.Unmarshal(b, &obj)) + should.NotNil(Unmarshal(b, &obj)) +} + +func Test_read_large_number_as_interface(t *testing.T) { + should := require.New(t) + var val interface{} + err := Config{UseNumber: true}.Froze().UnmarshalFromString(`123456789123456789123456789`, &val) + should.Nil(err) + output, err := MarshalToString(val) + should.Nil(err) + should.Equal(`123456789123456789123456789`, output) +} + +func Test_nested_one_field_struct(t *testing.T) { + should := require.New(t) + type YetYetAnotherObject struct { + Field string + } + type YetAnotherObject struct { + Field *YetYetAnotherObject + } + type AnotherObject struct { + Field *YetAnotherObject + } + type TestObject struct { + Me *AnotherObject + } + obj := TestObject{&AnotherObject{&YetAnotherObject{&YetYetAnotherObject{"abc"}}}} + str, err := MarshalToString(obj) + should.Nil(err) + should.Equal(`{"Me":{"Field":{"Field":{"Field":"abc"}}}}`, str) + str, err = MarshalToString(&obj) + should.Nil(err) + should.Equal(`{"Me":{"Field":{"Field":{"Field":"abc"}}}}`, str) +} + +func Test_struct_with_embedded_ptr_with_tag(t *testing.T) { + type O1 struct { + O1F string + } + + type Option struct { + O1 *O1 + } + + type T struct { + Option `json:","` + } + var obj T + should := require.New(t) + output, err := MarshalToString(obj) + should.Nil(err) + should.Equal(`{"O1":null}`, output) +} + +func Test_struct_with_one_nil(t *testing.T) { + type TestObject struct { + F *float64 + } + var obj TestObject + should := require.New(t) + output, err := MarshalToString(obj) + should.Nil(err) + should.Equal(`{"F":null}`, output) +} + +func Test_struct_with_one_nil_embedded(t *testing.T) { + type Parent struct { + Field1 string + Field2 string + } + type TestObject struct { + *Parent + } + obj := TestObject{} + should := require.New(t) + bytes, err := json.Marshal(obj) + should.Nil(err) + should.Equal("{}", string(bytes)) + output, err := MarshalToString(obj) + should.Nil(err) + should.Equal(`{}`, output) +} + +func Test_struct_with_not_nil_embedded(t *testing.T) { + type Parent struct { + Field0 string + Field1 []string + Field2 map[string]interface{} + } + type TestObject struct { + *Parent + } + should := require.New(t) + var obj TestObject + err := UnmarshalFromString(`{"Field0":"1","Field1":null,"Field2":{"K":"V"}}`, &obj) + should.Nil(err) + should.Nil(obj.Field1) + should.Equal(map[string]interface{}{"K": "V"}, obj.Field2) + should.Equal("1", obj.Field0) +} + +func Test_array_with_one_nil_ptr(t *testing.T) { + obj := [1]*float64{nil} + should := require.New(t) + output, err := MarshalToString(obj) + should.Nil(err) + should.Equal(`[null]`, output) +} + +func Test_array_with_one_not_nil_ptr(t *testing.T) { + two := float64(2) + obj := [1]*float64{&two} + should := require.New(t) + output, err := MarshalToString(obj) + should.Nil(err) + should.Equal(`[2]`, output) +} + +func Test_embedded_array_with_one_nil(t *testing.T) { + type TestObject struct { + Field1 int + Field2 [1]*float64 + } + var obj TestObject + should := require.New(t) + output, err := MarshalToString(obj) + should.Nil(err) + should.Contains(output, `"Field2":[null]`) +} + +func Test_array_with_nothing(t *testing.T) { + var obj [2]*float64 + should := require.New(t) + output, err := MarshalToString(obj) + should.Nil(err) + should.Equal(`[null,null]`, output) +} + +func Test_unmarshal_ptr_to_interface(t *testing.T) { + type TestData struct { + Name string `json:"name"` + } + should := require.New(t) + var obj interface{} = &TestData{} + err := json.Unmarshal([]byte(`{"name":"value"}`), &obj) + should.Nil(err) + should.Equal("&{value}", fmt.Sprintf("%v", obj)) + obj = interface{}(&TestData{}) + err = Unmarshal([]byte(`{"name":"value"}`), &obj) + should.Nil(err) + should.Equal("&{value}", fmt.Sprintf("%v", obj)) +} + +func Test_nil_out_null_interface(t *testing.T) { + type TestData struct { + Field interface{} `json:"field"` + } + should := require.New(t) + + var boolVar bool + obj := TestData{ + Field: &boolVar, + } + + data1 := []byte(`{"field": true}`) + + err := Unmarshal(data1, &obj) + should.NoError(err) + should.Equal(true, *(obj.Field.(*bool))) + + data2 := []byte(`{"field": null}`) + + err = Unmarshal(data2, &obj) + should.NoError(err) + should.Equal(nil, obj.Field) + + // Checking stdlib behavior matches. + obj2 := TestData{ + Field: &boolVar, + } + + err = json.Unmarshal(data1, &obj2) + should.NoError(err) + should.Equal(true, *(obj2.Field.(*bool))) + + err = json.Unmarshal(data2, &obj2) + should.NoError(err) + should.Equal(nil, obj2.Field) +} + +func Test_omitempty_nil_interface(t *testing.T) { + type TestData struct { + Field interface{} `json:"field,omitempty"` + } + should := require.New(t) + + obj := TestData{ + Field: nil, + } + + js, err := json.Marshal(obj) + should.NoError(err) + should.Equal("{}", string(js)) + + str, err := MarshalToString(obj) + should.NoError(err) + should.Equal(string(js), str) +} + +func Test_omitempty_nil_nonempty_interface(t *testing.T) { + type TestData struct { + Field MyInterface `json:"field,omitempty"` + } + should := require.New(t) + + obj := TestData{ + Field: nil, + } + + js, err := json.Marshal(obj) + should.NoError(err) + should.Equal("{}", string(js)) + + str, err := MarshalToString(obj) + should.NoError(err) + should.Equal(string(js), str) + + obj.Field = MyString("hello") + err = UnmarshalFromString(`{"field":null}`, &obj) + should.NoError(err) + should.Equal(nil, obj.Field) +} + +func Test_marshal_nil_marshaler_interface(t *testing.T) { + type TestData struct { + Field json.Marshaler `json:"field"` + } + should := require.New(t) + + obj := TestData{ + Field: nil, + } + + js, err := json.Marshal(obj) + should.NoError(err) + should.Equal(`{"field":null}`, string(js)) + + str, err := MarshalToString(obj) + should.NoError(err) + should.Equal(string(js), str) +} + +func Test_marshal_nil_nonempty_interface(t *testing.T) { + type TestData struct { + Field MyInterface `json:"field"` + } + should := require.New(t) + + obj := TestData{ + Field: nil, + } + + js, err := json.Marshal(obj) + should.NoError(err) + should.Equal(`{"field":null}`, string(js)) + + str, err := MarshalToString(obj) + should.NoError(err) + should.Equal(string(js), str) + + obj.Field = MyString("hello") + err = Unmarshal(js, &obj) + should.NoError(err) + should.Equal(nil, obj.Field) +} + +func Test_overwrite_interface_ptr_value_with_nil(t *testing.T) { + type Wrapper struct { + Payload interface{} `json:"payload,omitempty"` + } + type Payload struct { + Value int `json:"val,omitempty"` + } + + should := require.New(t) + + payload := &Payload{} + wrapper := &Wrapper{ + Payload: &payload, + } + + err := json.Unmarshal([]byte(`{"payload": {"val": 42}}`), &wrapper) + should.Equal(nil, err) + should.Equal(&payload, wrapper.Payload) + should.Equal(42, (*(wrapper.Payload.(**Payload))).Value) + + err = json.Unmarshal([]byte(`{"payload": null}`), &wrapper) + should.Equal(nil, err) + should.Equal(&payload, wrapper.Payload) + should.Equal((*Payload)(nil), payload) + + payload = &Payload{} + wrapper = &Wrapper{ + Payload: &payload, + } + + err = Unmarshal([]byte(`{"payload": {"val": 42}}`), &wrapper) + should.Equal(nil, err) + should.Equal(&payload, wrapper.Payload) + should.Equal(42, (*(wrapper.Payload.(**Payload))).Value) + + err = Unmarshal([]byte(`{"payload": null}`), &wrapper) + should.Equal(nil, err) + should.Equal(&payload, wrapper.Payload) + should.Equal((*Payload)(nil), payload) +} + +func Test_overwrite_interface_value_with_nil(t *testing.T) { + type Wrapper struct { + Payload interface{} `json:"payload,omitempty"` + } + type Payload struct { + Value int `json:"val,omitempty"` + } + + should := require.New(t) + + payload := &Payload{} + wrapper := &Wrapper{ + Payload: payload, + } + + err := json.Unmarshal([]byte(`{"payload": {"val": 42}}`), &wrapper) + should.Equal(nil, err) + should.Equal(42, (*(wrapper.Payload.(*Payload))).Value) + + err = json.Unmarshal([]byte(`{"payload": null}`), &wrapper) + should.Equal(nil, err) + should.Equal(nil, wrapper.Payload) + should.Equal(42, payload.Value) + + payload = &Payload{} + wrapper = &Wrapper{ + Payload: payload, + } + + err = Unmarshal([]byte(`{"payload": {"val": 42}}`), &wrapper) + should.Equal(nil, err) + should.Equal(42, (*(wrapper.Payload.(*Payload))).Value) + + err = Unmarshal([]byte(`{"payload": null}`), &wrapper) + should.Equal(nil, err) + should.Equal(nil, wrapper.Payload) + should.Equal(42, payload.Value) +} + +func Test_unmarshal_into_nil(t *testing.T) { + type Payload struct { + Value int `json:"val,omitempty"` + } + type Wrapper struct { + Payload interface{} `json:"payload,omitempty"` + } + + should := require.New(t) + + var payload *Payload + wrapper := &Wrapper{ + Payload: payload, + } + + err := json.Unmarshal([]byte(`{"payload": {"val": 42}}`), &wrapper) + should.Nil(err) + should.NotNil(wrapper.Payload) + should.Nil(payload) + + err = json.Unmarshal([]byte(`{"payload": null}`), &wrapper) + should.Nil(err) + should.Nil(wrapper.Payload) + should.Nil(payload) + + payload = nil + wrapper = &Wrapper{ + Payload: payload, + } + + err = Unmarshal([]byte(`{"payload": {"val": 42}}`), &wrapper) + should.Nil(err) + should.NotNil(wrapper.Payload) + should.Nil(payload) + + err = Unmarshal([]byte(`{"payload": null}`), &wrapper) + should.Nil(err) + should.Nil(wrapper.Payload) + should.Nil(payload) +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_invalid_test.go b/vendor/github.com/json-iterator/go/jsoniter_invalid_test.go new file mode 100644 index 000000000..9f30bf5d8 --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_invalid_test.go @@ -0,0 +1,132 @@ +package jsoniter + +import ( + "bytes" + "encoding/json" + "github.com/stretchr/testify/require" + "io" + "testing" +) + +func Test_missing_object_end(t *testing.T) { + should := require.New(t) + type TestObject struct { + Metric string `json:"metric"` + Tags map[string]interface{} `json:"tags"` + } + obj := TestObject{} + should.NotNil(UnmarshalFromString(`{"metric": "sys.777","tags": {"a":"123"}`, &obj)) +} + +func Test_missing_array_end(t *testing.T) { + should := require.New(t) + should.NotNil(UnmarshalFromString(`[1,2,3`, &[]int{})) +} + +func Test_invalid_any(t *testing.T) { + should := require.New(t) + any := Get([]byte("[]")) + should.Equal(InvalidValue, any.Get(0.3).ValueType()) + // is nil correct ? + should.Equal(nil, any.Get(0.3).GetInterface()) + + any = any.Get(0.3) + should.Equal(false, any.ToBool()) + should.Equal(int(0), any.ToInt()) + should.Equal(int32(0), any.ToInt32()) + should.Equal(int64(0), any.ToInt64()) + should.Equal(uint(0), any.ToUint()) + should.Equal(uint32(0), any.ToUint32()) + should.Equal(uint64(0), any.ToUint64()) + should.Equal(float32(0), any.ToFloat32()) + should.Equal(float64(0), any.ToFloat64()) + should.Equal("", any.ToString()) + + should.Equal(InvalidValue, any.Get(0.1).Get(1).ValueType()) +} + +func Test_invalid_struct_input(t *testing.T) { + should := require.New(t) + type TestObject struct{} + input := []byte{54, 141, 30} + obj := TestObject{} + should.NotNil(Unmarshal(input, &obj)) +} + +func Test_invalid_slice_input(t *testing.T) { + should := require.New(t) + type TestObject struct{} + input := []byte{93} + obj := []string{} + should.NotNil(Unmarshal(input, &obj)) +} + +func Test_invalid_array_input(t *testing.T) { + should := require.New(t) + type TestObject struct{} + input := []byte{93} + obj := [0]string{} + should.NotNil(Unmarshal(input, &obj)) +} + +func Test_invalid_float(t *testing.T) { + inputs := []string{ + `1.e1`, // dot without following digit + `1.`, // dot can not be the last char + ``, // empty number + `01`, // extra leading zero + `-`, // negative without digit + `--`, // double negative + `--2`, // double negative + } + for _, input := range inputs { + t.Run(input, func(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, input+",") + iter.Skip() + should.NotEqual(io.EOF, iter.Error) + should.NotNil(iter.Error) + v := float64(0) + should.NotNil(json.Unmarshal([]byte(input), &v)) + iter = ParseString(ConfigDefault, input+",") + iter.ReadFloat64() + should.NotEqual(io.EOF, iter.Error) + should.NotNil(iter.Error) + iter = ParseString(ConfigDefault, input+",") + iter.ReadFloat32() + should.NotEqual(io.EOF, iter.Error) + should.NotNil(iter.Error) + }) + } +} + +func Test_chan(t *testing.T) { + t.Skip("do not support chan") + + type TestObject struct { + MyChan chan bool + MyField int + } + + should := require.New(t) + obj := TestObject{} + str, err := json.Marshal(obj) + should.Nil(err) + should.Equal(``, str) +} + +func Test_invalid_number(t *testing.T) { + type Message struct { + Number int `json:"number"` + } + obj := Message{} + decoder := ConfigCompatibleWithStandardLibrary.NewDecoder(bytes.NewBufferString(`{"number":"5"}`)) + err := decoder.Decode(&obj) + invalidStr := err.Error() + result, err := ConfigCompatibleWithStandardLibrary.Marshal(invalidStr) + should := require.New(t) + should.Nil(err) + result2, err := json.Marshal(invalidStr) + should.Nil(err) + should.Equal(string(result2), string(result)) +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_io_test.go b/vendor/github.com/json-iterator/go/jsoniter_io_test.go new file mode 100644 index 000000000..5046ccc40 --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_io_test.go @@ -0,0 +1,65 @@ +package jsoniter + +import ( + "bytes" + "github.com/stretchr/testify/require" + "io" + "testing" +) + +func Test_read_by_one(t *testing.T) { + iter := Parse(ConfigDefault, bytes.NewBufferString("abc"), 1) + b := iter.readByte() + if iter.Error != nil { + t.Fatal(iter.Error) + } + if b != 'a' { + t.Fatal(b) + } + iter.unreadByte() + if iter.Error != nil { + t.Fatal(iter.Error) + } + b = iter.readByte() + if iter.Error != nil { + t.Fatal(iter.Error) + } + if b != 'a' { + t.Fatal(b) + } +} + +func Test_read_by_two(t *testing.T) { + should := require.New(t) + iter := Parse(ConfigDefault, bytes.NewBufferString("abc"), 2) + b := iter.readByte() + should.Nil(iter.Error) + should.Equal(byte('a'), b) + b = iter.readByte() + should.Nil(iter.Error) + should.Equal(byte('b'), b) + iter.unreadByte() + should.Nil(iter.Error) + iter.unreadByte() + should.Nil(iter.Error) + b = iter.readByte() + should.Nil(iter.Error) + should.Equal(byte('a'), b) +} + +func Test_read_until_eof(t *testing.T) { + iter := Parse(ConfigDefault, bytes.NewBufferString("abc"), 2) + iter.readByte() + iter.readByte() + b := iter.readByte() + if iter.Error != nil { + t.Fatal(iter.Error) + } + if b != 'c' { + t.Fatal(b) + } + iter.readByte() + if iter.Error != io.EOF { + t.Fatal(iter.Error) + } +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_iterator_test.go b/vendor/github.com/json-iterator/go/jsoniter_iterator_test.go new file mode 100644 index 000000000..951574d8d --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_iterator_test.go @@ -0,0 +1,66 @@ +package jsoniter + +import ( + "bytes" + "encoding/json" + "fmt" + "strconv" + "testing" + + "github.com/stretchr/testify/require" +) + +func Test_bad_case(t *testing.T) { + // field := *(*string)(unsafe.Pointer(&str)) + // caused this issue + iter := Parse(ConfigDefault, bytes.NewBufferString(`{"Info":{"InfoHash":"4lzhP/fwlVLRgalC31YbfBSiqwo=","InfoHashstr":"E25CE13FF7F09552D181A942DF561B7C14A2AB0A","AnnounceList":["http://tracker.nwps.ws:6969/announce","http://tracker.nwps.ws:6969/announce","http://tracker.winglai.com/announce","http://fr33dom.h33t.com:3310/announce","http://exodus.desync.com:6969/announce","http://torrent.gresille.org/announce","http://tracker.trackerfix.com/announce","udp://tracker.btzoo.eu:80/announce","http://tracker.windsormetalbattery.com/announce","udp://10.rarbg.me:80/announce","udp://ipv4.tracker.harry.lu:80/announce","udp://tracker.ilibr.org:6969/announce","udp://tracker.zond.org:80/announce","http://torrent-tracker.ru/announce.php","http://bigfoot1942.sektori.org:6969/announce","http://tracker.best-torrents.net:6969/announce","http://announce.torrentsmd.com:6969/announce","udp://tracker.token.ro:80/announce","udp://tracker.coppersurfer.tk:80","http://tracker.thepiratebay.org/announce","udp://9.rarbg.com:2710/announce","udp://open.demonii.com:1337/announce","udp://tracker.ccc.de:80/announce","udp://tracker.istole.it:80/announce","udp://tracker.publicbt.com:80/announce","udp://tracker.openbittorrent.com:80/announce","udp://tracker.istole.it:80/announce","http://tracker.istole.it/announce","udp://tracker.publicbt.com:80/announce","http://tracker.publicbt.com/announce","udp://open.demonii.com:1337/announce"],"Length":2434793890,"PieceSize":524288,"PieceNum":4645},"InfoHashstr":"E25CE13FF7F09552D181A942DF561B7C14A2AB0A","SectionNum":32,"PieceNum":4645,"PieceSize":16384,"Finished":false,"SparseSize":104857600,"Bit":[{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},{"Size":4645,"EndIndex":580,"EndMask":248,"Good":0,"Flush":false,"Bit":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="}]}`), 4096) + count := 0 + for field := iter.ReadObject(); field != ""; field = iter.ReadObject() { + if field == "Bit" { + for iter.ReadArray() { + for field := iter.ReadObject(); field != ""; field = iter.ReadObject() { + if field == "Bit" { + iter.ReadStringAsSlice() + } else { + if field != "Size" && field != "EndIndex" && field != "EndMask" && field != "Good" && field != "Flush" { + t.Fatal(field) + } + iter.Skip() + } + } + count++ + } + } else { + iter.Skip() + } + } + if count != 32 { + t.Fatal(count) + } +} + +func Test_iterator_use_number(t *testing.T) { + // Test UseNumber with iterator Read() + inputs := []string{`2147483647`, `-2147483648`} + for _, input := range inputs { + t.Run(fmt.Sprintf("%v", input), func(t *testing.T) { + should := require.New(t) + iter := ParseString(Config{UseNumber: true}.Froze(), input) + expected := json.Number(input) + should.Equal(expected, iter.Read()) + }) + } +} + +func Test_iterator_without_number(t *testing.T) { + inputs := []string{`2147483647`, `-2147483648`} + for _, input := range inputs { + t.Run(fmt.Sprintf("%v", input), func(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, input) + expected, err := strconv.ParseInt(input, 10, 32) + should.Nil(err) + should.Equal(float64(expected), iter.Read()) + }) + } +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_large_file_test.go b/vendor/github.com/json-iterator/go/jsoniter_large_file_test.go new file mode 100644 index 000000000..29eb58b16 --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_large_file_test.go @@ -0,0 +1,157 @@ +package jsoniter + +import ( + "encoding/json" + "io/ioutil" + "os" + "testing" +) + +//func Test_large_file(t *testing.T) { +// file, err := os.Open("/tmp/large-file.json") +// if err != nil { +// t.Fatal(err) +// } +// iter := Parse(file, 4096) +// count := 0 +// for iter.ReadArray() { +// iter.Skip() +// count++ +// } +// if count != 11351 { +// t.Fatal(count) +// } +//} + +func init() { + ioutil.WriteFile("/tmp/large-file.json", []byte(`[{ + "person": { + "id": "d50887ca-a6ce-4e59-b89f-14f0b5d03b03", + "name": { + "fullName": "Leonid Bugaev", + "givenName": "Leonid", + "familyName": "Bugaev" + }, + "email": "leonsbox@gmail.com", + "gender": "male", + "location": "Saint Petersburg, Saint Petersburg, RU", + "geo": { + "city": "Saint Petersburg", + "state": "Saint Petersburg", + "country": "Russia", + "lat": 59.9342802, + "lng": 30.3350986 + }, + "bio": "Senior engineer at Granify.com", + "site": "http://flickfaver.com", + "avatar": "https://d1ts43dypk8bqh.cloudfront.net/v1/avatars/d50887ca-a6ce-4e59-b89f-14f0b5d03b03", + "employment": { + "name": "www.latera.ru", + "title": "Software Engineer", + "domain": "gmail.com" + }, + "facebook": { + "handle": "leonid.bugaev" + }, + "github": { + "handle": "buger", + "id": 14009, + "avatar": "https://avatars.githubusercontent.com/u/14009?v=3", + "company": "Granify", + "blog": "http://leonsbox.com", + "followers": 95, + "following": 10 + }, + "twitter": { + "handle": "flickfaver", + "id": 77004410, + "bio": null, + "followers": 2, + "following": 1, + "statuses": 5, + "favorites": 0, + "location": "", + "site": "http://flickfaver.com", + "avatar": null + }, + "linkedin": { + "handle": "in/leonidbugaev" + }, + "googleplus": { + "handle": null + }, + "angellist": { + "handle": "leonid-bugaev", + "id": 61541, + "bio": "Senior engineer at Granify.com", + "blog": "http://buger.github.com", + "site": "http://buger.github.com", + "followers": 41, + "avatar": "https://d1qb2nb5cznatu.cloudfront.net/users/61541-medium_jpg?1405474390" + }, + "klout": { + "handle": null, + "score": null + }, + "foursquare": { + "handle": null + }, + "aboutme": { + "handle": "leonid.bugaev", + "bio": null, + "avatar": null + }, + "gravatar": { + "handle": "buger", + "urls": [ + ], + "avatar": "http://1.gravatar.com/avatar/f7c8edd577d13b8930d5522f28123510", + "avatars": [ + { + "url": "http://1.gravatar.com/avatar/f7c8edd577d13b8930d5522f28123510", + "type": "thumbnail" + } + ] + }, + "fuzzy": false + }, + "company": "hello" +}]`), 0666) +} + +/* +200000 8886 ns/op 4336 B/op 6 allocs/op +50000 34244 ns/op 6744 B/op 14 allocs/op +*/ +func Benchmark_jsoniter_large_file(b *testing.B) { + b.ReportAllocs() + for n := 0; n < b.N; n++ { + file, _ := os.Open("/tmp/large-file.json") + iter := Parse(ConfigDefault, file, 4096) + count := 0 + iter.ReadArrayCB(func(iter *Iterator) bool { + // Skip() is strict by default, use --tags jsoniter-sloppy to skip without validation + iter.Skip() + count++ + return true + }) + file.Close() + if iter.Error != nil { + b.Error(iter.Error) + } + } +} + +func Benchmark_json_large_file(b *testing.B) { + b.ReportAllocs() + for n := 0; n < b.N; n++ { + file, _ := os.Open("/tmp/large-file.json") + bytes, _ := ioutil.ReadAll(file) + file.Close() + result := []struct{}{} + err := json.Unmarshal(bytes, &result) + if err != nil { + b.Error(err) + } + } +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_map_test.go b/vendor/github.com/json-iterator/go/jsoniter_map_test.go new file mode 100644 index 000000000..0865428f5 --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_map_test.go @@ -0,0 +1,160 @@ +package jsoniter + +import ( + "encoding/json" + "math/big" + "testing" + + "github.com/stretchr/testify/require" + "strings" +) + +func Test_read_map(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, `{"hello": "world"}`) + m := map[string]string{"1": "2"} + iter.ReadVal(&m) + copy(iter.buf, []byte{0, 0, 0, 0, 0, 0}) + should.Equal(map[string]string{"1": "2", "hello": "world"}, m) +} + +func Test_read_map_of_interface(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, `{"hello": "world"}`) + m := map[string]interface{}{"1": "2"} + iter.ReadVal(&m) + should.Equal(map[string]interface{}{"1": "2", "hello": "world"}, m) + iter = ParseString(ConfigDefault, `{"hello": "world"}`) + should.Equal(map[string]interface{}{"hello": "world"}, iter.Read()) +} + +func Test_map_wrapper_any_get_all(t *testing.T) { + should := require.New(t) + any := Wrap(map[string][]int{"Field1": {1, 2}}) + should.Equal(`{"Field1":1}`, any.Get('*', 0).ToString()) + should.Contains(any.Keys(), "Field1") + + // map write to + stream := NewStream(ConfigDefault, nil, 0) + any.WriteTo(stream) + // TODO cannot pass + //should.Equal(string(stream.buf), "") +} + +func Test_write_val_map(t *testing.T) { + should := require.New(t) + val := map[string]string{"1": "2"} + str, err := MarshalToString(val) + should.Nil(err) + should.Equal(`{"1":"2"}`, str) +} + +func Test_slice_of_map(t *testing.T) { + should := require.New(t) + val := []map[string]string{{"1": "2"}} + str, err := MarshalToString(val) + should.Nil(err) + should.Equal(`[{"1":"2"}]`, str) + val = []map[string]string{} + should.Nil(UnmarshalFromString(str, &val)) + should.Equal("2", val[0]["1"]) +} + +func Test_encode_int_key_map(t *testing.T) { + should := require.New(t) + val := map[int]string{1: "2"} + str, err := MarshalToString(val) + should.Nil(err) + should.Equal(`{"1":"2"}`, str) +} + +func Test_decode_int_key_map(t *testing.T) { + should := require.New(t) + var val map[int]string + should.Nil(UnmarshalFromString(`{"1":"2"}`, &val)) + should.Equal(map[int]string{1: "2"}, val) +} + +func Test_encode_TextMarshaler_key_map(t *testing.T) { + should := require.New(t) + f, _, _ := big.ParseFloat("1", 10, 64, big.ToZero) + val := map[*big.Float]string{f: "2"} + str, err := MarshalToString(val) + should.Nil(err) + should.Equal(`{"1":"2"}`, str) +} + +func Test_decode_TextMarshaler_key_map(t *testing.T) { + should := require.New(t) + var val map[*big.Float]string + should.Nil(UnmarshalFromString(`{"1":"2"}`, &val)) + str, err := MarshalToString(val) + should.Nil(err) + should.Equal(`{"1":"2"}`, str) +} + +func Test_map_key_with_escaped_char(t *testing.T) { + type Ttest struct { + Map map[string]string + } + var jsonBytes = []byte(` + { + "Map":{ + "k\"ey": "val" + } + }`) + should := require.New(t) + { + var obj Ttest + should.Nil(json.Unmarshal(jsonBytes, &obj)) + should.Equal(map[string]string{"k\"ey": "val"}, obj.Map) + } + { + var obj Ttest + should.Nil(Unmarshal(jsonBytes, &obj)) + should.Equal(map[string]string{"k\"ey": "val"}, obj.Map) + } +} + +func Test_encode_map_with_sorted_keys(t *testing.T) { + should := require.New(t) + m := map[string]interface{}{ + "3": 3, + "1": 1, + "2": 2, + } + bytes, err := json.Marshal(m) + should.Nil(err) + output, err := ConfigCompatibleWithStandardLibrary.MarshalToString(m) + should.Nil(err) + should.Equal(string(bytes), output) +} + +func Test_encode_map_uint_keys(t *testing.T) { + should := require.New(t) + m := map[uint64]interface{}{ + uint64(1): "a", + uint64(2): "a", + uint64(4): "a", + } + + bytes, err := json.Marshal(m) + should.Nil(err) + + output, err := ConfigCompatibleWithStandardLibrary.MarshalToString(m) + should.Nil(err) + should.Equal(string(bytes), output) +} + +func Test_read_map_with_reader(t *testing.T) { + should := require.New(t) + input := `{"branch":"beta","change_log":"add the rows{10}","channel":"fros","create_time":"2017-06-13 16:39:08","firmware_list":"","md5":"80dee2bf7305bcf179582088e29fd7b9","note":{"CoreServices":{"md5":"d26975c0a8c7369f70ed699f2855cc2e","package_name":"CoreServices","version_code":"76","version_name":"1.0.76"},"FrDaemon":{"md5":"6b1f0626673200bc2157422cd2103f5d","package_name":"FrDaemon","version_code":"390","version_name":"1.0.390"},"FrGallery":{"md5":"90d767f0f31bcd3c1d27281ec979ba65","package_name":"FrGallery","version_code":"349","version_name":"1.0.349"},"FrLocal":{"md5":"f15a215b2c070a80a01f07bde4f219eb","package_name":"FrLocal","version_code":"791","version_name":"1.0.791"}},"pack_region_urls":{"CN":"https://s3.cn-north-1.amazonaws.com.cn/xxx-os/ttt_xxx_android_1.5.3.344.393.zip","default":"http://192.168.8.78/ttt_xxx_android_1.5.3.344.393.zip","local":"http://192.168.8.78/ttt_xxx_android_1.5.3.344.393.zip"},"pack_version":"1.5.3.344.393","pack_version_code":393,"region":"all","release_flag":0,"revision":62,"size":38966875,"status":3}` + reader := strings.NewReader(input) + decoder := ConfigCompatibleWithStandardLibrary.NewDecoder(reader) + m1 := map[string]interface{}{} + should.Nil(decoder.Decode(&m1)) + m2 := map[string]interface{}{} + should.Nil(json.Unmarshal([]byte(input), &m2)) + should.Equal(m2, m1) + should.Equal("1.0.76", m1["note"].(map[string]interface{})["CoreServices"].(map[string]interface{})["version_name"]) +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_must_be_valid_test.go b/vendor/github.com/json-iterator/go/jsoniter_must_be_valid_test.go new file mode 100644 index 000000000..01a91c90f --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_must_be_valid_test.go @@ -0,0 +1,71 @@ +package jsoniter + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +// if must be valid is useless, just drop this test +func Test_must_be_valid(t *testing.T) { + should := require.New(t) + any := Get([]byte("123")) + should.Equal(any.MustBeValid().ToInt(), 123) + + any = Wrap(int8(10)) + should.Equal(any.MustBeValid().ToInt(), 10) + + any = Wrap(int16(10)) + should.Equal(any.MustBeValid().ToInt(), 10) + + any = Wrap(int32(10)) + should.Equal(any.MustBeValid().ToInt(), 10) + + any = Wrap(int64(10)) + should.Equal(any.MustBeValid().ToInt(), 10) + + any = Wrap(uint(10)) + should.Equal(any.MustBeValid().ToInt(), 10) + + any = Wrap(uint8(10)) + should.Equal(any.MustBeValid().ToInt(), 10) + + any = Wrap(uint16(10)) + should.Equal(any.MustBeValid().ToInt(), 10) + + any = Wrap(uint32(10)) + should.Equal(any.MustBeValid().ToInt(), 10) + + any = Wrap(uint64(10)) + should.Equal(any.MustBeValid().ToInt(), 10) + + any = Wrap(float32(10)) + should.Equal(any.MustBeValid().ToFloat64(), float64(10)) + + any = Wrap(float64(10)) + should.Equal(any.MustBeValid().ToFloat64(), float64(10)) + + any = Wrap(true) + should.Equal(any.MustBeValid().ToFloat64(), float64(1)) + + any = Wrap(false) + should.Equal(any.MustBeValid().ToFloat64(), float64(0)) + + any = Wrap(nil) + should.Equal(any.MustBeValid().ToFloat64(), float64(0)) + + any = Wrap(struct{ age int }{age: 1}) + should.Equal(any.MustBeValid().ToFloat64(), float64(0)) + + any = Wrap(map[string]interface{}{"abc": 1}) + should.Equal(any.MustBeValid().ToFloat64(), float64(0)) + + any = Wrap("abc") + should.Equal(any.MustBeValid().ToFloat64(), float64(0)) + + any = Wrap([]int{}) + should.Equal(any.MustBeValid().ToFloat64(), float64(0)) + + any = Wrap([]int{1, 2}) + should.Equal(any.MustBeValid().ToFloat64(), float64(1)) +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_nested_test.go b/vendor/github.com/json-iterator/go/jsoniter_nested_test.go new file mode 100644 index 000000000..29f8cee84 --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_nested_test.go @@ -0,0 +1,88 @@ +package jsoniter + +import ( + "encoding/json" + "reflect" + "testing" +) + +type Level1 struct { + Hello []Level2 +} + +type Level2 struct { + World string +} + +func Test_nested(t *testing.T) { + iter := ParseString(ConfigDefault, `{"hello": [{"world": "value1"}, {"world": "value2"}]}`) + l1 := Level1{} + for l1Field := iter.ReadObject(); l1Field != ""; l1Field = iter.ReadObject() { + switch l1Field { + case "hello": + l2Array := []Level2{} + for iter.ReadArray() { + l2 := Level2{} + for l2Field := iter.ReadObject(); l2Field != ""; l2Field = iter.ReadObject() { + switch l2Field { + case "world": + l2.World = iter.ReadString() + default: + iter.ReportError("bind l2", "unexpected field: "+l2Field) + } + } + l2Array = append(l2Array, l2) + } + l1.Hello = l2Array + default: + iter.ReportError("bind l1", "unexpected field: "+l1Field) + } + } + if !reflect.DeepEqual(l1, Level1{ + Hello: []Level2{ + {World: "value1"}, + {World: "value2"}, + }, + }) { + t.Fatal(l1) + } +} + +func Benchmark_jsoniter_nested(b *testing.B) { + for n := 0; n < b.N; n++ { + iter := ParseString(ConfigDefault, `{"hello": [{"world": "value1"}, {"world": "value2"}]}`) + l1 := Level1{} + for l1Field := iter.ReadObject(); l1Field != ""; l1Field = iter.ReadObject() { + switch l1Field { + case "hello": + l1.Hello = readLevel1Hello(iter) + default: + iter.Skip() + } + } + } +} + +func readLevel1Hello(iter *Iterator) []Level2 { + l2Array := make([]Level2, 0, 2) + for iter.ReadArray() { + l2 := Level2{} + for l2Field := iter.ReadObject(); l2Field != ""; l2Field = iter.ReadObject() { + switch l2Field { + case "world": + l2.World = iter.ReadString() + default: + iter.Skip() + } + } + l2Array = append(l2Array, l2) + } + return l2Array +} + +func Benchmark_json_nested(b *testing.B) { + for n := 0; n < b.N; n++ { + l1 := Level1{} + json.Unmarshal([]byte(`{"hello": [{"world": "value1"}, {"world": "value2"}]}`), &l1) + } +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_null_test.go b/vendor/github.com/json-iterator/go/jsoniter_null_test.go new file mode 100644 index 000000000..8c891470f --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_null_test.go @@ -0,0 +1,168 @@ +package jsoniter + +import ( + "bytes" + "encoding/json" + "io" + "testing" + + "github.com/stretchr/testify/require" +) + +func Test_read_null(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, `null`) + should.True(iter.ReadNil()) + iter = ParseString(ConfigDefault, `null`) + should.Nil(iter.Read()) + iter = ParseString(ConfigDefault, `navy`) + iter.Read() + should.True(iter.Error != nil && iter.Error != io.EOF) + iter = ParseString(ConfigDefault, `navy`) + iter.ReadNil() + should.True(iter.Error != nil && iter.Error != io.EOF) +} + +func Test_write_null(t *testing.T) { + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 4096) + stream.WriteNil() + stream.Flush() + should.Nil(stream.Error) + should.Equal("null", buf.String()) +} + +func Test_encode_null(t *testing.T) { + should := require.New(t) + str, err := MarshalToString(nil) + should.Nil(err) + should.Equal("null", str) +} + +func Test_decode_null_object_field(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, `[null,"a"]`) + iter.ReadArray() + if iter.ReadObject() != "" { + t.FailNow() + } + iter.ReadArray() + if iter.ReadString() != "a" { + t.FailNow() + } + type TestObject struct { + Field string + } + objs := []TestObject{} + should.Nil(UnmarshalFromString("[null]", &objs)) + should.Len(objs, 1) +} + +func Test_decode_null_array_element(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, `[null,"a"]`) + should.True(iter.ReadArray()) + should.True(iter.ReadNil()) + should.True(iter.ReadArray()) + should.Equal("a", iter.ReadString()) +} + +func Test_decode_null_array(t *testing.T) { + should := require.New(t) + arr := []string{} + should.Nil(UnmarshalFromString("null", &arr)) + should.Nil(arr) +} + +func Test_decode_null_map(t *testing.T) { + should := require.New(t) + arr := map[string]string{} + should.Nil(UnmarshalFromString("null", &arr)) + should.Nil(arr) +} + +func Test_decode_null_string(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, `[null,"a"]`) + should.True(iter.ReadArray()) + should.Equal("", iter.ReadString()) + should.True(iter.ReadArray()) + should.Equal("a", iter.ReadString()) +} + +func Test_decode_null_skip(t *testing.T) { + iter := ParseString(ConfigDefault, `[null,"a"]`) + iter.ReadArray() + iter.Skip() + iter.ReadArray() + if iter.ReadString() != "a" { + t.FailNow() + } +} + +func Test_encode_nil_map(t *testing.T) { + should := require.New(t) + type Ttest map[string]string + var obj1 Ttest + output, err := json.Marshal(obj1) + should.Nil(err) + should.Equal("null", string(output)) + output, err = json.Marshal(&obj1) + should.Nil(err) + should.Equal("null", string(output)) + output, err = Marshal(obj1) + should.Nil(err) + should.Equal("null", string(output)) + output, err = Marshal(&obj1) + should.Nil(err) + should.Equal("null", string(output)) +} + +func Test_encode_nil_array(t *testing.T) { + should := require.New(t) + type Ttest []string + var obj1 Ttest + output, err := json.Marshal(obj1) + should.Nil(err) + should.Equal("null", string(output)) + output, err = json.Marshal(&obj1) + should.Nil(err) + should.Equal("null", string(output)) + output, err = Marshal(obj1) + should.Nil(err) + should.Equal("null", string(output)) + output, err = Marshal(&obj1) + should.Nil(err) + should.Equal("null", string(output)) +} + +func Test_decode_nil_num(t *testing.T) { + type TestData struct { + Field int `json:"field"` + } + should := require.New(t) + + data1 := []byte(`{"field": 42}`) + data2 := []byte(`{"field": null}`) + + // Checking stdlib behavior as well + obj2 := TestData{} + err := json.Unmarshal(data1, &obj2) + should.Equal(nil, err) + should.Equal(42, obj2.Field) + + err = json.Unmarshal(data2, &obj2) + should.Equal(nil, err) + should.Equal(42, obj2.Field) + + obj := TestData{} + + err = Unmarshal(data1, &obj) + should.Equal(nil, err) + should.Equal(42, obj.Field) + + err = Unmarshal(data2, &obj) + should.Equal(nil, err) + should.Equal(42, obj.Field) +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_object_test.go b/vendor/github.com/json-iterator/go/jsoniter_object_test.go new file mode 100644 index 000000000..d1a9aa06d --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_object_test.go @@ -0,0 +1,330 @@ +package jsoniter + +import ( + "bytes" + "fmt" + "testing" + + "github.com/stretchr/testify/require" +) + +func Test_empty_object(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, `{}`) + field := iter.ReadObject() + should.Equal("", field) + iter = ParseString(ConfigDefault, `{}`) + iter.ReadObjectCB(func(iter *Iterator, field string) bool { + should.FailNow("should not call") + return true + }) +} + +func Test_one_field(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, `{"a": "stream"}`) + field := iter.ReadObject() + should.Equal("a", field) + value := iter.ReadString() + should.Equal("stream", value) + field = iter.ReadObject() + should.Equal("", field) + iter = ParseString(ConfigDefault, `{"a": "stream"}`) + should.True(iter.ReadObjectCB(func(iter *Iterator, field string) bool { + should.Equal("a", field) + iter.Skip() + return true + })) + +} + +func Test_two_field(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, `{ "a": "stream" , "c": "d" }`) + field := iter.ReadObject() + should.Equal("a", field) + value := iter.ReadString() + should.Equal("stream", value) + field = iter.ReadObject() + should.Equal("c", field) + value = iter.ReadString() + should.Equal("d", value) + field = iter.ReadObject() + should.Equal("", field) + iter = ParseString(ConfigDefault, `{"field1": "1", "field2": 2}`) + for field := iter.ReadObject(); field != ""; field = iter.ReadObject() { + switch field { + case "field1": + iter.ReadString() + case "field2": + iter.ReadInt64() + default: + iter.ReportError("bind object", "unexpected field") + } + } +} + +func Test_object_wrapper_any_get_all(t *testing.T) { + should := require.New(t) + type TestObject struct { + Field1 []int + Field2 []int + } + any := Wrap(TestObject{[]int{1, 2}, []int{3, 4}}) + should.Contains(any.Get('*', 0).ToString(), `"Field2":3`) + should.Contains(any.Keys(), "Field1") + should.Contains(any.Keys(), "Field2") + should.NotContains(any.Keys(), "Field3") + + //should.Contains(any.GetObject()["Field1"].GetArray()[0], 1) +} + +func Test_write_object(t *testing.T) { + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(Config{IndentionStep: 2}.Froze(), buf, 4096) + stream.WriteObjectStart() + stream.WriteObjectField("hello") + stream.WriteInt(1) + stream.WriteMore() + stream.WriteObjectField("world") + stream.WriteInt(2) + stream.WriteObjectEnd() + stream.Flush() + should.Nil(stream.Error) + should.Equal("{\n \"hello\": 1,\n \"world\": 2\n}", buf.String()) +} + +func Test_write_val_zero_field_struct(t *testing.T) { + should := require.New(t) + type TestObject struct { + } + obj := TestObject{} + str, err := MarshalToString(obj) + should.Nil(err) + should.Equal(`{}`, str) +} + +func Test_write_val_one_field_struct(t *testing.T) { + should := require.New(t) + type TestObject struct { + Field1 string `json:"field-1"` + } + obj := TestObject{"hello"} + str, err := MarshalToString(obj) + should.Nil(err) + should.Equal(`{"field-1":"hello"}`, str) +} + +func Test_mixed(t *testing.T) { + should := require.New(t) + type AA struct { + ID int `json:"id"` + Payload map[string]interface{} `json:"payload"` + buf *bytes.Buffer + } + aa := AA{} + err := UnmarshalFromString(` {"id":1, "payload":{"account":"123","password":"456"}}`, &aa) + should.Nil(err) + should.Equal(1, aa.ID) + should.Equal("123", aa.Payload["account"]) +} + +func Test_omit_empty(t *testing.T) { + should := require.New(t) + type TestObject struct { + Field1 string `json:"field-1,omitempty"` + Field2 string `json:"field-2,omitempty"` + Field3 string `json:"field-3,omitempty"` + } + obj := TestObject{} + obj.Field2 = "hello" + str, err := MarshalToString(&obj) + should.Nil(err) + should.Equal(`{"field-2":"hello"}`, str) +} + +func Test_ignore_field_on_not_valid_type(t *testing.T) { + should := require.New(t) + type TestObject struct { + Field1 string `json:"field-1,omitempty"` + Field2 func() `json:"-"` + } + obj := TestObject{} + obj.Field1 = "hello world" + obj.Field2 = func() {} + str, err := MarshalToString(&obj) + should.Nil(err) + should.Equal(`{"field-1":"hello world"}`, str) +} + +func Test_recursive_struct(t *testing.T) { + should := require.New(t) + type TestObject struct { + Field1 string + Me *TestObject + } + obj := TestObject{} + str, err := MarshalToString(obj) + should.Nil(err) + should.Contains(str, `"Field1":""`) + should.Contains(str, `"Me":null`) + err = UnmarshalFromString(str, &obj) + should.Nil(err) +} + +func Test_encode_anonymous_struct(t *testing.T) { + should := require.New(t) + type TestObject struct { + Field string + } + str, err := MarshalToString(struct { + TestObject + Field int + }{ + Field: 100, + }) + should.Nil(err) + should.Equal(`{"Field":100}`, str) +} + +func Test_decode_anonymous_struct(t *testing.T) { + should := require.New(t) + type Inner struct { + Key string `json:"key"` + } + + type Outer struct { + Inner + } + var outer Outer + j := []byte("{\"key\":\"value\"}") + should.Nil(Unmarshal(j, &outer)) + should.Equal("value", outer.Key) +} + +func Test_multiple_level_anonymous_struct(t *testing.T) { + type Level1 struct { + Field1 string + } + type Level2 struct { + Level1 + Field2 string + } + type Level3 struct { + Level2 + Field3 string + } + should := require.New(t) + obj := Level3{Level2{Level1{"1"}, "2"}, "3"} + output, err := MarshalToString(obj) + should.Nil(err) + should.Equal(`{"Field1":"1","Field2":"2","Field3":"3"}`, output) +} + +func Test_multiple_level_anonymous_struct_with_ptr(t *testing.T) { + type Level1 struct { + Field1 string + Field2 string + Field4 string + } + type Level2 struct { + *Level1 + Field2 string + Field3 string + } + type Level3 struct { + *Level2 + Field3 string + } + should := require.New(t) + obj := Level3{&Level2{&Level1{"1", "", "4"}, "2", ""}, "3"} + output, err := MarshalToString(obj) + should.Nil(err) + should.Contains(output, `"Field1":"1"`) + should.Contains(output, `"Field2":"2"`) + should.Contains(output, `"Field3":"3"`) + should.Contains(output, `"Field4":"4"`) +} + +func Test_shadow_struct_field(t *testing.T) { + should := require.New(t) + type omit *struct{} + type CacheItem struct { + Key string `json:"key"` + MaxAge int `json:"cacheAge"` + } + output, err := MarshalToString(struct { + *CacheItem + + // Omit bad keys + OmitMaxAge omit `json:"cacheAge,omitempty"` + + // Add nice keys + MaxAge int `json:"max_age"` + }{ + CacheItem: &CacheItem{ + Key: "value", + MaxAge: 100, + }, + MaxAge: 20, + }) + should.Nil(err) + should.Contains(output, `"key":"value"`) + should.Contains(output, `"max_age":20`) +} + +func Test_embedded_order(t *testing.T) { + type A struct { + Field2 string + } + + type C struct { + Field5 string + } + + type B struct { + Field4 string + C + Field6 string + } + + type TestObject struct { + Field1 string + A + Field3 string + B + Field7 string + } + should := require.New(t) + s := TestObject{} + output, err := MarshalToString(s) + should.Nil(err) + should.Equal(`{"Field1":"","Field2":"","Field3":"","Field4":"","Field5":"","Field6":"","Field7":""}`, output) +} + +func Test_decode_nested(t *testing.T) { + type StructOfString struct { + Field1 string + Field2 string + } + iter := ParseString(ConfigDefault, `[{"field1": "hello"}, null, {"field2": "world"}]`) + slice := []*StructOfString{} + iter.ReadVal(&slice) + if len(slice) != 3 { + fmt.Println(iter.Error) + t.Fatal(len(slice)) + } + if slice[0].Field1 != "hello" { + fmt.Println(iter.Error) + t.Fatal(slice[0]) + } + if slice[1] != nil { + fmt.Println(iter.Error) + t.Fatal(slice[1]) + } + if slice[2].Field2 != "world" { + fmt.Println(iter.Error) + t.Fatal(slice[2]) + } +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_optional_test.go b/vendor/github.com/json-iterator/go/jsoniter_optional_test.go new file mode 100644 index 000000000..82b789b50 --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_optional_test.go @@ -0,0 +1,46 @@ +package jsoniter + +import ( + "github.com/stretchr/testify/require" + "testing" +) + +func Test_encode_optional_int_pointer(t *testing.T) { + should := require.New(t) + var ptr *int + str, err := MarshalToString(ptr) + should.Nil(err) + should.Equal("null", str) + val := 100 + ptr = &val + str, err = MarshalToString(ptr) + should.Nil(err) + should.Equal("100", str) +} + +func Test_decode_struct_with_optional_field(t *testing.T) { + should := require.New(t) + type TestObject struct { + Field1 *string + Field2 *string + } + obj := TestObject{} + UnmarshalFromString(`{"field1": null, "field2": "world"}`, &obj) + should.Nil(obj.Field1) + should.Equal("world", *obj.Field2) +} + +func Test_encode_struct_with_optional_field(t *testing.T) { + should := require.New(t) + type TestObject struct { + Field1 *string + Field2 *string + } + obj := TestObject{} + world := "world" + obj.Field2 = &world + str, err := MarshalToString(obj) + should.Nil(err) + should.Contains(str, `"Field1":null`) + should.Contains(str, `"Field2":"world"`) +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_raw_message_test.go b/vendor/github.com/json-iterator/go/jsoniter_raw_message_test.go new file mode 100644 index 000000000..a3c67d001 --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_raw_message_test.go @@ -0,0 +1,88 @@ +package jsoniter + +import ( + "encoding/json" + "github.com/stretchr/testify/require" + "testing" +) + +func Test_json_RawMessage(t *testing.T) { + should := require.New(t) + var data json.RawMessage + should.Nil(Unmarshal([]byte(`[1,2,3]`), &data)) + should.Equal(`[1,2,3]`, string(data)) + str, err := MarshalToString(data) + should.Nil(err) + should.Equal(`[1,2,3]`, str) +} + +func Test_jsoniter_RawMessage(t *testing.T) { + should := require.New(t) + var data RawMessage + should.Nil(Unmarshal([]byte(`[1,2,3]`), &data)) + should.Equal(`[1,2,3]`, string(data)) + str, err := MarshalToString(data) + should.Nil(err) + should.Equal(`[1,2,3]`, str) +} + +func Test_json_RawMessage_in_struct(t *testing.T) { + type TestObject struct { + Field1 string + Field2 json.RawMessage + } + should := require.New(t) + var data TestObject + should.Nil(Unmarshal([]byte(`{"field1": "hello", "field2": [1,2,3]}`), &data)) + should.Equal(` [1,2,3]`, string(data.Field2)) + should.Equal(`hello`, data.Field1) +} + +func Test_decode_map_of_raw_message(t *testing.T) { + should := require.New(t) + type RawMap map[string]*json.RawMessage + b := []byte("{\"test\":[{\"key\":\"value\"}]}") + var rawMap RawMap + should.Nil(Unmarshal(b, &rawMap)) + should.Equal(`[{"key":"value"}]`, string(*rawMap["test"])) + type Inner struct { + Key string `json:"key"` + } + var inner []Inner + Unmarshal(*rawMap["test"], &inner) + should.Equal("value", inner[0].Key) +} + +func Test_encode_map_of_raw_message(t *testing.T) { + should := require.New(t) + type RawMap map[string]*json.RawMessage + value := json.RawMessage("[]") + rawMap := RawMap{"hello": &value} + output, err := MarshalToString(rawMap) + should.Nil(err) + should.Equal(`{"hello":[]}`, output) +} + +func Test_encode_map_of_jsoniter_raw_message(t *testing.T) { + should := require.New(t) + type RawMap map[string]*RawMessage + value := RawMessage("[]") + rawMap := RawMap{"hello": &value} + output, err := MarshalToString(rawMap) + should.Nil(err) + should.Equal(`{"hello":[]}`, output) +} + +func Test_marshal_invalid_json_raw_message(t *testing.T) { + type A struct { + Raw json.RawMessage `json:"raw"` + } + message := []byte(`{}`) + + a := A{} + should := require.New(t) + should.Nil(ConfigCompatibleWithStandardLibrary.Unmarshal(message, &a)) + aout, aouterr := ConfigCompatibleWithStandardLibrary.Marshal(&a) + should.Equal(`{"raw":null}`, string(aout)) + should.Nil(aouterr) +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_reader_test.go b/vendor/github.com/json-iterator/go/jsoniter_reader_test.go new file mode 100644 index 000000000..b3b3588e1 --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_reader_test.go @@ -0,0 +1,57 @@ +package jsoniter + +import ( + "github.com/stretchr/testify/require" + "strings" + "testing" + "time" +) + +func Test_reader_and_load_more(t *testing.T) { + should := require.New(t) + type TestObject struct { + CreatedAt time.Time + } + reader := strings.NewReader(` +{ + "agency": null, + "candidateId": 0, + "candidate": "Blah Blah", + "bookingId": 0, + "shiftId": 1, + "shiftTypeId": 0, + "shift": "Standard", + "bonus": 0, + "bonusNI": 0, + "days": [], + "totalHours": 27, + "expenses": [], + "weekEndingDateSystem": "2016-10-09", + "weekEndingDateClient": "2016-10-09", + "submittedAt": null, + "submittedById": null, + "approvedAt": "2016-10-10T18:38:04Z", + "approvedById": 0, + "authorisedAt": "2016-10-10T18:38:04Z", + "authorisedById": 0, + "invoicedAt": "2016-10-10T20:00:00Z", + "revokedAt": null, + "revokedById": null, + "revokeReason": null, + "rejectedAt": null, + "rejectedById": null, + "rejectReasonCode": null, + "rejectReason": null, + "createdAt": "2016-10-03T00:00:00Z", + "updatedAt": "2016-11-09T10:26:13Z", + "updatedById": null, + "overrides": [], + "bookingApproverId": null, + "bookingApprover": null, + "status": "approved" +} + `) + decoder := ConfigCompatibleWithStandardLibrary.NewDecoder(reader) + obj := TestObject{} + should.Nil(decoder.Decode(&obj)) +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_reflect_native_test.go b/vendor/github.com/json-iterator/go/jsoniter_reflect_native_test.go new file mode 100644 index 000000000..0e2d68bba --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_reflect_native_test.go @@ -0,0 +1,154 @@ +package jsoniter + +import ( + "fmt" + "testing" +) + +func Test_reflect_str(t *testing.T) { + iter := ParseString(ConfigDefault, `"hello"`) + str := "" + iter.ReadVal(&str) + if str != "hello" { + fmt.Println(iter.Error) + t.Fatal(str) + } +} + +func Test_reflect_ptr_str(t *testing.T) { + iter := ParseString(ConfigDefault, `"hello"`) + var str *string + iter.ReadVal(&str) + if *str != "hello" { + t.Fatal(str) + } +} + +func Test_reflect_int(t *testing.T) { + iter := ParseString(ConfigDefault, `123`) + val := int(0) + iter.ReadVal(&val) + if val != 123 { + t.Fatal(val) + } +} + +func Test_reflect_int8(t *testing.T) { + iter := ParseString(ConfigDefault, `123`) + val := int8(0) + iter.ReadVal(&val) + if val != 123 { + t.Fatal(val) + } +} + +func Test_reflect_int16(t *testing.T) { + iter := ParseString(ConfigDefault, `123`) + val := int16(0) + iter.ReadVal(&val) + if val != 123 { + t.Fatal(val) + } +} + +func Test_reflect_int32(t *testing.T) { + iter := ParseString(ConfigDefault, `123`) + val := int32(0) + iter.ReadVal(&val) + if val != 123 { + t.Fatal(val) + } +} + +func Test_reflect_int64(t *testing.T) { + iter := ParseString(ConfigDefault, `123`) + val := int64(0) + iter.ReadVal(&val) + if val != 123 { + t.Fatal(val) + } +} + +func Test_reflect_uint(t *testing.T) { + iter := ParseString(ConfigDefault, `123`) + val := uint(0) + iter.ReadVal(&val) + if val != 123 { + t.Fatal(val) + } +} + +func Test_reflect_uint8(t *testing.T) { + iter := ParseString(ConfigDefault, `123`) + val := uint8(0) + iter.ReadVal(&val) + if val != 123 { + t.Fatal(val) + } +} + +func Test_reflect_uint16(t *testing.T) { + iter := ParseString(ConfigDefault, `123`) + val := uint16(0) + iter.ReadVal(&val) + if val != 123 { + t.Fatal(val) + } +} + +func Test_reflect_uint32(t *testing.T) { + iter := ParseString(ConfigDefault, `123`) + val := uint32(0) + iter.ReadVal(&val) + if val != 123 { + t.Fatal(val) + } +} + +func Test_reflect_uint64(t *testing.T) { + iter := ParseString(ConfigDefault, `123`) + val := uint64(0) + iter.ReadVal(&val) + if val != 123 { + t.Fatal(val) + } +} + +func Test_reflect_byte(t *testing.T) { + iter := ParseString(ConfigDefault, `123`) + val := byte(0) + iter.ReadVal(&val) + if val != 123 { + t.Fatal(val) + } +} + +func Test_reflect_float32(t *testing.T) { + iter := ParseString(ConfigDefault, `1.23`) + val := float32(0) + iter.ReadVal(&val) + if val != 1.23 { + fmt.Println(iter.Error) + t.Fatal(val) + } +} + +func Test_reflect_float64(t *testing.T) { + iter := ParseString(ConfigDefault, `1.23`) + val := float64(0) + iter.ReadVal(&val) + if val != 1.23 { + fmt.Println(iter.Error) + t.Fatal(val) + } +} + +func Test_reflect_bool(t *testing.T) { + iter := ParseString(ConfigDefault, `true`) + val := false + iter.ReadVal(&val) + if val != true { + fmt.Println(iter.Error) + t.Fatal(val) + } +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_skip_test.go b/vendor/github.com/json-iterator/go/jsoniter_skip_test.go new file mode 100644 index 000000000..524fd5da2 --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_skip_test.go @@ -0,0 +1,179 @@ +package jsoniter + +import ( + "bytes" + "encoding/json" + "testing" + + "github.com/stretchr/testify/require" +) + +func Test_skip_number_in_array(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, `[-0.12, "stream"]`) + iter.ReadArray() + iter.Skip() + iter.ReadArray() + should.Nil(iter.Error) + should.Equal("stream", iter.ReadString()) +} + +func Test_skip_string_in_array(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, `["hello", "stream"]`) + iter.ReadArray() + iter.Skip() + iter.ReadArray() + should.Nil(iter.Error) + should.Equal("stream", iter.ReadString()) +} + +func Test_skip_null(t *testing.T) { + iter := ParseString(ConfigDefault, `[null , "stream"]`) + iter.ReadArray() + iter.Skip() + iter.ReadArray() + if iter.ReadString() != "stream" { + t.FailNow() + } +} + +func Test_skip_true(t *testing.T) { + iter := ParseString(ConfigDefault, `[true , "stream"]`) + iter.ReadArray() + iter.Skip() + iter.ReadArray() + if iter.ReadString() != "stream" { + t.FailNow() + } +} + +func Test_skip_false(t *testing.T) { + iter := ParseString(ConfigDefault, `[false , "stream"]`) + iter.ReadArray() + iter.Skip() + iter.ReadArray() + if iter.ReadString() != "stream" { + t.FailNow() + } +} + +func Test_skip_array(t *testing.T) { + iter := ParseString(ConfigDefault, `[[1, [2, [3], 4]], "stream"]`) + iter.ReadArray() + iter.Skip() + iter.ReadArray() + if iter.ReadString() != "stream" { + t.FailNow() + } +} + +func Test_skip_empty_array(t *testing.T) { + iter := ParseString(ConfigDefault, `[ [ ], "stream"]`) + iter.ReadArray() + iter.Skip() + iter.ReadArray() + if iter.ReadString() != "stream" { + t.FailNow() + } +} + +func Test_skip_nested(t *testing.T) { + iter := ParseString(ConfigDefault, `[ {"a" : [{"stream": "c"}], "d": 102 }, "stream"]`) + iter.ReadArray() + iter.Skip() + iter.ReadArray() + if iter.ReadString() != "stream" { + t.FailNow() + } +} + +func Test_skip_and_return_bytes(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, `[ {"a" : [{"stream": "c"}], "d": 102 }, "stream"]`) + iter.ReadArray() + skipped := iter.SkipAndReturnBytes() + should.Equal(`{"a" : [{"stream": "c"}], "d": 102 }`, string(skipped)) +} + +func Test_skip_and_return_bytes_with_reader(t *testing.T) { + should := require.New(t) + iter := Parse(ConfigDefault, bytes.NewBufferString(`[ {"a" : [{"stream": "c"}], "d": 102 }, "stream"]`), 4) + iter.ReadArray() + skipped := iter.SkipAndReturnBytes() + should.Equal(`{"a" : [{"stream": "c"}], "d": 102 }`, string(skipped)) +} + +type TestResp struct { + Code uint64 +} + +func Benchmark_jsoniter_skip(b *testing.B) { + input := []byte(` +{ + "_shards":{ + "total" : 5, + "successful" : 5, + "failed" : 0 + }, + "hits":{ + "total" : 1, + "hits" : [ + { + "_index" : "twitter", + "_type" : "tweet", + "_id" : "1", + "_source" : { + "user" : "kimchy", + "postDate" : "2009-11-15T14:12:12", + "message" : "trying out Elasticsearch" + } + } + ] + }, + "code": 200 +}`) + for n := 0; n < b.N; n++ { + result := TestResp{} + iter := ParseBytes(ConfigDefault, input) + for field := iter.ReadObject(); field != ""; field = iter.ReadObject() { + switch field { + case "code": + result.Code = iter.ReadUint64() + default: + iter.Skip() + } + } + } +} + +func Benchmark_json_skip(b *testing.B) { + input := []byte(` +{ + "_shards":{ + "total" : 5, + "successful" : 5, + "failed" : 0 + }, + "hits":{ + "total" : 1, + "hits" : [ + { + "_index" : "twitter", + "_type" : "tweet", + "_id" : "1", + "_source" : { + "user" : "kimchy", + "postDate" : "2009-11-15T14:12:12", + "message" : "trying out Elasticsearch" + } + } + ] + }, + "code": 200 +}`) + for n := 0; n < b.N; n++ { + result := TestResp{} + json.Unmarshal(input, &result) + } +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_sloppy_test.go b/vendor/github.com/json-iterator/go/jsoniter_sloppy_test.go new file mode 100644 index 000000000..487713ae7 --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_sloppy_test.go @@ -0,0 +1,162 @@ +//+build jsoniter-sloppy + +package jsoniter + +import ( + "github.com/stretchr/testify/require" + "io" + "testing" +) + +func Test_string_end(t *testing.T) { + end, escaped := ParseString(ConfigDefault, `abc"`).findStringEnd() + if end != 4 { + t.Fatal(end) + } + if escaped != false { + t.Fatal(escaped) + } + end, escaped = ParseString(ConfigDefault, `abc\\"`).findStringEnd() + if end != 6 { + t.Fatal(end) + } + if escaped != true { + t.Fatal(escaped) + } + end, escaped = ParseString(ConfigDefault, `abc\\\\"`).findStringEnd() + if end != 8 { + t.Fatal(end) + } + if escaped != true { + t.Fatal(escaped) + } + end, escaped = ParseString(ConfigDefault, `abc\"`).findStringEnd() + if end != -1 { + t.Fatal(end) + } + if escaped != false { + t.Fatal(escaped) + } + end, escaped = ParseString(ConfigDefault, `abc\`).findStringEnd() + if end != -1 { + t.Fatal(end) + } + if escaped != true { + t.Fatal(escaped) + } + end, escaped = ParseString(ConfigDefault, `abc\\`).findStringEnd() + if end != -1 { + t.Fatal(end) + } + if escaped != false { + t.Fatal(escaped) + } + end, escaped = ParseString(ConfigDefault, `\\`).findStringEnd() + if end != -1 { + t.Fatal(end) + } + if escaped != false { + t.Fatal(escaped) + } + end, escaped = ParseString(ConfigDefault, `\`).findStringEnd() + if end != -1 { + t.Fatal(end) + } + if escaped != true { + t.Fatal(escaped) + } +} + +type StagedReader struct { + r1 string + r2 string + r3 string + r int +} + +func (reader *StagedReader) Read(p []byte) (n int, err error) { + reader.r++ + switch reader.r { + case 1: + copy(p, []byte(reader.r1)) + return len(reader.r1), nil + case 2: + copy(p, []byte(reader.r2)) + return len(reader.r2), nil + case 3: + copy(p, []byte(reader.r3)) + return len(reader.r3), nil + default: + return 0, io.EOF + } +} + +func Test_skip_string(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, `"abc`) + iter.skipString() + should.Equal(1, iter.head) + iter = ParseString(ConfigDefault, `\""abc`) + iter.skipString() + should.Equal(3, iter.head) + reader := &StagedReader{ + r1: `abc`, + r2: `"`, + } + iter = Parse(ConfigDefault, reader, 4096) + iter.skipString() + should.Equal(1, iter.head) + reader = &StagedReader{ + r1: `abc`, + r2: `1"`, + } + iter = Parse(ConfigDefault, reader, 4096) + iter.skipString() + should.Equal(2, iter.head) + reader = &StagedReader{ + r1: `abc\`, + r2: `"`, + } + iter = Parse(ConfigDefault, reader, 4096) + iter.skipString() + should.NotNil(iter.Error) + reader = &StagedReader{ + r1: `abc\`, + r2: `""`, + } + iter = Parse(ConfigDefault, reader, 4096) + iter.skipString() + should.Equal(2, iter.head) +} + +func Test_skip_object(t *testing.T) { + iter := ParseString(ConfigDefault, `}`) + iter.skipObject() + if iter.head != 1 { + t.Fatal(iter.head) + } + iter = ParseString(ConfigDefault, `a}`) + iter.skipObject() + if iter.head != 2 { + t.Fatal(iter.head) + } + iter = ParseString(ConfigDefault, `{}}a`) + iter.skipObject() + if iter.head != 3 { + t.Fatal(iter.head) + } + reader := &StagedReader{ + r1: `{`, + r2: `}}a`, + } + iter = Parse(ConfigDefault, reader, 4096) + iter.skipObject() + if iter.head != 2 { + t.Fatal(iter.head) + } + iter = ParseString(ConfigDefault, `"}"}a`) + iter.skipObject() + if iter.head != 4 { + t.Fatal(iter.head) + } +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_stream_test.go b/vendor/github.com/json-iterator/go/jsoniter_stream_test.go new file mode 100644 index 000000000..63640f58f --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_stream_test.go @@ -0,0 +1,53 @@ +package jsoniter + +import ( + "github.com/stretchr/testify/require" + "testing" +) + +func Test_writeByte_should_grow_buffer(t *testing.T) { + should := require.New(t) + stream := NewStream(ConfigDefault, nil, 1) + stream.writeByte('1') + should.Equal("1", string(stream.Buffer())) + should.Equal(1, len(stream.buf)) + stream.writeByte('2') + should.Equal("12", string(stream.Buffer())) + should.Equal(2, len(stream.buf)) + stream.writeThreeBytes('3', '4', '5') + should.Equal("12345", string(stream.Buffer())) +} + +func Test_writeBytes_should_grow_buffer(t *testing.T) { + should := require.New(t) + stream := NewStream(ConfigDefault, nil, 1) + stream.Write([]byte{'1', '2'}) + should.Equal("12", string(stream.Buffer())) + should.Equal(3, len(stream.buf)) + stream.Write([]byte{'3', '4', '5', '6', '7'}) + should.Equal("1234567", string(stream.Buffer())) + should.Equal(8, len(stream.buf)) +} + +func Test_writeIndention_should_grow_buffer(t *testing.T) { + should := require.New(t) + stream := NewStream(Config{IndentionStep: 2}.Froze(), nil, 1) + stream.WriteVal([]int{1, 2, 3}) + should.Equal("[\n 1,\n 2,\n 3\n]", string(stream.Buffer())) +} + +func Test_writeRaw_should_grow_buffer(t *testing.T) { + should := require.New(t) + stream := NewStream(ConfigDefault, nil, 1) + stream.WriteRaw("123") + should.Nil(stream.Error) + should.Equal("123", string(stream.Buffer())) +} + +func Test_writeString_should_grow_buffer(t *testing.T) { + should := require.New(t) + stream := NewStream(ConfigDefault, nil, 0) + stream.WriteString("123") + should.Nil(stream.Error) + should.Equal(`"123"`, string(stream.Buffer())) +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_string_test.go b/vendor/github.com/json-iterator/go/jsoniter_string_test.go new file mode 100644 index 000000000..61c0f33b3 --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_string_test.go @@ -0,0 +1,261 @@ +// +build go1.8 + +package jsoniter + +import ( + "bytes" + "encoding/json" + "fmt" + "testing" + "unicode/utf8" + + "github.com/stretchr/testify/require" +) + +func Test_read_string(t *testing.T) { + badInputs := []string{ + ``, + `"`, + `"\"`, + `"\\\"`, + "\"\n\"", + `"\U0001f64f"`, + `"\uD83D\u00"`, + } + for i := 0; i < 32; i++ { + // control characters are invalid + badInputs = append(badInputs, string([]byte{'"', byte(i), '"'})) + } + + for _, input := range badInputs { + testReadString(t, input, "", true, "json.Unmarshal", json.Unmarshal) + testReadString(t, input, "", true, "jsoniter.Unmarshal", Unmarshal) + testReadString(t, input, "", true, "jsoniter.ConfigCompatibleWithStandardLibrary.Unmarshal", ConfigCompatibleWithStandardLibrary.Unmarshal) + } + + goodInputs := []struct { + input string + expectValue string + }{ + {`""`, ""}, + {`"a"`, "a"}, + {`null`, ""}, + {`"Iñtërnâtiônàlizætiøn,💝🐹🌇⛔"`, "Iñtërnâtiônàlizætiøn,💝🐹🌇⛔"}, + {`"\uD83D"`, string([]byte{239, 191, 189})}, + {`"\uD83D\\"`, string([]byte{239, 191, 189, '\\'})}, + {`"\uD83D\ub000"`, string([]byte{239, 191, 189, 235, 128, 128})}, + {`"\uD83D\ude04"`, "😄"}, + {`"\uDEADBEEF"`, string([]byte{239, 191, 189, 66, 69, 69, 70})}, + } + + for _, tc := range goodInputs { + testReadString(t, tc.input, tc.expectValue, false, "json.Unmarshal", json.Unmarshal) + testReadString(t, tc.input, tc.expectValue, false, "jsoniter.Unmarshal", Unmarshal) + testReadString(t, tc.input, tc.expectValue, false, "jsoniter.ConfigCompatibleWithStandardLibrary.Unmarshal", ConfigCompatibleWithStandardLibrary.Unmarshal) + } +} + +func testReadString(t *testing.T, input string, expectValue string, expectError bool, marshalerName string, marshaler func([]byte, interface{}) error) { + var value string + err := marshaler([]byte(input), &value) + if expectError != (err != nil) { + t.Errorf("%q: %s: expected error %v, got %v", input, marshalerName, expectError, err) + return + } + if value != expectValue { + t.Errorf("%q: %s: expected %q, got %q", input, marshalerName, expectValue, value) + return + } +} + +func Test_read_normal_string(t *testing.T) { + cases := map[string]string{ + `"0123456789012345678901234567890123456789"`: `0123456789012345678901234567890123456789`, + `""`: ``, + `"hello"`: `hello`, + } + for input, output := range cases { + t.Run(fmt.Sprintf("%v:%v", input, output), func(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, input) + should.Equal(output, iter.ReadString()) + }) + t.Run(fmt.Sprintf("%v:%v", input, output), func(t *testing.T) { + should := require.New(t) + iter := Parse(ConfigDefault, bytes.NewBufferString(input), 2) + should.Equal(output, iter.ReadString()) + }) + t.Run(fmt.Sprintf("%v:%v", input, output), func(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, input) + should.Equal(output, string(iter.ReadStringAsSlice())) + }) + t.Run(fmt.Sprintf("%v:%v", input, output), func(t *testing.T) { + should := require.New(t) + iter := Parse(ConfigDefault, bytes.NewBufferString(input), 2) + should.Equal(output, string(iter.ReadStringAsSlice())) + }) + } +} + +func Test_read_exotic_string(t *testing.T) { + cases := map[string]string{ + `"hel\"lo"`: `hel"lo`, + `"hel\\\/lo"`: `hel\/lo`, + `"hel\\blo"`: `hel\blo`, + `"hel\\\blo"`: "hel\\\blo", + `"hel\\nlo"`: `hel\nlo`, + `"hel\\\nlo"`: "hel\\\nlo", + `"hel\\tlo"`: `hel\tlo`, + `"hel\\flo"`: `hel\flo`, + `"hel\\\flo"`: "hel\\\flo", + `"hel\\\rlo"`: "hel\\\rlo", + `"hel\\\tlo"`: "hel\\\tlo", + `"\u4e2d\u6587"`: "中文", + `"\ud83d\udc4a"`: "\xf0\x9f\x91\x8a", // surrogate + } + for input, output := range cases { + t.Run(fmt.Sprintf("%v:%v", input, output), func(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, input) + var v string + should.Nil(json.Unmarshal([]byte(input), &v)) + should.Equal(v, iter.ReadString()) + }) + t.Run(fmt.Sprintf("%v:%v", input, output), func(t *testing.T) { + should := require.New(t) + iter := Parse(ConfigDefault, bytes.NewBufferString(input), 2) + should.Equal(output, iter.ReadString()) + }) + } +} + +func Test_read_string_as_interface(t *testing.T) { + should := require.New(t) + iter := ParseString(ConfigDefault, `"hello"`) + should.Equal("hello", iter.Read()) +} + +func Test_write_string(t *testing.T) { + should := require.New(t) + str, err := MarshalToString("hello") + should.Equal(`"hello"`, str) + should.Nil(err) + str, err = MarshalToString(`hel"lo`) + should.Equal(`"hel\"lo"`, str) + should.Nil(err) +} + +func Test_write_val_string(t *testing.T) { + should := require.New(t) + buf := &bytes.Buffer{} + stream := NewStream(ConfigDefault, buf, 4096) + stream.WriteVal("hello") + stream.Flush() + should.Nil(stream.Error) + should.Equal(`"hello"`, buf.String()) +} + +func Test_decode_slash(t *testing.T) { + should := require.New(t) + var obj interface{} + should.NotNil(json.Unmarshal([]byte("\\"), &obj)) + should.NotNil(UnmarshalFromString("\\", &obj)) +} + +func Test_html_escape(t *testing.T) { + should := require.New(t) + output, err := json.Marshal(`>`) + should.Nil(err) + should.Equal(`"\u003e"`, string(output)) + output, err = ConfigCompatibleWithStandardLibrary.Marshal(`>`) + should.Nil(err) + should.Equal(`"\u003e"`, string(output)) + type MyString string + output, err = ConfigCompatibleWithStandardLibrary.Marshal(MyString(`>`)) + should.Nil(err) + should.Equal(`"\u003e"`, string(output)) +} + +func Test_string_encode_with_std(t *testing.T) { + should := require.New(t) + for i := 0; i < utf8.RuneSelf; i++ { + input := string([]byte{byte(i)}) + stdOutputBytes, err := json.Marshal(input) + should.Nil(err) + stdOutput := string(stdOutputBytes) + jsoniterOutputBytes, err := ConfigCompatibleWithStandardLibrary.Marshal(input) + should.Nil(err) + jsoniterOutput := string(jsoniterOutputBytes) + should.Equal(stdOutput, jsoniterOutput) + } +} + +func Test_unicode(t *testing.T) { + should := require.New(t) + output, _ := MarshalToString(map[string]interface{}{"a": "数字山谷"}) + should.Equal(`{"a":"数字山谷"}`, output) + output, _ = Config{EscapeHTML: false}.Froze().MarshalToString(map[string]interface{}{"a": "数字山谷"}) + should.Equal(`{"a":"数字山谷"}`, output) +} + +func Test_unicode_and_escape(t *testing.T) { + should := require.New(t) + output, err := MarshalToString(`"数字山谷"`) + should.Nil(err) + should.Equal(`"\"数字山谷\""`, output) + output, err = ConfigFastest.MarshalToString(`"数字山谷"`) + should.Nil(err) + should.Equal(`"\"数字山谷\""`, output) +} + +func Test_unsafe_unicode(t *testing.T) { + ConfigDefault.(*frozenConfig).cleanEncoders() + should := require.New(t) + output, err := ConfigDefault.MarshalToString("he\u2029\u2028he") + should.Nil(err) + should.Equal(`"he\u2029\u2028he"`, output) + output, err = ConfigFastest.MarshalToString("he\u2029\u2028he") + should.Nil(err) + should.Equal("\"he\u2029\u2028he\"", output) +} + +func Benchmark_jsoniter_unicode(b *testing.B) { + for n := 0; n < b.N; n++ { + iter := ParseString(ConfigDefault, `"\ud83d\udc4a"`) + iter.ReadString() + } +} + +func Benchmark_jsoniter_ascii(b *testing.B) { + iter := NewIterator(ConfigDefault) + input := []byte(`"hello, world! hello, world!"`) + b.ResetTimer() + for n := 0; n < b.N; n++ { + iter.ResetBytes(input) + iter.ReadString() + } +} + +func Benchmark_jsoniter_string_as_bytes(b *testing.B) { + iter := ParseString(ConfigDefault, `"hello, world!"`) + b.ResetTimer() + for n := 0; n < b.N; n++ { + iter.ResetBytes(iter.buf) + iter.ReadStringAsSlice() + } +} + +func Benchmark_json_unicode(b *testing.B) { + for n := 0; n < b.N; n++ { + result := "" + json.Unmarshal([]byte(`"\ud83d\udc4a"`), &result) + } +} + +func Benchmark_json_ascii(b *testing.B) { + for n := 0; n < b.N; n++ { + result := "" + json.Unmarshal([]byte(`"hello"`), &result) + } +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_struct_decoder_test.go b/vendor/github.com/json-iterator/go/jsoniter_struct_decoder_test.go new file mode 100644 index 000000000..257bbdb65 --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_struct_decoder_test.go @@ -0,0 +1,267 @@ +package jsoniter + +import ( + "github.com/stretchr/testify/require" + "testing" +) + +func Test_decode_one_field_struct(t *testing.T) { + should := require.New(t) + type TestObject struct { + Field1 string + } + obj := TestObject{} + should.Nil(UnmarshalFromString(`{}`, &obj)) + should.Equal("", obj.Field1) + should.Nil(UnmarshalFromString(`{"field1": "hello"}`, &obj)) + should.Equal("hello", obj.Field1) +} + +func Test_decode_two_fields_struct(t *testing.T) { + should := require.New(t) + type TestObject struct { + Field1 string + Field2 string + } + obj := TestObject{} + should.Nil(UnmarshalFromString(`{}`, &obj)) + should.Equal("", obj.Field1) + should.Nil(UnmarshalFromString(`{"Field1": "a", "Field2": "stream"}`, &obj)) + should.Equal("a", obj.Field1) + should.Equal("stream", obj.Field2) +} + +func Test_decode_three_fields_struct(t *testing.T) { + should := require.New(t) + type TestObject struct { + Field1 string + Field2 string + Field3 string + } + obj := TestObject{} + should.Nil(UnmarshalFromString(`{}`, &obj)) + should.Equal("", obj.Field1) + should.Nil(UnmarshalFromString(`{"Field1": "a", "Field2": "stream", "Field3": "c"}`, &obj)) + should.Equal("a", obj.Field1) + should.Equal("stream", obj.Field2) + should.Equal("c", obj.Field3) +} + +func Test_decode_four_fields_struct(t *testing.T) { + should := require.New(t) + type TestObject struct { + Field1 string + Field2 string + Field3 string + Field4 string + } + obj := TestObject{} + should.Nil(UnmarshalFromString(`{}`, &obj)) + should.Equal("", obj.Field1) + should.Nil(UnmarshalFromString(`{"Field1": "a", "Field2": "stream", "Field3": "c", "Field4": "d"}`, &obj)) + should.Equal("a", obj.Field1) + should.Equal("stream", obj.Field2) + should.Equal("c", obj.Field3) + should.Equal("d", obj.Field4) +} + +func Test_decode_five_fields_struct(t *testing.T) { + should := require.New(t) + type TestObject struct { + Field1 string + Field2 string + Field3 string + Field4 string + Field5 string + } + obj := TestObject{} + should.Nil(UnmarshalFromString(`{}`, &obj)) + should.Equal("", obj.Field1) + should.Nil(UnmarshalFromString(`{"Field1": "a", "Field2": "stream", "Field3": "c", "Field4": "d", "Field5": "e"}`, &obj)) + should.Equal("a", obj.Field1) + should.Equal("stream", obj.Field2) + should.Equal("c", obj.Field3) + should.Equal("d", obj.Field4) + should.Equal("e", obj.Field5) +} + +func Test_decode_six_fields_struct(t *testing.T) { + should := require.New(t) + type TestObject struct { + Field1 string + Field2 string + Field3 string + Field4 string + Field5 string + Field6 string + } + obj := TestObject{} + should.Nil(UnmarshalFromString(`{}`, &obj)) + should.Equal("", obj.Field1) + should.Nil(UnmarshalFromString(`{"Field1": "a", "Field2": "stream", "Field3": "c", "Field4": "d", "Field5": "e", "Field6": "x"}`, &obj)) + should.Equal("a", obj.Field1) + should.Equal("stream", obj.Field2) + should.Equal("c", obj.Field3) + should.Equal("d", obj.Field4) + should.Equal("e", obj.Field5) + should.Equal("x", obj.Field6) +} + +func Test_decode_seven_fields_struct(t *testing.T) { + should := require.New(t) + type TestObject struct { + Field1 string + Field2 string + Field3 string + Field4 string + Field5 string + Field6 string + Field7 string + } + obj := TestObject{} + should.Nil(UnmarshalFromString(`{}`, &obj)) + should.Equal("", obj.Field1) + should.Nil(UnmarshalFromString(`{"Field1": "a", "Field2": "stream", "Field3": "c", "Field4": "d", "Field5": "e", "Field6": "x", "Field7":"y"}`, &obj)) + should.Equal("a", obj.Field1) + should.Equal("stream", obj.Field2) + should.Equal("c", obj.Field3) + should.Equal("d", obj.Field4) + should.Equal("e", obj.Field5) + should.Equal("x", obj.Field6) + should.Equal("y", obj.Field7) +} + +func Test_decode_eight_fields_struct(t *testing.T) { + should := require.New(t) + type TestObject struct { + Field1 string + Field2 string + Field3 string + Field4 string + Field5 string + Field6 string + Field7 string + Field8 string + } + obj := TestObject{} + should.Nil(UnmarshalFromString(`{}`, &obj)) + should.Equal("", obj.Field1) + should.Nil(UnmarshalFromString(`{"Field8":"1", "Field1": "a", "Field2": "stream", "Field3": "c", "Field4": "d", "Field5": "e", "Field6": "x", "Field7":"y"}`, &obj)) + should.Equal("a", obj.Field1) + should.Equal("stream", obj.Field2) + should.Equal("c", obj.Field3) + should.Equal("d", obj.Field4) + should.Equal("e", obj.Field5) + should.Equal("x", obj.Field6) + should.Equal("y", obj.Field7) + should.Equal("1", obj.Field8) +} + +func Test_decode_nine_fields_struct(t *testing.T) { + should := require.New(t) + type TestObject struct { + Field1 string + Field2 string + Field3 string + Field4 string + Field5 string + Field6 string + Field7 string + Field8 string + Field9 string + } + obj := TestObject{} + should.Nil(UnmarshalFromString(`{}`, &obj)) + should.Equal("", obj.Field1) + should.Nil(UnmarshalFromString(`{"Field8" : "zzzzzzzzzzz", "Field7": "zz", "Field6" : "xx", "Field1": "a", "Field2": "stream", "Field3": "c", "Field4": "d", "Field5": "e", "Field9":"f"}`, &obj)) + should.Equal("a", obj.Field1) + should.Equal("stream", obj.Field2) + should.Equal("c", obj.Field3) + should.Equal("d", obj.Field4) + should.Equal("e", obj.Field5) + should.Equal("xx", obj.Field6) + should.Equal("zz", obj.Field7) + should.Equal("zzzzzzzzzzz", obj.Field8) + should.Equal("f", obj.Field9) +} + +func Test_decode_ten_fields_struct(t *testing.T) { + should := require.New(t) + type TestObject struct { + Field1 string + Field2 string + Field3 string + Field4 string + Field5 string + Field6 string + Field7 string + Field8 string + Field9 string + Field10 string + } + obj := TestObject{} + should.Nil(UnmarshalFromString(`{}`, &obj)) + should.Equal("", obj.Field1) + should.Nil(UnmarshalFromString(`{"Field10":"x", "Field9": "x", "Field8":"x", "Field7":"x", "Field6":"x", "Field1": "a", "Field2": "stream", "Field3": "c", "Field4": "d", "Field5": "e"}`, &obj)) + should.Equal("a", obj.Field1) + should.Equal("stream", obj.Field2) + should.Equal("c", obj.Field3) + should.Equal("d", obj.Field4) + should.Equal("e", obj.Field5) + should.Equal("x", obj.Field6) + should.Equal("x", obj.Field7) + should.Equal("x", obj.Field8) + should.Equal("x", obj.Field9) + should.Equal("x", obj.Field10) +} + +func Test_decode_more_than_ten_fields_struct(t *testing.T) { + should := require.New(t) + type TestObject struct { + Field1 string + Field2 string + Field3 string + Field4 string + Field5 string + Field6 string + Field7 string + Field8 string + Field9 string + Field10 string + Field11 int + } + obj := TestObject{} + should.Nil(UnmarshalFromString(`{}`, &obj)) + should.Equal("", obj.Field1) + should.Nil(UnmarshalFromString(`{"field11":1, "field1": "a", "Field2": "stream", "Field3": "c", "Field4": "d", "Field5": "e"}`, &obj)) + should.Equal("a", obj.Field1) + should.Equal("stream", obj.Field2) + should.Equal("c", obj.Field3) + should.Equal("d", obj.Field4) + should.Equal("e", obj.Field5) + should.Equal(1, obj.Field11) +} + +func Test_decode_struct_field_with_tag(t *testing.T) { + should := require.New(t) + type TestObject struct { + Field1 string `json:"field-1"` + Field2 string `json:"-"` + Field3 int `json:",string"` + } + obj := TestObject{Field2: "world"} + UnmarshalFromString(`{"field-1": "hello", "field2": "", "Field3": "100"}`, &obj) + should.Equal("hello", obj.Field1) + should.Equal("world", obj.Field2) + should.Equal(100, obj.Field3) +} + +func Test_decode_struct_field_with_tag_string(t *testing.T) { + should := require.New(t) + type TestObject struct { + Field1 int `json:",string"` + } + obj := TestObject{Field1: 100} + should.Nil(UnmarshalFromString(`{"Field1": "100"}`, &obj)) + should.Equal(100, obj.Field1) +} diff --git a/vendor/github.com/json-iterator/go/jsoniter_wrap_test.go b/vendor/github.com/json-iterator/go/jsoniter_wrap_test.go new file mode 100644 index 000000000..b300fb591 --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter_wrap_test.go @@ -0,0 +1,118 @@ +package jsoniter + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func Test_wrap_and_valuetype_everything(t *testing.T) { + should := require.New(t) + var i interface{} + any := Get([]byte("123")) + // default of number type is float64 + i = float64(123) + should.Equal(i, any.GetInterface()) + + any = Wrap(int8(10)) + should.Equal(any.ValueType(), NumberValue) + should.Equal(any.LastError(), nil) + // get interface is not int8 interface + // i = int8(10) + // should.Equal(i, any.GetInterface()) + + any = Wrap(int16(10)) + should.Equal(any.ValueType(), NumberValue) + should.Equal(any.LastError(), nil) + //i = int16(10) + //should.Equal(i, any.GetInterface()) + + any = Wrap(int32(10)) + should.Equal(any.ValueType(), NumberValue) + should.Equal(any.LastError(), nil) + i = int32(10) + should.Equal(i, any.GetInterface()) + any = Wrap(int64(10)) + should.Equal(any.ValueType(), NumberValue) + should.Equal(any.LastError(), nil) + i = int64(10) + should.Equal(i, any.GetInterface()) + + any = Wrap(uint(10)) + should.Equal(any.ValueType(), NumberValue) + should.Equal(any.LastError(), nil) + // not equal + //i = uint(10) + //should.Equal(i, any.GetInterface()) + any = Wrap(uint8(10)) + should.Equal(any.ValueType(), NumberValue) + should.Equal(any.LastError(), nil) + // not equal + // i = uint8(10) + // should.Equal(i, any.GetInterface()) + any = Wrap(uint16(10)) + should.Equal(any.ValueType(), NumberValue) + should.Equal(any.LastError(), nil) + any = Wrap(uint32(10)) + should.Equal(any.ValueType(), NumberValue) + should.Equal(any.LastError(), nil) + i = uint32(10) + should.Equal(i, any.GetInterface()) + any = Wrap(uint64(10)) + should.Equal(any.ValueType(), NumberValue) + should.Equal(any.LastError(), nil) + i = uint64(10) + should.Equal(i, any.GetInterface()) + + any = Wrap(float32(10)) + should.Equal(any.ValueType(), NumberValue) + should.Equal(any.LastError(), nil) + // not equal + //i = float32(10) + //should.Equal(i, any.GetInterface()) + any = Wrap(float64(10)) + should.Equal(any.ValueType(), NumberValue) + should.Equal(any.LastError(), nil) + i = float64(10) + should.Equal(i, any.GetInterface()) + + any = Wrap(true) + should.Equal(any.ValueType(), BoolValue) + should.Equal(any.LastError(), nil) + i = true + should.Equal(i, any.GetInterface()) + any = Wrap(false) + should.Equal(any.ValueType(), BoolValue) + should.Equal(any.LastError(), nil) + i = false + should.Equal(i, any.GetInterface()) + + any = Wrap(nil) + should.Equal(any.ValueType(), NilValue) + should.Equal(any.LastError(), nil) + i = nil + should.Equal(i, any.GetInterface()) + + stream := NewStream(ConfigDefault, nil, 32) + any.WriteTo(stream) + should.Equal("null", string(stream.Buffer())) + should.Equal(any.LastError(), nil) + + any = Wrap(struct{ age int }{age: 1}) + should.Equal(any.ValueType(), ObjectValue) + should.Equal(any.LastError(), nil) + i = struct{ age int }{age: 1} + should.Equal(i, any.GetInterface()) + + any = Wrap(map[string]interface{}{"abc": 1}) + should.Equal(any.ValueType(), ObjectValue) + should.Equal(any.LastError(), nil) + i = map[string]interface{}{"abc": 1} + should.Equal(i, any.GetInterface()) + + any = Wrap("abc") + i = "abc" + should.Equal(i, any.GetInterface()) + should.Equal(nil, any.LastError()) + +} diff --git a/vendor/github.com/json-iterator/go/unmarshal_input_test.go b/vendor/github.com/json-iterator/go/unmarshal_input_test.go new file mode 100644 index 000000000..9d7b99c5f --- /dev/null +++ b/vendor/github.com/json-iterator/go/unmarshal_input_test.go @@ -0,0 +1,72 @@ +package jsoniter + +import ( + "encoding/json" + "reflect" + "testing" + + fuzz "github.com/google/gofuzz" +) + +func Test_NilInput(t *testing.T) { + var jb []byte // nil + var out string + err := Unmarshal(jb, &out) + if err == nil { + t.Errorf("Expected error") + } +} + +func Test_EmptyInput(t *testing.T) { + jb := []byte("") + var out string + err := Unmarshal(jb, &out) + if err == nil { + t.Errorf("Expected error") + } +} + +func Test_RandomInput_Bytes(t *testing.T) { + fz := fuzz.New().NilChance(0) + for i := 0; i < 10000; i++ { + var jb []byte + fz.Fuzz(&jb) + testRandomInput(t, jb) + } +} + +func Test_RandomInput_String(t *testing.T) { + fz := fuzz.New().NilChance(0) + for i := 0; i < 10000; i++ { + var js string + fz.Fuzz(&js) + jb := []byte(js) + testRandomInput(t, jb) + } +} + +func testRandomInput(t *testing.T, jb []byte) { + var outString string + testRandomInputTo(t, jb, &outString) + + var outInt int + testRandomInputTo(t, jb, &outInt) + + var outStruct struct{} + testRandomInputTo(t, jb, &outStruct) + + var outSlice []string + testRandomInputTo(t, jb, &outSlice) +} + +func testRandomInputTo(t *testing.T, jb []byte, out interface{}) { + err := Unmarshal(jb, out) + if err == nil { + // Cross-check stdlib to see if we just happened to fuzz a legit value. + err := json.Unmarshal(jb, out) + if err != nil { + t.Fatalf("Expected error unmarshaling as %s:\nas string: %q\nas bytes: %v", + reflect.TypeOf(out).Elem().Kind(), string(jb), jb) + } + } +} diff --git a/vendor/github.com/juju/ratelimit/ratelimit_test.go b/vendor/github.com/juju/ratelimit/ratelimit_test.go new file mode 100644 index 000000000..62d88ded0 --- /dev/null +++ b/vendor/github.com/juju/ratelimit/ratelimit_test.go @@ -0,0 +1,389 @@ +// Copyright 2014 Canonical Ltd. +// Licensed under the LGPLv3 with static-linking exception. +// See LICENCE file for details. + +package ratelimit + +import ( + "math" + "testing" + "time" + + gc "gopkg.in/check.v1" +) + +func TestPackage(t *testing.T) { + gc.TestingT(t) +} + +type rateLimitSuite struct{} + +var _ = gc.Suite(rateLimitSuite{}) + +type takeReq struct { + time time.Duration + count int64 + expectWait time.Duration +} + +var takeTests = []struct { + about string + fillInterval time.Duration + capacity int64 + reqs []takeReq +}{{ + about: "serial requests", + fillInterval: 250 * time.Millisecond, + capacity: 10, + reqs: []takeReq{{ + time: 0, + count: 0, + expectWait: 0, + }, { + time: 0, + count: 10, + expectWait: 0, + }, { + time: 0, + count: 1, + expectWait: 250 * time.Millisecond, + }, { + time: 250 * time.Millisecond, + count: 1, + expectWait: 250 * time.Millisecond, + }}, +}, { + about: "concurrent requests", + fillInterval: 250 * time.Millisecond, + capacity: 10, + reqs: []takeReq{{ + time: 0, + count: 10, + expectWait: 0, + }, { + time: 0, + count: 2, + expectWait: 500 * time.Millisecond, + }, { + time: 0, + count: 2, + expectWait: 1000 * time.Millisecond, + }, { + time: 0, + count: 1, + expectWait: 1250 * time.Millisecond, + }}, +}, { + about: "more than capacity", + fillInterval: 1 * time.Millisecond, + capacity: 10, + reqs: []takeReq{{ + time: 0, + count: 10, + expectWait: 0, + }, { + time: 20 * time.Millisecond, + count: 15, + expectWait: 5 * time.Millisecond, + }}, +}, { + about: "sub-quantum time", + fillInterval: 10 * time.Millisecond, + capacity: 10, + reqs: []takeReq{{ + time: 0, + count: 10, + expectWait: 0, + }, { + time: 7 * time.Millisecond, + count: 1, + expectWait: 3 * time.Millisecond, + }, { + time: 8 * time.Millisecond, + count: 1, + expectWait: 12 * time.Millisecond, + }}, +}, { + about: "within capacity", + fillInterval: 10 * time.Millisecond, + capacity: 5, + reqs: []takeReq{{ + time: 0, + count: 5, + expectWait: 0, + }, { + time: 60 * time.Millisecond, + count: 5, + expectWait: 0, + }, { + time: 60 * time.Millisecond, + count: 1, + expectWait: 10 * time.Millisecond, + }, { + time: 80 * time.Millisecond, + count: 2, + expectWait: 10 * time.Millisecond, + }}, +}} + +var availTests = []struct { + about string + capacity int64 + fillInterval time.Duration + take int64 + sleep time.Duration + + expectCountAfterTake int64 + expectCountAfterSleep int64 +}{{ + about: "should fill tokens after interval", + capacity: 5, + fillInterval: time.Second, + take: 5, + sleep: time.Second, + expectCountAfterTake: 0, + expectCountAfterSleep: 1, +}, { + about: "should fill tokens plus existing count", + capacity: 2, + fillInterval: time.Second, + take: 1, + sleep: time.Second, + expectCountAfterTake: 1, + expectCountAfterSleep: 2, +}, { + about: "shouldn't fill before interval", + capacity: 2, + fillInterval: 2 * time.Second, + take: 1, + sleep: time.Second, + expectCountAfterTake: 1, + expectCountAfterSleep: 1, +}, { + about: "should fill only once after 1*interval before 2*interval", + capacity: 2, + fillInterval: 2 * time.Second, + take: 1, + sleep: 3 * time.Second, + expectCountAfterTake: 1, + expectCountAfterSleep: 2, +}} + +func (rateLimitSuite) TestTake(c *gc.C) { + for i, test := range takeTests { + tb := NewBucket(test.fillInterval, test.capacity) + for j, req := range test.reqs { + d, ok := tb.take(tb.startTime.Add(req.time), req.count, infinityDuration) + c.Assert(ok, gc.Equals, true) + if d != req.expectWait { + c.Fatalf("test %d.%d, %s, got %v want %v", i, j, test.about, d, req.expectWait) + } + } + } +} + +func (rateLimitSuite) TestTakeMaxDuration(c *gc.C) { + for i, test := range takeTests { + tb := NewBucket(test.fillInterval, test.capacity) + for j, req := range test.reqs { + if req.expectWait > 0 { + d, ok := tb.take(tb.startTime.Add(req.time), req.count, req.expectWait-1) + c.Assert(ok, gc.Equals, false) + c.Assert(d, gc.Equals, time.Duration(0)) + } + d, ok := tb.take(tb.startTime.Add(req.time), req.count, req.expectWait) + c.Assert(ok, gc.Equals, true) + if d != req.expectWait { + c.Fatalf("test %d.%d, %s, got %v want %v", i, j, test.about, d, req.expectWait) + } + } + } +} + +type takeAvailableReq struct { + time time.Duration + count int64 + expect int64 +} + +var takeAvailableTests = []struct { + about string + fillInterval time.Duration + capacity int64 + reqs []takeAvailableReq +}{{ + about: "serial requests", + fillInterval: 250 * time.Millisecond, + capacity: 10, + reqs: []takeAvailableReq{{ + time: 0, + count: 0, + expect: 0, + }, { + time: 0, + count: 10, + expect: 10, + }, { + time: 0, + count: 1, + expect: 0, + }, { + time: 250 * time.Millisecond, + count: 1, + expect: 1, + }}, +}, { + about: "concurrent requests", + fillInterval: 250 * time.Millisecond, + capacity: 10, + reqs: []takeAvailableReq{{ + time: 0, + count: 5, + expect: 5, + }, { + time: 0, + count: 2, + expect: 2, + }, { + time: 0, + count: 5, + expect: 3, + }, { + time: 0, + count: 1, + expect: 0, + }}, +}, { + about: "more than capacity", + fillInterval: 1 * time.Millisecond, + capacity: 10, + reqs: []takeAvailableReq{{ + time: 0, + count: 10, + expect: 10, + }, { + time: 20 * time.Millisecond, + count: 15, + expect: 10, + }}, +}, { + about: "within capacity", + fillInterval: 10 * time.Millisecond, + capacity: 5, + reqs: []takeAvailableReq{{ + time: 0, + count: 5, + expect: 5, + }, { + time: 60 * time.Millisecond, + count: 5, + expect: 5, + }, { + time: 70 * time.Millisecond, + count: 1, + expect: 1, + }}, +}} + +func (rateLimitSuite) TestTakeAvailable(c *gc.C) { + for i, test := range takeAvailableTests { + tb := NewBucket(test.fillInterval, test.capacity) + for j, req := range test.reqs { + d := tb.takeAvailable(tb.startTime.Add(req.time), req.count) + if d != req.expect { + c.Fatalf("test %d.%d, %s, got %v want %v", i, j, test.about, d, req.expect) + } + } + } +} + +func (rateLimitSuite) TestPanics(c *gc.C) { + c.Assert(func() { NewBucket(0, 1) }, gc.PanicMatches, "token bucket fill interval is not > 0") + c.Assert(func() { NewBucket(-2, 1) }, gc.PanicMatches, "token bucket fill interval is not > 0") + c.Assert(func() { NewBucket(1, 0) }, gc.PanicMatches, "token bucket capacity is not > 0") + c.Assert(func() { NewBucket(1, -2) }, gc.PanicMatches, "token bucket capacity is not > 0") +} + +func isCloseTo(x, y, tolerance float64) bool { + return math.Abs(x-y)/y < tolerance +} + +func (rateLimitSuite) TestRate(c *gc.C) { + tb := NewBucket(1, 1) + if !isCloseTo(tb.Rate(), 1e9, 0.00001) { + c.Fatalf("got %v want 1e9", tb.Rate()) + } + tb = NewBucket(2*time.Second, 1) + if !isCloseTo(tb.Rate(), 0.5, 0.00001) { + c.Fatalf("got %v want 0.5", tb.Rate()) + } + tb = NewBucketWithQuantum(100*time.Millisecond, 1, 5) + if !isCloseTo(tb.Rate(), 50, 0.00001) { + c.Fatalf("got %v want 50", tb.Rate()) + } +} + +func checkRate(c *gc.C, rate float64) { + tb := NewBucketWithRate(rate, 1<<62) + if !isCloseTo(tb.Rate(), rate, rateMargin) { + c.Fatalf("got %g want %v", tb.Rate(), rate) + } + d, ok := tb.take(tb.startTime, 1<<62, infinityDuration) + c.Assert(ok, gc.Equals, true) + c.Assert(d, gc.Equals, time.Duration(0)) + + // Check that the actual rate is as expected by + // asking for a not-quite multiple of the bucket's + // quantum and checking that the wait time + // correct. + d, ok = tb.take(tb.startTime, tb.quantum*2-tb.quantum/2, infinityDuration) + c.Assert(ok, gc.Equals, true) + expectTime := 1e9 * float64(tb.quantum) * 2 / rate + if !isCloseTo(float64(d), expectTime, rateMargin) { + c.Fatalf("rate %g: got %g want %v", rate, float64(d), expectTime) + } +} + +func (rateLimitSuite) TestNewWithRate(c *gc.C) { + for rate := float64(1); rate < 1e6; rate += 7 { + checkRate(c, rate) + } + for _, rate := range []float64{ + 1024 * 1024 * 1024, + 1e-5, + 0.9e-5, + 0.5, + 0.9, + 0.9e8, + 3e12, + 4e18, + } { + checkRate(c, rate) + checkRate(c, rate/3) + checkRate(c, rate*1.3) + } +} + +func TestAvailable(t *testing.T) { + for i, tt := range availTests { + tb := NewBucket(tt.fillInterval, tt.capacity) + if c := tb.takeAvailable(tb.startTime, tt.take); c != tt.take { + t.Fatalf("#%d: %s, take = %d, want = %d", i, tt.about, c, tt.take) + } + if c := tb.available(tb.startTime); c != tt.expectCountAfterTake { + t.Fatalf("#%d: %s, after take, available = %d, want = %d", i, tt.about, c, tt.expectCountAfterTake) + } + if c := tb.available(tb.startTime.Add(tt.sleep)); c != tt.expectCountAfterSleep { + t.Fatalf("#%d: %s, after some time it should fill in new tokens, available = %d, want = %d", + i, tt.about, c, tt.expectCountAfterSleep) + } + } + +} + +func BenchmarkWait(b *testing.B) { + tb := NewBucket(1, 16*1024) + for i := b.N - 1; i >= 0; i-- { + tb.Wait(1) + } +} diff --git a/vendor/github.com/kr/pty/.gitignore b/vendor/github.com/kr/pty/.gitignore new file mode 100644 index 000000000..1f0a99f2f --- /dev/null +++ b/vendor/github.com/kr/pty/.gitignore @@ -0,0 +1,4 @@ +[568].out +_go* +_test* +_obj diff --git a/vendor/github.com/kr/pty/License b/vendor/github.com/kr/pty/License new file mode 100644 index 000000000..6b7558b6b --- /dev/null +++ b/vendor/github.com/kr/pty/License @@ -0,0 +1,23 @@ +Copyright (c) 2011 Keith Rarick + +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/vendor/github.com/kr/pty/README.md b/vendor/github.com/kr/pty/README.md new file mode 100644 index 000000000..7b7900c3a --- /dev/null +++ b/vendor/github.com/kr/pty/README.md @@ -0,0 +1,36 @@ +# pty + +Pty is a Go package for using unix pseudo-terminals. + +## Install + + go get github.com/kr/pty + +## Example + +```go +package main + +import ( + "github.com/kr/pty" + "io" + "os" + "os/exec" +) + +func main() { + c := exec.Command("grep", "--color=auto", "bar") + f, err := pty.Start(c) + if err != nil { + panic(err) + } + + go func() { + f.Write([]byte("foo\n")) + f.Write([]byte("bar\n")) + f.Write([]byte("baz\n")) + f.Write([]byte{4}) // EOT + }() + io.Copy(os.Stdout, f) +} +``` diff --git a/vendor/github.com/kr/pty/doc.go b/vendor/github.com/kr/pty/doc.go new file mode 100644 index 000000000..190cfbea9 --- /dev/null +++ b/vendor/github.com/kr/pty/doc.go @@ -0,0 +1,16 @@ +// Package pty provides functions for working with Unix terminals. +package pty + +import ( + "errors" + "os" +) + +// ErrUnsupported is returned if a function is not +// available on the current platform. +var ErrUnsupported = errors.New("unsupported") + +// Opens a pty and its corresponding tty. +func Open() (pty, tty *os.File, err error) { + return open() +} diff --git a/vendor/github.com/kr/pty/ioctl.go b/vendor/github.com/kr/pty/ioctl.go new file mode 100644 index 000000000..c57c19e7e --- /dev/null +++ b/vendor/github.com/kr/pty/ioctl.go @@ -0,0 +1,13 @@ +// +build !windows + +package pty + +import "syscall" + +func ioctl(fd, cmd, ptr uintptr) error { + _, _, e := syscall.Syscall(syscall.SYS_IOCTL, fd, cmd, ptr) + if e != 0 { + return e + } + return nil +} diff --git a/vendor/github.com/kr/pty/ioctl_bsd.go b/vendor/github.com/kr/pty/ioctl_bsd.go new file mode 100644 index 000000000..73b12c53c --- /dev/null +++ b/vendor/github.com/kr/pty/ioctl_bsd.go @@ -0,0 +1,39 @@ +// +build darwin dragonfly freebsd netbsd openbsd + +package pty + +// from +const ( + _IOC_VOID uintptr = 0x20000000 + _IOC_OUT uintptr = 0x40000000 + _IOC_IN uintptr = 0x80000000 + _IOC_IN_OUT uintptr = _IOC_OUT | _IOC_IN + _IOC_DIRMASK = _IOC_VOID | _IOC_OUT | _IOC_IN + + _IOC_PARAM_SHIFT = 13 + _IOC_PARAM_MASK = (1 << _IOC_PARAM_SHIFT) - 1 +) + +func _IOC_PARM_LEN(ioctl uintptr) uintptr { + return (ioctl >> 16) & _IOC_PARAM_MASK +} + +func _IOC(inout uintptr, group byte, ioctl_num uintptr, param_len uintptr) uintptr { + return inout | (param_len&_IOC_PARAM_MASK)<<16 | uintptr(group)<<8 | ioctl_num +} + +func _IO(group byte, ioctl_num uintptr) uintptr { + return _IOC(_IOC_VOID, group, ioctl_num, 0) +} + +func _IOR(group byte, ioctl_num uintptr, param_len uintptr) uintptr { + return _IOC(_IOC_OUT, group, ioctl_num, param_len) +} + +func _IOW(group byte, ioctl_num uintptr, param_len uintptr) uintptr { + return _IOC(_IOC_IN, group, ioctl_num, param_len) +} + +func _IOWR(group byte, ioctl_num uintptr, param_len uintptr) uintptr { + return _IOC(_IOC_IN_OUT, group, ioctl_num, param_len) +} diff --git a/vendor/github.com/kr/pty/mktypes.bash b/vendor/github.com/kr/pty/mktypes.bash new file mode 100755 index 000000000..0c076809b --- /dev/null +++ b/vendor/github.com/kr/pty/mktypes.bash @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +GOOSARCH="${GOOS}_${GOARCH}" +case "$GOOSARCH" in +_* | *_ | _) + echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2 + exit 1 + ;; +esac + +GODEFS="go tool cgo -godefs" + +$GODEFS types.go |gofmt > ztypes_$GOARCH.go + +case $GOOS in +freebsd|dragonfly) + $GODEFS types_$GOOS.go |gofmt > ztypes_$GOOSARCH.go + ;; +esac diff --git a/vendor/github.com/kr/pty/pty_darwin.go b/vendor/github.com/kr/pty/pty_darwin.go new file mode 100644 index 000000000..93415430d --- /dev/null +++ b/vendor/github.com/kr/pty/pty_darwin.go @@ -0,0 +1,61 @@ +package pty + +import ( + "errors" + "os" + "syscall" + "unsafe" +) + +func open() (pty, tty *os.File, err error) { + pFD, err := syscall.Open("/dev/ptmx", syscall.O_RDWR|syscall.O_CLOEXEC, 0) + if err != nil { + return nil, nil, err + } + p := os.NewFile(uintptr(pFD), "/dev/ptmx") + + sname, err := ptsname(p) + if err != nil { + return nil, nil, err + } + + err = grantpt(p) + if err != nil { + return nil, nil, err + } + + err = unlockpt(p) + if err != nil { + return nil, nil, err + } + + t, err := os.OpenFile(sname, os.O_RDWR, 0) + if err != nil { + return nil, nil, err + } + return p, t, nil +} + +func ptsname(f *os.File) (string, error) { + n := make([]byte, _IOC_PARM_LEN(syscall.TIOCPTYGNAME)) + + err := ioctl(f.Fd(), syscall.TIOCPTYGNAME, uintptr(unsafe.Pointer(&n[0]))) + if err != nil { + return "", err + } + + for i, c := range n { + if c == 0 { + return string(n[:i]), nil + } + } + return "", errors.New("TIOCPTYGNAME string not NUL-terminated") +} + +func grantpt(f *os.File) error { + return ioctl(f.Fd(), syscall.TIOCPTYGRANT, 0) +} + +func unlockpt(f *os.File) error { + return ioctl(f.Fd(), syscall.TIOCPTYUNLK, 0) +} diff --git a/vendor/github.com/kr/pty/pty_dragonfly.go b/vendor/github.com/kr/pty/pty_dragonfly.go new file mode 100644 index 000000000..5431fb5ae --- /dev/null +++ b/vendor/github.com/kr/pty/pty_dragonfly.go @@ -0,0 +1,76 @@ +package pty + +import ( + "errors" + "os" + "strings" + "syscall" + "unsafe" +) + +// same code as pty_darwin.go +func open() (pty, tty *os.File, err error) { + p, err := os.OpenFile("/dev/ptmx", os.O_RDWR, 0) + if err != nil { + return nil, nil, err + } + + sname, err := ptsname(p) + if err != nil { + return nil, nil, err + } + + err = grantpt(p) + if err != nil { + return nil, nil, err + } + + err = unlockpt(p) + if err != nil { + return nil, nil, err + } + + t, err := os.OpenFile(sname, os.O_RDWR, 0) + if err != nil { + return nil, nil, err + } + return p, t, nil +} + +func grantpt(f *os.File) error { + _, err := isptmaster(f.Fd()) + return err +} + +func unlockpt(f *os.File) error { + _, err := isptmaster(f.Fd()) + return err +} + +func isptmaster(fd uintptr) (bool, error) { + err := ioctl(fd, syscall.TIOCISPTMASTER, 0) + return err == nil, err +} + +var ( + emptyFiodgnameArg fiodgnameArg + ioctl_FIODNAME = _IOW('f', 120, unsafe.Sizeof(emptyFiodgnameArg)) +) + +func ptsname(f *os.File) (string, error) { + name := make([]byte, _C_SPECNAMELEN) + fa := fiodgnameArg{Name: (*byte)(unsafe.Pointer(&name[0])), Len: _C_SPECNAMELEN, Pad_cgo_0: [4]byte{0, 0, 0, 0}} + + err := ioctl(f.Fd(), ioctl_FIODNAME, uintptr(unsafe.Pointer(&fa))) + if err != nil { + return "", err + } + + for i, c := range name { + if c == 0 { + s := "/dev/" + string(name[:i]) + return strings.Replace(s, "ptm", "pts", -1), nil + } + } + return "", errors.New("TIOCPTYGNAME string not NUL-terminated") +} diff --git a/vendor/github.com/kr/pty/pty_freebsd.go b/vendor/github.com/kr/pty/pty_freebsd.go new file mode 100644 index 000000000..b341babd0 --- /dev/null +++ b/vendor/github.com/kr/pty/pty_freebsd.go @@ -0,0 +1,73 @@ +package pty + +import ( + "errors" + "os" + "syscall" + "unsafe" +) + +func posix_openpt(oflag int) (fd int, err error) { + r0, _, e1 := syscall.Syscall(syscall.SYS_POSIX_OPENPT, uintptr(oflag), 0, 0) + fd = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func open() (pty, tty *os.File, err error) { + fd, err := posix_openpt(syscall.O_RDWR | syscall.O_CLOEXEC) + if err != nil { + return nil, nil, err + } + + p := os.NewFile(uintptr(fd), "/dev/pts") + sname, err := ptsname(p) + if err != nil { + return nil, nil, err + } + + t, err := os.OpenFile("/dev/"+sname, os.O_RDWR, 0) + if err != nil { + return nil, nil, err + } + return p, t, nil +} + +func isptmaster(fd uintptr) (bool, error) { + err := ioctl(fd, syscall.TIOCPTMASTER, 0) + return err == nil, err +} + +var ( + emptyFiodgnameArg fiodgnameArg + ioctl_FIODGNAME = _IOW('f', 120, unsafe.Sizeof(emptyFiodgnameArg)) +) + +func ptsname(f *os.File) (string, error) { + master, err := isptmaster(f.Fd()) + if err != nil { + return "", err + } + if !master { + return "", syscall.EINVAL + } + + const n = _C_SPECNAMELEN + 1 + var ( + buf = make([]byte, n) + arg = fiodgnameArg{Len: n, Buf: (*byte)(unsafe.Pointer(&buf[0]))} + ) + err = ioctl(f.Fd(), ioctl_FIODGNAME, uintptr(unsafe.Pointer(&arg))) + if err != nil { + return "", err + } + + for i, c := range buf { + if c == 0 { + return string(buf[:i]), nil + } + } + return "", errors.New("FIODGNAME string not NUL-terminated") +} diff --git a/vendor/github.com/kr/pty/pty_linux.go b/vendor/github.com/kr/pty/pty_linux.go new file mode 100644 index 000000000..cb901a21e --- /dev/null +++ b/vendor/github.com/kr/pty/pty_linux.go @@ -0,0 +1,46 @@ +package pty + +import ( + "os" + "strconv" + "syscall" + "unsafe" +) + +func open() (pty, tty *os.File, err error) { + p, err := os.OpenFile("/dev/ptmx", os.O_RDWR, 0) + if err != nil { + return nil, nil, err + } + + sname, err := ptsname(p) + if err != nil { + return nil, nil, err + } + + err = unlockpt(p) + if err != nil { + return nil, nil, err + } + + t, err := os.OpenFile(sname, os.O_RDWR|syscall.O_NOCTTY, 0) + if err != nil { + return nil, nil, err + } + return p, t, nil +} + +func ptsname(f *os.File) (string, error) { + var n _C_uint + err := ioctl(f.Fd(), syscall.TIOCGPTN, uintptr(unsafe.Pointer(&n))) + if err != nil { + return "", err + } + return "/dev/pts/" + strconv.Itoa(int(n)), nil +} + +func unlockpt(f *os.File) error { + var u _C_int + // use TIOCSPTLCK with a zero valued arg to clear the slave pty lock + return ioctl(f.Fd(), syscall.TIOCSPTLCK, uintptr(unsafe.Pointer(&u))) +} diff --git a/vendor/github.com/kr/pty/pty_unsupported.go b/vendor/github.com/kr/pty/pty_unsupported.go new file mode 100644 index 000000000..bd3d1e7e0 --- /dev/null +++ b/vendor/github.com/kr/pty/pty_unsupported.go @@ -0,0 +1,11 @@ +// +build !linux,!darwin,!freebsd,!dragonfly + +package pty + +import ( + "os" +) + +func open() (pty, tty *os.File, err error) { + return nil, nil, ErrUnsupported +} diff --git a/vendor/github.com/kr/pty/run.go b/vendor/github.com/kr/pty/run.go new file mode 100644 index 000000000..baecca8af --- /dev/null +++ b/vendor/github.com/kr/pty/run.go @@ -0,0 +1,34 @@ +// +build !windows + +package pty + +import ( + "os" + "os/exec" + "syscall" +) + +// Start assigns a pseudo-terminal tty os.File to c.Stdin, c.Stdout, +// and c.Stderr, calls c.Start, and returns the File of the tty's +// corresponding pty. +func Start(c *exec.Cmd) (pty *os.File, err error) { + pty, tty, err := Open() + if err != nil { + return nil, err + } + defer tty.Close() + c.Stdout = tty + c.Stdin = tty + c.Stderr = tty + if c.SysProcAttr == nil { + c.SysProcAttr = &syscall.SysProcAttr{} + } + c.SysProcAttr.Setctty = true + c.SysProcAttr.Setsid = true + err = c.Start() + if err != nil { + pty.Close() + return nil, err + } + return pty, err +} diff --git a/vendor/github.com/kr/pty/types.go b/vendor/github.com/kr/pty/types.go new file mode 100644 index 000000000..5aecb6bcd --- /dev/null +++ b/vendor/github.com/kr/pty/types.go @@ -0,0 +1,10 @@ +// +build ignore + +package pty + +import "C" + +type ( + _C_int C.int + _C_uint C.uint +) diff --git a/vendor/github.com/kr/pty/types_dragonfly.go b/vendor/github.com/kr/pty/types_dragonfly.go new file mode 100644 index 000000000..5c0493b85 --- /dev/null +++ b/vendor/github.com/kr/pty/types_dragonfly.go @@ -0,0 +1,17 @@ +// +build ignore + +package pty + +/* +#define _KERNEL +#include +#include +#include +*/ +import "C" + +const ( + _C_SPECNAMELEN = C.SPECNAMELEN /* max length of devicename */ +) + +type fiodgnameArg C.struct_fiodname_args diff --git a/vendor/github.com/kr/pty/types_freebsd.go b/vendor/github.com/kr/pty/types_freebsd.go new file mode 100644 index 000000000..ce3eb9518 --- /dev/null +++ b/vendor/github.com/kr/pty/types_freebsd.go @@ -0,0 +1,15 @@ +// +build ignore + +package pty + +/* +#include +#include +*/ +import "C" + +const ( + _C_SPECNAMELEN = C.SPECNAMELEN /* max length of devicename */ +) + +type fiodgnameArg C.struct_fiodgname_arg diff --git a/vendor/github.com/kr/pty/util.go b/vendor/github.com/kr/pty/util.go new file mode 100644 index 000000000..a4fab9a7c --- /dev/null +++ b/vendor/github.com/kr/pty/util.go @@ -0,0 +1,37 @@ +// +build !windows + +package pty + +import ( + "os" + "syscall" + "unsafe" +) + +// Getsize returns the number of rows (lines) and cols (positions +// in each line) in terminal t. +func Getsize(t *os.File) (rows, cols int, err error) { + var ws winsize + err = windowrect(&ws, t.Fd()) + return int(ws.ws_row), int(ws.ws_col), err +} + +type winsize struct { + ws_row uint16 + ws_col uint16 + ws_xpixel uint16 + ws_ypixel uint16 +} + +func windowrect(ws *winsize, fd uintptr) error { + _, _, errno := syscall.Syscall( + syscall.SYS_IOCTL, + fd, + syscall.TIOCGWINSZ, + uintptr(unsafe.Pointer(ws)), + ) + if errno != 0 { + return syscall.Errno(errno) + } + return nil +} diff --git a/vendor/github.com/kr/pty/ztypes_386.go b/vendor/github.com/kr/pty/ztypes_386.go new file mode 100644 index 000000000..ff0b8fd83 --- /dev/null +++ b/vendor/github.com/kr/pty/ztypes_386.go @@ -0,0 +1,9 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types.go + +package pty + +type ( + _C_int int32 + _C_uint uint32 +) diff --git a/vendor/github.com/kr/pty/ztypes_amd64.go b/vendor/github.com/kr/pty/ztypes_amd64.go new file mode 100644 index 000000000..ff0b8fd83 --- /dev/null +++ b/vendor/github.com/kr/pty/ztypes_amd64.go @@ -0,0 +1,9 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types.go + +package pty + +type ( + _C_int int32 + _C_uint uint32 +) diff --git a/vendor/github.com/kr/pty/ztypes_arm.go b/vendor/github.com/kr/pty/ztypes_arm.go new file mode 100644 index 000000000..ff0b8fd83 --- /dev/null +++ b/vendor/github.com/kr/pty/ztypes_arm.go @@ -0,0 +1,9 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types.go + +package pty + +type ( + _C_int int32 + _C_uint uint32 +) diff --git a/vendor/github.com/kr/pty/ztypes_arm64.go b/vendor/github.com/kr/pty/ztypes_arm64.go new file mode 100644 index 000000000..6c29a4b91 --- /dev/null +++ b/vendor/github.com/kr/pty/ztypes_arm64.go @@ -0,0 +1,11 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types.go + +// +build arm64 + +package pty + +type ( + _C_int int32 + _C_uint uint32 +) diff --git a/vendor/github.com/kr/pty/ztypes_dragonfly_amd64.go b/vendor/github.com/kr/pty/ztypes_dragonfly_amd64.go new file mode 100644 index 000000000..6b0ba037f --- /dev/null +++ b/vendor/github.com/kr/pty/ztypes_dragonfly_amd64.go @@ -0,0 +1,14 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_dragonfly.go + +package pty + +const ( + _C_SPECNAMELEN = 0x3f +) + +type fiodgnameArg struct { + Name *byte + Len uint32 + Pad_cgo_0 [4]byte +} diff --git a/vendor/github.com/kr/pty/ztypes_freebsd_386.go b/vendor/github.com/kr/pty/ztypes_freebsd_386.go new file mode 100644 index 000000000..d9975374e --- /dev/null +++ b/vendor/github.com/kr/pty/ztypes_freebsd_386.go @@ -0,0 +1,13 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_freebsd.go + +package pty + +const ( + _C_SPECNAMELEN = 0x3f +) + +type fiodgnameArg struct { + Len int32 + Buf *byte +} diff --git a/vendor/github.com/kr/pty/ztypes_freebsd_amd64.go b/vendor/github.com/kr/pty/ztypes_freebsd_amd64.go new file mode 100644 index 000000000..5fa102fcd --- /dev/null +++ b/vendor/github.com/kr/pty/ztypes_freebsd_amd64.go @@ -0,0 +1,14 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_freebsd.go + +package pty + +const ( + _C_SPECNAMELEN = 0x3f +) + +type fiodgnameArg struct { + Len int32 + Pad_cgo_0 [4]byte + Buf *byte +} diff --git a/vendor/github.com/kr/pty/ztypes_freebsd_arm.go b/vendor/github.com/kr/pty/ztypes_freebsd_arm.go new file mode 100644 index 000000000..d9975374e --- /dev/null +++ b/vendor/github.com/kr/pty/ztypes_freebsd_arm.go @@ -0,0 +1,13 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_freebsd.go + +package pty + +const ( + _C_SPECNAMELEN = 0x3f +) + +type fiodgnameArg struct { + Len int32 + Buf *byte +} diff --git a/vendor/github.com/kr/pty/ztypes_mipsx.go b/vendor/github.com/kr/pty/ztypes_mipsx.go new file mode 100644 index 000000000..f0ce74086 --- /dev/null +++ b/vendor/github.com/kr/pty/ztypes_mipsx.go @@ -0,0 +1,12 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types.go + +// +build linux +// +build mips mipsle mips64 mips64le + +package pty + +type ( + _C_int int32 + _C_uint uint32 +) diff --git a/vendor/github.com/kr/pty/ztypes_ppc64.go b/vendor/github.com/kr/pty/ztypes_ppc64.go new file mode 100644 index 000000000..4e1af8431 --- /dev/null +++ b/vendor/github.com/kr/pty/ztypes_ppc64.go @@ -0,0 +1,11 @@ +// +build ppc64 + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types.go + +package pty + +type ( + _C_int int32 + _C_uint uint32 +) diff --git a/vendor/github.com/kr/pty/ztypes_ppc64le.go b/vendor/github.com/kr/pty/ztypes_ppc64le.go new file mode 100644 index 000000000..e6780f4e2 --- /dev/null +++ b/vendor/github.com/kr/pty/ztypes_ppc64le.go @@ -0,0 +1,11 @@ +// +build ppc64le + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types.go + +package pty + +type ( + _C_int int32 + _C_uint uint32 +) diff --git a/vendor/github.com/kr/pty/ztypes_s390x.go b/vendor/github.com/kr/pty/ztypes_s390x.go new file mode 100644 index 000000000..a7452b61c --- /dev/null +++ b/vendor/github.com/kr/pty/ztypes_s390x.go @@ -0,0 +1,11 @@ +// +build s390x + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types.go + +package pty + +type ( + _C_int int32 + _C_uint uint32 +) diff --git a/vendor/github.com/gorilla/websocket/.travis.yml b/vendor/github.com/kylelemons/godebug/.travis.yml similarity index 61% rename from vendor/github.com/gorilla/websocket/.travis.yml rename to vendor/github.com/kylelemons/godebug/.travis.yml index 8687342e9..d2b67f69c 100644 --- a/vendor/github.com/gorilla/websocket/.travis.yml +++ b/vendor/github.com/kylelemons/godebug/.travis.yml @@ -1,6 +1,6 @@ language: go go: - - 1.1 - - 1.2 + - 1.7 + - 1.8 - tip diff --git a/vendor/github.com/kylelemons/godebug/README.md b/vendor/github.com/kylelemons/godebug/README.md new file mode 100644 index 000000000..dc5ec731f --- /dev/null +++ b/vendor/github.com/kylelemons/godebug/README.md @@ -0,0 +1,64 @@ +Pretty Printing for Go +====================== + +[![godebug build status][ciimg]][ci] + +Have you ever wanted to get a pretty-printed version of a Go data structure, +complete with indentation? I have found this especially useful in unit tests +and in debugging my code, and thus godebug was born! + +[ciimg]: https://travis-ci.org/kylelemons/godebug.svg?branch=master +[ci]: https://travis-ci.org/kylelemons/godebug + +Quick Examples +-------------- + +By default, pretty will write out a very compact representation of a data structure. +From the [Print example][printex]: + +``` +{Name: "Spaceship Heart of Gold", + Crew: {Arthur Dent: "Along for the Ride", + Ford Prefect: "A Hoopy Frood", + Trillian: "Human", + Zaphod Beeblebrox: "Galactic President"}, + Androids: 1, + Stolen: true} +``` + +It can also produce a much more verbose, one-item-per-line representation suitable for +[computing diffs][diffex]. See the documentation for more examples and customization. + +[printex]: https://godoc.org/github.com/kylelemons/godebug/pretty#example-Print +[diffex]: https://godoc.org/github.com/kylelemons/godebug/pretty#example-Compare + +Documentation +------------- + +Documentation for this package is available at [godoc.org][doc]: + + * Pretty: [![godoc for godebug/pretty][prettyimg]][prettydoc] + * Diff: [![godoc for godebug/diff][diffimg]][diffdoc] + +[doc]: https://godoc.org/ +[prettyimg]: https://godoc.org/github.com/kylelemons/godebug/pretty?status.png +[prettydoc]: https://godoc.org/github.com/kylelemons/godebug/pretty +[diffimg]: https://godoc.org/github.com/kylelemons/godebug/diff?status.png +[diffdoc]: https://godoc.org/github.com/kylelemons/godebug/diff + +Installation +------------ + +These packages are available via `go get`: + +```bash +$ go get -u github.com/kylelemons/godebug/{pretty,diff} +``` + +Other Packages +-------------- + +If `godebug/pretty` is not granular enough, I highly recommend +checking out [go-spew][spew]. + +[spew]: http://godoc.org/github.com/davecgh/go-spew/spew diff --git a/vendor/github.com/kylelemons/godebug/diff/diff_test.go b/vendor/github.com/kylelemons/godebug/diff/diff_test.go new file mode 100644 index 000000000..1426eceb8 --- /dev/null +++ b/vendor/github.com/kylelemons/godebug/diff/diff_test.go @@ -0,0 +1,166 @@ +// Copyright 2013 Google Inc. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package diff + +import ( + "fmt" + "reflect" + "strings" + "testing" +) + +func TestDiff(t *testing.T) { + tests := []struct { + desc string + A, B []string + chunks []Chunk + }{ + { + desc: "nil", + }, + { + desc: "empty", + A: []string{}, + B: []string{}, + }, + { + desc: "same", + A: []string{"foo"}, + B: []string{"foo"}, + }, + { + desc: "a empty", + A: []string{}, + }, + { + desc: "b empty", + B: []string{}, + }, + { + desc: "b nil", + A: []string{"foo"}, + chunks: []Chunk{ + 0: {Deleted: []string{"foo"}}, + }, + }, + { + desc: "a nil", + B: []string{"foo"}, + chunks: []Chunk{ + 0: {Added: []string{"foo"}}, + }, + }, + { + desc: "start with change", + A: []string{"a", "b", "c"}, + B: []string{"A", "b", "c"}, + chunks: []Chunk{ + 0: {Deleted: []string{"a"}}, + 1: {Added: []string{"A"}, Equal: []string{"b", "c"}}, + }, + }, + { + desc: "constitution", + A: []string{ + "We the People of the United States, in Order to form a more perfect Union,", + "establish Justice, insure domestic Tranquility, provide for the common defence,", + "and secure the Blessings of Liberty to ourselves", + "and our Posterity, do ordain and establish this Constitution for the United", + "States of America.", + }, + B: []string{ + "We the People of the United States, in Order to form a more perfect Union,", + "establish Justice, insure domestic Tranquility, provide for the common defence,", + "promote the general Welfare, and secure the Blessings of Liberty to ourselves", + "and our Posterity, do ordain and establish this Constitution for the United", + "States of America.", + }, + chunks: []Chunk{ + 0: { + Equal: []string{ + "We the People of the United States, in Order to form a more perfect Union,", + "establish Justice, insure domestic Tranquility, provide for the common defence,", + }, + }, + 1: { + Deleted: []string{ + "and secure the Blessings of Liberty to ourselves", + }, + }, + 2: { + Added: []string{ + "promote the general Welfare, and secure the Blessings of Liberty to ourselves", + }, + Equal: []string{ + "and our Posterity, do ordain and establish this Constitution for the United", + "States of America.", + }, + }, + }, + }, + } + + for _, test := range tests { + t.Run(test.desc, func(t *testing.T) { + got := DiffChunks(test.A, test.B) + if got, want := len(got), len(test.chunks); got != want { + t.Errorf("edit distance = %v, want %v", got-1, want-1) + return + } + for i := range got { + got, want := got[i], test.chunks[i] + if got, want := got.Added, want.Added; !reflect.DeepEqual(got, want) { + t.Errorf("chunks[%d]: Added = %v, want %v", i, got, want) + } + if got, want := got.Deleted, want.Deleted; !reflect.DeepEqual(got, want) { + t.Errorf("chunks[%d]: Deleted = %v, want %v", i, got, want) + } + if got, want := got.Equal, want.Equal; !reflect.DeepEqual(got, want) { + t.Errorf("chunks[%d]: Equal = %v, want %v", i, got, want) + } + } + }) + } +} + +func ExampleDiff() { + constitution := strings.TrimSpace(` +We the People of the United States, in Order to form a more perfect Union, +establish Justice, insure domestic Tranquility, provide for the common defence, +promote the general Welfare, and secure the Blessings of Liberty to ourselves +and our Posterity, do ordain and establish this Constitution for the United +States of America. +`) + + got := strings.TrimSpace(` +:wq +We the People of the United States, in Order to form a more perfect Union, +establish Justice, insure domestic Tranquility, provide for the common defence, +and secure the Blessings of Liberty to ourselves +and our Posterity, do ordain and establish this Constitution for the United +States of America. +`) + + fmt.Println(Diff(got, constitution)) + + // Output: + // -:wq + // We the People of the United States, in Order to form a more perfect Union, + // establish Justice, insure domestic Tranquility, provide for the common defence, + // -and secure the Blessings of Liberty to ourselves + // +promote the general Welfare, and secure the Blessings of Liberty to ourselves + // and our Posterity, do ordain and establish this Constitution for the United + // States of America. +} diff --git a/vendor/github.com/kylelemons/godebug/pretty/examples_test.go b/vendor/github.com/kylelemons/godebug/pretty/examples_test.go new file mode 100644 index 000000000..df3b32e07 --- /dev/null +++ b/vendor/github.com/kylelemons/godebug/pretty/examples_test.go @@ -0,0 +1,310 @@ +// Copyright 2013 Google Inc. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pretty_test + +import ( + "fmt" + "net" + "reflect" + + "github.com/kylelemons/godebug/pretty" +) + +func ExampleConfig_Sprint() { + type Pair [2]int + type Map struct { + Name string + Players map[string]Pair + Obstacles map[Pair]string + } + + m := Map{ + Name: "Rock Creek", + Players: map[string]Pair{ + "player1": {1, 3}, + "player2": {0, -1}, + }, + Obstacles: map[Pair]string{ + Pair{0, 0}: "rock", + Pair{2, 1}: "pond", + Pair{1, 1}: "stream", + Pair{0, 1}: "stream", + }, + } + + // Specific output formats + compact := &pretty.Config{ + Compact: true, + } + diffable := &pretty.Config{ + Diffable: true, + } + + // Print out a summary + fmt.Printf("Players: %s\n", compact.Sprint(m.Players)) + + // Print diffable output + fmt.Printf("Map State:\n%s", diffable.Sprint(m)) + + // Output: + // Players: {player1:[1,3],player2:[0,-1]} + // Map State: + // { + // Name: "Rock Creek", + // Players: { + // player1: [ + // 1, + // 3, + // ], + // player2: [ + // 0, + // -1, + // ], + // }, + // Obstacles: { + // [0,0]: "rock", + // [0,1]: "stream", + // [1,1]: "stream", + // [2,1]: "pond", + // }, + // } +} + +func ExampleConfig_fmtFormatter() { + pretty.DefaultFormatter[reflect.TypeOf(&net.IPNet{})] = fmt.Sprint + pretty.DefaultFormatter[reflect.TypeOf(net.HardwareAddr{})] = fmt.Sprint + pretty.Print(&net.IPNet{ + IP: net.IPv4(192, 168, 1, 100), + Mask: net.CIDRMask(24, 32), + }) + pretty.Print(net.HardwareAddr{1, 2, 3, 4, 5, 6}) + + // Output: + // 192.168.1.100/24 + // 01:02:03:04:05:06 +} + +func ExampleConfig_customFormatter() { + pretty.DefaultFormatter[reflect.TypeOf(&net.IPNet{})] = func(n *net.IPNet) string { + return fmt.Sprintf("CIDR=%s", n) + } + pretty.Print(&net.IPNet{ + IP: net.IPv4(192, 168, 1, 100), + Mask: net.CIDRMask(24, 32), + }) + + // Output: + // CIDR=192.168.1.100/24 +} + +func ExamplePrint() { + type ShipManifest struct { + Name string + Crew map[string]string + Androids int + Stolen bool + } + + manifest := &ShipManifest{ + Name: "Spaceship Heart of Gold", + Crew: map[string]string{ + "Zaphod Beeblebrox": "Galactic President", + "Trillian": "Human", + "Ford Prefect": "A Hoopy Frood", + "Arthur Dent": "Along for the Ride", + }, + Androids: 1, + Stolen: true, + } + + pretty.Print(manifest) + + // Output: + // {Name: "Spaceship Heart of Gold", + // Crew: {Arthur Dent: "Along for the Ride", + // Ford Prefect: "A Hoopy Frood", + // Trillian: "Human", + // Zaphod Beeblebrox: "Galactic President"}, + // Androids: 1, + // Stolen: true} +} + +var t = struct { + Errorf func(string, ...interface{}) +}{ + Errorf: func(format string, args ...interface{}) { + fmt.Println(fmt.Sprintf(format, args...) + "\n") + }, +} + +func ExampleCompare_testing() { + // Code under test: + + type ShipManifest struct { + Name string + Crew map[string]string + Androids int + Stolen bool + } + + // AddCrew tries to add the given crewmember to the manifest. + AddCrew := func(m *ShipManifest, name, title string) { + if m.Crew == nil { + m.Crew = make(map[string]string) + } + m.Crew[title] = name + } + + // Test function: + tests := []struct { + desc string + before *ShipManifest + name, title string + after *ShipManifest + }{ + { + desc: "add first", + before: &ShipManifest{}, + name: "Zaphod Beeblebrox", + title: "Galactic President", + after: &ShipManifest{ + Crew: map[string]string{ + "Zaphod Beeblebrox": "Galactic President", + }, + }, + }, + { + desc: "add another", + before: &ShipManifest{ + Crew: map[string]string{ + "Zaphod Beeblebrox": "Galactic President", + }, + }, + name: "Trillian", + title: "Human", + after: &ShipManifest{ + Crew: map[string]string{ + "Zaphod Beeblebrox": "Galactic President", + "Trillian": "Human", + }, + }, + }, + { + desc: "overwrite", + before: &ShipManifest{ + Crew: map[string]string{ + "Zaphod Beeblebrox": "Galactic President", + }, + }, + name: "Zaphod Beeblebrox", + title: "Just this guy, you know?", + after: &ShipManifest{ + Crew: map[string]string{ + "Zaphod Beeblebrox": "Just this guy, you know?", + }, + }, + }, + } + + for _, test := range tests { + AddCrew(test.before, test.name, test.title) + if diff := pretty.Compare(test.before, test.after); diff != "" { + t.Errorf("%s: post-AddCrew diff: (-got +want)\n%s", test.desc, diff) + } + } + + // Output: + // add first: post-AddCrew diff: (-got +want) + // { + // Name: "", + // Crew: { + // - Galactic President: "Zaphod Beeblebrox", + // + Zaphod Beeblebrox: "Galactic President", + // }, + // Androids: 0, + // Stolen: false, + // } + // + // add another: post-AddCrew diff: (-got +want) + // { + // Name: "", + // Crew: { + // - Human: "Trillian", + // + Trillian: "Human", + // Zaphod Beeblebrox: "Galactic President", + // }, + // Androids: 0, + // Stolen: false, + // } + // + // overwrite: post-AddCrew diff: (-got +want) + // { + // Name: "", + // Crew: { + // - Just this guy, you know?: "Zaphod Beeblebrox", + // - Zaphod Beeblebrox: "Galactic President", + // + Zaphod Beeblebrox: "Just this guy, you know?", + // }, + // Androids: 0, + // Stolen: false, + // } +} + +func ExampleCompare_debugging() { + type ShipManifest struct { + Name string + Crew map[string]string + Androids int + Stolen bool + } + + reported := &ShipManifest{ + Name: "Spaceship Heart of Gold", + Crew: map[string]string{ + "Zaphod Beeblebrox": "Galactic President", + "Trillian": "Human", + "Ford Prefect": "A Hoopy Frood", + "Arthur Dent": "Along for the Ride", + }, + Androids: 1, + Stolen: true, + } + + expected := &ShipManifest{ + Name: "Spaceship Heart of Gold", + Crew: map[string]string{ + "Trillian": "Human", + "Rowan Artosok": "Captain", + }, + Androids: 1, + Stolen: false, + } + + fmt.Println(pretty.Compare(reported, expected)) + // Output: + // { + // Name: "Spaceship Heart of Gold", + // Crew: { + // - Arthur Dent: "Along for the Ride", + // - Ford Prefect: "A Hoopy Frood", + // + Rowan Artosok: "Captain", + // Trillian: "Human", + // - Zaphod Beeblebrox: "Galactic President", + // }, + // Androids: 1, + // - Stolen: true, + // + Stolen: false, + // } +} diff --git a/vendor/github.com/kylelemons/godebug/pretty/public.go b/vendor/github.com/kylelemons/godebug/pretty/public.go index 4cae68cad..948691abf 100644 --- a/vendor/github.com/kylelemons/godebug/pretty/public.go +++ b/vendor/github.com/kylelemons/godebug/pretty/public.go @@ -134,19 +134,20 @@ func (cfg *Config) Fprint(w io.Writer, vals ...interface{}) (n int64, err error) } // Compare returns a string containing a line-by-line unified diff of the -// values in got and want, using the CompareConfig. +// values in a and b, using the CompareConfig. // -// Each line in the output is prefixed with '+', '-', or ' ' to indicate if it -// should be added to, removed from, or is correct for the "got" value with -// respect to the "want" value. -func Compare(got, want interface{}) string { - return CompareConfig.Compare(got, want) +// Each line in the output is prefixed with '+', '-', or ' ' to indicate which +// side it's from. Lines from the a side are marked with '-', lines from the +// b side are marked with '+' and lines that are the same on both sides are +// marked with ' '. +func Compare(a, b interface{}) string { + return CompareConfig.Compare(a, b) } // Compare returns a string containing a line-by-line unified diff of the // values in got and want according to the cfg. -func (cfg *Config) Compare(got, want interface{}) string { +func (cfg *Config) Compare(a, b interface{}) string { diffCfg := *cfg diffCfg.Diffable = true - return diff.Diff(cfg.Sprint(got), cfg.Sprint(want)) + return diff.Diff(cfg.Sprint(a), cfg.Sprint(b)) } diff --git a/vendor/github.com/kylelemons/godebug/pretty/public_test.go b/vendor/github.com/kylelemons/godebug/pretty/public_test.go new file mode 100644 index 000000000..01fd3ffe3 --- /dev/null +++ b/vendor/github.com/kylelemons/godebug/pretty/public_test.go @@ -0,0 +1,128 @@ +// Copyright 2013 Google Inc. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pretty + +import ( + "testing" +) + +func TestDiff(t *testing.T) { + type example struct { + Name string + Age int + Friends []string + } + + tests := []struct { + desc string + got, want interface{} + diff string + }{ + { + desc: "basic struct", + got: example{ + Name: "Zaphd", + Age: 42, + Friends: []string{ + "Ford Prefect", + "Trillian", + "Marvin", + }, + }, + want: example{ + Name: "Zaphod", + Age: 42, + Friends: []string{ + "Ford Prefect", + "Trillian", + }, + }, + diff: ` { +- Name: "Zaphd", ++ Name: "Zaphod", + Age: 42, + Friends: [ + "Ford Prefect", + "Trillian", +- "Marvin", + ], + }`, + }, + } + + for _, test := range tests { + if got, want := Compare(test.got, test.want), test.diff; got != want { + t.Errorf("%s:", test.desc) + t.Errorf(" got: %q", got) + t.Errorf(" want: %q", want) + } + } +} + +func TestSkipZeroFields(t *testing.T) { + type example struct { + Name string + Species string + Age int + Friends []string + } + + tests := []struct { + desc string + got, want interface{} + diff string + }{ + { + desc: "basic struct", + got: example{ + Name: "Zaphd", + Species: "Betelgeusian", + Age: 42, + }, + want: example{ + Name: "Zaphod", + Species: "Betelgeusian", + Age: 42, + Friends: []string{ + "Ford Prefect", + "Trillian", + "", + }, + }, + diff: ` { +- Name: "Zaphd", ++ Name: "Zaphod", + Species: "Betelgeusian", + Age: 42, ++ Friends: [ ++ "Ford Prefect", ++ "Trillian", ++ "", ++ ], + }`, + }, + } + + cfg := *CompareConfig + cfg.SkipZeroFields = true + + for _, test := range tests { + if got, want := cfg.Compare(test.got, test.want), test.diff; got != want { + t.Errorf("%s:", test.desc) + t.Errorf(" got: %q", got) + t.Errorf(" want: %q", want) + } + } +} diff --git a/vendor/github.com/kylelemons/godebug/pretty/reflect_test.go b/vendor/github.com/kylelemons/godebug/pretty/reflect_test.go new file mode 100644 index 000000000..ef5008ec6 --- /dev/null +++ b/vendor/github.com/kylelemons/godebug/pretty/reflect_test.go @@ -0,0 +1,236 @@ +// Copyright 2013 Google Inc. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pretty + +import ( + "fmt" + "net" + "reflect" + "testing" + "time" +) + +func TestVal2nodeDefault(t *testing.T) { + err := fmt.Errorf("err") + var errNil error + + tests := []struct { + desc string + raw interface{} + want node + }{ + { + desc: "nil", + raw: nil, + want: rawVal("nil"), + }, + { + desc: "nil ptr", + raw: (*int)(nil), + want: rawVal("nil"), + }, + { + desc: "nil slice", + raw: []string(nil), + want: list{}, + }, + { + desc: "nil map", + raw: map[string]string(nil), + want: keyvals{}, + }, + { + desc: "string", + raw: "zaphod", + want: stringVal("zaphod"), + }, + { + desc: "slice", + raw: []string{"a", "b"}, + want: list{stringVal("a"), stringVal("b")}, + }, + { + desc: "map", + raw: map[string]string{ + "zaphod": "beeblebrox", + "ford": "prefect", + }, + want: keyvals{ + {"ford", stringVal("prefect")}, + {"zaphod", stringVal("beeblebrox")}, + }, + }, + { + desc: "map of [2]int", + raw: map[[2]int]string{ + [2]int{-1, 2}: "school", + [2]int{0, 0}: "origin", + [2]int{1, 3}: "home", + }, + want: keyvals{ + {"[-1,2]", stringVal("school")}, + {"[0,0]", stringVal("origin")}, + {"[1,3]", stringVal("home")}, + }, + }, + { + desc: "struct", + raw: struct{ Zaphod, Ford string }{"beeblebrox", "prefect"}, + want: keyvals{ + {"Zaphod", stringVal("beeblebrox")}, + {"Ford", stringVal("prefect")}, + }, + }, + { + desc: "int", + raw: 3, + want: rawVal("3"), + }, + { + desc: "time.Time", + raw: time.Unix(1257894000, 0).UTC(), + want: rawVal("2009-11-10 23:00:00 +0000 UTC"), + }, + { + desc: "net.IP", + raw: net.IPv4(127, 0, 0, 1), + want: rawVal("127.0.0.1"), + }, + { + desc: "error", + raw: &err, + want: rawVal("err"), + }, + { + desc: "nil error", + raw: &errNil, + want: rawVal(""), + }, + } + + for _, test := range tests { + if got, want := DefaultConfig.val2node(reflect.ValueOf(test.raw)), test.want; !reflect.DeepEqual(got, want) { + t.Errorf("%s: got %#v, want %#v", test.desc, got, want) + } + } +} + +func TestVal2node(t *testing.T) { + tests := []struct { + desc string + raw interface{} + cfg *Config + want node + }{ + { + desc: "struct default", + raw: struct{ Zaphod, Ford, foo string }{"beeblebrox", "prefect", "BAD"}, + cfg: DefaultConfig, + want: keyvals{ + {"Zaphod", stringVal("beeblebrox")}, + {"Ford", stringVal("prefect")}, + }, + }, + { + desc: "struct w/ IncludeUnexported", + raw: struct{ Zaphod, Ford, foo string }{"beeblebrox", "prefect", "GOOD"}, + cfg: &Config{ + IncludeUnexported: true, + }, + want: keyvals{ + {"Zaphod", stringVal("beeblebrox")}, + {"Ford", stringVal("prefect")}, + {"foo", stringVal("GOOD")}, + }, + }, + { + desc: "time default", + raw: struct{ Date time.Time }{time.Unix(1234567890, 0).UTC()}, + cfg: DefaultConfig, + want: keyvals{ + {"Date", rawVal("2009-02-13 23:31:30 +0000 UTC")}, + }, + }, + { + desc: "time w/ nil Formatter", + raw: struct{ Date time.Time }{time.Unix(1234567890, 0).UTC()}, + cfg: &Config{ + PrintStringers: true, + Formatter: map[reflect.Type]interface{}{ + reflect.TypeOf(time.Time{}): nil, + }, + }, + want: keyvals{ + {"Date", keyvals{}}, + }, + }, + { + desc: "time w/ PrintTextMarshalers", + raw: struct{ Date time.Time }{time.Unix(1234567890, 0).UTC()}, + cfg: &Config{ + PrintTextMarshalers: true, + }, + want: keyvals{ + {"Date", stringVal("2009-02-13T23:31:30Z")}, + }, + }, + { + desc: "time w/ PrintStringers", + raw: struct{ Date time.Time }{time.Unix(1234567890, 0).UTC()}, + cfg: &Config{ + PrintStringers: true, + }, + want: keyvals{ + {"Date", stringVal("2009-02-13 23:31:30 +0000 UTC")}, + }, + }, + } + + for _, test := range tests { + if got, want := test.cfg.val2node(reflect.ValueOf(test.raw)), test.want; !reflect.DeepEqual(got, want) { + t.Errorf("%s: got %#v, want %#v", test.desc, got, want) + } + } +} + +func BenchmarkVal2node(b *testing.B) { + benchmarks := []struct { + desc string + cfg *Config + raw interface{} + }{ + { + desc: "struct", + cfg: DefaultConfig, + raw: struct{ Zaphod, Ford string }{"beeblebrox", "prefect"}}, + { + desc: "map", + cfg: DefaultConfig, + raw: map[[2]int]string{ + [2]int{-1, 2}: "school", + [2]int{0, 0}: "origin", + [2]int{1, 3}: "home", + }, + }, + } + + for _, bench := range benchmarks { + b.Run(bench.desc, func(b *testing.B) { + for i := 0; i < b.N; i++ { + bench.cfg.val2node(reflect.ValueOf(bench.raw)) + } + }) + } +} diff --git a/vendor/github.com/kylelemons/godebug/pretty/structure_test.go b/vendor/github.com/kylelemons/godebug/pretty/structure_test.go new file mode 100644 index 000000000..5fd2d9a5d --- /dev/null +++ b/vendor/github.com/kylelemons/godebug/pretty/structure_test.go @@ -0,0 +1,316 @@ +// Copyright 2013 Google Inc. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pretty + +import ( + "bytes" + "strings" + "testing" +) + +func TestWriteTo(t *testing.T) { + tests := []struct { + desc string + node node + + // All strings have a leading newline trimmed before comparison: + normal string + diffable string + }{ + { + desc: "string", + node: stringVal("zaphod"), + normal: `"zaphod"`, + diffable: `"zaphod"`, + }, + { + desc: "raw", + node: rawVal("42"), + normal: `42`, + diffable: `42`, + }, + { + desc: "keyvals", + node: keyvals{ + {"name", stringVal("zaphod")}, + {"age", rawVal("42")}, + }, + normal: ` +{name: "zaphod", + age: 42}`, + diffable: ` +{ + name: "zaphod", + age: 42, +}`, + }, + { + desc: "empty list", + node: list{}, + normal: ` +[]`, + diffable: ` +[ +]`, + }, + { + desc: "empty nested list", + node: list{list{}}, + normal: ` +[[]]`, + diffable: ` +[ + [ + ], +]`, + }, + { + desc: "list", + node: list{ + stringVal("zaphod"), + rawVal("42"), + }, + normal: ` +["zaphod", + 42]`, + diffable: ` +[ + "zaphod", + 42, +]`, + }, + { + desc: "empty keyvals", + node: keyvals{}, + normal: ` +{}`, + diffable: ` +{ +}`, + }, + { + desc: "empty nested keyvals", + node: keyvals{{"k", keyvals{}}}, + normal: ` +{k: {}}`, + diffable: ` +{ + k: { + }, +}`, + }, + { + desc: "nested", + node: list{ + stringVal("first"), + list{rawVal("1"), rawVal("2"), rawVal("3")}, + keyvals{ + {"trillian", keyvals{ + {"race", stringVal("human")}, + {"age", rawVal("36")}, + }}, + {"zaphod", keyvals{ + {"occupation", stringVal("president of the galaxy")}, + {"features", stringVal("two heads")}, + }}, + }, + keyvals{}, + }, + normal: ` +["first", + [1, + 2, + 3], + {trillian: {race: "human", + age: 36}, + zaphod: {occupation: "president of the galaxy", + features: "two heads"}}, + {}]`, + diffable: ` +[ + "first", + [ + 1, + 2, + 3, + ], + { + trillian: { + race: "human", + age: 36, + }, + zaphod: { + occupation: "president of the galaxy", + features: "two heads", + }, + }, + { + }, +]`, + }, + } + + for _, test := range tests { + // For readability, we have a newline that won't be there in the output + test.normal = strings.TrimPrefix(test.normal, "\n") + test.diffable = strings.TrimPrefix(test.diffable, "\n") + + buf := new(bytes.Buffer) + test.node.WriteTo(buf, "", &Config{}) + if got, want := buf.String(), test.normal; got != want { + t.Errorf("%s: normal rendendered incorrectly\ngot:\n%s\nwant:\n%s", test.desc, got, want) + } + buf.Reset() + test.node.WriteTo(buf, "", &Config{Diffable: true}) + if got, want := buf.String(), test.diffable; got != want { + t.Errorf("%s: diffable rendendered incorrectly\ngot:\n%s\nwant:\n%s", test.desc, got, want) + } + } +} + +func TestCompactString(t *testing.T) { + tests := []struct { + node + compact string + }{ + { + stringVal("abc"), + "abc", + }, + { + rawVal("2"), + "2", + }, + { + list{ + rawVal("2"), + rawVal("3"), + }, + "[2,3]", + }, + { + keyvals{ + {"name", stringVal("zaphod")}, + {"age", rawVal("42")}, + }, + `{name:"zaphod",age:42}`, + }, + { + list{ + list{ + rawVal("0"), + rawVal("1"), + rawVal("2"), + rawVal("3"), + }, + list{ + rawVal("1"), + rawVal("2"), + rawVal("3"), + rawVal("0"), + }, + list{ + rawVal("2"), + rawVal("3"), + rawVal("0"), + rawVal("1"), + }, + }, + `[[0,1,2,3],[1,2,3,0],[2,3,0,1]]`, + }, + } + + for _, test := range tests { + if got, want := compactString(test.node), test.compact; got != want { + t.Errorf("%#v: compact = %q, want %q", test.node, got, want) + } + } +} + +func TestShortList(t *testing.T) { + cfg := &Config{ + ShortList: 16, + } + + tests := []struct { + node + want string + }{ + { + list{ + list{ + rawVal("0"), + rawVal("1"), + rawVal("2"), + rawVal("3"), + }, + list{ + rawVal("1"), + rawVal("2"), + rawVal("3"), + rawVal("0"), + }, + list{ + rawVal("2"), + rawVal("3"), + rawVal("0"), + rawVal("1"), + }, + }, + `[[0,1,2,3], + [1,2,3,0], + [2,3,0,1]]`, + }, + } + + for _, test := range tests { + buf := new(bytes.Buffer) + test.node.WriteTo(buf, "", cfg) + if got, want := buf.String(), test.want; got != want { + t.Errorf("%#v: got:\n%s\nwant:\n%s", test.node, got, want) + } + } +} + +var benchNode = keyvals{ + {"list", list{ + rawVal("0"), + rawVal("1"), + rawVal("2"), + rawVal("3"), + }}, + {"keyvals", keyvals{ + {"a", stringVal("b")}, + {"c", stringVal("e")}, + {"d", stringVal("f")}, + }}, +} + +func benchOpts(b *testing.B, cfg *Config) { + buf := new(bytes.Buffer) + benchNode.WriteTo(buf, "", cfg) + b.SetBytes(int64(buf.Len())) + b.ResetTimer() + + for i := 0; i < b.N; i++ { + buf.Reset() + benchNode.WriteTo(buf, "", cfg) + } +} + +func BenchmarkWriteDefault(b *testing.B) { benchOpts(b, DefaultConfig) } +func BenchmarkWriteShortList(b *testing.B) { benchOpts(b, &Config{ShortList: 16}) } +func BenchmarkWriteCompact(b *testing.B) { benchOpts(b, &Config{Compact: true}) } +func BenchmarkWriteDiffable(b *testing.B) { benchOpts(b, &Config{Diffable: true}) } diff --git a/vendor/github.com/mailru/easyjson/.gitignore b/vendor/github.com/mailru/easyjson/.gitignore new file mode 100644 index 000000000..db8c66edf --- /dev/null +++ b/vendor/github.com/mailru/easyjson/.gitignore @@ -0,0 +1,4 @@ +.root +*_easyjson.go +*.iml +.idea diff --git a/vendor/github.com/mailru/easyjson/.travis.yml b/vendor/github.com/mailru/easyjson/.travis.yml new file mode 100644 index 000000000..884f8bbdf --- /dev/null +++ b/vendor/github.com/mailru/easyjson/.travis.yml @@ -0,0 +1,9 @@ +language: go + +go: + - tip +install: + - go get github.com/ugorji/go/codec + - go get github.com/pquerna/ffjson/fflib/v1 + - go get github.com/json-iterator/go + - go get github.com/golang/lint/golint diff --git a/vendor/github.com/mailru/easyjson/Makefile b/vendor/github.com/mailru/easyjson/Makefile new file mode 100644 index 000000000..ea591b0c0 --- /dev/null +++ b/vendor/github.com/mailru/easyjson/Makefile @@ -0,0 +1,55 @@ +PKG=github.com/mailru/easyjson +GOPATH:=$(PWD)/.root:$(GOPATH) +export GOPATH + +all: test + +.root/src/$(PKG): + mkdir -p $@ + for i in $$PWD/* ; do ln -s $$i $@/`basename $$i` ; done + +root: .root/src/$(PKG) + +clean: + rm -rf .root + +build: + go build -i -o .root/bin/easyjson $(PKG)/easyjson + +generate: root build + .root/bin/easyjson -stubs \ + .root/src/$(PKG)/tests/snake.go \ + .root/src/$(PKG)/tests/data.go \ + .root/src/$(PKG)/tests/omitempty.go \ + .root/src/$(PKG)/tests/nothing.go \ + .root/src/$(PKG)/tests/named_type.go + + .root/bin/easyjson -all .root/src/$(PKG)/tests/data.go + .root/bin/easyjson -all .root/src/$(PKG)/tests/nothing.go + .root/bin/easyjson -all .root/src/$(PKG)/tests/errors.go + .root/bin/easyjson -snake_case .root/src/$(PKG)/tests/snake.go + .root/bin/easyjson -omit_empty .root/src/$(PKG)/tests/omitempty.go + .root/bin/easyjson -build_tags=use_easyjson .root/src/$(PKG)/benchmark/data.go + .root/bin/easyjson .root/src/$(PKG)/tests/nested_easy.go + .root/bin/easyjson .root/src/$(PKG)/tests/named_type.go + +test: generate root + go test \ + $(PKG)/tests \ + $(PKG)/jlexer \ + $(PKG)/gen \ + $(PKG)/buffer + go test -benchmem -tags use_easyjson -bench . $(PKG)/benchmark + golint -set_exit_status .root/src/$(PKG)/tests/*_easyjson.go + +bench-other: generate root + @go test -benchmem -bench . $(PKG)/benchmark + @go test -benchmem -tags use_ffjson -bench . $(PKG)/benchmark + @go test -benchmem -tags use_jsoniter -bench . $(PKG)/benchmark + @go test -benchmem -tags use_codec -bench . $(PKG)/benchmark + +bench-python: + benchmark/ujson.sh + + +.PHONY: root clean generate test build diff --git a/vendor/github.com/mailru/easyjson/README.md b/vendor/github.com/mailru/easyjson/README.md new file mode 100644 index 000000000..9366e3f71 --- /dev/null +++ b/vendor/github.com/mailru/easyjson/README.md @@ -0,0 +1,331 @@ +# easyjson [![Build Status](https://travis-ci.org/mailru/easyjson.svg?branch=master)](https://travis-ci.org/mailru/easyjson) [![Go Report Card](https://goreportcard.com/badge/github.com/mailru/easyjson)](https://goreportcard.com/report/github.com/mailru/easyjson) + +Package easyjson provides a fast and easy way to marshal/unmarshal Go structs +to/from JSON without the use of reflection. In performance tests, easyjson +outperforms the standard `encoding/json` package by a factor of 4-5x, and other +JSON encoding packages by a factor of 2-3x. + +easyjson aims to keep generated Go code simple enough so that it can be easily +optimized or fixed. Another goal is to provide users with the ability to +customize the generated code by providing options not available with the +standard `encoding/json` package, such as generating "snake_case" names or +enabling `omitempty` behavior by default. + +## Usage +```sh +# install +go get -u github.com/mailru/easyjson/... + +# run +easyjson -all .go +``` + +The above will generate `_easyjson.go` containing the appropriate marshaler and +unmarshaler funcs for all structs contained in `.go`. + +Please note that easyjson requires a full Go build environment and the `GOPATH` +environment variable to be set. This is because easyjson code generation +invokes `go run` on a temporary file (an approach to code generation borrowed +from [ffjson](https://github.com/pquerna/ffjson)). + +## Options +```txt +Usage of easyjson: + -all + generate marshaler/unmarshalers for all structs in a file + -build_tags string + build tags to add to generated file + -leave_temps + do not delete temporary files + -no_std_marshalers + don't generate MarshalJSON/UnmarshalJSON funcs + -noformat + do not run 'gofmt -w' on output file + -omit_empty + omit empty fields by default + -output_filename string + specify the filename of the output + -pkg + process the whole package instead of just the given file + -snake_case + use snake_case names instead of CamelCase by default + -lower_camel_case + use lowerCamelCase instead of CamelCase by default + -stubs + only generate stubs for marshaler/unmarshaler funcs +``` + +Using `-all` will generate marshalers/unmarshalers for all Go structs in the +file. If `-all` is not provided, then only those structs whose preceding +comment starts with `easyjson:json` will have marshalers/unmarshalers +generated. For example: + +```go +//easyjson:json +type A struct {} +``` + +Additional option notes: + +* `-snake_case` tells easyjson to generate snake\_case field names by default + (unless overridden by a field tag). The CamelCase to snake\_case conversion + algorithm should work in most cases (ie, HTTPVersion will be converted to + "http_version"). + +* `-build_tags` will add the specified build tags to generated Go sources. + +## Generated Marshaler/Unmarshaler Funcs + +For Go struct types, easyjson generates the funcs `MarshalEasyJSON` / +`UnmarshalEasyJSON` for marshaling/unmarshaling JSON. In turn, these satisify +the `easyjson.Marshaler` and `easyjson.Unmarshaler` interfaces and when used in +conjunction with `easyjson.Marshal` / `easyjson.Unmarshal` avoid unnecessary +reflection / type assertions during marshaling/unmarshaling to/from JSON for Go +structs. + +easyjson also generates `MarshalJSON` and `UnmarshalJSON` funcs for Go struct +types compatible with the standard `json.Marshaler` and `json.Unmarshaler` +interfaces. Please be aware that using the standard `json.Marshal` / +`json.Unmarshal` for marshaling/unmarshaling will incur a significant +performance penalty when compared to using `easyjson.Marshal` / +`easyjson.Unmarshal`. + +Additionally, easyjson exposes utility funcs that use the `MarshalEasyJSON` and +`UnmarshalEasyJSON` for marshaling/unmarshaling to and from standard readers +and writers. For example, easyjson provides `easyjson.MarshalToHTTPResponseWriter` +which marshals to the standard `http.ResponseWriter`. Please see the [GoDoc +listing](https://godoc.org/github.com/mailru/easyjson) for the full listing of +utility funcs that are available. + +## Controlling easyjson Marshaling and Unmarshaling Behavior + +Go types can provide their own `MarshalEasyJSON` and `UnmarshalEasyJSON` funcs +that satisify the `easyjson.Marshaler` / `easyjson.Unmarshaler` interfaces. +These will be used by `easyjson.Marshal` and `easyjson.Unmarshal` when defined +for a Go type. + +Go types can also satisify the `easyjson.Optional` interface, which allows the +type to define its own `omitempty` logic. + +## Type Wrappers + +easyjson provides additional type wrappers defined in the `easyjson/opt` +package. These wrap the standard Go primitives and in turn satisify the +easyjson interfaces. + +The `easyjson/opt` type wrappers are useful when needing to distinguish between +a missing value and/or when needing to specifying a default value. Type +wrappers allow easyjson to avoid additional pointers and heap allocations and +can significantly increase performance when used properly. + +## Memory Pooling + +easyjson uses a buffer pool that allocates data in increasing chunks from 128 +to 32768 bytes. Chunks of 512 bytes and larger will be reused with the help of +`sync.Pool`. The maximum size of a chunk is bounded to reduce redundant memory +allocation and to allow larger reusable buffers. + +easyjson's custom allocation buffer pool is defined in the `easyjson/buffer` +package, and the default behavior pool behavior can be modified (if necessary) +through a call to `buffer.Init()` prior to any marshaling or unmarshaling. +Please see the [GoDoc listing](https://godoc.org/github.com/mailru/easyjson/buffer) +for more information. + +## Issues, Notes, and Limitations + +* easyjson is still early in its development. As such, there are likely to be + bugs and missing features when compared to `encoding/json`. In the case of a + missing feature or bug, please create a GitHub issue. Pull requests are + welcome! + +* Unlike `encoding/json`, object keys are case-sensitive. Case-insensitive + matching is not currently provided due to the significant performance hit + when doing case-insensitive key matching. In the future, case-insensitive + object key matching may be provided via an option to the generator. + +* easyjson makes use of `unsafe`, which simplifies the code and + provides significant performance benefits by allowing no-copy + conversion from `[]byte` to `string`. That said, `unsafe` is used + only when unmarshaling and parsing JSON, and any `unsafe` operations + / memory allocations done will be safely deallocated by + easyjson. Set the build tag `easyjson_nounsafe` to compile it + without `unsafe`. + +* easyjson is compatible with Google App Engine. The `appengine` build + tag (set by App Engine's environment) will automatically disable the + use of `unsafe`, which is not allowed in App Engine's Standard + Environment. Note that the use with App Engine is still experimental. + +* Floats are formatted using the default precision from Go's `strconv` package. + As such, easyjson will not correctly handle high precision floats when + marshaling/unmarshaling JSON. Note, however, that there are very few/limited + uses where this behavior is not sufficient for general use. That said, a + different package may be needed if precise marshaling/unmarshaling of high + precision floats to/from JSON is required. + +* While unmarshaling, the JSON parser does the minimal amount of work needed to + skip over unmatching parens, and as such full validation is not done for the + entire JSON value being unmarshaled/parsed. + +* Currently there is no true streaming support for encoding/decoding as + typically for many uses/protocols the final, marshaled length of the JSON + needs to be known prior to sending the data. Currently this is not possible + with easyjson's architecture. + +## Benchmarks + +Most benchmarks were done using the example +[13kB example JSON](https://dev.twitter.com/rest/reference/get/search/tweets) +(9k after eliminating whitespace). This example is similar to real-world data, +is well-structured, and contains a healthy variety of different types, making +it ideal for JSON serialization benchmarks. + +Note: + +* For small request benchmarks, an 80 byte portion of the above example was + used. + +* For large request marshaling benchmarks, a struct containing 50 regular + samples was used, making a ~500kB output JSON. + +* Benchmarks are showing the results of easyjson's default behaviour, + which makes use of `unsafe`. + +Benchmarks are available in the repository and can be run by invoking `make`. + +### easyjson vs. encoding/json + +easyjson is roughly 5-6 times faster than the standard `encoding/json` for +unmarshaling, and 3-4 times faster for non-concurrent marshaling. Concurrent +marshaling is 6-7x faster if marshaling to a writer. + +### easyjson vs. ffjson + +easyjson uses the same approach for JSON marshaling as +[ffjson](https://github.com/pquerna/ffjson), but takes a significantly +different approach to lexing and parsing JSON during unmarshaling. This means +easyjson is roughly 2-3x faster for unmarshaling and 1.5-2x faster for +non-concurrent unmarshaling. + +As of this writing, `ffjson` seems to have issues when used concurrently: +specifically, large request pooling hurts `ffjson`'s performance and causes +scalability issues. These issues with `ffjson` can likely be fixed, but as of +writing remain outstanding/known issues with `ffjson`. + +easyjson and `ffjson` have similar performance for small requests, however +easyjson outperforms `ffjson` by roughly 2-5x times for large requests when +used with a writer. + +### easyjson vs. go/codec + +[go/codec](https://github.com/ugorji/go) provides +compile-time helpers for JSON generation. In this case, helpers do not work +like marshalers as they are encoding-independent. + +easyjson is generally 2x faster than `go/codec` for non-concurrent benchmarks +and about 3x faster for concurrent encoding (without marshaling to a writer). + +In an attempt to measure marshaling performance of `go/codec` (as opposed to +allocations/memcpy/writer interface invocations), a benchmark was done with +resetting length of a byte slice rather than resetting the whole slice to nil. +However, the optimization in this exact form may not be applicable in practice, +since the memory is not freed between marshaling operations. + +### easyjson vs 'ujson' python module + +[ujson](https://github.com/esnme/ultrajson) is using C code for parsing, so it +is interesting to see how plain golang compares to that. It is imporant to note +that the resulting object for python is slower to access, since the library +parses JSON object into dictionaries. + +easyjson is slightly faster for unmarshaling and 2-3x faster than `ujson` for +marshaling. + +### Benchmark Results + +`ffjson` results are from February 4th, 2016, using the latest `ffjson` and go1.6. +`go/codec` results are from March 4th, 2016, using the latest `go/codec` and go1.6. + +#### Unmarshaling + +| lib | json size | MB/s | allocs/op | B/op | +|:---------|:----------|-----:|----------:|------:| +| standard | regular | 22 | 218 | 10229 | +| standard | small | 9.7 | 14 | 720 | +| | | | | | +| easyjson | regular | 125 | 128 | 9794 | +| easyjson | small | 67 | 3 | 128 | +| | | | | | +| ffjson | regular | 66 | 141 | 9985 | +| ffjson | small | 17.6 | 10 | 488 | +| | | | | | +| codec | regular | 55 | 434 | 19299 | +| codec | small | 29 | 7 | 336 | +| | | | | | +| ujson | regular | 103 | N/A | N/A | + +#### Marshaling, one goroutine. + +| lib | json size | MB/s | allocs/op | B/op | +|:----------|:----------|-----:|----------:|------:| +| standard | regular | 75 | 9 | 23256 | +| standard | small | 32 | 3 | 328 | +| standard | large | 80 | 17 | 1.2M | +| | | | | | +| easyjson | regular | 213 | 9 | 10260 | +| easyjson* | regular | 263 | 8 | 742 | +| easyjson | small | 125 | 1 | 128 | +| easyjson | large | 212 | 33 | 490k | +| easyjson* | large | 262 | 25 | 2879 | +| | | | | | +| ffjson | regular | 122 | 153 | 21340 | +| ffjson** | regular | 146 | 152 | 4897 | +| ffjson | small | 36 | 5 | 384 | +| ffjson** | small | 64 | 4 | 128 | +| ffjson | large | 134 | 7317 | 818k | +| ffjson** | large | 125 | 7320 | 827k | +| | | | | | +| codec | regular | 80 | 17 | 33601 | +| codec*** | regular | 108 | 9 | 1153 | +| codec | small | 42 | 3 | 304 | +| codec*** | small | 56 | 1 | 48 | +| codec | large | 73 | 483 | 2.5M | +| codec*** | large | 103 | 451 | 66007 | +| | | | | | +| ujson | regular | 92 | N/A | N/A | + +\* marshaling to a writer, +\*\* using `ffjson.Pool()`, +\*\*\* reusing output slice instead of resetting it to nil + +#### Marshaling, concurrent. + +| lib | json size | MB/s | allocs/op | B/op | +|:----------|:----------|-----:|----------:|------:| +| standard | regular | 252 | 9 | 23257 | +| standard | small | 124 | 3 | 328 | +| standard | large | 289 | 17 | 1.2M | +| | | | | | +| easyjson | regular | 792 | 9 | 10597 | +| easyjson* | regular | 1748 | 8 | 779 | +| easyjson | small | 333 | 1 | 128 | +| easyjson | large | 718 | 36 | 548k | +| easyjson* | large | 2134 | 25 | 4957 | +| | | | | | +| ffjson | regular | 301 | 153 | 21629 | +| ffjson** | regular | 707 | 152 | 5148 | +| ffjson | small | 62 | 5 | 384 | +| ffjson** | small | 282 | 4 | 128 | +| ffjson | large | 438 | 7330 | 1.0M | +| ffjson** | large | 131 | 7319 | 820k | +| | | | | | +| codec | regular | 183 | 17 | 33603 | +| codec*** | regular | 671 | 9 | 1157 | +| codec | small | 147 | 3 | 304 | +| codec*** | small | 299 | 1 | 48 | +| codec | large | 190 | 483 | 2.5M | +| codec*** | large | 752 | 451 | 77574 | + +\* marshaling to a writer, +\*\* using `ffjson.Pool()`, +\*\*\* reusing output slice instead of resetting it to nil diff --git a/vendor/github.com/mailru/easyjson/buffer/pool.go b/vendor/github.com/mailru/easyjson/buffer/pool.go index 4de4a51db..07fb4bc1f 100644 --- a/vendor/github.com/mailru/easyjson/buffer/pool.go +++ b/vendor/github.com/mailru/easyjson/buffer/pool.go @@ -179,18 +179,25 @@ func (b *Buffer) DumpTo(w io.Writer) (written int, err error) { } // BuildBytes creates a single byte slice with all the contents of the buffer. Data is -// copied if it does not fit in a single chunk. -func (b *Buffer) BuildBytes() []byte { +// copied if it does not fit in a single chunk. You can optionally provide one byte +// slice as argument that it will try to reuse. +func (b *Buffer) BuildBytes(reuse ...[]byte) []byte { if len(b.bufs) == 0 { - ret := b.Buf b.toPool = nil b.Buf = nil - return ret } - ret := make([]byte, 0, b.Size()) + var ret []byte + size := b.Size() + + // If we got a buffer as argument and it is big enought, reuse it. + if len(reuse) == 1 && cap(reuse[0]) >= size { + ret = reuse[0][:0] + } else { + ret = make([]byte, 0, size) + } for _, buf := range b.bufs { ret = append(ret, buf...) putBuf(buf) @@ -205,3 +212,59 @@ func (b *Buffer) BuildBytes() []byte { return ret } + +type readCloser struct { + offset int + bufs [][]byte +} + +func (r *readCloser) Read(p []byte) (n int, err error) { + for _, buf := range r.bufs { + // Copy as much as we can. + x := copy(p[n:], buf[r.offset:]) + n += x // Increment how much we filled. + + // Did we empty the whole buffer? + if r.offset+x == len(buf) { + // On to the next buffer. + r.offset = 0 + r.bufs = r.bufs[1:] + + // We can release this buffer. + putBuf(buf) + } else { + r.offset += x + } + + if n == len(p) { + break + } + } + // No buffers left or nothing read? + if len(r.bufs) == 0 { + err = io.EOF + } + return +} + +func (r *readCloser) Close() error { + // Release all remaining buffers. + for _, buf := range r.bufs { + putBuf(buf) + } + // In case Close gets called multiple times. + r.bufs = nil + + return nil +} + +// ReadCloser creates an io.ReadCloser with all the contents of the buffer. +func (b *Buffer) ReadCloser() io.ReadCloser { + ret := &readCloser{0, append(b.bufs, b.Buf)} + + b.bufs = nil + b.toPool = nil + b.Buf = nil + + return ret +} diff --git a/vendor/github.com/mailru/easyjson/buffer/pool_test.go b/vendor/github.com/mailru/easyjson/buffer/pool_test.go new file mode 100644 index 000000000..680623ace --- /dev/null +++ b/vendor/github.com/mailru/easyjson/buffer/pool_test.go @@ -0,0 +1,107 @@ +package buffer + +import ( + "bytes" + "testing" +) + +func TestAppendByte(t *testing.T) { + var b Buffer + var want []byte + + for i := 0; i < 1000; i++ { + b.AppendByte(1) + b.AppendByte(2) + want = append(want, 1, 2) + } + + got := b.BuildBytes() + if !bytes.Equal(got, want) { + t.Errorf("BuildBytes() = %v; want %v", got, want) + } +} + +func TestAppendBytes(t *testing.T) { + var b Buffer + var want []byte + + for i := 0; i < 1000; i++ { + b.AppendBytes([]byte{1, 2}) + want = append(want, 1, 2) + } + + got := b.BuildBytes() + if !bytes.Equal(got, want) { + t.Errorf("BuildBytes() = %v; want %v", got, want) + } +} + +func TestAppendString(t *testing.T) { + var b Buffer + var want []byte + + s := "test" + for i := 0; i < 1000; i++ { + b.AppendBytes([]byte(s)) + want = append(want, s...) + } + + got := b.BuildBytes() + if !bytes.Equal(got, want) { + t.Errorf("BuildBytes() = %v; want %v", got, want) + } +} + +func TestDumpTo(t *testing.T) { + var b Buffer + var want []byte + + s := "test" + for i := 0; i < 1000; i++ { + b.AppendBytes([]byte(s)) + want = append(want, s...) + } + + out := &bytes.Buffer{} + n, err := b.DumpTo(out) + if err != nil { + t.Errorf("DumpTo() error: %v", err) + } + + got := out.Bytes() + if !bytes.Equal(got, want) { + t.Errorf("DumpTo(): got %v; want %v", got, want) + } + + if n != len(want) { + t.Errorf("DumpTo() = %v; want %v", n, len(want)) + } +} + +func TestReadCloser(t *testing.T) { + var b Buffer + var want []byte + + s := "test" + for i := 0; i < 1000; i++ { + b.AppendBytes([]byte(s)) + want = append(want, s...) + } + + out := &bytes.Buffer{} + rc := b.ReadCloser() + n, err := out.ReadFrom(rc) + if err != nil { + t.Errorf("ReadCloser() error: %v", err) + } + rc.Close() // Will always return nil + + got := out.Bytes() + if !bytes.Equal(got, want) { + t.Errorf("DumpTo(): got %v; want %v", got, want) + } + + if n != int64(len(want)) { + t.Errorf("DumpTo() = %v; want %v", n, len(want)) + } +} diff --git a/vendor/github.com/mailru/easyjson/helpers.go b/vendor/github.com/mailru/easyjson/helpers.go new file mode 100644 index 000000000..b86b87d22 --- /dev/null +++ b/vendor/github.com/mailru/easyjson/helpers.go @@ -0,0 +1,78 @@ +// Package easyjson contains marshaler/unmarshaler interfaces and helper functions. +package easyjson + +import ( + "io" + "io/ioutil" + "net/http" + "strconv" + + "github.com/mailru/easyjson/jlexer" + "github.com/mailru/easyjson/jwriter" +) + +// Marshaler is an easyjson-compatible marshaler interface. +type Marshaler interface { + MarshalEasyJSON(w *jwriter.Writer) +} + +// Marshaler is an easyjson-compatible unmarshaler interface. +type Unmarshaler interface { + UnmarshalEasyJSON(w *jlexer.Lexer) +} + +// Optional defines an undefined-test method for a type to integrate with 'omitempty' logic. +type Optional interface { + IsDefined() bool +} + +// Marshal returns data as a single byte slice. Method is suboptimal as the data is likely to be copied +// from a chain of smaller chunks. +func Marshal(v Marshaler) ([]byte, error) { + w := jwriter.Writer{} + v.MarshalEasyJSON(&w) + return w.BuildBytes() +} + +// MarshalToWriter marshals the data to an io.Writer. +func MarshalToWriter(v Marshaler, w io.Writer) (written int, err error) { + jw := jwriter.Writer{} + v.MarshalEasyJSON(&jw) + return jw.DumpTo(w) +} + +// MarshalToHTTPResponseWriter sets Content-Length and Content-Type headers for the +// http.ResponseWriter, and send the data to the writer. started will be equal to +// false if an error occurred before any http.ResponseWriter methods were actually +// invoked (in this case a 500 reply is possible). +func MarshalToHTTPResponseWriter(v Marshaler, w http.ResponseWriter) (started bool, written int, err error) { + jw := jwriter.Writer{} + v.MarshalEasyJSON(&jw) + if jw.Error != nil { + return false, 0, jw.Error + } + w.Header().Set("Content-Type", "application/json") + w.Header().Set("Content-Length", strconv.Itoa(jw.Size())) + + started = true + written, err = jw.DumpTo(w) + return +} + +// Unmarshal decodes the JSON in data into the object. +func Unmarshal(data []byte, v Unmarshaler) error { + l := jlexer.Lexer{Data: data} + v.UnmarshalEasyJSON(&l) + return l.Error() +} + +// UnmarshalFromReader reads all the data in the reader and decodes as JSON into the object. +func UnmarshalFromReader(r io.Reader, v Unmarshaler) error { + data, err := ioutil.ReadAll(r) + if err != nil { + return err + } + l := jlexer.Lexer{Data: data} + v.UnmarshalEasyJSON(&l) + return l.Error() +} diff --git a/vendor/github.com/mailru/easyjson/jlexer/bytestostr.go b/vendor/github.com/mailru/easyjson/jlexer/bytestostr.go new file mode 100644 index 000000000..ff7b27c5b --- /dev/null +++ b/vendor/github.com/mailru/easyjson/jlexer/bytestostr.go @@ -0,0 +1,24 @@ +// This file will only be included to the build if neither +// easyjson_nounsafe nor appengine build tag is set. See README notes +// for more details. + +//+build !easyjson_nounsafe +//+build !appengine + +package jlexer + +import ( + "reflect" + "unsafe" +) + +// bytesToStr creates a string pointing at the slice to avoid copying. +// +// Warning: the string returned by the function should be used with care, as the whole input data +// chunk may be either blocked from being freed by GC because of a single string or the buffer.Data +// may be garbage-collected even when the string exists. +func bytesToStr(data []byte) string { + h := (*reflect.SliceHeader)(unsafe.Pointer(&data)) + shdr := reflect.StringHeader{Data: h.Data, Len: h.Len} + return *(*string)(unsafe.Pointer(&shdr)) +} diff --git a/vendor/github.com/mailru/easyjson/jlexer/bytestostr_nounsafe.go b/vendor/github.com/mailru/easyjson/jlexer/bytestostr_nounsafe.go new file mode 100644 index 000000000..864d1be67 --- /dev/null +++ b/vendor/github.com/mailru/easyjson/jlexer/bytestostr_nounsafe.go @@ -0,0 +1,13 @@ +// This file is included to the build if any of the buildtags below +// are defined. Refer to README notes for more details. + +//+build easyjson_nounsafe appengine + +package jlexer + +// bytesToStr creates a string normally from []byte +// +// Note that this method is roughly 1.5x slower than using the 'unsafe' method. +func bytesToStr(data []byte) string { + return string(data) +} diff --git a/vendor/github.com/mailru/easyjson/jlexer/lexer.go b/vendor/github.com/mailru/easyjson/jlexer/lexer.go index d700c0a32..e81f1031b 100644 --- a/vendor/github.com/mailru/easyjson/jlexer/lexer.go +++ b/vendor/github.com/mailru/easyjson/jlexer/lexer.go @@ -5,12 +5,14 @@ package jlexer import ( + "encoding/base64" + "errors" "fmt" "io" - "reflect" "strconv" + "unicode" + "unicode/utf16" "unicode/utf8" - "unsafe" ) // tokenKind determines type of a token. @@ -45,11 +47,13 @@ type Lexer struct { firstElement bool // Whether current element is the first in array or an object. wantSep byte // A comma or a colon character, which need to occur before a token. - err error // Error encountered during lexing, if any. + UseMultipleErrors bool // If we want to use multiple errors. + fatalError error // Fatal error occurred during lexing. It is usually a syntax error. + multipleErrors []*LexerError // Semantic errors occurred during lexing. Marshalling will be continued after finding this errors. } -// fetchToken scans the input for the next token. -func (r *Lexer) fetchToken() { +// FetchToken scans the input for the next token. +func (r *Lexer) FetchToken() { r.token.kind = tokenUndef r.start = r.pos @@ -147,7 +151,7 @@ func (r *Lexer) fetchToken() { return } } - r.err = io.EOF + r.fatalError = io.EOF return } @@ -199,17 +203,6 @@ func (r *Lexer) fetchFalse() { } } -// bytesToStr creates a string pointing at the slice to avoid copying. -// -// Warning: the string returned by the function should be used with care, as the whole input data -// chunk may be either blocked from being freed by GC because of a single string or the buffer.Data -// may be garbage-collected even when the string exists. -func bytesToStr(data []byte) string { - h := (*reflect.SliceHeader)(unsafe.Pointer(&data)) - shdr := reflect.StringHeader{h.Data, h.Len} - return *(*string)(unsafe.Pointer(&shdr)) -} - // fetchNumber scans a number literal token. func (r *Lexer) fetchNumber() { hasE := false @@ -265,6 +258,33 @@ func findStringLen(data []byte) (hasEscapes bool, length int) { return false, len(data) } +// getu4 decodes \uXXXX from the beginning of s, returning the hex value, +// or it returns -1. +func getu4(s []byte) rune { + if len(s) < 6 || s[0] != '\\' || s[1] != 'u' { + return -1 + } + var val rune + for i := 2; i < len(s) && i < 6; i++ { + var v byte + c := s[i] + switch c { + case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': + v = c - '0' + case 'a', 'b', 'c', 'd', 'e', 'f': + v = c - 'a' + 10 + case 'A', 'B', 'C', 'D', 'E', 'F': + v = c - 'A' + 10 + default: + return -1 + } + + val <<= 4 + val |= rune(v) + } + return val +} + // processEscape processes a single escape sequence and returns number of bytes processed. func (r *Lexer) processEscape(data []byte) (int, error) { if len(data) < 2 { @@ -292,39 +312,28 @@ func (r *Lexer) processEscape(data []byte) (int, error) { r.token.byteValue = append(r.token.byteValue, '\t') return 2, nil case 'u': - default: - return 0, fmt.Errorf("syntax error") - } - - var val rune - - for i := 2; i < len(data) && i < 6; i++ { - var v byte - c = data[i] - switch c { - case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': - v = c - '0' - case 'a', 'b', 'c', 'd', 'e', 'f': - v = c - 'a' + 10 - case 'A', 'B', 'C', 'D', 'E', 'F': - v = c - 'A' + 10 - default: - return 0, fmt.Errorf("syntax error") + rr := getu4(data) + if rr < 0 { + return 0, errors.New("syntax error") } - val <<= 4 - val |= rune(v) + read := 6 + if utf16.IsSurrogate(rr) { + rr1 := getu4(data[read:]) + if dec := utf16.DecodeRune(rr, rr1); dec != unicode.ReplacementChar { + read += 6 + rr = dec + } else { + rr = unicode.ReplacementChar + } + } + var d [4]byte + s := utf8.EncodeRune(d[:], rr) + r.token.byteValue = append(r.token.byteValue, d[:s]...) + return read, nil } - l := utf8.RuneLen(val) - if l == -1 { - return 0, fmt.Errorf("invalid unicode escape") - } - - var d [4]byte - utf8.EncodeRune(d[:], val) - r.token.byteValue = append(r.token.byteValue, d[:l]...) - return 6, nil + return 0, errors.New("syntax error") } // fetchString scans a string literal token. @@ -368,11 +377,11 @@ func (r *Lexer) fetchString() { // scanToken scans the next token if no token is currently available in the lexer. func (r *Lexer) scanToken() { - if r.token.kind != tokenUndef || r.err != nil { + if r.token.kind != tokenUndef || r.fatalError != nil { return } - r.fetchToken() + r.FetchToken() } // consume resets the current token to allow scanning the next one. @@ -383,20 +392,20 @@ func (r *Lexer) consume() { // Ok returns true if no error (including io.EOF) was encountered during scanning. func (r *Lexer) Ok() bool { - return r.err == nil + return r.fatalError == nil } const maxErrorContextLen = 13 func (r *Lexer) errParse(what string) { - if r.err == nil { + if r.fatalError == nil { var str string if len(r.Data)-r.pos <= maxErrorContextLen { str = string(r.Data) } else { str = string(r.Data[r.pos:r.pos+maxErrorContextLen-3]) + "..." } - r.err = &LexerError{ + r.fatalError = &LexerError{ Reason: what, Offset: r.pos, Data: str, @@ -409,36 +418,64 @@ func (r *Lexer) errSyntax() { } func (r *Lexer) errInvalidToken(expected string) { - if r.err == nil { - var str string - if len(r.token.byteValue) <= maxErrorContextLen { - str = string(r.token.byteValue) - } else { - str = string(r.token.byteValue[:maxErrorContextLen-3]) + "..." - } - r.err = &LexerError{ - Reason: fmt.Sprintf("expected %s", expected), - Offset: r.pos, - Data: str, - } + if r.fatalError != nil { + return } + if r.UseMultipleErrors { + r.pos = r.start + r.consume() + r.SkipRecursive() + switch expected { + case "[": + r.token.delimValue = ']' + r.token.kind = tokenDelim + case "{": + r.token.delimValue = '}' + r.token.kind = tokenDelim + } + r.addNonfatalError(&LexerError{ + Reason: fmt.Sprintf("expected %s", expected), + Offset: r.start, + Data: string(r.Data[r.start:r.pos]), + }) + return + } + + var str string + if len(r.token.byteValue) <= maxErrorContextLen { + str = string(r.token.byteValue) + } else { + str = string(r.token.byteValue[:maxErrorContextLen-3]) + "..." + } + r.fatalError = &LexerError{ + Reason: fmt.Sprintf("expected %s", expected), + Offset: r.pos, + Data: str, + } +} + +func (r *Lexer) GetPos() int { + return r.pos } // Delim consumes a token and verifies that it is the given delimiter. func (r *Lexer) Delim(c byte) { if r.token.kind == tokenUndef && r.Ok() { - r.fetchToken() + r.FetchToken() } + if !r.Ok() || r.token.delimValue != c { + r.consume() // errInvalidToken can change token if UseMultipleErrors is enabled. r.errInvalidToken(string([]byte{c})) + } else { + r.consume() } - r.consume() } // IsDelim returns true if there was no scanning error and next token is the given delimiter. func (r *Lexer) IsDelim(c byte) bool { if r.token.kind == tokenUndef && r.Ok() { - r.fetchToken() + r.FetchToken() } return !r.Ok() || r.token.delimValue == c } @@ -446,7 +483,7 @@ func (r *Lexer) IsDelim(c byte) bool { // Null verifies that the next token is null and consumes it. func (r *Lexer) Null() { if r.token.kind == tokenUndef && r.Ok() { - r.fetchToken() + r.FetchToken() } if !r.Ok() || r.token.kind != tokenNull { r.errInvalidToken("null") @@ -457,7 +494,7 @@ func (r *Lexer) Null() { // IsNull returns true if the next token is a null keyword. func (r *Lexer) IsNull() bool { if r.token.kind == tokenUndef && r.Ok() { - r.fetchToken() + r.FetchToken() } return r.Ok() && r.token.kind == tokenNull } @@ -465,7 +502,7 @@ func (r *Lexer) IsNull() bool { // Skip skips a single token. func (r *Lexer) Skip() { if r.token.kind == tokenUndef && r.Ok() { - r.fetchToken() + r.FetchToken() } r.consume() } @@ -476,7 +513,6 @@ func (r *Lexer) Skip() { // Note: no syntax validation is performed on the skipped data. func (r *Lexer) SkipRecursive() { r.scanToken() - var start, end byte if r.token.delimValue == '{' { @@ -505,7 +541,7 @@ func (r *Lexer) SkipRecursive() { return } case c == '\\' && inQuotes: - wasEscape = true + wasEscape = !wasEscape continue case c == '"' && inQuotes: inQuotes = wasEscape @@ -515,7 +551,11 @@ func (r *Lexer) SkipRecursive() { wasEscape = false } r.pos = len(r.Data) - r.err = io.EOF + r.fatalError = &LexerError{ + Reason: "EOF reached while skipping array/object or token", + Offset: r.pos, + Data: string(r.Data[r.pos:]), + } } // Raw fetches the next item recursively as a data slice @@ -527,48 +567,107 @@ func (r *Lexer) Raw() []byte { return r.Data[r.start:r.pos] } +// IsStart returns whether the lexer is positioned at the start +// of an input string. +func (r *Lexer) IsStart() bool { + return r.pos == 0 +} + +// Consumed reads all remaining bytes from the input, publishing an error if +// there is anything but whitespace remaining. +func (r *Lexer) Consumed() { + if r.pos > len(r.Data) || !r.Ok() { + return + } + + for _, c := range r.Data[r.pos:] { + if c != ' ' && c != '\t' && c != '\r' && c != '\n' { + r.AddError(&LexerError{ + Reason: "invalid character '" + string(c) + "' after top-level value", + Offset: r.pos, + Data: string(r.Data[r.pos:]), + }) + return + } + + r.pos++ + r.start++ + } +} + +func (r *Lexer) unsafeString() (string, []byte) { + if r.token.kind == tokenUndef && r.Ok() { + r.FetchToken() + } + if !r.Ok() || r.token.kind != tokenString { + r.errInvalidToken("string") + return "", nil + } + bytes := r.token.byteValue + ret := bytesToStr(r.token.byteValue) + r.consume() + return ret, bytes +} + // UnsafeString returns the string value if the token is a string literal. // // Warning: returned string may point to the input buffer, so the string should not outlive // the input buffer. Intended pattern of usage is as an argument to a switch statement. func (r *Lexer) UnsafeString() string { - if r.token.kind == tokenUndef && r.Ok() { - r.fetchToken() - } - if !r.Ok() || r.token.kind != tokenString { - r.errInvalidToken("string") - return "" - } + ret, _ := r.unsafeString() + return ret +} - ret := bytesToStr(r.token.byteValue) - r.consume() +// UnsafeBytes returns the byte slice if the token is a string literal. +func (r *Lexer) UnsafeBytes() []byte { + _, ret := r.unsafeString() return ret } // String reads a string literal. func (r *Lexer) String() string { if r.token.kind == tokenUndef && r.Ok() { - r.fetchToken() + r.FetchToken() } if !r.Ok() || r.token.kind != tokenString { r.errInvalidToken("string") return "" - } ret := string(r.token.byteValue) r.consume() return ret } +// Bytes reads a string literal and base64 decodes it into a byte slice. +func (r *Lexer) Bytes() []byte { + if r.token.kind == tokenUndef && r.Ok() { + r.FetchToken() + } + if !r.Ok() || r.token.kind != tokenString { + r.errInvalidToken("string") + return nil + } + ret := make([]byte, base64.StdEncoding.DecodedLen(len(r.token.byteValue))) + len, err := base64.StdEncoding.Decode(ret, r.token.byteValue) + if err != nil { + r.fatalError = &LexerError{ + Reason: err.Error(), + } + return nil + } + + r.consume() + return ret[:len] +} + // Bool reads a true or false boolean keyword. func (r *Lexer) Bool() bool { if r.token.kind == tokenUndef && r.Ok() { - r.fetchToken() + r.FetchToken() } if !r.Ok() || r.token.kind != tokenBool { r.errInvalidToken("bool") return false - } ret := r.token.boolValue r.consume() @@ -577,12 +676,11 @@ func (r *Lexer) Bool() bool { func (r *Lexer) number() string { if r.token.kind == tokenUndef && r.Ok() { - r.fetchToken() + r.FetchToken() } if !r.Ok() || r.token.kind != tokenNumber { r.errInvalidToken("number") return "" - } ret := bytesToStr(r.token.byteValue) r.consume() @@ -597,9 +695,11 @@ func (r *Lexer) Uint8() uint8 { n, err := strconv.ParseUint(s, 10, 8) if err != nil { - r.err = &LexerError{ + r.addNonfatalError(&LexerError{ + Offset: r.start, Reason: err.Error(), - } + Data: s, + }) } return uint8(n) } @@ -612,9 +712,11 @@ func (r *Lexer) Uint16() uint16 { n, err := strconv.ParseUint(s, 10, 16) if err != nil { - r.err = &LexerError{ + r.addNonfatalError(&LexerError{ + Offset: r.start, Reason: err.Error(), - } + Data: s, + }) } return uint16(n) } @@ -627,9 +729,11 @@ func (r *Lexer) Uint32() uint32 { n, err := strconv.ParseUint(s, 10, 32) if err != nil { - r.err = &LexerError{ + r.addNonfatalError(&LexerError{ + Offset: r.start, Reason: err.Error(), - } + Data: s, + }) } return uint32(n) } @@ -642,9 +746,11 @@ func (r *Lexer) Uint64() uint64 { n, err := strconv.ParseUint(s, 10, 64) if err != nil { - r.err = &LexerError{ + r.addNonfatalError(&LexerError{ + Offset: r.start, Reason: err.Error(), - } + Data: s, + }) } return n } @@ -661,9 +767,11 @@ func (r *Lexer) Int8() int8 { n, err := strconv.ParseInt(s, 10, 8) if err != nil { - r.err = &LexerError{ + r.addNonfatalError(&LexerError{ + Offset: r.start, Reason: err.Error(), - } + Data: s, + }) } return int8(n) } @@ -676,9 +784,11 @@ func (r *Lexer) Int16() int16 { n, err := strconv.ParseInt(s, 10, 16) if err != nil { - r.err = &LexerError{ + r.addNonfatalError(&LexerError{ + Offset: r.start, Reason: err.Error(), - } + Data: s, + }) } return int16(n) } @@ -691,9 +801,11 @@ func (r *Lexer) Int32() int32 { n, err := strconv.ParseInt(s, 10, 32) if err != nil { - r.err = &LexerError{ + r.addNonfatalError(&LexerError{ + Offset: r.start, Reason: err.Error(), - } + Data: s, + }) } return int32(n) } @@ -706,9 +818,11 @@ func (r *Lexer) Int64() int64 { n, err := strconv.ParseInt(s, 10, 64) if err != nil { - r.err = &LexerError{ + r.addNonfatalError(&LexerError{ + Offset: r.start, Reason: err.Error(), - } + Data: s, + }) } return n } @@ -718,61 +832,69 @@ func (r *Lexer) Int() int { } func (r *Lexer) Uint8Str() uint8 { - s := r.UnsafeString() + s, b := r.unsafeString() if !r.Ok() { return 0 } n, err := strconv.ParseUint(s, 10, 8) if err != nil { - r.err = &LexerError{ + r.addNonfatalError(&LexerError{ + Offset: r.start, Reason: err.Error(), - } + Data: string(b), + }) } return uint8(n) } func (r *Lexer) Uint16Str() uint16 { - s := r.UnsafeString() + s, b := r.unsafeString() if !r.Ok() { return 0 } n, err := strconv.ParseUint(s, 10, 16) if err != nil { - r.err = &LexerError{ + r.addNonfatalError(&LexerError{ + Offset: r.start, Reason: err.Error(), - } + Data: string(b), + }) } return uint16(n) } func (r *Lexer) Uint32Str() uint32 { - s := r.UnsafeString() + s, b := r.unsafeString() if !r.Ok() { return 0 } n, err := strconv.ParseUint(s, 10, 32) if err != nil { - r.err = &LexerError{ + r.addNonfatalError(&LexerError{ + Offset: r.start, Reason: err.Error(), - } + Data: string(b), + }) } return uint32(n) } func (r *Lexer) Uint64Str() uint64 { - s := r.UnsafeString() + s, b := r.unsafeString() if !r.Ok() { return 0 } n, err := strconv.ParseUint(s, 10, 64) if err != nil { - r.err = &LexerError{ + r.addNonfatalError(&LexerError{ + Offset: r.start, Reason: err.Error(), - } + Data: string(b), + }) } return n } @@ -782,61 +904,69 @@ func (r *Lexer) UintStr() uint { } func (r *Lexer) Int8Str() int8 { - s := r.UnsafeString() + s, b := r.unsafeString() if !r.Ok() { return 0 } n, err := strconv.ParseInt(s, 10, 8) if err != nil { - r.err = &LexerError{ + r.addNonfatalError(&LexerError{ + Offset: r.start, Reason: err.Error(), - } + Data: string(b), + }) } return int8(n) } func (r *Lexer) Int16Str() int16 { - s := r.UnsafeString() + s, b := r.unsafeString() if !r.Ok() { return 0 } n, err := strconv.ParseInt(s, 10, 16) if err != nil { - r.err = &LexerError{ + r.addNonfatalError(&LexerError{ + Offset: r.start, Reason: err.Error(), - } + Data: string(b), + }) } return int16(n) } func (r *Lexer) Int32Str() int32 { - s := r.UnsafeString() + s, b := r.unsafeString() if !r.Ok() { return 0 } n, err := strconv.ParseInt(s, 10, 32) if err != nil { - r.err = &LexerError{ + r.addNonfatalError(&LexerError{ + Offset: r.start, Reason: err.Error(), - } + Data: string(b), + }) } return int32(n) } func (r *Lexer) Int64Str() int64 { - s := r.UnsafeString() + s, b := r.unsafeString() if !r.Ok() { return 0 } n, err := strconv.ParseInt(s, 10, 64) if err != nil { - r.err = &LexerError{ + r.addNonfatalError(&LexerError{ + Offset: r.start, Reason: err.Error(), - } + Data: string(b), + }) } return n } @@ -853,9 +983,11 @@ func (r *Lexer) Float32() float32 { n, err := strconv.ParseFloat(s, 32) if err != nil { - r.err = &LexerError{ + r.addNonfatalError(&LexerError{ + Offset: r.start, Reason: err.Error(), - } + Data: s, + }) } return float32(n) } @@ -868,27 +1000,53 @@ func (r *Lexer) Float64() float64 { n, err := strconv.ParseFloat(s, 64) if err != nil { - r.err = &LexerError{ + r.addNonfatalError(&LexerError{ + Offset: r.start, Reason: err.Error(), - } + Data: s, + }) } return n } func (r *Lexer) Error() error { - return r.err + return r.fatalError } func (r *Lexer) AddError(e error) { - if r.err == nil { - r.err = e + if r.fatalError == nil { + r.fatalError = e } } +func (r *Lexer) AddNonFatalError(e error) { + r.addNonfatalError(&LexerError{ + Offset: r.start, + Data: string(r.Data[r.start:r.pos]), + Reason: e.Error(), + }) +} + +func (r *Lexer) addNonfatalError(err *LexerError) { + if r.UseMultipleErrors { + // We don't want to add errors with the same offset. + if len(r.multipleErrors) != 0 && r.multipleErrors[len(r.multipleErrors)-1].Offset == err.Offset { + return + } + r.multipleErrors = append(r.multipleErrors, err) + return + } + r.fatalError = err +} + +func (r *Lexer) GetNonFatalErrors() []*LexerError { + return r.multipleErrors +} + // Interface fetches an interface{} analogous to the 'encoding/json' package. func (r *Lexer) Interface() interface{} { if r.token.kind == tokenUndef && r.Ok() { - r.fetchToken() + r.FetchToken() } if !r.Ok() { diff --git a/vendor/github.com/mailru/easyjson/jlexer/lexer_test.go b/vendor/github.com/mailru/easyjson/jlexer/lexer_test.go new file mode 100644 index 000000000..b8a649898 --- /dev/null +++ b/vendor/github.com/mailru/easyjson/jlexer/lexer_test.go @@ -0,0 +1,251 @@ +package jlexer + +import ( + "bytes" + "reflect" + "testing" +) + +func TestString(t *testing.T) { + for i, test := range []struct { + toParse string + want string + wantError bool + }{ + {toParse: `"simple string"`, want: "simple string"}, + {toParse: " \r\r\n\t " + `"test"`, want: "test"}, + {toParse: `"\n\t\"\/\\\f\r"`, want: "\n\t\"/\\\f\r"}, + {toParse: `"\u0020"`, want: " "}, + {toParse: `"\u0020-\t"`, want: " -\t"}, + {toParse: `"\ufffd\uFFFD"`, want: "\ufffd\ufffd"}, + {toParse: `"\ud83d\ude00"`, want: "😀"}, + {toParse: `"\ud83d\ude08"`, want: "😈"}, + {toParse: `"\ud8"`, wantError: true}, + + {toParse: `"test"junk`, want: "test"}, + + {toParse: `5`, wantError: true}, // not a string + {toParse: `"\x"`, wantError: true}, // invalid escape + {toParse: `"\ud800"`, want: "�"}, // invalid utf-8 char; return replacement char + } { + l := Lexer{Data: []byte(test.toParse)} + + got := l.String() + if got != test.want { + t.Errorf("[%d, %q] String() = %v; want %v", i, test.toParse, got, test.want) + } + err := l.Error() + if err != nil && !test.wantError { + t.Errorf("[%d, %q] String() error: %v", i, test.toParse, err) + } else if err == nil && test.wantError { + t.Errorf("[%d, %q] String() ok; want error", i, test.toParse) + } + } +} + +func TestBytes(t *testing.T) { + for i, test := range []struct { + toParse string + want string + wantError bool + }{ + {toParse: `"c2ltcGxlIHN0cmluZw=="`, want: "simple string"}, + {toParse: " \r\r\n\t " + `"dGVzdA=="`, want: "test"}, + + {toParse: `5`, wantError: true}, // not a JSON string + {toParse: `"foobar"`, wantError: true}, // not base64 encoded + {toParse: `"c2ltcGxlIHN0cmluZw="`, wantError: true}, // invalid base64 padding + } { + l := Lexer{Data: []byte(test.toParse)} + + got := l.Bytes() + if bytes.Compare(got, []byte(test.want)) != 0 { + t.Errorf("[%d, %q] Bytes() = %v; want: %v", i, test.toParse, got, []byte(test.want)) + } + err := l.Error() + if err != nil && !test.wantError { + t.Errorf("[%d, %q] Bytes() error: %v", i, test.toParse, err) + } else if err == nil && test.wantError { + t.Errorf("[%d, %q] Bytes() ok; want error", i, test.toParse) + } + } +} + +func TestNumber(t *testing.T) { + for i, test := range []struct { + toParse string + want string + wantError bool + }{ + {toParse: "123", want: "123"}, + {toParse: "-123", want: "-123"}, + {toParse: "\r\n12.35", want: "12.35"}, + {toParse: "12.35e+1", want: "12.35e+1"}, + {toParse: "12.35e-15", want: "12.35e-15"}, + {toParse: "12.35E-15", want: "12.35E-15"}, + {toParse: "12.35E15", want: "12.35E15"}, + + {toParse: `"a"`, wantError: true}, + {toParse: "123junk", wantError: true}, + {toParse: "1.2.3", wantError: true}, + {toParse: "1e2e3", wantError: true}, + {toParse: "1e2.3", wantError: true}, + } { + l := Lexer{Data: []byte(test.toParse)} + + got := l.number() + if got != test.want { + t.Errorf("[%d, %q] number() = %v; want %v", i, test.toParse, got, test.want) + } + err := l.Error() + if err != nil && !test.wantError { + t.Errorf("[%d, %q] number() error: %v", i, test.toParse, err) + } else if err == nil && test.wantError { + t.Errorf("[%d, %q] number() ok; want error", i, test.toParse) + } + } +} + +func TestBool(t *testing.T) { + for i, test := range []struct { + toParse string + want bool + wantError bool + }{ + {toParse: "true", want: true}, + {toParse: "false", want: false}, + + {toParse: "1", wantError: true}, + {toParse: "truejunk", wantError: true}, + {toParse: `false"junk"`, wantError: true}, + {toParse: "True", wantError: true}, + {toParse: "False", wantError: true}, + } { + l := Lexer{Data: []byte(test.toParse)} + + got := l.Bool() + if got != test.want { + t.Errorf("[%d, %q] Bool() = %v; want %v", i, test.toParse, got, test.want) + } + err := l.Error() + if err != nil && !test.wantError { + t.Errorf("[%d, %q] Bool() error: %v", i, test.toParse, err) + } else if err == nil && test.wantError { + t.Errorf("[%d, %q] Bool() ok; want error", i, test.toParse) + } + } +} + +func TestSkipRecursive(t *testing.T) { + for i, test := range []struct { + toParse string + left string + wantError bool + }{ + {toParse: "5, 4", left: ", 4"}, + {toParse: "[5, 6], 4", left: ", 4"}, + {toParse: "[5, [7,8]]: 4", left: ": 4"}, + + {toParse: `{"a":1}, 4`, left: ", 4"}, + {toParse: `{"a":1, "b":{"c": 5}, "e":[12,15]}, 4`, left: ", 4"}, + + // array start/end chars in a string + {toParse: `[5, "]"], 4`, left: ", 4"}, + {toParse: `[5, "\"]"], 4`, left: ", 4"}, + {toParse: `[5, "["], 4`, left: ", 4"}, + {toParse: `[5, "\"["], 4`, left: ", 4"}, + + // object start/end chars in a string + {toParse: `{"a}":1}, 4`, left: ", 4"}, + {toParse: `{"a\"}":1}, 4`, left: ", 4"}, + {toParse: `{"a{":1}, 4`, left: ", 4"}, + {toParse: `{"a\"{":1}, 4`, left: ", 4"}, + + // object with double slashes at the end of string + {toParse: `{"a":"hey\\"}, 4`, left: ", 4"}, + } { + l := Lexer{Data: []byte(test.toParse)} + + l.SkipRecursive() + + got := string(l.Data[l.pos:]) + if got != test.left { + t.Errorf("[%d, %q] SkipRecursive() left = %v; want %v", i, test.toParse, got, test.left) + } + err := l.Error() + if err != nil && !test.wantError { + t.Errorf("[%d, %q] SkipRecursive() error: %v", i, test.toParse, err) + } else if err == nil && test.wantError { + t.Errorf("[%d, %q] SkipRecursive() ok; want error", i, test.toParse) + } + } +} + +func TestInterface(t *testing.T) { + for i, test := range []struct { + toParse string + want interface{} + wantError bool + }{ + {toParse: "null", want: nil}, + {toParse: "true", want: true}, + {toParse: `"a"`, want: "a"}, + {toParse: "5", want: float64(5)}, + + {toParse: `{}`, want: map[string]interface{}{}}, + {toParse: `[]`, want: []interface{}(nil)}, + + {toParse: `{"a": "b"}`, want: map[string]interface{}{"a": "b"}}, + {toParse: `[5]`, want: []interface{}{float64(5)}}, + + {toParse: `{"a":5 , "b" : "string"}`, want: map[string]interface{}{"a": float64(5), "b": "string"}}, + {toParse: `["a", 5 , null, true]`, want: []interface{}{"a", float64(5), nil, true}}, + + {toParse: `{"a" "b"}`, wantError: true}, + {toParse: `{"a": "b",}`, wantError: true}, + {toParse: `{"a":"b","c" "b"}`, wantError: true}, + {toParse: `{"a": "b","c":"d",}`, wantError: true}, + {toParse: `{,}`, wantError: true}, + + {toParse: `[1, 2,]`, wantError: true}, + {toParse: `[1 2]`, wantError: true}, + {toParse: `[,]`, wantError: true}, + } { + l := Lexer{Data: []byte(test.toParse)} + + got := l.Interface() + if !reflect.DeepEqual(got, test.want) { + t.Errorf("[%d, %q] Interface() = %v; want %v", i, test.toParse, got, test.want) + } + err := l.Error() + if err != nil && !test.wantError { + t.Errorf("[%d, %q] Interface() error: %v", i, test.toParse, err) + } else if err == nil && test.wantError { + t.Errorf("[%d, %q] Interface() ok; want error", i, test.toParse) + } + } +} + +func TestConsumed(t *testing.T) { + for i, test := range []struct { + toParse string + wantError bool + }{ + {toParse: "", wantError: false}, + {toParse: " ", wantError: false}, + {toParse: "\r\n", wantError: false}, + {toParse: "\t\t", wantError: false}, + + {toParse: "{", wantError: true}, + } { + l := Lexer{Data: []byte(test.toParse)} + l.Consumed() + + err := l.Error() + if err != nil && !test.wantError { + t.Errorf("[%d, %q] Consumed() error: %v", i, test.toParse, err) + } else if err == nil && test.wantError { + t.Errorf("[%d, %q] Consumed() ok; want error", i, test.toParse) + } + } +} diff --git a/vendor/github.com/mailru/easyjson/jwriter/writer.go b/vendor/github.com/mailru/easyjson/jwriter/writer.go index 907675f9c..7b55293a0 100644 --- a/vendor/github.com/mailru/easyjson/jwriter/writer.go +++ b/vendor/github.com/mailru/easyjson/jwriter/writer.go @@ -2,6 +2,7 @@ package jwriter import ( + "encoding/base64" "io" "strconv" "unicode/utf8" @@ -9,10 +10,22 @@ import ( "github.com/mailru/easyjson/buffer" ) +// Flags describe various encoding options. The behavior may be actually implemented in the encoder, but +// Flags field in Writer is used to set and pass them around. +type Flags int + +const ( + NilMapAsEmpty Flags = 1 << iota // Encode nil map as '{}' rather than 'null'. + NilSliceAsEmpty // Encode nil slice as '[]' rather than 'null'. +) + // Writer is a JSON writer. type Writer struct { - Error error - Buffer buffer.Buffer + Flags Flags + + Error error + Buffer buffer.Buffer + NoEscapeHTML bool } // Size returns the size of the data that was written out. @@ -25,13 +38,24 @@ func (w *Writer) DumpTo(out io.Writer) (written int, err error) { return w.Buffer.DumpTo(out) } -// BuildBytes returns writer data as a single byte slice. -func (w *Writer) BuildBytes() ([]byte, error) { +// BuildBytes returns writer data as a single byte slice. You can optionally provide one byte slice +// as argument that it will try to reuse. +func (w *Writer) BuildBytes(reuse ...[]byte) ([]byte, error) { if w.Error != nil { return nil, w.Error } - return w.Buffer.BuildBytes(), nil + return w.Buffer.BuildBytes(reuse...), nil +} + +// ReadCloser returns an io.ReadCloser that can be used to read the data. +// ReadCloser also resets the buffer. +func (w *Writer) ReadCloser() (io.ReadCloser, error) { + if w.Error != nil { + return nil, w.Error + } + + return w.Buffer.ReadCloser(), nil } // RawByte appends raw binary data to the buffer. @@ -44,7 +68,7 @@ func (w *Writer) RawString(s string) { w.Buffer.AppendString(s) } -// RawByte appends raw binary data to the buffer or sets the error if it is given. Useful for +// Raw appends raw binary data to the buffer or sets the error if it is given. Useful for // calling with results of MarshalJSON-like functions. func (w *Writer) Raw(data []byte, err error) { switch { @@ -59,6 +83,34 @@ func (w *Writer) Raw(data []byte, err error) { } } +// RawText encloses raw binary data in quotes and appends in to the buffer. +// Useful for calling with results of MarshalText-like functions. +func (w *Writer) RawText(data []byte, err error) { + switch { + case w.Error != nil: + return + case err != nil: + w.Error = err + case len(data) > 0: + w.String(string(data)) + default: + w.RawString("null") + } +} + +// Base64Bytes appends data to the buffer after base64 encoding it +func (w *Writer) Base64Bytes(data []byte) { + if data == nil { + w.Buffer.AppendString("null") + return + } + w.Buffer.AppendByte('"') + dst := make([]byte, base64.StdEncoding.EncodedLen(len(data))) + base64.StdEncoding.Encode(dst, data) + w.Buffer.AppendBytes(dst) + w.Buffer.AppendByte('"') +} + func (w *Writer) Uint8(n uint8) { w.Buffer.EnsureSpace(3) w.Buffer.Buf = strconv.AppendUint(w.Buffer.Buf, uint64(n), 10) @@ -200,6 +252,16 @@ func (w *Writer) Bool(v bool) { const chars = "0123456789abcdef" +func isNotEscapedSingleChar(c byte, escapeHTML bool) bool { + // Note: might make sense to use a table if there are more chars to escape. With 4 chars + // it benchmarks the same. + if escapeHTML { + return c != '<' && c != '>' && c != '&' && c != '\\' && c != '"' && c >= 0x20 && c < utf8.RuneSelf + } else { + return c != '\\' && c != '"' && c >= 0x20 && c < utf8.RuneSelf + } +} + func (w *Writer) String(s string) { w.Buffer.AppendByte('"') @@ -209,39 +271,32 @@ func (w *Writer) String(s string) { p := 0 // last non-escape symbol for i := 0; i < len(s); { - // single-with character - if c := s[i]; c < utf8.RuneSelf { - var escape byte + c := s[i] + + if isNotEscapedSingleChar(c, !w.NoEscapeHTML) { + // single-width character, no escaping is required + i++ + continue + } else if c < utf8.RuneSelf { + // single-with character, need to escape + w.Buffer.AppendString(s[p:i]) switch c { case '\t': - escape = 't' + w.Buffer.AppendString(`\t`) case '\r': - escape = 'r' + w.Buffer.AppendString(`\r`) case '\n': - escape = 'n' + w.Buffer.AppendString(`\n`) case '\\': - escape = '\\' + w.Buffer.AppendString(`\\`) case '"': - escape = '"' - case '<', '>': - // do nothing + w.Buffer.AppendString(`\"`) default: - if c >= 0x20 { - // no escaping is required - i++ - continue - } - } - if escape != 0 { - w.Buffer.AppendString(s[p:i]) - w.Buffer.AppendByte('\\') - w.Buffer.AppendByte(escape) - } else { - w.Buffer.AppendString(s[p:i]) w.Buffer.AppendString(`\u00`) w.Buffer.AppendByte(chars[c>>4]) w.Buffer.AppendByte(chars[c&0xf]) } + i++ p = i continue diff --git a/vendor/github.com/mailru/easyjson/raw.go b/vendor/github.com/mailru/easyjson/raw.go new file mode 100644 index 000000000..81bd002e1 --- /dev/null +++ b/vendor/github.com/mailru/easyjson/raw.go @@ -0,0 +1,45 @@ +package easyjson + +import ( + "github.com/mailru/easyjson/jlexer" + "github.com/mailru/easyjson/jwriter" +) + +// RawMessage is a raw piece of JSON (number, string, bool, object, array or +// null) that is extracted without parsing and output as is during marshaling. +type RawMessage []byte + +// MarshalEasyJSON does JSON marshaling using easyjson interface. +func (v *RawMessage) MarshalEasyJSON(w *jwriter.Writer) { + if len(*v) == 0 { + w.RawString("null") + } else { + w.Raw(*v, nil) + } +} + +// UnmarshalEasyJSON does JSON unmarshaling using easyjson interface. +func (v *RawMessage) UnmarshalEasyJSON(l *jlexer.Lexer) { + *v = RawMessage(l.Raw()) +} + +// UnmarshalJSON implements encoding/json.Unmarshaler interface. +func (v *RawMessage) UnmarshalJSON(data []byte) error { + *v = data + return nil +} + +var nullBytes = []byte("null") + +// MarshalJSON implements encoding/json.Marshaler interface. +func (v RawMessage) MarshalJSON() ([]byte, error) { + if len(v) == 0 { + return nullBytes, nil + } + return v, nil +} + +// IsDefined is required for integration with omitempty easyjson logic. +func (v *RawMessage) IsDefined() bool { + return len(*v) > 0 +} diff --git a/vendor/github.com/matttproud/golang_protobuf_extensions/.travis.yml b/vendor/github.com/matttproud/golang_protobuf_extensions/.travis.yml new file mode 100644 index 000000000..f1309c9f8 --- /dev/null +++ b/vendor/github.com/matttproud/golang_protobuf_extensions/.travis.yml @@ -0,0 +1,2 @@ +language: go + diff --git a/vendor/github.com/matttproud/golang_protobuf_extensions/LICENSE b/vendor/github.com/matttproud/golang_protobuf_extensions/LICENSE index 13f15dfce..8dada3eda 100644 --- a/vendor/github.com/matttproud/golang_protobuf_extensions/LICENSE +++ b/vendor/github.com/matttproud/golang_protobuf_extensions/LICENSE @@ -178,7 +178,7 @@ APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" + boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2013 Matt T. Proud + Copyright {yyyy} {name of copyright owner} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/github.com/matttproud/golang_protobuf_extensions/NOTICE b/vendor/github.com/matttproud/golang_protobuf_extensions/NOTICE new file mode 100644 index 000000000..5d8cb5b72 --- /dev/null +++ b/vendor/github.com/matttproud/golang_protobuf_extensions/NOTICE @@ -0,0 +1 @@ +Copyright 2012 Matt T. Proud (matt.proud@gmail.com) diff --git a/vendor/github.com/matttproud/golang_protobuf_extensions/README.md b/vendor/github.com/matttproud/golang_protobuf_extensions/README.md new file mode 100644 index 000000000..751ee6967 --- /dev/null +++ b/vendor/github.com/matttproud/golang_protobuf_extensions/README.md @@ -0,0 +1,20 @@ +# Overview +This repository provides various Protocol Buffer extensions for the Go +language (golang), namely support for record length-delimited message +streaming. + +| Java | Go | +| ------------------------------ | --------------------- | +| MessageLite#parseDelimitedFrom | pbutil.ReadDelimited | +| MessageLite#writeDelimitedTo | pbutil.WriteDelimited | + +Because [Code Review 9102043](https://codereview.appspot.com/9102043/) is +destined to never be merged into mainline (i.e., never be promoted to formal +[goprotobuf features](https://github.com/golang/protobuf)), this repository +will live here in the wild. + +# Documentation +We have [generated Go Doc documentation](http://godoc.org/github.com/matttproud/golang_protobuf_extensions/pbutil) here. + +# Testing +[![Build Status](https://travis-ci.org/matttproud/golang_protobuf_extensions.png?branch=master)](https://travis-ci.org/matttproud/golang_protobuf_extensions) diff --git a/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/all_test.go b/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/all_test.go new file mode 100644 index 000000000..5c463722d --- /dev/null +++ b/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/all_test.go @@ -0,0 +1,177 @@ +// Copyright 2013 Matt T. Proud +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pbutil + +import ( + "bytes" + "testing" + + . "github.com/golang/protobuf/proto" + . "github.com/golang/protobuf/proto/testdata" +) + +func TestWriteDelimited(t *testing.T) { + t.Parallel() + for _, test := range []struct { + msg Message + buf []byte + n int + err error + }{ + { + msg: &Empty{}, + n: 1, + buf: []byte{0}, + }, + { + msg: &GoEnum{Foo: FOO_FOO1.Enum()}, + n: 3, + buf: []byte{2, 8, 1}, + }, + { + msg: &Strings{ + StringField: String(`This is my gigantic, unhappy string. It exceeds +the encoding size of a single byte varint. We are using it to fuzz test the +correctness of the header decoding mechanisms, which may prove problematic. +I expect it may. Let's hope you enjoy testing as much as we do.`), + }, + n: 271, + buf: []byte{141, 2, 10, 138, 2, 84, 104, 105, 115, 32, 105, 115, 32, 109, + 121, 32, 103, 105, 103, 97, 110, 116, 105, 99, 44, 32, 117, 110, 104, + 97, 112, 112, 121, 32, 115, 116, 114, 105, 110, 103, 46, 32, 32, 73, + 116, 32, 101, 120, 99, 101, 101, 100, 115, 10, 116, 104, 101, 32, 101, + 110, 99, 111, 100, 105, 110, 103, 32, 115, 105, 122, 101, 32, 111, 102, + 32, 97, 32, 115, 105, 110, 103, 108, 101, 32, 98, 121, 116, 101, 32, + 118, 97, 114, 105, 110, 116, 46, 32, 32, 87, 101, 32, 97, 114, 101, 32, + 117, 115, 105, 110, 103, 32, 105, 116, 32, 116, 111, 32, 102, 117, 122, + 122, 32, 116, 101, 115, 116, 32, 116, 104, 101, 10, 99, 111, 114, 114, + 101, 99, 116, 110, 101, 115, 115, 32, 111, 102, 32, 116, 104, 101, 32, + 104, 101, 97, 100, 101, 114, 32, 100, 101, 99, 111, 100, 105, 110, 103, + 32, 109, 101, 99, 104, 97, 110, 105, 115, 109, 115, 44, 32, 119, 104, + 105, 99, 104, 32, 109, 97, 121, 32, 112, 114, 111, 118, 101, 32, 112, + 114, 111, 98, 108, 101, 109, 97, 116, 105, 99, 46, 10, 73, 32, 101, 120, + 112, 101, 99, 116, 32, 105, 116, 32, 109, 97, 121, 46, 32, 32, 76, 101, + 116, 39, 115, 32, 104, 111, 112, 101, 32, 121, 111, 117, 32, 101, 110, + 106, 111, 121, 32, 116, 101, 115, 116, 105, 110, 103, 32, 97, 115, 32, + 109, 117, 99, 104, 32, 97, 115, 32, 119, 101, 32, 100, 111, 46}, + }, + } { + var buf bytes.Buffer + if n, err := WriteDelimited(&buf, test.msg); n != test.n || err != test.err { + t.Fatalf("WriteDelimited(buf, %#v) = %v, %v; want %v, %v", test.msg, n, err, test.n, test.err) + } + if out := buf.Bytes(); !bytes.Equal(out, test.buf) { + t.Fatalf("WriteDelimited(buf, %#v); buf = %v; want %v", test.msg, out, test.buf) + } + } +} + +func TestReadDelimited(t *testing.T) { + t.Parallel() + for _, test := range []struct { + buf []byte + msg Message + n int + err error + }{ + { + buf: []byte{0}, + msg: &Empty{}, + n: 1, + }, + { + n: 3, + buf: []byte{2, 8, 1}, + msg: &GoEnum{Foo: FOO_FOO1.Enum()}, + }, + { + buf: []byte{141, 2, 10, 138, 2, 84, 104, 105, 115, 32, 105, 115, 32, 109, + 121, 32, 103, 105, 103, 97, 110, 116, 105, 99, 44, 32, 117, 110, 104, + 97, 112, 112, 121, 32, 115, 116, 114, 105, 110, 103, 46, 32, 32, 73, + 116, 32, 101, 120, 99, 101, 101, 100, 115, 10, 116, 104, 101, 32, 101, + 110, 99, 111, 100, 105, 110, 103, 32, 115, 105, 122, 101, 32, 111, 102, + 32, 97, 32, 115, 105, 110, 103, 108, 101, 32, 98, 121, 116, 101, 32, + 118, 97, 114, 105, 110, 116, 46, 32, 32, 87, 101, 32, 97, 114, 101, 32, + 117, 115, 105, 110, 103, 32, 105, 116, 32, 116, 111, 32, 102, 117, 122, + 122, 32, 116, 101, 115, 116, 32, 116, 104, 101, 10, 99, 111, 114, 114, + 101, 99, 116, 110, 101, 115, 115, 32, 111, 102, 32, 116, 104, 101, 32, + 104, 101, 97, 100, 101, 114, 32, 100, 101, 99, 111, 100, 105, 110, 103, + 32, 109, 101, 99, 104, 97, 110, 105, 115, 109, 115, 44, 32, 119, 104, + 105, 99, 104, 32, 109, 97, 121, 32, 112, 114, 111, 118, 101, 32, 112, + 114, 111, 98, 108, 101, 109, 97, 116, 105, 99, 46, 10, 73, 32, 101, 120, + 112, 101, 99, 116, 32, 105, 116, 32, 109, 97, 121, 46, 32, 32, 76, 101, + 116, 39, 115, 32, 104, 111, 112, 101, 32, 121, 111, 117, 32, 101, 110, + 106, 111, 121, 32, 116, 101, 115, 116, 105, 110, 103, 32, 97, 115, 32, + 109, 117, 99, 104, 32, 97, 115, 32, 119, 101, 32, 100, 111, 46}, + msg: &Strings{ + StringField: String(`This is my gigantic, unhappy string. It exceeds +the encoding size of a single byte varint. We are using it to fuzz test the +correctness of the header decoding mechanisms, which may prove problematic. +I expect it may. Let's hope you enjoy testing as much as we do.`), + }, + n: 271, + }, + } { + msg := Clone(test.msg) + msg.Reset() + if n, err := ReadDelimited(bytes.NewBuffer(test.buf), msg); n != test.n || err != test.err { + t.Fatalf("ReadDelimited(%v, msg) = %v, %v; want %v, %v", test.buf, n, err, test.n, test.err) + } + if !Equal(msg, test.msg) { + t.Fatalf("ReadDelimited(%v, msg); msg = %v; want %v", test.buf, msg, test.msg) + } + } +} + +func TestEndToEndValid(t *testing.T) { + t.Parallel() + for _, test := range [][]Message{ + {&Empty{}}, + {&GoEnum{Foo: FOO_FOO1.Enum()}, &Empty{}, &GoEnum{Foo: FOO_FOO1.Enum()}}, + {&GoEnum{Foo: FOO_FOO1.Enum()}}, + {&Strings{ + StringField: String(`This is my gigantic, unhappy string. It exceeds +the encoding size of a single byte varint. We are using it to fuzz test the +correctness of the header decoding mechanisms, which may prove problematic. +I expect it may. Let's hope you enjoy testing as much as we do.`), + }}, + } { + var buf bytes.Buffer + var written int + for i, msg := range test { + n, err := WriteDelimited(&buf, msg) + if err != nil { + // Assumption: TestReadDelimited and TestWriteDelimited are sufficient + // and inputs for this test are explicitly exercised there. + t.Fatalf("WriteDelimited(buf, %v[%d]) = ?, %v; wanted ?, nil", test, i, err) + } + written += n + } + var read int + for i, msg := range test { + out := Clone(msg) + out.Reset() + n, _ := ReadDelimited(&buf, out) + // Decide to do EOF checking? + read += n + if !Equal(out, msg) { + t.Fatalf("out = %v; want %v[%d] = %#v", out, test, i, msg) + } + } + if read != written { + t.Fatalf("%v read = %d; want %d", test, read, written) + } + } +} diff --git a/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/decode.go b/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/decode.go index 66d9b5458..258c0636a 100644 --- a/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/decode.go +++ b/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/decode.go @@ -38,7 +38,7 @@ var errInvalidVarint = errors.New("invalid varint32 encountered") func ReadDelimited(r io.Reader, m proto.Message) (n int, err error) { // Per AbstractParser#parsePartialDelimitedFrom with // CodedInputStream#readRawVarint32. - headerBuf := make([]byte, binary.MaxVarintLen32) + var headerBuf [binary.MaxVarintLen32]byte var bytesRead, varIntBytes int var messageLength uint64 for varIntBytes == 0 { // i.e. no varint has been decoded yet. diff --git a/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/decode_test.go b/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/decode_test.go new file mode 100644 index 000000000..364a7b799 --- /dev/null +++ b/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/decode_test.go @@ -0,0 +1,99 @@ +// Copyright 2016 Matt T. Proud +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pbutil + +import ( + "bytes" + "io" + "testing" + "testing/iotest" +) + +func TestReadDelimitedIllegalVarint(t *testing.T) { + t.Parallel() + var tests = []struct { + in []byte + n int + err error + }{ + { + in: []byte{255, 255, 255, 255, 255}, + n: 5, + err: errInvalidVarint, + }, + { + in: []byte{255, 255, 255, 255, 255, 255}, + n: 5, + err: errInvalidVarint, + }, + } + for _, test := range tests { + n, err := ReadDelimited(bytes.NewReader(test.in), nil) + if got, want := n, test.n; got != want { + t.Errorf("ReadDelimited(%#v, nil) = %#v, ?; want = %v#, ?", test.in, got, want) + } + if got, want := err, test.err; got != want { + t.Errorf("ReadDelimited(%#v, nil) = ?, %#v; want = ?, %#v", test.in, got, want) + } + } +} + +func TestReadDelimitedPrematureHeader(t *testing.T) { + t.Parallel() + var data = []byte{128, 5} // 256 + 256 + 128 + n, err := ReadDelimited(bytes.NewReader(data[0:1]), nil) + if got, want := n, 1; got != want { + t.Errorf("ReadDelimited(%#v, nil) = %#v, ?; want = %v#, ?", data[0:1], got, want) + } + if got, want := err, io.EOF; got != want { + t.Errorf("ReadDelimited(%#v, nil) = ?, %#v; want = ?, %#v", data[0:1], got, want) + } +} + +func TestReadDelimitedPrematureBody(t *testing.T) { + t.Parallel() + var data = []byte{128, 5, 0, 0, 0} // 256 + 256 + 128 + n, err := ReadDelimited(bytes.NewReader(data[:]), nil) + if got, want := n, 5; got != want { + t.Errorf("ReadDelimited(%#v, nil) = %#v, ?; want = %v#, ?", data, got, want) + } + if got, want := err, io.ErrUnexpectedEOF; got != want { + t.Errorf("ReadDelimited(%#v, nil) = ?, %#v; want = ?, %#v", data, got, want) + } +} + +func TestReadDelimitedPrematureHeaderIncremental(t *testing.T) { + t.Parallel() + var data = []byte{128, 5} // 256 + 256 + 128 + n, err := ReadDelimited(iotest.OneByteReader(bytes.NewReader(data[0:1])), nil) + if got, want := n, 1; got != want { + t.Errorf("ReadDelimited(%#v, nil) = %#v, ?; want = %v#, ?", data[0:1], got, want) + } + if got, want := err, io.EOF; got != want { + t.Errorf("ReadDelimited(%#v, nil) = ?, %#v; want = ?, %#v", data[0:1], got, want) + } +} + +func TestReadDelimitedPrematureBodyIncremental(t *testing.T) { + t.Parallel() + var data = []byte{128, 5, 0, 0, 0} // 256 + 256 + 128 + n, err := ReadDelimited(iotest.OneByteReader(bytes.NewReader(data[:])), nil) + if got, want := n, 5; got != want { + t.Errorf("ReadDelimited(%#v, nil) = %#v, ?; want = %v#, ?", data, got, want) + } + if got, want := err, io.ErrUnexpectedEOF; got != want { + t.Errorf("ReadDelimited(%#v, nil) = ?, %#v; want = ?, %#v", data, got, want) + } +} diff --git a/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/encode.go b/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/encode.go index 4b76ea9a1..8fb59ad22 100644 --- a/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/encode.go +++ b/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/encode.go @@ -33,8 +33,8 @@ func WriteDelimited(w io.Writer, m proto.Message) (n int, err error) { return 0, err } - buf := make([]byte, binary.MaxVarintLen32) - encodedLength := binary.PutUvarint(buf, uint64(len(buffer))) + var buf [binary.MaxVarintLen32]byte + encodedLength := binary.PutUvarint(buf[:], uint64(len(buffer))) sync, err := w.Write(buf[:encodedLength]) if err != nil { diff --git a/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/encode_test.go b/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/encode_test.go new file mode 100644 index 000000000..f92632b0b --- /dev/null +++ b/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/encode_test.go @@ -0,0 +1,67 @@ +// Copyright 2016 Matt T. Proud +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pbutil + +import ( + "bytes" + "errors" + "testing" + + "github.com/golang/protobuf/proto" +) + +var errMarshal = errors.New("pbutil: can't marshal") + +type cantMarshal struct{ proto.Message } + +func (cantMarshal) Marshal() ([]byte, error) { return nil, errMarshal } + +var _ proto.Message = cantMarshal{} + +func TestWriteDelimitedMarshalErr(t *testing.T) { + t.Parallel() + var data cantMarshal + var buf bytes.Buffer + n, err := WriteDelimited(&buf, data) + if got, want := n, 0; got != want { + t.Errorf("WriteDelimited(buf, %#v) = %#v, ?; want = %v#, ?", data, got, want) + } + if got, want := err, errMarshal; got != want { + t.Errorf("WriteDelimited(buf, %#v) = ?, %#v; want = ?, %#v", data, got, want) + } +} + +type canMarshal struct{ proto.Message } + +func (canMarshal) Marshal() ([]byte, error) { return []byte{0, 1, 2, 3, 4, 5}, nil } + +var errWrite = errors.New("pbutil: can't write") + +type cantWrite struct{} + +func (cantWrite) Write([]byte) (int, error) { return 0, errWrite } + +func TestWriteDelimitedWriteErr(t *testing.T) { + t.Parallel() + var data canMarshal + var buf cantWrite + n, err := WriteDelimited(buf, data) + if got, want := n, 0; got != want { + t.Errorf("WriteDelimited(buf, %#v) = %#v, ?; want = %v#, ?", data, got, want) + } + if got, want := err, errWrite; got != want { + t.Errorf("WriteDelimited(buf, %#v) = ?, %#v; want = ?, %#v", data, got, want) + } +} diff --git a/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/fixtures_test.go b/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/fixtures_test.go new file mode 100644 index 000000000..d6d9b2559 --- /dev/null +++ b/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/fixtures_test.go @@ -0,0 +1,103 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// http://github.com/golang/protobuf/ +// +// 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. + +package pbutil + +import ( + . "github.com/golang/protobuf/proto" + . "github.com/golang/protobuf/proto/testdata" +) + +// FROM https://github.com/golang/protobuf/blob/master/proto/all_test.go. + +func initGoTestField() *GoTestField { + f := new(GoTestField) + f.Label = String("label") + f.Type = String("type") + return f +} + +// These are all structurally equivalent but the tag numbers differ. +// (It's remarkable that required, optional, and repeated all have +// 8 letters.) +func initGoTest_RequiredGroup() *GoTest_RequiredGroup { + return &GoTest_RequiredGroup{ + RequiredField: String("required"), + } +} + +func initGoTest_OptionalGroup() *GoTest_OptionalGroup { + return &GoTest_OptionalGroup{ + RequiredField: String("optional"), + } +} + +func initGoTest_RepeatedGroup() *GoTest_RepeatedGroup { + return &GoTest_RepeatedGroup{ + RequiredField: String("repeated"), + } +} + +func initGoTest(setdefaults bool) *GoTest { + pb := new(GoTest) + if setdefaults { + pb.F_BoolDefaulted = Bool(Default_GoTest_F_BoolDefaulted) + pb.F_Int32Defaulted = Int32(Default_GoTest_F_Int32Defaulted) + pb.F_Int64Defaulted = Int64(Default_GoTest_F_Int64Defaulted) + pb.F_Fixed32Defaulted = Uint32(Default_GoTest_F_Fixed32Defaulted) + pb.F_Fixed64Defaulted = Uint64(Default_GoTest_F_Fixed64Defaulted) + pb.F_Uint32Defaulted = Uint32(Default_GoTest_F_Uint32Defaulted) + pb.F_Uint64Defaulted = Uint64(Default_GoTest_F_Uint64Defaulted) + pb.F_FloatDefaulted = Float32(Default_GoTest_F_FloatDefaulted) + pb.F_DoubleDefaulted = Float64(Default_GoTest_F_DoubleDefaulted) + pb.F_StringDefaulted = String(Default_GoTest_F_StringDefaulted) + pb.F_BytesDefaulted = Default_GoTest_F_BytesDefaulted + pb.F_Sint32Defaulted = Int32(Default_GoTest_F_Sint32Defaulted) + pb.F_Sint64Defaulted = Int64(Default_GoTest_F_Sint64Defaulted) + } + + pb.Kind = GoTest_TIME.Enum() + pb.RequiredField = initGoTestField() + pb.F_BoolRequired = Bool(true) + pb.F_Int32Required = Int32(3) + pb.F_Int64Required = Int64(6) + pb.F_Fixed32Required = Uint32(32) + pb.F_Fixed64Required = Uint64(64) + pb.F_Uint32Required = Uint32(3232) + pb.F_Uint64Required = Uint64(6464) + pb.F_FloatRequired = Float32(3232) + pb.F_DoubleRequired = Float64(6464) + pb.F_StringRequired = String("string") + pb.F_BytesRequired = []byte("bytes") + pb.F_Sint32Required = Int32(-32) + pb.F_Sint64Required = Int64(-64) + pb.Requiredgroup = initGoTest_RequiredGroup() + + return pb +} diff --git a/vendor/github.com/mitchellh/go-ps/process_darwin_test.go b/vendor/github.com/mitchellh/go-ps/process_darwin_test.go new file mode 100644 index 000000000..ee04c5c28 --- /dev/null +++ b/vendor/github.com/mitchellh/go-ps/process_darwin_test.go @@ -0,0 +1,11 @@ +// +build darwin + +package ps + +import ( + "testing" +) + +func TestDarwinProcess_impl(t *testing.T) { + var _ Process = new(DarwinProcess) +} diff --git a/vendor/github.com/mitchellh/go-ps/process_test.go b/vendor/github.com/mitchellh/go-ps/process_test.go new file mode 100644 index 000000000..1bcbc3279 --- /dev/null +++ b/vendor/github.com/mitchellh/go-ps/process_test.go @@ -0,0 +1,45 @@ +package ps + +import ( + "os" + "testing" +) + +func TestFindProcess(t *testing.T) { + p, err := FindProcess(os.Getpid()) + if err != nil { + t.Fatalf("err: %s", err) + } + if p == nil { + t.Fatal("should have process") + } + + if p.Pid() != os.Getpid() { + t.Fatalf("bad: %#v", p.Pid()) + } +} + +func TestProcesses(t *testing.T) { + // This test works because there will always be SOME processes + // running. + p, err := Processes() + if err != nil { + t.Fatalf("err: %s", err) + } + + if len(p) <= 0 { + t.Fatal("should have processes") + } + + found := false + for _, p1 := range p { + if p1.Executable() == "go" || p1.Executable() == "go.exe" { + found = true + break + } + } + + if !found { + t.Fatal("should have Go") + } +} diff --git a/vendor/github.com/mitchellh/go-ps/process_unix_test.go b/vendor/github.com/mitchellh/go-ps/process_unix_test.go new file mode 100644 index 000000000..754073e55 --- /dev/null +++ b/vendor/github.com/mitchellh/go-ps/process_unix_test.go @@ -0,0 +1,11 @@ +// +build linux solaris + +package ps + +import ( + "testing" +) + +func TestUnixProcess_impl(t *testing.T) { + var _ Process = new(UnixProcess) +} diff --git a/vendor/github.com/mitchellh/mapstructure/.travis.yml b/vendor/github.com/mitchellh/mapstructure/.travis.yml index 7f3fe9a96..5c14c1339 100644 --- a/vendor/github.com/mitchellh/mapstructure/.travis.yml +++ b/vendor/github.com/mitchellh/mapstructure/.travis.yml @@ -1,7 +1,7 @@ language: go go: - - 1.4 + - 1.8.1 script: - go test diff --git a/vendor/github.com/mitchellh/mapstructure/decode_hooks.go b/vendor/github.com/mitchellh/mapstructure/decode_hooks.go index 115ae67c1..afcfd5eed 100644 --- a/vendor/github.com/mitchellh/mapstructure/decode_hooks.go +++ b/vendor/github.com/mitchellh/mapstructure/decode_hooks.go @@ -38,12 +38,6 @@ func DecodeHookExec( raw DecodeHookFunc, from reflect.Type, to reflect.Type, data interface{}) (interface{}, error) { - // Build our arguments that reflect expects - argVals := make([]reflect.Value, 3) - argVals[0] = reflect.ValueOf(from) - argVals[1] = reflect.ValueOf(to) - argVals[2] = reflect.ValueOf(data) - switch f := typedDecodeHook(raw).(type) { case DecodeHookFuncType: return f(from, to, data) @@ -121,6 +115,11 @@ func StringToTimeDurationHookFunc() DecodeHookFunc { } } +// WeaklyTypedHook is a DecodeHookFunc which adds support for weak typing to +// the decoder. +// +// Note that this is significantly different from the WeaklyTypedInput option +// of the DecoderConfig. func WeaklyTypedHook( f reflect.Kind, t reflect.Kind, @@ -132,9 +131,8 @@ func WeaklyTypedHook( case reflect.Bool: if dataVal.Bool() { return "1", nil - } else { - return "0", nil } + return "0", nil case reflect.Float32: return strconv.FormatFloat(dataVal.Float(), 'f', -1, 64), nil case reflect.Int: diff --git a/vendor/github.com/mitchellh/mapstructure/decode_hooks_test.go b/vendor/github.com/mitchellh/mapstructure/decode_hooks_test.go new file mode 100644 index 000000000..53289afcf --- /dev/null +++ b/vendor/github.com/mitchellh/mapstructure/decode_hooks_test.go @@ -0,0 +1,229 @@ +package mapstructure + +import ( + "errors" + "reflect" + "testing" + "time" +) + +func TestComposeDecodeHookFunc(t *testing.T) { + f1 := func( + f reflect.Kind, + t reflect.Kind, + data interface{}) (interface{}, error) { + return data.(string) + "foo", nil + } + + f2 := func( + f reflect.Kind, + t reflect.Kind, + data interface{}) (interface{}, error) { + return data.(string) + "bar", nil + } + + f := ComposeDecodeHookFunc(f1, f2) + + result, err := DecodeHookExec( + f, reflect.TypeOf(""), reflect.TypeOf([]byte("")), "") + if err != nil { + t.Fatalf("bad: %s", err) + } + if result.(string) != "foobar" { + t.Fatalf("bad: %#v", result) + } +} + +func TestComposeDecodeHookFunc_err(t *testing.T) { + f1 := func(reflect.Kind, reflect.Kind, interface{}) (interface{}, error) { + return nil, errors.New("foo") + } + + f2 := func(reflect.Kind, reflect.Kind, interface{}) (interface{}, error) { + panic("NOPE") + } + + f := ComposeDecodeHookFunc(f1, f2) + + _, err := DecodeHookExec( + f, reflect.TypeOf(""), reflect.TypeOf([]byte("")), 42) + if err.Error() != "foo" { + t.Fatalf("bad: %s", err) + } +} + +func TestComposeDecodeHookFunc_kinds(t *testing.T) { + var f2From reflect.Kind + + f1 := func( + f reflect.Kind, + t reflect.Kind, + data interface{}) (interface{}, error) { + return int(42), nil + } + + f2 := func( + f reflect.Kind, + t reflect.Kind, + data interface{}) (interface{}, error) { + f2From = f + return data, nil + } + + f := ComposeDecodeHookFunc(f1, f2) + + _, err := DecodeHookExec( + f, reflect.TypeOf(""), reflect.TypeOf([]byte("")), "") + if err != nil { + t.Fatalf("bad: %s", err) + } + if f2From != reflect.Int { + t.Fatalf("bad: %#v", f2From) + } +} + +func TestStringToSliceHookFunc(t *testing.T) { + f := StringToSliceHookFunc(",") + + strType := reflect.TypeOf("") + sliceType := reflect.TypeOf([]byte("")) + cases := []struct { + f, t reflect.Type + data interface{} + result interface{} + err bool + }{ + {sliceType, sliceType, 42, 42, false}, + {strType, strType, 42, 42, false}, + { + strType, + sliceType, + "foo,bar,baz", + []string{"foo", "bar", "baz"}, + false, + }, + { + strType, + sliceType, + "", + []string{}, + false, + }, + } + + for i, tc := range cases { + actual, err := DecodeHookExec(f, tc.f, tc.t, tc.data) + if tc.err != (err != nil) { + t.Fatalf("case %d: expected err %#v", i, tc.err) + } + if !reflect.DeepEqual(actual, tc.result) { + t.Fatalf( + "case %d: expected %#v, got %#v", + i, tc.result, actual) + } + } +} + +func TestStringToTimeDurationHookFunc(t *testing.T) { + f := StringToTimeDurationHookFunc() + + strType := reflect.TypeOf("") + timeType := reflect.TypeOf(time.Duration(5)) + cases := []struct { + f, t reflect.Type + data interface{} + result interface{} + err bool + }{ + {strType, timeType, "5s", 5 * time.Second, false}, + {strType, timeType, "5", time.Duration(0), true}, + {strType, strType, "5", "5", false}, + } + + for i, tc := range cases { + actual, err := DecodeHookExec(f, tc.f, tc.t, tc.data) + if tc.err != (err != nil) { + t.Fatalf("case %d: expected err %#v", i, tc.err) + } + if !reflect.DeepEqual(actual, tc.result) { + t.Fatalf( + "case %d: expected %#v, got %#v", + i, tc.result, actual) + } + } +} + +func TestWeaklyTypedHook(t *testing.T) { + var f DecodeHookFunc = WeaklyTypedHook + + boolType := reflect.TypeOf(true) + strType := reflect.TypeOf("") + sliceType := reflect.TypeOf([]byte("")) + cases := []struct { + f, t reflect.Type + data interface{} + result interface{} + err bool + }{ + // TO STRING + { + boolType, + strType, + false, + "0", + false, + }, + + { + boolType, + strType, + true, + "1", + false, + }, + + { + reflect.TypeOf(float32(1)), + strType, + float32(7), + "7", + false, + }, + + { + reflect.TypeOf(int(1)), + strType, + int(7), + "7", + false, + }, + + { + sliceType, + strType, + []uint8("foo"), + "foo", + false, + }, + + { + reflect.TypeOf(uint(1)), + strType, + uint(7), + "7", + false, + }, + } + + for i, tc := range cases { + actual, err := DecodeHookExec(f, tc.f, tc.t, tc.data) + if tc.err != (err != nil) { + t.Fatalf("case %d: expected err %#v", i, tc.err) + } + if !reflect.DeepEqual(actual, tc.result) { + t.Fatalf( + "case %d: expected %#v, got %#v", + i, tc.result, actual) + } + } +} diff --git a/vendor/github.com/mitchellh/mapstructure/mapstructure.go b/vendor/github.com/mitchellh/mapstructure/mapstructure.go index 6dee0ef0a..6ec5c3335 100644 --- a/vendor/github.com/mitchellh/mapstructure/mapstructure.go +++ b/vendor/github.com/mitchellh/mapstructure/mapstructure.go @@ -1,5 +1,5 @@ -// The mapstructure package exposes functionality to convert an -// arbitrary map[string]interface{} into a native Go structure. +// Package mapstructure exposes functionality to convert an arbitrary +// map[string]interface{} into a native Go structure. // // The Go structure can be arbitrarily complex, containing slices, // other structs, etc. and the decoder will properly decode nested @@ -32,7 +32,12 @@ import ( // both. type DecodeHookFunc interface{} +// DecodeHookFuncType is a DecodeHookFunc which has complete information about +// the source and target types. type DecodeHookFuncType func(reflect.Type, reflect.Type, interface{}) (interface{}, error) + +// DecodeHookFuncKind is a DecodeHookFunc which knows only the Kinds of the +// source and target types. type DecodeHookFuncKind func(reflect.Kind, reflect.Kind, interface{}) (interface{}, error) // DecoderConfig is the configuration that is used to create a new decoder @@ -436,7 +441,7 @@ func (d *Decoder) decodeFloat(name string, data interface{}, val reflect.Value) case dataKind == reflect.Uint: val.SetFloat(float64(dataVal.Uint())) case dataKind == reflect.Float32: - val.SetFloat(float64(dataVal.Float())) + val.SetFloat(dataVal.Float()) case dataKind == reflect.Bool && d.config.WeaklyTypedInput: if dataVal.Bool() { val.SetFloat(1) diff --git a/vendor/github.com/mitchellh/mapstructure/mapstructure_benchmark_test.go b/vendor/github.com/mitchellh/mapstructure/mapstructure_benchmark_test.go new file mode 100644 index 000000000..41d2a41f7 --- /dev/null +++ b/vendor/github.com/mitchellh/mapstructure/mapstructure_benchmark_test.go @@ -0,0 +1,279 @@ +package mapstructure + +import ( + "encoding/json" + "testing" +) + +func Benchmark_Decode(b *testing.B) { + type Person struct { + Name string + Age int + Emails []string + Extra map[string]string + } + + input := map[string]interface{}{ + "name": "Mitchell", + "age": 91, + "emails": []string{"one", "two", "three"}, + "extra": map[string]string{ + "twitter": "mitchellh", + }, + } + + var result Person + for i := 0; i < b.N; i++ { + Decode(input, &result) + } +} + +// decodeViaJSON takes the map data and passes it through encoding/json to convert it into the +// given Go native structure pointed to by v. v must be a pointer to a struct. +func decodeViaJSON(data interface{}, v interface{}) error { + // Perform the task by simply marshalling the input into JSON, + // then unmarshalling it into target native Go struct. + b, err := json.Marshal(data) + if err != nil { + return err + } + return json.Unmarshal(b, v) +} + +func Benchmark_DecodeViaJSON(b *testing.B) { + type Person struct { + Name string + Age int + Emails []string + Extra map[string]string + } + + input := map[string]interface{}{ + "name": "Mitchell", + "age": 91, + "emails": []string{"one", "two", "three"}, + "extra": map[string]string{ + "twitter": "mitchellh", + }, + } + + var result Person + for i := 0; i < b.N; i++ { + decodeViaJSON(input, &result) + } +} + +func Benchmark_DecodeBasic(b *testing.B) { + input := map[string]interface{}{ + "vstring": "foo", + "vint": 42, + "Vuint": 42, + "vbool": true, + "Vfloat": 42.42, + "vsilent": true, + "vdata": 42, + } + + var result Basic + for i := 0; i < b.N; i++ { + Decode(input, &result) + } +} + +func Benchmark_DecodeEmbedded(b *testing.B) { + input := map[string]interface{}{ + "vstring": "foo", + "Basic": map[string]interface{}{ + "vstring": "innerfoo", + }, + "vunique": "bar", + } + + var result Embedded + for i := 0; i < b.N; i++ { + Decode(input, &result) + } +} + +func Benchmark_DecodeTypeConversion(b *testing.B) { + input := map[string]interface{}{ + "IntToFloat": 42, + "IntToUint": 42, + "IntToBool": 1, + "IntToString": 42, + "UintToInt": 42, + "UintToFloat": 42, + "UintToBool": 42, + "UintToString": 42, + "BoolToInt": true, + "BoolToUint": true, + "BoolToFloat": true, + "BoolToString": true, + "FloatToInt": 42.42, + "FloatToUint": 42.42, + "FloatToBool": 42.42, + "FloatToString": 42.42, + "StringToInt": "42", + "StringToUint": "42", + "StringToBool": "1", + "StringToFloat": "42.42", + "SliceToMap": []interface{}{}, + "MapToSlice": map[string]interface{}{}, + } + + var resultStrict TypeConversionResult + for i := 0; i < b.N; i++ { + Decode(input, &resultStrict) + } +} + +func Benchmark_DecodeMap(b *testing.B) { + input := map[string]interface{}{ + "vfoo": "foo", + "vother": map[interface{}]interface{}{ + "foo": "foo", + "bar": "bar", + }, + } + + var result Map + for i := 0; i < b.N; i++ { + Decode(input, &result) + } +} + +func Benchmark_DecodeMapOfStruct(b *testing.B) { + input := map[string]interface{}{ + "value": map[string]interface{}{ + "foo": map[string]string{"vstring": "one"}, + "bar": map[string]string{"vstring": "two"}, + }, + } + + var result MapOfStruct + for i := 0; i < b.N; i++ { + Decode(input, &result) + } +} + +func Benchmark_DecodeSlice(b *testing.B) { + input := map[string]interface{}{ + "vfoo": "foo", + "vbar": []string{"foo", "bar", "baz"}, + } + + var result Slice + for i := 0; i < b.N; i++ { + Decode(input, &result) + } +} + +func Benchmark_DecodeSliceOfStruct(b *testing.B) { + input := map[string]interface{}{ + "value": []map[string]interface{}{ + {"vstring": "one"}, + {"vstring": "two"}, + }, + } + + var result SliceOfStruct + for i := 0; i < b.N; i++ { + Decode(input, &result) + } +} + +func Benchmark_DecodeWeaklyTypedInput(b *testing.B) { + type Person struct { + Name string + Age int + Emails []string + } + + // This input can come from anywhere, but typically comes from + // something like decoding JSON, generated by a weakly typed language + // such as PHP. + input := map[string]interface{}{ + "name": 123, // number => string + "age": "42", // string => number + "emails": map[string]interface{}{}, // empty map => empty array + } + + var result Person + config := &DecoderConfig{ + WeaklyTypedInput: true, + Result: &result, + } + + decoder, err := NewDecoder(config) + if err != nil { + panic(err) + } + + for i := 0; i < b.N; i++ { + decoder.Decode(input) + } +} + +func Benchmark_DecodeMetadata(b *testing.B) { + type Person struct { + Name string + Age int + } + + input := map[string]interface{}{ + "name": "Mitchell", + "age": 91, + "email": "foo@bar.com", + } + + var md Metadata + var result Person + config := &DecoderConfig{ + Metadata: &md, + Result: &result, + } + + decoder, err := NewDecoder(config) + if err != nil { + panic(err) + } + + for i := 0; i < b.N; i++ { + decoder.Decode(input) + } +} + +func Benchmark_DecodeMetadataEmbedded(b *testing.B) { + input := map[string]interface{}{ + "vstring": "foo", + "vunique": "bar", + } + + var md Metadata + var result EmbeddedSquash + config := &DecoderConfig{ + Metadata: &md, + Result: &result, + } + + decoder, err := NewDecoder(config) + if err != nil { + b.Fatalf("err: %s", err) + } + + for i := 0; i < b.N; i++ { + decoder.Decode(input) + } +} + +func Benchmark_DecodeTagged(b *testing.B) { + input := map[string]interface{}{ + "foo": "bar", + "bar": "value", + } + + var result Tagged + for i := 0; i < b.N; i++ { + Decode(input, &result) + } +} diff --git a/vendor/github.com/mitchellh/mapstructure/mapstructure_bugs_test.go b/vendor/github.com/mitchellh/mapstructure/mapstructure_bugs_test.go new file mode 100644 index 000000000..08e495664 --- /dev/null +++ b/vendor/github.com/mitchellh/mapstructure/mapstructure_bugs_test.go @@ -0,0 +1,260 @@ +package mapstructure + +import "testing" + +// GH-1 +func TestDecode_NilValue(t *testing.T) { + input := map[string]interface{}{ + "vfoo": nil, + "vother": nil, + } + + var result Map + err := Decode(input, &result) + if err != nil { + t.Fatalf("should not error: %s", err) + } + + if result.Vfoo != "" { + t.Fatalf("value should be default: %s", result.Vfoo) + } + + if result.Vother != nil { + t.Fatalf("Vother should be nil: %s", result.Vother) + } +} + +// GH-10 +func TestDecode_mapInterfaceInterface(t *testing.T) { + input := map[interface{}]interface{}{ + "vfoo": nil, + "vother": nil, + } + + var result Map + err := Decode(input, &result) + if err != nil { + t.Fatalf("should not error: %s", err) + } + + if result.Vfoo != "" { + t.Fatalf("value should be default: %s", result.Vfoo) + } + + if result.Vother != nil { + t.Fatalf("Vother should be nil: %s", result.Vother) + } +} + +// #48 +func TestNestedTypePointerWithDefaults(t *testing.T) { + t.Parallel() + + input := map[string]interface{}{ + "vfoo": "foo", + "vbar": map[string]interface{}{ + "vstring": "foo", + "vint": 42, + "vbool": true, + }, + } + + result := NestedPointer{ + Vbar: &Basic{ + Vuint: 42, + }, + } + err := Decode(input, &result) + if err != nil { + t.Fatalf("got an err: %s", err.Error()) + } + + if result.Vfoo != "foo" { + t.Errorf("vfoo value should be 'foo': %#v", result.Vfoo) + } + + if result.Vbar.Vstring != "foo" { + t.Errorf("vstring value should be 'foo': %#v", result.Vbar.Vstring) + } + + if result.Vbar.Vint != 42 { + t.Errorf("vint value should be 42: %#v", result.Vbar.Vint) + } + + if result.Vbar.Vbool != true { + t.Errorf("vbool value should be true: %#v", result.Vbar.Vbool) + } + + if result.Vbar.Vextra != "" { + t.Errorf("vextra value should be empty: %#v", result.Vbar.Vextra) + } + + // this is the error + if result.Vbar.Vuint != 42 { + t.Errorf("vuint value should be 42: %#v", result.Vbar.Vuint) + } + +} + +type NestedSlice struct { + Vfoo string + Vbars []Basic + Vempty []Basic +} + +// #48 +func TestNestedTypeSliceWithDefaults(t *testing.T) { + t.Parallel() + + input := map[string]interface{}{ + "vfoo": "foo", + "vbars": []map[string]interface{}{ + {"vstring": "foo", "vint": 42, "vbool": true}, + {"vint": 42, "vbool": true}, + }, + "vempty": []map[string]interface{}{ + {"vstring": "foo", "vint": 42, "vbool": true}, + {"vint": 42, "vbool": true}, + }, + } + + result := NestedSlice{ + Vbars: []Basic{ + {Vuint: 42}, + {Vstring: "foo"}, + }, + } + err := Decode(input, &result) + if err != nil { + t.Fatalf("got an err: %s", err.Error()) + } + + if result.Vfoo != "foo" { + t.Errorf("vfoo value should be 'foo': %#v", result.Vfoo) + } + + if result.Vbars[0].Vstring != "foo" { + t.Errorf("vstring value should be 'foo': %#v", result.Vbars[0].Vstring) + } + // this is the error + if result.Vbars[0].Vuint != 42 { + t.Errorf("vuint value should be 42: %#v", result.Vbars[0].Vuint) + } +} + +// #48 workaround +func TestNestedTypeWithDefaults(t *testing.T) { + t.Parallel() + + input := map[string]interface{}{ + "vfoo": "foo", + "vbar": map[string]interface{}{ + "vstring": "foo", + "vint": 42, + "vbool": true, + }, + } + + result := Nested{ + Vbar: Basic{ + Vuint: 42, + }, + } + err := Decode(input, &result) + if err != nil { + t.Fatalf("got an err: %s", err.Error()) + } + + if result.Vfoo != "foo" { + t.Errorf("vfoo value should be 'foo': %#v", result.Vfoo) + } + + if result.Vbar.Vstring != "foo" { + t.Errorf("vstring value should be 'foo': %#v", result.Vbar.Vstring) + } + + if result.Vbar.Vint != 42 { + t.Errorf("vint value should be 42: %#v", result.Vbar.Vint) + } + + if result.Vbar.Vbool != true { + t.Errorf("vbool value should be true: %#v", result.Vbar.Vbool) + } + + if result.Vbar.Vextra != "" { + t.Errorf("vextra value should be empty: %#v", result.Vbar.Vextra) + } + + // this is the error + if result.Vbar.Vuint != 42 { + t.Errorf("vuint value should be 42: %#v", result.Vbar.Vuint) + } + +} + +// #67 panic() on extending slices (decodeSlice with disabled ZeroValues) +func TestDecodeSliceToEmptySliceWOZeroing(t *testing.T) { + t.Parallel() + + type TestStruct struct { + Vfoo []string + } + + decode := func(m interface{}, rawVal interface{}) error { + config := &DecoderConfig{ + Metadata: nil, + Result: rawVal, + ZeroFields: false, + } + + decoder, err := NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(m) + } + + { + input := map[string]interface{}{ + "vfoo": []string{"1"}, + } + + result := &TestStruct{} + + err := decode(input, &result) + if err != nil { + t.Fatalf("got an err: %s", err.Error()) + } + } + + { + input := map[string]interface{}{ + "vfoo": []string{"1"}, + } + + result := &TestStruct{ + Vfoo: []string{}, + } + + err := decode(input, &result) + if err != nil { + t.Fatalf("got an err: %s", err.Error()) + } + } + + { + input := map[string]interface{}{ + "vfoo": []string{"2", "3"}, + } + + result := &TestStruct{ + Vfoo: []string{"1"}, + } + + err := decode(input, &result) + if err != nil { + t.Fatalf("got an err: %s", err.Error()) + } + } +} diff --git a/vendor/github.com/mitchellh/mapstructure/mapstructure_examples_test.go b/vendor/github.com/mitchellh/mapstructure/mapstructure_examples_test.go new file mode 100644 index 000000000..f17c214a8 --- /dev/null +++ b/vendor/github.com/mitchellh/mapstructure/mapstructure_examples_test.go @@ -0,0 +1,203 @@ +package mapstructure + +import ( + "fmt" +) + +func ExampleDecode() { + type Person struct { + Name string + Age int + Emails []string + Extra map[string]string + } + + // This input can come from anywhere, but typically comes from + // something like decoding JSON where we're not quite sure of the + // struct initially. + input := map[string]interface{}{ + "name": "Mitchell", + "age": 91, + "emails": []string{"one", "two", "three"}, + "extra": map[string]string{ + "twitter": "mitchellh", + }, + } + + var result Person + err := Decode(input, &result) + if err != nil { + panic(err) + } + + fmt.Printf("%#v", result) + // Output: + // mapstructure.Person{Name:"Mitchell", Age:91, Emails:[]string{"one", "two", "three"}, Extra:map[string]string{"twitter":"mitchellh"}} +} + +func ExampleDecode_errors() { + type Person struct { + Name string + Age int + Emails []string + Extra map[string]string + } + + // This input can come from anywhere, but typically comes from + // something like decoding JSON where we're not quite sure of the + // struct initially. + input := map[string]interface{}{ + "name": 123, + "age": "bad value", + "emails": []int{1, 2, 3}, + } + + var result Person + err := Decode(input, &result) + if err == nil { + panic("should have an error") + } + + fmt.Println(err.Error()) + // Output: + // 5 error(s) decoding: + // + // * 'Age' expected type 'int', got unconvertible type 'string' + // * 'Emails[0]' expected type 'string', got unconvertible type 'int' + // * 'Emails[1]' expected type 'string', got unconvertible type 'int' + // * 'Emails[2]' expected type 'string', got unconvertible type 'int' + // * 'Name' expected type 'string', got unconvertible type 'int' +} + +func ExampleDecode_metadata() { + type Person struct { + Name string + Age int + } + + // This input can come from anywhere, but typically comes from + // something like decoding JSON where we're not quite sure of the + // struct initially. + input := map[string]interface{}{ + "name": "Mitchell", + "age": 91, + "email": "foo@bar.com", + } + + // For metadata, we make a more advanced DecoderConfig so we can + // more finely configure the decoder that is used. In this case, we + // just tell the decoder we want to track metadata. + var md Metadata + var result Person + config := &DecoderConfig{ + Metadata: &md, + Result: &result, + } + + decoder, err := NewDecoder(config) + if err != nil { + panic(err) + } + + if err := decoder.Decode(input); err != nil { + panic(err) + } + + fmt.Printf("Unused keys: %#v", md.Unused) + // Output: + // Unused keys: []string{"email"} +} + +func ExampleDecode_weaklyTypedInput() { + type Person struct { + Name string + Age int + Emails []string + } + + // This input can come from anywhere, but typically comes from + // something like decoding JSON, generated by a weakly typed language + // such as PHP. + input := map[string]interface{}{ + "name": 123, // number => string + "age": "42", // string => number + "emails": map[string]interface{}{}, // empty map => empty array + } + + var result Person + config := &DecoderConfig{ + WeaklyTypedInput: true, + Result: &result, + } + + decoder, err := NewDecoder(config) + if err != nil { + panic(err) + } + + err = decoder.Decode(input) + if err != nil { + panic(err) + } + + fmt.Printf("%#v", result) + // Output: mapstructure.Person{Name:"123", Age:42, Emails:[]string{}} +} + +func ExampleDecode_tags() { + // Note that the mapstructure tags defined in the struct type + // can indicate which fields the values are mapped to. + type Person struct { + Name string `mapstructure:"person_name"` + Age int `mapstructure:"person_age"` + } + + input := map[string]interface{}{ + "person_name": "Mitchell", + "person_age": 91, + } + + var result Person + err := Decode(input, &result) + if err != nil { + panic(err) + } + + fmt.Printf("%#v", result) + // Output: + // mapstructure.Person{Name:"Mitchell", Age:91} +} + +func ExampleDecode_embeddedStruct() { + // Squashing multiple embedded structs is allowed using the squash tag. + // This is demonstrated by creating a composite struct of multiple types + // and decoding into it. In this case, a person can carry with it both + // a Family and a Location, as well as their own FirstName. + type Family struct { + LastName string + } + type Location struct { + City string + } + type Person struct { + Family `mapstructure:",squash"` + Location `mapstructure:",squash"` + FirstName string + } + + input := map[string]interface{}{ + "FirstName": "Mitchell", + "LastName": "Hashimoto", + "City": "San Francisco", + } + + var result Person + err := Decode(input, &result) + if err != nil { + panic(err) + } + + fmt.Printf("%s %s, %s", result.FirstName, result.LastName, result.City) + // Output: + // Mitchell Hashimoto, San Francisco +} diff --git a/vendor/github.com/mitchellh/mapstructure/mapstructure_test.go b/vendor/github.com/mitchellh/mapstructure/mapstructure_test.go new file mode 100644 index 000000000..547af7331 --- /dev/null +++ b/vendor/github.com/mitchellh/mapstructure/mapstructure_test.go @@ -0,0 +1,1193 @@ +package mapstructure + +import ( + "encoding/json" + "io" + "reflect" + "sort" + "strings" + "testing" +) + +type Basic struct { + Vstring string + Vint int + Vuint uint + Vbool bool + Vfloat float64 + Vextra string + vsilent bool + Vdata interface{} + VjsonInt int + VjsonFloat float64 + VjsonNumber json.Number +} + +type BasicSquash struct { + Test Basic `mapstructure:",squash"` +} + +type Embedded struct { + Basic + Vunique string +} + +type EmbeddedPointer struct { + *Basic + Vunique string +} + +type EmbeddedSquash struct { + Basic `mapstructure:",squash"` + Vunique string +} + +type SliceAlias []string + +type EmbeddedSlice struct { + SliceAlias `mapstructure:"slice_alias"` + Vunique string +} + +type SquashOnNonStructType struct { + InvalidSquashType int `mapstructure:",squash"` +} + +type Map struct { + Vfoo string + Vother map[string]string +} + +type MapOfStruct struct { + Value map[string]Basic +} + +type Nested struct { + Vfoo string + Vbar Basic +} + +type NestedPointer struct { + Vfoo string + Vbar *Basic +} + +type NilInterface struct { + W io.Writer +} + +type Slice struct { + Vfoo string + Vbar []string +} + +type SliceOfStruct struct { + Value []Basic +} + +type Func struct { + Foo func() string +} + +type Tagged struct { + Extra string `mapstructure:"bar,what,what"` + Value string `mapstructure:"foo"` +} + +type TypeConversionResult struct { + IntToFloat float32 + IntToUint uint + IntToBool bool + IntToString string + UintToInt int + UintToFloat float32 + UintToBool bool + UintToString string + BoolToInt int + BoolToUint uint + BoolToFloat float32 + BoolToString string + FloatToInt int + FloatToUint uint + FloatToBool bool + FloatToString string + SliceUint8ToString string + StringToInt int + StringToUint uint + StringToBool bool + StringToFloat float32 + StringToStrSlice []string + StringToIntSlice []int + SliceToMap map[string]interface{} + MapToSlice []interface{} +} + +func TestBasicTypes(t *testing.T) { + t.Parallel() + + input := map[string]interface{}{ + "vstring": "foo", + "vint": 42, + "Vuint": 42, + "vbool": true, + "Vfloat": 42.42, + "vsilent": true, + "vdata": 42, + "vjsonInt": json.Number("1234"), + "vjsonFloat": json.Number("1234.5"), + "vjsonNumber": json.Number("1234.5"), + } + + var result Basic + err := Decode(input, &result) + if err != nil { + t.Errorf("got an err: %s", err.Error()) + t.FailNow() + } + + if result.Vstring != "foo" { + t.Errorf("vstring value should be 'foo': %#v", result.Vstring) + } + + if result.Vint != 42 { + t.Errorf("vint value should be 42: %#v", result.Vint) + } + + if result.Vuint != 42 { + t.Errorf("vuint value should be 42: %#v", result.Vuint) + } + + if result.Vbool != true { + t.Errorf("vbool value should be true: %#v", result.Vbool) + } + + if result.Vfloat != 42.42 { + t.Errorf("vfloat value should be 42.42: %#v", result.Vfloat) + } + + if result.Vextra != "" { + t.Errorf("vextra value should be empty: %#v", result.Vextra) + } + + if result.vsilent != false { + t.Error("vsilent should not be set, it is unexported") + } + + if result.Vdata != 42 { + t.Error("vdata should be valid") + } + + if result.VjsonInt != 1234 { + t.Errorf("vjsonint value should be 1234: %#v", result.VjsonInt) + } + + if result.VjsonFloat != 1234.5 { + t.Errorf("vjsonfloat value should be 1234.5: %#v", result.VjsonFloat) + } + + if !reflect.DeepEqual(result.VjsonNumber, json.Number("1234.5")) { + t.Errorf("vjsonnumber value should be '1234.5': %T, %#v", result.VjsonNumber, result.VjsonNumber) + } +} + +func TestBasic_IntWithFloat(t *testing.T) { + t.Parallel() + + input := map[string]interface{}{ + "vint": float64(42), + } + + var result Basic + err := Decode(input, &result) + if err != nil { + t.Fatalf("got an err: %s", err) + } +} + +func TestBasic_Merge(t *testing.T) { + t.Parallel() + + input := map[string]interface{}{ + "vint": 42, + } + + var result Basic + result.Vuint = 100 + err := Decode(input, &result) + if err != nil { + t.Fatalf("got an err: %s", err) + } + + expected := Basic{ + Vint: 42, + Vuint: 100, + } + if !reflect.DeepEqual(result, expected) { + t.Fatalf("bad: %#v", result) + } +} + +func TestDecode_BasicSquash(t *testing.T) { + t.Parallel() + + input := map[string]interface{}{ + "vstring": "foo", + } + + var result BasicSquash + err := Decode(input, &result) + if err != nil { + t.Fatalf("got an err: %s", err.Error()) + } + + if result.Test.Vstring != "foo" { + t.Errorf("vstring value should be 'foo': %#v", result.Test.Vstring) + } +} + +func TestDecode_Embedded(t *testing.T) { + t.Parallel() + + input := map[string]interface{}{ + "vstring": "foo", + "Basic": map[string]interface{}{ + "vstring": "innerfoo", + }, + "vunique": "bar", + } + + var result Embedded + err := Decode(input, &result) + if err != nil { + t.Fatalf("got an err: %s", err.Error()) + } + + if result.Vstring != "innerfoo" { + t.Errorf("vstring value should be 'innerfoo': %#v", result.Vstring) + } + + if result.Vunique != "bar" { + t.Errorf("vunique value should be 'bar': %#v", result.Vunique) + } +} + +func TestDecode_EmbeddedPointer(t *testing.T) { + t.Parallel() + + input := map[string]interface{}{ + "vstring": "foo", + "Basic": map[string]interface{}{ + "vstring": "innerfoo", + }, + "vunique": "bar", + } + + var result EmbeddedPointer + err := Decode(input, &result) + if err != nil { + t.Fatalf("err: %s", err) + } + + expected := EmbeddedPointer{ + Basic: &Basic{ + Vstring: "innerfoo", + }, + Vunique: "bar", + } + if !reflect.DeepEqual(result, expected) { + t.Fatalf("bad: %#v", result) + } +} + +func TestDecode_EmbeddedSlice(t *testing.T) { + t.Parallel() + + input := map[string]interface{}{ + "slice_alias": []string{"foo", "bar"}, + "vunique": "bar", + } + + var result EmbeddedSlice + err := Decode(input, &result) + if err != nil { + t.Fatalf("got an err: %s", err.Error()) + } + + if !reflect.DeepEqual(result.SliceAlias, SliceAlias([]string{"foo", "bar"})) { + t.Errorf("slice value: %#v", result.SliceAlias) + } + + if result.Vunique != "bar" { + t.Errorf("vunique value should be 'bar': %#v", result.Vunique) + } +} + +func TestDecode_EmbeddedSquash(t *testing.T) { + t.Parallel() + + input := map[string]interface{}{ + "vstring": "foo", + "vunique": "bar", + } + + var result EmbeddedSquash + err := Decode(input, &result) + if err != nil { + t.Fatalf("got an err: %s", err.Error()) + } + + if result.Vstring != "foo" { + t.Errorf("vstring value should be 'foo': %#v", result.Vstring) + } + + if result.Vunique != "bar" { + t.Errorf("vunique value should be 'bar': %#v", result.Vunique) + } +} + +func TestDecode_SquashOnNonStructType(t *testing.T) { + t.Parallel() + + input := map[string]interface{}{ + "InvalidSquashType": 42, + } + + var result SquashOnNonStructType + err := Decode(input, &result) + if err == nil { + t.Fatal("unexpected success decoding invalid squash field type") + } else if !strings.Contains(err.Error(), "unsupported type for squash") { + t.Fatalf("unexpected error message for invalid squash field type: %s", err) + } +} + +func TestDecode_DecodeHook(t *testing.T) { + t.Parallel() + + input := map[string]interface{}{ + "vint": "WHAT", + } + + decodeHook := func(from reflect.Kind, to reflect.Kind, v interface{}) (interface{}, error) { + if from == reflect.String && to != reflect.String { + return 5, nil + } + + return v, nil + } + + var result Basic + config := &DecoderConfig{ + DecodeHook: decodeHook, + Result: &result, + } + + decoder, err := NewDecoder(config) + if err != nil { + t.Fatalf("err: %s", err) + } + + err = decoder.Decode(input) + if err != nil { + t.Fatalf("got an err: %s", err) + } + + if result.Vint != 5 { + t.Errorf("vint should be 5: %#v", result.Vint) + } +} + +func TestDecode_DecodeHookType(t *testing.T) { + t.Parallel() + + input := map[string]interface{}{ + "vint": "WHAT", + } + + decodeHook := func(from reflect.Type, to reflect.Type, v interface{}) (interface{}, error) { + if from.Kind() == reflect.String && + to.Kind() != reflect.String { + return 5, nil + } + + return v, nil + } + + var result Basic + config := &DecoderConfig{ + DecodeHook: decodeHook, + Result: &result, + } + + decoder, err := NewDecoder(config) + if err != nil { + t.Fatalf("err: %s", err) + } + + err = decoder.Decode(input) + if err != nil { + t.Fatalf("got an err: %s", err) + } + + if result.Vint != 5 { + t.Errorf("vint should be 5: %#v", result.Vint) + } +} + +func TestDecode_Nil(t *testing.T) { + t.Parallel() + + var input interface{} + result := Basic{ + Vstring: "foo", + } + + err := Decode(input, &result) + if err != nil { + t.Fatalf("err: %s", err) + } + + if result.Vstring != "foo" { + t.Fatalf("bad: %#v", result.Vstring) + } +} + +func TestDecode_NilInterfaceHook(t *testing.T) { + t.Parallel() + + input := map[string]interface{}{ + "w": "", + } + + decodeHook := func(f, t reflect.Type, v interface{}) (interface{}, error) { + if t.String() == "io.Writer" { + return nil, nil + } + + return v, nil + } + + var result NilInterface + config := &DecoderConfig{ + DecodeHook: decodeHook, + Result: &result, + } + + decoder, err := NewDecoder(config) + if err != nil { + t.Fatalf("err: %s", err) + } + + err = decoder.Decode(input) + if err != nil { + t.Fatalf("got an err: %s", err) + } + + if result.W != nil { + t.Errorf("W should be nil: %#v", result.W) + } +} + +func TestDecode_FuncHook(t *testing.T) { + t.Parallel() + + input := map[string]interface{}{ + "foo": "baz", + } + + decodeHook := func(f, t reflect.Type, v interface{}) (interface{}, error) { + if t.Kind() != reflect.Func { + return v, nil + } + val := v.(string) + return func() string { return val }, nil + } + + var result Func + config := &DecoderConfig{ + DecodeHook: decodeHook, + Result: &result, + } + + decoder, err := NewDecoder(config) + if err != nil { + t.Fatalf("err: %s", err) + } + + err = decoder.Decode(input) + if err != nil { + t.Fatalf("got an err: %s", err) + } + + if result.Foo() != "baz" { + t.Errorf("Foo call result should be 'baz': %s", result.Foo()) + } +} + +func TestDecode_NonStruct(t *testing.T) { + t.Parallel() + + input := map[string]interface{}{ + "foo": "bar", + "bar": "baz", + } + + var result map[string]string + err := Decode(input, &result) + if err != nil { + t.Fatalf("err: %s", err) + } + + if result["foo"] != "bar" { + t.Fatal("foo is not bar") + } +} + +func TestDecode_StructMatch(t *testing.T) { + t.Parallel() + + input := map[string]interface{}{ + "vbar": Basic{ + Vstring: "foo", + }, + } + + var result Nested + err := Decode(input, &result) + if err != nil { + t.Fatalf("got an err: %s", err.Error()) + } + + if result.Vbar.Vstring != "foo" { + t.Errorf("bad: %#v", result) + } +} + +func TestDecode_TypeConversion(t *testing.T) { + input := map[string]interface{}{ + "IntToFloat": 42, + "IntToUint": 42, + "IntToBool": 1, + "IntToString": 42, + "UintToInt": 42, + "UintToFloat": 42, + "UintToBool": 42, + "UintToString": 42, + "BoolToInt": true, + "BoolToUint": true, + "BoolToFloat": true, + "BoolToString": true, + "FloatToInt": 42.42, + "FloatToUint": 42.42, + "FloatToBool": 42.42, + "FloatToString": 42.42, + "SliceUint8ToString": []uint8("foo"), + "StringToInt": "42", + "StringToUint": "42", + "StringToBool": "1", + "StringToFloat": "42.42", + "StringToStrSlice": "A", + "StringToIntSlice": "42", + "SliceToMap": []interface{}{}, + "MapToSlice": map[string]interface{}{}, + } + + expectedResultStrict := TypeConversionResult{ + IntToFloat: 42.0, + IntToUint: 42, + UintToInt: 42, + UintToFloat: 42, + BoolToInt: 0, + BoolToUint: 0, + BoolToFloat: 0, + FloatToInt: 42, + FloatToUint: 42, + } + + expectedResultWeak := TypeConversionResult{ + IntToFloat: 42.0, + IntToUint: 42, + IntToBool: true, + IntToString: "42", + UintToInt: 42, + UintToFloat: 42, + UintToBool: true, + UintToString: "42", + BoolToInt: 1, + BoolToUint: 1, + BoolToFloat: 1, + BoolToString: "1", + FloatToInt: 42, + FloatToUint: 42, + FloatToBool: true, + FloatToString: "42.42", + SliceUint8ToString: "foo", + StringToInt: 42, + StringToUint: 42, + StringToBool: true, + StringToFloat: 42.42, + StringToStrSlice: []string{"A"}, + StringToIntSlice: []int{42}, + SliceToMap: map[string]interface{}{}, + MapToSlice: []interface{}{}, + } + + // Test strict type conversion + var resultStrict TypeConversionResult + err := Decode(input, &resultStrict) + if err == nil { + t.Errorf("should return an error") + } + if !reflect.DeepEqual(resultStrict, expectedResultStrict) { + t.Errorf("expected %v, got: %v", expectedResultStrict, resultStrict) + } + + // Test weak type conversion + var decoder *Decoder + var resultWeak TypeConversionResult + + config := &DecoderConfig{ + WeaklyTypedInput: true, + Result: &resultWeak, + } + + decoder, err = NewDecoder(config) + if err != nil { + t.Fatalf("err: %s", err) + } + + err = decoder.Decode(input) + if err != nil { + t.Fatalf("got an err: %s", err) + } + + if !reflect.DeepEqual(resultWeak, expectedResultWeak) { + t.Errorf("expected \n%#v, got: \n%#v", expectedResultWeak, resultWeak) + } +} + +func TestDecoder_ErrorUnused(t *testing.T) { + t.Parallel() + + input := map[string]interface{}{ + "vstring": "hello", + "foo": "bar", + } + + var result Basic + config := &DecoderConfig{ + ErrorUnused: true, + Result: &result, + } + + decoder, err := NewDecoder(config) + if err != nil { + t.Fatalf("err: %s", err) + } + + err = decoder.Decode(input) + if err == nil { + t.Fatal("expected error") + } +} + +func TestMap(t *testing.T) { + t.Parallel() + + input := map[string]interface{}{ + "vfoo": "foo", + "vother": map[interface{}]interface{}{ + "foo": "foo", + "bar": "bar", + }, + } + + var result Map + err := Decode(input, &result) + if err != nil { + t.Fatalf("got an error: %s", err) + } + + if result.Vfoo != "foo" { + t.Errorf("vfoo value should be 'foo': %#v", result.Vfoo) + } + + if result.Vother == nil { + t.Fatal("vother should not be nil") + } + + if len(result.Vother) != 2 { + t.Error("vother should have two items") + } + + if result.Vother["foo"] != "foo" { + t.Errorf("'foo' key should be foo, got: %#v", result.Vother["foo"]) + } + + if result.Vother["bar"] != "bar" { + t.Errorf("'bar' key should be bar, got: %#v", result.Vother["bar"]) + } +} + +func TestMapMerge(t *testing.T) { + t.Parallel() + + input := map[string]interface{}{ + "vfoo": "foo", + "vother": map[interface{}]interface{}{ + "foo": "foo", + "bar": "bar", + }, + } + + var result Map + result.Vother = map[string]string{"hello": "world"} + err := Decode(input, &result) + if err != nil { + t.Fatalf("got an error: %s", err) + } + + if result.Vfoo != "foo" { + t.Errorf("vfoo value should be 'foo': %#v", result.Vfoo) + } + + expected := map[string]string{ + "foo": "foo", + "bar": "bar", + "hello": "world", + } + if !reflect.DeepEqual(result.Vother, expected) { + t.Errorf("bad: %#v", result.Vother) + } +} + +func TestMapOfStruct(t *testing.T) { + t.Parallel() + + input := map[string]interface{}{ + "value": map[string]interface{}{ + "foo": map[string]string{"vstring": "one"}, + "bar": map[string]string{"vstring": "two"}, + }, + } + + var result MapOfStruct + err := Decode(input, &result) + if err != nil { + t.Fatalf("got an err: %s", err) + } + + if result.Value == nil { + t.Fatal("value should not be nil") + } + + if len(result.Value) != 2 { + t.Error("value should have two items") + } + + if result.Value["foo"].Vstring != "one" { + t.Errorf("foo value should be 'one', got: %s", result.Value["foo"].Vstring) + } + + if result.Value["bar"].Vstring != "two" { + t.Errorf("bar value should be 'two', got: %s", result.Value["bar"].Vstring) + } +} + +func TestNestedType(t *testing.T) { + t.Parallel() + + input := map[string]interface{}{ + "vfoo": "foo", + "vbar": map[string]interface{}{ + "vstring": "foo", + "vint": 42, + "vbool": true, + }, + } + + var result Nested + err := Decode(input, &result) + if err != nil { + t.Fatalf("got an err: %s", err.Error()) + } + + if result.Vfoo != "foo" { + t.Errorf("vfoo value should be 'foo': %#v", result.Vfoo) + } + + if result.Vbar.Vstring != "foo" { + t.Errorf("vstring value should be 'foo': %#v", result.Vbar.Vstring) + } + + if result.Vbar.Vint != 42 { + t.Errorf("vint value should be 42: %#v", result.Vbar.Vint) + } + + if result.Vbar.Vbool != true { + t.Errorf("vbool value should be true: %#v", result.Vbar.Vbool) + } + + if result.Vbar.Vextra != "" { + t.Errorf("vextra value should be empty: %#v", result.Vbar.Vextra) + } +} + +func TestNestedTypePointer(t *testing.T) { + t.Parallel() + + input := map[string]interface{}{ + "vfoo": "foo", + "vbar": &map[string]interface{}{ + "vstring": "foo", + "vint": 42, + "vbool": true, + }, + } + + var result NestedPointer + err := Decode(input, &result) + if err != nil { + t.Fatalf("got an err: %s", err.Error()) + } + + if result.Vfoo != "foo" { + t.Errorf("vfoo value should be 'foo': %#v", result.Vfoo) + } + + if result.Vbar.Vstring != "foo" { + t.Errorf("vstring value should be 'foo': %#v", result.Vbar.Vstring) + } + + if result.Vbar.Vint != 42 { + t.Errorf("vint value should be 42: %#v", result.Vbar.Vint) + } + + if result.Vbar.Vbool != true { + t.Errorf("vbool value should be true: %#v", result.Vbar.Vbool) + } + + if result.Vbar.Vextra != "" { + t.Errorf("vextra value should be empty: %#v", result.Vbar.Vextra) + } +} + +func TestSlice(t *testing.T) { + t.Parallel() + + inputStringSlice := map[string]interface{}{ + "vfoo": "foo", + "vbar": []string{"foo", "bar", "baz"}, + } + + inputStringSlicePointer := map[string]interface{}{ + "vfoo": "foo", + "vbar": &[]string{"foo", "bar", "baz"}, + } + + outputStringSlice := &Slice{ + "foo", + []string{"foo", "bar", "baz"}, + } + + testSliceInput(t, inputStringSlice, outputStringSlice) + testSliceInput(t, inputStringSlicePointer, outputStringSlice) +} + +func TestInvalidSlice(t *testing.T) { + t.Parallel() + + input := map[string]interface{}{ + "vfoo": "foo", + "vbar": 42, + } + + result := Slice{} + err := Decode(input, &result) + if err == nil { + t.Errorf("expected failure") + } +} + +func TestSliceOfStruct(t *testing.T) { + t.Parallel() + + input := map[string]interface{}{ + "value": []map[string]interface{}{ + {"vstring": "one"}, + {"vstring": "two"}, + }, + } + + var result SliceOfStruct + err := Decode(input, &result) + if err != nil { + t.Fatalf("got unexpected error: %s", err) + } + + if len(result.Value) != 2 { + t.Fatalf("expected two values, got %d", len(result.Value)) + } + + if result.Value[0].Vstring != "one" { + t.Errorf("first value should be 'one', got: %s", result.Value[0].Vstring) + } + + if result.Value[1].Vstring != "two" { + t.Errorf("second value should be 'two', got: %s", result.Value[1].Vstring) + } +} + +func TestSliceToMap(t *testing.T) { + t.Parallel() + + input := []map[string]interface{}{ + { + "foo": "bar", + }, + { + "bar": "baz", + }, + } + + var result map[string]interface{} + err := WeakDecode(input, &result) + if err != nil { + t.Fatalf("got an error: %s", err) + } + + expected := map[string]interface{}{ + "foo": "bar", + "bar": "baz", + } + if !reflect.DeepEqual(result, expected) { + t.Errorf("bad: %#v", result) + } +} + +func TestInvalidType(t *testing.T) { + t.Parallel() + + input := map[string]interface{}{ + "vstring": 42, + } + + var result Basic + err := Decode(input, &result) + if err == nil { + t.Fatal("error should exist") + } + + derr, ok := err.(*Error) + if !ok { + t.Fatalf("error should be kind of Error, instead: %#v", err) + } + + if derr.Errors[0] != "'Vstring' expected type 'string', got unconvertible type 'int'" { + t.Errorf("got unexpected error: %s", err) + } + + inputNegIntUint := map[string]interface{}{ + "vuint": -42, + } + + err = Decode(inputNegIntUint, &result) + if err == nil { + t.Fatal("error should exist") + } + + derr, ok = err.(*Error) + if !ok { + t.Fatalf("error should be kind of Error, instead: %#v", err) + } + + if derr.Errors[0] != "cannot parse 'Vuint', -42 overflows uint" { + t.Errorf("got unexpected error: %s", err) + } + + inputNegFloatUint := map[string]interface{}{ + "vuint": -42.0, + } + + err = Decode(inputNegFloatUint, &result) + if err == nil { + t.Fatal("error should exist") + } + + derr, ok = err.(*Error) + if !ok { + t.Fatalf("error should be kind of Error, instead: %#v", err) + } + + if derr.Errors[0] != "cannot parse 'Vuint', -42.000000 overflows uint" { + t.Errorf("got unexpected error: %s", err) + } +} + +func TestMetadata(t *testing.T) { + t.Parallel() + + input := map[string]interface{}{ + "vfoo": "foo", + "vbar": map[string]interface{}{ + "vstring": "foo", + "Vuint": 42, + "foo": "bar", + }, + "bar": "nil", + } + + var md Metadata + var result Nested + config := &DecoderConfig{ + Metadata: &md, + Result: &result, + } + + decoder, err := NewDecoder(config) + if err != nil { + t.Fatalf("err: %s", err) + } + + err = decoder.Decode(input) + if err != nil { + t.Fatalf("err: %s", err.Error()) + } + + expectedKeys := []string{"Vbar", "Vbar.Vstring", "Vbar.Vuint", "Vfoo"} + sort.Strings(md.Keys) + if !reflect.DeepEqual(md.Keys, expectedKeys) { + t.Fatalf("bad keys: %#v", md.Keys) + } + + expectedUnused := []string{"Vbar.foo", "bar"} + if !reflect.DeepEqual(md.Unused, expectedUnused) { + t.Fatalf("bad unused: %#v", md.Unused) + } +} + +func TestMetadata_Embedded(t *testing.T) { + t.Parallel() + + input := map[string]interface{}{ + "vstring": "foo", + "vunique": "bar", + } + + var md Metadata + var result EmbeddedSquash + config := &DecoderConfig{ + Metadata: &md, + Result: &result, + } + + decoder, err := NewDecoder(config) + if err != nil { + t.Fatalf("err: %s", err) + } + + err = decoder.Decode(input) + if err != nil { + t.Fatalf("err: %s", err.Error()) + } + + expectedKeys := []string{"Vstring", "Vunique"} + + sort.Strings(md.Keys) + if !reflect.DeepEqual(md.Keys, expectedKeys) { + t.Fatalf("bad keys: %#v", md.Keys) + } + + expectedUnused := []string{} + if !reflect.DeepEqual(md.Unused, expectedUnused) { + t.Fatalf("bad unused: %#v", md.Unused) + } +} + +func TestNonPtrValue(t *testing.T) { + t.Parallel() + + err := Decode(map[string]interface{}{}, Basic{}) + if err == nil { + t.Fatal("error should exist") + } + + if err.Error() != "result must be a pointer" { + t.Errorf("got unexpected error: %s", err) + } +} + +func TestTagged(t *testing.T) { + t.Parallel() + + input := map[string]interface{}{ + "foo": "bar", + "bar": "value", + } + + var result Tagged + err := Decode(input, &result) + if err != nil { + t.Fatalf("unexpected error: %s", err) + } + + if result.Value != "bar" { + t.Errorf("value should be 'bar', got: %#v", result.Value) + } + + if result.Extra != "value" { + t.Errorf("extra should be 'value', got: %#v", result.Extra) + } +} + +func TestWeakDecode(t *testing.T) { + t.Parallel() + + input := map[string]interface{}{ + "foo": "4", + "bar": "value", + } + + var result struct { + Foo int + Bar string + } + + if err := WeakDecode(input, &result); err != nil { + t.Fatalf("err: %s", err) + } + if result.Foo != 4 { + t.Fatalf("bad: %#v", result) + } + if result.Bar != "value" { + t.Fatalf("bad: %#v", result) + } +} + +func testSliceInput(t *testing.T, input map[string]interface{}, expected *Slice) { + var result Slice + err := Decode(input, &result) + if err != nil { + t.Fatalf("got error: %s", err) + } + + if result.Vfoo != expected.Vfoo { + t.Errorf("Vfoo expected '%s', got '%s'", expected.Vfoo, result.Vfoo) + } + + if result.Vbar == nil { + t.Fatalf("Vbar a slice, got '%#v'", result.Vbar) + } + + if len(result.Vbar) != len(expected.Vbar) { + t.Errorf("Vbar length should be %d, got %d", len(expected.Vbar), len(result.Vbar)) + } + + for i, v := range result.Vbar { + if v != expected.Vbar[i] { + t.Errorf( + "Vbar[%d] should be '%#v', got '%#v'", + i, expected.Vbar[i], v) + } + } +} diff --git a/vendor/github.com/ncabatoff/process-exporter/Gopkg.lock b/vendor/github.com/ncabatoff/process-exporter/Gopkg.lock new file mode 100644 index 000000000..757df73e1 --- /dev/null +++ b/vendor/github.com/ncabatoff/process-exporter/Gopkg.lock @@ -0,0 +1,75 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + branch = "master" + name = "github.com/beorn7/perks" + packages = ["quantile"] + revision = "4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9" + +[[projects]] + branch = "master" + name = "github.com/golang/protobuf" + packages = ["proto"] + revision = "17ce1425424ab154092bbb43af630bd647f3bb0d" + +[[projects]] + branch = "master" + name = "github.com/kylelemons/godebug" + packages = ["diff","pretty"] + revision = "d65d576e9348f5982d7f6d83682b694e731a45c6" + +[[projects]] + name = "github.com/matttproud/golang_protobuf_extensions" + packages = ["pbutil"] + revision = "3247c84500bff8d9fb6d579d800f20b3e091582c" + version = "v1.0.0" + +[[projects]] + branch = "master" + name = "github.com/ncabatoff/fakescraper" + packages = ["."] + revision = "15938421d91a82d197de7fc59aebcac65c43407d" + +[[projects]] + name = "github.com/prometheus/client_golang" + packages = ["prometheus"] + revision = "c5b7fccd204277076155f10851dad72b76a49317" + version = "v0.8.0" + +[[projects]] + branch = "master" + name = "github.com/prometheus/client_model" + packages = ["go"] + revision = "6f3806018612930941127f2a7c6c453ba2c527d2" + +[[projects]] + branch = "master" + name = "github.com/prometheus/common" + packages = ["expfmt","internal/bitbucket.org/ww/goautoneg","model"] + revision = "2f17f4a9d485bf34b4bfaccc273805040e4f86c8" + +[[projects]] + branch = "master" + name = "github.com/prometheus/procfs" + packages = [".","xfs"] + revision = "e645f4e5aaa8506fc71d6edbc5c4ff02c04c46f2" + +[[projects]] + branch = "v1" + name = "gopkg.in/check.v1" + packages = ["."] + revision = "20d25e2804050c1cd24a7eea1e7a6447dd0e74ec" + +[[projects]] + branch = "v2" + name = "gopkg.in/yaml.v2" + packages = ["."] + revision = "eb3733d160e74a9c7e442f435eb3bea458e1d19f" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + inputs-digest = "abd920f891c3e5fe2ee27ce40acbdde66e0799704d160b01f22530df003adfe1" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/vendor/github.com/ncabatoff/process-exporter/Gopkg.toml b/vendor/github.com/ncabatoff/process-exporter/Gopkg.toml new file mode 100644 index 000000000..a5be94709 --- /dev/null +++ b/vendor/github.com/ncabatoff/process-exporter/Gopkg.toml @@ -0,0 +1,46 @@ + +# Gopkg.toml example +# +# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md +# for detailed Gopkg.toml documentation. +# +# required = ["github.com/user/thing/cmd/thing"] +# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] +# +# [[constraint]] +# name = "github.com/user/project" +# version = "1.0.0" +# +# [[constraint]] +# name = "github.com/user/project2" +# branch = "dev" +# source = "github.com/myfork/project2" +# +# [[override]] +# name = "github.com/x/y" +# version = "2.4.0" + + +[[constraint]] + branch = "master" + name = "github.com/kylelemons/godebug" + +[[constraint]] + branch = "master" + name = "github.com/ncabatoff/fakescraper" + +[[constraint]] + name = "github.com/prometheus/client_golang" + version = "0.8.0" + +[[constraint]] + branch = "master" + name = "github.com/prometheus/procfs" + +[[constraint]] + branch = "v1" + name = "gopkg.in/check.v1" + +[[constraint]] + branch = "v2" + name = "gopkg.in/yaml.v2" diff --git a/vendor/github.com/ncabatoff/process-exporter/Makefile b/vendor/github.com/ncabatoff/process-exporter/Makefile index 028c2c236..7ce4e28e8 100644 --- a/vendor/github.com/ncabatoff/process-exporter/Makefile +++ b/vendor/github.com/ncabatoff/process-exporter/Makefile @@ -12,7 +12,7 @@ # limitations under the License. GO := GO15VENDOREXPERIMENT=1 go -FIRST_GOPATH := $(firstword $(subst :, ,$(GOPATH))) +FIRST_GOPATH := $(firstword $(subst :, ,$(shell $(GO) env GOPATH))) PROMU := $(FIRST_GOPATH)/bin/promu pkgs = $(shell $(GO) list ./... | grep -v /vendor/) @@ -26,7 +26,7 @@ ifdef DEBUG endif -all: format build test +all: format vet build test style: @echo ">> checking code style" @@ -64,7 +64,7 @@ docker: promu: @echo ">> fetching promu" @GOOS=$(shell uname -s | tr A-Z a-z) \ - GOARCH=$(subst x86_64,amd64,$(patsubst i%86,386,$(shell uname -m))) \ + GOARCH=$(subst x86_64,amd64,$(patsubst i%86,386,$(patsubst arm%,arm,$(shell uname -m)))) \ $(GO) get -u github.com/prometheus/promu diff --git a/vendor/github.com/ncabatoff/process-exporter/proc/base_test.go b/vendor/github.com/ncabatoff/process-exporter/proc/base_test.go new file mode 100644 index 000000000..6c902b7f2 --- /dev/null +++ b/vendor/github.com/ncabatoff/process-exporter/proc/base_test.go @@ -0,0 +1,26 @@ +package proc + +import ( + . "gopkg.in/check.v1" + "testing" +) + +// Hook up gocheck into the "go test" runner. +func Test(t *testing.T) { TestingT(t) } + +type MySuite struct{} + +var _ = Suite(&MySuite{}) + +// read everything in the iterator +func consumeIter(pi ProcIter) ([]ProcIdInfo, error) { + infos := []ProcIdInfo{} + for pi.Next() { + info, err := Info(pi) + if err != nil { + return nil, err + } + infos = append(infos, info) + } + return infos, nil +} diff --git a/vendor/github.com/ncabatoff/process-exporter/proc/grouper.go b/vendor/github.com/ncabatoff/process-exporter/proc/grouper.go index eccb1b985..6ec3067ac 100644 --- a/vendor/github.com/ncabatoff/process-exporter/proc/grouper.go +++ b/vendor/github.com/ncabatoff/process-exporter/proc/grouper.go @@ -22,6 +22,8 @@ type ( Memresident uint64 Memvirtual uint64 OldestStartTime time.Time + OpenFDs uint64 + WorstFDratio float64 } ) @@ -84,7 +86,7 @@ func (g *Grouper) Update(iter ProcIter) (int, error) { // Step 1: track any new proc that should be tracked based on its name and cmdline. untracked := make(map[ProcId]ProcIdInfo) for _, idinfo := range newProcs { - wanted, gname := g.namer.MatchAndName(common.NameAndCmdline{idinfo.Name, idinfo.Cmdline}) + wanted, gname := g.namer.MatchAndName(common.NameAndCmdline{Name: idinfo.Name, Cmdline: idinfo.Cmdline}) if !wanted { untracked[idinfo.ProcId] = idinfo continue @@ -121,14 +123,19 @@ func (g *Grouper) groups() GroupCountMap { } cur := gcounts[tinfo.GroupName] cur.Procs++ - _, counts, mem, start := tinfo.GetStats() - cur.Memresident += mem.Resident - cur.Memvirtual += mem.Virtual - cur.Counts.Cpu += counts.Cpu - cur.Counts.ReadBytes += counts.ReadBytes - cur.Counts.WriteBytes += counts.WriteBytes - if cur.OldestStartTime == zeroTime || start.Before(cur.OldestStartTime) { - cur.OldestStartTime = start + tstats := tinfo.GetStats() + cur.Memresident += tstats.Memory.Resident + cur.Memvirtual += tstats.Memory.Virtual + cur.OpenFDs += tstats.Filedesc.Open + openratio := float64(tstats.Filedesc.Open) / float64(tstats.Filedesc.Limit) + if cur.WorstFDratio < openratio { + cur.WorstFDratio = openratio + } + cur.Counts.Cpu += tstats.latest.Cpu + cur.Counts.ReadBytes += tstats.latest.ReadBytes + cur.Counts.WriteBytes += tstats.latest.WriteBytes + if cur.OldestStartTime == zeroTime || tstats.start.Before(cur.OldestStartTime) { + cur.OldestStartTime = tstats.start } gcounts[tinfo.GroupName] = cur } diff --git a/vendor/github.com/ncabatoff/process-exporter/proc/grouper_test.go b/vendor/github.com/ncabatoff/process-exporter/proc/grouper_test.go new file mode 100644 index 000000000..f629cc310 --- /dev/null +++ b/vendor/github.com/ncabatoff/process-exporter/proc/grouper_test.go @@ -0,0 +1,268 @@ +package proc + +import ( + "github.com/kylelemons/godebug/pretty" + common "github.com/ncabatoff/process-exporter" + . "gopkg.in/check.v1" + "time" +) + +type namer map[string]struct{} + +func newNamer(names ...string) namer { + nr := make(namer, len(names)) + for _, name := range names { + nr[name] = struct{}{} + } + return nr +} + +func (n namer) MatchAndName(nacl common.NameAndCmdline) (bool, string) { + if _, ok := n[nacl.Name]; ok { + return true, nacl.Name + } + return false, "" +} + +// Test core group() functionality, i.e things not related to namers or parents +// or processes that have exited. +func (s MySuite) TestGrouperBasic(c *C) { + newProc := func(pid int, name string, m ProcMetrics) ProcIdInfo { + pis := newProcIdStatic(pid, 0, 0, name, nil) + return ProcIdInfo{ + ProcId: pis.ProcId, + ProcStatic: pis.ProcStatic, + ProcMetrics: m, + } + } + gr := NewGrouper(false, newNamer("g1", "g2")) + p1 := newProc(1, "g1", ProcMetrics{1, 2, 3, 4, 5, 4, 400}) + p2 := newProc(2, "g2", ProcMetrics{2, 3, 4, 5, 6, 40, 400}) + p3 := newProc(3, "g3", ProcMetrics{}) + + _, err := gr.Update(procInfoIter(p1, p2, p3)) + c.Assert(err, IsNil) + + got1 := gr.groups() + want1 := GroupCountMap{ + "g1": GroupCounts{Counts{0, 0, 0}, 1, 4, 5, time.Time{}, 4, 0.01}, + "g2": GroupCounts{Counts{0, 0, 0}, 1, 5, 6, time.Time{}, 40, 0.1}, + } + c.Check(got1, DeepEquals, want1, Commentf("diff %s", pretty.Compare(got1, want1))) + + // Now increment counts and memory and make sure group counts updated. + p1.ProcMetrics = ProcMetrics{2, 3, 4, 5, 6, 4, 400} + p2.ProcMetrics = ProcMetrics{4, 5, 6, 7, 8, 40, 400} + + _, err = gr.Update(procInfoIter(p1, p2, p3)) + c.Assert(err, IsNil) + + got2 := gr.groups() + want2 := GroupCountMap{ + "g1": GroupCounts{Counts{1, 1, 1}, 1, 5, 6, time.Time{}, 4, 0.01}, + "g2": GroupCounts{Counts{2, 2, 2}, 1, 7, 8, time.Time{}, 40, 0.1}, + } + c.Check(got2, DeepEquals, want2, Commentf("diff %s", pretty.Compare(got2, want2))) + + // Now add a new proc and update p2's metrics. The + // counts for p4 won't be factored into the total yet + // because we only add to counts starting with the + // second time we see a proc. Memory and FDs are affected + // though. + p4 := newProc(4, "g2", ProcMetrics{1, 1, 1, 1, 1, 80, 400}) + p2.ProcMetrics = ProcMetrics{5, 6, 7, 8, 9, 40, 400} + + _, err = gr.Update(procInfoIter(p1, p2, p3, p4)) + c.Assert(err, IsNil) + + got3 := gr.groups() + want3 := GroupCountMap{ + "g1": GroupCounts{Counts{0, 0, 0}, 1, 5, 6, time.Time{}, 4, 0.01}, + "g2": GroupCounts{Counts{1, 1, 1}, 2, 9, 10, time.Time{}, 120, 0.2}, + } + c.Check(got3, DeepEquals, want3, Commentf("diff %s", pretty.Compare(got3, want3))) + + p4.ProcMetrics = ProcMetrics{2, 2, 2, 2, 2, 100, 400} + p2.ProcMetrics = ProcMetrics{6, 7, 8, 8, 9, 40, 400} + + _, err = gr.Update(procInfoIter(p1, p2, p3, p4)) + c.Assert(err, IsNil) + + got4 := gr.groups() + want4 := GroupCountMap{ + "g1": GroupCounts{Counts{0, 0, 0}, 1, 5, 6, time.Time{}, 4, 0.01}, + "g2": GroupCounts{Counts{2, 2, 2}, 2, 10, 11, time.Time{}, 140, 0.25}, + } + c.Check(got4, DeepEquals, want4, Commentf("diff %s", pretty.Compare(got4, want4))) + +} + +// Test that if a proc is tracked, we track its descendants, and if not as +// before it gets ignored. We won't bother testing metric accumulation since +// that should be covered by TestGrouperBasic. +func (s MySuite) TestGrouperParents(c *C) { + newProc := func(pid, ppid int, name string) ProcIdInfo { + pis := newProcIdStatic(pid, ppid, 0, name, nil) + return ProcIdInfo{ + ProcId: pis.ProcId, + ProcStatic: pis.ProcStatic, + ProcMetrics: ProcMetrics{}, + } + } + gr := NewGrouper(true, newNamer("g1", "g2")) + p1 := newProc(1, 0, "g1") + p2 := newProc(2, 0, "g2") + p3 := newProc(3, 0, "g3") + + _, err := gr.Update(procInfoIter(p1, p2, p3)) + c.Assert(err, IsNil) + + got1 := gr.groups() + want1 := GroupCountMap{ + "g1": GroupCounts{Counts{}, 1, 0, 0, time.Time{}, 0, 0}, + "g2": GroupCounts{Counts{}, 1, 0, 0, time.Time{}, 0, 0}, + } + c.Check(got1, DeepEquals, want1, Commentf("diff %s", pretty.Compare(got1, want1))) + + // Now we'll give each of the procs a child and test that the count of procs + // in each group is incremented. + + p4 := newProc(4, p1.Pid, "") + p5 := newProc(5, p2.Pid, "") + p6 := newProc(6, p3.Pid, "") + + _, err = gr.Update(procInfoIter(p1, p2, p3, p4, p5, p6)) + c.Assert(err, IsNil) + + got2 := gr.groups() + want2 := GroupCountMap{ + "g1": GroupCounts{Counts{}, 2, 0, 0, time.Time{}, 0, 0}, + "g2": GroupCounts{Counts{}, 2, 0, 0, time.Time{}, 0, 0}, + } + c.Check(got2, DeepEquals, want2, Commentf("diff %s", pretty.Compare(got2, want2))) + + // Now we'll let p4 die, and give p5 a child and grandchild and great-grandchild. + + p7 := newProc(7, p5.Pid, "") + p8 := newProc(8, p7.Pid, "") + p9 := newProc(9, p8.Pid, "") + + _, err = gr.Update(procInfoIter(p1, p2, p3, p5, p6, p7, p8, p9)) + c.Assert(err, IsNil) + + got3 := gr.groups() + want3 := GroupCountMap{ + "g1": GroupCounts{Counts{}, 1, 0, 0, time.Time{}, 0, 0}, + "g2": GroupCounts{Counts{}, 5, 0, 0, time.Time{}, 0, 0}, + } + c.Check(got3, DeepEquals, want3, Commentf("diff %s", pretty.Compare(got3, want3))) +} + +// Test that Groups() reports on new CPU/IO activity, even if some processes in the +// group have gone away. +func (s MySuite) TestGrouperGroup(c *C) { + newProc := func(pid int, name string, m ProcMetrics) ProcIdInfo { + pis := newProcIdStatic(pid, 0, 0, name, nil) + return ProcIdInfo{ + ProcId: pis.ProcId, + ProcStatic: pis.ProcStatic, + ProcMetrics: m, + } + } + gr := NewGrouper(false, newNamer("g1")) + + // First call should return zero CPU/IO. + p1 := newProc(1, "g1", ProcMetrics{1, 2, 3, 4, 5, 8, 400}) + _, err := gr.Update(procInfoIter(p1)) + c.Assert(err, IsNil) + got1 := gr.Groups() + want1 := GroupCountMap{ + "g1": GroupCounts{Counts{0, 0, 0}, 1, 4, 5, time.Time{}, 8, 0.02}, + } + c.Check(got1, DeepEquals, want1) + + // Second call should return the delta CPU/IO from first observance, + // as well as latest memory/proccount. + p1.ProcMetrics = ProcMetrics{2, 3, 4, 5, 6, 12, 400} + _, err = gr.Update(procInfoIter(p1)) + c.Assert(err, IsNil) + got2 := gr.Groups() + want2 := GroupCountMap{ + "g1": GroupCounts{Counts{1, 1, 1}, 1, 5, 6, time.Time{}, 12, 0.03}, + } + c.Check(got2, DeepEquals, want2) + + // Third call: process hasn't changed, nor should our group stats. + _, err = gr.Update(procInfoIter(p1)) + c.Assert(err, IsNil) + got3 := gr.Groups() + want3 := GroupCountMap{ + "g1": GroupCounts{Counts{1, 1, 1}, 1, 5, 6, time.Time{}, 12, 0.03}, + } + c.Check(got3, DeepEquals, want3, Commentf("diff %s", pretty.Compare(got3, want3))) +} + +// Test that Groups() reports on new CPU/IO activity, even if some processes in the +// group have gone away. +func (s MySuite) TestGrouperNonDecreasing(c *C) { + newProc := func(pid int, name string, m ProcMetrics) ProcIdInfo { + pis := newProcIdStatic(pid, 0, 0, name, nil) + return ProcIdInfo{ + ProcId: pis.ProcId, + ProcStatic: pis.ProcStatic, + ProcMetrics: m, + } + } + gr := NewGrouper(false, newNamer("g1", "g2")) + p1 := newProc(1, "g1", ProcMetrics{1, 2, 3, 4, 5, 4, 400}) + p2 := newProc(2, "g2", ProcMetrics{2, 3, 4, 5, 6, 40, 400}) + + _, err := gr.Update(procInfoIter(p1, p2)) + c.Assert(err, IsNil) + + got1 := gr.Groups() + want1 := GroupCountMap{ + "g1": GroupCounts{Counts{0, 0, 0}, 1, 4, 5, time.Time{}, 4, 0.01}, + "g2": GroupCounts{Counts{0, 0, 0}, 1, 5, 6, time.Time{}, 40, 0.1}, + } + c.Check(got1, DeepEquals, want1, Commentf("diff %s", pretty.Compare(got1, want1))) + + // Now add a new proc p3 to g2, and increment p1/p2's metrics. + p1.ProcMetrics = ProcMetrics{2, 3, 4, 5, 6, 8, 400} + p2.ProcMetrics = ProcMetrics{4, 5, 6, 7, 8, 80, 400} + p3 := newProc(3, "g2", ProcMetrics{1, 1, 1, 1, 1, 8, 400}) + _, err = gr.Update(procInfoIter(p1, p2, p3)) + c.Assert(err, IsNil) + + got2 := gr.Groups() + want2 := GroupCountMap{ + "g1": GroupCounts{Counts{1, 1, 1}, 1, 5, 6, time.Time{}, 8, 0.02}, + "g2": GroupCounts{Counts{2, 2, 2}, 2, 8, 9, time.Time{}, 88, 0.2}, + } + c.Check(got2, DeepEquals, want2, Commentf("diff %s", pretty.Compare(got2, want2))) + + // Now update p3's metrics and kill p2. + p3.ProcMetrics = ProcMetrics{2, 3, 4, 5, 6, 8, 400} + _, err = gr.Update(procInfoIter(p1, p3)) + c.Assert(err, IsNil) + + got3 := gr.Groups() + want3 := GroupCountMap{ + "g1": GroupCounts{Counts{1, 1, 1}, 1, 5, 6, time.Time{}, 8, 0.02}, + "g2": GroupCounts{Counts{3, 4, 5}, 1, 5, 6, time.Time{}, 8, 0.02}, + } + c.Check(got3, DeepEquals, want3, Commentf("diff %s", pretty.Compare(got3, want3))) + + // Now update p3's metrics and kill p1. + p3.ProcMetrics = ProcMetrics{4, 4, 4, 2, 1, 4, 400} + _, err = gr.Update(procInfoIter(p3)) + c.Assert(err, IsNil) + + got4 := gr.Groups() + want4 := GroupCountMap{ + "g1": GroupCounts{Counts{1, 1, 1}, 0, 0, 0, time.Time{}, 0, 0}, + "g2": GroupCounts{Counts{5, 5, 5}, 1, 2, 1, time.Time{}, 4, 0.01}, + } + c.Check(got4, DeepEquals, want4, Commentf("diff %s\n%s", pretty.Compare(got4, want4), pretty.Sprint(gr))) + +} diff --git a/vendor/github.com/ncabatoff/process-exporter/proc/read.go b/vendor/github.com/ncabatoff/process-exporter/proc/read.go index 1cad6ef43..290503641 100644 --- a/vendor/github.com/ncabatoff/process-exporter/proc/read.go +++ b/vendor/github.com/ncabatoff/process-exporter/proc/read.go @@ -2,8 +2,9 @@ package proc import ( "fmt" - "github.com/prometheus/procfs" "time" + + "github.com/prometheus/procfs" ) func newProcIdStatic(pid, ppid int, startTime uint64, name string, cmdline []string) ProcIdStatic { @@ -35,6 +36,8 @@ type ( WriteBytes uint64 ResidentBytes uint64 VirtualBytes uint64 + OpenFDs uint64 + MaxFDs uint64 } ProcIdStatic struct { @@ -79,7 +82,7 @@ type ( stat *procfs.ProcStat cmdline []string io *procfs.ProcIO - bootTime int64 + bootTime uint64 } procs interface { @@ -89,7 +92,7 @@ type ( procfsprocs struct { Procs []procfs.Proc - bootTime int64 + bootTime uint64 } // ProcIter is an iterator over a sequence of procs. @@ -230,7 +233,7 @@ func (p proc) GetStatic() (ProcStatic, error) { if err != nil { return ProcStatic{}, err } - startTime := time.Unix(p.bootTime, 0) + startTime := time.Unix(int64(p.bootTime), 0) startTime = startTime.Add(time.Second / userHZ * time.Duration(stat.Starttime)) return ProcStatic{ Name: stat.Comm, @@ -249,18 +252,28 @@ func (p proc) GetMetrics() (ProcMetrics, error) { if err != nil { return ProcMetrics{}, err } + numfds, err := p.Proc.FileDescriptorsLen() + if err != nil { + return ProcMetrics{}, err + } + limits, err := p.NewLimits() + if err != nil { + return ProcMetrics{}, err + } return ProcMetrics{ CpuTime: stat.CPUTime(), ReadBytes: io.ReadBytes, WriteBytes: io.WriteBytes, ResidentBytes: uint64(stat.ResidentMemory()), VirtualBytes: uint64(stat.VirtualMemory()), + OpenFDs: uint64(numfds), + MaxFDs: uint64(limits.OpenFiles), }, nil } type FS struct { procfs.FS - BootTime int64 + BootTime uint64 } // See https://github.com/prometheus/procfs/blob/master/proc_stat.go for details on userHZ. diff --git a/vendor/github.com/ncabatoff/process-exporter/proc/read_test.go b/vendor/github.com/ncabatoff/process-exporter/proc/read_test.go new file mode 100644 index 000000000..0d48e1bc9 --- /dev/null +++ b/vendor/github.com/ncabatoff/process-exporter/proc/read_test.go @@ -0,0 +1,120 @@ +package proc + +import ( + . "gopkg.in/check.v1" + "os" + "os/exec" +) + +var fs *FS + +func init() { + fs, _ = NewFS("/proc") +} + +// Basic test of proc reading: does AllProcs return at least two procs, one of which is us. +func (s MySuite) TestAllProcs(c *C) { + procs := fs.AllProcs() + count := 0 + for procs.Next() { + count++ + if procs.GetPid() != os.Getpid() { + continue + } + procid, err := procs.GetProcId() + c.Assert(err, IsNil) + c.Check(procid.Pid, Equals, os.Getpid()) + static, err := procs.GetStatic() + c.Assert(err, IsNil) + c.Check(static.ParentPid, Equals, os.Getppid()) + } + err := procs.Close() + c.Assert(err, IsNil) + c.Check(count, Not(Equals), 0) +} + +// Test that we can observe the absence of a child process before it spawns and after it exits, +// and its presence during its lifetime. +func (s MySuite) TestAllProcsSpawn(c *C) { + childprocs := func() ([]ProcIdStatic, error) { + found := []ProcIdStatic{} + procs := fs.AllProcs() + mypid := os.Getpid() + for procs.Next() { + procid, err := procs.GetProcId() + if err != nil { + continue + } + static, err := procs.GetStatic() + if err != nil { + continue + } + if static.ParentPid == mypid { + found = append(found, ProcIdStatic{procid, static}) + } + } + err := procs.Close() + if err != nil { + return nil, err + } + return found, nil + } + + children1, err := childprocs() + c.Assert(err, IsNil) + + cmd := exec.Command("/bin/cat") + wc, err := cmd.StdinPipe() + c.Assert(err, IsNil) + err = cmd.Start() + c.Assert(err, IsNil) + + children2, err := childprocs() + c.Assert(err, IsNil) + + err = wc.Close() + c.Assert(err, IsNil) + err = cmd.Wait() + c.Assert(err, IsNil) + + children3, err := childprocs() + c.Assert(err, IsNil) + + foundcat := func(procs []ProcIdStatic) bool { + for _, proc := range procs { + if proc.Name == "cat" { + return true + } + } + return false + } + + c.Check(foundcat(children1), Equals, false) + c.Check(foundcat(children2), Equals, true) + c.Check(foundcat(children3), Equals, false) +} + +func (s MySuite) TestIterator(c *C) { + // create a new proc with zero metrics, cmdline, starttime, ppid + newProc := func(pid int, name string) ProcIdInfo { + pis := newProcIdStatic(pid, 0, 0, name, nil) + return ProcIdInfo{ + ProcId: pis.ProcId, + ProcStatic: pis.ProcStatic, + ProcMetrics: ProcMetrics{}, + } + } + p1 := newProc(1, "p1") + want1 := []ProcIdInfo{p1} + pi1 := procInfoIter(want1...) + got, err := consumeIter(pi1) + c.Assert(err, IsNil) + c.Check(got, DeepEquals, want1) + + p2 := newProc(2, "p2") + want2 := []ProcIdInfo{p1, p2} + pi2 := procInfoIter(want2...) + got2, err := consumeIter(pi2) + c.Assert(err, IsNil) + c.Check(got2, DeepEquals, want2) +} diff --git a/vendor/github.com/ncabatoff/process-exporter/proc/tracker.go b/vendor/github.com/ncabatoff/process-exporter/proc/tracker.go index 3c6b44883..30458a16a 100644 --- a/vendor/github.com/ncabatoff/process-exporter/proc/tracker.go +++ b/vendor/github.com/ncabatoff/process-exporter/proc/tracker.go @@ -18,6 +18,11 @@ type ( Virtual uint64 } + Filedesc struct { + Open uint64 + Limit uint64 + } + // Tracker tracks processes and records metrics. Tracker struct { // Tracked holds the processes are being monitored. Processes @@ -43,6 +48,13 @@ type ( // GroupName is an optional tag for this proc. GroupName string } + + trackedStats struct { + aggregate, latest Counts + Memory + Filedesc + start time.Time + } ) func (tp *TrackedProc) GetName() string { @@ -53,8 +65,16 @@ func (tp *TrackedProc) GetCmdLine() []string { return tp.info.Cmdline } -func (tp *TrackedProc) GetStats() (aggregate, latest Counts, mem Memory, start time.Time) { - return tp.accum, tp.lastaccum, Memory{Resident: tp.info.ResidentBytes, Virtual: tp.info.VirtualBytes}, tp.info.StartTime +func (tp *TrackedProc) GetStats() trackedStats { + mem := Memory{Resident: tp.info.ResidentBytes, Virtual: tp.info.VirtualBytes} + fd := Filedesc{Open: tp.info.OpenFDs, Limit: tp.info.MaxFDs} + return trackedStats{ + aggregate: tp.accum, + latest: tp.lastaccum, + Memory: mem, + Filedesc: fd, + start: tp.info.StartTime, + } } func NewTracker() *Tracker { diff --git a/vendor/github.com/ncabatoff/process-exporter/proc/tracker_test.go b/vendor/github.com/ncabatoff/process-exporter/proc/tracker_test.go new file mode 100644 index 000000000..8986aaff8 --- /dev/null +++ b/vendor/github.com/ncabatoff/process-exporter/proc/tracker_test.go @@ -0,0 +1,94 @@ +package proc + +import ( + . "gopkg.in/check.v1" +) + +// Verify that the tracker accurately reports new procs that aren't ignored or tracked. +func (s MySuite) TestTrackerBasic(c *C) { + // create a new proc with zero metrics, cmdline, starttime, ppid + newProc := func(pid int, startTime uint64, name string) ProcIdInfo { + pis := newProcIdStatic(pid, 0, 0, name, nil) + return ProcIdInfo{ + ProcId: pis.ProcId, + ProcStatic: pis.ProcStatic, + ProcMetrics: ProcMetrics{}, + } + } + tr := NewTracker() + + // Test that p1 is seen as new + p1 := newProc(1, 1, "p1") + want1 := []ProcIdInfo{p1} + got1, _, err := tr.Update(procInfoIter(want1...)) + c.Assert(err, IsNil) + c.Check(got1, DeepEquals, want1) + + // Test that p1 is no longer seen as new once tracked + tr.Track("g1", p1) + got2, _, err := tr.Update(procInfoIter(want1...)) + c.Assert(err, IsNil) + c.Check(got2, DeepEquals, []ProcIdInfo(nil)) + + // Test that p2 is new now, but p1 is still not + p2 := newProc(2, 2, "p2") + want2 := []ProcIdInfo{p2} + got3, _, err := tr.Update(procInfoIter(p1, p2)) + c.Assert(err, IsNil) + c.Check(got3, DeepEquals, want2) + + // Test that p2 stops being new once ignored + tr.Ignore(p2.ProcId) + got4, _, err := tr.Update(procInfoIter(p1, p2)) + c.Assert(err, IsNil) + c.Check(got4, DeepEquals, []ProcIdInfo(nil)) + + // TODO test that starttime is taken into account, i.e. pid recycling is handled. +} + +// Verify that the tracker accurately reports metric changes. +func (s MySuite) TestTrackerCounts(c *C) { + // create a new proc with cmdline, starttime, ppid + newProc := func(pid int, startTime uint64, name string, m ProcMetrics) ProcIdInfo { + pis := newProcIdStatic(pid, 0, 0, name, nil) + return ProcIdInfo{ + ProcId: pis.ProcId, + ProcStatic: pis.ProcStatic, + ProcMetrics: m, + } + } + tr := NewTracker() + + // Test that p1 is seen as new + p1 := newProc(1, 1, "p1", ProcMetrics{1, 2, 3, 4, 5, 6, 4096}) + want1 := []ProcIdInfo{p1} + got1, _, err := tr.Update(procInfoIter(p1)) + c.Assert(err, IsNil) + c.Check(got1, DeepEquals, want1) + + // Test that p1 is no longer seen as new once tracked + tr.Track("g1", p1) + got2, _, err := tr.Update(procInfoIter(p1)) + c.Assert(err, IsNil) + c.Check(got2, DeepEquals, []ProcIdInfo(nil)) + + // Now update p1's metrics + p1.ProcMetrics = ProcMetrics{2, 3, 4, 5, 6, 7, 4096} + got3, _, err := tr.Update(procInfoIter(p1)) + c.Assert(err, IsNil) + c.Check(got3, DeepEquals, []ProcIdInfo(nil)) + + // Test that counts are correct + c.Check(tr.Tracked[p1.ProcId].accum, Equals, Counts{1, 1, 1}) + c.Check(tr.Tracked[p1.ProcId].info, DeepEquals, ProcInfo{p1.ProcStatic, p1.ProcMetrics}) + + // Now update p1's metrics again + p1.ProcMetrics = ProcMetrics{4, 6, 8, 9, 10, 11, 4096} + got4, _, err := tr.Update(procInfoIter(p1)) + c.Assert(err, IsNil) + c.Check(got4, DeepEquals, []ProcIdInfo(nil)) + + // Test that counts are correct + c.Check(tr.Tracked[p1.ProcId].accum, Equals, Counts{3, 4, 5}) + c.Check(tr.Tracked[p1.ProcId].info, DeepEquals, ProcInfo{p1.ProcStatic, p1.ProcMetrics}) +} diff --git a/vendor/github.com/opencontainers/go-digest/.mailmap b/vendor/github.com/opencontainers/go-digest/.mailmap new file mode 100644 index 000000000..ba611cb21 --- /dev/null +++ b/vendor/github.com/opencontainers/go-digest/.mailmap @@ -0,0 +1 @@ +Stephen J Day diff --git a/vendor/github.com/opencontainers/go-digest/MAINTAINERS b/vendor/github.com/opencontainers/go-digest/MAINTAINERS index f5bd5a6ed..42a29795d 100644 --- a/vendor/github.com/opencontainers/go-digest/MAINTAINERS +++ b/vendor/github.com/opencontainers/go-digest/MAINTAINERS @@ -1,5 +1,7 @@ +Aaron Lehmann (@aaronlehmann) Brandon Philips (@philips) Brendan Burns (@brendandburns) +Derek McGowan (@dmcgowan) Jason Bouzane (@jbouzane) John Starks (@jstarks) Jonathan Boulle (@jonboulle) diff --git a/vendor/github.com/opencontainers/go-digest/README.md b/vendor/github.com/opencontainers/go-digest/README.md index 9d6174cfd..0f5a04092 100644 --- a/vendor/github.com/opencontainers/go-digest/README.md +++ b/vendor/github.com/opencontainers/go-digest/README.md @@ -1,10 +1,10 @@ # go-digest -[![GoDoc](https://godoc.org/github.com/docker/go-digest?status.svg)](https://godoc.org/github.com/docker/go-digest) [![Go Report Card](https://goreportcard.com/badge/github.com/docker/go-digest)](https://goreportcard.com/report/github.com/docker/go-digest) [![Build Status](https://travis-ci.org/docker/go-digest.svg?branch=master)](https://travis-ci.org/docker/go-digest) +[![GoDoc](https://godoc.org/github.com/opencontainers/go-digest?status.svg)](https://godoc.org/github.com/opencontainers/go-digest) [![Go Report Card](https://goreportcard.com/badge/github.com/opencontainers/go-digest)](https://goreportcard.com/report/github.com/opencontainers/go-digest) [![Build Status](https://travis-ci.org/opencontainers/go-digest.svg?branch=master)](https://travis-ci.org/opencontainers/go-digest) Common digest package used across the container ecosystem. -Please see the [godoc](https://godoc.org/github.com/docker/go-digest) for more information. +Please see the [godoc](https://godoc.org/github.com/opencontainers/go-digest) for more information. # What is a digest? @@ -49,7 +49,7 @@ can power a rich, safe, content distribution system. # Usage -While the [godoc](https://godoc.org/github.com/docker/go-digest) is +While the [godoc](https://godoc.org/github.com/opencontainers/go-digest) is considered the best resource, a few important items need to be called out when using this package. @@ -76,7 +76,7 @@ out when using this package. The Go API, at this stage, is considered stable, unless otherwise noted. -As always, before using a package export, read the [godoc](https://godoc.org/github.com/docker/go-digest). +As always, before using a package export, read the [godoc](https://godoc.org/github.com/opencontainers/go-digest). # Contributing @@ -88,16 +88,16 @@ the alternatives you tried before submitting a PR. # Reporting security issues -The maintainers take security seriously. If you discover a security -issue, please bring it to their attention right away! +Please DO NOT file a public issue, instead send your report privately to +security@opencontainers.org. -Please DO NOT file a public issue, instead send your report privately -to security@docker.com. +The maintainers take security seriously. If you discover a security issue, +please bring it to their attention right away! -Security reports are greatly appreciated and we will publicly thank you -for it. We also like to send gifts—if you're into Docker schwag, make -sure to let us know. We currently do not offer a paid security bounty -program, but are not ruling it out in the future. +If you are reporting a security issue, do not create an issue or file a pull +request on GitHub. Instead, disclose the issue responsibly by sending an email +to security@opencontainers.org (which is inhabited only by the maintainers of +the various OCI projects). # Copyright and license diff --git a/vendor/github.com/opencontainers/go-digest/algorithm.go b/vendor/github.com/opencontainers/go-digest/algorithm.go index a3c44801d..8813bd26f 100644 --- a/vendor/github.com/opencontainers/go-digest/algorithm.go +++ b/vendor/github.com/opencontainers/go-digest/algorithm.go @@ -1,3 +1,17 @@ +// Copyright 2017 Docker, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package digest import ( @@ -5,6 +19,7 @@ import ( "fmt" "hash" "io" + "regexp" ) // Algorithm identifies and implementation of a digester by an identifier. @@ -14,9 +29,9 @@ type Algorithm string // supported digest types const ( - SHA256 Algorithm = "sha256" // sha256 with hex encoding - SHA384 Algorithm = "sha384" // sha384 with hex encoding - SHA512 Algorithm = "sha512" // sha512 with hex encoding + SHA256 Algorithm = "sha256" // sha256 with hex encoding (lower case only) + SHA384 Algorithm = "sha384" // sha384 with hex encoding (lower case only) + SHA512 Algorithm = "sha512" // sha512 with hex encoding (lower case only) // Canonical is the primary digest algorithm used with the distribution // project. Other digests may be used but this one is the primary storage @@ -36,6 +51,14 @@ var ( SHA384: crypto.SHA384, SHA512: crypto.SHA512, } + + // anchoredEncodedRegexps contains anchored regular expressions for hex-encoded digests. + // Note that /A-F/ disallowed. + anchoredEncodedRegexps = map[Algorithm]*regexp.Regexp{ + SHA256: regexp.MustCompile(`^[a-f0-9]{64}$`), + SHA384: regexp.MustCompile(`^[a-f0-9]{96}$`), + SHA512: regexp.MustCompile(`^[a-f0-9]{128}$`), + } ) // Available returns true if the digest type is available for use. If this @@ -111,6 +134,14 @@ func (a Algorithm) Hash() hash.Hash { return algorithms[a].New() } +// Encode encodes the raw bytes of a digest, typically from a hash.Hash, into +// the encoded portion of the digest. +func (a Algorithm) Encode(d []byte) string { + // TODO(stevvooe): Currently, all algorithms use a hex encoding. When we + // add support for back registration, we can modify this accordingly. + return fmt.Sprintf("%x", d) +} + // FromReader returns the digest of the reader using the algorithm. func (a Algorithm) FromReader(rd io.Reader) (Digest, error) { digester := a.Digester() @@ -142,3 +173,20 @@ func (a Algorithm) FromBytes(p []byte) Digest { func (a Algorithm) FromString(s string) Digest { return a.FromBytes([]byte(s)) } + +// Validate validates the encoded portion string +func (a Algorithm) Validate(encoded string) error { + r, ok := anchoredEncodedRegexps[a] + if !ok { + return ErrDigestUnsupported + } + // Digests much always be hex-encoded, ensuring that their hex portion will + // always be size*2 + if a.Size()*2 != len(encoded) { + return ErrDigestInvalidLength + } + if r.MatchString(encoded) { + return nil + } + return ErrDigestInvalidFormat +} diff --git a/vendor/github.com/opencontainers/go-digest/algorithm_test.go b/vendor/github.com/opencontainers/go-digest/algorithm_test.go new file mode 100644 index 000000000..d50e8494f --- /dev/null +++ b/vendor/github.com/opencontainers/go-digest/algorithm_test.go @@ -0,0 +1,114 @@ +// Copyright 2017 Docker, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package digest + +import ( + "bytes" + "crypto/rand" + _ "crypto/sha256" + _ "crypto/sha512" + "flag" + "fmt" + "strings" + "testing" +) + +func TestFlagInterface(t *testing.T) { + var ( + alg Algorithm + flagSet flag.FlagSet + ) + + flagSet.Var(&alg, "algorithm", "set the digest algorithm") + for _, testcase := range []struct { + Name string + Args []string + Err error + Expected Algorithm + }{ + { + Name: "Invalid", + Args: []string{"-algorithm", "bean"}, + Err: ErrDigestUnsupported, + }, + { + Name: "Default", + Args: []string{"unrelated"}, + Expected: "sha256", + }, + { + Name: "Other", + Args: []string{"-algorithm", "sha512"}, + Expected: "sha512", + }, + } { + t.Run(testcase.Name, func(t *testing.T) { + alg = Canonical + if err := flagSet.Parse(testcase.Args); err != testcase.Err { + if testcase.Err == nil { + t.Fatal("unexpected error", err) + } + + // check that flag package returns correct error + if !strings.Contains(err.Error(), testcase.Err.Error()) { + t.Fatalf("unexpected error: %v != %v", err, testcase.Err) + } + return + } + + if alg != testcase.Expected { + t.Fatalf("unexpected algorithm: %v != %v", alg, testcase.Expected) + } + }) + } +} + +func TestFroms(t *testing.T) { + p := make([]byte, 1<<20) + rand.Read(p) + + for alg := range algorithms { + h := alg.Hash() + h.Write(p) + expected := Digest(fmt.Sprintf("%s:%x", alg, h.Sum(nil))) + readerDgst, err := alg.FromReader(bytes.NewReader(p)) + if err != nil { + t.Fatalf("error calculating hash from reader: %v", err) + } + + dgsts := []Digest{ + alg.FromBytes(p), + alg.FromString(string(p)), + readerDgst, + } + + if alg == Canonical { + readerDgst, err := FromReader(bytes.NewReader(p)) + if err != nil { + t.Fatalf("error calculating hash from reader: %v", err) + } + + dgsts = append(dgsts, + FromBytes(p), + FromString(string(p)), + readerDgst) + } + for _, dgst := range dgsts { + if dgst != expected { + t.Fatalf("unexpected digest %v != %v", dgst, expected) + } + } + } +} diff --git a/vendor/github.com/opencontainers/go-digest/digest.go b/vendor/github.com/opencontainers/go-digest/digest.go index 7c66c30c0..ad398cba2 100644 --- a/vendor/github.com/opencontainers/go-digest/digest.go +++ b/vendor/github.com/opencontainers/go-digest/digest.go @@ -1,3 +1,17 @@ +// Copyright 2017 Docker, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package digest import ( @@ -31,16 +45,21 @@ func NewDigest(alg Algorithm, h hash.Hash) Digest { // functions. This is also useful for rebuilding digests from binary // serializations. func NewDigestFromBytes(alg Algorithm, p []byte) Digest { - return Digest(fmt.Sprintf("%s:%x", alg, p)) + return NewDigestFromEncoded(alg, alg.Encode(p)) } -// NewDigestFromHex returns a Digest from alg and a the hex encoded digest. +// NewDigestFromHex is deprecated. Please use NewDigestFromEncoded. func NewDigestFromHex(alg, hex string) Digest { - return Digest(fmt.Sprintf("%s:%s", alg, hex)) + return NewDigestFromEncoded(Algorithm(alg), hex) +} + +// NewDigestFromEncoded returns a Digest from alg and the encoded digest. +func NewDigestFromEncoded(alg Algorithm, encoded string) Digest { + return Digest(fmt.Sprintf("%s:%s", alg, encoded)) } // DigestRegexp matches valid digest types. -var DigestRegexp = regexp.MustCompile(`[a-zA-Z0-9-_+.]+:[a-fA-F0-9]+`) +var DigestRegexp = regexp.MustCompile(`[a-z0-9]+(?:[.+_-][a-z0-9]+)*:[a-zA-Z0-9=_-]+`) // DigestRegexpAnchored matches valid digest types, anchored to the start and end of the match. var DigestRegexpAnchored = regexp.MustCompile(`^` + DigestRegexp.String() + `$`) @@ -82,26 +101,18 @@ func FromString(s string) Digest { // error if not. func (d Digest) Validate() error { s := string(d) - i := strings.Index(s, ":") - - // validate i then run through regexp - if i < 0 || i+1 == len(s) || !DigestRegexpAnchored.MatchString(s) { + if i <= 0 || i+1 == len(s) { return ErrDigestInvalidFormat } - - algorithm := Algorithm(s[:i]) + algorithm, encoded := Algorithm(s[:i]), s[i+1:] if !algorithm.Available() { + if !DigestRegexpAnchored.MatchString(s) { + return ErrDigestInvalidFormat + } return ErrDigestUnsupported } - - // Digests much always be hex-encoded, ensuring that their hex portion will - // always be size*2 - if algorithm.Size()*2 != len(s[i+1:]) { - return ErrDigestInvalidLength - } - - return nil + return algorithm.Validate(encoded) } // Algorithm returns the algorithm portion of the digest. This will panic if @@ -119,12 +130,17 @@ func (d Digest) Verifier() Verifier { } } -// Hex returns the hex digest portion of the digest. This will panic if the +// Encoded returns the encoded portion of the digest. This will panic if the // underlying digest is not in a valid format. -func (d Digest) Hex() string { +func (d Digest) Encoded() string { return string(d[d.sepIndex()+1:]) } +// Hex is deprecated. Please use Digest.Encoded. +func (d Digest) Hex() string { + return d.Encoded() +} + func (d Digest) String() string { return string(d) } diff --git a/vendor/github.com/opencontainers/go-digest/digest_test.go b/vendor/github.com/opencontainers/go-digest/digest_test.go new file mode 100644 index 000000000..cc3b648a8 --- /dev/null +++ b/vendor/github.com/opencontainers/go-digest/digest_test.go @@ -0,0 +1,134 @@ +// Copyright 2017 Docker, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package digest + +import ( + "testing" +) + +func TestParseDigest(t *testing.T) { + for _, testcase := range []struct { + input string + err error + algorithm Algorithm + encoded string + }{ + { + input: "sha256:e58fcf7418d4390dec8e8fb69d88c06ec07039d651fedd3aa72af9972e7d046b", + algorithm: "sha256", + encoded: "e58fcf7418d4390dec8e8fb69d88c06ec07039d651fedd3aa72af9972e7d046b", + }, + { + input: "sha384:d3fc7881460b7e22e3d172954463dddd7866d17597e7248453c48b3e9d26d9596bf9c4a9cf8072c9d5bad76e19af801d", + algorithm: "sha384", + encoded: "d3fc7881460b7e22e3d172954463dddd7866d17597e7248453c48b3e9d26d9596bf9c4a9cf8072c9d5bad76e19af801d", + }, + { + // empty hex + input: "sha256:", + err: ErrDigestInvalidFormat, + }, + { + // empty hex + input: ":", + err: ErrDigestInvalidFormat, + }, + { + // just hex + input: "d41d8cd98f00b204e9800998ecf8427e", + err: ErrDigestInvalidFormat, + }, + { + // not hex + input: "sha256:d41d8cd98f00b204e9800m98ecf8427e", + err: ErrDigestInvalidLength, + }, + { + // too short + input: "sha256:abcdef0123456789", + err: ErrDigestInvalidLength, + }, + { + // too short (from different algorithm) + input: "sha512:abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789", + err: ErrDigestInvalidLength, + }, + { + input: "foo:d41d8cd98f00b204e9800998ecf8427e", + err: ErrDigestUnsupported, + }, + { + // repeated separators + input: "sha384__foo+bar:d3fc7881460b7e22e3d172954463dddd7866d17597e7248453c48b3e9d26d9596bf9c4a9cf8072c9d5bad76e19af801d", + err: ErrDigestInvalidFormat, + }, + { + // ensure that we parse, but we don't have support for the algorithm + input: "sha384.foo+bar:d3fc7881460b7e22e3d172954463dddd7866d17597e7248453c48b3e9d26d9596bf9c4a9cf8072c9d5bad76e19af801d", + algorithm: "sha384.foo+bar", + encoded: "d3fc7881460b7e22e3d172954463dddd7866d17597e7248453c48b3e9d26d9596bf9c4a9cf8072c9d5bad76e19af801d", + err: ErrDigestUnsupported, + }, + { + input: "sha384_foo+bar:d3fc7881460b7e22e3d172954463dddd7866d17597e7248453c48b3e9d26d9596bf9c4a9cf8072c9d5bad76e19af801d", + algorithm: "sha384_foo+bar", + encoded: "d3fc7881460b7e22e3d172954463dddd7866d17597e7248453c48b3e9d26d9596bf9c4a9cf8072c9d5bad76e19af801d", + err: ErrDigestUnsupported, + }, + { + input: "sha256+b64:LCa0a2j_xo_5m0U8HTBBNBNCLXBkg7-g-YpeiGJm564", + algorithm: "sha256+b64", + encoded: "LCa0a2j_xo_5m0U8HTBBNBNCLXBkg7-g-YpeiGJm564", + err: ErrDigestUnsupported, + }, + { + input: "sha256:E58FCF7418D4390DEC8E8FB69D88C06EC07039D651FEDD3AA72AF9972E7D046B", + err: ErrDigestInvalidFormat, + }, + } { + digest, err := Parse(testcase.input) + if err != testcase.err { + t.Fatalf("error differed from expected while parsing %q: %v != %v", testcase.input, err, testcase.err) + } + + if testcase.err != nil { + continue + } + + if digest.Algorithm() != testcase.algorithm { + t.Fatalf("incorrect algorithm for parsed digest: %q != %q", digest.Algorithm(), testcase.algorithm) + } + + if digest.Encoded() != testcase.encoded { + t.Fatalf("incorrect hex for parsed digest: %q != %q", digest.Encoded(), testcase.encoded) + } + + // Parse string return value and check equality + newParsed, err := Parse(digest.String()) + + if err != nil { + t.Fatalf("unexpected error parsing input %q: %v", testcase.input, err) + } + + if newParsed != digest { + t.Fatalf("expected equal: %q != %q", newParsed, digest) + } + + newFromHex := NewDigestFromEncoded(newParsed.Algorithm(), newParsed.Encoded()) + if newFromHex != digest { + t.Fatalf("%v != %v", newFromHex, digest) + } + } +} diff --git a/vendor/github.com/opencontainers/go-digest/digester.go b/vendor/github.com/opencontainers/go-digest/digester.go index 918a3f919..36fa2728e 100644 --- a/vendor/github.com/opencontainers/go-digest/digester.go +++ b/vendor/github.com/opencontainers/go-digest/digester.go @@ -1,3 +1,17 @@ +// Copyright 2017 Docker, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package digest import "hash" diff --git a/vendor/github.com/opencontainers/go-digest/doc.go b/vendor/github.com/opencontainers/go-digest/doc.go index f64b0db32..491ea1ef1 100644 --- a/vendor/github.com/opencontainers/go-digest/doc.go +++ b/vendor/github.com/opencontainers/go-digest/doc.go @@ -1,3 +1,17 @@ +// Copyright 2017 Docker, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package digest provides a generalized type to opaquely represent message // digests and their operations within the registry. The Digest type is // designed to serve as a flexible identifier in a content-addressable system. diff --git a/vendor/github.com/opencontainers/go-digest/verifiers.go b/vendor/github.com/opencontainers/go-digest/verifiers.go index f1db6cda8..32125e918 100644 --- a/vendor/github.com/opencontainers/go-digest/verifiers.go +++ b/vendor/github.com/opencontainers/go-digest/verifiers.go @@ -1,3 +1,17 @@ +// Copyright 2017 Docker, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package digest import ( diff --git a/vendor/github.com/opencontainers/go-digest/verifiers_test.go b/vendor/github.com/opencontainers/go-digest/verifiers_test.go new file mode 100644 index 000000000..d67bb1bc6 --- /dev/null +++ b/vendor/github.com/opencontainers/go-digest/verifiers_test.go @@ -0,0 +1,80 @@ +// Copyright 2017 Docker, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package digest + +import ( + "bytes" + "crypto/rand" + "io" + "reflect" + "testing" +) + +func TestDigestVerifier(t *testing.T) { + p := make([]byte, 1<<20) + rand.Read(p) + digest := FromBytes(p) + + verifier := digest.Verifier() + + io.Copy(verifier, bytes.NewReader(p)) + + if !verifier.Verified() { + t.Fatalf("bytes not verified") + } +} + +// TestVerifierUnsupportedDigest ensures that unsupported digest validation is +// flowing through verifier creation. +func TestVerifierUnsupportedDigest(t *testing.T) { + for _, testcase := range []struct { + Name string + Digest Digest + Expected interface{} // expected panic target + }{ + { + Name: "Empty", + Digest: "", + Expected: "no ':' separator in digest \"\"", + }, + { + Name: "EmptyAlg", + Digest: ":", + Expected: "empty digest algorithm, validate before calling Algorithm.Hash()", + }, + { + Name: "Unsupported", + Digest: Digest("bean:0123456789abcdef"), + Expected: "bean not available (make sure it is imported)", + }, + { + Name: "Garbage", + Digest: Digest("sha256-garbage:pure"), + Expected: "sha256-garbage not available (make sure it is imported)", + }, + } { + t.Run(testcase.Name, func(t *testing.T) { + expected := testcase.Expected + defer func() { + recovered := recover() + if !reflect.DeepEqual(recovered, expected) { + t.Fatalf("unexpected recover: %v != %v", recovered, expected) + } + }() + + _ = testcase.Digest.Verifier() + }) + } +} diff --git a/vendor/github.com/paultag/sniff/.gitignore b/vendor/github.com/paultag/sniff/.gitignore new file mode 100644 index 000000000..590d5de43 --- /dev/null +++ b/vendor/github.com/paultag/sniff/.gitignore @@ -0,0 +1,2 @@ +*swp +sniff diff --git a/vendor/github.com/paultag/sniff/README.md b/vendor/github.com/paultag/sniff/README.md new file mode 100644 index 000000000..5c86d6482 --- /dev/null +++ b/vendor/github.com/paultag/sniff/README.md @@ -0,0 +1,61 @@ +sniff +===== + +SNIff is a small server that will accept incoming TLS connections, and parse +TLS Client Hello messages for the SNI Extension. If one is found, we'll go +ahead and forward that connection to a remote (or local!) host. + +sniff config +------------ + +```json +{ + "bind": { + "host": "localhost", + "port": 8443 + }, + "servers": [ + { + "default": false, + "regexp": false, + "host": "97.107.130.79", + "names": [ + "pault.ag", + "www.pault.ag" + ], + "port": 443 + } + ] +} +``` + +The following config will listen on port `8443`, and connect any requests +to `pault.ag` or `www.pault.ag` to port `443` on host `97.107.130.79`. If +nothing matches this, the socket will be closed. + +Changing default to true would send any unmatched hosts (or TLS / SSL connections +without SNI) to that host. + +By default, the requested domain name is compared literally with the strings +inside `names`. If `regexp` is true, then the names are interpreted as regular +expressions. Each server and name will be checked in the order they appear in +the file, stopping with the first match. If there is no match, then the +request is sent to the first server with `default` set. + +using the parser +---------------- + +``` +import ( + "fmt" + + "pault.ag/go/sniff/parser" +) + +func main() { + listener, err := net.Listen("tcp", "localhost:2222") + if err != nil { + return err + } +} +``` diff --git a/vendor/github.com/paultag/sniff/config.go b/vendor/github.com/paultag/sniff/config.go new file mode 100644 index 000000000..1382164f5 --- /dev/null +++ b/vendor/github.com/paultag/sniff/config.go @@ -0,0 +1,47 @@ +/* {{{ Copyright 2017 Paul Tagliamonte + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. }}} */ + +package main + +import ( + "encoding/json" + "os" +) + +type Config struct { + Bind Bind + Servers []Server +} + +type Bind struct { + Host string + Port int +} + +type Server struct { + Default bool + Regexp bool + Host string + Names []string + Port int +} + +func LoadConfig(path string) (*Config, error) { + fd, err := os.Open(path) + if err != nil { + return nil, err + } + config := Config{} + return &config, json.NewDecoder(fd).Decode(&config) +} diff --git a/vendor/github.com/paultag/sniff/main.go b/vendor/github.com/paultag/sniff/main.go new file mode 100644 index 000000000..00c9379fc --- /dev/null +++ b/vendor/github.com/paultag/sniff/main.go @@ -0,0 +1,35 @@ +/* {{{ Copyright 2017 Paul Tagliamonte + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. }}} */ + +package main + +import ( + "flag" +) + +func main() { + var sniffConfig string + + flag.StringVar(&sniffConfig, "config", "sniff.json", "Config") + flag.Parse() + + config, err := LoadConfig(sniffConfig) + if err != nil { + panic(err) + } + + panic(config.Serve()) +} + +// vim: foldmethod=marker diff --git a/vendor/github.com/paultag/sniff/server.go b/vendor/github.com/paultag/sniff/server.go new file mode 100644 index 000000000..a4a01b9c6 --- /dev/null +++ b/vendor/github.com/paultag/sniff/server.go @@ -0,0 +1,167 @@ +/* {{{ Copyright 2017 Paul Tagliamonte + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. }}} */ + +package main + +import ( + "fmt" + "io" + "log" + "net" + "regexp" + + "pault.ag/go/sniff/parser" +) + +type ServerAndRegexp struct { + Server *Server + Regexp *regexp.Regexp +} + +type Proxy struct { + ServerList []ServerAndRegexp + Default *Server +} + +func (c *Proxy) Get(host string) *Server { + for _, tuple := range c.ServerList { + if tuple.Regexp.MatchString(host) { + return tuple.Server + } + } + return c.Default +} + +func (c *Config) CreateProxy() (Proxy, error) { + var ret Proxy + for i, server := range c.Servers { + for _, hostname := range server.Names { + var host_regexp *regexp.Regexp + var err error + if server.Regexp { + host_regexp, err = regexp.Compile(hostname) + } else { + host_regexp, err = regexp.Compile("^" + regexp.QuoteMeta(hostname) + "$") + } + if err != nil { + return Proxy{}, err + } + tuple := ServerAndRegexp{&c.Servers[i], host_regexp} + ret.ServerList = append(ret.ServerList, tuple) + } + } + for i, server := range c.Servers { + if server.Default { + ret.Default = &c.Servers[i] + break + } + } + return ret, nil +} + +func (c *Config) Serve() error { + listener, err := net.Listen("tcp", fmt.Sprintf( + "%s:%d", c.Bind.Host, c.Bind.Port, + )) + if err != nil { + return err + } + + server, err := c.CreateProxy() + if err != nil { + return err + } + + for { + conn, err := listener.Accept() + if err != nil { + return err + } + go server.Handle(conn) + } +} + +func (s *Proxy) Handle(conn net.Conn) { + data := make([]byte, 4096) + + length, err := conn.Read(data) + if err != nil { + log.Printf("Error: %s", err) + } + + var proxy *Server + hostname, hostname_err := parser.GetHostname(data[:]) + if hostname_err == nil { + log.Printf("Parsed hostname: %s\n", hostname) + + proxy = s.Get(hostname) + if proxy == nil { + log.Printf("No proxy matched %s", hostname) + conn.Close() + return + } + } else { + log.Printf("Parsed request without hostname") + + proxy = s.Default + if proxy == nil { + log.Printf("No default proxy") + conn.Close() + return + } + } + + clientConn, err := net.Dial("tcp", fmt.Sprintf( + "%s:%d", proxy.Host, proxy.Port, + )) + if err != nil { + log.Printf("Error: %s", err) + conn.Close() + return + } + n, err := clientConn.Write(data[:length]) + log.Printf("Wrote %d bytes\n", n) + if err != nil { + log.Printf("Error: %s", err) + conn.Close() + clientConn.Close() + } + Copycat(clientConn, conn) +} + +func Copycat(client, server net.Conn) { + defer client.Close() + defer server.Close() + + log.Printf("Entering copy routine\n") + + doCopy := func(s, c net.Conn, cancel chan<- bool) { + io.Copy(s, c) + cancel <- true + } + + cancel := make(chan bool, 2) + + go doCopy(server, client, cancel) + go doCopy(client, server, cancel) + + select { + case <-cancel: + log.Printf("Disconnect\n") + return + } + +} + +// vim: foldmethod=marker diff --git a/vendor/github.com/paultag/sniff/sniff.json b/vendor/github.com/paultag/sniff/sniff.json new file mode 100644 index 000000000..4077b5636 --- /dev/null +++ b/vendor/github.com/paultag/sniff/sniff.json @@ -0,0 +1,18 @@ +{ + "bind": { + "host": "localhost", + "port": 8443 + }, + "servers": [ + { + "default": false, + "regexp": false, + "host": "97.107.130.79", + "names": [ + "pault.ag", + "www.pault.ag" + ], + "port": 443 + } + ] +} diff --git a/vendor/github.com/pborman/uuid/.travis.yml b/vendor/github.com/pborman/uuid/.travis.yml new file mode 100644 index 000000000..d8156a60b --- /dev/null +++ b/vendor/github.com/pborman/uuid/.travis.yml @@ -0,0 +1,9 @@ +language: go + +go: + - 1.4.3 + - 1.5.3 + - tip + +script: + - go test -v ./... diff --git a/vendor/github.com/pborman/uuid/CONTRIBUTING.md b/vendor/github.com/pborman/uuid/CONTRIBUTING.md new file mode 100644 index 000000000..04fdf09f1 --- /dev/null +++ b/vendor/github.com/pborman/uuid/CONTRIBUTING.md @@ -0,0 +1,10 @@ +# How to contribute + +We definitely welcome patches and contribution to this project! + +### Legal requirements + +In order to protect both you and ourselves, you will need to sign the +[Contributor License Agreement](https://cla.developers.google.com/clas). + +You may have already signed it for other Google projects. diff --git a/vendor/github.com/pborman/uuid/README.md b/vendor/github.com/pborman/uuid/README.md new file mode 100644 index 000000000..b0396b274 --- /dev/null +++ b/vendor/github.com/pborman/uuid/README.md @@ -0,0 +1,13 @@ +This project was automatically exported from code.google.com/p/go-uuid + +# uuid ![build status](https://travis-ci.org/pborman/uuid.svg?branch=master) +The uuid package generates and inspects UUIDs based on [RFC 4122](http://tools.ietf.org/html/rfc4122) and DCE 1.1: Authentication and Security Services. + +###### Install +`go get github.com/pborman/uuid` + +###### Documentation +[![GoDoc](https://godoc.org/github.com/pborman/uuid?status.svg)](http://godoc.org/github.com/pborman/uuid) + +Full `go doc` style documentation for the package can be viewed online without installing this package by using the GoDoc site here: +http://godoc.org/github.com/pborman/uuid diff --git a/vendor/github.com/pborman/uuid/dce.go b/vendor/github.com/pborman/uuid/dce.go old mode 100755 new mode 100644 diff --git a/vendor/github.com/pborman/uuid/doc.go b/vendor/github.com/pborman/uuid/doc.go old mode 100755 new mode 100644 diff --git a/vendor/github.com/pborman/uuid/hash.go b/vendor/github.com/pborman/uuid/hash.go index cdd4192fd..a0420c1ef 100644 --- a/vendor/github.com/pborman/uuid/hash.go +++ b/vendor/github.com/pborman/uuid/hash.go @@ -19,7 +19,7 @@ var ( NIL = Parse("00000000-0000-0000-0000-000000000000") ) -// NewHash returns a new UUID dervied from the hash of space concatenated with +// NewHash returns a new UUID derived from the hash of space concatenated with // data generated by h. The hash should be at least 16 byte in length. The // first 16 bytes of the hash are used to form the UUID. The version of the // UUID will be the lower 4 bits of version. NewHash is used to implement diff --git a/vendor/github.com/pborman/uuid/json.go b/vendor/github.com/pborman/uuid/json.go deleted file mode 100644 index 760580a50..000000000 --- a/vendor/github.com/pborman/uuid/json.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2014 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package uuid - -import "errors" - -func (u UUID) MarshalJSON() ([]byte, error) { - if len(u) == 0 { - return []byte(`""`), nil - } - return []byte(`"` + u.String() + `"`), nil -} - -func (u *UUID) UnmarshalJSON(data []byte) error { - if len(data) == 0 || string(data) == `""` { - return nil - } - if len(data) < 2 || data[0] != '"' || data[len(data)-1] != '"' { - return errors.New("invalid UUID format") - } - data = data[1 : len(data)-1] - uu := Parse(string(data)) - if uu == nil { - return errors.New("invalid UUID format") - } - *u = uu - return nil -} diff --git a/vendor/github.com/pborman/uuid/marshal.go b/vendor/github.com/pborman/uuid/marshal.go new file mode 100644 index 000000000..6621dd54b --- /dev/null +++ b/vendor/github.com/pborman/uuid/marshal.go @@ -0,0 +1,83 @@ +// Copyright 2016 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package uuid + +import ( + "errors" + "fmt" +) + +// MarshalText implements encoding.TextMarshaler. +func (u UUID) MarshalText() ([]byte, error) { + if len(u) != 16 { + return nil, nil + } + var js [36]byte + encodeHex(js[:], u) + return js[:], nil +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (u *UUID) UnmarshalText(data []byte) error { + if len(data) == 0 { + return nil + } + id := Parse(string(data)) + if id == nil { + return errors.New("invalid UUID") + } + *u = id + return nil +} + +// MarshalBinary implements encoding.BinaryMarshaler. +func (u UUID) MarshalBinary() ([]byte, error) { + return u[:], nil +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler. +func (u *UUID) UnmarshalBinary(data []byte) error { + if len(data) == 0 { + return nil + } + if len(data) != 16 { + return fmt.Errorf("invalid UUID (got %d bytes)", len(data)) + } + var id [16]byte + copy(id[:], data) + *u = id[:] + return nil +} + +// MarshalText implements encoding.TextMarshaler. +func (u Array) MarshalText() ([]byte, error) { + var js [36]byte + encodeHex(js[:], u[:]) + return js[:], nil +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (u *Array) UnmarshalText(data []byte) error { + id := Parse(string(data)) + if id == nil { + return errors.New("invalid UUID") + } + *u = id.Array() + return nil +} + +// MarshalBinary implements encoding.BinaryMarshaler. +func (u Array) MarshalBinary() ([]byte, error) { + return u[:], nil +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler. +func (u *Array) UnmarshalBinary(data []byte) error { + if len(data) != 16 { + return fmt.Errorf("invalid UUID (got %d bytes)", len(data)) + } + copy(u[:], data) + return nil +} diff --git a/vendor/github.com/pborman/uuid/marshal_test.go b/vendor/github.com/pborman/uuid/marshal_test.go new file mode 100644 index 000000000..4e85b6bab --- /dev/null +++ b/vendor/github.com/pborman/uuid/marshal_test.go @@ -0,0 +1,124 @@ +// Copyright 2014 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package uuid + +import ( + "bytes" + "encoding/json" + "reflect" + "testing" +) + +var testUUID = Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479") +var testArray = testUUID.Array() + +func TestJSON(t *testing.T) { + type S struct { + ID1 UUID + ID2 UUID + } + s1 := S{ID1: testUUID} + data, err := json.Marshal(&s1) + if err != nil { + t.Fatal(err) + } + var s2 S + if err := json.Unmarshal(data, &s2); err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(&s1, &s2) { + t.Errorf("got %#v, want %#v", s2, s1) + } +} + +func TestJSONArray(t *testing.T) { + type S struct { + ID1 Array + ID2 Array + } + s1 := S{ID1: testArray} + data, err := json.Marshal(&s1) + if err != nil { + t.Fatal(err) + } + var s2 S + if err := json.Unmarshal(data, &s2); err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(&s1, &s2) { + t.Errorf("got %#v, want %#v", s2, s1) + } +} + +func TestMarshal(t *testing.T) { + data, err := testUUID.MarshalBinary() + if err != nil { + t.Fatalf("MarhsalBinary returned unexpected error %v", err) + } + if !bytes.Equal(data, testUUID) { + t.Fatalf("MarhsalBinary returns %x, want %x", data, testUUID) + } + var u UUID + u.UnmarshalBinary(data) + if !Equal(data, u) { + t.Fatalf("UnmarhsalBinary returns %v, want %v", u, testUUID) + } +} + +func TestMarshalArray(t *testing.T) { + data, err := testArray.MarshalBinary() + if err != nil { + t.Fatalf("MarhsalBinary returned unexpected error %v", err) + } + if !bytes.Equal(data, testUUID) { + t.Fatalf("MarhsalBinary returns %x, want %x", data, testUUID) + } + var a Array + a.UnmarshalBinary(data) + if a != testArray { + t.Fatalf("UnmarhsalBinary returns %v, want %v", a, testArray) + } +} + +func TestMarshalTextArray(t *testing.T) { + data, err := testArray.MarshalText() + if err != nil { + t.Fatalf("MarhsalText returned unexpected error %v", err) + } + var a Array + a.UnmarshalText(data) + if a != testArray { + t.Fatalf("UnmarhsalText returns %v, want %v", a, testArray) + } +} + +func BenchmarkUUID_MarshalJSON(b *testing.B) { + x := &struct { + UUID UUID `json:"uuid"` + }{} + x.UUID = Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479") + if x.UUID == nil { + b.Fatal("invalid uuid") + } + for i := 0; i < b.N; i++ { + js, err := json.Marshal(x) + if err != nil { + b.Fatalf("marshal json: %#v (%v)", js, err) + } + } +} + +func BenchmarkUUID_UnmarshalJSON(b *testing.B) { + js := []byte(`{"uuid":"f47ac10b-58cc-0372-8567-0e02b2c3d479"}`) + var x *struct { + UUID UUID `json:"uuid"` + } + for i := 0; i < b.N; i++ { + err := json.Unmarshal(js, &x) + if err != nil { + b.Fatalf("marshal json: %#v (%v)", js, err) + } + } +} diff --git a/vendor/github.com/pborman/uuid/node.go b/vendor/github.com/pborman/uuid/node.go old mode 100755 new mode 100644 index dd0a8ac18..42d60da8f --- a/vendor/github.com/pborman/uuid/node.go +++ b/vendor/github.com/pborman/uuid/node.go @@ -4,9 +4,13 @@ package uuid -import "net" +import ( + "net" + "sync" +) var ( + nodeMu sync.Mutex interfaces []net.Interface // cached list of interfaces ifname string // name of interface being used nodeID []byte // hardware for version 1 UUIDs @@ -16,6 +20,8 @@ var ( // derived. The interface "user" is returned if the NodeID was set by // SetNodeID. func NodeInterface() string { + defer nodeMu.Unlock() + nodeMu.Lock() return ifname } @@ -26,6 +32,12 @@ func NodeInterface() string { // // SetNodeInterface never fails when name is "". func SetNodeInterface(name string) bool { + defer nodeMu.Unlock() + nodeMu.Lock() + return setNodeInterface(name) +} + +func setNodeInterface(name string) bool { if interfaces == nil { var err error interfaces, err = net.Interfaces() @@ -59,8 +71,10 @@ func SetNodeInterface(name string) bool { // NodeID returns a slice of a copy of the current Node ID, setting the Node ID // if not already set. func NodeID() []byte { + defer nodeMu.Unlock() + nodeMu.Lock() if nodeID == nil { - SetNodeInterface("") + setNodeInterface("") } nid := make([]byte, 6) copy(nid, nodeID) @@ -71,6 +85,8 @@ func NodeID() []byte { // of id are used. If id is less than 6 bytes then false is returned and the // Node ID is not set. func SetNodeID(id []byte) bool { + defer nodeMu.Unlock() + nodeMu.Lock() if setNodeID(id) { ifname = "user" return true diff --git a/vendor/github.com/pborman/uuid/seq_test.go b/vendor/github.com/pborman/uuid/seq_test.go new file mode 100644 index 000000000..3b3d1430d --- /dev/null +++ b/vendor/github.com/pborman/uuid/seq_test.go @@ -0,0 +1,66 @@ +// Copyright 2014 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package uuid + +import ( + "flag" + "runtime" + "testing" + "time" +) + +// This test is only run when --regressions is passed on the go test line. +var regressions = flag.Bool("regressions", false, "run uuid regression tests") + +// TestClockSeqRace tests for a particular race condition of returning two +// identical Version1 UUIDs. The duration of 1 minute was chosen as the race +// condition, before being fixed, nearly always occured in under 30 seconds. +func TestClockSeqRace(t *testing.T) { + if !*regressions { + t.Skip("skipping regression tests") + } + duration := time.Minute + + done := make(chan struct{}) + defer close(done) + + ch := make(chan UUID, 10000) + ncpu := runtime.NumCPU() + switch ncpu { + case 0, 1: + // We can't run the test effectively. + t.Skip("skipping race test, only one CPU detected") + return + default: + runtime.GOMAXPROCS(ncpu) + } + for i := 0; i < ncpu; i++ { + go func() { + for { + select { + case <-done: + return + case ch <- NewUUID(): + } + } + }() + } + + uuids := make(map[string]bool) + cnt := 0 + start := time.Now() + for u := range ch { + s := u.String() + if uuids[s] { + t.Errorf("duplicate uuid after %d in %v: %s", cnt, time.Since(start), s) + return + } + uuids[s] = true + if time.Since(start) > duration { + return + } + cnt++ + } +} diff --git a/vendor/github.com/pborman/uuid/sql.go b/vendor/github.com/pborman/uuid/sql.go new file mode 100644 index 000000000..d015bfd13 --- /dev/null +++ b/vendor/github.com/pborman/uuid/sql.go @@ -0,0 +1,66 @@ +// Copyright 2015 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package uuid + +import ( + "database/sql/driver" + "errors" + "fmt" +) + +// Scan implements sql.Scanner so UUIDs can be read from databases transparently +// Currently, database types that map to string and []byte are supported. Please +// consult database-specific driver documentation for matching types. +func (uuid *UUID) Scan(src interface{}) error { + switch src.(type) { + case string: + // if an empty UUID comes from a table, we return a null UUID + if src.(string) == "" { + return nil + } + + // see uuid.Parse for required string format + parsed := Parse(src.(string)) + + if parsed == nil { + return errors.New("Scan: invalid UUID format") + } + + *uuid = parsed + case []byte: + b := src.([]byte) + + // if an empty UUID comes from a table, we return a null UUID + if len(b) == 0 { + return nil + } + + // assumes a simple slice of bytes if 16 bytes + // otherwise attempts to parse + if len(b) == 16 { + *uuid = UUID(b) + } else { + u := Parse(string(b)) + + if u == nil { + return errors.New("Scan: invalid UUID format") + } + + *uuid = u + } + + default: + return fmt.Errorf("Scan: unable to scan type %T into UUID", src) + } + + return nil +} + +// Value implements sql.Valuer so that UUIDs can be written to databases +// transparently. Currently, UUIDs map to strings. Please consult +// database-specific driver documentation for matching types. +func (uuid UUID) Value() (driver.Value, error) { + return uuid.String(), nil +} diff --git a/vendor/github.com/pborman/uuid/sql_test.go b/vendor/github.com/pborman/uuid/sql_test.go new file mode 100644 index 000000000..103095156 --- /dev/null +++ b/vendor/github.com/pborman/uuid/sql_test.go @@ -0,0 +1,96 @@ +// Copyright 2015 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package uuid + +import ( + "strings" + "testing" +) + +func TestScan(t *testing.T) { + var stringTest string = "f47ac10b-58cc-0372-8567-0e02b2c3d479" + var byteTest []byte = Parse(stringTest) + var badTypeTest int = 6 + var invalidTest string = "f47ac10b-58cc-0372-8567-0e02b2c3d4" + + // sunny day tests + + var uuid UUID + err := (&uuid).Scan(stringTest) + if err != nil { + t.Fatal(err) + } + + err = (&uuid).Scan([]byte(stringTest)) + if err != nil { + t.Fatal(err) + } + + err = (&uuid).Scan(byteTest) + if err != nil { + t.Fatal(err) + } + + // bad type tests + + err = (&uuid).Scan(badTypeTest) + if err == nil { + t.Error("int correctly parsed and shouldn't have") + } + if !strings.Contains(err.Error(), "unable to scan type") { + t.Error("attempting to parse an int returned an incorrect error message") + } + + // invalid/incomplete uuids + + err = (&uuid).Scan(invalidTest) + if err == nil { + t.Error("invalid uuid was parsed without error") + } + if !strings.Contains(err.Error(), "invalid UUID") { + t.Error("attempting to parse an invalid UUID returned an incorrect error message") + } + + err = (&uuid).Scan(byteTest[:len(byteTest)-2]) + if err == nil { + t.Error("invalid byte uuid was parsed without error") + } + if !strings.Contains(err.Error(), "invalid UUID") { + t.Error("attempting to parse an invalid byte UUID returned an incorrect error message") + } + + // empty tests + + uuid = nil + var emptySlice []byte + err = (&uuid).Scan(emptySlice) + if err != nil { + t.Fatal(err) + } + + if uuid != nil { + t.Error("UUID was not nil after scanning empty byte slice") + } + + uuid = nil + var emptyString string + err = (&uuid).Scan(emptyString) + if err != nil { + t.Fatal(err) + } + + if uuid != nil { + t.Error("UUID was not nil after scanning empty string") + } +} + +func TestValue(t *testing.T) { + stringTest := "f47ac10b-58cc-0372-8567-0e02b2c3d479" + uuid := Parse(stringTest) + val, _ := uuid.Value() + if val != stringTest { + t.Error("Value() did not return expected string") + } +} diff --git a/vendor/github.com/pborman/uuid/time.go b/vendor/github.com/pborman/uuid/time.go old mode 100755 new mode 100644 index 7ebc9bef1..eedf24219 --- a/vendor/github.com/pborman/uuid/time.go +++ b/vendor/github.com/pborman/uuid/time.go @@ -23,7 +23,7 @@ const ( ) var ( - mu sync.Mutex + timeMu sync.Mutex lasttime uint64 // last time we returned clock_seq uint16 // clock sequence for this run @@ -43,8 +43,8 @@ func (t Time) UnixTime() (sec, nsec int64) { // clock sequence as well as adjusting the clock sequence as needed. An error // is returned if the current time cannot be determined. func GetTime() (Time, uint16, error) { - defer mu.Unlock() - mu.Lock() + defer timeMu.Unlock() + timeMu.Lock() return getTime() } @@ -75,8 +75,8 @@ func getTime() (Time, uint16, error) { // ClockSequence, GetTime, or NewUUID. (section 4.2.1.1) sequence is generated // for func ClockSequence() int { - defer mu.Unlock() - mu.Lock() + defer timeMu.Unlock() + timeMu.Lock() return clockSequence() } @@ -90,8 +90,8 @@ func clockSequence() int { // SetClockSeq sets the clock sequence to the lower 14 bits of seq. Setting to // -1 causes a new sequence to be generated. func SetClockSequence(seq int) { - defer mu.Unlock() - mu.Lock() + defer timeMu.Unlock() + timeMu.Lock() setClockSequence(seq) } diff --git a/vendor/github.com/pborman/uuid/util.go b/vendor/github.com/pborman/uuid/util.go index de40b102c..fc8e052c7 100644 --- a/vendor/github.com/pborman/uuid/util.go +++ b/vendor/github.com/pborman/uuid/util.go @@ -16,7 +16,7 @@ func randomBits(b []byte) { } // xvalues returns the value of a byte as a hexadecimal digit or 255. -var xvalues = []byte{ +var xvalues = [256]byte{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, diff --git a/vendor/github.com/pborman/uuid/uuid.go b/vendor/github.com/pborman/uuid/uuid.go old mode 100755 new mode 100644 index 2920fae63..7c643cf0a --- a/vendor/github.com/pborman/uuid/uuid.go +++ b/vendor/github.com/pborman/uuid/uuid.go @@ -7,11 +7,26 @@ package uuid import ( "bytes" "crypto/rand" + "encoding/hex" "fmt" "io" "strings" ) +// Array is a pass-by-value UUID that can be used as an effecient key in a map. +type Array [16]byte + +// UUID converts uuid into a slice. +func (uuid Array) UUID() UUID { + return uuid[:] +} + +// String returns the string representation of uuid, +// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. +func (uuid Array) String() string { + return uuid.UUID().String() +} + // A UUID is a 128 bit (16 byte) Universal Unique IDentifier as defined in RFC // 4122. type UUID []byte @@ -54,8 +69,8 @@ func Parse(s string) UUID { if s[8] != '-' || s[13] != '-' || s[18] != '-' || s[23] != '-' { return nil } - uuid := make([]byte, 16) - for i, x := range []int{ + var uuid [16]byte + for i, x := range [16]int{ 0, 2, 4, 6, 9, 11, 14, 16, @@ -67,7 +82,7 @@ func Parse(s string) UUID { uuid[i] = v } } - return uuid + return uuid[:] } // Equal returns true if uuid1 and uuid2 are equal. @@ -75,26 +90,50 @@ func Equal(uuid1, uuid2 UUID) bool { return bytes.Equal(uuid1, uuid2) } +// Array returns an array representation of uuid that can be used as a map key. +// Array panics if uuid is not valid. +func (uuid UUID) Array() Array { + if len(uuid) != 16 { + panic("invalid uuid") + } + var a Array + copy(a[:], uuid) + return a +} + // String returns the string form of uuid, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx // , or "" if uuid is invalid. func (uuid UUID) String() string { - if uuid == nil || len(uuid) != 16 { + if len(uuid) != 16 { return "" } - b := []byte(uuid) - return fmt.Sprintf("%08x-%04x-%04x-%04x-%012x", - b[:4], b[4:6], b[6:8], b[8:10], b[10:]) + var buf [36]byte + encodeHex(buf[:], uuid) + return string(buf[:]) } // URN returns the RFC 2141 URN form of uuid, // urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, or "" if uuid is invalid. func (uuid UUID) URN() string { - if uuid == nil || len(uuid) != 16 { + if len(uuid) != 16 { return "" } - b := []byte(uuid) - return fmt.Sprintf("urn:uuid:%08x-%04x-%04x-%04x-%012x", - b[:4], b[4:6], b[6:8], b[8:10], b[10:]) + var buf [36 + 9]byte + copy(buf[:], "urn:uuid:") + encodeHex(buf[9:], uuid) + return string(buf[:]) +} + +func encodeHex(dst []byte, uuid UUID) { + hex.Encode(dst[:], uuid[:4]) + dst[8] = '-' + hex.Encode(dst[9:13], uuid[4:6]) + dst[13] = '-' + hex.Encode(dst[14:18], uuid[6:8]) + dst[18] = '-' + hex.Encode(dst[19:23], uuid[8:10]) + dst[23] = '-' + hex.Encode(dst[24:], uuid[10:]) } // Variant returns the variant encoded in uuid. It returns Invalid if @@ -113,10 +152,9 @@ func (uuid UUID) Variant() Variant { default: return Reserved } - panic("unreachable") } -// Version returns the verison of uuid. It returns false if uuid is not +// Version returns the version of uuid. It returns false if uuid is not // valid. func (uuid UUID) Version() (Version, bool) { if len(uuid) != 16 { @@ -148,7 +186,7 @@ func (v Variant) String() string { return fmt.Sprintf("BadVariant%d", int(v)) } -// SetRand sets the random number generator to r, which implents io.Reader. +// SetRand sets the random number generator to r, which implements io.Reader. // If r.Read returns an error when the package requests random data then // a panic will be issued. // diff --git a/vendor/github.com/pborman/uuid/uuid_test.go b/vendor/github.com/pborman/uuid/uuid_test.go new file mode 100644 index 000000000..038723966 --- /dev/null +++ b/vendor/github.com/pborman/uuid/uuid_test.go @@ -0,0 +1,543 @@ +// Copyright 2011 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package uuid + +import ( + "bytes" + "fmt" + "os" + "strings" + "testing" + "time" +) + +type test struct { + in string + version Version + variant Variant + isuuid bool +} + +var tests = []test{ + {"f47ac10b-58cc-0372-8567-0e02b2c3d479", 0, RFC4122, true}, + {"f47ac10b-58cc-1372-8567-0e02b2c3d479", 1, RFC4122, true}, + {"f47ac10b-58cc-2372-8567-0e02b2c3d479", 2, RFC4122, true}, + {"f47ac10b-58cc-3372-8567-0e02b2c3d479", 3, RFC4122, true}, + {"f47ac10b-58cc-4372-8567-0e02b2c3d479", 4, RFC4122, true}, + {"f47ac10b-58cc-5372-8567-0e02b2c3d479", 5, RFC4122, true}, + {"f47ac10b-58cc-6372-8567-0e02b2c3d479", 6, RFC4122, true}, + {"f47ac10b-58cc-7372-8567-0e02b2c3d479", 7, RFC4122, true}, + {"f47ac10b-58cc-8372-8567-0e02b2c3d479", 8, RFC4122, true}, + {"f47ac10b-58cc-9372-8567-0e02b2c3d479", 9, RFC4122, true}, + {"f47ac10b-58cc-a372-8567-0e02b2c3d479", 10, RFC4122, true}, + {"f47ac10b-58cc-b372-8567-0e02b2c3d479", 11, RFC4122, true}, + {"f47ac10b-58cc-c372-8567-0e02b2c3d479", 12, RFC4122, true}, + {"f47ac10b-58cc-d372-8567-0e02b2c3d479", 13, RFC4122, true}, + {"f47ac10b-58cc-e372-8567-0e02b2c3d479", 14, RFC4122, true}, + {"f47ac10b-58cc-f372-8567-0e02b2c3d479", 15, RFC4122, true}, + + {"urn:uuid:f47ac10b-58cc-4372-0567-0e02b2c3d479", 4, Reserved, true}, + {"URN:UUID:f47ac10b-58cc-4372-0567-0e02b2c3d479", 4, Reserved, true}, + {"f47ac10b-58cc-4372-0567-0e02b2c3d479", 4, Reserved, true}, + {"f47ac10b-58cc-4372-1567-0e02b2c3d479", 4, Reserved, true}, + {"f47ac10b-58cc-4372-2567-0e02b2c3d479", 4, Reserved, true}, + {"f47ac10b-58cc-4372-3567-0e02b2c3d479", 4, Reserved, true}, + {"f47ac10b-58cc-4372-4567-0e02b2c3d479", 4, Reserved, true}, + {"f47ac10b-58cc-4372-5567-0e02b2c3d479", 4, Reserved, true}, + {"f47ac10b-58cc-4372-6567-0e02b2c3d479", 4, Reserved, true}, + {"f47ac10b-58cc-4372-7567-0e02b2c3d479", 4, Reserved, true}, + {"f47ac10b-58cc-4372-8567-0e02b2c3d479", 4, RFC4122, true}, + {"f47ac10b-58cc-4372-9567-0e02b2c3d479", 4, RFC4122, true}, + {"f47ac10b-58cc-4372-a567-0e02b2c3d479", 4, RFC4122, true}, + {"f47ac10b-58cc-4372-b567-0e02b2c3d479", 4, RFC4122, true}, + {"f47ac10b-58cc-4372-c567-0e02b2c3d479", 4, Microsoft, true}, + {"f47ac10b-58cc-4372-d567-0e02b2c3d479", 4, Microsoft, true}, + {"f47ac10b-58cc-4372-e567-0e02b2c3d479", 4, Future, true}, + {"f47ac10b-58cc-4372-f567-0e02b2c3d479", 4, Future, true}, + + {"f47ac10b158cc-5372-a567-0e02b2c3d479", 0, Invalid, false}, + {"f47ac10b-58cc25372-a567-0e02b2c3d479", 0, Invalid, false}, + {"f47ac10b-58cc-53723a567-0e02b2c3d479", 0, Invalid, false}, + {"f47ac10b-58cc-5372-a56740e02b2c3d479", 0, Invalid, false}, + {"f47ac10b-58cc-5372-a567-0e02-2c3d479", 0, Invalid, false}, + {"g47ac10b-58cc-4372-a567-0e02b2c3d479", 0, Invalid, false}, +} + +var constants = []struct { + c interface{} + name string +}{ + {Person, "Person"}, + {Group, "Group"}, + {Org, "Org"}, + {Invalid, "Invalid"}, + {RFC4122, "RFC4122"}, + {Reserved, "Reserved"}, + {Microsoft, "Microsoft"}, + {Future, "Future"}, + {Domain(17), "Domain17"}, + {Variant(42), "BadVariant42"}, +} + +func testTest(t *testing.T, in string, tt test) { + uuid := Parse(in) + if ok := (uuid != nil); ok != tt.isuuid { + t.Errorf("Parse(%s) got %v expected %v\b", in, ok, tt.isuuid) + } + if uuid == nil { + return + } + + if v := uuid.Variant(); v != tt.variant { + t.Errorf("Variant(%s) got %d expected %d\b", in, v, tt.variant) + } + if v, _ := uuid.Version(); v != tt.version { + t.Errorf("Version(%s) got %d expected %d\b", in, v, tt.version) + } +} + +func TestUUID(t *testing.T) { + for _, tt := range tests { + testTest(t, tt.in, tt) + testTest(t, strings.ToUpper(tt.in), tt) + } +} + +func TestConstants(t *testing.T) { + for x, tt := range constants { + v, ok := tt.c.(fmt.Stringer) + if !ok { + t.Errorf("%x: %v: not a stringer", x, v) + } else if s := v.String(); s != tt.name { + v, _ := tt.c.(int) + t.Errorf("%x: Constant %T:%d gives %q, expected %q", x, tt.c, v, s, tt.name) + } + } +} + +func TestRandomUUID(t *testing.T) { + m := make(map[string]bool) + for x := 1; x < 32; x++ { + uuid := NewRandom() + s := uuid.String() + if m[s] { + t.Errorf("NewRandom returned duplicated UUID %s", s) + } + m[s] = true + if v, _ := uuid.Version(); v != 4 { + t.Errorf("Random UUID of version %s", v) + } + if uuid.Variant() != RFC4122 { + t.Errorf("Random UUID is variant %d", uuid.Variant()) + } + } +} + +func TestNew(t *testing.T) { + m := make(map[string]bool) + for x := 1; x < 32; x++ { + s := New() + if m[s] { + t.Errorf("New returned duplicated UUID %s", s) + } + m[s] = true + uuid := Parse(s) + if uuid == nil { + t.Errorf("New returned %q which does not decode", s) + continue + } + if v, _ := uuid.Version(); v != 4 { + t.Errorf("Random UUID of version %s", v) + } + if uuid.Variant() != RFC4122 { + t.Errorf("Random UUID is variant %d", uuid.Variant()) + } + } +} + +func clockSeq(t *testing.T, uuid UUID) int { + seq, ok := uuid.ClockSequence() + if !ok { + t.Fatalf("%s: invalid clock sequence", uuid) + } + return seq +} + +func TestClockSeq(t *testing.T) { + // Fake time.Now for this test to return a monotonically advancing time; restore it at end. + defer func(orig func() time.Time) { timeNow = orig }(timeNow) + monTime := time.Now() + timeNow = func() time.Time { + monTime = monTime.Add(1 * time.Second) + return monTime + } + + SetClockSequence(-1) + uuid1 := NewUUID() + uuid2 := NewUUID() + + if clockSeq(t, uuid1) != clockSeq(t, uuid2) { + t.Errorf("clock sequence %d != %d", clockSeq(t, uuid1), clockSeq(t, uuid2)) + } + + SetClockSequence(-1) + uuid2 = NewUUID() + + // Just on the very off chance we generated the same sequence + // two times we try again. + if clockSeq(t, uuid1) == clockSeq(t, uuid2) { + SetClockSequence(-1) + uuid2 = NewUUID() + } + if clockSeq(t, uuid1) == clockSeq(t, uuid2) { + t.Errorf("Duplicate clock sequence %d", clockSeq(t, uuid1)) + } + + SetClockSequence(0x1234) + uuid1 = NewUUID() + if seq := clockSeq(t, uuid1); seq != 0x1234 { + t.Errorf("%s: expected seq 0x1234 got 0x%04x", uuid1, seq) + } +} + +func TestCoding(t *testing.T) { + text := "7d444840-9dc0-11d1-b245-5ffdce74fad2" + urn := "urn:uuid:7d444840-9dc0-11d1-b245-5ffdce74fad2" + data := UUID{ + 0x7d, 0x44, 0x48, 0x40, + 0x9d, 0xc0, + 0x11, 0xd1, + 0xb2, 0x45, + 0x5f, 0xfd, 0xce, 0x74, 0xfa, 0xd2, + } + if v := data.String(); v != text { + t.Errorf("%x: encoded to %s, expected %s", data, v, text) + } + if v := data.URN(); v != urn { + t.Errorf("%x: urn is %s, expected %s", data, v, urn) + } + + uuid := Parse(text) + if !Equal(uuid, data) { + t.Errorf("%s: decoded to %s, expected %s", text, uuid, data) + } +} + +func TestVersion1(t *testing.T) { + uuid1 := NewUUID() + uuid2 := NewUUID() + + if Equal(uuid1, uuid2) { + t.Errorf("%s:duplicate uuid", uuid1) + } + if v, _ := uuid1.Version(); v != 1 { + t.Errorf("%s: version %s expected 1", uuid1, v) + } + if v, _ := uuid2.Version(); v != 1 { + t.Errorf("%s: version %s expected 1", uuid2, v) + } + n1 := uuid1.NodeID() + n2 := uuid2.NodeID() + if !bytes.Equal(n1, n2) { + t.Errorf("Different nodes %x != %x", n1, n2) + } + t1, ok := uuid1.Time() + if !ok { + t.Errorf("%s: invalid time", uuid1) + } + t2, ok := uuid2.Time() + if !ok { + t.Errorf("%s: invalid time", uuid2) + } + q1, ok := uuid1.ClockSequence() + if !ok { + t.Errorf("%s: invalid clock sequence", uuid1) + } + q2, ok := uuid2.ClockSequence() + if !ok { + t.Errorf("%s: invalid clock sequence", uuid2) + } + + switch { + case t1 == t2 && q1 == q2: + t.Error("time stopped") + case t1 > t2 && q1 == q2: + t.Error("time reversed") + case t1 < t2 && q1 != q2: + t.Error("clock sequence chaned unexpectedly") + } +} + +func TestNode(t *testing.T) { + // This test is mostly to make sure we don't leave nodeMu locked. + ifname = "" + if ni := NodeInterface(); ni != "" { + t.Errorf("NodeInterface got %q, want %q", ni, "") + } + if SetNodeInterface("xyzzy") { + t.Error("SetNodeInterface succeeded on a bad interface name") + } + if !SetNodeInterface("") { + t.Error("SetNodeInterface failed") + } + if ni := NodeInterface(); ni == "" { + t.Error("NodeInterface returned an empty string") + } + + ni := NodeID() + if len(ni) != 6 { + t.Errorf("ni got %d bytes, want 6", len(ni)) + } + hasData := false + for _, b := range ni { + if b != 0 { + hasData = true + } + } + if !hasData { + t.Error("nodeid is all zeros") + } + + id := []byte{1, 2, 3, 4, 5, 6, 7, 8} + SetNodeID(id) + ni = NodeID() + if !bytes.Equal(ni, id[:6]) { + t.Errorf("got nodeid %v, want %v", ni, id[:6]) + } + + if ni := NodeInterface(); ni != "user" { + t.Errorf("got inteface %q, want %q", ni, "user") + } +} + +func TestNodeAndTime(t *testing.T) { + // Time is February 5, 1998 12:30:23.136364800 AM GMT + + uuid := Parse("7d444840-9dc0-11d1-b245-5ffdce74fad2") + node := []byte{0x5f, 0xfd, 0xce, 0x74, 0xfa, 0xd2} + + ts, ok := uuid.Time() + if ok { + c := time.Unix(ts.UnixTime()) + want := time.Date(1998, 2, 5, 0, 30, 23, 136364800, time.UTC) + if !c.Equal(want) { + t.Errorf("Got time %v, want %v", c, want) + } + } else { + t.Errorf("%s: bad time", uuid) + } + if !bytes.Equal(node, uuid.NodeID()) { + t.Errorf("Expected node %v got %v", node, uuid.NodeID()) + } +} + +func TestMD5(t *testing.T) { + uuid := NewMD5(NameSpace_DNS, []byte("python.org")).String() + want := "6fa459ea-ee8a-3ca4-894e-db77e160355e" + if uuid != want { + t.Errorf("MD5: got %q expected %q", uuid, want) + } +} + +func TestSHA1(t *testing.T) { + uuid := NewSHA1(NameSpace_DNS, []byte("python.org")).String() + want := "886313e1-3b8a-5372-9b90-0c9aee199e5d" + if uuid != want { + t.Errorf("SHA1: got %q expected %q", uuid, want) + } +} + +func TestNodeID(t *testing.T) { + nid := []byte{1, 2, 3, 4, 5, 6} + SetNodeInterface("") + s := NodeInterface() + if s == "" || s == "user" { + t.Errorf("NodeInterface %q after SetInteface", s) + } + node1 := NodeID() + if node1 == nil { + t.Error("NodeID nil after SetNodeInterface", s) + } + SetNodeID(nid) + s = NodeInterface() + if s != "user" { + t.Errorf("Expected NodeInterface %q got %q", "user", s) + } + node2 := NodeID() + if node2 == nil { + t.Error("NodeID nil after SetNodeID", s) + } + if bytes.Equal(node1, node2) { + t.Error("NodeID not changed after SetNodeID", s) + } else if !bytes.Equal(nid, node2) { + t.Errorf("NodeID is %x, expected %x", node2, nid) + } +} + +func testDCE(t *testing.T, name string, uuid UUID, domain Domain, id uint32) { + if uuid == nil { + t.Errorf("%s failed", name) + return + } + if v, _ := uuid.Version(); v != 2 { + t.Errorf("%s: %s: expected version 2, got %s", name, uuid, v) + return + } + if v, ok := uuid.Domain(); !ok || v != domain { + if !ok { + t.Errorf("%s: %d: Domain failed", name, uuid) + } else { + t.Errorf("%s: %s: expected domain %d, got %d", name, uuid, domain, v) + } + } + if v, ok := uuid.Id(); !ok || v != id { + if !ok { + t.Errorf("%s: %d: Id failed", name, uuid) + } else { + t.Errorf("%s: %s: expected id %d, got %d", name, uuid, id, v) + } + } +} + +func TestDCE(t *testing.T) { + testDCE(t, "NewDCESecurity", NewDCESecurity(42, 12345678), 42, 12345678) + testDCE(t, "NewDCEPerson", NewDCEPerson(), Person, uint32(os.Getuid())) + testDCE(t, "NewDCEGroup", NewDCEGroup(), Group, uint32(os.Getgid())) +} + +type badRand struct{} + +func (r badRand) Read(buf []byte) (int, error) { + for i, _ := range buf { + buf[i] = byte(i) + } + return len(buf), nil +} + +func TestBadRand(t *testing.T) { + SetRand(badRand{}) + uuid1 := New() + uuid2 := New() + if uuid1 != uuid2 { + t.Errorf("expected duplicates, got %q and %q", uuid1, uuid2) + } + SetRand(nil) + uuid1 = New() + uuid2 = New() + if uuid1 == uuid2 { + t.Errorf("unexpected duplicates, got %q", uuid1) + } +} + +func TestUUID_Array(t *testing.T) { + expect := Array{ + 0xf4, 0x7a, 0xc1, 0x0b, + 0x58, 0xcc, + 0x03, 0x72, + 0x85, 0x67, + 0x0e, 0x02, 0xb2, 0xc3, 0xd4, 0x79, + } + uuid := Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479") + if uuid == nil { + t.Fatal("invalid uuid") + } + if uuid.Array() != expect { + t.Fatal("invalid array") + } +} + +func TestArray_UUID(t *testing.T) { + array := Array{ + 0xf4, 0x7a, 0xc1, 0x0b, + 0x58, 0xcc, + 0x03, 0x72, + 0x85, 0x67, + 0x0e, 0x02, 0xb2, 0xc3, 0xd4, 0x79, + } + expect := Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479") + if expect == nil { + t.Fatal("invalid uuid") + } + if !bytes.Equal(array.UUID(), expect) { + t.Fatal("invalid uuid") + } +} + +func BenchmarkParse(b *testing.B) { + for i := 0; i < b.N; i++ { + uuid := Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479") + if uuid == nil { + b.Fatal("invalid uuid") + } + } +} + +func BenchmarkNew(b *testing.B) { + for i := 0; i < b.N; i++ { + New() + } +} + +func BenchmarkUUID_String(b *testing.B) { + uuid := Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479") + if uuid == nil { + b.Fatal("invalid uuid") + } + for i := 0; i < b.N; i++ { + if uuid.String() == "" { + b.Fatal("invalid uuid") + } + } +} + +func BenchmarkUUID_URN(b *testing.B) { + uuid := Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479") + if uuid == nil { + b.Fatal("invalid uuid") + } + for i := 0; i < b.N; i++ { + if uuid.URN() == "" { + b.Fatal("invalid uuid") + } + } +} + +func BenchmarkUUID_Array(b *testing.B) { + expect := Array{ + 0xf4, 0x7a, 0xc1, 0x0b, + 0x58, 0xcc, + 0x03, 0x72, + 0x85, 0x67, + 0x0e, 0x02, 0xb2, 0xc3, 0xd4, 0x79, + } + uuid := Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479") + if uuid == nil { + b.Fatal("invalid uuid") + } + for i := 0; i < b.N; i++ { + if uuid.Array() != expect { + b.Fatal("invalid array") + } + } +} + +func BenchmarkArray_UUID(b *testing.B) { + array := Array{ + 0xf4, 0x7a, 0xc1, 0x0b, + 0x58, 0xcc, + 0x03, 0x72, + 0x85, 0x67, + 0x0e, 0x02, 0xb2, 0xc3, 0xd4, 0x79, + } + expect := Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479") + if expect == nil { + b.Fatal("invalid uuid") + } + for i := 0; i < b.N; i++ { + if !bytes.Equal(array.UUID(), expect) { + b.Fatal("invalid uuid") + } + } +} diff --git a/vendor/github.com/petar/GoLLRB/.gitignore b/vendor/github.com/petar/GoLLRB/.gitignore new file mode 100644 index 000000000..e333b2dbf --- /dev/null +++ b/vendor/github.com/petar/GoLLRB/.gitignore @@ -0,0 +1,23 @@ +syntax:glob +*.[568ao] +*.ao +*.so +*.pyc +*.swp +*.swo +._* +.nfs.* +[568a].out +*~ +*.orig +*.pb.go +core +_obj +_test +src/pkg/Make.deps +_testmain.go + +syntax:regexp +^pkg/ +^src/cmd/(.*)/6?\1$ +^.*/core.[0-9]*$ diff --git a/vendor/github.com/petar/GoLLRB/AUTHORS b/vendor/github.com/petar/GoLLRB/AUTHORS new file mode 100644 index 000000000..78d1de495 --- /dev/null +++ b/vendor/github.com/petar/GoLLRB/AUTHORS @@ -0,0 +1,4 @@ +Petar Maymounkov +Vadim Vygonets +Ian Smith +Martin Bruse diff --git a/vendor/github.com/petar/GoLLRB/LICENSE b/vendor/github.com/petar/GoLLRB/LICENSE new file mode 100644 index 000000000..b75312c78 --- /dev/null +++ b/vendor/github.com/petar/GoLLRB/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2010, Petar Maymounkov +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 Petar Maymounkov 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 HOLDER 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/vendor/github.com/petar/GoLLRB/README.md b/vendor/github.com/petar/GoLLRB/README.md new file mode 100644 index 000000000..742ca0bd5 --- /dev/null +++ b/vendor/github.com/petar/GoLLRB/README.md @@ -0,0 +1,66 @@ +# GoLLRB + +GoLLRB is a Left-Leaning Red-Black (LLRB) implementation of 2-3 balanced binary +search trees in Go Language. + +## Overview + +As of this writing and to the best of the author's knowledge, +Go still does not have a balanced binary search tree (BBST) data structure. +These data structures are quite useful in a variety of cases. A BBST maintains +elements in sorted order under dynamic updates (inserts and deletes) and can +support various order-specific queries. Furthermore, in practice one often +implements other common data structures like Priority Queues, using BBST's. + +2-3 trees (a type of BBST's), as well as the runtime-similar 2-3-4 trees, are +the de facto standard BBST algoritms found in implementations of Python, Java, +and other libraries. The LLRB method of implementing 2-3 trees is a recent +improvement over the traditional implementation. The LLRB approach was +discovered relatively recently (in 2008) by Robert Sedgewick of Princeton +University. + +GoLLRB is a Go implementation of LLRB 2-3 trees. + +## Maturity + +GoLLRB has been used in some pretty heavy-weight machine learning tasks over many gigabytes of data. +I consider it to be in stable, perhaps even production, shape. There are no known bugs. + +## Installation + +With a healthy Go Language installed, simply run `go get github.com/petar/GoLLRB/llrb` + +## Example + + package main + + import ( + "fmt" + "github.com/petar/GoLLRB/llrb" + ) + + func lessInt(a, b interface{}) bool { return a.(int) < b.(int) } + + func main() { + tree := llrb.New(lessInt) + tree.ReplaceOrInsert(1) + tree.ReplaceOrInsert(2) + tree.ReplaceOrInsert(3) + tree.ReplaceOrInsert(4) + tree.DeleteMin() + tree.Delete(4) + c := tree.IterAscend() + for { + u := <-c + if u == nil { + break + } + fmt.Printf("%d\n", int(u.(int))) + } + } + +## About + +GoLLRB was written by [Petar Maymounkov](http://pdos.csail.mit.edu/~petar/). + +Follow me on [Twitter @maymounkov](http://www.twitter.com/maymounkov)! diff --git a/vendor/github.com/petar/GoLLRB/llrb/avgvar.go b/vendor/github.com/petar/GoLLRB/llrb/avgvar.go new file mode 100644 index 000000000..2d7e2a326 --- /dev/null +++ b/vendor/github.com/petar/GoLLRB/llrb/avgvar.go @@ -0,0 +1,39 @@ +// Copyright 2010 Petar Maymounkov. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package llrb + +import "math" + +// avgVar maintains the average and variance of a stream of numbers +// in a space-efficient manner. +type avgVar struct { + count int64 + sum, sumsq float64 +} + +func (av *avgVar) Init() { + av.count = 0 + av.sum = 0.0 + av.sumsq = 0.0 +} + +func (av *avgVar) Add(sample float64) { + av.count++ + av.sum += sample + av.sumsq += sample * sample +} + +func (av *avgVar) GetCount() int64 { return av.count } + +func (av *avgVar) GetAvg() float64 { return av.sum / float64(av.count) } + +func (av *avgVar) GetTotal() float64 { return av.sum } + +func (av *avgVar) GetVar() float64 { + a := av.GetAvg() + return av.sumsq/float64(av.count) - a*a +} + +func (av *avgVar) GetStdDev() float64 { return math.Sqrt(av.GetVar()) } diff --git a/vendor/github.com/petar/GoLLRB/llrb/iterator.go b/vendor/github.com/petar/GoLLRB/llrb/iterator.go new file mode 100644 index 000000000..ee7b27f44 --- /dev/null +++ b/vendor/github.com/petar/GoLLRB/llrb/iterator.go @@ -0,0 +1,93 @@ +package llrb + +type ItemIterator func(i Item) bool + +//func (t *Tree) Ascend(iterator ItemIterator) { +// t.AscendGreaterOrEqual(Inf(-1), iterator) +//} + +func (t *LLRB) AscendRange(greaterOrEqual, lessThan Item, iterator ItemIterator) { + t.ascendRange(t.root, greaterOrEqual, lessThan, iterator) +} + +func (t *LLRB) ascendRange(h *Node, inf, sup Item, iterator ItemIterator) bool { + if h == nil { + return true + } + if !less(h.Item, sup) { + return t.ascendRange(h.Left, inf, sup, iterator) + } + if less(h.Item, inf) { + return t.ascendRange(h.Right, inf, sup, iterator) + } + + if !t.ascendRange(h.Left, inf, sup, iterator) { + return false + } + if !iterator(h.Item) { + return false + } + return t.ascendRange(h.Right, inf, sup, iterator) +} + +// AscendGreaterOrEqual will call iterator once for each element greater or equal to +// pivot in ascending order. It will stop whenever the iterator returns false. +func (t *LLRB) AscendGreaterOrEqual(pivot Item, iterator ItemIterator) { + t.ascendGreaterOrEqual(t.root, pivot, iterator) +} + +func (t *LLRB) ascendGreaterOrEqual(h *Node, pivot Item, iterator ItemIterator) bool { + if h == nil { + return true + } + if !less(h.Item, pivot) { + if !t.ascendGreaterOrEqual(h.Left, pivot, iterator) { + return false + } + if !iterator(h.Item) { + return false + } + } + return t.ascendGreaterOrEqual(h.Right, pivot, iterator) +} + +func (t *LLRB) AscendLessThan(pivot Item, iterator ItemIterator) { + t.ascendLessThan(t.root, pivot, iterator) +} + +func (t *LLRB) ascendLessThan(h *Node, pivot Item, iterator ItemIterator) bool { + if h == nil { + return true + } + if !t.ascendLessThan(h.Left, pivot, iterator) { + return false + } + if !iterator(h.Item) { + return false + } + if less(h.Item, pivot) { + return t.ascendLessThan(h.Left, pivot, iterator) + } + return true +} + +// DescendLessOrEqual will call iterator once for each element less than the +// pivot in descending order. It will stop whenever the iterator returns false. +func (t *LLRB) DescendLessOrEqual(pivot Item, iterator ItemIterator) { + t.descendLessOrEqual(t.root, pivot, iterator) +} + +func (t *LLRB) descendLessOrEqual(h *Node, pivot Item, iterator ItemIterator) bool { + if h == nil { + return true + } + if less(h.Item, pivot) || !less(pivot, h.Item) { + if !t.descendLessOrEqual(h.Right, pivot, iterator) { + return false + } + if !iterator(h.Item) { + return false + } + } + return t.descendLessOrEqual(h.Left, pivot, iterator) +} diff --git a/vendor/github.com/petar/GoLLRB/llrb/iterator_test.go b/vendor/github.com/petar/GoLLRB/llrb/iterator_test.go new file mode 100644 index 000000000..db5e12c92 --- /dev/null +++ b/vendor/github.com/petar/GoLLRB/llrb/iterator_test.go @@ -0,0 +1,76 @@ +package llrb + +import ( + "reflect" + "testing" +) + +func TestAscendGreaterOrEqual(t *testing.T) { + tree := New() + tree.InsertNoReplace(Int(4)) + tree.InsertNoReplace(Int(6)) + tree.InsertNoReplace(Int(1)) + tree.InsertNoReplace(Int(3)) + var ary []Item + tree.AscendGreaterOrEqual(Int(-1), func(i Item) bool { + ary = append(ary, i) + return true + }) + expected := []Item{Int(1), Int(3), Int(4), Int(6)} + if !reflect.DeepEqual(ary, expected) { + t.Errorf("expected %v but got %v", expected, ary) + } + ary = nil + tree.AscendGreaterOrEqual(Int(3), func(i Item) bool { + ary = append(ary, i) + return true + }) + expected = []Item{Int(3), Int(4), Int(6)} + if !reflect.DeepEqual(ary, expected) { + t.Errorf("expected %v but got %v", expected, ary) + } + ary = nil + tree.AscendGreaterOrEqual(Int(2), func(i Item) bool { + ary = append(ary, i) + return true + }) + expected = []Item{Int(3), Int(4), Int(6)} + if !reflect.DeepEqual(ary, expected) { + t.Errorf("expected %v but got %v", expected, ary) + } +} + +func TestDescendLessOrEqual(t *testing.T) { + tree := New() + tree.InsertNoReplace(Int(4)) + tree.InsertNoReplace(Int(6)) + tree.InsertNoReplace(Int(1)) + tree.InsertNoReplace(Int(3)) + var ary []Item + tree.DescendLessOrEqual(Int(10), func(i Item) bool { + ary = append(ary, i) + return true + }) + expected := []Item{Int(6), Int(4), Int(3), Int(1)} + if !reflect.DeepEqual(ary, expected) { + t.Errorf("expected %v but got %v", expected, ary) + } + ary = nil + tree.DescendLessOrEqual(Int(4), func(i Item) bool { + ary = append(ary, i) + return true + }) + expected = []Item{Int(4), Int(3), Int(1)} + if !reflect.DeepEqual(ary, expected) { + t.Errorf("expected %v but got %v", expected, ary) + } + ary = nil + tree.DescendLessOrEqual(Int(5), func(i Item) bool { + ary = append(ary, i) + return true + }) + expected = []Item{Int(4), Int(3), Int(1)} + if !reflect.DeepEqual(ary, expected) { + t.Errorf("expected %v but got %v", expected, ary) + } +} diff --git a/vendor/github.com/petar/GoLLRB/llrb/llrb-stats.go b/vendor/github.com/petar/GoLLRB/llrb/llrb-stats.go new file mode 100644 index 000000000..47126a3be --- /dev/null +++ b/vendor/github.com/petar/GoLLRB/llrb/llrb-stats.go @@ -0,0 +1,46 @@ +// Copyright 2010 Petar Maymounkov. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package llrb + +// GetHeight() returns an item in the tree with key @key, and it's height in the tree +func (t *LLRB) GetHeight(key Item) (result Item, depth int) { + return t.getHeight(t.root, key) +} + +func (t *LLRB) getHeight(h *Node, item Item) (Item, int) { + if h == nil { + return nil, 0 + } + if less(item, h.Item) { + result, depth := t.getHeight(h.Left, item) + return result, depth + 1 + } + if less(h.Item, item) { + result, depth := t.getHeight(h.Right, item) + return result, depth + 1 + } + return h.Item, 0 +} + +// HeightStats() returns the average and standard deviation of the height +// of elements in the tree +func (t *LLRB) HeightStats() (avg, stddev float64) { + av := &avgVar{} + heightStats(t.root, 0, av) + return av.GetAvg(), av.GetStdDev() +} + +func heightStats(h *Node, d int, av *avgVar) { + if h == nil { + return + } + av.Add(float64(d)) + if h.Left != nil { + heightStats(h.Left, d+1, av) + } + if h.Right != nil { + heightStats(h.Right, d+1, av) + } +} diff --git a/vendor/github.com/petar/GoLLRB/llrb/llrb.go b/vendor/github.com/petar/GoLLRB/llrb/llrb.go new file mode 100644 index 000000000..81373fbfd --- /dev/null +++ b/vendor/github.com/petar/GoLLRB/llrb/llrb.go @@ -0,0 +1,456 @@ +// Copyright 2010 Petar Maymounkov. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// A Left-Leaning Red-Black (LLRB) implementation of 2-3 balanced binary search trees, +// based on the following work: +// +// http://www.cs.princeton.edu/~rs/talks/LLRB/08Penn.pdf +// http://www.cs.princeton.edu/~rs/talks/LLRB/LLRB.pdf +// http://www.cs.princeton.edu/~rs/talks/LLRB/Java/RedBlackBST.java +// +// 2-3 trees (and the run-time equivalent 2-3-4 trees) are the de facto standard BST +// algoritms found in implementations of Python, Java, and other libraries. The LLRB +// implementation of 2-3 trees is a recent improvement on the traditional implementation, +// observed and documented by Robert Sedgewick. +// +package llrb + +// Tree is a Left-Leaning Red-Black (LLRB) implementation of 2-3 trees +type LLRB struct { + count int + root *Node +} + +type Node struct { + Item + Left, Right *Node // Pointers to left and right child nodes + Black bool // If set, the color of the link (incoming from the parent) is black + // In the LLRB, new nodes are always red, hence the zero-value for node +} + +type Item interface { + Less(than Item) bool +} + +// +func less(x, y Item) bool { + if x == pinf { + return false + } + if x == ninf { + return true + } + return x.Less(y) +} + +// Inf returns an Item that is "bigger than" any other item, if sign is positive. +// Otherwise it returns an Item that is "smaller than" any other item. +func Inf(sign int) Item { + if sign == 0 { + panic("sign") + } + if sign > 0 { + return pinf + } + return ninf +} + +var ( + ninf = nInf{} + pinf = pInf{} +) + +type nInf struct{} + +func (nInf) Less(Item) bool { + return true +} + +type pInf struct{} + +func (pInf) Less(Item) bool { + return false +} + +// New() allocates a new tree +func New() *LLRB { + return &LLRB{} +} + +// SetRoot sets the root node of the tree. +// It is intended to be used by functions that deserialize the tree. +func (t *LLRB) SetRoot(r *Node) { + t.root = r +} + +// Root returns the root node of the tree. +// It is intended to be used by functions that serialize the tree. +func (t *LLRB) Root() *Node { + return t.root +} + +// Len returns the number of nodes in the tree. +func (t *LLRB) Len() int { return t.count } + +// Has returns true if the tree contains an element whose order is the same as that of key. +func (t *LLRB) Has(key Item) bool { + return t.Get(key) != nil +} + +// Get retrieves an element from the tree whose order is the same as that of key. +func (t *LLRB) Get(key Item) Item { + h := t.root + for h != nil { + switch { + case less(key, h.Item): + h = h.Left + case less(h.Item, key): + h = h.Right + default: + return h.Item + } + } + return nil +} + +// Min returns the minimum element in the tree. +func (t *LLRB) Min() Item { + h := t.root + if h == nil { + return nil + } + for h.Left != nil { + h = h.Left + } + return h.Item +} + +// Max returns the maximum element in the tree. +func (t *LLRB) Max() Item { + h := t.root + if h == nil { + return nil + } + for h.Right != nil { + h = h.Right + } + return h.Item +} + +func (t *LLRB) ReplaceOrInsertBulk(items ...Item) { + for _, i := range items { + t.ReplaceOrInsert(i) + } +} + +func (t *LLRB) InsertNoReplaceBulk(items ...Item) { + for _, i := range items { + t.InsertNoReplace(i) + } +} + +// ReplaceOrInsert inserts item into the tree. If an existing +// element has the same order, it is removed from the tree and returned. +func (t *LLRB) ReplaceOrInsert(item Item) Item { + if item == nil { + panic("inserting nil item") + } + var replaced Item + t.root, replaced = t.replaceOrInsert(t.root, item) + t.root.Black = true + if replaced == nil { + t.count++ + } + return replaced +} + +func (t *LLRB) replaceOrInsert(h *Node, item Item) (*Node, Item) { + if h == nil { + return newNode(item), nil + } + + h = walkDownRot23(h) + + var replaced Item + if less(item, h.Item) { // BUG + h.Left, replaced = t.replaceOrInsert(h.Left, item) + } else if less(h.Item, item) { + h.Right, replaced = t.replaceOrInsert(h.Right, item) + } else { + replaced, h.Item = h.Item, item + } + + h = walkUpRot23(h) + + return h, replaced +} + +// InsertNoReplace inserts item into the tree. If an existing +// element has the same order, both elements remain in the tree. +func (t *LLRB) InsertNoReplace(item Item) { + if item == nil { + panic("inserting nil item") + } + t.root = t.insertNoReplace(t.root, item) + t.root.Black = true + t.count++ +} + +func (t *LLRB) insertNoReplace(h *Node, item Item) *Node { + if h == nil { + return newNode(item) + } + + h = walkDownRot23(h) + + if less(item, h.Item) { + h.Left = t.insertNoReplace(h.Left, item) + } else { + h.Right = t.insertNoReplace(h.Right, item) + } + + return walkUpRot23(h) +} + +// Rotation driver routines for 2-3 algorithm + +func walkDownRot23(h *Node) *Node { return h } + +func walkUpRot23(h *Node) *Node { + if isRed(h.Right) && !isRed(h.Left) { + h = rotateLeft(h) + } + + if isRed(h.Left) && isRed(h.Left.Left) { + h = rotateRight(h) + } + + if isRed(h.Left) && isRed(h.Right) { + flip(h) + } + + return h +} + +// Rotation driver routines for 2-3-4 algorithm + +func walkDownRot234(h *Node) *Node { + if isRed(h.Left) && isRed(h.Right) { + flip(h) + } + + return h +} + +func walkUpRot234(h *Node) *Node { + if isRed(h.Right) && !isRed(h.Left) { + h = rotateLeft(h) + } + + if isRed(h.Left) && isRed(h.Left.Left) { + h = rotateRight(h) + } + + return h +} + +// DeleteMin deletes the minimum element in the tree and returns the +// deleted item or nil otherwise. +func (t *LLRB) DeleteMin() Item { + var deleted Item + t.root, deleted = deleteMin(t.root) + if t.root != nil { + t.root.Black = true + } + if deleted != nil { + t.count-- + } + return deleted +} + +// deleteMin code for LLRB 2-3 trees +func deleteMin(h *Node) (*Node, Item) { + if h == nil { + return nil, nil + } + if h.Left == nil { + return nil, h.Item + } + + if !isRed(h.Left) && !isRed(h.Left.Left) { + h = moveRedLeft(h) + } + + var deleted Item + h.Left, deleted = deleteMin(h.Left) + + return fixUp(h), deleted +} + +// DeleteMax deletes the maximum element in the tree and returns +// the deleted item or nil otherwise +func (t *LLRB) DeleteMax() Item { + var deleted Item + t.root, deleted = deleteMax(t.root) + if t.root != nil { + t.root.Black = true + } + if deleted != nil { + t.count-- + } + return deleted +} + +func deleteMax(h *Node) (*Node, Item) { + if h == nil { + return nil, nil + } + if isRed(h.Left) { + h = rotateRight(h) + } + if h.Right == nil { + return nil, h.Item + } + if !isRed(h.Right) && !isRed(h.Right.Left) { + h = moveRedRight(h) + } + var deleted Item + h.Right, deleted = deleteMax(h.Right) + + return fixUp(h), deleted +} + +// Delete deletes an item from the tree whose key equals key. +// The deleted item is return, otherwise nil is returned. +func (t *LLRB) Delete(key Item) Item { + var deleted Item + t.root, deleted = t.delete(t.root, key) + if t.root != nil { + t.root.Black = true + } + if deleted != nil { + t.count-- + } + return deleted +} + +func (t *LLRB) delete(h *Node, item Item) (*Node, Item) { + var deleted Item + if h == nil { + return nil, nil + } + if less(item, h.Item) { + if h.Left == nil { // item not present. Nothing to delete + return h, nil + } + if !isRed(h.Left) && !isRed(h.Left.Left) { + h = moveRedLeft(h) + } + h.Left, deleted = t.delete(h.Left, item) + } else { + if isRed(h.Left) { + h = rotateRight(h) + } + // If @item equals @h.Item and no right children at @h + if !less(h.Item, item) && h.Right == nil { + return nil, h.Item + } + // PETAR: Added 'h.Right != nil' below + if h.Right != nil && !isRed(h.Right) && !isRed(h.Right.Left) { + h = moveRedRight(h) + } + // If @item equals @h.Item, and (from above) 'h.Right != nil' + if !less(h.Item, item) { + var subDeleted Item + h.Right, subDeleted = deleteMin(h.Right) + if subDeleted == nil { + panic("logic") + } + deleted, h.Item = h.Item, subDeleted + } else { // Else, @item is bigger than @h.Item + h.Right, deleted = t.delete(h.Right, item) + } + } + + return fixUp(h), deleted +} + +// Internal node manipulation routines + +func newNode(item Item) *Node { return &Node{Item: item} } + +func isRed(h *Node) bool { + if h == nil { + return false + } + return !h.Black +} + +func rotateLeft(h *Node) *Node { + x := h.Right + if x.Black { + panic("rotating a black link") + } + h.Right = x.Left + x.Left = h + x.Black = h.Black + h.Black = false + return x +} + +func rotateRight(h *Node) *Node { + x := h.Left + if x.Black { + panic("rotating a black link") + } + h.Left = x.Right + x.Right = h + x.Black = h.Black + h.Black = false + return x +} + +// REQUIRE: Left and Right children must be present +func flip(h *Node) { + h.Black = !h.Black + h.Left.Black = !h.Left.Black + h.Right.Black = !h.Right.Black +} + +// REQUIRE: Left and Right children must be present +func moveRedLeft(h *Node) *Node { + flip(h) + if isRed(h.Right.Left) { + h.Right = rotateRight(h.Right) + h = rotateLeft(h) + flip(h) + } + return h +} + +// REQUIRE: Left and Right children must be present +func moveRedRight(h *Node) *Node { + flip(h) + if isRed(h.Left.Left) { + h = rotateRight(h) + flip(h) + } + return h +} + +func fixUp(h *Node) *Node { + if isRed(h.Right) { + h = rotateLeft(h) + } + + if isRed(h.Left) && isRed(h.Left.Left) { + h = rotateRight(h) + } + + if isRed(h.Left) && isRed(h.Right) { + flip(h) + } + + return h +} diff --git a/vendor/github.com/petar/GoLLRB/llrb/llrb_test.go b/vendor/github.com/petar/GoLLRB/llrb/llrb_test.go new file mode 100644 index 000000000..b7bc97800 --- /dev/null +++ b/vendor/github.com/petar/GoLLRB/llrb/llrb_test.go @@ -0,0 +1,239 @@ +// Copyright 2010 Petar Maymounkov. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package llrb + +import ( + "math" + "math/rand" + "testing" +) + +func TestCases(t *testing.T) { + tree := New() + tree.ReplaceOrInsert(Int(1)) + tree.ReplaceOrInsert(Int(1)) + if tree.Len() != 1 { + t.Errorf("expecting len 1") + } + if !tree.Has(Int(1)) { + t.Errorf("expecting to find key=1") + } + + tree.Delete(Int(1)) + if tree.Len() != 0 { + t.Errorf("expecting len 0") + } + if tree.Has(Int(1)) { + t.Errorf("not expecting to find key=1") + } + + tree.Delete(Int(1)) + if tree.Len() != 0 { + t.Errorf("expecting len 0") + } + if tree.Has(Int(1)) { + t.Errorf("not expecting to find key=1") + } +} + +func TestReverseInsertOrder(t *testing.T) { + tree := New() + n := 100 + for i := 0; i < n; i++ { + tree.ReplaceOrInsert(Int(n - i)) + } + i := 0 + tree.AscendGreaterOrEqual(Int(0), func(item Item) bool { + i++ + if item.(Int) != Int(i) { + t.Errorf("bad order: got %d, expect %d", item.(Int), i) + } + return true + }) +} + +func TestRange(t *testing.T) { + tree := New() + order := []String{ + "ab", "aba", "abc", "a", "aa", "aaa", "b", "a-", "a!", + } + for _, i := range order { + tree.ReplaceOrInsert(i) + } + k := 0 + tree.AscendRange(String("ab"), String("ac"), func(item Item) bool { + if k > 3 { + t.Fatalf("returned more items than expected") + } + i1 := order[k] + i2 := item.(String) + if i1 != i2 { + t.Errorf("expecting %s, got %s", i1, i2) + } + k++ + return true + }) +} + +func TestRandomInsertOrder(t *testing.T) { + tree := New() + n := 1000 + perm := rand.Perm(n) + for i := 0; i < n; i++ { + tree.ReplaceOrInsert(Int(perm[i])) + } + j := 0 + tree.AscendGreaterOrEqual(Int(0), func(item Item) bool { + if item.(Int) != Int(j) { + t.Fatalf("bad order") + } + j++ + return true + }) +} + +func TestRandomReplace(t *testing.T) { + tree := New() + n := 100 + perm := rand.Perm(n) + for i := 0; i < n; i++ { + tree.ReplaceOrInsert(Int(perm[i])) + } + perm = rand.Perm(n) + for i := 0; i < n; i++ { + if replaced := tree.ReplaceOrInsert(Int(perm[i])); replaced == nil || replaced.(Int) != Int(perm[i]) { + t.Errorf("error replacing") + } + } +} + +func TestRandomInsertSequentialDelete(t *testing.T) { + tree := New() + n := 1000 + perm := rand.Perm(n) + for i := 0; i < n; i++ { + tree.ReplaceOrInsert(Int(perm[i])) + } + for i := 0; i < n; i++ { + tree.Delete(Int(i)) + } +} + +func TestRandomInsertDeleteNonExistent(t *testing.T) { + tree := New() + n := 100 + perm := rand.Perm(n) + for i := 0; i < n; i++ { + tree.ReplaceOrInsert(Int(perm[i])) + } + if tree.Delete(Int(200)) != nil { + t.Errorf("deleted non-existent item") + } + if tree.Delete(Int(-2)) != nil { + t.Errorf("deleted non-existent item") + } + for i := 0; i < n; i++ { + if u := tree.Delete(Int(i)); u == nil || u.(Int) != Int(i) { + t.Errorf("delete failed") + } + } + if tree.Delete(Int(200)) != nil { + t.Errorf("deleted non-existent item") + } + if tree.Delete(Int(-2)) != nil { + t.Errorf("deleted non-existent item") + } +} + +func TestRandomInsertPartialDeleteOrder(t *testing.T) { + tree := New() + n := 100 + perm := rand.Perm(n) + for i := 0; i < n; i++ { + tree.ReplaceOrInsert(Int(perm[i])) + } + for i := 1; i < n-1; i++ { + tree.Delete(Int(i)) + } + j := 0 + tree.AscendGreaterOrEqual(Int(0), func(item Item) bool { + switch j { + case 0: + if item.(Int) != Int(0) { + t.Errorf("expecting 0") + } + case 1: + if item.(Int) != Int(n-1) { + t.Errorf("expecting %d", n-1) + } + } + j++ + return true + }) +} + +func TestRandomInsertStats(t *testing.T) { + tree := New() + n := 100000 + perm := rand.Perm(n) + for i := 0; i < n; i++ { + tree.ReplaceOrInsert(Int(perm[i])) + } + avg, _ := tree.HeightStats() + expAvg := math.Log2(float64(n)) - 1.5 + if math.Abs(avg-expAvg) >= 2.0 { + t.Errorf("too much deviation from expected average height") + } +} + +func BenchmarkInsert(b *testing.B) { + tree := New() + for i := 0; i < b.N; i++ { + tree.ReplaceOrInsert(Int(b.N - i)) + } +} + +func BenchmarkDelete(b *testing.B) { + b.StopTimer() + tree := New() + for i := 0; i < b.N; i++ { + tree.ReplaceOrInsert(Int(b.N - i)) + } + b.StartTimer() + for i := 0; i < b.N; i++ { + tree.Delete(Int(i)) + } +} + +func BenchmarkDeleteMin(b *testing.B) { + b.StopTimer() + tree := New() + for i := 0; i < b.N; i++ { + tree.ReplaceOrInsert(Int(b.N - i)) + } + b.StartTimer() + for i := 0; i < b.N; i++ { + tree.DeleteMin() + } +} + +func TestInsertNoReplace(t *testing.T) { + tree := New() + n := 1000 + for q := 0; q < 2; q++ { + perm := rand.Perm(n) + for i := 0; i < n; i++ { + tree.InsertNoReplace(Int(perm[i])) + } + } + j := 0 + tree.AscendGreaterOrEqual(Int(0), func(item Item) bool { + if item.(Int) != Int(j/2) { + t.Fatalf("bad order") + } + j++ + return true + }) +} diff --git a/vendor/github.com/petar/GoLLRB/llrb/util.go b/vendor/github.com/petar/GoLLRB/llrb/util.go new file mode 100644 index 000000000..63dbdb2df --- /dev/null +++ b/vendor/github.com/petar/GoLLRB/llrb/util.go @@ -0,0 +1,17 @@ +// Copyright 2010 Petar Maymounkov. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package llrb + +type Int int + +func (x Int) Less(than Item) bool { + return x < than.(Int) +} + +type String string + +func (x String) Less(than Item) bool { + return x < than.(String) +} diff --git a/vendor/github.com/peterbourgon/diskv/basic_test.go b/vendor/github.com/peterbourgon/diskv/basic_test.go new file mode 100644 index 000000000..0ef0b17fe --- /dev/null +++ b/vendor/github.com/peterbourgon/diskv/basic_test.go @@ -0,0 +1,336 @@ +package diskv + +import ( + "bytes" + "errors" + "testing" + "time" +) + +func cmpBytes(a, b []byte) bool { + if len(a) != len(b) { + return false + } + for i := 0; i < len(a); i++ { + if a[i] != b[i] { + return false + } + } + return true +} + +func (d *Diskv) isCached(key string) bool { + d.mu.RLock() + defer d.mu.RUnlock() + _, ok := d.cache[key] + return ok +} + +func TestWriteReadErase(t *testing.T) { + d := New(Options{ + BasePath: "test-data", + CacheSizeMax: 1024, + }) + defer d.EraseAll() + k, v := "a", []byte{'b'} + if err := d.Write(k, v); err != nil { + t.Fatalf("write: %s", err) + } + if readVal, err := d.Read(k); err != nil { + t.Fatalf("read: %s", err) + } else if bytes.Compare(v, readVal) != 0 { + t.Fatalf("read: expected %s, got %s", v, readVal) + } + if err := d.Erase(k); err != nil { + t.Fatalf("erase: %s", err) + } +} + +func TestWRECache(t *testing.T) { + d := New(Options{ + BasePath: "test-data", + CacheSizeMax: 1024, + }) + defer d.EraseAll() + k, v := "xxx", []byte{' ', ' ', ' '} + if d.isCached(k) { + t.Fatalf("key cached before Write and Read") + } + if err := d.Write(k, v); err != nil { + t.Fatalf("write: %s", err) + } + if d.isCached(k) { + t.Fatalf("key cached before Read") + } + if readVal, err := d.Read(k); err != nil { + t.Fatalf("read: %s", err) + } else if bytes.Compare(v, readVal) != 0 { + t.Fatalf("read: expected %s, got %s", v, readVal) + } + for i := 0; i < 10 && !d.isCached(k); i++ { + time.Sleep(10 * time.Millisecond) + } + if !d.isCached(k) { + t.Fatalf("key not cached after Read") + } + if err := d.Erase(k); err != nil { + t.Fatalf("erase: %s", err) + } + if d.isCached(k) { + t.Fatalf("key cached after Erase") + } +} + +func TestStrings(t *testing.T) { + d := New(Options{ + BasePath: "test-data", + CacheSizeMax: 1024, + }) + defer d.EraseAll() + + keys := map[string]bool{"a": false, "b": false, "c": false, "d": false} + v := []byte{'1'} + for k := range keys { + if err := d.Write(k, v); err != nil { + t.Fatalf("write: %s: %s", k, err) + } + } + + for k := range d.Keys(nil) { + if _, present := keys[k]; present { + t.Logf("got: %s", k) + keys[k] = true + } else { + t.Fatalf("strings() returns unknown key: %s", k) + } + } + + for k, found := range keys { + if !found { + t.Errorf("never got %s", k) + } + } +} + +func TestZeroByteCache(t *testing.T) { + d := New(Options{ + BasePath: "test-data", + CacheSizeMax: 0, + }) + defer d.EraseAll() + + k, v := "a", []byte{'1', '2', '3'} + if err := d.Write(k, v); err != nil { + t.Fatalf("Write: %s", err) + } + + if d.isCached(k) { + t.Fatalf("key cached, expected not-cached") + } + + if _, err := d.Read(k); err != nil { + t.Fatalf("Read: %s", err) + } + + if d.isCached(k) { + t.Fatalf("key cached, expected not-cached") + } +} + +func TestOneByteCache(t *testing.T) { + d := New(Options{ + BasePath: "test-data", + CacheSizeMax: 1, + }) + defer d.EraseAll() + + k1, k2, v1, v2 := "a", "b", []byte{'1'}, []byte{'1', '2'} + if err := d.Write(k1, v1); err != nil { + t.Fatal(err) + } + + if v, err := d.Read(k1); err != nil { + t.Fatal(err) + } else if !cmpBytes(v, v1) { + t.Fatalf("Read: expected %s, got %s", string(v1), string(v)) + } + + for i := 0; i < 10 && !d.isCached(k1); i++ { + time.Sleep(10 * time.Millisecond) + } + if !d.isCached(k1) { + t.Fatalf("expected 1-byte value to be cached, but it wasn't") + } + + if err := d.Write(k2, v2); err != nil { + t.Fatal(err) + } + if _, err := d.Read(k2); err != nil { + t.Fatalf("--> %s", err) + } + + for i := 0; i < 10 && (!d.isCached(k1) || d.isCached(k2)); i++ { + time.Sleep(10 * time.Millisecond) // just wait for lazy-cache + } + if !d.isCached(k1) { + t.Fatalf("1-byte value was uncached for no reason") + } + + if d.isCached(k2) { + t.Fatalf("2-byte value was cached, but cache max size is 1") + } +} + +func TestStaleCache(t *testing.T) { + d := New(Options{ + BasePath: "test-data", + CacheSizeMax: 1, + }) + defer d.EraseAll() + + k, first, second := "a", "first", "second" + if err := d.Write(k, []byte(first)); err != nil { + t.Fatal(err) + } + + v, err := d.Read(k) + if err != nil { + t.Fatal(err) + } + if string(v) != first { + t.Errorf("expected '%s', got '%s'", first, v) + } + + if err := d.Write(k, []byte(second)); err != nil { + t.Fatal(err) + } + + v, err = d.Read(k) + if err != nil { + t.Fatal(err) + } + + if string(v) != second { + t.Errorf("expected '%s', got '%s'", second, v) + } +} + +func TestHas(t *testing.T) { + d := New(Options{ + BasePath: "test-data", + CacheSizeMax: 1024, + }) + defer d.EraseAll() + + for k, v := range map[string]string{ + "a": "1", + "foo": "2", + "012345": "3", + } { + d.Write(k, []byte(v)) + } + + d.Read("foo") // cache one of them + if !d.isCached("foo") { + t.Errorf("'foo' didn't get cached") + } + + for _, tuple := range []struct { + key string + expected bool + }{ + {"a", true}, + {"b", false}, + {"foo", true}, + {"bar", false}, + {"01234", false}, + {"012345", true}, + {"0123456", false}, + } { + if expected, got := tuple.expected, d.Has(tuple.key); expected != got { + t.Errorf("Has(%s): expected %v, got %v", tuple.key, expected, got) + } + } +} + +type BrokenReader struct{} + +func (BrokenReader) Read(p []byte) (n int, err error) { + return 0, errors.New("failed to read") +} + +func TestRemovesIncompleteFiles(t *testing.T) { + opts := Options{ + BasePath: "test-data", + CacheSizeMax: 1024, + } + d := New(opts) + defer d.EraseAll() + + key, stream, sync := "key", BrokenReader{}, false + + if err := d.WriteStream(key, stream, sync); err == nil { + t.Fatalf("Expected i/o copy error, none received.") + } + + if _, err := d.Read(key); err == nil { + t.Fatal("Could read the key, but it shouldn't exist") + } +} + +func TestTempDir(t *testing.T) { + opts := Options{ + BasePath: "test-data", + TempDir: "test-data-temp", + CacheSizeMax: 1024, + } + d := New(opts) + defer d.EraseAll() + + k, v := "a", []byte{'b'} + if err := d.Write(k, v); err != nil { + t.Fatalf("write: %s", err) + } + if readVal, err := d.Read(k); err != nil { + t.Fatalf("read: %s", err) + } else if bytes.Compare(v, readVal) != 0 { + t.Fatalf("read: expected %s, got %s", v, readVal) + } + if err := d.Erase(k); err != nil { + t.Fatalf("erase: %s", err) + } +} + +type CrashingReader struct{} + +func (CrashingReader) Read(p []byte) (n int, err error) { + panic("System has crashed while reading the stream") +} + +func TestAtomicWrite(t *testing.T) { + opts := Options{ + BasePath: "test-data", + // Test would fail if TempDir is not set here. + TempDir: "test-data-temp", + CacheSizeMax: 1024, + } + d := New(opts) + defer d.EraseAll() + + key := "key" + func() { + defer func() { + recover() // Ignore panicking error + }() + + stream := CrashingReader{} + d.WriteStream(key, stream, false) + }() + + if d.Has(key) { + t.Fatal("Has key, but it shouldn't exist") + } + if _, ok := <-d.Keys(nil); ok { + t.Fatal("Store isn't empty") + } +} diff --git a/vendor/github.com/peterbourgon/diskv/compression_test.go b/vendor/github.com/peterbourgon/diskv/compression_test.go new file mode 100644 index 000000000..2d6142037 --- /dev/null +++ b/vendor/github.com/peterbourgon/diskv/compression_test.go @@ -0,0 +1,72 @@ +package diskv + +import ( + "compress/flate" + "fmt" + "math/rand" + "os" + "testing" + "time" +) + +func init() { + rand.Seed(time.Now().UnixNano()) +} + +func testCompressionWith(t *testing.T, c Compression, name string) { + d := New(Options{ + BasePath: "compression-test", + CacheSizeMax: 0, + Compression: c, + }) + defer d.EraseAll() + + sz := 4096 + val := make([]byte, sz) + for i := 0; i < sz; i++ { + val[i] = byte('a' + rand.Intn(26)) // {a-z}; should compress some + } + + key := "a" + if err := d.Write(key, val); err != nil { + t.Fatalf("write failed: %s", err) + } + + targetFile := fmt.Sprintf("%s%c%s", d.BasePath, os.PathSeparator, key) + fi, err := os.Stat(targetFile) + if err != nil { + t.Fatalf("%s: %s", targetFile, err) + } + + if fi.Size() >= int64(sz) { + t.Fatalf("%s: size=%d, expected smaller", targetFile, fi.Size()) + } + t.Logf("%s compressed %d to %d", name, sz, fi.Size()) + + readVal, err := d.Read(key) + if len(readVal) != sz { + t.Fatalf("read: expected size=%d, got size=%d", sz, len(readVal)) + } + + for i := 0; i < sz; i++ { + if readVal[i] != val[i] { + t.Fatalf("i=%d: expected %v, got %v", i, val[i], readVal[i]) + } + } +} + +func TestGzipDefault(t *testing.T) { + testCompressionWith(t, NewGzipCompression(), "gzip") +} + +func TestGzipBestCompression(t *testing.T) { + testCompressionWith(t, NewGzipCompressionLevel(flate.BestCompression), "gzip-max") +} + +func TestGzipBestSpeed(t *testing.T) { + testCompressionWith(t, NewGzipCompressionLevel(flate.BestSpeed), "gzip-min") +} + +func TestZlib(t *testing.T) { + testCompressionWith(t, NewZlibCompression(), "zlib") +} diff --git a/vendor/github.com/peterbourgon/diskv/import_test.go b/vendor/github.com/peterbourgon/diskv/import_test.go new file mode 100644 index 000000000..a08ac7c70 --- /dev/null +++ b/vendor/github.com/peterbourgon/diskv/import_test.go @@ -0,0 +1,76 @@ +package diskv_test + +import ( + "bytes" + "io/ioutil" + "os" + + "github.com/peterbourgon/diskv" + + "testing" +) + +func TestImportMove(t *testing.T) { + b := []byte(`0123456789`) + f, err := ioutil.TempFile("", "temp-test") + if err != nil { + t.Fatal(err) + } + if _, err := f.Write(b); err != nil { + t.Fatal(err) + } + f.Close() + + d := diskv.New(diskv.Options{ + BasePath: "test-import-move", + }) + defer d.EraseAll() + + key := "key" + + if err := d.Write(key, []byte(`TBD`)); err != nil { + t.Fatal(err) + } + + if err := d.Import(f.Name(), key, true); err != nil { + t.Fatal(err) + } + + if _, err := os.Stat(f.Name()); err == nil || !os.IsNotExist(err) { + t.Errorf("expected temp file to be gone, but err = %v", err) + } + + if !d.Has(key) { + t.Errorf("%q not present", key) + } + + if buf, err := d.Read(key); err != nil || bytes.Compare(b, buf) != 0 { + t.Errorf("want %q, have %q (err = %v)", string(b), string(buf), err) + } +} + +func TestImportCopy(t *testing.T) { + b := []byte(`¡åéîòü!`) + + f, err := ioutil.TempFile("", "temp-test") + if err != nil { + t.Fatal(err) + } + if _, err := f.Write(b); err != nil { + t.Fatal(err) + } + f.Close() + + d := diskv.New(diskv.Options{ + BasePath: "test-import-copy", + }) + defer d.EraseAll() + + if err := d.Import(f.Name(), "key", false); err != nil { + t.Fatal(err) + } + + if _, err := os.Stat(f.Name()); err != nil { + t.Errorf("expected temp file to remain, but got err = %v", err) + } +} diff --git a/vendor/github.com/peterbourgon/diskv/index_test.go b/vendor/github.com/peterbourgon/diskv/index_test.go new file mode 100644 index 000000000..72f52a9ff --- /dev/null +++ b/vendor/github.com/peterbourgon/diskv/index_test.go @@ -0,0 +1,148 @@ +package diskv + +import ( + "bytes" + "reflect" + "testing" + "time" +) + +func strLess(a, b string) bool { return a < b } + +func cmpStrings(a, b []string) bool { + if len(a) != len(b) { + return false + } + for i := 0; i < len(a); i++ { + if a[i] != b[i] { + return false + } + } + return true +} + +func (d *Diskv) isIndexed(key string) bool { + if d.Index == nil { + return false + } + + for _, got := range d.Index.Keys("", 1000) { + if got == key { + return true + } + } + return false +} + +func TestIndexOrder(t *testing.T) { + d := New(Options{ + BasePath: "index-test", + Transform: func(string) []string { return []string{} }, + CacheSizeMax: 1024, + Index: &BTreeIndex{}, + IndexLess: strLess, + }) + defer d.EraseAll() + + v := []byte{'1', '2', '3'} + d.Write("a", v) + if !d.isIndexed("a") { + t.Fatalf("'a' not indexed after write") + } + d.Write("1", v) + d.Write("m", v) + d.Write("-", v) + d.Write("A", v) + + expectedKeys := []string{"-", "1", "A", "a", "m"} + keys := []string{} + for _, key := range d.Index.Keys("", 100) { + keys = append(keys, key) + } + + if !cmpStrings(keys, expectedKeys) { + t.Fatalf("got %s, expected %s", keys, expectedKeys) + } +} + +func TestIndexLoad(t *testing.T) { + d1 := New(Options{ + BasePath: "index-test", + Transform: func(string) []string { return []string{} }, + CacheSizeMax: 1024, + }) + defer d1.EraseAll() + + val := []byte{'1', '2', '3'} + keys := []string{"a", "b", "c", "d", "e", "f", "g"} + for _, key := range keys { + d1.Write(key, val) + } + + d2 := New(Options{ + BasePath: "index-test", + Transform: func(string) []string { return []string{} }, + CacheSizeMax: 1024, + Index: &BTreeIndex{}, + IndexLess: strLess, + }) + defer d2.EraseAll() + + // check d2 has properly loaded existing d1 data + for _, key := range keys { + if !d2.isIndexed(key) { + t.Fatalf("key '%s' not indexed on secondary", key) + } + } + + // cache one + if readValue, err := d2.Read(keys[0]); err != nil { + t.Fatalf("%s", err) + } else if bytes.Compare(val, readValue) != 0 { + t.Fatalf("%s: got %s, expected %s", keys[0], readValue, val) + } + + // make sure it got cached + for i := 0; i < 10 && !d2.isCached(keys[0]); i++ { + time.Sleep(10 * time.Millisecond) + } + if !d2.isCached(keys[0]) { + t.Fatalf("key '%s' not cached", keys[0]) + } + + // kill the disk + d1.EraseAll() + + // cached value should still be there in the second + if readValue, err := d2.Read(keys[0]); err != nil { + t.Fatalf("%s", err) + } else if bytes.Compare(val, readValue) != 0 { + t.Fatalf("%s: got %s, expected %s", keys[0], readValue, val) + } + + // but not in the original + if _, err := d1.Read(keys[0]); err == nil { + t.Fatalf("expected error reading from flushed store") + } +} + +func TestIndexKeysEmptyFrom(t *testing.T) { + d := New(Options{ + BasePath: "index-test", + Transform: func(string) []string { return []string{} }, + CacheSizeMax: 1024, + Index: &BTreeIndex{}, + IndexLess: strLess, + }) + defer d.EraseAll() + + for _, k := range []string{"a", "c", "z", "b", "x", "b", "y"} { + d.Write(k, []byte("1")) + } + + want := []string{"a", "b", "c", "x", "y", "z"} + have := d.Index.Keys("", 99) + if !reflect.DeepEqual(want, have) { + t.Errorf("want %v, have %v", want, have) + } +} diff --git a/vendor/github.com/peterbourgon/diskv/issues_test.go b/vendor/github.com/peterbourgon/diskv/issues_test.go new file mode 100644 index 000000000..0b0b10908 --- /dev/null +++ b/vendor/github.com/peterbourgon/diskv/issues_test.go @@ -0,0 +1,121 @@ +package diskv + +import ( + "bytes" + "io/ioutil" + "sync" + "testing" + "time" +) + +// ReadStream from cache shouldn't panic on a nil dereference from a nonexistent +// Compression :) +func TestIssue2A(t *testing.T) { + d := New(Options{ + BasePath: "test-issue-2a", + Transform: func(string) []string { return []string{} }, + CacheSizeMax: 1024, + }) + defer d.EraseAll() + + input := "abcdefghijklmnopqrstuvwxy" + key, writeBuf, sync := "a", bytes.NewBufferString(input), false + if err := d.WriteStream(key, writeBuf, sync); err != nil { + t.Fatal(err) + } + + for i := 0; i < 2; i++ { + began := time.Now() + rc, err := d.ReadStream(key, false) + if err != nil { + t.Fatal(err) + } + buf, err := ioutil.ReadAll(rc) + if err != nil { + t.Fatal(err) + } + if !cmpBytes(buf, []byte(input)) { + t.Fatalf("read #%d: '%s' != '%s'", i+1, string(buf), input) + } + rc.Close() + t.Logf("read #%d in %s", i+1, time.Since(began)) + } +} + +// ReadStream on a key that resolves to a directory should return an error. +func TestIssue2B(t *testing.T) { + blockTransform := func(s string) []string { + transformBlockSize := 3 + sliceSize := len(s) / transformBlockSize + pathSlice := make([]string, sliceSize) + for i := 0; i < sliceSize; i++ { + from, to := i*transformBlockSize, (i*transformBlockSize)+transformBlockSize + pathSlice[i] = s[from:to] + } + return pathSlice + } + + d := New(Options{ + BasePath: "test-issue-2b", + Transform: blockTransform, + CacheSizeMax: 0, + }) + defer d.EraseAll() + + v := []byte{'1', '2', '3'} + if err := d.Write("abcabc", v); err != nil { + t.Fatal(err) + } + + _, err := d.ReadStream("abc", false) + if err == nil { + t.Fatal("ReadStream('abc') should return error") + } + t.Logf("ReadStream('abc') returned error: %v", err) +} + +// Ensure ReadStream with direct=true isn't racy. +func TestIssue17(t *testing.T) { + var ( + basePath = "test-data" + ) + + dWrite := New(Options{ + BasePath: basePath, + CacheSizeMax: 0, + }) + defer dWrite.EraseAll() + + dRead := New(Options{ + BasePath: basePath, + CacheSizeMax: 50, + }) + + cases := map[string]string{ + "a": `1234567890`, + "b": `2345678901`, + "c": `3456789012`, + "d": `4567890123`, + "e": `5678901234`, + } + + for k, v := range cases { + if err := dWrite.Write(k, []byte(v)); err != nil { + t.Fatalf("during write: %s", err) + } + dRead.Read(k) // ensure it's added to cache + } + + var wg sync.WaitGroup + start := make(chan struct{}) + for k, v := range cases { + wg.Add(1) + go func(k, v string) { + <-start + dRead.ReadStream(k, true) + wg.Done() + }(k, v) + } + close(start) + wg.Wait() +} diff --git a/vendor/github.com/peterbourgon/diskv/keys_test.go b/vendor/github.com/peterbourgon/diskv/keys_test.go new file mode 100644 index 000000000..222e1c444 --- /dev/null +++ b/vendor/github.com/peterbourgon/diskv/keys_test.go @@ -0,0 +1,231 @@ +package diskv_test + +import ( + "reflect" + "runtime" + "strings" + "testing" + + "github.com/peterbourgon/diskv" +) + +var ( + keysTestData = map[string]string{ + "ab01cd01": "When we started building CoreOS", + "ab01cd02": "we looked at all the various components available to us", + "ab01cd03": "re-using the best tools", + "ef01gh04": "and building the ones that did not exist", + "ef02gh05": "We believe strongly in the Unix philosophy", + "xxxxxxxx": "tools should be independently useful", + } + + prefixes = []string{ + "", // all + "a", + "ab", + "ab0", + "ab01", + "ab01cd0", + "ab01cd01", + "ab01cd01x", // none + "b", // none + "b0", // none + "0", // none + "01", // none + "e", + "ef", + "efx", // none + "ef01gh0", + "ef01gh04", + "ef01gh05", + "ef01gh06", // none + } +) + +func TestKeysFlat(t *testing.T) { + transform := func(s string) []string { + if s == "" { + t.Fatalf(`transform should not be called with ""`) + } + return []string{} + } + d := diskv.New(diskv.Options{ + BasePath: "test-data", + Transform: transform, + }) + defer d.EraseAll() + + for k, v := range keysTestData { + d.Write(k, []byte(v)) + } + + checkKeys(t, d.Keys(nil), keysTestData) +} + +func TestKeysNested(t *testing.T) { + d := diskv.New(diskv.Options{ + BasePath: "test-data", + Transform: blockTransform(2), + }) + defer d.EraseAll() + + for k, v := range keysTestData { + d.Write(k, []byte(v)) + } + + checkKeys(t, d.Keys(nil), keysTestData) +} + +func TestKeysPrefixFlat(t *testing.T) { + d := diskv.New(diskv.Options{ + BasePath: "test-data", + }) + defer d.EraseAll() + + for k, v := range keysTestData { + d.Write(k, []byte(v)) + } + + for _, prefix := range prefixes { + checkKeys(t, d.KeysPrefix(prefix, nil), filterPrefix(keysTestData, prefix)) + } +} + +func TestKeysPrefixNested(t *testing.T) { + d := diskv.New(diskv.Options{ + BasePath: "test-data", + Transform: blockTransform(2), + }) + defer d.EraseAll() + + for k, v := range keysTestData { + d.Write(k, []byte(v)) + } + + for _, prefix := range prefixes { + checkKeys(t, d.KeysPrefix(prefix, nil), filterPrefix(keysTestData, prefix)) + } +} + +func TestKeysCancel(t *testing.T) { + d := diskv.New(diskv.Options{ + BasePath: "test-data", + }) + defer d.EraseAll() + + for k, v := range keysTestData { + d.Write(k, []byte(v)) + } + + var ( + cancel = make(chan struct{}) + received = 0 + cancelAfter = len(keysTestData) / 2 + ) + + for key := range d.Keys(cancel) { + received++ + + if received >= cancelAfter { + close(cancel) + runtime.Gosched() // allow walker to detect cancel + } + + t.Logf("received %d: %q", received, key) + } + + if want, have := cancelAfter, received; want != have { + t.Errorf("want %d, have %d") + } +} + +func checkKeys(t *testing.T, c <-chan string, want map[string]string) { + for k := range c { + if _, ok := want[k]; !ok { + t.Errorf("%q yielded but not expected", k) + continue + } + + delete(want, k) + t.Logf("%q yielded OK", k) + } + + if len(want) != 0 { + t.Errorf("%d expected key(s) not yielded: %s", len(want), strings.Join(flattenKeys(want), ", ")) + } +} + +func blockTransform(blockSize int) func(string) []string { + return func(s string) []string { + var ( + sliceSize = len(s) / blockSize + pathSlice = make([]string, sliceSize) + ) + for i := 0; i < sliceSize; i++ { + from, to := i*blockSize, (i*blockSize)+blockSize + pathSlice[i] = s[from:to] + } + return pathSlice + } +} + +func filterPrefix(in map[string]string, prefix string) map[string]string { + out := map[string]string{} + for k, v := range in { + if strings.HasPrefix(k, prefix) { + out[k] = v + } + } + return out +} + +func TestFilterPrefix(t *testing.T) { + input := map[string]string{ + "all": "", + "and": "", + "at": "", + "available": "", + "best": "", + "building": "", + "components": "", + "coreos": "", + "did": "", + "exist": "", + "looked": "", + "not": "", + "ones": "", + "re-using": "", + "started": "", + "that": "", + "the": "", + "to": "", + "tools": "", + "us": "", + "various": "", + "we": "", + "when": "", + } + + for prefix, want := range map[string]map[string]string{ + "a": map[string]string{"all": "", "and": "", "at": "", "available": ""}, + "al": map[string]string{"all": ""}, + "all": map[string]string{"all": ""}, + "alll": map[string]string{}, + "c": map[string]string{"components": "", "coreos": ""}, + "co": map[string]string{"components": "", "coreos": ""}, + "com": map[string]string{"components": ""}, + } { + have := filterPrefix(input, prefix) + if !reflect.DeepEqual(want, have) { + t.Errorf("%q: want %v, have %v", prefix, flattenKeys(want), flattenKeys(have)) + } + } +} + +func flattenKeys(m map[string]string) []string { + a := make([]string, 0, len(m)) + for k := range m { + a = append(a, k) + } + return a +} diff --git a/vendor/github.com/peterbourgon/diskv/speed_test.go b/vendor/github.com/peterbourgon/diskv/speed_test.go new file mode 100644 index 000000000..67d05ff27 --- /dev/null +++ b/vendor/github.com/peterbourgon/diskv/speed_test.go @@ -0,0 +1,153 @@ +package diskv + +import ( + "fmt" + "math/rand" + "testing" +) + +func shuffle(keys []string) { + ints := rand.Perm(len(keys)) + for i := range keys { + keys[i], keys[ints[i]] = keys[ints[i]], keys[i] + } +} + +func genValue(size int) []byte { + v := make([]byte, size) + for i := 0; i < size; i++ { + v[i] = uint8((rand.Int() % 26) + 97) // a-z + } + return v +} + +const ( + keyCount = 1000 +) + +func genKeys() []string { + keys := make([]string, keyCount) + for i := 0; i < keyCount; i++ { + keys[i] = fmt.Sprintf("%d", i) + } + return keys +} + +func (d *Diskv) load(keys []string, val []byte) { + for _, key := range keys { + d.Write(key, val) + } +} + +func benchRead(b *testing.B, size, cachesz int) { + b.StopTimer() + d := New(Options{ + BasePath: "speed-test", + Transform: func(string) []string { return []string{} }, + CacheSizeMax: uint64(cachesz), + }) + defer d.EraseAll() + + keys := genKeys() + value := genValue(size) + d.load(keys, value) + shuffle(keys) + b.SetBytes(int64(size)) + + b.StartTimer() + for i := 0; i < b.N; i++ { + _, _ = d.Read(keys[i%len(keys)]) + } + b.StopTimer() +} + +func benchWrite(b *testing.B, size int, withIndex bool) { + b.StopTimer() + + options := Options{ + BasePath: "speed-test", + Transform: func(string) []string { return []string{} }, + CacheSizeMax: 0, + } + if withIndex { + options.Index = &BTreeIndex{} + options.IndexLess = strLess + } + + d := New(options) + defer d.EraseAll() + keys := genKeys() + value := genValue(size) + shuffle(keys) + b.SetBytes(int64(size)) + + b.StartTimer() + for i := 0; i < b.N; i++ { + d.Write(keys[i%len(keys)], value) + } + b.StopTimer() +} + +func BenchmarkWrite__32B_NoIndex(b *testing.B) { + benchWrite(b, 32, false) +} + +func BenchmarkWrite__1KB_NoIndex(b *testing.B) { + benchWrite(b, 1024, false) +} + +func BenchmarkWrite__4KB_NoIndex(b *testing.B) { + benchWrite(b, 4096, false) +} + +func BenchmarkWrite_10KB_NoIndex(b *testing.B) { + benchWrite(b, 10240, false) +} + +func BenchmarkWrite__32B_WithIndex(b *testing.B) { + benchWrite(b, 32, true) +} + +func BenchmarkWrite__1KB_WithIndex(b *testing.B) { + benchWrite(b, 1024, true) +} + +func BenchmarkWrite__4KB_WithIndex(b *testing.B) { + benchWrite(b, 4096, true) +} + +func BenchmarkWrite_10KB_WithIndex(b *testing.B) { + benchWrite(b, 10240, true) +} + +func BenchmarkRead__32B_NoCache(b *testing.B) { + benchRead(b, 32, 0) +} + +func BenchmarkRead__1KB_NoCache(b *testing.B) { + benchRead(b, 1024, 0) +} + +func BenchmarkRead__4KB_NoCache(b *testing.B) { + benchRead(b, 4096, 0) +} + +func BenchmarkRead_10KB_NoCache(b *testing.B) { + benchRead(b, 10240, 0) +} + +func BenchmarkRead__32B_WithCache(b *testing.B) { + benchRead(b, 32, keyCount*32*2) +} + +func BenchmarkRead__1KB_WithCache(b *testing.B) { + benchRead(b, 1024, keyCount*1024*2) +} + +func BenchmarkRead__4KB_WithCache(b *testing.B) { + benchRead(b, 4096, keyCount*4096*2) +} + +func BenchmarkRead_10KB_WithCache(b *testing.B) { + benchRead(b, 10240, keyCount*4096*2) +} diff --git a/vendor/github.com/peterbourgon/diskv/stream_test.go b/vendor/github.com/peterbourgon/diskv/stream_test.go new file mode 100644 index 000000000..7991dbff2 --- /dev/null +++ b/vendor/github.com/peterbourgon/diskv/stream_test.go @@ -0,0 +1,117 @@ +package diskv + +import ( + "bytes" + "io/ioutil" + "testing" +) + +func TestBasicStreamCaching(t *testing.T) { + d := New(Options{ + BasePath: "test-data", + CacheSizeMax: 1024, + }) + defer d.EraseAll() + + input := "a1b2c3" + key, writeBuf, sync := "a", bytes.NewBufferString(input), true + if err := d.WriteStream(key, writeBuf, sync); err != nil { + t.Fatal(err) + } + + if d.isCached(key) { + t.Fatalf("'%s' cached, but shouldn't be (yet)", key) + } + + rc, err := d.ReadStream(key, false) + if err != nil { + t.Fatal(err) + } + + readBuf, err := ioutil.ReadAll(rc) + if err != nil { + t.Fatal(err) + } + + if !cmpBytes(readBuf, []byte(input)) { + t.Fatalf("'%s' != '%s'", string(readBuf), input) + } + + if !d.isCached(key) { + t.Fatalf("'%s' isn't cached, but should be", key) + } +} + +func TestReadStreamDirect(t *testing.T) { + var ( + basePath = "test-data" + ) + dWrite := New(Options{ + BasePath: basePath, + CacheSizeMax: 0, + }) + defer dWrite.EraseAll() + dRead := New(Options{ + BasePath: basePath, + CacheSizeMax: 1024, + }) + + // Write + key, val1, val2 := "a", []byte(`1234567890`), []byte(`aaaaaaaaaa`) + if err := dWrite.Write(key, val1); err != nil { + t.Fatalf("during first write: %s", err) + } + + // First, caching read. + val, err := dRead.Read(key) + if err != nil { + t.Fatalf("during initial read: %s", err) + } + t.Logf("read 1: %s => %s", key, string(val)) + if !cmpBytes(val1, val) { + t.Errorf("expected %q, got %q", string(val1), string(val)) + } + if !dRead.isCached(key) { + t.Errorf("%q should be cached, but isn't", key) + } + + // Write a different value. + if err := dWrite.Write(key, val2); err != nil { + t.Fatalf("during second write: %s", err) + } + + // Second read, should hit cache and get the old value. + val, err = dRead.Read(key) + if err != nil { + t.Fatalf("during second (cache-hit) read: %s", err) + } + t.Logf("read 2: %s => %s", key, string(val)) + if !cmpBytes(val1, val) { + t.Errorf("expected %q, got %q", string(val1), string(val)) + } + + // Third, direct read, should get the updated value. + rc, err := dRead.ReadStream(key, true) + if err != nil { + t.Fatalf("during third (direct) read, ReadStream: %s", err) + } + defer rc.Close() + val, err = ioutil.ReadAll(rc) + if err != nil { + t.Fatalf("during third (direct) read, ReadAll: %s", err) + } + t.Logf("read 3: %s => %s", key, string(val)) + if !cmpBytes(val2, val) { + t.Errorf("expected %q, got %q", string(val1), string(val)) + } + + // Fourth read, should hit cache and get the new value. + val, err = dRead.Read(key) + if err != nil { + t.Fatalf("during fourth (cache-hit) read: %s", err) + } + t.Logf("read 4: %s => %s", key, string(val)) + if !cmpBytes(val2, val) { + t.Errorf("expected %q, got %q", string(val1), string(val)) + } +} diff --git a/vendor/github.com/pkg/errors/.travis.yml b/vendor/github.com/pkg/errors/.travis.yml index 024e28466..588ceca18 100644 --- a/vendor/github.com/pkg/errors/.travis.yml +++ b/vendor/github.com/pkg/errors/.travis.yml @@ -4,6 +4,7 @@ go: - 1.4.3 - 1.5.4 - 1.6.2 + - 1.7.1 - tip script: diff --git a/vendor/github.com/pkg/errors/bench_test.go b/vendor/github.com/pkg/errors/bench_test.go new file mode 100644 index 000000000..0416a3cbb --- /dev/null +++ b/vendor/github.com/pkg/errors/bench_test.go @@ -0,0 +1,59 @@ +// +build go1.7 + +package errors + +import ( + "fmt" + "testing" + + stderrors "errors" +) + +func noErrors(at, depth int) error { + if at >= depth { + return stderrors.New("no error") + } + return noErrors(at+1, depth) +} +func yesErrors(at, depth int) error { + if at >= depth { + return New("ye error") + } + return yesErrors(at+1, depth) +} + +func BenchmarkErrors(b *testing.B) { + var toperr error + type run struct { + stack int + std bool + } + runs := []run{ + {10, false}, + {10, true}, + {100, false}, + {100, true}, + {1000, false}, + {1000, true}, + } + for _, r := range runs { + part := "pkg/errors" + if r.std { + part = "errors" + } + name := fmt.Sprintf("%s-stack-%d", part, r.stack) + b.Run(name, func(b *testing.B) { + var err error + f := yesErrors + if r.std { + f = noErrors + } + b.ReportAllocs() + for i := 0; i < b.N; i++ { + err = f(0, r.stack) + } + b.StopTimer() + toperr = err + }) + } +} diff --git a/vendor/github.com/pkg/errors/errors.go b/vendor/github.com/pkg/errors/errors.go index 75780c991..842ee8045 100644 --- a/vendor/github.com/pkg/errors/errors.go +++ b/vendor/github.com/pkg/errors/errors.go @@ -14,13 +14,18 @@ // Adding context to an error // // The errors.Wrap function returns a new error that adds context to the -// original error. For example +// original error by recording a stack trace at the point Wrap is called, +// and the supplied message. For example // // _, err := ioutil.ReadAll(r) // if err != nil { // return errors.Wrap(err, "read failed") // } // +// If additional control is required the errors.WithStack and errors.WithMessage +// functions destructure errors.Wrap into its component operations of annotating +// an error with a stack trace and an a message, respectively. +// // Retrieving the cause of an error // // Using errors.Wrap constructs a stack of errors, adding context to the @@ -127,8 +132,22 @@ func (f *fundamental) Format(s fmt.State, verb rune) { return } fallthrough - case 's', 'q': + case 's': io.WriteString(s, f.msg) + case 'q': + fmt.Fprintf(s, "%q", f.msg) + } +} + +// WithStack annotates err with a stack trace at the point WithStack was called. +// If err is nil, WithStack returns nil. +func WithStack(err error) error { + if err == nil { + return nil + } + return &withStack{ + err, + callers(), } } @@ -155,7 +174,8 @@ func (w *withStack) Format(s fmt.State, verb rune) { } } -// Wrap returns an error annotating err with message. +// Wrap returns an error annotating err with a stack trace +// at the point Wrap is called, and the supplied message. // If err is nil, Wrap returns nil. func Wrap(err error, message string) error { if err == nil { @@ -171,7 +191,8 @@ func Wrap(err error, message string) error { } } -// Wrapf returns an error annotating err with the format specifier. +// Wrapf returns an error annotating err with a stack trace +// at the point Wrapf is call, and the format specifier. // If err is nil, Wrapf returns nil. func Wrapf(err error, format string, args ...interface{}) error { if err == nil { @@ -187,6 +208,18 @@ func Wrapf(err error, format string, args ...interface{}) error { } } +// WithMessage annotates err with a new message. +// If err is nil, WithMessage returns nil. +func WithMessage(err error, message string) error { + if err == nil { + return nil + } + return &withMessage{ + cause: err, + msg: message, + } +} + type withMessage struct { cause error msg string diff --git a/vendor/github.com/pkg/errors/errors_test.go b/vendor/github.com/pkg/errors/errors_test.go new file mode 100644 index 000000000..1d8c63558 --- /dev/null +++ b/vendor/github.com/pkg/errors/errors_test.go @@ -0,0 +1,226 @@ +package errors + +import ( + "errors" + "fmt" + "io" + "reflect" + "testing" +) + +func TestNew(t *testing.T) { + tests := []struct { + err string + want error + }{ + {"", fmt.Errorf("")}, + {"foo", fmt.Errorf("foo")}, + {"foo", New("foo")}, + {"string with format specifiers: %v", errors.New("string with format specifiers: %v")}, + } + + for _, tt := range tests { + got := New(tt.err) + if got.Error() != tt.want.Error() { + t.Errorf("New.Error(): got: %q, want %q", got, tt.want) + } + } +} + +func TestWrapNil(t *testing.T) { + got := Wrap(nil, "no error") + if got != nil { + t.Errorf("Wrap(nil, \"no error\"): got %#v, expected nil", got) + } +} + +func TestWrap(t *testing.T) { + tests := []struct { + err error + message string + want string + }{ + {io.EOF, "read error", "read error: EOF"}, + {Wrap(io.EOF, "read error"), "client error", "client error: read error: EOF"}, + } + + for _, tt := range tests { + got := Wrap(tt.err, tt.message).Error() + if got != tt.want { + t.Errorf("Wrap(%v, %q): got: %v, want %v", tt.err, tt.message, got, tt.want) + } + } +} + +type nilError struct{} + +func (nilError) Error() string { return "nil error" } + +func TestCause(t *testing.T) { + x := New("error") + tests := []struct { + err error + want error + }{{ + // nil error is nil + err: nil, + want: nil, + }, { + // explicit nil error is nil + err: (error)(nil), + want: nil, + }, { + // typed nil is nil + err: (*nilError)(nil), + want: (*nilError)(nil), + }, { + // uncaused error is unaffected + err: io.EOF, + want: io.EOF, + }, { + // caused error returns cause + err: Wrap(io.EOF, "ignored"), + want: io.EOF, + }, { + err: x, // return from errors.New + want: x, + }, { + WithMessage(nil, "whoops"), + nil, + }, { + WithMessage(io.EOF, "whoops"), + io.EOF, + }, { + WithStack(nil), + nil, + }, { + WithStack(io.EOF), + io.EOF, + }} + + for i, tt := range tests { + got := Cause(tt.err) + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("test %d: got %#v, want %#v", i+1, got, tt.want) + } + } +} + +func TestWrapfNil(t *testing.T) { + got := Wrapf(nil, "no error") + if got != nil { + t.Errorf("Wrapf(nil, \"no error\"): got %#v, expected nil", got) + } +} + +func TestWrapf(t *testing.T) { + tests := []struct { + err error + message string + want string + }{ + {io.EOF, "read error", "read error: EOF"}, + {Wrapf(io.EOF, "read error without format specifiers"), "client error", "client error: read error without format specifiers: EOF"}, + {Wrapf(io.EOF, "read error with %d format specifier", 1), "client error", "client error: read error with 1 format specifier: EOF"}, + } + + for _, tt := range tests { + got := Wrapf(tt.err, tt.message).Error() + if got != tt.want { + t.Errorf("Wrapf(%v, %q): got: %v, want %v", tt.err, tt.message, got, tt.want) + } + } +} + +func TestErrorf(t *testing.T) { + tests := []struct { + err error + want string + }{ + {Errorf("read error without format specifiers"), "read error without format specifiers"}, + {Errorf("read error with %d format specifier", 1), "read error with 1 format specifier"}, + } + + for _, tt := range tests { + got := tt.err.Error() + if got != tt.want { + t.Errorf("Errorf(%v): got: %q, want %q", tt.err, got, tt.want) + } + } +} + +func TestWithStackNil(t *testing.T) { + got := WithStack(nil) + if got != nil { + t.Errorf("WithStack(nil): got %#v, expected nil", got) + } +} + +func TestWithStack(t *testing.T) { + tests := []struct { + err error + want string + }{ + {io.EOF, "EOF"}, + {WithStack(io.EOF), "EOF"}, + } + + for _, tt := range tests { + got := WithStack(tt.err).Error() + if got != tt.want { + t.Errorf("WithStack(%v): got: %v, want %v", tt.err, got, tt.want) + } + } +} + +func TestWithMessageNil(t *testing.T) { + got := WithMessage(nil, "no error") + if got != nil { + t.Errorf("WithMessage(nil, \"no error\"): got %#v, expected nil", got) + } +} + +func TestWithMessage(t *testing.T) { + tests := []struct { + err error + message string + want string + }{ + {io.EOF, "read error", "read error: EOF"}, + {WithMessage(io.EOF, "read error"), "client error", "client error: read error: EOF"}, + } + + for _, tt := range tests { + got := WithMessage(tt.err, tt.message).Error() + if got != tt.want { + t.Errorf("WithMessage(%v, %q): got: %q, want %q", tt.err, tt.message, got, tt.want) + } + } + +} + +// errors.New, etc values are not expected to be compared by value +// but the change in errors#27 made them incomparable. Assert that +// various kinds of errors have a functional equality operator, even +// if the result of that equality is always false. +func TestErrorEquality(t *testing.T) { + vals := []error{ + nil, + io.EOF, + errors.New("EOF"), + New("EOF"), + Errorf("EOF"), + Wrap(io.EOF, "EOF"), + Wrapf(io.EOF, "EOF%d", 2), + WithMessage(nil, "whoops"), + WithMessage(io.EOF, "whoops"), + WithStack(io.EOF), + WithStack(nil), + } + + for i := range vals { + for j := range vals { + _ = vals[i] == vals[j] // mustn't panic + } + } +} diff --git a/vendor/github.com/pkg/errors/example_test.go b/vendor/github.com/pkg/errors/example_test.go new file mode 100644 index 000000000..c1fc13e38 --- /dev/null +++ b/vendor/github.com/pkg/errors/example_test.go @@ -0,0 +1,205 @@ +package errors_test + +import ( + "fmt" + + "github.com/pkg/errors" +) + +func ExampleNew() { + err := errors.New("whoops") + fmt.Println(err) + + // Output: whoops +} + +func ExampleNew_printf() { + err := errors.New("whoops") + fmt.Printf("%+v", err) + + // Example output: + // whoops + // github.com/pkg/errors_test.ExampleNew_printf + // /home/dfc/src/github.com/pkg/errors/example_test.go:17 + // testing.runExample + // /home/dfc/go/src/testing/example.go:114 + // testing.RunExamples + // /home/dfc/go/src/testing/example.go:38 + // testing.(*M).Run + // /home/dfc/go/src/testing/testing.go:744 + // main.main + // /github.com/pkg/errors/_test/_testmain.go:106 + // runtime.main + // /home/dfc/go/src/runtime/proc.go:183 + // runtime.goexit + // /home/dfc/go/src/runtime/asm_amd64.s:2059 +} + +func ExampleWithMessage() { + cause := errors.New("whoops") + err := errors.WithMessage(cause, "oh noes") + fmt.Println(err) + + // Output: oh noes: whoops +} + +func ExampleWithStack() { + cause := errors.New("whoops") + err := errors.WithStack(cause) + fmt.Println(err) + + // Output: whoops +} + +func ExampleWithStack_printf() { + cause := errors.New("whoops") + err := errors.WithStack(cause) + fmt.Printf("%+v", err) + + // Example Output: + // whoops + // github.com/pkg/errors_test.ExampleWithStack_printf + // /home/fabstu/go/src/github.com/pkg/errors/example_test.go:55 + // testing.runExample + // /usr/lib/go/src/testing/example.go:114 + // testing.RunExamples + // /usr/lib/go/src/testing/example.go:38 + // testing.(*M).Run + // /usr/lib/go/src/testing/testing.go:744 + // main.main + // github.com/pkg/errors/_test/_testmain.go:106 + // runtime.main + // /usr/lib/go/src/runtime/proc.go:183 + // runtime.goexit + // /usr/lib/go/src/runtime/asm_amd64.s:2086 + // github.com/pkg/errors_test.ExampleWithStack_printf + // /home/fabstu/go/src/github.com/pkg/errors/example_test.go:56 + // testing.runExample + // /usr/lib/go/src/testing/example.go:114 + // testing.RunExamples + // /usr/lib/go/src/testing/example.go:38 + // testing.(*M).Run + // /usr/lib/go/src/testing/testing.go:744 + // main.main + // github.com/pkg/errors/_test/_testmain.go:106 + // runtime.main + // /usr/lib/go/src/runtime/proc.go:183 + // runtime.goexit + // /usr/lib/go/src/runtime/asm_amd64.s:2086 +} + +func ExampleWrap() { + cause := errors.New("whoops") + err := errors.Wrap(cause, "oh noes") + fmt.Println(err) + + // Output: oh noes: whoops +} + +func fn() error { + e1 := errors.New("error") + e2 := errors.Wrap(e1, "inner") + e3 := errors.Wrap(e2, "middle") + return errors.Wrap(e3, "outer") +} + +func ExampleCause() { + err := fn() + fmt.Println(err) + fmt.Println(errors.Cause(err)) + + // Output: outer: middle: inner: error + // error +} + +func ExampleWrap_extended() { + err := fn() + fmt.Printf("%+v\n", err) + + // Example output: + // error + // github.com/pkg/errors_test.fn + // /home/dfc/src/github.com/pkg/errors/example_test.go:47 + // github.com/pkg/errors_test.ExampleCause_printf + // /home/dfc/src/github.com/pkg/errors/example_test.go:63 + // testing.runExample + // /home/dfc/go/src/testing/example.go:114 + // testing.RunExamples + // /home/dfc/go/src/testing/example.go:38 + // testing.(*M).Run + // /home/dfc/go/src/testing/testing.go:744 + // main.main + // /github.com/pkg/errors/_test/_testmain.go:104 + // runtime.main + // /home/dfc/go/src/runtime/proc.go:183 + // runtime.goexit + // /home/dfc/go/src/runtime/asm_amd64.s:2059 + // github.com/pkg/errors_test.fn + // /home/dfc/src/github.com/pkg/errors/example_test.go:48: inner + // github.com/pkg/errors_test.fn + // /home/dfc/src/github.com/pkg/errors/example_test.go:49: middle + // github.com/pkg/errors_test.fn + // /home/dfc/src/github.com/pkg/errors/example_test.go:50: outer +} + +func ExampleWrapf() { + cause := errors.New("whoops") + err := errors.Wrapf(cause, "oh noes #%d", 2) + fmt.Println(err) + + // Output: oh noes #2: whoops +} + +func ExampleErrorf_extended() { + err := errors.Errorf("whoops: %s", "foo") + fmt.Printf("%+v", err) + + // Example output: + // whoops: foo + // github.com/pkg/errors_test.ExampleErrorf + // /home/dfc/src/github.com/pkg/errors/example_test.go:101 + // testing.runExample + // /home/dfc/go/src/testing/example.go:114 + // testing.RunExamples + // /home/dfc/go/src/testing/example.go:38 + // testing.(*M).Run + // /home/dfc/go/src/testing/testing.go:744 + // main.main + // /github.com/pkg/errors/_test/_testmain.go:102 + // runtime.main + // /home/dfc/go/src/runtime/proc.go:183 + // runtime.goexit + // /home/dfc/go/src/runtime/asm_amd64.s:2059 +} + +func Example_stackTrace() { + type stackTracer interface { + StackTrace() errors.StackTrace + } + + err, ok := errors.Cause(fn()).(stackTracer) + if !ok { + panic("oops, err does not implement stackTracer") + } + + st := err.StackTrace() + fmt.Printf("%+v", st[0:2]) // top two frames + + // Example output: + // github.com/pkg/errors_test.fn + // /home/dfc/src/github.com/pkg/errors/example_test.go:47 + // github.com/pkg/errors_test.Example_stackTrace + // /home/dfc/src/github.com/pkg/errors/example_test.go:127 +} + +func ExampleCause_printf() { + err := errors.Wrap(func() error { + return func() error { + return errors.Errorf("hello %s", fmt.Sprintf("world")) + }() + }(), "failed") + + fmt.Printf("%v", err) + + // Output: failed: hello world +} diff --git a/vendor/github.com/pkg/errors/format_test.go b/vendor/github.com/pkg/errors/format_test.go new file mode 100644 index 000000000..15fd7d89d --- /dev/null +++ b/vendor/github.com/pkg/errors/format_test.go @@ -0,0 +1,535 @@ +package errors + +import ( + "errors" + "fmt" + "io" + "regexp" + "strings" + "testing" +) + +func TestFormatNew(t *testing.T) { + tests := []struct { + error + format string + want string + }{{ + New("error"), + "%s", + "error", + }, { + New("error"), + "%v", + "error", + }, { + New("error"), + "%+v", + "error\n" + + "github.com/pkg/errors.TestFormatNew\n" + + "\t.+/github.com/pkg/errors/format_test.go:26", + }, { + New("error"), + "%q", + `"error"`, + }} + + for i, tt := range tests { + testFormatRegexp(t, i, tt.error, tt.format, tt.want) + } +} + +func TestFormatErrorf(t *testing.T) { + tests := []struct { + error + format string + want string + }{{ + Errorf("%s", "error"), + "%s", + "error", + }, { + Errorf("%s", "error"), + "%v", + "error", + }, { + Errorf("%s", "error"), + "%+v", + "error\n" + + "github.com/pkg/errors.TestFormatErrorf\n" + + "\t.+/github.com/pkg/errors/format_test.go:56", + }} + + for i, tt := range tests { + testFormatRegexp(t, i, tt.error, tt.format, tt.want) + } +} + +func TestFormatWrap(t *testing.T) { + tests := []struct { + error + format string + want string + }{{ + Wrap(New("error"), "error2"), + "%s", + "error2: error", + }, { + Wrap(New("error"), "error2"), + "%v", + "error2: error", + }, { + Wrap(New("error"), "error2"), + "%+v", + "error\n" + + "github.com/pkg/errors.TestFormatWrap\n" + + "\t.+/github.com/pkg/errors/format_test.go:82", + }, { + Wrap(io.EOF, "error"), + "%s", + "error: EOF", + }, { + Wrap(io.EOF, "error"), + "%v", + "error: EOF", + }, { + Wrap(io.EOF, "error"), + "%+v", + "EOF\n" + + "error\n" + + "github.com/pkg/errors.TestFormatWrap\n" + + "\t.+/github.com/pkg/errors/format_test.go:96", + }, { + Wrap(Wrap(io.EOF, "error1"), "error2"), + "%+v", + "EOF\n" + + "error1\n" + + "github.com/pkg/errors.TestFormatWrap\n" + + "\t.+/github.com/pkg/errors/format_test.go:103\n", + }, { + Wrap(New("error with space"), "context"), + "%q", + `"context: error with space"`, + }} + + for i, tt := range tests { + testFormatRegexp(t, i, tt.error, tt.format, tt.want) + } +} + +func TestFormatWrapf(t *testing.T) { + tests := []struct { + error + format string + want string + }{{ + Wrapf(io.EOF, "error%d", 2), + "%s", + "error2: EOF", + }, { + Wrapf(io.EOF, "error%d", 2), + "%v", + "error2: EOF", + }, { + Wrapf(io.EOF, "error%d", 2), + "%+v", + "EOF\n" + + "error2\n" + + "github.com/pkg/errors.TestFormatWrapf\n" + + "\t.+/github.com/pkg/errors/format_test.go:134", + }, { + Wrapf(New("error"), "error%d", 2), + "%s", + "error2: error", + }, { + Wrapf(New("error"), "error%d", 2), + "%v", + "error2: error", + }, { + Wrapf(New("error"), "error%d", 2), + "%+v", + "error\n" + + "github.com/pkg/errors.TestFormatWrapf\n" + + "\t.+/github.com/pkg/errors/format_test.go:149", + }} + + for i, tt := range tests { + testFormatRegexp(t, i, tt.error, tt.format, tt.want) + } +} + +func TestFormatWithStack(t *testing.T) { + tests := []struct { + error + format string + want []string + }{{ + WithStack(io.EOF), + "%s", + []string{"EOF"}, + }, { + WithStack(io.EOF), + "%v", + []string{"EOF"}, + }, { + WithStack(io.EOF), + "%+v", + []string{"EOF", + "github.com/pkg/errors.TestFormatWithStack\n" + + "\t.+/github.com/pkg/errors/format_test.go:175"}, + }, { + WithStack(New("error")), + "%s", + []string{"error"}, + }, { + WithStack(New("error")), + "%v", + []string{"error"}, + }, { + WithStack(New("error")), + "%+v", + []string{"error", + "github.com/pkg/errors.TestFormatWithStack\n" + + "\t.+/github.com/pkg/errors/format_test.go:189", + "github.com/pkg/errors.TestFormatWithStack\n" + + "\t.+/github.com/pkg/errors/format_test.go:189"}, + }, { + WithStack(WithStack(io.EOF)), + "%+v", + []string{"EOF", + "github.com/pkg/errors.TestFormatWithStack\n" + + "\t.+/github.com/pkg/errors/format_test.go:197", + "github.com/pkg/errors.TestFormatWithStack\n" + + "\t.+/github.com/pkg/errors/format_test.go:197"}, + }, { + WithStack(WithStack(Wrapf(io.EOF, "message"))), + "%+v", + []string{"EOF", + "message", + "github.com/pkg/errors.TestFormatWithStack\n" + + "\t.+/github.com/pkg/errors/format_test.go:205", + "github.com/pkg/errors.TestFormatWithStack\n" + + "\t.+/github.com/pkg/errors/format_test.go:205", + "github.com/pkg/errors.TestFormatWithStack\n" + + "\t.+/github.com/pkg/errors/format_test.go:205"}, + }, { + WithStack(Errorf("error%d", 1)), + "%+v", + []string{"error1", + "github.com/pkg/errors.TestFormatWithStack\n" + + "\t.+/github.com/pkg/errors/format_test.go:216", + "github.com/pkg/errors.TestFormatWithStack\n" + + "\t.+/github.com/pkg/errors/format_test.go:216"}, + }} + + for i, tt := range tests { + testFormatCompleteCompare(t, i, tt.error, tt.format, tt.want, true) + } +} + +func TestFormatWithMessage(t *testing.T) { + tests := []struct { + error + format string + want []string + }{{ + WithMessage(New("error"), "error2"), + "%s", + []string{"error2: error"}, + }, { + WithMessage(New("error"), "error2"), + "%v", + []string{"error2: error"}, + }, { + WithMessage(New("error"), "error2"), + "%+v", + []string{ + "error", + "github.com/pkg/errors.TestFormatWithMessage\n" + + "\t.+/github.com/pkg/errors/format_test.go:244", + "error2"}, + }, { + WithMessage(io.EOF, "addition1"), + "%s", + []string{"addition1: EOF"}, + }, { + WithMessage(io.EOF, "addition1"), + "%v", + []string{"addition1: EOF"}, + }, { + WithMessage(io.EOF, "addition1"), + "%+v", + []string{"EOF", "addition1"}, + }, { + WithMessage(WithMessage(io.EOF, "addition1"), "addition2"), + "%v", + []string{"addition2: addition1: EOF"}, + }, { + WithMessage(WithMessage(io.EOF, "addition1"), "addition2"), + "%+v", + []string{"EOF", "addition1", "addition2"}, + }, { + Wrap(WithMessage(io.EOF, "error1"), "error2"), + "%+v", + []string{"EOF", "error1", "error2", + "github.com/pkg/errors.TestFormatWithMessage\n" + + "\t.+/github.com/pkg/errors/format_test.go:272"}, + }, { + WithMessage(Errorf("error%d", 1), "error2"), + "%+v", + []string{"error1", + "github.com/pkg/errors.TestFormatWithMessage\n" + + "\t.+/github.com/pkg/errors/format_test.go:278", + "error2"}, + }, { + WithMessage(WithStack(io.EOF), "error"), + "%+v", + []string{ + "EOF", + "github.com/pkg/errors.TestFormatWithMessage\n" + + "\t.+/github.com/pkg/errors/format_test.go:285", + "error"}, + }, { + WithMessage(Wrap(WithStack(io.EOF), "inside-error"), "outside-error"), + "%+v", + []string{ + "EOF", + "github.com/pkg/errors.TestFormatWithMessage\n" + + "\t.+/github.com/pkg/errors/format_test.go:293", + "inside-error", + "github.com/pkg/errors.TestFormatWithMessage\n" + + "\t.+/github.com/pkg/errors/format_test.go:293", + "outside-error"}, + }} + + for i, tt := range tests { + testFormatCompleteCompare(t, i, tt.error, tt.format, tt.want, true) + } +} + +func TestFormatGeneric(t *testing.T) { + starts := []struct { + err error + want []string + }{ + {New("new-error"), []string{ + "new-error", + "github.com/pkg/errors.TestFormatGeneric\n" + + "\t.+/github.com/pkg/errors/format_test.go:315"}, + }, {Errorf("errorf-error"), []string{ + "errorf-error", + "github.com/pkg/errors.TestFormatGeneric\n" + + "\t.+/github.com/pkg/errors/format_test.go:319"}, + }, {errors.New("errors-new-error"), []string{ + "errors-new-error"}, + }, + } + + wrappers := []wrapper{ + { + func(err error) error { return WithMessage(err, "with-message") }, + []string{"with-message"}, + }, { + func(err error) error { return WithStack(err) }, + []string{ + "github.com/pkg/errors.(func·002|TestFormatGeneric.func2)\n\t" + + ".+/github.com/pkg/errors/format_test.go:333", + }, + }, { + func(err error) error { return Wrap(err, "wrap-error") }, + []string{ + "wrap-error", + "github.com/pkg/errors.(func·003|TestFormatGeneric.func3)\n\t" + + ".+/github.com/pkg/errors/format_test.go:339", + }, + }, { + func(err error) error { return Wrapf(err, "wrapf-error%d", 1) }, + []string{ + "wrapf-error1", + "github.com/pkg/errors.(func·004|TestFormatGeneric.func4)\n\t" + + ".+/github.com/pkg/errors/format_test.go:346", + }, + }, + } + + for s := range starts { + err := starts[s].err + want := starts[s].want + testFormatCompleteCompare(t, s, err, "%+v", want, false) + testGenericRecursive(t, err, want, wrappers, 3) + } +} + +func testFormatRegexp(t *testing.T, n int, arg interface{}, format, want string) { + got := fmt.Sprintf(format, arg) + gotLines := strings.SplitN(got, "\n", -1) + wantLines := strings.SplitN(want, "\n", -1) + + if len(wantLines) > len(gotLines) { + t.Errorf("test %d: wantLines(%d) > gotLines(%d):\n got: %q\nwant: %q", n+1, len(wantLines), len(gotLines), got, want) + return + } + + for i, w := range wantLines { + match, err := regexp.MatchString(w, gotLines[i]) + if err != nil { + t.Fatal(err) + } + if !match { + t.Errorf("test %d: line %d: fmt.Sprintf(%q, err):\n got: %q\nwant: %q", n+1, i+1, format, got, want) + } + } +} + +var stackLineR = regexp.MustCompile(`\.`) + +// parseBlocks parses input into a slice, where: +// - incase entry contains a newline, its a stacktrace +// - incase entry contains no newline, its a solo line. +// +// Detecting stack boundaries only works incase the WithStack-calls are +// to be found on the same line, thats why it is optionally here. +// +// Example use: +// +// for _, e := range blocks { +// if strings.ContainsAny(e, "\n") { +// // Match as stack +// } else { +// // Match as line +// } +// } +// +func parseBlocks(input string, detectStackboundaries bool) ([]string, error) { + var blocks []string + + stack := "" + wasStack := false + lines := map[string]bool{} // already found lines + + for _, l := range strings.Split(input, "\n") { + isStackLine := stackLineR.MatchString(l) + + switch { + case !isStackLine && wasStack: + blocks = append(blocks, stack, l) + stack = "" + lines = map[string]bool{} + case isStackLine: + if wasStack { + // Detecting two stacks after another, possible cause lines match in + // our tests due to WithStack(WithStack(io.EOF)) on same line. + if detectStackboundaries { + if lines[l] { + if len(stack) == 0 { + return nil, errors.New("len of block must not be zero here") + } + + blocks = append(blocks, stack) + stack = l + lines = map[string]bool{l: true} + continue + } + } + + stack = stack + "\n" + l + } else { + stack = l + } + lines[l] = true + case !isStackLine && !wasStack: + blocks = append(blocks, l) + default: + return nil, errors.New("must not happen") + } + + wasStack = isStackLine + } + + // Use up stack + if stack != "" { + blocks = append(blocks, stack) + } + return blocks, nil +} + +func testFormatCompleteCompare(t *testing.T, n int, arg interface{}, format string, want []string, detectStackBoundaries bool) { + gotStr := fmt.Sprintf(format, arg) + + got, err := parseBlocks(gotStr, detectStackBoundaries) + if err != nil { + t.Fatal(err) + } + + if len(got) != len(want) { + t.Fatalf("test %d: fmt.Sprintf(%s, err) -> wrong number of blocks: got(%d) want(%d)\n got: %s\nwant: %s\ngotStr: %q", + n+1, format, len(got), len(want), prettyBlocks(got), prettyBlocks(want), gotStr) + } + + for i := range got { + if strings.ContainsAny(want[i], "\n") { + // Match as stack + match, err := regexp.MatchString(want[i], got[i]) + if err != nil { + t.Fatal(err) + } + if !match { + t.Fatalf("test %d: block %d: fmt.Sprintf(%q, err):\ngot:\n%q\nwant:\n%q\nall-got:\n%s\nall-want:\n%s\n", + n+1, i+1, format, got[i], want[i], prettyBlocks(got), prettyBlocks(want)) + } + } else { + // Match as message + if got[i] != want[i] { + t.Fatalf("test %d: fmt.Sprintf(%s, err) at block %d got != want:\n got: %q\nwant: %q", n+1, format, i+1, got[i], want[i]) + } + } + } +} + +type wrapper struct { + wrap func(err error) error + want []string +} + +func prettyBlocks(blocks []string, prefix ...string) string { + var out []string + + for _, b := range blocks { + out = append(out, fmt.Sprintf("%v", b)) + } + + return " " + strings.Join(out, "\n ") +} + +func testGenericRecursive(t *testing.T, beforeErr error, beforeWant []string, list []wrapper, maxDepth int) { + if len(beforeWant) == 0 { + panic("beforeWant must not be empty") + } + for _, w := range list { + if len(w.want) == 0 { + panic("want must not be empty") + } + + err := w.wrap(beforeErr) + + // Copy required cause append(beforeWant, ..) modified beforeWant subtly. + beforeCopy := make([]string, len(beforeWant)) + copy(beforeCopy, beforeWant) + + beforeWant := beforeCopy + last := len(beforeWant) - 1 + var want []string + + // Merge two stacks behind each other. + if strings.ContainsAny(beforeWant[last], "\n") && strings.ContainsAny(w.want[0], "\n") { + want = append(beforeWant[:last], append([]string{beforeWant[last] + "((?s).*)" + w.want[0]}, w.want[1:]...)...) + } else { + want = append(beforeWant, w.want...) + } + + testFormatCompleteCompare(t, maxDepth, err, "%+v", want, false) + if maxDepth > 0 { + testGenericRecursive(t, err, want, list, maxDepth-1) + } + } +} diff --git a/vendor/github.com/pkg/errors/stack_test.go b/vendor/github.com/pkg/errors/stack_test.go new file mode 100644 index 000000000..510c27a9f --- /dev/null +++ b/vendor/github.com/pkg/errors/stack_test.go @@ -0,0 +1,292 @@ +package errors + +import ( + "fmt" + "runtime" + "testing" +) + +var initpc, _, _, _ = runtime.Caller(0) + +func TestFrameLine(t *testing.T) { + var tests = []struct { + Frame + want int + }{{ + Frame(initpc), + 9, + }, { + func() Frame { + var pc, _, _, _ = runtime.Caller(0) + return Frame(pc) + }(), + 20, + }, { + func() Frame { + var pc, _, _, _ = runtime.Caller(1) + return Frame(pc) + }(), + 28, + }, { + Frame(0), // invalid PC + 0, + }} + + for _, tt := range tests { + got := tt.Frame.line() + want := tt.want + if want != got { + t.Errorf("Frame(%v): want: %v, got: %v", uintptr(tt.Frame), want, got) + } + } +} + +type X struct{} + +func (x X) val() Frame { + var pc, _, _, _ = runtime.Caller(0) + return Frame(pc) +} + +func (x *X) ptr() Frame { + var pc, _, _, _ = runtime.Caller(0) + return Frame(pc) +} + +func TestFrameFormat(t *testing.T) { + var tests = []struct { + Frame + format string + want string + }{{ + Frame(initpc), + "%s", + "stack_test.go", + }, { + Frame(initpc), + "%+s", + "github.com/pkg/errors.init\n" + + "\t.+/github.com/pkg/errors/stack_test.go", + }, { + Frame(0), + "%s", + "unknown", + }, { + Frame(0), + "%+s", + "unknown", + }, { + Frame(initpc), + "%d", + "9", + }, { + Frame(0), + "%d", + "0", + }, { + Frame(initpc), + "%n", + "init", + }, { + func() Frame { + var x X + return x.ptr() + }(), + "%n", + `\(\*X\).ptr`, + }, { + func() Frame { + var x X + return x.val() + }(), + "%n", + "X.val", + }, { + Frame(0), + "%n", + "", + }, { + Frame(initpc), + "%v", + "stack_test.go:9", + }, { + Frame(initpc), + "%+v", + "github.com/pkg/errors.init\n" + + "\t.+/github.com/pkg/errors/stack_test.go:9", + }, { + Frame(0), + "%v", + "unknown:0", + }} + + for i, tt := range tests { + testFormatRegexp(t, i, tt.Frame, tt.format, tt.want) + } +} + +func TestFuncname(t *testing.T) { + tests := []struct { + name, want string + }{ + {"", ""}, + {"runtime.main", "main"}, + {"github.com/pkg/errors.funcname", "funcname"}, + {"funcname", "funcname"}, + {"io.copyBuffer", "copyBuffer"}, + {"main.(*R).Write", "(*R).Write"}, + } + + for _, tt := range tests { + got := funcname(tt.name) + want := tt.want + if got != want { + t.Errorf("funcname(%q): want: %q, got %q", tt.name, want, got) + } + } +} + +func TestTrimGOPATH(t *testing.T) { + var tests = []struct { + Frame + want string + }{{ + Frame(initpc), + "github.com/pkg/errors/stack_test.go", + }} + + for i, tt := range tests { + pc := tt.Frame.pc() + fn := runtime.FuncForPC(pc) + file, _ := fn.FileLine(pc) + got := trimGOPATH(fn.Name(), file) + testFormatRegexp(t, i, got, "%s", tt.want) + } +} + +func TestStackTrace(t *testing.T) { + tests := []struct { + err error + want []string + }{{ + New("ooh"), []string{ + "github.com/pkg/errors.TestStackTrace\n" + + "\t.+/github.com/pkg/errors/stack_test.go:172", + }, + }, { + Wrap(New("ooh"), "ahh"), []string{ + "github.com/pkg/errors.TestStackTrace\n" + + "\t.+/github.com/pkg/errors/stack_test.go:177", // this is the stack of Wrap, not New + }, + }, { + Cause(Wrap(New("ooh"), "ahh")), []string{ + "github.com/pkg/errors.TestStackTrace\n" + + "\t.+/github.com/pkg/errors/stack_test.go:182", // this is the stack of New + }, + }, { + func() error { return New("ooh") }(), []string{ + `github.com/pkg/errors.(func·009|TestStackTrace.func1)` + + "\n\t.+/github.com/pkg/errors/stack_test.go:187", // this is the stack of New + "github.com/pkg/errors.TestStackTrace\n" + + "\t.+/github.com/pkg/errors/stack_test.go:187", // this is the stack of New's caller + }, + }, { + Cause(func() error { + return func() error { + return Errorf("hello %s", fmt.Sprintf("world")) + }() + }()), []string{ + `github.com/pkg/errors.(func·010|TestStackTrace.func2.1)` + + "\n\t.+/github.com/pkg/errors/stack_test.go:196", // this is the stack of Errorf + `github.com/pkg/errors.(func·011|TestStackTrace.func2)` + + "\n\t.+/github.com/pkg/errors/stack_test.go:197", // this is the stack of Errorf's caller + "github.com/pkg/errors.TestStackTrace\n" + + "\t.+/github.com/pkg/errors/stack_test.go:198", // this is the stack of Errorf's caller's caller + }, + }} + for i, tt := range tests { + x, ok := tt.err.(interface { + StackTrace() StackTrace + }) + if !ok { + t.Errorf("expected %#v to implement StackTrace() StackTrace", tt.err) + continue + } + st := x.StackTrace() + for j, want := range tt.want { + testFormatRegexp(t, i, st[j], "%+v", want) + } + } +} + +func stackTrace() StackTrace { + const depth = 8 + var pcs [depth]uintptr + n := runtime.Callers(1, pcs[:]) + var st stack = pcs[0:n] + return st.StackTrace() +} + +func TestStackTraceFormat(t *testing.T) { + tests := []struct { + StackTrace + format string + want string + }{{ + nil, + "%s", + `\[\]`, + }, { + nil, + "%v", + `\[\]`, + }, { + nil, + "%+v", + "", + }, { + nil, + "%#v", + `\[\]errors.Frame\(nil\)`, + }, { + make(StackTrace, 0), + "%s", + `\[\]`, + }, { + make(StackTrace, 0), + "%v", + `\[\]`, + }, { + make(StackTrace, 0), + "%+v", + "", + }, { + make(StackTrace, 0), + "%#v", + `\[\]errors.Frame{}`, + }, { + stackTrace()[:2], + "%s", + `\[stack_test.go stack_test.go\]`, + }, { + stackTrace()[:2], + "%v", + `\[stack_test.go:225 stack_test.go:272\]`, + }, { + stackTrace()[:2], + "%+v", + "\n" + + "github.com/pkg/errors.stackTrace\n" + + "\t.+/github.com/pkg/errors/stack_test.go:225\n" + + "github.com/pkg/errors.TestStackTraceFormat\n" + + "\t.+/github.com/pkg/errors/stack_test.go:276", + }, { + stackTrace()[:2], + "%#v", + `\[\]errors.Frame{stack_test.go:225, stack_test.go:284}`, + }} + + for i, tt := range tests { + testFormatRegexp(t, i, tt.StackTrace, tt.format, tt.want) + } +} diff --git a/vendor/github.com/prometheus/client_golang/.gitignore b/vendor/github.com/prometheus/client_golang/.gitignore new file mode 100644 index 000000000..f6fc2e8eb --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/.gitignore @@ -0,0 +1,26 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe + +*~ +*# +.build diff --git a/vendor/github.com/prometheus/client_golang/.travis.yml b/vendor/github.com/prometheus/client_golang/.travis.yml new file mode 100644 index 000000000..d83f31a59 --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/.travis.yml @@ -0,0 +1,9 @@ +sudo: false +language: go + +go: + - 1.5.4 + - 1.6.2 + +script: + - go test -short ./... diff --git a/vendor/github.com/prometheus/client_model/AUTHORS.md b/vendor/github.com/prometheus/client_golang/AUTHORS.md similarity index 70% rename from vendor/github.com/prometheus/client_model/AUTHORS.md rename to vendor/github.com/prometheus/client_golang/AUTHORS.md index e8b3efa6a..c5275d5ab 100644 --- a/vendor/github.com/prometheus/client_model/AUTHORS.md +++ b/vendor/github.com/prometheus/client_golang/AUTHORS.md @@ -8,6 +8,11 @@ Maintainers of this repository: The following individuals have contributed code to this repository (listed in alphabetical order): +* Bernerd Schaefer * Björn Rabenstein +* Daniel Bornkessel +* Jeff Younker +* Julius Volz * Matt T. Proud * Tobias Schmidt + diff --git a/vendor/github.com/prometheus/client_golang/CHANGELOG.md b/vendor/github.com/prometheus/client_golang/CHANGELOG.md new file mode 100644 index 000000000..330788a4e --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/CHANGELOG.md @@ -0,0 +1,109 @@ +## 0.8.0 / 2016-08-17 +* [CHANGE] Registry is doing more consistency checks. This might break + existing setups that used to export inconsistent metrics. +* [CHANGE] Pushing to Pushgateway moved to package `push` and changed to allow + arbitrary grouping. +* [CHANGE] Removed `SelfCollector`. +* [CHANGE] Removed `PanicOnCollectError` and `EnableCollectChecks` methods. +* [CHANGE] Moved packages to the prometheus/common repo: `text`, `model`, + `extraction`. +* [CHANGE] Deprecated a number of functions. +* [FEATURE] Allow custom registries. Added `Registerer` and `Gatherer` + interfaces. +* [FEATURE] Separated HTTP exposition, allowing custom HTTP handlers (package + `promhttp`) and enabling the creation of other exposition mechanisms. +* [FEATURE] `MustRegister` is variadic now, allowing registration of many + collectors in one call. +* [FEATURE] Added HTTP API v1 package. +* [ENHANCEMENT] Numerous documentation improvements. +* [ENHANCEMENT] Improved metric sorting. +* [ENHANCEMENT] Inlined fnv64a hashing for improved performance. +* [ENHANCEMENT] Several test improvements. +* [BUGFIX] Handle collisions in MetricVec. + +## 0.7.0 / 2015-07-27 +* [CHANGE] Rename ExporterLabelPrefix to ExportedLabelPrefix. +* [BUGFIX] Closed gaps in metric consistency check. +* [BUGFIX] Validate LabelName/LabelSet on JSON unmarshaling. +* [ENHANCEMENT] Document the possibility to create "empty" metrics in + a metric vector. +* [ENHANCEMENT] Fix and clarify various doc comments and the README.md. +* [ENHANCEMENT] (Kind of) solve "The Proxy Problem" of http.InstrumentHandler. +* [ENHANCEMENT] Change responseWriterDelegator.written to int64. + +## 0.6.0 / 2015-06-01 +* [CHANGE] Rename process_goroutines to go_goroutines. +* [ENHANCEMENT] Validate label names during YAML decoding. +* [ENHANCEMENT] Add LabelName regular expression. +* [BUGFIX] Ensure alignment of struct members for 32-bit systems. + +## 0.5.0 / 2015-05-06 +* [BUGFIX] Removed a weakness in the fingerprinting aka signature code. + This makes fingerprinting slower and more allocation-heavy, but the + weakness was too severe to be tolerated. +* [CHANGE] As a result of the above, Metric.Fingerprint is now returning + a different fingerprint. To keep the same fingerprint, the new method + Metric.FastFingerprint was introduced, which will be used by the + Prometheus server for storage purposes (implying that a collision + detection has to be added, too). +* [ENHANCEMENT] The Metric.Equal and Metric.Before do not depend on + fingerprinting anymore, removing the possibility of an undetected + fingerprint collision. +* [FEATURE] The Go collector in the exposition library includes garbage + collection stats. +* [FEATURE] The exposition library allows to create constant "throw-away" + summaries and histograms. +* [CHANGE] A number of new reserved labels and prefixes. + +## 0.4.0 / 2015-04-08 +* [CHANGE] Return NaN when Summaries have no observations yet. +* [BUGFIX] Properly handle Summary decay upon Write(). +* [BUGFIX] Fix the documentation link to the consumption library. +* [FEATURE] Allow the metric family injection hook to merge with existing + metric families. +* [ENHANCEMENT] Removed cgo dependency and conditional compilation of procfs. +* [MAINTENANCE] Adjusted to changes in matttproud/golang_protobuf_extensions. + +## 0.3.2 / 2015-03-11 +* [BUGFIX] Fixed the receiver type of COWMetric.Set(). This method is + only used by the Prometheus server internally. +* [CLEANUP] Added licenses of vendored code left out by godep. + +## 0.3.1 / 2015-03-04 +* [ENHANCEMENT] Switched fingerprinting functions from own free list to + sync.Pool. +* [CHANGE] Makefile uses Go 1.4.2 now (only relevant for examples and tests). + +## 0.3.0 / 2015-03-03 +* [CHANGE] Changed the fingerprinting for metrics. THIS WILL INVALIDATE ALL + PERSISTED FINGERPRINTS. IF YOU COMPILE THE PROMETHEUS SERVER WITH THIS + VERSION, YOU HAVE TO WIPE THE PREVIOUSLY CREATED STORAGE. +* [CHANGE] LabelValuesToSignature removed. (Nobody had used it, and it was + arguably broken.) +* [CHANGE] Vendored dependencies. Those are only used by the Makefile. If + client_golang is used as a library, the vendoring will stay out of your way. +* [BUGFIX] Remove a weakness in the fingerprinting for metrics. (This made + the fingerprinting change above necessary.) +* [FEATURE] Added new fingerprinting functions SignatureForLabels and + SignatureWithoutLabels to be used by the Prometheus server. These functions + require fewer allocations than the ones currently used by the server. + +## 0.2.0 / 2015-02-23 +* [FEATURE] Introduce new Histagram metric type. +* [CHANGE] Ignore process collector errors for now (better error handling + pending). +* [CHANGE] Use clear error interface for process pidFn. +* [BUGFIX] Fix Go download links for several archs and OSes. +* [ENHANCEMENT] Massively improve Gauge and Counter performance. +* [ENHANCEMENT] Catch illegal label names for summaries in histograms. +* [ENHANCEMENT] Reduce allocations during fingerprinting. +* [ENHANCEMENT] Remove cgo dependency. procfs package will only be included if + both cgo is available and the build is for an OS with procfs. +* [CLEANUP] Clean up code style issues. +* [CLEANUP] Mark slow test as such and exclude them from travis. +* [CLEANUP] Update protobuf library package name. +* [CLEANUP] Updated vendoring of beorn7/perks. + +## 0.1.0 / 2015-02-02 +* [CLEANUP] Introduced semantic versioning and changelog. From now on, + changes will be reported in this file. diff --git a/vendor/github.com/prometheus/client_golang/CONTRIBUTING.md b/vendor/github.com/prometheus/client_golang/CONTRIBUTING.md new file mode 100644 index 000000000..5705f0fbe --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/CONTRIBUTING.md @@ -0,0 +1,18 @@ +# Contributing + +Prometheus uses GitHub to manage reviews of pull requests. + +* If you have a trivial fix or improvement, go ahead and create a pull + request, addressing (with `@...`) one or more of the maintainers + (see [AUTHORS.md](AUTHORS.md)) in the description of the pull request. + +* If you plan to do something more involved, first discuss your ideas + on our [mailing list](https://groups.google.com/forum/?fromgroups#!forum/prometheus-developers). + This will avoid unnecessary work and surely give you and us a good deal + of inspiration. + +* Relevant coding style guidelines are the [Go Code Review + Comments](https://code.google.com/p/go-wiki/wiki/CodeReviewComments) + and the _Formatting and style_ section of Peter Bourgon's [Go: Best + Practices for Production + Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style). diff --git a/vendor/github.com/prometheus/client_golang/README.md b/vendor/github.com/prometheus/client_golang/README.md new file mode 100644 index 000000000..557eacf5a --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/README.md @@ -0,0 +1,45 @@ +# Prometheus Go client library + +[![Build Status](https://travis-ci.org/prometheus/client_golang.svg?branch=master)](https://travis-ci.org/prometheus/client_golang) + +This is the [Go](http://golang.org) client library for +[Prometheus](http://prometheus.io). It has two separate parts, one for +instrumenting application code, and one for creating clients that talk to the +Prometheus HTTP API. + +## Instrumenting applications + +[![code-coverage](http://gocover.io/_badge/github.com/prometheus/client_golang/prometheus)](http://gocover.io/github.com/prometheus/client_golang/prometheus) [![go-doc](https://godoc.org/github.com/prometheus/client_golang/prometheus?status.svg)](https://godoc.org/github.com/prometheus/client_golang/prometheus) + +The +[`prometheus` directory](https://github.com/prometheus/client_golang/tree/master/prometheus) +contains the instrumentation library. See the +[best practices section](http://prometheus.io/docs/practices/naming/) of the +Prometheus documentation to learn more about instrumenting applications. + +The +[`examples` directory](https://github.com/prometheus/client_golang/tree/master/examples) +contains simple examples of instrumented code. + +## Client for the Prometheus HTTP API + +[![code-coverage](http://gocover.io/_badge/github.com/prometheus/client_golang/api/prometheus)](http://gocover.io/github.com/prometheus/client_golang/api/prometheus) [![go-doc](https://godoc.org/github.com/prometheus/client_golang/api/prometheus?status.svg)](https://godoc.org/github.com/prometheus/client_golang/api/prometheus) + +The +[`api/prometheus` directory](https://github.com/prometheus/client_golang/tree/master/api/prometheus) +contains the client for the +[Prometheus HTTP API](http://prometheus.io/docs/querying/api/). It allows you +to write Go applications that query time series data from a Prometheus server. + +## Where is `model`, `extraction`, and `text`? + +The `model` packages has been moved to +[`prometheus/common/model`](https://github.com/prometheus/common/tree/master/model). + +The `extraction` and `text` packages are now contained in +[`prometheus/common/expfmt`](https://github.com/prometheus/common/tree/master/expfmt). + +## Contributing and community + +See the [contributing guidelines](CONTRIBUTING.md) and the +[Community section](http://prometheus.io/community/) of the homepage. diff --git a/vendor/github.com/prometheus/client_golang/VERSION b/vendor/github.com/prometheus/client_golang/VERSION new file mode 100644 index 000000000..a3df0a695 --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/VERSION @@ -0,0 +1 @@ +0.8.0 diff --git a/vendor/github.com/prometheus/client_golang/prometheus/benchmark_test.go b/vendor/github.com/prometheus/client_golang/prometheus/benchmark_test.go new file mode 100644 index 000000000..a3d86698b --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/benchmark_test.go @@ -0,0 +1,183 @@ +// Copyright 2014 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package prometheus + +import ( + "sync" + "testing" +) + +func BenchmarkCounterWithLabelValues(b *testing.B) { + m := NewCounterVec( + CounterOpts{ + Name: "benchmark_counter", + Help: "A counter to benchmark it.", + }, + []string{"one", "two", "three"}, + ) + b.ReportAllocs() + b.ResetTimer() + for i := 0; i < b.N; i++ { + m.WithLabelValues("eins", "zwei", "drei").Inc() + } +} + +func BenchmarkCounterWithLabelValuesConcurrent(b *testing.B) { + m := NewCounterVec( + CounterOpts{ + Name: "benchmark_counter", + Help: "A counter to benchmark it.", + }, + []string{"one", "two", "three"}, + ) + b.ReportAllocs() + b.ResetTimer() + wg := sync.WaitGroup{} + for i := 0; i < 10; i++ { + wg.Add(1) + go func() { + for j := 0; j < b.N/10; j++ { + m.WithLabelValues("eins", "zwei", "drei").Inc() + } + wg.Done() + }() + } + wg.Wait() +} + +func BenchmarkCounterWithMappedLabels(b *testing.B) { + m := NewCounterVec( + CounterOpts{ + Name: "benchmark_counter", + Help: "A counter to benchmark it.", + }, + []string{"one", "two", "three"}, + ) + b.ReportAllocs() + b.ResetTimer() + for i := 0; i < b.N; i++ { + m.With(Labels{"two": "zwei", "one": "eins", "three": "drei"}).Inc() + } +} + +func BenchmarkCounterWithPreparedMappedLabels(b *testing.B) { + m := NewCounterVec( + CounterOpts{ + Name: "benchmark_counter", + Help: "A counter to benchmark it.", + }, + []string{"one", "two", "three"}, + ) + b.ReportAllocs() + b.ResetTimer() + labels := Labels{"two": "zwei", "one": "eins", "three": "drei"} + for i := 0; i < b.N; i++ { + m.With(labels).Inc() + } +} + +func BenchmarkCounterNoLabels(b *testing.B) { + m := NewCounter(CounterOpts{ + Name: "benchmark_counter", + Help: "A counter to benchmark it.", + }) + b.ReportAllocs() + b.ResetTimer() + for i := 0; i < b.N; i++ { + m.Inc() + } +} + +func BenchmarkGaugeWithLabelValues(b *testing.B) { + m := NewGaugeVec( + GaugeOpts{ + Name: "benchmark_gauge", + Help: "A gauge to benchmark it.", + }, + []string{"one", "two", "three"}, + ) + b.ReportAllocs() + b.ResetTimer() + for i := 0; i < b.N; i++ { + m.WithLabelValues("eins", "zwei", "drei").Set(3.1415) + } +} + +func BenchmarkGaugeNoLabels(b *testing.B) { + m := NewGauge(GaugeOpts{ + Name: "benchmark_gauge", + Help: "A gauge to benchmark it.", + }) + b.ReportAllocs() + b.ResetTimer() + for i := 0; i < b.N; i++ { + m.Set(3.1415) + } +} + +func BenchmarkSummaryWithLabelValues(b *testing.B) { + m := NewSummaryVec( + SummaryOpts{ + Name: "benchmark_summary", + Help: "A summary to benchmark it.", + }, + []string{"one", "two", "three"}, + ) + b.ReportAllocs() + b.ResetTimer() + for i := 0; i < b.N; i++ { + m.WithLabelValues("eins", "zwei", "drei").Observe(3.1415) + } +} + +func BenchmarkSummaryNoLabels(b *testing.B) { + m := NewSummary(SummaryOpts{ + Name: "benchmark_summary", + Help: "A summary to benchmark it.", + }, + ) + b.ReportAllocs() + b.ResetTimer() + for i := 0; i < b.N; i++ { + m.Observe(3.1415) + } +} + +func BenchmarkHistogramWithLabelValues(b *testing.B) { + m := NewHistogramVec( + HistogramOpts{ + Name: "benchmark_histogram", + Help: "A histogram to benchmark it.", + }, + []string{"one", "two", "three"}, + ) + b.ReportAllocs() + b.ResetTimer() + for i := 0; i < b.N; i++ { + m.WithLabelValues("eins", "zwei", "drei").Observe(3.1415) + } +} + +func BenchmarkHistogramNoLabels(b *testing.B) { + m := NewHistogram(HistogramOpts{ + Name: "benchmark_histogram", + Help: "A histogram to benchmark it.", + }, + ) + b.ReportAllocs() + b.ResetTimer() + for i := 0; i < b.N; i++ { + m.Observe(3.1415) + } +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/counter.go b/vendor/github.com/prometheus/client_golang/prometheus/counter.go index 72d5256a5..ee37949ad 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/counter.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/counter.go @@ -30,8 +30,16 @@ type Counter interface { Metric Collector - // Inc increments the counter by 1. Use Add to increment it by arbitrary - // non-negative values. + // Set is used to set the Counter to an arbitrary value. It is only used + // if you have to transfer a value from an external counter into this + // Prometheus metric. Do not use it for regular handling of a + // Prometheus counter (as it can be used to break the contract of + // monotonically increasing values). + // + // Deprecated: Use NewConstMetric to create a counter for an external + // value. A Counter should never be set. + Set(float64) + // Inc increments the counter by 1. Inc() // Add adds the given value to the counter. It panics if the value is < // 0. diff --git a/vendor/github.com/prometheus/client_golang/prometheus/counter_test.go b/vendor/github.com/prometheus/client_golang/prometheus/counter_test.go new file mode 100644 index 000000000..67391a23a --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/counter_test.go @@ -0,0 +1,58 @@ +// Copyright 2014 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package prometheus + +import ( + "math" + "testing" + + dto "github.com/prometheus/client_model/go" +) + +func TestCounterAdd(t *testing.T) { + counter := NewCounter(CounterOpts{ + Name: "test", + Help: "test help", + ConstLabels: Labels{"a": "1", "b": "2"}, + }).(*counter) + counter.Inc() + if expected, got := 1., math.Float64frombits(counter.valBits); expected != got { + t.Errorf("Expected %f, got %f.", expected, got) + } + counter.Add(42) + if expected, got := 43., math.Float64frombits(counter.valBits); expected != got { + t.Errorf("Expected %f, got %f.", expected, got) + } + + if expected, got := "counter cannot decrease in value", decreaseCounter(counter).Error(); expected != got { + t.Errorf("Expected error %q, got %q.", expected, got) + } + + m := &dto.Metric{} + counter.Write(m) + + if expected, got := `label: label: counter: `, m.String(); expected != got { + t.Errorf("expected %q, got %q", expected, got) + } +} + +func decreaseCounter(c *counter) (err error) { + defer func() { + if e := recover(); e != nil { + err = e.(error) + } + }() + c.Add(-1) + return nil +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/desc.go b/vendor/github.com/prometheus/client_golang/prometheus/desc.go index 1835b16f6..77f4b30e8 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/desc.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/desc.go @@ -16,15 +16,20 @@ package prometheus import ( "errors" "fmt" + "regexp" "sort" "strings" "github.com/golang/protobuf/proto" - "github.com/prometheus/common/model" dto "github.com/prometheus/client_model/go" ) +var ( + metricNameRE = regexp.MustCompile(`^[a-zA-Z_][a-zA-Z0-9_:]*$`) + labelNameRE = regexp.MustCompile("^[a-zA-Z_][a-zA-Z0-9_]*$") +) + // reservedLabelPrefix is a prefix which is not legal in user-supplied // label names. const reservedLabelPrefix = "__" @@ -73,7 +78,7 @@ type Desc struct { // Help string. Each Desc with the same fqName must have the same // dimHash. dimHash uint64 - // err is an error that occurred during construction. It is reported on + // err is an error that occured during construction. It is reported on // registration time. err error } @@ -98,7 +103,7 @@ func NewDesc(fqName, help string, variableLabels []string, constLabels Labels) * d.err = errors.New("empty help string") return d } - if !model.IsValidMetricName(model.LabelValue(fqName)) { + if !metricNameRE.MatchString(fqName) { d.err = fmt.Errorf("%q is not a valid metric name", fqName) return d } @@ -195,6 +200,6 @@ func (d *Desc) String() string { } func checkLabelName(l string) bool { - return model.LabelName(l).IsValid() && + return labelNameRE.MatchString(l) && !strings.HasPrefix(l, reservedLabelPrefix) } diff --git a/vendor/github.com/prometheus/client_golang/prometheus/doc.go b/vendor/github.com/prometheus/client_golang/prometheus/doc.go index 278969dc7..b15a2d3b9 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/doc.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/doc.go @@ -17,7 +17,7 @@ // Pushgateway (package push). // // All exported functions and methods are safe to be used concurrently unless -// specified otherwise. +//specified otherwise. // // A Basic Example // @@ -26,7 +26,6 @@ // package main // // import ( -// "log" // "net/http" // // "github.com/prometheus/client_golang/prometheus" @@ -60,7 +59,7 @@ // // The Handler function provides a default handler to expose metrics // // via an HTTP server. "/metrics" is the usual endpoint for that. // http.Handle("/metrics", promhttp.Handler()) -// log.Fatal(http.ListenAndServe(":8080", nil)) +// http.ListenAndServe(":8080", nil) // } // // @@ -70,7 +69,7 @@ // Metrics // // The number of exported identifiers in this package might appear a bit -// overwhelming. However, in addition to the basic plumbing shown in the example +// overwhelming. Hovever, in addition to the basic plumbing shown in the example // above, you only need to understand the different metric types and their // vector versions for basic usage. // @@ -96,8 +95,8 @@ // SummaryVec, HistogramVec, and UntypedVec are not. // // To create instances of Metrics and their vector versions, you need a suitable -// …Opts struct, i.e. GaugeOpts, CounterOpts, SummaryOpts, HistogramOpts, or -// UntypedOpts. +// …Opts struct, i.e. GaugeOpts, CounterOpts, SummaryOpts, +// HistogramOpts, or UntypedOpts. // // Custom Collectors and constant Metrics // @@ -115,8 +114,8 @@ // Metric instances “on the fly” using NewConstMetric, NewConstHistogram, and // NewConstSummary (and their respective Must… versions). That will happen in // the Collect method. The Describe method has to return separate Desc -// instances, representative of the “throw-away” metrics to be created later. -// NewDesc comes in handy to create those Desc instances. +// instances, representative of the “throw-away” metrics to be created +// later. NewDesc comes in handy to create those Desc instances. // // The Collector example illustrates the use case. You can also look at the // source code of the processCollector (mirroring process metrics), the @@ -130,32 +129,32 @@ // Advanced Uses of the Registry // // While MustRegister is the by far most common way of registering a Collector, -// sometimes you might want to handle the errors the registration might cause. -// As suggested by the name, MustRegister panics if an error occurs. With the -// Register function, the error is returned and can be handled. +// sometimes you might want to handle the errors the registration might +// cause. As suggested by the name, MustRegister panics if an error occurs. With +// the Register function, the error is returned and can be handled. // // An error is returned if the registered Collector is incompatible or // inconsistent with already registered metrics. The registry aims for -// consistency of the collected metrics according to the Prometheus data model. -// Inconsistencies are ideally detected at registration time, not at collect -// time. The former will usually be detected at start-up time of a program, -// while the latter will only happen at scrape time, possibly not even on the -// first scrape if the inconsistency only becomes relevant later. That is the -// main reason why a Collector and a Metric have to describe themselves to the -// registry. +// consistency of the collected metrics according to the Prometheus data +// model. Inconsistencies are ideally detected at registration time, not at +// collect time. The former will usually be detected at start-up time of a +// program, while the latter will only happen at scrape time, possibly not even +// on the first scrape if the inconsistency only becomes relevant later. That is +// the main reason why a Collector and a Metric have to describe themselves to +// the registry. // // So far, everything we did operated on the so-called default registry, as it // can be found in the global DefaultRegistry variable. With NewRegistry, you // can create a custom registry, or you can even implement the Registerer or -// Gatherer interfaces yourself. The methods Register and Unregister work in the -// same way on a custom registry as the global functions Register and Unregister -// on the default registry. +// Gatherer interfaces yourself. The methods Register and Unregister work in +// the same way on a custom registry as the global functions Register and +// Unregister on the default registry. // -// There are a number of uses for custom registries: You can use registries with -// special properties, see NewPedanticRegistry. You can avoid global state, as -// it is imposed by the DefaultRegistry. You can use multiple registries at the -// same time to expose different metrics in different ways. You can use separate -// registries for testing purposes. +// There are a number of uses for custom registries: You can use registries +// with special properties, see NewPedanticRegistry. You can avoid global state, +// as it is imposed by the DefaultRegistry. You can use multiple registries at +// the same time to expose different metrics in different ways. You can use +// separate registries for testing purposes. // // Also note that the DefaultRegistry comes registered with a Collector for Go // runtime metrics (via NewGoCollector) and a Collector for process metrics (via @@ -167,20 +166,16 @@ // The Registry implements the Gatherer interface. The caller of the Gather // method can then expose the gathered metrics in some way. Usually, the metrics // are served via HTTP on the /metrics endpoint. That's happening in the example -// above. The tools to expose metrics via HTTP are in the promhttp sub-package. -// (The top-level functions in the prometheus package are deprecated.) +// above. The tools to expose metrics via HTTP are in the promhttp +// sub-package. (The top-level functions in the prometheus package are +// deprecated.) // // Pushing to the Pushgateway // // Function for pushing to the Pushgateway can be found in the push sub-package. // -// Graphite Bridge -// -// Functions and examples to push metrics from a Gatherer to Graphite can be -// found in the graphite sub-package. -// // Other Means of Exposition // -// More ways of exposing metrics can easily be added by following the approaches -// of the existing implementations. +// More ways of exposing metrics can easily be added. Sending metrics to +// Graphite would be an example that will soon be implemented. package prometheus diff --git a/vendor/github.com/prometheus/client_golang/prometheus/example_clustermanager_test.go b/vendor/github.com/prometheus/client_golang/prometheus/example_clustermanager_test.go new file mode 100644 index 000000000..260c1b52d --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/example_clustermanager_test.go @@ -0,0 +1,118 @@ +// Copyright 2014 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package prometheus_test + +import "github.com/prometheus/client_golang/prometheus" + +// ClusterManager is an example for a system that might have been built without +// Prometheus in mind. It models a central manager of jobs running in a +// cluster. To turn it into something that collects Prometheus metrics, we +// simply add the two methods required for the Collector interface. +// +// An additional challenge is that multiple instances of the ClusterManager are +// run within the same binary, each in charge of a different zone. We need to +// make use of ConstLabels to be able to register each ClusterManager instance +// with Prometheus. +type ClusterManager struct { + Zone string + OOMCountDesc *prometheus.Desc + RAMUsageDesc *prometheus.Desc + // ... many more fields +} + +// ReallyExpensiveAssessmentOfTheSystemState is a mock for the data gathering a +// real cluster manager would have to do. Since it may actually be really +// expensive, it must only be called once per collection. This implementation, +// obviously, only returns some made-up data. +func (c *ClusterManager) ReallyExpensiveAssessmentOfTheSystemState() ( + oomCountByHost map[string]int, ramUsageByHost map[string]float64, +) { + // Just example fake data. + oomCountByHost = map[string]int{ + "foo.example.org": 42, + "bar.example.org": 2001, + } + ramUsageByHost = map[string]float64{ + "foo.example.org": 6.023e23, + "bar.example.org": 3.14, + } + return +} + +// Describe simply sends the two Descs in the struct to the channel. +func (c *ClusterManager) Describe(ch chan<- *prometheus.Desc) { + ch <- c.OOMCountDesc + ch <- c.RAMUsageDesc +} + +// Collect first triggers the ReallyExpensiveAssessmentOfTheSystemState. Then it +// creates constant metrics for each host on the fly based on the returned data. +// +// Note that Collect could be called concurrently, so we depend on +// ReallyExpensiveAssessmentOfTheSystemState to be concurrency-safe. +func (c *ClusterManager) Collect(ch chan<- prometheus.Metric) { + oomCountByHost, ramUsageByHost := c.ReallyExpensiveAssessmentOfTheSystemState() + for host, oomCount := range oomCountByHost { + ch <- prometheus.MustNewConstMetric( + c.OOMCountDesc, + prometheus.CounterValue, + float64(oomCount), + host, + ) + } + for host, ramUsage := range ramUsageByHost { + ch <- prometheus.MustNewConstMetric( + c.RAMUsageDesc, + prometheus.GaugeValue, + ramUsage, + host, + ) + } +} + +// NewClusterManager creates the two Descs OOMCountDesc and RAMUsageDesc. Note +// that the zone is set as a ConstLabel. (It's different in each instance of the +// ClusterManager, but constant over the lifetime of an instance.) Then there is +// a variable label "host", since we want to partition the collected metrics by +// host. Since all Descs created in this way are consistent across instances, +// with a guaranteed distinction by the "zone" label, we can register different +// ClusterManager instances with the same registry. +func NewClusterManager(zone string) *ClusterManager { + return &ClusterManager{ + Zone: zone, + OOMCountDesc: prometheus.NewDesc( + "clustermanager_oom_crashes_total", + "Number of OOM crashes.", + []string{"host"}, + prometheus.Labels{"zone": zone}, + ), + RAMUsageDesc: prometheus.NewDesc( + "clustermanager_ram_usage_bytes", + "RAM usage as reported to the cluster manager.", + []string{"host"}, + prometheus.Labels{"zone": zone}, + ), + } +} + +func ExampleCollector() { + workerDB := NewClusterManager("db") + workerCA := NewClusterManager("ca") + + // Since we are dealing with custom Collector implementations, it might + // be a good idea to try it out with a pedantic registry. + reg := prometheus.NewPedanticRegistry() + reg.MustRegister(workerDB) + reg.MustRegister(workerCA) +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/examples_test.go b/vendor/github.com/prometheus/client_golang/prometheus/examples_test.go new file mode 100644 index 000000000..f87f21a8f --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/examples_test.go @@ -0,0 +1,751 @@ +// Copyright 2014 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package prometheus_test + +import ( + "bytes" + "fmt" + "math" + "net/http" + "runtime" + "sort" + "strings" + + dto "github.com/prometheus/client_model/go" + "github.com/prometheus/common/expfmt" + + "github.com/golang/protobuf/proto" + + "github.com/prometheus/client_golang/prometheus" +) + +func ExampleGauge() { + opsQueued := prometheus.NewGauge(prometheus.GaugeOpts{ + Namespace: "our_company", + Subsystem: "blob_storage", + Name: "ops_queued", + Help: "Number of blob storage operations waiting to be processed.", + }) + prometheus.MustRegister(opsQueued) + + // 10 operations queued by the goroutine managing incoming requests. + opsQueued.Add(10) + // A worker goroutine has picked up a waiting operation. + opsQueued.Dec() + // And once more... + opsQueued.Dec() +} + +func ExampleGaugeVec() { + opsQueued := prometheus.NewGaugeVec( + prometheus.GaugeOpts{ + Namespace: "our_company", + Subsystem: "blob_storage", + Name: "ops_queued", + Help: "Number of blob storage operations waiting to be processed, partitioned by user and type.", + }, + []string{ + // Which user has requested the operation? + "user", + // Of what type is the operation? + "type", + }, + ) + prometheus.MustRegister(opsQueued) + + // Increase a value using compact (but order-sensitive!) WithLabelValues(). + opsQueued.WithLabelValues("bob", "put").Add(4) + // Increase a value with a map using WithLabels. More verbose, but order + // doesn't matter anymore. + opsQueued.With(prometheus.Labels{"type": "delete", "user": "alice"}).Inc() +} + +func ExampleGaugeFunc() { + if err := prometheus.Register(prometheus.NewGaugeFunc( + prometheus.GaugeOpts{ + Subsystem: "runtime", + Name: "goroutines_count", + Help: "Number of goroutines that currently exist.", + }, + func() float64 { return float64(runtime.NumGoroutine()) }, + )); err == nil { + fmt.Println("GaugeFunc 'goroutines_count' registered.") + } + // Note that the count of goroutines is a gauge (and not a counter) as + // it can go up and down. + + // Output: + // GaugeFunc 'goroutines_count' registered. +} + +func ExampleCounter() { + pushCounter := prometheus.NewCounter(prometheus.CounterOpts{ + Name: "repository_pushes", // Note: No help string... + }) + err := prometheus.Register(pushCounter) // ... so this will return an error. + if err != nil { + fmt.Println("Push counter couldn't be registered, no counting will happen:", err) + return + } + + // Try it once more, this time with a help string. + pushCounter = prometheus.NewCounter(prometheus.CounterOpts{ + Name: "repository_pushes", + Help: "Number of pushes to external repository.", + }) + err = prometheus.Register(pushCounter) + if err != nil { + fmt.Println("Push counter couldn't be registered AGAIN, no counting will happen:", err) + return + } + + pushComplete := make(chan struct{}) + // TODO: Start a goroutine that performs repository pushes and reports + // each completion via the channel. + for _ = range pushComplete { + pushCounter.Inc() + } + // Output: + // Push counter couldn't be registered, no counting will happen: descriptor Desc{fqName: "repository_pushes", help: "", constLabels: {}, variableLabels: []} is invalid: empty help string +} + +func ExampleCounterVec() { + httpReqs := prometheus.NewCounterVec( + prometheus.CounterOpts{ + Name: "http_requests_total", + Help: "How many HTTP requests processed, partitioned by status code and HTTP method.", + }, + []string{"code", "method"}, + ) + prometheus.MustRegister(httpReqs) + + httpReqs.WithLabelValues("404", "POST").Add(42) + + // If you have to access the same set of labels very frequently, it + // might be good to retrieve the metric only once and keep a handle to + // it. But beware of deletion of that metric, see below! + m := httpReqs.WithLabelValues("200", "GET") + for i := 0; i < 1000000; i++ { + m.Inc() + } + // Delete a metric from the vector. If you have previously kept a handle + // to that metric (as above), future updates via that handle will go + // unseen (even if you re-create a metric with the same label set + // later). + httpReqs.DeleteLabelValues("200", "GET") + // Same thing with the more verbose Labels syntax. + httpReqs.Delete(prometheus.Labels{"method": "GET", "code": "200"}) +} + +func ExampleInstrumentHandler() { + // Handle the "/doc" endpoint with the standard http.FileServer handler. + // By wrapping the handler with InstrumentHandler, request count, + // request and response sizes, and request latency are automatically + // exported to Prometheus, partitioned by HTTP status code and method + // and by the handler name (here "fileserver"). + http.Handle("/doc", prometheus.InstrumentHandler( + "fileserver", http.FileServer(http.Dir("/usr/share/doc")), + )) + // The Prometheus handler still has to be registered to handle the + // "/metrics" endpoint. The handler returned by prometheus.Handler() is + // already instrumented - with "prometheus" as the handler name. In this + // example, we want the handler name to be "metrics", so we instrument + // the uninstrumented Prometheus handler ourselves. + http.Handle("/metrics", prometheus.InstrumentHandler( + "metrics", prometheus.UninstrumentedHandler(), + )) +} + +func ExampleLabelPairSorter() { + labelPairs := []*dto.LabelPair{ + &dto.LabelPair{Name: proto.String("status"), Value: proto.String("404")}, + &dto.LabelPair{Name: proto.String("method"), Value: proto.String("get")}, + } + + sort.Sort(prometheus.LabelPairSorter(labelPairs)) + + fmt.Println(labelPairs) + // Output: + // [name:"method" value:"get" name:"status" value:"404" ] +} + +func ExampleRegister() { + // Imagine you have a worker pool and want to count the tasks completed. + taskCounter := prometheus.NewCounter(prometheus.CounterOpts{ + Subsystem: "worker_pool", + Name: "completed_tasks_total", + Help: "Total number of tasks completed.", + }) + // This will register fine. + if err := prometheus.Register(taskCounter); err != nil { + fmt.Println(err) + } else { + fmt.Println("taskCounter registered.") + } + // Don't forget to tell the HTTP server about the Prometheus handler. + // (In a real program, you still need to start the HTTP server...) + http.Handle("/metrics", prometheus.Handler()) + + // Now you can start workers and give every one of them a pointer to + // taskCounter and let it increment it whenever it completes a task. + taskCounter.Inc() // This has to happen somewhere in the worker code. + + // But wait, you want to see how individual workers perform. So you need + // a vector of counters, with one element for each worker. + taskCounterVec := prometheus.NewCounterVec( + prometheus.CounterOpts{ + Subsystem: "worker_pool", + Name: "completed_tasks_total", + Help: "Total number of tasks completed.", + }, + []string{"worker_id"}, + ) + + // Registering will fail because we already have a metric of that name. + if err := prometheus.Register(taskCounterVec); err != nil { + fmt.Println("taskCounterVec not registered:", err) + } else { + fmt.Println("taskCounterVec registered.") + } + + // To fix, first unregister the old taskCounter. + if prometheus.Unregister(taskCounter) { + fmt.Println("taskCounter unregistered.") + } + + // Try registering taskCounterVec again. + if err := prometheus.Register(taskCounterVec); err != nil { + fmt.Println("taskCounterVec not registered:", err) + } else { + fmt.Println("taskCounterVec registered.") + } + // Bummer! Still doesn't work. + + // Prometheus will not allow you to ever export metrics with + // inconsistent help strings or label names. After unregistering, the + // unregistered metrics will cease to show up in the /metrics HTTP + // response, but the registry still remembers that those metrics had + // been exported before. For this example, we will now choose a + // different name. (In a real program, you would obviously not export + // the obsolete metric in the first place.) + taskCounterVec = prometheus.NewCounterVec( + prometheus.CounterOpts{ + Subsystem: "worker_pool", + Name: "completed_tasks_by_id", + Help: "Total number of tasks completed.", + }, + []string{"worker_id"}, + ) + if err := prometheus.Register(taskCounterVec); err != nil { + fmt.Println("taskCounterVec not registered:", err) + } else { + fmt.Println("taskCounterVec registered.") + } + // Finally it worked! + + // The workers have to tell taskCounterVec their id to increment the + // right element in the metric vector. + taskCounterVec.WithLabelValues("42").Inc() // Code from worker 42. + + // Each worker could also keep a reference to their own counter element + // around. Pick the counter at initialization time of the worker. + myCounter := taskCounterVec.WithLabelValues("42") // From worker 42 initialization code. + myCounter.Inc() // Somewhere in the code of that worker. + + // Note that something like WithLabelValues("42", "spurious arg") would + // panic (because you have provided too many label values). If you want + // to get an error instead, use GetMetricWithLabelValues(...) instead. + notMyCounter, err := taskCounterVec.GetMetricWithLabelValues("42", "spurious arg") + if err != nil { + fmt.Println("Worker initialization failed:", err) + } + if notMyCounter == nil { + fmt.Println("notMyCounter is nil.") + } + + // A different (and somewhat tricky) approach is to use + // ConstLabels. ConstLabels are pairs of label names and label values + // that never change. You might ask what those labels are good for (and + // rightfully so - if they never change, they could as well be part of + // the metric name). There are essentially two use-cases: The first is + // if labels are constant throughout the lifetime of a binary execution, + // but they vary over time or between different instances of a running + // binary. The second is what we have here: Each worker creates and + // registers an own Counter instance where the only difference is in the + // value of the ConstLabels. Those Counters can all be registered + // because the different ConstLabel values guarantee that each worker + // will increment a different Counter metric. + counterOpts := prometheus.CounterOpts{ + Subsystem: "worker_pool", + Name: "completed_tasks", + Help: "Total number of tasks completed.", + ConstLabels: prometheus.Labels{"worker_id": "42"}, + } + taskCounterForWorker42 := prometheus.NewCounter(counterOpts) + if err := prometheus.Register(taskCounterForWorker42); err != nil { + fmt.Println("taskCounterVForWorker42 not registered:", err) + } else { + fmt.Println("taskCounterForWorker42 registered.") + } + // Obviously, in real code, taskCounterForWorker42 would be a member + // variable of a worker struct, and the "42" would be retrieved with a + // GetId() method or something. The Counter would be created and + // registered in the initialization code of the worker. + + // For the creation of the next Counter, we can recycle + // counterOpts. Just change the ConstLabels. + counterOpts.ConstLabels = prometheus.Labels{"worker_id": "2001"} + taskCounterForWorker2001 := prometheus.NewCounter(counterOpts) + if err := prometheus.Register(taskCounterForWorker2001); err != nil { + fmt.Println("taskCounterVForWorker2001 not registered:", err) + } else { + fmt.Println("taskCounterForWorker2001 registered.") + } + + taskCounterForWorker2001.Inc() + taskCounterForWorker42.Inc() + taskCounterForWorker2001.Inc() + + // Yet another approach would be to turn the workers themselves into + // Collectors and register them. See the Collector example for details. + + // Output: + // taskCounter registered. + // taskCounterVec not registered: a previously registered descriptor with the same fully-qualified name as Desc{fqName: "worker_pool_completed_tasks_total", help: "Total number of tasks completed.", constLabels: {}, variableLabels: [worker_id]} has different label names or a different help string + // taskCounter unregistered. + // taskCounterVec not registered: a previously registered descriptor with the same fully-qualified name as Desc{fqName: "worker_pool_completed_tasks_total", help: "Total number of tasks completed.", constLabels: {}, variableLabels: [worker_id]} has different label names or a different help string + // taskCounterVec registered. + // Worker initialization failed: inconsistent label cardinality + // notMyCounter is nil. + // taskCounterForWorker42 registered. + // taskCounterForWorker2001 registered. +} + +func ExampleSummary() { + temps := prometheus.NewSummary(prometheus.SummaryOpts{ + Name: "pond_temperature_celsius", + Help: "The temperature of the frog pond.", // Sorry, we can't measure how badly it smells. + }) + + // Simulate some observations. + for i := 0; i < 1000; i++ { + temps.Observe(30 + math.Floor(120*math.Sin(float64(i)*0.1))/10) + } + + // Just for demonstration, let's check the state of the summary by + // (ab)using its Write method (which is usually only used by Prometheus + // internally). + metric := &dto.Metric{} + temps.Write(metric) + fmt.Println(proto.MarshalTextString(metric)) + + // Output: + // summary: < + // sample_count: 1000 + // sample_sum: 29969.50000000001 + // quantile: < + // quantile: 0.5 + // value: 31.1 + // > + // quantile: < + // quantile: 0.9 + // value: 41.3 + // > + // quantile: < + // quantile: 0.99 + // value: 41.9 + // > + // > +} + +func ExampleSummaryVec() { + temps := prometheus.NewSummaryVec( + prometheus.SummaryOpts{ + Name: "pond_temperature_celsius", + Help: "The temperature of the frog pond.", // Sorry, we can't measure how badly it smells. + }, + []string{"species"}, + ) + + // Simulate some observations. + for i := 0; i < 1000; i++ { + temps.WithLabelValues("litoria-caerulea").Observe(30 + math.Floor(120*math.Sin(float64(i)*0.1))/10) + temps.WithLabelValues("lithobates-catesbeianus").Observe(32 + math.Floor(100*math.Cos(float64(i)*0.11))/10) + } + + // Create a Summary without any observations. + temps.WithLabelValues("leiopelma-hochstetteri") + + // Just for demonstration, let's check the state of the summary vector + // by registering it with a custom registry and then let it collect the + // metrics. + reg := prometheus.NewRegistry() + reg.MustRegister(temps) + + metricFamilies, err := reg.Gather() + if err != nil || len(metricFamilies) != 1 { + panic("unexpected behavior of custom test registry") + } + fmt.Println(proto.MarshalTextString(metricFamilies[0])) + + // Output: + // name: "pond_temperature_celsius" + // help: "The temperature of the frog pond." + // type: SUMMARY + // metric: < + // label: < + // name: "species" + // value: "leiopelma-hochstetteri" + // > + // summary: < + // sample_count: 0 + // sample_sum: 0 + // quantile: < + // quantile: 0.5 + // value: nan + // > + // quantile: < + // quantile: 0.9 + // value: nan + // > + // quantile: < + // quantile: 0.99 + // value: nan + // > + // > + // > + // metric: < + // label: < + // name: "species" + // value: "lithobates-catesbeianus" + // > + // summary: < + // sample_count: 1000 + // sample_sum: 31956.100000000017 + // quantile: < + // quantile: 0.5 + // value: 32.4 + // > + // quantile: < + // quantile: 0.9 + // value: 41.4 + // > + // quantile: < + // quantile: 0.99 + // value: 41.9 + // > + // > + // > + // metric: < + // label: < + // name: "species" + // value: "litoria-caerulea" + // > + // summary: < + // sample_count: 1000 + // sample_sum: 29969.50000000001 + // quantile: < + // quantile: 0.5 + // value: 31.1 + // > + // quantile: < + // quantile: 0.9 + // value: 41.3 + // > + // quantile: < + // quantile: 0.99 + // value: 41.9 + // > + // > + // > +} + +func ExampleNewConstSummary() { + desc := prometheus.NewDesc( + "http_request_duration_seconds", + "A summary of the HTTP request durations.", + []string{"code", "method"}, + prometheus.Labels{"owner": "example"}, + ) + + // Create a constant summary from values we got from a 3rd party telemetry system. + s := prometheus.MustNewConstSummary( + desc, + 4711, 403.34, + map[float64]float64{0.5: 42.3, 0.9: 323.3}, + "200", "get", + ) + + // Just for demonstration, let's check the state of the summary by + // (ab)using its Write method (which is usually only used by Prometheus + // internally). + metric := &dto.Metric{} + s.Write(metric) + fmt.Println(proto.MarshalTextString(metric)) + + // Output: + // label: < + // name: "code" + // value: "200" + // > + // label: < + // name: "method" + // value: "get" + // > + // label: < + // name: "owner" + // value: "example" + // > + // summary: < + // sample_count: 4711 + // sample_sum: 403.34 + // quantile: < + // quantile: 0.5 + // value: 42.3 + // > + // quantile: < + // quantile: 0.9 + // value: 323.3 + // > + // > +} + +func ExampleHistogram() { + temps := prometheus.NewHistogram(prometheus.HistogramOpts{ + Name: "pond_temperature_celsius", + Help: "The temperature of the frog pond.", // Sorry, we can't measure how badly it smells. + Buckets: prometheus.LinearBuckets(20, 5, 5), // 5 buckets, each 5 centigrade wide. + }) + + // Simulate some observations. + for i := 0; i < 1000; i++ { + temps.Observe(30 + math.Floor(120*math.Sin(float64(i)*0.1))/10) + } + + // Just for demonstration, let's check the state of the histogram by + // (ab)using its Write method (which is usually only used by Prometheus + // internally). + metric := &dto.Metric{} + temps.Write(metric) + fmt.Println(proto.MarshalTextString(metric)) + + // Output: + // histogram: < + // sample_count: 1000 + // sample_sum: 29969.50000000001 + // bucket: < + // cumulative_count: 192 + // upper_bound: 20 + // > + // bucket: < + // cumulative_count: 366 + // upper_bound: 25 + // > + // bucket: < + // cumulative_count: 501 + // upper_bound: 30 + // > + // bucket: < + // cumulative_count: 638 + // upper_bound: 35 + // > + // bucket: < + // cumulative_count: 816 + // upper_bound: 40 + // > + // > +} + +func ExampleNewConstHistogram() { + desc := prometheus.NewDesc( + "http_request_duration_seconds", + "A histogram of the HTTP request durations.", + []string{"code", "method"}, + prometheus.Labels{"owner": "example"}, + ) + + // Create a constant histogram from values we got from a 3rd party telemetry system. + h := prometheus.MustNewConstHistogram( + desc, + 4711, 403.34, + map[float64]uint64{25: 121, 50: 2403, 100: 3221, 200: 4233}, + "200", "get", + ) + + // Just for demonstration, let's check the state of the histogram by + // (ab)using its Write method (which is usually only used by Prometheus + // internally). + metric := &dto.Metric{} + h.Write(metric) + fmt.Println(proto.MarshalTextString(metric)) + + // Output: + // label: < + // name: "code" + // value: "200" + // > + // label: < + // name: "method" + // value: "get" + // > + // label: < + // name: "owner" + // value: "example" + // > + // histogram: < + // sample_count: 4711 + // sample_sum: 403.34 + // bucket: < + // cumulative_count: 121 + // upper_bound: 25 + // > + // bucket: < + // cumulative_count: 2403 + // upper_bound: 50 + // > + // bucket: < + // cumulative_count: 3221 + // upper_bound: 100 + // > + // bucket: < + // cumulative_count: 4233 + // upper_bound: 200 + // > + // > +} + +func ExampleAlreadyRegisteredError() { + reqCounter := prometheus.NewCounter(prometheus.CounterOpts{ + Name: "requests_total", + Help: "The total number of requests served.", + }) + if err := prometheus.Register(reqCounter); err != nil { + if are, ok := err.(prometheus.AlreadyRegisteredError); ok { + // A counter for that metric has been registered before. + // Use the old counter from now on. + reqCounter = are.ExistingCollector.(prometheus.Counter) + } else { + // Something else went wrong! + panic(err) + } + } +} + +func ExampleGatherers() { + reg := prometheus.NewRegistry() + temp := prometheus.NewGaugeVec( + prometheus.GaugeOpts{ + Name: "temperature_kelvin", + Help: "Temperature in Kelvin.", + }, + []string{"location"}, + ) + reg.MustRegister(temp) + temp.WithLabelValues("outside").Set(273.14) + temp.WithLabelValues("inside").Set(298.44) + + var parser expfmt.TextParser + + text := ` +# TYPE humidity_percent gauge +# HELP humidity_percent Humidity in %. +humidity_percent{location="outside"} 45.4 +humidity_percent{location="inside"} 33.2 +# TYPE temperature_kelvin gauge +# HELP temperature_kelvin Temperature in Kelvin. +temperature_kelvin{location="somewhere else"} 4.5 +` + + parseText := func() ([]*dto.MetricFamily, error) { + parsed, err := parser.TextToMetricFamilies(strings.NewReader(text)) + if err != nil { + return nil, err + } + var result []*dto.MetricFamily + for _, mf := range parsed { + result = append(result, mf) + } + return result, nil + } + + gatherers := prometheus.Gatherers{ + reg, + prometheus.GathererFunc(parseText), + } + + gathering, err := gatherers.Gather() + if err != nil { + fmt.Println(err) + } + + out := &bytes.Buffer{} + for _, mf := range gathering { + if _, err := expfmt.MetricFamilyToText(out, mf); err != nil { + panic(err) + } + } + fmt.Print(out.String()) + fmt.Println("----------") + + // Note how the temperature_kelvin metric family has been merged from + // different sources. Now try + text = ` +# TYPE humidity_percent gauge +# HELP humidity_percent Humidity in %. +humidity_percent{location="outside"} 45.4 +humidity_percent{location="inside"} 33.2 +# TYPE temperature_kelvin gauge +# HELP temperature_kelvin Temperature in Kelvin. +# Duplicate metric: +temperature_kelvin{location="outside"} 265.3 + # Wrong labels: +temperature_kelvin 4.5 +` + + gathering, err = gatherers.Gather() + if err != nil { + fmt.Println(err) + } + // Note that still as many metrics as possible are returned: + out.Reset() + for _, mf := range gathering { + if _, err := expfmt.MetricFamilyToText(out, mf); err != nil { + panic(err) + } + } + fmt.Print(out.String()) + + // Output: + // # HELP humidity_percent Humidity in %. + // # TYPE humidity_percent gauge + // humidity_percent{location="inside"} 33.2 + // humidity_percent{location="outside"} 45.4 + // # HELP temperature_kelvin Temperature in Kelvin. + // # TYPE temperature_kelvin gauge + // temperature_kelvin{location="inside"} 298.44 + // temperature_kelvin{location="outside"} 273.14 + // temperature_kelvin{location="somewhere else"} 4.5 + // ---------- + // 2 error(s) occurred: + // * collected metric temperature_kelvin label: gauge: was collected before with the same name and label values + // * collected metric temperature_kelvin gauge: has label dimensions inconsistent with previously collected metrics in the same metric family + // # HELP humidity_percent Humidity in %. + // # TYPE humidity_percent gauge + // humidity_percent{location="inside"} 33.2 + // humidity_percent{location="outside"} 45.4 + // # HELP temperature_kelvin Temperature in Kelvin. + // # TYPE temperature_kelvin gauge + // temperature_kelvin{location="inside"} 298.44 + // temperature_kelvin{location="outside"} 273.14 +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/expvar_collector_test.go b/vendor/github.com/prometheus/client_golang/prometheus/expvar_collector_test.go new file mode 100644 index 000000000..5d3128fae --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/expvar_collector_test.go @@ -0,0 +1,97 @@ +// Copyright 2014 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package prometheus_test + +import ( + "expvar" + "fmt" + "sort" + "strings" + + dto "github.com/prometheus/client_model/go" + + "github.com/prometheus/client_golang/prometheus" +) + +func ExampleExpvarCollector() { + expvarCollector := prometheus.NewExpvarCollector(map[string]*prometheus.Desc{ + "memstats": prometheus.NewDesc( + "expvar_memstats", + "All numeric memstats as one metric family. Not a good role-model, actually... ;-)", + []string{"type"}, nil, + ), + "lone-int": prometheus.NewDesc( + "expvar_lone_int", + "Just an expvar int as an example.", + nil, nil, + ), + "http-request-map": prometheus.NewDesc( + "expvar_http_request_total", + "How many http requests processed, partitioned by status code and http method.", + []string{"code", "method"}, nil, + ), + }) + prometheus.MustRegister(expvarCollector) + + // The Prometheus part is done here. But to show that this example is + // doing anything, we have to manually export something via expvar. In + // real-life use-cases, some library would already have exported via + // expvar what we want to re-export as Prometheus metrics. + expvar.NewInt("lone-int").Set(42) + expvarMap := expvar.NewMap("http-request-map") + var ( + expvarMap1, expvarMap2 expvar.Map + expvarInt11, expvarInt12, expvarInt21, expvarInt22 expvar.Int + ) + expvarMap1.Init() + expvarMap2.Init() + expvarInt11.Set(3) + expvarInt12.Set(13) + expvarInt21.Set(11) + expvarInt22.Set(212) + expvarMap1.Set("POST", &expvarInt11) + expvarMap1.Set("GET", &expvarInt12) + expvarMap2.Set("POST", &expvarInt21) + expvarMap2.Set("GET", &expvarInt22) + expvarMap.Set("404", &expvarMap1) + expvarMap.Set("200", &expvarMap2) + // Results in the following expvar map: + // "http-request-count": {"200": {"POST": 11, "GET": 212}, "404": {"POST": 3, "GET": 13}} + + // Let's see what the scrape would yield, but exclude the memstats metrics. + metricStrings := []string{} + metric := dto.Metric{} + metricChan := make(chan prometheus.Metric) + go func() { + expvarCollector.Collect(metricChan) + close(metricChan) + }() + for m := range metricChan { + if strings.Index(m.Desc().String(), "expvar_memstats") == -1 { + metric.Reset() + m.Write(&metric) + metricStrings = append(metricStrings, metric.String()) + } + } + sort.Strings(metricStrings) + for _, s := range metricStrings { + fmt.Println(strings.TrimRight(s, " ")) + } + // Output: + // label: label: untyped: + // label: label: untyped: + // label: label: untyped: + // label: label: untyped: + // untyped: +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/gauge.go b/vendor/github.com/prometheus/client_golang/prometheus/gauge.go index 9ab5a3d62..8b70e5141 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/gauge.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/gauge.go @@ -27,21 +27,16 @@ type Gauge interface { // Set sets the Gauge to an arbitrary value. Set(float64) - // Inc increments the Gauge by 1. Use Add to increment it by arbitrary - // values. + // Inc increments the Gauge by 1. Inc() - // Dec decrements the Gauge by 1. Use Sub to decrement it by arbitrary - // values. + // Dec decrements the Gauge by 1. Dec() - // Add adds the given value to the Gauge. (The value can be negative, - // resulting in a decrease of the Gauge.) + // Add adds the given value to the Gauge. (The value can be + // negative, resulting in a decrease of the Gauge.) Add(float64) // Sub subtracts the given value from the Gauge. (The value can be // negative, resulting in an increase of the Gauge.) Sub(float64) - - // SetToCurrentTime sets the Gauge to the current Unix time in seconds. - SetToCurrentTime() } // GaugeOpts is an alias for Opts. See there for doc comments. diff --git a/vendor/github.com/prometheus/client_golang/prometheus/gauge_test.go b/vendor/github.com/prometheus/client_golang/prometheus/gauge_test.go new file mode 100644 index 000000000..48cab4636 --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/gauge_test.go @@ -0,0 +1,182 @@ +// Copyright 2014 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package prometheus + +import ( + "math" + "math/rand" + "sync" + "testing" + "testing/quick" + + dto "github.com/prometheus/client_model/go" +) + +func listenGaugeStream(vals, result chan float64, done chan struct{}) { + var sum float64 +outer: + for { + select { + case <-done: + close(vals) + for v := range vals { + sum += v + } + break outer + case v := <-vals: + sum += v + } + } + result <- sum + close(result) +} + +func TestGaugeConcurrency(t *testing.T) { + it := func(n uint32) bool { + mutations := int(n % 10000) + concLevel := int(n%15 + 1) + + var start, end sync.WaitGroup + start.Add(1) + end.Add(concLevel) + + sStream := make(chan float64, mutations*concLevel) + result := make(chan float64) + done := make(chan struct{}) + + go listenGaugeStream(sStream, result, done) + go func() { + end.Wait() + close(done) + }() + + gge := NewGauge(GaugeOpts{ + Name: "test_gauge", + Help: "no help can be found here", + }) + for i := 0; i < concLevel; i++ { + vals := make([]float64, mutations) + for j := 0; j < mutations; j++ { + vals[j] = rand.Float64() - 0.5 + } + + go func(vals []float64) { + start.Wait() + for _, v := range vals { + sStream <- v + gge.Add(v) + } + end.Done() + }(vals) + } + start.Done() + + if expected, got := <-result, math.Float64frombits(gge.(*value).valBits); math.Abs(expected-got) > 0.000001 { + t.Fatalf("expected approx. %f, got %f", expected, got) + return false + } + return true + } + + if err := quick.Check(it, nil); err != nil { + t.Fatal(err) + } +} + +func TestGaugeVecConcurrency(t *testing.T) { + it := func(n uint32) bool { + mutations := int(n % 10000) + concLevel := int(n%15 + 1) + vecLength := int(n%5 + 1) + + var start, end sync.WaitGroup + start.Add(1) + end.Add(concLevel) + + sStreams := make([]chan float64, vecLength) + results := make([]chan float64, vecLength) + done := make(chan struct{}) + + for i := 0; i < vecLength; i++ { + sStreams[i] = make(chan float64, mutations*concLevel) + results[i] = make(chan float64) + go listenGaugeStream(sStreams[i], results[i], done) + } + + go func() { + end.Wait() + close(done) + }() + + gge := NewGaugeVec( + GaugeOpts{ + Name: "test_gauge", + Help: "no help can be found here", + }, + []string{"label"}, + ) + for i := 0; i < concLevel; i++ { + vals := make([]float64, mutations) + pick := make([]int, mutations) + for j := 0; j < mutations; j++ { + vals[j] = rand.Float64() - 0.5 + pick[j] = rand.Intn(vecLength) + } + + go func(vals []float64) { + start.Wait() + for i, v := range vals { + sStreams[pick[i]] <- v + gge.WithLabelValues(string('A' + pick[i])).Add(v) + } + end.Done() + }(vals) + } + start.Done() + + for i := range sStreams { + if expected, got := <-results[i], math.Float64frombits(gge.WithLabelValues(string('A'+i)).(*value).valBits); math.Abs(expected-got) > 0.000001 { + t.Fatalf("expected approx. %f, got %f", expected, got) + return false + } + } + return true + } + + if err := quick.Check(it, nil); err != nil { + t.Fatal(err) + } +} + +func TestGaugeFunc(t *testing.T) { + gf := NewGaugeFunc( + GaugeOpts{ + Name: "test_name", + Help: "test help", + ConstLabels: Labels{"a": "1", "b": "2"}, + }, + func() float64 { return 3.1415 }, + ) + + if expected, got := `Desc{fqName: "test_name", help: "test help", constLabels: {a="1",b="2"}, variableLabels: []}`, gf.Desc().String(); expected != got { + t.Errorf("expected %q, got %q", expected, got) + } + + m := &dto.Metric{} + gf.Write(m) + + if expected, got := `label: label: gauge: `, m.String(); expected != got { + t.Errorf("expected %q, got %q", expected, got) + } +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/go_collector.go b/vendor/github.com/prometheus/client_golang/prometheus/go_collector.go index f96764559..abc9d4ec4 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/go_collector.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/go_collector.go @@ -8,9 +8,8 @@ import ( ) type goCollector struct { - goroutinesDesc *Desc - threadsDesc *Desc - gcDesc *Desc + goroutines Gauge + gcDesc *Desc // metrics to describe and collect metrics memStatsMetrics @@ -20,14 +19,11 @@ type goCollector struct { // go process. func NewGoCollector() Collector { return &goCollector{ - goroutinesDesc: NewDesc( - "go_goroutines", - "Number of goroutines that currently exist.", - nil, nil), - threadsDesc: NewDesc( - "go_threads", - "Number of OS threads created", - nil, nil), + goroutines: NewGauge(GaugeOpts{ + Namespace: "go", + Name: "goroutines", + Help: "Number of goroutines that currently exist.", + }), gcDesc: NewDesc( "go_gc_duration_seconds", "A summary of the GC invocation durations.", @@ -52,7 +48,7 @@ func NewGoCollector() Collector { }, { desc: NewDesc( memstatNamespace("sys_bytes"), - "Number of bytes obtained from system.", + "Number of bytes obtained by system. Sum of all system allocations.", nil, nil, ), eval: func(ms *runtime.MemStats) float64 { return float64(ms.Sys) }, @@ -115,12 +111,12 @@ func NewGoCollector() Collector { valType: GaugeValue, }, { desc: NewDesc( - memstatNamespace("heap_released_bytes"), - "Number of heap bytes released to OS.", + memstatNamespace("heap_released_bytes_total"), + "Total number of heap bytes released to OS.", nil, nil, ), eval: func(ms *runtime.MemStats) float64 { return float64(ms.HeapReleased) }, - valType: GaugeValue, + valType: CounterValue, }, { desc: NewDesc( memstatNamespace("heap_objects"), @@ -217,14 +213,6 @@ func NewGoCollector() Collector { ), eval: func(ms *runtime.MemStats) float64 { return float64(ms.LastGC) / 1e9 }, valType: GaugeValue, - }, { - desc: NewDesc( - memstatNamespace("gc_cpu_fraction"), - "The fraction of this program's available CPU time used by the GC since the program started.", - nil, nil, - ), - eval: func(ms *runtime.MemStats) float64 { return ms.GCCPUFraction }, - valType: GaugeValue, }, }, } @@ -236,9 +224,9 @@ func memstatNamespace(s string) string { // Describe returns all descriptions of the collector. func (c *goCollector) Describe(ch chan<- *Desc) { - ch <- c.goroutinesDesc - ch <- c.threadsDesc + ch <- c.goroutines.Desc() ch <- c.gcDesc + for _, i := range c.metrics { ch <- i.desc } @@ -246,9 +234,8 @@ func (c *goCollector) Describe(ch chan<- *Desc) { // Collect returns the current state of all metrics of the collector. func (c *goCollector) Collect(ch chan<- Metric) { - ch <- MustNewConstMetric(c.goroutinesDesc, GaugeValue, float64(runtime.NumGoroutine())) - n, _ := runtime.ThreadCreateProfile(nil) - ch <- MustNewConstMetric(c.threadsDesc, GaugeValue, float64(n)) + c.goroutines.Set(float64(runtime.NumGoroutine())) + ch <- c.goroutines var stats debug.GCStats stats.PauseQuantiles = make([]time.Duration, 5) diff --git a/vendor/github.com/prometheus/client_golang/prometheus/go_collector_test.go b/vendor/github.com/prometheus/client_golang/prometheus/go_collector_test.go new file mode 100644 index 000000000..9a8858cbd --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/go_collector_test.go @@ -0,0 +1,123 @@ +package prometheus + +import ( + "runtime" + "testing" + "time" + + dto "github.com/prometheus/client_model/go" +) + +func TestGoCollector(t *testing.T) { + var ( + c = NewGoCollector() + ch = make(chan Metric) + waitc = make(chan struct{}) + closec = make(chan struct{}) + old = -1 + ) + defer close(closec) + + go func() { + c.Collect(ch) + go func(c <-chan struct{}) { + <-c + }(closec) + <-waitc + c.Collect(ch) + }() + + for { + select { + case metric := <-ch: + switch m := metric.(type) { + // Attention, this also catches Counter... + case Gauge: + pb := &dto.Metric{} + m.Write(pb) + if pb.GetGauge() == nil { + continue + } + + if old == -1 { + old = int(pb.GetGauge().GetValue()) + close(waitc) + continue + } + + if diff := int(pb.GetGauge().GetValue()) - old; diff != 1 { + // TODO: This is flaky in highly concurrent situations. + t.Errorf("want 1 new goroutine, got %d", diff) + } + + // GoCollector performs two sends per call. + // On line 27 we need to receive the second send + // to shut down cleanly. + <-ch + return + } + case <-time.After(1 * time.Second): + t.Fatalf("expected collect timed out") + } + } +} + +func TestGCCollector(t *testing.T) { + var ( + c = NewGoCollector() + ch = make(chan Metric) + waitc = make(chan struct{}) + closec = make(chan struct{}) + oldGC uint64 + oldPause float64 + ) + defer close(closec) + + go func() { + c.Collect(ch) + // force GC + runtime.GC() + <-waitc + c.Collect(ch) + }() + + first := true + for { + select { + case metric := <-ch: + switch m := metric.(type) { + case *constSummary, *value: + pb := &dto.Metric{} + m.Write(pb) + if pb.GetSummary() == nil { + continue + } + + if len(pb.GetSummary().Quantile) != 5 { + t.Errorf("expected 4 buckets, got %d", len(pb.GetSummary().Quantile)) + } + for idx, want := range []float64{0.0, 0.25, 0.5, 0.75, 1.0} { + if *pb.GetSummary().Quantile[idx].Quantile != want { + t.Errorf("bucket #%d is off, got %f, want %f", idx, *pb.GetSummary().Quantile[idx].Quantile, want) + } + } + if first { + first = false + oldGC = *pb.GetSummary().SampleCount + oldPause = *pb.GetSummary().SampleSum + close(waitc) + continue + } + if diff := *pb.GetSummary().SampleCount - oldGC; diff != 1 { + t.Errorf("want 1 new garbage collection run, got %d", diff) + } + if diff := *pb.GetSummary().SampleSum - oldPause; diff <= 0 { + t.Errorf("want moar pause, got %f", diff) + } + return + } + case <-time.After(1 * time.Second): + t.Fatalf("expected collect timed out") + } + } +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/histogram.go b/vendor/github.com/prometheus/client_golang/prometheus/histogram.go index f46eff6ac..9719e8fac 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/histogram.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/histogram.go @@ -308,23 +308,23 @@ func NewHistogramVec(opts HistogramOpts, labelNames []string) *HistogramVec { } // GetMetricWithLabelValues replaces the method of the same name in -// MetricVec. The difference is that this method returns an Observer and not a -// Metric so that no type conversion to an Observer is required. -func (m *HistogramVec) GetMetricWithLabelValues(lvs ...string) (Observer, error) { +// MetricVec. The difference is that this method returns a Histogram and not a +// Metric so that no type conversion is required. +func (m *HistogramVec) GetMetricWithLabelValues(lvs ...string) (Histogram, error) { metric, err := m.MetricVec.GetMetricWithLabelValues(lvs...) if metric != nil { - return metric.(Observer), err + return metric.(Histogram), err } return nil, err } // GetMetricWith replaces the method of the same name in MetricVec. The -// difference is that this method returns an Observer and not a Metric so that no -// type conversion to an Observer is required. -func (m *HistogramVec) GetMetricWith(labels Labels) (Observer, error) { +// difference is that this method returns a Histogram and not a Metric so that no +// type conversion is required. +func (m *HistogramVec) GetMetricWith(labels Labels) (Histogram, error) { metric, err := m.MetricVec.GetMetricWith(labels) if metric != nil { - return metric.(Observer), err + return metric.(Histogram), err } return nil, err } @@ -333,15 +333,15 @@ func (m *HistogramVec) GetMetricWith(labels Labels) (Observer, error) { // GetMetricWithLabelValues would have returned an error. By not returning an // error, WithLabelValues allows shortcuts like // myVec.WithLabelValues("404", "GET").Observe(42.21) -func (m *HistogramVec) WithLabelValues(lvs ...string) Observer { - return m.MetricVec.WithLabelValues(lvs...).(Observer) +func (m *HistogramVec) WithLabelValues(lvs ...string) Histogram { + return m.MetricVec.WithLabelValues(lvs...).(Histogram) } // With works as GetMetricWith, but panics where GetMetricWithLabels would have // returned an error. By not returning an error, With allows shortcuts like // myVec.With(Labels{"code": "404", "method": "GET"}).Observe(42.21) -func (m *HistogramVec) With(labels Labels) Observer { - return m.MetricVec.With(labels).(Observer) +func (m *HistogramVec) With(labels Labels) Histogram { + return m.MetricVec.With(labels).(Histogram) } type constHistogram struct { diff --git a/vendor/github.com/prometheus/client_golang/prometheus/histogram_test.go b/vendor/github.com/prometheus/client_golang/prometheus/histogram_test.go new file mode 100644 index 000000000..d1242e08d --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/histogram_test.go @@ -0,0 +1,326 @@ +// Copyright 2015 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package prometheus + +import ( + "math" + "math/rand" + "reflect" + "sort" + "sync" + "testing" + "testing/quick" + + dto "github.com/prometheus/client_model/go" +) + +func benchmarkHistogramObserve(w int, b *testing.B) { + b.StopTimer() + + wg := new(sync.WaitGroup) + wg.Add(w) + + g := new(sync.WaitGroup) + g.Add(1) + + s := NewHistogram(HistogramOpts{}) + + for i := 0; i < w; i++ { + go func() { + g.Wait() + + for i := 0; i < b.N; i++ { + s.Observe(float64(i)) + } + + wg.Done() + }() + } + + b.StartTimer() + g.Done() + wg.Wait() +} + +func BenchmarkHistogramObserve1(b *testing.B) { + benchmarkHistogramObserve(1, b) +} + +func BenchmarkHistogramObserve2(b *testing.B) { + benchmarkHistogramObserve(2, b) +} + +func BenchmarkHistogramObserve4(b *testing.B) { + benchmarkHistogramObserve(4, b) +} + +func BenchmarkHistogramObserve8(b *testing.B) { + benchmarkHistogramObserve(8, b) +} + +func benchmarkHistogramWrite(w int, b *testing.B) { + b.StopTimer() + + wg := new(sync.WaitGroup) + wg.Add(w) + + g := new(sync.WaitGroup) + g.Add(1) + + s := NewHistogram(HistogramOpts{}) + + for i := 0; i < 1000000; i++ { + s.Observe(float64(i)) + } + + for j := 0; j < w; j++ { + outs := make([]dto.Metric, b.N) + + go func(o []dto.Metric) { + g.Wait() + + for i := 0; i < b.N; i++ { + s.Write(&o[i]) + } + + wg.Done() + }(outs) + } + + b.StartTimer() + g.Done() + wg.Wait() +} + +func BenchmarkHistogramWrite1(b *testing.B) { + benchmarkHistogramWrite(1, b) +} + +func BenchmarkHistogramWrite2(b *testing.B) { + benchmarkHistogramWrite(2, b) +} + +func BenchmarkHistogramWrite4(b *testing.B) { + benchmarkHistogramWrite(4, b) +} + +func BenchmarkHistogramWrite8(b *testing.B) { + benchmarkHistogramWrite(8, b) +} + +// Intentionally adding +Inf here to test if that case is handled correctly. +// Also, getCumulativeCounts depends on it. +var testBuckets = []float64{-2, -1, -0.5, 0, 0.5, 1, 2, math.Inf(+1)} + +func TestHistogramConcurrency(t *testing.T) { + if testing.Short() { + t.Skip("Skipping test in short mode.") + } + + rand.Seed(42) + + it := func(n uint32) bool { + mutations := int(n%1e4 + 1e4) + concLevel := int(n%5 + 1) + total := mutations * concLevel + + var start, end sync.WaitGroup + start.Add(1) + end.Add(concLevel) + + sum := NewHistogram(HistogramOpts{ + Name: "test_histogram", + Help: "helpless", + Buckets: testBuckets, + }) + + allVars := make([]float64, total) + var sampleSum float64 + for i := 0; i < concLevel; i++ { + vals := make([]float64, mutations) + for j := 0; j < mutations; j++ { + v := rand.NormFloat64() + vals[j] = v + allVars[i*mutations+j] = v + sampleSum += v + } + + go func(vals []float64) { + start.Wait() + for _, v := range vals { + sum.Observe(v) + } + end.Done() + }(vals) + } + sort.Float64s(allVars) + start.Done() + end.Wait() + + m := &dto.Metric{} + sum.Write(m) + if got, want := int(*m.Histogram.SampleCount), total; got != want { + t.Errorf("got sample count %d, want %d", got, want) + } + if got, want := *m.Histogram.SampleSum, sampleSum; math.Abs((got-want)/want) > 0.001 { + t.Errorf("got sample sum %f, want %f", got, want) + } + + wantCounts := getCumulativeCounts(allVars) + + if got, want := len(m.Histogram.Bucket), len(testBuckets)-1; got != want { + t.Errorf("got %d buckets in protobuf, want %d", got, want) + } + for i, wantBound := range testBuckets { + if i == len(testBuckets)-1 { + break // No +Inf bucket in protobuf. + } + if gotBound := *m.Histogram.Bucket[i].UpperBound; gotBound != wantBound { + t.Errorf("got bound %f, want %f", gotBound, wantBound) + } + if gotCount, wantCount := *m.Histogram.Bucket[i].CumulativeCount, wantCounts[i]; gotCount != wantCount { + t.Errorf("got count %d, want %d", gotCount, wantCount) + } + } + return true + } + + if err := quick.Check(it, nil); err != nil { + t.Error(err) + } +} + +func TestHistogramVecConcurrency(t *testing.T) { + if testing.Short() { + t.Skip("Skipping test in short mode.") + } + + rand.Seed(42) + + objectives := make([]float64, 0, len(DefObjectives)) + for qu := range DefObjectives { + + objectives = append(objectives, qu) + } + sort.Float64s(objectives) + + it := func(n uint32) bool { + mutations := int(n%1e4 + 1e4) + concLevel := int(n%7 + 1) + vecLength := int(n%3 + 1) + + var start, end sync.WaitGroup + start.Add(1) + end.Add(concLevel) + + his := NewHistogramVec( + HistogramOpts{ + Name: "test_histogram", + Help: "helpless", + Buckets: []float64{-2, -1, -0.5, 0, 0.5, 1, 2, math.Inf(+1)}, + }, + []string{"label"}, + ) + + allVars := make([][]float64, vecLength) + sampleSums := make([]float64, vecLength) + for i := 0; i < concLevel; i++ { + vals := make([]float64, mutations) + picks := make([]int, mutations) + for j := 0; j < mutations; j++ { + v := rand.NormFloat64() + vals[j] = v + pick := rand.Intn(vecLength) + picks[j] = pick + allVars[pick] = append(allVars[pick], v) + sampleSums[pick] += v + } + + go func(vals []float64) { + start.Wait() + for i, v := range vals { + his.WithLabelValues(string('A' + picks[i])).Observe(v) + } + end.Done() + }(vals) + } + for _, vars := range allVars { + sort.Float64s(vars) + } + start.Done() + end.Wait() + + for i := 0; i < vecLength; i++ { + m := &dto.Metric{} + s := his.WithLabelValues(string('A' + i)) + s.Write(m) + + if got, want := len(m.Histogram.Bucket), len(testBuckets)-1; got != want { + t.Errorf("got %d buckets in protobuf, want %d", got, want) + } + if got, want := int(*m.Histogram.SampleCount), len(allVars[i]); got != want { + t.Errorf("got sample count %d, want %d", got, want) + } + if got, want := *m.Histogram.SampleSum, sampleSums[i]; math.Abs((got-want)/want) > 0.001 { + t.Errorf("got sample sum %f, want %f", got, want) + } + + wantCounts := getCumulativeCounts(allVars[i]) + + for j, wantBound := range testBuckets { + if j == len(testBuckets)-1 { + break // No +Inf bucket in protobuf. + } + if gotBound := *m.Histogram.Bucket[j].UpperBound; gotBound != wantBound { + t.Errorf("got bound %f, want %f", gotBound, wantBound) + } + if gotCount, wantCount := *m.Histogram.Bucket[j].CumulativeCount, wantCounts[j]; gotCount != wantCount { + t.Errorf("got count %d, want %d", gotCount, wantCount) + } + } + } + return true + } + + if err := quick.Check(it, nil); err != nil { + t.Error(err) + } +} + +func getCumulativeCounts(vars []float64) []uint64 { + counts := make([]uint64, len(testBuckets)) + for _, v := range vars { + for i := len(testBuckets) - 1; i >= 0; i-- { + if v > testBuckets[i] { + break + } + counts[i]++ + } + } + return counts +} + +func TestBuckets(t *testing.T) { + got := LinearBuckets(-15, 5, 6) + want := []float64{-15, -10, -5, 0, 5, 10} + if !reflect.DeepEqual(got, want) { + t.Errorf("linear buckets: got %v, want %v", got, want) + } + + got = ExponentialBuckets(100, 1.2, 3) + want = []float64{100, 120, 144} + if !reflect.DeepEqual(got, want) { + t.Errorf("linear buckets: got %v, want %v", got, want) + } +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/http.go b/vendor/github.com/prometheus/client_golang/prometheus/http.go index d485ce0b8..67ee5ac79 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/http.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/http.go @@ -62,8 +62,7 @@ func giveBuf(buf *bytes.Buffer) { // // Deprecated: Please note the issues described in the doc comment of // InstrumentHandler. You might want to consider using promhttp.Handler instead -// (which is not instrumented, but can be instrumented with the tooling provided -// in package promhttp). +// (which is non instrumented). func Handler() http.Handler { return InstrumentHandler("prometheus", UninstrumentedHandler()) } @@ -159,8 +158,7 @@ func nowSeries(t ...time.Time) nower { // value. http_requests_total is a metric vector partitioned by HTTP method // (label name "method") and HTTP status code (label name "code"). // -// Deprecated: InstrumentHandler has several issues. Use the tooling provided in -// package promhttp instead. The issues are the following: +// Deprecated: InstrumentHandler has several issues: // // - It uses Summaries rather than Histograms. Summaries are not useful if // aggregation across multiple instances is required. @@ -174,8 +172,9 @@ func nowSeries(t ...time.Time) nower { // httputil.ReverseProxy is a prominent example for a handler // performing such writes. // -// - It has additional issues with HTTP/2, cf. -// https://github.com/prometheus/client_golang/issues/272. +// Upcoming versions of this package will provide ways of instrumenting HTTP +// handlers that are more flexible and have fewer issues. Please prefer direct +// instrumentation in the meantime. func InstrumentHandler(handlerName string, handler http.Handler) http.HandlerFunc { return InstrumentHandlerFunc(handlerName, handler.ServeHTTP) } @@ -185,13 +184,12 @@ func InstrumentHandler(handlerName string, handler http.Handler) http.HandlerFun // issues). // // Deprecated: InstrumentHandlerFunc is deprecated for the same reasons as -// InstrumentHandler is. Use the tooling provided in package promhttp instead. +// InstrumentHandler is. func InstrumentHandlerFunc(handlerName string, handlerFunc func(http.ResponseWriter, *http.Request)) http.HandlerFunc { return InstrumentHandlerFuncWithOpts( SummaryOpts{ Subsystem: "http", ConstLabels: Labels{"handler": handlerName}, - Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001}, }, handlerFunc, ) @@ -224,7 +222,7 @@ func InstrumentHandlerFunc(handlerName string, handlerFunc func(http.ResponseWri // SummaryOpts. // // Deprecated: InstrumentHandlerWithOpts is deprecated for the same reasons as -// InstrumentHandler is. Use the tooling provided in package promhttp instead. +// InstrumentHandler is. func InstrumentHandlerWithOpts(opts SummaryOpts, handler http.Handler) http.HandlerFunc { return InstrumentHandlerFuncWithOpts(opts, handler.ServeHTTP) } @@ -235,7 +233,7 @@ func InstrumentHandlerWithOpts(opts SummaryOpts, handler http.Handler) http.Hand // SummaryOpts are used. // // Deprecated: InstrumentHandlerFuncWithOpts is deprecated for the same reasons -// as InstrumentHandler is. Use the tooling provided in package promhttp instead. +// as InstrumentHandler is. func InstrumentHandlerFuncWithOpts(opts SummaryOpts, handlerFunc func(http.ResponseWriter, *http.Request)) http.HandlerFunc { reqCnt := NewCounterVec( CounterOpts{ @@ -247,52 +245,34 @@ func InstrumentHandlerFuncWithOpts(opts SummaryOpts, handlerFunc func(http.Respo }, instLabels, ) - if err := Register(reqCnt); err != nil { - if are, ok := err.(AlreadyRegisteredError); ok { - reqCnt = are.ExistingCollector.(*CounterVec) - } else { - panic(err) - } - } opts.Name = "request_duration_microseconds" opts.Help = "The HTTP request latencies in microseconds." reqDur := NewSummary(opts) - if err := Register(reqDur); err != nil { - if are, ok := err.(AlreadyRegisteredError); ok { - reqDur = are.ExistingCollector.(Summary) - } else { - panic(err) - } - } opts.Name = "request_size_bytes" opts.Help = "The HTTP request sizes in bytes." reqSz := NewSummary(opts) - if err := Register(reqSz); err != nil { - if are, ok := err.(AlreadyRegisteredError); ok { - reqSz = are.ExistingCollector.(Summary) - } else { - panic(err) - } - } opts.Name = "response_size_bytes" opts.Help = "The HTTP response sizes in bytes." resSz := NewSummary(opts) - if err := Register(resSz); err != nil { - if are, ok := err.(AlreadyRegisteredError); ok { - resSz = are.ExistingCollector.(Summary) - } else { - panic(err) - } - } + + regReqCnt := MustRegisterOrGet(reqCnt).(*CounterVec) + regReqDur := MustRegisterOrGet(reqDur).(Summary) + regReqSz := MustRegisterOrGet(reqSz).(Summary) + regResSz := MustRegisterOrGet(resSz).(Summary) return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { now := time.Now() delegate := &responseWriterDelegator{ResponseWriter: w} - out := computeApproximateRequestSize(r) + out := make(chan int) + urlLen := 0 + if r.URL != nil { + urlLen = len(r.URL.String()) + } + go computeApproximateRequestSize(r, out, urlLen) _, cn := w.(http.CloseNotifier) _, fl := w.(http.Flusher) @@ -310,44 +290,30 @@ func InstrumentHandlerFuncWithOpts(opts SummaryOpts, handlerFunc func(http.Respo method := sanitizeMethod(r.Method) code := sanitizeCode(delegate.status) - reqCnt.WithLabelValues(method, code).Inc() - reqDur.Observe(elapsed) - resSz.Observe(float64(delegate.written)) - reqSz.Observe(float64(<-out)) + regReqCnt.WithLabelValues(method, code).Inc() + regReqDur.Observe(elapsed) + regResSz.Observe(float64(delegate.written)) + regReqSz.Observe(float64(<-out)) }) } -func computeApproximateRequestSize(r *http.Request) <-chan int { - // Get URL length in current go routine for avoiding a race condition. - // HandlerFunc that runs in parallel may modify the URL. - s := 0 - if r.URL != nil { - s += len(r.URL.String()) +func computeApproximateRequestSize(r *http.Request, out chan int, s int) { + s += len(r.Method) + s += len(r.Proto) + for name, values := range r.Header { + s += len(name) + for _, value := range values { + s += len(value) + } } + s += len(r.Host) - out := make(chan int, 1) + // N.B. r.Form and r.MultipartForm are assumed to be included in r.URL. - go func() { - s += len(r.Method) - s += len(r.Proto) - for name, values := range r.Header { - s += len(name) - for _, value := range values { - s += len(value) - } - } - s += len(r.Host) - - // N.B. r.Form and r.MultipartForm are assumed to be included in r.URL. - - if r.ContentLength != -1 { - s += int(r.ContentLength) - } - out <- s - close(out) - }() - - return out + if r.ContentLength != -1 { + s += int(r.ContentLength) + } + out <- s } type responseWriterDelegator struct { diff --git a/vendor/github.com/prometheus/client_golang/prometheus/http_test.go b/vendor/github.com/prometheus/client_golang/prometheus/http_test.go new file mode 100644 index 000000000..ffe0418cf --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/http_test.go @@ -0,0 +1,121 @@ +// Copyright 2014 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package prometheus + +import ( + "net/http" + "net/http/httptest" + "testing" + "time" + + dto "github.com/prometheus/client_model/go" +) + +type respBody string + +func (b respBody) ServeHTTP(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusTeapot) + w.Write([]byte(b)) +} + +func TestInstrumentHandler(t *testing.T) { + defer func(n nower) { + now = n.(nower) + }(now) + + instant := time.Now() + end := instant.Add(30 * time.Second) + now = nowSeries(instant, end) + respBody := respBody("Howdy there!") + + hndlr := InstrumentHandler("test-handler", respBody) + + opts := SummaryOpts{ + Subsystem: "http", + ConstLabels: Labels{"handler": "test-handler"}, + } + + reqCnt := MustRegisterOrGet(NewCounterVec( + CounterOpts{ + Namespace: opts.Namespace, + Subsystem: opts.Subsystem, + Name: "requests_total", + Help: "Total number of HTTP requests made.", + ConstLabels: opts.ConstLabels, + }, + instLabels, + )).(*CounterVec) + + opts.Name = "request_duration_microseconds" + opts.Help = "The HTTP request latencies in microseconds." + reqDur := MustRegisterOrGet(NewSummary(opts)).(Summary) + + opts.Name = "request_size_bytes" + opts.Help = "The HTTP request sizes in bytes." + MustRegisterOrGet(NewSummary(opts)) + + opts.Name = "response_size_bytes" + opts.Help = "The HTTP response sizes in bytes." + MustRegisterOrGet(NewSummary(opts)) + + reqCnt.Reset() + + resp := httptest.NewRecorder() + req := &http.Request{ + Method: "GET", + } + + hndlr.ServeHTTP(resp, req) + + if resp.Code != http.StatusTeapot { + t.Fatalf("expected status %d, got %d", http.StatusTeapot, resp.Code) + } + if string(resp.Body.Bytes()) != "Howdy there!" { + t.Fatalf("expected body %s, got %s", "Howdy there!", string(resp.Body.Bytes())) + } + + out := &dto.Metric{} + reqDur.Write(out) + if want, got := "test-handler", out.Label[0].GetValue(); want != got { + t.Errorf("want label value %q in reqDur, got %q", want, got) + } + if want, got := uint64(1), out.Summary.GetSampleCount(); want != got { + t.Errorf("want sample count %d in reqDur, got %d", want, got) + } + + out.Reset() + if want, got := 1, len(reqCnt.children); want != got { + t.Errorf("want %d children in reqCnt, got %d", want, got) + } + cnt, err := reqCnt.GetMetricWithLabelValues("get", "418") + if err != nil { + t.Fatal(err) + } + cnt.Write(out) + if want, got := "418", out.Label[0].GetValue(); want != got { + t.Errorf("want label value %q in reqCnt, got %q", want, got) + } + if want, got := "test-handler", out.Label[1].GetValue(); want != got { + t.Errorf("want label value %q in reqCnt, got %q", want, got) + } + if want, got := "get", out.Label[2].GetValue(); want != got { + t.Errorf("want label value %q in reqCnt, got %q", want, got) + } + if out.Counter == nil { + t.Fatal("expected non-nil counter in reqCnt") + } + if want, got := 1., out.Counter.GetValue(); want != got { + t.Errorf("want reqCnt of %f, got %f", want, got) + } +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator_1_7.go b/vendor/github.com/prometheus/client_golang/prometheus/metric_test.go similarity index 50% rename from vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator_1_7.go rename to vendor/github.com/prometheus/client_golang/prometheus/metric_test.go index 24b31503e..7145f5e53 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator_1_7.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/metric_test.go @@ -1,4 +1,4 @@ -// Copyright 2017 The Prometheus Authors +// Copyright 2014 The Prometheus Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -11,28 +11,25 @@ // See the License for the specific language governing permissions and // limitations under the License. -// +build !go1.8 +package prometheus -package promhttp +import "testing" -import ( - "io" - "net/http" -) - -func newDelegator(w http.ResponseWriter, observeWriteHeaderFunc func(int)) delegator { - d := &responseWriterDelegator{ - ResponseWriter: w, - observeWriteHeader: observeWriteHeaderFunc, +func TestBuildFQName(t *testing.T) { + scenarios := []struct{ namespace, subsystem, name, result string }{ + {"a", "b", "c", "a_b_c"}, + {"", "b", "c", "b_c"}, + {"a", "", "c", "a_c"}, + {"", "", "c", "c"}, + {"a", "b", "", ""}, + {"a", "", "", ""}, + {"", "b", "", ""}, + {" ", "", "", ""}, } - _, cn := w.(http.CloseNotifier) - _, fl := w.(http.Flusher) - _, hj := w.(http.Hijacker) - _, rf := w.(io.ReaderFrom) - if cn && fl && hj && rf { - return &fancyDelegator{d} + for i, s := range scenarios { + if want, got := s.result, BuildFQName(s.namespace, s.subsystem, s.name); want != got { + t.Errorf("%d. want %s, got %s", i, want, got) + } } - - return d } diff --git a/vendor/github.com/prometheus/client_golang/prometheus/observer.go b/vendor/github.com/prometheus/client_golang/prometheus/observer.go deleted file mode 100644 index b0520e85e..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/observer.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2017 The Prometheus Authors -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package prometheus - -// Observer is the interface that wraps the Observe method, which is used by -// Histogram and Summary to add observations. -type Observer interface { - Observe(float64) -} - -// The ObserverFunc type is an adapter to allow the use of ordinary -// functions as Observers. If f is a function with the appropriate -// signature, ObserverFunc(f) is an Observer that calls f. -// -// This adapter is usually used in connection with the Timer type, and there are -// two general use cases: -// -// The most common one is to use a Gauge as the Observer for a Timer. -// See the "Gauge" Timer example. -// -// The more advanced use case is to create a function that dynamically decides -// which Observer to use for observing the duration. See the "Complex" Timer -// example. -type ObserverFunc func(float64) - -// Observe calls f(value). It implements Observer. -func (f ObserverFunc) Observe(value float64) { - f(value) -} - -// ObserverVec is an interface implemented by `HistogramVec` and `SummaryVec`. -type ObserverVec interface { - GetMetricWith(Labels) (Observer, error) - GetMetricWithLabelValues(lvs ...string) (Observer, error) - With(Labels) Observer - WithLabelValues(...string) Observer - - Collector -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/process_collector.go b/vendor/github.com/prometheus/client_golang/prometheus/process_collector.go index 94b2553e1..e31e62e78 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/process_collector.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/process_collector.go @@ -19,10 +19,10 @@ type processCollector struct { pid int collectFn func(chan<- Metric) pidFn func() (int, error) - cpuTotal *Desc - openFDs, maxFDs *Desc - vsize, rss *Desc - startTime *Desc + cpuTotal Counter + openFDs, maxFDs Gauge + vsize, rss Gauge + startTime Gauge } // NewProcessCollector returns a collector which exports the current state of @@ -44,45 +44,40 @@ func NewProcessCollectorPIDFn( pidFn func() (int, error), namespace string, ) Collector { - ns := "" - if len(namespace) > 0 { - ns = namespace + "_" - } - c := processCollector{ pidFn: pidFn, collectFn: func(chan<- Metric) {}, - cpuTotal: NewDesc( - ns+"process_cpu_seconds_total", - "Total user and system CPU time spent in seconds.", - nil, nil, - ), - openFDs: NewDesc( - ns+"process_open_fds", - "Number of open file descriptors.", - nil, nil, - ), - maxFDs: NewDesc( - ns+"process_max_fds", - "Maximum number of open file descriptors.", - nil, nil, - ), - vsize: NewDesc( - ns+"process_virtual_memory_bytes", - "Virtual memory size in bytes.", - nil, nil, - ), - rss: NewDesc( - ns+"process_resident_memory_bytes", - "Resident memory size in bytes.", - nil, nil, - ), - startTime: NewDesc( - ns+"process_start_time_seconds", - "Start time of the process since unix epoch in seconds.", - nil, nil, - ), + cpuTotal: NewCounter(CounterOpts{ + Namespace: namespace, + Name: "process_cpu_seconds_total", + Help: "Total user and system CPU time spent in seconds.", + }), + openFDs: NewGauge(GaugeOpts{ + Namespace: namespace, + Name: "process_open_fds", + Help: "Number of open file descriptors.", + }), + maxFDs: NewGauge(GaugeOpts{ + Namespace: namespace, + Name: "process_max_fds", + Help: "Maximum number of open file descriptors.", + }), + vsize: NewGauge(GaugeOpts{ + Namespace: namespace, + Name: "process_virtual_memory_bytes", + Help: "Virtual memory size in bytes.", + }), + rss: NewGauge(GaugeOpts{ + Namespace: namespace, + Name: "process_resident_memory_bytes", + Help: "Resident memory size in bytes.", + }), + startTime: NewGauge(GaugeOpts{ + Namespace: namespace, + Name: "process_start_time_seconds", + Help: "Start time of the process since unix epoch in seconds.", + }), } // Set up process metric collection if supported by the runtime. @@ -95,12 +90,12 @@ func NewProcessCollectorPIDFn( // Describe returns all descriptions of the collector. func (c *processCollector) Describe(ch chan<- *Desc) { - ch <- c.cpuTotal - ch <- c.openFDs - ch <- c.maxFDs - ch <- c.vsize - ch <- c.rss - ch <- c.startTime + ch <- c.cpuTotal.Desc() + ch <- c.openFDs.Desc() + ch <- c.maxFDs.Desc() + ch <- c.vsize.Desc() + ch <- c.rss.Desc() + ch <- c.startTime.Desc() } // Collect returns the current state of all metrics of the collector. @@ -122,19 +117,26 @@ func (c *processCollector) processCollect(ch chan<- Metric) { } if stat, err := p.NewStat(); err == nil { - ch <- MustNewConstMetric(c.cpuTotal, CounterValue, stat.CPUTime()) - ch <- MustNewConstMetric(c.vsize, GaugeValue, float64(stat.VirtualMemory())) - ch <- MustNewConstMetric(c.rss, GaugeValue, float64(stat.ResidentMemory())) + c.cpuTotal.Set(stat.CPUTime()) + ch <- c.cpuTotal + c.vsize.Set(float64(stat.VirtualMemory())) + ch <- c.vsize + c.rss.Set(float64(stat.ResidentMemory())) + ch <- c.rss + if startTime, err := stat.StartTime(); err == nil { - ch <- MustNewConstMetric(c.startTime, GaugeValue, startTime) + c.startTime.Set(startTime) + ch <- c.startTime } } if fds, err := p.FileDescriptorsLen(); err == nil { - ch <- MustNewConstMetric(c.openFDs, GaugeValue, float64(fds)) + c.openFDs.Set(float64(fds)) + ch <- c.openFDs } if limits, err := p.NewLimits(); err == nil { - ch <- MustNewConstMetric(c.maxFDs, GaugeValue, float64(limits.OpenFiles)) + c.maxFDs.Set(float64(limits.OpenFiles)) + ch <- c.maxFDs } } diff --git a/vendor/github.com/prometheus/client_golang/prometheus/process_collector_test.go b/vendor/github.com/prometheus/client_golang/prometheus/process_collector_test.go new file mode 100644 index 000000000..d3362dae7 --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/process_collector_test.go @@ -0,0 +1,58 @@ +package prometheus + +import ( + "bytes" + "os" + "regexp" + "testing" + + "github.com/prometheus/common/expfmt" + "github.com/prometheus/procfs" +) + +func TestProcessCollector(t *testing.T) { + if _, err := procfs.Self(); err != nil { + t.Skipf("skipping TestProcessCollector, procfs not available: %s", err) + } + + registry := NewRegistry() + if err := registry.Register(NewProcessCollector(os.Getpid(), "")); err != nil { + t.Fatal(err) + } + if err := registry.Register(NewProcessCollectorPIDFn( + func() (int, error) { return os.Getpid(), nil }, "foobar"), + ); err != nil { + t.Fatal(err) + } + + mfs, err := registry.Gather() + if err != nil { + t.Fatal(err) + } + + var buf bytes.Buffer + for _, mf := range mfs { + if _, err := expfmt.MetricFamilyToText(&buf, mf); err != nil { + t.Fatal(err) + } + } + + for _, re := range []*regexp.Regexp{ + regexp.MustCompile("process_cpu_seconds_total [0-9]"), + regexp.MustCompile("process_max_fds [1-9]"), + regexp.MustCompile("process_open_fds [1-9]"), + regexp.MustCompile("process_virtual_memory_bytes [1-9]"), + regexp.MustCompile("process_resident_memory_bytes [1-9]"), + regexp.MustCompile("process_start_time_seconds [0-9.]{10,}"), + regexp.MustCompile("foobar_process_cpu_seconds_total [0-9]"), + regexp.MustCompile("foobar_process_max_fds [1-9]"), + regexp.MustCompile("foobar_process_open_fds [1-9]"), + regexp.MustCompile("foobar_process_virtual_memory_bytes [1-9]"), + regexp.MustCompile("foobar_process_resident_memory_bytes [1-9]"), + regexp.MustCompile("foobar_process_start_time_seconds [0-9.]{10,}"), + } { + if !re.Match(buf.Bytes()) { + t.Errorf("want body to match %s\n%s", re, buf.String()) + } + } +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator_1_8.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator_1_8.go deleted file mode 100644 index b7743fb87..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator_1_8.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2017 The Prometheus Authors -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// +build go1.8 - -package promhttp - -import ( - "io" - "net/http" -) - -// newDelegator handles the four different methods of upgrading a -// http.ResponseWriter to delegator. -func newDelegator(w http.ResponseWriter, observeWriteHeaderFunc func(int)) delegator { - d := &responseWriterDelegator{ - ResponseWriter: w, - observeWriteHeader: observeWriteHeaderFunc, - } - - _, cn := w.(http.CloseNotifier) - _, fl := w.(http.Flusher) - _, hj := w.(http.Hijacker) - _, ps := w.(http.Pusher) - _, rf := w.(io.ReaderFrom) - - // Check for the four most common combination of interfaces a - // http.ResponseWriter might implement. - switch { - case cn && fl && hj && rf && ps: - // All interfaces. - return &fancyPushDelegator{ - fancyDelegator: &fancyDelegator{d}, - p: &pushDelegator{d}, - } - case cn && fl && hj && rf: - // All interfaces, except http.Pusher. - return &fancyDelegator{d} - case ps: - // Just http.Pusher. - return &pushDelegator{d} - } - - return d -} - -type fancyPushDelegator struct { - p *pushDelegator - - *fancyDelegator -} - -func (f *fancyPushDelegator) Push(target string, opts *http.PushOptions) error { - return f.p.Push(target, opts) -} - -type pushDelegator struct { - *responseWriterDelegator -} - -func (f *pushDelegator) Push(target string, opts *http.PushOptions) error { - return f.ResponseWriter.(http.Pusher).Push(target, opts) -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go index 4c70a7af6..b6dd5a266 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go @@ -11,24 +11,21 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package promhttp provides tooling around HTTP servers and clients. +// Copyright (c) 2013, The Prometheus Authors +// All rights reserved. // -// First, the package allows the creation of http.Handler instances to expose -// Prometheus metrics via HTTP. promhttp.Handler acts on the -// prometheus.DefaultGatherer. With HandlerFor, you can create a handler for a -// custom registry or anything that implements the Gatherer interface. It also -// allows the creation of handlers that act differently on errors or allow to -// log errors. +// Use of this source code is governed by a BSD-style license that can be found +// in the LICENSE file. + +// Package promhttp contains functions to create http.Handler instances to +// expose Prometheus metrics via HTTP. In later versions of this package, it +// will also contain tooling to instrument instances of http.Handler and +// http.RoundTripper. // -// Second, the package provides tooling to instrument instances of http.Handler -// via middleware. Middleware wrappers follow the naming scheme -// InstrumentHandlerX, where X describes the intended use of the middleware. -// See each function's doc comment for specific details. -// -// Finally, the package allows for an http.RoundTripper to be instrumented via -// middleware. Middleware wrappers follow the naming scheme -// InstrumentRoundTripperX, where X describes the intended use of the -// middleware. See each function's doc comment for specific details. +// promhttp.Handler acts on the prometheus.DefaultGatherer. With HandlerFor, +// you can create a handler for a custom registry or anything that implements +// the Gatherer interface. It also allows to create handlers that act +// differently on errors or allow to log errors. package promhttp import ( diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http_test.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http_test.go new file mode 100644 index 000000000..d4a7d4a7b --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http_test.go @@ -0,0 +1,137 @@ +// Copyright 2016 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Copyright (c) 2013, The Prometheus Authors +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be found +// in the LICENSE file. + +package promhttp + +import ( + "bytes" + "errors" + "log" + "net/http" + "net/http/httptest" + "testing" + + "github.com/prometheus/client_golang/prometheus" +) + +type errorCollector struct{} + +func (e errorCollector) Describe(ch chan<- *prometheus.Desc) { + ch <- prometheus.NewDesc("invalid_metric", "not helpful", nil, nil) +} + +func (e errorCollector) Collect(ch chan<- prometheus.Metric) { + ch <- prometheus.NewInvalidMetric( + prometheus.NewDesc("invalid_metric", "not helpful", nil, nil), + errors.New("collect error"), + ) +} + +func TestHandlerErrorHandling(t *testing.T) { + + // Create a registry that collects a MetricFamily with two elements, + // another with one, and reports an error. + reg := prometheus.NewRegistry() + + cnt := prometheus.NewCounter(prometheus.CounterOpts{ + Name: "the_count", + Help: "Ah-ah-ah! Thunder and lightning!", + }) + reg.MustRegister(cnt) + + cntVec := prometheus.NewCounterVec( + prometheus.CounterOpts{ + Name: "name", + Help: "docstring", + ConstLabels: prometheus.Labels{"constname": "constvalue"}, + }, + []string{"labelname"}, + ) + cntVec.WithLabelValues("val1").Inc() + cntVec.WithLabelValues("val2").Inc() + reg.MustRegister(cntVec) + + reg.MustRegister(errorCollector{}) + + logBuf := &bytes.Buffer{} + logger := log.New(logBuf, "", 0) + + writer := httptest.NewRecorder() + request, _ := http.NewRequest("GET", "/", nil) + request.Header.Add("Accept", "test/plain") + + errorHandler := HandlerFor(reg, HandlerOpts{ + ErrorLog: logger, + ErrorHandling: HTTPErrorOnError, + }) + continueHandler := HandlerFor(reg, HandlerOpts{ + ErrorLog: logger, + ErrorHandling: ContinueOnError, + }) + panicHandler := HandlerFor(reg, HandlerOpts{ + ErrorLog: logger, + ErrorHandling: PanicOnError, + }) + wantMsg := `error gathering metrics: error collecting metric Desc{fqName: "invalid_metric", help: "not helpful", constLabels: {}, variableLabels: []}: collect error +` + wantErrorBody := `An error has occurred during metrics gathering: + +error collecting metric Desc{fqName: "invalid_metric", help: "not helpful", constLabels: {}, variableLabels: []}: collect error +` + wantOKBody := `# HELP name docstring +# TYPE name counter +name{constname="constvalue",labelname="val1"} 1 +name{constname="constvalue",labelname="val2"} 1 +# HELP the_count Ah-ah-ah! Thunder and lightning! +# TYPE the_count counter +the_count 0 +` + + errorHandler.ServeHTTP(writer, request) + if got, want := writer.Code, http.StatusInternalServerError; got != want { + t.Errorf("got HTTP status code %d, want %d", got, want) + } + if got := logBuf.String(); got != wantMsg { + t.Errorf("got log message:\n%s\nwant log mesage:\n%s\n", got, wantMsg) + } + if got := writer.Body.String(); got != wantErrorBody { + t.Errorf("got body:\n%s\nwant body:\n%s\n", got, wantErrorBody) + } + logBuf.Reset() + writer.Body.Reset() + writer.Code = http.StatusOK + + continueHandler.ServeHTTP(writer, request) + if got, want := writer.Code, http.StatusOK; got != want { + t.Errorf("got HTTP status code %d, want %d", got, want) + } + if got := logBuf.String(); got != wantMsg { + t.Errorf("got log message %q, want %q", got, wantMsg) + } + if got := writer.Body.String(); got != wantOKBody { + t.Errorf("got body %q, want %q", got, wantOKBody) + } + + defer func() { + if err := recover(); err == nil { + t.Error("expected panic from panicHandler") + } + }() + panicHandler.ServeHTTP(writer, request) +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client.go deleted file mode 100644 index 1cf21f217..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client.go +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright 2017 The Prometheus Authors -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package promhttp - -import ( - "net/http" - "time" - - "github.com/prometheus/client_golang/prometheus" -) - -// The RoundTripperFunc type is an adapter to allow the use of ordinary -// functions as RoundTrippers. If f is a function with the appropriate -// signature, RountTripperFunc(f) is a RoundTripper that calls f. -type RoundTripperFunc func(req *http.Request) (*http.Response, error) - -// RoundTrip implements the RoundTripper interface. -func (rt RoundTripperFunc) RoundTrip(r *http.Request) (*http.Response, error) { - return rt(r) -} - -// InstrumentRoundTripperInFlight is a middleware that wraps the provided -// http.RoundTripper. It sets the provided prometheus.Gauge to the number of -// requests currently handled by the wrapped http.RoundTripper. -// -// See the example for ExampleInstrumentRoundTripperDuration for example usage. -func InstrumentRoundTripperInFlight(gauge prometheus.Gauge, next http.RoundTripper) RoundTripperFunc { - return RoundTripperFunc(func(r *http.Request) (*http.Response, error) { - gauge.Inc() - defer gauge.Dec() - return next.RoundTrip(r) - }) -} - -// InstrumentRoundTripperCounter is a middleware that wraps the provided -// http.RoundTripper to observe the request result with the provided CounterVec. -// The CounterVec must have zero, one, or two labels. The only allowed label -// names are "code" and "method". The function panics if any other instance -// labels are provided. Partitioning of the CounterVec happens by HTTP status -// code and/or HTTP method if the respective instance label names are present -// in the CounterVec. For unpartitioned counting, use a CounterVec with -// zero labels. -// -// If the wrapped RoundTripper panics or returns a non-nil error, the Counter -// is not incremented. -// -// See the example for ExampleInstrumentRoundTripperDuration for example usage. -func InstrumentRoundTripperCounter(counter *prometheus.CounterVec, next http.RoundTripper) RoundTripperFunc { - code, method := checkLabels(counter) - - return RoundTripperFunc(func(r *http.Request) (*http.Response, error) { - resp, err := next.RoundTrip(r) - if err == nil { - counter.With(labels(code, method, r.Method, resp.StatusCode)).Inc() - } - return resp, err - }) -} - -// InstrumentRoundTripperDuration is a middleware that wraps the provided -// http.RoundTripper to observe the request duration with the provided ObserverVec. -// The ObserverVec must have zero, one, or two labels. The only allowed label -// names are "code" and "method". The function panics if any other instance -// labels are provided. The Observe method of the Observer in the ObserverVec -// is called with the request duration in seconds. Partitioning happens by HTTP -// status code and/or HTTP method if the respective instance label names are -// present in the ObserverVec. For unpartitioned observations, use an -// ObserverVec with zero labels. Note that partitioning of Histograms is -// expensive and should be used judiciously. -// -// If the wrapped RoundTripper panics or returns a non-nil error, no values are -// reported. -func InstrumentRoundTripperDuration(obs prometheus.ObserverVec, next http.RoundTripper) RoundTripperFunc { - code, method := checkLabels(obs) - - return RoundTripperFunc(func(r *http.Request) (*http.Response, error) { - start := time.Now() - resp, err := next.RoundTrip(r) - if err == nil { - obs.With(labels(code, method, r.Method, resp.StatusCode)).Observe(time.Since(start).Seconds()) - } - return resp, err - }) -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client_1_8.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client_1_8.go deleted file mode 100644 index b51d91052..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client_1_8.go +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright 2017 The Prometheus Authors -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// +build go1.8 - -package promhttp - -import ( - "context" - "crypto/tls" - "net/http" - "net/http/httptrace" - "time" -) - -// InstrumentTrace is used to offer flexibility in instrumenting the available -// httptrace.ClientTrace hook functions. Each function is passed a float64 -// representing the time in seconds since the start of the http request. A user -// may choose to use separately buckets Histograms, or implement custom -// instance labels on a per function basis. -type InstrumentTrace struct { - GotConn func(float64) - PutIdleConn func(float64) - GotFirstResponseByte func(float64) - Got100Continue func(float64) - DNSStart func(float64) - DNSDone func(float64) - ConnectStart func(float64) - ConnectDone func(float64) - TLSHandshakeStart func(float64) - TLSHandshakeDone func(float64) - WroteHeaders func(float64) - Wait100Continue func(float64) - WroteRequest func(float64) -} - -// InstrumentRoundTripperTrace is a middleware that wraps the provided -// RoundTripper and reports times to hook functions provided in the -// InstrumentTrace struct. Hook functions that are not present in the provided -// InstrumentTrace struct are ignored. Times reported to the hook functions are -// time since the start of the request. Note that partitioning of Histograms -// is expensive and should be used judiciously. -// -// For hook functions that receive an error as an argument, no observations are -// made in the event of a non-nil error value. -// -// See the example for ExampleInstrumentRoundTripperDuration for example usage. -func InstrumentRoundTripperTrace(it *InstrumentTrace, next http.RoundTripper) RoundTripperFunc { - return RoundTripperFunc(func(r *http.Request) (*http.Response, error) { - start := time.Now() - - trace := &httptrace.ClientTrace{ - GotConn: func(_ httptrace.GotConnInfo) { - if it.GotConn != nil { - it.GotConn(time.Since(start).Seconds()) - } - }, - PutIdleConn: func(err error) { - if err != nil { - return - } - if it.PutIdleConn != nil { - it.PutIdleConn(time.Since(start).Seconds()) - } - }, - DNSStart: func(_ httptrace.DNSStartInfo) { - if it.DNSStart != nil { - it.DNSStart(time.Since(start).Seconds()) - } - }, - DNSDone: func(_ httptrace.DNSDoneInfo) { - if it.DNSStart != nil { - it.DNSStart(time.Since(start).Seconds()) - } - }, - ConnectStart: func(_, _ string) { - if it.ConnectStart != nil { - it.ConnectStart(time.Since(start).Seconds()) - } - }, - ConnectDone: func(_, _ string, err error) { - if err != nil { - return - } - if it.ConnectDone != nil { - it.ConnectDone(time.Since(start).Seconds()) - } - }, - GotFirstResponseByte: func() { - if it.GotFirstResponseByte != nil { - it.GotFirstResponseByte(time.Since(start).Seconds()) - } - }, - Got100Continue: func() { - if it.Got100Continue != nil { - it.Got100Continue(time.Since(start).Seconds()) - } - }, - TLSHandshakeStart: func() { - if it.TLSHandshakeStart != nil { - it.TLSHandshakeStart(time.Since(start).Seconds()) - } - }, - TLSHandshakeDone: func(_ tls.ConnectionState, err error) { - if err != nil { - return - } - if it.TLSHandshakeDone != nil { - it.TLSHandshakeDone(time.Since(start).Seconds()) - } - }, - WroteHeaders: func() { - if it.WroteHeaders != nil { - it.WroteHeaders(time.Since(start).Seconds()) - } - }, - Wait100Continue: func() { - if it.Wait100Continue != nil { - it.Wait100Continue(time.Since(start).Seconds()) - } - }, - WroteRequest: func(_ httptrace.WroteRequestInfo) { - if it.WroteRequest != nil { - it.WroteRequest(time.Since(start).Seconds()) - } - }, - } - r = r.WithContext(httptrace.WithClientTrace(context.Background(), trace)) - - return next.RoundTrip(r) - }) -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_server.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_server.go deleted file mode 100644 index ac419e555..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_server.go +++ /dev/null @@ -1,505 +0,0 @@ -// Copyright 2017 The Prometheus Authors -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package promhttp - -import ( - "bufio" - "io" - "net" - "net/http" - "strconv" - "strings" - "time" - - dto "github.com/prometheus/client_model/go" - - "github.com/prometheus/client_golang/prometheus" -) - -// magicString is used for the hacky label test in checkLabels. Remove once fixed. -const magicString = "zZgWfBxLqvG8kc8IMv3POi2Bb0tZI3vAnBx+gBaFi9FyPzB/CzKUer1yufDa" - -// InstrumentHandlerInFlight is a middleware that wraps the provided -// http.Handler. It sets the provided prometheus.Gauge to the number of -// requests currently handled by the wrapped http.Handler. -// -// See the example for InstrumentHandlerDuration for example usage. -func InstrumentHandlerInFlight(g prometheus.Gauge, next http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - g.Inc() - defer g.Dec() - next.ServeHTTP(w, r) - }) -} - -// InstrumentHandlerDuration is a middleware that wraps the provided -// http.Handler to observe the request duration with the provided ObserverVec. -// The ObserverVec must have zero, one, or two labels. The only allowed label -// names are "code" and "method". The function panics if any other instance -// labels are provided. The Observe method of the Observer in the ObserverVec -// is called with the request duration in seconds. Partitioning happens by HTTP -// status code and/or HTTP method if the respective instance label names are -// present in the ObserverVec. For unpartitioned observations, use an -// ObserverVec with zero labels. Note that partitioning of Histograms is -// expensive and should be used judiciously. -// -// If the wrapped Handler does not set a status code, a status code of 200 is assumed. -// -// If the wrapped Handler panics, no values are reported. -func InstrumentHandlerDuration(obs prometheus.ObserverVec, next http.Handler) http.HandlerFunc { - code, method := checkLabels(obs) - - if code { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - now := time.Now() - d := newDelegator(w, nil) - next.ServeHTTP(d, r) - - obs.With(labels(code, method, r.Method, d.Status())).Observe(time.Since(now).Seconds()) - }) - } - - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - now := time.Now() - next.ServeHTTP(w, r) - obs.With(labels(code, method, r.Method, 0)).Observe(time.Since(now).Seconds()) - }) -} - -// InstrumentHandlerCounter is a middleware that wraps the provided -// http.Handler to observe the request result with the provided CounterVec. -// The CounterVec must have zero, one, or two labels. The only allowed label -// names are "code" and "method". The function panics if any other instance -// labels are provided. Partitioning of the CounterVec happens by HTTP status -// code and/or HTTP method if the respective instance label names are present -// in the CounterVec. For unpartitioned counting, use a CounterVec with -// zero labels. -// -// If the wrapped Handler does not set a status code, a status code of 200 is assumed. -// -// If the wrapped Handler panics, the Counter is not incremented. -// -// See the example for InstrumentHandlerDuration for example usage. -func InstrumentHandlerCounter(counter *prometheus.CounterVec, next http.Handler) http.HandlerFunc { - code, method := checkLabels(counter) - - if code { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - d := newDelegator(w, nil) - next.ServeHTTP(d, r) - counter.With(labels(code, method, r.Method, d.Status())).Inc() - }) - } - - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - next.ServeHTTP(w, r) - counter.With(labels(code, method, r.Method, 0)).Inc() - }) -} - -// InstrumentHandlerTimeToWriteHeader is a middleware that wraps the provided -// http.Handler to observe with the provided ObserverVec the request duration -// until the response headers are written. The ObserverVec must have zero, one, -// or two labels. The only allowed label names are "code" and "method". The -// function panics if any other instance labels are provided. The Observe -// method of the Observer in the ObserverVec is called with the request -// duration in seconds. Partitioning happens by HTTP status code and/or HTTP -// method if the respective instance label names are present in the -// ObserverVec. For unpartitioned observations, use an ObserverVec with zero -// labels. Note that partitioning of Histograms is expensive and should be used -// judiciously. -// -// If the wrapped Handler panics before calling WriteHeader, no value is -// reported. -// -// See the example for InstrumentHandlerDuration for example usage. -func InstrumentHandlerTimeToWriteHeader(obs prometheus.ObserverVec, next http.Handler) http.HandlerFunc { - code, method := checkLabels(obs) - - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - now := time.Now() - d := newDelegator(w, func(status int) { - obs.With(labels(code, method, r.Method, status)).Observe(time.Since(now).Seconds()) - }) - next.ServeHTTP(d, r) - }) -} - -// InstrumentHandlerRequestSize is a middleware that wraps the provided -// http.Handler to observe the request size with the provided ObserverVec. -// The ObserverVec must have zero, one, or two labels. The only allowed label -// names are "code" and "method". The function panics if any other instance -// labels are provided. The Observe method of the Observer in the ObserverVec -// is called with the request size in bytes. Partitioning happens by HTTP -// status code and/or HTTP method if the respective instance label names are -// present in the ObserverVec. For unpartitioned observations, use an -// ObserverVec with zero labels. Note that partitioning of Histograms is -// expensive and should be used judiciously. -// -// If the wrapped Handler does not set a status code, a status code of 200 is assumed. -// -// If the wrapped Handler panics, no values are reported. -// -// See the example for InstrumentHandlerDuration for example usage. -func InstrumentHandlerRequestSize(obs prometheus.ObserverVec, next http.Handler) http.HandlerFunc { - code, method := checkLabels(obs) - - if code { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - d := newDelegator(w, nil) - next.ServeHTTP(d, r) - size := computeApproximateRequestSize(r) - obs.With(labels(code, method, r.Method, d.Status())).Observe(float64(size)) - }) - } - - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - next.ServeHTTP(w, r) - size := computeApproximateRequestSize(r) - obs.With(labels(code, method, r.Method, 0)).Observe(float64(size)) - }) -} - -// InstrumentHandlerResponseSize is a middleware that wraps the provided -// http.Handler to observe the response size with the provided ObserverVec. -// The ObserverVec must have zero, one, or two labels. The only allowed label -// names are "code" and "method". The function panics if any other instance -// labels are provided. The Observe method of the Observer in the ObserverVec -// is called with the response size in bytes. Partitioning happens by HTTP -// status code and/or HTTP method if the respective instance label names are -// present in the ObserverVec. For unpartitioned observations, use an -// ObserverVec with zero labels. Note that partitioning of Histograms is -// expensive and should be used judiciously. -// -// If the wrapped Handler does not set a status code, a status code of 200 is assumed. -// -// If the wrapped Handler panics, no values are reported. -// -// See the example for InstrumentHandlerDuration for example usage. -func InstrumentHandlerResponseSize(obs prometheus.ObserverVec, next http.Handler) http.Handler { - code, method := checkLabels(obs) - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - d := newDelegator(w, nil) - next.ServeHTTP(d, r) - obs.With(labels(code, method, r.Method, d.Status())).Observe(float64(d.Written())) - }) -} - -func checkLabels(c prometheus.Collector) (code bool, method bool) { - // TODO(beorn7): Remove this hacky way to check for instance labels - // once Descriptors can have their dimensionality queried. - var ( - desc *prometheus.Desc - pm dto.Metric - ) - - descc := make(chan *prometheus.Desc, 1) - c.Describe(descc) - - select { - case desc = <-descc: - default: - panic("no description provided by collector") - } - select { - case <-descc: - panic("more than one description provided by collector") - default: - } - - close(descc) - - if _, err := prometheus.NewConstMetric(desc, prometheus.UntypedValue, 0); err == nil { - return - } - if m, err := prometheus.NewConstMetric(desc, prometheus.UntypedValue, 0, magicString); err == nil { - if err := m.Write(&pm); err != nil { - panic("error checking metric for labels") - } - for _, label := range pm.Label { - name, value := label.GetName(), label.GetValue() - if value != magicString { - continue - } - switch name { - case "code": - code = true - case "method": - method = true - default: - panic("metric partitioned with non-supported labels") - } - return - } - panic("previously set label not found – this must never happen") - } - if m, err := prometheus.NewConstMetric(desc, prometheus.UntypedValue, 0, magicString, magicString); err == nil { - if err := m.Write(&pm); err != nil { - panic("error checking metric for labels") - } - for _, label := range pm.Label { - name, value := label.GetName(), label.GetValue() - if value != magicString { - continue - } - if name == "code" || name == "method" { - continue - } - panic("metric partitioned with non-supported labels") - } - code = true - method = true - return - } - panic("metric partitioned with non-supported labels") -} - -// emptyLabels is a one-time allocation for non-partitioned metrics to avoid -// unnecessary allocations on each request. -var emptyLabels = prometheus.Labels{} - -func labels(code, method bool, reqMethod string, status int) prometheus.Labels { - if !(code || method) { - return emptyLabels - } - labels := prometheus.Labels{} - - if code { - labels["code"] = sanitizeCode(status) - } - if method { - labels["method"] = sanitizeMethod(reqMethod) - } - - return labels -} - -func computeApproximateRequestSize(r *http.Request) int { - s := 0 - if r.URL != nil { - s += len(r.URL.String()) - } - - s += len(r.Method) - s += len(r.Proto) - for name, values := range r.Header { - s += len(name) - for _, value := range values { - s += len(value) - } - } - s += len(r.Host) - - // N.B. r.Form and r.MultipartForm are assumed to be included in r.URL. - - if r.ContentLength != -1 { - s += int(r.ContentLength) - } - return s -} - -func sanitizeMethod(m string) string { - switch m { - case "GET", "get": - return "get" - case "PUT", "put": - return "put" - case "HEAD", "head": - return "head" - case "POST", "post": - return "post" - case "DELETE", "delete": - return "delete" - case "CONNECT", "connect": - return "connect" - case "OPTIONS", "options": - return "options" - case "NOTIFY", "notify": - return "notify" - default: - return strings.ToLower(m) - } -} - -// If the wrapped http.Handler has not set a status code, i.e. the value is -// currently 0, santizeCode will return 200, for consistency with behavior in -// the stdlib. -func sanitizeCode(s int) string { - switch s { - case 100: - return "100" - case 101: - return "101" - - case 200, 0: - return "200" - case 201: - return "201" - case 202: - return "202" - case 203: - return "203" - case 204: - return "204" - case 205: - return "205" - case 206: - return "206" - - case 300: - return "300" - case 301: - return "301" - case 302: - return "302" - case 304: - return "304" - case 305: - return "305" - case 307: - return "307" - - case 400: - return "400" - case 401: - return "401" - case 402: - return "402" - case 403: - return "403" - case 404: - return "404" - case 405: - return "405" - case 406: - return "406" - case 407: - return "407" - case 408: - return "408" - case 409: - return "409" - case 410: - return "410" - case 411: - return "411" - case 412: - return "412" - case 413: - return "413" - case 414: - return "414" - case 415: - return "415" - case 416: - return "416" - case 417: - return "417" - case 418: - return "418" - - case 500: - return "500" - case 501: - return "501" - case 502: - return "502" - case 503: - return "503" - case 504: - return "504" - case 505: - return "505" - - case 428: - return "428" - case 429: - return "429" - case 431: - return "431" - case 511: - return "511" - - default: - return strconv.Itoa(s) - } -} - -type delegator interface { - Status() int - Written() int64 - - http.ResponseWriter -} - -type responseWriterDelegator struct { - http.ResponseWriter - - handler, method string - status int - written int64 - wroteHeader bool - observeWriteHeader func(int) -} - -func (r *responseWriterDelegator) Status() int { - return r.status -} - -func (r *responseWriterDelegator) Written() int64 { - return r.written -} - -func (r *responseWriterDelegator) WriteHeader(code int) { - r.status = code - r.wroteHeader = true - r.ResponseWriter.WriteHeader(code) - if r.observeWriteHeader != nil { - r.observeWriteHeader(code) - } -} - -func (r *responseWriterDelegator) Write(b []byte) (int, error) { - if !r.wroteHeader { - r.WriteHeader(http.StatusOK) - } - n, err := r.ResponseWriter.Write(b) - r.written += int64(n) - return n, err -} - -type fancyDelegator struct { - *responseWriterDelegator -} - -func (r *fancyDelegator) CloseNotify() <-chan bool { - return r.ResponseWriter.(http.CloseNotifier).CloseNotify() -} - -func (r *fancyDelegator) Hijack() (net.Conn, *bufio.ReadWriter, error) { - return r.ResponseWriter.(http.Hijacker).Hijack() -} - -func (r *fancyDelegator) Flush() { - r.ResponseWriter.(http.Flusher).Flush() -} - -func (r *fancyDelegator) ReadFrom(re io.Reader) (int64, error) { - if !r.wroteHeader { - r.WriteHeader(http.StatusOK) - } - n, err := r.ResponseWriter.(io.ReaderFrom).ReadFrom(re) - r.written += n - return n, err -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/registry.go b/vendor/github.com/prometheus/client_golang/prometheus/registry.go index 8c6b5bd8e..32a3986b0 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/registry.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/registry.go @@ -152,6 +152,38 @@ func MustRegister(cs ...Collector) { DefaultRegisterer.MustRegister(cs...) } +// RegisterOrGet registers the provided Collector with the DefaultRegisterer and +// returns the Collector, unless an equal Collector was registered before, in +// which case that Collector is returned. +// +// Deprecated: RegisterOrGet is merely a convenience function for the +// implementation as described in the documentation for +// AlreadyRegisteredError. As the use case is relatively rare, this function +// will be removed in a future version of this package to clean up the +// namespace. +func RegisterOrGet(c Collector) (Collector, error) { + if err := Register(c); err != nil { + if are, ok := err.(AlreadyRegisteredError); ok { + return are.ExistingCollector, nil + } + return nil, err + } + return c, nil +} + +// MustRegisterOrGet behaves like RegisterOrGet but panics instead of returning +// an error. +// +// Deprecated: This is deprecated for the same reason RegisterOrGet is. See +// there for details. +func MustRegisterOrGet(c Collector) Collector { + c, err := RegisterOrGet(c) + if err != nil { + panic(err) + } + return c +} + // Unregister removes the registration of the provided Collector from the // DefaultRegisterer. // @@ -169,6 +201,25 @@ func (gf GathererFunc) Gather() ([]*dto.MetricFamily, error) { return gf() } +// SetMetricFamilyInjectionHook replaces the DefaultGatherer with one that +// gathers from the previous DefaultGatherers but then merges the MetricFamily +// protobufs returned from the provided hook function with the MetricFamily +// protobufs returned from the original DefaultGatherer. +// +// Deprecated: This function manipulates the DefaultGatherer variable. Consider +// the implications, i.e. don't do this concurrently with any uses of the +// DefaultGatherer. In the rare cases where you need to inject MetricFamily +// protobufs directly, it is recommended to use a custom Registry and combine it +// with a custom Gatherer using the Gatherers type (see +// there). SetMetricFamilyInjectionHook only exists for compatibility reasons +// with previous versions of this package. +func SetMetricFamilyInjectionHook(hook func() []*dto.MetricFamily) { + DefaultGatherer = Gatherers{ + DefaultGatherer, + GathererFunc(func() ([]*dto.MetricFamily, error) { return hook(), nil }), + } +} + // AlreadyRegisteredError is returned by the Register method if the Collector to // be registered has already been registered before, or a different Collector // that collects the same metrics has been registered before. Registration fails @@ -243,7 +294,7 @@ func (r *Registry) Register(c Collector) error { }() r.mtx.Lock() defer r.mtx.Unlock() - // Conduct various tests... + // Coduct various tests... for desc := range descChan { // Is the descriptor valid at all? @@ -396,7 +447,7 @@ func (r *Registry) Gather() ([]*dto.MetricFamily, error) { // Drain metricChan in case of premature return. defer func() { - for range metricChan { + for _ = range metricChan { } }() @@ -632,7 +683,7 @@ func (s metricSorter) Less(i, j int) bool { return s[i].GetTimestampMs() < s[j].GetTimestampMs() } -// normalizeMetricFamilies returns a MetricFamily slice with empty +// normalizeMetricFamilies returns a MetricFamily slice whith empty // MetricFamilies pruned and the remaining MetricFamilies sorted by name within // the slice, with the contained Metrics sorted within each MetricFamily. func normalizeMetricFamilies(metricFamiliesByName map[string]*dto.MetricFamily) []*dto.MetricFamily { diff --git a/vendor/github.com/prometheus/client_golang/prometheus/registry_test.go b/vendor/github.com/prometheus/client_golang/prometheus/registry_test.go new file mode 100644 index 000000000..9dacb6256 --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/registry_test.go @@ -0,0 +1,545 @@ +// Copyright 2014 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Copyright (c) 2013, The Prometheus Authors +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be found +// in the LICENSE file. + +package prometheus_test + +import ( + "bytes" + "net/http" + "net/http/httptest" + "testing" + + dto "github.com/prometheus/client_model/go" + + "github.com/golang/protobuf/proto" + "github.com/prometheus/common/expfmt" + + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promhttp" +) + +func testHandler(t testing.TB) { + + metricVec := prometheus.NewCounterVec( + prometheus.CounterOpts{ + Name: "name", + Help: "docstring", + ConstLabels: prometheus.Labels{"constname": "constvalue"}, + }, + []string{"labelname"}, + ) + + metricVec.WithLabelValues("val1").Inc() + metricVec.WithLabelValues("val2").Inc() + + externalMetricFamily := &dto.MetricFamily{ + Name: proto.String("externalname"), + Help: proto.String("externaldocstring"), + Type: dto.MetricType_COUNTER.Enum(), + Metric: []*dto.Metric{ + { + Label: []*dto.LabelPair{ + { + Name: proto.String("externalconstname"), + Value: proto.String("externalconstvalue"), + }, + { + Name: proto.String("externallabelname"), + Value: proto.String("externalval1"), + }, + }, + Counter: &dto.Counter{ + Value: proto.Float64(1), + }, + }, + }, + } + externalBuf := &bytes.Buffer{} + enc := expfmt.NewEncoder(externalBuf, expfmt.FmtProtoDelim) + if err := enc.Encode(externalMetricFamily); err != nil { + t.Fatal(err) + } + externalMetricFamilyAsBytes := externalBuf.Bytes() + externalMetricFamilyAsText := []byte(`# HELP externalname externaldocstring +# TYPE externalname counter +externalname{externalconstname="externalconstvalue",externallabelname="externalval1"} 1 +`) + externalMetricFamilyAsProtoText := []byte(`name: "externalname" +help: "externaldocstring" +type: COUNTER +metric: < + label: < + name: "externalconstname" + value: "externalconstvalue" + > + label: < + name: "externallabelname" + value: "externalval1" + > + counter: < + value: 1 + > +> + +`) + externalMetricFamilyAsProtoCompactText := []byte(`name:"externalname" help:"externaldocstring" type:COUNTER metric: label: counter: > +`) + + expectedMetricFamily := &dto.MetricFamily{ + Name: proto.String("name"), + Help: proto.String("docstring"), + Type: dto.MetricType_COUNTER.Enum(), + Metric: []*dto.Metric{ + { + Label: []*dto.LabelPair{ + { + Name: proto.String("constname"), + Value: proto.String("constvalue"), + }, + { + Name: proto.String("labelname"), + Value: proto.String("val1"), + }, + }, + Counter: &dto.Counter{ + Value: proto.Float64(1), + }, + }, + { + Label: []*dto.LabelPair{ + { + Name: proto.String("constname"), + Value: proto.String("constvalue"), + }, + { + Name: proto.String("labelname"), + Value: proto.String("val2"), + }, + }, + Counter: &dto.Counter{ + Value: proto.Float64(1), + }, + }, + }, + } + buf := &bytes.Buffer{} + enc = expfmt.NewEncoder(buf, expfmt.FmtProtoDelim) + if err := enc.Encode(expectedMetricFamily); err != nil { + t.Fatal(err) + } + expectedMetricFamilyAsBytes := buf.Bytes() + expectedMetricFamilyAsText := []byte(`# HELP name docstring +# TYPE name counter +name{constname="constvalue",labelname="val1"} 1 +name{constname="constvalue",labelname="val2"} 1 +`) + expectedMetricFamilyAsProtoText := []byte(`name: "name" +help: "docstring" +type: COUNTER +metric: < + label: < + name: "constname" + value: "constvalue" + > + label: < + name: "labelname" + value: "val1" + > + counter: < + value: 1 + > +> +metric: < + label: < + name: "constname" + value: "constvalue" + > + label: < + name: "labelname" + value: "val2" + > + counter: < + value: 1 + > +> + +`) + expectedMetricFamilyAsProtoCompactText := []byte(`name:"name" help:"docstring" type:COUNTER metric: label: counter: > metric: label: counter: > +`) + + externalMetricFamilyWithSameName := &dto.MetricFamily{ + Name: proto.String("name"), + Help: proto.String("docstring"), + Type: dto.MetricType_COUNTER.Enum(), + Metric: []*dto.Metric{ + { + Label: []*dto.LabelPair{ + { + Name: proto.String("constname"), + Value: proto.String("constvalue"), + }, + { + Name: proto.String("labelname"), + Value: proto.String("different_val"), + }, + }, + Counter: &dto.Counter{ + Value: proto.Float64(42), + }, + }, + }, + } + + expectedMetricFamilyMergedWithExternalAsProtoCompactText := []byte(`name:"name" help:"docstring" type:COUNTER metric: label: counter: > metric: label: counter: > metric: label: counter: > +`) + + type output struct { + headers map[string]string + body []byte + } + + var scenarios = []struct { + headers map[string]string + out output + collector prometheus.Collector + externalMF []*dto.MetricFamily + }{ + { // 0 + headers: map[string]string{ + "Accept": "foo/bar;q=0.2, dings/bums;q=0.8", + }, + out: output{ + headers: map[string]string{ + "Content-Type": `text/plain; version=0.0.4`, + }, + body: []byte{}, + }, + }, + { // 1 + headers: map[string]string{ + "Accept": "foo/bar;q=0.2, application/quark;q=0.8", + }, + out: output{ + headers: map[string]string{ + "Content-Type": `text/plain; version=0.0.4`, + }, + body: []byte{}, + }, + }, + { // 2 + headers: map[string]string{ + "Accept": "foo/bar;q=0.2, application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=bla;q=0.8", + }, + out: output{ + headers: map[string]string{ + "Content-Type": `text/plain; version=0.0.4`, + }, + body: []byte{}, + }, + }, + { // 3 + headers: map[string]string{ + "Accept": "text/plain;q=0.2, application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=delimited;q=0.8", + }, + out: output{ + headers: map[string]string{ + "Content-Type": `application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited`, + }, + body: []byte{}, + }, + }, + { // 4 + headers: map[string]string{ + "Accept": "application/json", + }, + out: output{ + headers: map[string]string{ + "Content-Type": `text/plain; version=0.0.4`, + }, + body: expectedMetricFamilyAsText, + }, + collector: metricVec, + }, + { // 5 + headers: map[string]string{ + "Accept": "application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=delimited", + }, + out: output{ + headers: map[string]string{ + "Content-Type": `application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited`, + }, + body: expectedMetricFamilyAsBytes, + }, + collector: metricVec, + }, + { // 6 + headers: map[string]string{ + "Accept": "application/json", + }, + out: output{ + headers: map[string]string{ + "Content-Type": `text/plain; version=0.0.4`, + }, + body: externalMetricFamilyAsText, + }, + externalMF: []*dto.MetricFamily{externalMetricFamily}, + }, + { // 7 + headers: map[string]string{ + "Accept": "application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=delimited", + }, + out: output{ + headers: map[string]string{ + "Content-Type": `application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited`, + }, + body: externalMetricFamilyAsBytes, + }, + externalMF: []*dto.MetricFamily{externalMetricFamily}, + }, + { // 8 + headers: map[string]string{ + "Accept": "application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=delimited", + }, + out: output{ + headers: map[string]string{ + "Content-Type": `application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited`, + }, + body: bytes.Join( + [][]byte{ + externalMetricFamilyAsBytes, + expectedMetricFamilyAsBytes, + }, + []byte{}, + ), + }, + collector: metricVec, + externalMF: []*dto.MetricFamily{externalMetricFamily}, + }, + { // 9 + headers: map[string]string{ + "Accept": "text/plain", + }, + out: output{ + headers: map[string]string{ + "Content-Type": `text/plain; version=0.0.4`, + }, + body: []byte{}, + }, + }, + { // 10 + headers: map[string]string{ + "Accept": "application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=bla;q=0.2, text/plain;q=0.5", + }, + out: output{ + headers: map[string]string{ + "Content-Type": `text/plain; version=0.0.4`, + }, + body: expectedMetricFamilyAsText, + }, + collector: metricVec, + }, + { // 11 + headers: map[string]string{ + "Accept": "application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=bla;q=0.2, text/plain;q=0.5;version=0.0.4", + }, + out: output{ + headers: map[string]string{ + "Content-Type": `text/plain; version=0.0.4`, + }, + body: bytes.Join( + [][]byte{ + externalMetricFamilyAsText, + expectedMetricFamilyAsText, + }, + []byte{}, + ), + }, + collector: metricVec, + externalMF: []*dto.MetricFamily{externalMetricFamily}, + }, + { // 12 + headers: map[string]string{ + "Accept": "application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=delimited;q=0.2, text/plain;q=0.5;version=0.0.2", + }, + out: output{ + headers: map[string]string{ + "Content-Type": `application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited`, + }, + body: bytes.Join( + [][]byte{ + externalMetricFamilyAsBytes, + expectedMetricFamilyAsBytes, + }, + []byte{}, + ), + }, + collector: metricVec, + externalMF: []*dto.MetricFamily{externalMetricFamily}, + }, + { // 13 + headers: map[string]string{ + "Accept": "application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=text;q=0.5, application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=delimited;q=0.4", + }, + out: output{ + headers: map[string]string{ + "Content-Type": `application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=text`, + }, + body: bytes.Join( + [][]byte{ + externalMetricFamilyAsProtoText, + expectedMetricFamilyAsProtoText, + }, + []byte{}, + ), + }, + collector: metricVec, + externalMF: []*dto.MetricFamily{externalMetricFamily}, + }, + { // 14 + headers: map[string]string{ + "Accept": "application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=compact-text", + }, + out: output{ + headers: map[string]string{ + "Content-Type": `application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=compact-text`, + }, + body: bytes.Join( + [][]byte{ + externalMetricFamilyAsProtoCompactText, + expectedMetricFamilyAsProtoCompactText, + }, + []byte{}, + ), + }, + collector: metricVec, + externalMF: []*dto.MetricFamily{externalMetricFamily}, + }, + { // 15 + headers: map[string]string{ + "Accept": "application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=compact-text", + }, + out: output{ + headers: map[string]string{ + "Content-Type": `application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=compact-text`, + }, + body: bytes.Join( + [][]byte{ + externalMetricFamilyAsProtoCompactText, + expectedMetricFamilyMergedWithExternalAsProtoCompactText, + }, + []byte{}, + ), + }, + collector: metricVec, + externalMF: []*dto.MetricFamily{ + externalMetricFamily, + externalMetricFamilyWithSameName, + }, + }, + } + for i, scenario := range scenarios { + registry := prometheus.NewPedanticRegistry() + gatherer := prometheus.Gatherer(registry) + if scenario.externalMF != nil { + gatherer = prometheus.Gatherers{ + registry, + prometheus.GathererFunc(func() ([]*dto.MetricFamily, error) { + return scenario.externalMF, nil + }), + } + } + + if scenario.collector != nil { + registry.Register(scenario.collector) + } + writer := httptest.NewRecorder() + handler := prometheus.InstrumentHandler("prometheus", promhttp.HandlerFor(gatherer, promhttp.HandlerOpts{})) + request, _ := http.NewRequest("GET", "/", nil) + for key, value := range scenario.headers { + request.Header.Add(key, value) + } + handler(writer, request) + + for key, value := range scenario.out.headers { + if writer.HeaderMap.Get(key) != value { + t.Errorf( + "%d. expected %q for header %q, got %q", + i, value, key, writer.Header().Get(key), + ) + } + } + + if !bytes.Equal(scenario.out.body, writer.Body.Bytes()) { + t.Errorf( + "%d. expected body:\n%s\ngot body:\n%s\n", + i, scenario.out.body, writer.Body.Bytes(), + ) + } + } +} + +func TestHandler(t *testing.T) { + testHandler(t) +} + +func BenchmarkHandler(b *testing.B) { + for i := 0; i < b.N; i++ { + testHandler(b) + } +} + +func TestRegisterWithOrGet(t *testing.T) { + // Replace the default registerer just to be sure. This is bad, but this + // whole test will go away once RegisterOrGet is removed. + oldRegisterer := prometheus.DefaultRegisterer + defer func() { + prometheus.DefaultRegisterer = oldRegisterer + }() + prometheus.DefaultRegisterer = prometheus.NewRegistry() + original := prometheus.NewCounterVec( + prometheus.CounterOpts{ + Name: "test", + Help: "help", + }, + []string{"foo", "bar"}, + ) + equalButNotSame := prometheus.NewCounterVec( + prometheus.CounterOpts{ + Name: "test", + Help: "help", + }, + []string{"foo", "bar"}, + ) + if err := prometheus.Register(original); err != nil { + t.Fatal(err) + } + if err := prometheus.Register(equalButNotSame); err == nil { + t.Fatal("expected error when registringe equal collector") + } + existing, err := prometheus.RegisterOrGet(equalButNotSame) + if err != nil { + t.Fatal(err) + } + if existing != original { + t.Error("expected original collector but got something else") + } + if existing == equalButNotSame { + t.Error("expected original callector but got new one") + } +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/summary.go b/vendor/github.com/prometheus/client_golang/prometheus/summary.go index 1c65e25ec..bce05bf9a 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/summary.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/summary.go @@ -54,9 +54,6 @@ type Summary interface { } // DefObjectives are the default Summary quantile values. -// -// Deprecated: DefObjectives will not be used as the default objectives in -// v0.10 of the library. The default Summary will have no quantiles then. var ( DefObjectives = map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001} @@ -116,15 +113,9 @@ type SummaryOpts struct { ConstLabels Labels // Objectives defines the quantile rank estimates with their respective - // absolute error. If Objectives[q] = e, then the value reported for q - // will be the φ-quantile value for some φ between q-e and q+e. The - // default value is DefObjectives. It is used if Objectives is left at - // its zero value (i.e. nil). To create a Summary without Objectives, - // set it to an empty map (i.e. map[float64]float64{}). - // - // Deprecated: Note that the current value of DefObjectives is - // deprecated. It will be replaced by an empty map in v0.10 of the - // library. Please explicitly set Objectives to the desired value. + // absolute error. If Objectives[q] = e, then the value reported + // for q will be the φ-quantile value for some φ between q-e and q+e. + // The default value is DefObjectives. Objectives map[float64]float64 // MaxAge defines the duration for which an observation stays relevant @@ -192,7 +183,7 @@ func newSummary(desc *Desc, opts SummaryOpts, labelValues ...string) Summary { } } - if opts.Objectives == nil { + if len(opts.Objectives) == 0 { opts.Objectives = DefObjectives } @@ -419,24 +410,24 @@ func NewSummaryVec(opts SummaryOpts, labelNames []string) *SummaryVec { } } -// GetMetricWithLabelValues replaces the method of the same name in MetricVec. -// The difference is that this method returns an Observer and not a Metric so -// that no type conversion to an Observer is required. -func (m *SummaryVec) GetMetricWithLabelValues(lvs ...string) (Observer, error) { +// GetMetricWithLabelValues replaces the method of the same name in +// MetricVec. The difference is that this method returns a Summary and not a +// Metric so that no type conversion is required. +func (m *SummaryVec) GetMetricWithLabelValues(lvs ...string) (Summary, error) { metric, err := m.MetricVec.GetMetricWithLabelValues(lvs...) if metric != nil { - return metric.(Observer), err + return metric.(Summary), err } return nil, err } // GetMetricWith replaces the method of the same name in MetricVec. The -// difference is that this method returns an Observer and not a Metric so that -// no type conversion to an Observer is required. -func (m *SummaryVec) GetMetricWith(labels Labels) (Observer, error) { +// difference is that this method returns a Summary and not a Metric so that no +// type conversion is required. +func (m *SummaryVec) GetMetricWith(labels Labels) (Summary, error) { metric, err := m.MetricVec.GetMetricWith(labels) if metric != nil { - return metric.(Observer), err + return metric.(Summary), err } return nil, err } @@ -445,15 +436,15 @@ func (m *SummaryVec) GetMetricWith(labels Labels) (Observer, error) { // GetMetricWithLabelValues would have returned an error. By not returning an // error, WithLabelValues allows shortcuts like // myVec.WithLabelValues("404", "GET").Observe(42.21) -func (m *SummaryVec) WithLabelValues(lvs ...string) Observer { - return m.MetricVec.WithLabelValues(lvs...).(Observer) +func (m *SummaryVec) WithLabelValues(lvs ...string) Summary { + return m.MetricVec.WithLabelValues(lvs...).(Summary) } // With works as GetMetricWith, but panics where GetMetricWithLabels would have // returned an error. By not returning an error, With allows shortcuts like // myVec.With(Labels{"code": "404", "method": "GET"}).Observe(42.21) -func (m *SummaryVec) With(labels Labels) Observer { - return m.MetricVec.With(labels).(Observer) +func (m *SummaryVec) With(labels Labels) Summary { + return m.MetricVec.With(labels).(Summary) } type constSummary struct { diff --git a/vendor/github.com/prometheus/client_golang/prometheus/summary_test.go b/vendor/github.com/prometheus/client_golang/prometheus/summary_test.go new file mode 100644 index 000000000..c4575ffbd --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/summary_test.go @@ -0,0 +1,347 @@ +// Copyright 2014 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package prometheus + +import ( + "math" + "math/rand" + "sort" + "sync" + "testing" + "testing/quick" + "time" + + dto "github.com/prometheus/client_model/go" +) + +func benchmarkSummaryObserve(w int, b *testing.B) { + b.StopTimer() + + wg := new(sync.WaitGroup) + wg.Add(w) + + g := new(sync.WaitGroup) + g.Add(1) + + s := NewSummary(SummaryOpts{}) + + for i := 0; i < w; i++ { + go func() { + g.Wait() + + for i := 0; i < b.N; i++ { + s.Observe(float64(i)) + } + + wg.Done() + }() + } + + b.StartTimer() + g.Done() + wg.Wait() +} + +func BenchmarkSummaryObserve1(b *testing.B) { + benchmarkSummaryObserve(1, b) +} + +func BenchmarkSummaryObserve2(b *testing.B) { + benchmarkSummaryObserve(2, b) +} + +func BenchmarkSummaryObserve4(b *testing.B) { + benchmarkSummaryObserve(4, b) +} + +func BenchmarkSummaryObserve8(b *testing.B) { + benchmarkSummaryObserve(8, b) +} + +func benchmarkSummaryWrite(w int, b *testing.B) { + b.StopTimer() + + wg := new(sync.WaitGroup) + wg.Add(w) + + g := new(sync.WaitGroup) + g.Add(1) + + s := NewSummary(SummaryOpts{}) + + for i := 0; i < 1000000; i++ { + s.Observe(float64(i)) + } + + for j := 0; j < w; j++ { + outs := make([]dto.Metric, b.N) + + go func(o []dto.Metric) { + g.Wait() + + for i := 0; i < b.N; i++ { + s.Write(&o[i]) + } + + wg.Done() + }(outs) + } + + b.StartTimer() + g.Done() + wg.Wait() +} + +func BenchmarkSummaryWrite1(b *testing.B) { + benchmarkSummaryWrite(1, b) +} + +func BenchmarkSummaryWrite2(b *testing.B) { + benchmarkSummaryWrite(2, b) +} + +func BenchmarkSummaryWrite4(b *testing.B) { + benchmarkSummaryWrite(4, b) +} + +func BenchmarkSummaryWrite8(b *testing.B) { + benchmarkSummaryWrite(8, b) +} + +func TestSummaryConcurrency(t *testing.T) { + if testing.Short() { + t.Skip("Skipping test in short mode.") + } + + rand.Seed(42) + + it := func(n uint32) bool { + mutations := int(n%1e4 + 1e4) + concLevel := int(n%5 + 1) + total := mutations * concLevel + + var start, end sync.WaitGroup + start.Add(1) + end.Add(concLevel) + + sum := NewSummary(SummaryOpts{ + Name: "test_summary", + Help: "helpless", + }) + + allVars := make([]float64, total) + var sampleSum float64 + for i := 0; i < concLevel; i++ { + vals := make([]float64, mutations) + for j := 0; j < mutations; j++ { + v := rand.NormFloat64() + vals[j] = v + allVars[i*mutations+j] = v + sampleSum += v + } + + go func(vals []float64) { + start.Wait() + for _, v := range vals { + sum.Observe(v) + } + end.Done() + }(vals) + } + sort.Float64s(allVars) + start.Done() + end.Wait() + + m := &dto.Metric{} + sum.Write(m) + if got, want := int(*m.Summary.SampleCount), total; got != want { + t.Errorf("got sample count %d, want %d", got, want) + } + if got, want := *m.Summary.SampleSum, sampleSum; math.Abs((got-want)/want) > 0.001 { + t.Errorf("got sample sum %f, want %f", got, want) + } + + objectives := make([]float64, 0, len(DefObjectives)) + for qu := range DefObjectives { + objectives = append(objectives, qu) + } + sort.Float64s(objectives) + + for i, wantQ := range objectives { + ε := DefObjectives[wantQ] + gotQ := *m.Summary.Quantile[i].Quantile + gotV := *m.Summary.Quantile[i].Value + min, max := getBounds(allVars, wantQ, ε) + if gotQ != wantQ { + t.Errorf("got quantile %f, want %f", gotQ, wantQ) + } + if gotV < min || gotV > max { + t.Errorf("got %f for quantile %f, want [%f,%f]", gotV, gotQ, min, max) + } + } + return true + } + + if err := quick.Check(it, nil); err != nil { + t.Error(err) + } +} + +func TestSummaryVecConcurrency(t *testing.T) { + if testing.Short() { + t.Skip("Skipping test in short mode.") + } + + rand.Seed(42) + + objectives := make([]float64, 0, len(DefObjectives)) + for qu := range DefObjectives { + + objectives = append(objectives, qu) + } + sort.Float64s(objectives) + + it := func(n uint32) bool { + mutations := int(n%1e4 + 1e4) + concLevel := int(n%7 + 1) + vecLength := int(n%3 + 1) + + var start, end sync.WaitGroup + start.Add(1) + end.Add(concLevel) + + sum := NewSummaryVec( + SummaryOpts{ + Name: "test_summary", + Help: "helpless", + }, + []string{"label"}, + ) + + allVars := make([][]float64, vecLength) + sampleSums := make([]float64, vecLength) + for i := 0; i < concLevel; i++ { + vals := make([]float64, mutations) + picks := make([]int, mutations) + for j := 0; j < mutations; j++ { + v := rand.NormFloat64() + vals[j] = v + pick := rand.Intn(vecLength) + picks[j] = pick + allVars[pick] = append(allVars[pick], v) + sampleSums[pick] += v + } + + go func(vals []float64) { + start.Wait() + for i, v := range vals { + sum.WithLabelValues(string('A' + picks[i])).Observe(v) + } + end.Done() + }(vals) + } + for _, vars := range allVars { + sort.Float64s(vars) + } + start.Done() + end.Wait() + + for i := 0; i < vecLength; i++ { + m := &dto.Metric{} + s := sum.WithLabelValues(string('A' + i)) + s.Write(m) + if got, want := int(*m.Summary.SampleCount), len(allVars[i]); got != want { + t.Errorf("got sample count %d for label %c, want %d", got, 'A'+i, want) + } + if got, want := *m.Summary.SampleSum, sampleSums[i]; math.Abs((got-want)/want) > 0.001 { + t.Errorf("got sample sum %f for label %c, want %f", got, 'A'+i, want) + } + for j, wantQ := range objectives { + ε := DefObjectives[wantQ] + gotQ := *m.Summary.Quantile[j].Quantile + gotV := *m.Summary.Quantile[j].Value + min, max := getBounds(allVars[i], wantQ, ε) + if gotQ != wantQ { + t.Errorf("got quantile %f for label %c, want %f", gotQ, 'A'+i, wantQ) + } + if gotV < min || gotV > max { + t.Errorf("got %f for quantile %f for label %c, want [%f,%f]", gotV, gotQ, 'A'+i, min, max) + } + } + } + return true + } + + if err := quick.Check(it, nil); err != nil { + t.Error(err) + } +} + +func TestSummaryDecay(t *testing.T) { + if testing.Short() { + t.Skip("Skipping test in short mode.") + // More because it depends on timing than because it is particularly long... + } + + sum := NewSummary(SummaryOpts{ + Name: "test_summary", + Help: "helpless", + MaxAge: 100 * time.Millisecond, + Objectives: map[float64]float64{0.1: 0.001}, + AgeBuckets: 10, + }) + + m := &dto.Metric{} + i := 0 + tick := time.NewTicker(time.Millisecond) + for _ = range tick.C { + i++ + sum.Observe(float64(i)) + if i%10 == 0 { + sum.Write(m) + if got, want := *m.Summary.Quantile[0].Value, math.Max(float64(i)/10, float64(i-90)); math.Abs(got-want) > 20 { + t.Errorf("%d. got %f, want %f", i, got, want) + } + m.Reset() + } + if i >= 1000 { + break + } + } + tick.Stop() + // Wait for MaxAge without observations and make sure quantiles are NaN. + time.Sleep(100 * time.Millisecond) + sum.Write(m) + if got := *m.Summary.Quantile[0].Value; !math.IsNaN(got) { + t.Errorf("got %f, want NaN after expiration", got) + } +} + +func getBounds(vars []float64, q, ε float64) (min, max float64) { + // TODO(beorn7): This currently tolerates an error of up to 2*ε. The + // error must be at most ε, but for some reason, it's sometimes slightly + // higher. That's a bug. + n := float64(len(vars)) + lower := int((q - 2*ε) * n) + upper := int(math.Ceil((q + 2*ε) * n)) + min = vars[0] + if lower > 1 { + min = vars[lower-1] + } + max = vars[len(vars)-1] + if upper < len(vars) { + max = vars[upper-1] + } + return +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/timer.go b/vendor/github.com/prometheus/client_golang/prometheus/timer.go deleted file mode 100644 index 12b65699b..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/timer.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2016 The Prometheus Authors -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package prometheus - -import "time" - -// Timer is a helper type to time functions. Use NewTimer to create new -// instances. -type Timer struct { - begin time.Time - observer Observer -} - -// NewTimer creates a new Timer. The provided Observer is used to observe a -// duration in seconds. Timer is usually used to time a function call in the -// following way: -// func TimeMe() { -// timer := NewTimer(myHistogram) -// defer timer.ObserveDuration() -// // Do actual work. -// } -func NewTimer(o Observer) *Timer { - return &Timer{ - begin: time.Now(), - observer: o, - } -} - -// ObserveDuration records the duration passed since the Timer was created with -// NewTimer. It calls the Observe method of the Observer provided during -// construction with the duration in seconds as an argument. ObserveDuration is -// usually called with a defer statement. -func (t *Timer) ObserveDuration() { - if t.observer != nil { - t.observer.Observe(time.Since(t.begin).Seconds()) - } -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/untyped.go b/vendor/github.com/prometheus/client_golang/prometheus/untyped.go index 065501d38..5faf7e6e3 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/untyped.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/untyped.go @@ -20,11 +20,6 @@ package prometheus // no type information is implied. // // To create Untyped instances, use NewUntyped. -// -// Deprecated: The Untyped type is deprecated because it doesn't make sense in -// direct instrumentation. If you need to mirror an external metric of unknown -// type (usually while writing exporters), Use MustNewConstMetric to create an -// untyped metric instance on the fly. type Untyped interface { Metric Collector diff --git a/vendor/github.com/prometheus/client_golang/prometheus/value.go b/vendor/github.com/prometheus/client_golang/prometheus/value.go index ff75ce585..a944c3775 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/value.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/value.go @@ -19,7 +19,6 @@ import ( "math" "sort" "sync/atomic" - "time" dto "github.com/prometheus/client_model/go" @@ -44,7 +43,7 @@ var errInconsistentCardinality = errors.New("inconsistent label cardinality") // ValueType. This is a low-level building block used by the library to back the // implementations of Counter, Gauge, and Untyped. type value struct { - // valBits contains the bits of the represented float64 value. It has + // valBits containst the bits of the represented float64 value. It has // to go first in the struct to guarantee alignment for atomic // operations. http://golang.org/pkg/sync/atomic/#pkg-note-BUG valBits uint64 @@ -81,10 +80,6 @@ func (v *value) Set(val float64) { atomic.StoreUint64(&v.valBits, math.Float64bits(val)) } -func (v *value) SetToCurrentTime() { - v.Set(float64(time.Now().UnixNano()) / 1e9) -} - func (v *value) Inc() { v.Add(1) } diff --git a/vendor/github.com/prometheus/client_golang/prometheus/vec_test.go b/vendor/github.com/prometheus/client_golang/prometheus/vec_test.go new file mode 100644 index 000000000..445a6b39f --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/vec_test.go @@ -0,0 +1,312 @@ +// Copyright 2014 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package prometheus + +import ( + "fmt" + "testing" + + dto "github.com/prometheus/client_model/go" +) + +func TestDelete(t *testing.T) { + vec := NewUntypedVec( + UntypedOpts{ + Name: "test", + Help: "helpless", + }, + []string{"l1", "l2"}, + ) + testDelete(t, vec) +} + +func TestDeleteWithCollisions(t *testing.T) { + vec := NewUntypedVec( + UntypedOpts{ + Name: "test", + Help: "helpless", + }, + []string{"l1", "l2"}, + ) + vec.hashAdd = func(h uint64, s string) uint64 { return 1 } + vec.hashAddByte = func(h uint64, b byte) uint64 { return 1 } + testDelete(t, vec) +} + +func testDelete(t *testing.T, vec *UntypedVec) { + if got, want := vec.Delete(Labels{"l1": "v1", "l2": "v2"}), false; got != want { + t.Errorf("got %v, want %v", got, want) + } + + vec.With(Labels{"l1": "v1", "l2": "v2"}).(Untyped).Set(42) + if got, want := vec.Delete(Labels{"l1": "v1", "l2": "v2"}), true; got != want { + t.Errorf("got %v, want %v", got, want) + } + if got, want := vec.Delete(Labels{"l1": "v1", "l2": "v2"}), false; got != want { + t.Errorf("got %v, want %v", got, want) + } + + vec.With(Labels{"l1": "v1", "l2": "v2"}).(Untyped).Set(42) + if got, want := vec.Delete(Labels{"l2": "v2", "l1": "v1"}), true; got != want { + t.Errorf("got %v, want %v", got, want) + } + if got, want := vec.Delete(Labels{"l2": "v2", "l1": "v1"}), false; got != want { + t.Errorf("got %v, want %v", got, want) + } + + vec.With(Labels{"l1": "v1", "l2": "v2"}).(Untyped).Set(42) + if got, want := vec.Delete(Labels{"l2": "v1", "l1": "v2"}), false; got != want { + t.Errorf("got %v, want %v", got, want) + } + if got, want := vec.Delete(Labels{"l1": "v1"}), false; got != want { + t.Errorf("got %v, want %v", got, want) + } +} + +func TestDeleteLabelValues(t *testing.T) { + vec := NewUntypedVec( + UntypedOpts{ + Name: "test", + Help: "helpless", + }, + []string{"l1", "l2"}, + ) + testDeleteLabelValues(t, vec) +} + +func TestDeleteLabelValuesWithCollisions(t *testing.T) { + vec := NewUntypedVec( + UntypedOpts{ + Name: "test", + Help: "helpless", + }, + []string{"l1", "l2"}, + ) + vec.hashAdd = func(h uint64, s string) uint64 { return 1 } + vec.hashAddByte = func(h uint64, b byte) uint64 { return 1 } + testDeleteLabelValues(t, vec) +} + +func testDeleteLabelValues(t *testing.T, vec *UntypedVec) { + if got, want := vec.DeleteLabelValues("v1", "v2"), false; got != want { + t.Errorf("got %v, want %v", got, want) + } + + vec.With(Labels{"l1": "v1", "l2": "v2"}).(Untyped).Set(42) + vec.With(Labels{"l1": "v1", "l2": "v3"}).(Untyped).Set(42) // Add junk data for collision. + if got, want := vec.DeleteLabelValues("v1", "v2"), true; got != want { + t.Errorf("got %v, want %v", got, want) + } + if got, want := vec.DeleteLabelValues("v1", "v2"), false; got != want { + t.Errorf("got %v, want %v", got, want) + } + if got, want := vec.DeleteLabelValues("v1", "v3"), true; got != want { + t.Errorf("got %v, want %v", got, want) + } + + vec.With(Labels{"l1": "v1", "l2": "v2"}).(Untyped).Set(42) + // Delete out of order. + if got, want := vec.DeleteLabelValues("v2", "v1"), false; got != want { + t.Errorf("got %v, want %v", got, want) + } + if got, want := vec.DeleteLabelValues("v1"), false; got != want { + t.Errorf("got %v, want %v", got, want) + } +} + +func TestMetricVec(t *testing.T) { + vec := NewUntypedVec( + UntypedOpts{ + Name: "test", + Help: "helpless", + }, + []string{"l1", "l2"}, + ) + testMetricVec(t, vec) +} + +func TestMetricVecWithCollisions(t *testing.T) { + vec := NewUntypedVec( + UntypedOpts{ + Name: "test", + Help: "helpless", + }, + []string{"l1", "l2"}, + ) + vec.hashAdd = func(h uint64, s string) uint64 { return 1 } + vec.hashAddByte = func(h uint64, b byte) uint64 { return 1 } + testMetricVec(t, vec) +} + +func testMetricVec(t *testing.T, vec *UntypedVec) { + vec.Reset() // Actually test Reset now! + + var pair [2]string + // Keep track of metrics. + expected := map[[2]string]int{} + + for i := 0; i < 1000; i++ { + pair[0], pair[1] = fmt.Sprint(i%4), fmt.Sprint(i%5) // Varying combinations multiples. + expected[pair]++ + vec.WithLabelValues(pair[0], pair[1]).Inc() + + expected[[2]string{"v1", "v2"}]++ + vec.WithLabelValues("v1", "v2").(Untyped).Inc() + } + + var total int + for _, metrics := range vec.children { + for _, metric := range metrics { + total++ + copy(pair[:], metric.values) + + var metricOut dto.Metric + if err := metric.metric.Write(&metricOut); err != nil { + t.Fatal(err) + } + actual := *metricOut.Untyped.Value + + var actualPair [2]string + for i, label := range metricOut.Label { + actualPair[i] = *label.Value + } + + // Test output pair against metric.values to ensure we've selected + // the right one. We check this to ensure the below check means + // anything at all. + if actualPair != pair { + t.Fatalf("unexpected pair association in metric map: %v != %v", actualPair, pair) + } + + if actual != float64(expected[pair]) { + t.Fatalf("incorrect counter value for %v: %v != %v", pair, actual, expected[pair]) + } + } + } + + if total != len(expected) { + t.Fatalf("unexpected number of metrics: %v != %v", total, len(expected)) + } + + vec.Reset() + + if len(vec.children) > 0 { + t.Fatalf("reset failed") + } +} + +func TestCounterVecEndToEndWithCollision(t *testing.T) { + vec := NewCounterVec( + CounterOpts{ + Name: "test", + Help: "helpless", + }, + []string{"labelname"}, + ) + vec.WithLabelValues("77kepQFQ8Kl").Inc() + vec.WithLabelValues("!0IC=VloaY").Add(2) + + m := &dto.Metric{} + if err := vec.WithLabelValues("77kepQFQ8Kl").Write(m); err != nil { + t.Fatal(err) + } + if got, want := m.GetLabel()[0].GetValue(), "77kepQFQ8Kl"; got != want { + t.Errorf("got label value %q, want %q", got, want) + } + if got, want := m.GetCounter().GetValue(), 1.; got != want { + t.Errorf("got value %f, want %f", got, want) + } + m.Reset() + if err := vec.WithLabelValues("!0IC=VloaY").Write(m); err != nil { + t.Fatal(err) + } + if got, want := m.GetLabel()[0].GetValue(), "!0IC=VloaY"; got != want { + t.Errorf("got label value %q, want %q", got, want) + } + if got, want := m.GetCounter().GetValue(), 2.; got != want { + t.Errorf("got value %f, want %f", got, want) + } +} + +func BenchmarkMetricVecWithLabelValuesBasic(b *testing.B) { + benchmarkMetricVecWithLabelValues(b, map[string][]string{ + "l1": []string{"onevalue"}, + "l2": []string{"twovalue"}, + }) +} + +func BenchmarkMetricVecWithLabelValues2Keys10ValueCardinality(b *testing.B) { + benchmarkMetricVecWithLabelValuesCardinality(b, 2, 10) +} + +func BenchmarkMetricVecWithLabelValues4Keys10ValueCardinality(b *testing.B) { + benchmarkMetricVecWithLabelValuesCardinality(b, 4, 10) +} + +func BenchmarkMetricVecWithLabelValues2Keys100ValueCardinality(b *testing.B) { + benchmarkMetricVecWithLabelValuesCardinality(b, 2, 100) +} + +func BenchmarkMetricVecWithLabelValues10Keys100ValueCardinality(b *testing.B) { + benchmarkMetricVecWithLabelValuesCardinality(b, 10, 100) +} + +func BenchmarkMetricVecWithLabelValues10Keys1000ValueCardinality(b *testing.B) { + benchmarkMetricVecWithLabelValuesCardinality(b, 10, 1000) +} + +func benchmarkMetricVecWithLabelValuesCardinality(b *testing.B, nkeys, nvalues int) { + labels := map[string][]string{} + + for i := 0; i < nkeys; i++ { + var ( + k = fmt.Sprintf("key-%v", i) + vs = make([]string, 0, nvalues) + ) + for j := 0; j < nvalues; j++ { + vs = append(vs, fmt.Sprintf("value-%v", j)) + } + labels[k] = vs + } + + benchmarkMetricVecWithLabelValues(b, labels) +} + +func benchmarkMetricVecWithLabelValues(b *testing.B, labels map[string][]string) { + var keys []string + for k := range labels { // Map order dependent, who cares though. + keys = append(keys, k) + } + + values := make([]string, len(labels)) // Value cache for permutations. + vec := NewUntypedVec( + UntypedOpts{ + Name: "test", + Help: "helpless", + }, + keys, + ) + + b.ReportAllocs() + b.ResetTimer() + for i := 0; i < b.N; i++ { + // Varies input across provide map entries based on key size. + for j, k := range keys { + candidates := labels[k] + values[j] = candidates[i%len(candidates)] + } + + vec.WithLabelValues(values...) + } +} diff --git a/vendor/github.com/prometheus/client_model/.gitignore b/vendor/github.com/prometheus/client_model/.gitignore new file mode 100644 index 000000000..2f7896d1d --- /dev/null +++ b/vendor/github.com/prometheus/client_model/.gitignore @@ -0,0 +1 @@ +target/ diff --git a/vendor/github.com/prometheus/client_model/CONTRIBUTING.md b/vendor/github.com/prometheus/client_model/CONTRIBUTING.md new file mode 100644 index 000000000..40503edbf --- /dev/null +++ b/vendor/github.com/prometheus/client_model/CONTRIBUTING.md @@ -0,0 +1,18 @@ +# Contributing + +Prometheus uses GitHub to manage reviews of pull requests. + +* If you have a trivial fix or improvement, go ahead and create a pull request, + addressing (with `@...`) the maintainer of this repository (see + [MAINTAINERS.md](MAINTAINERS.md)) in the description of the pull request. + +* If you plan to do something more involved, first discuss your ideas + on our [mailing list](https://groups.google.com/forum/?fromgroups#!forum/prometheus-developers). + This will avoid unnecessary work and surely give you and us a good deal + of inspiration. + +* Relevant coding style guidelines are the [Go Code Review + Comments](https://code.google.com/p/go-wiki/wiki/CodeReviewComments) + and the _Formatting and style_ section of Peter Bourgon's [Go: Best + Practices for Production + Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style). diff --git a/vendor/github.com/prometheus/client_model/MAINTAINERS.md b/vendor/github.com/prometheus/client_model/MAINTAINERS.md new file mode 100644 index 000000000..3ede55fe1 --- /dev/null +++ b/vendor/github.com/prometheus/client_model/MAINTAINERS.md @@ -0,0 +1 @@ +* Björn Rabenstein diff --git a/vendor/github.com/prometheus/client_model/Makefile b/vendor/github.com/prometheus/client_model/Makefile new file mode 100644 index 000000000..9cc23b340 --- /dev/null +++ b/vendor/github.com/prometheus/client_model/Makefile @@ -0,0 +1,61 @@ +# Copyright 2013 Prometheus Team +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +KEY_ID ?= _DEFINE_ME_ + +all: cpp go java python ruby + +SUFFIXES: + +cpp: cpp/metrics.pb.cc cpp/metrics.pb.h + +cpp/metrics.pb.cc: metrics.proto + protoc $< --cpp_out=cpp/ + +cpp/metrics.pb.h: metrics.proto + protoc $< --cpp_out=cpp/ + +go: go/metrics.pb.go + +go/metrics.pb.go: metrics.proto + protoc $< --go_out=go/ + +java: src/main/java/io/prometheus/client/Metrics.java pom.xml + mvn clean compile package + +src/main/java/io/prometheus/client/Metrics.java: metrics.proto + protoc $< --java_out=src/main/java + +python: python/prometheus/client/model/metrics_pb2.py + +python/prometheus/client/model/metrics_pb2.py: metrics.proto + protoc $< --python_out=python/prometheus/client/model + +ruby: + $(MAKE) -C ruby build + +clean: + -rm -rf cpp/* + -rm -rf go/* + -rm -rf java/* + -rm -rf python/* + -$(MAKE) -C ruby clean + -mvn clean + +maven-deploy-snapshot: java + mvn clean deploy -Dgpg.keyname=$(KEY_ID) -DperformRelease=true + +maven-deploy-release: java + mvn clean release:clean release:prepare release:perform -Dgpg.keyname=$(KEY_ID) -DperformRelease=true + +.PHONY: all clean cpp go java maven-deploy-snapshot maven-deploy-release python ruby diff --git a/vendor/github.com/prometheus/client_model/README.md b/vendor/github.com/prometheus/client_model/README.md new file mode 100644 index 000000000..a710042db --- /dev/null +++ b/vendor/github.com/prometheus/client_model/README.md @@ -0,0 +1,26 @@ +# Background +Under most circumstances, manually downloading this repository should never +be required. + +# Prerequisites +# Base +* [Google Protocol Buffers](https://developers.google.com/protocol-buffers) + +## Java +* [Apache Maven](http://maven.apache.org) +* [Prometheus Maven Repository](https://github.com/prometheus/io.prometheus-maven-repository) checked out into ../io.prometheus-maven-repository + +## Go +* [Go](http://golang.org) +* [goprotobuf](https://code.google.com/p/goprotobuf) + +## Ruby +* [Ruby](https://www.ruby-lang.org) +* [bundler](https://rubygems.org/gems/bundler) + +# Building + $ make + +# Getting Started + * The Go source code is periodically indexed: [Go Protocol Buffer Model](http://godoc.org/github.com/prometheus/client_model/go). + * All of the core developers are accessible via the [Prometheus Developers Mailinglist](https://groups.google.com/forum/?fromgroups#!forum/prometheus-developers). diff --git a/vendor/github.com/prometheus/client_model/metrics.proto b/vendor/github.com/prometheus/client_model/metrics.proto new file mode 100644 index 000000000..0b84af920 --- /dev/null +++ b/vendor/github.com/prometheus/client_model/metrics.proto @@ -0,0 +1,81 @@ +// Copyright 2013 Prometheus Team +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto2"; + +package io.prometheus.client; +option java_package = "io.prometheus.client"; + +message LabelPair { + optional string name = 1; + optional string value = 2; +} + +enum MetricType { + COUNTER = 0; + GAUGE = 1; + SUMMARY = 2; + UNTYPED = 3; + HISTOGRAM = 4; +} + +message Gauge { + optional double value = 1; +} + +message Counter { + optional double value = 1; +} + +message Quantile { + optional double quantile = 1; + optional double value = 2; +} + +message Summary { + optional uint64 sample_count = 1; + optional double sample_sum = 2; + repeated Quantile quantile = 3; +} + +message Untyped { + optional double value = 1; +} + +message Histogram { + optional uint64 sample_count = 1; + optional double sample_sum = 2; + repeated Bucket bucket = 3; // Ordered in increasing order of upper_bound, +Inf bucket is optional. +} + +message Bucket { + optional uint64 cumulative_count = 1; // Cumulative in increasing order. + optional double upper_bound = 2; // Inclusive. +} + +message Metric { + repeated LabelPair label = 1; + optional Gauge gauge = 2; + optional Counter counter = 3; + optional Summary summary = 4; + optional Untyped untyped = 5; + optional Histogram histogram = 7; + optional int64 timestamp_ms = 6; +} + +message MetricFamily { + optional string name = 1; + optional string help = 2; + optional MetricType type = 3; + repeated Metric metric = 4; +} diff --git a/vendor/github.com/prometheus/client_model/pom.xml b/vendor/github.com/prometheus/client_model/pom.xml new file mode 100644 index 000000000..4d34c9015 --- /dev/null +++ b/vendor/github.com/prometheus/client_model/pom.xml @@ -0,0 +1,130 @@ + + + 4.0.0 + + io.prometheus.client + model + 0.0.3-SNAPSHOT + + + org.sonatype.oss + oss-parent + 7 + + + Prometheus Client Data Model + http://github.com/prometheus/client_model + + Prometheus Client Data Model: Generated Protocol Buffer Assets + + + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + scm:git:git@github.com:prometheus/client_model.git + scm:git:git@github.com:prometheus/client_model.git + git@github.com:prometheus/client_model.git + + + + + mtp + Matt T. Proud + matt.proud@gmail.com + + + + + + com.google.protobuf + protobuf-java + 2.5.0 + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.8 + + UTF-8 + UTF-8 + true + + + + generate-javadoc-site-report + site + + javadoc + + + + attach-javadocs + + jar + + + + + + maven-compiler-plugin + + 1.6 + 1.6 + + 3.1 + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar + + + + + + + + + release-sign-artifacts + + + performRelease + true + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.4 + + + sign-artifacts + verify + + sign + + + + + + + + + diff --git a/vendor/github.com/prometheus/client_model/setup.py b/vendor/github.com/prometheus/client_model/setup.py new file mode 100644 index 000000000..67b9f20e3 --- /dev/null +++ b/vendor/github.com/prometheus/client_model/setup.py @@ -0,0 +1,23 @@ +#!/usr/bin/python + +from setuptools import setup + +setup( + name = 'prometheus_client_model', + version = '0.0.1', + author = 'Matt T. Proud', + author_email = 'matt.proud@gmail.com', + description = 'Data model artifacts for the Prometheus client.', + license = 'Apache License 2.0', + url = 'http://github.com/prometheus/client_model', + packages = ['prometheus', 'prometheus/client', 'prometheus/client/model'], + package_dir = {'': 'python'}, + requires = ['protobuf(==2.4.1)'], + platforms = 'Platform Independent', + classifiers = ['Development Status :: 3 - Alpha', + 'Intended Audience :: Developers', + 'Intended Audience :: System Administrators', + 'License :: OSI Approved :: Apache Software License', + 'Operating System :: OS Independent', + 'Topic :: Software Development :: Testing', + 'Topic :: System :: Monitoring']) diff --git a/vendor/github.com/prometheus/common/.travis.yml b/vendor/github.com/prometheus/common/.travis.yml new file mode 100644 index 000000000..2fe8e9ad7 --- /dev/null +++ b/vendor/github.com/prometheus/common/.travis.yml @@ -0,0 +1,6 @@ +sudo: false + +language: go +go: + - 1.7.5 + - tip diff --git a/vendor/github.com/prometheus/common/CONTRIBUTING.md b/vendor/github.com/prometheus/common/CONTRIBUTING.md new file mode 100644 index 000000000..40503edbf --- /dev/null +++ b/vendor/github.com/prometheus/common/CONTRIBUTING.md @@ -0,0 +1,18 @@ +# Contributing + +Prometheus uses GitHub to manage reviews of pull requests. + +* If you have a trivial fix or improvement, go ahead and create a pull request, + addressing (with `@...`) the maintainer of this repository (see + [MAINTAINERS.md](MAINTAINERS.md)) in the description of the pull request. + +* If you plan to do something more involved, first discuss your ideas + on our [mailing list](https://groups.google.com/forum/?fromgroups#!forum/prometheus-developers). + This will avoid unnecessary work and surely give you and us a good deal + of inspiration. + +* Relevant coding style guidelines are the [Go Code Review + Comments](https://code.google.com/p/go-wiki/wiki/CodeReviewComments) + and the _Formatting and style_ section of Peter Bourgon's [Go: Best + Practices for Production + Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style). diff --git a/vendor/github.com/prometheus/common/MAINTAINERS.md b/vendor/github.com/prometheus/common/MAINTAINERS.md new file mode 100644 index 000000000..1b3152161 --- /dev/null +++ b/vendor/github.com/prometheus/common/MAINTAINERS.md @@ -0,0 +1 @@ +* Fabian Reinartz diff --git a/vendor/github.com/prometheus/common/README.md b/vendor/github.com/prometheus/common/README.md new file mode 100644 index 000000000..11a584945 --- /dev/null +++ b/vendor/github.com/prometheus/common/README.md @@ -0,0 +1,12 @@ +# Common +[![Build Status](https://travis-ci.org/prometheus/common.svg)](https://travis-ci.org/prometheus/common) + +This repository contains Go libraries that are shared across Prometheus +components and libraries. + +* **config**: Common configuration structures +* **expfmt**: Decoding and encoding for the exposition format +* **log**: A logging wrapper around [logrus](https://github.com/sirupsen/logrus) +* **model**: Shared data structures +* **route**: A routing wrapper around [httprouter](https://github.com/julienschmidt/httprouter) using `context.Context` +* **version**: Version informations and metric diff --git a/vendor/github.com/prometheus/common/expfmt/bench_test.go b/vendor/github.com/prometheus/common/expfmt/bench_test.go new file mode 100644 index 000000000..e539bfc13 --- /dev/null +++ b/vendor/github.com/prometheus/common/expfmt/bench_test.go @@ -0,0 +1,167 @@ +// Copyright 2015 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package expfmt + +import ( + "bytes" + "compress/gzip" + "io" + "io/ioutil" + "testing" + + "github.com/matttproud/golang_protobuf_extensions/pbutil" + + dto "github.com/prometheus/client_model/go" +) + +var parser TextParser + +// Benchmarks to show how much penalty text format parsing actually inflicts. +// +// Example results on Linux 3.13.0, Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz, go1.4. +// +// BenchmarkParseText 1000 1188535 ns/op 205085 B/op 6135 allocs/op +// BenchmarkParseTextGzip 1000 1376567 ns/op 246224 B/op 6151 allocs/op +// BenchmarkParseProto 10000 172790 ns/op 52258 B/op 1160 allocs/op +// BenchmarkParseProtoGzip 5000 324021 ns/op 94931 B/op 1211 allocs/op +// BenchmarkParseProtoMap 10000 187946 ns/op 58714 B/op 1203 allocs/op +// +// CONCLUSION: The overhead for the map is negligible. Text format needs ~5x more allocations. +// Without compression, it needs ~7x longer, but with compression (the more relevant scenario), +// the difference becomes less relevant, only ~4x. +// +// The test data contains 248 samples. + +// BenchmarkParseText benchmarks the parsing of a text-format scrape into metric +// family DTOs. +func BenchmarkParseText(b *testing.B) { + b.StopTimer() + data, err := ioutil.ReadFile("testdata/text") + if err != nil { + b.Fatal(err) + } + b.StartTimer() + + for i := 0; i < b.N; i++ { + if _, err := parser.TextToMetricFamilies(bytes.NewReader(data)); err != nil { + b.Fatal(err) + } + } +} + +// BenchmarkParseTextGzip benchmarks the parsing of a gzipped text-format scrape +// into metric family DTOs. +func BenchmarkParseTextGzip(b *testing.B) { + b.StopTimer() + data, err := ioutil.ReadFile("testdata/text.gz") + if err != nil { + b.Fatal(err) + } + b.StartTimer() + + for i := 0; i < b.N; i++ { + in, err := gzip.NewReader(bytes.NewReader(data)) + if err != nil { + b.Fatal(err) + } + if _, err := parser.TextToMetricFamilies(in); err != nil { + b.Fatal(err) + } + } +} + +// BenchmarkParseProto benchmarks the parsing of a protobuf-format scrape into +// metric family DTOs. Note that this does not build a map of metric families +// (as the text version does), because it is not required for Prometheus +// ingestion either. (However, it is required for the text-format parsing, as +// the metric family might be sprinkled all over the text, while the +// protobuf-format guarantees bundling at one place.) +func BenchmarkParseProto(b *testing.B) { + b.StopTimer() + data, err := ioutil.ReadFile("testdata/protobuf") + if err != nil { + b.Fatal(err) + } + b.StartTimer() + + for i := 0; i < b.N; i++ { + family := &dto.MetricFamily{} + in := bytes.NewReader(data) + for { + family.Reset() + if _, err := pbutil.ReadDelimited(in, family); err != nil { + if err == io.EOF { + break + } + b.Fatal(err) + } + } + } +} + +// BenchmarkParseProtoGzip is like BenchmarkParseProto above, but parses gzipped +// protobuf format. +func BenchmarkParseProtoGzip(b *testing.B) { + b.StopTimer() + data, err := ioutil.ReadFile("testdata/protobuf.gz") + if err != nil { + b.Fatal(err) + } + b.StartTimer() + + for i := 0; i < b.N; i++ { + family := &dto.MetricFamily{} + in, err := gzip.NewReader(bytes.NewReader(data)) + if err != nil { + b.Fatal(err) + } + for { + family.Reset() + if _, err := pbutil.ReadDelimited(in, family); err != nil { + if err == io.EOF { + break + } + b.Fatal(err) + } + } + } +} + +// BenchmarkParseProtoMap is like BenchmarkParseProto but DOES put the parsed +// metric family DTOs into a map. This is not happening during Prometheus +// ingestion. It is just here to measure the overhead of that map creation and +// separate it from the overhead of the text format parsing. +func BenchmarkParseProtoMap(b *testing.B) { + b.StopTimer() + data, err := ioutil.ReadFile("testdata/protobuf") + if err != nil { + b.Fatal(err) + } + b.StartTimer() + + for i := 0; i < b.N; i++ { + families := map[string]*dto.MetricFamily{} + in := bytes.NewReader(data) + for { + family := &dto.MetricFamily{} + if _, err := pbutil.ReadDelimited(in, family); err != nil { + if err == io.EOF { + break + } + b.Fatal(err) + } + families[family.GetName()] = family + } + } +} diff --git a/vendor/github.com/prometheus/common/expfmt/decode_test.go b/vendor/github.com/prometheus/common/expfmt/decode_test.go new file mode 100644 index 000000000..82c1130c9 --- /dev/null +++ b/vendor/github.com/prometheus/common/expfmt/decode_test.go @@ -0,0 +1,435 @@ +// Copyright 2015 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package expfmt + +import ( + "io" + "net/http" + "reflect" + "sort" + "strings" + "testing" + + "github.com/golang/protobuf/proto" + dto "github.com/prometheus/client_model/go" + + "github.com/prometheus/common/model" +) + +func TestTextDecoder(t *testing.T) { + var ( + ts = model.Now() + in = ` +# Only a quite simple scenario with two metric families. +# More complicated tests of the parser itself can be found in the text package. +# TYPE mf2 counter +mf2 3 +mf1{label="value1"} -3.14 123456 +mf1{label="value2"} 42 +mf2 4 +` + out = model.Vector{ + &model.Sample{ + Metric: model.Metric{ + model.MetricNameLabel: "mf1", + "label": "value1", + }, + Value: -3.14, + Timestamp: 123456, + }, + &model.Sample{ + Metric: model.Metric{ + model.MetricNameLabel: "mf1", + "label": "value2", + }, + Value: 42, + Timestamp: ts, + }, + &model.Sample{ + Metric: model.Metric{ + model.MetricNameLabel: "mf2", + }, + Value: 3, + Timestamp: ts, + }, + &model.Sample{ + Metric: model.Metric{ + model.MetricNameLabel: "mf2", + }, + Value: 4, + Timestamp: ts, + }, + } + ) + + dec := &SampleDecoder{ + Dec: &textDecoder{r: strings.NewReader(in)}, + Opts: &DecodeOptions{ + Timestamp: ts, + }, + } + var all model.Vector + for { + var smpls model.Vector + err := dec.Decode(&smpls) + if err == io.EOF { + break + } + if err != nil { + t.Fatal(err) + } + all = append(all, smpls...) + } + sort.Sort(all) + sort.Sort(out) + if !reflect.DeepEqual(all, out) { + t.Fatalf("output does not match") + } +} + +func TestProtoDecoder(t *testing.T) { + + var testTime = model.Now() + + scenarios := []struct { + in string + expected model.Vector + fail bool + }{ + { + in: "", + }, + { + in: "\x8f\x01\n\rrequest_count\x12\x12Number of requests\x18\x00\"0\n#\n\x0fsome_!abel_name\x12\x10some_label_value\x1a\t\t\x00\x00\x00\x00\x00\x00E\xc0\"6\n)\n\x12another_label_name\x12\x13another_label_value\x1a\t\t\x00\x00\x00\x00\x00\x00U@", + fail: true, + }, + { + in: "\x8f\x01\n\rrequest_count\x12\x12Number of requests\x18\x00\"0\n#\n\x0fsome_label_name\x12\x10some_label_value\x1a\t\t\x00\x00\x00\x00\x00\x00E\xc0\"6\n)\n\x12another_label_name\x12\x13another_label_value\x1a\t\t\x00\x00\x00\x00\x00\x00U@", + expected: model.Vector{ + &model.Sample{ + Metric: model.Metric{ + model.MetricNameLabel: "request_count", + "some_label_name": "some_label_value", + }, + Value: -42, + Timestamp: testTime, + }, + &model.Sample{ + Metric: model.Metric{ + model.MetricNameLabel: "request_count", + "another_label_name": "another_label_value", + }, + Value: 84, + Timestamp: testTime, + }, + }, + }, + { + in: "\xb9\x01\n\rrequest_count\x12\x12Number of requests\x18\x02\"O\n#\n\x0fsome_label_name\x12\x10some_label_value\"(\x1a\x12\t\xaeG\xe1z\x14\xae\xef?\x11\x00\x00\x00\x00\x00\x00E\xc0\x1a\x12\t+\x87\x16\xd9\xce\xf7\xef?\x11\x00\x00\x00\x00\x00\x00U\xc0\"A\n)\n\x12another_label_name\x12\x13another_label_value\"\x14\x1a\x12\t\x00\x00\x00\x00\x00\x00\xe0?\x11\x00\x00\x00\x00\x00\x00$@", + expected: model.Vector{ + &model.Sample{ + Metric: model.Metric{ + model.MetricNameLabel: "request_count_count", + "some_label_name": "some_label_value", + }, + Value: 0, + Timestamp: testTime, + }, + &model.Sample{ + Metric: model.Metric{ + model.MetricNameLabel: "request_count_sum", + "some_label_name": "some_label_value", + }, + Value: 0, + Timestamp: testTime, + }, + &model.Sample{ + Metric: model.Metric{ + model.MetricNameLabel: "request_count", + "some_label_name": "some_label_value", + "quantile": "0.99", + }, + Value: -42, + Timestamp: testTime, + }, + &model.Sample{ + Metric: model.Metric{ + model.MetricNameLabel: "request_count", + "some_label_name": "some_label_value", + "quantile": "0.999", + }, + Value: -84, + Timestamp: testTime, + }, + &model.Sample{ + Metric: model.Metric{ + model.MetricNameLabel: "request_count_count", + "another_label_name": "another_label_value", + }, + Value: 0, + Timestamp: testTime, + }, + &model.Sample{ + Metric: model.Metric{ + model.MetricNameLabel: "request_count_sum", + "another_label_name": "another_label_value", + }, + Value: 0, + Timestamp: testTime, + }, + &model.Sample{ + Metric: model.Metric{ + model.MetricNameLabel: "request_count", + "another_label_name": "another_label_value", + "quantile": "0.5", + }, + Value: 10, + Timestamp: testTime, + }, + }, + }, + { + in: "\x8d\x01\n\x1drequest_duration_microseconds\x12\x15The response latency.\x18\x04\"S:Q\b\x85\x15\x11\xcd\xcc\xccL\x8f\xcb:A\x1a\v\b{\x11\x00\x00\x00\x00\x00\x00Y@\x1a\f\b\x9c\x03\x11\x00\x00\x00\x00\x00\x00^@\x1a\f\b\xd0\x04\x11\x00\x00\x00\x00\x00\x00b@\x1a\f\b\xf4\v\x11\x9a\x99\x99\x99\x99\x99e@\x1a\f\b\x85\x15\x11\x00\x00\x00\x00\x00\x00\xf0\u007f", + expected: model.Vector{ + &model.Sample{ + Metric: model.Metric{ + model.MetricNameLabel: "request_duration_microseconds_bucket", + "le": "100", + }, + Value: 123, + Timestamp: testTime, + }, + &model.Sample{ + Metric: model.Metric{ + model.MetricNameLabel: "request_duration_microseconds_bucket", + "le": "120", + }, + Value: 412, + Timestamp: testTime, + }, + &model.Sample{ + Metric: model.Metric{ + model.MetricNameLabel: "request_duration_microseconds_bucket", + "le": "144", + }, + Value: 592, + Timestamp: testTime, + }, + &model.Sample{ + Metric: model.Metric{ + model.MetricNameLabel: "request_duration_microseconds_bucket", + "le": "172.8", + }, + Value: 1524, + Timestamp: testTime, + }, + &model.Sample{ + Metric: model.Metric{ + model.MetricNameLabel: "request_duration_microseconds_bucket", + "le": "+Inf", + }, + Value: 2693, + Timestamp: testTime, + }, + &model.Sample{ + Metric: model.Metric{ + model.MetricNameLabel: "request_duration_microseconds_sum", + }, + Value: 1756047.3, + Timestamp: testTime, + }, + &model.Sample{ + Metric: model.Metric{ + model.MetricNameLabel: "request_duration_microseconds_count", + }, + Value: 2693, + Timestamp: testTime, + }, + }, + }, + { + // The metric type is unset in this protobuf, which needs to be handled + // correctly by the decoder. + in: "\x1c\n\rrequest_count\"\v\x1a\t\t\x00\x00\x00\x00\x00\x00\xf0?", + expected: model.Vector{ + &model.Sample{ + Metric: model.Metric{ + model.MetricNameLabel: "request_count", + }, + Value: 1, + Timestamp: testTime, + }, + }, + }, + } + + for i, scenario := range scenarios { + dec := &SampleDecoder{ + Dec: &protoDecoder{r: strings.NewReader(scenario.in)}, + Opts: &DecodeOptions{ + Timestamp: testTime, + }, + } + + var all model.Vector + for { + var smpls model.Vector + err := dec.Decode(&smpls) + if err == io.EOF { + break + } + if scenario.fail { + if err == nil { + t.Fatal("Expected error but got none") + } + break + } + if err != nil { + t.Fatal(err) + } + all = append(all, smpls...) + } + sort.Sort(all) + sort.Sort(scenario.expected) + if !reflect.DeepEqual(all, scenario.expected) { + t.Fatalf("%d. output does not match, want: %#v, got %#v", i, scenario.expected, all) + } + } +} + +func testDiscriminatorHTTPHeader(t testing.TB) { + var scenarios = []struct { + input map[string]string + output Format + err error + }{ + { + input: map[string]string{"Content-Type": `application/vnd.google.protobuf; proto="io.prometheus.client.MetricFamily"; encoding="delimited"`}, + output: FmtProtoDelim, + }, + { + input: map[string]string{"Content-Type": `application/vnd.google.protobuf; proto="illegal"; encoding="delimited"`}, + output: FmtUnknown, + }, + { + input: map[string]string{"Content-Type": `application/vnd.google.protobuf; proto="io.prometheus.client.MetricFamily"; encoding="illegal"`}, + output: FmtUnknown, + }, + { + input: map[string]string{"Content-Type": `text/plain; version=0.0.4`}, + output: FmtText, + }, + { + input: map[string]string{"Content-Type": `text/plain`}, + output: FmtText, + }, + { + input: map[string]string{"Content-Type": `text/plain; version=0.0.3`}, + output: FmtUnknown, + }, + } + + for i, scenario := range scenarios { + var header http.Header + + if len(scenario.input) > 0 { + header = http.Header{} + } + + for key, value := range scenario.input { + header.Add(key, value) + } + + actual := ResponseFormat(header) + + if scenario.output != actual { + t.Errorf("%d. expected %s, got %s", i, scenario.output, actual) + } + } +} + +func TestDiscriminatorHTTPHeader(t *testing.T) { + testDiscriminatorHTTPHeader(t) +} + +func BenchmarkDiscriminatorHTTPHeader(b *testing.B) { + for i := 0; i < b.N; i++ { + testDiscriminatorHTTPHeader(b) + } +} + +func TestExtractSamples(t *testing.T) { + var ( + goodMetricFamily1 = &dto.MetricFamily{ + Name: proto.String("foo"), + Help: proto.String("Help for foo."), + Type: dto.MetricType_COUNTER.Enum(), + Metric: []*dto.Metric{ + &dto.Metric{ + Counter: &dto.Counter{ + Value: proto.Float64(4711), + }, + }, + }, + } + goodMetricFamily2 = &dto.MetricFamily{ + Name: proto.String("bar"), + Help: proto.String("Help for bar."), + Type: dto.MetricType_GAUGE.Enum(), + Metric: []*dto.Metric{ + &dto.Metric{ + Gauge: &dto.Gauge{ + Value: proto.Float64(3.14), + }, + }, + }, + } + badMetricFamily = &dto.MetricFamily{ + Name: proto.String("bad"), + Help: proto.String("Help for bad."), + Type: dto.MetricType(42).Enum(), + Metric: []*dto.Metric{ + &dto.Metric{ + Gauge: &dto.Gauge{ + Value: proto.Float64(2.7), + }, + }, + }, + } + + opts = &DecodeOptions{ + Timestamp: 42, + } + ) + + got, err := ExtractSamples(opts, goodMetricFamily1, goodMetricFamily2) + if err != nil { + t.Error("Unexpected error from ExtractSamples:", err) + } + want := model.Vector{ + &model.Sample{Metric: model.Metric{model.MetricNameLabel: "foo"}, Value: 4711, Timestamp: 42}, + &model.Sample{Metric: model.Metric{model.MetricNameLabel: "bar"}, Value: 3.14, Timestamp: 42}, + } + if !reflect.DeepEqual(got, want) { + t.Errorf("unexpected samples extracted, got: %v, want: %v", got, want) + } + + got, err = ExtractSamples(opts, goodMetricFamily1, badMetricFamily, goodMetricFamily2) + if err == nil { + t.Error("Expected error from ExtractSamples") + } + if !reflect.DeepEqual(got, want) { + t.Errorf("unexpected samples extracted, got: %v, want: %v", got, want) + } +} diff --git a/vendor/github.com/prometheus/common/expfmt/text_create_test.go b/vendor/github.com/prometheus/common/expfmt/text_create_test.go new file mode 100644 index 000000000..e4cc5d803 --- /dev/null +++ b/vendor/github.com/prometheus/common/expfmt/text_create_test.go @@ -0,0 +1,443 @@ +// Copyright 2014 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package expfmt + +import ( + "bytes" + "math" + "strings" + "testing" + + "github.com/golang/protobuf/proto" + + dto "github.com/prometheus/client_model/go" +) + +func testCreate(t testing.TB) { + var scenarios = []struct { + in *dto.MetricFamily + out string + }{ + // 0: Counter, NaN as value, timestamp given. + { + in: &dto.MetricFamily{ + Name: proto.String("name"), + Help: proto.String("two-line\n doc str\\ing"), + Type: dto.MetricType_COUNTER.Enum(), + Metric: []*dto.Metric{ + &dto.Metric{ + Label: []*dto.LabelPair{ + &dto.LabelPair{ + Name: proto.String("labelname"), + Value: proto.String("val1"), + }, + &dto.LabelPair{ + Name: proto.String("basename"), + Value: proto.String("basevalue"), + }, + }, + Counter: &dto.Counter{ + Value: proto.Float64(math.NaN()), + }, + }, + &dto.Metric{ + Label: []*dto.LabelPair{ + &dto.LabelPair{ + Name: proto.String("labelname"), + Value: proto.String("val2"), + }, + &dto.LabelPair{ + Name: proto.String("basename"), + Value: proto.String("basevalue"), + }, + }, + Counter: &dto.Counter{ + Value: proto.Float64(.23), + }, + TimestampMs: proto.Int64(1234567890), + }, + }, + }, + out: `# HELP name two-line\n doc str\\ing +# TYPE name counter +name{labelname="val1",basename="basevalue"} NaN +name{labelname="val2",basename="basevalue"} 0.23 1234567890 +`, + }, + // 1: Gauge, some escaping required, +Inf as value, multi-byte characters in label values. + { + in: &dto.MetricFamily{ + Name: proto.String("gauge_name"), + Help: proto.String("gauge\ndoc\nstr\"ing"), + Type: dto.MetricType_GAUGE.Enum(), + Metric: []*dto.Metric{ + &dto.Metric{ + Label: []*dto.LabelPair{ + &dto.LabelPair{ + Name: proto.String("name_1"), + Value: proto.String("val with\nnew line"), + }, + &dto.LabelPair{ + Name: proto.String("name_2"), + Value: proto.String("val with \\backslash and \"quotes\""), + }, + }, + Gauge: &dto.Gauge{ + Value: proto.Float64(math.Inf(+1)), + }, + }, + &dto.Metric{ + Label: []*dto.LabelPair{ + &dto.LabelPair{ + Name: proto.String("name_1"), + Value: proto.String("Björn"), + }, + &dto.LabelPair{ + Name: proto.String("name_2"), + Value: proto.String("佖佥"), + }, + }, + Gauge: &dto.Gauge{ + Value: proto.Float64(3.14E42), + }, + }, + }, + }, + out: `# HELP gauge_name gauge\ndoc\nstr"ing +# TYPE gauge_name gauge +gauge_name{name_1="val with\nnew line",name_2="val with \\backslash and \"quotes\""} +Inf +gauge_name{name_1="Björn",name_2="佖佥"} 3.14e+42 +`, + }, + // 2: Untyped, no help, one sample with no labels and -Inf as value, another sample with one label. + { + in: &dto.MetricFamily{ + Name: proto.String("untyped_name"), + Type: dto.MetricType_UNTYPED.Enum(), + Metric: []*dto.Metric{ + &dto.Metric{ + Untyped: &dto.Untyped{ + Value: proto.Float64(math.Inf(-1)), + }, + }, + &dto.Metric{ + Label: []*dto.LabelPair{ + &dto.LabelPair{ + Name: proto.String("name_1"), + Value: proto.String("value 1"), + }, + }, + Untyped: &dto.Untyped{ + Value: proto.Float64(-1.23e-45), + }, + }, + }, + }, + out: `# TYPE untyped_name untyped +untyped_name -Inf +untyped_name{name_1="value 1"} -1.23e-45 +`, + }, + // 3: Summary. + { + in: &dto.MetricFamily{ + Name: proto.String("summary_name"), + Help: proto.String("summary docstring"), + Type: dto.MetricType_SUMMARY.Enum(), + Metric: []*dto.Metric{ + &dto.Metric{ + Summary: &dto.Summary{ + SampleCount: proto.Uint64(42), + SampleSum: proto.Float64(-3.4567), + Quantile: []*dto.Quantile{ + &dto.Quantile{ + Quantile: proto.Float64(0.5), + Value: proto.Float64(-1.23), + }, + &dto.Quantile{ + Quantile: proto.Float64(0.9), + Value: proto.Float64(.2342354), + }, + &dto.Quantile{ + Quantile: proto.Float64(0.99), + Value: proto.Float64(0), + }, + }, + }, + }, + &dto.Metric{ + Label: []*dto.LabelPair{ + &dto.LabelPair{ + Name: proto.String("name_1"), + Value: proto.String("value 1"), + }, + &dto.LabelPair{ + Name: proto.String("name_2"), + Value: proto.String("value 2"), + }, + }, + Summary: &dto.Summary{ + SampleCount: proto.Uint64(4711), + SampleSum: proto.Float64(2010.1971), + Quantile: []*dto.Quantile{ + &dto.Quantile{ + Quantile: proto.Float64(0.5), + Value: proto.Float64(1), + }, + &dto.Quantile{ + Quantile: proto.Float64(0.9), + Value: proto.Float64(2), + }, + &dto.Quantile{ + Quantile: proto.Float64(0.99), + Value: proto.Float64(3), + }, + }, + }, + }, + }, + }, + out: `# HELP summary_name summary docstring +# TYPE summary_name summary +summary_name{quantile="0.5"} -1.23 +summary_name{quantile="0.9"} 0.2342354 +summary_name{quantile="0.99"} 0 +summary_name_sum -3.4567 +summary_name_count 42 +summary_name{name_1="value 1",name_2="value 2",quantile="0.5"} 1 +summary_name{name_1="value 1",name_2="value 2",quantile="0.9"} 2 +summary_name{name_1="value 1",name_2="value 2",quantile="0.99"} 3 +summary_name_sum{name_1="value 1",name_2="value 2"} 2010.1971 +summary_name_count{name_1="value 1",name_2="value 2"} 4711 +`, + }, + // 4: Histogram + { + in: &dto.MetricFamily{ + Name: proto.String("request_duration_microseconds"), + Help: proto.String("The response latency."), + Type: dto.MetricType_HISTOGRAM.Enum(), + Metric: []*dto.Metric{ + &dto.Metric{ + Histogram: &dto.Histogram{ + SampleCount: proto.Uint64(2693), + SampleSum: proto.Float64(1756047.3), + Bucket: []*dto.Bucket{ + &dto.Bucket{ + UpperBound: proto.Float64(100), + CumulativeCount: proto.Uint64(123), + }, + &dto.Bucket{ + UpperBound: proto.Float64(120), + CumulativeCount: proto.Uint64(412), + }, + &dto.Bucket{ + UpperBound: proto.Float64(144), + CumulativeCount: proto.Uint64(592), + }, + &dto.Bucket{ + UpperBound: proto.Float64(172.8), + CumulativeCount: proto.Uint64(1524), + }, + &dto.Bucket{ + UpperBound: proto.Float64(math.Inf(+1)), + CumulativeCount: proto.Uint64(2693), + }, + }, + }, + }, + }, + }, + out: `# HELP request_duration_microseconds The response latency. +# TYPE request_duration_microseconds histogram +request_duration_microseconds_bucket{le="100"} 123 +request_duration_microseconds_bucket{le="120"} 412 +request_duration_microseconds_bucket{le="144"} 592 +request_duration_microseconds_bucket{le="172.8"} 1524 +request_duration_microseconds_bucket{le="+Inf"} 2693 +request_duration_microseconds_sum 1.7560473e+06 +request_duration_microseconds_count 2693 +`, + }, + // 5: Histogram with missing +Inf bucket. + { + in: &dto.MetricFamily{ + Name: proto.String("request_duration_microseconds"), + Help: proto.String("The response latency."), + Type: dto.MetricType_HISTOGRAM.Enum(), + Metric: []*dto.Metric{ + &dto.Metric{ + Histogram: &dto.Histogram{ + SampleCount: proto.Uint64(2693), + SampleSum: proto.Float64(1756047.3), + Bucket: []*dto.Bucket{ + &dto.Bucket{ + UpperBound: proto.Float64(100), + CumulativeCount: proto.Uint64(123), + }, + &dto.Bucket{ + UpperBound: proto.Float64(120), + CumulativeCount: proto.Uint64(412), + }, + &dto.Bucket{ + UpperBound: proto.Float64(144), + CumulativeCount: proto.Uint64(592), + }, + &dto.Bucket{ + UpperBound: proto.Float64(172.8), + CumulativeCount: proto.Uint64(1524), + }, + }, + }, + }, + }, + }, + out: `# HELP request_duration_microseconds The response latency. +# TYPE request_duration_microseconds histogram +request_duration_microseconds_bucket{le="100"} 123 +request_duration_microseconds_bucket{le="120"} 412 +request_duration_microseconds_bucket{le="144"} 592 +request_duration_microseconds_bucket{le="172.8"} 1524 +request_duration_microseconds_bucket{le="+Inf"} 2693 +request_duration_microseconds_sum 1.7560473e+06 +request_duration_microseconds_count 2693 +`, + }, + // 6: No metric type, should result in default type Counter. + { + in: &dto.MetricFamily{ + Name: proto.String("name"), + Help: proto.String("doc string"), + Metric: []*dto.Metric{ + &dto.Metric{ + Counter: &dto.Counter{ + Value: proto.Float64(math.Inf(-1)), + }, + }, + }, + }, + out: `# HELP name doc string +# TYPE name counter +name -Inf +`, + }, + } + + for i, scenario := range scenarios { + out := bytes.NewBuffer(make([]byte, 0, len(scenario.out))) + n, err := MetricFamilyToText(out, scenario.in) + if err != nil { + t.Errorf("%d. error: %s", i, err) + continue + } + if expected, got := len(scenario.out), n; expected != got { + t.Errorf( + "%d. expected %d bytes written, got %d", + i, expected, got, + ) + } + if expected, got := scenario.out, out.String(); expected != got { + t.Errorf( + "%d. expected out=%q, got %q", + i, expected, got, + ) + } + } + +} + +func TestCreate(t *testing.T) { + testCreate(t) +} + +func BenchmarkCreate(b *testing.B) { + for i := 0; i < b.N; i++ { + testCreate(b) + } +} + +func testCreateError(t testing.TB) { + var scenarios = []struct { + in *dto.MetricFamily + err string + }{ + // 0: No metric. + { + in: &dto.MetricFamily{ + Name: proto.String("name"), + Help: proto.String("doc string"), + Type: dto.MetricType_COUNTER.Enum(), + Metric: []*dto.Metric{}, + }, + err: "MetricFamily has no metrics", + }, + // 1: No metric name. + { + in: &dto.MetricFamily{ + Help: proto.String("doc string"), + Type: dto.MetricType_UNTYPED.Enum(), + Metric: []*dto.Metric{ + &dto.Metric{ + Untyped: &dto.Untyped{ + Value: proto.Float64(math.Inf(-1)), + }, + }, + }, + }, + err: "MetricFamily has no name", + }, + // 2: Wrong type. + { + in: &dto.MetricFamily{ + Name: proto.String("name"), + Help: proto.String("doc string"), + Type: dto.MetricType_COUNTER.Enum(), + Metric: []*dto.Metric{ + &dto.Metric{ + Untyped: &dto.Untyped{ + Value: proto.Float64(math.Inf(-1)), + }, + }, + }, + }, + err: "expected counter in metric", + }, + } + + for i, scenario := range scenarios { + var out bytes.Buffer + _, err := MetricFamilyToText(&out, scenario.in) + if err == nil { + t.Errorf("%d. expected error, got nil", i) + continue + } + if expected, got := scenario.err, err.Error(); strings.Index(got, expected) != 0 { + t.Errorf( + "%d. expected error starting with %q, got %q", + i, expected, got, + ) + } + } + +} + +func TestCreateError(t *testing.T) { + testCreateError(t) +} + +func BenchmarkCreateError(b *testing.B) { + for i := 0; i < b.N; i++ { + testCreateError(b) + } +} diff --git a/vendor/github.com/prometheus/common/expfmt/text_parse.go b/vendor/github.com/prometheus/common/expfmt/text_parse.go index ef9a15077..54bcfde29 100644 --- a/vendor/github.com/prometheus/common/expfmt/text_parse.go +++ b/vendor/github.com/prometheus/common/expfmt/text_parse.go @@ -315,6 +315,10 @@ func (p *TextParser) startLabelValue() stateFn { if p.readTokenAsLabelValue(); p.err != nil { return nil } + if !model.LabelValue(p.currentToken.String()).IsValid() { + p.parseError(fmt.Sprintf("invalid label value %q", p.currentToken.String())) + return nil + } p.currentLabelPair.Value = proto.String(p.currentToken.String()) // Special treatment of summaries: // - Quantile labels are special, will result in dto.Quantile later. diff --git a/vendor/github.com/prometheus/common/expfmt/text_parse_test.go b/vendor/github.com/prometheus/common/expfmt/text_parse_test.go new file mode 100644 index 000000000..76c951185 --- /dev/null +++ b/vendor/github.com/prometheus/common/expfmt/text_parse_test.go @@ -0,0 +1,593 @@ +// Copyright 2014 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package expfmt + +import ( + "math" + "strings" + "testing" + + "github.com/golang/protobuf/proto" + dto "github.com/prometheus/client_model/go" +) + +func testTextParse(t testing.TB) { + var scenarios = []struct { + in string + out []*dto.MetricFamily + }{ + // 0: Empty lines as input. + { + in: ` + +`, + out: []*dto.MetricFamily{}, + }, + // 1: Minimal case. + { + in: ` +minimal_metric 1.234 +another_metric -3e3 103948 +# Even that: +no_labels{} 3 +# HELP line for non-existing metric will be ignored. +`, + out: []*dto.MetricFamily{ + &dto.MetricFamily{ + Name: proto.String("minimal_metric"), + Type: dto.MetricType_UNTYPED.Enum(), + Metric: []*dto.Metric{ + &dto.Metric{ + Untyped: &dto.Untyped{ + Value: proto.Float64(1.234), + }, + }, + }, + }, + &dto.MetricFamily{ + Name: proto.String("another_metric"), + Type: dto.MetricType_UNTYPED.Enum(), + Metric: []*dto.Metric{ + &dto.Metric{ + Untyped: &dto.Untyped{ + Value: proto.Float64(-3e3), + }, + TimestampMs: proto.Int64(103948), + }, + }, + }, + &dto.MetricFamily{ + Name: proto.String("no_labels"), + Type: dto.MetricType_UNTYPED.Enum(), + Metric: []*dto.Metric{ + &dto.Metric{ + Untyped: &dto.Untyped{ + Value: proto.Float64(3), + }, + }, + }, + }, + }, + }, + // 2: Counters & gauges, docstrings, various whitespace, escape sequences. + { + in: ` +# A normal comment. +# +# TYPE name counter +name{labelname="val1",basename="basevalue"} NaN +name {labelname="val2",basename="base\"v\\al\nue"} 0.23 1234567890 +# HELP name two-line\n doc str\\ing + + # HELP name2 doc str"ing 2 + # TYPE name2 gauge +name2{labelname="val2" ,basename = "basevalue2" } +Inf 54321 +name2{ labelname = "val1" , }-Inf +`, + out: []*dto.MetricFamily{ + &dto.MetricFamily{ + Name: proto.String("name"), + Help: proto.String("two-line\n doc str\\ing"), + Type: dto.MetricType_COUNTER.Enum(), + Metric: []*dto.Metric{ + &dto.Metric{ + Label: []*dto.LabelPair{ + &dto.LabelPair{ + Name: proto.String("labelname"), + Value: proto.String("val1"), + }, + &dto.LabelPair{ + Name: proto.String("basename"), + Value: proto.String("basevalue"), + }, + }, + Counter: &dto.Counter{ + Value: proto.Float64(math.NaN()), + }, + }, + &dto.Metric{ + Label: []*dto.LabelPair{ + &dto.LabelPair{ + Name: proto.String("labelname"), + Value: proto.String("val2"), + }, + &dto.LabelPair{ + Name: proto.String("basename"), + Value: proto.String("base\"v\\al\nue"), + }, + }, + Counter: &dto.Counter{ + Value: proto.Float64(.23), + }, + TimestampMs: proto.Int64(1234567890), + }, + }, + }, + &dto.MetricFamily{ + Name: proto.String("name2"), + Help: proto.String("doc str\"ing 2"), + Type: dto.MetricType_GAUGE.Enum(), + Metric: []*dto.Metric{ + &dto.Metric{ + Label: []*dto.LabelPair{ + &dto.LabelPair{ + Name: proto.String("labelname"), + Value: proto.String("val2"), + }, + &dto.LabelPair{ + Name: proto.String("basename"), + Value: proto.String("basevalue2"), + }, + }, + Gauge: &dto.Gauge{ + Value: proto.Float64(math.Inf(+1)), + }, + TimestampMs: proto.Int64(54321), + }, + &dto.Metric{ + Label: []*dto.LabelPair{ + &dto.LabelPair{ + Name: proto.String("labelname"), + Value: proto.String("val1"), + }, + }, + Gauge: &dto.Gauge{ + Value: proto.Float64(math.Inf(-1)), + }, + }, + }, + }, + }, + }, + // 3: The evil summary, mixed with other types and funny comments. + { + in: ` +# TYPE my_summary summary +my_summary{n1="val1",quantile="0.5"} 110 +decoy -1 -2 +my_summary{n1="val1",quantile="0.9"} 140 1 +my_summary_count{n1="val1"} 42 +# Latest timestamp wins in case of a summary. +my_summary_sum{n1="val1"} 4711 2 +fake_sum{n1="val1"} 2001 +# TYPE another_summary summary +another_summary_count{n2="val2",n1="val1"} 20 +my_summary_count{n2="val2",n1="val1"} 5 5 +another_summary{n1="val1",n2="val2",quantile=".3"} -1.2 +my_summary_sum{n1="val2"} 08 15 +my_summary{n1="val3", quantile="0.2"} 4711 + my_summary{n1="val1",n2="val2",quantile="-12.34",} NaN +# some +# funny comments +# HELP +# HELP +# HELP my_summary +# HELP my_summary +`, + out: []*dto.MetricFamily{ + &dto.MetricFamily{ + Name: proto.String("fake_sum"), + Type: dto.MetricType_UNTYPED.Enum(), + Metric: []*dto.Metric{ + &dto.Metric{ + Label: []*dto.LabelPair{ + &dto.LabelPair{ + Name: proto.String("n1"), + Value: proto.String("val1"), + }, + }, + Untyped: &dto.Untyped{ + Value: proto.Float64(2001), + }, + }, + }, + }, + &dto.MetricFamily{ + Name: proto.String("decoy"), + Type: dto.MetricType_UNTYPED.Enum(), + Metric: []*dto.Metric{ + &dto.Metric{ + Untyped: &dto.Untyped{ + Value: proto.Float64(-1), + }, + TimestampMs: proto.Int64(-2), + }, + }, + }, + &dto.MetricFamily{ + Name: proto.String("my_summary"), + Type: dto.MetricType_SUMMARY.Enum(), + Metric: []*dto.Metric{ + &dto.Metric{ + Label: []*dto.LabelPair{ + &dto.LabelPair{ + Name: proto.String("n1"), + Value: proto.String("val1"), + }, + }, + Summary: &dto.Summary{ + SampleCount: proto.Uint64(42), + SampleSum: proto.Float64(4711), + Quantile: []*dto.Quantile{ + &dto.Quantile{ + Quantile: proto.Float64(0.5), + Value: proto.Float64(110), + }, + &dto.Quantile{ + Quantile: proto.Float64(0.9), + Value: proto.Float64(140), + }, + }, + }, + TimestampMs: proto.Int64(2), + }, + &dto.Metric{ + Label: []*dto.LabelPair{ + &dto.LabelPair{ + Name: proto.String("n2"), + Value: proto.String("val2"), + }, + &dto.LabelPair{ + Name: proto.String("n1"), + Value: proto.String("val1"), + }, + }, + Summary: &dto.Summary{ + SampleCount: proto.Uint64(5), + Quantile: []*dto.Quantile{ + &dto.Quantile{ + Quantile: proto.Float64(-12.34), + Value: proto.Float64(math.NaN()), + }, + }, + }, + TimestampMs: proto.Int64(5), + }, + &dto.Metric{ + Label: []*dto.LabelPair{ + &dto.LabelPair{ + Name: proto.String("n1"), + Value: proto.String("val2"), + }, + }, + Summary: &dto.Summary{ + SampleSum: proto.Float64(8), + }, + TimestampMs: proto.Int64(15), + }, + &dto.Metric{ + Label: []*dto.LabelPair{ + &dto.LabelPair{ + Name: proto.String("n1"), + Value: proto.String("val3"), + }, + }, + Summary: &dto.Summary{ + Quantile: []*dto.Quantile{ + &dto.Quantile{ + Quantile: proto.Float64(0.2), + Value: proto.Float64(4711), + }, + }, + }, + }, + }, + }, + &dto.MetricFamily{ + Name: proto.String("another_summary"), + Type: dto.MetricType_SUMMARY.Enum(), + Metric: []*dto.Metric{ + &dto.Metric{ + Label: []*dto.LabelPair{ + &dto.LabelPair{ + Name: proto.String("n2"), + Value: proto.String("val2"), + }, + &dto.LabelPair{ + Name: proto.String("n1"), + Value: proto.String("val1"), + }, + }, + Summary: &dto.Summary{ + SampleCount: proto.Uint64(20), + Quantile: []*dto.Quantile{ + &dto.Quantile{ + Quantile: proto.Float64(0.3), + Value: proto.Float64(-1.2), + }, + }, + }, + }, + }, + }, + }, + }, + // 4: The histogram. + { + in: ` +# HELP request_duration_microseconds The response latency. +# TYPE request_duration_microseconds histogram +request_duration_microseconds_bucket{le="100"} 123 +request_duration_microseconds_bucket{le="120"} 412 +request_duration_microseconds_bucket{le="144"} 592 +request_duration_microseconds_bucket{le="172.8"} 1524 +request_duration_microseconds_bucket{le="+Inf"} 2693 +request_duration_microseconds_sum 1.7560473e+06 +request_duration_microseconds_count 2693 +`, + out: []*dto.MetricFamily{ + { + Name: proto.String("request_duration_microseconds"), + Help: proto.String("The response latency."), + Type: dto.MetricType_HISTOGRAM.Enum(), + Metric: []*dto.Metric{ + &dto.Metric{ + Histogram: &dto.Histogram{ + SampleCount: proto.Uint64(2693), + SampleSum: proto.Float64(1756047.3), + Bucket: []*dto.Bucket{ + &dto.Bucket{ + UpperBound: proto.Float64(100), + CumulativeCount: proto.Uint64(123), + }, + &dto.Bucket{ + UpperBound: proto.Float64(120), + CumulativeCount: proto.Uint64(412), + }, + &dto.Bucket{ + UpperBound: proto.Float64(144), + CumulativeCount: proto.Uint64(592), + }, + &dto.Bucket{ + UpperBound: proto.Float64(172.8), + CumulativeCount: proto.Uint64(1524), + }, + &dto.Bucket{ + UpperBound: proto.Float64(math.Inf(+1)), + CumulativeCount: proto.Uint64(2693), + }, + }, + }, + }, + }, + }, + }, + }, + } + + for i, scenario := range scenarios { + out, err := parser.TextToMetricFamilies(strings.NewReader(scenario.in)) + if err != nil { + t.Errorf("%d. error: %s", i, err) + continue + } + if expected, got := len(scenario.out), len(out); expected != got { + t.Errorf( + "%d. expected %d MetricFamilies, got %d", + i, expected, got, + ) + } + for _, expected := range scenario.out { + got, ok := out[expected.GetName()] + if !ok { + t.Errorf( + "%d. expected MetricFamily %q, found none", + i, expected.GetName(), + ) + continue + } + if expected.String() != got.String() { + t.Errorf( + "%d. expected MetricFamily %s, got %s", + i, expected, got, + ) + } + } + } +} + +func TestTextParse(t *testing.T) { + testTextParse(t) +} + +func BenchmarkTextParse(b *testing.B) { + for i := 0; i < b.N; i++ { + testTextParse(b) + } +} + +func testTextParseError(t testing.TB) { + var scenarios = []struct { + in string + err string + }{ + // 0: No new-line at end of input. + { + in: ` +bla 3.14 +blubber 42`, + err: "text format parsing error in line 3: unexpected end of input stream", + }, + // 1: Invalid escape sequence in label value. + { + in: `metric{label="\t"} 3.14`, + err: "text format parsing error in line 1: invalid escape sequence", + }, + // 2: Newline in label value. + { + in: ` +metric{label="new +line"} 3.14 +`, + err: `text format parsing error in line 2: label value "new" contains unescaped new-line`, + }, + // 3: + { + in: `metric{@="bla"} 3.14`, + err: "text format parsing error in line 1: invalid label name for metric", + }, + // 4: + { + in: `metric{__name__="bla"} 3.14`, + err: `text format parsing error in line 1: label name "__name__" is reserved`, + }, + // 5: + { + in: `metric{label+="bla"} 3.14`, + err: "text format parsing error in line 1: expected '=' after label name", + }, + // 6: + { + in: `metric{label=bla} 3.14`, + err: "text format parsing error in line 1: expected '\"' at start of label value", + }, + // 7: + { + in: ` +# TYPE metric summary +metric{quantile="bla"} 3.14 +`, + err: "text format parsing error in line 3: expected float as value for 'quantile' label", + }, + // 8: + { + in: `metric{label="bla"+} 3.14`, + err: "text format parsing error in line 1: unexpected end of label value", + }, + // 9: + { + in: `metric{label="bla"} 3.14 2.72 +`, + err: "text format parsing error in line 1: expected integer as timestamp", + }, + // 10: + { + in: `metric{label="bla"} 3.14 2 3 +`, + err: "text format parsing error in line 1: spurious string after timestamp", + }, + // 11: + { + in: `metric{label="bla"} blubb +`, + err: "text format parsing error in line 1: expected float as value", + }, + // 12: + { + in: ` +# HELP metric one +# HELP metric two +`, + err: "text format parsing error in line 3: second HELP line for metric name", + }, + // 13: + { + in: ` +# TYPE metric counter +# TYPE metric untyped +`, + err: `text format parsing error in line 3: second TYPE line for metric name "metric", or TYPE reported after samples`, + }, + // 14: + { + in: ` +metric 4.12 +# TYPE metric counter +`, + err: `text format parsing error in line 3: second TYPE line for metric name "metric", or TYPE reported after samples`, + }, + // 14: + { + in: ` +# TYPE metric bla +`, + err: "text format parsing error in line 2: unknown metric type", + }, + // 15: + { + in: ` +# TYPE met-ric +`, + err: "text format parsing error in line 2: invalid metric name in comment", + }, + // 16: + { + in: `@invalidmetric{label="bla"} 3.14 2`, + err: "text format parsing error in line 1: invalid metric name", + }, + // 17: + { + in: `{label="bla"} 3.14 2`, + err: "text format parsing error in line 1: invalid metric name", + }, + // 18: + { + in: ` +# TYPE metric histogram +metric_bucket{le="bla"} 3.14 +`, + err: "text format parsing error in line 3: expected float as value for 'le' label", + }, + // 19: Invalid UTF-8 in label value. + { + in: "metric{l=\"\xbd\"} 3.14\n", + err: "text format parsing error in line 1: invalid label value \"\\xbd\"", + }, + } + + for i, scenario := range scenarios { + _, err := parser.TextToMetricFamilies(strings.NewReader(scenario.in)) + if err == nil { + t.Errorf("%d. expected error, got nil", i) + continue + } + if expected, got := scenario.err, err.Error(); strings.Index(got, expected) != 0 { + t.Errorf( + "%d. expected error starting with %q, got %q", + i, expected, got, + ) + } + } + +} + +func TestTextParseError(t *testing.T) { + testTextParseError(t) +} + +func BenchmarkParseError(b *testing.B) { + for i := 0; i < b.N; i++ { + testTextParseError(b) + } +} diff --git a/vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/autoneg_test.go b/vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/autoneg_test.go new file mode 100644 index 000000000..41d328f1d --- /dev/null +++ b/vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/autoneg_test.go @@ -0,0 +1,33 @@ +package goautoneg + +import ( + "testing" +) + +var chrome = "application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5" + +func TestParseAccept(t *testing.T) { + alternatives := []string{"text/html", "image/png"} + content_type := Negotiate(chrome, alternatives) + if content_type != "image/png" { + t.Errorf("got %s expected image/png", content_type) + } + + alternatives = []string{"text/html", "text/plain", "text/n3"} + content_type = Negotiate(chrome, alternatives) + if content_type != "text/html" { + t.Errorf("got %s expected text/html", content_type) + } + + alternatives = []string{"text/n3", "text/plain"} + content_type = Negotiate(chrome, alternatives) + if content_type != "text/plain" { + t.Errorf("got %s expected text/plain", content_type) + } + + alternatives = []string{"text/n3", "application/rdf+xml"} + content_type = Negotiate(chrome, alternatives) + if content_type != "text/n3" { + t.Errorf("got %s expected text/n3", content_type) + } +} diff --git a/vendor/github.com/prometheus/common/model/alert_test.go b/vendor/github.com/prometheus/common/model/alert_test.go new file mode 100644 index 000000000..9692bca21 --- /dev/null +++ b/vendor/github.com/prometheus/common/model/alert_test.go @@ -0,0 +1,118 @@ +// Copyright 2013 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package model + +import ( + "strings" + "testing" + "time" +) + +func TestAlertValidate(t *testing.T) { + ts := time.Now() + + var cases = []struct { + alert *Alert + err string + }{ + { + alert: &Alert{ + Labels: LabelSet{"a": "b"}, + StartsAt: ts, + }, + }, + { + alert: &Alert{ + Labels: LabelSet{"a": "b"}, + }, + err: "start time missing", + }, + { + alert: &Alert{ + Labels: LabelSet{"a": "b"}, + StartsAt: ts, + EndsAt: ts, + }, + }, + { + alert: &Alert{ + Labels: LabelSet{"a": "b"}, + StartsAt: ts, + EndsAt: ts.Add(1 * time.Minute), + }, + }, + { + alert: &Alert{ + Labels: LabelSet{"a": "b"}, + StartsAt: ts, + EndsAt: ts.Add(-1 * time.Minute), + }, + err: "start time must be before end time", + }, + { + alert: &Alert{ + StartsAt: ts, + }, + err: "at least one label pair required", + }, + { + alert: &Alert{ + Labels: LabelSet{"a": "b", "!bad": "label"}, + StartsAt: ts, + }, + err: "invalid label set: invalid name", + }, + { + alert: &Alert{ + Labels: LabelSet{"a": "b", "bad": "\xfflabel"}, + StartsAt: ts, + }, + err: "invalid label set: invalid value", + }, + { + alert: &Alert{ + Labels: LabelSet{"a": "b"}, + Annotations: LabelSet{"!bad": "label"}, + StartsAt: ts, + }, + err: "invalid annotations: invalid name", + }, + { + alert: &Alert{ + Labels: LabelSet{"a": "b"}, + Annotations: LabelSet{"bad": "\xfflabel"}, + StartsAt: ts, + }, + err: "invalid annotations: invalid value", + }, + } + + for i, c := range cases { + err := c.alert.Validate() + if err == nil { + if c.err == "" { + continue + } + t.Errorf("%d. Expected error %q but got none", i, c.err) + continue + } + if c.err == "" && err != nil { + t.Errorf("%d. Expected no error but got %q", i, err) + continue + } + if !strings.Contains(err.Error(), c.err) { + t.Errorf("%d. Expected error to contain %q but got %q", i, c.err, err) + } + } +} diff --git a/vendor/github.com/prometheus/common/model/labels_test.go b/vendor/github.com/prometheus/common/model/labels_test.go new file mode 100644 index 000000000..e8df28ffa --- /dev/null +++ b/vendor/github.com/prometheus/common/model/labels_test.go @@ -0,0 +1,140 @@ +// Copyright 2013 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package model + +import ( + "sort" + "testing" +) + +func testLabelNames(t testing.TB) { + var scenarios = []struct { + in LabelNames + out LabelNames + }{ + { + in: LabelNames{"ZZZ", "zzz"}, + out: LabelNames{"ZZZ", "zzz"}, + }, + { + in: LabelNames{"aaa", "AAA"}, + out: LabelNames{"AAA", "aaa"}, + }, + } + + for i, scenario := range scenarios { + sort.Sort(scenario.in) + + for j, expected := range scenario.out { + if expected != scenario.in[j] { + t.Errorf("%d.%d expected %s, got %s", i, j, expected, scenario.in[j]) + } + } + } +} + +func TestLabelNames(t *testing.T) { + testLabelNames(t) +} + +func BenchmarkLabelNames(b *testing.B) { + for i := 0; i < b.N; i++ { + testLabelNames(b) + } +} + +func testLabelValues(t testing.TB) { + var scenarios = []struct { + in LabelValues + out LabelValues + }{ + { + in: LabelValues{"ZZZ", "zzz"}, + out: LabelValues{"ZZZ", "zzz"}, + }, + { + in: LabelValues{"aaa", "AAA"}, + out: LabelValues{"AAA", "aaa"}, + }, + } + + for i, scenario := range scenarios { + sort.Sort(scenario.in) + + for j, expected := range scenario.out { + if expected != scenario.in[j] { + t.Errorf("%d.%d expected %s, got %s", i, j, expected, scenario.in[j]) + } + } + } +} + +func TestLabelValues(t *testing.T) { + testLabelValues(t) +} + +func BenchmarkLabelValues(b *testing.B) { + for i := 0; i < b.N; i++ { + testLabelValues(b) + } +} + +func TestLabelNameIsValid(t *testing.T) { + var scenarios = []struct { + ln LabelName + valid bool + }{ + { + ln: "Avalid_23name", + valid: true, + }, + { + ln: "_Avalid_23name", + valid: true, + }, + { + ln: "1valid_23name", + valid: false, + }, + { + ln: "avalid_23name", + valid: true, + }, + { + ln: "Ava:lid_23name", + valid: false, + }, + { + ln: "a lid_23name", + valid: false, + }, + { + ln: ":leading_colon", + valid: false, + }, + { + ln: "colon:in:the:middle", + valid: false, + }, + } + + for _, s := range scenarios { + if s.ln.IsValid() != s.valid { + t.Errorf("Expected %v for %q using IsValid method", s.valid, s.ln) + } + if LabelNameRE.MatchString(string(s.ln)) != s.valid { + t.Errorf("Expected %v for %q using regexp match", s.valid, s.ln) + } + } +} diff --git a/vendor/github.com/prometheus/common/model/metric_test.go b/vendor/github.com/prometheus/common/model/metric_test.go new file mode 100644 index 000000000..06f9de525 --- /dev/null +++ b/vendor/github.com/prometheus/common/model/metric_test.go @@ -0,0 +1,132 @@ +// Copyright 2013 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package model + +import "testing" + +func testMetric(t testing.TB) { + var scenarios = []struct { + input LabelSet + fingerprint Fingerprint + fastFingerprint Fingerprint + }{ + { + input: LabelSet{}, + fingerprint: 14695981039346656037, + fastFingerprint: 14695981039346656037, + }, + { + input: LabelSet{ + "first_name": "electro", + "occupation": "robot", + "manufacturer": "westinghouse", + }, + fingerprint: 5911716720268894962, + fastFingerprint: 11310079640881077873, + }, + { + input: LabelSet{ + "x": "y", + }, + fingerprint: 8241431561484471700, + fastFingerprint: 13948396922932177635, + }, + { + input: LabelSet{ + "a": "bb", + "b": "c", + }, + fingerprint: 3016285359649981711, + fastFingerprint: 3198632812309449502, + }, + { + input: LabelSet{ + "a": "b", + "bb": "c", + }, + fingerprint: 7122421792099404749, + fastFingerprint: 5774953389407657638, + }, + } + + for i, scenario := range scenarios { + input := Metric(scenario.input) + + if scenario.fingerprint != input.Fingerprint() { + t.Errorf("%d. expected %d, got %d", i, scenario.fingerprint, input.Fingerprint()) + } + if scenario.fastFingerprint != input.FastFingerprint() { + t.Errorf("%d. expected %d, got %d", i, scenario.fastFingerprint, input.FastFingerprint()) + } + } +} + +func TestMetric(t *testing.T) { + testMetric(t) +} + +func BenchmarkMetric(b *testing.B) { + for i := 0; i < b.N; i++ { + testMetric(b) + } +} + +func TestMetricNameIsValid(t *testing.T) { + var scenarios = []struct { + mn LabelValue + valid bool + }{ + { + mn: "Avalid_23name", + valid: true, + }, + { + mn: "_Avalid_23name", + valid: true, + }, + { + mn: "1valid_23name", + valid: false, + }, + { + mn: "avalid_23name", + valid: true, + }, + { + mn: "Ava:lid_23name", + valid: true, + }, + { + mn: "a lid_23name", + valid: false, + }, + { + mn: ":leading_colon", + valid: true, + }, + { + mn: "colon:in:the:middle", + valid: true, + }, + } + + for _, s := range scenarios { + if IsValidMetricName(s.mn) != s.valid { + t.Errorf("Expected %v for %q using IsValidMetricName function", s.valid, s.mn) + } + if MetricNameRE.MatchString(string(s.mn)) != s.valid { + t.Errorf("Expected %v for %q using regexp matching", s.valid, s.mn) + } + } +} diff --git a/vendor/github.com/prometheus/common/model/signature_test.go b/vendor/github.com/prometheus/common/model/signature_test.go new file mode 100644 index 000000000..d59c8a8c3 --- /dev/null +++ b/vendor/github.com/prometheus/common/model/signature_test.go @@ -0,0 +1,314 @@ +// Copyright 2014 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package model + +import ( + "runtime" + "sync" + "testing" +) + +func TestLabelsToSignature(t *testing.T) { + var scenarios = []struct { + in map[string]string + out uint64 + }{ + { + in: map[string]string{}, + out: 14695981039346656037, + }, + { + in: map[string]string{"name": "garland, briggs", "fear": "love is not enough"}, + out: 5799056148416392346, + }, + } + + for i, scenario := range scenarios { + actual := LabelsToSignature(scenario.in) + + if actual != scenario.out { + t.Errorf("%d. expected %d, got %d", i, scenario.out, actual) + } + } +} + +func TestMetricToFingerprint(t *testing.T) { + var scenarios = []struct { + in LabelSet + out Fingerprint + }{ + { + in: LabelSet{}, + out: 14695981039346656037, + }, + { + in: LabelSet{"name": "garland, briggs", "fear": "love is not enough"}, + out: 5799056148416392346, + }, + } + + for i, scenario := range scenarios { + actual := labelSetToFingerprint(scenario.in) + + if actual != scenario.out { + t.Errorf("%d. expected %d, got %d", i, scenario.out, actual) + } + } +} + +func TestMetricToFastFingerprint(t *testing.T) { + var scenarios = []struct { + in LabelSet + out Fingerprint + }{ + { + in: LabelSet{}, + out: 14695981039346656037, + }, + { + in: LabelSet{"name": "garland, briggs", "fear": "love is not enough"}, + out: 12952432476264840823, + }, + } + + for i, scenario := range scenarios { + actual := labelSetToFastFingerprint(scenario.in) + + if actual != scenario.out { + t.Errorf("%d. expected %d, got %d", i, scenario.out, actual) + } + } +} + +func TestSignatureForLabels(t *testing.T) { + var scenarios = []struct { + in Metric + labels LabelNames + out uint64 + }{ + { + in: Metric{}, + labels: nil, + out: 14695981039346656037, + }, + { + in: Metric{}, + labels: LabelNames{"empty"}, + out: 7187873163539638612, + }, + { + in: Metric{"name": "garland, briggs", "fear": "love is not enough"}, + labels: LabelNames{"empty"}, + out: 7187873163539638612, + }, + { + in: Metric{"name": "garland, briggs", "fear": "love is not enough"}, + labels: LabelNames{"fear", "name"}, + out: 5799056148416392346, + }, + { + in: Metric{"name": "garland, briggs", "fear": "love is not enough", "foo": "bar"}, + labels: LabelNames{"fear", "name"}, + out: 5799056148416392346, + }, + { + in: Metric{"name": "garland, briggs", "fear": "love is not enough"}, + labels: LabelNames{}, + out: 14695981039346656037, + }, + { + in: Metric{"name": "garland, briggs", "fear": "love is not enough"}, + labels: nil, + out: 14695981039346656037, + }, + } + + for i, scenario := range scenarios { + actual := SignatureForLabels(scenario.in, scenario.labels...) + + if actual != scenario.out { + t.Errorf("%d. expected %d, got %d", i, scenario.out, actual) + } + } +} + +func TestSignatureWithoutLabels(t *testing.T) { + var scenarios = []struct { + in Metric + labels map[LabelName]struct{} + out uint64 + }{ + { + in: Metric{}, + labels: nil, + out: 14695981039346656037, + }, + { + in: Metric{"name": "garland, briggs", "fear": "love is not enough"}, + labels: map[LabelName]struct{}{"fear": struct{}{}, "name": struct{}{}}, + out: 14695981039346656037, + }, + { + in: Metric{"name": "garland, briggs", "fear": "love is not enough", "foo": "bar"}, + labels: map[LabelName]struct{}{"foo": struct{}{}}, + out: 5799056148416392346, + }, + { + in: Metric{"name": "garland, briggs", "fear": "love is not enough"}, + labels: map[LabelName]struct{}{}, + out: 5799056148416392346, + }, + { + in: Metric{"name": "garland, briggs", "fear": "love is not enough"}, + labels: nil, + out: 5799056148416392346, + }, + } + + for i, scenario := range scenarios { + actual := SignatureWithoutLabels(scenario.in, scenario.labels) + + if actual != scenario.out { + t.Errorf("%d. expected %d, got %d", i, scenario.out, actual) + } + } +} + +func benchmarkLabelToSignature(b *testing.B, l map[string]string, e uint64) { + for i := 0; i < b.N; i++ { + if a := LabelsToSignature(l); a != e { + b.Fatalf("expected signature of %d for %s, got %d", e, l, a) + } + } +} + +func BenchmarkLabelToSignatureScalar(b *testing.B) { + benchmarkLabelToSignature(b, nil, 14695981039346656037) +} + +func BenchmarkLabelToSignatureSingle(b *testing.B) { + benchmarkLabelToSignature(b, map[string]string{"first-label": "first-label-value"}, 5146282821936882169) +} + +func BenchmarkLabelToSignatureDouble(b *testing.B) { + benchmarkLabelToSignature(b, map[string]string{"first-label": "first-label-value", "second-label": "second-label-value"}, 3195800080984914717) +} + +func BenchmarkLabelToSignatureTriple(b *testing.B) { + benchmarkLabelToSignature(b, map[string]string{"first-label": "first-label-value", "second-label": "second-label-value", "third-label": "third-label-value"}, 13843036195897128121) +} + +func benchmarkMetricToFingerprint(b *testing.B, ls LabelSet, e Fingerprint) { + for i := 0; i < b.N; i++ { + if a := labelSetToFingerprint(ls); a != e { + b.Fatalf("expected signature of %d for %s, got %d", e, ls, a) + } + } +} + +func BenchmarkMetricToFingerprintScalar(b *testing.B) { + benchmarkMetricToFingerprint(b, nil, 14695981039346656037) +} + +func BenchmarkMetricToFingerprintSingle(b *testing.B) { + benchmarkMetricToFingerprint(b, LabelSet{"first-label": "first-label-value"}, 5146282821936882169) +} + +func BenchmarkMetricToFingerprintDouble(b *testing.B) { + benchmarkMetricToFingerprint(b, LabelSet{"first-label": "first-label-value", "second-label": "second-label-value"}, 3195800080984914717) +} + +func BenchmarkMetricToFingerprintTriple(b *testing.B) { + benchmarkMetricToFingerprint(b, LabelSet{"first-label": "first-label-value", "second-label": "second-label-value", "third-label": "third-label-value"}, 13843036195897128121) +} + +func benchmarkMetricToFastFingerprint(b *testing.B, ls LabelSet, e Fingerprint) { + for i := 0; i < b.N; i++ { + if a := labelSetToFastFingerprint(ls); a != e { + b.Fatalf("expected signature of %d for %s, got %d", e, ls, a) + } + } +} + +func BenchmarkMetricToFastFingerprintScalar(b *testing.B) { + benchmarkMetricToFastFingerprint(b, nil, 14695981039346656037) +} + +func BenchmarkMetricToFastFingerprintSingle(b *testing.B) { + benchmarkMetricToFastFingerprint(b, LabelSet{"first-label": "first-label-value"}, 5147259542624943964) +} + +func BenchmarkMetricToFastFingerprintDouble(b *testing.B) { + benchmarkMetricToFastFingerprint(b, LabelSet{"first-label": "first-label-value", "second-label": "second-label-value"}, 18269973311206963528) +} + +func BenchmarkMetricToFastFingerprintTriple(b *testing.B) { + benchmarkMetricToFastFingerprint(b, LabelSet{"first-label": "first-label-value", "second-label": "second-label-value", "third-label": "third-label-value"}, 15738406913934009676) +} + +func BenchmarkEmptyLabelSignature(b *testing.B) { + input := []map[string]string{nil, {}} + + var ms runtime.MemStats + runtime.ReadMemStats(&ms) + + alloc := ms.Alloc + + for _, labels := range input { + LabelsToSignature(labels) + } + + runtime.ReadMemStats(&ms) + + if got := ms.Alloc; alloc != got { + b.Fatal("expected LabelsToSignature with empty labels not to perform allocations") + } +} + +func benchmarkMetricToFastFingerprintConc(b *testing.B, ls LabelSet, e Fingerprint, concLevel int) { + var start, end sync.WaitGroup + start.Add(1) + end.Add(concLevel) + + for i := 0; i < concLevel; i++ { + go func() { + start.Wait() + for j := b.N / concLevel; j >= 0; j-- { + if a := labelSetToFastFingerprint(ls); a != e { + b.Fatalf("expected signature of %d for %s, got %d", e, ls, a) + } + } + end.Done() + }() + } + b.ResetTimer() + start.Done() + end.Wait() +} + +func BenchmarkMetricToFastFingerprintTripleConc1(b *testing.B) { + benchmarkMetricToFastFingerprintConc(b, LabelSet{"first-label": "first-label-value", "second-label": "second-label-value", "third-label": "third-label-value"}, 15738406913934009676, 1) +} + +func BenchmarkMetricToFastFingerprintTripleConc2(b *testing.B) { + benchmarkMetricToFastFingerprintConc(b, LabelSet{"first-label": "first-label-value", "second-label": "second-label-value", "third-label": "third-label-value"}, 15738406913934009676, 2) +} + +func BenchmarkMetricToFastFingerprintTripleConc4(b *testing.B) { + benchmarkMetricToFastFingerprintConc(b, LabelSet{"first-label": "first-label-value", "second-label": "second-label-value", "third-label": "third-label-value"}, 15738406913934009676, 4) +} + +func BenchmarkMetricToFastFingerprintTripleConc8(b *testing.B) { + benchmarkMetricToFastFingerprintConc(b, LabelSet{"first-label": "first-label-value", "second-label": "second-label-value", "third-label": "third-label-value"}, 15738406913934009676, 8) +} diff --git a/vendor/github.com/prometheus/common/model/silence_test.go b/vendor/github.com/prometheus/common/model/silence_test.go new file mode 100644 index 000000000..8eaaf0744 --- /dev/null +++ b/vendor/github.com/prometheus/common/model/silence_test.go @@ -0,0 +1,228 @@ +// Copyright 2015 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package model + +import ( + "strings" + "testing" + "time" +) + +func TestMatcherValidate(t *testing.T) { + var cases = []struct { + matcher *Matcher + err string + }{ + { + matcher: &Matcher{ + Name: "name", + Value: "value", + }, + }, + { + matcher: &Matcher{ + Name: "name", + Value: "value", + IsRegex: true, + }, + }, + { + matcher: &Matcher{ + Name: "name!", + Value: "value", + }, + err: "invalid name", + }, + { + matcher: &Matcher{ + Name: "", + Value: "value", + }, + err: "invalid name", + }, + { + matcher: &Matcher{ + Name: "name", + Value: "value\xff", + }, + err: "invalid value", + }, + { + matcher: &Matcher{ + Name: "name", + Value: "", + }, + err: "invalid value", + }, + } + + for i, c := range cases { + err := c.matcher.Validate() + if err == nil { + if c.err == "" { + continue + } + t.Errorf("%d. Expected error %q but got none", i, c.err) + continue + } + if c.err == "" && err != nil { + t.Errorf("%d. Expected no error but got %q", i, err) + continue + } + if !strings.Contains(err.Error(), c.err) { + t.Errorf("%d. Expected error to contain %q but got %q", i, c.err, err) + } + } +} + +func TestSilenceValidate(t *testing.T) { + ts := time.Now() + + var cases = []struct { + sil *Silence + err string + }{ + { + sil: &Silence{ + Matchers: []*Matcher{ + {Name: "name", Value: "value"}, + }, + StartsAt: ts, + EndsAt: ts, + CreatedAt: ts, + CreatedBy: "name", + Comment: "comment", + }, + }, + { + sil: &Silence{ + Matchers: []*Matcher{ + {Name: "name", Value: "value"}, + {Name: "name", Value: "value"}, + {Name: "name", Value: "value"}, + {Name: "name", Value: "value", IsRegex: true}, + }, + StartsAt: ts, + EndsAt: ts, + CreatedAt: ts, + CreatedBy: "name", + Comment: "comment", + }, + }, + { + sil: &Silence{ + Matchers: []*Matcher{ + {Name: "name", Value: "value"}, + }, + StartsAt: ts, + EndsAt: ts.Add(-1 * time.Minute), + CreatedAt: ts, + CreatedBy: "name", + Comment: "comment", + }, + err: "start time must be before end time", + }, + { + sil: &Silence{ + Matchers: []*Matcher{ + {Name: "name", Value: "value"}, + }, + StartsAt: ts, + CreatedAt: ts, + CreatedBy: "name", + Comment: "comment", + }, + err: "end time missing", + }, + { + sil: &Silence{ + Matchers: []*Matcher{ + {Name: "name", Value: "value"}, + }, + EndsAt: ts, + CreatedAt: ts, + CreatedBy: "name", + Comment: "comment", + }, + err: "start time missing", + }, + { + sil: &Silence{ + Matchers: []*Matcher{ + {Name: "!name", Value: "value"}, + }, + StartsAt: ts, + EndsAt: ts, + CreatedAt: ts, + CreatedBy: "name", + Comment: "comment", + }, + err: "invalid matcher", + }, + { + sil: &Silence{ + Matchers: []*Matcher{ + {Name: "name", Value: "value"}, + }, + StartsAt: ts, + EndsAt: ts, + CreatedAt: ts, + CreatedBy: "name", + }, + err: "comment missing", + }, + { + sil: &Silence{ + Matchers: []*Matcher{ + {Name: "name", Value: "value"}, + }, + StartsAt: ts, + EndsAt: ts, + CreatedBy: "name", + Comment: "comment", + }, + err: "creation timestamp missing", + }, + { + sil: &Silence{ + Matchers: []*Matcher{ + {Name: "name", Value: "value"}, + }, + StartsAt: ts, + EndsAt: ts, + CreatedAt: ts, + Comment: "comment", + }, + err: "creator information missing", + }, + } + + for i, c := range cases { + err := c.sil.Validate() + if err == nil { + if c.err == "" { + continue + } + t.Errorf("%d. Expected error %q but got none", i, c.err) + continue + } + if c.err == "" && err != nil { + t.Errorf("%d. Expected no error but got %q", i, err) + continue + } + if !strings.Contains(err.Error(), c.err) { + t.Errorf("%d. Expected error to contain %q but got %q", i, c.err, err) + } + } +} diff --git a/vendor/github.com/prometheus/common/model/time.go b/vendor/github.com/prometheus/common/model/time.go index 548968aeb..7e87f1ac6 100644 --- a/vendor/github.com/prometheus/common/model/time.go +++ b/vendor/github.com/prometheus/common/model/time.go @@ -163,9 +163,21 @@ func (t *Time) UnmarshalJSON(b []byte) error { // This type should not propagate beyond the scope of input/output processing. type Duration time.Duration +// Set implements pflag/flag.Value +func (d *Duration) Set(s string) error { + var err error + *d, err = ParseDuration(s) + return err +} + +// Type implements pflag.Value +func (d *Duration) Type() string { + return "duration" +} + var durationRE = regexp.MustCompile("^([0-9]+)(y|w|d|h|m|s|ms)$") -// StringToDuration parses a string into a time.Duration, assuming that a year +// ParseDuration parses a string into a time.Duration, assuming that a year // always has 365d, a week always has 7d, and a day always has 24h. func ParseDuration(durationStr string) (Duration, error) { matches := durationRE.FindStringSubmatch(durationStr) diff --git a/vendor/github.com/prometheus/common/model/time_test.go b/vendor/github.com/prometheus/common/model/time_test.go new file mode 100644 index 000000000..45ffd872d --- /dev/null +++ b/vendor/github.com/prometheus/common/model/time_test.go @@ -0,0 +1,129 @@ +// Copyright 2013 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package model + +import ( + "testing" + "time" +) + +func TestComparators(t *testing.T) { + t1a := TimeFromUnix(0) + t1b := TimeFromUnix(0) + t2 := TimeFromUnix(2*second - 1) + + if !t1a.Equal(t1b) { + t.Fatalf("Expected %s to be equal to %s", t1a, t1b) + } + if t1a.Equal(t2) { + t.Fatalf("Expected %s to not be equal to %s", t1a, t2) + } + + if !t1a.Before(t2) { + t.Fatalf("Expected %s to be before %s", t1a, t2) + } + if t1a.Before(t1b) { + t.Fatalf("Expected %s to not be before %s", t1a, t1b) + } + + if !t2.After(t1a) { + t.Fatalf("Expected %s to be after %s", t2, t1a) + } + if t1b.After(t1a) { + t.Fatalf("Expected %s to not be after %s", t1b, t1a) + } +} + +func TestTimeConversions(t *testing.T) { + unixSecs := int64(1136239445) + unixNsecs := int64(123456789) + unixNano := unixSecs*1e9 + unixNsecs + + t1 := time.Unix(unixSecs, unixNsecs-unixNsecs%nanosPerTick) + t2 := time.Unix(unixSecs, unixNsecs) + + ts := TimeFromUnixNano(unixNano) + if !ts.Time().Equal(t1) { + t.Fatalf("Expected %s, got %s", t1, ts.Time()) + } + + // Test available precision. + ts = TimeFromUnixNano(t2.UnixNano()) + if !ts.Time().Equal(t1) { + t.Fatalf("Expected %s, got %s", t1, ts.Time()) + } + + if ts.UnixNano() != unixNano-unixNano%nanosPerTick { + t.Fatalf("Expected %d, got %d", unixNano, ts.UnixNano()) + } +} + +func TestDuration(t *testing.T) { + duration := time.Second + time.Minute + time.Hour + goTime := time.Unix(1136239445, 0) + + ts := TimeFromUnix(goTime.Unix()) + if !goTime.Add(duration).Equal(ts.Add(duration).Time()) { + t.Fatalf("Expected %s to be equal to %s", goTime.Add(duration), ts.Add(duration)) + } + + earlier := ts.Add(-duration) + delta := ts.Sub(earlier) + if delta != duration { + t.Fatalf("Expected %s to be equal to %s", delta, duration) + } +} + +func TestParseDuration(t *testing.T) { + var cases = []struct { + in string + out time.Duration + }{ + { + in: "324ms", + out: 324 * time.Millisecond, + }, { + in: "3s", + out: 3 * time.Second, + }, { + in: "5m", + out: 5 * time.Minute, + }, { + in: "1h", + out: time.Hour, + }, { + in: "4d", + out: 4 * 24 * time.Hour, + }, { + in: "3w", + out: 3 * 7 * 24 * time.Hour, + }, { + in: "10y", + out: 10 * 365 * 24 * time.Hour, + }, + } + + for _, c := range cases { + d, err := ParseDuration(c.in) + if err != nil { + t.Errorf("Unexpected error on input %q", c.in) + } + if time.Duration(d) != c.out { + t.Errorf("Expected %v but got %v", c.out, d) + } + if d.String() != c.in { + t.Errorf("Expected duration string %q but got %q", c.in, d.String()) + } + } +} diff --git a/vendor/github.com/prometheus/common/model/value_test.go b/vendor/github.com/prometheus/common/model/value_test.go new file mode 100644 index 000000000..b97dcf84c --- /dev/null +++ b/vendor/github.com/prometheus/common/model/value_test.go @@ -0,0 +1,468 @@ +// Copyright 2013 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package model + +import ( + "encoding/json" + "math" + "reflect" + "sort" + "testing" +) + +func TestEqualValues(t *testing.T) { + tests := map[string]struct { + in1, in2 SampleValue + want bool + }{ + "equal floats": { + in1: 3.14, + in2: 3.14, + want: true, + }, + "unequal floats": { + in1: 3.14, + in2: 3.1415, + want: false, + }, + "positive inifinities": { + in1: SampleValue(math.Inf(+1)), + in2: SampleValue(math.Inf(+1)), + want: true, + }, + "negative inifinities": { + in1: SampleValue(math.Inf(-1)), + in2: SampleValue(math.Inf(-1)), + want: true, + }, + "different inifinities": { + in1: SampleValue(math.Inf(+1)), + in2: SampleValue(math.Inf(-1)), + want: false, + }, + "number and infinity": { + in1: 42, + in2: SampleValue(math.Inf(+1)), + want: false, + }, + "number and NaN": { + in1: 42, + in2: SampleValue(math.NaN()), + want: false, + }, + "NaNs": { + in1: SampleValue(math.NaN()), + in2: SampleValue(math.NaN()), + want: true, // !!! + }, + } + + for name, test := range tests { + got := test.in1.Equal(test.in2) + if got != test.want { + t.Errorf("Comparing %s, %f and %f: got %t, want %t", name, test.in1, test.in2, got, test.want) + } + } +} + +func TestEqualSamples(t *testing.T) { + testSample := &Sample{} + + tests := map[string]struct { + in1, in2 *Sample + want bool + }{ + "equal pointers": { + in1: testSample, + in2: testSample, + want: true, + }, + "different metrics": { + in1: &Sample{Metric: Metric{"foo": "bar"}}, + in2: &Sample{Metric: Metric{"foo": "biz"}}, + want: false, + }, + "different timestamp": { + in1: &Sample{Timestamp: 0}, + in2: &Sample{Timestamp: 1}, + want: false, + }, + "different value": { + in1: &Sample{Value: 0}, + in2: &Sample{Value: 1}, + want: false, + }, + "equal samples": { + in1: &Sample{ + Metric: Metric{"foo": "bar"}, + Timestamp: 0, + Value: 1, + }, + in2: &Sample{ + Metric: Metric{"foo": "bar"}, + Timestamp: 0, + Value: 1, + }, + want: true, + }, + } + + for name, test := range tests { + got := test.in1.Equal(test.in2) + if got != test.want { + t.Errorf("Comparing %s, %v and %v: got %t, want %t", name, test.in1, test.in2, got, test.want) + } + } + +} + +func TestSamplePairJSON(t *testing.T) { + input := []struct { + plain string + value SamplePair + }{ + { + plain: `[1234.567,"123.1"]`, + value: SamplePair{ + Value: 123.1, + Timestamp: 1234567, + }, + }, + } + + for _, test := range input { + b, err := json.Marshal(test.value) + if err != nil { + t.Error(err) + continue + } + + if string(b) != test.plain { + t.Errorf("encoding error: expected %q, got %q", test.plain, b) + continue + } + + var sp SamplePair + err = json.Unmarshal(b, &sp) + if err != nil { + t.Error(err) + continue + } + + if sp != test.value { + t.Errorf("decoding error: expected %v, got %v", test.value, sp) + } + } +} + +func TestSampleJSON(t *testing.T) { + input := []struct { + plain string + value Sample + }{ + { + plain: `{"metric":{"__name__":"test_metric"},"value":[1234.567,"123.1"]}`, + value: Sample{ + Metric: Metric{ + MetricNameLabel: "test_metric", + }, + Value: 123.1, + Timestamp: 1234567, + }, + }, + } + + for _, test := range input { + b, err := json.Marshal(test.value) + if err != nil { + t.Error(err) + continue + } + + if string(b) != test.plain { + t.Errorf("encoding error: expected %q, got %q", test.plain, b) + continue + } + + var sv Sample + err = json.Unmarshal(b, &sv) + if err != nil { + t.Error(err) + continue + } + + if !reflect.DeepEqual(sv, test.value) { + t.Errorf("decoding error: expected %v, got %v", test.value, sv) + } + } +} + +func TestVectorJSON(t *testing.T) { + input := []struct { + plain string + value Vector + }{ + { + plain: `[]`, + value: Vector{}, + }, + { + plain: `[{"metric":{"__name__":"test_metric"},"value":[1234.567,"123.1"]}]`, + value: Vector{&Sample{ + Metric: Metric{ + MetricNameLabel: "test_metric", + }, + Value: 123.1, + Timestamp: 1234567, + }}, + }, + { + plain: `[{"metric":{"__name__":"test_metric"},"value":[1234.567,"123.1"]},{"metric":{"foo":"bar"},"value":[1.234,"+Inf"]}]`, + value: Vector{ + &Sample{ + Metric: Metric{ + MetricNameLabel: "test_metric", + }, + Value: 123.1, + Timestamp: 1234567, + }, + &Sample{ + Metric: Metric{ + "foo": "bar", + }, + Value: SampleValue(math.Inf(1)), + Timestamp: 1234, + }, + }, + }, + } + + for _, test := range input { + b, err := json.Marshal(test.value) + if err != nil { + t.Error(err) + continue + } + + if string(b) != test.plain { + t.Errorf("encoding error: expected %q, got %q", test.plain, b) + continue + } + + var vec Vector + err = json.Unmarshal(b, &vec) + if err != nil { + t.Error(err) + continue + } + + if !reflect.DeepEqual(vec, test.value) { + t.Errorf("decoding error: expected %v, got %v", test.value, vec) + } + } +} + +func TestScalarJSON(t *testing.T) { + input := []struct { + plain string + value Scalar + }{ + { + plain: `[123.456,"456"]`, + value: Scalar{ + Timestamp: 123456, + Value: 456, + }, + }, + { + plain: `[123123.456,"+Inf"]`, + value: Scalar{ + Timestamp: 123123456, + Value: SampleValue(math.Inf(1)), + }, + }, + { + plain: `[123123.456,"-Inf"]`, + value: Scalar{ + Timestamp: 123123456, + Value: SampleValue(math.Inf(-1)), + }, + }, + } + + for _, test := range input { + b, err := json.Marshal(test.value) + if err != nil { + t.Error(err) + continue + } + + if string(b) != test.plain { + t.Errorf("encoding error: expected %q, got %q", test.plain, b) + continue + } + + var sv Scalar + err = json.Unmarshal(b, &sv) + if err != nil { + t.Error(err) + continue + } + + if sv != test.value { + t.Errorf("decoding error: expected %v, got %v", test.value, sv) + } + } +} + +func TestStringJSON(t *testing.T) { + input := []struct { + plain string + value String + }{ + { + plain: `[123.456,"test"]`, + value: String{ + Timestamp: 123456, + Value: "test", + }, + }, + { + plain: `[123123.456,"台北"]`, + value: String{ + Timestamp: 123123456, + Value: "台北", + }, + }, + } + + for _, test := range input { + b, err := json.Marshal(test.value) + if err != nil { + t.Error(err) + continue + } + + if string(b) != test.plain { + t.Errorf("encoding error: expected %q, got %q", test.plain, b) + continue + } + + var sv String + err = json.Unmarshal(b, &sv) + if err != nil { + t.Error(err) + continue + } + + if sv != test.value { + t.Errorf("decoding error: expected %v, got %v", test.value, sv) + } + } +} + +func TestVectorSort(t *testing.T) { + input := Vector{ + &Sample{ + Metric: Metric{ + MetricNameLabel: "A", + }, + Timestamp: 1, + }, + &Sample{ + Metric: Metric{ + MetricNameLabel: "A", + }, + Timestamp: 2, + }, + &Sample{ + Metric: Metric{ + MetricNameLabel: "C", + }, + Timestamp: 1, + }, + &Sample{ + Metric: Metric{ + MetricNameLabel: "C", + }, + Timestamp: 2, + }, + &Sample{ + Metric: Metric{ + MetricNameLabel: "B", + }, + Timestamp: 1, + }, + &Sample{ + Metric: Metric{ + MetricNameLabel: "B", + }, + Timestamp: 2, + }, + } + + expected := Vector{ + &Sample{ + Metric: Metric{ + MetricNameLabel: "A", + }, + Timestamp: 1, + }, + &Sample{ + Metric: Metric{ + MetricNameLabel: "A", + }, + Timestamp: 2, + }, + &Sample{ + Metric: Metric{ + MetricNameLabel: "B", + }, + Timestamp: 1, + }, + &Sample{ + Metric: Metric{ + MetricNameLabel: "B", + }, + Timestamp: 2, + }, + &Sample{ + Metric: Metric{ + MetricNameLabel: "C", + }, + Timestamp: 1, + }, + &Sample{ + Metric: Metric{ + MetricNameLabel: "C", + }, + Timestamp: 2, + }, + } + + sort.Sort(input) + + for i, actual := range input { + actualFp := actual.Metric.Fingerprint() + expectedFp := expected[i].Metric.Fingerprint() + + if actualFp != expectedFp { + t.Fatalf("%d. Incorrect fingerprint. Got %s; want %s", i, actualFp.String(), expectedFp.String()) + } + + if actual.Timestamp != expected[i].Timestamp { + t.Fatalf("%d. Incorrect timestamp. Got %s; want %s", i, actual.Timestamp, expected[i].Timestamp) + } + } +} diff --git a/vendor/github.com/prometheus/procfs/.travis.yml b/vendor/github.com/prometheus/procfs/.travis.yml index a9e28bf5d..ee09bb733 100644 --- a/vendor/github.com/prometheus/procfs/.travis.yml +++ b/vendor/github.com/prometheus/procfs/.travis.yml @@ -1,5 +1,5 @@ sudo: false language: go go: - - 1.6.4 - - 1.7.4 + - 1.7.6 + - 1.8.3 diff --git a/vendor/github.com/prometheus/procfs/Makefile b/vendor/github.com/prometheus/procfs/Makefile index c264a49d1..dd48afdcd 100644 --- a/vendor/github.com/prometheus/procfs/Makefile +++ b/vendor/github.com/prometheus/procfs/Makefile @@ -1,6 +1,18 @@ -ci: +ci: fmt lint test + +fmt: ! gofmt -l *.go | read nothing go vet - go test -v ./... + +lint: go get github.com/golang/lint/golint golint *.go + +test: sysfs/fixtures/.unpacked + go test -v ./... + +sysfs/fixtures/.unpacked: sysfs/fixtures.ttar + ./ttar -C sysfs -x -f sysfs/fixtures.ttar + touch $@ + +.PHONY: fmt lint test ci diff --git a/vendor/github.com/prometheus/procfs/buddyinfo_test.go b/vendor/github.com/prometheus/procfs/buddyinfo_test.go new file mode 100644 index 000000000..bcf9355ca --- /dev/null +++ b/vendor/github.com/prometheus/procfs/buddyinfo_test.go @@ -0,0 +1,64 @@ +// Copyright 2017 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package procfs + +import ( + "strings" + "testing" +) + +func TestBuddyInfo(t *testing.T) { + buddyInfo, err := FS("fixtures/buddyinfo/valid").NewBuddyInfo() + if err != nil { + t.Fatal(err) + } + + if want, got := "DMA", buddyInfo[0].Zone; want != got { + t.Errorf("want Node 0, Zone %s, got %s", want, got) + } + + if want, got := "Normal", buddyInfo[2].Zone; want != got { + t.Errorf("want Node 0, Zone %s, got %s", want, got) + } + + if want, got := 4381.0, buddyInfo[2].Sizes[0]; want != got { + t.Errorf("want Node 0, Zone Normal %f, got %f", want, got) + } + + if want, got := 572.0, buddyInfo[1].Sizes[1]; want != got { + t.Errorf("want Node 0, Zone DMA32 %f, got %f", want, got) + } +} + +func TestBuddyInfoShort(t *testing.T) { + _, err := FS("fixtures/buddyinfo/short").NewBuddyInfo() + if err == nil { + t.Errorf("expected error, but none occurred") + } + + if want, got := "invalid number of fields when parsing buddyinfo", err.Error(); want != got { + t.Errorf("wrong error returned, wanted %q, got %q", want, got) + } +} + +func TestBuddyInfoSizeMismatch(t *testing.T) { + _, err := FS("fixtures/buddyinfo/sizemismatch").NewBuddyInfo() + if err == nil { + t.Errorf("expected error, but none occurred") + } + + if want, got := "mismatch in number of buddyinfo buckets", err.Error(); !strings.HasPrefix(got, want) { + t.Errorf("wrong error returned, wanted prefix %q, got %q", want, got) + } +} diff --git a/vendor/github.com/prometheus/procfs/fs_test.go b/vendor/github.com/prometheus/procfs/fs_test.go new file mode 100644 index 000000000..e492cde55 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/fs_test.go @@ -0,0 +1,26 @@ +package procfs + +import "testing" + +func TestNewFS(t *testing.T) { + if _, err := NewFS("foobar"); err == nil { + t.Error("want NewFS to fail for non-existing mount point") + } + + if _, err := NewFS("procfs.go"); err == nil { + t.Error("want NewFS to fail if mount point is not a directory") + } +} + +func TestFSXFSStats(t *testing.T) { + stats, err := FS("fixtures").XFSStats() + if err != nil { + t.Fatalf("failed to parse XFS stats: %v", err) + } + + // Very lightweight test just to sanity check the path used + // to open XFS stats. Heavier tests in package xfs. + if want, got := uint32(92447), stats.ExtentAllocation.ExtentsAllocated; want != got { + t.Errorf("unexpected extents allocated:\nwant: %d\nhave: %d", want, got) + } +} diff --git a/vendor/github.com/prometheus/procfs/ipvs_test.go b/vendor/github.com/prometheus/procfs/ipvs_test.go new file mode 100644 index 000000000..13ceab80e --- /dev/null +++ b/vendor/github.com/prometheus/procfs/ipvs_test.go @@ -0,0 +1,237 @@ +package procfs + +import ( + "net" + "testing" +) + +var ( + expectedIPVSStats = IPVSStats{ + Connections: 23765872, + IncomingPackets: 3811989221, + OutgoingPackets: 0, + IncomingBytes: 89991519156915, + OutgoingBytes: 0, + } + expectedIPVSBackendStatuses = []IPVSBackendStatus{ + { + LocalAddress: net.ParseIP("192.168.0.22"), + LocalPort: 3306, + RemoteAddress: net.ParseIP("192.168.82.22"), + RemotePort: 3306, + Proto: "TCP", + Weight: 100, + ActiveConn: 248, + InactConn: 2, + }, + { + LocalAddress: net.ParseIP("192.168.0.22"), + LocalPort: 3306, + RemoteAddress: net.ParseIP("192.168.83.24"), + RemotePort: 3306, + Proto: "TCP", + Weight: 100, + ActiveConn: 248, + InactConn: 2, + }, + { + LocalAddress: net.ParseIP("192.168.0.22"), + LocalPort: 3306, + RemoteAddress: net.ParseIP("192.168.83.21"), + RemotePort: 3306, + Proto: "TCP", + Weight: 100, + ActiveConn: 248, + InactConn: 1, + }, + { + LocalAddress: net.ParseIP("192.168.0.57"), + LocalPort: 3306, + RemoteAddress: net.ParseIP("192.168.84.22"), + RemotePort: 3306, + Proto: "TCP", + Weight: 0, + ActiveConn: 0, + InactConn: 0, + }, + { + LocalAddress: net.ParseIP("192.168.0.57"), + LocalPort: 3306, + RemoteAddress: net.ParseIP("192.168.82.21"), + RemotePort: 3306, + Proto: "TCP", + Weight: 100, + ActiveConn: 1499, + InactConn: 0, + }, + { + LocalAddress: net.ParseIP("192.168.0.57"), + LocalPort: 3306, + RemoteAddress: net.ParseIP("192.168.50.21"), + RemotePort: 3306, + Proto: "TCP", + Weight: 100, + ActiveConn: 1498, + InactConn: 0, + }, + { + LocalAddress: net.ParseIP("192.168.0.55"), + LocalPort: 3306, + RemoteAddress: net.ParseIP("192.168.50.26"), + RemotePort: 3306, + Proto: "TCP", + Weight: 0, + ActiveConn: 0, + InactConn: 0, + }, + { + LocalAddress: net.ParseIP("192.168.0.55"), + LocalPort: 3306, + RemoteAddress: net.ParseIP("192.168.49.32"), + RemotePort: 3306, + Proto: "TCP", + Weight: 100, + ActiveConn: 0, + InactConn: 0, + }, + { + LocalAddress: net.ParseIP("2620::1"), + LocalPort: 80, + RemoteAddress: net.ParseIP("2620::2"), + RemotePort: 80, + Proto: "TCP", + Weight: 1, + ActiveConn: 0, + InactConn: 0, + }, + { + LocalAddress: net.ParseIP("2620::1"), + LocalPort: 80, + RemoteAddress: net.ParseIP("2620::3"), + RemotePort: 80, + Proto: "TCP", + Weight: 1, + ActiveConn: 0, + InactConn: 0, + }, + { + LocalAddress: net.ParseIP("2620::1"), + LocalPort: 80, + RemoteAddress: net.ParseIP("2620::4"), + RemotePort: 80, + Proto: "TCP", + Weight: 1, + ActiveConn: 1, + InactConn: 1, + }, + { + LocalMark: "10001000", + RemoteAddress: net.ParseIP("192.168.50.26"), + RemotePort: 3306, + Proto: "FWM", + Weight: 0, + ActiveConn: 0, + InactConn: 1, + }, + { + LocalMark: "10001000", + RemoteAddress: net.ParseIP("192.168.50.21"), + RemotePort: 3306, + Proto: "FWM", + Weight: 0, + ActiveConn: 0, + InactConn: 2, + }, + } +) + +func TestIPVSStats(t *testing.T) { + stats, err := FS("fixtures").NewIPVSStats() + if err != nil { + t.Fatal(err) + } + + if stats != expectedIPVSStats { + t.Errorf("want %+v, have %+v", expectedIPVSStats, stats) + } +} + +func TestParseIPPort(t *testing.T) { + ip := net.ParseIP("192.168.0.22") + port := uint16(3306) + + gotIP, gotPort, err := parseIPPort("C0A80016:0CEA") + if err != nil { + t.Fatal(err) + } + if !(gotIP.Equal(ip) && port == gotPort) { + t.Errorf("want %s:%d, have %s:%d", ip, port, gotIP, gotPort) + } +} + +func TestParseIPPortInvalid(t *testing.T) { + testcases := []string{ + "", + "C0A80016", + "C0A800:1234", + "FOOBARBA:1234", + "C0A80016:0CEA:1234", + } + + for _, s := range testcases { + ip, port, err := parseIPPort(s) + if ip != nil || port != uint16(0) || err == nil { + t.Errorf("Expected error for input %s, have ip = %s, port = %v, err = %v", s, ip, port, err) + } + } +} + +func TestParseIPPortIPv6(t *testing.T) { + ip := net.ParseIP("dead:beef::1") + port := uint16(8080) + + gotIP, gotPort, err := parseIPPort("[DEAD:BEEF:0000:0000:0000:0000:0000:0001]:1F90") + if err != nil { + t.Fatal(err) + } + if !(gotIP.Equal(ip) && port == gotPort) { + t.Errorf("want %s:%d, have %s:%d", ip, port, gotIP, gotPort) + } +} + +func TestIPVSBackendStatus(t *testing.T) { + backendStats, err := FS("fixtures").NewIPVSBackendStatus() + if err != nil { + t.Fatal(err) + } + if want, have := len(expectedIPVSBackendStatuses), len(backendStats); want != have { + t.Fatalf("want %d backend statuses, have %d", want, have) + } + + for idx, expect := range expectedIPVSBackendStatuses { + if !backendStats[idx].LocalAddress.Equal(expect.LocalAddress) { + t.Errorf("want LocalAddress %s, have %s", expect.LocalAddress, backendStats[idx].LocalAddress) + } + if backendStats[idx].LocalPort != expect.LocalPort { + t.Errorf("want LocalPort %d, have %d", expect.LocalPort, backendStats[idx].LocalPort) + } + if !backendStats[idx].RemoteAddress.Equal(expect.RemoteAddress) { + t.Errorf("want RemoteAddress %s, have %s", expect.RemoteAddress, backendStats[idx].RemoteAddress) + } + if backendStats[idx].RemotePort != expect.RemotePort { + t.Errorf("want RemotePort %d, have %d", expect.RemotePort, backendStats[idx].RemotePort) + } + if backendStats[idx].Proto != expect.Proto { + t.Errorf("want Proto %s, have %s", expect.Proto, backendStats[idx].Proto) + } + if backendStats[idx].Weight != expect.Weight { + t.Errorf("want Weight %d, have %d", expect.Weight, backendStats[idx].Weight) + } + if backendStats[idx].ActiveConn != expect.ActiveConn { + t.Errorf("want ActiveConn %d, have %d", expect.ActiveConn, backendStats[idx].ActiveConn) + } + if backendStats[idx].InactConn != expect.InactConn { + t.Errorf("want InactConn %d, have %d", expect.InactConn, backendStats[idx].InactConn) + } + } +} diff --git a/vendor/github.com/prometheus/procfs/mdstat_test.go b/vendor/github.com/prometheus/procfs/mdstat_test.go new file mode 100644 index 000000000..fa463c2fb --- /dev/null +++ b/vendor/github.com/prometheus/procfs/mdstat_test.go @@ -0,0 +1,31 @@ +package procfs + +import ( + "testing" +) + +func TestMDStat(t *testing.T) { + mdStates, err := FS("fixtures").ParseMDStat() + if err != nil { + t.Fatalf("parsing of reference-file failed entirely: %s", err) + } + + refs := map[string]MDStat{ + "md3": {"md3", "active", 8, 8, 5853468288, 5853468288}, + "md127": {"md127", "active", 2, 2, 312319552, 312319552}, + "md0": {"md0", "active", 2, 2, 248896, 248896}, + "md4": {"md4", "inactive", 2, 2, 4883648, 4883648}, + "md6": {"md6", "active", 1, 2, 195310144, 16775552}, + "md8": {"md8", "active", 2, 2, 195310144, 16775552}, + "md7": {"md7", "active", 3, 4, 7813735424, 7813735424}, + } + + if want, have := len(refs), len(mdStates); want != have { + t.Errorf("want %d parsed md-devices, have %d", want, have) + } + for _, md := range mdStates { + if want, have := refs[md.Name], md; want != have { + t.Errorf("%s: want %v, have %v", md.Name, want, have) + } + } +} diff --git a/vendor/github.com/prometheus/procfs/mountstats_test.go b/vendor/github.com/prometheus/procfs/mountstats_test.go new file mode 100644 index 000000000..8f04f5355 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/mountstats_test.go @@ -0,0 +1,273 @@ +package procfs + +import ( + "fmt" + "reflect" + "strings" + "testing" + "time" +) + +func TestMountStats(t *testing.T) { + tests := []struct { + name string + s string + mounts []*Mount + invalid bool + }{ + { + name: "no devices", + s: `hello`, + }, + { + name: "device has too few fields", + s: `device foo`, + invalid: true, + }, + { + name: "device incorrect format", + s: `device rootfs BAD on / with fstype rootfs`, + invalid: true, + }, + { + name: "device incorrect format", + s: `device rootfs mounted BAD / with fstype rootfs`, + invalid: true, + }, + { + name: "device incorrect format", + s: `device rootfs mounted on / BAD fstype rootfs`, + invalid: true, + }, + { + name: "device incorrect format", + s: `device rootfs mounted on / with BAD rootfs`, + invalid: true, + }, + { + name: "device rootfs cannot have stats", + s: `device rootfs mounted on / with fstype rootfs stats`, + invalid: true, + }, + { + name: "NFSv4 device with too little info", + s: "device 192.168.1.1:/srv mounted on /mnt/nfs with fstype nfs4 statvers=1.1\nhello", + invalid: true, + }, + { + name: "NFSv4 device with bad bytes", + s: "device 192.168.1.1:/srv mounted on /mnt/nfs with fstype nfs4 statvers=1.1\nbytes: 0", + invalid: true, + }, + { + name: "NFSv4 device with bad events", + s: "device 192.168.1.1:/srv mounted on /mnt/nfs with fstype nfs4 statvers=1.1\nevents: 0", + invalid: true, + }, + { + name: "NFSv4 device with bad per-op stats", + s: "device 192.168.1.1:/srv mounted on /mnt/nfs with fstype nfs4 statvers=1.1\nper-op statistics\nFOO 0", + invalid: true, + }, + { + name: "NFSv4 device with bad transport stats", + s: "device 192.168.1.1:/srv mounted on /mnt/nfs with fstype nfs4 statvers=1.1\nxprt: tcp", + invalid: true, + }, + { + name: "NFSv4 device with bad transport version", + s: "device 192.168.1.1:/srv mounted on /mnt/nfs with fstype nfs4 statvers=foo\nxprt: tcp 0", + invalid: true, + }, + { + name: "NFSv4 device with bad transport stats version 1.0", + s: "device 192.168.1.1:/srv mounted on /mnt/nfs with fstype nfs4 statvers=1.0\nxprt: tcp 0 0 0 0 0 0 0 0 0 0 0 0 0", + invalid: true, + }, + { + name: "NFSv4 device with bad transport stats version 1.1", + s: "device 192.168.1.1:/srv mounted on /mnt/nfs with fstype nfs4 statvers=1.1\nxprt: tcp 0 0 0 0 0 0 0 0 0 0", + invalid: true, + }, + { + name: "NFSv3 device with transport stats version 1.0 OK", + s: "device 192.168.1.1:/srv mounted on /mnt/nfs with fstype nfs statvers=1.0\nxprt: tcp 1 2 3 4 5 6 7 8 9 10", + mounts: []*Mount{{ + Device: "192.168.1.1:/srv", + Mount: "/mnt/nfs", + Type: "nfs", + Stats: &MountStatsNFS{ + StatVersion: "1.0", + Transport: NFSTransportStats{ + Port: 1, + Bind: 2, + Connect: 3, + ConnectIdleTime: 4, + IdleTime: 5 * time.Second, + Sends: 6, + Receives: 7, + BadTransactionIDs: 8, + CumulativeActiveRequests: 9, + CumulativeBacklog: 10, + }, + }, + }}, + }, + { + name: "device rootfs OK", + s: `device rootfs mounted on / with fstype rootfs`, + mounts: []*Mount{{ + Device: "rootfs", + Mount: "/", + Type: "rootfs", + }}, + }, + { + name: "NFSv3 device with minimal stats OK", + s: `device 192.168.1.1:/srv mounted on /mnt/nfs with fstype nfs statvers=1.1`, + mounts: []*Mount{{ + Device: "192.168.1.1:/srv", + Mount: "/mnt/nfs", + Type: "nfs", + Stats: &MountStatsNFS{ + StatVersion: "1.1", + }, + }}, + }, + { + name: "fixtures OK", + mounts: []*Mount{ + { + Device: "rootfs", + Mount: "/", + Type: "rootfs", + }, + { + Device: "sysfs", + Mount: "/sys", + Type: "sysfs", + }, + { + Device: "proc", + Mount: "/proc", + Type: "proc", + }, + { + Device: "/dev/sda1", + Mount: "/", + Type: "ext4", + }, + { + Device: "192.168.1.1:/srv/test", + Mount: "/mnt/nfs/test", + Type: "nfs4", + Stats: &MountStatsNFS{ + StatVersion: "1.1", + Age: 13968 * time.Second, + Bytes: NFSBytesStats{ + Read: 1207640230, + ReadTotal: 1210214218, + ReadPages: 295483, + }, + Events: NFSEventsStats{ + InodeRevalidate: 52, + DnodeRevalidate: 226, + VFSOpen: 1, + VFSLookup: 13, + VFSAccess: 398, + VFSReadPages: 331, + VFSWritePages: 47, + VFSFlush: 77, + VFSFileRelease: 77, + }, + Operations: []NFSOperationStats{ + { + Operation: "NULL", + }, + { + Operation: "READ", + Requests: 1298, + Transmissions: 1298, + BytesSent: 207680, + BytesReceived: 1210292152, + CumulativeQueueTime: 6 * time.Millisecond, + CumulativeTotalResponseTime: 79386 * time.Millisecond, + CumulativeTotalRequestTime: 79407 * time.Millisecond, + }, + { + Operation: "WRITE", + }, + }, + Transport: NFSTransportStats{ + Port: 832, + Connect: 1, + IdleTime: 11 * time.Second, + Sends: 6428, + Receives: 6428, + CumulativeActiveRequests: 12154, + MaximumRPCSlotsUsed: 24, + CumulativeSendingQueue: 26, + CumulativePendingQueue: 5726, + }, + }, + }, + }, + }, + } + + for i, tt := range tests { + t.Logf("[%02d] test %q", i, tt.name) + + var mounts []*Mount + var err error + + if tt.s != "" { + mounts, err = parseMountStats(strings.NewReader(tt.s)) + } else { + proc, e := FS("fixtures").NewProc(26231) + if e != nil { + t.Fatalf("failed to create proc: %v", err) + } + + mounts, err = proc.MountStats() + } + + if tt.invalid && err == nil { + t.Error("expected an error, but none occurred") + } + if !tt.invalid && err != nil { + t.Errorf("unexpected error: %v", err) + } + + if want, have := tt.mounts, mounts; !reflect.DeepEqual(want, have) { + t.Errorf("mounts:\nwant:\n%v\nhave:\n%v", mountsStr(want), mountsStr(have)) + } + } +} + +func mountsStr(mounts []*Mount) string { + var out string + for i, m := range mounts { + out += fmt.Sprintf("[%d] %q on %q (%q)", i, m.Device, m.Mount, m.Type) + + stats, ok := m.Stats.(*MountStatsNFS) + if !ok { + out += "\n" + continue + } + + out += fmt.Sprintf("\n\t- v%s, age: %s", stats.StatVersion, stats.Age) + out += fmt.Sprintf("\n\t- bytes: %v", stats.Bytes) + out += fmt.Sprintf("\n\t- events: %v", stats.Events) + out += fmt.Sprintf("\n\t- transport: %v", stats.Transport) + out += fmt.Sprintf("\n\t- per-operation stats:") + + for _, o := range stats.Operations { + out += fmt.Sprintf("\n\t\t- %v", o) + } + + out += "\n" + } + + return out +} diff --git a/vendor/github.com/prometheus/procfs/proc_io_test.go b/vendor/github.com/prometheus/procfs/proc_io_test.go new file mode 100644 index 000000000..3aa1a1293 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/proc_io_test.go @@ -0,0 +1,33 @@ +package procfs + +import "testing" + +func TestProcIO(t *testing.T) { + p, err := FS("fixtures").NewProc(26231) + if err != nil { + t.Fatal(err) + } + + s, err := p.NewIO() + if err != nil { + t.Fatal(err) + } + + for _, test := range []struct { + name string + want int64 + have int64 + }{ + {name: "RChar", want: 750339, have: int64(s.RChar)}, + {name: "WChar", want: 818609, have: int64(s.WChar)}, + {name: "SyscR", want: 7405, have: int64(s.SyscR)}, + {name: "SyscW", want: 5245, have: int64(s.SyscW)}, + {name: "ReadBytes", want: 1024, have: int64(s.ReadBytes)}, + {name: "WriteBytes", want: 2048, have: int64(s.WriteBytes)}, + {name: "CancelledWriteBytes", want: -1024, have: s.CancelledWriteBytes}, + } { + if test.want != test.have { + t.Errorf("want %s %d, have %d", test.name, test.want, test.have) + } + } +} diff --git a/vendor/github.com/prometheus/procfs/proc_limits_test.go b/vendor/github.com/prometheus/procfs/proc_limits_test.go new file mode 100644 index 000000000..70bf04ec2 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/proc_limits_test.go @@ -0,0 +1,31 @@ +package procfs + +import "testing" + +func TestNewLimits(t *testing.T) { + p, err := FS("fixtures").NewProc(26231) + if err != nil { + t.Fatal(err) + } + + l, err := p.NewLimits() + if err != nil { + t.Fatal(err) + } + + for _, test := range []struct { + name string + want int + have int + }{ + {name: "cpu time", want: -1, have: l.CPUTime}, + {name: "open files", want: 2048, have: l.OpenFiles}, + {name: "msgqueue size", want: 819200, have: l.MsqqueueSize}, + {name: "nice priority", want: 0, have: l.NicePriority}, + {name: "address space", want: -1, have: l.AddressSpace}, + } { + if test.want != test.have { + t.Errorf("want %s %d, have %d", test.name, test.want, test.have) + } + } +} diff --git a/vendor/github.com/prometheus/procfs/proc_stat_test.go b/vendor/github.com/prometheus/procfs/proc_stat_test.go new file mode 100644 index 000000000..a2ebcde78 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/proc_stat_test.go @@ -0,0 +1,110 @@ +package procfs + +import ( + "os" + "testing" +) + +func TestProcStat(t *testing.T) { + p, err := FS("fixtures").NewProc(26231) + if err != nil { + t.Fatal(err) + } + + s, err := p.NewStat() + if err != nil { + t.Fatal(err) + } + + for _, test := range []struct { + name string + want int + have int + }{ + {name: "pid", want: 26231, have: s.PID}, + {name: "user time", want: 1677, have: int(s.UTime)}, + {name: "system time", want: 44, have: int(s.STime)}, + {name: "start time", want: 82375, have: int(s.Starttime)}, + {name: "virtual memory size", want: 56274944, have: s.VSize}, + {name: "resident set size", want: 1981, have: s.RSS}, + } { + if test.want != test.have { + t.Errorf("want %s %d, have %d", test.name, test.want, test.have) + } + } +} + +func TestProcStatComm(t *testing.T) { + s1, err := testProcStat(26231) + if err != nil { + t.Fatal(err) + } + if want, have := "vim", s1.Comm; want != have { + t.Errorf("want comm %s, have %s", want, have) + } + + s2, err := testProcStat(584) + if err != nil { + t.Fatal(err) + } + if want, have := "(a b ) ( c d) ", s2.Comm; want != have { + t.Errorf("want comm %s, have %s", want, have) + } +} + +func TestProcStatVirtualMemory(t *testing.T) { + s, err := testProcStat(26231) + if err != nil { + t.Fatal(err) + } + + if want, have := 56274944, s.VirtualMemory(); want != have { + t.Errorf("want virtual memory %d, have %d", want, have) + } +} + +func TestProcStatResidentMemory(t *testing.T) { + s, err := testProcStat(26231) + if err != nil { + t.Fatal(err) + } + + if want, have := 1981*os.Getpagesize(), s.ResidentMemory(); want != have { + t.Errorf("want resident memory %d, have %d", want, have) + } +} + +func TestProcStatStartTime(t *testing.T) { + s, err := testProcStat(26231) + if err != nil { + t.Fatal(err) + } + + time, err := s.StartTime() + if err != nil { + t.Fatal(err) + } + if want, have := 1418184099.75, time; want != have { + t.Errorf("want start time %f, have %f", want, have) + } +} + +func TestProcStatCPUTime(t *testing.T) { + s, err := testProcStat(26231) + if err != nil { + t.Fatal(err) + } + + if want, have := 17.21, s.CPUTime(); want != have { + t.Errorf("want cpu time %f, have %f", want, have) + } +} + +func testProcStat(pid int) (ProcStat, error) { + p, err := FS("fixtures").NewProc(pid) + if err != nil { + return ProcStat{}, err + } + + return p.NewStat() +} diff --git a/vendor/github.com/prometheus/procfs/proc_test.go b/vendor/github.com/prometheus/procfs/proc_test.go new file mode 100644 index 000000000..104b3245d --- /dev/null +++ b/vendor/github.com/prometheus/procfs/proc_test.go @@ -0,0 +1,160 @@ +package procfs + +import ( + "reflect" + "sort" + "testing" +) + +func TestSelf(t *testing.T) { + fs := FS("fixtures") + + p1, err := fs.NewProc(26231) + if err != nil { + t.Fatal(err) + } + p2, err := fs.Self() + if err != nil { + t.Fatal(err) + } + + if !reflect.DeepEqual(p1, p2) { + t.Errorf("want process %v, have %v", p1, p2) + } +} + +func TestAllProcs(t *testing.T) { + procs, err := FS("fixtures").AllProcs() + if err != nil { + t.Fatal(err) + } + sort.Sort(procs) + for i, p := range []*Proc{{PID: 584}, {PID: 26231}} { + if want, have := p.PID, procs[i].PID; want != have { + t.Errorf("want processes %d, have %d", want, have) + } + } +} + +func TestCmdLine(t *testing.T) { + for _, tt := range []struct { + process int + want []string + }{ + {process: 26231, want: []string{"vim", "test.go", "+10"}}, + {process: 26232, want: []string{}}, + } { + p1, err := FS("fixtures").NewProc(tt.process) + if err != nil { + t.Fatal(err) + } + c1, err := p1.CmdLine() + if err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(tt.want, c1) { + t.Errorf("want cmdline %v, have %v", tt.want, c1) + } + } +} + +func TestComm(t *testing.T) { + for _, tt := range []struct { + process int + want string + }{ + {process: 26231, want: "vim"}, + {process: 26232, want: "ata_sff"}, + } { + p1, err := FS("fixtures").NewProc(tt.process) + if err != nil { + t.Fatal(err) + } + c1, err := p1.Comm() + if err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(tt.want, c1) { + t.Errorf("want comm %v, have %v", tt.want, c1) + } + } +} + +func TestExecutable(t *testing.T) { + for _, tt := range []struct { + process int + want string + }{ + {process: 26231, want: "/usr/bin/vim"}, + {process: 26232, want: ""}, + } { + p, err := FS("fixtures").NewProc(tt.process) + if err != nil { + t.Fatal(err) + } + exe, err := p.Executable() + if err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(tt.want, exe) { + t.Errorf("want absolute path to cmdline %v, have %v", tt.want, exe) + } + } +} + +func TestFileDescriptors(t *testing.T) { + p1, err := FS("fixtures").NewProc(26231) + if err != nil { + t.Fatal(err) + } + fds, err := p1.FileDescriptors() + if err != nil { + t.Fatal(err) + } + sort.Sort(byUintptr(fds)) + if want := []uintptr{0, 1, 2, 3, 10}; !reflect.DeepEqual(want, fds) { + t.Errorf("want fds %v, have %v", want, fds) + } +} + +func TestFileDescriptorTargets(t *testing.T) { + p1, err := FS("fixtures").NewProc(26231) + if err != nil { + t.Fatal(err) + } + fds, err := p1.FileDescriptorTargets() + if err != nil { + t.Fatal(err) + } + sort.Strings(fds) + var want = []string{ + "../../symlinktargets/abc", + "../../symlinktargets/def", + "../../symlinktargets/ghi", + "../../symlinktargets/uvw", + "../../symlinktargets/xyz", + } + if !reflect.DeepEqual(want, fds) { + t.Errorf("want fds %v, have %v", want, fds) + } +} + +func TestFileDescriptorsLen(t *testing.T) { + p1, err := FS("fixtures").NewProc(26231) + if err != nil { + t.Fatal(err) + } + l, err := p1.FileDescriptorsLen() + if err != nil { + t.Fatal(err) + } + if want, have := 5, l; want != have { + t.Errorf("want fds %d, have %d", want, have) + } +} + +type byUintptr []uintptr + +func (a byUintptr) Len() int { return len(a) } +func (a byUintptr) Swap(i, j int) { a[i], a[j] = a[j], a[i] } +func (a byUintptr) Less(i, j int) bool { return a[i] < a[j] } diff --git a/vendor/github.com/prometheus/procfs/stat.go b/vendor/github.com/prometheus/procfs/stat.go index 1ca217e8c..701f4df64 100644 --- a/vendor/github.com/prometheus/procfs/stat.go +++ b/vendor/github.com/prometheus/procfs/stat.go @@ -3,15 +3,66 @@ package procfs import ( "bufio" "fmt" + "io" "os" "strconv" "strings" ) +// CPUStat shows how much time the cpu spend in various stages. +type CPUStat struct { + User float64 + Nice float64 + System float64 + Idle float64 + Iowait float64 + IRQ float64 + SoftIRQ float64 + Steal float64 + Guest float64 + GuestNice float64 +} + +// SoftIRQStat represent the softirq statistics as exported in the procfs stat file. +// A nice introduction can be found at https://0xax.gitbooks.io/linux-insides/content/interrupts/interrupts-9.html +// It is possible to get per-cpu stats by reading /proc/softirqs +type SoftIRQStat struct { + Hi uint64 + Timer uint64 + NetTx uint64 + NetRx uint64 + Block uint64 + BlockIoPoll uint64 + Tasklet uint64 + Sched uint64 + Hrtimer uint64 + Rcu uint64 +} + // Stat represents kernel/system statistics. type Stat struct { // Boot time in seconds since the Epoch. - BootTime int64 + BootTime uint64 + // Summed up cpu statistics. + CPUTotal CPUStat + // Per-CPU statistics. + CPU []CPUStat + // Number of times interrupts were handled, which contains numbered and unnumbered IRQs. + IRQTotal uint64 + // Number of times a numbered IRQ was triggered. + IRQ []uint64 + // Number of times a context switch happened. + ContextSwitches uint64 + // Number of times a process was created. + ProcessCreated uint64 + // Number of processes currently running. + ProcessesRunning uint64 + // Number of processes currently blocked (waiting for IO). + ProcessesBlocked uint64 + // Number of times a softirq was scheduled. + SoftIRQTotal uint64 + // Detailed softirq statistics. + SoftIRQ SoftIRQStat } // NewStat returns kernel/system statistics read from /proc/stat. @@ -24,33 +75,145 @@ func NewStat() (Stat, error) { return fs.NewStat() } +// Parse a cpu statistics line and returns the CPUStat struct plus the cpu id (or -1 for the overall sum). +func parseCPUStat(line string) (CPUStat, int64, error) { + cpuStat := CPUStat{} + var cpu string + + count, err := fmt.Sscanf(line, "%s %f %f %f %f %f %f %f %f %f %f", + &cpu, + &cpuStat.User, &cpuStat.Nice, &cpuStat.System, &cpuStat.Idle, + &cpuStat.Iowait, &cpuStat.IRQ, &cpuStat.SoftIRQ, &cpuStat.Steal, + &cpuStat.Guest, &cpuStat.GuestNice) + + if err != nil && err != io.EOF { + return CPUStat{}, -1, fmt.Errorf("couldn't parse %s (cpu): %s", line, err) + } + if count == 0 { + return CPUStat{}, -1, fmt.Errorf("couldn't parse %s (cpu): 0 elements parsed", line) + } + + cpuStat.User /= userHZ + cpuStat.Nice /= userHZ + cpuStat.System /= userHZ + cpuStat.Idle /= userHZ + cpuStat.Iowait /= userHZ + cpuStat.IRQ /= userHZ + cpuStat.SoftIRQ /= userHZ + cpuStat.Steal /= userHZ + cpuStat.Guest /= userHZ + cpuStat.GuestNice /= userHZ + + if cpu == "cpu" { + return cpuStat, -1, nil + } + + cpuID, err := strconv.ParseInt(cpu[3:], 10, 64) + if err != nil { + return CPUStat{}, -1, fmt.Errorf("couldn't parse %s (cpu/cpuid): %s", line, err) + } + + return cpuStat, cpuID, nil +} + +// Parse a softirq line. +func parseSoftIRQStat(line string) (SoftIRQStat, uint64, error) { + softIRQStat := SoftIRQStat{} + var total uint64 + var prefix string + + _, err := fmt.Sscanf(line, "%s %d %d %d %d %d %d %d %d %d %d %d", + &prefix, &total, + &softIRQStat.Hi, &softIRQStat.Timer, &softIRQStat.NetTx, &softIRQStat.NetRx, + &softIRQStat.Block, &softIRQStat.BlockIoPoll, + &softIRQStat.Tasklet, &softIRQStat.Sched, + &softIRQStat.Hrtimer, &softIRQStat.Rcu) + + if err != nil { + return SoftIRQStat{}, 0, fmt.Errorf("couldn't parse %s (softirq): %s", line, err) + } + + return softIRQStat, total, nil +} + // NewStat returns an information about current kernel/system statistics. func (fs FS) NewStat() (Stat, error) { + // See https://www.kernel.org/doc/Documentation/filesystems/proc.txt + f, err := os.Open(fs.Path("stat")) if err != nil { return Stat{}, err } defer f.Close() - s := bufio.NewScanner(f) - for s.Scan() { - line := s.Text() - if !strings.HasPrefix(line, "btime") { + stat := Stat{} + + scanner := bufio.NewScanner(f) + for scanner.Scan() { + line := scanner.Text() + parts := strings.Fields(scanner.Text()) + // require at least + if len(parts) < 2 { continue } - fields := strings.Fields(line) - if len(fields) != 2 { - return Stat{}, fmt.Errorf("couldn't parse %s line %s", f.Name(), line) + switch { + case parts[0] == "btime": + if stat.BootTime, err = strconv.ParseUint(parts[1], 10, 64); err != nil { + return Stat{}, fmt.Errorf("couldn't parse %s (btime): %s", parts[1], err) + } + case parts[0] == "intr": + if stat.IRQTotal, err = strconv.ParseUint(parts[1], 10, 64); err != nil { + return Stat{}, fmt.Errorf("couldn't parse %s (intr): %s", parts[1], err) + } + numberedIRQs := parts[2:] + stat.IRQ = make([]uint64, len(numberedIRQs)) + for i, count := range numberedIRQs { + if stat.IRQ[i], err = strconv.ParseUint(count, 10, 64); err != nil { + return Stat{}, fmt.Errorf("couldn't parse %s (intr%d): %s", count, i, err) + } + } + case parts[0] == "ctxt": + if stat.ContextSwitches, err = strconv.ParseUint(parts[1], 10, 64); err != nil { + return Stat{}, fmt.Errorf("couldn't parse %s (ctxt): %s", parts[1], err) + } + case parts[0] == "processes": + if stat.ProcessCreated, err = strconv.ParseUint(parts[1], 10, 64); err != nil { + return Stat{}, fmt.Errorf("couldn't parse %s (processes): %s", parts[1], err) + } + case parts[0] == "procs_running": + if stat.ProcessesRunning, err = strconv.ParseUint(parts[1], 10, 64); err != nil { + return Stat{}, fmt.Errorf("couldn't parse %s (procs_running): %s", parts[1], err) + } + case parts[0] == "procs_blocked": + if stat.ProcessesBlocked, err = strconv.ParseUint(parts[1], 10, 64); err != nil { + return Stat{}, fmt.Errorf("couldn't parse %s (procs_blocked): %s", parts[1], err) + } + case parts[0] == "softirq": + softIRQStats, total, err := parseSoftIRQStat(line) + if err != nil { + return Stat{}, err + } + stat.SoftIRQTotal = total + stat.SoftIRQ = softIRQStats + case strings.HasPrefix(parts[0], "cpu"): + cpuStat, cpuID, err := parseCPUStat(line) + if err != nil { + return Stat{}, err + } + if cpuID == -1 { + stat.CPUTotal = cpuStat + } else { + for int64(len(stat.CPU)) <= cpuID { + stat.CPU = append(stat.CPU, CPUStat{}) + } + stat.CPU[cpuID] = cpuStat + } } - i, err := strconv.ParseInt(fields[1], 10, 32) - if err != nil { - return Stat{}, fmt.Errorf("couldn't parse %s: %s", fields[1], err) - } - return Stat{BootTime: i}, nil } - if err := s.Err(); err != nil { + + if err := scanner.Err(); err != nil { return Stat{}, fmt.Errorf("couldn't parse %s: %s", f.Name(), err) } - return Stat{}, fmt.Errorf("couldn't parse %s, missing btime", f.Name()) + return stat, nil } diff --git a/vendor/github.com/prometheus/procfs/stat_test.go b/vendor/github.com/prometheus/procfs/stat_test.go new file mode 100644 index 000000000..c34ccce1a --- /dev/null +++ b/vendor/github.com/prometheus/procfs/stat_test.go @@ -0,0 +1,61 @@ +package procfs + +import "testing" + +func TestStat(t *testing.T) { + s, err := FS("fixtures").NewStat() + if err != nil { + t.Fatal(err) + } + + // cpu + if want, have := float64(301854)/userHZ, s.CPUTotal.User; want != have { + t.Errorf("want cpu/user %v, have %v", want, have) + } + if want, have := float64(31)/userHZ, s.CPU[7].SoftIRQ; want != have { + t.Errorf("want cpu7/softirq %v, have %v", want, have) + } + + // intr + if want, have := uint64(8885917), s.IRQTotal; want != have { + t.Errorf("want irq/total %d, have %d", want, have) + } + if want, have := uint64(1), s.IRQ[8]; want != have { + t.Errorf("want irq8 %d, have %d", want, have) + } + + // ctxt + if want, have := uint64(38014093), s.ContextSwitches; want != have { + t.Errorf("want context switches (ctxt) %d, have %d", want, have) + } + + // btime + if want, have := uint64(1418183276), s.BootTime; want != have { + t.Errorf("want boot time (btime) %d, have %d", want, have) + } + + // processes + if want, have := uint64(26442), s.ProcessCreated; want != have { + t.Errorf("want process created (processes) %d, have %d", want, have) + } + + // procs_running + if want, have := uint64(2), s.ProcessesRunning; want != have { + t.Errorf("want processes running (procs_running) %d, have %d", want, have) + } + + // procs_blocked + if want, have := uint64(1), s.ProcessesBlocked; want != have { + t.Errorf("want processes blocked (procs_blocked) %d, have %d", want, have) + } + + // softirq + if want, have := uint64(5057579), s.SoftIRQTotal; want != have { + t.Errorf("want softirq total %d, have %d", want, have) + } + + if want, have := uint64(508444), s.SoftIRQ.Rcu; want != have { + t.Errorf("want softirq RCU %d, have %d", want, have) + } + +} diff --git a/vendor/github.com/prometheus/procfs/ttar b/vendor/github.com/prometheus/procfs/ttar new file mode 100755 index 000000000..8227a4a37 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/ttar @@ -0,0 +1,264 @@ +#!/usr/bin/env bash +# Purpose: plain text tar format +# Limitations: - only suitable for text files, directories, and symlinks +# - stores only filename, content, and mode +# - not designed for untrusted input + +# Note: must work with bash version 3.2 (macOS) + +set -o errexit -o nounset + +# Sanitize environment (for instance, standard sorting of glob matches) +export LC_ALL=C + +path="" +CMD="" + +function usage { + bname=$(basename "$0") + cat << USAGE +Usage: $bname [-C

] -c -f (create archive) + $bname -t -f (list archive contents) + $bname [-C ] -x -f (extract archive) + +Options: + -C (change directory) + +Example: Change to sysfs directory, create ttar file from fixtures directory + $bname -C sysfs -c -f sysfs/fixtures.ttar fixtures/ +USAGE +exit "$1" +} + +function vecho { + if [ "${VERBOSE:-}" == "yes" ]; then + echo >&7 "$@" + fi +} + +function set_cmd { + if [ -n "$CMD" ]; then + echo "ERROR: more than one command given" + echo + usage 2 + fi + CMD=$1 +} + +while getopts :cf:htxvC: opt; do + case $opt in + c) + set_cmd "create" + ;; + f) + ARCHIVE=$OPTARG + ;; + h) + usage 0 + ;; + t) + set_cmd "list" + ;; + x) + set_cmd "extract" + ;; + v) + VERBOSE=yes + exec 7>&1 + ;; + C) + CDIR=$OPTARG + ;; + *) + echo >&2 "ERROR: invalid option -$OPTARG" + echo + usage 1 + ;; + esac +done + +# Remove processed options from arguments +shift $(( OPTIND - 1 )); + +if [ "${CMD:-}" == "" ]; then + echo >&2 "ERROR: no command given" + echo + usage 1 +elif [ "${ARCHIVE:-}" == "" ]; then + echo >&2 "ERROR: no archive name given" + echo + usage 1 +fi + +function list { + local path="" + local size=0 + local line_no=0 + local ttar_file=$1 + if [ -n "${2:-}" ]; then + echo >&2 "ERROR: too many arguments." + echo + usage 1 + fi + if [ ! -e "$ttar_file" ]; then + echo >&2 "ERROR: file not found ($ttar_file)" + echo + usage 1 + fi + while read -r line; do + line_no=$(( line_no + 1 )) + if [ $size -gt 0 ]; then + size=$(( size - 1 )) + continue + fi + if [[ $line =~ ^Path:\ (.*)$ ]]; then + path=${BASH_REMATCH[1]} + elif [[ $line =~ ^Lines:\ (.*)$ ]]; then + size=${BASH_REMATCH[1]} + echo "$path" + elif [[ $line =~ ^Directory:\ (.*)$ ]]; then + path=${BASH_REMATCH[1]} + echo "$path/" + elif [[ $line =~ ^SymlinkTo:\ (.*)$ ]]; then + echo "$path -> ${BASH_REMATCH[1]}" + fi + done < "$ttar_file" +} + +function extract { + local path="" + local size=0 + local line_no=0 + local ttar_file=$1 + if [ -n "${2:-}" ]; then + echo >&2 "ERROR: too many arguments." + echo + usage 1 + fi + if [ ! -e "$ttar_file" ]; then + echo >&2 "ERROR: file not found ($ttar_file)" + echo + usage 1 + fi + while IFS= read -r line; do + line_no=$(( line_no + 1 )) + if [ "$size" -gt 0 ]; then + echo "$line" >> "$path" + size=$(( size - 1 )) + continue + fi + if [[ $line =~ ^Path:\ (.*)$ ]]; then + path=${BASH_REMATCH[1]} + if [ -e "$path" ] || [ -L "$path" ]; then + rm "$path" + fi + elif [[ $line =~ ^Lines:\ (.*)$ ]]; then + size=${BASH_REMATCH[1]} + # Create file even if it is zero-length. + touch "$path" + vecho " $path" + elif [[ $line =~ ^Mode:\ (.*)$ ]]; then + mode=${BASH_REMATCH[1]} + chmod "$mode" "$path" + vecho "$mode" + elif [[ $line =~ ^Directory:\ (.*)$ ]]; then + path=${BASH_REMATCH[1]} + mkdir -p "$path" + vecho " $path/" + elif [[ $line =~ ^SymlinkTo:\ (.*)$ ]]; then + ln -s "${BASH_REMATCH[1]}" "$path" + vecho " $path -> ${BASH_REMATCH[1]}" + elif [[ $line =~ ^# ]]; then + # Ignore comments between files + continue + else + echo >&2 "ERROR: Unknown keyword on line $line_no: $line" + exit 1 + fi + done < "$ttar_file" +} + +function div { + echo "# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" \ + "- - - - - -" +} + +function get_mode { + local mfile=$1 + if [ -z "${STAT_OPTION:-}" ]; then + if stat -c '%a' "$mfile" >/dev/null 2>&1; then + STAT_OPTION='-c' + STAT_FORMAT='%a' + else + STAT_OPTION='-f' + STAT_FORMAT='%A' + fi + fi + stat "${STAT_OPTION}" "${STAT_FORMAT}" "$mfile" +} + +function _create { + shopt -s nullglob + local mode + while (( "$#" )); do + file=$1 + if [ -L "$file" ]; then + echo "Path: $file" + symlinkTo=$(readlink "$file") + echo "SymlinkTo: $symlinkTo" + vecho " $file -> $symlinkTo" + div + elif [ -d "$file" ]; then + # Strip trailing slash (if there is one) + file=${file%/} + echo "Directory: $file" + mode=$(get_mode "$file") + echo "Mode: $mode" + vecho "$mode $file/" + div + # Find all files and dirs, including hidden/dot files + for x in "$file/"{*,.[^.]*}; do + _create "$x" + done + elif [ -f "$file" ]; then + echo "Path: $file" + lines=$(wc -l "$file"|awk '{print $1}') + echo "Lines: $lines" + cat "$file" + mode=$(get_mode "$file") + echo "Mode: $mode" + vecho "$mode $file" + div + else + echo >&2 "ERROR: file not found ($file in $(pwd))" + exit 2 + fi + shift + done +} + +function create { + ttar_file=$1 + shift + if [ -z "${1:-}" ]; then + echo >&2 "ERROR: missing arguments." + echo + usage 1 + fi + if [ -e "$ttar_file" ]; then + rm "$ttar_file" + fi + exec > "$ttar_file" + _create "$@" +} + +if [ -n "${CDIR:-}" ]; then + if [[ "$ARCHIVE" != /* ]]; then + # Relative path: preserve the archive's location before changing + # directory + ARCHIVE="$(pwd)/$ARCHIVE" + fi + cd "$CDIR" +fi + +"$CMD" "$ARCHIVE" "$@" diff --git a/vendor/github.com/prometheus/procfs/xfrm_test.go b/vendor/github.com/prometheus/procfs/xfrm_test.go new file mode 100644 index 000000000..5918c390e --- /dev/null +++ b/vendor/github.com/prometheus/procfs/xfrm_test.go @@ -0,0 +1,66 @@ +// Copyright 2017 Prometheus Team +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package procfs + +import ( + "testing" +) + +func TestXfrmStats(t *testing.T) { + xfrmStats, err := FS("fixtures").NewXfrmStat() + if err != nil { + t.Fatal(err) + } + + for _, test := range []struct { + name string + want int + got int + }{ + {name: "XfrmInError", want: 1, got: xfrmStats.XfrmInError}, + {name: "XfrmInBufferError", want: 2, got: xfrmStats.XfrmInBufferError}, + {name: "XfrmInHdrError", want: 4, got: xfrmStats.XfrmInHdrError}, + {name: "XfrmInNoStates", want: 3, got: xfrmStats.XfrmInNoStates}, + {name: "XfrmInStateProtoError", want: 40, got: xfrmStats.XfrmInStateProtoError}, + {name: "XfrmInStateModeError", want: 100, got: xfrmStats.XfrmInStateModeError}, + {name: "XfrmInStateSeqError", want: 6000, got: xfrmStats.XfrmInStateSeqError}, + {name: "XfrmInStateExpired", want: 4, got: xfrmStats.XfrmInStateExpired}, + {name: "XfrmInStateMismatch", want: 23451, got: xfrmStats.XfrmInStateMismatch}, + {name: "XfrmInStateInvalid", want: 55555, got: xfrmStats.XfrmInStateInvalid}, + {name: "XfrmInTmplMismatch", want: 51, got: xfrmStats.XfrmInTmplMismatch}, + {name: "XfrmInNoPols", want: 65432, got: xfrmStats.XfrmInNoPols}, + {name: "XfrmInPolBlock", want: 100, got: xfrmStats.XfrmInPolBlock}, + {name: "XfrmInPolError", want: 10000, got: xfrmStats.XfrmInPolError}, + {name: "XfrmOutError", want: 1000000, got: xfrmStats.XfrmOutError}, + {name: "XfrmOutBundleGenError", want: 43321, got: xfrmStats.XfrmOutBundleGenError}, + {name: "XfrmOutBundleCheckError", want: 555, got: xfrmStats.XfrmOutBundleCheckError}, + {name: "XfrmOutNoStates", want: 869, got: xfrmStats.XfrmOutNoStates}, + {name: "XfrmOutStateProtoError", want: 4542, got: xfrmStats.XfrmOutStateProtoError}, + {name: "XfrmOutStateModeError", want: 4, got: xfrmStats.XfrmOutStateModeError}, + {name: "XfrmOutStateSeqError", want: 543, got: xfrmStats.XfrmOutStateSeqError}, + {name: "XfrmOutStateExpired", want: 565, got: xfrmStats.XfrmOutStateExpired}, + {name: "XfrmOutPolBlock", want: 43456, got: xfrmStats.XfrmOutPolBlock}, + {name: "XfrmOutPolDead", want: 7656, got: xfrmStats.XfrmOutPolDead}, + {name: "XfrmOutPolError", want: 1454, got: xfrmStats.XfrmOutPolError}, + {name: "XfrmFwdHdrError", want: 6654, got: xfrmStats.XfrmFwdHdrError}, + {name: "XfrmOutStateInvaliad", want: 28765, got: xfrmStats.XfrmOutStateInvalid}, + {name: "XfrmAcquireError", want: 24532, got: xfrmStats.XfrmAcquireError}, + {name: "XfrmInStateInvalid", want: 55555, got: xfrmStats.XfrmInStateInvalid}, + {name: "XfrmOutError", want: 1000000, got: xfrmStats.XfrmOutError}, + } { + if test.want != test.got { + t.Errorf("Want %s %d, have %d", test.name, test.want, test.got) + } + } +} diff --git a/vendor/github.com/prometheus/procfs/xfs/parse_test.go b/vendor/github.com/prometheus/procfs/xfs/parse_test.go new file mode 100644 index 000000000..2e946c2c5 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/xfs/parse_test.go @@ -0,0 +1,442 @@ +// Copyright 2017 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package xfs_test + +import ( + "reflect" + "strings" + "testing" + + "github.com/prometheus/procfs" + "github.com/prometheus/procfs/xfs" +) + +func TestParseStats(t *testing.T) { + tests := []struct { + name string + s string + fs bool + stats *xfs.Stats + invalid bool + }{ + { + name: "empty file OK", + }, + { + name: "short or empty lines and unknown labels ignored", + s: "one\n\ntwo 1 2 3\n", + stats: &xfs.Stats{}, + }, + { + name: "bad uint32", + s: "extent_alloc XXX", + invalid: true, + }, + { + name: "bad uint64", + s: "xpc XXX", + invalid: true, + }, + { + name: "extent_alloc bad", + s: "extent_alloc 1", + invalid: true, + }, + { + name: "extent_alloc OK", + s: "extent_alloc 1 2 3 4", + stats: &xfs.Stats{ + ExtentAllocation: xfs.ExtentAllocationStats{ + ExtentsAllocated: 1, + BlocksAllocated: 2, + ExtentsFreed: 3, + BlocksFreed: 4, + }, + }, + }, + { + name: "abt bad", + s: "abt 1", + invalid: true, + }, + { + name: "abt OK", + s: "abt 1 2 3 4", + stats: &xfs.Stats{ + AllocationBTree: xfs.BTreeStats{ + Lookups: 1, + Compares: 2, + RecordsInserted: 3, + RecordsDeleted: 4, + }, + }, + }, + { + name: "blk_map bad", + s: "blk_map 1", + invalid: true, + }, + { + name: "blk_map OK", + s: "blk_map 1 2 3 4 5 6 7", + stats: &xfs.Stats{ + BlockMapping: xfs.BlockMappingStats{ + Reads: 1, + Writes: 2, + Unmaps: 3, + ExtentListInsertions: 4, + ExtentListDeletions: 5, + ExtentListLookups: 6, + ExtentListCompares: 7, + }, + }, + }, + { + name: "bmbt bad", + s: "bmbt 1", + invalid: true, + }, + { + name: "bmbt OK", + s: "bmbt 1 2 3 4", + stats: &xfs.Stats{ + BlockMapBTree: xfs.BTreeStats{ + Lookups: 1, + Compares: 2, + RecordsInserted: 3, + RecordsDeleted: 4, + }, + }, + }, + { + name: "dir bad", + s: "dir 1", + invalid: true, + }, + { + name: "dir OK", + s: "dir 1 2 3 4", + stats: &xfs.Stats{ + DirectoryOperation: xfs.DirectoryOperationStats{ + Lookups: 1, + Creates: 2, + Removes: 3, + Getdents: 4, + }, + }, + }, + { + name: "trans bad", + s: "trans 1", + invalid: true, + }, + { + name: "trans OK", + s: "trans 1 2 3", + stats: &xfs.Stats{ + Transaction: xfs.TransactionStats{ + Sync: 1, + Async: 2, + Empty: 3, + }, + }, + }, + { + name: "ig bad", + s: "ig 1", + invalid: true, + }, + { + name: "ig OK", + s: "ig 1 2 3 4 5 6 7", + stats: &xfs.Stats{ + InodeOperation: xfs.InodeOperationStats{ + Attempts: 1, + Found: 2, + Recycle: 3, + Missed: 4, + Duplicate: 5, + Reclaims: 6, + AttributeChange: 7, + }, + }, + }, + { + name: "log bad", + s: "log 1", + invalid: true, + }, + { + name: "log OK", + s: "log 1 2 3 4 5", + stats: &xfs.Stats{ + LogOperation: xfs.LogOperationStats{ + Writes: 1, + Blocks: 2, + NoInternalBuffers: 3, + Force: 4, + ForceSleep: 5, + }, + }, + }, + { + name: "rw bad", + s: "rw 1", + invalid: true, + }, + { + name: "rw OK", + s: "rw 1 2", + stats: &xfs.Stats{ + ReadWrite: xfs.ReadWriteStats{ + Read: 1, + Write: 2, + }, + }, + }, + { + name: "attr bad", + s: "attr 1", + invalid: true, + }, + { + name: "attr OK", + s: "attr 1 2 3 4", + stats: &xfs.Stats{ + AttributeOperation: xfs.AttributeOperationStats{ + Get: 1, + Set: 2, + Remove: 3, + List: 4, + }, + }, + }, + { + name: "icluster bad", + s: "icluster 1", + invalid: true, + }, + { + name: "icluster OK", + s: "icluster 1 2 3", + stats: &xfs.Stats{ + InodeClustering: xfs.InodeClusteringStats{ + Iflush: 1, + Flush: 2, + FlushInode: 3, + }, + }, + }, + { + name: "vnodes bad", + s: "vnodes 1", + invalid: true, + }, + { + name: "vnodes (missing free) OK", + s: "vnodes 1 2 3 4 5 6 7", + stats: &xfs.Stats{ + Vnode: xfs.VnodeStats{ + Active: 1, + Allocate: 2, + Get: 3, + Hold: 4, + Release: 5, + Reclaim: 6, + Remove: 7, + }, + }, + }, + { + name: "vnodes (with free) OK", + s: "vnodes 1 2 3 4 5 6 7 8", + stats: &xfs.Stats{ + Vnode: xfs.VnodeStats{ + Active: 1, + Allocate: 2, + Get: 3, + Hold: 4, + Release: 5, + Reclaim: 6, + Remove: 7, + Free: 8, + }, + }, + }, + { + name: "buf bad", + s: "buf 1", + invalid: true, + }, + { + name: "buf OK", + s: "buf 1 2 3 4 5 6 7 8 9", + stats: &xfs.Stats{ + Buffer: xfs.BufferStats{ + Get: 1, + Create: 2, + GetLocked: 3, + GetLockedWaited: 4, + BusyLocked: 5, + MissLocked: 6, + PageRetries: 7, + PageFound: 8, + GetRead: 9, + }, + }, + }, + { + name: "xpc bad", + s: "xpc 1", + invalid: true, + }, + { + name: "xpc OK", + s: "xpc 1 2 3", + stats: &xfs.Stats{ + ExtendedPrecision: xfs.ExtendedPrecisionStats{ + FlushBytes: 1, + WriteBytes: 2, + ReadBytes: 3, + }, + }, + }, + { + name: "fixtures OK", + fs: true, + stats: &xfs.Stats{ + ExtentAllocation: xfs.ExtentAllocationStats{ + ExtentsAllocated: 92447, + BlocksAllocated: 97589, + ExtentsFreed: 92448, + BlocksFreed: 93751, + }, + AllocationBTree: xfs.BTreeStats{ + Lookups: 0, + Compares: 0, + RecordsInserted: 0, + RecordsDeleted: 0, + }, + BlockMapping: xfs.BlockMappingStats{ + Reads: 1767055, + Writes: 188820, + Unmaps: 184891, + ExtentListInsertions: 92447, + ExtentListDeletions: 92448, + ExtentListLookups: 2140766, + ExtentListCompares: 0, + }, + BlockMapBTree: xfs.BTreeStats{ + Lookups: 0, + Compares: 0, + RecordsInserted: 0, + RecordsDeleted: 0, + }, + DirectoryOperation: xfs.DirectoryOperationStats{ + Lookups: 185039, + Creates: 92447, + Removes: 92444, + Getdents: 136422, + }, + Transaction: xfs.TransactionStats{ + Sync: 706, + Async: 944304, + Empty: 0, + }, + InodeOperation: xfs.InodeOperationStats{ + Attempts: 185045, + Found: 58807, + Recycle: 0, + Missed: 126238, + Duplicate: 0, + Reclaims: 33637, + AttributeChange: 22, + }, + LogOperation: xfs.LogOperationStats{ + Writes: 2883, + Blocks: 113448, + NoInternalBuffers: 9, + Force: 17360, + ForceSleep: 739, + }, + ReadWrite: xfs.ReadWriteStats{ + Read: 107739, + Write: 94045, + }, + AttributeOperation: xfs.AttributeOperationStats{ + Get: 4, + Set: 0, + Remove: 0, + List: 0, + }, + InodeClustering: xfs.InodeClusteringStats{ + Iflush: 8677, + Flush: 7849, + FlushInode: 135802, + }, + Vnode: xfs.VnodeStats{ + Active: 92601, + Allocate: 0, + Get: 0, + Hold: 0, + Release: 92444, + Reclaim: 92444, + Remove: 92444, + Free: 0, + }, + Buffer: xfs.BufferStats{ + Get: 2666287, + Create: 7122, + GetLocked: 2659202, + GetLockedWaited: 3599, + BusyLocked: 2, + MissLocked: 7085, + PageRetries: 0, + PageFound: 10297, + GetRead: 7085, + }, + ExtendedPrecision: xfs.ExtendedPrecisionStats{ + FlushBytes: 399724544, + WriteBytes: 92823103, + ReadBytes: 86219234, + }, + }, + }, + } + + for _, tt := range tests { + var ( + stats *xfs.Stats + err error + ) + + if tt.s != "" { + stats, err = xfs.ParseStats(strings.NewReader(tt.s)) + } + if tt.fs { + stats, err = procfs.FS("../fixtures").XFSStats() + } + + if tt.invalid && err == nil { + t.Error("expected an error, but none occurred") + } + if !tt.invalid && err != nil { + t.Errorf("unexpected error: %v", err) + } + + if want, have := tt.stats, stats; !reflect.DeepEqual(want, have) { + t.Errorf("unexpected XFS stats:\nwant:\n%v\nhave:\n%v", want, have) + } + } +} diff --git a/vendor/github.com/spf13/pflag/.travis.yml b/vendor/github.com/spf13/pflag/.travis.yml index 707bdc39a..f8a63b308 100644 --- a/vendor/github.com/spf13/pflag/.travis.yml +++ b/vendor/github.com/spf13/pflag/.travis.yml @@ -3,18 +3,19 @@ sudo: false language: go go: - - 1.6.3 - - 1.7.3 - - tip + - 1.7.3 + - 1.8.1 + - tip matrix: - allow_failures: - - go: tip + allow_failures: + - go: tip + install: - - go get github.com/golang/lint/golint - - export PATH=$GOPATH/bin:$PATH - - go install ./... + - go get github.com/golang/lint/golint + - export PATH=$GOPATH/bin:$PATH + - go install ./... script: - - verify/all.sh -v - - go test ./... + - verify/all.sh -v + - go test ./... diff --git a/vendor/github.com/spf13/pflag/README.md b/vendor/github.com/spf13/pflag/README.md index eefb46dec..b052414d1 100644 --- a/vendor/github.com/spf13/pflag/README.md +++ b/vendor/github.com/spf13/pflag/README.md @@ -246,6 +246,25 @@ It is possible to mark a flag as hidden, meaning it will still function as norma flags.MarkHidden("secretFlag") ``` +## Disable sorting of flags +`pflag` allows you to disable sorting of flags for help and usage message. + +**Example**: +```go +flags.BoolP("verbose", "v", false, "verbose output") +flags.String("coolflag", "yeaah", "it's really cool flag") +flags.Int("usefulflag", 777, "sometimes it's very useful") +flags.SortFlags = false +flags.PrintDefaults() +``` +**Output**: +``` + -v, --verbose verbose output + --coolflag string it's really cool flag (default "yeaah") + --usefulflag int sometimes it's very useful (default 777) +``` + + ## Supporting Go flags when using pflag In order to support flags defined using Go's `flag` package, they must be added to the `pflag` flagset. This is usually necessary to support flags defined by third-party dependencies (e.g. `golang/glog`). @@ -270,8 +289,8 @@ func main() { You can see the full reference documentation of the pflag package [at godoc.org][3], or through go's standard documentation system by running `godoc -http=:6060` and browsing to -[http://localhost:6060/pkg/github.com/ogier/pflag][2] after +[http://localhost:6060/pkg/github.com/spf13/pflag][2] after installation. -[2]: http://localhost:6060/pkg/github.com/ogier/pflag -[3]: http://godoc.org/github.com/ogier/pflag +[2]: http://localhost:6060/pkg/github.com/spf13/pflag +[3]: http://godoc.org/github.com/spf13/pflag diff --git a/vendor/github.com/spf13/pflag/bool_slice_test.go b/vendor/github.com/spf13/pflag/bool_slice_test.go new file mode 100644 index 000000000..b617dd237 --- /dev/null +++ b/vendor/github.com/spf13/pflag/bool_slice_test.go @@ -0,0 +1,215 @@ +package pflag + +import ( + "fmt" + "strconv" + "strings" + "testing" +) + +func setUpBSFlagSet(bsp *[]bool) *FlagSet { + f := NewFlagSet("test", ContinueOnError) + f.BoolSliceVar(bsp, "bs", []bool{}, "Command separated list!") + return f +} + +func setUpBSFlagSetWithDefault(bsp *[]bool) *FlagSet { + f := NewFlagSet("test", ContinueOnError) + f.BoolSliceVar(bsp, "bs", []bool{false, true}, "Command separated list!") + return f +} + +func TestEmptyBS(t *testing.T) { + var bs []bool + f := setUpBSFlagSet(&bs) + err := f.Parse([]string{}) + if err != nil { + t.Fatal("expected no error; got", err) + } + + getBS, err := f.GetBoolSlice("bs") + if err != nil { + t.Fatal("got an error from GetBoolSlice():", err) + } + if len(getBS) != 0 { + t.Fatalf("got bs %v with len=%d but expected length=0", getBS, len(getBS)) + } +} + +func TestBS(t *testing.T) { + var bs []bool + f := setUpBSFlagSet(&bs) + + vals := []string{"1", "F", "TRUE", "0"} + arg := fmt.Sprintf("--bs=%s", strings.Join(vals, ",")) + err := f.Parse([]string{arg}) + if err != nil { + t.Fatal("expected no error; got", err) + } + for i, v := range bs { + b, err := strconv.ParseBool(vals[i]) + if err != nil { + t.Fatalf("got error: %v", err) + } + if b != v { + t.Fatalf("expected is[%d] to be %s but got: %t", i, vals[i], v) + } + } + getBS, err := f.GetBoolSlice("bs") + if err != nil { + t.Fatalf("got error: %v", err) + } + for i, v := range getBS { + b, err := strconv.ParseBool(vals[i]) + if err != nil { + t.Fatalf("got error: %v", err) + } + if b != v { + t.Fatalf("expected bs[%d] to be %s but got: %t from GetBoolSlice", i, vals[i], v) + } + } +} + +func TestBSDefault(t *testing.T) { + var bs []bool + f := setUpBSFlagSetWithDefault(&bs) + + vals := []string{"false", "T"} + + err := f.Parse([]string{}) + if err != nil { + t.Fatal("expected no error; got", err) + } + for i, v := range bs { + b, err := strconv.ParseBool(vals[i]) + if err != nil { + t.Fatalf("got error: %v", err) + } + if b != v { + t.Fatalf("expected bs[%d] to be %t from GetBoolSlice but got: %t", i, b, v) + } + } + + getBS, err := f.GetBoolSlice("bs") + if err != nil { + t.Fatal("got an error from GetBoolSlice():", err) + } + for i, v := range getBS { + b, err := strconv.ParseBool(vals[i]) + if err != nil { + t.Fatal("got an error from GetBoolSlice():", err) + } + if b != v { + t.Fatalf("expected bs[%d] to be %t from GetBoolSlice but got: %t", i, b, v) + } + } +} + +func TestBSWithDefault(t *testing.T) { + var bs []bool + f := setUpBSFlagSetWithDefault(&bs) + + vals := []string{"FALSE", "1"} + arg := fmt.Sprintf("--bs=%s", strings.Join(vals, ",")) + err := f.Parse([]string{arg}) + if err != nil { + t.Fatal("expected no error; got", err) + } + for i, v := range bs { + b, err := strconv.ParseBool(vals[i]) + if err != nil { + t.Fatalf("got error: %v", err) + } + if b != v { + t.Fatalf("expected bs[%d] to be %t but got: %t", i, b, v) + } + } + + getBS, err := f.GetBoolSlice("bs") + if err != nil { + t.Fatal("got an error from GetBoolSlice():", err) + } + for i, v := range getBS { + b, err := strconv.ParseBool(vals[i]) + if err != nil { + t.Fatalf("got error: %v", err) + } + if b != v { + t.Fatalf("expected bs[%d] to be %t from GetBoolSlice but got: %t", i, b, v) + } + } +} + +func TestBSCalledTwice(t *testing.T) { + var bs []bool + f := setUpBSFlagSet(&bs) + + in := []string{"T,F", "T"} + expected := []bool{true, false, true} + argfmt := "--bs=%s" + arg1 := fmt.Sprintf(argfmt, in[0]) + arg2 := fmt.Sprintf(argfmt, in[1]) + err := f.Parse([]string{arg1, arg2}) + if err != nil { + t.Fatal("expected no error; got", err) + } + for i, v := range bs { + if expected[i] != v { + t.Fatalf("expected bs[%d] to be %t but got %t", i, expected[i], v) + } + } +} + +func TestBSBadQuoting(t *testing.T) { + + tests := []struct { + Want []bool + FlagArg []string + }{ + { + Want: []bool{true, false, true}, + FlagArg: []string{"1", "0", "true"}, + }, + { + Want: []bool{true, false}, + FlagArg: []string{"True", "F"}, + }, + { + Want: []bool{true, false}, + FlagArg: []string{"T", "0"}, + }, + { + Want: []bool{true, false}, + FlagArg: []string{"1", "0"}, + }, + { + Want: []bool{true, false, false}, + FlagArg: []string{"true,false", "false"}, + }, + { + Want: []bool{true, false, false, true, false, true, false}, + FlagArg: []string{`"true,false,false,1,0, T"`, " false "}, + }, + { + Want: []bool{false, false, true, false, true, false, true}, + FlagArg: []string{`"0, False, T,false , true,F"`, "true"}, + }, + } + + for i, test := range tests { + + var bs []bool + f := setUpBSFlagSet(&bs) + + if err := f.Parse([]string{fmt.Sprintf("--bs=%s", strings.Join(test.FlagArg, ","))}); err != nil { + t.Fatalf("flag parsing failed with error: %s\nparsing:\t%#v\nwant:\t\t%#v", + err, test.FlagArg, test.Want[i]) + } + + for j, b := range bs { + if b != test.Want[j] { + t.Fatalf("bad value parsed for test %d on bool %d:\nwant:\t%t\ngot:\t%t", i, j, test.Want[j], b) + } + } + } +} diff --git a/vendor/github.com/spf13/pflag/bool_test.go b/vendor/github.com/spf13/pflag/bool_test.go new file mode 100644 index 000000000..a4319e79f --- /dev/null +++ b/vendor/github.com/spf13/pflag/bool_test.go @@ -0,0 +1,179 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package pflag + +import ( + "bytes" + "strconv" + "testing" +) + +// This value can be a boolean ("true", "false") or "maybe" +type triStateValue int + +const ( + triStateFalse triStateValue = 0 + triStateTrue triStateValue = 1 + triStateMaybe triStateValue = 2 +) + +const strTriStateMaybe = "maybe" + +func (v *triStateValue) IsBoolFlag() bool { + return true +} + +func (v *triStateValue) Get() interface{} { + return triStateValue(*v) +} + +func (v *triStateValue) Set(s string) error { + if s == strTriStateMaybe { + *v = triStateMaybe + return nil + } + boolVal, err := strconv.ParseBool(s) + if boolVal { + *v = triStateTrue + } else { + *v = triStateFalse + } + return err +} + +func (v *triStateValue) String() string { + if *v == triStateMaybe { + return strTriStateMaybe + } + return strconv.FormatBool(*v == triStateTrue) +} + +// The type of the flag as required by the pflag.Value interface +func (v *triStateValue) Type() string { + return "version" +} + +func setUpFlagSet(tristate *triStateValue) *FlagSet { + f := NewFlagSet("test", ContinueOnError) + *tristate = triStateFalse + flag := f.VarPF(tristate, "tristate", "t", "tristate value (true, maybe or false)") + flag.NoOptDefVal = "true" + return f +} + +func TestExplicitTrue(t *testing.T) { + var tristate triStateValue + f := setUpFlagSet(&tristate) + err := f.Parse([]string{"--tristate=true"}) + if err != nil { + t.Fatal("expected no error; got", err) + } + if tristate != triStateTrue { + t.Fatal("expected", triStateTrue, "(triStateTrue) but got", tristate, "instead") + } +} + +func TestImplicitTrue(t *testing.T) { + var tristate triStateValue + f := setUpFlagSet(&tristate) + err := f.Parse([]string{"--tristate"}) + if err != nil { + t.Fatal("expected no error; got", err) + } + if tristate != triStateTrue { + t.Fatal("expected", triStateTrue, "(triStateTrue) but got", tristate, "instead") + } +} + +func TestShortFlag(t *testing.T) { + var tristate triStateValue + f := setUpFlagSet(&tristate) + err := f.Parse([]string{"-t"}) + if err != nil { + t.Fatal("expected no error; got", err) + } + if tristate != triStateTrue { + t.Fatal("expected", triStateTrue, "(triStateTrue) but got", tristate, "instead") + } +} + +func TestShortFlagExtraArgument(t *testing.T) { + var tristate triStateValue + f := setUpFlagSet(&tristate) + // The"maybe"turns into an arg, since short boolean options will only do true/false + err := f.Parse([]string{"-t", "maybe"}) + if err != nil { + t.Fatal("expected no error; got", err) + } + if tristate != triStateTrue { + t.Fatal("expected", triStateTrue, "(triStateTrue) but got", tristate, "instead") + } + args := f.Args() + if len(args) != 1 || args[0] != "maybe" { + t.Fatal("expected an extra 'maybe' argument to stick around") + } +} + +func TestExplicitMaybe(t *testing.T) { + var tristate triStateValue + f := setUpFlagSet(&tristate) + err := f.Parse([]string{"--tristate=maybe"}) + if err != nil { + t.Fatal("expected no error; got", err) + } + if tristate != triStateMaybe { + t.Fatal("expected", triStateMaybe, "(triStateMaybe) but got", tristate, "instead") + } +} + +func TestExplicitFalse(t *testing.T) { + var tristate triStateValue + f := setUpFlagSet(&tristate) + err := f.Parse([]string{"--tristate=false"}) + if err != nil { + t.Fatal("expected no error; got", err) + } + if tristate != triStateFalse { + t.Fatal("expected", triStateFalse, "(triStateFalse) but got", tristate, "instead") + } +} + +func TestImplicitFalse(t *testing.T) { + var tristate triStateValue + f := setUpFlagSet(&tristate) + err := f.Parse([]string{}) + if err != nil { + t.Fatal("expected no error; got", err) + } + if tristate != triStateFalse { + t.Fatal("expected", triStateFalse, "(triStateFalse) but got", tristate, "instead") + } +} + +func TestInvalidValue(t *testing.T) { + var tristate triStateValue + f := setUpFlagSet(&tristate) + var buf bytes.Buffer + f.SetOutput(&buf) + err := f.Parse([]string{"--tristate=invalid"}) + if err == nil { + t.Fatal("expected an error but did not get any, tristate has value", tristate) + } +} + +func TestBoolP(t *testing.T) { + b := BoolP("bool", "b", false, "bool value in CommandLine") + c := BoolP("c", "c", false, "other bool value") + args := []string{"--bool"} + if err := CommandLine.Parse(args); err != nil { + t.Error("expected no error, got ", err) + } + if *b != true { + t.Errorf("expected b=true got b=%v", *b) + } + if *c != false { + t.Errorf("expect c=false got c=%v", *c) + } +} diff --git a/vendor/github.com/spf13/pflag/count.go b/vendor/github.com/spf13/pflag/count.go index d22be41f2..250a43814 100644 --- a/vendor/github.com/spf13/pflag/count.go +++ b/vendor/github.com/spf13/pflag/count.go @@ -83,7 +83,9 @@ func (f *FlagSet) CountP(name, shorthand string, usage string) *int { return p } -// Count like Count only the flag is placed on the CommandLine isntead of a given flag set +// Count defines a count flag with specified name, default value, and usage string. +// The return value is the address of an int variable that stores the value of the flag. +// A count flag will add 1 to its value evey time it is found on the command line func Count(name string, usage string) *int { return CommandLine.CountP(name, "", usage) } diff --git a/vendor/github.com/spf13/pflag/count_test.go b/vendor/github.com/spf13/pflag/count_test.go new file mode 100644 index 000000000..460d96a6f --- /dev/null +++ b/vendor/github.com/spf13/pflag/count_test.go @@ -0,0 +1,52 @@ +package pflag + +import ( + "os" + "testing" +) + +func setUpCount(c *int) *FlagSet { + f := NewFlagSet("test", ContinueOnError) + f.CountVarP(c, "verbose", "v", "a counter") + return f +} + +func TestCount(t *testing.T) { + testCases := []struct { + input []string + success bool + expected int + }{ + {[]string{"-vvv"}, true, 3}, + {[]string{"-v", "-v", "-v"}, true, 3}, + {[]string{"-v", "--verbose", "-v"}, true, 3}, + {[]string{"-v=3", "-v"}, true, 4}, + {[]string{"-v=a"}, false, 0}, + } + + devnull, _ := os.Open(os.DevNull) + os.Stderr = devnull + for i := range testCases { + var count int + f := setUpCount(&count) + + tc := &testCases[i] + + err := f.Parse(tc.input) + if err != nil && tc.success == true { + t.Errorf("expected success, got %q", err) + continue + } else if err == nil && tc.success == false { + t.Errorf("expected failure, got success") + continue + } else if tc.success { + c, err := f.GetCount("verbose") + if err != nil { + t.Errorf("Got error trying to fetch the counter flag") + } + if c != tc.expected { + t.Errorf("expected %q, got %q", tc.expected, c) + } + } + } +} diff --git a/vendor/github.com/spf13/pflag/example_test.go b/vendor/github.com/spf13/pflag/example_test.go new file mode 100644 index 000000000..abd7806fa --- /dev/null +++ b/vendor/github.com/spf13/pflag/example_test.go @@ -0,0 +1,36 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package pflag_test + +import ( + "fmt" + + "github.com/spf13/pflag" +) + +func ExampleShorthandLookup() { + name := "verbose" + short := name[:1] + + pflag.BoolP(name, short, false, "verbose output") + + // len(short) must be == 1 + flag := pflag.ShorthandLookup(short) + + fmt.Println(flag.Name) +} + +func ExampleFlagSet_ShorthandLookup() { + name := "verbose" + short := name[:1] + + fs := pflag.NewFlagSet("Example", pflag.ContinueOnError) + fs.BoolP(name, short, false, "verbose output") + + // len(short) must be == 1 + flag := fs.ShorthandLookup(short) + + fmt.Println(flag.Name) +} diff --git a/vendor/github.com/spf13/pflag/export_test.go b/vendor/github.com/spf13/pflag/export_test.go new file mode 100644 index 000000000..9318fee00 --- /dev/null +++ b/vendor/github.com/spf13/pflag/export_test.go @@ -0,0 +1,29 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package pflag + +import ( + "io/ioutil" + "os" +) + +// Additional routines compiled into the package only during testing. + +// ResetForTesting clears all flag state and sets the usage function as directed. +// After calling ResetForTesting, parse errors in flag handling will not +// exit the program. +func ResetForTesting(usage func()) { + CommandLine = &FlagSet{ + name: os.Args[0], + errorHandling: ContinueOnError, + output: ioutil.Discard, + } + Usage = usage +} + +// GetCommandLine returns the default FlagSet. +func GetCommandLine() *FlagSet { + return CommandLine +} diff --git a/vendor/github.com/spf13/pflag/flag.go b/vendor/github.com/spf13/pflag/flag.go index 746af6327..6f1fc3007 100644 --- a/vendor/github.com/spf13/pflag/flag.go +++ b/vendor/github.com/spf13/pflag/flag.go @@ -16,9 +16,9 @@ pflag is a drop-in replacement of Go's native flag package. If you import pflag under the name "flag" then all code should continue to function with no changes. - import flag "github.com/ogier/pflag" + import flag "github.com/spf13/pflag" - There is one exception to this: if you directly instantiate the Flag struct +There is one exception to this: if you directly instantiate the Flag struct there is one more field "Shorthand" that you will need to set. Most code never instantiates this struct directly, and instead uses functions such as String(), BoolVar(), and Var(), and is therefore @@ -134,14 +134,21 @@ type FlagSet struct { // a custom error handler. Usage func() + // SortFlags is used to indicate, if user wants to have sorted flags in + // help/usage messages. + SortFlags bool + name string parsed bool actual map[NormalizedName]*Flag + orderedActual []*Flag + sortedActual []*Flag formal map[NormalizedName]*Flag + orderedFormal []*Flag + sortedFormal []*Flag shorthands map[byte]*Flag args []string // arguments after flags argsLenAtDash int // len(args) when a '--' was located when parsing, or -1 if no -- - exitOnError bool // does the program exit if there's an error? errorHandling ErrorHandling output io.Writer // nil means stderr; use out() accessor interspersed bool // allow interspersed option/non-option args @@ -156,7 +163,7 @@ type Flag struct { Value Value // value as set DefValue string // default value (as text); for usage message Changed bool // If the user set the value (or if left to default) - NoOptDefVal string //default value (as text); if the flag is on the command line without any options + NoOptDefVal string // default value (as text); if the flag is on the command line without any options Deprecated string // If this flag is deprecated, this string is the new or now thing to use Hidden bool // used by cobra.Command to allow flags to be hidden from help/usage text ShorthandDeprecated string // If the shorthand of this flag is deprecated, this string is the new or now thing to use @@ -194,11 +201,13 @@ func sortFlags(flags map[NormalizedName]*Flag) []*Flag { // "--getUrl" which may also be translated to "geturl" and everything will work. func (f *FlagSet) SetNormalizeFunc(n func(f *FlagSet, name string) NormalizedName) { f.normalizeNameFunc = n - for k, v := range f.formal { - delete(f.formal, k) - nname := f.normalizeFlagName(string(k)) - f.formal[nname] = v + f.sortedFormal = f.sortedFormal[:0] + for k, v := range f.orderedFormal { + delete(f.formal, NormalizedName(v.Name)) + nname := f.normalizeFlagName(v.Name) v.Name = string(nname) + f.formal[nname] = v + f.orderedFormal[k] = v } } @@ -229,10 +238,25 @@ func (f *FlagSet) SetOutput(output io.Writer) { f.output = output } -// VisitAll visits the flags in lexicographical order, calling fn for each. +// VisitAll visits the flags in lexicographical order or +// in primordial order if f.SortFlags is false, calling fn for each. // It visits all flags, even those not set. func (f *FlagSet) VisitAll(fn func(*Flag)) { - for _, flag := range sortFlags(f.formal) { + if len(f.formal) == 0 { + return + } + + var flags []*Flag + if f.SortFlags { + if len(f.formal) != len(f.sortedFormal) { + f.sortedFormal = sortFlags(f.formal) + } + flags = f.sortedFormal + } else { + flags = f.orderedFormal + } + + for _, flag := range flags { fn(flag) } } @@ -253,22 +277,39 @@ func (f *FlagSet) HasAvailableFlags() bool { return false } -// VisitAll visits the command-line flags in lexicographical order, calling -// fn for each. It visits all flags, even those not set. +// VisitAll visits the command-line flags in lexicographical order or +// in primordial order if f.SortFlags is false, calling fn for each. +// It visits all flags, even those not set. func VisitAll(fn func(*Flag)) { CommandLine.VisitAll(fn) } -// Visit visits the flags in lexicographical order, calling fn for each. +// Visit visits the flags in lexicographical order or +// in primordial order if f.SortFlags is false, calling fn for each. // It visits only those flags that have been set. func (f *FlagSet) Visit(fn func(*Flag)) { - for _, flag := range sortFlags(f.actual) { + if len(f.actual) == 0 { + return + } + + var flags []*Flag + if f.SortFlags { + if len(f.actual) != len(f.sortedActual) { + f.sortedActual = sortFlags(f.actual) + } + flags = f.sortedActual + } else { + flags = f.orderedActual + } + + for _, flag := range flags { fn(flag) } } -// Visit visits the command-line flags in lexicographical order, calling fn -// for each. It visits only those flags that have been set. +// Visit visits the command-line flags in lexicographical order or +// in primordial order if f.SortFlags is false, calling fn for each. +// It visits only those flags that have been set. func Visit(fn func(*Flag)) { CommandLine.Visit(fn) } @@ -278,6 +319,22 @@ func (f *FlagSet) Lookup(name string) *Flag { return f.lookup(f.normalizeFlagName(name)) } +// ShorthandLookup returns the Flag structure of the short handed flag, +// returning nil if none exists. +// It panics, if len(name) > 1. +func (f *FlagSet) ShorthandLookup(name string) *Flag { + if name == "" { + return nil + } + if len(name) > 1 { + msg := fmt.Sprintf("can not look up shorthand which is more than one ASCII character: %q", name) + fmt.Fprintf(f.out(), msg) + panic(msg) + } + c := name[0] + return f.shorthands[c] +} + // lookup returns the Flag structure of the named flag, returning nil if none exists. func (f *FlagSet) lookup(name NormalizedName) *Flag { return f.formal[name] @@ -319,7 +376,7 @@ func (f *FlagSet) MarkDeprecated(name string, usageMessage string) error { if flag == nil { return fmt.Errorf("flag %q does not exist", name) } - if len(usageMessage) == 0 { + if usageMessage == "" { return fmt.Errorf("deprecated message for flag %q must be set", name) } flag.Deprecated = usageMessage @@ -334,7 +391,7 @@ func (f *FlagSet) MarkShorthandDeprecated(name string, usageMessage string) erro if flag == nil { return fmt.Errorf("flag %q does not exist", name) } - if len(usageMessage) == 0 { + if usageMessage == "" { return fmt.Errorf("deprecated message for flag %q must be set", name) } flag.ShorthandDeprecated = usageMessage @@ -358,6 +415,12 @@ func Lookup(name string) *Flag { return CommandLine.Lookup(name) } +// ShorthandLookup returns the Flag structure of the short handed flag, +// returning nil if none exists. +func ShorthandLookup(name string) *Flag { + return CommandLine.ShorthandLookup(name) +} + // Set sets the value of the named flag. func (f *FlagSet) Set(name, value string) error { normalName := f.normalizeFlagName(name) @@ -365,17 +428,28 @@ func (f *FlagSet) Set(name, value string) error { if !ok { return fmt.Errorf("no such flag -%v", name) } + err := flag.Value.Set(value) if err != nil { - return err + var flagName string + if flag.Shorthand != "" && flag.ShorthandDeprecated == "" { + flagName = fmt.Sprintf("-%s, --%s", flag.Shorthand, flag.Name) + } else { + flagName = fmt.Sprintf("--%s", flag.Name) + } + return fmt.Errorf("invalid argument %q for %q flag: %v", value, flagName, err) } + if f.actual == nil { f.actual = make(map[NormalizedName]*Flag) } f.actual[normalName] = flag + f.orderedActual = append(f.orderedActual, flag) + flag.Changed = true - if len(flag.Deprecated) > 0 { - fmt.Fprintf(os.Stderr, "Flag --%s has been deprecated, %s\n", flag.Name, flag.Deprecated) + + if flag.Deprecated != "" { + fmt.Fprintf(f.out(), "Flag --%s has been deprecated, %s\n", flag.Name, flag.Deprecated) } return nil } @@ -557,28 +631,28 @@ func wrap(i, w int, s string) string { // for all flags in the FlagSet. Wrapped to `cols` columns (0 for no // wrapping) func (f *FlagSet) FlagUsagesWrapped(cols int) string { - x := new(bytes.Buffer) + buf := new(bytes.Buffer) lines := make([]string, 0, len(f.formal)) maxlen := 0 f.VisitAll(func(flag *Flag) { - if len(flag.Deprecated) > 0 || flag.Hidden { + if flag.Deprecated != "" || flag.Hidden { return } line := "" - if len(flag.Shorthand) > 0 && len(flag.ShorthandDeprecated) == 0 { + if flag.Shorthand != "" && flag.ShorthandDeprecated == "" { line = fmt.Sprintf(" -%s, --%s", flag.Shorthand, flag.Name) } else { line = fmt.Sprintf(" --%s", flag.Name) } varname, usage := UnquoteUsage(flag) - if len(varname) > 0 { + if varname != "" { line += " " + varname } - if len(flag.NoOptDefVal) > 0 { + if flag.NoOptDefVal != "" { switch flag.Value.Type() { case "string": line += fmt.Sprintf("[=\"%s\"]", flag.NoOptDefVal) @@ -601,7 +675,7 @@ func (f *FlagSet) FlagUsagesWrapped(cols int) string { line += usage if !flag.defaultIsZeroValue() { if flag.Value.Type() == "string" { - line += fmt.Sprintf(" (default \"%s\")", flag.DefValue) + line += fmt.Sprintf(" (default %q)", flag.DefValue) } else { line += fmt.Sprintf(" (default %s)", flag.DefValue) } @@ -614,10 +688,10 @@ func (f *FlagSet) FlagUsagesWrapped(cols int) string { sidx := strings.Index(line, "\x00") spacing := strings.Repeat(" ", maxlen-sidx) // maxlen + 2 comes from + 1 for the \x00 and + 1 for the (deliberate) off-by-one in maxlen-sidx - fmt.Fprintln(x, line[:sidx], spacing, wrap(maxlen+2, cols, line[sidx+1:])) + fmt.Fprintln(buf, line[:sidx], spacing, wrap(maxlen+2, cols, line[sidx+1:])) } - return x.String() + return buf.String() } // FlagUsages returns a string containing the usage information for all flags in @@ -714,11 +788,10 @@ func (f *FlagSet) VarP(value Value, name, shorthand, usage string) { // AddFlag will add the flag to the FlagSet func (f *FlagSet) AddFlag(flag *Flag) { - // Call normalizeFlagName function only once normalizedFlagName := f.normalizeFlagName(flag.Name) - _, alreadythere := f.formal[normalizedFlagName] - if alreadythere { + _, alreadyThere := f.formal[normalizedFlagName] + if alreadyThere { msg := fmt.Sprintf("%s flag redefined: %s", f.name, flag.Name) fmt.Fprintln(f.out(), msg) panic(msg) // Happens only if flags are declared with identical names @@ -729,28 +802,31 @@ func (f *FlagSet) AddFlag(flag *Flag) { flag.Name = string(normalizedFlagName) f.formal[normalizedFlagName] = flag + f.orderedFormal = append(f.orderedFormal, flag) - if len(flag.Shorthand) == 0 { + if flag.Shorthand == "" { return } if len(flag.Shorthand) > 1 { - fmt.Fprintf(f.out(), "%s shorthand more than ASCII character: %s\n", f.name, flag.Shorthand) - panic("shorthand is more than one character") + msg := fmt.Sprintf("%q shorthand is more than one ASCII character", flag.Shorthand) + fmt.Fprintf(f.out(), msg) + panic(msg) } if f.shorthands == nil { f.shorthands = make(map[byte]*Flag) } c := flag.Shorthand[0] - old, alreadythere := f.shorthands[c] - if alreadythere { - fmt.Fprintf(f.out(), "%s shorthand reused: %q for %s already used for %s\n", f.name, c, flag.Name, old.Name) - panic("shorthand redefinition") + used, alreadyThere := f.shorthands[c] + if alreadyThere { + msg := fmt.Sprintf("unable to redefine %q shorthand in %q flagset: it's already used for %q flag", c, f.name, used.Name) + fmt.Fprintf(f.out(), msg) + panic(msg) } f.shorthands[c] = flag } // AddFlagSet adds one FlagSet to another. If a flag is already present in f -// the flag from newSet will be ignored +// the flag from newSet will be ignored. func (f *FlagSet) AddFlagSet(newSet *FlagSet) { if newSet == nil { return @@ -798,34 +874,6 @@ func (f *FlagSet) usage() { } } -func (f *FlagSet) setFlag(flag *Flag, value string, origArg string) error { - if err := flag.Value.Set(value); err != nil { - return f.failf("invalid argument %q for %s: %v", value, origArg, err) - } - // mark as visited for Visit() - if f.actual == nil { - f.actual = make(map[NormalizedName]*Flag) - } - f.actual[f.normalizeFlagName(flag.Name)] = flag - flag.Changed = true - if len(flag.Deprecated) > 0 { - fmt.Fprintf(os.Stderr, "Flag --%s has been deprecated, %s\n", flag.Name, flag.Deprecated) - } - if len(flag.ShorthandDeprecated) > 0 && containsShorthand(origArg, flag.Shorthand) { - fmt.Fprintf(os.Stderr, "Flag shorthand -%s has been deprecated, %s\n", flag.Shorthand, flag.ShorthandDeprecated) - } - return nil -} - -func containsShorthand(arg, shorthand string) bool { - // filter out flags -- - if strings.HasPrefix(arg, "-") { - return false - } - arg = strings.SplitN(arg, "=", 2)[0] - return strings.Contains(arg, shorthand) -} - func (f *FlagSet) parseLongArg(s string, args []string, fn parseFunc) (a []string, err error) { a = args name := s[2:] @@ -833,10 +881,11 @@ func (f *FlagSet) parseLongArg(s string, args []string, fn parseFunc) (a []strin err = f.failf("bad flag syntax: %s", s) return } + split := strings.SplitN(name, "=", 2) name = split[0] - flag, alreadythere := f.formal[f.normalizeFlagName(name)] - if !alreadythere { + flag, exists := f.formal[f.normalizeFlagName(name)] + if !exists { if name == "help" { // special case for nice help message. f.usage() return a, ErrHelp @@ -844,11 +893,12 @@ func (f *FlagSet) parseLongArg(s string, args []string, fn parseFunc) (a []strin err = f.failf("unknown flag: --%s", name) return } + var value string if len(split) == 2 { // '--flag=arg' value = split[1] - } else if len(flag.NoOptDefVal) > 0 { + } else if flag.NoOptDefVal != "" { // '--flag' (arg was optional) value = flag.NoOptDefVal } else if len(a) > 0 { @@ -860,7 +910,8 @@ func (f *FlagSet) parseLongArg(s string, args []string, fn parseFunc) (a []strin err = f.failf("flag needs an argument: %s", s) return } - err = fn(flag, value, s) + + err = fn(flag, value) return } @@ -868,38 +919,49 @@ func (f *FlagSet) parseSingleShortArg(shorthands string, args []string, fn parse if strings.HasPrefix(shorthands, "test.") { return } + outArgs = args outShorts = shorthands[1:] c := shorthands[0] - flag, alreadythere := f.shorthands[c] - if !alreadythere { + flag, exists := f.shorthands[c] + if !exists { if c == 'h' { // special case for nice help message. f.usage() err = ErrHelp return } - //TODO continue on error err = f.failf("unknown shorthand flag: %q in -%s", c, shorthands) return } + var value string if len(shorthands) > 2 && shorthands[1] == '=' { + // '-f=arg' value = shorthands[2:] outShorts = "" - } else if len(flag.NoOptDefVal) > 0 { + } else if flag.NoOptDefVal != "" { + // '-f' (arg was optional) value = flag.NoOptDefVal } else if len(shorthands) > 1 { + // '-farg' value = shorthands[1:] outShorts = "" } else if len(args) > 0 { + // '-f arg' value = args[0] outArgs = args[1:] } else { + // '-f' (arg was required) err = f.failf("flag needs an argument: %q in -%s", c, shorthands) return } - err = fn(flag, value, shorthands) + + if flag.ShorthandDeprecated != "" { + fmt.Fprintf(f.out(), "Flag shorthand -%s has been deprecated, %s\n", flag.Shorthand, flag.ShorthandDeprecated) + } + + err = fn(flag, value) return } @@ -907,6 +969,7 @@ func (f *FlagSet) parseShortArg(s string, args []string, fn parseFunc) (a []stri a = args shorthands := s[1:] + // "shorthands" can be a series of shorthand letters of flags (e.g. "-vvv"). for len(shorthands) > 0 { shorthands, a, err = f.parseSingleShortArg(shorthands, args, fn) if err != nil { @@ -954,13 +1017,18 @@ func (f *FlagSet) parseArgs(args []string, fn parseFunc) (err error) { // The return value will be ErrHelp if -help was set but not defined. func (f *FlagSet) Parse(arguments []string) error { f.parsed = true - f.args = make([]string, 0, len(arguments)) - assign := func(flag *Flag, value, origArg string) error { - return f.setFlag(flag, value, origArg) + if len(arguments) < 0 { + return nil } - err := f.parseArgs(arguments, assign) + f.args = make([]string, 0, len(arguments)) + + set := func(flag *Flag, value string) error { + return f.Set(flag.Name, value) + } + + err := f.parseArgs(arguments, set) if err != nil { switch f.errorHandling { case ContinueOnError: @@ -974,7 +1042,7 @@ func (f *FlagSet) Parse(arguments []string) error { return nil } -type parseFunc func(flag *Flag, value, origArg string) error +type parseFunc func(flag *Flag, value string) error // ParseAll parses flag definitions from the argument list, which should not // include the command name. The arguments for fn are flag and value. Must be @@ -985,11 +1053,7 @@ func (f *FlagSet) ParseAll(arguments []string, fn func(flag *Flag, value string) f.parsed = true f.args = make([]string, 0, len(arguments)) - assign := func(flag *Flag, value, origArg string) error { - return fn(flag, value) - } - - err := f.parseArgs(arguments, assign) + err := f.parseArgs(arguments, fn) if err != nil { switch f.errorHandling { case ContinueOnError: @@ -1036,14 +1100,15 @@ func Parsed() bool { // CommandLine is the default set of command-line flags, parsed from os.Args. var CommandLine = NewFlagSet(os.Args[0], ExitOnError) -// NewFlagSet returns a new, empty flag set with the specified name and -// error handling property. +// NewFlagSet returns a new, empty flag set with the specified name, +// error handling property and SortFlags set to true. func NewFlagSet(name string, errorHandling ErrorHandling) *FlagSet { f := &FlagSet{ name: name, errorHandling: errorHandling, argsLenAtDash: -1, interspersed: true, + SortFlags: true, } return f } diff --git a/vendor/github.com/spf13/pflag/flag_test.go b/vendor/github.com/spf13/pflag/flag_test.go new file mode 100644 index 000000000..c3def0fd4 --- /dev/null +++ b/vendor/github.com/spf13/pflag/flag_test.go @@ -0,0 +1,1085 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package pflag + +import ( + "bytes" + "fmt" + "io" + "io/ioutil" + "net" + "os" + "reflect" + "sort" + "strconv" + "strings" + "testing" + "time" +) + +var ( + testBool = Bool("test_bool", false, "bool value") + testInt = Int("test_int", 0, "int value") + testInt64 = Int64("test_int64", 0, "int64 value") + testUint = Uint("test_uint", 0, "uint value") + testUint64 = Uint64("test_uint64", 0, "uint64 value") + testString = String("test_string", "0", "string value") + testFloat = Float64("test_float64", 0, "float64 value") + testDuration = Duration("test_duration", 0, "time.Duration value") + testOptionalInt = Int("test_optional_int", 0, "optional int value") + normalizeFlagNameInvocations = 0 +) + +func boolString(s string) string { + if s == "0" { + return "false" + } + return "true" +} + +func TestEverything(t *testing.T) { + m := make(map[string]*Flag) + desired := "0" + visitor := func(f *Flag) { + if len(f.Name) > 5 && f.Name[0:5] == "test_" { + m[f.Name] = f + ok := false + switch { + case f.Value.String() == desired: + ok = true + case f.Name == "test_bool" && f.Value.String() == boolString(desired): + ok = true + case f.Name == "test_duration" && f.Value.String() == desired+"s": + ok = true + } + if !ok { + t.Error("Visit: bad value", f.Value.String(), "for", f.Name) + } + } + } + VisitAll(visitor) + if len(m) != 9 { + t.Error("VisitAll misses some flags") + for k, v := range m { + t.Log(k, *v) + } + } + m = make(map[string]*Flag) + Visit(visitor) + if len(m) != 0 { + t.Errorf("Visit sees unset flags") + for k, v := range m { + t.Log(k, *v) + } + } + // Now set all flags + Set("test_bool", "true") + Set("test_int", "1") + Set("test_int64", "1") + Set("test_uint", "1") + Set("test_uint64", "1") + Set("test_string", "1") + Set("test_float64", "1") + Set("test_duration", "1s") + Set("test_optional_int", "1") + desired = "1" + Visit(visitor) + if len(m) != 9 { + t.Error("Visit fails after set") + for k, v := range m { + t.Log(k, *v) + } + } + // Now test they're visited in sort order. + var flagNames []string + Visit(func(f *Flag) { flagNames = append(flagNames, f.Name) }) + if !sort.StringsAreSorted(flagNames) { + t.Errorf("flag names not sorted: %v", flagNames) + } +} + +func TestUsage(t *testing.T) { + called := false + ResetForTesting(func() { called = true }) + if GetCommandLine().Parse([]string{"--x"}) == nil { + t.Error("parse did not fail for unknown flag") + } + if !called { + t.Error("did not call Usage for unknown flag") + } +} + +func TestAddFlagSet(t *testing.T) { + oldSet := NewFlagSet("old", ContinueOnError) + newSet := NewFlagSet("new", ContinueOnError) + + oldSet.String("flag1", "flag1", "flag1") + oldSet.String("flag2", "flag2", "flag2") + + newSet.String("flag2", "flag2", "flag2") + newSet.String("flag3", "flag3", "flag3") + + oldSet.AddFlagSet(newSet) + + if len(oldSet.formal) != 3 { + t.Errorf("Unexpected result adding a FlagSet to a FlagSet %v", oldSet) + } +} + +func TestAnnotation(t *testing.T) { + f := NewFlagSet("shorthand", ContinueOnError) + + if err := f.SetAnnotation("missing-flag", "key", nil); err == nil { + t.Errorf("Expected error setting annotation on non-existent flag") + } + + f.StringP("stringa", "a", "", "string value") + if err := f.SetAnnotation("stringa", "key", nil); err != nil { + t.Errorf("Unexpected error setting new nil annotation: %v", err) + } + if annotation := f.Lookup("stringa").Annotations["key"]; annotation != nil { + t.Errorf("Unexpected annotation: %v", annotation) + } + + f.StringP("stringb", "b", "", "string2 value") + if err := f.SetAnnotation("stringb", "key", []string{"value1"}); err != nil { + t.Errorf("Unexpected error setting new annotation: %v", err) + } + if annotation := f.Lookup("stringb").Annotations["key"]; !reflect.DeepEqual(annotation, []string{"value1"}) { + t.Errorf("Unexpected annotation: %v", annotation) + } + + if err := f.SetAnnotation("stringb", "key", []string{"value2"}); err != nil { + t.Errorf("Unexpected error updating annotation: %v", err) + } + if annotation := f.Lookup("stringb").Annotations["key"]; !reflect.DeepEqual(annotation, []string{"value2"}) { + t.Errorf("Unexpected annotation: %v", annotation) + } +} + +func testParse(f *FlagSet, t *testing.T) { + if f.Parsed() { + t.Error("f.Parse() = true before Parse") + } + boolFlag := f.Bool("bool", false, "bool value") + bool2Flag := f.Bool("bool2", false, "bool2 value") + bool3Flag := f.Bool("bool3", false, "bool3 value") + intFlag := f.Int("int", 0, "int value") + int8Flag := f.Int8("int8", 0, "int value") + int32Flag := f.Int32("int32", 0, "int value") + int64Flag := f.Int64("int64", 0, "int64 value") + uintFlag := f.Uint("uint", 0, "uint value") + uint8Flag := f.Uint8("uint8", 0, "uint value") + uint16Flag := f.Uint16("uint16", 0, "uint value") + uint32Flag := f.Uint32("uint32", 0, "uint value") + uint64Flag := f.Uint64("uint64", 0, "uint64 value") + stringFlag := f.String("string", "0", "string value") + float32Flag := f.Float32("float32", 0, "float32 value") + float64Flag := f.Float64("float64", 0, "float64 value") + ipFlag := f.IP("ip", net.ParseIP("127.0.0.1"), "ip value") + maskFlag := f.IPMask("mask", ParseIPv4Mask("0.0.0.0"), "mask value") + durationFlag := f.Duration("duration", 5*time.Second, "time.Duration value") + optionalIntNoValueFlag := f.Int("optional-int-no-value", 0, "int value") + f.Lookup("optional-int-no-value").NoOptDefVal = "9" + optionalIntWithValueFlag := f.Int("optional-int-with-value", 0, "int value") + f.Lookup("optional-int-no-value").NoOptDefVal = "9" + extra := "one-extra-argument" + args := []string{ + "--bool", + "--bool2=true", + "--bool3=false", + "--int=22", + "--int8=-8", + "--int32=-32", + "--int64=0x23", + "--uint", "24", + "--uint8=8", + "--uint16=16", + "--uint32=32", + "--uint64=25", + "--string=hello", + "--float32=-172e12", + "--float64=2718e28", + "--ip=10.11.12.13", + "--mask=255.255.255.0", + "--duration=2m", + "--optional-int-no-value", + "--optional-int-with-value=42", + extra, + } + if err := f.Parse(args); err != nil { + t.Fatal(err) + } + if !f.Parsed() { + t.Error("f.Parse() = false after Parse") + } + if *boolFlag != true { + t.Error("bool flag should be true, is ", *boolFlag) + } + if v, err := f.GetBool("bool"); err != nil || v != *boolFlag { + t.Error("GetBool does not work.") + } + if *bool2Flag != true { + t.Error("bool2 flag should be true, is ", *bool2Flag) + } + if *bool3Flag != false { + t.Error("bool3 flag should be false, is ", *bool2Flag) + } + if *intFlag != 22 { + t.Error("int flag should be 22, is ", *intFlag) + } + if v, err := f.GetInt("int"); err != nil || v != *intFlag { + t.Error("GetInt does not work.") + } + if *int8Flag != -8 { + t.Error("int8 flag should be 0x23, is ", *int8Flag) + } + if v, err := f.GetInt8("int8"); err != nil || v != *int8Flag { + t.Error("GetInt8 does not work.") + } + if *int32Flag != -32 { + t.Error("int32 flag should be 0x23, is ", *int32Flag) + } + if v, err := f.GetInt32("int32"); err != nil || v != *int32Flag { + t.Error("GetInt32 does not work.") + } + if *int64Flag != 0x23 { + t.Error("int64 flag should be 0x23, is ", *int64Flag) + } + if v, err := f.GetInt64("int64"); err != nil || v != *int64Flag { + t.Error("GetInt64 does not work.") + } + if *uintFlag != 24 { + t.Error("uint flag should be 24, is ", *uintFlag) + } + if v, err := f.GetUint("uint"); err != nil || v != *uintFlag { + t.Error("GetUint does not work.") + } + if *uint8Flag != 8 { + t.Error("uint8 flag should be 8, is ", *uint8Flag) + } + if v, err := f.GetUint8("uint8"); err != nil || v != *uint8Flag { + t.Error("GetUint8 does not work.") + } + if *uint16Flag != 16 { + t.Error("uint16 flag should be 16, is ", *uint16Flag) + } + if v, err := f.GetUint16("uint16"); err != nil || v != *uint16Flag { + t.Error("GetUint16 does not work.") + } + if *uint32Flag != 32 { + t.Error("uint32 flag should be 32, is ", *uint32Flag) + } + if v, err := f.GetUint32("uint32"); err != nil || v != *uint32Flag { + t.Error("GetUint32 does not work.") + } + if *uint64Flag != 25 { + t.Error("uint64 flag should be 25, is ", *uint64Flag) + } + if v, err := f.GetUint64("uint64"); err != nil || v != *uint64Flag { + t.Error("GetUint64 does not work.") + } + if *stringFlag != "hello" { + t.Error("string flag should be `hello`, is ", *stringFlag) + } + if v, err := f.GetString("string"); err != nil || v != *stringFlag { + t.Error("GetString does not work.") + } + if *float32Flag != -172e12 { + t.Error("float32 flag should be -172e12, is ", *float32Flag) + } + if v, err := f.GetFloat32("float32"); err != nil || v != *float32Flag { + t.Errorf("GetFloat32 returned %v but float32Flag was %v", v, *float32Flag) + } + if *float64Flag != 2718e28 { + t.Error("float64 flag should be 2718e28, is ", *float64Flag) + } + if v, err := f.GetFloat64("float64"); err != nil || v != *float64Flag { + t.Errorf("GetFloat64 returned %v but float64Flag was %v", v, *float64Flag) + } + if !(*ipFlag).Equal(net.ParseIP("10.11.12.13")) { + t.Error("ip flag should be 10.11.12.13, is ", *ipFlag) + } + if v, err := f.GetIP("ip"); err != nil || !v.Equal(*ipFlag) { + t.Errorf("GetIP returned %v but ipFlag was %v", v, *ipFlag) + } + if (*maskFlag).String() != ParseIPv4Mask("255.255.255.0").String() { + t.Error("mask flag should be 255.255.255.0, is ", (*maskFlag).String()) + } + if v, err := f.GetIPv4Mask("mask"); err != nil || v.String() != (*maskFlag).String() { + t.Errorf("GetIP returned %v maskFlag was %v error was %v", v, *maskFlag, err) + } + if *durationFlag != 2*time.Minute { + t.Error("duration flag should be 2m, is ", *durationFlag) + } + if v, err := f.GetDuration("duration"); err != nil || v != *durationFlag { + t.Error("GetDuration does not work.") + } + if _, err := f.GetInt("duration"); err == nil { + t.Error("GetInt parsed a time.Duration?!?!") + } + if *optionalIntNoValueFlag != 9 { + t.Error("optional int flag should be the default value, is ", *optionalIntNoValueFlag) + } + if *optionalIntWithValueFlag != 42 { + t.Error("optional int flag should be 42, is ", *optionalIntWithValueFlag) + } + if len(f.Args()) != 1 { + t.Error("expected one argument, got", len(f.Args())) + } else if f.Args()[0] != extra { + t.Errorf("expected argument %q got %q", extra, f.Args()[0]) + } +} + +func testParseAll(f *FlagSet, t *testing.T) { + if f.Parsed() { + t.Error("f.Parse() = true before Parse") + } + f.BoolP("boola", "a", false, "bool value") + f.BoolP("boolb", "b", false, "bool2 value") + f.BoolP("boolc", "c", false, "bool3 value") + f.BoolP("boold", "d", false, "bool4 value") + f.StringP("stringa", "s", "0", "string value") + f.StringP("stringz", "z", "0", "string value") + f.StringP("stringx", "x", "0", "string value") + f.StringP("stringy", "y", "0", "string value") + f.Lookup("stringx").NoOptDefVal = "1" + args := []string{ + "-ab", + "-cs=xx", + "--stringz=something", + "-d=true", + "-x", + "-y", + "ee", + } + want := []string{ + "boola", "true", + "boolb", "true", + "boolc", "true", + "stringa", "xx", + "stringz", "something", + "boold", "true", + "stringx", "1", + "stringy", "ee", + } + got := []string{} + store := func(flag *Flag, value string) error { + got = append(got, flag.Name) + if len(value) > 0 { + got = append(got, value) + } + return nil + } + if err := f.ParseAll(args, store); err != nil { + t.Errorf("expected no error, got %s", err) + } + if !f.Parsed() { + t.Errorf("f.Parse() = false after Parse") + } + if !reflect.DeepEqual(got, want) { + t.Errorf("f.ParseAll() fail to restore the args") + t.Errorf("Got: %v", got) + t.Errorf("Want: %v", want) + } +} + +func TestShorthand(t *testing.T) { + f := NewFlagSet("shorthand", ContinueOnError) + if f.Parsed() { + t.Error("f.Parse() = true before Parse") + } + boolaFlag := f.BoolP("boola", "a", false, "bool value") + boolbFlag := f.BoolP("boolb", "b", false, "bool2 value") + boolcFlag := f.BoolP("boolc", "c", false, "bool3 value") + booldFlag := f.BoolP("boold", "d", false, "bool4 value") + stringaFlag := f.StringP("stringa", "s", "0", "string value") + stringzFlag := f.StringP("stringz", "z", "0", "string value") + extra := "interspersed-argument" + notaflag := "--i-look-like-a-flag" + args := []string{ + "-ab", + extra, + "-cs", + "hello", + "-z=something", + "-d=true", + "--", + notaflag, + } + f.SetOutput(ioutil.Discard) + if err := f.Parse(args); err != nil { + t.Error("expected no error, got ", err) + } + if !f.Parsed() { + t.Error("f.Parse() = false after Parse") + } + if *boolaFlag != true { + t.Error("boola flag should be true, is ", *boolaFlag) + } + if *boolbFlag != true { + t.Error("boolb flag should be true, is ", *boolbFlag) + } + if *boolcFlag != true { + t.Error("boolc flag should be true, is ", *boolcFlag) + } + if *booldFlag != true { + t.Error("boold flag should be true, is ", *booldFlag) + } + if *stringaFlag != "hello" { + t.Error("stringa flag should be `hello`, is ", *stringaFlag) + } + if *stringzFlag != "something" { + t.Error("stringz flag should be `something`, is ", *stringzFlag) + } + if len(f.Args()) != 2 { + t.Error("expected one argument, got", len(f.Args())) + } else if f.Args()[0] != extra { + t.Errorf("expected argument %q got %q", extra, f.Args()[0]) + } else if f.Args()[1] != notaflag { + t.Errorf("expected argument %q got %q", notaflag, f.Args()[1]) + } + if f.ArgsLenAtDash() != 1 { + t.Errorf("expected argsLenAtDash %d got %d", f.ArgsLenAtDash(), 1) + } +} + +func TestShorthandLookup(t *testing.T) { + f := NewFlagSet("shorthand", ContinueOnError) + if f.Parsed() { + t.Error("f.Parse() = true before Parse") + } + f.BoolP("boola", "a", false, "bool value") + f.BoolP("boolb", "b", false, "bool2 value") + args := []string{ + "-ab", + } + f.SetOutput(ioutil.Discard) + if err := f.Parse(args); err != nil { + t.Error("expected no error, got ", err) + } + if !f.Parsed() { + t.Error("f.Parse() = false after Parse") + } + flag := f.ShorthandLookup("a") + if flag == nil { + t.Errorf("f.ShorthandLookup(\"a\") returned nil") + } + if flag.Name != "boola" { + t.Errorf("f.ShorthandLookup(\"a\") found %q instead of \"boola\"", flag.Name) + } + flag = f.ShorthandLookup("") + if flag != nil { + t.Errorf("f.ShorthandLookup(\"\") did not return nil") + } + defer func() { + recover() + }() + flag = f.ShorthandLookup("ab") + // should NEVER get here. lookup should panic. defer'd func should recover it. + t.Errorf("f.ShorthandLookup(\"ab\") did not panic") +} + +func TestParse(t *testing.T) { + ResetForTesting(func() { t.Error("bad parse") }) + testParse(GetCommandLine(), t) +} + +func TestParseAll(t *testing.T) { + ResetForTesting(func() { t.Error("bad parse") }) + testParseAll(GetCommandLine(), t) +} + +func TestFlagSetParse(t *testing.T) { + testParse(NewFlagSet("test", ContinueOnError), t) +} + +func TestChangedHelper(t *testing.T) { + f := NewFlagSet("changedtest", ContinueOnError) + f.Bool("changed", false, "changed bool") + f.Bool("settrue", true, "true to true") + f.Bool("setfalse", false, "false to false") + f.Bool("unchanged", false, "unchanged bool") + + args := []string{"--changed", "--settrue", "--setfalse=false"} + if err := f.Parse(args); err != nil { + t.Error("f.Parse() = false after Parse") + } + if !f.Changed("changed") { + t.Errorf("--changed wasn't changed!") + } + if !f.Changed("settrue") { + t.Errorf("--settrue wasn't changed!") + } + if !f.Changed("setfalse") { + t.Errorf("--setfalse wasn't changed!") + } + if f.Changed("unchanged") { + t.Errorf("--unchanged was changed!") + } + if f.Changed("invalid") { + t.Errorf("--invalid was changed!") + } + if f.ArgsLenAtDash() != -1 { + t.Errorf("Expected argsLenAtDash: %d but got %d", -1, f.ArgsLenAtDash()) + } +} + +func replaceSeparators(name string, from []string, to string) string { + result := name + for _, sep := range from { + result = strings.Replace(result, sep, to, -1) + } + // Type convert to indicate normalization has been done. + return result +} + +func wordSepNormalizeFunc(f *FlagSet, name string) NormalizedName { + seps := []string{"-", "_"} + name = replaceSeparators(name, seps, ".") + normalizeFlagNameInvocations++ + + return NormalizedName(name) +} + +func testWordSepNormalizedNames(args []string, t *testing.T) { + f := NewFlagSet("normalized", ContinueOnError) + if f.Parsed() { + t.Error("f.Parse() = true before Parse") + } + withDashFlag := f.Bool("with-dash-flag", false, "bool value") + // Set this after some flags have been added and before others. + f.SetNormalizeFunc(wordSepNormalizeFunc) + withUnderFlag := f.Bool("with_under_flag", false, "bool value") + withBothFlag := f.Bool("with-both_flag", false, "bool value") + if err := f.Parse(args); err != nil { + t.Fatal(err) + } + if !f.Parsed() { + t.Error("f.Parse() = false after Parse") + } + if *withDashFlag != true { + t.Error("withDashFlag flag should be true, is ", *withDashFlag) + } + if *withUnderFlag != true { + t.Error("withUnderFlag flag should be true, is ", *withUnderFlag) + } + if *withBothFlag != true { + t.Error("withBothFlag flag should be true, is ", *withBothFlag) + } +} + +func TestWordSepNormalizedNames(t *testing.T) { + args := []string{ + "--with-dash-flag", + "--with-under-flag", + "--with-both-flag", + } + testWordSepNormalizedNames(args, t) + + args = []string{ + "--with_dash_flag", + "--with_under_flag", + "--with_both_flag", + } + testWordSepNormalizedNames(args, t) + + args = []string{ + "--with-dash_flag", + "--with-under_flag", + "--with-both_flag", + } + testWordSepNormalizedNames(args, t) +} + +func aliasAndWordSepFlagNames(f *FlagSet, name string) NormalizedName { + seps := []string{"-", "_"} + + oldName := replaceSeparators("old-valid_flag", seps, ".") + newName := replaceSeparators("valid-flag", seps, ".") + + name = replaceSeparators(name, seps, ".") + switch name { + case oldName: + name = newName + break + } + + return NormalizedName(name) +} + +func TestCustomNormalizedNames(t *testing.T) { + f := NewFlagSet("normalized", ContinueOnError) + if f.Parsed() { + t.Error("f.Parse() = true before Parse") + } + + validFlag := f.Bool("valid-flag", false, "bool value") + f.SetNormalizeFunc(aliasAndWordSepFlagNames) + someOtherFlag := f.Bool("some-other-flag", false, "bool value") + + args := []string{"--old_valid_flag", "--some-other_flag"} + if err := f.Parse(args); err != nil { + t.Fatal(err) + } + + if *validFlag != true { + t.Errorf("validFlag is %v even though we set the alias --old_valid_falg", *validFlag) + } + if *someOtherFlag != true { + t.Error("someOtherFlag should be true, is ", *someOtherFlag) + } +} + +// Every flag we add, the name (displayed also in usage) should normalized +func TestNormalizationFuncShouldChangeFlagName(t *testing.T) { + // Test normalization after addition + f := NewFlagSet("normalized", ContinueOnError) + + f.Bool("valid_flag", false, "bool value") + if f.Lookup("valid_flag").Name != "valid_flag" { + t.Error("The new flag should have the name 'valid_flag' instead of ", f.Lookup("valid_flag").Name) + } + + f.SetNormalizeFunc(wordSepNormalizeFunc) + if f.Lookup("valid_flag").Name != "valid.flag" { + t.Error("The new flag should have the name 'valid.flag' instead of ", f.Lookup("valid_flag").Name) + } + + // Test normalization before addition + f = NewFlagSet("normalized", ContinueOnError) + f.SetNormalizeFunc(wordSepNormalizeFunc) + + f.Bool("valid_flag", false, "bool value") + if f.Lookup("valid_flag").Name != "valid.flag" { + t.Error("The new flag should have the name 'valid.flag' instead of ", f.Lookup("valid_flag").Name) + } +} + +// Declare a user-defined flag type. +type flagVar []string + +func (f *flagVar) String() string { + return fmt.Sprint([]string(*f)) +} + +func (f *flagVar) Set(value string) error { + *f = append(*f, value) + return nil +} + +func (f *flagVar) Type() string { + return "flagVar" +} + +func TestUserDefined(t *testing.T) { + var flags FlagSet + flags.Init("test", ContinueOnError) + var v flagVar + flags.VarP(&v, "v", "v", "usage") + if err := flags.Parse([]string{"--v=1", "-v2", "-v", "3"}); err != nil { + t.Error(err) + } + if len(v) != 3 { + t.Fatal("expected 3 args; got ", len(v)) + } + expect := "[1 2 3]" + if v.String() != expect { + t.Errorf("expected value %q got %q", expect, v.String()) + } +} + +func TestSetOutput(t *testing.T) { + var flags FlagSet + var buf bytes.Buffer + flags.SetOutput(&buf) + flags.Init("test", ContinueOnError) + flags.Parse([]string{"--unknown"}) + if out := buf.String(); !strings.Contains(out, "--unknown") { + t.Logf("expected output mentioning unknown; got %q", out) + } +} + +// This tests that one can reset the flags. This still works but not well, and is +// superseded by FlagSet. +func TestChangingArgs(t *testing.T) { + ResetForTesting(func() { t.Fatal("bad parse") }) + oldArgs := os.Args + defer func() { os.Args = oldArgs }() + os.Args = []string{"cmd", "--before", "subcmd"} + before := Bool("before", false, "") + if err := GetCommandLine().Parse(os.Args[1:]); err != nil { + t.Fatal(err) + } + cmd := Arg(0) + os.Args = []string{"subcmd", "--after", "args"} + after := Bool("after", false, "") + Parse() + args := Args() + + if !*before || cmd != "subcmd" || !*after || len(args) != 1 || args[0] != "args" { + t.Fatalf("expected true subcmd true [args] got %v %v %v %v", *before, cmd, *after, args) + } +} + +// Test that -help invokes the usage message and returns ErrHelp. +func TestHelp(t *testing.T) { + var helpCalled = false + fs := NewFlagSet("help test", ContinueOnError) + fs.Usage = func() { helpCalled = true } + var flag bool + fs.BoolVar(&flag, "flag", false, "regular flag") + // Regular flag invocation should work + err := fs.Parse([]string{"--flag=true"}) + if err != nil { + t.Fatal("expected no error; got ", err) + } + if !flag { + t.Error("flag was not set by --flag") + } + if helpCalled { + t.Error("help called for regular flag") + helpCalled = false // reset for next test + } + // Help flag should work as expected. + err = fs.Parse([]string{"--help"}) + if err == nil { + t.Fatal("error expected") + } + if err != ErrHelp { + t.Fatal("expected ErrHelp; got ", err) + } + if !helpCalled { + t.Fatal("help was not called") + } + // If we define a help flag, that should override. + var help bool + fs.BoolVar(&help, "help", false, "help flag") + helpCalled = false + err = fs.Parse([]string{"--help"}) + if err != nil { + t.Fatal("expected no error for defined --help; got ", err) + } + if helpCalled { + t.Fatal("help was called; should not have been for defined help flag") + } +} + +func TestNoInterspersed(t *testing.T) { + f := NewFlagSet("test", ContinueOnError) + f.SetInterspersed(false) + f.Bool("true", true, "always true") + f.Bool("false", false, "always false") + err := f.Parse([]string{"--true", "break", "--false"}) + if err != nil { + t.Fatal("expected no error; got ", err) + } + args := f.Args() + if len(args) != 2 || args[0] != "break" || args[1] != "--false" { + t.Fatal("expected interspersed options/non-options to fail") + } +} + +func TestTermination(t *testing.T) { + f := NewFlagSet("termination", ContinueOnError) + boolFlag := f.BoolP("bool", "l", false, "bool value") + if f.Parsed() { + t.Error("f.Parse() = true before Parse") + } + arg1 := "ls" + arg2 := "-l" + args := []string{ + "--", + arg1, + arg2, + } + f.SetOutput(ioutil.Discard) + if err := f.Parse(args); err != nil { + t.Fatal("expected no error; got ", err) + } + if !f.Parsed() { + t.Error("f.Parse() = false after Parse") + } + if *boolFlag { + t.Error("expected boolFlag=false, got true") + } + if len(f.Args()) != 2 { + t.Errorf("expected 2 arguments, got %d: %v", len(f.Args()), f.Args()) + } + if f.Args()[0] != arg1 { + t.Errorf("expected argument %q got %q", arg1, f.Args()[0]) + } + if f.Args()[1] != arg2 { + t.Errorf("expected argument %q got %q", arg2, f.Args()[1]) + } + if f.ArgsLenAtDash() != 0 { + t.Errorf("expected argsLenAtDash %d got %d", 0, f.ArgsLenAtDash()) + } +} + +func TestDeprecatedFlagInDocs(t *testing.T) { + f := NewFlagSet("bob", ContinueOnError) + f.Bool("badflag", true, "always true") + f.MarkDeprecated("badflag", "use --good-flag instead") + + out := new(bytes.Buffer) + f.SetOutput(out) + f.PrintDefaults() + + if strings.Contains(out.String(), "badflag") { + t.Errorf("found deprecated flag in usage!") + } +} + +func TestDeprecatedFlagShorthandInDocs(t *testing.T) { + f := NewFlagSet("bob", ContinueOnError) + name := "noshorthandflag" + f.BoolP(name, "n", true, "always true") + f.MarkShorthandDeprecated("noshorthandflag", fmt.Sprintf("use --%s instead", name)) + + out := new(bytes.Buffer) + f.SetOutput(out) + f.PrintDefaults() + + if strings.Contains(out.String(), "-n,") { + t.Errorf("found deprecated flag shorthand in usage!") + } +} + +func parseReturnStderr(t *testing.T, f *FlagSet, args []string) (string, error) { + oldStderr := os.Stderr + r, w, _ := os.Pipe() + os.Stderr = w + + err := f.Parse(args) + + outC := make(chan string) + // copy the output in a separate goroutine so printing can't block indefinitely + go func() { + var buf bytes.Buffer + io.Copy(&buf, r) + outC <- buf.String() + }() + + w.Close() + os.Stderr = oldStderr + out := <-outC + + return out, err +} + +func TestDeprecatedFlagUsage(t *testing.T) { + f := NewFlagSet("bob", ContinueOnError) + f.Bool("badflag", true, "always true") + usageMsg := "use --good-flag instead" + f.MarkDeprecated("badflag", usageMsg) + + args := []string{"--badflag"} + out, err := parseReturnStderr(t, f, args) + if err != nil { + t.Fatal("expected no error; got ", err) + } + + if !strings.Contains(out, usageMsg) { + t.Errorf("usageMsg not printed when using a deprecated flag!") + } +} + +func TestDeprecatedFlagShorthandUsage(t *testing.T) { + f := NewFlagSet("bob", ContinueOnError) + name := "noshorthandflag" + f.BoolP(name, "n", true, "always true") + usageMsg := fmt.Sprintf("use --%s instead", name) + f.MarkShorthandDeprecated(name, usageMsg) + + args := []string{"-n"} + out, err := parseReturnStderr(t, f, args) + if err != nil { + t.Fatal("expected no error; got ", err) + } + + if !strings.Contains(out, usageMsg) { + t.Errorf("usageMsg not printed when using a deprecated flag!") + } +} + +func TestDeprecatedFlagUsageNormalized(t *testing.T) { + f := NewFlagSet("bob", ContinueOnError) + f.Bool("bad-double_flag", true, "always true") + f.SetNormalizeFunc(wordSepNormalizeFunc) + usageMsg := "use --good-flag instead" + f.MarkDeprecated("bad_double-flag", usageMsg) + + args := []string{"--bad_double_flag"} + out, err := parseReturnStderr(t, f, args) + if err != nil { + t.Fatal("expected no error; got ", err) + } + + if !strings.Contains(out, usageMsg) { + t.Errorf("usageMsg not printed when using a deprecated flag!") + } +} + +// Name normalization function should be called only once on flag addition +func TestMultipleNormalizeFlagNameInvocations(t *testing.T) { + normalizeFlagNameInvocations = 0 + + f := NewFlagSet("normalized", ContinueOnError) + f.SetNormalizeFunc(wordSepNormalizeFunc) + f.Bool("with_under_flag", false, "bool value") + + if normalizeFlagNameInvocations != 1 { + t.Fatal("Expected normalizeFlagNameInvocations to be 1; got ", normalizeFlagNameInvocations) + } +} + +// +func TestHiddenFlagInUsage(t *testing.T) { + f := NewFlagSet("bob", ContinueOnError) + f.Bool("secretFlag", true, "shhh") + f.MarkHidden("secretFlag") + + out := new(bytes.Buffer) + f.SetOutput(out) + f.PrintDefaults() + + if strings.Contains(out.String(), "secretFlag") { + t.Errorf("found hidden flag in usage!") + } +} + +// +func TestHiddenFlagUsage(t *testing.T) { + f := NewFlagSet("bob", ContinueOnError) + f.Bool("secretFlag", true, "shhh") + f.MarkHidden("secretFlag") + + args := []string{"--secretFlag"} + out, err := parseReturnStderr(t, f, args) + if err != nil { + t.Fatal("expected no error; got ", err) + } + + if strings.Contains(out, "shhh") { + t.Errorf("usage message printed when using a hidden flag!") + } +} + +const defaultOutput = ` --A for bootstrapping, allow 'any' type + --Alongflagname disable bounds checking + -C, --CCC a boolean defaulting to true (default true) + --D path set relative path for local imports + -E, --EEE num[=1234] a num with NoOptDefVal (default 4321) + --F number a non-zero number (default 2.7) + --G float a float that defaults to zero + --IP ip IP address with no default + --IPMask ipMask Netmask address with no default + --IPNet ipNet IP network with no default + --Ints intSlice int slice with zero default + --N int a non-zero int (default 27) + --ND1 string[="bar"] a string with NoOptDefVal (default "foo") + --ND2 num[=4321] a num with NoOptDefVal (default 1234) + --StringArray stringArray string array with zero default + --StringSlice stringSlice string slice with zero default + --Z int an int that defaults to zero + --custom custom custom Value implementation + --customP custom a VarP with default (default 10) + --maxT timeout set timeout for dial +` + +// Custom value that satisfies the Value interface. +type customValue int + +func (cv *customValue) String() string { return fmt.Sprintf("%v", *cv) } + +func (cv *customValue) Set(s string) error { + v, err := strconv.ParseInt(s, 0, 64) + *cv = customValue(v) + return err +} + +func (cv *customValue) Type() string { return "custom" } + +func TestPrintDefaults(t *testing.T) { + fs := NewFlagSet("print defaults test", ContinueOnError) + var buf bytes.Buffer + fs.SetOutput(&buf) + fs.Bool("A", false, "for bootstrapping, allow 'any' type") + fs.Bool("Alongflagname", false, "disable bounds checking") + fs.BoolP("CCC", "C", true, "a boolean defaulting to true") + fs.String("D", "", "set relative `path` for local imports") + fs.Float64("F", 2.7, "a non-zero `number`") + fs.Float64("G", 0, "a float that defaults to zero") + fs.Int("N", 27, "a non-zero int") + fs.IntSlice("Ints", []int{}, "int slice with zero default") + fs.IP("IP", nil, "IP address with no default") + fs.IPMask("IPMask", nil, "Netmask address with no default") + fs.IPNet("IPNet", net.IPNet{}, "IP network with no default") + fs.Int("Z", 0, "an int that defaults to zero") + fs.Duration("maxT", 0, "set `timeout` for dial") + fs.String("ND1", "foo", "a string with NoOptDefVal") + fs.Lookup("ND1").NoOptDefVal = "bar" + fs.Int("ND2", 1234, "a `num` with NoOptDefVal") + fs.Lookup("ND2").NoOptDefVal = "4321" + fs.IntP("EEE", "E", 4321, "a `num` with NoOptDefVal") + fs.ShorthandLookup("E").NoOptDefVal = "1234" + fs.StringSlice("StringSlice", []string{}, "string slice with zero default") + fs.StringArray("StringArray", []string{}, "string array with zero default") + + var cv customValue + fs.Var(&cv, "custom", "custom Value implementation") + + cv2 := customValue(10) + fs.VarP(&cv2, "customP", "", "a VarP with default") + + fs.PrintDefaults() + got := buf.String() + if got != defaultOutput { + fmt.Println("\n" + got) + fmt.Println("\n" + defaultOutput) + t.Errorf("got %q want %q\n", got, defaultOutput) + } +} + +func TestVisitAllFlagOrder(t *testing.T) { + fs := NewFlagSet("TestVisitAllFlagOrder", ContinueOnError) + fs.SortFlags = false + // https://github.com/spf13/pflag/issues/120 + fs.SetNormalizeFunc(func(f *FlagSet, name string) NormalizedName { + return NormalizedName(name) + }) + + names := []string{"C", "B", "A", "D"} + for _, name := range names { + fs.Bool(name, false, "") + } + + i := 0 + fs.VisitAll(func(f *Flag) { + if names[i] != f.Name { + t.Errorf("Incorrect order. Expected %v, got %v", names[i], f.Name) + } + i++ + }) +} + +func TestVisitFlagOrder(t *testing.T) { + fs := NewFlagSet("TestVisitFlagOrder", ContinueOnError) + fs.SortFlags = false + names := []string{"C", "B", "A", "D"} + for _, name := range names { + fs.Bool(name, false, "") + fs.Set(name, "true") + } + + i := 0 + fs.Visit(func(f *Flag) { + if names[i] != f.Name { + t.Errorf("Incorrect order. Expected %v, got %v", names[i], f.Name) + } + i++ + }) +} diff --git a/vendor/github.com/spf13/pflag/golangflag_test.go b/vendor/github.com/spf13/pflag/golangflag_test.go new file mode 100644 index 000000000..77e2d7d80 --- /dev/null +++ b/vendor/github.com/spf13/pflag/golangflag_test.go @@ -0,0 +1,39 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package pflag + +import ( + goflag "flag" + "testing" +) + +func TestGoflags(t *testing.T) { + goflag.String("stringFlag", "stringFlag", "stringFlag") + goflag.Bool("boolFlag", false, "boolFlag") + + f := NewFlagSet("test", ContinueOnError) + + f.AddGoFlagSet(goflag.CommandLine) + err := f.Parse([]string{"--stringFlag=bob", "--boolFlag"}) + if err != nil { + t.Fatal("expected no error; get", err) + } + + getString, err := f.GetString("stringFlag") + if err != nil { + t.Fatal("expected no error; get", err) + } + if getString != "bob" { + t.Fatalf("expected getString=bob but got getString=%s", getString) + } + + getBool, err := f.GetBool("boolFlag") + if err != nil { + t.Fatal("expected no error; get", err) + } + if getBool != true { + t.Fatalf("expected getBool=true but got getBool=%v", getBool) + } +} diff --git a/vendor/github.com/spf13/pflag/int_slice_test.go b/vendor/github.com/spf13/pflag/int_slice_test.go new file mode 100644 index 000000000..745aecb95 --- /dev/null +++ b/vendor/github.com/spf13/pflag/int_slice_test.go @@ -0,0 +1,165 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package pflag + +import ( + "fmt" + "strconv" + "strings" + "testing" +) + +func setUpISFlagSet(isp *[]int) *FlagSet { + f := NewFlagSet("test", ContinueOnError) + f.IntSliceVar(isp, "is", []int{}, "Command separated list!") + return f +} + +func setUpISFlagSetWithDefault(isp *[]int) *FlagSet { + f := NewFlagSet("test", ContinueOnError) + f.IntSliceVar(isp, "is", []int{0, 1}, "Command separated list!") + return f +} + +func TestEmptyIS(t *testing.T) { + var is []int + f := setUpISFlagSet(&is) + err := f.Parse([]string{}) + if err != nil { + t.Fatal("expected no error; got", err) + } + + getIS, err := f.GetIntSlice("is") + if err != nil { + t.Fatal("got an error from GetIntSlice():", err) + } + if len(getIS) != 0 { + t.Fatalf("got is %v with len=%d but expected length=0", getIS, len(getIS)) + } +} + +func TestIS(t *testing.T) { + var is []int + f := setUpISFlagSet(&is) + + vals := []string{"1", "2", "4", "3"} + arg := fmt.Sprintf("--is=%s", strings.Join(vals, ",")) + err := f.Parse([]string{arg}) + if err != nil { + t.Fatal("expected no error; got", err) + } + for i, v := range is { + d, err := strconv.Atoi(vals[i]) + if err != nil { + t.Fatalf("got error: %v", err) + } + if d != v { + t.Fatalf("expected is[%d] to be %s but got: %d", i, vals[i], v) + } + } + getIS, err := f.GetIntSlice("is") + if err != nil { + t.Fatalf("got error: %v", err) + } + for i, v := range getIS { + d, err := strconv.Atoi(vals[i]) + if err != nil { + t.Fatalf("got error: %v", err) + } + if d != v { + t.Fatalf("expected is[%d] to be %s but got: %d from GetIntSlice", i, vals[i], v) + } + } +} + +func TestISDefault(t *testing.T) { + var is []int + f := setUpISFlagSetWithDefault(&is) + + vals := []string{"0", "1"} + + err := f.Parse([]string{}) + if err != nil { + t.Fatal("expected no error; got", err) + } + for i, v := range is { + d, err := strconv.Atoi(vals[i]) + if err != nil { + t.Fatalf("got error: %v", err) + } + if d != v { + t.Fatalf("expected is[%d] to be %d but got: %d", i, d, v) + } + } + + getIS, err := f.GetIntSlice("is") + if err != nil { + t.Fatal("got an error from GetIntSlice():", err) + } + for i, v := range getIS { + d, err := strconv.Atoi(vals[i]) + if err != nil { + t.Fatal("got an error from GetIntSlice():", err) + } + if d != v { + t.Fatalf("expected is[%d] to be %d from GetIntSlice but got: %d", i, d, v) + } + } +} + +func TestISWithDefault(t *testing.T) { + var is []int + f := setUpISFlagSetWithDefault(&is) + + vals := []string{"1", "2"} + arg := fmt.Sprintf("--is=%s", strings.Join(vals, ",")) + err := f.Parse([]string{arg}) + if err != nil { + t.Fatal("expected no error; got", err) + } + for i, v := range is { + d, err := strconv.Atoi(vals[i]) + if err != nil { + t.Fatalf("got error: %v", err) + } + if d != v { + t.Fatalf("expected is[%d] to be %d but got: %d", i, d, v) + } + } + + getIS, err := f.GetIntSlice("is") + if err != nil { + t.Fatal("got an error from GetIntSlice():", err) + } + for i, v := range getIS { + d, err := strconv.Atoi(vals[i]) + if err != nil { + t.Fatalf("got error: %v", err) + } + if d != v { + t.Fatalf("expected is[%d] to be %d from GetIntSlice but got: %d", i, d, v) + } + } +} + +func TestISCalledTwice(t *testing.T) { + var is []int + f := setUpISFlagSet(&is) + + in := []string{"1,2", "3"} + expected := []int{1, 2, 3} + argfmt := "--is=%s" + arg1 := fmt.Sprintf(argfmt, in[0]) + arg2 := fmt.Sprintf(argfmt, in[1]) + err := f.Parse([]string{arg1, arg2}) + if err != nil { + t.Fatal("expected no error; got", err) + } + for i, v := range is { + if expected[i] != v { + t.Fatalf("expected is[%d] to be %d but got: %d", i, expected[i], v) + } + } +} diff --git a/vendor/github.com/spf13/pflag/ip_slice_test.go b/vendor/github.com/spf13/pflag/ip_slice_test.go new file mode 100644 index 000000000..b0c681c5b --- /dev/null +++ b/vendor/github.com/spf13/pflag/ip_slice_test.go @@ -0,0 +1,222 @@ +package pflag + +import ( + "fmt" + "net" + "strings" + "testing" +) + +func setUpIPSFlagSet(ipsp *[]net.IP) *FlagSet { + f := NewFlagSet("test", ContinueOnError) + f.IPSliceVar(ipsp, "ips", []net.IP{}, "Command separated list!") + return f +} + +func setUpIPSFlagSetWithDefault(ipsp *[]net.IP) *FlagSet { + f := NewFlagSet("test", ContinueOnError) + f.IPSliceVar(ipsp, "ips", + []net.IP{ + net.ParseIP("192.168.1.1"), + net.ParseIP("0:0:0:0:0:0:0:1"), + }, + "Command separated list!") + return f +} + +func TestEmptyIP(t *testing.T) { + var ips []net.IP + f := setUpIPSFlagSet(&ips) + err := f.Parse([]string{}) + if err != nil { + t.Fatal("expected no error; got", err) + } + + getIPS, err := f.GetIPSlice("ips") + if err != nil { + t.Fatal("got an error from GetIPSlice():", err) + } + if len(getIPS) != 0 { + t.Fatalf("got ips %v with len=%d but expected length=0", getIPS, len(getIPS)) + } +} + +func TestIPS(t *testing.T) { + var ips []net.IP + f := setUpIPSFlagSet(&ips) + + vals := []string{"192.168.1.1", "10.0.0.1", "0:0:0:0:0:0:0:2"} + arg := fmt.Sprintf("--ips=%s", strings.Join(vals, ",")) + err := f.Parse([]string{arg}) + if err != nil { + t.Fatal("expected no error; got", err) + } + for i, v := range ips { + if ip := net.ParseIP(vals[i]); ip == nil { + t.Fatalf("invalid string being converted to IP address: %s", vals[i]) + } else if !ip.Equal(v) { + t.Fatalf("expected ips[%d] to be %s but got: %s from GetIPSlice", i, vals[i], v) + } + } +} + +func TestIPSDefault(t *testing.T) { + var ips []net.IP + f := setUpIPSFlagSetWithDefault(&ips) + + vals := []string{"192.168.1.1", "0:0:0:0:0:0:0:1"} + err := f.Parse([]string{}) + if err != nil { + t.Fatal("expected no error; got", err) + } + for i, v := range ips { + if ip := net.ParseIP(vals[i]); ip == nil { + t.Fatalf("invalid string being converted to IP address: %s", vals[i]) + } else if !ip.Equal(v) { + t.Fatalf("expected ips[%d] to be %s but got: %s", i, vals[i], v) + } + } + + getIPS, err := f.GetIPSlice("ips") + if err != nil { + t.Fatal("got an error from GetIPSlice") + } + for i, v := range getIPS { + if ip := net.ParseIP(vals[i]); ip == nil { + t.Fatalf("invalid string being converted to IP address: %s", vals[i]) + } else if !ip.Equal(v) { + t.Fatalf("expected ips[%d] to be %s but got: %s", i, vals[i], v) + } + } +} + +func TestIPSWithDefault(t *testing.T) { + var ips []net.IP + f := setUpIPSFlagSetWithDefault(&ips) + + vals := []string{"192.168.1.1", "0:0:0:0:0:0:0:1"} + arg := fmt.Sprintf("--ips=%s", strings.Join(vals, ",")) + err := f.Parse([]string{arg}) + if err != nil { + t.Fatal("expected no error; got", err) + } + for i, v := range ips { + if ip := net.ParseIP(vals[i]); ip == nil { + t.Fatalf("invalid string being converted to IP address: %s", vals[i]) + } else if !ip.Equal(v) { + t.Fatalf("expected ips[%d] to be %s but got: %s", i, vals[i], v) + } + } + + getIPS, err := f.GetIPSlice("ips") + if err != nil { + t.Fatal("got an error from GetIPSlice") + } + for i, v := range getIPS { + if ip := net.ParseIP(vals[i]); ip == nil { + t.Fatalf("invalid string being converted to IP address: %s", vals[i]) + } else if !ip.Equal(v) { + t.Fatalf("expected ips[%d] to be %s but got: %s", i, vals[i], v) + } + } +} + +func TestIPSCalledTwice(t *testing.T) { + var ips []net.IP + f := setUpIPSFlagSet(&ips) + + in := []string{"192.168.1.2,0:0:0:0:0:0:0:1", "10.0.0.1"} + expected := []net.IP{net.ParseIP("192.168.1.2"), net.ParseIP("0:0:0:0:0:0:0:1"), net.ParseIP("10.0.0.1")} + argfmt := "ips=%s" + arg1 := fmt.Sprintf(argfmt, in[0]) + arg2 := fmt.Sprintf(argfmt, in[1]) + err := f.Parse([]string{arg1, arg2}) + if err != nil { + t.Fatal("expected no error; got", err) + } + for i, v := range ips { + if !expected[i].Equal(v) { + t.Fatalf("expected ips[%d] to be %s but got: %s", i, expected[i], v) + } + } +} + +func TestIPSBadQuoting(t *testing.T) { + + tests := []struct { + Want []net.IP + FlagArg []string + }{ + { + Want: []net.IP{ + net.ParseIP("a4ab:61d:f03e:5d7d:fad7:d4c2:a1a5:568"), + net.ParseIP("203.107.49.208"), + net.ParseIP("14.57.204.90"), + }, + FlagArg: []string{ + "a4ab:61d:f03e:5d7d:fad7:d4c2:a1a5:568", + "203.107.49.208", + "14.57.204.90", + }, + }, + { + Want: []net.IP{ + net.ParseIP("204.228.73.195"), + net.ParseIP("86.141.15.94"), + }, + FlagArg: []string{ + "204.228.73.195", + "86.141.15.94", + }, + }, + { + Want: []net.IP{ + net.ParseIP("c70c:db36:3001:890f:c6ea:3f9b:7a39:cc3f"), + net.ParseIP("4d17:1d6e:e699:bd7a:88c5:5e7e:ac6a:4472"), + }, + FlagArg: []string{ + "c70c:db36:3001:890f:c6ea:3f9b:7a39:cc3f", + "4d17:1d6e:e699:bd7a:88c5:5e7e:ac6a:4472", + }, + }, + { + Want: []net.IP{ + net.ParseIP("5170:f971:cfac:7be3:512a:af37:952c:bc33"), + net.ParseIP("93.21.145.140"), + net.ParseIP("2cac:61d3:c5ff:6caf:73e0:1b1a:c336:c1ca"), + }, + FlagArg: []string{ + " 5170:f971:cfac:7be3:512a:af37:952c:bc33 , 93.21.145.140 ", + "2cac:61d3:c5ff:6caf:73e0:1b1a:c336:c1ca", + }, + }, + { + Want: []net.IP{ + net.ParseIP("2e5e:66b2:6441:848:5b74:76ea:574c:3a7b"), + net.ParseIP("2e5e:66b2:6441:848:5b74:76ea:574c:3a7b"), + net.ParseIP("2e5e:66b2:6441:848:5b74:76ea:574c:3a7b"), + net.ParseIP("2e5e:66b2:6441:848:5b74:76ea:574c:3a7b"), + }, + FlagArg: []string{ + `"2e5e:66b2:6441:848:5b74:76ea:574c:3a7b, 2e5e:66b2:6441:848:5b74:76ea:574c:3a7b,2e5e:66b2:6441:848:5b74:76ea:574c:3a7b "`, + " 2e5e:66b2:6441:848:5b74:76ea:574c:3a7b"}, + }, + } + + for i, test := range tests { + + var ips []net.IP + f := setUpIPSFlagSet(&ips) + + if err := f.Parse([]string{fmt.Sprintf("--ips=%s", strings.Join(test.FlagArg, ","))}); err != nil { + t.Fatalf("flag parsing failed with error: %s\nparsing:\t%#v\nwant:\t\t%s", + err, test.FlagArg, test.Want[i]) + } + + for j, b := range ips { + if !b.Equal(test.Want[j]) { + t.Fatalf("bad value parsed for test %d on net.IP %d:\nwant:\t%s\ngot:\t%s", i, j, test.Want[j], b) + } + } + } +} diff --git a/vendor/github.com/spf13/pflag/ip_test.go b/vendor/github.com/spf13/pflag/ip_test.go new file mode 100644 index 000000000..1fec50e42 --- /dev/null +++ b/vendor/github.com/spf13/pflag/ip_test.go @@ -0,0 +1,63 @@ +package pflag + +import ( + "fmt" + "net" + "os" + "testing" +) + +func setUpIP(ip *net.IP) *FlagSet { + f := NewFlagSet("test", ContinueOnError) + f.IPVar(ip, "address", net.ParseIP("0.0.0.0"), "IP Address") + return f +} + +func TestIP(t *testing.T) { + testCases := []struct { + input string + success bool + expected string + }{ + {"0.0.0.0", true, "0.0.0.0"}, + {" 0.0.0.0 ", true, "0.0.0.0"}, + {"1.2.3.4", true, "1.2.3.4"}, + {"127.0.0.1", true, "127.0.0.1"}, + {"255.255.255.255", true, "255.255.255.255"}, + {"", false, ""}, + {"0", false, ""}, + {"localhost", false, ""}, + {"0.0.0", false, ""}, + {"0.0.0.", false, ""}, + {"0.0.0.0.", false, ""}, + {"0.0.0.256", false, ""}, + {"0 . 0 . 0 . 0", false, ""}, + } + + devnull, _ := os.Open(os.DevNull) + os.Stderr = devnull + for i := range testCases { + var addr net.IP + f := setUpIP(&addr) + + tc := &testCases[i] + + arg := fmt.Sprintf("--address=%s", tc.input) + err := f.Parse([]string{arg}) + if err != nil && tc.success == true { + t.Errorf("expected success, got %q", err) + continue + } else if err == nil && tc.success == false { + t.Errorf("expected failure") + continue + } else if tc.success { + ip, err := f.GetIP("address") + if err != nil { + t.Errorf("Got error trying to fetch the IP flag: %v", err) + } + if ip.String() != tc.expected { + t.Errorf("expected %q, got %q", tc.expected, ip.String()) + } + } + } +} diff --git a/vendor/github.com/spf13/pflag/ipnet_test.go b/vendor/github.com/spf13/pflag/ipnet_test.go new file mode 100644 index 000000000..335b6fa15 --- /dev/null +++ b/vendor/github.com/spf13/pflag/ipnet_test.go @@ -0,0 +1,70 @@ +package pflag + +import ( + "fmt" + "net" + "os" + "testing" +) + +func setUpIPNet(ip *net.IPNet) *FlagSet { + f := NewFlagSet("test", ContinueOnError) + _, def, _ := net.ParseCIDR("0.0.0.0/0") + f.IPNetVar(ip, "address", *def, "IP Address") + return f +} + +func TestIPNet(t *testing.T) { + testCases := []struct { + input string + success bool + expected string + }{ + {"0.0.0.0/0", true, "0.0.0.0/0"}, + {" 0.0.0.0/0 ", true, "0.0.0.0/0"}, + {"1.2.3.4/8", true, "1.0.0.0/8"}, + {"127.0.0.1/16", true, "127.0.0.0/16"}, + {"255.255.255.255/19", true, "255.255.224.0/19"}, + {"255.255.255.255/32", true, "255.255.255.255/32"}, + {"", false, ""}, + {"/0", false, ""}, + {"0", false, ""}, + {"0/0", false, ""}, + {"localhost/0", false, ""}, + {"0.0.0/4", false, ""}, + {"0.0.0./8", false, ""}, + {"0.0.0.0./12", false, ""}, + {"0.0.0.256/16", false, ""}, + {"0.0.0.0 /20", false, ""}, + {"0.0.0.0/ 24", false, ""}, + {"0 . 0 . 0 . 0 / 28", false, ""}, + {"0.0.0.0/33", false, ""}, + } + + devnull, _ := os.Open(os.DevNull) + os.Stderr = devnull + for i := range testCases { + var addr net.IPNet + f := setUpIPNet(&addr) + + tc := &testCases[i] + + arg := fmt.Sprintf("--address=%s", tc.input) + err := f.Parse([]string{arg}) + if err != nil && tc.success == true { + t.Errorf("expected success, got %q", err) + continue + } else if err == nil && tc.success == false { + t.Errorf("expected failure") + continue + } else if tc.success { + ip, err := f.GetIPNet("address") + if err != nil { + t.Errorf("Got error trying to fetch the IP flag: %v", err) + } + if ip.String() != tc.expected { + t.Errorf("expected %q, got %q", tc.expected, ip.String()) + } + } + } +} diff --git a/vendor/github.com/spf13/pflag/string_array_test.go b/vendor/github.com/spf13/pflag/string_array_test.go new file mode 100644 index 000000000..1ceac8c6c --- /dev/null +++ b/vendor/github.com/spf13/pflag/string_array_test.go @@ -0,0 +1,233 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package pflag + +import ( + "fmt" + "testing" +) + +func setUpSAFlagSet(sap *[]string) *FlagSet { + f := NewFlagSet("test", ContinueOnError) + f.StringArrayVar(sap, "sa", []string{}, "Command separated list!") + return f +} + +func setUpSAFlagSetWithDefault(sap *[]string) *FlagSet { + f := NewFlagSet("test", ContinueOnError) + f.StringArrayVar(sap, "sa", []string{"default", "values"}, "Command separated list!") + return f +} + +func TestEmptySA(t *testing.T) { + var sa []string + f := setUpSAFlagSet(&sa) + err := f.Parse([]string{}) + if err != nil { + t.Fatal("expected no error; got", err) + } + + getSA, err := f.GetStringArray("sa") + if err != nil { + t.Fatal("got an error from GetStringArray():", err) + } + if len(getSA) != 0 { + t.Fatalf("got sa %v with len=%d but expected length=0", getSA, len(getSA)) + } +} + +func TestEmptySAValue(t *testing.T) { + var sa []string + f := setUpSAFlagSet(&sa) + err := f.Parse([]string{"--sa="}) + if err != nil { + t.Fatal("expected no error; got", err) + } + + getSA, err := f.GetStringArray("sa") + if err != nil { + t.Fatal("got an error from GetStringArray():", err) + } + if len(getSA) != 0 { + t.Fatalf("got sa %v with len=%d but expected length=0", getSA, len(getSA)) + } +} + +func TestSADefault(t *testing.T) { + var sa []string + f := setUpSAFlagSetWithDefault(&sa) + + vals := []string{"default", "values"} + + err := f.Parse([]string{}) + if err != nil { + t.Fatal("expected no error; got", err) + } + for i, v := range sa { + if vals[i] != v { + t.Fatalf("expected sa[%d] to be %s but got: %s", i, vals[i], v) + } + } + + getSA, err := f.GetStringArray("sa") + if err != nil { + t.Fatal("got an error from GetStringArray():", err) + } + for i, v := range getSA { + if vals[i] != v { + t.Fatalf("expected sa[%d] to be %s from GetStringArray but got: %s", i, vals[i], v) + } + } +} + +func TestSAWithDefault(t *testing.T) { + var sa []string + f := setUpSAFlagSetWithDefault(&sa) + + val := "one" + arg := fmt.Sprintf("--sa=%s", val) + err := f.Parse([]string{arg}) + if err != nil { + t.Fatal("expected no error; got", err) + } + + if len(sa) != 1 { + t.Fatalf("expected number of values to be %d but %d", 1, len(sa)) + } + + if sa[0] != val { + t.Fatalf("expected value to be %s but got: %s", sa[0], val) + } + + getSA, err := f.GetStringArray("sa") + if err != nil { + t.Fatal("got an error from GetStringArray():", err) + } + + if len(getSA) != 1 { + t.Fatalf("expected number of values to be %d but %d", 1, len(getSA)) + } + + if getSA[0] != val { + t.Fatalf("expected value to be %s but got: %s", getSA[0], val) + } +} + +func TestSACalledTwice(t *testing.T) { + var sa []string + f := setUpSAFlagSet(&sa) + + in := []string{"one", "two"} + expected := []string{"one", "two"} + argfmt := "--sa=%s" + arg1 := fmt.Sprintf(argfmt, in[0]) + arg2 := fmt.Sprintf(argfmt, in[1]) + err := f.Parse([]string{arg1, arg2}) + if err != nil { + t.Fatal("expected no error; got", err) + } + + if len(expected) != len(sa) { + t.Fatalf("expected number of sa to be %d but got: %d", len(expected), len(sa)) + } + for i, v := range sa { + if expected[i] != v { + t.Fatalf("expected sa[%d] to be %s but got: %s", i, expected[i], v) + } + } + + values, err := f.GetStringArray("sa") + if err != nil { + t.Fatal("expected no error; got", err) + } + + if len(expected) != len(values) { + t.Fatalf("expected number of values to be %d but got: %d", len(expected), len(sa)) + } + for i, v := range values { + if expected[i] != v { + t.Fatalf("expected got sa[%d] to be %s but got: %s", i, expected[i], v) + } + } +} + +func TestSAWithSpecialChar(t *testing.T) { + var sa []string + f := setUpSAFlagSet(&sa) + + in := []string{"one,two", `"three"`, `"four,five",six`, "seven eight"} + expected := []string{"one,two", `"three"`, `"four,five",six`, "seven eight"} + argfmt := "--sa=%s" + arg1 := fmt.Sprintf(argfmt, in[0]) + arg2 := fmt.Sprintf(argfmt, in[1]) + arg3 := fmt.Sprintf(argfmt, in[2]) + arg4 := fmt.Sprintf(argfmt, in[3]) + err := f.Parse([]string{arg1, arg2, arg3, arg4}) + if err != nil { + t.Fatal("expected no error; got", err) + } + + if len(expected) != len(sa) { + t.Fatalf("expected number of sa to be %d but got: %d", len(expected), len(sa)) + } + for i, v := range sa { + if expected[i] != v { + t.Fatalf("expected sa[%d] to be %s but got: %s", i, expected[i], v) + } + } + + values, err := f.GetStringArray("sa") + if err != nil { + t.Fatal("expected no error; got", err) + } + + if len(expected) != len(values) { + t.Fatalf("expected number of values to be %d but got: %d", len(expected), len(values)) + } + for i, v := range values { + if expected[i] != v { + t.Fatalf("expected got sa[%d] to be %s but got: %s", i, expected[i], v) + } + } +} + +func TestSAWithSquareBrackets(t *testing.T) { + var sa []string + f := setUpSAFlagSet(&sa) + + in := []string{"][]-[", "[a-z]", "[a-z]+"} + expected := []string{"][]-[", "[a-z]", "[a-z]+"} + argfmt := "--sa=%s" + arg1 := fmt.Sprintf(argfmt, in[0]) + arg2 := fmt.Sprintf(argfmt, in[1]) + arg3 := fmt.Sprintf(argfmt, in[2]) + err := f.Parse([]string{arg1, arg2, arg3}) + if err != nil { + t.Fatal("expected no error; got", err) + } + + if len(expected) != len(sa) { + t.Fatalf("expected number of sa to be %d but got: %d", len(expected), len(sa)) + } + for i, v := range sa { + if expected[i] != v { + t.Fatalf("expected sa[%d] to be %s but got: %s", i, expected[i], v) + } + } + + values, err := f.GetStringArray("sa") + if err != nil { + t.Fatal("expected no error; got", err) + } + + if len(expected) != len(values) { + t.Fatalf("expected number of values to be %d but got: %d", len(expected), len(values)) + } + for i, v := range values { + if expected[i] != v { + t.Fatalf("expected got sa[%d] to be %s but got: %s", i, expected[i], v) + } + } +} diff --git a/vendor/github.com/spf13/pflag/string_slice_test.go b/vendor/github.com/spf13/pflag/string_slice_test.go new file mode 100644 index 000000000..c41f3bd66 --- /dev/null +++ b/vendor/github.com/spf13/pflag/string_slice_test.go @@ -0,0 +1,253 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package pflag + +import ( + "fmt" + "strings" + "testing" +) + +func setUpSSFlagSet(ssp *[]string) *FlagSet { + f := NewFlagSet("test", ContinueOnError) + f.StringSliceVar(ssp, "ss", []string{}, "Command separated list!") + return f +} + +func setUpSSFlagSetWithDefault(ssp *[]string) *FlagSet { + f := NewFlagSet("test", ContinueOnError) + f.StringSliceVar(ssp, "ss", []string{"default", "values"}, "Command separated list!") + return f +} + +func TestEmptySS(t *testing.T) { + var ss []string + f := setUpSSFlagSet(&ss) + err := f.Parse([]string{}) + if err != nil { + t.Fatal("expected no error; got", err) + } + + getSS, err := f.GetStringSlice("ss") + if err != nil { + t.Fatal("got an error from GetStringSlice():", err) + } + if len(getSS) != 0 { + t.Fatalf("got ss %v with len=%d but expected length=0", getSS, len(getSS)) + } +} + +func TestEmptySSValue(t *testing.T) { + var ss []string + f := setUpSSFlagSet(&ss) + err := f.Parse([]string{"--ss="}) + if err != nil { + t.Fatal("expected no error; got", err) + } + + getSS, err := f.GetStringSlice("ss") + if err != nil { + t.Fatal("got an error from GetStringSlice():", err) + } + if len(getSS) != 0 { + t.Fatalf("got ss %v with len=%d but expected length=0", getSS, len(getSS)) + } +} + +func TestSS(t *testing.T) { + var ss []string + f := setUpSSFlagSet(&ss) + + vals := []string{"one", "two", "4", "3"} + arg := fmt.Sprintf("--ss=%s", strings.Join(vals, ",")) + err := f.Parse([]string{arg}) + if err != nil { + t.Fatal("expected no error; got", err) + } + for i, v := range ss { + if vals[i] != v { + t.Fatalf("expected ss[%d] to be %s but got: %s", i, vals[i], v) + } + } + + getSS, err := f.GetStringSlice("ss") + if err != nil { + t.Fatal("got an error from GetStringSlice():", err) + } + for i, v := range getSS { + if vals[i] != v { + t.Fatalf("expected ss[%d] to be %s from GetStringSlice but got: %s", i, vals[i], v) + } + } +} + +func TestSSDefault(t *testing.T) { + var ss []string + f := setUpSSFlagSetWithDefault(&ss) + + vals := []string{"default", "values"} + + err := f.Parse([]string{}) + if err != nil { + t.Fatal("expected no error; got", err) + } + for i, v := range ss { + if vals[i] != v { + t.Fatalf("expected ss[%d] to be %s but got: %s", i, vals[i], v) + } + } + + getSS, err := f.GetStringSlice("ss") + if err != nil { + t.Fatal("got an error from GetStringSlice():", err) + } + for i, v := range getSS { + if vals[i] != v { + t.Fatalf("expected ss[%d] to be %s from GetStringSlice but got: %s", i, vals[i], v) + } + } +} + +func TestSSWithDefault(t *testing.T) { + var ss []string + f := setUpSSFlagSetWithDefault(&ss) + + vals := []string{"one", "two", "4", "3"} + arg := fmt.Sprintf("--ss=%s", strings.Join(vals, ",")) + err := f.Parse([]string{arg}) + if err != nil { + t.Fatal("expected no error; got", err) + } + for i, v := range ss { + if vals[i] != v { + t.Fatalf("expected ss[%d] to be %s but got: %s", i, vals[i], v) + } + } + + getSS, err := f.GetStringSlice("ss") + if err != nil { + t.Fatal("got an error from GetStringSlice():", err) + } + for i, v := range getSS { + if vals[i] != v { + t.Fatalf("expected ss[%d] to be %s from GetStringSlice but got: %s", i, vals[i], v) + } + } +} + +func TestSSCalledTwice(t *testing.T) { + var ss []string + f := setUpSSFlagSet(&ss) + + in := []string{"one,two", "three"} + expected := []string{"one", "two", "three"} + argfmt := "--ss=%s" + arg1 := fmt.Sprintf(argfmt, in[0]) + arg2 := fmt.Sprintf(argfmt, in[1]) + err := f.Parse([]string{arg1, arg2}) + if err != nil { + t.Fatal("expected no error; got", err) + } + + if len(expected) != len(ss) { + t.Fatalf("expected number of ss to be %d but got: %d", len(expected), len(ss)) + } + for i, v := range ss { + if expected[i] != v { + t.Fatalf("expected ss[%d] to be %s but got: %s", i, expected[i], v) + } + } + + values, err := f.GetStringSlice("ss") + if err != nil { + t.Fatal("expected no error; got", err) + } + + if len(expected) != len(values) { + t.Fatalf("expected number of values to be %d but got: %d", len(expected), len(ss)) + } + for i, v := range values { + if expected[i] != v { + t.Fatalf("expected got ss[%d] to be %s but got: %s", i, expected[i], v) + } + } +} + +func TestSSWithComma(t *testing.T) { + var ss []string + f := setUpSSFlagSet(&ss) + + in := []string{`"one,two"`, `"three"`, `"four,five",six`} + expected := []string{"one,two", "three", "four,five", "six"} + argfmt := "--ss=%s" + arg1 := fmt.Sprintf(argfmt, in[0]) + arg2 := fmt.Sprintf(argfmt, in[1]) + arg3 := fmt.Sprintf(argfmt, in[2]) + err := f.Parse([]string{arg1, arg2, arg3}) + if err != nil { + t.Fatal("expected no error; got", err) + } + + if len(expected) != len(ss) { + t.Fatalf("expected number of ss to be %d but got: %d", len(expected), len(ss)) + } + for i, v := range ss { + if expected[i] != v { + t.Fatalf("expected ss[%d] to be %s but got: %s", i, expected[i], v) + } + } + + values, err := f.GetStringSlice("ss") + if err != nil { + t.Fatal("expected no error; got", err) + } + + if len(expected) != len(values) { + t.Fatalf("expected number of values to be %d but got: %d", len(expected), len(values)) + } + for i, v := range values { + if expected[i] != v { + t.Fatalf("expected got ss[%d] to be %s but got: %s", i, expected[i], v) + } + } +} + +func TestSSWithSquareBrackets(t *testing.T) { + var ss []string + f := setUpSSFlagSet(&ss) + + in := []string{`"[a-z]"`, `"[a-z]+"`} + expected := []string{"[a-z]", "[a-z]+"} + argfmt := "--ss=%s" + arg1 := fmt.Sprintf(argfmt, in[0]) + arg2 := fmt.Sprintf(argfmt, in[1]) + err := f.Parse([]string{arg1, arg2}) + if err != nil { + t.Fatal("expected no error; got", err) + } + + if len(expected) != len(ss) { + t.Fatalf("expected number of ss to be %d but got: %d", len(expected), len(ss)) + } + for i, v := range ss { + if expected[i] != v { + t.Fatalf("expected ss[%d] to be %s but got: %s", i, expected[i], v) + } + } + + values, err := f.GetStringSlice("ss") + if err != nil { + t.Fatal("expected no error; got", err) + } + + if len(expected) != len(values) { + t.Fatalf("expected number of values to be %d but got: %d", len(expected), len(values)) + } + for i, v := range values { + if expected[i] != v { + t.Fatalf("expected got ss[%d] to be %s but got: %s", i, expected[i], v) + } + } +} diff --git a/vendor/github.com/spf13/pflag/uint_slice_test.go b/vendor/github.com/spf13/pflag/uint_slice_test.go new file mode 100644 index 000000000..db1a19dc2 --- /dev/null +++ b/vendor/github.com/spf13/pflag/uint_slice_test.go @@ -0,0 +1,161 @@ +package pflag + +import ( + "fmt" + "strconv" + "strings" + "testing" +) + +func setUpUISFlagSet(uisp *[]uint) *FlagSet { + f := NewFlagSet("test", ContinueOnError) + f.UintSliceVar(uisp, "uis", []uint{}, "Command separated list!") + return f +} + +func setUpUISFlagSetWithDefault(uisp *[]uint) *FlagSet { + f := NewFlagSet("test", ContinueOnError) + f.UintSliceVar(uisp, "uis", []uint{0, 1}, "Command separated list!") + return f +} + +func TestEmptyUIS(t *testing.T) { + var uis []uint + f := setUpUISFlagSet(&uis) + err := f.Parse([]string{}) + if err != nil { + t.Fatal("expected no error; got", err) + } + + getUIS, err := f.GetUintSlice("uis") + if err != nil { + t.Fatal("got an error from GetUintSlice():", err) + } + if len(getUIS) != 0 { + t.Fatalf("got is %v with len=%d but expected length=0", getUIS, len(getUIS)) + } +} + +func TestUIS(t *testing.T) { + var uis []uint + f := setUpUISFlagSet(&uis) + + vals := []string{"1", "2", "4", "3"} + arg := fmt.Sprintf("--uis=%s", strings.Join(vals, ",")) + err := f.Parse([]string{arg}) + if err != nil { + t.Fatal("expected no error; got", err) + } + for i, v := range uis { + u, err := strconv.ParseUint(vals[i], 10, 0) + if err != nil { + t.Fatalf("got error: %v", err) + } + if uint(u) != v { + t.Fatalf("expected uis[%d] to be %s but got %d", i, vals[i], v) + } + } + getUIS, err := f.GetUintSlice("uis") + if err != nil { + t.Fatalf("got error: %v", err) + } + for i, v := range getUIS { + u, err := strconv.ParseUint(vals[i], 10, 0) + if err != nil { + t.Fatalf("got error: %v", err) + } + if uint(u) != v { + t.Fatalf("expected uis[%d] to be %s but got: %d from GetUintSlice", i, vals[i], v) + } + } +} + +func TestUISDefault(t *testing.T) { + var uis []uint + f := setUpUISFlagSetWithDefault(&uis) + + vals := []string{"0", "1"} + + err := f.Parse([]string{}) + if err != nil { + t.Fatal("expected no error; got", err) + } + for i, v := range uis { + u, err := strconv.ParseUint(vals[i], 10, 0) + if err != nil { + t.Fatalf("got error: %v", err) + } + if uint(u) != v { + t.Fatalf("expect uis[%d] to be %d but got: %d", i, u, v) + } + } + + getUIS, err := f.GetUintSlice("uis") + if err != nil { + t.Fatal("got an error from GetUintSlice():", err) + } + for i, v := range getUIS { + u, err := strconv.ParseUint(vals[i], 10, 0) + if err != nil { + t.Fatal("got an error from GetIntSlice():", err) + } + if uint(u) != v { + t.Fatalf("expected uis[%d] to be %d from GetUintSlice but got: %d", i, u, v) + } + } +} + +func TestUISWithDefault(t *testing.T) { + var uis []uint + f := setUpUISFlagSetWithDefault(&uis) + + vals := []string{"1", "2"} + arg := fmt.Sprintf("--uis=%s", strings.Join(vals, ",")) + err := f.Parse([]string{arg}) + if err != nil { + t.Fatal("expected no error; got", err) + } + for i, v := range uis { + u, err := strconv.ParseUint(vals[i], 10, 0) + if err != nil { + t.Fatalf("got error: %v", err) + } + if uint(u) != v { + t.Fatalf("expected uis[%d] to be %d from GetUintSlice but got: %d", i, u, v) + } + } + + getUIS, err := f.GetUintSlice("uis") + if err != nil { + t.Fatal("got an error from GetUintSlice():", err) + } + for i, v := range getUIS { + u, err := strconv.ParseUint(vals[i], 10, 0) + if err != nil { + t.Fatalf("got error: %v", err) + } + if uint(u) != v { + t.Fatalf("expected uis[%d] to be %d from GetUintSlice but got: %d", i, u, v) + } + } +} + +func TestUISCalledTwice(t *testing.T) { + var uis []uint + f := setUpUISFlagSet(&uis) + + in := []string{"1,2", "3"} + expected := []int{1, 2, 3} + argfmt := "--uis=%s" + arg1 := fmt.Sprintf(argfmt, in[0]) + arg2 := fmt.Sprintf(argfmt, in[1]) + err := f.Parse([]string{arg1, arg2}) + if err != nil { + t.Fatal("expected no error; got", err) + } + for i, v := range uis { + if uint(expected[i]) != v { + t.Fatalf("expected uis[%d] to be %d but got: %d", i, expected[i], v) + } + } +} diff --git a/vendor/github.com/zakjan/cert-chain-resolver/.editorconfig b/vendor/github.com/zakjan/cert-chain-resolver/.editorconfig new file mode 100644 index 000000000..2df53d451 --- /dev/null +++ b/vendor/github.com/zakjan/cert-chain-resolver/.editorconfig @@ -0,0 +1,11 @@ +root = true + +[*] +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.go] +indent_style = tab +indent_size = 4 diff --git a/vendor/github.com/zakjan/cert-chain-resolver/.gitignore b/vendor/github.com/zakjan/cert-chain-resolver/.gitignore new file mode 100644 index 000000000..7f018ed7c --- /dev/null +++ b/vendor/github.com/zakjan/cert-chain-resolver/.gitignore @@ -0,0 +1,9 @@ +.idea +*.iml + +/vendor + +/cert-chain-resolver +/out + +tests/http-server diff --git a/vendor/github.com/zakjan/cert-chain-resolver/README.md b/vendor/github.com/zakjan/cert-chain-resolver/README.md new file mode 100644 index 000000000..a251aa9a4 --- /dev/null +++ b/vendor/github.com/zakjan/cert-chain-resolver/README.md @@ -0,0 +1,85 @@ +# SSL certificate chain resolver + +[![CircleCI](https://img.shields.io/circleci/project/zakjan/cert-chain-resolver.svg)](https://circleci.com/gh/zakjan/cert-chain-resolver) +[![Licence](https://img.shields.io/badge/licence-MIT-blue.svg)](https://tldrlegal.com/license/mit-license) + +This application downloads all intermediate CA certificates for a given SSL server certificate. It can help you fix the *incomplete certificate chain* issue, also reported as *Extra download* by [Qualys SSL Server Test](https://www.ssllabs.com/ssltest/). + +See Releases for prebuilt binaries or build it yourself. + +NOTE: In case of any troubles with Go you can try the deprecated shell script in [shell](https://github.com/zakjan/cert-chain-resolver/tree/shell) branch. + +## Usage + +``` +NAME: + cert-chain-resolver - SSL certificate chain resolver + +USAGE: + cert-chain-resolver [global options] [INPUT_FILE] + +VERSION: + 1.0.1 + +GLOBAL OPTIONS: + --output OUTPUT_FILE, -o OUTPUT_FILE output to OUTPUT_FILE (default: stdout) + --intermediate-only, -i output intermediate certificates only + --der, -d output DER format + --include-system, -s include root CA from system in output + --version, -v print the version +``` + +## Example + +``` +$ cert-chain-resolver -o domain.bundle.pem domain.pem +1: *.xxx.com +2: COMODO RSA Domain Validation Secure Server CA +3: COMODO RSA Certification Authority +Certificate chain complete. +Total 3 certificate(s) found. +``` + +## Build + +Dependencies: + +* Go 1.6 +* project cloned in `$GOPATH` (otherwise vendoring doesn't work, see https://github.com/golang/go/issues/12511) + +``` +go get github.com/Masterminds/glide +glide install +go build +``` + +## Tests + +``` +go test $(glide novendor) +tests/run.sh +``` + +## Background + +![Incomplete certificate chain](images/incomplete-chain.png) + +All operating systems contain a set of default trusted root certificates. But CAs usually don't use their root certificate to sign customer certificates. Instead of they use so called intermediate certificates, because they can be rotated more frequently. + +A certificate can contain a special *Authority Information Access* extension ([RFC-3280](http://tools.ietf.org/html/rfc3280)) with URL to issuer's certificate. Most browsers can use the AIA extension to download missing intermediate certificate to complete the certificate chain. This is the exact meaning of the *Extra download* message. But some clients (mobile browsers, OpenSSL) don't support this extension, so they report such certificate as untrusted. + +A server should always send a complete chain, which means concatenated all certificates from the certificate to the trusted root certificate (exclusive, in this order), to prevent such issues. Note, the trusted root certificate should not be there, as it is already included in the system’s root certificate store. + +You should be able to fetch intermediate certificates from the issuer and concat them together by yourself, this script helps you automatize it by looping over certificate's AIA extension field. + +### Other implementations + +* [deprecated shell script](https://github.com/zakjan/cert-chain-resolver/tree/shell) (shell) +* [https://certificatechain.io/](https://certificatechain.io/) (webservice) +* [freekmurze/ssl-certificate-chain-resolver](https://github.com/freekmurze/ssl-certificate-chain-resolver) (PHP) + +### Licence + +The MIT License (MIT). See [LICENCE](LICENCE) file for more information. [TL;DR](https://tldrlegal.com/license/mit-license) + +If you use my code in some interesting project, I'd be happy to know about it. diff --git a/vendor/github.com/zakjan/cert-chain-resolver/certUtil/chain_test.go b/vendor/github.com/zakjan/cert-chain-resolver/certUtil/chain_test.go new file mode 100644 index 000000000..592aaac70 --- /dev/null +++ b/vendor/github.com/zakjan/cert-chain-resolver/certUtil/chain_test.go @@ -0,0 +1,33 @@ +package certUtil + +import ( + "crypto/x509" + "testing" + "os" + "io/ioutil" + "github.com/stretchr/testify/assert" +) + +func TestFetchCertificateChain(t *testing.T) { + file, err := os.Open("../tests/comodo.der.crt") + if err != nil { + t.Error(err) + } + + data, err := ioutil.ReadAll(file) + if err != nil { + t.Error(err) + } + + cert, err := x509.ParseCertificate(data) + if err != nil { + t.Error(err) + } + + certs, err := FetchCertificateChain(cert) + if err != nil { + t.Error(err) + } + + assert.Equal(t, 3, len(certs)) +} diff --git a/vendor/github.com/zakjan/cert-chain-resolver/certUtil/io_test.go b/vendor/github.com/zakjan/cert-chain-resolver/certUtil/io_test.go new file mode 100644 index 000000000..c897f9ba0 --- /dev/null +++ b/vendor/github.com/zakjan/cert-chain-resolver/certUtil/io_test.go @@ -0,0 +1,11 @@ +package certUtil + +import ( + "github.com/stretchr/testify/assert" + "testing" +) + +func TestIsPEM(t *testing.T) { + assert.True(t, IsPEM([]byte("-----BEGIN CERTIFICATE-----\n-----END CERTIFICATE-----"))) + assert.False(t, IsPEM([]byte("xxx"))) +} diff --git a/vendor/github.com/zakjan/cert-chain-resolver/circle.sh b/vendor/github.com/zakjan/cert-chain-resolver/circle.sh new file mode 100755 index 000000000..b75f14314 --- /dev/null +++ b/vendor/github.com/zakjan/cert-chain-resolver/circle.sh @@ -0,0 +1,63 @@ +#!/usr/bin/env bash + +set -eu + + +GO_PROJECT_HOME="/home/ubuntu/.go_workspace/src/${CIRCLE_REPOSITORY_URL/https:\/\//}" + +dependencies() { + mkdir -p "${GO_PROJECT_HOME}" + rsync -a --delete . "${GO_PROJECT_HOME}" + + cd "${GO_PROJECT_HOME}" + go get github.com/Masterminds/glide + glide install +} + +build() { + cd "${GO_PROJECT_HOME}" + go build +} + +test() { + cd "${GO_PROJECT_HOME}" + go test $(glide novendor) + tests/run.sh +} + +release() { + cd "${GO_PROJECT_HOME}" + mkdir out + + GOARCH="amd64" + + for GOOS in linux darwin windows; do + echo "Building ${GOOS}_${GOARCH}" + + DIR="${CIRCLE_PROJECT_REPONAME}_${GOOS}_${GOARCH}" + OUT="out/${DIR}/${CIRCLE_PROJECT_REPONAME}" + if [ "${GOOS}" = "windows" ]; then + OUT="${OUT}.exe" + fi + + GOOS="${GOOS}" GOARCH="${GOARCH}" go build -o "${OUT}" + + cd out + tar -czf "${DIR}.tar.gz" "${DIR}" + rm -rf "${DIR}" + cp "${DIR}.tar.gz" "${CIRCLE_ARTIFACTS}" + cd .. + done +} + + +case "$1" in + dependencies) + dependencies;; + build) + build;; + test) + test;; + release) + release;; +esac diff --git a/vendor/github.com/zakjan/cert-chain-resolver/circle.yml b/vendor/github.com/zakjan/cert-chain-resolver/circle.yml new file mode 100644 index 000000000..fbc9b25fa --- /dev/null +++ b/vendor/github.com/zakjan/cert-chain-resolver/circle.yml @@ -0,0 +1,9 @@ +dependencies: + override: + - ./circle.sh dependencies + +test: + override: + - ./circle.sh build + - ./circle.sh test + - ./circle.sh release diff --git a/vendor/github.com/zakjan/cert-chain-resolver/glide.lock b/vendor/github.com/zakjan/cert-chain-resolver/glide.lock new file mode 100644 index 000000000..09f91d7f0 --- /dev/null +++ b/vendor/github.com/zakjan/cert-chain-resolver/glide.lock @@ -0,0 +1,12 @@ +hash: a2c552569a10dc8f17247d97f4d7d6801e7298721d4476c9c8d1755ec488216e +updated: 2016-06-02T09:18:54.603431478+02:00 +imports: +- name: github.com/fullsailor/pkcs7 + version: 2585af45975b11f1d7502bb6c01556c29efb54ce +- name: github.com/stretchr/testify + version: f390dcf405f7b83c997eac1b06768bb9f44dec18 + subpackages: + - assert +- name: github.com/urfave/cli + version: 01a33823596e7cffafa9e037acdd2441dc0eb03f +devImports: [] diff --git a/vendor/github.com/zakjan/cert-chain-resolver/glide.yaml b/vendor/github.com/zakjan/cert-chain-resolver/glide.yaml new file mode 100644 index 000000000..52e361882 --- /dev/null +++ b/vendor/github.com/zakjan/cert-chain-resolver/glide.yaml @@ -0,0 +1,7 @@ +package: github.com/zakjan/cert-chain-resolver +import: +- package: github.com/stretchr/testify + subpackages: + - assert +- package: github.com/fullsailor/pkcs7 +- package: github.com/urfave/cli diff --git a/vendor/github.com/zakjan/cert-chain-resolver/main.go b/vendor/github.com/zakjan/cert-chain-resolver/main.go new file mode 100644 index 000000000..716cd1cb5 --- /dev/null +++ b/vendor/github.com/zakjan/cert-chain-resolver/main.go @@ -0,0 +1,146 @@ +package main + +import ( + "fmt" + "github.com/urfave/cli" + "github.com/zakjan/cert-chain-resolver/certUtil" + "io/ioutil" + "os" +) + +func openInputFile(filename string) (*os.File, error) { + if filename == "" { + return os.Stdin, nil + } + + file, err := os.Open(filename) + if err != nil { + return nil, err + } + + return file, nil +} + +func openOutputFile(filename string) (*os.File, error) { + if filename == "" { + return os.Stdout, nil + } + + file, err := os.Create(filename) + if err != nil { + return nil, err + } + + return file, nil +} + +func run(inputFilename string, outputFilename string, outputIntermediateOnly bool, + outputDerFormat bool, includeSystem bool) error { + inputFile, err := openInputFile(inputFilename) + if err != nil { + return err + } + + outputFile, err := openOutputFile(outputFilename) + if err != nil { + return err + } + + data, err := ioutil.ReadAll(inputFile) + if err != nil { + return err + } + + cert, err := certUtil.DecodeCertificate(data) + if err != nil { + return err + } + + certs, err := certUtil.FetchCertificateChain(cert) + if err != nil { + return err + } + + if includeSystem { + certs, err = certUtil.AddRootCA(certs) + if err != nil { + return err + } + } + + if outputIntermediateOnly { + certs = certs[1:] + } + + if !outputDerFormat { + data = certUtil.EncodeCertificates(certs) + } else { + data = certUtil.EncodeCertificatesDER(certs) + } + + _, err = outputFile.Write(data) + if err != nil { + return err + } + + for i, cert := range certs { + fmt.Fprintf(os.Stderr, "%d: %s\n", i+1, cert.Subject.CommonName) + } + fmt.Fprintf(os.Stderr, "Certificate chain complete.\n") + fmt.Fprintf(os.Stderr, "Total %d certificate(s) found.\n", len(certs)) + + return nil +} + +func main() { + var ( + inputFilename string + outputFilename string + outputIntermediateOnly bool + outputDerFormat bool + includeSystem bool + ) + + app := cli.NewApp() + app.Usage = "SSL certificate chain resolver" + app.ArgsUsage = "[INPUT_FILE]" + app.Version = "1.0.1" + app.HideHelp = true + app.Flags = []cli.Flag{ + cli.StringFlag{ + Name: "output, o", + Usage: "output to `OUTPUT_FILE` (default: stdout)", + Destination: &outputFilename, + }, + cli.BoolFlag{ + Name: "intermediate-only, i", + Usage: "output intermediate certificates only", + Destination: &outputIntermediateOnly, + }, + cli.BoolFlag{ + Name: "der, d", + Usage: "output DER format", + Destination: &outputDerFormat, + }, + cli.BoolFlag{ + Name: "include-system, s", + Usage: "include root CA from system in output", + Destination: &includeSystem, + }, + } + app.Action = func(c *cli.Context) error { + args := c.Args() + if len(args) > 0 { + inputFilename = args[0] + } + + err := run(inputFilename, outputFilename, outputIntermediateOnly, outputDerFormat, includeSystem) + return err + } + + err := app.Run(os.Args) + if err != nil { + fmt.Fprintln(os.Stderr, err) + os.Exit(1) + } +} diff --git a/vendor/golang.org/x/crypto/.gitattributes b/vendor/golang.org/x/crypto/.gitattributes new file mode 100644 index 000000000..d2f212e5d --- /dev/null +++ b/vendor/golang.org/x/crypto/.gitattributes @@ -0,0 +1,10 @@ +# Treat all files in this repo as binary, with no git magic updating +# line endings. Windows users contributing to Go will need to use a +# modern version of git and editors capable of LF line endings. +# +# We'll prevent accidental CRLF line endings from entering the repo +# via the git-review gofmt checks. +# +# See golang.org/issue/9281 + +* -text diff --git a/vendor/golang.org/x/crypto/.gitignore b/vendor/golang.org/x/crypto/.gitignore new file mode 100644 index 000000000..8339fd61d --- /dev/null +++ b/vendor/golang.org/x/crypto/.gitignore @@ -0,0 +1,2 @@ +# Add no patterns to .hgignore except for files generated by the build. +last-change diff --git a/vendor/golang.org/x/oauth2/CONTRIBUTING.md b/vendor/golang.org/x/crypto/CONTRIBUTING.md similarity index 89% rename from vendor/golang.org/x/oauth2/CONTRIBUTING.md rename to vendor/golang.org/x/crypto/CONTRIBUTING.md index 46aa2b12d..88dff59bc 100644 --- a/vendor/golang.org/x/oauth2/CONTRIBUTING.md +++ b/vendor/golang.org/x/crypto/CONTRIBUTING.md @@ -7,7 +7,7 @@ It is the work of hundreds of contributors. We appreciate your help! ## Filing issues -When [filing an issue](https://github.com/golang/oauth2/issues), make sure to answer these five questions: +When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions: 1. What version of Go are you using (`go version`)? 2. What operating system and processor architecture are you using? diff --git a/vendor/golang.org/x/crypto/README.md b/vendor/golang.org/x/crypto/README.md new file mode 100644 index 000000000..c9d6fecd1 --- /dev/null +++ b/vendor/golang.org/x/crypto/README.md @@ -0,0 +1,21 @@ +# Go Cryptography + +This repository holds supplementary Go cryptography libraries. + +## Download/Install + +The easiest way to install is to run `go get -u golang.org/x/crypto/...`. You +can also manually git clone the repository to `$GOPATH/src/golang.org/x/crypto`. + +## Report Issues / Send Patches + +This repository uses Gerrit for code changes. To learn how to submit changes to +this repository, see https://golang.org/doc/contribute.html. + +The main issue tracker for the crypto repository is located at +https://github.com/golang/go/issues. Prefix your issue with "x/crypto:" in the +subject line, so it is easy to find. + +Note that contributions to the cryptography package receive additional scrutiny +due to their sensitive nature. Patches may take longer than normal to receive +feedback. diff --git a/vendor/golang.org/x/crypto/codereview.cfg b/vendor/golang.org/x/crypto/codereview.cfg new file mode 100644 index 000000000..3f8b14b64 --- /dev/null +++ b/vendor/golang.org/x/crypto/codereview.cfg @@ -0,0 +1 @@ +issuerepo: golang/go diff --git a/vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go b/vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go deleted file mode 100644 index 646886477..000000000 --- a/vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -/* -Package secretbox encrypts and authenticates small messages. - -Secretbox uses XSalsa20 and Poly1305 to encrypt and authenticate messages with -secret-key cryptography. The length of messages is not hidden. - -It is the caller's responsibility to ensure the uniqueness of nonces—for -example, by using nonce 1 for the first message, nonce 2 for the second -message, etc. Nonces are long enough that randomly generated nonces have -negligible risk of collision. - -This package is interoperable with NaCl: https://nacl.cr.yp.to/secretbox.html. -*/ -package secretbox - -import ( - "golang.org/x/crypto/poly1305" - "golang.org/x/crypto/salsa20/salsa" -) - -// Overhead is the number of bytes of overhead when boxing a message. -const Overhead = poly1305.TagSize - -// setup produces a sub-key and Salsa20 counter given a nonce and key. -func setup(subKey *[32]byte, counter *[16]byte, nonce *[24]byte, key *[32]byte) { - // We use XSalsa20 for encryption so first we need to generate a - // key and nonce with HSalsa20. - var hNonce [16]byte - copy(hNonce[:], nonce[:]) - salsa.HSalsa20(subKey, &hNonce, key, &salsa.Sigma) - - // The final 8 bytes of the original nonce form the new nonce. - copy(counter[:], nonce[16:]) -} - -// sliceForAppend takes a slice and a requested number of bytes. It returns a -// slice with the contents of the given slice followed by that many bytes and a -// second slice that aliases into it and contains only the extra bytes. If the -// original slice has sufficient capacity then no allocation is performed. -func sliceForAppend(in []byte, n int) (head, tail []byte) { - if total := len(in) + n; cap(in) >= total { - head = in[:total] - } else { - head = make([]byte, total) - copy(head, in) - } - tail = head[len(in):] - return -} - -// Seal appends an encrypted and authenticated copy of message to out, which -// must not overlap message. The key and nonce pair must be unique for each -// distinct message and the output will be Overhead bytes longer than message. -func Seal(out, message []byte, nonce *[24]byte, key *[32]byte) []byte { - var subKey [32]byte - var counter [16]byte - setup(&subKey, &counter, nonce, key) - - // The Poly1305 key is generated by encrypting 32 bytes of zeros. Since - // Salsa20 works with 64-byte blocks, we also generate 32 bytes of - // keystream as a side effect. - var firstBlock [64]byte - salsa.XORKeyStream(firstBlock[:], firstBlock[:], &counter, &subKey) - - var poly1305Key [32]byte - copy(poly1305Key[:], firstBlock[:]) - - ret, out := sliceForAppend(out, len(message)+poly1305.TagSize) - - // We XOR up to 32 bytes of message with the keystream generated from - // the first block. - firstMessageBlock := message - if len(firstMessageBlock) > 32 { - firstMessageBlock = firstMessageBlock[:32] - } - - tagOut := out - out = out[poly1305.TagSize:] - for i, x := range firstMessageBlock { - out[i] = firstBlock[32+i] ^ x - } - message = message[len(firstMessageBlock):] - ciphertext := out - out = out[len(firstMessageBlock):] - - // Now encrypt the rest. - counter[8] = 1 - salsa.XORKeyStream(out, message, &counter, &subKey) - - var tag [poly1305.TagSize]byte - poly1305.Sum(&tag, ciphertext, &poly1305Key) - copy(tagOut, tag[:]) - - return ret -} - -// Open authenticates and decrypts a box produced by Seal and appends the -// message to out, which must not overlap box. The output will be Overhead -// bytes smaller than box. -func Open(out []byte, box []byte, nonce *[24]byte, key *[32]byte) ([]byte, bool) { - if len(box) < Overhead { - return nil, false - } - - var subKey [32]byte - var counter [16]byte - setup(&subKey, &counter, nonce, key) - - // The Poly1305 key is generated by encrypting 32 bytes of zeros. Since - // Salsa20 works with 64-byte blocks, we also generate 32 bytes of - // keystream as a side effect. - var firstBlock [64]byte - salsa.XORKeyStream(firstBlock[:], firstBlock[:], &counter, &subKey) - - var poly1305Key [32]byte - copy(poly1305Key[:], firstBlock[:]) - var tag [poly1305.TagSize]byte - copy(tag[:], box) - - if !poly1305.Verify(&tag, box[poly1305.TagSize:], &poly1305Key) { - return nil, false - } - - ret, out := sliceForAppend(out, len(box)-Overhead) - - // We XOR up to 32 bytes of box with the keystream generated from - // the first block. - box = box[Overhead:] - firstMessageBlock := box - if len(firstMessageBlock) > 32 { - firstMessageBlock = firstMessageBlock[:32] - } - for i, x := range firstMessageBlock { - out[i] = firstBlock[32+i] ^ x - } - - box = box[len(firstMessageBlock):] - out = out[len(firstMessageBlock):] - - // Now decrypt the rest. - counter[8] = 1 - salsa.XORKeyStream(out, box, &counter, &subKey) - - return ret, true -} diff --git a/vendor/golang.org/x/crypto/poly1305/poly1305.go b/vendor/golang.org/x/crypto/poly1305/poly1305.go deleted file mode 100644 index 6d6be9a64..000000000 --- a/vendor/golang.org/x/crypto/poly1305/poly1305.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -/* -Package poly1305 implements Poly1305 one-time message authentication code as -specified in https://cr.yp.to/mac/poly1305-20050329.pdf. - -Poly1305 is a fast, one-time authentication function. It is infeasible for an -attacker to generate an authenticator for a message without the key. However, a -key must only be used for a single message. Authenticating two different -messages with the same key allows an attacker to forge authenticators for other -messages with the same key. - -Poly1305 was originally coupled with AES in order to make Poly1305-AES. AES was -used with a fixed key in order to generate one-time keys from an nonce. -However, in this package AES isn't used and the one-time key is specified -directly. -*/ -package poly1305 - -import "crypto/subtle" - -// TagSize is the size, in bytes, of a poly1305 authenticator. -const TagSize = 16 - -// Verify returns true if mac is a valid authenticator for m with the given -// key. -func Verify(mac *[16]byte, m []byte, key *[32]byte) bool { - var tmp [16]byte - Sum(&tmp, m, key) - return subtle.ConstantTimeCompare(tmp[:], mac[:]) == 1 -} diff --git a/vendor/golang.org/x/crypto/poly1305/sum_amd64.go b/vendor/golang.org/x/crypto/poly1305/sum_amd64.go deleted file mode 100644 index 4dd72fe79..000000000 --- a/vendor/golang.org/x/crypto/poly1305/sum_amd64.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build amd64,!gccgo,!appengine - -package poly1305 - -// This function is implemented in sum_amd64.s -//go:noescape -func poly1305(out *[16]byte, m *byte, mlen uint64, key *[32]byte) - -// Sum generates an authenticator for m using a one-time key and puts the -// 16-byte result into out. Authenticating two different messages with the same -// key allows an attacker to forge messages at will. -func Sum(out *[16]byte, m []byte, key *[32]byte) { - var mPtr *byte - if len(m) > 0 { - mPtr = &m[0] - } - poly1305(out, mPtr, uint64(len(m)), key) -} diff --git a/vendor/golang.org/x/crypto/poly1305/sum_amd64.s b/vendor/golang.org/x/crypto/poly1305/sum_amd64.s deleted file mode 100644 index 2edae6382..000000000 --- a/vendor/golang.org/x/crypto/poly1305/sum_amd64.s +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build amd64,!gccgo,!appengine - -#include "textflag.h" - -#define POLY1305_ADD(msg, h0, h1, h2) \ - ADDQ 0(msg), h0; \ - ADCQ 8(msg), h1; \ - ADCQ $1, h2; \ - LEAQ 16(msg), msg - -#define POLY1305_MUL(h0, h1, h2, r0, r1, t0, t1, t2, t3) \ - MOVQ r0, AX; \ - MULQ h0; \ - MOVQ AX, t0; \ - MOVQ DX, t1; \ - MOVQ r0, AX; \ - MULQ h1; \ - ADDQ AX, t1; \ - ADCQ $0, DX; \ - MOVQ r0, t2; \ - IMULQ h2, t2; \ - ADDQ DX, t2; \ - \ - MOVQ r1, AX; \ - MULQ h0; \ - ADDQ AX, t1; \ - ADCQ $0, DX; \ - MOVQ DX, h0; \ - MOVQ r1, t3; \ - IMULQ h2, t3; \ - MOVQ r1, AX; \ - MULQ h1; \ - ADDQ AX, t2; \ - ADCQ DX, t3; \ - ADDQ h0, t2; \ - ADCQ $0, t3; \ - \ - MOVQ t0, h0; \ - MOVQ t1, h1; \ - MOVQ t2, h2; \ - ANDQ $3, h2; \ - MOVQ t2, t0; \ - ANDQ $0xFFFFFFFFFFFFFFFC, t0; \ - ADDQ t0, h0; \ - ADCQ t3, h1; \ - ADCQ $0, h2; \ - SHRQ $2, t3, t2; \ - SHRQ $2, t3; \ - ADDQ t2, h0; \ - ADCQ t3, h1; \ - ADCQ $0, h2 - -DATA ·poly1305Mask<>+0x00(SB)/8, $0x0FFFFFFC0FFFFFFF -DATA ·poly1305Mask<>+0x08(SB)/8, $0x0FFFFFFC0FFFFFFC -GLOBL ·poly1305Mask<>(SB), RODATA, $16 - -// func poly1305(out *[16]byte, m *byte, mlen uint64, key *[32]key) -TEXT ·poly1305(SB), $0-32 - MOVQ out+0(FP), DI - MOVQ m+8(FP), SI - MOVQ mlen+16(FP), R15 - MOVQ key+24(FP), AX - - MOVQ 0(AX), R11 - MOVQ 8(AX), R12 - ANDQ ·poly1305Mask<>(SB), R11 // r0 - ANDQ ·poly1305Mask<>+8(SB), R12 // r1 - XORQ R8, R8 // h0 - XORQ R9, R9 // h1 - XORQ R10, R10 // h2 - - CMPQ R15, $16 - JB bytes_between_0_and_15 - -loop: - POLY1305_ADD(SI, R8, R9, R10) - -multiply: - POLY1305_MUL(R8, R9, R10, R11, R12, BX, CX, R13, R14) - SUBQ $16, R15 - CMPQ R15, $16 - JAE loop - -bytes_between_0_and_15: - TESTQ R15, R15 - JZ done - MOVQ $1, BX - XORQ CX, CX - XORQ R13, R13 - ADDQ R15, SI - -flush_buffer: - SHLQ $8, BX, CX - SHLQ $8, BX - MOVB -1(SI), R13 - XORQ R13, BX - DECQ SI - DECQ R15 - JNZ flush_buffer - - ADDQ BX, R8 - ADCQ CX, R9 - ADCQ $0, R10 - MOVQ $16, R15 - JMP multiply - -done: - MOVQ R8, AX - MOVQ R9, BX - SUBQ $0xFFFFFFFFFFFFFFFB, AX - SBBQ $0xFFFFFFFFFFFFFFFF, BX - SBBQ $3, R10 - CMOVQCS R8, AX - CMOVQCS R9, BX - MOVQ key+24(FP), R8 - ADDQ 16(R8), AX - ADCQ 24(R8), BX - - MOVQ AX, 0(DI) - MOVQ BX, 8(DI) - RET diff --git a/vendor/golang.org/x/crypto/poly1305/sum_arm.go b/vendor/golang.org/x/crypto/poly1305/sum_arm.go deleted file mode 100644 index 5dc321c2f..000000000 --- a/vendor/golang.org/x/crypto/poly1305/sum_arm.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build arm,!gccgo,!appengine,!nacl - -package poly1305 - -// This function is implemented in sum_arm.s -//go:noescape -func poly1305_auth_armv6(out *[16]byte, m *byte, mlen uint32, key *[32]byte) - -// Sum generates an authenticator for m using a one-time key and puts the -// 16-byte result into out. Authenticating two different messages with the same -// key allows an attacker to forge messages at will. -func Sum(out *[16]byte, m []byte, key *[32]byte) { - var mPtr *byte - if len(m) > 0 { - mPtr = &m[0] - } - poly1305_auth_armv6(out, mPtr, uint32(len(m)), key) -} diff --git a/vendor/golang.org/x/crypto/poly1305/sum_arm.s b/vendor/golang.org/x/crypto/poly1305/sum_arm.s deleted file mode 100644 index f70b4ac48..000000000 --- a/vendor/golang.org/x/crypto/poly1305/sum_arm.s +++ /dev/null @@ -1,427 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build arm,!gccgo,!appengine,!nacl - -#include "textflag.h" - -// This code was translated into a form compatible with 5a from the public -// domain source by Andrew Moon: github.com/floodyberry/poly1305-opt/blob/master/app/extensions/poly1305. - -DATA ·poly1305_init_constants_armv6<>+0x00(SB)/4, $0x3ffffff -DATA ·poly1305_init_constants_armv6<>+0x04(SB)/4, $0x3ffff03 -DATA ·poly1305_init_constants_armv6<>+0x08(SB)/4, $0x3ffc0ff -DATA ·poly1305_init_constants_armv6<>+0x0c(SB)/4, $0x3f03fff -DATA ·poly1305_init_constants_armv6<>+0x10(SB)/4, $0x00fffff -GLOBL ·poly1305_init_constants_armv6<>(SB), 8, $20 - -// Warning: the linker may use R11 to synthesize certain instructions. Please -// take care and verify that no synthetic instructions use it. - -TEXT poly1305_init_ext_armv6<>(SB), NOSPLIT, $0 - // Needs 16 bytes of stack and 64 bytes of space pointed to by R0. (It - // might look like it's only 60 bytes of space but the final four bytes - // will be written by another function.) We need to skip over four - // bytes of stack because that's saving the value of 'g'. - ADD $4, R13, R8 - MOVM.IB [R4-R7], (R8) - MOVM.IA.W (R1), [R2-R5] - MOVW $·poly1305_init_constants_armv6<>(SB), R7 - MOVW R2, R8 - MOVW R2>>26, R9 - MOVW R3>>20, g - MOVW R4>>14, R11 - MOVW R5>>8, R12 - ORR R3<<6, R9, R9 - ORR R4<<12, g, g - ORR R5<<18, R11, R11 - MOVM.IA (R7), [R2-R6] - AND R8, R2, R2 - AND R9, R3, R3 - AND g, R4, R4 - AND R11, R5, R5 - AND R12, R6, R6 - MOVM.IA.W [R2-R6], (R0) - EOR R2, R2, R2 - EOR R3, R3, R3 - EOR R4, R4, R4 - EOR R5, R5, R5 - EOR R6, R6, R6 - MOVM.IA.W [R2-R6], (R0) - MOVM.IA.W (R1), [R2-R5] - MOVM.IA [R2-R6], (R0) - ADD $20, R13, R0 - MOVM.DA (R0), [R4-R7] - RET - -#define MOVW_UNALIGNED(Rsrc, Rdst, Rtmp, offset) \ - MOVBU (offset+0)(Rsrc), Rtmp; \ - MOVBU Rtmp, (offset+0)(Rdst); \ - MOVBU (offset+1)(Rsrc), Rtmp; \ - MOVBU Rtmp, (offset+1)(Rdst); \ - MOVBU (offset+2)(Rsrc), Rtmp; \ - MOVBU Rtmp, (offset+2)(Rdst); \ - MOVBU (offset+3)(Rsrc), Rtmp; \ - MOVBU Rtmp, (offset+3)(Rdst) - -TEXT poly1305_blocks_armv6<>(SB), NOSPLIT, $0 - // Needs 24 bytes of stack for saved registers and then 88 bytes of - // scratch space after that. We assume that 24 bytes at (R13) have - // already been used: four bytes for the link register saved in the - // prelude of poly1305_auth_armv6, four bytes for saving the value of g - // in that function and 16 bytes of scratch space used around - // poly1305_finish_ext_armv6_skip1. - ADD $24, R13, R12 - MOVM.IB [R4-R8, R14], (R12) - MOVW R0, 88(R13) - MOVW R1, 92(R13) - MOVW R2, 96(R13) - MOVW R1, R14 - MOVW R2, R12 - MOVW 56(R0), R8 - WORD $0xe1180008 // TST R8, R8 not working see issue 5921 - EOR R6, R6, R6 - MOVW.EQ $(1<<24), R6 - MOVW R6, 84(R13) - ADD $116, R13, g - MOVM.IA (R0), [R0-R9] - MOVM.IA [R0-R4], (g) - CMP $16, R12 - BLO poly1305_blocks_armv6_done - -poly1305_blocks_armv6_mainloop: - WORD $0xe31e0003 // TST R14, #3 not working see issue 5921 - BEQ poly1305_blocks_armv6_mainloop_aligned - ADD $100, R13, g - MOVW_UNALIGNED(R14, g, R0, 0) - MOVW_UNALIGNED(R14, g, R0, 4) - MOVW_UNALIGNED(R14, g, R0, 8) - MOVW_UNALIGNED(R14, g, R0, 12) - MOVM.IA (g), [R0-R3] - ADD $16, R14 - B poly1305_blocks_armv6_mainloop_loaded - -poly1305_blocks_armv6_mainloop_aligned: - MOVM.IA.W (R14), [R0-R3] - -poly1305_blocks_armv6_mainloop_loaded: - MOVW R0>>26, g - MOVW R1>>20, R11 - MOVW R2>>14, R12 - MOVW R14, 92(R13) - MOVW R3>>8, R4 - ORR R1<<6, g, g - ORR R2<<12, R11, R11 - ORR R3<<18, R12, R12 - BIC $0xfc000000, R0, R0 - BIC $0xfc000000, g, g - MOVW 84(R13), R3 - BIC $0xfc000000, R11, R11 - BIC $0xfc000000, R12, R12 - ADD R0, R5, R5 - ADD g, R6, R6 - ORR R3, R4, R4 - ADD R11, R7, R7 - ADD $116, R13, R14 - ADD R12, R8, R8 - ADD R4, R9, R9 - MOVM.IA (R14), [R0-R4] - MULLU R4, R5, (R11, g) - MULLU R3, R5, (R14, R12) - MULALU R3, R6, (R11, g) - MULALU R2, R6, (R14, R12) - MULALU R2, R7, (R11, g) - MULALU R1, R7, (R14, R12) - ADD R4<<2, R4, R4 - ADD R3<<2, R3, R3 - MULALU R1, R8, (R11, g) - MULALU R0, R8, (R14, R12) - MULALU R0, R9, (R11, g) - MULALU R4, R9, (R14, R12) - MOVW g, 76(R13) - MOVW R11, 80(R13) - MOVW R12, 68(R13) - MOVW R14, 72(R13) - MULLU R2, R5, (R11, g) - MULLU R1, R5, (R14, R12) - MULALU R1, R6, (R11, g) - MULALU R0, R6, (R14, R12) - MULALU R0, R7, (R11, g) - MULALU R4, R7, (R14, R12) - ADD R2<<2, R2, R2 - ADD R1<<2, R1, R1 - MULALU R4, R8, (R11, g) - MULALU R3, R8, (R14, R12) - MULALU R3, R9, (R11, g) - MULALU R2, R9, (R14, R12) - MOVW g, 60(R13) - MOVW R11, 64(R13) - MOVW R12, 52(R13) - MOVW R14, 56(R13) - MULLU R0, R5, (R11, g) - MULALU R4, R6, (R11, g) - MULALU R3, R7, (R11, g) - MULALU R2, R8, (R11, g) - MULALU R1, R9, (R11, g) - ADD $52, R13, R0 - MOVM.IA (R0), [R0-R7] - MOVW g>>26, R12 - MOVW R4>>26, R14 - ORR R11<<6, R12, R12 - ORR R5<<6, R14, R14 - BIC $0xfc000000, g, g - BIC $0xfc000000, R4, R4 - ADD.S R12, R0, R0 - ADC $0, R1, R1 - ADD.S R14, R6, R6 - ADC $0, R7, R7 - MOVW R0>>26, R12 - MOVW R6>>26, R14 - ORR R1<<6, R12, R12 - ORR R7<<6, R14, R14 - BIC $0xfc000000, R0, R0 - BIC $0xfc000000, R6, R6 - ADD R14<<2, R14, R14 - ADD.S R12, R2, R2 - ADC $0, R3, R3 - ADD R14, g, g - MOVW R2>>26, R12 - MOVW g>>26, R14 - ORR R3<<6, R12, R12 - BIC $0xfc000000, g, R5 - BIC $0xfc000000, R2, R7 - ADD R12, R4, R4 - ADD R14, R0, R0 - MOVW R4>>26, R12 - BIC $0xfc000000, R4, R8 - ADD R12, R6, R9 - MOVW 96(R13), R12 - MOVW 92(R13), R14 - MOVW R0, R6 - CMP $32, R12 - SUB $16, R12, R12 - MOVW R12, 96(R13) - BHS poly1305_blocks_armv6_mainloop - -poly1305_blocks_armv6_done: - MOVW 88(R13), R12 - MOVW R5, 20(R12) - MOVW R6, 24(R12) - MOVW R7, 28(R12) - MOVW R8, 32(R12) - MOVW R9, 36(R12) - ADD $48, R13, R0 - MOVM.DA (R0), [R4-R8, R14] - RET - -#define MOVHUP_UNALIGNED(Rsrc, Rdst, Rtmp) \ - MOVBU.P 1(Rsrc), Rtmp; \ - MOVBU.P Rtmp, 1(Rdst); \ - MOVBU.P 1(Rsrc), Rtmp; \ - MOVBU.P Rtmp, 1(Rdst) - -#define MOVWP_UNALIGNED(Rsrc, Rdst, Rtmp) \ - MOVHUP_UNALIGNED(Rsrc, Rdst, Rtmp); \ - MOVHUP_UNALIGNED(Rsrc, Rdst, Rtmp) - -// func poly1305_auth_armv6(out *[16]byte, m *byte, mlen uint32, key *[32]key) -TEXT ·poly1305_auth_armv6(SB), $196-16 - // The value 196, just above, is the sum of 64 (the size of the context - // structure) and 132 (the amount of stack needed). - // - // At this point, the stack pointer (R13) has been moved down. It - // points to the saved link register and there's 196 bytes of free - // space above it. - // - // The stack for this function looks like: - // - // +--------------------- - // | - // | 64 bytes of context structure - // | - // +--------------------- - // | - // | 112 bytes for poly1305_blocks_armv6 - // | - // +--------------------- - // | 16 bytes of final block, constructed at - // | poly1305_finish_ext_armv6_skip8 - // +--------------------- - // | four bytes of saved 'g' - // +--------------------- - // | lr, saved by prelude <- R13 points here - // +--------------------- - MOVW g, 4(R13) - - MOVW out+0(FP), R4 - MOVW m+4(FP), R5 - MOVW mlen+8(FP), R6 - MOVW key+12(FP), R7 - - ADD $136, R13, R0 // 136 = 4 + 4 + 16 + 112 - MOVW R7, R1 - - // poly1305_init_ext_armv6 will write to the stack from R13+4, but - // that's ok because none of the other values have been written yet. - BL poly1305_init_ext_armv6<>(SB) - BIC.S $15, R6, R2 - BEQ poly1305_auth_armv6_noblocks - ADD $136, R13, R0 - MOVW R5, R1 - ADD R2, R5, R5 - SUB R2, R6, R6 - BL poly1305_blocks_armv6<>(SB) - -poly1305_auth_armv6_noblocks: - ADD $136, R13, R0 - MOVW R5, R1 - MOVW R6, R2 - MOVW R4, R3 - - MOVW R0, R5 - MOVW R1, R6 - MOVW R2, R7 - MOVW R3, R8 - AND.S R2, R2, R2 - BEQ poly1305_finish_ext_armv6_noremaining - EOR R0, R0 - ADD $8, R13, R9 // 8 = offset to 16 byte scratch space - MOVW R0, (R9) - MOVW R0, 4(R9) - MOVW R0, 8(R9) - MOVW R0, 12(R9) - WORD $0xe3110003 // TST R1, #3 not working see issue 5921 - BEQ poly1305_finish_ext_armv6_aligned - WORD $0xe3120008 // TST R2, #8 not working see issue 5921 - BEQ poly1305_finish_ext_armv6_skip8 - MOVWP_UNALIGNED(R1, R9, g) - MOVWP_UNALIGNED(R1, R9, g) - -poly1305_finish_ext_armv6_skip8: - WORD $0xe3120004 // TST $4, R2 not working see issue 5921 - BEQ poly1305_finish_ext_armv6_skip4 - MOVWP_UNALIGNED(R1, R9, g) - -poly1305_finish_ext_armv6_skip4: - WORD $0xe3120002 // TST $2, R2 not working see issue 5921 - BEQ poly1305_finish_ext_armv6_skip2 - MOVHUP_UNALIGNED(R1, R9, g) - B poly1305_finish_ext_armv6_skip2 - -poly1305_finish_ext_armv6_aligned: - WORD $0xe3120008 // TST R2, #8 not working see issue 5921 - BEQ poly1305_finish_ext_armv6_skip8_aligned - MOVM.IA.W (R1), [g-R11] - MOVM.IA.W [g-R11], (R9) - -poly1305_finish_ext_armv6_skip8_aligned: - WORD $0xe3120004 // TST $4, R2 not working see issue 5921 - BEQ poly1305_finish_ext_armv6_skip4_aligned - MOVW.P 4(R1), g - MOVW.P g, 4(R9) - -poly1305_finish_ext_armv6_skip4_aligned: - WORD $0xe3120002 // TST $2, R2 not working see issue 5921 - BEQ poly1305_finish_ext_armv6_skip2 - MOVHU.P 2(R1), g - MOVH.P g, 2(R9) - -poly1305_finish_ext_armv6_skip2: - WORD $0xe3120001 // TST $1, R2 not working see issue 5921 - BEQ poly1305_finish_ext_armv6_skip1 - MOVBU.P 1(R1), g - MOVBU.P g, 1(R9) - -poly1305_finish_ext_armv6_skip1: - MOVW $1, R11 - MOVBU R11, 0(R9) - MOVW R11, 56(R5) - MOVW R5, R0 - ADD $8, R13, R1 - MOVW $16, R2 - BL poly1305_blocks_armv6<>(SB) - -poly1305_finish_ext_armv6_noremaining: - MOVW 20(R5), R0 - MOVW 24(R5), R1 - MOVW 28(R5), R2 - MOVW 32(R5), R3 - MOVW 36(R5), R4 - MOVW R4>>26, R12 - BIC $0xfc000000, R4, R4 - ADD R12<<2, R12, R12 - ADD R12, R0, R0 - MOVW R0>>26, R12 - BIC $0xfc000000, R0, R0 - ADD R12, R1, R1 - MOVW R1>>26, R12 - BIC $0xfc000000, R1, R1 - ADD R12, R2, R2 - MOVW R2>>26, R12 - BIC $0xfc000000, R2, R2 - ADD R12, R3, R3 - MOVW R3>>26, R12 - BIC $0xfc000000, R3, R3 - ADD R12, R4, R4 - ADD $5, R0, R6 - MOVW R6>>26, R12 - BIC $0xfc000000, R6, R6 - ADD R12, R1, R7 - MOVW R7>>26, R12 - BIC $0xfc000000, R7, R7 - ADD R12, R2, g - MOVW g>>26, R12 - BIC $0xfc000000, g, g - ADD R12, R3, R11 - MOVW $-(1<<26), R12 - ADD R11>>26, R12, R12 - BIC $0xfc000000, R11, R11 - ADD R12, R4, R9 - MOVW R9>>31, R12 - SUB $1, R12 - AND R12, R6, R6 - AND R12, R7, R7 - AND R12, g, g - AND R12, R11, R11 - AND R12, R9, R9 - MVN R12, R12 - AND R12, R0, R0 - AND R12, R1, R1 - AND R12, R2, R2 - AND R12, R3, R3 - AND R12, R4, R4 - ORR R6, R0, R0 - ORR R7, R1, R1 - ORR g, R2, R2 - ORR R11, R3, R3 - ORR R9, R4, R4 - ORR R1<<26, R0, R0 - MOVW R1>>6, R1 - ORR R2<<20, R1, R1 - MOVW R2>>12, R2 - ORR R3<<14, R2, R2 - MOVW R3>>18, R3 - ORR R4<<8, R3, R3 - MOVW 40(R5), R6 - MOVW 44(R5), R7 - MOVW 48(R5), g - MOVW 52(R5), R11 - ADD.S R6, R0, R0 - ADC.S R7, R1, R1 - ADC.S g, R2, R2 - ADC.S R11, R3, R3 - MOVM.IA [R0-R3], (R8) - MOVW R5, R12 - EOR R0, R0, R0 - EOR R1, R1, R1 - EOR R2, R2, R2 - EOR R3, R3, R3 - EOR R4, R4, R4 - EOR R5, R5, R5 - EOR R6, R6, R6 - EOR R7, R7, R7 - MOVM.IA.W [R0-R7], (R12) - MOVM.IA [R0-R7], (R12) - MOVW 4(R13), g - RET diff --git a/vendor/golang.org/x/crypto/poly1305/sum_ref.go b/vendor/golang.org/x/crypto/poly1305/sum_ref.go deleted file mode 100644 index b2805a5ca..000000000 --- a/vendor/golang.org/x/crypto/poly1305/sum_ref.go +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !amd64,!arm gccgo appengine nacl - -package poly1305 - -import "encoding/binary" - -// Sum generates an authenticator for msg using a one-time key and puts the -// 16-byte result into out. Authenticating two different messages with the same -// key allows an attacker to forge messages at will. -func Sum(out *[TagSize]byte, msg []byte, key *[32]byte) { - var ( - h0, h1, h2, h3, h4 uint32 // the hash accumulators - r0, r1, r2, r3, r4 uint64 // the r part of the key - ) - - r0 = uint64(binary.LittleEndian.Uint32(key[0:]) & 0x3ffffff) - r1 = uint64((binary.LittleEndian.Uint32(key[3:]) >> 2) & 0x3ffff03) - r2 = uint64((binary.LittleEndian.Uint32(key[6:]) >> 4) & 0x3ffc0ff) - r3 = uint64((binary.LittleEndian.Uint32(key[9:]) >> 6) & 0x3f03fff) - r4 = uint64((binary.LittleEndian.Uint32(key[12:]) >> 8) & 0x00fffff) - - R1, R2, R3, R4 := r1*5, r2*5, r3*5, r4*5 - - for len(msg) >= TagSize { - // h += msg - h0 += binary.LittleEndian.Uint32(msg[0:]) & 0x3ffffff - h1 += (binary.LittleEndian.Uint32(msg[3:]) >> 2) & 0x3ffffff - h2 += (binary.LittleEndian.Uint32(msg[6:]) >> 4) & 0x3ffffff - h3 += (binary.LittleEndian.Uint32(msg[9:]) >> 6) & 0x3ffffff - h4 += (binary.LittleEndian.Uint32(msg[12:]) >> 8) | (1 << 24) - - // h *= r - d0 := (uint64(h0) * r0) + (uint64(h1) * R4) + (uint64(h2) * R3) + (uint64(h3) * R2) + (uint64(h4) * R1) - d1 := (d0 >> 26) + (uint64(h0) * r1) + (uint64(h1) * r0) + (uint64(h2) * R4) + (uint64(h3) * R3) + (uint64(h4) * R2) - d2 := (d1 >> 26) + (uint64(h0) * r2) + (uint64(h1) * r1) + (uint64(h2) * r0) + (uint64(h3) * R4) + (uint64(h4) * R3) - d3 := (d2 >> 26) + (uint64(h0) * r3) + (uint64(h1) * r2) + (uint64(h2) * r1) + (uint64(h3) * r0) + (uint64(h4) * R4) - d4 := (d3 >> 26) + (uint64(h0) * r4) + (uint64(h1) * r3) + (uint64(h2) * r2) + (uint64(h3) * r1) + (uint64(h4) * r0) - - // h %= p - h0 = uint32(d0) & 0x3ffffff - h1 = uint32(d1) & 0x3ffffff - h2 = uint32(d2) & 0x3ffffff - h3 = uint32(d3) & 0x3ffffff - h4 = uint32(d4) & 0x3ffffff - - h0 += uint32(d4>>26) * 5 - h1 += h0 >> 26 - h0 = h0 & 0x3ffffff - - msg = msg[TagSize:] - } - - if len(msg) > 0 { - var block [TagSize]byte - off := copy(block[:], msg) - block[off] = 0x01 - - // h += msg - h0 += binary.LittleEndian.Uint32(block[0:]) & 0x3ffffff - h1 += (binary.LittleEndian.Uint32(block[3:]) >> 2) & 0x3ffffff - h2 += (binary.LittleEndian.Uint32(block[6:]) >> 4) & 0x3ffffff - h3 += (binary.LittleEndian.Uint32(block[9:]) >> 6) & 0x3ffffff - h4 += (binary.LittleEndian.Uint32(block[12:]) >> 8) - - // h *= r - d0 := (uint64(h0) * r0) + (uint64(h1) * R4) + (uint64(h2) * R3) + (uint64(h3) * R2) + (uint64(h4) * R1) - d1 := (d0 >> 26) + (uint64(h0) * r1) + (uint64(h1) * r0) + (uint64(h2) * R4) + (uint64(h3) * R3) + (uint64(h4) * R2) - d2 := (d1 >> 26) + (uint64(h0) * r2) + (uint64(h1) * r1) + (uint64(h2) * r0) + (uint64(h3) * R4) + (uint64(h4) * R3) - d3 := (d2 >> 26) + (uint64(h0) * r3) + (uint64(h1) * r2) + (uint64(h2) * r1) + (uint64(h3) * r0) + (uint64(h4) * R4) - d4 := (d3 >> 26) + (uint64(h0) * r4) + (uint64(h1) * r3) + (uint64(h2) * r2) + (uint64(h3) * r1) + (uint64(h4) * r0) - - // h %= p - h0 = uint32(d0) & 0x3ffffff - h1 = uint32(d1) & 0x3ffffff - h2 = uint32(d2) & 0x3ffffff - h3 = uint32(d3) & 0x3ffffff - h4 = uint32(d4) & 0x3ffffff - - h0 += uint32(d4>>26) * 5 - h1 += h0 >> 26 - h0 = h0 & 0x3ffffff - } - - // h %= p reduction - h2 += h1 >> 26 - h1 &= 0x3ffffff - h3 += h2 >> 26 - h2 &= 0x3ffffff - h4 += h3 >> 26 - h3 &= 0x3ffffff - h0 += 5 * (h4 >> 26) - h4 &= 0x3ffffff - h1 += h0 >> 26 - h0 &= 0x3ffffff - - // h - p - t0 := h0 + 5 - t1 := h1 + (t0 >> 26) - t2 := h2 + (t1 >> 26) - t3 := h3 + (t2 >> 26) - t4 := h4 + (t3 >> 26) - (1 << 26) - t0 &= 0x3ffffff - t1 &= 0x3ffffff - t2 &= 0x3ffffff - t3 &= 0x3ffffff - - // select h if h < p else h - p - t_mask := (t4 >> 31) - 1 - h_mask := ^t_mask - h0 = (h0 & h_mask) | (t0 & t_mask) - h1 = (h1 & h_mask) | (t1 & t_mask) - h2 = (h2 & h_mask) | (t2 & t_mask) - h3 = (h3 & h_mask) | (t3 & t_mask) - h4 = (h4 & h_mask) | (t4 & t_mask) - - // h %= 2^128 - h0 |= h1 << 26 - h1 = ((h1 >> 6) | (h2 << 20)) - h2 = ((h2 >> 12) | (h3 << 14)) - h3 = ((h3 >> 18) | (h4 << 8)) - - // s: the s part of the key - // tag = (h + s) % (2^128) - t := uint64(h0) + uint64(binary.LittleEndian.Uint32(key[16:])) - h0 = uint32(t) - t = uint64(h1) + uint64(binary.LittleEndian.Uint32(key[20:])) + (t >> 32) - h1 = uint32(t) - t = uint64(h2) + uint64(binary.LittleEndian.Uint32(key[24:])) + (t >> 32) - h2 = uint32(t) - t = uint64(h3) + uint64(binary.LittleEndian.Uint32(key[28:])) + (t >> 32) - h3 = uint32(t) - - binary.LittleEndian.PutUint32(out[0:], h0) - binary.LittleEndian.PutUint32(out[4:], h1) - binary.LittleEndian.PutUint32(out[8:], h2) - binary.LittleEndian.PutUint32(out[12:], h3) -} diff --git a/vendor/golang.org/x/crypto/salsa20/salsa/hsalsa20.go b/vendor/golang.org/x/crypto/salsa20/salsa/hsalsa20.go deleted file mode 100644 index 4ba47d591..000000000 --- a/vendor/golang.org/x/crypto/salsa20/salsa/hsalsa20.go +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package salsa provides low-level access to functions in the Salsa family. -package salsa - -// Sigma is the Salsa20 constant for 256-bit keys. -var Sigma = [16]byte{'e', 'x', 'p', 'a', 'n', 'd', ' ', '3', '2', '-', 'b', 'y', 't', 'e', ' ', 'k'} - -// HSalsa20 applies the HSalsa20 core function to a 16-byte input in, 32-byte -// key k, and 16-byte constant c, and puts the result into the 32-byte array -// out. -func HSalsa20(out *[32]byte, in *[16]byte, k *[32]byte, c *[16]byte) { - x0 := uint32(c[0]) | uint32(c[1])<<8 | uint32(c[2])<<16 | uint32(c[3])<<24 - x1 := uint32(k[0]) | uint32(k[1])<<8 | uint32(k[2])<<16 | uint32(k[3])<<24 - x2 := uint32(k[4]) | uint32(k[5])<<8 | uint32(k[6])<<16 | uint32(k[7])<<24 - x3 := uint32(k[8]) | uint32(k[9])<<8 | uint32(k[10])<<16 | uint32(k[11])<<24 - x4 := uint32(k[12]) | uint32(k[13])<<8 | uint32(k[14])<<16 | uint32(k[15])<<24 - x5 := uint32(c[4]) | uint32(c[5])<<8 | uint32(c[6])<<16 | uint32(c[7])<<24 - x6 := uint32(in[0]) | uint32(in[1])<<8 | uint32(in[2])<<16 | uint32(in[3])<<24 - x7 := uint32(in[4]) | uint32(in[5])<<8 | uint32(in[6])<<16 | uint32(in[7])<<24 - x8 := uint32(in[8]) | uint32(in[9])<<8 | uint32(in[10])<<16 | uint32(in[11])<<24 - x9 := uint32(in[12]) | uint32(in[13])<<8 | uint32(in[14])<<16 | uint32(in[15])<<24 - x10 := uint32(c[8]) | uint32(c[9])<<8 | uint32(c[10])<<16 | uint32(c[11])<<24 - x11 := uint32(k[16]) | uint32(k[17])<<8 | uint32(k[18])<<16 | uint32(k[19])<<24 - x12 := uint32(k[20]) | uint32(k[21])<<8 | uint32(k[22])<<16 | uint32(k[23])<<24 - x13 := uint32(k[24]) | uint32(k[25])<<8 | uint32(k[26])<<16 | uint32(k[27])<<24 - x14 := uint32(k[28]) | uint32(k[29])<<8 | uint32(k[30])<<16 | uint32(k[31])<<24 - x15 := uint32(c[12]) | uint32(c[13])<<8 | uint32(c[14])<<16 | uint32(c[15])<<24 - - for i := 0; i < 20; i += 2 { - u := x0 + x12 - x4 ^= u<<7 | u>>(32-7) - u = x4 + x0 - x8 ^= u<<9 | u>>(32-9) - u = x8 + x4 - x12 ^= u<<13 | u>>(32-13) - u = x12 + x8 - x0 ^= u<<18 | u>>(32-18) - - u = x5 + x1 - x9 ^= u<<7 | u>>(32-7) - u = x9 + x5 - x13 ^= u<<9 | u>>(32-9) - u = x13 + x9 - x1 ^= u<<13 | u>>(32-13) - u = x1 + x13 - x5 ^= u<<18 | u>>(32-18) - - u = x10 + x6 - x14 ^= u<<7 | u>>(32-7) - u = x14 + x10 - x2 ^= u<<9 | u>>(32-9) - u = x2 + x14 - x6 ^= u<<13 | u>>(32-13) - u = x6 + x2 - x10 ^= u<<18 | u>>(32-18) - - u = x15 + x11 - x3 ^= u<<7 | u>>(32-7) - u = x3 + x15 - x7 ^= u<<9 | u>>(32-9) - u = x7 + x3 - x11 ^= u<<13 | u>>(32-13) - u = x11 + x7 - x15 ^= u<<18 | u>>(32-18) - - u = x0 + x3 - x1 ^= u<<7 | u>>(32-7) - u = x1 + x0 - x2 ^= u<<9 | u>>(32-9) - u = x2 + x1 - x3 ^= u<<13 | u>>(32-13) - u = x3 + x2 - x0 ^= u<<18 | u>>(32-18) - - u = x5 + x4 - x6 ^= u<<7 | u>>(32-7) - u = x6 + x5 - x7 ^= u<<9 | u>>(32-9) - u = x7 + x6 - x4 ^= u<<13 | u>>(32-13) - u = x4 + x7 - x5 ^= u<<18 | u>>(32-18) - - u = x10 + x9 - x11 ^= u<<7 | u>>(32-7) - u = x11 + x10 - x8 ^= u<<9 | u>>(32-9) - u = x8 + x11 - x9 ^= u<<13 | u>>(32-13) - u = x9 + x8 - x10 ^= u<<18 | u>>(32-18) - - u = x15 + x14 - x12 ^= u<<7 | u>>(32-7) - u = x12 + x15 - x13 ^= u<<9 | u>>(32-9) - u = x13 + x12 - x14 ^= u<<13 | u>>(32-13) - u = x14 + x13 - x15 ^= u<<18 | u>>(32-18) - } - out[0] = byte(x0) - out[1] = byte(x0 >> 8) - out[2] = byte(x0 >> 16) - out[3] = byte(x0 >> 24) - - out[4] = byte(x5) - out[5] = byte(x5 >> 8) - out[6] = byte(x5 >> 16) - out[7] = byte(x5 >> 24) - - out[8] = byte(x10) - out[9] = byte(x10 >> 8) - out[10] = byte(x10 >> 16) - out[11] = byte(x10 >> 24) - - out[12] = byte(x15) - out[13] = byte(x15 >> 8) - out[14] = byte(x15 >> 16) - out[15] = byte(x15 >> 24) - - out[16] = byte(x6) - out[17] = byte(x6 >> 8) - out[18] = byte(x6 >> 16) - out[19] = byte(x6 >> 24) - - out[20] = byte(x7) - out[21] = byte(x7 >> 8) - out[22] = byte(x7 >> 16) - out[23] = byte(x7 >> 24) - - out[24] = byte(x8) - out[25] = byte(x8 >> 8) - out[26] = byte(x8 >> 16) - out[27] = byte(x8 >> 24) - - out[28] = byte(x9) - out[29] = byte(x9 >> 8) - out[30] = byte(x9 >> 16) - out[31] = byte(x9 >> 24) -} diff --git a/vendor/golang.org/x/crypto/salsa20/salsa/salsa2020_amd64.s b/vendor/golang.org/x/crypto/salsa20/salsa/salsa2020_amd64.s deleted file mode 100644 index 22afbdcad..000000000 --- a/vendor/golang.org/x/crypto/salsa20/salsa/salsa2020_amd64.s +++ /dev/null @@ -1,889 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build amd64,!appengine,!gccgo - -// This code was translated into a form compatible with 6a from the public -// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html - -// func salsa2020XORKeyStream(out, in *byte, n uint64, nonce, key *byte) -// This needs up to 64 bytes at 360(SP); hence the non-obvious frame size. -TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment - MOVQ out+0(FP),DI - MOVQ in+8(FP),SI - MOVQ n+16(FP),DX - MOVQ nonce+24(FP),CX - MOVQ key+32(FP),R8 - - MOVQ SP,R12 - MOVQ SP,R9 - ADDQ $31, R9 - ANDQ $~31, R9 - MOVQ R9, SP - - MOVQ DX,R9 - MOVQ CX,DX - MOVQ R8,R10 - CMPQ R9,$0 - JBE DONE - START: - MOVL 20(R10),CX - MOVL 0(R10),R8 - MOVL 0(DX),AX - MOVL 16(R10),R11 - MOVL CX,0(SP) - MOVL R8, 4 (SP) - MOVL AX, 8 (SP) - MOVL R11, 12 (SP) - MOVL 8(DX),CX - MOVL 24(R10),R8 - MOVL 4(R10),AX - MOVL 4(DX),R11 - MOVL CX,16(SP) - MOVL R8, 20 (SP) - MOVL AX, 24 (SP) - MOVL R11, 28 (SP) - MOVL 12(DX),CX - MOVL 12(R10),DX - MOVL 28(R10),R8 - MOVL 8(R10),AX - MOVL DX,32(SP) - MOVL CX, 36 (SP) - MOVL R8, 40 (SP) - MOVL AX, 44 (SP) - MOVQ $1634760805,DX - MOVQ $857760878,CX - MOVQ $2036477234,R8 - MOVQ $1797285236,AX - MOVL DX,48(SP) - MOVL CX, 52 (SP) - MOVL R8, 56 (SP) - MOVL AX, 60 (SP) - CMPQ R9,$256 - JB BYTESBETWEEN1AND255 - MOVOA 48(SP),X0 - PSHUFL $0X55,X0,X1 - PSHUFL $0XAA,X0,X2 - PSHUFL $0XFF,X0,X3 - PSHUFL $0X00,X0,X0 - MOVOA X1,64(SP) - MOVOA X2,80(SP) - MOVOA X3,96(SP) - MOVOA X0,112(SP) - MOVOA 0(SP),X0 - PSHUFL $0XAA,X0,X1 - PSHUFL $0XFF,X0,X2 - PSHUFL $0X00,X0,X3 - PSHUFL $0X55,X0,X0 - MOVOA X1,128(SP) - MOVOA X2,144(SP) - MOVOA X3,160(SP) - MOVOA X0,176(SP) - MOVOA 16(SP),X0 - PSHUFL $0XFF,X0,X1 - PSHUFL $0X55,X0,X2 - PSHUFL $0XAA,X0,X0 - MOVOA X1,192(SP) - MOVOA X2,208(SP) - MOVOA X0,224(SP) - MOVOA 32(SP),X0 - PSHUFL $0X00,X0,X1 - PSHUFL $0XAA,X0,X2 - PSHUFL $0XFF,X0,X0 - MOVOA X1,240(SP) - MOVOA X2,256(SP) - MOVOA X0,272(SP) - BYTESATLEAST256: - MOVL 16(SP),DX - MOVL 36 (SP),CX - MOVL DX,288(SP) - MOVL CX,304(SP) - ADDQ $1,DX - SHLQ $32,CX - ADDQ CX,DX - MOVQ DX,CX - SHRQ $32,CX - MOVL DX, 292 (SP) - MOVL CX, 308 (SP) - ADDQ $1,DX - SHLQ $32,CX - ADDQ CX,DX - MOVQ DX,CX - SHRQ $32,CX - MOVL DX, 296 (SP) - MOVL CX, 312 (SP) - ADDQ $1,DX - SHLQ $32,CX - ADDQ CX,DX - MOVQ DX,CX - SHRQ $32,CX - MOVL DX, 300 (SP) - MOVL CX, 316 (SP) - ADDQ $1,DX - SHLQ $32,CX - ADDQ CX,DX - MOVQ DX,CX - SHRQ $32,CX - MOVL DX,16(SP) - MOVL CX, 36 (SP) - MOVQ R9,352(SP) - MOVQ $20,DX - MOVOA 64(SP),X0 - MOVOA 80(SP),X1 - MOVOA 96(SP),X2 - MOVOA 256(SP),X3 - MOVOA 272(SP),X4 - MOVOA 128(SP),X5 - MOVOA 144(SP),X6 - MOVOA 176(SP),X7 - MOVOA 192(SP),X8 - MOVOA 208(SP),X9 - MOVOA 224(SP),X10 - MOVOA 304(SP),X11 - MOVOA 112(SP),X12 - MOVOA 160(SP),X13 - MOVOA 240(SP),X14 - MOVOA 288(SP),X15 - MAINLOOP1: - MOVOA X1,320(SP) - MOVOA X2,336(SP) - MOVOA X13,X1 - PADDL X12,X1 - MOVOA X1,X2 - PSLLL $7,X1 - PXOR X1,X14 - PSRLL $25,X2 - PXOR X2,X14 - MOVOA X7,X1 - PADDL X0,X1 - MOVOA X1,X2 - PSLLL $7,X1 - PXOR X1,X11 - PSRLL $25,X2 - PXOR X2,X11 - MOVOA X12,X1 - PADDL X14,X1 - MOVOA X1,X2 - PSLLL $9,X1 - PXOR X1,X15 - PSRLL $23,X2 - PXOR X2,X15 - MOVOA X0,X1 - PADDL X11,X1 - MOVOA X1,X2 - PSLLL $9,X1 - PXOR X1,X9 - PSRLL $23,X2 - PXOR X2,X9 - MOVOA X14,X1 - PADDL X15,X1 - MOVOA X1,X2 - PSLLL $13,X1 - PXOR X1,X13 - PSRLL $19,X2 - PXOR X2,X13 - MOVOA X11,X1 - PADDL X9,X1 - MOVOA X1,X2 - PSLLL $13,X1 - PXOR X1,X7 - PSRLL $19,X2 - PXOR X2,X7 - MOVOA X15,X1 - PADDL X13,X1 - MOVOA X1,X2 - PSLLL $18,X1 - PXOR X1,X12 - PSRLL $14,X2 - PXOR X2,X12 - MOVOA 320(SP),X1 - MOVOA X12,320(SP) - MOVOA X9,X2 - PADDL X7,X2 - MOVOA X2,X12 - PSLLL $18,X2 - PXOR X2,X0 - PSRLL $14,X12 - PXOR X12,X0 - MOVOA X5,X2 - PADDL X1,X2 - MOVOA X2,X12 - PSLLL $7,X2 - PXOR X2,X3 - PSRLL $25,X12 - PXOR X12,X3 - MOVOA 336(SP),X2 - MOVOA X0,336(SP) - MOVOA X6,X0 - PADDL X2,X0 - MOVOA X0,X12 - PSLLL $7,X0 - PXOR X0,X4 - PSRLL $25,X12 - PXOR X12,X4 - MOVOA X1,X0 - PADDL X3,X0 - MOVOA X0,X12 - PSLLL $9,X0 - PXOR X0,X10 - PSRLL $23,X12 - PXOR X12,X10 - MOVOA X2,X0 - PADDL X4,X0 - MOVOA X0,X12 - PSLLL $9,X0 - PXOR X0,X8 - PSRLL $23,X12 - PXOR X12,X8 - MOVOA X3,X0 - PADDL X10,X0 - MOVOA X0,X12 - PSLLL $13,X0 - PXOR X0,X5 - PSRLL $19,X12 - PXOR X12,X5 - MOVOA X4,X0 - PADDL X8,X0 - MOVOA X0,X12 - PSLLL $13,X0 - PXOR X0,X6 - PSRLL $19,X12 - PXOR X12,X6 - MOVOA X10,X0 - PADDL X5,X0 - MOVOA X0,X12 - PSLLL $18,X0 - PXOR X0,X1 - PSRLL $14,X12 - PXOR X12,X1 - MOVOA 320(SP),X0 - MOVOA X1,320(SP) - MOVOA X4,X1 - PADDL X0,X1 - MOVOA X1,X12 - PSLLL $7,X1 - PXOR X1,X7 - PSRLL $25,X12 - PXOR X12,X7 - MOVOA X8,X1 - PADDL X6,X1 - MOVOA X1,X12 - PSLLL $18,X1 - PXOR X1,X2 - PSRLL $14,X12 - PXOR X12,X2 - MOVOA 336(SP),X12 - MOVOA X2,336(SP) - MOVOA X14,X1 - PADDL X12,X1 - MOVOA X1,X2 - PSLLL $7,X1 - PXOR X1,X5 - PSRLL $25,X2 - PXOR X2,X5 - MOVOA X0,X1 - PADDL X7,X1 - MOVOA X1,X2 - PSLLL $9,X1 - PXOR X1,X10 - PSRLL $23,X2 - PXOR X2,X10 - MOVOA X12,X1 - PADDL X5,X1 - MOVOA X1,X2 - PSLLL $9,X1 - PXOR X1,X8 - PSRLL $23,X2 - PXOR X2,X8 - MOVOA X7,X1 - PADDL X10,X1 - MOVOA X1,X2 - PSLLL $13,X1 - PXOR X1,X4 - PSRLL $19,X2 - PXOR X2,X4 - MOVOA X5,X1 - PADDL X8,X1 - MOVOA X1,X2 - PSLLL $13,X1 - PXOR X1,X14 - PSRLL $19,X2 - PXOR X2,X14 - MOVOA X10,X1 - PADDL X4,X1 - MOVOA X1,X2 - PSLLL $18,X1 - PXOR X1,X0 - PSRLL $14,X2 - PXOR X2,X0 - MOVOA 320(SP),X1 - MOVOA X0,320(SP) - MOVOA X8,X0 - PADDL X14,X0 - MOVOA X0,X2 - PSLLL $18,X0 - PXOR X0,X12 - PSRLL $14,X2 - PXOR X2,X12 - MOVOA X11,X0 - PADDL X1,X0 - MOVOA X0,X2 - PSLLL $7,X0 - PXOR X0,X6 - PSRLL $25,X2 - PXOR X2,X6 - MOVOA 336(SP),X2 - MOVOA X12,336(SP) - MOVOA X3,X0 - PADDL X2,X0 - MOVOA X0,X12 - PSLLL $7,X0 - PXOR X0,X13 - PSRLL $25,X12 - PXOR X12,X13 - MOVOA X1,X0 - PADDL X6,X0 - MOVOA X0,X12 - PSLLL $9,X0 - PXOR X0,X15 - PSRLL $23,X12 - PXOR X12,X15 - MOVOA X2,X0 - PADDL X13,X0 - MOVOA X0,X12 - PSLLL $9,X0 - PXOR X0,X9 - PSRLL $23,X12 - PXOR X12,X9 - MOVOA X6,X0 - PADDL X15,X0 - MOVOA X0,X12 - PSLLL $13,X0 - PXOR X0,X11 - PSRLL $19,X12 - PXOR X12,X11 - MOVOA X13,X0 - PADDL X9,X0 - MOVOA X0,X12 - PSLLL $13,X0 - PXOR X0,X3 - PSRLL $19,X12 - PXOR X12,X3 - MOVOA X15,X0 - PADDL X11,X0 - MOVOA X0,X12 - PSLLL $18,X0 - PXOR X0,X1 - PSRLL $14,X12 - PXOR X12,X1 - MOVOA X9,X0 - PADDL X3,X0 - MOVOA X0,X12 - PSLLL $18,X0 - PXOR X0,X2 - PSRLL $14,X12 - PXOR X12,X2 - MOVOA 320(SP),X12 - MOVOA 336(SP),X0 - SUBQ $2,DX - JA MAINLOOP1 - PADDL 112(SP),X12 - PADDL 176(SP),X7 - PADDL 224(SP),X10 - PADDL 272(SP),X4 - MOVD X12,DX - MOVD X7,CX - MOVD X10,R8 - MOVD X4,R9 - PSHUFL $0X39,X12,X12 - PSHUFL $0X39,X7,X7 - PSHUFL $0X39,X10,X10 - PSHUFL $0X39,X4,X4 - XORL 0(SI),DX - XORL 4(SI),CX - XORL 8(SI),R8 - XORL 12(SI),R9 - MOVL DX,0(DI) - MOVL CX,4(DI) - MOVL R8,8(DI) - MOVL R9,12(DI) - MOVD X12,DX - MOVD X7,CX - MOVD X10,R8 - MOVD X4,R9 - PSHUFL $0X39,X12,X12 - PSHUFL $0X39,X7,X7 - PSHUFL $0X39,X10,X10 - PSHUFL $0X39,X4,X4 - XORL 64(SI),DX - XORL 68(SI),CX - XORL 72(SI),R8 - XORL 76(SI),R9 - MOVL DX,64(DI) - MOVL CX,68(DI) - MOVL R8,72(DI) - MOVL R9,76(DI) - MOVD X12,DX - MOVD X7,CX - MOVD X10,R8 - MOVD X4,R9 - PSHUFL $0X39,X12,X12 - PSHUFL $0X39,X7,X7 - PSHUFL $0X39,X10,X10 - PSHUFL $0X39,X4,X4 - XORL 128(SI),DX - XORL 132(SI),CX - XORL 136(SI),R8 - XORL 140(SI),R9 - MOVL DX,128(DI) - MOVL CX,132(DI) - MOVL R8,136(DI) - MOVL R9,140(DI) - MOVD X12,DX - MOVD X7,CX - MOVD X10,R8 - MOVD X4,R9 - XORL 192(SI),DX - XORL 196(SI),CX - XORL 200(SI),R8 - XORL 204(SI),R9 - MOVL DX,192(DI) - MOVL CX,196(DI) - MOVL R8,200(DI) - MOVL R9,204(DI) - PADDL 240(SP),X14 - PADDL 64(SP),X0 - PADDL 128(SP),X5 - PADDL 192(SP),X8 - MOVD X14,DX - MOVD X0,CX - MOVD X5,R8 - MOVD X8,R9 - PSHUFL $0X39,X14,X14 - PSHUFL $0X39,X0,X0 - PSHUFL $0X39,X5,X5 - PSHUFL $0X39,X8,X8 - XORL 16(SI),DX - XORL 20(SI),CX - XORL 24(SI),R8 - XORL 28(SI),R9 - MOVL DX,16(DI) - MOVL CX,20(DI) - MOVL R8,24(DI) - MOVL R9,28(DI) - MOVD X14,DX - MOVD X0,CX - MOVD X5,R8 - MOVD X8,R9 - PSHUFL $0X39,X14,X14 - PSHUFL $0X39,X0,X0 - PSHUFL $0X39,X5,X5 - PSHUFL $0X39,X8,X8 - XORL 80(SI),DX - XORL 84(SI),CX - XORL 88(SI),R8 - XORL 92(SI),R9 - MOVL DX,80(DI) - MOVL CX,84(DI) - MOVL R8,88(DI) - MOVL R9,92(DI) - MOVD X14,DX - MOVD X0,CX - MOVD X5,R8 - MOVD X8,R9 - PSHUFL $0X39,X14,X14 - PSHUFL $0X39,X0,X0 - PSHUFL $0X39,X5,X5 - PSHUFL $0X39,X8,X8 - XORL 144(SI),DX - XORL 148(SI),CX - XORL 152(SI),R8 - XORL 156(SI),R9 - MOVL DX,144(DI) - MOVL CX,148(DI) - MOVL R8,152(DI) - MOVL R9,156(DI) - MOVD X14,DX - MOVD X0,CX - MOVD X5,R8 - MOVD X8,R9 - XORL 208(SI),DX - XORL 212(SI),CX - XORL 216(SI),R8 - XORL 220(SI),R9 - MOVL DX,208(DI) - MOVL CX,212(DI) - MOVL R8,216(DI) - MOVL R9,220(DI) - PADDL 288(SP),X15 - PADDL 304(SP),X11 - PADDL 80(SP),X1 - PADDL 144(SP),X6 - MOVD X15,DX - MOVD X11,CX - MOVD X1,R8 - MOVD X6,R9 - PSHUFL $0X39,X15,X15 - PSHUFL $0X39,X11,X11 - PSHUFL $0X39,X1,X1 - PSHUFL $0X39,X6,X6 - XORL 32(SI),DX - XORL 36(SI),CX - XORL 40(SI),R8 - XORL 44(SI),R9 - MOVL DX,32(DI) - MOVL CX,36(DI) - MOVL R8,40(DI) - MOVL R9,44(DI) - MOVD X15,DX - MOVD X11,CX - MOVD X1,R8 - MOVD X6,R9 - PSHUFL $0X39,X15,X15 - PSHUFL $0X39,X11,X11 - PSHUFL $0X39,X1,X1 - PSHUFL $0X39,X6,X6 - XORL 96(SI),DX - XORL 100(SI),CX - XORL 104(SI),R8 - XORL 108(SI),R9 - MOVL DX,96(DI) - MOVL CX,100(DI) - MOVL R8,104(DI) - MOVL R9,108(DI) - MOVD X15,DX - MOVD X11,CX - MOVD X1,R8 - MOVD X6,R9 - PSHUFL $0X39,X15,X15 - PSHUFL $0X39,X11,X11 - PSHUFL $0X39,X1,X1 - PSHUFL $0X39,X6,X6 - XORL 160(SI),DX - XORL 164(SI),CX - XORL 168(SI),R8 - XORL 172(SI),R9 - MOVL DX,160(DI) - MOVL CX,164(DI) - MOVL R8,168(DI) - MOVL R9,172(DI) - MOVD X15,DX - MOVD X11,CX - MOVD X1,R8 - MOVD X6,R9 - XORL 224(SI),DX - XORL 228(SI),CX - XORL 232(SI),R8 - XORL 236(SI),R9 - MOVL DX,224(DI) - MOVL CX,228(DI) - MOVL R8,232(DI) - MOVL R9,236(DI) - PADDL 160(SP),X13 - PADDL 208(SP),X9 - PADDL 256(SP),X3 - PADDL 96(SP),X2 - MOVD X13,DX - MOVD X9,CX - MOVD X3,R8 - MOVD X2,R9 - PSHUFL $0X39,X13,X13 - PSHUFL $0X39,X9,X9 - PSHUFL $0X39,X3,X3 - PSHUFL $0X39,X2,X2 - XORL 48(SI),DX - XORL 52(SI),CX - XORL 56(SI),R8 - XORL 60(SI),R9 - MOVL DX,48(DI) - MOVL CX,52(DI) - MOVL R8,56(DI) - MOVL R9,60(DI) - MOVD X13,DX - MOVD X9,CX - MOVD X3,R8 - MOVD X2,R9 - PSHUFL $0X39,X13,X13 - PSHUFL $0X39,X9,X9 - PSHUFL $0X39,X3,X3 - PSHUFL $0X39,X2,X2 - XORL 112(SI),DX - XORL 116(SI),CX - XORL 120(SI),R8 - XORL 124(SI),R9 - MOVL DX,112(DI) - MOVL CX,116(DI) - MOVL R8,120(DI) - MOVL R9,124(DI) - MOVD X13,DX - MOVD X9,CX - MOVD X3,R8 - MOVD X2,R9 - PSHUFL $0X39,X13,X13 - PSHUFL $0X39,X9,X9 - PSHUFL $0X39,X3,X3 - PSHUFL $0X39,X2,X2 - XORL 176(SI),DX - XORL 180(SI),CX - XORL 184(SI),R8 - XORL 188(SI),R9 - MOVL DX,176(DI) - MOVL CX,180(DI) - MOVL R8,184(DI) - MOVL R9,188(DI) - MOVD X13,DX - MOVD X9,CX - MOVD X3,R8 - MOVD X2,R9 - XORL 240(SI),DX - XORL 244(SI),CX - XORL 248(SI),R8 - XORL 252(SI),R9 - MOVL DX,240(DI) - MOVL CX,244(DI) - MOVL R8,248(DI) - MOVL R9,252(DI) - MOVQ 352(SP),R9 - SUBQ $256,R9 - ADDQ $256,SI - ADDQ $256,DI - CMPQ R9,$256 - JAE BYTESATLEAST256 - CMPQ R9,$0 - JBE DONE - BYTESBETWEEN1AND255: - CMPQ R9,$64 - JAE NOCOPY - MOVQ DI,DX - LEAQ 360(SP),DI - MOVQ R9,CX - REP; MOVSB - LEAQ 360(SP),DI - LEAQ 360(SP),SI - NOCOPY: - MOVQ R9,352(SP) - MOVOA 48(SP),X0 - MOVOA 0(SP),X1 - MOVOA 16(SP),X2 - MOVOA 32(SP),X3 - MOVOA X1,X4 - MOVQ $20,CX - MAINLOOP2: - PADDL X0,X4 - MOVOA X0,X5 - MOVOA X4,X6 - PSLLL $7,X4 - PSRLL $25,X6 - PXOR X4,X3 - PXOR X6,X3 - PADDL X3,X5 - MOVOA X3,X4 - MOVOA X5,X6 - PSLLL $9,X5 - PSRLL $23,X6 - PXOR X5,X2 - PSHUFL $0X93,X3,X3 - PXOR X6,X2 - PADDL X2,X4 - MOVOA X2,X5 - MOVOA X4,X6 - PSLLL $13,X4 - PSRLL $19,X6 - PXOR X4,X1 - PSHUFL $0X4E,X2,X2 - PXOR X6,X1 - PADDL X1,X5 - MOVOA X3,X4 - MOVOA X5,X6 - PSLLL $18,X5 - PSRLL $14,X6 - PXOR X5,X0 - PSHUFL $0X39,X1,X1 - PXOR X6,X0 - PADDL X0,X4 - MOVOA X0,X5 - MOVOA X4,X6 - PSLLL $7,X4 - PSRLL $25,X6 - PXOR X4,X1 - PXOR X6,X1 - PADDL X1,X5 - MOVOA X1,X4 - MOVOA X5,X6 - PSLLL $9,X5 - PSRLL $23,X6 - PXOR X5,X2 - PSHUFL $0X93,X1,X1 - PXOR X6,X2 - PADDL X2,X4 - MOVOA X2,X5 - MOVOA X4,X6 - PSLLL $13,X4 - PSRLL $19,X6 - PXOR X4,X3 - PSHUFL $0X4E,X2,X2 - PXOR X6,X3 - PADDL X3,X5 - MOVOA X1,X4 - MOVOA X5,X6 - PSLLL $18,X5 - PSRLL $14,X6 - PXOR X5,X0 - PSHUFL $0X39,X3,X3 - PXOR X6,X0 - PADDL X0,X4 - MOVOA X0,X5 - MOVOA X4,X6 - PSLLL $7,X4 - PSRLL $25,X6 - PXOR X4,X3 - PXOR X6,X3 - PADDL X3,X5 - MOVOA X3,X4 - MOVOA X5,X6 - PSLLL $9,X5 - PSRLL $23,X6 - PXOR X5,X2 - PSHUFL $0X93,X3,X3 - PXOR X6,X2 - PADDL X2,X4 - MOVOA X2,X5 - MOVOA X4,X6 - PSLLL $13,X4 - PSRLL $19,X6 - PXOR X4,X1 - PSHUFL $0X4E,X2,X2 - PXOR X6,X1 - PADDL X1,X5 - MOVOA X3,X4 - MOVOA X5,X6 - PSLLL $18,X5 - PSRLL $14,X6 - PXOR X5,X0 - PSHUFL $0X39,X1,X1 - PXOR X6,X0 - PADDL X0,X4 - MOVOA X0,X5 - MOVOA X4,X6 - PSLLL $7,X4 - PSRLL $25,X6 - PXOR X4,X1 - PXOR X6,X1 - PADDL X1,X5 - MOVOA X1,X4 - MOVOA X5,X6 - PSLLL $9,X5 - PSRLL $23,X6 - PXOR X5,X2 - PSHUFL $0X93,X1,X1 - PXOR X6,X2 - PADDL X2,X4 - MOVOA X2,X5 - MOVOA X4,X6 - PSLLL $13,X4 - PSRLL $19,X6 - PXOR X4,X3 - PSHUFL $0X4E,X2,X2 - PXOR X6,X3 - SUBQ $4,CX - PADDL X3,X5 - MOVOA X1,X4 - MOVOA X5,X6 - PSLLL $18,X5 - PXOR X7,X7 - PSRLL $14,X6 - PXOR X5,X0 - PSHUFL $0X39,X3,X3 - PXOR X6,X0 - JA MAINLOOP2 - PADDL 48(SP),X0 - PADDL 0(SP),X1 - PADDL 16(SP),X2 - PADDL 32(SP),X3 - MOVD X0,CX - MOVD X1,R8 - MOVD X2,R9 - MOVD X3,AX - PSHUFL $0X39,X0,X0 - PSHUFL $0X39,X1,X1 - PSHUFL $0X39,X2,X2 - PSHUFL $0X39,X3,X3 - XORL 0(SI),CX - XORL 48(SI),R8 - XORL 32(SI),R9 - XORL 16(SI),AX - MOVL CX,0(DI) - MOVL R8,48(DI) - MOVL R9,32(DI) - MOVL AX,16(DI) - MOVD X0,CX - MOVD X1,R8 - MOVD X2,R9 - MOVD X3,AX - PSHUFL $0X39,X0,X0 - PSHUFL $0X39,X1,X1 - PSHUFL $0X39,X2,X2 - PSHUFL $0X39,X3,X3 - XORL 20(SI),CX - XORL 4(SI),R8 - XORL 52(SI),R9 - XORL 36(SI),AX - MOVL CX,20(DI) - MOVL R8,4(DI) - MOVL R9,52(DI) - MOVL AX,36(DI) - MOVD X0,CX - MOVD X1,R8 - MOVD X2,R9 - MOVD X3,AX - PSHUFL $0X39,X0,X0 - PSHUFL $0X39,X1,X1 - PSHUFL $0X39,X2,X2 - PSHUFL $0X39,X3,X3 - XORL 40(SI),CX - XORL 24(SI),R8 - XORL 8(SI),R9 - XORL 56(SI),AX - MOVL CX,40(DI) - MOVL R8,24(DI) - MOVL R9,8(DI) - MOVL AX,56(DI) - MOVD X0,CX - MOVD X1,R8 - MOVD X2,R9 - MOVD X3,AX - XORL 60(SI),CX - XORL 44(SI),R8 - XORL 28(SI),R9 - XORL 12(SI),AX - MOVL CX,60(DI) - MOVL R8,44(DI) - MOVL R9,28(DI) - MOVL AX,12(DI) - MOVQ 352(SP),R9 - MOVL 16(SP),CX - MOVL 36 (SP),R8 - ADDQ $1,CX - SHLQ $32,R8 - ADDQ R8,CX - MOVQ CX,R8 - SHRQ $32,R8 - MOVL CX,16(SP) - MOVL R8, 36 (SP) - CMPQ R9,$64 - JA BYTESATLEAST65 - JAE BYTESATLEAST64 - MOVQ DI,SI - MOVQ DX,DI - MOVQ R9,CX - REP; MOVSB - BYTESATLEAST64: - DONE: - MOVQ R12,SP - RET - BYTESATLEAST65: - SUBQ $64,R9 - ADDQ $64,DI - ADDQ $64,SI - JMP BYTESBETWEEN1AND255 diff --git a/vendor/golang.org/x/crypto/salsa20/salsa/salsa208.go b/vendor/golang.org/x/crypto/salsa20/salsa/salsa208.go deleted file mode 100644 index 9bfc0927c..000000000 --- a/vendor/golang.org/x/crypto/salsa20/salsa/salsa208.go +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package salsa - -// Core208 applies the Salsa20/8 core function to the 64-byte array in and puts -// the result into the 64-byte array out. The input and output may be the same array. -func Core208(out *[64]byte, in *[64]byte) { - j0 := uint32(in[0]) | uint32(in[1])<<8 | uint32(in[2])<<16 | uint32(in[3])<<24 - j1 := uint32(in[4]) | uint32(in[5])<<8 | uint32(in[6])<<16 | uint32(in[7])<<24 - j2 := uint32(in[8]) | uint32(in[9])<<8 | uint32(in[10])<<16 | uint32(in[11])<<24 - j3 := uint32(in[12]) | uint32(in[13])<<8 | uint32(in[14])<<16 | uint32(in[15])<<24 - j4 := uint32(in[16]) | uint32(in[17])<<8 | uint32(in[18])<<16 | uint32(in[19])<<24 - j5 := uint32(in[20]) | uint32(in[21])<<8 | uint32(in[22])<<16 | uint32(in[23])<<24 - j6 := uint32(in[24]) | uint32(in[25])<<8 | uint32(in[26])<<16 | uint32(in[27])<<24 - j7 := uint32(in[28]) | uint32(in[29])<<8 | uint32(in[30])<<16 | uint32(in[31])<<24 - j8 := uint32(in[32]) | uint32(in[33])<<8 | uint32(in[34])<<16 | uint32(in[35])<<24 - j9 := uint32(in[36]) | uint32(in[37])<<8 | uint32(in[38])<<16 | uint32(in[39])<<24 - j10 := uint32(in[40]) | uint32(in[41])<<8 | uint32(in[42])<<16 | uint32(in[43])<<24 - j11 := uint32(in[44]) | uint32(in[45])<<8 | uint32(in[46])<<16 | uint32(in[47])<<24 - j12 := uint32(in[48]) | uint32(in[49])<<8 | uint32(in[50])<<16 | uint32(in[51])<<24 - j13 := uint32(in[52]) | uint32(in[53])<<8 | uint32(in[54])<<16 | uint32(in[55])<<24 - j14 := uint32(in[56]) | uint32(in[57])<<8 | uint32(in[58])<<16 | uint32(in[59])<<24 - j15 := uint32(in[60]) | uint32(in[61])<<8 | uint32(in[62])<<16 | uint32(in[63])<<24 - - x0, x1, x2, x3, x4, x5, x6, x7, x8 := j0, j1, j2, j3, j4, j5, j6, j7, j8 - x9, x10, x11, x12, x13, x14, x15 := j9, j10, j11, j12, j13, j14, j15 - - for i := 0; i < 8; i += 2 { - u := x0 + x12 - x4 ^= u<<7 | u>>(32-7) - u = x4 + x0 - x8 ^= u<<9 | u>>(32-9) - u = x8 + x4 - x12 ^= u<<13 | u>>(32-13) - u = x12 + x8 - x0 ^= u<<18 | u>>(32-18) - - u = x5 + x1 - x9 ^= u<<7 | u>>(32-7) - u = x9 + x5 - x13 ^= u<<9 | u>>(32-9) - u = x13 + x9 - x1 ^= u<<13 | u>>(32-13) - u = x1 + x13 - x5 ^= u<<18 | u>>(32-18) - - u = x10 + x6 - x14 ^= u<<7 | u>>(32-7) - u = x14 + x10 - x2 ^= u<<9 | u>>(32-9) - u = x2 + x14 - x6 ^= u<<13 | u>>(32-13) - u = x6 + x2 - x10 ^= u<<18 | u>>(32-18) - - u = x15 + x11 - x3 ^= u<<7 | u>>(32-7) - u = x3 + x15 - x7 ^= u<<9 | u>>(32-9) - u = x7 + x3 - x11 ^= u<<13 | u>>(32-13) - u = x11 + x7 - x15 ^= u<<18 | u>>(32-18) - - u = x0 + x3 - x1 ^= u<<7 | u>>(32-7) - u = x1 + x0 - x2 ^= u<<9 | u>>(32-9) - u = x2 + x1 - x3 ^= u<<13 | u>>(32-13) - u = x3 + x2 - x0 ^= u<<18 | u>>(32-18) - - u = x5 + x4 - x6 ^= u<<7 | u>>(32-7) - u = x6 + x5 - x7 ^= u<<9 | u>>(32-9) - u = x7 + x6 - x4 ^= u<<13 | u>>(32-13) - u = x4 + x7 - x5 ^= u<<18 | u>>(32-18) - - u = x10 + x9 - x11 ^= u<<7 | u>>(32-7) - u = x11 + x10 - x8 ^= u<<9 | u>>(32-9) - u = x8 + x11 - x9 ^= u<<13 | u>>(32-13) - u = x9 + x8 - x10 ^= u<<18 | u>>(32-18) - - u = x15 + x14 - x12 ^= u<<7 | u>>(32-7) - u = x12 + x15 - x13 ^= u<<9 | u>>(32-9) - u = x13 + x12 - x14 ^= u<<13 | u>>(32-13) - u = x14 + x13 - x15 ^= u<<18 | u>>(32-18) - } - x0 += j0 - x1 += j1 - x2 += j2 - x3 += j3 - x4 += j4 - x5 += j5 - x6 += j6 - x7 += j7 - x8 += j8 - x9 += j9 - x10 += j10 - x11 += j11 - x12 += j12 - x13 += j13 - x14 += j14 - x15 += j15 - - out[0] = byte(x0) - out[1] = byte(x0 >> 8) - out[2] = byte(x0 >> 16) - out[3] = byte(x0 >> 24) - - out[4] = byte(x1) - out[5] = byte(x1 >> 8) - out[6] = byte(x1 >> 16) - out[7] = byte(x1 >> 24) - - out[8] = byte(x2) - out[9] = byte(x2 >> 8) - out[10] = byte(x2 >> 16) - out[11] = byte(x2 >> 24) - - out[12] = byte(x3) - out[13] = byte(x3 >> 8) - out[14] = byte(x3 >> 16) - out[15] = byte(x3 >> 24) - - out[16] = byte(x4) - out[17] = byte(x4 >> 8) - out[18] = byte(x4 >> 16) - out[19] = byte(x4 >> 24) - - out[20] = byte(x5) - out[21] = byte(x5 >> 8) - out[22] = byte(x5 >> 16) - out[23] = byte(x5 >> 24) - - out[24] = byte(x6) - out[25] = byte(x6 >> 8) - out[26] = byte(x6 >> 16) - out[27] = byte(x6 >> 24) - - out[28] = byte(x7) - out[29] = byte(x7 >> 8) - out[30] = byte(x7 >> 16) - out[31] = byte(x7 >> 24) - - out[32] = byte(x8) - out[33] = byte(x8 >> 8) - out[34] = byte(x8 >> 16) - out[35] = byte(x8 >> 24) - - out[36] = byte(x9) - out[37] = byte(x9 >> 8) - out[38] = byte(x9 >> 16) - out[39] = byte(x9 >> 24) - - out[40] = byte(x10) - out[41] = byte(x10 >> 8) - out[42] = byte(x10 >> 16) - out[43] = byte(x10 >> 24) - - out[44] = byte(x11) - out[45] = byte(x11 >> 8) - out[46] = byte(x11 >> 16) - out[47] = byte(x11 >> 24) - - out[48] = byte(x12) - out[49] = byte(x12 >> 8) - out[50] = byte(x12 >> 16) - out[51] = byte(x12 >> 24) - - out[52] = byte(x13) - out[53] = byte(x13 >> 8) - out[54] = byte(x13 >> 16) - out[55] = byte(x13 >> 24) - - out[56] = byte(x14) - out[57] = byte(x14 >> 8) - out[58] = byte(x14 >> 16) - out[59] = byte(x14 >> 24) - - out[60] = byte(x15) - out[61] = byte(x15 >> 8) - out[62] = byte(x15 >> 16) - out[63] = byte(x15 >> 24) -} diff --git a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go deleted file mode 100644 index c34d362ee..000000000 --- a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build amd64,!appengine,!gccgo - -package salsa - -// This function is implemented in salsa2020_amd64.s. - -//go:noescape - -func salsa2020XORKeyStream(out, in *byte, n uint64, nonce, key *byte) - -// XORKeyStream crypts bytes from in to out using the given key and counters. -// In and out may be the same slice but otherwise should not overlap. Counter -// contains the raw salsa20 counter bytes (both nonce and block counter). -func XORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) { - if len(in) == 0 { - return - } - _ = out[len(in)-1] - salsa2020XORKeyStream(&out[0], &in[0], uint64(len(in)), &counter[0], &key[0]) -} diff --git a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_ref.go b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_ref.go deleted file mode 100644 index 95f8ca5bb..000000000 --- a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_ref.go +++ /dev/null @@ -1,234 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !amd64 appengine gccgo - -package salsa - -const rounds = 20 - -// core applies the Salsa20 core function to 16-byte input in, 32-byte key k, -// and 16-byte constant c, and puts the result into 64-byte array out. -func core(out *[64]byte, in *[16]byte, k *[32]byte, c *[16]byte) { - j0 := uint32(c[0]) | uint32(c[1])<<8 | uint32(c[2])<<16 | uint32(c[3])<<24 - j1 := uint32(k[0]) | uint32(k[1])<<8 | uint32(k[2])<<16 | uint32(k[3])<<24 - j2 := uint32(k[4]) | uint32(k[5])<<8 | uint32(k[6])<<16 | uint32(k[7])<<24 - j3 := uint32(k[8]) | uint32(k[9])<<8 | uint32(k[10])<<16 | uint32(k[11])<<24 - j4 := uint32(k[12]) | uint32(k[13])<<8 | uint32(k[14])<<16 | uint32(k[15])<<24 - j5 := uint32(c[4]) | uint32(c[5])<<8 | uint32(c[6])<<16 | uint32(c[7])<<24 - j6 := uint32(in[0]) | uint32(in[1])<<8 | uint32(in[2])<<16 | uint32(in[3])<<24 - j7 := uint32(in[4]) | uint32(in[5])<<8 | uint32(in[6])<<16 | uint32(in[7])<<24 - j8 := uint32(in[8]) | uint32(in[9])<<8 | uint32(in[10])<<16 | uint32(in[11])<<24 - j9 := uint32(in[12]) | uint32(in[13])<<8 | uint32(in[14])<<16 | uint32(in[15])<<24 - j10 := uint32(c[8]) | uint32(c[9])<<8 | uint32(c[10])<<16 | uint32(c[11])<<24 - j11 := uint32(k[16]) | uint32(k[17])<<8 | uint32(k[18])<<16 | uint32(k[19])<<24 - j12 := uint32(k[20]) | uint32(k[21])<<8 | uint32(k[22])<<16 | uint32(k[23])<<24 - j13 := uint32(k[24]) | uint32(k[25])<<8 | uint32(k[26])<<16 | uint32(k[27])<<24 - j14 := uint32(k[28]) | uint32(k[29])<<8 | uint32(k[30])<<16 | uint32(k[31])<<24 - j15 := uint32(c[12]) | uint32(c[13])<<8 | uint32(c[14])<<16 | uint32(c[15])<<24 - - x0, x1, x2, x3, x4, x5, x6, x7, x8 := j0, j1, j2, j3, j4, j5, j6, j7, j8 - x9, x10, x11, x12, x13, x14, x15 := j9, j10, j11, j12, j13, j14, j15 - - for i := 0; i < rounds; i += 2 { - u := x0 + x12 - x4 ^= u<<7 | u>>(32-7) - u = x4 + x0 - x8 ^= u<<9 | u>>(32-9) - u = x8 + x4 - x12 ^= u<<13 | u>>(32-13) - u = x12 + x8 - x0 ^= u<<18 | u>>(32-18) - - u = x5 + x1 - x9 ^= u<<7 | u>>(32-7) - u = x9 + x5 - x13 ^= u<<9 | u>>(32-9) - u = x13 + x9 - x1 ^= u<<13 | u>>(32-13) - u = x1 + x13 - x5 ^= u<<18 | u>>(32-18) - - u = x10 + x6 - x14 ^= u<<7 | u>>(32-7) - u = x14 + x10 - x2 ^= u<<9 | u>>(32-9) - u = x2 + x14 - x6 ^= u<<13 | u>>(32-13) - u = x6 + x2 - x10 ^= u<<18 | u>>(32-18) - - u = x15 + x11 - x3 ^= u<<7 | u>>(32-7) - u = x3 + x15 - x7 ^= u<<9 | u>>(32-9) - u = x7 + x3 - x11 ^= u<<13 | u>>(32-13) - u = x11 + x7 - x15 ^= u<<18 | u>>(32-18) - - u = x0 + x3 - x1 ^= u<<7 | u>>(32-7) - u = x1 + x0 - x2 ^= u<<9 | u>>(32-9) - u = x2 + x1 - x3 ^= u<<13 | u>>(32-13) - u = x3 + x2 - x0 ^= u<<18 | u>>(32-18) - - u = x5 + x4 - x6 ^= u<<7 | u>>(32-7) - u = x6 + x5 - x7 ^= u<<9 | u>>(32-9) - u = x7 + x6 - x4 ^= u<<13 | u>>(32-13) - u = x4 + x7 - x5 ^= u<<18 | u>>(32-18) - - u = x10 + x9 - x11 ^= u<<7 | u>>(32-7) - u = x11 + x10 - x8 ^= u<<9 | u>>(32-9) - u = x8 + x11 - x9 ^= u<<13 | u>>(32-13) - u = x9 + x8 - x10 ^= u<<18 | u>>(32-18) - - u = x15 + x14 - x12 ^= u<<7 | u>>(32-7) - u = x12 + x15 - x13 ^= u<<9 | u>>(32-9) - u = x13 + x12 - x14 ^= u<<13 | u>>(32-13) - u = x14 + x13 - x15 ^= u<<18 | u>>(32-18) - } - x0 += j0 - x1 += j1 - x2 += j2 - x3 += j3 - x4 += j4 - x5 += j5 - x6 += j6 - x7 += j7 - x8 += j8 - x9 += j9 - x10 += j10 - x11 += j11 - x12 += j12 - x13 += j13 - x14 += j14 - x15 += j15 - - out[0] = byte(x0) - out[1] = byte(x0 >> 8) - out[2] = byte(x0 >> 16) - out[3] = byte(x0 >> 24) - - out[4] = byte(x1) - out[5] = byte(x1 >> 8) - out[6] = byte(x1 >> 16) - out[7] = byte(x1 >> 24) - - out[8] = byte(x2) - out[9] = byte(x2 >> 8) - out[10] = byte(x2 >> 16) - out[11] = byte(x2 >> 24) - - out[12] = byte(x3) - out[13] = byte(x3 >> 8) - out[14] = byte(x3 >> 16) - out[15] = byte(x3 >> 24) - - out[16] = byte(x4) - out[17] = byte(x4 >> 8) - out[18] = byte(x4 >> 16) - out[19] = byte(x4 >> 24) - - out[20] = byte(x5) - out[21] = byte(x5 >> 8) - out[22] = byte(x5 >> 16) - out[23] = byte(x5 >> 24) - - out[24] = byte(x6) - out[25] = byte(x6 >> 8) - out[26] = byte(x6 >> 16) - out[27] = byte(x6 >> 24) - - out[28] = byte(x7) - out[29] = byte(x7 >> 8) - out[30] = byte(x7 >> 16) - out[31] = byte(x7 >> 24) - - out[32] = byte(x8) - out[33] = byte(x8 >> 8) - out[34] = byte(x8 >> 16) - out[35] = byte(x8 >> 24) - - out[36] = byte(x9) - out[37] = byte(x9 >> 8) - out[38] = byte(x9 >> 16) - out[39] = byte(x9 >> 24) - - out[40] = byte(x10) - out[41] = byte(x10 >> 8) - out[42] = byte(x10 >> 16) - out[43] = byte(x10 >> 24) - - out[44] = byte(x11) - out[45] = byte(x11 >> 8) - out[46] = byte(x11 >> 16) - out[47] = byte(x11 >> 24) - - out[48] = byte(x12) - out[49] = byte(x12 >> 8) - out[50] = byte(x12 >> 16) - out[51] = byte(x12 >> 24) - - out[52] = byte(x13) - out[53] = byte(x13 >> 8) - out[54] = byte(x13 >> 16) - out[55] = byte(x13 >> 24) - - out[56] = byte(x14) - out[57] = byte(x14 >> 8) - out[58] = byte(x14 >> 16) - out[59] = byte(x14 >> 24) - - out[60] = byte(x15) - out[61] = byte(x15 >> 8) - out[62] = byte(x15 >> 16) - out[63] = byte(x15 >> 24) -} - -// XORKeyStream crypts bytes from in to out using the given key and counters. -// In and out may be the same slice but otherwise should not overlap. Counter -// contains the raw salsa20 counter bytes (both nonce and block counter). -func XORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) { - var block [64]byte - var counterCopy [16]byte - copy(counterCopy[:], counter[:]) - - for len(in) >= 64 { - core(&block, &counterCopy, key, &Sigma) - for i, x := range block { - out[i] = in[i] ^ x - } - u := uint32(1) - for i := 8; i < 16; i++ { - u += uint32(counterCopy[i]) - counterCopy[i] = byte(u) - u >>= 8 - } - in = in[64:] - out = out[64:] - } - - if len(in) > 0 { - core(&block, &counterCopy, key, &Sigma) - for i, v := range in { - out[i] = v ^ block[i] - } - } -} diff --git a/vendor/golang.org/x/crypto/ssh/benchmark_test.go b/vendor/golang.org/x/crypto/ssh/benchmark_test.go new file mode 100644 index 000000000..d9f7eb9b6 --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/benchmark_test.go @@ -0,0 +1,122 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +import ( + "errors" + "io" + "net" + "testing" +) + +type server struct { + *ServerConn + chans <-chan NewChannel +} + +func newServer(c net.Conn, conf *ServerConfig) (*server, error) { + sconn, chans, reqs, err := NewServerConn(c, conf) + if err != nil { + return nil, err + } + go DiscardRequests(reqs) + return &server{sconn, chans}, nil +} + +func (s *server) Accept() (NewChannel, error) { + n, ok := <-s.chans + if !ok { + return nil, io.EOF + } + return n, nil +} + +func sshPipe() (Conn, *server, error) { + c1, c2, err := netPipe() + if err != nil { + return nil, nil, err + } + + clientConf := ClientConfig{ + User: "user", + } + serverConf := ServerConfig{ + NoClientAuth: true, + } + serverConf.AddHostKey(testSigners["ecdsa"]) + done := make(chan *server, 1) + go func() { + server, err := newServer(c2, &serverConf) + if err != nil { + done <- nil + } + done <- server + }() + + client, _, reqs, err := NewClientConn(c1, "", &clientConf) + if err != nil { + return nil, nil, err + } + + server := <-done + if server == nil { + return nil, nil, errors.New("server handshake failed.") + } + go DiscardRequests(reqs) + + return client, server, nil +} + +func BenchmarkEndToEnd(b *testing.B) { + b.StopTimer() + + client, server, err := sshPipe() + if err != nil { + b.Fatalf("sshPipe: %v", err) + } + + defer client.Close() + defer server.Close() + + size := (1 << 20) + input := make([]byte, size) + output := make([]byte, size) + b.SetBytes(int64(size)) + done := make(chan int, 1) + + go func() { + newCh, err := server.Accept() + if err != nil { + b.Fatalf("Client: %v", err) + } + ch, incoming, err := newCh.Accept() + go DiscardRequests(incoming) + for i := 0; i < b.N; i++ { + if _, err := io.ReadFull(ch, output); err != nil { + b.Fatalf("ReadFull: %v", err) + } + } + ch.Close() + done <- 1 + }() + + ch, in, err := client.OpenChannel("speed", nil) + if err != nil { + b.Fatalf("OpenChannel: %v", err) + } + go DiscardRequests(in) + + b.ResetTimer() + b.StartTimer() + for i := 0; i < b.N; i++ { + if _, err := ch.Write(input); err != nil { + b.Fatalf("WriteFull: %v", err) + } + } + ch.Close() + b.StopTimer() + + <-done +} diff --git a/vendor/golang.org/x/crypto/ssh/buffer.go b/vendor/golang.org/x/crypto/ssh/buffer.go new file mode 100644 index 000000000..1ab07d078 --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/buffer.go @@ -0,0 +1,97 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +import ( + "io" + "sync" +) + +// buffer provides a linked list buffer for data exchange +// between producer and consumer. Theoretically the buffer is +// of unlimited capacity as it does no allocation of its own. +type buffer struct { + // protects concurrent access to head, tail and closed + *sync.Cond + + head *element // the buffer that will be read first + tail *element // the buffer that will be read last + + closed bool +} + +// An element represents a single link in a linked list. +type element struct { + buf []byte + next *element +} + +// newBuffer returns an empty buffer that is not closed. +func newBuffer() *buffer { + e := new(element) + b := &buffer{ + Cond: newCond(), + head: e, + tail: e, + } + return b +} + +// write makes buf available for Read to receive. +// buf must not be modified after the call to write. +func (b *buffer) write(buf []byte) { + b.Cond.L.Lock() + e := &element{buf: buf} + b.tail.next = e + b.tail = e + b.Cond.Signal() + b.Cond.L.Unlock() +} + +// eof closes the buffer. Reads from the buffer once all +// the data has been consumed will receive io.EOF. +func (b *buffer) eof() { + b.Cond.L.Lock() + b.closed = true + b.Cond.Signal() + b.Cond.L.Unlock() +} + +// Read reads data from the internal buffer in buf. Reads will block +// if no data is available, or until the buffer is closed. +func (b *buffer) Read(buf []byte) (n int, err error) { + b.Cond.L.Lock() + defer b.Cond.L.Unlock() + + for len(buf) > 0 { + // if there is data in b.head, copy it + if len(b.head.buf) > 0 { + r := copy(buf, b.head.buf) + buf, b.head.buf = buf[r:], b.head.buf[r:] + n += r + continue + } + // if there is a next buffer, make it the head + if len(b.head.buf) == 0 && b.head != b.tail { + b.head = b.head.next + continue + } + + // if at least one byte has been copied, return + if n > 0 { + break + } + + // if nothing was read, and there is nothing outstanding + // check to see if the buffer is closed. + if b.closed { + err = io.EOF + break + } + // out of buffers, wait for producer + b.Cond.Wait() + } + return +} diff --git a/vendor/golang.org/x/crypto/ssh/buffer_test.go b/vendor/golang.org/x/crypto/ssh/buffer_test.go new file mode 100644 index 000000000..d5781cb3d --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/buffer_test.go @@ -0,0 +1,87 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +import ( + "io" + "testing" +) + +var alphabet = []byte("abcdefghijklmnopqrstuvwxyz") + +func TestBufferReadwrite(t *testing.T) { + b := newBuffer() + b.write(alphabet[:10]) + r, _ := b.Read(make([]byte, 10)) + if r != 10 { + t.Fatalf("Expected written == read == 10, written: 10, read %d", r) + } + + b = newBuffer() + b.write(alphabet[:5]) + r, _ = b.Read(make([]byte, 10)) + if r != 5 { + t.Fatalf("Expected written == read == 5, written: 5, read %d", r) + } + + b = newBuffer() + b.write(alphabet[:10]) + r, _ = b.Read(make([]byte, 5)) + if r != 5 { + t.Fatalf("Expected written == 10, read == 5, written: 10, read %d", r) + } + + b = newBuffer() + b.write(alphabet[:5]) + b.write(alphabet[5:15]) + r, _ = b.Read(make([]byte, 10)) + r2, _ := b.Read(make([]byte, 10)) + if r != 10 || r2 != 5 || 15 != r+r2 { + t.Fatal("Expected written == read == 15") + } +} + +func TestBufferClose(t *testing.T) { + b := newBuffer() + b.write(alphabet[:10]) + b.eof() + _, err := b.Read(make([]byte, 5)) + if err != nil { + t.Fatal("expected read of 5 to not return EOF") + } + b = newBuffer() + b.write(alphabet[:10]) + b.eof() + r, err := b.Read(make([]byte, 5)) + r2, err2 := b.Read(make([]byte, 10)) + if r != 5 || r2 != 5 || err != nil || err2 != nil { + t.Fatal("expected reads of 5 and 5") + } + + b = newBuffer() + b.write(alphabet[:10]) + b.eof() + r, err = b.Read(make([]byte, 5)) + r2, err2 = b.Read(make([]byte, 10)) + r3, err3 := b.Read(make([]byte, 10)) + if r != 5 || r2 != 5 || r3 != 0 || err != nil || err2 != nil || err3 != io.EOF { + t.Fatal("expected reads of 5 and 5 and 0, with EOF") + } + + b = newBuffer() + b.write(make([]byte, 5)) + b.write(make([]byte, 10)) + b.eof() + r, err = b.Read(make([]byte, 9)) + r2, err2 = b.Read(make([]byte, 3)) + r3, err3 = b.Read(make([]byte, 3)) + r4, err4 := b.Read(make([]byte, 10)) + if err != nil || err2 != nil || err3 != nil || err4 != io.EOF { + t.Fatalf("Expected EOF on forth read only, err=%v, err2=%v, err3=%v, err4=%v", err, err2, err3, err4) + } + if r != 9 || r2 != 3 || r3 != 3 || r4 != 0 { + t.Fatal("Expected written == read == 15", r, r2, r3, r4) + } +} diff --git a/vendor/golang.org/x/crypto/ssh/certs.go b/vendor/golang.org/x/crypto/ssh/certs.go new file mode 100644 index 000000000..b1f022078 --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/certs.go @@ -0,0 +1,519 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +import ( + "bytes" + "errors" + "fmt" + "io" + "net" + "sort" + "time" +) + +// These constants from [PROTOCOL.certkeys] represent the algorithm names +// for certificate types supported by this package. +const ( + CertAlgoRSAv01 = "ssh-rsa-cert-v01@openssh.com" + CertAlgoDSAv01 = "ssh-dss-cert-v01@openssh.com" + CertAlgoECDSA256v01 = "ecdsa-sha2-nistp256-cert-v01@openssh.com" + CertAlgoECDSA384v01 = "ecdsa-sha2-nistp384-cert-v01@openssh.com" + CertAlgoECDSA521v01 = "ecdsa-sha2-nistp521-cert-v01@openssh.com" + CertAlgoED25519v01 = "ssh-ed25519-cert-v01@openssh.com" +) + +// Certificate types distinguish between host and user +// certificates. The values can be set in the CertType field of +// Certificate. +const ( + UserCert = 1 + HostCert = 2 +) + +// Signature represents a cryptographic signature. +type Signature struct { + Format string + Blob []byte +} + +// CertTimeInfinity can be used for OpenSSHCertV01.ValidBefore to indicate that +// a certificate does not expire. +const CertTimeInfinity = 1<<64 - 1 + +// An Certificate represents an OpenSSH certificate as defined in +// [PROTOCOL.certkeys]?rev=1.8. +type Certificate struct { + Nonce []byte + Key PublicKey + Serial uint64 + CertType uint32 + KeyId string + ValidPrincipals []string + ValidAfter uint64 + ValidBefore uint64 + Permissions + Reserved []byte + SignatureKey PublicKey + Signature *Signature +} + +// genericCertData holds the key-independent part of the certificate data. +// Overall, certificates contain an nonce, public key fields and +// key-independent fields. +type genericCertData struct { + Serial uint64 + CertType uint32 + KeyId string + ValidPrincipals []byte + ValidAfter uint64 + ValidBefore uint64 + CriticalOptions []byte + Extensions []byte + Reserved []byte + SignatureKey []byte + Signature []byte +} + +func marshalStringList(namelist []string) []byte { + var to []byte + for _, name := range namelist { + s := struct{ N string }{name} + to = append(to, Marshal(&s)...) + } + return to +} + +type optionsTuple struct { + Key string + Value []byte +} + +type optionsTupleValue struct { + Value string +} + +// serialize a map of critical options or extensions +// issue #10569 - per [PROTOCOL.certkeys] and SSH implementation, +// we need two length prefixes for a non-empty string value +func marshalTuples(tups map[string]string) []byte { + keys := make([]string, 0, len(tups)) + for key := range tups { + keys = append(keys, key) + } + sort.Strings(keys) + + var ret []byte + for _, key := range keys { + s := optionsTuple{Key: key} + if value := tups[key]; len(value) > 0 { + s.Value = Marshal(&optionsTupleValue{value}) + } + ret = append(ret, Marshal(&s)...) + } + return ret +} + +// issue #10569 - per [PROTOCOL.certkeys] and SSH implementation, +// we need two length prefixes for a non-empty option value +func parseTuples(in []byte) (map[string]string, error) { + tups := map[string]string{} + var lastKey string + var haveLastKey bool + + for len(in) > 0 { + var key, val, extra []byte + var ok bool + + if key, in, ok = parseString(in); !ok { + return nil, errShortRead + } + keyStr := string(key) + // according to [PROTOCOL.certkeys], the names must be in + // lexical order. + if haveLastKey && keyStr <= lastKey { + return nil, fmt.Errorf("ssh: certificate options are not in lexical order") + } + lastKey, haveLastKey = keyStr, true + // the next field is a data field, which if non-empty has a string embedded + if val, in, ok = parseString(in); !ok { + return nil, errShortRead + } + if len(val) > 0 { + val, extra, ok = parseString(val) + if !ok { + return nil, errShortRead + } + if len(extra) > 0 { + return nil, fmt.Errorf("ssh: unexpected trailing data after certificate option value") + } + tups[keyStr] = string(val) + } else { + tups[keyStr] = "" + } + } + return tups, nil +} + +func parseCert(in []byte, privAlgo string) (*Certificate, error) { + nonce, rest, ok := parseString(in) + if !ok { + return nil, errShortRead + } + + key, rest, err := parsePubKey(rest, privAlgo) + if err != nil { + return nil, err + } + + var g genericCertData + if err := Unmarshal(rest, &g); err != nil { + return nil, err + } + + c := &Certificate{ + Nonce: nonce, + Key: key, + Serial: g.Serial, + CertType: g.CertType, + KeyId: g.KeyId, + ValidAfter: g.ValidAfter, + ValidBefore: g.ValidBefore, + } + + for principals := g.ValidPrincipals; len(principals) > 0; { + principal, rest, ok := parseString(principals) + if !ok { + return nil, errShortRead + } + c.ValidPrincipals = append(c.ValidPrincipals, string(principal)) + principals = rest + } + + c.CriticalOptions, err = parseTuples(g.CriticalOptions) + if err != nil { + return nil, err + } + c.Extensions, err = parseTuples(g.Extensions) + if err != nil { + return nil, err + } + c.Reserved = g.Reserved + k, err := ParsePublicKey(g.SignatureKey) + if err != nil { + return nil, err + } + + c.SignatureKey = k + c.Signature, rest, ok = parseSignatureBody(g.Signature) + if !ok || len(rest) > 0 { + return nil, errors.New("ssh: signature parse error") + } + + return c, nil +} + +type openSSHCertSigner struct { + pub *Certificate + signer Signer +} + +// NewCertSigner returns a Signer that signs with the given Certificate, whose +// private key is held by signer. It returns an error if the public key in cert +// doesn't match the key used by signer. +func NewCertSigner(cert *Certificate, signer Signer) (Signer, error) { + if bytes.Compare(cert.Key.Marshal(), signer.PublicKey().Marshal()) != 0 { + return nil, errors.New("ssh: signer and cert have different public key") + } + + return &openSSHCertSigner{cert, signer}, nil +} + +func (s *openSSHCertSigner) Sign(rand io.Reader, data []byte) (*Signature, error) { + return s.signer.Sign(rand, data) +} + +func (s *openSSHCertSigner) PublicKey() PublicKey { + return s.pub +} + +const sourceAddressCriticalOption = "source-address" + +// CertChecker does the work of verifying a certificate. Its methods +// can be plugged into ClientConfig.HostKeyCallback and +// ServerConfig.PublicKeyCallback. For the CertChecker to work, +// minimally, the IsAuthority callback should be set. +type CertChecker struct { + // SupportedCriticalOptions lists the CriticalOptions that the + // server application layer understands. These are only used + // for user certificates. + SupportedCriticalOptions []string + + // IsUserAuthority should return true if the key is recognized as an + // authority for the given user certificate. This allows for + // certificates to be signed by other certificates. This must be set + // if this CertChecker will be checking user certificates. + IsUserAuthority func(auth PublicKey) bool + + // IsHostAuthority should report whether the key is recognized as + // an authority for this host. This allows for certificates to be + // signed by other keys, and for those other keys to only be valid + // signers for particular hostnames. This must be set if this + // CertChecker will be checking host certificates. + IsHostAuthority func(auth PublicKey, address string) bool + + // Clock is used for verifying time stamps. If nil, time.Now + // is used. + Clock func() time.Time + + // UserKeyFallback is called when CertChecker.Authenticate encounters a + // public key that is not a certificate. It must implement validation + // of user keys or else, if nil, all such keys are rejected. + UserKeyFallback func(conn ConnMetadata, key PublicKey) (*Permissions, error) + + // HostKeyFallback is called when CertChecker.CheckHostKey encounters a + // public key that is not a certificate. It must implement host key + // validation or else, if nil, all such keys are rejected. + HostKeyFallback HostKeyCallback + + // IsRevoked is called for each certificate so that revocation checking + // can be implemented. It should return true if the given certificate + // is revoked and false otherwise. If nil, no certificates are + // considered to have been revoked. + IsRevoked func(cert *Certificate) bool +} + +// CheckHostKey checks a host key certificate. This method can be +// plugged into ClientConfig.HostKeyCallback. +func (c *CertChecker) CheckHostKey(addr string, remote net.Addr, key PublicKey) error { + cert, ok := key.(*Certificate) + if !ok { + if c.HostKeyFallback != nil { + return c.HostKeyFallback(addr, remote, key) + } + return errors.New("ssh: non-certificate host key") + } + if cert.CertType != HostCert { + return fmt.Errorf("ssh: certificate presented as a host key has type %d", cert.CertType) + } + if !c.IsHostAuthority(cert.SignatureKey, addr) { + return fmt.Errorf("ssh: no authorities for hostname: %v", addr) + } + + hostname, _, err := net.SplitHostPort(addr) + if err != nil { + return err + } + + // Pass hostname only as principal for host certificates (consistent with OpenSSH) + return c.CheckCert(hostname, cert) +} + +// Authenticate checks a user certificate. Authenticate can be used as +// a value for ServerConfig.PublicKeyCallback. +func (c *CertChecker) Authenticate(conn ConnMetadata, pubKey PublicKey) (*Permissions, error) { + cert, ok := pubKey.(*Certificate) + if !ok { + if c.UserKeyFallback != nil { + return c.UserKeyFallback(conn, pubKey) + } + return nil, errors.New("ssh: normal key pairs not accepted") + } + + if cert.CertType != UserCert { + return nil, fmt.Errorf("ssh: cert has type %d", cert.CertType) + } + if !c.IsUserAuthority(cert.SignatureKey) { + return nil, fmt.Errorf("ssh: certificate signed by unrecognized authority") + } + + if err := c.CheckCert(conn.User(), cert); err != nil { + return nil, err + } + + return &cert.Permissions, nil +} + +// CheckCert checks CriticalOptions, ValidPrincipals, revocation, timestamp and +// the signature of the certificate. +func (c *CertChecker) CheckCert(principal string, cert *Certificate) error { + if c.IsRevoked != nil && c.IsRevoked(cert) { + return fmt.Errorf("ssh: certicate serial %d revoked", cert.Serial) + } + + for opt, _ := range cert.CriticalOptions { + // sourceAddressCriticalOption will be enforced by + // serverAuthenticate + if opt == sourceAddressCriticalOption { + continue + } + + found := false + for _, supp := range c.SupportedCriticalOptions { + if supp == opt { + found = true + break + } + } + if !found { + return fmt.Errorf("ssh: unsupported critical option %q in certificate", opt) + } + } + + if len(cert.ValidPrincipals) > 0 { + // By default, certs are valid for all users/hosts. + found := false + for _, p := range cert.ValidPrincipals { + if p == principal { + found = true + break + } + } + if !found { + return fmt.Errorf("ssh: principal %q not in the set of valid principals for given certificate: %q", principal, cert.ValidPrincipals) + } + } + + clock := c.Clock + if clock == nil { + clock = time.Now + } + + unixNow := clock().Unix() + if after := int64(cert.ValidAfter); after < 0 || unixNow < int64(cert.ValidAfter) { + return fmt.Errorf("ssh: cert is not yet valid") + } + if before := int64(cert.ValidBefore); cert.ValidBefore != uint64(CertTimeInfinity) && (unixNow >= before || before < 0) { + return fmt.Errorf("ssh: cert has expired") + } + if err := cert.SignatureKey.Verify(cert.bytesForSigning(), cert.Signature); err != nil { + return fmt.Errorf("ssh: certificate signature does not verify") + } + + return nil +} + +// SignCert sets c.SignatureKey to the authority's public key and stores a +// Signature, by authority, in the certificate. +func (c *Certificate) SignCert(rand io.Reader, authority Signer) error { + c.Nonce = make([]byte, 32) + if _, err := io.ReadFull(rand, c.Nonce); err != nil { + return err + } + c.SignatureKey = authority.PublicKey() + + sig, err := authority.Sign(rand, c.bytesForSigning()) + if err != nil { + return err + } + c.Signature = sig + return nil +} + +var certAlgoNames = map[string]string{ + KeyAlgoRSA: CertAlgoRSAv01, + KeyAlgoDSA: CertAlgoDSAv01, + KeyAlgoECDSA256: CertAlgoECDSA256v01, + KeyAlgoECDSA384: CertAlgoECDSA384v01, + KeyAlgoECDSA521: CertAlgoECDSA521v01, + KeyAlgoED25519: CertAlgoED25519v01, +} + +// certToPrivAlgo returns the underlying algorithm for a certificate algorithm. +// Panics if a non-certificate algorithm is passed. +func certToPrivAlgo(algo string) string { + for privAlgo, pubAlgo := range certAlgoNames { + if pubAlgo == algo { + return privAlgo + } + } + panic("unknown cert algorithm") +} + +func (cert *Certificate) bytesForSigning() []byte { + c2 := *cert + c2.Signature = nil + out := c2.Marshal() + // Drop trailing signature length. + return out[:len(out)-4] +} + +// Marshal serializes c into OpenSSH's wire format. It is part of the +// PublicKey interface. +func (c *Certificate) Marshal() []byte { + generic := genericCertData{ + Serial: c.Serial, + CertType: c.CertType, + KeyId: c.KeyId, + ValidPrincipals: marshalStringList(c.ValidPrincipals), + ValidAfter: uint64(c.ValidAfter), + ValidBefore: uint64(c.ValidBefore), + CriticalOptions: marshalTuples(c.CriticalOptions), + Extensions: marshalTuples(c.Extensions), + Reserved: c.Reserved, + SignatureKey: c.SignatureKey.Marshal(), + } + if c.Signature != nil { + generic.Signature = Marshal(c.Signature) + } + genericBytes := Marshal(&generic) + keyBytes := c.Key.Marshal() + _, keyBytes, _ = parseString(keyBytes) + prefix := Marshal(&struct { + Name string + Nonce []byte + Key []byte `ssh:"rest"` + }{c.Type(), c.Nonce, keyBytes}) + + result := make([]byte, 0, len(prefix)+len(genericBytes)) + result = append(result, prefix...) + result = append(result, genericBytes...) + return result +} + +// Type returns the key name. It is part of the PublicKey interface. +func (c *Certificate) Type() string { + algo, ok := certAlgoNames[c.Key.Type()] + if !ok { + panic("unknown cert key type " + c.Key.Type()) + } + return algo +} + +// Verify verifies a signature against the certificate's public +// key. It is part of the PublicKey interface. +func (c *Certificate) Verify(data []byte, sig *Signature) error { + return c.Key.Verify(data, sig) +} + +func parseSignatureBody(in []byte) (out *Signature, rest []byte, ok bool) { + format, in, ok := parseString(in) + if !ok { + return + } + + out = &Signature{ + Format: string(format), + } + + if out.Blob, in, ok = parseString(in); !ok { + return + } + + return out, in, ok +} + +func parseSignature(in []byte) (out *Signature, rest []byte, ok bool) { + sigBytes, rest, ok := parseString(in) + if !ok { + return + } + + out, trailing, ok := parseSignatureBody(sigBytes) + if !ok || len(trailing) > 0 { + return nil, nil, false + } + return +} diff --git a/vendor/golang.org/x/crypto/ssh/certs_test.go b/vendor/golang.org/x/crypto/ssh/certs_test.go new file mode 100644 index 000000000..0200531f4 --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/certs_test.go @@ -0,0 +1,222 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +import ( + "bytes" + "crypto/rand" + "reflect" + "testing" + "time" +) + +// Cert generated by ssh-keygen 6.0p1 Debian-4. +// % ssh-keygen -s ca-key -I test user-key +const exampleSSHCert = `ssh-rsa-cert-v01@openssh.com AAAAHHNzaC1yc2EtY2VydC12MDFAb3BlbnNzaC5jb20AAAAgb1srW/W3ZDjYAO45xLYAwzHBDLsJ4Ux6ICFIkTjb1LEAAAADAQABAAAAYQCkoR51poH0wE8w72cqSB8Sszx+vAhzcMdCO0wqHTj7UNENHWEXGrU0E0UQekD7U+yhkhtoyjbPOVIP7hNa6aRk/ezdh/iUnCIt4Jt1v3Z1h1P+hA4QuYFMHNB+rmjPwAcAAAAAAAAAAAAAAAEAAAAEdGVzdAAAAAAAAAAAAAAAAP//////////AAAAAAAAAIIAAAAVcGVybWl0LVgxMS1mb3J3YXJkaW5nAAAAAAAAABdwZXJtaXQtYWdlbnQtZm9yd2FyZGluZwAAAAAAAAAWcGVybWl0LXBvcnQtZm9yd2FyZGluZwAAAAAAAAAKcGVybWl0LXB0eQAAAAAAAAAOcGVybWl0LXVzZXItcmMAAAAAAAAAAAAAAHcAAAAHc3NoLXJzYQAAAAMBAAEAAABhANFS2kaktpSGc+CcmEKPyw9mJC4nZKxHKTgLVZeaGbFZOvJTNzBspQHdy7Q1uKSfktxpgjZnksiu/tFF9ngyY2KFoc+U88ya95IZUycBGCUbBQ8+bhDtw/icdDGQD5WnUwAAAG8AAAAHc3NoLXJzYQAAAGC8Y9Z2LQKhIhxf52773XaWrXdxP0t3GBVo4A10vUWiYoAGepr6rQIoGGXFxT4B9Gp+nEBJjOwKDXPrAevow0T9ca8gZN+0ykbhSrXLE5Ao48rqr3zP4O1/9P7e6gp0gw8=` + +func TestParseCert(t *testing.T) { + authKeyBytes := []byte(exampleSSHCert) + + key, _, _, rest, err := ParseAuthorizedKey(authKeyBytes) + if err != nil { + t.Fatalf("ParseAuthorizedKey: %v", err) + } + if len(rest) > 0 { + t.Errorf("rest: got %q, want empty", rest) + } + + if _, ok := key.(*Certificate); !ok { + t.Fatalf("got %v (%T), want *Certificate", key, key) + } + + marshaled := MarshalAuthorizedKey(key) + // Before comparison, remove the trailing newline that + // MarshalAuthorizedKey adds. + marshaled = marshaled[:len(marshaled)-1] + if !bytes.Equal(authKeyBytes, marshaled) { + t.Errorf("marshaled certificate does not match original: got %q, want %q", marshaled, authKeyBytes) + } +} + +// Cert generated by ssh-keygen OpenSSH_6.8p1 OS X 10.10.3 +// % ssh-keygen -s ca -I testcert -O source-address=192.168.1.0/24 -O force-command=/bin/sleep user.pub +// user.pub key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDACh1rt2DXfV3hk6fszSQcQ/rueMId0kVD9U7nl8cfEnFxqOCrNT92g4laQIGl2mn8lsGZfTLg8ksHq3gkvgO3oo/0wHy4v32JeBOHTsN5AL4gfHNEhWeWb50ev47hnTsRIt9P4dxogeUo/hTu7j9+s9lLpEQXCvq6xocXQt0j8MV9qZBBXFLXVT3cWIkSqOdwt/5ZBg+1GSrc7WfCXVWgTk4a20uPMuJPxU4RQwZW6X3+O8Pqo8C3cW0OzZRFP6gUYUKUsTI5WntlS+LAxgw1mZNsozFGdbiOPRnEryE3SRldh9vjDR3tin1fGpA5P7+CEB/bqaXtG3V+F2OkqaMN +// Critical Options: +// force-command /bin/sleep +// source-address 192.168.1.0/24 +// Extensions: +// permit-X11-forwarding +// permit-agent-forwarding +// permit-port-forwarding +// permit-pty +// permit-user-rc +const exampleSSHCertWithOptions = `ssh-rsa-cert-v01@openssh.com AAAAHHNzaC1yc2EtY2VydC12MDFAb3BlbnNzaC5jb20AAAAgDyysCJY0XrO1n03EeRRoITnTPdjENFmWDs9X58PP3VUAAAADAQABAAABAQDACh1rt2DXfV3hk6fszSQcQ/rueMId0kVD9U7nl8cfEnFxqOCrNT92g4laQIGl2mn8lsGZfTLg8ksHq3gkvgO3oo/0wHy4v32JeBOHTsN5AL4gfHNEhWeWb50ev47hnTsRIt9P4dxogeUo/hTu7j9+s9lLpEQXCvq6xocXQt0j8MV9qZBBXFLXVT3cWIkSqOdwt/5ZBg+1GSrc7WfCXVWgTk4a20uPMuJPxU4RQwZW6X3+O8Pqo8C3cW0OzZRFP6gUYUKUsTI5WntlS+LAxgw1mZNsozFGdbiOPRnEryE3SRldh9vjDR3tin1fGpA5P7+CEB/bqaXtG3V+F2OkqaMNAAAAAAAAAAAAAAABAAAACHRlc3RjZXJ0AAAAAAAAAAAAAAAA//////////8AAABLAAAADWZvcmNlLWNvbW1hbmQAAAAOAAAACi9iaW4vc2xlZXAAAAAOc291cmNlLWFkZHJlc3MAAAASAAAADjE5Mi4xNjguMS4wLzI0AAAAggAAABVwZXJtaXQtWDExLWZvcndhcmRpbmcAAAAAAAAAF3Blcm1pdC1hZ2VudC1mb3J3YXJkaW5nAAAAAAAAABZwZXJtaXQtcG9ydC1mb3J3YXJkaW5nAAAAAAAAAApwZXJtaXQtcHR5AAAAAAAAAA5wZXJtaXQtdXNlci1yYwAAAAAAAAAAAAABFwAAAAdzc2gtcnNhAAAAAwEAAQAAAQEAwU+c5ui5A8+J/CFpjW8wCa52bEODA808WWQDCSuTG/eMXNf59v9Y8Pk0F1E9dGCosSNyVcB/hacUrc6He+i97+HJCyKavBsE6GDxrjRyxYqAlfcOXi/IVmaUGiO8OQ39d4GHrjToInKvExSUeleQyH4Y4/e27T/pILAqPFL3fyrvMLT5qU9QyIt6zIpa7GBP5+urouNavMprV3zsfIqNBbWypinOQAw823a5wN+zwXnhZrgQiHZ/USG09Y6k98y1dTVz8YHlQVR4D3lpTAsKDKJ5hCH9WU4fdf+lU8OyNGaJ/vz0XNqxcToe1l4numLTnaoSuH89pHryjqurB7lJKwAAAQ8AAAAHc3NoLXJzYQAAAQCaHvUIoPL1zWUHIXLvu96/HU1s/i4CAW2IIEuGgxCUCiFj6vyTyYtgxQxcmbfZf6eaITlS6XJZa7Qq4iaFZh75C1DXTX8labXhRSD4E2t//AIP9MC1rtQC5xo6FmbQ+BoKcDskr+mNACcbRSxs3IL3bwCfWDnIw2WbVox9ZdcthJKk4UoCW4ix4QwdHw7zlddlz++fGEEVhmTbll1SUkycGApPFBsAYRTMupUJcYPIeReBI/m8XfkoMk99bV8ZJQTAd7OekHY2/48Ff53jLmyDjP7kNw1F8OaPtkFs6dGJXta4krmaekPy87j+35In5hFj7yoOqvSbmYUkeX70/GGQ` + +func TestParseCertWithOptions(t *testing.T) { + opts := map[string]string{ + "source-address": "192.168.1.0/24", + "force-command": "/bin/sleep", + } + exts := map[string]string{ + "permit-X11-forwarding": "", + "permit-agent-forwarding": "", + "permit-port-forwarding": "", + "permit-pty": "", + "permit-user-rc": "", + } + authKeyBytes := []byte(exampleSSHCertWithOptions) + + key, _, _, rest, err := ParseAuthorizedKey(authKeyBytes) + if err != nil { + t.Fatalf("ParseAuthorizedKey: %v", err) + } + if len(rest) > 0 { + t.Errorf("rest: got %q, want empty", rest) + } + cert, ok := key.(*Certificate) + if !ok { + t.Fatalf("got %v (%T), want *Certificate", key, key) + } + if !reflect.DeepEqual(cert.CriticalOptions, opts) { + t.Errorf("unexpected critical options - got %v, want %v", cert.CriticalOptions, opts) + } + if !reflect.DeepEqual(cert.Extensions, exts) { + t.Errorf("unexpected Extensions - got %v, want %v", cert.Extensions, exts) + } + marshaled := MarshalAuthorizedKey(key) + // Before comparison, remove the trailing newline that + // MarshalAuthorizedKey adds. + marshaled = marshaled[:len(marshaled)-1] + if !bytes.Equal(authKeyBytes, marshaled) { + t.Errorf("marshaled certificate does not match original: got %q, want %q", marshaled, authKeyBytes) + } +} + +func TestValidateCert(t *testing.T) { + key, _, _, _, err := ParseAuthorizedKey([]byte(exampleSSHCert)) + if err != nil { + t.Fatalf("ParseAuthorizedKey: %v", err) + } + validCert, ok := key.(*Certificate) + if !ok { + t.Fatalf("got %v (%T), want *Certificate", key, key) + } + checker := CertChecker{} + checker.IsUserAuthority = func(k PublicKey) bool { + return bytes.Equal(k.Marshal(), validCert.SignatureKey.Marshal()) + } + + if err := checker.CheckCert("user", validCert); err != nil { + t.Errorf("Unable to validate certificate: %v", err) + } + invalidCert := &Certificate{ + Key: testPublicKeys["rsa"], + SignatureKey: testPublicKeys["ecdsa"], + ValidBefore: CertTimeInfinity, + Signature: &Signature{}, + } + if err := checker.CheckCert("user", invalidCert); err == nil { + t.Error("Invalid cert signature passed validation") + } +} + +func TestValidateCertTime(t *testing.T) { + cert := Certificate{ + ValidPrincipals: []string{"user"}, + Key: testPublicKeys["rsa"], + ValidAfter: 50, + ValidBefore: 100, + } + + cert.SignCert(rand.Reader, testSigners["ecdsa"]) + + for ts, ok := range map[int64]bool{ + 25: false, + 50: true, + 99: true, + 100: false, + 125: false, + } { + checker := CertChecker{ + Clock: func() time.Time { return time.Unix(ts, 0) }, + } + checker.IsUserAuthority = func(k PublicKey) bool { + return bytes.Equal(k.Marshal(), + testPublicKeys["ecdsa"].Marshal()) + } + + if v := checker.CheckCert("user", &cert); (v == nil) != ok { + t.Errorf("Authenticate(%d): %v", ts, v) + } + } +} + +// TODO(hanwen): tests for +// +// host keys: +// * fallbacks + +func TestHostKeyCert(t *testing.T) { + cert := &Certificate{ + ValidPrincipals: []string{"hostname", "hostname.domain", "otherhost"}, + Key: testPublicKeys["rsa"], + ValidBefore: CertTimeInfinity, + CertType: HostCert, + } + cert.SignCert(rand.Reader, testSigners["ecdsa"]) + + checker := &CertChecker{ + IsHostAuthority: func(p PublicKey, addr string) bool { + return addr == "hostname:22" && bytes.Equal(testPublicKeys["ecdsa"].Marshal(), p.Marshal()) + }, + } + + certSigner, err := NewCertSigner(cert, testSigners["rsa"]) + if err != nil { + t.Errorf("NewCertSigner: %v", err) + } + + for _, test := range []struct { + addr string + succeed bool + }{ + {addr: "hostname:22", succeed: true}, + {addr: "otherhost:22", succeed: false}, // The certificate is valid for 'otherhost' as hostname, but we only recognize the authority of the signer for the address 'hostname:22' + {addr: "lasthost:22", succeed: false}, + } { + c1, c2, err := netPipe() + if err != nil { + t.Fatalf("netPipe: %v", err) + } + defer c1.Close() + defer c2.Close() + + errc := make(chan error) + + go func() { + conf := ServerConfig{ + NoClientAuth: true, + } + conf.AddHostKey(certSigner) + _, _, _, err := NewServerConn(c1, &conf) + errc <- err + }() + + config := &ClientConfig{ + User: "user", + HostKeyCallback: checker.CheckHostKey, + } + _, _, _, err = NewClientConn(c2, test.addr, config) + + if (err == nil) != test.succeed { + t.Fatalf("NewClientConn(%q): %v", test.addr, err) + } + + err = <-errc + if (err == nil) != test.succeed { + t.Fatalf("NewServerConn(%q): %v", test.addr, err) + } + } +} diff --git a/vendor/golang.org/x/crypto/ssh/channel.go b/vendor/golang.org/x/crypto/ssh/channel.go new file mode 100644 index 000000000..195530ea0 --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/channel.go @@ -0,0 +1,633 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +import ( + "encoding/binary" + "errors" + "fmt" + "io" + "log" + "sync" +) + +const ( + minPacketLength = 9 + // channelMaxPacket contains the maximum number of bytes that will be + // sent in a single packet. As per RFC 4253, section 6.1, 32k is also + // the minimum. + channelMaxPacket = 1 << 15 + // We follow OpenSSH here. + channelWindowSize = 64 * channelMaxPacket +) + +// NewChannel represents an incoming request to a channel. It must either be +// accepted for use by calling Accept, or rejected by calling Reject. +type NewChannel interface { + // Accept accepts the channel creation request. It returns the Channel + // and a Go channel containing SSH requests. The Go channel must be + // serviced otherwise the Channel will hang. + Accept() (Channel, <-chan *Request, error) + + // Reject rejects the channel creation request. After calling + // this, no other methods on the Channel may be called. + Reject(reason RejectionReason, message string) error + + // ChannelType returns the type of the channel, as supplied by the + // client. + ChannelType() string + + // ExtraData returns the arbitrary payload for this channel, as supplied + // by the client. This data is specific to the channel type. + ExtraData() []byte +} + +// A Channel is an ordered, reliable, flow-controlled, duplex stream +// that is multiplexed over an SSH connection. +type Channel interface { + // Read reads up to len(data) bytes from the channel. + Read(data []byte) (int, error) + + // Write writes len(data) bytes to the channel. + Write(data []byte) (int, error) + + // Close signals end of channel use. No data may be sent after this + // call. + Close() error + + // CloseWrite signals the end of sending in-band + // data. Requests may still be sent, and the other side may + // still send data + CloseWrite() error + + // SendRequest sends a channel request. If wantReply is true, + // it will wait for a reply and return the result as a + // boolean, otherwise the return value will be false. Channel + // requests are out-of-band messages so they may be sent even + // if the data stream is closed or blocked by flow control. + // If the channel is closed before a reply is returned, io.EOF + // is returned. + SendRequest(name string, wantReply bool, payload []byte) (bool, error) + + // Stderr returns an io.ReadWriter that writes to this channel + // with the extended data type set to stderr. Stderr may + // safely be read and written from a different goroutine than + // Read and Write respectively. + Stderr() io.ReadWriter +} + +// Request is a request sent outside of the normal stream of +// data. Requests can either be specific to an SSH channel, or they +// can be global. +type Request struct { + Type string + WantReply bool + Payload []byte + + ch *channel + mux *mux +} + +// Reply sends a response to a request. It must be called for all requests +// where WantReply is true and is a no-op otherwise. The payload argument is +// ignored for replies to channel-specific requests. +func (r *Request) Reply(ok bool, payload []byte) error { + if !r.WantReply { + return nil + } + + if r.ch == nil { + return r.mux.ackRequest(ok, payload) + } + + return r.ch.ackRequest(ok) +} + +// RejectionReason is an enumeration used when rejecting channel creation +// requests. See RFC 4254, section 5.1. +type RejectionReason uint32 + +const ( + Prohibited RejectionReason = iota + 1 + ConnectionFailed + UnknownChannelType + ResourceShortage +) + +// String converts the rejection reason to human readable form. +func (r RejectionReason) String() string { + switch r { + case Prohibited: + return "administratively prohibited" + case ConnectionFailed: + return "connect failed" + case UnknownChannelType: + return "unknown channel type" + case ResourceShortage: + return "resource shortage" + } + return fmt.Sprintf("unknown reason %d", int(r)) +} + +func min(a uint32, b int) uint32 { + if a < uint32(b) { + return a + } + return uint32(b) +} + +type channelDirection uint8 + +const ( + channelInbound channelDirection = iota + channelOutbound +) + +// channel is an implementation of the Channel interface that works +// with the mux class. +type channel struct { + // R/O after creation + chanType string + extraData []byte + localId, remoteId uint32 + + // maxIncomingPayload and maxRemotePayload are the maximum + // payload sizes of normal and extended data packets for + // receiving and sending, respectively. The wire packet will + // be 9 or 13 bytes larger (excluding encryption overhead). + maxIncomingPayload uint32 + maxRemotePayload uint32 + + mux *mux + + // decided is set to true if an accept or reject message has been sent + // (for outbound channels) or received (for inbound channels). + decided bool + + // direction contains either channelOutbound, for channels created + // locally, or channelInbound, for channels created by the peer. + direction channelDirection + + // Pending internal channel messages. + msg chan interface{} + + // Since requests have no ID, there can be only one request + // with WantReply=true outstanding. This lock is held by a + // goroutine that has such an outgoing request pending. + sentRequestMu sync.Mutex + + incomingRequests chan *Request + + sentEOF bool + + // thread-safe data + remoteWin window + pending *buffer + extPending *buffer + + // windowMu protects myWindow, the flow-control window. + windowMu sync.Mutex + myWindow uint32 + + // writeMu serializes calls to mux.conn.writePacket() and + // protects sentClose and packetPool. This mutex must be + // different from windowMu, as writePacket can block if there + // is a key exchange pending. + writeMu sync.Mutex + sentClose bool + + // packetPool has a buffer for each extended channel ID to + // save allocations during writes. + packetPool map[uint32][]byte +} + +// writePacket sends a packet. If the packet is a channel close, it updates +// sentClose. This method takes the lock c.writeMu. +func (c *channel) writePacket(packet []byte) error { + c.writeMu.Lock() + if c.sentClose { + c.writeMu.Unlock() + return io.EOF + } + c.sentClose = (packet[0] == msgChannelClose) + err := c.mux.conn.writePacket(packet) + c.writeMu.Unlock() + return err +} + +func (c *channel) sendMessage(msg interface{}) error { + if debugMux { + log.Printf("send(%d): %#v", c.mux.chanList.offset, msg) + } + + p := Marshal(msg) + binary.BigEndian.PutUint32(p[1:], c.remoteId) + return c.writePacket(p) +} + +// WriteExtended writes data to a specific extended stream. These streams are +// used, for example, for stderr. +func (c *channel) WriteExtended(data []byte, extendedCode uint32) (n int, err error) { + if c.sentEOF { + return 0, io.EOF + } + // 1 byte message type, 4 bytes remoteId, 4 bytes data length + opCode := byte(msgChannelData) + headerLength := uint32(9) + if extendedCode > 0 { + headerLength += 4 + opCode = msgChannelExtendedData + } + + c.writeMu.Lock() + packet := c.packetPool[extendedCode] + // We don't remove the buffer from packetPool, so + // WriteExtended calls from different goroutines will be + // flagged as errors by the race detector. + c.writeMu.Unlock() + + for len(data) > 0 { + space := min(c.maxRemotePayload, len(data)) + if space, err = c.remoteWin.reserve(space); err != nil { + return n, err + } + if want := headerLength + space; uint32(cap(packet)) < want { + packet = make([]byte, want) + } else { + packet = packet[:want] + } + + todo := data[:space] + + packet[0] = opCode + binary.BigEndian.PutUint32(packet[1:], c.remoteId) + if extendedCode > 0 { + binary.BigEndian.PutUint32(packet[5:], uint32(extendedCode)) + } + binary.BigEndian.PutUint32(packet[headerLength-4:], uint32(len(todo))) + copy(packet[headerLength:], todo) + if err = c.writePacket(packet); err != nil { + return n, err + } + + n += len(todo) + data = data[len(todo):] + } + + c.writeMu.Lock() + c.packetPool[extendedCode] = packet + c.writeMu.Unlock() + + return n, err +} + +func (c *channel) handleData(packet []byte) error { + headerLen := 9 + isExtendedData := packet[0] == msgChannelExtendedData + if isExtendedData { + headerLen = 13 + } + if len(packet) < headerLen { + // malformed data packet + return parseError(packet[0]) + } + + var extended uint32 + if isExtendedData { + extended = binary.BigEndian.Uint32(packet[5:]) + } + + length := binary.BigEndian.Uint32(packet[headerLen-4 : headerLen]) + if length == 0 { + return nil + } + if length > c.maxIncomingPayload { + // TODO(hanwen): should send Disconnect? + return errors.New("ssh: incoming packet exceeds maximum payload size") + } + + data := packet[headerLen:] + if length != uint32(len(data)) { + return errors.New("ssh: wrong packet length") + } + + c.windowMu.Lock() + if c.myWindow < length { + c.windowMu.Unlock() + // TODO(hanwen): should send Disconnect with reason? + return errors.New("ssh: remote side wrote too much") + } + c.myWindow -= length + c.windowMu.Unlock() + + if extended == 1 { + c.extPending.write(data) + } else if extended > 0 { + // discard other extended data. + } else { + c.pending.write(data) + } + return nil +} + +func (c *channel) adjustWindow(n uint32) error { + c.windowMu.Lock() + // Since myWindow is managed on our side, and can never exceed + // the initial window setting, we don't worry about overflow. + c.myWindow += uint32(n) + c.windowMu.Unlock() + return c.sendMessage(windowAdjustMsg{ + AdditionalBytes: uint32(n), + }) +} + +func (c *channel) ReadExtended(data []byte, extended uint32) (n int, err error) { + switch extended { + case 1: + n, err = c.extPending.Read(data) + case 0: + n, err = c.pending.Read(data) + default: + return 0, fmt.Errorf("ssh: extended code %d unimplemented", extended) + } + + if n > 0 { + err = c.adjustWindow(uint32(n)) + // sendWindowAdjust can return io.EOF if the remote + // peer has closed the connection, however we want to + // defer forwarding io.EOF to the caller of Read until + // the buffer has been drained. + if n > 0 && err == io.EOF { + err = nil + } + } + + return n, err +} + +func (c *channel) close() { + c.pending.eof() + c.extPending.eof() + close(c.msg) + close(c.incomingRequests) + c.writeMu.Lock() + // This is not necessary for a normal channel teardown, but if + // there was another error, it is. + c.sentClose = true + c.writeMu.Unlock() + // Unblock writers. + c.remoteWin.close() +} + +// responseMessageReceived is called when a success or failure message is +// received on a channel to check that such a message is reasonable for the +// given channel. +func (c *channel) responseMessageReceived() error { + if c.direction == channelInbound { + return errors.New("ssh: channel response message received on inbound channel") + } + if c.decided { + return errors.New("ssh: duplicate response received for channel") + } + c.decided = true + return nil +} + +func (c *channel) handlePacket(packet []byte) error { + switch packet[0] { + case msgChannelData, msgChannelExtendedData: + return c.handleData(packet) + case msgChannelClose: + c.sendMessage(channelCloseMsg{PeersId: c.remoteId}) + c.mux.chanList.remove(c.localId) + c.close() + return nil + case msgChannelEOF: + // RFC 4254 is mute on how EOF affects dataExt messages but + // it is logical to signal EOF at the same time. + c.extPending.eof() + c.pending.eof() + return nil + } + + decoded, err := decode(packet) + if err != nil { + return err + } + + switch msg := decoded.(type) { + case *channelOpenFailureMsg: + if err := c.responseMessageReceived(); err != nil { + return err + } + c.mux.chanList.remove(msg.PeersId) + c.msg <- msg + case *channelOpenConfirmMsg: + if err := c.responseMessageReceived(); err != nil { + return err + } + if msg.MaxPacketSize < minPacketLength || msg.MaxPacketSize > 1<<31 { + return fmt.Errorf("ssh: invalid MaxPacketSize %d from peer", msg.MaxPacketSize) + } + c.remoteId = msg.MyId + c.maxRemotePayload = msg.MaxPacketSize + c.remoteWin.add(msg.MyWindow) + c.msg <- msg + case *windowAdjustMsg: + if !c.remoteWin.add(msg.AdditionalBytes) { + return fmt.Errorf("ssh: invalid window update for %d bytes", msg.AdditionalBytes) + } + case *channelRequestMsg: + req := Request{ + Type: msg.Request, + WantReply: msg.WantReply, + Payload: msg.RequestSpecificData, + ch: c, + } + + c.incomingRequests <- &req + default: + c.msg <- msg + } + return nil +} + +func (m *mux) newChannel(chanType string, direction channelDirection, extraData []byte) *channel { + ch := &channel{ + remoteWin: window{Cond: newCond()}, + myWindow: channelWindowSize, + pending: newBuffer(), + extPending: newBuffer(), + direction: direction, + incomingRequests: make(chan *Request, chanSize), + msg: make(chan interface{}, chanSize), + chanType: chanType, + extraData: extraData, + mux: m, + packetPool: make(map[uint32][]byte), + } + ch.localId = m.chanList.add(ch) + return ch +} + +var errUndecided = errors.New("ssh: must Accept or Reject channel") +var errDecidedAlready = errors.New("ssh: can call Accept or Reject only once") + +type extChannel struct { + code uint32 + ch *channel +} + +func (e *extChannel) Write(data []byte) (n int, err error) { + return e.ch.WriteExtended(data, e.code) +} + +func (e *extChannel) Read(data []byte) (n int, err error) { + return e.ch.ReadExtended(data, e.code) +} + +func (c *channel) Accept() (Channel, <-chan *Request, error) { + if c.decided { + return nil, nil, errDecidedAlready + } + c.maxIncomingPayload = channelMaxPacket + confirm := channelOpenConfirmMsg{ + PeersId: c.remoteId, + MyId: c.localId, + MyWindow: c.myWindow, + MaxPacketSize: c.maxIncomingPayload, + } + c.decided = true + if err := c.sendMessage(confirm); err != nil { + return nil, nil, err + } + + return c, c.incomingRequests, nil +} + +func (ch *channel) Reject(reason RejectionReason, message string) error { + if ch.decided { + return errDecidedAlready + } + reject := channelOpenFailureMsg{ + PeersId: ch.remoteId, + Reason: reason, + Message: message, + Language: "en", + } + ch.decided = true + return ch.sendMessage(reject) +} + +func (ch *channel) Read(data []byte) (int, error) { + if !ch.decided { + return 0, errUndecided + } + return ch.ReadExtended(data, 0) +} + +func (ch *channel) Write(data []byte) (int, error) { + if !ch.decided { + return 0, errUndecided + } + return ch.WriteExtended(data, 0) +} + +func (ch *channel) CloseWrite() error { + if !ch.decided { + return errUndecided + } + ch.sentEOF = true + return ch.sendMessage(channelEOFMsg{ + PeersId: ch.remoteId}) +} + +func (ch *channel) Close() error { + if !ch.decided { + return errUndecided + } + + return ch.sendMessage(channelCloseMsg{ + PeersId: ch.remoteId}) +} + +// Extended returns an io.ReadWriter that sends and receives data on the given, +// SSH extended stream. Such streams are used, for example, for stderr. +func (ch *channel) Extended(code uint32) io.ReadWriter { + if !ch.decided { + return nil + } + return &extChannel{code, ch} +} + +func (ch *channel) Stderr() io.ReadWriter { + return ch.Extended(1) +} + +func (ch *channel) SendRequest(name string, wantReply bool, payload []byte) (bool, error) { + if !ch.decided { + return false, errUndecided + } + + if wantReply { + ch.sentRequestMu.Lock() + defer ch.sentRequestMu.Unlock() + } + + msg := channelRequestMsg{ + PeersId: ch.remoteId, + Request: name, + WantReply: wantReply, + RequestSpecificData: payload, + } + + if err := ch.sendMessage(msg); err != nil { + return false, err + } + + if wantReply { + m, ok := (<-ch.msg) + if !ok { + return false, io.EOF + } + switch m.(type) { + case *channelRequestFailureMsg: + return false, nil + case *channelRequestSuccessMsg: + return true, nil + default: + return false, fmt.Errorf("ssh: unexpected response to channel request: %#v", m) + } + } + + return false, nil +} + +// ackRequest either sends an ack or nack to the channel request. +func (ch *channel) ackRequest(ok bool) error { + if !ch.decided { + return errUndecided + } + + var msg interface{} + if !ok { + msg = channelRequestFailureMsg{ + PeersId: ch.remoteId, + } + } else { + msg = channelRequestSuccessMsg{ + PeersId: ch.remoteId, + } + } + return ch.sendMessage(msg) +} + +func (ch *channel) ChannelType() string { + return ch.chanType +} + +func (ch *channel) ExtraData() []byte { + return ch.extraData +} diff --git a/vendor/golang.org/x/crypto/ssh/cipher.go b/vendor/golang.org/x/crypto/ssh/cipher.go new file mode 100644 index 000000000..22bb30ccd --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/cipher.go @@ -0,0 +1,629 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +import ( + "crypto/aes" + "crypto/cipher" + "crypto/des" + "crypto/rc4" + "crypto/subtle" + "encoding/binary" + "errors" + "fmt" + "hash" + "io" + "io/ioutil" +) + +const ( + packetSizeMultiple = 16 // TODO(huin) this should be determined by the cipher. + + // RFC 4253 section 6.1 defines a minimum packet size of 32768 that implementations + // MUST be able to process (plus a few more kilobytes for padding and mac). The RFC + // indicates implementations SHOULD be able to handle larger packet sizes, but then + // waffles on about reasonable limits. + // + // OpenSSH caps their maxPacket at 256kB so we choose to do + // the same. maxPacket is also used to ensure that uint32 + // length fields do not overflow, so it should remain well + // below 4G. + maxPacket = 256 * 1024 +) + +// noneCipher implements cipher.Stream and provides no encryption. It is used +// by the transport before the first key-exchange. +type noneCipher struct{} + +func (c noneCipher) XORKeyStream(dst, src []byte) { + copy(dst, src) +} + +func newAESCTR(key, iv []byte) (cipher.Stream, error) { + c, err := aes.NewCipher(key) + if err != nil { + return nil, err + } + return cipher.NewCTR(c, iv), nil +} + +func newRC4(key, iv []byte) (cipher.Stream, error) { + return rc4.NewCipher(key) +} + +type streamCipherMode struct { + keySize int + ivSize int + skip int + createFunc func(key, iv []byte) (cipher.Stream, error) +} + +func (c *streamCipherMode) createStream(key, iv []byte) (cipher.Stream, error) { + if len(key) < c.keySize { + panic("ssh: key length too small for cipher") + } + if len(iv) < c.ivSize { + panic("ssh: iv too small for cipher") + } + + stream, err := c.createFunc(key[:c.keySize], iv[:c.ivSize]) + if err != nil { + return nil, err + } + + var streamDump []byte + if c.skip > 0 { + streamDump = make([]byte, 512) + } + + for remainingToDump := c.skip; remainingToDump > 0; { + dumpThisTime := remainingToDump + if dumpThisTime > len(streamDump) { + dumpThisTime = len(streamDump) + } + stream.XORKeyStream(streamDump[:dumpThisTime], streamDump[:dumpThisTime]) + remainingToDump -= dumpThisTime + } + + return stream, nil +} + +// cipherModes documents properties of supported ciphers. Ciphers not included +// are not supported and will not be negotiated, even if explicitly requested in +// ClientConfig.Crypto.Ciphers. +var cipherModes = map[string]*streamCipherMode{ + // Ciphers from RFC4344, which introduced many CTR-based ciphers. Algorithms + // are defined in the order specified in the RFC. + "aes128-ctr": {16, aes.BlockSize, 0, newAESCTR}, + "aes192-ctr": {24, aes.BlockSize, 0, newAESCTR}, + "aes256-ctr": {32, aes.BlockSize, 0, newAESCTR}, + + // Ciphers from RFC4345, which introduces security-improved arcfour ciphers. + // They are defined in the order specified in the RFC. + "arcfour128": {16, 0, 1536, newRC4}, + "arcfour256": {32, 0, 1536, newRC4}, + + // Cipher defined in RFC 4253, which describes SSH Transport Layer Protocol. + // Note that this cipher is not safe, as stated in RFC 4253: "Arcfour (and + // RC4) has problems with weak keys, and should be used with caution." + // RFC4345 introduces improved versions of Arcfour. + "arcfour": {16, 0, 0, newRC4}, + + // AES-GCM is not a stream cipher, so it is constructed with a + // special case. If we add any more non-stream ciphers, we + // should invest a cleaner way to do this. + gcmCipherID: {16, 12, 0, nil}, + + // CBC mode is insecure and so is not included in the default config. + // (See http://www.isg.rhul.ac.uk/~kp/SandPfinal.pdf). If absolutely + // needed, it's possible to specify a custom Config to enable it. + // You should expect that an active attacker can recover plaintext if + // you do. + aes128cbcID: {16, aes.BlockSize, 0, nil}, + + // 3des-cbc is insecure and is disabled by default. + tripledescbcID: {24, des.BlockSize, 0, nil}, +} + +// prefixLen is the length of the packet prefix that contains the packet length +// and number of padding bytes. +const prefixLen = 5 + +// streamPacketCipher is a packetCipher using a stream cipher. +type streamPacketCipher struct { + mac hash.Hash + cipher cipher.Stream + etm bool + + // The following members are to avoid per-packet allocations. + prefix [prefixLen]byte + seqNumBytes [4]byte + padding [2 * packetSizeMultiple]byte + packetData []byte + macResult []byte +} + +// readPacket reads and decrypt a single packet from the reader argument. +func (s *streamPacketCipher) readPacket(seqNum uint32, r io.Reader) ([]byte, error) { + if _, err := io.ReadFull(r, s.prefix[:]); err != nil { + return nil, err + } + + var encryptedPaddingLength [1]byte + if s.mac != nil && s.etm { + copy(encryptedPaddingLength[:], s.prefix[4:5]) + s.cipher.XORKeyStream(s.prefix[4:5], s.prefix[4:5]) + } else { + s.cipher.XORKeyStream(s.prefix[:], s.prefix[:]) + } + + length := binary.BigEndian.Uint32(s.prefix[0:4]) + paddingLength := uint32(s.prefix[4]) + + var macSize uint32 + if s.mac != nil { + s.mac.Reset() + binary.BigEndian.PutUint32(s.seqNumBytes[:], seqNum) + s.mac.Write(s.seqNumBytes[:]) + if s.etm { + s.mac.Write(s.prefix[:4]) + s.mac.Write(encryptedPaddingLength[:]) + } else { + s.mac.Write(s.prefix[:]) + } + macSize = uint32(s.mac.Size()) + } + + if length <= paddingLength+1 { + return nil, errors.New("ssh: invalid packet length, packet too small") + } + + if length > maxPacket { + return nil, errors.New("ssh: invalid packet length, packet too large") + } + + // the maxPacket check above ensures that length-1+macSize + // does not overflow. + if uint32(cap(s.packetData)) < length-1+macSize { + s.packetData = make([]byte, length-1+macSize) + } else { + s.packetData = s.packetData[:length-1+macSize] + } + + if _, err := io.ReadFull(r, s.packetData); err != nil { + return nil, err + } + mac := s.packetData[length-1:] + data := s.packetData[:length-1] + + if s.mac != nil && s.etm { + s.mac.Write(data) + } + + s.cipher.XORKeyStream(data, data) + + if s.mac != nil { + if !s.etm { + s.mac.Write(data) + } + s.macResult = s.mac.Sum(s.macResult[:0]) + if subtle.ConstantTimeCompare(s.macResult, mac) != 1 { + return nil, errors.New("ssh: MAC failure") + } + } + + return s.packetData[:length-paddingLength-1], nil +} + +// writePacket encrypts and sends a packet of data to the writer argument +func (s *streamPacketCipher) writePacket(seqNum uint32, w io.Writer, rand io.Reader, packet []byte) error { + if len(packet) > maxPacket { + return errors.New("ssh: packet too large") + } + + aadlen := 0 + if s.mac != nil && s.etm { + // packet length is not encrypted for EtM modes + aadlen = 4 + } + + paddingLength := packetSizeMultiple - (prefixLen+len(packet)-aadlen)%packetSizeMultiple + if paddingLength < 4 { + paddingLength += packetSizeMultiple + } + + length := len(packet) + 1 + paddingLength + binary.BigEndian.PutUint32(s.prefix[:], uint32(length)) + s.prefix[4] = byte(paddingLength) + padding := s.padding[:paddingLength] + if _, err := io.ReadFull(rand, padding); err != nil { + return err + } + + if s.mac != nil { + s.mac.Reset() + binary.BigEndian.PutUint32(s.seqNumBytes[:], seqNum) + s.mac.Write(s.seqNumBytes[:]) + + if s.etm { + // For EtM algorithms, the packet length must stay unencrypted, + // but the following data (padding length) must be encrypted + s.cipher.XORKeyStream(s.prefix[4:5], s.prefix[4:5]) + } + + s.mac.Write(s.prefix[:]) + + if !s.etm { + // For non-EtM algorithms, the algorithm is applied on unencrypted data + s.mac.Write(packet) + s.mac.Write(padding) + } + } + + if !(s.mac != nil && s.etm) { + // For EtM algorithms, the padding length has already been encrypted + // and the packet length must remain unencrypted + s.cipher.XORKeyStream(s.prefix[:], s.prefix[:]) + } + + s.cipher.XORKeyStream(packet, packet) + s.cipher.XORKeyStream(padding, padding) + + if s.mac != nil && s.etm { + // For EtM algorithms, packet and padding must be encrypted + s.mac.Write(packet) + s.mac.Write(padding) + } + + if _, err := w.Write(s.prefix[:]); err != nil { + return err + } + if _, err := w.Write(packet); err != nil { + return err + } + if _, err := w.Write(padding); err != nil { + return err + } + + if s.mac != nil { + s.macResult = s.mac.Sum(s.macResult[:0]) + if _, err := w.Write(s.macResult); err != nil { + return err + } + } + + return nil +} + +type gcmCipher struct { + aead cipher.AEAD + prefix [4]byte + iv []byte + buf []byte +} + +func newGCMCipher(iv, key, macKey []byte) (packetCipher, error) { + c, err := aes.NewCipher(key) + if err != nil { + return nil, err + } + + aead, err := cipher.NewGCM(c) + if err != nil { + return nil, err + } + + return &gcmCipher{ + aead: aead, + iv: iv, + }, nil +} + +const gcmTagSize = 16 + +func (c *gcmCipher) writePacket(seqNum uint32, w io.Writer, rand io.Reader, packet []byte) error { + // Pad out to multiple of 16 bytes. This is different from the + // stream cipher because that encrypts the length too. + padding := byte(packetSizeMultiple - (1+len(packet))%packetSizeMultiple) + if padding < 4 { + padding += packetSizeMultiple + } + + length := uint32(len(packet) + int(padding) + 1) + binary.BigEndian.PutUint32(c.prefix[:], length) + if _, err := w.Write(c.prefix[:]); err != nil { + return err + } + + if cap(c.buf) < int(length) { + c.buf = make([]byte, length) + } else { + c.buf = c.buf[:length] + } + + c.buf[0] = padding + copy(c.buf[1:], packet) + if _, err := io.ReadFull(rand, c.buf[1+len(packet):]); err != nil { + return err + } + c.buf = c.aead.Seal(c.buf[:0], c.iv, c.buf, c.prefix[:]) + if _, err := w.Write(c.buf); err != nil { + return err + } + c.incIV() + + return nil +} + +func (c *gcmCipher) incIV() { + for i := 4 + 7; i >= 4; i-- { + c.iv[i]++ + if c.iv[i] != 0 { + break + } + } +} + +func (c *gcmCipher) readPacket(seqNum uint32, r io.Reader) ([]byte, error) { + if _, err := io.ReadFull(r, c.prefix[:]); err != nil { + return nil, err + } + length := binary.BigEndian.Uint32(c.prefix[:]) + if length > maxPacket { + return nil, errors.New("ssh: max packet length exceeded.") + } + + if cap(c.buf) < int(length+gcmTagSize) { + c.buf = make([]byte, length+gcmTagSize) + } else { + c.buf = c.buf[:length+gcmTagSize] + } + + if _, err := io.ReadFull(r, c.buf); err != nil { + return nil, err + } + + plain, err := c.aead.Open(c.buf[:0], c.iv, c.buf, c.prefix[:]) + if err != nil { + return nil, err + } + c.incIV() + + padding := plain[0] + if padding < 4 { + // padding is a byte, so it automatically satisfies + // the maximum size, which is 255. + return nil, fmt.Errorf("ssh: illegal padding %d", padding) + } + + if int(padding+1) >= len(plain) { + return nil, fmt.Errorf("ssh: padding %d too large", padding) + } + plain = plain[1 : length-uint32(padding)] + return plain, nil +} + +// cbcCipher implements aes128-cbc cipher defined in RFC 4253 section 6.1 +type cbcCipher struct { + mac hash.Hash + macSize uint32 + decrypter cipher.BlockMode + encrypter cipher.BlockMode + + // The following members are to avoid per-packet allocations. + seqNumBytes [4]byte + packetData []byte + macResult []byte + + // Amount of data we should still read to hide which + // verification error triggered. + oracleCamouflage uint32 +} + +func newCBCCipher(c cipher.Block, iv, key, macKey []byte, algs directionAlgorithms) (packetCipher, error) { + cbc := &cbcCipher{ + mac: macModes[algs.MAC].new(macKey), + decrypter: cipher.NewCBCDecrypter(c, iv), + encrypter: cipher.NewCBCEncrypter(c, iv), + packetData: make([]byte, 1024), + } + if cbc.mac != nil { + cbc.macSize = uint32(cbc.mac.Size()) + } + + return cbc, nil +} + +func newAESCBCCipher(iv, key, macKey []byte, algs directionAlgorithms) (packetCipher, error) { + c, err := aes.NewCipher(key) + if err != nil { + return nil, err + } + + cbc, err := newCBCCipher(c, iv, key, macKey, algs) + if err != nil { + return nil, err + } + + return cbc, nil +} + +func newTripleDESCBCCipher(iv, key, macKey []byte, algs directionAlgorithms) (packetCipher, error) { + c, err := des.NewTripleDESCipher(key) + if err != nil { + return nil, err + } + + cbc, err := newCBCCipher(c, iv, key, macKey, algs) + if err != nil { + return nil, err + } + + return cbc, nil +} + +func maxUInt32(a, b int) uint32 { + if a > b { + return uint32(a) + } + return uint32(b) +} + +const ( + cbcMinPacketSizeMultiple = 8 + cbcMinPacketSize = 16 + cbcMinPaddingSize = 4 +) + +// cbcError represents a verification error that may leak information. +type cbcError string + +func (e cbcError) Error() string { return string(e) } + +func (c *cbcCipher) readPacket(seqNum uint32, r io.Reader) ([]byte, error) { + p, err := c.readPacketLeaky(seqNum, r) + if err != nil { + if _, ok := err.(cbcError); ok { + // Verification error: read a fixed amount of + // data, to make distinguishing between + // failing MAC and failing length check more + // difficult. + io.CopyN(ioutil.Discard, r, int64(c.oracleCamouflage)) + } + } + return p, err +} + +func (c *cbcCipher) readPacketLeaky(seqNum uint32, r io.Reader) ([]byte, error) { + blockSize := c.decrypter.BlockSize() + + // Read the header, which will include some of the subsequent data in the + // case of block ciphers - this is copied back to the payload later. + // How many bytes of payload/padding will be read with this first read. + firstBlockLength := uint32((prefixLen + blockSize - 1) / blockSize * blockSize) + firstBlock := c.packetData[:firstBlockLength] + if _, err := io.ReadFull(r, firstBlock); err != nil { + return nil, err + } + + c.oracleCamouflage = maxPacket + 4 + c.macSize - firstBlockLength + + c.decrypter.CryptBlocks(firstBlock, firstBlock) + length := binary.BigEndian.Uint32(firstBlock[:4]) + if length > maxPacket { + return nil, cbcError("ssh: packet too large") + } + if length+4 < maxUInt32(cbcMinPacketSize, blockSize) { + // The minimum size of a packet is 16 (or the cipher block size, whichever + // is larger) bytes. + return nil, cbcError("ssh: packet too small") + } + // The length of the packet (including the length field but not the MAC) must + // be a multiple of the block size or 8, whichever is larger. + if (length+4)%maxUInt32(cbcMinPacketSizeMultiple, blockSize) != 0 { + return nil, cbcError("ssh: invalid packet length multiple") + } + + paddingLength := uint32(firstBlock[4]) + if paddingLength < cbcMinPaddingSize || length <= paddingLength+1 { + return nil, cbcError("ssh: invalid packet length") + } + + // Positions within the c.packetData buffer: + macStart := 4 + length + paddingStart := macStart - paddingLength + + // Entire packet size, starting before length, ending at end of mac. + entirePacketSize := macStart + c.macSize + + // Ensure c.packetData is large enough for the entire packet data. + if uint32(cap(c.packetData)) < entirePacketSize { + // Still need to upsize and copy, but this should be rare at runtime, only + // on upsizing the packetData buffer. + c.packetData = make([]byte, entirePacketSize) + copy(c.packetData, firstBlock) + } else { + c.packetData = c.packetData[:entirePacketSize] + } + + if n, err := io.ReadFull(r, c.packetData[firstBlockLength:]); err != nil { + return nil, err + } else { + c.oracleCamouflage -= uint32(n) + } + + remainingCrypted := c.packetData[firstBlockLength:macStart] + c.decrypter.CryptBlocks(remainingCrypted, remainingCrypted) + + mac := c.packetData[macStart:] + if c.mac != nil { + c.mac.Reset() + binary.BigEndian.PutUint32(c.seqNumBytes[:], seqNum) + c.mac.Write(c.seqNumBytes[:]) + c.mac.Write(c.packetData[:macStart]) + c.macResult = c.mac.Sum(c.macResult[:0]) + if subtle.ConstantTimeCompare(c.macResult, mac) != 1 { + return nil, cbcError("ssh: MAC failure") + } + } + + return c.packetData[prefixLen:paddingStart], nil +} + +func (c *cbcCipher) writePacket(seqNum uint32, w io.Writer, rand io.Reader, packet []byte) error { + effectiveBlockSize := maxUInt32(cbcMinPacketSizeMultiple, c.encrypter.BlockSize()) + + // Length of encrypted portion of the packet (header, payload, padding). + // Enforce minimum padding and packet size. + encLength := maxUInt32(prefixLen+len(packet)+cbcMinPaddingSize, cbcMinPaddingSize) + // Enforce block size. + encLength = (encLength + effectiveBlockSize - 1) / effectiveBlockSize * effectiveBlockSize + + length := encLength - 4 + paddingLength := int(length) - (1 + len(packet)) + + // Overall buffer contains: header, payload, padding, mac. + // Space for the MAC is reserved in the capacity but not the slice length. + bufferSize := encLength + c.macSize + if uint32(cap(c.packetData)) < bufferSize { + c.packetData = make([]byte, encLength, bufferSize) + } else { + c.packetData = c.packetData[:encLength] + } + + p := c.packetData + + // Packet header. + binary.BigEndian.PutUint32(p, length) + p = p[4:] + p[0] = byte(paddingLength) + + // Payload. + p = p[1:] + copy(p, packet) + + // Padding. + p = p[len(packet):] + if _, err := io.ReadFull(rand, p); err != nil { + return err + } + + if c.mac != nil { + c.mac.Reset() + binary.BigEndian.PutUint32(c.seqNumBytes[:], seqNum) + c.mac.Write(c.seqNumBytes[:]) + c.mac.Write(c.packetData) + // The MAC is now appended into the capacity reserved for it earlier. + c.packetData = c.mac.Sum(c.packetData) + } + + c.encrypter.CryptBlocks(c.packetData[:encLength], c.packetData[:encLength]) + + if _, err := w.Write(c.packetData); err != nil { + return err + } + + return nil +} diff --git a/vendor/golang.org/x/crypto/ssh/cipher_test.go b/vendor/golang.org/x/crypto/ssh/cipher_test.go new file mode 100644 index 000000000..5cfa17a62 --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/cipher_test.go @@ -0,0 +1,129 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +import ( + "bytes" + "crypto" + "crypto/aes" + "crypto/rand" + "testing" +) + +func TestDefaultCiphersExist(t *testing.T) { + for _, cipherAlgo := range supportedCiphers { + if _, ok := cipherModes[cipherAlgo]; !ok { + t.Errorf("default cipher %q is unknown", cipherAlgo) + } + } +} + +func TestPacketCiphers(t *testing.T) { + // Still test aes128cbc cipher although it's commented out. + cipherModes[aes128cbcID] = &streamCipherMode{16, aes.BlockSize, 0, nil} + defer delete(cipherModes, aes128cbcID) + + for cipher := range cipherModes { + for mac := range macModes { + kr := &kexResult{Hash: crypto.SHA1} + algs := directionAlgorithms{ + Cipher: cipher, + MAC: mac, + Compression: "none", + } + client, err := newPacketCipher(clientKeys, algs, kr) + if err != nil { + t.Errorf("newPacketCipher(client, %q, %q): %v", cipher, mac, err) + continue + } + server, err := newPacketCipher(clientKeys, algs, kr) + if err != nil { + t.Errorf("newPacketCipher(client, %q, %q): %v", cipher, mac, err) + continue + } + + want := "bla bla" + input := []byte(want) + buf := &bytes.Buffer{} + if err := client.writePacket(0, buf, rand.Reader, input); err != nil { + t.Errorf("writePacket(%q, %q): %v", cipher, mac, err) + continue + } + + packet, err := server.readPacket(0, buf) + if err != nil { + t.Errorf("readPacket(%q, %q): %v", cipher, mac, err) + continue + } + + if string(packet) != want { + t.Errorf("roundtrip(%q, %q): got %q, want %q", cipher, mac, packet, want) + } + } + } +} + +func TestCBCOracleCounterMeasure(t *testing.T) { + cipherModes[aes128cbcID] = &streamCipherMode{16, aes.BlockSize, 0, nil} + defer delete(cipherModes, aes128cbcID) + + kr := &kexResult{Hash: crypto.SHA1} + algs := directionAlgorithms{ + Cipher: aes128cbcID, + MAC: "hmac-sha1", + Compression: "none", + } + client, err := newPacketCipher(clientKeys, algs, kr) + if err != nil { + t.Fatalf("newPacketCipher(client): %v", err) + } + + want := "bla bla" + input := []byte(want) + buf := &bytes.Buffer{} + if err := client.writePacket(0, buf, rand.Reader, input); err != nil { + t.Errorf("writePacket: %v", err) + } + + packetSize := buf.Len() + buf.Write(make([]byte, 2*maxPacket)) + + // We corrupt each byte, but this usually will only test the + // 'packet too large' or 'MAC failure' cases. + lastRead := -1 + for i := 0; i < packetSize; i++ { + server, err := newPacketCipher(clientKeys, algs, kr) + if err != nil { + t.Fatalf("newPacketCipher(client): %v", err) + } + + fresh := &bytes.Buffer{} + fresh.Write(buf.Bytes()) + fresh.Bytes()[i] ^= 0x01 + + before := fresh.Len() + _, err = server.readPacket(0, fresh) + if err == nil { + t.Errorf("corrupt byte %d: readPacket succeeded ", i) + continue + } + if _, ok := err.(cbcError); !ok { + t.Errorf("corrupt byte %d: got %v (%T), want cbcError", i, err, err) + continue + } + + after := fresh.Len() + bytesRead := before - after + if bytesRead < maxPacket { + t.Errorf("corrupt byte %d: read %d bytes, want more than %d", i, bytesRead, maxPacket) + continue + } + + if i > 0 && bytesRead != lastRead { + t.Errorf("corrupt byte %d: read %d bytes, want %d bytes read", i, bytesRead, lastRead) + } + lastRead = bytesRead + } +} diff --git a/vendor/golang.org/x/crypto/ssh/client.go b/vendor/golang.org/x/crypto/ssh/client.go new file mode 100644 index 000000000..a7e3263bc --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/client.go @@ -0,0 +1,257 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +import ( + "bytes" + "errors" + "fmt" + "net" + "sync" + "time" +) + +// Client implements a traditional SSH client that supports shells, +// subprocesses, TCP port/streamlocal forwarding and tunneled dialing. +type Client struct { + Conn + + forwards forwardList // forwarded tcpip connections from the remote side + mu sync.Mutex + channelHandlers map[string]chan NewChannel +} + +// HandleChannelOpen returns a channel on which NewChannel requests +// for the given type are sent. If the type already is being handled, +// nil is returned. The channel is closed when the connection is closed. +func (c *Client) HandleChannelOpen(channelType string) <-chan NewChannel { + c.mu.Lock() + defer c.mu.Unlock() + if c.channelHandlers == nil { + // The SSH channel has been closed. + c := make(chan NewChannel) + close(c) + return c + } + + ch := c.channelHandlers[channelType] + if ch != nil { + return nil + } + + ch = make(chan NewChannel, chanSize) + c.channelHandlers[channelType] = ch + return ch +} + +// NewClient creates a Client on top of the given connection. +func NewClient(c Conn, chans <-chan NewChannel, reqs <-chan *Request) *Client { + conn := &Client{ + Conn: c, + channelHandlers: make(map[string]chan NewChannel, 1), + } + + go conn.handleGlobalRequests(reqs) + go conn.handleChannelOpens(chans) + go func() { + conn.Wait() + conn.forwards.closeAll() + }() + go conn.forwards.handleChannels(conn.HandleChannelOpen("forwarded-tcpip")) + go conn.forwards.handleChannels(conn.HandleChannelOpen("forwarded-streamlocal@openssh.com")) + return conn +} + +// NewClientConn establishes an authenticated SSH connection using c +// as the underlying transport. The Request and NewChannel channels +// must be serviced or the connection will hang. +func NewClientConn(c net.Conn, addr string, config *ClientConfig) (Conn, <-chan NewChannel, <-chan *Request, error) { + fullConf := *config + fullConf.SetDefaults() + if fullConf.HostKeyCallback == nil { + c.Close() + return nil, nil, nil, errors.New("ssh: must specify HostKeyCallback") + } + + conn := &connection{ + sshConn: sshConn{conn: c}, + } + + if err := conn.clientHandshake(addr, &fullConf); err != nil { + c.Close() + return nil, nil, nil, fmt.Errorf("ssh: handshake failed: %v", err) + } + conn.mux = newMux(conn.transport) + return conn, conn.mux.incomingChannels, conn.mux.incomingRequests, nil +} + +// clientHandshake performs the client side key exchange. See RFC 4253 Section +// 7. +func (c *connection) clientHandshake(dialAddress string, config *ClientConfig) error { + if config.ClientVersion != "" { + c.clientVersion = []byte(config.ClientVersion) + } else { + c.clientVersion = []byte(packageVersion) + } + var err error + c.serverVersion, err = exchangeVersions(c.sshConn.conn, c.clientVersion) + if err != nil { + return err + } + + c.transport = newClientTransport( + newTransport(c.sshConn.conn, config.Rand, true /* is client */), + c.clientVersion, c.serverVersion, config, dialAddress, c.sshConn.RemoteAddr()) + if err := c.transport.waitSession(); err != nil { + return err + } + + c.sessionID = c.transport.getSessionID() + return c.clientAuthenticate(config) +} + +// verifyHostKeySignature verifies the host key obtained in the key +// exchange. +func verifyHostKeySignature(hostKey PublicKey, result *kexResult) error { + sig, rest, ok := parseSignatureBody(result.Signature) + if len(rest) > 0 || !ok { + return errors.New("ssh: signature parse error") + } + + return hostKey.Verify(result.H, sig) +} + +// NewSession opens a new Session for this client. (A session is a remote +// execution of a program.) +func (c *Client) NewSession() (*Session, error) { + ch, in, err := c.OpenChannel("session", nil) + if err != nil { + return nil, err + } + return newSession(ch, in) +} + +func (c *Client) handleGlobalRequests(incoming <-chan *Request) { + for r := range incoming { + // This handles keepalive messages and matches + // the behaviour of OpenSSH. + r.Reply(false, nil) + } +} + +// handleChannelOpens channel open messages from the remote side. +func (c *Client) handleChannelOpens(in <-chan NewChannel) { + for ch := range in { + c.mu.Lock() + handler := c.channelHandlers[ch.ChannelType()] + c.mu.Unlock() + + if handler != nil { + handler <- ch + } else { + ch.Reject(UnknownChannelType, fmt.Sprintf("unknown channel type: %v", ch.ChannelType())) + } + } + + c.mu.Lock() + for _, ch := range c.channelHandlers { + close(ch) + } + c.channelHandlers = nil + c.mu.Unlock() +} + +// Dial starts a client connection to the given SSH server. It is a +// convenience function that connects to the given network address, +// initiates the SSH handshake, and then sets up a Client. For access +// to incoming channels and requests, use net.Dial with NewClientConn +// instead. +func Dial(network, addr string, config *ClientConfig) (*Client, error) { + conn, err := net.DialTimeout(network, addr, config.Timeout) + if err != nil { + return nil, err + } + c, chans, reqs, err := NewClientConn(conn, addr, config) + if err != nil { + return nil, err + } + return NewClient(c, chans, reqs), nil +} + +// HostKeyCallback is the function type used for verifying server +// keys. A HostKeyCallback must return nil if the host key is OK, or +// an error to reject it. It receives the hostname as passed to Dial +// or NewClientConn. The remote address is the RemoteAddr of the +// net.Conn underlying the the SSH connection. +type HostKeyCallback func(hostname string, remote net.Addr, key PublicKey) error + +// A ClientConfig structure is used to configure a Client. It must not be +// modified after having been passed to an SSH function. +type ClientConfig struct { + // Config contains configuration that is shared between clients and + // servers. + Config + + // User contains the username to authenticate as. + User string + + // Auth contains possible authentication methods to use with the + // server. Only the first instance of a particular RFC 4252 method will + // be used during authentication. + Auth []AuthMethod + + // HostKeyCallback is called during the cryptographic + // handshake to validate the server's host key. The client + // configuration must supply this callback for the connection + // to succeed. The functions InsecureIgnoreHostKey or + // FixedHostKey can be used for simplistic host key checks. + HostKeyCallback HostKeyCallback + + // ClientVersion contains the version identification string that will + // be used for the connection. If empty, a reasonable default is used. + ClientVersion string + + // HostKeyAlgorithms lists the key types that the client will + // accept from the server as host key, in order of + // preference. If empty, a reasonable default is used. Any + // string returned from PublicKey.Type method may be used, or + // any of the CertAlgoXxxx and KeyAlgoXxxx constants. + HostKeyAlgorithms []string + + // Timeout is the maximum amount of time for the TCP connection to establish. + // + // A Timeout of zero means no timeout. + Timeout time.Duration +} + +// InsecureIgnoreHostKey returns a function that can be used for +// ClientConfig.HostKeyCallback to accept any host key. It should +// not be used for production code. +func InsecureIgnoreHostKey() HostKeyCallback { + return func(hostname string, remote net.Addr, key PublicKey) error { + return nil + } +} + +type fixedHostKey struct { + key PublicKey +} + +func (f *fixedHostKey) check(hostname string, remote net.Addr, key PublicKey) error { + if f.key == nil { + return fmt.Errorf("ssh: required host key was nil") + } + if !bytes.Equal(key.Marshal(), f.key.Marshal()) { + return fmt.Errorf("ssh: host key mismatch") + } + return nil +} + +// FixedHostKey returns a function for use in +// ClientConfig.HostKeyCallback to accept only a specific host key. +func FixedHostKey(key PublicKey) HostKeyCallback { + hk := &fixedHostKey{key} + return hk.check +} diff --git a/vendor/golang.org/x/crypto/ssh/client_auth.go b/vendor/golang.org/x/crypto/ssh/client_auth.go new file mode 100644 index 000000000..3acd8d498 --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/client_auth.go @@ -0,0 +1,486 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +import ( + "bytes" + "errors" + "fmt" + "io" +) + +// clientAuthenticate authenticates with the remote server. See RFC 4252. +func (c *connection) clientAuthenticate(config *ClientConfig) error { + // initiate user auth session + if err := c.transport.writePacket(Marshal(&serviceRequestMsg{serviceUserAuth})); err != nil { + return err + } + packet, err := c.transport.readPacket() + if err != nil { + return err + } + var serviceAccept serviceAcceptMsg + if err := Unmarshal(packet, &serviceAccept); err != nil { + return err + } + + // during the authentication phase the client first attempts the "none" method + // then any untried methods suggested by the server. + tried := make(map[string]bool) + var lastMethods []string + + sessionID := c.transport.getSessionID() + for auth := AuthMethod(new(noneAuth)); auth != nil; { + ok, methods, err := auth.auth(sessionID, config.User, c.transport, config.Rand) + if err != nil { + return err + } + if ok { + // success + return nil + } + tried[auth.method()] = true + if methods == nil { + methods = lastMethods + } + lastMethods = methods + + auth = nil + + findNext: + for _, a := range config.Auth { + candidateMethod := a.method() + if tried[candidateMethod] { + continue + } + for _, meth := range methods { + if meth == candidateMethod { + auth = a + break findNext + } + } + } + } + return fmt.Errorf("ssh: unable to authenticate, attempted methods %v, no supported methods remain", keys(tried)) +} + +func keys(m map[string]bool) []string { + s := make([]string, 0, len(m)) + + for key := range m { + s = append(s, key) + } + return s +} + +// An AuthMethod represents an instance of an RFC 4252 authentication method. +type AuthMethod interface { + // auth authenticates user over transport t. + // Returns true if authentication is successful. + // If authentication is not successful, a []string of alternative + // method names is returned. If the slice is nil, it will be ignored + // and the previous set of possible methods will be reused. + auth(session []byte, user string, p packetConn, rand io.Reader) (bool, []string, error) + + // method returns the RFC 4252 method name. + method() string +} + +// "none" authentication, RFC 4252 section 5.2. +type noneAuth int + +func (n *noneAuth) auth(session []byte, user string, c packetConn, rand io.Reader) (bool, []string, error) { + if err := c.writePacket(Marshal(&userAuthRequestMsg{ + User: user, + Service: serviceSSH, + Method: "none", + })); err != nil { + return false, nil, err + } + + return handleAuthResponse(c) +} + +func (n *noneAuth) method() string { + return "none" +} + +// passwordCallback is an AuthMethod that fetches the password through +// a function call, e.g. by prompting the user. +type passwordCallback func() (password string, err error) + +func (cb passwordCallback) auth(session []byte, user string, c packetConn, rand io.Reader) (bool, []string, error) { + type passwordAuthMsg struct { + User string `sshtype:"50"` + Service string + Method string + Reply bool + Password string + } + + pw, err := cb() + // REVIEW NOTE: is there a need to support skipping a password attempt? + // The program may only find out that the user doesn't have a password + // when prompting. + if err != nil { + return false, nil, err + } + + if err := c.writePacket(Marshal(&passwordAuthMsg{ + User: user, + Service: serviceSSH, + Method: cb.method(), + Reply: false, + Password: pw, + })); err != nil { + return false, nil, err + } + + return handleAuthResponse(c) +} + +func (cb passwordCallback) method() string { + return "password" +} + +// Password returns an AuthMethod using the given password. +func Password(secret string) AuthMethod { + return passwordCallback(func() (string, error) { return secret, nil }) +} + +// PasswordCallback returns an AuthMethod that uses a callback for +// fetching a password. +func PasswordCallback(prompt func() (secret string, err error)) AuthMethod { + return passwordCallback(prompt) +} + +type publickeyAuthMsg struct { + User string `sshtype:"50"` + Service string + Method string + // HasSig indicates to the receiver packet that the auth request is signed and + // should be used for authentication of the request. + HasSig bool + Algoname string + PubKey []byte + // Sig is tagged with "rest" so Marshal will exclude it during + // validateKey + Sig []byte `ssh:"rest"` +} + +// publicKeyCallback is an AuthMethod that uses a set of key +// pairs for authentication. +type publicKeyCallback func() ([]Signer, error) + +func (cb publicKeyCallback) method() string { + return "publickey" +} + +func (cb publicKeyCallback) auth(session []byte, user string, c packetConn, rand io.Reader) (bool, []string, error) { + // Authentication is performed by sending an enquiry to test if a key is + // acceptable to the remote. If the key is acceptable, the client will + // attempt to authenticate with the valid key. If not the client will repeat + // the process with the remaining keys. + + signers, err := cb() + if err != nil { + return false, nil, err + } + var methods []string + for _, signer := range signers { + ok, err := validateKey(signer.PublicKey(), user, c) + if err != nil { + return false, nil, err + } + if !ok { + continue + } + + pub := signer.PublicKey() + pubKey := pub.Marshal() + sign, err := signer.Sign(rand, buildDataSignedForAuth(session, userAuthRequestMsg{ + User: user, + Service: serviceSSH, + Method: cb.method(), + }, []byte(pub.Type()), pubKey)) + if err != nil { + return false, nil, err + } + + // manually wrap the serialized signature in a string + s := Marshal(sign) + sig := make([]byte, stringLength(len(s))) + marshalString(sig, s) + msg := publickeyAuthMsg{ + User: user, + Service: serviceSSH, + Method: cb.method(), + HasSig: true, + Algoname: pub.Type(), + PubKey: pubKey, + Sig: sig, + } + p := Marshal(&msg) + if err := c.writePacket(p); err != nil { + return false, nil, err + } + var success bool + success, methods, err = handleAuthResponse(c) + if err != nil { + return false, nil, err + } + + // If authentication succeeds or the list of available methods does not + // contain the "publickey" method, do not attempt to authenticate with any + // other keys. According to RFC 4252 Section 7, the latter can occur when + // additional authentication methods are required. + if success || !containsMethod(methods, cb.method()) { + return success, methods, err + } + } + + return false, methods, nil +} + +func containsMethod(methods []string, method string) bool { + for _, m := range methods { + if m == method { + return true + } + } + + return false +} + +// validateKey validates the key provided is acceptable to the server. +func validateKey(key PublicKey, user string, c packetConn) (bool, error) { + pubKey := key.Marshal() + msg := publickeyAuthMsg{ + User: user, + Service: serviceSSH, + Method: "publickey", + HasSig: false, + Algoname: key.Type(), + PubKey: pubKey, + } + if err := c.writePacket(Marshal(&msg)); err != nil { + return false, err + } + + return confirmKeyAck(key, c) +} + +func confirmKeyAck(key PublicKey, c packetConn) (bool, error) { + pubKey := key.Marshal() + algoname := key.Type() + + for { + packet, err := c.readPacket() + if err != nil { + return false, err + } + switch packet[0] { + case msgUserAuthBanner: + // TODO(gpaul): add callback to present the banner to the user + case msgUserAuthPubKeyOk: + var msg userAuthPubKeyOkMsg + if err := Unmarshal(packet, &msg); err != nil { + return false, err + } + if msg.Algo != algoname || !bytes.Equal(msg.PubKey, pubKey) { + return false, nil + } + return true, nil + case msgUserAuthFailure: + return false, nil + default: + return false, unexpectedMessageError(msgUserAuthSuccess, packet[0]) + } + } +} + +// PublicKeys returns an AuthMethod that uses the given key +// pairs. +func PublicKeys(signers ...Signer) AuthMethod { + return publicKeyCallback(func() ([]Signer, error) { return signers, nil }) +} + +// PublicKeysCallback returns an AuthMethod that runs the given +// function to obtain a list of key pairs. +func PublicKeysCallback(getSigners func() (signers []Signer, err error)) AuthMethod { + return publicKeyCallback(getSigners) +} + +// handleAuthResponse returns whether the preceding authentication request succeeded +// along with a list of remaining authentication methods to try next and +// an error if an unexpected response was received. +func handleAuthResponse(c packetConn) (bool, []string, error) { + for { + packet, err := c.readPacket() + if err != nil { + return false, nil, err + } + + switch packet[0] { + case msgUserAuthBanner: + // TODO: add callback to present the banner to the user + case msgUserAuthFailure: + var msg userAuthFailureMsg + if err := Unmarshal(packet, &msg); err != nil { + return false, nil, err + } + return false, msg.Methods, nil + case msgUserAuthSuccess: + return true, nil, nil + default: + return false, nil, unexpectedMessageError(msgUserAuthSuccess, packet[0]) + } + } +} + +// KeyboardInteractiveChallenge should print questions, optionally +// disabling echoing (e.g. for passwords), and return all the answers. +// Challenge may be called multiple times in a single session. After +// successful authentication, the server may send a challenge with no +// questions, for which the user and instruction messages should be +// printed. RFC 4256 section 3.3 details how the UI should behave for +// both CLI and GUI environments. +type KeyboardInteractiveChallenge func(user, instruction string, questions []string, echos []bool) (answers []string, err error) + +// KeyboardInteractive returns an AuthMethod using a prompt/response +// sequence controlled by the server. +func KeyboardInteractive(challenge KeyboardInteractiveChallenge) AuthMethod { + return challenge +} + +func (cb KeyboardInteractiveChallenge) method() string { + return "keyboard-interactive" +} + +func (cb KeyboardInteractiveChallenge) auth(session []byte, user string, c packetConn, rand io.Reader) (bool, []string, error) { + type initiateMsg struct { + User string `sshtype:"50"` + Service string + Method string + Language string + Submethods string + } + + if err := c.writePacket(Marshal(&initiateMsg{ + User: user, + Service: serviceSSH, + Method: "keyboard-interactive", + })); err != nil { + return false, nil, err + } + + for { + packet, err := c.readPacket() + if err != nil { + return false, nil, err + } + + // like handleAuthResponse, but with less options. + switch packet[0] { + case msgUserAuthBanner: + // TODO: Print banners during userauth. + continue + case msgUserAuthInfoRequest: + // OK + case msgUserAuthFailure: + var msg userAuthFailureMsg + if err := Unmarshal(packet, &msg); err != nil { + return false, nil, err + } + return false, msg.Methods, nil + case msgUserAuthSuccess: + return true, nil, nil + default: + return false, nil, unexpectedMessageError(msgUserAuthInfoRequest, packet[0]) + } + + var msg userAuthInfoRequestMsg + if err := Unmarshal(packet, &msg); err != nil { + return false, nil, err + } + + // Manually unpack the prompt/echo pairs. + rest := msg.Prompts + var prompts []string + var echos []bool + for i := 0; i < int(msg.NumPrompts); i++ { + prompt, r, ok := parseString(rest) + if !ok || len(r) == 0 { + return false, nil, errors.New("ssh: prompt format error") + } + prompts = append(prompts, string(prompt)) + echos = append(echos, r[0] != 0) + rest = r[1:] + } + + if len(rest) != 0 { + return false, nil, errors.New("ssh: extra data following keyboard-interactive pairs") + } + + answers, err := cb(msg.User, msg.Instruction, prompts, echos) + if err != nil { + return false, nil, err + } + + if len(answers) != len(prompts) { + return false, nil, errors.New("ssh: not enough answers from keyboard-interactive callback") + } + responseLength := 1 + 4 + for _, a := range answers { + responseLength += stringLength(len(a)) + } + serialized := make([]byte, responseLength) + p := serialized + p[0] = msgUserAuthInfoResponse + p = p[1:] + p = marshalUint32(p, uint32(len(answers))) + for _, a := range answers { + p = marshalString(p, []byte(a)) + } + + if err := c.writePacket(serialized); err != nil { + return false, nil, err + } + } +} + +type retryableAuthMethod struct { + authMethod AuthMethod + maxTries int +} + +func (r *retryableAuthMethod) auth(session []byte, user string, c packetConn, rand io.Reader) (ok bool, methods []string, err error) { + for i := 0; r.maxTries <= 0 || i < r.maxTries; i++ { + ok, methods, err = r.authMethod.auth(session, user, c, rand) + if ok || err != nil { // either success or error terminate + return ok, methods, err + } + } + return ok, methods, err +} + +func (r *retryableAuthMethod) method() string { + return r.authMethod.method() +} + +// RetryableAuthMethod is a decorator for other auth methods enabling them to +// be retried up to maxTries before considering that AuthMethod itself failed. +// If maxTries is <= 0, will retry indefinitely +// +// This is useful for interactive clients using challenge/response type +// authentication (e.g. Keyboard-Interactive, Password, etc) where the user +// could mistype their response resulting in the server issuing a +// SSH_MSG_USERAUTH_FAILURE (rfc4252 #8 [password] and rfc4256 #3.4 +// [keyboard-interactive]); Without this decorator, the non-retryable +// AuthMethod would be removed from future consideration, and never tried again +// (and so the user would never be able to retry their entry). +func RetryableAuthMethod(auth AuthMethod, maxTries int) AuthMethod { + return &retryableAuthMethod{authMethod: auth, maxTries: maxTries} +} diff --git a/vendor/golang.org/x/crypto/ssh/client_auth_test.go b/vendor/golang.org/x/crypto/ssh/client_auth_test.go new file mode 100644 index 000000000..145b57a2b --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/client_auth_test.go @@ -0,0 +1,628 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +import ( + "bytes" + "crypto/rand" + "errors" + "fmt" + "os" + "strings" + "testing" +) + +type keyboardInteractive map[string]string + +func (cr keyboardInteractive) Challenge(user string, instruction string, questions []string, echos []bool) ([]string, error) { + var answers []string + for _, q := range questions { + answers = append(answers, cr[q]) + } + return answers, nil +} + +// reused internally by tests +var clientPassword = "tiger" + +// tryAuth runs a handshake with a given config against an SSH server +// with config serverConfig +func tryAuth(t *testing.T, config *ClientConfig) error { + c1, c2, err := netPipe() + if err != nil { + t.Fatalf("netPipe: %v", err) + } + defer c1.Close() + defer c2.Close() + + certChecker := CertChecker{ + IsUserAuthority: func(k PublicKey) bool { + return bytes.Equal(k.Marshal(), testPublicKeys["ecdsa"].Marshal()) + }, + UserKeyFallback: func(conn ConnMetadata, key PublicKey) (*Permissions, error) { + if conn.User() == "testuser" && bytes.Equal(key.Marshal(), testPublicKeys["rsa"].Marshal()) { + return nil, nil + } + + return nil, fmt.Errorf("pubkey for %q not acceptable", conn.User()) + }, + IsRevoked: func(c *Certificate) bool { + return c.Serial == 666 + }, + } + + serverConfig := &ServerConfig{ + PasswordCallback: func(conn ConnMetadata, pass []byte) (*Permissions, error) { + if conn.User() == "testuser" && string(pass) == clientPassword { + return nil, nil + } + return nil, errors.New("password auth failed") + }, + PublicKeyCallback: certChecker.Authenticate, + KeyboardInteractiveCallback: func(conn ConnMetadata, challenge KeyboardInteractiveChallenge) (*Permissions, error) { + ans, err := challenge("user", + "instruction", + []string{"question1", "question2"}, + []bool{true, true}) + if err != nil { + return nil, err + } + ok := conn.User() == "testuser" && ans[0] == "answer1" && ans[1] == "answer2" + if ok { + challenge("user", "motd", nil, nil) + return nil, nil + } + return nil, errors.New("keyboard-interactive failed") + }, + } + serverConfig.AddHostKey(testSigners["rsa"]) + + go newServer(c1, serverConfig) + _, _, _, err = NewClientConn(c2, "", config) + return err +} + +func TestClientAuthPublicKey(t *testing.T) { + config := &ClientConfig{ + User: "testuser", + Auth: []AuthMethod{ + PublicKeys(testSigners["rsa"]), + }, + HostKeyCallback: InsecureIgnoreHostKey(), + } + if err := tryAuth(t, config); err != nil { + t.Fatalf("unable to dial remote side: %s", err) + } +} + +func TestAuthMethodPassword(t *testing.T) { + config := &ClientConfig{ + User: "testuser", + Auth: []AuthMethod{ + Password(clientPassword), + }, + HostKeyCallback: InsecureIgnoreHostKey(), + } + + if err := tryAuth(t, config); err != nil { + t.Fatalf("unable to dial remote side: %s", err) + } +} + +func TestAuthMethodFallback(t *testing.T) { + var passwordCalled bool + config := &ClientConfig{ + User: "testuser", + Auth: []AuthMethod{ + PublicKeys(testSigners["rsa"]), + PasswordCallback( + func() (string, error) { + passwordCalled = true + return "WRONG", nil + }), + }, + HostKeyCallback: InsecureIgnoreHostKey(), + } + + if err := tryAuth(t, config); err != nil { + t.Fatalf("unable to dial remote side: %s", err) + } + + if passwordCalled { + t.Errorf("password auth tried before public-key auth.") + } +} + +func TestAuthMethodWrongPassword(t *testing.T) { + config := &ClientConfig{ + User: "testuser", + Auth: []AuthMethod{ + Password("wrong"), + PublicKeys(testSigners["rsa"]), + }, + HostKeyCallback: InsecureIgnoreHostKey(), + } + + if err := tryAuth(t, config); err != nil { + t.Fatalf("unable to dial remote side: %s", err) + } +} + +func TestAuthMethodKeyboardInteractive(t *testing.T) { + answers := keyboardInteractive(map[string]string{ + "question1": "answer1", + "question2": "answer2", + }) + config := &ClientConfig{ + User: "testuser", + Auth: []AuthMethod{ + KeyboardInteractive(answers.Challenge), + }, + HostKeyCallback: InsecureIgnoreHostKey(), + } + + if err := tryAuth(t, config); err != nil { + t.Fatalf("unable to dial remote side: %s", err) + } +} + +func TestAuthMethodWrongKeyboardInteractive(t *testing.T) { + answers := keyboardInteractive(map[string]string{ + "question1": "answer1", + "question2": "WRONG", + }) + config := &ClientConfig{ + User: "testuser", + Auth: []AuthMethod{ + KeyboardInteractive(answers.Challenge), + }, + } + + if err := tryAuth(t, config); err == nil { + t.Fatalf("wrong answers should not have authenticated with KeyboardInteractive") + } +} + +// the mock server will only authenticate ssh-rsa keys +func TestAuthMethodInvalidPublicKey(t *testing.T) { + config := &ClientConfig{ + User: "testuser", + Auth: []AuthMethod{ + PublicKeys(testSigners["dsa"]), + }, + } + + if err := tryAuth(t, config); err == nil { + t.Fatalf("dsa private key should not have authenticated with rsa public key") + } +} + +// the client should authenticate with the second key +func TestAuthMethodRSAandDSA(t *testing.T) { + config := &ClientConfig{ + User: "testuser", + Auth: []AuthMethod{ + PublicKeys(testSigners["dsa"], testSigners["rsa"]), + }, + HostKeyCallback: InsecureIgnoreHostKey(), + } + if err := tryAuth(t, config); err != nil { + t.Fatalf("client could not authenticate with rsa key: %v", err) + } +} + +func TestClientHMAC(t *testing.T) { + for _, mac := range supportedMACs { + config := &ClientConfig{ + User: "testuser", + Auth: []AuthMethod{ + PublicKeys(testSigners["rsa"]), + }, + Config: Config{ + MACs: []string{mac}, + }, + HostKeyCallback: InsecureIgnoreHostKey(), + } + if err := tryAuth(t, config); err != nil { + t.Fatalf("client could not authenticate with mac algo %s: %v", mac, err) + } + } +} + +// issue 4285. +func TestClientUnsupportedCipher(t *testing.T) { + config := &ClientConfig{ + User: "testuser", + Auth: []AuthMethod{ + PublicKeys(), + }, + Config: Config{ + Ciphers: []string{"aes128-cbc"}, // not currently supported + }, + } + if err := tryAuth(t, config); err == nil { + t.Errorf("expected no ciphers in common") + } +} + +func TestClientUnsupportedKex(t *testing.T) { + if os.Getenv("GO_BUILDER_NAME") != "" { + t.Skip("skipping known-flaky test on the Go build dashboard; see golang.org/issue/15198") + } + config := &ClientConfig{ + User: "testuser", + Auth: []AuthMethod{ + PublicKeys(), + }, + Config: Config{ + KeyExchanges: []string{"diffie-hellman-group-exchange-sha256"}, // not currently supported + }, + HostKeyCallback: InsecureIgnoreHostKey(), + } + if err := tryAuth(t, config); err == nil || !strings.Contains(err.Error(), "common algorithm") { + t.Errorf("got %v, expected 'common algorithm'", err) + } +} + +func TestClientLoginCert(t *testing.T) { + cert := &Certificate{ + Key: testPublicKeys["rsa"], + ValidBefore: CertTimeInfinity, + CertType: UserCert, + } + cert.SignCert(rand.Reader, testSigners["ecdsa"]) + certSigner, err := NewCertSigner(cert, testSigners["rsa"]) + if err != nil { + t.Fatalf("NewCertSigner: %v", err) + } + + clientConfig := &ClientConfig{ + User: "user", + HostKeyCallback: InsecureIgnoreHostKey(), + } + clientConfig.Auth = append(clientConfig.Auth, PublicKeys(certSigner)) + + // should succeed + if err := tryAuth(t, clientConfig); err != nil { + t.Errorf("cert login failed: %v", err) + } + + // corrupted signature + cert.Signature.Blob[0]++ + if err := tryAuth(t, clientConfig); err == nil { + t.Errorf("cert login passed with corrupted sig") + } + + // revoked + cert.Serial = 666 + cert.SignCert(rand.Reader, testSigners["ecdsa"]) + if err := tryAuth(t, clientConfig); err == nil { + t.Errorf("revoked cert login succeeded") + } + cert.Serial = 1 + + // sign with wrong key + cert.SignCert(rand.Reader, testSigners["dsa"]) + if err := tryAuth(t, clientConfig); err == nil { + t.Errorf("cert login passed with non-authoritative key") + } + + // host cert + cert.CertType = HostCert + cert.SignCert(rand.Reader, testSigners["ecdsa"]) + if err := tryAuth(t, clientConfig); err == nil { + t.Errorf("cert login passed with wrong type") + } + cert.CertType = UserCert + + // principal specified + cert.ValidPrincipals = []string{"user"} + cert.SignCert(rand.Reader, testSigners["ecdsa"]) + if err := tryAuth(t, clientConfig); err != nil { + t.Errorf("cert login failed: %v", err) + } + + // wrong principal specified + cert.ValidPrincipals = []string{"fred"} + cert.SignCert(rand.Reader, testSigners["ecdsa"]) + if err := tryAuth(t, clientConfig); err == nil { + t.Errorf("cert login passed with wrong principal") + } + cert.ValidPrincipals = nil + + // added critical option + cert.CriticalOptions = map[string]string{"root-access": "yes"} + cert.SignCert(rand.Reader, testSigners["ecdsa"]) + if err := tryAuth(t, clientConfig); err == nil { + t.Errorf("cert login passed with unrecognized critical option") + } + + // allowed source address + cert.CriticalOptions = map[string]string{"source-address": "127.0.0.42/24,::42/120"} + cert.SignCert(rand.Reader, testSigners["ecdsa"]) + if err := tryAuth(t, clientConfig); err != nil { + t.Errorf("cert login with source-address failed: %v", err) + } + + // disallowed source address + cert.CriticalOptions = map[string]string{"source-address": "127.0.0.42,::42"} + cert.SignCert(rand.Reader, testSigners["ecdsa"]) + if err := tryAuth(t, clientConfig); err == nil { + t.Errorf("cert login with source-address succeeded") + } +} + +func testPermissionsPassing(withPermissions bool, t *testing.T) { + serverConfig := &ServerConfig{ + PublicKeyCallback: func(conn ConnMetadata, key PublicKey) (*Permissions, error) { + if conn.User() == "nopermissions" { + return nil, nil + } + return &Permissions{}, nil + }, + } + serverConfig.AddHostKey(testSigners["rsa"]) + + clientConfig := &ClientConfig{ + Auth: []AuthMethod{ + PublicKeys(testSigners["rsa"]), + }, + HostKeyCallback: InsecureIgnoreHostKey(), + } + if withPermissions { + clientConfig.User = "permissions" + } else { + clientConfig.User = "nopermissions" + } + + c1, c2, err := netPipe() + if err != nil { + t.Fatalf("netPipe: %v", err) + } + defer c1.Close() + defer c2.Close() + + go NewClientConn(c2, "", clientConfig) + serverConn, err := newServer(c1, serverConfig) + if err != nil { + t.Fatal(err) + } + if p := serverConn.Permissions; (p != nil) != withPermissions { + t.Fatalf("withPermissions is %t, but Permissions object is %#v", withPermissions, p) + } +} + +func TestPermissionsPassing(t *testing.T) { + testPermissionsPassing(true, t) +} + +func TestNoPermissionsPassing(t *testing.T) { + testPermissionsPassing(false, t) +} + +func TestRetryableAuth(t *testing.T) { + n := 0 + passwords := []string{"WRONG1", "WRONG2"} + + config := &ClientConfig{ + User: "testuser", + Auth: []AuthMethod{ + RetryableAuthMethod(PasswordCallback(func() (string, error) { + p := passwords[n] + n++ + return p, nil + }), 2), + PublicKeys(testSigners["rsa"]), + }, + HostKeyCallback: InsecureIgnoreHostKey(), + } + + if err := tryAuth(t, config); err != nil { + t.Fatalf("unable to dial remote side: %s", err) + } + if n != 2 { + t.Fatalf("Did not try all passwords") + } +} + +func ExampleRetryableAuthMethod(t *testing.T) { + user := "testuser" + NumberOfPrompts := 3 + + // Normally this would be a callback that prompts the user to answer the + // provided questions + Cb := func(user, instruction string, questions []string, echos []bool) (answers []string, err error) { + return []string{"answer1", "answer2"}, nil + } + + config := &ClientConfig{ + HostKeyCallback: InsecureIgnoreHostKey(), + User: user, + Auth: []AuthMethod{ + RetryableAuthMethod(KeyboardInteractiveChallenge(Cb), NumberOfPrompts), + }, + } + + if err := tryAuth(t, config); err != nil { + t.Fatalf("unable to dial remote side: %s", err) + } +} + +// Test if username is received on server side when NoClientAuth is used +func TestClientAuthNone(t *testing.T) { + user := "testuser" + serverConfig := &ServerConfig{ + NoClientAuth: true, + } + serverConfig.AddHostKey(testSigners["rsa"]) + + clientConfig := &ClientConfig{ + User: user, + HostKeyCallback: InsecureIgnoreHostKey(), + } + + c1, c2, err := netPipe() + if err != nil { + t.Fatalf("netPipe: %v", err) + } + defer c1.Close() + defer c2.Close() + + go NewClientConn(c2, "", clientConfig) + serverConn, err := newServer(c1, serverConfig) + if err != nil { + t.Fatalf("newServer: %v", err) + } + if serverConn.User() != user { + t.Fatalf("server: got %q, want %q", serverConn.User(), user) + } +} + +// Test if authentication attempts are limited on server when MaxAuthTries is set +func TestClientAuthMaxAuthTries(t *testing.T) { + user := "testuser" + + serverConfig := &ServerConfig{ + MaxAuthTries: 2, + PasswordCallback: func(conn ConnMetadata, pass []byte) (*Permissions, error) { + if conn.User() == "testuser" && string(pass) == "right" { + return nil, nil + } + return nil, errors.New("password auth failed") + }, + } + serverConfig.AddHostKey(testSigners["rsa"]) + + expectedErr := fmt.Errorf("ssh: handshake failed: %v", &disconnectMsg{ + Reason: 2, + Message: "too many authentication failures", + }) + + for tries := 2; tries < 4; tries++ { + n := tries + clientConfig := &ClientConfig{ + User: user, + Auth: []AuthMethod{ + RetryableAuthMethod(PasswordCallback(func() (string, error) { + n-- + if n == 0 { + return "right", nil + } + return "wrong", nil + }), tries), + }, + HostKeyCallback: InsecureIgnoreHostKey(), + } + + c1, c2, err := netPipe() + if err != nil { + t.Fatalf("netPipe: %v", err) + } + defer c1.Close() + defer c2.Close() + + go newServer(c1, serverConfig) + _, _, _, err = NewClientConn(c2, "", clientConfig) + if tries > 2 { + if err == nil { + t.Fatalf("client: got no error, want %s", expectedErr) + } else if err.Error() != expectedErr.Error() { + t.Fatalf("client: got %s, want %s", err, expectedErr) + } + } else { + if err != nil { + t.Fatalf("client: got %s, want no error", err) + } + } + } +} + +// Test if authentication attempts are correctly limited on server +// when more public keys are provided then MaxAuthTries +func TestClientAuthMaxAuthTriesPublicKey(t *testing.T) { + signers := []Signer{} + for i := 0; i < 6; i++ { + signers = append(signers, testSigners["dsa"]) + } + + validConfig := &ClientConfig{ + User: "testuser", + Auth: []AuthMethod{ + PublicKeys(append([]Signer{testSigners["rsa"]}, signers...)...), + }, + HostKeyCallback: InsecureIgnoreHostKey(), + } + if err := tryAuth(t, validConfig); err != nil { + t.Fatalf("unable to dial remote side: %s", err) + } + + expectedErr := fmt.Errorf("ssh: handshake failed: %v", &disconnectMsg{ + Reason: 2, + Message: "too many authentication failures", + }) + invalidConfig := &ClientConfig{ + User: "testuser", + Auth: []AuthMethod{ + PublicKeys(append(signers, testSigners["rsa"])...), + }, + HostKeyCallback: InsecureIgnoreHostKey(), + } + if err := tryAuth(t, invalidConfig); err == nil { + t.Fatalf("client: got no error, want %s", expectedErr) + } else if err.Error() != expectedErr.Error() { + t.Fatalf("client: got %s, want %s", err, expectedErr) + } +} + +// Test whether authentication errors are being properly logged if all +// authentication methods have been exhausted +func TestClientAuthErrorList(t *testing.T) { + publicKeyErr := errors.New("This is an error from PublicKeyCallback") + + clientConfig := &ClientConfig{ + Auth: []AuthMethod{ + PublicKeys(testSigners["rsa"]), + }, + HostKeyCallback: InsecureIgnoreHostKey(), + } + serverConfig := &ServerConfig{ + PublicKeyCallback: func(_ ConnMetadata, _ PublicKey) (*Permissions, error) { + return nil, publicKeyErr + }, + } + serverConfig.AddHostKey(testSigners["rsa"]) + + c1, c2, err := netPipe() + if err != nil { + t.Fatalf("netPipe: %v", err) + } + defer c1.Close() + defer c2.Close() + + go NewClientConn(c2, "", clientConfig) + _, err = newServer(c1, serverConfig) + if err == nil { + t.Fatal("newServer: got nil, expected errors") + } + + authErrs, ok := err.(*ServerAuthError) + if !ok { + t.Fatalf("errors: got %T, want *ssh.ServerAuthError", err) + } + for i, e := range authErrs.Errors { + switch i { + case 0: + if e.Error() != "no auth passed yet" { + t.Fatalf("errors: got %v, want no auth passed yet", e.Error()) + } + case 1: + if e != publicKeyErr { + t.Fatalf("errors: got %v, want %v", e, publicKeyErr) + } + default: + t.Fatalf("errors: got %v, expected 2 errors", authErrs.Errors) + } + } +} diff --git a/vendor/golang.org/x/crypto/ssh/client_test.go b/vendor/golang.org/x/crypto/ssh/client_test.go new file mode 100644 index 000000000..ccf56074d --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/client_test.go @@ -0,0 +1,81 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +import ( + "net" + "strings" + "testing" +) + +func testClientVersion(t *testing.T, config *ClientConfig, expected string) { + clientConn, serverConn := net.Pipe() + defer clientConn.Close() + receivedVersion := make(chan string, 1) + config.HostKeyCallback = InsecureIgnoreHostKey() + go func() { + version, err := readVersion(serverConn) + if err != nil { + receivedVersion <- "" + } else { + receivedVersion <- string(version) + } + serverConn.Close() + }() + NewClientConn(clientConn, "", config) + actual := <-receivedVersion + if actual != expected { + t.Fatalf("got %s; want %s", actual, expected) + } +} + +func TestCustomClientVersion(t *testing.T) { + version := "Test-Client-Version-0.0" + testClientVersion(t, &ClientConfig{ClientVersion: version}, version) +} + +func TestDefaultClientVersion(t *testing.T) { + testClientVersion(t, &ClientConfig{}, packageVersion) +} + +func TestHostKeyCheck(t *testing.T) { + for _, tt := range []struct { + name string + wantError string + key PublicKey + }{ + {"no callback", "must specify HostKeyCallback", nil}, + {"correct key", "", testSigners["rsa"].PublicKey()}, + {"mismatch", "mismatch", testSigners["ecdsa"].PublicKey()}, + } { + c1, c2, err := netPipe() + if err != nil { + t.Fatalf("netPipe: %v", err) + } + defer c1.Close() + defer c2.Close() + serverConf := &ServerConfig{ + NoClientAuth: true, + } + serverConf.AddHostKey(testSigners["rsa"]) + + go NewServerConn(c1, serverConf) + clientConf := ClientConfig{ + User: "user", + } + if tt.key != nil { + clientConf.HostKeyCallback = FixedHostKey(tt.key) + } + + _, _, _, err = NewClientConn(c2, "", &clientConf) + if err != nil { + if tt.wantError == "" || !strings.Contains(err.Error(), tt.wantError) { + t.Errorf("%s: got error %q, missing %q", tt.name, err.Error(), tt.wantError) + } + } else if tt.wantError != "" { + t.Errorf("%s: succeeded, but want error string %q", tt.name, tt.wantError) + } + } +} diff --git a/vendor/golang.org/x/crypto/ssh/common.go b/vendor/golang.org/x/crypto/ssh/common.go new file mode 100644 index 000000000..dc39e4d23 --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/common.go @@ -0,0 +1,373 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +import ( + "crypto" + "crypto/rand" + "fmt" + "io" + "math" + "sync" + + _ "crypto/sha1" + _ "crypto/sha256" + _ "crypto/sha512" +) + +// These are string constants in the SSH protocol. +const ( + compressionNone = "none" + serviceUserAuth = "ssh-userauth" + serviceSSH = "ssh-connection" +) + +// supportedCiphers specifies the supported ciphers in preference order. +var supportedCiphers = []string{ + "aes128-ctr", "aes192-ctr", "aes256-ctr", + "aes128-gcm@openssh.com", + "arcfour256", "arcfour128", +} + +// supportedKexAlgos specifies the supported key-exchange algorithms in +// preference order. +var supportedKexAlgos = []string{ + kexAlgoCurve25519SHA256, + // P384 and P521 are not constant-time yet, but since we don't + // reuse ephemeral keys, using them for ECDH should be OK. + kexAlgoECDH256, kexAlgoECDH384, kexAlgoECDH521, + kexAlgoDH14SHA1, kexAlgoDH1SHA1, +} + +// supportedHostKeyAlgos specifies the supported host-key algorithms (i.e. methods +// of authenticating servers) in preference order. +var supportedHostKeyAlgos = []string{ + CertAlgoRSAv01, CertAlgoDSAv01, CertAlgoECDSA256v01, + CertAlgoECDSA384v01, CertAlgoECDSA521v01, CertAlgoED25519v01, + + KeyAlgoECDSA256, KeyAlgoECDSA384, KeyAlgoECDSA521, + KeyAlgoRSA, KeyAlgoDSA, + + KeyAlgoED25519, +} + +// supportedMACs specifies a default set of MAC algorithms in preference order. +// This is based on RFC 4253, section 6.4, but with hmac-md5 variants removed +// because they have reached the end of their useful life. +var supportedMACs = []string{ + "hmac-sha2-256-etm@openssh.com", "hmac-sha2-256", "hmac-sha1", "hmac-sha1-96", +} + +var supportedCompressions = []string{compressionNone} + +// hashFuncs keeps the mapping of supported algorithms to their respective +// hashes needed for signature verification. +var hashFuncs = map[string]crypto.Hash{ + KeyAlgoRSA: crypto.SHA1, + KeyAlgoDSA: crypto.SHA1, + KeyAlgoECDSA256: crypto.SHA256, + KeyAlgoECDSA384: crypto.SHA384, + KeyAlgoECDSA521: crypto.SHA512, + CertAlgoRSAv01: crypto.SHA1, + CertAlgoDSAv01: crypto.SHA1, + CertAlgoECDSA256v01: crypto.SHA256, + CertAlgoECDSA384v01: crypto.SHA384, + CertAlgoECDSA521v01: crypto.SHA512, +} + +// unexpectedMessageError results when the SSH message that we received didn't +// match what we wanted. +func unexpectedMessageError(expected, got uint8) error { + return fmt.Errorf("ssh: unexpected message type %d (expected %d)", got, expected) +} + +// parseError results from a malformed SSH message. +func parseError(tag uint8) error { + return fmt.Errorf("ssh: parse error in message type %d", tag) +} + +func findCommon(what string, client []string, server []string) (common string, err error) { + for _, c := range client { + for _, s := range server { + if c == s { + return c, nil + } + } + } + return "", fmt.Errorf("ssh: no common algorithm for %s; client offered: %v, server offered: %v", what, client, server) +} + +type directionAlgorithms struct { + Cipher string + MAC string + Compression string +} + +// rekeyBytes returns a rekeying intervals in bytes. +func (a *directionAlgorithms) rekeyBytes() int64 { + // According to RFC4344 block ciphers should rekey after + // 2^(BLOCKSIZE/4) blocks. For all AES flavors BLOCKSIZE is + // 128. + switch a.Cipher { + case "aes128-ctr", "aes192-ctr", "aes256-ctr", gcmCipherID, aes128cbcID: + return 16 * (1 << 32) + + } + + // For others, stick with RFC4253 recommendation to rekey after 1 Gb of data. + return 1 << 30 +} + +type algorithms struct { + kex string + hostKey string + w directionAlgorithms + r directionAlgorithms +} + +func findAgreedAlgorithms(clientKexInit, serverKexInit *kexInitMsg) (algs *algorithms, err error) { + result := &algorithms{} + + result.kex, err = findCommon("key exchange", clientKexInit.KexAlgos, serverKexInit.KexAlgos) + if err != nil { + return + } + + result.hostKey, err = findCommon("host key", clientKexInit.ServerHostKeyAlgos, serverKexInit.ServerHostKeyAlgos) + if err != nil { + return + } + + result.w.Cipher, err = findCommon("client to server cipher", clientKexInit.CiphersClientServer, serverKexInit.CiphersClientServer) + if err != nil { + return + } + + result.r.Cipher, err = findCommon("server to client cipher", clientKexInit.CiphersServerClient, serverKexInit.CiphersServerClient) + if err != nil { + return + } + + result.w.MAC, err = findCommon("client to server MAC", clientKexInit.MACsClientServer, serverKexInit.MACsClientServer) + if err != nil { + return + } + + result.r.MAC, err = findCommon("server to client MAC", clientKexInit.MACsServerClient, serverKexInit.MACsServerClient) + if err != nil { + return + } + + result.w.Compression, err = findCommon("client to server compression", clientKexInit.CompressionClientServer, serverKexInit.CompressionClientServer) + if err != nil { + return + } + + result.r.Compression, err = findCommon("server to client compression", clientKexInit.CompressionServerClient, serverKexInit.CompressionServerClient) + if err != nil { + return + } + + return result, nil +} + +// If rekeythreshold is too small, we can't make any progress sending +// stuff. +const minRekeyThreshold uint64 = 256 + +// Config contains configuration data common to both ServerConfig and +// ClientConfig. +type Config struct { + // Rand provides the source of entropy for cryptographic + // primitives. If Rand is nil, the cryptographic random reader + // in package crypto/rand will be used. + Rand io.Reader + + // The maximum number of bytes sent or received after which a + // new key is negotiated. It must be at least 256. If + // unspecified, a size suitable for the chosen cipher is used. + RekeyThreshold uint64 + + // The allowed key exchanges algorithms. If unspecified then a + // default set of algorithms is used. + KeyExchanges []string + + // The allowed cipher algorithms. If unspecified then a sensible + // default is used. + Ciphers []string + + // The allowed MAC algorithms. If unspecified then a sensible default + // is used. + MACs []string +} + +// SetDefaults sets sensible values for unset fields in config. This is +// exported for testing: Configs passed to SSH functions are copied and have +// default values set automatically. +func (c *Config) SetDefaults() { + if c.Rand == nil { + c.Rand = rand.Reader + } + if c.Ciphers == nil { + c.Ciphers = supportedCiphers + } + var ciphers []string + for _, c := range c.Ciphers { + if cipherModes[c] != nil { + // reject the cipher if we have no cipherModes definition + ciphers = append(ciphers, c) + } + } + c.Ciphers = ciphers + + if c.KeyExchanges == nil { + c.KeyExchanges = supportedKexAlgos + } + + if c.MACs == nil { + c.MACs = supportedMACs + } + + if c.RekeyThreshold == 0 { + // cipher specific default + } else if c.RekeyThreshold < minRekeyThreshold { + c.RekeyThreshold = minRekeyThreshold + } else if c.RekeyThreshold >= math.MaxInt64 { + // Avoid weirdness if somebody uses -1 as a threshold. + c.RekeyThreshold = math.MaxInt64 + } +} + +// buildDataSignedForAuth returns the data that is signed in order to prove +// possession of a private key. See RFC 4252, section 7. +func buildDataSignedForAuth(sessionId []byte, req userAuthRequestMsg, algo, pubKey []byte) []byte { + data := struct { + Session []byte + Type byte + User string + Service string + Method string + Sign bool + Algo []byte + PubKey []byte + }{ + sessionId, + msgUserAuthRequest, + req.User, + req.Service, + req.Method, + true, + algo, + pubKey, + } + return Marshal(data) +} + +func appendU16(buf []byte, n uint16) []byte { + return append(buf, byte(n>>8), byte(n)) +} + +func appendU32(buf []byte, n uint32) []byte { + return append(buf, byte(n>>24), byte(n>>16), byte(n>>8), byte(n)) +} + +func appendU64(buf []byte, n uint64) []byte { + return append(buf, + byte(n>>56), byte(n>>48), byte(n>>40), byte(n>>32), + byte(n>>24), byte(n>>16), byte(n>>8), byte(n)) +} + +func appendInt(buf []byte, n int) []byte { + return appendU32(buf, uint32(n)) +} + +func appendString(buf []byte, s string) []byte { + buf = appendU32(buf, uint32(len(s))) + buf = append(buf, s...) + return buf +} + +func appendBool(buf []byte, b bool) []byte { + if b { + return append(buf, 1) + } + return append(buf, 0) +} + +// newCond is a helper to hide the fact that there is no usable zero +// value for sync.Cond. +func newCond() *sync.Cond { return sync.NewCond(new(sync.Mutex)) } + +// window represents the buffer available to clients +// wishing to write to a channel. +type window struct { + *sync.Cond + win uint32 // RFC 4254 5.2 says the window size can grow to 2^32-1 + writeWaiters int + closed bool +} + +// add adds win to the amount of window available +// for consumers. +func (w *window) add(win uint32) bool { + // a zero sized window adjust is a noop. + if win == 0 { + return true + } + w.L.Lock() + if w.win+win < win { + w.L.Unlock() + return false + } + w.win += win + // It is unusual that multiple goroutines would be attempting to reserve + // window space, but not guaranteed. Use broadcast to notify all waiters + // that additional window is available. + w.Broadcast() + w.L.Unlock() + return true +} + +// close sets the window to closed, so all reservations fail +// immediately. +func (w *window) close() { + w.L.Lock() + w.closed = true + w.Broadcast() + w.L.Unlock() +} + +// reserve reserves win from the available window capacity. +// If no capacity remains, reserve will block. reserve may +// return less than requested. +func (w *window) reserve(win uint32) (uint32, error) { + var err error + w.L.Lock() + w.writeWaiters++ + w.Broadcast() + for w.win == 0 && !w.closed { + w.Wait() + } + w.writeWaiters-- + if w.win < win { + win = w.win + } + w.win -= win + if w.closed { + err = io.EOF + } + w.L.Unlock() + return win, err +} + +// waitWriterBlocked waits until some goroutine is blocked for further +// writes. It is used in tests only. +func (w *window) waitWriterBlocked() { + w.Cond.L.Lock() + for w.writeWaiters == 0 { + w.Cond.Wait() + } + w.Cond.L.Unlock() +} diff --git a/vendor/golang.org/x/crypto/ssh/connection.go b/vendor/golang.org/x/crypto/ssh/connection.go new file mode 100644 index 000000000..fd6b0681b --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/connection.go @@ -0,0 +1,143 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +import ( + "fmt" + "net" +) + +// OpenChannelError is returned if the other side rejects an +// OpenChannel request. +type OpenChannelError struct { + Reason RejectionReason + Message string +} + +func (e *OpenChannelError) Error() string { + return fmt.Sprintf("ssh: rejected: %s (%s)", e.Reason, e.Message) +} + +// ConnMetadata holds metadata for the connection. +type ConnMetadata interface { + // User returns the user ID for this connection. + User() string + + // SessionID returns the session hash, also denoted by H. + SessionID() []byte + + // ClientVersion returns the client's version string as hashed + // into the session ID. + ClientVersion() []byte + + // ServerVersion returns the server's version string as hashed + // into the session ID. + ServerVersion() []byte + + // RemoteAddr returns the remote address for this connection. + RemoteAddr() net.Addr + + // LocalAddr returns the local address for this connection. + LocalAddr() net.Addr +} + +// Conn represents an SSH connection for both server and client roles. +// Conn is the basis for implementing an application layer, such +// as ClientConn, which implements the traditional shell access for +// clients. +type Conn interface { + ConnMetadata + + // SendRequest sends a global request, and returns the + // reply. If wantReply is true, it returns the response status + // and payload. See also RFC4254, section 4. + SendRequest(name string, wantReply bool, payload []byte) (bool, []byte, error) + + // OpenChannel tries to open an channel. If the request is + // rejected, it returns *OpenChannelError. On success it returns + // the SSH Channel and a Go channel for incoming, out-of-band + // requests. The Go channel must be serviced, or the + // connection will hang. + OpenChannel(name string, data []byte) (Channel, <-chan *Request, error) + + // Close closes the underlying network connection + Close() error + + // Wait blocks until the connection has shut down, and returns the + // error causing the shutdown. + Wait() error + + // TODO(hanwen): consider exposing: + // RequestKeyChange + // Disconnect +} + +// DiscardRequests consumes and rejects all requests from the +// passed-in channel. +func DiscardRequests(in <-chan *Request) { + for req := range in { + if req.WantReply { + req.Reply(false, nil) + } + } +} + +// A connection represents an incoming connection. +type connection struct { + transport *handshakeTransport + sshConn + + // The connection protocol. + *mux +} + +func (c *connection) Close() error { + return c.sshConn.conn.Close() +} + +// sshconn provides net.Conn metadata, but disallows direct reads and +// writes. +type sshConn struct { + conn net.Conn + + user string + sessionID []byte + clientVersion []byte + serverVersion []byte +} + +func dup(src []byte) []byte { + dst := make([]byte, len(src)) + copy(dst, src) + return dst +} + +func (c *sshConn) User() string { + return c.user +} + +func (c *sshConn) RemoteAddr() net.Addr { + return c.conn.RemoteAddr() +} + +func (c *sshConn) Close() error { + return c.conn.Close() +} + +func (c *sshConn) LocalAddr() net.Addr { + return c.conn.LocalAddr() +} + +func (c *sshConn) SessionID() []byte { + return dup(c.sessionID) +} + +func (c *sshConn) ClientVersion() []byte { + return dup(c.clientVersion) +} + +func (c *sshConn) ServerVersion() []byte { + return dup(c.serverVersion) +} diff --git a/vendor/golang.org/x/crypto/ssh/doc.go b/vendor/golang.org/x/crypto/ssh/doc.go new file mode 100644 index 000000000..67b7322c0 --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/doc.go @@ -0,0 +1,21 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +/* +Package ssh implements an SSH client and server. + +SSH is a transport security protocol, an authentication protocol and a +family of application protocols. The most typical application level +protocol is a remote shell and this is specifically implemented. However, +the multiplexed nature of SSH is exposed to users that wish to support +others. + +References: + [PROTOCOL.certkeys]: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL.certkeys?rev=HEAD + [SSH-PARAMETERS]: http://www.iana.org/assignments/ssh-parameters/ssh-parameters.xml#ssh-parameters-1 + +This package does not fall under the stability promise of the Go language itself, +so its API may be changed when pressing needs arise. +*/ +package ssh // import "golang.org/x/crypto/ssh" diff --git a/vendor/golang.org/x/crypto/ssh/example_test.go b/vendor/golang.org/x/crypto/ssh/example_test.go new file mode 100644 index 000000000..b910c7bf6 --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/example_test.go @@ -0,0 +1,320 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh_test + +import ( + "bufio" + "bytes" + "fmt" + "io/ioutil" + "log" + "net" + "net/http" + "os" + "path/filepath" + "strings" + + "golang.org/x/crypto/ssh" + "golang.org/x/crypto/ssh/terminal" +) + +func ExampleNewServerConn() { + // Public key authentication is done by comparing + // the public key of a received connection + // with the entries in the authorized_keys file. + authorizedKeysBytes, err := ioutil.ReadFile("authorized_keys") + if err != nil { + log.Fatalf("Failed to load authorized_keys, err: %v", err) + } + + authorizedKeysMap := map[string]bool{} + for len(authorizedKeysBytes) > 0 { + pubKey, _, _, rest, err := ssh.ParseAuthorizedKey(authorizedKeysBytes) + if err != nil { + log.Fatal(err) + } + + authorizedKeysMap[string(pubKey.Marshal())] = true + authorizedKeysBytes = rest + } + + // An SSH server is represented by a ServerConfig, which holds + // certificate details and handles authentication of ServerConns. + config := &ssh.ServerConfig{ + // Remove to disable password auth. + PasswordCallback: func(c ssh.ConnMetadata, pass []byte) (*ssh.Permissions, error) { + // Should use constant-time compare (or better, salt+hash) in + // a production setting. + if c.User() == "testuser" && string(pass) == "tiger" { + return nil, nil + } + return nil, fmt.Errorf("password rejected for %q", c.User()) + }, + + // Remove to disable public key auth. + PublicKeyCallback: func(c ssh.ConnMetadata, pubKey ssh.PublicKey) (*ssh.Permissions, error) { + if authorizedKeysMap[string(pubKey.Marshal())] { + return &ssh.Permissions{ + // Record the public key used for authentication. + Extensions: map[string]string{ + "pubkey-fp": ssh.FingerprintSHA256(pubKey), + }, + }, nil + } + return nil, fmt.Errorf("unknown public key for %q", c.User()) + }, + } + + privateBytes, err := ioutil.ReadFile("id_rsa") + if err != nil { + log.Fatal("Failed to load private key: ", err) + } + + private, err := ssh.ParsePrivateKey(privateBytes) + if err != nil { + log.Fatal("Failed to parse private key: ", err) + } + + config.AddHostKey(private) + + // Once a ServerConfig has been configured, connections can be + // accepted. + listener, err := net.Listen("tcp", "0.0.0.0:2022") + if err != nil { + log.Fatal("failed to listen for connection: ", err) + } + nConn, err := listener.Accept() + if err != nil { + log.Fatal("failed to accept incoming connection: ", err) + } + + // Before use, a handshake must be performed on the incoming + // net.Conn. + conn, chans, reqs, err := ssh.NewServerConn(nConn, config) + if err != nil { + log.Fatal("failed to handshake: ", err) + } + log.Printf("logged in with key %s", conn.Permissions.Extensions["pubkey-fp"]) + + // The incoming Request channel must be serviced. + go ssh.DiscardRequests(reqs) + + // Service the incoming Channel channel. + for newChannel := range chans { + // Channels have a type, depending on the application level + // protocol intended. In the case of a shell, the type is + // "session" and ServerShell may be used to present a simple + // terminal interface. + if newChannel.ChannelType() != "session" { + newChannel.Reject(ssh.UnknownChannelType, "unknown channel type") + continue + } + channel, requests, err := newChannel.Accept() + if err != nil { + log.Fatalf("Could not accept channel: %v", err) + } + + // Sessions have out-of-band requests such as "shell", + // "pty-req" and "env". Here we handle only the + // "shell" request. + go func(in <-chan *ssh.Request) { + for req := range in { + req.Reply(req.Type == "shell", nil) + } + }(requests) + + term := terminal.NewTerminal(channel, "> ") + + go func() { + defer channel.Close() + for { + line, err := term.ReadLine() + if err != nil { + break + } + fmt.Println(line) + } + }() + } +} + +func ExampleHostKeyCheck() { + // Every client must provide a host key check. Here is a + // simple-minded parse of OpenSSH's known_hosts file + host := "hostname" + file, err := os.Open(filepath.Join(os.Getenv("HOME"), ".ssh", "known_hosts")) + if err != nil { + log.Fatal(err) + } + defer file.Close() + + scanner := bufio.NewScanner(file) + var hostKey ssh.PublicKey + for scanner.Scan() { + fields := strings.Split(scanner.Text(), " ") + if len(fields) != 3 { + continue + } + if strings.Contains(fields[0], host) { + var err error + hostKey, _, _, _, err = ssh.ParseAuthorizedKey(scanner.Bytes()) + if err != nil { + log.Fatalf("error parsing %q: %v", fields[2], err) + } + break + } + } + + if hostKey == nil { + log.Fatalf("no hostkey for %s", host) + } + + config := ssh.ClientConfig{ + User: os.Getenv("USER"), + HostKeyCallback: ssh.FixedHostKey(hostKey), + } + + _, err = ssh.Dial("tcp", host+":22", &config) + log.Println(err) +} + +func ExampleDial() { + var hostKey ssh.PublicKey + // An SSH client is represented with a ClientConn. + // + // To authenticate with the remote server you must pass at least one + // implementation of AuthMethod via the Auth field in ClientConfig, + // and provide a HostKeyCallback. + config := &ssh.ClientConfig{ + User: "username", + Auth: []ssh.AuthMethod{ + ssh.Password("yourpassword"), + }, + HostKeyCallback: ssh.FixedHostKey(hostKey), + } + client, err := ssh.Dial("tcp", "yourserver.com:22", config) + if err != nil { + log.Fatal("Failed to dial: ", err) + } + + // Each ClientConn can support multiple interactive sessions, + // represented by a Session. + session, err := client.NewSession() + if err != nil { + log.Fatal("Failed to create session: ", err) + } + defer session.Close() + + // Once a Session is created, you can execute a single command on + // the remote side using the Run method. + var b bytes.Buffer + session.Stdout = &b + if err := session.Run("/usr/bin/whoami"); err != nil { + log.Fatal("Failed to run: " + err.Error()) + } + fmt.Println(b.String()) +} + +func ExamplePublicKeys() { + var hostKey ssh.PublicKey + // A public key may be used to authenticate against the remote + // server by using an unencrypted PEM-encoded private key file. + // + // If you have an encrypted private key, the crypto/x509 package + // can be used to decrypt it. + key, err := ioutil.ReadFile("/home/user/.ssh/id_rsa") + if err != nil { + log.Fatalf("unable to read private key: %v", err) + } + + // Create the Signer for this private key. + signer, err := ssh.ParsePrivateKey(key) + if err != nil { + log.Fatalf("unable to parse private key: %v", err) + } + + config := &ssh.ClientConfig{ + User: "user", + Auth: []ssh.AuthMethod{ + // Use the PublicKeys method for remote authentication. + ssh.PublicKeys(signer), + }, + HostKeyCallback: ssh.FixedHostKey(hostKey), + } + + // Connect to the remote server and perform the SSH handshake. + client, err := ssh.Dial("tcp", "host.com:22", config) + if err != nil { + log.Fatalf("unable to connect: %v", err) + } + defer client.Close() +} + +func ExampleClient_Listen() { + var hostKey ssh.PublicKey + config := &ssh.ClientConfig{ + User: "username", + Auth: []ssh.AuthMethod{ + ssh.Password("password"), + }, + HostKeyCallback: ssh.FixedHostKey(hostKey), + } + // Dial your ssh server. + conn, err := ssh.Dial("tcp", "localhost:22", config) + if err != nil { + log.Fatal("unable to connect: ", err) + } + defer conn.Close() + + // Request the remote side to open port 8080 on all interfaces. + l, err := conn.Listen("tcp", "0.0.0.0:8080") + if err != nil { + log.Fatal("unable to register tcp forward: ", err) + } + defer l.Close() + + // Serve HTTP with your SSH server acting as a reverse proxy. + http.Serve(l, http.HandlerFunc(func(resp http.ResponseWriter, req *http.Request) { + fmt.Fprintf(resp, "Hello world!\n") + })) +} + +func ExampleSession_RequestPty() { + var hostKey ssh.PublicKey + // Create client config + config := &ssh.ClientConfig{ + User: "username", + Auth: []ssh.AuthMethod{ + ssh.Password("password"), + }, + HostKeyCallback: ssh.FixedHostKey(hostKey), + } + // Connect to ssh server + conn, err := ssh.Dial("tcp", "localhost:22", config) + if err != nil { + log.Fatal("unable to connect: ", err) + } + defer conn.Close() + // Create a session + session, err := conn.NewSession() + if err != nil { + log.Fatal("unable to create session: ", err) + } + defer session.Close() + // Set up terminal modes + modes := ssh.TerminalModes{ + ssh.ECHO: 0, // disable echoing + ssh.TTY_OP_ISPEED: 14400, // input speed = 14.4kbaud + ssh.TTY_OP_OSPEED: 14400, // output speed = 14.4kbaud + } + // Request pseudo terminal + if err := session.RequestPty("xterm", 40, 80, modes); err != nil { + log.Fatal("request for pseudo terminal failed: ", err) + } + // Start remote shell + if err := session.Shell(); err != nil { + log.Fatal("failed to start shell: ", err) + } +} diff --git a/vendor/golang.org/x/crypto/ssh/handshake.go b/vendor/golang.org/x/crypto/ssh/handshake.go new file mode 100644 index 000000000..932ce8393 --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/handshake.go @@ -0,0 +1,640 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +import ( + "crypto/rand" + "errors" + "fmt" + "io" + "log" + "net" + "sync" +) + +// debugHandshake, if set, prints messages sent and received. Key +// exchange messages are printed as if DH were used, so the debug +// messages are wrong when using ECDH. +const debugHandshake = false + +// chanSize sets the amount of buffering SSH connections. This is +// primarily for testing: setting chanSize=0 uncovers deadlocks more +// quickly. +const chanSize = 16 + +// keyingTransport is a packet based transport that supports key +// changes. It need not be thread-safe. It should pass through +// msgNewKeys in both directions. +type keyingTransport interface { + packetConn + + // prepareKeyChange sets up a key change. The key change for a + // direction will be effected if a msgNewKeys message is sent + // or received. + prepareKeyChange(*algorithms, *kexResult) error +} + +// handshakeTransport implements rekeying on top of a keyingTransport +// and offers a thread-safe writePacket() interface. +type handshakeTransport struct { + conn keyingTransport + config *Config + + serverVersion []byte + clientVersion []byte + + // hostKeys is non-empty if we are the server. In that case, + // it contains all host keys that can be used to sign the + // connection. + hostKeys []Signer + + // hostKeyAlgorithms is non-empty if we are the client. In that case, + // we accept these key types from the server as host key. + hostKeyAlgorithms []string + + // On read error, incoming is closed, and readError is set. + incoming chan []byte + readError error + + mu sync.Mutex + writeError error + sentInitPacket []byte + sentInitMsg *kexInitMsg + pendingPackets [][]byte // Used when a key exchange is in progress. + + // If the read loop wants to schedule a kex, it pings this + // channel, and the write loop will send out a kex + // message. + requestKex chan struct{} + + // If the other side requests or confirms a kex, its kexInit + // packet is sent here for the write loop to find it. + startKex chan *pendingKex + + // data for host key checking + hostKeyCallback HostKeyCallback + dialAddress string + remoteAddr net.Addr + + // Algorithms agreed in the last key exchange. + algorithms *algorithms + + readPacketsLeft uint32 + readBytesLeft int64 + + writePacketsLeft uint32 + writeBytesLeft int64 + + // The session ID or nil if first kex did not complete yet. + sessionID []byte +} + +type pendingKex struct { + otherInit []byte + done chan error +} + +func newHandshakeTransport(conn keyingTransport, config *Config, clientVersion, serverVersion []byte) *handshakeTransport { + t := &handshakeTransport{ + conn: conn, + serverVersion: serverVersion, + clientVersion: clientVersion, + incoming: make(chan []byte, chanSize), + requestKex: make(chan struct{}, 1), + startKex: make(chan *pendingKex, 1), + + config: config, + } + t.resetReadThresholds() + t.resetWriteThresholds() + + // We always start with a mandatory key exchange. + t.requestKex <- struct{}{} + return t +} + +func newClientTransport(conn keyingTransport, clientVersion, serverVersion []byte, config *ClientConfig, dialAddr string, addr net.Addr) *handshakeTransport { + t := newHandshakeTransport(conn, &config.Config, clientVersion, serverVersion) + t.dialAddress = dialAddr + t.remoteAddr = addr + t.hostKeyCallback = config.HostKeyCallback + if config.HostKeyAlgorithms != nil { + t.hostKeyAlgorithms = config.HostKeyAlgorithms + } else { + t.hostKeyAlgorithms = supportedHostKeyAlgos + } + go t.readLoop() + go t.kexLoop() + return t +} + +func newServerTransport(conn keyingTransport, clientVersion, serverVersion []byte, config *ServerConfig) *handshakeTransport { + t := newHandshakeTransport(conn, &config.Config, clientVersion, serverVersion) + t.hostKeys = config.hostKeys + go t.readLoop() + go t.kexLoop() + return t +} + +func (t *handshakeTransport) getSessionID() []byte { + return t.sessionID +} + +// waitSession waits for the session to be established. This should be +// the first thing to call after instantiating handshakeTransport. +func (t *handshakeTransport) waitSession() error { + p, err := t.readPacket() + if err != nil { + return err + } + if p[0] != msgNewKeys { + return fmt.Errorf("ssh: first packet should be msgNewKeys") + } + + return nil +} + +func (t *handshakeTransport) id() string { + if len(t.hostKeys) > 0 { + return "server" + } + return "client" +} + +func (t *handshakeTransport) printPacket(p []byte, write bool) { + action := "got" + if write { + action = "sent" + } + + if p[0] == msgChannelData || p[0] == msgChannelExtendedData { + log.Printf("%s %s data (packet %d bytes)", t.id(), action, len(p)) + } else { + msg, err := decode(p) + log.Printf("%s %s %T %v (%v)", t.id(), action, msg, msg, err) + } +} + +func (t *handshakeTransport) readPacket() ([]byte, error) { + p, ok := <-t.incoming + if !ok { + return nil, t.readError + } + return p, nil +} + +func (t *handshakeTransport) readLoop() { + first := true + for { + p, err := t.readOnePacket(first) + first = false + if err != nil { + t.readError = err + close(t.incoming) + break + } + if p[0] == msgIgnore || p[0] == msgDebug { + continue + } + t.incoming <- p + } + + // Stop writers too. + t.recordWriteError(t.readError) + + // Unblock the writer should it wait for this. + close(t.startKex) + + // Don't close t.requestKex; it's also written to from writePacket. +} + +func (t *handshakeTransport) pushPacket(p []byte) error { + if debugHandshake { + t.printPacket(p, true) + } + return t.conn.writePacket(p) +} + +func (t *handshakeTransport) getWriteError() error { + t.mu.Lock() + defer t.mu.Unlock() + return t.writeError +} + +func (t *handshakeTransport) recordWriteError(err error) { + t.mu.Lock() + defer t.mu.Unlock() + if t.writeError == nil && err != nil { + t.writeError = err + } +} + +func (t *handshakeTransport) requestKeyExchange() { + select { + case t.requestKex <- struct{}{}: + default: + // something already requested a kex, so do nothing. + } +} + +func (t *handshakeTransport) resetWriteThresholds() { + t.writePacketsLeft = packetRekeyThreshold + if t.config.RekeyThreshold > 0 { + t.writeBytesLeft = int64(t.config.RekeyThreshold) + } else if t.algorithms != nil { + t.writeBytesLeft = t.algorithms.w.rekeyBytes() + } else { + t.writeBytesLeft = 1 << 30 + } +} + +func (t *handshakeTransport) kexLoop() { + +write: + for t.getWriteError() == nil { + var request *pendingKex + var sent bool + + for request == nil || !sent { + var ok bool + select { + case request, ok = <-t.startKex: + if !ok { + break write + } + case <-t.requestKex: + break + } + + if !sent { + if err := t.sendKexInit(); err != nil { + t.recordWriteError(err) + break + } + sent = true + } + } + + if err := t.getWriteError(); err != nil { + if request != nil { + request.done <- err + } + break + } + + // We're not servicing t.requestKex, but that is OK: + // we never block on sending to t.requestKex. + + // We're not servicing t.startKex, but the remote end + // has just sent us a kexInitMsg, so it can't send + // another key change request, until we close the done + // channel on the pendingKex request. + + err := t.enterKeyExchange(request.otherInit) + + t.mu.Lock() + t.writeError = err + t.sentInitPacket = nil + t.sentInitMsg = nil + + t.resetWriteThresholds() + + // we have completed the key exchange. Since the + // reader is still blocked, it is safe to clear out + // the requestKex channel. This avoids the situation + // where: 1) we consumed our own request for the + // initial kex, and 2) the kex from the remote side + // caused another send on the requestKex channel, + clear: + for { + select { + case <-t.requestKex: + // + default: + break clear + } + } + + request.done <- t.writeError + + // kex finished. Push packets that we received while + // the kex was in progress. Don't look at t.startKex + // and don't increment writtenSinceKex: if we trigger + // another kex while we are still busy with the last + // one, things will become very confusing. + for _, p := range t.pendingPackets { + t.writeError = t.pushPacket(p) + if t.writeError != nil { + break + } + } + t.pendingPackets = t.pendingPackets[:0] + t.mu.Unlock() + } + + // drain startKex channel. We don't service t.requestKex + // because nobody does blocking sends there. + go func() { + for init := range t.startKex { + init.done <- t.writeError + } + }() + + // Unblock reader. + t.conn.Close() +} + +// The protocol uses uint32 for packet counters, so we can't let them +// reach 1<<32. We will actually read and write more packets than +// this, though: the other side may send more packets, and after we +// hit this limit on writing we will send a few more packets for the +// key exchange itself. +const packetRekeyThreshold = (1 << 31) + +func (t *handshakeTransport) resetReadThresholds() { + t.readPacketsLeft = packetRekeyThreshold + if t.config.RekeyThreshold > 0 { + t.readBytesLeft = int64(t.config.RekeyThreshold) + } else if t.algorithms != nil { + t.readBytesLeft = t.algorithms.r.rekeyBytes() + } else { + t.readBytesLeft = 1 << 30 + } +} + +func (t *handshakeTransport) readOnePacket(first bool) ([]byte, error) { + p, err := t.conn.readPacket() + if err != nil { + return nil, err + } + + if t.readPacketsLeft > 0 { + t.readPacketsLeft-- + } else { + t.requestKeyExchange() + } + + if t.readBytesLeft > 0 { + t.readBytesLeft -= int64(len(p)) + } else { + t.requestKeyExchange() + } + + if debugHandshake { + t.printPacket(p, false) + } + + if first && p[0] != msgKexInit { + return nil, fmt.Errorf("ssh: first packet should be msgKexInit") + } + + if p[0] != msgKexInit { + return p, nil + } + + firstKex := t.sessionID == nil + + kex := pendingKex{ + done: make(chan error, 1), + otherInit: p, + } + t.startKex <- &kex + err = <-kex.done + + if debugHandshake { + log.Printf("%s exited key exchange (first %v), err %v", t.id(), firstKex, err) + } + + if err != nil { + return nil, err + } + + t.resetReadThresholds() + + // By default, a key exchange is hidden from higher layers by + // translating it into msgIgnore. + successPacket := []byte{msgIgnore} + if firstKex { + // sendKexInit() for the first kex waits for + // msgNewKeys so the authentication process is + // guaranteed to happen over an encrypted transport. + successPacket = []byte{msgNewKeys} + } + + return successPacket, nil +} + +// sendKexInit sends a key change message. +func (t *handshakeTransport) sendKexInit() error { + t.mu.Lock() + defer t.mu.Unlock() + if t.sentInitMsg != nil { + // kexInits may be sent either in response to the other side, + // or because our side wants to initiate a key change, so we + // may have already sent a kexInit. In that case, don't send a + // second kexInit. + return nil + } + + msg := &kexInitMsg{ + KexAlgos: t.config.KeyExchanges, + CiphersClientServer: t.config.Ciphers, + CiphersServerClient: t.config.Ciphers, + MACsClientServer: t.config.MACs, + MACsServerClient: t.config.MACs, + CompressionClientServer: supportedCompressions, + CompressionServerClient: supportedCompressions, + } + io.ReadFull(rand.Reader, msg.Cookie[:]) + + if len(t.hostKeys) > 0 { + for _, k := range t.hostKeys { + msg.ServerHostKeyAlgos = append( + msg.ServerHostKeyAlgos, k.PublicKey().Type()) + } + } else { + msg.ServerHostKeyAlgos = t.hostKeyAlgorithms + } + packet := Marshal(msg) + + // writePacket destroys the contents, so save a copy. + packetCopy := make([]byte, len(packet)) + copy(packetCopy, packet) + + if err := t.pushPacket(packetCopy); err != nil { + return err + } + + t.sentInitMsg = msg + t.sentInitPacket = packet + + return nil +} + +func (t *handshakeTransport) writePacket(p []byte) error { + switch p[0] { + case msgKexInit: + return errors.New("ssh: only handshakeTransport can send kexInit") + case msgNewKeys: + return errors.New("ssh: only handshakeTransport can send newKeys") + } + + t.mu.Lock() + defer t.mu.Unlock() + if t.writeError != nil { + return t.writeError + } + + if t.sentInitMsg != nil { + // Copy the packet so the writer can reuse the buffer. + cp := make([]byte, len(p)) + copy(cp, p) + t.pendingPackets = append(t.pendingPackets, cp) + return nil + } + + if t.writeBytesLeft > 0 { + t.writeBytesLeft -= int64(len(p)) + } else { + t.requestKeyExchange() + } + + if t.writePacketsLeft > 0 { + t.writePacketsLeft-- + } else { + t.requestKeyExchange() + } + + if err := t.pushPacket(p); err != nil { + t.writeError = err + } + + return nil +} + +func (t *handshakeTransport) Close() error { + return t.conn.Close() +} + +func (t *handshakeTransport) enterKeyExchange(otherInitPacket []byte) error { + if debugHandshake { + log.Printf("%s entered key exchange", t.id()) + } + + otherInit := &kexInitMsg{} + if err := Unmarshal(otherInitPacket, otherInit); err != nil { + return err + } + + magics := handshakeMagics{ + clientVersion: t.clientVersion, + serverVersion: t.serverVersion, + clientKexInit: otherInitPacket, + serverKexInit: t.sentInitPacket, + } + + clientInit := otherInit + serverInit := t.sentInitMsg + if len(t.hostKeys) == 0 { + clientInit, serverInit = serverInit, clientInit + + magics.clientKexInit = t.sentInitPacket + magics.serverKexInit = otherInitPacket + } + + var err error + t.algorithms, err = findAgreedAlgorithms(clientInit, serverInit) + if err != nil { + return err + } + + // We don't send FirstKexFollows, but we handle receiving it. + // + // RFC 4253 section 7 defines the kex and the agreement method for + // first_kex_packet_follows. It states that the guessed packet + // should be ignored if the "kex algorithm and/or the host + // key algorithm is guessed wrong (server and client have + // different preferred algorithm), or if any of the other + // algorithms cannot be agreed upon". The other algorithms have + // already been checked above so the kex algorithm and host key + // algorithm are checked here. + if otherInit.FirstKexFollows && (clientInit.KexAlgos[0] != serverInit.KexAlgos[0] || clientInit.ServerHostKeyAlgos[0] != serverInit.ServerHostKeyAlgos[0]) { + // other side sent a kex message for the wrong algorithm, + // which we have to ignore. + if _, err := t.conn.readPacket(); err != nil { + return err + } + } + + kex, ok := kexAlgoMap[t.algorithms.kex] + if !ok { + return fmt.Errorf("ssh: unexpected key exchange algorithm %v", t.algorithms.kex) + } + + var result *kexResult + if len(t.hostKeys) > 0 { + result, err = t.server(kex, t.algorithms, &magics) + } else { + result, err = t.client(kex, t.algorithms, &magics) + } + + if err != nil { + return err + } + + if t.sessionID == nil { + t.sessionID = result.H + } + result.SessionID = t.sessionID + + if err := t.conn.prepareKeyChange(t.algorithms, result); err != nil { + return err + } + if err = t.conn.writePacket([]byte{msgNewKeys}); err != nil { + return err + } + if packet, err := t.conn.readPacket(); err != nil { + return err + } else if packet[0] != msgNewKeys { + return unexpectedMessageError(msgNewKeys, packet[0]) + } + + return nil +} + +func (t *handshakeTransport) server(kex kexAlgorithm, algs *algorithms, magics *handshakeMagics) (*kexResult, error) { + var hostKey Signer + for _, k := range t.hostKeys { + if algs.hostKey == k.PublicKey().Type() { + hostKey = k + } + } + + r, err := kex.Server(t.conn, t.config.Rand, magics, hostKey) + return r, err +} + +func (t *handshakeTransport) client(kex kexAlgorithm, algs *algorithms, magics *handshakeMagics) (*kexResult, error) { + result, err := kex.Client(t.conn, t.config.Rand, magics) + if err != nil { + return nil, err + } + + hostKey, err := ParsePublicKey(result.HostKey) + if err != nil { + return nil, err + } + + if err := verifyHostKeySignature(hostKey, result); err != nil { + return nil, err + } + + err = t.hostKeyCallback(t.dialAddress, t.remoteAddr, hostKey) + if err != nil { + return nil, err + } + + return result, nil +} diff --git a/vendor/golang.org/x/crypto/ssh/handshake_test.go b/vendor/golang.org/x/crypto/ssh/handshake_test.go new file mode 100644 index 000000000..91d493568 --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/handshake_test.go @@ -0,0 +1,559 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +import ( + "bytes" + "crypto/rand" + "errors" + "fmt" + "io" + "net" + "reflect" + "runtime" + "strings" + "sync" + "testing" +) + +type testChecker struct { + calls []string +} + +func (t *testChecker) Check(dialAddr string, addr net.Addr, key PublicKey) error { + if dialAddr == "bad" { + return fmt.Errorf("dialAddr is bad") + } + + if tcpAddr, ok := addr.(*net.TCPAddr); !ok || tcpAddr == nil { + return fmt.Errorf("testChecker: got %T want *net.TCPAddr", addr) + } + + t.calls = append(t.calls, fmt.Sprintf("%s %v %s %x", dialAddr, addr, key.Type(), key.Marshal())) + + return nil +} + +// netPipe is analogous to net.Pipe, but it uses a real net.Conn, and +// therefore is buffered (net.Pipe deadlocks if both sides start with +// a write.) +func netPipe() (net.Conn, net.Conn, error) { + listener, err := net.Listen("tcp", "127.0.0.1:0") + if err != nil { + listener, err = net.Listen("tcp", "[::1]:0") + if err != nil { + return nil, nil, err + } + } + defer listener.Close() + c1, err := net.Dial("tcp", listener.Addr().String()) + if err != nil { + return nil, nil, err + } + + c2, err := listener.Accept() + if err != nil { + c1.Close() + return nil, nil, err + } + + return c1, c2, nil +} + +// noiseTransport inserts ignore messages to check that the read loop +// and the key exchange filters out these messages. +type noiseTransport struct { + keyingTransport +} + +func (t *noiseTransport) writePacket(p []byte) error { + ignore := []byte{msgIgnore} + if err := t.keyingTransport.writePacket(ignore); err != nil { + return err + } + debug := []byte{msgDebug, 1, 2, 3} + if err := t.keyingTransport.writePacket(debug); err != nil { + return err + } + + return t.keyingTransport.writePacket(p) +} + +func addNoiseTransport(t keyingTransport) keyingTransport { + return &noiseTransport{t} +} + +// handshakePair creates two handshakeTransports connected with each +// other. If the noise argument is true, both transports will try to +// confuse the other side by sending ignore and debug messages. +func handshakePair(clientConf *ClientConfig, addr string, noise bool) (client *handshakeTransport, server *handshakeTransport, err error) { + a, b, err := netPipe() + if err != nil { + return nil, nil, err + } + + var trC, trS keyingTransport + + trC = newTransport(a, rand.Reader, true) + trS = newTransport(b, rand.Reader, false) + if noise { + trC = addNoiseTransport(trC) + trS = addNoiseTransport(trS) + } + clientConf.SetDefaults() + + v := []byte("version") + client = newClientTransport(trC, v, v, clientConf, addr, a.RemoteAddr()) + + serverConf := &ServerConfig{} + serverConf.AddHostKey(testSigners["ecdsa"]) + serverConf.AddHostKey(testSigners["rsa"]) + serverConf.SetDefaults() + server = newServerTransport(trS, v, v, serverConf) + + if err := server.waitSession(); err != nil { + return nil, nil, fmt.Errorf("server.waitSession: %v", err) + } + if err := client.waitSession(); err != nil { + return nil, nil, fmt.Errorf("client.waitSession: %v", err) + } + + return client, server, nil +} + +func TestHandshakeBasic(t *testing.T) { + if runtime.GOOS == "plan9" { + t.Skip("see golang.org/issue/7237") + } + + checker := &syncChecker{ + waitCall: make(chan int, 10), + called: make(chan int, 10), + } + + checker.waitCall <- 1 + trC, trS, err := handshakePair(&ClientConfig{HostKeyCallback: checker.Check}, "addr", false) + if err != nil { + t.Fatalf("handshakePair: %v", err) + } + + defer trC.Close() + defer trS.Close() + + // Let first kex complete normally. + <-checker.called + + clientDone := make(chan int, 0) + gotHalf := make(chan int, 0) + const N = 20 + + go func() { + defer close(clientDone) + // Client writes a bunch of stuff, and does a key + // change in the middle. This should not confuse the + // handshake in progress. We do this twice, so we test + // that the packet buffer is reset correctly. + for i := 0; i < N; i++ { + p := []byte{msgRequestSuccess, byte(i)} + if err := trC.writePacket(p); err != nil { + t.Fatalf("sendPacket: %v", err) + } + if (i % 10) == 5 { + <-gotHalf + // halfway through, we request a key change. + trC.requestKeyExchange() + + // Wait until we can be sure the key + // change has really started before we + // write more. + <-checker.called + } + if (i % 10) == 7 { + // write some packets until the kex + // completes, to test buffering of + // packets. + checker.waitCall <- 1 + } + } + }() + + // Server checks that client messages come in cleanly + i := 0 + err = nil + for ; i < N; i++ { + var p []byte + p, err = trS.readPacket() + if err != nil { + break + } + if (i % 10) == 5 { + gotHalf <- 1 + } + + want := []byte{msgRequestSuccess, byte(i)} + if bytes.Compare(p, want) != 0 { + t.Errorf("message %d: got %v, want %v", i, p, want) + } + } + <-clientDone + if err != nil && err != io.EOF { + t.Fatalf("server error: %v", err) + } + if i != N { + t.Errorf("received %d messages, want 10.", i) + } + + close(checker.called) + if _, ok := <-checker.called; ok { + // If all went well, we registered exactly 2 key changes: one + // that establishes the session, and one that we requested + // additionally. + t.Fatalf("got another host key checks after 2 handshakes") + } +} + +func TestForceFirstKex(t *testing.T) { + // like handshakePair, but must access the keyingTransport. + checker := &testChecker{} + clientConf := &ClientConfig{HostKeyCallback: checker.Check} + a, b, err := netPipe() + if err != nil { + t.Fatalf("netPipe: %v", err) + } + + var trC, trS keyingTransport + + trC = newTransport(a, rand.Reader, true) + + // This is the disallowed packet: + trC.writePacket(Marshal(&serviceRequestMsg{serviceUserAuth})) + + // Rest of the setup. + trS = newTransport(b, rand.Reader, false) + clientConf.SetDefaults() + + v := []byte("version") + client := newClientTransport(trC, v, v, clientConf, "addr", a.RemoteAddr()) + + serverConf := &ServerConfig{} + serverConf.AddHostKey(testSigners["ecdsa"]) + serverConf.AddHostKey(testSigners["rsa"]) + serverConf.SetDefaults() + server := newServerTransport(trS, v, v, serverConf) + + defer client.Close() + defer server.Close() + + // We setup the initial key exchange, but the remote side + // tries to send serviceRequestMsg in cleartext, which is + // disallowed. + + if err := server.waitSession(); err == nil { + t.Errorf("server first kex init should reject unexpected packet") + } +} + +func TestHandshakeAutoRekeyWrite(t *testing.T) { + checker := &syncChecker{ + called: make(chan int, 10), + waitCall: nil, + } + clientConf := &ClientConfig{HostKeyCallback: checker.Check} + clientConf.RekeyThreshold = 500 + trC, trS, err := handshakePair(clientConf, "addr", false) + if err != nil { + t.Fatalf("handshakePair: %v", err) + } + defer trC.Close() + defer trS.Close() + + input := make([]byte, 251) + input[0] = msgRequestSuccess + + done := make(chan int, 1) + const numPacket = 5 + go func() { + defer close(done) + j := 0 + for ; j < numPacket; j++ { + if p, err := trS.readPacket(); err != nil { + break + } else if !bytes.Equal(input, p) { + t.Errorf("got packet type %d, want %d", p[0], input[0]) + } + } + + if j != numPacket { + t.Errorf("got %d, want 5 messages", j) + } + }() + + <-checker.called + + for i := 0; i < numPacket; i++ { + p := make([]byte, len(input)) + copy(p, input) + if err := trC.writePacket(p); err != nil { + t.Errorf("writePacket: %v", err) + } + if i == 2 { + // Make sure the kex is in progress. + <-checker.called + } + + } + <-done +} + +type syncChecker struct { + waitCall chan int + called chan int +} + +func (c *syncChecker) Check(dialAddr string, addr net.Addr, key PublicKey) error { + c.called <- 1 + if c.waitCall != nil { + <-c.waitCall + } + return nil +} + +func TestHandshakeAutoRekeyRead(t *testing.T) { + sync := &syncChecker{ + called: make(chan int, 2), + waitCall: nil, + } + clientConf := &ClientConfig{ + HostKeyCallback: sync.Check, + } + clientConf.RekeyThreshold = 500 + + trC, trS, err := handshakePair(clientConf, "addr", false) + if err != nil { + t.Fatalf("handshakePair: %v", err) + } + defer trC.Close() + defer trS.Close() + + packet := make([]byte, 501) + packet[0] = msgRequestSuccess + if err := trS.writePacket(packet); err != nil { + t.Fatalf("writePacket: %v", err) + } + + // While we read out the packet, a key change will be + // initiated. + done := make(chan int, 1) + go func() { + defer close(done) + if _, err := trC.readPacket(); err != nil { + t.Fatalf("readPacket(client): %v", err) + } + + }() + + <-done + <-sync.called +} + +// errorKeyingTransport generates errors after a given number of +// read/write operations. +type errorKeyingTransport struct { + packetConn + readLeft, writeLeft int +} + +func (n *errorKeyingTransport) prepareKeyChange(*algorithms, *kexResult) error { + return nil +} + +func (n *errorKeyingTransport) getSessionID() []byte { + return nil +} + +func (n *errorKeyingTransport) writePacket(packet []byte) error { + if n.writeLeft == 0 { + n.Close() + return errors.New("barf") + } + + n.writeLeft-- + return n.packetConn.writePacket(packet) +} + +func (n *errorKeyingTransport) readPacket() ([]byte, error) { + if n.readLeft == 0 { + n.Close() + return nil, errors.New("barf") + } + + n.readLeft-- + return n.packetConn.readPacket() +} + +func TestHandshakeErrorHandlingRead(t *testing.T) { + for i := 0; i < 20; i++ { + testHandshakeErrorHandlingN(t, i, -1, false) + } +} + +func TestHandshakeErrorHandlingWrite(t *testing.T) { + for i := 0; i < 20; i++ { + testHandshakeErrorHandlingN(t, -1, i, false) + } +} + +func TestHandshakeErrorHandlingReadCoupled(t *testing.T) { + for i := 0; i < 20; i++ { + testHandshakeErrorHandlingN(t, i, -1, true) + } +} + +func TestHandshakeErrorHandlingWriteCoupled(t *testing.T) { + for i := 0; i < 20; i++ { + testHandshakeErrorHandlingN(t, -1, i, true) + } +} + +// testHandshakeErrorHandlingN runs handshakes, injecting errors. If +// handshakeTransport deadlocks, the go runtime will detect it and +// panic. +func testHandshakeErrorHandlingN(t *testing.T, readLimit, writeLimit int, coupled bool) { + msg := Marshal(&serviceRequestMsg{strings.Repeat("x", int(minRekeyThreshold)/4)}) + + a, b := memPipe() + defer a.Close() + defer b.Close() + + key := testSigners["ecdsa"] + serverConf := Config{RekeyThreshold: minRekeyThreshold} + serverConf.SetDefaults() + serverConn := newHandshakeTransport(&errorKeyingTransport{a, readLimit, writeLimit}, &serverConf, []byte{'a'}, []byte{'b'}) + serverConn.hostKeys = []Signer{key} + go serverConn.readLoop() + go serverConn.kexLoop() + + clientConf := Config{RekeyThreshold: 10 * minRekeyThreshold} + clientConf.SetDefaults() + clientConn := newHandshakeTransport(&errorKeyingTransport{b, -1, -1}, &clientConf, []byte{'a'}, []byte{'b'}) + clientConn.hostKeyAlgorithms = []string{key.PublicKey().Type()} + clientConn.hostKeyCallback = InsecureIgnoreHostKey() + go clientConn.readLoop() + go clientConn.kexLoop() + + var wg sync.WaitGroup + + for _, hs := range []packetConn{serverConn, clientConn} { + if !coupled { + wg.Add(2) + go func(c packetConn) { + for i := 0; ; i++ { + str := fmt.Sprintf("%08x", i) + strings.Repeat("x", int(minRekeyThreshold)/4-8) + err := c.writePacket(Marshal(&serviceRequestMsg{str})) + if err != nil { + break + } + } + wg.Done() + c.Close() + }(hs) + go func(c packetConn) { + for { + _, err := c.readPacket() + if err != nil { + break + } + } + wg.Done() + }(hs) + } else { + wg.Add(1) + go func(c packetConn) { + for { + _, err := c.readPacket() + if err != nil { + break + } + if err := c.writePacket(msg); err != nil { + break + } + + } + wg.Done() + }(hs) + } + } + wg.Wait() +} + +func TestDisconnect(t *testing.T) { + if runtime.GOOS == "plan9" { + t.Skip("see golang.org/issue/7237") + } + checker := &testChecker{} + trC, trS, err := handshakePair(&ClientConfig{HostKeyCallback: checker.Check}, "addr", false) + if err != nil { + t.Fatalf("handshakePair: %v", err) + } + + defer trC.Close() + defer trS.Close() + + trC.writePacket([]byte{msgRequestSuccess, 0, 0}) + errMsg := &disconnectMsg{ + Reason: 42, + Message: "such is life", + } + trC.writePacket(Marshal(errMsg)) + trC.writePacket([]byte{msgRequestSuccess, 0, 0}) + + packet, err := trS.readPacket() + if err != nil { + t.Fatalf("readPacket 1: %v", err) + } + if packet[0] != msgRequestSuccess { + t.Errorf("got packet %v, want packet type %d", packet, msgRequestSuccess) + } + + _, err = trS.readPacket() + if err == nil { + t.Errorf("readPacket 2 succeeded") + } else if !reflect.DeepEqual(err, errMsg) { + t.Errorf("got error %#v, want %#v", err, errMsg) + } + + _, err = trS.readPacket() + if err == nil { + t.Errorf("readPacket 3 succeeded") + } +} + +func TestHandshakeRekeyDefault(t *testing.T) { + clientConf := &ClientConfig{ + Config: Config{ + Ciphers: []string{"aes128-ctr"}, + }, + HostKeyCallback: InsecureIgnoreHostKey(), + } + trC, trS, err := handshakePair(clientConf, "addr", false) + if err != nil { + t.Fatalf("handshakePair: %v", err) + } + defer trC.Close() + defer trS.Close() + + trC.writePacket([]byte{msgRequestSuccess, 0, 0}) + trC.Close() + + rgb := (1024 + trC.readBytesLeft) >> 30 + wgb := (1024 + trC.writeBytesLeft) >> 30 + + if rgb != 64 { + t.Errorf("got rekey after %dG read, want 64G", rgb) + } + if wgb != 64 { + t.Errorf("got rekey after %dG write, want 64G", wgb) + } +} diff --git a/vendor/golang.org/x/crypto/ssh/kex.go b/vendor/golang.org/x/crypto/ssh/kex.go new file mode 100644 index 000000000..f91c2770e --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/kex.go @@ -0,0 +1,540 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +import ( + "crypto" + "crypto/ecdsa" + "crypto/elliptic" + "crypto/rand" + "crypto/subtle" + "errors" + "io" + "math/big" + + "golang.org/x/crypto/curve25519" +) + +const ( + kexAlgoDH1SHA1 = "diffie-hellman-group1-sha1" + kexAlgoDH14SHA1 = "diffie-hellman-group14-sha1" + kexAlgoECDH256 = "ecdh-sha2-nistp256" + kexAlgoECDH384 = "ecdh-sha2-nistp384" + kexAlgoECDH521 = "ecdh-sha2-nistp521" + kexAlgoCurve25519SHA256 = "curve25519-sha256@libssh.org" +) + +// kexResult captures the outcome of a key exchange. +type kexResult struct { + // Session hash. See also RFC 4253, section 8. + H []byte + + // Shared secret. See also RFC 4253, section 8. + K []byte + + // Host key as hashed into H. + HostKey []byte + + // Signature of H. + Signature []byte + + // A cryptographic hash function that matches the security + // level of the key exchange algorithm. It is used for + // calculating H, and for deriving keys from H and K. + Hash crypto.Hash + + // The session ID, which is the first H computed. This is used + // to derive key material inside the transport. + SessionID []byte +} + +// handshakeMagics contains data that is always included in the +// session hash. +type handshakeMagics struct { + clientVersion, serverVersion []byte + clientKexInit, serverKexInit []byte +} + +func (m *handshakeMagics) write(w io.Writer) { + writeString(w, m.clientVersion) + writeString(w, m.serverVersion) + writeString(w, m.clientKexInit) + writeString(w, m.serverKexInit) +} + +// kexAlgorithm abstracts different key exchange algorithms. +type kexAlgorithm interface { + // Server runs server-side key agreement, signing the result + // with a hostkey. + Server(p packetConn, rand io.Reader, magics *handshakeMagics, s Signer) (*kexResult, error) + + // Client runs the client-side key agreement. Caller is + // responsible for verifying the host key signature. + Client(p packetConn, rand io.Reader, magics *handshakeMagics) (*kexResult, error) +} + +// dhGroup is a multiplicative group suitable for implementing Diffie-Hellman key agreement. +type dhGroup struct { + g, p, pMinus1 *big.Int +} + +func (group *dhGroup) diffieHellman(theirPublic, myPrivate *big.Int) (*big.Int, error) { + if theirPublic.Cmp(bigOne) <= 0 || theirPublic.Cmp(group.pMinus1) >= 0 { + return nil, errors.New("ssh: DH parameter out of bounds") + } + return new(big.Int).Exp(theirPublic, myPrivate, group.p), nil +} + +func (group *dhGroup) Client(c packetConn, randSource io.Reader, magics *handshakeMagics) (*kexResult, error) { + hashFunc := crypto.SHA1 + + var x *big.Int + for { + var err error + if x, err = rand.Int(randSource, group.pMinus1); err != nil { + return nil, err + } + if x.Sign() > 0 { + break + } + } + + X := new(big.Int).Exp(group.g, x, group.p) + kexDHInit := kexDHInitMsg{ + X: X, + } + if err := c.writePacket(Marshal(&kexDHInit)); err != nil { + return nil, err + } + + packet, err := c.readPacket() + if err != nil { + return nil, err + } + + var kexDHReply kexDHReplyMsg + if err = Unmarshal(packet, &kexDHReply); err != nil { + return nil, err + } + + kInt, err := group.diffieHellman(kexDHReply.Y, x) + if err != nil { + return nil, err + } + + h := hashFunc.New() + magics.write(h) + writeString(h, kexDHReply.HostKey) + writeInt(h, X) + writeInt(h, kexDHReply.Y) + K := make([]byte, intLength(kInt)) + marshalInt(K, kInt) + h.Write(K) + + return &kexResult{ + H: h.Sum(nil), + K: K, + HostKey: kexDHReply.HostKey, + Signature: kexDHReply.Signature, + Hash: crypto.SHA1, + }, nil +} + +func (group *dhGroup) Server(c packetConn, randSource io.Reader, magics *handshakeMagics, priv Signer) (result *kexResult, err error) { + hashFunc := crypto.SHA1 + packet, err := c.readPacket() + if err != nil { + return + } + var kexDHInit kexDHInitMsg + if err = Unmarshal(packet, &kexDHInit); err != nil { + return + } + + var y *big.Int + for { + if y, err = rand.Int(randSource, group.pMinus1); err != nil { + return + } + if y.Sign() > 0 { + break + } + } + + Y := new(big.Int).Exp(group.g, y, group.p) + kInt, err := group.diffieHellman(kexDHInit.X, y) + if err != nil { + return nil, err + } + + hostKeyBytes := priv.PublicKey().Marshal() + + h := hashFunc.New() + magics.write(h) + writeString(h, hostKeyBytes) + writeInt(h, kexDHInit.X) + writeInt(h, Y) + + K := make([]byte, intLength(kInt)) + marshalInt(K, kInt) + h.Write(K) + + H := h.Sum(nil) + + // H is already a hash, but the hostkey signing will apply its + // own key-specific hash algorithm. + sig, err := signAndMarshal(priv, randSource, H) + if err != nil { + return nil, err + } + + kexDHReply := kexDHReplyMsg{ + HostKey: hostKeyBytes, + Y: Y, + Signature: sig, + } + packet = Marshal(&kexDHReply) + + err = c.writePacket(packet) + return &kexResult{ + H: H, + K: K, + HostKey: hostKeyBytes, + Signature: sig, + Hash: crypto.SHA1, + }, nil +} + +// ecdh performs Elliptic Curve Diffie-Hellman key exchange as +// described in RFC 5656, section 4. +type ecdh struct { + curve elliptic.Curve +} + +func (kex *ecdh) Client(c packetConn, rand io.Reader, magics *handshakeMagics) (*kexResult, error) { + ephKey, err := ecdsa.GenerateKey(kex.curve, rand) + if err != nil { + return nil, err + } + + kexInit := kexECDHInitMsg{ + ClientPubKey: elliptic.Marshal(kex.curve, ephKey.PublicKey.X, ephKey.PublicKey.Y), + } + + serialized := Marshal(&kexInit) + if err := c.writePacket(serialized); err != nil { + return nil, err + } + + packet, err := c.readPacket() + if err != nil { + return nil, err + } + + var reply kexECDHReplyMsg + if err = Unmarshal(packet, &reply); err != nil { + return nil, err + } + + x, y, err := unmarshalECKey(kex.curve, reply.EphemeralPubKey) + if err != nil { + return nil, err + } + + // generate shared secret + secret, _ := kex.curve.ScalarMult(x, y, ephKey.D.Bytes()) + + h := ecHash(kex.curve).New() + magics.write(h) + writeString(h, reply.HostKey) + writeString(h, kexInit.ClientPubKey) + writeString(h, reply.EphemeralPubKey) + K := make([]byte, intLength(secret)) + marshalInt(K, secret) + h.Write(K) + + return &kexResult{ + H: h.Sum(nil), + K: K, + HostKey: reply.HostKey, + Signature: reply.Signature, + Hash: ecHash(kex.curve), + }, nil +} + +// unmarshalECKey parses and checks an EC key. +func unmarshalECKey(curve elliptic.Curve, pubkey []byte) (x, y *big.Int, err error) { + x, y = elliptic.Unmarshal(curve, pubkey) + if x == nil { + return nil, nil, errors.New("ssh: elliptic.Unmarshal failure") + } + if !validateECPublicKey(curve, x, y) { + return nil, nil, errors.New("ssh: public key not on curve") + } + return x, y, nil +} + +// validateECPublicKey checks that the point is a valid public key for +// the given curve. See [SEC1], 3.2.2 +func validateECPublicKey(curve elliptic.Curve, x, y *big.Int) bool { + if x.Sign() == 0 && y.Sign() == 0 { + return false + } + + if x.Cmp(curve.Params().P) >= 0 { + return false + } + + if y.Cmp(curve.Params().P) >= 0 { + return false + } + + if !curve.IsOnCurve(x, y) { + return false + } + + // We don't check if N * PubKey == 0, since + // + // - the NIST curves have cofactor = 1, so this is implicit. + // (We don't foresee an implementation that supports non NIST + // curves) + // + // - for ephemeral keys, we don't need to worry about small + // subgroup attacks. + return true +} + +func (kex *ecdh) Server(c packetConn, rand io.Reader, magics *handshakeMagics, priv Signer) (result *kexResult, err error) { + packet, err := c.readPacket() + if err != nil { + return nil, err + } + + var kexECDHInit kexECDHInitMsg + if err = Unmarshal(packet, &kexECDHInit); err != nil { + return nil, err + } + + clientX, clientY, err := unmarshalECKey(kex.curve, kexECDHInit.ClientPubKey) + if err != nil { + return nil, err + } + + // We could cache this key across multiple users/multiple + // connection attempts, but the benefit is small. OpenSSH + // generates a new key for each incoming connection. + ephKey, err := ecdsa.GenerateKey(kex.curve, rand) + if err != nil { + return nil, err + } + + hostKeyBytes := priv.PublicKey().Marshal() + + serializedEphKey := elliptic.Marshal(kex.curve, ephKey.PublicKey.X, ephKey.PublicKey.Y) + + // generate shared secret + secret, _ := kex.curve.ScalarMult(clientX, clientY, ephKey.D.Bytes()) + + h := ecHash(kex.curve).New() + magics.write(h) + writeString(h, hostKeyBytes) + writeString(h, kexECDHInit.ClientPubKey) + writeString(h, serializedEphKey) + + K := make([]byte, intLength(secret)) + marshalInt(K, secret) + h.Write(K) + + H := h.Sum(nil) + + // H is already a hash, but the hostkey signing will apply its + // own key-specific hash algorithm. + sig, err := signAndMarshal(priv, rand, H) + if err != nil { + return nil, err + } + + reply := kexECDHReplyMsg{ + EphemeralPubKey: serializedEphKey, + HostKey: hostKeyBytes, + Signature: sig, + } + + serialized := Marshal(&reply) + if err := c.writePacket(serialized); err != nil { + return nil, err + } + + return &kexResult{ + H: H, + K: K, + HostKey: reply.HostKey, + Signature: sig, + Hash: ecHash(kex.curve), + }, nil +} + +var kexAlgoMap = map[string]kexAlgorithm{} + +func init() { + // This is the group called diffie-hellman-group1-sha1 in RFC + // 4253 and Oakley Group 2 in RFC 2409. + p, _ := new(big.Int).SetString("FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE65381FFFFFFFFFFFFFFFF", 16) + kexAlgoMap[kexAlgoDH1SHA1] = &dhGroup{ + g: new(big.Int).SetInt64(2), + p: p, + pMinus1: new(big.Int).Sub(p, bigOne), + } + + // This is the group called diffie-hellman-group14-sha1 in RFC + // 4253 and Oakley Group 14 in RFC 3526. + p, _ = new(big.Int).SetString("FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AACAA68FFFFFFFFFFFFFFFF", 16) + + kexAlgoMap[kexAlgoDH14SHA1] = &dhGroup{ + g: new(big.Int).SetInt64(2), + p: p, + pMinus1: new(big.Int).Sub(p, bigOne), + } + + kexAlgoMap[kexAlgoECDH521] = &ecdh{elliptic.P521()} + kexAlgoMap[kexAlgoECDH384] = &ecdh{elliptic.P384()} + kexAlgoMap[kexAlgoECDH256] = &ecdh{elliptic.P256()} + kexAlgoMap[kexAlgoCurve25519SHA256] = &curve25519sha256{} +} + +// curve25519sha256 implements the curve25519-sha256@libssh.org key +// agreement protocol, as described in +// https://git.libssh.org/projects/libssh.git/tree/doc/curve25519-sha256@libssh.org.txt +type curve25519sha256 struct{} + +type curve25519KeyPair struct { + priv [32]byte + pub [32]byte +} + +func (kp *curve25519KeyPair) generate(rand io.Reader) error { + if _, err := io.ReadFull(rand, kp.priv[:]); err != nil { + return err + } + curve25519.ScalarBaseMult(&kp.pub, &kp.priv) + return nil +} + +// curve25519Zeros is just an array of 32 zero bytes so that we have something +// convenient to compare against in order to reject curve25519 points with the +// wrong order. +var curve25519Zeros [32]byte + +func (kex *curve25519sha256) Client(c packetConn, rand io.Reader, magics *handshakeMagics) (*kexResult, error) { + var kp curve25519KeyPair + if err := kp.generate(rand); err != nil { + return nil, err + } + if err := c.writePacket(Marshal(&kexECDHInitMsg{kp.pub[:]})); err != nil { + return nil, err + } + + packet, err := c.readPacket() + if err != nil { + return nil, err + } + + var reply kexECDHReplyMsg + if err = Unmarshal(packet, &reply); err != nil { + return nil, err + } + if len(reply.EphemeralPubKey) != 32 { + return nil, errors.New("ssh: peer's curve25519 public value has wrong length") + } + + var servPub, secret [32]byte + copy(servPub[:], reply.EphemeralPubKey) + curve25519.ScalarMult(&secret, &kp.priv, &servPub) + if subtle.ConstantTimeCompare(secret[:], curve25519Zeros[:]) == 1 { + return nil, errors.New("ssh: peer's curve25519 public value has wrong order") + } + + h := crypto.SHA256.New() + magics.write(h) + writeString(h, reply.HostKey) + writeString(h, kp.pub[:]) + writeString(h, reply.EphemeralPubKey) + + kInt := new(big.Int).SetBytes(secret[:]) + K := make([]byte, intLength(kInt)) + marshalInt(K, kInt) + h.Write(K) + + return &kexResult{ + H: h.Sum(nil), + K: K, + HostKey: reply.HostKey, + Signature: reply.Signature, + Hash: crypto.SHA256, + }, nil +} + +func (kex *curve25519sha256) Server(c packetConn, rand io.Reader, magics *handshakeMagics, priv Signer) (result *kexResult, err error) { + packet, err := c.readPacket() + if err != nil { + return + } + var kexInit kexECDHInitMsg + if err = Unmarshal(packet, &kexInit); err != nil { + return + } + + if len(kexInit.ClientPubKey) != 32 { + return nil, errors.New("ssh: peer's curve25519 public value has wrong length") + } + + var kp curve25519KeyPair + if err := kp.generate(rand); err != nil { + return nil, err + } + + var clientPub, secret [32]byte + copy(clientPub[:], kexInit.ClientPubKey) + curve25519.ScalarMult(&secret, &kp.priv, &clientPub) + if subtle.ConstantTimeCompare(secret[:], curve25519Zeros[:]) == 1 { + return nil, errors.New("ssh: peer's curve25519 public value has wrong order") + } + + hostKeyBytes := priv.PublicKey().Marshal() + + h := crypto.SHA256.New() + magics.write(h) + writeString(h, hostKeyBytes) + writeString(h, kexInit.ClientPubKey) + writeString(h, kp.pub[:]) + + kInt := new(big.Int).SetBytes(secret[:]) + K := make([]byte, intLength(kInt)) + marshalInt(K, kInt) + h.Write(K) + + H := h.Sum(nil) + + sig, err := signAndMarshal(priv, rand, H) + if err != nil { + return nil, err + } + + reply := kexECDHReplyMsg{ + EphemeralPubKey: kp.pub[:], + HostKey: hostKeyBytes, + Signature: sig, + } + if err := c.writePacket(Marshal(&reply)); err != nil { + return nil, err + } + return &kexResult{ + H: H, + K: K, + HostKey: hostKeyBytes, + Signature: sig, + Hash: crypto.SHA256, + }, nil +} diff --git a/vendor/golang.org/x/crypto/ssh/kex_test.go b/vendor/golang.org/x/crypto/ssh/kex_test.go new file mode 100644 index 000000000..12ca0acd3 --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/kex_test.go @@ -0,0 +1,50 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +// Key exchange tests. + +import ( + "crypto/rand" + "reflect" + "testing" +) + +func TestKexes(t *testing.T) { + type kexResultErr struct { + result *kexResult + err error + } + + for name, kex := range kexAlgoMap { + a, b := memPipe() + + s := make(chan kexResultErr, 1) + c := make(chan kexResultErr, 1) + var magics handshakeMagics + go func() { + r, e := kex.Client(a, rand.Reader, &magics) + a.Close() + c <- kexResultErr{r, e} + }() + go func() { + r, e := kex.Server(b, rand.Reader, &magics, testSigners["ecdsa"]) + b.Close() + s <- kexResultErr{r, e} + }() + + clientRes := <-c + serverRes := <-s + if clientRes.err != nil { + t.Errorf("client: %v", clientRes.err) + } + if serverRes.err != nil { + t.Errorf("server: %v", serverRes.err) + } + if !reflect.DeepEqual(clientRes.result, serverRes.result) { + t.Errorf("kex %q: mismatch %#v, %#v", name, clientRes.result, serverRes.result) + } + } +} diff --git a/vendor/golang.org/x/crypto/ssh/keys.go b/vendor/golang.org/x/crypto/ssh/keys.go new file mode 100644 index 000000000..b682c1741 --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/keys.go @@ -0,0 +1,1031 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +import ( + "bytes" + "crypto" + "crypto/dsa" + "crypto/ecdsa" + "crypto/elliptic" + "crypto/md5" + "crypto/rsa" + "crypto/sha256" + "crypto/x509" + "encoding/asn1" + "encoding/base64" + "encoding/hex" + "encoding/pem" + "errors" + "fmt" + "io" + "math/big" + "strings" + + "golang.org/x/crypto/ed25519" +) + +// These constants represent the algorithm names for key types supported by this +// package. +const ( + KeyAlgoRSA = "ssh-rsa" + KeyAlgoDSA = "ssh-dss" + KeyAlgoECDSA256 = "ecdsa-sha2-nistp256" + KeyAlgoECDSA384 = "ecdsa-sha2-nistp384" + KeyAlgoECDSA521 = "ecdsa-sha2-nistp521" + KeyAlgoED25519 = "ssh-ed25519" +) + +// parsePubKey parses a public key of the given algorithm. +// Use ParsePublicKey for keys with prepended algorithm. +func parsePubKey(in []byte, algo string) (pubKey PublicKey, rest []byte, err error) { + switch algo { + case KeyAlgoRSA: + return parseRSA(in) + case KeyAlgoDSA: + return parseDSA(in) + case KeyAlgoECDSA256, KeyAlgoECDSA384, KeyAlgoECDSA521: + return parseECDSA(in) + case KeyAlgoED25519: + return parseED25519(in) + case CertAlgoRSAv01, CertAlgoDSAv01, CertAlgoECDSA256v01, CertAlgoECDSA384v01, CertAlgoECDSA521v01, CertAlgoED25519v01: + cert, err := parseCert(in, certToPrivAlgo(algo)) + if err != nil { + return nil, nil, err + } + return cert, nil, nil + } + return nil, nil, fmt.Errorf("ssh: unknown key algorithm: %v", algo) +} + +// parseAuthorizedKey parses a public key in OpenSSH authorized_keys format +// (see sshd(8) manual page) once the options and key type fields have been +// removed. +func parseAuthorizedKey(in []byte) (out PublicKey, comment string, err error) { + in = bytes.TrimSpace(in) + + i := bytes.IndexAny(in, " \t") + if i == -1 { + i = len(in) + } + base64Key := in[:i] + + key := make([]byte, base64.StdEncoding.DecodedLen(len(base64Key))) + n, err := base64.StdEncoding.Decode(key, base64Key) + if err != nil { + return nil, "", err + } + key = key[:n] + out, err = ParsePublicKey(key) + if err != nil { + return nil, "", err + } + comment = string(bytes.TrimSpace(in[i:])) + return out, comment, nil +} + +// ParseKnownHosts parses an entry in the format of the known_hosts file. +// +// The known_hosts format is documented in the sshd(8) manual page. This +// function will parse a single entry from in. On successful return, marker +// will contain the optional marker value (i.e. "cert-authority" or "revoked") +// or else be empty, hosts will contain the hosts that this entry matches, +// pubKey will contain the public key and comment will contain any trailing +// comment at the end of the line. See the sshd(8) manual page for the various +// forms that a host string can take. +// +// The unparsed remainder of the input will be returned in rest. This function +// can be called repeatedly to parse multiple entries. +// +// If no entries were found in the input then err will be io.EOF. Otherwise a +// non-nil err value indicates a parse error. +func ParseKnownHosts(in []byte) (marker string, hosts []string, pubKey PublicKey, comment string, rest []byte, err error) { + for len(in) > 0 { + end := bytes.IndexByte(in, '\n') + if end != -1 { + rest = in[end+1:] + in = in[:end] + } else { + rest = nil + } + + end = bytes.IndexByte(in, '\r') + if end != -1 { + in = in[:end] + } + + in = bytes.TrimSpace(in) + if len(in) == 0 || in[0] == '#' { + in = rest + continue + } + + i := bytes.IndexAny(in, " \t") + if i == -1 { + in = rest + continue + } + + // Strip out the beginning of the known_host key. + // This is either an optional marker or a (set of) hostname(s). + keyFields := bytes.Fields(in) + if len(keyFields) < 3 || len(keyFields) > 5 { + return "", nil, nil, "", nil, errors.New("ssh: invalid entry in known_hosts data") + } + + // keyFields[0] is either "@cert-authority", "@revoked" or a comma separated + // list of hosts + marker := "" + if keyFields[0][0] == '@' { + marker = string(keyFields[0][1:]) + keyFields = keyFields[1:] + } + + hosts := string(keyFields[0]) + // keyFields[1] contains the key type (e.g. “ssh-rsa”). + // However, that information is duplicated inside the + // base64-encoded key and so is ignored here. + + key := bytes.Join(keyFields[2:], []byte(" ")) + if pubKey, comment, err = parseAuthorizedKey(key); err != nil { + return "", nil, nil, "", nil, err + } + + return marker, strings.Split(hosts, ","), pubKey, comment, rest, nil + } + + return "", nil, nil, "", nil, io.EOF +} + +// ParseAuthorizedKeys parses a public key from an authorized_keys +// file used in OpenSSH according to the sshd(8) manual page. +func ParseAuthorizedKey(in []byte) (out PublicKey, comment string, options []string, rest []byte, err error) { + for len(in) > 0 { + end := bytes.IndexByte(in, '\n') + if end != -1 { + rest = in[end+1:] + in = in[:end] + } else { + rest = nil + } + + end = bytes.IndexByte(in, '\r') + if end != -1 { + in = in[:end] + } + + in = bytes.TrimSpace(in) + if len(in) == 0 || in[0] == '#' { + in = rest + continue + } + + i := bytes.IndexAny(in, " \t") + if i == -1 { + in = rest + continue + } + + if out, comment, err = parseAuthorizedKey(in[i:]); err == nil { + return out, comment, options, rest, nil + } + + // No key type recognised. Maybe there's an options field at + // the beginning. + var b byte + inQuote := false + var candidateOptions []string + optionStart := 0 + for i, b = range in { + isEnd := !inQuote && (b == ' ' || b == '\t') + if (b == ',' && !inQuote) || isEnd { + if i-optionStart > 0 { + candidateOptions = append(candidateOptions, string(in[optionStart:i])) + } + optionStart = i + 1 + } + if isEnd { + break + } + if b == '"' && (i == 0 || (i > 0 && in[i-1] != '\\')) { + inQuote = !inQuote + } + } + for i < len(in) && (in[i] == ' ' || in[i] == '\t') { + i++ + } + if i == len(in) { + // Invalid line: unmatched quote + in = rest + continue + } + + in = in[i:] + i = bytes.IndexAny(in, " \t") + if i == -1 { + in = rest + continue + } + + if out, comment, err = parseAuthorizedKey(in[i:]); err == nil { + options = candidateOptions + return out, comment, options, rest, nil + } + + in = rest + continue + } + + return nil, "", nil, nil, errors.New("ssh: no key found") +} + +// ParsePublicKey parses an SSH public key formatted for use in +// the SSH wire protocol according to RFC 4253, section 6.6. +func ParsePublicKey(in []byte) (out PublicKey, err error) { + algo, in, ok := parseString(in) + if !ok { + return nil, errShortRead + } + var rest []byte + out, rest, err = parsePubKey(in, string(algo)) + if len(rest) > 0 { + return nil, errors.New("ssh: trailing junk in public key") + } + + return out, err +} + +// MarshalAuthorizedKey serializes key for inclusion in an OpenSSH +// authorized_keys file. The return value ends with newline. +func MarshalAuthorizedKey(key PublicKey) []byte { + b := &bytes.Buffer{} + b.WriteString(key.Type()) + b.WriteByte(' ') + e := base64.NewEncoder(base64.StdEncoding, b) + e.Write(key.Marshal()) + e.Close() + b.WriteByte('\n') + return b.Bytes() +} + +// PublicKey is an abstraction of different types of public keys. +type PublicKey interface { + // Type returns the key's type, e.g. "ssh-rsa". + Type() string + + // Marshal returns the serialized key data in SSH wire format, + // with the name prefix. + Marshal() []byte + + // Verify that sig is a signature on the given data using this + // key. This function will hash the data appropriately first. + Verify(data []byte, sig *Signature) error +} + +// CryptoPublicKey, if implemented by a PublicKey, +// returns the underlying crypto.PublicKey form of the key. +type CryptoPublicKey interface { + CryptoPublicKey() crypto.PublicKey +} + +// A Signer can create signatures that verify against a public key. +type Signer interface { + // PublicKey returns an associated PublicKey instance. + PublicKey() PublicKey + + // Sign returns raw signature for the given data. This method + // will apply the hash specified for the keytype to the data. + Sign(rand io.Reader, data []byte) (*Signature, error) +} + +type rsaPublicKey rsa.PublicKey + +func (r *rsaPublicKey) Type() string { + return "ssh-rsa" +} + +// parseRSA parses an RSA key according to RFC 4253, section 6.6. +func parseRSA(in []byte) (out PublicKey, rest []byte, err error) { + var w struct { + E *big.Int + N *big.Int + Rest []byte `ssh:"rest"` + } + if err := Unmarshal(in, &w); err != nil { + return nil, nil, err + } + + if w.E.BitLen() > 24 { + return nil, nil, errors.New("ssh: exponent too large") + } + e := w.E.Int64() + if e < 3 || e&1 == 0 { + return nil, nil, errors.New("ssh: incorrect exponent") + } + + var key rsa.PublicKey + key.E = int(e) + key.N = w.N + return (*rsaPublicKey)(&key), w.Rest, nil +} + +func (r *rsaPublicKey) Marshal() []byte { + e := new(big.Int).SetInt64(int64(r.E)) + // RSA publickey struct layout should match the struct used by + // parseRSACert in the x/crypto/ssh/agent package. + wirekey := struct { + Name string + E *big.Int + N *big.Int + }{ + KeyAlgoRSA, + e, + r.N, + } + return Marshal(&wirekey) +} + +func (r *rsaPublicKey) Verify(data []byte, sig *Signature) error { + if sig.Format != r.Type() { + return fmt.Errorf("ssh: signature type %s for key type %s", sig.Format, r.Type()) + } + h := crypto.SHA1.New() + h.Write(data) + digest := h.Sum(nil) + return rsa.VerifyPKCS1v15((*rsa.PublicKey)(r), crypto.SHA1, digest, sig.Blob) +} + +func (r *rsaPublicKey) CryptoPublicKey() crypto.PublicKey { + return (*rsa.PublicKey)(r) +} + +type dsaPublicKey dsa.PublicKey + +func (r *dsaPublicKey) Type() string { + return "ssh-dss" +} + +func checkDSAParams(param *dsa.Parameters) error { + // SSH specifies FIPS 186-2, which only provided a single size + // (1024 bits) DSA key. FIPS 186-3 allows for larger key + // sizes, which would confuse SSH. + if l := param.P.BitLen(); l != 1024 { + return fmt.Errorf("ssh: unsupported DSA key size %d", l) + } + + return nil +} + +// parseDSA parses an DSA key according to RFC 4253, section 6.6. +func parseDSA(in []byte) (out PublicKey, rest []byte, err error) { + var w struct { + P, Q, G, Y *big.Int + Rest []byte `ssh:"rest"` + } + if err := Unmarshal(in, &w); err != nil { + return nil, nil, err + } + + param := dsa.Parameters{ + P: w.P, + Q: w.Q, + G: w.G, + } + if err := checkDSAParams(¶m); err != nil { + return nil, nil, err + } + + key := &dsaPublicKey{ + Parameters: param, + Y: w.Y, + } + return key, w.Rest, nil +} + +func (k *dsaPublicKey) Marshal() []byte { + // DSA publickey struct layout should match the struct used by + // parseDSACert in the x/crypto/ssh/agent package. + w := struct { + Name string + P, Q, G, Y *big.Int + }{ + k.Type(), + k.P, + k.Q, + k.G, + k.Y, + } + + return Marshal(&w) +} + +func (k *dsaPublicKey) Verify(data []byte, sig *Signature) error { + if sig.Format != k.Type() { + return fmt.Errorf("ssh: signature type %s for key type %s", sig.Format, k.Type()) + } + h := crypto.SHA1.New() + h.Write(data) + digest := h.Sum(nil) + + // Per RFC 4253, section 6.6, + // The value for 'dss_signature_blob' is encoded as a string containing + // r, followed by s (which are 160-bit integers, without lengths or + // padding, unsigned, and in network byte order). + // For DSS purposes, sig.Blob should be exactly 40 bytes in length. + if len(sig.Blob) != 40 { + return errors.New("ssh: DSA signature parse error") + } + r := new(big.Int).SetBytes(sig.Blob[:20]) + s := new(big.Int).SetBytes(sig.Blob[20:]) + if dsa.Verify((*dsa.PublicKey)(k), digest, r, s) { + return nil + } + return errors.New("ssh: signature did not verify") +} + +func (k *dsaPublicKey) CryptoPublicKey() crypto.PublicKey { + return (*dsa.PublicKey)(k) +} + +type dsaPrivateKey struct { + *dsa.PrivateKey +} + +func (k *dsaPrivateKey) PublicKey() PublicKey { + return (*dsaPublicKey)(&k.PrivateKey.PublicKey) +} + +func (k *dsaPrivateKey) Sign(rand io.Reader, data []byte) (*Signature, error) { + h := crypto.SHA1.New() + h.Write(data) + digest := h.Sum(nil) + r, s, err := dsa.Sign(rand, k.PrivateKey, digest) + if err != nil { + return nil, err + } + + sig := make([]byte, 40) + rb := r.Bytes() + sb := s.Bytes() + + copy(sig[20-len(rb):20], rb) + copy(sig[40-len(sb):], sb) + + return &Signature{ + Format: k.PublicKey().Type(), + Blob: sig, + }, nil +} + +type ecdsaPublicKey ecdsa.PublicKey + +func (key *ecdsaPublicKey) Type() string { + return "ecdsa-sha2-" + key.nistID() +} + +func (key *ecdsaPublicKey) nistID() string { + switch key.Params().BitSize { + case 256: + return "nistp256" + case 384: + return "nistp384" + case 521: + return "nistp521" + } + panic("ssh: unsupported ecdsa key size") +} + +type ed25519PublicKey ed25519.PublicKey + +func (key ed25519PublicKey) Type() string { + return KeyAlgoED25519 +} + +func parseED25519(in []byte) (out PublicKey, rest []byte, err error) { + var w struct { + KeyBytes []byte + Rest []byte `ssh:"rest"` + } + + if err := Unmarshal(in, &w); err != nil { + return nil, nil, err + } + + key := ed25519.PublicKey(w.KeyBytes) + + return (ed25519PublicKey)(key), w.Rest, nil +} + +func (key ed25519PublicKey) Marshal() []byte { + w := struct { + Name string + KeyBytes []byte + }{ + KeyAlgoED25519, + []byte(key), + } + return Marshal(&w) +} + +func (key ed25519PublicKey) Verify(b []byte, sig *Signature) error { + if sig.Format != key.Type() { + return fmt.Errorf("ssh: signature type %s for key type %s", sig.Format, key.Type()) + } + + edKey := (ed25519.PublicKey)(key) + if ok := ed25519.Verify(edKey, b, sig.Blob); !ok { + return errors.New("ssh: signature did not verify") + } + + return nil +} + +func (k ed25519PublicKey) CryptoPublicKey() crypto.PublicKey { + return ed25519.PublicKey(k) +} + +func supportedEllipticCurve(curve elliptic.Curve) bool { + return curve == elliptic.P256() || curve == elliptic.P384() || curve == elliptic.P521() +} + +// ecHash returns the hash to match the given elliptic curve, see RFC +// 5656, section 6.2.1 +func ecHash(curve elliptic.Curve) crypto.Hash { + bitSize := curve.Params().BitSize + switch { + case bitSize <= 256: + return crypto.SHA256 + case bitSize <= 384: + return crypto.SHA384 + } + return crypto.SHA512 +} + +// parseECDSA parses an ECDSA key according to RFC 5656, section 3.1. +func parseECDSA(in []byte) (out PublicKey, rest []byte, err error) { + var w struct { + Curve string + KeyBytes []byte + Rest []byte `ssh:"rest"` + } + + if err := Unmarshal(in, &w); err != nil { + return nil, nil, err + } + + key := new(ecdsa.PublicKey) + + switch w.Curve { + case "nistp256": + key.Curve = elliptic.P256() + case "nistp384": + key.Curve = elliptic.P384() + case "nistp521": + key.Curve = elliptic.P521() + default: + return nil, nil, errors.New("ssh: unsupported curve") + } + + key.X, key.Y = elliptic.Unmarshal(key.Curve, w.KeyBytes) + if key.X == nil || key.Y == nil { + return nil, nil, errors.New("ssh: invalid curve point") + } + return (*ecdsaPublicKey)(key), w.Rest, nil +} + +func (key *ecdsaPublicKey) Marshal() []byte { + // See RFC 5656, section 3.1. + keyBytes := elliptic.Marshal(key.Curve, key.X, key.Y) + // ECDSA publickey struct layout should match the struct used by + // parseECDSACert in the x/crypto/ssh/agent package. + w := struct { + Name string + ID string + Key []byte + }{ + key.Type(), + key.nistID(), + keyBytes, + } + + return Marshal(&w) +} + +func (key *ecdsaPublicKey) Verify(data []byte, sig *Signature) error { + if sig.Format != key.Type() { + return fmt.Errorf("ssh: signature type %s for key type %s", sig.Format, key.Type()) + } + + h := ecHash(key.Curve).New() + h.Write(data) + digest := h.Sum(nil) + + // Per RFC 5656, section 3.1.2, + // The ecdsa_signature_blob value has the following specific encoding: + // mpint r + // mpint s + var ecSig struct { + R *big.Int + S *big.Int + } + + if err := Unmarshal(sig.Blob, &ecSig); err != nil { + return err + } + + if ecdsa.Verify((*ecdsa.PublicKey)(key), digest, ecSig.R, ecSig.S) { + return nil + } + return errors.New("ssh: signature did not verify") +} + +func (k *ecdsaPublicKey) CryptoPublicKey() crypto.PublicKey { + return (*ecdsa.PublicKey)(k) +} + +// NewSignerFromKey takes an *rsa.PrivateKey, *dsa.PrivateKey, +// *ecdsa.PrivateKey or any other crypto.Signer and returns a +// corresponding Signer instance. ECDSA keys must use P-256, P-384 or +// P-521. DSA keys must use parameter size L1024N160. +func NewSignerFromKey(key interface{}) (Signer, error) { + switch key := key.(type) { + case crypto.Signer: + return NewSignerFromSigner(key) + case *dsa.PrivateKey: + return newDSAPrivateKey(key) + default: + return nil, fmt.Errorf("ssh: unsupported key type %T", key) + } +} + +func newDSAPrivateKey(key *dsa.PrivateKey) (Signer, error) { + if err := checkDSAParams(&key.PublicKey.Parameters); err != nil { + return nil, err + } + + return &dsaPrivateKey{key}, nil +} + +type wrappedSigner struct { + signer crypto.Signer + pubKey PublicKey +} + +// NewSignerFromSigner takes any crypto.Signer implementation and +// returns a corresponding Signer interface. This can be used, for +// example, with keys kept in hardware modules. +func NewSignerFromSigner(signer crypto.Signer) (Signer, error) { + pubKey, err := NewPublicKey(signer.Public()) + if err != nil { + return nil, err + } + + return &wrappedSigner{signer, pubKey}, nil +} + +func (s *wrappedSigner) PublicKey() PublicKey { + return s.pubKey +} + +func (s *wrappedSigner) Sign(rand io.Reader, data []byte) (*Signature, error) { + var hashFunc crypto.Hash + + switch key := s.pubKey.(type) { + case *rsaPublicKey, *dsaPublicKey: + hashFunc = crypto.SHA1 + case *ecdsaPublicKey: + hashFunc = ecHash(key.Curve) + case ed25519PublicKey: + default: + return nil, fmt.Errorf("ssh: unsupported key type %T", key) + } + + var digest []byte + if hashFunc != 0 { + h := hashFunc.New() + h.Write(data) + digest = h.Sum(nil) + } else { + digest = data + } + + signature, err := s.signer.Sign(rand, digest, hashFunc) + if err != nil { + return nil, err + } + + // crypto.Signer.Sign is expected to return an ASN.1-encoded signature + // for ECDSA and DSA, but that's not the encoding expected by SSH, so + // re-encode. + switch s.pubKey.(type) { + case *ecdsaPublicKey, *dsaPublicKey: + type asn1Signature struct { + R, S *big.Int + } + asn1Sig := new(asn1Signature) + _, err := asn1.Unmarshal(signature, asn1Sig) + if err != nil { + return nil, err + } + + switch s.pubKey.(type) { + case *ecdsaPublicKey: + signature = Marshal(asn1Sig) + + case *dsaPublicKey: + signature = make([]byte, 40) + r := asn1Sig.R.Bytes() + s := asn1Sig.S.Bytes() + copy(signature[20-len(r):20], r) + copy(signature[40-len(s):40], s) + } + } + + return &Signature{ + Format: s.pubKey.Type(), + Blob: signature, + }, nil +} + +// NewPublicKey takes an *rsa.PublicKey, *dsa.PublicKey, *ecdsa.PublicKey, +// or ed25519.PublicKey returns a corresponding PublicKey instance. +// ECDSA keys must use P-256, P-384 or P-521. +func NewPublicKey(key interface{}) (PublicKey, error) { + switch key := key.(type) { + case *rsa.PublicKey: + return (*rsaPublicKey)(key), nil + case *ecdsa.PublicKey: + if !supportedEllipticCurve(key.Curve) { + return nil, errors.New("ssh: only P-256, P-384 and P-521 EC keys are supported.") + } + return (*ecdsaPublicKey)(key), nil + case *dsa.PublicKey: + return (*dsaPublicKey)(key), nil + case ed25519.PublicKey: + return (ed25519PublicKey)(key), nil + default: + return nil, fmt.Errorf("ssh: unsupported key type %T", key) + } +} + +// ParsePrivateKey returns a Signer from a PEM encoded private key. It supports +// the same keys as ParseRawPrivateKey. +func ParsePrivateKey(pemBytes []byte) (Signer, error) { + key, err := ParseRawPrivateKey(pemBytes) + if err != nil { + return nil, err + } + + return NewSignerFromKey(key) +} + +// ParsePrivateKeyWithPassphrase returns a Signer from a PEM encoded private +// key and passphrase. It supports the same keys as +// ParseRawPrivateKeyWithPassphrase. +func ParsePrivateKeyWithPassphrase(pemBytes, passPhrase []byte) (Signer, error) { + key, err := ParseRawPrivateKeyWithPassphrase(pemBytes, passPhrase) + if err != nil { + return nil, err + } + + return NewSignerFromKey(key) +} + +// encryptedBlock tells whether a private key is +// encrypted by examining its Proc-Type header +// for a mention of ENCRYPTED +// according to RFC 1421 Section 4.6.1.1. +func encryptedBlock(block *pem.Block) bool { + return strings.Contains(block.Headers["Proc-Type"], "ENCRYPTED") +} + +// ParseRawPrivateKey returns a private key from a PEM encoded private key. It +// supports RSA (PKCS#1), DSA (OpenSSL), and ECDSA private keys. +func ParseRawPrivateKey(pemBytes []byte) (interface{}, error) { + block, _ := pem.Decode(pemBytes) + if block == nil { + return nil, errors.New("ssh: no key found") + } + + if encryptedBlock(block) { + return nil, errors.New("ssh: cannot decode encrypted private keys") + } + + switch block.Type { + case "RSA PRIVATE KEY": + return x509.ParsePKCS1PrivateKey(block.Bytes) + case "EC PRIVATE KEY": + return x509.ParseECPrivateKey(block.Bytes) + case "DSA PRIVATE KEY": + return ParseDSAPrivateKey(block.Bytes) + case "OPENSSH PRIVATE KEY": + return parseOpenSSHPrivateKey(block.Bytes) + default: + return nil, fmt.Errorf("ssh: unsupported key type %q", block.Type) + } +} + +// ParseRawPrivateKeyWithPassphrase returns a private key decrypted with +// passphrase from a PEM encoded private key. If wrong passphrase, return +// x509.IncorrectPasswordError. +func ParseRawPrivateKeyWithPassphrase(pemBytes, passPhrase []byte) (interface{}, error) { + block, _ := pem.Decode(pemBytes) + if block == nil { + return nil, errors.New("ssh: no key found") + } + buf := block.Bytes + + if encryptedBlock(block) { + if x509.IsEncryptedPEMBlock(block) { + var err error + buf, err = x509.DecryptPEMBlock(block, passPhrase) + if err != nil { + if err == x509.IncorrectPasswordError { + return nil, err + } + return nil, fmt.Errorf("ssh: cannot decode encrypted private keys: %v", err) + } + } + } + + switch block.Type { + case "RSA PRIVATE KEY": + return x509.ParsePKCS1PrivateKey(buf) + case "EC PRIVATE KEY": + return x509.ParseECPrivateKey(buf) + case "DSA PRIVATE KEY": + return ParseDSAPrivateKey(buf) + case "OPENSSH PRIVATE KEY": + return parseOpenSSHPrivateKey(buf) + default: + return nil, fmt.Errorf("ssh: unsupported key type %q", block.Type) + } +} + +// ParseDSAPrivateKey returns a DSA private key from its ASN.1 DER encoding, as +// specified by the OpenSSL DSA man page. +func ParseDSAPrivateKey(der []byte) (*dsa.PrivateKey, error) { + var k struct { + Version int + P *big.Int + Q *big.Int + G *big.Int + Pub *big.Int + Priv *big.Int + } + rest, err := asn1.Unmarshal(der, &k) + if err != nil { + return nil, errors.New("ssh: failed to parse DSA key: " + err.Error()) + } + if len(rest) > 0 { + return nil, errors.New("ssh: garbage after DSA key") + } + + return &dsa.PrivateKey{ + PublicKey: dsa.PublicKey{ + Parameters: dsa.Parameters{ + P: k.P, + Q: k.Q, + G: k.G, + }, + Y: k.Pub, + }, + X: k.Priv, + }, nil +} + +// Implemented based on the documentation at +// https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.key +func parseOpenSSHPrivateKey(key []byte) (crypto.PrivateKey, error) { + magic := append([]byte("openssh-key-v1"), 0) + if !bytes.Equal(magic, key[0:len(magic)]) { + return nil, errors.New("ssh: invalid openssh private key format") + } + remaining := key[len(magic):] + + var w struct { + CipherName string + KdfName string + KdfOpts string + NumKeys uint32 + PubKey []byte + PrivKeyBlock []byte + } + + if err := Unmarshal(remaining, &w); err != nil { + return nil, err + } + + if w.KdfName != "none" || w.CipherName != "none" { + return nil, errors.New("ssh: cannot decode encrypted private keys") + } + + pk1 := struct { + Check1 uint32 + Check2 uint32 + Keytype string + Rest []byte `ssh:"rest"` + }{} + + if err := Unmarshal(w.PrivKeyBlock, &pk1); err != nil { + return nil, err + } + + if pk1.Check1 != pk1.Check2 { + return nil, errors.New("ssh: checkint mismatch") + } + + // we only handle ed25519 and rsa keys currently + switch pk1.Keytype { + case KeyAlgoRSA: + // https://github.com/openssh/openssh-portable/blob/master/sshkey.c#L2760-L2773 + key := struct { + N *big.Int + E *big.Int + D *big.Int + Iqmp *big.Int + P *big.Int + Q *big.Int + Comment string + Pad []byte `ssh:"rest"` + }{} + + if err := Unmarshal(pk1.Rest, &key); err != nil { + return nil, err + } + + for i, b := range key.Pad { + if int(b) != i+1 { + return nil, errors.New("ssh: padding not as expected") + } + } + + pk := &rsa.PrivateKey{ + PublicKey: rsa.PublicKey{ + N: key.N, + E: int(key.E.Int64()), + }, + D: key.D, + Primes: []*big.Int{key.P, key.Q}, + } + + if err := pk.Validate(); err != nil { + return nil, err + } + + pk.Precompute() + + return pk, nil + case KeyAlgoED25519: + key := struct { + Pub []byte + Priv []byte + Comment string + Pad []byte `ssh:"rest"` + }{} + + if err := Unmarshal(pk1.Rest, &key); err != nil { + return nil, err + } + + if len(key.Priv) != ed25519.PrivateKeySize { + return nil, errors.New("ssh: private key unexpected length") + } + + for i, b := range key.Pad { + if int(b) != i+1 { + return nil, errors.New("ssh: padding not as expected") + } + } + + pk := ed25519.PrivateKey(make([]byte, ed25519.PrivateKeySize)) + copy(pk, key.Priv) + return &pk, nil + default: + return nil, errors.New("ssh: unhandled key type") + } +} + +// FingerprintLegacyMD5 returns the user presentation of the key's +// fingerprint as described by RFC 4716 section 4. +func FingerprintLegacyMD5(pubKey PublicKey) string { + md5sum := md5.Sum(pubKey.Marshal()) + hexarray := make([]string, len(md5sum)) + for i, c := range md5sum { + hexarray[i] = hex.EncodeToString([]byte{c}) + } + return strings.Join(hexarray, ":") +} + +// FingerprintSHA256 returns the user presentation of the key's +// fingerprint as unpadded base64 encoded sha256 hash. +// This format was introduced from OpenSSH 6.8. +// https://www.openssh.com/txt/release-6.8 +// https://tools.ietf.org/html/rfc4648#section-3.2 (unpadded base64 encoding) +func FingerprintSHA256(pubKey PublicKey) string { + sha256sum := sha256.Sum256(pubKey.Marshal()) + hash := base64.RawStdEncoding.EncodeToString(sha256sum[:]) + return "SHA256:" + hash +} diff --git a/vendor/golang.org/x/crypto/ssh/keys_test.go b/vendor/golang.org/x/crypto/ssh/keys_test.go new file mode 100644 index 000000000..20ab954e2 --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/keys_test.go @@ -0,0 +1,500 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +import ( + "bytes" + "crypto/dsa" + "crypto/ecdsa" + "crypto/elliptic" + "crypto/rand" + "crypto/rsa" + "crypto/x509" + "encoding/base64" + "fmt" + "reflect" + "strings" + "testing" + + "golang.org/x/crypto/ed25519" + "golang.org/x/crypto/ssh/testdata" +) + +func rawKey(pub PublicKey) interface{} { + switch k := pub.(type) { + case *rsaPublicKey: + return (*rsa.PublicKey)(k) + case *dsaPublicKey: + return (*dsa.PublicKey)(k) + case *ecdsaPublicKey: + return (*ecdsa.PublicKey)(k) + case ed25519PublicKey: + return (ed25519.PublicKey)(k) + case *Certificate: + return k + } + panic("unknown key type") +} + +func TestKeyMarshalParse(t *testing.T) { + for _, priv := range testSigners { + pub := priv.PublicKey() + roundtrip, err := ParsePublicKey(pub.Marshal()) + if err != nil { + t.Errorf("ParsePublicKey(%T): %v", pub, err) + } + + k1 := rawKey(pub) + k2 := rawKey(roundtrip) + + if !reflect.DeepEqual(k1, k2) { + t.Errorf("got %#v in roundtrip, want %#v", k2, k1) + } + } +} + +func TestUnsupportedCurves(t *testing.T) { + raw, err := ecdsa.GenerateKey(elliptic.P224(), rand.Reader) + if err != nil { + t.Fatalf("GenerateKey: %v", err) + } + + if _, err = NewSignerFromKey(raw); err == nil || !strings.Contains(err.Error(), "only P-256") { + t.Fatalf("NewPrivateKey should not succeed with P-224, got: %v", err) + } + + if _, err = NewPublicKey(&raw.PublicKey); err == nil || !strings.Contains(err.Error(), "only P-256") { + t.Fatalf("NewPublicKey should not succeed with P-224, got: %v", err) + } +} + +func TestNewPublicKey(t *testing.T) { + for _, k := range testSigners { + raw := rawKey(k.PublicKey()) + // Skip certificates, as NewPublicKey does not support them. + if _, ok := raw.(*Certificate); ok { + continue + } + pub, err := NewPublicKey(raw) + if err != nil { + t.Errorf("NewPublicKey(%#v): %v", raw, err) + } + if !reflect.DeepEqual(k.PublicKey(), pub) { + t.Errorf("NewPublicKey(%#v) = %#v, want %#v", raw, pub, k.PublicKey()) + } + } +} + +func TestKeySignVerify(t *testing.T) { + for _, priv := range testSigners { + pub := priv.PublicKey() + + data := []byte("sign me") + sig, err := priv.Sign(rand.Reader, data) + if err != nil { + t.Fatalf("Sign(%T): %v", priv, err) + } + + if err := pub.Verify(data, sig); err != nil { + t.Errorf("publicKey.Verify(%T): %v", priv, err) + } + sig.Blob[5]++ + if err := pub.Verify(data, sig); err == nil { + t.Errorf("publicKey.Verify on broken sig did not fail") + } + } +} + +func TestParseRSAPrivateKey(t *testing.T) { + key := testPrivateKeys["rsa"] + + rsa, ok := key.(*rsa.PrivateKey) + if !ok { + t.Fatalf("got %T, want *rsa.PrivateKey", rsa) + } + + if err := rsa.Validate(); err != nil { + t.Errorf("Validate: %v", err) + } +} + +func TestParseECPrivateKey(t *testing.T) { + key := testPrivateKeys["ecdsa"] + + ecKey, ok := key.(*ecdsa.PrivateKey) + if !ok { + t.Fatalf("got %T, want *ecdsa.PrivateKey", ecKey) + } + + if !validateECPublicKey(ecKey.Curve, ecKey.X, ecKey.Y) { + t.Fatalf("public key does not validate.") + } +} + +// See Issue https://github.com/golang/go/issues/6650. +func TestParseEncryptedPrivateKeysFails(t *testing.T) { + const wantSubstring = "encrypted" + for i, tt := range testdata.PEMEncryptedKeys { + _, err := ParsePrivateKey(tt.PEMBytes) + if err == nil { + t.Errorf("#%d key %s: ParsePrivateKey successfully parsed, expected an error", i, tt.Name) + continue + } + + if !strings.Contains(err.Error(), wantSubstring) { + t.Errorf("#%d key %s: got error %q, want substring %q", i, tt.Name, err, wantSubstring) + } + } +} + +// Parse encrypted private keys with passphrase +func TestParseEncryptedPrivateKeysWithPassphrase(t *testing.T) { + data := []byte("sign me") + for _, tt := range testdata.PEMEncryptedKeys { + s, err := ParsePrivateKeyWithPassphrase(tt.PEMBytes, []byte(tt.EncryptionKey)) + if err != nil { + t.Fatalf("ParsePrivateKeyWithPassphrase returned error: %s", err) + continue + } + sig, err := s.Sign(rand.Reader, data) + if err != nil { + t.Fatalf("dsa.Sign: %v", err) + } + if err := s.PublicKey().Verify(data, sig); err != nil { + t.Errorf("Verify failed: %v", err) + } + } + + tt := testdata.PEMEncryptedKeys[0] + _, err := ParsePrivateKeyWithPassphrase(tt.PEMBytes, []byte("incorrect")) + if err != x509.IncorrectPasswordError { + t.Fatalf("got %v want IncorrectPasswordError", err) + } +} + +func TestParseDSA(t *testing.T) { + // We actually exercise the ParsePrivateKey codepath here, as opposed to + // using the ParseRawPrivateKey+NewSignerFromKey path that testdata_test.go + // uses. + s, err := ParsePrivateKey(testdata.PEMBytes["dsa"]) + if err != nil { + t.Fatalf("ParsePrivateKey returned error: %s", err) + } + + data := []byte("sign me") + sig, err := s.Sign(rand.Reader, data) + if err != nil { + t.Fatalf("dsa.Sign: %v", err) + } + + if err := s.PublicKey().Verify(data, sig); err != nil { + t.Errorf("Verify failed: %v", err) + } +} + +// Tests for authorized_keys parsing. + +// getTestKey returns a public key, and its base64 encoding. +func getTestKey() (PublicKey, string) { + k := testPublicKeys["rsa"] + + b := &bytes.Buffer{} + e := base64.NewEncoder(base64.StdEncoding, b) + e.Write(k.Marshal()) + e.Close() + + return k, b.String() +} + +func TestMarshalParsePublicKey(t *testing.T) { + pub, pubSerialized := getTestKey() + line := fmt.Sprintf("%s %s user@host", pub.Type(), pubSerialized) + + authKeys := MarshalAuthorizedKey(pub) + actualFields := strings.Fields(string(authKeys)) + if len(actualFields) == 0 { + t.Fatalf("failed authKeys: %v", authKeys) + } + + // drop the comment + expectedFields := strings.Fields(line)[0:2] + + if !reflect.DeepEqual(actualFields, expectedFields) { + t.Errorf("got %v, expected %v", actualFields, expectedFields) + } + + actPub, _, _, _, err := ParseAuthorizedKey([]byte(line)) + if err != nil { + t.Fatalf("cannot parse %v: %v", line, err) + } + if !reflect.DeepEqual(actPub, pub) { + t.Errorf("got %v, expected %v", actPub, pub) + } +} + +type authResult struct { + pubKey PublicKey + options []string + comments string + rest string + ok bool +} + +func testAuthorizedKeys(t *testing.T, authKeys []byte, expected []authResult) { + rest := authKeys + var values []authResult + for len(rest) > 0 { + var r authResult + var err error + r.pubKey, r.comments, r.options, rest, err = ParseAuthorizedKey(rest) + r.ok = (err == nil) + t.Log(err) + r.rest = string(rest) + values = append(values, r) + } + + if !reflect.DeepEqual(values, expected) { + t.Errorf("got %#v, expected %#v", values, expected) + } +} + +func TestAuthorizedKeyBasic(t *testing.T) { + pub, pubSerialized := getTestKey() + line := "ssh-rsa " + pubSerialized + " user@host" + testAuthorizedKeys(t, []byte(line), + []authResult{ + {pub, nil, "user@host", "", true}, + }) +} + +func TestAuth(t *testing.T) { + pub, pubSerialized := getTestKey() + authWithOptions := []string{ + `# comments to ignore before any keys...`, + ``, + `env="HOME=/home/root",no-port-forwarding ssh-rsa ` + pubSerialized + ` user@host`, + `# comments to ignore, along with a blank line`, + ``, + `env="HOME=/home/root2" ssh-rsa ` + pubSerialized + ` user2@host2`, + ``, + `# more comments, plus a invalid entry`, + `ssh-rsa data-that-will-not-parse user@host3`, + } + for _, eol := range []string{"\n", "\r\n"} { + authOptions := strings.Join(authWithOptions, eol) + rest2 := strings.Join(authWithOptions[3:], eol) + rest3 := strings.Join(authWithOptions[6:], eol) + testAuthorizedKeys(t, []byte(authOptions), []authResult{ + {pub, []string{`env="HOME=/home/root"`, "no-port-forwarding"}, "user@host", rest2, true}, + {pub, []string{`env="HOME=/home/root2"`}, "user2@host2", rest3, true}, + {nil, nil, "", "", false}, + }) + } +} + +func TestAuthWithQuotedSpaceInEnv(t *testing.T) { + pub, pubSerialized := getTestKey() + authWithQuotedSpaceInEnv := []byte(`env="HOME=/home/root dir",no-port-forwarding ssh-rsa ` + pubSerialized + ` user@host`) + testAuthorizedKeys(t, []byte(authWithQuotedSpaceInEnv), []authResult{ + {pub, []string{`env="HOME=/home/root dir"`, "no-port-forwarding"}, "user@host", "", true}, + }) +} + +func TestAuthWithQuotedCommaInEnv(t *testing.T) { + pub, pubSerialized := getTestKey() + authWithQuotedCommaInEnv := []byte(`env="HOME=/home/root,dir",no-port-forwarding ssh-rsa ` + pubSerialized + ` user@host`) + testAuthorizedKeys(t, []byte(authWithQuotedCommaInEnv), []authResult{ + {pub, []string{`env="HOME=/home/root,dir"`, "no-port-forwarding"}, "user@host", "", true}, + }) +} + +func TestAuthWithQuotedQuoteInEnv(t *testing.T) { + pub, pubSerialized := getTestKey() + authWithQuotedQuoteInEnv := []byte(`env="HOME=/home/\"root dir",no-port-forwarding` + "\t" + `ssh-rsa` + "\t" + pubSerialized + ` user@host`) + authWithDoubleQuotedQuote := []byte(`no-port-forwarding,env="HOME=/home/ \"root dir\"" ssh-rsa ` + pubSerialized + "\t" + `user@host`) + testAuthorizedKeys(t, []byte(authWithQuotedQuoteInEnv), []authResult{ + {pub, []string{`env="HOME=/home/\"root dir"`, "no-port-forwarding"}, "user@host", "", true}, + }) + + testAuthorizedKeys(t, []byte(authWithDoubleQuotedQuote), []authResult{ + {pub, []string{"no-port-forwarding", `env="HOME=/home/ \"root dir\""`}, "user@host", "", true}, + }) +} + +func TestAuthWithInvalidSpace(t *testing.T) { + _, pubSerialized := getTestKey() + authWithInvalidSpace := []byte(`env="HOME=/home/root dir", no-port-forwarding ssh-rsa ` + pubSerialized + ` user@host +#more to follow but still no valid keys`) + testAuthorizedKeys(t, []byte(authWithInvalidSpace), []authResult{ + {nil, nil, "", "", false}, + }) +} + +func TestAuthWithMissingQuote(t *testing.T) { + pub, pubSerialized := getTestKey() + authWithMissingQuote := []byte(`env="HOME=/home/root,no-port-forwarding ssh-rsa ` + pubSerialized + ` user@host +env="HOME=/home/root",shared-control ssh-rsa ` + pubSerialized + ` user@host`) + + testAuthorizedKeys(t, []byte(authWithMissingQuote), []authResult{ + {pub, []string{`env="HOME=/home/root"`, `shared-control`}, "user@host", "", true}, + }) +} + +func TestInvalidEntry(t *testing.T) { + authInvalid := []byte(`ssh-rsa`) + _, _, _, _, err := ParseAuthorizedKey(authInvalid) + if err == nil { + t.Errorf("got valid entry for %q", authInvalid) + } +} + +var knownHostsParseTests = []struct { + input string + err string + + marker string + comment string + hosts []string + rest string +}{ + { + "", + "EOF", + + "", "", nil, "", + }, + { + "# Just a comment", + "EOF", + + "", "", nil, "", + }, + { + " \t ", + "EOF", + + "", "", nil, "", + }, + { + "localhost ssh-rsa {RSAPUB}", + "", + + "", "", []string{"localhost"}, "", + }, + { + "localhost\tssh-rsa {RSAPUB}", + "", + + "", "", []string{"localhost"}, "", + }, + { + "localhost\tssh-rsa {RSAPUB}\tcomment comment", + "", + + "", "comment comment", []string{"localhost"}, "", + }, + { + "localhost\tssh-rsa {RSAPUB}\tcomment comment\n", + "", + + "", "comment comment", []string{"localhost"}, "", + }, + { + "localhost\tssh-rsa {RSAPUB}\tcomment comment\r\n", + "", + + "", "comment comment", []string{"localhost"}, "", + }, + { + "localhost\tssh-rsa {RSAPUB}\tcomment comment\r\nnext line", + "", + + "", "comment comment", []string{"localhost"}, "next line", + }, + { + "localhost,[host2:123]\tssh-rsa {RSAPUB}\tcomment comment", + "", + + "", "comment comment", []string{"localhost", "[host2:123]"}, "", + }, + { + "@marker \tlocalhost,[host2:123]\tssh-rsa {RSAPUB}", + "", + + "marker", "", []string{"localhost", "[host2:123]"}, "", + }, + { + "@marker \tlocalhost,[host2:123]\tssh-rsa aabbccdd", + "short read", + + "", "", nil, "", + }, +} + +func TestKnownHostsParsing(t *testing.T) { + rsaPub, rsaPubSerialized := getTestKey() + + for i, test := range knownHostsParseTests { + var expectedKey PublicKey + const rsaKeyToken = "{RSAPUB}" + + input := test.input + if strings.Contains(input, rsaKeyToken) { + expectedKey = rsaPub + input = strings.Replace(test.input, rsaKeyToken, rsaPubSerialized, -1) + } + + marker, hosts, pubKey, comment, rest, err := ParseKnownHosts([]byte(input)) + if err != nil { + if len(test.err) == 0 { + t.Errorf("#%d: unexpectedly failed with %q", i, err) + } else if !strings.Contains(err.Error(), test.err) { + t.Errorf("#%d: expected error containing %q, but got %q", i, test.err, err) + } + continue + } else if len(test.err) != 0 { + t.Errorf("#%d: succeeded but expected error including %q", i, test.err) + continue + } + + if !reflect.DeepEqual(expectedKey, pubKey) { + t.Errorf("#%d: expected key %#v, but got %#v", i, expectedKey, pubKey) + } + + if marker != test.marker { + t.Errorf("#%d: expected marker %q, but got %q", i, test.marker, marker) + } + + if comment != test.comment { + t.Errorf("#%d: expected comment %q, but got %q", i, test.comment, comment) + } + + if !reflect.DeepEqual(test.hosts, hosts) { + t.Errorf("#%d: expected hosts %#v, but got %#v", i, test.hosts, hosts) + } + + if rest := string(rest); rest != test.rest { + t.Errorf("#%d: expected remaining input to be %q, but got %q", i, test.rest, rest) + } + } +} + +func TestFingerprintLegacyMD5(t *testing.T) { + pub, _ := getTestKey() + fingerprint := FingerprintLegacyMD5(pub) + want := "fb:61:6d:1a:e3:f0:95:45:3c:a0:79:be:4a:93:63:66" // ssh-keygen -lf -E md5 rsa + if fingerprint != want { + t.Errorf("got fingerprint %q want %q", fingerprint, want) + } +} + +func TestFingerprintSHA256(t *testing.T) { + pub, _ := getTestKey() + fingerprint := FingerprintSHA256(pub) + want := "SHA256:Anr3LjZK8YVpjrxu79myrW9Hrb/wpcMNpVvTq/RcBm8" // ssh-keygen -lf rsa + if fingerprint != want { + t.Errorf("got fingerprint %q want %q", fingerprint, want) + } +} diff --git a/vendor/golang.org/x/crypto/ssh/mac.go b/vendor/golang.org/x/crypto/ssh/mac.go new file mode 100644 index 000000000..c07a06285 --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/mac.go @@ -0,0 +1,61 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +// Message authentication support + +import ( + "crypto/hmac" + "crypto/sha1" + "crypto/sha256" + "hash" +) + +type macMode struct { + keySize int + etm bool + new func(key []byte) hash.Hash +} + +// truncatingMAC wraps around a hash.Hash and truncates the output digest to +// a given size. +type truncatingMAC struct { + length int + hmac hash.Hash +} + +func (t truncatingMAC) Write(data []byte) (int, error) { + return t.hmac.Write(data) +} + +func (t truncatingMAC) Sum(in []byte) []byte { + out := t.hmac.Sum(in) + return out[:len(in)+t.length] +} + +func (t truncatingMAC) Reset() { + t.hmac.Reset() +} + +func (t truncatingMAC) Size() int { + return t.length +} + +func (t truncatingMAC) BlockSize() int { return t.hmac.BlockSize() } + +var macModes = map[string]*macMode{ + "hmac-sha2-256-etm@openssh.com": {32, true, func(key []byte) hash.Hash { + return hmac.New(sha256.New, key) + }}, + "hmac-sha2-256": {32, false, func(key []byte) hash.Hash { + return hmac.New(sha256.New, key) + }}, + "hmac-sha1": {20, false, func(key []byte) hash.Hash { + return hmac.New(sha1.New, key) + }}, + "hmac-sha1-96": {20, false, func(key []byte) hash.Hash { + return truncatingMAC{12, hmac.New(sha1.New, key)} + }}, +} diff --git a/vendor/golang.org/x/crypto/ssh/mempipe_test.go b/vendor/golang.org/x/crypto/ssh/mempipe_test.go new file mode 100644 index 000000000..8697cd614 --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/mempipe_test.go @@ -0,0 +1,110 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +import ( + "io" + "sync" + "testing" +) + +// An in-memory packetConn. It is safe to call Close and writePacket +// from different goroutines. +type memTransport struct { + eof bool + pending [][]byte + write *memTransport + sync.Mutex + *sync.Cond +} + +func (t *memTransport) readPacket() ([]byte, error) { + t.Lock() + defer t.Unlock() + for { + if len(t.pending) > 0 { + r := t.pending[0] + t.pending = t.pending[1:] + return r, nil + } + if t.eof { + return nil, io.EOF + } + t.Cond.Wait() + } +} + +func (t *memTransport) closeSelf() error { + t.Lock() + defer t.Unlock() + if t.eof { + return io.EOF + } + t.eof = true + t.Cond.Broadcast() + return nil +} + +func (t *memTransport) Close() error { + err := t.write.closeSelf() + t.closeSelf() + return err +} + +func (t *memTransport) writePacket(p []byte) error { + t.write.Lock() + defer t.write.Unlock() + if t.write.eof { + return io.EOF + } + c := make([]byte, len(p)) + copy(c, p) + t.write.pending = append(t.write.pending, c) + t.write.Cond.Signal() + return nil +} + +func memPipe() (a, b packetConn) { + t1 := memTransport{} + t2 := memTransport{} + t1.write = &t2 + t2.write = &t1 + t1.Cond = sync.NewCond(&t1.Mutex) + t2.Cond = sync.NewCond(&t2.Mutex) + return &t1, &t2 +} + +func TestMemPipe(t *testing.T) { + a, b := memPipe() + if err := a.writePacket([]byte{42}); err != nil { + t.Fatalf("writePacket: %v", err) + } + if err := a.Close(); err != nil { + t.Fatal("Close: ", err) + } + p, err := b.readPacket() + if err != nil { + t.Fatal("readPacket: ", err) + } + if len(p) != 1 || p[0] != 42 { + t.Fatalf("got %v, want {42}", p) + } + p, err = b.readPacket() + if err != io.EOF { + t.Fatalf("got %v, %v, want EOF", p, err) + } +} + +func TestDoubleClose(t *testing.T) { + a, _ := memPipe() + err := a.Close() + if err != nil { + t.Errorf("Close: %v", err) + } + err = a.Close() + if err != io.EOF { + t.Errorf("expect EOF on double close.") + } +} diff --git a/vendor/golang.org/x/crypto/ssh/messages.go b/vendor/golang.org/x/crypto/ssh/messages.go new file mode 100644 index 000000000..e6ecd3afa --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/messages.go @@ -0,0 +1,758 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +import ( + "bytes" + "encoding/binary" + "errors" + "fmt" + "io" + "math/big" + "reflect" + "strconv" + "strings" +) + +// These are SSH message type numbers. They are scattered around several +// documents but many were taken from [SSH-PARAMETERS]. +const ( + msgIgnore = 2 + msgUnimplemented = 3 + msgDebug = 4 + msgNewKeys = 21 + + // Standard authentication messages + msgUserAuthSuccess = 52 + msgUserAuthBanner = 53 +) + +// SSH messages: +// +// These structures mirror the wire format of the corresponding SSH messages. +// They are marshaled using reflection with the marshal and unmarshal functions +// in this file. The only wrinkle is that a final member of type []byte with a +// ssh tag of "rest" receives the remainder of a packet when unmarshaling. + +// See RFC 4253, section 11.1. +const msgDisconnect = 1 + +// disconnectMsg is the message that signals a disconnect. It is also +// the error type returned from mux.Wait() +type disconnectMsg struct { + Reason uint32 `sshtype:"1"` + Message string + Language string +} + +func (d *disconnectMsg) Error() string { + return fmt.Sprintf("ssh: disconnect, reason %d: %s", d.Reason, d.Message) +} + +// See RFC 4253, section 7.1. +const msgKexInit = 20 + +type kexInitMsg struct { + Cookie [16]byte `sshtype:"20"` + KexAlgos []string + ServerHostKeyAlgos []string + CiphersClientServer []string + CiphersServerClient []string + MACsClientServer []string + MACsServerClient []string + CompressionClientServer []string + CompressionServerClient []string + LanguagesClientServer []string + LanguagesServerClient []string + FirstKexFollows bool + Reserved uint32 +} + +// See RFC 4253, section 8. + +// Diffie-Helman +const msgKexDHInit = 30 + +type kexDHInitMsg struct { + X *big.Int `sshtype:"30"` +} + +const msgKexECDHInit = 30 + +type kexECDHInitMsg struct { + ClientPubKey []byte `sshtype:"30"` +} + +const msgKexECDHReply = 31 + +type kexECDHReplyMsg struct { + HostKey []byte `sshtype:"31"` + EphemeralPubKey []byte + Signature []byte +} + +const msgKexDHReply = 31 + +type kexDHReplyMsg struct { + HostKey []byte `sshtype:"31"` + Y *big.Int + Signature []byte +} + +// See RFC 4253, section 10. +const msgServiceRequest = 5 + +type serviceRequestMsg struct { + Service string `sshtype:"5"` +} + +// See RFC 4253, section 10. +const msgServiceAccept = 6 + +type serviceAcceptMsg struct { + Service string `sshtype:"6"` +} + +// See RFC 4252, section 5. +const msgUserAuthRequest = 50 + +type userAuthRequestMsg struct { + User string `sshtype:"50"` + Service string + Method string + Payload []byte `ssh:"rest"` +} + +// Used for debug printouts of packets. +type userAuthSuccessMsg struct { +} + +// See RFC 4252, section 5.1 +const msgUserAuthFailure = 51 + +type userAuthFailureMsg struct { + Methods []string `sshtype:"51"` + PartialSuccess bool +} + +// See RFC 4256, section 3.2 +const msgUserAuthInfoRequest = 60 +const msgUserAuthInfoResponse = 61 + +type userAuthInfoRequestMsg struct { + User string `sshtype:"60"` + Instruction string + DeprecatedLanguage string + NumPrompts uint32 + Prompts []byte `ssh:"rest"` +} + +// See RFC 4254, section 5.1. +const msgChannelOpen = 90 + +type channelOpenMsg struct { + ChanType string `sshtype:"90"` + PeersId uint32 + PeersWindow uint32 + MaxPacketSize uint32 + TypeSpecificData []byte `ssh:"rest"` +} + +const msgChannelExtendedData = 95 +const msgChannelData = 94 + +// Used for debug print outs of packets. +type channelDataMsg struct { + PeersId uint32 `sshtype:"94"` + Length uint32 + Rest []byte `ssh:"rest"` +} + +// See RFC 4254, section 5.1. +const msgChannelOpenConfirm = 91 + +type channelOpenConfirmMsg struct { + PeersId uint32 `sshtype:"91"` + MyId uint32 + MyWindow uint32 + MaxPacketSize uint32 + TypeSpecificData []byte `ssh:"rest"` +} + +// See RFC 4254, section 5.1. +const msgChannelOpenFailure = 92 + +type channelOpenFailureMsg struct { + PeersId uint32 `sshtype:"92"` + Reason RejectionReason + Message string + Language string +} + +const msgChannelRequest = 98 + +type channelRequestMsg struct { + PeersId uint32 `sshtype:"98"` + Request string + WantReply bool + RequestSpecificData []byte `ssh:"rest"` +} + +// See RFC 4254, section 5.4. +const msgChannelSuccess = 99 + +type channelRequestSuccessMsg struct { + PeersId uint32 `sshtype:"99"` +} + +// See RFC 4254, section 5.4. +const msgChannelFailure = 100 + +type channelRequestFailureMsg struct { + PeersId uint32 `sshtype:"100"` +} + +// See RFC 4254, section 5.3 +const msgChannelClose = 97 + +type channelCloseMsg struct { + PeersId uint32 `sshtype:"97"` +} + +// See RFC 4254, section 5.3 +const msgChannelEOF = 96 + +type channelEOFMsg struct { + PeersId uint32 `sshtype:"96"` +} + +// See RFC 4254, section 4 +const msgGlobalRequest = 80 + +type globalRequestMsg struct { + Type string `sshtype:"80"` + WantReply bool + Data []byte `ssh:"rest"` +} + +// See RFC 4254, section 4 +const msgRequestSuccess = 81 + +type globalRequestSuccessMsg struct { + Data []byte `ssh:"rest" sshtype:"81"` +} + +// See RFC 4254, section 4 +const msgRequestFailure = 82 + +type globalRequestFailureMsg struct { + Data []byte `ssh:"rest" sshtype:"82"` +} + +// See RFC 4254, section 5.2 +const msgChannelWindowAdjust = 93 + +type windowAdjustMsg struct { + PeersId uint32 `sshtype:"93"` + AdditionalBytes uint32 +} + +// See RFC 4252, section 7 +const msgUserAuthPubKeyOk = 60 + +type userAuthPubKeyOkMsg struct { + Algo string `sshtype:"60"` + PubKey []byte +} + +// typeTags returns the possible type bytes for the given reflect.Type, which +// should be a struct. The possible values are separated by a '|' character. +func typeTags(structType reflect.Type) (tags []byte) { + tagStr := structType.Field(0).Tag.Get("sshtype") + + for _, tag := range strings.Split(tagStr, "|") { + i, err := strconv.Atoi(tag) + if err == nil { + tags = append(tags, byte(i)) + } + } + + return tags +} + +func fieldError(t reflect.Type, field int, problem string) error { + if problem != "" { + problem = ": " + problem + } + return fmt.Errorf("ssh: unmarshal error for field %s of type %s%s", t.Field(field).Name, t.Name(), problem) +} + +var errShortRead = errors.New("ssh: short read") + +// Unmarshal parses data in SSH wire format into a structure. The out +// argument should be a pointer to struct. If the first member of the +// struct has the "sshtype" tag set to a '|'-separated set of numbers +// in decimal, the packet must start with one of those numbers. In +// case of error, Unmarshal returns a ParseError or +// UnexpectedMessageError. +func Unmarshal(data []byte, out interface{}) error { + v := reflect.ValueOf(out).Elem() + structType := v.Type() + expectedTypes := typeTags(structType) + + var expectedType byte + if len(expectedTypes) > 0 { + expectedType = expectedTypes[0] + } + + if len(data) == 0 { + return parseError(expectedType) + } + + if len(expectedTypes) > 0 { + goodType := false + for _, e := range expectedTypes { + if e > 0 && data[0] == e { + goodType = true + break + } + } + if !goodType { + return fmt.Errorf("ssh: unexpected message type %d (expected one of %v)", data[0], expectedTypes) + } + data = data[1:] + } + + var ok bool + for i := 0; i < v.NumField(); i++ { + field := v.Field(i) + t := field.Type() + switch t.Kind() { + case reflect.Bool: + if len(data) < 1 { + return errShortRead + } + field.SetBool(data[0] != 0) + data = data[1:] + case reflect.Array: + if t.Elem().Kind() != reflect.Uint8 { + return fieldError(structType, i, "array of unsupported type") + } + if len(data) < t.Len() { + return errShortRead + } + for j, n := 0, t.Len(); j < n; j++ { + field.Index(j).Set(reflect.ValueOf(data[j])) + } + data = data[t.Len():] + case reflect.Uint64: + var u64 uint64 + if u64, data, ok = parseUint64(data); !ok { + return errShortRead + } + field.SetUint(u64) + case reflect.Uint32: + var u32 uint32 + if u32, data, ok = parseUint32(data); !ok { + return errShortRead + } + field.SetUint(uint64(u32)) + case reflect.Uint8: + if len(data) < 1 { + return errShortRead + } + field.SetUint(uint64(data[0])) + data = data[1:] + case reflect.String: + var s []byte + if s, data, ok = parseString(data); !ok { + return fieldError(structType, i, "") + } + field.SetString(string(s)) + case reflect.Slice: + switch t.Elem().Kind() { + case reflect.Uint8: + if structType.Field(i).Tag.Get("ssh") == "rest" { + field.Set(reflect.ValueOf(data)) + data = nil + } else { + var s []byte + if s, data, ok = parseString(data); !ok { + return errShortRead + } + field.Set(reflect.ValueOf(s)) + } + case reflect.String: + var nl []string + if nl, data, ok = parseNameList(data); !ok { + return errShortRead + } + field.Set(reflect.ValueOf(nl)) + default: + return fieldError(structType, i, "slice of unsupported type") + } + case reflect.Ptr: + if t == bigIntType { + var n *big.Int + if n, data, ok = parseInt(data); !ok { + return errShortRead + } + field.Set(reflect.ValueOf(n)) + } else { + return fieldError(structType, i, "pointer to unsupported type") + } + default: + return fieldError(structType, i, fmt.Sprintf("unsupported type: %v", t)) + } + } + + if len(data) != 0 { + return parseError(expectedType) + } + + return nil +} + +// Marshal serializes the message in msg to SSH wire format. The msg +// argument should be a struct or pointer to struct. If the first +// member has the "sshtype" tag set to a number in decimal, that +// number is prepended to the result. If the last of member has the +// "ssh" tag set to "rest", its contents are appended to the output. +func Marshal(msg interface{}) []byte { + out := make([]byte, 0, 64) + return marshalStruct(out, msg) +} + +func marshalStruct(out []byte, msg interface{}) []byte { + v := reflect.Indirect(reflect.ValueOf(msg)) + msgTypes := typeTags(v.Type()) + if len(msgTypes) > 0 { + out = append(out, msgTypes[0]) + } + + for i, n := 0, v.NumField(); i < n; i++ { + field := v.Field(i) + switch t := field.Type(); t.Kind() { + case reflect.Bool: + var v uint8 + if field.Bool() { + v = 1 + } + out = append(out, v) + case reflect.Array: + if t.Elem().Kind() != reflect.Uint8 { + panic(fmt.Sprintf("array of non-uint8 in field %d: %T", i, field.Interface())) + } + for j, l := 0, t.Len(); j < l; j++ { + out = append(out, uint8(field.Index(j).Uint())) + } + case reflect.Uint32: + out = appendU32(out, uint32(field.Uint())) + case reflect.Uint64: + out = appendU64(out, uint64(field.Uint())) + case reflect.Uint8: + out = append(out, uint8(field.Uint())) + case reflect.String: + s := field.String() + out = appendInt(out, len(s)) + out = append(out, s...) + case reflect.Slice: + switch t.Elem().Kind() { + case reflect.Uint8: + if v.Type().Field(i).Tag.Get("ssh") != "rest" { + out = appendInt(out, field.Len()) + } + out = append(out, field.Bytes()...) + case reflect.String: + offset := len(out) + out = appendU32(out, 0) + if n := field.Len(); n > 0 { + for j := 0; j < n; j++ { + f := field.Index(j) + if j != 0 { + out = append(out, ',') + } + out = append(out, f.String()...) + } + // overwrite length value + binary.BigEndian.PutUint32(out[offset:], uint32(len(out)-offset-4)) + } + default: + panic(fmt.Sprintf("slice of unknown type in field %d: %T", i, field.Interface())) + } + case reflect.Ptr: + if t == bigIntType { + var n *big.Int + nValue := reflect.ValueOf(&n) + nValue.Elem().Set(field) + needed := intLength(n) + oldLength := len(out) + + if cap(out)-len(out) < needed { + newOut := make([]byte, len(out), 2*(len(out)+needed)) + copy(newOut, out) + out = newOut + } + out = out[:oldLength+needed] + marshalInt(out[oldLength:], n) + } else { + panic(fmt.Sprintf("pointer to unknown type in field %d: %T", i, field.Interface())) + } + } + } + + return out +} + +var bigOne = big.NewInt(1) + +func parseString(in []byte) (out, rest []byte, ok bool) { + if len(in) < 4 { + return + } + length := binary.BigEndian.Uint32(in) + in = in[4:] + if uint32(len(in)) < length { + return + } + out = in[:length] + rest = in[length:] + ok = true + return +} + +var ( + comma = []byte{','} + emptyNameList = []string{} +) + +func parseNameList(in []byte) (out []string, rest []byte, ok bool) { + contents, rest, ok := parseString(in) + if !ok { + return + } + if len(contents) == 0 { + out = emptyNameList + return + } + parts := bytes.Split(contents, comma) + out = make([]string, len(parts)) + for i, part := range parts { + out[i] = string(part) + } + return +} + +func parseInt(in []byte) (out *big.Int, rest []byte, ok bool) { + contents, rest, ok := parseString(in) + if !ok { + return + } + out = new(big.Int) + + if len(contents) > 0 && contents[0]&0x80 == 0x80 { + // This is a negative number + notBytes := make([]byte, len(contents)) + for i := range notBytes { + notBytes[i] = ^contents[i] + } + out.SetBytes(notBytes) + out.Add(out, bigOne) + out.Neg(out) + } else { + // Positive number + out.SetBytes(contents) + } + ok = true + return +} + +func parseUint32(in []byte) (uint32, []byte, bool) { + if len(in) < 4 { + return 0, nil, false + } + return binary.BigEndian.Uint32(in), in[4:], true +} + +func parseUint64(in []byte) (uint64, []byte, bool) { + if len(in) < 8 { + return 0, nil, false + } + return binary.BigEndian.Uint64(in), in[8:], true +} + +func intLength(n *big.Int) int { + length := 4 /* length bytes */ + if n.Sign() < 0 { + nMinus1 := new(big.Int).Neg(n) + nMinus1.Sub(nMinus1, bigOne) + bitLen := nMinus1.BitLen() + if bitLen%8 == 0 { + // The number will need 0xff padding + length++ + } + length += (bitLen + 7) / 8 + } else if n.Sign() == 0 { + // A zero is the zero length string + } else { + bitLen := n.BitLen() + if bitLen%8 == 0 { + // The number will need 0x00 padding + length++ + } + length += (bitLen + 7) / 8 + } + + return length +} + +func marshalUint32(to []byte, n uint32) []byte { + binary.BigEndian.PutUint32(to, n) + return to[4:] +} + +func marshalUint64(to []byte, n uint64) []byte { + binary.BigEndian.PutUint64(to, n) + return to[8:] +} + +func marshalInt(to []byte, n *big.Int) []byte { + lengthBytes := to + to = to[4:] + length := 0 + + if n.Sign() < 0 { + // A negative number has to be converted to two's-complement + // form. So we'll subtract 1 and invert. If the + // most-significant-bit isn't set then we'll need to pad the + // beginning with 0xff in order to keep the number negative. + nMinus1 := new(big.Int).Neg(n) + nMinus1.Sub(nMinus1, bigOne) + bytes := nMinus1.Bytes() + for i := range bytes { + bytes[i] ^= 0xff + } + if len(bytes) == 0 || bytes[0]&0x80 == 0 { + to[0] = 0xff + to = to[1:] + length++ + } + nBytes := copy(to, bytes) + to = to[nBytes:] + length += nBytes + } else if n.Sign() == 0 { + // A zero is the zero length string + } else { + bytes := n.Bytes() + if len(bytes) > 0 && bytes[0]&0x80 != 0 { + // We'll have to pad this with a 0x00 in order to + // stop it looking like a negative number. + to[0] = 0 + to = to[1:] + length++ + } + nBytes := copy(to, bytes) + to = to[nBytes:] + length += nBytes + } + + lengthBytes[0] = byte(length >> 24) + lengthBytes[1] = byte(length >> 16) + lengthBytes[2] = byte(length >> 8) + lengthBytes[3] = byte(length) + return to +} + +func writeInt(w io.Writer, n *big.Int) { + length := intLength(n) + buf := make([]byte, length) + marshalInt(buf, n) + w.Write(buf) +} + +func writeString(w io.Writer, s []byte) { + var lengthBytes [4]byte + lengthBytes[0] = byte(len(s) >> 24) + lengthBytes[1] = byte(len(s) >> 16) + lengthBytes[2] = byte(len(s) >> 8) + lengthBytes[3] = byte(len(s)) + w.Write(lengthBytes[:]) + w.Write(s) +} + +func stringLength(n int) int { + return 4 + n +} + +func marshalString(to []byte, s []byte) []byte { + to[0] = byte(len(s) >> 24) + to[1] = byte(len(s) >> 16) + to[2] = byte(len(s) >> 8) + to[3] = byte(len(s)) + to = to[4:] + copy(to, s) + return to[len(s):] +} + +var bigIntType = reflect.TypeOf((*big.Int)(nil)) + +// Decode a packet into its corresponding message. +func decode(packet []byte) (interface{}, error) { + var msg interface{} + switch packet[0] { + case msgDisconnect: + msg = new(disconnectMsg) + case msgServiceRequest: + msg = new(serviceRequestMsg) + case msgServiceAccept: + msg = new(serviceAcceptMsg) + case msgKexInit: + msg = new(kexInitMsg) + case msgKexDHInit: + msg = new(kexDHInitMsg) + case msgKexDHReply: + msg = new(kexDHReplyMsg) + case msgUserAuthRequest: + msg = new(userAuthRequestMsg) + case msgUserAuthSuccess: + return new(userAuthSuccessMsg), nil + case msgUserAuthFailure: + msg = new(userAuthFailureMsg) + case msgUserAuthPubKeyOk: + msg = new(userAuthPubKeyOkMsg) + case msgGlobalRequest: + msg = new(globalRequestMsg) + case msgRequestSuccess: + msg = new(globalRequestSuccessMsg) + case msgRequestFailure: + msg = new(globalRequestFailureMsg) + case msgChannelOpen: + msg = new(channelOpenMsg) + case msgChannelData: + msg = new(channelDataMsg) + case msgChannelOpenConfirm: + msg = new(channelOpenConfirmMsg) + case msgChannelOpenFailure: + msg = new(channelOpenFailureMsg) + case msgChannelWindowAdjust: + msg = new(windowAdjustMsg) + case msgChannelEOF: + msg = new(channelEOFMsg) + case msgChannelClose: + msg = new(channelCloseMsg) + case msgChannelRequest: + msg = new(channelRequestMsg) + case msgChannelSuccess: + msg = new(channelRequestSuccessMsg) + case msgChannelFailure: + msg = new(channelRequestFailureMsg) + default: + return nil, unexpectedMessageError(0, packet[0]) + } + if err := Unmarshal(packet, msg); err != nil { + return nil, err + } + return msg, nil +} diff --git a/vendor/golang.org/x/crypto/ssh/messages_test.go b/vendor/golang.org/x/crypto/ssh/messages_test.go new file mode 100644 index 000000000..e79076412 --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/messages_test.go @@ -0,0 +1,288 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +import ( + "bytes" + "math/big" + "math/rand" + "reflect" + "testing" + "testing/quick" +) + +var intLengthTests = []struct { + val, length int +}{ + {0, 4 + 0}, + {1, 4 + 1}, + {127, 4 + 1}, + {128, 4 + 2}, + {-1, 4 + 1}, +} + +func TestIntLength(t *testing.T) { + for _, test := range intLengthTests { + v := new(big.Int).SetInt64(int64(test.val)) + length := intLength(v) + if length != test.length { + t.Errorf("For %d, got length %d but expected %d", test.val, length, test.length) + } + } +} + +type msgAllTypes struct { + Bool bool `sshtype:"21"` + Array [16]byte + Uint64 uint64 + Uint32 uint32 + Uint8 uint8 + String string + Strings []string + Bytes []byte + Int *big.Int + Rest []byte `ssh:"rest"` +} + +func (t *msgAllTypes) Generate(rand *rand.Rand, size int) reflect.Value { + m := &msgAllTypes{} + m.Bool = rand.Intn(2) == 1 + randomBytes(m.Array[:], rand) + m.Uint64 = uint64(rand.Int63n(1<<63 - 1)) + m.Uint32 = uint32(rand.Intn((1 << 31) - 1)) + m.Uint8 = uint8(rand.Intn(1 << 8)) + m.String = string(m.Array[:]) + m.Strings = randomNameList(rand) + m.Bytes = m.Array[:] + m.Int = randomInt(rand) + m.Rest = m.Array[:] + return reflect.ValueOf(m) +} + +func TestMarshalUnmarshal(t *testing.T) { + rand := rand.New(rand.NewSource(0)) + iface := &msgAllTypes{} + ty := reflect.ValueOf(iface).Type() + + n := 100 + if testing.Short() { + n = 5 + } + for j := 0; j < n; j++ { + v, ok := quick.Value(ty, rand) + if !ok { + t.Errorf("failed to create value") + break + } + + m1 := v.Elem().Interface() + m2 := iface + + marshaled := Marshal(m1) + if err := Unmarshal(marshaled, m2); err != nil { + t.Errorf("Unmarshal %#v: %s", m1, err) + break + } + + if !reflect.DeepEqual(v.Interface(), m2) { + t.Errorf("got: %#v\nwant:%#v\n%x", m2, m1, marshaled) + break + } + } +} + +func TestUnmarshalEmptyPacket(t *testing.T) { + var b []byte + var m channelRequestSuccessMsg + if err := Unmarshal(b, &m); err == nil { + t.Fatalf("unmarshal of empty slice succeeded") + } +} + +func TestUnmarshalUnexpectedPacket(t *testing.T) { + type S struct { + I uint32 `sshtype:"43"` + S string + B bool + } + + s := S{11, "hello", true} + packet := Marshal(s) + packet[0] = 42 + roundtrip := S{} + err := Unmarshal(packet, &roundtrip) + if err == nil { + t.Fatal("expected error, not nil") + } +} + +func TestMarshalPtr(t *testing.T) { + s := struct { + S string + }{"hello"} + + m1 := Marshal(s) + m2 := Marshal(&s) + if !bytes.Equal(m1, m2) { + t.Errorf("got %q, want %q for marshaled pointer", m2, m1) + } +} + +func TestBareMarshalUnmarshal(t *testing.T) { + type S struct { + I uint32 + S string + B bool + } + + s := S{42, "hello", true} + packet := Marshal(s) + roundtrip := S{} + Unmarshal(packet, &roundtrip) + + if !reflect.DeepEqual(s, roundtrip) { + t.Errorf("got %#v, want %#v", roundtrip, s) + } +} + +func TestBareMarshal(t *testing.T) { + type S2 struct { + I uint32 + } + s := S2{42} + packet := Marshal(s) + i, rest, ok := parseUint32(packet) + if len(rest) > 0 || !ok { + t.Errorf("parseInt(%q): parse error", packet) + } + if i != s.I { + t.Errorf("got %d, want %d", i, s.I) + } +} + +func TestUnmarshalShortKexInitPacket(t *testing.T) { + // This used to panic. + // Issue 11348 + packet := []byte{0x14, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xff, 0xff, 0xff, 0xff} + kim := &kexInitMsg{} + if err := Unmarshal(packet, kim); err == nil { + t.Error("truncated packet unmarshaled without error") + } +} + +func TestMarshalMultiTag(t *testing.T) { + var res struct { + A uint32 `sshtype:"1|2"` + } + + good1 := struct { + A uint32 `sshtype:"1"` + }{ + 1, + } + good2 := struct { + A uint32 `sshtype:"2"` + }{ + 1, + } + + if e := Unmarshal(Marshal(good1), &res); e != nil { + t.Errorf("error unmarshaling multipart tag: %v", e) + } + + if e := Unmarshal(Marshal(good2), &res); e != nil { + t.Errorf("error unmarshaling multipart tag: %v", e) + } + + bad1 := struct { + A uint32 `sshtype:"3"` + }{ + 1, + } + if e := Unmarshal(Marshal(bad1), &res); e == nil { + t.Errorf("bad struct unmarshaled without error") + } +} + +func randomBytes(out []byte, rand *rand.Rand) { + for i := 0; i < len(out); i++ { + out[i] = byte(rand.Int31()) + } +} + +func randomNameList(rand *rand.Rand) []string { + ret := make([]string, rand.Int31()&15) + for i := range ret { + s := make([]byte, 1+(rand.Int31()&15)) + for j := range s { + s[j] = 'a' + uint8(rand.Int31()&15) + } + ret[i] = string(s) + } + return ret +} + +func randomInt(rand *rand.Rand) *big.Int { + return new(big.Int).SetInt64(int64(int32(rand.Uint32()))) +} + +func (*kexInitMsg) Generate(rand *rand.Rand, size int) reflect.Value { + ki := &kexInitMsg{} + randomBytes(ki.Cookie[:], rand) + ki.KexAlgos = randomNameList(rand) + ki.ServerHostKeyAlgos = randomNameList(rand) + ki.CiphersClientServer = randomNameList(rand) + ki.CiphersServerClient = randomNameList(rand) + ki.MACsClientServer = randomNameList(rand) + ki.MACsServerClient = randomNameList(rand) + ki.CompressionClientServer = randomNameList(rand) + ki.CompressionServerClient = randomNameList(rand) + ki.LanguagesClientServer = randomNameList(rand) + ki.LanguagesServerClient = randomNameList(rand) + if rand.Int31()&1 == 1 { + ki.FirstKexFollows = true + } + return reflect.ValueOf(ki) +} + +func (*kexDHInitMsg) Generate(rand *rand.Rand, size int) reflect.Value { + dhi := &kexDHInitMsg{} + dhi.X = randomInt(rand) + return reflect.ValueOf(dhi) +} + +var ( + _kexInitMsg = new(kexInitMsg).Generate(rand.New(rand.NewSource(0)), 10).Elem().Interface() + _kexDHInitMsg = new(kexDHInitMsg).Generate(rand.New(rand.NewSource(0)), 10).Elem().Interface() + + _kexInit = Marshal(_kexInitMsg) + _kexDHInit = Marshal(_kexDHInitMsg) +) + +func BenchmarkMarshalKexInitMsg(b *testing.B) { + for i := 0; i < b.N; i++ { + Marshal(_kexInitMsg) + } +} + +func BenchmarkUnmarshalKexInitMsg(b *testing.B) { + m := new(kexInitMsg) + for i := 0; i < b.N; i++ { + Unmarshal(_kexInit, m) + } +} + +func BenchmarkMarshalKexDHInitMsg(b *testing.B) { + for i := 0; i < b.N; i++ { + Marshal(_kexDHInitMsg) + } +} + +func BenchmarkUnmarshalKexDHInitMsg(b *testing.B) { + m := new(kexDHInitMsg) + for i := 0; i < b.N; i++ { + Unmarshal(_kexDHInit, m) + } +} diff --git a/vendor/golang.org/x/crypto/ssh/mux.go b/vendor/golang.org/x/crypto/ssh/mux.go new file mode 100644 index 000000000..27a527c10 --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/mux.go @@ -0,0 +1,330 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +import ( + "encoding/binary" + "fmt" + "io" + "log" + "sync" + "sync/atomic" +) + +// debugMux, if set, causes messages in the connection protocol to be +// logged. +const debugMux = false + +// chanList is a thread safe channel list. +type chanList struct { + // protects concurrent access to chans + sync.Mutex + + // chans are indexed by the local id of the channel, which the + // other side should send in the PeersId field. + chans []*channel + + // This is a debugging aid: it offsets all IDs by this + // amount. This helps distinguish otherwise identical + // server/client muxes + offset uint32 +} + +// Assigns a channel ID to the given channel. +func (c *chanList) add(ch *channel) uint32 { + c.Lock() + defer c.Unlock() + for i := range c.chans { + if c.chans[i] == nil { + c.chans[i] = ch + return uint32(i) + c.offset + } + } + c.chans = append(c.chans, ch) + return uint32(len(c.chans)-1) + c.offset +} + +// getChan returns the channel for the given ID. +func (c *chanList) getChan(id uint32) *channel { + id -= c.offset + + c.Lock() + defer c.Unlock() + if id < uint32(len(c.chans)) { + return c.chans[id] + } + return nil +} + +func (c *chanList) remove(id uint32) { + id -= c.offset + c.Lock() + if id < uint32(len(c.chans)) { + c.chans[id] = nil + } + c.Unlock() +} + +// dropAll forgets all channels it knows, returning them in a slice. +func (c *chanList) dropAll() []*channel { + c.Lock() + defer c.Unlock() + var r []*channel + + for _, ch := range c.chans { + if ch == nil { + continue + } + r = append(r, ch) + } + c.chans = nil + return r +} + +// mux represents the state for the SSH connection protocol, which +// multiplexes many channels onto a single packet transport. +type mux struct { + conn packetConn + chanList chanList + + incomingChannels chan NewChannel + + globalSentMu sync.Mutex + globalResponses chan interface{} + incomingRequests chan *Request + + errCond *sync.Cond + err error +} + +// When debugging, each new chanList instantiation has a different +// offset. +var globalOff uint32 + +func (m *mux) Wait() error { + m.errCond.L.Lock() + defer m.errCond.L.Unlock() + for m.err == nil { + m.errCond.Wait() + } + return m.err +} + +// newMux returns a mux that runs over the given connection. +func newMux(p packetConn) *mux { + m := &mux{ + conn: p, + incomingChannels: make(chan NewChannel, chanSize), + globalResponses: make(chan interface{}, 1), + incomingRequests: make(chan *Request, chanSize), + errCond: newCond(), + } + if debugMux { + m.chanList.offset = atomic.AddUint32(&globalOff, 1) + } + + go m.loop() + return m +} + +func (m *mux) sendMessage(msg interface{}) error { + p := Marshal(msg) + if debugMux { + log.Printf("send global(%d): %#v", m.chanList.offset, msg) + } + return m.conn.writePacket(p) +} + +func (m *mux) SendRequest(name string, wantReply bool, payload []byte) (bool, []byte, error) { + if wantReply { + m.globalSentMu.Lock() + defer m.globalSentMu.Unlock() + } + + if err := m.sendMessage(globalRequestMsg{ + Type: name, + WantReply: wantReply, + Data: payload, + }); err != nil { + return false, nil, err + } + + if !wantReply { + return false, nil, nil + } + + msg, ok := <-m.globalResponses + if !ok { + return false, nil, io.EOF + } + switch msg := msg.(type) { + case *globalRequestFailureMsg: + return false, msg.Data, nil + case *globalRequestSuccessMsg: + return true, msg.Data, nil + default: + return false, nil, fmt.Errorf("ssh: unexpected response to request: %#v", msg) + } +} + +// ackRequest must be called after processing a global request that +// has WantReply set. +func (m *mux) ackRequest(ok bool, data []byte) error { + if ok { + return m.sendMessage(globalRequestSuccessMsg{Data: data}) + } + return m.sendMessage(globalRequestFailureMsg{Data: data}) +} + +func (m *mux) Close() error { + return m.conn.Close() +} + +// loop runs the connection machine. It will process packets until an +// error is encountered. To synchronize on loop exit, use mux.Wait. +func (m *mux) loop() { + var err error + for err == nil { + err = m.onePacket() + } + + for _, ch := range m.chanList.dropAll() { + ch.close() + } + + close(m.incomingChannels) + close(m.incomingRequests) + close(m.globalResponses) + + m.conn.Close() + + m.errCond.L.Lock() + m.err = err + m.errCond.Broadcast() + m.errCond.L.Unlock() + + if debugMux { + log.Println("loop exit", err) + } +} + +// onePacket reads and processes one packet. +func (m *mux) onePacket() error { + packet, err := m.conn.readPacket() + if err != nil { + return err + } + + if debugMux { + if packet[0] == msgChannelData || packet[0] == msgChannelExtendedData { + log.Printf("decoding(%d): data packet - %d bytes", m.chanList.offset, len(packet)) + } else { + p, _ := decode(packet) + log.Printf("decoding(%d): %d %#v - %d bytes", m.chanList.offset, packet[0], p, len(packet)) + } + } + + switch packet[0] { + case msgChannelOpen: + return m.handleChannelOpen(packet) + case msgGlobalRequest, msgRequestSuccess, msgRequestFailure: + return m.handleGlobalPacket(packet) + } + + // assume a channel packet. + if len(packet) < 5 { + return parseError(packet[0]) + } + id := binary.BigEndian.Uint32(packet[1:]) + ch := m.chanList.getChan(id) + if ch == nil { + return fmt.Errorf("ssh: invalid channel %d", id) + } + + return ch.handlePacket(packet) +} + +func (m *mux) handleGlobalPacket(packet []byte) error { + msg, err := decode(packet) + if err != nil { + return err + } + + switch msg := msg.(type) { + case *globalRequestMsg: + m.incomingRequests <- &Request{ + Type: msg.Type, + WantReply: msg.WantReply, + Payload: msg.Data, + mux: m, + } + case *globalRequestSuccessMsg, *globalRequestFailureMsg: + m.globalResponses <- msg + default: + panic(fmt.Sprintf("not a global message %#v", msg)) + } + + return nil +} + +// handleChannelOpen schedules a channel to be Accept()ed. +func (m *mux) handleChannelOpen(packet []byte) error { + var msg channelOpenMsg + if err := Unmarshal(packet, &msg); err != nil { + return err + } + + if msg.MaxPacketSize < minPacketLength || msg.MaxPacketSize > 1<<31 { + failMsg := channelOpenFailureMsg{ + PeersId: msg.PeersId, + Reason: ConnectionFailed, + Message: "invalid request", + Language: "en_US.UTF-8", + } + return m.sendMessage(failMsg) + } + + c := m.newChannel(msg.ChanType, channelInbound, msg.TypeSpecificData) + c.remoteId = msg.PeersId + c.maxRemotePayload = msg.MaxPacketSize + c.remoteWin.add(msg.PeersWindow) + m.incomingChannels <- c + return nil +} + +func (m *mux) OpenChannel(chanType string, extra []byte) (Channel, <-chan *Request, error) { + ch, err := m.openChannel(chanType, extra) + if err != nil { + return nil, nil, err + } + + return ch, ch.incomingRequests, nil +} + +func (m *mux) openChannel(chanType string, extra []byte) (*channel, error) { + ch := m.newChannel(chanType, channelOutbound, extra) + + ch.maxIncomingPayload = channelMaxPacket + + open := channelOpenMsg{ + ChanType: chanType, + PeersWindow: ch.myWindow, + MaxPacketSize: ch.maxIncomingPayload, + TypeSpecificData: extra, + PeersId: ch.localId, + } + if err := m.sendMessage(open); err != nil { + return nil, err + } + + switch msg := (<-ch.msg).(type) { + case *channelOpenConfirmMsg: + return ch, nil + case *channelOpenFailureMsg: + return nil, &OpenChannelError{msg.Reason, msg.Message} + default: + return nil, fmt.Errorf("ssh: unexpected packet in response to channel open: %T", msg) + } +} diff --git a/vendor/golang.org/x/crypto/ssh/mux_test.go b/vendor/golang.org/x/crypto/ssh/mux_test.go new file mode 100644 index 000000000..25d2181d6 --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/mux_test.go @@ -0,0 +1,505 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +import ( + "io" + "io/ioutil" + "sync" + "testing" +) + +func muxPair() (*mux, *mux) { + a, b := memPipe() + + s := newMux(a) + c := newMux(b) + + return s, c +} + +// Returns both ends of a channel, and the mux for the the 2nd +// channel. +func channelPair(t *testing.T) (*channel, *channel, *mux) { + c, s := muxPair() + + res := make(chan *channel, 1) + go func() { + newCh, ok := <-s.incomingChannels + if !ok { + t.Fatalf("No incoming channel") + } + if newCh.ChannelType() != "chan" { + t.Fatalf("got type %q want chan", newCh.ChannelType()) + } + ch, _, err := newCh.Accept() + if err != nil { + t.Fatalf("Accept %v", err) + } + res <- ch.(*channel) + }() + + ch, err := c.openChannel("chan", nil) + if err != nil { + t.Fatalf("OpenChannel: %v", err) + } + + return <-res, ch, c +} + +// Test that stderr and stdout can be addressed from different +// goroutines. This is intended for use with the race detector. +func TestMuxChannelExtendedThreadSafety(t *testing.T) { + writer, reader, mux := channelPair(t) + defer writer.Close() + defer reader.Close() + defer mux.Close() + + var wr, rd sync.WaitGroup + magic := "hello world" + + wr.Add(2) + go func() { + io.WriteString(writer, magic) + wr.Done() + }() + go func() { + io.WriteString(writer.Stderr(), magic) + wr.Done() + }() + + rd.Add(2) + go func() { + c, err := ioutil.ReadAll(reader) + if string(c) != magic { + t.Fatalf("stdout read got %q, want %q (error %s)", c, magic, err) + } + rd.Done() + }() + go func() { + c, err := ioutil.ReadAll(reader.Stderr()) + if string(c) != magic { + t.Fatalf("stderr read got %q, want %q (error %s)", c, magic, err) + } + rd.Done() + }() + + wr.Wait() + writer.CloseWrite() + rd.Wait() +} + +func TestMuxReadWrite(t *testing.T) { + s, c, mux := channelPair(t) + defer s.Close() + defer c.Close() + defer mux.Close() + + magic := "hello world" + magicExt := "hello stderr" + go func() { + _, err := s.Write([]byte(magic)) + if err != nil { + t.Fatalf("Write: %v", err) + } + _, err = s.Extended(1).Write([]byte(magicExt)) + if err != nil { + t.Fatalf("Write: %v", err) + } + err = s.Close() + if err != nil { + t.Fatalf("Close: %v", err) + } + }() + + var buf [1024]byte + n, err := c.Read(buf[:]) + if err != nil { + t.Fatalf("server Read: %v", err) + } + got := string(buf[:n]) + if got != magic { + t.Fatalf("server: got %q want %q", got, magic) + } + + n, err = c.Extended(1).Read(buf[:]) + if err != nil { + t.Fatalf("server Read: %v", err) + } + + got = string(buf[:n]) + if got != magicExt { + t.Fatalf("server: got %q want %q", got, magic) + } +} + +func TestMuxChannelOverflow(t *testing.T) { + reader, writer, mux := channelPair(t) + defer reader.Close() + defer writer.Close() + defer mux.Close() + + wDone := make(chan int, 1) + go func() { + if _, err := writer.Write(make([]byte, channelWindowSize)); err != nil { + t.Errorf("could not fill window: %v", err) + } + writer.Write(make([]byte, 1)) + wDone <- 1 + }() + writer.remoteWin.waitWriterBlocked() + + // Send 1 byte. + packet := make([]byte, 1+4+4+1) + packet[0] = msgChannelData + marshalUint32(packet[1:], writer.remoteId) + marshalUint32(packet[5:], uint32(1)) + packet[9] = 42 + + if err := writer.mux.conn.writePacket(packet); err != nil { + t.Errorf("could not send packet") + } + if _, err := reader.SendRequest("hello", true, nil); err == nil { + t.Errorf("SendRequest succeeded.") + } + <-wDone +} + +func TestMuxChannelCloseWriteUnblock(t *testing.T) { + reader, writer, mux := channelPair(t) + defer reader.Close() + defer writer.Close() + defer mux.Close() + + wDone := make(chan int, 1) + go func() { + if _, err := writer.Write(make([]byte, channelWindowSize)); err != nil { + t.Errorf("could not fill window: %v", err) + } + if _, err := writer.Write(make([]byte, 1)); err != io.EOF { + t.Errorf("got %v, want EOF for unblock write", err) + } + wDone <- 1 + }() + + writer.remoteWin.waitWriterBlocked() + reader.Close() + <-wDone +} + +func TestMuxConnectionCloseWriteUnblock(t *testing.T) { + reader, writer, mux := channelPair(t) + defer reader.Close() + defer writer.Close() + defer mux.Close() + + wDone := make(chan int, 1) + go func() { + if _, err := writer.Write(make([]byte, channelWindowSize)); err != nil { + t.Errorf("could not fill window: %v", err) + } + if _, err := writer.Write(make([]byte, 1)); err != io.EOF { + t.Errorf("got %v, want EOF for unblock write", err) + } + wDone <- 1 + }() + + writer.remoteWin.waitWriterBlocked() + mux.Close() + <-wDone +} + +func TestMuxReject(t *testing.T) { + client, server := muxPair() + defer server.Close() + defer client.Close() + + go func() { + ch, ok := <-server.incomingChannels + if !ok { + t.Fatalf("Accept") + } + if ch.ChannelType() != "ch" || string(ch.ExtraData()) != "extra" { + t.Fatalf("unexpected channel: %q, %q", ch.ChannelType(), ch.ExtraData()) + } + ch.Reject(RejectionReason(42), "message") + }() + + ch, err := client.openChannel("ch", []byte("extra")) + if ch != nil { + t.Fatal("openChannel not rejected") + } + + ocf, ok := err.(*OpenChannelError) + if !ok { + t.Errorf("got %#v want *OpenChannelError", err) + } else if ocf.Reason != 42 || ocf.Message != "message" { + t.Errorf("got %#v, want {Reason: 42, Message: %q}", ocf, "message") + } + + want := "ssh: rejected: unknown reason 42 (message)" + if err.Error() != want { + t.Errorf("got %q, want %q", err.Error(), want) + } +} + +func TestMuxChannelRequest(t *testing.T) { + client, server, mux := channelPair(t) + defer server.Close() + defer client.Close() + defer mux.Close() + + var received int + var wg sync.WaitGroup + wg.Add(1) + go func() { + for r := range server.incomingRequests { + received++ + r.Reply(r.Type == "yes", nil) + } + wg.Done() + }() + _, err := client.SendRequest("yes", false, nil) + if err != nil { + t.Fatalf("SendRequest: %v", err) + } + ok, err := client.SendRequest("yes", true, nil) + if err != nil { + t.Fatalf("SendRequest: %v", err) + } + + if !ok { + t.Errorf("SendRequest(yes): %v", ok) + + } + + ok, err = client.SendRequest("no", true, nil) + if err != nil { + t.Fatalf("SendRequest: %v", err) + } + if ok { + t.Errorf("SendRequest(no): %v", ok) + + } + + client.Close() + wg.Wait() + + if received != 3 { + t.Errorf("got %d requests, want %d", received, 3) + } +} + +func TestMuxGlobalRequest(t *testing.T) { + clientMux, serverMux := muxPair() + defer serverMux.Close() + defer clientMux.Close() + + var seen bool + go func() { + for r := range serverMux.incomingRequests { + seen = seen || r.Type == "peek" + if r.WantReply { + err := r.Reply(r.Type == "yes", + append([]byte(r.Type), r.Payload...)) + if err != nil { + t.Errorf("AckRequest: %v", err) + } + } + } + }() + + _, _, err := clientMux.SendRequest("peek", false, nil) + if err != nil { + t.Errorf("SendRequest: %v", err) + } + + ok, data, err := clientMux.SendRequest("yes", true, []byte("a")) + if !ok || string(data) != "yesa" || err != nil { + t.Errorf("SendRequest(\"yes\", true, \"a\"): %v %v %v", + ok, data, err) + } + if ok, data, err := clientMux.SendRequest("yes", true, []byte("a")); !ok || string(data) != "yesa" || err != nil { + t.Errorf("SendRequest(\"yes\", true, \"a\"): %v %v %v", + ok, data, err) + } + + if ok, data, err := clientMux.SendRequest("no", true, []byte("a")); ok || string(data) != "noa" || err != nil { + t.Errorf("SendRequest(\"no\", true, \"a\"): %v %v %v", + ok, data, err) + } + + if !seen { + t.Errorf("never saw 'peek' request") + } +} + +func TestMuxGlobalRequestUnblock(t *testing.T) { + clientMux, serverMux := muxPair() + defer serverMux.Close() + defer clientMux.Close() + + result := make(chan error, 1) + go func() { + _, _, err := clientMux.SendRequest("hello", true, nil) + result <- err + }() + + <-serverMux.incomingRequests + serverMux.conn.Close() + err := <-result + + if err != io.EOF { + t.Errorf("want EOF, got %v", io.EOF) + } +} + +func TestMuxChannelRequestUnblock(t *testing.T) { + a, b, connB := channelPair(t) + defer a.Close() + defer b.Close() + defer connB.Close() + + result := make(chan error, 1) + go func() { + _, err := a.SendRequest("hello", true, nil) + result <- err + }() + + <-b.incomingRequests + connB.conn.Close() + err := <-result + + if err != io.EOF { + t.Errorf("want EOF, got %v", err) + } +} + +func TestMuxCloseChannel(t *testing.T) { + r, w, mux := channelPair(t) + defer mux.Close() + defer r.Close() + defer w.Close() + + result := make(chan error, 1) + go func() { + var b [1024]byte + _, err := r.Read(b[:]) + result <- err + }() + if err := w.Close(); err != nil { + t.Errorf("w.Close: %v", err) + } + + if _, err := w.Write([]byte("hello")); err != io.EOF { + t.Errorf("got err %v, want io.EOF after Close", err) + } + + if err := <-result; err != io.EOF { + t.Errorf("got %v (%T), want io.EOF", err, err) + } +} + +func TestMuxCloseWriteChannel(t *testing.T) { + r, w, mux := channelPair(t) + defer mux.Close() + + result := make(chan error, 1) + go func() { + var b [1024]byte + _, err := r.Read(b[:]) + result <- err + }() + if err := w.CloseWrite(); err != nil { + t.Errorf("w.CloseWrite: %v", err) + } + + if _, err := w.Write([]byte("hello")); err != io.EOF { + t.Errorf("got err %v, want io.EOF after CloseWrite", err) + } + + if err := <-result; err != io.EOF { + t.Errorf("got %v (%T), want io.EOF", err, err) + } +} + +func TestMuxInvalidRecord(t *testing.T) { + a, b := muxPair() + defer a.Close() + defer b.Close() + + packet := make([]byte, 1+4+4+1) + packet[0] = msgChannelData + marshalUint32(packet[1:], 29348723 /* invalid channel id */) + marshalUint32(packet[5:], 1) + packet[9] = 42 + + a.conn.writePacket(packet) + go a.SendRequest("hello", false, nil) + // 'a' wrote an invalid packet, so 'b' has exited. + req, ok := <-b.incomingRequests + if ok { + t.Errorf("got request %#v after receiving invalid packet", req) + } +} + +func TestZeroWindowAdjust(t *testing.T) { + a, b, mux := channelPair(t) + defer a.Close() + defer b.Close() + defer mux.Close() + + go func() { + io.WriteString(a, "hello") + // bogus adjust. + a.sendMessage(windowAdjustMsg{}) + io.WriteString(a, "world") + a.Close() + }() + + want := "helloworld" + c, _ := ioutil.ReadAll(b) + if string(c) != want { + t.Errorf("got %q want %q", c, want) + } +} + +func TestMuxMaxPacketSize(t *testing.T) { + a, b, mux := channelPair(t) + defer a.Close() + defer b.Close() + defer mux.Close() + + large := make([]byte, a.maxRemotePayload+1) + packet := make([]byte, 1+4+4+1+len(large)) + packet[0] = msgChannelData + marshalUint32(packet[1:], a.remoteId) + marshalUint32(packet[5:], uint32(len(large))) + packet[9] = 42 + + if err := a.mux.conn.writePacket(packet); err != nil { + t.Errorf("could not send packet") + } + + go a.SendRequest("hello", false, nil) + + _, ok := <-b.incomingRequests + if ok { + t.Errorf("connection still alive after receiving large packet.") + } +} + +// Don't ship code with debug=true. +func TestDebug(t *testing.T) { + if debugMux { + t.Error("mux debug switched on") + } + if debugHandshake { + t.Error("handshake debug switched on") + } + if debugTransport { + t.Error("transport debug switched on") + } +} diff --git a/vendor/golang.org/x/crypto/ssh/server.go b/vendor/golang.org/x/crypto/ssh/server.go new file mode 100644 index 000000000..8a78b7ca0 --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/server.go @@ -0,0 +1,563 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +import ( + "bytes" + "errors" + "fmt" + "io" + "net" + "strings" +) + +// The Permissions type holds fine-grained permissions that are +// specific to a user or a specific authentication method for a user. +// The Permissions value for a successful authentication attempt is +// available in ServerConn, so it can be used to pass information from +// the user-authentication phase to the application layer. +type Permissions struct { + // CriticalOptions indicate restrictions to the default + // permissions, and are typically used in conjunction with + // user certificates. The standard for SSH certificates + // defines "force-command" (only allow the given command to + // execute) and "source-address" (only allow connections from + // the given address). The SSH package currently only enforces + // the "source-address" critical option. It is up to server + // implementations to enforce other critical options, such as + // "force-command", by checking them after the SSH handshake + // is successful. In general, SSH servers should reject + // connections that specify critical options that are unknown + // or not supported. + CriticalOptions map[string]string + + // Extensions are extra functionality that the server may + // offer on authenticated connections. Lack of support for an + // extension does not preclude authenticating a user. Common + // extensions are "permit-agent-forwarding", + // "permit-X11-forwarding". The Go SSH library currently does + // not act on any extension, and it is up to server + // implementations to honor them. Extensions can be used to + // pass data from the authentication callbacks to the server + // application layer. + Extensions map[string]string +} + +// ServerConfig holds server specific configuration data. +type ServerConfig struct { + // Config contains configuration shared between client and server. + Config + + hostKeys []Signer + + // NoClientAuth is true if clients are allowed to connect without + // authenticating. + NoClientAuth bool + + // MaxAuthTries specifies the maximum number of authentication attempts + // permitted per connection. If set to a negative number, the number of + // attempts are unlimited. If set to zero, the number of attempts are limited + // to 6. + MaxAuthTries int + + // PasswordCallback, if non-nil, is called when a user + // attempts to authenticate using a password. + PasswordCallback func(conn ConnMetadata, password []byte) (*Permissions, error) + + // PublicKeyCallback, if non-nil, is called when a client + // offers a public key for authentication. It must return a nil error + // if the given public key can be used to authenticate the + // given user. For example, see CertChecker.Authenticate. A + // call to this function does not guarantee that the key + // offered is in fact used to authenticate. To record any data + // depending on the public key, store it inside a + // Permissions.Extensions entry. + PublicKeyCallback func(conn ConnMetadata, key PublicKey) (*Permissions, error) + + // KeyboardInteractiveCallback, if non-nil, is called when + // keyboard-interactive authentication is selected (RFC + // 4256). The client object's Challenge function should be + // used to query the user. The callback may offer multiple + // Challenge rounds. To avoid information leaks, the client + // should be presented a challenge even if the user is + // unknown. + KeyboardInteractiveCallback func(conn ConnMetadata, client KeyboardInteractiveChallenge) (*Permissions, error) + + // AuthLogCallback, if non-nil, is called to log all authentication + // attempts. + AuthLogCallback func(conn ConnMetadata, method string, err error) + + // ServerVersion is the version identification string to announce in + // the public handshake. + // If empty, a reasonable default is used. + // Note that RFC 4253 section 4.2 requires that this string start with + // "SSH-2.0-". + ServerVersion string +} + +// AddHostKey adds a private key as a host key. If an existing host +// key exists with the same algorithm, it is overwritten. Each server +// config must have at least one host key. +func (s *ServerConfig) AddHostKey(key Signer) { + for i, k := range s.hostKeys { + if k.PublicKey().Type() == key.PublicKey().Type() { + s.hostKeys[i] = key + return + } + } + + s.hostKeys = append(s.hostKeys, key) +} + +// cachedPubKey contains the results of querying whether a public key is +// acceptable for a user. +type cachedPubKey struct { + user string + pubKeyData []byte + result error + perms *Permissions +} + +const maxCachedPubKeys = 16 + +// pubKeyCache caches tests for public keys. Since SSH clients +// will query whether a public key is acceptable before attempting to +// authenticate with it, we end up with duplicate queries for public +// key validity. The cache only applies to a single ServerConn. +type pubKeyCache struct { + keys []cachedPubKey +} + +// get returns the result for a given user/algo/key tuple. +func (c *pubKeyCache) get(user string, pubKeyData []byte) (cachedPubKey, bool) { + for _, k := range c.keys { + if k.user == user && bytes.Equal(k.pubKeyData, pubKeyData) { + return k, true + } + } + return cachedPubKey{}, false +} + +// add adds the given tuple to the cache. +func (c *pubKeyCache) add(candidate cachedPubKey) { + if len(c.keys) < maxCachedPubKeys { + c.keys = append(c.keys, candidate) + } +} + +// ServerConn is an authenticated SSH connection, as seen from the +// server +type ServerConn struct { + Conn + + // If the succeeding authentication callback returned a + // non-nil Permissions pointer, it is stored here. + Permissions *Permissions +} + +// NewServerConn starts a new SSH server with c as the underlying +// transport. It starts with a handshake and, if the handshake is +// unsuccessful, it closes the connection and returns an error. The +// Request and NewChannel channels must be serviced, or the connection +// will hang. +func NewServerConn(c net.Conn, config *ServerConfig) (*ServerConn, <-chan NewChannel, <-chan *Request, error) { + fullConf := *config + fullConf.SetDefaults() + if fullConf.MaxAuthTries == 0 { + fullConf.MaxAuthTries = 6 + } + + s := &connection{ + sshConn: sshConn{conn: c}, + } + perms, err := s.serverHandshake(&fullConf) + if err != nil { + c.Close() + return nil, nil, nil, err + } + return &ServerConn{s, perms}, s.mux.incomingChannels, s.mux.incomingRequests, nil +} + +// signAndMarshal signs the data with the appropriate algorithm, +// and serializes the result in SSH wire format. +func signAndMarshal(k Signer, rand io.Reader, data []byte) ([]byte, error) { + sig, err := k.Sign(rand, data) + if err != nil { + return nil, err + } + + return Marshal(sig), nil +} + +// handshake performs key exchange and user authentication. +func (s *connection) serverHandshake(config *ServerConfig) (*Permissions, error) { + if len(config.hostKeys) == 0 { + return nil, errors.New("ssh: server has no host keys") + } + + if !config.NoClientAuth && config.PasswordCallback == nil && config.PublicKeyCallback == nil && config.KeyboardInteractiveCallback == nil { + return nil, errors.New("ssh: no authentication methods configured but NoClientAuth is also false") + } + + if config.ServerVersion != "" { + s.serverVersion = []byte(config.ServerVersion) + } else { + s.serverVersion = []byte(packageVersion) + } + var err error + s.clientVersion, err = exchangeVersions(s.sshConn.conn, s.serverVersion) + if err != nil { + return nil, err + } + + tr := newTransport(s.sshConn.conn, config.Rand, false /* not client */) + s.transport = newServerTransport(tr, s.clientVersion, s.serverVersion, config) + + if err := s.transport.waitSession(); err != nil { + return nil, err + } + + // We just did the key change, so the session ID is established. + s.sessionID = s.transport.getSessionID() + + var packet []byte + if packet, err = s.transport.readPacket(); err != nil { + return nil, err + } + + var serviceRequest serviceRequestMsg + if err = Unmarshal(packet, &serviceRequest); err != nil { + return nil, err + } + if serviceRequest.Service != serviceUserAuth { + return nil, errors.New("ssh: requested service '" + serviceRequest.Service + "' before authenticating") + } + serviceAccept := serviceAcceptMsg{ + Service: serviceUserAuth, + } + if err := s.transport.writePacket(Marshal(&serviceAccept)); err != nil { + return nil, err + } + + perms, err := s.serverAuthenticate(config) + if err != nil { + return nil, err + } + s.mux = newMux(s.transport) + return perms, err +} + +func isAcceptableAlgo(algo string) bool { + switch algo { + case KeyAlgoRSA, KeyAlgoDSA, KeyAlgoECDSA256, KeyAlgoECDSA384, KeyAlgoECDSA521, KeyAlgoED25519, + CertAlgoRSAv01, CertAlgoDSAv01, CertAlgoECDSA256v01, CertAlgoECDSA384v01, CertAlgoECDSA521v01: + return true + } + return false +} + +func checkSourceAddress(addr net.Addr, sourceAddrs string) error { + if addr == nil { + return errors.New("ssh: no address known for client, but source-address match required") + } + + tcpAddr, ok := addr.(*net.TCPAddr) + if !ok { + return fmt.Errorf("ssh: remote address %v is not an TCP address when checking source-address match", addr) + } + + for _, sourceAddr := range strings.Split(sourceAddrs, ",") { + if allowedIP := net.ParseIP(sourceAddr); allowedIP != nil { + if allowedIP.Equal(tcpAddr.IP) { + return nil + } + } else { + _, ipNet, err := net.ParseCIDR(sourceAddr) + if err != nil { + return fmt.Errorf("ssh: error parsing source-address restriction %q: %v", sourceAddr, err) + } + + if ipNet.Contains(tcpAddr.IP) { + return nil + } + } + } + + return fmt.Errorf("ssh: remote address %v is not allowed because of source-address restriction", addr) +} + +// ServerAuthError implements the error interface. It appends any authentication +// errors that may occur, and is returned if all of the authentication methods +// provided by the user failed to authenticate. +type ServerAuthError struct { + // Errors contains authentication errors returned by the authentication + // callback methods. + Errors []error +} + +func (l ServerAuthError) Error() string { + var errs []string + for _, err := range l.Errors { + errs = append(errs, err.Error()) + } + return "[" + strings.Join(errs, ", ") + "]" +} + +func (s *connection) serverAuthenticate(config *ServerConfig) (*Permissions, error) { + sessionID := s.transport.getSessionID() + var cache pubKeyCache + var perms *Permissions + + authFailures := 0 + var authErrs []error + +userAuthLoop: + for { + if authFailures >= config.MaxAuthTries && config.MaxAuthTries > 0 { + discMsg := &disconnectMsg{ + Reason: 2, + Message: "too many authentication failures", + } + + if err := s.transport.writePacket(Marshal(discMsg)); err != nil { + return nil, err + } + + return nil, discMsg + } + + var userAuthReq userAuthRequestMsg + if packet, err := s.transport.readPacket(); err != nil { + if err == io.EOF { + return nil, &ServerAuthError{Errors: authErrs} + } + return nil, err + } else if err = Unmarshal(packet, &userAuthReq); err != nil { + return nil, err + } + + if userAuthReq.Service != serviceSSH { + return nil, errors.New("ssh: client attempted to negotiate for unknown service: " + userAuthReq.Service) + } + + s.user = userAuthReq.User + perms = nil + authErr := errors.New("no auth passed yet") + + switch userAuthReq.Method { + case "none": + if config.NoClientAuth { + authErr = nil + } + + // allow initial attempt of 'none' without penalty + if authFailures == 0 { + authFailures-- + } + case "password": + if config.PasswordCallback == nil { + authErr = errors.New("ssh: password auth not configured") + break + } + payload := userAuthReq.Payload + if len(payload) < 1 || payload[0] != 0 { + return nil, parseError(msgUserAuthRequest) + } + payload = payload[1:] + password, payload, ok := parseString(payload) + if !ok || len(payload) > 0 { + return nil, parseError(msgUserAuthRequest) + } + + perms, authErr = config.PasswordCallback(s, password) + case "keyboard-interactive": + if config.KeyboardInteractiveCallback == nil { + authErr = errors.New("ssh: keyboard-interactive auth not configubred") + break + } + + prompter := &sshClientKeyboardInteractive{s} + perms, authErr = config.KeyboardInteractiveCallback(s, prompter.Challenge) + case "publickey": + if config.PublicKeyCallback == nil { + authErr = errors.New("ssh: publickey auth not configured") + break + } + payload := userAuthReq.Payload + if len(payload) < 1 { + return nil, parseError(msgUserAuthRequest) + } + isQuery := payload[0] == 0 + payload = payload[1:] + algoBytes, payload, ok := parseString(payload) + if !ok { + return nil, parseError(msgUserAuthRequest) + } + algo := string(algoBytes) + if !isAcceptableAlgo(algo) { + authErr = fmt.Errorf("ssh: algorithm %q not accepted", algo) + break + } + + pubKeyData, payload, ok := parseString(payload) + if !ok { + return nil, parseError(msgUserAuthRequest) + } + + pubKey, err := ParsePublicKey(pubKeyData) + if err != nil { + return nil, err + } + + candidate, ok := cache.get(s.user, pubKeyData) + if !ok { + candidate.user = s.user + candidate.pubKeyData = pubKeyData + candidate.perms, candidate.result = config.PublicKeyCallback(s, pubKey) + if candidate.result == nil && candidate.perms != nil && candidate.perms.CriticalOptions != nil && candidate.perms.CriticalOptions[sourceAddressCriticalOption] != "" { + candidate.result = checkSourceAddress( + s.RemoteAddr(), + candidate.perms.CriticalOptions[sourceAddressCriticalOption]) + } + cache.add(candidate) + } + + if isQuery { + // The client can query if the given public key + // would be okay. + + if len(payload) > 0 { + return nil, parseError(msgUserAuthRequest) + } + + if candidate.result == nil { + okMsg := userAuthPubKeyOkMsg{ + Algo: algo, + PubKey: pubKeyData, + } + if err = s.transport.writePacket(Marshal(&okMsg)); err != nil { + return nil, err + } + continue userAuthLoop + } + authErr = candidate.result + } else { + sig, payload, ok := parseSignature(payload) + if !ok || len(payload) > 0 { + return nil, parseError(msgUserAuthRequest) + } + // Ensure the public key algo and signature algo + // are supported. Compare the private key + // algorithm name that corresponds to algo with + // sig.Format. This is usually the same, but + // for certs, the names differ. + if !isAcceptableAlgo(sig.Format) { + break + } + signedData := buildDataSignedForAuth(sessionID, userAuthReq, algoBytes, pubKeyData) + + if err := pubKey.Verify(signedData, sig); err != nil { + return nil, err + } + + authErr = candidate.result + perms = candidate.perms + } + default: + authErr = fmt.Errorf("ssh: unknown method %q", userAuthReq.Method) + } + + authErrs = append(authErrs, authErr) + + if config.AuthLogCallback != nil { + config.AuthLogCallback(s, userAuthReq.Method, authErr) + } + + if authErr == nil { + break userAuthLoop + } + + authFailures++ + + var failureMsg userAuthFailureMsg + if config.PasswordCallback != nil { + failureMsg.Methods = append(failureMsg.Methods, "password") + } + if config.PublicKeyCallback != nil { + failureMsg.Methods = append(failureMsg.Methods, "publickey") + } + if config.KeyboardInteractiveCallback != nil { + failureMsg.Methods = append(failureMsg.Methods, "keyboard-interactive") + } + + if len(failureMsg.Methods) == 0 { + return nil, errors.New("ssh: no authentication methods configured but NoClientAuth is also false") + } + + if err := s.transport.writePacket(Marshal(&failureMsg)); err != nil { + return nil, err + } + } + + if err := s.transport.writePacket([]byte{msgUserAuthSuccess}); err != nil { + return nil, err + } + return perms, nil +} + +// sshClientKeyboardInteractive implements a ClientKeyboardInteractive by +// asking the client on the other side of a ServerConn. +type sshClientKeyboardInteractive struct { + *connection +} + +func (c *sshClientKeyboardInteractive) Challenge(user, instruction string, questions []string, echos []bool) (answers []string, err error) { + if len(questions) != len(echos) { + return nil, errors.New("ssh: echos and questions must have equal length") + } + + var prompts []byte + for i := range questions { + prompts = appendString(prompts, questions[i]) + prompts = appendBool(prompts, echos[i]) + } + + if err := c.transport.writePacket(Marshal(&userAuthInfoRequestMsg{ + Instruction: instruction, + NumPrompts: uint32(len(questions)), + Prompts: prompts, + })); err != nil { + return nil, err + } + + packet, err := c.transport.readPacket() + if err != nil { + return nil, err + } + if packet[0] != msgUserAuthInfoResponse { + return nil, unexpectedMessageError(msgUserAuthInfoResponse, packet[0]) + } + packet = packet[1:] + + n, packet, ok := parseUint32(packet) + if !ok || int(n) != len(questions) { + return nil, parseError(msgUserAuthInfoResponse) + } + + for i := uint32(0); i < n; i++ { + ans, rest, ok := parseString(packet) + if !ok { + return nil, parseError(msgUserAuthInfoResponse) + } + + answers = append(answers, string(ans)) + packet = rest + } + if len(packet) != 0 { + return nil, errors.New("ssh: junk at end of message") + } + + return answers, nil +} diff --git a/vendor/golang.org/x/crypto/ssh/session.go b/vendor/golang.org/x/crypto/ssh/session.go new file mode 100644 index 000000000..cc06e03f5 --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/session.go @@ -0,0 +1,647 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +// Session implements an interactive session described in +// "RFC 4254, section 6". + +import ( + "bytes" + "encoding/binary" + "errors" + "fmt" + "io" + "io/ioutil" + "sync" +) + +type Signal string + +// POSIX signals as listed in RFC 4254 Section 6.10. +const ( + SIGABRT Signal = "ABRT" + SIGALRM Signal = "ALRM" + SIGFPE Signal = "FPE" + SIGHUP Signal = "HUP" + SIGILL Signal = "ILL" + SIGINT Signal = "INT" + SIGKILL Signal = "KILL" + SIGPIPE Signal = "PIPE" + SIGQUIT Signal = "QUIT" + SIGSEGV Signal = "SEGV" + SIGTERM Signal = "TERM" + SIGUSR1 Signal = "USR1" + SIGUSR2 Signal = "USR2" +) + +var signals = map[Signal]int{ + SIGABRT: 6, + SIGALRM: 14, + SIGFPE: 8, + SIGHUP: 1, + SIGILL: 4, + SIGINT: 2, + SIGKILL: 9, + SIGPIPE: 13, + SIGQUIT: 3, + SIGSEGV: 11, + SIGTERM: 15, +} + +type TerminalModes map[uint8]uint32 + +// POSIX terminal mode flags as listed in RFC 4254 Section 8. +const ( + tty_OP_END = 0 + VINTR = 1 + VQUIT = 2 + VERASE = 3 + VKILL = 4 + VEOF = 5 + VEOL = 6 + VEOL2 = 7 + VSTART = 8 + VSTOP = 9 + VSUSP = 10 + VDSUSP = 11 + VREPRINT = 12 + VWERASE = 13 + VLNEXT = 14 + VFLUSH = 15 + VSWTCH = 16 + VSTATUS = 17 + VDISCARD = 18 + IGNPAR = 30 + PARMRK = 31 + INPCK = 32 + ISTRIP = 33 + INLCR = 34 + IGNCR = 35 + ICRNL = 36 + IUCLC = 37 + IXON = 38 + IXANY = 39 + IXOFF = 40 + IMAXBEL = 41 + ISIG = 50 + ICANON = 51 + XCASE = 52 + ECHO = 53 + ECHOE = 54 + ECHOK = 55 + ECHONL = 56 + NOFLSH = 57 + TOSTOP = 58 + IEXTEN = 59 + ECHOCTL = 60 + ECHOKE = 61 + PENDIN = 62 + OPOST = 70 + OLCUC = 71 + ONLCR = 72 + OCRNL = 73 + ONOCR = 74 + ONLRET = 75 + CS7 = 90 + CS8 = 91 + PARENB = 92 + PARODD = 93 + TTY_OP_ISPEED = 128 + TTY_OP_OSPEED = 129 +) + +// A Session represents a connection to a remote command or shell. +type Session struct { + // Stdin specifies the remote process's standard input. + // If Stdin is nil, the remote process reads from an empty + // bytes.Buffer. + Stdin io.Reader + + // Stdout and Stderr specify the remote process's standard + // output and error. + // + // If either is nil, Run connects the corresponding file + // descriptor to an instance of ioutil.Discard. There is a + // fixed amount of buffering that is shared for the two streams. + // If either blocks it may eventually cause the remote + // command to block. + Stdout io.Writer + Stderr io.Writer + + ch Channel // the channel backing this session + started bool // true once Start, Run or Shell is invoked. + copyFuncs []func() error + errors chan error // one send per copyFunc + + // true if pipe method is active + stdinpipe, stdoutpipe, stderrpipe bool + + // stdinPipeWriter is non-nil if StdinPipe has not been called + // and Stdin was specified by the user; it is the write end of + // a pipe connecting Session.Stdin to the stdin channel. + stdinPipeWriter io.WriteCloser + + exitStatus chan error +} + +// SendRequest sends an out-of-band channel request on the SSH channel +// underlying the session. +func (s *Session) SendRequest(name string, wantReply bool, payload []byte) (bool, error) { + return s.ch.SendRequest(name, wantReply, payload) +} + +func (s *Session) Close() error { + return s.ch.Close() +} + +// RFC 4254 Section 6.4. +type setenvRequest struct { + Name string + Value string +} + +// Setenv sets an environment variable that will be applied to any +// command executed by Shell or Run. +func (s *Session) Setenv(name, value string) error { + msg := setenvRequest{ + Name: name, + Value: value, + } + ok, err := s.ch.SendRequest("env", true, Marshal(&msg)) + if err == nil && !ok { + err = errors.New("ssh: setenv failed") + } + return err +} + +// RFC 4254 Section 6.2. +type ptyRequestMsg struct { + Term string + Columns uint32 + Rows uint32 + Width uint32 + Height uint32 + Modelist string +} + +// RequestPty requests the association of a pty with the session on the remote host. +func (s *Session) RequestPty(term string, h, w int, termmodes TerminalModes) error { + var tm []byte + for k, v := range termmodes { + kv := struct { + Key byte + Val uint32 + }{k, v} + + tm = append(tm, Marshal(&kv)...) + } + tm = append(tm, tty_OP_END) + req := ptyRequestMsg{ + Term: term, + Columns: uint32(w), + Rows: uint32(h), + Width: uint32(w * 8), + Height: uint32(h * 8), + Modelist: string(tm), + } + ok, err := s.ch.SendRequest("pty-req", true, Marshal(&req)) + if err == nil && !ok { + err = errors.New("ssh: pty-req failed") + } + return err +} + +// RFC 4254 Section 6.5. +type subsystemRequestMsg struct { + Subsystem string +} + +// RequestSubsystem requests the association of a subsystem with the session on the remote host. +// A subsystem is a predefined command that runs in the background when the ssh session is initiated +func (s *Session) RequestSubsystem(subsystem string) error { + msg := subsystemRequestMsg{ + Subsystem: subsystem, + } + ok, err := s.ch.SendRequest("subsystem", true, Marshal(&msg)) + if err == nil && !ok { + err = errors.New("ssh: subsystem request failed") + } + return err +} + +// RFC 4254 Section 6.7. +type ptyWindowChangeMsg struct { + Columns uint32 + Rows uint32 + Width uint32 + Height uint32 +} + +// WindowChange informs the remote host about a terminal window dimension change to h rows and w columns. +func (s *Session) WindowChange(h, w int) error { + req := ptyWindowChangeMsg{ + Columns: uint32(w), + Rows: uint32(h), + Width: uint32(w * 8), + Height: uint32(h * 8), + } + _, err := s.ch.SendRequest("window-change", false, Marshal(&req)) + return err +} + +// RFC 4254 Section 6.9. +type signalMsg struct { + Signal string +} + +// Signal sends the given signal to the remote process. +// sig is one of the SIG* constants. +func (s *Session) Signal(sig Signal) error { + msg := signalMsg{ + Signal: string(sig), + } + + _, err := s.ch.SendRequest("signal", false, Marshal(&msg)) + return err +} + +// RFC 4254 Section 6.5. +type execMsg struct { + Command string +} + +// Start runs cmd on the remote host. Typically, the remote +// server passes cmd to the shell for interpretation. +// A Session only accepts one call to Run, Start or Shell. +func (s *Session) Start(cmd string) error { + if s.started { + return errors.New("ssh: session already started") + } + req := execMsg{ + Command: cmd, + } + + ok, err := s.ch.SendRequest("exec", true, Marshal(&req)) + if err == nil && !ok { + err = fmt.Errorf("ssh: command %v failed", cmd) + } + if err != nil { + return err + } + return s.start() +} + +// Run runs cmd on the remote host. Typically, the remote +// server passes cmd to the shell for interpretation. +// A Session only accepts one call to Run, Start, Shell, Output, +// or CombinedOutput. +// +// The returned error is nil if the command runs, has no problems +// copying stdin, stdout, and stderr, and exits with a zero exit +// status. +// +// If the remote server does not send an exit status, an error of type +// *ExitMissingError is returned. If the command completes +// unsuccessfully or is interrupted by a signal, the error is of type +// *ExitError. Other error types may be returned for I/O problems. +func (s *Session) Run(cmd string) error { + err := s.Start(cmd) + if err != nil { + return err + } + return s.Wait() +} + +// Output runs cmd on the remote host and returns its standard output. +func (s *Session) Output(cmd string) ([]byte, error) { + if s.Stdout != nil { + return nil, errors.New("ssh: Stdout already set") + } + var b bytes.Buffer + s.Stdout = &b + err := s.Run(cmd) + return b.Bytes(), err +} + +type singleWriter struct { + b bytes.Buffer + mu sync.Mutex +} + +func (w *singleWriter) Write(p []byte) (int, error) { + w.mu.Lock() + defer w.mu.Unlock() + return w.b.Write(p) +} + +// CombinedOutput runs cmd on the remote host and returns its combined +// standard output and standard error. +func (s *Session) CombinedOutput(cmd string) ([]byte, error) { + if s.Stdout != nil { + return nil, errors.New("ssh: Stdout already set") + } + if s.Stderr != nil { + return nil, errors.New("ssh: Stderr already set") + } + var b singleWriter + s.Stdout = &b + s.Stderr = &b + err := s.Run(cmd) + return b.b.Bytes(), err +} + +// Shell starts a login shell on the remote host. A Session only +// accepts one call to Run, Start, Shell, Output, or CombinedOutput. +func (s *Session) Shell() error { + if s.started { + return errors.New("ssh: session already started") + } + + ok, err := s.ch.SendRequest("shell", true, nil) + if err == nil && !ok { + return errors.New("ssh: could not start shell") + } + if err != nil { + return err + } + return s.start() +} + +func (s *Session) start() error { + s.started = true + + type F func(*Session) + for _, setupFd := range []F{(*Session).stdin, (*Session).stdout, (*Session).stderr} { + setupFd(s) + } + + s.errors = make(chan error, len(s.copyFuncs)) + for _, fn := range s.copyFuncs { + go func(fn func() error) { + s.errors <- fn() + }(fn) + } + return nil +} + +// Wait waits for the remote command to exit. +// +// The returned error is nil if the command runs, has no problems +// copying stdin, stdout, and stderr, and exits with a zero exit +// status. +// +// If the remote server does not send an exit status, an error of type +// *ExitMissingError is returned. If the command completes +// unsuccessfully or is interrupted by a signal, the error is of type +// *ExitError. Other error types may be returned for I/O problems. +func (s *Session) Wait() error { + if !s.started { + return errors.New("ssh: session not started") + } + waitErr := <-s.exitStatus + + if s.stdinPipeWriter != nil { + s.stdinPipeWriter.Close() + } + var copyError error + for _ = range s.copyFuncs { + if err := <-s.errors; err != nil && copyError == nil { + copyError = err + } + } + if waitErr != nil { + return waitErr + } + return copyError +} + +func (s *Session) wait(reqs <-chan *Request) error { + wm := Waitmsg{status: -1} + // Wait for msg channel to be closed before returning. + for msg := range reqs { + switch msg.Type { + case "exit-status": + wm.status = int(binary.BigEndian.Uint32(msg.Payload)) + case "exit-signal": + var sigval struct { + Signal string + CoreDumped bool + Error string + Lang string + } + if err := Unmarshal(msg.Payload, &sigval); err != nil { + return err + } + + // Must sanitize strings? + wm.signal = sigval.Signal + wm.msg = sigval.Error + wm.lang = sigval.Lang + default: + // This handles keepalives and matches + // OpenSSH's behaviour. + if msg.WantReply { + msg.Reply(false, nil) + } + } + } + if wm.status == 0 { + return nil + } + if wm.status == -1 { + // exit-status was never sent from server + if wm.signal == "" { + // signal was not sent either. RFC 4254 + // section 6.10 recommends against this + // behavior, but it is allowed, so we let + // clients handle it. + return &ExitMissingError{} + } + wm.status = 128 + if _, ok := signals[Signal(wm.signal)]; ok { + wm.status += signals[Signal(wm.signal)] + } + } + + return &ExitError{wm} +} + +// ExitMissingError is returned if a session is torn down cleanly, but +// the server sends no confirmation of the exit status. +type ExitMissingError struct{} + +func (e *ExitMissingError) Error() string { + return "wait: remote command exited without exit status or exit signal" +} + +func (s *Session) stdin() { + if s.stdinpipe { + return + } + var stdin io.Reader + if s.Stdin == nil { + stdin = new(bytes.Buffer) + } else { + r, w := io.Pipe() + go func() { + _, err := io.Copy(w, s.Stdin) + w.CloseWithError(err) + }() + stdin, s.stdinPipeWriter = r, w + } + s.copyFuncs = append(s.copyFuncs, func() error { + _, err := io.Copy(s.ch, stdin) + if err1 := s.ch.CloseWrite(); err == nil && err1 != io.EOF { + err = err1 + } + return err + }) +} + +func (s *Session) stdout() { + if s.stdoutpipe { + return + } + if s.Stdout == nil { + s.Stdout = ioutil.Discard + } + s.copyFuncs = append(s.copyFuncs, func() error { + _, err := io.Copy(s.Stdout, s.ch) + return err + }) +} + +func (s *Session) stderr() { + if s.stderrpipe { + return + } + if s.Stderr == nil { + s.Stderr = ioutil.Discard + } + s.copyFuncs = append(s.copyFuncs, func() error { + _, err := io.Copy(s.Stderr, s.ch.Stderr()) + return err + }) +} + +// sessionStdin reroutes Close to CloseWrite. +type sessionStdin struct { + io.Writer + ch Channel +} + +func (s *sessionStdin) Close() error { + return s.ch.CloseWrite() +} + +// StdinPipe returns a pipe that will be connected to the +// remote command's standard input when the command starts. +func (s *Session) StdinPipe() (io.WriteCloser, error) { + if s.Stdin != nil { + return nil, errors.New("ssh: Stdin already set") + } + if s.started { + return nil, errors.New("ssh: StdinPipe after process started") + } + s.stdinpipe = true + return &sessionStdin{s.ch, s.ch}, nil +} + +// StdoutPipe returns a pipe that will be connected to the +// remote command's standard output when the command starts. +// There is a fixed amount of buffering that is shared between +// stdout and stderr streams. If the StdoutPipe reader is +// not serviced fast enough it may eventually cause the +// remote command to block. +func (s *Session) StdoutPipe() (io.Reader, error) { + if s.Stdout != nil { + return nil, errors.New("ssh: Stdout already set") + } + if s.started { + return nil, errors.New("ssh: StdoutPipe after process started") + } + s.stdoutpipe = true + return s.ch, nil +} + +// StderrPipe returns a pipe that will be connected to the +// remote command's standard error when the command starts. +// There is a fixed amount of buffering that is shared between +// stdout and stderr streams. If the StderrPipe reader is +// not serviced fast enough it may eventually cause the +// remote command to block. +func (s *Session) StderrPipe() (io.Reader, error) { + if s.Stderr != nil { + return nil, errors.New("ssh: Stderr already set") + } + if s.started { + return nil, errors.New("ssh: StderrPipe after process started") + } + s.stderrpipe = true + return s.ch.Stderr(), nil +} + +// newSession returns a new interactive session on the remote host. +func newSession(ch Channel, reqs <-chan *Request) (*Session, error) { + s := &Session{ + ch: ch, + } + s.exitStatus = make(chan error, 1) + go func() { + s.exitStatus <- s.wait(reqs) + }() + + return s, nil +} + +// An ExitError reports unsuccessful completion of a remote command. +type ExitError struct { + Waitmsg +} + +func (e *ExitError) Error() string { + return e.Waitmsg.String() +} + +// Waitmsg stores the information about an exited remote command +// as reported by Wait. +type Waitmsg struct { + status int + signal string + msg string + lang string +} + +// ExitStatus returns the exit status of the remote command. +func (w Waitmsg) ExitStatus() int { + return w.status +} + +// Signal returns the exit signal of the remote command if +// it was terminated violently. +func (w Waitmsg) Signal() string { + return w.signal +} + +// Msg returns the exit message given by the remote command +func (w Waitmsg) Msg() string { + return w.msg +} + +// Lang returns the language tag. See RFC 3066 +func (w Waitmsg) Lang() string { + return w.lang +} + +func (w Waitmsg) String() string { + str := fmt.Sprintf("Process exited with status %v", w.status) + if w.signal != "" { + str += fmt.Sprintf(" from signal %v", w.signal) + } + if w.msg != "" { + str += fmt.Sprintf(". Reason was: %v", w.msg) + } + return str +} diff --git a/vendor/golang.org/x/crypto/ssh/session_test.go b/vendor/golang.org/x/crypto/ssh/session_test.go new file mode 100644 index 000000000..7dce6dd69 --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/session_test.go @@ -0,0 +1,774 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +// Session tests. + +import ( + "bytes" + crypto_rand "crypto/rand" + "errors" + "io" + "io/ioutil" + "math/rand" + "net" + "testing" + + "golang.org/x/crypto/ssh/terminal" +) + +type serverType func(Channel, <-chan *Request, *testing.T) + +// dial constructs a new test server and returns a *ClientConn. +func dial(handler serverType, t *testing.T) *Client { + c1, c2, err := netPipe() + if err != nil { + t.Fatalf("netPipe: %v", err) + } + + go func() { + defer c1.Close() + conf := ServerConfig{ + NoClientAuth: true, + } + conf.AddHostKey(testSigners["rsa"]) + + _, chans, reqs, err := NewServerConn(c1, &conf) + if err != nil { + t.Fatalf("Unable to handshake: %v", err) + } + go DiscardRequests(reqs) + + for newCh := range chans { + if newCh.ChannelType() != "session" { + newCh.Reject(UnknownChannelType, "unknown channel type") + continue + } + + ch, inReqs, err := newCh.Accept() + if err != nil { + t.Errorf("Accept: %v", err) + continue + } + go func() { + handler(ch, inReqs, t) + }() + } + }() + + config := &ClientConfig{ + User: "testuser", + HostKeyCallback: InsecureIgnoreHostKey(), + } + + conn, chans, reqs, err := NewClientConn(c2, "", config) + if err != nil { + t.Fatalf("unable to dial remote side: %v", err) + } + + return NewClient(conn, chans, reqs) +} + +// Test a simple string is returned to session.Stdout. +func TestSessionShell(t *testing.T) { + conn := dial(shellHandler, t) + defer conn.Close() + session, err := conn.NewSession() + if err != nil { + t.Fatalf("Unable to request new session: %v", err) + } + defer session.Close() + stdout := new(bytes.Buffer) + session.Stdout = stdout + if err := session.Shell(); err != nil { + t.Fatalf("Unable to execute command: %s", err) + } + if err := session.Wait(); err != nil { + t.Fatalf("Remote command did not exit cleanly: %v", err) + } + actual := stdout.String() + if actual != "golang" { + t.Fatalf("Remote shell did not return expected string: expected=golang, actual=%s", actual) + } +} + +// TODO(dfc) add support for Std{in,err}Pipe when the Server supports it. + +// Test a simple string is returned via StdoutPipe. +func TestSessionStdoutPipe(t *testing.T) { + conn := dial(shellHandler, t) + defer conn.Close() + session, err := conn.NewSession() + if err != nil { + t.Fatalf("Unable to request new session: %v", err) + } + defer session.Close() + stdout, err := session.StdoutPipe() + if err != nil { + t.Fatalf("Unable to request StdoutPipe(): %v", err) + } + var buf bytes.Buffer + if err := session.Shell(); err != nil { + t.Fatalf("Unable to execute command: %v", err) + } + done := make(chan bool, 1) + go func() { + if _, err := io.Copy(&buf, stdout); err != nil { + t.Errorf("Copy of stdout failed: %v", err) + } + done <- true + }() + if err := session.Wait(); err != nil { + t.Fatalf("Remote command did not exit cleanly: %v", err) + } + <-done + actual := buf.String() + if actual != "golang" { + t.Fatalf("Remote shell did not return expected string: expected=golang, actual=%s", actual) + } +} + +// Test that a simple string is returned via the Output helper, +// and that stderr is discarded. +func TestSessionOutput(t *testing.T) { + conn := dial(fixedOutputHandler, t) + defer conn.Close() + session, err := conn.NewSession() + if err != nil { + t.Fatalf("Unable to request new session: %v", err) + } + defer session.Close() + + buf, err := session.Output("") // cmd is ignored by fixedOutputHandler + if err != nil { + t.Error("Remote command did not exit cleanly:", err) + } + w := "this-is-stdout." + g := string(buf) + if g != w { + t.Error("Remote command did not return expected string:") + t.Logf("want %q", w) + t.Logf("got %q", g) + } +} + +// Test that both stdout and stderr are returned +// via the CombinedOutput helper. +func TestSessionCombinedOutput(t *testing.T) { + conn := dial(fixedOutputHandler, t) + defer conn.Close() + session, err := conn.NewSession() + if err != nil { + t.Fatalf("Unable to request new session: %v", err) + } + defer session.Close() + + buf, err := session.CombinedOutput("") // cmd is ignored by fixedOutputHandler + if err != nil { + t.Error("Remote command did not exit cleanly:", err) + } + const stdout = "this-is-stdout." + const stderr = "this-is-stderr." + g := string(buf) + if g != stdout+stderr && g != stderr+stdout { + t.Error("Remote command did not return expected string:") + t.Logf("want %q, or %q", stdout+stderr, stderr+stdout) + t.Logf("got %q", g) + } +} + +// Test non-0 exit status is returned correctly. +func TestExitStatusNonZero(t *testing.T) { + conn := dial(exitStatusNonZeroHandler, t) + defer conn.Close() + session, err := conn.NewSession() + if err != nil { + t.Fatalf("Unable to request new session: %v", err) + } + defer session.Close() + if err := session.Shell(); err != nil { + t.Fatalf("Unable to execute command: %v", err) + } + err = session.Wait() + if err == nil { + t.Fatalf("expected command to fail but it didn't") + } + e, ok := err.(*ExitError) + if !ok { + t.Fatalf("expected *ExitError but got %T", err) + } + if e.ExitStatus() != 15 { + t.Fatalf("expected command to exit with 15 but got %v", e.ExitStatus()) + } +} + +// Test 0 exit status is returned correctly. +func TestExitStatusZero(t *testing.T) { + conn := dial(exitStatusZeroHandler, t) + defer conn.Close() + session, err := conn.NewSession() + if err != nil { + t.Fatalf("Unable to request new session: %v", err) + } + defer session.Close() + + if err := session.Shell(); err != nil { + t.Fatalf("Unable to execute command: %v", err) + } + err = session.Wait() + if err != nil { + t.Fatalf("expected nil but got %v", err) + } +} + +// Test exit signal and status are both returned correctly. +func TestExitSignalAndStatus(t *testing.T) { + conn := dial(exitSignalAndStatusHandler, t) + defer conn.Close() + session, err := conn.NewSession() + if err != nil { + t.Fatalf("Unable to request new session: %v", err) + } + defer session.Close() + if err := session.Shell(); err != nil { + t.Fatalf("Unable to execute command: %v", err) + } + err = session.Wait() + if err == nil { + t.Fatalf("expected command to fail but it didn't") + } + e, ok := err.(*ExitError) + if !ok { + t.Fatalf("expected *ExitError but got %T", err) + } + if e.Signal() != "TERM" || e.ExitStatus() != 15 { + t.Fatalf("expected command to exit with signal TERM and status 15 but got signal %s and status %v", e.Signal(), e.ExitStatus()) + } +} + +// Test exit signal and status are both returned correctly. +func TestKnownExitSignalOnly(t *testing.T) { + conn := dial(exitSignalHandler, t) + defer conn.Close() + session, err := conn.NewSession() + if err != nil { + t.Fatalf("Unable to request new session: %v", err) + } + defer session.Close() + if err := session.Shell(); err != nil { + t.Fatalf("Unable to execute command: %v", err) + } + err = session.Wait() + if err == nil { + t.Fatalf("expected command to fail but it didn't") + } + e, ok := err.(*ExitError) + if !ok { + t.Fatalf("expected *ExitError but got %T", err) + } + if e.Signal() != "TERM" || e.ExitStatus() != 143 { + t.Fatalf("expected command to exit with signal TERM and status 143 but got signal %s and status %v", e.Signal(), e.ExitStatus()) + } +} + +// Test exit signal and status are both returned correctly. +func TestUnknownExitSignal(t *testing.T) { + conn := dial(exitSignalUnknownHandler, t) + defer conn.Close() + session, err := conn.NewSession() + if err != nil { + t.Fatalf("Unable to request new session: %v", err) + } + defer session.Close() + if err := session.Shell(); err != nil { + t.Fatalf("Unable to execute command: %v", err) + } + err = session.Wait() + if err == nil { + t.Fatalf("expected command to fail but it didn't") + } + e, ok := err.(*ExitError) + if !ok { + t.Fatalf("expected *ExitError but got %T", err) + } + if e.Signal() != "SYS" || e.ExitStatus() != 128 { + t.Fatalf("expected command to exit with signal SYS and status 128 but got signal %s and status %v", e.Signal(), e.ExitStatus()) + } +} + +func TestExitWithoutStatusOrSignal(t *testing.T) { + conn := dial(exitWithoutSignalOrStatus, t) + defer conn.Close() + session, err := conn.NewSession() + if err != nil { + t.Fatalf("Unable to request new session: %v", err) + } + defer session.Close() + if err := session.Shell(); err != nil { + t.Fatalf("Unable to execute command: %v", err) + } + err = session.Wait() + if err == nil { + t.Fatalf("expected command to fail but it didn't") + } + if _, ok := err.(*ExitMissingError); !ok { + t.Fatalf("got %T want *ExitMissingError", err) + } +} + +// windowTestBytes is the number of bytes that we'll send to the SSH server. +const windowTestBytes = 16000 * 200 + +// TestServerWindow writes random data to the server. The server is expected to echo +// the same data back, which is compared against the original. +func TestServerWindow(t *testing.T) { + origBuf := bytes.NewBuffer(make([]byte, 0, windowTestBytes)) + io.CopyN(origBuf, crypto_rand.Reader, windowTestBytes) + origBytes := origBuf.Bytes() + + conn := dial(echoHandler, t) + defer conn.Close() + session, err := conn.NewSession() + if err != nil { + t.Fatal(err) + } + defer session.Close() + result := make(chan []byte) + + go func() { + defer close(result) + echoedBuf := bytes.NewBuffer(make([]byte, 0, windowTestBytes)) + serverStdout, err := session.StdoutPipe() + if err != nil { + t.Errorf("StdoutPipe failed: %v", err) + return + } + n, err := copyNRandomly("stdout", echoedBuf, serverStdout, windowTestBytes) + if err != nil && err != io.EOF { + t.Errorf("Read only %d bytes from server, expected %d: %v", n, windowTestBytes, err) + } + result <- echoedBuf.Bytes() + }() + + serverStdin, err := session.StdinPipe() + if err != nil { + t.Fatalf("StdinPipe failed: %v", err) + } + written, err := copyNRandomly("stdin", serverStdin, origBuf, windowTestBytes) + if err != nil { + t.Fatalf("failed to copy origBuf to serverStdin: %v", err) + } + if written != windowTestBytes { + t.Fatalf("Wrote only %d of %d bytes to server", written, windowTestBytes) + } + + echoedBytes := <-result + + if !bytes.Equal(origBytes, echoedBytes) { + t.Fatalf("Echoed buffer differed from original, orig %d, echoed %d", len(origBytes), len(echoedBytes)) + } +} + +// Verify the client can handle a keepalive packet from the server. +func TestClientHandlesKeepalives(t *testing.T) { + conn := dial(channelKeepaliveSender, t) + defer conn.Close() + session, err := conn.NewSession() + if err != nil { + t.Fatal(err) + } + defer session.Close() + if err := session.Shell(); err != nil { + t.Fatalf("Unable to execute command: %v", err) + } + err = session.Wait() + if err != nil { + t.Fatalf("expected nil but got: %v", err) + } +} + +type exitStatusMsg struct { + Status uint32 +} + +type exitSignalMsg struct { + Signal string + CoreDumped bool + Errmsg string + Lang string +} + +func handleTerminalRequests(in <-chan *Request) { + for req := range in { + ok := false + switch req.Type { + case "shell": + ok = true + if len(req.Payload) > 0 { + // We don't accept any commands, only the default shell. + ok = false + } + case "env": + ok = true + } + req.Reply(ok, nil) + } +} + +func newServerShell(ch Channel, in <-chan *Request, prompt string) *terminal.Terminal { + term := terminal.NewTerminal(ch, prompt) + go handleTerminalRequests(in) + return term +} + +func exitStatusZeroHandler(ch Channel, in <-chan *Request, t *testing.T) { + defer ch.Close() + // this string is returned to stdout + shell := newServerShell(ch, in, "> ") + readLine(shell, t) + sendStatus(0, ch, t) +} + +func exitStatusNonZeroHandler(ch Channel, in <-chan *Request, t *testing.T) { + defer ch.Close() + shell := newServerShell(ch, in, "> ") + readLine(shell, t) + sendStatus(15, ch, t) +} + +func exitSignalAndStatusHandler(ch Channel, in <-chan *Request, t *testing.T) { + defer ch.Close() + shell := newServerShell(ch, in, "> ") + readLine(shell, t) + sendStatus(15, ch, t) + sendSignal("TERM", ch, t) +} + +func exitSignalHandler(ch Channel, in <-chan *Request, t *testing.T) { + defer ch.Close() + shell := newServerShell(ch, in, "> ") + readLine(shell, t) + sendSignal("TERM", ch, t) +} + +func exitSignalUnknownHandler(ch Channel, in <-chan *Request, t *testing.T) { + defer ch.Close() + shell := newServerShell(ch, in, "> ") + readLine(shell, t) + sendSignal("SYS", ch, t) +} + +func exitWithoutSignalOrStatus(ch Channel, in <-chan *Request, t *testing.T) { + defer ch.Close() + shell := newServerShell(ch, in, "> ") + readLine(shell, t) +} + +func shellHandler(ch Channel, in <-chan *Request, t *testing.T) { + defer ch.Close() + // this string is returned to stdout + shell := newServerShell(ch, in, "golang") + readLine(shell, t) + sendStatus(0, ch, t) +} + +// Ignores the command, writes fixed strings to stderr and stdout. +// Strings are "this-is-stdout." and "this-is-stderr.". +func fixedOutputHandler(ch Channel, in <-chan *Request, t *testing.T) { + defer ch.Close() + _, err := ch.Read(nil) + + req, ok := <-in + if !ok { + t.Fatalf("error: expected channel request, got: %#v", err) + return + } + + // ignore request, always send some text + req.Reply(true, nil) + + _, err = io.WriteString(ch, "this-is-stdout.") + if err != nil { + t.Fatalf("error writing on server: %v", err) + } + _, err = io.WriteString(ch.Stderr(), "this-is-stderr.") + if err != nil { + t.Fatalf("error writing on server: %v", err) + } + sendStatus(0, ch, t) +} + +func readLine(shell *terminal.Terminal, t *testing.T) { + if _, err := shell.ReadLine(); err != nil && err != io.EOF { + t.Errorf("unable to read line: %v", err) + } +} + +func sendStatus(status uint32, ch Channel, t *testing.T) { + msg := exitStatusMsg{ + Status: status, + } + if _, err := ch.SendRequest("exit-status", false, Marshal(&msg)); err != nil { + t.Errorf("unable to send status: %v", err) + } +} + +func sendSignal(signal string, ch Channel, t *testing.T) { + sig := exitSignalMsg{ + Signal: signal, + CoreDumped: false, + Errmsg: "Process terminated", + Lang: "en-GB-oed", + } + if _, err := ch.SendRequest("exit-signal", false, Marshal(&sig)); err != nil { + t.Errorf("unable to send signal: %v", err) + } +} + +func discardHandler(ch Channel, t *testing.T) { + defer ch.Close() + io.Copy(ioutil.Discard, ch) +} + +func echoHandler(ch Channel, in <-chan *Request, t *testing.T) { + defer ch.Close() + if n, err := copyNRandomly("echohandler", ch, ch, windowTestBytes); err != nil { + t.Errorf("short write, wrote %d, expected %d: %v ", n, windowTestBytes, err) + } +} + +// copyNRandomly copies n bytes from src to dst. It uses a variable, and random, +// buffer size to exercise more code paths. +func copyNRandomly(title string, dst io.Writer, src io.Reader, n int) (int, error) { + var ( + buf = make([]byte, 32*1024) + written int + remaining = n + ) + for remaining > 0 { + l := rand.Intn(1 << 15) + if remaining < l { + l = remaining + } + nr, er := src.Read(buf[:l]) + nw, ew := dst.Write(buf[:nr]) + remaining -= nw + written += nw + if ew != nil { + return written, ew + } + if nr != nw { + return written, io.ErrShortWrite + } + if er != nil && er != io.EOF { + return written, er + } + } + return written, nil +} + +func channelKeepaliveSender(ch Channel, in <-chan *Request, t *testing.T) { + defer ch.Close() + shell := newServerShell(ch, in, "> ") + readLine(shell, t) + if _, err := ch.SendRequest("keepalive@openssh.com", true, nil); err != nil { + t.Errorf("unable to send channel keepalive request: %v", err) + } + sendStatus(0, ch, t) +} + +func TestClientWriteEOF(t *testing.T) { + conn := dial(simpleEchoHandler, t) + defer conn.Close() + + session, err := conn.NewSession() + if err != nil { + t.Fatal(err) + } + defer session.Close() + stdin, err := session.StdinPipe() + if err != nil { + t.Fatalf("StdinPipe failed: %v", err) + } + stdout, err := session.StdoutPipe() + if err != nil { + t.Fatalf("StdoutPipe failed: %v", err) + } + + data := []byte(`0000`) + _, err = stdin.Write(data) + if err != nil { + t.Fatalf("Write failed: %v", err) + } + stdin.Close() + + res, err := ioutil.ReadAll(stdout) + if err != nil { + t.Fatalf("Read failed: %v", err) + } + + if !bytes.Equal(data, res) { + t.Fatalf("Read differed from write, wrote: %v, read: %v", data, res) + } +} + +func simpleEchoHandler(ch Channel, in <-chan *Request, t *testing.T) { + defer ch.Close() + data, err := ioutil.ReadAll(ch) + if err != nil { + t.Errorf("handler read error: %v", err) + } + _, err = ch.Write(data) + if err != nil { + t.Errorf("handler write error: %v", err) + } +} + +func TestSessionID(t *testing.T) { + c1, c2, err := netPipe() + if err != nil { + t.Fatalf("netPipe: %v", err) + } + defer c1.Close() + defer c2.Close() + + serverID := make(chan []byte, 1) + clientID := make(chan []byte, 1) + + serverConf := &ServerConfig{ + NoClientAuth: true, + } + serverConf.AddHostKey(testSigners["ecdsa"]) + clientConf := &ClientConfig{ + HostKeyCallback: InsecureIgnoreHostKey(), + User: "user", + } + + go func() { + conn, chans, reqs, err := NewServerConn(c1, serverConf) + if err != nil { + t.Fatalf("server handshake: %v", err) + } + serverID <- conn.SessionID() + go DiscardRequests(reqs) + for ch := range chans { + ch.Reject(Prohibited, "") + } + }() + + go func() { + conn, chans, reqs, err := NewClientConn(c2, "", clientConf) + if err != nil { + t.Fatalf("client handshake: %v", err) + } + clientID <- conn.SessionID() + go DiscardRequests(reqs) + for ch := range chans { + ch.Reject(Prohibited, "") + } + }() + + s := <-serverID + c := <-clientID + if bytes.Compare(s, c) != 0 { + t.Errorf("server session ID (%x) != client session ID (%x)", s, c) + } else if len(s) == 0 { + t.Errorf("client and server SessionID were empty.") + } +} + +type noReadConn struct { + readSeen bool + net.Conn +} + +func (c *noReadConn) Close() error { + return nil +} + +func (c *noReadConn) Read(b []byte) (int, error) { + c.readSeen = true + return 0, errors.New("noReadConn error") +} + +func TestInvalidServerConfiguration(t *testing.T) { + c1, c2, err := netPipe() + if err != nil { + t.Fatalf("netPipe: %v", err) + } + defer c1.Close() + defer c2.Close() + + serveConn := noReadConn{Conn: c1} + serverConf := &ServerConfig{} + + NewServerConn(&serveConn, serverConf) + if serveConn.readSeen { + t.Fatalf("NewServerConn attempted to Read() from Conn while configuration is missing host key") + } + + serverConf.AddHostKey(testSigners["ecdsa"]) + + NewServerConn(&serveConn, serverConf) + if serveConn.readSeen { + t.Fatalf("NewServerConn attempted to Read() from Conn while configuration is missing authentication method") + } +} + +func TestHostKeyAlgorithms(t *testing.T) { + serverConf := &ServerConfig{ + NoClientAuth: true, + } + serverConf.AddHostKey(testSigners["rsa"]) + serverConf.AddHostKey(testSigners["ecdsa"]) + + connect := func(clientConf *ClientConfig, want string) { + var alg string + clientConf.HostKeyCallback = func(h string, a net.Addr, key PublicKey) error { + alg = key.Type() + return nil + } + c1, c2, err := netPipe() + if err != nil { + t.Fatalf("netPipe: %v", err) + } + defer c1.Close() + defer c2.Close() + + go NewServerConn(c1, serverConf) + _, _, _, err = NewClientConn(c2, "", clientConf) + if err != nil { + t.Fatalf("NewClientConn: %v", err) + } + if alg != want { + t.Errorf("selected key algorithm %s, want %s", alg, want) + } + } + + // By default, we get the preferred algorithm, which is ECDSA 256. + + clientConf := &ClientConfig{ + HostKeyCallback: InsecureIgnoreHostKey(), + } + connect(clientConf, KeyAlgoECDSA256) + + // Client asks for RSA explicitly. + clientConf.HostKeyAlgorithms = []string{KeyAlgoRSA} + connect(clientConf, KeyAlgoRSA) + + c1, c2, err := netPipe() + if err != nil { + t.Fatalf("netPipe: %v", err) + } + defer c1.Close() + defer c2.Close() + + go NewServerConn(c1, serverConf) + clientConf.HostKeyAlgorithms = []string{"nonexistent-hostkey-algo"} + _, _, _, err = NewClientConn(c2, "", clientConf) + if err == nil { + t.Fatal("succeeded connecting with unknown hostkey algorithm") + } +} diff --git a/vendor/golang.org/x/crypto/ssh/streamlocal.go b/vendor/golang.org/x/crypto/ssh/streamlocal.go new file mode 100644 index 000000000..a2dccc64c --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/streamlocal.go @@ -0,0 +1,115 @@ +package ssh + +import ( + "errors" + "io" + "net" +) + +// streamLocalChannelOpenDirectMsg is a struct used for SSH_MSG_CHANNEL_OPEN message +// with "direct-streamlocal@openssh.com" string. +// +// See openssh-portable/PROTOCOL, section 2.4. connection: Unix domain socket forwarding +// https://github.com/openssh/openssh-portable/blob/master/PROTOCOL#L235 +type streamLocalChannelOpenDirectMsg struct { + socketPath string + reserved0 string + reserved1 uint32 +} + +// forwardedStreamLocalPayload is a struct used for SSH_MSG_CHANNEL_OPEN message +// with "forwarded-streamlocal@openssh.com" string. +type forwardedStreamLocalPayload struct { + SocketPath string + Reserved0 string +} + +// streamLocalChannelForwardMsg is a struct used for SSH2_MSG_GLOBAL_REQUEST message +// with "streamlocal-forward@openssh.com"/"cancel-streamlocal-forward@openssh.com" string. +type streamLocalChannelForwardMsg struct { + socketPath string +} + +// ListenUnix is similar to ListenTCP but uses a Unix domain socket. +func (c *Client) ListenUnix(socketPath string) (net.Listener, error) { + m := streamLocalChannelForwardMsg{ + socketPath, + } + // send message + ok, _, err := c.SendRequest("streamlocal-forward@openssh.com", true, Marshal(&m)) + if err != nil { + return nil, err + } + if !ok { + return nil, errors.New("ssh: streamlocal-forward@openssh.com request denied by peer") + } + ch := c.forwards.add(&net.UnixAddr{Name: socketPath, Net: "unix"}) + + return &unixListener{socketPath, c, ch}, nil +} + +func (c *Client) dialStreamLocal(socketPath string) (Channel, error) { + msg := streamLocalChannelOpenDirectMsg{ + socketPath: socketPath, + } + ch, in, err := c.OpenChannel("direct-streamlocal@openssh.com", Marshal(&msg)) + if err != nil { + return nil, err + } + go DiscardRequests(in) + return ch, err +} + +type unixListener struct { + socketPath string + + conn *Client + in <-chan forward +} + +// Accept waits for and returns the next connection to the listener. +func (l *unixListener) Accept() (net.Conn, error) { + s, ok := <-l.in + if !ok { + return nil, io.EOF + } + ch, incoming, err := s.newCh.Accept() + if err != nil { + return nil, err + } + go DiscardRequests(incoming) + + return &chanConn{ + Channel: ch, + laddr: &net.UnixAddr{ + Name: l.socketPath, + Net: "unix", + }, + raddr: &net.UnixAddr{ + Name: "@", + Net: "unix", + }, + }, nil +} + +// Close closes the listener. +func (l *unixListener) Close() error { + // this also closes the listener. + l.conn.forwards.remove(&net.UnixAddr{Name: l.socketPath, Net: "unix"}) + m := streamLocalChannelForwardMsg{ + l.socketPath, + } + ok, _, err := l.conn.SendRequest("cancel-streamlocal-forward@openssh.com", true, Marshal(&m)) + if err == nil && !ok { + err = errors.New("ssh: cancel-streamlocal-forward@openssh.com failed") + } + return err +} + +// Addr returns the listener's network address. +func (l *unixListener) Addr() net.Addr { + return &net.UnixAddr{ + Name: l.socketPath, + Net: "unix", + } +} diff --git a/vendor/golang.org/x/crypto/ssh/tcpip.go b/vendor/golang.org/x/crypto/ssh/tcpip.go new file mode 100644 index 000000000..acf17175d --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/tcpip.go @@ -0,0 +1,465 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +import ( + "errors" + "fmt" + "io" + "math/rand" + "net" + "strconv" + "strings" + "sync" + "time" +) + +// Listen requests the remote peer open a listening socket on +// addr. Incoming connections will be available by calling Accept on +// the returned net.Listener. The listener must be serviced, or the +// SSH connection may hang. +// N must be "tcp", "tcp4", "tcp6", or "unix". +func (c *Client) Listen(n, addr string) (net.Listener, error) { + switch n { + case "tcp", "tcp4", "tcp6": + laddr, err := net.ResolveTCPAddr(n, addr) + if err != nil { + return nil, err + } + return c.ListenTCP(laddr) + case "unix": + return c.ListenUnix(addr) + default: + return nil, fmt.Errorf("ssh: unsupported protocol: %s", n) + } +} + +// Automatic port allocation is broken with OpenSSH before 6.0. See +// also https://bugzilla.mindrot.org/show_bug.cgi?id=2017. In +// particular, OpenSSH 5.9 sends a channelOpenMsg with port number 0, +// rather than the actual port number. This means you can never open +// two different listeners with auto allocated ports. We work around +// this by trying explicit ports until we succeed. + +const openSSHPrefix = "OpenSSH_" + +var portRandomizer = rand.New(rand.NewSource(time.Now().UnixNano())) + +// isBrokenOpenSSHVersion returns true if the given version string +// specifies a version of OpenSSH that is known to have a bug in port +// forwarding. +func isBrokenOpenSSHVersion(versionStr string) bool { + i := strings.Index(versionStr, openSSHPrefix) + if i < 0 { + return false + } + i += len(openSSHPrefix) + j := i + for ; j < len(versionStr); j++ { + if versionStr[j] < '0' || versionStr[j] > '9' { + break + } + } + version, _ := strconv.Atoi(versionStr[i:j]) + return version < 6 +} + +// autoPortListenWorkaround simulates automatic port allocation by +// trying random ports repeatedly. +func (c *Client) autoPortListenWorkaround(laddr *net.TCPAddr) (net.Listener, error) { + var sshListener net.Listener + var err error + const tries = 10 + for i := 0; i < tries; i++ { + addr := *laddr + addr.Port = 1024 + portRandomizer.Intn(60000) + sshListener, err = c.ListenTCP(&addr) + if err == nil { + laddr.Port = addr.Port + return sshListener, err + } + } + return nil, fmt.Errorf("ssh: listen on random port failed after %d tries: %v", tries, err) +} + +// RFC 4254 7.1 +type channelForwardMsg struct { + addr string + rport uint32 +} + +// ListenTCP requests the remote peer open a listening socket +// on laddr. Incoming connections will be available by calling +// Accept on the returned net.Listener. +func (c *Client) ListenTCP(laddr *net.TCPAddr) (net.Listener, error) { + if laddr.Port == 0 && isBrokenOpenSSHVersion(string(c.ServerVersion())) { + return c.autoPortListenWorkaround(laddr) + } + + m := channelForwardMsg{ + laddr.IP.String(), + uint32(laddr.Port), + } + // send message + ok, resp, err := c.SendRequest("tcpip-forward", true, Marshal(&m)) + if err != nil { + return nil, err + } + if !ok { + return nil, errors.New("ssh: tcpip-forward request denied by peer") + } + + // If the original port was 0, then the remote side will + // supply a real port number in the response. + if laddr.Port == 0 { + var p struct { + Port uint32 + } + if err := Unmarshal(resp, &p); err != nil { + return nil, err + } + laddr.Port = int(p.Port) + } + + // Register this forward, using the port number we obtained. + ch := c.forwards.add(laddr) + + return &tcpListener{laddr, c, ch}, nil +} + +// forwardList stores a mapping between remote +// forward requests and the tcpListeners. +type forwardList struct { + sync.Mutex + entries []forwardEntry +} + +// forwardEntry represents an established mapping of a laddr on a +// remote ssh server to a channel connected to a tcpListener. +type forwardEntry struct { + laddr net.Addr + c chan forward +} + +// forward represents an incoming forwarded tcpip connection. The +// arguments to add/remove/lookup should be address as specified in +// the original forward-request. +type forward struct { + newCh NewChannel // the ssh client channel underlying this forward + raddr net.Addr // the raddr of the incoming connection +} + +func (l *forwardList) add(addr net.Addr) chan forward { + l.Lock() + defer l.Unlock() + f := forwardEntry{ + laddr: addr, + c: make(chan forward, 1), + } + l.entries = append(l.entries, f) + return f.c +} + +// See RFC 4254, section 7.2 +type forwardedTCPPayload struct { + Addr string + Port uint32 + OriginAddr string + OriginPort uint32 +} + +// parseTCPAddr parses the originating address from the remote into a *net.TCPAddr. +func parseTCPAddr(addr string, port uint32) (*net.TCPAddr, error) { + if port == 0 || port > 65535 { + return nil, fmt.Errorf("ssh: port number out of range: %d", port) + } + ip := net.ParseIP(string(addr)) + if ip == nil { + return nil, fmt.Errorf("ssh: cannot parse IP address %q", addr) + } + return &net.TCPAddr{IP: ip, Port: int(port)}, nil +} + +func (l *forwardList) handleChannels(in <-chan NewChannel) { + for ch := range in { + var ( + laddr net.Addr + raddr net.Addr + err error + ) + switch channelType := ch.ChannelType(); channelType { + case "forwarded-tcpip": + var payload forwardedTCPPayload + if err = Unmarshal(ch.ExtraData(), &payload); err != nil { + ch.Reject(ConnectionFailed, "could not parse forwarded-tcpip payload: "+err.Error()) + continue + } + + // RFC 4254 section 7.2 specifies that incoming + // addresses should list the address, in string + // format. It is implied that this should be an IP + // address, as it would be impossible to connect to it + // otherwise. + laddr, err = parseTCPAddr(payload.Addr, payload.Port) + if err != nil { + ch.Reject(ConnectionFailed, err.Error()) + continue + } + raddr, err = parseTCPAddr(payload.OriginAddr, payload.OriginPort) + if err != nil { + ch.Reject(ConnectionFailed, err.Error()) + continue + } + + case "forwarded-streamlocal@openssh.com": + var payload forwardedStreamLocalPayload + if err = Unmarshal(ch.ExtraData(), &payload); err != nil { + ch.Reject(ConnectionFailed, "could not parse forwarded-streamlocal@openssh.com payload: "+err.Error()) + continue + } + laddr = &net.UnixAddr{ + Name: payload.SocketPath, + Net: "unix", + } + raddr = &net.UnixAddr{ + Name: "@", + Net: "unix", + } + default: + panic(fmt.Errorf("ssh: unknown channel type %s", channelType)) + } + if ok := l.forward(laddr, raddr, ch); !ok { + // Section 7.2, implementations MUST reject spurious incoming + // connections. + ch.Reject(Prohibited, "no forward for address") + continue + } + + } +} + +// remove removes the forward entry, and the channel feeding its +// listener. +func (l *forwardList) remove(addr net.Addr) { + l.Lock() + defer l.Unlock() + for i, f := range l.entries { + if addr.Network() == f.laddr.Network() && addr.String() == f.laddr.String() { + l.entries = append(l.entries[:i], l.entries[i+1:]...) + close(f.c) + return + } + } +} + +// closeAll closes and clears all forwards. +func (l *forwardList) closeAll() { + l.Lock() + defer l.Unlock() + for _, f := range l.entries { + close(f.c) + } + l.entries = nil +} + +func (l *forwardList) forward(laddr, raddr net.Addr, ch NewChannel) bool { + l.Lock() + defer l.Unlock() + for _, f := range l.entries { + if laddr.Network() == f.laddr.Network() && laddr.String() == f.laddr.String() { + f.c <- forward{newCh: ch, raddr: raddr} + return true + } + } + return false +} + +type tcpListener struct { + laddr *net.TCPAddr + + conn *Client + in <-chan forward +} + +// Accept waits for and returns the next connection to the listener. +func (l *tcpListener) Accept() (net.Conn, error) { + s, ok := <-l.in + if !ok { + return nil, io.EOF + } + ch, incoming, err := s.newCh.Accept() + if err != nil { + return nil, err + } + go DiscardRequests(incoming) + + return &chanConn{ + Channel: ch, + laddr: l.laddr, + raddr: s.raddr, + }, nil +} + +// Close closes the listener. +func (l *tcpListener) Close() error { + m := channelForwardMsg{ + l.laddr.IP.String(), + uint32(l.laddr.Port), + } + + // this also closes the listener. + l.conn.forwards.remove(l.laddr) + ok, _, err := l.conn.SendRequest("cancel-tcpip-forward", true, Marshal(&m)) + if err == nil && !ok { + err = errors.New("ssh: cancel-tcpip-forward failed") + } + return err +} + +// Addr returns the listener's network address. +func (l *tcpListener) Addr() net.Addr { + return l.laddr +} + +// Dial initiates a connection to the addr from the remote host. +// The resulting connection has a zero LocalAddr() and RemoteAddr(). +func (c *Client) Dial(n, addr string) (net.Conn, error) { + var ch Channel + switch n { + case "tcp", "tcp4", "tcp6": + // Parse the address into host and numeric port. + host, portString, err := net.SplitHostPort(addr) + if err != nil { + return nil, err + } + port, err := strconv.ParseUint(portString, 10, 16) + if err != nil { + return nil, err + } + ch, err = c.dial(net.IPv4zero.String(), 0, host, int(port)) + if err != nil { + return nil, err + } + // Use a zero address for local and remote address. + zeroAddr := &net.TCPAddr{ + IP: net.IPv4zero, + Port: 0, + } + return &chanConn{ + Channel: ch, + laddr: zeroAddr, + raddr: zeroAddr, + }, nil + case "unix": + var err error + ch, err = c.dialStreamLocal(addr) + if err != nil { + return nil, err + } + return &chanConn{ + Channel: ch, + laddr: &net.UnixAddr{ + Name: "@", + Net: "unix", + }, + raddr: &net.UnixAddr{ + Name: addr, + Net: "unix", + }, + }, nil + default: + return nil, fmt.Errorf("ssh: unsupported protocol: %s", n) + } +} + +// DialTCP connects to the remote address raddr on the network net, +// which must be "tcp", "tcp4", or "tcp6". If laddr is not nil, it is used +// as the local address for the connection. +func (c *Client) DialTCP(n string, laddr, raddr *net.TCPAddr) (net.Conn, error) { + if laddr == nil { + laddr = &net.TCPAddr{ + IP: net.IPv4zero, + Port: 0, + } + } + ch, err := c.dial(laddr.IP.String(), laddr.Port, raddr.IP.String(), raddr.Port) + if err != nil { + return nil, err + } + return &chanConn{ + Channel: ch, + laddr: laddr, + raddr: raddr, + }, nil +} + +// RFC 4254 7.2 +type channelOpenDirectMsg struct { + raddr string + rport uint32 + laddr string + lport uint32 +} + +func (c *Client) dial(laddr string, lport int, raddr string, rport int) (Channel, error) { + msg := channelOpenDirectMsg{ + raddr: raddr, + rport: uint32(rport), + laddr: laddr, + lport: uint32(lport), + } + ch, in, err := c.OpenChannel("direct-tcpip", Marshal(&msg)) + if err != nil { + return nil, err + } + go DiscardRequests(in) + return ch, err +} + +type tcpChan struct { + Channel // the backing channel +} + +// chanConn fulfills the net.Conn interface without +// the tcpChan having to hold laddr or raddr directly. +type chanConn struct { + Channel + laddr, raddr net.Addr +} + +// LocalAddr returns the local network address. +func (t *chanConn) LocalAddr() net.Addr { + return t.laddr +} + +// RemoteAddr returns the remote network address. +func (t *chanConn) RemoteAddr() net.Addr { + return t.raddr +} + +// SetDeadline sets the read and write deadlines associated +// with the connection. +func (t *chanConn) SetDeadline(deadline time.Time) error { + if err := t.SetReadDeadline(deadline); err != nil { + return err + } + return t.SetWriteDeadline(deadline) +} + +// SetReadDeadline sets the read deadline. +// A zero value for t means Read will not time out. +// After the deadline, the error from Read will implement net.Error +// with Timeout() == true. +func (t *chanConn) SetReadDeadline(deadline time.Time) error { + // for compatibility with previous version, + // the error message contains "tcpChan" + return errors.New("ssh: tcpChan: deadline not supported") +} + +// SetWriteDeadline exists to satisfy the net.Conn interface +// but is not implemented by this type. It always returns an error. +func (t *chanConn) SetWriteDeadline(deadline time.Time) error { + return errors.New("ssh: tcpChan: deadline not supported") +} diff --git a/vendor/golang.org/x/crypto/ssh/tcpip_test.go b/vendor/golang.org/x/crypto/ssh/tcpip_test.go new file mode 100644 index 000000000..f1265cb49 --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/tcpip_test.go @@ -0,0 +1,20 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +import ( + "testing" +) + +func TestAutoPortListenBroken(t *testing.T) { + broken := "SSH-2.0-OpenSSH_5.9hh11" + works := "SSH-2.0-OpenSSH_6.1" + if !isBrokenOpenSSHVersion(broken) { + t.Errorf("version %q not marked as broken", broken) + } + if isBrokenOpenSSHVersion(works) { + t.Errorf("version %q marked as broken", works) + } +} diff --git a/vendor/golang.org/x/crypto/ssh/terminal/terminal_test.go b/vendor/golang.org/x/crypto/ssh/terminal/terminal_test.go new file mode 100644 index 000000000..901c72ab3 --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/terminal/terminal_test.go @@ -0,0 +1,350 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package terminal + +import ( + "bytes" + "io" + "os" + "testing" +) + +type MockTerminal struct { + toSend []byte + bytesPerRead int + received []byte +} + +func (c *MockTerminal) Read(data []byte) (n int, err error) { + n = len(data) + if n == 0 { + return + } + if n > len(c.toSend) { + n = len(c.toSend) + } + if n == 0 { + return 0, io.EOF + } + if c.bytesPerRead > 0 && n > c.bytesPerRead { + n = c.bytesPerRead + } + copy(data, c.toSend[:n]) + c.toSend = c.toSend[n:] + return +} + +func (c *MockTerminal) Write(data []byte) (n int, err error) { + c.received = append(c.received, data...) + return len(data), nil +} + +func TestClose(t *testing.T) { + c := &MockTerminal{} + ss := NewTerminal(c, "> ") + line, err := ss.ReadLine() + if line != "" { + t.Errorf("Expected empty line but got: %s", line) + } + if err != io.EOF { + t.Errorf("Error should have been EOF but got: %s", err) + } +} + +var keyPressTests = []struct { + in string + line string + err error + throwAwayLines int +}{ + { + err: io.EOF, + }, + { + in: "\r", + line: "", + }, + { + in: "foo\r", + line: "foo", + }, + { + in: "a\x1b[Cb\r", // right + line: "ab", + }, + { + in: "a\x1b[Db\r", // left + line: "ba", + }, + { + in: "a\177b\r", // backspace + line: "b", + }, + { + in: "\x1b[A\r", // up + }, + { + in: "\x1b[B\r", // down + }, + { + in: "line\x1b[A\x1b[B\r", // up then down + line: "line", + }, + { + in: "line1\rline2\x1b[A\r", // recall previous line. + line: "line1", + throwAwayLines: 1, + }, + { + // recall two previous lines and append. + in: "line1\rline2\rline3\x1b[A\x1b[Axxx\r", + line: "line1xxx", + throwAwayLines: 2, + }, + { + // Ctrl-A to move to beginning of line followed by ^K to kill + // line. + in: "a b \001\013\r", + line: "", + }, + { + // Ctrl-A to move to beginning of line, Ctrl-E to move to end, + // finally ^K to kill nothing. + in: "a b \001\005\013\r", + line: "a b ", + }, + { + in: "\027\r", + line: "", + }, + { + in: "a\027\r", + line: "", + }, + { + in: "a \027\r", + line: "", + }, + { + in: "a b\027\r", + line: "a ", + }, + { + in: "a b \027\r", + line: "a ", + }, + { + in: "one two thr\x1b[D\027\r", + line: "one two r", + }, + { + in: "\013\r", + line: "", + }, + { + in: "a\013\r", + line: "a", + }, + { + in: "ab\x1b[D\013\r", + line: "a", + }, + { + in: "Ξεσκεπάζω\r", + line: "Ξεσκεπάζω", + }, + { + in: "£\r\x1b[A\177\r", // non-ASCII char, enter, up, backspace. + line: "", + throwAwayLines: 1, + }, + { + in: "£\r££\x1b[A\x1b[B\177\r", // non-ASCII char, enter, 2x non-ASCII, up, down, backspace, enter. + line: "£", + throwAwayLines: 1, + }, + { + // Ctrl-D at the end of the line should be ignored. + in: "a\004\r", + line: "a", + }, + { + // a, b, left, Ctrl-D should erase the b. + in: "ab\x1b[D\004\r", + line: "a", + }, + { + // a, b, c, d, left, left, ^U should erase to the beginning of + // the line. + in: "abcd\x1b[D\x1b[D\025\r", + line: "cd", + }, + { + // Bracketed paste mode: control sequences should be returned + // verbatim in paste mode. + in: "abc\x1b[200~de\177f\x1b[201~\177\r", + line: "abcde\177", + }, + { + // Enter in bracketed paste mode should still work. + in: "abc\x1b[200~d\refg\x1b[201~h\r", + line: "efgh", + throwAwayLines: 1, + }, + { + // Lines consisting entirely of pasted data should be indicated as such. + in: "\x1b[200~a\r", + line: "a", + err: ErrPasteIndicator, + }, +} + +func TestKeyPresses(t *testing.T) { + for i, test := range keyPressTests { + for j := 1; j < len(test.in); j++ { + c := &MockTerminal{ + toSend: []byte(test.in), + bytesPerRead: j, + } + ss := NewTerminal(c, "> ") + for k := 0; k < test.throwAwayLines; k++ { + _, err := ss.ReadLine() + if err != nil { + t.Errorf("Throwaway line %d from test %d resulted in error: %s", k, i, err) + } + } + line, err := ss.ReadLine() + if line != test.line { + t.Errorf("Line resulting from test %d (%d bytes per read) was '%s', expected '%s'", i, j, line, test.line) + break + } + if err != test.err { + t.Errorf("Error resulting from test %d (%d bytes per read) was '%v', expected '%v'", i, j, err, test.err) + break + } + } + } +} + +func TestPasswordNotSaved(t *testing.T) { + c := &MockTerminal{ + toSend: []byte("password\r\x1b[A\r"), + bytesPerRead: 1, + } + ss := NewTerminal(c, "> ") + pw, _ := ss.ReadPassword("> ") + if pw != "password" { + t.Fatalf("failed to read password, got %s", pw) + } + line, _ := ss.ReadLine() + if len(line) > 0 { + t.Fatalf("password was saved in history") + } +} + +var setSizeTests = []struct { + width, height int +}{ + {40, 13}, + {80, 24}, + {132, 43}, +} + +func TestTerminalSetSize(t *testing.T) { + for _, setSize := range setSizeTests { + c := &MockTerminal{ + toSend: []byte("password\r\x1b[A\r"), + bytesPerRead: 1, + } + ss := NewTerminal(c, "> ") + ss.SetSize(setSize.width, setSize.height) + pw, _ := ss.ReadPassword("Password: ") + if pw != "password" { + t.Fatalf("failed to read password, got %s", pw) + } + if string(c.received) != "Password: \r\n" { + t.Errorf("failed to set the temporary prompt expected %q, got %q", "Password: ", c.received) + } + } +} + +func TestReadPasswordLineEnd(t *testing.T) { + var tests = []struct { + input string + want string + }{ + {"\n", ""}, + {"\r\n", ""}, + {"test\r\n", "test"}, + {"testtesttesttes\n", "testtesttesttes"}, + {"testtesttesttes\r\n", "testtesttesttes"}, + {"testtesttesttesttest\n", "testtesttesttesttest"}, + {"testtesttesttesttest\r\n", "testtesttesttesttest"}, + } + for _, test := range tests { + buf := new(bytes.Buffer) + if _, err := buf.WriteString(test.input); err != nil { + t.Fatal(err) + } + + have, err := readPasswordLine(buf) + if err != nil { + t.Errorf("readPasswordLine(%q) failed: %v", test.input, err) + continue + } + if string(have) != test.want { + t.Errorf("readPasswordLine(%q) returns %q, but %q is expected", test.input, string(have), test.want) + continue + } + + if _, err = buf.WriteString(test.input); err != nil { + t.Fatal(err) + } + have, err = readPasswordLine(buf) + if err != nil { + t.Errorf("readPasswordLine(%q) failed: %v", test.input, err) + continue + } + if string(have) != test.want { + t.Errorf("readPasswordLine(%q) returns %q, but %q is expected", test.input, string(have), test.want) + continue + } + } +} + +func TestMakeRawState(t *testing.T) { + fd := int(os.Stdout.Fd()) + if !IsTerminal(fd) { + t.Skip("stdout is not a terminal; skipping test") + } + + st, err := GetState(fd) + if err != nil { + t.Fatalf("failed to get terminal state from GetState: %s", err) + } + defer Restore(fd, st) + raw, err := MakeRaw(fd) + if err != nil { + t.Fatalf("failed to get terminal state from MakeRaw: %s", err) + } + + if *st != *raw { + t.Errorf("states do not match; was %v, expected %v", raw, st) + } +} + +func TestOutputNewlines(t *testing.T) { + // \n should be changed to \r\n in terminal output. + buf := new(bytes.Buffer) + term := NewTerminal(buf, ">") + + term.Write([]byte("1\n2\n")) + output := string(buf.Bytes()) + const expected = "1\r\n2\r\n" + + if output != expected { + t.Errorf("incorrect output: was %q, expected %q", output, expected) + } +} diff --git a/vendor/golang.org/x/crypto/ssh/terminal/util.go b/vendor/golang.org/x/crypto/ssh/terminal/util.go index a37e47a21..e7404ff49 100644 --- a/vendor/golang.org/x/crypto/ssh/terminal/util.go +++ b/vendor/golang.org/x/crypto/ssh/terminal/util.go @@ -14,7 +14,7 @@ // panic(err) // } // defer terminal.Restore(0, oldState) -package terminal +package terminal // import "golang.org/x/crypto/ssh/terminal" import ( "syscall" diff --git a/vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go b/vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go index 7fd881c7f..a2e1b57dc 100644 --- a/vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go +++ b/vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go @@ -4,7 +4,7 @@ // +build solaris -package terminal +package terminal // import "golang.org/x/crypto/ssh/terminal" import ( "golang.org/x/sys/unix" diff --git a/vendor/golang.org/x/crypto/ssh/testdata_test.go b/vendor/golang.org/x/crypto/ssh/testdata_test.go new file mode 100644 index 000000000..2da8c79dc --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/testdata_test.go @@ -0,0 +1,63 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// IMPLEMENTATION NOTE: To avoid a package loop, this file is in three places: +// ssh/, ssh/agent, and ssh/test/. It should be kept in sync across all three +// instances. + +package ssh + +import ( + "crypto/rand" + "fmt" + + "golang.org/x/crypto/ssh/testdata" +) + +var ( + testPrivateKeys map[string]interface{} + testSigners map[string]Signer + testPublicKeys map[string]PublicKey +) + +func init() { + var err error + + n := len(testdata.PEMBytes) + testPrivateKeys = make(map[string]interface{}, n) + testSigners = make(map[string]Signer, n) + testPublicKeys = make(map[string]PublicKey, n) + for t, k := range testdata.PEMBytes { + testPrivateKeys[t], err = ParseRawPrivateKey(k) + if err != nil { + panic(fmt.Sprintf("Unable to parse test key %s: %v", t, err)) + } + testSigners[t], err = NewSignerFromKey(testPrivateKeys[t]) + if err != nil { + panic(fmt.Sprintf("Unable to create signer for test key %s: %v", t, err)) + } + testPublicKeys[t] = testSigners[t].PublicKey() + } + + // Create a cert and sign it for use in tests. + testCert := &Certificate{ + Nonce: []byte{}, // To pass reflect.DeepEqual after marshal & parse, this must be non-nil + ValidPrincipals: []string{"gopher1", "gopher2"}, // increases test coverage + ValidAfter: 0, // unix epoch + ValidBefore: CertTimeInfinity, // The end of currently representable time. + Reserved: []byte{}, // To pass reflect.DeepEqual after marshal & parse, this must be non-nil + Key: testPublicKeys["ecdsa"], + SignatureKey: testPublicKeys["rsa"], + Permissions: Permissions{ + CriticalOptions: map[string]string{}, + Extensions: map[string]string{}, + }, + } + testCert.SignCert(rand.Reader, testSigners["rsa"]) + testPrivateKeys["cert"] = testPrivateKeys["ecdsa"] + testSigners["cert"], err = NewCertSigner(testCert, testSigners["ecdsa"]) + if err != nil { + panic(fmt.Sprintf("Unable to create certificate signer: %v", err)) + } +} diff --git a/vendor/golang.org/x/crypto/ssh/transport.go b/vendor/golang.org/x/crypto/ssh/transport.go new file mode 100644 index 000000000..f9780e0ae --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/transport.go @@ -0,0 +1,375 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +import ( + "bufio" + "errors" + "io" + "log" +) + +// debugTransport if set, will print packet types as they go over the +// wire. No message decoding is done, to minimize the impact on timing. +const debugTransport = false + +const ( + gcmCipherID = "aes128-gcm@openssh.com" + aes128cbcID = "aes128-cbc" + tripledescbcID = "3des-cbc" +) + +// packetConn represents a transport that implements packet based +// operations. +type packetConn interface { + // Encrypt and send a packet of data to the remote peer. + writePacket(packet []byte) error + + // Read a packet from the connection. The read is blocking, + // i.e. if error is nil, then the returned byte slice is + // always non-empty. + readPacket() ([]byte, error) + + // Close closes the write-side of the connection. + Close() error +} + +// transport is the keyingTransport that implements the SSH packet +// protocol. +type transport struct { + reader connectionState + writer connectionState + + bufReader *bufio.Reader + bufWriter *bufio.Writer + rand io.Reader + isClient bool + io.Closer +} + +// packetCipher represents a combination of SSH encryption/MAC +// protocol. A single instance should be used for one direction only. +type packetCipher interface { + // writePacket encrypts the packet and writes it to w. The + // contents of the packet are generally scrambled. + writePacket(seqnum uint32, w io.Writer, rand io.Reader, packet []byte) error + + // readPacket reads and decrypts a packet of data. The + // returned packet may be overwritten by future calls of + // readPacket. + readPacket(seqnum uint32, r io.Reader) ([]byte, error) +} + +// connectionState represents one side (read or write) of the +// connection. This is necessary because each direction has its own +// keys, and can even have its own algorithms +type connectionState struct { + packetCipher + seqNum uint32 + dir direction + pendingKeyChange chan packetCipher +} + +// prepareKeyChange sets up key material for a keychange. The key changes in +// both directions are triggered by reading and writing a msgNewKey packet +// respectively. +func (t *transport) prepareKeyChange(algs *algorithms, kexResult *kexResult) error { + if ciph, err := newPacketCipher(t.reader.dir, algs.r, kexResult); err != nil { + return err + } else { + t.reader.pendingKeyChange <- ciph + } + + if ciph, err := newPacketCipher(t.writer.dir, algs.w, kexResult); err != nil { + return err + } else { + t.writer.pendingKeyChange <- ciph + } + + return nil +} + +func (t *transport) printPacket(p []byte, write bool) { + if len(p) == 0 { + return + } + who := "server" + if t.isClient { + who = "client" + } + what := "read" + if write { + what = "write" + } + + log.Println(what, who, p[0]) +} + +// Read and decrypt next packet. +func (t *transport) readPacket() (p []byte, err error) { + for { + p, err = t.reader.readPacket(t.bufReader) + if err != nil { + break + } + if len(p) == 0 || (p[0] != msgIgnore && p[0] != msgDebug) { + break + } + } + if debugTransport { + t.printPacket(p, false) + } + + return p, err +} + +func (s *connectionState) readPacket(r *bufio.Reader) ([]byte, error) { + packet, err := s.packetCipher.readPacket(s.seqNum, r) + s.seqNum++ + if err == nil && len(packet) == 0 { + err = errors.New("ssh: zero length packet") + } + + if len(packet) > 0 { + switch packet[0] { + case msgNewKeys: + select { + case cipher := <-s.pendingKeyChange: + s.packetCipher = cipher + default: + return nil, errors.New("ssh: got bogus newkeys message.") + } + + case msgDisconnect: + // Transform a disconnect message into an + // error. Since this is lowest level at which + // we interpret message types, doing it here + // ensures that we don't have to handle it + // elsewhere. + var msg disconnectMsg + if err := Unmarshal(packet, &msg); err != nil { + return nil, err + } + return nil, &msg + } + } + + // The packet may point to an internal buffer, so copy the + // packet out here. + fresh := make([]byte, len(packet)) + copy(fresh, packet) + + return fresh, err +} + +func (t *transport) writePacket(packet []byte) error { + if debugTransport { + t.printPacket(packet, true) + } + return t.writer.writePacket(t.bufWriter, t.rand, packet) +} + +func (s *connectionState) writePacket(w *bufio.Writer, rand io.Reader, packet []byte) error { + changeKeys := len(packet) > 0 && packet[0] == msgNewKeys + + err := s.packetCipher.writePacket(s.seqNum, w, rand, packet) + if err != nil { + return err + } + if err = w.Flush(); err != nil { + return err + } + s.seqNum++ + if changeKeys { + select { + case cipher := <-s.pendingKeyChange: + s.packetCipher = cipher + default: + panic("ssh: no key material for msgNewKeys") + } + } + return err +} + +func newTransport(rwc io.ReadWriteCloser, rand io.Reader, isClient bool) *transport { + t := &transport{ + bufReader: bufio.NewReader(rwc), + bufWriter: bufio.NewWriter(rwc), + rand: rand, + reader: connectionState{ + packetCipher: &streamPacketCipher{cipher: noneCipher{}}, + pendingKeyChange: make(chan packetCipher, 1), + }, + writer: connectionState{ + packetCipher: &streamPacketCipher{cipher: noneCipher{}}, + pendingKeyChange: make(chan packetCipher, 1), + }, + Closer: rwc, + } + t.isClient = isClient + + if isClient { + t.reader.dir = serverKeys + t.writer.dir = clientKeys + } else { + t.reader.dir = clientKeys + t.writer.dir = serverKeys + } + + return t +} + +type direction struct { + ivTag []byte + keyTag []byte + macKeyTag []byte +} + +var ( + serverKeys = direction{[]byte{'B'}, []byte{'D'}, []byte{'F'}} + clientKeys = direction{[]byte{'A'}, []byte{'C'}, []byte{'E'}} +) + +// generateKeys generates key material for IV, MAC and encryption. +func generateKeys(d direction, algs directionAlgorithms, kex *kexResult) (iv, key, macKey []byte) { + cipherMode := cipherModes[algs.Cipher] + macMode := macModes[algs.MAC] + + iv = make([]byte, cipherMode.ivSize) + key = make([]byte, cipherMode.keySize) + macKey = make([]byte, macMode.keySize) + + generateKeyMaterial(iv, d.ivTag, kex) + generateKeyMaterial(key, d.keyTag, kex) + generateKeyMaterial(macKey, d.macKeyTag, kex) + return +} + +// setupKeys sets the cipher and MAC keys from kex.K, kex.H and sessionId, as +// described in RFC 4253, section 6.4. direction should either be serverKeys +// (to setup server->client keys) or clientKeys (for client->server keys). +func newPacketCipher(d direction, algs directionAlgorithms, kex *kexResult) (packetCipher, error) { + iv, key, macKey := generateKeys(d, algs, kex) + + if algs.Cipher == gcmCipherID { + return newGCMCipher(iv, key, macKey) + } + + if algs.Cipher == aes128cbcID { + return newAESCBCCipher(iv, key, macKey, algs) + } + + if algs.Cipher == tripledescbcID { + return newTripleDESCBCCipher(iv, key, macKey, algs) + } + + c := &streamPacketCipher{ + mac: macModes[algs.MAC].new(macKey), + etm: macModes[algs.MAC].etm, + } + c.macResult = make([]byte, c.mac.Size()) + + var err error + c.cipher, err = cipherModes[algs.Cipher].createStream(key, iv) + if err != nil { + return nil, err + } + + return c, nil +} + +// generateKeyMaterial fills out with key material generated from tag, K, H +// and sessionId, as specified in RFC 4253, section 7.2. +func generateKeyMaterial(out, tag []byte, r *kexResult) { + var digestsSoFar []byte + + h := r.Hash.New() + for len(out) > 0 { + h.Reset() + h.Write(r.K) + h.Write(r.H) + + if len(digestsSoFar) == 0 { + h.Write(tag) + h.Write(r.SessionID) + } else { + h.Write(digestsSoFar) + } + + digest := h.Sum(nil) + n := copy(out, digest) + out = out[n:] + if len(out) > 0 { + digestsSoFar = append(digestsSoFar, digest...) + } + } +} + +const packageVersion = "SSH-2.0-Go" + +// Sends and receives a version line. The versionLine string should +// be US ASCII, start with "SSH-2.0-", and should not include a +// newline. exchangeVersions returns the other side's version line. +func exchangeVersions(rw io.ReadWriter, versionLine []byte) (them []byte, err error) { + // Contrary to the RFC, we do not ignore lines that don't + // start with "SSH-2.0-" to make the library usable with + // nonconforming servers. + for _, c := range versionLine { + // The spec disallows non US-ASCII chars, and + // specifically forbids null chars. + if c < 32 { + return nil, errors.New("ssh: junk character in version line") + } + } + if _, err = rw.Write(append(versionLine, '\r', '\n')); err != nil { + return + } + + them, err = readVersion(rw) + return them, err +} + +// maxVersionStringBytes is the maximum number of bytes that we'll +// accept as a version string. RFC 4253 section 4.2 limits this at 255 +// chars +const maxVersionStringBytes = 255 + +// Read version string as specified by RFC 4253, section 4.2. +func readVersion(r io.Reader) ([]byte, error) { + versionString := make([]byte, 0, 64) + var ok bool + var buf [1]byte + + for len(versionString) < maxVersionStringBytes { + _, err := io.ReadFull(r, buf[:]) + if err != nil { + return nil, err + } + // The RFC says that the version should be terminated with \r\n + // but several SSH servers actually only send a \n. + if buf[0] == '\n' { + ok = true + break + } + + // non ASCII chars are disallowed, but we are lenient, + // since Go doesn't use null-terminated strings. + + // The RFC allows a comment after a space, however, + // all of it (version and comments) goes into the + // session hash. + versionString = append(versionString, buf[0]) + } + + if !ok { + return nil, errors.New("ssh: overflow reading version string") + } + + // There might be a '\r' on the end which we should remove. + if len(versionString) > 0 && versionString[len(versionString)-1] == '\r' { + versionString = versionString[:len(versionString)-1] + } + return versionString, nil +} diff --git a/vendor/golang.org/x/crypto/ssh/transport_test.go b/vendor/golang.org/x/crypto/ssh/transport_test.go new file mode 100644 index 000000000..92d83abf9 --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/transport_test.go @@ -0,0 +1,109 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ssh + +import ( + "bytes" + "crypto/rand" + "encoding/binary" + "strings" + "testing" +) + +func TestReadVersion(t *testing.T) { + longversion := strings.Repeat("SSH-2.0-bla", 50)[:253] + cases := map[string]string{ + "SSH-2.0-bla\r\n": "SSH-2.0-bla", + "SSH-2.0-bla\n": "SSH-2.0-bla", + longversion + "\r\n": longversion, + } + + for in, want := range cases { + result, err := readVersion(bytes.NewBufferString(in)) + if err != nil { + t.Errorf("readVersion(%q): %s", in, err) + } + got := string(result) + if got != want { + t.Errorf("got %q, want %q", got, want) + } + } +} + +func TestReadVersionError(t *testing.T) { + longversion := strings.Repeat("SSH-2.0-bla", 50)[:253] + cases := []string{ + longversion + "too-long\r\n", + } + for _, in := range cases { + if _, err := readVersion(bytes.NewBufferString(in)); err == nil { + t.Errorf("readVersion(%q) should have failed", in) + } + } +} + +func TestExchangeVersionsBasic(t *testing.T) { + v := "SSH-2.0-bla" + buf := bytes.NewBufferString(v + "\r\n") + them, err := exchangeVersions(buf, []byte("xyz")) + if err != nil { + t.Errorf("exchangeVersions: %v", err) + } + + if want := "SSH-2.0-bla"; string(them) != want { + t.Errorf("got %q want %q for our version", them, want) + } +} + +func TestExchangeVersions(t *testing.T) { + cases := []string{ + "not\x000allowed", + "not allowed\n", + } + for _, c := range cases { + buf := bytes.NewBufferString("SSH-2.0-bla\r\n") + if _, err := exchangeVersions(buf, []byte(c)); err == nil { + t.Errorf("exchangeVersions(%q): should have failed", c) + } + } +} + +type closerBuffer struct { + bytes.Buffer +} + +func (b *closerBuffer) Close() error { + return nil +} + +func TestTransportMaxPacketWrite(t *testing.T) { + buf := &closerBuffer{} + tr := newTransport(buf, rand.Reader, true) + huge := make([]byte, maxPacket+1) + err := tr.writePacket(huge) + if err == nil { + t.Errorf("transport accepted write for a huge packet.") + } +} + +func TestTransportMaxPacketReader(t *testing.T) { + var header [5]byte + huge := make([]byte, maxPacket+128) + binary.BigEndian.PutUint32(header[0:], uint32(len(huge))) + // padding. + header[4] = 0 + + buf := &closerBuffer{} + buf.Write(header[:]) + buf.Write(huge) + + tr := newTransport(buf, rand.Reader, true) + _, err := tr.readPacket() + if err == nil { + t.Errorf("transport succeeded reading huge packet.") + } else if !strings.Contains(err.Error(), "large") { + t.Errorf("got %q, should mention %q", err.Error(), "large") + } +} diff --git a/vendor/golang.org/x/net/.gitattributes b/vendor/golang.org/x/net/.gitattributes new file mode 100644 index 000000000..d2f212e5d --- /dev/null +++ b/vendor/golang.org/x/net/.gitattributes @@ -0,0 +1,10 @@ +# Treat all files in this repo as binary, with no git magic updating +# line endings. Windows users contributing to Go will need to use a +# modern version of git and editors capable of LF line endings. +# +# We'll prevent accidental CRLF line endings from entering the repo +# via the git-review gofmt checks. +# +# See golang.org/issue/9281 + +* -text diff --git a/vendor/golang.org/x/net/.gitignore b/vendor/golang.org/x/net/.gitignore new file mode 100644 index 000000000..8339fd61d --- /dev/null +++ b/vendor/golang.org/x/net/.gitignore @@ -0,0 +1,2 @@ +# Add no patterns to .hgignore except for files generated by the build. +last-change diff --git a/vendor/golang.org/x/net/CONTRIBUTING.md b/vendor/golang.org/x/net/CONTRIBUTING.md new file mode 100644 index 000000000..88dff59bc --- /dev/null +++ b/vendor/golang.org/x/net/CONTRIBUTING.md @@ -0,0 +1,31 @@ +# Contributing to Go + +Go is an open source project. + +It is the work of hundreds of contributors. We appreciate your help! + + +## Filing issues + +When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions: + +1. What version of Go are you using (`go version`)? +2. What operating system and processor architecture are you using? +3. What did you do? +4. What did you expect to see? +5. What did you see instead? + +General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker. +The gophers there will answer or ask you to file an issue if you've tripped over a bug. + +## Contributing code + +Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) +before sending patches. + +**We do not accept GitHub pull requests** +(we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review). + +Unless otherwise noted, the Go source files are distributed under +the BSD-style license found in the LICENSE file. + diff --git a/vendor/golang.org/x/net/README.md b/vendor/golang.org/x/net/README.md new file mode 100644 index 000000000..00a9b6eb2 --- /dev/null +++ b/vendor/golang.org/x/net/README.md @@ -0,0 +1,16 @@ +# Go Networking + +This repository holds supplementary Go networking libraries. + +## Download/Install + +The easiest way to install is to run `go get -u golang.org/x/net`. You can +also manually git clone the repository to `$GOPATH/src/golang.org/x/net`. + +## Report Issues / Send Patches + +This repository uses Gerrit for code changes. To learn how to submit +changes to this repository, see https://golang.org/doc/contribute.html. +The main issue tracker for the net repository is located at +https://github.com/golang/go/issues. Prefix your issue with "x/net:" in the +subject line, so it is easy to find. diff --git a/vendor/golang.org/x/net/codereview.cfg b/vendor/golang.org/x/net/codereview.cfg new file mode 100644 index 000000000..3f8b14b64 --- /dev/null +++ b/vendor/golang.org/x/net/codereview.cfg @@ -0,0 +1 @@ +issuerepo: golang/go diff --git a/vendor/golang.org/x/net/context/context.go b/vendor/golang.org/x/net/context/context.go index a25301a76..d3681ab42 100644 --- a/vendor/golang.org/x/net/context/context.go +++ b/vendor/golang.org/x/net/context/context.go @@ -34,7 +34,7 @@ // // See http://blog.golang.org/context for example code for a server that uses // Contexts. -package context +package context // import "golang.org/x/net/context" // Background returns a non-nil, empty Context. It is never canceled, has no // values, and has no deadline. It is typically used by the main function, diff --git a/vendor/golang.org/x/net/context/context_test.go b/vendor/golang.org/x/net/context/context_test.go new file mode 100644 index 000000000..62844131b --- /dev/null +++ b/vendor/golang.org/x/net/context/context_test.go @@ -0,0 +1,583 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !go1.7 + +package context + +import ( + "fmt" + "math/rand" + "runtime" + "strings" + "sync" + "testing" + "time" +) + +// otherContext is a Context that's not one of the types defined in context.go. +// This lets us test code paths that differ based on the underlying type of the +// Context. +type otherContext struct { + Context +} + +func TestBackground(t *testing.T) { + c := Background() + if c == nil { + t.Fatalf("Background returned nil") + } + select { + case x := <-c.Done(): + t.Errorf("<-c.Done() == %v want nothing (it should block)", x) + default: + } + if got, want := fmt.Sprint(c), "context.Background"; got != want { + t.Errorf("Background().String() = %q want %q", got, want) + } +} + +func TestTODO(t *testing.T) { + c := TODO() + if c == nil { + t.Fatalf("TODO returned nil") + } + select { + case x := <-c.Done(): + t.Errorf("<-c.Done() == %v want nothing (it should block)", x) + default: + } + if got, want := fmt.Sprint(c), "context.TODO"; got != want { + t.Errorf("TODO().String() = %q want %q", got, want) + } +} + +func TestWithCancel(t *testing.T) { + c1, cancel := WithCancel(Background()) + + if got, want := fmt.Sprint(c1), "context.Background.WithCancel"; got != want { + t.Errorf("c1.String() = %q want %q", got, want) + } + + o := otherContext{c1} + c2, _ := WithCancel(o) + contexts := []Context{c1, o, c2} + + for i, c := range contexts { + if d := c.Done(); d == nil { + t.Errorf("c[%d].Done() == %v want non-nil", i, d) + } + if e := c.Err(); e != nil { + t.Errorf("c[%d].Err() == %v want nil", i, e) + } + + select { + case x := <-c.Done(): + t.Errorf("<-c.Done() == %v want nothing (it should block)", x) + default: + } + } + + cancel() + time.Sleep(100 * time.Millisecond) // let cancelation propagate + + for i, c := range contexts { + select { + case <-c.Done(): + default: + t.Errorf("<-c[%d].Done() blocked, but shouldn't have", i) + } + if e := c.Err(); e != Canceled { + t.Errorf("c[%d].Err() == %v want %v", i, e, Canceled) + } + } +} + +func TestParentFinishesChild(t *testing.T) { + // Context tree: + // parent -> cancelChild + // parent -> valueChild -> timerChild + parent, cancel := WithCancel(Background()) + cancelChild, stop := WithCancel(parent) + defer stop() + valueChild := WithValue(parent, "key", "value") + timerChild, stop := WithTimeout(valueChild, 10000*time.Hour) + defer stop() + + select { + case x := <-parent.Done(): + t.Errorf("<-parent.Done() == %v want nothing (it should block)", x) + case x := <-cancelChild.Done(): + t.Errorf("<-cancelChild.Done() == %v want nothing (it should block)", x) + case x := <-timerChild.Done(): + t.Errorf("<-timerChild.Done() == %v want nothing (it should block)", x) + case x := <-valueChild.Done(): + t.Errorf("<-valueChild.Done() == %v want nothing (it should block)", x) + default: + } + + // The parent's children should contain the two cancelable children. + pc := parent.(*cancelCtx) + cc := cancelChild.(*cancelCtx) + tc := timerChild.(*timerCtx) + pc.mu.Lock() + if len(pc.children) != 2 || !pc.children[cc] || !pc.children[tc] { + t.Errorf("bad linkage: pc.children = %v, want %v and %v", + pc.children, cc, tc) + } + pc.mu.Unlock() + + if p, ok := parentCancelCtx(cc.Context); !ok || p != pc { + t.Errorf("bad linkage: parentCancelCtx(cancelChild.Context) = %v, %v want %v, true", p, ok, pc) + } + if p, ok := parentCancelCtx(tc.Context); !ok || p != pc { + t.Errorf("bad linkage: parentCancelCtx(timerChild.Context) = %v, %v want %v, true", p, ok, pc) + } + + cancel() + + pc.mu.Lock() + if len(pc.children) != 0 { + t.Errorf("pc.cancel didn't clear pc.children = %v", pc.children) + } + pc.mu.Unlock() + + // parent and children should all be finished. + check := func(ctx Context, name string) { + select { + case <-ctx.Done(): + default: + t.Errorf("<-%s.Done() blocked, but shouldn't have", name) + } + if e := ctx.Err(); e != Canceled { + t.Errorf("%s.Err() == %v want %v", name, e, Canceled) + } + } + check(parent, "parent") + check(cancelChild, "cancelChild") + check(valueChild, "valueChild") + check(timerChild, "timerChild") + + // WithCancel should return a canceled context on a canceled parent. + precanceledChild := WithValue(parent, "key", "value") + select { + case <-precanceledChild.Done(): + default: + t.Errorf("<-precanceledChild.Done() blocked, but shouldn't have") + } + if e := precanceledChild.Err(); e != Canceled { + t.Errorf("precanceledChild.Err() == %v want %v", e, Canceled) + } +} + +func TestChildFinishesFirst(t *testing.T) { + cancelable, stop := WithCancel(Background()) + defer stop() + for _, parent := range []Context{Background(), cancelable} { + child, cancel := WithCancel(parent) + + select { + case x := <-parent.Done(): + t.Errorf("<-parent.Done() == %v want nothing (it should block)", x) + case x := <-child.Done(): + t.Errorf("<-child.Done() == %v want nothing (it should block)", x) + default: + } + + cc := child.(*cancelCtx) + pc, pcok := parent.(*cancelCtx) // pcok == false when parent == Background() + if p, ok := parentCancelCtx(cc.Context); ok != pcok || (ok && pc != p) { + t.Errorf("bad linkage: parentCancelCtx(cc.Context) = %v, %v want %v, %v", p, ok, pc, pcok) + } + + if pcok { + pc.mu.Lock() + if len(pc.children) != 1 || !pc.children[cc] { + t.Errorf("bad linkage: pc.children = %v, cc = %v", pc.children, cc) + } + pc.mu.Unlock() + } + + cancel() + + if pcok { + pc.mu.Lock() + if len(pc.children) != 0 { + t.Errorf("child's cancel didn't remove self from pc.children = %v", pc.children) + } + pc.mu.Unlock() + } + + // child should be finished. + select { + case <-child.Done(): + default: + t.Errorf("<-child.Done() blocked, but shouldn't have") + } + if e := child.Err(); e != Canceled { + t.Errorf("child.Err() == %v want %v", e, Canceled) + } + + // parent should not be finished. + select { + case x := <-parent.Done(): + t.Errorf("<-parent.Done() == %v want nothing (it should block)", x) + default: + } + if e := parent.Err(); e != nil { + t.Errorf("parent.Err() == %v want nil", e) + } + } +} + +func testDeadline(c Context, wait time.Duration, t *testing.T) { + select { + case <-time.After(wait): + t.Fatalf("context should have timed out") + case <-c.Done(): + } + if e := c.Err(); e != DeadlineExceeded { + t.Errorf("c.Err() == %v want %v", e, DeadlineExceeded) + } +} + +func TestDeadline(t *testing.T) { + t.Parallel() + const timeUnit = 500 * time.Millisecond + c, _ := WithDeadline(Background(), time.Now().Add(1*timeUnit)) + if got, prefix := fmt.Sprint(c), "context.Background.WithDeadline("; !strings.HasPrefix(got, prefix) { + t.Errorf("c.String() = %q want prefix %q", got, prefix) + } + testDeadline(c, 2*timeUnit, t) + + c, _ = WithDeadline(Background(), time.Now().Add(1*timeUnit)) + o := otherContext{c} + testDeadline(o, 2*timeUnit, t) + + c, _ = WithDeadline(Background(), time.Now().Add(1*timeUnit)) + o = otherContext{c} + c, _ = WithDeadline(o, time.Now().Add(3*timeUnit)) + testDeadline(c, 2*timeUnit, t) +} + +func TestTimeout(t *testing.T) { + t.Parallel() + const timeUnit = 500 * time.Millisecond + c, _ := WithTimeout(Background(), 1*timeUnit) + if got, prefix := fmt.Sprint(c), "context.Background.WithDeadline("; !strings.HasPrefix(got, prefix) { + t.Errorf("c.String() = %q want prefix %q", got, prefix) + } + testDeadline(c, 2*timeUnit, t) + + c, _ = WithTimeout(Background(), 1*timeUnit) + o := otherContext{c} + testDeadline(o, 2*timeUnit, t) + + c, _ = WithTimeout(Background(), 1*timeUnit) + o = otherContext{c} + c, _ = WithTimeout(o, 3*timeUnit) + testDeadline(c, 2*timeUnit, t) +} + +func TestCanceledTimeout(t *testing.T) { + t.Parallel() + const timeUnit = 500 * time.Millisecond + c, _ := WithTimeout(Background(), 2*timeUnit) + o := otherContext{c} + c, cancel := WithTimeout(o, 4*timeUnit) + cancel() + time.Sleep(1 * timeUnit) // let cancelation propagate + select { + case <-c.Done(): + default: + t.Errorf("<-c.Done() blocked, but shouldn't have") + } + if e := c.Err(); e != Canceled { + t.Errorf("c.Err() == %v want %v", e, Canceled) + } +} + +type key1 int +type key2 int + +var k1 = key1(1) +var k2 = key2(1) // same int as k1, different type +var k3 = key2(3) // same type as k2, different int + +func TestValues(t *testing.T) { + check := func(c Context, nm, v1, v2, v3 string) { + if v, ok := c.Value(k1).(string); ok == (len(v1) == 0) || v != v1 { + t.Errorf(`%s.Value(k1).(string) = %q, %t want %q, %t`, nm, v, ok, v1, len(v1) != 0) + } + if v, ok := c.Value(k2).(string); ok == (len(v2) == 0) || v != v2 { + t.Errorf(`%s.Value(k2).(string) = %q, %t want %q, %t`, nm, v, ok, v2, len(v2) != 0) + } + if v, ok := c.Value(k3).(string); ok == (len(v3) == 0) || v != v3 { + t.Errorf(`%s.Value(k3).(string) = %q, %t want %q, %t`, nm, v, ok, v3, len(v3) != 0) + } + } + + c0 := Background() + check(c0, "c0", "", "", "") + + c1 := WithValue(Background(), k1, "c1k1") + check(c1, "c1", "c1k1", "", "") + + if got, want := fmt.Sprint(c1), `context.Background.WithValue(1, "c1k1")`; got != want { + t.Errorf("c.String() = %q want %q", got, want) + } + + c2 := WithValue(c1, k2, "c2k2") + check(c2, "c2", "c1k1", "c2k2", "") + + c3 := WithValue(c2, k3, "c3k3") + check(c3, "c2", "c1k1", "c2k2", "c3k3") + + c4 := WithValue(c3, k1, nil) + check(c4, "c4", "", "c2k2", "c3k3") + + o0 := otherContext{Background()} + check(o0, "o0", "", "", "") + + o1 := otherContext{WithValue(Background(), k1, "c1k1")} + check(o1, "o1", "c1k1", "", "") + + o2 := WithValue(o1, k2, "o2k2") + check(o2, "o2", "c1k1", "o2k2", "") + + o3 := otherContext{c4} + check(o3, "o3", "", "c2k2", "c3k3") + + o4 := WithValue(o3, k3, nil) + check(o4, "o4", "", "c2k2", "") +} + +func TestAllocs(t *testing.T) { + bg := Background() + for _, test := range []struct { + desc string + f func() + limit float64 + gccgoLimit float64 + }{ + { + desc: "Background()", + f: func() { Background() }, + limit: 0, + gccgoLimit: 0, + }, + { + desc: fmt.Sprintf("WithValue(bg, %v, nil)", k1), + f: func() { + c := WithValue(bg, k1, nil) + c.Value(k1) + }, + limit: 3, + gccgoLimit: 3, + }, + { + desc: "WithTimeout(bg, 15*time.Millisecond)", + f: func() { + c, _ := WithTimeout(bg, 15*time.Millisecond) + <-c.Done() + }, + limit: 8, + gccgoLimit: 16, + }, + { + desc: "WithCancel(bg)", + f: func() { + c, cancel := WithCancel(bg) + cancel() + <-c.Done() + }, + limit: 5, + gccgoLimit: 8, + }, + { + desc: "WithTimeout(bg, 100*time.Millisecond)", + f: func() { + c, cancel := WithTimeout(bg, 100*time.Millisecond) + cancel() + <-c.Done() + }, + limit: 8, + gccgoLimit: 25, + }, + } { + limit := test.limit + if runtime.Compiler == "gccgo" { + // gccgo does not yet do escape analysis. + // TODO(iant): Remove this when gccgo does do escape analysis. + limit = test.gccgoLimit + } + if n := testing.AllocsPerRun(100, test.f); n > limit { + t.Errorf("%s allocs = %f want %d", test.desc, n, int(limit)) + } + } +} + +func TestSimultaneousCancels(t *testing.T) { + root, cancel := WithCancel(Background()) + m := map[Context]CancelFunc{root: cancel} + q := []Context{root} + // Create a tree of contexts. + for len(q) != 0 && len(m) < 100 { + parent := q[0] + q = q[1:] + for i := 0; i < 4; i++ { + ctx, cancel := WithCancel(parent) + m[ctx] = cancel + q = append(q, ctx) + } + } + // Start all the cancels in a random order. + var wg sync.WaitGroup + wg.Add(len(m)) + for _, cancel := range m { + go func(cancel CancelFunc) { + cancel() + wg.Done() + }(cancel) + } + // Wait on all the contexts in a random order. + for ctx := range m { + select { + case <-ctx.Done(): + case <-time.After(1 * time.Second): + buf := make([]byte, 10<<10) + n := runtime.Stack(buf, true) + t.Fatalf("timed out waiting for <-ctx.Done(); stacks:\n%s", buf[:n]) + } + } + // Wait for all the cancel functions to return. + done := make(chan struct{}) + go func() { + wg.Wait() + close(done) + }() + select { + case <-done: + case <-time.After(1 * time.Second): + buf := make([]byte, 10<<10) + n := runtime.Stack(buf, true) + t.Fatalf("timed out waiting for cancel functions; stacks:\n%s", buf[:n]) + } +} + +func TestInterlockedCancels(t *testing.T) { + parent, cancelParent := WithCancel(Background()) + child, cancelChild := WithCancel(parent) + go func() { + parent.Done() + cancelChild() + }() + cancelParent() + select { + case <-child.Done(): + case <-time.After(1 * time.Second): + buf := make([]byte, 10<<10) + n := runtime.Stack(buf, true) + t.Fatalf("timed out waiting for child.Done(); stacks:\n%s", buf[:n]) + } +} + +func TestLayersCancel(t *testing.T) { + testLayers(t, time.Now().UnixNano(), false) +} + +func TestLayersTimeout(t *testing.T) { + testLayers(t, time.Now().UnixNano(), true) +} + +func testLayers(t *testing.T, seed int64, testTimeout bool) { + rand.Seed(seed) + errorf := func(format string, a ...interface{}) { + t.Errorf(fmt.Sprintf("seed=%d: %s", seed, format), a...) + } + const ( + timeout = 200 * time.Millisecond + minLayers = 30 + ) + type value int + var ( + vals []*value + cancels []CancelFunc + numTimers int + ctx = Background() + ) + for i := 0; i < minLayers || numTimers == 0 || len(cancels) == 0 || len(vals) == 0; i++ { + switch rand.Intn(3) { + case 0: + v := new(value) + ctx = WithValue(ctx, v, v) + vals = append(vals, v) + case 1: + var cancel CancelFunc + ctx, cancel = WithCancel(ctx) + cancels = append(cancels, cancel) + case 2: + var cancel CancelFunc + ctx, cancel = WithTimeout(ctx, timeout) + cancels = append(cancels, cancel) + numTimers++ + } + } + checkValues := func(when string) { + for _, key := range vals { + if val := ctx.Value(key).(*value); key != val { + errorf("%s: ctx.Value(%p) = %p want %p", when, key, val, key) + } + } + } + select { + case <-ctx.Done(): + errorf("ctx should not be canceled yet") + default: + } + if s, prefix := fmt.Sprint(ctx), "context.Background."; !strings.HasPrefix(s, prefix) { + t.Errorf("ctx.String() = %q want prefix %q", s, prefix) + } + t.Log(ctx) + checkValues("before cancel") + if testTimeout { + select { + case <-ctx.Done(): + case <-time.After(timeout + 100*time.Millisecond): + errorf("ctx should have timed out") + } + checkValues("after timeout") + } else { + cancel := cancels[rand.Intn(len(cancels))] + cancel() + select { + case <-ctx.Done(): + default: + errorf("ctx should be canceled") + } + checkValues("after cancel") + } +} + +func TestCancelRemoves(t *testing.T) { + checkChildren := func(when string, ctx Context, want int) { + if got := len(ctx.(*cancelCtx).children); got != want { + t.Errorf("%s: context has %d children, want %d", when, got, want) + } + } + + ctx, _ := WithCancel(Background()) + checkChildren("after creation", ctx, 0) + _, cancel := WithCancel(ctx) + checkChildren("with WithCancel child ", ctx, 1) + cancel() + checkChildren("after cancelling WithCancel child", ctx, 0) + + ctx, _ = WithCancel(Background()) + checkChildren("after creation", ctx, 0) + _, cancel = WithTimeout(ctx, 60*time.Minute) + checkChildren("with WithTimeout child ", ctx, 1) + cancel() + checkChildren("after cancelling WithTimeout child", ctx, 0) +} diff --git a/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go b/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go deleted file mode 100644 index 22eabffe5..000000000 --- a/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.7 - -// Package ctxhttp provides helper functions for performing context-aware HTTP requests. -package ctxhttp - -import ( - "io" - "net/http" - "net/url" - "strings" - - "golang.org/x/net/context" -) - -// Do sends an HTTP request with the provided http.Client and returns -// an HTTP response. -// -// If the client is nil, http.DefaultClient is used. -// -// The provided ctx must be non-nil. If it is canceled or times out, -// ctx.Err() will be returned. -func Do(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error) { - if client == nil { - client = http.DefaultClient - } - resp, err := client.Do(req.WithContext(ctx)) - // If we got an error, and the context has been canceled, - // the context's error is probably more useful. - if err != nil { - select { - case <-ctx.Done(): - err = ctx.Err() - default: - } - } - return resp, err -} - -// Get issues a GET request via the Do function. -func Get(ctx context.Context, client *http.Client, url string) (*http.Response, error) { - req, err := http.NewRequest("GET", url, nil) - if err != nil { - return nil, err - } - return Do(ctx, client, req) -} - -// Head issues a HEAD request via the Do function. -func Head(ctx context.Context, client *http.Client, url string) (*http.Response, error) { - req, err := http.NewRequest("HEAD", url, nil) - if err != nil { - return nil, err - } - return Do(ctx, client, req) -} - -// Post issues a POST request via the Do function. -func Post(ctx context.Context, client *http.Client, url string, bodyType string, body io.Reader) (*http.Response, error) { - req, err := http.NewRequest("POST", url, body) - if err != nil { - return nil, err - } - req.Header.Set("Content-Type", bodyType) - return Do(ctx, client, req) -} - -// PostForm issues a POST request via the Do function. -func PostForm(ctx context.Context, client *http.Client, url string, data url.Values) (*http.Response, error) { - return Post(ctx, client, url, "application/x-www-form-urlencoded", strings.NewReader(data.Encode())) -} diff --git a/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_pre17.go b/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_pre17.go deleted file mode 100644 index 7564b2032..000000000 --- a/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_pre17.go +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !go1.7 - -package ctxhttp - -import ( - "io" - "net/http" - "net/url" - "strings" - - "golang.org/x/net/context" -) - -func nop() {} - -var ( - testHookContextDoneBeforeHeaders = nop - testHookDoReturned = nop - testHookDidBodyClose = nop -) - -// Do sends an HTTP request with the provided http.Client and returns an HTTP response. -// If the client is nil, http.DefaultClient is used. -// If the context is canceled or times out, ctx.Err() will be returned. -func Do(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error) { - if client == nil { - client = http.DefaultClient - } - - // TODO(djd): Respect any existing value of req.Cancel. - cancel := make(chan struct{}) - req.Cancel = cancel - - type responseAndError struct { - resp *http.Response - err error - } - result := make(chan responseAndError, 1) - - // Make local copies of test hooks closed over by goroutines below. - // Prevents data races in tests. - testHookDoReturned := testHookDoReturned - testHookDidBodyClose := testHookDidBodyClose - - go func() { - resp, err := client.Do(req) - testHookDoReturned() - result <- responseAndError{resp, err} - }() - - var resp *http.Response - - select { - case <-ctx.Done(): - testHookContextDoneBeforeHeaders() - close(cancel) - // Clean up after the goroutine calling client.Do: - go func() { - if r := <-result; r.resp != nil { - testHookDidBodyClose() - r.resp.Body.Close() - } - }() - return nil, ctx.Err() - case r := <-result: - var err error - resp, err = r.resp, r.err - if err != nil { - return resp, err - } - } - - c := make(chan struct{}) - go func() { - select { - case <-ctx.Done(): - close(cancel) - case <-c: - // The response's Body is closed. - } - }() - resp.Body = ¬ifyingReader{resp.Body, c} - - return resp, nil -} - -// Get issues a GET request via the Do function. -func Get(ctx context.Context, client *http.Client, url string) (*http.Response, error) { - req, err := http.NewRequest("GET", url, nil) - if err != nil { - return nil, err - } - return Do(ctx, client, req) -} - -// Head issues a HEAD request via the Do function. -func Head(ctx context.Context, client *http.Client, url string) (*http.Response, error) { - req, err := http.NewRequest("HEAD", url, nil) - if err != nil { - return nil, err - } - return Do(ctx, client, req) -} - -// Post issues a POST request via the Do function. -func Post(ctx context.Context, client *http.Client, url string, bodyType string, body io.Reader) (*http.Response, error) { - req, err := http.NewRequest("POST", url, body) - if err != nil { - return nil, err - } - req.Header.Set("Content-Type", bodyType) - return Do(ctx, client, req) -} - -// PostForm issues a POST request via the Do function. -func PostForm(ctx context.Context, client *http.Client, url string, data url.Values) (*http.Response, error) { - return Post(ctx, client, url, "application/x-www-form-urlencoded", strings.NewReader(data.Encode())) -} - -// notifyingReader is an io.ReadCloser that closes the notify channel after -// Close is called or a Read fails on the underlying ReadCloser. -type notifyingReader struct { - io.ReadCloser - notify chan<- struct{} -} - -func (r *notifyingReader) Read(p []byte) (int, error) { - n, err := r.ReadCloser.Read(p) - if err != nil && r.notify != nil { - close(r.notify) - r.notify = nil - } - return n, err -} - -func (r *notifyingReader) Close() error { - err := r.ReadCloser.Close() - if r.notify != nil { - close(r.notify) - r.notify = nil - } - return err -} diff --git a/vendor/golang.org/x/net/context/withtimeout_test.go b/vendor/golang.org/x/net/context/withtimeout_test.go new file mode 100644 index 000000000..e6f56691d --- /dev/null +++ b/vendor/golang.org/x/net/context/withtimeout_test.go @@ -0,0 +1,31 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package context_test + +import ( + "fmt" + "time" + + "golang.org/x/net/context" +) + +// This example passes a context with a timeout to tell a blocking function that +// it should abandon its work after the timeout elapses. +func ExampleWithTimeout() { + // Pass a context with a timeout to tell a blocking function that it + // should abandon its work after the timeout elapses. + ctx, cancel := context.WithTimeout(context.Background(), 50*time.Millisecond) + defer cancel() + + select { + case <-time.After(1 * time.Second): + fmt.Println("overslept") + case <-ctx.Done(): + fmt.Println(ctx.Err()) // prints "context deadline exceeded" + } + + // Output: + // context deadline exceeded +} diff --git a/vendor/golang.org/x/net/http2/ciphers_test.go b/vendor/golang.org/x/net/http2/ciphers_test.go new file mode 100644 index 000000000..764bbc8c8 --- /dev/null +++ b/vendor/golang.org/x/net/http2/ciphers_test.go @@ -0,0 +1,309 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package http2 + +import "testing" + +func TestIsBadCipherBad(t *testing.T) { + for _, c := range badCiphers { + if !isBadCipher(c) { + t.Errorf("Wrong result for isBadCipher(%d), want true", c) + } + } +} + +// verify we don't give false positives on ciphers not on blacklist +func TestIsBadCipherGood(t *testing.T) { + goodCiphers := map[uint16]string{ + cipher_TLS_DHE_RSA_WITH_AES_256_CCM: "cipher_TLS_DHE_RSA_WITH_AES_256_CCM", + cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CCM: "cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CCM", + cipher_TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: "cipher_TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256", + } + for c, name := range goodCiphers { + if isBadCipher(c) { + t.Errorf("Wrong result for isBadCipher(%d) %s, want false", c, name) + } + } +} + +// copied from https://http2.github.io/http2-spec/#BadCipherSuites, +var badCiphers = []uint16{ + cipher_TLS_NULL_WITH_NULL_NULL, + cipher_TLS_RSA_WITH_NULL_MD5, + cipher_TLS_RSA_WITH_NULL_SHA, + cipher_TLS_RSA_EXPORT_WITH_RC4_40_MD5, + cipher_TLS_RSA_WITH_RC4_128_MD5, + cipher_TLS_RSA_WITH_RC4_128_SHA, + cipher_TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5, + cipher_TLS_RSA_WITH_IDEA_CBC_SHA, + cipher_TLS_RSA_EXPORT_WITH_DES40_CBC_SHA, + cipher_TLS_RSA_WITH_DES_CBC_SHA, + cipher_TLS_RSA_WITH_3DES_EDE_CBC_SHA, + cipher_TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA, + cipher_TLS_DH_DSS_WITH_DES_CBC_SHA, + cipher_TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA, + cipher_TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA, + cipher_TLS_DH_RSA_WITH_DES_CBC_SHA, + cipher_TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA, + cipher_TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA, + cipher_TLS_DHE_DSS_WITH_DES_CBC_SHA, + cipher_TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA, + cipher_TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA, + cipher_TLS_DHE_RSA_WITH_DES_CBC_SHA, + cipher_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA, + cipher_TLS_DH_anon_EXPORT_WITH_RC4_40_MD5, + cipher_TLS_DH_anon_WITH_RC4_128_MD5, + cipher_TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA, + cipher_TLS_DH_anon_WITH_DES_CBC_SHA, + cipher_TLS_DH_anon_WITH_3DES_EDE_CBC_SHA, + cipher_TLS_KRB5_WITH_DES_CBC_SHA, + cipher_TLS_KRB5_WITH_3DES_EDE_CBC_SHA, + cipher_TLS_KRB5_WITH_RC4_128_SHA, + cipher_TLS_KRB5_WITH_IDEA_CBC_SHA, + cipher_TLS_KRB5_WITH_DES_CBC_MD5, + cipher_TLS_KRB5_WITH_3DES_EDE_CBC_MD5, + cipher_TLS_KRB5_WITH_RC4_128_MD5, + cipher_TLS_KRB5_WITH_IDEA_CBC_MD5, + cipher_TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA, + cipher_TLS_KRB5_EXPORT_WITH_RC2_CBC_40_SHA, + cipher_TLS_KRB5_EXPORT_WITH_RC4_40_SHA, + cipher_TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5, + cipher_TLS_KRB5_EXPORT_WITH_RC2_CBC_40_MD5, + cipher_TLS_KRB5_EXPORT_WITH_RC4_40_MD5, + cipher_TLS_PSK_WITH_NULL_SHA, + cipher_TLS_DHE_PSK_WITH_NULL_SHA, + cipher_TLS_RSA_PSK_WITH_NULL_SHA, + cipher_TLS_RSA_WITH_AES_128_CBC_SHA, + cipher_TLS_DH_DSS_WITH_AES_128_CBC_SHA, + cipher_TLS_DH_RSA_WITH_AES_128_CBC_SHA, + cipher_TLS_DHE_DSS_WITH_AES_128_CBC_SHA, + cipher_TLS_DHE_RSA_WITH_AES_128_CBC_SHA, + cipher_TLS_DH_anon_WITH_AES_128_CBC_SHA, + cipher_TLS_RSA_WITH_AES_256_CBC_SHA, + cipher_TLS_DH_DSS_WITH_AES_256_CBC_SHA, + cipher_TLS_DH_RSA_WITH_AES_256_CBC_SHA, + cipher_TLS_DHE_DSS_WITH_AES_256_CBC_SHA, + cipher_TLS_DHE_RSA_WITH_AES_256_CBC_SHA, + cipher_TLS_DH_anon_WITH_AES_256_CBC_SHA, + cipher_TLS_RSA_WITH_NULL_SHA256, + cipher_TLS_RSA_WITH_AES_128_CBC_SHA256, + cipher_TLS_RSA_WITH_AES_256_CBC_SHA256, + cipher_TLS_DH_DSS_WITH_AES_128_CBC_SHA256, + cipher_TLS_DH_RSA_WITH_AES_128_CBC_SHA256, + cipher_TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, + cipher_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA, + cipher_TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA, + cipher_TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA, + cipher_TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA, + cipher_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA, + cipher_TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA, + cipher_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, + cipher_TLS_DH_DSS_WITH_AES_256_CBC_SHA256, + cipher_TLS_DH_RSA_WITH_AES_256_CBC_SHA256, + cipher_TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, + cipher_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, + cipher_TLS_DH_anon_WITH_AES_128_CBC_SHA256, + cipher_TLS_DH_anon_WITH_AES_256_CBC_SHA256, + cipher_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA, + cipher_TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA, + cipher_TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA, + cipher_TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA, + cipher_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA, + cipher_TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA, + cipher_TLS_PSK_WITH_RC4_128_SHA, + cipher_TLS_PSK_WITH_3DES_EDE_CBC_SHA, + cipher_TLS_PSK_WITH_AES_128_CBC_SHA, + cipher_TLS_PSK_WITH_AES_256_CBC_SHA, + cipher_TLS_DHE_PSK_WITH_RC4_128_SHA, + cipher_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA, + cipher_TLS_DHE_PSK_WITH_AES_128_CBC_SHA, + cipher_TLS_DHE_PSK_WITH_AES_256_CBC_SHA, + cipher_TLS_RSA_PSK_WITH_RC4_128_SHA, + cipher_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA, + cipher_TLS_RSA_PSK_WITH_AES_128_CBC_SHA, + cipher_TLS_RSA_PSK_WITH_AES_256_CBC_SHA, + cipher_TLS_RSA_WITH_SEED_CBC_SHA, + cipher_TLS_DH_DSS_WITH_SEED_CBC_SHA, + cipher_TLS_DH_RSA_WITH_SEED_CBC_SHA, + cipher_TLS_DHE_DSS_WITH_SEED_CBC_SHA, + cipher_TLS_DHE_RSA_WITH_SEED_CBC_SHA, + cipher_TLS_DH_anon_WITH_SEED_CBC_SHA, + cipher_TLS_RSA_WITH_AES_128_GCM_SHA256, + cipher_TLS_RSA_WITH_AES_256_GCM_SHA384, + cipher_TLS_DH_RSA_WITH_AES_128_GCM_SHA256, + cipher_TLS_DH_RSA_WITH_AES_256_GCM_SHA384, + cipher_TLS_DH_DSS_WITH_AES_128_GCM_SHA256, + cipher_TLS_DH_DSS_WITH_AES_256_GCM_SHA384, + cipher_TLS_DH_anon_WITH_AES_128_GCM_SHA256, + cipher_TLS_DH_anon_WITH_AES_256_GCM_SHA384, + cipher_TLS_PSK_WITH_AES_128_GCM_SHA256, + cipher_TLS_PSK_WITH_AES_256_GCM_SHA384, + cipher_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256, + cipher_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384, + cipher_TLS_PSK_WITH_AES_128_CBC_SHA256, + cipher_TLS_PSK_WITH_AES_256_CBC_SHA384, + cipher_TLS_PSK_WITH_NULL_SHA256, + cipher_TLS_PSK_WITH_NULL_SHA384, + cipher_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256, + cipher_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384, + cipher_TLS_DHE_PSK_WITH_NULL_SHA256, + cipher_TLS_DHE_PSK_WITH_NULL_SHA384, + cipher_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256, + cipher_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384, + cipher_TLS_RSA_PSK_WITH_NULL_SHA256, + cipher_TLS_RSA_PSK_WITH_NULL_SHA384, + cipher_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256, + cipher_TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256, + cipher_TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256, + cipher_TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256, + cipher_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256, + cipher_TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256, + cipher_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256, + cipher_TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256, + cipher_TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256, + cipher_TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256, + cipher_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256, + cipher_TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256, + cipher_TLS_EMPTY_RENEGOTIATION_INFO_SCSV, + cipher_TLS_ECDH_ECDSA_WITH_NULL_SHA, + cipher_TLS_ECDH_ECDSA_WITH_RC4_128_SHA, + cipher_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, + cipher_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, + cipher_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, + cipher_TLS_ECDHE_ECDSA_WITH_NULL_SHA, + cipher_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, + cipher_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, + cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, + cipher_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, + cipher_TLS_ECDH_RSA_WITH_NULL_SHA, + cipher_TLS_ECDH_RSA_WITH_RC4_128_SHA, + cipher_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, + cipher_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, + cipher_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, + cipher_TLS_ECDHE_RSA_WITH_NULL_SHA, + cipher_TLS_ECDHE_RSA_WITH_RC4_128_SHA, + cipher_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, + cipher_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, + cipher_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, + cipher_TLS_ECDH_anon_WITH_NULL_SHA, + cipher_TLS_ECDH_anon_WITH_RC4_128_SHA, + cipher_TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA, + cipher_TLS_ECDH_anon_WITH_AES_128_CBC_SHA, + cipher_TLS_ECDH_anon_WITH_AES_256_CBC_SHA, + cipher_TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA, + cipher_TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA, + cipher_TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA, + cipher_TLS_SRP_SHA_WITH_AES_128_CBC_SHA, + cipher_TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA, + cipher_TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA, + cipher_TLS_SRP_SHA_WITH_AES_256_CBC_SHA, + cipher_TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA, + cipher_TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA, + cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, + cipher_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, + cipher_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, + cipher_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, + cipher_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, + cipher_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, + cipher_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, + cipher_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, + cipher_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, + cipher_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, + cipher_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, + cipher_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, + cipher_TLS_ECDHE_PSK_WITH_RC4_128_SHA, + cipher_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA, + cipher_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA, + cipher_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA, + cipher_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256, + cipher_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384, + cipher_TLS_ECDHE_PSK_WITH_NULL_SHA, + cipher_TLS_ECDHE_PSK_WITH_NULL_SHA256, + cipher_TLS_ECDHE_PSK_WITH_NULL_SHA384, + cipher_TLS_RSA_WITH_ARIA_128_CBC_SHA256, + cipher_TLS_RSA_WITH_ARIA_256_CBC_SHA384, + cipher_TLS_DH_DSS_WITH_ARIA_128_CBC_SHA256, + cipher_TLS_DH_DSS_WITH_ARIA_256_CBC_SHA384, + cipher_TLS_DH_RSA_WITH_ARIA_128_CBC_SHA256, + cipher_TLS_DH_RSA_WITH_ARIA_256_CBC_SHA384, + cipher_TLS_DHE_DSS_WITH_ARIA_128_CBC_SHA256, + cipher_TLS_DHE_DSS_WITH_ARIA_256_CBC_SHA384, + cipher_TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256, + cipher_TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384, + cipher_TLS_DH_anon_WITH_ARIA_128_CBC_SHA256, + cipher_TLS_DH_anon_WITH_ARIA_256_CBC_SHA384, + cipher_TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256, + cipher_TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384, + cipher_TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256, + cipher_TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384, + cipher_TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256, + cipher_TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384, + cipher_TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256, + cipher_TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384, + cipher_TLS_RSA_WITH_ARIA_128_GCM_SHA256, + cipher_TLS_RSA_WITH_ARIA_256_GCM_SHA384, + cipher_TLS_DH_RSA_WITH_ARIA_128_GCM_SHA256, + cipher_TLS_DH_RSA_WITH_ARIA_256_GCM_SHA384, + cipher_TLS_DH_DSS_WITH_ARIA_128_GCM_SHA256, + cipher_TLS_DH_DSS_WITH_ARIA_256_GCM_SHA384, + cipher_TLS_DH_anon_WITH_ARIA_128_GCM_SHA256, + cipher_TLS_DH_anon_WITH_ARIA_256_GCM_SHA384, + cipher_TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256, + cipher_TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384, + cipher_TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256, + cipher_TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384, + cipher_TLS_PSK_WITH_ARIA_128_CBC_SHA256, + cipher_TLS_PSK_WITH_ARIA_256_CBC_SHA384, + cipher_TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256, + cipher_TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384, + cipher_TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256, + cipher_TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384, + cipher_TLS_PSK_WITH_ARIA_128_GCM_SHA256, + cipher_TLS_PSK_WITH_ARIA_256_GCM_SHA384, + cipher_TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256, + cipher_TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384, + cipher_TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256, + cipher_TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384, + cipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256, + cipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384, + cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256, + cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384, + cipher_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256, + cipher_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384, + cipher_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256, + cipher_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384, + cipher_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256, + cipher_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384, + cipher_TLS_DH_RSA_WITH_CAMELLIA_128_GCM_SHA256, + cipher_TLS_DH_RSA_WITH_CAMELLIA_256_GCM_SHA384, + cipher_TLS_DH_DSS_WITH_CAMELLIA_128_GCM_SHA256, + cipher_TLS_DH_DSS_WITH_CAMELLIA_256_GCM_SHA384, + cipher_TLS_DH_anon_WITH_CAMELLIA_128_GCM_SHA256, + cipher_TLS_DH_anon_WITH_CAMELLIA_256_GCM_SHA384, + cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256, + cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384, + cipher_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256, + cipher_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384, + cipher_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256, + cipher_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384, + cipher_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256, + cipher_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384, + cipher_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256, + cipher_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384, + cipher_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256, + cipher_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384, + cipher_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256, + cipher_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384, + cipher_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256, + cipher_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384, + cipher_TLS_RSA_WITH_AES_128_CCM, + cipher_TLS_RSA_WITH_AES_256_CCM, + cipher_TLS_RSA_WITH_AES_128_CCM_8, + cipher_TLS_RSA_WITH_AES_256_CCM_8, + cipher_TLS_PSK_WITH_AES_128_CCM, + cipher_TLS_PSK_WITH_AES_256_CCM, + cipher_TLS_PSK_WITH_AES_128_CCM_8, + cipher_TLS_PSK_WITH_AES_256_CCM_8, +} diff --git a/vendor/golang.org/x/net/http2/databuffer_test.go b/vendor/golang.org/x/net/http2/databuffer_test.go new file mode 100644 index 000000000..028e12e52 --- /dev/null +++ b/vendor/golang.org/x/net/http2/databuffer_test.go @@ -0,0 +1,157 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.7 + +package http2 + +import ( + "bytes" + "fmt" + "reflect" + "testing" +) + +func fmtDataChunk(chunk []byte) string { + out := "" + var last byte + var count int + for _, c := range chunk { + if c != last { + if count > 0 { + out += fmt.Sprintf(" x %d ", count) + count = 0 + } + out += string([]byte{c}) + last = c + } + count++ + } + if count > 0 { + out += fmt.Sprintf(" x %d", count) + } + return out +} + +func fmtDataChunks(chunks [][]byte) string { + var out string + for _, chunk := range chunks { + out += fmt.Sprintf("{%q}", fmtDataChunk(chunk)) + } + return out +} + +func testDataBuffer(t *testing.T, wantBytes []byte, setup func(t *testing.T) *dataBuffer) { + // Run setup, then read the remaining bytes from the dataBuffer and check + // that they match wantBytes. We use different read sizes to check corner + // cases in Read. + for _, readSize := range []int{1, 2, 1 * 1024, 32 * 1024} { + t.Run(fmt.Sprintf("ReadSize=%d", readSize), func(t *testing.T) { + b := setup(t) + buf := make([]byte, readSize) + var gotRead bytes.Buffer + for { + n, err := b.Read(buf) + gotRead.Write(buf[:n]) + if err == errReadEmpty { + break + } + if err != nil { + t.Fatalf("error after %v bytes: %v", gotRead.Len(), err) + } + } + if got, want := gotRead.Bytes(), wantBytes; !bytes.Equal(got, want) { + t.Errorf("FinalRead=%q, want %q", fmtDataChunk(got), fmtDataChunk(want)) + } + }) + } +} + +func TestDataBufferAllocation(t *testing.T) { + writes := [][]byte{ + bytes.Repeat([]byte("a"), 1*1024-1), + []byte("a"), + bytes.Repeat([]byte("b"), 4*1024-1), + []byte("b"), + bytes.Repeat([]byte("c"), 8*1024-1), + []byte("c"), + bytes.Repeat([]byte("d"), 16*1024-1), + []byte("d"), + bytes.Repeat([]byte("e"), 32*1024), + } + var wantRead bytes.Buffer + for _, p := range writes { + wantRead.Write(p) + } + + testDataBuffer(t, wantRead.Bytes(), func(t *testing.T) *dataBuffer { + b := &dataBuffer{} + for _, p := range writes { + if n, err := b.Write(p); n != len(p) || err != nil { + t.Fatalf("Write(%q x %d)=%v,%v want %v,nil", p[:1], len(p), n, err, len(p)) + } + } + want := [][]byte{ + bytes.Repeat([]byte("a"), 1*1024), + bytes.Repeat([]byte("b"), 4*1024), + bytes.Repeat([]byte("c"), 8*1024), + bytes.Repeat([]byte("d"), 16*1024), + bytes.Repeat([]byte("e"), 16*1024), + bytes.Repeat([]byte("e"), 16*1024), + } + if !reflect.DeepEqual(b.chunks, want) { + t.Errorf("dataBuffer.chunks\ngot: %s\nwant: %s", fmtDataChunks(b.chunks), fmtDataChunks(want)) + } + return b + }) +} + +func TestDataBufferAllocationWithExpected(t *testing.T) { + writes := [][]byte{ + bytes.Repeat([]byte("a"), 1*1024), // allocates 16KB + bytes.Repeat([]byte("b"), 14*1024), + bytes.Repeat([]byte("c"), 15*1024), // allocates 16KB more + bytes.Repeat([]byte("d"), 2*1024), + bytes.Repeat([]byte("e"), 1*1024), // overflows 32KB expectation, allocates just 1KB + } + var wantRead bytes.Buffer + for _, p := range writes { + wantRead.Write(p) + } + + testDataBuffer(t, wantRead.Bytes(), func(t *testing.T) *dataBuffer { + b := &dataBuffer{expected: 32 * 1024} + for _, p := range writes { + if n, err := b.Write(p); n != len(p) || err != nil { + t.Fatalf("Write(%q x %d)=%v,%v want %v,nil", p[:1], len(p), n, err, len(p)) + } + } + want := [][]byte{ + append(bytes.Repeat([]byte("a"), 1*1024), append(bytes.Repeat([]byte("b"), 14*1024), bytes.Repeat([]byte("c"), 1*1024)...)...), + append(bytes.Repeat([]byte("c"), 14*1024), bytes.Repeat([]byte("d"), 2*1024)...), + bytes.Repeat([]byte("e"), 1*1024), + } + if !reflect.DeepEqual(b.chunks, want) { + t.Errorf("dataBuffer.chunks\ngot: %s\nwant: %s", fmtDataChunks(b.chunks), fmtDataChunks(want)) + } + return b + }) +} + +func TestDataBufferWriteAfterPartialRead(t *testing.T) { + testDataBuffer(t, []byte("cdxyz"), func(t *testing.T) *dataBuffer { + b := &dataBuffer{} + if n, err := b.Write([]byte("abcd")); n != 4 || err != nil { + t.Fatalf("Write(\"abcd\")=%v,%v want 4,nil", n, err) + } + p := make([]byte, 2) + if n, err := b.Read(p); n != 2 || err != nil || !bytes.Equal(p, []byte("ab")) { + t.Fatalf("Read()=%q,%v,%v want \"ab\",2,nil", p, n, err) + } + if n, err := b.Write([]byte("xyz")); n != 3 || err != nil { + t.Fatalf("Write(\"xyz\")=%v,%v want 3,nil", n, err) + } + return b + }) +} diff --git a/vendor/golang.org/x/net/http2/errors_test.go b/vendor/golang.org/x/net/http2/errors_test.go new file mode 100644 index 000000000..da5c58c31 --- /dev/null +++ b/vendor/golang.org/x/net/http2/errors_test.go @@ -0,0 +1,24 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package http2 + +import "testing" + +func TestErrCodeString(t *testing.T) { + tests := []struct { + err ErrCode + want string + }{ + {ErrCodeProtocol, "PROTOCOL_ERROR"}, + {0xd, "HTTP_1_1_REQUIRED"}, + {0xf, "unknown error code 0xf"}, + } + for i, tt := range tests { + got := tt.err.String() + if got != tt.want { + t.Errorf("%d. Error = %q; want %q", i, got, tt.want) + } + } +} diff --git a/vendor/golang.org/x/net/http2/flow_test.go b/vendor/golang.org/x/net/http2/flow_test.go new file mode 100644 index 000000000..859adf5d1 --- /dev/null +++ b/vendor/golang.org/x/net/http2/flow_test.go @@ -0,0 +1,53 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package http2 + +import "testing" + +func TestFlow(t *testing.T) { + var st flow + var conn flow + st.add(3) + conn.add(2) + + if got, want := st.available(), int32(3); got != want { + t.Errorf("available = %d; want %d", got, want) + } + st.setConnFlow(&conn) + if got, want := st.available(), int32(2); got != want { + t.Errorf("after parent setup, available = %d; want %d", got, want) + } + + st.take(2) + if got, want := conn.available(), int32(0); got != want { + t.Errorf("after taking 2, conn = %d; want %d", got, want) + } + if got, want := st.available(), int32(0); got != want { + t.Errorf("after taking 2, stream = %d; want %d", got, want) + } +} + +func TestFlowAdd(t *testing.T) { + var f flow + if !f.add(1) { + t.Fatal("failed to add 1") + } + if !f.add(-1) { + t.Fatal("failed to add -1") + } + if got, want := f.available(), int32(0); got != want { + t.Fatalf("size = %d; want %d", got, want) + } + if !f.add(1<<31 - 1) { + t.Fatal("failed to add 2^31-1") + } + if got, want := f.available(), int32(1<<31-1); got != want { + t.Fatalf("size = %d; want %d", got, want) + } + if f.add(1) { + t.Fatal("adding 1 to max shouldn't be allowed") + } + +} diff --git a/vendor/golang.org/x/net/http2/frame_test.go b/vendor/golang.org/x/net/http2/frame_test.go new file mode 100644 index 000000000..37266bc58 --- /dev/null +++ b/vendor/golang.org/x/net/http2/frame_test.go @@ -0,0 +1,1191 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package http2 + +import ( + "bytes" + "fmt" + "io" + "reflect" + "strings" + "testing" + "unsafe" + + "golang.org/x/net/http2/hpack" +) + +func testFramer() (*Framer, *bytes.Buffer) { + buf := new(bytes.Buffer) + return NewFramer(buf, buf), buf +} + +func TestFrameSizes(t *testing.T) { + // Catch people rearranging the FrameHeader fields. + if got, want := int(unsafe.Sizeof(FrameHeader{})), 12; got != want { + t.Errorf("FrameHeader size = %d; want %d", got, want) + } +} + +func TestFrameTypeString(t *testing.T) { + tests := []struct { + ft FrameType + want string + }{ + {FrameData, "DATA"}, + {FramePing, "PING"}, + {FrameGoAway, "GOAWAY"}, + {0xf, "UNKNOWN_FRAME_TYPE_15"}, + } + + for i, tt := range tests { + got := tt.ft.String() + if got != tt.want { + t.Errorf("%d. String(FrameType %d) = %q; want %q", i, int(tt.ft), got, tt.want) + } + } +} + +func TestWriteRST(t *testing.T) { + fr, buf := testFramer() + var streamID uint32 = 1<<24 + 2<<16 + 3<<8 + 4 + var errCode uint32 = 7<<24 + 6<<16 + 5<<8 + 4 + fr.WriteRSTStream(streamID, ErrCode(errCode)) + const wantEnc = "\x00\x00\x04\x03\x00\x01\x02\x03\x04\x07\x06\x05\x04" + if buf.String() != wantEnc { + t.Errorf("encoded as %q; want %q", buf.Bytes(), wantEnc) + } + f, err := fr.ReadFrame() + if err != nil { + t.Fatal(err) + } + want := &RSTStreamFrame{ + FrameHeader: FrameHeader{ + valid: true, + Type: 0x3, + Flags: 0x0, + Length: 0x4, + StreamID: 0x1020304, + }, + ErrCode: 0x7060504, + } + if !reflect.DeepEqual(f, want) { + t.Errorf("parsed back %#v; want %#v", f, want) + } +} + +func TestWriteData(t *testing.T) { + fr, buf := testFramer() + var streamID uint32 = 1<<24 + 2<<16 + 3<<8 + 4 + data := []byte("ABC") + fr.WriteData(streamID, true, data) + const wantEnc = "\x00\x00\x03\x00\x01\x01\x02\x03\x04ABC" + if buf.String() != wantEnc { + t.Errorf("encoded as %q; want %q", buf.Bytes(), wantEnc) + } + f, err := fr.ReadFrame() + if err != nil { + t.Fatal(err) + } + df, ok := f.(*DataFrame) + if !ok { + t.Fatalf("got %T; want *DataFrame", f) + } + if !bytes.Equal(df.Data(), data) { + t.Errorf("got %q; want %q", df.Data(), data) + } + if f.Header().Flags&1 == 0 { + t.Errorf("didn't see END_STREAM flag") + } +} + +func TestWriteDataPadded(t *testing.T) { + tests := [...]struct { + streamID uint32 + endStream bool + data []byte + pad []byte + wantHeader FrameHeader + }{ + // Unpadded: + 0: { + streamID: 1, + endStream: true, + data: []byte("foo"), + pad: nil, + wantHeader: FrameHeader{ + Type: FrameData, + Flags: FlagDataEndStream, + Length: 3, + StreamID: 1, + }, + }, + + // Padded bit set, but no padding: + 1: { + streamID: 1, + endStream: true, + data: []byte("foo"), + pad: []byte{}, + wantHeader: FrameHeader{ + Type: FrameData, + Flags: FlagDataEndStream | FlagDataPadded, + Length: 4, + StreamID: 1, + }, + }, + + // Padded bit set, with padding: + 2: { + streamID: 1, + endStream: false, + data: []byte("foo"), + pad: []byte{0, 0, 0}, + wantHeader: FrameHeader{ + Type: FrameData, + Flags: FlagDataPadded, + Length: 7, + StreamID: 1, + }, + }, + } + for i, tt := range tests { + fr, _ := testFramer() + fr.WriteDataPadded(tt.streamID, tt.endStream, tt.data, tt.pad) + f, err := fr.ReadFrame() + if err != nil { + t.Errorf("%d. ReadFrame: %v", i, err) + continue + } + got := f.Header() + tt.wantHeader.valid = true + if got != tt.wantHeader { + t.Errorf("%d. read %+v; want %+v", i, got, tt.wantHeader) + continue + } + df := f.(*DataFrame) + if !bytes.Equal(df.Data(), tt.data) { + t.Errorf("%d. got %q; want %q", i, df.Data(), tt.data) + } + } +} + +func TestWriteHeaders(t *testing.T) { + tests := []struct { + name string + p HeadersFrameParam + wantEnc string + wantFrame *HeadersFrame + }{ + { + "basic", + HeadersFrameParam{ + StreamID: 42, + BlockFragment: []byte("abc"), + Priority: PriorityParam{}, + }, + "\x00\x00\x03\x01\x00\x00\x00\x00*abc", + &HeadersFrame{ + FrameHeader: FrameHeader{ + valid: true, + StreamID: 42, + Type: FrameHeaders, + Length: uint32(len("abc")), + }, + Priority: PriorityParam{}, + headerFragBuf: []byte("abc"), + }, + }, + { + "basic + end flags", + HeadersFrameParam{ + StreamID: 42, + BlockFragment: []byte("abc"), + EndStream: true, + EndHeaders: true, + Priority: PriorityParam{}, + }, + "\x00\x00\x03\x01\x05\x00\x00\x00*abc", + &HeadersFrame{ + FrameHeader: FrameHeader{ + valid: true, + StreamID: 42, + Type: FrameHeaders, + Flags: FlagHeadersEndStream | FlagHeadersEndHeaders, + Length: uint32(len("abc")), + }, + Priority: PriorityParam{}, + headerFragBuf: []byte("abc"), + }, + }, + { + "with padding", + HeadersFrameParam{ + StreamID: 42, + BlockFragment: []byte("abc"), + EndStream: true, + EndHeaders: true, + PadLength: 5, + Priority: PriorityParam{}, + }, + "\x00\x00\t\x01\r\x00\x00\x00*\x05abc\x00\x00\x00\x00\x00", + &HeadersFrame{ + FrameHeader: FrameHeader{ + valid: true, + StreamID: 42, + Type: FrameHeaders, + Flags: FlagHeadersEndStream | FlagHeadersEndHeaders | FlagHeadersPadded, + Length: uint32(1 + len("abc") + 5), // pad length + contents + padding + }, + Priority: PriorityParam{}, + headerFragBuf: []byte("abc"), + }, + }, + { + "with priority", + HeadersFrameParam{ + StreamID: 42, + BlockFragment: []byte("abc"), + EndStream: true, + EndHeaders: true, + PadLength: 2, + Priority: PriorityParam{ + StreamDep: 15, + Exclusive: true, + Weight: 127, + }, + }, + "\x00\x00\v\x01-\x00\x00\x00*\x02\x80\x00\x00\x0f\u007fabc\x00\x00", + &HeadersFrame{ + FrameHeader: FrameHeader{ + valid: true, + StreamID: 42, + Type: FrameHeaders, + Flags: FlagHeadersEndStream | FlagHeadersEndHeaders | FlagHeadersPadded | FlagHeadersPriority, + Length: uint32(1 + 5 + len("abc") + 2), // pad length + priority + contents + padding + }, + Priority: PriorityParam{ + StreamDep: 15, + Exclusive: true, + Weight: 127, + }, + headerFragBuf: []byte("abc"), + }, + }, + { + "with priority stream dep zero", // golang.org/issue/15444 + HeadersFrameParam{ + StreamID: 42, + BlockFragment: []byte("abc"), + EndStream: true, + EndHeaders: true, + PadLength: 2, + Priority: PriorityParam{ + StreamDep: 0, + Exclusive: true, + Weight: 127, + }, + }, + "\x00\x00\v\x01-\x00\x00\x00*\x02\x80\x00\x00\x00\u007fabc\x00\x00", + &HeadersFrame{ + FrameHeader: FrameHeader{ + valid: true, + StreamID: 42, + Type: FrameHeaders, + Flags: FlagHeadersEndStream | FlagHeadersEndHeaders | FlagHeadersPadded | FlagHeadersPriority, + Length: uint32(1 + 5 + len("abc") + 2), // pad length + priority + contents + padding + }, + Priority: PriorityParam{ + StreamDep: 0, + Exclusive: true, + Weight: 127, + }, + headerFragBuf: []byte("abc"), + }, + }, + } + for _, tt := range tests { + fr, buf := testFramer() + if err := fr.WriteHeaders(tt.p); err != nil { + t.Errorf("test %q: %v", tt.name, err) + continue + } + if buf.String() != tt.wantEnc { + t.Errorf("test %q: encoded %q; want %q", tt.name, buf.Bytes(), tt.wantEnc) + } + f, err := fr.ReadFrame() + if err != nil { + t.Errorf("test %q: failed to read the frame back: %v", tt.name, err) + continue + } + if !reflect.DeepEqual(f, tt.wantFrame) { + t.Errorf("test %q: mismatch.\n got: %#v\nwant: %#v\n", tt.name, f, tt.wantFrame) + } + } +} + +func TestWriteInvalidStreamDep(t *testing.T) { + fr, _ := testFramer() + err := fr.WriteHeaders(HeadersFrameParam{ + StreamID: 42, + Priority: PriorityParam{ + StreamDep: 1 << 31, + }, + }) + if err != errDepStreamID { + t.Errorf("header error = %v; want %q", err, errDepStreamID) + } + + err = fr.WritePriority(2, PriorityParam{StreamDep: 1 << 31}) + if err != errDepStreamID { + t.Errorf("priority error = %v; want %q", err, errDepStreamID) + } +} + +func TestWriteContinuation(t *testing.T) { + const streamID = 42 + tests := []struct { + name string + end bool + frag []byte + + wantFrame *ContinuationFrame + }{ + { + "not end", + false, + []byte("abc"), + &ContinuationFrame{ + FrameHeader: FrameHeader{ + valid: true, + StreamID: streamID, + Type: FrameContinuation, + Length: uint32(len("abc")), + }, + headerFragBuf: []byte("abc"), + }, + }, + { + "end", + true, + []byte("def"), + &ContinuationFrame{ + FrameHeader: FrameHeader{ + valid: true, + StreamID: streamID, + Type: FrameContinuation, + Flags: FlagContinuationEndHeaders, + Length: uint32(len("def")), + }, + headerFragBuf: []byte("def"), + }, + }, + } + for _, tt := range tests { + fr, _ := testFramer() + if err := fr.WriteContinuation(streamID, tt.end, tt.frag); err != nil { + t.Errorf("test %q: %v", tt.name, err) + continue + } + fr.AllowIllegalReads = true + f, err := fr.ReadFrame() + if err != nil { + t.Errorf("test %q: failed to read the frame back: %v", tt.name, err) + continue + } + if !reflect.DeepEqual(f, tt.wantFrame) { + t.Errorf("test %q: mismatch.\n got: %#v\nwant: %#v\n", tt.name, f, tt.wantFrame) + } + } +} + +func TestWritePriority(t *testing.T) { + const streamID = 42 + tests := []struct { + name string + priority PriorityParam + wantFrame *PriorityFrame + }{ + { + "not exclusive", + PriorityParam{ + StreamDep: 2, + Exclusive: false, + Weight: 127, + }, + &PriorityFrame{ + FrameHeader{ + valid: true, + StreamID: streamID, + Type: FramePriority, + Length: 5, + }, + PriorityParam{ + StreamDep: 2, + Exclusive: false, + Weight: 127, + }, + }, + }, + + { + "exclusive", + PriorityParam{ + StreamDep: 3, + Exclusive: true, + Weight: 77, + }, + &PriorityFrame{ + FrameHeader{ + valid: true, + StreamID: streamID, + Type: FramePriority, + Length: 5, + }, + PriorityParam{ + StreamDep: 3, + Exclusive: true, + Weight: 77, + }, + }, + }, + } + for _, tt := range tests { + fr, _ := testFramer() + if err := fr.WritePriority(streamID, tt.priority); err != nil { + t.Errorf("test %q: %v", tt.name, err) + continue + } + f, err := fr.ReadFrame() + if err != nil { + t.Errorf("test %q: failed to read the frame back: %v", tt.name, err) + continue + } + if !reflect.DeepEqual(f, tt.wantFrame) { + t.Errorf("test %q: mismatch.\n got: %#v\nwant: %#v\n", tt.name, f, tt.wantFrame) + } + } +} + +func TestWriteSettings(t *testing.T) { + fr, buf := testFramer() + settings := []Setting{{1, 2}, {3, 4}} + fr.WriteSettings(settings...) + const wantEnc = "\x00\x00\f\x04\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x02\x00\x03\x00\x00\x00\x04" + if buf.String() != wantEnc { + t.Errorf("encoded as %q; want %q", buf.Bytes(), wantEnc) + } + f, err := fr.ReadFrame() + if err != nil { + t.Fatal(err) + } + sf, ok := f.(*SettingsFrame) + if !ok { + t.Fatalf("Got a %T; want a SettingsFrame", f) + } + var got []Setting + sf.ForeachSetting(func(s Setting) error { + got = append(got, s) + valBack, ok := sf.Value(s.ID) + if !ok || valBack != s.Val { + t.Errorf("Value(%d) = %v, %v; want %v, true", s.ID, valBack, ok, s.Val) + } + return nil + }) + if !reflect.DeepEqual(settings, got) { + t.Errorf("Read settings %+v != written settings %+v", got, settings) + } +} + +func TestWriteSettingsAck(t *testing.T) { + fr, buf := testFramer() + fr.WriteSettingsAck() + const wantEnc = "\x00\x00\x00\x04\x01\x00\x00\x00\x00" + if buf.String() != wantEnc { + t.Errorf("encoded as %q; want %q", buf.Bytes(), wantEnc) + } +} + +func TestWriteWindowUpdate(t *testing.T) { + fr, buf := testFramer() + const streamID = 1<<24 + 2<<16 + 3<<8 + 4 + const incr = 7<<24 + 6<<16 + 5<<8 + 4 + if err := fr.WriteWindowUpdate(streamID, incr); err != nil { + t.Fatal(err) + } + const wantEnc = "\x00\x00\x04\x08\x00\x01\x02\x03\x04\x07\x06\x05\x04" + if buf.String() != wantEnc { + t.Errorf("encoded as %q; want %q", buf.Bytes(), wantEnc) + } + f, err := fr.ReadFrame() + if err != nil { + t.Fatal(err) + } + want := &WindowUpdateFrame{ + FrameHeader: FrameHeader{ + valid: true, + Type: 0x8, + Flags: 0x0, + Length: 0x4, + StreamID: 0x1020304, + }, + Increment: 0x7060504, + } + if !reflect.DeepEqual(f, want) { + t.Errorf("parsed back %#v; want %#v", f, want) + } +} + +func TestWritePing(t *testing.T) { testWritePing(t, false) } +func TestWritePingAck(t *testing.T) { testWritePing(t, true) } + +func testWritePing(t *testing.T, ack bool) { + fr, buf := testFramer() + if err := fr.WritePing(ack, [8]byte{1, 2, 3, 4, 5, 6, 7, 8}); err != nil { + t.Fatal(err) + } + var wantFlags Flags + if ack { + wantFlags = FlagPingAck + } + var wantEnc = "\x00\x00\x08\x06" + string(wantFlags) + "\x00\x00\x00\x00" + "\x01\x02\x03\x04\x05\x06\x07\x08" + if buf.String() != wantEnc { + t.Errorf("encoded as %q; want %q", buf.Bytes(), wantEnc) + } + + f, err := fr.ReadFrame() + if err != nil { + t.Fatal(err) + } + want := &PingFrame{ + FrameHeader: FrameHeader{ + valid: true, + Type: 0x6, + Flags: wantFlags, + Length: 0x8, + StreamID: 0, + }, + Data: [8]byte{1, 2, 3, 4, 5, 6, 7, 8}, + } + if !reflect.DeepEqual(f, want) { + t.Errorf("parsed back %#v; want %#v", f, want) + } +} + +func TestReadFrameHeader(t *testing.T) { + tests := []struct { + in string + want FrameHeader + }{ + {in: "\x00\x00\x00" + "\x00" + "\x00" + "\x00\x00\x00\x00", want: FrameHeader{}}, + {in: "\x01\x02\x03" + "\x04" + "\x05" + "\x06\x07\x08\x09", want: FrameHeader{ + Length: 66051, Type: 4, Flags: 5, StreamID: 101124105, + }}, + // Ignore high bit: + {in: "\xff\xff\xff" + "\xff" + "\xff" + "\xff\xff\xff\xff", want: FrameHeader{ + Length: 16777215, Type: 255, Flags: 255, StreamID: 2147483647}}, + {in: "\xff\xff\xff" + "\xff" + "\xff" + "\x7f\xff\xff\xff", want: FrameHeader{ + Length: 16777215, Type: 255, Flags: 255, StreamID: 2147483647}}, + } + for i, tt := range tests { + got, err := readFrameHeader(make([]byte, 9), strings.NewReader(tt.in)) + if err != nil { + t.Errorf("%d. readFrameHeader(%q) = %v", i, tt.in, err) + continue + } + tt.want.valid = true + if got != tt.want { + t.Errorf("%d. readFrameHeader(%q) = %+v; want %+v", i, tt.in, got, tt.want) + } + } +} + +func TestReadWriteFrameHeader(t *testing.T) { + tests := []struct { + len uint32 + typ FrameType + flags Flags + streamID uint32 + }{ + {len: 0, typ: 255, flags: 1, streamID: 0}, + {len: 0, typ: 255, flags: 1, streamID: 1}, + {len: 0, typ: 255, flags: 1, streamID: 255}, + {len: 0, typ: 255, flags: 1, streamID: 256}, + {len: 0, typ: 255, flags: 1, streamID: 65535}, + {len: 0, typ: 255, flags: 1, streamID: 65536}, + + {len: 0, typ: 1, flags: 255, streamID: 1}, + {len: 255, typ: 1, flags: 255, streamID: 1}, + {len: 256, typ: 1, flags: 255, streamID: 1}, + {len: 65535, typ: 1, flags: 255, streamID: 1}, + {len: 65536, typ: 1, flags: 255, streamID: 1}, + {len: 16777215, typ: 1, flags: 255, streamID: 1}, + } + for _, tt := range tests { + fr, buf := testFramer() + fr.startWrite(tt.typ, tt.flags, tt.streamID) + fr.writeBytes(make([]byte, tt.len)) + fr.endWrite() + fh, err := ReadFrameHeader(buf) + if err != nil { + t.Errorf("ReadFrameHeader(%+v) = %v", tt, err) + continue + } + if fh.Type != tt.typ || fh.Flags != tt.flags || fh.Length != tt.len || fh.StreamID != tt.streamID { + t.Errorf("ReadFrameHeader(%+v) = %+v; mismatch", tt, fh) + } + } + +} + +func TestWriteTooLargeFrame(t *testing.T) { + fr, _ := testFramer() + fr.startWrite(0, 1, 1) + fr.writeBytes(make([]byte, 1<<24)) + err := fr.endWrite() + if err != ErrFrameTooLarge { + t.Errorf("endWrite = %v; want errFrameTooLarge", err) + } +} + +func TestWriteGoAway(t *testing.T) { + const debug = "foo" + fr, buf := testFramer() + if err := fr.WriteGoAway(0x01020304, 0x05060708, []byte(debug)); err != nil { + t.Fatal(err) + } + const wantEnc = "\x00\x00\v\a\x00\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07\x08" + debug + if buf.String() != wantEnc { + t.Errorf("encoded as %q; want %q", buf.Bytes(), wantEnc) + } + f, err := fr.ReadFrame() + if err != nil { + t.Fatal(err) + } + want := &GoAwayFrame{ + FrameHeader: FrameHeader{ + valid: true, + Type: 0x7, + Flags: 0, + Length: uint32(4 + 4 + len(debug)), + StreamID: 0, + }, + LastStreamID: 0x01020304, + ErrCode: 0x05060708, + debugData: []byte(debug), + } + if !reflect.DeepEqual(f, want) { + t.Fatalf("parsed back:\n%#v\nwant:\n%#v", f, want) + } + if got := string(f.(*GoAwayFrame).DebugData()); got != debug { + t.Errorf("debug data = %q; want %q", got, debug) + } +} + +func TestWritePushPromise(t *testing.T) { + pp := PushPromiseParam{ + StreamID: 42, + PromiseID: 42, + BlockFragment: []byte("abc"), + } + fr, buf := testFramer() + if err := fr.WritePushPromise(pp); err != nil { + t.Fatal(err) + } + const wantEnc = "\x00\x00\x07\x05\x00\x00\x00\x00*\x00\x00\x00*abc" + if buf.String() != wantEnc { + t.Errorf("encoded as %q; want %q", buf.Bytes(), wantEnc) + } + f, err := fr.ReadFrame() + if err != nil { + t.Fatal(err) + } + _, ok := f.(*PushPromiseFrame) + if !ok { + t.Fatalf("got %T; want *PushPromiseFrame", f) + } + want := &PushPromiseFrame{ + FrameHeader: FrameHeader{ + valid: true, + Type: 0x5, + Flags: 0x0, + Length: 0x7, + StreamID: 42, + }, + PromiseID: 42, + headerFragBuf: []byte("abc"), + } + if !reflect.DeepEqual(f, want) { + t.Fatalf("parsed back:\n%#v\nwant:\n%#v", f, want) + } +} + +// test checkFrameOrder and that HEADERS and CONTINUATION frames can't be intermingled. +func TestReadFrameOrder(t *testing.T) { + head := func(f *Framer, id uint32, end bool) { + f.WriteHeaders(HeadersFrameParam{ + StreamID: id, + BlockFragment: []byte("foo"), // unused, but non-empty + EndHeaders: end, + }) + } + cont := func(f *Framer, id uint32, end bool) { + f.WriteContinuation(id, end, []byte("foo")) + } + + tests := [...]struct { + name string + w func(*Framer) + atLeast int + wantErr string + }{ + 0: { + w: func(f *Framer) { + head(f, 1, true) + }, + }, + 1: { + w: func(f *Framer) { + head(f, 1, true) + head(f, 2, true) + }, + }, + 2: { + wantErr: "got HEADERS for stream 2; expected CONTINUATION following HEADERS for stream 1", + w: func(f *Framer) { + head(f, 1, false) + head(f, 2, true) + }, + }, + 3: { + wantErr: "got DATA for stream 1; expected CONTINUATION following HEADERS for stream 1", + w: func(f *Framer) { + head(f, 1, false) + }, + }, + 4: { + w: func(f *Framer) { + head(f, 1, false) + cont(f, 1, true) + head(f, 2, true) + }, + }, + 5: { + wantErr: "got CONTINUATION for stream 2; expected stream 1", + w: func(f *Framer) { + head(f, 1, false) + cont(f, 2, true) + head(f, 2, true) + }, + }, + 6: { + wantErr: "unexpected CONTINUATION for stream 1", + w: func(f *Framer) { + cont(f, 1, true) + }, + }, + 7: { + wantErr: "unexpected CONTINUATION for stream 1", + w: func(f *Framer) { + cont(f, 1, false) + }, + }, + 8: { + wantErr: "HEADERS frame with stream ID 0", + w: func(f *Framer) { + head(f, 0, true) + }, + }, + 9: { + wantErr: "CONTINUATION frame with stream ID 0", + w: func(f *Framer) { + cont(f, 0, true) + }, + }, + 10: { + wantErr: "unexpected CONTINUATION for stream 1", + atLeast: 5, + w: func(f *Framer) { + head(f, 1, false) + cont(f, 1, false) + cont(f, 1, false) + cont(f, 1, false) + cont(f, 1, true) + cont(f, 1, false) + }, + }, + } + for i, tt := range tests { + buf := new(bytes.Buffer) + f := NewFramer(buf, buf) + f.AllowIllegalWrites = true + tt.w(f) + f.WriteData(1, true, nil) // to test transition away from last step + + var err error + n := 0 + var log bytes.Buffer + for { + var got Frame + got, err = f.ReadFrame() + fmt.Fprintf(&log, " read %v, %v\n", got, err) + if err != nil { + break + } + n++ + } + if err == io.EOF { + err = nil + } + ok := tt.wantErr == "" + if ok && err != nil { + t.Errorf("%d. after %d good frames, ReadFrame = %v; want success\n%s", i, n, err, log.Bytes()) + continue + } + if !ok && err != ConnectionError(ErrCodeProtocol) { + t.Errorf("%d. after %d good frames, ReadFrame = %v; want ConnectionError(ErrCodeProtocol)\n%s", i, n, err, log.Bytes()) + continue + } + if !((f.errDetail == nil && tt.wantErr == "") || (fmt.Sprint(f.errDetail) == tt.wantErr)) { + t.Errorf("%d. framer eror = %q; want %q\n%s", i, f.errDetail, tt.wantErr, log.Bytes()) + } + if n < tt.atLeast { + t.Errorf("%d. framer only read %d frames; want at least %d\n%s", i, n, tt.atLeast, log.Bytes()) + } + } +} + +func TestMetaFrameHeader(t *testing.T) { + write := func(f *Framer, frags ...[]byte) { + for i, frag := range frags { + end := (i == len(frags)-1) + if i == 0 { + f.WriteHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: frag, + EndHeaders: end, + }) + } else { + f.WriteContinuation(1, end, frag) + } + } + } + + want := func(flags Flags, length uint32, pairs ...string) *MetaHeadersFrame { + mh := &MetaHeadersFrame{ + HeadersFrame: &HeadersFrame{ + FrameHeader: FrameHeader{ + Type: FrameHeaders, + Flags: flags, + Length: length, + StreamID: 1, + }, + }, + Fields: []hpack.HeaderField(nil), + } + for len(pairs) > 0 { + mh.Fields = append(mh.Fields, hpack.HeaderField{ + Name: pairs[0], + Value: pairs[1], + }) + pairs = pairs[2:] + } + return mh + } + truncated := func(mh *MetaHeadersFrame) *MetaHeadersFrame { + mh.Truncated = true + return mh + } + + const noFlags Flags = 0 + + oneKBString := strings.Repeat("a", 1<<10) + + tests := [...]struct { + name string + w func(*Framer) + want interface{} // *MetaHeaderFrame or error + wantErrReason string + maxHeaderListSize uint32 + }{ + 0: { + name: "single_headers", + w: func(f *Framer) { + var he hpackEncoder + all := he.encodeHeaderRaw(t, ":method", "GET", ":path", "/") + write(f, all) + }, + want: want(FlagHeadersEndHeaders, 2, ":method", "GET", ":path", "/"), + }, + 1: { + name: "with_continuation", + w: func(f *Framer) { + var he hpackEncoder + all := he.encodeHeaderRaw(t, ":method", "GET", ":path", "/", "foo", "bar") + write(f, all[:1], all[1:]) + }, + want: want(noFlags, 1, ":method", "GET", ":path", "/", "foo", "bar"), + }, + 2: { + name: "with_two_continuation", + w: func(f *Framer) { + var he hpackEncoder + all := he.encodeHeaderRaw(t, ":method", "GET", ":path", "/", "foo", "bar") + write(f, all[:2], all[2:4], all[4:]) + }, + want: want(noFlags, 2, ":method", "GET", ":path", "/", "foo", "bar"), + }, + 3: { + name: "big_string_okay", + w: func(f *Framer) { + var he hpackEncoder + all := he.encodeHeaderRaw(t, ":method", "GET", ":path", "/", "foo", oneKBString) + write(f, all[:2], all[2:]) + }, + want: want(noFlags, 2, ":method", "GET", ":path", "/", "foo", oneKBString), + }, + 4: { + name: "big_string_error", + w: func(f *Framer) { + var he hpackEncoder + all := he.encodeHeaderRaw(t, ":method", "GET", ":path", "/", "foo", oneKBString) + write(f, all[:2], all[2:]) + }, + maxHeaderListSize: (1 << 10) / 2, + want: ConnectionError(ErrCodeCompression), + }, + 5: { + name: "max_header_list_truncated", + w: func(f *Framer) { + var he hpackEncoder + var pairs = []string{":method", "GET", ":path", "/"} + for i := 0; i < 100; i++ { + pairs = append(pairs, "foo", "bar") + } + all := he.encodeHeaderRaw(t, pairs...) + write(f, all[:2], all[2:]) + }, + maxHeaderListSize: (1 << 10) / 2, + want: truncated(want(noFlags, 2, + ":method", "GET", + ":path", "/", + "foo", "bar", + "foo", "bar", + "foo", "bar", + "foo", "bar", + "foo", "bar", + "foo", "bar", + "foo", "bar", + "foo", "bar", + "foo", "bar", + "foo", "bar", + "foo", "bar", // 11 + )), + }, + 6: { + name: "pseudo_order", + w: func(f *Framer) { + write(f, encodeHeaderRaw(t, + ":method", "GET", + "foo", "bar", + ":path", "/", // bogus + )) + }, + want: streamError(1, ErrCodeProtocol), + wantErrReason: "pseudo header field after regular", + }, + 7: { + name: "pseudo_unknown", + w: func(f *Framer) { + write(f, encodeHeaderRaw(t, + ":unknown", "foo", // bogus + "foo", "bar", + )) + }, + want: streamError(1, ErrCodeProtocol), + wantErrReason: "invalid pseudo-header \":unknown\"", + }, + 8: { + name: "pseudo_mix_request_response", + w: func(f *Framer) { + write(f, encodeHeaderRaw(t, + ":method", "GET", + ":status", "100", + )) + }, + want: streamError(1, ErrCodeProtocol), + wantErrReason: "mix of request and response pseudo headers", + }, + 9: { + name: "pseudo_dup", + w: func(f *Framer) { + write(f, encodeHeaderRaw(t, + ":method", "GET", + ":method", "POST", + )) + }, + want: streamError(1, ErrCodeProtocol), + wantErrReason: "duplicate pseudo-header \":method\"", + }, + 10: { + name: "trailer_okay_no_pseudo", + w: func(f *Framer) { write(f, encodeHeaderRaw(t, "foo", "bar")) }, + want: want(FlagHeadersEndHeaders, 8, "foo", "bar"), + }, + 11: { + name: "invalid_field_name", + w: func(f *Framer) { write(f, encodeHeaderRaw(t, "CapitalBad", "x")) }, + want: streamError(1, ErrCodeProtocol), + wantErrReason: "invalid header field name \"CapitalBad\"", + }, + 12: { + name: "invalid_field_value", + w: func(f *Framer) { write(f, encodeHeaderRaw(t, "key", "bad_null\x00")) }, + want: streamError(1, ErrCodeProtocol), + wantErrReason: "invalid header field value \"bad_null\\x00\"", + }, + } + for i, tt := range tests { + buf := new(bytes.Buffer) + f := NewFramer(buf, buf) + f.ReadMetaHeaders = hpack.NewDecoder(initialHeaderTableSize, nil) + f.MaxHeaderListSize = tt.maxHeaderListSize + tt.w(f) + + name := tt.name + if name == "" { + name = fmt.Sprintf("test index %d", i) + } + + var got interface{} + var err error + got, err = f.ReadFrame() + if err != nil { + got = err + + // Ignore the StreamError.Cause field, if it matches the wantErrReason. + // The test table above predates the Cause field. + if se, ok := err.(StreamError); ok && se.Cause != nil && se.Cause.Error() == tt.wantErrReason { + se.Cause = nil + got = se + } + } + if !reflect.DeepEqual(got, tt.want) { + if mhg, ok := got.(*MetaHeadersFrame); ok { + if mhw, ok := tt.want.(*MetaHeadersFrame); ok { + hg := mhg.HeadersFrame + hw := mhw.HeadersFrame + if hg != nil && hw != nil && !reflect.DeepEqual(*hg, *hw) { + t.Errorf("%s: headers differ:\n got: %+v\nwant: %+v\n", name, *hg, *hw) + } + } + } + str := func(v interface{}) string { + if _, ok := v.(error); ok { + return fmt.Sprintf("error %v", v) + } else { + return fmt.Sprintf("value %#v", v) + } + } + t.Errorf("%s:\n got: %v\nwant: %s", name, str(got), str(tt.want)) + } + if tt.wantErrReason != "" && tt.wantErrReason != fmt.Sprint(f.errDetail) { + t.Errorf("%s: got error reason %q; want %q", name, f.errDetail, tt.wantErrReason) + } + } +} + +func TestSetReuseFrames(t *testing.T) { + fr, buf := testFramer() + fr.SetReuseFrames() + + // Check that DataFrames are reused. Note that + // SetReuseFrames only currently implements reuse of DataFrames. + firstDf := readAndVerifyDataFrame("ABC", 3, fr, buf, t) + + for i := 0; i < 10; i++ { + df := readAndVerifyDataFrame("XYZ", 3, fr, buf, t) + if df != firstDf { + t.Errorf("Expected Framer to return references to the same DataFrame. Have %v and %v", &df, &firstDf) + } + } + + for i := 0; i < 10; i++ { + df := readAndVerifyDataFrame("", 0, fr, buf, t) + if df != firstDf { + t.Errorf("Expected Framer to return references to the same DataFrame. Have %v and %v", &df, &firstDf) + } + } + + for i := 0; i < 10; i++ { + df := readAndVerifyDataFrame("HHH", 3, fr, buf, t) + if df != firstDf { + t.Errorf("Expected Framer to return references to the same DataFrame. Have %v and %v", &df, &firstDf) + } + } +} + +func TestSetReuseFramesMoreThanOnce(t *testing.T) { + fr, buf := testFramer() + fr.SetReuseFrames() + + firstDf := readAndVerifyDataFrame("ABC", 3, fr, buf, t) + fr.SetReuseFrames() + + for i := 0; i < 10; i++ { + df := readAndVerifyDataFrame("XYZ", 3, fr, buf, t) + // SetReuseFrames should be idempotent + fr.SetReuseFrames() + if df != firstDf { + t.Errorf("Expected Framer to return references to the same DataFrame. Have %v and %v", &df, &firstDf) + } + } +} + +func TestNoSetReuseFrames(t *testing.T) { + fr, buf := testFramer() + const numNewDataFrames = 10 + dfSoFar := make([]interface{}, numNewDataFrames) + + // Check that DataFrames are not reused if SetReuseFrames wasn't called. + // SetReuseFrames only currently implements reuse of DataFrames. + for i := 0; i < numNewDataFrames; i++ { + df := readAndVerifyDataFrame("XYZ", 3, fr, buf, t) + for _, item := range dfSoFar { + if df == item { + t.Errorf("Expected Framer to return new DataFrames since SetNoReuseFrames not set.") + } + } + dfSoFar[i] = df + } +} + +func readAndVerifyDataFrame(data string, length byte, fr *Framer, buf *bytes.Buffer, t *testing.T) *DataFrame { + var streamID uint32 = 1<<24 + 2<<16 + 3<<8 + 4 + fr.WriteData(streamID, true, []byte(data)) + wantEnc := "\x00\x00" + string(length) + "\x00\x01\x01\x02\x03\x04" + data + if buf.String() != wantEnc { + t.Errorf("encoded as %q; want %q", buf.Bytes(), wantEnc) + } + f, err := fr.ReadFrame() + if err != nil { + t.Fatal(err) + } + df, ok := f.(*DataFrame) + if !ok { + t.Fatalf("got %T; want *DataFrame", f) + } + if !bytes.Equal(df.Data(), []byte(data)) { + t.Errorf("got %q; want %q", df.Data(), []byte(data)) + } + if f.Header().Flags&1 == 0 { + t.Errorf("didn't see END_STREAM flag") + } + return df +} + +func encodeHeaderRaw(t *testing.T, pairs ...string) []byte { + var he hpackEncoder + return he.encodeHeaderRaw(t, pairs...) +} diff --git a/vendor/golang.org/x/net/http2/go18_test.go b/vendor/golang.org/x/net/http2/go18_test.go new file mode 100644 index 000000000..30e3b038b --- /dev/null +++ b/vendor/golang.org/x/net/http2/go18_test.go @@ -0,0 +1,79 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.8 + +package http2 + +import ( + "crypto/tls" + "net/http" + "testing" + "time" +) + +// Tests that http2.Server.IdleTimeout is initialized from +// http.Server.{Idle,Read}Timeout. http.Server.IdleTimeout was +// added in Go 1.8. +func TestConfigureServerIdleTimeout_Go18(t *testing.T) { + const timeout = 5 * time.Second + const notThisOne = 1 * time.Second + + // With a zero http2.Server, verify that it copies IdleTimeout: + { + s1 := &http.Server{ + IdleTimeout: timeout, + ReadTimeout: notThisOne, + } + s2 := &Server{} + if err := ConfigureServer(s1, s2); err != nil { + t.Fatal(err) + } + if s2.IdleTimeout != timeout { + t.Errorf("s2.IdleTimeout = %v; want %v", s2.IdleTimeout, timeout) + } + } + + // And that it falls back to ReadTimeout: + { + s1 := &http.Server{ + ReadTimeout: timeout, + } + s2 := &Server{} + if err := ConfigureServer(s1, s2); err != nil { + t.Fatal(err) + } + if s2.IdleTimeout != timeout { + t.Errorf("s2.IdleTimeout = %v; want %v", s2.IdleTimeout, timeout) + } + } + + // Verify that s1's IdleTimeout doesn't overwrite an existing setting: + { + s1 := &http.Server{ + IdleTimeout: notThisOne, + } + s2 := &Server{ + IdleTimeout: timeout, + } + if err := ConfigureServer(s1, s2); err != nil { + t.Fatal(err) + } + if s2.IdleTimeout != timeout { + t.Errorf("s2.IdleTimeout = %v; want %v", s2.IdleTimeout, timeout) + } + } +} + +func TestCertClone(t *testing.T) { + c := &tls.Config{ + GetClientCertificate: func(*tls.CertificateRequestInfo) (*tls.Certificate, error) { + panic("shouldn't be called") + }, + } + c2 := cloneTLSConfig(c) + if c2.GetClientCertificate == nil { + t.Error("GetClientCertificate is nil") + } +} diff --git a/vendor/golang.org/x/net/http2/go19_test.go b/vendor/golang.org/x/net/http2/go19_test.go new file mode 100644 index 000000000..1675d248f --- /dev/null +++ b/vendor/golang.org/x/net/http2/go19_test.go @@ -0,0 +1,60 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.9 + +package http2 + +import ( + "context" + "net/http" + "reflect" + "testing" + "time" +) + +func TestServerGracefulShutdown(t *testing.T) { + var st *serverTester + handlerDone := make(chan struct{}) + st = newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + defer close(handlerDone) + go st.ts.Config.Shutdown(context.Background()) + + ga := st.wantGoAway() + if ga.ErrCode != ErrCodeNo { + t.Errorf("GOAWAY error = %v; want ErrCodeNo", ga.ErrCode) + } + if ga.LastStreamID != 1 { + t.Errorf("GOAWAY LastStreamID = %v; want 1", ga.LastStreamID) + } + + w.Header().Set("x-foo", "bar") + }) + defer st.Close() + + st.greet() + st.bodylessReq1() + + select { + case <-handlerDone: + case <-time.After(5 * time.Second): + t.Fatalf("server did not shutdown?") + } + hf := st.wantHeaders() + goth := st.decodeHeader(hf.HeaderBlockFragment()) + wanth := [][2]string{ + {":status", "200"}, + {"x-foo", "bar"}, + {"content-type", "text/plain; charset=utf-8"}, + {"content-length", "0"}, + } + if !reflect.DeepEqual(goth, wanth) { + t.Errorf("Got headers %v; want %v", goth, wanth) + } + + n, err := st.cc.Read([]byte{0}) + if n != 0 || err == nil { + t.Errorf("Read = %v, %v; want 0, non-nil", n, err) + } +} diff --git a/vendor/golang.org/x/net/http2/gotrack_test.go b/vendor/golang.org/x/net/http2/gotrack_test.go new file mode 100644 index 000000000..06db61231 --- /dev/null +++ b/vendor/golang.org/x/net/http2/gotrack_test.go @@ -0,0 +1,33 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package http2 + +import ( + "fmt" + "strings" + "testing" +) + +func TestGoroutineLock(t *testing.T) { + oldDebug := DebugGoroutines + DebugGoroutines = true + defer func() { DebugGoroutines = oldDebug }() + + g := newGoroutineLock() + g.check() + + sawPanic := make(chan interface{}) + go func() { + defer func() { sawPanic <- recover() }() + g.check() // should panic + }() + e := <-sawPanic + if e == nil { + t.Fatal("did not see panic from check in other goroutine") + } + if !strings.Contains(fmt.Sprint(e), "wrong goroutine") { + t.Errorf("expected on see panic about running on the wrong goroutine; got %v", e) + } +} diff --git a/vendor/golang.org/x/net/http2/hpack/encode_test.go b/vendor/golang.org/x/net/http2/hpack/encode_test.go new file mode 100644 index 000000000..05f12db9c --- /dev/null +++ b/vendor/golang.org/x/net/http2/hpack/encode_test.go @@ -0,0 +1,386 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package hpack + +import ( + "bytes" + "encoding/hex" + "fmt" + "math/rand" + "reflect" + "strings" + "testing" +) + +func TestEncoderTableSizeUpdate(t *testing.T) { + tests := []struct { + size1, size2 uint32 + wantHex string + }{ + // Should emit 2 table size updates (2048 and 4096) + {2048, 4096, "3fe10f 3fe11f 82"}, + + // Should emit 1 table size update (2048) + {16384, 2048, "3fe10f 82"}, + } + for _, tt := range tests { + var buf bytes.Buffer + e := NewEncoder(&buf) + e.SetMaxDynamicTableSize(tt.size1) + e.SetMaxDynamicTableSize(tt.size2) + if err := e.WriteField(pair(":method", "GET")); err != nil { + t.Fatal(err) + } + want := removeSpace(tt.wantHex) + if got := hex.EncodeToString(buf.Bytes()); got != want { + t.Errorf("e.SetDynamicTableSize %v, %v = %q; want %q", tt.size1, tt.size2, got, want) + } + } +} + +func TestEncoderWriteField(t *testing.T) { + var buf bytes.Buffer + e := NewEncoder(&buf) + var got []HeaderField + d := NewDecoder(4<<10, func(f HeaderField) { + got = append(got, f) + }) + + tests := []struct { + hdrs []HeaderField + }{ + {[]HeaderField{ + pair(":method", "GET"), + pair(":scheme", "http"), + pair(":path", "/"), + pair(":authority", "www.example.com"), + }}, + {[]HeaderField{ + pair(":method", "GET"), + pair(":scheme", "http"), + pair(":path", "/"), + pair(":authority", "www.example.com"), + pair("cache-control", "no-cache"), + }}, + {[]HeaderField{ + pair(":method", "GET"), + pair(":scheme", "https"), + pair(":path", "/index.html"), + pair(":authority", "www.example.com"), + pair("custom-key", "custom-value"), + }}, + } + for i, tt := range tests { + buf.Reset() + got = got[:0] + for _, hf := range tt.hdrs { + if err := e.WriteField(hf); err != nil { + t.Fatal(err) + } + } + _, err := d.Write(buf.Bytes()) + if err != nil { + t.Errorf("%d. Decoder Write = %v", i, err) + } + if !reflect.DeepEqual(got, tt.hdrs) { + t.Errorf("%d. Decoded %+v; want %+v", i, got, tt.hdrs) + } + } +} + +func TestEncoderSearchTable(t *testing.T) { + e := NewEncoder(nil) + + e.dynTab.add(pair("foo", "bar")) + e.dynTab.add(pair("blake", "miz")) + e.dynTab.add(pair(":method", "GET")) + + tests := []struct { + hf HeaderField + wantI uint64 + wantMatch bool + }{ + // Name and Value match + {pair("foo", "bar"), uint64(staticTable.len()) + 3, true}, + {pair("blake", "miz"), uint64(staticTable.len()) + 2, true}, + {pair(":method", "GET"), 2, true}, + + // Only name match because Sensitive == true. This is allowed to match + // any ":method" entry. The current implementation uses the last entry + // added in newStaticTable. + {HeaderField{":method", "GET", true}, 3, false}, + + // Only Name matches + {pair("foo", "..."), uint64(staticTable.len()) + 3, false}, + {pair("blake", "..."), uint64(staticTable.len()) + 2, false}, + // As before, this is allowed to match any ":method" entry. + {pair(":method", "..."), 3, false}, + + // None match + {pair("foo-", "bar"), 0, false}, + } + for _, tt := range tests { + if gotI, gotMatch := e.searchTable(tt.hf); gotI != tt.wantI || gotMatch != tt.wantMatch { + t.Errorf("d.search(%+v) = %v, %v; want %v, %v", tt.hf, gotI, gotMatch, tt.wantI, tt.wantMatch) + } + } +} + +func TestAppendVarInt(t *testing.T) { + tests := []struct { + n byte + i uint64 + want []byte + }{ + // Fits in a byte: + {1, 0, []byte{0}}, + {2, 2, []byte{2}}, + {3, 6, []byte{6}}, + {4, 14, []byte{14}}, + {5, 30, []byte{30}}, + {6, 62, []byte{62}}, + {7, 126, []byte{126}}, + {8, 254, []byte{254}}, + + // Multiple bytes: + {5, 1337, []byte{31, 154, 10}}, + } + for _, tt := range tests { + got := appendVarInt(nil, tt.n, tt.i) + if !bytes.Equal(got, tt.want) { + t.Errorf("appendVarInt(nil, %v, %v) = %v; want %v", tt.n, tt.i, got, tt.want) + } + } +} + +func TestAppendHpackString(t *testing.T) { + tests := []struct { + s, wantHex string + }{ + // Huffman encoded + {"www.example.com", "8c f1e3 c2e5 f23a 6ba0 ab90 f4ff"}, + + // Not Huffman encoded + {"a", "01 61"}, + + // zero length + {"", "00"}, + } + for _, tt := range tests { + want := removeSpace(tt.wantHex) + buf := appendHpackString(nil, tt.s) + if got := hex.EncodeToString(buf); want != got { + t.Errorf("appendHpackString(nil, %q) = %q; want %q", tt.s, got, want) + } + } +} + +func TestAppendIndexed(t *testing.T) { + tests := []struct { + i uint64 + wantHex string + }{ + // 1 byte + {1, "81"}, + {126, "fe"}, + + // 2 bytes + {127, "ff00"}, + {128, "ff01"}, + } + for _, tt := range tests { + want := removeSpace(tt.wantHex) + buf := appendIndexed(nil, tt.i) + if got := hex.EncodeToString(buf); want != got { + t.Errorf("appendIndex(nil, %v) = %q; want %q", tt.i, got, want) + } + } +} + +func TestAppendNewName(t *testing.T) { + tests := []struct { + f HeaderField + indexing bool + wantHex string + }{ + // Incremental indexing + {HeaderField{"custom-key", "custom-value", false}, true, "40 88 25a8 49e9 5ba9 7d7f 89 25a8 49e9 5bb8 e8b4 bf"}, + + // Without indexing + {HeaderField{"custom-key", "custom-value", false}, false, "00 88 25a8 49e9 5ba9 7d7f 89 25a8 49e9 5bb8 e8b4 bf"}, + + // Never indexed + {HeaderField{"custom-key", "custom-value", true}, true, "10 88 25a8 49e9 5ba9 7d7f 89 25a8 49e9 5bb8 e8b4 bf"}, + {HeaderField{"custom-key", "custom-value", true}, false, "10 88 25a8 49e9 5ba9 7d7f 89 25a8 49e9 5bb8 e8b4 bf"}, + } + for _, tt := range tests { + want := removeSpace(tt.wantHex) + buf := appendNewName(nil, tt.f, tt.indexing) + if got := hex.EncodeToString(buf); want != got { + t.Errorf("appendNewName(nil, %+v, %v) = %q; want %q", tt.f, tt.indexing, got, want) + } + } +} + +func TestAppendIndexedName(t *testing.T) { + tests := []struct { + f HeaderField + i uint64 + indexing bool + wantHex string + }{ + // Incremental indexing + {HeaderField{":status", "302", false}, 8, true, "48 82 6402"}, + + // Without indexing + {HeaderField{":status", "302", false}, 8, false, "08 82 6402"}, + + // Never indexed + {HeaderField{":status", "302", true}, 8, true, "18 82 6402"}, + {HeaderField{":status", "302", true}, 8, false, "18 82 6402"}, + } + for _, tt := range tests { + want := removeSpace(tt.wantHex) + buf := appendIndexedName(nil, tt.f, tt.i, tt.indexing) + if got := hex.EncodeToString(buf); want != got { + t.Errorf("appendIndexedName(nil, %+v, %v) = %q; want %q", tt.f, tt.indexing, got, want) + } + } +} + +func TestAppendTableSize(t *testing.T) { + tests := []struct { + i uint32 + wantHex string + }{ + // Fits into 1 byte + {30, "3e"}, + + // Extra byte + {31, "3f00"}, + {32, "3f01"}, + } + for _, tt := range tests { + want := removeSpace(tt.wantHex) + buf := appendTableSize(nil, tt.i) + if got := hex.EncodeToString(buf); want != got { + t.Errorf("appendTableSize(nil, %v) = %q; want %q", tt.i, got, want) + } + } +} + +func TestEncoderSetMaxDynamicTableSize(t *testing.T) { + var buf bytes.Buffer + e := NewEncoder(&buf) + tests := []struct { + v uint32 + wantUpdate bool + wantMinSize uint32 + wantMaxSize uint32 + }{ + // Set new table size to 2048 + {2048, true, 2048, 2048}, + + // Set new table size to 16384, but still limited to + // 4096 + {16384, true, 2048, 4096}, + } + for _, tt := range tests { + e.SetMaxDynamicTableSize(tt.v) + if got := e.tableSizeUpdate; tt.wantUpdate != got { + t.Errorf("e.tableSizeUpdate = %v; want %v", got, tt.wantUpdate) + } + if got := e.minSize; tt.wantMinSize != got { + t.Errorf("e.minSize = %v; want %v", got, tt.wantMinSize) + } + if got := e.dynTab.maxSize; tt.wantMaxSize != got { + t.Errorf("e.maxSize = %v; want %v", got, tt.wantMaxSize) + } + } +} + +func TestEncoderSetMaxDynamicTableSizeLimit(t *testing.T) { + e := NewEncoder(nil) + // 4095 < initialHeaderTableSize means maxSize is truncated to + // 4095. + e.SetMaxDynamicTableSizeLimit(4095) + if got, want := e.dynTab.maxSize, uint32(4095); got != want { + t.Errorf("e.dynTab.maxSize = %v; want %v", got, want) + } + if got, want := e.maxSizeLimit, uint32(4095); got != want { + t.Errorf("e.maxSizeLimit = %v; want %v", got, want) + } + if got, want := e.tableSizeUpdate, true; got != want { + t.Errorf("e.tableSizeUpdate = %v; want %v", got, want) + } + // maxSize will be truncated to maxSizeLimit + e.SetMaxDynamicTableSize(16384) + if got, want := e.dynTab.maxSize, uint32(4095); got != want { + t.Errorf("e.dynTab.maxSize = %v; want %v", got, want) + } + // 8192 > current maxSizeLimit, so maxSize does not change. + e.SetMaxDynamicTableSizeLimit(8192) + if got, want := e.dynTab.maxSize, uint32(4095); got != want { + t.Errorf("e.dynTab.maxSize = %v; want %v", got, want) + } + if got, want := e.maxSizeLimit, uint32(8192); got != want { + t.Errorf("e.maxSizeLimit = %v; want %v", got, want) + } +} + +func removeSpace(s string) string { + return strings.Replace(s, " ", "", -1) +} + +func BenchmarkEncoderSearchTable(b *testing.B) { + e := NewEncoder(nil) + + // A sample of possible header fields. + // This is not based on any actual data from HTTP/2 traces. + var possible []HeaderField + for _, f := range staticTable.ents { + if f.Value == "" { + possible = append(possible, f) + continue + } + // Generate 5 random values, except for cookie and set-cookie, + // which we know can have many values in practice. + num := 5 + if f.Name == "cookie" || f.Name == "set-cookie" { + num = 25 + } + for i := 0; i < num; i++ { + f.Value = fmt.Sprintf("%s-%d", f.Name, i) + possible = append(possible, f) + } + } + for k := 0; k < 10; k++ { + f := HeaderField{ + Name: fmt.Sprintf("x-header-%d", k), + Sensitive: rand.Int()%2 == 0, + } + for i := 0; i < 5; i++ { + f.Value = fmt.Sprintf("%s-%d", f.Name, i) + possible = append(possible, f) + } + } + + // Add a random sample to the dynamic table. This very loosely simulates + // a history of 100 requests with 20 header fields per request. + for r := 0; r < 100*20; r++ { + f := possible[rand.Int31n(int32(len(possible)))] + // Skip if this is in the staticTable verbatim. + if _, has := staticTable.search(f); !has { + e.dynTab.add(f) + } + } + + b.ResetTimer() + for n := 0; n < b.N; n++ { + for _, f := range possible { + e.searchTable(f) + } + } +} diff --git a/vendor/golang.org/x/net/http2/hpack/hpack_test.go b/vendor/golang.org/x/net/http2/hpack/hpack_test.go new file mode 100644 index 000000000..bc7f47678 --- /dev/null +++ b/vendor/golang.org/x/net/http2/hpack/hpack_test.go @@ -0,0 +1,722 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package hpack + +import ( + "bytes" + "encoding/hex" + "fmt" + "math/rand" + "reflect" + "strings" + "testing" + "time" +) + +func (d *Decoder) mustAt(idx int) HeaderField { + if hf, ok := d.at(uint64(idx)); !ok { + panic(fmt.Sprintf("bogus index %d", idx)) + } else { + return hf + } +} + +func TestDynamicTableAt(t *testing.T) { + d := NewDecoder(4096, nil) + at := d.mustAt + if got, want := at(2), (pair(":method", "GET")); got != want { + t.Errorf("at(2) = %v; want %v", got, want) + } + d.dynTab.add(pair("foo", "bar")) + d.dynTab.add(pair("blake", "miz")) + if got, want := at(staticTable.len()+1), (pair("blake", "miz")); got != want { + t.Errorf("at(dyn 1) = %v; want %v", got, want) + } + if got, want := at(staticTable.len()+2), (pair("foo", "bar")); got != want { + t.Errorf("at(dyn 2) = %v; want %v", got, want) + } + if got, want := at(3), (pair(":method", "POST")); got != want { + t.Errorf("at(3) = %v; want %v", got, want) + } +} + +func TestDynamicTableSizeEvict(t *testing.T) { + d := NewDecoder(4096, nil) + if want := uint32(0); d.dynTab.size != want { + t.Fatalf("size = %d; want %d", d.dynTab.size, want) + } + add := d.dynTab.add + add(pair("blake", "eats pizza")) + if want := uint32(15 + 32); d.dynTab.size != want { + t.Fatalf("after pizza, size = %d; want %d", d.dynTab.size, want) + } + add(pair("foo", "bar")) + if want := uint32(15 + 32 + 6 + 32); d.dynTab.size != want { + t.Fatalf("after foo bar, size = %d; want %d", d.dynTab.size, want) + } + d.dynTab.setMaxSize(15 + 32 + 1 /* slop */) + if want := uint32(6 + 32); d.dynTab.size != want { + t.Fatalf("after setMaxSize, size = %d; want %d", d.dynTab.size, want) + } + if got, want := d.mustAt(staticTable.len()+1), (pair("foo", "bar")); got != want { + t.Errorf("at(dyn 1) = %v; want %v", got, want) + } + add(pair("long", strings.Repeat("x", 500))) + if want := uint32(0); d.dynTab.size != want { + t.Fatalf("after big one, size = %d; want %d", d.dynTab.size, want) + } +} + +func TestDecoderDecode(t *testing.T) { + tests := []struct { + name string + in []byte + want []HeaderField + wantDynTab []HeaderField // newest entry first + }{ + // C.2.1 Literal Header Field with Indexing + // http://http2.github.io/http2-spec/compression.html#rfc.section.C.2.1 + {"C.2.1", dehex("400a 6375 7374 6f6d 2d6b 6579 0d63 7573 746f 6d2d 6865 6164 6572"), + []HeaderField{pair("custom-key", "custom-header")}, + []HeaderField{pair("custom-key", "custom-header")}, + }, + + // C.2.2 Literal Header Field without Indexing + // http://http2.github.io/http2-spec/compression.html#rfc.section.C.2.2 + {"C.2.2", dehex("040c 2f73 616d 706c 652f 7061 7468"), + []HeaderField{pair(":path", "/sample/path")}, + []HeaderField{}}, + + // C.2.3 Literal Header Field never Indexed + // http://http2.github.io/http2-spec/compression.html#rfc.section.C.2.3 + {"C.2.3", dehex("1008 7061 7373 776f 7264 0673 6563 7265 74"), + []HeaderField{{"password", "secret", true}}, + []HeaderField{}}, + + // C.2.4 Indexed Header Field + // http://http2.github.io/http2-spec/compression.html#rfc.section.C.2.4 + {"C.2.4", []byte("\x82"), + []HeaderField{pair(":method", "GET")}, + []HeaderField{}}, + } + for _, tt := range tests { + d := NewDecoder(4096, nil) + hf, err := d.DecodeFull(tt.in) + if err != nil { + t.Errorf("%s: %v", tt.name, err) + continue + } + if !reflect.DeepEqual(hf, tt.want) { + t.Errorf("%s: Got %v; want %v", tt.name, hf, tt.want) + } + gotDynTab := d.dynTab.reverseCopy() + if !reflect.DeepEqual(gotDynTab, tt.wantDynTab) { + t.Errorf("%s: dynamic table after = %v; want %v", tt.name, gotDynTab, tt.wantDynTab) + } + } +} + +func (dt *dynamicTable) reverseCopy() (hf []HeaderField) { + hf = make([]HeaderField, len(dt.table.ents)) + for i := range hf { + hf[i] = dt.table.ents[len(dt.table.ents)-1-i] + } + return +} + +type encAndWant struct { + enc []byte + want []HeaderField + wantDynTab []HeaderField + wantDynSize uint32 +} + +// C.3 Request Examples without Huffman Coding +// http://http2.github.io/http2-spec/compression.html#rfc.section.C.3 +func TestDecodeC3_NoHuffman(t *testing.T) { + testDecodeSeries(t, 4096, []encAndWant{ + {dehex("8286 8441 0f77 7777 2e65 7861 6d70 6c65 2e63 6f6d"), + []HeaderField{ + pair(":method", "GET"), + pair(":scheme", "http"), + pair(":path", "/"), + pair(":authority", "www.example.com"), + }, + []HeaderField{ + pair(":authority", "www.example.com"), + }, + 57, + }, + {dehex("8286 84be 5808 6e6f 2d63 6163 6865"), + []HeaderField{ + pair(":method", "GET"), + pair(":scheme", "http"), + pair(":path", "/"), + pair(":authority", "www.example.com"), + pair("cache-control", "no-cache"), + }, + []HeaderField{ + pair("cache-control", "no-cache"), + pair(":authority", "www.example.com"), + }, + 110, + }, + {dehex("8287 85bf 400a 6375 7374 6f6d 2d6b 6579 0c63 7573 746f 6d2d 7661 6c75 65"), + []HeaderField{ + pair(":method", "GET"), + pair(":scheme", "https"), + pair(":path", "/index.html"), + pair(":authority", "www.example.com"), + pair("custom-key", "custom-value"), + }, + []HeaderField{ + pair("custom-key", "custom-value"), + pair("cache-control", "no-cache"), + pair(":authority", "www.example.com"), + }, + 164, + }, + }) +} + +// C.4 Request Examples with Huffman Coding +// http://http2.github.io/http2-spec/compression.html#rfc.section.C.4 +func TestDecodeC4_Huffman(t *testing.T) { + testDecodeSeries(t, 4096, []encAndWant{ + {dehex("8286 8441 8cf1 e3c2 e5f2 3a6b a0ab 90f4 ff"), + []HeaderField{ + pair(":method", "GET"), + pair(":scheme", "http"), + pair(":path", "/"), + pair(":authority", "www.example.com"), + }, + []HeaderField{ + pair(":authority", "www.example.com"), + }, + 57, + }, + {dehex("8286 84be 5886 a8eb 1064 9cbf"), + []HeaderField{ + pair(":method", "GET"), + pair(":scheme", "http"), + pair(":path", "/"), + pair(":authority", "www.example.com"), + pair("cache-control", "no-cache"), + }, + []HeaderField{ + pair("cache-control", "no-cache"), + pair(":authority", "www.example.com"), + }, + 110, + }, + {dehex("8287 85bf 4088 25a8 49e9 5ba9 7d7f 8925 a849 e95b b8e8 b4bf"), + []HeaderField{ + pair(":method", "GET"), + pair(":scheme", "https"), + pair(":path", "/index.html"), + pair(":authority", "www.example.com"), + pair("custom-key", "custom-value"), + }, + []HeaderField{ + pair("custom-key", "custom-value"), + pair("cache-control", "no-cache"), + pair(":authority", "www.example.com"), + }, + 164, + }, + }) +} + +// http://http2.github.io/http2-spec/compression.html#rfc.section.C.5 +// "This section shows several consecutive header lists, corresponding +// to HTTP responses, on the same connection. The HTTP/2 setting +// parameter SETTINGS_HEADER_TABLE_SIZE is set to the value of 256 +// octets, causing some evictions to occur." +func TestDecodeC5_ResponsesNoHuff(t *testing.T) { + testDecodeSeries(t, 256, []encAndWant{ + {dehex(` +4803 3330 3258 0770 7269 7661 7465 611d +4d6f 6e2c 2032 3120 4f63 7420 3230 3133 +2032 303a 3133 3a32 3120 474d 546e 1768 +7474 7073 3a2f 2f77 7777 2e65 7861 6d70 +6c65 2e63 6f6d +`), + []HeaderField{ + pair(":status", "302"), + pair("cache-control", "private"), + pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"), + pair("location", "https://www.example.com"), + }, + []HeaderField{ + pair("location", "https://www.example.com"), + pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"), + pair("cache-control", "private"), + pair(":status", "302"), + }, + 222, + }, + {dehex("4803 3330 37c1 c0bf"), + []HeaderField{ + pair(":status", "307"), + pair("cache-control", "private"), + pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"), + pair("location", "https://www.example.com"), + }, + []HeaderField{ + pair(":status", "307"), + pair("location", "https://www.example.com"), + pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"), + pair("cache-control", "private"), + }, + 222, + }, + {dehex(` +88c1 611d 4d6f 6e2c 2032 3120 4f63 7420 +3230 3133 2032 303a 3133 3a32 3220 474d +54c0 5a04 677a 6970 7738 666f 6f3d 4153 +444a 4b48 514b 425a 584f 5157 454f 5049 +5541 5851 5745 4f49 553b 206d 6178 2d61 +6765 3d33 3630 303b 2076 6572 7369 6f6e +3d31 +`), + []HeaderField{ + pair(":status", "200"), + pair("cache-control", "private"), + pair("date", "Mon, 21 Oct 2013 20:13:22 GMT"), + pair("location", "https://www.example.com"), + pair("content-encoding", "gzip"), + pair("set-cookie", "foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1"), + }, + []HeaderField{ + pair("set-cookie", "foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1"), + pair("content-encoding", "gzip"), + pair("date", "Mon, 21 Oct 2013 20:13:22 GMT"), + }, + 215, + }, + }) +} + +// http://http2.github.io/http2-spec/compression.html#rfc.section.C.6 +// "This section shows the same examples as the previous section, but +// using Huffman encoding for the literal values. The HTTP/2 setting +// parameter SETTINGS_HEADER_TABLE_SIZE is set to the value of 256 +// octets, causing some evictions to occur. The eviction mechanism +// uses the length of the decoded literal values, so the same +// evictions occurs as in the previous section." +func TestDecodeC6_ResponsesHuffman(t *testing.T) { + testDecodeSeries(t, 256, []encAndWant{ + {dehex(` +4882 6402 5885 aec3 771a 4b61 96d0 7abe +9410 54d4 44a8 2005 9504 0b81 66e0 82a6 +2d1b ff6e 919d 29ad 1718 63c7 8f0b 97c8 +e9ae 82ae 43d3 +`), + []HeaderField{ + pair(":status", "302"), + pair("cache-control", "private"), + pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"), + pair("location", "https://www.example.com"), + }, + []HeaderField{ + pair("location", "https://www.example.com"), + pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"), + pair("cache-control", "private"), + pair(":status", "302"), + }, + 222, + }, + {dehex("4883 640e ffc1 c0bf"), + []HeaderField{ + pair(":status", "307"), + pair("cache-control", "private"), + pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"), + pair("location", "https://www.example.com"), + }, + []HeaderField{ + pair(":status", "307"), + pair("location", "https://www.example.com"), + pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"), + pair("cache-control", "private"), + }, + 222, + }, + {dehex(` +88c1 6196 d07a be94 1054 d444 a820 0595 +040b 8166 e084 a62d 1bff c05a 839b d9ab +77ad 94e7 821d d7f2 e6c7 b335 dfdf cd5b +3960 d5af 2708 7f36 72c1 ab27 0fb5 291f +9587 3160 65c0 03ed 4ee5 b106 3d50 07 +`), + []HeaderField{ + pair(":status", "200"), + pair("cache-control", "private"), + pair("date", "Mon, 21 Oct 2013 20:13:22 GMT"), + pair("location", "https://www.example.com"), + pair("content-encoding", "gzip"), + pair("set-cookie", "foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1"), + }, + []HeaderField{ + pair("set-cookie", "foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1"), + pair("content-encoding", "gzip"), + pair("date", "Mon, 21 Oct 2013 20:13:22 GMT"), + }, + 215, + }, + }) +} + +func testDecodeSeries(t *testing.T, size uint32, steps []encAndWant) { + d := NewDecoder(size, nil) + for i, step := range steps { + hf, err := d.DecodeFull(step.enc) + if err != nil { + t.Fatalf("Error at step index %d: %v", i, err) + } + if !reflect.DeepEqual(hf, step.want) { + t.Fatalf("At step index %d: Got headers %v; want %v", i, hf, step.want) + } + gotDynTab := d.dynTab.reverseCopy() + if !reflect.DeepEqual(gotDynTab, step.wantDynTab) { + t.Errorf("After step index %d, dynamic table = %v; want %v", i, gotDynTab, step.wantDynTab) + } + if d.dynTab.size != step.wantDynSize { + t.Errorf("After step index %d, dynamic table size = %v; want %v", i, d.dynTab.size, step.wantDynSize) + } + } +} + +func TestHuffmanDecodeExcessPadding(t *testing.T) { + tests := [][]byte{ + {0xff}, // Padding Exceeds 7 bits + {0x1f, 0xff}, // {"a", 1 byte excess padding} + {0x1f, 0xff, 0xff}, // {"a", 2 byte excess padding} + {0x1f, 0xff, 0xff, 0xff}, // {"a", 3 byte excess padding} + {0xff, 0x9f, 0xff, 0xff, 0xff}, // {"a", 29 bit excess padding} + {'R', 0xbc, '0', 0xff, 0xff, 0xff, 0xff}, // Padding ends on partial symbol. + } + for i, in := range tests { + var buf bytes.Buffer + if _, err := HuffmanDecode(&buf, in); err != ErrInvalidHuffman { + t.Errorf("test-%d: decode(%q) = %v; want ErrInvalidHuffman", i, in, err) + } + } +} + +func TestHuffmanDecodeEOS(t *testing.T) { + in := []byte{0xff, 0xff, 0xff, 0xff, 0xfc} // {EOS, "?"} + var buf bytes.Buffer + if _, err := HuffmanDecode(&buf, in); err != ErrInvalidHuffman { + t.Errorf("error = %v; want ErrInvalidHuffman", err) + } +} + +func TestHuffmanDecodeMaxLengthOnTrailingByte(t *testing.T) { + in := []byte{0x00, 0x01} // {"0", "0", "0"} + var buf bytes.Buffer + if err := huffmanDecode(&buf, 2, in); err != ErrStringLength { + t.Errorf("error = %v; want ErrStringLength", err) + } +} + +func TestHuffmanDecodeCorruptPadding(t *testing.T) { + in := []byte{0x00} + var buf bytes.Buffer + if _, err := HuffmanDecode(&buf, in); err != ErrInvalidHuffman { + t.Errorf("error = %v; want ErrInvalidHuffman", err) + } +} + +func TestHuffmanDecode(t *testing.T) { + tests := []struct { + inHex, want string + }{ + {"f1e3 c2e5 f23a 6ba0 ab90 f4ff", "www.example.com"}, + {"a8eb 1064 9cbf", "no-cache"}, + {"25a8 49e9 5ba9 7d7f", "custom-key"}, + {"25a8 49e9 5bb8 e8b4 bf", "custom-value"}, + {"6402", "302"}, + {"aec3 771a 4b", "private"}, + {"d07a be94 1054 d444 a820 0595 040b 8166 e082 a62d 1bff", "Mon, 21 Oct 2013 20:13:21 GMT"}, + {"9d29 ad17 1863 c78f 0b97 c8e9 ae82 ae43 d3", "https://www.example.com"}, + {"9bd9 ab", "gzip"}, + {"94e7 821d d7f2 e6c7 b335 dfdf cd5b 3960 d5af 2708 7f36 72c1 ab27 0fb5 291f 9587 3160 65c0 03ed 4ee5 b106 3d50 07", + "foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1"}, + } + for i, tt := range tests { + var buf bytes.Buffer + in, err := hex.DecodeString(strings.Replace(tt.inHex, " ", "", -1)) + if err != nil { + t.Errorf("%d. hex input error: %v", i, err) + continue + } + if _, err := HuffmanDecode(&buf, in); err != nil { + t.Errorf("%d. decode error: %v", i, err) + continue + } + if got := buf.String(); tt.want != got { + t.Errorf("%d. decode = %q; want %q", i, got, tt.want) + } + } +} + +func TestAppendHuffmanString(t *testing.T) { + tests := []struct { + in, want string + }{ + {"www.example.com", "f1e3 c2e5 f23a 6ba0 ab90 f4ff"}, + {"no-cache", "a8eb 1064 9cbf"}, + {"custom-key", "25a8 49e9 5ba9 7d7f"}, + {"custom-value", "25a8 49e9 5bb8 e8b4 bf"}, + {"302", "6402"}, + {"private", "aec3 771a 4b"}, + {"Mon, 21 Oct 2013 20:13:21 GMT", "d07a be94 1054 d444 a820 0595 040b 8166 e082 a62d 1bff"}, + {"https://www.example.com", "9d29 ad17 1863 c78f 0b97 c8e9 ae82 ae43 d3"}, + {"gzip", "9bd9 ab"}, + {"foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1", + "94e7 821d d7f2 e6c7 b335 dfdf cd5b 3960 d5af 2708 7f36 72c1 ab27 0fb5 291f 9587 3160 65c0 03ed 4ee5 b106 3d50 07"}, + } + for i, tt := range tests { + buf := []byte{} + want := strings.Replace(tt.want, " ", "", -1) + buf = AppendHuffmanString(buf, tt.in) + if got := hex.EncodeToString(buf); want != got { + t.Errorf("%d. encode = %q; want %q", i, got, want) + } + } +} + +func TestHuffmanMaxStrLen(t *testing.T) { + const msg = "Some string" + huff := AppendHuffmanString(nil, msg) + + testGood := func(max int) { + var out bytes.Buffer + if err := huffmanDecode(&out, max, huff); err != nil { + t.Errorf("For maxLen=%d, unexpected error: %v", max, err) + } + if out.String() != msg { + t.Errorf("For maxLen=%d, out = %q; want %q", max, out.String(), msg) + } + } + testGood(0) + testGood(len(msg)) + testGood(len(msg) + 1) + + var out bytes.Buffer + if err := huffmanDecode(&out, len(msg)-1, huff); err != ErrStringLength { + t.Errorf("err = %v; want ErrStringLength", err) + } +} + +func TestHuffmanRoundtripStress(t *testing.T) { + const Len = 50 // of uncompressed string + input := make([]byte, Len) + var output bytes.Buffer + var huff []byte + + n := 5000 + if testing.Short() { + n = 100 + } + seed := time.Now().UnixNano() + t.Logf("Seed = %v", seed) + src := rand.New(rand.NewSource(seed)) + var encSize int64 + for i := 0; i < n; i++ { + for l := range input { + input[l] = byte(src.Intn(256)) + } + huff = AppendHuffmanString(huff[:0], string(input)) + encSize += int64(len(huff)) + output.Reset() + if err := huffmanDecode(&output, 0, huff); err != nil { + t.Errorf("Failed to decode %q -> %q -> error %v", input, huff, err) + continue + } + if !bytes.Equal(output.Bytes(), input) { + t.Errorf("Roundtrip failure on %q -> %q -> %q", input, huff, output.Bytes()) + } + } + t.Logf("Compressed size of original: %0.02f%% (%v -> %v)", 100*(float64(encSize)/(Len*float64(n))), Len*n, encSize) +} + +func TestHuffmanDecodeFuzz(t *testing.T) { + const Len = 50 // of compressed + var buf, zbuf bytes.Buffer + + n := 5000 + if testing.Short() { + n = 100 + } + seed := time.Now().UnixNano() + t.Logf("Seed = %v", seed) + src := rand.New(rand.NewSource(seed)) + numFail := 0 + for i := 0; i < n; i++ { + zbuf.Reset() + if i == 0 { + // Start with at least one invalid one. + zbuf.WriteString("00\x91\xff\xff\xff\xff\xc8") + } else { + for l := 0; l < Len; l++ { + zbuf.WriteByte(byte(src.Intn(256))) + } + } + + buf.Reset() + if err := huffmanDecode(&buf, 0, zbuf.Bytes()); err != nil { + if err == ErrInvalidHuffman { + numFail++ + continue + } + t.Errorf("Failed to decode %q: %v", zbuf.Bytes(), err) + continue + } + } + t.Logf("%0.02f%% are invalid (%d / %d)", 100*float64(numFail)/float64(n), numFail, n) + if numFail < 1 { + t.Error("expected at least one invalid huffman encoding (test starts with one)") + } +} + +func TestReadVarInt(t *testing.T) { + type res struct { + i uint64 + consumed int + err error + } + tests := []struct { + n byte + p []byte + want res + }{ + // Fits in a byte: + {1, []byte{0}, res{0, 1, nil}}, + {2, []byte{2}, res{2, 1, nil}}, + {3, []byte{6}, res{6, 1, nil}}, + {4, []byte{14}, res{14, 1, nil}}, + {5, []byte{30}, res{30, 1, nil}}, + {6, []byte{62}, res{62, 1, nil}}, + {7, []byte{126}, res{126, 1, nil}}, + {8, []byte{254}, res{254, 1, nil}}, + + // Doesn't fit in a byte: + {1, []byte{1}, res{0, 0, errNeedMore}}, + {2, []byte{3}, res{0, 0, errNeedMore}}, + {3, []byte{7}, res{0, 0, errNeedMore}}, + {4, []byte{15}, res{0, 0, errNeedMore}}, + {5, []byte{31}, res{0, 0, errNeedMore}}, + {6, []byte{63}, res{0, 0, errNeedMore}}, + {7, []byte{127}, res{0, 0, errNeedMore}}, + {8, []byte{255}, res{0, 0, errNeedMore}}, + + // Ignoring top bits: + {5, []byte{255, 154, 10}, res{1337, 3, nil}}, // high dummy three bits: 111 + {5, []byte{159, 154, 10}, res{1337, 3, nil}}, // high dummy three bits: 100 + {5, []byte{191, 154, 10}, res{1337, 3, nil}}, // high dummy three bits: 101 + + // Extra byte: + {5, []byte{191, 154, 10, 2}, res{1337, 3, nil}}, // extra byte + + // Short a byte: + {5, []byte{191, 154}, res{0, 0, errNeedMore}}, + + // integer overflow: + {1, []byte{255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, res{0, 0, errVarintOverflow}}, + } + for _, tt := range tests { + i, remain, err := readVarInt(tt.n, tt.p) + consumed := len(tt.p) - len(remain) + got := res{i, consumed, err} + if got != tt.want { + t.Errorf("readVarInt(%d, %v ~ %x) = %+v; want %+v", tt.n, tt.p, tt.p, got, tt.want) + } + } +} + +// Fuzz crash, originally reported at https://github.com/bradfitz/http2/issues/56 +func TestHuffmanFuzzCrash(t *testing.T) { + got, err := HuffmanDecodeToString([]byte("00\x91\xff\xff\xff\xff\xc8")) + if got != "" { + t.Errorf("Got %q; want empty string", got) + } + if err != ErrInvalidHuffman { + t.Errorf("Err = %v; want ErrInvalidHuffman", err) + } +} + +func pair(name, value string) HeaderField { + return HeaderField{Name: name, Value: value} +} + +func dehex(s string) []byte { + s = strings.Replace(s, " ", "", -1) + s = strings.Replace(s, "\n", "", -1) + b, err := hex.DecodeString(s) + if err != nil { + panic(err) + } + return b +} + +func TestEmitEnabled(t *testing.T) { + var buf bytes.Buffer + enc := NewEncoder(&buf) + enc.WriteField(HeaderField{Name: "foo", Value: "bar"}) + enc.WriteField(HeaderField{Name: "foo", Value: "bar"}) + + numCallback := 0 + var dec *Decoder + dec = NewDecoder(8<<20, func(HeaderField) { + numCallback++ + dec.SetEmitEnabled(false) + }) + if !dec.EmitEnabled() { + t.Errorf("initial emit enabled = false; want true") + } + if _, err := dec.Write(buf.Bytes()); err != nil { + t.Error(err) + } + if numCallback != 1 { + t.Errorf("num callbacks = %d; want 1", numCallback) + } + if dec.EmitEnabled() { + t.Errorf("emit enabled = true; want false") + } +} + +func TestSaveBufLimit(t *testing.T) { + const maxStr = 1 << 10 + var got []HeaderField + dec := NewDecoder(initialHeaderTableSize, func(hf HeaderField) { + got = append(got, hf) + }) + dec.SetMaxStringLength(maxStr) + var frag []byte + frag = append(frag[:0], encodeTypeByte(false, false)) + frag = appendVarInt(frag, 7, 3) + frag = append(frag, "foo"...) + frag = appendVarInt(frag, 7, 3) + frag = append(frag, "bar"...) + + if _, err := dec.Write(frag); err != nil { + t.Fatal(err) + } + + want := []HeaderField{{Name: "foo", Value: "bar"}} + if !reflect.DeepEqual(got, want) { + t.Errorf("After small writes, got %v; want %v", got, want) + } + + frag = append(frag[:0], encodeTypeByte(false, false)) + frag = appendVarInt(frag, 7, maxStr*3) + frag = append(frag, make([]byte, maxStr*3)...) + + _, err := dec.Write(frag) + if err != ErrStringLength { + t.Fatalf("Write error = %v; want ErrStringLength", err) + } +} diff --git a/vendor/golang.org/x/net/http2/hpack/tables_test.go b/vendor/golang.org/x/net/http2/hpack/tables_test.go new file mode 100644 index 000000000..d963f3635 --- /dev/null +++ b/vendor/golang.org/x/net/http2/hpack/tables_test.go @@ -0,0 +1,214 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package hpack + +import ( + "bufio" + "regexp" + "strconv" + "strings" + "testing" +) + +func TestHeaderFieldTable(t *testing.T) { + table := &headerFieldTable{} + table.init() + table.addEntry(pair("key1", "value1-1")) + table.addEntry(pair("key2", "value2-1")) + table.addEntry(pair("key1", "value1-2")) + table.addEntry(pair("key3", "value3-1")) + table.addEntry(pair("key4", "value4-1")) + table.addEntry(pair("key2", "value2-2")) + + // Tests will be run twice: once before evicting anything, and + // again after evicting the three oldest entries. + tests := []struct { + f HeaderField + beforeWantStaticI uint64 + beforeWantMatch bool + afterWantStaticI uint64 + afterWantMatch bool + }{ + {HeaderField{"key1", "value1-1", false}, 1, true, 0, false}, + {HeaderField{"key1", "value1-2", false}, 3, true, 0, false}, + {HeaderField{"key1", "value1-3", false}, 3, false, 0, false}, + {HeaderField{"key2", "value2-1", false}, 2, true, 3, false}, + {HeaderField{"key2", "value2-2", false}, 6, true, 3, true}, + {HeaderField{"key2", "value2-3", false}, 6, false, 3, false}, + {HeaderField{"key4", "value4-1", false}, 5, true, 2, true}, + // Name match only, because sensitive. + {HeaderField{"key4", "value4-1", true}, 5, false, 2, false}, + // Key not found. + {HeaderField{"key5", "value5-x", false}, 0, false, 0, false}, + } + + staticToDynamic := func(i uint64) uint64 { + if i == 0 { + return 0 + } + return uint64(table.len()) - i + 1 // dynamic is the reversed table + } + + searchStatic := func(f HeaderField) (uint64, bool) { + old := staticTable + staticTable = table + defer func() { staticTable = old }() + return staticTable.search(f) + } + + searchDynamic := func(f HeaderField) (uint64, bool) { + return table.search(f) + } + + for _, test := range tests { + gotI, gotMatch := searchStatic(test.f) + if wantI, wantMatch := test.beforeWantStaticI, test.beforeWantMatch; gotI != wantI || gotMatch != wantMatch { + t.Errorf("before evictions: searchStatic(%+v)=%v,%v want %v,%v", test.f, gotI, gotMatch, wantI, wantMatch) + } + gotI, gotMatch = searchDynamic(test.f) + wantDynamicI := staticToDynamic(test.beforeWantStaticI) + if wantI, wantMatch := wantDynamicI, test.beforeWantMatch; gotI != wantI || gotMatch != wantMatch { + t.Errorf("before evictions: searchDynamic(%+v)=%v,%v want %v,%v", test.f, gotI, gotMatch, wantI, wantMatch) + } + } + + table.evictOldest(3) + + for _, test := range tests { + gotI, gotMatch := searchStatic(test.f) + if wantI, wantMatch := test.afterWantStaticI, test.afterWantMatch; gotI != wantI || gotMatch != wantMatch { + t.Errorf("after evictions: searchStatic(%+v)=%v,%v want %v,%v", test.f, gotI, gotMatch, wantI, wantMatch) + } + gotI, gotMatch = searchDynamic(test.f) + wantDynamicI := staticToDynamic(test.afterWantStaticI) + if wantI, wantMatch := wantDynamicI, test.afterWantMatch; gotI != wantI || gotMatch != wantMatch { + t.Errorf("after evictions: searchDynamic(%+v)=%v,%v want %v,%v", test.f, gotI, gotMatch, wantI, wantMatch) + } + } +} + +func TestHeaderFieldTable_LookupMapEviction(t *testing.T) { + table := &headerFieldTable{} + table.init() + table.addEntry(pair("key1", "value1-1")) + table.addEntry(pair("key2", "value2-1")) + table.addEntry(pair("key1", "value1-2")) + table.addEntry(pair("key3", "value3-1")) + table.addEntry(pair("key4", "value4-1")) + table.addEntry(pair("key2", "value2-2")) + + // evict all pairs + table.evictOldest(table.len()) + + if l := table.len(); l > 0 { + t.Errorf("table.len() = %d, want 0", l) + } + + if l := len(table.byName); l > 0 { + t.Errorf("len(table.byName) = %d, want 0", l) + } + + if l := len(table.byNameValue); l > 0 { + t.Errorf("len(table.byNameValue) = %d, want 0", l) + } +} + +func TestStaticTable(t *testing.T) { + fromSpec := ` + +-------+-----------------------------+---------------+ + | 1 | :authority | | + | 2 | :method | GET | + | 3 | :method | POST | + | 4 | :path | / | + | 5 | :path | /index.html | + | 6 | :scheme | http | + | 7 | :scheme | https | + | 8 | :status | 200 | + | 9 | :status | 204 | + | 10 | :status | 206 | + | 11 | :status | 304 | + | 12 | :status | 400 | + | 13 | :status | 404 | + | 14 | :status | 500 | + | 15 | accept-charset | | + | 16 | accept-encoding | gzip, deflate | + | 17 | accept-language | | + | 18 | accept-ranges | | + | 19 | accept | | + | 20 | access-control-allow-origin | | + | 21 | age | | + | 22 | allow | | + | 23 | authorization | | + | 24 | cache-control | | + | 25 | content-disposition | | + | 26 | content-encoding | | + | 27 | content-language | | + | 28 | content-length | | + | 29 | content-location | | + | 30 | content-range | | + | 31 | content-type | | + | 32 | cookie | | + | 33 | date | | + | 34 | etag | | + | 35 | expect | | + | 36 | expires | | + | 37 | from | | + | 38 | host | | + | 39 | if-match | | + | 40 | if-modified-since | | + | 41 | if-none-match | | + | 42 | if-range | | + | 43 | if-unmodified-since | | + | 44 | last-modified | | + | 45 | link | | + | 46 | location | | + | 47 | max-forwards | | + | 48 | proxy-authenticate | | + | 49 | proxy-authorization | | + | 50 | range | | + | 51 | referer | | + | 52 | refresh | | + | 53 | retry-after | | + | 54 | server | | + | 55 | set-cookie | | + | 56 | strict-transport-security | | + | 57 | transfer-encoding | | + | 58 | user-agent | | + | 59 | vary | | + | 60 | via | | + | 61 | www-authenticate | | + +-------+-----------------------------+---------------+ +` + bs := bufio.NewScanner(strings.NewReader(fromSpec)) + re := regexp.MustCompile(`\| (\d+)\s+\| (\S+)\s*\| (\S(.*\S)?)?\s+\|`) + for bs.Scan() { + l := bs.Text() + if !strings.Contains(l, "|") { + continue + } + m := re.FindStringSubmatch(l) + if m == nil { + continue + } + i, err := strconv.Atoi(m[1]) + if err != nil { + t.Errorf("Bogus integer on line %q", l) + continue + } + if i < 1 || i > staticTable.len() { + t.Errorf("Bogus index %d on line %q", i, l) + continue + } + if got, want := staticTable.ents[i-1].Name, m[2]; got != want { + t.Errorf("header index %d name = %q; want %q", i, got, want) + } + if got, want := staticTable.ents[i-1].Value, m[3]; got != want { + t.Errorf("header index %d value = %q; want %q", i, got, want) + } + } + if err := bs.Err(); err != nil { + t.Error(err) + } +} diff --git a/vendor/golang.org/x/net/http2/http2.go b/vendor/golang.org/x/net/http2/http2.go index 15d7aff38..d565f40e0 100644 --- a/vendor/golang.org/x/net/http2/http2.go +++ b/vendor/golang.org/x/net/http2/http2.go @@ -14,7 +14,7 @@ // // See https://http2.golang.org/ for a test server running this code. // -package http2 +package http2 // import "golang.org/x/net/http2" import ( "bufio" diff --git a/vendor/golang.org/x/net/http2/http2_test.go b/vendor/golang.org/x/net/http2/http2_test.go new file mode 100644 index 000000000..524877647 --- /dev/null +++ b/vendor/golang.org/x/net/http2/http2_test.go @@ -0,0 +1,199 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package http2 + +import ( + "bytes" + "errors" + "flag" + "fmt" + "net/http" + "os/exec" + "strconv" + "strings" + "testing" + + "golang.org/x/net/http2/hpack" +) + +var knownFailing = flag.Bool("known_failing", false, "Run known-failing tests.") + +func condSkipFailingTest(t *testing.T) { + if !*knownFailing { + t.Skip("Skipping known-failing test without --known_failing") + } +} + +func init() { + inTests = true + DebugGoroutines = true + flag.BoolVar(&VerboseLogs, "verboseh2", VerboseLogs, "Verbose HTTP/2 debug logging") +} + +func TestSettingString(t *testing.T) { + tests := []struct { + s Setting + want string + }{ + {Setting{SettingMaxFrameSize, 123}, "[MAX_FRAME_SIZE = 123]"}, + {Setting{1<<16 - 1, 123}, "[UNKNOWN_SETTING_65535 = 123]"}, + } + for i, tt := range tests { + got := fmt.Sprint(tt.s) + if got != tt.want { + t.Errorf("%d. for %#v, string = %q; want %q", i, tt.s, got, tt.want) + } + } +} + +type twriter struct { + t testing.TB + st *serverTester // optional +} + +func (w twriter) Write(p []byte) (n int, err error) { + if w.st != nil { + ps := string(p) + for _, phrase := range w.st.logFilter { + if strings.Contains(ps, phrase) { + return len(p), nil // no logging + } + } + } + w.t.Logf("%s", p) + return len(p), nil +} + +// like encodeHeader, but don't add implicit pseudo headers. +func encodeHeaderNoImplicit(t *testing.T, headers ...string) []byte { + var buf bytes.Buffer + enc := hpack.NewEncoder(&buf) + for len(headers) > 0 { + k, v := headers[0], headers[1] + headers = headers[2:] + if err := enc.WriteField(hpack.HeaderField{Name: k, Value: v}); err != nil { + t.Fatalf("HPACK encoding error for %q/%q: %v", k, v, err) + } + } + return buf.Bytes() +} + +// Verify that curl has http2. +func requireCurl(t *testing.T) { + out, err := dockerLogs(curl(t, "--version")) + if err != nil { + t.Skipf("failed to determine curl features; skipping test") + } + if !strings.Contains(string(out), "HTTP2") { + t.Skip("curl doesn't support HTTP2; skipping test") + } +} + +func curl(t *testing.T, args ...string) (container string) { + out, err := exec.Command("docker", append([]string{"run", "-d", "--net=host", "gohttp2/curl"}, args...)...).Output() + if err != nil { + t.Skipf("Failed to run curl in docker: %v, %s", err, out) + } + return strings.TrimSpace(string(out)) +} + +// Verify that h2load exists. +func requireH2load(t *testing.T) { + out, err := dockerLogs(h2load(t, "--version")) + if err != nil { + t.Skipf("failed to probe h2load; skipping test: %s", out) + } + if !strings.Contains(string(out), "h2load nghttp2/") { + t.Skipf("h2load not present; skipping test. (Output=%q)", out) + } +} + +func h2load(t *testing.T, args ...string) (container string) { + out, err := exec.Command("docker", append([]string{"run", "-d", "--net=host", "--entrypoint=/usr/local/bin/h2load", "gohttp2/curl"}, args...)...).Output() + if err != nil { + t.Skipf("Failed to run h2load in docker: %v, %s", err, out) + } + return strings.TrimSpace(string(out)) +} + +type puppetCommand struct { + fn func(w http.ResponseWriter, r *http.Request) + done chan<- bool +} + +type handlerPuppet struct { + ch chan puppetCommand +} + +func newHandlerPuppet() *handlerPuppet { + return &handlerPuppet{ + ch: make(chan puppetCommand), + } +} + +func (p *handlerPuppet) act(w http.ResponseWriter, r *http.Request) { + for cmd := range p.ch { + cmd.fn(w, r) + cmd.done <- true + } +} + +func (p *handlerPuppet) done() { close(p.ch) } +func (p *handlerPuppet) do(fn func(http.ResponseWriter, *http.Request)) { + done := make(chan bool) + p.ch <- puppetCommand{fn, done} + <-done +} +func dockerLogs(container string) ([]byte, error) { + out, err := exec.Command("docker", "wait", container).CombinedOutput() + if err != nil { + return out, err + } + exitStatus, err := strconv.Atoi(strings.TrimSpace(string(out))) + if err != nil { + return out, errors.New("unexpected exit status from docker wait") + } + out, err = exec.Command("docker", "logs", container).CombinedOutput() + exec.Command("docker", "rm", container).Run() + if err == nil && exitStatus != 0 { + err = fmt.Errorf("exit status %d: %s", exitStatus, out) + } + return out, err +} + +func kill(container string) { + exec.Command("docker", "kill", container).Run() + exec.Command("docker", "rm", container).Run() +} + +func cleanDate(res *http.Response) { + if d := res.Header["Date"]; len(d) == 1 { + d[0] = "XXX" + } +} + +func TestSorterPoolAllocs(t *testing.T) { + ss := []string{"a", "b", "c"} + h := http.Header{ + "a": nil, + "b": nil, + "c": nil, + } + sorter := new(sorter) + + if allocs := testing.AllocsPerRun(100, func() { + sorter.SortStrings(ss) + }); allocs >= 1 { + t.Logf("SortStrings allocs = %v; want <1", allocs) + } + + if allocs := testing.AllocsPerRun(5, func() { + if len(sorter.Keys(h)) != 3 { + t.Fatal("wrong result") + } + }); allocs > 0 { + t.Logf("Keys allocs = %v; want <1", allocs) + } +} diff --git a/vendor/golang.org/x/net/http2/pipe_test.go b/vendor/golang.org/x/net/http2/pipe_test.go new file mode 100644 index 000000000..1bf351ff6 --- /dev/null +++ b/vendor/golang.org/x/net/http2/pipe_test.go @@ -0,0 +1,130 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package http2 + +import ( + "bytes" + "errors" + "io" + "io/ioutil" + "testing" +) + +func TestPipeClose(t *testing.T) { + var p pipe + p.b = new(bytes.Buffer) + a := errors.New("a") + b := errors.New("b") + p.CloseWithError(a) + p.CloseWithError(b) + _, err := p.Read(make([]byte, 1)) + if err != a { + t.Errorf("err = %v want %v", err, a) + } +} + +func TestPipeDoneChan(t *testing.T) { + var p pipe + done := p.Done() + select { + case <-done: + t.Fatal("done too soon") + default: + } + p.CloseWithError(io.EOF) + select { + case <-done: + default: + t.Fatal("should be done") + } +} + +func TestPipeDoneChan_ErrFirst(t *testing.T) { + var p pipe + p.CloseWithError(io.EOF) + done := p.Done() + select { + case <-done: + default: + t.Fatal("should be done") + } +} + +func TestPipeDoneChan_Break(t *testing.T) { + var p pipe + done := p.Done() + select { + case <-done: + t.Fatal("done too soon") + default: + } + p.BreakWithError(io.EOF) + select { + case <-done: + default: + t.Fatal("should be done") + } +} + +func TestPipeDoneChan_Break_ErrFirst(t *testing.T) { + var p pipe + p.BreakWithError(io.EOF) + done := p.Done() + select { + case <-done: + default: + t.Fatal("should be done") + } +} + +func TestPipeCloseWithError(t *testing.T) { + p := &pipe{b: new(bytes.Buffer)} + const body = "foo" + io.WriteString(p, body) + a := errors.New("test error") + p.CloseWithError(a) + all, err := ioutil.ReadAll(p) + if string(all) != body { + t.Errorf("read bytes = %q; want %q", all, body) + } + if err != a { + t.Logf("read error = %v, %v", err, a) + } + // Read and Write should fail. + if n, err := p.Write([]byte("abc")); err != errClosedPipeWrite || n != 0 { + t.Errorf("Write(abc) after close\ngot %v, %v\nwant 0, %v", n, err, errClosedPipeWrite) + } + if n, err := p.Read(make([]byte, 1)); err == nil || n != 0 { + t.Errorf("Read() after close\ngot %v, nil\nwant 0, %v", n, errClosedPipeWrite) + } +} + +func TestPipeBreakWithError(t *testing.T) { + p := &pipe{b: new(bytes.Buffer)} + io.WriteString(p, "foo") + a := errors.New("test err") + p.BreakWithError(a) + all, err := ioutil.ReadAll(p) + if string(all) != "" { + t.Errorf("read bytes = %q; want empty string", all) + } + if err != a { + t.Logf("read error = %v, %v", err, a) + } + if p.b != nil { + t.Errorf("buffer should be nil after BreakWithError") + } + // Write should succeed silently. + if n, err := p.Write([]byte("abc")); err != nil || n != 3 { + t.Errorf("Write(abc) after break\ngot %v, %v\nwant 0, nil", n, err) + } + if p.b != nil { + t.Errorf("buffer should be nil after Write") + } + // Read should fail. + if n, err := p.Read(make([]byte, 1)); err == nil || n != 0 { + t.Errorf("Read() after close\ngot %v, nil\nwant 0, not nil", n) + } +} diff --git a/vendor/golang.org/x/net/http2/server_push_test.go b/vendor/golang.org/x/net/http2/server_push_test.go new file mode 100644 index 000000000..918fd30dc --- /dev/null +++ b/vendor/golang.org/x/net/http2/server_push_test.go @@ -0,0 +1,521 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.8 + +package http2 + +import ( + "errors" + "fmt" + "io" + "io/ioutil" + "net/http" + "reflect" + "strconv" + "sync" + "testing" + "time" +) + +func TestServer_Push_Success(t *testing.T) { + const ( + mainBody = "index page" + pushedBody = "pushed page" + userAgent = "testagent" + cookie = "testcookie" + ) + + var stURL string + checkPromisedReq := func(r *http.Request, wantMethod string, wantH http.Header) error { + if got, want := r.Method, wantMethod; got != want { + return fmt.Errorf("promised Req.Method=%q, want %q", got, want) + } + if got, want := r.Header, wantH; !reflect.DeepEqual(got, want) { + return fmt.Errorf("promised Req.Header=%q, want %q", got, want) + } + if got, want := "https://"+r.Host, stURL; got != want { + return fmt.Errorf("promised Req.Host=%q, want %q", got, want) + } + if r.Body == nil { + return fmt.Errorf("nil Body") + } + if buf, err := ioutil.ReadAll(r.Body); err != nil || len(buf) != 0 { + return fmt.Errorf("ReadAll(Body)=%q,%v, want '',nil", buf, err) + } + return nil + } + + errc := make(chan error, 3) + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + switch r.URL.RequestURI() { + case "/": + // Push "/pushed?get" as a GET request, using an absolute URL. + opt := &http.PushOptions{ + Header: http.Header{ + "User-Agent": {userAgent}, + }, + } + if err := w.(http.Pusher).Push(stURL+"/pushed?get", opt); err != nil { + errc <- fmt.Errorf("error pushing /pushed?get: %v", err) + return + } + // Push "/pushed?head" as a HEAD request, using a path. + opt = &http.PushOptions{ + Method: "HEAD", + Header: http.Header{ + "User-Agent": {userAgent}, + "Cookie": {cookie}, + }, + } + if err := w.(http.Pusher).Push("/pushed?head", opt); err != nil { + errc <- fmt.Errorf("error pushing /pushed?head: %v", err) + return + } + w.Header().Set("Content-Type", "text/html") + w.Header().Set("Content-Length", strconv.Itoa(len(mainBody))) + w.WriteHeader(200) + io.WriteString(w, mainBody) + errc <- nil + + case "/pushed?get": + wantH := http.Header{} + wantH.Set("User-Agent", userAgent) + if err := checkPromisedReq(r, "GET", wantH); err != nil { + errc <- fmt.Errorf("/pushed?get: %v", err) + return + } + w.Header().Set("Content-Type", "text/html") + w.Header().Set("Content-Length", strconv.Itoa(len(pushedBody))) + w.WriteHeader(200) + io.WriteString(w, pushedBody) + errc <- nil + + case "/pushed?head": + wantH := http.Header{} + wantH.Set("User-Agent", userAgent) + wantH.Set("Cookie", cookie) + if err := checkPromisedReq(r, "HEAD", wantH); err != nil { + errc <- fmt.Errorf("/pushed?head: %v", err) + return + } + w.WriteHeader(204) + errc <- nil + + default: + errc <- fmt.Errorf("unknown RequestURL %q", r.URL.RequestURI()) + } + }) + stURL = st.ts.URL + + // Send one request, which should push two responses. + st.greet() + getSlash(st) + for k := 0; k < 3; k++ { + select { + case <-time.After(2 * time.Second): + t.Errorf("timeout waiting for handler %d to finish", k) + case err := <-errc: + if err != nil { + t.Fatal(err) + } + } + } + + checkPushPromise := func(f Frame, promiseID uint32, wantH [][2]string) error { + pp, ok := f.(*PushPromiseFrame) + if !ok { + return fmt.Errorf("got a %T; want *PushPromiseFrame", f) + } + if !pp.HeadersEnded() { + return fmt.Errorf("want END_HEADERS flag in PushPromiseFrame") + } + if got, want := pp.PromiseID, promiseID; got != want { + return fmt.Errorf("got PromiseID %v; want %v", got, want) + } + gotH := st.decodeHeader(pp.HeaderBlockFragment()) + if !reflect.DeepEqual(gotH, wantH) { + return fmt.Errorf("got promised headers %v; want %v", gotH, wantH) + } + return nil + } + checkHeaders := func(f Frame, wantH [][2]string) error { + hf, ok := f.(*HeadersFrame) + if !ok { + return fmt.Errorf("got a %T; want *HeadersFrame", f) + } + gotH := st.decodeHeader(hf.HeaderBlockFragment()) + if !reflect.DeepEqual(gotH, wantH) { + return fmt.Errorf("got response headers %v; want %v", gotH, wantH) + } + return nil + } + checkData := func(f Frame, wantData string) error { + df, ok := f.(*DataFrame) + if !ok { + return fmt.Errorf("got a %T; want *DataFrame", f) + } + if gotData := string(df.Data()); gotData != wantData { + return fmt.Errorf("got response data %q; want %q", gotData, wantData) + } + return nil + } + + // Stream 1 has 2 PUSH_PROMISE + HEADERS + DATA + // Stream 2 has HEADERS + DATA + // Stream 4 has HEADERS + expected := map[uint32][]func(Frame) error{ + 1: { + func(f Frame) error { + return checkPushPromise(f, 2, [][2]string{ + {":method", "GET"}, + {":scheme", "https"}, + {":authority", st.ts.Listener.Addr().String()}, + {":path", "/pushed?get"}, + {"user-agent", userAgent}, + }) + }, + func(f Frame) error { + return checkPushPromise(f, 4, [][2]string{ + {":method", "HEAD"}, + {":scheme", "https"}, + {":authority", st.ts.Listener.Addr().String()}, + {":path", "/pushed?head"}, + {"cookie", cookie}, + {"user-agent", userAgent}, + }) + }, + func(f Frame) error { + return checkHeaders(f, [][2]string{ + {":status", "200"}, + {"content-type", "text/html"}, + {"content-length", strconv.Itoa(len(mainBody))}, + }) + }, + func(f Frame) error { + return checkData(f, mainBody) + }, + }, + 2: { + func(f Frame) error { + return checkHeaders(f, [][2]string{ + {":status", "200"}, + {"content-type", "text/html"}, + {"content-length", strconv.Itoa(len(pushedBody))}, + }) + }, + func(f Frame) error { + return checkData(f, pushedBody) + }, + }, + 4: { + func(f Frame) error { + return checkHeaders(f, [][2]string{ + {":status", "204"}, + }) + }, + }, + } + + consumed := map[uint32]int{} + for k := 0; len(expected) > 0; k++ { + f, err := st.readFrame() + if err != nil { + for id, left := range expected { + t.Errorf("stream %d: missing %d frames", id, len(left)) + } + t.Fatalf("readFrame %d: %v", k, err) + } + id := f.Header().StreamID + label := fmt.Sprintf("stream %d, frame %d", id, consumed[id]) + if len(expected[id]) == 0 { + t.Fatalf("%s: unexpected frame %#+v", label, f) + } + check := expected[id][0] + expected[id] = expected[id][1:] + if len(expected[id]) == 0 { + delete(expected, id) + } + if err := check(f); err != nil { + t.Fatalf("%s: %v", label, err) + } + consumed[id]++ + } +} + +func TestServer_Push_SuccessNoRace(t *testing.T) { + // Regression test for issue #18326. Ensure the request handler can mutate + // pushed request headers without racing with the PUSH_PROMISE write. + errc := make(chan error, 2) + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + switch r.URL.RequestURI() { + case "/": + opt := &http.PushOptions{ + Header: http.Header{"User-Agent": {"testagent"}}, + } + if err := w.(http.Pusher).Push("/pushed", opt); err != nil { + errc <- fmt.Errorf("error pushing: %v", err) + return + } + w.WriteHeader(200) + errc <- nil + + case "/pushed": + // Update request header, ensure there is no race. + r.Header.Set("User-Agent", "newagent") + r.Header.Set("Cookie", "cookie") + w.WriteHeader(200) + errc <- nil + + default: + errc <- fmt.Errorf("unknown RequestURL %q", r.URL.RequestURI()) + } + }) + + // Send one request, which should push one response. + st.greet() + getSlash(st) + for k := 0; k < 2; k++ { + select { + case <-time.After(2 * time.Second): + t.Errorf("timeout waiting for handler %d to finish", k) + case err := <-errc: + if err != nil { + t.Fatal(err) + } + } + } +} + +func TestServer_Push_RejectRecursivePush(t *testing.T) { + // Expect two requests, but might get three if there's a bug and the second push succeeds. + errc := make(chan error, 3) + handler := func(w http.ResponseWriter, r *http.Request) error { + baseURL := "https://" + r.Host + switch r.URL.Path { + case "/": + if err := w.(http.Pusher).Push(baseURL+"/push1", nil); err != nil { + return fmt.Errorf("first Push()=%v, want nil", err) + } + return nil + + case "/push1": + if got, want := w.(http.Pusher).Push(baseURL+"/push2", nil), ErrRecursivePush; got != want { + return fmt.Errorf("Push()=%v, want %v", got, want) + } + return nil + + default: + return fmt.Errorf("unexpected path: %q", r.URL.Path) + } + } + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + errc <- handler(w, r) + }) + defer st.Close() + st.greet() + getSlash(st) + if err := <-errc; err != nil { + t.Errorf("First request failed: %v", err) + } + if err := <-errc; err != nil { + t.Errorf("Second request failed: %v", err) + } +} + +func testServer_Push_RejectSingleRequest(t *testing.T, doPush func(http.Pusher, *http.Request) error, settings ...Setting) { + // Expect one request, but might get two if there's a bug and the push succeeds. + errc := make(chan error, 2) + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + errc <- doPush(w.(http.Pusher), r) + }) + defer st.Close() + st.greet() + if err := st.fr.WriteSettings(settings...); err != nil { + st.t.Fatalf("WriteSettings: %v", err) + } + st.wantSettingsAck() + getSlash(st) + if err := <-errc; err != nil { + t.Error(err) + } + // Should not get a PUSH_PROMISE frame. + hf := st.wantHeaders() + if !hf.StreamEnded() { + t.Error("stream should end after headers") + } +} + +func TestServer_Push_RejectIfDisabled(t *testing.T) { + testServer_Push_RejectSingleRequest(t, + func(p http.Pusher, r *http.Request) error { + if got, want := p.Push("https://"+r.Host+"/pushed", nil), http.ErrNotSupported; got != want { + return fmt.Errorf("Push()=%v, want %v", got, want) + } + return nil + }, + Setting{SettingEnablePush, 0}) +} + +func TestServer_Push_RejectWhenNoConcurrentStreams(t *testing.T) { + testServer_Push_RejectSingleRequest(t, + func(p http.Pusher, r *http.Request) error { + if got, want := p.Push("https://"+r.Host+"/pushed", nil), ErrPushLimitReached; got != want { + return fmt.Errorf("Push()=%v, want %v", got, want) + } + return nil + }, + Setting{SettingMaxConcurrentStreams, 0}) +} + +func TestServer_Push_RejectWrongScheme(t *testing.T) { + testServer_Push_RejectSingleRequest(t, + func(p http.Pusher, r *http.Request) error { + if err := p.Push("http://"+r.Host+"/pushed", nil); err == nil { + return errors.New("Push() should have failed (push target URL is http)") + } + return nil + }) +} + +func TestServer_Push_RejectMissingHost(t *testing.T) { + testServer_Push_RejectSingleRequest(t, + func(p http.Pusher, r *http.Request) error { + if err := p.Push("https:pushed", nil); err == nil { + return errors.New("Push() should have failed (push target URL missing host)") + } + return nil + }) +} + +func TestServer_Push_RejectRelativePath(t *testing.T) { + testServer_Push_RejectSingleRequest(t, + func(p http.Pusher, r *http.Request) error { + if err := p.Push("../test", nil); err == nil { + return errors.New("Push() should have failed (push target is a relative path)") + } + return nil + }) +} + +func TestServer_Push_RejectForbiddenMethod(t *testing.T) { + testServer_Push_RejectSingleRequest(t, + func(p http.Pusher, r *http.Request) error { + if err := p.Push("https://"+r.Host+"/pushed", &http.PushOptions{Method: "POST"}); err == nil { + return errors.New("Push() should have failed (cannot promise a POST)") + } + return nil + }) +} + +func TestServer_Push_RejectForbiddenHeader(t *testing.T) { + testServer_Push_RejectSingleRequest(t, + func(p http.Pusher, r *http.Request) error { + header := http.Header{ + "Content-Length": {"10"}, + "Content-Encoding": {"gzip"}, + "Trailer": {"Foo"}, + "Te": {"trailers"}, + "Host": {"test.com"}, + ":authority": {"test.com"}, + } + if err := p.Push("https://"+r.Host+"/pushed", &http.PushOptions{Header: header}); err == nil { + return errors.New("Push() should have failed (forbidden headers)") + } + return nil + }) +} + +func TestServer_Push_StateTransitions(t *testing.T) { + const body = "foo" + + gotPromise := make(chan bool) + finishedPush := make(chan bool) + + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + switch r.URL.RequestURI() { + case "/": + if err := w.(http.Pusher).Push("/pushed", nil); err != nil { + t.Errorf("Push error: %v", err) + } + // Don't finish this request until the push finishes so we don't + // nondeterministically interleave output frames with the push. + <-finishedPush + case "/pushed": + <-gotPromise + } + w.Header().Set("Content-Type", "text/html") + w.Header().Set("Content-Length", strconv.Itoa(len(body))) + w.WriteHeader(200) + io.WriteString(w, body) + }) + defer st.Close() + + st.greet() + if st.stream(2) != nil { + t.Fatal("stream 2 should be empty") + } + if got, want := st.streamState(2), stateIdle; got != want { + t.Fatalf("streamState(2)=%v, want %v", got, want) + } + getSlash(st) + // After the PUSH_PROMISE is sent, the stream should be stateHalfClosedRemote. + st.wantPushPromise() + if got, want := st.streamState(2), stateHalfClosedRemote; got != want { + t.Fatalf("streamState(2)=%v, want %v", got, want) + } + // We stall the HTTP handler for "/pushed" until the above check. If we don't + // stall the handler, then the handler might write HEADERS and DATA and finish + // the stream before we check st.streamState(2) -- should that happen, we'll + // see stateClosed and fail the above check. + close(gotPromise) + st.wantHeaders() + if df := st.wantData(); !df.StreamEnded() { + t.Fatal("expected END_STREAM flag on DATA") + } + if got, want := st.streamState(2), stateClosed; got != want { + t.Fatalf("streamState(2)=%v, want %v", got, want) + } + close(finishedPush) +} + +func TestServer_Push_RejectAfterGoAway(t *testing.T) { + var readyOnce sync.Once + ready := make(chan struct{}) + errc := make(chan error, 2) + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + select { + case <-ready: + case <-time.After(5 * time.Second): + errc <- fmt.Errorf("timeout waiting for GOAWAY to be processed") + } + if got, want := w.(http.Pusher).Push("https://"+r.Host+"/pushed", nil), http.ErrNotSupported; got != want { + errc <- fmt.Errorf("Push()=%v, want %v", got, want) + } + errc <- nil + }) + defer st.Close() + st.greet() + getSlash(st) + + // Send GOAWAY and wait for it to be processed. + st.fr.WriteGoAway(1, ErrCodeNo, nil) + go func() { + for { + select { + case <-ready: + return + default: + } + st.sc.serveMsgCh <- func(loopNum int) { + if !st.sc.pushEnabled { + readyOnce.Do(func() { close(ready) }) + } + } + } + }() + if err := <-errc; err != nil { + t.Error(err) + } +} diff --git a/vendor/golang.org/x/net/http2/server_test.go b/vendor/golang.org/x/net/http2/server_test.go new file mode 100644 index 000000000..b4e832894 --- /dev/null +++ b/vendor/golang.org/x/net/http2/server_test.go @@ -0,0 +1,3721 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package http2 + +import ( + "bytes" + "crypto/tls" + "errors" + "flag" + "fmt" + "io" + "io/ioutil" + "log" + "net" + "net/http" + "net/http/httptest" + "os" + "os/exec" + "reflect" + "runtime" + "strconv" + "strings" + "sync" + "sync/atomic" + "testing" + "time" + + "golang.org/x/net/http2/hpack" +) + +var stderrVerbose = flag.Bool("stderr_verbose", false, "Mirror verbosity to stderr, unbuffered") + +func stderrv() io.Writer { + if *stderrVerbose { + return os.Stderr + } + + return ioutil.Discard +} + +type serverTester struct { + cc net.Conn // client conn + t testing.TB + ts *httptest.Server + fr *Framer + serverLogBuf bytes.Buffer // logger for httptest.Server + logFilter []string // substrings to filter out + scMu sync.Mutex // guards sc + sc *serverConn + hpackDec *hpack.Decoder + decodedHeaders [][2]string + + // If http2debug!=2, then we capture Frame debug logs that will be written + // to t.Log after a test fails. The read and write logs use separate locks + // and buffers so we don't accidentally introduce synchronization between + // the read and write goroutines, which may hide data races. + frameReadLogMu sync.Mutex + frameReadLogBuf bytes.Buffer + frameWriteLogMu sync.Mutex + frameWriteLogBuf bytes.Buffer + + // writing headers: + headerBuf bytes.Buffer + hpackEnc *hpack.Encoder +} + +func init() { + testHookOnPanicMu = new(sync.Mutex) +} + +func resetHooks() { + testHookOnPanicMu.Lock() + testHookOnPanic = nil + testHookOnPanicMu.Unlock() +} + +type serverTesterOpt string + +var optOnlyServer = serverTesterOpt("only_server") +var optQuiet = serverTesterOpt("quiet_logging") +var optFramerReuseFrames = serverTesterOpt("frame_reuse_frames") + +func newServerTester(t testing.TB, handler http.HandlerFunc, opts ...interface{}) *serverTester { + resetHooks() + + ts := httptest.NewUnstartedServer(handler) + + tlsConfig := &tls.Config{ + InsecureSkipVerify: true, + NextProtos: []string{NextProtoTLS}, + } + + var onlyServer, quiet, framerReuseFrames bool + h2server := new(Server) + for _, opt := range opts { + switch v := opt.(type) { + case func(*tls.Config): + v(tlsConfig) + case func(*httptest.Server): + v(ts) + case func(*Server): + v(h2server) + case serverTesterOpt: + switch v { + case optOnlyServer: + onlyServer = true + case optQuiet: + quiet = true + case optFramerReuseFrames: + framerReuseFrames = true + } + case func(net.Conn, http.ConnState): + ts.Config.ConnState = v + default: + t.Fatalf("unknown newServerTester option type %T", v) + } + } + + ConfigureServer(ts.Config, h2server) + + st := &serverTester{ + t: t, + ts: ts, + } + st.hpackEnc = hpack.NewEncoder(&st.headerBuf) + st.hpackDec = hpack.NewDecoder(initialHeaderTableSize, st.onHeaderField) + + ts.TLS = ts.Config.TLSConfig // the httptest.Server has its own copy of this TLS config + if quiet { + ts.Config.ErrorLog = log.New(ioutil.Discard, "", 0) + } else { + ts.Config.ErrorLog = log.New(io.MultiWriter(stderrv(), twriter{t: t, st: st}, &st.serverLogBuf), "", log.LstdFlags) + } + ts.StartTLS() + + if VerboseLogs { + t.Logf("Running test server at: %s", ts.URL) + } + testHookGetServerConn = func(v *serverConn) { + st.scMu.Lock() + defer st.scMu.Unlock() + st.sc = v + } + log.SetOutput(io.MultiWriter(stderrv(), twriter{t: t, st: st})) + if !onlyServer { + cc, err := tls.Dial("tcp", ts.Listener.Addr().String(), tlsConfig) + if err != nil { + t.Fatal(err) + } + st.cc = cc + st.fr = NewFramer(cc, cc) + if framerReuseFrames { + st.fr.SetReuseFrames() + } + if !logFrameReads && !logFrameWrites { + st.fr.debugReadLoggerf = func(m string, v ...interface{}) { + m = time.Now().Format("2006-01-02 15:04:05.999999999 ") + strings.TrimPrefix(m, "http2: ") + "\n" + st.frameReadLogMu.Lock() + fmt.Fprintf(&st.frameReadLogBuf, m, v...) + st.frameReadLogMu.Unlock() + } + st.fr.debugWriteLoggerf = func(m string, v ...interface{}) { + m = time.Now().Format("2006-01-02 15:04:05.999999999 ") + strings.TrimPrefix(m, "http2: ") + "\n" + st.frameWriteLogMu.Lock() + fmt.Fprintf(&st.frameWriteLogBuf, m, v...) + st.frameWriteLogMu.Unlock() + } + st.fr.logReads = true + st.fr.logWrites = true + } + } + return st +} + +func (st *serverTester) closeConn() { + st.scMu.Lock() + defer st.scMu.Unlock() + st.sc.conn.Close() +} + +func (st *serverTester) addLogFilter(phrase string) { + st.logFilter = append(st.logFilter, phrase) +} + +func (st *serverTester) stream(id uint32) *stream { + ch := make(chan *stream, 1) + st.sc.serveMsgCh <- func(int) { + ch <- st.sc.streams[id] + } + return <-ch +} + +func (st *serverTester) streamState(id uint32) streamState { + ch := make(chan streamState, 1) + st.sc.serveMsgCh <- func(int) { + state, _ := st.sc.state(id) + ch <- state + } + return <-ch +} + +// loopNum reports how many times this conn's select loop has gone around. +func (st *serverTester) loopNum() int { + lastc := make(chan int, 1) + st.sc.serveMsgCh <- func(loopNum int) { + lastc <- loopNum + } + return <-lastc +} + +// awaitIdle heuristically awaits for the server conn's select loop to be idle. +// The heuristic is that the server connection's serve loop must schedule +// 50 times in a row without any channel sends or receives occurring. +func (st *serverTester) awaitIdle() { + remain := 50 + last := st.loopNum() + for remain > 0 { + n := st.loopNum() + if n == last+1 { + remain-- + } else { + remain = 50 + } + last = n + } +} + +func (st *serverTester) Close() { + if st.t.Failed() { + st.frameReadLogMu.Lock() + if st.frameReadLogBuf.Len() > 0 { + st.t.Logf("Framer read log:\n%s", st.frameReadLogBuf.String()) + } + st.frameReadLogMu.Unlock() + + st.frameWriteLogMu.Lock() + if st.frameWriteLogBuf.Len() > 0 { + st.t.Logf("Framer write log:\n%s", st.frameWriteLogBuf.String()) + } + st.frameWriteLogMu.Unlock() + + // If we failed already (and are likely in a Fatal, + // unwindowing), force close the connection, so the + // httptest.Server doesn't wait forever for the conn + // to close. + if st.cc != nil { + st.cc.Close() + } + } + st.ts.Close() + if st.cc != nil { + st.cc.Close() + } + log.SetOutput(os.Stderr) +} + +// greet initiates the client's HTTP/2 connection into a state where +// frames may be sent. +func (st *serverTester) greet() { + st.greetAndCheckSettings(func(Setting) error { return nil }) +} + +func (st *serverTester) greetAndCheckSettings(checkSetting func(s Setting) error) { + st.writePreface() + st.writeInitialSettings() + st.wantSettings().ForeachSetting(checkSetting) + st.writeSettingsAck() + + // The initial WINDOW_UPDATE and SETTINGS ACK can come in any order. + var gotSettingsAck bool + var gotWindowUpdate bool + + for i := 0; i < 2; i++ { + f, err := st.readFrame() + if err != nil { + st.t.Fatal(err) + } + switch f := f.(type) { + case *SettingsFrame: + if !f.Header().Flags.Has(FlagSettingsAck) { + st.t.Fatal("Settings Frame didn't have ACK set") + } + gotSettingsAck = true + + case *WindowUpdateFrame: + if f.FrameHeader.StreamID != 0 { + st.t.Fatalf("WindowUpdate StreamID = %d; want 0", f.FrameHeader.StreamID) + } + incr := uint32((&Server{}).initialConnRecvWindowSize() - initialWindowSize) + if f.Increment != incr { + st.t.Fatalf("WindowUpdate increment = %d; want %d", f.Increment, incr) + } + gotWindowUpdate = true + + default: + st.t.Fatalf("Wanting a settings ACK or window update, received a %T", f) + } + } + + if !gotSettingsAck { + st.t.Fatalf("Didn't get a settings ACK") + } + if !gotWindowUpdate { + st.t.Fatalf("Didn't get a window update") + } +} + +func (st *serverTester) writePreface() { + n, err := st.cc.Write(clientPreface) + if err != nil { + st.t.Fatalf("Error writing client preface: %v", err) + } + if n != len(clientPreface) { + st.t.Fatalf("Writing client preface, wrote %d bytes; want %d", n, len(clientPreface)) + } +} + +func (st *serverTester) writeInitialSettings() { + if err := st.fr.WriteSettings(); err != nil { + st.t.Fatalf("Error writing initial SETTINGS frame from client to server: %v", err) + } +} + +func (st *serverTester) writeSettingsAck() { + if err := st.fr.WriteSettingsAck(); err != nil { + st.t.Fatalf("Error writing ACK of server's SETTINGS: %v", err) + } +} + +func (st *serverTester) writeHeaders(p HeadersFrameParam) { + if err := st.fr.WriteHeaders(p); err != nil { + st.t.Fatalf("Error writing HEADERS: %v", err) + } +} + +func (st *serverTester) writePriority(id uint32, p PriorityParam) { + if err := st.fr.WritePriority(id, p); err != nil { + st.t.Fatalf("Error writing PRIORITY: %v", err) + } +} + +func (st *serverTester) encodeHeaderField(k, v string) { + err := st.hpackEnc.WriteField(hpack.HeaderField{Name: k, Value: v}) + if err != nil { + st.t.Fatalf("HPACK encoding error for %q/%q: %v", k, v, err) + } +} + +// encodeHeaderRaw is the magic-free version of encodeHeader. +// It takes 0 or more (k, v) pairs and encodes them. +func (st *serverTester) encodeHeaderRaw(headers ...string) []byte { + if len(headers)%2 == 1 { + panic("odd number of kv args") + } + st.headerBuf.Reset() + for len(headers) > 0 { + k, v := headers[0], headers[1] + st.encodeHeaderField(k, v) + headers = headers[2:] + } + return st.headerBuf.Bytes() +} + +// encodeHeader encodes headers and returns their HPACK bytes. headers +// must contain an even number of key/value pairs. There may be +// multiple pairs for keys (e.g. "cookie"). The :method, :path, and +// :scheme headers default to GET, / and https. The :authority header +// defaults to st.ts.Listener.Addr(). +func (st *serverTester) encodeHeader(headers ...string) []byte { + if len(headers)%2 == 1 { + panic("odd number of kv args") + } + + st.headerBuf.Reset() + defaultAuthority := st.ts.Listener.Addr().String() + + if len(headers) == 0 { + // Fast path, mostly for benchmarks, so test code doesn't pollute + // profiles when we're looking to improve server allocations. + st.encodeHeaderField(":method", "GET") + st.encodeHeaderField(":scheme", "https") + st.encodeHeaderField(":authority", defaultAuthority) + st.encodeHeaderField(":path", "/") + return st.headerBuf.Bytes() + } + + if len(headers) == 2 && headers[0] == ":method" { + // Another fast path for benchmarks. + st.encodeHeaderField(":method", headers[1]) + st.encodeHeaderField(":scheme", "https") + st.encodeHeaderField(":authority", defaultAuthority) + st.encodeHeaderField(":path", "/") + return st.headerBuf.Bytes() + } + + pseudoCount := map[string]int{} + keys := []string{":method", ":scheme", ":authority", ":path"} + vals := map[string][]string{ + ":method": {"GET"}, + ":scheme": {"https"}, + ":authority": {defaultAuthority}, + ":path": {"/"}, + } + for len(headers) > 0 { + k, v := headers[0], headers[1] + headers = headers[2:] + if _, ok := vals[k]; !ok { + keys = append(keys, k) + } + if strings.HasPrefix(k, ":") { + pseudoCount[k]++ + if pseudoCount[k] == 1 { + vals[k] = []string{v} + } else { + // Allows testing of invalid headers w/ dup pseudo fields. + vals[k] = append(vals[k], v) + } + } else { + vals[k] = append(vals[k], v) + } + } + for _, k := range keys { + for _, v := range vals[k] { + st.encodeHeaderField(k, v) + } + } + return st.headerBuf.Bytes() +} + +// bodylessReq1 writes a HEADERS frames with StreamID 1 and EndStream and EndHeaders set. +func (st *serverTester) bodylessReq1(headers ...string) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader(headers...), + EndStream: true, + EndHeaders: true, + }) +} + +func (st *serverTester) writeData(streamID uint32, endStream bool, data []byte) { + if err := st.fr.WriteData(streamID, endStream, data); err != nil { + st.t.Fatalf("Error writing DATA: %v", err) + } +} + +func (st *serverTester) writeDataPadded(streamID uint32, endStream bool, data, pad []byte) { + if err := st.fr.WriteDataPadded(streamID, endStream, data, pad); err != nil { + st.t.Fatalf("Error writing DATA: %v", err) + } +} + +func readFrameTimeout(fr *Framer, wait time.Duration) (Frame, error) { + ch := make(chan interface{}, 1) + go func() { + fr, err := fr.ReadFrame() + if err != nil { + ch <- err + } else { + ch <- fr + } + }() + t := time.NewTimer(wait) + select { + case v := <-ch: + t.Stop() + if fr, ok := v.(Frame); ok { + return fr, nil + } + return nil, v.(error) + case <-t.C: + return nil, errors.New("timeout waiting for frame") + } +} + +func (st *serverTester) readFrame() (Frame, error) { + return readFrameTimeout(st.fr, 2*time.Second) +} + +func (st *serverTester) wantHeaders() *HeadersFrame { + f, err := st.readFrame() + if err != nil { + st.t.Fatalf("Error while expecting a HEADERS frame: %v", err) + } + hf, ok := f.(*HeadersFrame) + if !ok { + st.t.Fatalf("got a %T; want *HeadersFrame", f) + } + return hf +} + +func (st *serverTester) wantContinuation() *ContinuationFrame { + f, err := st.readFrame() + if err != nil { + st.t.Fatalf("Error while expecting a CONTINUATION frame: %v", err) + } + cf, ok := f.(*ContinuationFrame) + if !ok { + st.t.Fatalf("got a %T; want *ContinuationFrame", f) + } + return cf +} + +func (st *serverTester) wantData() *DataFrame { + f, err := st.readFrame() + if err != nil { + st.t.Fatalf("Error while expecting a DATA frame: %v", err) + } + df, ok := f.(*DataFrame) + if !ok { + st.t.Fatalf("got a %T; want *DataFrame", f) + } + return df +} + +func (st *serverTester) wantSettings() *SettingsFrame { + f, err := st.readFrame() + if err != nil { + st.t.Fatalf("Error while expecting a SETTINGS frame: %v", err) + } + sf, ok := f.(*SettingsFrame) + if !ok { + st.t.Fatalf("got a %T; want *SettingsFrame", f) + } + return sf +} + +func (st *serverTester) wantPing() *PingFrame { + f, err := st.readFrame() + if err != nil { + st.t.Fatalf("Error while expecting a PING frame: %v", err) + } + pf, ok := f.(*PingFrame) + if !ok { + st.t.Fatalf("got a %T; want *PingFrame", f) + } + return pf +} + +func (st *serverTester) wantGoAway() *GoAwayFrame { + f, err := st.readFrame() + if err != nil { + st.t.Fatalf("Error while expecting a GOAWAY frame: %v", err) + } + gf, ok := f.(*GoAwayFrame) + if !ok { + st.t.Fatalf("got a %T; want *GoAwayFrame", f) + } + return gf +} + +func (st *serverTester) wantRSTStream(streamID uint32, errCode ErrCode) { + f, err := st.readFrame() + if err != nil { + st.t.Fatalf("Error while expecting an RSTStream frame: %v", err) + } + rs, ok := f.(*RSTStreamFrame) + if !ok { + st.t.Fatalf("got a %T; want *RSTStreamFrame", f) + } + if rs.FrameHeader.StreamID != streamID { + st.t.Fatalf("RSTStream StreamID = %d; want %d", rs.FrameHeader.StreamID, streamID) + } + if rs.ErrCode != errCode { + st.t.Fatalf("RSTStream ErrCode = %d (%s); want %d (%s)", rs.ErrCode, rs.ErrCode, errCode, errCode) + } +} + +func (st *serverTester) wantWindowUpdate(streamID, incr uint32) { + f, err := st.readFrame() + if err != nil { + st.t.Fatalf("Error while expecting a WINDOW_UPDATE frame: %v", err) + } + wu, ok := f.(*WindowUpdateFrame) + if !ok { + st.t.Fatalf("got a %T; want *WindowUpdateFrame", f) + } + if wu.FrameHeader.StreamID != streamID { + st.t.Fatalf("WindowUpdate StreamID = %d; want %d", wu.FrameHeader.StreamID, streamID) + } + if wu.Increment != incr { + st.t.Fatalf("WindowUpdate increment = %d; want %d", wu.Increment, incr) + } +} + +func (st *serverTester) wantSettingsAck() { + f, err := st.readFrame() + if err != nil { + st.t.Fatal(err) + } + sf, ok := f.(*SettingsFrame) + if !ok { + st.t.Fatalf("Wanting a settings ACK, received a %T", f) + } + if !sf.Header().Flags.Has(FlagSettingsAck) { + st.t.Fatal("Settings Frame didn't have ACK set") + } +} + +func (st *serverTester) wantPushPromise() *PushPromiseFrame { + f, err := st.readFrame() + if err != nil { + st.t.Fatal(err) + } + ppf, ok := f.(*PushPromiseFrame) + if !ok { + st.t.Fatalf("Wanted PushPromise, received %T", ppf) + } + return ppf +} + +func TestServer(t *testing.T) { + gotReq := make(chan bool, 1) + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Foo", "Bar") + gotReq <- true + }) + defer st.Close() + + covers("3.5", ` + The server connection preface consists of a potentially empty + SETTINGS frame ([SETTINGS]) that MUST be the first frame the + server sends in the HTTP/2 connection. + `) + + st.greet() + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader(), + EndStream: true, // no DATA frames + EndHeaders: true, + }) + + select { + case <-gotReq: + case <-time.After(2 * time.Second): + t.Error("timeout waiting for request") + } +} + +func TestServer_Request_Get(t *testing.T) { + testServerRequest(t, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader("foo-bar", "some-value"), + EndStream: true, // no DATA frames + EndHeaders: true, + }) + }, func(r *http.Request) { + if r.Method != "GET" { + t.Errorf("Method = %q; want GET", r.Method) + } + if r.URL.Path != "/" { + t.Errorf("URL.Path = %q; want /", r.URL.Path) + } + if r.ContentLength != 0 { + t.Errorf("ContentLength = %v; want 0", r.ContentLength) + } + if r.Close { + t.Error("Close = true; want false") + } + if !strings.Contains(r.RemoteAddr, ":") { + t.Errorf("RemoteAddr = %q; want something with a colon", r.RemoteAddr) + } + if r.Proto != "HTTP/2.0" || r.ProtoMajor != 2 || r.ProtoMinor != 0 { + t.Errorf("Proto = %q Major=%v,Minor=%v; want HTTP/2.0", r.Proto, r.ProtoMajor, r.ProtoMinor) + } + wantHeader := http.Header{ + "Foo-Bar": []string{"some-value"}, + } + if !reflect.DeepEqual(r.Header, wantHeader) { + t.Errorf("Header = %#v; want %#v", r.Header, wantHeader) + } + if n, err := r.Body.Read([]byte(" ")); err != io.EOF || n != 0 { + t.Errorf("Read = %d, %v; want 0, EOF", n, err) + } + }) +} + +func TestServer_Request_Get_PathSlashes(t *testing.T) { + testServerRequest(t, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader(":path", "/%2f/"), + EndStream: true, // no DATA frames + EndHeaders: true, + }) + }, func(r *http.Request) { + if r.RequestURI != "/%2f/" { + t.Errorf("RequestURI = %q; want /%%2f/", r.RequestURI) + } + if r.URL.Path != "///" { + t.Errorf("URL.Path = %q; want ///", r.URL.Path) + } + }) +} + +// TODO: add a test with EndStream=true on the HEADERS but setting a +// Content-Length anyway. Should we just omit it and force it to +// zero? + +func TestServer_Request_Post_NoContentLength_EndStream(t *testing.T) { + testServerRequest(t, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader(":method", "POST"), + EndStream: true, + EndHeaders: true, + }) + }, func(r *http.Request) { + if r.Method != "POST" { + t.Errorf("Method = %q; want POST", r.Method) + } + if r.ContentLength != 0 { + t.Errorf("ContentLength = %v; want 0", r.ContentLength) + } + if n, err := r.Body.Read([]byte(" ")); err != io.EOF || n != 0 { + t.Errorf("Read = %d, %v; want 0, EOF", n, err) + } + }) +} + +func TestServer_Request_Post_Body_ImmediateEOF(t *testing.T) { + testBodyContents(t, -1, "", func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader(":method", "POST"), + EndStream: false, // to say DATA frames are coming + EndHeaders: true, + }) + st.writeData(1, true, nil) // just kidding. empty body. + }) +} + +func TestServer_Request_Post_Body_OneData(t *testing.T) { + const content = "Some content" + testBodyContents(t, -1, content, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader(":method", "POST"), + EndStream: false, // to say DATA frames are coming + EndHeaders: true, + }) + st.writeData(1, true, []byte(content)) + }) +} + +func TestServer_Request_Post_Body_TwoData(t *testing.T) { + const content = "Some content" + testBodyContents(t, -1, content, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader(":method", "POST"), + EndStream: false, // to say DATA frames are coming + EndHeaders: true, + }) + st.writeData(1, false, []byte(content[:5])) + st.writeData(1, true, []byte(content[5:])) + }) +} + +func TestServer_Request_Post_Body_ContentLength_Correct(t *testing.T) { + const content = "Some content" + testBodyContents(t, int64(len(content)), content, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader( + ":method", "POST", + "content-length", strconv.Itoa(len(content)), + ), + EndStream: false, // to say DATA frames are coming + EndHeaders: true, + }) + st.writeData(1, true, []byte(content)) + }) +} + +func TestServer_Request_Post_Body_ContentLength_TooLarge(t *testing.T) { + testBodyContentsFail(t, 3, "request declared a Content-Length of 3 but only wrote 2 bytes", + func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader( + ":method", "POST", + "content-length", "3", + ), + EndStream: false, // to say DATA frames are coming + EndHeaders: true, + }) + st.writeData(1, true, []byte("12")) + }) +} + +func TestServer_Request_Post_Body_ContentLength_TooSmall(t *testing.T) { + testBodyContentsFail(t, 4, "sender tried to send more than declared Content-Length of 4 bytes", + func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader( + ":method", "POST", + "content-length", "4", + ), + EndStream: false, // to say DATA frames are coming + EndHeaders: true, + }) + st.writeData(1, true, []byte("12345")) + }) +} + +func testBodyContents(t *testing.T, wantContentLength int64, wantBody string, write func(st *serverTester)) { + testServerRequest(t, write, func(r *http.Request) { + if r.Method != "POST" { + t.Errorf("Method = %q; want POST", r.Method) + } + if r.ContentLength != wantContentLength { + t.Errorf("ContentLength = %v; want %d", r.ContentLength, wantContentLength) + } + all, err := ioutil.ReadAll(r.Body) + if err != nil { + t.Fatal(err) + } + if string(all) != wantBody { + t.Errorf("Read = %q; want %q", all, wantBody) + } + if err := r.Body.Close(); err != nil { + t.Fatalf("Close: %v", err) + } + }) +} + +func testBodyContentsFail(t *testing.T, wantContentLength int64, wantReadError string, write func(st *serverTester)) { + testServerRequest(t, write, func(r *http.Request) { + if r.Method != "POST" { + t.Errorf("Method = %q; want POST", r.Method) + } + if r.ContentLength != wantContentLength { + t.Errorf("ContentLength = %v; want %d", r.ContentLength, wantContentLength) + } + all, err := ioutil.ReadAll(r.Body) + if err == nil { + t.Fatalf("expected an error (%q) reading from the body. Successfully read %q instead.", + wantReadError, all) + } + if !strings.Contains(err.Error(), wantReadError) { + t.Fatalf("Body.Read = %v; want substring %q", err, wantReadError) + } + if err := r.Body.Close(); err != nil { + t.Fatalf("Close: %v", err) + } + }) +} + +// Using a Host header, instead of :authority +func TestServer_Request_Get_Host(t *testing.T) { + const host = "example.com" + testServerRequest(t, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader(":authority", "", "host", host), + EndStream: true, + EndHeaders: true, + }) + }, func(r *http.Request) { + if r.Host != host { + t.Errorf("Host = %q; want %q", r.Host, host) + } + }) +} + +// Using an :authority pseudo-header, instead of Host +func TestServer_Request_Get_Authority(t *testing.T) { + const host = "example.com" + testServerRequest(t, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader(":authority", host), + EndStream: true, + EndHeaders: true, + }) + }, func(r *http.Request) { + if r.Host != host { + t.Errorf("Host = %q; want %q", r.Host, host) + } + }) +} + +func TestServer_Request_WithContinuation(t *testing.T) { + wantHeader := http.Header{ + "Foo-One": []string{"value-one"}, + "Foo-Two": []string{"value-two"}, + "Foo-Three": []string{"value-three"}, + } + testServerRequest(t, func(st *serverTester) { + fullHeaders := st.encodeHeader( + "foo-one", "value-one", + "foo-two", "value-two", + "foo-three", "value-three", + ) + remain := fullHeaders + chunks := 0 + for len(remain) > 0 { + const maxChunkSize = 5 + chunk := remain + if len(chunk) > maxChunkSize { + chunk = chunk[:maxChunkSize] + } + remain = remain[len(chunk):] + + if chunks == 0 { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: chunk, + EndStream: true, // no DATA frames + EndHeaders: false, // we'll have continuation frames + }) + } else { + err := st.fr.WriteContinuation(1, len(remain) == 0, chunk) + if err != nil { + t.Fatal(err) + } + } + chunks++ + } + if chunks < 2 { + t.Fatal("too few chunks") + } + }, func(r *http.Request) { + if !reflect.DeepEqual(r.Header, wantHeader) { + t.Errorf("Header = %#v; want %#v", r.Header, wantHeader) + } + }) +} + +// Concatenated cookie headers. ("8.1.2.5 Compressing the Cookie Header Field") +func TestServer_Request_CookieConcat(t *testing.T) { + const host = "example.com" + testServerRequest(t, func(st *serverTester) { + st.bodylessReq1( + ":authority", host, + "cookie", "a=b", + "cookie", "c=d", + "cookie", "e=f", + ) + }, func(r *http.Request) { + const want = "a=b; c=d; e=f" + if got := r.Header.Get("Cookie"); got != want { + t.Errorf("Cookie = %q; want %q", got, want) + } + }) +} + +func TestServer_Request_Reject_CapitalHeader(t *testing.T) { + testRejectRequest(t, func(st *serverTester) { st.bodylessReq1("UPPER", "v") }) +} + +func TestServer_Request_Reject_HeaderFieldNameColon(t *testing.T) { + testRejectRequest(t, func(st *serverTester) { st.bodylessReq1("has:colon", "v") }) +} + +func TestServer_Request_Reject_HeaderFieldNameNULL(t *testing.T) { + testRejectRequest(t, func(st *serverTester) { st.bodylessReq1("has\x00null", "v") }) +} + +func TestServer_Request_Reject_HeaderFieldNameEmpty(t *testing.T) { + testRejectRequest(t, func(st *serverTester) { st.bodylessReq1("", "v") }) +} + +func TestServer_Request_Reject_HeaderFieldValueNewline(t *testing.T) { + testRejectRequest(t, func(st *serverTester) { st.bodylessReq1("foo", "has\nnewline") }) +} + +func TestServer_Request_Reject_HeaderFieldValueCR(t *testing.T) { + testRejectRequest(t, func(st *serverTester) { st.bodylessReq1("foo", "has\rcarriage") }) +} + +func TestServer_Request_Reject_HeaderFieldValueDEL(t *testing.T) { + testRejectRequest(t, func(st *serverTester) { st.bodylessReq1("foo", "has\x7fdel") }) +} + +func TestServer_Request_Reject_Pseudo_Missing_method(t *testing.T) { + testRejectRequest(t, func(st *serverTester) { st.bodylessReq1(":method", "") }) +} + +func TestServer_Request_Reject_Pseudo_ExactlyOne(t *testing.T) { + // 8.1.2.3 Request Pseudo-Header Fields + // "All HTTP/2 requests MUST include exactly one valid value" ... + testRejectRequest(t, func(st *serverTester) { + st.addLogFilter("duplicate pseudo-header") + st.bodylessReq1(":method", "GET", ":method", "POST") + }) +} + +func TestServer_Request_Reject_Pseudo_AfterRegular(t *testing.T) { + // 8.1.2.3 Request Pseudo-Header Fields + // "All pseudo-header fields MUST appear in the header block + // before regular header fields. Any request or response that + // contains a pseudo-header field that appears in a header + // block after a regular header field MUST be treated as + // malformed (Section 8.1.2.6)." + testRejectRequest(t, func(st *serverTester) { + st.addLogFilter("pseudo-header after regular header") + var buf bytes.Buffer + enc := hpack.NewEncoder(&buf) + enc.WriteField(hpack.HeaderField{Name: ":method", Value: "GET"}) + enc.WriteField(hpack.HeaderField{Name: "regular", Value: "foobar"}) + enc.WriteField(hpack.HeaderField{Name: ":path", Value: "/"}) + enc.WriteField(hpack.HeaderField{Name: ":scheme", Value: "https"}) + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: buf.Bytes(), + EndStream: true, + EndHeaders: true, + }) + }) +} + +func TestServer_Request_Reject_Pseudo_Missing_path(t *testing.T) { + testRejectRequest(t, func(st *serverTester) { st.bodylessReq1(":path", "") }) +} + +func TestServer_Request_Reject_Pseudo_Missing_scheme(t *testing.T) { + testRejectRequest(t, func(st *serverTester) { st.bodylessReq1(":scheme", "") }) +} + +func TestServer_Request_Reject_Pseudo_scheme_invalid(t *testing.T) { + testRejectRequest(t, func(st *serverTester) { st.bodylessReq1(":scheme", "bogus") }) +} + +func TestServer_Request_Reject_Pseudo_Unknown(t *testing.T) { + testRejectRequest(t, func(st *serverTester) { + st.addLogFilter(`invalid pseudo-header ":unknown_thing"`) + st.bodylessReq1(":unknown_thing", "") + }) +} + +func testRejectRequest(t *testing.T, send func(*serverTester)) { + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + t.Error("server request made it to handler; should've been rejected") + }) + defer st.Close() + + st.greet() + send(st) + st.wantRSTStream(1, ErrCodeProtocol) +} + +func testRejectRequestWithProtocolError(t *testing.T, send func(*serverTester)) { + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + t.Error("server request made it to handler; should've been rejected") + }, optQuiet) + defer st.Close() + + st.greet() + send(st) + gf := st.wantGoAway() + if gf.ErrCode != ErrCodeProtocol { + t.Errorf("err code = %v; want %v", gf.ErrCode, ErrCodeProtocol) + } +} + +// Section 5.1, on idle connections: "Receiving any frame other than +// HEADERS or PRIORITY on a stream in this state MUST be treated as a +// connection error (Section 5.4.1) of type PROTOCOL_ERROR." +func TestRejectFrameOnIdle_WindowUpdate(t *testing.T) { + testRejectRequestWithProtocolError(t, func(st *serverTester) { + st.fr.WriteWindowUpdate(123, 456) + }) +} +func TestRejectFrameOnIdle_Data(t *testing.T) { + testRejectRequestWithProtocolError(t, func(st *serverTester) { + st.fr.WriteData(123, true, nil) + }) +} +func TestRejectFrameOnIdle_RSTStream(t *testing.T) { + testRejectRequestWithProtocolError(t, func(st *serverTester) { + st.fr.WriteRSTStream(123, ErrCodeCancel) + }) +} + +func TestServer_Request_Connect(t *testing.T) { + testServerRequest(t, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: st.encodeHeaderRaw( + ":method", "CONNECT", + ":authority", "example.com:123", + ), + EndStream: true, + EndHeaders: true, + }) + }, func(r *http.Request) { + if g, w := r.Method, "CONNECT"; g != w { + t.Errorf("Method = %q; want %q", g, w) + } + if g, w := r.RequestURI, "example.com:123"; g != w { + t.Errorf("RequestURI = %q; want %q", g, w) + } + if g, w := r.URL.Host, "example.com:123"; g != w { + t.Errorf("URL.Host = %q; want %q", g, w) + } + }) +} + +func TestServer_Request_Connect_InvalidPath(t *testing.T) { + testServerRejectsStream(t, ErrCodeProtocol, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: st.encodeHeaderRaw( + ":method", "CONNECT", + ":authority", "example.com:123", + ":path", "/bogus", + ), + EndStream: true, + EndHeaders: true, + }) + }) +} + +func TestServer_Request_Connect_InvalidScheme(t *testing.T) { + testServerRejectsStream(t, ErrCodeProtocol, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: st.encodeHeaderRaw( + ":method", "CONNECT", + ":authority", "example.com:123", + ":scheme", "https", + ), + EndStream: true, + EndHeaders: true, + }) + }) +} + +func TestServer_Ping(t *testing.T) { + st := newServerTester(t, nil) + defer st.Close() + st.greet() + + // Server should ignore this one, since it has ACK set. + ackPingData := [8]byte{1, 2, 4, 8, 16, 32, 64, 128} + if err := st.fr.WritePing(true, ackPingData); err != nil { + t.Fatal(err) + } + + // But the server should reply to this one, since ACK is false. + pingData := [8]byte{1, 2, 3, 4, 5, 6, 7, 8} + if err := st.fr.WritePing(false, pingData); err != nil { + t.Fatal(err) + } + + pf := st.wantPing() + if !pf.Flags.Has(FlagPingAck) { + t.Error("response ping doesn't have ACK set") + } + if pf.Data != pingData { + t.Errorf("response ping has data %q; want %q", pf.Data, pingData) + } +} + +func TestServer_RejectsLargeFrames(t *testing.T) { + if runtime.GOOS == "windows" { + t.Skip("see golang.org/issue/13434") + } + + st := newServerTester(t, nil) + defer st.Close() + st.greet() + + // Write too large of a frame (too large by one byte) + // We ignore the return value because it's expected that the server + // will only read the first 9 bytes (the headre) and then disconnect. + st.fr.WriteRawFrame(0xff, 0, 0, make([]byte, defaultMaxReadFrameSize+1)) + + gf := st.wantGoAway() + if gf.ErrCode != ErrCodeFrameSize { + t.Errorf("GOAWAY err = %v; want %v", gf.ErrCode, ErrCodeFrameSize) + } + if st.serverLogBuf.Len() != 0 { + // Previously we spun here for a bit until the GOAWAY disconnect + // timer fired, logging while we fired. + t.Errorf("unexpected server output: %.500s\n", st.serverLogBuf.Bytes()) + } +} + +func TestServer_Handler_Sends_WindowUpdate(t *testing.T) { + puppet := newHandlerPuppet() + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + puppet.act(w, r) + }) + defer st.Close() + defer puppet.done() + + st.greet() + + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader(":method", "POST"), + EndStream: false, // data coming + EndHeaders: true, + }) + st.writeData(1, false, []byte("abcdef")) + puppet.do(readBodyHandler(t, "abc")) + st.wantWindowUpdate(0, 3) + st.wantWindowUpdate(1, 3) + + puppet.do(readBodyHandler(t, "def")) + st.wantWindowUpdate(0, 3) + st.wantWindowUpdate(1, 3) + + st.writeData(1, true, []byte("ghijkl")) // END_STREAM here + puppet.do(readBodyHandler(t, "ghi")) + puppet.do(readBodyHandler(t, "jkl")) + st.wantWindowUpdate(0, 3) + st.wantWindowUpdate(0, 3) // no more stream-level, since END_STREAM +} + +// the version of the TestServer_Handler_Sends_WindowUpdate with padding. +// See golang.org/issue/16556 +func TestServer_Handler_Sends_WindowUpdate_Padding(t *testing.T) { + puppet := newHandlerPuppet() + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + puppet.act(w, r) + }) + defer st.Close() + defer puppet.done() + + st.greet() + + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: st.encodeHeader(":method", "POST"), + EndStream: false, + EndHeaders: true, + }) + st.writeDataPadded(1, false, []byte("abcdef"), []byte{0, 0, 0, 0}) + + // Expect to immediately get our 5 bytes of padding back for + // both the connection and stream (4 bytes of padding + 1 byte of length) + st.wantWindowUpdate(0, 5) + st.wantWindowUpdate(1, 5) + + puppet.do(readBodyHandler(t, "abc")) + st.wantWindowUpdate(0, 3) + st.wantWindowUpdate(1, 3) + + puppet.do(readBodyHandler(t, "def")) + st.wantWindowUpdate(0, 3) + st.wantWindowUpdate(1, 3) +} + +func TestServer_Send_GoAway_After_Bogus_WindowUpdate(t *testing.T) { + st := newServerTester(t, nil) + defer st.Close() + st.greet() + if err := st.fr.WriteWindowUpdate(0, 1<<31-1); err != nil { + t.Fatal(err) + } + gf := st.wantGoAway() + if gf.ErrCode != ErrCodeFlowControl { + t.Errorf("GOAWAY err = %v; want %v", gf.ErrCode, ErrCodeFlowControl) + } + if gf.LastStreamID != 0 { + t.Errorf("GOAWAY last stream ID = %v; want %v", gf.LastStreamID, 0) + } +} + +func TestServer_Send_RstStream_After_Bogus_WindowUpdate(t *testing.T) { + inHandler := make(chan bool) + blockHandler := make(chan bool) + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + inHandler <- true + <-blockHandler + }) + defer st.Close() + defer close(blockHandler) + st.greet() + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: st.encodeHeader(":method", "POST"), + EndStream: false, // keep it open + EndHeaders: true, + }) + <-inHandler + // Send a bogus window update: + if err := st.fr.WriteWindowUpdate(1, 1<<31-1); err != nil { + t.Fatal(err) + } + st.wantRSTStream(1, ErrCodeFlowControl) +} + +// testServerPostUnblock sends a hanging POST with unsent data to handler, +// then runs fn once in the handler, and verifies that the error returned from +// handler is acceptable. It fails if takes over 5 seconds for handler to exit. +func testServerPostUnblock(t *testing.T, + handler func(http.ResponseWriter, *http.Request) error, + fn func(*serverTester), + checkErr func(error), + otherHeaders ...string) { + inHandler := make(chan bool) + errc := make(chan error, 1) + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + inHandler <- true + errc <- handler(w, r) + }) + defer st.Close() + st.greet() + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: st.encodeHeader(append([]string{":method", "POST"}, otherHeaders...)...), + EndStream: false, // keep it open + EndHeaders: true, + }) + <-inHandler + fn(st) + select { + case err := <-errc: + if checkErr != nil { + checkErr(err) + } + case <-time.After(5 * time.Second): + t.Fatal("timeout waiting for Handler to return") + } +} + +func TestServer_RSTStream_Unblocks_Read(t *testing.T) { + testServerPostUnblock(t, + func(w http.ResponseWriter, r *http.Request) (err error) { + _, err = r.Body.Read(make([]byte, 1)) + return + }, + func(st *serverTester) { + if err := st.fr.WriteRSTStream(1, ErrCodeCancel); err != nil { + t.Fatal(err) + } + }, + func(err error) { + want := StreamError{StreamID: 0x1, Code: 0x8} + if !reflect.DeepEqual(err, want) { + t.Errorf("Read error = %v; want %v", err, want) + } + }, + ) +} + +func TestServer_RSTStream_Unblocks_Header_Write(t *testing.T) { + // Run this test a bunch, because it doesn't always + // deadlock. But with a bunch, it did. + n := 50 + if testing.Short() { + n = 5 + } + for i := 0; i < n; i++ { + testServer_RSTStream_Unblocks_Header_Write(t) + } +} + +func testServer_RSTStream_Unblocks_Header_Write(t *testing.T) { + inHandler := make(chan bool, 1) + unblockHandler := make(chan bool, 1) + headerWritten := make(chan bool, 1) + wroteRST := make(chan bool, 1) + + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + inHandler <- true + <-wroteRST + w.Header().Set("foo", "bar") + w.WriteHeader(200) + w.(http.Flusher).Flush() + headerWritten <- true + <-unblockHandler + }) + defer st.Close() + + st.greet() + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: st.encodeHeader(":method", "POST"), + EndStream: false, // keep it open + EndHeaders: true, + }) + <-inHandler + if err := st.fr.WriteRSTStream(1, ErrCodeCancel); err != nil { + t.Fatal(err) + } + wroteRST <- true + st.awaitIdle() + select { + case <-headerWritten: + case <-time.After(2 * time.Second): + t.Error("timeout waiting for header write") + } + unblockHandler <- true +} + +func TestServer_DeadConn_Unblocks_Read(t *testing.T) { + testServerPostUnblock(t, + func(w http.ResponseWriter, r *http.Request) (err error) { + _, err = r.Body.Read(make([]byte, 1)) + return + }, + func(st *serverTester) { st.cc.Close() }, + func(err error) { + if err == nil { + t.Error("unexpected nil error from Request.Body.Read") + } + }, + ) +} + +var blockUntilClosed = func(w http.ResponseWriter, r *http.Request) error { + <-w.(http.CloseNotifier).CloseNotify() + return nil +} + +func TestServer_CloseNotify_After_RSTStream(t *testing.T) { + testServerPostUnblock(t, blockUntilClosed, func(st *serverTester) { + if err := st.fr.WriteRSTStream(1, ErrCodeCancel); err != nil { + t.Fatal(err) + } + }, nil) +} + +func TestServer_CloseNotify_After_ConnClose(t *testing.T) { + testServerPostUnblock(t, blockUntilClosed, func(st *serverTester) { st.cc.Close() }, nil) +} + +// that CloseNotify unblocks after a stream error due to the client's +// problem that's unrelated to them explicitly canceling it (which is +// TestServer_CloseNotify_After_RSTStream above) +func TestServer_CloseNotify_After_StreamError(t *testing.T) { + testServerPostUnblock(t, blockUntilClosed, func(st *serverTester) { + // data longer than declared Content-Length => stream error + st.writeData(1, true, []byte("1234")) + }, nil, "content-length", "3") +} + +func TestServer_StateTransitions(t *testing.T) { + var st *serverTester + inHandler := make(chan bool) + writeData := make(chan bool) + leaveHandler := make(chan bool) + st = newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + inHandler <- true + if st.stream(1) == nil { + t.Errorf("nil stream 1 in handler") + } + if got, want := st.streamState(1), stateOpen; got != want { + t.Errorf("in handler, state is %v; want %v", got, want) + } + writeData <- true + if n, err := r.Body.Read(make([]byte, 1)); n != 0 || err != io.EOF { + t.Errorf("body read = %d, %v; want 0, EOF", n, err) + } + if got, want := st.streamState(1), stateHalfClosedRemote; got != want { + t.Errorf("in handler, state is %v; want %v", got, want) + } + + <-leaveHandler + }) + st.greet() + if st.stream(1) != nil { + t.Fatal("stream 1 should be empty") + } + if got := st.streamState(1); got != stateIdle { + t.Fatalf("stream 1 should be idle; got %v", got) + } + + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: st.encodeHeader(":method", "POST"), + EndStream: false, // keep it open + EndHeaders: true, + }) + <-inHandler + <-writeData + st.writeData(1, true, nil) + + leaveHandler <- true + hf := st.wantHeaders() + if !hf.StreamEnded() { + t.Fatal("expected END_STREAM flag") + } + + if got, want := st.streamState(1), stateClosed; got != want { + t.Errorf("at end, state is %v; want %v", got, want) + } + if st.stream(1) != nil { + t.Fatal("at end, stream 1 should be gone") + } +} + +// test HEADERS w/o EndHeaders + another HEADERS (should get rejected) +func TestServer_Rejects_HeadersNoEnd_Then_Headers(t *testing.T) { + testServerRejectsConn(t, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: st.encodeHeader(), + EndStream: true, + EndHeaders: false, + }) + st.writeHeaders(HeadersFrameParam{ // Not a continuation. + StreamID: 3, // different stream. + BlockFragment: st.encodeHeader(), + EndStream: true, + EndHeaders: true, + }) + }) +} + +// test HEADERS w/o EndHeaders + PING (should get rejected) +func TestServer_Rejects_HeadersNoEnd_Then_Ping(t *testing.T) { + testServerRejectsConn(t, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: st.encodeHeader(), + EndStream: true, + EndHeaders: false, + }) + if err := st.fr.WritePing(false, [8]byte{}); err != nil { + t.Fatal(err) + } + }) +} + +// test HEADERS w/ EndHeaders + a continuation HEADERS (should get rejected) +func TestServer_Rejects_HeadersEnd_Then_Continuation(t *testing.T) { + testServerRejectsConn(t, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: st.encodeHeader(), + EndStream: true, + EndHeaders: true, + }) + st.wantHeaders() + if err := st.fr.WriteContinuation(1, true, encodeHeaderNoImplicit(t, "foo", "bar")); err != nil { + t.Fatal(err) + } + }) +} + +// test HEADERS w/o EndHeaders + a continuation HEADERS on wrong stream ID +func TestServer_Rejects_HeadersNoEnd_Then_ContinuationWrongStream(t *testing.T) { + testServerRejectsConn(t, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: st.encodeHeader(), + EndStream: true, + EndHeaders: false, + }) + if err := st.fr.WriteContinuation(3, true, encodeHeaderNoImplicit(t, "foo", "bar")); err != nil { + t.Fatal(err) + } + }) +} + +// No HEADERS on stream 0. +func TestServer_Rejects_Headers0(t *testing.T) { + testServerRejectsConn(t, func(st *serverTester) { + st.fr.AllowIllegalWrites = true + st.writeHeaders(HeadersFrameParam{ + StreamID: 0, + BlockFragment: st.encodeHeader(), + EndStream: true, + EndHeaders: true, + }) + }) +} + +// No CONTINUATION on stream 0. +func TestServer_Rejects_Continuation0(t *testing.T) { + testServerRejectsConn(t, func(st *serverTester) { + st.fr.AllowIllegalWrites = true + if err := st.fr.WriteContinuation(0, true, st.encodeHeader()); err != nil { + t.Fatal(err) + } + }) +} + +// No PRIORITY on stream 0. +func TestServer_Rejects_Priority0(t *testing.T) { + testServerRejectsConn(t, func(st *serverTester) { + st.fr.AllowIllegalWrites = true + st.writePriority(0, PriorityParam{StreamDep: 1}) + }) +} + +// No HEADERS frame with a self-dependence. +func TestServer_Rejects_HeadersSelfDependence(t *testing.T) { + testServerRejectsStream(t, ErrCodeProtocol, func(st *serverTester) { + st.fr.AllowIllegalWrites = true + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: st.encodeHeader(), + EndStream: true, + EndHeaders: true, + Priority: PriorityParam{StreamDep: 1}, + }) + }) +} + +// No PRIORTY frame with a self-dependence. +func TestServer_Rejects_PrioritySelfDependence(t *testing.T) { + testServerRejectsStream(t, ErrCodeProtocol, func(st *serverTester) { + st.fr.AllowIllegalWrites = true + st.writePriority(1, PriorityParam{StreamDep: 1}) + }) +} + +func TestServer_Rejects_PushPromise(t *testing.T) { + testServerRejectsConn(t, func(st *serverTester) { + pp := PushPromiseParam{ + StreamID: 1, + PromiseID: 3, + } + if err := st.fr.WritePushPromise(pp); err != nil { + t.Fatal(err) + } + }) +} + +// testServerRejectsConn tests that the server hangs up with a GOAWAY +// frame and a server close after the client does something +// deserving a CONNECTION_ERROR. +func testServerRejectsConn(t *testing.T, writeReq func(*serverTester)) { + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {}) + st.addLogFilter("connection error: PROTOCOL_ERROR") + defer st.Close() + st.greet() + writeReq(st) + + st.wantGoAway() + errc := make(chan error, 1) + go func() { + fr, err := st.fr.ReadFrame() + if err == nil { + err = fmt.Errorf("got frame of type %T", fr) + } + errc <- err + }() + select { + case err := <-errc: + if err != io.EOF { + t.Errorf("ReadFrame = %v; want io.EOF", err) + } + case <-time.After(2 * time.Second): + t.Error("timeout waiting for disconnect") + } +} + +// testServerRejectsStream tests that the server sends a RST_STREAM with the provided +// error code after a client sends a bogus request. +func testServerRejectsStream(t *testing.T, code ErrCode, writeReq func(*serverTester)) { + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {}) + defer st.Close() + st.greet() + writeReq(st) + st.wantRSTStream(1, code) +} + +// testServerRequest sets up an idle HTTP/2 connection and lets you +// write a single request with writeReq, and then verify that the +// *http.Request is built correctly in checkReq. +func testServerRequest(t *testing.T, writeReq func(*serverTester), checkReq func(*http.Request)) { + gotReq := make(chan bool, 1) + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + if r.Body == nil { + t.Fatal("nil Body") + } + checkReq(r) + gotReq <- true + }) + defer st.Close() + + st.greet() + writeReq(st) + + select { + case <-gotReq: + case <-time.After(2 * time.Second): + t.Error("timeout waiting for request") + } +} + +func getSlash(st *serverTester) { st.bodylessReq1() } + +func TestServer_Response_NoData(t *testing.T) { + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + // Nothing. + return nil + }, func(st *serverTester) { + getSlash(st) + hf := st.wantHeaders() + if !hf.StreamEnded() { + t.Fatal("want END_STREAM flag") + } + if !hf.HeadersEnded() { + t.Fatal("want END_HEADERS flag") + } + }) +} + +func TestServer_Response_NoData_Header_FooBar(t *testing.T) { + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + w.Header().Set("Foo-Bar", "some-value") + return nil + }, func(st *serverTester) { + getSlash(st) + hf := st.wantHeaders() + if !hf.StreamEnded() { + t.Fatal("want END_STREAM flag") + } + if !hf.HeadersEnded() { + t.Fatal("want END_HEADERS flag") + } + goth := st.decodeHeader(hf.HeaderBlockFragment()) + wanth := [][2]string{ + {":status", "200"}, + {"foo-bar", "some-value"}, + {"content-type", "text/plain; charset=utf-8"}, + {"content-length", "0"}, + } + if !reflect.DeepEqual(goth, wanth) { + t.Errorf("Got headers %v; want %v", goth, wanth) + } + }) +} + +func TestServer_Response_Data_Sniff_DoesntOverride(t *testing.T) { + const msg = "this is HTML." + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + w.Header().Set("Content-Type", "foo/bar") + io.WriteString(w, msg) + return nil + }, func(st *serverTester) { + getSlash(st) + hf := st.wantHeaders() + if hf.StreamEnded() { + t.Fatal("don't want END_STREAM, expecting data") + } + if !hf.HeadersEnded() { + t.Fatal("want END_HEADERS flag") + } + goth := st.decodeHeader(hf.HeaderBlockFragment()) + wanth := [][2]string{ + {":status", "200"}, + {"content-type", "foo/bar"}, + {"content-length", strconv.Itoa(len(msg))}, + } + if !reflect.DeepEqual(goth, wanth) { + t.Errorf("Got headers %v; want %v", goth, wanth) + } + df := st.wantData() + if !df.StreamEnded() { + t.Error("expected DATA to have END_STREAM flag") + } + if got := string(df.Data()); got != msg { + t.Errorf("got DATA %q; want %q", got, msg) + } + }) +} + +func TestServer_Response_TransferEncoding_chunked(t *testing.T) { + const msg = "hi" + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + w.Header().Set("Transfer-Encoding", "chunked") // should be stripped + io.WriteString(w, msg) + return nil + }, func(st *serverTester) { + getSlash(st) + hf := st.wantHeaders() + goth := st.decodeHeader(hf.HeaderBlockFragment()) + wanth := [][2]string{ + {":status", "200"}, + {"content-type", "text/plain; charset=utf-8"}, + {"content-length", strconv.Itoa(len(msg))}, + } + if !reflect.DeepEqual(goth, wanth) { + t.Errorf("Got headers %v; want %v", goth, wanth) + } + }) +} + +// Header accessed only after the initial write. +func TestServer_Response_Data_IgnoreHeaderAfterWrite_After(t *testing.T) { + const msg = "this is HTML." + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + io.WriteString(w, msg) + w.Header().Set("foo", "should be ignored") + return nil + }, func(st *serverTester) { + getSlash(st) + hf := st.wantHeaders() + if hf.StreamEnded() { + t.Fatal("unexpected END_STREAM") + } + if !hf.HeadersEnded() { + t.Fatal("want END_HEADERS flag") + } + goth := st.decodeHeader(hf.HeaderBlockFragment()) + wanth := [][2]string{ + {":status", "200"}, + {"content-type", "text/html; charset=utf-8"}, + {"content-length", strconv.Itoa(len(msg))}, + } + if !reflect.DeepEqual(goth, wanth) { + t.Errorf("Got headers %v; want %v", goth, wanth) + } + }) +} + +// Header accessed before the initial write and later mutated. +func TestServer_Response_Data_IgnoreHeaderAfterWrite_Overwrite(t *testing.T) { + const msg = "this is HTML." + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + w.Header().Set("foo", "proper value") + io.WriteString(w, msg) + w.Header().Set("foo", "should be ignored") + return nil + }, func(st *serverTester) { + getSlash(st) + hf := st.wantHeaders() + if hf.StreamEnded() { + t.Fatal("unexpected END_STREAM") + } + if !hf.HeadersEnded() { + t.Fatal("want END_HEADERS flag") + } + goth := st.decodeHeader(hf.HeaderBlockFragment()) + wanth := [][2]string{ + {":status", "200"}, + {"foo", "proper value"}, + {"content-type", "text/html; charset=utf-8"}, + {"content-length", strconv.Itoa(len(msg))}, + } + if !reflect.DeepEqual(goth, wanth) { + t.Errorf("Got headers %v; want %v", goth, wanth) + } + }) +} + +func TestServer_Response_Data_SniffLenType(t *testing.T) { + const msg = "this is HTML." + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + io.WriteString(w, msg) + return nil + }, func(st *serverTester) { + getSlash(st) + hf := st.wantHeaders() + if hf.StreamEnded() { + t.Fatal("don't want END_STREAM, expecting data") + } + if !hf.HeadersEnded() { + t.Fatal("want END_HEADERS flag") + } + goth := st.decodeHeader(hf.HeaderBlockFragment()) + wanth := [][2]string{ + {":status", "200"}, + {"content-type", "text/html; charset=utf-8"}, + {"content-length", strconv.Itoa(len(msg))}, + } + if !reflect.DeepEqual(goth, wanth) { + t.Errorf("Got headers %v; want %v", goth, wanth) + } + df := st.wantData() + if !df.StreamEnded() { + t.Error("expected DATA to have END_STREAM flag") + } + if got := string(df.Data()); got != msg { + t.Errorf("got DATA %q; want %q", got, msg) + } + }) +} + +func TestServer_Response_Header_Flush_MidWrite(t *testing.T) { + const msg = "this is HTML" + const msg2 = ", and this is the next chunk" + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + io.WriteString(w, msg) + w.(http.Flusher).Flush() + io.WriteString(w, msg2) + return nil + }, func(st *serverTester) { + getSlash(st) + hf := st.wantHeaders() + if hf.StreamEnded() { + t.Fatal("unexpected END_STREAM flag") + } + if !hf.HeadersEnded() { + t.Fatal("want END_HEADERS flag") + } + goth := st.decodeHeader(hf.HeaderBlockFragment()) + wanth := [][2]string{ + {":status", "200"}, + {"content-type", "text/html; charset=utf-8"}, // sniffed + // and no content-length + } + if !reflect.DeepEqual(goth, wanth) { + t.Errorf("Got headers %v; want %v", goth, wanth) + } + { + df := st.wantData() + if df.StreamEnded() { + t.Error("unexpected END_STREAM flag") + } + if got := string(df.Data()); got != msg { + t.Errorf("got DATA %q; want %q", got, msg) + } + } + { + df := st.wantData() + if !df.StreamEnded() { + t.Error("wanted END_STREAM flag on last data chunk") + } + if got := string(df.Data()); got != msg2 { + t.Errorf("got DATA %q; want %q", got, msg2) + } + } + }) +} + +func TestServer_Response_LargeWrite(t *testing.T) { + const size = 1 << 20 + const maxFrameSize = 16 << 10 + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + n, err := w.Write(bytes.Repeat([]byte("a"), size)) + if err != nil { + return fmt.Errorf("Write error: %v", err) + } + if n != size { + return fmt.Errorf("wrong size %d from Write", n) + } + return nil + }, func(st *serverTester) { + if err := st.fr.WriteSettings( + Setting{SettingInitialWindowSize, 0}, + Setting{SettingMaxFrameSize, maxFrameSize}, + ); err != nil { + t.Fatal(err) + } + st.wantSettingsAck() + + getSlash(st) // make the single request + + // Give the handler quota to write: + if err := st.fr.WriteWindowUpdate(1, size); err != nil { + t.Fatal(err) + } + // Give the handler quota to write to connection-level + // window as well + if err := st.fr.WriteWindowUpdate(0, size); err != nil { + t.Fatal(err) + } + hf := st.wantHeaders() + if hf.StreamEnded() { + t.Fatal("unexpected END_STREAM flag") + } + if !hf.HeadersEnded() { + t.Fatal("want END_HEADERS flag") + } + goth := st.decodeHeader(hf.HeaderBlockFragment()) + wanth := [][2]string{ + {":status", "200"}, + {"content-type", "text/plain; charset=utf-8"}, // sniffed + // and no content-length + } + if !reflect.DeepEqual(goth, wanth) { + t.Errorf("Got headers %v; want %v", goth, wanth) + } + var bytes, frames int + for { + df := st.wantData() + bytes += len(df.Data()) + frames++ + for _, b := range df.Data() { + if b != 'a' { + t.Fatal("non-'a' byte seen in DATA") + } + } + if df.StreamEnded() { + break + } + } + if bytes != size { + t.Errorf("Got %d bytes; want %d", bytes, size) + } + if want := int(size / maxFrameSize); frames < want || frames > want*2 { + t.Errorf("Got %d frames; want %d", frames, size) + } + }) +} + +// Test that the handler can't write more than the client allows +func TestServer_Response_LargeWrite_FlowControlled(t *testing.T) { + // Make these reads. Before each read, the client adds exactly enough + // flow-control to satisfy the read. Numbers chosen arbitrarily. + reads := []int{123, 1, 13, 127} + size := 0 + for _, n := range reads { + size += n + } + + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + w.(http.Flusher).Flush() + n, err := w.Write(bytes.Repeat([]byte("a"), size)) + if err != nil { + return fmt.Errorf("Write error: %v", err) + } + if n != size { + return fmt.Errorf("wrong size %d from Write", n) + } + return nil + }, func(st *serverTester) { + // Set the window size to something explicit for this test. + // It's also how much initial data we expect. + if err := st.fr.WriteSettings(Setting{SettingInitialWindowSize, uint32(reads[0])}); err != nil { + t.Fatal(err) + } + st.wantSettingsAck() + + getSlash(st) // make the single request + + hf := st.wantHeaders() + if hf.StreamEnded() { + t.Fatal("unexpected END_STREAM flag") + } + if !hf.HeadersEnded() { + t.Fatal("want END_HEADERS flag") + } + + df := st.wantData() + if got := len(df.Data()); got != reads[0] { + t.Fatalf("Initial window size = %d but got DATA with %d bytes", reads[0], got) + } + + for _, quota := range reads[1:] { + if err := st.fr.WriteWindowUpdate(1, uint32(quota)); err != nil { + t.Fatal(err) + } + df := st.wantData() + if int(quota) != len(df.Data()) { + t.Fatalf("read %d bytes after giving %d quota", len(df.Data()), quota) + } + } + }) +} + +// Test that the handler blocked in a Write is unblocked if the server sends a RST_STREAM. +func TestServer_Response_RST_Unblocks_LargeWrite(t *testing.T) { + const size = 1 << 20 + const maxFrameSize = 16 << 10 + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + w.(http.Flusher).Flush() + errc := make(chan error, 1) + go func() { + _, err := w.Write(bytes.Repeat([]byte("a"), size)) + errc <- err + }() + select { + case err := <-errc: + if err == nil { + return errors.New("unexpected nil error from Write in handler") + } + return nil + case <-time.After(2 * time.Second): + return errors.New("timeout waiting for Write in handler") + } + }, func(st *serverTester) { + if err := st.fr.WriteSettings( + Setting{SettingInitialWindowSize, 0}, + Setting{SettingMaxFrameSize, maxFrameSize}, + ); err != nil { + t.Fatal(err) + } + st.wantSettingsAck() + + getSlash(st) // make the single request + + hf := st.wantHeaders() + if hf.StreamEnded() { + t.Fatal("unexpected END_STREAM flag") + } + if !hf.HeadersEnded() { + t.Fatal("want END_HEADERS flag") + } + + if err := st.fr.WriteRSTStream(1, ErrCodeCancel); err != nil { + t.Fatal(err) + } + }) +} + +func TestServer_Response_Empty_Data_Not_FlowControlled(t *testing.T) { + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + w.(http.Flusher).Flush() + // Nothing; send empty DATA + return nil + }, func(st *serverTester) { + // Handler gets no data quota: + if err := st.fr.WriteSettings(Setting{SettingInitialWindowSize, 0}); err != nil { + t.Fatal(err) + } + st.wantSettingsAck() + + getSlash(st) // make the single request + + hf := st.wantHeaders() + if hf.StreamEnded() { + t.Fatal("unexpected END_STREAM flag") + } + if !hf.HeadersEnded() { + t.Fatal("want END_HEADERS flag") + } + + df := st.wantData() + if got := len(df.Data()); got != 0 { + t.Fatalf("unexpected %d DATA bytes; want 0", got) + } + if !df.StreamEnded() { + t.Fatal("DATA didn't have END_STREAM") + } + }) +} + +func TestServer_Response_Automatic100Continue(t *testing.T) { + const msg = "foo" + const reply = "bar" + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + if v := r.Header.Get("Expect"); v != "" { + t.Errorf("Expect header = %q; want empty", v) + } + buf := make([]byte, len(msg)) + // This read should trigger the 100-continue being sent. + if n, err := io.ReadFull(r.Body, buf); err != nil || n != len(msg) || string(buf) != msg { + return fmt.Errorf("ReadFull = %q, %v; want %q, nil", buf[:n], err, msg) + } + _, err := io.WriteString(w, reply) + return err + }, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader(":method", "POST", "expect", "100-continue"), + EndStream: false, + EndHeaders: true, + }) + hf := st.wantHeaders() + if hf.StreamEnded() { + t.Fatal("unexpected END_STREAM flag") + } + if !hf.HeadersEnded() { + t.Fatal("want END_HEADERS flag") + } + goth := st.decodeHeader(hf.HeaderBlockFragment()) + wanth := [][2]string{ + {":status", "100"}, + } + if !reflect.DeepEqual(goth, wanth) { + t.Fatalf("Got headers %v; want %v", goth, wanth) + } + + // Okay, they sent status 100, so we can send our + // gigantic and/or sensitive "foo" payload now. + st.writeData(1, true, []byte(msg)) + + st.wantWindowUpdate(0, uint32(len(msg))) + + hf = st.wantHeaders() + if hf.StreamEnded() { + t.Fatal("expected data to follow") + } + if !hf.HeadersEnded() { + t.Fatal("want END_HEADERS flag") + } + goth = st.decodeHeader(hf.HeaderBlockFragment()) + wanth = [][2]string{ + {":status", "200"}, + {"content-type", "text/plain; charset=utf-8"}, + {"content-length", strconv.Itoa(len(reply))}, + } + if !reflect.DeepEqual(goth, wanth) { + t.Errorf("Got headers %v; want %v", goth, wanth) + } + + df := st.wantData() + if string(df.Data()) != reply { + t.Errorf("Client read %q; want %q", df.Data(), reply) + } + if !df.StreamEnded() { + t.Errorf("expect data stream end") + } + }) +} + +func TestServer_HandlerWriteErrorOnDisconnect(t *testing.T) { + errc := make(chan error, 1) + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + p := []byte("some data.\n") + for { + _, err := w.Write(p) + if err != nil { + errc <- err + return nil + } + } + }, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: st.encodeHeader(), + EndStream: false, + EndHeaders: true, + }) + hf := st.wantHeaders() + if hf.StreamEnded() { + t.Fatal("unexpected END_STREAM flag") + } + if !hf.HeadersEnded() { + t.Fatal("want END_HEADERS flag") + } + // Close the connection and wait for the handler to (hopefully) notice. + st.cc.Close() + select { + case <-errc: + case <-time.After(5 * time.Second): + t.Error("timeout") + } + }) +} + +func TestServer_Rejects_Too_Many_Streams(t *testing.T) { + const testPath = "/some/path" + + inHandler := make(chan uint32) + leaveHandler := make(chan bool) + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + id := w.(*responseWriter).rws.stream.id + inHandler <- id + if id == 1+(defaultMaxStreams+1)*2 && r.URL.Path != testPath { + t.Errorf("decoded final path as %q; want %q", r.URL.Path, testPath) + } + <-leaveHandler + }) + defer st.Close() + st.greet() + nextStreamID := uint32(1) + streamID := func() uint32 { + defer func() { nextStreamID += 2 }() + return nextStreamID + } + sendReq := func(id uint32, headers ...string) { + st.writeHeaders(HeadersFrameParam{ + StreamID: id, + BlockFragment: st.encodeHeader(headers...), + EndStream: true, + EndHeaders: true, + }) + } + for i := 0; i < defaultMaxStreams; i++ { + sendReq(streamID()) + <-inHandler + } + defer func() { + for i := 0; i < defaultMaxStreams; i++ { + leaveHandler <- true + } + }() + + // And this one should cross the limit: + // (It's also sent as a CONTINUATION, to verify we still track the decoder context, + // even if we're rejecting it) + rejectID := streamID() + headerBlock := st.encodeHeader(":path", testPath) + frag1, frag2 := headerBlock[:3], headerBlock[3:] + st.writeHeaders(HeadersFrameParam{ + StreamID: rejectID, + BlockFragment: frag1, + EndStream: true, + EndHeaders: false, // CONTINUATION coming + }) + if err := st.fr.WriteContinuation(rejectID, true, frag2); err != nil { + t.Fatal(err) + } + st.wantRSTStream(rejectID, ErrCodeProtocol) + + // But let a handler finish: + leaveHandler <- true + st.wantHeaders() + + // And now another stream should be able to start: + goodID := streamID() + sendReq(goodID, ":path", testPath) + select { + case got := <-inHandler: + if got != goodID { + t.Errorf("Got stream %d; want %d", got, goodID) + } + case <-time.After(3 * time.Second): + t.Error("timeout waiting for handler") + } +} + +// So many response headers that the server needs to use CONTINUATION frames: +func TestServer_Response_ManyHeaders_With_Continuation(t *testing.T) { + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + h := w.Header() + for i := 0; i < 5000; i++ { + h.Set(fmt.Sprintf("x-header-%d", i), fmt.Sprintf("x-value-%d", i)) + } + return nil + }, func(st *serverTester) { + getSlash(st) + hf := st.wantHeaders() + if hf.HeadersEnded() { + t.Fatal("got unwanted END_HEADERS flag") + } + n := 0 + for { + n++ + cf := st.wantContinuation() + if cf.HeadersEnded() { + break + } + } + if n < 5 { + t.Errorf("Only got %d CONTINUATION frames; expected 5+ (currently 6)", n) + } + }) +} + +// This previously crashed (reported by Mathieu Lonjaret as observed +// while using Camlistore) because we got a DATA frame from the client +// after the handler exited and our logic at the time was wrong, +// keeping a stream in the map in stateClosed, which tickled an +// invariant check later when we tried to remove that stream (via +// defer sc.closeAllStreamsOnConnClose) when the serverConn serve loop +// ended. +func TestServer_NoCrash_HandlerClose_Then_ClientClose(t *testing.T) { + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + // nothing + return nil + }, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: st.encodeHeader(), + EndStream: false, // DATA is coming + EndHeaders: true, + }) + hf := st.wantHeaders() + if !hf.HeadersEnded() || !hf.StreamEnded() { + t.Fatalf("want END_HEADERS+END_STREAM, got %v", hf) + } + + // Sent when the a Handler closes while a client has + // indicated it's still sending DATA: + st.wantRSTStream(1, ErrCodeNo) + + // Now the handler has ended, so it's ended its + // stream, but the client hasn't closed its side + // (stateClosedLocal). So send more data and verify + // it doesn't crash with an internal invariant panic, like + // it did before. + st.writeData(1, true, []byte("foo")) + + // Get our flow control bytes back, since the handler didn't get them. + st.wantWindowUpdate(0, uint32(len("foo"))) + + // Sent after a peer sends data anyway (admittedly the + // previous RST_STREAM might've still been in-flight), + // but they'll get the more friendly 'cancel' code + // first. + st.wantRSTStream(1, ErrCodeStreamClosed) + + // Set up a bunch of machinery to record the panic we saw + // previously. + var ( + panMu sync.Mutex + panicVal interface{} + ) + + testHookOnPanicMu.Lock() + testHookOnPanic = func(sc *serverConn, pv interface{}) bool { + panMu.Lock() + panicVal = pv + panMu.Unlock() + return true + } + testHookOnPanicMu.Unlock() + + // Now force the serve loop to end, via closing the connection. + st.cc.Close() + select { + case <-st.sc.doneServing: + // Loop has exited. + panMu.Lock() + got := panicVal + panMu.Unlock() + if got != nil { + t.Errorf("Got panic: %v", got) + } + case <-time.After(5 * time.Second): + t.Error("timeout") + } + }) +} + +func TestServer_Rejects_TLS10(t *testing.T) { testRejectTLS(t, tls.VersionTLS10) } +func TestServer_Rejects_TLS11(t *testing.T) { testRejectTLS(t, tls.VersionTLS11) } + +func testRejectTLS(t *testing.T, max uint16) { + st := newServerTester(t, nil, func(c *tls.Config) { + c.MaxVersion = max + }) + defer st.Close() + gf := st.wantGoAway() + if got, want := gf.ErrCode, ErrCodeInadequateSecurity; got != want { + t.Errorf("Got error code %v; want %v", got, want) + } +} + +func TestServer_Rejects_TLSBadCipher(t *testing.T) { + st := newServerTester(t, nil, func(c *tls.Config) { + // Only list bad ones: + c.CipherSuites = []uint16{ + tls.TLS_RSA_WITH_RC4_128_SHA, + tls.TLS_RSA_WITH_3DES_EDE_CBC_SHA, + tls.TLS_RSA_WITH_AES_128_CBC_SHA, + tls.TLS_RSA_WITH_AES_256_CBC_SHA, + tls.TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, + tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, + tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, + tls.TLS_ECDHE_RSA_WITH_RC4_128_SHA, + tls.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, + tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, + tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, + cipher_TLS_RSA_WITH_AES_128_CBC_SHA256, + } + }) + defer st.Close() + gf := st.wantGoAway() + if got, want := gf.ErrCode, ErrCodeInadequateSecurity; got != want { + t.Errorf("Got error code %v; want %v", got, want) + } +} + +func TestServer_Advertises_Common_Cipher(t *testing.T) { + const requiredSuite = tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 + st := newServerTester(t, nil, func(c *tls.Config) { + // Have the client only support the one required by the spec. + c.CipherSuites = []uint16{requiredSuite} + }, func(ts *httptest.Server) { + var srv *http.Server = ts.Config + // Have the server configured with no specific cipher suites. + // This tests that Go's defaults include the required one. + srv.TLSConfig = nil + }) + defer st.Close() + st.greet() +} + +func (st *serverTester) onHeaderField(f hpack.HeaderField) { + if f.Name == "date" { + return + } + st.decodedHeaders = append(st.decodedHeaders, [2]string{f.Name, f.Value}) +} + +func (st *serverTester) decodeHeader(headerBlock []byte) (pairs [][2]string) { + st.decodedHeaders = nil + if _, err := st.hpackDec.Write(headerBlock); err != nil { + st.t.Fatalf("hpack decoding error: %v", err) + } + if err := st.hpackDec.Close(); err != nil { + st.t.Fatalf("hpack decoding error: %v", err) + } + return st.decodedHeaders +} + +// testServerResponse sets up an idle HTTP/2 connection. The client function should +// write a single request that must be handled by the handler. This waits up to 5s +// for client to return, then up to an additional 2s for the handler to return. +func testServerResponse(t testing.TB, + handler func(http.ResponseWriter, *http.Request) error, + client func(*serverTester), +) { + errc := make(chan error, 1) + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + if r.Body == nil { + t.Fatal("nil Body") + } + errc <- handler(w, r) + }) + defer st.Close() + + donec := make(chan bool) + go func() { + defer close(donec) + st.greet() + client(st) + }() + + select { + case <-donec: + case <-time.After(5 * time.Second): + t.Fatal("timeout in client") + } + + select { + case err := <-errc: + if err != nil { + t.Fatalf("Error in handler: %v", err) + } + case <-time.After(2 * time.Second): + t.Fatal("timeout in handler") + } +} + +// readBodyHandler returns an http Handler func that reads len(want) +// bytes from r.Body and fails t if the contents read were not +// the value of want. +func readBodyHandler(t *testing.T, want string) func(w http.ResponseWriter, r *http.Request) { + return func(w http.ResponseWriter, r *http.Request) { + buf := make([]byte, len(want)) + _, err := io.ReadFull(r.Body, buf) + if err != nil { + t.Error(err) + return + } + if string(buf) != want { + t.Errorf("read %q; want %q", buf, want) + } + } +} + +// TestServerWithCurl currently fails, hence the LenientCipherSuites test. See: +// https://github.com/tatsuhiro-t/nghttp2/issues/140 & +// http://sourceforge.net/p/curl/bugs/1472/ +func TestServerWithCurl(t *testing.T) { testServerWithCurl(t, false) } +func TestServerWithCurl_LenientCipherSuites(t *testing.T) { testServerWithCurl(t, true) } + +func testServerWithCurl(t *testing.T, permitProhibitedCipherSuites bool) { + if runtime.GOOS != "linux" { + t.Skip("skipping Docker test when not on Linux; requires --net which won't work with boot2docker anyway") + } + if testing.Short() { + t.Skip("skipping curl test in short mode") + } + requireCurl(t) + var gotConn int32 + testHookOnConn = func() { atomic.StoreInt32(&gotConn, 1) } + + const msg = "Hello from curl!\n" + ts := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Foo", "Bar") + w.Header().Set("Client-Proto", r.Proto) + io.WriteString(w, msg) + })) + ConfigureServer(ts.Config, &Server{ + PermitProhibitedCipherSuites: permitProhibitedCipherSuites, + }) + ts.TLS = ts.Config.TLSConfig // the httptest.Server has its own copy of this TLS config + ts.StartTLS() + defer ts.Close() + + t.Logf("Running test server for curl to hit at: %s", ts.URL) + container := curl(t, "--silent", "--http2", "--insecure", "-v", ts.URL) + defer kill(container) + resc := make(chan interface{}, 1) + go func() { + res, err := dockerLogs(container) + if err != nil { + resc <- err + } else { + resc <- res + } + }() + select { + case res := <-resc: + if err, ok := res.(error); ok { + t.Fatal(err) + } + body := string(res.([]byte)) + // Search for both "key: value" and "key:value", since curl changed their format + // Our Dockerfile contains the latest version (no space), but just in case people + // didn't rebuild, check both. + if !strings.Contains(body, "foo: Bar") && !strings.Contains(body, "foo:Bar") { + t.Errorf("didn't see foo: Bar header") + t.Logf("Got: %s", body) + } + if !strings.Contains(body, "client-proto: HTTP/2") && !strings.Contains(body, "client-proto:HTTP/2") { + t.Errorf("didn't see client-proto: HTTP/2 header") + t.Logf("Got: %s", res) + } + if !strings.Contains(string(res.([]byte)), msg) { + t.Errorf("didn't see %q content", msg) + t.Logf("Got: %s", res) + } + case <-time.After(3 * time.Second): + t.Errorf("timeout waiting for curl") + } + + if atomic.LoadInt32(&gotConn) == 0 { + t.Error("never saw an http2 connection") + } +} + +var doh2load = flag.Bool("h2load", false, "Run h2load test") + +func TestServerWithH2Load(t *testing.T) { + if !*doh2load { + t.Skip("Skipping without --h2load flag.") + } + if runtime.GOOS != "linux" { + t.Skip("skipping Docker test when not on Linux; requires --net which won't work with boot2docker anyway") + } + requireH2load(t) + + msg := strings.Repeat("Hello, h2load!\n", 5000) + ts := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + io.WriteString(w, msg) + w.(http.Flusher).Flush() + io.WriteString(w, msg) + })) + ts.StartTLS() + defer ts.Close() + + cmd := exec.Command("docker", "run", "--net=host", "--entrypoint=/usr/local/bin/h2load", "gohttp2/curl", + "-n100000", "-c100", "-m100", ts.URL) + cmd.Stdout = os.Stdout + cmd.Stderr = os.Stderr + if err := cmd.Run(); err != nil { + t.Fatal(err) + } +} + +// Issue 12843 +func TestServerDoS_MaxHeaderListSize(t *testing.T) { + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {}) + defer st.Close() + + // shake hands + frameSize := defaultMaxReadFrameSize + var advHeaderListSize *uint32 + st.greetAndCheckSettings(func(s Setting) error { + switch s.ID { + case SettingMaxFrameSize: + if s.Val < minMaxFrameSize { + frameSize = minMaxFrameSize + } else if s.Val > maxFrameSize { + frameSize = maxFrameSize + } else { + frameSize = int(s.Val) + } + case SettingMaxHeaderListSize: + advHeaderListSize = &s.Val + } + return nil + }) + + if advHeaderListSize == nil { + t.Errorf("server didn't advertise a max header list size") + } else if *advHeaderListSize == 0 { + t.Errorf("server advertised a max header list size of 0") + } + + st.encodeHeaderField(":method", "GET") + st.encodeHeaderField(":path", "/") + st.encodeHeaderField(":scheme", "https") + cookie := strings.Repeat("*", 4058) + st.encodeHeaderField("cookie", cookie) + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: st.headerBuf.Bytes(), + EndStream: true, + EndHeaders: false, + }) + + // Capture the short encoding of a duplicate ~4K cookie, now + // that we've already sent it once. + st.headerBuf.Reset() + st.encodeHeaderField("cookie", cookie) + + // Now send 1MB of it. + const size = 1 << 20 + b := bytes.Repeat(st.headerBuf.Bytes(), size/st.headerBuf.Len()) + for len(b) > 0 { + chunk := b + if len(chunk) > frameSize { + chunk = chunk[:frameSize] + } + b = b[len(chunk):] + st.fr.WriteContinuation(1, len(b) == 0, chunk) + } + + h := st.wantHeaders() + if !h.HeadersEnded() { + t.Fatalf("Got HEADERS without END_HEADERS set: %v", h) + } + headers := st.decodeHeader(h.HeaderBlockFragment()) + want := [][2]string{ + {":status", "431"}, + {"content-type", "text/html; charset=utf-8"}, + {"content-length", "63"}, + } + if !reflect.DeepEqual(headers, want) { + t.Errorf("Headers mismatch.\n got: %q\nwant: %q\n", headers, want) + } +} + +func TestCompressionErrorOnWrite(t *testing.T) { + const maxStrLen = 8 << 10 + var serverConfig *http.Server + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + // No response body. + }, func(ts *httptest.Server) { + serverConfig = ts.Config + serverConfig.MaxHeaderBytes = maxStrLen + }) + st.addLogFilter("connection error: COMPRESSION_ERROR") + defer st.Close() + st.greet() + + maxAllowed := st.sc.framer.maxHeaderStringLen() + + // Crank this up, now that we have a conn connected with the + // hpack.Decoder's max string length set has been initialized + // from the earlier low ~8K value. We want this higher so don't + // hit the max header list size. We only want to test hitting + // the max string size. + serverConfig.MaxHeaderBytes = 1 << 20 + + // First a request with a header that's exactly the max allowed size + // for the hpack compression. It's still too long for the header list + // size, so we'll get the 431 error, but that keeps the compression + // context still valid. + hbf := st.encodeHeader("foo", strings.Repeat("a", maxAllowed)) + + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: hbf, + EndStream: true, + EndHeaders: true, + }) + h := st.wantHeaders() + if !h.HeadersEnded() { + t.Fatalf("Got HEADERS without END_HEADERS set: %v", h) + } + headers := st.decodeHeader(h.HeaderBlockFragment()) + want := [][2]string{ + {":status", "431"}, + {"content-type", "text/html; charset=utf-8"}, + {"content-length", "63"}, + } + if !reflect.DeepEqual(headers, want) { + t.Errorf("Headers mismatch.\n got: %q\nwant: %q\n", headers, want) + } + df := st.wantData() + if !strings.Contains(string(df.Data()), "HTTP Error 431") { + t.Errorf("Unexpected data body: %q", df.Data()) + } + if !df.StreamEnded() { + t.Fatalf("expect data stream end") + } + + // And now send one that's just one byte too big. + hbf = st.encodeHeader("bar", strings.Repeat("b", maxAllowed+1)) + st.writeHeaders(HeadersFrameParam{ + StreamID: 3, + BlockFragment: hbf, + EndStream: true, + EndHeaders: true, + }) + ga := st.wantGoAway() + if ga.ErrCode != ErrCodeCompression { + t.Errorf("GOAWAY err = %v; want ErrCodeCompression", ga.ErrCode) + } +} + +func TestCompressionErrorOnClose(t *testing.T) { + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + // No response body. + }) + st.addLogFilter("connection error: COMPRESSION_ERROR") + defer st.Close() + st.greet() + + hbf := st.encodeHeader("foo", "bar") + hbf = hbf[:len(hbf)-1] // truncate one byte from the end, so hpack.Decoder.Close fails. + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: hbf, + EndStream: true, + EndHeaders: true, + }) + ga := st.wantGoAway() + if ga.ErrCode != ErrCodeCompression { + t.Errorf("GOAWAY err = %v; want ErrCodeCompression", ga.ErrCode) + } +} + +// test that a server handler can read trailers from a client +func TestServerReadsTrailers(t *testing.T) { + const testBody = "some test body" + writeReq := func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader("trailer", "Foo, Bar", "trailer", "Baz"), + EndStream: false, + EndHeaders: true, + }) + st.writeData(1, false, []byte(testBody)) + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeaderRaw( + "foo", "foov", + "bar", "barv", + "baz", "bazv", + "surprise", "wasn't declared; shouldn't show up", + ), + EndStream: true, + EndHeaders: true, + }) + } + checkReq := func(r *http.Request) { + wantTrailer := http.Header{ + "Foo": nil, + "Bar": nil, + "Baz": nil, + } + if !reflect.DeepEqual(r.Trailer, wantTrailer) { + t.Errorf("initial Trailer = %v; want %v", r.Trailer, wantTrailer) + } + slurp, err := ioutil.ReadAll(r.Body) + if string(slurp) != testBody { + t.Errorf("read body %q; want %q", slurp, testBody) + } + if err != nil { + t.Fatalf("Body slurp: %v", err) + } + wantTrailerAfter := http.Header{ + "Foo": {"foov"}, + "Bar": {"barv"}, + "Baz": {"bazv"}, + } + if !reflect.DeepEqual(r.Trailer, wantTrailerAfter) { + t.Errorf("final Trailer = %v; want %v", r.Trailer, wantTrailerAfter) + } + } + testServerRequest(t, writeReq, checkReq) +} + +// test that a server handler can send trailers +func TestServerWritesTrailers_WithFlush(t *testing.T) { testServerWritesTrailers(t, true) } +func TestServerWritesTrailers_WithoutFlush(t *testing.T) { testServerWritesTrailers(t, false) } + +func testServerWritesTrailers(t *testing.T, withFlush bool) { + // See https://httpwg.github.io/specs/rfc7540.html#rfc.section.8.1.3 + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + w.Header().Set("Trailer", "Server-Trailer-A, Server-Trailer-B") + w.Header().Add("Trailer", "Server-Trailer-C") + w.Header().Add("Trailer", "Transfer-Encoding, Content-Length, Trailer") // filtered + + // Regular headers: + w.Header().Set("Foo", "Bar") + w.Header().Set("Content-Length", "5") // len("Hello") + + io.WriteString(w, "Hello") + if withFlush { + w.(http.Flusher).Flush() + } + w.Header().Set("Server-Trailer-A", "valuea") + w.Header().Set("Server-Trailer-C", "valuec") // skipping B + // After a flush, random keys like Server-Surprise shouldn't show up: + w.Header().Set("Server-Surpise", "surprise! this isn't predeclared!") + // But we do permit promoting keys to trailers after a + // flush if they start with the magic + // otherwise-invalid "Trailer:" prefix: + w.Header().Set("Trailer:Post-Header-Trailer", "hi1") + w.Header().Set("Trailer:post-header-trailer2", "hi2") + w.Header().Set("Trailer:Range", "invalid") + w.Header().Set("Trailer:Foo\x01Bogus", "invalid") + w.Header().Set("Transfer-Encoding", "should not be included; Forbidden by RFC 2616 14.40") + w.Header().Set("Content-Length", "should not be included; Forbidden by RFC 2616 14.40") + w.Header().Set("Trailer", "should not be included; Forbidden by RFC 2616 14.40") + return nil + }, func(st *serverTester) { + getSlash(st) + hf := st.wantHeaders() + if hf.StreamEnded() { + t.Fatal("response HEADERS had END_STREAM") + } + if !hf.HeadersEnded() { + t.Fatal("response HEADERS didn't have END_HEADERS") + } + goth := st.decodeHeader(hf.HeaderBlockFragment()) + wanth := [][2]string{ + {":status", "200"}, + {"foo", "Bar"}, + {"trailer", "Server-Trailer-A, Server-Trailer-B"}, + {"trailer", "Server-Trailer-C"}, + {"trailer", "Transfer-Encoding, Content-Length, Trailer"}, + {"content-type", "text/plain; charset=utf-8"}, + {"content-length", "5"}, + } + if !reflect.DeepEqual(goth, wanth) { + t.Errorf("Header mismatch.\n got: %v\nwant: %v", goth, wanth) + } + df := st.wantData() + if string(df.Data()) != "Hello" { + t.Fatalf("Client read %q; want Hello", df.Data()) + } + if df.StreamEnded() { + t.Fatalf("data frame had STREAM_ENDED") + } + tf := st.wantHeaders() // for the trailers + if !tf.StreamEnded() { + t.Fatalf("trailers HEADERS lacked END_STREAM") + } + if !tf.HeadersEnded() { + t.Fatalf("trailers HEADERS lacked END_HEADERS") + } + wanth = [][2]string{ + {"post-header-trailer", "hi1"}, + {"post-header-trailer2", "hi2"}, + {"server-trailer-a", "valuea"}, + {"server-trailer-c", "valuec"}, + } + goth = st.decodeHeader(tf.HeaderBlockFragment()) + if !reflect.DeepEqual(goth, wanth) { + t.Errorf("Header mismatch.\n got: %v\nwant: %v", goth, wanth) + } + }) +} + +// validate transmitted header field names & values +// golang.org/issue/14048 +func TestServerDoesntWriteInvalidHeaders(t *testing.T) { + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + w.Header().Add("OK1", "x") + w.Header().Add("Bad:Colon", "x") // colon (non-token byte) in key + w.Header().Add("Bad1\x00", "x") // null in key + w.Header().Add("Bad2", "x\x00y") // null in value + return nil + }, func(st *serverTester) { + getSlash(st) + hf := st.wantHeaders() + if !hf.StreamEnded() { + t.Error("response HEADERS lacked END_STREAM") + } + if !hf.HeadersEnded() { + t.Fatal("response HEADERS didn't have END_HEADERS") + } + goth := st.decodeHeader(hf.HeaderBlockFragment()) + wanth := [][2]string{ + {":status", "200"}, + {"ok1", "x"}, + {"content-type", "text/plain; charset=utf-8"}, + {"content-length", "0"}, + } + if !reflect.DeepEqual(goth, wanth) { + t.Errorf("Header mismatch.\n got: %v\nwant: %v", goth, wanth) + } + }) +} + +func BenchmarkServerGets(b *testing.B) { + defer disableGoroutineTracking()() + b.ReportAllocs() + + const msg = "Hello, world" + st := newServerTester(b, func(w http.ResponseWriter, r *http.Request) { + io.WriteString(w, msg) + }) + defer st.Close() + st.greet() + + // Give the server quota to reply. (plus it has the the 64KB) + if err := st.fr.WriteWindowUpdate(0, uint32(b.N*len(msg))); err != nil { + b.Fatal(err) + } + + for i := 0; i < b.N; i++ { + id := 1 + uint32(i)*2 + st.writeHeaders(HeadersFrameParam{ + StreamID: id, + BlockFragment: st.encodeHeader(), + EndStream: true, + EndHeaders: true, + }) + st.wantHeaders() + df := st.wantData() + if !df.StreamEnded() { + b.Fatalf("DATA didn't have END_STREAM; got %v", df) + } + } +} + +func BenchmarkServerPosts(b *testing.B) { + defer disableGoroutineTracking()() + b.ReportAllocs() + + const msg = "Hello, world" + st := newServerTester(b, func(w http.ResponseWriter, r *http.Request) { + // Consume the (empty) body from th peer before replying, otherwise + // the server will sometimes (depending on scheduling) send the peer a + // a RST_STREAM with the CANCEL error code. + if n, err := io.Copy(ioutil.Discard, r.Body); n != 0 || err != nil { + b.Errorf("Copy error; got %v, %v; want 0, nil", n, err) + } + io.WriteString(w, msg) + }) + defer st.Close() + st.greet() + + // Give the server quota to reply. (plus it has the the 64KB) + if err := st.fr.WriteWindowUpdate(0, uint32(b.N*len(msg))); err != nil { + b.Fatal(err) + } + + for i := 0; i < b.N; i++ { + id := 1 + uint32(i)*2 + st.writeHeaders(HeadersFrameParam{ + StreamID: id, + BlockFragment: st.encodeHeader(":method", "POST"), + EndStream: false, + EndHeaders: true, + }) + st.writeData(id, true, nil) + st.wantHeaders() + df := st.wantData() + if !df.StreamEnded() { + b.Fatalf("DATA didn't have END_STREAM; got %v", df) + } + } +} + +// Send a stream of messages from server to client in separate data frames. +// Brings up performance issues seen in long streams. +// Created to show problem in go issue #18502 +func BenchmarkServerToClientStreamDefaultOptions(b *testing.B) { + benchmarkServerToClientStream(b) +} + +// Justification for Change-Id: Iad93420ef6c3918f54249d867098f1dadfa324d8 +// Expect to see memory/alloc reduction by opting in to Frame reuse with the Framer. +func BenchmarkServerToClientStreamReuseFrames(b *testing.B) { + benchmarkServerToClientStream(b, optFramerReuseFrames) +} + +func benchmarkServerToClientStream(b *testing.B, newServerOpts ...interface{}) { + defer disableGoroutineTracking()() + b.ReportAllocs() + const msgLen = 1 + // default window size + const windowSize = 1<<16 - 1 + + // next message to send from the server and for the client to expect + nextMsg := func(i int) []byte { + msg := make([]byte, msgLen) + msg[0] = byte(i) + if len(msg) != msgLen { + panic("invalid test setup msg length") + } + return msg + } + + st := newServerTester(b, func(w http.ResponseWriter, r *http.Request) { + // Consume the (empty) body from th peer before replying, otherwise + // the server will sometimes (depending on scheduling) send the peer a + // a RST_STREAM with the CANCEL error code. + if n, err := io.Copy(ioutil.Discard, r.Body); n != 0 || err != nil { + b.Errorf("Copy error; got %v, %v; want 0, nil", n, err) + } + for i := 0; i < b.N; i += 1 { + w.Write(nextMsg(i)) + w.(http.Flusher).Flush() + } + }, newServerOpts...) + defer st.Close() + st.greet() + + const id = uint32(1) + + st.writeHeaders(HeadersFrameParam{ + StreamID: id, + BlockFragment: st.encodeHeader(":method", "POST"), + EndStream: false, + EndHeaders: true, + }) + + st.writeData(id, true, nil) + st.wantHeaders() + + var pendingWindowUpdate = uint32(0) + + for i := 0; i < b.N; i += 1 { + expected := nextMsg(i) + df := st.wantData() + if bytes.Compare(expected, df.data) != 0 { + b.Fatalf("Bad message received; want %v; got %v", expected, df.data) + } + // try to send infrequent but large window updates so they don't overwhelm the test + pendingWindowUpdate += uint32(len(df.data)) + if pendingWindowUpdate >= windowSize/2 { + if err := st.fr.WriteWindowUpdate(0, pendingWindowUpdate); err != nil { + b.Fatal(err) + } + if err := st.fr.WriteWindowUpdate(id, pendingWindowUpdate); err != nil { + b.Fatal(err) + } + pendingWindowUpdate = 0 + } + } + df := st.wantData() + if !df.StreamEnded() { + b.Fatalf("DATA didn't have END_STREAM; got %v", df) + } +} + +// go-fuzz bug, originally reported at https://github.com/bradfitz/http2/issues/53 +// Verify we don't hang. +func TestIssue53(t *testing.T) { + const data = "PRI * HTTP/2.0\r\n\r\nSM" + + "\r\n\r\n\x00\x00\x00\x01\ainfinfin\ad" + s := &http.Server{ + ErrorLog: log.New(io.MultiWriter(stderrv(), twriter{t: t}), "", log.LstdFlags), + Handler: http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + w.Write([]byte("hello")) + }), + } + s2 := &Server{ + MaxReadFrameSize: 1 << 16, + PermitProhibitedCipherSuites: true, + } + c := &issue53Conn{[]byte(data), false, false} + s2.ServeConn(c, &ServeConnOpts{BaseConfig: s}) + if !c.closed { + t.Fatal("connection is not closed") + } +} + +type issue53Conn struct { + data []byte + closed bool + written bool +} + +func (c *issue53Conn) Read(b []byte) (n int, err error) { + if len(c.data) == 0 { + return 0, io.EOF + } + n = copy(b, c.data) + c.data = c.data[n:] + return +} + +func (c *issue53Conn) Write(b []byte) (n int, err error) { + c.written = true + return len(b), nil +} + +func (c *issue53Conn) Close() error { + c.closed = true + return nil +} + +func (c *issue53Conn) LocalAddr() net.Addr { + return &net.TCPAddr{IP: net.IPv4(127, 0, 0, 1), Port: 49706} +} +func (c *issue53Conn) RemoteAddr() net.Addr { + return &net.TCPAddr{IP: net.IPv4(127, 0, 0, 1), Port: 49706} +} +func (c *issue53Conn) SetDeadline(t time.Time) error { return nil } +func (c *issue53Conn) SetReadDeadline(t time.Time) error { return nil } +func (c *issue53Conn) SetWriteDeadline(t time.Time) error { return nil } + +// golang.org/issue/12895 +func TestConfigureServer(t *testing.T) { + tests := []struct { + name string + tlsConfig *tls.Config + wantErr string + }{ + { + name: "empty server", + }, + { + name: "just the required cipher suite", + tlsConfig: &tls.Config{ + CipherSuites: []uint16{tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256}, + }, + }, + { + name: "missing required cipher suite", + tlsConfig: &tls.Config{ + CipherSuites: []uint16{tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384}, + }, + wantErr: "is missing HTTP/2-required TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", + }, + { + name: "required after bad", + tlsConfig: &tls.Config{ + CipherSuites: []uint16{tls.TLS_RSA_WITH_RC4_128_SHA, tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256}, + }, + wantErr: "contains an HTTP/2-approved cipher suite (0xc02f), but it comes after", + }, + { + name: "bad after required", + tlsConfig: &tls.Config{ + CipherSuites: []uint16{tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, tls.TLS_RSA_WITH_RC4_128_SHA}, + }, + }, + } + for _, tt := range tests { + srv := &http.Server{TLSConfig: tt.tlsConfig} + err := ConfigureServer(srv, nil) + if (err != nil) != (tt.wantErr != "") { + if tt.wantErr != "" { + t.Errorf("%s: success, but want error", tt.name) + } else { + t.Errorf("%s: unexpected error: %v", tt.name, err) + } + } + if err != nil && tt.wantErr != "" && !strings.Contains(err.Error(), tt.wantErr) { + t.Errorf("%s: err = %v; want substring %q", tt.name, err, tt.wantErr) + } + if err == nil && !srv.TLSConfig.PreferServerCipherSuites { + t.Errorf("%s: PreferServerCipherSuite is false; want true", tt.name) + } + } +} + +func TestServerRejectHeadWithBody(t *testing.T) { + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + // No response body. + }) + defer st.Close() + st.greet() + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader(":method", "HEAD"), + EndStream: false, // what we're testing, a bogus HEAD request with body + EndHeaders: true, + }) + st.wantRSTStream(1, ErrCodeProtocol) +} + +func TestServerNoAutoContentLengthOnHead(t *testing.T) { + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + // No response body. (or smaller than one frame) + }) + defer st.Close() + st.greet() + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader(":method", "HEAD"), + EndStream: true, + EndHeaders: true, + }) + h := st.wantHeaders() + headers := st.decodeHeader(h.HeaderBlockFragment()) + want := [][2]string{ + {":status", "200"}, + {"content-type", "text/plain; charset=utf-8"}, + } + if !reflect.DeepEqual(headers, want) { + t.Errorf("Headers mismatch.\n got: %q\nwant: %q\n", headers, want) + } +} + +// golang.org/issue/13495 +func TestServerNoDuplicateContentType(t *testing.T) { + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + w.Header()["Content-Type"] = []string{""} + fmt.Fprintf(w, "hi") + }) + defer st.Close() + st.greet() + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: st.encodeHeader(), + EndStream: true, + EndHeaders: true, + }) + h := st.wantHeaders() + headers := st.decodeHeader(h.HeaderBlockFragment()) + want := [][2]string{ + {":status", "200"}, + {"content-type", ""}, + {"content-length", "41"}, + } + if !reflect.DeepEqual(headers, want) { + t.Errorf("Headers mismatch.\n got: %q\nwant: %q\n", headers, want) + } +} + +func disableGoroutineTracking() (restore func()) { + old := DebugGoroutines + DebugGoroutines = false + return func() { DebugGoroutines = old } +} + +func BenchmarkServer_GetRequest(b *testing.B) { + defer disableGoroutineTracking()() + b.ReportAllocs() + const msg = "Hello, world." + st := newServerTester(b, func(w http.ResponseWriter, r *http.Request) { + n, err := io.Copy(ioutil.Discard, r.Body) + if err != nil || n > 0 { + b.Errorf("Read %d bytes, error %v; want 0 bytes.", n, err) + } + io.WriteString(w, msg) + }) + defer st.Close() + + st.greet() + // Give the server quota to reply. (plus it has the the 64KB) + if err := st.fr.WriteWindowUpdate(0, uint32(b.N*len(msg))); err != nil { + b.Fatal(err) + } + hbf := st.encodeHeader(":method", "GET") + for i := 0; i < b.N; i++ { + streamID := uint32(1 + 2*i) + st.writeHeaders(HeadersFrameParam{ + StreamID: streamID, + BlockFragment: hbf, + EndStream: true, + EndHeaders: true, + }) + st.wantHeaders() + st.wantData() + } +} + +func BenchmarkServer_PostRequest(b *testing.B) { + defer disableGoroutineTracking()() + b.ReportAllocs() + const msg = "Hello, world." + st := newServerTester(b, func(w http.ResponseWriter, r *http.Request) { + n, err := io.Copy(ioutil.Discard, r.Body) + if err != nil || n > 0 { + b.Errorf("Read %d bytes, error %v; want 0 bytes.", n, err) + } + io.WriteString(w, msg) + }) + defer st.Close() + st.greet() + // Give the server quota to reply. (plus it has the the 64KB) + if err := st.fr.WriteWindowUpdate(0, uint32(b.N*len(msg))); err != nil { + b.Fatal(err) + } + hbf := st.encodeHeader(":method", "POST") + for i := 0; i < b.N; i++ { + streamID := uint32(1 + 2*i) + st.writeHeaders(HeadersFrameParam{ + StreamID: streamID, + BlockFragment: hbf, + EndStream: false, + EndHeaders: true, + }) + st.writeData(streamID, true, nil) + st.wantHeaders() + st.wantData() + } +} + +type connStateConn struct { + net.Conn + cs tls.ConnectionState +} + +func (c connStateConn) ConnectionState() tls.ConnectionState { return c.cs } + +// golang.org/issue/12737 -- handle any net.Conn, not just +// *tls.Conn. +func TestServerHandleCustomConn(t *testing.T) { + var s Server + c1, c2 := net.Pipe() + clientDone := make(chan struct{}) + handlerDone := make(chan struct{}) + var req *http.Request + go func() { + defer close(clientDone) + defer c2.Close() + fr := NewFramer(c2, c2) + io.WriteString(c2, ClientPreface) + fr.WriteSettings() + fr.WriteSettingsAck() + f, err := fr.ReadFrame() + if err != nil { + t.Error(err) + return + } + if sf, ok := f.(*SettingsFrame); !ok || sf.IsAck() { + t.Errorf("Got %v; want non-ACK SettingsFrame", summarizeFrame(f)) + return + } + f, err = fr.ReadFrame() + if err != nil { + t.Error(err) + return + } + if sf, ok := f.(*SettingsFrame); !ok || !sf.IsAck() { + t.Errorf("Got %v; want ACK SettingsFrame", summarizeFrame(f)) + return + } + var henc hpackEncoder + fr.WriteHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: henc.encodeHeaderRaw(t, ":method", "GET", ":path", "/", ":scheme", "https", ":authority", "foo.com"), + EndStream: true, + EndHeaders: true, + }) + go io.Copy(ioutil.Discard, c2) + <-handlerDone + }() + const testString = "my custom ConnectionState" + fakeConnState := tls.ConnectionState{ + ServerName: testString, + Version: tls.VersionTLS12, + CipherSuite: cipher_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, + } + go s.ServeConn(connStateConn{c1, fakeConnState}, &ServeConnOpts{ + BaseConfig: &http.Server{ + Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + defer close(handlerDone) + req = r + }), + }}) + select { + case <-clientDone: + case <-time.After(5 * time.Second): + t.Fatal("timeout waiting for handler") + } + if req.TLS == nil { + t.Fatalf("Request.TLS is nil. Got: %#v", req) + } + if req.TLS.ServerName != testString { + t.Fatalf("Request.TLS = %+v; want ServerName of %q", req.TLS, testString) + } +} + +// golang.org/issue/14214 +func TestServer_Rejects_ConnHeaders(t *testing.T) { + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + t.Error("should not get to Handler") + }) + defer st.Close() + st.greet() + st.bodylessReq1("connection", "foo") + hf := st.wantHeaders() + goth := st.decodeHeader(hf.HeaderBlockFragment()) + wanth := [][2]string{ + {":status", "400"}, + {"content-type", "text/plain; charset=utf-8"}, + {"x-content-type-options", "nosniff"}, + {"content-length", "51"}, + } + if !reflect.DeepEqual(goth, wanth) { + t.Errorf("Got headers %v; want %v", goth, wanth) + } +} + +type hpackEncoder struct { + enc *hpack.Encoder + buf bytes.Buffer +} + +func (he *hpackEncoder) encodeHeaderRaw(t *testing.T, headers ...string) []byte { + if len(headers)%2 == 1 { + panic("odd number of kv args") + } + he.buf.Reset() + if he.enc == nil { + he.enc = hpack.NewEncoder(&he.buf) + } + for len(headers) > 0 { + k, v := headers[0], headers[1] + err := he.enc.WriteField(hpack.HeaderField{Name: k, Value: v}) + if err != nil { + t.Fatalf("HPACK encoding error for %q/%q: %v", k, v, err) + } + headers = headers[2:] + } + return he.buf.Bytes() +} + +func TestCheckValidHTTP2Request(t *testing.T) { + tests := []struct { + h http.Header + want error + }{ + { + h: http.Header{"Te": {"trailers"}}, + want: nil, + }, + { + h: http.Header{"Te": {"trailers", "bogus"}}, + want: errors.New(`request header "TE" may only be "trailers" in HTTP/2`), + }, + { + h: http.Header{"Foo": {""}}, + want: nil, + }, + { + h: http.Header{"Connection": {""}}, + want: errors.New(`request header "Connection" is not valid in HTTP/2`), + }, + { + h: http.Header{"Proxy-Connection": {""}}, + want: errors.New(`request header "Proxy-Connection" is not valid in HTTP/2`), + }, + { + h: http.Header{"Keep-Alive": {""}}, + want: errors.New(`request header "Keep-Alive" is not valid in HTTP/2`), + }, + { + h: http.Header{"Upgrade": {""}}, + want: errors.New(`request header "Upgrade" is not valid in HTTP/2`), + }, + } + for i, tt := range tests { + got := checkValidHTTP2RequestHeaders(tt.h) + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("%d. checkValidHTTP2Request = %v; want %v", i, got, tt.want) + } + } +} + +// golang.org/issue/14030 +func TestExpect100ContinueAfterHandlerWrites(t *testing.T) { + const msg = "Hello" + const msg2 = "World" + + doRead := make(chan bool, 1) + defer close(doRead) // fallback cleanup + + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + io.WriteString(w, msg) + w.(http.Flusher).Flush() + + // Do a read, which might force a 100-continue status to be sent. + <-doRead + r.Body.Read(make([]byte, 10)) + + io.WriteString(w, msg2) + + }, optOnlyServer) + defer st.Close() + + tr := &Transport{TLSClientConfig: tlsConfigInsecure} + defer tr.CloseIdleConnections() + + req, _ := http.NewRequest("POST", st.ts.URL, io.LimitReader(neverEnding('A'), 2<<20)) + req.Header.Set("Expect", "100-continue") + + res, err := tr.RoundTrip(req) + if err != nil { + t.Fatal(err) + } + defer res.Body.Close() + + buf := make([]byte, len(msg)) + if _, err := io.ReadFull(res.Body, buf); err != nil { + t.Fatal(err) + } + if string(buf) != msg { + t.Fatalf("msg = %q; want %q", buf, msg) + } + + doRead <- true + + if _, err := io.ReadFull(res.Body, buf); err != nil { + t.Fatal(err) + } + if string(buf) != msg2 { + t.Fatalf("second msg = %q; want %q", buf, msg2) + } +} + +type funcReader func([]byte) (n int, err error) + +func (f funcReader) Read(p []byte) (n int, err error) { return f(p) } + +// golang.org/issue/16481 -- return flow control when streams close with unread data. +// (The Server version of the bug. See also TestUnreadFlowControlReturned_Transport) +func TestUnreadFlowControlReturned_Server(t *testing.T) { + unblock := make(chan bool, 1) + defer close(unblock) + + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + // Don't read the 16KB request body. Wait until the client's + // done sending it and then return. This should cause the Server + // to then return those 16KB of flow control to the client. + <-unblock + }, optOnlyServer) + defer st.Close() + + tr := &Transport{TLSClientConfig: tlsConfigInsecure} + defer tr.CloseIdleConnections() + + // This previously hung on the 4th iteration. + for i := 0; i < 6; i++ { + body := io.MultiReader( + io.LimitReader(neverEnding('A'), 16<<10), + funcReader(func([]byte) (n int, err error) { + unblock <- true + return 0, io.EOF + }), + ) + req, _ := http.NewRequest("POST", st.ts.URL, body) + res, err := tr.RoundTrip(req) + if err != nil { + t.Fatal(err) + } + res.Body.Close() + } + +} + +func TestServerIdleTimeout(t *testing.T) { + if testing.Short() { + t.Skip("skipping in short mode") + } + + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + }, func(h2s *Server) { + h2s.IdleTimeout = 500 * time.Millisecond + }) + defer st.Close() + + st.greet() + ga := st.wantGoAway() + if ga.ErrCode != ErrCodeNo { + t.Errorf("GOAWAY error = %v; want ErrCodeNo", ga.ErrCode) + } +} + +func TestServerIdleTimeout_AfterRequest(t *testing.T) { + if testing.Short() { + t.Skip("skipping in short mode") + } + const timeout = 250 * time.Millisecond + + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + time.Sleep(timeout * 2) + }, func(h2s *Server) { + h2s.IdleTimeout = timeout + }) + defer st.Close() + + st.greet() + + // Send a request which takes twice the timeout. Verifies the + // idle timeout doesn't fire while we're in a request: + st.bodylessReq1() + st.wantHeaders() + + // But the idle timeout should be rearmed after the request + // is done: + ga := st.wantGoAway() + if ga.ErrCode != ErrCodeNo { + t.Errorf("GOAWAY error = %v; want ErrCodeNo", ga.ErrCode) + } +} + +// grpc-go closes the Request.Body currently with a Read. +// Verify that it doesn't race. +// See https://github.com/grpc/grpc-go/pull/938 +func TestRequestBodyReadCloseRace(t *testing.T) { + for i := 0; i < 100; i++ { + body := &requestBody{ + pipe: &pipe{ + b: new(bytes.Buffer), + }, + } + body.pipe.CloseWithError(io.EOF) + + done := make(chan bool, 1) + buf := make([]byte, 10) + go func() { + time.Sleep(1 * time.Millisecond) + body.Close() + done <- true + }() + body.Read(buf) + <-done + } +} + +func TestIssue20704Race(t *testing.T) { + if testing.Short() && os.Getenv("GO_BUILDER_NAME") == "" { + t.Skip("skipping in short mode") + } + const ( + itemSize = 1 << 10 + itemCount = 100 + ) + + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + for i := 0; i < itemCount; i++ { + _, err := w.Write(make([]byte, itemSize)) + if err != nil { + return + } + } + }, optOnlyServer) + defer st.Close() + + tr := &Transport{TLSClientConfig: tlsConfigInsecure} + defer tr.CloseIdleConnections() + cl := &http.Client{Transport: tr} + + for i := 0; i < 1000; i++ { + resp, err := cl.Get(st.ts.URL) + if err != nil { + t.Fatal(err) + } + // Force a RST stream to the server by closing without + // reading the body: + resp.Body.Close() + } +} diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go index e0dfe9f6a..adb77ffab 100644 --- a/vendor/golang.org/x/net/http2/transport.go +++ b/vendor/golang.org/x/net/http2/transport.go @@ -87,7 +87,7 @@ type Transport struct { // MaxHeaderListSize is the http2 SETTINGS_MAX_HEADER_LIST_SIZE to // send in the initial settings frame. It is how many bytes - // of response headers are allow. Unlike the http2 spec, zero here + // of response headers are allowed. Unlike the http2 spec, zero here // means to use a default limit (currently 10MB). If you actually // want to advertise an ulimited value to the peer, Transport // interprets the highest possible value here (0xffffffff or 1<<32-1) @@ -172,9 +172,10 @@ type ClientConn struct { fr *Framer lastActive time.Time // Settings from peer: (also guarded by mu) - maxFrameSize uint32 - maxConcurrentStreams uint32 - initialWindowSize uint32 + maxFrameSize uint32 + maxConcurrentStreams uint32 + peerMaxHeaderListSize uint64 + initialWindowSize uint32 hbuf bytes.Buffer // HPACK encoder writes into this henc *hpack.Encoder @@ -519,17 +520,18 @@ func (t *Transport) NewClientConn(c net.Conn) (*ClientConn, error) { func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, error) { cc := &ClientConn{ - t: t, - tconn: c, - readerDone: make(chan struct{}), - nextStreamID: 1, - maxFrameSize: 16 << 10, // spec default - initialWindowSize: 65535, // spec default - maxConcurrentStreams: 1000, // "infinite", per spec. 1000 seems good enough. - streams: make(map[uint32]*clientStream), - singleUse: singleUse, - wantSettingsAck: true, - pings: make(map[[8]byte]chan struct{}), + t: t, + tconn: c, + readerDone: make(chan struct{}), + nextStreamID: 1, + maxFrameSize: 16 << 10, // spec default + initialWindowSize: 65535, // spec default + maxConcurrentStreams: 1000, // "infinite", per spec. 1000 seems good enough. + peerMaxHeaderListSize: 0xffffffffffffffff, // "infinite", per spec. Use 2^64-1 instead. + streams: make(map[uint32]*clientStream), + singleUse: singleUse, + wantSettingsAck: true, + pings: make(map[[8]byte]chan struct{}), } if d := t.idleConnTimeout(); d != 0 { cc.idleTimeout = d @@ -1085,8 +1087,13 @@ func (cs *clientStream) writeRequestBody(body io.Reader, bodyCloser io.Closer) ( var trls []byte if hasTrailers { cc.mu.Lock() - defer cc.mu.Unlock() - trls = cc.encodeTrailers(req) + trls, err = cc.encodeTrailers(req) + cc.mu.Unlock() + if err != nil { + cc.writeStreamReset(cs.ID, ErrCodeInternal, err) + cc.forgetStreamID(cs.ID) + return err + } } cc.wmu.Lock() @@ -1189,62 +1196,86 @@ func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trail } } - // 8.1.2.3 Request Pseudo-Header Fields - // The :path pseudo-header field includes the path and query parts of the - // target URI (the path-absolute production and optionally a '?' character - // followed by the query production (see Sections 3.3 and 3.4 of - // [RFC3986]). - cc.writeHeader(":authority", host) - cc.writeHeader(":method", req.Method) - if req.Method != "CONNECT" { - cc.writeHeader(":path", path) - cc.writeHeader(":scheme", req.URL.Scheme) - } - if trailers != "" { - cc.writeHeader("trailer", trailers) + enumerateHeaders := func(f func(name, value string)) { + // 8.1.2.3 Request Pseudo-Header Fields + // The :path pseudo-header field includes the path and query parts of the + // target URI (the path-absolute production and optionally a '?' character + // followed by the query production (see Sections 3.3 and 3.4 of + // [RFC3986]). + f(":authority", host) + f(":method", req.Method) + if req.Method != "CONNECT" { + f(":path", path) + f(":scheme", req.URL.Scheme) + } + if trailers != "" { + f("trailer", trailers) + } + + var didUA bool + for k, vv := range req.Header { + if strings.EqualFold(k, "host") || strings.EqualFold(k, "content-length") { + // Host is :authority, already sent. + // Content-Length is automatic, set below. + continue + } else if strings.EqualFold(k, "connection") || strings.EqualFold(k, "proxy-connection") || + strings.EqualFold(k, "transfer-encoding") || strings.EqualFold(k, "upgrade") || + strings.EqualFold(k, "keep-alive") { + // Per 8.1.2.2 Connection-Specific Header + // Fields, don't send connection-specific + // fields. We have already checked if any + // are error-worthy so just ignore the rest. + continue + } else if strings.EqualFold(k, "user-agent") { + // Match Go's http1 behavior: at most one + // User-Agent. If set to nil or empty string, + // then omit it. Otherwise if not mentioned, + // include the default (below). + didUA = true + if len(vv) < 1 { + continue + } + vv = vv[:1] + if vv[0] == "" { + continue + } + + } + + for _, v := range vv { + f(k, v) + } + } + if shouldSendReqContentLength(req.Method, contentLength) { + f("content-length", strconv.FormatInt(contentLength, 10)) + } + if addGzipHeader { + f("accept-encoding", "gzip") + } + if !didUA { + f("user-agent", defaultUserAgent) + } } - var didUA bool - for k, vv := range req.Header { - lowKey := strings.ToLower(k) - switch lowKey { - case "host", "content-length": - // Host is :authority, already sent. - // Content-Length is automatic, set below. - continue - case "connection", "proxy-connection", "transfer-encoding", "upgrade", "keep-alive": - // Per 8.1.2.2 Connection-Specific Header - // Fields, don't send connection-specific - // fields. We have already checked if any - // are error-worthy so just ignore the rest. - continue - case "user-agent": - // Match Go's http1 behavior: at most one - // User-Agent. If set to nil or empty string, - // then omit it. Otherwise if not mentioned, - // include the default (below). - didUA = true - if len(vv) < 1 { - continue - } - vv = vv[:1] - if vv[0] == "" { - continue - } - } - for _, v := range vv { - cc.writeHeader(lowKey, v) - } - } - if shouldSendReqContentLength(req.Method, contentLength) { - cc.writeHeader("content-length", strconv.FormatInt(contentLength, 10)) - } - if addGzipHeader { - cc.writeHeader("accept-encoding", "gzip") - } - if !didUA { - cc.writeHeader("user-agent", defaultUserAgent) + // Do a first pass over the headers counting bytes to ensure + // we don't exceed cc.peerMaxHeaderListSize. This is done as a + // separate pass before encoding the headers to prevent + // modifying the hpack state. + hlSize := uint64(0) + enumerateHeaders(func(name, value string) { + hf := hpack.HeaderField{Name: name, Value: value} + hlSize += uint64(hf.Size()) + }) + + if hlSize > cc.peerMaxHeaderListSize { + return nil, errRequestHeaderListSize } + + // Header list size is ok. Write the headers. + enumerateHeaders(func(name, value string) { + cc.writeHeader(strings.ToLower(name), value) + }) + return cc.hbuf.Bytes(), nil } @@ -1271,17 +1302,29 @@ func shouldSendReqContentLength(method string, contentLength int64) bool { } // requires cc.mu be held. -func (cc *ClientConn) encodeTrailers(req *http.Request) []byte { +func (cc *ClientConn) encodeTrailers(req *http.Request) ([]byte, error) { cc.hbuf.Reset() + + hlSize := uint64(0) for k, vv := range req.Trailer { - // Transfer-Encoding, etc.. have already been filter at the + for _, v := range vv { + hf := hpack.HeaderField{Name: k, Value: v} + hlSize += uint64(hf.Size()) + } + } + if hlSize > cc.peerMaxHeaderListSize { + return nil, errRequestHeaderListSize + } + + for k, vv := range req.Trailer { + // Transfer-Encoding, etc.. have already been filtered at the // start of RoundTrip lowKey := strings.ToLower(k) for _, v := range vv { cc.writeHeader(lowKey, v) } } - return cc.hbuf.Bytes() + return cc.hbuf.Bytes(), nil } func (cc *ClientConn) writeHeader(name, value string) { @@ -1789,6 +1832,14 @@ func (rl *clientConnReadLoop) processData(f *DataFrame) error { } return nil } + if !cs.firstByte { + cc.logf("protocol error: received DATA before a HEADERS frame") + rl.endStreamError(cs, StreamError{ + StreamID: f.StreamID, + Code: ErrCodeProtocol, + }) + return nil + } if f.Length > 0 { // Check connection-level flow control. cc.mu.Lock() @@ -1903,6 +1954,8 @@ func (rl *clientConnReadLoop) processSettings(f *SettingsFrame) error { cc.maxFrameSize = s.Val case SettingMaxConcurrentStreams: cc.maxConcurrentStreams = s.Val + case SettingMaxHeaderListSize: + cc.peerMaxHeaderListSize = uint64(s.Val) case SettingInitialWindowSize: // Values above the maximum flow-control // window size of 2^31-1 MUST be treated as a @@ -2069,6 +2122,7 @@ func (cc *ClientConn) writeStreamReset(streamID uint32, code ErrCode, err error) var ( errResponseHeaderListSize = errors.New("http2: response header list larger than advertised limit") + errRequestHeaderListSize = errors.New("http2: request header list larger than peer's advertised limit") errPseudoTrailers = errors.New("http2: invalid pseudo header in trailers") ) diff --git a/vendor/golang.org/x/net/http2/transport_test.go b/vendor/golang.org/x/net/http2/transport_test.go new file mode 100644 index 000000000..0126ff483 --- /dev/null +++ b/vendor/golang.org/x/net/http2/transport_test.go @@ -0,0 +1,3686 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package http2 + +import ( + "bufio" + "bytes" + "crypto/tls" + "errors" + "flag" + "fmt" + "io" + "io/ioutil" + "math/rand" + "net" + "net/http" + "net/http/httptest" + "net/url" + "os" + "reflect" + "runtime" + "sort" + "strconv" + "strings" + "sync" + "sync/atomic" + "testing" + "time" + + "golang.org/x/net/http2/hpack" +) + +var ( + extNet = flag.Bool("extnet", false, "do external network tests") + transportHost = flag.String("transporthost", "http2.golang.org", "hostname to use for TestTransport") + insecure = flag.Bool("insecure", false, "insecure TLS dials") // TODO: dead code. remove? +) + +var tlsConfigInsecure = &tls.Config{InsecureSkipVerify: true} + +type testContext struct{} + +func (testContext) Done() <-chan struct{} { return make(chan struct{}) } +func (testContext) Err() error { panic("should not be called") } +func (testContext) Deadline() (deadline time.Time, ok bool) { return time.Time{}, false } +func (testContext) Value(key interface{}) interface{} { return nil } + +func TestTransportExternal(t *testing.T) { + if !*extNet { + t.Skip("skipping external network test") + } + req, _ := http.NewRequest("GET", "https://"+*transportHost+"/", nil) + rt := &Transport{TLSClientConfig: tlsConfigInsecure} + res, err := rt.RoundTrip(req) + if err != nil { + t.Fatalf("%v", err) + } + res.Write(os.Stdout) +} + +type fakeTLSConn struct { + net.Conn +} + +func (c *fakeTLSConn) ConnectionState() tls.ConnectionState { + return tls.ConnectionState{ + Version: tls.VersionTLS12, + CipherSuite: cipher_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, + } +} + +func startH2cServer(t *testing.T) net.Listener { + h2Server := &Server{} + l := newLocalListener(t) + go func() { + conn, err := l.Accept() + if err != nil { + t.Error(err) + return + } + h2Server.ServeConn(&fakeTLSConn{conn}, &ServeConnOpts{Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + fmt.Fprintf(w, "Hello, %v, http: %v", r.URL.Path, r.TLS == nil) + })}) + }() + return l +} + +func TestTransportH2c(t *testing.T) { + l := startH2cServer(t) + defer l.Close() + req, err := http.NewRequest("GET", "http://"+l.Addr().String()+"/foobar", nil) + if err != nil { + t.Fatal(err) + } + tr := &Transport{ + AllowHTTP: true, + DialTLS: func(network, addr string, cfg *tls.Config) (net.Conn, error) { + return net.Dial(network, addr) + }, + } + res, err := tr.RoundTrip(req) + if err != nil { + t.Fatal(err) + } + if res.ProtoMajor != 2 { + t.Fatal("proto not h2c") + } + body, err := ioutil.ReadAll(res.Body) + if err != nil { + t.Fatal(err) + } + if got, want := string(body), "Hello, /foobar, http: true"; got != want { + t.Fatalf("response got %v, want %v", got, want) + } +} + +func TestTransport(t *testing.T) { + const body = "sup" + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + io.WriteString(w, body) + }, optOnlyServer) + defer st.Close() + + tr := &Transport{TLSClientConfig: tlsConfigInsecure} + defer tr.CloseIdleConnections() + + req, err := http.NewRequest("GET", st.ts.URL, nil) + if err != nil { + t.Fatal(err) + } + res, err := tr.RoundTrip(req) + if err != nil { + t.Fatal(err) + } + defer res.Body.Close() + + t.Logf("Got res: %+v", res) + if g, w := res.StatusCode, 200; g != w { + t.Errorf("StatusCode = %v; want %v", g, w) + } + if g, w := res.Status, "200 OK"; g != w { + t.Errorf("Status = %q; want %q", g, w) + } + wantHeader := http.Header{ + "Content-Length": []string{"3"}, + "Content-Type": []string{"text/plain; charset=utf-8"}, + "Date": []string{"XXX"}, // see cleanDate + } + cleanDate(res) + if !reflect.DeepEqual(res.Header, wantHeader) { + t.Errorf("res Header = %v; want %v", res.Header, wantHeader) + } + if res.Request != req { + t.Errorf("Response.Request = %p; want %p", res.Request, req) + } + if res.TLS == nil { + t.Error("Response.TLS = nil; want non-nil") + } + slurp, err := ioutil.ReadAll(res.Body) + if err != nil { + t.Errorf("Body read: %v", err) + } else if string(slurp) != body { + t.Errorf("Body = %q; want %q", slurp, body) + } +} + +func onSameConn(t *testing.T, modReq func(*http.Request)) bool { + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + io.WriteString(w, r.RemoteAddr) + }, optOnlyServer, func(c net.Conn, st http.ConnState) { + t.Logf("conn %v is now state %v", c.RemoteAddr(), st) + }) + defer st.Close() + tr := &Transport{TLSClientConfig: tlsConfigInsecure} + defer tr.CloseIdleConnections() + get := func() string { + req, err := http.NewRequest("GET", st.ts.URL, nil) + if err != nil { + t.Fatal(err) + } + modReq(req) + res, err := tr.RoundTrip(req) + if err != nil { + t.Fatal(err) + } + defer res.Body.Close() + slurp, err := ioutil.ReadAll(res.Body) + if err != nil { + t.Fatalf("Body read: %v", err) + } + addr := strings.TrimSpace(string(slurp)) + if addr == "" { + t.Fatalf("didn't get an addr in response") + } + return addr + } + first := get() + second := get() + return first == second +} + +func TestTransportReusesConns(t *testing.T) { + if !onSameConn(t, func(*http.Request) {}) { + t.Errorf("first and second responses were on different connections") + } +} + +func TestTransportReusesConn_RequestClose(t *testing.T) { + if onSameConn(t, func(r *http.Request) { r.Close = true }) { + t.Errorf("first and second responses were not on different connections") + } +} + +func TestTransportReusesConn_ConnClose(t *testing.T) { + if onSameConn(t, func(r *http.Request) { r.Header.Set("Connection", "close") }) { + t.Errorf("first and second responses were not on different connections") + } +} + +// Tests that the Transport only keeps one pending dial open per destination address. +// https://golang.org/issue/13397 +func TestTransportGroupsPendingDials(t *testing.T) { + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + io.WriteString(w, r.RemoteAddr) + }, optOnlyServer) + defer st.Close() + tr := &Transport{ + TLSClientConfig: tlsConfigInsecure, + } + defer tr.CloseIdleConnections() + var ( + mu sync.Mutex + dials = map[string]int{} + ) + var wg sync.WaitGroup + for i := 0; i < 10; i++ { + wg.Add(1) + go func() { + defer wg.Done() + req, err := http.NewRequest("GET", st.ts.URL, nil) + if err != nil { + t.Error(err) + return + } + res, err := tr.RoundTrip(req) + if err != nil { + t.Error(err) + return + } + defer res.Body.Close() + slurp, err := ioutil.ReadAll(res.Body) + if err != nil { + t.Errorf("Body read: %v", err) + } + addr := strings.TrimSpace(string(slurp)) + if addr == "" { + t.Errorf("didn't get an addr in response") + } + mu.Lock() + dials[addr]++ + mu.Unlock() + }() + } + wg.Wait() + if len(dials) != 1 { + t.Errorf("saw %d dials; want 1: %v", len(dials), dials) + } + tr.CloseIdleConnections() + if err := retry(50, 10*time.Millisecond, func() error { + cp, ok := tr.connPool().(*clientConnPool) + if !ok { + return fmt.Errorf("Conn pool is %T; want *clientConnPool", tr.connPool()) + } + cp.mu.Lock() + defer cp.mu.Unlock() + if len(cp.dialing) != 0 { + return fmt.Errorf("dialing map = %v; want empty", cp.dialing) + } + if len(cp.conns) != 0 { + return fmt.Errorf("conns = %v; want empty", cp.conns) + } + if len(cp.keys) != 0 { + return fmt.Errorf("keys = %v; want empty", cp.keys) + } + return nil + }); err != nil { + t.Errorf("State of pool after CloseIdleConnections: %v", err) + } +} + +func retry(tries int, delay time.Duration, fn func() error) error { + var err error + for i := 0; i < tries; i++ { + err = fn() + if err == nil { + return nil + } + time.Sleep(delay) + } + return err +} + +func TestTransportAbortClosesPipes(t *testing.T) { + shutdown := make(chan struct{}) + st := newServerTester(t, + func(w http.ResponseWriter, r *http.Request) { + w.(http.Flusher).Flush() + <-shutdown + }, + optOnlyServer, + ) + defer st.Close() + defer close(shutdown) // we must shutdown before st.Close() to avoid hanging + + done := make(chan struct{}) + requestMade := make(chan struct{}) + go func() { + defer close(done) + tr := &Transport{TLSClientConfig: tlsConfigInsecure} + req, err := http.NewRequest("GET", st.ts.URL, nil) + if err != nil { + t.Fatal(err) + } + res, err := tr.RoundTrip(req) + if err != nil { + t.Fatal(err) + } + defer res.Body.Close() + close(requestMade) + _, err = ioutil.ReadAll(res.Body) + if err == nil { + t.Error("expected error from res.Body.Read") + } + }() + + <-requestMade + // Now force the serve loop to end, via closing the connection. + st.closeConn() + // deadlock? that's a bug. + select { + case <-done: + case <-time.After(3 * time.Second): + t.Fatal("timeout") + } +} + +// TODO: merge this with TestTransportBody to make TestTransportRequest? This +// could be a table-driven test with extra goodies. +func TestTransportPath(t *testing.T) { + gotc := make(chan *url.URL, 1) + st := newServerTester(t, + func(w http.ResponseWriter, r *http.Request) { + gotc <- r.URL + }, + optOnlyServer, + ) + defer st.Close() + + tr := &Transport{TLSClientConfig: tlsConfigInsecure} + defer tr.CloseIdleConnections() + const ( + path = "/testpath" + query = "q=1" + ) + surl := st.ts.URL + path + "?" + query + req, err := http.NewRequest("POST", surl, nil) + if err != nil { + t.Fatal(err) + } + c := &http.Client{Transport: tr} + res, err := c.Do(req) + if err != nil { + t.Fatal(err) + } + defer res.Body.Close() + got := <-gotc + if got.Path != path { + t.Errorf("Read Path = %q; want %q", got.Path, path) + } + if got.RawQuery != query { + t.Errorf("Read RawQuery = %q; want %q", got.RawQuery, query) + } +} + +func randString(n int) string { + rnd := rand.New(rand.NewSource(int64(n))) + b := make([]byte, n) + for i := range b { + b[i] = byte(rnd.Intn(256)) + } + return string(b) +} + +type panicReader struct{} + +func (panicReader) Read([]byte) (int, error) { panic("unexpected Read") } +func (panicReader) Close() error { panic("unexpected Close") } + +func TestActualContentLength(t *testing.T) { + tests := []struct { + req *http.Request + want int64 + }{ + // Verify we don't read from Body: + 0: { + req: &http.Request{Body: panicReader{}}, + want: -1, + }, + // nil Body means 0, regardless of ContentLength: + 1: { + req: &http.Request{Body: nil, ContentLength: 5}, + want: 0, + }, + // ContentLength is used if set. + 2: { + req: &http.Request{Body: panicReader{}, ContentLength: 5}, + want: 5, + }, + // http.NoBody means 0, not -1. + 3: { + req: &http.Request{Body: go18httpNoBody()}, + want: 0, + }, + } + for i, tt := range tests { + got := actualContentLength(tt.req) + if got != tt.want { + t.Errorf("test[%d]: got %d; want %d", i, got, tt.want) + } + } +} + +func TestTransportBody(t *testing.T) { + bodyTests := []struct { + body string + noContentLen bool + }{ + {body: "some message"}, + {body: "some message", noContentLen: true}, + {body: strings.Repeat("a", 1<<20), noContentLen: true}, + {body: strings.Repeat("a", 1<<20)}, + {body: randString(16<<10 - 1)}, + {body: randString(16 << 10)}, + {body: randString(16<<10 + 1)}, + {body: randString(512<<10 - 1)}, + {body: randString(512 << 10)}, + {body: randString(512<<10 + 1)}, + {body: randString(1<<20 - 1)}, + {body: randString(1 << 20)}, + {body: randString(1<<20 + 2)}, + } + + type reqInfo struct { + req *http.Request + slurp []byte + err error + } + gotc := make(chan reqInfo, 1) + st := newServerTester(t, + func(w http.ResponseWriter, r *http.Request) { + slurp, err := ioutil.ReadAll(r.Body) + if err != nil { + gotc <- reqInfo{err: err} + } else { + gotc <- reqInfo{req: r, slurp: slurp} + } + }, + optOnlyServer, + ) + defer st.Close() + + for i, tt := range bodyTests { + tr := &Transport{TLSClientConfig: tlsConfigInsecure} + defer tr.CloseIdleConnections() + + var body io.Reader = strings.NewReader(tt.body) + if tt.noContentLen { + body = struct{ io.Reader }{body} // just a Reader, hiding concrete type and other methods + } + req, err := http.NewRequest("POST", st.ts.URL, body) + if err != nil { + t.Fatalf("#%d: %v", i, err) + } + c := &http.Client{Transport: tr} + res, err := c.Do(req) + if err != nil { + t.Fatalf("#%d: %v", i, err) + } + defer res.Body.Close() + ri := <-gotc + if ri.err != nil { + t.Errorf("#%d: read error: %v", i, ri.err) + continue + } + if got := string(ri.slurp); got != tt.body { + t.Errorf("#%d: Read body mismatch.\n got: %q (len %d)\nwant: %q (len %d)", i, shortString(got), len(got), shortString(tt.body), len(tt.body)) + } + wantLen := int64(len(tt.body)) + if tt.noContentLen && tt.body != "" { + wantLen = -1 + } + if ri.req.ContentLength != wantLen { + t.Errorf("#%d. handler got ContentLength = %v; want %v", i, ri.req.ContentLength, wantLen) + } + } +} + +func shortString(v string) string { + const maxLen = 100 + if len(v) <= maxLen { + return v + } + return fmt.Sprintf("%v[...%d bytes omitted...]%v", v[:maxLen/2], len(v)-maxLen, v[len(v)-maxLen/2:]) +} + +func TestTransportDialTLS(t *testing.T) { + var mu sync.Mutex // guards following + var gotReq, didDial bool + + ts := newServerTester(t, + func(w http.ResponseWriter, r *http.Request) { + mu.Lock() + gotReq = true + mu.Unlock() + }, + optOnlyServer, + ) + defer ts.Close() + tr := &Transport{ + DialTLS: func(netw, addr string, cfg *tls.Config) (net.Conn, error) { + mu.Lock() + didDial = true + mu.Unlock() + cfg.InsecureSkipVerify = true + c, err := tls.Dial(netw, addr, cfg) + if err != nil { + return nil, err + } + return c, c.Handshake() + }, + } + defer tr.CloseIdleConnections() + client := &http.Client{Transport: tr} + res, err := client.Get(ts.ts.URL) + if err != nil { + t.Fatal(err) + } + res.Body.Close() + mu.Lock() + if !gotReq { + t.Error("didn't get request") + } + if !didDial { + t.Error("didn't use dial hook") + } +} + +func TestConfigureTransport(t *testing.T) { + t1 := &http.Transport{} + err := ConfigureTransport(t1) + if err == errTransportVersion { + t.Skip(err) + } + if err != nil { + t.Fatal(err) + } + if got := fmt.Sprintf("%#v", t1); !strings.Contains(got, `"h2"`) { + // Laziness, to avoid buildtags. + t.Errorf("stringification of HTTP/1 transport didn't contain \"h2\": %v", got) + } + wantNextProtos := []string{"h2", "http/1.1"} + if t1.TLSClientConfig == nil { + t.Errorf("nil t1.TLSClientConfig") + } else if !reflect.DeepEqual(t1.TLSClientConfig.NextProtos, wantNextProtos) { + t.Errorf("TLSClientConfig.NextProtos = %q; want %q", t1.TLSClientConfig.NextProtos, wantNextProtos) + } + if err := ConfigureTransport(t1); err == nil { + t.Error("unexpected success on second call to ConfigureTransport") + } + + // And does it work? + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + io.WriteString(w, r.Proto) + }, optOnlyServer) + defer st.Close() + + t1.TLSClientConfig.InsecureSkipVerify = true + c := &http.Client{Transport: t1} + res, err := c.Get(st.ts.URL) + if err != nil { + t.Fatal(err) + } + slurp, err := ioutil.ReadAll(res.Body) + if err != nil { + t.Fatal(err) + } + if got, want := string(slurp), "HTTP/2.0"; got != want { + t.Errorf("body = %q; want %q", got, want) + } +} + +type capitalizeReader struct { + r io.Reader +} + +func (cr capitalizeReader) Read(p []byte) (n int, err error) { + n, err = cr.r.Read(p) + for i, b := range p[:n] { + if b >= 'a' && b <= 'z' { + p[i] = b - ('a' - 'A') + } + } + return +} + +type flushWriter struct { + w io.Writer +} + +func (fw flushWriter) Write(p []byte) (n int, err error) { + n, err = fw.w.Write(p) + if f, ok := fw.w.(http.Flusher); ok { + f.Flush() + } + return +} + +type clientTester struct { + t *testing.T + tr *Transport + sc, cc net.Conn // server and client conn + fr *Framer // server's framer + client func() error + server func() error +} + +func newClientTester(t *testing.T) *clientTester { + var dialOnce struct { + sync.Mutex + dialed bool + } + ct := &clientTester{ + t: t, + } + ct.tr = &Transport{ + TLSClientConfig: tlsConfigInsecure, + DialTLS: func(network, addr string, cfg *tls.Config) (net.Conn, error) { + dialOnce.Lock() + defer dialOnce.Unlock() + if dialOnce.dialed { + return nil, errors.New("only one dial allowed in test mode") + } + dialOnce.dialed = true + return ct.cc, nil + }, + } + + ln := newLocalListener(t) + cc, err := net.Dial("tcp", ln.Addr().String()) + if err != nil { + t.Fatal(err) + + } + sc, err := ln.Accept() + if err != nil { + t.Fatal(err) + } + ln.Close() + ct.cc = cc + ct.sc = sc + ct.fr = NewFramer(sc, sc) + return ct +} + +func newLocalListener(t *testing.T) net.Listener { + ln, err := net.Listen("tcp4", "127.0.0.1:0") + if err == nil { + return ln + } + ln, err = net.Listen("tcp6", "[::1]:0") + if err != nil { + t.Fatal(err) + } + return ln +} + +func (ct *clientTester) greet(settings ...Setting) { + buf := make([]byte, len(ClientPreface)) + _, err := io.ReadFull(ct.sc, buf) + if err != nil { + ct.t.Fatalf("reading client preface: %v", err) + } + f, err := ct.fr.ReadFrame() + if err != nil { + ct.t.Fatalf("Reading client settings frame: %v", err) + } + if sf, ok := f.(*SettingsFrame); !ok { + ct.t.Fatalf("Wanted client settings frame; got %v", f) + _ = sf // stash it away? + } + if err := ct.fr.WriteSettings(settings...); err != nil { + ct.t.Fatal(err) + } + if err := ct.fr.WriteSettingsAck(); err != nil { + ct.t.Fatal(err) + } +} + +func (ct *clientTester) readNonSettingsFrame() (Frame, error) { + for { + f, err := ct.fr.ReadFrame() + if err != nil { + return nil, err + } + if _, ok := f.(*SettingsFrame); ok { + continue + } + return f, nil + } +} + +func (ct *clientTester) cleanup() { + ct.tr.CloseIdleConnections() +} + +func (ct *clientTester) run() { + errc := make(chan error, 2) + ct.start("client", errc, ct.client) + ct.start("server", errc, ct.server) + defer ct.cleanup() + for i := 0; i < 2; i++ { + if err := <-errc; err != nil { + ct.t.Error(err) + return + } + } +} + +func (ct *clientTester) start(which string, errc chan<- error, fn func() error) { + go func() { + finished := false + var err error + defer func() { + if !finished { + err = fmt.Errorf("%s goroutine didn't finish.", which) + } else if err != nil { + err = fmt.Errorf("%s: %v", which, err) + } + errc <- err + }() + err = fn() + finished = true + }() +} + +func (ct *clientTester) readFrame() (Frame, error) { + return readFrameTimeout(ct.fr, 2*time.Second) +} + +func (ct *clientTester) firstHeaders() (*HeadersFrame, error) { + for { + f, err := ct.readFrame() + if err != nil { + return nil, fmt.Errorf("ReadFrame while waiting for Headers: %v", err) + } + switch f.(type) { + case *WindowUpdateFrame, *SettingsFrame: + continue + } + hf, ok := f.(*HeadersFrame) + if !ok { + return nil, fmt.Errorf("Got %T; want HeadersFrame", f) + } + return hf, nil + } +} + +type countingReader struct { + n *int64 +} + +func (r countingReader) Read(p []byte) (n int, err error) { + for i := range p { + p[i] = byte(i) + } + atomic.AddInt64(r.n, int64(len(p))) + return len(p), err +} + +func TestTransportReqBodyAfterResponse_200(t *testing.T) { testTransportReqBodyAfterResponse(t, 200) } +func TestTransportReqBodyAfterResponse_403(t *testing.T) { testTransportReqBodyAfterResponse(t, 403) } + +func testTransportReqBodyAfterResponse(t *testing.T, status int) { + const bodySize = 10 << 20 + clientDone := make(chan struct{}) + ct := newClientTester(t) + ct.client = func() error { + defer ct.cc.(*net.TCPConn).CloseWrite() + defer close(clientDone) + + var n int64 // atomic + req, err := http.NewRequest("PUT", "https://dummy.tld/", io.LimitReader(countingReader{&n}, bodySize)) + if err != nil { + return err + } + res, err := ct.tr.RoundTrip(req) + if err != nil { + return fmt.Errorf("RoundTrip: %v", err) + } + defer res.Body.Close() + if res.StatusCode != status { + return fmt.Errorf("status code = %v; want %v", res.StatusCode, status) + } + slurp, err := ioutil.ReadAll(res.Body) + if err != nil { + return fmt.Errorf("Slurp: %v", err) + } + if len(slurp) > 0 { + return fmt.Errorf("unexpected body: %q", slurp) + } + if status == 200 { + if got := atomic.LoadInt64(&n); got != bodySize { + return fmt.Errorf("For 200 response, Transport wrote %d bytes; want %d", got, bodySize) + } + } else { + if got := atomic.LoadInt64(&n); got == 0 || got >= bodySize { + return fmt.Errorf("For %d response, Transport wrote %d bytes; want (0,%d) exclusive", status, got, bodySize) + } + } + return nil + } + ct.server = func() error { + ct.greet() + var buf bytes.Buffer + enc := hpack.NewEncoder(&buf) + var dataRecv int64 + var closed bool + for { + f, err := ct.fr.ReadFrame() + if err != nil { + select { + case <-clientDone: + // If the client's done, it + // will have reported any + // errors on its side. + return nil + default: + return err + } + } + //println(fmt.Sprintf("server got frame: %v", f)) + switch f := f.(type) { + case *WindowUpdateFrame, *SettingsFrame: + case *HeadersFrame: + if !f.HeadersEnded() { + return fmt.Errorf("headers should have END_HEADERS be ended: %v", f) + } + if f.StreamEnded() { + return fmt.Errorf("headers contains END_STREAM unexpectedly: %v", f) + } + case *DataFrame: + dataLen := len(f.Data()) + if dataLen > 0 { + if dataRecv == 0 { + enc.WriteField(hpack.HeaderField{Name: ":status", Value: strconv.Itoa(status)}) + ct.fr.WriteHeaders(HeadersFrameParam{ + StreamID: f.StreamID, + EndHeaders: true, + EndStream: false, + BlockFragment: buf.Bytes(), + }) + } + if err := ct.fr.WriteWindowUpdate(0, uint32(dataLen)); err != nil { + return err + } + if err := ct.fr.WriteWindowUpdate(f.StreamID, uint32(dataLen)); err != nil { + return err + } + } + dataRecv += int64(dataLen) + + if !closed && ((status != 200 && dataRecv > 0) || + (status == 200 && dataRecv == bodySize)) { + closed = true + if err := ct.fr.WriteData(f.StreamID, true, nil); err != nil { + return err + } + } + default: + return fmt.Errorf("Unexpected client frame %v", f) + } + } + } + ct.run() +} + +// See golang.org/issue/13444 +func TestTransportFullDuplex(t *testing.T) { + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(200) // redundant but for clarity + w.(http.Flusher).Flush() + io.Copy(flushWriter{w}, capitalizeReader{r.Body}) + fmt.Fprintf(w, "bye.\n") + }, optOnlyServer) + defer st.Close() + + tr := &Transport{TLSClientConfig: tlsConfigInsecure} + defer tr.CloseIdleConnections() + c := &http.Client{Transport: tr} + + pr, pw := io.Pipe() + req, err := http.NewRequest("PUT", st.ts.URL, ioutil.NopCloser(pr)) + if err != nil { + t.Fatal(err) + } + req.ContentLength = -1 + res, err := c.Do(req) + if err != nil { + t.Fatal(err) + } + defer res.Body.Close() + if res.StatusCode != 200 { + t.Fatalf("StatusCode = %v; want %v", res.StatusCode, 200) + } + bs := bufio.NewScanner(res.Body) + want := func(v string) { + if !bs.Scan() { + t.Fatalf("wanted to read %q but Scan() = false, err = %v", v, bs.Err()) + } + } + write := func(v string) { + _, err := io.WriteString(pw, v) + if err != nil { + t.Fatalf("pipe write: %v", err) + } + } + write("foo\n") + want("FOO") + write("bar\n") + want("BAR") + pw.Close() + want("bye.") + if err := bs.Err(); err != nil { + t.Fatal(err) + } +} + +func TestTransportConnectRequest(t *testing.T) { + gotc := make(chan *http.Request, 1) + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + gotc <- r + }, optOnlyServer) + defer st.Close() + + u, err := url.Parse(st.ts.URL) + if err != nil { + t.Fatal(err) + } + + tr := &Transport{TLSClientConfig: tlsConfigInsecure} + defer tr.CloseIdleConnections() + c := &http.Client{Transport: tr} + + tests := []struct { + req *http.Request + want string + }{ + { + req: &http.Request{ + Method: "CONNECT", + Header: http.Header{}, + URL: u, + }, + want: u.Host, + }, + { + req: &http.Request{ + Method: "CONNECT", + Header: http.Header{}, + URL: u, + Host: "example.com:123", + }, + want: "example.com:123", + }, + } + + for i, tt := range tests { + res, err := c.Do(tt.req) + if err != nil { + t.Errorf("%d. RoundTrip = %v", i, err) + continue + } + res.Body.Close() + req := <-gotc + if req.Method != "CONNECT" { + t.Errorf("method = %q; want CONNECT", req.Method) + } + if req.Host != tt.want { + t.Errorf("Host = %q; want %q", req.Host, tt.want) + } + if req.URL.Host != tt.want { + t.Errorf("URL.Host = %q; want %q", req.URL.Host, tt.want) + } + } +} + +type headerType int + +const ( + noHeader headerType = iota // omitted + oneHeader + splitHeader // broken into continuation on purpose +) + +const ( + f0 = noHeader + f1 = oneHeader + f2 = splitHeader + d0 = false + d1 = true +) + +// Test all 36 combinations of response frame orders: +// (3 ways of 100-continue) * (2 ways of headers) * (2 ways of data) * (3 ways of trailers):func TestTransportResponsePattern_00f0(t *testing.T) { testTransportResponsePattern(h0, h1, false, h0) } +// Generated by http://play.golang.org/p/SScqYKJYXd +func TestTransportResPattern_c0h1d0t0(t *testing.T) { testTransportResPattern(t, f0, f1, d0, f0) } +func TestTransportResPattern_c0h1d0t1(t *testing.T) { testTransportResPattern(t, f0, f1, d0, f1) } +func TestTransportResPattern_c0h1d0t2(t *testing.T) { testTransportResPattern(t, f0, f1, d0, f2) } +func TestTransportResPattern_c0h1d1t0(t *testing.T) { testTransportResPattern(t, f0, f1, d1, f0) } +func TestTransportResPattern_c0h1d1t1(t *testing.T) { testTransportResPattern(t, f0, f1, d1, f1) } +func TestTransportResPattern_c0h1d1t2(t *testing.T) { testTransportResPattern(t, f0, f1, d1, f2) } +func TestTransportResPattern_c0h2d0t0(t *testing.T) { testTransportResPattern(t, f0, f2, d0, f0) } +func TestTransportResPattern_c0h2d0t1(t *testing.T) { testTransportResPattern(t, f0, f2, d0, f1) } +func TestTransportResPattern_c0h2d0t2(t *testing.T) { testTransportResPattern(t, f0, f2, d0, f2) } +func TestTransportResPattern_c0h2d1t0(t *testing.T) { testTransportResPattern(t, f0, f2, d1, f0) } +func TestTransportResPattern_c0h2d1t1(t *testing.T) { testTransportResPattern(t, f0, f2, d1, f1) } +func TestTransportResPattern_c0h2d1t2(t *testing.T) { testTransportResPattern(t, f0, f2, d1, f2) } +func TestTransportResPattern_c1h1d0t0(t *testing.T) { testTransportResPattern(t, f1, f1, d0, f0) } +func TestTransportResPattern_c1h1d0t1(t *testing.T) { testTransportResPattern(t, f1, f1, d0, f1) } +func TestTransportResPattern_c1h1d0t2(t *testing.T) { testTransportResPattern(t, f1, f1, d0, f2) } +func TestTransportResPattern_c1h1d1t0(t *testing.T) { testTransportResPattern(t, f1, f1, d1, f0) } +func TestTransportResPattern_c1h1d1t1(t *testing.T) { testTransportResPattern(t, f1, f1, d1, f1) } +func TestTransportResPattern_c1h1d1t2(t *testing.T) { testTransportResPattern(t, f1, f1, d1, f2) } +func TestTransportResPattern_c1h2d0t0(t *testing.T) { testTransportResPattern(t, f1, f2, d0, f0) } +func TestTransportResPattern_c1h2d0t1(t *testing.T) { testTransportResPattern(t, f1, f2, d0, f1) } +func TestTransportResPattern_c1h2d0t2(t *testing.T) { testTransportResPattern(t, f1, f2, d0, f2) } +func TestTransportResPattern_c1h2d1t0(t *testing.T) { testTransportResPattern(t, f1, f2, d1, f0) } +func TestTransportResPattern_c1h2d1t1(t *testing.T) { testTransportResPattern(t, f1, f2, d1, f1) } +func TestTransportResPattern_c1h2d1t2(t *testing.T) { testTransportResPattern(t, f1, f2, d1, f2) } +func TestTransportResPattern_c2h1d0t0(t *testing.T) { testTransportResPattern(t, f2, f1, d0, f0) } +func TestTransportResPattern_c2h1d0t1(t *testing.T) { testTransportResPattern(t, f2, f1, d0, f1) } +func TestTransportResPattern_c2h1d0t2(t *testing.T) { testTransportResPattern(t, f2, f1, d0, f2) } +func TestTransportResPattern_c2h1d1t0(t *testing.T) { testTransportResPattern(t, f2, f1, d1, f0) } +func TestTransportResPattern_c2h1d1t1(t *testing.T) { testTransportResPattern(t, f2, f1, d1, f1) } +func TestTransportResPattern_c2h1d1t2(t *testing.T) { testTransportResPattern(t, f2, f1, d1, f2) } +func TestTransportResPattern_c2h2d0t0(t *testing.T) { testTransportResPattern(t, f2, f2, d0, f0) } +func TestTransportResPattern_c2h2d0t1(t *testing.T) { testTransportResPattern(t, f2, f2, d0, f1) } +func TestTransportResPattern_c2h2d0t2(t *testing.T) { testTransportResPattern(t, f2, f2, d0, f2) } +func TestTransportResPattern_c2h2d1t0(t *testing.T) { testTransportResPattern(t, f2, f2, d1, f0) } +func TestTransportResPattern_c2h2d1t1(t *testing.T) { testTransportResPattern(t, f2, f2, d1, f1) } +func TestTransportResPattern_c2h2d1t2(t *testing.T) { testTransportResPattern(t, f2, f2, d1, f2) } + +func testTransportResPattern(t *testing.T, expect100Continue, resHeader headerType, withData bool, trailers headerType) { + const reqBody = "some request body" + const resBody = "some response body" + + if resHeader == noHeader { + // TODO: test 100-continue followed by immediate + // server stream reset, without headers in the middle? + panic("invalid combination") + } + + ct := newClientTester(t) + ct.client = func() error { + req, _ := http.NewRequest("POST", "https://dummy.tld/", strings.NewReader(reqBody)) + if expect100Continue != noHeader { + req.Header.Set("Expect", "100-continue") + } + res, err := ct.tr.RoundTrip(req) + if err != nil { + return fmt.Errorf("RoundTrip: %v", err) + } + defer res.Body.Close() + if res.StatusCode != 200 { + return fmt.Errorf("status code = %v; want 200", res.StatusCode) + } + slurp, err := ioutil.ReadAll(res.Body) + if err != nil { + return fmt.Errorf("Slurp: %v", err) + } + wantBody := resBody + if !withData { + wantBody = "" + } + if string(slurp) != wantBody { + return fmt.Errorf("body = %q; want %q", slurp, wantBody) + } + if trailers == noHeader { + if len(res.Trailer) > 0 { + t.Errorf("Trailer = %v; want none", res.Trailer) + } + } else { + want := http.Header{"Some-Trailer": {"some-value"}} + if !reflect.DeepEqual(res.Trailer, want) { + t.Errorf("Trailer = %v; want %v", res.Trailer, want) + } + } + return nil + } + ct.server = func() error { + ct.greet() + var buf bytes.Buffer + enc := hpack.NewEncoder(&buf) + + for { + f, err := ct.fr.ReadFrame() + if err != nil { + return err + } + endStream := false + send := func(mode headerType) { + hbf := buf.Bytes() + switch mode { + case oneHeader: + ct.fr.WriteHeaders(HeadersFrameParam{ + StreamID: f.Header().StreamID, + EndHeaders: true, + EndStream: endStream, + BlockFragment: hbf, + }) + case splitHeader: + if len(hbf) < 2 { + panic("too small") + } + ct.fr.WriteHeaders(HeadersFrameParam{ + StreamID: f.Header().StreamID, + EndHeaders: false, + EndStream: endStream, + BlockFragment: hbf[:1], + }) + ct.fr.WriteContinuation(f.Header().StreamID, true, hbf[1:]) + default: + panic("bogus mode") + } + } + switch f := f.(type) { + case *WindowUpdateFrame, *SettingsFrame: + case *DataFrame: + if !f.StreamEnded() { + // No need to send flow control tokens. The test request body is tiny. + continue + } + // Response headers (1+ frames; 1 or 2 in this test, but never 0) + { + buf.Reset() + enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"}) + enc.WriteField(hpack.HeaderField{Name: "x-foo", Value: "blah"}) + enc.WriteField(hpack.HeaderField{Name: "x-bar", Value: "more"}) + if trailers != noHeader { + enc.WriteField(hpack.HeaderField{Name: "trailer", Value: "some-trailer"}) + } + endStream = withData == false && trailers == noHeader + send(resHeader) + } + if withData { + endStream = trailers == noHeader + ct.fr.WriteData(f.StreamID, endStream, []byte(resBody)) + } + if trailers != noHeader { + endStream = true + buf.Reset() + enc.WriteField(hpack.HeaderField{Name: "some-trailer", Value: "some-value"}) + send(trailers) + } + if endStream { + return nil + } + case *HeadersFrame: + if expect100Continue != noHeader { + buf.Reset() + enc.WriteField(hpack.HeaderField{Name: ":status", Value: "100"}) + send(expect100Continue) + } + } + } + } + ct.run() +} + +func TestTransportReceiveUndeclaredTrailer(t *testing.T) { + ct := newClientTester(t) + ct.client = func() error { + req, _ := http.NewRequest("GET", "https://dummy.tld/", nil) + res, err := ct.tr.RoundTrip(req) + if err != nil { + return fmt.Errorf("RoundTrip: %v", err) + } + defer res.Body.Close() + if res.StatusCode != 200 { + return fmt.Errorf("status code = %v; want 200", res.StatusCode) + } + slurp, err := ioutil.ReadAll(res.Body) + if err != nil { + return fmt.Errorf("res.Body ReadAll error = %q, %v; want %v", slurp, err, nil) + } + if len(slurp) > 0 { + return fmt.Errorf("body = %q; want nothing", slurp) + } + if _, ok := res.Trailer["Some-Trailer"]; !ok { + return fmt.Errorf("expected Some-Trailer") + } + return nil + } + ct.server = func() error { + ct.greet() + + var n int + var hf *HeadersFrame + for hf == nil && n < 10 { + f, err := ct.fr.ReadFrame() + if err != nil { + return err + } + hf, _ = f.(*HeadersFrame) + n++ + } + + var buf bytes.Buffer + enc := hpack.NewEncoder(&buf) + + // send headers without Trailer header + enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"}) + ct.fr.WriteHeaders(HeadersFrameParam{ + StreamID: hf.StreamID, + EndHeaders: true, + EndStream: false, + BlockFragment: buf.Bytes(), + }) + + // send trailers + buf.Reset() + enc.WriteField(hpack.HeaderField{Name: "some-trailer", Value: "I'm an undeclared Trailer!"}) + ct.fr.WriteHeaders(HeadersFrameParam{ + StreamID: hf.StreamID, + EndHeaders: true, + EndStream: true, + BlockFragment: buf.Bytes(), + }) + return nil + } + ct.run() +} + +func TestTransportInvalidTrailer_Pseudo1(t *testing.T) { + testTransportInvalidTrailer_Pseudo(t, oneHeader) +} +func TestTransportInvalidTrailer_Pseudo2(t *testing.T) { + testTransportInvalidTrailer_Pseudo(t, splitHeader) +} +func testTransportInvalidTrailer_Pseudo(t *testing.T, trailers headerType) { + testInvalidTrailer(t, trailers, pseudoHeaderError(":colon"), func(enc *hpack.Encoder) { + enc.WriteField(hpack.HeaderField{Name: ":colon", Value: "foo"}) + enc.WriteField(hpack.HeaderField{Name: "foo", Value: "bar"}) + }) +} + +func TestTransportInvalidTrailer_Capital1(t *testing.T) { + testTransportInvalidTrailer_Capital(t, oneHeader) +} +func TestTransportInvalidTrailer_Capital2(t *testing.T) { + testTransportInvalidTrailer_Capital(t, splitHeader) +} +func testTransportInvalidTrailer_Capital(t *testing.T, trailers headerType) { + testInvalidTrailer(t, trailers, headerFieldNameError("Capital"), func(enc *hpack.Encoder) { + enc.WriteField(hpack.HeaderField{Name: "foo", Value: "bar"}) + enc.WriteField(hpack.HeaderField{Name: "Capital", Value: "bad"}) + }) +} +func TestTransportInvalidTrailer_EmptyFieldName(t *testing.T) { + testInvalidTrailer(t, oneHeader, headerFieldNameError(""), func(enc *hpack.Encoder) { + enc.WriteField(hpack.HeaderField{Name: "", Value: "bad"}) + }) +} +func TestTransportInvalidTrailer_BinaryFieldValue(t *testing.T) { + testInvalidTrailer(t, oneHeader, headerFieldValueError("has\nnewline"), func(enc *hpack.Encoder) { + enc.WriteField(hpack.HeaderField{Name: "x", Value: "has\nnewline"}) + }) +} + +func testInvalidTrailer(t *testing.T, trailers headerType, wantErr error, writeTrailer func(*hpack.Encoder)) { + ct := newClientTester(t) + ct.client = func() error { + req, _ := http.NewRequest("GET", "https://dummy.tld/", nil) + res, err := ct.tr.RoundTrip(req) + if err != nil { + return fmt.Errorf("RoundTrip: %v", err) + } + defer res.Body.Close() + if res.StatusCode != 200 { + return fmt.Errorf("status code = %v; want 200", res.StatusCode) + } + slurp, err := ioutil.ReadAll(res.Body) + se, ok := err.(StreamError) + if !ok || se.Cause != wantErr { + return fmt.Errorf("res.Body ReadAll error = %q, %#v; want StreamError with cause %T, %#v", slurp, err, wantErr, wantErr) + } + if len(slurp) > 0 { + return fmt.Errorf("body = %q; want nothing", slurp) + } + return nil + } + ct.server = func() error { + ct.greet() + var buf bytes.Buffer + enc := hpack.NewEncoder(&buf) + + for { + f, err := ct.fr.ReadFrame() + if err != nil { + return err + } + switch f := f.(type) { + case *HeadersFrame: + var endStream bool + send := func(mode headerType) { + hbf := buf.Bytes() + switch mode { + case oneHeader: + ct.fr.WriteHeaders(HeadersFrameParam{ + StreamID: f.StreamID, + EndHeaders: true, + EndStream: endStream, + BlockFragment: hbf, + }) + case splitHeader: + if len(hbf) < 2 { + panic("too small") + } + ct.fr.WriteHeaders(HeadersFrameParam{ + StreamID: f.StreamID, + EndHeaders: false, + EndStream: endStream, + BlockFragment: hbf[:1], + }) + ct.fr.WriteContinuation(f.StreamID, true, hbf[1:]) + default: + panic("bogus mode") + } + } + // Response headers (1+ frames; 1 or 2 in this test, but never 0) + { + buf.Reset() + enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"}) + enc.WriteField(hpack.HeaderField{Name: "trailer", Value: "declared"}) + endStream = false + send(oneHeader) + } + // Trailers: + { + endStream = true + buf.Reset() + writeTrailer(enc) + send(trailers) + } + return nil + } + } + } + ct.run() +} + +// headerListSize returns the HTTP2 header list size of h. +// http://httpwg.org/specs/rfc7540.html#SETTINGS_MAX_HEADER_LIST_SIZE +// http://httpwg.org/specs/rfc7540.html#MaxHeaderBlock +func headerListSize(h http.Header) (size uint32) { + for k, vv := range h { + for _, v := range vv { + hf := hpack.HeaderField{Name: k, Value: v} + size += hf.Size() + } + } + return size +} + +// padHeaders adds data to an http.Header until headerListSize(h) == +// limit. Due to the way header list sizes are calculated, padHeaders +// cannot add fewer than len("Pad-Headers") + 32 bytes to h, and will +// call t.Fatal if asked to do so. PadHeaders first reserves enough +// space for an empty "Pad-Headers" key, then adds as many copies of +// filler as possible. Any remaining bytes necessary to push the +// header list size up to limit are added to h["Pad-Headers"]. +func padHeaders(t *testing.T, h http.Header, limit uint64, filler string) { + if limit > 0xffffffff { + t.Fatalf("padHeaders: refusing to pad to more than 2^32-1 bytes. limit = %v", limit) + } + hf := hpack.HeaderField{Name: "Pad-Headers", Value: ""} + minPadding := uint64(hf.Size()) + size := uint64(headerListSize(h)) + + minlimit := size + minPadding + if limit < minlimit { + t.Fatalf("padHeaders: limit %v < %v", limit, minlimit) + } + + // Use a fixed-width format for name so that fieldSize + // remains constant. + nameFmt := "Pad-Headers-%06d" + hf = hpack.HeaderField{Name: fmt.Sprintf(nameFmt, 1), Value: filler} + fieldSize := uint64(hf.Size()) + + // Add as many complete filler values as possible, leaving + // room for at least one empty "Pad-Headers" key. + limit = limit - minPadding + for i := 0; size+fieldSize < limit; i++ { + name := fmt.Sprintf(nameFmt, i) + h.Add(name, filler) + size += fieldSize + } + + // Add enough bytes to reach limit. + remain := limit - size + lastValue := strings.Repeat("*", int(remain)) + h.Add("Pad-Headers", lastValue) +} + +func TestPadHeaders(t *testing.T) { + check := func(h http.Header, limit uint32, fillerLen int) { + if h == nil { + h = make(http.Header) + } + filler := strings.Repeat("f", fillerLen) + padHeaders(t, h, uint64(limit), filler) + gotSize := headerListSize(h) + if gotSize != limit { + t.Errorf("Got size = %v; want %v", gotSize, limit) + } + } + // Try all possible combinations for small fillerLen and limit. + hf := hpack.HeaderField{Name: "Pad-Headers", Value: ""} + minLimit := hf.Size() + for limit := minLimit; limit <= 128; limit++ { + for fillerLen := 0; uint32(fillerLen) <= limit; fillerLen++ { + check(nil, limit, fillerLen) + } + } + + // Try a few tests with larger limits, plus cumulative + // tests. Since these tests are cumulative, tests[i+1].limit + // must be >= tests[i].limit + minLimit. See the comment on + // padHeaders for more info on why the limit arg has this + // restriction. + tests := []struct { + fillerLen int + limit uint32 + }{ + { + fillerLen: 64, + limit: 1024, + }, + { + fillerLen: 1024, + limit: 1286, + }, + { + fillerLen: 256, + limit: 2048, + }, + { + fillerLen: 1024, + limit: 10 * 1024, + }, + { + fillerLen: 1023, + limit: 11 * 1024, + }, + } + h := make(http.Header) + for _, tc := range tests { + check(nil, tc.limit, tc.fillerLen) + check(h, tc.limit, tc.fillerLen) + } +} + +func TestTransportChecksRequestHeaderListSize(t *testing.T) { + st := newServerTester(t, + func(w http.ResponseWriter, r *http.Request) { + // Consume body & force client to send + // trailers before writing response. + // ioutil.ReadAll returns non-nil err for + // requests that attempt to send greater than + // maxHeaderListSize bytes of trailers, since + // those requests generate a stream reset. + ioutil.ReadAll(r.Body) + r.Body.Close() + }, + func(ts *httptest.Server) { + ts.Config.MaxHeaderBytes = 16 << 10 + }, + optOnlyServer, + optQuiet, + ) + defer st.Close() + + tr := &Transport{TLSClientConfig: tlsConfigInsecure} + defer tr.CloseIdleConnections() + + checkRoundTrip := func(req *http.Request, wantErr error, desc string) { + res, err := tr.RoundTrip(req) + if err != wantErr { + if res != nil { + res.Body.Close() + } + t.Errorf("%v: RoundTrip err = %v; want %v", desc, err, wantErr) + return + } + if err == nil { + if res == nil { + t.Errorf("%v: response nil; want non-nil.", desc) + return + } + defer res.Body.Close() + if res.StatusCode != http.StatusOK { + t.Errorf("%v: response status = %v; want %v", desc, res.StatusCode, http.StatusOK) + } + return + } + if res != nil { + t.Errorf("%v: RoundTrip err = %v but response non-nil", desc, err) + } + } + headerListSizeForRequest := func(req *http.Request) (size uint64) { + contentLen := actualContentLength(req) + trailers, err := commaSeparatedTrailers(req) + if err != nil { + t.Fatalf("headerListSizeForRequest: %v", err) + } + cc := &ClientConn{peerMaxHeaderListSize: 0xffffffffffffffff} + cc.henc = hpack.NewEncoder(&cc.hbuf) + cc.mu.Lock() + hdrs, err := cc.encodeHeaders(req, true, trailers, contentLen) + cc.mu.Unlock() + if err != nil { + t.Fatalf("headerListSizeForRequest: %v", err) + } + hpackDec := hpack.NewDecoder(initialHeaderTableSize, func(hf hpack.HeaderField) { + size += uint64(hf.Size()) + }) + if len(hdrs) > 0 { + if _, err := hpackDec.Write(hdrs); err != nil { + t.Fatalf("headerListSizeForRequest: %v", err) + } + } + return size + } + // Create a new Request for each test, rather than reusing the + // same Request, to avoid a race when modifying req.Headers. + // See https://github.com/golang/go/issues/21316 + newRequest := func() *http.Request { + // Body must be non-nil to enable writing trailers. + body := strings.NewReader("hello") + req, err := http.NewRequest("POST", st.ts.URL, body) + if err != nil { + t.Fatalf("newRequest: NewRequest: %v", err) + } + return req + } + + // Make an arbitrary request to ensure we get the server's + // settings frame and initialize peerMaxHeaderListSize. + req := newRequest() + checkRoundTrip(req, nil, "Initial request") + + // Get the ClientConn associated with the request and validate + // peerMaxHeaderListSize. + addr := authorityAddr(req.URL.Scheme, req.URL.Host) + cc, err := tr.connPool().GetClientConn(req, addr) + if err != nil { + t.Fatalf("GetClientConn: %v", err) + } + cc.mu.Lock() + peerSize := cc.peerMaxHeaderListSize + cc.mu.Unlock() + st.scMu.Lock() + wantSize := uint64(st.sc.maxHeaderListSize()) + st.scMu.Unlock() + if peerSize != wantSize { + t.Errorf("peerMaxHeaderListSize = %v; want %v", peerSize, wantSize) + } + + // Sanity check peerSize. (*serverConn) maxHeaderListSize adds + // 320 bytes of padding. + wantHeaderBytes := uint64(st.ts.Config.MaxHeaderBytes) + 320 + if peerSize != wantHeaderBytes { + t.Errorf("peerMaxHeaderListSize = %v; want %v.", peerSize, wantHeaderBytes) + } + + // Pad headers & trailers, but stay under peerSize. + req = newRequest() + req.Header = make(http.Header) + req.Trailer = make(http.Header) + filler := strings.Repeat("*", 1024) + padHeaders(t, req.Trailer, peerSize, filler) + // cc.encodeHeaders adds some default headers to the request, + // so we need to leave room for those. + defaultBytes := headerListSizeForRequest(req) + padHeaders(t, req.Header, peerSize-defaultBytes, filler) + checkRoundTrip(req, nil, "Headers & Trailers under limit") + + // Add enough header bytes to push us over peerSize. + req = newRequest() + req.Header = make(http.Header) + padHeaders(t, req.Header, peerSize, filler) + checkRoundTrip(req, errRequestHeaderListSize, "Headers over limit") + + // Push trailers over the limit. + req = newRequest() + req.Trailer = make(http.Header) + padHeaders(t, req.Trailer, peerSize+1, filler) + checkRoundTrip(req, errRequestHeaderListSize, "Trailers over limit") + + // Send headers with a single large value. + req = newRequest() + filler = strings.Repeat("*", int(peerSize)) + req.Header = make(http.Header) + req.Header.Set("Big", filler) + checkRoundTrip(req, errRequestHeaderListSize, "Single large header") + + // Send trailers with a single large value. + req = newRequest() + req.Trailer = make(http.Header) + req.Trailer.Set("Big", filler) + checkRoundTrip(req, errRequestHeaderListSize, "Single large trailer") +} + +func TestTransportChecksResponseHeaderListSize(t *testing.T) { + ct := newClientTester(t) + ct.client = func() error { + req, _ := http.NewRequest("GET", "https://dummy.tld/", nil) + res, err := ct.tr.RoundTrip(req) + if err != errResponseHeaderListSize { + if res != nil { + res.Body.Close() + } + size := int64(0) + for k, vv := range res.Header { + for _, v := range vv { + size += int64(len(k)) + int64(len(v)) + 32 + } + } + return fmt.Errorf("RoundTrip Error = %v (and %d bytes of response headers); want errResponseHeaderListSize", err, size) + } + return nil + } + ct.server = func() error { + ct.greet() + var buf bytes.Buffer + enc := hpack.NewEncoder(&buf) + + for { + f, err := ct.fr.ReadFrame() + if err != nil { + return err + } + switch f := f.(type) { + case *HeadersFrame: + enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"}) + large := strings.Repeat("a", 1<<10) + for i := 0; i < 5042; i++ { + enc.WriteField(hpack.HeaderField{Name: large, Value: large}) + } + if size, want := buf.Len(), 6329; size != want { + // Note: this number might change if + // our hpack implementation + // changes. That's fine. This is + // just a sanity check that our + // response can fit in a single + // header block fragment frame. + return fmt.Errorf("encoding over 10MB of duplicate keypairs took %d bytes; expected %d", size, want) + } + ct.fr.WriteHeaders(HeadersFrameParam{ + StreamID: f.StreamID, + EndHeaders: true, + EndStream: true, + BlockFragment: buf.Bytes(), + }) + return nil + } + } + } + ct.run() +} + +// Test that the the Transport returns a typed error from Response.Body.Read calls +// when the server sends an error. (here we use a panic, since that should generate +// a stream error, but others like cancel should be similar) +func TestTransportBodyReadErrorType(t *testing.T) { + doPanic := make(chan bool, 1) + st := newServerTester(t, + func(w http.ResponseWriter, r *http.Request) { + w.(http.Flusher).Flush() // force headers out + <-doPanic + panic("boom") + }, + optOnlyServer, + optQuiet, + ) + defer st.Close() + + tr := &Transport{TLSClientConfig: tlsConfigInsecure} + defer tr.CloseIdleConnections() + c := &http.Client{Transport: tr} + + res, err := c.Get(st.ts.URL) + if err != nil { + t.Fatal(err) + } + defer res.Body.Close() + doPanic <- true + buf := make([]byte, 100) + n, err := res.Body.Read(buf) + want := StreamError{StreamID: 0x1, Code: 0x2} + if !reflect.DeepEqual(want, err) { + t.Errorf("Read = %v, %#v; want error %#v", n, err, want) + } +} + +// golang.org/issue/13924 +// This used to fail after many iterations, especially with -race: +// go test -v -run=TestTransportDoubleCloseOnWriteError -count=500 -race +func TestTransportDoubleCloseOnWriteError(t *testing.T) { + var ( + mu sync.Mutex + conn net.Conn // to close if set + ) + + st := newServerTester(t, + func(w http.ResponseWriter, r *http.Request) { + mu.Lock() + defer mu.Unlock() + if conn != nil { + conn.Close() + } + }, + optOnlyServer, + ) + defer st.Close() + + tr := &Transport{ + TLSClientConfig: tlsConfigInsecure, + DialTLS: func(network, addr string, cfg *tls.Config) (net.Conn, error) { + tc, err := tls.Dial(network, addr, cfg) + if err != nil { + return nil, err + } + mu.Lock() + defer mu.Unlock() + conn = tc + return tc, nil + }, + } + defer tr.CloseIdleConnections() + c := &http.Client{Transport: tr} + c.Get(st.ts.URL) +} + +// Test that the http1 Transport.DisableKeepAlives option is respected +// and connections are closed as soon as idle. +// See golang.org/issue/14008 +func TestTransportDisableKeepAlives(t *testing.T) { + st := newServerTester(t, + func(w http.ResponseWriter, r *http.Request) { + io.WriteString(w, "hi") + }, + optOnlyServer, + ) + defer st.Close() + + connClosed := make(chan struct{}) // closed on tls.Conn.Close + tr := &Transport{ + t1: &http.Transport{ + DisableKeepAlives: true, + }, + TLSClientConfig: tlsConfigInsecure, + DialTLS: func(network, addr string, cfg *tls.Config) (net.Conn, error) { + tc, err := tls.Dial(network, addr, cfg) + if err != nil { + return nil, err + } + return ¬eCloseConn{Conn: tc, closefn: func() { close(connClosed) }}, nil + }, + } + c := &http.Client{Transport: tr} + res, err := c.Get(st.ts.URL) + if err != nil { + t.Fatal(err) + } + if _, err := ioutil.ReadAll(res.Body); err != nil { + t.Fatal(err) + } + defer res.Body.Close() + + select { + case <-connClosed: + case <-time.After(1 * time.Second): + t.Errorf("timeout") + } + +} + +// Test concurrent requests with Transport.DisableKeepAlives. We can share connections, +// but when things are totally idle, it still needs to close. +func TestTransportDisableKeepAlives_Concurrency(t *testing.T) { + const D = 25 * time.Millisecond + st := newServerTester(t, + func(w http.ResponseWriter, r *http.Request) { + time.Sleep(D) + io.WriteString(w, "hi") + }, + optOnlyServer, + ) + defer st.Close() + + var dials int32 + var conns sync.WaitGroup + tr := &Transport{ + t1: &http.Transport{ + DisableKeepAlives: true, + }, + TLSClientConfig: tlsConfigInsecure, + DialTLS: func(network, addr string, cfg *tls.Config) (net.Conn, error) { + tc, err := tls.Dial(network, addr, cfg) + if err != nil { + return nil, err + } + atomic.AddInt32(&dials, 1) + conns.Add(1) + return ¬eCloseConn{Conn: tc, closefn: func() { conns.Done() }}, nil + }, + } + c := &http.Client{Transport: tr} + var reqs sync.WaitGroup + const N = 20 + for i := 0; i < N; i++ { + reqs.Add(1) + if i == N-1 { + // For the final request, try to make all the + // others close. This isn't verified in the + // count, other than the Log statement, since + // it's so timing dependent. This test is + // really to make sure we don't interrupt a + // valid request. + time.Sleep(D * 2) + } + go func() { + defer reqs.Done() + res, err := c.Get(st.ts.URL) + if err != nil { + t.Error(err) + return + } + if _, err := ioutil.ReadAll(res.Body); err != nil { + t.Error(err) + return + } + res.Body.Close() + }() + } + reqs.Wait() + conns.Wait() + t.Logf("did %d dials, %d requests", atomic.LoadInt32(&dials), N) +} + +type noteCloseConn struct { + net.Conn + onceClose sync.Once + closefn func() +} + +func (c *noteCloseConn) Close() error { + c.onceClose.Do(c.closefn) + return c.Conn.Close() +} + +func isTimeout(err error) bool { + switch err := err.(type) { + case nil: + return false + case *url.Error: + return isTimeout(err.Err) + case net.Error: + return err.Timeout() + } + return false +} + +// Test that the http1 Transport.ResponseHeaderTimeout option and cancel is sent. +func TestTransportResponseHeaderTimeout_NoBody(t *testing.T) { + testTransportResponseHeaderTimeout(t, false) +} +func TestTransportResponseHeaderTimeout_Body(t *testing.T) { + testTransportResponseHeaderTimeout(t, true) +} + +func testTransportResponseHeaderTimeout(t *testing.T, body bool) { + ct := newClientTester(t) + ct.tr.t1 = &http.Transport{ + ResponseHeaderTimeout: 5 * time.Millisecond, + } + ct.client = func() error { + c := &http.Client{Transport: ct.tr} + var err error + var n int64 + const bodySize = 4 << 20 + if body { + _, err = c.Post("https://dummy.tld/", "text/foo", io.LimitReader(countingReader{&n}, bodySize)) + } else { + _, err = c.Get("https://dummy.tld/") + } + if !isTimeout(err) { + t.Errorf("client expected timeout error; got %#v", err) + } + if body && n != bodySize { + t.Errorf("only read %d bytes of body; want %d", n, bodySize) + } + return nil + } + ct.server = func() error { + ct.greet() + for { + f, err := ct.fr.ReadFrame() + if err != nil { + t.Logf("ReadFrame: %v", err) + return nil + } + switch f := f.(type) { + case *DataFrame: + dataLen := len(f.Data()) + if dataLen > 0 { + if err := ct.fr.WriteWindowUpdate(0, uint32(dataLen)); err != nil { + return err + } + if err := ct.fr.WriteWindowUpdate(f.StreamID, uint32(dataLen)); err != nil { + return err + } + } + case *RSTStreamFrame: + if f.StreamID == 1 && f.ErrCode == ErrCodeCancel { + return nil + } + } + } + } + ct.run() +} + +func TestTransportDisableCompression(t *testing.T) { + const body = "sup" + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + want := http.Header{ + "User-Agent": []string{"Go-http-client/2.0"}, + } + if !reflect.DeepEqual(r.Header, want) { + t.Errorf("request headers = %v; want %v", r.Header, want) + } + }, optOnlyServer) + defer st.Close() + + tr := &Transport{ + TLSClientConfig: tlsConfigInsecure, + t1: &http.Transport{ + DisableCompression: true, + }, + } + defer tr.CloseIdleConnections() + + req, err := http.NewRequest("GET", st.ts.URL, nil) + if err != nil { + t.Fatal(err) + } + res, err := tr.RoundTrip(req) + if err != nil { + t.Fatal(err) + } + defer res.Body.Close() +} + +// RFC 7540 section 8.1.2.2 +func TestTransportRejectsConnHeaders(t *testing.T) { + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + var got []string + for k := range r.Header { + got = append(got, k) + } + sort.Strings(got) + w.Header().Set("Got-Header", strings.Join(got, ",")) + }, optOnlyServer) + defer st.Close() + + tr := &Transport{TLSClientConfig: tlsConfigInsecure} + defer tr.CloseIdleConnections() + + tests := []struct { + key string + value []string + want string + }{ + { + key: "Upgrade", + value: []string{"anything"}, + want: "ERROR: http2: invalid Upgrade request header: [\"anything\"]", + }, + { + key: "Connection", + value: []string{"foo"}, + want: "ERROR: http2: invalid Connection request header: [\"foo\"]", + }, + { + key: "Connection", + value: []string{"close"}, + want: "Accept-Encoding,User-Agent", + }, + { + key: "Connection", + value: []string{"close", "something-else"}, + want: "ERROR: http2: invalid Connection request header: [\"close\" \"something-else\"]", + }, + { + key: "Connection", + value: []string{"keep-alive"}, + want: "Accept-Encoding,User-Agent", + }, + { + key: "Proxy-Connection", // just deleted and ignored + value: []string{"keep-alive"}, + want: "Accept-Encoding,User-Agent", + }, + { + key: "Transfer-Encoding", + value: []string{""}, + want: "Accept-Encoding,User-Agent", + }, + { + key: "Transfer-Encoding", + value: []string{"foo"}, + want: "ERROR: http2: invalid Transfer-Encoding request header: [\"foo\"]", + }, + { + key: "Transfer-Encoding", + value: []string{"chunked"}, + want: "Accept-Encoding,User-Agent", + }, + { + key: "Transfer-Encoding", + value: []string{"chunked", "other"}, + want: "ERROR: http2: invalid Transfer-Encoding request header: [\"chunked\" \"other\"]", + }, + { + key: "Content-Length", + value: []string{"123"}, + want: "Accept-Encoding,User-Agent", + }, + { + key: "Keep-Alive", + value: []string{"doop"}, + want: "Accept-Encoding,User-Agent", + }, + } + + for _, tt := range tests { + req, _ := http.NewRequest("GET", st.ts.URL, nil) + req.Header[tt.key] = tt.value + res, err := tr.RoundTrip(req) + var got string + if err != nil { + got = fmt.Sprintf("ERROR: %v", err) + } else { + got = res.Header.Get("Got-Header") + res.Body.Close() + } + if got != tt.want { + t.Errorf("For key %q, value %q, got = %q; want %q", tt.key, tt.value, got, tt.want) + } + } +} + +// golang.org/issue/14048 +func TestTransportFailsOnInvalidHeaders(t *testing.T) { + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + var got []string + for k := range r.Header { + got = append(got, k) + } + sort.Strings(got) + w.Header().Set("Got-Header", strings.Join(got, ",")) + }, optOnlyServer) + defer st.Close() + + tests := [...]struct { + h http.Header + wantErr string + }{ + 0: { + h: http.Header{"with space": {"foo"}}, + wantErr: `invalid HTTP header name "with space"`, + }, + 1: { + h: http.Header{"name": {"Брэд"}}, + wantErr: "", // okay + }, + 2: { + h: http.Header{"имя": {"Brad"}}, + wantErr: `invalid HTTP header name "имя"`, + }, + 3: { + h: http.Header{"foo": {"foo\x01bar"}}, + wantErr: `invalid HTTP header value "foo\x01bar" for header "foo"`, + }, + } + + tr := &Transport{TLSClientConfig: tlsConfigInsecure} + defer tr.CloseIdleConnections() + + for i, tt := range tests { + req, _ := http.NewRequest("GET", st.ts.URL, nil) + req.Header = tt.h + res, err := tr.RoundTrip(req) + var bad bool + if tt.wantErr == "" { + if err != nil { + bad = true + t.Errorf("case %d: error = %v; want no error", i, err) + } + } else { + if !strings.Contains(fmt.Sprint(err), tt.wantErr) { + bad = true + t.Errorf("case %d: error = %v; want error %q", i, err, tt.wantErr) + } + } + if err == nil { + if bad { + t.Logf("case %d: server got headers %q", i, res.Header.Get("Got-Header")) + } + res.Body.Close() + } + } +} + +// Tests that gzipReader doesn't crash on a second Read call following +// the first Read call's gzip.NewReader returning an error. +func TestGzipReader_DoubleReadCrash(t *testing.T) { + gz := &gzipReader{ + body: ioutil.NopCloser(strings.NewReader("0123456789")), + } + var buf [1]byte + n, err1 := gz.Read(buf[:]) + if n != 0 || !strings.Contains(fmt.Sprint(err1), "invalid header") { + t.Fatalf("Read = %v, %v; want 0, invalid header", n, err1) + } + n, err2 := gz.Read(buf[:]) + if n != 0 || err2 != err1 { + t.Fatalf("second Read = %v, %v; want 0, %v", n, err2, err1) + } +} + +func TestTransportNewTLSConfig(t *testing.T) { + tests := [...]struct { + conf *tls.Config + host string + want *tls.Config + }{ + // Normal case. + 0: { + conf: nil, + host: "foo.com", + want: &tls.Config{ + ServerName: "foo.com", + NextProtos: []string{NextProtoTLS}, + }, + }, + + // User-provided name (bar.com) takes precedence: + 1: { + conf: &tls.Config{ + ServerName: "bar.com", + }, + host: "foo.com", + want: &tls.Config{ + ServerName: "bar.com", + NextProtos: []string{NextProtoTLS}, + }, + }, + + // NextProto is prepended: + 2: { + conf: &tls.Config{ + NextProtos: []string{"foo", "bar"}, + }, + host: "example.com", + want: &tls.Config{ + ServerName: "example.com", + NextProtos: []string{NextProtoTLS, "foo", "bar"}, + }, + }, + + // NextProto is not duplicated: + 3: { + conf: &tls.Config{ + NextProtos: []string{"foo", "bar", NextProtoTLS}, + }, + host: "example.com", + want: &tls.Config{ + ServerName: "example.com", + NextProtos: []string{"foo", "bar", NextProtoTLS}, + }, + }, + } + for i, tt := range tests { + // Ignore the session ticket keys part, which ends up populating + // unexported fields in the Config: + if tt.conf != nil { + tt.conf.SessionTicketsDisabled = true + } + + tr := &Transport{TLSClientConfig: tt.conf} + got := tr.newTLSConfig(tt.host) + + got.SessionTicketsDisabled = false + + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("%d. got %#v; want %#v", i, got, tt.want) + } + } +} + +// The Google GFE responds to HEAD requests with a HEADERS frame +// without END_STREAM, followed by a 0-length DATA frame with +// END_STREAM. Make sure we don't get confused by that. (We did.) +func TestTransportReadHeadResponse(t *testing.T) { + ct := newClientTester(t) + clientDone := make(chan struct{}) + ct.client = func() error { + defer close(clientDone) + req, _ := http.NewRequest("HEAD", "https://dummy.tld/", nil) + res, err := ct.tr.RoundTrip(req) + if err != nil { + return err + } + if res.ContentLength != 123 { + return fmt.Errorf("Content-Length = %d; want 123", res.ContentLength) + } + slurp, err := ioutil.ReadAll(res.Body) + if err != nil { + return fmt.Errorf("ReadAll: %v", err) + } + if len(slurp) > 0 { + return fmt.Errorf("Unexpected non-empty ReadAll body: %q", slurp) + } + return nil + } + ct.server = func() error { + ct.greet() + for { + f, err := ct.fr.ReadFrame() + if err != nil { + t.Logf("ReadFrame: %v", err) + return nil + } + hf, ok := f.(*HeadersFrame) + if !ok { + continue + } + var buf bytes.Buffer + enc := hpack.NewEncoder(&buf) + enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"}) + enc.WriteField(hpack.HeaderField{Name: "content-length", Value: "123"}) + ct.fr.WriteHeaders(HeadersFrameParam{ + StreamID: hf.StreamID, + EndHeaders: true, + EndStream: false, // as the GFE does + BlockFragment: buf.Bytes(), + }) + ct.fr.WriteData(hf.StreamID, true, nil) + + <-clientDone + return nil + } + } + ct.run() +} + +type neverEnding byte + +func (b neverEnding) Read(p []byte) (int, error) { + for i := range p { + p[i] = byte(b) + } + return len(p), nil +} + +// golang.org/issue/15425: test that a handler closing the request +// body doesn't terminate the stream to the peer. (It just stops +// readability from the handler's side, and eventually the client +// runs out of flow control tokens) +func TestTransportHandlerBodyClose(t *testing.T) { + const bodySize = 10 << 20 + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + r.Body.Close() + io.Copy(w, io.LimitReader(neverEnding('A'), bodySize)) + }, optOnlyServer) + defer st.Close() + + tr := &Transport{TLSClientConfig: tlsConfigInsecure} + defer tr.CloseIdleConnections() + + g0 := runtime.NumGoroutine() + + const numReq = 10 + for i := 0; i < numReq; i++ { + req, err := http.NewRequest("POST", st.ts.URL, struct{ io.Reader }{io.LimitReader(neverEnding('A'), bodySize)}) + if err != nil { + t.Fatal(err) + } + res, err := tr.RoundTrip(req) + if err != nil { + t.Fatal(err) + } + n, err := io.Copy(ioutil.Discard, res.Body) + res.Body.Close() + if n != bodySize || err != nil { + t.Fatalf("req#%d: Copy = %d, %v; want %d, nil", i, n, err, bodySize) + } + } + tr.CloseIdleConnections() + + gd := runtime.NumGoroutine() - g0 + if gd > numReq/2 { + t.Errorf("appeared to leak goroutines") + } + +} + +// https://golang.org/issue/15930 +func TestTransportFlowControl(t *testing.T) { + const bufLen = 64 << 10 + var total int64 = 100 << 20 // 100MB + if testing.Short() { + total = 10 << 20 + } + + var wrote int64 // updated atomically + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + b := make([]byte, bufLen) + for wrote < total { + n, err := w.Write(b) + atomic.AddInt64(&wrote, int64(n)) + if err != nil { + t.Errorf("ResponseWriter.Write error: %v", err) + break + } + w.(http.Flusher).Flush() + } + }, optOnlyServer) + + tr := &Transport{TLSClientConfig: tlsConfigInsecure} + defer tr.CloseIdleConnections() + req, err := http.NewRequest("GET", st.ts.URL, nil) + if err != nil { + t.Fatal("NewRequest error:", err) + } + resp, err := tr.RoundTrip(req) + if err != nil { + t.Fatal("RoundTrip error:", err) + } + defer resp.Body.Close() + + var read int64 + b := make([]byte, bufLen) + for { + n, err := resp.Body.Read(b) + if err == io.EOF { + break + } + if err != nil { + t.Fatal("Read error:", err) + } + read += int64(n) + + const max = transportDefaultStreamFlow + if w := atomic.LoadInt64(&wrote); -max > read-w || read-w > max { + t.Fatalf("Too much data inflight: server wrote %v bytes but client only received %v", w, read) + } + + // Let the server get ahead of the client. + time.Sleep(1 * time.Millisecond) + } +} + +// golang.org/issue/14627 -- if the server sends a GOAWAY frame, make +// the Transport remember it and return it back to users (via +// RoundTrip or request body reads) if needed (e.g. if the server +// proceeds to close the TCP connection before the client gets its +// response) +func TestTransportUsesGoAwayDebugError_RoundTrip(t *testing.T) { + testTransportUsesGoAwayDebugError(t, false) +} + +func TestTransportUsesGoAwayDebugError_Body(t *testing.T) { + testTransportUsesGoAwayDebugError(t, true) +} + +func testTransportUsesGoAwayDebugError(t *testing.T, failMidBody bool) { + ct := newClientTester(t) + clientDone := make(chan struct{}) + + const goAwayErrCode = ErrCodeHTTP11Required // arbitrary + const goAwayDebugData = "some debug data" + + ct.client = func() error { + defer close(clientDone) + req, _ := http.NewRequest("GET", "https://dummy.tld/", nil) + res, err := ct.tr.RoundTrip(req) + if failMidBody { + if err != nil { + return fmt.Errorf("unexpected client RoundTrip error: %v", err) + } + _, err = io.Copy(ioutil.Discard, res.Body) + res.Body.Close() + } + want := GoAwayError{ + LastStreamID: 5, + ErrCode: goAwayErrCode, + DebugData: goAwayDebugData, + } + if !reflect.DeepEqual(err, want) { + t.Errorf("RoundTrip error = %T: %#v, want %T (%#v)", err, err, want, want) + } + return nil + } + ct.server = func() error { + ct.greet() + for { + f, err := ct.fr.ReadFrame() + if err != nil { + t.Logf("ReadFrame: %v", err) + return nil + } + hf, ok := f.(*HeadersFrame) + if !ok { + continue + } + if failMidBody { + var buf bytes.Buffer + enc := hpack.NewEncoder(&buf) + enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"}) + enc.WriteField(hpack.HeaderField{Name: "content-length", Value: "123"}) + ct.fr.WriteHeaders(HeadersFrameParam{ + StreamID: hf.StreamID, + EndHeaders: true, + EndStream: false, + BlockFragment: buf.Bytes(), + }) + } + // Write two GOAWAY frames, to test that the Transport takes + // the interesting parts of both. + ct.fr.WriteGoAway(5, ErrCodeNo, []byte(goAwayDebugData)) + ct.fr.WriteGoAway(5, goAwayErrCode, nil) + ct.sc.(*net.TCPConn).CloseWrite() + <-clientDone + return nil + } + } + ct.run() +} + +func testTransportReturnsUnusedFlowControl(t *testing.T, oneDataFrame bool) { + ct := newClientTester(t) + + clientClosed := make(chan struct{}) + serverWroteFirstByte := make(chan struct{}) + + ct.client = func() error { + req, _ := http.NewRequest("GET", "https://dummy.tld/", nil) + res, err := ct.tr.RoundTrip(req) + if err != nil { + return err + } + <-serverWroteFirstByte + + if n, err := res.Body.Read(make([]byte, 1)); err != nil || n != 1 { + return fmt.Errorf("body read = %v, %v; want 1, nil", n, err) + } + res.Body.Close() // leaving 4999 bytes unread + close(clientClosed) + + return nil + } + ct.server = func() error { + ct.greet() + + var hf *HeadersFrame + for { + f, err := ct.fr.ReadFrame() + if err != nil { + return fmt.Errorf("ReadFrame while waiting for Headers: %v", err) + } + switch f.(type) { + case *WindowUpdateFrame, *SettingsFrame: + continue + } + var ok bool + hf, ok = f.(*HeadersFrame) + if !ok { + return fmt.Errorf("Got %T; want HeadersFrame", f) + } + break + } + + var buf bytes.Buffer + enc := hpack.NewEncoder(&buf) + enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"}) + enc.WriteField(hpack.HeaderField{Name: "content-length", Value: "5000"}) + ct.fr.WriteHeaders(HeadersFrameParam{ + StreamID: hf.StreamID, + EndHeaders: true, + EndStream: false, + BlockFragment: buf.Bytes(), + }) + + // Two cases: + // - Send one DATA frame with 5000 bytes. + // - Send two DATA frames with 1 and 4999 bytes each. + // + // In both cases, the client should consume one byte of data, + // refund that byte, then refund the following 4999 bytes. + // + // In the second case, the server waits for the client connection to + // close before seconding the second DATA frame. This tests the case + // where the client receives a DATA frame after it has reset the stream. + if oneDataFrame { + ct.fr.WriteData(hf.StreamID, false /* don't end stream */, make([]byte, 5000)) + close(serverWroteFirstByte) + <-clientClosed + } else { + ct.fr.WriteData(hf.StreamID, false /* don't end stream */, make([]byte, 1)) + close(serverWroteFirstByte) + <-clientClosed + ct.fr.WriteData(hf.StreamID, false /* don't end stream */, make([]byte, 4999)) + } + + waitingFor := "RSTStreamFrame" + for { + f, err := ct.fr.ReadFrame() + if err != nil { + return fmt.Errorf("ReadFrame while waiting for %s: %v", waitingFor, err) + } + if _, ok := f.(*SettingsFrame); ok { + continue + } + switch waitingFor { + case "RSTStreamFrame": + if rf, ok := f.(*RSTStreamFrame); !ok || rf.ErrCode != ErrCodeCancel { + return fmt.Errorf("Expected a RSTStreamFrame with code cancel; got %v", summarizeFrame(f)) + } + waitingFor = "WindowUpdateFrame" + case "WindowUpdateFrame": + if wuf, ok := f.(*WindowUpdateFrame); !ok || wuf.Increment != 4999 { + return fmt.Errorf("Expected WindowUpdateFrame for 4999 bytes; got %v", summarizeFrame(f)) + } + return nil + } + } + } + ct.run() +} + +// See golang.org/issue/16481 +func TestTransportReturnsUnusedFlowControlSingleWrite(t *testing.T) { + testTransportReturnsUnusedFlowControl(t, true) +} + +// See golang.org/issue/20469 +func TestTransportReturnsUnusedFlowControlMultipleWrites(t *testing.T) { + testTransportReturnsUnusedFlowControl(t, false) +} + +// Issue 16612: adjust flow control on open streams when transport +// receives SETTINGS with INITIAL_WINDOW_SIZE from server. +func TestTransportAdjustsFlowControl(t *testing.T) { + ct := newClientTester(t) + clientDone := make(chan struct{}) + + const bodySize = 1 << 20 + + ct.client = func() error { + defer ct.cc.(*net.TCPConn).CloseWrite() + defer close(clientDone) + + req, _ := http.NewRequest("POST", "https://dummy.tld/", struct{ io.Reader }{io.LimitReader(neverEnding('A'), bodySize)}) + res, err := ct.tr.RoundTrip(req) + if err != nil { + return err + } + res.Body.Close() + return nil + } + ct.server = func() error { + _, err := io.ReadFull(ct.sc, make([]byte, len(ClientPreface))) + if err != nil { + return fmt.Errorf("reading client preface: %v", err) + } + + var gotBytes int64 + var sentSettings bool + for { + f, err := ct.fr.ReadFrame() + if err != nil { + select { + case <-clientDone: + return nil + default: + return fmt.Errorf("ReadFrame while waiting for Headers: %v", err) + } + } + switch f := f.(type) { + case *DataFrame: + gotBytes += int64(len(f.Data())) + // After we've got half the client's + // initial flow control window's worth + // of request body data, give it just + // enough flow control to finish. + if gotBytes >= initialWindowSize/2 && !sentSettings { + sentSettings = true + + ct.fr.WriteSettings(Setting{ID: SettingInitialWindowSize, Val: bodySize}) + ct.fr.WriteWindowUpdate(0, bodySize) + ct.fr.WriteSettingsAck() + } + + if f.StreamEnded() { + var buf bytes.Buffer + enc := hpack.NewEncoder(&buf) + enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"}) + ct.fr.WriteHeaders(HeadersFrameParam{ + StreamID: f.StreamID, + EndHeaders: true, + EndStream: true, + BlockFragment: buf.Bytes(), + }) + } + } + } + } + ct.run() +} + +// See golang.org/issue/16556 +func TestTransportReturnsDataPaddingFlowControl(t *testing.T) { + ct := newClientTester(t) + + unblockClient := make(chan bool, 1) + + ct.client = func() error { + req, _ := http.NewRequest("GET", "https://dummy.tld/", nil) + res, err := ct.tr.RoundTrip(req) + if err != nil { + return err + } + defer res.Body.Close() + <-unblockClient + return nil + } + ct.server = func() error { + ct.greet() + + var hf *HeadersFrame + for { + f, err := ct.fr.ReadFrame() + if err != nil { + return fmt.Errorf("ReadFrame while waiting for Headers: %v", err) + } + switch f.(type) { + case *WindowUpdateFrame, *SettingsFrame: + continue + } + var ok bool + hf, ok = f.(*HeadersFrame) + if !ok { + return fmt.Errorf("Got %T; want HeadersFrame", f) + } + break + } + + var buf bytes.Buffer + enc := hpack.NewEncoder(&buf) + enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"}) + enc.WriteField(hpack.HeaderField{Name: "content-length", Value: "5000"}) + ct.fr.WriteHeaders(HeadersFrameParam{ + StreamID: hf.StreamID, + EndHeaders: true, + EndStream: false, + BlockFragment: buf.Bytes(), + }) + pad := make([]byte, 5) + ct.fr.WriteDataPadded(hf.StreamID, false, make([]byte, 5000), pad) // without ending stream + + f, err := ct.readNonSettingsFrame() + if err != nil { + return fmt.Errorf("ReadFrame while waiting for first WindowUpdateFrame: %v", err) + } + wantBack := uint32(len(pad)) + 1 // one byte for the length of the padding + if wuf, ok := f.(*WindowUpdateFrame); !ok || wuf.Increment != wantBack || wuf.StreamID != 0 { + return fmt.Errorf("Expected conn WindowUpdateFrame for %d bytes; got %v", wantBack, summarizeFrame(f)) + } + + f, err = ct.readNonSettingsFrame() + if err != nil { + return fmt.Errorf("ReadFrame while waiting for second WindowUpdateFrame: %v", err) + } + if wuf, ok := f.(*WindowUpdateFrame); !ok || wuf.Increment != wantBack || wuf.StreamID == 0 { + return fmt.Errorf("Expected stream WindowUpdateFrame for %d bytes; got %v", wantBack, summarizeFrame(f)) + } + unblockClient <- true + return nil + } + ct.run() +} + +// golang.org/issue/16572 -- RoundTrip shouldn't hang when it gets a +// StreamError as a result of the response HEADERS +func TestTransportReturnsErrorOnBadResponseHeaders(t *testing.T) { + ct := newClientTester(t) + + ct.client = func() error { + req, _ := http.NewRequest("GET", "https://dummy.tld/", nil) + res, err := ct.tr.RoundTrip(req) + if err == nil { + res.Body.Close() + return errors.New("unexpected successful GET") + } + want := StreamError{1, ErrCodeProtocol, headerFieldNameError(" content-type")} + if !reflect.DeepEqual(want, err) { + t.Errorf("RoundTrip error = %#v; want %#v", err, want) + } + return nil + } + ct.server = func() error { + ct.greet() + + hf, err := ct.firstHeaders() + if err != nil { + return err + } + + var buf bytes.Buffer + enc := hpack.NewEncoder(&buf) + enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"}) + enc.WriteField(hpack.HeaderField{Name: " content-type", Value: "bogus"}) // bogus spaces + ct.fr.WriteHeaders(HeadersFrameParam{ + StreamID: hf.StreamID, + EndHeaders: true, + EndStream: false, + BlockFragment: buf.Bytes(), + }) + + for { + fr, err := ct.readFrame() + if err != nil { + return fmt.Errorf("error waiting for RST_STREAM from client: %v", err) + } + if _, ok := fr.(*SettingsFrame); ok { + continue + } + if rst, ok := fr.(*RSTStreamFrame); !ok || rst.StreamID != 1 || rst.ErrCode != ErrCodeProtocol { + t.Errorf("Frame = %v; want RST_STREAM for stream 1 with ErrCodeProtocol", summarizeFrame(fr)) + } + break + } + + return nil + } + ct.run() +} + +// byteAndEOFReader returns is in an io.Reader which reads one byte +// (the underlying byte) and io.EOF at once in its Read call. +type byteAndEOFReader byte + +func (b byteAndEOFReader) Read(p []byte) (n int, err error) { + if len(p) == 0 { + panic("unexpected useless call") + } + p[0] = byte(b) + return 1, io.EOF +} + +// Issue 16788: the Transport had a regression where it started +// sending a spurious DATA frame with a duplicate END_STREAM bit after +// the request body writer goroutine had already read an EOF from the +// Request.Body and included the END_STREAM on a data-carrying DATA +// frame. +// +// Notably, to trigger this, the requests need to use a Request.Body +// which returns (non-0, io.EOF) and also needs to set the ContentLength +// explicitly. +func TestTransportBodyDoubleEndStream(t *testing.T) { + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + // Nothing. + }, optOnlyServer) + defer st.Close() + + tr := &Transport{TLSClientConfig: tlsConfigInsecure} + defer tr.CloseIdleConnections() + + for i := 0; i < 2; i++ { + req, _ := http.NewRequest("POST", st.ts.URL, byteAndEOFReader('a')) + req.ContentLength = 1 + res, err := tr.RoundTrip(req) + if err != nil { + t.Fatalf("failure on req %d: %v", i+1, err) + } + defer res.Body.Close() + } +} + +// golang.org/issue/16847, golang.org/issue/19103 +func TestTransportRequestPathPseudo(t *testing.T) { + type result struct { + path string + err string + } + tests := []struct { + req *http.Request + want result + }{ + 0: { + req: &http.Request{ + Method: "GET", + URL: &url.URL{ + Host: "foo.com", + Path: "/foo", + }, + }, + want: result{path: "/foo"}, + }, + // In Go 1.7, we accepted paths of "//foo". + // In Go 1.8, we rejected it (issue 16847). + // In Go 1.9, we accepted it again (issue 19103). + 1: { + req: &http.Request{ + Method: "GET", + URL: &url.URL{ + Host: "foo.com", + Path: "//foo", + }, + }, + want: result{path: "//foo"}, + }, + + // Opaque with //$Matching_Hostname/path + 2: { + req: &http.Request{ + Method: "GET", + URL: &url.URL{ + Scheme: "https", + Opaque: "//foo.com/path", + Host: "foo.com", + Path: "/ignored", + }, + }, + want: result{path: "/path"}, + }, + + // Opaque with some other Request.Host instead: + 3: { + req: &http.Request{ + Method: "GET", + Host: "bar.com", + URL: &url.URL{ + Scheme: "https", + Opaque: "//bar.com/path", + Host: "foo.com", + Path: "/ignored", + }, + }, + want: result{path: "/path"}, + }, + + // Opaque without the leading "//": + 4: { + req: &http.Request{ + Method: "GET", + URL: &url.URL{ + Opaque: "/path", + Host: "foo.com", + Path: "/ignored", + }, + }, + want: result{path: "/path"}, + }, + + // Opaque we can't handle: + 5: { + req: &http.Request{ + Method: "GET", + URL: &url.URL{ + Scheme: "https", + Opaque: "//unknown_host/path", + Host: "foo.com", + Path: "/ignored", + }, + }, + want: result{err: `invalid request :path "https://unknown_host/path" from URL.Opaque = "//unknown_host/path"`}, + }, + + // A CONNECT request: + 6: { + req: &http.Request{ + Method: "CONNECT", + URL: &url.URL{ + Host: "foo.com", + }, + }, + want: result{}, + }, + } + for i, tt := range tests { + cc := &ClientConn{peerMaxHeaderListSize: 0xffffffffffffffff} + cc.henc = hpack.NewEncoder(&cc.hbuf) + cc.mu.Lock() + hdrs, err := cc.encodeHeaders(tt.req, false, "", -1) + cc.mu.Unlock() + var got result + hpackDec := hpack.NewDecoder(initialHeaderTableSize, func(f hpack.HeaderField) { + if f.Name == ":path" { + got.path = f.Value + } + }) + if err != nil { + got.err = err.Error() + } else if len(hdrs) > 0 { + if _, err := hpackDec.Write(hdrs); err != nil { + t.Errorf("%d. bogus hpack: %v", i, err) + continue + } + } + if got != tt.want { + t.Errorf("%d. got %+v; want %+v", i, got, tt.want) + } + + } + +} + +// golang.org/issue/17071 -- don't sniff the first byte of the request body +// before we've determined that the ClientConn is usable. +func TestRoundTripDoesntConsumeRequestBodyEarly(t *testing.T) { + const body = "foo" + req, _ := http.NewRequest("POST", "http://foo.com/", ioutil.NopCloser(strings.NewReader(body))) + cc := &ClientConn{ + closed: true, + } + _, err := cc.RoundTrip(req) + if err != errClientConnUnusable { + t.Fatalf("RoundTrip = %v; want errClientConnUnusable", err) + } + slurp, err := ioutil.ReadAll(req.Body) + if err != nil { + t.Errorf("ReadAll = %v", err) + } + if string(slurp) != body { + t.Errorf("Body = %q; want %q", slurp, body) + } +} + +func TestClientConnPing(t *testing.T) { + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {}, optOnlyServer) + defer st.Close() + tr := &Transport{TLSClientConfig: tlsConfigInsecure} + defer tr.CloseIdleConnections() + cc, err := tr.dialClientConn(st.ts.Listener.Addr().String(), false) + if err != nil { + t.Fatal(err) + } + if err = cc.Ping(testContext{}); err != nil { + t.Fatal(err) + } +} + +// Issue 16974: if the server sent a DATA frame after the user +// canceled the Transport's Request, the Transport previously wrote to a +// closed pipe, got an error, and ended up closing the whole TCP +// connection. +func TestTransportCancelDataResponseRace(t *testing.T) { + cancel := make(chan struct{}) + clientGotError := make(chan bool, 1) + + const msg = "Hello." + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + if strings.Contains(r.URL.Path, "/hello") { + time.Sleep(50 * time.Millisecond) + io.WriteString(w, msg) + return + } + for i := 0; i < 50; i++ { + io.WriteString(w, "Some data.") + w.(http.Flusher).Flush() + if i == 2 { + close(cancel) + <-clientGotError + } + time.Sleep(10 * time.Millisecond) + } + }, optOnlyServer) + defer st.Close() + + tr := &Transport{TLSClientConfig: tlsConfigInsecure} + defer tr.CloseIdleConnections() + + c := &http.Client{Transport: tr} + req, _ := http.NewRequest("GET", st.ts.URL, nil) + req.Cancel = cancel + res, err := c.Do(req) + if err != nil { + t.Fatal(err) + } + if _, err = io.Copy(ioutil.Discard, res.Body); err == nil { + t.Fatal("unexpected success") + } + clientGotError <- true + + res, err = c.Get(st.ts.URL + "/hello") + if err != nil { + t.Fatal(err) + } + slurp, err := ioutil.ReadAll(res.Body) + if err != nil { + t.Fatal(err) + } + if string(slurp) != msg { + t.Errorf("Got = %q; want %q", slurp, msg) + } +} + +func TestTransportRetryAfterGOAWAY(t *testing.T) { + var dialer struct { + sync.Mutex + count int + } + ct1 := make(chan *clientTester) + ct2 := make(chan *clientTester) + + ln := newLocalListener(t) + defer ln.Close() + + tr := &Transport{ + TLSClientConfig: tlsConfigInsecure, + } + tr.DialTLS = func(network, addr string, cfg *tls.Config) (net.Conn, error) { + dialer.Lock() + defer dialer.Unlock() + dialer.count++ + if dialer.count == 3 { + return nil, errors.New("unexpected number of dials") + } + cc, err := net.Dial("tcp", ln.Addr().String()) + if err != nil { + return nil, fmt.Errorf("dial error: %v", err) + } + sc, err := ln.Accept() + if err != nil { + return nil, fmt.Errorf("accept error: %v", err) + } + ct := &clientTester{ + t: t, + tr: tr, + cc: cc, + sc: sc, + fr: NewFramer(sc, sc), + } + switch dialer.count { + case 1: + ct1 <- ct + case 2: + ct2 <- ct + } + return cc, nil + } + + errs := make(chan error, 3) + done := make(chan struct{}) + defer close(done) + + // Client. + go func() { + req, _ := http.NewRequest("GET", "https://dummy.tld/", nil) + res, err := tr.RoundTrip(req) + if res != nil { + res.Body.Close() + if got := res.Header.Get("Foo"); got != "bar" { + err = fmt.Errorf("foo header = %q; want bar", got) + } + } + if err != nil { + err = fmt.Errorf("RoundTrip: %v", err) + } + errs <- err + }() + + connToClose := make(chan io.Closer, 2) + + // Server for the first request. + go func() { + var ct *clientTester + select { + case ct = <-ct1: + case <-done: + return + } + + connToClose <- ct.cc + ct.greet() + hf, err := ct.firstHeaders() + if err != nil { + errs <- fmt.Errorf("server1 failed reading HEADERS: %v", err) + return + } + t.Logf("server1 got %v", hf) + if err := ct.fr.WriteGoAway(0 /*max id*/, ErrCodeNo, nil); err != nil { + errs <- fmt.Errorf("server1 failed writing GOAWAY: %v", err) + return + } + errs <- nil + }() + + // Server for the second request. + go func() { + var ct *clientTester + select { + case ct = <-ct2: + case <-done: + return + } + + connToClose <- ct.cc + ct.greet() + hf, err := ct.firstHeaders() + if err != nil { + errs <- fmt.Errorf("server2 failed reading HEADERS: %v", err) + return + } + t.Logf("server2 got %v", hf) + + var buf bytes.Buffer + enc := hpack.NewEncoder(&buf) + enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"}) + enc.WriteField(hpack.HeaderField{Name: "foo", Value: "bar"}) + err = ct.fr.WriteHeaders(HeadersFrameParam{ + StreamID: hf.StreamID, + EndHeaders: true, + EndStream: false, + BlockFragment: buf.Bytes(), + }) + if err != nil { + errs <- fmt.Errorf("server2 failed writing response HEADERS: %v", err) + } else { + errs <- nil + } + }() + + for k := 0; k < 3; k++ { + select { + case err := <-errs: + if err != nil { + t.Error(err) + } + case <-time.After(1 * time.Second): + t.Errorf("timed out") + } + } + + for { + select { + case c := <-connToClose: + c.Close() + default: + return + } + } +} + +func TestTransportRetryAfterRefusedStream(t *testing.T) { + clientDone := make(chan struct{}) + ct := newClientTester(t) + ct.client = func() error { + defer ct.cc.(*net.TCPConn).CloseWrite() + defer close(clientDone) + req, _ := http.NewRequest("GET", "https://dummy.tld/", nil) + resp, err := ct.tr.RoundTrip(req) + if err != nil { + return fmt.Errorf("RoundTrip: %v", err) + } + resp.Body.Close() + if resp.StatusCode != 204 { + return fmt.Errorf("Status = %v; want 204", resp.StatusCode) + } + return nil + } + ct.server = func() error { + ct.greet() + var buf bytes.Buffer + enc := hpack.NewEncoder(&buf) + nreq := 0 + + for { + f, err := ct.fr.ReadFrame() + if err != nil { + select { + case <-clientDone: + // If the client's done, it + // will have reported any + // errors on its side. + return nil + default: + return err + } + } + switch f := f.(type) { + case *WindowUpdateFrame, *SettingsFrame: + case *HeadersFrame: + if !f.HeadersEnded() { + return fmt.Errorf("headers should have END_HEADERS be ended: %v", f) + } + nreq++ + if nreq == 1 { + ct.fr.WriteRSTStream(f.StreamID, ErrCodeRefusedStream) + } else { + enc.WriteField(hpack.HeaderField{Name: ":status", Value: "204"}) + ct.fr.WriteHeaders(HeadersFrameParam{ + StreamID: f.StreamID, + EndHeaders: true, + EndStream: true, + BlockFragment: buf.Bytes(), + }) + } + default: + return fmt.Errorf("Unexpected client frame %v", f) + } + } + } + ct.run() +} + +func TestTransportRetryHasLimit(t *testing.T) { + // Skip in short mode because the total expected delay is 1s+2s+4s+8s+16s=29s. + if testing.Short() { + t.Skip("skipping long test in short mode") + } + clientDone := make(chan struct{}) + ct := newClientTester(t) + ct.client = func() error { + defer ct.cc.(*net.TCPConn).CloseWrite() + defer close(clientDone) + req, _ := http.NewRequest("GET", "https://dummy.tld/", nil) + resp, err := ct.tr.RoundTrip(req) + if err == nil { + return fmt.Errorf("RoundTrip expected error, got response: %+v", resp) + } + t.Logf("expected error, got: %v", err) + return nil + } + ct.server = func() error { + ct.greet() + for { + f, err := ct.fr.ReadFrame() + if err != nil { + select { + case <-clientDone: + // If the client's done, it + // will have reported any + // errors on its side. + return nil + default: + return err + } + } + switch f := f.(type) { + case *WindowUpdateFrame, *SettingsFrame: + case *HeadersFrame: + if !f.HeadersEnded() { + return fmt.Errorf("headers should have END_HEADERS be ended: %v", f) + } + ct.fr.WriteRSTStream(f.StreamID, ErrCodeRefusedStream) + default: + return fmt.Errorf("Unexpected client frame %v", f) + } + } + } + ct.run() +} + +func TestTransportResponseDataBeforeHeaders(t *testing.T) { + ct := newClientTester(t) + ct.client = func() error { + defer ct.cc.(*net.TCPConn).CloseWrite() + req := httptest.NewRequest("GET", "https://dummy.tld/", nil) + // First request is normal to ensure the check is per stream and not per connection. + _, err := ct.tr.RoundTrip(req) + if err != nil { + return fmt.Errorf("RoundTrip expected no error, got: %v", err) + } + // Second request returns a DATA frame with no HEADERS. + resp, err := ct.tr.RoundTrip(req) + if err == nil { + return fmt.Errorf("RoundTrip expected error, got response: %+v", resp) + } + if err, ok := err.(StreamError); !ok || err.Code != ErrCodeProtocol { + return fmt.Errorf("expected stream PROTOCOL_ERROR, got: %v", err) + } + return nil + } + ct.server = func() error { + ct.greet() + for { + f, err := ct.fr.ReadFrame() + if err == io.EOF { + return nil + } else if err != nil { + return err + } + switch f := f.(type) { + case *WindowUpdateFrame, *SettingsFrame: + case *HeadersFrame: + switch f.StreamID { + case 1: + // Send a valid response to first request. + var buf bytes.Buffer + enc := hpack.NewEncoder(&buf) + enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"}) + ct.fr.WriteHeaders(HeadersFrameParam{ + StreamID: f.StreamID, + EndHeaders: true, + EndStream: true, + BlockFragment: buf.Bytes(), + }) + case 3: + ct.fr.WriteData(f.StreamID, true, []byte("payload")) + } + default: + return fmt.Errorf("Unexpected client frame %v", f) + } + } + } + ct.run() +} +func TestTransportRequestsStallAtServerLimit(t *testing.T) { + const maxConcurrent = 2 + + greet := make(chan struct{}) // server sends initial SETTINGS frame + gotRequest := make(chan struct{}) // server received a request + clientDone := make(chan struct{}) + + // Collect errors from goroutines. + var wg sync.WaitGroup + errs := make(chan error, 100) + defer func() { + wg.Wait() + close(errs) + for err := range errs { + t.Error(err) + } + }() + + // We will send maxConcurrent+2 requests. This checker goroutine waits for the + // following stages: + // 1. The first maxConcurrent requests are received by the server. + // 2. The client will cancel the next request + // 3. The server is unblocked so it can service the first maxConcurrent requests + // 4. The client will send the final request + wg.Add(1) + unblockClient := make(chan struct{}) + clientRequestCancelled := make(chan struct{}) + unblockServer := make(chan struct{}) + go func() { + defer wg.Done() + // Stage 1. + for k := 0; k < maxConcurrent; k++ { + <-gotRequest + } + // Stage 2. + close(unblockClient) + <-clientRequestCancelled + // Stage 3: give some time for the final RoundTrip call to be scheduled and + // verify that the final request is not sent. + time.Sleep(50 * time.Millisecond) + select { + case <-gotRequest: + errs <- errors.New("last request did not stall") + close(unblockServer) + return + default: + } + close(unblockServer) + // Stage 4. + <-gotRequest + }() + + ct := newClientTester(t) + ct.client = func() error { + var wg sync.WaitGroup + defer func() { + wg.Wait() + close(clientDone) + ct.cc.(*net.TCPConn).CloseWrite() + }() + for k := 0; k < maxConcurrent+2; k++ { + wg.Add(1) + go func(k int) { + defer wg.Done() + // Don't send the second request until after receiving SETTINGS from the server + // to avoid a race where we use the default SettingMaxConcurrentStreams, which + // is much larger than maxConcurrent. We have to send the first request before + // waiting because the first request triggers the dial and greet. + if k > 0 { + <-greet + } + // Block until maxConcurrent requests are sent before sending any more. + if k >= maxConcurrent { + <-unblockClient + } + req, _ := http.NewRequest("GET", fmt.Sprintf("https://dummy.tld/%d", k), nil) + if k == maxConcurrent { + // This request will be canceled. + cancel := make(chan struct{}) + req.Cancel = cancel + close(cancel) + _, err := ct.tr.RoundTrip(req) + close(clientRequestCancelled) + if err == nil { + errs <- fmt.Errorf("RoundTrip(%d) should have failed due to cancel", k) + return + } + } else { + resp, err := ct.tr.RoundTrip(req) + if err != nil { + errs <- fmt.Errorf("RoundTrip(%d): %v", k, err) + return + } + ioutil.ReadAll(resp.Body) + resp.Body.Close() + if resp.StatusCode != 204 { + errs <- fmt.Errorf("Status = %v; want 204", resp.StatusCode) + return + } + } + }(k) + } + return nil + } + + ct.server = func() error { + var wg sync.WaitGroup + defer wg.Wait() + + ct.greet(Setting{SettingMaxConcurrentStreams, maxConcurrent}) + + // Server write loop. + var buf bytes.Buffer + enc := hpack.NewEncoder(&buf) + writeResp := make(chan uint32, maxConcurrent+1) + + wg.Add(1) + go func() { + defer wg.Done() + <-unblockServer + for id := range writeResp { + buf.Reset() + enc.WriteField(hpack.HeaderField{Name: ":status", Value: "204"}) + ct.fr.WriteHeaders(HeadersFrameParam{ + StreamID: id, + EndHeaders: true, + EndStream: true, + BlockFragment: buf.Bytes(), + }) + } + }() + + // Server read loop. + var nreq int + for { + f, err := ct.fr.ReadFrame() + if err != nil { + select { + case <-clientDone: + // If the client's done, it will have reported any errors on its side. + return nil + default: + return err + } + } + switch f := f.(type) { + case *WindowUpdateFrame: + case *SettingsFrame: + // Wait for the client SETTINGS ack until ending the greet. + close(greet) + case *HeadersFrame: + if !f.HeadersEnded() { + return fmt.Errorf("headers should have END_HEADERS be ended: %v", f) + } + gotRequest <- struct{}{} + nreq++ + writeResp <- f.StreamID + if nreq == maxConcurrent+1 { + close(writeResp) + } + default: + return fmt.Errorf("Unexpected client frame %v", f) + } + } + } + + ct.run() +} + +func TestAuthorityAddr(t *testing.T) { + tests := []struct { + scheme, authority string + want string + }{ + {"http", "foo.com", "foo.com:80"}, + {"https", "foo.com", "foo.com:443"}, + {"https", "foo.com:1234", "foo.com:1234"}, + {"https", "1.2.3.4:1234", "1.2.3.4:1234"}, + {"https", "1.2.3.4", "1.2.3.4:443"}, + {"https", "[::1]:1234", "[::1]:1234"}, + {"https", "[::1]", "[::1]:443"}, + } + for _, tt := range tests { + got := authorityAddr(tt.scheme, tt.authority) + if got != tt.want { + t.Errorf("authorityAddr(%q, %q) = %q; want %q", tt.scheme, tt.authority, got, tt.want) + } + } +} + +// Issue 20448: stop allocating for DATA frames' payload after +// Response.Body.Close is called. +func TestTransportAllocationsAfterResponseBodyClose(t *testing.T) { + megabyteZero := make([]byte, 1<<20) + + writeErr := make(chan error, 1) + + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + w.(http.Flusher).Flush() + var sum int64 + for i := 0; i < 100; i++ { + n, err := w.Write(megabyteZero) + sum += int64(n) + if err != nil { + writeErr <- err + return + } + } + t.Logf("wrote all %d bytes", sum) + writeErr <- nil + }, optOnlyServer) + defer st.Close() + + tr := &Transport{TLSClientConfig: tlsConfigInsecure} + defer tr.CloseIdleConnections() + c := &http.Client{Transport: tr} + res, err := c.Get(st.ts.URL) + if err != nil { + t.Fatal(err) + } + var buf [1]byte + if _, err := res.Body.Read(buf[:]); err != nil { + t.Error(err) + } + if err := res.Body.Close(); err != nil { + t.Error(err) + } + + trb, ok := res.Body.(transportResponseBody) + if !ok { + t.Fatalf("res.Body = %T; want transportResponseBody", res.Body) + } + if trb.cs.bufPipe.b != nil { + t.Errorf("response body pipe is still open") + } + + gotErr := <-writeErr + if gotErr == nil { + t.Errorf("Handler unexpectedly managed to write its entire response without getting an error") + } else if gotErr != errStreamClosed { + t.Errorf("Handler Write err = %v; want errStreamClosed", gotErr) + } +} + +// Issue 18891: make sure Request.Body == NoBody means no DATA frame +// is ever sent, even if empty. +func TestTransportNoBodyMeansNoDATA(t *testing.T) { + ct := newClientTester(t) + + unblockClient := make(chan bool) + + ct.client = func() error { + req, _ := http.NewRequest("GET", "https://dummy.tld/", go18httpNoBody()) + ct.tr.RoundTrip(req) + <-unblockClient + return nil + } + ct.server = func() error { + defer close(unblockClient) + defer ct.cc.(*net.TCPConn).Close() + ct.greet() + + for { + f, err := ct.fr.ReadFrame() + if err != nil { + return fmt.Errorf("ReadFrame while waiting for Headers: %v", err) + } + switch f := f.(type) { + default: + return fmt.Errorf("Got %T; want HeadersFrame", f) + case *WindowUpdateFrame, *SettingsFrame: + continue + case *HeadersFrame: + if !f.StreamEnded() { + return fmt.Errorf("got headers frame without END_STREAM") + } + return nil + } + } + } + ct.run() +} + +func benchSimpleRoundTrip(b *testing.B, nHeaders int) { + defer disableGoroutineTracking()() + b.ReportAllocs() + st := newServerTester(b, + func(w http.ResponseWriter, r *http.Request) { + }, + optOnlyServer, + optQuiet, + ) + defer st.Close() + + tr := &Transport{TLSClientConfig: tlsConfigInsecure} + defer tr.CloseIdleConnections() + + req, err := http.NewRequest("GET", st.ts.URL, nil) + if err != nil { + b.Fatal(err) + } + + for i := 0; i < nHeaders; i++ { + name := fmt.Sprint("A-", i) + req.Header.Set(name, "*") + } + + b.ResetTimer() + + for i := 0; i < b.N; i++ { + res, err := tr.RoundTrip(req) + if err != nil { + if res != nil { + res.Body.Close() + } + b.Fatalf("RoundTrip err = %v; want nil", err) + } + res.Body.Close() + if res.StatusCode != http.StatusOK { + b.Fatalf("Response code = %v; want %v", res.StatusCode, http.StatusOK) + } + } +} + +func BenchmarkClientRequestHeaders(b *testing.B) { + b.Run(" 0 Headers", func(b *testing.B) { benchSimpleRoundTrip(b, 0) }) + b.Run(" 10 Headers", func(b *testing.B) { benchSimpleRoundTrip(b, 10) }) + b.Run(" 100 Headers", func(b *testing.B) { benchSimpleRoundTrip(b, 100) }) + b.Run("1000 Headers", func(b *testing.B) { benchSimpleRoundTrip(b, 1000) }) +} diff --git a/vendor/golang.org/x/net/http2/writesched_priority_test.go b/vendor/golang.org/x/net/http2/writesched_priority_test.go new file mode 100644 index 000000000..f2b535a2c --- /dev/null +++ b/vendor/golang.org/x/net/http2/writesched_priority_test.go @@ -0,0 +1,541 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package http2 + +import ( + "bytes" + "fmt" + "sort" + "testing" +) + +func defaultPriorityWriteScheduler() *priorityWriteScheduler { + return NewPriorityWriteScheduler(nil).(*priorityWriteScheduler) +} + +func checkPriorityWellFormed(ws *priorityWriteScheduler) error { + for id, n := range ws.nodes { + if id != n.id { + return fmt.Errorf("bad ws.nodes: ws.nodes[%d] = %d", id, n.id) + } + if n.parent == nil { + if n.next != nil || n.prev != nil { + return fmt.Errorf("bad node %d: nil parent but prev/next not nil", id) + } + continue + } + found := false + for k := n.parent.kids; k != nil; k = k.next { + if k.id == id { + found = true + break + } + } + if !found { + return fmt.Errorf("bad node %d: not found in parent %d kids list", id, n.parent.id) + } + } + return nil +} + +func fmtTree(ws *priorityWriteScheduler, fmtNode func(*priorityNode) string) string { + var ids []int + for _, n := range ws.nodes { + ids = append(ids, int(n.id)) + } + sort.Ints(ids) + + var buf bytes.Buffer + for _, id := range ids { + if buf.Len() != 0 { + buf.WriteString(" ") + } + if id == 0 { + buf.WriteString(fmtNode(&ws.root)) + } else { + buf.WriteString(fmtNode(ws.nodes[uint32(id)])) + } + } + return buf.String() +} + +func fmtNodeParentSkipRoot(n *priorityNode) string { + switch { + case n.id == 0: + return "" + case n.parent == nil: + return fmt.Sprintf("%d{parent:nil}", n.id) + default: + return fmt.Sprintf("%d{parent:%d}", n.id, n.parent.id) + } +} + +func fmtNodeWeightParentSkipRoot(n *priorityNode) string { + switch { + case n.id == 0: + return "" + case n.parent == nil: + return fmt.Sprintf("%d{weight:%d,parent:nil}", n.id, n.weight) + default: + return fmt.Sprintf("%d{weight:%d,parent:%d}", n.id, n.weight, n.parent.id) + } +} + +func TestPriorityTwoStreams(t *testing.T) { + ws := defaultPriorityWriteScheduler() + ws.OpenStream(1, OpenStreamOptions{}) + ws.OpenStream(2, OpenStreamOptions{}) + + want := "1{weight:15,parent:0} 2{weight:15,parent:0}" + if got := fmtTree(ws, fmtNodeWeightParentSkipRoot); got != want { + t.Errorf("After open\ngot %q\nwant %q", got, want) + } + + // Move 1's parent to 2. + ws.AdjustStream(1, PriorityParam{ + StreamDep: 2, + Weight: 32, + Exclusive: false, + }) + want = "1{weight:32,parent:2} 2{weight:15,parent:0}" + if got := fmtTree(ws, fmtNodeWeightParentSkipRoot); got != want { + t.Errorf("After adjust\ngot %q\nwant %q", got, want) + } + + if err := checkPriorityWellFormed(ws); err != nil { + t.Error(err) + } +} + +func TestPriorityAdjustExclusiveZero(t *testing.T) { + // 1, 2, and 3 are all children of the 0 stream. + // Exclusive reprioritization to any of the streams should bring + // the rest of the streams under the reprioritized stream. + ws := defaultPriorityWriteScheduler() + ws.OpenStream(1, OpenStreamOptions{}) + ws.OpenStream(2, OpenStreamOptions{}) + ws.OpenStream(3, OpenStreamOptions{}) + + want := "1{weight:15,parent:0} 2{weight:15,parent:0} 3{weight:15,parent:0}" + if got := fmtTree(ws, fmtNodeWeightParentSkipRoot); got != want { + t.Errorf("After open\ngot %q\nwant %q", got, want) + } + + ws.AdjustStream(2, PriorityParam{ + StreamDep: 0, + Weight: 20, + Exclusive: true, + }) + want = "1{weight:15,parent:2} 2{weight:20,parent:0} 3{weight:15,parent:2}" + if got := fmtTree(ws, fmtNodeWeightParentSkipRoot); got != want { + t.Errorf("After adjust\ngot %q\nwant %q", got, want) + } + + if err := checkPriorityWellFormed(ws); err != nil { + t.Error(err) + } +} + +func TestPriorityAdjustOwnParent(t *testing.T) { + // Assigning a node as its own parent should have no effect. + ws := defaultPriorityWriteScheduler() + ws.OpenStream(1, OpenStreamOptions{}) + ws.OpenStream(2, OpenStreamOptions{}) + ws.AdjustStream(2, PriorityParam{ + StreamDep: 2, + Weight: 20, + Exclusive: true, + }) + want := "1{weight:15,parent:0} 2{weight:15,parent:0}" + if got := fmtTree(ws, fmtNodeWeightParentSkipRoot); got != want { + t.Errorf("After adjust\ngot %q\nwant %q", got, want) + } + if err := checkPriorityWellFormed(ws); err != nil { + t.Error(err) + } +} + +func TestPriorityClosedStreams(t *testing.T) { + ws := NewPriorityWriteScheduler(&PriorityWriteSchedulerConfig{MaxClosedNodesInTree: 2}).(*priorityWriteScheduler) + ws.OpenStream(1, OpenStreamOptions{}) + ws.OpenStream(2, OpenStreamOptions{PusherID: 1}) + ws.OpenStream(3, OpenStreamOptions{PusherID: 2}) + ws.OpenStream(4, OpenStreamOptions{PusherID: 3}) + + // Close the first three streams. We lose 1, but keep 2 and 3. + ws.CloseStream(1) + ws.CloseStream(2) + ws.CloseStream(3) + + want := "2{weight:15,parent:0} 3{weight:15,parent:2} 4{weight:15,parent:3}" + if got := fmtTree(ws, fmtNodeWeightParentSkipRoot); got != want { + t.Errorf("After close\ngot %q\nwant %q", got, want) + } + if err := checkPriorityWellFormed(ws); err != nil { + t.Error(err) + } + + // Adding a stream as an exclusive child of 1 gives it default + // priorities, since 1 is gone. + ws.OpenStream(5, OpenStreamOptions{}) + ws.AdjustStream(5, PriorityParam{StreamDep: 1, Weight: 15, Exclusive: true}) + + // Adding a stream as an exclusive child of 2 should work, since 2 is not gone. + ws.OpenStream(6, OpenStreamOptions{}) + ws.AdjustStream(6, PriorityParam{StreamDep: 2, Weight: 15, Exclusive: true}) + + want = "2{weight:15,parent:0} 3{weight:15,parent:6} 4{weight:15,parent:3} 5{weight:15,parent:0} 6{weight:15,parent:2}" + if got := fmtTree(ws, fmtNodeWeightParentSkipRoot); got != want { + t.Errorf("After add streams\ngot %q\nwant %q", got, want) + } + if err := checkPriorityWellFormed(ws); err != nil { + t.Error(err) + } +} + +func TestPriorityClosedStreamsDisabled(t *testing.T) { + ws := NewPriorityWriteScheduler(&PriorityWriteSchedulerConfig{}).(*priorityWriteScheduler) + ws.OpenStream(1, OpenStreamOptions{}) + ws.OpenStream(2, OpenStreamOptions{PusherID: 1}) + ws.OpenStream(3, OpenStreamOptions{PusherID: 2}) + + // Close the first two streams. We keep only 3. + ws.CloseStream(1) + ws.CloseStream(2) + + want := "3{weight:15,parent:0}" + if got := fmtTree(ws, fmtNodeWeightParentSkipRoot); got != want { + t.Errorf("After close\ngot %q\nwant %q", got, want) + } + if err := checkPriorityWellFormed(ws); err != nil { + t.Error(err) + } +} + +func TestPriorityIdleStreams(t *testing.T) { + ws := NewPriorityWriteScheduler(&PriorityWriteSchedulerConfig{MaxIdleNodesInTree: 2}).(*priorityWriteScheduler) + ws.AdjustStream(1, PriorityParam{StreamDep: 0, Weight: 15}) // idle + ws.AdjustStream(2, PriorityParam{StreamDep: 0, Weight: 15}) // idle + ws.AdjustStream(3, PriorityParam{StreamDep: 2, Weight: 20}) // idle + ws.OpenStream(4, OpenStreamOptions{}) + ws.OpenStream(5, OpenStreamOptions{}) + ws.OpenStream(6, OpenStreamOptions{}) + ws.AdjustStream(4, PriorityParam{StreamDep: 1, Weight: 15}) + ws.AdjustStream(5, PriorityParam{StreamDep: 2, Weight: 15}) + ws.AdjustStream(6, PriorityParam{StreamDep: 3, Weight: 15}) + + want := "2{weight:15,parent:0} 3{weight:20,parent:2} 4{weight:15,parent:0} 5{weight:15,parent:2} 6{weight:15,parent:3}" + if got := fmtTree(ws, fmtNodeWeightParentSkipRoot); got != want { + t.Errorf("After open\ngot %q\nwant %q", got, want) + } + if err := checkPriorityWellFormed(ws); err != nil { + t.Error(err) + } +} + +func TestPriorityIdleStreamsDisabled(t *testing.T) { + ws := NewPriorityWriteScheduler(&PriorityWriteSchedulerConfig{}).(*priorityWriteScheduler) + ws.AdjustStream(1, PriorityParam{StreamDep: 0, Weight: 15}) // idle + ws.AdjustStream(2, PriorityParam{StreamDep: 0, Weight: 15}) // idle + ws.AdjustStream(3, PriorityParam{StreamDep: 2, Weight: 20}) // idle + ws.OpenStream(4, OpenStreamOptions{}) + + want := "4{weight:15,parent:0}" + if got := fmtTree(ws, fmtNodeWeightParentSkipRoot); got != want { + t.Errorf("After open\ngot %q\nwant %q", got, want) + } + if err := checkPriorityWellFormed(ws); err != nil { + t.Error(err) + } +} + +func TestPrioritySection531NonExclusive(t *testing.T) { + // Example from RFC 7540 Section 5.3.1. + // A,B,C,D = 1,2,3,4 + ws := defaultPriorityWriteScheduler() + ws.OpenStream(1, OpenStreamOptions{}) + ws.OpenStream(2, OpenStreamOptions{PusherID: 1}) + ws.OpenStream(3, OpenStreamOptions{PusherID: 1}) + ws.OpenStream(4, OpenStreamOptions{}) + ws.AdjustStream(4, PriorityParam{ + StreamDep: 1, + Weight: 15, + Exclusive: false, + }) + want := "1{parent:0} 2{parent:1} 3{parent:1} 4{parent:1}" + if got := fmtTree(ws, fmtNodeParentSkipRoot); got != want { + t.Errorf("After adjust\ngot %q\nwant %q", got, want) + } + if err := checkPriorityWellFormed(ws); err != nil { + t.Error(err) + } +} + +func TestPrioritySection531Exclusive(t *testing.T) { + // Example from RFC 7540 Section 5.3.1. + // A,B,C,D = 1,2,3,4 + ws := defaultPriorityWriteScheduler() + ws.OpenStream(1, OpenStreamOptions{}) + ws.OpenStream(2, OpenStreamOptions{PusherID: 1}) + ws.OpenStream(3, OpenStreamOptions{PusherID: 1}) + ws.OpenStream(4, OpenStreamOptions{}) + ws.AdjustStream(4, PriorityParam{ + StreamDep: 1, + Weight: 15, + Exclusive: true, + }) + want := "1{parent:0} 2{parent:4} 3{parent:4} 4{parent:1}" + if got := fmtTree(ws, fmtNodeParentSkipRoot); got != want { + t.Errorf("After adjust\ngot %q\nwant %q", got, want) + } + if err := checkPriorityWellFormed(ws); err != nil { + t.Error(err) + } +} + +func makeSection533Tree() *priorityWriteScheduler { + // Initial tree from RFC 7540 Section 5.3.3. + // A,B,C,D,E,F = 1,2,3,4,5,6 + ws := defaultPriorityWriteScheduler() + ws.OpenStream(1, OpenStreamOptions{}) + ws.OpenStream(2, OpenStreamOptions{PusherID: 1}) + ws.OpenStream(3, OpenStreamOptions{PusherID: 1}) + ws.OpenStream(4, OpenStreamOptions{PusherID: 3}) + ws.OpenStream(5, OpenStreamOptions{PusherID: 3}) + ws.OpenStream(6, OpenStreamOptions{PusherID: 4}) + return ws +} + +func TestPrioritySection533NonExclusive(t *testing.T) { + // Example from RFC 7540 Section 5.3.3. + // A,B,C,D,E,F = 1,2,3,4,5,6 + ws := defaultPriorityWriteScheduler() + ws.OpenStream(1, OpenStreamOptions{}) + ws.OpenStream(2, OpenStreamOptions{PusherID: 1}) + ws.OpenStream(3, OpenStreamOptions{PusherID: 1}) + ws.OpenStream(4, OpenStreamOptions{PusherID: 3}) + ws.OpenStream(5, OpenStreamOptions{PusherID: 3}) + ws.OpenStream(6, OpenStreamOptions{PusherID: 4}) + ws.AdjustStream(1, PriorityParam{ + StreamDep: 4, + Weight: 15, + Exclusive: false, + }) + want := "1{parent:4} 2{parent:1} 3{parent:1} 4{parent:0} 5{parent:3} 6{parent:4}" + if got := fmtTree(ws, fmtNodeParentSkipRoot); got != want { + t.Errorf("After adjust\ngot %q\nwant %q", got, want) + } + if err := checkPriorityWellFormed(ws); err != nil { + t.Error(err) + } +} + +func TestPrioritySection533Exclusive(t *testing.T) { + // Example from RFC 7540 Section 5.3.3. + // A,B,C,D,E,F = 1,2,3,4,5,6 + ws := defaultPriorityWriteScheduler() + ws.OpenStream(1, OpenStreamOptions{}) + ws.OpenStream(2, OpenStreamOptions{PusherID: 1}) + ws.OpenStream(3, OpenStreamOptions{PusherID: 1}) + ws.OpenStream(4, OpenStreamOptions{PusherID: 3}) + ws.OpenStream(5, OpenStreamOptions{PusherID: 3}) + ws.OpenStream(6, OpenStreamOptions{PusherID: 4}) + ws.AdjustStream(1, PriorityParam{ + StreamDep: 4, + Weight: 15, + Exclusive: true, + }) + want := "1{parent:4} 2{parent:1} 3{parent:1} 4{parent:0} 5{parent:3} 6{parent:1}" + if got := fmtTree(ws, fmtNodeParentSkipRoot); got != want { + t.Errorf("After adjust\ngot %q\nwant %q", got, want) + } + if err := checkPriorityWellFormed(ws); err != nil { + t.Error(err) + } +} + +func checkPopAll(ws WriteScheduler, order []uint32) error { + for k, id := range order { + wr, ok := ws.Pop() + if !ok { + return fmt.Errorf("Pop[%d]: got ok=false, want %d (order=%v)", k, id, order) + } + if got := wr.StreamID(); got != id { + return fmt.Errorf("Pop[%d]: got %v, want %d (order=%v)", k, got, id, order) + } + } + wr, ok := ws.Pop() + if ok { + return fmt.Errorf("Pop[%d]: got %v, want ok=false (order=%v)", len(order), wr.StreamID(), order) + } + return nil +} + +func TestPriorityPopFrom533Tree(t *testing.T) { + ws := makeSection533Tree() + + ws.Push(makeWriteHeadersRequest(3 /*C*/)) + ws.Push(makeWriteNonStreamRequest()) + ws.Push(makeWriteHeadersRequest(5 /*E*/)) + ws.Push(makeWriteHeadersRequest(1 /*A*/)) + t.Log("tree:", fmtTree(ws, fmtNodeParentSkipRoot)) + + if err := checkPopAll(ws, []uint32{0 /*NonStream*/, 1, 3, 5}); err != nil { + t.Error(err) + } +} + +func TestPriorityPopFromLinearTree(t *testing.T) { + ws := defaultPriorityWriteScheduler() + ws.OpenStream(1, OpenStreamOptions{}) + ws.OpenStream(2, OpenStreamOptions{PusherID: 1}) + ws.OpenStream(3, OpenStreamOptions{PusherID: 2}) + ws.OpenStream(4, OpenStreamOptions{PusherID: 3}) + + ws.Push(makeWriteHeadersRequest(3)) + ws.Push(makeWriteHeadersRequest(4)) + ws.Push(makeWriteHeadersRequest(1)) + ws.Push(makeWriteHeadersRequest(2)) + ws.Push(makeWriteNonStreamRequest()) + ws.Push(makeWriteNonStreamRequest()) + t.Log("tree:", fmtTree(ws, fmtNodeParentSkipRoot)) + + if err := checkPopAll(ws, []uint32{0, 0 /*NonStreams*/, 1, 2, 3, 4}); err != nil { + t.Error(err) + } +} + +func TestPriorityFlowControl(t *testing.T) { + ws := NewPriorityWriteScheduler(&PriorityWriteSchedulerConfig{ThrottleOutOfOrderWrites: false}) + ws.OpenStream(1, OpenStreamOptions{}) + ws.OpenStream(2, OpenStreamOptions{PusherID: 1}) + + sc := &serverConn{maxFrameSize: 16} + st1 := &stream{id: 1, sc: sc} + st2 := &stream{id: 2, sc: sc} + + ws.Push(FrameWriteRequest{&writeData{1, make([]byte, 16), false}, st1, nil}) + ws.Push(FrameWriteRequest{&writeData{2, make([]byte, 16), false}, st2, nil}) + ws.AdjustStream(2, PriorityParam{StreamDep: 1}) + + // No flow-control bytes available. + if wr, ok := ws.Pop(); ok { + t.Fatalf("Pop(limited by flow control)=%v,true, want false", wr) + } + + // Add enough flow-control bytes to write st2 in two Pop calls. + // Should write data from st2 even though it's lower priority than st1. + for i := 1; i <= 2; i++ { + st2.flow.add(8) + wr, ok := ws.Pop() + if !ok { + t.Fatalf("Pop(%d)=false, want true", i) + } + if got, want := wr.DataSize(), 8; got != want { + t.Fatalf("Pop(%d)=%d bytes, want %d bytes", i, got, want) + } + } +} + +func TestPriorityThrottleOutOfOrderWrites(t *testing.T) { + ws := NewPriorityWriteScheduler(&PriorityWriteSchedulerConfig{ThrottleOutOfOrderWrites: true}) + ws.OpenStream(1, OpenStreamOptions{}) + ws.OpenStream(2, OpenStreamOptions{PusherID: 1}) + + sc := &serverConn{maxFrameSize: 4096} + st1 := &stream{id: 1, sc: sc} + st2 := &stream{id: 2, sc: sc} + st1.flow.add(4096) + st2.flow.add(4096) + ws.Push(FrameWriteRequest{&writeData{2, make([]byte, 4096), false}, st2, nil}) + ws.AdjustStream(2, PriorityParam{StreamDep: 1}) + + // We have enough flow-control bytes to write st2 in a single Pop call. + // However, due to out-of-order write throttling, the first call should + // only write 1KB. + wr, ok := ws.Pop() + if !ok { + t.Fatalf("Pop(st2.first)=false, want true") + } + if got, want := wr.StreamID(), uint32(2); got != want { + t.Fatalf("Pop(st2.first)=stream %d, want stream %d", got, want) + } + if got, want := wr.DataSize(), 1024; got != want { + t.Fatalf("Pop(st2.first)=%d bytes, want %d bytes", got, want) + } + + // Now add data on st1. This should take precedence. + ws.Push(FrameWriteRequest{&writeData{1, make([]byte, 4096), false}, st1, nil}) + wr, ok = ws.Pop() + if !ok { + t.Fatalf("Pop(st1)=false, want true") + } + if got, want := wr.StreamID(), uint32(1); got != want { + t.Fatalf("Pop(st1)=stream %d, want stream %d", got, want) + } + if got, want := wr.DataSize(), 4096; got != want { + t.Fatalf("Pop(st1)=%d bytes, want %d bytes", got, want) + } + + // Should go back to writing 1KB from st2. + wr, ok = ws.Pop() + if !ok { + t.Fatalf("Pop(st2.last)=false, want true") + } + if got, want := wr.StreamID(), uint32(2); got != want { + t.Fatalf("Pop(st2.last)=stream %d, want stream %d", got, want) + } + if got, want := wr.DataSize(), 1024; got != want { + t.Fatalf("Pop(st2.last)=%d bytes, want %d bytes", got, want) + } +} + +func TestPriorityWeights(t *testing.T) { + ws := defaultPriorityWriteScheduler() + ws.OpenStream(1, OpenStreamOptions{}) + ws.OpenStream(2, OpenStreamOptions{}) + + sc := &serverConn{maxFrameSize: 8} + st1 := &stream{id: 1, sc: sc} + st2 := &stream{id: 2, sc: sc} + st1.flow.add(40) + st2.flow.add(40) + + ws.Push(FrameWriteRequest{&writeData{1, make([]byte, 40), false}, st1, nil}) + ws.Push(FrameWriteRequest{&writeData{2, make([]byte, 40), false}, st2, nil}) + ws.AdjustStream(1, PriorityParam{StreamDep: 0, Weight: 34}) + ws.AdjustStream(2, PriorityParam{StreamDep: 0, Weight: 9}) + + // st1 gets 3.5x the bandwidth of st2 (3.5 = (34+1)/(9+1)). + // The maximum frame size is 8 bytes. The write sequence should be: + // st1, total bytes so far is (st1=8, st=0) + // st2, total bytes so far is (st1=8, st=8) + // st1, total bytes so far is (st1=16, st=8) + // st1, total bytes so far is (st1=24, st=8) // 3x bandwidth + // st1, total bytes so far is (st1=32, st=8) // 4x bandwidth + // st2, total bytes so far is (st1=32, st=16) // 2x bandwidth + // st1, total bytes so far is (st1=40, st=16) + // st2, total bytes so far is (st1=40, st=24) + // st2, total bytes so far is (st1=40, st=32) + // st2, total bytes so far is (st1=40, st=40) + if err := checkPopAll(ws, []uint32{1, 2, 1, 1, 1, 2, 1, 2, 2, 2}); err != nil { + t.Error(err) + } +} + +func TestPriorityRstStreamOnNonOpenStreams(t *testing.T) { + ws := NewPriorityWriteScheduler(&PriorityWriteSchedulerConfig{ + MaxClosedNodesInTree: 0, + MaxIdleNodesInTree: 0, + }) + ws.OpenStream(1, OpenStreamOptions{}) + ws.CloseStream(1) + ws.Push(FrameWriteRequest{write: streamError(1, ErrCodeProtocol)}) + ws.Push(FrameWriteRequest{write: streamError(2, ErrCodeProtocol)}) + + if err := checkPopAll(ws, []uint32{1, 2}); err != nil { + t.Error(err) + } +} diff --git a/vendor/golang.org/x/net/http2/writesched_random_test.go b/vendor/golang.org/x/net/http2/writesched_random_test.go new file mode 100644 index 000000000..3bf4aa36a --- /dev/null +++ b/vendor/golang.org/x/net/http2/writesched_random_test.go @@ -0,0 +1,44 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package http2 + +import "testing" + +func TestRandomScheduler(t *testing.T) { + ws := NewRandomWriteScheduler() + ws.Push(makeWriteHeadersRequest(3)) + ws.Push(makeWriteHeadersRequest(4)) + ws.Push(makeWriteHeadersRequest(1)) + ws.Push(makeWriteHeadersRequest(2)) + ws.Push(makeWriteNonStreamRequest()) + ws.Push(makeWriteNonStreamRequest()) + + // Pop all frames. Should get the non-stream requests first, + // followed by the stream requests in any order. + var order []FrameWriteRequest + for { + wr, ok := ws.Pop() + if !ok { + break + } + order = append(order, wr) + } + t.Logf("got frames: %v", order) + if len(order) != 6 { + t.Fatalf("got %d frames, expected 6", len(order)) + } + if order[0].StreamID() != 0 || order[1].StreamID() != 0 { + t.Fatal("expected non-stream frames first", order[0], order[1]) + } + got := make(map[uint32]bool) + for _, wr := range order[2:] { + got[wr.StreamID()] = true + } + for id := uint32(1); id <= 4; id++ { + if !got[id] { + t.Errorf("frame not found for stream %d", id) + } + } +} diff --git a/vendor/golang.org/x/net/http2/writesched_test.go b/vendor/golang.org/x/net/http2/writesched_test.go new file mode 100644 index 000000000..0807056bc --- /dev/null +++ b/vendor/golang.org/x/net/http2/writesched_test.go @@ -0,0 +1,125 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package http2 + +import ( + "fmt" + "math" + "reflect" + "testing" +) + +func makeWriteNonStreamRequest() FrameWriteRequest { + return FrameWriteRequest{writeSettingsAck{}, nil, nil} +} + +func makeWriteHeadersRequest(streamID uint32) FrameWriteRequest { + st := &stream{id: streamID} + return FrameWriteRequest{&writeResHeaders{streamID: streamID, httpResCode: 200}, st, nil} +} + +func checkConsume(wr FrameWriteRequest, nbytes int32, want []FrameWriteRequest) error { + consumed, rest, n := wr.Consume(nbytes) + var wantConsumed, wantRest FrameWriteRequest + switch len(want) { + case 0: + case 1: + wantConsumed = want[0] + case 2: + wantConsumed = want[0] + wantRest = want[1] + } + if !reflect.DeepEqual(consumed, wantConsumed) || !reflect.DeepEqual(rest, wantRest) || n != len(want) { + return fmt.Errorf("got %v, %v, %v\nwant %v, %v, %v", consumed, rest, n, wantConsumed, wantRest, len(want)) + } + return nil +} + +func TestFrameWriteRequestNonData(t *testing.T) { + wr := makeWriteNonStreamRequest() + if got, want := wr.DataSize(), 0; got != want { + t.Errorf("DataSize: got %v, want %v", got, want) + } + + // Non-DATA frames are always consumed whole. + if err := checkConsume(wr, 0, []FrameWriteRequest{wr}); err != nil { + t.Errorf("Consume:\n%v", err) + } +} + +func TestFrameWriteRequestData(t *testing.T) { + st := &stream{ + id: 1, + sc: &serverConn{maxFrameSize: 16}, + } + const size = 32 + wr := FrameWriteRequest{&writeData{st.id, make([]byte, size), true}, st, make(chan error)} + if got, want := wr.DataSize(), size; got != want { + t.Errorf("DataSize: got %v, want %v", got, want) + } + + // No flow-control bytes available: cannot consume anything. + if err := checkConsume(wr, math.MaxInt32, []FrameWriteRequest{}); err != nil { + t.Errorf("Consume(limited by flow control):\n%v", err) + } + + // Add enough flow-control bytes to consume the entire frame, + // but we're now restricted by st.sc.maxFrameSize. + st.flow.add(size) + want := []FrameWriteRequest{ + { + write: &writeData{st.id, make([]byte, st.sc.maxFrameSize), false}, + stream: st, + done: nil, + }, + { + write: &writeData{st.id, make([]byte, size-st.sc.maxFrameSize), true}, + stream: st, + done: wr.done, + }, + } + if err := checkConsume(wr, math.MaxInt32, want); err != nil { + t.Errorf("Consume(limited by maxFrameSize):\n%v", err) + } + rest := want[1] + + // Consume 8 bytes from the remaining frame. + want = []FrameWriteRequest{ + { + write: &writeData{st.id, make([]byte, 8), false}, + stream: st, + done: nil, + }, + { + write: &writeData{st.id, make([]byte, size-st.sc.maxFrameSize-8), true}, + stream: st, + done: wr.done, + }, + } + if err := checkConsume(rest, 8, want); err != nil { + t.Errorf("Consume(8):\n%v", err) + } + rest = want[1] + + // Consume all remaining bytes. + want = []FrameWriteRequest{ + { + write: &writeData{st.id, make([]byte, size-st.sc.maxFrameSize-8), true}, + stream: st, + done: wr.done, + }, + } + if err := checkConsume(rest, math.MaxInt32, want); err != nil { + t.Errorf("Consume(remainder):\n%v", err) + } +} + +func TestFrameWriteRequest_StreamID(t *testing.T) { + const streamID = 123 + wr := FrameWriteRequest{write: streamError(streamID, ErrCodeNo)} + if got := wr.StreamID(); got != streamID { + t.Errorf("FrameWriteRequest(StreamError) = %v; want %v", got, streamID) + } +} diff --git a/vendor/golang.org/x/net/http2/z_spec_test.go b/vendor/golang.org/x/net/http2/z_spec_test.go new file mode 100644 index 000000000..610b2cdbc --- /dev/null +++ b/vendor/golang.org/x/net/http2/z_spec_test.go @@ -0,0 +1,356 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package http2 + +import ( + "bytes" + "encoding/xml" + "flag" + "fmt" + "io" + "os" + "reflect" + "regexp" + "sort" + "strconv" + "strings" + "sync" + "testing" +) + +var coverSpec = flag.Bool("coverspec", false, "Run spec coverage tests") + +// The global map of sentence coverage for the http2 spec. +var defaultSpecCoverage specCoverage + +var loadSpecOnce sync.Once + +func loadSpec() { + if f, err := os.Open("testdata/draft-ietf-httpbis-http2.xml"); err != nil { + panic(err) + } else { + defaultSpecCoverage = readSpecCov(f) + f.Close() + } +} + +// covers marks all sentences for section sec in defaultSpecCoverage. Sentences not +// "covered" will be included in report outputted by TestSpecCoverage. +func covers(sec, sentences string) { + loadSpecOnce.Do(loadSpec) + defaultSpecCoverage.cover(sec, sentences) +} + +type specPart struct { + section string + sentence string +} + +func (ss specPart) Less(oo specPart) bool { + atoi := func(s string) int { + n, err := strconv.Atoi(s) + if err != nil { + panic(err) + } + return n + } + a := strings.Split(ss.section, ".") + b := strings.Split(oo.section, ".") + for len(a) > 0 { + if len(b) == 0 { + return false + } + x, y := atoi(a[0]), atoi(b[0]) + if x == y { + a, b = a[1:], b[1:] + continue + } + return x < y + } + if len(b) > 0 { + return true + } + return false +} + +type bySpecSection []specPart + +func (a bySpecSection) Len() int { return len(a) } +func (a bySpecSection) Less(i, j int) bool { return a[i].Less(a[j]) } +func (a bySpecSection) Swap(i, j int) { a[i], a[j] = a[j], a[i] } + +type specCoverage struct { + coverage map[specPart]bool + d *xml.Decoder +} + +func joinSection(sec []int) string { + s := fmt.Sprintf("%d", sec[0]) + for _, n := range sec[1:] { + s = fmt.Sprintf("%s.%d", s, n) + } + return s +} + +func (sc specCoverage) readSection(sec []int) { + var ( + buf = new(bytes.Buffer) + sub = 0 + ) + for { + tk, err := sc.d.Token() + if err != nil { + if err == io.EOF { + return + } + panic(err) + } + switch v := tk.(type) { + case xml.StartElement: + if skipElement(v) { + if err := sc.d.Skip(); err != nil { + panic(err) + } + if v.Name.Local == "section" { + sub++ + } + break + } + switch v.Name.Local { + case "section": + sub++ + sc.readSection(append(sec, sub)) + case "xref": + buf.Write(sc.readXRef(v)) + } + case xml.CharData: + if len(sec) == 0 { + break + } + buf.Write(v) + case xml.EndElement: + if v.Name.Local == "section" { + sc.addSentences(joinSection(sec), buf.String()) + return + } + } + } +} + +func (sc specCoverage) readXRef(se xml.StartElement) []byte { + var b []byte + for { + tk, err := sc.d.Token() + if err != nil { + panic(err) + } + switch v := tk.(type) { + case xml.CharData: + if b != nil { + panic("unexpected CharData") + } + b = []byte(string(v)) + case xml.EndElement: + if v.Name.Local != "xref" { + panic("expected ") + } + if b != nil { + return b + } + sig := attrSig(se) + switch sig { + case "target": + return []byte(fmt.Sprintf("[%s]", attrValue(se, "target"))) + case "fmt-of,rel,target", "fmt-,,rel,target": + return []byte(fmt.Sprintf("[%s, %s]", attrValue(se, "target"), attrValue(se, "rel"))) + case "fmt-of,sec,target", "fmt-,,sec,target": + return []byte(fmt.Sprintf("[section %s of %s]", attrValue(se, "sec"), attrValue(se, "target"))) + case "fmt-of,rel,sec,target": + return []byte(fmt.Sprintf("[section %s of %s, %s]", attrValue(se, "sec"), attrValue(se, "target"), attrValue(se, "rel"))) + default: + panic(fmt.Sprintf("unknown attribute signature %q in %#v", sig, fmt.Sprintf("%#v", se))) + } + default: + panic(fmt.Sprintf("unexpected tag %q", v)) + } + } +} + +var skipAnchor = map[string]bool{ + "intro": true, + "Overview": true, +} + +var skipTitle = map[string]bool{ + "Acknowledgements": true, + "Change Log": true, + "Document Organization": true, + "Conventions and Terminology": true, +} + +func skipElement(s xml.StartElement) bool { + switch s.Name.Local { + case "artwork": + return true + case "section": + for _, attr := range s.Attr { + switch attr.Name.Local { + case "anchor": + if skipAnchor[attr.Value] || strings.HasPrefix(attr.Value, "changes.since.") { + return true + } + case "title": + if skipTitle[attr.Value] { + return true + } + } + } + } + return false +} + +func readSpecCov(r io.Reader) specCoverage { + sc := specCoverage{ + coverage: map[specPart]bool{}, + d: xml.NewDecoder(r)} + sc.readSection(nil) + return sc +} + +func (sc specCoverage) addSentences(sec string, sentence string) { + for _, s := range parseSentences(sentence) { + sc.coverage[specPart{sec, s}] = false + } +} + +func (sc specCoverage) cover(sec string, sentence string) { + for _, s := range parseSentences(sentence) { + p := specPart{sec, s} + if _, ok := sc.coverage[p]; !ok { + panic(fmt.Sprintf("Not found in spec: %q, %q", sec, s)) + } + sc.coverage[specPart{sec, s}] = true + } + +} + +var whitespaceRx = regexp.MustCompile(`\s+`) + +func parseSentences(sens string) []string { + sens = strings.TrimSpace(sens) + if sens == "" { + return nil + } + ss := strings.Split(whitespaceRx.ReplaceAllString(sens, " "), ". ") + for i, s := range ss { + s = strings.TrimSpace(s) + if !strings.HasSuffix(s, ".") { + s += "." + } + ss[i] = s + } + return ss +} + +func TestSpecParseSentences(t *testing.T) { + tests := []struct { + ss string + want []string + }{ + {"Sentence 1. Sentence 2.", + []string{ + "Sentence 1.", + "Sentence 2.", + }}, + {"Sentence 1. \nSentence 2.\tSentence 3.", + []string{ + "Sentence 1.", + "Sentence 2.", + "Sentence 3.", + }}, + } + + for i, tt := range tests { + got := parseSentences(tt.ss) + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("%d: got = %q, want %q", i, got, tt.want) + } + } +} + +func TestSpecCoverage(t *testing.T) { + if !*coverSpec { + t.Skip() + } + + loadSpecOnce.Do(loadSpec) + + var ( + list []specPart + cv = defaultSpecCoverage.coverage + total = len(cv) + complete = 0 + ) + + for sp, touched := range defaultSpecCoverage.coverage { + if touched { + complete++ + } else { + list = append(list, sp) + } + } + sort.Stable(bySpecSection(list)) + + if testing.Short() && len(list) > 5 { + list = list[:5] + } + + for _, p := range list { + t.Errorf("\tSECTION %s: %s", p.section, p.sentence) + } + + t.Logf("%d/%d (%d%%) sentences covered", complete, total, (complete/total)*100) +} + +func attrSig(se xml.StartElement) string { + var names []string + for _, attr := range se.Attr { + if attr.Name.Local == "fmt" { + names = append(names, "fmt-"+attr.Value) + } else { + names = append(names, attr.Name.Local) + } + } + sort.Strings(names) + return strings.Join(names, ",") +} + +func attrValue(se xml.StartElement, attr string) string { + for _, a := range se.Attr { + if a.Name.Local == attr { + return a.Value + } + } + panic("unknown attribute " + attr) +} + +func TestSpecPartLess(t *testing.T) { + tests := []struct { + sec1, sec2 string + want bool + }{ + {"6.2.1", "6.2", false}, + {"6.2", "6.2.1", true}, + {"6.10", "6.10.1", true}, + {"6.10", "6.1.1", false}, // 10, not 1 + {"6.1", "6.1", false}, // equal, so not less + } + for _, tt := range tests { + got := (specPart{tt.sec1, "foo"}).Less(specPart{tt.sec2, "foo"}) + if got != tt.want { + t.Errorf("Less(%q, %q) = %v; want %v", tt.sec1, tt.sec2, got, tt.want) + } + } +} diff --git a/vendor/golang.org/x/net/idna/example_test.go b/vendor/golang.org/x/net/idna/example_test.go new file mode 100644 index 000000000..948f6eb20 --- /dev/null +++ b/vendor/golang.org/x/net/idna/example_test.go @@ -0,0 +1,70 @@ +// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. + +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package idna_test + +import ( + "fmt" + + "golang.org/x/net/idna" +) + +func ExampleProfile() { + // Raw Punycode has no restrictions and does no mappings. + fmt.Println(idna.ToASCII("")) + fmt.Println(idna.ToASCII("*.faß.com")) + fmt.Println(idna.Punycode.ToASCII("*.faß.com")) + + // Rewrite IDN for lookup. This (currently) uses transitional mappings to + // find a balance between IDNA2003 and IDNA2008 compatibility. + fmt.Println(idna.Lookup.ToASCII("")) + fmt.Println(idna.Lookup.ToASCII("www.faß.com")) + + // Convert an IDN to ASCII for registration purposes. This changes the + // encoding, but reports an error if the input was illformed. + fmt.Println(idna.Registration.ToASCII("")) + fmt.Println(idna.Registration.ToASCII("www.faß.com")) + + // Output: + // + // *.xn--fa-hia.com + // *.xn--fa-hia.com + // + // www.fass.com + // idna: invalid label "" + // www.xn--fa-hia.com +} + +func ExampleNew() { + var p *idna.Profile + + // Raw Punycode has no restrictions and does no mappings. + p = idna.New() + fmt.Println(p.ToASCII("*.faß.com")) + + // Do mappings. Note that star is not allowed in a DNS lookup. + p = idna.New( + idna.MapForLookup(), + idna.Transitional(true)) // Map ß -> ss + fmt.Println(p.ToASCII("*.faß.com")) + + // Lookup for registration. Also does not allow '*'. + p = idna.New(idna.ValidateForRegistration()) + fmt.Println(p.ToUnicode("*.faß.com")) + + // Set up a profile maps for lookup, but allows wild cards. + p = idna.New( + idna.MapForLookup(), + idna.Transitional(true), // Map ß -> ss + idna.StrictDomainName(false)) // Set more permissive ASCII rules. + fmt.Println(p.ToASCII("*.faß.com")) + + // Output: + // *.xn--fa-hia.com + // *.fass.com idna: disallowed rune U+002A + // *.faß.com idna: disallowed rune U+002A + // *.fass.com +} diff --git a/vendor/golang.org/x/net/idna/idna.go b/vendor/golang.org/x/net/idna/idna.go index 1810100bf..ec8232b2e 100644 --- a/vendor/golang.org/x/net/idna/idna.go +++ b/vendor/golang.org/x/net/idna/idna.go @@ -13,7 +13,7 @@ // UTS #46 is defined in http://www.unicode.org/reports/tr46. // See http://unicode.org/cldr/utility/idna.jsp for a visualization of the // differences between these two standards. -package idna +package idna // import "golang.org/x/net/idna" import ( "fmt" @@ -167,7 +167,7 @@ type options struct { bidirule func(s string) bool } -// A Profile defines the configuration of a IDNA mapper. +// A Profile defines the configuration of an IDNA mapper. type Profile struct { options } diff --git a/vendor/golang.org/x/net/idna/idna_test.go b/vendor/golang.org/x/net/idna/idna_test.go new file mode 100644 index 000000000..0b067cac9 --- /dev/null +++ b/vendor/golang.org/x/net/idna/idna_test.go @@ -0,0 +1,108 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package idna + +import ( + "testing" +) + +var idnaTestCases = [...]struct { + ascii, unicode string +}{ + // Labels. + {"books", "books"}, + {"xn--bcher-kva", "bücher"}, + + // Domains. + {"foo--xn--bar.org", "foo--xn--bar.org"}, + {"golang.org", "golang.org"}, + {"example.xn--p1ai", "example.рф"}, + {"xn--czrw28b.tw", "商業.tw"}, + {"www.xn--mller-kva.de", "www.müller.de"}, +} + +func TestIDNA(t *testing.T) { + for _, tc := range idnaTestCases { + if a, err := ToASCII(tc.unicode); err != nil { + t.Errorf("ToASCII(%q): %v", tc.unicode, err) + } else if a != tc.ascii { + t.Errorf("ToASCII(%q): got %q, want %q", tc.unicode, a, tc.ascii) + } + + if u, err := ToUnicode(tc.ascii); err != nil { + t.Errorf("ToUnicode(%q): %v", tc.ascii, err) + } else if u != tc.unicode { + t.Errorf("ToUnicode(%q): got %q, want %q", tc.ascii, u, tc.unicode) + } + } +} + +func TestIDNASeparators(t *testing.T) { + type subCase struct { + unicode string + wantASCII string + wantErr bool + } + + testCases := []struct { + name string + profile *Profile + subCases []subCase + }{ + { + name: "Punycode", profile: Punycode, + subCases: []subCase{ + {"example\u3002jp", "xn--examplejp-ck3h", false}, + {"東京\uFF0Ejp", "xn--jp-l92cn98g071o", false}, + {"大阪\uFF61jp", "xn--jp-ku9cz72u463f", false}, + }, + }, + { + name: "Lookup", profile: Lookup, + subCases: []subCase{ + {"example\u3002jp", "example.jp", false}, + {"東京\uFF0Ejp", "xn--1lqs71d.jp", false}, + {"大阪\uFF61jp", "xn--pssu33l.jp", false}, + }, + }, + { + name: "Display", profile: Display, + subCases: []subCase{ + {"example\u3002jp", "example.jp", false}, + {"東京\uFF0Ejp", "xn--1lqs71d.jp", false}, + {"大阪\uFF61jp", "xn--pssu33l.jp", false}, + }, + }, + { + name: "Registration", profile: Registration, + subCases: []subCase{ + {"example\u3002jp", "", true}, + {"東京\uFF0Ejp", "", true}, + {"大阪\uFF61jp", "", true}, + }, + }, + } + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + for _, c := range tc.subCases { + gotA, err := tc.profile.ToASCII(c.unicode) + if c.wantErr { + if err == nil { + t.Errorf("ToASCII(%q): got no error, but an error expected", c.unicode) + } + } else { + if err != nil { + t.Errorf("ToASCII(%q): got err=%v, but no error expected", c.unicode, err) + } else if gotA != c.wantASCII { + t.Errorf("ToASCII(%q): got %q, want %q", c.unicode, gotA, c.wantASCII) + } + } + } + }) + } +} + +// TODO(nigeltao): test errors, once we've specified when ToASCII and ToUnicode +// return errors. diff --git a/vendor/golang.org/x/net/idna/punycode_test.go b/vendor/golang.org/x/net/idna/punycode_test.go new file mode 100644 index 000000000..bfec81dec --- /dev/null +++ b/vendor/golang.org/x/net/idna/punycode_test.go @@ -0,0 +1,198 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package idna + +import ( + "strings" + "testing" +) + +var punycodeTestCases = [...]struct { + s, encoded string +}{ + {"", ""}, + {"-", "--"}, + {"-a", "-a-"}, + {"-a-", "-a--"}, + {"a", "a-"}, + {"a-", "a--"}, + {"a-b", "a-b-"}, + {"books", "books-"}, + {"bücher", "bcher-kva"}, + {"Hello世界", "Hello-ck1hg65u"}, + {"ü", "tda"}, + {"üý", "tdac"}, + + // The test cases below come from RFC 3492 section 7.1 with Errata 3026. + { + // (A) Arabic (Egyptian). + "\u0644\u064A\u0647\u0645\u0627\u0628\u062A\u0643\u0644" + + "\u0645\u0648\u0634\u0639\u0631\u0628\u064A\u061F", + "egbpdaj6bu4bxfgehfvwxn", + }, + { + // (B) Chinese (simplified). + "\u4ED6\u4EEC\u4E3A\u4EC0\u4E48\u4E0D\u8BF4\u4E2D\u6587", + "ihqwcrb4cv8a8dqg056pqjye", + }, + { + // (C) Chinese (traditional). + "\u4ED6\u5011\u7232\u4EC0\u9EBD\u4E0D\u8AAA\u4E2D\u6587", + "ihqwctvzc91f659drss3x8bo0yb", + }, + { + // (D) Czech. + "\u0050\u0072\u006F\u010D\u0070\u0072\u006F\u0073\u0074" + + "\u011B\u006E\u0065\u006D\u006C\u0075\u0076\u00ED\u010D" + + "\u0065\u0073\u006B\u0079", + "Proprostnemluvesky-uyb24dma41a", + }, + { + // (E) Hebrew. + "\u05DC\u05DE\u05D4\u05D4\u05DD\u05E4\u05E9\u05D5\u05D8" + + "\u05DC\u05D0\u05DE\u05D3\u05D1\u05E8\u05D9\u05DD\u05E2" + + "\u05D1\u05E8\u05D9\u05EA", + "4dbcagdahymbxekheh6e0a7fei0b", + }, + { + // (F) Hindi (Devanagari). + "\u092F\u0939\u0932\u094B\u0917\u0939\u093F\u0928\u094D" + + "\u0926\u0940\u0915\u094D\u092F\u094B\u0902\u0928\u0939" + + "\u0940\u0902\u092C\u094B\u0932\u0938\u0915\u0924\u0947" + + "\u0939\u0948\u0902", + "i1baa7eci9glrd9b2ae1bj0hfcgg6iyaf8o0a1dig0cd", + }, + { + // (G) Japanese (kanji and hiragana). + "\u306A\u305C\u307F\u3093\u306A\u65E5\u672C\u8A9E\u3092" + + "\u8A71\u3057\u3066\u304F\u308C\u306A\u3044\u306E\u304B", + "n8jok5ay5dzabd5bym9f0cm5685rrjetr6pdxa", + }, + { + // (H) Korean (Hangul syllables). + "\uC138\uACC4\uC758\uBAA8\uB4E0\uC0AC\uB78C\uB4E4\uC774" + + "\uD55C\uAD6D\uC5B4\uB97C\uC774\uD574\uD55C\uB2E4\uBA74" + + "\uC5BC\uB9C8\uB098\uC88B\uC744\uAE4C", + "989aomsvi5e83db1d2a355cv1e0vak1dwrv93d5xbh15a0dt30a5j" + + "psd879ccm6fea98c", + }, + { + // (I) Russian (Cyrillic). + "\u043F\u043E\u0447\u0435\u043C\u0443\u0436\u0435\u043E" + + "\u043D\u0438\u043D\u0435\u0433\u043E\u0432\u043E\u0440" + + "\u044F\u0442\u043F\u043E\u0440\u0443\u0441\u0441\u043A" + + "\u0438", + "b1abfaaepdrnnbgefbadotcwatmq2g4l", + }, + { + // (J) Spanish. + "\u0050\u006F\u0072\u0071\u0075\u00E9\u006E\u006F\u0070" + + "\u0075\u0065\u0064\u0065\u006E\u0073\u0069\u006D\u0070" + + "\u006C\u0065\u006D\u0065\u006E\u0074\u0065\u0068\u0061" + + "\u0062\u006C\u0061\u0072\u0065\u006E\u0045\u0073\u0070" + + "\u0061\u00F1\u006F\u006C", + "PorqunopuedensimplementehablarenEspaol-fmd56a", + }, + { + // (K) Vietnamese. + "\u0054\u1EA1\u0069\u0073\u0061\u006F\u0068\u1ECD\u006B" + + "\u0068\u00F4\u006E\u0067\u0074\u0068\u1EC3\u0063\u0068" + + "\u1EC9\u006E\u00F3\u0069\u0074\u0069\u1EBF\u006E\u0067" + + "\u0056\u0069\u1EC7\u0074", + "TisaohkhngthchnitingVit-kjcr8268qyxafd2f1b9g", + }, + { + // (L) 3B. + "\u0033\u5E74\u0042\u7D44\u91D1\u516B\u5148\u751F", + "3B-ww4c5e180e575a65lsy2b", + }, + { + // (M) -with-SUPER-MONKEYS. + "\u5B89\u5BA4\u5948\u7F8E\u6075\u002D\u0077\u0069\u0074" + + "\u0068\u002D\u0053\u0055\u0050\u0045\u0052\u002D\u004D" + + "\u004F\u004E\u004B\u0045\u0059\u0053", + "-with-SUPER-MONKEYS-pc58ag80a8qai00g7n9n", + }, + { + // (N) Hello-Another-Way-. + "\u0048\u0065\u006C\u006C\u006F\u002D\u0041\u006E\u006F" + + "\u0074\u0068\u0065\u0072\u002D\u0057\u0061\u0079\u002D" + + "\u305D\u308C\u305E\u308C\u306E\u5834\u6240", + "Hello-Another-Way--fc4qua05auwb3674vfr0b", + }, + { + // (O) 2. + "\u3072\u3068\u3064\u5C4B\u6839\u306E\u4E0B\u0032", + "2-u9tlzr9756bt3uc0v", + }, + { + // (P) MajiKoi5 + "\u004D\u0061\u006A\u0069\u3067\u004B\u006F\u0069\u3059" + + "\u308B\u0035\u79D2\u524D", + "MajiKoi5-783gue6qz075azm5e", + }, + { + // (Q) de + "\u30D1\u30D5\u30A3\u30FC\u0064\u0065\u30EB\u30F3\u30D0", + "de-jg4avhby1noc0d", + }, + { + // (R) + "\u305D\u306E\u30B9\u30D4\u30FC\u30C9\u3067", + "d9juau41awczczp", + }, + { + // (S) -> $1.00 <- + "\u002D\u003E\u0020\u0024\u0031\u002E\u0030\u0030\u0020" + + "\u003C\u002D", + "-> $1.00 <--", + }, +} + +func TestPunycode(t *testing.T) { + for _, tc := range punycodeTestCases { + if got, err := decode(tc.encoded); err != nil { + t.Errorf("decode(%q): %v", tc.encoded, err) + } else if got != tc.s { + t.Errorf("decode(%q): got %q, want %q", tc.encoded, got, tc.s) + } + + if got, err := encode("", tc.s); err != nil { + t.Errorf(`encode("", %q): %v`, tc.s, err) + } else if got != tc.encoded { + t.Errorf(`encode("", %q): got %q, want %q`, tc.s, got, tc.encoded) + } + } +} + +var punycodeErrorTestCases = [...]string{ + "decode -", // A sole '-' is invalid. + "decode foo\x00bar", // '\x00' is not in [0-9A-Za-z]. + "decode foo#bar", // '#' is not in [0-9A-Za-z]. + "decode foo\u00A3bar", // '\u00A3' is not in [0-9A-Za-z]. + "decode 9", // "9a" decodes to codepoint \u00A3; "9" is truncated. + "decode 99999a", // "99999a" decodes to codepoint \U0048A3C1, which is > \U0010FFFF. + "decode 9999999999a", // "9999999999a" overflows the int32 calculation. + + "encode " + strings.Repeat("x", 65536) + "\uff00", // int32 overflow. +} + +func TestPunycodeErrors(t *testing.T) { + for _, tc := range punycodeErrorTestCases { + var err error + switch { + case strings.HasPrefix(tc, "decode "): + _, err = decode(tc[7:]) + case strings.HasPrefix(tc, "encode "): + _, err = encode("", tc[7:]) + } + if err == nil { + if len(tc) > 256 { + tc = tc[:100] + "..." + tc[len(tc)-100:] + } + t.Errorf("no error for %s", tc) + } + } +} diff --git a/vendor/golang.org/x/net/internal/timeseries/timeseries.go b/vendor/golang.org/x/net/internal/timeseries/timeseries.go new file mode 100644 index 000000000..685f0e7ea --- /dev/null +++ b/vendor/golang.org/x/net/internal/timeseries/timeseries.go @@ -0,0 +1,525 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package timeseries implements a time series structure for stats collection. +package timeseries // import "golang.org/x/net/internal/timeseries" + +import ( + "fmt" + "log" + "time" +) + +const ( + timeSeriesNumBuckets = 64 + minuteHourSeriesNumBuckets = 60 +) + +var timeSeriesResolutions = []time.Duration{ + 1 * time.Second, + 10 * time.Second, + 1 * time.Minute, + 10 * time.Minute, + 1 * time.Hour, + 6 * time.Hour, + 24 * time.Hour, // 1 day + 7 * 24 * time.Hour, // 1 week + 4 * 7 * 24 * time.Hour, // 4 weeks + 16 * 7 * 24 * time.Hour, // 16 weeks +} + +var minuteHourSeriesResolutions = []time.Duration{ + 1 * time.Second, + 1 * time.Minute, +} + +// An Observable is a kind of data that can be aggregated in a time series. +type Observable interface { + Multiply(ratio float64) // Multiplies the data in self by a given ratio + Add(other Observable) // Adds the data from a different observation to self + Clear() // Clears the observation so it can be reused. + CopyFrom(other Observable) // Copies the contents of a given observation to self +} + +// Float attaches the methods of Observable to a float64. +type Float float64 + +// NewFloat returns a Float. +func NewFloat() Observable { + f := Float(0) + return &f +} + +// String returns the float as a string. +func (f *Float) String() string { return fmt.Sprintf("%g", f.Value()) } + +// Value returns the float's value. +func (f *Float) Value() float64 { return float64(*f) } + +func (f *Float) Multiply(ratio float64) { *f *= Float(ratio) } + +func (f *Float) Add(other Observable) { + o := other.(*Float) + *f += *o +} + +func (f *Float) Clear() { *f = 0 } + +func (f *Float) CopyFrom(other Observable) { + o := other.(*Float) + *f = *o +} + +// A Clock tells the current time. +type Clock interface { + Time() time.Time +} + +type defaultClock int + +var defaultClockInstance defaultClock + +func (defaultClock) Time() time.Time { return time.Now() } + +// Information kept per level. Each level consists of a circular list of +// observations. The start of the level may be derived from end and the +// len(buckets) * sizeInMillis. +type tsLevel struct { + oldest int // index to oldest bucketed Observable + newest int // index to newest bucketed Observable + end time.Time // end timestamp for this level + size time.Duration // duration of the bucketed Observable + buckets []Observable // collections of observations + provider func() Observable // used for creating new Observable +} + +func (l *tsLevel) Clear() { + l.oldest = 0 + l.newest = len(l.buckets) - 1 + l.end = time.Time{} + for i := range l.buckets { + if l.buckets[i] != nil { + l.buckets[i].Clear() + l.buckets[i] = nil + } + } +} + +func (l *tsLevel) InitLevel(size time.Duration, numBuckets int, f func() Observable) { + l.size = size + l.provider = f + l.buckets = make([]Observable, numBuckets) +} + +// Keeps a sequence of levels. Each level is responsible for storing data at +// a given resolution. For example, the first level stores data at a one +// minute resolution while the second level stores data at a one hour +// resolution. + +// Each level is represented by a sequence of buckets. Each bucket spans an +// interval equal to the resolution of the level. New observations are added +// to the last bucket. +type timeSeries struct { + provider func() Observable // make more Observable + numBuckets int // number of buckets in each level + levels []*tsLevel // levels of bucketed Observable + lastAdd time.Time // time of last Observable tracked + total Observable // convenient aggregation of all Observable + clock Clock // Clock for getting current time + pending Observable // observations not yet bucketed + pendingTime time.Time // what time are we keeping in pending + dirty bool // if there are pending observations +} + +// init initializes a level according to the supplied criteria. +func (ts *timeSeries) init(resolutions []time.Duration, f func() Observable, numBuckets int, clock Clock) { + ts.provider = f + ts.numBuckets = numBuckets + ts.clock = clock + ts.levels = make([]*tsLevel, len(resolutions)) + + for i := range resolutions { + if i > 0 && resolutions[i-1] >= resolutions[i] { + log.Print("timeseries: resolutions must be monotonically increasing") + break + } + newLevel := new(tsLevel) + newLevel.InitLevel(resolutions[i], ts.numBuckets, ts.provider) + ts.levels[i] = newLevel + } + + ts.Clear() +} + +// Clear removes all observations from the time series. +func (ts *timeSeries) Clear() { + ts.lastAdd = time.Time{} + ts.total = ts.resetObservation(ts.total) + ts.pending = ts.resetObservation(ts.pending) + ts.pendingTime = time.Time{} + ts.dirty = false + + for i := range ts.levels { + ts.levels[i].Clear() + } +} + +// Add records an observation at the current time. +func (ts *timeSeries) Add(observation Observable) { + ts.AddWithTime(observation, ts.clock.Time()) +} + +// AddWithTime records an observation at the specified time. +func (ts *timeSeries) AddWithTime(observation Observable, t time.Time) { + + smallBucketDuration := ts.levels[0].size + + if t.After(ts.lastAdd) { + ts.lastAdd = t + } + + if t.After(ts.pendingTime) { + ts.advance(t) + ts.mergePendingUpdates() + ts.pendingTime = ts.levels[0].end + ts.pending.CopyFrom(observation) + ts.dirty = true + } else if t.After(ts.pendingTime.Add(-1 * smallBucketDuration)) { + // The observation is close enough to go into the pending bucket. + // This compensates for clock skewing and small scheduling delays + // by letting the update stay in the fast path. + ts.pending.Add(observation) + ts.dirty = true + } else { + ts.mergeValue(observation, t) + } +} + +// mergeValue inserts the observation at the specified time in the past into all levels. +func (ts *timeSeries) mergeValue(observation Observable, t time.Time) { + for _, level := range ts.levels { + index := (ts.numBuckets - 1) - int(level.end.Sub(t)/level.size) + if 0 <= index && index < ts.numBuckets { + bucketNumber := (level.oldest + index) % ts.numBuckets + if level.buckets[bucketNumber] == nil { + level.buckets[bucketNumber] = level.provider() + } + level.buckets[bucketNumber].Add(observation) + } + } + ts.total.Add(observation) +} + +// mergePendingUpdates applies the pending updates into all levels. +func (ts *timeSeries) mergePendingUpdates() { + if ts.dirty { + ts.mergeValue(ts.pending, ts.pendingTime) + ts.pending = ts.resetObservation(ts.pending) + ts.dirty = false + } +} + +// advance cycles the buckets at each level until the latest bucket in +// each level can hold the time specified. +func (ts *timeSeries) advance(t time.Time) { + if !t.After(ts.levels[0].end) { + return + } + for i := 0; i < len(ts.levels); i++ { + level := ts.levels[i] + if !level.end.Before(t) { + break + } + + // If the time is sufficiently far, just clear the level and advance + // directly. + if !t.Before(level.end.Add(level.size * time.Duration(ts.numBuckets))) { + for _, b := range level.buckets { + ts.resetObservation(b) + } + level.end = time.Unix(0, (t.UnixNano()/level.size.Nanoseconds())*level.size.Nanoseconds()) + } + + for t.After(level.end) { + level.end = level.end.Add(level.size) + level.newest = level.oldest + level.oldest = (level.oldest + 1) % ts.numBuckets + ts.resetObservation(level.buckets[level.newest]) + } + + t = level.end + } +} + +// Latest returns the sum of the num latest buckets from the level. +func (ts *timeSeries) Latest(level, num int) Observable { + now := ts.clock.Time() + if ts.levels[0].end.Before(now) { + ts.advance(now) + } + + ts.mergePendingUpdates() + + result := ts.provider() + l := ts.levels[level] + index := l.newest + + for i := 0; i < num; i++ { + if l.buckets[index] != nil { + result.Add(l.buckets[index]) + } + if index == 0 { + index = ts.numBuckets + } + index-- + } + + return result +} + +// LatestBuckets returns a copy of the num latest buckets from level. +func (ts *timeSeries) LatestBuckets(level, num int) []Observable { + if level < 0 || level > len(ts.levels) { + log.Print("timeseries: bad level argument: ", level) + return nil + } + if num < 0 || num >= ts.numBuckets { + log.Print("timeseries: bad num argument: ", num) + return nil + } + + results := make([]Observable, num) + now := ts.clock.Time() + if ts.levels[0].end.Before(now) { + ts.advance(now) + } + + ts.mergePendingUpdates() + + l := ts.levels[level] + index := l.newest + + for i := 0; i < num; i++ { + result := ts.provider() + results[i] = result + if l.buckets[index] != nil { + result.CopyFrom(l.buckets[index]) + } + + if index == 0 { + index = ts.numBuckets + } + index -= 1 + } + return results +} + +// ScaleBy updates observations by scaling by factor. +func (ts *timeSeries) ScaleBy(factor float64) { + for _, l := range ts.levels { + for i := 0; i < ts.numBuckets; i++ { + l.buckets[i].Multiply(factor) + } + } + + ts.total.Multiply(factor) + ts.pending.Multiply(factor) +} + +// Range returns the sum of observations added over the specified time range. +// If start or finish times don't fall on bucket boundaries of the same +// level, then return values are approximate answers. +func (ts *timeSeries) Range(start, finish time.Time) Observable { + return ts.ComputeRange(start, finish, 1)[0] +} + +// Recent returns the sum of observations from the last delta. +func (ts *timeSeries) Recent(delta time.Duration) Observable { + now := ts.clock.Time() + return ts.Range(now.Add(-delta), now) +} + +// Total returns the total of all observations. +func (ts *timeSeries) Total() Observable { + ts.mergePendingUpdates() + return ts.total +} + +// ComputeRange computes a specified number of values into a slice using +// the observations recorded over the specified time period. The return +// values are approximate if the start or finish times don't fall on the +// bucket boundaries at the same level or if the number of buckets spanning +// the range is not an integral multiple of num. +func (ts *timeSeries) ComputeRange(start, finish time.Time, num int) []Observable { + if start.After(finish) { + log.Printf("timeseries: start > finish, %v>%v", start, finish) + return nil + } + + if num < 0 { + log.Printf("timeseries: num < 0, %v", num) + return nil + } + + results := make([]Observable, num) + + for _, l := range ts.levels { + if !start.Before(l.end.Add(-l.size * time.Duration(ts.numBuckets))) { + ts.extract(l, start, finish, num, results) + return results + } + } + + // Failed to find a level that covers the desired range. So just + // extract from the last level, even if it doesn't cover the entire + // desired range. + ts.extract(ts.levels[len(ts.levels)-1], start, finish, num, results) + + return results +} + +// RecentList returns the specified number of values in slice over the most +// recent time period of the specified range. +func (ts *timeSeries) RecentList(delta time.Duration, num int) []Observable { + if delta < 0 { + return nil + } + now := ts.clock.Time() + return ts.ComputeRange(now.Add(-delta), now, num) +} + +// extract returns a slice of specified number of observations from a given +// level over a given range. +func (ts *timeSeries) extract(l *tsLevel, start, finish time.Time, num int, results []Observable) { + ts.mergePendingUpdates() + + srcInterval := l.size + dstInterval := finish.Sub(start) / time.Duration(num) + dstStart := start + srcStart := l.end.Add(-srcInterval * time.Duration(ts.numBuckets)) + + srcIndex := 0 + + // Where should scanning start? + if dstStart.After(srcStart) { + advance := dstStart.Sub(srcStart) / srcInterval + srcIndex += int(advance) + srcStart = srcStart.Add(advance * srcInterval) + } + + // The i'th value is computed as show below. + // interval = (finish/start)/num + // i'th value = sum of observation in range + // [ start + i * interval, + // start + (i + 1) * interval ) + for i := 0; i < num; i++ { + results[i] = ts.resetObservation(results[i]) + dstEnd := dstStart.Add(dstInterval) + for srcIndex < ts.numBuckets && srcStart.Before(dstEnd) { + srcEnd := srcStart.Add(srcInterval) + if srcEnd.After(ts.lastAdd) { + srcEnd = ts.lastAdd + } + + if !srcEnd.Before(dstStart) { + srcValue := l.buckets[(srcIndex+l.oldest)%ts.numBuckets] + if !srcStart.Before(dstStart) && !srcEnd.After(dstEnd) { + // dst completely contains src. + if srcValue != nil { + results[i].Add(srcValue) + } + } else { + // dst partially overlaps src. + overlapStart := maxTime(srcStart, dstStart) + overlapEnd := minTime(srcEnd, dstEnd) + base := srcEnd.Sub(srcStart) + fraction := overlapEnd.Sub(overlapStart).Seconds() / base.Seconds() + + used := ts.provider() + if srcValue != nil { + used.CopyFrom(srcValue) + } + used.Multiply(fraction) + results[i].Add(used) + } + + if srcEnd.After(dstEnd) { + break + } + } + srcIndex++ + srcStart = srcStart.Add(srcInterval) + } + dstStart = dstStart.Add(dstInterval) + } +} + +// resetObservation clears the content so the struct may be reused. +func (ts *timeSeries) resetObservation(observation Observable) Observable { + if observation == nil { + observation = ts.provider() + } else { + observation.Clear() + } + return observation +} + +// TimeSeries tracks data at granularities from 1 second to 16 weeks. +type TimeSeries struct { + timeSeries +} + +// NewTimeSeries creates a new TimeSeries using the function provided for creating new Observable. +func NewTimeSeries(f func() Observable) *TimeSeries { + return NewTimeSeriesWithClock(f, defaultClockInstance) +} + +// NewTimeSeriesWithClock creates a new TimeSeries using the function provided for creating new Observable and the clock for +// assigning timestamps. +func NewTimeSeriesWithClock(f func() Observable, clock Clock) *TimeSeries { + ts := new(TimeSeries) + ts.timeSeries.init(timeSeriesResolutions, f, timeSeriesNumBuckets, clock) + return ts +} + +// MinuteHourSeries tracks data at granularities of 1 minute and 1 hour. +type MinuteHourSeries struct { + timeSeries +} + +// NewMinuteHourSeries creates a new MinuteHourSeries using the function provided for creating new Observable. +func NewMinuteHourSeries(f func() Observable) *MinuteHourSeries { + return NewMinuteHourSeriesWithClock(f, defaultClockInstance) +} + +// NewMinuteHourSeriesWithClock creates a new MinuteHourSeries using the function provided for creating new Observable and the clock for +// assigning timestamps. +func NewMinuteHourSeriesWithClock(f func() Observable, clock Clock) *MinuteHourSeries { + ts := new(MinuteHourSeries) + ts.timeSeries.init(minuteHourSeriesResolutions, f, + minuteHourSeriesNumBuckets, clock) + return ts +} + +func (ts *MinuteHourSeries) Minute() Observable { + return ts.timeSeries.Latest(0, 60) +} + +func (ts *MinuteHourSeries) Hour() Observable { + return ts.timeSeries.Latest(1, 60) +} + +func minTime(a, b time.Time) time.Time { + if a.Before(b) { + return a + } + return b +} + +func maxTime(a, b time.Time) time.Time { + if a.After(b) { + return a + } + return b +} diff --git a/vendor/golang.org/x/net/internal/timeseries/timeseries_test.go b/vendor/golang.org/x/net/internal/timeseries/timeseries_test.go new file mode 100644 index 000000000..66325a912 --- /dev/null +++ b/vendor/golang.org/x/net/internal/timeseries/timeseries_test.go @@ -0,0 +1,170 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package timeseries + +import ( + "math" + "testing" + "time" +) + +func isNear(x *Float, y float64, tolerance float64) bool { + return math.Abs(x.Value()-y) < tolerance +} + +func isApproximate(x *Float, y float64) bool { + return isNear(x, y, 1e-2) +} + +func checkApproximate(t *testing.T, o Observable, y float64) { + x := o.(*Float) + if !isApproximate(x, y) { + t.Errorf("Wanted %g, got %g", y, x.Value()) + } +} + +func checkNear(t *testing.T, o Observable, y, tolerance float64) { + x := o.(*Float) + if !isNear(x, y, tolerance) { + t.Errorf("Wanted %g +- %g, got %g", y, tolerance, x.Value()) + } +} + +var baseTime = time.Date(2013, 1, 1, 0, 0, 0, 0, time.UTC) + +func tu(s int64) time.Time { + return baseTime.Add(time.Duration(s) * time.Second) +} + +func tu2(s int64, ns int64) time.Time { + return baseTime.Add(time.Duration(s)*time.Second + time.Duration(ns)*time.Nanosecond) +} + +func TestBasicTimeSeries(t *testing.T) { + ts := NewTimeSeries(NewFloat) + fo := new(Float) + *fo = Float(10) + ts.AddWithTime(fo, tu(1)) + ts.AddWithTime(fo, tu(1)) + ts.AddWithTime(fo, tu(1)) + ts.AddWithTime(fo, tu(1)) + checkApproximate(t, ts.Range(tu(0), tu(1)), 40) + checkApproximate(t, ts.Total(), 40) + ts.AddWithTime(fo, tu(3)) + ts.AddWithTime(fo, tu(3)) + ts.AddWithTime(fo, tu(3)) + checkApproximate(t, ts.Range(tu(0), tu(2)), 40) + checkApproximate(t, ts.Range(tu(2), tu(4)), 30) + checkApproximate(t, ts.Total(), 70) + ts.AddWithTime(fo, tu(1)) + ts.AddWithTime(fo, tu(1)) + checkApproximate(t, ts.Range(tu(0), tu(2)), 60) + checkApproximate(t, ts.Range(tu(2), tu(4)), 30) + checkApproximate(t, ts.Total(), 90) + *fo = Float(100) + ts.AddWithTime(fo, tu(100)) + checkApproximate(t, ts.Range(tu(99), tu(100)), 100) + checkApproximate(t, ts.Range(tu(0), tu(4)), 36) + checkApproximate(t, ts.Total(), 190) + *fo = Float(10) + ts.AddWithTime(fo, tu(1)) + ts.AddWithTime(fo, tu(1)) + checkApproximate(t, ts.Range(tu(0), tu(4)), 44) + checkApproximate(t, ts.Range(tu(37), tu2(100, 100e6)), 100) + checkApproximate(t, ts.Range(tu(50), tu2(100, 100e6)), 100) + checkApproximate(t, ts.Range(tu(99), tu2(100, 100e6)), 100) + checkApproximate(t, ts.Total(), 210) + + for i, l := range ts.ComputeRange(tu(36), tu(100), 64) { + if i == 63 { + checkApproximate(t, l, 100) + } else { + checkApproximate(t, l, 0) + } + } + + checkApproximate(t, ts.Range(tu(0), tu(100)), 210) + checkApproximate(t, ts.Range(tu(10), tu(100)), 100) + + for i, l := range ts.ComputeRange(tu(0), tu(100), 100) { + if i < 10 { + checkApproximate(t, l, 11) + } else if i >= 90 { + checkApproximate(t, l, 10) + } else { + checkApproximate(t, l, 0) + } + } +} + +func TestFloat(t *testing.T) { + f := Float(1) + if g, w := f.String(), "1"; g != w { + t.Errorf("Float(1).String = %q; want %q", g, w) + } + f2 := Float(2) + var o Observable = &f2 + f.Add(o) + if g, w := f.Value(), 3.0; g != w { + t.Errorf("Float post-add = %v; want %v", g, w) + } + f.Multiply(2) + if g, w := f.Value(), 6.0; g != w { + t.Errorf("Float post-multiply = %v; want %v", g, w) + } + f.Clear() + if g, w := f.Value(), 0.0; g != w { + t.Errorf("Float post-clear = %v; want %v", g, w) + } + f.CopyFrom(&f2) + if g, w := f.Value(), 2.0; g != w { + t.Errorf("Float post-CopyFrom = %v; want %v", g, w) + } +} + +type mockClock struct { + time time.Time +} + +func (m *mockClock) Time() time.Time { return m.time } +func (m *mockClock) Set(t time.Time) { m.time = t } + +const buckets = 6 + +var testResolutions = []time.Duration{ + 10 * time.Second, // level holds one minute of observations + 100 * time.Second, // level holds ten minutes of observations + 10 * time.Minute, // level holds one hour of observations +} + +// TestTimeSeries uses a small number of buckets to force a higher +// error rate on approximations from the timeseries. +type TestTimeSeries struct { + timeSeries +} + +func TestExpectedErrorRate(t *testing.T) { + ts := new(TestTimeSeries) + fake := new(mockClock) + fake.Set(time.Now()) + ts.timeSeries.init(testResolutions, NewFloat, buckets, fake) + for i := 1; i <= 61*61; i++ { + fake.Set(fake.Time().Add(1 * time.Second)) + ob := Float(1) + ts.AddWithTime(&ob, fake.Time()) + + // The results should be accurate within one missing bucket (1/6) of the observations recorded. + checkNear(t, ts.Latest(0, buckets), min(float64(i), 60), 10) + checkNear(t, ts.Latest(1, buckets), min(float64(i), 600), 100) + checkNear(t, ts.Latest(2, buckets), min(float64(i), 3600), 600) + } +} + +func min(a, b float64) float64 { + if a < b { + return a + } + return b +} diff --git a/vendor/golang.org/x/net/lex/httplex/httplex_test.go b/vendor/golang.org/x/net/lex/httplex/httplex_test.go new file mode 100644 index 000000000..f47adc939 --- /dev/null +++ b/vendor/golang.org/x/net/lex/httplex/httplex_test.go @@ -0,0 +1,119 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package httplex + +import ( + "testing" +) + +func isChar(c rune) bool { return c <= 127 } + +func isCtl(c rune) bool { return c <= 31 || c == 127 } + +func isSeparator(c rune) bool { + switch c { + case '(', ')', '<', '>', '@', ',', ';', ':', '\\', '"', '/', '[', ']', '?', '=', '{', '}', ' ', '\t': + return true + } + return false +} + +func TestIsToken(t *testing.T) { + for i := 0; i <= 130; i++ { + r := rune(i) + expected := isChar(r) && !isCtl(r) && !isSeparator(r) + if IsTokenRune(r) != expected { + t.Errorf("isToken(0x%x) = %v", r, !expected) + } + } +} + +func TestHeaderValuesContainsToken(t *testing.T) { + tests := []struct { + vals []string + token string + want bool + }{ + { + vals: []string{"foo"}, + token: "foo", + want: true, + }, + { + vals: []string{"bar", "foo"}, + token: "foo", + want: true, + }, + { + vals: []string{"foo"}, + token: "FOO", + want: true, + }, + { + vals: []string{"foo"}, + token: "bar", + want: false, + }, + { + vals: []string{" foo "}, + token: "FOO", + want: true, + }, + { + vals: []string{"foo,bar"}, + token: "FOO", + want: true, + }, + { + vals: []string{"bar,foo,bar"}, + token: "FOO", + want: true, + }, + { + vals: []string{"bar , foo"}, + token: "FOO", + want: true, + }, + { + vals: []string{"foo ,bar "}, + token: "FOO", + want: true, + }, + { + vals: []string{"bar, foo ,bar"}, + token: "FOO", + want: true, + }, + { + vals: []string{"bar , foo"}, + token: "FOO", + want: true, + }, + } + for _, tt := range tests { + got := HeaderValuesContainsToken(tt.vals, tt.token) + if got != tt.want { + t.Errorf("headerValuesContainsToken(%q, %q) = %v; want %v", tt.vals, tt.token, got, tt.want) + } + } +} + +func TestPunycodeHostPort(t *testing.T) { + tests := []struct { + in, want string + }{ + {"www.google.com", "www.google.com"}, + {"гофер.рф", "xn--c1ae0ajs.xn--p1ai"}, + {"bücher.de", "xn--bcher-kva.de"}, + {"bücher.de:8080", "xn--bcher-kva.de:8080"}, + {"[1::6]:8080", "[1::6]:8080"}, + } + for _, tt := range tests { + got, err := PunycodeHostPort(tt.in) + if tt.want != got || err != nil { + t.Errorf("PunycodeHostPort(%q) = %q, %v, want %q, nil", tt.in, got, err, tt.want) + } + } +} diff --git a/vendor/golang.org/x/net/trace/events.go b/vendor/golang.org/x/net/trace/events.go new file mode 100644 index 000000000..c646a6952 --- /dev/null +++ b/vendor/golang.org/x/net/trace/events.go @@ -0,0 +1,532 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package trace + +import ( + "bytes" + "fmt" + "html/template" + "io" + "log" + "net/http" + "runtime" + "sort" + "strconv" + "strings" + "sync" + "sync/atomic" + "text/tabwriter" + "time" +) + +const maxEventsPerLog = 100 + +type bucket struct { + MaxErrAge time.Duration + String string +} + +var buckets = []bucket{ + {0, "total"}, + {10 * time.Second, "errs<10s"}, + {1 * time.Minute, "errs<1m"}, + {10 * time.Minute, "errs<10m"}, + {1 * time.Hour, "errs<1h"}, + {10 * time.Hour, "errs<10h"}, + {24000 * time.Hour, "errors"}, +} + +// RenderEvents renders the HTML page typically served at /debug/events. +// It does not do any auth checking. The request may be nil. +// +// Most users will use the Events handler. +func RenderEvents(w http.ResponseWriter, req *http.Request, sensitive bool) { + now := time.Now() + data := &struct { + Families []string // family names + Buckets []bucket + Counts [][]int // eventLog count per family/bucket + + // Set when a bucket has been selected. + Family string + Bucket int + EventLogs eventLogs + Expanded bool + }{ + Buckets: buckets, + } + + data.Families = make([]string, 0, len(families)) + famMu.RLock() + for name := range families { + data.Families = append(data.Families, name) + } + famMu.RUnlock() + sort.Strings(data.Families) + + // Count the number of eventLogs in each family for each error age. + data.Counts = make([][]int, len(data.Families)) + for i, name := range data.Families { + // TODO(sameer): move this loop under the family lock. + f := getEventFamily(name) + data.Counts[i] = make([]int, len(data.Buckets)) + for j, b := range data.Buckets { + data.Counts[i][j] = f.Count(now, b.MaxErrAge) + } + } + + if req != nil { + var ok bool + data.Family, data.Bucket, ok = parseEventsArgs(req) + if !ok { + // No-op + } else { + data.EventLogs = getEventFamily(data.Family).Copy(now, buckets[data.Bucket].MaxErrAge) + } + if data.EventLogs != nil { + defer data.EventLogs.Free() + sort.Sort(data.EventLogs) + } + if exp, err := strconv.ParseBool(req.FormValue("exp")); err == nil { + data.Expanded = exp + } + } + + famMu.RLock() + defer famMu.RUnlock() + if err := eventsTmpl().Execute(w, data); err != nil { + log.Printf("net/trace: Failed executing template: %v", err) + } +} + +func parseEventsArgs(req *http.Request) (fam string, b int, ok bool) { + fam, bStr := req.FormValue("fam"), req.FormValue("b") + if fam == "" || bStr == "" { + return "", 0, false + } + b, err := strconv.Atoi(bStr) + if err != nil || b < 0 || b >= len(buckets) { + return "", 0, false + } + return fam, b, true +} + +// An EventLog provides a log of events associated with a specific object. +type EventLog interface { + // Printf formats its arguments with fmt.Sprintf and adds the + // result to the event log. + Printf(format string, a ...interface{}) + + // Errorf is like Printf, but it marks this event as an error. + Errorf(format string, a ...interface{}) + + // Finish declares that this event log is complete. + // The event log should not be used after calling this method. + Finish() +} + +// NewEventLog returns a new EventLog with the specified family name +// and title. +func NewEventLog(family, title string) EventLog { + el := newEventLog() + el.ref() + el.Family, el.Title = family, title + el.Start = time.Now() + el.events = make([]logEntry, 0, maxEventsPerLog) + el.stack = make([]uintptr, 32) + n := runtime.Callers(2, el.stack) + el.stack = el.stack[:n] + + getEventFamily(family).add(el) + return el +} + +func (el *eventLog) Finish() { + getEventFamily(el.Family).remove(el) + el.unref() // matches ref in New +} + +var ( + famMu sync.RWMutex + families = make(map[string]*eventFamily) // family name => family +) + +func getEventFamily(fam string) *eventFamily { + famMu.Lock() + defer famMu.Unlock() + f := families[fam] + if f == nil { + f = &eventFamily{} + families[fam] = f + } + return f +} + +type eventFamily struct { + mu sync.RWMutex + eventLogs eventLogs +} + +func (f *eventFamily) add(el *eventLog) { + f.mu.Lock() + f.eventLogs = append(f.eventLogs, el) + f.mu.Unlock() +} + +func (f *eventFamily) remove(el *eventLog) { + f.mu.Lock() + defer f.mu.Unlock() + for i, el0 := range f.eventLogs { + if el == el0 { + copy(f.eventLogs[i:], f.eventLogs[i+1:]) + f.eventLogs = f.eventLogs[:len(f.eventLogs)-1] + return + } + } +} + +func (f *eventFamily) Count(now time.Time, maxErrAge time.Duration) (n int) { + f.mu.RLock() + defer f.mu.RUnlock() + for _, el := range f.eventLogs { + if el.hasRecentError(now, maxErrAge) { + n++ + } + } + return +} + +func (f *eventFamily) Copy(now time.Time, maxErrAge time.Duration) (els eventLogs) { + f.mu.RLock() + defer f.mu.RUnlock() + els = make(eventLogs, 0, len(f.eventLogs)) + for _, el := range f.eventLogs { + if el.hasRecentError(now, maxErrAge) { + el.ref() + els = append(els, el) + } + } + return +} + +type eventLogs []*eventLog + +// Free calls unref on each element of the list. +func (els eventLogs) Free() { + for _, el := range els { + el.unref() + } +} + +// eventLogs may be sorted in reverse chronological order. +func (els eventLogs) Len() int { return len(els) } +func (els eventLogs) Less(i, j int) bool { return els[i].Start.After(els[j].Start) } +func (els eventLogs) Swap(i, j int) { els[i], els[j] = els[j], els[i] } + +// A logEntry is a timestamped log entry in an event log. +type logEntry struct { + When time.Time + Elapsed time.Duration // since previous event in log + NewDay bool // whether this event is on a different day to the previous event + What string + IsErr bool +} + +// WhenString returns a string representation of the elapsed time of the event. +// It will include the date if midnight was crossed. +func (e logEntry) WhenString() string { + if e.NewDay { + return e.When.Format("2006/01/02 15:04:05.000000") + } + return e.When.Format("15:04:05.000000") +} + +// An eventLog represents an active event log. +type eventLog struct { + // Family is the top-level grouping of event logs to which this belongs. + Family string + + // Title is the title of this event log. + Title string + + // Timing information. + Start time.Time + + // Call stack where this event log was created. + stack []uintptr + + // Append-only sequence of events. + // + // TODO(sameer): change this to a ring buffer to avoid the array copy + // when we hit maxEventsPerLog. + mu sync.RWMutex + events []logEntry + LastErrorTime time.Time + discarded int + + refs int32 // how many buckets this is in +} + +func (el *eventLog) reset() { + // Clear all but the mutex. Mutexes may not be copied, even when unlocked. + el.Family = "" + el.Title = "" + el.Start = time.Time{} + el.stack = nil + el.events = nil + el.LastErrorTime = time.Time{} + el.discarded = 0 + el.refs = 0 +} + +func (el *eventLog) hasRecentError(now time.Time, maxErrAge time.Duration) bool { + if maxErrAge == 0 { + return true + } + el.mu.RLock() + defer el.mu.RUnlock() + return now.Sub(el.LastErrorTime) < maxErrAge +} + +// delta returns the elapsed time since the last event or the log start, +// and whether it spans midnight. +// L >= el.mu +func (el *eventLog) delta(t time.Time) (time.Duration, bool) { + if len(el.events) == 0 { + return t.Sub(el.Start), false + } + prev := el.events[len(el.events)-1].When + return t.Sub(prev), prev.Day() != t.Day() + +} + +func (el *eventLog) Printf(format string, a ...interface{}) { + el.printf(false, format, a...) +} + +func (el *eventLog) Errorf(format string, a ...interface{}) { + el.printf(true, format, a...) +} + +func (el *eventLog) printf(isErr bool, format string, a ...interface{}) { + e := logEntry{When: time.Now(), IsErr: isErr, What: fmt.Sprintf(format, a...)} + el.mu.Lock() + e.Elapsed, e.NewDay = el.delta(e.When) + if len(el.events) < maxEventsPerLog { + el.events = append(el.events, e) + } else { + // Discard the oldest event. + if el.discarded == 0 { + // el.discarded starts at two to count for the event it + // is replacing, plus the next one that we are about to + // drop. + el.discarded = 2 + } else { + el.discarded++ + } + // TODO(sameer): if this causes allocations on a critical path, + // change eventLog.What to be a fmt.Stringer, as in trace.go. + el.events[0].What = fmt.Sprintf("(%d events discarded)", el.discarded) + // The timestamp of the discarded meta-event should be + // the time of the last event it is representing. + el.events[0].When = el.events[1].When + copy(el.events[1:], el.events[2:]) + el.events[maxEventsPerLog-1] = e + } + if e.IsErr { + el.LastErrorTime = e.When + } + el.mu.Unlock() +} + +func (el *eventLog) ref() { + atomic.AddInt32(&el.refs, 1) +} + +func (el *eventLog) unref() { + if atomic.AddInt32(&el.refs, -1) == 0 { + freeEventLog(el) + } +} + +func (el *eventLog) When() string { + return el.Start.Format("2006/01/02 15:04:05.000000") +} + +func (el *eventLog) ElapsedTime() string { + elapsed := time.Since(el.Start) + return fmt.Sprintf("%.6f", elapsed.Seconds()) +} + +func (el *eventLog) Stack() string { + buf := new(bytes.Buffer) + tw := tabwriter.NewWriter(buf, 1, 8, 1, '\t', 0) + printStackRecord(tw, el.stack) + tw.Flush() + return buf.String() +} + +// printStackRecord prints the function + source line information +// for a single stack trace. +// Adapted from runtime/pprof/pprof.go. +func printStackRecord(w io.Writer, stk []uintptr) { + for _, pc := range stk { + f := runtime.FuncForPC(pc) + if f == nil { + continue + } + file, line := f.FileLine(pc) + name := f.Name() + // Hide runtime.goexit and any runtime functions at the beginning. + if strings.HasPrefix(name, "runtime.") { + continue + } + fmt.Fprintf(w, "# %s\t%s:%d\n", name, file, line) + } +} + +func (el *eventLog) Events() []logEntry { + el.mu.RLock() + defer el.mu.RUnlock() + return el.events +} + +// freeEventLogs is a freelist of *eventLog +var freeEventLogs = make(chan *eventLog, 1000) + +// newEventLog returns a event log ready to use. +func newEventLog() *eventLog { + select { + case el := <-freeEventLogs: + return el + default: + return new(eventLog) + } +} + +// freeEventLog adds el to freeEventLogs if there's room. +// This is non-blocking. +func freeEventLog(el *eventLog) { + el.reset() + select { + case freeEventLogs <- el: + default: + } +} + +var eventsTmplCache *template.Template +var eventsTmplOnce sync.Once + +func eventsTmpl() *template.Template { + eventsTmplOnce.Do(func() { + eventsTmplCache = template.Must(template.New("events").Funcs(template.FuncMap{ + "elapsed": elapsed, + "trimSpace": strings.TrimSpace, + }).Parse(eventsHTML)) + }) + return eventsTmplCache +} + +const eventsHTML = ` + + + events + + + + +

/debug/events

+ + + {{range $i, $fam := .Families}} + + + + {{range $j, $bucket := $.Buckets}} + {{$n := index $.Counts $i $j}} + + {{end}} + + {{end}} +
{{$fam}} + {{if $n}}{{end}} + [{{$n}} {{$bucket.String}}] + {{if $n}}{{end}} +
+ +{{if $.EventLogs}} +
+

Family: {{$.Family}}

+ +{{if $.Expanded}}{{end}} +[Summary]{{if $.Expanded}}{{end}} + +{{if not $.Expanded}}{{end}} +[Expanded]{{if not $.Expanded}}{{end}} + + + + {{range $el := $.EventLogs}} + + + + + {{if $.Expanded}} + + + + + + {{range $el.Events}} + + + + + + {{end}} + {{end}} + {{end}} +
WhenElapsed
{{$el.When}}{{$el.ElapsedTime}}{{$el.Title}} +
{{$el.Stack|trimSpace}}
{{.WhenString}}{{elapsed .Elapsed}}.{{if .IsErr}}E{{else}}.{{end}}. {{.What}}
+{{end}} + + +` diff --git a/vendor/golang.org/x/net/trace/histogram.go b/vendor/golang.org/x/net/trace/histogram.go new file mode 100644 index 000000000..9bf4286c7 --- /dev/null +++ b/vendor/golang.org/x/net/trace/histogram.go @@ -0,0 +1,365 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package trace + +// This file implements histogramming for RPC statistics collection. + +import ( + "bytes" + "fmt" + "html/template" + "log" + "math" + "sync" + + "golang.org/x/net/internal/timeseries" +) + +const ( + bucketCount = 38 +) + +// histogram keeps counts of values in buckets that are spaced +// out in powers of 2: 0-1, 2-3, 4-7... +// histogram implements timeseries.Observable +type histogram struct { + sum int64 // running total of measurements + sumOfSquares float64 // square of running total + buckets []int64 // bucketed values for histogram + value int // holds a single value as an optimization + valueCount int64 // number of values recorded for single value +} + +// AddMeasurement records a value measurement observation to the histogram. +func (h *histogram) addMeasurement(value int64) { + // TODO: assert invariant + h.sum += value + h.sumOfSquares += float64(value) * float64(value) + + bucketIndex := getBucket(value) + + if h.valueCount == 0 || (h.valueCount > 0 && h.value == bucketIndex) { + h.value = bucketIndex + h.valueCount++ + } else { + h.allocateBuckets() + h.buckets[bucketIndex]++ + } +} + +func (h *histogram) allocateBuckets() { + if h.buckets == nil { + h.buckets = make([]int64, bucketCount) + h.buckets[h.value] = h.valueCount + h.value = 0 + h.valueCount = -1 + } +} + +func log2(i int64) int { + n := 0 + for ; i >= 0x100; i >>= 8 { + n += 8 + } + for ; i > 0; i >>= 1 { + n += 1 + } + return n +} + +func getBucket(i int64) (index int) { + index = log2(i) - 1 + if index < 0 { + index = 0 + } + if index >= bucketCount { + index = bucketCount - 1 + } + return +} + +// Total returns the number of recorded observations. +func (h *histogram) total() (total int64) { + if h.valueCount >= 0 { + total = h.valueCount + } + for _, val := range h.buckets { + total += int64(val) + } + return +} + +// Average returns the average value of recorded observations. +func (h *histogram) average() float64 { + t := h.total() + if t == 0 { + return 0 + } + return float64(h.sum) / float64(t) +} + +// Variance returns the variance of recorded observations. +func (h *histogram) variance() float64 { + t := float64(h.total()) + if t == 0 { + return 0 + } + s := float64(h.sum) / t + return h.sumOfSquares/t - s*s +} + +// StandardDeviation returns the standard deviation of recorded observations. +func (h *histogram) standardDeviation() float64 { + return math.Sqrt(h.variance()) +} + +// PercentileBoundary estimates the value that the given fraction of recorded +// observations are less than. +func (h *histogram) percentileBoundary(percentile float64) int64 { + total := h.total() + + // Corner cases (make sure result is strictly less than Total()) + if total == 0 { + return 0 + } else if total == 1 { + return int64(h.average()) + } + + percentOfTotal := round(float64(total) * percentile) + var runningTotal int64 + + for i := range h.buckets { + value := h.buckets[i] + runningTotal += value + if runningTotal == percentOfTotal { + // We hit an exact bucket boundary. If the next bucket has data, it is a + // good estimate of the value. If the bucket is empty, we interpolate the + // midpoint between the next bucket's boundary and the next non-zero + // bucket. If the remaining buckets are all empty, then we use the + // boundary for the next bucket as the estimate. + j := uint8(i + 1) + min := bucketBoundary(j) + if runningTotal < total { + for h.buckets[j] == 0 { + j++ + } + } + max := bucketBoundary(j) + return min + round(float64(max-min)/2) + } else if runningTotal > percentOfTotal { + // The value is in this bucket. Interpolate the value. + delta := runningTotal - percentOfTotal + percentBucket := float64(value-delta) / float64(value) + bucketMin := bucketBoundary(uint8(i)) + nextBucketMin := bucketBoundary(uint8(i + 1)) + bucketSize := nextBucketMin - bucketMin + return bucketMin + round(percentBucket*float64(bucketSize)) + } + } + return bucketBoundary(bucketCount - 1) +} + +// Median returns the estimated median of the observed values. +func (h *histogram) median() int64 { + return h.percentileBoundary(0.5) +} + +// Add adds other to h. +func (h *histogram) Add(other timeseries.Observable) { + o := other.(*histogram) + if o.valueCount == 0 { + // Other histogram is empty + } else if h.valueCount >= 0 && o.valueCount > 0 && h.value == o.value { + // Both have a single bucketed value, aggregate them + h.valueCount += o.valueCount + } else { + // Two different values necessitate buckets in this histogram + h.allocateBuckets() + if o.valueCount >= 0 { + h.buckets[o.value] += o.valueCount + } else { + for i := range h.buckets { + h.buckets[i] += o.buckets[i] + } + } + } + h.sumOfSquares += o.sumOfSquares + h.sum += o.sum +} + +// Clear resets the histogram to an empty state, removing all observed values. +func (h *histogram) Clear() { + h.buckets = nil + h.value = 0 + h.valueCount = 0 + h.sum = 0 + h.sumOfSquares = 0 +} + +// CopyFrom copies from other, which must be a *histogram, into h. +func (h *histogram) CopyFrom(other timeseries.Observable) { + o := other.(*histogram) + if o.valueCount == -1 { + h.allocateBuckets() + copy(h.buckets, o.buckets) + } + h.sum = o.sum + h.sumOfSquares = o.sumOfSquares + h.value = o.value + h.valueCount = o.valueCount +} + +// Multiply scales the histogram by the specified ratio. +func (h *histogram) Multiply(ratio float64) { + if h.valueCount == -1 { + for i := range h.buckets { + h.buckets[i] = int64(float64(h.buckets[i]) * ratio) + } + } else { + h.valueCount = int64(float64(h.valueCount) * ratio) + } + h.sum = int64(float64(h.sum) * ratio) + h.sumOfSquares = h.sumOfSquares * ratio +} + +// New creates a new histogram. +func (h *histogram) New() timeseries.Observable { + r := new(histogram) + r.Clear() + return r +} + +func (h *histogram) String() string { + return fmt.Sprintf("%d, %f, %d, %d, %v", + h.sum, h.sumOfSquares, h.value, h.valueCount, h.buckets) +} + +// round returns the closest int64 to the argument +func round(in float64) int64 { + return int64(math.Floor(in + 0.5)) +} + +// bucketBoundary returns the first value in the bucket. +func bucketBoundary(bucket uint8) int64 { + if bucket == 0 { + return 0 + } + return 1 << bucket +} + +// bucketData holds data about a specific bucket for use in distTmpl. +type bucketData struct { + Lower, Upper int64 + N int64 + Pct, CumulativePct float64 + GraphWidth int +} + +// data holds data about a Distribution for use in distTmpl. +type data struct { + Buckets []*bucketData + Count, Median int64 + Mean, StandardDeviation float64 +} + +// maxHTMLBarWidth is the maximum width of the HTML bar for visualizing buckets. +const maxHTMLBarWidth = 350.0 + +// newData returns data representing h for use in distTmpl. +func (h *histogram) newData() *data { + // Force the allocation of buckets to simplify the rendering implementation + h.allocateBuckets() + // We scale the bars on the right so that the largest bar is + // maxHTMLBarWidth pixels in width. + maxBucket := int64(0) + for _, n := range h.buckets { + if n > maxBucket { + maxBucket = n + } + } + total := h.total() + barsizeMult := maxHTMLBarWidth / float64(maxBucket) + var pctMult float64 + if total == 0 { + pctMult = 1.0 + } else { + pctMult = 100.0 / float64(total) + } + + buckets := make([]*bucketData, len(h.buckets)) + runningTotal := int64(0) + for i, n := range h.buckets { + if n == 0 { + continue + } + runningTotal += n + var upperBound int64 + if i < bucketCount-1 { + upperBound = bucketBoundary(uint8(i + 1)) + } else { + upperBound = math.MaxInt64 + } + buckets[i] = &bucketData{ + Lower: bucketBoundary(uint8(i)), + Upper: upperBound, + N: n, + Pct: float64(n) * pctMult, + CumulativePct: float64(runningTotal) * pctMult, + GraphWidth: int(float64(n) * barsizeMult), + } + } + return &data{ + Buckets: buckets, + Count: total, + Median: h.median(), + Mean: h.average(), + StandardDeviation: h.standardDeviation(), + } +} + +func (h *histogram) html() template.HTML { + buf := new(bytes.Buffer) + if err := distTmpl().Execute(buf, h.newData()); err != nil { + buf.Reset() + log.Printf("net/trace: couldn't execute template: %v", err) + } + return template.HTML(buf.String()) +} + +var distTmplCache *template.Template +var distTmplOnce sync.Once + +func distTmpl() *template.Template { + distTmplOnce.Do(func() { + // Input: data + distTmplCache = template.Must(template.New("distTmpl").Parse(` + + + + + + + +
Count: {{.Count}}Mean: {{printf "%.0f" .Mean}}StdDev: {{printf "%.0f" .StandardDeviation}}Median: {{.Median}}
+
+ +{{range $b := .Buckets}} +{{if $b}} + + + + + + + + + +{{end}} +{{end}} +
[{{.Lower}},{{.Upper}}){{.N}}{{printf "%#.3f" .Pct}}%{{printf "%#.3f" .CumulativePct}}%
+`)) + }) + return distTmplCache +} diff --git a/vendor/golang.org/x/net/trace/histogram_test.go b/vendor/golang.org/x/net/trace/histogram_test.go new file mode 100644 index 000000000..d384b9332 --- /dev/null +++ b/vendor/golang.org/x/net/trace/histogram_test.go @@ -0,0 +1,325 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package trace + +import ( + "math" + "testing" +) + +type sumTest struct { + value int64 + sum int64 + sumOfSquares float64 + total int64 +} + +var sumTests = []sumTest{ + {100, 100, 10000, 1}, + {50, 150, 12500, 2}, + {50, 200, 15000, 3}, + {50, 250, 17500, 4}, +} + +type bucketingTest struct { + in int64 + log int + bucket int +} + +var bucketingTests = []bucketingTest{ + {0, 0, 0}, + {1, 1, 0}, + {2, 2, 1}, + {3, 2, 1}, + {4, 3, 2}, + {1000, 10, 9}, + {1023, 10, 9}, + {1024, 11, 10}, + {1000000, 20, 19}, +} + +type multiplyTest struct { + in int64 + ratio float64 + expectedSum int64 + expectedTotal int64 + expectedSumOfSquares float64 +} + +var multiplyTests = []multiplyTest{ + {15, 2.5, 37, 2, 562.5}, + {128, 4.6, 758, 13, 77953.9}, +} + +type percentileTest struct { + fraction float64 + expected int64 +} + +var percentileTests = []percentileTest{ + {0.25, 48}, + {0.5, 96}, + {0.6, 109}, + {0.75, 128}, + {0.90, 205}, + {0.95, 230}, + {0.99, 256}, +} + +func TestSum(t *testing.T) { + var h histogram + + for _, test := range sumTests { + h.addMeasurement(test.value) + sum := h.sum + if sum != test.sum { + t.Errorf("h.Sum = %v WANT: %v", sum, test.sum) + } + + sumOfSquares := h.sumOfSquares + if sumOfSquares != test.sumOfSquares { + t.Errorf("h.SumOfSquares = %v WANT: %v", sumOfSquares, test.sumOfSquares) + } + + total := h.total() + if total != test.total { + t.Errorf("h.Total = %v WANT: %v", total, test.total) + } + } +} + +func TestMultiply(t *testing.T) { + var h histogram + for i, test := range multiplyTests { + h.addMeasurement(test.in) + h.Multiply(test.ratio) + if h.sum != test.expectedSum { + t.Errorf("#%v: h.sum = %v WANT: %v", i, h.sum, test.expectedSum) + } + if h.total() != test.expectedTotal { + t.Errorf("#%v: h.total = %v WANT: %v", i, h.total(), test.expectedTotal) + } + if h.sumOfSquares != test.expectedSumOfSquares { + t.Errorf("#%v: h.SumOfSquares = %v WANT: %v", i, test.expectedSumOfSquares, h.sumOfSquares) + } + } +} + +func TestBucketingFunctions(t *testing.T) { + for _, test := range bucketingTests { + log := log2(test.in) + if log != test.log { + t.Errorf("log2 = %v WANT: %v", log, test.log) + } + + bucket := getBucket(test.in) + if bucket != test.bucket { + t.Errorf("getBucket = %v WANT: %v", bucket, test.bucket) + } + } +} + +func TestAverage(t *testing.T) { + a := new(histogram) + average := a.average() + if average != 0 { + t.Errorf("Average of empty histogram was %v WANT: 0", average) + } + + a.addMeasurement(1) + a.addMeasurement(1) + a.addMeasurement(3) + const expected = float64(5) / float64(3) + average = a.average() + + if !isApproximate(average, expected) { + t.Errorf("Average = %g WANT: %v", average, expected) + } +} + +func TestStandardDeviation(t *testing.T) { + a := new(histogram) + add(a, 10, 1<<4) + add(a, 10, 1<<5) + add(a, 10, 1<<6) + stdDev := a.standardDeviation() + const expected = 19.95 + + if !isApproximate(stdDev, expected) { + t.Errorf("StandardDeviation = %v WANT: %v", stdDev, expected) + } + + // No values + a = new(histogram) + stdDev = a.standardDeviation() + + if !isApproximate(stdDev, 0) { + t.Errorf("StandardDeviation = %v WANT: 0", stdDev) + } + + add(a, 1, 1<<4) + if !isApproximate(stdDev, 0) { + t.Errorf("StandardDeviation = %v WANT: 0", stdDev) + } + + add(a, 10, 1<<4) + if !isApproximate(stdDev, 0) { + t.Errorf("StandardDeviation = %v WANT: 0", stdDev) + } +} + +func TestPercentileBoundary(t *testing.T) { + a := new(histogram) + add(a, 5, 1<<4) + add(a, 10, 1<<6) + add(a, 5, 1<<7) + + for _, test := range percentileTests { + percentile := a.percentileBoundary(test.fraction) + if percentile != test.expected { + t.Errorf("h.PercentileBoundary (fraction=%v) = %v WANT: %v", test.fraction, percentile, test.expected) + } + } +} + +func TestCopyFrom(t *testing.T) { + a := histogram{5, 25, []int64{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38}, 4, -1} + b := histogram{6, 36, []int64{2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39}, 5, -1} + + a.CopyFrom(&b) + + if a.String() != b.String() { + t.Errorf("a.String = %s WANT: %s", a.String(), b.String()) + } +} + +func TestClear(t *testing.T) { + a := histogram{5, 25, []int64{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38}, 4, -1} + + a.Clear() + + expected := "0, 0.000000, 0, 0, []" + if a.String() != expected { + t.Errorf("a.String = %s WANT %s", a.String(), expected) + } +} + +func TestNew(t *testing.T) { + a := histogram{5, 25, []int64{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38}, 4, -1} + b := a.New() + + expected := "0, 0.000000, 0, 0, []" + if b.(*histogram).String() != expected { + t.Errorf("b.(*histogram).String = %s WANT: %s", b.(*histogram).String(), expected) + } +} + +func TestAdd(t *testing.T) { + // The tests here depend on the associativity of addMeasurement and Add. + // Add empty observation + a := histogram{5, 25, []int64{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38}, 4, -1} + b := a.New() + + expected := a.String() + a.Add(b) + if a.String() != expected { + t.Errorf("a.String = %s WANT: %s", a.String(), expected) + } + + // Add same bucketed value, no new buckets + c := new(histogram) + d := new(histogram) + e := new(histogram) + c.addMeasurement(12) + d.addMeasurement(11) + e.addMeasurement(12) + e.addMeasurement(11) + c.Add(d) + if c.String() != e.String() { + t.Errorf("c.String = %s WANT: %s", c.String(), e.String()) + } + + // Add bucketed values + f := new(histogram) + g := new(histogram) + h := new(histogram) + f.addMeasurement(4) + f.addMeasurement(12) + f.addMeasurement(100) + g.addMeasurement(18) + g.addMeasurement(36) + g.addMeasurement(255) + h.addMeasurement(4) + h.addMeasurement(12) + h.addMeasurement(100) + h.addMeasurement(18) + h.addMeasurement(36) + h.addMeasurement(255) + f.Add(g) + if f.String() != h.String() { + t.Errorf("f.String = %q WANT: %q", f.String(), h.String()) + } + + // add buckets to no buckets + i := new(histogram) + j := new(histogram) + k := new(histogram) + j.addMeasurement(18) + j.addMeasurement(36) + j.addMeasurement(255) + k.addMeasurement(18) + k.addMeasurement(36) + k.addMeasurement(255) + i.Add(j) + if i.String() != k.String() { + t.Errorf("i.String = %q WANT: %q", i.String(), k.String()) + } + + // add buckets to single value (no overlap) + l := new(histogram) + m := new(histogram) + n := new(histogram) + l.addMeasurement(0) + m.addMeasurement(18) + m.addMeasurement(36) + m.addMeasurement(255) + n.addMeasurement(0) + n.addMeasurement(18) + n.addMeasurement(36) + n.addMeasurement(255) + l.Add(m) + if l.String() != n.String() { + t.Errorf("l.String = %q WANT: %q", l.String(), n.String()) + } + + // mixed order + o := new(histogram) + p := new(histogram) + o.addMeasurement(0) + o.addMeasurement(2) + o.addMeasurement(0) + p.addMeasurement(0) + p.addMeasurement(0) + p.addMeasurement(2) + if o.String() != p.String() { + t.Errorf("o.String = %q WANT: %q", o.String(), p.String()) + } +} + +func add(h *histogram, times int, val int64) { + for i := 0; i < times; i++ { + h.addMeasurement(val) + } +} + +func isApproximate(x, y float64) bool { + return math.Abs(x-y) < 1e-2 +} diff --git a/vendor/golang.org/x/net/trace/trace.go b/vendor/golang.org/x/net/trace/trace.go new file mode 100644 index 000000000..bb72a527e --- /dev/null +++ b/vendor/golang.org/x/net/trace/trace.go @@ -0,0 +1,1082 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +/* +Package trace implements tracing of requests and long-lived objects. +It exports HTTP interfaces on /debug/requests and /debug/events. + +A trace.Trace provides tracing for short-lived objects, usually requests. +A request handler might be implemented like this: + + func fooHandler(w http.ResponseWriter, req *http.Request) { + tr := trace.New("mypkg.Foo", req.URL.Path) + defer tr.Finish() + ... + tr.LazyPrintf("some event %q happened", str) + ... + if err := somethingImportant(); err != nil { + tr.LazyPrintf("somethingImportant failed: %v", err) + tr.SetError() + } + } + +The /debug/requests HTTP endpoint organizes the traces by family, +errors, and duration. It also provides histogram of request duration +for each family. + +A trace.EventLog provides tracing for long-lived objects, such as RPC +connections. + + // A Fetcher fetches URL paths for a single domain. + type Fetcher struct { + domain string + events trace.EventLog + } + + func NewFetcher(domain string) *Fetcher { + return &Fetcher{ + domain, + trace.NewEventLog("mypkg.Fetcher", domain), + } + } + + func (f *Fetcher) Fetch(path string) (string, error) { + resp, err := http.Get("http://" + f.domain + "/" + path) + if err != nil { + f.events.Errorf("Get(%q) = %v", path, err) + return "", err + } + f.events.Printf("Get(%q) = %s", path, resp.Status) + ... + } + + func (f *Fetcher) Close() error { + f.events.Finish() + return nil + } + +The /debug/events HTTP endpoint organizes the event logs by family and +by time since the last error. The expanded view displays recent log +entries and the log's call stack. +*/ +package trace // import "golang.org/x/net/trace" + +import ( + "bytes" + "fmt" + "html/template" + "io" + "log" + "net" + "net/http" + "runtime" + "sort" + "strconv" + "sync" + "sync/atomic" + "time" + + "golang.org/x/net/internal/timeseries" +) + +// DebugUseAfterFinish controls whether to debug uses of Trace values after finishing. +// FOR DEBUGGING ONLY. This will slow down the program. +var DebugUseAfterFinish = false + +// AuthRequest determines whether a specific request is permitted to load the +// /debug/requests or /debug/events pages. +// +// It returns two bools; the first indicates whether the page may be viewed at all, +// and the second indicates whether sensitive events will be shown. +// +// AuthRequest may be replaced by a program to customize its authorization requirements. +// +// The default AuthRequest function returns (true, true) if and only if the request +// comes from localhost/127.0.0.1/[::1]. +var AuthRequest = func(req *http.Request) (any, sensitive bool) { + // RemoteAddr is commonly in the form "IP" or "IP:port". + // If it is in the form "IP:port", split off the port. + host, _, err := net.SplitHostPort(req.RemoteAddr) + if err != nil { + host = req.RemoteAddr + } + switch host { + case "localhost", "127.0.0.1", "::1": + return true, true + default: + return false, false + } +} + +func init() { + // TODO(jbd): Serve Traces from /debug/traces in the future? + // There is no requirement for a request to be present to have traces. + http.HandleFunc("/debug/requests", Traces) + http.HandleFunc("/debug/events", Events) +} + +// Traces responds with traces from the program. +// The package initialization registers it in http.DefaultServeMux +// at /debug/requests. +// +// It performs authorization by running AuthRequest. +func Traces(w http.ResponseWriter, req *http.Request) { + any, sensitive := AuthRequest(req) + if !any { + http.Error(w, "not allowed", http.StatusUnauthorized) + return + } + w.Header().Set("Content-Type", "text/html; charset=utf-8") + Render(w, req, sensitive) +} + +// Events responds with a page of events collected by EventLogs. +// The package initialization registers it in http.DefaultServeMux +// at /debug/events. +// +// It performs authorization by running AuthRequest. +func Events(w http.ResponseWriter, req *http.Request) { + any, sensitive := AuthRequest(req) + if !any { + http.Error(w, "not allowed", http.StatusUnauthorized) + return + } + w.Header().Set("Content-Type", "text/html; charset=utf-8") + RenderEvents(w, req, sensitive) +} + +// Render renders the HTML page typically served at /debug/requests. +// It does not do any auth checking. The request may be nil. +// +// Most users will use the Traces handler. +func Render(w io.Writer, req *http.Request, sensitive bool) { + data := &struct { + Families []string + ActiveTraceCount map[string]int + CompletedTraces map[string]*family + + // Set when a bucket has been selected. + Traces traceList + Family string + Bucket int + Expanded bool + Traced bool + Active bool + ShowSensitive bool // whether to show sensitive events + + Histogram template.HTML + HistogramWindow string // e.g. "last minute", "last hour", "all time" + + // If non-zero, the set of traces is a partial set, + // and this is the total number. + Total int + }{ + CompletedTraces: completedTraces, + } + + data.ShowSensitive = sensitive + if req != nil { + // Allow show_sensitive=0 to force hiding of sensitive data for testing. + // This only goes one way; you can't use show_sensitive=1 to see things. + if req.FormValue("show_sensitive") == "0" { + data.ShowSensitive = false + } + + if exp, err := strconv.ParseBool(req.FormValue("exp")); err == nil { + data.Expanded = exp + } + if exp, err := strconv.ParseBool(req.FormValue("rtraced")); err == nil { + data.Traced = exp + } + } + + completedMu.RLock() + data.Families = make([]string, 0, len(completedTraces)) + for fam := range completedTraces { + data.Families = append(data.Families, fam) + } + completedMu.RUnlock() + sort.Strings(data.Families) + + // We are careful here to minimize the time spent locking activeMu, + // since that lock is required every time an RPC starts and finishes. + data.ActiveTraceCount = make(map[string]int, len(data.Families)) + activeMu.RLock() + for fam, s := range activeTraces { + data.ActiveTraceCount[fam] = s.Len() + } + activeMu.RUnlock() + + var ok bool + data.Family, data.Bucket, ok = parseArgs(req) + switch { + case !ok: + // No-op + case data.Bucket == -1: + data.Active = true + n := data.ActiveTraceCount[data.Family] + data.Traces = getActiveTraces(data.Family) + if len(data.Traces) < n { + data.Total = n + } + case data.Bucket < bucketsPerFamily: + if b := lookupBucket(data.Family, data.Bucket); b != nil { + data.Traces = b.Copy(data.Traced) + } + default: + if f := getFamily(data.Family, false); f != nil { + var obs timeseries.Observable + f.LatencyMu.RLock() + switch o := data.Bucket - bucketsPerFamily; o { + case 0: + obs = f.Latency.Minute() + data.HistogramWindow = "last minute" + case 1: + obs = f.Latency.Hour() + data.HistogramWindow = "last hour" + case 2: + obs = f.Latency.Total() + data.HistogramWindow = "all time" + } + f.LatencyMu.RUnlock() + if obs != nil { + data.Histogram = obs.(*histogram).html() + } + } + } + + if data.Traces != nil { + defer data.Traces.Free() + sort.Sort(data.Traces) + } + + completedMu.RLock() + defer completedMu.RUnlock() + if err := pageTmpl().ExecuteTemplate(w, "Page", data); err != nil { + log.Printf("net/trace: Failed executing template: %v", err) + } +} + +func parseArgs(req *http.Request) (fam string, b int, ok bool) { + if req == nil { + return "", 0, false + } + fam, bStr := req.FormValue("fam"), req.FormValue("b") + if fam == "" || bStr == "" { + return "", 0, false + } + b, err := strconv.Atoi(bStr) + if err != nil || b < -1 { + return "", 0, false + } + + return fam, b, true +} + +func lookupBucket(fam string, b int) *traceBucket { + f := getFamily(fam, false) + if f == nil || b < 0 || b >= len(f.Buckets) { + return nil + } + return f.Buckets[b] +} + +type contextKeyT string + +var contextKey = contextKeyT("golang.org/x/net/trace.Trace") + +// Trace represents an active request. +type Trace interface { + // LazyLog adds x to the event log. It will be evaluated each time the + // /debug/requests page is rendered. Any memory referenced by x will be + // pinned until the trace is finished and later discarded. + LazyLog(x fmt.Stringer, sensitive bool) + + // LazyPrintf evaluates its arguments with fmt.Sprintf each time the + // /debug/requests page is rendered. Any memory referenced by a will be + // pinned until the trace is finished and later discarded. + LazyPrintf(format string, a ...interface{}) + + // SetError declares that this trace resulted in an error. + SetError() + + // SetRecycler sets a recycler for the trace. + // f will be called for each event passed to LazyLog at a time when + // it is no longer required, whether while the trace is still active + // and the event is discarded, or when a completed trace is discarded. + SetRecycler(f func(interface{})) + + // SetTraceInfo sets the trace info for the trace. + // This is currently unused. + SetTraceInfo(traceID, spanID uint64) + + // SetMaxEvents sets the maximum number of events that will be stored + // in the trace. This has no effect if any events have already been + // added to the trace. + SetMaxEvents(m int) + + // Finish declares that this trace is complete. + // The trace should not be used after calling this method. + Finish() +} + +type lazySprintf struct { + format string + a []interface{} +} + +func (l *lazySprintf) String() string { + return fmt.Sprintf(l.format, l.a...) +} + +// New returns a new Trace with the specified family and title. +func New(family, title string) Trace { + tr := newTrace() + tr.ref() + tr.Family, tr.Title = family, title + tr.Start = time.Now() + tr.maxEvents = maxEventsPerTrace + tr.events = tr.eventsBuf[:0] + + activeMu.RLock() + s := activeTraces[tr.Family] + activeMu.RUnlock() + if s == nil { + activeMu.Lock() + s = activeTraces[tr.Family] // check again + if s == nil { + s = new(traceSet) + activeTraces[tr.Family] = s + } + activeMu.Unlock() + } + s.Add(tr) + + // Trigger allocation of the completed trace structure for this family. + // This will cause the family to be present in the request page during + // the first trace of this family. We don't care about the return value, + // nor is there any need for this to run inline, so we execute it in its + // own goroutine, but only if the family isn't allocated yet. + completedMu.RLock() + if _, ok := completedTraces[tr.Family]; !ok { + go allocFamily(tr.Family) + } + completedMu.RUnlock() + + return tr +} + +func (tr *trace) Finish() { + tr.Elapsed = time.Now().Sub(tr.Start) + if DebugUseAfterFinish { + buf := make([]byte, 4<<10) // 4 KB should be enough + n := runtime.Stack(buf, false) + tr.finishStack = buf[:n] + } + + activeMu.RLock() + m := activeTraces[tr.Family] + activeMu.RUnlock() + m.Remove(tr) + + f := getFamily(tr.Family, true) + for _, b := range f.Buckets { + if b.Cond.match(tr) { + b.Add(tr) + } + } + // Add a sample of elapsed time as microseconds to the family's timeseries + h := new(histogram) + h.addMeasurement(tr.Elapsed.Nanoseconds() / 1e3) + f.LatencyMu.Lock() + f.Latency.Add(h) + f.LatencyMu.Unlock() + + tr.unref() // matches ref in New +} + +const ( + bucketsPerFamily = 9 + tracesPerBucket = 10 + maxActiveTraces = 20 // Maximum number of active traces to show. + maxEventsPerTrace = 10 + numHistogramBuckets = 38 +) + +var ( + // The active traces. + activeMu sync.RWMutex + activeTraces = make(map[string]*traceSet) // family -> traces + + // Families of completed traces. + completedMu sync.RWMutex + completedTraces = make(map[string]*family) // family -> traces +) + +type traceSet struct { + mu sync.RWMutex + m map[*trace]bool + + // We could avoid the entire map scan in FirstN by having a slice of all the traces + // ordered by start time, and an index into that from the trace struct, with a periodic + // repack of the slice after enough traces finish; we could also use a skip list or similar. + // However, that would shift some of the expense from /debug/requests time to RPC time, + // which is probably the wrong trade-off. +} + +func (ts *traceSet) Len() int { + ts.mu.RLock() + defer ts.mu.RUnlock() + return len(ts.m) +} + +func (ts *traceSet) Add(tr *trace) { + ts.mu.Lock() + if ts.m == nil { + ts.m = make(map[*trace]bool) + } + ts.m[tr] = true + ts.mu.Unlock() +} + +func (ts *traceSet) Remove(tr *trace) { + ts.mu.Lock() + delete(ts.m, tr) + ts.mu.Unlock() +} + +// FirstN returns the first n traces ordered by time. +func (ts *traceSet) FirstN(n int) traceList { + ts.mu.RLock() + defer ts.mu.RUnlock() + + if n > len(ts.m) { + n = len(ts.m) + } + trl := make(traceList, 0, n) + + // Fast path for when no selectivity is needed. + if n == len(ts.m) { + for tr := range ts.m { + tr.ref() + trl = append(trl, tr) + } + sort.Sort(trl) + return trl + } + + // Pick the oldest n traces. + // This is inefficient. See the comment in the traceSet struct. + for tr := range ts.m { + // Put the first n traces into trl in the order they occur. + // When we have n, sort trl, and thereafter maintain its order. + if len(trl) < n { + tr.ref() + trl = append(trl, tr) + if len(trl) == n { + // This is guaranteed to happen exactly once during this loop. + sort.Sort(trl) + } + continue + } + if tr.Start.After(trl[n-1].Start) { + continue + } + + // Find where to insert this one. + tr.ref() + i := sort.Search(n, func(i int) bool { return trl[i].Start.After(tr.Start) }) + trl[n-1].unref() + copy(trl[i+1:], trl[i:]) + trl[i] = tr + } + + return trl +} + +func getActiveTraces(fam string) traceList { + activeMu.RLock() + s := activeTraces[fam] + activeMu.RUnlock() + if s == nil { + return nil + } + return s.FirstN(maxActiveTraces) +} + +func getFamily(fam string, allocNew bool) *family { + completedMu.RLock() + f := completedTraces[fam] + completedMu.RUnlock() + if f == nil && allocNew { + f = allocFamily(fam) + } + return f +} + +func allocFamily(fam string) *family { + completedMu.Lock() + defer completedMu.Unlock() + f := completedTraces[fam] + if f == nil { + f = newFamily() + completedTraces[fam] = f + } + return f +} + +// family represents a set of trace buckets and associated latency information. +type family struct { + // traces may occur in multiple buckets. + Buckets [bucketsPerFamily]*traceBucket + + // latency time series + LatencyMu sync.RWMutex + Latency *timeseries.MinuteHourSeries +} + +func newFamily() *family { + return &family{ + Buckets: [bucketsPerFamily]*traceBucket{ + {Cond: minCond(0)}, + {Cond: minCond(50 * time.Millisecond)}, + {Cond: minCond(100 * time.Millisecond)}, + {Cond: minCond(200 * time.Millisecond)}, + {Cond: minCond(500 * time.Millisecond)}, + {Cond: minCond(1 * time.Second)}, + {Cond: minCond(10 * time.Second)}, + {Cond: minCond(100 * time.Second)}, + {Cond: errorCond{}}, + }, + Latency: timeseries.NewMinuteHourSeries(func() timeseries.Observable { return new(histogram) }), + } +} + +// traceBucket represents a size-capped bucket of historic traces, +// along with a condition for a trace to belong to the bucket. +type traceBucket struct { + Cond cond + + // Ring buffer implementation of a fixed-size FIFO queue. + mu sync.RWMutex + buf [tracesPerBucket]*trace + start int // < tracesPerBucket + length int // <= tracesPerBucket +} + +func (b *traceBucket) Add(tr *trace) { + b.mu.Lock() + defer b.mu.Unlock() + + i := b.start + b.length + if i >= tracesPerBucket { + i -= tracesPerBucket + } + if b.length == tracesPerBucket { + // "Remove" an element from the bucket. + b.buf[i].unref() + b.start++ + if b.start == tracesPerBucket { + b.start = 0 + } + } + b.buf[i] = tr + if b.length < tracesPerBucket { + b.length++ + } + tr.ref() +} + +// Copy returns a copy of the traces in the bucket. +// If tracedOnly is true, only the traces with trace information will be returned. +// The logs will be ref'd before returning; the caller should call +// the Free method when it is done with them. +// TODO(dsymonds): keep track of traced requests in separate buckets. +func (b *traceBucket) Copy(tracedOnly bool) traceList { + b.mu.RLock() + defer b.mu.RUnlock() + + trl := make(traceList, 0, b.length) + for i, x := 0, b.start; i < b.length; i++ { + tr := b.buf[x] + if !tracedOnly || tr.spanID != 0 { + tr.ref() + trl = append(trl, tr) + } + x++ + if x == b.length { + x = 0 + } + } + return trl +} + +func (b *traceBucket) Empty() bool { + b.mu.RLock() + defer b.mu.RUnlock() + return b.length == 0 +} + +// cond represents a condition on a trace. +type cond interface { + match(t *trace) bool + String() string +} + +type minCond time.Duration + +func (m minCond) match(t *trace) bool { return t.Elapsed >= time.Duration(m) } +func (m minCond) String() string { return fmt.Sprintf("≥%gs", time.Duration(m).Seconds()) } + +type errorCond struct{} + +func (e errorCond) match(t *trace) bool { return t.IsError } +func (e errorCond) String() string { return "errors" } + +type traceList []*trace + +// Free calls unref on each element of the list. +func (trl traceList) Free() { + for _, t := range trl { + t.unref() + } +} + +// traceList may be sorted in reverse chronological order. +func (trl traceList) Len() int { return len(trl) } +func (trl traceList) Less(i, j int) bool { return trl[i].Start.After(trl[j].Start) } +func (trl traceList) Swap(i, j int) { trl[i], trl[j] = trl[j], trl[i] } + +// An event is a timestamped log entry in a trace. +type event struct { + When time.Time + Elapsed time.Duration // since previous event in trace + NewDay bool // whether this event is on a different day to the previous event + Recyclable bool // whether this event was passed via LazyLog + Sensitive bool // whether this event contains sensitive information + What interface{} // string or fmt.Stringer +} + +// WhenString returns a string representation of the elapsed time of the event. +// It will include the date if midnight was crossed. +func (e event) WhenString() string { + if e.NewDay { + return e.When.Format("2006/01/02 15:04:05.000000") + } + return e.When.Format("15:04:05.000000") +} + +// discarded represents a number of discarded events. +// It is stored as *discarded to make it easier to update in-place. +type discarded int + +func (d *discarded) String() string { + return fmt.Sprintf("(%d events discarded)", int(*d)) +} + +// trace represents an active or complete request, +// either sent or received by this program. +type trace struct { + // Family is the top-level grouping of traces to which this belongs. + Family string + + // Title is the title of this trace. + Title string + + // Timing information. + Start time.Time + Elapsed time.Duration // zero while active + + // Trace information if non-zero. + traceID uint64 + spanID uint64 + + // Whether this trace resulted in an error. + IsError bool + + // Append-only sequence of events (modulo discards). + mu sync.RWMutex + events []event + maxEvents int + + refs int32 // how many buckets this is in + recycler func(interface{}) + disc discarded // scratch space to avoid allocation + + finishStack []byte // where finish was called, if DebugUseAfterFinish is set + + eventsBuf [4]event // preallocated buffer in case we only log a few events +} + +func (tr *trace) reset() { + // Clear all but the mutex. Mutexes may not be copied, even when unlocked. + tr.Family = "" + tr.Title = "" + tr.Start = time.Time{} + tr.Elapsed = 0 + tr.traceID = 0 + tr.spanID = 0 + tr.IsError = false + tr.maxEvents = 0 + tr.events = nil + tr.refs = 0 + tr.recycler = nil + tr.disc = 0 + tr.finishStack = nil + for i := range tr.eventsBuf { + tr.eventsBuf[i] = event{} + } +} + +// delta returns the elapsed time since the last event or the trace start, +// and whether it spans midnight. +// L >= tr.mu +func (tr *trace) delta(t time.Time) (time.Duration, bool) { + if len(tr.events) == 0 { + return t.Sub(tr.Start), false + } + prev := tr.events[len(tr.events)-1].When + return t.Sub(prev), prev.Day() != t.Day() +} + +func (tr *trace) addEvent(x interface{}, recyclable, sensitive bool) { + if DebugUseAfterFinish && tr.finishStack != nil { + buf := make([]byte, 4<<10) // 4 KB should be enough + n := runtime.Stack(buf, false) + log.Printf("net/trace: trace used after finish:\nFinished at:\n%s\nUsed at:\n%s", tr.finishStack, buf[:n]) + } + + /* + NOTE TO DEBUGGERS + + If you are here because your program panicked in this code, + it is almost definitely the fault of code using this package, + and very unlikely to be the fault of this code. + + The most likely scenario is that some code elsewhere is using + a trace.Trace after its Finish method is called. + You can temporarily set the DebugUseAfterFinish var + to help discover where that is; do not leave that var set, + since it makes this package much less efficient. + */ + + e := event{When: time.Now(), What: x, Recyclable: recyclable, Sensitive: sensitive} + tr.mu.Lock() + e.Elapsed, e.NewDay = tr.delta(e.When) + if len(tr.events) < tr.maxEvents { + tr.events = append(tr.events, e) + } else { + // Discard the middle events. + di := int((tr.maxEvents - 1) / 2) + if d, ok := tr.events[di].What.(*discarded); ok { + (*d)++ + } else { + // disc starts at two to count for the event it is replacing, + // plus the next one that we are about to drop. + tr.disc = 2 + if tr.recycler != nil && tr.events[di].Recyclable { + go tr.recycler(tr.events[di].What) + } + tr.events[di].What = &tr.disc + } + // The timestamp of the discarded meta-event should be + // the time of the last event it is representing. + tr.events[di].When = tr.events[di+1].When + + if tr.recycler != nil && tr.events[di+1].Recyclable { + go tr.recycler(tr.events[di+1].What) + } + copy(tr.events[di+1:], tr.events[di+2:]) + tr.events[tr.maxEvents-1] = e + } + tr.mu.Unlock() +} + +func (tr *trace) LazyLog(x fmt.Stringer, sensitive bool) { + tr.addEvent(x, true, sensitive) +} + +func (tr *trace) LazyPrintf(format string, a ...interface{}) { + tr.addEvent(&lazySprintf{format, a}, false, false) +} + +func (tr *trace) SetError() { tr.IsError = true } + +func (tr *trace) SetRecycler(f func(interface{})) { + tr.recycler = f +} + +func (tr *trace) SetTraceInfo(traceID, spanID uint64) { + tr.traceID, tr.spanID = traceID, spanID +} + +func (tr *trace) SetMaxEvents(m int) { + // Always keep at least three events: first, discarded count, last. + if len(tr.events) == 0 && m > 3 { + tr.maxEvents = m + } +} + +func (tr *trace) ref() { + atomic.AddInt32(&tr.refs, 1) +} + +func (tr *trace) unref() { + if atomic.AddInt32(&tr.refs, -1) == 0 { + if tr.recycler != nil { + // freeTrace clears tr, so we hold tr.recycler and tr.events here. + go func(f func(interface{}), es []event) { + for _, e := range es { + if e.Recyclable { + f(e.What) + } + } + }(tr.recycler, tr.events) + } + + freeTrace(tr) + } +} + +func (tr *trace) When() string { + return tr.Start.Format("2006/01/02 15:04:05.000000") +} + +func (tr *trace) ElapsedTime() string { + t := tr.Elapsed + if t == 0 { + // Active trace. + t = time.Since(tr.Start) + } + return fmt.Sprintf("%.6f", t.Seconds()) +} + +func (tr *trace) Events() []event { + tr.mu.RLock() + defer tr.mu.RUnlock() + return tr.events +} + +var traceFreeList = make(chan *trace, 1000) // TODO(dsymonds): Use sync.Pool? + +// newTrace returns a trace ready to use. +func newTrace() *trace { + select { + case tr := <-traceFreeList: + return tr + default: + return new(trace) + } +} + +// freeTrace adds tr to traceFreeList if there's room. +// This is non-blocking. +func freeTrace(tr *trace) { + if DebugUseAfterFinish { + return // never reuse + } + tr.reset() + select { + case traceFreeList <- tr: + default: + } +} + +func elapsed(d time.Duration) string { + b := []byte(fmt.Sprintf("%.6f", d.Seconds())) + + // For subsecond durations, blank all zeros before decimal point, + // and all zeros between the decimal point and the first non-zero digit. + if d < time.Second { + dot := bytes.IndexByte(b, '.') + for i := 0; i < dot; i++ { + b[i] = ' ' + } + for i := dot + 1; i < len(b); i++ { + if b[i] == '0' { + b[i] = ' ' + } else { + break + } + } + } + + return string(b) +} + +var pageTmplCache *template.Template +var pageTmplOnce sync.Once + +func pageTmpl() *template.Template { + pageTmplOnce.Do(func() { + pageTmplCache = template.Must(template.New("Page").Funcs(template.FuncMap{ + "elapsed": elapsed, + "add": func(a, b int) int { return a + b }, + }).Parse(pageHTML)) + }) + return pageTmplCache +} + +const pageHTML = ` +{{template "Prolog" .}} +{{template "StatusTable" .}} +{{template "Epilog" .}} + +{{define "Prolog"}} + + + /debug/requests + + + + +

/debug/requests

+{{end}} {{/* end of Prolog */}} + +{{define "StatusTable"}} + + {{range $fam := .Families}} + + + + {{$n := index $.ActiveTraceCount $fam}} + + + {{$f := index $.CompletedTraces $fam}} + {{range $i, $b := $f.Buckets}} + {{$empty := $b.Empty}} + + {{end}} + + {{$nb := len $f.Buckets}} + + + + + + {{end}} +
{{$fam}} + {{if $n}}{{end}} + [{{$n}} active] + {{if $n}}{{end}} + + {{if not $empty}}{{end}} + [{{.Cond}}] + {{if not $empty}}{{end}} + + [minute] + + [hour] + + [total] +
+{{end}} {{/* end of StatusTable */}} + +{{define "Epilog"}} +{{if $.Traces}} +
+

Family: {{$.Family}}

+ +{{if or $.Expanded $.Traced}} + [Normal/Summary] +{{else}} + [Normal/Summary] +{{end}} + +{{if or (not $.Expanded) $.Traced}} + [Normal/Expanded] +{{else}} + [Normal/Expanded] +{{end}} + +{{if not $.Active}} + {{if or $.Expanded (not $.Traced)}} + [Traced/Summary] + {{else}} + [Traced/Summary] + {{end}} + {{if or (not $.Expanded) (not $.Traced)}} + [Traced/Expanded] + {{else}} + [Traced/Expanded] + {{end}} +{{end}} + +{{if $.Total}} +

Showing {{len $.Traces}} of {{$.Total}} traces.

+{{end}} + + + + + {{range $tr := $.Traces}} + + + + + {{/* TODO: include traceID/spanID */}} + + {{if $.Expanded}} + {{range $tr.Events}} + + + + + + {{end}} + {{end}} + {{end}} +
+ {{if $.Active}}Active{{else}}Completed{{end}} Requests +
WhenElapsed (s)
{{$tr.When}}{{$tr.ElapsedTime}}{{$tr.Title}}
{{.WhenString}}{{elapsed .Elapsed}}{{if or $.ShowSensitive (not .Sensitive)}}... {{.What}}{{else}}[redacted]{{end}}
+{{end}} {{/* if $.Traces */}} + +{{if $.Histogram}} +

Latency (µs) of {{$.Family}} over {{$.HistogramWindow}}

+{{$.Histogram}} +{{end}} {{/* if $.Histogram */}} + + + +{{end}} {{/* end of Epilog */}} +` diff --git a/vendor/golang.org/x/net/trace/trace_go16.go b/vendor/golang.org/x/net/trace/trace_go16.go new file mode 100644 index 000000000..d60819118 --- /dev/null +++ b/vendor/golang.org/x/net/trace/trace_go16.go @@ -0,0 +1,21 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !go1.7 + +package trace + +import "golang.org/x/net/context" + +// NewContext returns a copy of the parent context +// and associates it with a Trace. +func NewContext(ctx context.Context, tr Trace) context.Context { + return context.WithValue(ctx, contextKey, tr) +} + +// FromContext returns the Trace bound to the context, if any. +func FromContext(ctx context.Context) (tr Trace, ok bool) { + tr, ok = ctx.Value(contextKey).(Trace) + return +} diff --git a/vendor/golang.org/x/net/trace/trace_go17.go b/vendor/golang.org/x/net/trace/trace_go17.go new file mode 100644 index 000000000..df6e1fba7 --- /dev/null +++ b/vendor/golang.org/x/net/trace/trace_go17.go @@ -0,0 +1,21 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.7 + +package trace + +import "context" + +// NewContext returns a copy of the parent context +// and associates it with a Trace. +func NewContext(ctx context.Context, tr Trace) context.Context { + return context.WithValue(ctx, contextKey, tr) +} + +// FromContext returns the Trace bound to the context, if any. +func FromContext(ctx context.Context) (tr Trace, ok bool) { + tr, ok = ctx.Value(contextKey).(Trace) + return +} diff --git a/vendor/golang.org/x/net/trace/trace_test.go b/vendor/golang.org/x/net/trace/trace_test.go new file mode 100644 index 000000000..bfd9dfe94 --- /dev/null +++ b/vendor/golang.org/x/net/trace/trace_test.go @@ -0,0 +1,178 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package trace + +import ( + "net/http" + "reflect" + "testing" +) + +type s struct{} + +func (s) String() string { return "lazy string" } + +// TestReset checks whether all the fields are zeroed after reset. +func TestReset(t *testing.T) { + tr := New("foo", "bar") + tr.LazyLog(s{}, false) + tr.LazyPrintf("%d", 1) + tr.SetRecycler(func(_ interface{}) {}) + tr.SetTraceInfo(3, 4) + tr.SetMaxEvents(100) + tr.SetError() + tr.Finish() + + tr.(*trace).reset() + + if !reflect.DeepEqual(tr, new(trace)) { + t.Errorf("reset didn't clear all fields: %+v", tr) + } +} + +// TestResetLog checks whether all the fields are zeroed after reset. +func TestResetLog(t *testing.T) { + el := NewEventLog("foo", "bar") + el.Printf("message") + el.Errorf("error") + el.Finish() + + el.(*eventLog).reset() + + if !reflect.DeepEqual(el, new(eventLog)) { + t.Errorf("reset didn't clear all fields: %+v", el) + } +} + +func TestAuthRequest(t *testing.T) { + testCases := []struct { + host string + want bool + }{ + {host: "192.168.23.1", want: false}, + {host: "192.168.23.1:8080", want: false}, + {host: "malformed remote addr", want: false}, + {host: "localhost", want: true}, + {host: "localhost:8080", want: true}, + {host: "127.0.0.1", want: true}, + {host: "127.0.0.1:8080", want: true}, + {host: "::1", want: true}, + {host: "[::1]:8080", want: true}, + } + for _, tt := range testCases { + req := &http.Request{RemoteAddr: tt.host} + any, sensitive := AuthRequest(req) + if any != tt.want || sensitive != tt.want { + t.Errorf("AuthRequest(%q) = %t, %t; want %t, %t", tt.host, any, sensitive, tt.want, tt.want) + } + } +} + +// TestParseTemplate checks that all templates used by this package are valid +// as they are parsed on first usage +func TestParseTemplate(t *testing.T) { + if tmpl := distTmpl(); tmpl == nil { + t.Error("invalid template returned from distTmpl()") + } + if tmpl := pageTmpl(); tmpl == nil { + t.Error("invalid template returned from pageTmpl()") + } + if tmpl := eventsTmpl(); tmpl == nil { + t.Error("invalid template returned from eventsTmpl()") + } +} + +func benchmarkTrace(b *testing.B, maxEvents, numEvents int) { + numSpans := (b.N + numEvents + 1) / numEvents + + for i := 0; i < numSpans; i++ { + tr := New("test", "test") + tr.SetMaxEvents(maxEvents) + for j := 0; j < numEvents; j++ { + tr.LazyPrintf("%d", j) + } + tr.Finish() + } +} + +func BenchmarkTrace_Default_2(b *testing.B) { + benchmarkTrace(b, 0, 2) +} + +func BenchmarkTrace_Default_10(b *testing.B) { + benchmarkTrace(b, 0, 10) +} + +func BenchmarkTrace_Default_100(b *testing.B) { + benchmarkTrace(b, 0, 100) +} + +func BenchmarkTrace_Default_1000(b *testing.B) { + benchmarkTrace(b, 0, 1000) +} + +func BenchmarkTrace_Default_10000(b *testing.B) { + benchmarkTrace(b, 0, 10000) +} + +func BenchmarkTrace_10_2(b *testing.B) { + benchmarkTrace(b, 10, 2) +} + +func BenchmarkTrace_10_10(b *testing.B) { + benchmarkTrace(b, 10, 10) +} + +func BenchmarkTrace_10_100(b *testing.B) { + benchmarkTrace(b, 10, 100) +} + +func BenchmarkTrace_10_1000(b *testing.B) { + benchmarkTrace(b, 10, 1000) +} + +func BenchmarkTrace_10_10000(b *testing.B) { + benchmarkTrace(b, 10, 10000) +} + +func BenchmarkTrace_100_2(b *testing.B) { + benchmarkTrace(b, 100, 2) +} + +func BenchmarkTrace_100_10(b *testing.B) { + benchmarkTrace(b, 100, 10) +} + +func BenchmarkTrace_100_100(b *testing.B) { + benchmarkTrace(b, 100, 100) +} + +func BenchmarkTrace_100_1000(b *testing.B) { + benchmarkTrace(b, 100, 1000) +} + +func BenchmarkTrace_100_10000(b *testing.B) { + benchmarkTrace(b, 100, 10000) +} + +func BenchmarkTrace_1000_2(b *testing.B) { + benchmarkTrace(b, 1000, 2) +} + +func BenchmarkTrace_1000_10(b *testing.B) { + benchmarkTrace(b, 1000, 10) +} + +func BenchmarkTrace_1000_100(b *testing.B) { + benchmarkTrace(b, 1000, 100) +} + +func BenchmarkTrace_1000_1000(b *testing.B) { + benchmarkTrace(b, 1000, 1000) +} + +func BenchmarkTrace_1000_10000(b *testing.B) { + benchmarkTrace(b, 1000, 10000) +} diff --git a/vendor/golang.org/x/oauth2/.travis.yml b/vendor/golang.org/x/oauth2/.travis.yml deleted file mode 100644 index fa139db22..000000000 --- a/vendor/golang.org/x/oauth2/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: go - -go: - - tip - -install: - - export GOPATH="$HOME/gopath" - - mkdir -p "$GOPATH/src/golang.org/x" - - mv "$TRAVIS_BUILD_DIR" "$GOPATH/src/golang.org/x/oauth2" - - go get -v -t -d golang.org/x/oauth2/... - -script: - - go test -v golang.org/x/oauth2/... diff --git a/vendor/golang.org/x/oauth2/AUTHORS b/vendor/golang.org/x/oauth2/AUTHORS deleted file mode 100644 index 15167cd74..000000000 --- a/vendor/golang.org/x/oauth2/AUTHORS +++ /dev/null @@ -1,3 +0,0 @@ -# This source code refers to The Go Authors for copyright purposes. -# The master list of authors is in the main Go distribution, -# visible at http://tip.golang.org/AUTHORS. diff --git a/vendor/golang.org/x/oauth2/LICENSE b/vendor/golang.org/x/oauth2/LICENSE deleted file mode 100644 index d02f24fd5..000000000 --- a/vendor/golang.org/x/oauth2/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The oauth2 Authors. 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/vendor/golang.org/x/oauth2/README.md b/vendor/golang.org/x/oauth2/README.md deleted file mode 100644 index b0ddf3c10..000000000 --- a/vendor/golang.org/x/oauth2/README.md +++ /dev/null @@ -1,74 +0,0 @@ -# OAuth2 for Go - -[![Build Status](https://travis-ci.org/golang/oauth2.svg?branch=master)](https://travis-ci.org/golang/oauth2) -[![GoDoc](https://godoc.org/golang.org/x/oauth2?status.svg)](https://godoc.org/golang.org/x/oauth2) - -oauth2 package contains a client implementation for OAuth 2.0 spec. - -## Installation - -~~~~ -go get golang.org/x/oauth2 -~~~~ - -See godoc for further documentation and examples. - -* [godoc.org/golang.org/x/oauth2](http://godoc.org/golang.org/x/oauth2) -* [godoc.org/golang.org/x/oauth2/google](http://godoc.org/golang.org/x/oauth2/google) - - -## App Engine - -In change 96e89be (March 2015) we removed the `oauth2.Context2` type in favor -of the [`context.Context`](https://golang.org/x/net/context#Context) type from -the `golang.org/x/net/context` package - -This means its no longer possible to use the "Classic App Engine" -`appengine.Context` type with the `oauth2` package. (You're using -Classic App Engine if you import the package `"appengine"`.) - -To work around this, you may use the new `"google.golang.org/appengine"` -package. This package has almost the same API as the `"appengine"` package, -but it can be fetched with `go get` and used on "Managed VMs" and well as -Classic App Engine. - -See the [new `appengine` package's readme](https://github.com/golang/appengine#updating-a-go-app-engine-app) -for information on updating your app. - -If you don't want to update your entire app to use the new App Engine packages, -you may use both sets of packages in parallel, using only the new packages -with the `oauth2` package. - - import ( - "golang.org/x/net/context" - "golang.org/x/oauth2" - "golang.org/x/oauth2/google" - newappengine "google.golang.org/appengine" - newurlfetch "google.golang.org/appengine/urlfetch" - - "appengine" - ) - - func handler(w http.ResponseWriter, r *http.Request) { - var c appengine.Context = appengine.NewContext(r) - c.Infof("Logging a message with the old package") - - var ctx context.Context = newappengine.NewContext(r) - client := &http.Client{ - Transport: &oauth2.Transport{ - Source: google.AppEngineTokenSource(ctx, "scope"), - Base: &newurlfetch.Transport{Context: ctx}, - }, - } - client.Get("...") - } - -## Contributing - -We appreciate your help! - -To contribute, please read the contribution guidelines: - https://golang.org/doc/contribute.html - -Note that the Go project does not use GitHub pull requests but -uses Gerrit for code reviews. See the contribution guide for details. diff --git a/vendor/golang.org/x/oauth2/client_appengine.go b/vendor/golang.org/x/oauth2/client_appengine.go deleted file mode 100644 index 8962c49d1..000000000 --- a/vendor/golang.org/x/oauth2/client_appengine.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build appengine - -// App Engine hooks. - -package oauth2 - -import ( - "net/http" - - "golang.org/x/net/context" - "golang.org/x/oauth2/internal" - "google.golang.org/appengine/urlfetch" -) - -func init() { - internal.RegisterContextClientFunc(contextClientAppEngine) -} - -func contextClientAppEngine(ctx context.Context) (*http.Client, error) { - return urlfetch.Client(ctx), nil -} diff --git a/vendor/golang.org/x/oauth2/google/appengine.go b/vendor/golang.org/x/oauth2/google/appengine.go deleted file mode 100644 index 50d918b87..000000000 --- a/vendor/golang.org/x/oauth2/google/appengine.go +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package google - -import ( - "sort" - "strings" - "sync" - "time" - - "golang.org/x/net/context" - "golang.org/x/oauth2" -) - -// appengineFlex is set at init time by appengineflex_hook.go. If true, we are on App Engine Flex. -var appengineFlex bool - -// Set at init time by appengine_hook.go. If nil, we're not on App Engine. -var appengineTokenFunc func(c context.Context, scopes ...string) (token string, expiry time.Time, err error) - -// Set at init time by appengine_hook.go. If nil, we're not on App Engine. -var appengineAppIDFunc func(c context.Context) string - -// AppEngineTokenSource returns a token source that fetches tokens -// issued to the current App Engine application's service account. -// If you are implementing a 3-legged OAuth 2.0 flow on App Engine -// that involves user accounts, see oauth2.Config instead. -// -// The provided context must have come from appengine.NewContext. -func AppEngineTokenSource(ctx context.Context, scope ...string) oauth2.TokenSource { - if appengineTokenFunc == nil { - panic("google: AppEngineTokenSource can only be used on App Engine.") - } - scopes := append([]string{}, scope...) - sort.Strings(scopes) - return &appEngineTokenSource{ - ctx: ctx, - scopes: scopes, - key: strings.Join(scopes, " "), - } -} - -// aeTokens helps the fetched tokens to be reused until their expiration. -var ( - aeTokensMu sync.Mutex - aeTokens = make(map[string]*tokenLock) // key is space-separated scopes -) - -type tokenLock struct { - mu sync.Mutex // guards t; held while fetching or updating t - t *oauth2.Token -} - -type appEngineTokenSource struct { - ctx context.Context - scopes []string - key string // to aeTokens map; space-separated scopes -} - -func (ts *appEngineTokenSource) Token() (*oauth2.Token, error) { - if appengineTokenFunc == nil { - panic("google: AppEngineTokenSource can only be used on App Engine.") - } - - aeTokensMu.Lock() - tok, ok := aeTokens[ts.key] - if !ok { - tok = &tokenLock{} - aeTokens[ts.key] = tok - } - aeTokensMu.Unlock() - - tok.mu.Lock() - defer tok.mu.Unlock() - if tok.t.Valid() { - return tok.t, nil - } - access, exp, err := appengineTokenFunc(ts.ctx, ts.scopes...) - if err != nil { - return nil, err - } - tok.t = &oauth2.Token{ - AccessToken: access, - Expiry: exp, - } - return tok.t, nil -} diff --git a/vendor/golang.org/x/oauth2/google/appengine_hook.go b/vendor/golang.org/x/oauth2/google/appengine_hook.go deleted file mode 100644 index 56669eaa9..000000000 --- a/vendor/golang.org/x/oauth2/google/appengine_hook.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build appengine appenginevm - -package google - -import "google.golang.org/appengine" - -func init() { - appengineTokenFunc = appengine.AccessToken - appengineAppIDFunc = appengine.AppID -} diff --git a/vendor/golang.org/x/oauth2/google/appengineflex_hook.go b/vendor/golang.org/x/oauth2/google/appengineflex_hook.go deleted file mode 100644 index 5d0231af2..000000000 --- a/vendor/golang.org/x/oauth2/google/appengineflex_hook.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build appenginevm - -package google - -func init() { - appengineFlex = true // Flex doesn't support appengine.AccessToken; depend on metadata server. -} diff --git a/vendor/golang.org/x/oauth2/google/default.go b/vendor/golang.org/x/oauth2/google/default.go deleted file mode 100644 index 004ed4eab..000000000 --- a/vendor/golang.org/x/oauth2/google/default.go +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package google - -import ( - "encoding/json" - "fmt" - "io/ioutil" - "net/http" - "os" - "path/filepath" - "runtime" - - "cloud.google.com/go/compute/metadata" - "golang.org/x/net/context" - "golang.org/x/oauth2" -) - -// DefaultCredentials holds "Application Default Credentials". -// For more details, see: -// https://developers.google.com/accounts/docs/application-default-credentials -type DefaultCredentials struct { - ProjectID string // may be empty - TokenSource oauth2.TokenSource -} - -// DefaultClient returns an HTTP Client that uses the -// DefaultTokenSource to obtain authentication credentials. -func DefaultClient(ctx context.Context, scope ...string) (*http.Client, error) { - ts, err := DefaultTokenSource(ctx, scope...) - if err != nil { - return nil, err - } - return oauth2.NewClient(ctx, ts), nil -} - -// DefaultTokenSource returns the token source for -// "Application Default Credentials". -// It is a shortcut for FindDefaultCredentials(ctx, scope).TokenSource. -func DefaultTokenSource(ctx context.Context, scope ...string) (oauth2.TokenSource, error) { - creds, err := FindDefaultCredentials(ctx, scope...) - if err != nil { - return nil, err - } - return creds.TokenSource, nil -} - -// FindDefaultCredentials searches for "Application Default Credentials". -// -// It looks for credentials in the following places, -// preferring the first location found: -// -// 1. A JSON file whose path is specified by the -// GOOGLE_APPLICATION_CREDENTIALS environment variable. -// 2. A JSON file in a location known to the gcloud command-line tool. -// On Windows, this is %APPDATA%/gcloud/application_default_credentials.json. -// On other systems, $HOME/.config/gcloud/application_default_credentials.json. -// 3. On Google App Engine it uses the appengine.AccessToken function. -// 4. On Google Compute Engine and Google App Engine Managed VMs, it fetches -// credentials from the metadata server. -// (In this final case any provided scopes are ignored.) -func FindDefaultCredentials(ctx context.Context, scope ...string) (*DefaultCredentials, error) { - // First, try the environment variable. - const envVar = "GOOGLE_APPLICATION_CREDENTIALS" - if filename := os.Getenv(envVar); filename != "" { - creds, err := readCredentialsFile(ctx, filename, scope) - if err != nil { - return nil, fmt.Errorf("google: error getting credentials using %v environment variable: %v", envVar, err) - } - return creds, nil - } - - // Second, try a well-known file. - filename := wellKnownFile() - if creds, err := readCredentialsFile(ctx, filename, scope); err == nil { - return creds, nil - } else if !os.IsNotExist(err) { - return nil, fmt.Errorf("google: error getting credentials using well-known file (%v): %v", filename, err) - } - - // Third, if we're on Google App Engine use those credentials. - if appengineTokenFunc != nil && !appengineFlex { - return &DefaultCredentials{ - ProjectID: appengineAppIDFunc(ctx), - TokenSource: AppEngineTokenSource(ctx, scope...), - }, nil - } - - // Fourth, if we're on Google Compute Engine use the metadata server. - if metadata.OnGCE() { - id, _ := metadata.ProjectID() - return &DefaultCredentials{ - ProjectID: id, - TokenSource: ComputeTokenSource(""), - }, nil - } - - // None are found; return helpful error. - const url = "https://developers.google.com/accounts/docs/application-default-credentials" - return nil, fmt.Errorf("google: could not find default credentials. See %v for more information.", url) -} - -func wellKnownFile() string { - const f = "application_default_credentials.json" - if runtime.GOOS == "windows" { - return filepath.Join(os.Getenv("APPDATA"), "gcloud", f) - } - return filepath.Join(guessUnixHomeDir(), ".config", "gcloud", f) -} - -func readCredentialsFile(ctx context.Context, filename string, scopes []string) (*DefaultCredentials, error) { - b, err := ioutil.ReadFile(filename) - if err != nil { - return nil, err - } - var f credentialsFile - if err := json.Unmarshal(b, &f); err != nil { - return nil, err - } - ts, err := f.tokenSource(ctx, append([]string(nil), scopes...)) - if err != nil { - return nil, err - } - return &DefaultCredentials{ - ProjectID: f.ProjectID, - TokenSource: ts, - }, nil -} diff --git a/vendor/golang.org/x/oauth2/google/google.go b/vendor/golang.org/x/oauth2/google/google.go deleted file mode 100644 index 3f82963df..000000000 --- a/vendor/golang.org/x/oauth2/google/google.go +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package google provides support for making OAuth2 authorized and -// authenticated HTTP requests to Google APIs. -// It supports the Web server flow, client-side credentials, service accounts, -// Google Compute Engine service accounts, and Google App Engine service -// accounts. -// -// For more information, please read -// https://developers.google.com/accounts/docs/OAuth2 -// and -// https://developers.google.com/accounts/docs/application-default-credentials. -package google - -import ( - "encoding/json" - "errors" - "fmt" - "strings" - "time" - - "cloud.google.com/go/compute/metadata" - "golang.org/x/net/context" - "golang.org/x/oauth2" - "golang.org/x/oauth2/jwt" -) - -// Endpoint is Google's OAuth 2.0 endpoint. -var Endpoint = oauth2.Endpoint{ - AuthURL: "https://accounts.google.com/o/oauth2/auth", - TokenURL: "https://accounts.google.com/o/oauth2/token", -} - -// JWTTokenURL is Google's OAuth 2.0 token URL to use with the JWT flow. -const JWTTokenURL = "https://accounts.google.com/o/oauth2/token" - -// ConfigFromJSON uses a Google Developers Console client_credentials.json -// file to construct a config. -// client_credentials.json can be downloaded from -// https://console.developers.google.com, under "Credentials". Download the Web -// application credentials in the JSON format and provide the contents of the -// file as jsonKey. -func ConfigFromJSON(jsonKey []byte, scope ...string) (*oauth2.Config, error) { - type cred struct { - ClientID string `json:"client_id"` - ClientSecret string `json:"client_secret"` - RedirectURIs []string `json:"redirect_uris"` - AuthURI string `json:"auth_uri"` - TokenURI string `json:"token_uri"` - } - var j struct { - Web *cred `json:"web"` - Installed *cred `json:"installed"` - } - if err := json.Unmarshal(jsonKey, &j); err != nil { - return nil, err - } - var c *cred - switch { - case j.Web != nil: - c = j.Web - case j.Installed != nil: - c = j.Installed - default: - return nil, fmt.Errorf("oauth2/google: no credentials found") - } - if len(c.RedirectURIs) < 1 { - return nil, errors.New("oauth2/google: missing redirect URL in the client_credentials.json") - } - return &oauth2.Config{ - ClientID: c.ClientID, - ClientSecret: c.ClientSecret, - RedirectURL: c.RedirectURIs[0], - Scopes: scope, - Endpoint: oauth2.Endpoint{ - AuthURL: c.AuthURI, - TokenURL: c.TokenURI, - }, - }, nil -} - -// JWTConfigFromJSON uses a Google Developers service account JSON key file to read -// the credentials that authorize and authenticate the requests. -// Create a service account on "Credentials" for your project at -// https://console.developers.google.com to download a JSON key file. -func JWTConfigFromJSON(jsonKey []byte, scope ...string) (*jwt.Config, error) { - var f credentialsFile - if err := json.Unmarshal(jsonKey, &f); err != nil { - return nil, err - } - if f.Type != serviceAccountKey { - return nil, fmt.Errorf("google: read JWT from JSON credentials: 'type' field is %q (expected %q)", f.Type, serviceAccountKey) - } - scope = append([]string(nil), scope...) // copy - return f.jwtConfig(scope), nil -} - -// JSON key file types. -const ( - serviceAccountKey = "service_account" - userCredentialsKey = "authorized_user" -) - -// credentialsFile is the unmarshalled representation of a credentials file. -type credentialsFile struct { - Type string `json:"type"` // serviceAccountKey or userCredentialsKey - - // Service Account fields - ClientEmail string `json:"client_email"` - PrivateKeyID string `json:"private_key_id"` - PrivateKey string `json:"private_key"` - TokenURL string `json:"token_uri"` - ProjectID string `json:"project_id"` - - // User Credential fields - // (These typically come from gcloud auth.) - ClientSecret string `json:"client_secret"` - ClientID string `json:"client_id"` - RefreshToken string `json:"refresh_token"` -} - -func (f *credentialsFile) jwtConfig(scopes []string) *jwt.Config { - cfg := &jwt.Config{ - Email: f.ClientEmail, - PrivateKey: []byte(f.PrivateKey), - PrivateKeyID: f.PrivateKeyID, - Scopes: scopes, - TokenURL: f.TokenURL, - } - if cfg.TokenURL == "" { - cfg.TokenURL = JWTTokenURL - } - return cfg -} - -func (f *credentialsFile) tokenSource(ctx context.Context, scopes []string) (oauth2.TokenSource, error) { - switch f.Type { - case serviceAccountKey: - cfg := f.jwtConfig(scopes) - return cfg.TokenSource(ctx), nil - case userCredentialsKey: - cfg := &oauth2.Config{ - ClientID: f.ClientID, - ClientSecret: f.ClientSecret, - Scopes: scopes, - Endpoint: Endpoint, - } - tok := &oauth2.Token{RefreshToken: f.RefreshToken} - return cfg.TokenSource(ctx, tok), nil - case "": - return nil, errors.New("missing 'type' field in credentials") - default: - return nil, fmt.Errorf("unknown credential type: %q", f.Type) - } -} - -// ComputeTokenSource returns a token source that fetches access tokens -// from Google Compute Engine (GCE)'s metadata server. It's only valid to use -// this token source if your program is running on a GCE instance. -// If no account is specified, "default" is used. -// Further information about retrieving access tokens from the GCE metadata -// server can be found at https://cloud.google.com/compute/docs/authentication. -func ComputeTokenSource(account string) oauth2.TokenSource { - return oauth2.ReuseTokenSource(nil, computeSource{account: account}) -} - -type computeSource struct { - account string -} - -func (cs computeSource) Token() (*oauth2.Token, error) { - if !metadata.OnGCE() { - return nil, errors.New("oauth2/google: can't get a token from the metadata service; not running on GCE") - } - acct := cs.account - if acct == "" { - acct = "default" - } - tokenJSON, err := metadata.Get("instance/service-accounts/" + acct + "/token") - if err != nil { - return nil, err - } - var res struct { - AccessToken string `json:"access_token"` - ExpiresInSec int `json:"expires_in"` - TokenType string `json:"token_type"` - } - err = json.NewDecoder(strings.NewReader(tokenJSON)).Decode(&res) - if err != nil { - return nil, fmt.Errorf("oauth2/google: invalid token JSON from metadata: %v", err) - } - if res.ExpiresInSec == 0 || res.AccessToken == "" { - return nil, fmt.Errorf("oauth2/google: incomplete token received from metadata") - } - return &oauth2.Token{ - AccessToken: res.AccessToken, - TokenType: res.TokenType, - Expiry: time.Now().Add(time.Duration(res.ExpiresInSec) * time.Second), - }, nil -} diff --git a/vendor/golang.org/x/oauth2/google/jwt.go b/vendor/golang.org/x/oauth2/google/jwt.go deleted file mode 100644 index b0fdb3a88..000000000 --- a/vendor/golang.org/x/oauth2/google/jwt.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package google - -import ( - "crypto/rsa" - "fmt" - "time" - - "golang.org/x/oauth2" - "golang.org/x/oauth2/internal" - "golang.org/x/oauth2/jws" -) - -// JWTAccessTokenSourceFromJSON uses a Google Developers service account JSON -// key file to read the credentials that authorize and authenticate the -// requests, and returns a TokenSource that does not use any OAuth2 flow but -// instead creates a JWT and sends that as the access token. -// The audience is typically a URL that specifies the scope of the credentials. -// -// Note that this is not a standard OAuth flow, but rather an -// optimization supported by a few Google services. -// Unless you know otherwise, you should use JWTConfigFromJSON instead. -func JWTAccessTokenSourceFromJSON(jsonKey []byte, audience string) (oauth2.TokenSource, error) { - cfg, err := JWTConfigFromJSON(jsonKey) - if err != nil { - return nil, fmt.Errorf("google: could not parse JSON key: %v", err) - } - pk, err := internal.ParseKey(cfg.PrivateKey) - if err != nil { - return nil, fmt.Errorf("google: could not parse key: %v", err) - } - ts := &jwtAccessTokenSource{ - email: cfg.Email, - audience: audience, - pk: pk, - pkID: cfg.PrivateKeyID, - } - tok, err := ts.Token() - if err != nil { - return nil, err - } - return oauth2.ReuseTokenSource(tok, ts), nil -} - -type jwtAccessTokenSource struct { - email, audience string - pk *rsa.PrivateKey - pkID string -} - -func (ts *jwtAccessTokenSource) Token() (*oauth2.Token, error) { - iat := time.Now() - exp := iat.Add(time.Hour) - cs := &jws.ClaimSet{ - Iss: ts.email, - Sub: ts.email, - Aud: ts.audience, - Iat: iat.Unix(), - Exp: exp.Unix(), - } - hdr := &jws.Header{ - Algorithm: "RS256", - Typ: "JWT", - KeyID: string(ts.pkID), - } - msg, err := jws.Encode(hdr, cs, ts.pk) - if err != nil { - return nil, fmt.Errorf("google: could not encode JWT: %v", err) - } - return &oauth2.Token{AccessToken: msg, TokenType: "Bearer", Expiry: exp}, nil -} diff --git a/vendor/golang.org/x/oauth2/google/sdk.go b/vendor/golang.org/x/oauth2/google/sdk.go deleted file mode 100644 index bdc18084b..000000000 --- a/vendor/golang.org/x/oauth2/google/sdk.go +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package google - -import ( - "encoding/json" - "errors" - "fmt" - "net/http" - "os" - "os/user" - "path/filepath" - "runtime" - "strings" - "time" - - "golang.org/x/net/context" - "golang.org/x/oauth2" - "golang.org/x/oauth2/internal" -) - -type sdkCredentials struct { - Data []struct { - Credential struct { - ClientID string `json:"client_id"` - ClientSecret string `json:"client_secret"` - AccessToken string `json:"access_token"` - RefreshToken string `json:"refresh_token"` - TokenExpiry *time.Time `json:"token_expiry"` - } `json:"credential"` - Key struct { - Account string `json:"account"` - Scope string `json:"scope"` - } `json:"key"` - } -} - -// An SDKConfig provides access to tokens from an account already -// authorized via the Google Cloud SDK. -type SDKConfig struct { - conf oauth2.Config - initialToken *oauth2.Token -} - -// NewSDKConfig creates an SDKConfig for the given Google Cloud SDK -// account. If account is empty, the account currently active in -// Google Cloud SDK properties is used. -// Google Cloud SDK credentials must be created by running `gcloud auth` -// before using this function. -// The Google Cloud SDK is available at https://cloud.google.com/sdk/. -func NewSDKConfig(account string) (*SDKConfig, error) { - configPath, err := sdkConfigPath() - if err != nil { - return nil, fmt.Errorf("oauth2/google: error getting SDK config path: %v", err) - } - credentialsPath := filepath.Join(configPath, "credentials") - f, err := os.Open(credentialsPath) - if err != nil { - return nil, fmt.Errorf("oauth2/google: failed to load SDK credentials: %v", err) - } - defer f.Close() - - var c sdkCredentials - if err := json.NewDecoder(f).Decode(&c); err != nil { - return nil, fmt.Errorf("oauth2/google: failed to decode SDK credentials from %q: %v", credentialsPath, err) - } - if len(c.Data) == 0 { - return nil, fmt.Errorf("oauth2/google: no credentials found in %q, run `gcloud auth login` to create one", credentialsPath) - } - if account == "" { - propertiesPath := filepath.Join(configPath, "properties") - f, err := os.Open(propertiesPath) - if err != nil { - return nil, fmt.Errorf("oauth2/google: failed to load SDK properties: %v", err) - } - defer f.Close() - ini, err := internal.ParseINI(f) - if err != nil { - return nil, fmt.Errorf("oauth2/google: failed to parse SDK properties %q: %v", propertiesPath, err) - } - core, ok := ini["core"] - if !ok { - return nil, fmt.Errorf("oauth2/google: failed to find [core] section in %v", ini) - } - active, ok := core["account"] - if !ok { - return nil, fmt.Errorf("oauth2/google: failed to find %q attribute in %v", "account", core) - } - account = active - } - - for _, d := range c.Data { - if account == "" || d.Key.Account == account { - if d.Credential.AccessToken == "" && d.Credential.RefreshToken == "" { - return nil, fmt.Errorf("oauth2/google: no token available for account %q", account) - } - var expiry time.Time - if d.Credential.TokenExpiry != nil { - expiry = *d.Credential.TokenExpiry - } - return &SDKConfig{ - conf: oauth2.Config{ - ClientID: d.Credential.ClientID, - ClientSecret: d.Credential.ClientSecret, - Scopes: strings.Split(d.Key.Scope, " "), - Endpoint: Endpoint, - RedirectURL: "oob", - }, - initialToken: &oauth2.Token{ - AccessToken: d.Credential.AccessToken, - RefreshToken: d.Credential.RefreshToken, - Expiry: expiry, - }, - }, nil - } - } - return nil, fmt.Errorf("oauth2/google: no such credentials for account %q", account) -} - -// Client returns an HTTP client using Google Cloud SDK credentials to -// authorize requests. The token will auto-refresh as necessary. The -// underlying http.RoundTripper will be obtained using the provided -// context. The returned client and its Transport should not be -// modified. -func (c *SDKConfig) Client(ctx context.Context) *http.Client { - return &http.Client{ - Transport: &oauth2.Transport{ - Source: c.TokenSource(ctx), - }, - } -} - -// TokenSource returns an oauth2.TokenSource that retrieve tokens from -// Google Cloud SDK credentials using the provided context. -// It will returns the current access token stored in the credentials, -// and refresh it when it expires, but it won't update the credentials -// with the new access token. -func (c *SDKConfig) TokenSource(ctx context.Context) oauth2.TokenSource { - return c.conf.TokenSource(ctx, c.initialToken) -} - -// Scopes are the OAuth 2.0 scopes the current account is authorized for. -func (c *SDKConfig) Scopes() []string { - return c.conf.Scopes -} - -// sdkConfigPath tries to guess where the gcloud config is located. -// It can be overridden during tests. -var sdkConfigPath = func() (string, error) { - if runtime.GOOS == "windows" { - return filepath.Join(os.Getenv("APPDATA"), "gcloud"), nil - } - homeDir := guessUnixHomeDir() - if homeDir == "" { - return "", errors.New("unable to get current user home directory: os/user lookup failed; $HOME is empty") - } - return filepath.Join(homeDir, ".config", "gcloud"), nil -} - -func guessUnixHomeDir() string { - // Prefer $HOME over user.Current due to glibc bug: golang.org/issue/13470 - if v := os.Getenv("HOME"); v != "" { - return v - } - // Else, fall back to user.Current: - if u, err := user.Current(); err == nil { - return u.HomeDir - } - return "" -} diff --git a/vendor/golang.org/x/oauth2/internal/oauth2.go b/vendor/golang.org/x/oauth2/internal/oauth2.go deleted file mode 100644 index e31541b39..000000000 --- a/vendor/golang.org/x/oauth2/internal/oauth2.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package internal contains support packages for oauth2 package. -package internal - -import ( - "bufio" - "crypto/rsa" - "crypto/x509" - "encoding/pem" - "errors" - "fmt" - "io" - "strings" -) - -// ParseKey converts the binary contents of a private key file -// to an *rsa.PrivateKey. It detects whether the private key is in a -// PEM container or not. If so, it extracts the the private key -// from PEM container before conversion. It only supports PEM -// containers with no passphrase. -func ParseKey(key []byte) (*rsa.PrivateKey, error) { - block, _ := pem.Decode(key) - if block != nil { - key = block.Bytes - } - parsedKey, err := x509.ParsePKCS8PrivateKey(key) - if err != nil { - parsedKey, err = x509.ParsePKCS1PrivateKey(key) - if err != nil { - return nil, fmt.Errorf("private key should be a PEM or plain PKSC1 or PKCS8; parse error: %v", err) - } - } - parsed, ok := parsedKey.(*rsa.PrivateKey) - if !ok { - return nil, errors.New("private key is invalid") - } - return parsed, nil -} - -func ParseINI(ini io.Reader) (map[string]map[string]string, error) { - result := map[string]map[string]string{ - "": {}, // root section - } - scanner := bufio.NewScanner(ini) - currentSection := "" - for scanner.Scan() { - line := strings.TrimSpace(scanner.Text()) - if strings.HasPrefix(line, ";") { - // comment. - continue - } - if strings.HasPrefix(line, "[") && strings.HasSuffix(line, "]") { - currentSection = strings.TrimSpace(line[1 : len(line)-1]) - result[currentSection] = map[string]string{} - continue - } - parts := strings.SplitN(line, "=", 2) - if len(parts) == 2 && parts[0] != "" { - result[currentSection][strings.TrimSpace(parts[0])] = strings.TrimSpace(parts[1]) - } - } - if err := scanner.Err(); err != nil { - return nil, fmt.Errorf("error scanning ini: %v", err) - } - return result, nil -} - -func CondVal(v string) []string { - if v == "" { - return nil - } - return []string{v} -} diff --git a/vendor/golang.org/x/oauth2/internal/token.go b/vendor/golang.org/x/oauth2/internal/token.go deleted file mode 100644 index 018b58ad1..000000000 --- a/vendor/golang.org/x/oauth2/internal/token.go +++ /dev/null @@ -1,247 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package internal contains support packages for oauth2 package. -package internal - -import ( - "encoding/json" - "fmt" - "io" - "io/ioutil" - "mime" - "net/http" - "net/url" - "strconv" - "strings" - "time" - - "golang.org/x/net/context" -) - -// Token represents the crendentials used to authorize -// the requests to access protected resources on the OAuth 2.0 -// provider's backend. -// -// This type is a mirror of oauth2.Token and exists to break -// an otherwise-circular dependency. Other internal packages -// should convert this Token into an oauth2.Token before use. -type Token struct { - // AccessToken is the token that authorizes and authenticates - // the requests. - AccessToken string - - // TokenType is the type of token. - // The Type method returns either this or "Bearer", the default. - TokenType string - - // RefreshToken is a token that's used by the application - // (as opposed to the user) to refresh the access token - // if it expires. - RefreshToken string - - // Expiry is the optional expiration time of the access token. - // - // If zero, TokenSource implementations will reuse the same - // token forever and RefreshToken or equivalent - // mechanisms for that TokenSource will not be used. - Expiry time.Time - - // Raw optionally contains extra metadata from the server - // when updating a token. - Raw interface{} -} - -// tokenJSON is the struct representing the HTTP response from OAuth2 -// providers returning a token in JSON form. -type tokenJSON struct { - AccessToken string `json:"access_token"` - TokenType string `json:"token_type"` - RefreshToken string `json:"refresh_token"` - ExpiresIn expirationTime `json:"expires_in"` // at least PayPal returns string, while most return number - Expires expirationTime `json:"expires"` // broken Facebook spelling of expires_in -} - -func (e *tokenJSON) expiry() (t time.Time) { - if v := e.ExpiresIn; v != 0 { - return time.Now().Add(time.Duration(v) * time.Second) - } - if v := e.Expires; v != 0 { - return time.Now().Add(time.Duration(v) * time.Second) - } - return -} - -type expirationTime int32 - -func (e *expirationTime) UnmarshalJSON(b []byte) error { - var n json.Number - err := json.Unmarshal(b, &n) - if err != nil { - return err - } - i, err := n.Int64() - if err != nil { - return err - } - *e = expirationTime(i) - return nil -} - -var brokenAuthHeaderProviders = []string{ - "https://accounts.google.com/", - "https://api.codeswholesale.com/oauth/token", - "https://api.dropbox.com/", - "https://api.dropboxapi.com/", - "https://api.instagram.com/", - "https://api.netatmo.net/", - "https://api.odnoklassniki.ru/", - "https://api.pushbullet.com/", - "https://api.soundcloud.com/", - "https://api.twitch.tv/", - "https://app.box.com/", - "https://connect.stripe.com/", - "https://graph.facebook.com", // see https://github.com/golang/oauth2/issues/214 - "https://login.microsoftonline.com/", - "https://login.salesforce.com/", - "https://oauth.sandbox.trainingpeaks.com/", - "https://oauth.trainingpeaks.com/", - "https://oauth.vk.com/", - "https://openapi.baidu.com/", - "https://slack.com/", - "https://test-sandbox.auth.corp.google.com", - "https://test.salesforce.com/", - "https://user.gini.net/", - "https://www.douban.com/", - "https://www.googleapis.com/", - "https://www.linkedin.com/", - "https://www.strava.com/oauth/", - "https://www.wunderlist.com/oauth/", - "https://api.patreon.com/", - "https://sandbox.codeswholesale.com/oauth/token", -} - -// brokenAuthHeaderDomains lists broken providers that issue dynamic endpoints. -var brokenAuthHeaderDomains = []string{ - ".force.com", - ".okta.com", - ".oktapreview.com", -} - -func RegisterBrokenAuthHeaderProvider(tokenURL string) { - brokenAuthHeaderProviders = append(brokenAuthHeaderProviders, tokenURL) -} - -// providerAuthHeaderWorks reports whether the OAuth2 server identified by the tokenURL -// implements the OAuth2 spec correctly -// See https://code.google.com/p/goauth2/issues/detail?id=31 for background. -// In summary: -// - Reddit only accepts client secret in the Authorization header -// - Dropbox accepts either it in URL param or Auth header, but not both. -// - Google only accepts URL param (not spec compliant?), not Auth header -// - Stripe only accepts client secret in Auth header with Bearer method, not Basic -func providerAuthHeaderWorks(tokenURL string) bool { - for _, s := range brokenAuthHeaderProviders { - if strings.HasPrefix(tokenURL, s) { - // Some sites fail to implement the OAuth2 spec fully. - return false - } - } - - if u, err := url.Parse(tokenURL); err == nil { - for _, s := range brokenAuthHeaderDomains { - if strings.HasSuffix(u.Host, s) { - return false - } - } - } - - // Assume the provider implements the spec properly - // otherwise. We can add more exceptions as they're - // discovered. We will _not_ be adding configurable hooks - // to this package to let users select server bugs. - return true -} - -func RetrieveToken(ctx context.Context, clientID, clientSecret, tokenURL string, v url.Values) (*Token, error) { - hc, err := ContextClient(ctx) - if err != nil { - return nil, err - } - bustedAuth := !providerAuthHeaderWorks(tokenURL) - if bustedAuth { - if clientID != "" { - v.Set("client_id", clientID) - } - if clientSecret != "" { - v.Set("client_secret", clientSecret) - } - } - req, err := http.NewRequest("POST", tokenURL, strings.NewReader(v.Encode())) - if err != nil { - return nil, err - } - req.Header.Set("Content-Type", "application/x-www-form-urlencoded") - if !bustedAuth { - req.SetBasicAuth(clientID, clientSecret) - } - r, err := hc.Do(req) - if err != nil { - return nil, err - } - defer r.Body.Close() - body, err := ioutil.ReadAll(io.LimitReader(r.Body, 1<<20)) - if err != nil { - return nil, fmt.Errorf("oauth2: cannot fetch token: %v", err) - } - if code := r.StatusCode; code < 200 || code > 299 { - return nil, fmt.Errorf("oauth2: cannot fetch token: %v\nResponse: %s", r.Status, body) - } - - var token *Token - content, _, _ := mime.ParseMediaType(r.Header.Get("Content-Type")) - switch content { - case "application/x-www-form-urlencoded", "text/plain": - vals, err := url.ParseQuery(string(body)) - if err != nil { - return nil, err - } - token = &Token{ - AccessToken: vals.Get("access_token"), - TokenType: vals.Get("token_type"), - RefreshToken: vals.Get("refresh_token"), - Raw: vals, - } - e := vals.Get("expires_in") - if e == "" { - // TODO(jbd): Facebook's OAuth2 implementation is broken and - // returns expires_in field in expires. Remove the fallback to expires, - // when Facebook fixes their implementation. - e = vals.Get("expires") - } - expires, _ := strconv.Atoi(e) - if expires != 0 { - token.Expiry = time.Now().Add(time.Duration(expires) * time.Second) - } - default: - var tj tokenJSON - if err = json.Unmarshal(body, &tj); err != nil { - return nil, err - } - token = &Token{ - AccessToken: tj.AccessToken, - TokenType: tj.TokenType, - RefreshToken: tj.RefreshToken, - Expiry: tj.expiry(), - Raw: make(map[string]interface{}), - } - json.Unmarshal(body, &token.Raw) // no error checks for optional fields - } - // Don't overwrite `RefreshToken` with an empty value - // if this was a token refreshing request. - if token.RefreshToken == "" { - token.RefreshToken = v.Get("refresh_token") - } - return token, nil -} diff --git a/vendor/golang.org/x/oauth2/internal/transport.go b/vendor/golang.org/x/oauth2/internal/transport.go deleted file mode 100644 index f1f173e34..000000000 --- a/vendor/golang.org/x/oauth2/internal/transport.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package internal contains support packages for oauth2 package. -package internal - -import ( - "net/http" - - "golang.org/x/net/context" -) - -// HTTPClient is the context key to use with golang.org/x/net/context's -// WithValue function to associate an *http.Client value with a context. -var HTTPClient ContextKey - -// ContextKey is just an empty struct. It exists so HTTPClient can be -// an immutable public variable with a unique type. It's immutable -// because nobody else can create a ContextKey, being unexported. -type ContextKey struct{} - -// ContextClientFunc is a func which tries to return an *http.Client -// given a Context value. If it returns an error, the search stops -// with that error. If it returns (nil, nil), the search continues -// down the list of registered funcs. -type ContextClientFunc func(context.Context) (*http.Client, error) - -var contextClientFuncs []ContextClientFunc - -func RegisterContextClientFunc(fn ContextClientFunc) { - contextClientFuncs = append(contextClientFuncs, fn) -} - -func ContextClient(ctx context.Context) (*http.Client, error) { - if ctx != nil { - if hc, ok := ctx.Value(HTTPClient).(*http.Client); ok { - return hc, nil - } - } - for _, fn := range contextClientFuncs { - c, err := fn(ctx) - if err != nil { - return nil, err - } - if c != nil { - return c, nil - } - } - return http.DefaultClient, nil -} - -func ContextTransport(ctx context.Context) http.RoundTripper { - hc, err := ContextClient(ctx) - // This is a rare error case (somebody using nil on App Engine). - if err != nil { - return ErrorTransport{err} - } - return hc.Transport -} - -// ErrorTransport returns the specified error on RoundTrip. -// This RoundTripper should be used in rare error cases where -// error handling can be postponed to response handling time. -type ErrorTransport struct{ Err error } - -func (t ErrorTransport) RoundTrip(*http.Request) (*http.Response, error) { - return nil, t.Err -} diff --git a/vendor/golang.org/x/oauth2/jws/jws.go b/vendor/golang.org/x/oauth2/jws/jws.go deleted file mode 100644 index 8bcecb46b..000000000 --- a/vendor/golang.org/x/oauth2/jws/jws.go +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package jws provides a partial implementation -// of JSON Web Signature encoding and decoding. -// It exists to support the golang.org/x/oauth2 package. -// -// See RFC 7515. -// -// Deprecated: this package is not intended for public use and might be -// removed in the future. It exists for internal use only. -// Please switch to another JWS package or copy this package into your own -// source tree. -package jws - -import ( - "bytes" - "crypto" - "crypto/rand" - "crypto/rsa" - "crypto/sha256" - "encoding/base64" - "encoding/json" - "errors" - "fmt" - "strings" - "time" -) - -// ClaimSet contains information about the JWT signature including the -// permissions being requested (scopes), the target of the token, the issuer, -// the time the token was issued, and the lifetime of the token. -type ClaimSet struct { - Iss string `json:"iss"` // email address of the client_id of the application making the access token request - Scope string `json:"scope,omitempty"` // space-delimited list of the permissions the application requests - Aud string `json:"aud"` // descriptor of the intended target of the assertion (Optional). - Exp int64 `json:"exp"` // the expiration time of the assertion (seconds since Unix epoch) - Iat int64 `json:"iat"` // the time the assertion was issued (seconds since Unix epoch) - Typ string `json:"typ,omitempty"` // token type (Optional). - - // Email for which the application is requesting delegated access (Optional). - Sub string `json:"sub,omitempty"` - - // The old name of Sub. Client keeps setting Prn to be - // complaint with legacy OAuth 2.0 providers. (Optional) - Prn string `json:"prn,omitempty"` - - // See http://tools.ietf.org/html/draft-jones-json-web-token-10#section-4.3 - // This array is marshalled using custom code (see (c *ClaimSet) encode()). - PrivateClaims map[string]interface{} `json:"-"` -} - -func (c *ClaimSet) encode() (string, error) { - // Reverting time back for machines whose time is not perfectly in sync. - // If client machine's time is in the future according - // to Google servers, an access token will not be issued. - now := time.Now().Add(-10 * time.Second) - if c.Iat == 0 { - c.Iat = now.Unix() - } - if c.Exp == 0 { - c.Exp = now.Add(time.Hour).Unix() - } - if c.Exp < c.Iat { - return "", fmt.Errorf("jws: invalid Exp = %v; must be later than Iat = %v", c.Exp, c.Iat) - } - - b, err := json.Marshal(c) - if err != nil { - return "", err - } - - if len(c.PrivateClaims) == 0 { - return base64.RawURLEncoding.EncodeToString(b), nil - } - - // Marshal private claim set and then append it to b. - prv, err := json.Marshal(c.PrivateClaims) - if err != nil { - return "", fmt.Errorf("jws: invalid map of private claims %v", c.PrivateClaims) - } - - // Concatenate public and private claim JSON objects. - if !bytes.HasSuffix(b, []byte{'}'}) { - return "", fmt.Errorf("jws: invalid JSON %s", b) - } - if !bytes.HasPrefix(prv, []byte{'{'}) { - return "", fmt.Errorf("jws: invalid JSON %s", prv) - } - b[len(b)-1] = ',' // Replace closing curly brace with a comma. - b = append(b, prv[1:]...) // Append private claims. - return base64.RawURLEncoding.EncodeToString(b), nil -} - -// Header represents the header for the signed JWS payloads. -type Header struct { - // The algorithm used for signature. - Algorithm string `json:"alg"` - - // Represents the token type. - Typ string `json:"typ"` - - // The optional hint of which key is being used. - KeyID string `json:"kid,omitempty"` -} - -func (h *Header) encode() (string, error) { - b, err := json.Marshal(h) - if err != nil { - return "", err - } - return base64.RawURLEncoding.EncodeToString(b), nil -} - -// Decode decodes a claim set from a JWS payload. -func Decode(payload string) (*ClaimSet, error) { - // decode returned id token to get expiry - s := strings.Split(payload, ".") - if len(s) < 2 { - // TODO(jbd): Provide more context about the error. - return nil, errors.New("jws: invalid token received") - } - decoded, err := base64.RawURLEncoding.DecodeString(s[1]) - if err != nil { - return nil, err - } - c := &ClaimSet{} - err = json.NewDecoder(bytes.NewBuffer(decoded)).Decode(c) - return c, err -} - -// Signer returns a signature for the given data. -type Signer func(data []byte) (sig []byte, err error) - -// EncodeWithSigner encodes a header and claim set with the provided signer. -func EncodeWithSigner(header *Header, c *ClaimSet, sg Signer) (string, error) { - head, err := header.encode() - if err != nil { - return "", err - } - cs, err := c.encode() - if err != nil { - return "", err - } - ss := fmt.Sprintf("%s.%s", head, cs) - sig, err := sg([]byte(ss)) - if err != nil { - return "", err - } - return fmt.Sprintf("%s.%s", ss, base64.RawURLEncoding.EncodeToString(sig)), nil -} - -// Encode encodes a signed JWS with provided header and claim set. -// This invokes EncodeWithSigner using crypto/rsa.SignPKCS1v15 with the given RSA private key. -func Encode(header *Header, c *ClaimSet, key *rsa.PrivateKey) (string, error) { - sg := func(data []byte) (sig []byte, err error) { - h := sha256.New() - h.Write(data) - return rsa.SignPKCS1v15(rand.Reader, key, crypto.SHA256, h.Sum(nil)) - } - return EncodeWithSigner(header, c, sg) -} - -// Verify tests whether the provided JWT token's signature was produced by the private key -// associated with the supplied public key. -func Verify(token string, key *rsa.PublicKey) error { - parts := strings.Split(token, ".") - if len(parts) != 3 { - return errors.New("jws: invalid token received, token must have 3 parts") - } - - signedContent := parts[0] + "." + parts[1] - signatureString, err := base64.RawURLEncoding.DecodeString(parts[2]) - if err != nil { - return err - } - - h := sha256.New() - h.Write([]byte(signedContent)) - return rsa.VerifyPKCS1v15(key, crypto.SHA256, h.Sum(nil), []byte(signatureString)) -} diff --git a/vendor/golang.org/x/oauth2/jwt/jwt.go b/vendor/golang.org/x/oauth2/jwt/jwt.go deleted file mode 100644 index e016db421..000000000 --- a/vendor/golang.org/x/oauth2/jwt/jwt.go +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package jwt implements the OAuth 2.0 JSON Web Token flow, commonly -// known as "two-legged OAuth 2.0". -// -// See: https://tools.ietf.org/html/draft-ietf-oauth-jwt-bearer-12 -package jwt - -import ( - "encoding/json" - "fmt" - "io" - "io/ioutil" - "net/http" - "net/url" - "strings" - "time" - - "golang.org/x/net/context" - "golang.org/x/oauth2" - "golang.org/x/oauth2/internal" - "golang.org/x/oauth2/jws" -) - -var ( - defaultGrantType = "urn:ietf:params:oauth:grant-type:jwt-bearer" - defaultHeader = &jws.Header{Algorithm: "RS256", Typ: "JWT"} -) - -// Config is the configuration for using JWT to fetch tokens, -// commonly known as "two-legged OAuth 2.0". -type Config struct { - // Email is the OAuth client identifier used when communicating with - // the configured OAuth provider. - Email string - - // PrivateKey contains the contents of an RSA private key or the - // contents of a PEM file that contains a private key. The provided - // private key is used to sign JWT payloads. - // PEM containers with a passphrase are not supported. - // Use the following command to convert a PKCS 12 file into a PEM. - // - // $ openssl pkcs12 -in key.p12 -out key.pem -nodes - // - PrivateKey []byte - - // PrivateKeyID contains an optional hint indicating which key is being - // used. - PrivateKeyID string - - // Subject is the optional user to impersonate. - Subject string - - // Scopes optionally specifies a list of requested permission scopes. - Scopes []string - - // TokenURL is the endpoint required to complete the 2-legged JWT flow. - TokenURL string - - // Expires optionally specifies how long the token is valid for. - Expires time.Duration -} - -// TokenSource returns a JWT TokenSource using the configuration -// in c and the HTTP client from the provided context. -func (c *Config) TokenSource(ctx context.Context) oauth2.TokenSource { - return oauth2.ReuseTokenSource(nil, jwtSource{ctx, c}) -} - -// Client returns an HTTP client wrapping the context's -// HTTP transport and adding Authorization headers with tokens -// obtained from c. -// -// The returned client and its Transport should not be modified. -func (c *Config) Client(ctx context.Context) *http.Client { - return oauth2.NewClient(ctx, c.TokenSource(ctx)) -} - -// jwtSource is a source that always does a signed JWT request for a token. -// It should typically be wrapped with a reuseTokenSource. -type jwtSource struct { - ctx context.Context - conf *Config -} - -func (js jwtSource) Token() (*oauth2.Token, error) { - pk, err := internal.ParseKey(js.conf.PrivateKey) - if err != nil { - return nil, err - } - hc := oauth2.NewClient(js.ctx, nil) - claimSet := &jws.ClaimSet{ - Iss: js.conf.Email, - Scope: strings.Join(js.conf.Scopes, " "), - Aud: js.conf.TokenURL, - } - if subject := js.conf.Subject; subject != "" { - claimSet.Sub = subject - // prn is the old name of sub. Keep setting it - // to be compatible with legacy OAuth 2.0 providers. - claimSet.Prn = subject - } - if t := js.conf.Expires; t > 0 { - claimSet.Exp = time.Now().Add(t).Unix() - } - h := *defaultHeader - h.KeyID = js.conf.PrivateKeyID - payload, err := jws.Encode(&h, claimSet, pk) - if err != nil { - return nil, err - } - v := url.Values{} - v.Set("grant_type", defaultGrantType) - v.Set("assertion", payload) - resp, err := hc.PostForm(js.conf.TokenURL, v) - if err != nil { - return nil, fmt.Errorf("oauth2: cannot fetch token: %v", err) - } - defer resp.Body.Close() - body, err := ioutil.ReadAll(io.LimitReader(resp.Body, 1<<20)) - if err != nil { - return nil, fmt.Errorf("oauth2: cannot fetch token: %v", err) - } - if c := resp.StatusCode; c < 200 || c > 299 { - return nil, fmt.Errorf("oauth2: cannot fetch token: %v\nResponse: %s", resp.Status, body) - } - // tokenRes is the JSON response body. - var tokenRes struct { - AccessToken string `json:"access_token"` - TokenType string `json:"token_type"` - IDToken string `json:"id_token"` - ExpiresIn int64 `json:"expires_in"` // relative seconds from now - } - if err := json.Unmarshal(body, &tokenRes); err != nil { - return nil, fmt.Errorf("oauth2: cannot fetch token: %v", err) - } - token := &oauth2.Token{ - AccessToken: tokenRes.AccessToken, - TokenType: tokenRes.TokenType, - } - raw := make(map[string]interface{}) - json.Unmarshal(body, &raw) // no error checks for optional fields - token = token.WithExtra(raw) - - if secs := tokenRes.ExpiresIn; secs > 0 { - token.Expiry = time.Now().Add(time.Duration(secs) * time.Second) - } - if v := tokenRes.IDToken; v != "" { - // decode returned id token to get expiry - claimSet, err := jws.Decode(v) - if err != nil { - return nil, fmt.Errorf("oauth2: error decoding JWT token: %v", err) - } - token.Expiry = time.Unix(claimSet.Exp, 0) - } - return token, nil -} diff --git a/vendor/golang.org/x/oauth2/oauth2.go b/vendor/golang.org/x/oauth2/oauth2.go deleted file mode 100644 index bb35f277c..000000000 --- a/vendor/golang.org/x/oauth2/oauth2.go +++ /dev/null @@ -1,340 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package oauth2 provides support for making -// OAuth2 authorized and authenticated HTTP requests. -// It can additionally grant authorization with Bearer JWT. -package oauth2 - -import ( - "bytes" - "errors" - "net/http" - "net/url" - "strings" - "sync" - - "golang.org/x/net/context" - "golang.org/x/oauth2/internal" -) - -// NoContext is the default context you should supply if not using -// your own context.Context (see https://golang.org/x/net/context). -// -// Deprecated: Use context.Background() or context.TODO() instead. -var NoContext = context.TODO() - -// RegisterBrokenAuthHeaderProvider registers an OAuth2 server -// identified by the tokenURL prefix as an OAuth2 implementation -// which doesn't support the HTTP Basic authentication -// scheme to authenticate with the authorization server. -// Once a server is registered, credentials (client_id and client_secret) -// will be passed as query parameters rather than being present -// in the Authorization header. -// See https://code.google.com/p/goauth2/issues/detail?id=31 for background. -func RegisterBrokenAuthHeaderProvider(tokenURL string) { - internal.RegisterBrokenAuthHeaderProvider(tokenURL) -} - -// Config describes a typical 3-legged OAuth2 flow, with both the -// client application information and the server's endpoint URLs. -// For the client credentials 2-legged OAuth2 flow, see the clientcredentials -// package (https://golang.org/x/oauth2/clientcredentials). -type Config struct { - // ClientID is the application's ID. - ClientID string - - // ClientSecret is the application's secret. - ClientSecret string - - // Endpoint contains the resource server's token endpoint - // URLs. These are constants specific to each server and are - // often available via site-specific packages, such as - // google.Endpoint or github.Endpoint. - Endpoint Endpoint - - // RedirectURL is the URL to redirect users going through - // the OAuth flow, after the resource owner's URLs. - RedirectURL string - - // Scope specifies optional requested permissions. - Scopes []string -} - -// A TokenSource is anything that can return a token. -type TokenSource interface { - // Token returns a token or an error. - // Token must be safe for concurrent use by multiple goroutines. - // The returned Token must not be modified. - Token() (*Token, error) -} - -// Endpoint contains the OAuth 2.0 provider's authorization and token -// endpoint URLs. -type Endpoint struct { - AuthURL string - TokenURL string -} - -var ( - // AccessTypeOnline and AccessTypeOffline are options passed - // to the Options.AuthCodeURL method. They modify the - // "access_type" field that gets sent in the URL returned by - // AuthCodeURL. - // - // Online is the default if neither is specified. If your - // application needs to refresh access tokens when the user - // is not present at the browser, then use offline. This will - // result in your application obtaining a refresh token the - // first time your application exchanges an authorization - // code for a user. - AccessTypeOnline AuthCodeOption = SetAuthURLParam("access_type", "online") - AccessTypeOffline AuthCodeOption = SetAuthURLParam("access_type", "offline") - - // ApprovalForce forces the users to view the consent dialog - // and confirm the permissions request at the URL returned - // from AuthCodeURL, even if they've already done so. - ApprovalForce AuthCodeOption = SetAuthURLParam("approval_prompt", "force") -) - -// An AuthCodeOption is passed to Config.AuthCodeURL. -type AuthCodeOption interface { - setValue(url.Values) -} - -type setParam struct{ k, v string } - -func (p setParam) setValue(m url.Values) { m.Set(p.k, p.v) } - -// SetAuthURLParam builds an AuthCodeOption which passes key/value parameters -// to a provider's authorization endpoint. -func SetAuthURLParam(key, value string) AuthCodeOption { - return setParam{key, value} -} - -// AuthCodeURL returns a URL to OAuth 2.0 provider's consent page -// that asks for permissions for the required scopes explicitly. -// -// State is a token to protect the user from CSRF attacks. You must -// always provide a non-zero string and validate that it matches the -// the state query parameter on your redirect callback. -// See http://tools.ietf.org/html/rfc6749#section-10.12 for more info. -// -// Opts may include AccessTypeOnline or AccessTypeOffline, as well -// as ApprovalForce. -func (c *Config) AuthCodeURL(state string, opts ...AuthCodeOption) string { - var buf bytes.Buffer - buf.WriteString(c.Endpoint.AuthURL) - v := url.Values{ - "response_type": {"code"}, - "client_id": {c.ClientID}, - "redirect_uri": internal.CondVal(c.RedirectURL), - "scope": internal.CondVal(strings.Join(c.Scopes, " ")), - "state": internal.CondVal(state), - } - for _, opt := range opts { - opt.setValue(v) - } - if strings.Contains(c.Endpoint.AuthURL, "?") { - buf.WriteByte('&') - } else { - buf.WriteByte('?') - } - buf.WriteString(v.Encode()) - return buf.String() -} - -// PasswordCredentialsToken converts a resource owner username and password -// pair into a token. -// -// Per the RFC, this grant type should only be used "when there is a high -// degree of trust between the resource owner and the client (e.g., the client -// is part of the device operating system or a highly privileged application), -// and when other authorization grant types are not available." -// See https://tools.ietf.org/html/rfc6749#section-4.3 for more info. -// -// The HTTP client to use is derived from the context. -// If nil, http.DefaultClient is used. -func (c *Config) PasswordCredentialsToken(ctx context.Context, username, password string) (*Token, error) { - return retrieveToken(ctx, c, url.Values{ - "grant_type": {"password"}, - "username": {username}, - "password": {password}, - "scope": internal.CondVal(strings.Join(c.Scopes, " ")), - }) -} - -// Exchange converts an authorization code into a token. -// -// It is used after a resource provider redirects the user back -// to the Redirect URI (the URL obtained from AuthCodeURL). -// -// The HTTP client to use is derived from the context. -// If a client is not provided via the context, http.DefaultClient is used. -// -// The code will be in the *http.Request.FormValue("code"). Before -// calling Exchange, be sure to validate FormValue("state"). -func (c *Config) Exchange(ctx context.Context, code string) (*Token, error) { - return retrieveToken(ctx, c, url.Values{ - "grant_type": {"authorization_code"}, - "code": {code}, - "redirect_uri": internal.CondVal(c.RedirectURL), - }) -} - -// Client returns an HTTP client using the provided token. -// The token will auto-refresh as necessary. The underlying -// HTTP transport will be obtained using the provided context. -// The returned client and its Transport should not be modified. -func (c *Config) Client(ctx context.Context, t *Token) *http.Client { - return NewClient(ctx, c.TokenSource(ctx, t)) -} - -// TokenSource returns a TokenSource that returns t until t expires, -// automatically refreshing it as necessary using the provided context. -// -// Most users will use Config.Client instead. -func (c *Config) TokenSource(ctx context.Context, t *Token) TokenSource { - tkr := &tokenRefresher{ - ctx: ctx, - conf: c, - } - if t != nil { - tkr.refreshToken = t.RefreshToken - } - return &reuseTokenSource{ - t: t, - new: tkr, - } -} - -// tokenRefresher is a TokenSource that makes "grant_type"=="refresh_token" -// HTTP requests to renew a token using a RefreshToken. -type tokenRefresher struct { - ctx context.Context // used to get HTTP requests - conf *Config - refreshToken string -} - -// WARNING: Token is not safe for concurrent access, as it -// updates the tokenRefresher's refreshToken field. -// Within this package, it is used by reuseTokenSource which -// synchronizes calls to this method with its own mutex. -func (tf *tokenRefresher) Token() (*Token, error) { - if tf.refreshToken == "" { - return nil, errors.New("oauth2: token expired and refresh token is not set") - } - - tk, err := retrieveToken(tf.ctx, tf.conf, url.Values{ - "grant_type": {"refresh_token"}, - "refresh_token": {tf.refreshToken}, - }) - - if err != nil { - return nil, err - } - if tf.refreshToken != tk.RefreshToken { - tf.refreshToken = tk.RefreshToken - } - return tk, err -} - -// reuseTokenSource is a TokenSource that holds a single token in memory -// and validates its expiry before each call to retrieve it with -// Token. If it's expired, it will be auto-refreshed using the -// new TokenSource. -type reuseTokenSource struct { - new TokenSource // called when t is expired. - - mu sync.Mutex // guards t - t *Token -} - -// Token returns the current token if it's still valid, else will -// refresh the current token (using r.Context for HTTP client -// information) and return the new one. -func (s *reuseTokenSource) Token() (*Token, error) { - s.mu.Lock() - defer s.mu.Unlock() - if s.t.Valid() { - return s.t, nil - } - t, err := s.new.Token() - if err != nil { - return nil, err - } - s.t = t - return t, nil -} - -// StaticTokenSource returns a TokenSource that always returns the same token. -// Because the provided token t is never refreshed, StaticTokenSource is only -// useful for tokens that never expire. -func StaticTokenSource(t *Token) TokenSource { - return staticTokenSource{t} -} - -// staticTokenSource is a TokenSource that always returns the same Token. -type staticTokenSource struct { - t *Token -} - -func (s staticTokenSource) Token() (*Token, error) { - return s.t, nil -} - -// HTTPClient is the context key to use with golang.org/x/net/context's -// WithValue function to associate an *http.Client value with a context. -var HTTPClient internal.ContextKey - -// NewClient creates an *http.Client from a Context and TokenSource. -// The returned client is not valid beyond the lifetime of the context. -// -// As a special case, if src is nil, a non-OAuth2 client is returned -// using the provided context. This exists to support related OAuth2 -// packages. -func NewClient(ctx context.Context, src TokenSource) *http.Client { - if src == nil { - c, err := internal.ContextClient(ctx) - if err != nil { - return &http.Client{Transport: internal.ErrorTransport{Err: err}} - } - return c - } - return &http.Client{ - Transport: &Transport{ - Base: internal.ContextTransport(ctx), - Source: ReuseTokenSource(nil, src), - }, - } -} - -// ReuseTokenSource returns a TokenSource which repeatedly returns the -// same token as long as it's valid, starting with t. -// When its cached token is invalid, a new token is obtained from src. -// -// ReuseTokenSource is typically used to reuse tokens from a cache -// (such as a file on disk) between runs of a program, rather than -// obtaining new tokens unnecessarily. -// -// The initial token t may be nil, in which case the TokenSource is -// wrapped in a caching version if it isn't one already. This also -// means it's always safe to wrap ReuseTokenSource around any other -// TokenSource without adverse effects. -func ReuseTokenSource(t *Token, src TokenSource) TokenSource { - // Don't wrap a reuseTokenSource in itself. That would work, - // but cause an unnecessary number of mutex operations. - // Just build the equivalent one. - if rt, ok := src.(*reuseTokenSource); ok { - if t == nil { - // Just use it directly. - return rt - } - src = rt.new - } - return &reuseTokenSource{ - t: t, - new: src, - } -} diff --git a/vendor/golang.org/x/oauth2/token.go b/vendor/golang.org/x/oauth2/token.go deleted file mode 100644 index 7a3167f15..000000000 --- a/vendor/golang.org/x/oauth2/token.go +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package oauth2 - -import ( - "net/http" - "net/url" - "strconv" - "strings" - "time" - - "golang.org/x/net/context" - "golang.org/x/oauth2/internal" -) - -// expiryDelta determines how earlier a token should be considered -// expired than its actual expiration time. It is used to avoid late -// expirations due to client-server time mismatches. -const expiryDelta = 10 * time.Second - -// Token represents the crendentials used to authorize -// the requests to access protected resources on the OAuth 2.0 -// provider's backend. -// -// Most users of this package should not access fields of Token -// directly. They're exported mostly for use by related packages -// implementing derivative OAuth2 flows. -type Token struct { - // AccessToken is the token that authorizes and authenticates - // the requests. - AccessToken string `json:"access_token"` - - // TokenType is the type of token. - // The Type method returns either this or "Bearer", the default. - TokenType string `json:"token_type,omitempty"` - - // RefreshToken is a token that's used by the application - // (as opposed to the user) to refresh the access token - // if it expires. - RefreshToken string `json:"refresh_token,omitempty"` - - // Expiry is the optional expiration time of the access token. - // - // If zero, TokenSource implementations will reuse the same - // token forever and RefreshToken or equivalent - // mechanisms for that TokenSource will not be used. - Expiry time.Time `json:"expiry,omitempty"` - - // raw optionally contains extra metadata from the server - // when updating a token. - raw interface{} -} - -// Type returns t.TokenType if non-empty, else "Bearer". -func (t *Token) Type() string { - if strings.EqualFold(t.TokenType, "bearer") { - return "Bearer" - } - if strings.EqualFold(t.TokenType, "mac") { - return "MAC" - } - if strings.EqualFold(t.TokenType, "basic") { - return "Basic" - } - if t.TokenType != "" { - return t.TokenType - } - return "Bearer" -} - -// SetAuthHeader sets the Authorization header to r using the access -// token in t. -// -// This method is unnecessary when using Transport or an HTTP Client -// returned by this package. -func (t *Token) SetAuthHeader(r *http.Request) { - r.Header.Set("Authorization", t.Type()+" "+t.AccessToken) -} - -// WithExtra returns a new Token that's a clone of t, but using the -// provided raw extra map. This is only intended for use by packages -// implementing derivative OAuth2 flows. -func (t *Token) WithExtra(extra interface{}) *Token { - t2 := new(Token) - *t2 = *t - t2.raw = extra - return t2 -} - -// Extra returns an extra field. -// Extra fields are key-value pairs returned by the server as a -// part of the token retrieval response. -func (t *Token) Extra(key string) interface{} { - if raw, ok := t.raw.(map[string]interface{}); ok { - return raw[key] - } - - vals, ok := t.raw.(url.Values) - if !ok { - return nil - } - - v := vals.Get(key) - switch s := strings.TrimSpace(v); strings.Count(s, ".") { - case 0: // Contains no "."; try to parse as int - if i, err := strconv.ParseInt(s, 10, 64); err == nil { - return i - } - case 1: // Contains a single "."; try to parse as float - if f, err := strconv.ParseFloat(s, 64); err == nil { - return f - } - } - - return v -} - -// expired reports whether the token is expired. -// t must be non-nil. -func (t *Token) expired() bool { - if t.Expiry.IsZero() { - return false - } - return t.Expiry.Add(-expiryDelta).Before(time.Now()) -} - -// Valid reports whether t is non-nil, has an AccessToken, and is not expired. -func (t *Token) Valid() bool { - return t != nil && t.AccessToken != "" && !t.expired() -} - -// tokenFromInternal maps an *internal.Token struct into -// a *Token struct. -func tokenFromInternal(t *internal.Token) *Token { - if t == nil { - return nil - } - return &Token{ - AccessToken: t.AccessToken, - TokenType: t.TokenType, - RefreshToken: t.RefreshToken, - Expiry: t.Expiry, - raw: t.Raw, - } -} - -// retrieveToken takes a *Config and uses that to retrieve an *internal.Token. -// This token is then mapped from *internal.Token into an *oauth2.Token which is returned along -// with an error.. -func retrieveToken(ctx context.Context, c *Config, v url.Values) (*Token, error) { - tk, err := internal.RetrieveToken(ctx, c.ClientID, c.ClientSecret, c.Endpoint.TokenURL, v) - if err != nil { - return nil, err - } - return tokenFromInternal(tk), nil -} diff --git a/vendor/golang.org/x/oauth2/transport.go b/vendor/golang.org/x/oauth2/transport.go deleted file mode 100644 index 92ac7e253..000000000 --- a/vendor/golang.org/x/oauth2/transport.go +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package oauth2 - -import ( - "errors" - "io" - "net/http" - "sync" -) - -// Transport is an http.RoundTripper that makes OAuth 2.0 HTTP requests, -// wrapping a base RoundTripper and adding an Authorization header -// with a token from the supplied Sources. -// -// Transport is a low-level mechanism. Most code will use the -// higher-level Config.Client method instead. -type Transport struct { - // Source supplies the token to add to outgoing requests' - // Authorization headers. - Source TokenSource - - // Base is the base RoundTripper used to make HTTP requests. - // If nil, http.DefaultTransport is used. - Base http.RoundTripper - - mu sync.Mutex // guards modReq - modReq map[*http.Request]*http.Request // original -> modified -} - -// RoundTrip authorizes and authenticates the request with an -// access token. If no token exists or token is expired, -// tries to refresh/fetch a new token. -func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) { - if t.Source == nil { - return nil, errors.New("oauth2: Transport's Source is nil") - } - token, err := t.Source.Token() - if err != nil { - return nil, err - } - - req2 := cloneRequest(req) // per RoundTripper contract - token.SetAuthHeader(req2) - t.setModReq(req, req2) - res, err := t.base().RoundTrip(req2) - if err != nil { - t.setModReq(req, nil) - return nil, err - } - res.Body = &onEOFReader{ - rc: res.Body, - fn: func() { t.setModReq(req, nil) }, - } - return res, nil -} - -// CancelRequest cancels an in-flight request by closing its connection. -func (t *Transport) CancelRequest(req *http.Request) { - type canceler interface { - CancelRequest(*http.Request) - } - if cr, ok := t.base().(canceler); ok { - t.mu.Lock() - modReq := t.modReq[req] - delete(t.modReq, req) - t.mu.Unlock() - cr.CancelRequest(modReq) - } -} - -func (t *Transport) base() http.RoundTripper { - if t.Base != nil { - return t.Base - } - return http.DefaultTransport -} - -func (t *Transport) setModReq(orig, mod *http.Request) { - t.mu.Lock() - defer t.mu.Unlock() - if t.modReq == nil { - t.modReq = make(map[*http.Request]*http.Request) - } - if mod == nil { - delete(t.modReq, orig) - } else { - t.modReq[orig] = mod - } -} - -// cloneRequest returns a clone of the provided *http.Request. -// The clone is a shallow copy of the struct and its Header map. -func cloneRequest(r *http.Request) *http.Request { - // shallow copy of the struct - r2 := new(http.Request) - *r2 = *r - // deep copy of the Header - r2.Header = make(http.Header, len(r.Header)) - for k, s := range r.Header { - r2.Header[k] = append([]string(nil), s...) - } - return r2 -} - -type onEOFReader struct { - rc io.ReadCloser - fn func() -} - -func (r *onEOFReader) Read(p []byte) (n int, err error) { - n, err = r.rc.Read(p) - if err == io.EOF { - r.runFunc() - } - return -} - -func (r *onEOFReader) Close() error { - err := r.rc.Close() - r.runFunc() - return err -} - -func (r *onEOFReader) runFunc() { - if fn := r.fn; fn != nil { - fn() - r.fn = nil - } -} diff --git a/vendor/golang.org/x/sys/.gitattributes b/vendor/golang.org/x/sys/.gitattributes new file mode 100644 index 000000000..d2f212e5d --- /dev/null +++ b/vendor/golang.org/x/sys/.gitattributes @@ -0,0 +1,10 @@ +# Treat all files in this repo as binary, with no git magic updating +# line endings. Windows users contributing to Go will need to use a +# modern version of git and editors capable of LF line endings. +# +# We'll prevent accidental CRLF line endings from entering the repo +# via the git-review gofmt checks. +# +# See golang.org/issue/9281 + +* -text diff --git a/vendor/golang.org/x/sys/.gitignore b/vendor/golang.org/x/sys/.gitignore new file mode 100644 index 000000000..8339fd61d --- /dev/null +++ b/vendor/golang.org/x/sys/.gitignore @@ -0,0 +1,2 @@ +# Add no patterns to .hgignore except for files generated by the build. +last-change diff --git a/vendor/golang.org/x/sys/CONTRIBUTING.md b/vendor/golang.org/x/sys/CONTRIBUTING.md new file mode 100644 index 000000000..88dff59bc --- /dev/null +++ b/vendor/golang.org/x/sys/CONTRIBUTING.md @@ -0,0 +1,31 @@ +# Contributing to Go + +Go is an open source project. + +It is the work of hundreds of contributors. We appreciate your help! + + +## Filing issues + +When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions: + +1. What version of Go are you using (`go version`)? +2. What operating system and processor architecture are you using? +3. What did you do? +4. What did you expect to see? +5. What did you see instead? + +General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker. +The gophers there will answer or ask you to file an issue if you've tripped over a bug. + +## Contributing code + +Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) +before sending patches. + +**We do not accept GitHub pull requests** +(we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review). + +Unless otherwise noted, the Go source files are distributed under +the BSD-style license found in the LICENSE file. + diff --git a/vendor/golang.org/x/sys/README.md b/vendor/golang.org/x/sys/README.md new file mode 100644 index 000000000..ef6c9e59c --- /dev/null +++ b/vendor/golang.org/x/sys/README.md @@ -0,0 +1,18 @@ +# sys + +This repository holds supplemental Go packages for low-level interactions with +the operating system. + +## Download/Install + +The easiest way to install is to run `go get -u golang.org/x/sys`. You can +also manually git clone the repository to `$GOPATH/src/golang.org/x/sys`. + +## Report Issues / Send Patches + +This repository uses Gerrit for code changes. To learn how to submit changes to +this repository, see https://golang.org/doc/contribute.html. + +The main issue tracker for the sys repository is located at +https://github.com/golang/go/issues. Prefix your issue with "x/sys:" in the +subject line, so it is easy to find. diff --git a/vendor/golang.org/x/sys/codereview.cfg b/vendor/golang.org/x/sys/codereview.cfg new file mode 100644 index 000000000..3f8b14b64 --- /dev/null +++ b/vendor/golang.org/x/sys/codereview.cfg @@ -0,0 +1 @@ +issuerepo: golang/go diff --git a/vendor/golang.org/x/sys/unix/creds_test.go b/vendor/golang.org/x/sys/unix/creds_test.go new file mode 100644 index 000000000..7ae330532 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/creds_test.go @@ -0,0 +1,136 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build linux + +package unix_test + +import ( + "bytes" + "net" + "os" + "syscall" + "testing" + + "golang.org/x/sys/unix" +) + +// TestSCMCredentials tests the sending and receiving of credentials +// (PID, UID, GID) in an ancillary message between two UNIX +// sockets. The SO_PASSCRED socket option is enabled on the sending +// socket for this to work. +func TestSCMCredentials(t *testing.T) { + socketTypeTests := []struct { + socketType int + dataLen int + }{ + { + unix.SOCK_STREAM, + 1, + }, { + unix.SOCK_DGRAM, + 0, + }, + } + + for _, tt := range socketTypeTests { + fds, err := unix.Socketpair(unix.AF_LOCAL, tt.socketType, 0) + if err != nil { + t.Fatalf("Socketpair: %v", err) + } + defer unix.Close(fds[0]) + defer unix.Close(fds[1]) + + err = unix.SetsockoptInt(fds[0], unix.SOL_SOCKET, unix.SO_PASSCRED, 1) + if err != nil { + t.Fatalf("SetsockoptInt: %v", err) + } + + srvFile := os.NewFile(uintptr(fds[0]), "server") + defer srvFile.Close() + srv, err := net.FileConn(srvFile) + if err != nil { + t.Errorf("FileConn: %v", err) + return + } + defer srv.Close() + + cliFile := os.NewFile(uintptr(fds[1]), "client") + defer cliFile.Close() + cli, err := net.FileConn(cliFile) + if err != nil { + t.Errorf("FileConn: %v", err) + return + } + defer cli.Close() + + var ucred unix.Ucred + if os.Getuid() != 0 { + ucred.Pid = int32(os.Getpid()) + ucred.Uid = 0 + ucred.Gid = 0 + oob := unix.UnixCredentials(&ucred) + _, _, err := cli.(*net.UnixConn).WriteMsgUnix(nil, oob, nil) + if op, ok := err.(*net.OpError); ok { + err = op.Err + } + if sys, ok := err.(*os.SyscallError); ok { + err = sys.Err + } + if err != syscall.EPERM { + t.Fatalf("WriteMsgUnix failed with %v, want EPERM", err) + } + } + + ucred.Pid = int32(os.Getpid()) + ucred.Uid = uint32(os.Getuid()) + ucred.Gid = uint32(os.Getgid()) + oob := unix.UnixCredentials(&ucred) + + // On SOCK_STREAM, this is internally going to send a dummy byte + n, oobn, err := cli.(*net.UnixConn).WriteMsgUnix(nil, oob, nil) + if err != nil { + t.Fatalf("WriteMsgUnix: %v", err) + } + if n != 0 { + t.Fatalf("WriteMsgUnix n = %d, want 0", n) + } + if oobn != len(oob) { + t.Fatalf("WriteMsgUnix oobn = %d, want %d", oobn, len(oob)) + } + + oob2 := make([]byte, 10*len(oob)) + n, oobn2, flags, _, err := srv.(*net.UnixConn).ReadMsgUnix(nil, oob2) + if err != nil { + t.Fatalf("ReadMsgUnix: %v", err) + } + if flags != 0 { + t.Fatalf("ReadMsgUnix flags = 0x%x, want 0", flags) + } + if n != tt.dataLen { + t.Fatalf("ReadMsgUnix n = %d, want %d", n, tt.dataLen) + } + if oobn2 != oobn { + // without SO_PASSCRED set on the socket, ReadMsgUnix will + // return zero oob bytes + t.Fatalf("ReadMsgUnix oobn = %d, want %d", oobn2, oobn) + } + oob2 = oob2[:oobn2] + if !bytes.Equal(oob, oob2) { + t.Fatal("ReadMsgUnix oob bytes don't match") + } + + scm, err := unix.ParseSocketControlMessage(oob2) + if err != nil { + t.Fatalf("ParseSocketControlMessage: %v", err) + } + newUcred, err := unix.ParseUnixCredentials(&scm[0]) + if err != nil { + t.Fatalf("ParseUnixCredentials: %v", err) + } + if *newUcred != ucred { + t.Fatalf("ParseUnixCredentials = %+v, want %+v", newUcred, ucred) + } + } +} diff --git a/vendor/golang.org/x/sys/unix/dev_darwin.go b/vendor/golang.org/x/sys/unix/dev_darwin.go index 7d101d527..8d1dc0fa3 100644 --- a/vendor/golang.org/x/sys/unix/dev_darwin.go +++ b/vendor/golang.org/x/sys/unix/dev_darwin.go @@ -20,5 +20,5 @@ func Minor(dev uint64) uint32 { // Mkdev returns a Darwin device number generated from the given major and minor // components. func Mkdev(major, minor uint32) uint64 { - return uint64((major << 24) | minor) + return (uint64(major) << 24) | uint64(minor) } diff --git a/vendor/golang.org/x/sys/unix/dev_darwin_test.go b/vendor/golang.org/x/sys/unix/dev_darwin_test.go new file mode 100644 index 000000000..48d044860 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/dev_darwin_test.go @@ -0,0 +1,49 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package unix_test + +import ( + "fmt" + "testing" + + "golang.org/x/sys/unix" +) + +func TestDevices(t *testing.T) { + testCases := []struct { + path string + major uint32 + minor uint32 + }{ + // Most of the device major/minor numbers on Darwin are + // dynamically generated by devfs. These are some well-known + // static numbers. + {"/dev/ttyp0", 4, 0}, + {"/dev/ttys0", 4, 48}, + {"/dev/ptyp0", 5, 0}, + {"/dev/ptyr0", 5, 32}, + } + for _, tc := range testCases { + t.Run(fmt.Sprintf("%s %v:%v", tc.path, tc.major, tc.minor), func(t *testing.T) { + var stat unix.Stat_t + err := unix.Stat(tc.path, &stat) + if err != nil { + t.Errorf("failed to stat device: %v", err) + return + } + + dev := uint64(stat.Rdev) + if unix.Major(dev) != tc.major { + t.Errorf("for %s Major(%#x) == %d, want %d", tc.path, dev, unix.Major(dev), tc.major) + } + if unix.Minor(dev) != tc.minor { + t.Errorf("for %s Minor(%#x) == %d, want %d", tc.path, dev, unix.Minor(dev), tc.minor) + } + if unix.Mkdev(tc.major, tc.minor) != dev { + t.Errorf("for %s Mkdev(%d, %d) == %#x, want %#x", tc.path, tc.major, tc.minor, unix.Mkdev(tc.major, tc.minor), dev) + } + }) + } +} diff --git a/vendor/golang.org/x/sys/unix/dev_dragonfly.go b/vendor/golang.org/x/sys/unix/dev_dragonfly.go new file mode 100644 index 000000000..8502f202c --- /dev/null +++ b/vendor/golang.org/x/sys/unix/dev_dragonfly.go @@ -0,0 +1,30 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Functions to access/create device major and minor numbers matching the +// encoding used in Dragonfly's sys/types.h header. +// +// The information below is extracted and adapted from sys/types.h: +// +// Minor gives a cookie instead of an index since in order to avoid changing the +// meanings of bits 0-15 or wasting time and space shifting bits 16-31 for +// devices that don't use them. + +package unix + +// Major returns the major component of a DragonFlyBSD device number. +func Major(dev uint64) uint32 { + return uint32((dev >> 8) & 0xff) +} + +// Minor returns the minor component of a DragonFlyBSD device number. +func Minor(dev uint64) uint32 { + return uint32(dev & 0xffff00ff) +} + +// Mkdev returns a DragonFlyBSD device number generated from the given major and +// minor components. +func Mkdev(major, minor uint32) uint64 { + return (uint64(major) << 8) | uint64(minor) +} diff --git a/vendor/golang.org/x/sys/unix/dev_dragonfly_test.go b/vendor/golang.org/x/sys/unix/dev_dragonfly_test.go new file mode 100644 index 000000000..2caba08a8 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/dev_dragonfly_test.go @@ -0,0 +1,48 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package unix_test + +import ( + "fmt" + "testing" + + "golang.org/x/sys/unix" +) + +func TestDevices(t *testing.T) { + testCases := []struct { + path string + major uint32 + minor uint32 + }{ + // Minor is a cookie instead of an index on DragonFlyBSD + {"/dev/null", 10, 0x00000002}, + {"/dev/random", 10, 0x00000003}, + {"/dev/urandom", 10, 0x00000004}, + {"/dev/zero", 10, 0x0000000c}, + {"/dev/bpf", 15, 0xffff00ff}, + } + for _, tc := range testCases { + t.Run(fmt.Sprintf("%s %v:%v", tc.path, tc.major, tc.minor), func(t *testing.T) { + var stat unix.Stat_t + err := unix.Stat(tc.path, &stat) + if err != nil { + t.Errorf("failed to stat device: %v", err) + return + } + + dev := uint64(stat.Rdev) + if unix.Major(dev) != tc.major { + t.Errorf("for %s Major(%#x) == %d, want %d", tc.path, dev, unix.Major(dev), tc.major) + } + if unix.Minor(dev) != tc.minor { + t.Errorf("for %s Minor(%#x) == %d, want %d", tc.path, dev, unix.Minor(dev), tc.minor) + } + if unix.Mkdev(tc.major, tc.minor) != dev { + t.Errorf("for %s Mkdev(%d, %d) == %#x, want %#x", tc.path, tc.major, tc.minor, unix.Mkdev(tc.major, tc.minor), dev) + } + }) + } +} diff --git a/vendor/golang.org/x/sys/unix/dev_freebsd.go b/vendor/golang.org/x/sys/unix/dev_freebsd.go new file mode 100644 index 000000000..eba3b4bd3 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/dev_freebsd.go @@ -0,0 +1,30 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Functions to access/create device major and minor numbers matching the +// encoding used in FreeBSD's sys/types.h header. +// +// The information below is extracted and adapted from sys/types.h: +// +// Minor gives a cookie instead of an index since in order to avoid changing the +// meanings of bits 0-15 or wasting time and space shifting bits 16-31 for +// devices that don't use them. + +package unix + +// Major returns the major component of a FreeBSD device number. +func Major(dev uint64) uint32 { + return uint32((dev >> 8) & 0xff) +} + +// Minor returns the minor component of a FreeBSD device number. +func Minor(dev uint64) uint32 { + return uint32(dev & 0xffff00ff) +} + +// Mkdev returns a FreeBSD device number generated from the given major and +// minor components. +func Mkdev(major, minor uint32) uint64 { + return (uint64(major) << 8) | uint64(minor) +} diff --git a/vendor/golang.org/x/sys/unix/dev_linux.go b/vendor/golang.org/x/sys/unix/dev_linux.go index c902c39e8..d165d6f30 100644 --- a/vendor/golang.org/x/sys/unix/dev_linux.go +++ b/vendor/golang.org/x/sys/unix/dev_linux.go @@ -34,9 +34,9 @@ func Minor(dev uint64) uint32 { // Mkdev returns a Linux device number generated from the given major and minor // components. func Mkdev(major, minor uint32) uint64 { - dev := uint64((major & 0x00000fff) << 8) - dev |= uint64((major & 0xfffff000) << 32) - dev |= uint64((minor & 0x000000ff) << 0) - dev |= uint64((minor & 0xffffff00) << 12) + dev := (uint64(major) & 0x00000fff) << 8 + dev |= (uint64(major) & 0xfffff000) << 32 + dev |= (uint64(minor) & 0x000000ff) << 0 + dev |= (uint64(minor) & 0xffffff00) << 12 return dev } diff --git a/vendor/golang.org/x/sys/unix/dev_linux_test.go b/vendor/golang.org/x/sys/unix/dev_linux_test.go new file mode 100644 index 000000000..6e001f37a --- /dev/null +++ b/vendor/golang.org/x/sys/unix/dev_linux_test.go @@ -0,0 +1,51 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package unix_test + +import ( + "fmt" + "testing" + + "golang.org/x/sys/unix" +) + +func TestDevices(t *testing.T) { + testCases := []struct { + path string + major uint32 + minor uint32 + }{ + // well known major/minor numbers according to + // https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/admin-guide/devices.txt + {"/dev/null", 1, 3}, + {"/dev/zero", 1, 5}, + {"/dev/random", 1, 8}, + {"/dev/full", 1, 7}, + {"/dev/urandom", 1, 9}, + {"/dev/tty", 5, 0}, + } + for _, tc := range testCases { + t.Run(fmt.Sprintf("%s %v:%v", tc.path, tc.major, tc.minor), func(t *testing.T) { + var stat unix.Stat_t + err := unix.Stat(tc.path, &stat) + if err != nil { + t.Errorf("failed to stat device: %v", err) + return + } + + dev := uint64(stat.Rdev) + if unix.Major(dev) != tc.major { + t.Errorf("for %s Major(%#x) == %d, want %d", tc.path, dev, unix.Major(dev), tc.major) + } + if unix.Minor(dev) != tc.minor { + t.Errorf("for %s Minor(%#x) == %d, want %d", tc.path, dev, unix.Minor(dev), tc.minor) + } + if unix.Mkdev(tc.major, tc.minor) != dev { + t.Errorf("for %s Mkdev(%d, %d) == %#x, want %#x", tc.path, tc.major, tc.minor, unix.Mkdev(tc.major, tc.minor), dev) + } + }) + + } +} diff --git a/vendor/golang.org/x/sys/unix/dev_netbsd.go b/vendor/golang.org/x/sys/unix/dev_netbsd.go index 08db58ee3..b4a203d0c 100644 --- a/vendor/golang.org/x/sys/unix/dev_netbsd.go +++ b/vendor/golang.org/x/sys/unix/dev_netbsd.go @@ -22,8 +22,8 @@ func Minor(dev uint64) uint32 { // Mkdev returns a NetBSD device number generated from the given major and minor // components. func Mkdev(major, minor uint32) uint64 { - dev := uint64((major << 8) & 0x000fff00) - dev |= uint64((minor << 12) & 0xfff00000) - dev |= uint64((minor << 0) & 0x000000ff) + dev := (uint64(major) << 8) & 0x000fff00 + dev |= (uint64(minor) << 12) & 0xfff00000 + dev |= (uint64(minor) << 0) & 0x000000ff return dev } diff --git a/vendor/golang.org/x/sys/unix/dev_netbsd_test.go b/vendor/golang.org/x/sys/unix/dev_netbsd_test.go new file mode 100644 index 000000000..c39a80a48 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/dev_netbsd_test.go @@ -0,0 +1,50 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package unix_test + +import ( + "fmt" + "testing" + + "golang.org/x/sys/unix" +) + +func TestDevices(t *testing.T) { + testCases := []struct { + path string + major uint32 + minor uint32 + }{ + // well known major/minor numbers according to /dev/MAKEDEV on + // NetBSD 7.0 + {"/dev/null", 2, 2}, + {"/dev/zero", 2, 12}, + {"/dev/ttyp0", 5, 0}, + {"/dev/ttyp1", 5, 1}, + {"/dev/random", 46, 0}, + {"/dev/urandom", 46, 1}, + } + for _, tc := range testCases { + t.Run(fmt.Sprintf("%s %v:%v", tc.path, tc.major, tc.minor), func(t *testing.T) { + var stat unix.Stat_t + err := unix.Stat(tc.path, &stat) + if err != nil { + t.Errorf("failed to stat device: %v", err) + return + } + + dev := uint64(stat.Rdev) + if unix.Major(dev) != tc.major { + t.Errorf("for %s Major(%#x) == %d, want %d", tc.path, dev, unix.Major(dev), tc.major) + } + if unix.Minor(dev) != tc.minor { + t.Errorf("for %s Minor(%#x) == %d, want %d", tc.path, dev, unix.Minor(dev), tc.minor) + } + if unix.Mkdev(tc.major, tc.minor) != dev { + t.Errorf("for %s Mkdev(%d, %d) == %#x, want %#x", tc.path, tc.major, tc.minor, unix.Mkdev(tc.major, tc.minor), dev) + } + }) + } +} diff --git a/vendor/golang.org/x/sys/unix/dev_openbsd.go b/vendor/golang.org/x/sys/unix/dev_openbsd.go new file mode 100644 index 000000000..f3430c42f --- /dev/null +++ b/vendor/golang.org/x/sys/unix/dev_openbsd.go @@ -0,0 +1,29 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Functions to access/create device major and minor numbers matching the +// encoding used in OpenBSD's sys/types.h header. + +package unix + +// Major returns the major component of an OpenBSD device number. +func Major(dev uint64) uint32 { + return uint32((dev & 0x0000ff00) >> 8) +} + +// Minor returns the minor component of an OpenBSD device number. +func Minor(dev uint64) uint32 { + minor := uint32((dev & 0x000000ff) >> 0) + minor |= uint32((dev & 0xffff0000) >> 8) + return minor +} + +// Mkdev returns an OpenBSD device number generated from the given major and minor +// components. +func Mkdev(major, minor uint32) uint64 { + dev := (uint64(major) << 8) & 0x0000ff00 + dev |= (uint64(minor) << 8) & 0xffff0000 + dev |= (uint64(minor) << 0) & 0x000000ff + return dev +} diff --git a/vendor/golang.org/x/sys/unix/dev_openbsd_test.go b/vendor/golang.org/x/sys/unix/dev_openbsd_test.go new file mode 100644 index 000000000..5635d271f --- /dev/null +++ b/vendor/golang.org/x/sys/unix/dev_openbsd_test.go @@ -0,0 +1,52 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package unix_test + +import ( + "fmt" + "testing" + + "golang.org/x/sys/unix" +) + +func TestDevices(t *testing.T) { + testCases := []struct { + path string + major uint32 + minor uint32 + }{ + // well known major/minor numbers according to /dev/MAKEDEV on + // OpenBSD 6.0 + {"/dev/null", 2, 2}, + {"/dev/zero", 2, 12}, + {"/dev/ttyp0", 5, 0}, + {"/dev/ttyp1", 5, 1}, + {"/dev/random", 45, 0}, + {"/dev/srandom", 45, 1}, + {"/dev/urandom", 45, 2}, + {"/dev/arandom", 45, 3}, + } + for _, tc := range testCases { + t.Run(fmt.Sprintf("%s %v:%v", tc.path, tc.major, tc.minor), func(t *testing.T) { + var stat unix.Stat_t + err := unix.Stat(tc.path, &stat) + if err != nil { + t.Errorf("failed to stat device: %v", err) + return + } + + dev := uint64(stat.Rdev) + if unix.Major(dev) != tc.major { + t.Errorf("for %s Major(%#x) == %d, want %d", tc.path, dev, unix.Major(dev), tc.major) + } + if unix.Minor(dev) != tc.minor { + t.Errorf("for %s Minor(%#x) == %d, want %d", tc.path, dev, unix.Minor(dev), tc.minor) + } + if unix.Mkdev(tc.major, tc.minor) != dev { + t.Errorf("for %s Mkdev(%d, %d) == %#x, want %#x", tc.path, tc.major, tc.minor, unix.Mkdev(tc.major, tc.minor), dev) + } + }) + } +} diff --git a/vendor/golang.org/x/sys/unix/dev_solaris_test.go b/vendor/golang.org/x/sys/unix/dev_solaris_test.go new file mode 100644 index 000000000..db58c0d05 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/dev_solaris_test.go @@ -0,0 +1,49 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package unix_test + +import ( + "fmt" + "testing" + + "golang.org/x/sys/unix" +) + +func TestDevices(t *testing.T) { + testCases := []struct { + path string + major uint32 + minor uint32 + }{ + // Well-known major/minor numbers on OpenSolaris according to + // /etc/name_to_major + {"/dev/zero", 134, 12}, + {"/dev/null", 134, 2}, + {"/dev/ptyp0", 172, 0}, + {"/dev/ttyp0", 175, 0}, + {"/dev/ttyp1", 175, 1}, + } + for _, tc := range testCases { + t.Run(fmt.Sprintf("%s %v:%v", tc.path, tc.major, tc.minor), func(t *testing.T) { + var stat unix.Stat_t + err := unix.Stat(tc.path, &stat) + if err != nil { + t.Errorf("failed to stat device: %v", err) + return + } + + dev := uint64(stat.Rdev) + if unix.Major(dev) != tc.major { + t.Errorf("for %s Major(%#x) == %d, want %d", tc.path, dev, unix.Major(dev), tc.major) + } + if unix.Minor(dev) != tc.minor { + t.Errorf("for %s Minor(%#x) == %d, want %d", tc.path, dev, unix.Minor(dev), tc.minor) + } + if unix.Mkdev(tc.major, tc.minor) != dev { + t.Errorf("for %s Mkdev(%d, %d) == %#x, want %#x", tc.path, tc.major, tc.minor, unix.Mkdev(tc.major, tc.minor), dev) + } + }) + } +} diff --git a/vendor/golang.org/x/sys/unix/export_test.go b/vendor/golang.org/x/sys/unix/export_test.go new file mode 100644 index 000000000..b4fdd970b --- /dev/null +++ b/vendor/golang.org/x/sys/unix/export_test.go @@ -0,0 +1,9 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +package unix + +var Itoa = itoa diff --git a/vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go b/vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go deleted file mode 100644 index 56332692c..000000000 --- a/vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build gccgo,linux,sparc64 - -package unix - -import "syscall" - -//extern sysconf -func realSysconf(name int) int64 - -func sysconf(name int) (n int64, err syscall.Errno) { - r := realSysconf(name) - if r < 0 { - return 0, syscall.GetErrno() - } - return r, 0 -} diff --git a/vendor/golang.org/x/sys/unix/mkall.sh b/vendor/golang.org/x/sys/unix/mkall.sh index c3a080926..00b7ce7ac 100755 --- a/vendor/golang.org/x/sys/unix/mkall.sh +++ b/vendor/golang.org/x/sys/unix/mkall.sh @@ -142,7 +142,6 @@ openbsd_386) mkerrors="$mkerrors -m32" mksyscall="./mksyscall.pl -l32 -openbsd" mksysctl="./mksysctl_openbsd.pl" - zsysctl="zsysctl_openbsd.go" mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl" mktypes="GOARCH=$GOARCH go tool cgo -godefs" ;; @@ -150,7 +149,6 @@ openbsd_amd64) mkerrors="$mkerrors -m64" mksyscall="./mksyscall.pl -openbsd" mksysctl="./mksysctl_openbsd.pl" - zsysctl="zsysctl_openbsd.go" mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl" mktypes="GOARCH=$GOARCH go tool cgo -godefs" ;; @@ -158,7 +156,6 @@ openbsd_arm) mkerrors="$mkerrors" mksyscall="./mksyscall.pl -l32 -openbsd -arm" mksysctl="./mksysctl_openbsd.pl" - zsysctl="zsysctl_openbsd.go" mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl" # Let the type of C char be signed for making the bare syscall # API consistent across platforms. diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh index 2c434f7ae..f9f5e5691 100755 --- a/vendor/golang.org/x/sys/unix/mkerrors.sh +++ b/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -17,8 +17,8 @@ if test -z "$GOARCH" -o -z "$GOOS"; then fi # Check that we are using the new build system if we should -if [[ "$GOOS" -eq "linux" ]] && [[ "$GOARCH" != "sparc64" ]]; then - if [[ "$GOLANG_SYS_BUILD" -ne "docker" ]]; then +if [[ "$GOOS" = "linux" ]] && [[ "$GOARCH" != "sparc64" ]]; then + if [[ "$GOLANG_SYS_BUILD" != "docker" ]]; then echo 1>&2 "In the new build system, mkerrors should not be called directly." echo 1>&2 "See README.md" exit 1 @@ -27,7 +27,7 @@ fi CC=${CC:-cc} -if [[ "$GOOS" -eq "solaris" ]]; then +if [[ "$GOOS" = "solaris" ]]; then # Assumes GNU versions of utilities in PATH. export PATH=/usr/gnu/bin:$PATH fi @@ -283,6 +283,7 @@ includes_SunOS=' #include #include #include +#include #include #include #include @@ -347,6 +348,7 @@ ccflags="$@" $2 !~ /^EXPR_/ && $2 ~ /^E[A-Z0-9_]+$/ || $2 ~ /^B[0-9_]+$/ || + $2 ~ /^(OLD|NEW)DEV$/ || $2 == "BOTHER" || $2 ~ /^CI?BAUD(EX)?$/ || $2 == "IBSHIFT" || diff --git a/vendor/golang.org/x/sys/unix/mmap_unix_test.go b/vendor/golang.org/x/sys/unix/mmap_unix_test.go new file mode 100644 index 000000000..3258ca328 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/mmap_unix_test.go @@ -0,0 +1,35 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +package unix_test + +import ( + "testing" + + "golang.org/x/sys/unix" +) + +func TestMmap(t *testing.T) { + b, err := unix.Mmap(-1, 0, unix.Getpagesize(), unix.PROT_NONE, unix.MAP_ANON|unix.MAP_PRIVATE) + if err != nil { + t.Fatalf("Mmap: %v", err) + } + if err := unix.Mprotect(b, unix.PROT_READ|unix.PROT_WRITE); err != nil { + t.Fatalf("Mprotect: %v", err) + } + + b[0] = 42 + + if err := unix.Msync(b, unix.MS_SYNC); err != nil { + t.Fatalf("Msync: %v", err) + } + if err := unix.Madvise(b, unix.MADV_DONTNEED); err != nil { + t.Fatalf("Madvise: %v", err) + } + if err := unix.Munmap(b); err != nil { + t.Fatalf("Munmap: %v", err) + } +} diff --git a/vendor/golang.org/x/sys/unix/openbsd_test.go b/vendor/golang.org/x/sys/unix/openbsd_test.go new file mode 100644 index 000000000..734d76585 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/openbsd_test.go @@ -0,0 +1,113 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build openbsd + +// This, on the face of it, bizarre testing mechanism is necessary because +// the only reliable way to gauge whether or not a pledge(2) call has succeeded +// is that the program has been killed as a result of breaking its pledge. + +package unix_test + +import ( + "flag" + "fmt" + "io/ioutil" + "os" + "os/exec" + "path/filepath" + "testing" + + "golang.org/x/sys/unix" +) + +type testProc struct { + fn func() // should always exit instead of returning + cleanup func() error // for instance, delete coredumps from testing pledge + success bool // whether zero-exit means success or failure +} + +var ( + testProcs = map[string]testProc{} + procName = "" +) + +const ( + optName = "sys-unix-internal-procname" +) + +func init() { + flag.StringVar(&procName, optName, "", "internal use only") +} + +// testCmd generates a proper command that, when executed, runs the test +// corresponding to the given key. +func testCmd(procName string) (*exec.Cmd, error) { + exe, err := filepath.Abs(os.Args[0]) + if err != nil { + return nil, err + } + cmd := exec.Command(exe, "-"+optName+"="+procName) + cmd.Stdout, cmd.Stderr = os.Stdout, os.Stderr + return cmd, nil +} + +// ExitsCorrectly is a comprehensive, one-line-of-use wrapper for testing +// a testProc with a key. +func ExitsCorrectly(procName string, t *testing.T) { + s := testProcs[procName] + c, err := testCmd(procName) + defer func() { + if s.cleanup() != nil { + t.Fatalf("Failed to run cleanup for %s", procName) + } + }() + if err != nil { + t.Fatalf("Failed to construct command for %s", procName) + } + if (c.Run() == nil) != s.success { + result := "succeed" + if !s.success { + result = "fail" + } + t.Fatalf("Process did not %s when it was supposed to", result) + } +} + +func TestMain(m *testing.M) { + flag.Parse() + if procName != "" { + testProcs[procName].fn() + } + os.Exit(m.Run()) +} + +// For example, add a test for pledge. +func init() { + testProcs["pledge"] = testProc{ + func() { + fmt.Println(unix.Pledge("", nil)) + os.Exit(0) + }, + func() error { + files, err := ioutil.ReadDir(".") + if err != nil { + return err + } + for _, file := range files { + if filepath.Ext(file.Name()) == ".core" { + if err := os.Remove(file.Name()); err != nil { + return err + } + } + } + return nil + }, + false, + } +} + +func TestPledge(t *testing.T) { + ExitsCorrectly("pledge", t) +} diff --git a/vendor/golang.org/x/sys/unix/pagesize_unix.go b/vendor/golang.org/x/sys/unix/pagesize_unix.go new file mode 100644 index 000000000..45afcf72d --- /dev/null +++ b/vendor/golang.org/x/sys/unix/pagesize_unix.go @@ -0,0 +1,15 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +// For Unix, get the pagesize from the runtime. + +package unix + +import "syscall" + +func Getpagesize() int { + return syscall.Getpagesize() +} diff --git a/vendor/golang.org/x/sys/unix/syscall.go b/vendor/golang.org/x/sys/unix/syscall.go index e2ee36452..85e35020e 100644 --- a/vendor/golang.org/x/sys/unix/syscall.go +++ b/vendor/golang.org/x/sys/unix/syscall.go @@ -19,7 +19,7 @@ // These calls return err == nil to indicate success; otherwise // err represents an operating system error describing the failure and // holds a value of type syscall.Errno. -package unix +package unix // import "golang.org/x/sys/unix" // ByteSliceFromString returns a NUL-terminated slice of bytes // containing the text of s. If s contains a NUL byte at any diff --git a/vendor/golang.org/x/sys/unix/syscall_bsd_test.go b/vendor/golang.org/x/sys/unix/syscall_bsd_test.go new file mode 100644 index 000000000..d8085a072 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_bsd_test.go @@ -0,0 +1,62 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd openbsd + +package unix_test + +import ( + "os/exec" + "runtime" + "testing" + + "golang.org/x/sys/unix" +) + +const MNT_WAIT = 1 +const MNT_NOWAIT = 2 + +func TestGetfsstat(t *testing.T) { + const flags = MNT_NOWAIT // see golang.org/issue/16937 + n, err := unix.Getfsstat(nil, flags) + if err != nil { + t.Fatal(err) + } + + data := make([]unix.Statfs_t, n) + n2, err := unix.Getfsstat(data, flags) + if err != nil { + t.Fatal(err) + } + if n != n2 { + t.Errorf("Getfsstat(nil) = %d, but subsequent Getfsstat(slice) = %d", n, n2) + } + for i, stat := range data { + if stat == (unix.Statfs_t{}) { + t.Errorf("index %v is an empty Statfs_t struct", i) + } + } + if t.Failed() { + for i, stat := range data[:n2] { + t.Logf("data[%v] = %+v", i, stat) + } + mount, err := exec.Command("mount").CombinedOutput() + if err != nil { + t.Logf("mount: %v\n%s", err, mount) + } else { + t.Logf("mount: %s", mount) + } + } +} + +func TestSysctlRaw(t *testing.T) { + if runtime.GOOS == "openbsd" { + t.Skip("kern.proc.pid does not exist on OpenBSD") + } + + _, err := unix.SysctlRaw("kern.proc.pid", unix.Getpid()) + if err != nil { + t.Fatal(err) + } +} diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_386.go b/vendor/golang.org/x/sys/unix/syscall_darwin_386.go index c172a3da5..76634f7ab 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin_386.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_386.go @@ -11,8 +11,6 @@ import ( "unsafe" ) -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go index c6c99c13a..7be02dab9 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go @@ -11,8 +11,6 @@ import ( "unsafe" ) -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go index d286cf408..26b66972f 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go @@ -9,8 +9,6 @@ import ( "unsafe" ) -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go index c33905cdc..4d67a8742 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go @@ -11,8 +11,6 @@ import ( "unsafe" ) -func Getpagesize() int { return 16384 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go index da7cb7982..6d8952d5a 100644 --- a/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go @@ -11,8 +11,6 @@ import ( "unsafe" ) -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go index 6a0cd804d..4cf5f453f 100644 --- a/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go @@ -11,8 +11,6 @@ import ( "unsafe" ) -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go index e142540ef..b8036e726 100644 --- a/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go @@ -11,8 +11,6 @@ import ( "unsafe" ) -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go index 5504cb125..5a3bb6a15 100644 --- a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go @@ -11,8 +11,6 @@ import ( "unsafe" ) -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return ts.Sec*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_test.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_test.go new file mode 100644 index 000000000..654439e02 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_test.go @@ -0,0 +1,297 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build freebsd + +package unix_test + +import ( + "flag" + "fmt" + "io/ioutil" + "os" + "os/exec" + "path" + "path/filepath" + "runtime" + "testing" + + "golang.org/x/sys/unix" +) + +func TestSysctlUint64(t *testing.T) { + _, err := unix.SysctlUint64("vm.swap_total") + if err != nil { + t.Fatal(err) + } +} + +// FIXME: Infrastructure for launching tests in subprocesses stolen from openbsd_test.go - refactor? +// testCmd generates a proper command that, when executed, runs the test +// corresponding to the given key. + +type testProc struct { + fn func() // should always exit instead of returning + arg func(t *testing.T) string // generate argument for test + cleanup func(arg string) error // for instance, delete coredumps from testing pledge + success bool // whether zero-exit means success or failure +} + +var ( + testProcs = map[string]testProc{} + procName = "" + procArg = "" +) + +const ( + optName = "sys-unix-internal-procname" + optArg = "sys-unix-internal-arg" +) + +func init() { + flag.StringVar(&procName, optName, "", "internal use only") + flag.StringVar(&procArg, optArg, "", "internal use only") + +} + +func testCmd(procName string, procArg string) (*exec.Cmd, error) { + exe, err := filepath.Abs(os.Args[0]) + if err != nil { + return nil, err + } + cmd := exec.Command(exe, "-"+optName+"="+procName, "-"+optArg+"="+procArg) + cmd.Stdout, cmd.Stderr = os.Stdout, os.Stderr + return cmd, nil +} + +// ExitsCorrectly is a comprehensive, one-line-of-use wrapper for testing +// a testProc with a key. +func ExitsCorrectly(t *testing.T, procName string) { + s := testProcs[procName] + arg := "-" + if s.arg != nil { + arg = s.arg(t) + } + c, err := testCmd(procName, arg) + defer func(arg string) { + if err := s.cleanup(arg); err != nil { + t.Fatalf("Failed to run cleanup for %s %s %#v", procName, err, err) + } + }(arg) + if err != nil { + t.Fatalf("Failed to construct command for %s", procName) + } + if (c.Run() == nil) != s.success { + result := "succeed" + if !s.success { + result = "fail" + } + t.Fatalf("Process did not %s when it was supposed to", result) + } +} + +func TestMain(m *testing.M) { + flag.Parse() + if procName != "" { + t := testProcs[procName] + t.fn() + os.Stderr.WriteString("test function did not exit\n") + if t.success { + os.Exit(1) + } else { + os.Exit(0) + } + } + os.Exit(m.Run()) +} + +// end of infrastructure + +const testfile = "gocapmodetest" +const testfile2 = testfile + "2" + +func CapEnterTest() { + _, err := os.OpenFile(path.Join(procArg, testfile), os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0666) + if err != nil { + panic(fmt.Sprintf("OpenFile: %s", err)) + } + + err = unix.CapEnter() + if err != nil { + panic(fmt.Sprintf("CapEnter: %s", err)) + } + + _, err = os.OpenFile(path.Join(procArg, testfile2), os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0666) + if err == nil { + panic("OpenFile works!") + } + if err.(*os.PathError).Err != unix.ECAPMODE { + panic(fmt.Sprintf("OpenFile failed wrong: %s %#v", err, err)) + } + os.Exit(0) +} + +func makeTempDir(t *testing.T) string { + d, err := ioutil.TempDir("", "go_openat_test") + if err != nil { + t.Fatalf("TempDir failed: %s", err) + } + return d +} + +func removeTempDir(arg string) error { + err := os.RemoveAll(arg) + if err != nil && err.(*os.PathError).Err == unix.ENOENT { + return nil + } + return err +} + +func init() { + testProcs["cap_enter"] = testProc{ + CapEnterTest, + makeTempDir, + removeTempDir, + true, + } +} + +func TestCapEnter(t *testing.T) { + if runtime.GOARCH != "amd64" { + t.Skipf("skipping test on %s", runtime.GOARCH) + } + ExitsCorrectly(t, "cap_enter") +} + +func OpenatTest() { + f, err := os.Open(procArg) + if err != nil { + panic(err) + } + + err = unix.CapEnter() + if err != nil { + panic(fmt.Sprintf("CapEnter: %s", err)) + } + + fxx, err := unix.Openat(int(f.Fd()), "xx", os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0666) + if err != nil { + panic(err) + } + unix.Close(fxx) + + // The right to open BASE/xx is not ambient + _, err = os.OpenFile(procArg+"/xx", os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0666) + if err == nil { + panic("OpenFile succeeded") + } + if err.(*os.PathError).Err != unix.ECAPMODE { + panic(fmt.Sprintf("OpenFile failed wrong: %s %#v", err, err)) + } + + // Can't make a new directory either + err = os.Mkdir(procArg+"2", 0777) + if err == nil { + panic("MKdir succeeded") + } + if err.(*os.PathError).Err != unix.ECAPMODE { + panic(fmt.Sprintf("Mkdir failed wrong: %s %#v", err, err)) + } + + // Remove all caps except read and lookup. + r, err := unix.CapRightsInit([]uint64{unix.CAP_READ, unix.CAP_LOOKUP}) + if err != nil { + panic(fmt.Sprintf("CapRightsInit failed: %s %#v", err, err)) + } + err = unix.CapRightsLimit(f.Fd(), r) + if err != nil { + panic(fmt.Sprintf("CapRightsLimit failed: %s %#v", err, err)) + } + + // Check we can get the rights back again + r, err = unix.CapRightsGet(f.Fd()) + if err != nil { + panic(fmt.Sprintf("CapRightsGet failed: %s %#v", err, err)) + } + b, err := unix.CapRightsIsSet(r, []uint64{unix.CAP_READ, unix.CAP_LOOKUP}) + if err != nil { + panic(fmt.Sprintf("CapRightsIsSet failed: %s %#v", err, err)) + } + if !b { + panic(fmt.Sprintf("Unexpected rights")) + } + b, err = unix.CapRightsIsSet(r, []uint64{unix.CAP_READ, unix.CAP_LOOKUP, unix.CAP_WRITE}) + if err != nil { + panic(fmt.Sprintf("CapRightsIsSet failed: %s %#v", err, err)) + } + if b { + panic(fmt.Sprintf("Unexpected rights (2)")) + } + + // Can no longer create a file + _, err = unix.Openat(int(f.Fd()), "xx2", os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0666) + if err == nil { + panic("Openat succeeded") + } + if err != unix.ENOTCAPABLE { + panic(fmt.Sprintf("OpenFileAt failed wrong: %s %#v", err, err)) + } + + // But can read an existing one + _, err = unix.Openat(int(f.Fd()), "xx", os.O_RDONLY, 0666) + if err != nil { + panic(fmt.Sprintf("Openat failed: %s %#v", err, err)) + } + + os.Exit(0) +} + +func init() { + testProcs["openat"] = testProc{ + OpenatTest, + makeTempDir, + removeTempDir, + true, + } +} + +func TestOpenat(t *testing.T) { + if runtime.GOARCH != "amd64" { + t.Skipf("skipping test on %s", runtime.GOARCH) + } + ExitsCorrectly(t, "openat") +} + +func TestCapRightsSetAndClear(t *testing.T) { + r, err := unix.CapRightsInit([]uint64{unix.CAP_READ, unix.CAP_WRITE, unix.CAP_PDWAIT}) + if err != nil { + t.Fatalf("CapRightsInit failed: %s", err) + } + + err = unix.CapRightsSet(r, []uint64{unix.CAP_EVENT, unix.CAP_LISTEN}) + if err != nil { + t.Fatalf("CapRightsSet failed: %s", err) + } + + b, err := unix.CapRightsIsSet(r, []uint64{unix.CAP_READ, unix.CAP_WRITE, unix.CAP_PDWAIT, unix.CAP_EVENT, unix.CAP_LISTEN}) + if err != nil { + t.Fatalf("CapRightsIsSet failed: %s", err) + } + if !b { + t.Fatalf("Wrong rights set") + } + + err = unix.CapRightsClear(r, []uint64{unix.CAP_READ, unix.CAP_PDWAIT}) + if err != nil { + t.Fatalf("CapRightsClear failed: %s", err) + } + + b, err = unix.CapRightsIsSet(r, []uint64{unix.CAP_WRITE, unix.CAP_EVENT, unix.CAP_LISTEN}) + if err != nil { + t.Fatalf("CapRightsIsSet failed: %s", err) + } + if !b { + t.Fatalf("Wrong rights set") + } +} diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_386.go b/vendor/golang.org/x/sys/unix/syscall_linux_386.go index 2b881b979..f4c826a45 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_386.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_386.go @@ -14,8 +14,6 @@ import ( "unsafe" ) -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go index 9516a3fd7..0715200dc 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go @@ -69,8 +69,6 @@ func Gettimeofday(tv *Timeval) (err error) { return nil } -func Getpagesize() int { return 4096 } - func Time(t *Time_t) (tt Time_t, err error) { var tv Timeval errno := gettimeofday(&tv) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go index 71d870228..2b79c84a6 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go @@ -11,8 +11,6 @@ import ( "unsafe" ) -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go index 4a136396c..68cc975db 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go @@ -66,8 +66,6 @@ func Lstat(path string, stat *Stat_t) (err error) { //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) -func Getpagesize() int { return 65536 } - //sysnb Gettimeofday(tv *Timeval) (err error) func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go index 73318e5c6..977df441b 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go @@ -55,8 +55,6 @@ package unix //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) -func Getpagesize() int { return 65536 } - //sysnb Gettimeofday(tv *Timeval) (err error) func Time(t *Time_t) (tt Time_t, err error) { diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go b/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go index b83d93fdf..25a5a0da5 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go @@ -235,5 +235,3 @@ func Poll(fds []PollFd, timeout int) (n int, err error) { } return poll(&fds[0], len(fds), timeout) } - -func Getpagesize() int { return 4096 } diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go index 60770f627..a4a8e4ee1 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go @@ -28,7 +28,7 @@ package unix //sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64 //sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64 //sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK -//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) +//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) //sys Setfsgid(gid int) (err error) //sys Setfsuid(uid int) (err error) @@ -61,8 +61,6 @@ package unix //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) -func Getpagesize() int { return 65536 } - //sysnb Gettimeofday(tv *Timeval) (err error) //sysnb Time(t *Time_t) (tt Time_t, err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go index 1708a4bbf..3845fc9c4 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go @@ -46,8 +46,6 @@ import ( //sysnb getgroups(n int, list *_Gid_t) (nn int, err error) //sysnb setgroups(n int, list *_Gid_t) (err error) -func Getpagesize() int { return 4096 } - //sysnb Gettimeofday(tv *Timeval) (err error) func Time(t *Time_t) (tt Time_t, err error) { diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go b/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go index 20b7454d7..bd9de3e9d 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go @@ -6,11 +6,6 @@ package unix -import ( - "sync/atomic" - "syscall" -) - //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) //sys Dup2(oldfd int, newfd int) (err error) //sys Fchown(fd int, uid int, gid int) (err error) @@ -63,21 +58,6 @@ import ( //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) -func sysconf(name int) (n int64, err syscall.Errno) - -// pageSize caches the value of Getpagesize, since it can't change -// once the system is booted. -var pageSize int64 // accessed atomically - -func Getpagesize() int { - n := atomic.LoadInt64(&pageSize) - if n == 0 { - n, _ = sysconf(_SC_PAGESIZE) - atomic.StoreInt64(&pageSize, n) - } - return int(n) -} - func Ioperm(from int, num int, on int) (err error) { return ENOSYS } diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_test.go b/vendor/golang.org/x/sys/unix/syscall_linux_test.go new file mode 100644 index 000000000..c0ab2db9e --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_linux_test.go @@ -0,0 +1,234 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build linux + +package unix_test + +import ( + "io/ioutil" + "os" + "testing" + "time" + + "golang.org/x/sys/unix" +) + +func TestFchmodat(t *testing.T) { + defer chtmpdir(t)() + + touch(t, "file1") + os.Symlink("file1", "symlink1") + + err := unix.Fchmodat(unix.AT_FDCWD, "symlink1", 0444, 0) + if err != nil { + t.Fatalf("Fchmodat: unexpected error: %v", err) + } + + fi, err := os.Stat("file1") + if err != nil { + t.Fatal(err) + } + + if fi.Mode() != 0444 { + t.Errorf("Fchmodat: failed to change mode: expected %v, got %v", 0444, fi.Mode()) + } + + err = unix.Fchmodat(unix.AT_FDCWD, "symlink1", 0444, unix.AT_SYMLINK_NOFOLLOW) + if err != unix.EOPNOTSUPP { + t.Fatalf("Fchmodat: unexpected error: %v, expected EOPNOTSUPP", err) + } +} + +func TestIoctlGetInt(t *testing.T) { + f, err := os.Open("/dev/random") + if err != nil { + t.Fatalf("failed to open device: %v", err) + } + defer f.Close() + + v, err := unix.IoctlGetInt(int(f.Fd()), unix.RNDGETENTCNT) + if err != nil { + t.Fatalf("failed to perform ioctl: %v", err) + } + + t.Logf("%d bits of entropy available", v) +} + +func TestPoll(t *testing.T) { + f, cleanup := mktmpfifo(t) + defer cleanup() + + const timeout = 100 + + ok := make(chan bool, 1) + go func() { + select { + case <-time.After(10 * timeout * time.Millisecond): + t.Errorf("Poll: failed to timeout after %d milliseconds", 10*timeout) + case <-ok: + } + }() + + fds := []unix.PollFd{{Fd: int32(f.Fd()), Events: unix.POLLIN}} + n, err := unix.Poll(fds, timeout) + ok <- true + if err != nil { + t.Errorf("Poll: unexpected error: %v", err) + return + } + if n != 0 { + t.Errorf("Poll: wrong number of events: got %v, expected %v", n, 0) + return + } +} + +func TestPpoll(t *testing.T) { + f, cleanup := mktmpfifo(t) + defer cleanup() + + const timeout = 100 * time.Millisecond + + ok := make(chan bool, 1) + go func() { + select { + case <-time.After(10 * timeout): + t.Errorf("Ppoll: failed to timeout after %d", 10*timeout) + case <-ok: + } + }() + + fds := []unix.PollFd{{Fd: int32(f.Fd()), Events: unix.POLLIN}} + timeoutTs := unix.NsecToTimespec(int64(timeout)) + n, err := unix.Ppoll(fds, &timeoutTs, nil) + ok <- true + if err != nil { + t.Errorf("Ppoll: unexpected error: %v", err) + return + } + if n != 0 { + t.Errorf("Ppoll: wrong number of events: got %v, expected %v", n, 0) + return + } +} + +// mktmpfifo creates a temporary FIFO and provides a cleanup function. +func mktmpfifo(t *testing.T) (*os.File, func()) { + err := unix.Mkfifo("fifo", 0666) + if err != nil { + t.Fatalf("mktmpfifo: failed to create FIFO: %v", err) + } + + f, err := os.OpenFile("fifo", os.O_RDWR, 0666) + if err != nil { + os.Remove("fifo") + t.Fatalf("mktmpfifo: failed to open FIFO: %v", err) + } + + return f, func() { + f.Close() + os.Remove("fifo") + } +} + +func TestTime(t *testing.T) { + var ut unix.Time_t + ut2, err := unix.Time(&ut) + if err != nil { + t.Fatalf("Time: %v", err) + } + if ut != ut2 { + t.Errorf("Time: return value %v should be equal to argument %v", ut2, ut) + } + + var now time.Time + + for i := 0; i < 10; i++ { + ut, err = unix.Time(nil) + if err != nil { + t.Fatalf("Time: %v", err) + } + + now = time.Now() + + if int64(ut) == now.Unix() { + return + } + } + + t.Errorf("Time: return value %v should be nearly equal to time.Now().Unix() %v", ut, now.Unix()) +} + +func TestUtime(t *testing.T) { + defer chtmpdir(t)() + + touch(t, "file1") + + buf := &unix.Utimbuf{ + Modtime: 12345, + } + + err := unix.Utime("file1", buf) + if err != nil { + t.Fatalf("Utime: %v", err) + } + + fi, err := os.Stat("file1") + if err != nil { + t.Fatal(err) + } + + if fi.ModTime().Unix() != 12345 { + t.Errorf("Utime: failed to change modtime: expected %v, got %v", 12345, fi.ModTime().Unix()) + } +} + +func TestGetrlimit(t *testing.T) { + var rlim unix.Rlimit + err := unix.Getrlimit(unix.RLIMIT_AS, &rlim) + if err != nil { + t.Fatalf("Getrlimit: %v", err) + } +} + +func TestSelect(t *testing.T) { + _, err := unix.Select(0, nil, nil, nil, &unix.Timeval{0, 0}) + if err != nil { + t.Fatalf("Select: %v", err) + } +} + +// utilities taken from os/os_test.go + +func touch(t *testing.T, name string) { + f, err := os.Create(name) + if err != nil { + t.Fatal(err) + } + if err := f.Close(); err != nil { + t.Fatal(err) + } +} + +// chtmpdir changes the working directory to a new temporary directory and +// provides a cleanup function. Used when PWD is read-only. +func chtmpdir(t *testing.T) func() { + oldwd, err := os.Getwd() + if err != nil { + t.Fatalf("chtmpdir: %v", err) + } + d, err := ioutil.TempDir("", "test") + if err != nil { + t.Fatalf("chtmpdir: %v", err) + } + if err := os.Chdir(d); err != nil { + t.Fatalf("chtmpdir: %v", err) + } + return func() { + if err := os.Chdir(oldwd); err != nil { + t.Fatalf("chtmpdir: %v", err) + } + os.RemoveAll(d) + } +} diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go index afaca0983..baefa411e 100644 --- a/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go @@ -6,8 +6,6 @@ package unix -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go index a6ff04ce5..59c2ab7eb 100644 --- a/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go @@ -6,8 +6,6 @@ package unix -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go index 68a6969b2..7208108a3 100644 --- a/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go @@ -6,8 +6,6 @@ package unix -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go index a66ddc59c..d3809b426 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go @@ -6,8 +6,6 @@ package unix -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go index 0776c1faf..9a9dfceff 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go @@ -6,8 +6,6 @@ package unix -func Getpagesize() int { return 4096 } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go index 14ddaf3f3..ba8649056 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go @@ -6,10 +6,6 @@ package unix -import "syscall" - -func Getpagesize() int { return syscall.Getpagesize() } - func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris.go b/vendor/golang.org/x/sys/unix/syscall_solaris.go index 0d4e5c4e6..35e5d72ba 100644 --- a/vendor/golang.org/x/sys/unix/syscall_solaris.go +++ b/vendor/golang.org/x/sys/unix/syscall_solaris.go @@ -13,7 +13,6 @@ package unix import ( - "sync/atomic" "syscall" "unsafe" ) @@ -515,6 +514,24 @@ func Acct(path string) (err error) { return acct(pathp) } +//sys __makedev(version int, major uint, minor uint) (val uint64) + +func Mkdev(major, minor uint32) uint64 { + return __makedev(NEWDEV, uint(major), uint(minor)) +} + +//sys __major(version int, dev uint64) (val uint) + +func Major(dev uint64) uint32 { + return uint32(__major(NEWDEV, dev)) +} + +//sys __minor(version int, dev uint64) (val uint) + +func Minor(dev uint64) uint32 { + return uint32(__minor(NEWDEV, dev)) +} + /* * Expose the ioctl function */ @@ -613,6 +630,7 @@ func IoctlGetTermio(fd int, req uint) (*Termio, error) { //sys Mlock(b []byte) (err error) //sys Mlockall(flags int) (err error) //sys Mprotect(b []byte, prot int) (err error) +//sys Msync(b []byte, flags int) (err error) //sys Munlock(b []byte) (err error) //sys Munlockall() (err error) //sys Nanosleep(time *Timespec, leftover *Timespec) (err error) @@ -699,18 +717,3 @@ func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, e func Munmap(b []byte) (err error) { return mapper.Munmap(b) } - -//sys sysconf(name int) (n int64, err error) - -// pageSize caches the value of Getpagesize, since it can't change -// once the system is booted. -var pageSize int64 // accessed atomically - -func Getpagesize() int { - n := atomic.LoadInt64(&pageSize) - if n == 0 { - n, _ = sysconf(_SC_PAGESIZE) - atomic.StoreInt64(&pageSize, n) - } - return int(n) -} diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris_test.go b/vendor/golang.org/x/sys/unix/syscall_solaris_test.go new file mode 100644 index 000000000..d3e7d2b2e --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_solaris_test.go @@ -0,0 +1,34 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build solaris + +package unix_test + +import ( + "os/exec" + "testing" + + "golang.org/x/sys/unix" +) + +func TestStatvfs(t *testing.T) { + if err := unix.Statvfs("", nil); err == nil { + t.Fatal(`Statvfs("") expected failure`) + } + + statvfs := unix.Statvfs_t{} + if err := unix.Statvfs("/", &statvfs); err != nil { + t.Errorf(`Statvfs("/") failed: %v`, err) + } + + if t.Failed() { + mount, err := exec.Command("mount").CombinedOutput() + if err != nil { + t.Logf("mount: %v\n%s", err, mount) + } else { + t.Logf("mount: %s", mount) + } + } +} diff --git a/vendor/golang.org/x/sys/unix/syscall_test.go b/vendor/golang.org/x/sys/unix/syscall_test.go new file mode 100644 index 000000000..95eac92ac --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_test.go @@ -0,0 +1,50 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +package unix_test + +import ( + "fmt" + "testing" + + "golang.org/x/sys/unix" +) + +func testSetGetenv(t *testing.T, key, value string) { + err := unix.Setenv(key, value) + if err != nil { + t.Fatalf("Setenv failed to set %q: %v", value, err) + } + newvalue, found := unix.Getenv(key) + if !found { + t.Fatalf("Getenv failed to find %v variable (want value %q)", key, value) + } + if newvalue != value { + t.Fatalf("Getenv(%v) = %q; want %q", key, newvalue, value) + } +} + +func TestEnv(t *testing.T) { + testSetGetenv(t, "TESTENV", "AVALUE") + // make sure TESTENV gets set to "", not deleted + testSetGetenv(t, "TESTENV", "") +} + +func TestItoa(t *testing.T) { + // Make most negative integer: 0x8000... + i := 1 + for i<<1 != 0 { + i <<= 1 + } + if i >= 0 { + t.Fatal("bad math") + } + s := unix.Itoa(i) + f := fmt.Sprint(i) + if s != f { + t.Fatalf("itoa(%d) = %s, want %s", i, s, f) + } +} diff --git a/vendor/golang.org/x/sys/unix/syscall_unix_test.go b/vendor/golang.org/x/sys/unix/syscall_unix_test.go new file mode 100644 index 000000000..394b3502e --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_unix_test.go @@ -0,0 +1,345 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +package unix_test + +import ( + "flag" + "fmt" + "io/ioutil" + "net" + "os" + "os/exec" + "path/filepath" + "runtime" + "testing" + "time" + + "golang.org/x/sys/unix" +) + +// Tests that below functions, structures and constants are consistent +// on all Unix-like systems. +func _() { + // program scheduling priority functions and constants + var ( + _ func(int, int, int) error = unix.Setpriority + _ func(int, int) (int, error) = unix.Getpriority + ) + const ( + _ int = unix.PRIO_USER + _ int = unix.PRIO_PROCESS + _ int = unix.PRIO_PGRP + ) + + // termios constants + const ( + _ int = unix.TCIFLUSH + _ int = unix.TCIOFLUSH + _ int = unix.TCOFLUSH + ) + + // fcntl file locking structure and constants + var ( + _ = unix.Flock_t{ + Type: int16(0), + Whence: int16(0), + Start: int64(0), + Len: int64(0), + Pid: int32(0), + } + ) + const ( + _ = unix.F_GETLK + _ = unix.F_SETLK + _ = unix.F_SETLKW + ) +} + +// TestFcntlFlock tests whether the file locking structure matches +// the calling convention of each kernel. +func TestFcntlFlock(t *testing.T) { + name := filepath.Join(os.TempDir(), "TestFcntlFlock") + fd, err := unix.Open(name, unix.O_CREAT|unix.O_RDWR|unix.O_CLOEXEC, 0) + if err != nil { + t.Fatalf("Open failed: %v", err) + } + defer unix.Unlink(name) + defer unix.Close(fd) + flock := unix.Flock_t{ + Type: unix.F_RDLCK, + Start: 0, Len: 0, Whence: 1, + } + if err := unix.FcntlFlock(uintptr(fd), unix.F_GETLK, &flock); err != nil { + t.Fatalf("FcntlFlock failed: %v", err) + } +} + +// TestPassFD tests passing a file descriptor over a Unix socket. +// +// This test involved both a parent and child process. The parent +// process is invoked as a normal test, with "go test", which then +// runs the child process by running the current test binary with args +// "-test.run=^TestPassFD$" and an environment variable used to signal +// that the test should become the child process instead. +func TestPassFD(t *testing.T) { + if os.Getenv("GO_WANT_HELPER_PROCESS") == "1" { + passFDChild() + return + } + + tempDir, err := ioutil.TempDir("", "TestPassFD") + if err != nil { + t.Fatal(err) + } + defer os.RemoveAll(tempDir) + + fds, err := unix.Socketpair(unix.AF_LOCAL, unix.SOCK_STREAM, 0) + if err != nil { + t.Fatalf("Socketpair: %v", err) + } + defer unix.Close(fds[0]) + defer unix.Close(fds[1]) + writeFile := os.NewFile(uintptr(fds[0]), "child-writes") + readFile := os.NewFile(uintptr(fds[1]), "parent-reads") + defer writeFile.Close() + defer readFile.Close() + + cmd := exec.Command(os.Args[0], "-test.run=^TestPassFD$", "--", tempDir) + cmd.Env = []string{"GO_WANT_HELPER_PROCESS=1"} + if lp := os.Getenv("LD_LIBRARY_PATH"); lp != "" { + cmd.Env = append(cmd.Env, "LD_LIBRARY_PATH="+lp) + } + cmd.ExtraFiles = []*os.File{writeFile} + + out, err := cmd.CombinedOutput() + if len(out) > 0 || err != nil { + t.Fatalf("child process: %q, %v", out, err) + } + + c, err := net.FileConn(readFile) + if err != nil { + t.Fatalf("FileConn: %v", err) + } + defer c.Close() + + uc, ok := c.(*net.UnixConn) + if !ok { + t.Fatalf("unexpected FileConn type; expected UnixConn, got %T", c) + } + + buf := make([]byte, 32) // expect 1 byte + oob := make([]byte, 32) // expect 24 bytes + closeUnix := time.AfterFunc(5*time.Second, func() { + t.Logf("timeout reading from unix socket") + uc.Close() + }) + _, oobn, _, _, err := uc.ReadMsgUnix(buf, oob) + closeUnix.Stop() + + scms, err := unix.ParseSocketControlMessage(oob[:oobn]) + if err != nil { + t.Fatalf("ParseSocketControlMessage: %v", err) + } + if len(scms) != 1 { + t.Fatalf("expected 1 SocketControlMessage; got scms = %#v", scms) + } + scm := scms[0] + gotFds, err := unix.ParseUnixRights(&scm) + if err != nil { + t.Fatalf("unix.ParseUnixRights: %v", err) + } + if len(gotFds) != 1 { + t.Fatalf("wanted 1 fd; got %#v", gotFds) + } + + f := os.NewFile(uintptr(gotFds[0]), "fd-from-child") + defer f.Close() + + got, err := ioutil.ReadAll(f) + want := "Hello from child process!\n" + if string(got) != want { + t.Errorf("child process ReadAll: %q, %v; want %q", got, err, want) + } +} + +// passFDChild is the child process used by TestPassFD. +func passFDChild() { + defer os.Exit(0) + + // Look for our fd. It should be fd 3, but we work around an fd leak + // bug here (http://golang.org/issue/2603) to let it be elsewhere. + var uc *net.UnixConn + for fd := uintptr(3); fd <= 10; fd++ { + f := os.NewFile(fd, "unix-conn") + var ok bool + netc, _ := net.FileConn(f) + uc, ok = netc.(*net.UnixConn) + if ok { + break + } + } + if uc == nil { + fmt.Println("failed to find unix fd") + return + } + + // Make a file f to send to our parent process on uc. + // We make it in tempDir, which our parent will clean up. + flag.Parse() + tempDir := flag.Arg(0) + f, err := ioutil.TempFile(tempDir, "") + if err != nil { + fmt.Printf("TempFile: %v", err) + return + } + + f.Write([]byte("Hello from child process!\n")) + f.Seek(0, 0) + + rights := unix.UnixRights(int(f.Fd())) + dummyByte := []byte("x") + n, oobn, err := uc.WriteMsgUnix(dummyByte, rights, nil) + if err != nil { + fmt.Printf("WriteMsgUnix: %v", err) + return + } + if n != 1 || oobn != len(rights) { + fmt.Printf("WriteMsgUnix = %d, %d; want 1, %d", n, oobn, len(rights)) + return + } +} + +// TestUnixRightsRoundtrip tests that UnixRights, ParseSocketControlMessage, +// and ParseUnixRights are able to successfully round-trip lists of file descriptors. +func TestUnixRightsRoundtrip(t *testing.T) { + testCases := [...][][]int{ + {{42}}, + {{1, 2}}, + {{3, 4, 5}}, + {{}}, + {{1, 2}, {3, 4, 5}, {}, {7}}, + } + for _, testCase := range testCases { + b := []byte{} + var n int + for _, fds := range testCase { + // Last assignment to n wins + n = len(b) + unix.CmsgLen(4*len(fds)) + b = append(b, unix.UnixRights(fds...)...) + } + // Truncate b + b = b[:n] + + scms, err := unix.ParseSocketControlMessage(b) + if err != nil { + t.Fatalf("ParseSocketControlMessage: %v", err) + } + if len(scms) != len(testCase) { + t.Fatalf("expected %v SocketControlMessage; got scms = %#v", len(testCase), scms) + } + for i, scm := range scms { + gotFds, err := unix.ParseUnixRights(&scm) + if err != nil { + t.Fatalf("ParseUnixRights: %v", err) + } + wantFds := testCase[i] + if len(gotFds) != len(wantFds) { + t.Fatalf("expected %v fds, got %#v", len(wantFds), gotFds) + } + for j, fd := range gotFds { + if fd != wantFds[j] { + t.Fatalf("expected fd %v, got %v", wantFds[j], fd) + } + } + } + } +} + +func TestRlimit(t *testing.T) { + var rlimit, zero unix.Rlimit + err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlimit) + if err != nil { + t.Fatalf("Getrlimit: save failed: %v", err) + } + if zero == rlimit { + t.Fatalf("Getrlimit: save failed: got zero value %#v", rlimit) + } + set := rlimit + set.Cur = set.Max - 1 + err = unix.Setrlimit(unix.RLIMIT_NOFILE, &set) + if err != nil { + t.Fatalf("Setrlimit: set failed: %#v %v", set, err) + } + var get unix.Rlimit + err = unix.Getrlimit(unix.RLIMIT_NOFILE, &get) + if err != nil { + t.Fatalf("Getrlimit: get failed: %v", err) + } + set = rlimit + set.Cur = set.Max - 1 + if set != get { + // Seems like Darwin requires some privilege to + // increase the soft limit of rlimit sandbox, though + // Setrlimit never reports an error. + switch runtime.GOOS { + case "darwin": + default: + t.Fatalf("Rlimit: change failed: wanted %#v got %#v", set, get) + } + } + err = unix.Setrlimit(unix.RLIMIT_NOFILE, &rlimit) + if err != nil { + t.Fatalf("Setrlimit: restore failed: %#v %v", rlimit, err) + } +} + +func TestSeekFailure(t *testing.T) { + _, err := unix.Seek(-1, 0, 0) + if err == nil { + t.Fatalf("Seek(-1, 0, 0) did not fail") + } + str := err.Error() // used to crash on Linux + t.Logf("Seek: %v", str) + if str == "" { + t.Fatalf("Seek(-1, 0, 0) return error with empty message") + } +} + +func TestDup(t *testing.T) { + file, err := ioutil.TempFile("", "TestDup") + if err != nil { + t.Fatalf("Tempfile failed: %v", err) + } + defer os.Remove(file.Name()) + defer file.Close() + f := int(file.Fd()) + + newFd, err := unix.Dup(f) + if err != nil { + t.Fatalf("Dup: %v", err) + } + + err = unix.Dup2(newFd, newFd+1) + if err != nil { + t.Fatalf("Dup2: %v", err) + } + + b1 := []byte("Test123") + b2 := make([]byte, 7) + _, err = unix.Write(newFd+1, b1) + if err != nil { + t.Fatalf("Write to dup2 fd failed: %v", err) + } + _, err = unix.Seek(f, 0, 0) + _, err = unix.Read(f, b2) + if err != nil { + t.Fatalf("Read back failed: %v", err) + } + if string(b1) != string(b2) { + t.Errorf("Dup: stdout write not in file, expected %v, got %v", string(b1), string(b2)) + } +} diff --git a/vendor/golang.org/x/sys/unix/types_solaris.go b/vendor/golang.org/x/sys/unix/types_solaris.go index 393c7f04f..6d7461401 100644 --- a/vendor/golang.org/x/sys/unix/types_solaris.go +++ b/vendor/golang.org/x/sys/unix/types_solaris.go @@ -256,10 +256,6 @@ type BpfTimeval C.struct_bpf_timeval type BpfHdr C.struct_bpf_hdr -// sysconf information - -const _SC_PAGESIZE = C._SC_PAGESIZE - // Terminal handling type Termios C.struct_termios diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go index 33ced1ae4..4066ad1e0 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go @@ -36,7 +36,7 @@ const ( AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b + AF_MAX = 0x2c AF_MPLS = 0x1c AF_NETBEUI = 0xd AF_NETLINK = 0x10 @@ -51,6 +51,7 @@ const ( AF_ROUTE = 0x10 AF_RXRPC = 0x21 AF_SECURITY = 0xe + AF_SMC = 0x2b AF_SNA = 0x16 AF_TIPC = 0x1e AF_UNIX = 0x1 @@ -129,6 +130,7 @@ const ( ARPHRD_TUNNEL = 0x300 ARPHRD_TUNNEL6 = 0x301 ARPHRD_VOID = 0xffff + ARPHRD_VSOCKMON = 0x33a ARPHRD_X25 = 0x10f B0 = 0x0 B1000000 = 0x1008 @@ -392,6 +394,7 @@ const ( ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 ETH_P_HSR = 0x892f + ETH_P_IBOE = 0x8915 ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -453,6 +456,8 @@ const ( FF1 = 0x8000 FFDLY = 0x8000 FLUSHO = 0x1000 + FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 + FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 @@ -657,8 +662,10 @@ const ( IPV6_2292PKTOPTIONS = 0x6 IPV6_2292RTHDR = 0x5 IPV6_ADDRFORM = 0x1 + IPV6_ADDR_PREFERENCES = 0x48 IPV6_ADD_MEMBERSHIP = 0x14 IPV6_AUTHHDR = 0xa + IPV6_AUTOFLOWLABEL = 0x46 IPV6_CHECKSUM = 0x7 IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 @@ -671,12 +678,14 @@ const ( IPV6_JOIN_GROUP = 0x14 IPV6_LEAVE_ANYCAST = 0x1c IPV6_LEAVE_GROUP = 0x15 + IPV6_MINHOPCOUNT = 0x49 IPV6_MTU = 0x18 IPV6_MTU_DISCOVER = 0x17 IPV6_MULTICAST_HOPS = 0x12 IPV6_MULTICAST_IF = 0x11 IPV6_MULTICAST_LOOP = 0x13 IPV6_NEXTHOP = 0x9 + IPV6_ORIGDSTADDR = 0x4a IPV6_PATHMTU = 0x3d IPV6_PKTINFO = 0x32 IPV6_PMTUDISC_DO = 0x2 @@ -687,8 +696,10 @@ const ( IPV6_PMTUDISC_WANT = 0x1 IPV6_RECVDSTOPTS = 0x3a IPV6_RECVERR = 0x19 + IPV6_RECVFRAGSIZE = 0x4d IPV6_RECVHOPLIMIT = 0x33 IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVORIGDSTADDR = 0x4a IPV6_RECVPATHMTU = 0x3c IPV6_RECVPKTINFO = 0x31 IPV6_RECVRTHDR = 0x38 @@ -702,7 +713,9 @@ const ( IPV6_RXDSTOPTS = 0x3b IPV6_RXHOPOPTS = 0x36 IPV6_TCLASS = 0x43 + IPV6_TRANSPARENT = 0x4b IPV6_UNICAST_HOPS = 0x10 + IPV6_UNICAST_IF = 0x4c IPV6_V6ONLY = 0x1a IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 @@ -745,6 +758,7 @@ const ( IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 IP_RECVERR = 0xb + IP_RECVFRAGSIZE = 0x19 IP_RECVOPTS = 0x6 IP_RECVORIGDSTADDR = 0x14 IP_RECVRETOPTS = 0x7 @@ -782,6 +796,7 @@ const ( KEYCTL_NEGATE = 0xd KEYCTL_READ = 0xb KEYCTL_REJECT = 0x13 + KEYCTL_RESTRICT_KEYRING = 0x1d KEYCTL_REVOKE = 0x3 KEYCTL_SEARCH = 0xa KEYCTL_SESSION_TO_PARENT = 0x12 @@ -915,6 +930,7 @@ const ( MS_SILENT = 0x8000 MS_SLAVE = 0x80000 MS_STRICTATIME = 0x1000000 + MS_SUBMOUNT = 0x4000000 MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 @@ -929,6 +945,7 @@ const ( NETLINK_DNRTMSG = 0xe NETLINK_DROP_MEMBERSHIP = 0x2 NETLINK_ECRYPTFS = 0x13 + NETLINK_EXT_ACK = 0xb NETLINK_FIB_LOOKUP = 0xa NETLINK_FIREWALL = 0x3 NETLINK_GENERIC = 0x10 @@ -947,6 +964,7 @@ const ( NETLINK_RX_RING = 0x6 NETLINK_SCSITRANSPORT = 0x12 NETLINK_SELINUX = 0x7 + NETLINK_SMC = 0x16 NETLINK_SOCK_DIAG = 0x4 NETLINK_TX_RING = 0x7 NETLINK_UNUSED = 0x1 @@ -967,8 +985,10 @@ const ( NLMSG_NOOP = 0x1 NLMSG_OVERRUN = 0x4 NLM_F_ACK = 0x4 + NLM_F_ACK_TLVS = 0x200 NLM_F_APPEND = 0x800 NLM_F_ATOMIC = 0x400 + NLM_F_CAPPED = 0x100 NLM_F_CREATE = 0x400 NLM_F_DUMP = 0x300 NLM_F_DUMP_FILTERED = 0x20 @@ -1025,6 +1045,7 @@ const ( PACKET_FANOUT_EBPF = 0x7 PACKET_FANOUT_FLAG_DEFRAG = 0x8000 PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 PACKET_FANOUT_HASH = 0x0 PACKET_FANOUT_LB = 0x1 PACKET_FANOUT_QM = 0x5 @@ -1281,7 +1302,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x1a RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1325,6 +1346,7 @@ const ( RTM_DELLINK = 0x11 RTM_DELMDB = 0x55 RTM_DELNEIGH = 0x1d + RTM_DELNETCONF = 0x51 RTM_DELNSID = 0x59 RTM_DELQDISC = 0x25 RTM_DELROUTE = 0x19 @@ -1333,6 +1355,7 @@ const ( RTM_DELTFILTER = 0x2d RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 + RTM_F_FIB_MATCH = 0x2000 RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_PREFIX = 0x800 @@ -1354,10 +1377,11 @@ const ( RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x63 RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 + RTM_NEWCACHEREPORT = 0x60 RTM_NEWLINK = 0x10 RTM_NEWMDB = 0x54 RTM_NEWNDUSEROPT = 0x44 @@ -1372,8 +1396,8 @@ const ( RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x15 + RTM_NR_MSGTYPES = 0x54 RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 @@ -1384,6 +1408,7 @@ const ( RTNH_F_OFFLOAD = 0x8 RTNH_F_ONLINK = 0x4 RTNH_F_PERVASIVE = 0x2 + RTNH_F_UNRESOLVED = 0x20 RTN_MAX = 0xb RTPROT_BABEL = 0x2a RTPROT_BIRD = 0xc @@ -1414,6 +1439,7 @@ const ( SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_WIFI_STATUS = 0x29 SECCOMP_MODE_DISABLED = 0x0 @@ -1552,6 +1578,7 @@ const ( SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 SO_DEBUG = 0x1 SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b @@ -1560,11 +1587,13 @@ const ( SO_ERROR = 0x4 SO_GET_FILTER = 0x1a SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 SO_NOFCS = 0x2b SO_NO_CHECK = 0xb SO_OOBINLINE = 0xa @@ -1572,6 +1601,7 @@ const ( SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x11 + SO_PEERGROUPS = 0x3b SO_PEERNAME = 0x1c SO_PEERSEC = 0x1f SO_PRIORITY = 0xc @@ -1668,6 +1698,7 @@ const ( TCP_CORK = 0x3 TCP_DEFER_ACCEPT = 0x9 TCP_FASTOPEN = 0x17 + TCP_FASTOPEN_CONNECT = 0x1e TCP_INFO = 0xb TCP_KEEPCNT = 0x6 TCP_KEEPIDLE = 0x4 @@ -1727,6 +1758,7 @@ const ( TIOCGPKT = 0x80045438 TIOCGPTLCK = 0x80045439 TIOCGPTN = 0x80045430 + TIOCGPTPEER = 0x5441 TIOCGRS485 = 0x542e TIOCGSERIAL = 0x541e TIOCGSID = 0x5429 @@ -2019,7 +2051,6 @@ const ( SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) - SIGUNUSED = syscall.Signal(0x1f) SIGURG = syscall.Signal(0x17) SIGUSR1 = syscall.Signal(0xa) SIGUSR2 = syscall.Signal(0xc) diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go index a6618fc11..c9f53b0b3 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go @@ -36,7 +36,7 @@ const ( AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b + AF_MAX = 0x2c AF_MPLS = 0x1c AF_NETBEUI = 0xd AF_NETLINK = 0x10 @@ -51,6 +51,7 @@ const ( AF_ROUTE = 0x10 AF_RXRPC = 0x21 AF_SECURITY = 0xe + AF_SMC = 0x2b AF_SNA = 0x16 AF_TIPC = 0x1e AF_UNIX = 0x1 @@ -129,6 +130,7 @@ const ( ARPHRD_TUNNEL = 0x300 ARPHRD_TUNNEL6 = 0x301 ARPHRD_VOID = 0xffff + ARPHRD_VSOCKMON = 0x33a ARPHRD_X25 = 0x10f B0 = 0x0 B1000000 = 0x1008 @@ -392,6 +394,7 @@ const ( ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 ETH_P_HSR = 0x892f + ETH_P_IBOE = 0x8915 ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -453,6 +456,8 @@ const ( FF1 = 0x8000 FFDLY = 0x8000 FLUSHO = 0x1000 + FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 + FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 @@ -657,8 +662,10 @@ const ( IPV6_2292PKTOPTIONS = 0x6 IPV6_2292RTHDR = 0x5 IPV6_ADDRFORM = 0x1 + IPV6_ADDR_PREFERENCES = 0x48 IPV6_ADD_MEMBERSHIP = 0x14 IPV6_AUTHHDR = 0xa + IPV6_AUTOFLOWLABEL = 0x46 IPV6_CHECKSUM = 0x7 IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 @@ -671,12 +678,14 @@ const ( IPV6_JOIN_GROUP = 0x14 IPV6_LEAVE_ANYCAST = 0x1c IPV6_LEAVE_GROUP = 0x15 + IPV6_MINHOPCOUNT = 0x49 IPV6_MTU = 0x18 IPV6_MTU_DISCOVER = 0x17 IPV6_MULTICAST_HOPS = 0x12 IPV6_MULTICAST_IF = 0x11 IPV6_MULTICAST_LOOP = 0x13 IPV6_NEXTHOP = 0x9 + IPV6_ORIGDSTADDR = 0x4a IPV6_PATHMTU = 0x3d IPV6_PKTINFO = 0x32 IPV6_PMTUDISC_DO = 0x2 @@ -687,8 +696,10 @@ const ( IPV6_PMTUDISC_WANT = 0x1 IPV6_RECVDSTOPTS = 0x3a IPV6_RECVERR = 0x19 + IPV6_RECVFRAGSIZE = 0x4d IPV6_RECVHOPLIMIT = 0x33 IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVORIGDSTADDR = 0x4a IPV6_RECVPATHMTU = 0x3c IPV6_RECVPKTINFO = 0x31 IPV6_RECVRTHDR = 0x38 @@ -702,7 +713,9 @@ const ( IPV6_RXDSTOPTS = 0x3b IPV6_RXHOPOPTS = 0x36 IPV6_TCLASS = 0x43 + IPV6_TRANSPARENT = 0x4b IPV6_UNICAST_HOPS = 0x10 + IPV6_UNICAST_IF = 0x4c IPV6_V6ONLY = 0x1a IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 @@ -745,6 +758,7 @@ const ( IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 IP_RECVERR = 0xb + IP_RECVFRAGSIZE = 0x19 IP_RECVOPTS = 0x6 IP_RECVORIGDSTADDR = 0x14 IP_RECVRETOPTS = 0x7 @@ -782,6 +796,7 @@ const ( KEYCTL_NEGATE = 0xd KEYCTL_READ = 0xb KEYCTL_REJECT = 0x13 + KEYCTL_RESTRICT_KEYRING = 0x1d KEYCTL_REVOKE = 0x3 KEYCTL_SEARCH = 0xa KEYCTL_SESSION_TO_PARENT = 0x12 @@ -915,6 +930,7 @@ const ( MS_SILENT = 0x8000 MS_SLAVE = 0x80000 MS_STRICTATIME = 0x1000000 + MS_SUBMOUNT = 0x4000000 MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 @@ -929,6 +945,7 @@ const ( NETLINK_DNRTMSG = 0xe NETLINK_DROP_MEMBERSHIP = 0x2 NETLINK_ECRYPTFS = 0x13 + NETLINK_EXT_ACK = 0xb NETLINK_FIB_LOOKUP = 0xa NETLINK_FIREWALL = 0x3 NETLINK_GENERIC = 0x10 @@ -947,6 +964,7 @@ const ( NETLINK_RX_RING = 0x6 NETLINK_SCSITRANSPORT = 0x12 NETLINK_SELINUX = 0x7 + NETLINK_SMC = 0x16 NETLINK_SOCK_DIAG = 0x4 NETLINK_TX_RING = 0x7 NETLINK_UNUSED = 0x1 @@ -967,8 +985,10 @@ const ( NLMSG_NOOP = 0x1 NLMSG_OVERRUN = 0x4 NLM_F_ACK = 0x4 + NLM_F_ACK_TLVS = 0x200 NLM_F_APPEND = 0x800 NLM_F_ATOMIC = 0x400 + NLM_F_CAPPED = 0x100 NLM_F_CREATE = 0x400 NLM_F_DUMP = 0x300 NLM_F_DUMP_FILTERED = 0x20 @@ -1025,6 +1045,7 @@ const ( PACKET_FANOUT_EBPF = 0x7 PACKET_FANOUT_FLAG_DEFRAG = 0x8000 PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 PACKET_FANOUT_HASH = 0x0 PACKET_FANOUT_LB = 0x1 PACKET_FANOUT_QM = 0x5 @@ -1282,7 +1303,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x1a RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1326,6 +1347,7 @@ const ( RTM_DELLINK = 0x11 RTM_DELMDB = 0x55 RTM_DELNEIGH = 0x1d + RTM_DELNETCONF = 0x51 RTM_DELNSID = 0x59 RTM_DELQDISC = 0x25 RTM_DELROUTE = 0x19 @@ -1334,6 +1356,7 @@ const ( RTM_DELTFILTER = 0x2d RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 + RTM_F_FIB_MATCH = 0x2000 RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_PREFIX = 0x800 @@ -1355,10 +1378,11 @@ const ( RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x63 RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 + RTM_NEWCACHEREPORT = 0x60 RTM_NEWLINK = 0x10 RTM_NEWMDB = 0x54 RTM_NEWNDUSEROPT = 0x44 @@ -1373,8 +1397,8 @@ const ( RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x15 + RTM_NR_MSGTYPES = 0x54 RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 @@ -1385,6 +1409,7 @@ const ( RTNH_F_OFFLOAD = 0x8 RTNH_F_ONLINK = 0x4 RTNH_F_PERVASIVE = 0x2 + RTNH_F_UNRESOLVED = 0x20 RTN_MAX = 0xb RTPROT_BABEL = 0x2a RTPROT_BIRD = 0xc @@ -1415,6 +1440,7 @@ const ( SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_WIFI_STATUS = 0x29 SECCOMP_MODE_DISABLED = 0x0 @@ -1553,6 +1579,7 @@ const ( SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 SO_DEBUG = 0x1 SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b @@ -1561,11 +1588,13 @@ const ( SO_ERROR = 0x4 SO_GET_FILTER = 0x1a SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 SO_NOFCS = 0x2b SO_NO_CHECK = 0xb SO_OOBINLINE = 0xa @@ -1573,6 +1602,7 @@ const ( SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x11 + SO_PEERGROUPS = 0x3b SO_PEERNAME = 0x1c SO_PEERSEC = 0x1f SO_PRIORITY = 0xc @@ -1669,6 +1699,7 @@ const ( TCP_CORK = 0x3 TCP_DEFER_ACCEPT = 0x9 TCP_FASTOPEN = 0x17 + TCP_FASTOPEN_CONNECT = 0x1e TCP_INFO = 0xb TCP_KEEPCNT = 0x6 TCP_KEEPIDLE = 0x4 @@ -1728,6 +1759,7 @@ const ( TIOCGPKT = 0x80045438 TIOCGPTLCK = 0x80045439 TIOCGPTN = 0x80045430 + TIOCGPTPEER = 0x5441 TIOCGRS485 = 0x542e TIOCGSERIAL = 0x541e TIOCGSID = 0x5429 @@ -2020,7 +2052,6 @@ const ( SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) - SIGUNUSED = syscall.Signal(0x1f) SIGURG = syscall.Signal(0x17) SIGUSR1 = syscall.Signal(0xa) SIGUSR2 = syscall.Signal(0xc) diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go index 1adff0b28..3e8c2c7aa 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go @@ -36,7 +36,7 @@ const ( AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b + AF_MAX = 0x2c AF_MPLS = 0x1c AF_NETBEUI = 0xd AF_NETLINK = 0x10 @@ -51,6 +51,7 @@ const ( AF_ROUTE = 0x10 AF_RXRPC = 0x21 AF_SECURITY = 0xe + AF_SMC = 0x2b AF_SNA = 0x16 AF_TIPC = 0x1e AF_UNIX = 0x1 @@ -129,6 +130,7 @@ const ( ARPHRD_TUNNEL = 0x300 ARPHRD_TUNNEL6 = 0x301 ARPHRD_VOID = 0xffff + ARPHRD_VSOCKMON = 0x33a ARPHRD_X25 = 0x10f B0 = 0x0 B1000000 = 0x1008 @@ -392,6 +394,7 @@ const ( ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 ETH_P_HSR = 0x892f + ETH_P_IBOE = 0x8915 ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -453,6 +456,8 @@ const ( FF1 = 0x8000 FFDLY = 0x8000 FLUSHO = 0x1000 + FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 + FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 @@ -657,8 +662,10 @@ const ( IPV6_2292PKTOPTIONS = 0x6 IPV6_2292RTHDR = 0x5 IPV6_ADDRFORM = 0x1 + IPV6_ADDR_PREFERENCES = 0x48 IPV6_ADD_MEMBERSHIP = 0x14 IPV6_AUTHHDR = 0xa + IPV6_AUTOFLOWLABEL = 0x46 IPV6_CHECKSUM = 0x7 IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 @@ -671,12 +678,14 @@ const ( IPV6_JOIN_GROUP = 0x14 IPV6_LEAVE_ANYCAST = 0x1c IPV6_LEAVE_GROUP = 0x15 + IPV6_MINHOPCOUNT = 0x49 IPV6_MTU = 0x18 IPV6_MTU_DISCOVER = 0x17 IPV6_MULTICAST_HOPS = 0x12 IPV6_MULTICAST_IF = 0x11 IPV6_MULTICAST_LOOP = 0x13 IPV6_NEXTHOP = 0x9 + IPV6_ORIGDSTADDR = 0x4a IPV6_PATHMTU = 0x3d IPV6_PKTINFO = 0x32 IPV6_PMTUDISC_DO = 0x2 @@ -687,8 +696,10 @@ const ( IPV6_PMTUDISC_WANT = 0x1 IPV6_RECVDSTOPTS = 0x3a IPV6_RECVERR = 0x19 + IPV6_RECVFRAGSIZE = 0x4d IPV6_RECVHOPLIMIT = 0x33 IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVORIGDSTADDR = 0x4a IPV6_RECVPATHMTU = 0x3c IPV6_RECVPKTINFO = 0x31 IPV6_RECVRTHDR = 0x38 @@ -702,7 +713,9 @@ const ( IPV6_RXDSTOPTS = 0x3b IPV6_RXHOPOPTS = 0x36 IPV6_TCLASS = 0x43 + IPV6_TRANSPARENT = 0x4b IPV6_UNICAST_HOPS = 0x10 + IPV6_UNICAST_IF = 0x4c IPV6_V6ONLY = 0x1a IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 @@ -745,6 +758,7 @@ const ( IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 IP_RECVERR = 0xb + IP_RECVFRAGSIZE = 0x19 IP_RECVOPTS = 0x6 IP_RECVORIGDSTADDR = 0x14 IP_RECVRETOPTS = 0x7 @@ -782,6 +796,7 @@ const ( KEYCTL_NEGATE = 0xd KEYCTL_READ = 0xb KEYCTL_REJECT = 0x13 + KEYCTL_RESTRICT_KEYRING = 0x1d KEYCTL_REVOKE = 0x3 KEYCTL_SEARCH = 0xa KEYCTL_SESSION_TO_PARENT = 0x12 @@ -914,6 +929,7 @@ const ( MS_SILENT = 0x8000 MS_SLAVE = 0x80000 MS_STRICTATIME = 0x1000000 + MS_SUBMOUNT = 0x4000000 MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 @@ -928,6 +944,7 @@ const ( NETLINK_DNRTMSG = 0xe NETLINK_DROP_MEMBERSHIP = 0x2 NETLINK_ECRYPTFS = 0x13 + NETLINK_EXT_ACK = 0xb NETLINK_FIB_LOOKUP = 0xa NETLINK_FIREWALL = 0x3 NETLINK_GENERIC = 0x10 @@ -946,6 +963,7 @@ const ( NETLINK_RX_RING = 0x6 NETLINK_SCSITRANSPORT = 0x12 NETLINK_SELINUX = 0x7 + NETLINK_SMC = 0x16 NETLINK_SOCK_DIAG = 0x4 NETLINK_TX_RING = 0x7 NETLINK_UNUSED = 0x1 @@ -966,8 +984,10 @@ const ( NLMSG_NOOP = 0x1 NLMSG_OVERRUN = 0x4 NLM_F_ACK = 0x4 + NLM_F_ACK_TLVS = 0x200 NLM_F_APPEND = 0x800 NLM_F_ATOMIC = 0x400 + NLM_F_CAPPED = 0x100 NLM_F_CREATE = 0x400 NLM_F_DUMP = 0x300 NLM_F_DUMP_FILTERED = 0x20 @@ -1024,6 +1044,7 @@ const ( PACKET_FANOUT_EBPF = 0x7 PACKET_FANOUT_FLAG_DEFRAG = 0x8000 PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 PACKET_FANOUT_HASH = 0x0 PACKET_FANOUT_LB = 0x1 PACKET_FANOUT_QM = 0x5 @@ -1286,7 +1307,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x1a RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1330,6 +1351,7 @@ const ( RTM_DELLINK = 0x11 RTM_DELMDB = 0x55 RTM_DELNEIGH = 0x1d + RTM_DELNETCONF = 0x51 RTM_DELNSID = 0x59 RTM_DELQDISC = 0x25 RTM_DELROUTE = 0x19 @@ -1338,6 +1360,7 @@ const ( RTM_DELTFILTER = 0x2d RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 + RTM_F_FIB_MATCH = 0x2000 RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_PREFIX = 0x800 @@ -1359,10 +1382,11 @@ const ( RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x63 RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 + RTM_NEWCACHEREPORT = 0x60 RTM_NEWLINK = 0x10 RTM_NEWMDB = 0x54 RTM_NEWNDUSEROPT = 0x44 @@ -1377,8 +1401,8 @@ const ( RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x15 + RTM_NR_MSGTYPES = 0x54 RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 @@ -1389,6 +1413,7 @@ const ( RTNH_F_OFFLOAD = 0x8 RTNH_F_ONLINK = 0x4 RTNH_F_PERVASIVE = 0x2 + RTNH_F_UNRESOLVED = 0x20 RTN_MAX = 0xb RTPROT_BABEL = 0x2a RTPROT_BIRD = 0xc @@ -1419,6 +1444,7 @@ const ( SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_WIFI_STATUS = 0x29 SECCOMP_MODE_DISABLED = 0x0 @@ -1557,6 +1583,7 @@ const ( SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 SO_DEBUG = 0x1 SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b @@ -1565,11 +1592,13 @@ const ( SO_ERROR = 0x4 SO_GET_FILTER = 0x1a SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 SO_NOFCS = 0x2b SO_NO_CHECK = 0xb SO_OOBINLINE = 0xa @@ -1577,6 +1606,7 @@ const ( SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x11 + SO_PEERGROUPS = 0x3b SO_PEERNAME = 0x1c SO_PEERSEC = 0x1f SO_PRIORITY = 0xc @@ -1673,6 +1703,7 @@ const ( TCP_CORK = 0x3 TCP_DEFER_ACCEPT = 0x9 TCP_FASTOPEN = 0x17 + TCP_FASTOPEN_CONNECT = 0x1e TCP_INFO = 0xb TCP_KEEPCNT = 0x6 TCP_KEEPIDLE = 0x4 @@ -1732,6 +1763,7 @@ const ( TIOCGPKT = 0x80045438 TIOCGPTLCK = 0x80045439 TIOCGPTN = 0x80045430 + TIOCGPTPEER = 0x5441 TIOCGRS485 = 0x542e TIOCGSERIAL = 0x541e TIOCGSID = 0x5429 @@ -2024,7 +2056,6 @@ const ( SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) - SIGUNUSED = syscall.Signal(0x1f) SIGURG = syscall.Signal(0x17) SIGUSR1 = syscall.Signal(0xa) SIGUSR2 = syscall.Signal(0xc) diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go index c0ecd47c2..383453349 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go @@ -36,7 +36,7 @@ const ( AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b + AF_MAX = 0x2c AF_MPLS = 0x1c AF_NETBEUI = 0xd AF_NETLINK = 0x10 @@ -51,6 +51,7 @@ const ( AF_ROUTE = 0x10 AF_RXRPC = 0x21 AF_SECURITY = 0xe + AF_SMC = 0x2b AF_SNA = 0x16 AF_TIPC = 0x1e AF_UNIX = 0x1 @@ -129,6 +130,7 @@ const ( ARPHRD_TUNNEL = 0x300 ARPHRD_TUNNEL6 = 0x301 ARPHRD_VOID = 0xffff + ARPHRD_VSOCKMON = 0x33a ARPHRD_X25 = 0x10f B0 = 0x0 B1000000 = 0x1008 @@ -393,6 +395,7 @@ const ( ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 ETH_P_HSR = 0x892f + ETH_P_IBOE = 0x8915 ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -441,6 +444,7 @@ const ( EXTA = 0xe EXTB = 0xf EXTPROC = 0x10000 + EXTRA_MAGIC = 0x45585401 FALLOC_FL_COLLAPSE_RANGE = 0x8 FALLOC_FL_INSERT_RANGE = 0x20 FALLOC_FL_KEEP_SIZE = 0x1 @@ -454,6 +458,8 @@ const ( FF1 = 0x8000 FFDLY = 0x8000 FLUSHO = 0x1000 + FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 + FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 @@ -658,8 +664,10 @@ const ( IPV6_2292PKTOPTIONS = 0x6 IPV6_2292RTHDR = 0x5 IPV6_ADDRFORM = 0x1 + IPV6_ADDR_PREFERENCES = 0x48 IPV6_ADD_MEMBERSHIP = 0x14 IPV6_AUTHHDR = 0xa + IPV6_AUTOFLOWLABEL = 0x46 IPV6_CHECKSUM = 0x7 IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 @@ -672,12 +680,14 @@ const ( IPV6_JOIN_GROUP = 0x14 IPV6_LEAVE_ANYCAST = 0x1c IPV6_LEAVE_GROUP = 0x15 + IPV6_MINHOPCOUNT = 0x49 IPV6_MTU = 0x18 IPV6_MTU_DISCOVER = 0x17 IPV6_MULTICAST_HOPS = 0x12 IPV6_MULTICAST_IF = 0x11 IPV6_MULTICAST_LOOP = 0x13 IPV6_NEXTHOP = 0x9 + IPV6_ORIGDSTADDR = 0x4a IPV6_PATHMTU = 0x3d IPV6_PKTINFO = 0x32 IPV6_PMTUDISC_DO = 0x2 @@ -688,8 +698,10 @@ const ( IPV6_PMTUDISC_WANT = 0x1 IPV6_RECVDSTOPTS = 0x3a IPV6_RECVERR = 0x19 + IPV6_RECVFRAGSIZE = 0x4d IPV6_RECVHOPLIMIT = 0x33 IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVORIGDSTADDR = 0x4a IPV6_RECVPATHMTU = 0x3c IPV6_RECVPKTINFO = 0x31 IPV6_RECVRTHDR = 0x38 @@ -703,7 +715,9 @@ const ( IPV6_RXDSTOPTS = 0x3b IPV6_RXHOPOPTS = 0x36 IPV6_TCLASS = 0x43 + IPV6_TRANSPARENT = 0x4b IPV6_UNICAST_HOPS = 0x10 + IPV6_UNICAST_IF = 0x4c IPV6_V6ONLY = 0x1a IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 @@ -746,6 +760,7 @@ const ( IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 IP_RECVERR = 0xb + IP_RECVFRAGSIZE = 0x19 IP_RECVOPTS = 0x6 IP_RECVORIGDSTADDR = 0x14 IP_RECVRETOPTS = 0x7 @@ -783,6 +798,7 @@ const ( KEYCTL_NEGATE = 0xd KEYCTL_READ = 0xb KEYCTL_REJECT = 0x13 + KEYCTL_RESTRICT_KEYRING = 0x1d KEYCTL_REVOKE = 0x3 KEYCTL_SEARCH = 0xa KEYCTL_SESSION_TO_PARENT = 0x12 @@ -915,6 +931,7 @@ const ( MS_SILENT = 0x8000 MS_SLAVE = 0x80000 MS_STRICTATIME = 0x1000000 + MS_SUBMOUNT = 0x4000000 MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 @@ -929,6 +946,7 @@ const ( NETLINK_DNRTMSG = 0xe NETLINK_DROP_MEMBERSHIP = 0x2 NETLINK_ECRYPTFS = 0x13 + NETLINK_EXT_ACK = 0xb NETLINK_FIB_LOOKUP = 0xa NETLINK_FIREWALL = 0x3 NETLINK_GENERIC = 0x10 @@ -947,6 +965,7 @@ const ( NETLINK_RX_RING = 0x6 NETLINK_SCSITRANSPORT = 0x12 NETLINK_SELINUX = 0x7 + NETLINK_SMC = 0x16 NETLINK_SOCK_DIAG = 0x4 NETLINK_TX_RING = 0x7 NETLINK_UNUSED = 0x1 @@ -967,8 +986,10 @@ const ( NLMSG_NOOP = 0x1 NLMSG_OVERRUN = 0x4 NLM_F_ACK = 0x4 + NLM_F_ACK_TLVS = 0x200 NLM_F_APPEND = 0x800 NLM_F_ATOMIC = 0x400 + NLM_F_CAPPED = 0x100 NLM_F_CREATE = 0x400 NLM_F_DUMP = 0x300 NLM_F_DUMP_FILTERED = 0x20 @@ -1025,6 +1046,7 @@ const ( PACKET_FANOUT_EBPF = 0x7 PACKET_FANOUT_FLAG_DEFRAG = 0x8000 PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 PACKET_FANOUT_HASH = 0x0 PACKET_FANOUT_LB = 0x1 PACKET_FANOUT_QM = 0x5 @@ -1271,7 +1293,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x1a RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1315,6 +1337,7 @@ const ( RTM_DELLINK = 0x11 RTM_DELMDB = 0x55 RTM_DELNEIGH = 0x1d + RTM_DELNETCONF = 0x51 RTM_DELNSID = 0x59 RTM_DELQDISC = 0x25 RTM_DELROUTE = 0x19 @@ -1323,6 +1346,7 @@ const ( RTM_DELTFILTER = 0x2d RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 + RTM_F_FIB_MATCH = 0x2000 RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_PREFIX = 0x800 @@ -1344,10 +1368,11 @@ const ( RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x63 RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 + RTM_NEWCACHEREPORT = 0x60 RTM_NEWLINK = 0x10 RTM_NEWMDB = 0x54 RTM_NEWNDUSEROPT = 0x44 @@ -1362,8 +1387,8 @@ const ( RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x15 + RTM_NR_MSGTYPES = 0x54 RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 @@ -1374,6 +1399,7 @@ const ( RTNH_F_OFFLOAD = 0x8 RTNH_F_ONLINK = 0x4 RTNH_F_PERVASIVE = 0x2 + RTNH_F_UNRESOLVED = 0x20 RTN_MAX = 0xb RTPROT_BABEL = 0x2a RTPROT_BIRD = 0xc @@ -1404,6 +1430,7 @@ const ( SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_WIFI_STATUS = 0x29 SECCOMP_MODE_DISABLED = 0x0 @@ -1542,6 +1569,7 @@ const ( SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 SO_DEBUG = 0x1 SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b @@ -1550,11 +1578,13 @@ const ( SO_ERROR = 0x4 SO_GET_FILTER = 0x1a SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 SO_NOFCS = 0x2b SO_NO_CHECK = 0xb SO_OOBINLINE = 0xa @@ -1562,6 +1592,7 @@ const ( SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x11 + SO_PEERGROUPS = 0x3b SO_PEERNAME = 0x1c SO_PEERSEC = 0x1f SO_PRIORITY = 0xc @@ -1658,6 +1689,7 @@ const ( TCP_CORK = 0x3 TCP_DEFER_ACCEPT = 0x9 TCP_FASTOPEN = 0x17 + TCP_FASTOPEN_CONNECT = 0x1e TCP_INFO = 0xb TCP_KEEPCNT = 0x6 TCP_KEEPIDLE = 0x4 @@ -1717,6 +1749,7 @@ const ( TIOCGPKT = 0x80045438 TIOCGPTLCK = 0x80045439 TIOCGPTN = 0x80045430 + TIOCGPTPEER = 0x5441 TIOCGRS485 = 0x542e TIOCGSERIAL = 0x541e TIOCGSID = 0x5429 @@ -2009,7 +2042,6 @@ const ( SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) - SIGUNUSED = syscall.Signal(0x1f) SIGURG = syscall.Signal(0x17) SIGUSR1 = syscall.Signal(0xa) SIGUSR2 = syscall.Signal(0xc) diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go index 900f568af..bde8f7d02 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go @@ -36,7 +36,7 @@ const ( AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b + AF_MAX = 0x2c AF_MPLS = 0x1c AF_NETBEUI = 0xd AF_NETLINK = 0x10 @@ -51,6 +51,7 @@ const ( AF_ROUTE = 0x10 AF_RXRPC = 0x21 AF_SECURITY = 0xe + AF_SMC = 0x2b AF_SNA = 0x16 AF_TIPC = 0x1e AF_UNIX = 0x1 @@ -129,6 +130,7 @@ const ( ARPHRD_TUNNEL = 0x300 ARPHRD_TUNNEL6 = 0x301 ARPHRD_VOID = 0xffff + ARPHRD_VSOCKMON = 0x33a ARPHRD_X25 = 0x10f B0 = 0x0 B1000000 = 0x1008 @@ -392,6 +394,7 @@ const ( ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 ETH_P_HSR = 0x892f + ETH_P_IBOE = 0x8915 ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -453,6 +456,8 @@ const ( FF1 = 0x8000 FFDLY = 0x8000 FLUSHO = 0x2000 + FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 + FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 @@ -657,8 +662,10 @@ const ( IPV6_2292PKTOPTIONS = 0x6 IPV6_2292RTHDR = 0x5 IPV6_ADDRFORM = 0x1 + IPV6_ADDR_PREFERENCES = 0x48 IPV6_ADD_MEMBERSHIP = 0x14 IPV6_AUTHHDR = 0xa + IPV6_AUTOFLOWLABEL = 0x46 IPV6_CHECKSUM = 0x7 IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 @@ -671,12 +678,14 @@ const ( IPV6_JOIN_GROUP = 0x14 IPV6_LEAVE_ANYCAST = 0x1c IPV6_LEAVE_GROUP = 0x15 + IPV6_MINHOPCOUNT = 0x49 IPV6_MTU = 0x18 IPV6_MTU_DISCOVER = 0x17 IPV6_MULTICAST_HOPS = 0x12 IPV6_MULTICAST_IF = 0x11 IPV6_MULTICAST_LOOP = 0x13 IPV6_NEXTHOP = 0x9 + IPV6_ORIGDSTADDR = 0x4a IPV6_PATHMTU = 0x3d IPV6_PKTINFO = 0x32 IPV6_PMTUDISC_DO = 0x2 @@ -687,8 +696,10 @@ const ( IPV6_PMTUDISC_WANT = 0x1 IPV6_RECVDSTOPTS = 0x3a IPV6_RECVERR = 0x19 + IPV6_RECVFRAGSIZE = 0x4d IPV6_RECVHOPLIMIT = 0x33 IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVORIGDSTADDR = 0x4a IPV6_RECVPATHMTU = 0x3c IPV6_RECVPKTINFO = 0x31 IPV6_RECVRTHDR = 0x38 @@ -702,7 +713,9 @@ const ( IPV6_RXDSTOPTS = 0x3b IPV6_RXHOPOPTS = 0x36 IPV6_TCLASS = 0x43 + IPV6_TRANSPARENT = 0x4b IPV6_UNICAST_HOPS = 0x10 + IPV6_UNICAST_IF = 0x4c IPV6_V6ONLY = 0x1a IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 @@ -745,6 +758,7 @@ const ( IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 IP_RECVERR = 0xb + IP_RECVFRAGSIZE = 0x19 IP_RECVOPTS = 0x6 IP_RECVORIGDSTADDR = 0x14 IP_RECVRETOPTS = 0x7 @@ -782,6 +796,7 @@ const ( KEYCTL_NEGATE = 0xd KEYCTL_READ = 0xb KEYCTL_REJECT = 0x13 + KEYCTL_RESTRICT_KEYRING = 0x1d KEYCTL_REVOKE = 0x3 KEYCTL_SEARCH = 0xa KEYCTL_SESSION_TO_PARENT = 0x12 @@ -915,6 +930,7 @@ const ( MS_SILENT = 0x8000 MS_SLAVE = 0x80000 MS_STRICTATIME = 0x1000000 + MS_SUBMOUNT = 0x4000000 MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 @@ -929,6 +945,7 @@ const ( NETLINK_DNRTMSG = 0xe NETLINK_DROP_MEMBERSHIP = 0x2 NETLINK_ECRYPTFS = 0x13 + NETLINK_EXT_ACK = 0xb NETLINK_FIB_LOOKUP = 0xa NETLINK_FIREWALL = 0x3 NETLINK_GENERIC = 0x10 @@ -947,6 +964,7 @@ const ( NETLINK_RX_RING = 0x6 NETLINK_SCSITRANSPORT = 0x12 NETLINK_SELINUX = 0x7 + NETLINK_SMC = 0x16 NETLINK_SOCK_DIAG = 0x4 NETLINK_TX_RING = 0x7 NETLINK_UNUSED = 0x1 @@ -967,8 +985,10 @@ const ( NLMSG_NOOP = 0x1 NLMSG_OVERRUN = 0x4 NLM_F_ACK = 0x4 + NLM_F_ACK_TLVS = 0x200 NLM_F_APPEND = 0x800 NLM_F_ATOMIC = 0x400 + NLM_F_CAPPED = 0x100 NLM_F_CREATE = 0x400 NLM_F_DUMP = 0x300 NLM_F_DUMP_FILTERED = 0x20 @@ -1025,6 +1045,7 @@ const ( PACKET_FANOUT_EBPF = 0x7 PACKET_FANOUT_FLAG_DEFRAG = 0x8000 PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 PACKET_FANOUT_HASH = 0x0 PACKET_FANOUT_LB = 0x1 PACKET_FANOUT_QM = 0x5 @@ -1283,7 +1304,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x1a RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1327,6 +1348,7 @@ const ( RTM_DELLINK = 0x11 RTM_DELMDB = 0x55 RTM_DELNEIGH = 0x1d + RTM_DELNETCONF = 0x51 RTM_DELNSID = 0x59 RTM_DELQDISC = 0x25 RTM_DELROUTE = 0x19 @@ -1335,6 +1357,7 @@ const ( RTM_DELTFILTER = 0x2d RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 + RTM_F_FIB_MATCH = 0x2000 RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_PREFIX = 0x800 @@ -1356,10 +1379,11 @@ const ( RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x63 RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 + RTM_NEWCACHEREPORT = 0x60 RTM_NEWLINK = 0x10 RTM_NEWMDB = 0x54 RTM_NEWNDUSEROPT = 0x44 @@ -1374,8 +1398,8 @@ const ( RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x15 + RTM_NR_MSGTYPES = 0x54 RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 @@ -1386,6 +1410,7 @@ const ( RTNH_F_OFFLOAD = 0x8 RTNH_F_ONLINK = 0x4 RTNH_F_PERVASIVE = 0x2 + RTNH_F_UNRESOLVED = 0x20 RTN_MAX = 0xb RTPROT_BABEL = 0x2a RTPROT_BIRD = 0xc @@ -1416,6 +1441,7 @@ const ( SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_WIFI_STATUS = 0x29 SECCOMP_MODE_DISABLED = 0x0 @@ -1554,6 +1580,7 @@ const ( SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 SO_DEBUG = 0x1 SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b @@ -1562,11 +1589,13 @@ const ( SO_ERROR = 0x1007 SO_GET_FILTER = 0x1a SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x8 SO_LINGER = 0x80 SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 SO_NOFCS = 0x2b SO_NO_CHECK = 0xb SO_OOBINLINE = 0x100 @@ -1574,6 +1603,7 @@ const ( SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x12 + SO_PEERGROUPS = 0x3b SO_PEERNAME = 0x1c SO_PEERSEC = 0x1e SO_PRIORITY = 0xc @@ -1670,6 +1700,7 @@ const ( TCP_CORK = 0x3 TCP_DEFER_ACCEPT = 0x9 TCP_FASTOPEN = 0x17 + TCP_FASTOPEN_CONNECT = 0x1e TCP_INFO = 0xb TCP_KEEPCNT = 0x6 TCP_KEEPIDLE = 0x4 @@ -1728,6 +1759,7 @@ const ( TIOCGPKT = 0x40045438 TIOCGPTLCK = 0x40045439 TIOCGPTN = 0x40045430 + TIOCGPTPEER = 0x20005441 TIOCGRS485 = 0x4020542e TIOCGSERIAL = 0x5484 TIOCGSID = 0x7416 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go index 4148f2773..42b6397d5 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go @@ -36,7 +36,7 @@ const ( AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b + AF_MAX = 0x2c AF_MPLS = 0x1c AF_NETBEUI = 0xd AF_NETLINK = 0x10 @@ -51,6 +51,7 @@ const ( AF_ROUTE = 0x10 AF_RXRPC = 0x21 AF_SECURITY = 0xe + AF_SMC = 0x2b AF_SNA = 0x16 AF_TIPC = 0x1e AF_UNIX = 0x1 @@ -129,6 +130,7 @@ const ( ARPHRD_TUNNEL = 0x300 ARPHRD_TUNNEL6 = 0x301 ARPHRD_VOID = 0xffff + ARPHRD_VSOCKMON = 0x33a ARPHRD_X25 = 0x10f B0 = 0x0 B1000000 = 0x1008 @@ -392,6 +394,7 @@ const ( ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 ETH_P_HSR = 0x892f + ETH_P_IBOE = 0x8915 ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -453,6 +456,8 @@ const ( FF1 = 0x8000 FFDLY = 0x8000 FLUSHO = 0x2000 + FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 + FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 @@ -657,8 +662,10 @@ const ( IPV6_2292PKTOPTIONS = 0x6 IPV6_2292RTHDR = 0x5 IPV6_ADDRFORM = 0x1 + IPV6_ADDR_PREFERENCES = 0x48 IPV6_ADD_MEMBERSHIP = 0x14 IPV6_AUTHHDR = 0xa + IPV6_AUTOFLOWLABEL = 0x46 IPV6_CHECKSUM = 0x7 IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 @@ -671,12 +678,14 @@ const ( IPV6_JOIN_GROUP = 0x14 IPV6_LEAVE_ANYCAST = 0x1c IPV6_LEAVE_GROUP = 0x15 + IPV6_MINHOPCOUNT = 0x49 IPV6_MTU = 0x18 IPV6_MTU_DISCOVER = 0x17 IPV6_MULTICAST_HOPS = 0x12 IPV6_MULTICAST_IF = 0x11 IPV6_MULTICAST_LOOP = 0x13 IPV6_NEXTHOP = 0x9 + IPV6_ORIGDSTADDR = 0x4a IPV6_PATHMTU = 0x3d IPV6_PKTINFO = 0x32 IPV6_PMTUDISC_DO = 0x2 @@ -687,8 +696,10 @@ const ( IPV6_PMTUDISC_WANT = 0x1 IPV6_RECVDSTOPTS = 0x3a IPV6_RECVERR = 0x19 + IPV6_RECVFRAGSIZE = 0x4d IPV6_RECVHOPLIMIT = 0x33 IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVORIGDSTADDR = 0x4a IPV6_RECVPATHMTU = 0x3c IPV6_RECVPKTINFO = 0x31 IPV6_RECVRTHDR = 0x38 @@ -702,7 +713,9 @@ const ( IPV6_RXDSTOPTS = 0x3b IPV6_RXHOPOPTS = 0x36 IPV6_TCLASS = 0x43 + IPV6_TRANSPARENT = 0x4b IPV6_UNICAST_HOPS = 0x10 + IPV6_UNICAST_IF = 0x4c IPV6_V6ONLY = 0x1a IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 @@ -745,6 +758,7 @@ const ( IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 IP_RECVERR = 0xb + IP_RECVFRAGSIZE = 0x19 IP_RECVOPTS = 0x6 IP_RECVORIGDSTADDR = 0x14 IP_RECVRETOPTS = 0x7 @@ -782,6 +796,7 @@ const ( KEYCTL_NEGATE = 0xd KEYCTL_READ = 0xb KEYCTL_REJECT = 0x13 + KEYCTL_RESTRICT_KEYRING = 0x1d KEYCTL_REVOKE = 0x3 KEYCTL_SEARCH = 0xa KEYCTL_SESSION_TO_PARENT = 0x12 @@ -915,6 +930,7 @@ const ( MS_SILENT = 0x8000 MS_SLAVE = 0x80000 MS_STRICTATIME = 0x1000000 + MS_SUBMOUNT = 0x4000000 MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 @@ -929,6 +945,7 @@ const ( NETLINK_DNRTMSG = 0xe NETLINK_DROP_MEMBERSHIP = 0x2 NETLINK_ECRYPTFS = 0x13 + NETLINK_EXT_ACK = 0xb NETLINK_FIB_LOOKUP = 0xa NETLINK_FIREWALL = 0x3 NETLINK_GENERIC = 0x10 @@ -947,6 +964,7 @@ const ( NETLINK_RX_RING = 0x6 NETLINK_SCSITRANSPORT = 0x12 NETLINK_SELINUX = 0x7 + NETLINK_SMC = 0x16 NETLINK_SOCK_DIAG = 0x4 NETLINK_TX_RING = 0x7 NETLINK_UNUSED = 0x1 @@ -967,8 +985,10 @@ const ( NLMSG_NOOP = 0x1 NLMSG_OVERRUN = 0x4 NLM_F_ACK = 0x4 + NLM_F_ACK_TLVS = 0x200 NLM_F_APPEND = 0x800 NLM_F_ATOMIC = 0x400 + NLM_F_CAPPED = 0x100 NLM_F_CREATE = 0x400 NLM_F_DUMP = 0x300 NLM_F_DUMP_FILTERED = 0x20 @@ -1025,6 +1045,7 @@ const ( PACKET_FANOUT_EBPF = 0x7 PACKET_FANOUT_FLAG_DEFRAG = 0x8000 PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 PACKET_FANOUT_HASH = 0x0 PACKET_FANOUT_LB = 0x1 PACKET_FANOUT_QM = 0x5 @@ -1283,7 +1304,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x1a RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1327,6 +1348,7 @@ const ( RTM_DELLINK = 0x11 RTM_DELMDB = 0x55 RTM_DELNEIGH = 0x1d + RTM_DELNETCONF = 0x51 RTM_DELNSID = 0x59 RTM_DELQDISC = 0x25 RTM_DELROUTE = 0x19 @@ -1335,6 +1357,7 @@ const ( RTM_DELTFILTER = 0x2d RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 + RTM_F_FIB_MATCH = 0x2000 RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_PREFIX = 0x800 @@ -1356,10 +1379,11 @@ const ( RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x63 RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 + RTM_NEWCACHEREPORT = 0x60 RTM_NEWLINK = 0x10 RTM_NEWMDB = 0x54 RTM_NEWNDUSEROPT = 0x44 @@ -1374,8 +1398,8 @@ const ( RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x15 + RTM_NR_MSGTYPES = 0x54 RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 @@ -1386,6 +1410,7 @@ const ( RTNH_F_OFFLOAD = 0x8 RTNH_F_ONLINK = 0x4 RTNH_F_PERVASIVE = 0x2 + RTNH_F_UNRESOLVED = 0x20 RTN_MAX = 0xb RTPROT_BABEL = 0x2a RTPROT_BIRD = 0xc @@ -1416,6 +1441,7 @@ const ( SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_WIFI_STATUS = 0x29 SECCOMP_MODE_DISABLED = 0x0 @@ -1554,6 +1580,7 @@ const ( SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 SO_DEBUG = 0x1 SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b @@ -1562,11 +1589,13 @@ const ( SO_ERROR = 0x1007 SO_GET_FILTER = 0x1a SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x8 SO_LINGER = 0x80 SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 SO_NOFCS = 0x2b SO_NO_CHECK = 0xb SO_OOBINLINE = 0x100 @@ -1574,6 +1603,7 @@ const ( SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x12 + SO_PEERGROUPS = 0x3b SO_PEERNAME = 0x1c SO_PEERSEC = 0x1e SO_PRIORITY = 0xc @@ -1670,6 +1700,7 @@ const ( TCP_CORK = 0x3 TCP_DEFER_ACCEPT = 0x9 TCP_FASTOPEN = 0x17 + TCP_FASTOPEN_CONNECT = 0x1e TCP_INFO = 0xb TCP_KEEPCNT = 0x6 TCP_KEEPIDLE = 0x4 @@ -1728,6 +1759,7 @@ const ( TIOCGPKT = 0x40045438 TIOCGPTLCK = 0x40045439 TIOCGPTN = 0x40045430 + TIOCGPTPEER = 0x20005441 TIOCGRS485 = 0x4020542e TIOCGSERIAL = 0x5484 TIOCGSID = 0x7416 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go index 2310beebd..bd4ff8147 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go @@ -36,7 +36,7 @@ const ( AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b + AF_MAX = 0x2c AF_MPLS = 0x1c AF_NETBEUI = 0xd AF_NETLINK = 0x10 @@ -51,6 +51,7 @@ const ( AF_ROUTE = 0x10 AF_RXRPC = 0x21 AF_SECURITY = 0xe + AF_SMC = 0x2b AF_SNA = 0x16 AF_TIPC = 0x1e AF_UNIX = 0x1 @@ -129,6 +130,7 @@ const ( ARPHRD_TUNNEL = 0x300 ARPHRD_TUNNEL6 = 0x301 ARPHRD_VOID = 0xffff + ARPHRD_VSOCKMON = 0x33a ARPHRD_X25 = 0x10f B0 = 0x0 B1000000 = 0x1008 @@ -392,6 +394,7 @@ const ( ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 ETH_P_HSR = 0x892f + ETH_P_IBOE = 0x8915 ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -453,6 +456,8 @@ const ( FF1 = 0x8000 FFDLY = 0x8000 FLUSHO = 0x2000 + FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 + FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 @@ -657,8 +662,10 @@ const ( IPV6_2292PKTOPTIONS = 0x6 IPV6_2292RTHDR = 0x5 IPV6_ADDRFORM = 0x1 + IPV6_ADDR_PREFERENCES = 0x48 IPV6_ADD_MEMBERSHIP = 0x14 IPV6_AUTHHDR = 0xa + IPV6_AUTOFLOWLABEL = 0x46 IPV6_CHECKSUM = 0x7 IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 @@ -671,12 +678,14 @@ const ( IPV6_JOIN_GROUP = 0x14 IPV6_LEAVE_ANYCAST = 0x1c IPV6_LEAVE_GROUP = 0x15 + IPV6_MINHOPCOUNT = 0x49 IPV6_MTU = 0x18 IPV6_MTU_DISCOVER = 0x17 IPV6_MULTICAST_HOPS = 0x12 IPV6_MULTICAST_IF = 0x11 IPV6_MULTICAST_LOOP = 0x13 IPV6_NEXTHOP = 0x9 + IPV6_ORIGDSTADDR = 0x4a IPV6_PATHMTU = 0x3d IPV6_PKTINFO = 0x32 IPV6_PMTUDISC_DO = 0x2 @@ -687,8 +696,10 @@ const ( IPV6_PMTUDISC_WANT = 0x1 IPV6_RECVDSTOPTS = 0x3a IPV6_RECVERR = 0x19 + IPV6_RECVFRAGSIZE = 0x4d IPV6_RECVHOPLIMIT = 0x33 IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVORIGDSTADDR = 0x4a IPV6_RECVPATHMTU = 0x3c IPV6_RECVPKTINFO = 0x31 IPV6_RECVRTHDR = 0x38 @@ -702,7 +713,9 @@ const ( IPV6_RXDSTOPTS = 0x3b IPV6_RXHOPOPTS = 0x36 IPV6_TCLASS = 0x43 + IPV6_TRANSPARENT = 0x4b IPV6_UNICAST_HOPS = 0x10 + IPV6_UNICAST_IF = 0x4c IPV6_V6ONLY = 0x1a IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 @@ -745,6 +758,7 @@ const ( IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 IP_RECVERR = 0xb + IP_RECVFRAGSIZE = 0x19 IP_RECVOPTS = 0x6 IP_RECVORIGDSTADDR = 0x14 IP_RECVRETOPTS = 0x7 @@ -782,6 +796,7 @@ const ( KEYCTL_NEGATE = 0xd KEYCTL_READ = 0xb KEYCTL_REJECT = 0x13 + KEYCTL_RESTRICT_KEYRING = 0x1d KEYCTL_REVOKE = 0x3 KEYCTL_SEARCH = 0xa KEYCTL_SESSION_TO_PARENT = 0x12 @@ -915,6 +930,7 @@ const ( MS_SILENT = 0x8000 MS_SLAVE = 0x80000 MS_STRICTATIME = 0x1000000 + MS_SUBMOUNT = 0x4000000 MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 @@ -929,6 +945,7 @@ const ( NETLINK_DNRTMSG = 0xe NETLINK_DROP_MEMBERSHIP = 0x2 NETLINK_ECRYPTFS = 0x13 + NETLINK_EXT_ACK = 0xb NETLINK_FIB_LOOKUP = 0xa NETLINK_FIREWALL = 0x3 NETLINK_GENERIC = 0x10 @@ -947,6 +964,7 @@ const ( NETLINK_RX_RING = 0x6 NETLINK_SCSITRANSPORT = 0x12 NETLINK_SELINUX = 0x7 + NETLINK_SMC = 0x16 NETLINK_SOCK_DIAG = 0x4 NETLINK_TX_RING = 0x7 NETLINK_UNUSED = 0x1 @@ -967,8 +985,10 @@ const ( NLMSG_NOOP = 0x1 NLMSG_OVERRUN = 0x4 NLM_F_ACK = 0x4 + NLM_F_ACK_TLVS = 0x200 NLM_F_APPEND = 0x800 NLM_F_ATOMIC = 0x400 + NLM_F_CAPPED = 0x100 NLM_F_CREATE = 0x400 NLM_F_DUMP = 0x300 NLM_F_DUMP_FILTERED = 0x20 @@ -1025,6 +1045,7 @@ const ( PACKET_FANOUT_EBPF = 0x7 PACKET_FANOUT_FLAG_DEFRAG = 0x8000 PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 PACKET_FANOUT_HASH = 0x0 PACKET_FANOUT_LB = 0x1 PACKET_FANOUT_QM = 0x5 @@ -1283,7 +1304,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x1a RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1327,6 +1348,7 @@ const ( RTM_DELLINK = 0x11 RTM_DELMDB = 0x55 RTM_DELNEIGH = 0x1d + RTM_DELNETCONF = 0x51 RTM_DELNSID = 0x59 RTM_DELQDISC = 0x25 RTM_DELROUTE = 0x19 @@ -1335,6 +1357,7 @@ const ( RTM_DELTFILTER = 0x2d RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 + RTM_F_FIB_MATCH = 0x2000 RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_PREFIX = 0x800 @@ -1356,10 +1379,11 @@ const ( RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x63 RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 + RTM_NEWCACHEREPORT = 0x60 RTM_NEWLINK = 0x10 RTM_NEWMDB = 0x54 RTM_NEWNDUSEROPT = 0x44 @@ -1374,8 +1398,8 @@ const ( RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x15 + RTM_NR_MSGTYPES = 0x54 RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 @@ -1386,6 +1410,7 @@ const ( RTNH_F_OFFLOAD = 0x8 RTNH_F_ONLINK = 0x4 RTNH_F_PERVASIVE = 0x2 + RTNH_F_UNRESOLVED = 0x20 RTN_MAX = 0xb RTPROT_BABEL = 0x2a RTPROT_BIRD = 0xc @@ -1416,6 +1441,7 @@ const ( SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_WIFI_STATUS = 0x29 SECCOMP_MODE_DISABLED = 0x0 @@ -1554,6 +1580,7 @@ const ( SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 SO_DEBUG = 0x1 SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b @@ -1562,11 +1589,13 @@ const ( SO_ERROR = 0x1007 SO_GET_FILTER = 0x1a SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x8 SO_LINGER = 0x80 SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 SO_NOFCS = 0x2b SO_NO_CHECK = 0xb SO_OOBINLINE = 0x100 @@ -1574,6 +1603,7 @@ const ( SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x12 + SO_PEERGROUPS = 0x3b SO_PEERNAME = 0x1c SO_PEERSEC = 0x1e SO_PRIORITY = 0xc @@ -1670,6 +1700,7 @@ const ( TCP_CORK = 0x3 TCP_DEFER_ACCEPT = 0x9 TCP_FASTOPEN = 0x17 + TCP_FASTOPEN_CONNECT = 0x1e TCP_INFO = 0xb TCP_KEEPCNT = 0x6 TCP_KEEPIDLE = 0x4 @@ -1728,6 +1759,7 @@ const ( TIOCGPKT = 0x40045438 TIOCGPTLCK = 0x40045439 TIOCGPTN = 0x40045430 + TIOCGPTPEER = 0x20005441 TIOCGRS485 = 0x4020542e TIOCGSERIAL = 0x5484 TIOCGSID = 0x7416 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go index 44191b0c2..6dfc95c40 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go @@ -36,7 +36,7 @@ const ( AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b + AF_MAX = 0x2c AF_MPLS = 0x1c AF_NETBEUI = 0xd AF_NETLINK = 0x10 @@ -51,6 +51,7 @@ const ( AF_ROUTE = 0x10 AF_RXRPC = 0x21 AF_SECURITY = 0xe + AF_SMC = 0x2b AF_SNA = 0x16 AF_TIPC = 0x1e AF_UNIX = 0x1 @@ -129,6 +130,7 @@ const ( ARPHRD_TUNNEL = 0x300 ARPHRD_TUNNEL6 = 0x301 ARPHRD_VOID = 0xffff + ARPHRD_VSOCKMON = 0x33a ARPHRD_X25 = 0x10f B0 = 0x0 B1000000 = 0x1008 @@ -392,6 +394,7 @@ const ( ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 ETH_P_HSR = 0x892f + ETH_P_IBOE = 0x8915 ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -453,6 +456,8 @@ const ( FF1 = 0x8000 FFDLY = 0x8000 FLUSHO = 0x2000 + FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 + FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 @@ -657,8 +662,10 @@ const ( IPV6_2292PKTOPTIONS = 0x6 IPV6_2292RTHDR = 0x5 IPV6_ADDRFORM = 0x1 + IPV6_ADDR_PREFERENCES = 0x48 IPV6_ADD_MEMBERSHIP = 0x14 IPV6_AUTHHDR = 0xa + IPV6_AUTOFLOWLABEL = 0x46 IPV6_CHECKSUM = 0x7 IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 @@ -671,12 +678,14 @@ const ( IPV6_JOIN_GROUP = 0x14 IPV6_LEAVE_ANYCAST = 0x1c IPV6_LEAVE_GROUP = 0x15 + IPV6_MINHOPCOUNT = 0x49 IPV6_MTU = 0x18 IPV6_MTU_DISCOVER = 0x17 IPV6_MULTICAST_HOPS = 0x12 IPV6_MULTICAST_IF = 0x11 IPV6_MULTICAST_LOOP = 0x13 IPV6_NEXTHOP = 0x9 + IPV6_ORIGDSTADDR = 0x4a IPV6_PATHMTU = 0x3d IPV6_PKTINFO = 0x32 IPV6_PMTUDISC_DO = 0x2 @@ -687,8 +696,10 @@ const ( IPV6_PMTUDISC_WANT = 0x1 IPV6_RECVDSTOPTS = 0x3a IPV6_RECVERR = 0x19 + IPV6_RECVFRAGSIZE = 0x4d IPV6_RECVHOPLIMIT = 0x33 IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVORIGDSTADDR = 0x4a IPV6_RECVPATHMTU = 0x3c IPV6_RECVPKTINFO = 0x31 IPV6_RECVRTHDR = 0x38 @@ -702,7 +713,9 @@ const ( IPV6_RXDSTOPTS = 0x3b IPV6_RXHOPOPTS = 0x36 IPV6_TCLASS = 0x43 + IPV6_TRANSPARENT = 0x4b IPV6_UNICAST_HOPS = 0x10 + IPV6_UNICAST_IF = 0x4c IPV6_V6ONLY = 0x1a IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 @@ -745,6 +758,7 @@ const ( IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 IP_RECVERR = 0xb + IP_RECVFRAGSIZE = 0x19 IP_RECVOPTS = 0x6 IP_RECVORIGDSTADDR = 0x14 IP_RECVRETOPTS = 0x7 @@ -782,6 +796,7 @@ const ( KEYCTL_NEGATE = 0xd KEYCTL_READ = 0xb KEYCTL_REJECT = 0x13 + KEYCTL_RESTRICT_KEYRING = 0x1d KEYCTL_REVOKE = 0x3 KEYCTL_SEARCH = 0xa KEYCTL_SESSION_TO_PARENT = 0x12 @@ -915,6 +930,7 @@ const ( MS_SILENT = 0x8000 MS_SLAVE = 0x80000 MS_STRICTATIME = 0x1000000 + MS_SUBMOUNT = 0x4000000 MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 @@ -929,6 +945,7 @@ const ( NETLINK_DNRTMSG = 0xe NETLINK_DROP_MEMBERSHIP = 0x2 NETLINK_ECRYPTFS = 0x13 + NETLINK_EXT_ACK = 0xb NETLINK_FIB_LOOKUP = 0xa NETLINK_FIREWALL = 0x3 NETLINK_GENERIC = 0x10 @@ -947,6 +964,7 @@ const ( NETLINK_RX_RING = 0x6 NETLINK_SCSITRANSPORT = 0x12 NETLINK_SELINUX = 0x7 + NETLINK_SMC = 0x16 NETLINK_SOCK_DIAG = 0x4 NETLINK_TX_RING = 0x7 NETLINK_UNUSED = 0x1 @@ -967,8 +985,10 @@ const ( NLMSG_NOOP = 0x1 NLMSG_OVERRUN = 0x4 NLM_F_ACK = 0x4 + NLM_F_ACK_TLVS = 0x200 NLM_F_APPEND = 0x800 NLM_F_ATOMIC = 0x400 + NLM_F_CAPPED = 0x100 NLM_F_CREATE = 0x400 NLM_F_DUMP = 0x300 NLM_F_DUMP_FILTERED = 0x20 @@ -1025,6 +1045,7 @@ const ( PACKET_FANOUT_EBPF = 0x7 PACKET_FANOUT_FLAG_DEFRAG = 0x8000 PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 PACKET_FANOUT_HASH = 0x0 PACKET_FANOUT_LB = 0x1 PACKET_FANOUT_QM = 0x5 @@ -1283,7 +1304,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x1a RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1327,6 +1348,7 @@ const ( RTM_DELLINK = 0x11 RTM_DELMDB = 0x55 RTM_DELNEIGH = 0x1d + RTM_DELNETCONF = 0x51 RTM_DELNSID = 0x59 RTM_DELQDISC = 0x25 RTM_DELROUTE = 0x19 @@ -1335,6 +1357,7 @@ const ( RTM_DELTFILTER = 0x2d RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 + RTM_F_FIB_MATCH = 0x2000 RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_PREFIX = 0x800 @@ -1356,10 +1379,11 @@ const ( RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x63 RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 + RTM_NEWCACHEREPORT = 0x60 RTM_NEWLINK = 0x10 RTM_NEWMDB = 0x54 RTM_NEWNDUSEROPT = 0x44 @@ -1374,8 +1398,8 @@ const ( RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x15 + RTM_NR_MSGTYPES = 0x54 RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 @@ -1386,6 +1410,7 @@ const ( RTNH_F_OFFLOAD = 0x8 RTNH_F_ONLINK = 0x4 RTNH_F_PERVASIVE = 0x2 + RTNH_F_UNRESOLVED = 0x20 RTN_MAX = 0xb RTPROT_BABEL = 0x2a RTPROT_BIRD = 0xc @@ -1416,6 +1441,7 @@ const ( SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_WIFI_STATUS = 0x29 SECCOMP_MODE_DISABLED = 0x0 @@ -1554,6 +1580,7 @@ const ( SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 SO_DEBUG = 0x1 SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b @@ -1562,11 +1589,13 @@ const ( SO_ERROR = 0x1007 SO_GET_FILTER = 0x1a SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x8 SO_LINGER = 0x80 SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 SO_NOFCS = 0x2b SO_NO_CHECK = 0xb SO_OOBINLINE = 0x100 @@ -1574,6 +1603,7 @@ const ( SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x12 + SO_PEERGROUPS = 0x3b SO_PEERNAME = 0x1c SO_PEERSEC = 0x1e SO_PRIORITY = 0xc @@ -1670,6 +1700,7 @@ const ( TCP_CORK = 0x3 TCP_DEFER_ACCEPT = 0x9 TCP_FASTOPEN = 0x17 + TCP_FASTOPEN_CONNECT = 0x1e TCP_INFO = 0xb TCP_KEEPCNT = 0x6 TCP_KEEPIDLE = 0x4 @@ -1728,6 +1759,7 @@ const ( TIOCGPKT = 0x40045438 TIOCGPTLCK = 0x40045439 TIOCGPTN = 0x40045430 + TIOCGPTPEER = 0x20005441 TIOCGRS485 = 0x4020542e TIOCGSERIAL = 0x5484 TIOCGSID = 0x7416 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go index 6772a59be..46b09d320 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go @@ -36,7 +36,7 @@ const ( AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b + AF_MAX = 0x2c AF_MPLS = 0x1c AF_NETBEUI = 0xd AF_NETLINK = 0x10 @@ -51,6 +51,7 @@ const ( AF_ROUTE = 0x10 AF_RXRPC = 0x21 AF_SECURITY = 0xe + AF_SMC = 0x2b AF_SNA = 0x16 AF_TIPC = 0x1e AF_UNIX = 0x1 @@ -129,6 +130,7 @@ const ( ARPHRD_TUNNEL = 0x300 ARPHRD_TUNNEL6 = 0x301 ARPHRD_VOID = 0xffff + ARPHRD_VSOCKMON = 0x33a ARPHRD_X25 = 0x10f B0 = 0x0 B1000000 = 0x17 @@ -392,6 +394,7 @@ const ( ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 ETH_P_HSR = 0x892f + ETH_P_IBOE = 0x8915 ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -453,6 +456,8 @@ const ( FF1 = 0x4000 FFDLY = 0x4000 FLUSHO = 0x800000 + FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 + FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 @@ -657,8 +662,10 @@ const ( IPV6_2292PKTOPTIONS = 0x6 IPV6_2292RTHDR = 0x5 IPV6_ADDRFORM = 0x1 + IPV6_ADDR_PREFERENCES = 0x48 IPV6_ADD_MEMBERSHIP = 0x14 IPV6_AUTHHDR = 0xa + IPV6_AUTOFLOWLABEL = 0x46 IPV6_CHECKSUM = 0x7 IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 @@ -671,12 +678,14 @@ const ( IPV6_JOIN_GROUP = 0x14 IPV6_LEAVE_ANYCAST = 0x1c IPV6_LEAVE_GROUP = 0x15 + IPV6_MINHOPCOUNT = 0x49 IPV6_MTU = 0x18 IPV6_MTU_DISCOVER = 0x17 IPV6_MULTICAST_HOPS = 0x12 IPV6_MULTICAST_IF = 0x11 IPV6_MULTICAST_LOOP = 0x13 IPV6_NEXTHOP = 0x9 + IPV6_ORIGDSTADDR = 0x4a IPV6_PATHMTU = 0x3d IPV6_PKTINFO = 0x32 IPV6_PMTUDISC_DO = 0x2 @@ -687,8 +696,10 @@ const ( IPV6_PMTUDISC_WANT = 0x1 IPV6_RECVDSTOPTS = 0x3a IPV6_RECVERR = 0x19 + IPV6_RECVFRAGSIZE = 0x4d IPV6_RECVHOPLIMIT = 0x33 IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVORIGDSTADDR = 0x4a IPV6_RECVPATHMTU = 0x3c IPV6_RECVPKTINFO = 0x31 IPV6_RECVRTHDR = 0x38 @@ -702,7 +713,9 @@ const ( IPV6_RXDSTOPTS = 0x3b IPV6_RXHOPOPTS = 0x36 IPV6_TCLASS = 0x43 + IPV6_TRANSPARENT = 0x4b IPV6_UNICAST_HOPS = 0x10 + IPV6_UNICAST_IF = 0x4c IPV6_V6ONLY = 0x1a IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 @@ -745,6 +758,7 @@ const ( IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 IP_RECVERR = 0xb + IP_RECVFRAGSIZE = 0x19 IP_RECVOPTS = 0x6 IP_RECVORIGDSTADDR = 0x14 IP_RECVRETOPTS = 0x7 @@ -782,6 +796,7 @@ const ( KEYCTL_NEGATE = 0xd KEYCTL_READ = 0xb KEYCTL_REJECT = 0x13 + KEYCTL_RESTRICT_KEYRING = 0x1d KEYCTL_REVOKE = 0x3 KEYCTL_SEARCH = 0xa KEYCTL_SESSION_TO_PARENT = 0x12 @@ -914,6 +929,7 @@ const ( MS_SILENT = 0x8000 MS_SLAVE = 0x80000 MS_STRICTATIME = 0x1000000 + MS_SUBMOUNT = 0x4000000 MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 @@ -928,6 +944,7 @@ const ( NETLINK_DNRTMSG = 0xe NETLINK_DROP_MEMBERSHIP = 0x2 NETLINK_ECRYPTFS = 0x13 + NETLINK_EXT_ACK = 0xb NETLINK_FIB_LOOKUP = 0xa NETLINK_FIREWALL = 0x3 NETLINK_GENERIC = 0x10 @@ -946,6 +963,7 @@ const ( NETLINK_RX_RING = 0x6 NETLINK_SCSITRANSPORT = 0x12 NETLINK_SELINUX = 0x7 + NETLINK_SMC = 0x16 NETLINK_SOCK_DIAG = 0x4 NETLINK_TX_RING = 0x7 NETLINK_UNUSED = 0x1 @@ -968,8 +986,10 @@ const ( NLMSG_NOOP = 0x1 NLMSG_OVERRUN = 0x4 NLM_F_ACK = 0x4 + NLM_F_ACK_TLVS = 0x200 NLM_F_APPEND = 0x800 NLM_F_ATOMIC = 0x400 + NLM_F_CAPPED = 0x100 NLM_F_CREATE = 0x400 NLM_F_DUMP = 0x300 NLM_F_DUMP_FILTERED = 0x20 @@ -1026,6 +1046,7 @@ const ( PACKET_FANOUT_EBPF = 0x7 PACKET_FANOUT_FLAG_DEFRAG = 0x8000 PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 PACKET_FANOUT_HASH = 0x0 PACKET_FANOUT_LB = 0x1 PACKET_FANOUT_QM = 0x5 @@ -1339,7 +1360,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x1a RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1383,6 +1404,7 @@ const ( RTM_DELLINK = 0x11 RTM_DELMDB = 0x55 RTM_DELNEIGH = 0x1d + RTM_DELNETCONF = 0x51 RTM_DELNSID = 0x59 RTM_DELQDISC = 0x25 RTM_DELROUTE = 0x19 @@ -1391,6 +1413,7 @@ const ( RTM_DELTFILTER = 0x2d RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 + RTM_F_FIB_MATCH = 0x2000 RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_PREFIX = 0x800 @@ -1412,10 +1435,11 @@ const ( RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x63 RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 + RTM_NEWCACHEREPORT = 0x60 RTM_NEWLINK = 0x10 RTM_NEWMDB = 0x54 RTM_NEWNDUSEROPT = 0x44 @@ -1430,8 +1454,8 @@ const ( RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x15 + RTM_NR_MSGTYPES = 0x54 RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 @@ -1442,6 +1466,7 @@ const ( RTNH_F_OFFLOAD = 0x8 RTNH_F_ONLINK = 0x4 RTNH_F_PERVASIVE = 0x2 + RTNH_F_UNRESOLVED = 0x20 RTN_MAX = 0xb RTPROT_BABEL = 0x2a RTPROT_BIRD = 0xc @@ -1472,6 +1497,7 @@ const ( SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_WIFI_STATUS = 0x29 SECCOMP_MODE_DISABLED = 0x0 @@ -1610,6 +1636,7 @@ const ( SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 SO_DEBUG = 0x1 SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b @@ -1618,11 +1645,13 @@ const ( SO_ERROR = 0x4 SO_GET_FILTER = 0x1a SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 SO_NOFCS = 0x2b SO_NO_CHECK = 0xb SO_OOBINLINE = 0xa @@ -1630,6 +1659,7 @@ const ( SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x15 + SO_PEERGROUPS = 0x3b SO_PEERNAME = 0x1c SO_PEERSEC = 0x1f SO_PRIORITY = 0xc @@ -1724,6 +1754,7 @@ const ( TCP_CORK = 0x3 TCP_DEFER_ACCEPT = 0x9 TCP_FASTOPEN = 0x17 + TCP_FASTOPEN_CONNECT = 0x1e TCP_INFO = 0xb TCP_KEEPCNT = 0x6 TCP_KEEPIDLE = 0x4 @@ -1780,6 +1811,7 @@ const ( TIOCGPKT = 0x40045438 TIOCGPTLCK = 0x40045439 TIOCGPTN = 0x40045430 + TIOCGPTPEER = 0x20005441 TIOCGRS485 = 0x542e TIOCGSERIAL = 0x541e TIOCGSID = 0x5429 @@ -2081,7 +2113,6 @@ const ( SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) - SIGUNUSED = syscall.Signal(0x1f) SIGURG = syscall.Signal(0x17) SIGUSR1 = syscall.Signal(0xa) SIGUSR2 = syscall.Signal(0xc) diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go index ad29c3d3d..08adb1d8f 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go @@ -36,7 +36,7 @@ const ( AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b + AF_MAX = 0x2c AF_MPLS = 0x1c AF_NETBEUI = 0xd AF_NETLINK = 0x10 @@ -51,6 +51,7 @@ const ( AF_ROUTE = 0x10 AF_RXRPC = 0x21 AF_SECURITY = 0xe + AF_SMC = 0x2b AF_SNA = 0x16 AF_TIPC = 0x1e AF_UNIX = 0x1 @@ -129,6 +130,7 @@ const ( ARPHRD_TUNNEL = 0x300 ARPHRD_TUNNEL6 = 0x301 ARPHRD_VOID = 0xffff + ARPHRD_VSOCKMON = 0x33a ARPHRD_X25 = 0x10f B0 = 0x0 B1000000 = 0x17 @@ -392,6 +394,7 @@ const ( ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 ETH_P_HSR = 0x892f + ETH_P_IBOE = 0x8915 ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -453,6 +456,8 @@ const ( FF1 = 0x4000 FFDLY = 0x4000 FLUSHO = 0x800000 + FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 + FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 @@ -657,8 +662,10 @@ const ( IPV6_2292PKTOPTIONS = 0x6 IPV6_2292RTHDR = 0x5 IPV6_ADDRFORM = 0x1 + IPV6_ADDR_PREFERENCES = 0x48 IPV6_ADD_MEMBERSHIP = 0x14 IPV6_AUTHHDR = 0xa + IPV6_AUTOFLOWLABEL = 0x46 IPV6_CHECKSUM = 0x7 IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 @@ -671,12 +678,14 @@ const ( IPV6_JOIN_GROUP = 0x14 IPV6_LEAVE_ANYCAST = 0x1c IPV6_LEAVE_GROUP = 0x15 + IPV6_MINHOPCOUNT = 0x49 IPV6_MTU = 0x18 IPV6_MTU_DISCOVER = 0x17 IPV6_MULTICAST_HOPS = 0x12 IPV6_MULTICAST_IF = 0x11 IPV6_MULTICAST_LOOP = 0x13 IPV6_NEXTHOP = 0x9 + IPV6_ORIGDSTADDR = 0x4a IPV6_PATHMTU = 0x3d IPV6_PKTINFO = 0x32 IPV6_PMTUDISC_DO = 0x2 @@ -687,8 +696,10 @@ const ( IPV6_PMTUDISC_WANT = 0x1 IPV6_RECVDSTOPTS = 0x3a IPV6_RECVERR = 0x19 + IPV6_RECVFRAGSIZE = 0x4d IPV6_RECVHOPLIMIT = 0x33 IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVORIGDSTADDR = 0x4a IPV6_RECVPATHMTU = 0x3c IPV6_RECVPKTINFO = 0x31 IPV6_RECVRTHDR = 0x38 @@ -702,7 +713,9 @@ const ( IPV6_RXDSTOPTS = 0x3b IPV6_RXHOPOPTS = 0x36 IPV6_TCLASS = 0x43 + IPV6_TRANSPARENT = 0x4b IPV6_UNICAST_HOPS = 0x10 + IPV6_UNICAST_IF = 0x4c IPV6_V6ONLY = 0x1a IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 @@ -745,6 +758,7 @@ const ( IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 IP_RECVERR = 0xb + IP_RECVFRAGSIZE = 0x19 IP_RECVOPTS = 0x6 IP_RECVORIGDSTADDR = 0x14 IP_RECVRETOPTS = 0x7 @@ -782,6 +796,7 @@ const ( KEYCTL_NEGATE = 0xd KEYCTL_READ = 0xb KEYCTL_REJECT = 0x13 + KEYCTL_RESTRICT_KEYRING = 0x1d KEYCTL_REVOKE = 0x3 KEYCTL_SEARCH = 0xa KEYCTL_SESSION_TO_PARENT = 0x12 @@ -914,6 +929,7 @@ const ( MS_SILENT = 0x8000 MS_SLAVE = 0x80000 MS_STRICTATIME = 0x1000000 + MS_SUBMOUNT = 0x4000000 MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 @@ -928,6 +944,7 @@ const ( NETLINK_DNRTMSG = 0xe NETLINK_DROP_MEMBERSHIP = 0x2 NETLINK_ECRYPTFS = 0x13 + NETLINK_EXT_ACK = 0xb NETLINK_FIB_LOOKUP = 0xa NETLINK_FIREWALL = 0x3 NETLINK_GENERIC = 0x10 @@ -946,6 +963,7 @@ const ( NETLINK_RX_RING = 0x6 NETLINK_SCSITRANSPORT = 0x12 NETLINK_SELINUX = 0x7 + NETLINK_SMC = 0x16 NETLINK_SOCK_DIAG = 0x4 NETLINK_TX_RING = 0x7 NETLINK_UNUSED = 0x1 @@ -968,8 +986,10 @@ const ( NLMSG_NOOP = 0x1 NLMSG_OVERRUN = 0x4 NLM_F_ACK = 0x4 + NLM_F_ACK_TLVS = 0x200 NLM_F_APPEND = 0x800 NLM_F_ATOMIC = 0x400 + NLM_F_CAPPED = 0x100 NLM_F_CREATE = 0x400 NLM_F_DUMP = 0x300 NLM_F_DUMP_FILTERED = 0x20 @@ -1026,6 +1046,7 @@ const ( PACKET_FANOUT_EBPF = 0x7 PACKET_FANOUT_FLAG_DEFRAG = 0x8000 PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 PACKET_FANOUT_HASH = 0x0 PACKET_FANOUT_LB = 0x1 PACKET_FANOUT_QM = 0x5 @@ -1339,7 +1360,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x1a RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1383,6 +1404,7 @@ const ( RTM_DELLINK = 0x11 RTM_DELMDB = 0x55 RTM_DELNEIGH = 0x1d + RTM_DELNETCONF = 0x51 RTM_DELNSID = 0x59 RTM_DELQDISC = 0x25 RTM_DELROUTE = 0x19 @@ -1391,6 +1413,7 @@ const ( RTM_DELTFILTER = 0x2d RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 + RTM_F_FIB_MATCH = 0x2000 RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_PREFIX = 0x800 @@ -1412,10 +1435,11 @@ const ( RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x63 RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 + RTM_NEWCACHEREPORT = 0x60 RTM_NEWLINK = 0x10 RTM_NEWMDB = 0x54 RTM_NEWNDUSEROPT = 0x44 @@ -1430,8 +1454,8 @@ const ( RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x15 + RTM_NR_MSGTYPES = 0x54 RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 @@ -1442,6 +1466,7 @@ const ( RTNH_F_OFFLOAD = 0x8 RTNH_F_ONLINK = 0x4 RTNH_F_PERVASIVE = 0x2 + RTNH_F_UNRESOLVED = 0x20 RTN_MAX = 0xb RTPROT_BABEL = 0x2a RTPROT_BIRD = 0xc @@ -1472,6 +1497,7 @@ const ( SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_WIFI_STATUS = 0x29 SECCOMP_MODE_DISABLED = 0x0 @@ -1610,6 +1636,7 @@ const ( SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 SO_DEBUG = 0x1 SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b @@ -1618,11 +1645,13 @@ const ( SO_ERROR = 0x4 SO_GET_FILTER = 0x1a SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 SO_NOFCS = 0x2b SO_NO_CHECK = 0xb SO_OOBINLINE = 0xa @@ -1630,6 +1659,7 @@ const ( SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x15 + SO_PEERGROUPS = 0x3b SO_PEERNAME = 0x1c SO_PEERSEC = 0x1f SO_PRIORITY = 0xc @@ -1724,6 +1754,7 @@ const ( TCP_CORK = 0x3 TCP_DEFER_ACCEPT = 0x9 TCP_FASTOPEN = 0x17 + TCP_FASTOPEN_CONNECT = 0x1e TCP_INFO = 0xb TCP_KEEPCNT = 0x6 TCP_KEEPIDLE = 0x4 @@ -1780,6 +1811,7 @@ const ( TIOCGPKT = 0x40045438 TIOCGPTLCK = 0x40045439 TIOCGPTN = 0x40045430 + TIOCGPTPEER = 0x20005441 TIOCGRS485 = 0x542e TIOCGSERIAL = 0x541e TIOCGSID = 0x5429 @@ -2081,7 +2113,6 @@ const ( SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) - SIGUNUSED = syscall.Signal(0x1f) SIGURG = syscall.Signal(0x17) SIGUSR1 = syscall.Signal(0xa) SIGUSR2 = syscall.Signal(0xc) diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go index 3b5707548..70bc1a2fc 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go @@ -36,7 +36,7 @@ const ( AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2b + AF_MAX = 0x2c AF_MPLS = 0x1c AF_NETBEUI = 0xd AF_NETLINK = 0x10 @@ -51,6 +51,7 @@ const ( AF_ROUTE = 0x10 AF_RXRPC = 0x21 AF_SECURITY = 0xe + AF_SMC = 0x2b AF_SNA = 0x16 AF_TIPC = 0x1e AF_UNIX = 0x1 @@ -129,6 +130,7 @@ const ( ARPHRD_TUNNEL = 0x300 ARPHRD_TUNNEL6 = 0x301 ARPHRD_VOID = 0xffff + ARPHRD_VSOCKMON = 0x33a ARPHRD_X25 = 0x10f B0 = 0x0 B1000000 = 0x1008 @@ -392,6 +394,7 @@ const ( ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 ETH_P_HSR = 0x892f + ETH_P_IBOE = 0x8915 ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 @@ -453,6 +456,8 @@ const ( FF1 = 0x8000 FFDLY = 0x8000 FLUSHO = 0x1000 + FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 + FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 @@ -657,8 +662,10 @@ const ( IPV6_2292PKTOPTIONS = 0x6 IPV6_2292RTHDR = 0x5 IPV6_ADDRFORM = 0x1 + IPV6_ADDR_PREFERENCES = 0x48 IPV6_ADD_MEMBERSHIP = 0x14 IPV6_AUTHHDR = 0xa + IPV6_AUTOFLOWLABEL = 0x46 IPV6_CHECKSUM = 0x7 IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 @@ -671,12 +678,14 @@ const ( IPV6_JOIN_GROUP = 0x14 IPV6_LEAVE_ANYCAST = 0x1c IPV6_LEAVE_GROUP = 0x15 + IPV6_MINHOPCOUNT = 0x49 IPV6_MTU = 0x18 IPV6_MTU_DISCOVER = 0x17 IPV6_MULTICAST_HOPS = 0x12 IPV6_MULTICAST_IF = 0x11 IPV6_MULTICAST_LOOP = 0x13 IPV6_NEXTHOP = 0x9 + IPV6_ORIGDSTADDR = 0x4a IPV6_PATHMTU = 0x3d IPV6_PKTINFO = 0x32 IPV6_PMTUDISC_DO = 0x2 @@ -687,8 +696,10 @@ const ( IPV6_PMTUDISC_WANT = 0x1 IPV6_RECVDSTOPTS = 0x3a IPV6_RECVERR = 0x19 + IPV6_RECVFRAGSIZE = 0x4d IPV6_RECVHOPLIMIT = 0x33 IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVORIGDSTADDR = 0x4a IPV6_RECVPATHMTU = 0x3c IPV6_RECVPKTINFO = 0x31 IPV6_RECVRTHDR = 0x38 @@ -702,7 +713,9 @@ const ( IPV6_RXDSTOPTS = 0x3b IPV6_RXHOPOPTS = 0x36 IPV6_TCLASS = 0x43 + IPV6_TRANSPARENT = 0x4b IPV6_UNICAST_HOPS = 0x10 + IPV6_UNICAST_IF = 0x4c IPV6_V6ONLY = 0x1a IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 @@ -745,6 +758,7 @@ const ( IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 IP_RECVERR = 0xb + IP_RECVFRAGSIZE = 0x19 IP_RECVOPTS = 0x6 IP_RECVORIGDSTADDR = 0x14 IP_RECVRETOPTS = 0x7 @@ -782,6 +796,7 @@ const ( KEYCTL_NEGATE = 0xd KEYCTL_READ = 0xb KEYCTL_REJECT = 0x13 + KEYCTL_RESTRICT_KEYRING = 0x1d KEYCTL_REVOKE = 0x3 KEYCTL_SEARCH = 0xa KEYCTL_SESSION_TO_PARENT = 0x12 @@ -914,6 +929,7 @@ const ( MS_SILENT = 0x8000 MS_SLAVE = 0x80000 MS_STRICTATIME = 0x1000000 + MS_SUBMOUNT = 0x4000000 MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 @@ -928,6 +944,7 @@ const ( NETLINK_DNRTMSG = 0xe NETLINK_DROP_MEMBERSHIP = 0x2 NETLINK_ECRYPTFS = 0x13 + NETLINK_EXT_ACK = 0xb NETLINK_FIB_LOOKUP = 0xa NETLINK_FIREWALL = 0x3 NETLINK_GENERIC = 0x10 @@ -946,6 +963,7 @@ const ( NETLINK_RX_RING = 0x6 NETLINK_SCSITRANSPORT = 0x12 NETLINK_SELINUX = 0x7 + NETLINK_SMC = 0x16 NETLINK_SOCK_DIAG = 0x4 NETLINK_TX_RING = 0x7 NETLINK_UNUSED = 0x1 @@ -966,8 +984,10 @@ const ( NLMSG_NOOP = 0x1 NLMSG_OVERRUN = 0x4 NLM_F_ACK = 0x4 + NLM_F_ACK_TLVS = 0x200 NLM_F_APPEND = 0x800 NLM_F_ATOMIC = 0x400 + NLM_F_CAPPED = 0x100 NLM_F_CREATE = 0x400 NLM_F_DUMP = 0x300 NLM_F_DUMP_FILTERED = 0x20 @@ -1024,6 +1044,7 @@ const ( PACKET_FANOUT_EBPF = 0x7 PACKET_FANOUT_FLAG_DEFRAG = 0x8000 PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 PACKET_FANOUT_HASH = 0x0 PACKET_FANOUT_LB = 0x1 PACKET_FANOUT_QM = 0x5 @@ -1343,7 +1364,7 @@ const ( RTAX_UNSPEC = 0x0 RTAX_WINDOW = 0x3 RTA_ALIGNTO = 0x4 - RTA_MAX = 0x19 + RTA_MAX = 0x1a RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 @@ -1387,6 +1408,7 @@ const ( RTM_DELLINK = 0x11 RTM_DELMDB = 0x55 RTM_DELNEIGH = 0x1d + RTM_DELNETCONF = 0x51 RTM_DELNSID = 0x59 RTM_DELQDISC = 0x25 RTM_DELROUTE = 0x19 @@ -1395,6 +1417,7 @@ const ( RTM_DELTFILTER = 0x2d RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 + RTM_F_FIB_MATCH = 0x2000 RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_PREFIX = 0x800 @@ -1416,10 +1439,11 @@ const ( RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x5f + RTM_MAX = 0x63 RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 + RTM_NEWCACHEREPORT = 0x60 RTM_NEWLINK = 0x10 RTM_NEWMDB = 0x54 RTM_NEWNDUSEROPT = 0x44 @@ -1434,8 +1458,8 @@ const ( RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x14 - RTM_NR_MSGTYPES = 0x50 + RTM_NR_FAMILIES = 0x15 + RTM_NR_MSGTYPES = 0x54 RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 @@ -1446,6 +1470,7 @@ const ( RTNH_F_OFFLOAD = 0x8 RTNH_F_ONLINK = 0x4 RTNH_F_PERVASIVE = 0x2 + RTNH_F_UNRESOLVED = 0x20 RTN_MAX = 0xb RTPROT_BABEL = 0x2a RTPROT_BIRD = 0xc @@ -1476,6 +1501,7 @@ const ( SCM_TIMESTAMP = 0x1d SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_WIFI_STATUS = 0x29 SECCOMP_MODE_DISABLED = 0x0 @@ -1614,6 +1640,7 @@ const ( SO_BSDCOMPAT = 0xe SO_BUSY_POLL = 0x2e SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 SO_DEBUG = 0x1 SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b @@ -1622,11 +1649,13 @@ const ( SO_ERROR = 0x4 SO_GET_FILTER = 0x1a SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 SO_NOFCS = 0x2b SO_NO_CHECK = 0xb SO_OOBINLINE = 0xa @@ -1634,6 +1663,7 @@ const ( SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x11 + SO_PEERGROUPS = 0x3b SO_PEERNAME = 0x1c SO_PEERSEC = 0x1f SO_PRIORITY = 0xc @@ -1730,6 +1760,7 @@ const ( TCP_CORK = 0x3 TCP_DEFER_ACCEPT = 0x9 TCP_FASTOPEN = 0x17 + TCP_FASTOPEN_CONNECT = 0x1e TCP_INFO = 0xb TCP_KEEPCNT = 0x6 TCP_KEEPIDLE = 0x4 @@ -1789,6 +1820,7 @@ const ( TIOCGPKT = 0x80045438 TIOCGPTLCK = 0x80045439 TIOCGPTN = 0x80045430 + TIOCGPTPEER = 0x5441 TIOCGRS485 = 0x542e TIOCGSERIAL = 0x541e TIOCGSID = 0x5429 @@ -2081,7 +2113,6 @@ const ( SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) - SIGUNUSED = syscall.Signal(0x1f) SIGURG = syscall.Signal(0x17) SIGUSR1 = syscall.Signal(0xa) SIGUSR2 = syscall.Signal(0xc) diff --git a/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go index 81e83d78f..09eedb009 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go @@ -664,6 +664,8 @@ const ( MS_OLDSYNC = 0x0 MS_SYNC = 0x4 M_FLUSH = 0x86 + NAME_MAX = 0xff + NEWDEV = 0x1 NL0 = 0x0 NL1 = 0x100 NLDLY = 0x100 @@ -672,6 +674,9 @@ const ( OFDEL = 0x80 OFILL = 0x40 OLCUC = 0x2 + OLDDEV = 0x0 + ONBITSMAJOR = 0x7 + ONBITSMINOR = 0x8 ONLCR = 0x4 ONLRET = 0x20 ONOCR = 0x10 @@ -1105,6 +1110,7 @@ const ( VEOL = 0x5 VEOL2 = 0x6 VERASE = 0x2 + VERASE2 = 0x11 VINTR = 0x0 VKILL = 0x3 VLNEXT = 0xf diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go index 38c1bbdf9..000a46833 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go @@ -1446,22 +1446,6 @@ func Mlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Mlockall(flags int) (err error) { _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) if e1 != 0 { @@ -1488,6 +1472,22 @@ func Msync(b []byte, flags int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Munlockall() (err error) { _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go index dc8fe0a84..712dffde4 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go @@ -1446,22 +1446,6 @@ func Mlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Mlockall(flags int) (err error) { _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) if e1 != 0 { @@ -1488,6 +1472,22 @@ func Msync(b []byte, flags int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Munlockall() (err error) { _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go index 4d2804278..338796d90 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go @@ -1446,22 +1446,6 @@ func Mlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Mlockall(flags int) (err error) { _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) if e1 != 0 { @@ -1488,6 +1472,22 @@ func Msync(b []byte, flags int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Munlockall() (err error) { _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go index 20ad4b6c9..fc3006d97 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go @@ -1446,22 +1446,6 @@ func Mlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Mlockall(flags int) (err error) { _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) if e1 != 0 { @@ -1488,6 +1472,22 @@ func Msync(b []byte, flags int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Munlockall() (err error) { _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go index 9f194dc4a..4b0ef2076 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go @@ -1446,22 +1446,6 @@ func Mlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Mlockall(flags int) (err error) { _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) if e1 != 0 { @@ -1488,6 +1472,22 @@ func Msync(b []byte, flags int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Munlockall() (err error) { _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go index 4fde3ef08..31eb98c7d 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go @@ -1446,22 +1446,6 @@ func Mlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Mlockall(flags int) (err error) { _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) if e1 != 0 { @@ -1488,6 +1472,22 @@ func Msync(b []byte, flags int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Munlockall() (err error) { _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go index f6463423c..875ffa33f 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go @@ -1446,22 +1446,6 @@ func Mlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Mlockall(flags int) (err error) { _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) if e1 != 0 { @@ -1488,6 +1472,22 @@ func Msync(b []byte, flags int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Munlockall() (err error) { _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go index 964591e5e..6863e81aa 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go @@ -1446,22 +1446,6 @@ func Mlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Mlockall(flags int) (err error) { _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) if e1 != 0 { @@ -1488,6 +1472,22 @@ func Msync(b []byte, flags int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Munlockall() (err error) { _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go index 204ab1ae3..2a32c6b41 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go @@ -1446,22 +1446,6 @@ func Mlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Mlockall(flags int) (err error) { _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) if e1 != 0 { @@ -1488,6 +1472,22 @@ func Msync(b []byte, flags int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Munlockall() (err error) { _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) if e1 != 0 { @@ -1734,7 +1734,7 @@ func Seek(fd int, offset int64, whence int) (off int64, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { - r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go index a8a2b0b0a..8172d3558 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go @@ -1446,22 +1446,6 @@ func Mlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Mlockall(flags int) (err error) { _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) if e1 != 0 { @@ -1488,6 +1472,22 @@ func Msync(b []byte, flags int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Munlockall() (err error) { _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) if e1 != 0 { @@ -1734,7 +1734,7 @@ func Seek(fd int, offset int64, whence int) (off int64, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { - r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go index b6ff9e392..49021966f 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go @@ -1446,22 +1446,6 @@ func Mlock(b []byte) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Mlockall(flags int) (err error) { _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) if e1 != 0 { @@ -1488,6 +1472,22 @@ func Msync(b []byte, flags int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Munlockall() (err error) { _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go index 4287133d0..98b266550 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go @@ -25,6 +25,9 @@ import ( //go:cgo_import_dynamic libc___xnet_recvmsg __xnet_recvmsg "libsocket.so" //go:cgo_import_dynamic libc___xnet_sendmsg __xnet_sendmsg "libsocket.so" //go:cgo_import_dynamic libc_acct acct "libc.so" +//go:cgo_import_dynamic libc___makedev __makedev "libc.so" +//go:cgo_import_dynamic libc___major __major "libc.so" +//go:cgo_import_dynamic libc___minor __minor "libc.so" //go:cgo_import_dynamic libc_ioctl ioctl "libc.so" //go:cgo_import_dynamic libc_access access "libc.so" //go:cgo_import_dynamic libc_adjtime adjtime "libc.so" @@ -75,6 +78,7 @@ import ( //go:cgo_import_dynamic libc_mlock mlock "libc.so" //go:cgo_import_dynamic libc_mlockall mlockall "libc.so" //go:cgo_import_dynamic libc_mprotect mprotect "libc.so" +//go:cgo_import_dynamic libc_msync msync "libc.so" //go:cgo_import_dynamic libc_munlock munlock "libc.so" //go:cgo_import_dynamic libc_munlockall munlockall "libc.so" //go:cgo_import_dynamic libc_nanosleep nanosleep "libc.so" @@ -129,7 +133,6 @@ import ( //go:cgo_import_dynamic libc_getpeername getpeername "libsocket.so" //go:cgo_import_dynamic libc_setsockopt setsockopt "libsocket.so" //go:cgo_import_dynamic libc_recvfrom recvfrom "libsocket.so" -//go:cgo_import_dynamic libc_sysconf sysconf "libc.so" //go:linkname procpipe libc_pipe //go:linkname procgetsockname libc_getsockname @@ -146,6 +149,9 @@ import ( //go:linkname proc__xnet_recvmsg libc___xnet_recvmsg //go:linkname proc__xnet_sendmsg libc___xnet_sendmsg //go:linkname procacct libc_acct +//go:linkname proc__makedev libc___makedev +//go:linkname proc__major libc___major +//go:linkname proc__minor libc___minor //go:linkname procioctl libc_ioctl //go:linkname procAccess libc_access //go:linkname procAdjtime libc_adjtime @@ -196,6 +202,7 @@ import ( //go:linkname procMlock libc_mlock //go:linkname procMlockall libc_mlockall //go:linkname procMprotect libc_mprotect +//go:linkname procMsync libc_msync //go:linkname procMunlock libc_munlock //go:linkname procMunlockall libc_munlockall //go:linkname procNanosleep libc_nanosleep @@ -250,7 +257,6 @@ import ( //go:linkname procgetpeername libc_getpeername //go:linkname procsetsockopt libc_setsockopt //go:linkname procrecvfrom libc_recvfrom -//go:linkname procsysconf libc_sysconf var ( procpipe, @@ -268,6 +274,9 @@ var ( proc__xnet_recvmsg, proc__xnet_sendmsg, procacct, + proc__makedev, + proc__major, + proc__minor, procioctl, procAccess, procAdjtime, @@ -318,6 +327,7 @@ var ( procMlock, procMlockall, procMprotect, + procMsync, procMunlock, procMunlockall, procNanosleep, @@ -371,8 +381,7 @@ var ( proc__xnet_getsockopt, procgetpeername, procsetsockopt, - procrecvfrom, - procsysconf syscallFunc + procrecvfrom syscallFunc ) func pipe(p *[2]_C_int) (n int, err error) { @@ -522,6 +531,24 @@ func acct(path *byte) (err error) { return } +func __makedev(version int, major uint, minor uint) (val uint64) { + r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&proc__makedev)), 3, uintptr(version), uintptr(major), uintptr(minor), 0, 0, 0) + val = uint64(r0) + return +} + +func __major(version int, dev uint64) (val uint) { + r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&proc__major)), 2, uintptr(version), uintptr(dev), 0, 0, 0, 0) + val = uint(r0) + return +} + +func __minor(version int, dev uint64) (val uint) { + r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&proc__minor)), 2, uintptr(version), uintptr(dev), 0, 0, 0, 0) + val = uint(r0) + return +} + func ioctl(fd int, req uint, arg uintptr) (err error) { _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0) if e1 != 0 { @@ -1020,6 +1047,18 @@ func Mprotect(b []byte, prot int) (err error) { return } +func Msync(b []byte, flags int) (err error) { + var _p0 *byte + if len(b) > 0 { + _p0 = &b[0] + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMsync)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(flags), 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + func Munlock(b []byte) (err error) { var _p0 *byte if len(b) > 0 { @@ -1589,12 +1628,3 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl } return } - -func sysconf(name int) (n int64, err error) { - r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsysconf)), 1, uintptr(name), 0, 0, 0, 0, 0) - n = int64(r0) - if e1 != 0 { - err = e1 - } - return -} diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go similarity index 100% rename from vendor/golang.org/x/sys/unix/zsysctl_openbsd.go rename to vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go new file mode 100644 index 000000000..83bb935b9 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go @@ -0,0 +1,270 @@ +// mksysctl_openbsd.pl +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +package unix + +type mibentry struct { + ctlname string + ctloid []_C_int +} + +var sysctlMib = []mibentry{ + {"ddb.console", []_C_int{9, 6}}, + {"ddb.log", []_C_int{9, 7}}, + {"ddb.max_line", []_C_int{9, 3}}, + {"ddb.max_width", []_C_int{9, 2}}, + {"ddb.panic", []_C_int{9, 5}}, + {"ddb.radix", []_C_int{9, 1}}, + {"ddb.tab_stop_width", []_C_int{9, 4}}, + {"ddb.trigger", []_C_int{9, 8}}, + {"fs.posix.setuid", []_C_int{3, 1, 1}}, + {"hw.allowpowerdown", []_C_int{6, 22}}, + {"hw.byteorder", []_C_int{6, 4}}, + {"hw.cpuspeed", []_C_int{6, 12}}, + {"hw.diskcount", []_C_int{6, 10}}, + {"hw.disknames", []_C_int{6, 8}}, + {"hw.diskstats", []_C_int{6, 9}}, + {"hw.machine", []_C_int{6, 1}}, + {"hw.model", []_C_int{6, 2}}, + {"hw.ncpu", []_C_int{6, 3}}, + {"hw.ncpufound", []_C_int{6, 21}}, + {"hw.pagesize", []_C_int{6, 7}}, + {"hw.physmem", []_C_int{6, 19}}, + {"hw.product", []_C_int{6, 15}}, + {"hw.serialno", []_C_int{6, 17}}, + {"hw.setperf", []_C_int{6, 13}}, + {"hw.usermem", []_C_int{6, 20}}, + {"hw.uuid", []_C_int{6, 18}}, + {"hw.vendor", []_C_int{6, 14}}, + {"hw.version", []_C_int{6, 16}}, + {"kern.arandom", []_C_int{1, 37}}, + {"kern.argmax", []_C_int{1, 8}}, + {"kern.boottime", []_C_int{1, 21}}, + {"kern.bufcachepercent", []_C_int{1, 72}}, + {"kern.ccpu", []_C_int{1, 45}}, + {"kern.clockrate", []_C_int{1, 12}}, + {"kern.consdev", []_C_int{1, 75}}, + {"kern.cp_time", []_C_int{1, 40}}, + {"kern.cp_time2", []_C_int{1, 71}}, + {"kern.cryptodevallowsoft", []_C_int{1, 53}}, + {"kern.domainname", []_C_int{1, 22}}, + {"kern.file", []_C_int{1, 73}}, + {"kern.forkstat", []_C_int{1, 42}}, + {"kern.fscale", []_C_int{1, 46}}, + {"kern.fsync", []_C_int{1, 33}}, + {"kern.hostid", []_C_int{1, 11}}, + {"kern.hostname", []_C_int{1, 10}}, + {"kern.intrcnt.nintrcnt", []_C_int{1, 63, 1}}, + {"kern.job_control", []_C_int{1, 19}}, + {"kern.malloc.buckets", []_C_int{1, 39, 1}}, + {"kern.malloc.kmemnames", []_C_int{1, 39, 3}}, + {"kern.maxclusters", []_C_int{1, 67}}, + {"kern.maxfiles", []_C_int{1, 7}}, + {"kern.maxlocksperuid", []_C_int{1, 70}}, + {"kern.maxpartitions", []_C_int{1, 23}}, + {"kern.maxproc", []_C_int{1, 6}}, + {"kern.maxthread", []_C_int{1, 25}}, + {"kern.maxvnodes", []_C_int{1, 5}}, + {"kern.mbstat", []_C_int{1, 59}}, + {"kern.msgbuf", []_C_int{1, 48}}, + {"kern.msgbufsize", []_C_int{1, 38}}, + {"kern.nchstats", []_C_int{1, 41}}, + {"kern.netlivelocks", []_C_int{1, 76}}, + {"kern.nfiles", []_C_int{1, 56}}, + {"kern.ngroups", []_C_int{1, 18}}, + {"kern.nosuidcoredump", []_C_int{1, 32}}, + {"kern.nprocs", []_C_int{1, 47}}, + {"kern.nselcoll", []_C_int{1, 43}}, + {"kern.nthreads", []_C_int{1, 26}}, + {"kern.numvnodes", []_C_int{1, 58}}, + {"kern.osrelease", []_C_int{1, 2}}, + {"kern.osrevision", []_C_int{1, 3}}, + {"kern.ostype", []_C_int{1, 1}}, + {"kern.osversion", []_C_int{1, 27}}, + {"kern.pool_debug", []_C_int{1, 77}}, + {"kern.posix1version", []_C_int{1, 17}}, + {"kern.proc", []_C_int{1, 66}}, + {"kern.random", []_C_int{1, 31}}, + {"kern.rawpartition", []_C_int{1, 24}}, + {"kern.saved_ids", []_C_int{1, 20}}, + {"kern.securelevel", []_C_int{1, 9}}, + {"kern.seminfo", []_C_int{1, 61}}, + {"kern.shminfo", []_C_int{1, 62}}, + {"kern.somaxconn", []_C_int{1, 28}}, + {"kern.sominconn", []_C_int{1, 29}}, + {"kern.splassert", []_C_int{1, 54}}, + {"kern.stackgap_random", []_C_int{1, 50}}, + {"kern.sysvipc_info", []_C_int{1, 51}}, + {"kern.sysvmsg", []_C_int{1, 34}}, + {"kern.sysvsem", []_C_int{1, 35}}, + {"kern.sysvshm", []_C_int{1, 36}}, + {"kern.timecounter.choice", []_C_int{1, 69, 4}}, + {"kern.timecounter.hardware", []_C_int{1, 69, 3}}, + {"kern.timecounter.tick", []_C_int{1, 69, 1}}, + {"kern.timecounter.timestepwarnings", []_C_int{1, 69, 2}}, + {"kern.tty.maxptys", []_C_int{1, 44, 6}}, + {"kern.tty.nptys", []_C_int{1, 44, 7}}, + {"kern.tty.tk_cancc", []_C_int{1, 44, 4}}, + {"kern.tty.tk_nin", []_C_int{1, 44, 1}}, + {"kern.tty.tk_nout", []_C_int{1, 44, 2}}, + {"kern.tty.tk_rawcc", []_C_int{1, 44, 3}}, + {"kern.tty.ttyinfo", []_C_int{1, 44, 5}}, + {"kern.ttycount", []_C_int{1, 57}}, + {"kern.userasymcrypto", []_C_int{1, 60}}, + {"kern.usercrypto", []_C_int{1, 52}}, + {"kern.usermount", []_C_int{1, 30}}, + {"kern.version", []_C_int{1, 4}}, + {"kern.vnode", []_C_int{1, 13}}, + {"kern.watchdog.auto", []_C_int{1, 64, 2}}, + {"kern.watchdog.period", []_C_int{1, 64, 1}}, + {"net.bpf.bufsize", []_C_int{4, 31, 1}}, + {"net.bpf.maxbufsize", []_C_int{4, 31, 2}}, + {"net.inet.ah.enable", []_C_int{4, 2, 51, 1}}, + {"net.inet.ah.stats", []_C_int{4, 2, 51, 2}}, + {"net.inet.carp.allow", []_C_int{4, 2, 112, 1}}, + {"net.inet.carp.log", []_C_int{4, 2, 112, 3}}, + {"net.inet.carp.preempt", []_C_int{4, 2, 112, 2}}, + {"net.inet.carp.stats", []_C_int{4, 2, 112, 4}}, + {"net.inet.divert.recvspace", []_C_int{4, 2, 258, 1}}, + {"net.inet.divert.sendspace", []_C_int{4, 2, 258, 2}}, + {"net.inet.divert.stats", []_C_int{4, 2, 258, 3}}, + {"net.inet.esp.enable", []_C_int{4, 2, 50, 1}}, + {"net.inet.esp.stats", []_C_int{4, 2, 50, 4}}, + {"net.inet.esp.udpencap", []_C_int{4, 2, 50, 2}}, + {"net.inet.esp.udpencap_port", []_C_int{4, 2, 50, 3}}, + {"net.inet.etherip.allow", []_C_int{4, 2, 97, 1}}, + {"net.inet.etherip.stats", []_C_int{4, 2, 97, 2}}, + {"net.inet.gre.allow", []_C_int{4, 2, 47, 1}}, + {"net.inet.gre.wccp", []_C_int{4, 2, 47, 2}}, + {"net.inet.icmp.bmcastecho", []_C_int{4, 2, 1, 2}}, + {"net.inet.icmp.errppslimit", []_C_int{4, 2, 1, 3}}, + {"net.inet.icmp.maskrepl", []_C_int{4, 2, 1, 1}}, + {"net.inet.icmp.rediraccept", []_C_int{4, 2, 1, 4}}, + {"net.inet.icmp.redirtimeout", []_C_int{4, 2, 1, 5}}, + {"net.inet.icmp.stats", []_C_int{4, 2, 1, 7}}, + {"net.inet.icmp.tstamprepl", []_C_int{4, 2, 1, 6}}, + {"net.inet.igmp.stats", []_C_int{4, 2, 2, 1}}, + {"net.inet.ip.arpqueued", []_C_int{4, 2, 0, 36}}, + {"net.inet.ip.encdebug", []_C_int{4, 2, 0, 12}}, + {"net.inet.ip.forwarding", []_C_int{4, 2, 0, 1}}, + {"net.inet.ip.ifq.congestion", []_C_int{4, 2, 0, 30, 4}}, + {"net.inet.ip.ifq.drops", []_C_int{4, 2, 0, 30, 3}}, + {"net.inet.ip.ifq.len", []_C_int{4, 2, 0, 30, 1}}, + {"net.inet.ip.ifq.maxlen", []_C_int{4, 2, 0, 30, 2}}, + {"net.inet.ip.maxqueue", []_C_int{4, 2, 0, 11}}, + {"net.inet.ip.mforwarding", []_C_int{4, 2, 0, 31}}, + {"net.inet.ip.mrtproto", []_C_int{4, 2, 0, 34}}, + {"net.inet.ip.mrtstats", []_C_int{4, 2, 0, 35}}, + {"net.inet.ip.mtu", []_C_int{4, 2, 0, 4}}, + {"net.inet.ip.mtudisc", []_C_int{4, 2, 0, 27}}, + {"net.inet.ip.mtudisctimeout", []_C_int{4, 2, 0, 28}}, + {"net.inet.ip.multipath", []_C_int{4, 2, 0, 32}}, + {"net.inet.ip.portfirst", []_C_int{4, 2, 0, 7}}, + {"net.inet.ip.porthifirst", []_C_int{4, 2, 0, 9}}, + {"net.inet.ip.porthilast", []_C_int{4, 2, 0, 10}}, + {"net.inet.ip.portlast", []_C_int{4, 2, 0, 8}}, + {"net.inet.ip.redirect", []_C_int{4, 2, 0, 2}}, + {"net.inet.ip.sourceroute", []_C_int{4, 2, 0, 5}}, + {"net.inet.ip.stats", []_C_int{4, 2, 0, 33}}, + {"net.inet.ip.ttl", []_C_int{4, 2, 0, 3}}, + {"net.inet.ipcomp.enable", []_C_int{4, 2, 108, 1}}, + {"net.inet.ipcomp.stats", []_C_int{4, 2, 108, 2}}, + {"net.inet.ipip.allow", []_C_int{4, 2, 4, 1}}, + {"net.inet.ipip.stats", []_C_int{4, 2, 4, 2}}, + {"net.inet.mobileip.allow", []_C_int{4, 2, 55, 1}}, + {"net.inet.pfsync.stats", []_C_int{4, 2, 240, 1}}, + {"net.inet.pim.stats", []_C_int{4, 2, 103, 1}}, + {"net.inet.tcp.ackonpush", []_C_int{4, 2, 6, 13}}, + {"net.inet.tcp.always_keepalive", []_C_int{4, 2, 6, 22}}, + {"net.inet.tcp.baddynamic", []_C_int{4, 2, 6, 6}}, + {"net.inet.tcp.drop", []_C_int{4, 2, 6, 19}}, + {"net.inet.tcp.ecn", []_C_int{4, 2, 6, 14}}, + {"net.inet.tcp.ident", []_C_int{4, 2, 6, 9}}, + {"net.inet.tcp.keepidle", []_C_int{4, 2, 6, 3}}, + {"net.inet.tcp.keepinittime", []_C_int{4, 2, 6, 2}}, + {"net.inet.tcp.keepintvl", []_C_int{4, 2, 6, 4}}, + {"net.inet.tcp.mssdflt", []_C_int{4, 2, 6, 11}}, + {"net.inet.tcp.reasslimit", []_C_int{4, 2, 6, 18}}, + {"net.inet.tcp.rfc1323", []_C_int{4, 2, 6, 1}}, + {"net.inet.tcp.rfc3390", []_C_int{4, 2, 6, 17}}, + {"net.inet.tcp.rstppslimit", []_C_int{4, 2, 6, 12}}, + {"net.inet.tcp.sack", []_C_int{4, 2, 6, 10}}, + {"net.inet.tcp.sackholelimit", []_C_int{4, 2, 6, 20}}, + {"net.inet.tcp.slowhz", []_C_int{4, 2, 6, 5}}, + {"net.inet.tcp.stats", []_C_int{4, 2, 6, 21}}, + {"net.inet.tcp.synbucketlimit", []_C_int{4, 2, 6, 16}}, + {"net.inet.tcp.syncachelimit", []_C_int{4, 2, 6, 15}}, + {"net.inet.udp.baddynamic", []_C_int{4, 2, 17, 2}}, + {"net.inet.udp.checksum", []_C_int{4, 2, 17, 1}}, + {"net.inet.udp.recvspace", []_C_int{4, 2, 17, 3}}, + {"net.inet.udp.sendspace", []_C_int{4, 2, 17, 4}}, + {"net.inet.udp.stats", []_C_int{4, 2, 17, 5}}, + {"net.inet6.divert.recvspace", []_C_int{4, 24, 86, 1}}, + {"net.inet6.divert.sendspace", []_C_int{4, 24, 86, 2}}, + {"net.inet6.divert.stats", []_C_int{4, 24, 86, 3}}, + {"net.inet6.icmp6.errppslimit", []_C_int{4, 24, 30, 14}}, + {"net.inet6.icmp6.mtudisc_hiwat", []_C_int{4, 24, 30, 16}}, + {"net.inet6.icmp6.mtudisc_lowat", []_C_int{4, 24, 30, 17}}, + {"net.inet6.icmp6.nd6_debug", []_C_int{4, 24, 30, 18}}, + {"net.inet6.icmp6.nd6_delay", []_C_int{4, 24, 30, 8}}, + {"net.inet6.icmp6.nd6_maxnudhint", []_C_int{4, 24, 30, 15}}, + {"net.inet6.icmp6.nd6_mmaxtries", []_C_int{4, 24, 30, 10}}, + {"net.inet6.icmp6.nd6_prune", []_C_int{4, 24, 30, 6}}, + {"net.inet6.icmp6.nd6_umaxtries", []_C_int{4, 24, 30, 9}}, + {"net.inet6.icmp6.nd6_useloopback", []_C_int{4, 24, 30, 11}}, + {"net.inet6.icmp6.nodeinfo", []_C_int{4, 24, 30, 13}}, + {"net.inet6.icmp6.rediraccept", []_C_int{4, 24, 30, 2}}, + {"net.inet6.icmp6.redirtimeout", []_C_int{4, 24, 30, 3}}, + {"net.inet6.ip6.accept_rtadv", []_C_int{4, 24, 17, 12}}, + {"net.inet6.ip6.auto_flowlabel", []_C_int{4, 24, 17, 17}}, + {"net.inet6.ip6.dad_count", []_C_int{4, 24, 17, 16}}, + {"net.inet6.ip6.dad_pending", []_C_int{4, 24, 17, 49}}, + {"net.inet6.ip6.defmcasthlim", []_C_int{4, 24, 17, 18}}, + {"net.inet6.ip6.forwarding", []_C_int{4, 24, 17, 1}}, + {"net.inet6.ip6.forwsrcrt", []_C_int{4, 24, 17, 5}}, + {"net.inet6.ip6.hdrnestlimit", []_C_int{4, 24, 17, 15}}, + {"net.inet6.ip6.hlim", []_C_int{4, 24, 17, 3}}, + {"net.inet6.ip6.log_interval", []_C_int{4, 24, 17, 14}}, + {"net.inet6.ip6.maxdynroutes", []_C_int{4, 24, 17, 48}}, + {"net.inet6.ip6.maxfragpackets", []_C_int{4, 24, 17, 9}}, + {"net.inet6.ip6.maxfrags", []_C_int{4, 24, 17, 41}}, + {"net.inet6.ip6.maxifdefrouters", []_C_int{4, 24, 17, 47}}, + {"net.inet6.ip6.maxifprefixes", []_C_int{4, 24, 17, 46}}, + {"net.inet6.ip6.mforwarding", []_C_int{4, 24, 17, 42}}, + {"net.inet6.ip6.mrtproto", []_C_int{4, 24, 17, 8}}, + {"net.inet6.ip6.mtudisctimeout", []_C_int{4, 24, 17, 50}}, + {"net.inet6.ip6.multicast_mtudisc", []_C_int{4, 24, 17, 44}}, + {"net.inet6.ip6.multipath", []_C_int{4, 24, 17, 43}}, + {"net.inet6.ip6.neighborgcthresh", []_C_int{4, 24, 17, 45}}, + {"net.inet6.ip6.redirect", []_C_int{4, 24, 17, 2}}, + {"net.inet6.ip6.rr_prune", []_C_int{4, 24, 17, 22}}, + {"net.inet6.ip6.sourcecheck", []_C_int{4, 24, 17, 10}}, + {"net.inet6.ip6.sourcecheck_logint", []_C_int{4, 24, 17, 11}}, + {"net.inet6.ip6.use_deprecated", []_C_int{4, 24, 17, 21}}, + {"net.inet6.ip6.v6only", []_C_int{4, 24, 17, 24}}, + {"net.key.sadb_dump", []_C_int{4, 30, 1}}, + {"net.key.spd_dump", []_C_int{4, 30, 2}}, + {"net.mpls.ifq.congestion", []_C_int{4, 33, 3, 4}}, + {"net.mpls.ifq.drops", []_C_int{4, 33, 3, 3}}, + {"net.mpls.ifq.len", []_C_int{4, 33, 3, 1}}, + {"net.mpls.ifq.maxlen", []_C_int{4, 33, 3, 2}}, + {"net.mpls.mapttl_ip", []_C_int{4, 33, 5}}, + {"net.mpls.mapttl_ip6", []_C_int{4, 33, 6}}, + {"net.mpls.maxloop_inkernel", []_C_int{4, 33, 4}}, + {"net.mpls.ttl", []_C_int{4, 33, 2}}, + {"net.pflow.stats", []_C_int{4, 34, 1}}, + {"net.pipex.enable", []_C_int{4, 35, 1}}, + {"vm.anonmin", []_C_int{2, 7}}, + {"vm.loadavg", []_C_int{2, 2}}, + {"vm.maxslp", []_C_int{2, 10}}, + {"vm.nkmempages", []_C_int{2, 6}}, + {"vm.psstrings", []_C_int{2, 3}}, + {"vm.swapencrypt.enable", []_C_int{2, 5, 0}}, + {"vm.swapencrypt.keyscreated", []_C_int{2, 5, 1}}, + {"vm.swapencrypt.keysdeleted", []_C_int{2, 5, 2}}, + {"vm.uspace", []_C_int{2, 11}}, + {"vm.uvmexp", []_C_int{2, 4}}, + {"vm.vmmeter", []_C_int{2, 1}}, + {"vm.vnodemin", []_C_int{2, 9}}, + {"vm.vtextmin", []_C_int{2, 8}}, +} diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go new file mode 100644 index 000000000..83bb935b9 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go @@ -0,0 +1,270 @@ +// mksysctl_openbsd.pl +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +package unix + +type mibentry struct { + ctlname string + ctloid []_C_int +} + +var sysctlMib = []mibentry{ + {"ddb.console", []_C_int{9, 6}}, + {"ddb.log", []_C_int{9, 7}}, + {"ddb.max_line", []_C_int{9, 3}}, + {"ddb.max_width", []_C_int{9, 2}}, + {"ddb.panic", []_C_int{9, 5}}, + {"ddb.radix", []_C_int{9, 1}}, + {"ddb.tab_stop_width", []_C_int{9, 4}}, + {"ddb.trigger", []_C_int{9, 8}}, + {"fs.posix.setuid", []_C_int{3, 1, 1}}, + {"hw.allowpowerdown", []_C_int{6, 22}}, + {"hw.byteorder", []_C_int{6, 4}}, + {"hw.cpuspeed", []_C_int{6, 12}}, + {"hw.diskcount", []_C_int{6, 10}}, + {"hw.disknames", []_C_int{6, 8}}, + {"hw.diskstats", []_C_int{6, 9}}, + {"hw.machine", []_C_int{6, 1}}, + {"hw.model", []_C_int{6, 2}}, + {"hw.ncpu", []_C_int{6, 3}}, + {"hw.ncpufound", []_C_int{6, 21}}, + {"hw.pagesize", []_C_int{6, 7}}, + {"hw.physmem", []_C_int{6, 19}}, + {"hw.product", []_C_int{6, 15}}, + {"hw.serialno", []_C_int{6, 17}}, + {"hw.setperf", []_C_int{6, 13}}, + {"hw.usermem", []_C_int{6, 20}}, + {"hw.uuid", []_C_int{6, 18}}, + {"hw.vendor", []_C_int{6, 14}}, + {"hw.version", []_C_int{6, 16}}, + {"kern.arandom", []_C_int{1, 37}}, + {"kern.argmax", []_C_int{1, 8}}, + {"kern.boottime", []_C_int{1, 21}}, + {"kern.bufcachepercent", []_C_int{1, 72}}, + {"kern.ccpu", []_C_int{1, 45}}, + {"kern.clockrate", []_C_int{1, 12}}, + {"kern.consdev", []_C_int{1, 75}}, + {"kern.cp_time", []_C_int{1, 40}}, + {"kern.cp_time2", []_C_int{1, 71}}, + {"kern.cryptodevallowsoft", []_C_int{1, 53}}, + {"kern.domainname", []_C_int{1, 22}}, + {"kern.file", []_C_int{1, 73}}, + {"kern.forkstat", []_C_int{1, 42}}, + {"kern.fscale", []_C_int{1, 46}}, + {"kern.fsync", []_C_int{1, 33}}, + {"kern.hostid", []_C_int{1, 11}}, + {"kern.hostname", []_C_int{1, 10}}, + {"kern.intrcnt.nintrcnt", []_C_int{1, 63, 1}}, + {"kern.job_control", []_C_int{1, 19}}, + {"kern.malloc.buckets", []_C_int{1, 39, 1}}, + {"kern.malloc.kmemnames", []_C_int{1, 39, 3}}, + {"kern.maxclusters", []_C_int{1, 67}}, + {"kern.maxfiles", []_C_int{1, 7}}, + {"kern.maxlocksperuid", []_C_int{1, 70}}, + {"kern.maxpartitions", []_C_int{1, 23}}, + {"kern.maxproc", []_C_int{1, 6}}, + {"kern.maxthread", []_C_int{1, 25}}, + {"kern.maxvnodes", []_C_int{1, 5}}, + {"kern.mbstat", []_C_int{1, 59}}, + {"kern.msgbuf", []_C_int{1, 48}}, + {"kern.msgbufsize", []_C_int{1, 38}}, + {"kern.nchstats", []_C_int{1, 41}}, + {"kern.netlivelocks", []_C_int{1, 76}}, + {"kern.nfiles", []_C_int{1, 56}}, + {"kern.ngroups", []_C_int{1, 18}}, + {"kern.nosuidcoredump", []_C_int{1, 32}}, + {"kern.nprocs", []_C_int{1, 47}}, + {"kern.nselcoll", []_C_int{1, 43}}, + {"kern.nthreads", []_C_int{1, 26}}, + {"kern.numvnodes", []_C_int{1, 58}}, + {"kern.osrelease", []_C_int{1, 2}}, + {"kern.osrevision", []_C_int{1, 3}}, + {"kern.ostype", []_C_int{1, 1}}, + {"kern.osversion", []_C_int{1, 27}}, + {"kern.pool_debug", []_C_int{1, 77}}, + {"kern.posix1version", []_C_int{1, 17}}, + {"kern.proc", []_C_int{1, 66}}, + {"kern.random", []_C_int{1, 31}}, + {"kern.rawpartition", []_C_int{1, 24}}, + {"kern.saved_ids", []_C_int{1, 20}}, + {"kern.securelevel", []_C_int{1, 9}}, + {"kern.seminfo", []_C_int{1, 61}}, + {"kern.shminfo", []_C_int{1, 62}}, + {"kern.somaxconn", []_C_int{1, 28}}, + {"kern.sominconn", []_C_int{1, 29}}, + {"kern.splassert", []_C_int{1, 54}}, + {"kern.stackgap_random", []_C_int{1, 50}}, + {"kern.sysvipc_info", []_C_int{1, 51}}, + {"kern.sysvmsg", []_C_int{1, 34}}, + {"kern.sysvsem", []_C_int{1, 35}}, + {"kern.sysvshm", []_C_int{1, 36}}, + {"kern.timecounter.choice", []_C_int{1, 69, 4}}, + {"kern.timecounter.hardware", []_C_int{1, 69, 3}}, + {"kern.timecounter.tick", []_C_int{1, 69, 1}}, + {"kern.timecounter.timestepwarnings", []_C_int{1, 69, 2}}, + {"kern.tty.maxptys", []_C_int{1, 44, 6}}, + {"kern.tty.nptys", []_C_int{1, 44, 7}}, + {"kern.tty.tk_cancc", []_C_int{1, 44, 4}}, + {"kern.tty.tk_nin", []_C_int{1, 44, 1}}, + {"kern.tty.tk_nout", []_C_int{1, 44, 2}}, + {"kern.tty.tk_rawcc", []_C_int{1, 44, 3}}, + {"kern.tty.ttyinfo", []_C_int{1, 44, 5}}, + {"kern.ttycount", []_C_int{1, 57}}, + {"kern.userasymcrypto", []_C_int{1, 60}}, + {"kern.usercrypto", []_C_int{1, 52}}, + {"kern.usermount", []_C_int{1, 30}}, + {"kern.version", []_C_int{1, 4}}, + {"kern.vnode", []_C_int{1, 13}}, + {"kern.watchdog.auto", []_C_int{1, 64, 2}}, + {"kern.watchdog.period", []_C_int{1, 64, 1}}, + {"net.bpf.bufsize", []_C_int{4, 31, 1}}, + {"net.bpf.maxbufsize", []_C_int{4, 31, 2}}, + {"net.inet.ah.enable", []_C_int{4, 2, 51, 1}}, + {"net.inet.ah.stats", []_C_int{4, 2, 51, 2}}, + {"net.inet.carp.allow", []_C_int{4, 2, 112, 1}}, + {"net.inet.carp.log", []_C_int{4, 2, 112, 3}}, + {"net.inet.carp.preempt", []_C_int{4, 2, 112, 2}}, + {"net.inet.carp.stats", []_C_int{4, 2, 112, 4}}, + {"net.inet.divert.recvspace", []_C_int{4, 2, 258, 1}}, + {"net.inet.divert.sendspace", []_C_int{4, 2, 258, 2}}, + {"net.inet.divert.stats", []_C_int{4, 2, 258, 3}}, + {"net.inet.esp.enable", []_C_int{4, 2, 50, 1}}, + {"net.inet.esp.stats", []_C_int{4, 2, 50, 4}}, + {"net.inet.esp.udpencap", []_C_int{4, 2, 50, 2}}, + {"net.inet.esp.udpencap_port", []_C_int{4, 2, 50, 3}}, + {"net.inet.etherip.allow", []_C_int{4, 2, 97, 1}}, + {"net.inet.etherip.stats", []_C_int{4, 2, 97, 2}}, + {"net.inet.gre.allow", []_C_int{4, 2, 47, 1}}, + {"net.inet.gre.wccp", []_C_int{4, 2, 47, 2}}, + {"net.inet.icmp.bmcastecho", []_C_int{4, 2, 1, 2}}, + {"net.inet.icmp.errppslimit", []_C_int{4, 2, 1, 3}}, + {"net.inet.icmp.maskrepl", []_C_int{4, 2, 1, 1}}, + {"net.inet.icmp.rediraccept", []_C_int{4, 2, 1, 4}}, + {"net.inet.icmp.redirtimeout", []_C_int{4, 2, 1, 5}}, + {"net.inet.icmp.stats", []_C_int{4, 2, 1, 7}}, + {"net.inet.icmp.tstamprepl", []_C_int{4, 2, 1, 6}}, + {"net.inet.igmp.stats", []_C_int{4, 2, 2, 1}}, + {"net.inet.ip.arpqueued", []_C_int{4, 2, 0, 36}}, + {"net.inet.ip.encdebug", []_C_int{4, 2, 0, 12}}, + {"net.inet.ip.forwarding", []_C_int{4, 2, 0, 1}}, + {"net.inet.ip.ifq.congestion", []_C_int{4, 2, 0, 30, 4}}, + {"net.inet.ip.ifq.drops", []_C_int{4, 2, 0, 30, 3}}, + {"net.inet.ip.ifq.len", []_C_int{4, 2, 0, 30, 1}}, + {"net.inet.ip.ifq.maxlen", []_C_int{4, 2, 0, 30, 2}}, + {"net.inet.ip.maxqueue", []_C_int{4, 2, 0, 11}}, + {"net.inet.ip.mforwarding", []_C_int{4, 2, 0, 31}}, + {"net.inet.ip.mrtproto", []_C_int{4, 2, 0, 34}}, + {"net.inet.ip.mrtstats", []_C_int{4, 2, 0, 35}}, + {"net.inet.ip.mtu", []_C_int{4, 2, 0, 4}}, + {"net.inet.ip.mtudisc", []_C_int{4, 2, 0, 27}}, + {"net.inet.ip.mtudisctimeout", []_C_int{4, 2, 0, 28}}, + {"net.inet.ip.multipath", []_C_int{4, 2, 0, 32}}, + {"net.inet.ip.portfirst", []_C_int{4, 2, 0, 7}}, + {"net.inet.ip.porthifirst", []_C_int{4, 2, 0, 9}}, + {"net.inet.ip.porthilast", []_C_int{4, 2, 0, 10}}, + {"net.inet.ip.portlast", []_C_int{4, 2, 0, 8}}, + {"net.inet.ip.redirect", []_C_int{4, 2, 0, 2}}, + {"net.inet.ip.sourceroute", []_C_int{4, 2, 0, 5}}, + {"net.inet.ip.stats", []_C_int{4, 2, 0, 33}}, + {"net.inet.ip.ttl", []_C_int{4, 2, 0, 3}}, + {"net.inet.ipcomp.enable", []_C_int{4, 2, 108, 1}}, + {"net.inet.ipcomp.stats", []_C_int{4, 2, 108, 2}}, + {"net.inet.ipip.allow", []_C_int{4, 2, 4, 1}}, + {"net.inet.ipip.stats", []_C_int{4, 2, 4, 2}}, + {"net.inet.mobileip.allow", []_C_int{4, 2, 55, 1}}, + {"net.inet.pfsync.stats", []_C_int{4, 2, 240, 1}}, + {"net.inet.pim.stats", []_C_int{4, 2, 103, 1}}, + {"net.inet.tcp.ackonpush", []_C_int{4, 2, 6, 13}}, + {"net.inet.tcp.always_keepalive", []_C_int{4, 2, 6, 22}}, + {"net.inet.tcp.baddynamic", []_C_int{4, 2, 6, 6}}, + {"net.inet.tcp.drop", []_C_int{4, 2, 6, 19}}, + {"net.inet.tcp.ecn", []_C_int{4, 2, 6, 14}}, + {"net.inet.tcp.ident", []_C_int{4, 2, 6, 9}}, + {"net.inet.tcp.keepidle", []_C_int{4, 2, 6, 3}}, + {"net.inet.tcp.keepinittime", []_C_int{4, 2, 6, 2}}, + {"net.inet.tcp.keepintvl", []_C_int{4, 2, 6, 4}}, + {"net.inet.tcp.mssdflt", []_C_int{4, 2, 6, 11}}, + {"net.inet.tcp.reasslimit", []_C_int{4, 2, 6, 18}}, + {"net.inet.tcp.rfc1323", []_C_int{4, 2, 6, 1}}, + {"net.inet.tcp.rfc3390", []_C_int{4, 2, 6, 17}}, + {"net.inet.tcp.rstppslimit", []_C_int{4, 2, 6, 12}}, + {"net.inet.tcp.sack", []_C_int{4, 2, 6, 10}}, + {"net.inet.tcp.sackholelimit", []_C_int{4, 2, 6, 20}}, + {"net.inet.tcp.slowhz", []_C_int{4, 2, 6, 5}}, + {"net.inet.tcp.stats", []_C_int{4, 2, 6, 21}}, + {"net.inet.tcp.synbucketlimit", []_C_int{4, 2, 6, 16}}, + {"net.inet.tcp.syncachelimit", []_C_int{4, 2, 6, 15}}, + {"net.inet.udp.baddynamic", []_C_int{4, 2, 17, 2}}, + {"net.inet.udp.checksum", []_C_int{4, 2, 17, 1}}, + {"net.inet.udp.recvspace", []_C_int{4, 2, 17, 3}}, + {"net.inet.udp.sendspace", []_C_int{4, 2, 17, 4}}, + {"net.inet.udp.stats", []_C_int{4, 2, 17, 5}}, + {"net.inet6.divert.recvspace", []_C_int{4, 24, 86, 1}}, + {"net.inet6.divert.sendspace", []_C_int{4, 24, 86, 2}}, + {"net.inet6.divert.stats", []_C_int{4, 24, 86, 3}}, + {"net.inet6.icmp6.errppslimit", []_C_int{4, 24, 30, 14}}, + {"net.inet6.icmp6.mtudisc_hiwat", []_C_int{4, 24, 30, 16}}, + {"net.inet6.icmp6.mtudisc_lowat", []_C_int{4, 24, 30, 17}}, + {"net.inet6.icmp6.nd6_debug", []_C_int{4, 24, 30, 18}}, + {"net.inet6.icmp6.nd6_delay", []_C_int{4, 24, 30, 8}}, + {"net.inet6.icmp6.nd6_maxnudhint", []_C_int{4, 24, 30, 15}}, + {"net.inet6.icmp6.nd6_mmaxtries", []_C_int{4, 24, 30, 10}}, + {"net.inet6.icmp6.nd6_prune", []_C_int{4, 24, 30, 6}}, + {"net.inet6.icmp6.nd6_umaxtries", []_C_int{4, 24, 30, 9}}, + {"net.inet6.icmp6.nd6_useloopback", []_C_int{4, 24, 30, 11}}, + {"net.inet6.icmp6.nodeinfo", []_C_int{4, 24, 30, 13}}, + {"net.inet6.icmp6.rediraccept", []_C_int{4, 24, 30, 2}}, + {"net.inet6.icmp6.redirtimeout", []_C_int{4, 24, 30, 3}}, + {"net.inet6.ip6.accept_rtadv", []_C_int{4, 24, 17, 12}}, + {"net.inet6.ip6.auto_flowlabel", []_C_int{4, 24, 17, 17}}, + {"net.inet6.ip6.dad_count", []_C_int{4, 24, 17, 16}}, + {"net.inet6.ip6.dad_pending", []_C_int{4, 24, 17, 49}}, + {"net.inet6.ip6.defmcasthlim", []_C_int{4, 24, 17, 18}}, + {"net.inet6.ip6.forwarding", []_C_int{4, 24, 17, 1}}, + {"net.inet6.ip6.forwsrcrt", []_C_int{4, 24, 17, 5}}, + {"net.inet6.ip6.hdrnestlimit", []_C_int{4, 24, 17, 15}}, + {"net.inet6.ip6.hlim", []_C_int{4, 24, 17, 3}}, + {"net.inet6.ip6.log_interval", []_C_int{4, 24, 17, 14}}, + {"net.inet6.ip6.maxdynroutes", []_C_int{4, 24, 17, 48}}, + {"net.inet6.ip6.maxfragpackets", []_C_int{4, 24, 17, 9}}, + {"net.inet6.ip6.maxfrags", []_C_int{4, 24, 17, 41}}, + {"net.inet6.ip6.maxifdefrouters", []_C_int{4, 24, 17, 47}}, + {"net.inet6.ip6.maxifprefixes", []_C_int{4, 24, 17, 46}}, + {"net.inet6.ip6.mforwarding", []_C_int{4, 24, 17, 42}}, + {"net.inet6.ip6.mrtproto", []_C_int{4, 24, 17, 8}}, + {"net.inet6.ip6.mtudisctimeout", []_C_int{4, 24, 17, 50}}, + {"net.inet6.ip6.multicast_mtudisc", []_C_int{4, 24, 17, 44}}, + {"net.inet6.ip6.multipath", []_C_int{4, 24, 17, 43}}, + {"net.inet6.ip6.neighborgcthresh", []_C_int{4, 24, 17, 45}}, + {"net.inet6.ip6.redirect", []_C_int{4, 24, 17, 2}}, + {"net.inet6.ip6.rr_prune", []_C_int{4, 24, 17, 22}}, + {"net.inet6.ip6.sourcecheck", []_C_int{4, 24, 17, 10}}, + {"net.inet6.ip6.sourcecheck_logint", []_C_int{4, 24, 17, 11}}, + {"net.inet6.ip6.use_deprecated", []_C_int{4, 24, 17, 21}}, + {"net.inet6.ip6.v6only", []_C_int{4, 24, 17, 24}}, + {"net.key.sadb_dump", []_C_int{4, 30, 1}}, + {"net.key.spd_dump", []_C_int{4, 30, 2}}, + {"net.mpls.ifq.congestion", []_C_int{4, 33, 3, 4}}, + {"net.mpls.ifq.drops", []_C_int{4, 33, 3, 3}}, + {"net.mpls.ifq.len", []_C_int{4, 33, 3, 1}}, + {"net.mpls.ifq.maxlen", []_C_int{4, 33, 3, 2}}, + {"net.mpls.mapttl_ip", []_C_int{4, 33, 5}}, + {"net.mpls.mapttl_ip6", []_C_int{4, 33, 6}}, + {"net.mpls.maxloop_inkernel", []_C_int{4, 33, 4}}, + {"net.mpls.ttl", []_C_int{4, 33, 2}}, + {"net.pflow.stats", []_C_int{4, 34, 1}}, + {"net.pipex.enable", []_C_int{4, 35, 1}}, + {"vm.anonmin", []_C_int{2, 7}}, + {"vm.loadavg", []_C_int{2, 2}}, + {"vm.maxslp", []_C_int{2, 10}}, + {"vm.nkmempages", []_C_int{2, 6}}, + {"vm.psstrings", []_C_int{2, 3}}, + {"vm.swapencrypt.enable", []_C_int{2, 5, 0}}, + {"vm.swapencrypt.keyscreated", []_C_int{2, 5, 1}}, + {"vm.swapencrypt.keysdeleted", []_C_int{2, 5, 2}}, + {"vm.uspace", []_C_int{2, 11}}, + {"vm.uvmexp", []_C_int{2, 4}}, + {"vm.vmmeter", []_C_int{2, 1}}, + {"vm.vnodemin", []_C_int{2, 9}}, + {"vm.vtextmin", []_C_int{2, 8}}, +} diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go index cef4fed02..95ab12903 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go @@ -385,4 +385,6 @@ const ( SYS_PKEY_MPROTECT = 380 SYS_PKEY_ALLOC = 381 SYS_PKEY_FREE = 382 + SYS_STATX = 383 + SYS_ARCH_PRCTL = 384 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go index 49bfa1270..c5dabf2e4 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go @@ -338,4 +338,5 @@ const ( SYS_PKEY_MPROTECT = 329 SYS_PKEY_ALLOC = 330 SYS_PKEY_FREE = 331 + SYS_STATX = 332 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go index 97b182ef5..ab7fa5fd3 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go @@ -358,4 +358,5 @@ const ( SYS_PKEY_MPROTECT = 394 SYS_PKEY_ALLOC = 395 SYS_PKEY_FREE = 396 + SYS_STATX = 397 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go index 640784357..b1c6b4bd3 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go @@ -282,4 +282,5 @@ const ( SYS_PKEY_MPROTECT = 288 SYS_PKEY_ALLOC = 289 SYS_PKEY_FREE = 290 + SYS_STATX = 291 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go index 939567c09..2e9aa7a3e 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go @@ -371,4 +371,5 @@ const ( SYS_PKEY_MPROTECT = 4363 SYS_PKEY_ALLOC = 4364 SYS_PKEY_FREE = 4365 + SYS_STATX = 4366 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go index 09db95969..92827635a 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go @@ -331,4 +331,5 @@ const ( SYS_PKEY_MPROTECT = 5323 SYS_PKEY_ALLOC = 5324 SYS_PKEY_FREE = 5325 + SYS_STATX = 5326 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go index d1b872a09..45bd3fd6c 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go @@ -331,4 +331,5 @@ const ( SYS_PKEY_MPROTECT = 5323 SYS_PKEY_ALLOC = 5324 SYS_PKEY_FREE = 5325 + SYS_STATX = 5326 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go index 82ba20f28..62ccac4b7 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go @@ -371,4 +371,5 @@ const ( SYS_PKEY_MPROTECT = 4363 SYS_PKEY_ALLOC = 4364 SYS_PKEY_FREE = 4365 + SYS_STATX = 4366 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go index 8944448ae..dfe5dab67 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go @@ -366,4 +366,5 @@ const ( SYS_PREADV2 = 380 SYS_PWRITEV2 = 381 SYS_KEXEC_FILE_LOAD = 382 + SYS_STATX = 383 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go index 90a039be4..eca97f738 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go @@ -366,4 +366,5 @@ const ( SYS_PREADV2 = 380 SYS_PWRITEV2 = 381 SYS_KEXEC_FILE_LOAD = 382 + SYS_STATX = 383 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go index aab0cdb18..8ea18e6c2 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go @@ -306,6 +306,8 @@ const ( SYS_COPY_FILE_RANGE = 375 SYS_PREADV2 = 376 SYS_PWRITEV2 = 377 + SYS_S390_GUARDED_STORAGE = 378 + SYS_STATX = 379 SYS_SELECT = 142 SYS_GETRLIMIT = 191 SYS_LCHOWN = 198 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go index 7b36896ea..8b30c6997 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go @@ -425,7 +425,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x2c RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -673,8 +673,6 @@ const RNDGETENTCNT = 0x80045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go index e54fa9847..cf0358986 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go @@ -429,7 +429,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x2c RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -691,8 +691,6 @@ const RNDGETENTCNT = 0x80045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go index bff6ce258..8ef7d85f1 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go @@ -429,7 +429,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x2c RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -662,8 +662,6 @@ const RNDGETENTCNT = 0x80045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go index a3d0cc4a1..311026867 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go @@ -430,7 +430,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x2c RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -670,8 +670,6 @@ const RNDGETENTCNT = 0x80045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go index 8fa6603fb..d2c1bc2c8 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go @@ -428,7 +428,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x2c RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -667,8 +667,6 @@ const RNDGETENTCNT = 0x40045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go index 3e5fc6252..ec7a0cd27 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go @@ -430,7 +430,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x2c RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -672,8 +672,6 @@ const RNDGETENTCNT = 0x40045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go index f9bd1ab0c..bbe08d7db 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go @@ -430,7 +430,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x2c RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -672,8 +672,6 @@ const RNDGETENTCNT = 0x40045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go index 74c542132..75ee05ab4 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go @@ -428,7 +428,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x2c RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -667,8 +667,6 @@ const RNDGETENTCNT = 0x40045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go index 2b0b18e94..30a257f83 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go @@ -431,7 +431,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x2c RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -680,8 +680,6 @@ const RNDGETENTCNT = 0x40045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go index b2b59992d..bebed6f11 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go @@ -431,7 +431,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x2c RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -680,8 +680,6 @@ const RNDGETENTCNT = 0x40045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go index 5e0aa6636..286661b35 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go @@ -430,7 +430,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x2b + IFLA_MAX = 0x2c RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -697,8 +697,6 @@ const RNDGETENTCNT = 0x80045200 const PERF_IOC_FLAG_GROUP = 0x1 -const _SC_PAGESIZE = 0x1e - type Termios struct { Iflag uint32 Oflag uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go index 92336f9f9..a979a33d5 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go @@ -413,8 +413,6 @@ type BpfHdr struct { Pad_cgo_0 [2]byte } -const _SC_PAGESIZE = 0xb - type Termios struct { Iflag uint32 Oflag uint32 diff --git a/vendor/golang.org/x/sys/windows/syscall.go b/vendor/golang.org/x/sys/windows/syscall.go index be4c9da84..4e2fbe86e 100644 --- a/vendor/golang.org/x/sys/windows/syscall.go +++ b/vendor/golang.org/x/sys/windows/syscall.go @@ -19,7 +19,7 @@ // These calls return err == nil to indicate success; otherwise // err represents an operating system error describing the failure and // holds a value of type syscall.Errno. -package windows +package windows // import "golang.org/x/sys/windows" import ( "syscall" diff --git a/vendor/golang.org/x/sys/windows/syscall_test.go b/vendor/golang.org/x/sys/windows/syscall_test.go new file mode 100644 index 000000000..62588b91b --- /dev/null +++ b/vendor/golang.org/x/sys/windows/syscall_test.go @@ -0,0 +1,33 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +package windows_test + +import ( + "testing" + + "golang.org/x/sys/windows" +) + +func testSetGetenv(t *testing.T, key, value string) { + err := windows.Setenv(key, value) + if err != nil { + t.Fatalf("Setenv failed to set %q: %v", value, err) + } + newvalue, found := windows.Getenv(key) + if !found { + t.Fatalf("Getenv failed to find %v variable (want value %q)", key, value) + } + if newvalue != value { + t.Fatalf("Getenv(%v) = %q; want %q", key, newvalue, value) + } +} + +func TestEnv(t *testing.T) { + testSetGetenv(t, "TESTENV", "AVALUE") + // make sure TESTENV gets set to "", not deleted + testSetGetenv(t, "TESTENV", "") +} diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go index c7ff24b55..9b5ed549a 100644 --- a/vendor/golang.org/x/sys/windows/syscall_windows.go +++ b/vendor/golang.org/x/sys/windows/syscall_windows.go @@ -71,12 +71,17 @@ func UTF16PtrFromString(s string) (*uint16, error) { func Getpagesize() int { return 4096 } -// Converts a Go function to a function pointer conforming -// to the stdcall or cdecl calling convention. This is useful when -// interoperating with Windows code requiring callbacks. -// Implemented in runtime/syscall_windows.goc -func NewCallback(fn interface{}) uintptr -func NewCallbackCDecl(fn interface{}) uintptr +// NewCallback converts a Go function to a function pointer conforming to the stdcall calling convention. +// This is useful when interoperating with Windows code requiring callbacks. +func NewCallback(fn interface{}) uintptr { + return syscall.NewCallback(fn) +} + +// NewCallbackCDecl converts a Go function to a function pointer conforming to the cdecl calling convention. +// This is useful when interoperating with Windows code requiring callbacks. +func NewCallbackCDecl(fn interface{}) uintptr { + return syscall.NewCallbackCDecl(fn) +} // windows api calls diff --git a/vendor/golang.org/x/sys/windows/syscall_windows_test.go b/vendor/golang.org/x/sys/windows/syscall_windows_test.go new file mode 100644 index 000000000..0f73c11ba --- /dev/null +++ b/vendor/golang.org/x/sys/windows/syscall_windows_test.go @@ -0,0 +1,107 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package windows_test + +import ( + "io/ioutil" + "os" + "path/filepath" + "syscall" + "testing" + "unsafe" + + "golang.org/x/sys/windows" +) + +func TestWin32finddata(t *testing.T) { + dir, err := ioutil.TempDir("", "go-build") + if err != nil { + t.Fatalf("failed to create temp directory: %v", err) + } + defer os.RemoveAll(dir) + + path := filepath.Join(dir, "long_name.and_extension") + f, err := os.Create(path) + if err != nil { + t.Fatalf("failed to create %v: %v", path, err) + } + f.Close() + + type X struct { + fd windows.Win32finddata + got byte + pad [10]byte // to protect ourselves + + } + var want byte = 2 // it is unlikely to have this character in the filename + x := X{got: want} + + pathp, _ := windows.UTF16PtrFromString(path) + h, err := windows.FindFirstFile(pathp, &(x.fd)) + if err != nil { + t.Fatalf("FindFirstFile failed: %v", err) + } + err = windows.FindClose(h) + if err != nil { + t.Fatalf("FindClose failed: %v", err) + } + + if x.got != want { + t.Fatalf("memory corruption: want=%d got=%d", want, x.got) + } +} + +func TestFormatMessage(t *testing.T) { + dll := windows.MustLoadDLL("pdh.dll") + + pdhOpenQuery := func(datasrc *uint16, userdata uint32, query *windows.Handle) (errno uintptr) { + r0, _, _ := syscall.Syscall(dll.MustFindProc("PdhOpenQueryW").Addr(), 3, uintptr(unsafe.Pointer(datasrc)), uintptr(userdata), uintptr(unsafe.Pointer(query))) + return r0 + } + + pdhCloseQuery := func(query windows.Handle) (errno uintptr) { + r0, _, _ := syscall.Syscall(dll.MustFindProc("PdhCloseQuery").Addr(), 1, uintptr(query), 0, 0) + return r0 + } + + var q windows.Handle + name, err := windows.UTF16PtrFromString("no_such_source") + if err != nil { + t.Fatal(err) + } + errno := pdhOpenQuery(name, 0, &q) + if errno == 0 { + pdhCloseQuery(q) + t.Fatal("PdhOpenQuery succeeded, but expected to fail.") + } + + const flags uint32 = syscall.FORMAT_MESSAGE_FROM_HMODULE | syscall.FORMAT_MESSAGE_ARGUMENT_ARRAY | syscall.FORMAT_MESSAGE_IGNORE_INSERTS + buf := make([]uint16, 300) + _, err = windows.FormatMessage(flags, uintptr(dll.Handle), uint32(errno), 0, buf, nil) + if err != nil { + t.Fatal("FormatMessage for handle=%x and errno=%x failed: %v", dll.Handle, errno, err) + } +} + +func abort(funcname string, err error) { + panic(funcname + " failed: " + err.Error()) +} + +func ExampleLoadLibrary() { + h, err := windows.LoadLibrary("kernel32.dll") + if err != nil { + abort("LoadLibrary", err) + } + defer windows.FreeLibrary(h) + proc, err := windows.GetProcAddress(h, "GetVersion") + if err != nil { + abort("GetProcAddress", err) + } + r, _, _ := syscall.Syscall(uintptr(proc), 0, 0, 0, 0) + major := byte(r) + minor := uint8(r >> 8) + build := uint16(r >> 16) + print("windows version ", major, ".", minor, " (Build ", build, ")\n") +} diff --git a/vendor/golang.org/x/text/.gitattributes b/vendor/golang.org/x/text/.gitattributes new file mode 100644 index 000000000..d2f212e5d --- /dev/null +++ b/vendor/golang.org/x/text/.gitattributes @@ -0,0 +1,10 @@ +# Treat all files in this repo as binary, with no git magic updating +# line endings. Windows users contributing to Go will need to use a +# modern version of git and editors capable of LF line endings. +# +# We'll prevent accidental CRLF line endings from entering the repo +# via the git-review gofmt checks. +# +# See golang.org/issue/9281 + +* -text diff --git a/vendor/golang.org/x/text/.gitignore b/vendor/golang.org/x/text/.gitignore new file mode 100644 index 000000000..b2de568ba --- /dev/null +++ b/vendor/golang.org/x/text/.gitignore @@ -0,0 +1,6 @@ +# Add no patterns to .gitignore except for files generated by the build. +last-change +/DATA +# This file is rather large and the tests really only need to be run +# after generation. +/unicode/norm/data_test.go \ No newline at end of file diff --git a/vendor/golang.org/x/text/CONTRIBUTING.md b/vendor/golang.org/x/text/CONTRIBUTING.md new file mode 100644 index 000000000..88dff59bc --- /dev/null +++ b/vendor/golang.org/x/text/CONTRIBUTING.md @@ -0,0 +1,31 @@ +# Contributing to Go + +Go is an open source project. + +It is the work of hundreds of contributors. We appreciate your help! + + +## Filing issues + +When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions: + +1. What version of Go are you using (`go version`)? +2. What operating system and processor architecture are you using? +3. What did you do? +4. What did you expect to see? +5. What did you see instead? + +General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker. +The gophers there will answer or ask you to file an issue if you've tripped over a bug. + +## Contributing code + +Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) +before sending patches. + +**We do not accept GitHub pull requests** +(we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review). + +Unless otherwise noted, the Go source files are distributed under +the BSD-style license found in the LICENSE file. + diff --git a/vendor/golang.org/x/text/README.md b/vendor/golang.org/x/text/README.md new file mode 100644 index 000000000..75e29bcd7 --- /dev/null +++ b/vendor/golang.org/x/text/README.md @@ -0,0 +1,91 @@ +# Go Text + +This repository holds supplementary Go libraries for text processing, many involving Unicode. + +## Semantic Versioning +This repo uses Semantic versioning (http://semver.org/), so +1. MAJOR version when you make incompatible API changes, +1. MINOR version when you add functionality in a backwards-compatible manner, + and +1. PATCH version when you make backwards-compatible bug fixes. + +A Unicode major and minor version bump is mapped to a major version bump in +x/text. +A path version bump in Unicode is mapped to a minor version bump in x/text. +Note that, consistent with the definitions in semver, until version 1.0.0 of +x/text is reached, the minor version is considered a major version. +So going from 0.1.0 to 0.2.0 is considered to be a major version bump. + +A major new CLDR version is mapped to a minor version increase in x/text. +Any other new CLDR version is mapped to a patch version increase in x/text. + +## Download/Install + +The easiest way to install is to run `go get -u golang.org/x/text`. You can +also manually git clone the repository to `$GOPATH/src/golang.org/x/text`. + +## Contribute +To submit changes to this repository, see http://golang.org/doc/contribute.html. + +To generate the tables in this repository (except for the encoding tables), +run go generate from this directory. By default tables are generated for the +Unicode version in core and the CLDR version defined in +golang.org/x/text/unicode/cldr. + +Running go generate will as a side effect create a DATA subdirectory in this +directory, which holds all files that are used as a source for generating the +tables. This directory will also serve as a cache. + +## Testing +Run + + go test ./... + +from this directory to run all tests. Add the "-tags icu" flag to also run +ICU conformance tests (if available). This requires that you have the correct +ICU version installed on your system. + +TODO: +- updating unversioned source files. + +## Generating Tables + +To generate the tables in this repository (except for the encoding +tables), run `go generate` from this directory. By default tables are +generated for the Unicode version in core and the CLDR version defined in +golang.org/x/text/unicode/cldr. + +Running go generate will as a side effect create a DATA subdirectory in this +directory which holds all files that are used as a source for generating the +tables. This directory will also serve as a cache. + +## Versions +To update a Unicode version run + + UNICODE_VERSION=x.x.x go generate + +where `x.x.x` must correspond to a directory in http://www.unicode.org/Public/. +If this version is newer than the version in core it will also update the +relevant packages there. The idna package in x/net will always be updated. + +To update a CLDR version run + + CLDR_VERSION=version go generate + +where `version` must correspond to a directory in +http://www.unicode.org/Public/cldr/. + +Note that the code gets adapted over time to changes in the data and that +backwards compatibility is not maintained. +So updating to a different version may not work. + +The files in DATA/{iana|icu|w3|whatwg} are currently not versioned. + +## Report Issues / Send Patches + +This repository uses Gerrit for code changes. To learn how to submit changes to +this repository, see https://golang.org/doc/contribute.html. + +The main issue tracker for the image repository is located at +https://github.com/golang/go/issues. Prefix your issue with "x/image:" in the +subject line, so it is easy to find. diff --git a/vendor/golang.org/x/text/cases/cases.go b/vendor/golang.org/x/text/cases/cases.go deleted file mode 100644 index cf70630e1..000000000 --- a/vendor/golang.org/x/text/cases/cases.go +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:generate go run gen.go gen_trieval.go - -// Package cases provides general and language-specific case mappers. -package cases - -import ( - "golang.org/x/text/language" - "golang.org/x/text/transform" -) - -// References: -// - Unicode Reference Manual Chapter 3.13, 4.2, and 5.18. -// - http://www.unicode.org/reports/tr29/ -// - http://www.unicode.org/Public/6.3.0/ucd/CaseFolding.txt -// - http://www.unicode.org/Public/6.3.0/ucd/SpecialCasing.txt -// - http://www.unicode.org/Public/6.3.0/ucd/DerivedCoreProperties.txt -// - http://www.unicode.org/Public/6.3.0/ucd/auxiliary/WordBreakProperty.txt -// - http://www.unicode.org/Public/6.3.0/ucd/auxiliary/WordBreakTest.txt -// - http://userguide.icu-project.org/transforms/casemappings - -// TODO: -// - Case folding -// - Wide and Narrow? -// - Segmenter option for title casing. -// - ASCII fast paths -// - Encode Soft-Dotted property within trie somehow. - -// A Caser transforms given input to a certain case. It implements -// transform.Transformer. -// -// A Caser may be stateful and should therefore not be shared between -// goroutines. -type Caser struct { - t transform.SpanningTransformer -} - -// Bytes returns a new byte slice with the result of converting b to the case -// form implemented by c. -func (c Caser) Bytes(b []byte) []byte { - b, _, _ = transform.Bytes(c.t, b) - return b -} - -// String returns a string with the result of transforming s to the case form -// implemented by c. -func (c Caser) String(s string) string { - s, _, _ = transform.String(c.t, s) - return s -} - -// Reset resets the Caser to be reused for new input after a previous call to -// Transform. -func (c Caser) Reset() { c.t.Reset() } - -// Transform implements the transform.Transformer interface and transforms the -// given input to the case form implemented by c. -func (c Caser) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { - return c.t.Transform(dst, src, atEOF) -} - -// Span implements the transform.SpanningTransformer interface. -func (c Caser) Span(src []byte, atEOF bool) (n int, err error) { - return c.t.Span(src, atEOF) -} - -// Upper returns a Caser for language-specific uppercasing. -func Upper(t language.Tag, opts ...Option) Caser { - return Caser{makeUpper(t, getOpts(opts...))} -} - -// Lower returns a Caser for language-specific lowercasing. -func Lower(t language.Tag, opts ...Option) Caser { - return Caser{makeLower(t, getOpts(opts...))} -} - -// Title returns a Caser for language-specific title casing. It uses an -// approximation of the default Unicode Word Break algorithm. -func Title(t language.Tag, opts ...Option) Caser { - return Caser{makeTitle(t, getOpts(opts...))} -} - -// Fold returns a Caser that implements Unicode case folding. The returned Caser -// is stateless and safe to use concurrently by multiple goroutines. -// -// Case folding does not normalize the input and may not preserve a normal form. -// Use the collate or search package for more convenient and linguistically -// sound comparisons. Use golang.org/x/text/secure/precis for string comparisons -// where security aspects are a concern. -func Fold(opts ...Option) Caser { - return Caser{makeFold(getOpts(opts...))} -} - -// An Option is used to modify the behavior of a Caser. -type Option func(o options) options - -// TODO: consider these options to take a boolean as well, like FinalSigma. -// The advantage of using this approach is that other providers of a lower-case -// algorithm could set different defaults by prefixing a user-provided slice -// of options with their own. This is handy, for instance, for the precis -// package which would override the default to not handle the Greek final sigma. - -var ( - // NoLower disables the lowercasing of non-leading letters for a title - // caser. - NoLower Option = noLower - - // Compact omits mappings in case folding for characters that would grow the - // input. (Unimplemented.) - Compact Option = compact -) - -// TODO: option to preserve a normal form, if applicable? - -type options struct { - noLower bool - simple bool - - // TODO: segmenter, max ignorable, alternative versions, etc. - - ignoreFinalSigma bool -} - -func getOpts(o ...Option) (res options) { - for _, f := range o { - res = f(res) - } - return -} - -func noLower(o options) options { - o.noLower = true - return o -} - -func compact(o options) options { - o.simple = true - return o -} - -// HandleFinalSigma specifies whether the special handling of Greek final sigma -// should be enabled. Unicode prescribes handling the Greek final sigma for all -// locales, but standards like IDNA and PRECIS override this default. -func HandleFinalSigma(enable bool) Option { - if enable { - return handleFinalSigma - } - return ignoreFinalSigma -} - -func ignoreFinalSigma(o options) options { - o.ignoreFinalSigma = true - return o -} - -func handleFinalSigma(o options) options { - o.ignoreFinalSigma = false - return o -} diff --git a/vendor/golang.org/x/text/cases/context.go b/vendor/golang.org/x/text/cases/context.go deleted file mode 100644 index e9aa9e193..000000000 --- a/vendor/golang.org/x/text/cases/context.go +++ /dev/null @@ -1,376 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package cases - -import "golang.org/x/text/transform" - -// A context is used for iterating over source bytes, fetching case info and -// writing to a destination buffer. -// -// Casing operations may need more than one rune of context to decide how a rune -// should be cased. Casing implementations should call checkpoint on context -// whenever it is known to be safe to return the runes processed so far. -// -// It is recommended for implementations to not allow for more than 30 case -// ignorables as lookahead (analogous to the limit in norm) and to use state if -// unbounded lookahead is needed for cased runes. -type context struct { - dst, src []byte - atEOF bool - - pDst int // pDst points past the last written rune in dst. - pSrc int // pSrc points to the start of the currently scanned rune. - - // checkpoints safe to return in Transform, where nDst <= pDst and nSrc <= pSrc. - nDst, nSrc int - err error - - sz int // size of current rune - info info // case information of currently scanned rune - - // State preserved across calls to Transform. - isMidWord bool // false if next cased letter needs to be title-cased. -} - -func (c *context) Reset() { - c.isMidWord = false -} - -// ret returns the return values for the Transform method. It checks whether -// there were insufficient bytes in src to complete and introduces an error -// accordingly, if necessary. -func (c *context) ret() (nDst, nSrc int, err error) { - if c.err != nil || c.nSrc == len(c.src) { - return c.nDst, c.nSrc, c.err - } - // This point is only reached by mappers if there was no short destination - // buffer. This means that the source buffer was exhausted and that c.sz was - // set to 0 by next. - if c.atEOF && c.pSrc == len(c.src) { - return c.pDst, c.pSrc, nil - } - return c.nDst, c.nSrc, transform.ErrShortSrc -} - -// retSpan returns the return values for the Span method. It checks whether -// there were insufficient bytes in src to complete and introduces an error -// accordingly, if necessary. -func (c *context) retSpan() (n int, err error) { - _, nSrc, err := c.ret() - return nSrc, err -} - -// checkpoint sets the return value buffer points for Transform to the current -// positions. -func (c *context) checkpoint() { - if c.err == nil { - c.nDst, c.nSrc = c.pDst, c.pSrc+c.sz - } -} - -// unreadRune causes the last rune read by next to be reread on the next -// invocation of next. Only one unreadRune may be called after a call to next. -func (c *context) unreadRune() { - c.sz = 0 -} - -func (c *context) next() bool { - c.pSrc += c.sz - if c.pSrc == len(c.src) || c.err != nil { - c.info, c.sz = 0, 0 - return false - } - v, sz := trie.lookup(c.src[c.pSrc:]) - c.info, c.sz = info(v), sz - if c.sz == 0 { - if c.atEOF { - // A zero size means we have an incomplete rune. If we are atEOF, - // this means it is an illegal rune, which we will consume one - // byte at a time. - c.sz = 1 - } else { - c.err = transform.ErrShortSrc - return false - } - } - return true -} - -// writeBytes adds bytes to dst. -func (c *context) writeBytes(b []byte) bool { - if len(c.dst)-c.pDst < len(b) { - c.err = transform.ErrShortDst - return false - } - // This loop is faster than using copy. - for _, ch := range b { - c.dst[c.pDst] = ch - c.pDst++ - } - return true -} - -// writeString writes the given string to dst. -func (c *context) writeString(s string) bool { - if len(c.dst)-c.pDst < len(s) { - c.err = transform.ErrShortDst - return false - } - // This loop is faster than using copy. - for i := 0; i < len(s); i++ { - c.dst[c.pDst] = s[i] - c.pDst++ - } - return true -} - -// copy writes the current rune to dst. -func (c *context) copy() bool { - return c.writeBytes(c.src[c.pSrc : c.pSrc+c.sz]) -} - -// copyXOR copies the current rune to dst and modifies it by applying the XOR -// pattern of the case info. It is the responsibility of the caller to ensure -// that this is a rune with a XOR pattern defined. -func (c *context) copyXOR() bool { - if !c.copy() { - return false - } - if c.info&xorIndexBit == 0 { - // Fast path for 6-bit XOR pattern, which covers most cases. - c.dst[c.pDst-1] ^= byte(c.info >> xorShift) - } else { - // Interpret XOR bits as an index. - // TODO: test performance for unrolling this loop. Verify that we have - // at least two bytes and at most three. - idx := c.info >> xorShift - for p := c.pDst - 1; ; p-- { - c.dst[p] ^= xorData[idx] - idx-- - if xorData[idx] == 0 { - break - } - } - } - return true -} - -// hasPrefix returns true if src[pSrc:] starts with the given string. -func (c *context) hasPrefix(s string) bool { - b := c.src[c.pSrc:] - if len(b) < len(s) { - return false - } - for i, c := range b[:len(s)] { - if c != s[i] { - return false - } - } - return true -} - -// caseType returns an info with only the case bits, normalized to either -// cLower, cUpper, cTitle or cUncased. -func (c *context) caseType() info { - cm := c.info & 0x7 - if cm < 4 { - return cm - } - if cm >= cXORCase { - // xor the last bit of the rune with the case type bits. - b := c.src[c.pSrc+c.sz-1] - return info(b&1) ^ cm&0x3 - } - if cm == cIgnorableCased { - return cLower - } - return cUncased -} - -// lower writes the lowercase version of the current rune to dst. -func lower(c *context) bool { - ct := c.caseType() - if c.info&hasMappingMask == 0 || ct == cLower { - return c.copy() - } - if c.info&exceptionBit == 0 { - return c.copyXOR() - } - e := exceptions[c.info>>exceptionShift:] - offset := 2 + e[0]&lengthMask // size of header + fold string - if nLower := (e[1] >> lengthBits) & lengthMask; nLower != noChange { - return c.writeString(e[offset : offset+nLower]) - } - return c.copy() -} - -func isLower(c *context) bool { - ct := c.caseType() - if c.info&hasMappingMask == 0 || ct == cLower { - return true - } - if c.info&exceptionBit == 0 { - c.err = transform.ErrEndOfSpan - return false - } - e := exceptions[c.info>>exceptionShift:] - if nLower := (e[1] >> lengthBits) & lengthMask; nLower != noChange { - c.err = transform.ErrEndOfSpan - return false - } - return true -} - -// upper writes the uppercase version of the current rune to dst. -func upper(c *context) bool { - ct := c.caseType() - if c.info&hasMappingMask == 0 || ct == cUpper { - return c.copy() - } - if c.info&exceptionBit == 0 { - return c.copyXOR() - } - e := exceptions[c.info>>exceptionShift:] - offset := 2 + e[0]&lengthMask // size of header + fold string - // Get length of first special case mapping. - n := (e[1] >> lengthBits) & lengthMask - if ct == cTitle { - // The first special case mapping is for lower. Set n to the second. - if n == noChange { - n = 0 - } - n, e = e[1]&lengthMask, e[n:] - } - if n != noChange { - return c.writeString(e[offset : offset+n]) - } - return c.copy() -} - -// isUpper writes the isUppercase version of the current rune to dst. -func isUpper(c *context) bool { - ct := c.caseType() - if c.info&hasMappingMask == 0 || ct == cUpper { - return true - } - if c.info&exceptionBit == 0 { - c.err = transform.ErrEndOfSpan - return false - } - e := exceptions[c.info>>exceptionShift:] - // Get length of first special case mapping. - n := (e[1] >> lengthBits) & lengthMask - if ct == cTitle { - n = e[1] & lengthMask - } - if n != noChange { - c.err = transform.ErrEndOfSpan - return false - } - return true -} - -// title writes the title case version of the current rune to dst. -func title(c *context) bool { - ct := c.caseType() - if c.info&hasMappingMask == 0 || ct == cTitle { - return c.copy() - } - if c.info&exceptionBit == 0 { - if ct == cLower { - return c.copyXOR() - } - return c.copy() - } - // Get the exception data. - e := exceptions[c.info>>exceptionShift:] - offset := 2 + e[0]&lengthMask // size of header + fold string - - nFirst := (e[1] >> lengthBits) & lengthMask - if nTitle := e[1] & lengthMask; nTitle != noChange { - if nFirst != noChange { - e = e[nFirst:] - } - return c.writeString(e[offset : offset+nTitle]) - } - if ct == cLower && nFirst != noChange { - // Use the uppercase version instead. - return c.writeString(e[offset : offset+nFirst]) - } - // Already in correct case. - return c.copy() -} - -// isTitle reports whether the current rune is in title case. -func isTitle(c *context) bool { - ct := c.caseType() - if c.info&hasMappingMask == 0 || ct == cTitle { - return true - } - if c.info&exceptionBit == 0 { - if ct == cLower { - c.err = transform.ErrEndOfSpan - return false - } - return true - } - // Get the exception data. - e := exceptions[c.info>>exceptionShift:] - if nTitle := e[1] & lengthMask; nTitle != noChange { - c.err = transform.ErrEndOfSpan - return false - } - nFirst := (e[1] >> lengthBits) & lengthMask - if ct == cLower && nFirst != noChange { - c.err = transform.ErrEndOfSpan - return false - } - return true -} - -// foldFull writes the foldFull version of the current rune to dst. -func foldFull(c *context) bool { - if c.info&hasMappingMask == 0 { - return c.copy() - } - ct := c.caseType() - if c.info&exceptionBit == 0 { - if ct != cLower || c.info&inverseFoldBit != 0 { - return c.copyXOR() - } - return c.copy() - } - e := exceptions[c.info>>exceptionShift:] - n := e[0] & lengthMask - if n == 0 { - if ct == cLower { - return c.copy() - } - n = (e[1] >> lengthBits) & lengthMask - } - return c.writeString(e[2 : 2+n]) -} - -// isFoldFull reports whether the current run is mapped to foldFull -func isFoldFull(c *context) bool { - if c.info&hasMappingMask == 0 { - return true - } - ct := c.caseType() - if c.info&exceptionBit == 0 { - if ct != cLower || c.info&inverseFoldBit != 0 { - c.err = transform.ErrEndOfSpan - return false - } - return true - } - e := exceptions[c.info>>exceptionShift:] - n := e[0] & lengthMask - if n == 0 && ct == cLower { - return true - } - c.err = transform.ErrEndOfSpan - return false -} diff --git a/vendor/golang.org/x/text/cases/fold.go b/vendor/golang.org/x/text/cases/fold.go deleted file mode 100644 index 85cc434fa..000000000 --- a/vendor/golang.org/x/text/cases/fold.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package cases - -import "golang.org/x/text/transform" - -type caseFolder struct{ transform.NopResetter } - -// caseFolder implements the Transformer interface for doing case folding. -func (t *caseFolder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { - c := context{dst: dst, src: src, atEOF: atEOF} - for c.next() { - foldFull(&c) - c.checkpoint() - } - return c.ret() -} - -func (t *caseFolder) Span(src []byte, atEOF bool) (n int, err error) { - c := context{src: src, atEOF: atEOF} - for c.next() && isFoldFull(&c) { - c.checkpoint() - } - return c.retSpan() -} - -func makeFold(o options) transform.SpanningTransformer { - // TODO: Special case folding, through option Language, Special/Turkic, or - // both. - // TODO: Implement Compact options. - return &caseFolder{} -} diff --git a/vendor/golang.org/x/text/cases/gen.go b/vendor/golang.org/x/text/cases/gen.go deleted file mode 100644 index 24b723003..000000000 --- a/vendor/golang.org/x/text/cases/gen.go +++ /dev/null @@ -1,839 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -// This program generates the trie for casing operations. The Unicode casing -// algorithm requires the lookup of various properties and mappings for each -// rune. The table generated by this generator combines several of the most -// frequently used of these into a single trie so that they can be accessed -// with a single lookup. -package main - -import ( - "bytes" - "fmt" - "io" - "io/ioutil" - "log" - "reflect" - "strconv" - "strings" - "unicode" - - "golang.org/x/text/internal/gen" - "golang.org/x/text/internal/triegen" - "golang.org/x/text/internal/ucd" - "golang.org/x/text/unicode/norm" -) - -func main() { - gen.Init() - genTables() - genTablesTest() - gen.Repackage("gen_trieval.go", "trieval.go", "cases") -} - -// runeInfo contains all information for a rune that we care about for casing -// operations. -type runeInfo struct { - Rune rune - - entry info // trie value for this rune. - - CaseMode info - - // Simple case mappings. - Simple [1 + maxCaseMode][]rune - - // Special casing - HasSpecial bool - Conditional bool - Special [1 + maxCaseMode][]rune - - // Folding - FoldSimple rune - FoldSpecial rune - FoldFull []rune - - // TODO: FC_NFKC, or equivalent data. - - // Properties - SoftDotted bool - CaseIgnorable bool - Cased bool - DecomposeGreek bool - BreakType string - BreakCat breakCategory - - // We care mostly about 0, Above, and IotaSubscript. - CCC byte -} - -type breakCategory int - -const ( - breakBreak breakCategory = iota - breakLetter - breakMid -) - -// mapping returns the case mapping for the given case type. -func (r *runeInfo) mapping(c info) string { - if r.HasSpecial { - return string(r.Special[c]) - } - if len(r.Simple[c]) != 0 { - return string(r.Simple[c]) - } - return string(r.Rune) -} - -func parse(file string, f func(p *ucd.Parser)) { - ucd.Parse(gen.OpenUCDFile(file), f) -} - -func parseUCD() []runeInfo { - chars := make([]runeInfo, unicode.MaxRune) - - get := func(r rune) *runeInfo { - c := &chars[r] - c.Rune = r - return c - } - - parse("UnicodeData.txt", func(p *ucd.Parser) { - ri := get(p.Rune(0)) - ri.CCC = byte(p.Int(ucd.CanonicalCombiningClass)) - ri.Simple[cLower] = p.Runes(ucd.SimpleLowercaseMapping) - ri.Simple[cUpper] = p.Runes(ucd.SimpleUppercaseMapping) - ri.Simple[cTitle] = p.Runes(ucd.SimpleTitlecaseMapping) - if p.String(ucd.GeneralCategory) == "Lt" { - ri.CaseMode = cTitle - } - }) - - // ; - parse("PropList.txt", func(p *ucd.Parser) { - if p.String(1) == "Soft_Dotted" { - chars[p.Rune(0)].SoftDotted = true - } - }) - - // ; - parse("DerivedCoreProperties.txt", func(p *ucd.Parser) { - ri := get(p.Rune(0)) - switch p.String(1) { - case "Case_Ignorable": - ri.CaseIgnorable = true - case "Cased": - ri.Cased = true - case "Lowercase": - ri.CaseMode = cLower - case "Uppercase": - ri.CaseMode = cUpper - } - }) - - // ; ; ; <upper> ; (<condition_list> ;)? - parse("SpecialCasing.txt", func(p *ucd.Parser) { - // We drop all conditional special casing and deal with them manually in - // the language-specific case mappers. Rune 0x03A3 is the only one with - // a conditional formatting that is not language-specific. However, - // dealing with this letter is tricky, especially in a streaming - // context, so we deal with it in the Caser for Greek specifically. - ri := get(p.Rune(0)) - if p.String(4) == "" { - ri.HasSpecial = true - ri.Special[cLower] = p.Runes(1) - ri.Special[cTitle] = p.Runes(2) - ri.Special[cUpper] = p.Runes(3) - } else { - ri.Conditional = true - } - }) - - // TODO: Use text breaking according to UAX #29. - // <code>; <word break type> - parse("auxiliary/WordBreakProperty.txt", func(p *ucd.Parser) { - ri := get(p.Rune(0)) - ri.BreakType = p.String(1) - - // We collapse the word breaking properties onto the categories we need. - switch p.String(1) { // TODO: officially we need to canonicalize. - case "MidLetter", "MidNumLet", "Single_Quote": - ri.BreakCat = breakMid - if !ri.CaseIgnorable { - // finalSigma relies on the fact that all breakMid runes are - // also a Case_Ignorable. Revisit this code when this changes. - log.Fatalf("Rune %U, which has a break category mid, is not a case ignorable", ri) - } - case "ALetter", "Hebrew_Letter", "Numeric", "Extend", "ExtendNumLet", "Format", "ZWJ": - ri.BreakCat = breakLetter - } - }) - - // <code>; <type>; <mapping> - parse("CaseFolding.txt", func(p *ucd.Parser) { - ri := get(p.Rune(0)) - switch p.String(1) { - case "C": - ri.FoldSimple = p.Rune(2) - ri.FoldFull = p.Runes(2) - case "S": - ri.FoldSimple = p.Rune(2) - case "T": - ri.FoldSpecial = p.Rune(2) - case "F": - ri.FoldFull = p.Runes(2) - default: - log.Fatalf("%U: unknown type: %s", p.Rune(0), p.String(1)) - } - }) - - return chars -} - -func genTables() { - chars := parseUCD() - verifyProperties(chars) - - t := triegen.NewTrie("case") - for i := range chars { - c := &chars[i] - makeEntry(c) - t.Insert(rune(i), uint64(c.entry)) - } - - w := gen.NewCodeWriter() - defer w.WriteGoFile("tables.go", "cases") - - gen.WriteUnicodeVersion(w) - - // TODO: write CLDR version after adding a mechanism to detect that the - // tables on which the manually created locale-sensitive casing code is - // based hasn't changed. - - w.WriteVar("xorData", string(xorData)) - w.WriteVar("exceptions", string(exceptionData)) - - sz, err := t.Gen(w, triegen.Compact(&sparseCompacter{})) - if err != nil { - log.Fatal(err) - } - w.Size += sz -} - -func makeEntry(ri *runeInfo) { - if ri.CaseIgnorable { - if ri.Cased { - ri.entry = cIgnorableCased - } else { - ri.entry = cIgnorableUncased - } - } else { - ri.entry = ri.CaseMode - } - - // TODO: handle soft-dotted. - - ccc := cccOther - switch ri.CCC { - case 0: // Not_Reordered - ccc = cccZero - case above: // Above - ccc = cccAbove - } - switch ri.BreakCat { - case breakBreak: - ccc = cccBreak - case breakMid: - ri.entry |= isMidBit - } - - ri.entry |= ccc - - if ri.CaseMode == cUncased { - return - } - - // Need to do something special. - if ri.CaseMode == cTitle || ri.HasSpecial || ri.mapping(cTitle) != ri.mapping(cUpper) { - makeException(ri) - return - } - if f := string(ri.FoldFull); len(f) > 0 && f != ri.mapping(cUpper) && f != ri.mapping(cLower) { - makeException(ri) - return - } - - // Rune is either lowercase or uppercase. - - orig := string(ri.Rune) - mapped := "" - if ri.CaseMode == cUpper { - mapped = ri.mapping(cLower) - } else { - mapped = ri.mapping(cUpper) - } - - if len(orig) != len(mapped) { - makeException(ri) - return - } - - if string(ri.FoldFull) == ri.mapping(cUpper) { - ri.entry |= inverseFoldBit - } - - n := len(orig) - - // Create per-byte XOR mask. - var b []byte - for i := 0; i < n; i++ { - b = append(b, orig[i]^mapped[i]) - } - - // Remove leading 0 bytes, but keep at least one byte. - for ; len(b) > 1 && b[0] == 0; b = b[1:] { - } - - if len(b) == 1 && b[0]&0xc0 == 0 { - ri.entry |= info(b[0]) << xorShift - return - } - - key := string(b) - x, ok := xorCache[key] - if !ok { - xorData = append(xorData, 0) // for detecting start of sequence - xorData = append(xorData, b...) - - x = len(xorData) - 1 - xorCache[key] = x - } - ri.entry |= info(x<<xorShift) | xorIndexBit -} - -var xorCache = map[string]int{} - -// xorData contains byte-wise XOR data for the least significant bytes of a -// UTF-8 encoded rune. An index points to the last byte. The sequence starts -// with a zero terminator. -var xorData = []byte{} - -// See the comments in gen_trieval.go re "the exceptions slice". -var exceptionData = []byte{0} - -// makeException encodes case mappings that cannot be expressed in a simple -// XOR diff. -func makeException(ri *runeInfo) { - ccc := ri.entry & cccMask - // Set exception bit and retain case type. - ri.entry &= 0x0007 - ri.entry |= exceptionBit - - if len(exceptionData) >= 1<<numExceptionBits { - log.Fatalf("%U:exceptionData too large %x > %d bits", ri.Rune, len(exceptionData), numExceptionBits) - } - - // Set the offset in the exceptionData array. - ri.entry |= info(len(exceptionData) << exceptionShift) - - orig := string(ri.Rune) - tc := ri.mapping(cTitle) - uc := ri.mapping(cUpper) - lc := ri.mapping(cLower) - ff := string(ri.FoldFull) - - // addString sets the length of a string and adds it to the expansions array. - addString := func(s string, b *byte) { - if len(s) == 0 { - // Zero-length mappings exist, but only for conditional casing, - // which we are representing outside of this table. - log.Fatalf("%U: has zero-length mapping.", ri.Rune) - } - *b <<= 3 - if s != orig { - n := len(s) - if n > 7 { - log.Fatalf("%U: mapping larger than 7 (%d)", ri.Rune, n) - } - *b |= byte(n) - exceptionData = append(exceptionData, s...) - } - } - - // byte 0: - exceptionData = append(exceptionData, byte(ccc)|byte(len(ff))) - - // byte 1: - p := len(exceptionData) - exceptionData = append(exceptionData, 0) - - if len(ff) > 7 { // May be zero-length. - log.Fatalf("%U: fold string larger than 7 (%d)", ri.Rune, len(ff)) - } - exceptionData = append(exceptionData, ff...) - ct := ri.CaseMode - if ct != cLower { - addString(lc, &exceptionData[p]) - } - if ct != cUpper { - addString(uc, &exceptionData[p]) - } - if ct != cTitle { - // If title is the same as upper, we set it to the original string so - // that it will be marked as not present. This implies title case is - // the same as upper case. - if tc == uc { - tc = orig - } - addString(tc, &exceptionData[p]) - } -} - -// sparseCompacter is a trie value block Compacter. There are many cases where -// successive runes alternate between lower- and upper-case. This Compacter -// exploits this by adding a special case type where the case value is obtained -// from or-ing it with the least-significant bit of the rune, creating large -// ranges of equal case values that compress well. -type sparseCompacter struct { - sparseBlocks [][]uint16 - sparseOffsets []uint16 - sparseCount int -} - -// makeSparse returns the number of elements that compact block would contain -// as well as the modified values. -func makeSparse(vals []uint64) ([]uint16, int) { - // Copy the values. - values := make([]uint16, len(vals)) - for i, v := range vals { - values[i] = uint16(v) - } - - alt := func(i int, v uint16) uint16 { - if cm := info(v & fullCasedMask); cm == cUpper || cm == cLower { - // Convert cLower or cUpper to cXORCase value, which has the form 11x. - xor := v - xor &^= 1 - xor |= uint16(i&1) ^ (v & 1) - xor |= 0x4 - return xor - } - return v - } - - var count int - var previous uint16 - for i, v := range values { - if v != 0 { - // Try if the unmodified value is equal to the previous. - if v == previous { - continue - } - - // Try if the xor-ed value is equal to the previous value. - a := alt(i, v) - if a == previous { - values[i] = a - continue - } - - // This is a new value. - count++ - - // Use the xor-ed value if it will be identical to the next value. - if p := i + 1; p < len(values) && alt(p, values[p]) == a { - values[i] = a - v = a - } - } - previous = v - } - return values, count -} - -func (s *sparseCompacter) Size(v []uint64) (int, bool) { - _, n := makeSparse(v) - - // We limit using this method to having 16 entries. - if n > 16 { - return 0, false - } - - return 2 + int(reflect.TypeOf(valueRange{}).Size())*n, true -} - -func (s *sparseCompacter) Store(v []uint64) uint32 { - h := uint32(len(s.sparseOffsets)) - values, sz := makeSparse(v) - s.sparseBlocks = append(s.sparseBlocks, values) - s.sparseOffsets = append(s.sparseOffsets, uint16(s.sparseCount)) - s.sparseCount += sz - return h -} - -func (s *sparseCompacter) Handler() string { - // The sparse global variable and its lookup method is defined in gen_trieval.go. - return "sparse.lookup" -} - -func (s *sparseCompacter) Print(w io.Writer) (retErr error) { - p := func(format string, args ...interface{}) { - _, err := fmt.Fprintf(w, format, args...) - if retErr == nil && err != nil { - retErr = err - } - } - - ls := len(s.sparseBlocks) - if ls == len(s.sparseOffsets) { - s.sparseOffsets = append(s.sparseOffsets, uint16(s.sparseCount)) - } - p("// sparseOffsets: %d entries, %d bytes\n", ls+1, (ls+1)*2) - p("var sparseOffsets = %#v\n\n", s.sparseOffsets) - - ns := s.sparseCount - p("// sparseValues: %d entries, %d bytes\n", ns, ns*4) - p("var sparseValues = [%d]valueRange {", ns) - for i, values := range s.sparseBlocks { - p("\n// Block %#x, offset %#x", i, s.sparseOffsets[i]) - var v uint16 - for i, nv := range values { - if nv != v { - if v != 0 { - p(",hi:%#02x},", 0x80+i-1) - } - if nv != 0 { - p("\n{value:%#04x,lo:%#02x", nv, 0x80+i) - } - } - v = nv - } - if v != 0 { - p(",hi:%#02x},", 0x80+len(values)-1) - } - } - p("\n}\n\n") - return -} - -// verifyProperties that properties of the runes that are relied upon in the -// implementation. Each property is marked with an identifier that is referred -// to in the places where it is used. -func verifyProperties(chars []runeInfo) { - for i, c := range chars { - r := rune(i) - - // Rune properties. - - // A.1: modifier never changes on lowercase. [ltLower] - if c.CCC > 0 && unicode.ToLower(r) != r { - log.Fatalf("%U: non-starter changes when lowercased", r) - } - - // A.2: properties of decompositions starting with I or J. [ltLower] - d := norm.NFD.PropertiesString(string(r)).Decomposition() - if len(d) > 0 { - if d[0] == 'I' || d[0] == 'J' { - // A.2.1: we expect at least an ASCII character and a modifier. - if len(d) < 3 { - log.Fatalf("%U: length of decomposition was %d; want >= 3", r, len(d)) - } - - // All subsequent runes are modifiers and all have the same CCC. - runes := []rune(string(d[1:])) - ccc := chars[runes[0]].CCC - - for _, mr := range runes[1:] { - mc := chars[mr] - - // A.2.2: all modifiers have a CCC of Above or less. - if ccc == 0 || ccc > above { - log.Fatalf("%U: CCC of successive rune (%U) was %d; want (0,230]", r, mr, ccc) - } - - // A.2.3: a sequence of modifiers all have the same CCC. - if mc.CCC != ccc { - log.Fatalf("%U: CCC of follow-up modifier (%U) was %d; want %d", r, mr, mc.CCC, ccc) - } - - // A.2.4: for each trailing r, r in [0x300, 0x311] <=> CCC == Above. - if (ccc == above) != (0x300 <= mr && mr <= 0x311) { - log.Fatalf("%U: modifier %U in [U+0300, U+0311] != ccc(%U) == 230", r, mr, mr) - } - - if i += len(string(mr)); i >= len(d) { - break - } - } - } - } - - // A.3: no U+0307 in decomposition of Soft-Dotted rune. [ltUpper] - if unicode.Is(unicode.Soft_Dotted, r) && strings.Contains(string(d), "\u0307") { - log.Fatalf("%U: decomposition of soft-dotted rune may not contain U+0307", r) - } - - // A.4: only rune U+0345 may be of CCC Iota_Subscript. [elUpper] - if c.CCC == iotaSubscript && r != 0x0345 { - log.Fatalf("%U: only rune U+0345 may have CCC Iota_Subscript", r) - } - - // A.5: soft-dotted runes do not have exceptions. - if c.SoftDotted && c.entry&exceptionBit != 0 { - log.Fatalf("%U: soft-dotted has exception", r) - } - - // A.6: Greek decomposition. [elUpper] - if unicode.Is(unicode.Greek, r) { - if b := norm.NFD.PropertiesString(string(r)).Decomposition(); b != nil { - runes := []rune(string(b)) - // A.6.1: If a Greek rune decomposes and the first rune of the - // decomposition is greater than U+00FF, the rune is always - // great and not a modifier. - if f := runes[0]; unicode.IsMark(f) || f > 0xFF && !unicode.Is(unicode.Greek, f) { - log.Fatalf("%U: expected first rune of Greek decomposition to be letter, found %U", r, f) - } - // A.6.2: Any follow-up rune in a Greek decomposition is a - // modifier of which the first should be gobbled in - // decomposition. - for _, m := range runes[1:] { - switch m { - case 0x0313, 0x0314, 0x0301, 0x0300, 0x0306, 0x0342, 0x0308, 0x0304, 0x345: - default: - log.Fatalf("%U: modifier %U is outside of expected Greek modifier set", r, m) - } - } - } - } - - // Breaking properties. - - // B.1: all runes with CCC > 0 are of break type Extend. - if c.CCC > 0 && c.BreakType != "Extend" { - log.Fatalf("%U: CCC == %d, but got break type %s; want Extend", r, c.CCC, c.BreakType) - } - - // B.2: all cased runes with c.CCC == 0 are of break type ALetter. - if c.CCC == 0 && c.Cased && c.BreakType != "ALetter" { - log.Fatalf("%U: cased, but got break type %s; want ALetter", r, c.BreakType) - } - - // B.3: letter category. - if c.CCC == 0 && c.BreakCat != breakBreak && !c.CaseIgnorable { - if c.BreakCat != breakLetter { - log.Fatalf("%U: check for letter break type gave %d; want %d", r, c.BreakCat, breakLetter) - } - } - } -} - -func genTablesTest() { - w := &bytes.Buffer{} - - fmt.Fprintln(w, "var (") - printProperties(w, "DerivedCoreProperties.txt", "Case_Ignorable", verifyIgnore) - - // We discard the output as we know we have perfect functions. We run them - // just to verify the properties are correct. - n := printProperties(ioutil.Discard, "DerivedCoreProperties.txt", "Cased", verifyCased) - n += printProperties(ioutil.Discard, "DerivedCoreProperties.txt", "Lowercase", verifyLower) - n += printProperties(ioutil.Discard, "DerivedCoreProperties.txt", "Uppercase", verifyUpper) - if n > 0 { - log.Fatalf("One of the discarded properties does not have a perfect filter.") - } - - // <code>; <lower> ; <title> ; <upper> ; (<condition_list> ;)? - fmt.Fprintln(w, "\tspecial = map[rune]struct{ toLower, toTitle, toUpper string }{") - parse("SpecialCasing.txt", func(p *ucd.Parser) { - // Skip conditional entries. - if p.String(4) != "" { - return - } - r := p.Rune(0) - fmt.Fprintf(w, "\t\t0x%04x: {%q, %q, %q},\n", - r, string(p.Runes(1)), string(p.Runes(2)), string(p.Runes(3))) - }) - fmt.Fprint(w, "\t}\n\n") - - // <code>; <type>; <runes> - table := map[rune]struct{ simple, full, special string }{} - parse("CaseFolding.txt", func(p *ucd.Parser) { - r := p.Rune(0) - t := p.String(1) - v := string(p.Runes(2)) - if t != "T" && v == string(unicode.ToLower(r)) { - return - } - x := table[r] - switch t { - case "C": - x.full = v - x.simple = v - case "S": - x.simple = v - case "F": - x.full = v - case "T": - x.special = v - } - table[r] = x - }) - fmt.Fprintln(w, "\tfoldMap = map[rune]struct{ simple, full, special string }{") - for r := rune(0); r < 0x10FFFF; r++ { - x, ok := table[r] - if !ok { - continue - } - fmt.Fprintf(w, "\t\t0x%04x: {%q, %q, %q},\n", r, x.simple, x.full, x.special) - } - fmt.Fprint(w, "\t}\n\n") - - // Break property - notBreak := map[rune]bool{} - parse("auxiliary/WordBreakProperty.txt", func(p *ucd.Parser) { - switch p.String(1) { - case "Extend", "Format", "MidLetter", "MidNumLet", "Single_Quote", - "ALetter", "Hebrew_Letter", "Numeric", "ExtendNumLet", "ZWJ": - notBreak[p.Rune(0)] = true - } - }) - - fmt.Fprintln(w, "\tbreakProp = []struct{ lo, hi rune }{") - inBreak := false - for r := rune(0); r <= lastRuneForTesting; r++ { - if isBreak := !notBreak[r]; isBreak != inBreak { - if isBreak { - fmt.Fprintf(w, "\t\t{0x%x, ", r) - } else { - fmt.Fprintf(w, "0x%x},\n", r-1) - } - inBreak = isBreak - } - } - if inBreak { - fmt.Fprintf(w, "0x%x},\n", lastRuneForTesting) - } - fmt.Fprint(w, "\t}\n\n") - - // Word break test - // Filter out all samples that do not contain cased characters. - cased := map[rune]bool{} - parse("DerivedCoreProperties.txt", func(p *ucd.Parser) { - if p.String(1) == "Cased" { - cased[p.Rune(0)] = true - } - }) - - fmt.Fprintln(w, "\tbreakTest = []string{") - parse("auxiliary/WordBreakTest.txt", func(p *ucd.Parser) { - c := strings.Split(p.String(0), " ") - - const sep = '|' - numCased := 0 - test := "" - for ; len(c) >= 2; c = c[2:] { - if c[0] == "÷" && test != "" { - test += string(sep) - } - i, err := strconv.ParseUint(c[1], 16, 32) - r := rune(i) - if err != nil { - log.Fatalf("Invalid rune %q.", c[1]) - } - if r == sep { - log.Fatalf("Separator %q not allowed in test data. Pick another one.", sep) - } - if cased[r] { - numCased++ - } - test += string(r) - } - if numCased > 1 { - fmt.Fprintf(w, "\t\t%q,\n", test) - } - }) - fmt.Fprintln(w, "\t}") - - fmt.Fprintln(w, ")") - - gen.WriteGoFile("tables_test.go", "cases", w.Bytes()) -} - -// These functions are just used for verification that their definition have not -// changed in the Unicode Standard. - -func verifyCased(r rune) bool { - return verifyLower(r) || verifyUpper(r) || unicode.IsTitle(r) -} - -func verifyLower(r rune) bool { - return unicode.IsLower(r) || unicode.Is(unicode.Other_Lowercase, r) -} - -func verifyUpper(r rune) bool { - return unicode.IsUpper(r) || unicode.Is(unicode.Other_Uppercase, r) -} - -// verifyIgnore is an approximation of the Case_Ignorable property using the -// core unicode package. It is used to reduce the size of the test data. -func verifyIgnore(r rune) bool { - props := []*unicode.RangeTable{ - unicode.Mn, - unicode.Me, - unicode.Cf, - unicode.Lm, - unicode.Sk, - } - for _, p := range props { - if unicode.Is(p, r) { - return true - } - } - return false -} - -// printProperties prints tables of rune properties from the given UCD file. -// A filter func f can be given to exclude certain values. A rune r will have -// the indicated property if it is in the generated table or if f(r). -func printProperties(w io.Writer, file, property string, f func(r rune) bool) int { - verify := map[rune]bool{} - n := 0 - varNameParts := strings.Split(property, "_") - varNameParts[0] = strings.ToLower(varNameParts[0]) - fmt.Fprintf(w, "\t%s = map[rune]bool{\n", strings.Join(varNameParts, "")) - parse(file, func(p *ucd.Parser) { - if p.String(1) == property { - r := p.Rune(0) - verify[r] = true - if !f(r) { - n++ - fmt.Fprintf(w, "\t\t0x%.4x: true,\n", r) - } - } - }) - fmt.Fprint(w, "\t}\n\n") - - // Verify that f is correct, that is, it represents a subset of the property. - for r := rune(0); r <= lastRuneForTesting; r++ { - if !verify[r] && f(r) { - log.Fatalf("Incorrect filter func for property %q.", property) - } - } - return n -} - -// The newCaseTrie, sparseValues and sparseOffsets definitions below are -// placeholders referred to by gen_trieval.go. The real definitions are -// generated by this program and written to tables.go. - -func newCaseTrie(int) int { return 0 } - -var ( - sparseValues [0]valueRange - sparseOffsets [0]uint16 -) diff --git a/vendor/golang.org/x/text/cases/gen_trieval.go b/vendor/golang.org/x/text/cases/gen_trieval.go deleted file mode 100644 index 376d22c8f..000000000 --- a/vendor/golang.org/x/text/cases/gen_trieval.go +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -package main - -// This file contains definitions for interpreting the trie value of the case -// trie generated by "go run gen*.go". It is shared by both the generator -// program and the resultant package. Sharing is achieved by the generator -// copying gen_trieval.go to trieval.go and changing what's above this comment. - -// info holds case information for a single rune. It is the value returned -// by a trie lookup. Most mapping information can be stored in a single 16-bit -// value. If not, for example when a rune is mapped to multiple runes, the value -// stores some basic case data and an index into an array with additional data. -// -// The per-rune values have the following format: -// -// if (exception) { -// 15..5 unsigned exception index -// 4 unused -// } else { -// 15..8 XOR pattern or index to XOR pattern for case mapping -// Only 13..8 are used for XOR patterns. -// 7 inverseFold (fold to upper, not to lower) -// 6 index: interpret the XOR pattern as an index -// or isMid if case mode is cIgnorableUncased. -// 5..4 CCC: zero (normal or break), above or other -// } -// 3 exception: interpret this value as an exception index -// (TODO: is this bit necessary? Probably implied from case mode.) -// 2..0 case mode -// -// For the non-exceptional cases, a rune must be either uncased, lowercase or -// uppercase. If the rune is cased, the XOR pattern maps either a lowercase -// rune to uppercase or an uppercase rune to lowercase (applied to the 10 -// least-significant bits of the rune). -// -// See the definitions below for a more detailed description of the various -// bits. -type info uint16 - -const ( - casedMask = 0x0003 - fullCasedMask = 0x0007 - ignorableMask = 0x0006 - ignorableValue = 0x0004 - - inverseFoldBit = 1 << 7 - isMidBit = 1 << 6 - - exceptionBit = 1 << 3 - exceptionShift = 5 - numExceptionBits = 11 - - xorIndexBit = 1 << 6 - xorShift = 8 - - // There is no mapping if all xor bits and the exception bit are zero. - hasMappingMask = 0xff80 | exceptionBit -) - -// The case mode bits encodes the case type of a rune. This includes uncased, -// title, upper and lower case and case ignorable. (For a definition of these -// terms see Chapter 3 of The Unicode Standard Core Specification.) In some rare -// cases, a rune can be both cased and case-ignorable. This is encoded by -// cIgnorableCased. A rune of this type is always lower case. Some runes are -// cased while not having a mapping. -// -// A common pattern for scripts in the Unicode standard is for upper and lower -// case runes to alternate for increasing rune values (e.g. the accented Latin -// ranges starting from U+0100 and U+1E00 among others and some Cyrillic -// characters). We use this property by defining a cXORCase mode, where the case -// mode (always upper or lower case) is derived from the rune value. As the XOR -// pattern for case mappings is often identical for successive runes, using -// cXORCase can result in large series of identical trie values. This, in turn, -// allows us to better compress the trie blocks. -const ( - cUncased info = iota // 000 - cTitle // 001 - cLower // 010 - cUpper // 011 - cIgnorableUncased // 100 - cIgnorableCased // 101 // lower case if mappings exist - cXORCase // 11x // case is cLower | ((rune&1) ^ x) - - maxCaseMode = cUpper -) - -func (c info) isCased() bool { - return c&casedMask != 0 -} - -func (c info) isCaseIgnorable() bool { - return c&ignorableMask == ignorableValue -} - -func (c info) isNotCasedAndNotCaseIgnorable() bool { - return c&fullCasedMask == 0 -} - -func (c info) isCaseIgnorableAndNotCased() bool { - return c&fullCasedMask == cIgnorableUncased -} - -func (c info) isMid() bool { - return c&(fullCasedMask|isMidBit) == isMidBit|cIgnorableUncased -} - -// The case mapping implementation will need to know about various Canonical -// Combining Class (CCC) values. We encode two of these in the trie value: -// cccZero (0) and cccAbove (230). If the value is cccOther, it means that -// CCC(r) > 0, but not 230. A value of cccBreak means that CCC(r) == 0 and that -// the rune also has the break category Break (see below). -const ( - cccBreak info = iota << 4 - cccZero - cccAbove - cccOther - - cccMask = cccBreak | cccZero | cccAbove | cccOther -) - -const ( - starter = 0 - above = 230 - iotaSubscript = 240 -) - -// The exceptions slice holds data that does not fit in a normal info entry. -// The entry is pointed to by the exception index in an entry. It has the -// following format: -// -// Header -// byte 0: -// 7..6 unused -// 5..4 CCC type (same bits as entry) -// 3 unused -// 2..0 length of fold -// -// byte 1: -// 7..6 unused -// 5..3 length of 1st mapping of case type -// 2..0 length of 2nd mapping of case type -// -// case 1st 2nd -// lower -> upper, title -// upper -> lower, title -// title -> lower, upper -// -// Lengths with the value 0x7 indicate no value and implies no change. -// A length of 0 indicates a mapping to zero-length string. -// -// Body bytes: -// case folding bytes -// lowercase mapping bytes -// uppercase mapping bytes -// titlecase mapping bytes -// closure mapping bytes (for NFKC_Casefold). (TODO) -// -// Fallbacks: -// missing fold -> lower -// missing title -> upper -// all missing -> original rune -// -// exceptions starts with a dummy byte to enforce that there is no zero index -// value. -const ( - lengthMask = 0x07 - lengthBits = 3 - noChange = 0 -) - -// References to generated trie. - -var trie = newCaseTrie(0) - -var sparse = sparseBlocks{ - values: sparseValues[:], - offsets: sparseOffsets[:], -} - -// Sparse block lookup code. - -// valueRange is an entry in a sparse block. -type valueRange struct { - value uint16 - lo, hi byte -} - -type sparseBlocks struct { - values []valueRange - offsets []uint16 -} - -// lookup returns the value from values block n for byte b using binary search. -func (s *sparseBlocks) lookup(n uint32, b byte) uint16 { - lo := s.offsets[n] - hi := s.offsets[n+1] - for lo < hi { - m := lo + (hi-lo)/2 - r := s.values[m] - if r.lo <= b && b <= r.hi { - return r.value - } - if b < r.lo { - hi = m - } else { - lo = m + 1 - } - } - return 0 -} - -// lastRuneForTesting is the last rune used for testing. Everything after this -// is boring. -const lastRuneForTesting = rune(0x1FFFF) diff --git a/vendor/golang.org/x/text/cases/icu.go b/vendor/golang.org/x/text/cases/icu.go deleted file mode 100644 index 46530d1e4..000000000 --- a/vendor/golang.org/x/text/cases/icu.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build icu - -package cases - -// Ideally these functions would be defined in a test file, but go test doesn't -// allow CGO in tests. The build tag should ensure either way that these -// functions will not end up in the package. - -// TODO: Ensure that the correct ICU version is set. - -/* -#cgo LDFLAGS: -licui18n.57 -licuuc.57 -#include <stdlib.h> -#include <unicode/ustring.h> -#include <unicode/utypes.h> -#include <unicode/localpointer.h> -#include <unicode/ucasemap.h> -*/ -import "C" - -import "unsafe" - -func doICU(tag, caser, input string) string { - err := C.UErrorCode(0) - loc := C.CString(tag) - cm := C.ucasemap_open(loc, C.uint32_t(0), &err) - - buf := make([]byte, len(input)*4) - dst := (*C.char)(unsafe.Pointer(&buf[0])) - src := C.CString(input) - - cn := C.int32_t(0) - - switch caser { - case "fold": - cn = C.ucasemap_utf8FoldCase(cm, - dst, C.int32_t(len(buf)), - src, C.int32_t(len(input)), - &err) - case "lower": - cn = C.ucasemap_utf8ToLower(cm, - dst, C.int32_t(len(buf)), - src, C.int32_t(len(input)), - &err) - case "upper": - cn = C.ucasemap_utf8ToUpper(cm, - dst, C.int32_t(len(buf)), - src, C.int32_t(len(input)), - &err) - case "title": - cn = C.ucasemap_utf8ToTitle(cm, - dst, C.int32_t(len(buf)), - src, C.int32_t(len(input)), - &err) - } - return string(buf[:cn]) -} diff --git a/vendor/golang.org/x/text/cases/info.go b/vendor/golang.org/x/text/cases/info.go deleted file mode 100644 index 3b51f03d6..000000000 --- a/vendor/golang.org/x/text/cases/info.go +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package cases - -func (c info) cccVal() info { - if c&exceptionBit != 0 { - return info(exceptions[c>>exceptionShift]) & cccMask - } - return c & cccMask -} - -func (c info) cccType() info { - ccc := c.cccVal() - if ccc <= cccZero { - return cccZero - } - return ccc -} - -// TODO: Implement full Unicode breaking algorithm: -// 1) Implement breaking in separate package. -// 2) Use the breaker here. -// 3) Compare table size and performance of using the more generic breaker. -// -// Note that we can extend the current algorithm to be much more accurate. This -// only makes sense, though, if the performance and/or space penalty of using -// the generic breaker is big. Extra data will only be needed for non-cased -// runes, which means there are sufficient bits left in the caseType. -// ICU prohibits breaking in such cases as well. - -// For the purpose of title casing we use an approximation of the Unicode Word -// Breaking algorithm defined in Annex #29: -// http://www.unicode.org/reports/tr29/#Default_Grapheme_Cluster_Table. -// -// For our approximation, we group the Word Break types into the following -// categories, with associated rules: -// -// 1) Letter: -// ALetter, Hebrew_Letter, Numeric, ExtendNumLet, Extend, Format_FE, ZWJ. -// Rule: Never break between consecutive runes of this category. -// -// 2) Mid: -// MidLetter, MidNumLet, Single_Quote. -// (Cf. case-ignorable: MidLetter, MidNumLet, Single_Quote or cat is Mn, -// Me, Cf, Lm or Sk). -// Rule: Don't break between Letter and Mid, but break between two Mids. -// -// 3) Break: -// Any other category: NewLine, MidNum, CR, LF, Double_Quote, Katakana, and -// Other. -// These categories should always result in a break between two cased letters. -// Rule: Always break. -// -// Note 1: the Katakana and MidNum categories can, in esoteric cases, result in -// preventing a break between two cased letters. For now we will ignore this -// (e.g. [ALetter] [ExtendNumLet] [Katakana] [ExtendNumLet] [ALetter] and -// [ALetter] [Numeric] [MidNum] [Numeric] [ALetter].) -// -// Note 2: the rule for Mid is very approximate, but works in most cases. To -// improve, we could store the categories in the trie value and use a FA to -// manage breaks. See TODO comment above. -// -// Note 3: according to the spec, it is possible for the Extend category to -// introduce breaks between other categories grouped in Letter. However, this -// is undesirable for our purposes. ICU prevents breaks in such cases as well. - -// isBreak returns whether this rune should introduce a break. -func (c info) isBreak() bool { - return c.cccVal() == cccBreak -} - -// isLetter returns whether the rune is of break type ALetter, Hebrew_Letter, -// Numeric, ExtendNumLet, or Extend. -func (c info) isLetter() bool { - ccc := c.cccVal() - if ccc == cccZero { - return !c.isCaseIgnorable() - } - return ccc != cccBreak -} diff --git a/vendor/golang.org/x/text/cases/map.go b/vendor/golang.org/x/text/cases/map.go deleted file mode 100644 index 4baebaaa6..000000000 --- a/vendor/golang.org/x/text/cases/map.go +++ /dev/null @@ -1,816 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package cases - -// This file contains the definitions of case mappings for all supported -// languages. The rules for the language-specific tailorings were taken and -// modified from the CLDR transform definitions in common/transforms. - -import ( - "strings" - "unicode" - "unicode/utf8" - - "golang.org/x/text/internal" - "golang.org/x/text/language" - "golang.org/x/text/transform" - "golang.org/x/text/unicode/norm" -) - -// A mapFunc takes a context set to the current rune and writes the mapped -// version to the same context. It may advance the context to the next rune. It -// returns whether a checkpoint is possible: whether the pDst bytes written to -// dst so far won't need changing as we see more source bytes. -type mapFunc func(*context) bool - -// A spanFunc takes a context set to the current rune and returns whether this -// rune would be altered when written to the output. It may advance the context -// to the next rune. It returns whether a checkpoint is possible. -type spanFunc func(*context) bool - -// maxIgnorable defines the maximum number of ignorables to consider for -// lookahead operations. -const maxIgnorable = 30 - -// supported lists the language tags for which we have tailorings. -const supported = "und af az el lt nl tr" - -func init() { - tags := []language.Tag{} - for _, s := range strings.Split(supported, " ") { - tags = append(tags, language.MustParse(s)) - } - matcher = internal.NewInheritanceMatcher(tags) - Supported = language.NewCoverage(tags) -} - -var ( - matcher *internal.InheritanceMatcher - - Supported language.Coverage - - // We keep the following lists separate, instead of having a single per- - // language struct, to give the compiler a chance to remove unused code. - - // Some uppercase mappers are stateless, so we can precompute the - // Transformers and save a bit on runtime allocations. - upperFunc = []struct { - upper mapFunc - span spanFunc - }{ - {nil, nil}, // und - {nil, nil}, // af - {aztrUpper(upper), isUpper}, // az - {elUpper, noSpan}, // el - {ltUpper(upper), noSpan}, // lt - {nil, nil}, // nl - {aztrUpper(upper), isUpper}, // tr - } - - undUpper transform.SpanningTransformer = &undUpperCaser{} - undLower transform.SpanningTransformer = &undLowerCaser{} - undLowerIgnoreSigma transform.SpanningTransformer = &undLowerIgnoreSigmaCaser{} - - lowerFunc = []mapFunc{ - nil, // und - nil, // af - aztrLower, // az - nil, // el - ltLower, // lt - nil, // nl - aztrLower, // tr - } - - titleInfos = []struct { - title mapFunc - lower mapFunc - titleSpan spanFunc - rewrite func(*context) - }{ - {title, lower, isTitle, nil}, // und - {title, lower, isTitle, afnlRewrite}, // af - {aztrUpper(title), aztrLower, isTitle, nil}, // az - {title, lower, isTitle, nil}, // el - {ltUpper(title), ltLower, noSpan, nil}, // lt - {nlTitle, lower, nlTitleSpan, afnlRewrite}, // nl - {aztrUpper(title), aztrLower, isTitle, nil}, // tr - } -) - -func makeUpper(t language.Tag, o options) transform.SpanningTransformer { - _, i, _ := matcher.Match(t) - f := upperFunc[i].upper - if f == nil { - return undUpper - } - return &simpleCaser{f: f, span: upperFunc[i].span} -} - -func makeLower(t language.Tag, o options) transform.SpanningTransformer { - _, i, _ := matcher.Match(t) - f := lowerFunc[i] - if f == nil { - if o.ignoreFinalSigma { - return undLowerIgnoreSigma - } - return undLower - } - if o.ignoreFinalSigma { - return &simpleCaser{f: f, span: isLower} - } - return &lowerCaser{ - first: f, - midWord: finalSigma(f), - } -} - -func makeTitle(t language.Tag, o options) transform.SpanningTransformer { - _, i, _ := matcher.Match(t) - x := &titleInfos[i] - lower := x.lower - if o.noLower { - lower = (*context).copy - } else if !o.ignoreFinalSigma { - lower = finalSigma(lower) - } - return &titleCaser{ - title: x.title, - lower: lower, - titleSpan: x.titleSpan, - rewrite: x.rewrite, - } -} - -func noSpan(c *context) bool { - c.err = transform.ErrEndOfSpan - return false -} - -// TODO: consider a similar special case for the fast majority lower case. This -// is a bit more involved so will require some more precise benchmarking to -// justify it. - -type undUpperCaser struct{ transform.NopResetter } - -// undUpperCaser implements the Transformer interface for doing an upper case -// mapping for the root locale (und). It eliminates the need for an allocation -// as it prevents escaping by not using function pointers. -func (t undUpperCaser) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { - c := context{dst: dst, src: src, atEOF: atEOF} - for c.next() { - upper(&c) - c.checkpoint() - } - return c.ret() -} - -func (t undUpperCaser) Span(src []byte, atEOF bool) (n int, err error) { - c := context{src: src, atEOF: atEOF} - for c.next() && isUpper(&c) { - c.checkpoint() - } - return c.retSpan() -} - -// undLowerIgnoreSigmaCaser implements the Transformer interface for doing -// a lower case mapping for the root locale (und) ignoring final sigma -// handling. This casing algorithm is used in some performance-critical packages -// like secure/precis and x/net/http/idna, which warrants its special-casing. -type undLowerIgnoreSigmaCaser struct{ transform.NopResetter } - -func (t undLowerIgnoreSigmaCaser) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { - c := context{dst: dst, src: src, atEOF: atEOF} - for c.next() && lower(&c) { - c.checkpoint() - } - return c.ret() - -} - -// Span implements a generic lower-casing. This is possible as isLower works -// for all lowercasing variants. All lowercase variants only vary in how they -// transform a non-lowercase letter. They will never change an already lowercase -// letter. In addition, there is no state. -func (t undLowerIgnoreSigmaCaser) Span(src []byte, atEOF bool) (n int, err error) { - c := context{src: src, atEOF: atEOF} - for c.next() && isLower(&c) { - c.checkpoint() - } - return c.retSpan() -} - -type simpleCaser struct { - context - f mapFunc - span spanFunc -} - -// simpleCaser implements the Transformer interface for doing a case operation -// on a rune-by-rune basis. -func (t *simpleCaser) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { - c := context{dst: dst, src: src, atEOF: atEOF} - for c.next() && t.f(&c) { - c.checkpoint() - } - return c.ret() -} - -func (t *simpleCaser) Span(src []byte, atEOF bool) (n int, err error) { - c := context{src: src, atEOF: atEOF} - for c.next() && t.span(&c) { - c.checkpoint() - } - return c.retSpan() -} - -// undLowerCaser implements the Transformer interface for doing a lower case -// mapping for the root locale (und) ignoring final sigma handling. This casing -// algorithm is used in some performance-critical packages like secure/precis -// and x/net/http/idna, which warrants its special-casing. -type undLowerCaser struct{ transform.NopResetter } - -func (t undLowerCaser) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { - c := context{dst: dst, src: src, atEOF: atEOF} - - for isInterWord := true; c.next(); { - if isInterWord { - if c.info.isCased() { - if !lower(&c) { - break - } - isInterWord = false - } else if !c.copy() { - break - } - } else { - if c.info.isNotCasedAndNotCaseIgnorable() { - if !c.copy() { - break - } - isInterWord = true - } else if !c.hasPrefix("Σ") { - if !lower(&c) { - break - } - } else if !finalSigmaBody(&c) { - break - } - } - c.checkpoint() - } - return c.ret() -} - -func (t undLowerCaser) Span(src []byte, atEOF bool) (n int, err error) { - c := context{src: src, atEOF: atEOF} - for c.next() && isLower(&c) { - c.checkpoint() - } - return c.retSpan() -} - -// lowerCaser implements the Transformer interface. The default Unicode lower -// casing requires different treatment for the first and subsequent characters -// of a word, most notably to handle the Greek final Sigma. -type lowerCaser struct { - undLowerIgnoreSigmaCaser - - context - - first, midWord mapFunc -} - -func (t *lowerCaser) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { - t.context = context{dst: dst, src: src, atEOF: atEOF} - c := &t.context - - for isInterWord := true; c.next(); { - if isInterWord { - if c.info.isCased() { - if !t.first(c) { - break - } - isInterWord = false - } else if !c.copy() { - break - } - } else { - if c.info.isNotCasedAndNotCaseIgnorable() { - if !c.copy() { - break - } - isInterWord = true - } else if !t.midWord(c) { - break - } - } - c.checkpoint() - } - return c.ret() -} - -// titleCaser implements the Transformer interface. Title casing algorithms -// distinguish between the first letter of a word and subsequent letters of the -// same word. It uses state to avoid requiring a potentially infinite lookahead. -type titleCaser struct { - context - - // rune mappings used by the actual casing algorithms. - title mapFunc - lower mapFunc - titleSpan spanFunc - - rewrite func(*context) -} - -// Transform implements the standard Unicode title case algorithm as defined in -// Chapter 3 of The Unicode Standard: -// toTitlecase(X): Find the word boundaries in X according to Unicode Standard -// Annex #29, "Unicode Text Segmentation." For each word boundary, find the -// first cased character F following the word boundary. If F exists, map F to -// Titlecase_Mapping(F); then map all characters C between F and the following -// word boundary to Lowercase_Mapping(C). -func (t *titleCaser) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { - t.context = context{dst: dst, src: src, atEOF: atEOF, isMidWord: t.isMidWord} - c := &t.context - - if !c.next() { - return c.ret() - } - - for { - p := c.info - if t.rewrite != nil { - t.rewrite(c) - } - - wasMid := p.isMid() - // Break out of this loop on failure to ensure we do not modify the - // state incorrectly. - if p.isCased() { - if !c.isMidWord { - if !t.title(c) { - break - } - c.isMidWord = true - } else if !t.lower(c) { - break - } - } else if !c.copy() { - break - } else if p.isBreak() { - c.isMidWord = false - } - - // As we save the state of the transformer, it is safe to call - // checkpoint after any successful write. - if !(c.isMidWord && wasMid) { - c.checkpoint() - } - - if !c.next() { - break - } - if wasMid && c.info.isMid() { - c.isMidWord = false - } - } - return c.ret() -} - -func (t *titleCaser) Span(src []byte, atEOF bool) (n int, err error) { - t.context = context{src: src, atEOF: atEOF, isMidWord: t.isMidWord} - c := &t.context - - if !c.next() { - return c.retSpan() - } - - for { - p := c.info - if t.rewrite != nil { - t.rewrite(c) - } - - wasMid := p.isMid() - // Break out of this loop on failure to ensure we do not modify the - // state incorrectly. - if p.isCased() { - if !c.isMidWord { - if !t.titleSpan(c) { - break - } - c.isMidWord = true - } else if !isLower(c) { - break - } - } else if p.isBreak() { - c.isMidWord = false - } - // As we save the state of the transformer, it is safe to call - // checkpoint after any successful write. - if !(c.isMidWord && wasMid) { - c.checkpoint() - } - - if !c.next() { - break - } - if wasMid && c.info.isMid() { - c.isMidWord = false - } - } - return c.retSpan() -} - -// finalSigma adds Greek final Sigma handing to another casing function. It -// determines whether a lowercased sigma should be σ or ς, by looking ahead for -// case-ignorables and a cased letters. -func finalSigma(f mapFunc) mapFunc { - return func(c *context) bool { - if !c.hasPrefix("Σ") { - return f(c) - } - return finalSigmaBody(c) - } -} - -func finalSigmaBody(c *context) bool { - // Current rune must be ∑. - - // ::NFD(); - // # 03A3; 03C2; 03A3; 03A3; Final_Sigma; # GREEK CAPITAL LETTER SIGMA - // Σ } [:case-ignorable:]* [:cased:] → σ; - // [:cased:] [:case-ignorable:]* { Σ → ς; - // ::Any-Lower; - // ::NFC(); - - p := c.pDst - c.writeString("ς") - - // TODO: we should do this here, but right now this will never have an - // effect as this is called when the prefix is Sigma, whereas Dutch and - // Afrikaans only test for an apostrophe. - // - // if t.rewrite != nil { - // t.rewrite(c) - // } - - // We need to do one more iteration after maxIgnorable, as a cased - // letter is not an ignorable and may modify the result. - wasMid := false - for i := 0; i < maxIgnorable+1; i++ { - if !c.next() { - return false - } - if !c.info.isCaseIgnorable() { - // All Midword runes are also case ignorable, so we are - // guaranteed to have a letter or word break here. As we are - // unreading the run, there is no need to unset c.isMidWord; - // the title caser will handle this. - if c.info.isCased() { - // p+1 is guaranteed to be in bounds: if writing ς was - // successful, p+1 will contain the second byte of ς. If not, - // this function will have returned after c.next returned false. - c.dst[p+1]++ // ς → σ - } - c.unreadRune() - return true - } - // A case ignorable may also introduce a word break, so we may need - // to continue searching even after detecting a break. - isMid := c.info.isMid() - if (wasMid && isMid) || c.info.isBreak() { - c.isMidWord = false - } - wasMid = isMid - c.copy() - } - return true -} - -// finalSigmaSpan would be the same as isLower. - -// elUpper implements Greek upper casing, which entails removing a predefined -// set of non-blocked modifiers. Note that these accents should not be removed -// for title casing! -// Example: "Οδός" -> "ΟΔΟΣ". -func elUpper(c *context) bool { - // From CLDR: - // [:Greek:] [^[:ccc=Not_Reordered:][:ccc=Above:]]*? { [\u0313\u0314\u0301\u0300\u0306\u0342\u0308\u0304] → ; - // [:Greek:] [^[:ccc=Not_Reordered:][:ccc=Iota_Subscript:]]*? { \u0345 → ; - - r, _ := utf8.DecodeRune(c.src[c.pSrc:]) - oldPDst := c.pDst - if !upper(c) { - return false - } - if !unicode.Is(unicode.Greek, r) { - return true - } - i := 0 - // Take the properties of the uppercased rune that is already written to the - // destination. This saves us the trouble of having to uppercase the - // decomposed rune again. - if b := norm.NFD.Properties(c.dst[oldPDst:]).Decomposition(); b != nil { - // Restore the destination position and process the decomposed rune. - r, sz := utf8.DecodeRune(b) - if r <= 0xFF { // See A.6.1 - return true - } - c.pDst = oldPDst - // Insert the first rune and ignore the modifiers. See A.6.2. - c.writeBytes(b[:sz]) - i = len(b[sz:]) / 2 // Greek modifiers are always of length 2. - } - - for ; i < maxIgnorable && c.next(); i++ { - switch r, _ := utf8.DecodeRune(c.src[c.pSrc:]); r { - // Above and Iota Subscript - case 0x0300, // U+0300 COMBINING GRAVE ACCENT - 0x0301, // U+0301 COMBINING ACUTE ACCENT - 0x0304, // U+0304 COMBINING MACRON - 0x0306, // U+0306 COMBINING BREVE - 0x0308, // U+0308 COMBINING DIAERESIS - 0x0313, // U+0313 COMBINING COMMA ABOVE - 0x0314, // U+0314 COMBINING REVERSED COMMA ABOVE - 0x0342, // U+0342 COMBINING GREEK PERISPOMENI - 0x0345: // U+0345 COMBINING GREEK YPOGEGRAMMENI - // No-op. Gobble the modifier. - - default: - switch v, _ := trie.lookup(c.src[c.pSrc:]); info(v).cccType() { - case cccZero: - c.unreadRune() - return true - - // We don't need to test for IotaSubscript as the only rune that - // qualifies (U+0345) was already excluded in the switch statement - // above. See A.4. - - case cccAbove: - return c.copy() - default: - // Some other modifier. We're still allowed to gobble Greek - // modifiers after this. - c.copy() - } - } - } - return i == maxIgnorable -} - -// TODO: implement elUpperSpan (low-priority: complex and infrequent). - -func ltLower(c *context) bool { - // From CLDR: - // # Introduce an explicit dot above when lowercasing capital I's and J's - // # whenever there are more accents above. - // # (of the accents used in Lithuanian: grave, acute, tilde above, and ogonek) - // # 0049; 0069 0307; 0049; 0049; lt More_Above; # LATIN CAPITAL LETTER I - // # 004A; 006A 0307; 004A; 004A; lt More_Above; # LATIN CAPITAL LETTER J - // # 012E; 012F 0307; 012E; 012E; lt More_Above; # LATIN CAPITAL LETTER I WITH OGONEK - // # 00CC; 0069 0307 0300; 00CC; 00CC; lt; # LATIN CAPITAL LETTER I WITH GRAVE - // # 00CD; 0069 0307 0301; 00CD; 00CD; lt; # LATIN CAPITAL LETTER I WITH ACUTE - // # 0128; 0069 0307 0303; 0128; 0128; lt; # LATIN CAPITAL LETTER I WITH TILDE - // ::NFD(); - // I } [^[:ccc=Not_Reordered:][:ccc=Above:]]* [:ccc=Above:] → i \u0307; - // J } [^[:ccc=Not_Reordered:][:ccc=Above:]]* [:ccc=Above:] → j \u0307; - // I \u0328 (Į) } [^[:ccc=Not_Reordered:][:ccc=Above:]]* [:ccc=Above:] → i \u0328 \u0307; - // I \u0300 (Ì) → i \u0307 \u0300; - // I \u0301 (Í) → i \u0307 \u0301; - // I \u0303 (Ĩ) → i \u0307 \u0303; - // ::Any-Lower(); - // ::NFC(); - - i := 0 - if r := c.src[c.pSrc]; r < utf8.RuneSelf { - lower(c) - if r != 'I' && r != 'J' { - return true - } - } else { - p := norm.NFD.Properties(c.src[c.pSrc:]) - if d := p.Decomposition(); len(d) >= 3 && (d[0] == 'I' || d[0] == 'J') { - // UTF-8 optimization: the decomposition will only have an above - // modifier if the last rune of the decomposition is in [U+300-U+311]. - // In all other cases, a decomposition starting with I is always - // an I followed by modifiers that are not cased themselves. See A.2. - if d[1] == 0xCC && d[2] <= 0x91 { // A.2.4. - if !c.writeBytes(d[:1]) { - return false - } - c.dst[c.pDst-1] += 'a' - 'A' // lower - - // Assumption: modifier never changes on lowercase. See A.1. - // Assumption: all modifiers added have CCC = Above. See A.2.3. - return c.writeString("\u0307") && c.writeBytes(d[1:]) - } - // In all other cases the additional modifiers will have a CCC - // that is less than 230 (Above). We will insert the U+0307, if - // needed, after these modifiers so that a string in FCD form - // will remain so. See A.2.2. - lower(c) - i = 1 - } else { - return lower(c) - } - } - - for ; i < maxIgnorable && c.next(); i++ { - switch c.info.cccType() { - case cccZero: - c.unreadRune() - return true - case cccAbove: - return c.writeString("\u0307") && c.copy() // See A.1. - default: - c.copy() // See A.1. - } - } - return i == maxIgnorable -} - -// ltLowerSpan would be the same as isLower. - -func ltUpper(f mapFunc) mapFunc { - return func(c *context) bool { - // Unicode: - // 0307; 0307; ; ; lt After_Soft_Dotted; # COMBINING DOT ABOVE - // - // From CLDR: - // # Remove \u0307 following soft-dotteds (i, j, and the like), with possible - // # intervening non-230 marks. - // ::NFD(); - // [:Soft_Dotted:] [^[:ccc=Not_Reordered:][:ccc=Above:]]* { \u0307 → ; - // ::Any-Upper(); - // ::NFC(); - - // TODO: See A.5. A soft-dotted rune never has an exception. This would - // allow us to overload the exception bit and encode this property in - // info. Need to measure performance impact of this. - r, _ := utf8.DecodeRune(c.src[c.pSrc:]) - oldPDst := c.pDst - if !f(c) { - return false - } - if !unicode.Is(unicode.Soft_Dotted, r) { - return true - } - - // We don't need to do an NFD normalization, as a soft-dotted rune never - // contains U+0307. See A.3. - - i := 0 - for ; i < maxIgnorable && c.next(); i++ { - switch c.info.cccType() { - case cccZero: - c.unreadRune() - return true - case cccAbove: - if c.hasPrefix("\u0307") { - // We don't do a full NFC, but rather combine runes for - // some of the common cases. (Returning NFC or - // preserving normal form is neither a requirement nor - // a possibility anyway). - if !c.next() { - return false - } - if c.dst[oldPDst] == 'I' && c.pDst == oldPDst+1 && c.src[c.pSrc] == 0xcc { - s := "" - switch c.src[c.pSrc+1] { - case 0x80: // U+0300 COMBINING GRAVE ACCENT - s = "\u00cc" // U+00CC LATIN CAPITAL LETTER I WITH GRAVE - case 0x81: // U+0301 COMBINING ACUTE ACCENT - s = "\u00cd" // U+00CD LATIN CAPITAL LETTER I WITH ACUTE - case 0x83: // U+0303 COMBINING TILDE - s = "\u0128" // U+0128 LATIN CAPITAL LETTER I WITH TILDE - case 0x88: // U+0308 COMBINING DIAERESIS - s = "\u00cf" // U+00CF LATIN CAPITAL LETTER I WITH DIAERESIS - default: - } - if s != "" { - c.pDst = oldPDst - return c.writeString(s) - } - } - } - return c.copy() - default: - c.copy() - } - } - return i == maxIgnorable - } -} - -// TODO: implement ltUpperSpan (low priority: complex and infrequent). - -func aztrUpper(f mapFunc) mapFunc { - return func(c *context) bool { - // i→İ; - if c.src[c.pSrc] == 'i' { - return c.writeString("İ") - } - return f(c) - } -} - -func aztrLower(c *context) (done bool) { - // From CLDR: - // # I and i-dotless; I-dot and i are case pairs in Turkish and Azeri - // # 0130; 0069; 0130; 0130; tr; # LATIN CAPITAL LETTER I WITH DOT ABOVE - // İ→i; - // # When lowercasing, remove dot_above in the sequence I + dot_above, which will turn into i. - // # This matches the behavior of the canonically equivalent I-dot_above - // # 0307; ; 0307; 0307; tr After_I; # COMBINING DOT ABOVE - // # When lowercasing, unless an I is before a dot_above, it turns into a dotless i. - // # 0049; 0131; 0049; 0049; tr Not_Before_Dot; # LATIN CAPITAL LETTER I - // I([^[:ccc=Not_Reordered:][:ccc=Above:]]*)\u0307 → i$1 ; - // I→ı ; - // ::Any-Lower(); - if c.hasPrefix("\u0130") { // İ - return c.writeString("i") - } - if c.src[c.pSrc] != 'I' { - return lower(c) - } - - // We ignore the lower-case I for now, but insert it later when we know - // which form we need. - start := c.pSrc + c.sz - - i := 0 -Loop: - // We check for up to n ignorables before \u0307. As \u0307 is an - // ignorable as well, n is maxIgnorable-1. - for ; i < maxIgnorable && c.next(); i++ { - switch c.info.cccType() { - case cccAbove: - if c.hasPrefix("\u0307") { - return c.writeString("i") && c.writeBytes(c.src[start:c.pSrc]) // ignore U+0307 - } - done = true - break Loop - case cccZero: - c.unreadRune() - done = true - break Loop - default: - // We'll write this rune after we know which starter to use. - } - } - if i == maxIgnorable { - done = true - } - return c.writeString("ı") && c.writeBytes(c.src[start:c.pSrc+c.sz]) && done -} - -// aztrLowerSpan would be the same as isLower. - -func nlTitle(c *context) bool { - // From CLDR: - // # Special titlecasing for Dutch initial "ij". - // ::Any-Title(); - // # Fix up Ij at the beginning of a "word" (per Any-Title, notUAX #29) - // [:^WB=ALetter:] [:WB=Extend:]* [[:WB=MidLetter:][:WB=MidNumLet:]]? { Ij } → IJ ; - if c.src[c.pSrc] != 'I' && c.src[c.pSrc] != 'i' { - return title(c) - } - - if !c.writeString("I") || !c.next() { - return false - } - if c.src[c.pSrc] == 'j' || c.src[c.pSrc] == 'J' { - return c.writeString("J") - } - c.unreadRune() - return true -} - -func nlTitleSpan(c *context) bool { - // From CLDR: - // # Special titlecasing for Dutch initial "ij". - // ::Any-Title(); - // # Fix up Ij at the beginning of a "word" (per Any-Title, notUAX #29) - // [:^WB=ALetter:] [:WB=Extend:]* [[:WB=MidLetter:][:WB=MidNumLet:]]? { Ij } → IJ ; - if c.src[c.pSrc] != 'I' { - return isTitle(c) - } - if !c.next() || c.src[c.pSrc] == 'j' { - return false - } - if c.src[c.pSrc] != 'J' { - c.unreadRune() - } - return true -} - -// Not part of CLDR, but see http://unicode.org/cldr/trac/ticket/7078. -func afnlRewrite(c *context) { - if c.hasPrefix("'") || c.hasPrefix("’") { - c.isMidWord = true - } -} diff --git a/vendor/golang.org/x/text/cases/tables.go b/vendor/golang.org/x/text/cases/tables.go deleted file mode 100644 index e6e95a685..000000000 --- a/vendor/golang.org/x/text/cases/tables.go +++ /dev/null @@ -1,2211 +0,0 @@ -// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. - -package cases - -// UnicodeVersion is the Unicode version from which the tables in this package are derived. -const UnicodeVersion = "9.0.0" - -var xorData string = "" + // Size: 185 bytes - "\x00\x06\x07\x00\x01?\x00\x0f\x03\x00\x0f\x12\x00\x0f\x1f\x00\x0f\x1d" + - "\x00\x01\x13\x00\x0f\x16\x00\x0f\x0b\x00\x0f3\x00\x0f7\x00\x01#\x00\x0f?" + - "\x00\x0e'\x00\x0f/\x00\x0e>\x00\x0f*\x00\x0c&\x00\x0c*\x00\x0c;\x00\x0c9" + - "\x00\x0c%\x00\x01\x08\x00\x03\x0d\x00\x03\x09\x00\x02\x06\x00\x02\x02" + - "\x00\x02\x0c\x00\x01\x00\x00\x01\x03\x00\x01\x01\x00\x01 \x00\x01\x0c" + - "\x00\x01\x10\x00\x03\x10\x00\x036 \x00\x037 \x00\x0b#\x10\x00\x0b 0\x00" + - "\x0b!\x10\x00\x0b!0\x00\x0b(\x04\x00\x03\x04\x1e\x00\x03\x0a\x00\x02:" + - "\x00\x02>\x00\x02,\x00\x02\x00\x00\x02\x10\x00\x01<\x00\x01&\x00\x01*" + - "\x00\x01.\x00\x010\x003 \x00\x01\x18\x00\x01(\x00\x01\x1e\x00\x01\x22" - -var exceptions string = "" + // Size: 1852 bytes - "\x00\x12\x10μΜ\x12\x12ssSSSs\x13\x18i̇i̇\x10\x08I\x13\x18ʼnʼN\x11\x08sS" + - "\x12\x12dždžDž\x12\x12dždžDŽ\x10\x12DŽDž\x12\x12ljljLj\x12\x12ljljLJ\x10\x12LJLj\x12\x12" + - "njnjNj\x12\x12njnjNJ\x10\x12NJNj\x13\x18ǰJ̌\x12\x12dzdzDz\x12\x12dzdzDZ\x10\x12DZDz" + - "\x13\x18ⱥⱥ\x13\x18ⱦⱦ\x10\x18Ȿ\x10\x18Ɀ\x10\x18Ɐ\x10\x18Ɑ\x10\x18Ɒ\x10" + - "\x18Ɜ\x10\x18Ɡ\x10\x18Ɥ\x10\x18Ɦ\x10\x18Ɪ\x10\x18Ɫ\x10\x18Ɬ\x10\x18Ɱ\x10" + - "\x18Ɽ\x10\x18Ʇ\x10\x18Ʝ\x10\x18Ʞ2\x10ιΙ\x160ΐΪ́\x160ΰΫ́\x12\x10σΣ" + - "\x12\x10βΒ\x12\x10θΘ\x12\x10φΦ\x12\x10πΠ\x12\x10κΚ\x12\x10ρΡ\x12\x10εΕ" + - "\x14$եւԵՒԵւ\x12\x10вВ\x12\x10дД\x12\x10оО\x12\x10сС\x12\x10тТ\x12\x10тТ" + - "\x12\x10ъЪ\x12\x10ѣѢ\x13\x18ꙋꙊ\x13\x18ẖH̱\x13\x18ẗT̈\x13\x18ẘW̊\x13" + - "\x18ẙY̊\x13\x18aʾAʾ\x13\x18ṡṠ\x12\x10ssß\x14 ὐΥ̓\x160ὒΥ̓̀\x160ὔΥ̓́" + - "\x160ὖΥ̓͂\x15+ἀιἈΙᾈ\x15+ἁιἉΙᾉ\x15+ἂιἊΙᾊ\x15+ἃιἋΙᾋ\x15+ἄιἌΙᾌ\x15+ἅιἍΙᾍ" + - "\x15+ἆιἎΙᾎ\x15+ἇιἏΙᾏ\x15\x1dἀιᾀἈΙ\x15\x1dἁιᾁἉΙ\x15\x1dἂιᾂἊΙ\x15\x1dἃιᾃἋΙ" + - "\x15\x1dἄιᾄἌΙ\x15\x1dἅιᾅἍΙ\x15\x1dἆιᾆἎΙ\x15\x1dἇιᾇἏΙ\x15+ἠιἨΙᾘ\x15+ἡιἩΙᾙ" + - "\x15+ἢιἪΙᾚ\x15+ἣιἫΙᾛ\x15+ἤιἬΙᾜ\x15+ἥιἭΙᾝ\x15+ἦιἮΙᾞ\x15+ἧιἯΙᾟ\x15\x1dἠιᾐἨ" + - "Ι\x15\x1dἡιᾑἩΙ\x15\x1dἢιᾒἪΙ\x15\x1dἣιᾓἫΙ\x15\x1dἤιᾔἬΙ\x15\x1dἥιᾕἭΙ\x15" + - "\x1dἦιᾖἮΙ\x15\x1dἧιᾗἯΙ\x15+ὠιὨΙᾨ\x15+ὡιὩΙᾩ\x15+ὢιὪΙᾪ\x15+ὣιὫΙᾫ\x15+ὤιὬΙᾬ" + - "\x15+ὥιὭΙᾭ\x15+ὦιὮΙᾮ\x15+ὧιὯΙᾯ\x15\x1dὠιᾠὨΙ\x15\x1dὡιᾡὩΙ\x15\x1dὢιᾢὪΙ" + - "\x15\x1dὣιᾣὫΙ\x15\x1dὤιᾤὬΙ\x15\x1dὥιᾥὭΙ\x15\x1dὦιᾦὮΙ\x15\x1dὧιᾧὯΙ\x15-ὰι" + - "ᾺΙᾺͅ\x14#αιΑΙᾼ\x14$άιΆΙΆͅ\x14 ᾶΑ͂\x166ᾶιΑ͂Ιᾼ͂\x14\x1cαιᾳΑΙ\x12\x10ι" + - "Ι\x15-ὴιῊΙῊͅ\x14#ηιΗΙῌ\x14$ήιΉΙΉͅ\x14 ῆΗ͂\x166ῆιΗ͂Ιῌ͂\x14\x1cηιῃΗΙ" + - "\x160ῒΪ̀\x160ΐΪ́\x14 ῖΙ͂\x160ῗΪ͂\x160ῢΫ̀\x160ΰΫ́\x14 ῤΡ" + - "̓\x14 ῦΥ͂\x160ῧΫ͂\x15-ὼιῺΙῺͅ\x14#ωιΩΙῼ\x14$ώιΏΙΏͅ\x14 ῶΩ͂\x166ῶιΩ" + - "͂Ιῼ͂\x14\x1cωιῳΩΙ\x12\x10ωω\x11\x08kk\x12\x10åå\x12\x10ɫɫ\x12\x10ɽɽ" + - "\x10\x10Ⱥ\x10\x10Ⱦ\x12\x10ɑɑ\x12\x10ɱɱ\x12\x10ɐɐ\x12\x10ɒɒ\x12\x10ȿȿ\x12" + - "\x10ɀɀ\x12\x10ɥɥ\x12\x10ɦɦ\x12\x10ɜɜ\x12\x10ɡɡ\x12\x10ɬɬ\x12\x10ɪɪ\x12" + - "\x10ʞʞ\x12\x10ʇʇ\x12\x10ʝʝ\x12\x12ffFFFf\x12\x12fiFIFi\x12\x12flFLFl\x13" + - "\x1bffiFFIFfi\x13\x1bfflFFLFfl\x12\x12stSTSt\x12\x12stSTSt\x14$մնՄՆՄն" + - "\x14$մեՄԵՄե\x14$միՄԻՄի\x14$վնՎՆՎն\x14$մխՄԽՄխ" - -// lookup returns the trie value for the first UTF-8 encoding in s and -// the width in bytes of this encoding. The size will be 0 if s does not -// hold enough bytes to complete the encoding. len(s) must be greater than 0. -func (t *caseTrie) lookup(s []byte) (v uint16, sz int) { - c0 := s[0] - switch { - case c0 < 0x80: // is ASCII - return caseValues[c0], 1 - case c0 < 0xC2: - return 0, 1 // Illegal UTF-8: not a starter, not ASCII. - case c0 < 0xE0: // 2-byte UTF-8 - if len(s) < 2 { - return 0, 0 - } - i := caseIndex[c0] - c1 := s[1] - if c1 < 0x80 || 0xC0 <= c1 { - return 0, 1 // Illegal UTF-8: not a continuation byte. - } - return t.lookupValue(uint32(i), c1), 2 - case c0 < 0xF0: // 3-byte UTF-8 - if len(s) < 3 { - return 0, 0 - } - i := caseIndex[c0] - c1 := s[1] - if c1 < 0x80 || 0xC0 <= c1 { - return 0, 1 // Illegal UTF-8: not a continuation byte. - } - o := uint32(i)<<6 + uint32(c1) - i = caseIndex[o] - c2 := s[2] - if c2 < 0x80 || 0xC0 <= c2 { - return 0, 2 // Illegal UTF-8: not a continuation byte. - } - return t.lookupValue(uint32(i), c2), 3 - case c0 < 0xF8: // 4-byte UTF-8 - if len(s) < 4 { - return 0, 0 - } - i := caseIndex[c0] - c1 := s[1] - if c1 < 0x80 || 0xC0 <= c1 { - return 0, 1 // Illegal UTF-8: not a continuation byte. - } - o := uint32(i)<<6 + uint32(c1) - i = caseIndex[o] - c2 := s[2] - if c2 < 0x80 || 0xC0 <= c2 { - return 0, 2 // Illegal UTF-8: not a continuation byte. - } - o = uint32(i)<<6 + uint32(c2) - i = caseIndex[o] - c3 := s[3] - if c3 < 0x80 || 0xC0 <= c3 { - return 0, 3 // Illegal UTF-8: not a continuation byte. - } - return t.lookupValue(uint32(i), c3), 4 - } - // Illegal rune - return 0, 1 -} - -// lookupUnsafe returns the trie value for the first UTF-8 encoding in s. -// s must start with a full and valid UTF-8 encoded rune. -func (t *caseTrie) lookupUnsafe(s []byte) uint16 { - c0 := s[0] - if c0 < 0x80 { // is ASCII - return caseValues[c0] - } - i := caseIndex[c0] - if c0 < 0xE0 { // 2-byte UTF-8 - return t.lookupValue(uint32(i), s[1]) - } - i = caseIndex[uint32(i)<<6+uint32(s[1])] - if c0 < 0xF0 { // 3-byte UTF-8 - return t.lookupValue(uint32(i), s[2]) - } - i = caseIndex[uint32(i)<<6+uint32(s[2])] - if c0 < 0xF8 { // 4-byte UTF-8 - return t.lookupValue(uint32(i), s[3]) - } - return 0 -} - -// lookupString returns the trie value for the first UTF-8 encoding in s and -// the width in bytes of this encoding. The size will be 0 if s does not -// hold enough bytes to complete the encoding. len(s) must be greater than 0. -func (t *caseTrie) lookupString(s string) (v uint16, sz int) { - c0 := s[0] - switch { - case c0 < 0x80: // is ASCII - return caseValues[c0], 1 - case c0 < 0xC2: - return 0, 1 // Illegal UTF-8: not a starter, not ASCII. - case c0 < 0xE0: // 2-byte UTF-8 - if len(s) < 2 { - return 0, 0 - } - i := caseIndex[c0] - c1 := s[1] - if c1 < 0x80 || 0xC0 <= c1 { - return 0, 1 // Illegal UTF-8: not a continuation byte. - } - return t.lookupValue(uint32(i), c1), 2 - case c0 < 0xF0: // 3-byte UTF-8 - if len(s) < 3 { - return 0, 0 - } - i := caseIndex[c0] - c1 := s[1] - if c1 < 0x80 || 0xC0 <= c1 { - return 0, 1 // Illegal UTF-8: not a continuation byte. - } - o := uint32(i)<<6 + uint32(c1) - i = caseIndex[o] - c2 := s[2] - if c2 < 0x80 || 0xC0 <= c2 { - return 0, 2 // Illegal UTF-8: not a continuation byte. - } - return t.lookupValue(uint32(i), c2), 3 - case c0 < 0xF8: // 4-byte UTF-8 - if len(s) < 4 { - return 0, 0 - } - i := caseIndex[c0] - c1 := s[1] - if c1 < 0x80 || 0xC0 <= c1 { - return 0, 1 // Illegal UTF-8: not a continuation byte. - } - o := uint32(i)<<6 + uint32(c1) - i = caseIndex[o] - c2 := s[2] - if c2 < 0x80 || 0xC0 <= c2 { - return 0, 2 // Illegal UTF-8: not a continuation byte. - } - o = uint32(i)<<6 + uint32(c2) - i = caseIndex[o] - c3 := s[3] - if c3 < 0x80 || 0xC0 <= c3 { - return 0, 3 // Illegal UTF-8: not a continuation byte. - } - return t.lookupValue(uint32(i), c3), 4 - } - // Illegal rune - return 0, 1 -} - -// lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s. -// s must start with a full and valid UTF-8 encoded rune. -func (t *caseTrie) lookupStringUnsafe(s string) uint16 { - c0 := s[0] - if c0 < 0x80 { // is ASCII - return caseValues[c0] - } - i := caseIndex[c0] - if c0 < 0xE0 { // 2-byte UTF-8 - return t.lookupValue(uint32(i), s[1]) - } - i = caseIndex[uint32(i)<<6+uint32(s[1])] - if c0 < 0xF0 { // 3-byte UTF-8 - return t.lookupValue(uint32(i), s[2]) - } - i = caseIndex[uint32(i)<<6+uint32(s[2])] - if c0 < 0xF8 { // 4-byte UTF-8 - return t.lookupValue(uint32(i), s[3]) - } - return 0 -} - -// caseTrie. Total size: 11742 bytes (11.47 KiB). Checksum: 147a11466b427436. -type caseTrie struct{} - -func newCaseTrie(i int) *caseTrie { - return &caseTrie{} -} - -// lookupValue determines the type of block n and looks up the value for b. -func (t *caseTrie) lookupValue(n uint32, b byte) uint16 { - switch { - case n < 18: - return uint16(caseValues[n<<6+uint32(b)]) - default: - n -= 18 - return uint16(sparse.lookup(n, b)) - } -} - -// caseValues: 20 blocks, 1280 entries, 2560 bytes -// The third block is the zero block. -var caseValues = [1280]uint16{ - // Block 0x0, offset 0x0 - 0x27: 0x0054, - 0x2e: 0x0054, - 0x30: 0x0010, 0x31: 0x0010, 0x32: 0x0010, 0x33: 0x0010, 0x34: 0x0010, 0x35: 0x0010, - 0x36: 0x0010, 0x37: 0x0010, 0x38: 0x0010, 0x39: 0x0010, 0x3a: 0x0054, - // Block 0x1, offset 0x40 - 0x41: 0x2013, 0x42: 0x2013, 0x43: 0x2013, 0x44: 0x2013, 0x45: 0x2013, - 0x46: 0x2013, 0x47: 0x2013, 0x48: 0x2013, 0x49: 0x2013, 0x4a: 0x2013, 0x4b: 0x2013, - 0x4c: 0x2013, 0x4d: 0x2013, 0x4e: 0x2013, 0x4f: 0x2013, 0x50: 0x2013, 0x51: 0x2013, - 0x52: 0x2013, 0x53: 0x2013, 0x54: 0x2013, 0x55: 0x2013, 0x56: 0x2013, 0x57: 0x2013, - 0x58: 0x2013, 0x59: 0x2013, 0x5a: 0x2013, - 0x5e: 0x0004, 0x5f: 0x0010, 0x60: 0x0004, 0x61: 0x2012, 0x62: 0x2012, 0x63: 0x2012, - 0x64: 0x2012, 0x65: 0x2012, 0x66: 0x2012, 0x67: 0x2012, 0x68: 0x2012, 0x69: 0x2012, - 0x6a: 0x2012, 0x6b: 0x2012, 0x6c: 0x2012, 0x6d: 0x2012, 0x6e: 0x2012, 0x6f: 0x2012, - 0x70: 0x2012, 0x71: 0x2012, 0x72: 0x2012, 0x73: 0x2012, 0x74: 0x2012, 0x75: 0x2012, - 0x76: 0x2012, 0x77: 0x2012, 0x78: 0x2012, 0x79: 0x2012, 0x7a: 0x2012, - // Block 0x2, offset 0x80 - // Block 0x3, offset 0xc0 - 0xc0: 0x0852, 0xc1: 0x0b53, 0xc2: 0x0113, 0xc3: 0x0112, 0xc4: 0x0113, 0xc5: 0x0112, - 0xc6: 0x0b53, 0xc7: 0x0f13, 0xc8: 0x0f12, 0xc9: 0x0e53, 0xca: 0x1153, 0xcb: 0x0713, - 0xcc: 0x0712, 0xcd: 0x0012, 0xce: 0x1453, 0xcf: 0x1753, 0xd0: 0x1a53, 0xd1: 0x0313, - 0xd2: 0x0312, 0xd3: 0x1d53, 0xd4: 0x2053, 0xd5: 0x2352, 0xd6: 0x2653, 0xd7: 0x2653, - 0xd8: 0x0113, 0xd9: 0x0112, 0xda: 0x2952, 0xdb: 0x0012, 0xdc: 0x1d53, 0xdd: 0x2c53, - 0xde: 0x2f52, 0xdf: 0x3253, 0xe0: 0x0113, 0xe1: 0x0112, 0xe2: 0x0113, 0xe3: 0x0112, - 0xe4: 0x0113, 0xe5: 0x0112, 0xe6: 0x3553, 0xe7: 0x0f13, 0xe8: 0x0f12, 0xe9: 0x3853, - 0xea: 0x0012, 0xeb: 0x0012, 0xec: 0x0113, 0xed: 0x0112, 0xee: 0x3553, 0xef: 0x1f13, - 0xf0: 0x1f12, 0xf1: 0x3b53, 0xf2: 0x3e53, 0xf3: 0x0713, 0xf4: 0x0712, 0xf5: 0x0313, - 0xf6: 0x0312, 0xf7: 0x4153, 0xf8: 0x0113, 0xf9: 0x0112, 0xfa: 0x0012, 0xfb: 0x0010, - 0xfc: 0x0113, 0xfd: 0x0112, 0xfe: 0x0012, 0xff: 0x4452, - // Block 0x4, offset 0x100 - 0x100: 0x0010, 0x101: 0x0010, 0x102: 0x0010, 0x103: 0x0010, 0x104: 0x04cb, 0x105: 0x05c9, - 0x106: 0x06ca, 0x107: 0x078b, 0x108: 0x0889, 0x109: 0x098a, 0x10a: 0x0a4b, 0x10b: 0x0b49, - 0x10c: 0x0c4a, 0x10d: 0x0313, 0x10e: 0x0312, 0x10f: 0x1f13, 0x110: 0x1f12, 0x111: 0x0313, - 0x112: 0x0312, 0x113: 0x0713, 0x114: 0x0712, 0x115: 0x0313, 0x116: 0x0312, 0x117: 0x0f13, - 0x118: 0x0f12, 0x119: 0x0313, 0x11a: 0x0312, 0x11b: 0x0713, 0x11c: 0x0712, 0x11d: 0x1452, - 0x11e: 0x0113, 0x11f: 0x0112, 0x120: 0x0113, 0x121: 0x0112, 0x122: 0x0113, 0x123: 0x0112, - 0x124: 0x0113, 0x125: 0x0112, 0x126: 0x0113, 0x127: 0x0112, 0x128: 0x0113, 0x129: 0x0112, - 0x12a: 0x0113, 0x12b: 0x0112, 0x12c: 0x0113, 0x12d: 0x0112, 0x12e: 0x0113, 0x12f: 0x0112, - 0x130: 0x0d0a, 0x131: 0x0e0b, 0x132: 0x0f09, 0x133: 0x100a, 0x134: 0x0113, 0x135: 0x0112, - 0x136: 0x2353, 0x137: 0x4453, 0x138: 0x0113, 0x139: 0x0112, 0x13a: 0x0113, 0x13b: 0x0112, - 0x13c: 0x0113, 0x13d: 0x0112, 0x13e: 0x0113, 0x13f: 0x0112, - // Block 0x5, offset 0x140 - 0x140: 0x136a, 0x141: 0x0313, 0x142: 0x0312, 0x143: 0x0853, 0x144: 0x4753, 0x145: 0x4a53, - 0x146: 0x0113, 0x147: 0x0112, 0x148: 0x0113, 0x149: 0x0112, 0x14a: 0x0113, 0x14b: 0x0112, - 0x14c: 0x0113, 0x14d: 0x0112, 0x14e: 0x0113, 0x14f: 0x0112, 0x150: 0x140a, 0x151: 0x14aa, - 0x152: 0x154a, 0x153: 0x0b52, 0x154: 0x0b52, 0x155: 0x0012, 0x156: 0x0e52, 0x157: 0x1152, - 0x158: 0x0012, 0x159: 0x1752, 0x15a: 0x0012, 0x15b: 0x1a52, 0x15c: 0x15ea, 0x15d: 0x0012, - 0x15e: 0x0012, 0x15f: 0x0012, 0x160: 0x1d52, 0x161: 0x168a, 0x162: 0x0012, 0x163: 0x2052, - 0x164: 0x0012, 0x165: 0x172a, 0x166: 0x17ca, 0x167: 0x0012, 0x168: 0x2652, 0x169: 0x2652, - 0x16a: 0x186a, 0x16b: 0x190a, 0x16c: 0x19aa, 0x16d: 0x0012, 0x16e: 0x0012, 0x16f: 0x1d52, - 0x170: 0x0012, 0x171: 0x1a4a, 0x172: 0x2c52, 0x173: 0x0012, 0x174: 0x0012, 0x175: 0x3252, - 0x176: 0x0012, 0x177: 0x0012, 0x178: 0x0012, 0x179: 0x0012, 0x17a: 0x0012, 0x17b: 0x0012, - 0x17c: 0x0012, 0x17d: 0x1aea, 0x17e: 0x0012, 0x17f: 0x0012, - // Block 0x6, offset 0x180 - 0x180: 0x3552, 0x181: 0x0012, 0x182: 0x0012, 0x183: 0x3852, 0x184: 0x0012, 0x185: 0x0012, - 0x186: 0x0012, 0x187: 0x1b8a, 0x188: 0x3552, 0x189: 0x4752, 0x18a: 0x3b52, 0x18b: 0x3e52, - 0x18c: 0x4a52, 0x18d: 0x0012, 0x18e: 0x0012, 0x18f: 0x0012, 0x190: 0x0012, 0x191: 0x0012, - 0x192: 0x4152, 0x193: 0x0012, 0x194: 0x0010, 0x195: 0x0012, 0x196: 0x0012, 0x197: 0x0012, - 0x198: 0x0012, 0x199: 0x0012, 0x19a: 0x0012, 0x19b: 0x0012, 0x19c: 0x0012, 0x19d: 0x1c2a, - 0x19e: 0x1cca, 0x19f: 0x0012, 0x1a0: 0x0012, 0x1a1: 0x0012, 0x1a2: 0x0012, 0x1a3: 0x0012, - 0x1a4: 0x0012, 0x1a5: 0x0012, 0x1a6: 0x0012, 0x1a7: 0x0012, 0x1a8: 0x0012, 0x1a9: 0x0012, - 0x1aa: 0x0012, 0x1ab: 0x0012, 0x1ac: 0x0012, 0x1ad: 0x0012, 0x1ae: 0x0012, 0x1af: 0x0012, - 0x1b0: 0x0015, 0x1b1: 0x0015, 0x1b2: 0x0015, 0x1b3: 0x0015, 0x1b4: 0x0015, 0x1b5: 0x0015, - 0x1b6: 0x0015, 0x1b7: 0x0015, 0x1b8: 0x0015, 0x1b9: 0x0014, 0x1ba: 0x0014, 0x1bb: 0x0014, - 0x1bc: 0x0014, 0x1bd: 0x0014, 0x1be: 0x0014, 0x1bf: 0x0014, - // Block 0x7, offset 0x1c0 - 0x1c0: 0x0024, 0x1c1: 0x0024, 0x1c2: 0x0024, 0x1c3: 0x0024, 0x1c4: 0x0024, 0x1c5: 0x1d6d, - 0x1c6: 0x0024, 0x1c7: 0x0034, 0x1c8: 0x0034, 0x1c9: 0x0034, 0x1ca: 0x0024, 0x1cb: 0x0024, - 0x1cc: 0x0024, 0x1cd: 0x0034, 0x1ce: 0x0034, 0x1cf: 0x0014, 0x1d0: 0x0024, 0x1d1: 0x0024, - 0x1d2: 0x0024, 0x1d3: 0x0034, 0x1d4: 0x0034, 0x1d5: 0x0034, 0x1d6: 0x0034, 0x1d7: 0x0024, - 0x1d8: 0x0034, 0x1d9: 0x0034, 0x1da: 0x0034, 0x1db: 0x0024, 0x1dc: 0x0034, 0x1dd: 0x0034, - 0x1de: 0x0034, 0x1df: 0x0034, 0x1e0: 0x0034, 0x1e1: 0x0034, 0x1e2: 0x0034, 0x1e3: 0x0024, - 0x1e4: 0x0024, 0x1e5: 0x0024, 0x1e6: 0x0024, 0x1e7: 0x0024, 0x1e8: 0x0024, 0x1e9: 0x0024, - 0x1ea: 0x0024, 0x1eb: 0x0024, 0x1ec: 0x0024, 0x1ed: 0x0024, 0x1ee: 0x0024, 0x1ef: 0x0024, - 0x1f0: 0x0113, 0x1f1: 0x0112, 0x1f2: 0x0113, 0x1f3: 0x0112, 0x1f4: 0x0014, 0x1f5: 0x0004, - 0x1f6: 0x0113, 0x1f7: 0x0112, 0x1fa: 0x0015, 0x1fb: 0x4d52, - 0x1fc: 0x5052, 0x1fd: 0x5052, 0x1ff: 0x5353, - // Block 0x8, offset 0x200 - 0x204: 0x0004, 0x205: 0x0004, - 0x206: 0x2a13, 0x207: 0x0054, 0x208: 0x2513, 0x209: 0x2713, 0x20a: 0x2513, - 0x20c: 0x5653, 0x20e: 0x5953, 0x20f: 0x5c53, 0x210: 0x1e2a, 0x211: 0x2013, - 0x212: 0x2013, 0x213: 0x2013, 0x214: 0x2013, 0x215: 0x2013, 0x216: 0x2013, 0x217: 0x2013, - 0x218: 0x2013, 0x219: 0x2013, 0x21a: 0x2013, 0x21b: 0x2013, 0x21c: 0x2013, 0x21d: 0x2013, - 0x21e: 0x2013, 0x21f: 0x2013, 0x220: 0x5f53, 0x221: 0x5f53, 0x223: 0x5f53, - 0x224: 0x5f53, 0x225: 0x5f53, 0x226: 0x5f53, 0x227: 0x5f53, 0x228: 0x5f53, 0x229: 0x5f53, - 0x22a: 0x5f53, 0x22b: 0x5f53, 0x22c: 0x2a12, 0x22d: 0x2512, 0x22e: 0x2712, 0x22f: 0x2512, - 0x230: 0x1fea, 0x231: 0x2012, 0x232: 0x2012, 0x233: 0x2012, 0x234: 0x2012, 0x235: 0x2012, - 0x236: 0x2012, 0x237: 0x2012, 0x238: 0x2012, 0x239: 0x2012, 0x23a: 0x2012, 0x23b: 0x2012, - 0x23c: 0x2012, 0x23d: 0x2012, 0x23e: 0x2012, 0x23f: 0x2012, - // Block 0x9, offset 0x240 - 0x240: 0x5f52, 0x241: 0x5f52, 0x242: 0x21aa, 0x243: 0x5f52, 0x244: 0x5f52, 0x245: 0x5f52, - 0x246: 0x5f52, 0x247: 0x5f52, 0x248: 0x5f52, 0x249: 0x5f52, 0x24a: 0x5f52, 0x24b: 0x5f52, - 0x24c: 0x5652, 0x24d: 0x5952, 0x24e: 0x5c52, 0x24f: 0x1813, 0x250: 0x226a, 0x251: 0x232a, - 0x252: 0x0013, 0x253: 0x0013, 0x254: 0x0013, 0x255: 0x23ea, 0x256: 0x24aa, 0x257: 0x1812, - 0x258: 0x0113, 0x259: 0x0112, 0x25a: 0x0113, 0x25b: 0x0112, 0x25c: 0x0113, 0x25d: 0x0112, - 0x25e: 0x0113, 0x25f: 0x0112, 0x260: 0x0113, 0x261: 0x0112, 0x262: 0x0113, 0x263: 0x0112, - 0x264: 0x0113, 0x265: 0x0112, 0x266: 0x0113, 0x267: 0x0112, 0x268: 0x0113, 0x269: 0x0112, - 0x26a: 0x0113, 0x26b: 0x0112, 0x26c: 0x0113, 0x26d: 0x0112, 0x26e: 0x0113, 0x26f: 0x0112, - 0x270: 0x256a, 0x271: 0x262a, 0x272: 0x0b12, 0x273: 0x5352, 0x274: 0x6253, 0x275: 0x26ea, - 0x277: 0x0f13, 0x278: 0x0f12, 0x279: 0x0b13, 0x27a: 0x0113, 0x27b: 0x0112, - 0x27c: 0x0012, 0x27d: 0x4d53, 0x27e: 0x5053, 0x27f: 0x5053, - // Block 0xa, offset 0x280 - 0x280: 0x0812, 0x281: 0x0812, 0x282: 0x0812, 0x283: 0x0812, 0x284: 0x0812, 0x285: 0x0812, - 0x288: 0x0813, 0x289: 0x0813, 0x28a: 0x0813, 0x28b: 0x0813, - 0x28c: 0x0813, 0x28d: 0x0813, 0x290: 0x372a, 0x291: 0x0812, - 0x292: 0x386a, 0x293: 0x0812, 0x294: 0x3a2a, 0x295: 0x0812, 0x296: 0x3bea, 0x297: 0x0812, - 0x299: 0x0813, 0x29b: 0x0813, 0x29d: 0x0813, - 0x29f: 0x0813, 0x2a0: 0x0812, 0x2a1: 0x0812, 0x2a2: 0x0812, 0x2a3: 0x0812, - 0x2a4: 0x0812, 0x2a5: 0x0812, 0x2a6: 0x0812, 0x2a7: 0x0812, 0x2a8: 0x0813, 0x2a9: 0x0813, - 0x2aa: 0x0813, 0x2ab: 0x0813, 0x2ac: 0x0813, 0x2ad: 0x0813, 0x2ae: 0x0813, 0x2af: 0x0813, - 0x2b0: 0x8b52, 0x2b1: 0x8b52, 0x2b2: 0x8e52, 0x2b3: 0x8e52, 0x2b4: 0x9152, 0x2b5: 0x9152, - 0x2b6: 0x9452, 0x2b7: 0x9452, 0x2b8: 0x9752, 0x2b9: 0x9752, 0x2ba: 0x9a52, 0x2bb: 0x9a52, - 0x2bc: 0x4d52, 0x2bd: 0x4d52, - // Block 0xb, offset 0x2c0 - 0x2c0: 0x3daa, 0x2c1: 0x3f8a, 0x2c2: 0x416a, 0x2c3: 0x434a, 0x2c4: 0x452a, 0x2c5: 0x470a, - 0x2c6: 0x48ea, 0x2c7: 0x4aca, 0x2c8: 0x4ca9, 0x2c9: 0x4e89, 0x2ca: 0x5069, 0x2cb: 0x5249, - 0x2cc: 0x5429, 0x2cd: 0x5609, 0x2ce: 0x57e9, 0x2cf: 0x59c9, 0x2d0: 0x5baa, 0x2d1: 0x5d8a, - 0x2d2: 0x5f6a, 0x2d3: 0x614a, 0x2d4: 0x632a, 0x2d5: 0x650a, 0x2d6: 0x66ea, 0x2d7: 0x68ca, - 0x2d8: 0x6aa9, 0x2d9: 0x6c89, 0x2da: 0x6e69, 0x2db: 0x7049, 0x2dc: 0x7229, 0x2dd: 0x7409, - 0x2de: 0x75e9, 0x2df: 0x77c9, 0x2e0: 0x79aa, 0x2e1: 0x7b8a, 0x2e2: 0x7d6a, 0x2e3: 0x7f4a, - 0x2e4: 0x812a, 0x2e5: 0x830a, 0x2e6: 0x84ea, 0x2e7: 0x86ca, 0x2e8: 0x88a9, 0x2e9: 0x8a89, - 0x2ea: 0x8c69, 0x2eb: 0x8e49, 0x2ec: 0x9029, 0x2ed: 0x9209, 0x2ee: 0x93e9, 0x2ef: 0x95c9, - 0x2f0: 0x0812, 0x2f1: 0x0812, 0x2f2: 0x97aa, 0x2f3: 0x99ca, 0x2f4: 0x9b6a, - 0x2f6: 0x9d2a, 0x2f7: 0x9e6a, 0x2f8: 0x0813, 0x2f9: 0x0813, 0x2fa: 0x8b53, 0x2fb: 0x8b53, - 0x2fc: 0xa0e9, 0x2fd: 0x0004, 0x2fe: 0xa28a, 0x2ff: 0x0004, - // Block 0xc, offset 0x300 - 0x300: 0x0004, 0x301: 0x0004, 0x302: 0xa34a, 0x303: 0xa56a, 0x304: 0xa70a, - 0x306: 0xa8ca, 0x307: 0xaa0a, 0x308: 0x8e53, 0x309: 0x8e53, 0x30a: 0x9153, 0x30b: 0x9153, - 0x30c: 0xac89, 0x30d: 0x0004, 0x30e: 0x0004, 0x30f: 0x0004, 0x310: 0x0812, 0x311: 0x0812, - 0x312: 0xae2a, 0x313: 0xafea, 0x316: 0xb1aa, 0x317: 0xb2ea, - 0x318: 0x0813, 0x319: 0x0813, 0x31a: 0x9453, 0x31b: 0x9453, 0x31d: 0x0004, - 0x31e: 0x0004, 0x31f: 0x0004, 0x320: 0x0812, 0x321: 0x0812, 0x322: 0xb4aa, 0x323: 0xb66a, - 0x324: 0xb82a, 0x325: 0x0912, 0x326: 0xb96a, 0x327: 0xbaaa, 0x328: 0x0813, 0x329: 0x0813, - 0x32a: 0x9a53, 0x32b: 0x9a53, 0x32c: 0x0913, 0x32d: 0x0004, 0x32e: 0x0004, 0x32f: 0x0004, - 0x332: 0xbc6a, 0x333: 0xbe8a, 0x334: 0xc02a, - 0x336: 0xc1ea, 0x337: 0xc32a, 0x338: 0x9753, 0x339: 0x9753, 0x33a: 0x4d53, 0x33b: 0x4d53, - 0x33c: 0xc5a9, 0x33d: 0x0004, 0x33e: 0x0004, - // Block 0xd, offset 0x340 - 0x342: 0x0013, - 0x347: 0x0013, 0x34a: 0x0012, 0x34b: 0x0013, - 0x34c: 0x0013, 0x34d: 0x0013, 0x34e: 0x0012, 0x34f: 0x0012, 0x350: 0x0013, 0x351: 0x0013, - 0x352: 0x0013, 0x353: 0x0012, 0x355: 0x0013, - 0x359: 0x0013, 0x35a: 0x0013, 0x35b: 0x0013, 0x35c: 0x0013, 0x35d: 0x0013, - 0x364: 0x0013, 0x366: 0xc74b, 0x368: 0x0013, - 0x36a: 0xc80b, 0x36b: 0xc88b, 0x36c: 0x0013, 0x36d: 0x0013, 0x36f: 0x0012, - 0x370: 0x0013, 0x371: 0x0013, 0x372: 0x9d53, 0x373: 0x0013, 0x374: 0x0012, 0x375: 0x0010, - 0x376: 0x0010, 0x377: 0x0010, 0x378: 0x0010, 0x379: 0x0012, - 0x37c: 0x0012, 0x37d: 0x0012, 0x37e: 0x0013, 0x37f: 0x0013, - // Block 0xe, offset 0x380 - 0x380: 0x1a13, 0x381: 0x1a13, 0x382: 0x1e13, 0x383: 0x1e13, 0x384: 0x1a13, 0x385: 0x1a13, - 0x386: 0x2613, 0x387: 0x2613, 0x388: 0x2a13, 0x389: 0x2a13, 0x38a: 0x2e13, 0x38b: 0x2e13, - 0x38c: 0x2a13, 0x38d: 0x2a13, 0x38e: 0x2613, 0x38f: 0x2613, 0x390: 0xa052, 0x391: 0xa052, - 0x392: 0xa352, 0x393: 0xa352, 0x394: 0xa652, 0x395: 0xa652, 0x396: 0xa352, 0x397: 0xa352, - 0x398: 0xa052, 0x399: 0xa052, 0x39a: 0x1a12, 0x39b: 0x1a12, 0x39c: 0x1e12, 0x39d: 0x1e12, - 0x39e: 0x1a12, 0x39f: 0x1a12, 0x3a0: 0x2612, 0x3a1: 0x2612, 0x3a2: 0x2a12, 0x3a3: 0x2a12, - 0x3a4: 0x2e12, 0x3a5: 0x2e12, 0x3a6: 0x2a12, 0x3a7: 0x2a12, 0x3a8: 0x2612, 0x3a9: 0x2612, - // Block 0xf, offset 0x3c0 - 0x3c0: 0x6552, 0x3c1: 0x6552, 0x3c2: 0x6552, 0x3c3: 0x6552, 0x3c4: 0x6552, 0x3c5: 0x6552, - 0x3c6: 0x6552, 0x3c7: 0x6552, 0x3c8: 0x6552, 0x3c9: 0x6552, 0x3ca: 0x6552, 0x3cb: 0x6552, - 0x3cc: 0x6552, 0x3cd: 0x6552, 0x3ce: 0x6552, 0x3cf: 0x6552, 0x3d0: 0xa952, 0x3d1: 0xa952, - 0x3d2: 0xa952, 0x3d3: 0xa952, 0x3d4: 0xa952, 0x3d5: 0xa952, 0x3d6: 0xa952, 0x3d7: 0xa952, - 0x3d8: 0xa952, 0x3d9: 0xa952, 0x3da: 0xa952, 0x3db: 0xa952, 0x3dc: 0xa952, 0x3dd: 0xa952, - 0x3de: 0xa952, 0x3e0: 0x0113, 0x3e1: 0x0112, 0x3e2: 0xc94b, 0x3e3: 0x8853, - 0x3e4: 0xca0b, 0x3e5: 0xcaca, 0x3e6: 0xcb4a, 0x3e7: 0x0f13, 0x3e8: 0x0f12, 0x3e9: 0x0313, - 0x3ea: 0x0312, 0x3eb: 0x0713, 0x3ec: 0x0712, 0x3ed: 0xcbcb, 0x3ee: 0xcc8b, 0x3ef: 0xcd4b, - 0x3f0: 0xce0b, 0x3f1: 0x0012, 0x3f2: 0x0113, 0x3f3: 0x0112, 0x3f4: 0x0012, 0x3f5: 0x0313, - 0x3f6: 0x0312, 0x3f7: 0x0012, 0x3f8: 0x0012, 0x3f9: 0x0012, 0x3fa: 0x0012, 0x3fb: 0x0012, - 0x3fc: 0x0015, 0x3fd: 0x0015, 0x3fe: 0xcecb, 0x3ff: 0xcf8b, - // Block 0x10, offset 0x400 - 0x400: 0x0113, 0x401: 0x0112, 0x402: 0x0113, 0x403: 0x0112, 0x404: 0x0113, 0x405: 0x0112, - 0x406: 0x0113, 0x407: 0x0112, 0x408: 0x0014, 0x409: 0x0004, 0x40a: 0x0004, 0x40b: 0x0713, - 0x40c: 0x0712, 0x40d: 0xd04b, 0x40e: 0x0012, 0x40f: 0x0010, 0x410: 0x0113, 0x411: 0x0112, - 0x412: 0x0113, 0x413: 0x0112, 0x414: 0x0012, 0x415: 0x0012, 0x416: 0x0113, 0x417: 0x0112, - 0x418: 0x0113, 0x419: 0x0112, 0x41a: 0x0113, 0x41b: 0x0112, 0x41c: 0x0113, 0x41d: 0x0112, - 0x41e: 0x0113, 0x41f: 0x0112, 0x420: 0x0113, 0x421: 0x0112, 0x422: 0x0113, 0x423: 0x0112, - 0x424: 0x0113, 0x425: 0x0112, 0x426: 0x0113, 0x427: 0x0112, 0x428: 0x0113, 0x429: 0x0112, - 0x42a: 0xd10b, 0x42b: 0xd1cb, 0x42c: 0xd28b, 0x42d: 0xd34b, 0x42e: 0xd40b, - 0x430: 0xd4cb, 0x431: 0xd58b, 0x432: 0xd64b, 0x433: 0xac53, 0x434: 0x0113, 0x435: 0x0112, - 0x436: 0x0113, 0x437: 0x0112, - // Block 0x11, offset 0x440 - 0x440: 0xd70a, 0x441: 0xd80a, 0x442: 0xd90a, 0x443: 0xda0a, 0x444: 0xdb6a, 0x445: 0xdcca, - 0x446: 0xddca, - 0x453: 0xdeca, 0x454: 0xe08a, 0x455: 0xe24a, 0x456: 0xe40a, 0x457: 0xe5ca, - 0x45d: 0x0010, - 0x45e: 0x0034, 0x45f: 0x0010, 0x460: 0x0010, 0x461: 0x0010, 0x462: 0x0010, 0x463: 0x0010, - 0x464: 0x0010, 0x465: 0x0010, 0x466: 0x0010, 0x467: 0x0010, 0x468: 0x0010, - 0x46a: 0x0010, 0x46b: 0x0010, 0x46c: 0x0010, 0x46d: 0x0010, 0x46e: 0x0010, 0x46f: 0x0010, - 0x470: 0x0010, 0x471: 0x0010, 0x472: 0x0010, 0x473: 0x0010, 0x474: 0x0010, 0x475: 0x0010, - 0x476: 0x0010, 0x478: 0x0010, 0x479: 0x0010, 0x47a: 0x0010, 0x47b: 0x0010, - 0x47c: 0x0010, 0x47e: 0x0010, - // Block 0x12, offset 0x480 - 0x480: 0x2213, 0x481: 0x2213, 0x482: 0x2613, 0x483: 0x2613, 0x484: 0x2213, 0x485: 0x2213, - 0x486: 0x2e13, 0x487: 0x2e13, 0x488: 0x2213, 0x489: 0x2213, 0x48a: 0x2613, 0x48b: 0x2613, - 0x48c: 0x2213, 0x48d: 0x2213, 0x48e: 0x3e13, 0x48f: 0x3e13, 0x490: 0x2213, 0x491: 0x2213, - 0x492: 0x2613, 0x493: 0x2613, 0x494: 0x2213, 0x495: 0x2213, 0x496: 0x2e13, 0x497: 0x2e13, - 0x498: 0x2213, 0x499: 0x2213, 0x49a: 0x2613, 0x49b: 0x2613, 0x49c: 0x2213, 0x49d: 0x2213, - 0x49e: 0xb553, 0x49f: 0xb553, 0x4a0: 0xb853, 0x4a1: 0xb853, 0x4a2: 0x2212, 0x4a3: 0x2212, - 0x4a4: 0x2612, 0x4a5: 0x2612, 0x4a6: 0x2212, 0x4a7: 0x2212, 0x4a8: 0x2e12, 0x4a9: 0x2e12, - 0x4aa: 0x2212, 0x4ab: 0x2212, 0x4ac: 0x2612, 0x4ad: 0x2612, 0x4ae: 0x2212, 0x4af: 0x2212, - 0x4b0: 0x3e12, 0x4b1: 0x3e12, 0x4b2: 0x2212, 0x4b3: 0x2212, 0x4b4: 0x2612, 0x4b5: 0x2612, - 0x4b6: 0x2212, 0x4b7: 0x2212, 0x4b8: 0x2e12, 0x4b9: 0x2e12, 0x4ba: 0x2212, 0x4bb: 0x2212, - 0x4bc: 0x2612, 0x4bd: 0x2612, 0x4be: 0x2212, 0x4bf: 0x2212, - // Block 0x13, offset 0x4c0 - 0x4c2: 0x0010, - 0x4c7: 0x0010, 0x4c9: 0x0010, 0x4cb: 0x0010, - 0x4cd: 0x0010, 0x4ce: 0x0010, 0x4cf: 0x0010, 0x4d1: 0x0010, - 0x4d2: 0x0010, 0x4d4: 0x0010, 0x4d7: 0x0010, - 0x4d9: 0x0010, 0x4db: 0x0010, 0x4dd: 0x0010, - 0x4df: 0x0010, 0x4e1: 0x0010, 0x4e2: 0x0010, - 0x4e4: 0x0010, 0x4e7: 0x0010, 0x4e8: 0x0010, 0x4e9: 0x0010, - 0x4ea: 0x0010, 0x4ec: 0x0010, 0x4ed: 0x0010, 0x4ee: 0x0010, 0x4ef: 0x0010, - 0x4f0: 0x0010, 0x4f1: 0x0010, 0x4f2: 0x0010, 0x4f4: 0x0010, 0x4f5: 0x0010, - 0x4f6: 0x0010, 0x4f7: 0x0010, 0x4f9: 0x0010, 0x4fa: 0x0010, 0x4fb: 0x0010, - 0x4fc: 0x0010, 0x4fe: 0x0010, -} - -// caseIndex: 25 blocks, 1600 entries, 3200 bytes -// Block 0 is the zero block. -var caseIndex = [1600]uint16{ - // Block 0x0, offset 0x0 - // Block 0x1, offset 0x40 - // Block 0x2, offset 0x80 - // Block 0x3, offset 0xc0 - 0xc2: 0x12, 0xc3: 0x13, 0xc4: 0x14, 0xc5: 0x15, 0xc6: 0x01, 0xc7: 0x02, - 0xc8: 0x16, 0xc9: 0x03, 0xca: 0x04, 0xcb: 0x17, 0xcc: 0x18, 0xcd: 0x05, 0xce: 0x06, 0xcf: 0x07, - 0xd0: 0x19, 0xd1: 0x1a, 0xd2: 0x1b, 0xd3: 0x1c, 0xd4: 0x1d, 0xd5: 0x1e, 0xd6: 0x1f, 0xd7: 0x20, - 0xd8: 0x21, 0xd9: 0x22, 0xda: 0x23, 0xdb: 0x24, 0xdc: 0x25, 0xdd: 0x26, 0xde: 0x27, 0xdf: 0x28, - 0xe0: 0x02, 0xe1: 0x03, 0xe2: 0x04, 0xe3: 0x05, - 0xea: 0x06, 0xeb: 0x07, 0xec: 0x07, 0xed: 0x08, 0xef: 0x09, - 0xf0: 0x14, 0xf3: 0x16, - // Block 0x4, offset 0x100 - 0x120: 0x29, 0x121: 0x2a, 0x122: 0x2b, 0x123: 0x2c, 0x124: 0x2d, 0x125: 0x2e, 0x126: 0x2f, 0x127: 0x30, - 0x128: 0x31, 0x129: 0x32, 0x12a: 0x33, 0x12b: 0x34, 0x12c: 0x35, 0x12d: 0x36, 0x12e: 0x37, 0x12f: 0x38, - 0x130: 0x39, 0x131: 0x3a, 0x132: 0x3b, 0x133: 0x3c, 0x134: 0x3d, 0x135: 0x3e, 0x136: 0x3f, 0x137: 0x40, - 0x138: 0x41, 0x139: 0x42, 0x13a: 0x43, 0x13b: 0x44, 0x13c: 0x45, 0x13d: 0x46, 0x13e: 0x47, 0x13f: 0x48, - // Block 0x5, offset 0x140 - 0x140: 0x49, 0x141: 0x4a, 0x142: 0x4b, 0x143: 0x4c, 0x144: 0x23, 0x145: 0x23, 0x146: 0x23, 0x147: 0x23, - 0x148: 0x23, 0x149: 0x4d, 0x14a: 0x4e, 0x14b: 0x4f, 0x14c: 0x50, 0x14d: 0x51, 0x14e: 0x52, 0x14f: 0x53, - 0x150: 0x54, 0x151: 0x23, 0x152: 0x23, 0x153: 0x23, 0x154: 0x23, 0x155: 0x23, 0x156: 0x23, 0x157: 0x23, - 0x158: 0x23, 0x159: 0x55, 0x15a: 0x56, 0x15b: 0x57, 0x15c: 0x58, 0x15d: 0x59, 0x15e: 0x5a, 0x15f: 0x5b, - 0x160: 0x5c, 0x161: 0x5d, 0x162: 0x5e, 0x163: 0x5f, 0x164: 0x60, 0x165: 0x61, 0x167: 0x62, - 0x168: 0x63, 0x169: 0x64, 0x16a: 0x65, 0x16c: 0x66, 0x16d: 0x67, 0x16e: 0x68, 0x16f: 0x69, - 0x170: 0x6a, 0x171: 0x6b, 0x172: 0x6c, 0x173: 0x6d, 0x174: 0x6e, 0x175: 0x6f, 0x176: 0x70, 0x177: 0x71, - 0x178: 0x72, 0x179: 0x72, 0x17a: 0x73, 0x17b: 0x72, 0x17c: 0x74, 0x17d: 0x08, 0x17e: 0x09, 0x17f: 0x0a, - // Block 0x6, offset 0x180 - 0x180: 0x75, 0x181: 0x76, 0x182: 0x77, 0x183: 0x78, 0x184: 0x0b, 0x185: 0x79, 0x186: 0x7a, - 0x192: 0x7b, 0x193: 0x0c, - 0x1b0: 0x7c, 0x1b1: 0x0d, 0x1b2: 0x72, 0x1b3: 0x7d, 0x1b4: 0x7e, 0x1b5: 0x7f, 0x1b6: 0x80, 0x1b7: 0x81, - 0x1b8: 0x82, - // Block 0x7, offset 0x1c0 - 0x1c0: 0x83, 0x1c2: 0x84, 0x1c3: 0x85, 0x1c4: 0x86, 0x1c5: 0x23, 0x1c6: 0x87, - // Block 0x8, offset 0x200 - 0x200: 0x88, 0x201: 0x23, 0x202: 0x23, 0x203: 0x23, 0x204: 0x23, 0x205: 0x23, 0x206: 0x23, 0x207: 0x23, - 0x208: 0x23, 0x209: 0x23, 0x20a: 0x23, 0x20b: 0x23, 0x20c: 0x23, 0x20d: 0x23, 0x20e: 0x23, 0x20f: 0x23, - 0x210: 0x23, 0x211: 0x23, 0x212: 0x89, 0x213: 0x8a, 0x214: 0x23, 0x215: 0x23, 0x216: 0x23, 0x217: 0x23, - 0x218: 0x8b, 0x219: 0x8c, 0x21a: 0x8d, 0x21b: 0x8e, 0x21c: 0x8f, 0x21d: 0x90, 0x21e: 0x0e, 0x21f: 0x91, - 0x220: 0x92, 0x221: 0x93, 0x222: 0x23, 0x223: 0x94, 0x224: 0x95, 0x225: 0x96, 0x226: 0x97, 0x227: 0x98, - 0x228: 0x99, 0x229: 0x9a, 0x22a: 0x9b, 0x22b: 0x9c, 0x22c: 0x9d, 0x22d: 0x9e, 0x22e: 0x9f, 0x22f: 0xa0, - 0x230: 0x23, 0x231: 0x23, 0x232: 0x23, 0x233: 0x23, 0x234: 0x23, 0x235: 0x23, 0x236: 0x23, 0x237: 0x23, - 0x238: 0x23, 0x239: 0x23, 0x23a: 0x23, 0x23b: 0x23, 0x23c: 0x23, 0x23d: 0x23, 0x23e: 0x23, 0x23f: 0x23, - // Block 0x9, offset 0x240 - 0x240: 0x23, 0x241: 0x23, 0x242: 0x23, 0x243: 0x23, 0x244: 0x23, 0x245: 0x23, 0x246: 0x23, 0x247: 0x23, - 0x248: 0x23, 0x249: 0x23, 0x24a: 0x23, 0x24b: 0x23, 0x24c: 0x23, 0x24d: 0x23, 0x24e: 0x23, 0x24f: 0x23, - 0x250: 0x23, 0x251: 0x23, 0x252: 0x23, 0x253: 0x23, 0x254: 0x23, 0x255: 0x23, 0x256: 0x23, 0x257: 0x23, - 0x258: 0x23, 0x259: 0x23, 0x25a: 0x23, 0x25b: 0x23, 0x25c: 0x23, 0x25d: 0x23, 0x25e: 0x23, 0x25f: 0x23, - 0x260: 0x23, 0x261: 0x23, 0x262: 0x23, 0x263: 0x23, 0x264: 0x23, 0x265: 0x23, 0x266: 0x23, 0x267: 0x23, - 0x268: 0x23, 0x269: 0x23, 0x26a: 0x23, 0x26b: 0x23, 0x26c: 0x23, 0x26d: 0x23, 0x26e: 0x23, 0x26f: 0x23, - 0x270: 0x23, 0x271: 0x23, 0x272: 0x23, 0x273: 0x23, 0x274: 0x23, 0x275: 0x23, 0x276: 0x23, 0x277: 0x23, - 0x278: 0x23, 0x279: 0x23, 0x27a: 0x23, 0x27b: 0x23, 0x27c: 0x23, 0x27d: 0x23, 0x27e: 0x23, 0x27f: 0x23, - // Block 0xa, offset 0x280 - 0x280: 0x23, 0x281: 0x23, 0x282: 0x23, 0x283: 0x23, 0x284: 0x23, 0x285: 0x23, 0x286: 0x23, 0x287: 0x23, - 0x288: 0x23, 0x289: 0x23, 0x28a: 0x23, 0x28b: 0x23, 0x28c: 0x23, 0x28d: 0x23, 0x28e: 0x23, 0x28f: 0x23, - 0x290: 0x23, 0x291: 0x23, 0x292: 0x23, 0x293: 0x23, 0x294: 0x23, 0x295: 0x23, 0x296: 0x23, 0x297: 0x23, - 0x298: 0x23, 0x299: 0x23, 0x29a: 0x23, 0x29b: 0x23, 0x29c: 0x23, 0x29d: 0x23, 0x29e: 0xa1, 0x29f: 0xa2, - // Block 0xb, offset 0x2c0 - 0x2ec: 0x0f, 0x2ed: 0xa3, 0x2ee: 0xa4, 0x2ef: 0xa5, - 0x2f0: 0x23, 0x2f1: 0x23, 0x2f2: 0x23, 0x2f3: 0x23, 0x2f4: 0xa6, 0x2f5: 0xa7, 0x2f6: 0xa8, 0x2f7: 0xa9, - 0x2f8: 0xaa, 0x2f9: 0xab, 0x2fa: 0x23, 0x2fb: 0xac, 0x2fc: 0xad, 0x2fd: 0xae, 0x2fe: 0xaf, 0x2ff: 0xb0, - // Block 0xc, offset 0x300 - 0x300: 0xb1, 0x301: 0xb2, 0x302: 0x23, 0x303: 0xb3, 0x305: 0xb4, 0x307: 0xb5, - 0x30a: 0xb6, 0x30b: 0xb7, 0x30c: 0xb8, 0x30d: 0xb9, 0x30e: 0xba, 0x30f: 0xbb, - 0x310: 0xbc, 0x311: 0xbd, 0x312: 0xbe, 0x313: 0xbf, 0x314: 0xc0, 0x315: 0xc1, - 0x318: 0x23, 0x319: 0x23, 0x31a: 0x23, 0x31b: 0x23, 0x31c: 0xc2, 0x31d: 0xc3, - 0x320: 0xc4, 0x321: 0xc5, 0x322: 0xc6, 0x323: 0xc7, 0x324: 0xc8, 0x326: 0xc9, - 0x328: 0xca, 0x329: 0xcb, 0x32a: 0xcc, 0x32b: 0xcd, 0x32c: 0x5f, 0x32d: 0xce, 0x32e: 0xcf, - 0x330: 0x23, 0x331: 0xd0, 0x332: 0xd1, 0x333: 0xd2, - // Block 0xd, offset 0x340 - 0x340: 0xd3, 0x341: 0xd4, 0x342: 0xd5, 0x343: 0xd6, 0x344: 0xd7, 0x345: 0xd8, 0x346: 0xd9, 0x347: 0xda, - 0x348: 0xdb, 0x34a: 0xdc, 0x34b: 0xdd, 0x34c: 0xde, 0x34d: 0xdf, - 0x350: 0xe0, 0x351: 0xe1, 0x352: 0xe2, 0x353: 0xe3, 0x356: 0xe4, 0x357: 0xe5, - 0x358: 0xe6, 0x359: 0xe7, 0x35a: 0xe8, 0x35b: 0xe9, 0x35c: 0xea, - 0x362: 0xeb, 0x363: 0xec, - 0x36b: 0xed, - 0x370: 0xee, 0x371: 0xef, 0x372: 0xf0, - // Block 0xe, offset 0x380 - 0x380: 0x23, 0x381: 0x23, 0x382: 0x23, 0x383: 0x23, 0x384: 0x23, 0x385: 0x23, 0x386: 0x23, 0x387: 0x23, - 0x388: 0x23, 0x389: 0x23, 0x38a: 0x23, 0x38b: 0x23, 0x38c: 0x23, 0x38d: 0x23, 0x38e: 0xf1, - 0x390: 0x23, 0x391: 0xf2, 0x392: 0x23, 0x393: 0x23, 0x394: 0x23, 0x395: 0xf3, - // Block 0xf, offset 0x3c0 - 0x3c0: 0x23, 0x3c1: 0x23, 0x3c2: 0x23, 0x3c3: 0x23, 0x3c4: 0x23, 0x3c5: 0x23, 0x3c6: 0x23, 0x3c7: 0x23, - 0x3c8: 0x23, 0x3c9: 0x23, 0x3ca: 0x23, 0x3cb: 0x23, 0x3cc: 0x23, 0x3cd: 0x23, 0x3ce: 0x23, 0x3cf: 0x23, - 0x3d0: 0xf2, - // Block 0x10, offset 0x400 - 0x410: 0x23, 0x411: 0x23, 0x412: 0x23, 0x413: 0x23, 0x414: 0x23, 0x415: 0x23, 0x416: 0x23, 0x417: 0x23, - 0x418: 0x23, 0x419: 0xf4, - // Block 0x11, offset 0x440 - 0x460: 0x23, 0x461: 0x23, 0x462: 0x23, 0x463: 0x23, 0x464: 0x23, 0x465: 0x23, 0x466: 0x23, 0x467: 0x23, - 0x468: 0xed, 0x469: 0xf5, 0x46b: 0xf6, 0x46c: 0xf7, 0x46d: 0xf8, 0x46e: 0xf9, - 0x47c: 0x23, 0x47d: 0xfa, 0x47e: 0xfb, 0x47f: 0xfc, - // Block 0x12, offset 0x480 - 0x4b0: 0x23, 0x4b1: 0xfd, 0x4b2: 0xfe, - // Block 0x13, offset 0x4c0 - 0x4c5: 0xff, 0x4c6: 0x100, - 0x4c9: 0x101, - 0x4d0: 0x102, 0x4d1: 0x103, 0x4d2: 0x104, 0x4d3: 0x105, 0x4d4: 0x106, 0x4d5: 0x107, 0x4d6: 0x108, 0x4d7: 0x109, - 0x4d8: 0x10a, 0x4d9: 0x10b, 0x4da: 0x10c, 0x4db: 0x10d, 0x4dc: 0x10e, 0x4dd: 0x10f, 0x4de: 0x110, 0x4df: 0x111, - 0x4e8: 0x112, 0x4e9: 0x113, 0x4ea: 0x114, - // Block 0x14, offset 0x500 - 0x500: 0x115, - 0x520: 0x23, 0x521: 0x23, 0x522: 0x23, 0x523: 0x116, 0x524: 0x10, 0x525: 0x117, - 0x538: 0x118, 0x539: 0x11, 0x53a: 0x119, - // Block 0x15, offset 0x540 - 0x544: 0x11a, 0x545: 0x11b, 0x546: 0x11c, - 0x54f: 0x11d, - // Block 0x16, offset 0x580 - 0x590: 0x0a, 0x591: 0x0b, 0x592: 0x0c, 0x593: 0x0d, 0x594: 0x0e, 0x596: 0x0f, - 0x59b: 0x10, 0x59d: 0x11, 0x59e: 0x12, 0x59f: 0x13, - // Block 0x17, offset 0x5c0 - 0x5c0: 0x11e, 0x5c1: 0x11f, 0x5c4: 0x11f, 0x5c5: 0x11f, 0x5c6: 0x11f, 0x5c7: 0x120, - // Block 0x18, offset 0x600 - 0x620: 0x15, -} - -// sparseOffsets: 272 entries, 544 bytes -var sparseOffsets = []uint16{0x0, 0x9, 0xf, 0x18, 0x24, 0x2e, 0x3a, 0x3d, 0x41, 0x44, 0x48, 0x52, 0x54, 0x59, 0x69, 0x70, 0x75, 0x83, 0x84, 0x92, 0xa1, 0xab, 0xae, 0xb4, 0xbc, 0xbe, 0xc0, 0xce, 0xd4, 0xe2, 0xed, 0xf8, 0x103, 0x10f, 0x119, 0x124, 0x12f, 0x13b, 0x147, 0x14f, 0x157, 0x161, 0x16c, 0x178, 0x17e, 0x189, 0x18e, 0x196, 0x199, 0x19e, 0x1a2, 0x1a6, 0x1ad, 0x1b6, 0x1be, 0x1bf, 0x1c8, 0x1cf, 0x1d7, 0x1dd, 0x1e3, 0x1e8, 0x1ec, 0x1ef, 0x1f1, 0x1f4, 0x1f9, 0x1fa, 0x1fc, 0x1fe, 0x200, 0x207, 0x20c, 0x210, 0x219, 0x21c, 0x21f, 0x225, 0x226, 0x231, 0x232, 0x233, 0x238, 0x245, 0x24d, 0x255, 0x25e, 0x267, 0x270, 0x275, 0x278, 0x281, 0x28e, 0x290, 0x297, 0x299, 0x2a4, 0x2a5, 0x2b0, 0x2b8, 0x2c0, 0x2c6, 0x2c7, 0x2d5, 0x2da, 0x2dd, 0x2e2, 0x2e6, 0x2ec, 0x2f1, 0x2f4, 0x2f9, 0x2fe, 0x2ff, 0x305, 0x307, 0x308, 0x30a, 0x30c, 0x30f, 0x310, 0x312, 0x315, 0x31b, 0x31f, 0x321, 0x327, 0x32e, 0x332, 0x33b, 0x33c, 0x344, 0x348, 0x34d, 0x355, 0x35b, 0x361, 0x36b, 0x370, 0x379, 0x37f, 0x386, 0x38a, 0x392, 0x394, 0x396, 0x399, 0x39b, 0x39d, 0x39e, 0x39f, 0x3a1, 0x3a3, 0x3a9, 0x3ae, 0x3b0, 0x3b6, 0x3b9, 0x3bb, 0x3c1, 0x3c6, 0x3c8, 0x3c9, 0x3ca, 0x3cb, 0x3cd, 0x3cf, 0x3d1, 0x3d4, 0x3d6, 0x3d9, 0x3e1, 0x3e4, 0x3e8, 0x3f0, 0x3f2, 0x3f3, 0x3f4, 0x3f6, 0x3fc, 0x3fe, 0x3ff, 0x401, 0x403, 0x405, 0x412, 0x413, 0x414, 0x418, 0x41a, 0x41b, 0x41c, 0x41d, 0x41e, 0x422, 0x426, 0x42c, 0x42e, 0x435, 0x438, 0x43c, 0x442, 0x44b, 0x451, 0x457, 0x461, 0x46b, 0x46d, 0x474, 0x47a, 0x480, 0x486, 0x489, 0x48f, 0x492, 0x49a, 0x49b, 0x4a2, 0x4a3, 0x4a6, 0x4a7, 0x4ad, 0x4b0, 0x4b8, 0x4b9, 0x4ba, 0x4bb, 0x4bc, 0x4be, 0x4c0, 0x4c2, 0x4c6, 0x4c7, 0x4c9, 0x4ca, 0x4cb, 0x4cd, 0x4d2, 0x4d7, 0x4db, 0x4dc, 0x4df, 0x4e3, 0x4ee, 0x4f2, 0x4fa, 0x4ff, 0x503, 0x506, 0x50a, 0x50d, 0x510, 0x515, 0x519, 0x51d, 0x521, 0x525, 0x527, 0x529, 0x52c, 0x531, 0x533, 0x538, 0x541, 0x546, 0x547, 0x54a, 0x54b, 0x54c, 0x54e, 0x54f, 0x550} - -// sparseValues: 1360 entries, 5440 bytes -var sparseValues = [1360]valueRange{ - // Block 0x0, offset 0x0 - {value: 0x0004, lo: 0xa8, hi: 0xa8}, - {value: 0x0012, lo: 0xaa, hi: 0xaa}, - {value: 0x0014, lo: 0xad, hi: 0xad}, - {value: 0x0004, lo: 0xaf, hi: 0xaf}, - {value: 0x0004, lo: 0xb4, hi: 0xb4}, - {value: 0x002a, lo: 0xb5, hi: 0xb5}, - {value: 0x0054, lo: 0xb7, hi: 0xb7}, - {value: 0x0004, lo: 0xb8, hi: 0xb8}, - {value: 0x0012, lo: 0xba, hi: 0xba}, - // Block 0x1, offset 0x9 - {value: 0x2013, lo: 0x80, hi: 0x96}, - {value: 0x2013, lo: 0x98, hi: 0x9e}, - {value: 0x00ea, lo: 0x9f, hi: 0x9f}, - {value: 0x2012, lo: 0xa0, hi: 0xb6}, - {value: 0x2012, lo: 0xb8, hi: 0xbe}, - {value: 0x0252, lo: 0xbf, hi: 0xbf}, - // Block 0x2, offset 0xf - {value: 0x0117, lo: 0x80, hi: 0xaf}, - {value: 0x01eb, lo: 0xb0, hi: 0xb0}, - {value: 0x02ea, lo: 0xb1, hi: 0xb1}, - {value: 0x0117, lo: 0xb2, hi: 0xb7}, - {value: 0x0012, lo: 0xb8, hi: 0xb8}, - {value: 0x0316, lo: 0xb9, hi: 0xba}, - {value: 0x0716, lo: 0xbb, hi: 0xbc}, - {value: 0x0316, lo: 0xbd, hi: 0xbe}, - {value: 0x0553, lo: 0xbf, hi: 0xbf}, - // Block 0x3, offset 0x18 - {value: 0x0552, lo: 0x80, hi: 0x80}, - {value: 0x0316, lo: 0x81, hi: 0x82}, - {value: 0x0716, lo: 0x83, hi: 0x84}, - {value: 0x0316, lo: 0x85, hi: 0x86}, - {value: 0x0f16, lo: 0x87, hi: 0x88}, - {value: 0x034a, lo: 0x89, hi: 0x89}, - {value: 0x0117, lo: 0x8a, hi: 0xb7}, - {value: 0x0253, lo: 0xb8, hi: 0xb8}, - {value: 0x0316, lo: 0xb9, hi: 0xba}, - {value: 0x0716, lo: 0xbb, hi: 0xbc}, - {value: 0x0316, lo: 0xbd, hi: 0xbe}, - {value: 0x044a, lo: 0xbf, hi: 0xbf}, - // Block 0x4, offset 0x24 - {value: 0x0117, lo: 0x80, hi: 0x9f}, - {value: 0x2f53, lo: 0xa0, hi: 0xa0}, - {value: 0x0012, lo: 0xa1, hi: 0xa1}, - {value: 0x0117, lo: 0xa2, hi: 0xb3}, - {value: 0x0012, lo: 0xb4, hi: 0xb9}, - {value: 0x10cb, lo: 0xba, hi: 0xba}, - {value: 0x0716, lo: 0xbb, hi: 0xbc}, - {value: 0x2953, lo: 0xbd, hi: 0xbd}, - {value: 0x11cb, lo: 0xbe, hi: 0xbe}, - {value: 0x12ca, lo: 0xbf, hi: 0xbf}, - // Block 0x5, offset 0x2e - {value: 0x0015, lo: 0x80, hi: 0x81}, - {value: 0x0004, lo: 0x82, hi: 0x85}, - {value: 0x0014, lo: 0x86, hi: 0x91}, - {value: 0x0004, lo: 0x92, hi: 0x96}, - {value: 0x0054, lo: 0x97, hi: 0x97}, - {value: 0x0004, lo: 0x98, hi: 0x9f}, - {value: 0x0015, lo: 0xa0, hi: 0xa4}, - {value: 0x0004, lo: 0xa5, hi: 0xab}, - {value: 0x0014, lo: 0xac, hi: 0xac}, - {value: 0x0004, lo: 0xad, hi: 0xad}, - {value: 0x0014, lo: 0xae, hi: 0xae}, - {value: 0x0004, lo: 0xaf, hi: 0xbf}, - // Block 0x6, offset 0x3a - {value: 0x0024, lo: 0x80, hi: 0x94}, - {value: 0x0034, lo: 0x95, hi: 0xbc}, - {value: 0x0024, lo: 0xbd, hi: 0xbf}, - // Block 0x7, offset 0x3d - {value: 0x6553, lo: 0x80, hi: 0x8f}, - {value: 0x2013, lo: 0x90, hi: 0x9f}, - {value: 0x5f53, lo: 0xa0, hi: 0xaf}, - {value: 0x2012, lo: 0xb0, hi: 0xbf}, - // Block 0x8, offset 0x41 - {value: 0x5f52, lo: 0x80, hi: 0x8f}, - {value: 0x6552, lo: 0x90, hi: 0x9f}, - {value: 0x0117, lo: 0xa0, hi: 0xbf}, - // Block 0x9, offset 0x44 - {value: 0x0117, lo: 0x80, hi: 0x81}, - {value: 0x0024, lo: 0x83, hi: 0x87}, - {value: 0x0014, lo: 0x88, hi: 0x89}, - {value: 0x0117, lo: 0x8a, hi: 0xbf}, - // Block 0xa, offset 0x48 - {value: 0x0f13, lo: 0x80, hi: 0x80}, - {value: 0x0316, lo: 0x81, hi: 0x82}, - {value: 0x0716, lo: 0x83, hi: 0x84}, - {value: 0x0316, lo: 0x85, hi: 0x86}, - {value: 0x0f16, lo: 0x87, hi: 0x88}, - {value: 0x0316, lo: 0x89, hi: 0x8a}, - {value: 0x0716, lo: 0x8b, hi: 0x8c}, - {value: 0x0316, lo: 0x8d, hi: 0x8e}, - {value: 0x0f12, lo: 0x8f, hi: 0x8f}, - {value: 0x0117, lo: 0x90, hi: 0xbf}, - // Block 0xb, offset 0x52 - {value: 0x0117, lo: 0x80, hi: 0xaf}, - {value: 0x6553, lo: 0xb1, hi: 0xbf}, - // Block 0xc, offset 0x54 - {value: 0x3013, lo: 0x80, hi: 0x8f}, - {value: 0x6853, lo: 0x90, hi: 0x96}, - {value: 0x0014, lo: 0x99, hi: 0x99}, - {value: 0x6552, lo: 0xa1, hi: 0xaf}, - {value: 0x3012, lo: 0xb0, hi: 0xbf}, - // Block 0xd, offset 0x59 - {value: 0x6852, lo: 0x80, hi: 0x86}, - {value: 0x27aa, lo: 0x87, hi: 0x87}, - {value: 0x0034, lo: 0x91, hi: 0x91}, - {value: 0x0024, lo: 0x92, hi: 0x95}, - {value: 0x0034, lo: 0x96, hi: 0x96}, - {value: 0x0024, lo: 0x97, hi: 0x99}, - {value: 0x0034, lo: 0x9a, hi: 0x9b}, - {value: 0x0024, lo: 0x9c, hi: 0xa1}, - {value: 0x0034, lo: 0xa2, hi: 0xa7}, - {value: 0x0024, lo: 0xa8, hi: 0xa9}, - {value: 0x0034, lo: 0xaa, hi: 0xaa}, - {value: 0x0024, lo: 0xab, hi: 0xac}, - {value: 0x0034, lo: 0xad, hi: 0xae}, - {value: 0x0024, lo: 0xaf, hi: 0xaf}, - {value: 0x0034, lo: 0xb0, hi: 0xbd}, - {value: 0x0034, lo: 0xbf, hi: 0xbf}, - // Block 0xe, offset 0x69 - {value: 0x0034, lo: 0x81, hi: 0x82}, - {value: 0x0024, lo: 0x84, hi: 0x84}, - {value: 0x0034, lo: 0x85, hi: 0x85}, - {value: 0x0034, lo: 0x87, hi: 0x87}, - {value: 0x0010, lo: 0x90, hi: 0xaa}, - {value: 0x0010, lo: 0xb0, hi: 0xb3}, - {value: 0x0054, lo: 0xb4, hi: 0xb4}, - // Block 0xf, offset 0x70 - {value: 0x0014, lo: 0x80, hi: 0x85}, - {value: 0x0024, lo: 0x90, hi: 0x97}, - {value: 0x0034, lo: 0x98, hi: 0x9a}, - {value: 0x0014, lo: 0x9c, hi: 0x9c}, - {value: 0x0010, lo: 0xa0, hi: 0xbf}, - // Block 0x10, offset 0x75 - {value: 0x0014, lo: 0x80, hi: 0x80}, - {value: 0x0010, lo: 0x81, hi: 0x8a}, - {value: 0x0034, lo: 0x8b, hi: 0x92}, - {value: 0x0024, lo: 0x93, hi: 0x94}, - {value: 0x0034, lo: 0x95, hi: 0x96}, - {value: 0x0024, lo: 0x97, hi: 0x9b}, - {value: 0x0034, lo: 0x9c, hi: 0x9c}, - {value: 0x0024, lo: 0x9d, hi: 0x9e}, - {value: 0x0034, lo: 0x9f, hi: 0x9f}, - {value: 0x0010, lo: 0xa0, hi: 0xa9}, - {value: 0x0010, lo: 0xab, hi: 0xab}, - {value: 0x0010, lo: 0xae, hi: 0xaf}, - {value: 0x0034, lo: 0xb0, hi: 0xb0}, - {value: 0x0010, lo: 0xb1, hi: 0xbf}, - // Block 0x11, offset 0x83 - {value: 0x0010, lo: 0x80, hi: 0xbf}, - // Block 0x12, offset 0x84 - {value: 0x0010, lo: 0x80, hi: 0x93}, - {value: 0x0010, lo: 0x95, hi: 0x95}, - {value: 0x0024, lo: 0x96, hi: 0x9c}, - {value: 0x0014, lo: 0x9d, hi: 0x9d}, - {value: 0x0024, lo: 0x9f, hi: 0xa2}, - {value: 0x0034, lo: 0xa3, hi: 0xa3}, - {value: 0x0024, lo: 0xa4, hi: 0xa4}, - {value: 0x0014, lo: 0xa5, hi: 0xa6}, - {value: 0x0024, lo: 0xa7, hi: 0xa8}, - {value: 0x0034, lo: 0xaa, hi: 0xaa}, - {value: 0x0024, lo: 0xab, hi: 0xac}, - {value: 0x0034, lo: 0xad, hi: 0xad}, - {value: 0x0010, lo: 0xae, hi: 0xbc}, - {value: 0x0010, lo: 0xbf, hi: 0xbf}, - // Block 0x13, offset 0x92 - {value: 0x0014, lo: 0x8f, hi: 0x8f}, - {value: 0x0010, lo: 0x90, hi: 0x90}, - {value: 0x0034, lo: 0x91, hi: 0x91}, - {value: 0x0010, lo: 0x92, hi: 0xaf}, - {value: 0x0024, lo: 0xb0, hi: 0xb0}, - {value: 0x0034, lo: 0xb1, hi: 0xb1}, - {value: 0x0024, lo: 0xb2, hi: 0xb3}, - {value: 0x0034, lo: 0xb4, hi: 0xb4}, - {value: 0x0024, lo: 0xb5, hi: 0xb6}, - {value: 0x0034, lo: 0xb7, hi: 0xb9}, - {value: 0x0024, lo: 0xba, hi: 0xba}, - {value: 0x0034, lo: 0xbb, hi: 0xbc}, - {value: 0x0024, lo: 0xbd, hi: 0xbd}, - {value: 0x0034, lo: 0xbe, hi: 0xbe}, - {value: 0x0024, lo: 0xbf, hi: 0xbf}, - // Block 0x14, offset 0xa1 - {value: 0x0024, lo: 0x80, hi: 0x81}, - {value: 0x0034, lo: 0x82, hi: 0x82}, - {value: 0x0024, lo: 0x83, hi: 0x83}, - {value: 0x0034, lo: 0x84, hi: 0x84}, - {value: 0x0024, lo: 0x85, hi: 0x85}, - {value: 0x0034, lo: 0x86, hi: 0x86}, - {value: 0x0024, lo: 0x87, hi: 0x87}, - {value: 0x0034, lo: 0x88, hi: 0x88}, - {value: 0x0024, lo: 0x89, hi: 0x8a}, - {value: 0x0010, lo: 0x8d, hi: 0xbf}, - // Block 0x15, offset 0xab - {value: 0x0010, lo: 0x80, hi: 0xa5}, - {value: 0x0014, lo: 0xa6, hi: 0xb0}, - {value: 0x0010, lo: 0xb1, hi: 0xb1}, - // Block 0x16, offset 0xae - {value: 0x0010, lo: 0x80, hi: 0xaa}, - {value: 0x0024, lo: 0xab, hi: 0xb1}, - {value: 0x0034, lo: 0xb2, hi: 0xb2}, - {value: 0x0024, lo: 0xb3, hi: 0xb3}, - {value: 0x0014, lo: 0xb4, hi: 0xb5}, - {value: 0x0014, lo: 0xba, hi: 0xba}, - // Block 0x17, offset 0xb4 - {value: 0x0010, lo: 0x80, hi: 0x95}, - {value: 0x0024, lo: 0x96, hi: 0x99}, - {value: 0x0014, lo: 0x9a, hi: 0x9a}, - {value: 0x0024, lo: 0x9b, hi: 0xa3}, - {value: 0x0014, lo: 0xa4, hi: 0xa4}, - {value: 0x0024, lo: 0xa5, hi: 0xa7}, - {value: 0x0014, lo: 0xa8, hi: 0xa8}, - {value: 0x0024, lo: 0xa9, hi: 0xad}, - // Block 0x18, offset 0xbc - {value: 0x0010, lo: 0x80, hi: 0x98}, - {value: 0x0034, lo: 0x99, hi: 0x9b}, - // Block 0x19, offset 0xbe - {value: 0x0010, lo: 0xa0, hi: 0xb4}, - {value: 0x0010, lo: 0xb6, hi: 0xbd}, - // Block 0x1a, offset 0xc0 - {value: 0x0024, lo: 0x94, hi: 0xa1}, - {value: 0x0014, lo: 0xa2, hi: 0xa2}, - {value: 0x0034, lo: 0xa3, hi: 0xa3}, - {value: 0x0024, lo: 0xa4, hi: 0xa5}, - {value: 0x0034, lo: 0xa6, hi: 0xa6}, - {value: 0x0024, lo: 0xa7, hi: 0xa8}, - {value: 0x0034, lo: 0xa9, hi: 0xa9}, - {value: 0x0024, lo: 0xaa, hi: 0xac}, - {value: 0x0034, lo: 0xad, hi: 0xb2}, - {value: 0x0024, lo: 0xb3, hi: 0xb5}, - {value: 0x0034, lo: 0xb6, hi: 0xb6}, - {value: 0x0024, lo: 0xb7, hi: 0xb8}, - {value: 0x0034, lo: 0xb9, hi: 0xba}, - {value: 0x0024, lo: 0xbb, hi: 0xbf}, - // Block 0x1b, offset 0xce - {value: 0x0014, lo: 0x80, hi: 0x82}, - {value: 0x0010, lo: 0x83, hi: 0xb9}, - {value: 0x0014, lo: 0xba, hi: 0xba}, - {value: 0x0010, lo: 0xbb, hi: 0xbb}, - {value: 0x0034, lo: 0xbc, hi: 0xbc}, - {value: 0x0010, lo: 0xbd, hi: 0xbf}, - // Block 0x1c, offset 0xd4 - {value: 0x0010, lo: 0x80, hi: 0x80}, - {value: 0x0014, lo: 0x81, hi: 0x88}, - {value: 0x0010, lo: 0x89, hi: 0x8c}, - {value: 0x0034, lo: 0x8d, hi: 0x8d}, - {value: 0x0010, lo: 0x8e, hi: 0x90}, - {value: 0x0024, lo: 0x91, hi: 0x91}, - {value: 0x0034, lo: 0x92, hi: 0x92}, - {value: 0x0024, lo: 0x93, hi: 0x94}, - {value: 0x0014, lo: 0x95, hi: 0x97}, - {value: 0x0010, lo: 0x98, hi: 0xa1}, - {value: 0x0014, lo: 0xa2, hi: 0xa3}, - {value: 0x0010, lo: 0xa6, hi: 0xaf}, - {value: 0x0014, lo: 0xb1, hi: 0xb1}, - {value: 0x0010, lo: 0xb2, hi: 0xbf}, - // Block 0x1d, offset 0xe2 - {value: 0x0010, lo: 0x80, hi: 0x80}, - {value: 0x0014, lo: 0x81, hi: 0x81}, - {value: 0x0010, lo: 0x82, hi: 0x83}, - {value: 0x0010, lo: 0x85, hi: 0x8c}, - {value: 0x0010, lo: 0x8f, hi: 0x90}, - {value: 0x0010, lo: 0x93, hi: 0xa8}, - {value: 0x0010, lo: 0xaa, hi: 0xb0}, - {value: 0x0010, lo: 0xb2, hi: 0xb2}, - {value: 0x0010, lo: 0xb6, hi: 0xb9}, - {value: 0x0034, lo: 0xbc, hi: 0xbc}, - {value: 0x0010, lo: 0xbd, hi: 0xbf}, - // Block 0x1e, offset 0xed - {value: 0x0010, lo: 0x80, hi: 0x80}, - {value: 0x0014, lo: 0x81, hi: 0x84}, - {value: 0x0010, lo: 0x87, hi: 0x88}, - {value: 0x0010, lo: 0x8b, hi: 0x8c}, - {value: 0x0034, lo: 0x8d, hi: 0x8d}, - {value: 0x0010, lo: 0x8e, hi: 0x8e}, - {value: 0x0010, lo: 0x97, hi: 0x97}, - {value: 0x0010, lo: 0x9c, hi: 0x9d}, - {value: 0x0010, lo: 0x9f, hi: 0xa1}, - {value: 0x0014, lo: 0xa2, hi: 0xa3}, - {value: 0x0010, lo: 0xa6, hi: 0xb1}, - // Block 0x1f, offset 0xf8 - {value: 0x0014, lo: 0x81, hi: 0x82}, - {value: 0x0010, lo: 0x83, hi: 0x83}, - {value: 0x0010, lo: 0x85, hi: 0x8a}, - {value: 0x0010, lo: 0x8f, hi: 0x90}, - {value: 0x0010, lo: 0x93, hi: 0xa8}, - {value: 0x0010, lo: 0xaa, hi: 0xb0}, - {value: 0x0010, lo: 0xb2, hi: 0xb3}, - {value: 0x0010, lo: 0xb5, hi: 0xb6}, - {value: 0x0010, lo: 0xb8, hi: 0xb9}, - {value: 0x0034, lo: 0xbc, hi: 0xbc}, - {value: 0x0010, lo: 0xbe, hi: 0xbf}, - // Block 0x20, offset 0x103 - {value: 0x0010, lo: 0x80, hi: 0x80}, - {value: 0x0014, lo: 0x81, hi: 0x82}, - {value: 0x0014, lo: 0x87, hi: 0x88}, - {value: 0x0014, lo: 0x8b, hi: 0x8c}, - {value: 0x0034, lo: 0x8d, hi: 0x8d}, - {value: 0x0014, lo: 0x91, hi: 0x91}, - {value: 0x0010, lo: 0x99, hi: 0x9c}, - {value: 0x0010, lo: 0x9e, hi: 0x9e}, - {value: 0x0010, lo: 0xa6, hi: 0xaf}, - {value: 0x0014, lo: 0xb0, hi: 0xb1}, - {value: 0x0010, lo: 0xb2, hi: 0xb4}, - {value: 0x0014, lo: 0xb5, hi: 0xb5}, - // Block 0x21, offset 0x10f - {value: 0x0014, lo: 0x81, hi: 0x82}, - {value: 0x0010, lo: 0x83, hi: 0x83}, - {value: 0x0010, lo: 0x85, hi: 0x8d}, - {value: 0x0010, lo: 0x8f, hi: 0x91}, - {value: 0x0010, lo: 0x93, hi: 0xa8}, - {value: 0x0010, lo: 0xaa, hi: 0xb0}, - {value: 0x0010, lo: 0xb2, hi: 0xb3}, - {value: 0x0010, lo: 0xb5, hi: 0xb9}, - {value: 0x0034, lo: 0xbc, hi: 0xbc}, - {value: 0x0010, lo: 0xbd, hi: 0xbf}, - // Block 0x22, offset 0x119 - {value: 0x0010, lo: 0x80, hi: 0x80}, - {value: 0x0014, lo: 0x81, hi: 0x85}, - {value: 0x0014, lo: 0x87, hi: 0x88}, - {value: 0x0010, lo: 0x89, hi: 0x89}, - {value: 0x0010, lo: 0x8b, hi: 0x8c}, - {value: 0x0034, lo: 0x8d, hi: 0x8d}, - {value: 0x0010, lo: 0x90, hi: 0x90}, - {value: 0x0010, lo: 0xa0, hi: 0xa1}, - {value: 0x0014, lo: 0xa2, hi: 0xa3}, - {value: 0x0010, lo: 0xa6, hi: 0xaf}, - {value: 0x0010, lo: 0xb9, hi: 0xb9}, - // Block 0x23, offset 0x124 - {value: 0x0014, lo: 0x81, hi: 0x81}, - {value: 0x0010, lo: 0x82, hi: 0x83}, - {value: 0x0010, lo: 0x85, hi: 0x8c}, - {value: 0x0010, lo: 0x8f, hi: 0x90}, - {value: 0x0010, lo: 0x93, hi: 0xa8}, - {value: 0x0010, lo: 0xaa, hi: 0xb0}, - {value: 0x0010, lo: 0xb2, hi: 0xb3}, - {value: 0x0010, lo: 0xb5, hi: 0xb9}, - {value: 0x0034, lo: 0xbc, hi: 0xbc}, - {value: 0x0010, lo: 0xbd, hi: 0xbe}, - {value: 0x0014, lo: 0xbf, hi: 0xbf}, - // Block 0x24, offset 0x12f - {value: 0x0010, lo: 0x80, hi: 0x80}, - {value: 0x0014, lo: 0x81, hi: 0x84}, - {value: 0x0010, lo: 0x87, hi: 0x88}, - {value: 0x0010, lo: 0x8b, hi: 0x8c}, - {value: 0x0034, lo: 0x8d, hi: 0x8d}, - {value: 0x0014, lo: 0x96, hi: 0x96}, - {value: 0x0010, lo: 0x97, hi: 0x97}, - {value: 0x0010, lo: 0x9c, hi: 0x9d}, - {value: 0x0010, lo: 0x9f, hi: 0xa1}, - {value: 0x0014, lo: 0xa2, hi: 0xa3}, - {value: 0x0010, lo: 0xa6, hi: 0xaf}, - {value: 0x0010, lo: 0xb1, hi: 0xb1}, - // Block 0x25, offset 0x13b - {value: 0x0014, lo: 0x82, hi: 0x82}, - {value: 0x0010, lo: 0x83, hi: 0x83}, - {value: 0x0010, lo: 0x85, hi: 0x8a}, - {value: 0x0010, lo: 0x8e, hi: 0x90}, - {value: 0x0010, lo: 0x92, hi: 0x95}, - {value: 0x0010, lo: 0x99, hi: 0x9a}, - {value: 0x0010, lo: 0x9c, hi: 0x9c}, - {value: 0x0010, lo: 0x9e, hi: 0x9f}, - {value: 0x0010, lo: 0xa3, hi: 0xa4}, - {value: 0x0010, lo: 0xa8, hi: 0xaa}, - {value: 0x0010, lo: 0xae, hi: 0xb9}, - {value: 0x0010, lo: 0xbe, hi: 0xbf}, - // Block 0x26, offset 0x147 - {value: 0x0014, lo: 0x80, hi: 0x80}, - {value: 0x0010, lo: 0x81, hi: 0x82}, - {value: 0x0010, lo: 0x86, hi: 0x88}, - {value: 0x0010, lo: 0x8a, hi: 0x8c}, - {value: 0x0034, lo: 0x8d, hi: 0x8d}, - {value: 0x0010, lo: 0x90, hi: 0x90}, - {value: 0x0010, lo: 0x97, hi: 0x97}, - {value: 0x0010, lo: 0xa6, hi: 0xaf}, - // Block 0x27, offset 0x14f - {value: 0x0014, lo: 0x80, hi: 0x80}, - {value: 0x0010, lo: 0x81, hi: 0x83}, - {value: 0x0010, lo: 0x85, hi: 0x8c}, - {value: 0x0010, lo: 0x8e, hi: 0x90}, - {value: 0x0010, lo: 0x92, hi: 0xa8}, - {value: 0x0010, lo: 0xaa, hi: 0xb9}, - {value: 0x0010, lo: 0xbd, hi: 0xbd}, - {value: 0x0014, lo: 0xbe, hi: 0xbf}, - // Block 0x28, offset 0x157 - {value: 0x0014, lo: 0x80, hi: 0x80}, - {value: 0x0010, lo: 0x81, hi: 0x84}, - {value: 0x0014, lo: 0x86, hi: 0x88}, - {value: 0x0014, lo: 0x8a, hi: 0x8c}, - {value: 0x0034, lo: 0x8d, hi: 0x8d}, - {value: 0x0034, lo: 0x95, hi: 0x96}, - {value: 0x0010, lo: 0x98, hi: 0x9a}, - {value: 0x0010, lo: 0xa0, hi: 0xa1}, - {value: 0x0014, lo: 0xa2, hi: 0xa3}, - {value: 0x0010, lo: 0xa6, hi: 0xaf}, - // Block 0x29, offset 0x161 - {value: 0x0010, lo: 0x80, hi: 0x80}, - {value: 0x0014, lo: 0x81, hi: 0x81}, - {value: 0x0010, lo: 0x82, hi: 0x83}, - {value: 0x0010, lo: 0x85, hi: 0x8c}, - {value: 0x0010, lo: 0x8e, hi: 0x90}, - {value: 0x0010, lo: 0x92, hi: 0xa8}, - {value: 0x0010, lo: 0xaa, hi: 0xb3}, - {value: 0x0010, lo: 0xb5, hi: 0xb9}, - {value: 0x0034, lo: 0xbc, hi: 0xbc}, - {value: 0x0010, lo: 0xbd, hi: 0xbe}, - {value: 0x0014, lo: 0xbf, hi: 0xbf}, - // Block 0x2a, offset 0x16c - {value: 0x0010, lo: 0x80, hi: 0x84}, - {value: 0x0014, lo: 0x86, hi: 0x86}, - {value: 0x0010, lo: 0x87, hi: 0x88}, - {value: 0x0010, lo: 0x8a, hi: 0x8b}, - {value: 0x0014, lo: 0x8c, hi: 0x8c}, - {value: 0x0034, lo: 0x8d, hi: 0x8d}, - {value: 0x0010, lo: 0x95, hi: 0x96}, - {value: 0x0010, lo: 0x9e, hi: 0x9e}, - {value: 0x0010, lo: 0xa0, hi: 0xa1}, - {value: 0x0014, lo: 0xa2, hi: 0xa3}, - {value: 0x0010, lo: 0xa6, hi: 0xaf}, - {value: 0x0010, lo: 0xb1, hi: 0xb2}, - // Block 0x2b, offset 0x178 - {value: 0x0014, lo: 0x81, hi: 0x81}, - {value: 0x0010, lo: 0x82, hi: 0x83}, - {value: 0x0010, lo: 0x85, hi: 0x8c}, - {value: 0x0010, lo: 0x8e, hi: 0x90}, - {value: 0x0010, lo: 0x92, hi: 0xba}, - {value: 0x0010, lo: 0xbd, hi: 0xbf}, - // Block 0x2c, offset 0x17e - {value: 0x0010, lo: 0x80, hi: 0x80}, - {value: 0x0014, lo: 0x81, hi: 0x84}, - {value: 0x0010, lo: 0x86, hi: 0x88}, - {value: 0x0010, lo: 0x8a, hi: 0x8c}, - {value: 0x0034, lo: 0x8d, hi: 0x8d}, - {value: 0x0010, lo: 0x8e, hi: 0x8e}, - {value: 0x0010, lo: 0x94, hi: 0x97}, - {value: 0x0010, lo: 0x9f, hi: 0xa1}, - {value: 0x0014, lo: 0xa2, hi: 0xa3}, - {value: 0x0010, lo: 0xa6, hi: 0xaf}, - {value: 0x0010, lo: 0xba, hi: 0xbf}, - // Block 0x2d, offset 0x189 - {value: 0x0010, lo: 0x82, hi: 0x83}, - {value: 0x0010, lo: 0x85, hi: 0x96}, - {value: 0x0010, lo: 0x9a, hi: 0xb1}, - {value: 0x0010, lo: 0xb3, hi: 0xbb}, - {value: 0x0010, lo: 0xbd, hi: 0xbd}, - // Block 0x2e, offset 0x18e - {value: 0x0010, lo: 0x80, hi: 0x86}, - {value: 0x0034, lo: 0x8a, hi: 0x8a}, - {value: 0x0010, lo: 0x8f, hi: 0x91}, - {value: 0x0014, lo: 0x92, hi: 0x94}, - {value: 0x0014, lo: 0x96, hi: 0x96}, - {value: 0x0010, lo: 0x98, hi: 0x9f}, - {value: 0x0010, lo: 0xa6, hi: 0xaf}, - {value: 0x0010, lo: 0xb2, hi: 0xb3}, - // Block 0x2f, offset 0x196 - {value: 0x0014, lo: 0xb1, hi: 0xb1}, - {value: 0x0014, lo: 0xb4, hi: 0xb7}, - {value: 0x0034, lo: 0xb8, hi: 0xba}, - // Block 0x30, offset 0x199 - {value: 0x0004, lo: 0x86, hi: 0x86}, - {value: 0x0014, lo: 0x87, hi: 0x87}, - {value: 0x0034, lo: 0x88, hi: 0x8b}, - {value: 0x0014, lo: 0x8c, hi: 0x8e}, - {value: 0x0010, lo: 0x90, hi: 0x99}, - // Block 0x31, offset 0x19e - {value: 0x0014, lo: 0xb1, hi: 0xb1}, - {value: 0x0014, lo: 0xb4, hi: 0xb7}, - {value: 0x0034, lo: 0xb8, hi: 0xb9}, - {value: 0x0014, lo: 0xbb, hi: 0xbc}, - // Block 0x32, offset 0x1a2 - {value: 0x0004, lo: 0x86, hi: 0x86}, - {value: 0x0034, lo: 0x88, hi: 0x8b}, - {value: 0x0014, lo: 0x8c, hi: 0x8d}, - {value: 0x0010, lo: 0x90, hi: 0x99}, - // Block 0x33, offset 0x1a6 - {value: 0x0010, lo: 0x80, hi: 0x80}, - {value: 0x0034, lo: 0x98, hi: 0x99}, - {value: 0x0010, lo: 0xa0, hi: 0xa9}, - {value: 0x0034, lo: 0xb5, hi: 0xb5}, - {value: 0x0034, lo: 0xb7, hi: 0xb7}, - {value: 0x0034, lo: 0xb9, hi: 0xb9}, - {value: 0x0010, lo: 0xbe, hi: 0xbf}, - // Block 0x34, offset 0x1ad - {value: 0x0010, lo: 0x80, hi: 0x87}, - {value: 0x0010, lo: 0x89, hi: 0xac}, - {value: 0x0034, lo: 0xb1, hi: 0xb2}, - {value: 0x0014, lo: 0xb3, hi: 0xb3}, - {value: 0x0034, lo: 0xb4, hi: 0xb4}, - {value: 0x0014, lo: 0xb5, hi: 0xb9}, - {value: 0x0034, lo: 0xba, hi: 0xbd}, - {value: 0x0014, lo: 0xbe, hi: 0xbe}, - {value: 0x0010, lo: 0xbf, hi: 0xbf}, - // Block 0x35, offset 0x1b6 - {value: 0x0034, lo: 0x80, hi: 0x80}, - {value: 0x0014, lo: 0x81, hi: 0x81}, - {value: 0x0024, lo: 0x82, hi: 0x83}, - {value: 0x0034, lo: 0x84, hi: 0x84}, - {value: 0x0024, lo: 0x86, hi: 0x87}, - {value: 0x0010, lo: 0x88, hi: 0x8c}, - {value: 0x0014, lo: 0x8d, hi: 0x97}, - {value: 0x0014, lo: 0x99, hi: 0xbc}, - // Block 0x36, offset 0x1be - {value: 0x0034, lo: 0x86, hi: 0x86}, - // Block 0x37, offset 0x1bf - {value: 0x0010, lo: 0xab, hi: 0xac}, - {value: 0x0014, lo: 0xad, hi: 0xb0}, - {value: 0x0010, lo: 0xb1, hi: 0xb1}, - {value: 0x0014, lo: 0xb2, hi: 0xb6}, - {value: 0x0034, lo: 0xb7, hi: 0xb7}, - {value: 0x0010, lo: 0xb8, hi: 0xb8}, - {value: 0x0034, lo: 0xb9, hi: 0xba}, - {value: 0x0010, lo: 0xbb, hi: 0xbc}, - {value: 0x0014, lo: 0xbd, hi: 0xbe}, - // Block 0x38, offset 0x1c8 - {value: 0x0010, lo: 0x80, hi: 0x89}, - {value: 0x0010, lo: 0x96, hi: 0x97}, - {value: 0x0014, lo: 0x98, hi: 0x99}, - {value: 0x0014, lo: 0x9e, hi: 0xa0}, - {value: 0x0010, lo: 0xa2, hi: 0xa4}, - {value: 0x0010, lo: 0xa7, hi: 0xad}, - {value: 0x0014, lo: 0xb1, hi: 0xb4}, - // Block 0x39, offset 0x1cf - {value: 0x0014, lo: 0x82, hi: 0x82}, - {value: 0x0010, lo: 0x83, hi: 0x84}, - {value: 0x0014, lo: 0x85, hi: 0x86}, - {value: 0x0010, lo: 0x87, hi: 0x8c}, - {value: 0x0034, lo: 0x8d, hi: 0x8d}, - {value: 0x0010, lo: 0x8f, hi: 0x9c}, - {value: 0x0014, lo: 0x9d, hi: 0x9d}, - {value: 0x6c53, lo: 0xa0, hi: 0xbf}, - // Block 0x3a, offset 0x1d7 - {value: 0x7053, lo: 0x80, hi: 0x85}, - {value: 0x7053, lo: 0x87, hi: 0x87}, - {value: 0x7053, lo: 0x8d, hi: 0x8d}, - {value: 0x0010, lo: 0x90, hi: 0xba}, - {value: 0x0014, lo: 0xbc, hi: 0xbc}, - {value: 0x0010, lo: 0xbd, hi: 0xbf}, - // Block 0x3b, offset 0x1dd - {value: 0x0010, lo: 0x80, hi: 0x88}, - {value: 0x0010, lo: 0x8a, hi: 0x8d}, - {value: 0x0010, lo: 0x90, hi: 0x96}, - {value: 0x0010, lo: 0x98, hi: 0x98}, - {value: 0x0010, lo: 0x9a, hi: 0x9d}, - {value: 0x0010, lo: 0xa0, hi: 0xbf}, - // Block 0x3c, offset 0x1e3 - {value: 0x0010, lo: 0x80, hi: 0x88}, - {value: 0x0010, lo: 0x8a, hi: 0x8d}, - {value: 0x0010, lo: 0x90, hi: 0xb0}, - {value: 0x0010, lo: 0xb2, hi: 0xb5}, - {value: 0x0010, lo: 0xb8, hi: 0xbe}, - // Block 0x3d, offset 0x1e8 - {value: 0x0010, lo: 0x80, hi: 0x80}, - {value: 0x0010, lo: 0x82, hi: 0x85}, - {value: 0x0010, lo: 0x88, hi: 0x96}, - {value: 0x0010, lo: 0x98, hi: 0xbf}, - // Block 0x3e, offset 0x1ec - {value: 0x0010, lo: 0x80, hi: 0x90}, - {value: 0x0010, lo: 0x92, hi: 0x95}, - {value: 0x0010, lo: 0x98, hi: 0xbf}, - // Block 0x3f, offset 0x1ef - {value: 0x0010, lo: 0x80, hi: 0x9a}, - {value: 0x0024, lo: 0x9d, hi: 0x9f}, - // Block 0x40, offset 0x1f1 - {value: 0x0010, lo: 0x80, hi: 0x8f}, - {value: 0x7453, lo: 0xa0, hi: 0xaf}, - {value: 0x7853, lo: 0xb0, hi: 0xbf}, - // Block 0x41, offset 0x1f4 - {value: 0x7c53, lo: 0x80, hi: 0x8f}, - {value: 0x8053, lo: 0x90, hi: 0x9f}, - {value: 0x7c53, lo: 0xa0, hi: 0xaf}, - {value: 0x0813, lo: 0xb0, hi: 0xb5}, - {value: 0x0892, lo: 0xb8, hi: 0xbd}, - // Block 0x42, offset 0x1f9 - {value: 0x0010, lo: 0x81, hi: 0xbf}, - // Block 0x43, offset 0x1fa - {value: 0x0010, lo: 0x80, hi: 0xac}, - {value: 0x0010, lo: 0xaf, hi: 0xbf}, - // Block 0x44, offset 0x1fc - {value: 0x0010, lo: 0x81, hi: 0x9a}, - {value: 0x0010, lo: 0xa0, hi: 0xbf}, - // Block 0x45, offset 0x1fe - {value: 0x0010, lo: 0x80, hi: 0xaa}, - {value: 0x0010, lo: 0xae, hi: 0xb8}, - // Block 0x46, offset 0x200 - {value: 0x0010, lo: 0x80, hi: 0x8c}, - {value: 0x0010, lo: 0x8e, hi: 0x91}, - {value: 0x0014, lo: 0x92, hi: 0x93}, - {value: 0x0034, lo: 0x94, hi: 0x94}, - {value: 0x0010, lo: 0xa0, hi: 0xb1}, - {value: 0x0014, lo: 0xb2, hi: 0xb3}, - {value: 0x0034, lo: 0xb4, hi: 0xb4}, - // Block 0x47, offset 0x207 - {value: 0x0010, lo: 0x80, hi: 0x91}, - {value: 0x0014, lo: 0x92, hi: 0x93}, - {value: 0x0010, lo: 0xa0, hi: 0xac}, - {value: 0x0010, lo: 0xae, hi: 0xb0}, - {value: 0x0014, lo: 0xb2, hi: 0xb3}, - // Block 0x48, offset 0x20c - {value: 0x0014, lo: 0xb4, hi: 0xb5}, - {value: 0x0010, lo: 0xb6, hi: 0xb6}, - {value: 0x0014, lo: 0xb7, hi: 0xbd}, - {value: 0x0010, lo: 0xbe, hi: 0xbf}, - // Block 0x49, offset 0x210 - {value: 0x0010, lo: 0x80, hi: 0x85}, - {value: 0x0014, lo: 0x86, hi: 0x86}, - {value: 0x0010, lo: 0x87, hi: 0x88}, - {value: 0x0014, lo: 0x89, hi: 0x91}, - {value: 0x0034, lo: 0x92, hi: 0x92}, - {value: 0x0014, lo: 0x93, hi: 0x93}, - {value: 0x0004, lo: 0x97, hi: 0x97}, - {value: 0x0024, lo: 0x9d, hi: 0x9d}, - {value: 0x0010, lo: 0xa0, hi: 0xa9}, - // Block 0x4a, offset 0x219 - {value: 0x0014, lo: 0x8b, hi: 0x8e}, - {value: 0x0010, lo: 0x90, hi: 0x99}, - {value: 0x0010, lo: 0xa0, hi: 0xbf}, - // Block 0x4b, offset 0x21c - {value: 0x0010, lo: 0x80, hi: 0x82}, - {value: 0x0014, lo: 0x83, hi: 0x83}, - {value: 0x0010, lo: 0x84, hi: 0xb7}, - // Block 0x4c, offset 0x21f - {value: 0x0010, lo: 0x80, hi: 0x84}, - {value: 0x0014, lo: 0x85, hi: 0x86}, - {value: 0x0010, lo: 0x87, hi: 0xa8}, - {value: 0x0034, lo: 0xa9, hi: 0xa9}, - {value: 0x0010, lo: 0xaa, hi: 0xaa}, - {value: 0x0010, lo: 0xb0, hi: 0xbf}, - // Block 0x4d, offset 0x225 - {value: 0x0010, lo: 0x80, hi: 0xb5}, - // Block 0x4e, offset 0x226 - {value: 0x0010, lo: 0x80, hi: 0x9e}, - {value: 0x0014, lo: 0xa0, hi: 0xa2}, - {value: 0x0010, lo: 0xa3, hi: 0xa6}, - {value: 0x0014, lo: 0xa7, hi: 0xa8}, - {value: 0x0010, lo: 0xa9, hi: 0xab}, - {value: 0x0010, lo: 0xb0, hi: 0xb1}, - {value: 0x0014, lo: 0xb2, hi: 0xb2}, - {value: 0x0010, lo: 0xb3, hi: 0xb8}, - {value: 0x0034, lo: 0xb9, hi: 0xb9}, - {value: 0x0024, lo: 0xba, hi: 0xba}, - {value: 0x0034, lo: 0xbb, hi: 0xbb}, - // Block 0x4f, offset 0x231 - {value: 0x0010, lo: 0x86, hi: 0x8f}, - // Block 0x50, offset 0x232 - {value: 0x0010, lo: 0x90, hi: 0x99}, - // Block 0x51, offset 0x233 - {value: 0x0010, lo: 0x80, hi: 0x96}, - {value: 0x0024, lo: 0x97, hi: 0x97}, - {value: 0x0034, lo: 0x98, hi: 0x98}, - {value: 0x0010, lo: 0x99, hi: 0x9a}, - {value: 0x0014, lo: 0x9b, hi: 0x9b}, - // Block 0x52, offset 0x238 - {value: 0x0010, lo: 0x95, hi: 0x95}, - {value: 0x0014, lo: 0x96, hi: 0x96}, - {value: 0x0010, lo: 0x97, hi: 0x97}, - {value: 0x0014, lo: 0x98, hi: 0x9e}, - {value: 0x0034, lo: 0xa0, hi: 0xa0}, - {value: 0x0010, lo: 0xa1, hi: 0xa1}, - {value: 0x0014, lo: 0xa2, hi: 0xa2}, - {value: 0x0010, lo: 0xa3, hi: 0xa4}, - {value: 0x0014, lo: 0xa5, hi: 0xac}, - {value: 0x0010, lo: 0xad, hi: 0xb2}, - {value: 0x0014, lo: 0xb3, hi: 0xb4}, - {value: 0x0024, lo: 0xb5, hi: 0xbc}, - {value: 0x0034, lo: 0xbf, hi: 0xbf}, - // Block 0x53, offset 0x245 - {value: 0x0010, lo: 0x80, hi: 0x89}, - {value: 0x0010, lo: 0x90, hi: 0x99}, - {value: 0x0004, lo: 0xa7, hi: 0xa7}, - {value: 0x0024, lo: 0xb0, hi: 0xb4}, - {value: 0x0034, lo: 0xb5, hi: 0xba}, - {value: 0x0024, lo: 0xbb, hi: 0xbc}, - {value: 0x0034, lo: 0xbd, hi: 0xbd}, - {value: 0x0014, lo: 0xbe, hi: 0xbe}, - // Block 0x54, offset 0x24d - {value: 0x0014, lo: 0x80, hi: 0x83}, - {value: 0x0010, lo: 0x84, hi: 0xb3}, - {value: 0x0034, lo: 0xb4, hi: 0xb4}, - {value: 0x0010, lo: 0xb5, hi: 0xb5}, - {value: 0x0014, lo: 0xb6, hi: 0xba}, - {value: 0x0010, lo: 0xbb, hi: 0xbb}, - {value: 0x0014, lo: 0xbc, hi: 0xbc}, - {value: 0x0010, lo: 0xbd, hi: 0xbf}, - // Block 0x55, offset 0x255 - {value: 0x0010, lo: 0x80, hi: 0x81}, - {value: 0x0014, lo: 0x82, hi: 0x82}, - {value: 0x0010, lo: 0x83, hi: 0x83}, - {value: 0x0030, lo: 0x84, hi: 0x84}, - {value: 0x0010, lo: 0x85, hi: 0x8b}, - {value: 0x0010, lo: 0x90, hi: 0x99}, - {value: 0x0024, lo: 0xab, hi: 0xab}, - {value: 0x0034, lo: 0xac, hi: 0xac}, - {value: 0x0024, lo: 0xad, hi: 0xb3}, - // Block 0x56, offset 0x25e - {value: 0x0014, lo: 0x80, hi: 0x81}, - {value: 0x0010, lo: 0x82, hi: 0xa1}, - {value: 0x0014, lo: 0xa2, hi: 0xa5}, - {value: 0x0010, lo: 0xa6, hi: 0xa7}, - {value: 0x0014, lo: 0xa8, hi: 0xa9}, - {value: 0x0030, lo: 0xaa, hi: 0xaa}, - {value: 0x0034, lo: 0xab, hi: 0xab}, - {value: 0x0014, lo: 0xac, hi: 0xad}, - {value: 0x0010, lo: 0xae, hi: 0xbf}, - // Block 0x57, offset 0x267 - {value: 0x0010, lo: 0x80, hi: 0xa5}, - {value: 0x0034, lo: 0xa6, hi: 0xa6}, - {value: 0x0010, lo: 0xa7, hi: 0xa7}, - {value: 0x0014, lo: 0xa8, hi: 0xa9}, - {value: 0x0010, lo: 0xaa, hi: 0xac}, - {value: 0x0014, lo: 0xad, hi: 0xad}, - {value: 0x0010, lo: 0xae, hi: 0xae}, - {value: 0x0014, lo: 0xaf, hi: 0xb1}, - {value: 0x0030, lo: 0xb2, hi: 0xb3}, - // Block 0x58, offset 0x270 - {value: 0x0010, lo: 0x80, hi: 0xab}, - {value: 0x0014, lo: 0xac, hi: 0xb3}, - {value: 0x0010, lo: 0xb4, hi: 0xb5}, - {value: 0x0014, lo: 0xb6, hi: 0xb6}, - {value: 0x0034, lo: 0xb7, hi: 0xb7}, - // Block 0x59, offset 0x275 - {value: 0x0010, lo: 0x80, hi: 0x89}, - {value: 0x0010, lo: 0x8d, hi: 0xb7}, - {value: 0x0014, lo: 0xb8, hi: 0xbd}, - // Block 0x5a, offset 0x278 - {value: 0x296a, lo: 0x80, hi: 0x80}, - {value: 0x2a2a, lo: 0x81, hi: 0x81}, - {value: 0x2aea, lo: 0x82, hi: 0x82}, - {value: 0x2baa, lo: 0x83, hi: 0x83}, - {value: 0x2c6a, lo: 0x84, hi: 0x84}, - {value: 0x2d2a, lo: 0x85, hi: 0x85}, - {value: 0x2dea, lo: 0x86, hi: 0x86}, - {value: 0x2eaa, lo: 0x87, hi: 0x87}, - {value: 0x2f6a, lo: 0x88, hi: 0x88}, - // Block 0x5b, offset 0x281 - {value: 0x0024, lo: 0x90, hi: 0x92}, - {value: 0x0034, lo: 0x94, hi: 0x99}, - {value: 0x0024, lo: 0x9a, hi: 0x9b}, - {value: 0x0034, lo: 0x9c, hi: 0x9f}, - {value: 0x0024, lo: 0xa0, hi: 0xa0}, - {value: 0x0010, lo: 0xa1, hi: 0xa1}, - {value: 0x0034, lo: 0xa2, hi: 0xa8}, - {value: 0x0010, lo: 0xa9, hi: 0xac}, - {value: 0x0034, lo: 0xad, hi: 0xad}, - {value: 0x0010, lo: 0xae, hi: 0xb3}, - {value: 0x0024, lo: 0xb4, hi: 0xb4}, - {value: 0x0010, lo: 0xb5, hi: 0xb6}, - {value: 0x0024, lo: 0xb8, hi: 0xb9}, - // Block 0x5c, offset 0x28e - {value: 0x0012, lo: 0x80, hi: 0xab}, - {value: 0x0015, lo: 0xac, hi: 0xbf}, - // Block 0x5d, offset 0x290 - {value: 0x0015, lo: 0x80, hi: 0xaa}, - {value: 0x0012, lo: 0xab, hi: 0xb7}, - {value: 0x0015, lo: 0xb8, hi: 0xb8}, - {value: 0x8452, lo: 0xb9, hi: 0xb9}, - {value: 0x0012, lo: 0xba, hi: 0xbc}, - {value: 0x8852, lo: 0xbd, hi: 0xbd}, - {value: 0x0012, lo: 0xbe, hi: 0xbf}, - // Block 0x5e, offset 0x297 - {value: 0x0012, lo: 0x80, hi: 0x9a}, - {value: 0x0015, lo: 0x9b, hi: 0xbf}, - // Block 0x5f, offset 0x299 - {value: 0x0024, lo: 0x80, hi: 0x81}, - {value: 0x0034, lo: 0x82, hi: 0x82}, - {value: 0x0024, lo: 0x83, hi: 0x89}, - {value: 0x0034, lo: 0x8a, hi: 0x8a}, - {value: 0x0024, lo: 0x8b, hi: 0x8c}, - {value: 0x0034, lo: 0x8d, hi: 0x90}, - {value: 0x0024, lo: 0x91, hi: 0xb5}, - {value: 0x0024, lo: 0xbb, hi: 0xbb}, - {value: 0x0034, lo: 0xbc, hi: 0xbd}, - {value: 0x0024, lo: 0xbe, hi: 0xbe}, - {value: 0x0034, lo: 0xbf, hi: 0xbf}, - // Block 0x60, offset 0x2a4 - {value: 0x0117, lo: 0x80, hi: 0xbf}, - // Block 0x61, offset 0x2a5 - {value: 0x0117, lo: 0x80, hi: 0x95}, - {value: 0x306a, lo: 0x96, hi: 0x96}, - {value: 0x316a, lo: 0x97, hi: 0x97}, - {value: 0x326a, lo: 0x98, hi: 0x98}, - {value: 0x336a, lo: 0x99, hi: 0x99}, - {value: 0x346a, lo: 0x9a, hi: 0x9a}, - {value: 0x356a, lo: 0x9b, hi: 0x9b}, - {value: 0x0012, lo: 0x9c, hi: 0x9d}, - {value: 0x366b, lo: 0x9e, hi: 0x9e}, - {value: 0x0012, lo: 0x9f, hi: 0x9f}, - {value: 0x0117, lo: 0xa0, hi: 0xbf}, - // Block 0x62, offset 0x2b0 - {value: 0x0812, lo: 0x80, hi: 0x87}, - {value: 0x0813, lo: 0x88, hi: 0x8f}, - {value: 0x0812, lo: 0x90, hi: 0x95}, - {value: 0x0813, lo: 0x98, hi: 0x9d}, - {value: 0x0812, lo: 0xa0, hi: 0xa7}, - {value: 0x0813, lo: 0xa8, hi: 0xaf}, - {value: 0x0812, lo: 0xb0, hi: 0xb7}, - {value: 0x0813, lo: 0xb8, hi: 0xbf}, - // Block 0x63, offset 0x2b8 - {value: 0x0004, lo: 0x8b, hi: 0x8b}, - {value: 0x0014, lo: 0x8c, hi: 0x8f}, - {value: 0x0054, lo: 0x98, hi: 0x99}, - {value: 0x0054, lo: 0xa4, hi: 0xa4}, - {value: 0x0054, lo: 0xa7, hi: 0xa7}, - {value: 0x0014, lo: 0xaa, hi: 0xae}, - {value: 0x0010, lo: 0xaf, hi: 0xaf}, - {value: 0x0010, lo: 0xbf, hi: 0xbf}, - // Block 0x64, offset 0x2c0 - {value: 0x0010, lo: 0x80, hi: 0x80}, - {value: 0x0010, lo: 0x94, hi: 0x94}, - {value: 0x0014, lo: 0xa0, hi: 0xa4}, - {value: 0x0014, lo: 0xa6, hi: 0xaf}, - {value: 0x0015, lo: 0xb1, hi: 0xb1}, - {value: 0x0015, lo: 0xbf, hi: 0xbf}, - // Block 0x65, offset 0x2c6 - {value: 0x0015, lo: 0x90, hi: 0x9c}, - // Block 0x66, offset 0x2c7 - {value: 0x0024, lo: 0x90, hi: 0x91}, - {value: 0x0034, lo: 0x92, hi: 0x93}, - {value: 0x0024, lo: 0x94, hi: 0x97}, - {value: 0x0034, lo: 0x98, hi: 0x9a}, - {value: 0x0024, lo: 0x9b, hi: 0x9c}, - {value: 0x0014, lo: 0x9d, hi: 0xa0}, - {value: 0x0024, lo: 0xa1, hi: 0xa1}, - {value: 0x0014, lo: 0xa2, hi: 0xa4}, - {value: 0x0034, lo: 0xa5, hi: 0xa6}, - {value: 0x0024, lo: 0xa7, hi: 0xa7}, - {value: 0x0034, lo: 0xa8, hi: 0xa8}, - {value: 0x0024, lo: 0xa9, hi: 0xa9}, - {value: 0x0034, lo: 0xaa, hi: 0xaf}, - {value: 0x0024, lo: 0xb0, hi: 0xb0}, - // Block 0x67, offset 0x2d5 - {value: 0x0016, lo: 0x85, hi: 0x86}, - {value: 0x0012, lo: 0x87, hi: 0x89}, - {value: 0x9d52, lo: 0x8e, hi: 0x8e}, - {value: 0x1013, lo: 0xa0, hi: 0xaf}, - {value: 0x1012, lo: 0xb0, hi: 0xbf}, - // Block 0x68, offset 0x2da - {value: 0x0010, lo: 0x80, hi: 0x82}, - {value: 0x0716, lo: 0x83, hi: 0x84}, - {value: 0x0010, lo: 0x85, hi: 0x88}, - // Block 0x69, offset 0x2dd - {value: 0xa053, lo: 0xb6, hi: 0xb7}, - {value: 0xa353, lo: 0xb8, hi: 0xb9}, - {value: 0xa653, lo: 0xba, hi: 0xbb}, - {value: 0xa353, lo: 0xbc, hi: 0xbd}, - {value: 0xa053, lo: 0xbe, hi: 0xbf}, - // Block 0x6a, offset 0x2e2 - {value: 0x3013, lo: 0x80, hi: 0x8f}, - {value: 0x6553, lo: 0x90, hi: 0x9f}, - {value: 0xa953, lo: 0xa0, hi: 0xae}, - {value: 0x3012, lo: 0xb0, hi: 0xbf}, - // Block 0x6b, offset 0x2e6 - {value: 0x0117, lo: 0x80, hi: 0xa3}, - {value: 0x0012, lo: 0xa4, hi: 0xa4}, - {value: 0x0716, lo: 0xab, hi: 0xac}, - {value: 0x0316, lo: 0xad, hi: 0xae}, - {value: 0x0024, lo: 0xaf, hi: 0xb1}, - {value: 0x0117, lo: 0xb2, hi: 0xb3}, - // Block 0x6c, offset 0x2ec - {value: 0x6c52, lo: 0x80, hi: 0x9f}, - {value: 0x7052, lo: 0xa0, hi: 0xa5}, - {value: 0x7052, lo: 0xa7, hi: 0xa7}, - {value: 0x7052, lo: 0xad, hi: 0xad}, - {value: 0x0010, lo: 0xb0, hi: 0xbf}, - // Block 0x6d, offset 0x2f1 - {value: 0x0010, lo: 0x80, hi: 0xa7}, - {value: 0x0014, lo: 0xaf, hi: 0xaf}, - {value: 0x0034, lo: 0xbf, hi: 0xbf}, - // Block 0x6e, offset 0x2f4 - {value: 0x0010, lo: 0x80, hi: 0x96}, - {value: 0x0010, lo: 0xa0, hi: 0xa6}, - {value: 0x0010, lo: 0xa8, hi: 0xae}, - {value: 0x0010, lo: 0xb0, hi: 0xb6}, - {value: 0x0010, lo: 0xb8, hi: 0xbe}, - // Block 0x6f, offset 0x2f9 - {value: 0x0010, lo: 0x80, hi: 0x86}, - {value: 0x0010, lo: 0x88, hi: 0x8e}, - {value: 0x0010, lo: 0x90, hi: 0x96}, - {value: 0x0010, lo: 0x98, hi: 0x9e}, - {value: 0x0024, lo: 0xa0, hi: 0xbf}, - // Block 0x70, offset 0x2fe - {value: 0x0014, lo: 0xaf, hi: 0xaf}, - // Block 0x71, offset 0x2ff - {value: 0x0014, lo: 0x85, hi: 0x85}, - {value: 0x0034, lo: 0xaa, hi: 0xad}, - {value: 0x0030, lo: 0xae, hi: 0xaf}, - {value: 0x0004, lo: 0xb1, hi: 0xb5}, - {value: 0x0014, lo: 0xbb, hi: 0xbb}, - {value: 0x0010, lo: 0xbc, hi: 0xbc}, - // Block 0x72, offset 0x305 - {value: 0x0034, lo: 0x99, hi: 0x9a}, - {value: 0x0004, lo: 0x9b, hi: 0x9e}, - // Block 0x73, offset 0x307 - {value: 0x0004, lo: 0xbc, hi: 0xbe}, - // Block 0x74, offset 0x308 - {value: 0x0010, lo: 0x85, hi: 0xad}, - {value: 0x0010, lo: 0xb1, hi: 0xbf}, - // Block 0x75, offset 0x30a - {value: 0x0010, lo: 0x80, hi: 0x8e}, - {value: 0x0010, lo: 0xa0, hi: 0xba}, - // Block 0x76, offset 0x30c - {value: 0x0010, lo: 0x80, hi: 0x94}, - {value: 0x0014, lo: 0x95, hi: 0x95}, - {value: 0x0010, lo: 0x96, hi: 0xbf}, - // Block 0x77, offset 0x30f - {value: 0x0010, lo: 0x80, hi: 0x8c}, - // Block 0x78, offset 0x310 - {value: 0x0010, lo: 0x90, hi: 0xb7}, - {value: 0x0014, lo: 0xb8, hi: 0xbd}, - // Block 0x79, offset 0x312 - {value: 0x0010, lo: 0x80, hi: 0x8b}, - {value: 0x0014, lo: 0x8c, hi: 0x8c}, - {value: 0x0010, lo: 0x90, hi: 0xab}, - // Block 0x7a, offset 0x315 - {value: 0x0117, lo: 0x80, hi: 0xad}, - {value: 0x0010, lo: 0xae, hi: 0xae}, - {value: 0x0024, lo: 0xaf, hi: 0xaf}, - {value: 0x0014, lo: 0xb0, hi: 0xb2}, - {value: 0x0024, lo: 0xb4, hi: 0xbd}, - {value: 0x0014, lo: 0xbf, hi: 0xbf}, - // Block 0x7b, offset 0x31b - {value: 0x0117, lo: 0x80, hi: 0x9b}, - {value: 0x0015, lo: 0x9c, hi: 0x9d}, - {value: 0x0024, lo: 0x9e, hi: 0x9f}, - {value: 0x0010, lo: 0xa0, hi: 0xbf}, - // Block 0x7c, offset 0x31f - {value: 0x0010, lo: 0x80, hi: 0xaf}, - {value: 0x0024, lo: 0xb0, hi: 0xb1}, - // Block 0x7d, offset 0x321 - {value: 0x0004, lo: 0x80, hi: 0x96}, - {value: 0x0014, lo: 0x97, hi: 0x9f}, - {value: 0x0004, lo: 0xa0, hi: 0xa1}, - {value: 0x0117, lo: 0xa2, hi: 0xaf}, - {value: 0x0012, lo: 0xb0, hi: 0xb1}, - {value: 0x0117, lo: 0xb2, hi: 0xbf}, - // Block 0x7e, offset 0x327 - {value: 0x0117, lo: 0x80, hi: 0xaf}, - {value: 0x0015, lo: 0xb0, hi: 0xb0}, - {value: 0x0012, lo: 0xb1, hi: 0xb8}, - {value: 0x0316, lo: 0xb9, hi: 0xba}, - {value: 0x0716, lo: 0xbb, hi: 0xbc}, - {value: 0x8453, lo: 0xbd, hi: 0xbd}, - {value: 0x0117, lo: 0xbe, hi: 0xbf}, - // Block 0x7f, offset 0x32e - {value: 0x0010, lo: 0xb7, hi: 0xb7}, - {value: 0x0015, lo: 0xb8, hi: 0xb9}, - {value: 0x0012, lo: 0xba, hi: 0xba}, - {value: 0x0010, lo: 0xbb, hi: 0xbf}, - // Block 0x80, offset 0x332 - {value: 0x0010, lo: 0x80, hi: 0x81}, - {value: 0x0014, lo: 0x82, hi: 0x82}, - {value: 0x0010, lo: 0x83, hi: 0x85}, - {value: 0x0034, lo: 0x86, hi: 0x86}, - {value: 0x0010, lo: 0x87, hi: 0x8a}, - {value: 0x0014, lo: 0x8b, hi: 0x8b}, - {value: 0x0010, lo: 0x8c, hi: 0xa4}, - {value: 0x0014, lo: 0xa5, hi: 0xa6}, - {value: 0x0010, lo: 0xa7, hi: 0xa7}, - // Block 0x81, offset 0x33b - {value: 0x0010, lo: 0x80, hi: 0xb3}, - // Block 0x82, offset 0x33c - {value: 0x0010, lo: 0x80, hi: 0x83}, - {value: 0x0034, lo: 0x84, hi: 0x84}, - {value: 0x0014, lo: 0x85, hi: 0x85}, - {value: 0x0010, lo: 0x90, hi: 0x99}, - {value: 0x0024, lo: 0xa0, hi: 0xb1}, - {value: 0x0010, lo: 0xb2, hi: 0xb7}, - {value: 0x0010, lo: 0xbb, hi: 0xbb}, - {value: 0x0010, lo: 0xbd, hi: 0xbd}, - // Block 0x83, offset 0x344 - {value: 0x0010, lo: 0x80, hi: 0xa5}, - {value: 0x0014, lo: 0xa6, hi: 0xaa}, - {value: 0x0034, lo: 0xab, hi: 0xad}, - {value: 0x0010, lo: 0xb0, hi: 0xbf}, - // Block 0x84, offset 0x348 - {value: 0x0010, lo: 0x80, hi: 0x86}, - {value: 0x0014, lo: 0x87, hi: 0x91}, - {value: 0x0010, lo: 0x92, hi: 0x92}, - {value: 0x0030, lo: 0x93, hi: 0x93}, - {value: 0x0010, lo: 0xa0, hi: 0xbc}, - // Block 0x85, offset 0x34d - {value: 0x0014, lo: 0x80, hi: 0x82}, - {value: 0x0010, lo: 0x83, hi: 0xb2}, - {value: 0x0034, lo: 0xb3, hi: 0xb3}, - {value: 0x0010, lo: 0xb4, hi: 0xb5}, - {value: 0x0014, lo: 0xb6, hi: 0xb9}, - {value: 0x0010, lo: 0xba, hi: 0xbb}, - {value: 0x0014, lo: 0xbc, hi: 0xbc}, - {value: 0x0010, lo: 0xbd, hi: 0xbf}, - // Block 0x86, offset 0x355 - {value: 0x0030, lo: 0x80, hi: 0x80}, - {value: 0x0014, lo: 0x8f, hi: 0x8f}, - {value: 0x0010, lo: 0x90, hi: 0x99}, - {value: 0x0014, lo: 0xa5, hi: 0xa5}, - {value: 0x0004, lo: 0xa6, hi: 0xa6}, - {value: 0x0010, lo: 0xb0, hi: 0xb9}, - // Block 0x87, offset 0x35b - {value: 0x0010, lo: 0x80, hi: 0xa8}, - {value: 0x0014, lo: 0xa9, hi: 0xae}, - {value: 0x0010, lo: 0xaf, hi: 0xb0}, - {value: 0x0014, lo: 0xb1, hi: 0xb2}, - {value: 0x0010, lo: 0xb3, hi: 0xb4}, - {value: 0x0014, lo: 0xb5, hi: 0xb6}, - // Block 0x88, offset 0x361 - {value: 0x0010, lo: 0x80, hi: 0x82}, - {value: 0x0014, lo: 0x83, hi: 0x83}, - {value: 0x0010, lo: 0x84, hi: 0x8b}, - {value: 0x0014, lo: 0x8c, hi: 0x8c}, - {value: 0x0010, lo: 0x8d, hi: 0x8d}, - {value: 0x0010, lo: 0x90, hi: 0x99}, - {value: 0x0004, lo: 0xb0, hi: 0xb0}, - {value: 0x0010, lo: 0xbb, hi: 0xbb}, - {value: 0x0014, lo: 0xbc, hi: 0xbc}, - {value: 0x0010, lo: 0xbd, hi: 0xbd}, - // Block 0x89, offset 0x36b - {value: 0x0024, lo: 0xb0, hi: 0xb0}, - {value: 0x0024, lo: 0xb2, hi: 0xb3}, - {value: 0x0034, lo: 0xb4, hi: 0xb4}, - {value: 0x0024, lo: 0xb7, hi: 0xb8}, - {value: 0x0024, lo: 0xbe, hi: 0xbf}, - // Block 0x8a, offset 0x370 - {value: 0x0024, lo: 0x81, hi: 0x81}, - {value: 0x0004, lo: 0x9d, hi: 0x9d}, - {value: 0x0010, lo: 0xa0, hi: 0xab}, - {value: 0x0014, lo: 0xac, hi: 0xad}, - {value: 0x0010, lo: 0xae, hi: 0xaf}, - {value: 0x0010, lo: 0xb2, hi: 0xb2}, - {value: 0x0014, lo: 0xb3, hi: 0xb4}, - {value: 0x0010, lo: 0xb5, hi: 0xb5}, - {value: 0x0034, lo: 0xb6, hi: 0xb6}, - // Block 0x8b, offset 0x379 - {value: 0x0010, lo: 0x81, hi: 0x86}, - {value: 0x0010, lo: 0x89, hi: 0x8e}, - {value: 0x0010, lo: 0x91, hi: 0x96}, - {value: 0x0010, lo: 0xa0, hi: 0xa6}, - {value: 0x0010, lo: 0xa8, hi: 0xae}, - {value: 0x0012, lo: 0xb0, hi: 0xbf}, - // Block 0x8c, offset 0x37f - {value: 0x0012, lo: 0x80, hi: 0x92}, - {value: 0xac52, lo: 0x93, hi: 0x93}, - {value: 0x0012, lo: 0x94, hi: 0x9a}, - {value: 0x0004, lo: 0x9b, hi: 0x9b}, - {value: 0x0015, lo: 0x9c, hi: 0x9f}, - {value: 0x0012, lo: 0xa0, hi: 0xa5}, - {value: 0x74d2, lo: 0xb0, hi: 0xbf}, - // Block 0x8d, offset 0x386 - {value: 0x78d2, lo: 0x80, hi: 0x8f}, - {value: 0x7cd2, lo: 0x90, hi: 0x9f}, - {value: 0x80d2, lo: 0xa0, hi: 0xaf}, - {value: 0x7cd2, lo: 0xb0, hi: 0xbf}, - // Block 0x8e, offset 0x38a - {value: 0x0010, lo: 0x80, hi: 0xa4}, - {value: 0x0014, lo: 0xa5, hi: 0xa5}, - {value: 0x0010, lo: 0xa6, hi: 0xa7}, - {value: 0x0014, lo: 0xa8, hi: 0xa8}, - {value: 0x0010, lo: 0xa9, hi: 0xaa}, - {value: 0x0010, lo: 0xac, hi: 0xac}, - {value: 0x0034, lo: 0xad, hi: 0xad}, - {value: 0x0010, lo: 0xb0, hi: 0xb9}, - // Block 0x8f, offset 0x392 - {value: 0x0010, lo: 0x80, hi: 0xa3}, - {value: 0x0010, lo: 0xb0, hi: 0xbf}, - // Block 0x90, offset 0x394 - {value: 0x0010, lo: 0x80, hi: 0x86}, - {value: 0x0010, lo: 0x8b, hi: 0xbb}, - // Block 0x91, offset 0x396 - {value: 0x0010, lo: 0x80, hi: 0x81}, - {value: 0x0010, lo: 0x83, hi: 0x84}, - {value: 0x0010, lo: 0x86, hi: 0xbf}, - // Block 0x92, offset 0x399 - {value: 0x0010, lo: 0x80, hi: 0xb1}, - {value: 0x0004, lo: 0xb2, hi: 0xbf}, - // Block 0x93, offset 0x39b - {value: 0x0004, lo: 0x80, hi: 0x81}, - {value: 0x0010, lo: 0x93, hi: 0xbf}, - // Block 0x94, offset 0x39d - {value: 0x0010, lo: 0x80, hi: 0xbd}, - // Block 0x95, offset 0x39e - {value: 0x0010, lo: 0x90, hi: 0xbf}, - // Block 0x96, offset 0x39f - {value: 0x0010, lo: 0x80, hi: 0x8f}, - {value: 0x0010, lo: 0x92, hi: 0xbf}, - // Block 0x97, offset 0x3a1 - {value: 0x0010, lo: 0x80, hi: 0x87}, - {value: 0x0010, lo: 0xb0, hi: 0xbb}, - // Block 0x98, offset 0x3a3 - {value: 0x0014, lo: 0x80, hi: 0x8f}, - {value: 0x0054, lo: 0x93, hi: 0x93}, - {value: 0x0024, lo: 0xa0, hi: 0xa6}, - {value: 0x0034, lo: 0xa7, hi: 0xad}, - {value: 0x0024, lo: 0xae, hi: 0xaf}, - {value: 0x0010, lo: 0xb3, hi: 0xb4}, - // Block 0x99, offset 0x3a9 - {value: 0x0010, lo: 0x8d, hi: 0x8f}, - {value: 0x0054, lo: 0x92, hi: 0x92}, - {value: 0x0054, lo: 0x95, hi: 0x95}, - {value: 0x0010, lo: 0xb0, hi: 0xb4}, - {value: 0x0010, lo: 0xb6, hi: 0xbf}, - // Block 0x9a, offset 0x3ae - {value: 0x0010, lo: 0x80, hi: 0xbc}, - {value: 0x0014, lo: 0xbf, hi: 0xbf}, - // Block 0x9b, offset 0x3b0 - {value: 0x0054, lo: 0x87, hi: 0x87}, - {value: 0x0054, lo: 0x8e, hi: 0x8e}, - {value: 0x0054, lo: 0x9a, hi: 0x9a}, - {value: 0x5f53, lo: 0xa1, hi: 0xba}, - {value: 0x0004, lo: 0xbe, hi: 0xbe}, - {value: 0x0010, lo: 0xbf, hi: 0xbf}, - // Block 0x9c, offset 0x3b6 - {value: 0x0004, lo: 0x80, hi: 0x80}, - {value: 0x5f52, lo: 0x81, hi: 0x9a}, - {value: 0x0004, lo: 0xb0, hi: 0xb0}, - // Block 0x9d, offset 0x3b9 - {value: 0x0014, lo: 0x9e, hi: 0x9f}, - {value: 0x0010, lo: 0xa0, hi: 0xbe}, - // Block 0x9e, offset 0x3bb - {value: 0x0010, lo: 0x82, hi: 0x87}, - {value: 0x0010, lo: 0x8a, hi: 0x8f}, - {value: 0x0010, lo: 0x92, hi: 0x97}, - {value: 0x0010, lo: 0x9a, hi: 0x9c}, - {value: 0x0004, lo: 0xa3, hi: 0xa3}, - {value: 0x0014, lo: 0xb9, hi: 0xbb}, - // Block 0x9f, offset 0x3c1 - {value: 0x0010, lo: 0x80, hi: 0x8b}, - {value: 0x0010, lo: 0x8d, hi: 0xa6}, - {value: 0x0010, lo: 0xa8, hi: 0xba}, - {value: 0x0010, lo: 0xbc, hi: 0xbd}, - {value: 0x0010, lo: 0xbf, hi: 0xbf}, - // Block 0xa0, offset 0x3c6 - {value: 0x0010, lo: 0x80, hi: 0x8d}, - {value: 0x0010, lo: 0x90, hi: 0x9d}, - // Block 0xa1, offset 0x3c8 - {value: 0x0010, lo: 0x80, hi: 0xba}, - // Block 0xa2, offset 0x3c9 - {value: 0x0010, lo: 0x80, hi: 0xb4}, - // Block 0xa3, offset 0x3ca - {value: 0x0034, lo: 0xbd, hi: 0xbd}, - // Block 0xa4, offset 0x3cb - {value: 0x0010, lo: 0x80, hi: 0x9c}, - {value: 0x0010, lo: 0xa0, hi: 0xbf}, - // Block 0xa5, offset 0x3cd - {value: 0x0010, lo: 0x80, hi: 0x90}, - {value: 0x0034, lo: 0xa0, hi: 0xa0}, - // Block 0xa6, offset 0x3cf - {value: 0x0010, lo: 0x80, hi: 0x9f}, - {value: 0x0010, lo: 0xb0, hi: 0xbf}, - // Block 0xa7, offset 0x3d1 - {value: 0x0010, lo: 0x80, hi: 0x8a}, - {value: 0x0010, lo: 0x90, hi: 0xb5}, - {value: 0x0024, lo: 0xb6, hi: 0xba}, - // Block 0xa8, offset 0x3d4 - {value: 0x0010, lo: 0x80, hi: 0x9d}, - {value: 0x0010, lo: 0xa0, hi: 0xbf}, - // Block 0xa9, offset 0x3d6 - {value: 0x0010, lo: 0x80, hi: 0x83}, - {value: 0x0010, lo: 0x88, hi: 0x8f}, - {value: 0x0010, lo: 0x91, hi: 0x95}, - // Block 0xaa, offset 0x3d9 - {value: 0x2813, lo: 0x80, hi: 0x87}, - {value: 0x3813, lo: 0x88, hi: 0x8f}, - {value: 0x2813, lo: 0x90, hi: 0x97}, - {value: 0xaf53, lo: 0x98, hi: 0x9f}, - {value: 0xb253, lo: 0xa0, hi: 0xa7}, - {value: 0x2812, lo: 0xa8, hi: 0xaf}, - {value: 0x3812, lo: 0xb0, hi: 0xb7}, - {value: 0x2812, lo: 0xb8, hi: 0xbf}, - // Block 0xab, offset 0x3e1 - {value: 0xaf52, lo: 0x80, hi: 0x87}, - {value: 0xb252, lo: 0x88, hi: 0x8f}, - {value: 0x0010, lo: 0x90, hi: 0xbf}, - // Block 0xac, offset 0x3e4 - {value: 0x0010, lo: 0x80, hi: 0x9d}, - {value: 0x0010, lo: 0xa0, hi: 0xa9}, - {value: 0xb253, lo: 0xb0, hi: 0xb7}, - {value: 0xaf53, lo: 0xb8, hi: 0xbf}, - // Block 0xad, offset 0x3e8 - {value: 0x2813, lo: 0x80, hi: 0x87}, - {value: 0x3813, lo: 0x88, hi: 0x8f}, - {value: 0x2813, lo: 0x90, hi: 0x93}, - {value: 0xb252, lo: 0x98, hi: 0x9f}, - {value: 0xaf52, lo: 0xa0, hi: 0xa7}, - {value: 0x2812, lo: 0xa8, hi: 0xaf}, - {value: 0x3812, lo: 0xb0, hi: 0xb7}, - {value: 0x2812, lo: 0xb8, hi: 0xbb}, - // Block 0xae, offset 0x3f0 - {value: 0x0010, lo: 0x80, hi: 0xa7}, - {value: 0x0010, lo: 0xb0, hi: 0xbf}, - // Block 0xaf, offset 0x3f2 - {value: 0x0010, lo: 0x80, hi: 0xa3}, - // Block 0xb0, offset 0x3f3 - {value: 0x0010, lo: 0x80, hi: 0xb6}, - // Block 0xb1, offset 0x3f4 - {value: 0x0010, lo: 0x80, hi: 0x95}, - {value: 0x0010, lo: 0xa0, hi: 0xa7}, - // Block 0xb2, offset 0x3f6 - {value: 0x0010, lo: 0x80, hi: 0x85}, - {value: 0x0010, lo: 0x88, hi: 0x88}, - {value: 0x0010, lo: 0x8a, hi: 0xb5}, - {value: 0x0010, lo: 0xb7, hi: 0xb8}, - {value: 0x0010, lo: 0xbc, hi: 0xbc}, - {value: 0x0010, lo: 0xbf, hi: 0xbf}, - // Block 0xb3, offset 0x3fc - {value: 0x0010, lo: 0x80, hi: 0x95}, - {value: 0x0010, lo: 0xa0, hi: 0xb6}, - // Block 0xb4, offset 0x3fe - {value: 0x0010, lo: 0x80, hi: 0x9e}, - // Block 0xb5, offset 0x3ff - {value: 0x0010, lo: 0xa0, hi: 0xb2}, - {value: 0x0010, lo: 0xb4, hi: 0xb5}, - // Block 0xb6, offset 0x401 - {value: 0x0010, lo: 0x80, hi: 0x95}, - {value: 0x0010, lo: 0xa0, hi: 0xb9}, - // Block 0xb7, offset 0x403 - {value: 0x0010, lo: 0x80, hi: 0xb7}, - {value: 0x0010, lo: 0xbe, hi: 0xbf}, - // Block 0xb8, offset 0x405 - {value: 0x0010, lo: 0x80, hi: 0x80}, - {value: 0x0014, lo: 0x81, hi: 0x83}, - {value: 0x0014, lo: 0x85, hi: 0x86}, - {value: 0x0014, lo: 0x8c, hi: 0x8c}, - {value: 0x0034, lo: 0x8d, hi: 0x8d}, - {value: 0x0014, lo: 0x8e, hi: 0x8e}, - {value: 0x0024, lo: 0x8f, hi: 0x8f}, - {value: 0x0010, lo: 0x90, hi: 0x93}, - {value: 0x0010, lo: 0x95, hi: 0x97}, - {value: 0x0010, lo: 0x99, hi: 0xb3}, - {value: 0x0024, lo: 0xb8, hi: 0xb8}, - {value: 0x0034, lo: 0xb9, hi: 0xba}, - {value: 0x0034, lo: 0xbf, hi: 0xbf}, - // Block 0xb9, offset 0x412 - {value: 0x0010, lo: 0xa0, hi: 0xbc}, - // Block 0xba, offset 0x413 - {value: 0x0010, lo: 0x80, hi: 0x9c}, - // Block 0xbb, offset 0x414 - {value: 0x0010, lo: 0x80, hi: 0x87}, - {value: 0x0010, lo: 0x89, hi: 0xa4}, - {value: 0x0024, lo: 0xa5, hi: 0xa5}, - {value: 0x0034, lo: 0xa6, hi: 0xa6}, - // Block 0xbc, offset 0x418 - {value: 0x0010, lo: 0x80, hi: 0x95}, - {value: 0x0010, lo: 0xa0, hi: 0xb2}, - // Block 0xbd, offset 0x41a - {value: 0x0010, lo: 0x80, hi: 0x91}, - // Block 0xbe, offset 0x41b - {value: 0x0010, lo: 0x80, hi: 0x88}, - // Block 0xbf, offset 0x41c - {value: 0x5653, lo: 0x80, hi: 0xb2}, - // Block 0xc0, offset 0x41d - {value: 0x5652, lo: 0x80, hi: 0xb2}, - // Block 0xc1, offset 0x41e - {value: 0x0010, lo: 0x80, hi: 0x80}, - {value: 0x0014, lo: 0x81, hi: 0x81}, - {value: 0x0010, lo: 0x82, hi: 0xb7}, - {value: 0x0014, lo: 0xb8, hi: 0xbf}, - // Block 0xc2, offset 0x422 - {value: 0x0014, lo: 0x80, hi: 0x85}, - {value: 0x0034, lo: 0x86, hi: 0x86}, - {value: 0x0010, lo: 0xa6, hi: 0xaf}, - {value: 0x0034, lo: 0xbf, hi: 0xbf}, - // Block 0xc3, offset 0x426 - {value: 0x0014, lo: 0x80, hi: 0x81}, - {value: 0x0010, lo: 0x82, hi: 0xb2}, - {value: 0x0014, lo: 0xb3, hi: 0xb6}, - {value: 0x0010, lo: 0xb7, hi: 0xb8}, - {value: 0x0034, lo: 0xb9, hi: 0xba}, - {value: 0x0014, lo: 0xbd, hi: 0xbd}, - // Block 0xc4, offset 0x42c - {value: 0x0010, lo: 0x90, hi: 0xa8}, - {value: 0x0010, lo: 0xb0, hi: 0xb9}, - // Block 0xc5, offset 0x42e - {value: 0x0024, lo: 0x80, hi: 0x82}, - {value: 0x0010, lo: 0x83, hi: 0xa6}, - {value: 0x0014, lo: 0xa7, hi: 0xab}, - {value: 0x0010, lo: 0xac, hi: 0xac}, - {value: 0x0014, lo: 0xad, hi: 0xb2}, - {value: 0x0034, lo: 0xb3, hi: 0xb4}, - {value: 0x0010, lo: 0xb6, hi: 0xbf}, - // Block 0xc6, offset 0x435 - {value: 0x0010, lo: 0x90, hi: 0xb2}, - {value: 0x0034, lo: 0xb3, hi: 0xb3}, - {value: 0x0010, lo: 0xb6, hi: 0xb6}, - // Block 0xc7, offset 0x438 - {value: 0x0014, lo: 0x80, hi: 0x81}, - {value: 0x0010, lo: 0x82, hi: 0xb5}, - {value: 0x0014, lo: 0xb6, hi: 0xbe}, - {value: 0x0010, lo: 0xbf, hi: 0xbf}, - // Block 0xc8, offset 0x43c - {value: 0x0030, lo: 0x80, hi: 0x80}, - {value: 0x0010, lo: 0x81, hi: 0x84}, - {value: 0x0034, lo: 0x8a, hi: 0x8a}, - {value: 0x0014, lo: 0x8b, hi: 0x8c}, - {value: 0x0010, lo: 0x90, hi: 0x9a}, - {value: 0x0010, lo: 0x9c, hi: 0x9c}, - // Block 0xc9, offset 0x442 - {value: 0x0010, lo: 0x80, hi: 0x91}, - {value: 0x0010, lo: 0x93, hi: 0xae}, - {value: 0x0014, lo: 0xaf, hi: 0xb1}, - {value: 0x0010, lo: 0xb2, hi: 0xb3}, - {value: 0x0014, lo: 0xb4, hi: 0xb4}, - {value: 0x0030, lo: 0xb5, hi: 0xb5}, - {value: 0x0034, lo: 0xb6, hi: 0xb6}, - {value: 0x0014, lo: 0xb7, hi: 0xb7}, - {value: 0x0014, lo: 0xbe, hi: 0xbe}, - // Block 0xca, offset 0x44b - {value: 0x0010, lo: 0x80, hi: 0x86}, - {value: 0x0010, lo: 0x88, hi: 0x88}, - {value: 0x0010, lo: 0x8a, hi: 0x8d}, - {value: 0x0010, lo: 0x8f, hi: 0x9d}, - {value: 0x0010, lo: 0x9f, hi: 0xa8}, - {value: 0x0010, lo: 0xb0, hi: 0xbf}, - // Block 0xcb, offset 0x451 - {value: 0x0010, lo: 0x80, hi: 0x9e}, - {value: 0x0014, lo: 0x9f, hi: 0x9f}, - {value: 0x0010, lo: 0xa0, hi: 0xa2}, - {value: 0x0014, lo: 0xa3, hi: 0xa8}, - {value: 0x0034, lo: 0xa9, hi: 0xaa}, - {value: 0x0010, lo: 0xb0, hi: 0xb9}, - // Block 0xcc, offset 0x457 - {value: 0x0014, lo: 0x80, hi: 0x81}, - {value: 0x0010, lo: 0x82, hi: 0x83}, - {value: 0x0010, lo: 0x85, hi: 0x8c}, - {value: 0x0010, lo: 0x8f, hi: 0x90}, - {value: 0x0010, lo: 0x93, hi: 0xa8}, - {value: 0x0010, lo: 0xaa, hi: 0xb0}, - {value: 0x0010, lo: 0xb2, hi: 0xb3}, - {value: 0x0010, lo: 0xb5, hi: 0xb9}, - {value: 0x0034, lo: 0xbc, hi: 0xbc}, - {value: 0x0010, lo: 0xbd, hi: 0xbf}, - // Block 0xcd, offset 0x461 - {value: 0x0014, lo: 0x80, hi: 0x80}, - {value: 0x0010, lo: 0x81, hi: 0x84}, - {value: 0x0010, lo: 0x87, hi: 0x88}, - {value: 0x0010, lo: 0x8b, hi: 0x8c}, - {value: 0x0030, lo: 0x8d, hi: 0x8d}, - {value: 0x0010, lo: 0x90, hi: 0x90}, - {value: 0x0010, lo: 0x97, hi: 0x97}, - {value: 0x0010, lo: 0x9d, hi: 0xa3}, - {value: 0x0024, lo: 0xa6, hi: 0xac}, - {value: 0x0024, lo: 0xb0, hi: 0xb4}, - // Block 0xce, offset 0x46b - {value: 0x0010, lo: 0x80, hi: 0xb7}, - {value: 0x0014, lo: 0xb8, hi: 0xbf}, - // Block 0xcf, offset 0x46d - {value: 0x0010, lo: 0x80, hi: 0x81}, - {value: 0x0034, lo: 0x82, hi: 0x82}, - {value: 0x0014, lo: 0x83, hi: 0x84}, - {value: 0x0010, lo: 0x85, hi: 0x85}, - {value: 0x0034, lo: 0x86, hi: 0x86}, - {value: 0x0010, lo: 0x87, hi: 0x8a}, - {value: 0x0010, lo: 0x90, hi: 0x99}, - // Block 0xd0, offset 0x474 - {value: 0x0010, lo: 0x80, hi: 0xb2}, - {value: 0x0014, lo: 0xb3, hi: 0xb8}, - {value: 0x0010, lo: 0xb9, hi: 0xb9}, - {value: 0x0014, lo: 0xba, hi: 0xba}, - {value: 0x0010, lo: 0xbb, hi: 0xbe}, - {value: 0x0014, lo: 0xbf, hi: 0xbf}, - // Block 0xd1, offset 0x47a - {value: 0x0014, lo: 0x80, hi: 0x80}, - {value: 0x0010, lo: 0x81, hi: 0x81}, - {value: 0x0034, lo: 0x82, hi: 0x83}, - {value: 0x0010, lo: 0x84, hi: 0x85}, - {value: 0x0010, lo: 0x87, hi: 0x87}, - {value: 0x0010, lo: 0x90, hi: 0x99}, - // Block 0xd2, offset 0x480 - {value: 0x0010, lo: 0x80, hi: 0xb1}, - {value: 0x0014, lo: 0xb2, hi: 0xb5}, - {value: 0x0010, lo: 0xb8, hi: 0xbb}, - {value: 0x0014, lo: 0xbc, hi: 0xbd}, - {value: 0x0010, lo: 0xbe, hi: 0xbe}, - {value: 0x0034, lo: 0xbf, hi: 0xbf}, - // Block 0xd3, offset 0x486 - {value: 0x0034, lo: 0x80, hi: 0x80}, - {value: 0x0010, lo: 0x98, hi: 0x9b}, - {value: 0x0014, lo: 0x9c, hi: 0x9d}, - // Block 0xd4, offset 0x489 - {value: 0x0010, lo: 0x80, hi: 0xb2}, - {value: 0x0014, lo: 0xb3, hi: 0xba}, - {value: 0x0010, lo: 0xbb, hi: 0xbc}, - {value: 0x0014, lo: 0xbd, hi: 0xbd}, - {value: 0x0010, lo: 0xbe, hi: 0xbe}, - {value: 0x0034, lo: 0xbf, hi: 0xbf}, - // Block 0xd5, offset 0x48f - {value: 0x0014, lo: 0x80, hi: 0x80}, - {value: 0x0010, lo: 0x84, hi: 0x84}, - {value: 0x0010, lo: 0x90, hi: 0x99}, - // Block 0xd6, offset 0x492 - {value: 0x0010, lo: 0x80, hi: 0xaa}, - {value: 0x0014, lo: 0xab, hi: 0xab}, - {value: 0x0010, lo: 0xac, hi: 0xac}, - {value: 0x0014, lo: 0xad, hi: 0xad}, - {value: 0x0010, lo: 0xae, hi: 0xaf}, - {value: 0x0014, lo: 0xb0, hi: 0xb5}, - {value: 0x0030, lo: 0xb6, hi: 0xb6}, - {value: 0x0034, lo: 0xb7, hi: 0xb7}, - // Block 0xd7, offset 0x49a - {value: 0x0010, lo: 0x80, hi: 0x89}, - // Block 0xd8, offset 0x49b - {value: 0x0014, lo: 0x9d, hi: 0x9f}, - {value: 0x0010, lo: 0xa0, hi: 0xa1}, - {value: 0x0014, lo: 0xa2, hi: 0xa5}, - {value: 0x0010, lo: 0xa6, hi: 0xa6}, - {value: 0x0014, lo: 0xa7, hi: 0xaa}, - {value: 0x0034, lo: 0xab, hi: 0xab}, - {value: 0x0010, lo: 0xb0, hi: 0xb9}, - // Block 0xd9, offset 0x4a2 - {value: 0x5f53, lo: 0xa0, hi: 0xbf}, - // Block 0xda, offset 0x4a3 - {value: 0x5f52, lo: 0x80, hi: 0x9f}, - {value: 0x0010, lo: 0xa0, hi: 0xa9}, - {value: 0x0010, lo: 0xbf, hi: 0xbf}, - // Block 0xdb, offset 0x4a6 - {value: 0x0010, lo: 0x80, hi: 0xb8}, - // Block 0xdc, offset 0x4a7 - {value: 0x0010, lo: 0x80, hi: 0x88}, - {value: 0x0010, lo: 0x8a, hi: 0xaf}, - {value: 0x0014, lo: 0xb0, hi: 0xb6}, - {value: 0x0014, lo: 0xb8, hi: 0xbd}, - {value: 0x0010, lo: 0xbe, hi: 0xbe}, - {value: 0x0034, lo: 0xbf, hi: 0xbf}, - // Block 0xdd, offset 0x4ad - {value: 0x0010, lo: 0x80, hi: 0x80}, - {value: 0x0010, lo: 0x90, hi: 0x99}, - {value: 0x0010, lo: 0xb2, hi: 0xbf}, - // Block 0xde, offset 0x4b0 - {value: 0x0010, lo: 0x80, hi: 0x8f}, - {value: 0x0014, lo: 0x92, hi: 0xa7}, - {value: 0x0010, lo: 0xa9, hi: 0xa9}, - {value: 0x0014, lo: 0xaa, hi: 0xb0}, - {value: 0x0010, lo: 0xb1, hi: 0xb1}, - {value: 0x0014, lo: 0xb2, hi: 0xb3}, - {value: 0x0010, lo: 0xb4, hi: 0xb4}, - {value: 0x0014, lo: 0xb5, hi: 0xb6}, - // Block 0xdf, offset 0x4b8 - {value: 0x0010, lo: 0x80, hi: 0x99}, - // Block 0xe0, offset 0x4b9 - {value: 0x0010, lo: 0x80, hi: 0xae}, - // Block 0xe1, offset 0x4ba - {value: 0x0010, lo: 0x80, hi: 0x83}, - // Block 0xe2, offset 0x4bb - {value: 0x0010, lo: 0x80, hi: 0x86}, - // Block 0xe3, offset 0x4bc - {value: 0x0010, lo: 0x80, hi: 0x9e}, - {value: 0x0010, lo: 0xa0, hi: 0xa9}, - // Block 0xe4, offset 0x4be - {value: 0x0010, lo: 0x90, hi: 0xad}, - {value: 0x0034, lo: 0xb0, hi: 0xb4}, - // Block 0xe5, offset 0x4c0 - {value: 0x0010, lo: 0x80, hi: 0xaf}, - {value: 0x0024, lo: 0xb0, hi: 0xb6}, - // Block 0xe6, offset 0x4c2 - {value: 0x0014, lo: 0x80, hi: 0x83}, - {value: 0x0010, lo: 0x90, hi: 0x99}, - {value: 0x0010, lo: 0xa3, hi: 0xb7}, - {value: 0x0010, lo: 0xbd, hi: 0xbf}, - // Block 0xe7, offset 0x4c6 - {value: 0x0010, lo: 0x80, hi: 0x8f}, - // Block 0xe8, offset 0x4c7 - {value: 0x0010, lo: 0x80, hi: 0x84}, - {value: 0x0010, lo: 0x90, hi: 0xbe}, - // Block 0xe9, offset 0x4c9 - {value: 0x0014, lo: 0x8f, hi: 0x9f}, - // Block 0xea, offset 0x4ca - {value: 0x0014, lo: 0xa0, hi: 0xa0}, - // Block 0xeb, offset 0x4cb - {value: 0x0010, lo: 0x80, hi: 0xaa}, - {value: 0x0010, lo: 0xb0, hi: 0xbc}, - // Block 0xec, offset 0x4cd - {value: 0x0010, lo: 0x80, hi: 0x88}, - {value: 0x0010, lo: 0x90, hi: 0x99}, - {value: 0x0014, lo: 0x9d, hi: 0x9d}, - {value: 0x0034, lo: 0x9e, hi: 0x9e}, - {value: 0x0014, lo: 0xa0, hi: 0xa3}, - // Block 0xed, offset 0x4d2 - {value: 0x0030, lo: 0xa5, hi: 0xa6}, - {value: 0x0034, lo: 0xa7, hi: 0xa9}, - {value: 0x0030, lo: 0xad, hi: 0xb2}, - {value: 0x0014, lo: 0xb3, hi: 0xba}, - {value: 0x0034, lo: 0xbb, hi: 0xbf}, - // Block 0xee, offset 0x4d7 - {value: 0x0034, lo: 0x80, hi: 0x82}, - {value: 0x0024, lo: 0x85, hi: 0x89}, - {value: 0x0034, lo: 0x8a, hi: 0x8b}, - {value: 0x0024, lo: 0xaa, hi: 0xad}, - // Block 0xef, offset 0x4db - {value: 0x0024, lo: 0x82, hi: 0x84}, - // Block 0xf0, offset 0x4dc - {value: 0x0013, lo: 0x80, hi: 0x99}, - {value: 0x0012, lo: 0x9a, hi: 0xb3}, - {value: 0x0013, lo: 0xb4, hi: 0xbf}, - // Block 0xf1, offset 0x4df - {value: 0x0013, lo: 0x80, hi: 0x8d}, - {value: 0x0012, lo: 0x8e, hi: 0x94}, - {value: 0x0012, lo: 0x96, hi: 0xa7}, - {value: 0x0013, lo: 0xa8, hi: 0xbf}, - // Block 0xf2, offset 0x4e3 - {value: 0x0013, lo: 0x80, hi: 0x81}, - {value: 0x0012, lo: 0x82, hi: 0x9b}, - {value: 0x0013, lo: 0x9c, hi: 0x9c}, - {value: 0x0013, lo: 0x9e, hi: 0x9f}, - {value: 0x0013, lo: 0xa2, hi: 0xa2}, - {value: 0x0013, lo: 0xa5, hi: 0xa6}, - {value: 0x0013, lo: 0xa9, hi: 0xac}, - {value: 0x0013, lo: 0xae, hi: 0xb5}, - {value: 0x0012, lo: 0xb6, hi: 0xb9}, - {value: 0x0012, lo: 0xbb, hi: 0xbb}, - {value: 0x0012, lo: 0xbd, hi: 0xbf}, - // Block 0xf3, offset 0x4ee - {value: 0x0012, lo: 0x80, hi: 0x83}, - {value: 0x0012, lo: 0x85, hi: 0x8f}, - {value: 0x0013, lo: 0x90, hi: 0xa9}, - {value: 0x0012, lo: 0xaa, hi: 0xbf}, - // Block 0xf4, offset 0x4f2 - {value: 0x0012, lo: 0x80, hi: 0x83}, - {value: 0x0013, lo: 0x84, hi: 0x85}, - {value: 0x0013, lo: 0x87, hi: 0x8a}, - {value: 0x0013, lo: 0x8d, hi: 0x94}, - {value: 0x0013, lo: 0x96, hi: 0x9c}, - {value: 0x0012, lo: 0x9e, hi: 0xb7}, - {value: 0x0013, lo: 0xb8, hi: 0xb9}, - {value: 0x0013, lo: 0xbb, hi: 0xbe}, - // Block 0xf5, offset 0x4fa - {value: 0x0013, lo: 0x80, hi: 0x84}, - {value: 0x0013, lo: 0x86, hi: 0x86}, - {value: 0x0013, lo: 0x8a, hi: 0x90}, - {value: 0x0012, lo: 0x92, hi: 0xab}, - {value: 0x0013, lo: 0xac, hi: 0xbf}, - // Block 0xf6, offset 0x4ff - {value: 0x0013, lo: 0x80, hi: 0x85}, - {value: 0x0012, lo: 0x86, hi: 0x9f}, - {value: 0x0013, lo: 0xa0, hi: 0xb9}, - {value: 0x0012, lo: 0xba, hi: 0xbf}, - // Block 0xf7, offset 0x503 - {value: 0x0012, lo: 0x80, hi: 0x93}, - {value: 0x0013, lo: 0x94, hi: 0xad}, - {value: 0x0012, lo: 0xae, hi: 0xbf}, - // Block 0xf8, offset 0x506 - {value: 0x0012, lo: 0x80, hi: 0x87}, - {value: 0x0013, lo: 0x88, hi: 0xa1}, - {value: 0x0012, lo: 0xa2, hi: 0xbb}, - {value: 0x0013, lo: 0xbc, hi: 0xbf}, - // Block 0xf9, offset 0x50a - {value: 0x0013, lo: 0x80, hi: 0x95}, - {value: 0x0012, lo: 0x96, hi: 0xaf}, - {value: 0x0013, lo: 0xb0, hi: 0xbf}, - // Block 0xfa, offset 0x50d - {value: 0x0013, lo: 0x80, hi: 0x89}, - {value: 0x0012, lo: 0x8a, hi: 0xa5}, - {value: 0x0013, lo: 0xa8, hi: 0xbf}, - // Block 0xfb, offset 0x510 - {value: 0x0013, lo: 0x80, hi: 0x80}, - {value: 0x0012, lo: 0x82, hi: 0x9a}, - {value: 0x0012, lo: 0x9c, hi: 0xa1}, - {value: 0x0013, lo: 0xa2, hi: 0xba}, - {value: 0x0012, lo: 0xbc, hi: 0xbf}, - // Block 0xfc, offset 0x515 - {value: 0x0012, lo: 0x80, hi: 0x94}, - {value: 0x0012, lo: 0x96, hi: 0x9b}, - {value: 0x0013, lo: 0x9c, hi: 0xb4}, - {value: 0x0012, lo: 0xb6, hi: 0xbf}, - // Block 0xfd, offset 0x519 - {value: 0x0012, lo: 0x80, hi: 0x8e}, - {value: 0x0012, lo: 0x90, hi: 0x95}, - {value: 0x0013, lo: 0x96, hi: 0xae}, - {value: 0x0012, lo: 0xb0, hi: 0xbf}, - // Block 0xfe, offset 0x51d - {value: 0x0012, lo: 0x80, hi: 0x88}, - {value: 0x0012, lo: 0x8a, hi: 0x8f}, - {value: 0x0013, lo: 0x90, hi: 0xa8}, - {value: 0x0012, lo: 0xaa, hi: 0xbf}, - // Block 0xff, offset 0x521 - {value: 0x0012, lo: 0x80, hi: 0x82}, - {value: 0x0012, lo: 0x84, hi: 0x89}, - {value: 0x0017, lo: 0x8a, hi: 0x8b}, - {value: 0x0010, lo: 0x8e, hi: 0xbf}, - // Block 0x100, offset 0x525 - {value: 0x0014, lo: 0x80, hi: 0xb6}, - {value: 0x0014, lo: 0xbb, hi: 0xbf}, - // Block 0x101, offset 0x527 - {value: 0x0014, lo: 0x80, hi: 0xac}, - {value: 0x0014, lo: 0xb5, hi: 0xb5}, - // Block 0x102, offset 0x529 - {value: 0x0014, lo: 0x84, hi: 0x84}, - {value: 0x0014, lo: 0x9b, hi: 0x9f}, - {value: 0x0014, lo: 0xa1, hi: 0xaf}, - // Block 0x103, offset 0x52c - {value: 0x0024, lo: 0x80, hi: 0x86}, - {value: 0x0024, lo: 0x88, hi: 0x98}, - {value: 0x0024, lo: 0x9b, hi: 0xa1}, - {value: 0x0024, lo: 0xa3, hi: 0xa4}, - {value: 0x0024, lo: 0xa6, hi: 0xaa}, - // Block 0x104, offset 0x531 - {value: 0x0010, lo: 0x80, hi: 0x84}, - {value: 0x0034, lo: 0x90, hi: 0x96}, - // Block 0x105, offset 0x533 - {value: 0xb552, lo: 0x80, hi: 0x81}, - {value: 0xb852, lo: 0x82, hi: 0x83}, - {value: 0x0024, lo: 0x84, hi: 0x89}, - {value: 0x0034, lo: 0x8a, hi: 0x8a}, - {value: 0x0010, lo: 0x90, hi: 0x99}, - // Block 0x106, offset 0x538 - {value: 0x0010, lo: 0x80, hi: 0x83}, - {value: 0x0010, lo: 0x85, hi: 0x9f}, - {value: 0x0010, lo: 0xa1, hi: 0xa2}, - {value: 0x0010, lo: 0xa4, hi: 0xa4}, - {value: 0x0010, lo: 0xa7, hi: 0xa7}, - {value: 0x0010, lo: 0xa9, hi: 0xb2}, - {value: 0x0010, lo: 0xb4, hi: 0xb7}, - {value: 0x0010, lo: 0xb9, hi: 0xb9}, - {value: 0x0010, lo: 0xbb, hi: 0xbb}, - // Block 0x107, offset 0x541 - {value: 0x0010, lo: 0x80, hi: 0x89}, - {value: 0x0010, lo: 0x8b, hi: 0x9b}, - {value: 0x0010, lo: 0xa1, hi: 0xa3}, - {value: 0x0010, lo: 0xa5, hi: 0xa9}, - {value: 0x0010, lo: 0xab, hi: 0xbb}, - // Block 0x108, offset 0x546 - {value: 0x0013, lo: 0xb0, hi: 0xbf}, - // Block 0x109, offset 0x547 - {value: 0x0013, lo: 0x80, hi: 0x89}, - {value: 0x0013, lo: 0x90, hi: 0xa9}, - {value: 0x0013, lo: 0xb0, hi: 0xbf}, - // Block 0x10a, offset 0x54a - {value: 0x0013, lo: 0x80, hi: 0x89}, - // Block 0x10b, offset 0x54b - {value: 0x0004, lo: 0xbb, hi: 0xbf}, - // Block 0x10c, offset 0x54c - {value: 0x0014, lo: 0x81, hi: 0x81}, - {value: 0x0014, lo: 0xa0, hi: 0xbf}, - // Block 0x10d, offset 0x54e - {value: 0x0014, lo: 0x80, hi: 0xbf}, - // Block 0x10e, offset 0x54f - {value: 0x0014, lo: 0x80, hi: 0xaf}, -} - -// Total table size 13811 bytes (13KiB); checksum: 4CC48DA3 diff --git a/vendor/golang.org/x/text/cases/trieval.go b/vendor/golang.org/x/text/cases/trieval.go deleted file mode 100644 index fb221f843..000000000 --- a/vendor/golang.org/x/text/cases/trieval.go +++ /dev/null @@ -1,215 +0,0 @@ -// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. - -package cases - -// This file contains definitions for interpreting the trie value of the case -// trie generated by "go run gen*.go". It is shared by both the generator -// program and the resultant package. Sharing is achieved by the generator -// copying gen_trieval.go to trieval.go and changing what's above this comment. - -// info holds case information for a single rune. It is the value returned -// by a trie lookup. Most mapping information can be stored in a single 16-bit -// value. If not, for example when a rune is mapped to multiple runes, the value -// stores some basic case data and an index into an array with additional data. -// -// The per-rune values have the following format: -// -// if (exception) { -// 15..5 unsigned exception index -// 4 unused -// } else { -// 15..8 XOR pattern or index to XOR pattern for case mapping -// Only 13..8 are used for XOR patterns. -// 7 inverseFold (fold to upper, not to lower) -// 6 index: interpret the XOR pattern as an index -// or isMid if case mode is cIgnorableUncased. -// 5..4 CCC: zero (normal or break), above or other -// } -// 3 exception: interpret this value as an exception index -// (TODO: is this bit necessary? Probably implied from case mode.) -// 2..0 case mode -// -// For the non-exceptional cases, a rune must be either uncased, lowercase or -// uppercase. If the rune is cased, the XOR pattern maps either a lowercase -// rune to uppercase or an uppercase rune to lowercase (applied to the 10 -// least-significant bits of the rune). -// -// See the definitions below for a more detailed description of the various -// bits. -type info uint16 - -const ( - casedMask = 0x0003 - fullCasedMask = 0x0007 - ignorableMask = 0x0006 - ignorableValue = 0x0004 - - inverseFoldBit = 1 << 7 - isMidBit = 1 << 6 - - exceptionBit = 1 << 3 - exceptionShift = 5 - numExceptionBits = 11 - - xorIndexBit = 1 << 6 - xorShift = 8 - - // There is no mapping if all xor bits and the exception bit are zero. - hasMappingMask = 0xff80 | exceptionBit -) - -// The case mode bits encodes the case type of a rune. This includes uncased, -// title, upper and lower case and case ignorable. (For a definition of these -// terms see Chapter 3 of The Unicode Standard Core Specification.) In some rare -// cases, a rune can be both cased and case-ignorable. This is encoded by -// cIgnorableCased. A rune of this type is always lower case. Some runes are -// cased while not having a mapping. -// -// A common pattern for scripts in the Unicode standard is for upper and lower -// case runes to alternate for increasing rune values (e.g. the accented Latin -// ranges starting from U+0100 and U+1E00 among others and some Cyrillic -// characters). We use this property by defining a cXORCase mode, where the case -// mode (always upper or lower case) is derived from the rune value. As the XOR -// pattern for case mappings is often identical for successive runes, using -// cXORCase can result in large series of identical trie values. This, in turn, -// allows us to better compress the trie blocks. -const ( - cUncased info = iota // 000 - cTitle // 001 - cLower // 010 - cUpper // 011 - cIgnorableUncased // 100 - cIgnorableCased // 101 // lower case if mappings exist - cXORCase // 11x // case is cLower | ((rune&1) ^ x) - - maxCaseMode = cUpper -) - -func (c info) isCased() bool { - return c&casedMask != 0 -} - -func (c info) isCaseIgnorable() bool { - return c&ignorableMask == ignorableValue -} - -func (c info) isNotCasedAndNotCaseIgnorable() bool { - return c&fullCasedMask == 0 -} - -func (c info) isCaseIgnorableAndNotCased() bool { - return c&fullCasedMask == cIgnorableUncased -} - -func (c info) isMid() bool { - return c&(fullCasedMask|isMidBit) == isMidBit|cIgnorableUncased -} - -// The case mapping implementation will need to know about various Canonical -// Combining Class (CCC) values. We encode two of these in the trie value: -// cccZero (0) and cccAbove (230). If the value is cccOther, it means that -// CCC(r) > 0, but not 230. A value of cccBreak means that CCC(r) == 0 and that -// the rune also has the break category Break (see below). -const ( - cccBreak info = iota << 4 - cccZero - cccAbove - cccOther - - cccMask = cccBreak | cccZero | cccAbove | cccOther -) - -const ( - starter = 0 - above = 230 - iotaSubscript = 240 -) - -// The exceptions slice holds data that does not fit in a normal info entry. -// The entry is pointed to by the exception index in an entry. It has the -// following format: -// -// Header -// byte 0: -// 7..6 unused -// 5..4 CCC type (same bits as entry) -// 3 unused -// 2..0 length of fold -// -// byte 1: -// 7..6 unused -// 5..3 length of 1st mapping of case type -// 2..0 length of 2nd mapping of case type -// -// case 1st 2nd -// lower -> upper, title -// upper -> lower, title -// title -> lower, upper -// -// Lengths with the value 0x7 indicate no value and implies no change. -// A length of 0 indicates a mapping to zero-length string. -// -// Body bytes: -// case folding bytes -// lowercase mapping bytes -// uppercase mapping bytes -// titlecase mapping bytes -// closure mapping bytes (for NFKC_Casefold). (TODO) -// -// Fallbacks: -// missing fold -> lower -// missing title -> upper -// all missing -> original rune -// -// exceptions starts with a dummy byte to enforce that there is no zero index -// value. -const ( - lengthMask = 0x07 - lengthBits = 3 - noChange = 0 -) - -// References to generated trie. - -var trie = newCaseTrie(0) - -var sparse = sparseBlocks{ - values: sparseValues[:], - offsets: sparseOffsets[:], -} - -// Sparse block lookup code. - -// valueRange is an entry in a sparse block. -type valueRange struct { - value uint16 - lo, hi byte -} - -type sparseBlocks struct { - values []valueRange - offsets []uint16 -} - -// lookup returns the value from values block n for byte b using binary search. -func (s *sparseBlocks) lookup(n uint32, b byte) uint16 { - lo := s.offsets[n] - hi := s.offsets[n+1] - for lo < hi { - m := lo + (hi-lo)/2 - r := s.values[m] - if r.lo <= b && b <= r.hi { - return r.value - } - if b < r.lo { - hi = m - } else { - lo = m + 1 - } - } - return 0 -} - -// lastRuneForTesting is the last rune used for testing. Everything after this -// is boring. -const lastRuneForTesting = rune(0x1FFFF) diff --git a/vendor/golang.org/x/text/codereview.cfg b/vendor/golang.org/x/text/codereview.cfg new file mode 100644 index 000000000..3f8b14b64 --- /dev/null +++ b/vendor/golang.org/x/text/codereview.cfg @@ -0,0 +1 @@ +issuerepo: golang/go diff --git a/vendor/golang.org/x/text/collate/build/builder.go b/vendor/golang.org/x/text/collate/build/builder.go new file mode 100644 index 000000000..11042841b --- /dev/null +++ b/vendor/golang.org/x/text/collate/build/builder.go @@ -0,0 +1,702 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package build // import "golang.org/x/text/collate/build" + +import ( + "fmt" + "io" + "log" + "sort" + "strings" + "unicode/utf8" + + "golang.org/x/text/internal/colltab" + "golang.org/x/text/language" + "golang.org/x/text/unicode/norm" +) + +// TODO: optimizations: +// - expandElem is currently 20K. By putting unique colElems in a separate +// table and having a byte array of indexes into this table, we can reduce +// the total size to about 7K. By also factoring out the length bytes, we +// can reduce this to about 6K. +// - trie valueBlocks are currently 100K. There are a lot of sparse blocks +// and many consecutive values with the same stride. This can be further +// compacted. +// - Compress secondary weights into 8 bits. +// - Some LDML specs specify a context element. Currently we simply concatenate +// those. Context can be implemented using the contraction trie. If Builder +// could analyze and detect when using a context makes sense, there is no +// need to expose this construct in the API. + +// A Builder builds a root collation table. The user must specify the +// collation elements for each entry. A common use will be to base the weights +// on those specified in the allkeys* file as provided by the UCA or CLDR. +type Builder struct { + index *trieBuilder + root ordering + locale []*Tailoring + t *table + err error + built bool + + minNonVar int // lowest primary recorded for a variable + varTop int // highest primary recorded for a non-variable + + // indexes used for reusing expansions and contractions + expIndex map[string]int // positions of expansions keyed by their string representation + ctHandle map[string]ctHandle // contraction handles keyed by a concatenation of the suffixes + ctElem map[string]int // contraction elements keyed by their string representation +} + +// A Tailoring builds a collation table based on another collation table. +// The table is defined by specifying tailorings to the underlying table. +// See http://unicode.org/reports/tr35/ for an overview of tailoring +// collation tables. The CLDR contains pre-defined tailorings for a variety +// of languages (See http://www.unicode.org/Public/cldr/<version>/core.zip.) +type Tailoring struct { + id string + builder *Builder + index *ordering + + anchor *entry + before bool +} + +// NewBuilder returns a new Builder. +func NewBuilder() *Builder { + return &Builder{ + index: newTrieBuilder(), + root: makeRootOrdering(), + expIndex: make(map[string]int), + ctHandle: make(map[string]ctHandle), + ctElem: make(map[string]int), + } +} + +// Tailoring returns a Tailoring for the given locale. One should +// have completed all calls to Add before calling Tailoring. +func (b *Builder) Tailoring(loc language.Tag) *Tailoring { + t := &Tailoring{ + id: loc.String(), + builder: b, + index: b.root.clone(), + } + t.index.id = t.id + b.locale = append(b.locale, t) + return t +} + +// Add adds an entry to the collation element table, mapping +// a slice of runes to a sequence of collation elements. +// A collation element is specified as list of weights: []int{primary, secondary, ...}. +// The entries are typically obtained from a collation element table +// as defined in http://www.unicode.org/reports/tr10/#Data_Table_Format. +// Note that the collation elements specified by colelems are only used +// as a guide. The actual weights generated by Builder may differ. +// The argument variables is a list of indices into colelems that should contain +// a value for each colelem that is a variable. (See the reference above.) +func (b *Builder) Add(runes []rune, colelems [][]int, variables []int) error { + str := string(runes) + elems := make([]rawCE, len(colelems)) + for i, ce := range colelems { + if len(ce) == 0 { + break + } + elems[i] = makeRawCE(ce, 0) + if len(ce) == 1 { + elems[i].w[1] = defaultSecondary + } + if len(ce) <= 2 { + elems[i].w[2] = defaultTertiary + } + if len(ce) <= 3 { + elems[i].w[3] = ce[0] + } + } + for i, ce := range elems { + p := ce.w[0] + isvar := false + for _, j := range variables { + if i == j { + isvar = true + } + } + if isvar { + if p >= b.minNonVar && b.minNonVar > 0 { + return fmt.Errorf("primary value %X of variable is larger than the smallest non-variable %X", p, b.minNonVar) + } + if p > b.varTop { + b.varTop = p + } + } else if p > 1 { // 1 is a special primary value reserved for FFFE + if p <= b.varTop { + return fmt.Errorf("primary value %X of non-variable is smaller than the highest variable %X", p, b.varTop) + } + if b.minNonVar == 0 || p < b.minNonVar { + b.minNonVar = p + } + } + } + elems, err := convertLargeWeights(elems) + if err != nil { + return err + } + cccs := []uint8{} + nfd := norm.NFD.String(str) + for i := range nfd { + cccs = append(cccs, norm.NFD.PropertiesString(nfd[i:]).CCC()) + } + if len(cccs) < len(elems) { + if len(cccs) > 2 { + return fmt.Errorf("number of decomposed characters should be greater or equal to the number of collation elements for len(colelems) > 3 (%d < %d)", len(cccs), len(elems)) + } + p := len(elems) - 1 + for ; p > 0 && elems[p].w[0] == 0; p-- { + elems[p].ccc = cccs[len(cccs)-1] + } + for ; p >= 0; p-- { + elems[p].ccc = cccs[0] + } + } else { + for i := range elems { + elems[i].ccc = cccs[i] + } + } + // doNorm in collate.go assumes that the following conditions hold. + if len(elems) > 1 && len(cccs) > 1 && cccs[0] != 0 && cccs[0] != cccs[len(cccs)-1] { + return fmt.Errorf("incompatible CCC values for expansion %X (%d)", runes, cccs) + } + b.root.newEntry(str, elems) + return nil +} + +func (t *Tailoring) setAnchor(anchor string) error { + anchor = norm.NFC.String(anchor) + a := t.index.find(anchor) + if a == nil { + a = t.index.newEntry(anchor, nil) + a.implicit = true + a.modified = true + for _, r := range []rune(anchor) { + e := t.index.find(string(r)) + e.lock = true + } + } + t.anchor = a + return nil +} + +// SetAnchor sets the point after which elements passed in subsequent calls to +// Insert will be inserted. It is equivalent to the reset directive in an LDML +// specification. See Insert for an example. +// SetAnchor supports the following logical reset positions: +// <first_tertiary_ignorable/>, <last_teriary_ignorable/>, <first_primary_ignorable/>, +// and <last_non_ignorable/>. +func (t *Tailoring) SetAnchor(anchor string) error { + if err := t.setAnchor(anchor); err != nil { + return err + } + t.before = false + return nil +} + +// SetAnchorBefore is similar to SetAnchor, except that subsequent calls to +// Insert will insert entries before the anchor. +func (t *Tailoring) SetAnchorBefore(anchor string) error { + if err := t.setAnchor(anchor); err != nil { + return err + } + t.before = true + return nil +} + +// Insert sets the ordering of str relative to the entry set by the previous +// call to SetAnchor or Insert. The argument extend corresponds +// to the extend elements as defined in LDML. A non-empty value for extend +// will cause the collation elements corresponding to extend to be appended +// to the collation elements generated for the entry added by Insert. +// This has the same net effect as sorting str after the string anchor+extend. +// See http://www.unicode.org/reports/tr10/#Tailoring_Example for details +// on parametric tailoring and http://unicode.org/reports/tr35/#Collation_Elements +// for full details on LDML. +// +// Examples: create a tailoring for Swedish, where "ä" is ordered after "z" +// at the primary sorting level: +// t := b.Tailoring("se") +// t.SetAnchor("z") +// t.Insert(colltab.Primary, "ä", "") +// Order "ü" after "ue" at the secondary sorting level: +// t.SetAnchor("ue") +// t.Insert(colltab.Secondary, "ü","") +// or +// t.SetAnchor("u") +// t.Insert(colltab.Secondary, "ü", "e") +// Order "q" afer "ab" at the secondary level and "Q" after "q" +// at the tertiary level: +// t.SetAnchor("ab") +// t.Insert(colltab.Secondary, "q", "") +// t.Insert(colltab.Tertiary, "Q", "") +// Order "b" before "a": +// t.SetAnchorBefore("a") +// t.Insert(colltab.Primary, "b", "") +// Order "0" after the last primary ignorable: +// t.SetAnchor("<last_primary_ignorable/>") +// t.Insert(colltab.Primary, "0", "") +func (t *Tailoring) Insert(level colltab.Level, str, extend string) error { + if t.anchor == nil { + return fmt.Errorf("%s:Insert: no anchor point set for tailoring of %s", t.id, str) + } + str = norm.NFC.String(str) + e := t.index.find(str) + if e == nil { + e = t.index.newEntry(str, nil) + } else if e.logical != noAnchor { + return fmt.Errorf("%s:Insert: cannot reinsert logical reset position %q", t.id, e.str) + } + if e.lock { + return fmt.Errorf("%s:Insert: cannot reinsert element %q", t.id, e.str) + } + a := t.anchor + // Find the first element after the anchor which differs at a level smaller or + // equal to the given level. Then insert at this position. + // See http://unicode.org/reports/tr35/#Collation_Elements, Section 5.14.5 for details. + e.before = t.before + if t.before { + t.before = false + if a.prev == nil { + a.insertBefore(e) + } else { + for a = a.prev; a.level > level; a = a.prev { + } + a.insertAfter(e) + } + e.level = level + } else { + for ; a.level > level; a = a.next { + } + e.level = a.level + if a != e { + a.insertAfter(e) + a.level = level + } else { + // We don't set a to prev itself. This has the effect of the entry + // getting new collation elements that are an increment of itself. + // This is intentional. + a.prev.level = level + } + } + e.extend = norm.NFD.String(extend) + e.exclude = false + e.modified = true + e.elems = nil + t.anchor = e + return nil +} + +func (o *ordering) getWeight(e *entry) []rawCE { + if len(e.elems) == 0 && e.logical == noAnchor { + if e.implicit { + for _, r := range e.runes { + e.elems = append(e.elems, o.getWeight(o.find(string(r)))...) + } + } else if e.before { + count := [colltab.Identity + 1]int{} + a := e + for ; a.elems == nil && !a.implicit; a = a.next { + count[a.level]++ + } + e.elems = []rawCE{makeRawCE(a.elems[0].w, a.elems[0].ccc)} + for i := colltab.Primary; i < colltab.Quaternary; i++ { + if count[i] != 0 { + e.elems[0].w[i] -= count[i] + break + } + } + if e.prev != nil { + o.verifyWeights(e.prev, e, e.prev.level) + } + } else { + prev := e.prev + e.elems = nextWeight(prev.level, o.getWeight(prev)) + o.verifyWeights(e, e.next, e.level) + } + } + return e.elems +} + +func (o *ordering) addExtension(e *entry) { + if ex := o.find(e.extend); ex != nil { + e.elems = append(e.elems, ex.elems...) + } else { + for _, r := range []rune(e.extend) { + e.elems = append(e.elems, o.find(string(r)).elems...) + } + } + e.extend = "" +} + +func (o *ordering) verifyWeights(a, b *entry, level colltab.Level) error { + if level == colltab.Identity || b == nil || b.elems == nil || a.elems == nil { + return nil + } + for i := colltab.Primary; i < level; i++ { + if a.elems[0].w[i] < b.elems[0].w[i] { + return nil + } + } + if a.elems[0].w[level] >= b.elems[0].w[level] { + err := fmt.Errorf("%s:overflow: collation elements of %q (%X) overflows those of %q (%X) at level %d (%X >= %X)", o.id, a.str, a.runes, b.str, b.runes, level, a.elems, b.elems) + log.Println(err) + // TODO: return the error instead, or better, fix the conflicting entry by making room. + } + return nil +} + +func (b *Builder) error(e error) { + if e != nil { + b.err = e + } +} + +func (b *Builder) errorID(locale string, e error) { + if e != nil { + b.err = fmt.Errorf("%s:%v", locale, e) + } +} + +// patchNorm ensures that NFC and NFD counterparts are consistent. +func (o *ordering) patchNorm() { + // Insert the NFD counterparts, if necessary. + for _, e := range o.ordered { + nfd := norm.NFD.String(e.str) + if nfd != e.str { + if e0 := o.find(nfd); e0 != nil && !e0.modified { + e0.elems = e.elems + } else if e.modified && !equalCEArrays(o.genColElems(nfd), e.elems) { + e := o.newEntry(nfd, e.elems) + e.modified = true + } + } + } + // Update unchanged composed forms if one of their parts changed. + for _, e := range o.ordered { + nfd := norm.NFD.String(e.str) + if e.modified || nfd == e.str { + continue + } + if e0 := o.find(nfd); e0 != nil { + e.elems = e0.elems + } else { + e.elems = o.genColElems(nfd) + if norm.NFD.LastBoundary([]byte(nfd)) == 0 { + r := []rune(nfd) + head := string(r[0]) + tail := "" + for i := 1; i < len(r); i++ { + s := norm.NFC.String(head + string(r[i])) + if e0 := o.find(s); e0 != nil && e0.modified { + head = s + } else { + tail += string(r[i]) + } + } + e.elems = append(o.genColElems(head), o.genColElems(tail)...) + } + } + } + // Exclude entries for which the individual runes generate the same collation elements. + for _, e := range o.ordered { + if len(e.runes) > 1 && equalCEArrays(o.genColElems(e.str), e.elems) { + e.exclude = true + } + } +} + +func (b *Builder) buildOrdering(o *ordering) { + for _, e := range o.ordered { + o.getWeight(e) + } + for _, e := range o.ordered { + o.addExtension(e) + } + o.patchNorm() + o.sort() + simplify(o) + b.processExpansions(o) // requires simplify + b.processContractions(o) // requires simplify + + t := newNode() + for e := o.front(); e != nil; e, _ = e.nextIndexed() { + if !e.skip() { + ce, err := e.encode() + b.errorID(o.id, err) + t.insert(e.runes[0], ce) + } + } + o.handle = b.index.addTrie(t) +} + +func (b *Builder) build() (*table, error) { + if b.built { + return b.t, b.err + } + b.built = true + b.t = &table{ + Table: colltab.Table{ + MaxContractLen: utf8.UTFMax, + VariableTop: uint32(b.varTop), + }, + } + + b.buildOrdering(&b.root) + b.t.root = b.root.handle + for _, t := range b.locale { + b.buildOrdering(t.index) + if b.err != nil { + break + } + } + i, err := b.index.generate() + b.t.trie = *i + b.t.Index = colltab.Trie{ + Index: i.index, + Values: i.values, + Index0: i.index[blockSize*b.t.root.lookupStart:], + Values0: i.values[blockSize*b.t.root.valueStart:], + } + b.error(err) + return b.t, b.err +} + +// Build builds the root Collator. +func (b *Builder) Build() (colltab.Weighter, error) { + table, err := b.build() + if err != nil { + return nil, err + } + return table, nil +} + +// Build builds a Collator for Tailoring t. +func (t *Tailoring) Build() (colltab.Weighter, error) { + // TODO: implement. + return nil, nil +} + +// Print prints the tables for b and all its Tailorings as a Go file +// that can be included in the Collate package. +func (b *Builder) Print(w io.Writer) (n int, err error) { + p := func(nn int, e error) { + n += nn + if err == nil { + err = e + } + } + t, err := b.build() + if err != nil { + return 0, err + } + p(fmt.Fprintf(w, `var availableLocales = "und`)) + for _, loc := range b.locale { + if loc.id != "und" { + p(fmt.Fprintf(w, ",%s", loc.id)) + } + } + p(fmt.Fprint(w, "\"\n\n")) + p(fmt.Fprintf(w, "const varTop = 0x%x\n\n", b.varTop)) + p(fmt.Fprintln(w, "var locales = [...]tableIndex{")) + for _, loc := range b.locale { + if loc.id == "und" { + p(t.fprintIndex(w, loc.index.handle, loc.id)) + } + } + for _, loc := range b.locale { + if loc.id != "und" { + p(t.fprintIndex(w, loc.index.handle, loc.id)) + } + } + p(fmt.Fprint(w, "}\n\n")) + n, _, err = t.fprint(w, "main") + return +} + +// reproducibleFromNFKD checks whether the given expansion could be generated +// from an NFKD expansion. +func reproducibleFromNFKD(e *entry, exp, nfkd []rawCE) bool { + // Length must be equal. + if len(exp) != len(nfkd) { + return false + } + for i, ce := range exp { + // Primary and secondary values should be equal. + if ce.w[0] != nfkd[i].w[0] || ce.w[1] != nfkd[i].w[1] { + return false + } + // Tertiary values should be equal to maxTertiary for third element onwards. + // TODO: there seem to be a lot of cases in CLDR (e.g. ㏭ in zh.xml) that can + // simply be dropped. Try this out by dropping the following code. + if i >= 2 && ce.w[2] != maxTertiary { + return false + } + if _, err := makeCE(ce); err != nil { + // Simply return false. The error will be caught elsewhere. + return false + } + } + return true +} + +func simplify(o *ordering) { + // Runes that are a starter of a contraction should not be removed. + // (To date, there is only Kannada character 0CCA.) + keep := make(map[rune]bool) + for e := o.front(); e != nil; e, _ = e.nextIndexed() { + if len(e.runes) > 1 { + keep[e.runes[0]] = true + } + } + // Tag entries for which the runes NFKD decompose to identical values. + for e := o.front(); e != nil; e, _ = e.nextIndexed() { + s := e.str + nfkd := norm.NFKD.String(s) + nfd := norm.NFD.String(s) + if e.decompose || len(e.runes) > 1 || len(e.elems) == 1 || keep[e.runes[0]] || nfkd == nfd { + continue + } + if reproducibleFromNFKD(e, e.elems, o.genColElems(nfkd)) { + e.decompose = true + } + } +} + +// appendExpansion converts the given collation sequence to +// collation elements and adds them to the expansion table. +// It returns an index to the expansion table. +func (b *Builder) appendExpansion(e *entry) int { + t := b.t + i := len(t.ExpandElem) + ce := uint32(len(e.elems)) + t.ExpandElem = append(t.ExpandElem, ce) + for _, w := range e.elems { + ce, err := makeCE(w) + if err != nil { + b.error(err) + return -1 + } + t.ExpandElem = append(t.ExpandElem, ce) + } + return i +} + +// processExpansions extracts data necessary to generate +// the extraction tables. +func (b *Builder) processExpansions(o *ordering) { + for e := o.front(); e != nil; e, _ = e.nextIndexed() { + if !e.expansion() { + continue + } + key := fmt.Sprintf("%v", e.elems) + i, ok := b.expIndex[key] + if !ok { + i = b.appendExpansion(e) + b.expIndex[key] = i + } + e.expansionIndex = i + } +} + +func (b *Builder) processContractions(o *ordering) { + // Collate contractions per starter rune. + starters := []rune{} + cm := make(map[rune][]*entry) + for e := o.front(); e != nil; e, _ = e.nextIndexed() { + if e.contraction() { + if len(e.str) > b.t.MaxContractLen { + b.t.MaxContractLen = len(e.str) + } + r := e.runes[0] + if _, ok := cm[r]; !ok { + starters = append(starters, r) + } + cm[r] = append(cm[r], e) + } + } + // Add entries of single runes that are at a start of a contraction. + for e := o.front(); e != nil; e, _ = e.nextIndexed() { + if !e.contraction() { + r := e.runes[0] + if _, ok := cm[r]; ok { + cm[r] = append(cm[r], e) + } + } + } + // Build the tries for the contractions. + t := b.t + for _, r := range starters { + l := cm[r] + // Compute suffix strings. There are 31 different contraction suffix + // sets for 715 contractions and 82 contraction starter runes as of + // version 6.0.0. + sufx := []string{} + hasSingle := false + for _, e := range l { + if len(e.runes) > 1 { + sufx = append(sufx, string(e.runes[1:])) + } else { + hasSingle = true + } + } + if !hasSingle { + b.error(fmt.Errorf("no single entry for starter rune %U found", r)) + continue + } + // Unique the suffix set. + sort.Strings(sufx) + key := strings.Join(sufx, "\n") + handle, ok := b.ctHandle[key] + if !ok { + var err error + handle, err = appendTrie(&t.ContractTries, sufx) + if err != nil { + b.error(err) + } + b.ctHandle[key] = handle + } + // Bucket sort entries in index order. + es := make([]*entry, len(l)) + for _, e := range l { + var p, sn int + if len(e.runes) > 1 { + str := []byte(string(e.runes[1:])) + p, sn = lookup(&t.ContractTries, handle, str) + if sn != len(str) { + log.Fatalf("%s: processContractions: unexpected length for '%X'; len=%d; want %d", o.id, e.runes, sn, len(str)) + } + } + if es[p] != nil { + log.Fatalf("%s: multiple contractions for position %d for rune %U", o.id, p, e.runes[0]) + } + es[p] = e + } + // Create collation elements for contractions. + elems := []uint32{} + for _, e := range es { + ce, err := e.encodeBase() + b.errorID(o.id, err) + elems = append(elems, ce) + } + key = fmt.Sprintf("%v", elems) + i, ok := b.ctElem[key] + if !ok { + i = len(t.ContractElem) + b.ctElem[key] = i + t.ContractElem = append(t.ContractElem, elems...) + } + // Store info in entry for starter rune. + es[0].contractionIndex = i + es[0].contractionHandle = handle + } +} diff --git a/vendor/golang.org/x/text/collate/build/builder_test.go b/vendor/golang.org/x/text/collate/build/builder_test.go new file mode 100644 index 000000000..ff0aba3ae --- /dev/null +++ b/vendor/golang.org/x/text/collate/build/builder_test.go @@ -0,0 +1,290 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package build + +import "testing" + +// cjk returns an implicit collation element for a CJK rune. +func cjk(r rune) []rawCE { + // A CJK character C is represented in the DUCET as + // [.AAAA.0020.0002.C][.BBBB.0000.0000.C] + // Where AAAA is the most significant 15 bits plus a base value. + // Any base value will work for the test, so we pick the common value of FB40. + const base = 0xFB40 + return []rawCE{ + {w: []int{base + int(r>>15), defaultSecondary, defaultTertiary, int(r)}}, + {w: []int{int(r&0x7FFF) | 0x8000, 0, 0, int(r)}}, + } +} + +func pCE(p int) []rawCE { + return mkCE([]int{p, defaultSecondary, defaultTertiary, 0}, 0) +} + +func pqCE(p, q int) []rawCE { + return mkCE([]int{p, defaultSecondary, defaultTertiary, q}, 0) +} + +func ptCE(p, t int) []rawCE { + return mkCE([]int{p, defaultSecondary, t, 0}, 0) +} + +func ptcCE(p, t int, ccc uint8) []rawCE { + return mkCE([]int{p, defaultSecondary, t, 0}, ccc) +} + +func sCE(s int) []rawCE { + return mkCE([]int{0, s, defaultTertiary, 0}, 0) +} + +func stCE(s, t int) []rawCE { + return mkCE([]int{0, s, t, 0}, 0) +} + +func scCE(s int, ccc uint8) []rawCE { + return mkCE([]int{0, s, defaultTertiary, 0}, ccc) +} + +func mkCE(w []int, ccc uint8) []rawCE { + return []rawCE{rawCE{w, ccc}} +} + +// ducetElem is used to define test data that is used to generate a table. +type ducetElem struct { + str string + ces []rawCE +} + +func newBuilder(t *testing.T, ducet []ducetElem) *Builder { + b := NewBuilder() + for _, e := range ducet { + ces := [][]int{} + for _, ce := range e.ces { + ces = append(ces, ce.w) + } + if err := b.Add([]rune(e.str), ces, nil); err != nil { + t.Errorf(err.Error()) + } + } + b.t = &table{} + b.root.sort() + return b +} + +type convertTest struct { + in, out []rawCE + err bool +} + +var convLargeTests = []convertTest{ + {pCE(0xFB39), pCE(0xFB39), false}, + {cjk(0x2F9B2), pqCE(0x3F9B2, 0x2F9B2), false}, + {pCE(0xFB40), pCE(0), true}, + {append(pCE(0xFB40), pCE(0)[0]), pCE(0), true}, + {pCE(0xFFFE), pCE(illegalOffset), false}, + {pCE(0xFFFF), pCE(illegalOffset + 1), false}, +} + +func TestConvertLarge(t *testing.T) { + for i, tt := range convLargeTests { + e := new(entry) + for _, ce := range tt.in { + e.elems = append(e.elems, makeRawCE(ce.w, ce.ccc)) + } + elems, err := convertLargeWeights(e.elems) + if tt.err { + if err == nil { + t.Errorf("%d: expected error; none found", i) + } + continue + } else if err != nil { + t.Errorf("%d: unexpected error: %v", i, err) + } + if !equalCEArrays(elems, tt.out) { + t.Errorf("%d: conversion was %x; want %x", i, elems, tt.out) + } + } +} + +// Collation element table for simplify tests. +var simplifyTest = []ducetElem{ + {"\u0300", sCE(30)}, // grave + {"\u030C", sCE(40)}, // caron + {"A", ptCE(100, 8)}, + {"D", ptCE(104, 8)}, + {"E", ptCE(105, 8)}, + {"I", ptCE(110, 8)}, + {"z", ptCE(130, 8)}, + {"\u05F2", append(ptCE(200, 4), ptCE(200, 4)[0])}, + {"\u05B7", sCE(80)}, + {"\u00C0", append(ptCE(100, 8), sCE(30)...)}, // A with grave, can be removed + {"\u00C8", append(ptCE(105, 8), sCE(30)...)}, // E with grave + {"\uFB1F", append(ptCE(200, 4), ptCE(200, 4)[0], sCE(80)[0])}, // eliminated by NFD + {"\u00C8\u0302", ptCE(106, 8)}, // block previous from simplifying + {"\u01C5", append(ptCE(104, 9), ptCE(130, 4)[0], stCE(40, maxTertiary)[0])}, // eliminated by NFKD + // no removal: tertiary value of third element is not maxTertiary + {"\u2162", append(ptCE(110, 9), ptCE(110, 4)[0], ptCE(110, 8)[0])}, +} + +var genColTests = []ducetElem{ + {"\uFA70", pqCE(0x1FA70, 0xFA70)}, + {"A\u0300", append(ptCE(100, 8), sCE(30)...)}, + {"A\u0300\uFA70", append(ptCE(100, 8), sCE(30)[0], pqCE(0x1FA70, 0xFA70)[0])}, + {"A\u0300A\u0300", append(ptCE(100, 8), sCE(30)[0], ptCE(100, 8)[0], sCE(30)[0])}, +} + +func TestGenColElems(t *testing.T) { + b := newBuilder(t, simplifyTest[:5]) + + for i, tt := range genColTests { + res := b.root.genColElems(tt.str) + if !equalCEArrays(tt.ces, res) { + t.Errorf("%d: result %X; want %X", i, res, tt.ces) + } + } +} + +type strArray []string + +func (sa strArray) contains(s string) bool { + for _, e := range sa { + if e == s { + return true + } + } + return false +} + +var simplifyRemoved = strArray{"\u00C0", "\uFB1F"} +var simplifyMarked = strArray{"\u01C5"} + +func TestSimplify(t *testing.T) { + b := newBuilder(t, simplifyTest) + o := &b.root + simplify(o) + + for i, tt := range simplifyTest { + if simplifyRemoved.contains(tt.str) { + continue + } + e := o.find(tt.str) + if e.str != tt.str || !equalCEArrays(e.elems, tt.ces) { + t.Errorf("%d: found element %s -> %X; want %s -> %X", i, e.str, e.elems, tt.str, tt.ces) + break + } + } + var i, k int + for e := o.front(); e != nil; e, _ = e.nextIndexed() { + gold := simplifyMarked.contains(e.str) + if gold { + k++ + } + if gold != e.decompose { + t.Errorf("%d: %s has decompose %v; want %v", i, e.str, e.decompose, gold) + } + i++ + } + if k != len(simplifyMarked) { + t.Errorf(" an entry that should be marked as decompose was deleted") + } +} + +var expandTest = []ducetElem{ + {"\u0300", append(scCE(29, 230), scCE(30, 230)...)}, + {"\u00C0", append(ptCE(100, 8), scCE(30, 230)...)}, + {"\u00C8", append(ptCE(105, 8), scCE(30, 230)...)}, + {"\u00C9", append(ptCE(105, 8), scCE(30, 230)...)}, // identical expansion + {"\u05F2", append(ptCE(200, 4), ptCE(200, 4)[0], ptCE(200, 4)[0])}, + {"\u01FF", append(ptCE(200, 4), ptcCE(201, 4, 0)[0], scCE(30, 230)[0])}, +} + +func TestExpand(t *testing.T) { + const ( + totalExpansions = 5 + totalElements = 2 + 2 + 2 + 3 + 3 + totalExpansions + ) + b := newBuilder(t, expandTest) + o := &b.root + b.processExpansions(o) + + e := o.front() + for _, tt := range expandTest { + exp := b.t.ExpandElem[e.expansionIndex:] + if int(exp[0]) != len(tt.ces) { + t.Errorf("%U: len(expansion)==%d; want %d", []rune(tt.str)[0], exp[0], len(tt.ces)) + } + exp = exp[1:] + for j, w := range tt.ces { + if ce, _ := makeCE(w); exp[j] != ce { + t.Errorf("%U: element %d is %X; want %X", []rune(tt.str)[0], j, exp[j], ce) + } + } + e, _ = e.nextIndexed() + } + // Verify uniquing. + if len(b.t.ExpandElem) != totalElements { + t.Errorf("len(expandElem)==%d; want %d", len(b.t.ExpandElem), totalElements) + } +} + +var contractTest = []ducetElem{ + {"abc", pCE(102)}, + {"abd", pCE(103)}, + {"a", pCE(100)}, + {"ab", pCE(101)}, + {"ac", pCE(104)}, + {"bcd", pCE(202)}, + {"b", pCE(200)}, + {"bc", pCE(201)}, + {"bd", pCE(203)}, + // shares suffixes with a* + {"Ab", pCE(301)}, + {"A", pCE(300)}, + {"Ac", pCE(304)}, + {"Abc", pCE(302)}, + {"Abd", pCE(303)}, + // starter to be ignored + {"z", pCE(1000)}, +} + +func TestContract(t *testing.T) { + const ( + totalElements = 5 + 5 + 4 + ) + b := newBuilder(t, contractTest) + o := &b.root + b.processContractions(o) + + indexMap := make(map[int]bool) + handleMap := make(map[rune]*entry) + for e := o.front(); e != nil; e, _ = e.nextIndexed() { + if e.contractionHandle.n > 0 { + handleMap[e.runes[0]] = e + indexMap[e.contractionHandle.index] = true + } + } + // Verify uniquing. + if len(indexMap) != 2 { + t.Errorf("number of tries is %d; want %d", len(indexMap), 2) + } + for _, tt := range contractTest { + e, ok := handleMap[[]rune(tt.str)[0]] + if !ok { + continue + } + str := tt.str[1:] + offset, n := lookup(&b.t.ContractTries, e.contractionHandle, []byte(str)) + if len(str) != n { + t.Errorf("%s: bytes consumed==%d; want %d", tt.str, n, len(str)) + } + ce := b.t.ContractElem[offset+e.contractionIndex] + if want, _ := makeCE(tt.ces[0]); want != ce { + t.Errorf("%s: element %X; want %X", tt.str, ce, want) + } + } + if len(b.t.ContractElem) != totalElements { + t.Errorf("len(expandElem)==%d; want %d", len(b.t.ContractElem), totalElements) + } +} diff --git a/vendor/golang.org/x/text/collate/build/colelem.go b/vendor/golang.org/x/text/collate/build/colelem.go new file mode 100644 index 000000000..726fe5427 --- /dev/null +++ b/vendor/golang.org/x/text/collate/build/colelem.go @@ -0,0 +1,294 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package build + +import ( + "fmt" + "unicode" + + "golang.org/x/text/internal/colltab" +) + +const ( + defaultSecondary = 0x20 + defaultTertiary = 0x2 + maxTertiary = 0x1F +) + +type rawCE struct { + w []int + ccc uint8 +} + +func makeRawCE(w []int, ccc uint8) rawCE { + ce := rawCE{w: make([]int, 4), ccc: ccc} + copy(ce.w, w) + return ce +} + +// A collation element is represented as an uint32. +// In the typical case, a rune maps to a single collation element. If a rune +// can be the start of a contraction or expands into multiple collation elements, +// then the collation element that is associated with a rune will have a special +// form to represent such m to n mappings. Such special collation elements +// have a value >= 0x80000000. + +const ( + maxPrimaryBits = 21 + maxSecondaryBits = 12 + maxTertiaryBits = 8 +) + +func makeCE(ce rawCE) (uint32, error) { + v, e := colltab.MakeElem(ce.w[0], ce.w[1], ce.w[2], ce.ccc) + return uint32(v), e +} + +// For contractions, collation elements are of the form +// 110bbbbb bbbbbbbb iiiiiiii iiiinnnn, where +// - n* is the size of the first node in the contraction trie. +// - i* is the index of the first node in the contraction trie. +// - b* is the offset into the contraction collation element table. +// See contract.go for details on the contraction trie. +const ( + contractID = 0xC0000000 + maxNBits = 4 + maxTrieIndexBits = 12 + maxContractOffsetBits = 13 +) + +func makeContractIndex(h ctHandle, offset int) (uint32, error) { + if h.n >= 1<<maxNBits { + return 0, fmt.Errorf("size of contraction trie node too large: %d >= %d", h.n, 1<<maxNBits) + } + if h.index >= 1<<maxTrieIndexBits { + return 0, fmt.Errorf("size of contraction trie offset too large: %d >= %d", h.index, 1<<maxTrieIndexBits) + } + if offset >= 1<<maxContractOffsetBits { + return 0, fmt.Errorf("contraction offset out of bounds: %x >= %x", offset, 1<<maxContractOffsetBits) + } + ce := uint32(contractID) + ce += uint32(offset << (maxNBits + maxTrieIndexBits)) + ce += uint32(h.index << maxNBits) + ce += uint32(h.n) + return ce, nil +} + +// For expansions, collation elements are of the form +// 11100000 00000000 bbbbbbbb bbbbbbbb, +// where b* is the index into the expansion sequence table. +const ( + expandID = 0xE0000000 + maxExpandIndexBits = 16 +) + +func makeExpandIndex(index int) (uint32, error) { + if index >= 1<<maxExpandIndexBits { + return 0, fmt.Errorf("expansion index out of bounds: %x >= %x", index, 1<<maxExpandIndexBits) + } + return expandID + uint32(index), nil +} + +// Each list of collation elements corresponding to an expansion starts with +// a header indicating the length of the sequence. +func makeExpansionHeader(n int) (uint32, error) { + return uint32(n), nil +} + +// Some runes can be expanded using NFKD decomposition. Instead of storing the full +// sequence of collation elements, we decompose the rune and lookup the collation +// elements for each rune in the decomposition and modify the tertiary weights. +// The collation element, in this case, is of the form +// 11110000 00000000 wwwwwwww vvvvvvvv, where +// - v* is the replacement tertiary weight for the first rune, +// - w* is the replacement tertiary weight for the second rune, +// Tertiary weights of subsequent runes should be replaced with maxTertiary. +// See http://www.unicode.org/reports/tr10/#Compatibility_Decompositions for more details. +const ( + decompID = 0xF0000000 +) + +func makeDecompose(t1, t2 int) (uint32, error) { + if t1 >= 256 || t1 < 0 { + return 0, fmt.Errorf("first tertiary weight out of bounds: %d >= 256", t1) + } + if t2 >= 256 || t2 < 0 { + return 0, fmt.Errorf("second tertiary weight out of bounds: %d >= 256", t2) + } + return uint32(t2<<8+t1) + decompID, nil +} + +const ( + // These constants were taken from http://www.unicode.org/versions/Unicode6.0.0/ch12.pdf. + minUnified rune = 0x4E00 + maxUnified = 0x9FFF + minCompatibility = 0xF900 + maxCompatibility = 0xFAFF + minRare = 0x3400 + maxRare = 0x4DBF +) +const ( + commonUnifiedOffset = 0x10000 + rareUnifiedOffset = 0x20000 // largest rune in common is U+FAFF + otherOffset = 0x50000 // largest rune in rare is U+2FA1D + illegalOffset = otherOffset + int(unicode.MaxRune) + maxPrimary = illegalOffset + 1 +) + +// implicitPrimary returns the primary weight for the a rune +// for which there is no entry for the rune in the collation table. +// We take a different approach from the one specified in +// http://unicode.org/reports/tr10/#Implicit_Weights, +// but preserve the resulting relative ordering of the runes. +func implicitPrimary(r rune) int { + if unicode.Is(unicode.Ideographic, r) { + if r >= minUnified && r <= maxUnified { + // The most common case for CJK. + return int(r) + commonUnifiedOffset + } + if r >= minCompatibility && r <= maxCompatibility { + // This will typically not hit. The DUCET explicitly specifies mappings + // for all characters that do not decompose. + return int(r) + commonUnifiedOffset + } + return int(r) + rareUnifiedOffset + } + return int(r) + otherOffset +} + +// convertLargeWeights converts collation elements with large +// primaries (either double primaries or for illegal runes) +// to our own representation. +// A CJK character C is represented in the DUCET as +// [.FBxx.0020.0002.C][.BBBB.0000.0000.C] +// We will rewrite these characters to a single CE. +// We assume the CJK values start at 0x8000. +// See http://unicode.org/reports/tr10/#Implicit_Weights +func convertLargeWeights(elems []rawCE) (res []rawCE, err error) { + const ( + cjkPrimaryStart = 0xFB40 + rarePrimaryStart = 0xFB80 + otherPrimaryStart = 0xFBC0 + illegalPrimary = 0xFFFE + highBitsMask = 0x3F + lowBitsMask = 0x7FFF + lowBitsFlag = 0x8000 + shiftBits = 15 + ) + for i := 0; i < len(elems); i++ { + ce := elems[i].w + p := ce[0] + if p < cjkPrimaryStart { + continue + } + if p > 0xFFFF { + return elems, fmt.Errorf("found primary weight %X; should be <= 0xFFFF", p) + } + if p >= illegalPrimary { + ce[0] = illegalOffset + p - illegalPrimary + } else { + if i+1 >= len(elems) { + return elems, fmt.Errorf("second part of double primary weight missing: %v", elems) + } + if elems[i+1].w[0]&lowBitsFlag == 0 { + return elems, fmt.Errorf("malformed second part of double primary weight: %v", elems) + } + np := ((p & highBitsMask) << shiftBits) + elems[i+1].w[0]&lowBitsMask + switch { + case p < rarePrimaryStart: + np += commonUnifiedOffset + case p < otherPrimaryStart: + np += rareUnifiedOffset + default: + p += otherOffset + } + ce[0] = np + for j := i + 1; j+1 < len(elems); j++ { + elems[j] = elems[j+1] + } + elems = elems[:len(elems)-1] + } + } + return elems, nil +} + +// nextWeight computes the first possible collation weights following elems +// for the given level. +func nextWeight(level colltab.Level, elems []rawCE) []rawCE { + if level == colltab.Identity { + next := make([]rawCE, len(elems)) + copy(next, elems) + return next + } + next := []rawCE{makeRawCE(elems[0].w, elems[0].ccc)} + next[0].w[level]++ + if level < colltab.Secondary { + next[0].w[colltab.Secondary] = defaultSecondary + } + if level < colltab.Tertiary { + next[0].w[colltab.Tertiary] = defaultTertiary + } + // Filter entries that cannot influence ordering. + for _, ce := range elems[1:] { + skip := true + for i := colltab.Primary; i < level; i++ { + skip = skip && ce.w[i] == 0 + } + if !skip { + next = append(next, ce) + } + } + return next +} + +func nextVal(elems []rawCE, i int, level colltab.Level) (index, value int) { + for ; i < len(elems) && elems[i].w[level] == 0; i++ { + } + if i < len(elems) { + return i, elems[i].w[level] + } + return i, 0 +} + +// compareWeights returns -1 if a < b, 1 if a > b, or 0 otherwise. +// It also returns the collation level at which the difference is found. +func compareWeights(a, b []rawCE) (result int, level colltab.Level) { + for level := colltab.Primary; level < colltab.Identity; level++ { + var va, vb int + for ia, ib := 0, 0; ia < len(a) || ib < len(b); ia, ib = ia+1, ib+1 { + ia, va = nextVal(a, ia, level) + ib, vb = nextVal(b, ib, level) + if va != vb { + if va < vb { + return -1, level + } else { + return 1, level + } + } + } + } + return 0, colltab.Identity +} + +func equalCE(a, b rawCE) bool { + for i := 0; i < 3; i++ { + if b.w[i] != a.w[i] { + return false + } + } + return true +} + +func equalCEArrays(a, b []rawCE) bool { + if len(a) != len(b) { + return false + } + for i := range a { + if !equalCE(a[i], b[i]) { + return false + } + } + return true +} diff --git a/vendor/golang.org/x/text/collate/build/colelem_test.go b/vendor/golang.org/x/text/collate/build/colelem_test.go new file mode 100644 index 000000000..d0c8d07d8 --- /dev/null +++ b/vendor/golang.org/x/text/collate/build/colelem_test.go @@ -0,0 +1,215 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package build + +import ( + "testing" + + "golang.org/x/text/internal/colltab" +) + +type ceTest struct { + f func(in []int) (uint32, error) + arg []int + val uint32 +} + +func normalCE(in []int) (ce uint32, err error) { + return makeCE(rawCE{w: in[:3], ccc: uint8(in[3])}) +} + +func expandCE(in []int) (ce uint32, err error) { + return makeExpandIndex(in[0]) +} + +func contractCE(in []int) (ce uint32, err error) { + return makeContractIndex(ctHandle{in[0], in[1]}, in[2]) +} + +func decompCE(in []int) (ce uint32, err error) { + return makeDecompose(in[0], in[1]) +} + +var ceTests = []ceTest{ + {normalCE, []int{0, 0, 0, 0}, 0xA0000000}, + {normalCE, []int{0, 0x28, 3, 0}, 0xA0002803}, + {normalCE, []int{0, 0x28, 3, 0xFF}, 0xAFF02803}, + {normalCE, []int{100, defaultSecondary, 3, 0}, 0x0000C883}, + // non-ignorable primary with non-default secondary + {normalCE, []int{100, 0x28, defaultTertiary, 0}, 0x4000C828}, + {normalCE, []int{100, defaultSecondary + 8, 3, 0}, 0x0000C983}, + {normalCE, []int{100, 0, 3, 0}, 0xFFFF}, // non-ignorable primary with non-supported secondary + {normalCE, []int{100, 1, 3, 0}, 0xFFFF}, + {normalCE, []int{1 << maxPrimaryBits, defaultSecondary, 0, 0}, 0xFFFF}, + {normalCE, []int{0, 1 << maxSecondaryBits, 0, 0}, 0xFFFF}, + {normalCE, []int{100, defaultSecondary, 1 << maxTertiaryBits, 0}, 0xFFFF}, + {normalCE, []int{0x123, defaultSecondary, 8, 0xFF}, 0x88FF0123}, + {normalCE, []int{0x123, defaultSecondary + 1, 8, 0xFF}, 0xFFFF}, + + {contractCE, []int{0, 0, 0}, 0xC0000000}, + {contractCE, []int{1, 1, 1}, 0xC0010011}, + {contractCE, []int{1, (1 << maxNBits) - 1, 1}, 0xC001001F}, + {contractCE, []int{(1 << maxTrieIndexBits) - 1, 1, 1}, 0xC001FFF1}, + {contractCE, []int{1, 1, (1 << maxContractOffsetBits) - 1}, 0xDFFF0011}, + {contractCE, []int{1, (1 << maxNBits), 1}, 0xFFFF}, + {contractCE, []int{(1 << maxTrieIndexBits), 1, 1}, 0xFFFF}, + {contractCE, []int{1, (1 << maxContractOffsetBits), 1}, 0xFFFF}, + + {expandCE, []int{0}, 0xE0000000}, + {expandCE, []int{5}, 0xE0000005}, + {expandCE, []int{(1 << maxExpandIndexBits) - 1}, 0xE000FFFF}, + {expandCE, []int{1 << maxExpandIndexBits}, 0xFFFF}, + + {decompCE, []int{0, 0}, 0xF0000000}, + {decompCE, []int{1, 1}, 0xF0000101}, + {decompCE, []int{0x1F, 0x1F}, 0xF0001F1F}, + {decompCE, []int{256, 0x1F}, 0xFFFF}, + {decompCE, []int{0x1F, 256}, 0xFFFF}, +} + +func TestColElem(t *testing.T) { + for i, tt := range ceTests { + in := make([]int, len(tt.arg)) + copy(in, tt.arg) + ce, err := tt.f(in) + if tt.val == 0xFFFF { + if err == nil { + t.Errorf("%d: expected error for args %x", i, tt.arg) + } + continue + } + if err != nil { + t.Errorf("%d: unexpected error: %v", i, err.Error()) + } + if ce != tt.val { + t.Errorf("%d: colElem=%X; want %X", i, ce, tt.val) + } + } +} + +func mkRawCES(in [][]int) []rawCE { + out := []rawCE{} + for _, w := range in { + out = append(out, rawCE{w: w}) + } + return out +} + +type weightsTest struct { + a, b [][]int + level colltab.Level + result int +} + +var nextWeightTests = []weightsTest{ + { + a: [][]int{{100, 20, 5, 0}}, + b: [][]int{{101, defaultSecondary, defaultTertiary, 0}}, + level: colltab.Primary, + }, + { + a: [][]int{{100, 20, 5, 0}}, + b: [][]int{{100, 21, defaultTertiary, 0}}, + level: colltab.Secondary, + }, + { + a: [][]int{{100, 20, 5, 0}}, + b: [][]int{{100, 20, 6, 0}}, + level: colltab.Tertiary, + }, + { + a: [][]int{{100, 20, 5, 0}}, + b: [][]int{{100, 20, 5, 0}}, + level: colltab.Identity, + }, +} + +var extra = [][]int{{200, 32, 8, 0}, {0, 32, 8, 0}, {0, 0, 8, 0}, {0, 0, 0, 0}} + +func TestNextWeight(t *testing.T) { + for i, tt := range nextWeightTests { + test := func(l colltab.Level, tt weightsTest, a, gold [][]int) { + res := nextWeight(tt.level, mkRawCES(a)) + if !equalCEArrays(mkRawCES(gold), res) { + t.Errorf("%d:%d: expected weights %d; found %d", i, l, gold, res) + } + } + test(-1, tt, tt.a, tt.b) + for l := colltab.Primary; l <= colltab.Tertiary; l++ { + if tt.level <= l { + test(l, tt, append(tt.a, extra[l]), tt.b) + } else { + test(l, tt, append(tt.a, extra[l]), append(tt.b, extra[l])) + } + } + } +} + +var compareTests = []weightsTest{ + { + [][]int{{100, 20, 5, 0}}, + [][]int{{100, 20, 5, 0}}, + colltab.Identity, + 0, + }, + { + [][]int{{100, 20, 5, 0}, extra[0]}, + [][]int{{100, 20, 5, 1}}, + colltab.Primary, + 1, + }, + { + [][]int{{100, 20, 5, 0}}, + [][]int{{101, 20, 5, 0}}, + colltab.Primary, + -1, + }, + { + [][]int{{101, 20, 5, 0}}, + [][]int{{100, 20, 5, 0}}, + colltab.Primary, + 1, + }, + { + [][]int{{100, 0, 0, 0}, {0, 20, 5, 0}}, + [][]int{{0, 20, 5, 0}, {100, 0, 0, 0}}, + colltab.Identity, + 0, + }, + { + [][]int{{100, 20, 5, 0}}, + [][]int{{100, 21, 5, 0}}, + colltab.Secondary, + -1, + }, + { + [][]int{{100, 20, 5, 0}}, + [][]int{{100, 20, 2, 0}}, + colltab.Tertiary, + 1, + }, + { + [][]int{{100, 20, 5, 1}}, + [][]int{{100, 20, 5, 2}}, + colltab.Quaternary, + -1, + }, +} + +func TestCompareWeights(t *testing.T) { + for i, tt := range compareTests { + test := func(tt weightsTest, a, b [][]int) { + res, level := compareWeights(mkRawCES(a), mkRawCES(b)) + if res != tt.result { + t.Errorf("%d: expected comparison result %d; found %d", i, tt.result, res) + } + if level != tt.level { + t.Errorf("%d: expected level %d; found %d", i, tt.level, level) + } + } + test(tt, tt.a, tt.b) + test(tt, append(tt.a, extra[0]), append(tt.b, extra[0])) + } +} diff --git a/vendor/golang.org/x/text/collate/build/contract.go b/vendor/golang.org/x/text/collate/build/contract.go new file mode 100644 index 000000000..a6a7e01f8 --- /dev/null +++ b/vendor/golang.org/x/text/collate/build/contract.go @@ -0,0 +1,309 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package build + +import ( + "fmt" + "io" + "reflect" + "sort" + "strings" + + "golang.org/x/text/internal/colltab" +) + +// This file contains code for detecting contractions and generating +// the necessary tables. +// Any Unicode Collation Algorithm (UCA) table entry that has more than +// one rune one the left-hand side is called a contraction. +// See http://www.unicode.org/reports/tr10/#Contractions for more details. +// +// We define the following terms: +// initial: a rune that appears as the first rune in a contraction. +// suffix: a sequence of runes succeeding the initial rune +// in a given contraction. +// non-initial: a rune that appears in a suffix. +// +// A rune may be both an initial and a non-initial and may be so in +// many contractions. An initial may typically also appear by itself. +// In case of ambiguities, the UCA requires we match the longest +// contraction. +// +// Many contraction rules share the same set of possible suffixes. +// We store sets of suffixes in a trie that associates an index with +// each suffix in the set. This index can be used to look up a +// collation element associated with the (starter rune, suffix) pair. +// +// The trie is defined on a UTF-8 byte sequence. +// The overall trie is represented as an array of ctEntries. Each node of the trie +// is represented as a subsequence of ctEntries, where each entry corresponds to +// a possible match of a next character in the search string. An entry +// also includes the length and offset to the next sequence of entries +// to check in case of a match. + +const ( + final = 0 + noIndex = 0xFF +) + +// ctEntry associates to a matching byte an offset and/or next sequence of +// bytes to check. A ctEntry c is called final if a match means that the +// longest suffix has been found. An entry c is final if c.N == 0. +// A single final entry can match a range of characters to an offset. +// A non-final entry always matches a single byte. Note that a non-final +// entry might still resemble a completed suffix. +// Examples: +// The suffix strings "ab" and "ac" can be represented as: +// []ctEntry{ +// {'a', 1, 1, noIndex}, // 'a' by itself does not match, so i is 0xFF. +// {'b', 'c', 0, 1}, // "ab" -> 1, "ac" -> 2 +// } +// +// The suffix strings "ab", "abc", "abd", and "abcd" can be represented as: +// []ctEntry{ +// {'a', 1, 1, noIndex}, // 'a' must be followed by 'b'. +// {'b', 1, 2, 1}, // "ab" -> 1, may be followed by 'c' or 'd'. +// {'d', 'd', final, 3}, // "abd" -> 3 +// {'c', 4, 1, 2}, // "abc" -> 2, may be followed by 'd'. +// {'d', 'd', final, 4}, // "abcd" -> 4 +// } +// See genStateTests in contract_test.go for more examples. +type ctEntry struct { + L uint8 // non-final: byte value to match; final: lowest match in range. + H uint8 // non-final: relative index to next block; final: highest match in range. + N uint8 // non-final: length of next block; final: final + I uint8 // result offset. Will be noIndex if more bytes are needed to complete. +} + +// contractTrieSet holds a set of contraction tries. The tries are stored +// consecutively in the entry field. +type contractTrieSet []struct{ l, h, n, i uint8 } + +// ctHandle is used to identify a trie in the trie set, consisting in an offset +// in the array and the size of the first node. +type ctHandle struct { + index, n int +} + +// appendTrie adds a new trie for the given suffixes to the trie set and returns +// a handle to it. The handle will be invalid on error. +func appendTrie(ct *colltab.ContractTrieSet, suffixes []string) (ctHandle, error) { + es := make([]stridx, len(suffixes)) + for i, s := range suffixes { + es[i].str = s + } + sort.Sort(offsetSort(es)) + for i := range es { + es[i].index = i + 1 + } + sort.Sort(genidxSort(es)) + i := len(*ct) + n, err := genStates(ct, es) + if err != nil { + *ct = (*ct)[:i] + return ctHandle{}, err + } + return ctHandle{i, n}, nil +} + +// genStates generates ctEntries for a given suffix set and returns +// the number of entries for the first node. +func genStates(ct *colltab.ContractTrieSet, sis []stridx) (int, error) { + if len(sis) == 0 { + return 0, fmt.Errorf("genStates: list of suffices must be non-empty") + } + start := len(*ct) + // create entries for differing first bytes. + for _, si := range sis { + s := si.str + if len(s) == 0 { + continue + } + added := false + c := s[0] + if len(s) > 1 { + for j := len(*ct) - 1; j >= start; j-- { + if (*ct)[j].L == c { + added = true + break + } + } + if !added { + *ct = append(*ct, ctEntry{L: c, I: noIndex}) + } + } else { + for j := len(*ct) - 1; j >= start; j-- { + // Update the offset for longer suffixes with the same byte. + if (*ct)[j].L == c { + (*ct)[j].I = uint8(si.index) + added = true + } + // Extend range of final ctEntry, if possible. + if (*ct)[j].H+1 == c { + (*ct)[j].H = c + added = true + } + } + if !added { + *ct = append(*ct, ctEntry{L: c, H: c, N: final, I: uint8(si.index)}) + } + } + } + n := len(*ct) - start + // Append nodes for the remainder of the suffixes for each ctEntry. + sp := 0 + for i, end := start, len(*ct); i < end; i++ { + fe := (*ct)[i] + if fe.H == 0 { // uninitialized non-final + ln := len(*ct) - start - n + if ln > 0xFF { + return 0, fmt.Errorf("genStates: relative block offset too large: %d > 255", ln) + } + fe.H = uint8(ln) + // Find first non-final strings with same byte as current entry. + for ; sis[sp].str[0] != fe.L; sp++ { + } + se := sp + 1 + for ; se < len(sis) && len(sis[se].str) > 1 && sis[se].str[0] == fe.L; se++ { + } + sl := sis[sp:se] + sp = se + for i, si := range sl { + sl[i].str = si.str[1:] + } + nn, err := genStates(ct, sl) + if err != nil { + return 0, err + } + fe.N = uint8(nn) + (*ct)[i] = fe + } + } + sort.Sort(entrySort((*ct)[start : start+n])) + return n, nil +} + +// There may be both a final and non-final entry for a byte if the byte +// is implied in a range of matches in the final entry. +// We need to ensure that the non-final entry comes first in that case. +type entrySort colltab.ContractTrieSet + +func (fe entrySort) Len() int { return len(fe) } +func (fe entrySort) Swap(i, j int) { fe[i], fe[j] = fe[j], fe[i] } +func (fe entrySort) Less(i, j int) bool { + return fe[i].L > fe[j].L +} + +// stridx is used for sorting suffixes and their associated offsets. +type stridx struct { + str string + index int +} + +// For computing the offsets, we first sort by size, and then by string. +// This ensures that strings that only differ in the last byte by 1 +// are sorted consecutively in increasing order such that they can +// be packed as a range in a final ctEntry. +type offsetSort []stridx + +func (si offsetSort) Len() int { return len(si) } +func (si offsetSort) Swap(i, j int) { si[i], si[j] = si[j], si[i] } +func (si offsetSort) Less(i, j int) bool { + if len(si[i].str) != len(si[j].str) { + return len(si[i].str) > len(si[j].str) + } + return si[i].str < si[j].str +} + +// For indexing, we want to ensure that strings are sorted in string order, where +// for strings with the same prefix, we put longer strings before shorter ones. +type genidxSort []stridx + +func (si genidxSort) Len() int { return len(si) } +func (si genidxSort) Swap(i, j int) { si[i], si[j] = si[j], si[i] } +func (si genidxSort) Less(i, j int) bool { + if strings.HasPrefix(si[j].str, si[i].str) { + return false + } + if strings.HasPrefix(si[i].str, si[j].str) { + return true + } + return si[i].str < si[j].str +} + +// lookup matches the longest suffix in str and returns the associated offset +// and the number of bytes consumed. +func lookup(ct *colltab.ContractTrieSet, h ctHandle, str []byte) (index, ns int) { + states := (*ct)[h.index:] + p := 0 + n := h.n + for i := 0; i < n && p < len(str); { + e := states[i] + c := str[p] + if c >= e.L { + if e.L == c { + p++ + if e.I != noIndex { + index, ns = int(e.I), p + } + if e.N != final { + // set to new state + i, states, n = 0, states[int(e.H)+n:], int(e.N) + } else { + return + } + continue + } else if e.N == final && c <= e.H { + p++ + return int(c-e.L) + int(e.I), p + } + } + i++ + } + return +} + +// print writes the contractTrieSet t as compilable Go code to w. It returns +// the total number of bytes written and the size of the resulting data structure in bytes. +func print(t *colltab.ContractTrieSet, w io.Writer, name string) (n, size int, err error) { + update3 := func(nn, sz int, e error) { + n += nn + if err == nil { + err = e + } + size += sz + } + update2 := func(nn int, e error) { update3(nn, 0, e) } + + update3(printArray(*t, w, name)) + update2(fmt.Fprintf(w, "var %sContractTrieSet = ", name)) + update3(printStruct(*t, w, name)) + update2(fmt.Fprintln(w)) + return +} + +func printArray(ct colltab.ContractTrieSet, w io.Writer, name string) (n, size int, err error) { + p := func(f string, a ...interface{}) { + nn, e := fmt.Fprintf(w, f, a...) + n += nn + if err == nil { + err = e + } + } + size = len(ct) * 4 + p("// %sCTEntries: %d entries, %d bytes\n", name, len(ct), size) + p("var %sCTEntries = [%d]struct{L,H,N,I uint8}{\n", name, len(ct)) + for _, fe := range ct { + p("\t{0x%X, 0x%X, %d, %d},\n", fe.L, fe.H, fe.N, fe.I) + } + p("}\n") + return +} + +func printStruct(ct colltab.ContractTrieSet, w io.Writer, name string) (n, size int, err error) { + n, err = fmt.Fprintf(w, "colltab.ContractTrieSet( %sCTEntries[:] )", name) + size = int(reflect.TypeOf(ct).Size()) + return +} diff --git a/vendor/golang.org/x/text/collate/build/contract_test.go b/vendor/golang.org/x/text/collate/build/contract_test.go new file mode 100644 index 000000000..2e0eaecd5 --- /dev/null +++ b/vendor/golang.org/x/text/collate/build/contract_test.go @@ -0,0 +1,266 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package build + +import ( + "bytes" + "sort" + "testing" + + "golang.org/x/text/internal/colltab" +) + +var largetosmall = []stridx{ + {"a", 5}, + {"ab", 4}, + {"abc", 3}, + {"abcd", 2}, + {"abcde", 1}, + {"abcdef", 0}, +} + +var offsetSortTests = [][]stridx{ + { + {"bcde", 1}, + {"bc", 5}, + {"ab", 4}, + {"bcd", 3}, + {"abcd", 0}, + {"abc", 2}, + }, + largetosmall, +} + +func TestOffsetSort(t *testing.T) { + for i, st := range offsetSortTests { + sort.Sort(offsetSort(st)) + for j, si := range st { + if j != si.index { + t.Errorf("%d: failed: %v", i, st) + } + } + } + for i, tt := range genStateTests { + // ensure input is well-formed + sort.Sort(offsetSort(tt.in)) + for j, si := range tt.in { + if si.index != j+1 { + t.Errorf("%dth sort failed: %v", i, tt.in) + } + } + } +} + +var genidxtest1 = []stridx{ + {"bcde", 3}, + {"bc", 6}, + {"ab", 2}, + {"bcd", 5}, + {"abcd", 0}, + {"abc", 1}, + {"bcdf", 4}, +} + +var genidxSortTests = [][]stridx{ + genidxtest1, + largetosmall, +} + +func TestGenIdxSort(t *testing.T) { + for i, st := range genidxSortTests { + sort.Sort(genidxSort(st)) + for j, si := range st { + if j != si.index { + t.Errorf("%dth sort failed %v", i, st) + break + } + } + } +} + +var entrySortTests = []colltab.ContractTrieSet{ + { + {10, 0, 1, 3}, + {99, 0, 1, 0}, + {20, 50, 0, 2}, + {30, 0, 1, 1}, + }, +} + +func TestEntrySort(t *testing.T) { + for i, et := range entrySortTests { + sort.Sort(entrySort(et)) + for j, fe := range et { + if j != int(fe.I) { + t.Errorf("%dth sort failed %v", i, et) + break + } + } + } +} + +type GenStateTest struct { + in []stridx + firstBlockLen int + out colltab.ContractTrieSet +} + +var genStateTests = []GenStateTest{ + {[]stridx{ + {"abc", 1}, + }, + 1, + colltab.ContractTrieSet{ + {'a', 0, 1, noIndex}, + {'b', 0, 1, noIndex}, + {'c', 'c', final, 1}, + }, + }, + {[]stridx{ + {"abc", 1}, + {"abd", 2}, + {"abe", 3}, + }, + 1, + colltab.ContractTrieSet{ + {'a', 0, 1, noIndex}, + {'b', 0, 1, noIndex}, + {'c', 'e', final, 1}, + }, + }, + {[]stridx{ + {"abc", 1}, + {"ab", 2}, + {"a", 3}, + }, + 1, + colltab.ContractTrieSet{ + {'a', 0, 1, 3}, + {'b', 0, 1, 2}, + {'c', 'c', final, 1}, + }, + }, + {[]stridx{ + {"abc", 1}, + {"abd", 2}, + {"ab", 3}, + {"ac", 4}, + {"a", 5}, + {"b", 6}, + }, + 2, + colltab.ContractTrieSet{ + {'b', 'b', final, 6}, + {'a', 0, 2, 5}, + {'c', 'c', final, 4}, + {'b', 0, 1, 3}, + {'c', 'd', final, 1}, + }, + }, + {[]stridx{ + {"bcde", 2}, + {"bc", 7}, + {"ab", 6}, + {"bcd", 5}, + {"abcd", 1}, + {"abc", 4}, + {"bcdf", 3}, + }, + 2, + colltab.ContractTrieSet{ + {'b', 3, 1, noIndex}, + {'a', 0, 1, noIndex}, + {'b', 0, 1, 6}, + {'c', 0, 1, 4}, + {'d', 'd', final, 1}, + {'c', 0, 1, 7}, + {'d', 0, 1, 5}, + {'e', 'f', final, 2}, + }, + }, +} + +func TestGenStates(t *testing.T) { + for i, tt := range genStateTests { + si := []stridx{} + for _, e := range tt.in { + si = append(si, e) + } + // ensure input is well-formed + sort.Sort(genidxSort(si)) + ct := colltab.ContractTrieSet{} + n, _ := genStates(&ct, si) + if nn := tt.firstBlockLen; nn != n { + t.Errorf("%d: block len %v; want %v", i, n, nn) + } + if lv, lw := len(ct), len(tt.out); lv != lw { + t.Errorf("%d: len %v; want %v", i, lv, lw) + continue + } + for j, fe := range tt.out { + const msg = "%d:%d: value %s=%v; want %v" + if fe.L != ct[j].L { + t.Errorf(msg, i, j, "l", ct[j].L, fe.L) + } + if fe.H != ct[j].H { + t.Errorf(msg, i, j, "h", ct[j].H, fe.H) + } + if fe.N != ct[j].N { + t.Errorf(msg, i, j, "n", ct[j].N, fe.N) + } + if fe.I != ct[j].I { + t.Errorf(msg, i, j, "i", ct[j].I, fe.I) + } + } + } +} + +func TestLookupContraction(t *testing.T) { + for i, tt := range genStateTests { + input := []string{} + for _, e := range tt.in { + input = append(input, e.str) + } + cts := colltab.ContractTrieSet{} + h, _ := appendTrie(&cts, input) + for j, si := range tt.in { + str := si.str + for _, s := range []string{str, str + "X"} { + msg := "%d:%d: %s(%s) %v; want %v" + idx, sn := lookup(&cts, h, []byte(s)) + if idx != si.index { + t.Errorf(msg, i, j, "index", s, idx, si.index) + } + if sn != len(str) { + t.Errorf(msg, i, j, "sn", s, sn, len(str)) + } + } + } + } +} + +func TestPrintContractionTrieSet(t *testing.T) { + testdata := colltab.ContractTrieSet(genStateTests[4].out) + buf := &bytes.Buffer{} + print(&testdata, buf, "test") + if contractTrieOutput != buf.String() { + t.Errorf("output differs; found\n%s", buf.String()) + println(string(buf.Bytes())) + } +} + +const contractTrieOutput = `// testCTEntries: 8 entries, 32 bytes +var testCTEntries = [8]struct{L,H,N,I uint8}{ + {0x62, 0x3, 1, 255}, + {0x61, 0x0, 1, 255}, + {0x62, 0x0, 1, 6}, + {0x63, 0x0, 1, 4}, + {0x64, 0x64, 0, 1}, + {0x63, 0x0, 1, 7}, + {0x64, 0x0, 1, 5}, + {0x65, 0x66, 0, 2}, +} +var testContractTrieSet = colltab.ContractTrieSet( testCTEntries[:] ) +` diff --git a/vendor/golang.org/x/text/collate/build/order.go b/vendor/golang.org/x/text/collate/build/order.go new file mode 100644 index 000000000..2c568dbba --- /dev/null +++ b/vendor/golang.org/x/text/collate/build/order.go @@ -0,0 +1,393 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package build + +import ( + "fmt" + "log" + "sort" + "strings" + "unicode" + + "golang.org/x/text/internal/colltab" + "golang.org/x/text/unicode/norm" +) + +type logicalAnchor int + +const ( + firstAnchor logicalAnchor = -1 + noAnchor = 0 + lastAnchor = 1 +) + +// entry is used to keep track of a single entry in the collation element table +// during building. Examples of entries can be found in the Default Unicode +// Collation Element Table. +// See http://www.unicode.org/Public/UCA/6.0.0/allkeys.txt. +type entry struct { + str string // same as string(runes) + runes []rune + elems []rawCE // the collation elements + extend string // weights of extend to be appended to elems + before bool // weights relative to next instead of previous. + lock bool // entry is used in extension and can no longer be moved. + + // prev, next, and level are used to keep track of tailorings. + prev, next *entry + level colltab.Level // next differs at this level + skipRemove bool // do not unlink when removed + + decompose bool // can use NFKD decomposition to generate elems + exclude bool // do not include in table + implicit bool // derived, is not included in the list + modified bool // entry was modified in tailoring + logical logicalAnchor + + expansionIndex int // used to store index into expansion table + contractionHandle ctHandle + contractionIndex int // index into contraction elements +} + +func (e *entry) String() string { + return fmt.Sprintf("%X (%q) -> %X (ch:%x; ci:%d, ei:%d)", + e.runes, e.str, e.elems, e.contractionHandle, e.contractionIndex, e.expansionIndex) +} + +func (e *entry) skip() bool { + return e.contraction() +} + +func (e *entry) expansion() bool { + return !e.decompose && len(e.elems) > 1 +} + +func (e *entry) contraction() bool { + return len(e.runes) > 1 +} + +func (e *entry) contractionStarter() bool { + return e.contractionHandle.n != 0 +} + +// nextIndexed gets the next entry that needs to be stored in the table. +// It returns the entry and the collation level at which the next entry differs +// from the current entry. +// Entries that can be explicitly derived and logical reset positions are +// examples of entries that will not be indexed. +func (e *entry) nextIndexed() (*entry, colltab.Level) { + level := e.level + for e = e.next; e != nil && (e.exclude || len(e.elems) == 0); e = e.next { + if e.level < level { + level = e.level + } + } + return e, level +} + +// remove unlinks entry e from the sorted chain and clears the collation +// elements. e may not be at the front or end of the list. This should always +// be the case, as the front and end of the list are always logical anchors, +// which may not be removed. +func (e *entry) remove() { + if e.logical != noAnchor { + log.Fatalf("may not remove anchor %q", e.str) + } + // TODO: need to set e.prev.level to e.level if e.level is smaller? + e.elems = nil + if !e.skipRemove { + if e.prev != nil { + e.prev.next = e.next + } + if e.next != nil { + e.next.prev = e.prev + } + } + e.skipRemove = false +} + +// insertAfter inserts n after e. +func (e *entry) insertAfter(n *entry) { + if e == n { + panic("e == anchor") + } + if e == nil { + panic("unexpected nil anchor") + } + n.remove() + n.decompose = false // redo decomposition test + + n.next = e.next + n.prev = e + if e.next != nil { + e.next.prev = n + } + e.next = n +} + +// insertBefore inserts n before e. +func (e *entry) insertBefore(n *entry) { + if e == n { + panic("e == anchor") + } + if e == nil { + panic("unexpected nil anchor") + } + n.remove() + n.decompose = false // redo decomposition test + + n.prev = e.prev + n.next = e + if e.prev != nil { + e.prev.next = n + } + e.prev = n +} + +func (e *entry) encodeBase() (ce uint32, err error) { + switch { + case e.expansion(): + ce, err = makeExpandIndex(e.expansionIndex) + default: + if e.decompose { + log.Fatal("decompose should be handled elsewhere") + } + ce, err = makeCE(e.elems[0]) + } + return +} + +func (e *entry) encode() (ce uint32, err error) { + if e.skip() { + log.Fatal("cannot build colElem for entry that should be skipped") + } + switch { + case e.decompose: + t1 := e.elems[0].w[2] + t2 := 0 + if len(e.elems) > 1 { + t2 = e.elems[1].w[2] + } + ce, err = makeDecompose(t1, t2) + case e.contractionStarter(): + ce, err = makeContractIndex(e.contractionHandle, e.contractionIndex) + default: + if len(e.runes) > 1 { + log.Fatal("colElem: contractions are handled in contraction trie") + } + ce, err = e.encodeBase() + } + return +} + +// entryLess returns true if a sorts before b and false otherwise. +func entryLess(a, b *entry) bool { + if res, _ := compareWeights(a.elems, b.elems); res != 0 { + return res == -1 + } + if a.logical != noAnchor { + return a.logical == firstAnchor + } + if b.logical != noAnchor { + return b.logical == lastAnchor + } + return a.str < b.str +} + +type sortedEntries []*entry + +func (s sortedEntries) Len() int { + return len(s) +} + +func (s sortedEntries) Swap(i, j int) { + s[i], s[j] = s[j], s[i] +} + +func (s sortedEntries) Less(i, j int) bool { + return entryLess(s[i], s[j]) +} + +type ordering struct { + id string + entryMap map[string]*entry + ordered []*entry + handle *trieHandle +} + +// insert inserts e into both entryMap and ordered. +// Note that insert simply appends e to ordered. To reattain a sorted +// order, o.sort() should be called. +func (o *ordering) insert(e *entry) { + if e.logical == noAnchor { + o.entryMap[e.str] = e + } else { + // Use key format as used in UCA rules. + o.entryMap[fmt.Sprintf("[%s]", e.str)] = e + // Also add index entry for XML format. + o.entryMap[fmt.Sprintf("<%s/>", strings.Replace(e.str, " ", "_", -1))] = e + } + o.ordered = append(o.ordered, e) +} + +// newEntry creates a new entry for the given info and inserts it into +// the index. +func (o *ordering) newEntry(s string, ces []rawCE) *entry { + e := &entry{ + runes: []rune(s), + elems: ces, + str: s, + } + o.insert(e) + return e +} + +// find looks up and returns the entry for the given string. +// It returns nil if str is not in the index and if an implicit value +// cannot be derived, that is, if str represents more than one rune. +func (o *ordering) find(str string) *entry { + e := o.entryMap[str] + if e == nil { + r := []rune(str) + if len(r) == 1 { + const ( + firstHangul = 0xAC00 + lastHangul = 0xD7A3 + ) + if r[0] >= firstHangul && r[0] <= lastHangul { + ce := []rawCE{} + nfd := norm.NFD.String(str) + for _, r := range nfd { + ce = append(ce, o.find(string(r)).elems...) + } + e = o.newEntry(nfd, ce) + } else { + e = o.newEntry(string(r[0]), []rawCE{ + {w: []int{ + implicitPrimary(r[0]), + defaultSecondary, + defaultTertiary, + int(r[0]), + }, + }, + }) + e.modified = true + } + e.exclude = true // do not index implicits + } + } + return e +} + +// makeRootOrdering returns a newly initialized ordering value and populates +// it with a set of logical reset points that can be used as anchors. +// The anchors first_tertiary_ignorable and __END__ will always sort at +// the beginning and end, respectively. This means that prev and next are non-nil +// for any indexed entry. +func makeRootOrdering() ordering { + const max = unicode.MaxRune + o := ordering{ + entryMap: make(map[string]*entry), + } + insert := func(typ logicalAnchor, s string, ce []int) { + e := &entry{ + elems: []rawCE{{w: ce}}, + str: s, + exclude: true, + logical: typ, + } + o.insert(e) + } + insert(firstAnchor, "first tertiary ignorable", []int{0, 0, 0, 0}) + insert(lastAnchor, "last tertiary ignorable", []int{0, 0, 0, max}) + insert(lastAnchor, "last primary ignorable", []int{0, defaultSecondary, defaultTertiary, max}) + insert(lastAnchor, "last non ignorable", []int{maxPrimary, defaultSecondary, defaultTertiary, max}) + insert(lastAnchor, "__END__", []int{1 << maxPrimaryBits, defaultSecondary, defaultTertiary, max}) + return o +} + +// patchForInsert eleminates entries from the list with more than one collation element. +// The next and prev fields of the eliminated entries still point to appropriate +// values in the newly created list. +// It requires that sort has been called. +func (o *ordering) patchForInsert() { + for i := 0; i < len(o.ordered)-1; { + e := o.ordered[i] + lev := e.level + n := e.next + for ; n != nil && len(n.elems) > 1; n = n.next { + if n.level < lev { + lev = n.level + } + n.skipRemove = true + } + for ; o.ordered[i] != n; i++ { + o.ordered[i].level = lev + o.ordered[i].next = n + o.ordered[i+1].prev = e + } + } +} + +// clone copies all ordering of es into a new ordering value. +func (o *ordering) clone() *ordering { + o.sort() + oo := ordering{ + entryMap: make(map[string]*entry), + } + for _, e := range o.ordered { + ne := &entry{ + runes: e.runes, + elems: e.elems, + str: e.str, + decompose: e.decompose, + exclude: e.exclude, + logical: e.logical, + } + oo.insert(ne) + } + oo.sort() // link all ordering. + oo.patchForInsert() + return &oo +} + +// front returns the first entry to be indexed. +// It assumes that sort() has been called. +func (o *ordering) front() *entry { + e := o.ordered[0] + if e.prev != nil { + log.Panicf("unexpected first entry: %v", e) + } + // The first entry is always a logical position, which should not be indexed. + e, _ = e.nextIndexed() + return e +} + +// sort sorts all ordering based on their collation elements and initializes +// the prev, next, and level fields accordingly. +func (o *ordering) sort() { + sort.Sort(sortedEntries(o.ordered)) + l := o.ordered + for i := 1; i < len(l); i++ { + k := i - 1 + l[k].next = l[i] + _, l[k].level = compareWeights(l[k].elems, l[i].elems) + l[i].prev = l[k] + } +} + +// genColElems generates a collation element array from the runes in str. This +// assumes that all collation elements have already been added to the Builder. +func (o *ordering) genColElems(str string) []rawCE { + elems := []rawCE{} + for _, r := range []rune(str) { + for _, ce := range o.find(string(r)).elems { + if ce.w[0] != 0 || ce.w[1] != 0 || ce.w[2] != 0 { + elems = append(elems, ce) + } + } + } + return elems +} diff --git a/vendor/golang.org/x/text/collate/build/order_test.go b/vendor/golang.org/x/text/collate/build/order_test.go new file mode 100644 index 000000000..0e174bfbd --- /dev/null +++ b/vendor/golang.org/x/text/collate/build/order_test.go @@ -0,0 +1,229 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package build + +import ( + "strconv" + "testing" + + "golang.org/x/text/internal/colltab" +) + +type entryTest struct { + f func(in []int) (uint32, error) + arg []int + val uint32 +} + +// makeList returns a list of entries of length n+2, with n normal +// entries plus a leading and trailing anchor. +func makeList(n int) []*entry { + es := make([]*entry, n+2) + weights := []rawCE{{w: []int{100, 20, 5, 0}}} + for i := range es { + runes := []rune{rune(i)} + es[i] = &entry{ + runes: runes, + elems: weights, + } + weights = nextWeight(colltab.Primary, weights) + } + for i := 1; i < len(es); i++ { + es[i-1].next = es[i] + es[i].prev = es[i-1] + _, es[i-1].level = compareWeights(es[i-1].elems, es[i].elems) + } + es[0].exclude = true + es[0].logical = firstAnchor + es[len(es)-1].exclude = true + es[len(es)-1].logical = lastAnchor + return es +} + +func TestNextIndexed(t *testing.T) { + const n = 5 + es := makeList(n) + for i := int64(0); i < 1<<n; i++ { + mask := strconv.FormatInt(i+(1<<n), 2) + for i, c := range mask { + es[i].exclude = c == '1' + } + e := es[0] + for i, c := range mask { + if c == '0' { + e, _ = e.nextIndexed() + if e != es[i] { + t.Errorf("%d: expected entry %d; found %d", i, es[i].elems, e.elems) + } + } + } + if e, _ = e.nextIndexed(); e != nil { + t.Errorf("%d: expected nil entry; found %d", i, e.elems) + } + } +} + +func TestRemove(t *testing.T) { + const n = 5 + for i := int64(0); i < 1<<n; i++ { + es := makeList(n) + mask := strconv.FormatInt(i+(1<<n), 2) + for i, c := range mask { + if c == '0' { + es[i].remove() + } + } + e := es[0] + for i, c := range mask { + if c == '1' { + if e != es[i] { + t.Errorf("%d: expected entry %d; found %d", i, es[i].elems, e.elems) + } + e, _ = e.nextIndexed() + } + } + if e != nil { + t.Errorf("%d: expected nil entry; found %d", i, e.elems) + } + } +} + +// nextPerm generates the next permutation of the array. The starting +// permutation is assumed to be a list of integers sorted in increasing order. +// It returns false if there are no more permuations left. +func nextPerm(a []int) bool { + i := len(a) - 2 + for ; i >= 0; i-- { + if a[i] < a[i+1] { + break + } + } + if i < 0 { + return false + } + for j := len(a) - 1; j >= i; j-- { + if a[j] > a[i] { + a[i], a[j] = a[j], a[i] + break + } + } + for j := i + 1; j < (len(a)+i+1)/2; j++ { + a[j], a[len(a)+i-j] = a[len(a)+i-j], a[j] + } + return true +} + +func TestInsertAfter(t *testing.T) { + const n = 5 + orig := makeList(n) + perm := make([]int, n) + for i := range perm { + perm[i] = i + 1 + } + for ok := true; ok; ok = nextPerm(perm) { + es := makeList(n) + last := es[0] + for _, i := range perm { + last.insertAfter(es[i]) + last = es[i] + } + for _, e := range es { + e.elems = es[0].elems + } + e := es[0] + for _, i := range perm { + e, _ = e.nextIndexed() + if e.runes[0] != orig[i].runes[0] { + t.Errorf("%d:%d: expected entry %X; found %X", perm, i, orig[i].runes, e.runes) + break + } + } + } +} + +func TestInsertBefore(t *testing.T) { + const n = 5 + orig := makeList(n) + perm := make([]int, n) + for i := range perm { + perm[i] = i + 1 + } + for ok := true; ok; ok = nextPerm(perm) { + es := makeList(n) + last := es[len(es)-1] + for _, i := range perm { + last.insertBefore(es[i]) + last = es[i] + } + for _, e := range es { + e.elems = es[0].elems + } + e := es[0] + for i := n - 1; i >= 0; i-- { + e, _ = e.nextIndexed() + if e.runes[0] != rune(perm[i]) { + t.Errorf("%d:%d: expected entry %X; found %X", perm, i, orig[i].runes, e.runes) + break + } + } + } +} + +type entryLessTest struct { + a, b *entry + res bool +} + +var ( + w1 = []rawCE{{w: []int{100, 20, 5, 5}}} + w2 = []rawCE{{w: []int{101, 20, 5, 5}}} +) + +var entryLessTests = []entryLessTest{ + {&entry{str: "a", elems: w1}, + &entry{str: "a", elems: w1}, + false, + }, + {&entry{str: "a", elems: w1}, + &entry{str: "a", elems: w2}, + true, + }, + {&entry{str: "a", elems: w1}, + &entry{str: "b", elems: w1}, + true, + }, + {&entry{str: "a", elems: w2}, + &entry{str: "a", elems: w1}, + false, + }, + {&entry{str: "c", elems: w1}, + &entry{str: "b", elems: w1}, + false, + }, + {&entry{str: "a", elems: w1, logical: firstAnchor}, + &entry{str: "a", elems: w1}, + true, + }, + {&entry{str: "a", elems: w1}, + &entry{str: "b", elems: w1, logical: firstAnchor}, + false, + }, + {&entry{str: "b", elems: w1}, + &entry{str: "a", elems: w1, logical: lastAnchor}, + true, + }, + {&entry{str: "a", elems: w1, logical: lastAnchor}, + &entry{str: "c", elems: w1}, + false, + }, +} + +func TestEntryLess(t *testing.T) { + for i, tt := range entryLessTests { + if res := entryLess(tt.a, tt.b); res != tt.res { + t.Errorf("%d: was %v; want %v", i, res, tt.res) + } + } +} diff --git a/vendor/golang.org/x/text/collate/build/table.go b/vendor/golang.org/x/text/collate/build/table.go new file mode 100644 index 000000000..7eea7a63f --- /dev/null +++ b/vendor/golang.org/x/text/collate/build/table.go @@ -0,0 +1,81 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package build + +import ( + "fmt" + "io" + "reflect" + + "golang.org/x/text/internal/colltab" +) + +// table is an intermediate structure that roughly resembles the table in collate. +type table struct { + colltab.Table + trie trie + root *trieHandle +} + +// print writes the table as Go compilable code to w. It prefixes the +// variable names with name. It returns the number of bytes written +// and the size of the resulting table. +func (t *table) fprint(w io.Writer, name string) (n, size int, err error) { + update := func(nn, sz int, e error) { + n += nn + if err == nil { + err = e + } + size += sz + } + // Write arrays needed for the structure. + update(printColElems(w, t.ExpandElem, name+"ExpandElem")) + update(printColElems(w, t.ContractElem, name+"ContractElem")) + update(t.trie.printArrays(w, name)) + update(printArray(t.ContractTries, w, name)) + + nn, e := fmt.Fprintf(w, "// Total size of %sTable is %d bytes\n", name, size) + update(nn, 0, e) + return +} + +func (t *table) fprintIndex(w io.Writer, h *trieHandle, id string) (n int, err error) { + p := func(f string, a ...interface{}) { + nn, e := fmt.Fprintf(w, f, a...) + n += nn + if err == nil { + err = e + } + } + p("\t{ // %s\n", id) + p("\t\tlookupOffset: 0x%x,\n", h.lookupStart) + p("\t\tvaluesOffset: 0x%x,\n", h.valueStart) + p("\t},\n") + return +} + +func printColElems(w io.Writer, a []uint32, name string) (n, sz int, err error) { + p := func(f string, a ...interface{}) { + nn, e := fmt.Fprintf(w, f, a...) + n += nn + if err == nil { + err = e + } + } + sz = len(a) * int(reflect.TypeOf(uint32(0)).Size()) + p("// %s: %d entries, %d bytes\n", name, len(a), sz) + p("var %s = [%d]uint32 {", name, len(a)) + for i, c := range a { + switch { + case i%64 == 0: + p("\n\t// Block %d, offset 0x%x\n", i/64, i) + case (i%64)%6 == 0: + p("\n\t") + } + p("0x%.8X, ", c) + } + p("\n}\n\n") + return +} diff --git a/vendor/golang.org/x/text/collate/build/trie.go b/vendor/golang.org/x/text/collate/build/trie.go new file mode 100644 index 000000000..9404a3465 --- /dev/null +++ b/vendor/golang.org/x/text/collate/build/trie.go @@ -0,0 +1,290 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// The trie in this file is used to associate the first full character +// in a UTF-8 string to a collation element. +// All but the last byte in a UTF-8 byte sequence are +// used to look up offsets in the index table to be used for the next byte. +// The last byte is used to index into a table of collation elements. +// This file contains the code for the generation of the trie. + +package build + +import ( + "fmt" + "hash/fnv" + "io" + "reflect" +) + +const ( + blockSize = 64 + blockOffset = 2 // Subtract 2 blocks to compensate for the 0x80 added to continuation bytes. +) + +type trieHandle struct { + lookupStart uint16 // offset in table for first byte + valueStart uint16 // offset in table for first byte +} + +type trie struct { + index []uint16 + values []uint32 +} + +// trieNode is the intermediate trie structure used for generating a trie. +type trieNode struct { + index []*trieNode + value []uint32 + b byte + refValue uint16 + refIndex uint16 +} + +func newNode() *trieNode { + return &trieNode{ + index: make([]*trieNode, 64), + value: make([]uint32, 128), // root node size is 128 instead of 64 + } +} + +func (n *trieNode) isInternal() bool { + return n.value != nil +} + +func (n *trieNode) insert(r rune, value uint32) { + const maskx = 0x3F // mask out two most-significant bits + str := string(r) + if len(str) == 1 { + n.value[str[0]] = value + return + } + for i := 0; i < len(str)-1; i++ { + b := str[i] & maskx + if n.index == nil { + n.index = make([]*trieNode, blockSize) + } + nn := n.index[b] + if nn == nil { + nn = &trieNode{} + nn.b = b + n.index[b] = nn + } + n = nn + } + if n.value == nil { + n.value = make([]uint32, blockSize) + } + b := str[len(str)-1] & maskx + n.value[b] = value +} + +type trieBuilder struct { + t *trie + + roots []*trieHandle + + lookupBlocks []*trieNode + valueBlocks []*trieNode + + lookupBlockIdx map[uint32]*trieNode + valueBlockIdx map[uint32]*trieNode +} + +func newTrieBuilder() *trieBuilder { + index := &trieBuilder{} + index.lookupBlocks = make([]*trieNode, 0) + index.valueBlocks = make([]*trieNode, 0) + index.lookupBlockIdx = make(map[uint32]*trieNode) + index.valueBlockIdx = make(map[uint32]*trieNode) + // The third nil is the default null block. The other two blocks + // are used to guarantee an offset of at least 3 for each block. + index.lookupBlocks = append(index.lookupBlocks, nil, nil, nil) + index.t = &trie{} + return index +} + +func (b *trieBuilder) computeOffsets(n *trieNode) *trieNode { + hasher := fnv.New32() + if n.index != nil { + for i, nn := range n.index { + var vi, vv uint16 + if nn != nil { + nn = b.computeOffsets(nn) + n.index[i] = nn + vi = nn.refIndex + vv = nn.refValue + } + hasher.Write([]byte{byte(vi >> 8), byte(vi)}) + hasher.Write([]byte{byte(vv >> 8), byte(vv)}) + } + h := hasher.Sum32() + nn, ok := b.lookupBlockIdx[h] + if !ok { + n.refIndex = uint16(len(b.lookupBlocks)) - blockOffset + b.lookupBlocks = append(b.lookupBlocks, n) + b.lookupBlockIdx[h] = n + } else { + n = nn + } + } else { + for _, v := range n.value { + hasher.Write([]byte{byte(v >> 24), byte(v >> 16), byte(v >> 8), byte(v)}) + } + h := hasher.Sum32() + nn, ok := b.valueBlockIdx[h] + if !ok { + n.refValue = uint16(len(b.valueBlocks)) - blockOffset + n.refIndex = n.refValue + b.valueBlocks = append(b.valueBlocks, n) + b.valueBlockIdx[h] = n + } else { + n = nn + } + } + return n +} + +func (b *trieBuilder) addStartValueBlock(n *trieNode) uint16 { + hasher := fnv.New32() + for _, v := range n.value[:2*blockSize] { + hasher.Write([]byte{byte(v >> 24), byte(v >> 16), byte(v >> 8), byte(v)}) + } + h := hasher.Sum32() + nn, ok := b.valueBlockIdx[h] + if !ok { + n.refValue = uint16(len(b.valueBlocks)) + n.refIndex = n.refValue + b.valueBlocks = append(b.valueBlocks, n) + // Add a dummy block to accommodate the double block size. + b.valueBlocks = append(b.valueBlocks, nil) + b.valueBlockIdx[h] = n + } else { + n = nn + } + return n.refValue +} + +func genValueBlock(t *trie, n *trieNode) { + if n != nil { + for _, v := range n.value { + t.values = append(t.values, v) + } + } +} + +func genLookupBlock(t *trie, n *trieNode) { + for _, nn := range n.index { + v := uint16(0) + if nn != nil { + if n.index != nil { + v = nn.refIndex + } else { + v = nn.refValue + } + } + t.index = append(t.index, v) + } +} + +func (b *trieBuilder) addTrie(n *trieNode) *trieHandle { + h := &trieHandle{} + b.roots = append(b.roots, h) + h.valueStart = b.addStartValueBlock(n) + if len(b.roots) == 1 { + // We insert a null block after the first start value block. + // This ensures that continuation bytes UTF-8 sequences of length + // greater than 2 will automatically hit a null block if there + // was an undefined entry. + b.valueBlocks = append(b.valueBlocks, nil) + } + n = b.computeOffsets(n) + // Offset by one extra block as the first byte starts at 0xC0 instead of 0x80. + h.lookupStart = n.refIndex - 1 + return h +} + +// generate generates and returns the trie for n. +func (b *trieBuilder) generate() (t *trie, err error) { + t = b.t + if len(b.valueBlocks) >= 1<<16 { + return nil, fmt.Errorf("maximum number of value blocks exceeded (%d > %d)", len(b.valueBlocks), 1<<16) + } + if len(b.lookupBlocks) >= 1<<16 { + return nil, fmt.Errorf("maximum number of lookup blocks exceeded (%d > %d)", len(b.lookupBlocks), 1<<16) + } + genValueBlock(t, b.valueBlocks[0]) + genValueBlock(t, &trieNode{value: make([]uint32, 64)}) + for i := 2; i < len(b.valueBlocks); i++ { + genValueBlock(t, b.valueBlocks[i]) + } + n := &trieNode{index: make([]*trieNode, 64)} + genLookupBlock(t, n) + genLookupBlock(t, n) + genLookupBlock(t, n) + for i := 3; i < len(b.lookupBlocks); i++ { + genLookupBlock(t, b.lookupBlocks[i]) + } + return b.t, nil +} + +func (t *trie) printArrays(w io.Writer, name string) (n, size int, err error) { + p := func(f string, a ...interface{}) { + nn, e := fmt.Fprintf(w, f, a...) + n += nn + if err == nil { + err = e + } + } + nv := len(t.values) + p("// %sValues: %d entries, %d bytes\n", name, nv, nv*4) + p("// Block 2 is the null block.\n") + p("var %sValues = [%d]uint32 {", name, nv) + var printnewline bool + for i, v := range t.values { + if i%blockSize == 0 { + p("\n\t// Block %#x, offset %#x", i/blockSize, i) + } + if i%4 == 0 { + printnewline = true + } + if v != 0 { + if printnewline { + p("\n\t") + printnewline = false + } + p("%#04x:%#08x, ", i, v) + } + } + p("\n}\n\n") + ni := len(t.index) + p("// %sLookup: %d entries, %d bytes\n", name, ni, ni*2) + p("// Block 0 is the null block.\n") + p("var %sLookup = [%d]uint16 {", name, ni) + printnewline = false + for i, v := range t.index { + if i%blockSize == 0 { + p("\n\t// Block %#x, offset %#x", i/blockSize, i) + } + if i%8 == 0 { + printnewline = true + } + if v != 0 { + if printnewline { + p("\n\t") + printnewline = false + } + p("%#03x:%#02x, ", i, v) + } + } + p("\n}\n\n") + return n, nv*4 + ni*2, err +} + +func (t *trie) printStruct(w io.Writer, handle *trieHandle, name string) (n, sz int, err error) { + const msg = "trie{ %sLookup[%d:], %sValues[%d:], %sLookup[:], %sValues[:]}" + n, err = fmt.Fprintf(w, msg, name, handle.lookupStart*blockSize, name, handle.valueStart*blockSize, name, name) + sz += int(reflect.TypeOf(trie{}).Size()) + return +} diff --git a/vendor/golang.org/x/text/collate/build/trie_test.go b/vendor/golang.org/x/text/collate/build/trie_test.go new file mode 100644 index 000000000..4d4f6e4d1 --- /dev/null +++ b/vendor/golang.org/x/text/collate/build/trie_test.go @@ -0,0 +1,107 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package build + +import ( + "bytes" + "fmt" + "testing" +) + +// We take the smallest, largest and an arbitrary value for each +// of the UTF-8 sequence lengths. +var testRunes = []rune{ + 0x01, 0x0C, 0x7F, // 1-byte sequences + 0x80, 0x100, 0x7FF, // 2-byte sequences + 0x800, 0x999, 0xFFFF, // 3-byte sequences + 0x10000, 0x10101, 0x10FFFF, // 4-byte sequences + 0x200, 0x201, 0x202, 0x210, 0x215, // five entries in one sparse block +} + +func makeTestTrie(t *testing.T) trie { + n := newNode() + for i, r := range testRunes { + n.insert(r, uint32(i)) + } + idx := newTrieBuilder() + idx.addTrie(n) + tr, err := idx.generate() + if err != nil { + t.Errorf(err.Error()) + } + return *tr +} + +func TestGenerateTrie(t *testing.T) { + testdata := makeTestTrie(t) + buf := &bytes.Buffer{} + testdata.printArrays(buf, "test") + fmt.Fprintf(buf, "var testTrie = ") + testdata.printStruct(buf, &trieHandle{19, 0}, "test") + if output != buf.String() { + t.Error("output differs") + } +} + +var output = `// testValues: 832 entries, 3328 bytes +// Block 2 is the null block. +var testValues = [832]uint32 { + // Block 0x0, offset 0x0 + 0x000c:0x00000001, + // Block 0x1, offset 0x40 + 0x007f:0x00000002, + // Block 0x2, offset 0x80 + // Block 0x3, offset 0xc0 + 0x00c0:0x00000003, + // Block 0x4, offset 0x100 + 0x0100:0x00000004, + // Block 0x5, offset 0x140 + 0x0140:0x0000000c, 0x0141:0x0000000d, 0x0142:0x0000000e, + 0x0150:0x0000000f, + 0x0155:0x00000010, + // Block 0x6, offset 0x180 + 0x01bf:0x00000005, + // Block 0x7, offset 0x1c0 + 0x01c0:0x00000006, + // Block 0x8, offset 0x200 + 0x0219:0x00000007, + // Block 0x9, offset 0x240 + 0x027f:0x00000008, + // Block 0xa, offset 0x280 + 0x0280:0x00000009, + // Block 0xb, offset 0x2c0 + 0x02c1:0x0000000a, + // Block 0xc, offset 0x300 + 0x033f:0x0000000b, +} + +// testLookup: 640 entries, 1280 bytes +// Block 0 is the null block. +var testLookup = [640]uint16 { + // Block 0x0, offset 0x0 + // Block 0x1, offset 0x40 + // Block 0x2, offset 0x80 + // Block 0x3, offset 0xc0 + 0x0e0:0x05, 0x0e6:0x06, + // Block 0x4, offset 0x100 + 0x13f:0x07, + // Block 0x5, offset 0x140 + 0x140:0x08, 0x144:0x09, + // Block 0x6, offset 0x180 + 0x190:0x03, + // Block 0x7, offset 0x1c0 + 0x1ff:0x0a, + // Block 0x8, offset 0x200 + 0x20f:0x05, + // Block 0x9, offset 0x240 + 0x242:0x01, 0x244:0x02, + 0x248:0x03, + 0x25f:0x04, + 0x260:0x01, + 0x26f:0x02, + 0x270:0x04, 0x274:0x06, +} + +var testTrie = trie{ testLookup[1216:], testValues[0:], testLookup[:], testValues[:]}` diff --git a/vendor/golang.org/x/text/collate/collate.go b/vendor/golang.org/x/text/collate/collate.go new file mode 100644 index 000000000..2ce968907 --- /dev/null +++ b/vendor/golang.org/x/text/collate/collate.go @@ -0,0 +1,403 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// TODO: remove hard-coded versions when we have implemented fractional weights. +// The current implementation is incompatible with later CLDR versions. +//go:generate go run maketables.go -cldr=23 -unicode=6.2.0 + +// Package collate contains types for comparing and sorting Unicode strings +// according to a given collation order. +package collate // import "golang.org/x/text/collate" + +import ( + "bytes" + "strings" + + "golang.org/x/text/internal/colltab" + "golang.org/x/text/language" +) + +// Collator provides functionality for comparing strings for a given +// collation order. +type Collator struct { + options + + sorter sorter + + _iter [2]iter +} + +func (c *Collator) iter(i int) *iter { + // TODO: evaluate performance for making the second iterator optional. + return &c._iter[i] +} + +// Supported returns the list of languages for which collating differs from its parent. +func Supported() []language.Tag { + // TODO: use language.Coverage instead. + + t := make([]language.Tag, len(tags)) + copy(t, tags) + return t +} + +func init() { + ids := strings.Split(availableLocales, ",") + tags = make([]language.Tag, len(ids)) + for i, s := range ids { + tags[i] = language.Raw.MustParse(s) + } +} + +var tags []language.Tag + +// New returns a new Collator initialized for the given locale. +func New(t language.Tag, o ...Option) *Collator { + index := colltab.MatchLang(t, tags) + c := newCollator(getTable(locales[index])) + + // Set options from the user-supplied tag. + c.setFromTag(t) + + // Set the user-supplied options. + c.setOptions(o) + + c.init() + return c +} + +// NewFromTable returns a new Collator for the given Weighter. +func NewFromTable(w colltab.Weighter, o ...Option) *Collator { + c := newCollator(w) + c.setOptions(o) + c.init() + return c +} + +func (c *Collator) init() { + if c.numeric { + c.t = colltab.NewNumericWeighter(c.t) + } + c._iter[0].init(c) + c._iter[1].init(c) +} + +// Buffer holds keys generated by Key and KeyString. +type Buffer struct { + buf [4096]byte + key []byte +} + +func (b *Buffer) init() { + if b.key == nil { + b.key = b.buf[:0] + } +} + +// Reset clears the buffer from previous results generated by Key and KeyString. +func (b *Buffer) Reset() { + b.key = b.key[:0] +} + +// Compare returns an integer comparing the two byte slices. +// The result will be 0 if a==b, -1 if a < b, and +1 if a > b. +func (c *Collator) Compare(a, b []byte) int { + // TODO: skip identical prefixes once we have a fast way to detect if a rune is + // part of a contraction. This would lead to roughly a 10% speedup for the colcmp regtest. + c.iter(0).SetInput(a) + c.iter(1).SetInput(b) + if res := c.compare(); res != 0 { + return res + } + if !c.ignore[colltab.Identity] { + return bytes.Compare(a, b) + } + return 0 +} + +// CompareString returns an integer comparing the two strings. +// The result will be 0 if a==b, -1 if a < b, and +1 if a > b. +func (c *Collator) CompareString(a, b string) int { + // TODO: skip identical prefixes once we have a fast way to detect if a rune is + // part of a contraction. This would lead to roughly a 10% speedup for the colcmp regtest. + c.iter(0).SetInputString(a) + c.iter(1).SetInputString(b) + if res := c.compare(); res != 0 { + return res + } + if !c.ignore[colltab.Identity] { + if a < b { + return -1 + } else if a > b { + return 1 + } + } + return 0 +} + +func compareLevel(f func(i *iter) int, a, b *iter) int { + a.pce = 0 + b.pce = 0 + for { + va := f(a) + vb := f(b) + if va != vb { + if va < vb { + return -1 + } + return 1 + } else if va == 0 { + break + } + } + return 0 +} + +func (c *Collator) compare() int { + ia, ib := c.iter(0), c.iter(1) + // Process primary level + if c.alternate != altShifted { + // TODO: implement script reordering + if res := compareLevel((*iter).nextPrimary, ia, ib); res != 0 { + return res + } + } else { + // TODO: handle shifted + } + if !c.ignore[colltab.Secondary] { + f := (*iter).nextSecondary + if c.backwards { + f = (*iter).prevSecondary + } + if res := compareLevel(f, ia, ib); res != 0 { + return res + } + } + // TODO: special case handling (Danish?) + if !c.ignore[colltab.Tertiary] || c.caseLevel { + if res := compareLevel((*iter).nextTertiary, ia, ib); res != 0 { + return res + } + if !c.ignore[colltab.Quaternary] { + if res := compareLevel((*iter).nextQuaternary, ia, ib); res != 0 { + return res + } + } + } + return 0 +} + +// Key returns the collation key for str. +// Passing the buffer buf may avoid memory allocations. +// The returned slice will point to an allocation in Buffer and will remain +// valid until the next call to buf.Reset(). +func (c *Collator) Key(buf *Buffer, str []byte) []byte { + // See http://www.unicode.org/reports/tr10/#Main_Algorithm for more details. + buf.init() + return c.key(buf, c.getColElems(str)) +} + +// KeyFromString returns the collation key for str. +// Passing the buffer buf may avoid memory allocations. +// The returned slice will point to an allocation in Buffer and will retain +// valid until the next call to buf.ResetKeys(). +func (c *Collator) KeyFromString(buf *Buffer, str string) []byte { + // See http://www.unicode.org/reports/tr10/#Main_Algorithm for more details. + buf.init() + return c.key(buf, c.getColElemsString(str)) +} + +func (c *Collator) key(buf *Buffer, w []colltab.Elem) []byte { + processWeights(c.alternate, c.t.Top(), w) + kn := len(buf.key) + c.keyFromElems(buf, w) + return buf.key[kn:] +} + +func (c *Collator) getColElems(str []byte) []colltab.Elem { + i := c.iter(0) + i.SetInput(str) + for i.Next() { + } + return i.Elems +} + +func (c *Collator) getColElemsString(str string) []colltab.Elem { + i := c.iter(0) + i.SetInputString(str) + for i.Next() { + } + return i.Elems +} + +type iter struct { + wa [512]colltab.Elem + + colltab.Iter + pce int +} + +func (i *iter) init(c *Collator) { + i.Weighter = c.t + i.Elems = i.wa[:0] +} + +func (i *iter) nextPrimary() int { + for { + for ; i.pce < i.N; i.pce++ { + if v := i.Elems[i.pce].Primary(); v != 0 { + i.pce++ + return v + } + } + if !i.Next() { + return 0 + } + } + panic("should not reach here") +} + +func (i *iter) nextSecondary() int { + for ; i.pce < len(i.Elems); i.pce++ { + if v := i.Elems[i.pce].Secondary(); v != 0 { + i.pce++ + return v + } + } + return 0 +} + +func (i *iter) prevSecondary() int { + for ; i.pce < len(i.Elems); i.pce++ { + if v := i.Elems[len(i.Elems)-i.pce-1].Secondary(); v != 0 { + i.pce++ + return v + } + } + return 0 +} + +func (i *iter) nextTertiary() int { + for ; i.pce < len(i.Elems); i.pce++ { + if v := i.Elems[i.pce].Tertiary(); v != 0 { + i.pce++ + return int(v) + } + } + return 0 +} + +func (i *iter) nextQuaternary() int { + for ; i.pce < len(i.Elems); i.pce++ { + if v := i.Elems[i.pce].Quaternary(); v != 0 { + i.pce++ + return v + } + } + return 0 +} + +func appendPrimary(key []byte, p int) []byte { + // Convert to variable length encoding; supports up to 23 bits. + if p <= 0x7FFF { + key = append(key, uint8(p>>8), uint8(p)) + } else { + key = append(key, uint8(p>>16)|0x80, uint8(p>>8), uint8(p)) + } + return key +} + +// keyFromElems converts the weights ws to a compact sequence of bytes. +// The result will be appended to the byte buffer in buf. +func (c *Collator) keyFromElems(buf *Buffer, ws []colltab.Elem) { + for _, v := range ws { + if w := v.Primary(); w > 0 { + buf.key = appendPrimary(buf.key, w) + } + } + if !c.ignore[colltab.Secondary] { + buf.key = append(buf.key, 0, 0) + // TODO: we can use one 0 if we can guarantee that all non-zero weights are > 0xFF. + if !c.backwards { + for _, v := range ws { + if w := v.Secondary(); w > 0 { + buf.key = append(buf.key, uint8(w>>8), uint8(w)) + } + } + } else { + for i := len(ws) - 1; i >= 0; i-- { + if w := ws[i].Secondary(); w > 0 { + buf.key = append(buf.key, uint8(w>>8), uint8(w)) + } + } + } + } else if c.caseLevel { + buf.key = append(buf.key, 0, 0) + } + if !c.ignore[colltab.Tertiary] || c.caseLevel { + buf.key = append(buf.key, 0, 0) + for _, v := range ws { + if w := v.Tertiary(); w > 0 { + buf.key = append(buf.key, uint8(w)) + } + } + // Derive the quaternary weights from the options and other levels. + // Note that we represent MaxQuaternary as 0xFF. The first byte of the + // representation of a primary weight is always smaller than 0xFF, + // so using this single byte value will compare correctly. + if !c.ignore[colltab.Quaternary] && c.alternate >= altShifted { + if c.alternate == altShiftTrimmed { + lastNonFFFF := len(buf.key) + buf.key = append(buf.key, 0) + for _, v := range ws { + if w := v.Quaternary(); w == colltab.MaxQuaternary { + buf.key = append(buf.key, 0xFF) + } else if w > 0 { + buf.key = appendPrimary(buf.key, w) + lastNonFFFF = len(buf.key) + } + } + buf.key = buf.key[:lastNonFFFF] + } else { + buf.key = append(buf.key, 0) + for _, v := range ws { + if w := v.Quaternary(); w == colltab.MaxQuaternary { + buf.key = append(buf.key, 0xFF) + } else if w > 0 { + buf.key = appendPrimary(buf.key, w) + } + } + } + } + } +} + +func processWeights(vw alternateHandling, top uint32, wa []colltab.Elem) { + ignore := false + vtop := int(top) + switch vw { + case altShifted, altShiftTrimmed: + for i := range wa { + if p := wa[i].Primary(); p <= vtop && p != 0 { + wa[i] = colltab.MakeQuaternary(p) + ignore = true + } else if p == 0 { + if ignore { + wa[i] = colltab.Ignore + } + } else { + ignore = false + } + } + case altBlanked: + for i := range wa { + if p := wa[i].Primary(); p <= vtop && (ignore || p != 0) { + wa[i] = colltab.Ignore + ignore = true + } else { + ignore = false + } + } + } +} diff --git a/vendor/golang.org/x/text/collate/collate_test.go b/vendor/golang.org/x/text/collate/collate_test.go new file mode 100644 index 000000000..0e78b96fa --- /dev/null +++ b/vendor/golang.org/x/text/collate/collate_test.go @@ -0,0 +1,482 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package collate + +import ( + "bytes" + "testing" + + "golang.org/x/text/internal/colltab" + "golang.org/x/text/language" +) + +type weightsTest struct { + opt opts + in, out ColElems +} + +type opts struct { + lev int + alt alternateHandling + top int + + backwards bool + caseLevel bool +} + +// ignore returns an initialized boolean array based on the given Level. +// A negative value means using the default setting of quaternary. +func ignore(level colltab.Level) (ignore [colltab.NumLevels]bool) { + if level < 0 { + level = colltab.Quaternary + } + for i := range ignore { + ignore[i] = level < colltab.Level(i) + } + return ignore +} + +func makeCE(w []int) colltab.Elem { + ce, err := colltab.MakeElem(w[0], w[1], w[2], uint8(w[3])) + if err != nil { + panic(err) + } + return ce +} + +func (o opts) collator() *Collator { + c := &Collator{ + options: options{ + ignore: ignore(colltab.Level(o.lev - 1)), + alternate: o.alt, + backwards: o.backwards, + caseLevel: o.caseLevel, + variableTop: uint32(o.top), + }, + } + return c +} + +const ( + maxQ = 0x1FFFFF +) + +func wpq(p, q int) Weights { + return W(p, defaults.Secondary, defaults.Tertiary, q) +} + +func wsq(s, q int) Weights { + return W(0, s, defaults.Tertiary, q) +} + +func wq(q int) Weights { + return W(0, 0, 0, q) +} + +var zero = W(0, 0, 0, 0) + +var processTests = []weightsTest{ + // Shifted + { // simple sequence of non-variables + opt: opts{alt: altShifted, top: 100}, + in: ColElems{W(200), W(300), W(400)}, + out: ColElems{wpq(200, maxQ), wpq(300, maxQ), wpq(400, maxQ)}, + }, + { // first is a variable + opt: opts{alt: altShifted, top: 250}, + in: ColElems{W(200), W(300), W(400)}, + out: ColElems{wq(200), wpq(300, maxQ), wpq(400, maxQ)}, + }, + { // all but first are variable + opt: opts{alt: altShifted, top: 999}, + in: ColElems{W(1000), W(200), W(300), W(400)}, + out: ColElems{wpq(1000, maxQ), wq(200), wq(300), wq(400)}, + }, + { // first is a modifier + opt: opts{alt: altShifted, top: 999}, + in: ColElems{W(0, 10), W(1000)}, + out: ColElems{wsq(10, maxQ), wpq(1000, maxQ)}, + }, + { // primary ignorables + opt: opts{alt: altShifted, top: 250}, + in: ColElems{W(200), W(0, 10), W(300), W(0, 15), W(400)}, + out: ColElems{wq(200), zero, wpq(300, maxQ), wsq(15, maxQ), wpq(400, maxQ)}, + }, + { // secondary ignorables + opt: opts{alt: altShifted, top: 250}, + in: ColElems{W(200), W(0, 0, 10), W(300), W(0, 0, 15), W(400)}, + out: ColElems{wq(200), zero, wpq(300, maxQ), W(0, 0, 15, maxQ), wpq(400, maxQ)}, + }, + { // tertiary ignorables, no change + opt: opts{alt: altShifted, top: 250}, + in: ColElems{W(200), zero, W(300), zero, W(400)}, + out: ColElems{wq(200), zero, wpq(300, maxQ), zero, wpq(400, maxQ)}, + }, + + // ShiftTrimmed (same as Shifted) + { // simple sequence of non-variables + opt: opts{alt: altShiftTrimmed, top: 100}, + in: ColElems{W(200), W(300), W(400)}, + out: ColElems{wpq(200, maxQ), wpq(300, maxQ), wpq(400, maxQ)}, + }, + { // first is a variable + opt: opts{alt: altShiftTrimmed, top: 250}, + in: ColElems{W(200), W(300), W(400)}, + out: ColElems{wq(200), wpq(300, maxQ), wpq(400, maxQ)}, + }, + { // all but first are variable + opt: opts{alt: altShiftTrimmed, top: 999}, + in: ColElems{W(1000), W(200), W(300), W(400)}, + out: ColElems{wpq(1000, maxQ), wq(200), wq(300), wq(400)}, + }, + { // first is a modifier + opt: opts{alt: altShiftTrimmed, top: 999}, + in: ColElems{W(0, 10), W(1000)}, + out: ColElems{wsq(10, maxQ), wpq(1000, maxQ)}, + }, + { // primary ignorables + opt: opts{alt: altShiftTrimmed, top: 250}, + in: ColElems{W(200), W(0, 10), W(300), W(0, 15), W(400)}, + out: ColElems{wq(200), zero, wpq(300, maxQ), wsq(15, maxQ), wpq(400, maxQ)}, + }, + { // secondary ignorables + opt: opts{alt: altShiftTrimmed, top: 250}, + in: ColElems{W(200), W(0, 0, 10), W(300), W(0, 0, 15), W(400)}, + out: ColElems{wq(200), zero, wpq(300, maxQ), W(0, 0, 15, maxQ), wpq(400, maxQ)}, + }, + { // tertiary ignorables, no change + opt: opts{alt: altShiftTrimmed, top: 250}, + in: ColElems{W(200), zero, W(300), zero, W(400)}, + out: ColElems{wq(200), zero, wpq(300, maxQ), zero, wpq(400, maxQ)}, + }, + + // Blanked + { // simple sequence of non-variables + opt: opts{alt: altBlanked, top: 100}, + in: ColElems{W(200), W(300), W(400)}, + out: ColElems{W(200), W(300), W(400)}, + }, + { // first is a variable + opt: opts{alt: altBlanked, top: 250}, + in: ColElems{W(200), W(300), W(400)}, + out: ColElems{zero, W(300), W(400)}, + }, + { // all but first are variable + opt: opts{alt: altBlanked, top: 999}, + in: ColElems{W(1000), W(200), W(300), W(400)}, + out: ColElems{W(1000), zero, zero, zero}, + }, + { // first is a modifier + opt: opts{alt: altBlanked, top: 999}, + in: ColElems{W(0, 10), W(1000)}, + out: ColElems{W(0, 10), W(1000)}, + }, + { // primary ignorables + opt: opts{alt: altBlanked, top: 250}, + in: ColElems{W(200), W(0, 10), W(300), W(0, 15), W(400)}, + out: ColElems{zero, zero, W(300), W(0, 15), W(400)}, + }, + { // secondary ignorables + opt: opts{alt: altBlanked, top: 250}, + in: ColElems{W(200), W(0, 0, 10), W(300), W(0, 0, 15), W(400)}, + out: ColElems{zero, zero, W(300), W(0, 0, 15), W(400)}, + }, + { // tertiary ignorables, no change + opt: opts{alt: altBlanked, top: 250}, + in: ColElems{W(200), zero, W(300), zero, W(400)}, + out: ColElems{zero, zero, W(300), zero, W(400)}, + }, + + // Non-ignorable: input is always equal to output. + { // all but first are variable + opt: opts{alt: altNonIgnorable, top: 999}, + in: ColElems{W(1000), W(200), W(300), W(400)}, + out: ColElems{W(1000), W(200), W(300), W(400)}, + }, + { // primary ignorables + opt: opts{alt: altNonIgnorable, top: 250}, + in: ColElems{W(200), W(0, 10), W(300), W(0, 15), W(400)}, + out: ColElems{W(200), W(0, 10), W(300), W(0, 15), W(400)}, + }, + { // secondary ignorables + opt: opts{alt: altNonIgnorable, top: 250}, + in: ColElems{W(200), W(0, 0, 10), W(300), W(0, 0, 15), W(400)}, + out: ColElems{W(200), W(0, 0, 10), W(300), W(0, 0, 15), W(400)}, + }, + { // tertiary ignorables, no change + opt: opts{alt: altNonIgnorable, top: 250}, + in: ColElems{W(200), zero, W(300), zero, W(400)}, + out: ColElems{W(200), zero, W(300), zero, W(400)}, + }, +} + +func TestProcessWeights(t *testing.T) { + for i, tt := range processTests { + in := convertFromWeights(tt.in) + out := convertFromWeights(tt.out) + processWeights(tt.opt.alt, uint32(tt.opt.top), in) + for j, w := range in { + if w != out[j] { + t.Errorf("%d: Weights %d was %v; want %v", i, j, w, out[j]) + } + } + } +} + +type keyFromElemTest struct { + opt opts + in ColElems + out []byte +} + +var defS = byte(defaults.Secondary) +var defT = byte(defaults.Tertiary) + +const sep = 0 // separator byte + +var keyFromElemTests = []keyFromElemTest{ + { // simple primary and secondary weights. + opts{alt: altShifted}, + ColElems{W(0x200), W(0x7FFF), W(0, 0x30), W(0x100)}, + []byte{0x2, 0, 0x7F, 0xFF, 0x1, 0x00, // primary + sep, sep, 0, defS, 0, defS, 0, 0x30, 0, defS, // secondary + sep, sep, defT, defT, defT, defT, // tertiary + sep, 0xFF, 0xFF, 0xFF, 0xFF, // quaternary + }, + }, + { // same as first, but with zero element that need to be removed + opts{alt: altShifted}, + ColElems{W(0x200), zero, W(0x7FFF), W(0, 0x30), zero, W(0x100)}, + []byte{0x2, 0, 0x7F, 0xFF, 0x1, 0x00, // primary + sep, sep, 0, defS, 0, defS, 0, 0x30, 0, defS, // secondary + sep, sep, defT, defT, defT, defT, // tertiary + sep, 0xFF, 0xFF, 0xFF, 0xFF, // quaternary + }, + }, + { // same as first, with large primary values + opts{alt: altShifted}, + ColElems{W(0x200), W(0x8000), W(0, 0x30), W(0x12345)}, + []byte{0x2, 0, 0x80, 0x80, 0x00, 0x81, 0x23, 0x45, // primary + sep, sep, 0, defS, 0, defS, 0, 0x30, 0, defS, // secondary + sep, sep, defT, defT, defT, defT, // tertiary + sep, 0xFF, 0xFF, 0xFF, 0xFF, // quaternary + }, + }, + { // same as first, but with the secondary level backwards + opts{alt: altShifted, backwards: true}, + ColElems{W(0x200), W(0x7FFF), W(0, 0x30), W(0x100)}, + []byte{0x2, 0, 0x7F, 0xFF, 0x1, 0x00, // primary + sep, sep, 0, defS, 0, 0x30, 0, defS, 0, defS, // secondary + sep, sep, defT, defT, defT, defT, // tertiary + sep, 0xFF, 0xFF, 0xFF, 0xFF, // quaternary + }, + }, + { // same as first, ignoring quaternary level + opts{alt: altShifted, lev: 3}, + ColElems{W(0x200), zero, W(0x7FFF), W(0, 0x30), zero, W(0x100)}, + []byte{0x2, 0, 0x7F, 0xFF, 0x1, 0x00, // primary + sep, sep, 0, defS, 0, defS, 0, 0x30, 0, defS, // secondary + sep, sep, defT, defT, defT, defT, // tertiary + }, + }, + { // same as first, ignoring tertiary level + opts{alt: altShifted, lev: 2}, + ColElems{W(0x200), zero, W(0x7FFF), W(0, 0x30), zero, W(0x100)}, + []byte{0x2, 0, 0x7F, 0xFF, 0x1, 0x00, // primary + sep, sep, 0, defS, 0, defS, 0, 0x30, 0, defS, // secondary + }, + }, + { // same as first, ignoring secondary level + opts{alt: altShifted, lev: 1}, + ColElems{W(0x200), zero, W(0x7FFF), W(0, 0x30), zero, W(0x100)}, + []byte{0x2, 0, 0x7F, 0xFF, 0x1, 0x00}, + }, + { // simple primary and secondary weights. + opts{alt: altShiftTrimmed, top: 0x250}, + ColElems{W(0x300), W(0x200), W(0x7FFF), W(0, 0x30), W(0x800)}, + []byte{0x3, 0, 0x7F, 0xFF, 0x8, 0x00, // primary + sep, sep, 0, defS, 0, defS, 0, 0x30, 0, defS, // secondary + sep, sep, defT, defT, defT, defT, // tertiary + sep, 0xFF, 0x2, 0, // quaternary + }, + }, + { // as first, primary with case level enabled + opts{alt: altShifted, lev: 1, caseLevel: true}, + ColElems{W(0x200), W(0x7FFF), W(0, 0x30), W(0x100)}, + []byte{0x2, 0, 0x7F, 0xFF, 0x1, 0x00, // primary + sep, sep, // secondary + sep, sep, defT, defT, defT, defT, // tertiary + }, + }, +} + +func TestKeyFromElems(t *testing.T) { + buf := Buffer{} + for i, tt := range keyFromElemTests { + buf.Reset() + in := convertFromWeights(tt.in) + processWeights(tt.opt.alt, uint32(tt.opt.top), in) + tt.opt.collator().keyFromElems(&buf, in) + res := buf.key + if len(res) != len(tt.out) { + t.Errorf("%d: len(ws) was %d; want %d (%X should be %X)", i, len(res), len(tt.out), res, tt.out) + } + n := len(res) + if len(tt.out) < n { + n = len(tt.out) + } + for j, c := range res[:n] { + if c != tt.out[j] { + t.Errorf("%d: byte %d was %X; want %X", i, j, c, tt.out[j]) + } + } + } +} + +func TestGetColElems(t *testing.T) { + for i, tt := range appendNextTests { + c, err := makeTable(tt.in) + if err != nil { + // error is reported in TestAppendNext + continue + } + // Create one large test per table + str := make([]byte, 0, 4000) + out := ColElems{} + for len(str) < 3000 { + for _, chk := range tt.chk { + str = append(str, chk.in[:chk.n]...) + out = append(out, chk.out...) + } + } + for j, chk := range append(tt.chk, check{string(str), len(str), out}) { + out := convertFromWeights(chk.out) + ce := c.getColElems([]byte(chk.in)[:chk.n]) + if len(ce) != len(out) { + t.Errorf("%d:%d: len(ws) was %d; want %d", i, j, len(ce), len(out)) + continue + } + cnt := 0 + for k, w := range ce { + w, _ = colltab.MakeElem(w.Primary(), w.Secondary(), int(w.Tertiary()), 0) + if w != out[k] { + t.Errorf("%d:%d: Weights %d was %X; want %X", i, j, k, w, out[k]) + cnt++ + } + if cnt > 10 { + break + } + } + } + } +} + +type keyTest struct { + in string + out []byte +} + +var keyTests = []keyTest{ + {"abc", + []byte{0, 100, 0, 200, 1, 44, 0, 0, 0, 32, 0, 32, 0, 32, 0, 0, 2, 2, 2, 0, 255, 255, 255}, + }, + {"a\u0301", + []byte{0, 102, 0, 0, 0, 32, 0, 0, 2, 0, 255}, + }, + {"aaaaa", + []byte{0, 100, 0, 100, 0, 100, 0, 100, 0, 100, 0, 0, + 0, 32, 0, 32, 0, 32, 0, 32, 0, 32, 0, 0, + 2, 2, 2, 2, 2, 0, + 255, 255, 255, 255, 255, + }, + }, + // Issue 16391: incomplete rune at end of UTF-8 sequence. + {"\xc2", []byte{133, 255, 253, 0, 0, 0, 32, 0, 0, 2, 0, 255}}, + {"\xc2a", []byte{133, 255, 253, 0, 100, 0, 0, 0, 32, 0, 32, 0, 0, 2, 2, 0, 255, 255}}, +} + +func TestKey(t *testing.T) { + c, _ := makeTable(appendNextTests[4].in) + c.alternate = altShifted + c.ignore = ignore(colltab.Quaternary) + buf := Buffer{} + keys1 := [][]byte{} + keys2 := [][]byte{} + for _, tt := range keyTests { + keys1 = append(keys1, c.Key(&buf, []byte(tt.in))) + keys2 = append(keys2, c.KeyFromString(&buf, tt.in)) + } + // Separate generation from testing to ensure buffers are not overwritten. + for i, tt := range keyTests { + if !bytes.Equal(keys1[i], tt.out) { + t.Errorf("%d: Key(%q) = %d; want %d", i, tt.in, keys1[i], tt.out) + } + if !bytes.Equal(keys2[i], tt.out) { + t.Errorf("%d: KeyFromString(%q) = %d; want %d", i, tt.in, keys2[i], tt.out) + } + } +} + +type compareTest struct { + a, b string + res int // comparison result +} + +var compareTests = []compareTest{ + {"a\u0301", "a", 1}, + {"a\u0301b", "ab", 1}, + {"a", "a\u0301", -1}, + {"ab", "a\u0301b", -1}, + {"bc", "a\u0301c", 1}, + {"ab", "aB", -1}, + {"a\u0301", "a\u0301", 0}, + {"a", "a", 0}, + // Only clip prefixes of whole runes. + {"\u302E", "\u302F", 1}, + // Don't clip prefixes when last rune of prefix may be part of contraction. + {"a\u035E", "a\u0301\u035F", -1}, + {"a\u0301\u035Fb", "a\u0301\u035F", -1}, +} + +func TestCompare(t *testing.T) { + c, _ := makeTable(appendNextTests[4].in) + for i, tt := range compareTests { + if res := c.Compare([]byte(tt.a), []byte(tt.b)); res != tt.res { + t.Errorf("%d: Compare(%q, %q) == %d; want %d", i, tt.a, tt.b, res, tt.res) + } + if res := c.CompareString(tt.a, tt.b); res != tt.res { + t.Errorf("%d: CompareString(%q, %q) == %d; want %d", i, tt.a, tt.b, res, tt.res) + } + } +} + +func TestNumeric(t *testing.T) { + c := New(language.English, Loose, Numeric) + + for i, tt := range []struct { + a, b string + want int + }{ + {"1", "2", -1}, + {"2", "12", -1}, + {"2", "12", -1}, // Fullwidth is sorted as usual. + {"₂", "₁₂", 1}, // Subscript is not sorted as numbers. + {"②", "①②", 1}, // Circled is not sorted as numbers. + { // Imperial Aramaic, is not sorted as number. + "\U00010859", + "\U00010858\U00010859", + 1, + }, + {"12", "2", 1}, + {"A-1", "A-2", -1}, + {"A-2", "A-12", -1}, + {"A-12", "A-2", 1}, + {"A-0001", "A-1", 0}, + } { + if got := c.CompareString(tt.a, tt.b); got != tt.want { + t.Errorf("%d: CompareString(%s, %s) = %d; want %d", i, tt.a, tt.b, got, tt.want) + } + } +} diff --git a/vendor/golang.org/x/text/collate/export_test.go b/vendor/golang.org/x/text/collate/export_test.go new file mode 100644 index 000000000..69bfeaf1a --- /dev/null +++ b/vendor/golang.org/x/text/collate/export_test.go @@ -0,0 +1,51 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package collate + +// Export for testing. +// TODO: no longer necessary. Remove at some point. + +import ( + "fmt" + + "golang.org/x/text/internal/colltab" +) + +const ( + defaultSecondary = 0x20 + defaultTertiary = 0x2 +) + +type Weights struct { + Primary, Secondary, Tertiary, Quaternary int +} + +func W(ce ...int) Weights { + w := Weights{ce[0], defaultSecondary, defaultTertiary, 0} + if len(ce) > 1 { + w.Secondary = ce[1] + } + if len(ce) > 2 { + w.Tertiary = ce[2] + } + if len(ce) > 3 { + w.Quaternary = ce[3] + } + return w +} +func (w Weights) String() string { + return fmt.Sprintf("[%X.%X.%X.%X]", w.Primary, w.Secondary, w.Tertiary, w.Quaternary) +} + +func convertFromWeights(ws []Weights) []colltab.Elem { + out := make([]colltab.Elem, len(ws)) + for i, w := range ws { + out[i], _ = colltab.MakeElem(w.Primary, w.Secondary, w.Tertiary, 0) + if out[i] == colltab.Ignore && w.Quaternary > 0 { + out[i] = colltab.MakeQuaternary(w.Quaternary) + } + } + return out +} diff --git a/vendor/golang.org/x/text/collate/index.go b/vendor/golang.org/x/text/collate/index.go new file mode 100644 index 000000000..535fb5402 --- /dev/null +++ b/vendor/golang.org/x/text/collate/index.go @@ -0,0 +1,32 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package collate + +import "golang.org/x/text/internal/colltab" + +const blockSize = 64 + +func getTable(t tableIndex) *colltab.Table { + return &colltab.Table{ + Index: colltab.Trie{ + Index0: mainLookup[:][blockSize*t.lookupOffset:], + Values0: mainValues[:][blockSize*t.valuesOffset:], + Index: mainLookup[:], + Values: mainValues[:], + }, + ExpandElem: mainExpandElem[:], + ContractTries: colltab.ContractTrieSet(mainCTEntries[:]), + ContractElem: mainContractElem[:], + MaxContractLen: 18, + VariableTop: varTop, + } +} + +// tableIndex holds information for constructing a table +// for a certain locale based on the main table. +type tableIndex struct { + lookupOffset uint32 + valuesOffset uint32 +} diff --git a/vendor/golang.org/x/text/collate/maketables.go b/vendor/golang.org/x/text/collate/maketables.go new file mode 100644 index 000000000..b4c835ed4 --- /dev/null +++ b/vendor/golang.org/x/text/collate/maketables.go @@ -0,0 +1,553 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +// Collation table generator. +// Data read from the web. + +package main + +import ( + "archive/zip" + "bufio" + "bytes" + "flag" + "fmt" + "io" + "io/ioutil" + "log" + "os" + "regexp" + "sort" + "strconv" + "strings" + "unicode/utf8" + + "golang.org/x/text/collate" + "golang.org/x/text/collate/build" + "golang.org/x/text/internal/colltab" + "golang.org/x/text/internal/gen" + "golang.org/x/text/language" + "golang.org/x/text/unicode/cldr" +) + +var ( + test = flag.Bool("test", false, + "test existing tables; can be used to compare web data with package data.") + short = flag.Bool("short", false, `Use "short" alternatives, when available.`) + draft = flag.Bool("draft", false, `Use draft versions, when available.`) + tags = flag.String("tags", "", "build tags to be included after +build directive") + pkg = flag.String("package", "collate", + "the name of the package in which the generated file is to be included") + + tables = flagStringSetAllowAll("tables", "collate", "collate,chars", + "comma-spearated list of tables to generate.") + exclude = flagStringSet("exclude", "zh2", "", + "comma-separated list of languages to exclude.") + include = flagStringSet("include", "", "", + "comma-separated list of languages to include. Include trumps exclude.") + // TODO: Not included: unihan gb2312han zhuyin big5han (for size reasons) + // TODO: Not included: traditional (buggy for Bengali) + types = flagStringSetAllowAll("types", "standard,phonebook,phonetic,reformed,pinyin,stroke", "", + "comma-separated list of types that should be included.") +) + +// stringSet implements an ordered set based on a list. It implements flag.Value +// to allow a set to be specified as a comma-separated list. +type stringSet struct { + s []string + allowed *stringSet + dirty bool // needs compaction if true + all bool + allowAll bool +} + +func flagStringSet(name, def, allowed, usage string) *stringSet { + ss := &stringSet{} + if allowed != "" { + usage += fmt.Sprintf(" (allowed values: any of %s)", allowed) + ss.allowed = &stringSet{} + failOnError(ss.allowed.Set(allowed)) + } + ss.Set(def) + flag.Var(ss, name, usage) + return ss +} + +func flagStringSetAllowAll(name, def, allowed, usage string) *stringSet { + ss := &stringSet{allowAll: true} + if allowed == "" { + flag.Var(ss, name, usage+fmt.Sprintf(` Use "all" to select all.`)) + } else { + ss.allowed = &stringSet{} + failOnError(ss.allowed.Set(allowed)) + flag.Var(ss, name, usage+fmt.Sprintf(` (allowed values: "all" or any of %s)`, allowed)) + } + ss.Set(def) + return ss +} + +func (ss stringSet) Len() int { + return len(ss.s) +} + +func (ss stringSet) String() string { + return strings.Join(ss.s, ",") +} + +func (ss *stringSet) Set(s string) error { + if ss.allowAll && s == "all" { + ss.s = nil + ss.all = true + return nil + } + ss.s = ss.s[:0] + for _, s := range strings.Split(s, ",") { + if s := strings.TrimSpace(s); s != "" { + if ss.allowed != nil && !ss.allowed.contains(s) { + return fmt.Errorf("unsupported value %q; must be one of %s", s, ss.allowed) + } + ss.add(s) + } + } + ss.compact() + return nil +} + +func (ss *stringSet) add(s string) { + ss.s = append(ss.s, s) + ss.dirty = true +} + +func (ss *stringSet) values() []string { + ss.compact() + return ss.s +} + +func (ss *stringSet) contains(s string) bool { + if ss.all { + return true + } + for _, v := range ss.s { + if v == s { + return true + } + } + return false +} + +func (ss *stringSet) compact() { + if !ss.dirty { + return + } + a := ss.s + sort.Strings(a) + k := 0 + for i := 1; i < len(a); i++ { + if a[k] != a[i] { + a[k+1] = a[i] + k++ + } + } + ss.s = a[:k+1] + ss.dirty = false +} + +func skipLang(l string) bool { + if include.Len() > 0 { + return !include.contains(l) + } + return exclude.contains(l) +} + +// altInclude returns a list of alternatives (for the LDML alt attribute) +// in order of preference. An empty string in this list indicates the +// default entry. +func altInclude() []string { + l := []string{} + if *short { + l = append(l, "short") + } + l = append(l, "") + // TODO: handle draft using cldr.SetDraftLevel + if *draft { + l = append(l, "proposed") + } + return l +} + +func failOnError(e error) { + if e != nil { + log.Panic(e) + } +} + +func openArchive() *zip.Reader { + f := gen.OpenCLDRCoreZip() + buffer, err := ioutil.ReadAll(f) + f.Close() + failOnError(err) + archive, err := zip.NewReader(bytes.NewReader(buffer), int64(len(buffer))) + failOnError(err) + return archive +} + +// parseUCA parses a Default Unicode Collation Element Table of the format +// specified in http://www.unicode.org/reports/tr10/#File_Format. +// It returns the variable top. +func parseUCA(builder *build.Builder) { + var r io.ReadCloser + var err error + for _, f := range openArchive().File { + if strings.HasSuffix(f.Name, "allkeys_CLDR.txt") { + r, err = f.Open() + } + } + if r == nil { + log.Fatal("File allkeys_CLDR.txt not found in archive.") + } + failOnError(err) + defer r.Close() + scanner := bufio.NewScanner(r) + colelem := regexp.MustCompile(`\[([.*])([0-9A-F.]+)\]`) + for i := 1; scanner.Scan(); i++ { + line := scanner.Text() + if len(line) == 0 || line[0] == '#' { + continue + } + if line[0] == '@' { + // parse properties + switch { + case strings.HasPrefix(line[1:], "version "): + a := strings.Split(line[1:], " ") + if a[1] != gen.UnicodeVersion() { + log.Fatalf("incompatible version %s; want %s", a[1], gen.UnicodeVersion()) + } + case strings.HasPrefix(line[1:], "backwards "): + log.Fatalf("%d: unsupported option backwards", i) + default: + log.Printf("%d: unknown option %s", i, line[1:]) + } + } else { + // parse entries + part := strings.Split(line, " ; ") + if len(part) != 2 { + log.Fatalf("%d: production rule without ';': %v", i, line) + } + lhs := []rune{} + for _, v := range strings.Split(part[0], " ") { + if v == "" { + continue + } + lhs = append(lhs, rune(convHex(i, v))) + } + var n int + var vars []int + rhs := [][]int{} + for i, m := range colelem.FindAllStringSubmatch(part[1], -1) { + n += len(m[0]) + elem := []int{} + for _, h := range strings.Split(m[2], ".") { + elem = append(elem, convHex(i, h)) + } + if m[1] == "*" { + vars = append(vars, i) + } + rhs = append(rhs, elem) + } + if len(part[1]) < n+3 || part[1][n+1] != '#' { + log.Fatalf("%d: expected comment; found %s", i, part[1][n:]) + } + if *test { + testInput.add(string(lhs)) + } + failOnError(builder.Add(lhs, rhs, vars)) + } + } + if scanner.Err() != nil { + log.Fatal(scanner.Err()) + } +} + +func convHex(line int, s string) int { + r, e := strconv.ParseInt(s, 16, 32) + if e != nil { + log.Fatalf("%d: %v", line, e) + } + return int(r) +} + +var testInput = stringSet{} + +var charRe = regexp.MustCompile(`&#x([0-9A-F]*);`) +var tagRe = regexp.MustCompile(`<([a-z_]*) */>`) + +var mainLocales = []string{} + +// charsets holds a list of exemplar characters per category. +type charSets map[string][]string + +func (p charSets) fprint(w io.Writer) { + fmt.Fprintln(w, "[exN]string{") + for i, k := range []string{"", "contractions", "punctuation", "auxiliary", "currencySymbol", "index"} { + if set := p[k]; len(set) != 0 { + fmt.Fprintf(w, "\t\t%d: %q,\n", i, strings.Join(set, " ")) + } + } + fmt.Fprintln(w, "\t},") +} + +var localeChars = make(map[string]charSets) + +const exemplarHeader = ` +type exemplarType int +const ( + exCharacters exemplarType = iota + exContractions + exPunctuation + exAuxiliary + exCurrency + exIndex + exN +) +` + +func printExemplarCharacters(w io.Writer) { + fmt.Fprintln(w, exemplarHeader) + fmt.Fprintln(w, "var exemplarCharacters = map[string][exN]string{") + for _, loc := range mainLocales { + fmt.Fprintf(w, "\t%q: ", loc) + localeChars[loc].fprint(w) + } + fmt.Fprintln(w, "}") +} + +func decodeCLDR(d *cldr.Decoder) *cldr.CLDR { + r := gen.OpenCLDRCoreZip() + data, err := d.DecodeZip(r) + failOnError(err) + return data +} + +// parseMain parses XML files in the main directory of the CLDR core.zip file. +func parseMain() { + d := &cldr.Decoder{} + d.SetDirFilter("main") + d.SetSectionFilter("characters") + data := decodeCLDR(d) + for _, loc := range data.Locales() { + x := data.RawLDML(loc) + if skipLang(x.Identity.Language.Type) { + continue + } + if x.Characters != nil { + x, _ = data.LDML(loc) + loc = language.Make(loc).String() + for _, ec := range x.Characters.ExemplarCharacters { + if ec.Draft != "" { + continue + } + if _, ok := localeChars[loc]; !ok { + mainLocales = append(mainLocales, loc) + localeChars[loc] = make(charSets) + } + localeChars[loc][ec.Type] = parseCharacters(ec.Data()) + } + } + } +} + +func parseCharacters(chars string) []string { + parseSingle := func(s string) (r rune, tail string, escaped bool) { + if s[0] == '\\' { + return rune(s[1]), s[2:], true + } + r, sz := utf8.DecodeRuneInString(s) + return r, s[sz:], false + } + chars = strings.TrimSpace(chars) + if n := len(chars) - 1; chars[n] == ']' && chars[0] == '[' { + chars = chars[1:n] + } + list := []string{} + var r, last, end rune + for len(chars) > 0 { + if chars[0] == '{' { // character sequence + buf := []rune{} + for chars = chars[1:]; len(chars) > 0; { + r, chars, _ = parseSingle(chars) + if r == '}' { + break + } + if r == ' ' { + log.Fatalf("space not supported in sequence %q", chars) + } + buf = append(buf, r) + } + list = append(list, string(buf)) + last = 0 + } else { // single character + escaped := false + r, chars, escaped = parseSingle(chars) + if r != ' ' { + if r == '-' && !escaped { + if last == 0 { + log.Fatal("'-' should be preceded by a character") + } + end, chars, _ = parseSingle(chars) + for ; last <= end; last++ { + list = append(list, string(last)) + } + last = 0 + } else { + list = append(list, string(r)) + last = r + } + } + } + } + return list +} + +var fileRe = regexp.MustCompile(`.*/collation/(.*)\.xml`) + +// typeMap translates legacy type keys to their BCP47 equivalent. +var typeMap = map[string]string{ + "phonebook": "phonebk", + "traditional": "trad", +} + +// parseCollation parses XML files in the collation directory of the CLDR core.zip file. +func parseCollation(b *build.Builder) { + d := &cldr.Decoder{} + d.SetDirFilter("collation") + data := decodeCLDR(d) + for _, loc := range data.Locales() { + x, err := data.LDML(loc) + failOnError(err) + if skipLang(x.Identity.Language.Type) { + continue + } + cs := x.Collations.Collation + sl := cldr.MakeSlice(&cs) + if len(types.s) == 0 { + sl.SelectAnyOf("type", x.Collations.Default()) + } else if !types.all { + sl.SelectAnyOf("type", types.s...) + } + sl.SelectOnePerGroup("alt", altInclude()) + + for _, c := range cs { + id, err := language.Parse(loc) + if err != nil { + fmt.Fprintf(os.Stderr, "invalid locale: %q", err) + continue + } + // Support both old- and new-style defaults. + d := c.Type + if x.Collations.DefaultCollation == nil { + d = x.Collations.Default() + } else { + d = x.Collations.DefaultCollation.Data() + } + // We assume tables are being built either for search or collation, + // but not both. For search the default is always "search". + if d != c.Type && c.Type != "search" { + typ := c.Type + if len(c.Type) > 8 { + typ = typeMap[c.Type] + } + id, err = id.SetTypeForKey("co", typ) + failOnError(err) + } + t := b.Tailoring(id) + c.Process(processor{t}) + } + } +} + +type processor struct { + t *build.Tailoring +} + +func (p processor) Reset(anchor string, before int) (err error) { + if before != 0 { + err = p.t.SetAnchorBefore(anchor) + } else { + err = p.t.SetAnchor(anchor) + } + failOnError(err) + return nil +} + +func (p processor) Insert(level int, str, context, extend string) error { + str = context + str + if *test { + testInput.add(str) + } + // TODO: mimic bug in old maketables: remove. + err := p.t.Insert(colltab.Level(level-1), str, context+extend) + failOnError(err) + return nil +} + +func (p processor) Index(id string) { +} + +func testCollator(c *collate.Collator) { + c0 := collate.New(language.Und) + + // iterator over all characters for all locales and check + // whether Key is equal. + buf := collate.Buffer{} + + // Add all common and not too uncommon runes to the test set. + for i := rune(0); i < 0x30000; i++ { + testInput.add(string(i)) + } + for i := rune(0xE0000); i < 0xF0000; i++ { + testInput.add(string(i)) + } + for _, str := range testInput.values() { + k0 := c0.KeyFromString(&buf, str) + k := c.KeyFromString(&buf, str) + if !bytes.Equal(k0, k) { + failOnError(fmt.Errorf("test:%U: keys differ (%x vs %x)", []rune(str), k0, k)) + } + buf.Reset() + } + fmt.Println("PASS") +} + +func main() { + gen.Init() + b := build.NewBuilder() + parseUCA(b) + if tables.contains("chars") { + parseMain() + } + parseCollation(b) + + c, err := b.Build() + failOnError(err) + + if *test { + testCollator(collate.NewFromTable(c)) + } else { + w := &bytes.Buffer{} + + gen.WriteUnicodeVersion(w) + gen.WriteCLDRVersion(w) + + if tables.contains("collate") { + _, err = b.Print(w) + failOnError(err) + } + if tables.contains("chars") { + printExemplarCharacters(w) + } + gen.WriteGoFile("tables.go", *pkg, w.Bytes()) + } +} diff --git a/vendor/golang.org/x/text/collate/option.go b/vendor/golang.org/x/text/collate/option.go new file mode 100644 index 000000000..f39ef6841 --- /dev/null +++ b/vendor/golang.org/x/text/collate/option.go @@ -0,0 +1,239 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package collate + +import ( + "sort" + + "golang.org/x/text/internal/colltab" + "golang.org/x/text/language" + "golang.org/x/text/unicode/norm" +) + +// newCollator creates a new collator with default options configured. +func newCollator(t colltab.Weighter) *Collator { + // Initialize a collator with default options. + c := &Collator{ + options: options{ + ignore: [colltab.NumLevels]bool{ + colltab.Quaternary: true, + colltab.Identity: true, + }, + f: norm.NFD, + t: t, + }, + } + + // TODO: store vt in tags or remove. + c.variableTop = t.Top() + + return c +} + +// An Option is used to change the behavior of a Collator. Options override the +// settings passed through the locale identifier. +type Option struct { + priority int + f func(o *options) +} + +type prioritizedOptions []Option + +func (p prioritizedOptions) Len() int { + return len(p) +} + +func (p prioritizedOptions) Swap(i, j int) { + p[i], p[j] = p[j], p[i] +} + +func (p prioritizedOptions) Less(i, j int) bool { + return p[i].priority < p[j].priority +} + +type options struct { + // ignore specifies which levels to ignore. + ignore [colltab.NumLevels]bool + + // caseLevel is true if there is an additional level of case matching + // between the secondary and tertiary levels. + caseLevel bool + + // backwards specifies the order of sorting at the secondary level. + // This option exists predominantly to support reverse sorting of accents in French. + backwards bool + + // numeric specifies whether any sequence of decimal digits (category is Nd) + // is sorted at a primary level with its numeric value. + // For example, "A-21" < "A-123". + // This option is set by wrapping the main Weighter with NewNumericWeighter. + numeric bool + + // alternate specifies an alternative handling of variables. + alternate alternateHandling + + // variableTop is the largest primary value that is considered to be + // variable. + variableTop uint32 + + t colltab.Weighter + + f norm.Form +} + +func (o *options) setOptions(opts []Option) { + sort.Sort(prioritizedOptions(opts)) + for _, x := range opts { + x.f(o) + } +} + +// OptionsFromTag extracts the BCP47 collation options from the tag and +// configures a collator accordingly. These options are set before any other +// option. +func OptionsFromTag(t language.Tag) Option { + return Option{0, func(o *options) { + o.setFromTag(t) + }} +} + +func (o *options) setFromTag(t language.Tag) { + o.caseLevel = ldmlBool(t, o.caseLevel, "kc") + o.backwards = ldmlBool(t, o.backwards, "kb") + o.numeric = ldmlBool(t, o.numeric, "kn") + + // Extract settings from the BCP47 u extension. + switch t.TypeForKey("ks") { // strength + case "level1": + o.ignore[colltab.Secondary] = true + o.ignore[colltab.Tertiary] = true + case "level2": + o.ignore[colltab.Tertiary] = true + case "level3", "": + // The default. + case "level4": + o.ignore[colltab.Quaternary] = false + case "identic": + o.ignore[colltab.Quaternary] = false + o.ignore[colltab.Identity] = false + } + + switch t.TypeForKey("ka") { + case "shifted": + o.alternate = altShifted + // The following two types are not official BCP47, but we support them to + // give access to this otherwise hidden functionality. The name blanked is + // derived from the LDML name blanked and posix reflects the main use of + // the shift-trimmed option. + case "blanked": + o.alternate = altBlanked + case "posix": + o.alternate = altShiftTrimmed + } + + // TODO: caseFirst ("kf"), reorder ("kr"), and maybe variableTop ("vt"). + + // Not used: + // - normalization ("kk", not necessary for this implementation) + // - hiraganaQuatenary ("kh", obsolete) +} + +func ldmlBool(t language.Tag, old bool, key string) bool { + switch t.TypeForKey(key) { + case "true": + return true + case "false": + return false + default: + return old + } +} + +var ( + // IgnoreCase sets case-insensitive comparison. + IgnoreCase Option = ignoreCase + ignoreCase = Option{3, ignoreCaseF} + + // IgnoreDiacritics causes diacritical marks to be ignored. ("o" == "ö"). + IgnoreDiacritics Option = ignoreDiacritics + ignoreDiacritics = Option{3, ignoreDiacriticsF} + + // IgnoreWidth causes full-width characters to match their half-width + // equivalents. + IgnoreWidth Option = ignoreWidth + ignoreWidth = Option{2, ignoreWidthF} + + // Loose sets the collator to ignore diacritics, case and weight. + Loose Option = loose + loose = Option{4, looseF} + + // Force ordering if strings are equivalent but not equal. + Force Option = force + force = Option{5, forceF} + + // Numeric specifies that numbers should sort numerically ("2" < "12"). + Numeric Option = numeric + numeric = Option{5, numericF} +) + +func ignoreWidthF(o *options) { + o.ignore[colltab.Tertiary] = true + o.caseLevel = true +} + +func ignoreDiacriticsF(o *options) { + o.ignore[colltab.Secondary] = true +} + +func ignoreCaseF(o *options) { + o.ignore[colltab.Tertiary] = true + o.caseLevel = false +} + +func looseF(o *options) { + ignoreWidthF(o) + ignoreDiacriticsF(o) + ignoreCaseF(o) +} + +func forceF(o *options) { + o.ignore[colltab.Identity] = false +} + +func numericF(o *options) { o.numeric = true } + +// Reorder overrides the pre-defined ordering of scripts and character sets. +func Reorder(s ...string) Option { + // TODO: need fractional weights to implement this. + panic("TODO: implement") +} + +// TODO: consider making these public again. These options cannot be fully +// specified in BCP47, so an API interface seems warranted. Still a higher-level +// interface would be nice (e.g. a POSIX option for enabling altShiftTrimmed) + +// alternateHandling identifies the various ways in which variables are handled. +// A rune with a primary weight lower than the variable top is considered a +// variable. +// See http://www.unicode.org/reports/tr10/#Variable_Weighting for details. +type alternateHandling int + +const ( + // altNonIgnorable turns off special handling of variables. + altNonIgnorable alternateHandling = iota + + // altBlanked sets variables and all subsequent primary ignorables to be + // ignorable at all levels. This is identical to removing all variables + // and subsequent primary ignorables from the input. + altBlanked + + // altShifted sets variables to be ignorable for levels one through three and + // adds a fourth level based on the values of the ignored levels. + altShifted + + // altShiftTrimmed is a slight variant of altShifted that is used to + // emulate POSIX. + altShiftTrimmed +) diff --git a/vendor/golang.org/x/text/collate/option_test.go b/vendor/golang.org/x/text/collate/option_test.go new file mode 100644 index 000000000..0f6ba9bc8 --- /dev/null +++ b/vendor/golang.org/x/text/collate/option_test.go @@ -0,0 +1,209 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. +package collate + +import ( + "reflect" + "strings" + "testing" + + "golang.org/x/text/internal/colltab" + "golang.org/x/text/language" +) + +var ( + defaultIgnore = ignore(colltab.Tertiary) + defaultTable = getTable(locales[0]) +) + +func TestOptions(t *testing.T) { + for i, tt := range []struct { + in []Option + out options + }{ + 0: { + out: options{ + ignore: defaultIgnore, + }, + }, + 1: { + in: []Option{IgnoreDiacritics}, + out: options{ + ignore: [colltab.NumLevels]bool{false, true, false, true, true}, + }, + }, + 2: { + in: []Option{IgnoreCase, IgnoreDiacritics}, + out: options{ + ignore: ignore(colltab.Primary), + }, + }, + 3: { + in: []Option{ignoreDiacritics, IgnoreWidth}, + out: options{ + ignore: ignore(colltab.Primary), + caseLevel: true, + }, + }, + 4: { + in: []Option{IgnoreWidth, ignoreDiacritics}, + out: options{ + ignore: ignore(colltab.Primary), + caseLevel: true, + }, + }, + 5: { + in: []Option{IgnoreCase, IgnoreWidth}, + out: options{ + ignore: ignore(colltab.Secondary), + }, + }, + 6: { + in: []Option{IgnoreCase, IgnoreWidth, Loose}, + out: options{ + ignore: ignore(colltab.Primary), + }, + }, + 7: { + in: []Option{Force, IgnoreCase, IgnoreWidth, Loose}, + out: options{ + ignore: [colltab.NumLevels]bool{false, true, true, true, false}, + }, + }, + 8: { + in: []Option{IgnoreDiacritics, IgnoreCase}, + out: options{ + ignore: ignore(colltab.Primary), + }, + }, + 9: { + in: []Option{Numeric}, + out: options{ + ignore: defaultIgnore, + numeric: true, + }, + }, + 10: { + in: []Option{OptionsFromTag(language.MustParse("und-u-ks-level1"))}, + out: options{ + ignore: ignore(colltab.Primary), + }, + }, + 11: { + in: []Option{OptionsFromTag(language.MustParse("und-u-ks-level4"))}, + out: options{ + ignore: ignore(colltab.Quaternary), + }, + }, + 12: { + in: []Option{OptionsFromTag(language.MustParse("und-u-ks-identic"))}, + out: options{}, + }, + 13: { + in: []Option{ + OptionsFromTag(language.MustParse("und-u-kn-true-kb-true-kc-true")), + }, + out: options{ + ignore: defaultIgnore, + caseLevel: true, + backwards: true, + numeric: true, + }, + }, + 14: { + in: []Option{ + OptionsFromTag(language.MustParse("und-u-kn-true-kb-true-kc-true")), + OptionsFromTag(language.MustParse("und-u-kn-false-kb-false-kc-false")), + }, + out: options{ + ignore: defaultIgnore, + }, + }, + 15: { + in: []Option{ + OptionsFromTag(language.MustParse("und-u-kn-true-kb-true-kc-true")), + OptionsFromTag(language.MustParse("und-u-kn-foo-kb-foo-kc-foo")), + }, + out: options{ + ignore: defaultIgnore, + caseLevel: true, + backwards: true, + numeric: true, + }, + }, + 16: { // Normal options take precedence over tag options. + in: []Option{ + Numeric, IgnoreCase, + OptionsFromTag(language.MustParse("und-u-kn-false-kc-true")), + }, + out: options{ + ignore: ignore(colltab.Secondary), + caseLevel: false, + numeric: true, + }, + }, + 17: { + in: []Option{ + OptionsFromTag(language.MustParse("und-u-ka-shifted")), + }, + out: options{ + ignore: defaultIgnore, + alternate: altShifted, + }, + }, + 18: { + in: []Option{ + OptionsFromTag(language.MustParse("und-u-ka-blanked")), + }, + out: options{ + ignore: defaultIgnore, + alternate: altBlanked, + }, + }, + 19: { + in: []Option{ + OptionsFromTag(language.MustParse("und-u-ka-posix")), + }, + out: options{ + ignore: defaultIgnore, + alternate: altShiftTrimmed, + }, + }, + } { + c := newCollator(defaultTable) + c.t = nil + c.variableTop = 0 + c.f = 0 + + c.setOptions(tt.in) + if !reflect.DeepEqual(c.options, tt.out) { + t.Errorf("%d: got %v; want %v", i, c.options, tt.out) + } + } +} + +func TestAlternateSortTypes(t *testing.T) { + testCases := []struct { + lang string + in []string + want []string + }{{ + lang: "zh,cmn,zh-Hant-u-co-pinyin,zh-HK-u-co-pinyin,zh-pinyin", + in: []string{"爸爸", "妈妈", "儿子", "女儿"}, + want: []string{"爸爸", "儿子", "妈妈", "女儿"}, + }, { + lang: "zh-Hant,zh-u-co-stroke,zh-Hant-u-co-stroke", + in: []string{"爸爸", "妈妈", "儿子", "女儿"}, + want: []string{"儿子", "女儿", "妈妈", "爸爸"}, + }} + for _, tc := range testCases { + for _, tag := range strings.Split(tc.lang, ",") { + got := append([]string{}, tc.in...) + New(language.MustParse(tag)).SortStrings(got) + if !reflect.DeepEqual(got, tc.want) { + t.Errorf("New(%s).SortStrings(%v) = %v; want %v", tag, tc.in, got, tc.want) + } + } + } +} diff --git a/vendor/golang.org/x/text/collate/reg_test.go b/vendor/golang.org/x/text/collate/reg_test.go new file mode 100644 index 000000000..1ac5fedc8 --- /dev/null +++ b/vendor/golang.org/x/text/collate/reg_test.go @@ -0,0 +1,230 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package collate + +import ( + "archive/zip" + "bufio" + "bytes" + "flag" + "io" + "io/ioutil" + "log" + "path" + "regexp" + "strconv" + "strings" + "testing" + "unicode/utf8" + + "golang.org/x/text/collate/build" + "golang.org/x/text/internal/gen" + "golang.org/x/text/language" +) + +var long = flag.Bool("long", false, + "run time-consuming tests, such as tests that fetch data online") + +// This regression test runs tests for the test files in CollationTest.zip +// (taken from http://www.unicode.org/Public/UCA/<gen.UnicodeVersion()>/). +// +// The test files have the following form: +// # header +// 0009 0021; # ('\u0009') <CHARACTER TABULATION> [| | | 0201 025E] +// 0009 003F; # ('\u0009') <CHARACTER TABULATION> [| | | 0201 0263] +// 000A 0021; # ('\u000A') <LINE FEED (LF)> [| | | 0202 025E] +// 000A 003F; # ('\u000A') <LINE FEED (LF)> [| | | 0202 0263] +// +// The part before the semicolon is the hex representation of a sequence +// of runes. After the hash mark is a comment. The strings +// represented by rune sequence are in the file in sorted order, as +// defined by the DUCET. + +type Test struct { + name string + str [][]byte + comment []string +} + +var versionRe = regexp.MustCompile(`# UCA Version: (.*)\n?$`) +var testRe = regexp.MustCompile(`^([\dA-F ]+);.*# (.*)\n?$`) + +func TestCollation(t *testing.T) { + if !gen.IsLocal() && !*long { + t.Skip("skipping test to prevent downloading; to run use -long or use -local to specify a local source") + } + t.Skip("must first update to new file format to support test") + for _, test := range loadTestData() { + doTest(t, test) + } +} + +func Error(e error) { + if e != nil { + log.Fatal(e) + } +} + +// parseUCA parses a Default Unicode Collation Element Table of the format +// specified in http://www.unicode.org/reports/tr10/#File_Format. +// It returns the variable top. +func parseUCA(builder *build.Builder) { + r := gen.OpenUnicodeFile("UCA", "", "allkeys.txt") + defer r.Close() + input := bufio.NewReader(r) + colelem := regexp.MustCompile(`\[([.*])([0-9A-F.]+)\]`) + for i := 1; true; i++ { + l, prefix, err := input.ReadLine() + if err == io.EOF { + break + } + Error(err) + line := string(l) + if prefix { + log.Fatalf("%d: buffer overflow", i) + } + if len(line) == 0 || line[0] == '#' { + continue + } + if line[0] == '@' { + if strings.HasPrefix(line[1:], "version ") { + if v := strings.Split(line[1:], " ")[1]; v != gen.UnicodeVersion() { + log.Fatalf("incompatible version %s; want %s", v, gen.UnicodeVersion()) + } + } + } else { + // parse entries + part := strings.Split(line, " ; ") + if len(part) != 2 { + log.Fatalf("%d: production rule without ';': %v", i, line) + } + lhs := []rune{} + for _, v := range strings.Split(part[0], " ") { + if v != "" { + lhs = append(lhs, rune(convHex(i, v))) + } + } + vars := []int{} + rhs := [][]int{} + for i, m := range colelem.FindAllStringSubmatch(part[1], -1) { + if m[1] == "*" { + vars = append(vars, i) + } + elem := []int{} + for _, h := range strings.Split(m[2], ".") { + elem = append(elem, convHex(i, h)) + } + rhs = append(rhs, elem) + } + builder.Add(lhs, rhs, vars) + } + } +} + +func convHex(line int, s string) int { + r, e := strconv.ParseInt(s, 16, 32) + if e != nil { + log.Fatalf("%d: %v", line, e) + } + return int(r) +} + +func loadTestData() []Test { + f := gen.OpenUnicodeFile("UCA", "", "CollationTest.zip") + buffer, err := ioutil.ReadAll(f) + f.Close() + Error(err) + archive, err := zip.NewReader(bytes.NewReader(buffer), int64(len(buffer))) + Error(err) + tests := []Test{} + for _, f := range archive.File { + // Skip the short versions, which are simply duplicates of the long versions. + if strings.Contains(f.Name, "SHORT") || f.FileInfo().IsDir() { + continue + } + ff, err := f.Open() + Error(err) + defer ff.Close() + scanner := bufio.NewScanner(ff) + test := Test{name: path.Base(f.Name)} + for scanner.Scan() { + line := scanner.Text() + if len(line) <= 1 || line[0] == '#' { + if m := versionRe.FindStringSubmatch(line); m != nil { + if m[1] != gen.UnicodeVersion() { + log.Printf("warning:%s: version is %s; want %s", f.Name, m[1], gen.UnicodeVersion()) + } + } + continue + } + m := testRe.FindStringSubmatch(line) + if m == nil || len(m) < 3 { + log.Fatalf(`Failed to parse: "%s" result: %#v`, line, m) + } + str := []byte{} + // In the regression test data (unpaired) surrogates are assigned a weight + // corresponding to their code point value. However, utf8.DecodeRune, + // which is used to compute the implicit weight, assigns FFFD to surrogates. + // We therefore skip tests with surrogates. This skips about 35 entries + // per test. + valid := true + for _, split := range strings.Split(m[1], " ") { + r, err := strconv.ParseUint(split, 16, 64) + Error(err) + valid = valid && utf8.ValidRune(rune(r)) + str = append(str, string(rune(r))...) + } + if valid { + test.str = append(test.str, str) + test.comment = append(test.comment, m[2]) + } + } + if scanner.Err() != nil { + log.Fatal(scanner.Err()) + } + tests = append(tests, test) + } + return tests +} + +var errorCount int + +func runes(b []byte) []rune { + return []rune(string(b)) +} + +var shifted = language.MustParse("und-u-ka-shifted-ks-level4") + +func doTest(t *testing.T, tc Test) { + bld := build.NewBuilder() + parseUCA(bld) + w, err := bld.Build() + Error(err) + var tag language.Tag + if !strings.Contains(tc.name, "NON_IGNOR") { + tag = shifted + } + c := NewFromTable(w, OptionsFromTag(tag)) + b := &Buffer{} + prev := tc.str[0] + for i := 1; i < len(tc.str); i++ { + b.Reset() + s := tc.str[i] + ka := c.Key(b, prev) + kb := c.Key(b, s) + if r := bytes.Compare(ka, kb); r == 1 { + t.Errorf("%s:%d: Key(%.4X) < Key(%.4X) (%X < %X) == %d; want -1 or 0", tc.name, i, []rune(string(prev)), []rune(string(s)), ka, kb, r) + prev = s + continue + } + if r := c.Compare(prev, s); r == 1 { + t.Errorf("%s:%d: Compare(%.4X, %.4X) == %d; want -1 or 0", tc.name, i, runes(prev), runes(s), r) + } + if r := c.Compare(s, prev); r == -1 { + t.Errorf("%s:%d: Compare(%.4X, %.4X) == %d; want 1 or 0", tc.name, i, runes(s), runes(prev), r) + } + prev = s + } +} diff --git a/vendor/golang.org/x/text/collate/sort.go b/vendor/golang.org/x/text/collate/sort.go new file mode 100644 index 000000000..62f1e75a3 --- /dev/null +++ b/vendor/golang.org/x/text/collate/sort.go @@ -0,0 +1,81 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package collate + +import ( + "bytes" + "sort" +) + +const ( + maxSortBuffer = 40960 + maxSortEntries = 4096 +) + +type swapper interface { + Swap(i, j int) +} + +type sorter struct { + buf *Buffer + keys [][]byte + src swapper +} + +func (s *sorter) init(n int) { + if s.buf == nil { + s.buf = &Buffer{} + s.buf.init() + } + if cap(s.keys) < n { + s.keys = make([][]byte, n) + } + s.keys = s.keys[0:n] +} + +func (s *sorter) sort(src swapper) { + s.src = src + sort.Sort(s) +} + +func (s sorter) Len() int { + return len(s.keys) +} + +func (s sorter) Less(i, j int) bool { + return bytes.Compare(s.keys[i], s.keys[j]) == -1 +} + +func (s sorter) Swap(i, j int) { + s.keys[i], s.keys[j] = s.keys[j], s.keys[i] + s.src.Swap(i, j) +} + +// A Lister can be sorted by Collator's Sort method. +type Lister interface { + Len() int + Swap(i, j int) + // Bytes returns the bytes of the text at index i. + Bytes(i int) []byte +} + +// Sort uses sort.Sort to sort the strings represented by x using the rules of c. +func (c *Collator) Sort(x Lister) { + n := x.Len() + c.sorter.init(n) + for i := 0; i < n; i++ { + c.sorter.keys[i] = c.Key(c.sorter.buf, x.Bytes(i)) + } + c.sorter.sort(x) +} + +// SortStrings uses sort.Sort to sort the strings in x using the rules of c. +func (c *Collator) SortStrings(x []string) { + c.sorter.init(len(x)) + for i, s := range x { + c.sorter.keys[i] = c.KeyFromString(c.sorter.buf, s) + } + c.sorter.sort(sort.StringSlice(x)) +} diff --git a/vendor/golang.org/x/text/collate/sort_test.go b/vendor/golang.org/x/text/collate/sort_test.go new file mode 100644 index 000000000..d9e7f31cc --- /dev/null +++ b/vendor/golang.org/x/text/collate/sort_test.go @@ -0,0 +1,55 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package collate_test + +import ( + "fmt" + "testing" + + "golang.org/x/text/collate" + "golang.org/x/text/language" +) + +func ExampleCollator_Strings() { + c := collate.New(language.Und) + strings := []string{ + "ad", + "ab", + "äb", + "ac", + } + c.SortStrings(strings) + fmt.Println(strings) + // Output: [ab äb ac ad] +} + +type sorter []string + +func (s sorter) Len() int { + return len(s) +} + +func (s sorter) Swap(i, j int) { + s[j], s[i] = s[i], s[j] +} + +func (s sorter) Bytes(i int) []byte { + return []byte(s[i]) +} + +func TestSort(t *testing.T) { + c := collate.New(language.English) + strings := []string{ + "bcd", + "abc", + "ddd", + } + c.Sort(sorter(strings)) + res := fmt.Sprint(strings) + want := "[abc bcd ddd]" + if res != want { + t.Errorf("found %s; want %s", res, want) + } +} diff --git a/vendor/golang.org/x/text/collate/table_test.go b/vendor/golang.org/x/text/collate/table_test.go new file mode 100644 index 000000000..3a6b12fd6 --- /dev/null +++ b/vendor/golang.org/x/text/collate/table_test.go @@ -0,0 +1,291 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package collate + +import ( + "testing" + + "golang.org/x/text/collate/build" + "golang.org/x/text/internal/colltab" + "golang.org/x/text/unicode/norm" +) + +type ColElems []Weights + +type input struct { + str string + ces [][]int +} + +type check struct { + in string + n int + out ColElems +} + +type tableTest struct { + in []input + chk []check +} + +func w(ce ...int) Weights { + return W(ce...) +} + +var defaults = w(0) + +func pt(p, t int) []int { + return []int{p, defaults.Secondary, t} +} + +func makeTable(in []input) (*Collator, error) { + b := build.NewBuilder() + for _, r := range in { + if e := b.Add([]rune(r.str), r.ces, nil); e != nil { + panic(e) + } + } + t, err := b.Build() + if err != nil { + return nil, err + } + return NewFromTable(t), nil +} + +// modSeq holds a seqeunce of modifiers in increasing order of CCC long enough +// to cause a segment overflow if not handled correctly. The last rune in this +// list has a CCC of 214. +var modSeq = []rune{ + 0x05B1, 0x05B2, 0x05B3, 0x05B4, 0x05B5, 0x05B6, 0x05B7, 0x05B8, 0x05B9, 0x05BB, + 0x05BC, 0x05BD, 0x05BF, 0x05C1, 0x05C2, 0xFB1E, 0x064B, 0x064C, 0x064D, 0x064E, + 0x064F, 0x0650, 0x0651, 0x0652, 0x0670, 0x0711, 0x0C55, 0x0C56, 0x0E38, 0x0E48, + 0x0EB8, 0x0EC8, 0x0F71, 0x0F72, 0x0F74, 0x0321, 0x1DCE, +} + +var mods []input +var modW = func() ColElems { + ws := ColElems{} + for _, r := range modSeq { + rune := norm.NFC.PropertiesString(string(r)) + ws = append(ws, w(0, int(rune.CCC()))) + mods = append(mods, input{string(r), [][]int{{0, int(rune.CCC())}}}) + } + return ws +}() + +var appendNextTests = []tableTest{ + { // test getWeights + []input{ + {"a", [][]int{{100}}}, + {"b", [][]int{{105}}}, + {"c", [][]int{{110}}}, + {"ß", [][]int{{120}}}, + }, + []check{ + {"a", 1, ColElems{w(100)}}, + {"b", 1, ColElems{w(105)}}, + {"c", 1, ColElems{w(110)}}, + {"d", 1, ColElems{w(0x50064)}}, + {"ab", 1, ColElems{w(100)}}, + {"bc", 1, ColElems{w(105)}}, + {"dd", 1, ColElems{w(0x50064)}}, + {"ß", 2, ColElems{w(120)}}, + }, + }, + { // test expansion + []input{ + {"u", [][]int{{100}}}, + {"U", [][]int{{100}, {0, 25}}}, + {"w", [][]int{{100}, {100}}}, + {"W", [][]int{{100}, {0, 25}, {100}, {0, 25}}}, + }, + []check{ + {"u", 1, ColElems{w(100)}}, + {"U", 1, ColElems{w(100), w(0, 25)}}, + {"w", 1, ColElems{w(100), w(100)}}, + {"W", 1, ColElems{w(100), w(0, 25), w(100), w(0, 25)}}, + }, + }, + { // test decompose + []input{ + {"D", [][]int{pt(104, 8)}}, + {"z", [][]int{pt(130, 8)}}, + {"\u030C", [][]int{{0, 40}}}, // Caron + {"\u01C5", [][]int{pt(104, 9), pt(130, 4), {0, 40, 0x1F}}}, // Dž = D+z+caron + }, + []check{ + {"\u01C5", 2, ColElems{w(pt(104, 9)...), w(pt(130, 4)...), w(0, 40, 0x1F)}}, + }, + }, + { // test basic contraction + []input{ + {"a", [][]int{{100}}}, + {"ab", [][]int{{101}}}, + {"aab", [][]int{{101}, {101}}}, + {"abc", [][]int{{102}}}, + {"b", [][]int{{200}}}, + {"c", [][]int{{300}}}, + {"d", [][]int{{400}}}, + }, + []check{ + {"a", 1, ColElems{w(100)}}, + {"aa", 1, ColElems{w(100)}}, + {"aac", 1, ColElems{w(100)}}, + {"d", 1, ColElems{w(400)}}, + {"ab", 2, ColElems{w(101)}}, + {"abb", 2, ColElems{w(101)}}, + {"aab", 3, ColElems{w(101), w(101)}}, + {"aaba", 3, ColElems{w(101), w(101)}}, + {"abc", 3, ColElems{w(102)}}, + {"abcd", 3, ColElems{w(102)}}, + }, + }, + { // test discontinuous contraction + append(mods, []input{ + // modifiers; secondary weight equals ccc + {"\u0316", [][]int{{0, 220}}}, + {"\u0317", [][]int{{0, 220}, {0, 220}}}, + {"\u302D", [][]int{{0, 222}}}, + {"\u302E", [][]int{{0, 225}}}, // used as starter + {"\u302F", [][]int{{0, 224}}}, // used as starter + {"\u18A9", [][]int{{0, 228}}}, + {"\u0300", [][]int{{0, 230}}}, + {"\u0301", [][]int{{0, 230}}}, + {"\u0315", [][]int{{0, 232}}}, + {"\u031A", [][]int{{0, 232}}}, + {"\u035C", [][]int{{0, 233}}}, + {"\u035F", [][]int{{0, 233}}}, + {"\u035D", [][]int{{0, 234}}}, + {"\u035E", [][]int{{0, 234}}}, + {"\u0345", [][]int{{0, 240}}}, + + // starters + {"a", [][]int{{100}}}, + {"b", [][]int{{200}}}, + {"c", [][]int{{300}}}, + {"\u03B1", [][]int{{900}}}, + {"\x01", [][]int{{0, 0, 0, 0}}}, + + // contractions + {"a\u0300", [][]int{{101}}}, + {"a\u0301", [][]int{{102}}}, + {"a\u035E", [][]int{{110}}}, + {"a\u035Eb\u035E", [][]int{{115}}}, + {"ac\u035Eaca\u035E", [][]int{{116}}}, + {"a\u035Db\u035D", [][]int{{117}}}, + {"a\u0301\u035Db", [][]int{{120}}}, + {"a\u0301\u035F", [][]int{{121}}}, + {"a\u0301\u035Fb", [][]int{{119}}}, + {"\u03B1\u0345", [][]int{{901}, {902}}}, + {"\u302E\u302F", [][]int{{0, 131}, {0, 131}}}, + {"\u302F\u18A9", [][]int{{0, 130}}}, + }...), + []check{ + {"a\x01\u0300", 1, ColElems{w(100)}}, + {"ab", 1, ColElems{w(100)}}, // closing segment + {"a\u0316\u0300b", 5, ColElems{w(101), w(0, 220)}}, // closing segment + {"a\u0316\u0300", 5, ColElems{w(101), w(0, 220)}}, // no closing segment + {"a\u0316\u0300\u035Cb", 5, ColElems{w(101), w(0, 220)}}, // completes before segment end + {"a\u0316\u0300\u035C", 5, ColElems{w(101), w(0, 220)}}, // completes before segment end + + {"a\u0316\u0301b", 5, ColElems{w(102), w(0, 220)}}, // closing segment + {"a\u0316\u0301", 5, ColElems{w(102), w(0, 220)}}, // no closing segment + {"a\u0316\u0301\u035Cb", 5, ColElems{w(102), w(0, 220)}}, // completes before segment end + {"a\u0316\u0301\u035C", 5, ColElems{w(102), w(0, 220)}}, // completes before segment end + + // match blocked by modifier with same ccc + {"a\u0301\u0315\u031A\u035Fb", 3, ColElems{w(102)}}, + + // multiple gaps + {"a\u0301\u035Db", 6, ColElems{w(120)}}, + {"a\u0301\u035F", 5, ColElems{w(121)}}, + {"a\u0301\u035Fb", 6, ColElems{w(119)}}, + {"a\u0316\u0301\u035F", 7, ColElems{w(121), w(0, 220)}}, + {"a\u0301\u0315\u035Fb", 7, ColElems{w(121), w(0, 232)}}, + {"a\u0316\u0301\u0315\u035Db", 5, ColElems{w(102), w(0, 220)}}, + {"a\u0316\u0301\u0315\u035F", 9, ColElems{w(121), w(0, 220), w(0, 232)}}, + {"a\u0316\u0301\u0315\u035Fb", 9, ColElems{w(121), w(0, 220), w(0, 232)}}, + {"a\u0316\u0301\u0315\u035F\u035D", 9, ColElems{w(121), w(0, 220), w(0, 232)}}, + {"a\u0316\u0301\u0315\u035F\u035Db", 9, ColElems{w(121), w(0, 220), w(0, 232)}}, + + // handling of segment overflow + { // just fits within segment + "a" + string(modSeq[:30]) + "\u0301", + 3 + len(string(modSeq[:30])), + append(ColElems{w(102)}, modW[:30]...), + }, + {"a" + string(modSeq[:31]) + "\u0301", 1, ColElems{w(100)}}, // overflow + {"a" + string(modSeq) + "\u0301", 1, ColElems{w(100)}}, + { // just fits within segment with two interstitial runes + "a" + string(modSeq[:28]) + "\u0301\u0315\u035F", + 7 + len(string(modSeq[:28])), + append(append(ColElems{w(121)}, modW[:28]...), w(0, 232)), + }, + { // second half does not fit within segment + "a" + string(modSeq[:29]) + "\u0301\u0315\u035F", + 3 + len(string(modSeq[:29])), + append(ColElems{w(102)}, modW[:29]...), + }, + + // discontinuity can only occur in last normalization segment + {"a\u035Eb\u035E", 6, ColElems{w(115)}}, + {"a\u0316\u035Eb\u035E", 5, ColElems{w(110), w(0, 220)}}, + {"a\u035Db\u035D", 6, ColElems{w(117)}}, + {"a\u0316\u035Db\u035D", 1, ColElems{w(100)}}, + {"a\u035Eb\u0316\u035E", 8, ColElems{w(115), w(0, 220)}}, + {"a\u035Db\u0316\u035D", 8, ColElems{w(117), w(0, 220)}}, + {"ac\u035Eaca\u035E", 9, ColElems{w(116)}}, + {"a\u0316c\u035Eaca\u035E", 1, ColElems{w(100)}}, + {"ac\u035Eac\u0316a\u035E", 1, ColElems{w(100)}}, + + // expanding contraction + {"\u03B1\u0345", 4, ColElems{w(901), w(902)}}, + + // Theoretical possibilities + // contraction within a gap + {"a\u302F\u18A9\u0301", 9, ColElems{w(102), w(0, 130)}}, + // expansion within a gap + {"a\u0317\u0301", 5, ColElems{w(102), w(0, 220), w(0, 220)}}, + // repeating CCC blocks last modifier + {"a\u302E\u302F\u0301", 1, ColElems{w(100)}}, + // The trailing combining characters (with lower CCC) should block the first one. + // TODO: make the following pass. + // {"a\u035E\u0316\u0316", 1, ColElems{w(100)}}, + {"a\u035F\u035Eb", 5, ColElems{w(110), w(0, 233)}}, + // Last combiner should match after normalization. + // TODO: make the following pass. + // {"a\u035D\u0301", 3, ColElems{w(102), w(0, 234)}}, + // The first combiner is blocking the second one as they have the same CCC. + {"a\u035D\u035Eb", 1, ColElems{w(100)}}, + }, + }, +} + +func TestAppendNext(t *testing.T) { + for i, tt := range appendNextTests { + c, err := makeTable(tt.in) + if err != nil { + t.Errorf("%d: error creating table: %v", i, err) + continue + } + for j, chk := range tt.chk { + ws, n := c.t.AppendNext(nil, []byte(chk.in)) + if n != chk.n { + t.Errorf("%d:%d: bytes consumed was %d; want %d", i, j, n, chk.n) + } + out := convertFromWeights(chk.out) + if len(ws) != len(out) { + t.Errorf("%d:%d: len(ws) was %d; want %d (%X vs %X)\n%X", i, j, len(ws), len(out), ws, out, chk.in) + continue + } + for k, w := range ws { + w, _ = colltab.MakeElem(w.Primary(), w.Secondary(), int(w.Tertiary()), 0) + if w != out[k] { + t.Errorf("%d:%d: Weights %d was %X; want %X", i, j, k, w, out[k]) + } + } + } + } +} diff --git a/vendor/golang.org/x/text/collate/tables.go b/vendor/golang.org/x/text/collate/tables.go new file mode 100644 index 000000000..9ec4f3d49 --- /dev/null +++ b/vendor/golang.org/x/text/collate/tables.go @@ -0,0 +1,73789 @@ +// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. + +package collate + +// UnicodeVersion is the Unicode version from which the tables in this package are derived. +const UnicodeVersion = "6.2.0" + +// CLDRVersion is the CLDR version from which the tables in this package are derived. +const CLDRVersion = "23" + +var availableLocales = "und,aa,af,ar,as,az,be,bg,bn,bs,bs-Cyrl,ca,cs,cy,da,de-u-co-phonebk,de,dz,ee,el,en,en-US,en-US-u-va-posix,eo,es,et,fa,fa-AF,fi,fi-u-co-standard,fil,fo,fr,fr-CA,gu,ha,haw,he,hi,hr,hu,hy,ig,is,ja,kk,kl,km,kn,ko,kok,ln-u-co-phonetic,ln,lt,lv,mk,ml,mr,mt,my,nb,nn,nso,om,or,pa,pl,ps,ro,ru,se,si,sk,sl,sq,sr,sr-Latn,ssy,sv,sv-u-co-standard,ta,te,th,tn,to,tr,uk,ur,vi,wae,yo,zh,zh-u-co-stroke,zh-Hant-u-co-pinyin,zh-Hant" + +const varTop = 0x30e + +var locales = [...]tableIndex{ + { // und + lookupOffset: 0x15, + valuesOffset: 0x0, + }, + { // aa + lookupOffset: 0x1c, + valuesOffset: 0x1b4, + }, + { // af + lookupOffset: 0x1d, + valuesOffset: 0x0, + }, + { // ar + lookupOffset: 0x1f, + valuesOffset: 0x0, + }, + { // as + lookupOffset: 0x21, + valuesOffset: 0x0, + }, + { // az + lookupOffset: 0x27, + valuesOffset: 0x1d7, + }, + { // be + lookupOffset: 0x28, + valuesOffset: 0x0, + }, + { // bg + lookupOffset: 0x15, + valuesOffset: 0x0, + }, + { // bn + lookupOffset: 0x2a, + valuesOffset: 0x0, + }, + { // bs + lookupOffset: 0x15, + valuesOffset: 0x0, + }, + { // bs-Cyrl + lookupOffset: 0x15, + valuesOffset: 0x0, + }, + { // ca + lookupOffset: 0x2b, + valuesOffset: 0x1ec, + }, + { // cs + lookupOffset: 0x2d, + valuesOffset: 0x1f0, + }, + { // cy + lookupOffset: 0x15, + valuesOffset: 0x1f5, + }, + { // da + lookupOffset: 0x30, + valuesOffset: 0x1f7, + }, + { // de-u-co-phonebk + lookupOffset: 0x32, + valuesOffset: 0x201, + }, + { // de + lookupOffset: 0x15, + valuesOffset: 0x0, + }, + { // dz + lookupOffset: 0x34, + valuesOffset: 0x0, + }, + { // ee + lookupOffset: 0x3a, + valuesOffset: 0x20a, + }, + { // el + lookupOffset: 0x15, + valuesOffset: 0x0, + }, + { // en + lookupOffset: 0x15, + valuesOffset: 0x0, + }, + { // en-US + lookupOffset: 0x15, + valuesOffset: 0x0, + }, + { // en-US-u-va-posix + lookupOffset: 0x41, + valuesOffset: 0x219, + }, + { // eo + lookupOffset: 0x42, + valuesOffset: 0x23b, + }, + { // es + lookupOffset: 0x43, + valuesOffset: 0x23f, + }, + { // et + lookupOffset: 0x49, + valuesOffset: 0x242, + }, + { // fa + lookupOffset: 0x4b, + valuesOffset: 0x0, + }, + { // fa-AF + lookupOffset: 0x15, + valuesOffset: 0x0, + }, + { // fi + lookupOffset: 0x4e, + valuesOffset: 0x25a, + }, + { // fi-u-co-standard + lookupOffset: 0x54, + valuesOffset: 0x265, + }, + { // fil + lookupOffset: 0x43, + valuesOffset: 0x272, + }, + { // fo + lookupOffset: 0x30, + valuesOffset: 0x1f7, + }, + { // fr + lookupOffset: 0x15, + valuesOffset: 0x0, + }, + { // fr-CA + lookupOffset: 0x15, + valuesOffset: 0x0, + }, + { // gu + lookupOffset: 0x56, + valuesOffset: 0x0, + }, + { // ha + lookupOffset: 0x57, + valuesOffset: 0x275, + }, + { // haw + lookupOffset: 0x5e, + valuesOffset: 0x27a, + }, + { // he + lookupOffset: 0x5f, + valuesOffset: 0x0, + }, + { // hi + lookupOffset: 0x61, + valuesOffset: 0x0, + }, + { // hr + lookupOffset: 0x63, + valuesOffset: 0x291, + }, + { // hu + lookupOffset: 0x65, + valuesOffset: 0x297, + }, + { // hy + lookupOffset: 0x66, + valuesOffset: 0x0, + }, + { // ig + lookupOffset: 0x68, + valuesOffset: 0x29f, + }, + { // is + lookupOffset: 0x6a, + valuesOffset: 0x2a3, + }, + { // ja + lookupOffset: 0x76, + valuesOffset: 0x0, + }, + { // kk + lookupOffset: 0x77, + valuesOffset: 0x0, + }, + { // kl + lookupOffset: 0x78, + valuesOffset: 0x414, + }, + { // km + lookupOffset: 0x7a, + valuesOffset: 0x0, + }, + { // kn + lookupOffset: 0x7c, + valuesOffset: 0x0, + }, + { // ko + lookupOffset: 0x88, + valuesOffset: 0x0, + }, + { // kok + lookupOffset: 0x8a, + valuesOffset: 0x0, + }, + { // ln-u-co-phonetic + lookupOffset: 0x8b, + valuesOffset: 0x570, + }, + { // ln + lookupOffset: 0x8b, + valuesOffset: 0x0, + }, + { // lt + lookupOffset: 0x91, + valuesOffset: 0x574, + }, + { // lv + lookupOffset: 0x93, + valuesOffset: 0x582, + }, + { // mk + lookupOffset: 0x15, + valuesOffset: 0x0, + }, + { // ml + lookupOffset: 0x95, + valuesOffset: 0x0, + }, + { // mr + lookupOffset: 0x97, + valuesOffset: 0x0, + }, + { // mt + lookupOffset: 0x9a, + valuesOffset: 0x58a, + }, + { // my + lookupOffset: 0x9c, + valuesOffset: 0x0, + }, + { // nb + lookupOffset: 0x30, + valuesOffset: 0x593, + }, + { // nn + lookupOffset: 0x30, + valuesOffset: 0x593, + }, + { // nso + lookupOffset: 0x9e, + valuesOffset: 0x595, + }, + { // om + lookupOffset: 0x15, + valuesOffset: 0x59b, + }, + { // or + lookupOffset: 0xa0, + valuesOffset: 0x0, + }, + { // pa + lookupOffset: 0xa2, + valuesOffset: 0x0, + }, + { // pl + lookupOffset: 0xa4, + valuesOffset: 0x5a1, + }, + { // ps + lookupOffset: 0xa7, + valuesOffset: 0x0, + }, + { // ro + lookupOffset: 0xa9, + valuesOffset: 0x5b3, + }, + { // ru + lookupOffset: 0x15, + valuesOffset: 0x0, + }, + { // se + lookupOffset: 0xab, + valuesOffset: 0x5ba, + }, + { // si + lookupOffset: 0xad, + valuesOffset: 0x0, + }, + { // sk + lookupOffset: 0xaf, + valuesOffset: 0x5c7, + }, + { // sl + lookupOffset: 0xb0, + valuesOffset: 0x5cc, + }, + { // sq + lookupOffset: 0xb2, + valuesOffset: 0x5cf, + }, + { // sr + lookupOffset: 0x15, + valuesOffset: 0x0, + }, + { // sr-Latn + lookupOffset: 0x15, + valuesOffset: 0x0, + }, + { // ssy + lookupOffset: 0x1c, + valuesOffset: 0x1b4, + }, + { // sv + lookupOffset: 0xb4, + valuesOffset: 0x5d3, + }, + { // sv-u-co-standard + lookupOffset: 0xb6, + valuesOffset: 0x5d9, + }, + { // ta + lookupOffset: 0xb8, + valuesOffset: 0x0, + }, + { // te + lookupOffset: 0xba, + valuesOffset: 0x0, + }, + { // th + lookupOffset: 0xbc, + valuesOffset: 0x0, + }, + { // tn + lookupOffset: 0x9e, + valuesOffset: 0x595, + }, + { // to + lookupOffset: 0xbe, + valuesOffset: 0x5e1, + }, + { // tr + lookupOffset: 0xc4, + valuesOffset: 0x5ed, + }, + { // uk + lookupOffset: 0xc5, + valuesOffset: 0x0, + }, + { // ur + lookupOffset: 0xc7, + valuesOffset: 0x0, + }, + { // vi + lookupOffset: 0xc9, + valuesOffset: 0x5fc, + }, + { // wae + lookupOffset: 0xca, + valuesOffset: 0x610, + }, + { // yo + lookupOffset: 0xcc, + valuesOffset: 0x613, + }, + { // zh + lookupOffset: 0xe6, + valuesOffset: 0x618, + }, + { // zh-u-co-stroke + lookupOffset: 0xff, + valuesOffset: 0x618, + }, + { // zh-Hant-u-co-pinyin + lookupOffset: 0xe6, + valuesOffset: 0x618, + }, + { // zh-Hant + lookupOffset: 0xff, + valuesOffset: 0x618, + }, +} + +// mainExpandElem: 46864 entries, 187456 bytes +var mainExpandElem = [46864]uint32{ + // Block 0, offset 0x0 + 0x00000002, 0xAE604702, 0xAE603202, 0x00000002, 0xA000A51A, 0xA000BA1A, + 0x00000002, 0xA000A91A, 0xA000BA1A, 0x00000002, 0xA000AD1A, 0xA000BA1A, + 0x00000002, 0xA000B21A, 0xA000BA1A, 0x00000002, 0xA000B61A, 0xA000BA1A, + 0x00000002, 0xA000BA1A, 0xA000D11A, 0x00000004, 0x0003F484, 0x0029CE84, + 0x0029CC84, 0x0003F69F, 0x00000004, 0x0003F484, 0x0029CE84, 0x0029CE84, + 0x0003F69F, 0x00000004, 0x0003F484, 0x0029CE84, 0x0029D084, 0x0003F69F, + 0x00000004, 0x0003F484, 0x0029CE84, 0x0029D284, 0x0003F69F, 0x00000004, + 0x0003F484, 0x0029CE84, 0x0029D484, 0x0003F69F, 0x00000004, 0x0003F484, + 0x0029CE84, 0x0029D684, 0x0003F69F, 0x00000004, 0x0003F484, 0x0029CE84, + 0x0029D884, 0x0003F69F, 0x00000004, 0x0003F484, 0x0029CE84, 0x0029DA84, + 0x0003F69F, 0x00000004, 0x0003F484, 0x0029CE84, + // Block 1, offset 0x40 + 0x0029DC84, 0x0003F69F, 0x00000004, 0x0003F484, 0x0029CE84, 0x0029DE84, + 0x0003F69F, 0x00000004, 0x0003F484, 0x0029D084, 0x0029CC84, 0x0003F69F, + 0x00000004, 0x0003F484, 0x0062AC84, 0x0063A884, 0x0003F69F, 0x00000004, + 0x0003F484, 0x0062B084, 0x0063A884, 0x0003F69F, 0x00000004, 0x0003F484, + 0x0062B284, 0x0063A884, 0x0003F69F, 0x00000004, 0x0003F484, 0x0062B684, + 0x0063A884, 0x0003F69F, 0x00000004, 0x0003F484, 0x0062B884, 0x0063A884, + 0x0003F69F, 0x00000004, 0x0003F484, 0x0062BA84, 0x0063A884, 0x0003F69F, + 0x00000004, 0x0003F484, 0x0062BE84, 0x0063A884, 0x0003F69F, 0x00000004, + 0x0003F484, 0x0062C284, 0x0063A884, 0x0003F69F, 0x00000007, 0x0003F484, + 0x0062C284, 0x0063B884, 0x0062C484, 0x0063B084, 0x00646A84, 0x0003F69F, + 0x00000006, 0x0003F484, 0x0062C284, 0x0063B884, + // Block 2, offset 0x80 + 0x0062D084, 0x0063C284, 0x0003F69F, 0x00000004, 0x0003F484, 0x0062C484, + 0x0063A884, 0x0003F69F, 0x00000004, 0x0003F484, 0x0062C484, 0x0063C284, + 0x0003F69F, 0x00000004, 0x0003F484, 0x0062C884, 0x0063A884, 0x0003F69F, + 0x00000004, 0x0003F484, 0x0062CA84, 0x0063A884, 0x0003F69F, 0x00000004, + 0x0003F484, 0x0062CC84, 0x0063A884, 0x0003F69F, 0x00000004, 0x0003F484, + 0x0062CE84, 0x0063A884, 0x0003F69F, 0x00000004, 0x0003F484, 0x0062D084, + 0x0063A884, 0x0003F69F, 0x00000004, 0x00050E84, 0x00050E84, 0x00050E84, + 0x00050E9F, 0x00000002, 0x40062C20, 0xAE603202, 0x00000002, 0x40062C20, + 0xAE603502, 0x00000002, 0x40062C20, 0xAE604502, 0x00000002, 0x40063620, + 0xAE603202, 0x00000002, 0x40063620, 0xAE603502, 0x00000002, 0x40063620, + 0xAE604502, 0x00000002, 0x40063820, 0xAE603202, + // Block 3, offset 0xc0 + 0x00000002, 0x40063820, 0xAE603502, 0x00000002, 0x40063820, 0xAE604502, + 0x00000002, 0x40084420, 0xA0105402, 0x00000002, 0x40084620, 0xA0105402, + 0x00000002, 0x40084C20, 0xA0105402, 0x00000002, 0x4008B820, 0xA0105402, + 0x00000002, 0x4008BC20, 0xA0105402, 0x00000002, 0x4008C020, 0xA0105402, + 0x00000002, 0x40091E20, 0xA0105402, 0x00000002, 0x40092620, 0xA0105402, + 0x00000002, 0x40092A20, 0xA0105402, 0x00000002, 0x40094020, 0xA0105402, + 0x00000002, 0x40094220, 0xA0105402, 0x00000002, 0x40094420, 0xA0105402, + 0x00000002, 0x40097820, 0xA0105402, 0x00000002, 0x40097A20, 0xA0105402, + 0x00000004, 0x00098484, 0x00098484, 0x00098484, 0x0009849F, 0x00000002, + 0x40099E20, 0xA0105402, 0x00000002, 0x4009AA20, 0xA0105402, 0x00000002, + 0x4009AC20, 0xA0105402, 0x00000002, 0x4009B020, + // Block 4, offset 0x100 + 0xA0105402, 0x00000002, 0x4009B820, 0xA0105402, 0x00000002, 0x4009DE20, + 0xA0105402, 0x00000002, 0x4009E220, 0xA0105402, 0x00000002, 0x4009E420, + 0xA0105402, 0x00000002, 0x4009F420, 0xA0105402, 0x00000002, 0x4009F620, + 0xA0105402, 0x00000002, 0x4009F820, 0xA0105402, 0x00000002, 0x4009FA20, + 0xA0105402, 0x00000002, 0x4009FC20, 0xA0105402, 0x00000002, 0x4009FE20, + 0xA0105402, 0x00000002, 0x400A0020, 0xA0105402, 0x00000002, 0x400A0220, + 0xA0105402, 0x00000002, 0x400A0820, 0xA0105402, 0x00000002, 0x400A0A20, + 0xA0105402, 0x00000002, 0x400A0C20, 0xA0105402, 0x00000002, 0x400A0E20, + 0xA0105402, 0x00000002, 0x400A1E20, 0xA0105402, 0x00000002, 0x400A2020, + 0xA0105402, 0x00000002, 0x400A4020, 0xA0105402, 0x00000002, 0x400A4C20, + 0xA0105402, 0x00000002, 0x400A4E20, 0xA0105402, + // Block 5, offset 0x140 + 0x00000002, 0x400A5220, 0xA0105402, 0x00000002, 0x400A5820, 0xA0105402, + 0x00000002, 0x400A5A20, 0xA0105402, 0x00000002, 0x400A5C20, 0xA0105402, + 0x00000002, 0x400A5E20, 0xA0105402, 0x00000002, 0x40164620, 0xA0105402, + 0x00000002, 0x4027CE20, 0xA0012802, 0x00000002, 0x4027D020, 0xA0012802, + 0x00000002, 0x4027D420, 0xA0812802, 0x00000002, 0x4027D820, 0xA0812802, + 0x00000002, 0x4029CC20, 0xA0013F02, 0x00000002, 0x4029CC20, 0xA0014002, + 0x00000002, 0x4029CC20, 0xA0014202, 0x00000002, 0x4029CC20, 0xA0014402, + 0x00000002, 0x4029CC20, 0xA0014502, 0x00000002, 0x4029CC20, 0xA0014602, + 0x00000002, 0x4029CC20, 0xA0014702, 0x00000002, 0x4029CC20, 0xA0014802, + 0x00000002, 0x4029CC20, 0xA0014902, 0x00000002, 0x4029CC20, 0xA0014A02, + 0x00000002, 0x4029CC20, 0xA0014B02, 0x00000002, + // Block 6, offset 0x180 + 0x4029CC20, 0xA0014B02, 0x00000002, 0x4029CC20, 0xA0014C02, 0x00000002, + 0x4029CC20, 0xA0014D02, 0x00000002, 0x4029CC20, 0xA0014E02, 0x00000002, + 0x4029CC20, 0xA0014F02, 0x00000002, 0x4029CC20, 0xA0015002, 0x00000002, + 0x4029CC20, 0xA0015102, 0x00000002, 0x4029CC20, 0xA0015202, 0x00000002, + 0x4029CC20, 0xA0015302, 0x00000002, 0x4029CC20, 0xA0015402, 0x00000002, + 0x4029CC20, 0xA0015502, 0x00000002, 0x4029CC20, 0xA0015602, 0x00000002, + 0x0029CC84, 0xA0015604, 0x00000002, 0x4029CC20, 0xA0015702, 0x00000002, + 0x4029CC20, 0xA0015802, 0x00000002, 0x4029CC20, 0xA0015902, 0x00000002, + 0x4029CC20, 0xA0015A02, 0x00000002, 0x4029CC20, 0xA0015B02, 0x00000002, + 0x4029CC20, 0xA0015C02, 0x00000002, 0x4029CC20, 0xA0015D02, 0x00000002, + 0x4029CC20, 0xA0015E02, 0x00000002, 0x4029CC20, + // Block 7, offset 0x1c0 + 0xA0015F02, 0x00000002, 0x4029CC20, 0xA0016002, 0x00000002, 0x4029CC20, + 0xA0016102, 0x00000002, 0x4029CC20, 0xA0016202, 0x00000002, 0x4029CC20, + 0xA0016302, 0x00000002, 0x4029CC20, 0xA0016402, 0x00000002, 0x4029CC20, + 0xA0016502, 0x00000002, 0x4029CC20, 0xA0016602, 0x00000002, 0x4029CC20, + 0xA0016802, 0x00000002, 0x4029CC20, 0xA0017202, 0x00000002, 0x4029CC20, + 0xA0017302, 0x00000002, 0x4029CC20, 0xA0017402, 0x00000003, 0x0029CC9E, + 0x0009589E, 0x0029D29E, 0x00000002, 0x4029CE20, 0xA0013F02, 0x00000002, + 0x4029CE20, 0xA0014002, 0x00000002, 0x4029CE20, 0xA0014102, 0x00000002, + 0x4029CE20, 0xA0014202, 0x00000002, 0x4029CE20, 0xA0014302, 0x00000002, + 0x4029CE20, 0xA0014402, 0x00000002, 0x4029CE20, 0xA0014502, 0x00000002, + 0x4029CE20, 0xA0014602, 0x00000002, 0x4029CE20, + // Block 8, offset 0x200 + 0xA0014702, 0x00000002, 0x4029CE20, 0xA0014802, 0x00000002, 0x4029CE20, + 0xA0014902, 0x00000002, 0x4029CE20, 0xA0014A02, 0x00000002, 0x4029CE20, + 0xA0014B02, 0x00000002, 0x4029CE20, 0xA0014B02, 0x00000002, 0x4029CE20, + 0xA0014B02, 0x00000002, 0x4029CE20, 0xA0014C02, 0x00000002, 0x4029CE20, + 0xA0014D02, 0x00000002, 0x4029CE20, 0xA0014E02, 0x00000002, 0x4029CE20, + 0xA0014F02, 0x00000002, 0x4029CE20, 0xA0015002, 0x00000002, 0x4029CE20, + 0xA0015102, 0x00000002, 0x4029CE20, 0xA0015102, 0x00000002, 0x4029CE20, + 0xA0015202, 0x00000002, 0x4029CE20, 0xA0015302, 0x00000002, 0x4029CE20, + 0xA0015402, 0x00000002, 0x4029CE20, 0xA0015502, 0x00000002, 0x4029CE20, + 0xA0015602, 0x00000002, 0x0029CE84, 0xA0015604, 0x00000002, 0x4029CE20, + 0xA0015702, 0x00000002, 0x4029CE20, 0xA0015802, + // Block 9, offset 0x240 + 0x00000002, 0x4029CE20, 0xA0015902, 0x00000002, 0x4029CE20, 0xA0015A02, + 0x00000002, 0x4029CE20, 0xA0015B02, 0x00000002, 0x4029CE20, 0xA0015C02, + 0x00000002, 0x4029CE20, 0xA0015D02, 0x00000002, 0x4029CE20, 0xA0015E02, + 0x00000002, 0x4029CE20, 0xA0015F02, 0x00000002, 0x4029CE20, 0xA0016002, + 0x00000002, 0x4029CE20, 0xA0016102, 0x00000002, 0x4029CE20, 0xA0016202, + 0x00000002, 0x4029CE20, 0xA0016302, 0x00000002, 0x4029CE20, 0xA0016402, + 0x00000002, 0x4029CE20, 0xA0016502, 0x00000002, 0x4029CE20, 0xA0016602, + 0x00000002, 0x4029CE20, 0xA0016702, 0x00000002, 0x4029CE20, 0xA0016802, + 0x00000002, 0x4029CE20, 0xA0016802, 0x00000002, 0x4029CE20, 0xA0016802, + 0x00000002, 0x4029CE20, 0xA0016802, 0x00000002, 0x4029CE20, 0xA0016A02, + 0x00000002, 0x4029CE20, 0xA0016B02, 0x00000002, + // Block 10, offset 0x280 + 0x4029CE20, 0xA0016C02, 0x00000002, 0x4029CE20, 0xA0016C02, 0x00000002, + 0x4029CE20, 0xA0016C02, 0x00000002, 0x4029CE20, 0xA0016C02, 0x00000002, + 0x4029CE20, 0xA0016C02, 0x00000002, 0x4029CE20, 0xA0016C02, 0x00000002, + 0x4029CE20, 0xA0016D02, 0x00000002, 0x4029CE20, 0xA0016E02, 0x00000002, + 0x4029CE20, 0xA0016F02, 0x00000002, 0x4029CE20, 0xA0017002, 0x00000002, + 0x4029CE20, 0xA0017102, 0x00000002, 0x4029CE20, 0xA0017202, 0x00000002, + 0x4029CE20, 0xA0017302, 0x00000002, 0x4029CE20, 0xA0017402, 0x00000002, + 0x4029CE20, 0xA0017502, 0x00000002, 0x4029CE20, 0xA0017602, 0x00000002, + 0x4029CE20, 0xA0017702, 0x00000004, 0x0029CE9E, 0x0009589E, 0x0029CE9E, + 0x0029CC9E, 0x00000003, 0x0029CE9E, 0x0009589E, 0x0029D09E, 0x00000003, + 0x0029CE9E, 0x0009589E, 0x0029D29E, 0x00000003, + // Block 11, offset 0x2c0 + 0x0029CE9E, 0x0009589E, 0x0029D49E, 0x00000003, 0x0029CE9E, 0x0009589E, + 0x0029D69E, 0x00000003, 0x0029CE9E, 0x0009589E, 0x0029D89E, 0x00000003, + 0x0029CE9E, 0x0009589E, 0x0029DA9E, 0x00000003, 0x0029CE9E, 0x0009589E, + 0x0029DC9E, 0x00000003, 0x0029CE9E, 0x0009589E, 0x0029DE9E, 0x00000002, + 0x0029CE86, 0x0029CC86, 0x00000002, 0x0029CE86, 0x0029CC86, 0x00000002, + 0x0029CE86, 0x0029CC86, 0x00000002, 0x0029CE86, 0x0029CC86, 0x00000002, + 0x0029CE86, 0x0029CC86, 0x00000002, 0x0029CE86, 0x0029CE86, 0x00000002, + 0x0029CE86, 0x0029D086, 0x00000002, 0x0029CE86, 0x0029D286, 0x00000002, + 0x0029CE86, 0x0029D486, 0x00000002, 0x0029CE86, 0x0029D686, 0x00000002, + 0x0029CE86, 0x0029D886, 0x00000002, 0x0029CE86, 0x0029DA86, 0x00000002, + 0x0029CE86, 0x0029DC86, 0x00000002, 0x0029CE86, + // Block 12, offset 0x300 + 0x0029DE86, 0x00000002, 0x4029D020, 0xA0013F02, 0x00000002, 0x4029D020, + 0xA0014002, 0x00000002, 0x4029D020, 0xA0014102, 0x00000002, 0x4029D020, + 0xA0014202, 0x00000002, 0x4029D020, 0xA0014302, 0x00000002, 0x4029D020, + 0xA0014402, 0x00000002, 0x4029D020, 0xA0014502, 0x00000002, 0x4029D020, + 0xA0014602, 0x00000002, 0x4029D020, 0xA0014702, 0x00000002, 0x4029D020, + 0xA0014802, 0x00000002, 0x4029D020, 0xA0014902, 0x00000002, 0x4029D020, + 0xA0014A02, 0x00000002, 0x4029D020, 0xA0014B02, 0x00000002, 0x4029D020, + 0xA0014B02, 0x00000002, 0x4029D020, 0xA0014B02, 0x00000002, 0x4029D020, + 0xA0014C02, 0x00000002, 0x4029D020, 0xA0014D02, 0x00000002, 0x4029D020, + 0xA0014E02, 0x00000002, 0x4029D020, 0xA0014F02, 0x00000002, 0x4029D020, + 0xA0015002, 0x00000002, 0x4029D020, 0xA0015102, + // Block 13, offset 0x340 + 0x00000002, 0x4029D020, 0xA0015202, 0x00000002, 0x4029D020, 0xA0015302, + 0x00000002, 0x4029D020, 0xA0015402, 0x00000002, 0x4029D020, 0xA0015502, + 0x00000002, 0x4029D020, 0xA0015602, 0x00000002, 0x0029D084, 0xA0015604, + 0x00000002, 0x4029D020, 0xA0015702, 0x00000002, 0x4029D020, 0xA0015802, + 0x00000002, 0x4029D020, 0xA0015902, 0x00000002, 0x4029D020, 0xA0015A02, + 0x00000002, 0x4029D020, 0xA0015B02, 0x00000002, 0x4029D020, 0xA0015C02, + 0x00000002, 0x4029D020, 0xA0015D02, 0x00000002, 0x4029D020, 0xA0015E02, + 0x00000002, 0x4029D020, 0xA0015F02, 0x00000002, 0x4029D020, 0xA0016002, + 0x00000002, 0x4029D020, 0xA0016102, 0x00000002, 0x4029D020, 0xA0016202, + 0x00000002, 0x4029D020, 0xA0016302, 0x00000002, 0x4029D020, 0xA0016402, + 0x00000002, 0x4029D020, 0xA0016502, 0x00000002, + // Block 14, offset 0x380 + 0x4029D020, 0xA0016602, 0x00000002, 0x4029D020, 0xA0016702, 0x00000002, + 0x4029D020, 0xA0016802, 0x00000002, 0x4029D020, 0xA0016802, 0x00000002, + 0x4029D020, 0xA0016802, 0x00000002, 0x4029D020, 0xA0016802, 0x00000002, + 0x4029D020, 0xA0016B02, 0x00000002, 0x4029D020, 0xA0016C02, 0x00000002, + 0x4029D020, 0xA0016C02, 0x00000002, 0x4029D020, 0xA0016C02, 0x00000002, + 0x4029D020, 0xA0016C02, 0x00000002, 0x4029D020, 0xA0016C02, 0x00000002, + 0x4029D020, 0xA0016C02, 0x00000002, 0x4029D020, 0xA0016C02, 0x00000002, + 0x4029D020, 0xA0016C02, 0x00000002, 0x4029D020, 0xA0016C02, 0x00000002, + 0x4029D020, 0xA0016E02, 0x00000002, 0x4029D020, 0xA0016F02, 0x00000002, + 0x4029D020, 0xA0017002, 0x00000002, 0x4029D020, 0xA0017102, 0x00000002, + 0x4029D020, 0xA0017202, 0x00000002, 0x4029D020, + // Block 15, offset 0x3c0 + 0xA0017302, 0x00000002, 0x4029D020, 0xA0017402, 0x00000002, 0x4029D020, + 0xA0017502, 0x00000002, 0x4029D020, 0xA0017602, 0x00000002, 0x4029D020, + 0xA0017702, 0x00000003, 0x0029D09E, 0x0009589E, 0x0029D29E, 0x00000003, + 0x0029D09E, 0x0009589E, 0x0029D69E, 0x00000002, 0x0029D086, 0x0029CC86, + 0x00000002, 0x0029D086, 0x0029CC86, 0x00000002, 0x4029D220, 0xA0013F02, + 0x00000002, 0x4029D220, 0xA0014002, 0x00000002, 0x4029D220, 0xA0014102, + 0x00000002, 0x4029D220, 0xA0014202, 0x00000002, 0x4029D220, 0xA0014302, + 0x00000002, 0x4029D220, 0xA0014402, 0x00000002, 0x4029D220, 0xA0014502, + 0x00000002, 0x4029D220, 0xA0014602, 0x00000002, 0x4029D220, 0xA0014702, + 0x00000002, 0x4029D220, 0xA0014802, 0x00000002, 0x4029D220, 0xA0014902, + 0x00000002, 0x4029D220, 0xA0014A02, 0x00000002, + // Block 16, offset 0x400 + 0x4029D220, 0xA0014B02, 0x00000002, 0x4029D220, 0xA0014B02, 0x00000002, + 0x4029D220, 0xA0014B02, 0x00000002, 0x4029D220, 0xA0014C02, 0x00000002, + 0x4029D220, 0xA0014D02, 0x00000002, 0x4029D220, 0xA0014E02, 0x00000002, + 0x4029D220, 0xA0014F02, 0x00000002, 0x4029D220, 0xA0015002, 0x00000002, + 0x4029D220, 0xA0015102, 0x00000002, 0x4029D220, 0xA0015202, 0x00000002, + 0x4029D220, 0xA0015302, 0x00000002, 0x4029D220, 0xA0015402, 0x00000002, + 0x4029D220, 0xA0015502, 0x00000002, 0x4029D220, 0xA0015602, 0x00000002, + 0x0029D284, 0xA0015604, 0x00000002, 0x4029D220, 0xA0015702, 0x00000002, + 0x4029D220, 0xA0015802, 0x00000002, 0x4029D220, 0xA0015902, 0x00000002, + 0x4029D220, 0xA0015A02, 0x00000002, 0x4029D220, 0xA0015B02, 0x00000002, + 0x4029D220, 0xA0015C02, 0x00000002, 0x4029D220, + // Block 17, offset 0x440 + 0xA0015D02, 0x00000002, 0x4029D220, 0xA0015E02, 0x00000002, 0x4029D220, + 0xA0015F02, 0x00000002, 0x4029D220, 0xA0016002, 0x00000002, 0x4029D220, + 0xA0016102, 0x00000002, 0x4029D220, 0xA0016202, 0x00000002, 0x4029D220, + 0xA0016302, 0x00000002, 0x4029D220, 0xA0016402, 0x00000002, 0x4029D220, + 0xA0016502, 0x00000002, 0x4029D220, 0xA0016602, 0x00000002, 0x4029D220, + 0xA0016702, 0x00000002, 0x4029D220, 0xA0016C02, 0x00000002, 0x4029D220, + 0xA0016C02, 0x00000002, 0x4029D220, 0xA0016C02, 0x00000002, 0x4029D220, + 0xA0016C02, 0x00000002, 0x4029D220, 0xA0016C02, 0x00000002, 0x4029D220, + 0xA0016C02, 0x00000002, 0x4029D220, 0xA0016C02, 0x00000002, 0x4029D220, + 0xA0016C02, 0x00000002, 0x4029D220, 0xA0016C02, 0x00000002, 0x4029D220, + 0xA0016C02, 0x00000002, 0x4029D220, 0xA0016C02, + // Block 18, offset 0x480 + 0x00000002, 0x4029D220, 0xA0016C02, 0x00000002, 0x4029D220, 0xA0016C02, + 0x00000002, 0x4029D220, 0xA0016C02, 0x00000002, 0x4029D220, 0xA0016E02, + 0x00000002, 0x4029D220, 0xA0016F02, 0x00000002, 0x4029D220, 0xA0017002, + 0x00000002, 0x4029D220, 0xA0017102, 0x00000002, 0x4029D220, 0xA0017202, + 0x00000002, 0x4029D220, 0xA0017302, 0x00000002, 0x4029D220, 0xA0017402, + 0x00000002, 0x4029D220, 0xA0017502, 0x00000002, 0x4029D220, 0xA0017602, + 0x00000002, 0x4029D220, 0xA0017702, 0x00000003, 0x0029D29E, 0x0009589E, + 0x0029D49E, 0x00000003, 0x0029D29E, 0x0009589E, 0x0029D69E, 0x00000003, + 0x0029D29E, 0x0009589E, 0x0029DC9E, 0x00000002, 0x0029D286, 0x0029CC86, + 0x00000002, 0x4029D420, 0xA0013F02, 0x00000002, 0x4029D420, 0xA0014002, + 0x00000002, 0x4029D420, 0xA0014102, 0x00000002, + // Block 19, offset 0x4c0 + 0x4029D420, 0xA0014202, 0x00000002, 0x4029D420, 0xA0014302, 0x00000002, + 0x4029D420, 0xA0014402, 0x00000002, 0x4029D420, 0xA0014502, 0x00000002, + 0x4029D420, 0xA0014602, 0x00000002, 0x4029D420, 0xA0014702, 0x00000002, + 0x4029D420, 0xA0014802, 0x00000002, 0x4029D420, 0xA0014902, 0x00000002, + 0x4029D420, 0xA0014A02, 0x00000002, 0x4029D420, 0xA0014B02, 0x00000002, + 0x4029D420, 0xA0014C02, 0x00000002, 0x4029D420, 0xA0014D02, 0x00000002, + 0x4029D420, 0xA0014E02, 0x00000002, 0x4029D420, 0xA0014F02, 0x00000002, + 0x4029D420, 0xA0015002, 0x00000002, 0x4029D420, 0xA0015102, 0x00000002, + 0x4029D420, 0xA0015202, 0x00000002, 0x4029D420, 0xA0015302, 0x00000002, + 0x4029D420, 0xA0015402, 0x00000002, 0x4029D420, 0xA0015502, 0x00000002, + 0x4029D420, 0xA0015602, 0x00000002, 0x0029D484, + // Block 20, offset 0x500 + 0xA0015604, 0x00000002, 0x4029D420, 0xA0015702, 0x00000002, 0x4029D420, + 0xA0015802, 0x00000002, 0x4029D420, 0xA0015902, 0x00000002, 0x4029D420, + 0xA0015A02, 0x00000002, 0x4029D420, 0xA0015B02, 0x00000002, 0x4029D420, + 0xA0015C02, 0x00000002, 0x4029D420, 0xA0015D02, 0x00000002, 0x4029D420, + 0xA0015E02, 0x00000002, 0x4029D420, 0xA0015F02, 0x00000002, 0x4029D420, + 0xA0016002, 0x00000002, 0x4029D420, 0xA0016102, 0x00000002, 0x4029D420, + 0xA0016202, 0x00000002, 0x4029D420, 0xA0016302, 0x00000002, 0x4029D420, + 0xA0016402, 0x00000002, 0x4029D420, 0xA0016502, 0x00000002, 0x4029D420, + 0xA0016602, 0x00000002, 0x4029D420, 0xA0016702, 0x00000002, 0x4029D420, + 0xA0016C02, 0x00000002, 0x4029D420, 0xA0016C02, 0x00000002, 0x4029D420, + 0xA0016C02, 0x00000002, 0x4029D420, 0xA0016C02, + // Block 21, offset 0x540 + 0x00000002, 0x4029D420, 0xA0016C02, 0x00000002, 0x4029D420, 0xA0016C02, + 0x00000002, 0x4029D420, 0xA0016C02, 0x00000002, 0x4029D420, 0xA0016C02, + 0x00000002, 0x4029D420, 0xA0016C02, 0x00000002, 0x4029D420, 0xA0016C02, + 0x00000002, 0x4029D420, 0xA0016C02, 0x00000002, 0x4029D420, 0xA0016C02, + 0x00000002, 0x4029D420, 0xA0016C02, 0x00000002, 0x4029D420, 0xA0016C02, + 0x00000002, 0x4029D420, 0xA0016C02, 0x00000002, 0x4029D420, 0xA0017002, + 0x00000002, 0x4029D420, 0xA0017102, 0x00000002, 0x4029D420, 0xA0017202, + 0x00000002, 0x4029D420, 0xA0017302, 0x00000002, 0x4029D420, 0xA0017402, + 0x00000002, 0x4029D420, 0xA0017502, 0x00000002, 0x4029D420, 0xA0017602, + 0x00000002, 0x4029D420, 0xA0017702, 0x00000003, 0x0029D49E, 0x0009589E, + 0x0029D69E, 0x00000002, 0x0029D486, 0x0029CC86, + // Block 22, offset 0x580 + 0x00000002, 0x4029D620, 0xA0013F02, 0x00000002, 0x4029D620, 0xA0014002, + 0x00000002, 0x4029D620, 0xA0014102, 0x00000002, 0x4029D620, 0xA0014202, + 0x00000002, 0x4029D620, 0xA0014302, 0x00000002, 0x4029D620, 0xA0014402, + 0x00000002, 0x4029D620, 0xA0014502, 0x00000002, 0x4029D620, 0xA0014602, + 0x00000002, 0x4029D620, 0xA0014702, 0x00000002, 0x4029D620, 0xA0014802, + 0x00000002, 0x4029D620, 0xA0014902, 0x00000002, 0x4029D620, 0xA0014A02, + 0x00000002, 0x4029D620, 0xA0014B02, 0x00000002, 0x4029D620, 0xA0014C02, + 0x00000002, 0x4029D620, 0xA0014D02, 0x00000002, 0x4029D620, 0xA0014E02, + 0x00000002, 0x4029D620, 0xA0014F02, 0x00000002, 0x4029D620, 0xA0015002, + 0x00000002, 0x4029D620, 0xA0015102, 0x00000002, 0x4029D620, 0xA0015202, + 0x00000002, 0x4029D620, 0xA0015302, 0x00000002, + // Block 23, offset 0x5c0 + 0x4029D620, 0xA0015402, 0x00000002, 0x4029D620, 0xA0015502, 0x00000002, + 0x4029D620, 0xA0015602, 0x00000002, 0x0029D684, 0xA0015604, 0x00000002, + 0x4029D620, 0xA0015702, 0x00000002, 0x4029D620, 0xA0015802, 0x00000002, + 0x4029D620, 0xA0015902, 0x00000002, 0x4029D620, 0xA0015A02, 0x00000002, + 0x4029D620, 0xA0015B02, 0x00000002, 0x4029D620, 0xA0015C02, 0x00000002, + 0x4029D620, 0xA0015D02, 0x00000002, 0x4029D620, 0xA0015E02, 0x00000002, + 0x4029D620, 0xA0015F02, 0x00000002, 0x4029D620, 0xA0016002, 0x00000002, + 0x4029D620, 0xA0016102, 0x00000002, 0x4029D620, 0xA0016202, 0x00000002, + 0x4029D620, 0xA0016302, 0x00000002, 0x4029D620, 0xA0016402, 0x00000002, + 0x4029D620, 0xA0016502, 0x00000002, 0x4029D620, 0xA0016602, 0x00000002, + 0x4029D620, 0xA0016702, 0x00000002, 0x4029D620, + // Block 24, offset 0x600 + 0xA0016802, 0x00000002, 0x4029D620, 0xA0016802, 0x00000002, 0x4029D620, + 0xA0016802, 0x00000002, 0x4029D620, 0xA0016802, 0x00000002, 0x4029D620, + 0xA0016802, 0x00000002, 0x4029D620, 0xA0016A02, 0x00000002, 0x4029D620, + 0xA0016C02, 0x00000002, 0x4029D620, 0xA0016C02, 0x00000002, 0x4029D620, + 0xA0016C02, 0x00000002, 0x4029D620, 0xA0016C02, 0x00000002, 0x4029D620, + 0xA0016C02, 0x00000002, 0x4029D620, 0xA0016C02, 0x00000002, 0x4029D620, + 0xA0016C02, 0x00000002, 0x4029D620, 0xA0016C02, 0x00000002, 0x4029D620, + 0xA0016C02, 0x00000002, 0x4029D620, 0xA0016C02, 0x00000002, 0x4029D620, + 0xA0016C02, 0x00000002, 0x4029D620, 0xA0017202, 0x00000002, 0x4029D620, + 0xA0017302, 0x00000002, 0x4029D620, 0xA0017402, 0x00000002, 0x4029D620, + 0xA0017502, 0x00000002, 0x4029D620, 0xA0017702, + // Block 25, offset 0x640 + 0x00000003, 0x0029D69E, 0x0009589E, 0x0029D89E, 0x00000003, 0x0029D69E, + 0x0009589E, 0x0029DC9E, 0x00000002, 0x0029D686, 0x0029CC86, 0x00000002, + 0x4029D820, 0xA0013F02, 0x00000002, 0x4029D820, 0xA0014002, 0x00000002, + 0x4029D820, 0xA0014102, 0x00000002, 0x4029D820, 0xA0014202, 0x00000002, + 0x4029D820, 0xA0014302, 0x00000002, 0x4029D820, 0xA0014402, 0x00000002, + 0x4029D820, 0xA0014502, 0x00000002, 0x4029D820, 0xA0014602, 0x00000002, + 0x4029D820, 0xA0014702, 0x00000002, 0x4029D820, 0xA0014802, 0x00000002, + 0x4029D820, 0xA0014902, 0x00000002, 0x4029D820, 0xA0014A02, 0x00000002, + 0x4029D820, 0xA0014B02, 0x00000002, 0x4029D820, 0xA0014C02, 0x00000002, + 0x4029D820, 0xA0014D02, 0x00000002, 0x4029D820, 0xA0014E02, 0x00000002, + 0x4029D820, 0xA0014F02, 0x00000002, 0x4029D820, + // Block 26, offset 0x680 + 0xA0015002, 0x00000002, 0x4029D820, 0xA0015102, 0x00000002, 0x4029D820, + 0xA0015202, 0x00000002, 0x4029D820, 0xA0015302, 0x00000002, 0x4029D820, + 0xA0015402, 0x00000002, 0x4029D820, 0xA0015502, 0x00000002, 0x4029D820, + 0xA0015602, 0x00000002, 0x0029D884, 0xA0015604, 0x00000002, 0x4029D820, + 0xA0015702, 0x00000002, 0x4029D820, 0xA0015802, 0x00000002, 0x4029D820, + 0xA0015902, 0x00000002, 0x4029D820, 0xA0015A02, 0x00000002, 0x4029D820, + 0xA0015B02, 0x00000002, 0x4029D820, 0xA0015C02, 0x00000002, 0x4029D820, + 0xA0015D02, 0x00000002, 0x4029D820, 0xA0015E02, 0x00000002, 0x4029D820, + 0xA0015F02, 0x00000002, 0x4029D820, 0xA0016002, 0x00000002, 0x4029D820, + 0xA0016102, 0x00000002, 0x4029D820, 0xA0016202, 0x00000002, 0x4029D820, + 0xA0016302, 0x00000002, 0x4029D820, 0xA0016402, + // Block 27, offset 0x6c0 + 0x00000002, 0x4029D820, 0xA0016502, 0x00000002, 0x4029D820, 0xA0016602, + 0x00000002, 0x4029D820, 0xA0016702, 0x00000002, 0x4029D820, 0xA0016902, + 0x00000002, 0x4029D820, 0xA0016C02, 0x00000002, 0x4029D820, 0xA0016C02, + 0x00000002, 0x4029D820, 0xA0016C02, 0x00000002, 0x4029D820, 0xA0016C02, + 0x00000002, 0x4029D820, 0xA0016C02, 0x00000002, 0x4029D820, 0xA0016C02, + 0x00000002, 0x4029D820, 0xA0016C02, 0x00000002, 0x4029D820, 0xA0017202, + 0x00000002, 0x4029D820, 0xA0017302, 0x00000002, 0x4029D820, 0xA0017402, + 0x00000002, 0x4029D820, 0xA0017502, 0x00000002, 0x4029D820, 0xA0017702, + 0x00000002, 0x0029D886, 0x0029CC86, 0x00000002, 0x4029DA20, 0xA0013F02, + 0x00000002, 0x4029DA20, 0xA0014002, 0x00000002, 0x4029DA20, 0xA0014102, + 0x00000002, 0x4029DA20, 0xA0014202, 0x00000002, + // Block 28, offset 0x700 + 0x4029DA20, 0xA0014302, 0x00000002, 0x4029DA20, 0xA0014402, 0x00000002, + 0x4029DA20, 0xA0014502, 0x00000002, 0x4029DA20, 0xA0014602, 0x00000002, + 0x4029DA20, 0xA0014702, 0x00000002, 0x4029DA20, 0xA0014802, 0x00000002, + 0x4029DA20, 0xA0014902, 0x00000002, 0x4029DA20, 0xA0014A02, 0x00000002, + 0x4029DA20, 0xA0014B02, 0x00000002, 0x4029DA20, 0xA0014C02, 0x00000002, + 0x4029DA20, 0xA0014D02, 0x00000002, 0x4029DA20, 0xA0014E02, 0x00000002, + 0x4029DA20, 0xA0014F02, 0x00000002, 0x4029DA20, 0xA0015002, 0x00000002, + 0x4029DA20, 0xA0015102, 0x00000002, 0x4029DA20, 0xA0015202, 0x00000002, + 0x4029DA20, 0xA0015302, 0x00000002, 0x4029DA20, 0xA0015402, 0x00000002, + 0x4029DA20, 0xA0015502, 0x00000002, 0x4029DA20, 0xA0015602, 0x00000002, + 0x0029DA84, 0xA0015604, 0x00000002, 0x4029DA20, + // Block 29, offset 0x740 + 0xA0015702, 0x00000002, 0x4029DA20, 0xA0015802, 0x00000002, 0x4029DA20, + 0xA0015902, 0x00000002, 0x4029DA20, 0xA0015A02, 0x00000002, 0x4029DA20, + 0xA0015B02, 0x00000002, 0x4029DA20, 0xA0015C02, 0x00000002, 0x4029DA20, + 0xA0015D02, 0x00000002, 0x4029DA20, 0xA0015E02, 0x00000002, 0x4029DA20, + 0xA0015F02, 0x00000002, 0x4029DA20, 0xA0016002, 0x00000002, 0x4029DA20, + 0xA0016102, 0x00000002, 0x4029DA20, 0xA0016202, 0x00000002, 0x4029DA20, + 0xA0016302, 0x00000002, 0x4029DA20, 0xA0016402, 0x00000002, 0x4029DA20, + 0xA0016502, 0x00000002, 0x4029DA20, 0xA0016602, 0x00000002, 0x4029DA20, + 0xA0016702, 0x00000002, 0x4029DA20, 0xA0016C02, 0x00000002, 0x4029DA20, + 0xA0016C02, 0x00000002, 0x4029DA20, 0xA0016C02, 0x00000002, 0x4029DA20, + 0xA0016C02, 0x00000002, 0x4029DA20, 0xA0016C02, + // Block 30, offset 0x780 + 0x00000002, 0x4029DA20, 0xA0016C02, 0x00000002, 0x4029DA20, 0xA0016C02, + 0x00000002, 0x4029DA20, 0xA0016C02, 0x00000002, 0x4029DA20, 0xA0017202, + 0x00000002, 0x4029DA20, 0xA0017302, 0x00000002, 0x4029DA20, 0xA0017402, + 0x00000002, 0x4029DA20, 0xA0017502, 0x00000002, 0x4029DA20, 0xA0017702, + 0x00000003, 0x0029DA9E, 0x0009589E, 0x0029DC9E, 0x00000002, 0x0029DA86, + 0x0029CC86, 0x00000002, 0x4029DC20, 0xA0013F02, 0x00000002, 0x4029DC20, + 0xA0014002, 0x00000002, 0x4029DC20, 0xA0014102, 0x00000002, 0x4029DC20, + 0xA0014202, 0x00000002, 0x4029DC20, 0xA0014302, 0x00000002, 0x4029DC20, + 0xA0014402, 0x00000002, 0x4029DC20, 0xA0014502, 0x00000002, 0x4029DC20, + 0xA0014602, 0x00000002, 0x4029DC20, 0xA0014702, 0x00000002, 0x4029DC20, + 0xA0014802, 0x00000002, 0x4029DC20, 0xA0014902, + // Block 31, offset 0x7c0 + 0x00000002, 0x4029DC20, 0xA0014A02, 0x00000002, 0x4029DC20, 0xA0014B02, + 0x00000002, 0x4029DC20, 0xA0014C02, 0x00000002, 0x4029DC20, 0xA0014D02, + 0x00000002, 0x4029DC20, 0xA0014E02, 0x00000002, 0x4029DC20, 0xA0014F02, + 0x00000002, 0x4029DC20, 0xA0015002, 0x00000002, 0x4029DC20, 0xA0015102, + 0x00000002, 0x4029DC20, 0xA0015202, 0x00000002, 0x4029DC20, 0xA0015302, + 0x00000002, 0x4029DC20, 0xA0015402, 0x00000002, 0x4029DC20, 0xA0015502, + 0x00000002, 0x4029DC20, 0xA0015602, 0x00000002, 0x0029DC84, 0xA0015604, + 0x00000002, 0x4029DC20, 0xA0015702, 0x00000002, 0x4029DC20, 0xA0015802, + 0x00000002, 0x4029DC20, 0xA0015902, 0x00000002, 0x4029DC20, 0xA0015A02, + 0x00000002, 0x4029DC20, 0xA0015B02, 0x00000002, 0x4029DC20, 0xA0015C02, + 0x00000002, 0x4029DC20, 0xA0015D02, 0x00000002, + // Block 32, offset 0x800 + 0x4029DC20, 0xA0015E02, 0x00000002, 0x4029DC20, 0xA0015F02, 0x00000002, + 0x4029DC20, 0xA0016002, 0x00000002, 0x4029DC20, 0xA0016102, 0x00000002, + 0x4029DC20, 0xA0016202, 0x00000002, 0x4029DC20, 0xA0016302, 0x00000002, + 0x4029DC20, 0xA0016402, 0x00000002, 0x4029DC20, 0xA0016502, 0x00000002, + 0x4029DC20, 0xA0016602, 0x00000002, 0x4029DC20, 0xA0016702, 0x00000002, + 0x4029DC20, 0xA0016C02, 0x00000002, 0x4029DC20, 0xA0016C02, 0x00000002, + 0x4029DC20, 0xA0016C02, 0x00000002, 0x4029DC20, 0xA0016C02, 0x00000002, + 0x4029DC20, 0xA0016C02, 0x00000002, 0x4029DC20, 0xA0016C02, 0x00000002, + 0x4029DC20, 0xA0016C02, 0x00000002, 0x4029DC20, 0xA0017202, 0x00000002, + 0x4029DC20, 0xA0017302, 0x00000002, 0x4029DC20, 0xA0017402, 0x00000002, + 0x4029DC20, 0xA0017502, 0x00000002, 0x4029DC20, + // Block 33, offset 0x840 + 0xA0017702, 0x00000002, 0x0029DC86, 0x0029CC86, 0x00000002, 0x4029DE20, + 0xA0013F02, 0x00000002, 0x4029DE20, 0xA0014002, 0x00000002, 0x4029DE20, + 0xA0014102, 0x00000002, 0x4029DE20, 0xA0014202, 0x00000002, 0x4029DE20, + 0xA0014302, 0x00000002, 0x4029DE20, 0xA0014402, 0x00000002, 0x4029DE20, + 0xA0014502, 0x00000002, 0x4029DE20, 0xA0014602, 0x00000002, 0x4029DE20, + 0xA0014702, 0x00000002, 0x4029DE20, 0xA0014802, 0x00000002, 0x4029DE20, + 0xA0014902, 0x00000002, 0x4029DE20, 0xA0014A02, 0x00000002, 0x4029DE20, + 0xA0014B02, 0x00000002, 0x4029DE20, 0xA0014C02, 0x00000002, 0x4029DE20, + 0xA0014D02, 0x00000002, 0x4029DE20, 0xA0014E02, 0x00000002, 0x4029DE20, + 0xA0014F02, 0x00000002, 0x4029DE20, 0xA0015002, 0x00000002, 0x4029DE20, + 0xA0015102, 0x00000002, 0x4029DE20, 0xA0015202, + // Block 34, offset 0x880 + 0x00000002, 0x4029DE20, 0xA0015302, 0x00000002, 0x4029DE20, 0xA0015402, + 0x00000002, 0x4029DE20, 0xA0015502, 0x00000002, 0x4029DE20, 0xA0015602, + 0x00000002, 0x0029DE84, 0xA0015604, 0x00000002, 0x4029DE20, 0xA0015702, + 0x00000002, 0x4029DE20, 0xA0015802, 0x00000002, 0x4029DE20, 0xA0015902, + 0x00000002, 0x4029DE20, 0xA0015A02, 0x00000002, 0x4029DE20, 0xA0015B02, + 0x00000002, 0x4029DE20, 0xA0015C02, 0x00000002, 0x4029DE20, 0xA0015D02, + 0x00000002, 0x4029DE20, 0xA0015E02, 0x00000002, 0x4029DE20, 0xA0015F02, + 0x00000002, 0x4029DE20, 0xA0016002, 0x00000002, 0x4029DE20, 0xA0016102, + 0x00000002, 0x4029DE20, 0xA0016202, 0x00000002, 0x4029DE20, 0xA0016302, + 0x00000002, 0x4029DE20, 0xA0016402, 0x00000002, 0x4029DE20, 0xA0016502, + 0x00000002, 0x4029DE20, 0xA0016602, 0x00000002, + // Block 35, offset 0x8c0 + 0x4029DE20, 0xA0016702, 0x00000002, 0x4029DE20, 0xA0016C02, 0x00000002, + 0x4029DE20, 0xA0016C02, 0x00000002, 0x4029DE20, 0xA0016C02, 0x00000002, + 0x4029DE20, 0xA0016C02, 0x00000002, 0x4029DE20, 0xA0016C02, 0x00000002, + 0x4029DE20, 0xA0016C02, 0x00000002, 0x4029DE20, 0xA0016C02, 0x00000002, + 0x4029DE20, 0xA0016C02, 0x00000002, 0x4029DE20, 0xA0016C02, 0x00000002, + 0x4029DE20, 0xA0017202, 0x00000002, 0x4029DE20, 0xA0017302, 0x00000002, + 0x4029DE20, 0xA0017402, 0x00000002, 0x4029DE20, 0xA0017502, 0x00000002, + 0x4029DE20, 0xA0017702, 0x00000002, 0x402BDE20, 0xAE603202, 0x00000002, + 0x002BDE88, 0xAE603202, 0x00000002, 0x402BDE20, 0xAE603502, 0x00000002, + 0x002BDE88, 0xAE603502, 0x00000002, 0x402BDE20, 0xAE603702, 0x00000002, + 0x002BDE88, 0xAE603702, 0x00000003, 0x402BDE20, + // Block 36, offset 0x900 + 0xAE603702, 0xAE603202, 0x00000003, 0x002BDE88, 0xAE603702, 0xAE603202, + 0x00000003, 0x402BDE20, 0xAE603702, 0xAE603502, 0x00000003, 0x002BDE88, + 0xAE603702, 0xAE603502, 0x00000003, 0x402BDE20, 0xAE603702, 0xAE604E02, + 0x00000003, 0x002BDE88, 0xAE603702, 0xAE604E02, 0x00000003, 0x402BDE20, + 0xAE603702, 0xAE606402, 0x00000003, 0x002BDE88, 0xAE603702, 0xAE606402, + 0x00000002, 0x402BDE20, 0xAE603C02, 0x00000002, 0x002BDE88, 0xAE603C02, + 0x00000003, 0x402BDE20, 0xAE603C02, 0xAE603202, 0x00000003, 0x002BDE88, + 0xAE603C02, 0xAE603202, 0x00000003, 0x402BDE20, 0xAE603C02, 0xAE603502, + 0x00000003, 0x002BDE88, 0xAE603C02, 0xAE603502, 0x00000003, 0x402BDE20, + 0xAE603C02, 0xAE604E02, 0x00000003, 0x002BDE88, 0xAE603C02, 0xAE604E02, + 0x00000003, 0x402BDE20, 0xAE603C02, 0xAE606402, + // Block 37, offset 0x940 + 0x00000003, 0x002BDE88, 0xAE603C02, 0xAE606402, 0x00000002, 0x402BDE20, + 0xAE604102, 0x00000002, 0x002BDE88, 0xAE604102, 0x00000002, 0x402BDE20, + 0xAE604302, 0x00000002, 0x002BDE88, 0xAE604302, 0x00000003, 0x402BDE20, + 0xAE604302, 0xAE603202, 0x00000003, 0x002BDE88, 0xAE604302, 0xAE603202, + 0x00000002, 0x402BDE20, 0xAE604702, 0x00000002, 0x002BDE88, 0xAE604702, + 0x00000003, 0x402BDE20, 0xAE604702, 0xAE605B02, 0x00000003, 0x002BDE88, + 0xAE604702, 0xAE605B02, 0x00000002, 0x402BDE20, 0xAE604E02, 0x00000002, + 0x002BDE88, 0xAE604E02, 0x00000002, 0x402BDE20, 0xAE605202, 0x00000002, + 0x002BDE88, 0xAE605202, 0x00000003, 0x402BDE20, 0xAE605202, 0xAE605B02, + 0x00000003, 0x002BDE88, 0xAE605202, 0xAE605B02, 0x00000002, 0x402BDE20, + 0xACA05902, 0x00000002, 0x002BDE88, 0xACA05902, + // Block 38, offset 0x980 + 0x00000002, 0x402BDE20, 0xAE605B02, 0x00000002, 0x002BDE88, 0xAE605B02, + 0x00000002, 0x402BDE20, 0xAE606402, 0x00000002, 0x002BDE88, 0xAE606402, + 0x00000002, 0x402BDE20, 0xAE606502, 0x00000002, 0x002BDE88, 0xAE606502, + 0x00000002, 0x402BDE20, 0xAE606702, 0x00000002, 0x002BDE88, 0xAE606702, + 0x00000002, 0x402BDE20, 0xADC07002, 0x00000002, 0x002BDE88, 0xADC07002, + 0x00000003, 0x402BDE20, 0xADC07002, 0xAE603702, 0x00000003, 0x002BDE88, + 0xADC07002, 0xAE603702, 0x00000003, 0x402BDE20, 0xADC07002, 0xAE603C02, + 0x00000003, 0x002BDE88, 0xADC07002, 0xAE603C02, 0x00000002, 0x402BDE20, + 0xADC07602, 0x00000002, 0x002BDE88, 0xADC07602, 0x00000002, 0x84E615EF, + 0xAE613904, 0x00000004, 0x002BDE9C, 0x0002E49C, 0x002E829C, 0x0002E49C, + 0x00000003, 0x002BDE84, 0x0004E284, 0x002C3A84, + // Block 39, offset 0x9c0 + 0x00000003, 0x002BDE84, 0x0004E284, 0x002FE684, 0x00000003, 0x002BDE8A, + 0x0004E284, 0x002FE68A, 0x00000003, 0x002BDE9D, 0x0009569C, 0x002E829C, + 0x00000002, 0x002BDE84, 0x002BDE84, 0x00000002, 0x002BDE8A, 0x002BDE8A, + 0x00000002, 0x002BDE9D, 0x002C0A9D, 0x00000003, 0x002BDE84, 0xA0013904, + 0x002C9884, 0x00000003, 0x84E615EF, 0xAE613904, 0x84E6164C, 0x00000003, + 0x002BDE8A, 0xA0013904, 0x002C988A, 0x00000003, 0x002BDE94, 0xA0013914, + 0x002C9894, 0x00000004, 0x002BDE84, 0xA0013904, 0x002C9884, 0xAE603202, + 0x00000004, 0x002BDE8A, 0xA0013904, 0x002C988A, 0xAE603202, 0x00000004, + 0x002BDE84, 0xA0013904, 0x002C9884, 0xAE605B02, 0x00000004, 0x002BDE8A, + 0xA0013904, 0x002C988A, 0xAE605B02, 0x00000002, 0x84E615EF, 0x84E61771, + 0x00000002, 0x002BDE84, 0x002EE284, 0x00000002, + // Block 40, offset 0xa00 + 0x002BDE8A, 0x002EE28A, 0x00000002, 0x002BDE84, 0x00306C84, 0x00000002, + 0x002BDE8A, 0x00306C8A, 0x00000002, 0x84E615EF, 0x84E6185F, 0x00000002, + 0x002BDE84, 0x0030BE84, 0x00000002, 0x002BDE8A, 0x0030BE8A, 0x00000003, + 0x002BDE84, 0xA0013904, 0x0030BE84, 0x00000003, 0x002BDE8A, 0xA0013904, + 0x0030BE8A, 0x00000002, 0x002BDE84, 0x00310084, 0x00000002, 0x002BDE8A, + 0x0031008A, 0x00000002, 0x402C0A20, 0xAE605202, 0x00000002, 0x002C0A88, + 0xAE605202, 0x00000002, 0x402C0A20, 0xADC07002, 0x00000002, 0x002C0A88, + 0xADC07002, 0x00000002, 0x402C0A20, 0xADC07B02, 0x00000002, 0x002C0A88, + 0xADC07B02, 0x00000003, 0x002C0A9C, 0x002BDE9C, 0x002F7A9C, 0x00000002, + 0x402C3A20, 0xAE603202, 0x00000002, 0x002C3A88, 0xAE603202, 0x00000002, + 0x402C3A20, 0xAE603C02, 0x00000002, 0x002C3A88, + // Block 41, offset 0xa40 + 0xAE603C02, 0x00000002, 0x402C3A20, 0xAE604102, 0x00000002, 0x002C3A88, + 0xAE604102, 0x00000002, 0x402C3A20, 0xAE605202, 0x00000002, 0x002C3A88, + 0xAE605202, 0x00000002, 0x402C3A20, 0xACA05602, 0x00000002, 0x84E6161D, + 0xAE605604, 0x00000002, 0x002C3A88, 0xACA05602, 0x00000003, 0x402C3A20, + 0xACA05602, 0xAE603202, 0x00000003, 0x002C3A88, 0xACA05602, 0xAE603202, + 0x00000003, 0x002C3A84, 0x0004E284, 0x002EE284, 0x00000003, 0x002C3A84, + 0x0004E284, 0x00306C84, 0x00000004, 0x002C3A9D, 0x0009569C, 0x002DFE9C, + 0x002D229C, 0x00000003, 0x002C3A9C, 0x002BDE9C, 0x002E229C, 0x00000002, + 0x002C3A9D, 0x002E229D, 0x00000003, 0x002C3A9C, 0x002E829C, 0x0029D09C, + 0x00000003, 0x002C3A9C, 0x002E829C, 0x0029D29C, 0x00000003, 0x002C3A9D, + 0x002EE29C, 0x0002E49C, 0x00000004, 0x002C3A9D, + // Block 42, offset 0xa80 + 0x002EE29D, 0x002EE29D, 0x002E229D, 0x00000002, 0x402C6220, 0xAE604102, + 0x00000002, 0x002C6288, 0xAE604102, 0x00000002, 0x402C6220, 0xAE605202, + 0x00000002, 0x002C6288, 0xAE605202, 0x00000002, 0x402C6220, 0xACA05602, + 0x00000002, 0x002C6288, 0xACA05602, 0x00000002, 0x402C6220, 0xADC07002, + 0x00000002, 0x002C6288, 0xADC07002, 0x00000002, 0x402C6220, 0xADC07802, + 0x00000002, 0x002C6288, 0xADC07802, 0x00000002, 0x402C6220, 0xADC07B02, + 0x00000002, 0x002C6288, 0xADC07B02, 0x00000002, 0x402C6220, 0xA0007D02, + 0x00000002, 0x002C6288, 0xA0007D02, 0x00000002, 0x002C6284, 0xA0013904, + 0x00000002, 0x84E61631, 0xAE613904, 0x00000002, 0x002C628A, 0xA0013904, + 0x00000002, 0x84E61631, 0xAE613A04, 0x00000002, 0x002C6284, 0xA0013A04, + 0x00000002, 0x002C628A, 0xA0013A04, 0x00000002, + // Block 43, offset 0xac0 + 0x002C6284, 0x002C0A84, 0x00000003, 0x002C629C, 0x002E829C, 0x0029D09C, + 0x00000003, 0x002C629C, 0x002E829C, 0x0029D29C, 0x00000002, 0x002C6284, + 0x00312A84, 0x00000003, 0x002C6284, 0x00312A84, 0xA0004104, 0x00000003, + 0x002C628A, 0x00312A84, 0xA0004104, 0x00000003, 0x002C628A, 0x00312A8A, + 0xA0004104, 0x00000002, 0x002C6284, 0x00315084, 0x00000002, 0x002C6284, + 0x00316484, 0x00000002, 0x402C9820, 0xAE603202, 0x00000002, 0x002C9888, + 0xAE603202, 0x00000002, 0x402C9820, 0xAE603502, 0x00000002, 0x002C9888, + 0xAE603502, 0x00000002, 0x402C9820, 0xAE603702, 0x00000002, 0x002C9888, + 0xAE603702, 0x00000002, 0x402C9820, 0xAE603C02, 0x00000002, 0x002C9888, + 0xAE603C02, 0x00000003, 0x402C9820, 0xAE603C02, 0xAE603202, 0x00000003, + 0x002C9888, 0xAE603C02, 0xAE603202, 0x00000003, + // Block 44, offset 0xb00 + 0x402C9820, 0xAE603C02, 0xAE603502, 0x00000003, 0x002C9888, 0xAE603C02, + 0xAE603502, 0x00000003, 0x402C9820, 0xAE603C02, 0xAE604E02, 0x00000003, + 0x002C9888, 0xAE603C02, 0xAE604E02, 0x00000003, 0x402C9820, 0xAE603C02, + 0xAE606402, 0x00000003, 0x002C9888, 0xAE603C02, 0xAE606402, 0x00000002, + 0x402C9820, 0xAE604102, 0x00000002, 0x002C9888, 0xAE604102, 0x00000002, + 0x402C9820, 0xAE604702, 0x00000002, 0x002C9888, 0xAE604702, 0x00000002, + 0x402C9820, 0xAE604E02, 0x00000002, 0x002C9888, 0xAE604E02, 0x00000002, + 0x402C9820, 0xAE605202, 0x00000002, 0x002C9888, 0xAE605202, 0x00000002, + 0x402C9820, 0xACA05602, 0x00000002, 0x002C9888, 0xACA05602, 0x00000003, + 0x402C9820, 0xACA05602, 0xAE603702, 0x00000003, 0x002C9888, 0xACA05602, + 0xAE603702, 0x00000002, 0x402C9820, 0xACA05902, + // Block 45, offset 0xb40 + 0x00000002, 0x002C9888, 0xACA05902, 0x00000002, 0x402C9820, 0xAE605B02, + 0x00000002, 0x002C9888, 0xAE605B02, 0x00000003, 0x402C9820, 0xAE605B02, + 0xAE603202, 0x00000003, 0x002C9888, 0xAE605B02, 0xAE603202, 0x00000003, + 0x402C9820, 0xAE605B02, 0xAE603502, 0x00000003, 0x002C9888, 0xAE605B02, + 0xAE603502, 0x00000002, 0x402C9820, 0xAE606402, 0x00000002, 0x002C9888, + 0xAE606402, 0x00000002, 0x402C9820, 0xAE606502, 0x00000002, 0x002C9888, + 0xAE606502, 0x00000002, 0x402C9820, 0xAE606702, 0x00000002, 0x002C9888, + 0xAE606702, 0x00000002, 0x402C9820, 0xADC07002, 0x00000002, 0x002C9888, + 0xADC07002, 0x00000003, 0x402C9820, 0xADC07002, 0xAE603C02, 0x00000003, + 0x002C9888, 0xADC07002, 0xAE603C02, 0x00000002, 0x402C9820, 0xADC07802, + 0x00000002, 0x002C9888, 0xADC07802, 0x00000002, + // Block 46, offset 0xb80 + 0x402C9820, 0xADC07A02, 0x00000002, 0x002C9888, 0xADC07A02, 0x00000003, + 0x002C989C, 0x002F7A9C, 0x002D229C, 0x00000002, 0x402D0820, 0xAE605202, + 0x00000002, 0x002D0888, 0xAE605202, 0x00000002, 0x002D0884, 0xA0013A04, + 0x00000002, 0x002D088A, 0xA0013A04, 0x00000003, 0x002D088A, 0x002BDE8A, + 0x0030F68A, 0x00000003, 0x002D0884, 0x002D0884, 0x002D9A84, 0x00000003, + 0x002D0884, 0x002D0884, 0x002E2284, 0x00000002, 0x002D0884, 0x002EDA84, + 0x00000004, 0x002D089D, 0x002F7A9D, 0x002C989D, 0x002C989D, 0x00000002, + 0x402D2220, 0xAE603202, 0x00000002, 0x002D2288, 0xAE603202, 0x00000002, + 0x402D2220, 0xAE603702, 0x00000002, 0x002D2288, 0xAE603702, 0x00000002, + 0x402D2220, 0xAE603C02, 0x00000002, 0x002D2288, 0xAE603C02, 0x00000002, + 0x402D2220, 0xAE604102, 0x00000002, 0x002D2288, + // Block 47, offset 0xbc0 + 0xAE604102, 0x00000002, 0x402D2220, 0xAE605202, 0x00000002, 0x002D2288, + 0xAE605202, 0x00000002, 0x402D2220, 0xACA05602, 0x00000002, 0x002D2288, + 0xACA05602, 0x00000002, 0x402D2220, 0xAE605B02, 0x00000002, 0x002D2288, + 0xAE605B02, 0x00000002, 0x002D2284, 0xA0006104, 0x00000002, 0x002D228A, + 0xA0006104, 0x00000002, 0x002D2284, 0xA0013A04, 0x00000002, 0x002D228A, + 0xA0013A04, 0x00000003, 0x002D229C, 0x002BDE9C, 0x002E229C, 0x00000003, + 0x002D229D, 0x002D689D, 0x00312A9C, 0x00000003, 0x002D229D, 0x002F2C9D, + 0x002BDE9C, 0x00000002, 0x402D6820, 0xAE603C02, 0x00000002, 0x002D6888, + 0xAE603C02, 0x00000002, 0x402D6820, 0xAE604102, 0x00000002, 0x002D6888, + 0xAE604102, 0x00000002, 0x402D6820, 0xAE604702, 0x00000002, 0x002D6888, + 0xAE604702, 0x00000002, 0x402D6820, 0xAE605202, + // Block 48, offset 0xc00 + 0x00000002, 0x002D6888, 0xAE605202, 0x00000002, 0x402D6820, 0xACA05602, + 0x00000002, 0x002D6888, 0xACA05602, 0x00000002, 0x402D6820, 0xADC07002, + 0x00000002, 0x002D6888, 0xADC07002, 0x00000002, 0x402D6820, 0xADC07902, + 0x00000002, 0x002D6888, 0xADC07902, 0x00000002, 0x402D6820, 0xADC07B02, + 0x00000002, 0x402D6820, 0xA0007D02, 0x00000002, 0x002D6888, 0xA0007D02, + 0x00000003, 0x002D689C, 0x002F2C9D, 0x002BDE9C, 0x00000002, 0x402D9A20, + 0xAE603202, 0x00000002, 0x002D9A88, 0xAE603202, 0x00000002, 0x402D9A20, + 0xAE603502, 0x00000002, 0x002D9A88, 0xAE603502, 0x00000002, 0x402D9A20, + 0xAE603702, 0x00000002, 0x002D9A88, 0xAE603702, 0x00000002, 0x402D9A20, + 0xAE603C02, 0x00000002, 0x002D9A88, 0xAE603C02, 0x00000002, 0x402D9A20, + 0xAE604102, 0x00000002, 0x002D9A88, 0xAE604102, + // Block 49, offset 0xc40 + 0x00000002, 0x402D9A20, 0xAE604702, 0x00000002, 0x002D9A88, 0xAE604702, + 0x00000003, 0x402D9A20, 0xAE604702, 0xAE603202, 0x00000003, 0x002D9A88, + 0xAE604702, 0xAE603202, 0x00000002, 0x402D9A20, 0xAE604E02, 0x00000002, + 0x002D9A88, 0xAE604E02, 0x00000002, 0x002D9A88, 0xAE605202, 0x00000002, + 0x402D9A20, 0xACA05902, 0x00000002, 0x002D9A88, 0xACA05902, 0x00000002, + 0x402D9A20, 0xAE605B02, 0x00000002, 0x002D9A88, 0xAE605B02, 0x00000002, + 0x402D9A20, 0xAE606402, 0x00000002, 0x002D9A88, 0xAE606402, 0x00000002, + 0x402D9A20, 0xAE606502, 0x00000002, 0x002D9A88, 0xAE606502, 0x00000002, + 0x402D9A20, 0xAE606702, 0x00000002, 0x002D9A88, 0xAE606702, 0x00000002, + 0x402D9A20, 0xADC07002, 0x00000002, 0x002D9A88, 0xADC07002, 0x00000002, + 0x402D9A20, 0xADC07A02, 0x00000002, 0x002D9A88, + // Block 50, offset 0xc80 + 0xADC07A02, 0x00000002, 0x002D9A9D, 0x002C3A9D, 0x00000002, 0x002D9A9D, + 0x002C629D, 0x00000002, 0x402DCC20, 0xAE603C02, 0x00000002, 0x002DCC88, + 0xAE603C02, 0x00000002, 0x402DCC20, 0xAE604102, 0x00000002, 0x402DFE20, + 0xAE603202, 0x00000002, 0x002DFE88, 0xAE603202, 0x00000002, 0x402DFE20, + 0xAE604102, 0x00000002, 0x002DFE88, 0xAE604102, 0x00000002, 0x402DFE20, + 0xACA05602, 0x00000002, 0x002DFE88, 0xACA05602, 0x00000002, 0x002DFE84, + 0xA0006104, 0x00000002, 0x002DFE8A, 0xA0006104, 0x00000002, 0x402DFE20, + 0xADC07002, 0x00000002, 0x002DFE88, 0xADC07002, 0x00000002, 0x402DFE20, + 0xADC07B02, 0x00000002, 0x002DFE88, 0xADC07B02, 0x00000004, 0x002DFE9C, + 0x002C3A9C, 0x002BDE9C, 0x002E229C, 0x00000003, 0x002DFE9C, 0x002D689D, + 0x00312A9C, 0x00000003, 0x002DFE9C, 0x002E829C, + // Block 51, offset 0xcc0 + 0x0029D09C, 0x00000003, 0x002DFE9C, 0x002E829C, 0x0029D29C, 0x00000003, + 0x002DFE9C, 0x002F2C9D, 0x002BDE9C, 0x00000002, 0x402E2220, 0xAE603202, + 0x00000002, 0x002E2288, 0xAE603202, 0x00000002, 0x402E2220, 0xAE604102, + 0x00000002, 0x002E2288, 0xAE604102, 0x00000002, 0x402E2220, 0xACA05602, + 0x00000002, 0x002E2288, 0xACA05602, 0x00000002, 0x402E2220, 0xADC07002, + 0x00000002, 0x002E2288, 0xADC07002, 0x00000003, 0x402E2220, 0xADC07002, + 0xAE605B02, 0x00000003, 0x002E2288, 0xADC07002, 0xAE605B02, 0x00000002, + 0x402E2220, 0xADC07802, 0x00000002, 0x002E2288, 0xADC07802, 0x00000002, + 0x402E2220, 0xADC07B02, 0x00000002, 0x002E2288, 0xADC07B02, 0x00000002, + 0x402E2220, 0xA0007D02, 0x00000002, 0x002E2288, 0xA0007D02, 0x00000002, + 0x402E2220, 0xA0013902, 0x00000002, 0x402E2220, + // Block 52, offset 0xd00 + 0xA0013902, 0x00000002, 0x002E2288, 0xA0013902, 0x00000002, 0x002E2288, + 0xA0013902, 0x00000002, 0x002E2284, 0x002E2284, 0x00000002, 0x002E228A, + 0x002E228A, 0x00000003, 0x002E229C, 0x002EE29C, 0x002D229C, 0x00000002, + 0x002E2284, 0x002FE684, 0x00000003, 0x002E229D, 0x00302C9D, 0x002C629D, + 0x00000002, 0x002E2284, 0x00312A84, 0x00000002, 0x402E8220, 0xAE603202, + 0x00000002, 0x002E8288, 0xAE603202, 0x00000002, 0x402E8220, 0xAE605202, + 0x00000002, 0x002E8288, 0xAE605202, 0x00000002, 0x402E8220, 0xADC07002, + 0x00000002, 0x002E8288, 0xADC07002, 0x00000003, 0x002E829C, 0x0009569C, + 0x002FE69C, 0x00000004, 0x002E829C, 0x0009569C, 0x002FE69C, 0x0029D09C, + 0x00000003, 0x002E829D, 0x002D689D, 0x00312A9C, 0x00000003, 0x002E829C, + 0x002D9A9C, 0x002E229C, 0x00000003, 0x002E829C, + // Block 53, offset 0xd40 + 0x002E829C, 0x0029D09C, 0x00000003, 0x002E829C, 0x002E829C, 0x0029D29C, + 0x00000003, 0x002E829C, 0x002EE29C, 0x002E229C, 0x00000003, 0x002E829D, + 0x002F2C9D, 0x002BDE9C, 0x00000002, 0x402E9E20, 0xAE603202, 0x00000002, + 0x002E9E88, 0xAE603202, 0x00000002, 0x402E9E20, 0xAE603502, 0x00000002, + 0x002E9E88, 0xAE603502, 0x00000002, 0x402E9E20, 0xAE604102, 0x00000002, + 0x002E9E88, 0xAE604102, 0x00000002, 0x402E9E20, 0xAE604E02, 0x00000002, + 0x002E9E88, 0xAE604E02, 0x00000002, 0x402E9E20, 0xAE605202, 0x00000002, + 0x002E9E88, 0xAE605202, 0x00000002, 0x402E9E20, 0xACA05602, 0x00000002, + 0x002E9E88, 0xACA05602, 0x00000002, 0x002E9E84, 0xA0006104, 0x00000002, + 0x002E9E8A, 0xA0006104, 0x00000002, 0x402E9E20, 0xADC07002, 0x00000002, + 0x002E9E88, 0xADC07002, 0x00000002, 0x402E9E20, + // Block 54, offset 0xd80 + 0xADC07802, 0x00000002, 0x002E9E88, 0xADC07802, 0x00000002, 0x402E9E20, + 0xADC07B02, 0x00000002, 0x002E9E88, 0xADC07B02, 0x00000003, 0x002E9E9D, + 0x002C989D, 0x0030E29D, 0x00000002, 0x002E9E9D, 0x002D229D, 0x00000002, + 0x402EE220, 0xAE603202, 0x00000002, 0x002EE288, 0xAE603202, 0x00000002, + 0x402EE220, 0xAE603502, 0x00000002, 0x002EE288, 0xAE603502, 0x00000002, + 0x402EE220, 0xAE603702, 0x00000002, 0x002EE288, 0xAE603702, 0x00000002, + 0x402EE220, 0xAE603C02, 0x00000002, 0x002EE288, 0xAE603C02, 0x00000003, + 0x402EE220, 0xAE603C02, 0xAE603202, 0x00000003, 0x002EE288, 0xAE603C02, + 0xAE603202, 0x00000003, 0x402EE220, 0xAE603C02, 0xAE603502, 0x00000003, + 0x002EE288, 0xAE603C02, 0xAE603502, 0x00000003, 0x402EE220, 0xAE603C02, + 0xAE604E02, 0x00000003, 0x002EE288, 0xAE603C02, + // Block 55, offset 0xdc0 + 0xAE604E02, 0x00000003, 0x402EE220, 0xAE603C02, 0xAE606402, 0x00000003, + 0x002EE288, 0xAE603C02, 0xAE606402, 0x00000002, 0x402EE220, 0xAE604102, + 0x00000002, 0x002EE288, 0xAE604102, 0x00000002, 0x402EE220, 0xAE604702, + 0x00000002, 0x002EE288, 0xAE604702, 0x00000003, 0x402EE220, 0xAE604702, + 0xAE605B02, 0x00000003, 0x002EE288, 0xAE604702, 0xAE605B02, 0x00000002, + 0x402EE220, 0xAE604D02, 0x00000002, 0x002EE288, 0xAE604D02, 0x00000002, + 0x402EE220, 0xAE604E02, 0x00000002, 0x002EE288, 0xAE604E02, 0x00000003, + 0x402EE220, 0xAE604E02, 0xAE603202, 0x00000003, 0x002EE288, 0xAE604E02, + 0xAE603202, 0x00000003, 0x402EE220, 0xAE604E02, 0xAE604702, 0x00000003, + 0x002EE288, 0xAE604E02, 0xAE604702, 0x00000003, 0x402EE220, 0xAE604E02, + 0xAE605B02, 0x00000003, 0x002EE288, 0xAE604E02, + // Block 56, offset 0xe00 + 0xAE605B02, 0x00000002, 0x402EE220, 0xAE605202, 0x00000002, 0x002EE288, + 0xAE605202, 0x00000003, 0x402EE220, 0xAE605202, 0xAE605B02, 0x00000003, + 0x002EE288, 0xAE605202, 0xAE605B02, 0x00000002, 0x402EE220, 0xA0005402, + 0x00000002, 0x002EE288, 0xA0005402, 0x00000003, 0x402EE220, 0xA0005402, + 0xAE603202, 0x00000003, 0x002EE288, 0xA0005402, 0xAE603202, 0x00000002, + 0x402EE220, 0xACA05902, 0x00000002, 0x002EE288, 0xACA05902, 0x00000003, + 0x402EE220, 0xACA05902, 0xAE605B02, 0x00000003, 0x002EE288, 0xACA05902, + 0xAE605B02, 0x00000002, 0x402EE220, 0xAE605B02, 0x00000002, 0x002EE288, + 0xAE605B02, 0x00000003, 0x402EE220, 0xAE605B02, 0xAE603202, 0x00000003, + 0x002EE288, 0xAE605B02, 0xAE603202, 0x00000003, 0x402EE220, 0xAE605B02, + 0xAE603502, 0x00000003, 0x002EE288, 0xAE605B02, + // Block 57, offset 0xe40 + 0xAE603502, 0x00000002, 0x402EE220, 0xAE606402, 0x00000002, 0x002EE288, + 0xAE606402, 0x00000002, 0x402EE220, 0xAE606502, 0x00000002, 0x002EE288, + 0xAE606502, 0x00000002, 0x402EE220, 0xAE606702, 0x00000002, 0x002EE288, + 0xAE606702, 0x00000002, 0x402EE220, 0xAD806802, 0x00000002, 0x002EE288, + 0xAD806802, 0x00000003, 0x402EE220, 0xAD806802, 0xAE603202, 0x00000003, + 0x002EE288, 0xAD806802, 0xAE603202, 0x00000003, 0x402EE220, 0xAD806802, + 0xAE603502, 0x00000003, 0x002EE288, 0xAD806802, 0xAE603502, 0x00000003, + 0x402EE220, 0xAD806802, 0xAE604E02, 0x00000003, 0x002EE288, 0xAD806802, + 0xAE604E02, 0x00000003, 0x402EE220, 0xAD806802, 0xAE606402, 0x00000003, + 0x002EE288, 0xAD806802, 0xAE606402, 0x00000003, 0x402EE220, 0xAD806802, + 0xADC07002, 0x00000003, 0x002EE288, 0xAD806802, + // Block 58, offset 0xe80 + 0xADC07002, 0x00000002, 0x402EE220, 0xADC07002, 0x00000002, 0x002EE288, + 0xADC07002, 0x00000003, 0x402EE220, 0xADC07002, 0xAE603C02, 0x00000003, + 0x002EE288, 0xADC07002, 0xAE603C02, 0x00000003, 0x002EE284, 0xA0013904, + 0x002C9884, 0x00000003, 0x002EE28A, 0xA0013904, 0x002C988A, 0x00000003, + 0x002EE294, 0xA0013914, 0x002C9894, 0x00000002, 0x002EE29D, 0x002DFE9D, + 0x00000002, 0x002EE284, 0x002EE284, 0x00000002, 0x002EE28A, 0x002EE28A, + 0x00000002, 0x402F2C20, 0xAE603202, 0x00000002, 0x002F2C88, 0xAE603202, + 0x00000002, 0x402F2C20, 0xAE605202, 0x00000002, 0x002F2C88, 0xAE605202, + 0x00000004, 0x002F2C9C, 0x0002E49C, 0x002E829C, 0x0002E49C, 0x00000002, + 0x002F2C9D, 0x002BDE9D, 0x00000003, 0x002F2C9D, 0x002F2C9D, 0x002E829D, + 0x00000003, 0x002F2C9D, 0x002F2C9D, 0x0030BE9D, + // Block 59, offset 0xec0 + 0x00000003, 0x002F2C9D, 0x00302C9D, 0x002C989D, 0x00000002, 0x002F5684, + 0x002F2C84, 0x00000002, 0x402F7A20, 0xAE603202, 0x00000002, 0x002F7A88, + 0xAE603202, 0x00000002, 0x402F7A20, 0xAE604102, 0x00000002, 0x002F7A88, + 0xAE604102, 0x00000002, 0x402F7A20, 0xAE605202, 0x00000002, 0x002F7A88, + 0xAE605202, 0x00000002, 0x402F7A20, 0xACA05602, 0x00000002, 0x002F7A88, + 0xACA05602, 0x00000002, 0x002F7A84, 0xA0006104, 0x00000002, 0x002F7A8A, + 0xA0006104, 0x00000002, 0x402F7A20, 0xAE606502, 0x00000002, 0x002F7A88, + 0xAE606502, 0x00000002, 0x402F7A20, 0xAE606702, 0x00000002, 0x002F7A88, + 0xAE606702, 0x00000002, 0x402F7A20, 0xADC07002, 0x00000002, 0x002F7A88, + 0xADC07002, 0x00000003, 0x402F7A20, 0xADC07002, 0xAE605B02, 0x00000003, + 0x002F7A88, 0xADC07002, 0xAE605B02, 0x00000002, + // Block 60, offset 0xf00 + 0x402F7A20, 0xADC07B02, 0x00000002, 0x002F7A88, 0xADC07B02, 0x00000002, + 0x002F7A84, 0xA0013A04, 0x00000002, 0x002F7A8A, 0xA0013A04, 0x00000003, + 0x002F7A9C, 0x002BDE9C, 0x002C629C, 0x00000005, 0x002F7A9C, 0x002BDE9C, + 0x002C629C, 0x0009569C, 0x002FE69C, 0x00000006, 0x002F7A9C, 0x002BDE9C, + 0x002C629C, 0x0009569C, 0x002FE69C, 0x0029D09C, 0x00000002, 0x402FE620, + 0xAE603202, 0x00000002, 0x002FE688, 0xAE603202, 0x00000003, 0x402FE620, + 0xAE603202, 0xAE605202, 0x00000003, 0x002FE688, 0xAE603202, 0xAE605202, + 0x00000002, 0x402FE620, 0xAE603C02, 0x00000002, 0x002FE688, 0xAE603C02, + 0x00000002, 0x402FE620, 0xAE604102, 0x00000002, 0x002FE688, 0xAE604102, + 0x00000003, 0x402FE620, 0xAE604102, 0xAE605202, 0x00000003, 0x002FE688, + 0xAE604102, 0xAE605202, 0x00000002, 0x402FE620, + // Block 61, offset 0xf40 + 0xAE605202, 0x00000002, 0x002FE688, 0xAE605202, 0x00000002, 0x402FE620, + 0xACA05602, 0x00000002, 0x002FE688, 0xACA05602, 0x00000002, 0x002FE684, + 0xA0006104, 0x00000002, 0x002FE68A, 0xA0006104, 0x00000002, 0x402FE620, + 0xADC07002, 0x00000002, 0x002FE688, 0xADC07002, 0x00000003, 0x402FE620, + 0xADC07002, 0xAE605202, 0x00000003, 0x002FE688, 0xADC07002, 0xAE605202, + 0x00000002, 0x402FE620, 0xADC07702, 0x00000002, 0x002FE688, 0xADC07702, + 0x00000002, 0x002FE684, 0xA0013A04, 0x00000002, 0x84E617F3, 0xAE613A04, + 0x00000002, 0x002FE684, 0xA0013A04, 0x00000002, 0x002FE68A, 0xA0013A04, + 0x00000003, 0x002FE684, 0xA0013A04, 0xAE605202, 0x00000002, 0x002FE69D, + 0x002BDE9D, 0x00000003, 0x002FE69D, 0x002EE29D, 0x002FE69D, 0x00000003, + 0x002FE684, 0xA0013904, 0x002FE684, 0x00000003, + // Block 62, offset 0xf80 + 0x002FE68A, 0xA0013904, 0x002FE68A, 0x00000003, 0x002FE684, 0xA0013A04, + 0x00302C84, 0x00000002, 0x40302C20, 0xAE604102, 0x00000002, 0x00302C88, + 0xAE604102, 0x00000002, 0x40302C20, 0xAE604702, 0x00000002, 0x40302C20, + 0xAE605202, 0x00000002, 0x00302C88, 0xAE605202, 0x00000002, 0x40302C20, + 0xACA05602, 0x00000002, 0x00302C88, 0xACA05602, 0x00000002, 0x40302C20, + 0xADC07002, 0x00000002, 0x00302C88, 0xADC07002, 0x00000002, 0x40302C20, + 0xADC07702, 0x00000002, 0x00302C88, 0xADC07702, 0x00000002, 0x40302C20, + 0xADC07802, 0x00000002, 0x00302C88, 0xADC07802, 0x00000002, 0x40302C20, + 0xADC07B02, 0x00000002, 0x00302C88, 0xADC07B02, 0x00000002, 0x00302C84, + 0xA0013A04, 0x00000002, 0x00302C8A, 0xA0013A04, 0x00000002, 0x00302C84, + 0x002C5684, 0x00000003, 0x00302C8A, 0x002C988A, + // Block 63, offset 0xfc0 + 0x002E228A, 0x00000003, 0x00302C84, 0xA0013904, 0x002D6884, 0x00000003, + 0x00302C9D, 0x002D689D, 0x00312A9C, 0x00000002, 0x00302C84, 0x002FE684, + 0x00000002, 0x00302C84, 0x002FE684, 0x00000002, 0x00302C84, 0x00300884, + 0x00000002, 0x00302C84, 0x00312A84, 0x00000002, 0x00302C8A, 0x00312A84, + 0x00000002, 0x40306C20, 0xAE603202, 0x00000002, 0x00306C88, 0xAE603202, + 0x00000002, 0x40306C20, 0xAE603502, 0x00000002, 0x00306C88, 0xAE603502, + 0x00000002, 0x40306C20, 0xAE603702, 0x00000002, 0x00306C88, 0xAE603702, + 0x00000002, 0x40306C20, 0xAE603C02, 0x00000002, 0x00306C88, 0xAE603C02, + 0x00000002, 0x40306C20, 0xAE604102, 0x00000002, 0x00306C88, 0xAE604102, + 0x00000002, 0x40306C20, 0xAE604302, 0x00000002, 0x00306C88, 0xAE604302, + 0x00000002, 0x40306C20, 0xAE604702, 0x00000002, + // Block 64, offset 0x1000 + 0x00306C88, 0xAE604702, 0x00000003, 0x40306C20, 0xAE604702, 0xAE603202, + 0x00000003, 0x00306C88, 0xAE604702, 0xAE603202, 0x00000003, 0x40306C20, + 0xAE604702, 0xAE603502, 0x00000003, 0x00306C88, 0xAE604702, 0xAE603502, + 0x00000003, 0x40306C20, 0xAE604702, 0xAE604102, 0x00000003, 0x00306C88, + 0xAE604702, 0xAE604102, 0x00000003, 0x40306C20, 0xAE604702, 0xAE605B02, + 0x00000003, 0x00306C88, 0xAE604702, 0xAE605B02, 0x00000002, 0x40306C20, + 0xAE604D02, 0x00000002, 0x00306C88, 0xAE604D02, 0x00000002, 0x40306C20, + 0xAE604E02, 0x00000002, 0x00306C88, 0xAE604E02, 0x00000003, 0x40306C20, + 0xAE604E02, 0xAE603202, 0x00000003, 0x00306C88, 0xAE604E02, 0xAE603202, + 0x00000002, 0x40306C20, 0xACA05902, 0x00000002, 0x00306C88, 0xACA05902, + 0x00000002, 0x40306C20, 0xAE605B02, 0x00000002, + // Block 65, offset 0x1040 + 0x00306C88, 0xAE605B02, 0x00000003, 0x40306C20, 0xAE605B02, 0xAE604702, + 0x00000003, 0x00306C88, 0xAE605B02, 0xAE604702, 0x00000002, 0x40306C20, + 0xAE606402, 0x00000002, 0x00306C88, 0xAE606402, 0x00000002, 0x40306C20, + 0xAE606502, 0x00000002, 0x00306C88, 0xAE606502, 0x00000002, 0x40306C20, + 0xAE606702, 0x00000002, 0x00306C88, 0xAE606702, 0x00000002, 0x40306C20, + 0xAD806802, 0x00000002, 0x00306C88, 0xAD806802, 0x00000003, 0x40306C20, + 0xAD806802, 0xAE603202, 0x00000003, 0x00306C88, 0xAD806802, 0xAE603202, + 0x00000003, 0x40306C20, 0xAD806802, 0xAE603502, 0x00000003, 0x00306C88, + 0xAD806802, 0xAE603502, 0x00000003, 0x40306C20, 0xAD806802, 0xAE604E02, + 0x00000003, 0x00306C88, 0xAD806802, 0xAE604E02, 0x00000003, 0x40306C20, + 0xAD806802, 0xAE606402, 0x00000003, 0x00306C88, + // Block 66, offset 0x1080 + 0xAD806802, 0xAE606402, 0x00000003, 0x40306C20, 0xAD806802, 0xADC07002, + 0x00000003, 0x00306C88, 0xAD806802, 0xADC07002, 0x00000002, 0x40306C20, + 0xADC07002, 0x00000002, 0x00306C88, 0xADC07002, 0x00000002, 0x40306C20, + 0xADC07502, 0x00000002, 0x00306C88, 0xADC07502, 0x00000002, 0x40306C20, + 0xADC07802, 0x00000002, 0x00306C88, 0xADC07802, 0x00000002, 0x40306C20, + 0xADC07A02, 0x00000002, 0x00306C88, 0xADC07A02, 0x00000003, 0x00306C9D, + 0x002F2C9D, 0x0002BA9C, 0x00000002, 0x4030BE20, 0xAE604E02, 0x00000002, + 0x0030BE88, 0xAE604E02, 0x00000002, 0x4030BE20, 0xADC07002, 0x00000002, + 0x0030BE88, 0xADC07002, 0x00000003, 0x0030BE9D, 0x0009569C, 0x002E829C, + 0x00000004, 0x0030BE84, 0x002D9A84, 0x002D9A84, 0x002D9A9F, 0x00000004, + 0x0030BE8A, 0x002D9A8A, 0x002D9A8A, 0x002D9A9F, + // Block 67, offset 0x10c0 + 0x00000002, 0x0030BE9D, 0x002FE69D, 0x00000002, 0x0030BE84, 0x00310084, + 0x00000002, 0x0030BE8A, 0x0031008A, 0x00000002, 0x4030E220, 0xAE603202, + 0x00000002, 0x0030E288, 0xAE603202, 0x00000002, 0x4030E220, 0xAE603502, + 0x00000002, 0x0030E288, 0xAE603502, 0x00000002, 0x4030E220, 0xAE603C02, + 0x00000002, 0x0030E288, 0xAE603C02, 0x00000002, 0x4030E220, 0xAE604302, + 0x00000002, 0x4030E220, 0xAE604702, 0x00000002, 0x0030E288, 0xAE604702, + 0x00000002, 0x4030E220, 0xAE605202, 0x00000002, 0x0030E288, 0xAE605202, + 0x00000002, 0x4030E220, 0xADC07002, 0x00000002, 0x0030E288, 0xADC07002, + 0x00000002, 0x0030E29D, 0x002C3A9D, 0x00000002, 0x4030F620, 0xAE604702, + 0x00000002, 0x0030F688, 0xAE604702, 0x00000002, 0x4030F620, 0xAE605202, + 0x00000002, 0x0030F688, 0xAE605202, 0x00000002, + // Block 68, offset 0x1100 + 0x40310020, 0xAE603202, 0x00000002, 0x00310088, 0xAE603202, 0x00000002, + 0x40310020, 0xAE603502, 0x00000002, 0x00310088, 0xAE603502, 0x00000002, + 0x40310020, 0xAE603C02, 0x00000002, 0x00310088, 0xAE603C02, 0x00000002, + 0x40310020, 0xAE604302, 0x00000002, 0x40310020, 0xAE604702, 0x00000002, + 0x00310088, 0xAE604702, 0x00000002, 0x40310020, 0xAE604E02, 0x00000002, + 0x00310088, 0xAE604E02, 0x00000002, 0x40310020, 0xAE605202, 0x00000002, + 0x00310088, 0xAE605202, 0x00000002, 0x40310020, 0xAE605B02, 0x00000002, + 0x00310088, 0xAE605B02, 0x00000002, 0x40310020, 0xAE606402, 0x00000002, + 0x00310088, 0xAE606402, 0x00000002, 0x40310020, 0xADC07002, 0x00000002, + 0x00310088, 0xADC07002, 0x00000002, 0x40312A20, 0xAE603202, 0x00000002, + 0x00312A88, 0xAE603202, 0x00000002, 0x40312A20, + // Block 69, offset 0x1140 + 0xAE603C02, 0x00000002, 0x00312A88, 0xAE603C02, 0x00000002, 0x40312A20, + 0xAE604102, 0x00000002, 0x00312A88, 0xAE604102, 0x00000002, 0x40312A20, + 0xAE605202, 0x00000002, 0x00312A88, 0xAE605202, 0x00000002, 0x40312A20, + 0xADC07002, 0x00000002, 0x00312A88, 0xADC07002, 0x00000002, 0x40312A20, + 0xADC07B02, 0x00000002, 0x00312A88, 0xADC07B02, 0x00000002, 0x00312A84, + 0x0030E284, 0x00000002, 0x40316420, 0xAE604102, 0x00000002, 0x00316488, + 0xAE604102, 0x00000002, 0x40325220, 0xAE602202, 0x00000002, 0x00325288, + 0xAE602202, 0x00000003, 0x40325220, 0xAE602202, 0xAE603202, 0x00000003, + 0x00325288, 0xAE602202, 0xAE603202, 0x00000004, 0x40325220, 0xAE602202, + 0xAE603202, 0xAF007F02, 0x00000004, 0x00325288, 0xAE602202, 0xAE603202, + 0xAF007F02, 0x00000003, 0x40325220, 0xAE602202, + // Block 70, offset 0x1180 + 0xAE603502, 0x00000003, 0x00325288, 0xAE602202, 0xAE603502, 0x00000004, + 0x40325220, 0xAE602202, 0xAE603502, 0xAF007F02, 0x00000004, 0x00325288, + 0xAE602202, 0xAE603502, 0xAF007F02, 0x00000003, 0x40325220, 0xAE602202, + 0xAE604502, 0x00000003, 0x00325288, 0xAE602202, 0xAE604502, 0x00000004, + 0x40325220, 0xAE602202, 0xAE604502, 0xAF007F02, 0x00000004, 0x00325288, + 0xAE602202, 0xAE604502, 0xAF007F02, 0x00000003, 0x40325220, 0xAE602202, + 0xAF007F02, 0x00000003, 0x00325288, 0xAE602202, 0xAF007F02, 0x00000002, + 0x40325220, 0xAE602A02, 0x00000002, 0x00325288, 0xAE602A02, 0x00000003, + 0x40325220, 0xAE602A02, 0xAE603202, 0x00000003, 0x00325288, 0xAE602A02, + 0xAE603202, 0x00000004, 0x40325220, 0xAE602A02, 0xAE603202, 0xAF007F02, + 0x00000004, 0x00325288, 0xAE602A02, 0xAE603202, + // Block 71, offset 0x11c0 + 0xAF007F02, 0x00000003, 0x40325220, 0xAE602A02, 0xAE603502, 0x00000003, + 0x00325288, 0xAE602A02, 0xAE603502, 0x00000004, 0x40325220, 0xAE602A02, + 0xAE603502, 0xAF007F02, 0x00000004, 0x00325288, 0xAE602A02, 0xAE603502, + 0xAF007F02, 0x00000003, 0x40325220, 0xAE602A02, 0xAE604502, 0x00000003, + 0x00325288, 0xAE602A02, 0xAE604502, 0x00000004, 0x40325220, 0xAE602A02, + 0xAE604502, 0xAF007F02, 0x00000004, 0x00325288, 0xAE602A02, 0xAE604502, + 0xAF007F02, 0x00000003, 0x40325220, 0xAE602A02, 0xAF007F02, 0x00000003, + 0x00325288, 0xAE602A02, 0xAF007F02, 0x00000002, 0x40325220, 0xAE603202, + 0x00000002, 0x00325288, 0xAE603202, 0x00000003, 0x40325220, 0xAE603202, + 0xAF007F02, 0x00000002, 0x40325220, 0xAE603502, 0x00000002, 0x00325288, + 0xAE603502, 0x00000003, 0x40325220, 0xAE603502, + // Block 72, offset 0x1200 + 0xAF007F02, 0x00000002, 0x40325220, 0xAE603702, 0x00000002, 0x00325288, + 0xAE603702, 0x00000002, 0x40325220, 0xAE604502, 0x00000003, 0x40325220, + 0xAE604502, 0xAF007F02, 0x00000002, 0x40325220, 0xAE605B02, 0x00000002, + 0x00325288, 0xAE605B02, 0x00000002, 0x40325220, 0xAF007F02, 0x00000002, + 0x00325288, 0xAF007F02, 0x00000002, 0x40325C20, 0xAE602202, 0x00000002, + 0x00325C88, 0xAE602202, 0x00000003, 0x40325C20, 0xAE602202, 0xAE603202, + 0x00000003, 0x00325C88, 0xAE602202, 0xAE603202, 0x00000003, 0x40325C20, + 0xAE602202, 0xAE603502, 0x00000003, 0x00325C88, 0xAE602202, 0xAE603502, + 0x00000002, 0x40325C20, 0xAE602A02, 0x00000002, 0x00325C88, 0xAE602A02, + 0x00000003, 0x40325C20, 0xAE602A02, 0xAE603202, 0x00000003, 0x00325C88, + 0xAE602A02, 0xAE603202, 0x00000003, 0x40325C20, + // Block 73, offset 0x1240 + 0xAE602A02, 0xAE603502, 0x00000003, 0x00325C88, 0xAE602A02, 0xAE603502, + 0x00000002, 0x40325C20, 0xAE603202, 0x00000002, 0x00325C88, 0xAE603202, + 0x00000002, 0x40325C20, 0xAE603502, 0x00000002, 0x00325C88, 0xAE603502, + 0x00000002, 0x40326820, 0xAE602202, 0x00000002, 0x00326888, 0xAE602202, + 0x00000003, 0x40326820, 0xAE602202, 0xAE603202, 0x00000003, 0x00326888, + 0xAE602202, 0xAE603202, 0x00000004, 0x40326820, 0xAE602202, 0xAE603202, + 0xAF007F02, 0x00000004, 0x00326888, 0xAE602202, 0xAE603202, 0xAF007F02, + 0x00000003, 0x40326820, 0xAE602202, 0xAE603502, 0x00000003, 0x00326888, + 0xAE602202, 0xAE603502, 0x00000004, 0x40326820, 0xAE602202, 0xAE603502, + 0xAF007F02, 0x00000004, 0x00326888, 0xAE602202, 0xAE603502, 0xAF007F02, + 0x00000003, 0x40326820, 0xAE602202, 0xAE604502, + // Block 74, offset 0x1280 + 0x00000003, 0x00326888, 0xAE602202, 0xAE604502, 0x00000004, 0x40326820, + 0xAE602202, 0xAE604502, 0xAF007F02, 0x00000004, 0x00326888, 0xAE602202, + 0xAE604502, 0xAF007F02, 0x00000003, 0x40326820, 0xAE602202, 0xAF007F02, + 0x00000003, 0x00326888, 0xAE602202, 0xAF007F02, 0x00000002, 0x40326820, + 0xAE602A02, 0x00000002, 0x00326888, 0xAE602A02, 0x00000003, 0x40326820, + 0xAE602A02, 0xAE603202, 0x00000003, 0x00326888, 0xAE602A02, 0xAE603202, + 0x00000004, 0x40326820, 0xAE602A02, 0xAE603202, 0xAF007F02, 0x00000004, + 0x00326888, 0xAE602A02, 0xAE603202, 0xAF007F02, 0x00000003, 0x40326820, + 0xAE602A02, 0xAE603502, 0x00000003, 0x00326888, 0xAE602A02, 0xAE603502, + 0x00000004, 0x40326820, 0xAE602A02, 0xAE603502, 0xAF007F02, 0x00000004, + 0x00326888, 0xAE602A02, 0xAE603502, 0xAF007F02, + // Block 75, offset 0x12c0 + 0x00000003, 0x40326820, 0xAE602A02, 0xAE604502, 0x00000003, 0x00326888, + 0xAE602A02, 0xAE604502, 0x00000004, 0x40326820, 0xAE602A02, 0xAE604502, + 0xAF007F02, 0x00000004, 0x00326888, 0xAE602A02, 0xAE604502, 0xAF007F02, + 0x00000003, 0x40326820, 0xAE602A02, 0xAF007F02, 0x00000003, 0x00326888, + 0xAE602A02, 0xAF007F02, 0x00000002, 0x40326820, 0xAE603202, 0x00000002, + 0x00326888, 0xAE603202, 0x00000003, 0x40326820, 0xAE603202, 0xAF007F02, + 0x00000002, 0x40326820, 0xAE603502, 0x00000002, 0x00326888, 0xAE603502, + 0x00000003, 0x40326820, 0xAE603502, 0xAF007F02, 0x00000002, 0x40326820, + 0xAE604502, 0x00000003, 0x40326820, 0xAE604502, 0xAF007F02, 0x00000002, + 0x40326820, 0xAF007F02, 0x00000002, 0x00326888, 0xAF007F02, 0x00000002, + 0x40326C20, 0xAE602202, 0x00000002, 0x00326C88, + // Block 76, offset 0x1300 + 0xAE602202, 0x00000003, 0x40326C20, 0xAE602202, 0xAE603202, 0x00000003, + 0x00326C88, 0xAE602202, 0xAE603202, 0x00000003, 0x40326C20, 0xAE602202, + 0xAE603502, 0x00000003, 0x00326C88, 0xAE602202, 0xAE603502, 0x00000003, + 0x40326C20, 0xAE602202, 0xAE604502, 0x00000003, 0x00326C88, 0xAE602202, + 0xAE604502, 0x00000002, 0x40326C20, 0xAE602A02, 0x00000002, 0x00326C88, + 0xAE602A02, 0x00000003, 0x40326C20, 0xAE602A02, 0xAE603202, 0x00000003, + 0x00326C88, 0xAE602A02, 0xAE603202, 0x00000003, 0x40326C20, 0xAE602A02, + 0xAE603502, 0x00000003, 0x00326C88, 0xAE602A02, 0xAE603502, 0x00000003, + 0x40326C20, 0xAE602A02, 0xAE604502, 0x00000003, 0x00326C88, 0xAE602A02, + 0xAE604502, 0x00000002, 0x40326C20, 0xAE603202, 0x00000002, 0x00326C88, + 0xAE603202, 0x00000002, 0x40326C20, 0xAE603502, + // Block 77, offset 0x1340 + 0x00000002, 0x00326C88, 0xAE603502, 0x00000002, 0x40326C20, 0xAE603702, + 0x00000002, 0x00326C88, 0xAE603702, 0x00000002, 0x40326C20, 0xAE604502, + 0x00000002, 0x40326C20, 0xAE604702, 0x00000002, 0x00326C88, 0xAE604702, + 0x00000003, 0x40326C20, 0xAE604702, 0xAE603202, 0x00000003, 0x40326C20, + 0xAE604702, 0xAE603502, 0x00000003, 0x40326C20, 0xAE604702, 0xAE604502, + 0x00000002, 0x40326C20, 0xAE605B02, 0x00000002, 0x00326C88, 0xAE605B02, + 0x00000003, 0x00327084, 0x00325284, 0x00326C84, 0x00000003, 0x0032708A, + 0x00325284, 0x00326C84, 0x00000002, 0x40327C20, 0xAE602202, 0x00000002, + 0x00327C88, 0xAE602202, 0x00000003, 0x40327C20, 0xAE602202, 0xAE603202, + 0x00000003, 0x00327C88, 0xAE602202, 0xAE603202, 0x00000003, 0x40327C20, + 0xAE602202, 0xAE603502, 0x00000003, 0x00327C88, + // Block 78, offset 0x1380 + 0xAE602202, 0xAE603502, 0x00000002, 0x40327C20, 0xAE602A02, 0x00000002, + 0x00327C88, 0xAE602A02, 0x00000003, 0x40327C20, 0xAE602A02, 0xAE603202, + 0x00000003, 0x00327C88, 0xAE602A02, 0xAE603202, 0x00000003, 0x40327C20, + 0xAE602A02, 0xAE603502, 0x00000003, 0x00327C88, 0xAE602A02, 0xAE603502, + 0x00000002, 0x40327C20, 0xAE603202, 0x00000002, 0x00327C88, 0xAE603202, + 0x00000002, 0x40327C20, 0xAE603502, 0x00000002, 0x00327C88, 0xAE603502, + 0x00000002, 0x40328820, 0xAE602202, 0x00000002, 0x40328820, 0xAE602A02, + 0x00000002, 0x00328888, 0xAE602A02, 0x00000002, 0x40329820, 0xAE602202, + 0x00000003, 0x40329820, 0xAE602202, 0xAE603202, 0x00000003, 0x40329820, + 0xAE602202, 0xAE603502, 0x00000003, 0x40329820, 0xAE602202, 0xAE604502, + 0x00000002, 0x40329820, 0xAE602A02, 0x00000002, + // Block 79, offset 0x13c0 + 0x00329888, 0xAE602A02, 0x00000003, 0x40329820, 0xAE602A02, 0xAE603202, + 0x00000003, 0x00329888, 0xAE602A02, 0xAE603202, 0x00000003, 0x40329820, + 0xAE602A02, 0xAE603502, 0x00000003, 0x00329888, 0xAE602A02, 0xAE603502, + 0x00000003, 0x40329820, 0xAE602A02, 0xAE604502, 0x00000003, 0x00329888, + 0xAE602A02, 0xAE604502, 0x00000002, 0x40329820, 0xAE603202, 0x00000002, + 0x00329888, 0xAE603202, 0x00000002, 0x40329820, 0xAE603502, 0x00000002, + 0x00329888, 0xAE603502, 0x00000002, 0x40329820, 0xAE603702, 0x00000002, + 0x00329888, 0xAE603702, 0x00000002, 0x40329820, 0xAE604502, 0x00000002, + 0x40329820, 0xAE604702, 0x00000002, 0x00329888, 0xAE604702, 0x00000003, + 0x40329820, 0xAE604702, 0xAE603202, 0x00000003, 0x40329820, 0xAE604702, + 0xAE603502, 0x00000003, 0x40329820, 0xAE604702, + // Block 80, offset 0x1400 + 0xAE604502, 0x00000002, 0x40329820, 0xAE605B02, 0x00000002, 0x00329888, + 0xAE605B02, 0x00000002, 0x4032A220, 0xAE602202, 0x00000002, 0x0032A288, + 0xAE602202, 0x00000003, 0x4032A220, 0xAE602202, 0xAE603202, 0x00000003, + 0x0032A288, 0xAE602202, 0xAE603202, 0x00000004, 0x4032A220, 0xAE602202, + 0xAE603202, 0xAF007F02, 0x00000004, 0x0032A288, 0xAE602202, 0xAE603202, + 0xAF007F02, 0x00000003, 0x4032A220, 0xAE602202, 0xAE603502, 0x00000003, + 0x0032A288, 0xAE602202, 0xAE603502, 0x00000004, 0x4032A220, 0xAE602202, + 0xAE603502, 0xAF007F02, 0x00000004, 0x0032A288, 0xAE602202, 0xAE603502, + 0xAF007F02, 0x00000003, 0x4032A220, 0xAE602202, 0xAE604502, 0x00000003, + 0x0032A288, 0xAE602202, 0xAE604502, 0x00000004, 0x4032A220, 0xAE602202, + 0xAE604502, 0xAF007F02, 0x00000004, 0x0032A288, + // Block 81, offset 0x1440 + 0xAE602202, 0xAE604502, 0xAF007F02, 0x00000003, 0x4032A220, 0xAE602202, + 0xAF007F02, 0x00000003, 0x0032A288, 0xAE602202, 0xAF007F02, 0x00000002, + 0x4032A220, 0xAE602A02, 0x00000002, 0x0032A288, 0xAE602A02, 0x00000003, + 0x4032A220, 0xAE602A02, 0xAE603202, 0x00000003, 0x0032A288, 0xAE602A02, + 0xAE603202, 0x00000004, 0x4032A220, 0xAE602A02, 0xAE603202, 0xAF007F02, + 0x00000004, 0x0032A288, 0xAE602A02, 0xAE603202, 0xAF007F02, 0x00000003, + 0x4032A220, 0xAE602A02, 0xAE603502, 0x00000003, 0x0032A288, 0xAE602A02, + 0xAE603502, 0x00000004, 0x4032A220, 0xAE602A02, 0xAE603502, 0xAF007F02, + 0x00000004, 0x0032A288, 0xAE602A02, 0xAE603502, 0xAF007F02, 0x00000003, + 0x4032A220, 0xAE602A02, 0xAE604502, 0x00000003, 0x0032A288, 0xAE602A02, + 0xAE604502, 0x00000004, 0x4032A220, 0xAE602A02, + // Block 82, offset 0x1480 + 0xAE604502, 0xAF007F02, 0x00000004, 0x0032A288, 0xAE602A02, 0xAE604502, + 0xAF007F02, 0x00000003, 0x4032A220, 0xAE602A02, 0xAF007F02, 0x00000003, + 0x0032A288, 0xAE602A02, 0xAF007F02, 0x00000002, 0x4032A220, 0xAE603202, + 0x00000002, 0x0032A288, 0xAE603202, 0x00000003, 0x4032A220, 0xAE603202, + 0xAF007F02, 0x00000002, 0x4032A220, 0xAE603502, 0x00000002, 0x0032A288, + 0xAE603502, 0x00000003, 0x4032A220, 0xAE603502, 0xAF007F02, 0x00000002, + 0x4032A220, 0xAE604502, 0x00000003, 0x4032A220, 0xAE604502, 0xAF007F02, + 0x00000002, 0x4032A220, 0xAF007F02, 0x00000002, 0x0032A288, 0xAF007F02, + 0x00000003, 0x0032C084, 0x0032AA84, 0x0032BE84, 0x00000002, 0x00336284, + 0xA0013A04, 0x00000002, 0x0033628A, 0xA0013A04, 0x00000002, 0x4033B220, + 0xAE603502, 0x00000002, 0x0033B288, 0xAE603502, + // Block 83, offset 0x14c0 + 0x00000002, 0x4033B220, 0xAE604702, 0x00000002, 0x0033B288, 0xAE604702, + 0x00000002, 0x4033CA20, 0xAE603702, 0x00000002, 0x0033CA88, 0xAE603702, + 0x00000002, 0x40341420, 0xAE603502, 0x00000002, 0x00341488, 0xAE603502, + 0x00000002, 0x40341420, 0xAE605B02, 0x00000002, 0x00341488, 0xAE605B02, + 0x00000002, 0x84E61A9D, 0x84E61AA6, 0x00000002, 0x40357220, 0xAE605B02, + 0x00000002, 0x00357288, 0xAE605B02, 0x00000002, 0x40389020, 0xA1108C02, + 0x00000002, 0x40389020, 0xA1208D02, 0x00000002, 0x40389020, 0xA1509202, + 0x00000002, 0x40389220, 0xA1509202, 0x00000002, 0x40389220, 0xA1709502, + 0x00000002, 0x40389420, 0xA1509202, 0x00000002, 0x40389620, 0xA1509202, + 0x00000002, 0x40389820, 0xA1509202, 0x00000002, 0x40389A20, 0xA1308E02, + 0x00000002, 0x40389A20, 0xA1509202, 0x00000002, + // Block 84, offset 0x1500 + 0x00389A84, 0x00389A84, 0x00000002, 0x00389A84, 0x0038A284, 0x00000002, + 0x40389C20, 0xA1509202, 0x00000002, 0x4038A020, 0xA1509202, 0x00000002, + 0x4038A220, 0xA0E08902, 0x00000002, 0x4038A220, 0xA1509202, 0x00000002, + 0x0038A284, 0x0038A284, 0x00000003, 0x0038A284, 0x0038A284, 0xA1108C02, + 0x00000002, 0x4038A420, 0xA1509202, 0x00000002, 0x0038A499, 0xA1509202, + 0x00000002, 0x4038A420, 0xA1709502, 0x00000002, 0x4038A620, 0xA1509202, + 0x00000002, 0x4038A820, 0xA1509202, 0x00000002, 0x4038AA20, 0xA1509202, + 0x00000002, 0x4038AC20, 0xA1509202, 0x00000002, 0x4038B020, 0xA1509202, + 0x00000002, 0x0038B099, 0xA1509202, 0x00000002, 0x4038B020, 0xA1709502, + 0x00000002, 0x4038B220, 0xA1509202, 0x00000002, 0x4038B420, 0xA1509202, + 0x00000002, 0x4038B620, 0xA1509202, 0x00000002, + // Block 85, offset 0x1540 + 0x4038B820, 0xA1909002, 0x00000002, 0x4038B820, 0xA1809102, 0x00000002, + 0x4038B820, 0xA1509202, 0x00000003, 0x4038B820, 0xA1509202, 0xA1909002, + 0x00000003, 0x4038B820, 0xA1509202, 0xA1809102, 0x00000002, 0x4038BA20, + 0xA1509202, 0x00000002, 0x00391C84, 0xA0013A04, 0x00000002, 0x00393099, + 0x00393899, 0x00000002, 0x0039309A, 0x0039389A, 0x00000002, 0x00393097, + 0x00396497, 0x00000002, 0x0039309A, 0x0039649A, 0x00000002, 0x00393097, + 0x00397297, 0x00000002, 0x0039309A, 0x0039729A, 0x00000002, 0x00393097, + 0x00397497, 0x00000002, 0x00393099, 0x0039A499, 0x00000002, 0x00393099, + 0x0039A699, 0x00000002, 0x00393097, 0x003A4E97, 0x00000002, 0x00393098, + 0x003A4E98, 0x00000002, 0x00393099, 0x003A4E99, 0x00000002, 0x0039309A, + 0x003A4E9A, 0x00000002, 0x00393099, 0x003A5699, + // Block 86, offset 0x1580 + 0x00000002, 0x00393097, 0x003A6897, 0x00000002, 0x00393098, 0x003A6898, + 0x00000002, 0x00393099, 0x003A7299, 0x00000002, 0x0039309A, 0x003A729A, + 0x00000002, 0x00393099, 0x003A7499, 0x00000002, 0x0039309A, 0x003A749A, + 0x00000002, 0x00393099, 0x003A7A99, 0x00000002, 0x0039309A, 0x003A7A9A, + 0x00000002, 0x00393099, 0x003A7C99, 0x00000002, 0x0039309A, 0x003A7C9A, + 0x00000002, 0x00393099, 0x003A7E99, 0x00000002, 0x0039309A, 0x003A7E9A, + 0x00000002, 0x00393097, 0x003A8E97, 0x00000002, 0x00393099, 0x003A8E99, + 0x00000002, 0x00393099, 0x003A8E99, 0x00000002, 0x0039309A, 0x003A8E9A, + 0x00000002, 0x0039309A, 0x003A8E9A, 0x00000002, 0x00393099, 0x003A9099, + 0x00000002, 0x0039309A, 0x003A909A, 0x00000002, 0x00393097, 0x003A9897, + 0x00000002, 0x00393099, 0x003A9899, 0x00000002, + // Block 87, offset 0x15c0 + 0x0039309A, 0x003A989A, 0x00000004, 0x0039389A, 0x003A1A9A, 0x00393C9A, + 0x0039A49A, 0x00000004, 0x0039389A, 0x003A409A, 0x003A409A, 0x003A689A, + 0x00000003, 0x00393C99, 0x00397299, 0x003A9099, 0x00000003, 0x00393C99, + 0x00397499, 0x003A9099, 0x00000003, 0x00395697, 0x00396497, 0x003A4E97, + 0x00000003, 0x00395699, 0x00396499, 0x003A8E99, 0x00000003, 0x00395699, + 0x00396499, 0x003A9099, 0x00000003, 0x00395697, 0x00397297, 0x00396497, + 0x00000003, 0x00395699, 0x00397299, 0x00396499, 0x00000003, 0x00395697, + 0x00397297, 0x003A4E97, 0x00000003, 0x00395697, 0x00397497, 0x003A4E97, + 0x00000003, 0x00395699, 0x00397499, 0x003A8E99, 0x00000003, 0x00395699, + 0x00397499, 0x003A9099, 0x00000003, 0x00395697, 0x003A4E97, 0x00396497, + 0x00000003, 0x00395697, 0x003A4E97, 0x00397297, + // Block 88, offset 0x1600 + 0x00000003, 0x00395697, 0x003A4E97, 0x00397497, 0x00000003, 0x00395699, + 0x003A4E99, 0x003A8E99, 0x00000003, 0x00395699, 0x003A4E99, 0x003A9099, + 0x00000003, 0x00396499, 0x00397299, 0x003A8E99, 0x00000003, 0x00396499, + 0x00397299, 0x003A9099, 0x00000008, 0x0039649A, 0x003A409A, 0x0002129A, + 0x0039649A, 0x003A409A, 0x0039389A, 0x003A409A, 0x003A689A, 0x00000003, + 0x00396497, 0x003A4E97, 0x00397297, 0x00000003, 0x00396499, 0x003A4E99, + 0x00397299, 0x00000003, 0x00396499, 0x003A4E99, 0x003A8E99, 0x00000003, + 0x00396499, 0x003A4E99, 0x003A9099, 0x00000003, 0x00397299, 0x00396499, + 0x003A9099, 0x00000003, 0x00397299, 0x003A4E99, 0x003A8E99, 0x00000003, + 0x00397299, 0x003A4E99, 0x003A9099, 0x00000004, 0x0039A49A, 0x0039C69A, + 0x003A749A, 0x003A409A, 0x00000003, 0x0039C697, + // Block 89, offset 0x1640 + 0x00396497, 0x00397297, 0x00000003, 0x0039C699, 0x00396499, 0x003A8E99, + 0x00000003, 0x0039C697, 0x00397297, 0x00396497, 0x00000003, 0x0039C699, + 0x00397499, 0x003A8E99, 0x00000003, 0x0039C699, 0x00397499, 0x003A9099, + 0x00000003, 0x0039C697, 0x003A4E97, 0x00396497, 0x00000003, 0x0039C697, + 0x003A4E97, 0x00397297, 0x00000003, 0x0039C699, 0x003A4E99, 0x00397299, + 0x00000003, 0x0039C697, 0x003A4E97, 0x003A4E97, 0x00000003, 0x0039C699, + 0x003A4E99, 0x003A4E99, 0x00000003, 0x0039C899, 0x00396499, 0x003A9099, + 0x00000003, 0x0039C897, 0x00397297, 0x003A4E97, 0x00000003, 0x0039C899, + 0x00397299, 0x003A4E99, 0x00000003, 0x0039C899, 0x00397299, 0x003A9099, + 0x00000003, 0x0039C897, 0x003A4E97, 0x00397497, 0x00000003, 0x0039C899, + 0x003A4E99, 0x00397499, 0x00000003, 0x0039C897, + // Block 90, offset 0x1680 + 0x003A4E97, 0x003A4E97, 0x00000003, 0x0039C899, 0x003A4E99, 0x003A4E99, + 0x00000003, 0x0039DC97, 0x00397297, 0x00397297, 0x00000003, 0x0039DC99, + 0x00397299, 0x00397299, 0x00000003, 0x0039DC99, 0x00397299, 0x003A9099, + 0x00000004, 0x0039DC9A, 0x003A409A, 0x0039EE9A, 0x003A4E9A, 0x00000003, + 0x0039DC9A, 0x003A409A, 0x003A8E9A, 0x00000012, 0x0039DC9A, 0x003A409A, + 0x003A8E9A, 0x0002129A, 0x0039389A, 0x003A409A, 0x003A409A, 0x003A689A, + 0x0002129A, 0x0039EE9A, 0x003A409A, 0x003A909A, 0x003A689A, 0x0002129A, + 0x003A749A, 0x0039C69A, 0x003A409A, 0x003A4E9A, 0x00000003, 0x0039DC9A, + 0x003A409A, 0x003AAA9A, 0x00000003, 0x0039DC97, 0x003A4E97, 0x003A4E97, + 0x00000003, 0x0039DC99, 0x003A4E99, 0x003A4E99, 0x00000003, 0x0039DE99, + 0x00397299, 0x003A8E99, 0x00000003, 0x0039DE99, + // Block 91, offset 0x16c0 + 0x00397299, 0x003A9099, 0x00000003, 0x0039DE97, 0x00397497, 0x003A4E97, + 0x00000003, 0x0039DE99, 0x00397499, 0x003A4E99, 0x00000003, 0x0039E697, + 0x003A4E97, 0x00397297, 0x00000003, 0x0039E699, 0x003A4E99, 0x00397299, + 0x00000003, 0x0039E697, 0x003A4E97, 0x003A4E97, 0x00000003, 0x0039E699, + 0x003A4E99, 0x003A9099, 0x00000003, 0x0039EE97, 0x00396497, 0x003A4E97, + 0x00000003, 0x0039EE99, 0x00396499, 0x003A4E99, 0x00000004, 0x0039EE9A, + 0x003A409A, 0x003A909A, 0x003A689A, 0x00000003, 0x0039EE97, 0x003A4E97, + 0x003A4E97, 0x00000003, 0x0039EE99, 0x003A4E99, 0x003A4E99, 0x00000003, + 0x0039EE99, 0x003A4E99, 0x003A8E99, 0x00000003, 0x0039EE99, 0x003A4E99, + 0x003A9099, 0x00000003, 0x0039F099, 0x003A4E99, 0x003A4E99, 0x00000003, + 0x0039F099, 0x003A4E99, 0x003A8E99, 0x00000003, + // Block 92, offset 0x1700 + 0x0039F099, 0x003A4E99, 0x003A9099, 0x00000003, 0x0039FC97, 0x00397497, + 0x003A4E97, 0x00000003, 0x0039FC99, 0x00397499, 0x003A4E99, 0x00000003, + 0x0039FC99, 0x003A4E99, 0x003A9099, 0x00000003, 0x003A129A, 0x003A409A, + 0x003AAA9A, 0x00000003, 0x003A1297, 0x003A4E97, 0x00397297, 0x00000003, + 0x003A1299, 0x003A4E99, 0x00397299, 0x00000003, 0x003A1299, 0x003A4E99, + 0x003A4E99, 0x00000003, 0x003A1299, 0x003A4E99, 0x003A9099, 0x00000003, + 0x003A1A97, 0x003A4E97, 0x003A4E97, 0x00000003, 0x003A1A99, 0x003A4E99, + 0x003A4E99, 0x00000003, 0x003A1A99, 0x003A4E99, 0x003A9099, 0x00000002, + 0x003A4099, 0x00391E99, 0x00000002, 0x003A409A, 0x00391E9A, 0x00000002, + 0x003A4099, 0x00392099, 0x00000002, 0x003A409A, 0x0039209A, 0x00000002, + 0x003A4099, 0x00392899, 0x00000002, 0x003A409A, + // Block 93, offset 0x1740 + 0x0039289A, 0x00000003, 0x003A4097, 0x00396497, 0x00396497, 0x00000003, + 0x003A4099, 0x00396499, 0x00396499, 0x00000003, 0x003A4097, 0x00396497, + 0x003A4E97, 0x00000003, 0x003A4099, 0x00396499, 0x003A4E99, 0x00000003, + 0x003A4099, 0x00396499, 0x003A9099, 0x00000003, 0x003A4097, 0x00397297, + 0x003A4E97, 0x00000003, 0x003A4099, 0x00397299, 0x003A4E99, 0x00000003, + 0x003A4099, 0x00397299, 0x003A8E99, 0x00000003, 0x003A4099, 0x00397299, + 0x003A9099, 0x00000003, 0x003A4097, 0x00397497, 0x003A4E97, 0x00000003, + 0x003A4099, 0x00397499, 0x003A4E99, 0x00000003, 0x003A4097, 0x003A4E97, + 0x00397297, 0x00000003, 0x003A4099, 0x003A4E99, 0x00397299, 0x00000003, + 0x003A4099, 0x003A4E99, 0x003A9099, 0x00000002, 0x003A4E84, 0xA0013A04, + 0x00000003, 0x003A4E97, 0x00396497, 0x00397297, + // Block 94, offset 0x1780 + 0x00000003, 0x003A4E97, 0x00396497, 0x00397497, 0x00000003, 0x003A4E97, + 0x00396497, 0x003A4E97, 0x00000003, 0x003A4E99, 0x00396499, 0x003A9099, + 0x00000003, 0x003A4E97, 0x00397297, 0x00396497, 0x00000003, 0x003A4E97, + 0x00397297, 0x003A4E97, 0x00000004, 0x003A4E9A, 0x0039729A, 0x003A4E9A, + 0x0039889A, 0x00000003, 0x003A4E99, 0x00397299, 0x003A9099, 0x00000003, + 0x003A4E97, 0x00397497, 0x00396497, 0x00000003, 0x003A4E97, 0x00397497, + 0x003A4E97, 0x00000003, 0x003A4E99, 0x00397499, 0x003A9099, 0x00000003, + 0x003A4E99, 0x003A4E99, 0x003A9099, 0x00000003, 0x003A5697, 0x00396497, + 0x00397297, 0x00000003, 0x003A5699, 0x00396499, 0x00397299, 0x00000003, + 0x003A5697, 0x00396497, 0x003A4E97, 0x00000003, 0x003A5699, 0x00396499, + 0x003A4E99, 0x00000003, 0x003A5699, 0x00396499, + // Block 95, offset 0x17c0 + 0x003A8E99, 0x00000003, 0x003A5699, 0x00396499, 0x003A9099, 0x00000003, + 0x003A5697, 0x00397297, 0x003A4E97, 0x00000003, 0x003A5699, 0x00397299, + 0x003A8E99, 0x00000003, 0x003A5699, 0x00397299, 0x003A9099, 0x00000003, + 0x003A5699, 0x003A4E99, 0x003A8E99, 0x00000003, 0x003A5699, 0x003A4E99, + 0x003A9099, 0x00000003, 0x003A6897, 0x003A4E97, 0x00396497, 0x00000003, + 0x003A6897, 0x003A4E97, 0x003A4E97, 0x00000002, 0x403A6C20, 0xAE60BE02, + 0x00000002, 0x403A7220, 0xAE60BE02, 0x00000004, 0x003A749A, 0x0039C69A, + 0x003A409A, 0x003A4E9A, 0x00000003, 0x003A9099, 0x00396499, 0x003A9099, + 0x00000003, 0x003A9099, 0x00397299, 0x003A9099, 0x00000003, 0x003A9097, + 0x003A4E97, 0x003A4E97, 0x00000003, 0x003A9099, 0x003A4E99, 0x003A4E99, + 0x00000003, 0x003A9099, 0x003A4E99, 0x003A9099, + // Block 96, offset 0x1800 + 0x00000002, 0x403AAA20, 0xAE60BE02, 0x00000002, 0x003AB284, 0xA0013C04, + 0x00000002, 0x003AB484, 0xA0013A04, 0x00000002, 0x003AB484, 0xA0013C04, + 0x00000002, 0x003AB884, 0xA0013C04, 0x00000002, 0x003AC484, 0xA0013A04, + 0x00000002, 0x003AD884, 0xA0013A04, 0x00000002, 0x003B9484, 0xA0013904, + 0x00000002, 0x003B9684, 0xA0013904, 0x00000002, 0x003B9A84, 0xA0013904, + 0x00000002, 0x403FEC20, 0xA070F102, 0x00000002, 0x403FEE20, 0xA070F102, + 0x00000002, 0x403FF020, 0xA070F102, 0x00000002, 0x403FFC20, 0xA070F102, + 0x00000002, 0x40400A20, 0xA070F102, 0x00000002, 0x40400E20, 0xA070F102, + 0x00000002, 0x40401A20, 0xA070F102, 0x00000002, 0x40401E20, 0xA070F102, + 0x00000002, 0x40402820, 0xA070F102, 0x00000002, 0x40402C20, 0xA070F102, + 0x00000002, 0x40403020, 0xA070F102, 0x00000002, + // Block 97, offset 0x1840 + 0x4040B020, 0xA070F102, 0x00000002, 0x4040B220, 0xA070F102, 0x00000002, + 0x0040B684, 0x0040F884, 0x00000002, 0x4040CA20, 0xA070F102, 0x00000002, + 0x40411620, 0xA070F102, 0x00000002, 0x40411E20, 0xA070F102, 0x00000002, + 0x40412020, 0xA070F102, 0x00000002, 0x40412A20, 0xA070F102, 0x00000002, + 0x40414620, 0xA070F102, 0x00000002, 0x40415420, 0xA070F102, 0x00000002, + 0x40422A20, 0xA070F102, 0x00000002, 0x40422C20, 0xA070F102, 0x00000002, + 0x00442284, 0x00449084, 0x00000002, 0x00443E84, 0x00449084, 0x00000002, + 0x00444884, 0x00449084, 0x00000002, 0x00445884, 0x00449084, 0x00000002, + 0x00445884, 0x00449084, 0x00000002, 0x00445A84, 0x00449084, 0x00000002, + 0x00446684, 0x00449084, 0x00000002, 0x4046AA20, 0xA070F102, 0x00000002, + 0x4046AC20, 0xA070F102, 0x00000002, 0x4046BE20, + // Block 98, offset 0x1880 + 0xA070F102, 0x00000002, 0x40491020, 0x40498420, 0x00000002, 0x40491020, + 0x40498620, 0x00000002, 0x40491020, 0x40498820, 0x00000002, 0x40491020, + 0x40498A20, 0x00000002, 0x40491020, 0x40498C20, 0x00000002, 0x40491220, + 0x40498420, 0x00000002, 0x40491220, 0x40498620, 0x00000002, 0x40491220, + 0x40498820, 0x00000002, 0x40491220, 0x40498A20, 0x00000002, 0x40491220, + 0x40498C20, 0x00000002, 0x40491420, 0x40498420, 0x00000002, 0x40491420, + 0x40498620, 0x00000002, 0x40491420, 0x40498820, 0x00000002, 0x40491420, + 0x40498A20, 0x00000002, 0x40491420, 0x40498C20, 0x00000002, 0x40491620, + 0x40498420, 0x00000002, 0x40491620, 0x40498620, 0x00000002, 0x40491620, + 0x40498820, 0x00000002, 0x40491620, 0x40498A20, 0x00000002, 0x40491620, + 0x40498C20, 0x00000002, 0x40491820, 0x40498420, + // Block 99, offset 0x18c0 + 0x00000002, 0x40491820, 0x40498620, 0x00000002, 0x40491820, 0x40498820, + 0x00000002, 0x40491820, 0x40498A20, 0x00000002, 0x40491820, 0x40498C20, + 0x00000002, 0x40491A20, 0x40498420, 0x00000002, 0x40491A20, 0x40498620, + 0x00000002, 0x40491A20, 0x40498820, 0x00000002, 0x40491A20, 0x40498A20, + 0x00000002, 0x40491A20, 0x40498C20, 0x00000002, 0x40491C20, 0x40498420, + 0x00000002, 0x40491C20, 0x40498620, 0x00000002, 0x40491C20, 0x40498820, + 0x00000002, 0x40491C20, 0x40498A20, 0x00000002, 0x40491C20, 0x40498C20, + 0x00000002, 0x40491E20, 0x40498420, 0x00000002, 0x40491E20, 0x40498620, + 0x00000002, 0x40491E20, 0x40498820, 0x00000002, 0x40491E20, 0x40498A20, + 0x00000002, 0x40491E20, 0x40498C20, 0x00000002, 0x40492020, 0x40498420, + 0x00000002, 0x40492020, 0x40498620, 0x00000002, + // Block 100, offset 0x1900 + 0x40492020, 0x40498820, 0x00000002, 0x40492020, 0x40498A20, 0x00000002, + 0x40492020, 0x40498C20, 0x00000002, 0x40492220, 0x40498420, 0x00000002, + 0x40492220, 0x40498620, 0x00000002, 0x40492220, 0x40498820, 0x00000002, + 0x40492220, 0x40498A20, 0x00000002, 0x40492220, 0x40498C20, 0x00000002, + 0x40492420, 0x40498420, 0x00000002, 0x40492420, 0x40498620, 0x00000002, + 0x40492420, 0x40498820, 0x00000002, 0x40492420, 0x40498A20, 0x00000002, + 0x40492420, 0x40498C20, 0x00000002, 0x40492620, 0x40498420, 0x00000002, + 0x40492620, 0x40498620, 0x00000002, 0x40492620, 0x40498820, 0x00000002, + 0x40492620, 0x40498A20, 0x00000002, 0x40492620, 0x40498C20, 0x00000002, + 0x40492820, 0x40498420, 0x00000002, 0x40492820, 0x40498620, 0x00000002, + 0x40492820, 0x40498820, 0x00000002, 0x40492820, + // Block 101, offset 0x1940 + 0x40498A20, 0x00000002, 0x40492820, 0x40498C20, 0x00000002, 0x40492A20, + 0x40498420, 0x00000002, 0x40492A20, 0x40498620, 0x00000002, 0x40492A20, + 0x40498820, 0x00000002, 0x40492A20, 0x40498A20, 0x00000002, 0x40492A20, + 0x40498C20, 0x00000002, 0x40492C20, 0x40498420, 0x00000002, 0x40492C20, + 0x40498620, 0x00000002, 0x40492C20, 0x40498820, 0x00000002, 0x40492C20, + 0x40498A20, 0x00000002, 0x40492C20, 0x40498C20, 0x00000002, 0x40492E20, + 0x40498420, 0x00000002, 0x40492E20, 0x40498620, 0x00000002, 0x40492E20, + 0x40498820, 0x00000002, 0x40492E20, 0x40498A20, 0x00000002, 0x40492E20, + 0x40498C20, 0x00000002, 0x40493020, 0x40498420, 0x00000002, 0x40493020, + 0x40498620, 0x00000002, 0x40493020, 0x40498820, 0x00000002, 0x40493020, + 0x40498A20, 0x00000002, 0x40493020, 0x40498C20, + // Block 102, offset 0x1980 + 0x00000002, 0x40493220, 0x40498420, 0x00000002, 0x40493220, 0x40498620, + 0x00000002, 0x40493220, 0x40498820, 0x00000002, 0x40493220, 0x40498A20, + 0x00000002, 0x40493220, 0x40498C20, 0x00000002, 0x40493420, 0x40498420, + 0x00000002, 0x40493420, 0x40498620, 0x00000002, 0x40493420, 0x40498820, + 0x00000002, 0x40493420, 0x40498A20, 0x00000002, 0x40493420, 0x40498C20, + 0x00000002, 0x40493620, 0x40498420, 0x00000002, 0x40493620, 0x40498620, + 0x00000002, 0x40493620, 0x40498820, 0x00000002, 0x40493620, 0x40498A20, + 0x00000002, 0x40493620, 0x40498C20, 0x00000002, 0x40493820, 0x40498420, + 0x00000002, 0x40493820, 0x40498620, 0x00000002, 0x40493820, 0x40498820, + 0x00000002, 0x40493820, 0x40498A20, 0x00000002, 0x40493820, 0x40498C20, + 0x00000002, 0x40493A20, 0x40498420, 0x00000002, + // Block 103, offset 0x19c0 + 0x40493A20, 0x40498620, 0x00000002, 0x40493A20, 0x40498820, 0x00000002, + 0x40493A20, 0x40498A20, 0x00000002, 0x40493A20, 0x40498C20, 0x00000002, + 0x40493C20, 0x40498420, 0x00000002, 0x40493C20, 0x40498620, 0x00000002, + 0x40493C20, 0x40498820, 0x00000002, 0x40493C20, 0x40498A20, 0x00000002, + 0x40493C20, 0x40498C20, 0x00000002, 0x40493E20, 0x40498420, 0x00000002, + 0x40493E20, 0x40498620, 0x00000002, 0x40493E20, 0x40498820, 0x00000002, + 0x40493E20, 0x40498A20, 0x00000002, 0x40493E20, 0x40498C20, 0x00000002, + 0x40494020, 0x40498420, 0x00000002, 0x40494020, 0x40498620, 0x00000002, + 0x40494020, 0x40498820, 0x00000002, 0x40494020, 0x40498A20, 0x00000002, + 0x40494020, 0x40498C20, 0x00000002, 0x40494220, 0x40498420, 0x00000002, + 0x40494220, 0x40498620, 0x00000002, 0x40494220, + // Block 104, offset 0x1a00 + 0x40498820, 0x00000002, 0x40494220, 0x40498A20, 0x00000002, 0x40494220, + 0x40498C20, 0x00000002, 0x40494420, 0x40498420, 0x00000002, 0x40494420, + 0x40498620, 0x00000002, 0x40494420, 0x40498820, 0x00000002, 0x40494420, + 0x40498A20, 0x00000002, 0x40494420, 0x40498C20, 0x00000002, 0x40494620, + 0x40498420, 0x00000002, 0x40494620, 0x40498620, 0x00000002, 0x40494620, + 0x40498820, 0x00000002, 0x40494620, 0x40498A20, 0x00000002, 0x40494620, + 0x40498C20, 0x00000002, 0x40494820, 0x40498420, 0x00000002, 0x40494820, + 0x40498620, 0x00000002, 0x40494820, 0x40498820, 0x00000002, 0x40494820, + 0x40498A20, 0x00000002, 0x40494820, 0x40498C20, 0x00000002, 0x40494A20, + 0x40498420, 0x00000002, 0x40494A20, 0x40498620, 0x00000002, 0x40494A20, + 0x40498820, 0x00000002, 0x40494A20, 0x40498A20, + // Block 105, offset 0x1a40 + 0x00000002, 0x40494A20, 0x40498C20, 0x00000002, 0x40494C20, 0x40498420, + 0x00000002, 0x40494C20, 0x40498620, 0x00000002, 0x40494C20, 0x40498820, + 0x00000002, 0x40494C20, 0x40498A20, 0x00000002, 0x40494C20, 0x40498C20, + 0x00000002, 0x40494E20, 0x40498420, 0x00000002, 0x40494E20, 0x40498620, + 0x00000002, 0x40494E20, 0x40498820, 0x00000002, 0x40494E20, 0x40498A20, + 0x00000002, 0x40494E20, 0x40498C20, 0x00000002, 0x40495020, 0x40498420, + 0x00000002, 0x40495020, 0x40498620, 0x00000002, 0x40495020, 0x40498820, + 0x00000002, 0x40495020, 0x40498A20, 0x00000002, 0x40495020, 0x40498C20, + 0x00000002, 0x40495220, 0x40498420, 0x00000002, 0x40495220, 0x40498620, + 0x00000002, 0x40495220, 0x40498820, 0x00000002, 0x40495220, 0x40498A20, + 0x00000002, 0x40495220, 0x40498C20, 0x00000002, + // Block 106, offset 0x1a80 + 0x40495420, 0x40498420, 0x00000002, 0x40495420, 0x40498620, 0x00000002, + 0x40495420, 0x40498820, 0x00000002, 0x40495420, 0x40498A20, 0x00000002, + 0x40495420, 0x40498C20, 0x00000002, 0x40495620, 0x40498420, 0x00000002, + 0x40495620, 0x40498620, 0x00000002, 0x40495620, 0x40498820, 0x00000002, + 0x40495620, 0x40498A20, 0x00000002, 0x40495620, 0x40498C20, 0x00000002, + 0x40495820, 0x40498420, 0x00000002, 0x40495820, 0x40498620, 0x00000002, + 0x40495820, 0x40498820, 0x00000002, 0x40495820, 0x40498A20, 0x00000002, + 0x40495820, 0x40498C20, 0x00000002, 0x40495A20, 0x40498420, 0x00000002, + 0x40495A20, 0x40498620, 0x00000002, 0x40495A20, 0x40498820, 0x00000002, + 0x40495A20, 0x40498A20, 0x00000002, 0x40495A20, 0x40498C20, 0x00000002, + 0x40495C20, 0x40498420, 0x00000002, 0x40495C20, + // Block 107, offset 0x1ac0 + 0x40498620, 0x00000002, 0x40495C20, 0x40498820, 0x00000002, 0x40495C20, + 0x40498A20, 0x00000002, 0x40495C20, 0x40498C20, 0x00000002, 0x40495E20, + 0x40498420, 0x00000002, 0x40495E20, 0x40498620, 0x00000002, 0x40495E20, + 0x40498820, 0x00000002, 0x40495E20, 0x40498A20, 0x00000002, 0x40495E20, + 0x40498C20, 0x00000002, 0x40496020, 0x40498420, 0x00000002, 0x40496020, + 0x40498620, 0x00000002, 0x40496020, 0x40498820, 0x00000002, 0x40496020, + 0x40498A20, 0x00000002, 0x40496020, 0x40498C20, 0x00000002, 0x40496220, + 0x40498420, 0x00000002, 0x40496220, 0x40498620, 0x00000002, 0x40496220, + 0x40498820, 0x00000002, 0x40496220, 0x40498A20, 0x00000002, 0x40496220, + 0x40498C20, 0x00000002, 0x40496420, 0x40498420, 0x00000002, 0x40496420, + 0x40498620, 0x00000002, 0x40496420, 0x40498820, + // Block 108, offset 0x1b00 + 0x00000002, 0x40496420, 0x40498A20, 0x00000002, 0x40496420, 0x40498C20, + 0x00000002, 0x40496620, 0x40498420, 0x00000002, 0x40496620, 0x40498620, + 0x00000002, 0x40496620, 0x40498820, 0x00000002, 0x40496620, 0x40498A20, + 0x00000002, 0x40496620, 0x40498C20, 0x00000002, 0x40496820, 0x40498420, + 0x00000002, 0x40496820, 0x40498620, 0x00000002, 0x40496820, 0x40498820, + 0x00000002, 0x40496820, 0x40498A20, 0x00000002, 0x40496820, 0x40498C20, + 0x00000002, 0x40496A20, 0x40498420, 0x00000002, 0x40496A20, 0x40498620, + 0x00000002, 0x40496A20, 0x40498820, 0x00000002, 0x40496A20, 0x40498A20, + 0x00000002, 0x40496A20, 0x40498C20, 0x00000002, 0x40499020, 0x4049E620, + 0x00000002, 0x40499020, 0x4049E820, 0x00000002, 0x40499020, 0x4049EA20, + 0x00000002, 0x40499020, 0x4049EC20, 0x00000002, + // Block 109, offset 0x1b40 + 0x40499020, 0x4049EE20, 0x00000002, 0x40499220, 0x4049E620, 0x00000002, + 0x40499220, 0x4049E820, 0x00000002, 0x40499220, 0x4049EA20, 0x00000002, + 0x40499220, 0x4049EC20, 0x00000002, 0x40499220, 0x4049EE20, 0x00000002, + 0x40499420, 0x4049E620, 0x00000002, 0x40499420, 0x4049E820, 0x00000002, + 0x40499420, 0x4049EA20, 0x00000002, 0x40499420, 0x4049EC20, 0x00000002, + 0x40499420, 0x4049EE20, 0x00000002, 0x40499620, 0x4049E620, 0x00000002, + 0x40499620, 0x4049E820, 0x00000002, 0x40499620, 0x4049EA20, 0x00000002, + 0x40499620, 0x4049EC20, 0x00000002, 0x40499620, 0x4049EE20, 0x00000002, + 0x40499820, 0x4049E620, 0x00000002, 0x40499820, 0x4049E820, 0x00000002, + 0x40499820, 0x4049EA20, 0x00000002, 0x40499820, 0x4049EC20, 0x00000002, + 0x40499820, 0x4049EE20, 0x00000002, 0x40499A20, + // Block 110, offset 0x1b80 + 0x4049E620, 0x00000002, 0x40499A20, 0x4049E820, 0x00000002, 0x40499A20, + 0x4049EA20, 0x00000002, 0x40499A20, 0x4049EC20, 0x00000002, 0x40499A20, + 0x4049EE20, 0x00000002, 0x40499C20, 0x4049E620, 0x00000002, 0x40499C20, + 0x4049E820, 0x00000002, 0x40499C20, 0x4049EA20, 0x00000002, 0x40499C20, + 0x4049EC20, 0x00000002, 0x40499C20, 0x4049EE20, 0x00000002, 0x40499E20, + 0x4049E620, 0x00000002, 0x40499E20, 0x4049E820, 0x00000002, 0x40499E20, + 0x4049EA20, 0x00000002, 0x40499E20, 0x4049EC20, 0x00000002, 0x40499E20, + 0x4049EE20, 0x00000002, 0x4049A020, 0x4049E620, 0x00000002, 0x4049A020, + 0x4049E820, 0x00000002, 0x4049A020, 0x4049EA20, 0x00000002, 0x4049A020, + 0x4049EC20, 0x00000002, 0x4049A020, 0x4049EE20, 0x00000002, 0x4049A220, + 0x4049E620, 0x00000002, 0x4049A220, 0x4049E820, + // Block 111, offset 0x1bc0 + 0x00000002, 0x4049A220, 0x4049EA20, 0x00000002, 0x4049A220, 0x4049EC20, + 0x00000002, 0x4049A220, 0x4049EE20, 0x00000002, 0x4049A420, 0x4049E620, + 0x00000002, 0x4049A420, 0x4049E820, 0x00000002, 0x4049A420, 0x4049EA20, + 0x00000002, 0x4049A420, 0x4049EC20, 0x00000002, 0x4049A420, 0x4049EE20, + 0x00000002, 0x4049A620, 0x4049E620, 0x00000002, 0x4049A620, 0x4049E820, + 0x00000002, 0x4049A620, 0x4049EA20, 0x00000002, 0x4049A620, 0x4049EC20, + 0x00000002, 0x4049A620, 0x4049EE20, 0x00000002, 0x4049A820, 0x4049E620, + 0x00000002, 0x4049A820, 0x4049E820, 0x00000002, 0x4049A820, 0x4049EA20, + 0x00000002, 0x4049A820, 0x4049EC20, 0x00000002, 0x4049A820, 0x4049EE20, + 0x00000002, 0x4049AA20, 0x4049E620, 0x00000002, 0x4049AA20, 0x4049E820, + 0x00000002, 0x4049AA20, 0x4049EA20, 0x00000002, + // Block 112, offset 0x1c00 + 0x4049AA20, 0x4049EC20, 0x00000002, 0x4049AA20, 0x4049EE20, 0x00000002, + 0x4049AC20, 0x4049E620, 0x00000002, 0x4049AC20, 0x4049E820, 0x00000002, + 0x4049AC20, 0x4049EA20, 0x00000002, 0x4049AC20, 0x4049EC20, 0x00000002, + 0x4049AC20, 0x4049EE20, 0x00000002, 0x4049AE20, 0x4049E620, 0x00000002, + 0x4049AE20, 0x4049E820, 0x00000002, 0x4049AE20, 0x4049EA20, 0x00000002, + 0x4049AE20, 0x4049EC20, 0x00000002, 0x4049AE20, 0x4049EE20, 0x00000002, + 0x4049B020, 0x4049E620, 0x00000002, 0x4049B020, 0x4049E820, 0x00000002, + 0x4049B020, 0x4049EA20, 0x00000002, 0x4049B020, 0x4049EC20, 0x00000002, + 0x4049B020, 0x4049EE20, 0x00000002, 0x4049B220, 0x4049E620, 0x00000002, + 0x4049B220, 0x4049E820, 0x00000002, 0x4049B220, 0x4049EA20, 0x00000002, + 0x4049B220, 0x4049EC20, 0x00000002, 0x4049B220, + // Block 113, offset 0x1c40 + 0x4049EE20, 0x00000002, 0x4049B420, 0x4049E620, 0x00000002, 0x4049B420, + 0x4049E820, 0x00000002, 0x4049B420, 0x4049EA20, 0x00000002, 0x4049B420, + 0x4049EC20, 0x00000002, 0x4049B420, 0x4049EE20, 0x00000002, 0x4049B620, + 0x4049E620, 0x00000002, 0x4049B620, 0x4049E820, 0x00000002, 0x4049B620, + 0x4049EA20, 0x00000002, 0x4049B620, 0x4049EC20, 0x00000002, 0x4049B620, + 0x4049EE20, 0x00000002, 0x4049B820, 0x4049E620, 0x00000002, 0x4049B820, + 0x4049E820, 0x00000002, 0x4049B820, 0x4049EA20, 0x00000002, 0x4049B820, + 0x4049EC20, 0x00000002, 0x4049B820, 0x4049EE20, 0x00000002, 0x4049BA20, + 0x4049E620, 0x00000002, 0x4049BA20, 0x4049E820, 0x00000002, 0x4049BA20, + 0x4049EA20, 0x00000002, 0x4049BA20, 0x4049EC20, 0x00000002, 0x4049BA20, + 0x4049EE20, 0x00000002, 0x4049BC20, 0x4049E620, + // Block 114, offset 0x1c80 + 0x00000002, 0x4049BC20, 0x4049E820, 0x00000002, 0x4049BC20, 0x4049EA20, + 0x00000002, 0x4049BC20, 0x4049EC20, 0x00000002, 0x4049BC20, 0x4049EE20, + 0x00000002, 0x4049BE20, 0x4049E620, 0x00000002, 0x4049BE20, 0x4049E820, + 0x00000002, 0x4049BE20, 0x4049EA20, 0x00000002, 0x4049BE20, 0x4049EC20, + 0x00000002, 0x4049BE20, 0x4049EE20, 0x00000002, 0x4049C020, 0x4049E620, + 0x00000002, 0x4049C020, 0x4049E820, 0x00000002, 0x4049C020, 0x4049EA20, + 0x00000002, 0x4049C020, 0x4049EC20, 0x00000002, 0x4049C020, 0x4049EE20, + 0x00000002, 0x4049C220, 0x4049E620, 0x00000002, 0x4049C220, 0x4049E820, + 0x00000002, 0x4049C220, 0x4049EA20, 0x00000002, 0x4049C220, 0x4049EC20, + 0x00000002, 0x4049C220, 0x4049EE20, 0x00000003, 0x0049C484, 0x0049AC84, + 0x4049E620, 0x00000003, 0x0049C484, 0x0049AC84, + // Block 115, offset 0x1cc0 + 0x4049E820, 0x00000003, 0x0049C484, 0x0049AC84, 0x4049EA20, 0x00000003, + 0x0049C484, 0x0049AC84, 0x4049EC20, 0x00000003, 0x0049C484, 0x0049AC84, + 0x4049EE20, 0x00000003, 0x0049C484, 0x0049BA84, 0x4049E620, 0x00000003, + 0x0049C484, 0x0049BA84, 0x4049E820, 0x00000003, 0x0049C484, 0x0049BA84, + 0x4049EA20, 0x00000003, 0x0049C484, 0x0049BA84, 0x4049EC20, 0x00000003, + 0x0049C484, 0x0049BA84, 0x4049EE20, 0x00000002, 0x4049C420, 0x4049E620, + 0x00000002, 0x4049C420, 0x4049E820, 0x00000002, 0x4049C420, 0x4049EA20, + 0x00000002, 0x4049C420, 0x4049EC20, 0x00000002, 0x4049C420, 0x4049EE20, + 0x00000002, 0x4049C620, 0x4049E620, 0x00000002, 0x4049C620, 0x4049E820, + 0x00000002, 0x4049C620, 0x4049EA20, 0x00000002, 0x4049C620, 0x4049EC20, + 0x00000002, 0x4049C620, 0x4049EE20, 0x00000002, + // Block 116, offset 0x1d00 + 0x4049C820, 0x4049E620, 0x00000002, 0x4049C820, 0x4049E820, 0x00000002, + 0x4049C820, 0x4049EA20, 0x00000002, 0x4049C820, 0x4049EC20, 0x00000002, + 0x4049C820, 0x4049EE20, 0x00000002, 0x4049F020, 0x404A5A20, 0x00000002, + 0x4049F020, 0x404A5C20, 0x00000002, 0x4049F020, 0x404A6220, 0x00000002, + 0x4049F020, 0x404A6620, 0x00000002, 0x4049F020, 0x404A6820, 0x00000002, + 0x4049F220, 0x404A5A20, 0x00000002, 0x4049F220, 0x404A5C20, 0x00000002, + 0x4049F220, 0x404A6220, 0x00000002, 0x4049F220, 0x404A6620, 0x00000002, + 0x4049F220, 0x404A6820, 0x00000002, 0x4049F420, 0x404A5A20, 0x00000002, + 0x4049F420, 0x404A5C20, 0x00000002, 0x4049F420, 0x404A6220, 0x00000002, + 0x4049F420, 0x404A6620, 0x00000002, 0x4049F420, 0x404A6820, 0x00000002, + 0x4049F620, 0x404A5A20, 0x00000002, 0x4049F620, + // Block 117, offset 0x1d40 + 0x404A5C20, 0x00000002, 0x4049F620, 0x404A6220, 0x00000002, 0x4049F620, + 0x404A6620, 0x00000002, 0x4049F620, 0x404A6820, 0x00000002, 0x4049F820, + 0x404A5A20, 0x00000002, 0x4049F820, 0x404A5C20, 0x00000002, 0x4049F820, + 0x404A6220, 0x00000002, 0x4049F820, 0x404A6620, 0x00000002, 0x4049F820, + 0x404A6820, 0x00000002, 0x4049FA20, 0x404A5A20, 0x00000002, 0x4049FA20, + 0x404A5C20, 0x00000002, 0x4049FA20, 0x404A6220, 0x00000002, 0x4049FA20, + 0x404A6620, 0x00000002, 0x4049FA20, 0x404A6820, 0x00000002, 0x4049FC20, + 0x404A5A20, 0x00000002, 0x4049FC20, 0x404A5C20, 0x00000002, 0x4049FC20, + 0x404A6220, 0x00000002, 0x4049FC20, 0x404A6620, 0x00000002, 0x4049FC20, + 0x404A6820, 0x00000002, 0x4049FE20, 0x404A5A20, 0x00000002, 0x4049FE20, + 0x404A5C20, 0x00000002, 0x4049FE20, 0x404A6220, + // Block 118, offset 0x1d80 + 0x00000002, 0x4049FE20, 0x404A6620, 0x00000002, 0x4049FE20, 0x404A6820, + 0x00000002, 0x404A0020, 0x404A5A20, 0x00000002, 0x404A0020, 0x404A5C20, + 0x00000002, 0x404A0020, 0x404A6220, 0x00000002, 0x404A0020, 0x404A6620, + 0x00000002, 0x404A0020, 0x404A6820, 0x00000002, 0x404A0220, 0x404A5A20, + 0x00000002, 0x404A0220, 0x404A5C20, 0x00000002, 0x404A0220, 0x404A6220, + 0x00000002, 0x404A0220, 0x404A6620, 0x00000002, 0x404A0220, 0x404A6820, + 0x00000002, 0x404A0420, 0x404A5A20, 0x00000002, 0x404A0420, 0x404A5C20, + 0x00000002, 0x404A0420, 0x404A6220, 0x00000002, 0x404A0420, 0x404A6620, + 0x00000002, 0x404A0420, 0x404A6820, 0x00000002, 0x404A0620, 0x404A5A20, + 0x00000002, 0x404A0620, 0x404A5C20, 0x00000002, 0x404A0620, 0x404A6220, + 0x00000002, 0x404A0620, 0x404A6620, 0x00000002, + // Block 119, offset 0x1dc0 + 0x404A0620, 0x404A6820, 0x00000002, 0x404A0820, 0x404A5A20, 0x00000002, + 0x404A0820, 0x404A5C20, 0x00000002, 0x404A0820, 0x404A6220, 0x00000002, + 0x404A0820, 0x404A6620, 0x00000002, 0x404A0820, 0x404A6820, 0x00000002, + 0x404A0A20, 0x404A5A20, 0x00000002, 0x404A0A20, 0x404A5C20, 0x00000002, + 0x404A0A20, 0x404A6220, 0x00000002, 0x404A0A20, 0x404A6620, 0x00000002, + 0x404A0A20, 0x404A6820, 0x00000002, 0x404A0C20, 0x404A5A20, 0x00000002, + 0x404A0C20, 0x404A5C20, 0x00000002, 0x404A0C20, 0x404A6220, 0x00000002, + 0x404A0C20, 0x404A6620, 0x00000002, 0x404A0C20, 0x404A6820, 0x00000002, + 0x404A0E20, 0x404A5A20, 0x00000002, 0x404A0E20, 0x404A5C20, 0x00000002, + 0x404A0E20, 0x404A6220, 0x00000002, 0x404A0E20, 0x404A6620, 0x00000002, + 0x404A0E20, 0x404A6820, 0x00000002, 0x404A1020, + // Block 120, offset 0x1e00 + 0x404A5A20, 0x00000002, 0x404A1020, 0x404A5C20, 0x00000002, 0x404A1020, + 0x404A6220, 0x00000002, 0x404A1020, 0x404A6620, 0x00000002, 0x404A1020, + 0x404A6820, 0x00000002, 0x404A1220, 0x404A5A20, 0x00000002, 0x404A1220, + 0x404A5C20, 0x00000002, 0x404A1220, 0x404A6220, 0x00000002, 0x404A1220, + 0x404A6620, 0x00000002, 0x404A1220, 0x404A6820, 0x00000002, 0x404A1420, + 0x404A5A20, 0x00000002, 0x404A1420, 0x404A5C20, 0x00000002, 0x404A1420, + 0x404A6220, 0x00000002, 0x404A1420, 0x404A6620, 0x00000002, 0x404A1420, + 0x404A6820, 0x00000002, 0x404A1620, 0x404A5A20, 0x00000002, 0x404A1620, + 0x404A5C20, 0x00000002, 0x404A1620, 0x404A6220, 0x00000002, 0x404A1620, + 0x404A6620, 0x00000002, 0x404A1620, 0x404A6820, 0x00000002, 0x404A1820, + 0x404A5A20, 0x00000002, 0x404A1820, 0x404A5C20, + // Block 121, offset 0x1e40 + 0x00000002, 0x404A1820, 0x404A6220, 0x00000002, 0x404A1820, 0x404A6620, + 0x00000002, 0x404A1820, 0x404A6820, 0x00000002, 0x404A1A20, 0x404A5A20, + 0x00000002, 0x404A1A20, 0x404A5C20, 0x00000002, 0x404A1A20, 0x404A6220, + 0x00000002, 0x404A1A20, 0x404A6620, 0x00000002, 0x404A1A20, 0x404A6820, + 0x00000002, 0x404A1C20, 0x404A5A20, 0x00000002, 0x404A1C20, 0x404A5C20, + 0x00000002, 0x404A1C20, 0x404A6220, 0x00000002, 0x404A1C20, 0x404A6620, + 0x00000002, 0x404A1C20, 0x404A6820, 0x00000002, 0x404A1E20, 0x404A5A20, + 0x00000002, 0x404A1E20, 0x404A5C20, 0x00000002, 0x404A1E20, 0x404A6220, + 0x00000002, 0x404A1E20, 0x404A6620, 0x00000002, 0x404A1E20, 0x404A6820, + 0x00000002, 0x404A2020, 0x404A5A20, 0x00000002, 0x404A2020, 0x404A5C20, + 0x00000002, 0x404A2020, 0x404A6220, 0x00000002, + // Block 122, offset 0x1e80 + 0x404A2020, 0x404A6620, 0x00000002, 0x404A2020, 0x404A6820, 0x00000002, + 0x404A2220, 0x404A5A20, 0x00000002, 0x404A2220, 0x404A5C20, 0x00000002, + 0x404A2220, 0x404A6220, 0x00000002, 0x404A2220, 0x404A6620, 0x00000002, + 0x404A2220, 0x404A6820, 0x00000002, 0x404A2420, 0x404A5A20, 0x00000002, + 0x404A2420, 0x404A5C20, 0x00000002, 0x404A2420, 0x404A6220, 0x00000002, + 0x404A2420, 0x404A6620, 0x00000002, 0x404A2420, 0x404A6820, 0x00000002, + 0x404A2620, 0x404A5A20, 0x00000002, 0x404A2620, 0x404A5C20, 0x00000002, + 0x404A2620, 0x404A6220, 0x00000002, 0x404A2620, 0x404A6620, 0x00000002, + 0x404A2620, 0x404A6820, 0x00000002, 0x404A2820, 0x404A5A20, 0x00000002, + 0x404A2820, 0x404A5C20, 0x00000002, 0x404A2820, 0x404A6220, 0x00000002, + 0x404A2820, 0x404A6620, 0x00000002, 0x404A2820, + // Block 123, offset 0x1ec0 + 0x404A6820, 0x00000002, 0x404A2A20, 0x404A5A20, 0x00000002, 0x404A2A20, + 0x404A5C20, 0x00000002, 0x404A2A20, 0x404A6220, 0x00000002, 0x404A2A20, + 0x404A6620, 0x00000002, 0x404A2A20, 0x404A6820, 0x00000002, 0x404A2C20, + 0x404A5A20, 0x00000002, 0x404A2C20, 0x404A5C20, 0x00000002, 0x404A2C20, + 0x404A6220, 0x00000002, 0x404A2C20, 0x404A6620, 0x00000002, 0x404A2C20, + 0x404A6820, 0x00000002, 0x404A2E20, 0x404A5A20, 0x00000002, 0x404A2E20, + 0x404A5C20, 0x00000002, 0x404A2E20, 0x404A6220, 0x00000002, 0x404A2E20, + 0x404A6620, 0x00000002, 0x404A2E20, 0x404A6820, 0x00000002, 0x404A3020, + 0x404A5A20, 0x00000002, 0x404A3020, 0x404A5C20, 0x00000002, 0x404A3020, + 0x404A6220, 0x00000002, 0x404A3020, 0x404A6620, 0x00000002, 0x404A3020, + 0x404A6820, 0x00000002, 0x404A3220, 0x404A5A20, + // Block 124, offset 0x1f00 + 0x00000002, 0x404A3220, 0x404A5C20, 0x00000002, 0x404A3220, 0x404A6220, + 0x00000002, 0x404A3220, 0x404A6620, 0x00000002, 0x404A3220, 0x404A6820, + 0x00000002, 0x404A3420, 0x404A5A20, 0x00000002, 0x404A3420, 0x404A5C20, + 0x00000002, 0x404A3420, 0x404A6220, 0x00000002, 0x404A3420, 0x404A6620, + 0x00000002, 0x404A3420, 0x404A6820, 0x00000002, 0x404A3620, 0x404A5A20, + 0x00000002, 0x404A3620, 0x404A5C20, 0x00000002, 0x404A3620, 0x404A6220, + 0x00000002, 0x404A3620, 0x404A6620, 0x00000002, 0x404A3620, 0x404A6820, + 0x00000002, 0x404A3820, 0x404A5A20, 0x00000002, 0x404A3820, 0x404A5C20, + 0x00000002, 0x404A3820, 0x404A6220, 0x00000002, 0x404A3820, 0x404A6620, + 0x00000002, 0x404A3820, 0x404A6820, 0x00000002, 0x404A3A20, 0x404A5A20, + 0x00000002, 0x404A3A20, 0x404A5C20, 0x00000002, + // Block 125, offset 0x1f40 + 0x404A3A20, 0x404A6220, 0x00000002, 0x404A3A20, 0x404A6620, 0x00000002, + 0x404A3A20, 0x404A6820, 0x00000002, 0x404A3C20, 0x404A5A20, 0x00000002, + 0x404A3C20, 0x404A5C20, 0x00000002, 0x404A3C20, 0x404A6220, 0x00000002, + 0x404A3C20, 0x404A6620, 0x00000002, 0x404A3C20, 0x404A6820, 0x00000002, + 0x404A3E20, 0x404A5A20, 0x00000002, 0x404A3E20, 0x404A5C20, 0x00000002, + 0x404A3E20, 0x404A6220, 0x00000002, 0x404A3E20, 0x404A6620, 0x00000002, + 0x404A3E20, 0x404A6820, 0x00000002, 0x404A4020, 0x404A5A20, 0x00000002, + 0x404A4020, 0x404A5C20, 0x00000002, 0x404A4020, 0x404A6220, 0x00000002, + 0x404A4020, 0x404A6620, 0x00000002, 0x404A4020, 0x404A6820, 0x00000002, + 0x404A4220, 0x404A5A20, 0x00000002, 0x404A4220, 0x404A5C20, 0x00000002, + 0x404A4220, 0x404A6220, 0x00000002, 0x404A4220, + // Block 126, offset 0x1f80 + 0x404A6620, 0x00000002, 0x404A4220, 0x404A6820, 0x00000002, 0x404A4420, + 0x404A5A20, 0x00000002, 0x404A4420, 0x404A5C20, 0x00000002, 0x404A4420, + 0x404A6220, 0x00000002, 0x404A4420, 0x404A6620, 0x00000002, 0x404A4420, + 0x404A6820, 0x00000002, 0x404A4620, 0x404A5A20, 0x00000002, 0x404A4620, + 0x404A5C20, 0x00000002, 0x404A4620, 0x404A6220, 0x00000002, 0x404A4620, + 0x404A6620, 0x00000002, 0x404A4620, 0x404A6820, 0x00000002, 0x404A4820, + 0x404A5A20, 0x00000002, 0x404A4820, 0x404A5C20, 0x00000002, 0x404A4820, + 0x404A6220, 0x00000002, 0x404A4820, 0x404A6620, 0x00000002, 0x404A4820, + 0x404A6820, 0x00000002, 0x404A4A20, 0x404A5A20, 0x00000002, 0x404A4A20, + 0x404A5C20, 0x00000002, 0x404A4A20, 0x404A6220, 0x00000002, 0x404A4A20, + 0x404A6620, 0x00000002, 0x404A4A20, 0x404A6820, + // Block 127, offset 0x1fc0 + 0x00000002, 0x404A4C20, 0x404A5A20, 0x00000002, 0x404A4C20, 0x404A5C20, + 0x00000002, 0x404A4C20, 0x404A6220, 0x00000002, 0x404A4C20, 0x404A6620, + 0x00000002, 0x404A4C20, 0x404A6820, 0x00000002, 0x404A4E20, 0x404A5A20, + 0x00000002, 0x404A4E20, 0x404A5C20, 0x00000002, 0x404A4E20, 0x404A6220, + 0x00000002, 0x404A4E20, 0x404A6620, 0x00000002, 0x404A4E20, 0x404A6820, + 0x00000002, 0x404A7620, 0x404AF820, 0x00000002, 0x404A7820, 0x404AF820, + 0x00000002, 0x404A8020, 0x404B0020, 0x00000002, 0x404A8220, 0x404B0020, + 0x00000002, 0x404AA020, 0x404B0020, 0x00000002, 0x404AA220, 0x404B0020, + 0x00000002, 0x404AB020, 0x404B0020, 0x00000002, 0x404AB220, 0x404B0020, + 0x00000002, 0x404AC020, 0x404B0020, 0x00000002, 0x404AC220, 0x404B0020, + 0x00000002, 0x404AD020, 0x404B0020, 0x00000002, + // Block 128, offset 0x2000 + 0x404AD220, 0x404B0020, 0x00000002, 0x004AD684, 0xA0013A04, 0x00000002, + 0x004AE684, 0xA0013A04, 0x00000002, 0x004AE884, 0xA0013A04, 0x00000002, + 0x004AEA84, 0xA0013A04, 0x00000002, 0x404AEA20, 0x8281258D, 0x00000002, + 0x404AEA20, 0x82812591, 0x00000002, 0x404AF020, 0x8281258D, 0x00000002, + 0x404AF020, 0x82812591, 0x00000003, 0x004B0284, 0x004B3084, 0xA000F304, + 0x00000003, 0x004EA684, 0x004F1484, 0x004EA684, 0x00000002, 0x0050AE84, + 0x0050DA84, 0x00000003, 0x0050AE84, 0x0050DA84, 0x0050F084, 0x00000003, + 0x00514E84, 0x00519A84, 0x00514E84, 0x00000002, 0x005ADA84, 0xA0013904, + 0x00000002, 0x005ADC84, 0xA0013904, 0x00000002, 0x005ADC84, 0xA0013A04, + 0x00000002, 0x005ADE84, 0xA0013904, 0x00000002, 0x005ADE84, 0x005ADE84, + 0x00000002, 0x005AE084, 0xA0013904, 0x00000002, + // Block 129, offset 0x2040 + 0x005AE084, 0xA0013A04, 0x00000002, 0x005AE084, 0xA0013C04, 0x00000002, + 0x005AE084, 0xA0013D04, 0x00000002, 0x005AE884, 0xA0013904, 0x00000002, + 0x005AE884, 0xA0013A04, 0x00000002, 0x005AE884, 0xA0013C04, 0x00000002, + 0x005AE884, 0xA0013D04, 0x00000002, 0x005AEC84, 0xA0013904, 0x00000002, + 0x005AEE84, 0xA0013904, 0x00000002, 0x005AEE84, 0xA0013A04, 0x00000002, + 0x005AEE84, 0xA0013C04, 0x00000002, 0x005AF084, 0xA0013904, 0x00000002, + 0x005AF084, 0xA0013A04, 0x00000002, 0x005AF284, 0xA0013904, 0x00000002, + 0x005AF484, 0xA0013904, 0x00000002, 0x005AF684, 0xA0013904, 0x00000002, + 0x005AF684, 0x005B0884, 0x00000002, 0x005AFA84, 0xA0013904, 0x00000002, + 0x005AFE84, 0xA0013904, 0x00000002, 0x005AFE84, 0xA0013A04, 0x00000002, + 0x005AFE84, 0xA0013C04, 0x00000002, 0x005AFE84, + // Block 130, offset 0x2080 + 0xA0013D04, 0x00000002, 0x005AFE84, 0xA0013E04, 0x00000002, 0x005B0084, + 0xA0013904, 0x00000002, 0x005B0084, 0xA0013A04, 0x00000002, 0x005B0284, + 0xA0013904, 0x00000002, 0x005B0284, 0xA0013A04, 0x00000002, 0x005B0684, + 0xA0013904, 0x00000002, 0x005B0684, 0xA0013A04, 0x00000004, 0x005B0684, + 0xA0013904, 0x005B0684, 0xA0013904, 0x00000002, 0x005B0884, 0xA0013904, + 0x00000002, 0x005B0A84, 0xA0013904, 0x00000002, 0x005B2484, 0xA0013904, + 0x00000002, 0x005B2484, 0xA0013A04, 0x00000002, 0x005B2684, 0xA0013904, + 0x00000002, 0x005B2A84, 0xA0013904, 0x00000002, 0x005B3084, 0xA0013904, + 0x00000002, 0x005B3284, 0xA0013904, 0x00000002, 0x005B3484, 0xA0013904, + 0x00000002, 0x005B3684, 0xA0013904, 0x00000002, 0x005B3884, 0xA0013904, + 0x00000002, 0x005B3A84, 0xA0013904, 0x00000002, + // Block 131, offset 0x20c0 + 0x005B3E84, 0xA0013904, 0x00000002, 0x005B4084, 0xA0013904, 0x00000002, + 0x005B4284, 0xA0013904, 0x00000002, 0x005B4484, 0xA0013904, 0x00000002, + 0x005B4684, 0xA0013904, 0x00000002, 0x005B4884, 0xA0013904, 0x00000002, + 0x005B5284, 0xA0013904, 0x00000002, 0x005B5484, 0xA0013904, 0x00000002, + 0x005B5684, 0xA0013904, 0x00000002, 0x005B5884, 0xA0013904, 0x00000002, + 0x005B5C84, 0xA0013904, 0x00000002, 0x005B6484, 0xA0013904, 0x00000002, + 0x005B6684, 0xA0013904, 0x00000002, 0x005B6884, 0xA0013904, 0x00000002, + 0x005B6A84, 0xA0013904, 0x00000002, 0x005B6C84, 0xA0013904, 0x00000002, + 0x005B7484, 0xA0013904, 0x00000002, 0x005B7684, 0xA0013904, 0x00000002, + 0x005B7884, 0xA0013904, 0x00000002, 0x005B7A84, 0xA0013904, 0x00000002, + 0x005B9884, 0x005D9684, 0x00000002, 0x005BBC84, + // Block 132, offset 0x2100 + 0x005D9684, 0x00000002, 0x005BE684, 0x005D9684, 0x00000002, 0x005C0E84, + 0x005D9884, 0x00000002, 0x005C2484, 0x005D9684, 0x00000002, 0x005C3084, + 0x005D9884, 0x00000002, 0x005C3484, 0x005D9884, 0x00000002, 0x005C4084, + 0x005D9684, 0x00000002, 0x005C8A84, 0x005D9684, 0x00000002, 0x005CE884, + 0x005D9684, 0x00000002, 0x005D1684, 0x005D9684, 0x00000002, 0x005D2284, + 0x005D9884, 0x00000002, 0x005D3084, 0x005D9684, 0x00000004, 0x0062C486, + 0x0063C286, 0x0062C286, 0x0063CE86, 0x00000005, 0x0062C886, 0x0063A886, + 0x00648286, 0x0062AC86, 0x0063B886, 0x00000003, 0x0065769C, 0x0027D69C, + 0x0065CA9C, 0x00000005, 0x0065769C, 0x0065AA9C, 0xA001291C, 0x0027D69C, + 0x00659E9C, 0x00000004, 0x0065769C, 0x0065CA9C, 0x0065AE9C, 0x0065769C, + 0x00000005, 0x0065769C, 0x0065D89C, 0x0065B09C, + // Block 133, offset 0x2140 + 0xA001291C, 0x0065769C, 0x00000005, 0x0065789C, 0x0065A29C, 0x0065D89C, + 0x0065869C, 0xA001281C, 0x00000003, 0x0065789C, 0x0065D89C, 0x0065989C, + 0x00000002, 0x00657A8E, 0xA0812802, 0x00000002, 0x00657A91, 0xA0812802, + 0x00000003, 0x00657A9C, 0x0065809C, 0x0065D89C, 0x00000004, 0x00657E9C, + 0x0027D69C, 0x0065829C, 0x0027D69C, 0x00000006, 0x00657E9C, 0x0065909C, + 0x0065869C, 0x0027D69C, 0x00659E9C, 0xA001281C, 0x00000003, 0x0065809C, + 0x0027D69C, 0x0065B89C, 0x00000003, 0x0065809C, 0x0065D89C, 0x0065909C, + 0x00000002, 0x0065828E, 0xA0812802, 0x00000002, 0x00658291, 0xA0812802, + 0x00000003, 0x0065829C, 0x0065789C, 0x0065C89C, 0x00000004, 0x0065829C, + 0x0065C69C, 0x00659A9C, 0x00659E9C, 0x00000004, 0x0065829C, 0x0065CE9C, + 0x0065C89C, 0x0027D69C, 0x00000004, 0x0065829C, + // Block 134, offset 0x2180 + 0xA001281C, 0x0065CE9C, 0x0065D89C, 0x00000004, 0x0065829C, 0xA001281C, + 0x0065D89C, 0x0065B49C, 0x00000002, 0x0065848E, 0xA0812802, 0x00000002, + 0x00658491, 0xA0812802, 0x00000004, 0x0065849C, 0xA001281C, 0x0065829C, + 0xA001281C, 0x00000004, 0x0065849C, 0xA001281C, 0x0065A29C, 0x0027D69C, + 0x00000004, 0x0065849C, 0x0065C09C, 0x0065C89C, 0x0027D69C, 0x00000006, + 0x0065849C, 0xA001281C, 0x0065CA9C, 0x0065969C, 0xA001281C, 0x0027D69C, + 0x00000006, 0x0065849C, 0x0065CE9C, 0x0065869C, 0xA001281C, 0x0065C69C, + 0x0065B89C, 0x00000006, 0x0065849C, 0x0065CE9C, 0x0065BA9C, 0x0027D69C, + 0x00659E9C, 0x0065CA9C, 0x00000005, 0x0065849C, 0x0065CE9C, 0x0065D09C, + 0x00659A9C, 0x00659E9C, 0x00000002, 0x0065868E, 0xA0812802, 0x00000002, + 0x00658691, 0xA0812802, 0x00000004, 0x0065869C, + // Block 135, offset 0x21c0 + 0xA001281C, 0x0065C69C, 0x0065B89C, 0x00000006, 0x0065869C, 0xA001281C, + 0x0065C69C, 0x0065B89C, 0x00659E9C, 0x0065D89C, 0x00000006, 0x0065869C, + 0x0065CA9C, 0x0065929C, 0xA001281C, 0x0065789C, 0x0065CE9C, 0x00000004, + 0x0065869C, 0x0065CE9C, 0x0027D69C, 0x0065A69C, 0x00000002, 0x0065888E, + 0xA0812802, 0x00000002, 0x00658891, 0xA0812802, 0x00000003, 0x0065889C, + 0x0027D69C, 0x0065909C, 0x00000002, 0x00658A8E, 0xA0812802, 0x00000002, + 0x00658A91, 0xA0812802, 0x00000004, 0x00658A9C, 0x0027D69C, 0x0065B29C, + 0xA001291C, 0x00000003, 0x00658A9C, 0x0065CA9C, 0x0065A09C, 0x00000002, + 0x00658C8E, 0xA0812802, 0x00000002, 0x00658C91, 0xA0812802, 0x00000004, + 0x00658C9C, 0x0065789C, 0x0065869C, 0x0065CA9C, 0x00000005, 0x00658C9C, + 0x0065D89C, 0x0065989C, 0x0027D69C, 0x0065B89C, + // Block 136, offset 0x2200 + 0x00000002, 0x00658E8E, 0xA0812802, 0x00000002, 0x00658E91, 0xA0812802, + 0x00000002, 0x00658E84, 0x0065BA84, 0x00000005, 0x00658E9C, 0x0065C89C, + 0x0065D89C, 0x0065869C, 0xA001281C, 0x00000002, 0x0065908E, 0xA0812802, + 0x00000002, 0x00659091, 0xA0812802, 0x00000002, 0x0065928E, 0xA0812802, + 0x00000002, 0x00659291, 0xA0812802, 0x00000003, 0x0065929C, 0x0065D89C, + 0x0065989C, 0x00000003, 0x0065929C, 0x0065D89C, 0x00659E9C, 0x00000002, + 0x0065948E, 0xA0812802, 0x00000002, 0x00659491, 0xA0812802, 0x00000002, + 0x0065968E, 0xA0812802, 0x00000002, 0x00659691, 0xA0812802, 0x00000004, + 0x0065969C, 0xA001281C, 0x0027D69C, 0x0065909C, 0x00000002, 0x0065988E, + 0xA0812802, 0x00000002, 0x00659891, 0xA0812802, 0x00000002, 0x00659A8E, + 0xA0812802, 0x00000002, 0x00659A91, 0xA0812802, + // Block 137, offset 0x2240 + 0x00000002, 0x00659C8E, 0xA0812802, 0x00000002, 0x00659C91, 0xA0812802, + 0x00000003, 0x00659C9C, 0xA001281C, 0x00658E9C, 0x00000002, 0x00659E8E, + 0xA0812802, 0x00000002, 0x00659E91, 0xA0812802, 0x00000003, 0x00659E9C, + 0xA001281C, 0x0065CA9C, 0x00000003, 0x0065A89C, 0x00659A9C, 0x00659E9C, + 0x00000002, 0x0065AA8E, 0xA0812802, 0x00000002, 0x0065AA91, 0xA0812802, + 0x00000002, 0x0065AA8E, 0xA0812902, 0x00000002, 0x0065AA91, 0xA0812902, + 0x00000006, 0x0065AA9C, 0xA001291C, 0x0027D69C, 0x0065929C, 0x0065D89C, + 0x00659E9C, 0x00000004, 0x0065AA9C, 0xA001291C, 0x0027D69C, 0x00659A9C, + 0x00000005, 0x0065AA9C, 0xA001281C, 0x0027D69C, 0x0065CC9C, 0x0065CA9C, + 0x00000003, 0x0065AA9C, 0x0065789C, 0x00659A9C, 0x00000002, 0x0065AC8E, + 0xA0812802, 0x00000002, 0x0065AC91, 0xA0812802, + // Block 138, offset 0x2280 + 0x00000002, 0x0065AC8E, 0xA0812902, 0x00000002, 0x0065AC91, 0xA0812902, + 0x00000006, 0x0065AC9C, 0xA001291C, 0x0065769C, 0x0065909C, 0x00659E9C, + 0x0065CA9C, 0x00000004, 0x0065AC9C, 0xA001291C, 0x0065869C, 0x0065CA9C, + 0x00000003, 0x0065AC9C, 0xA001291C, 0x00658A9C, 0x00000003, 0x0065AC9C, + 0xA001281C, 0x0065CA9C, 0x00000002, 0x0065AE8E, 0xA0812802, 0x00000002, + 0x0065AE91, 0xA0812802, 0x00000002, 0x0065AE8E, 0xA0812902, 0x00000002, + 0x0065AE91, 0xA0812902, 0x00000006, 0x0065AE9C, 0x0065769C, 0x0065C69C, + 0x00659A9C, 0x00659E9C, 0xA001281C, 0x00000004, 0x0065AE9C, 0x0065789C, + 0x0027D69C, 0x00659E9C, 0x00000006, 0x0065AE9C, 0xA001281C, 0x00659A9C, + 0x00658E9C, 0x00657E9C, 0x0065CA9C, 0x00000003, 0x0065AE9C, 0x0065C69C, + 0x0065D89C, 0x00000002, 0x0065B08E, 0xA0812802, + // Block 139, offset 0x22c0 + 0x00000002, 0x0065B091, 0xA0812802, 0x00000002, 0x0065B08E, 0xA0812902, + 0x00000002, 0x0065B091, 0xA0812902, 0x00000005, 0x0065B09C, 0xA001291C, + 0x0027D69C, 0x00658E9C, 0xA001281C, 0x00000004, 0x0065B09C, 0xA001281C, + 0x0027D69C, 0x0065969C, 0x00000005, 0x0065B09C, 0x0065869C, 0x0065969C, + 0x0027D69C, 0x0065CA9C, 0x00000003, 0x0065B09C, 0xA001291C, 0x0065949C, + 0x00000004, 0x0065B09C, 0xA001291C, 0x0065A29C, 0x0065AC9C, 0x00000003, + 0x0065B09C, 0x0065CA9C, 0x00659A9C, 0x00000004, 0x0065B09C, 0xA001291C, + 0x0065D89C, 0x0065909C, 0x00000002, 0x0065B28E, 0xA0812802, 0x00000002, + 0x0065B291, 0xA0812802, 0x00000002, 0x0065B28E, 0xA0812902, 0x00000002, + 0x0065B291, 0xA0812902, 0x00000003, 0x0065B29C, 0x0027D69C, 0x0065CA9C, + 0x00000003, 0x0065B29C, 0x0027D69C, 0x0065D89C, + // Block 140, offset 0x2300 + 0x00000005, 0x0065B29C, 0xA001291C, 0x0065789C, 0x0065D89C, 0x00659E9C, + 0x00000004, 0x0065B29C, 0xA001281C, 0x0065CA9C, 0x00659E9C, 0x00000005, + 0x0065B29C, 0xA001291C, 0x0065D89C, 0x00659E9C, 0xA001281C, 0x00000004, + 0x0065B49C, 0x0065789C, 0x0065869C, 0x0065CE9C, 0x00000003, 0x0065B49C, + 0x0065789C, 0x0065CA9C, 0x00000002, 0x0065B484, 0x00659084, 0x00000003, + 0x0065B49C, 0x00659A9C, 0x0065AA9C, 0x00000003, 0x0065B49C, 0x0065CA9C, + 0x0065869C, 0x00000005, 0x0065B49C, 0x0065D89C, 0x00658E9C, 0x0065C49C, + 0x0065D89C, 0x00000004, 0x0065B69C, 0x0065869C, 0x0065CE9C, 0x0065D89C, + 0x00000006, 0x0065B69C, 0x0065C89C, 0x0065AA9C, 0xA001281C, 0x0027D69C, + 0x0065CA9C, 0x00000004, 0x0065BA9C, 0x0027D69C, 0x00659E9C, 0x0065CA9C, + 0x00000003, 0x0065BA9C, 0x0065829C, 0xA001281C, + // Block 141, offset 0x2340 + 0x00000005, 0x0065BA9C, 0x0065829C, 0xA001281C, 0x00659E9C, 0x0065D89C, + 0x00000004, 0x0065BE9C, 0x0027D69C, 0x00659E9C, 0xA001281C, 0x00000003, + 0x0065BE9C, 0x0027D69C, 0x0065CA9C, 0x00000003, 0x0065C09C, 0x0065769C, + 0x0065D89C, 0x00000004, 0x0065C89C, 0x00659A9C, 0x00659E9C, 0x0065CA9C, + 0x00000005, 0x0065CA9C, 0x0027D69C, 0x0065AE9C, 0xA001281C, 0x0065CA9C, + 0x00000004, 0x0065CA9C, 0x0065AC9C, 0xA001291C, 0x0027D69C, 0x00000006, + 0x0065CC9C, 0x0065D89C, 0x00659E9C, 0x0065889C, 0xA001281C, 0x0065D89C, + 0x00000002, 0x0065D091, 0xA0812802, 0x00000003, 0x0065D09C, 0x00659A9C, + 0x00659E9C, 0x00000002, 0x0065D291, 0xA0812802, 0x00000002, 0x0065D491, + 0xA0812802, 0x00000002, 0x0065D691, 0xA0812802, 0x00000002, 0x0065DA84, + 0xA0013A04, 0x00000002, 0x0065EC84, 0xA0013A04, + // Block 142, offset 0x2380 + 0x00000002, 0x0065F684, 0xA0013A04, 0x00000002, 0x00660684, 0xA0013A04, + 0x00000002, 0x00661284, 0xA0013A04, 0x00000002, 0x00661484, 0xA0013A04, + 0x00000002, 0x00661C84, 0xA0013A04, 0x00000002, 0x00661E84, 0xA0013A04, + 0x00000002, 0x00662284, 0xA0013A04, 0x00000002, 0x00663884, 0xA0013A04, + 0x00000002, 0x00663896, 0xA0013A16, 0x00000002, 0x00663A84, 0xA0013A04, + 0x00000002, 0x00663A84, 0xA0013C04, 0x00000002, 0x0075C284, 0xA0013904, + 0x00000002, 0x00862084, 0xA0013904, 0x00000002, 0x00862284, 0xA0013904, + 0x00000002, 0x00862484, 0xA0013904, 0x00000002, 0x00862684, 0xA0013904, + 0x00000002, 0x00862884, 0xA0013904, 0x00000002, 0x00862A84, 0xA0013904, + 0x00000002, 0x00862C84, 0xA0013904, 0x00000002, 0x00862C84, 0xA0013A04, + 0x00000002, 0x00862E84, 0xA0013904, 0x00000002, + // Block 143, offset 0x23c0 + 0x00863084, 0xA0013904, 0x00000002, 0x00863284, 0xA0013904, 0x00000002, + 0x00863284, 0xA0013A04, 0x00000002, 0x00863484, 0xA0013904, 0x00000002, + 0x00863484, 0xA0013A04, 0x00000002, 0x00863684, 0xA0013904, 0x00000002, + 0x00863684, 0xA0013A04, 0x00000002, 0x00863884, 0xA0013904, 0x00000002, + 0x00863A84, 0xA0013904, 0x00000002, 0x00863C84, 0xA0013904, 0x00000002, + 0x00863E84, 0xA0013904, 0x00000002, 0x00863E84, 0xA0013A04, 0x00000002, + 0x00863E84, 0xA0013C04, 0x00000002, 0x00864084, 0xA0013904, 0x00000002, + 0x00864284, 0xA0013904, 0x00000002, 0x00864484, 0xA0013904, 0x00000002, + 0x00864684, 0xA0013904, 0x00000002, 0x00864684, 0xA0013A04, 0x00000002, + 0x00864884, 0xA0013904, 0x00000002, 0x00864884, 0xA0013A04, 0x00000002, + 0x00864A84, 0xA0013904, 0x00000002, 0x00864C84, + // Block 144, offset 0x2400 + 0xA0013904, 0x00000002, 0x029C6C84, 0xA0013904, 0x00000002, 0x029CB284, + 0xA0013904, 0x00000002, 0x02A30484, 0xA0013904, 0x00000002, 0x02A3C084, + 0xA0013904, 0x00000002, 0x02A40084, 0xA0013904, 0x00000002, 0x02A6B884, + 0xA0013904, 0x00000002, 0x02A6D284, 0xA0013904, 0x00000002, 0x02A70484, + 0xA0013904, 0x00000002, 0x02B81E84, 0xA0013904, 0x00000002, 0x02B81E84, + 0xA0013A04, 0x00000002, 0x02B84484, 0xA0013904, 0x00000002, 0x02B84684, + 0xA0013904, 0x00000002, 0x02BEA084, 0xA0013904, 0x00000002, 0x02BF8684, + 0xA0013904, 0x00000002, 0x02CBCA84, 0xA0013904, 0x00000002, 0x02CE1084, + 0xA0013904, 0x00000004, 0x02D0549C, 0x02BE1E9C, 0x029E349C, 0x02F27C9C, + 0x00000002, 0x02D6F484, 0xA0013904, 0x00000002, 0x02E45684, 0xA0013904, + 0x00000002, 0x02E4B684, 0xA0013904, 0x00000002, + // Block 145, offset 0x2440 + 0x02E71684, 0xA0013904, 0x00000002, 0x02EB1684, 0xA0013904, 0x00000002, + 0x02EDDC84, 0xA0013904, 0x00000002, 0x02F27484, 0xA0013904, 0x00000002, + 0x02F5F284, 0xA0013904, 0x00000002, 0x02FEA484, 0xA0013904, 0x00000002, + 0x02FEA684, 0xA0013904, 0x00000002, 0x02FEA684, 0xA0013A04, 0x00000002, + 0x02FF1484, 0xA0013904, 0x00000002, 0x02FF1484, 0xA0013A04, 0x00000002, + 0x0300FE84, 0xA0013904, 0x00000002, 0x03011284, 0xA0013904, 0x00000002, + 0x0303F884, 0xA0013904, 0x00000002, 0x0304F284, 0xA0013904, 0x00000002, + 0x0304F284, 0xA0013A04, 0x00000002, 0x0313A484, 0xA0013904, 0x00000002, + 0x031B6684, 0xA0013904, 0x00000002, 0x031F6C84, 0xA0013904, 0x00000002, + 0x031F6C84, 0xA0013A04, 0x00000002, 0x03212284, 0xA0013904, 0x00000002, + 0x032C3884, 0xA0013904, 0x00000002, 0x032DD084, + // Block 146, offset 0x2480 + 0xA0013904, 0x00000002, 0x0331C084, 0xA0013904, 0x00000002, 0x03332C84, + 0xA0013904, 0x00000002, 0x03355084, 0xA0013904, 0x00000002, 0x03367884, + 0xA0013904, 0x00000002, 0x033CEA84, 0xA0013904, 0x00000002, 0x033E9484, + 0xA0013904, 0x00000002, 0x033EA484, 0xA0013904, 0x00000002, 0x033F1A84, + 0xA0013904, 0x00000002, 0x033F3884, 0xA0013904, 0x00000002, 0x033F3884, + 0xA0013A04, 0x00000003, 0x0003F484, 0x002C9884, 0x0003F69F, 0x00000003, + 0x0003F484, 0x002C988A, 0x0003F69F, 0x00000003, 0x0003F484, 0x002D6884, + 0x0003F69F, 0x00000003, 0x0003F484, 0x002D688A, 0x0003F69F, 0x00000003, + 0x0003F484, 0x002D9A84, 0x0003F69F, 0x00000003, 0x0003F484, 0x002D9A8A, + 0x0003F69F, 0x00000003, 0x0003F484, 0x002DFE84, 0x0003F69F, 0x00000003, + 0x0003F484, 0x002DFE8A, 0x0003F69F, 0x00000003, + // Block 147, offset 0x24c0 + 0x0003F484, 0x002EE284, 0x0003F69F, 0x00000003, 0x0003F484, 0x002EE28A, + 0x0003F69F, 0x00000003, 0x0003F484, 0x002F5684, 0x0003F69F, 0x00000003, + 0x0003F484, 0x002F568A, 0x0003F69F, 0x00000003, 0x0003F484, 0x002F7A84, + 0x0003F69F, 0x00000003, 0x0003F484, 0x002F7A8A, 0x0003F69F, 0x00000003, + 0x0003F484, 0x002FE684, 0x0003F69F, 0x00000003, 0x0003F484, 0x002FE68A, + 0x0003F69F, 0x00000003, 0x0003F484, 0x00302C84, 0x0003F69F, 0x00000003, + 0x0003F484, 0x00302C8A, 0x0003F69F, 0x00000003, 0x0003F484, 0x0030F684, + 0x0003F69F, 0x00000003, 0x0003F484, 0x0030F68A, 0x0003F69F, 0x00000003, + 0x0004B084, 0x002FE68A, 0x0004B29F, 0x00000002, 0x002C0A9D, 0x002F569C, + 0x00000002, 0x402C0C20, 0xAE604102, 0x00000002, 0x002C0C83, 0xAE604102, + 0x00000002, 0x402C0C20, 0xAE604702, 0x00000002, + // Block 148, offset 0x2500 + 0x402C0C20, 0xAE605202, 0x00000002, 0x002C0C83, 0xAE605202, 0x00000002, + 0x402C0C20, 0xACA05602, 0x00000002, 0x002C0C83, 0xACA05602, 0x00000002, + 0x402C0C20, 0xADC07002, 0x00000002, 0x002C0C83, 0xADC07002, 0x00000002, + 0x402C0C20, 0xADC07702, 0x00000002, 0x002C0C83, 0xADC07702, 0x00000002, + 0x402C0C20, 0xADC07802, 0x00000002, 0x002C0C83, 0xADC07802, 0x00000002, + 0x402C0C20, 0xADC07B02, 0x00000002, 0x002C0C83, 0xADC07B02, 0x00000002, + 0x402C0E20, 0xAE603202, 0x00000002, 0x002C0E83, 0xAE603202, 0x00000003, + 0x402C0E20, 0xAE603202, 0xAE605202, 0x00000003, 0x002C0E83, 0xAE603202, + 0xAE605202, 0x00000002, 0x402C0E20, 0xAE603C02, 0x00000002, 0x002C0E83, + 0xAE603C02, 0x00000002, 0x402C0E20, 0xAE604102, 0x00000002, 0x002C0E83, + 0xAE604102, 0x00000003, 0x402C0E20, 0xAE604102, + // Block 149, offset 0x2540 + 0xAE605202, 0x00000003, 0x002C0E83, 0xAE604102, 0xAE605202, 0x00000002, + 0x402C0E20, 0xAE605202, 0x00000002, 0x002C0E83, 0xAE605202, 0x00000002, + 0x402C0E20, 0xACA05602, 0x00000002, 0x002C0E83, 0xACA05602, 0x00000002, + 0x402C0E20, 0xADC07002, 0x00000002, 0x002C0E83, 0xADC07002, 0x00000003, + 0x402C0E20, 0xADC07002, 0xAE605202, 0x00000003, 0x002C0E83, 0xADC07002, + 0xAE605202, 0x00000002, 0x402C0E20, 0xADC07702, 0x00000002, 0x002C0E83, + 0xADC07702, 0x00000002, 0x402C1020, 0xAE603202, 0x00000002, 0x002C1083, + 0xAE603202, 0x00000002, 0x402C1020, 0xAE603502, 0x00000002, 0x002C1083, + 0xAE603502, 0x00000002, 0x402C1020, 0xAE603702, 0x00000002, 0x002C1083, + 0xAE603702, 0x00000002, 0x402C1020, 0xAE603C02, 0x00000002, 0x002C1083, + 0xAE603C02, 0x00000003, 0x402C1020, 0xAE603C02, + // Block 150, offset 0x2580 + 0xAE603202, 0x00000003, 0x002C1083, 0xAE603C02, 0xAE603202, 0x00000003, + 0x402C1020, 0xAE603C02, 0xAE603502, 0x00000003, 0x002C1083, 0xAE603C02, + 0xAE603502, 0x00000003, 0x402C1020, 0xAE603C02, 0xAE604E02, 0x00000003, + 0x002C1083, 0xAE603C02, 0xAE604E02, 0x00000003, 0x402C1020, 0xAE603C02, + 0xAE606402, 0x00000003, 0x002C1083, 0xAE603C02, 0xAE606402, 0x00000002, + 0x402C1020, 0xAE604102, 0x00000002, 0x002C1083, 0xAE604102, 0x00000002, + 0x402C1020, 0xAE604702, 0x00000002, 0x002C1083, 0xAE604702, 0x00000002, + 0x402C1020, 0xAE604E02, 0x00000002, 0x002C1083, 0xAE604E02, 0x00000002, + 0x402C1020, 0xAE605202, 0x00000002, 0x002C1083, 0xAE605202, 0x00000002, + 0x402C1020, 0xACA05602, 0x00000002, 0x002C1083, 0xACA05602, 0x00000003, + 0x402C1020, 0xACA05602, 0xAE603702, 0x00000003, + // Block 151, offset 0x25c0 + 0x002C1083, 0xACA05602, 0xAE603702, 0x00000002, 0x402C1020, 0xACA05902, + 0x00000002, 0x002C1083, 0xACA05902, 0x00000002, 0x402C1020, 0xAE605B02, + 0x00000002, 0x002C1083, 0xAE605B02, 0x00000003, 0x402C1020, 0xAE605B02, + 0xAE603202, 0x00000003, 0x002C1083, 0xAE605B02, 0xAE603202, 0x00000003, + 0x402C1020, 0xAE605B02, 0xAE603502, 0x00000003, 0x002C1083, 0xAE605B02, + 0xAE603502, 0x00000002, 0x402C1020, 0xAE606402, 0x00000002, 0x002C1083, + 0xAE606402, 0x00000002, 0x402C1020, 0xAE606502, 0x00000002, 0x002C1083, + 0xAE606502, 0x00000002, 0x402C1020, 0xAE606702, 0x00000002, 0x002C1083, + 0xAE606702, 0x00000002, 0x402C1020, 0xADC07002, 0x00000002, 0x002C1083, + 0xADC07002, 0x00000003, 0x402C1020, 0xADC07002, 0xAE603C02, 0x00000003, + 0x002C1083, 0xADC07002, 0xAE603C02, 0x00000002, + // Block 152, offset 0x2600 + 0x402C1020, 0xADC07802, 0x00000002, 0x002C1083, 0xADC07802, 0x00000002, + 0x402C1020, 0xADC07A02, 0x00000002, 0x002C1083, 0xADC07A02, 0x00000002, + 0x402C3C20, 0xAE603202, 0x00000002, 0x002C3C83, 0xAE603202, 0x00000002, + 0x402C3C20, 0xAE604102, 0x00000002, 0x002C3C83, 0xAE604102, 0x00000002, + 0x402C3C20, 0xACA05602, 0x00000002, 0x002C3C83, 0xACA05602, 0x00000002, + 0x402C3C20, 0xADC07002, 0x00000002, 0x002C3C83, 0xADC07002, 0x00000002, + 0x402C3C20, 0xADC07B02, 0x00000002, 0x002C3C83, 0xADC07B02, 0x00000002, + 0x402C3E20, 0xAE604702, 0x00000002, 0x002C3E83, 0xAE604702, 0x00000002, + 0x402C3E20, 0xAE605202, 0x00000002, 0x002C3E83, 0xAE605202, 0x00000002, + 0x402C4020, 0xAE603202, 0x00000002, 0x002C4083, 0xAE603202, 0x00000002, + 0x402C4020, 0xAE603502, 0x00000002, 0x002C4083, + // Block 153, offset 0x2640 + 0xAE603502, 0x00000002, 0x402C4020, 0xAE603702, 0x00000002, 0x002C4083, + 0xAE603702, 0x00000002, 0x402C4020, 0xAE603C02, 0x00000002, 0x002C4083, + 0xAE603C02, 0x00000002, 0x402C4020, 0xAE604102, 0x00000002, 0x002C4083, + 0xAE604102, 0x00000002, 0x402C4020, 0xAE604702, 0x00000002, 0x002C4083, + 0xAE604702, 0x00000003, 0x402C4020, 0xAE604702, 0xAE603202, 0x00000003, + 0x002C4083, 0xAE604702, 0xAE603202, 0x00000002, 0x402C4020, 0xAE604E02, + 0x00000002, 0x002C4083, 0xAE604E02, 0x00000002, 0x002C4083, 0xAE605202, + 0x00000002, 0x402C4020, 0xACA05902, 0x00000002, 0x002C4083, 0xACA05902, + 0x00000002, 0x402C4020, 0xAE605B02, 0x00000002, 0x002C4083, 0xAE605B02, + 0x00000002, 0x402C4020, 0xAE606402, 0x00000002, 0x002C4083, 0xAE606402, + 0x00000002, 0x402C4020, 0xAE606502, 0x00000002, + // Block 154, offset 0x2680 + 0x002C4083, 0xAE606502, 0x00000002, 0x402C4020, 0xAE606702, 0x00000002, + 0x002C4083, 0xAE606702, 0x00000002, 0x402C4020, 0xADC07002, 0x00000002, + 0x002C4083, 0xADC07002, 0x00000002, 0x402C4020, 0xADC07A02, 0x00000002, + 0x002C4083, 0xADC07A02, 0x00000002, 0x402C6620, 0xAE603202, 0x00000002, + 0x002C6683, 0xAE603202, 0x00000002, 0x402C6620, 0xAE604102, 0x00000002, + 0x002C6683, 0xAE604102, 0x00000002, 0x402C6620, 0xAE605202, 0x00000002, + 0x002C6683, 0xAE605202, 0x00000002, 0x402C6620, 0xACA05602, 0x00000002, + 0x002C6683, 0xACA05602, 0x00000002, 0x402C6620, 0xAE606502, 0x00000002, + 0x002C6683, 0xAE606502, 0x00000002, 0x402C6620, 0xAE606702, 0x00000002, + 0x002C6683, 0xAE606702, 0x00000002, 0x402C6620, 0xADC07002, 0x00000002, + 0x002C6683, 0xADC07002, 0x00000003, 0x402C6620, + // Block 155, offset 0x26c0 + 0xADC07002, 0xAE605B02, 0x00000003, 0x002C6683, 0xADC07002, 0xAE605B02, + 0x00000002, 0x402C6620, 0xADC07B02, 0x00000002, 0x002C6683, 0xADC07B02, + 0x00000002, 0x002C989C, 0x0030BE9D, 0x00000002, 0x002D0884, 0x002D9A84, + 0x00000002, 0x402D2420, 0xAE603202, 0x00000002, 0x002D2483, 0xAE603202, + 0x00000002, 0x402D2420, 0xAE603502, 0x00000002, 0x002D2483, 0xAE603502, + 0x00000002, 0x402D2420, 0xAE603702, 0x00000002, 0x002D2483, 0xAE603702, + 0x00000002, 0x402D2420, 0xAE603C02, 0x00000002, 0x002D2483, 0xAE603C02, + 0x00000003, 0x402D2420, 0xAE603C02, 0xAE603202, 0x00000003, 0x002D2483, + 0xAE603C02, 0xAE603202, 0x00000003, 0x402D2420, 0xAE603C02, 0xAE603502, + 0x00000003, 0x002D2483, 0xAE603C02, 0xAE603502, 0x00000003, 0x402D2420, + 0xAE603C02, 0xAE604E02, 0x00000003, 0x002D2483, + // Block 156, offset 0x2700 + 0xAE603C02, 0xAE604E02, 0x00000003, 0x402D2420, 0xAE603C02, 0xAE606402, + 0x00000003, 0x002D2483, 0xAE603C02, 0xAE606402, 0x00000002, 0x402D2420, + 0xAE604102, 0x00000002, 0x002D2483, 0xAE604102, 0x00000002, 0x402D2420, + 0xAE604702, 0x00000002, 0x002D2483, 0xAE604702, 0x00000003, 0x402D2420, + 0xAE604702, 0xAE605B02, 0x00000003, 0x002D2483, 0xAE604702, 0xAE605B02, + 0x00000002, 0x402D2420, 0xAE604D02, 0x00000002, 0x002D2483, 0xAE604D02, + 0x00000002, 0x402D2420, 0xAE604E02, 0x00000002, 0x002D2483, 0xAE604E02, + 0x00000003, 0x402D2420, 0xAE604E02, 0xAE603202, 0x00000003, 0x002D2483, + 0xAE604E02, 0xAE603202, 0x00000003, 0x402D2420, 0xAE604E02, 0xAE604702, + 0x00000003, 0x002D2483, 0xAE604E02, 0xAE604702, 0x00000003, 0x402D2420, + 0xAE604E02, 0xAE605B02, 0x00000003, 0x002D2483, + // Block 157, offset 0x2740 + 0xAE604E02, 0xAE605B02, 0x00000002, 0x402D2420, 0xAE605202, 0x00000002, + 0x002D2483, 0xAE605202, 0x00000003, 0x402D2420, 0xAE605202, 0xAE605B02, + 0x00000003, 0x002D2483, 0xAE605202, 0xAE605B02, 0x00000002, 0x402D2420, + 0xACA05902, 0x00000002, 0x002D2483, 0xACA05902, 0x00000003, 0x402D2420, + 0xACA05902, 0xAE605B02, 0x00000003, 0x002D2483, 0xACA05902, 0xAE605B02, + 0x00000002, 0x402D2420, 0xAE605B02, 0x00000002, 0x002D2483, 0xAE605B02, + 0x00000003, 0x402D2420, 0xAE605B02, 0xAE603202, 0x00000003, 0x002D2483, + 0xAE605B02, 0xAE603202, 0x00000003, 0x402D2420, 0xAE605B02, 0xAE603502, + 0x00000003, 0x002D2483, 0xAE605B02, 0xAE603502, 0x00000002, 0x402D2420, + 0xAE606402, 0x00000002, 0x002D2483, 0xAE606402, 0x00000002, 0x402D2420, + 0xAE606502, 0x00000002, 0x002D2483, 0xAE606502, + // Block 158, offset 0x2780 + 0x00000002, 0x402D2420, 0xAE606702, 0x00000002, 0x002D2483, 0xAE606702, + 0x00000002, 0x402D2420, 0xAD806802, 0x00000002, 0x002D2483, 0xAD806802, + 0x00000003, 0x402D2420, 0xAD806802, 0xAE603202, 0x00000003, 0x002D2483, + 0xAD806802, 0xAE603202, 0x00000003, 0x402D2420, 0xAD806802, 0xAE603502, + 0x00000003, 0x002D2483, 0xAD806802, 0xAE603502, 0x00000003, 0x402D2420, + 0xAD806802, 0xAE604E02, 0x00000003, 0x002D2483, 0xAD806802, 0xAE604E02, + 0x00000003, 0x402D2420, 0xAD806802, 0xAE606402, 0x00000003, 0x002D2483, + 0xAD806802, 0xAE606402, 0x00000003, 0x402D2420, 0xAD806802, 0xADC07002, + 0x00000003, 0x002D2483, 0xAD806802, 0xADC07002, 0x00000002, 0x402D2420, + 0xADC07002, 0x00000002, 0x002D2483, 0xADC07002, 0x00000003, 0x402D2420, + 0xADC07002, 0xAE603C02, 0x00000003, 0x002D2483, + // Block 159, offset 0x27c0 + 0xADC07002, 0xAE603C02, 0x00000002, 0x002D689C, 0x002BDE9C, 0x00000002, + 0x002D689D, 0x002D229C, 0x00000002, 0x002D689D, 0x002F2C9D, 0x00000002, + 0x002D689D, 0x0030BE9D, 0x00000002, 0x002D689D, 0x00312A9C, 0x00000002, + 0x002D9A84, 0x002D9A9F, 0x00000002, 0x002D9A8A, 0x002D9A9F, 0x00000003, + 0x002D9A84, 0x002D9A84, 0x002D9A9F, 0x00000003, 0x002D9A8A, 0x002D9A8A, + 0x002D9A9F, 0x00000002, 0x002D9A84, 0x002DCC84, 0x00000002, 0x002D9A8A, + 0x002DCC8A, 0x00000002, 0x002D9A9C, 0x002E9E9C, 0x00000002, 0x002D9A9D, + 0x00306C9D, 0x00000002, 0x002D9A84, 0x0030BE9F, 0x00000002, 0x002D9A8A, + 0x0030BE9F, 0x00000002, 0x002D9A84, 0x0030F69F, 0x00000002, 0x002D9A8A, + 0x0030F69F, 0x00000002, 0x002DFE9C, 0x002BDE9D, 0x00000002, 0x002DFE9D, + 0x002C0A9D, 0x00000002, 0x002DFE9C, 0x002D229C, + // Block 160, offset 0x2800 + 0x00000002, 0x002DFE9D, 0x002DFE9D, 0x00000002, 0x002DFE9C, 0x002E229C, + 0x00000002, 0x002DFE9C, 0x002E829C, 0x00000002, 0x002DFE9D, 0x002E829D, + 0x00000002, 0x002DFE9C, 0x00302C9C, 0x00000002, 0x002DFE9C, 0x0030BE9D, + 0x00000002, 0x002DFE9C, 0x0030E29D, 0x00000002, 0x002DFE9C, 0x0032A29D, + 0x00000002, 0x002E229C, 0x0030F69C, 0x00000002, 0x002E829C, 0x002FE69C, + 0x00000002, 0x002E9E8A, 0x002EE284, 0x00000002, 0x002E9E9C, 0x002FE69C, + 0x00000002, 0x002EE29C, 0x0030BE9D, 0x00000002, 0x002F2C9D, 0x002D689D, + 0x00000002, 0x002F2C9D, 0x002F7A9D, 0x00000002, 0x002F2C9C, 0x002FE69C, + 0x00000002, 0x002FE69D, 0x002C629D, 0x00000002, 0x002FE694, 0x002E8294, + 0x00000002, 0x002FE69C, 0x002F7A9C, 0x00000002, 0x002FE69D, 0x002FE69D, + 0x00000002, 0x002FE684, 0x00302C84, 0x00000002, + // Block 161, offset 0x2840 + 0x002FE69D, 0x0030BE9C, 0x00000002, 0x00302C94, 0x002E8294, 0x00000002, + 0x0030BE84, 0x002D9A9F, 0x00000002, 0x0030BE8A, 0x002D9A9F, 0x00000003, + 0x0030BE84, 0x002D9A84, 0x002D9A9F, 0x00000003, 0x0030BE8A, 0x002D9A8A, + 0x002D9A9F, 0x00000002, 0x4030E420, 0xAE603C02, 0x00000002, 0x0030E483, + 0xAE603C02, 0x00000002, 0x4030E420, 0xAE604102, 0x00000002, 0x0030E483, + 0xAE604102, 0x00000002, 0x4030E420, 0xAE604702, 0x00000002, 0x0030E483, + 0xAE604702, 0x00000002, 0x4030E420, 0xAE605202, 0x00000002, 0x0030E483, + 0xAE605202, 0x00000002, 0x4030E420, 0xACA05602, 0x00000002, 0x0030E483, + 0xACA05602, 0x00000002, 0x4030E420, 0xADC07002, 0x00000002, 0x0030E483, + 0xADC07002, 0x00000002, 0x4030E420, 0xADC07902, 0x00000002, 0x0030E483, + 0xADC07902, 0x00000002, 0x4030E420, 0xADC07B02, + // Block 162, offset 0x2880 + 0x00000002, 0x0030F684, 0x002D9A9F, 0x00000002, 0x0030F68A, 0x002D9A9F, + 0x00000003, 0x0030F684, 0x002D9A84, 0x002D9A9F, 0x00000003, 0x0030F68A, + 0x002D9A8A, 0x002D9A9F, 0x00000002, 0x0032769C, 0x002FE69C, 0x00000002, + 0x00393C99, 0x003A8E99, 0x00000002, 0x00393C9A, 0x003A8E9A, 0x00000002, + 0x00395699, 0x003A8E99, 0x00000002, 0x0039569A, 0x003A8E9A, 0x00000002, + 0x00395899, 0x003A8E99, 0x00000002, 0x0039589A, 0x003A8E9A, 0x00000002, + 0x00396499, 0x003A8E99, 0x00000002, 0x0039649A, 0x003A8E9A, 0x00000002, + 0x00397299, 0x003A8E99, 0x00000002, 0x0039729A, 0x003A8E9A, 0x00000002, + 0x00397499, 0x003A8E99, 0x00000002, 0x0039749A, 0x003A8E9A, 0x00000002, + 0x0039C699, 0x003A8E99, 0x00000002, 0x0039C69A, 0x003A8E9A, 0x00000002, + 0x0039C899, 0x003A8E99, 0x00000002, 0x0039C89A, + // Block 163, offset 0x28c0 + 0x003A8E9A, 0x00000002, 0x0039DC99, 0x003A8E99, 0x00000002, 0x0039DC9A, + 0x003A8E9A, 0x00000002, 0x0039DE99, 0x003A8E99, 0x00000002, 0x0039DE9A, + 0x003A8E9A, 0x00000002, 0x0039E699, 0x003A8E99, 0x00000002, 0x0039E69A, + 0x003A8E9A, 0x00000002, 0x0039EE99, 0x003A8E99, 0x00000002, 0x0039EE9A, + 0x003A8E9A, 0x00000002, 0x0039F099, 0x003A8E99, 0x00000002, 0x0039F09A, + 0x003A8E9A, 0x00000002, 0x0039FC99, 0x003A8E99, 0x00000002, 0x0039FC9A, + 0x003A8E9A, 0x00000002, 0x003A1299, 0x003A8E99, 0x00000002, 0x003A129A, + 0x003A8E9A, 0x00000002, 0x003A1A99, 0x003A8E99, 0x00000002, 0x003A1A9A, + 0x003A8E9A, 0x00000002, 0x003A4099, 0x003A8E99, 0x00000002, 0x003A409A, + 0x003A8E9A, 0x00000002, 0x003A4E9A, 0x003A8E9A, 0x00000002, 0x003A5699, + 0x003A8E99, 0x00000002, 0x003A569A, 0x003A8E9A, + // Block 164, offset 0x2900 + 0x00000002, 0x003A689A, 0x003A8E9A, 0x00000002, 0x003A9099, 0x003A8E99, + 0x00000002, 0x003A909A, 0x003A8E9A, 0x00000002, 0x402D6A20, 0xAE604702, + 0x00000002, 0x002D6A83, 0xAE604702, 0x00000002, 0x402D6A20, 0xAE605202, + 0x00000002, 0x002D6A83, 0xAE605202, 0x00000002, 0x002D9883, 0xAE603202, + 0x00000002, 0x002D9883, 0xAE603502, 0x00000002, 0x002D9883, 0xAE603702, + 0x00000002, 0x002D9883, 0xAE603C02, 0x00000002, 0x002D9883, 0xAE604102, + 0x00000002, 0x002D9883, 0xAE604702, 0x00000003, 0x002D9883, 0xAE604702, + 0xAE603202, 0x00000002, 0x002D9883, 0xAE604E02, 0x00000002, 0x002D9883, + 0xACA05902, 0x00000002, 0x002D9883, 0xAE605B02, 0x00000002, 0x002D9883, + 0xAE606402, 0x00000002, 0x002D9883, 0xAE606502, 0x00000002, 0x002D9883, + 0xAE606702, 0x00000002, 0x002D9883, 0xADC07002, + // Block 165, offset 0x2940 + 0x00000002, 0x002D9883, 0xADC07A02, 0x00000002, 0x402EE420, 0xAE604E02, + 0x00000002, 0x002EE483, 0xAE604E02, 0x00000002, 0x402EE420, 0xAE605B02, + 0x00000002, 0x002EE483, 0xAE605B02, 0x00000002, 0x40306E20, 0xAE603202, + 0x00000002, 0x00306E83, 0xAE603202, 0x00000002, 0x40306E20, 0xAE603502, + 0x00000002, 0x00306E83, 0xAE603502, 0x00000002, 0x40306E20, 0xAE604102, + 0x00000002, 0x00306E83, 0xAE604102, 0x00000002, 0x40306E20, 0xAE605B02, + 0x00000002, 0x00306E83, 0xAE605B02, 0x00000002, 0x402FE820, 0xAE605202, + 0x00000002, 0x002FE883, 0xAE605202, 0x00000002, 0x002C6294, 0xA0013914, + 0x00000002, 0x00302C83, 0x402D6820, 0x00000002, 0x00302C89, 0x002D6888, + 0x00000002, 0x40310021, 0xAE603202, 0x00000002, 0x003100A3, 0xAE603202, + 0x00000002, 0x40310021, 0xAE603502, 0x00000002, + // Block 166, offset 0x2980 + 0x003100A3, 0xAE603502, 0x00000002, 0x40310021, 0xAE604102, 0x00000002, + 0x003100A3, 0xAE604102, 0x00000002, 0x40310021, 0xAE605B02, 0x00000002, + 0x003100A3, 0xAE605B02, 0x00000002, 0x40320C20, 0xAE603202, 0x00000002, + 0x00320C83, 0xAE603202, 0x00000002, 0x40320C20, 0xAE605B02, 0x00000002, + 0x00320C83, 0xAE605B02, 0x00000002, 0x40320C21, 0xAE605B02, 0x00000002, + 0x00320CA3, 0xAE605B02, 0x00000002, 0x40320E20, 0xAE603202, 0x00000002, + 0x00320E83, 0xAE603202, 0x00000002, 0x40320E21, 0xAE604E02, 0x00000002, + 0x00320EA3, 0xAE604E02, 0x00000002, 0x40320E21, 0xAE605B02, 0x00000002, + 0x00320EA3, 0xAE605B02, 0x00000002, 0x40321020, 0xAE603202, 0x00000002, + 0x00321083, 0xAE603202, 0x00000002, 0x402BDE21, 0x002C9888, 0x00000002, + 0x002BDEA3, 0x002C9888, 0x00000003, 0x402BDE21, + // Block 167, offset 0x29c0 + 0x002C9888, 0xAE605B02, 0x00000003, 0x002BDEA3, 0x002C9888, 0xAE605B02, + 0x00000002, 0x402EE221, 0x002C9888, 0x00000002, 0x002EE2A3, 0x002C9888, + 0x00000003, 0x402EE221, 0x002C9888, 0xAE604E02, 0x00000003, 0x002EE2A3, + 0x002C9888, 0xAE604E02, 0x00000003, 0x402EE221, 0x002C9888, 0xAE605B02, + 0x00000003, 0x002EE2A3, 0x002C9888, 0xAE605B02, 0x00000002, 0x40306C21, + 0x002C9888, 0x00000002, 0x00306CA3, 0x002C9888, 0x00000003, 0x40306C21, + 0x002C9888, 0xAE603202, 0x00000003, 0x00306CA3, 0x002C9888, 0xAE603202, + 0x00000003, 0x40306C21, 0x002C9888, 0xAE603502, 0x00000003, 0x00306CA3, + 0x002C9888, 0xAE603502, 0x00000003, 0x40306C21, 0x002C9888, 0xAE604102, + 0x00000003, 0x00306CA3, 0x002C9888, 0xAE604102, 0x00000003, 0x40306C21, + 0x002C9888, 0xAE605B02, 0x00000003, 0x00306CA3, + // Block 168, offset 0x2a00 + 0x002C9888, 0xAE605B02, 0x00000002, 0x404A7620, 0x838225B3, 0x00000004, + 0x004A8083, 0x404AB020, 0x404A8020, 0x404AFA20, 0x00000004, 0x004A8084, + 0x404AB020, 0x404A8020, 0x404AFA20, 0x00000004, 0x004A8083, 0x404AB420, + 0x404A8020, 0x404AFA20, 0x00000004, 0x004A8084, 0x404AB420, 0x404A8020, + 0x404AFA20, 0x00000004, 0x004A8083, 0x404AFA20, 0x404A8020, 0x404AFA20, + 0x00000004, 0x004A8084, 0x404AFA20, 0x404A8020, 0x404AFA20, 0x00000002, + 0x404A8020, 0x828225B5, 0x00000004, 0x004AB083, 0x404A8020, 0x404A8020, + 0x404AFA20, 0x00000004, 0x004AB084, 0x404A8020, 0x404A8020, 0x404AFA20, + 0x00000004, 0x004AB083, 0x404A8420, 0x404A8020, 0x404AFA20, 0x00000004, + 0x004AB084, 0x404A8420, 0x404A8020, 0x404AFA20, 0x00000004, 0x004AB083, + 0x404AB820, 0x404A8020, 0x404AFA20, 0x00000004, + // Block 169, offset 0x2a40 + 0x004AB084, 0x404AB820, 0x404A8020, 0x404AFA20, 0x00000004, 0x004AB083, + 0x404AC020, 0x404A8020, 0x404AFA20, 0x00000004, 0x004AB084, 0x404AC020, + 0x404A8020, 0x404AFA20, 0x00000004, 0x004AB083, 0x404AC420, 0x404A8020, + 0x404AFA20, 0x00000004, 0x004AB084, 0x404AC420, 0x404A8020, 0x404AFA20, + 0x00000002, 0x404AB020, 0x828225B5, 0x00000002, 0x004AB083, 0x828225B5, + 0x00000004, 0x004AC083, 0x404A8020, 0x404A8020, 0x404AFA20, 0x00000004, + 0x004AC084, 0x404A8020, 0x404A8020, 0x404AFA20, 0x00000004, 0x004AC083, + 0x404AB020, 0x404A8020, 0x404AFA20, 0x00000004, 0x004AC084, 0x404AB020, + 0x404A8020, 0x404AFA20, 0x00000004, 0x004AC083, 0x404AFA20, 0x404A8020, + 0x404AFA20, 0x00000004, 0x004AC084, 0x404AFA20, 0x404A8020, 0x404AFA20, + 0x00000002, 0x404AC020, 0x828225B5, 0x00000004, + // Block 170, offset 0x2a80 + 0x004AC483, 0x404A8420, 0x404A8020, 0x404AFA20, 0x00000004, 0x004AC484, + 0x404A8420, 0x404A8020, 0x404AFA20, 0x00000004, 0x004AC483, 0x404AB020, + 0x404A8020, 0x404AFA20, 0x00000004, 0x004AC484, 0x404AB020, 0x404A8020, + 0x404AFA20, 0x00000004, 0x004AC483, 0x404AB420, 0x404A8020, 0x404AFA20, + 0x00000004, 0x004AC484, 0x404AB420, 0x404A8020, 0x404AFA20, 0x00000002, + 0x404AD020, 0x828225B5, 0x00000004, 0x004AE083, 0x404A8020, 0x404A8020, + 0x404AFA20, 0x00000004, 0x004AE084, 0x404A8020, 0x404A8020, 0x404AFA20, + 0x00000004, 0x004AE083, 0x404AB020, 0x404A8020, 0x404AFA20, 0x00000004, + 0x004AE084, 0x404AB020, 0x404A8020, 0x404AFA20, 0x00000004, 0x004AE083, + 0x404AC020, 0x404A8020, 0x404AFA20, 0x00000004, 0x004AE084, 0x404AC020, + 0x404A8020, 0x404AFA20, 0x00000002, 0x404AEA20, + // Block 171, offset 0x2ac0 + 0x8281258B, 0x00000002, 0x404AF020, 0x8281258B, 0x00000002, 0x82822599, + 0x838225B3, 0x00000002, 0x8282259B, 0x828225B5, 0x00000002, 0x828225A3, + 0x828225B5, 0x00000002, 0x838225A3, 0x828225B5, 0x00000002, 0x828225A7, + 0x828225B5, 0x00000002, 0x828225AB, 0x828225B5, 0x00000002, 0x402BDE20, + 0xAE604202, 0x00000002, 0x002BDE88, 0xAE604202, 0x00000003, 0x402BDE20, + 0xAE604202, 0xAE603202, 0x00000003, 0x002BDE88, 0xAE604202, 0xAE603202, + 0x00000003, 0x402BDE20, 0xAE604202, 0xAE603502, 0x00000003, 0x002BDE88, + 0xAE604202, 0xAE603502, 0x00000003, 0x402BDE20, 0xAE604202, 0xAE604E02, + 0x00000003, 0x002BDE88, 0xAE604202, 0xAE604E02, 0x00000003, 0x402BDE20, + 0xAE604202, 0xAE606402, 0x00000003, 0x002BDE88, 0xAE604202, 0xAE606402, + 0x00000003, 0x402BDE20, 0xADC07002, 0xAE604202, + // Block 172, offset 0x2b00 + 0x00000003, 0x002BDE88, 0xADC07002, 0xAE604202, 0x00000002, 0x402C3A20, + 0xAE604202, 0x00000002, 0x002C3A88, 0xAE604202, 0x00000002, 0x402C9820, + 0xAE604202, 0x00000002, 0x002C9888, 0xAE604202, 0x00000003, 0x402C9820, + 0xAE604202, 0xAE603202, 0x00000003, 0x002C9888, 0xAE604202, 0xAE603202, + 0x00000003, 0x402C9820, 0xAE604202, 0xAE603502, 0x00000003, 0x002C9888, + 0xAE604202, 0xAE603502, 0x00000003, 0x402C9820, 0xAE604202, 0xAE604E02, + 0x00000003, 0x002C9888, 0xAE604202, 0xAE604E02, 0x00000003, 0x402C9820, + 0xAE604202, 0xAE606402, 0x00000003, 0x002C9888, 0xAE604202, 0xAE606402, + 0x00000003, 0x402C9820, 0xADC07002, 0xAE604202, 0x00000003, 0x002C9888, + 0xADC07002, 0xAE604202, 0x00000002, 0x402D2220, 0xAE604202, 0x00000002, + 0x002D2288, 0xAE604202, 0x00000002, 0x402D6820, + // Block 173, offset 0x2b40 + 0xAE604202, 0x00000002, 0x002D6888, 0xAE604202, 0x00000002, 0x402D9A20, + 0xAE604202, 0x00000002, 0x002D9A88, 0xAE604202, 0x00000002, 0x402DCC20, + 0xAE604202, 0x00000002, 0x002DCC88, 0xAE604202, 0x00000002, 0x402EE220, + 0xAE604202, 0x00000002, 0x002EE288, 0xAE604202, 0x00000003, 0x402EE220, + 0xAE604202, 0xAE603202, 0x00000003, 0x002EE288, 0xAE604202, 0xAE603202, + 0x00000003, 0x402EE220, 0xAE604202, 0xAE603502, 0x00000003, 0x002EE288, + 0xAE604202, 0xAE603502, 0x00000003, 0x402EE220, 0xAE604202, 0xAE604E02, + 0x00000003, 0x002EE288, 0xAE604202, 0xAE604E02, 0x00000003, 0x402EE220, + 0xAE604202, 0xAE606402, 0x00000003, 0x002EE288, 0xAE604202, 0xAE606402, + 0x00000003, 0x402EE220, 0xADC07002, 0xAE604202, 0x00000003, 0x002EE288, + 0xADC07002, 0xAE604202, 0x00000002, 0x402FE620, + // Block 174, offset 0x2b80 + 0xAE604202, 0x00000002, 0x002FE688, 0xAE604202, 0x00000002, 0x40306C20, + 0xAE604202, 0x00000002, 0x00306C88, 0xAE604202, 0x00000002, 0x4030E220, + 0xAE604202, 0x00000002, 0x0030E288, 0xAE604202, 0x00000002, 0x40310020, + 0xAE604202, 0x00000002, 0x00310088, 0xAE604202, 0x00000002, 0x40312A20, + 0xAE604202, 0x00000002, 0x00312A88, 0xAE604202, 0x00000003, 0x00026C84, + 0x00026C84, 0x0009429F, 0x00000002, 0x0002BA84, 0x0002BA9F, 0x00000002, + 0x0002BA84, 0x0002C49F, 0x00000002, 0x0002C484, 0x0002BA9F, 0x00000002, + 0x0002C484, 0x0002C49F, 0x00000002, 0x0002E484, 0x0002E49F, 0x00000002, + 0x0002E496, 0x0002E49F, 0x00000003, 0x0002E484, 0x0002E484, 0x0002E49F, + 0x00000003, 0x0002E496, 0x0002E496, 0x0002E49F, 0x00000003, 0x0003F484, + 0x0029CE84, 0x0003F69F, 0x00000003, 0x0003F484, + // Block 175, offset 0x2bc0 + 0x0029D084, 0x0003F69F, 0x00000003, 0x0003F484, 0x0029D284, 0x0003F69F, + 0x00000003, 0x0003F484, 0x0029D484, 0x0003F69F, 0x00000003, 0x0003F484, + 0x0029D684, 0x0003F69F, 0x00000003, 0x0003F484, 0x0029D884, 0x0003F69F, + 0x00000003, 0x0003F484, 0x0029DA84, 0x0003F69F, 0x00000003, 0x0003F484, + 0x0029DC84, 0x0003F69F, 0x00000003, 0x0003F484, 0x0029DE84, 0x0003F69F, + 0x00000003, 0x0003F484, 0x002BDE84, 0x0003F69F, 0x00000003, 0x0003F484, + 0x002BDE8A, 0x0003F69F, 0x00000003, 0x0003F484, 0x002C0A84, 0x0003F69F, + 0x00000003, 0x0003F484, 0x002C0A8A, 0x0003F69F, 0x00000003, 0x0003F484, + 0x002C3A84, 0x0003F69F, 0x00000003, 0x0003F484, 0x002C3A8A, 0x0003F69F, + 0x00000003, 0x0003F484, 0x002C6284, 0x0003F69F, 0x00000003, 0x0003F484, + 0x002C628A, 0x0003F69F, 0x00000003, 0x0003F484, + // Block 176, offset 0x2c00 + 0x002D0884, 0x0003F69F, 0x00000003, 0x0003F484, 0x002D088A, 0x0003F69F, + 0x00000003, 0x0003F484, 0x002D2284, 0x0003F69F, 0x00000003, 0x0003F484, + 0x002D228A, 0x0003F69F, 0x00000003, 0x0003F484, 0x002DCC84, 0x0003F69F, + 0x00000003, 0x0003F484, 0x002DCC8A, 0x0003F69F, 0x00000003, 0x0003F484, + 0x002E2284, 0x0003F69F, 0x00000003, 0x0003F484, 0x002E228A, 0x0003F69F, + 0x00000003, 0x0003F484, 0x002E8284, 0x0003F69F, 0x00000003, 0x0003F484, + 0x002E828A, 0x0003F69F, 0x00000003, 0x0003F484, 0x002E9E84, 0x0003F69F, + 0x00000003, 0x0003F484, 0x002E9E8A, 0x0003F69F, 0x00000003, 0x0003F484, + 0x002F2C84, 0x0003F69F, 0x00000003, 0x0003F484, 0x002F2C8A, 0x0003F69F, + 0x00000003, 0x0003F484, 0x00306C84, 0x0003F69F, 0x00000003, 0x0003F484, + 0x00306C8A, 0x0003F69F, 0x00000003, 0x0003F484, + // Block 177, offset 0x2c40 + 0x0030BE84, 0x0003F69F, 0x00000003, 0x0003F484, 0x0030BE8A, 0x0003F69F, + 0x00000003, 0x0003F484, 0x0030E284, 0x0003F69F, 0x00000003, 0x0003F484, + 0x0030E28A, 0x0003F69F, 0x00000003, 0x0003F484, 0x00310084, 0x0003F69F, + 0x00000003, 0x0003F484, 0x0031008A, 0x0003F69F, 0x00000003, 0x0003F484, + 0x00312A84, 0x0003F69F, 0x00000003, 0x0003F484, 0x00312A8A, 0x0003F69F, + 0x00000003, 0x0003F484, 0x0062AC84, 0x0003F69F, 0x00000003, 0x0003F484, + 0x0062B084, 0x0003F69F, 0x00000003, 0x0003F484, 0x0062B284, 0x0003F69F, + 0x00000003, 0x0003F484, 0x0062B684, 0x0003F69F, 0x00000003, 0x0003F484, + 0x0062B884, 0x0003F69F, 0x00000003, 0x0003F484, 0x0062BA84, 0x0003F69F, + 0x00000003, 0x0003F484, 0x0062BE84, 0x0003F69F, 0x00000003, 0x0003F484, + 0x0062C284, 0x0003F69F, 0x00000003, 0x0003F484, + // Block 178, offset 0x2c80 + 0x0062C484, 0x0003F69F, 0x00000003, 0x0003F484, 0x0062C884, 0x0003F69F, + 0x00000003, 0x0003F484, 0x0062CA84, 0x0003F69F, 0x00000003, 0x0003F484, + 0x0062CC84, 0x0003F69F, 0x00000003, 0x0003F484, 0x0062CE84, 0x0003F69F, + 0x00000003, 0x0003F484, 0x0062D084, 0x0003F69F, 0x00000003, 0x0003F484, + 0x029C0084, 0x0003F69F, 0x00000003, 0x0003F484, 0x029C0684, 0x0003F69F, + 0x00000003, 0x0003F484, 0x029C1284, 0x0003F69F, 0x00000003, 0x0003F484, + 0x029CBA84, 0x0003F69F, 0x00000003, 0x0003F484, 0x029D1884, 0x0003F69F, + 0x00000003, 0x0003F484, 0x029D2884, 0x0003F69F, 0x00000003, 0x0003F484, + 0x029DC684, 0x0003F69F, 0x00000003, 0x0003F484, 0x029E0284, 0x0003F69F, + 0x00000003, 0x0003F484, 0x029E2284, 0x0003F69F, 0x00000003, 0x0003F484, + 0x02A2D684, 0x0003F69F, 0x00000003, 0x0003F484, + // Block 179, offset 0x2cc0 + 0x02A2DA84, 0x0003F69F, 0x00000003, 0x0003F484, 0x02A56884, 0x0003F69F, + 0x00000003, 0x0003F484, 0x02A68284, 0x0003F69F, 0x00000003, 0x0003F484, + 0x02A6A884, 0x0003F69F, 0x00000003, 0x0003F484, 0x02A81A84, 0x0003F69F, + 0x00000003, 0x0003F484, 0x02A8F884, 0x0003F69F, 0x00000003, 0x0003F484, + 0x02ADB684, 0x0003F69F, 0x00000003, 0x0003F484, 0x02AE3E84, 0x0003F69F, + 0x00000003, 0x0003F484, 0x02B6CC84, 0x0003F69F, 0x00000003, 0x0003F484, + 0x02CBCA84, 0x0003F69F, 0x00000003, 0x0003F484, 0x02CE1084, 0x0003F69F, + 0x00000003, 0x0003F484, 0x02CE1284, 0x0003F69F, 0x00000003, 0x0003F484, + 0x02CE5084, 0x0003F69F, 0x00000003, 0x0003F484, 0x02D05484, 0x0003F69F, + 0x00000003, 0x0003F484, 0x02D86884, 0x0003F69F, 0x00000003, 0x0003F484, + 0x02E0D684, 0x0003F69F, 0x00000003, 0x0003F484, + // Block 180, offset 0x2d00 + 0x02E4F284, 0x0003F69F, 0x00000003, 0x0003F484, 0x02EDC684, 0x0003F69F, + 0x00000003, 0x0003F484, 0x02F27C84, 0x0003F69F, 0x00000003, 0x0003F484, + 0x02F2BA84, 0x0003F69F, 0x00000003, 0x0003F484, 0x02F2DA84, 0x0003F69F, + 0x00000003, 0x0003F484, 0x0303D484, 0x0003F69F, 0x00000003, 0x0003F484, + 0x0303E684, 0x0003F69F, 0x00000003, 0x0003F484, 0x03194284, 0x0003F69F, + 0x00000003, 0x0003F484, 0x03198E84, 0x0003F69F, 0x00000003, 0x0003F484, + 0x0323A284, 0x0003F69F, 0x00000002, 0x00070484, 0x002C3A8A, 0x00000002, + 0x00070484, 0x002D088A, 0x00000002, 0x00094284, 0x0009429F, 0x00000003, + 0x00094284, 0x00094284, 0x0009429F, 0x00000002, 0x0029CC84, 0x0002409F, + 0x00000002, 0x0029CC84, 0x0002E49F, 0x00000002, 0x0029CC84, 0x02E1729F, + 0x00000002, 0x0029CE84, 0x0002409F, 0x00000002, + // Block 181, offset 0x2d40 + 0x0029CE84, 0x0002E49F, 0x00000002, 0x0029CE9E, 0x0009589E, 0x00000002, + 0x0029CE86, 0x0029CC86, 0x00000003, 0x0029CE84, 0x0029CC84, 0x0002E49F, + 0x00000003, 0x0029CE84, 0x0029CC84, 0x02CBCA9F, 0x00000003, 0x0029CE84, + 0x0029CC84, 0x02CE109F, 0x00000003, 0x0029CE84, 0x0029CC84, 0x02E1729F, + 0x00000002, 0x0029CE86, 0x0029CE86, 0x00000003, 0x0029CE84, 0x0029CE84, + 0x0002E49F, 0x00000003, 0x0029CE84, 0x0029CE84, 0x02CBCA9F, 0x00000003, + 0x0029CE84, 0x0029CE84, 0x02CE109F, 0x00000003, 0x0029CE84, 0x0029CE84, + 0x02E1729F, 0x00000002, 0x0029CE86, 0x0029D086, 0x00000003, 0x0029CE84, + 0x0029D084, 0x0002E49F, 0x00000003, 0x0029CE84, 0x0029D084, 0x02CBCA9F, + 0x00000003, 0x0029CE84, 0x0029D084, 0x02CE109F, 0x00000003, 0x0029CE84, + 0x0029D084, 0x02E1729F, 0x00000002, 0x0029CE86, + // Block 182, offset 0x2d80 + 0x0029D286, 0x00000003, 0x0029CE84, 0x0029D284, 0x0002E49F, 0x00000003, + 0x0029CE84, 0x0029D284, 0x02CBCA9F, 0x00000003, 0x0029CE84, 0x0029D284, + 0x02E1729F, 0x00000002, 0x0029CE86, 0x0029D486, 0x00000003, 0x0029CE84, + 0x0029D484, 0x0002E49F, 0x00000003, 0x0029CE84, 0x0029D484, 0x02CBCA9F, + 0x00000003, 0x0029CE84, 0x0029D484, 0x02E1729F, 0x00000002, 0x0029CE86, + 0x0029D686, 0x00000003, 0x0029CE84, 0x0029D684, 0x0002E49F, 0x00000003, + 0x0029CE84, 0x0029D684, 0x02CBCA9F, 0x00000003, 0x0029CE84, 0x0029D684, + 0x02E1729F, 0x00000002, 0x0029CE86, 0x0029D886, 0x00000003, 0x0029CE84, + 0x0029D884, 0x0002E49F, 0x00000003, 0x0029CE84, 0x0029D884, 0x02CBCA9F, + 0x00000003, 0x0029CE84, 0x0029D884, 0x02E1729F, 0x00000002, 0x0029CE86, + 0x0029DA86, 0x00000003, 0x0029CE84, 0x0029DA84, + // Block 183, offset 0x2dc0 + 0x0002E49F, 0x00000003, 0x0029CE84, 0x0029DA84, 0x02CBCA9F, 0x00000003, + 0x0029CE84, 0x0029DA84, 0x02E1729F, 0x00000002, 0x0029CE86, 0x0029DC86, + 0x00000003, 0x0029CE84, 0x0029DC84, 0x0002E49F, 0x00000003, 0x0029CE84, + 0x0029DC84, 0x02CBCA9F, 0x00000003, 0x0029CE84, 0x0029DC84, 0x02E1729F, + 0x00000002, 0x0029CE86, 0x0029DE86, 0x00000003, 0x0029CE84, 0x0029DE84, + 0x0002E49F, 0x00000003, 0x0029CE84, 0x0029DE84, 0x02CBCA9F, 0x00000003, + 0x0029CE84, 0x0029DE84, 0x02E1729F, 0x00000002, 0x0029CE84, 0x02CBCA9F, + 0x00000002, 0x0029CE84, 0x02CE109F, 0x00000002, 0x0029CE84, 0x02E1729F, + 0x00000002, 0x0029D084, 0x0002409F, 0x00000002, 0x0029D084, 0x0002E49F, + 0x00000002, 0x0029D086, 0x0029CC86, 0x00000003, 0x0029D084, 0x0029CC84, + 0x0002E49F, 0x00000003, 0x0029D084, 0x0029CC84, + // Block 184, offset 0x2e00 + 0x02CBCA9F, 0x00000003, 0x0029D084, 0x0029CC84, 0x02E1729F, 0x00000002, + 0x0029D086, 0x0029CE86, 0x00000003, 0x0029D084, 0x0029CE84, 0x02CBCA9F, + 0x00000003, 0x0029D084, 0x0029CE84, 0x02E1729F, 0x00000002, 0x0029D086, + 0x0029D086, 0x00000003, 0x0029D084, 0x0029D084, 0x02CBCA9F, 0x00000003, + 0x0029D084, 0x0029D084, 0x02E1729F, 0x00000002, 0x0029D086, 0x0029D286, + 0x00000003, 0x0029D084, 0x0029D284, 0x02CBCA9F, 0x00000003, 0x0029D084, + 0x0029D284, 0x02E1729F, 0x00000002, 0x0029D086, 0x0029D486, 0x00000003, + 0x0029D084, 0x0029D484, 0x02CBCA9F, 0x00000003, 0x0029D084, 0x0029D484, + 0x02E1729F, 0x00000002, 0x0029D086, 0x0029D686, 0x00000003, 0x0029D084, + 0x0029D684, 0x02CBCA9F, 0x00000002, 0x0029D086, 0x0029D886, 0x00000003, + 0x0029D084, 0x0029D884, 0x02CBCA9F, 0x00000002, + // Block 185, offset 0x2e40 + 0x0029D086, 0x0029DA86, 0x00000003, 0x0029D084, 0x0029DA84, 0x02CBCA9F, + 0x00000002, 0x0029D086, 0x0029DC86, 0x00000003, 0x0029D084, 0x0029DC84, + 0x02CBCA9F, 0x00000002, 0x0029D086, 0x0029DE86, 0x00000003, 0x0029D084, + 0x0029DE84, 0x02CBCA9F, 0x00000002, 0x0029D084, 0x02CBCA9F, 0x00000002, + 0x0029D084, 0x02CE109F, 0x00000002, 0x0029D084, 0x02E1729F, 0x00000002, + 0x0029D284, 0x0002409F, 0x00000002, 0x0029D284, 0x0002E49F, 0x00000002, + 0x0029D286, 0x0029CC86, 0x00000003, 0x0029D284, 0x0029CC84, 0x02CBCA9F, + 0x00000002, 0x0029D286, 0x0029CE86, 0x00000003, 0x0029D284, 0x0029CE84, + 0x02CBCA9F, 0x00000002, 0x0029D286, 0x0029D086, 0x00000002, 0x0029D286, + 0x0029D286, 0x00000002, 0x0029D286, 0x0029D486, 0x00000002, 0x0029D286, + 0x0029D686, 0x00000002, 0x0029D286, 0x0029D886, + // Block 186, offset 0x2e80 + 0x00000002, 0x0029D286, 0x0029DA86, 0x00000002, 0x0029D286, 0x0029DC86, + 0x00000002, 0x0029D286, 0x0029DE86, 0x00000002, 0x0029D284, 0x02CBCA9F, + 0x00000002, 0x0029D284, 0x02CE109F, 0x00000002, 0x0029D284, 0x02E1729F, + 0x00000002, 0x0029D484, 0x0002409F, 0x00000002, 0x0029D484, 0x0002E49F, + 0x00000002, 0x0029D486, 0x0029CC86, 0x00000002, 0x0029D486, 0x0029CE86, + 0x00000002, 0x0029D486, 0x0029D086, 0x00000002, 0x0029D486, 0x0029D286, + 0x00000002, 0x0029D486, 0x0029D486, 0x00000002, 0x0029D486, 0x0029D686, + 0x00000002, 0x0029D486, 0x0029D886, 0x00000002, 0x0029D486, 0x0029DA86, + 0x00000002, 0x0029D486, 0x0029DC86, 0x00000002, 0x0029D486, 0x0029DE86, + 0x00000002, 0x0029D484, 0x02CBCA9F, 0x00000002, 0x0029D484, 0x02CE109F, + 0x00000002, 0x0029D484, 0x02E1729F, 0x00000002, + // Block 187, offset 0x2ec0 + 0x0029D684, 0x0002409F, 0x00000002, 0x0029D684, 0x0002E49F, 0x00000002, + 0x0029D686, 0x0029CC86, 0x00000002, 0x0029D684, 0x02CBCA9F, 0x00000002, + 0x0029D684, 0x02CE109F, 0x00000002, 0x0029D684, 0x02E1729F, 0x00000002, + 0x0029D884, 0x0002409F, 0x00000002, 0x0029D884, 0x0002E49F, 0x00000002, + 0x0029D884, 0x02CBCA9F, 0x00000002, 0x0029D884, 0x02CE109F, 0x00000002, + 0x0029D884, 0x02E1729F, 0x00000002, 0x0029DA84, 0x0002409F, 0x00000002, + 0x0029DA84, 0x0002E49F, 0x00000002, 0x0029DA84, 0x02CBCA9F, 0x00000002, + 0x0029DA84, 0x02CE109F, 0x00000002, 0x0029DA84, 0x02E1729F, 0x00000002, + 0x0029DC84, 0x0002409F, 0x00000002, 0x0029DC84, 0x0002E49F, 0x00000002, + 0x0029DC84, 0x02CBCA9F, 0x00000002, 0x0029DC84, 0x02CE109F, 0x00000002, + 0x0029DC84, 0x02E1729F, 0x00000002, 0x0029DE84, + // Block 188, offset 0x2f00 + 0x0002409F, 0x00000002, 0x0029DE84, 0x0002E49F, 0x00000002, 0x0029DE84, + 0x02CBCA9F, 0x00000002, 0x0029DE84, 0x02CE109F, 0x00000002, 0x0029DE84, + 0x02E1729F, 0x00000002, 0x002BDE9D, 0x00306C9D, 0x00000002, 0x002BDE84, + 0x0031E284, 0x00000002, 0x402C1820, 0xA0105402, 0x00000002, 0x402C1A20, + 0xA0105402, 0x00000002, 0x402C1C20, 0xA0105402, 0x00000002, 0x402C2220, + 0xAE603202, 0x00000002, 0x402C2220, 0xAE603502, 0x00000002, 0x402C2220, + 0xAE603702, 0x00000003, 0x402C2220, 0xAE603702, 0xAE603202, 0x00000003, + 0x402C2220, 0xAE603702, 0xAE603502, 0x00000003, 0x402C2220, 0xAE603702, + 0xAE604E02, 0x00000003, 0x402C2220, 0xAE603702, 0xAE606402, 0x00000002, + 0x402C2220, 0xAE603C02, 0x00000003, 0x402C2220, 0xAE603C02, 0xAE603202, + 0x00000003, 0x402C2220, 0xAE603C02, 0xAE603502, + // Block 189, offset 0x2f40 + 0x00000003, 0x402C2220, 0xAE603C02, 0xAE604E02, 0x00000003, 0x402C2220, + 0xAE603C02, 0xAE606402, 0x00000002, 0x402C2220, 0xAE604102, 0x00000002, + 0x402C2220, 0xAE604302, 0x00000003, 0x402C2220, 0xAE604302, 0xAE603202, + 0x00000002, 0x402C2220, 0xAE604702, 0x00000003, 0x402C2220, 0xAE604702, + 0xAE605B02, 0x00000002, 0x402C2220, 0xAE604E02, 0x00000002, 0x402C2220, + 0xAE605202, 0x00000003, 0x402C2220, 0xAE605202, 0xAE605B02, 0x00000002, + 0x402C2220, 0xACA05902, 0x00000002, 0x402C2220, 0xAE605B02, 0x00000002, + 0x402C2220, 0xAE606402, 0x00000002, 0x402C2220, 0xAE606502, 0x00000002, + 0x402C2220, 0xAE606702, 0x00000002, 0x402C2220, 0xADC07002, 0x00000003, + 0x402C2220, 0xADC07002, 0xAE603702, 0x00000003, 0x402C2220, 0xADC07002, + 0xAE603C02, 0x00000002, 0x402C2220, 0xADC07602, + // Block 190, offset 0x2f80 + 0x00000002, 0x402C2420, 0xAE605202, 0x00000002, 0x402C2420, 0xADC07002, + 0x00000002, 0x402C2420, 0xADC07B02, 0x00000002, 0x402C2620, 0xAE603202, + 0x00000002, 0x402C2620, 0xAE603C02, 0x00000002, 0x402C2620, 0xAE604102, + 0x00000002, 0x402C2620, 0xAE605202, 0x00000002, 0x402C2620, 0xACA05602, + 0x00000003, 0x402C2620, 0xACA05602, 0xAE603202, 0x00000002, 0x402C2820, + 0xAE604102, 0x00000002, 0x402C2820, 0xAE605202, 0x00000002, 0x402C2820, + 0xACA05602, 0x00000002, 0x402C2820, 0xADC07002, 0x00000002, 0x402C2820, + 0xADC07802, 0x00000002, 0x402C2820, 0xADC07B02, 0x00000002, 0x402C2A20, + 0xAE603202, 0x00000002, 0x402C2A20, 0xAE603502, 0x00000002, 0x402C2A20, + 0xAE603702, 0x00000002, 0x402C2A20, 0xAE603C02, 0x00000003, 0x402C2A20, + 0xAE603C02, 0xAE603202, 0x00000003, 0x402C2A20, + // Block 191, offset 0x2fc0 + 0xAE603C02, 0xAE603502, 0x00000003, 0x402C2A20, 0xAE603C02, 0xAE604E02, + 0x00000003, 0x402C2A20, 0xAE603C02, 0xAE606402, 0x00000002, 0x402C2A20, + 0xAE604102, 0x00000002, 0x402C2A20, 0xAE604702, 0x00000002, 0x402C2A20, + 0xAE604E02, 0x00000002, 0x402C2A20, 0xAE605202, 0x00000002, 0x402C2A20, + 0xACA05602, 0x00000003, 0x402C2A20, 0xACA05602, 0xAE603702, 0x00000002, + 0x402C2A20, 0xACA05902, 0x00000002, 0x402C2A20, 0xAE605B02, 0x00000003, + 0x402C2A20, 0xAE605B02, 0xAE603202, 0x00000003, 0x402C2A20, 0xAE605B02, + 0xAE603502, 0x00000002, 0x402C2A20, 0xAE606402, 0x00000002, 0x402C2A20, + 0xAE606502, 0x00000002, 0x402C2A20, 0xAE606702, 0x00000002, 0x402C2A20, + 0xADC07002, 0x00000003, 0x402C2A20, 0xADC07002, 0xAE603C02, 0x00000002, + 0x402C2A20, 0xADC07802, 0x00000002, 0x402C2A20, + // Block 192, offset 0x3000 + 0xADC07A02, 0x00000002, 0x402C2C20, 0xAE605202, 0x00000002, 0x402C2E20, + 0xAE603202, 0x00000002, 0x402C2E20, 0xAE603702, 0x00000002, 0x402C2E20, + 0xAE603C02, 0x00000002, 0x402C2E20, 0xAE604102, 0x00000002, 0x402C2E20, + 0xAE605202, 0x00000002, 0x402C2E20, 0xACA05602, 0x00000002, 0x402C2E20, + 0xAE605B02, 0x00000002, 0x402C3020, 0xAE603C02, 0x00000002, 0x402C3020, + 0xAE604102, 0x00000002, 0x402C3020, 0xAE604702, 0x00000002, 0x402C3020, + 0xAE605202, 0x00000002, 0x402C3020, 0xACA05602, 0x00000002, 0x402C3020, + 0xADC07002, 0x00000002, 0x402C3020, 0xADC07902, 0x00000002, 0x402C3220, + 0xAE603202, 0x00000002, 0x402C3220, 0xAE603502, 0x00000002, 0x402C3220, + 0xAE603702, 0x00000002, 0x402C3220, 0xAE603C02, 0x00000002, 0x402C3220, + 0xAE604102, 0x00000002, 0x402C3220, 0xAE604702, + // Block 193, offset 0x3040 + 0x00000003, 0x402C3220, 0xAE604702, 0xAE603202, 0x00000002, 0x402C3220, + 0xAE604E02, 0x00000002, 0x402C3220, 0xAE605202, 0x00000002, 0x402C3220, + 0xACA05902, 0x00000002, 0x402C3220, 0xAE605B02, 0x00000002, 0x402C3220, + 0xAE606402, 0x00000002, 0x402C3220, 0xAE606502, 0x00000002, 0x402C3220, + 0xAE606702, 0x00000002, 0x402C3220, 0xADC07002, 0x00000002, 0x402C3220, + 0xADC07A02, 0x00000002, 0x402C3420, 0xAE603C02, 0x00000002, 0x402C3620, + 0xAE603202, 0x00000002, 0x402C3620, 0xAE604102, 0x00000002, 0x402C3620, + 0xACA05602, 0x00000002, 0x402C3620, 0xADC07002, 0x00000002, 0x402C3620, + 0xADC07B02, 0x00000002, 0x402C3820, 0xAE603202, 0x00000002, 0x402C3820, + 0xAE604102, 0x00000002, 0x402C3820, 0xACA05602, 0x00000002, 0x402C3820, + 0xADC07002, 0x00000003, 0x402C3820, 0xADC07002, + // Block 194, offset 0x3080 + 0xAE605B02, 0x00000002, 0x402C3820, 0xADC07802, 0x00000002, 0x402C3820, + 0xADC07B02, 0x00000002, 0x402C3A20, 0xAE603202, 0x00000002, 0x402C3A20, + 0xAE605202, 0x00000002, 0x402C3A20, 0xADC07002, 0x00000002, 0x002C3A9C, + 0x002C3A9C, 0x00000002, 0x002C3A8C, 0x002C628C, 0x00000002, 0x002C3A9C, + 0x002C629C, 0x00000002, 0x002C3A9C, 0x002E829C, 0x00000002, 0x402C3C20, + 0xAE603202, 0x00000002, 0x402C3C20, 0xAE603502, 0x00000002, 0x402C3C20, + 0xAE604102, 0x00000002, 0x402C3C20, 0xAE604E02, 0x00000002, 0x402C3C20, + 0xAE605202, 0x00000002, 0x402C3C20, 0xACA05602, 0x00000002, 0x402C3C20, + 0xADC07002, 0x00000002, 0x402C3C20, 0xADC07802, 0x00000002, 0x402C3C20, + 0xADC07B02, 0x00000002, 0x402C3E20, 0xAE603202, 0x00000002, 0x402C3E20, + 0xAE603502, 0x00000002, 0x402C3E20, 0xAE603702, + // Block 195, offset 0x30c0 + 0x00000002, 0x402C3E20, 0xAE603C02, 0x00000003, 0x402C3E20, 0xAE603C02, + 0xAE603202, 0x00000003, 0x402C3E20, 0xAE603C02, 0xAE603502, 0x00000003, + 0x402C3E20, 0xAE603C02, 0xAE604E02, 0x00000003, 0x402C3E20, 0xAE603C02, + 0xAE606402, 0x00000002, 0x402C3E20, 0xAE604102, 0x00000002, 0x402C3E20, + 0xAE604702, 0x00000003, 0x402C3E20, 0xAE604702, 0xAE605B02, 0x00000002, + 0x402C3E20, 0xAE604D02, 0x00000002, 0x402C3E20, 0xAE604E02, 0x00000003, + 0x402C3E20, 0xAE604E02, 0xAE603202, 0x00000003, 0x402C3E20, 0xAE604E02, + 0xAE604702, 0x00000003, 0x402C3E20, 0xAE604E02, 0xAE605B02, 0x00000002, + 0x402C3E20, 0xAE605202, 0x00000003, 0x402C3E20, 0xAE605202, 0xAE605B02, + 0x00000002, 0x402C3E20, 0xACA05902, 0x00000003, 0x402C3E20, 0xACA05902, + 0xAE605B02, 0x00000002, 0x402C3E20, 0xAE605B02, + // Block 196, offset 0x3100 + 0x00000003, 0x402C3E20, 0xAE605B02, 0xAE603202, 0x00000003, 0x402C3E20, + 0xAE605B02, 0xAE603502, 0x00000002, 0x402C3E20, 0xAE606402, 0x00000002, + 0x402C3E20, 0xAE606502, 0x00000002, 0x402C3E20, 0xAE606702, 0x00000002, + 0x402C3E20, 0xAD806802, 0x00000003, 0x402C3E20, 0xAD806802, 0xAE603202, + 0x00000003, 0x402C3E20, 0xAD806802, 0xAE603502, 0x00000003, 0x402C3E20, + 0xAD806802, 0xAE604E02, 0x00000003, 0x402C3E20, 0xAD806802, 0xAE606402, + 0x00000003, 0x402C3E20, 0xAD806802, 0xADC07002, 0x00000002, 0x402C3E20, + 0xADC07002, 0x00000003, 0x402C3E20, 0xADC07002, 0xAE603C02, 0x00000002, + 0x402C4020, 0xAE603202, 0x00000002, 0x402C4020, 0xAE605202, 0x00000002, + 0x402C4420, 0xAE603202, 0x00000002, 0x402C4420, 0xAE604102, 0x00000002, + 0x402C4420, 0xAE605202, 0x00000002, 0x402C4420, + // Block 197, offset 0x3140 + 0xACA05602, 0x00000002, 0x402C4420, 0xAE606502, 0x00000002, 0x402C4420, + 0xAE606702, 0x00000002, 0x402C4420, 0xADC07002, 0x00000003, 0x402C4420, + 0xADC07002, 0xAE605B02, 0x00000002, 0x402C4420, 0xADC07B02, 0x00000002, + 0x402C4620, 0xAE603202, 0x00000003, 0x402C4620, 0xAE603202, 0xAE605202, + 0x00000002, 0x402C4620, 0xAE603C02, 0x00000002, 0x402C4620, 0xAE604102, + 0x00000003, 0x402C4620, 0xAE604102, 0xAE605202, 0x00000002, 0x402C4620, + 0xAE605202, 0x00000002, 0x402C4620, 0xACA05602, 0x00000002, 0x402C4620, + 0xADC07002, 0x00000003, 0x402C4620, 0xADC07002, 0xAE605202, 0x00000002, + 0x402C4620, 0xADC07702, 0x00000002, 0x402C4820, 0xAE604102, 0x00000002, + 0x402C4820, 0xAE605202, 0x00000002, 0x402C4820, 0xACA05602, 0x00000002, + 0x402C4820, 0xADC07002, 0x00000002, 0x402C4820, + // Block 198, offset 0x3180 + 0xADC07702, 0x00000002, 0x402C4820, 0xADC07802, 0x00000002, 0x402C4820, + 0xADC07B02, 0x00000002, 0x402C4A20, 0xAE603202, 0x00000002, 0x402C4A20, + 0xAE603502, 0x00000002, 0x402C4A20, 0xAE603702, 0x00000002, 0x402C4A20, + 0xAE603C02, 0x00000002, 0x402C4A20, 0xAE604102, 0x00000002, 0x402C4A20, + 0xAE604302, 0x00000002, 0x402C4A20, 0xAE604702, 0x00000003, 0x402C4A20, + 0xAE604702, 0xAE603202, 0x00000003, 0x402C4A20, 0xAE604702, 0xAE603502, + 0x00000003, 0x402C4A20, 0xAE604702, 0xAE604102, 0x00000003, 0x402C4A20, + 0xAE604702, 0xAE605B02, 0x00000002, 0x402C4A20, 0xAE604D02, 0x00000002, + 0x402C4A20, 0xAE604E02, 0x00000003, 0x402C4A20, 0xAE604E02, 0xAE603202, + 0x00000002, 0x402C4A20, 0xACA05902, 0x00000002, 0x402C4A20, 0xAE605B02, + 0x00000003, 0x402C4A20, 0xAE605B02, 0xAE604702, + // Block 199, offset 0x31c0 + 0x00000002, 0x402C4A20, 0xAE606402, 0x00000002, 0x402C4A20, 0xAE606502, + 0x00000002, 0x402C4A20, 0xAE606702, 0x00000002, 0x402C4A20, 0xAD806802, + 0x00000003, 0x402C4A20, 0xAD806802, 0xAE603202, 0x00000003, 0x402C4A20, + 0xAD806802, 0xAE603502, 0x00000003, 0x402C4A20, 0xAD806802, 0xAE604E02, + 0x00000003, 0x402C4A20, 0xAD806802, 0xAE606402, 0x00000003, 0x402C4A20, + 0xAD806802, 0xADC07002, 0x00000002, 0x402C4A20, 0xADC07002, 0x00000002, + 0x402C4A20, 0xADC07502, 0x00000002, 0x402C4A20, 0xADC07802, 0x00000002, + 0x402C4A20, 0xADC07A02, 0x00000002, 0x402C4C20, 0xAE604E02, 0x00000002, + 0x402C4C20, 0xADC07002, 0x00000002, 0x402C4E20, 0xAE603202, 0x00000002, + 0x402C4E20, 0xAE603502, 0x00000002, 0x402C4E20, 0xAE603C02, 0x00000002, + 0x402C4E20, 0xAE604702, 0x00000002, 0x402C4E20, + // Block 200, offset 0x3200 + 0xAE605202, 0x00000002, 0x402C4E20, 0xADC07002, 0x00000002, 0x402C5020, + 0xAE604702, 0x00000002, 0x402C5020, 0xAE605202, 0x00000002, 0x402C5220, + 0xAE603202, 0x00000002, 0x402C5220, 0xAE603502, 0x00000002, 0x402C5220, + 0xAE603C02, 0x00000002, 0x402C5220, 0xAE604702, 0x00000002, 0x402C5220, + 0xAE604E02, 0x00000002, 0x402C5220, 0xAE605202, 0x00000002, 0x402C5220, + 0xAE605B02, 0x00000002, 0x402C5220, 0xAE606402, 0x00000002, 0x402C5220, + 0xADC07002, 0x00000002, 0x402C5420, 0xAE603202, 0x00000002, 0x402C5420, + 0xAE603C02, 0x00000002, 0x402C5420, 0xAE604102, 0x00000002, 0x402C5420, + 0xAE605202, 0x00000002, 0x402C5420, 0xADC07002, 0x00000002, 0x402C5420, + 0xADC07B02, 0x00000002, 0x402C6220, 0xAE603202, 0x00000002, 0x402C6220, + 0xAE603502, 0x00000002, 0x402C6220, 0xAE603702, + // Block 201, offset 0x3240 + 0x00000003, 0x402C6220, 0xAE603702, 0xAE603202, 0x00000003, 0x402C6220, + 0xAE603702, 0xAE603502, 0x00000003, 0x402C6220, 0xAE603702, 0xAE604E02, + 0x00000003, 0x402C6220, 0xAE603702, 0xAE606402, 0x00000002, 0x402C6220, + 0xAE603C02, 0x00000003, 0x402C6220, 0xAE603C02, 0xAE603202, 0x00000003, + 0x402C6220, 0xAE603C02, 0xAE603502, 0x00000003, 0x402C6220, 0xAE603C02, + 0xAE604E02, 0x00000003, 0x402C6220, 0xAE603C02, 0xAE606402, 0x00000002, + 0x402C6220, 0xAE604102, 0x00000002, 0x402C6220, 0xAE604302, 0x00000003, + 0x402C6220, 0xAE604302, 0xAE603202, 0x00000002, 0x402C6220, 0xAE604702, + 0x00000003, 0x402C6220, 0xAE604702, 0xAE605B02, 0x00000002, 0x402C6220, + 0xAE604E02, 0x00000002, 0x402C6220, 0xAE605202, 0x00000003, 0x402C6220, + 0xAE605202, 0xAE605B02, 0x00000002, 0x402C6220, + // Block 202, offset 0x3280 + 0xACA05902, 0x00000002, 0x402C6220, 0xAE605B02, 0x00000002, 0x402C6220, + 0xAE606402, 0x00000002, 0x402C6220, 0xAE606502, 0x00000002, 0x402C6220, + 0xAE606702, 0x00000002, 0x402C6220, 0xADC07002, 0x00000003, 0x402C6220, + 0xADC07002, 0xAE603702, 0x00000003, 0x402C6220, 0xADC07002, 0xAE603C02, + 0x00000002, 0x402C6220, 0xADC07602, 0x00000002, 0x002C629C, 0x002BDE9C, + 0x00000002, 0x002C629C, 0x002C0A9D, 0x00000002, 0x002C629D, 0x002DCC9D, + 0x00000002, 0x002C629C, 0x002E229C, 0x00000002, 0x002C629C, 0x002E829C, + 0x00000002, 0x002C6284, 0x00312A84, 0x00000002, 0x002C628A, 0x00312A84, + 0x00000002, 0x002C628A, 0x00312A8A, 0x00000002, 0x402C6420, 0xAE605202, + 0x00000002, 0x402C6420, 0xADC07002, 0x00000002, 0x402C6420, 0xADC07B02, + 0x00000002, 0x402C6620, 0xAE603202, 0x00000002, + // Block 203, offset 0x32c0 + 0x402C6620, 0xAE603C02, 0x00000002, 0x402C6620, 0xAE604102, 0x00000002, + 0x402C6620, 0xAE605202, 0x00000002, 0x402C6620, 0xACA05602, 0x00000003, + 0x402C6620, 0xACA05602, 0xAE603202, 0x00000002, 0x402C6820, 0xAE604102, + 0x00000002, 0x402C6820, 0xAE605202, 0x00000002, 0x402C6820, 0xACA05602, + 0x00000002, 0x402C6820, 0xADC07002, 0x00000002, 0x402C6820, 0xADC07802, + 0x00000002, 0x402C6820, 0xADC07B02, 0x00000002, 0x402C6A20, 0xAE603202, + 0x00000002, 0x402C6A20, 0xAE603502, 0x00000002, 0x402C6A20, 0xAE603702, + 0x00000002, 0x402C6A20, 0xAE603C02, 0x00000003, 0x402C6A20, 0xAE603C02, + 0xAE603202, 0x00000003, 0x402C6A20, 0xAE603C02, 0xAE603502, 0x00000003, + 0x402C6A20, 0xAE603C02, 0xAE604E02, 0x00000003, 0x402C6A20, 0xAE603C02, + 0xAE606402, 0x00000002, 0x402C6A20, 0xAE604102, + // Block 204, offset 0x3300 + 0x00000002, 0x402C6A20, 0xAE604702, 0x00000002, 0x402C6A20, 0xAE604E02, + 0x00000002, 0x402C6A20, 0xAE605202, 0x00000002, 0x402C6A20, 0xACA05602, + 0x00000003, 0x402C6A20, 0xACA05602, 0xAE603702, 0x00000002, 0x402C6A20, + 0xACA05902, 0x00000002, 0x402C6A20, 0xAE605B02, 0x00000003, 0x402C6A20, + 0xAE605B02, 0xAE603202, 0x00000003, 0x402C6A20, 0xAE605B02, 0xAE603502, + 0x00000002, 0x402C6A20, 0xAE606402, 0x00000002, 0x402C6A20, 0xAE606502, + 0x00000002, 0x402C6A20, 0xAE606702, 0x00000002, 0x402C6A20, 0xADC07002, + 0x00000003, 0x402C6A20, 0xADC07002, 0xAE603C02, 0x00000002, 0x402C6A20, + 0xADC07802, 0x00000002, 0x402C6A20, 0xADC07A02, 0x00000002, 0x402C6C20, + 0xAE605202, 0x00000002, 0x402C6E20, 0xAE603202, 0x00000002, 0x402C6E20, + 0xAE603702, 0x00000002, 0x402C6E20, 0xAE603C02, + // Block 205, offset 0x3340 + 0x00000002, 0x402C6E20, 0xAE604102, 0x00000002, 0x402C6E20, 0xAE605202, + 0x00000002, 0x402C6E20, 0xACA05602, 0x00000002, 0x402C6E20, 0xAE605B02, + 0x00000002, 0x402C7020, 0xAE603C02, 0x00000002, 0x402C7020, 0xAE604102, + 0x00000002, 0x402C7020, 0xAE604702, 0x00000002, 0x402C7020, 0xAE605202, + 0x00000002, 0x402C7020, 0xACA05602, 0x00000002, 0x402C7020, 0xADC07002, + 0x00000002, 0x402C7020, 0xADC07902, 0x00000002, 0x402C7020, 0xADC07B02, + 0x00000002, 0x402C7220, 0xAE603202, 0x00000002, 0x402C7220, 0xAE603502, + 0x00000002, 0x402C7220, 0xAE603702, 0x00000002, 0x402C7220, 0xAE603C02, + 0x00000002, 0x402C7220, 0xAE604102, 0x00000002, 0x402C7220, 0xAE604702, + 0x00000003, 0x402C7220, 0xAE604702, 0xAE603202, 0x00000002, 0x402C7220, + 0xAE604E02, 0x00000002, 0x402C7220, 0xACA05902, + // Block 206, offset 0x3380 + 0x00000002, 0x402C7220, 0xAE605B02, 0x00000002, 0x402C7220, 0xAE606402, + 0x00000002, 0x402C7220, 0xAE606502, 0x00000002, 0x402C7220, 0xAE606702, + 0x00000002, 0x402C7220, 0xADC07002, 0x00000002, 0x402C7220, 0xADC07A02, + 0x00000002, 0x402C7420, 0xAE603C02, 0x00000002, 0x402C7420, 0xAE604102, + 0x00000002, 0x402C7620, 0xAE603202, 0x00000002, 0x402C7620, 0xAE604102, + 0x00000002, 0x402C7620, 0xACA05602, 0x00000002, 0x402C7620, 0xADC07002, + 0x00000002, 0x402C7620, 0xADC07B02, 0x00000002, 0x402C7820, 0xAE603202, + 0x00000002, 0x402C7820, 0xAE604102, 0x00000002, 0x402C7820, 0xACA05602, + 0x00000002, 0x402C7820, 0xADC07002, 0x00000003, 0x402C7820, 0xADC07002, + 0xAE605B02, 0x00000002, 0x402C7820, 0xADC07802, 0x00000002, 0x402C7820, + 0xADC07B02, 0x00000002, 0x402C7A20, 0xAE603202, + // Block 207, offset 0x33c0 + 0x00000002, 0x402C7A20, 0xAE605202, 0x00000002, 0x402C7A20, 0xADC07002, + 0x00000002, 0x402C7C20, 0xAE603202, 0x00000002, 0x402C7C20, 0xAE603502, + 0x00000002, 0x402C7C20, 0xAE604102, 0x00000002, 0x402C7C20, 0xAE604E02, + 0x00000002, 0x402C7C20, 0xAE605202, 0x00000002, 0x402C7C20, 0xACA05602, + 0x00000002, 0x402C7C20, 0xADC07002, 0x00000002, 0x402C7C20, 0xADC07802, + 0x00000002, 0x402C7C20, 0xADC07B02, 0x00000002, 0x402C7E20, 0xAE603202, + 0x00000002, 0x402C7E20, 0xAE603502, 0x00000002, 0x402C7E20, 0xAE603702, + 0x00000002, 0x402C7E20, 0xAE603C02, 0x00000003, 0x402C7E20, 0xAE603C02, + 0xAE603202, 0x00000003, 0x402C7E20, 0xAE603C02, 0xAE603502, 0x00000003, + 0x402C7E20, 0xAE603C02, 0xAE604E02, 0x00000003, 0x402C7E20, 0xAE603C02, + 0xAE606402, 0x00000002, 0x402C7E20, 0xAE604102, + // Block 208, offset 0x3400 + 0x00000002, 0x402C7E20, 0xAE604702, 0x00000003, 0x402C7E20, 0xAE604702, + 0xAE605B02, 0x00000002, 0x402C7E20, 0xAE604D02, 0x00000002, 0x402C7E20, + 0xAE604E02, 0x00000003, 0x402C7E20, 0xAE604E02, 0xAE603202, 0x00000003, + 0x402C7E20, 0xAE604E02, 0xAE604702, 0x00000003, 0x402C7E20, 0xAE604E02, + 0xAE605B02, 0x00000002, 0x402C7E20, 0xAE605202, 0x00000003, 0x402C7E20, + 0xAE605202, 0xAE605B02, 0x00000002, 0x402C7E20, 0xACA05902, 0x00000003, + 0x402C7E20, 0xACA05902, 0xAE605B02, 0x00000002, 0x402C7E20, 0xAE605B02, + 0x00000003, 0x402C7E20, 0xAE605B02, 0xAE603202, 0x00000003, 0x402C7E20, + 0xAE605B02, 0xAE603502, 0x00000002, 0x402C7E20, 0xAE606402, 0x00000002, + 0x402C7E20, 0xAE606502, 0x00000002, 0x402C7E20, 0xAE606702, 0x00000002, + 0x402C7E20, 0xAD806802, 0x00000003, 0x402C7E20, + // Block 209, offset 0x3440 + 0xAD806802, 0xAE603202, 0x00000003, 0x402C7E20, 0xAD806802, 0xAE603502, + 0x00000003, 0x402C7E20, 0xAD806802, 0xAE604E02, 0x00000003, 0x402C7E20, + 0xAD806802, 0xAE606402, 0x00000003, 0x402C7E20, 0xAD806802, 0xADC07002, + 0x00000002, 0x402C7E20, 0xADC07002, 0x00000003, 0x402C7E20, 0xADC07002, + 0xAE603C02, 0x00000002, 0x402C8020, 0xAE603202, 0x00000002, 0x402C8020, + 0xAE605202, 0x00000002, 0x402C8420, 0xAE603202, 0x00000002, 0x402C8420, + 0xAE604102, 0x00000002, 0x402C8420, 0xAE605202, 0x00000002, 0x402C8420, + 0xACA05602, 0x00000002, 0x402C8420, 0xAE606502, 0x00000002, 0x402C8420, + 0xAE606702, 0x00000002, 0x402C8420, 0xADC07002, 0x00000003, 0x402C8420, + 0xADC07002, 0xAE605B02, 0x00000002, 0x402C8420, 0xADC07B02, 0x00000002, + 0x402C8620, 0xAE603202, 0x00000003, 0x402C8620, + // Block 210, offset 0x3480 + 0xAE603202, 0xAE605202, 0x00000002, 0x402C8620, 0xAE603C02, 0x00000002, + 0x402C8620, 0xAE604102, 0x00000003, 0x402C8620, 0xAE604102, 0xAE605202, + 0x00000002, 0x402C8620, 0xAE605202, 0x00000002, 0x402C8620, 0xACA05602, + 0x00000002, 0x402C8620, 0xADC07002, 0x00000003, 0x402C8620, 0xADC07002, + 0xAE605202, 0x00000002, 0x402C8620, 0xADC07702, 0x00000002, 0x402C8820, + 0xAE604102, 0x00000002, 0x402C8820, 0xAE604702, 0x00000002, 0x402C8820, + 0xAE605202, 0x00000002, 0x402C8820, 0xACA05602, 0x00000002, 0x402C8820, + 0xADC07002, 0x00000002, 0x402C8820, 0xADC07702, 0x00000002, 0x402C8820, + 0xADC07802, 0x00000002, 0x402C8820, 0xADC07B02, 0x00000002, 0x402C8A20, + 0xAE603202, 0x00000002, 0x402C8A20, 0xAE603502, 0x00000002, 0x402C8A20, + 0xAE603702, 0x00000002, 0x402C8A20, 0xAE603C02, + // Block 211, offset 0x34c0 + 0x00000002, 0x402C8A20, 0xAE604102, 0x00000002, 0x402C8A20, 0xAE604302, + 0x00000002, 0x402C8A20, 0xAE604702, 0x00000003, 0x402C8A20, 0xAE604702, + 0xAE603202, 0x00000003, 0x402C8A20, 0xAE604702, 0xAE603502, 0x00000003, + 0x402C8A20, 0xAE604702, 0xAE604102, 0x00000003, 0x402C8A20, 0xAE604702, + 0xAE605B02, 0x00000002, 0x402C8A20, 0xAE604D02, 0x00000002, 0x402C8A20, + 0xAE604E02, 0x00000003, 0x402C8A20, 0xAE604E02, 0xAE603202, 0x00000002, + 0x402C8A20, 0xACA05902, 0x00000002, 0x402C8A20, 0xAE605B02, 0x00000003, + 0x402C8A20, 0xAE605B02, 0xAE604702, 0x00000002, 0x402C8A20, 0xAE606402, + 0x00000002, 0x402C8A20, 0xAE606502, 0x00000002, 0x402C8A20, 0xAE606702, + 0x00000002, 0x402C8A20, 0xAD806802, 0x00000003, 0x402C8A20, 0xAD806802, + 0xAE603202, 0x00000003, 0x402C8A20, 0xAD806802, + // Block 212, offset 0x3500 + 0xAE603502, 0x00000003, 0x402C8A20, 0xAD806802, 0xAE604E02, 0x00000003, + 0x402C8A20, 0xAD806802, 0xAE606402, 0x00000003, 0x402C8A20, 0xAD806802, + 0xADC07002, 0x00000002, 0x402C8A20, 0xADC07002, 0x00000002, 0x402C8A20, + 0xADC07502, 0x00000002, 0x402C8A20, 0xADC07802, 0x00000002, 0x402C8A20, + 0xADC07A02, 0x00000002, 0x402C8C20, 0xAE604E02, 0x00000002, 0x402C8C20, + 0xADC07002, 0x00000002, 0x402C8E20, 0xAE603202, 0x00000002, 0x402C8E20, + 0xAE603502, 0x00000002, 0x402C8E20, 0xAE603C02, 0x00000002, 0x402C8E20, + 0xAE604302, 0x00000002, 0x402C8E20, 0xAE604702, 0x00000002, 0x402C8E20, + 0xAE605202, 0x00000002, 0x402C8E20, 0xADC07002, 0x00000002, 0x402C9020, + 0xAE604702, 0x00000002, 0x402C9020, 0xAE605202, 0x00000002, 0x402C9220, + 0xAE603202, 0x00000002, 0x402C9220, 0xAE603502, + // Block 213, offset 0x3540 + 0x00000002, 0x402C9220, 0xAE603C02, 0x00000002, 0x402C9220, 0xAE604302, + 0x00000002, 0x402C9220, 0xAE604702, 0x00000002, 0x402C9220, 0xAE604E02, + 0x00000002, 0x402C9220, 0xAE605202, 0x00000002, 0x402C9220, 0xAE605B02, + 0x00000002, 0x402C9220, 0xAE606402, 0x00000002, 0x402C9220, 0xADC07002, + 0x00000002, 0x402C9420, 0xAE603202, 0x00000002, 0x402C9420, 0xAE603C02, + 0x00000002, 0x402C9420, 0xAE604102, 0x00000002, 0x402C9420, 0xAE605202, + 0x00000002, 0x402C9420, 0xADC07002, 0x00000002, 0x402C9420, 0xADC07B02, + 0x00000002, 0x002D0884, 0x002D0884, 0x00000002, 0x002D0884, 0x002E2284, + 0x00000002, 0x002D089C, 0x002E829C, 0x00000002, 0x002D229D, 0x002C0A9D, + 0x00000002, 0x002D229D, 0x0031009C, 0x00000002, 0x002E2284, 0x002DCC84, + 0x00000002, 0x002E228A, 0x002DCC84, 0x00000002, + // Block 214, offset 0x3580 + 0x002E228A, 0x002DCC8A, 0x00000002, 0x002E229C, 0x002E829C, 0x00000002, + 0x002E229C, 0x002E9E9C, 0x00000002, 0x002E829C, 0x0029D09C, 0x00000002, + 0x002E829C, 0x0029D29C, 0x00000002, 0x002E829C, 0x002BDE9D, 0x00000002, + 0x002E829C, 0x002C0A9C, 0x00000002, 0x002E829D, 0x002C0A9D, 0x00000002, + 0x002E8294, 0x002C3A94, 0x00000002, 0x002E8294, 0x002C6294, 0x00000002, + 0x002E829C, 0x002D229C, 0x00000002, 0x002E829C, 0x002E229C, 0x00000002, + 0x002E829C, 0x002E829C, 0x00000002, 0x002E829C, 0x0030BE9D, 0x00000002, + 0x002E829D, 0x0030BE9D, 0x00000002, 0x002E829D, 0x0030BE9D, 0x00000002, + 0x002E829C, 0x0030E29D, 0x00000002, 0x002E829D, 0x0030E29D, 0x00000002, + 0x002E829D, 0x0032A29D, 0x00000002, 0x002E9E9C, 0x002BDE9D, 0x00000002, + 0x002E9E9C, 0x002D089D, 0x00000002, 0x002E9E84, + // Block 215, offset 0x35c0 + 0x002DCC84, 0x00000002, 0x002E9E8A, 0x002DCC84, 0x00000002, 0x002E9E8A, + 0x002DCC8A, 0x00000002, 0x002E9E9C, 0x002E829C, 0x00000002, 0x002E9E9C, + 0x0030BE9D, 0x00000002, 0x002E9E9C, 0x0030E29D, 0x00000002, 0x002F2C9C, + 0x002BDE9D, 0x00000002, 0x002F2C9D, 0x002BDE9C, 0x00000002, 0x002F2C9C, + 0x002C3A9C, 0x00000002, 0x002F2C9C, 0x002D089D, 0x00000002, 0x002F2C9C, + 0x0030BE9D, 0x00000002, 0x002F2C9C, 0x0030E29D, 0x00000002, 0x0030E29D, + 0x002C0A9C, 0x00000002, 0x0030E29D, 0x002C3A9D, 0x00000002, 0x0030E28C, + 0x00312A8C, 0x00000002, 0x0031DE84, 0x002E9E84, 0x00000002, 0x0032769C, + 0x002BDE9D, 0x00000002, 0x0032769C, 0x002D089D, 0x00000002, 0x0032769C, + 0x002D229C, 0x00000002, 0x0032769C, 0x002E229C, 0x00000002, 0x0032769C, + 0x002E829C, 0x00000002, 0x0032769C, 0x0030BE9D, + // Block 216, offset 0x3600 + 0x00000002, 0x0032769C, 0x0030E29D, 0x00000002, 0x40302620, 0xAE605202, + 0x00000002, 0x00302683, 0xAE605202, 0x00000002, 0x40302820, 0xAE603202, + 0x00000002, 0x00302883, 0xAE603202, 0x00000002, 0x40302820, 0xAE603C02, + 0x00000002, 0x00302883, 0xAE603C02, 0x00000002, 0x40302820, 0xAE605202, + 0x00000002, 0x00302883, 0xAE605202, 0x00000002, 0x40302820, 0xADC07002, + 0x00000002, 0x00302883, 0xADC07002, 0x00000002, 0x40302820, 0xADC07B02, + 0x00000002, 0x00302883, 0xADC07B02, 0x00000002, 0x4030BE21, 0xAE603202, + 0x00000002, 0x0030BEA3, 0xAE603202, 0x00000002, 0x4030BE21, 0xAE603502, + 0x00000002, 0x0030BEA3, 0xAE603502, 0x00000002, 0x4030BE21, 0xAE603C02, + 0x00000002, 0x0030BEA3, 0xAE603C02, 0x00000002, 0x4030BE21, 0xAE604302, + 0x00000002, 0x4030BE21, 0xAE604702, 0x00000002, + // Block 217, offset 0x3640 + 0x0030BEA3, 0xAE604702, 0x00000002, 0x4030BE21, 0xAE605202, 0x00000002, + 0x0030BEA3, 0xAE605202, 0x00000002, 0x4030BE21, 0xADC07002, 0x00000002, + 0x0030BEA3, 0xADC07002, 0x00000002, 0x4030EE20, 0xAE603202, 0x00000002, + 0x0030EE83, 0xAE603202, 0x00000002, 0x4030EE20, 0xAE603C02, 0x00000002, + 0x0030EE83, 0xAE603C02, 0x00000002, 0x4030EE20, 0xAE604702, 0x00000002, + 0x0030EE83, 0xAE604702, 0x00000002, 0x4030EE20, 0xAE605B02, 0x00000002, + 0x0030EE83, 0xAE605B02, 0x00000002, 0x4030EE20, 0xAD806802, 0x00000002, + 0x0030EE83, 0xAD806802, 0x00000002, 0x4030F020, 0xAE605B02, 0x00000002, + 0x0030F083, 0xAE605B02, 0x00000002, 0x4030F220, 0xAE605B02, 0x00000002, + 0x0030F283, 0xAE605B02, 0x00000002, 0x4030F420, 0xAE603202, 0x00000002, + 0x0030F483, 0xAE603202, 0x00000002, 0x4030F420, + // Block 218, offset 0x3680 + 0xAE603502, 0x00000002, 0x0030F483, 0xAE603502, 0x00000002, 0x4030F420, + 0xAE604102, 0x00000002, 0x0030F483, 0xAE604102, 0x00000002, 0x4030F420, + 0xAE605B02, 0x00000002, 0x0030F483, 0xAE605B02, 0x00000002, 0xA000B218, + 0xA000BA18, 0x00000002, 0xA000B618, 0xA000BA18, 0x00000002, 0x00393899, + 0xA000A219, 0x00000002, 0x0039389A, 0xA000A21A, 0x00000002, 0x00393C97, + 0x003A6897, 0x00000002, 0x00393C98, 0x003A6898, 0x00000002, 0x00393C99, + 0x003A9099, 0x00000002, 0x00393C9A, 0x003A909A, 0x00000002, 0x00395697, + 0x003A6897, 0x00000002, 0x00395698, 0x003A6898, 0x00000002, 0x00395699, + 0x003A9099, 0x00000002, 0x0039569A, 0x003A909A, 0x00000002, 0x00395898, + 0x003A6898, 0x00000002, 0x00395899, 0x003A9099, 0x00000002, 0x0039589A, + 0x003A909A, 0x00000002, 0x00396499, 0x003A9099, + // Block 219, offset 0x36c0 + 0x00000002, 0x0039649A, 0x003A909A, 0x00000002, 0x00397299, 0x003A9099, + 0x00000002, 0x0039729A, 0x003A909A, 0x00000002, 0x00397499, 0x003A9099, + 0x00000002, 0x0039749A, 0x003A909A, 0x00000002, 0x0039C697, 0x003A6897, + 0x00000002, 0x0039C698, 0x003A6898, 0x00000002, 0x0039C699, 0x003A9099, + 0x00000002, 0x0039C69A, 0x003A909A, 0x00000002, 0x0039C897, 0x003A6897, + 0x00000002, 0x0039C898, 0x003A6898, 0x00000002, 0x0039C899, 0x003A9099, + 0x00000002, 0x0039C89A, 0x003A909A, 0x00000002, 0x0039DC99, 0x003A9099, + 0x00000002, 0x0039DC9A, 0x003A909A, 0x00000002, 0x0039DE99, 0x003A9099, + 0x00000002, 0x0039DE9A, 0x003A909A, 0x00000002, 0x0039E699, 0x003A9099, + 0x00000002, 0x0039E69A, 0x003A909A, 0x00000002, 0x0039EE99, 0x003A9099, + 0x00000002, 0x0039EE9A, 0x003A909A, 0x00000002, + // Block 220, offset 0x3700 + 0x0039F099, 0x003A9099, 0x00000002, 0x0039F09A, 0x003A909A, 0x00000002, + 0x0039FC99, 0x003A9099, 0x00000002, 0x0039FC9A, 0x003A909A, 0x00000002, + 0x003A1299, 0x003A9099, 0x00000002, 0x003A129A, 0x003A909A, 0x00000002, + 0x003A1A99, 0x00393899, 0x00000002, 0x003A1A9A, 0x0039389A, 0x00000002, + 0x003A1A97, 0x00396497, 0x00000002, 0x003A1A9A, 0x0039649A, 0x00000002, + 0x003A1A97, 0x00397297, 0x00000002, 0x003A1A9A, 0x0039729A, 0x00000002, + 0x003A1A97, 0x00397497, 0x00000002, 0x003A1A9A, 0x0039749A, 0x00000002, + 0x003A1A97, 0x003A4097, 0x00000002, 0x003A1A98, 0x003A4098, 0x00000002, + 0x003A1A99, 0x003A4099, 0x00000002, 0x003A1A9A, 0x003A409A, 0x00000002, + 0x003A1A97, 0x003A4E97, 0x00000002, 0x003A1A98, 0x003A4E98, 0x00000002, + 0x003A1A99, 0x003A4E99, 0x00000002, 0x003A1A9A, + // Block 221, offset 0x3740 + 0x003A4E9A, 0x00000002, 0x003A1A99, 0x003A9099, 0x00000002, 0x003A1A9A, + 0x003A909A, 0x00000002, 0x003A4097, 0x003A6897, 0x00000002, 0x003A4099, + 0x003A9099, 0x00000002, 0x003A409A, 0x003A909A, 0x00000002, 0x003A4E9A, + 0x003A909A, 0x00000002, 0x003A5697, 0x003A6897, 0x00000002, 0x003A5698, + 0x003A6898, 0x00000002, 0x003A5699, 0x003A9099, 0x00000002, 0x003A569A, + 0x003A909A, 0x00000002, 0x003A6897, 0xA000D117, 0x00000002, 0x003A6897, + 0x00396497, 0x00000002, 0x003A689A, 0x0039649A, 0x00000002, 0x003A6897, + 0x003A4E97, 0x00000002, 0x003A689A, 0x003A4E9A, 0x00000002, 0x003A689A, + 0x003A909A, 0x00000002, 0x003A7299, 0xA000BE19, 0x00000002, 0x003A729A, + 0xA000BE1A, 0x00000002, 0x403A8822, 0xAE60BE02, 0x00000002, 0x003A8E99, + 0xA000D119, 0x00000002, 0x003A8E9A, 0xA000D11A, + // Block 222, offset 0x3780 + 0x00000002, 0x003A9084, 0x00391C84, 0x00000002, 0x003A9097, 0x00396497, + 0x00000002, 0x003A909A, 0x0039649A, 0x00000002, 0x003A9097, 0x00397297, + 0x00000002, 0x003A909A, 0x0039729A, 0x00000002, 0x003A9097, 0x00397497, + 0x00000002, 0x003A909A, 0x0039749A, 0x00000002, 0x003A9099, 0x0039A499, + 0x00000002, 0x003A9099, 0x0039A699, 0x00000002, 0x003A9097, 0x003A4E97, + 0x00000002, 0x003A9098, 0x003A4E98, 0x00000002, 0x003A9099, 0x003A4E99, + 0x00000002, 0x003A909A, 0x003A4E9A, 0x00000002, 0x003A9099, 0x003A5699, + 0x00000002, 0x003A9097, 0x003A6897, 0x00000002, 0x003A9098, 0x003A6898, + 0x00000002, 0x003A9099, 0x003A9099, 0x00000002, 0x003A909A, 0x003A909A, + 0x00000002, 0x403A9222, 0xAE60BE02, 0x00000002, 0x003AAA99, 0xA000BE19, + 0x00000002, 0x003AAA9A, 0xA000BE1A, 0x00000002, + // Block 223, offset 0x37c0 + 0x402C6221, 0x40021220, 0x00000002, 0x002C62A3, 0x40021220, 0x00000002, + 0x402D2221, 0x40021220, 0x00000002, 0x002D22A3, 0x40021220, 0x00000002, + 0x402E9E21, 0x40021220, 0x00000002, 0x002E9EA3, 0x40021220, 0x00000002, + 0x40302C21, 0x40021220, 0x00000002, 0x00302CA3, 0x40021220, 0x00000002, + 0x40312A21, 0x40021220, 0x00000002, 0x00312AA3, 0x40021220, 0x00000003, + 0x40312A21, 0x40021220, 0xAE604102, 0x00000003, 0x00312AA3, 0x40021220, + 0xAE604102, 0x00000002, 0x40320E20, 0xAE605B02, 0x00000002, 0x00320E83, + 0xAE605B02, 0x00000002, 0x40320E21, 0xAE603202, 0x00000002, 0x00320EA3, + 0xAE603202, 0x00000002, 0x40321020, 0xAE604E02, 0x00000002, 0x00321083, + 0xAE604E02, 0x00000002, 0x40321020, 0xAE605B02, 0x00000002, 0x00321083, + 0xAE605B02, 0x00000002, 0x40321021, 0xAE603202, + // Block 224, offset 0x3800 + 0x00000002, 0x003210A3, 0xAE603202, 0x00000002, 0x40302C21, 0x402D6820, + 0x00000002, 0x00302CA3, 0x402D6820, 0x00000002, 0x40321023, 0xAE603202, + 0x00000002, 0x003210E3, 0xAE603202, 0x00000002, 0x40321023, 0xAE603C02, + 0x00000002, 0x003210E3, 0xAE603C02, 0x00000002, 0x40321023, 0xAE604702, + 0x00000002, 0x003210E3, 0xAE604702, 0x00000002, 0x40321023, 0xAE605B02, + 0x00000002, 0x003210E3, 0xAE605B02, 0x00000002, 0x40321023, 0xAD806802, + 0x00000002, 0x003210E3, 0xAD806802, 0x00000002, 0x002BDE83, 0xAE603202, + 0x00000002, 0x002BDE83, 0xAE603502, 0x00000002, 0x002BDE83, 0xAE603702, + 0x00000003, 0x002BDE83, 0xAE603702, 0xAE603202, 0x00000003, 0x002BDE83, + 0xAE603702, 0xAE603502, 0x00000003, 0x002BDE83, 0xAE603702, 0xAE604E02, + 0x00000003, 0x002BDE83, 0xAE603702, 0xAE606402, + // Block 225, offset 0x3840 + 0x00000002, 0x002BDE83, 0xAE603C02, 0x00000003, 0x002BDE83, 0xAE603C02, + 0xAE603202, 0x00000003, 0x002BDE83, 0xAE603C02, 0xAE603502, 0x00000003, + 0x002BDE83, 0xAE603C02, 0xAE604E02, 0x00000003, 0x002BDE83, 0xAE603C02, + 0xAE606402, 0x00000002, 0x002BDE83, 0xAE604102, 0x00000002, 0x002BDE83, + 0xAE604302, 0x00000003, 0x002BDE83, 0xAE604302, 0xAE603202, 0x00000002, + 0x002BDE83, 0xAE604702, 0x00000003, 0x002BDE83, 0xAE604702, 0xAE605B02, + 0x00000002, 0x002BDE83, 0xAE604E02, 0x00000002, 0x002BDE83, 0xAE605202, + 0x00000003, 0x002BDE83, 0xAE605202, 0xAE605B02, 0x00000002, 0x002BDE83, + 0xACA05902, 0x00000002, 0x002BDE83, 0xAE605B02, 0x00000002, 0x002BDE83, + 0xAE606402, 0x00000002, 0x002BDE83, 0xAE606502, 0x00000002, 0x002BDE83, + 0xAE606702, 0x00000002, 0x002BDE83, 0xADC07002, + // Block 226, offset 0x3880 + 0x00000003, 0x002BDE83, 0xADC07002, 0xAE603702, 0x00000003, 0x002BDE83, + 0xADC07002, 0xAE603C02, 0x00000002, 0x002BDE83, 0xADC07602, 0x00000002, + 0x402BE020, 0xAE603202, 0x00000002, 0x002BE083, 0xAE603202, 0x00000002, + 0x402BE020, 0xAE603502, 0x00000002, 0x002BE083, 0xAE603502, 0x00000002, + 0x402BE020, 0xAE603702, 0x00000002, 0x002BE083, 0xAE603702, 0x00000002, + 0x402BE020, 0xAE603C02, 0x00000002, 0x002BE083, 0xAE603C02, 0x00000003, + 0x402BE020, 0xAE603C02, 0xAE603202, 0x00000003, 0x002BE083, 0xAE603C02, + 0xAE603202, 0x00000003, 0x402BE020, 0xAE603C02, 0xAE603502, 0x00000003, + 0x002BE083, 0xAE603C02, 0xAE603502, 0x00000003, 0x402BE020, 0xAE603C02, + 0xAE604E02, 0x00000003, 0x002BE083, 0xAE603C02, 0xAE604E02, 0x00000003, + 0x402BE020, 0xAE603C02, 0xAE606402, 0x00000003, + // Block 227, offset 0x38c0 + 0x002BE083, 0xAE603C02, 0xAE606402, 0x00000002, 0x402BE020, 0xAE604102, + 0x00000002, 0x002BE083, 0xAE604102, 0x00000002, 0x402BE020, 0xAE604702, + 0x00000002, 0x002BE083, 0xAE604702, 0x00000002, 0x402BE020, 0xAE604E02, + 0x00000002, 0x002BE083, 0xAE604E02, 0x00000002, 0x402BE020, 0xAE605202, + 0x00000002, 0x002BE083, 0xAE605202, 0x00000002, 0x402BE020, 0xACA05602, + 0x00000002, 0x002BE083, 0xACA05602, 0x00000003, 0x402BE020, 0xACA05602, + 0xAE603702, 0x00000003, 0x002BE083, 0xACA05602, 0xAE603702, 0x00000002, + 0x402BE020, 0xACA05902, 0x00000002, 0x002BE083, 0xACA05902, 0x00000002, + 0x402BE020, 0xAE605B02, 0x00000002, 0x002BE083, 0xAE605B02, 0x00000003, + 0x402BE020, 0xAE605B02, 0xAE603202, 0x00000003, 0x002BE083, 0xAE605B02, + 0xAE603202, 0x00000003, 0x402BE020, 0xAE605B02, + // Block 228, offset 0x3900 + 0xAE603502, 0x00000003, 0x002BE083, 0xAE605B02, 0xAE603502, 0x00000002, + 0x402BE020, 0xAE606402, 0x00000002, 0x002BE083, 0xAE606402, 0x00000002, + 0x402BE020, 0xAE606502, 0x00000002, 0x002BE083, 0xAE606502, 0x00000002, + 0x402BE020, 0xAE606702, 0x00000002, 0x002BE083, 0xAE606702, 0x00000002, + 0x402BE020, 0xADC07002, 0x00000002, 0x002BE083, 0xADC07002, 0x00000003, + 0x402BE020, 0xADC07002, 0xAE603C02, 0x00000003, 0x002BE083, 0xADC07002, + 0xAE603C02, 0x00000002, 0x402BE020, 0xADC07802, 0x00000002, 0x002BE083, + 0xADC07802, 0x00000002, 0x402BE020, 0xADC07A02, 0x00000002, 0x002BE083, + 0xADC07A02, 0x00000002, 0x402BE220, 0xAE603202, 0x00000002, 0x002BE283, + 0xAE603202, 0x00000002, 0x402BE220, 0xAE603502, 0x00000002, 0x002BE283, + 0xAE603502, 0x00000002, 0x402BE220, 0xAE603702, + // Block 229, offset 0x3940 + 0x00000002, 0x002BE283, 0xAE603702, 0x00000002, 0x402BE220, 0xAE603C02, + 0x00000002, 0x002BE283, 0xAE603C02, 0x00000002, 0x402BE220, 0xAE604102, + 0x00000002, 0x002BE283, 0xAE604102, 0x00000002, 0x402BE220, 0xAE604702, + 0x00000002, 0x002BE283, 0xAE604702, 0x00000003, 0x402BE220, 0xAE604702, + 0xAE603202, 0x00000003, 0x002BE283, 0xAE604702, 0xAE603202, 0x00000002, + 0x402BE220, 0xAE604E02, 0x00000002, 0x002BE283, 0xAE604E02, 0x00000002, + 0x002BE283, 0xAE605202, 0x00000002, 0x402BE220, 0xACA05902, 0x00000002, + 0x002BE283, 0xACA05902, 0x00000002, 0x402BE220, 0xAE605B02, 0x00000002, + 0x002BE283, 0xAE605B02, 0x00000002, 0x402BE220, 0xAE606402, 0x00000002, + 0x002BE283, 0xAE606402, 0x00000002, 0x402BE220, 0xAE606502, 0x00000002, + 0x002BE283, 0xAE606502, 0x00000002, 0x402BE220, + // Block 230, offset 0x3980 + 0xAE606702, 0x00000002, 0x002BE283, 0xAE606702, 0x00000002, 0x402BE220, + 0xADC07002, 0x00000002, 0x002BE283, 0xADC07002, 0x00000002, 0x402BE220, + 0xADC07A02, 0x00000002, 0x002BE283, 0xADC07A02, 0x00000002, 0x402BE420, + 0xAE603202, 0x00000002, 0x002BE483, 0xAE603202, 0x00000002, 0x402BE420, + 0xAE603502, 0x00000002, 0x002BE483, 0xAE603502, 0x00000002, 0x402BE420, + 0xAE603702, 0x00000002, 0x002BE483, 0xAE603702, 0x00000002, 0x402BE420, + 0xAE603C02, 0x00000002, 0x002BE483, 0xAE603C02, 0x00000003, 0x402BE420, + 0xAE603C02, 0xAE603202, 0x00000003, 0x002BE483, 0xAE603C02, 0xAE603202, + 0x00000003, 0x402BE420, 0xAE603C02, 0xAE603502, 0x00000003, 0x002BE483, + 0xAE603C02, 0xAE603502, 0x00000003, 0x402BE420, 0xAE603C02, 0xAE604E02, + 0x00000003, 0x002BE483, 0xAE603C02, 0xAE604E02, + // Block 231, offset 0x39c0 + 0x00000003, 0x402BE420, 0xAE603C02, 0xAE606402, 0x00000003, 0x002BE483, + 0xAE603C02, 0xAE606402, 0x00000002, 0x402BE420, 0xAE604102, 0x00000002, + 0x002BE483, 0xAE604102, 0x00000002, 0x402BE420, 0xAE604702, 0x00000002, + 0x002BE483, 0xAE604702, 0x00000003, 0x402BE420, 0xAE604702, 0xAE605B02, + 0x00000003, 0x002BE483, 0xAE604702, 0xAE605B02, 0x00000002, 0x402BE420, + 0xAE604D02, 0x00000002, 0x002BE483, 0xAE604D02, 0x00000002, 0x402BE420, + 0xAE604E02, 0x00000002, 0x002BE483, 0xAE604E02, 0x00000003, 0x402BE420, + 0xAE604E02, 0xAE603202, 0x00000003, 0x002BE483, 0xAE604E02, 0xAE603202, + 0x00000003, 0x402BE420, 0xAE604E02, 0xAE604702, 0x00000003, 0x002BE483, + 0xAE604E02, 0xAE604702, 0x00000003, 0x402BE420, 0xAE604E02, 0xAE605B02, + 0x00000003, 0x002BE483, 0xAE604E02, 0xAE605B02, + // Block 232, offset 0x3a00 + 0x00000002, 0x402BE420, 0xAE605202, 0x00000002, 0x002BE483, 0xAE605202, + 0x00000003, 0x402BE420, 0xAE605202, 0xAE605B02, 0x00000003, 0x002BE483, + 0xAE605202, 0xAE605B02, 0x00000002, 0x402BE420, 0xACA05902, 0x00000002, + 0x002BE483, 0xACA05902, 0x00000003, 0x402BE420, 0xACA05902, 0xAE605B02, + 0x00000003, 0x002BE483, 0xACA05902, 0xAE605B02, 0x00000002, 0x402BE420, + 0xAE605B02, 0x00000002, 0x002BE483, 0xAE605B02, 0x00000003, 0x402BE420, + 0xAE605B02, 0xAE603202, 0x00000003, 0x002BE483, 0xAE605B02, 0xAE603202, + 0x00000003, 0x402BE420, 0xAE605B02, 0xAE603502, 0x00000003, 0x002BE483, + 0xAE605B02, 0xAE603502, 0x00000002, 0x402BE420, 0xAE606402, 0x00000002, + 0x002BE483, 0xAE606402, 0x00000002, 0x402BE420, 0xAE606502, 0x00000002, + 0x002BE483, 0xAE606502, 0x00000002, 0x402BE420, + // Block 233, offset 0x3a40 + 0xAE606702, 0x00000002, 0x002BE483, 0xAE606702, 0x00000002, 0x402BE420, + 0xAD806802, 0x00000002, 0x002BE483, 0xAD806802, 0x00000003, 0x402BE420, + 0xAD806802, 0xAE603202, 0x00000003, 0x002BE483, 0xAD806802, 0xAE603202, + 0x00000003, 0x402BE420, 0xAD806802, 0xAE603502, 0x00000003, 0x002BE483, + 0xAD806802, 0xAE603502, 0x00000003, 0x402BE420, 0xAD806802, 0xAE604E02, + 0x00000003, 0x002BE483, 0xAD806802, 0xAE604E02, 0x00000003, 0x402BE420, + 0xAD806802, 0xAE606402, 0x00000003, 0x002BE483, 0xAD806802, 0xAE606402, + 0x00000003, 0x402BE420, 0xAD806802, 0xADC07002, 0x00000003, 0x002BE483, + 0xAD806802, 0xADC07002, 0x00000002, 0x402BE420, 0xADC07002, 0x00000002, + 0x002BE483, 0xADC07002, 0x00000003, 0x402BE420, 0xADC07002, 0xAE603C02, + 0x00000003, 0x002BE483, 0xADC07002, 0xAE603C02, + // Block 234, offset 0x3a80 + 0x00000002, 0x402BE620, 0xAE603202, 0x00000002, 0x002BE683, 0xAE603202, + 0x00000002, 0x402BE620, 0xAE603502, 0x00000002, 0x002BE683, 0xAE603502, + 0x00000002, 0x402BE620, 0xAE603702, 0x00000002, 0x002BE683, 0xAE603702, + 0x00000002, 0x402BE620, 0xAE603C02, 0x00000002, 0x002BE683, 0xAE603C02, + 0x00000002, 0x402BE620, 0xAE604102, 0x00000002, 0x002BE683, 0xAE604102, + 0x00000002, 0x402BE620, 0xAE604302, 0x00000002, 0x002BE683, 0xAE604302, + 0x00000002, 0x402BE620, 0xAE604702, 0x00000002, 0x002BE683, 0xAE604702, + 0x00000003, 0x402BE620, 0xAE604702, 0xAE603202, 0x00000003, 0x002BE683, + 0xAE604702, 0xAE603202, 0x00000003, 0x402BE620, 0xAE604702, 0xAE603502, + 0x00000003, 0x002BE683, 0xAE604702, 0xAE603502, 0x00000003, 0x402BE620, + 0xAE604702, 0xAE604102, 0x00000003, 0x002BE683, + // Block 235, offset 0x3ac0 + 0xAE604702, 0xAE604102, 0x00000003, 0x402BE620, 0xAE604702, 0xAE605B02, + 0x00000003, 0x002BE683, 0xAE604702, 0xAE605B02, 0x00000002, 0x402BE620, + 0xAE604D02, 0x00000002, 0x002BE683, 0xAE604D02, 0x00000002, 0x402BE620, + 0xAE604E02, 0x00000002, 0x002BE683, 0xAE604E02, 0x00000003, 0x402BE620, + 0xAE604E02, 0xAE603202, 0x00000003, 0x002BE683, 0xAE604E02, 0xAE603202, + 0x00000002, 0x402BE620, 0xACA05902, 0x00000002, 0x002BE683, 0xACA05902, + 0x00000002, 0x402BE620, 0xAE605B02, 0x00000002, 0x002BE683, 0xAE605B02, + 0x00000003, 0x402BE620, 0xAE605B02, 0xAE604702, 0x00000003, 0x002BE683, + 0xAE605B02, 0xAE604702, 0x00000002, 0x402BE620, 0xAE606402, 0x00000002, + 0x002BE683, 0xAE606402, 0x00000002, 0x402BE620, 0xAE606502, 0x00000002, + 0x002BE683, 0xAE606502, 0x00000002, 0x402BE620, + // Block 236, offset 0x3b00 + 0xAE606702, 0x00000002, 0x002BE683, 0xAE606702, 0x00000002, 0x402BE620, + 0xAD806802, 0x00000002, 0x002BE683, 0xAD806802, 0x00000003, 0x402BE620, + 0xAD806802, 0xAE603202, 0x00000003, 0x002BE683, 0xAD806802, 0xAE603202, + 0x00000003, 0x402BE620, 0xAD806802, 0xAE603502, 0x00000003, 0x002BE683, + 0xAD806802, 0xAE603502, 0x00000003, 0x402BE620, 0xAD806802, 0xAE604E02, + 0x00000003, 0x002BE683, 0xAD806802, 0xAE604E02, 0x00000003, 0x402BE620, + 0xAD806802, 0xAE606402, 0x00000003, 0x002BE683, 0xAD806802, 0xAE606402, + 0x00000003, 0x402BE620, 0xAD806802, 0xADC07002, 0x00000003, 0x002BE683, + 0xAD806802, 0xADC07002, 0x00000002, 0x402BE620, 0xADC07002, 0x00000002, + 0x002BE683, 0xADC07002, 0x00000002, 0x402BE620, 0xADC07502, 0x00000002, + 0x002BE683, 0xADC07502, 0x00000002, 0x402BE620, + // Block 237, offset 0x3b40 + 0xADC07802, 0x00000002, 0x002BE683, 0xADC07802, 0x00000002, 0x402BE620, + 0xADC07A02, 0x00000002, 0x002BE683, 0xADC07A02, 0x00000002, 0x402BE820, + 0xAE603C02, 0x00000002, 0x002BE883, 0xAE603C02, 0x00000002, 0x402BE820, + 0xAE604102, 0x00000002, 0x002BE883, 0xAE604102, 0x00000002, 0x402BE820, + 0xAE604702, 0x00000002, 0x002BE883, 0xAE604702, 0x00000002, 0x402BE820, + 0xAE605202, 0x00000002, 0x002BE883, 0xAE605202, 0x00000002, 0x402BE820, + 0xACA05602, 0x00000002, 0x002BE883, 0xACA05602, 0x00000002, 0x402BE820, + 0xADC07002, 0x00000002, 0x002BE883, 0xADC07002, 0x00000002, 0x402BE820, + 0xADC07902, 0x00000002, 0x002BE883, 0xADC07902, 0x00000002, 0x402BE820, + 0xADC07B02, 0x00000002, 0x402BEA20, 0xAE603202, 0x00000002, 0x002BEA83, + 0xAE603202, 0x00000002, 0x402BEA20, 0xAE604102, + // Block 238, offset 0x3b80 + 0x00000002, 0x002BEA83, 0xAE604102, 0x00000002, 0x402BEA20, 0xACA05602, + 0x00000002, 0x002BEA83, 0xACA05602, 0x00000002, 0x402BEA20, 0xADC07002, + 0x00000002, 0x002BEA83, 0xADC07002, 0x00000002, 0x402BEA20, 0xADC07B02, + 0x00000002, 0x002BEA83, 0xADC07B02, 0x00000002, 0x402BEC20, 0xAE603202, + 0x00000002, 0x002BEC83, 0xAE603202, 0x00000002, 0x402BEC20, 0xAE604102, + 0x00000002, 0x002BEC83, 0xAE604102, 0x00000002, 0x402BEC20, 0xACA05602, + 0x00000002, 0x002BEC83, 0xACA05602, 0x00000002, 0x402BEC20, 0xADC07002, + 0x00000002, 0x002BEC83, 0xADC07002, 0x00000003, 0x402BEC20, 0xADC07002, + 0xAE605B02, 0x00000003, 0x002BEC83, 0xADC07002, 0xAE605B02, 0x00000002, + 0x402BEC20, 0xADC07802, 0x00000002, 0x002BEC83, 0xADC07802, 0x00000002, + 0x402BEC20, 0xADC07B02, 0x00000002, 0x002BEC83, + // Block 239, offset 0x3bc0 + 0xADC07B02, 0x00000002, 0x402BEE20, 0xAE603202, 0x00000002, 0x002BEE83, + 0xAE603202, 0x00000002, 0x402BEE20, 0xAE605202, 0x00000002, 0x002BEE83, + 0xAE605202, 0x00000002, 0x402BEE20, 0xADC07002, 0x00000002, 0x002BEE83, + 0xADC07002, 0x00000002, 0x402BF020, 0xAE603202, 0x00000002, 0x002BF083, + 0xAE603202, 0x00000002, 0x402BF020, 0xAE603502, 0x00000002, 0x002BF083, + 0xAE603502, 0x00000002, 0x402BF020, 0xAE604102, 0x00000002, 0x002BF083, + 0xAE604102, 0x00000002, 0x402BF020, 0xAE604E02, 0x00000002, 0x002BF083, + 0xAE604E02, 0x00000002, 0x402BF020, 0xAE605202, 0x00000002, 0x002BF083, + 0xAE605202, 0x00000002, 0x402BF020, 0xACA05602, 0x00000002, 0x002BF083, + 0xACA05602, 0x00000002, 0x402BF020, 0xADC07002, 0x00000002, 0x002BF083, + 0xADC07002, 0x00000002, 0x402BF020, 0xADC07802, + // Block 240, offset 0x3c00 + 0x00000002, 0x002BF083, 0xADC07802, 0x00000002, 0x402BF020, 0xADC07B02, + 0x00000002, 0x002BF083, 0xADC07B02, 0x00000002, 0x402BF220, 0xAE603202, + 0x00000002, 0x002BF283, 0xAE603202, 0x00000002, 0x402BF220, 0xAE605202, + 0x00000002, 0x002BF283, 0xAE605202, 0x00000002, 0x402BF420, 0xAE603202, + 0x00000002, 0x002BF483, 0xAE603202, 0x00000002, 0x402BF420, 0xAE603502, + 0x00000002, 0x002BF483, 0xAE603502, 0x00000002, 0x402BF420, 0xAE603C02, + 0x00000002, 0x002BF483, 0xAE603C02, 0x00000002, 0x402BF420, 0xAE604302, + 0x00000002, 0x402BF420, 0xAE604702, 0x00000002, 0x002BF483, 0xAE604702, + 0x00000002, 0x402BF420, 0xAE605202, 0x00000002, 0x002BF483, 0xAE605202, + 0x00000002, 0x402BF420, 0xADC07002, 0x00000002, 0x002BF483, 0xADC07002, + 0x00000002, 0x402C3E20, 0xACA05602, 0x00000002, + // Block 241, offset 0x3c40 + 0x002C3E83, 0xACA05602, 0x00000002, 0x002C3C83, 0x402C3C20, 0x00000002, + 0x002C3C85, 0x402C3C20, 0x00000002, 0x002C3C87, 0x002C3C86, 0x00000002, + 0x002C6483, 0x402C6420, 0x00000002, 0x002C6485, 0x402C6420, 0x00000002, + 0x002C6487, 0x002C6486, 0x00000002, 0x002C6683, 0x402C6620, 0x00000002, + 0x002C6685, 0x402C6620, 0x00000002, 0x002C6687, 0x002C6686, 0x00000002, + 0x002D2483, 0x402D2420, 0x00000002, 0x002D2485, 0x402D2420, 0x00000002, + 0x002D2487, 0x002D2486, 0x00000002, 0x002E2483, 0x402E2420, 0x00000002, + 0x002E2485, 0x402E2420, 0x00000002, 0x002E2487, 0x002E2486, 0x00000002, + 0x002EA083, 0x402EA020, 0x00000002, 0x002EA085, 0x402EA020, 0x00000002, + 0x002EA087, 0x002EA086, 0x00000002, 0x002FE883, 0x402FE820, 0x00000002, + 0x002FE885, 0x402FE820, 0x00000002, 0x002FE887, + // Block 242, offset 0x3c80 + 0x002FE886, 0x00000002, 0x00302E83, 0x40302E20, 0x00000002, 0x00302E85, + 0x40302E20, 0x00000002, 0x00302E87, 0x00302E86, 0x00000002, 0x00312C83, + 0x40312C20, 0x00000002, 0x00312C85, 0x40312C20, 0x00000002, 0x00312C87, + 0x00312C86, 0x00000002, 0x402EE420, 0xAE603C02, 0x00000002, 0x002EE483, + 0xAE603C02, 0x00000002, 0x402EE420, 0xAD806802, 0x00000002, 0x002EE483, + 0xAD806802, 0x00000002, 0x40306E20, 0xAD806802, 0x00000002, 0x00306E83, + 0xAD806802, 0x00000002, 0x402C0820, 0xAE603702, 0x00000002, 0x002C0883, + 0xAE603702, 0x00000002, 0x402C0820, 0xAE603C02, 0x00000002, 0x002C0883, + 0xAE603C02, 0x00000002, 0x402D0620, 0xAE603C02, 0x00000002, 0x002D0683, + 0xAE603C02, 0x00000002, 0x402D0620, 0xAE605B02, 0x00000002, 0x002D0683, + 0xAE605B02, 0x00000002, 0x402DCA20, 0xAE604702, + // Block 243, offset 0x3cc0 + 0x00000002, 0x002DCA83, 0xAE604702, 0x00000002, 0x402F2A20, 0xAE603C02, + 0x00000002, 0x002F2A83, 0xAE603C02, 0x00000002, 0x402F2A20, 0xAE604E02, + 0x00000002, 0x002F2A83, 0xAE604E02, 0x00000002, 0x402F2A20, 0xAE605B02, + 0x00000002, 0x002F2A83, 0xAE605B02, 0x00000002, 0x402F2A20, 0xAD806802, + 0x00000002, 0x002F2A83, 0xAD806802, 0x00000002, 0x4030BC20, 0xAE604702, + 0x00000002, 0x0030BC83, 0xAE604702, 0x00000002, 0x4030BC20, 0xAE604E02, + 0x00000002, 0x0030BC83, 0xAE604E02, 0x00000002, 0x4030BC20, 0xAD806802, + 0x00000002, 0x0030BC83, 0xAD806802, 0x00000002, 0x40320E20, 0xAE604E02, + 0x00000002, 0x00320E83, 0xAE604E02, 0x00000003, 0x0004B084, 0x029C1284, + 0x0004B29F, 0x00000003, 0x0004B084, 0x029D1884, 0x0004B29F, 0x00000003, + 0x0004B084, 0x02A5BA84, 0x0004B29F, 0x00000003, + // Block 244, offset 0x3d00 + 0x0004B084, 0x02B71284, 0x0004B29F, 0x00000003, 0x0004B084, 0x02C4A684, + 0x0004B29F, 0x00000003, 0x0004B084, 0x02CAAE84, 0x0004B29F, 0x00000003, + 0x0004B084, 0x02CE5884, 0x0004B29F, 0x00000003, 0x0004B084, 0x02E17284, + 0x0004B29F, 0x00000003, 0x0004B084, 0x02EDAE84, 0x0004B29F, 0x00000002, + 0x0065768E, 0x0065768F, 0x00000002, 0x0065768E, 0x00657691, 0x00000002, + 0x00657690, 0x0065768F, 0x00000002, 0x00657690, 0x00657691, 0x00000002, + 0x0065768E, 0x0065828F, 0x00000002, 0x0065768E, 0x00658291, 0x00000003, + 0x0065768E, 0x00658291, 0xA0812802, 0x00000002, 0x0065768E, 0x00658C91, + 0x00000003, 0x0065768E, 0x00658C91, 0xA0812802, 0x00000002, 0x0065768E, + 0x00659691, 0x00000003, 0x0065768E, 0x00659691, 0xA0812802, 0x00000002, + 0x0065768E, 0x0065A091, 0x00000002, 0x0065768E, + // Block 245, offset 0x3d40 + 0x0065AA8F, 0x00000002, 0x0065768E, 0x0065AA91, 0x00000003, 0x0065768E, + 0x0065AA91, 0xA0812802, 0x00000003, 0x0065768E, 0x0065AA91, 0xA0812902, + 0x00000002, 0x0065768E, 0x0065B491, 0x00000002, 0x0065768E, 0x0065BE8F, + 0x00000002, 0x0065768E, 0x0065BE91, 0x00000002, 0x0065768E, 0x0065C68F, + 0x00000002, 0x0065768E, 0x0065C691, 0x00000002, 0x0065768E, 0x0065D08F, + 0x00000002, 0x0065768E, 0x0065D091, 0x00000003, 0x0065768E, 0x0065D091, + 0xA0812802, 0x00000002, 0x0065788E, 0x0065788F, 0x00000002, 0x0065788E, + 0x00657891, 0x00000002, 0x00657890, 0x0065788F, 0x00000002, 0x00657890, + 0x00657891, 0x00000002, 0x0065788E, 0x00658491, 0x00000003, 0x0065788E, + 0x00658491, 0xA0812802, 0x00000002, 0x0065788E, 0x00658E8F, 0x00000002, + 0x0065788E, 0x00658E91, 0x00000003, 0x0065788E, + // Block 246, offset 0x3d80 + 0x00658E91, 0xA0812802, 0x00000002, 0x0065788E, 0x00659891, 0x00000003, + 0x0065788E, 0x00659891, 0xA0812802, 0x00000002, 0x0065788E, 0x0065A291, + 0x00000002, 0x0065788E, 0x0065AC8F, 0x00000002, 0x0065788E, 0x0065AC91, + 0x00000003, 0x0065788E, 0x0065AC91, 0xA0812802, 0x00000003, 0x0065788E, + 0x0065AC91, 0xA0812902, 0x00000002, 0x0065788E, 0x0065B691, 0x00000002, + 0x0065788E, 0x0065C88F, 0x00000002, 0x0065788E, 0x0065C891, 0x00000002, + 0x0065788E, 0x0065D291, 0x00000003, 0x0065788E, 0x0065D291, 0xA0812802, + 0x00000002, 0x00657A8E, 0x00657A8F, 0x00000002, 0x00657A8E, 0x00657A91, + 0x00000002, 0x00657A90, 0x00657A8F, 0x00000002, 0x00657A90, 0x00657A91, + 0x00000003, 0x00657A8E, 0x00657A91, 0xA0812802, 0x00000003, 0x00657A90, + 0x00657A8F, 0xA0812802, 0x00000003, 0x00657A90, + // Block 247, offset 0x3dc0 + 0x00657A91, 0xA0812802, 0x00000004, 0x00657A90, 0x00657A91, 0xA0812802, + 0xA0812802, 0x00000002, 0x00657A8E, 0x0065868F, 0x00000002, 0x00657A8E, + 0x00658691, 0x00000003, 0x00657A8E, 0x00658691, 0xA0812802, 0x00000002, + 0x00657A8E, 0x0065908F, 0x00000002, 0x00657A8E, 0x00659091, 0x00000003, + 0x00657A8E, 0x00659091, 0xA0812802, 0x00000002, 0x00657A8E, 0x00659A8F, + 0x00000002, 0x00657A8E, 0x00659A91, 0x00000003, 0x00657A8E, 0x00659A91, + 0xA0812802, 0x00000002, 0x00657A8E, 0x0065A48F, 0x00000002, 0x00657A8E, + 0x0065A491, 0x00000002, 0x00657A8E, 0x0065AE8F, 0x00000002, 0x00657A8E, + 0x0065AE91, 0x00000003, 0x00657A8E, 0x0065AE91, 0xA0812802, 0x00000003, + 0x00657A8E, 0x0065AE91, 0xA0812902, 0x00000002, 0x00657A8E, 0x0065B88F, + 0x00000002, 0x00657A8E, 0x0065B891, 0x00000002, + // Block 248, offset 0x3e00 + 0x00657A8E, 0x0065C08F, 0x00000002, 0x00657A8E, 0x0065C091, 0x00000002, + 0x00657A8E, 0x0065CA8F, 0x00000002, 0x00657A8E, 0x0065CA91, 0x00000002, + 0x00657E8E, 0x00657E8F, 0x00000002, 0x00657E8E, 0x00657E91, 0x00000002, + 0x00657E90, 0x00657E8F, 0x00000002, 0x00657E90, 0x00657E91, 0x00000002, + 0x00657E8E, 0x0065888F, 0x00000002, 0x00657E8E, 0x00658891, 0x00000003, + 0x00657E8E, 0x00658891, 0xA0812802, 0x00000002, 0x00657E8E, 0x00659291, + 0x00000003, 0x00657E8E, 0x00659291, 0xA0812802, 0x00000002, 0x00657E8E, + 0x00659C91, 0x00000003, 0x00657E8E, 0x00659C91, 0xA0812802, 0x00000002, + 0x00657E8E, 0x0065A691, 0x00000002, 0x00657E8E, 0x0065B08F, 0x00000002, + 0x00657E8E, 0x0065B091, 0x00000003, 0x00657E8E, 0x0065B091, 0xA0812802, + 0x00000003, 0x00657E8E, 0x0065B091, 0xA0812902, + // Block 249, offset 0x3e40 + 0x00000002, 0x00657E8E, 0x0065BA91, 0x00000002, 0x00657E8E, 0x0065CC8F, + 0x00000002, 0x00657E8E, 0x0065CC91, 0x00000002, 0x00657E8E, 0x0065D491, + 0x00000003, 0x00657E8E, 0x0065D491, 0xA0812802, 0x00000002, 0x0065808E, + 0x0065808F, 0x00000002, 0x0065808E, 0x00658091, 0x00000002, 0x00658090, + 0x0065808F, 0x00000002, 0x00658090, 0x00658091, 0x00000002, 0x0065808E, + 0x00658A91, 0x00000003, 0x0065808E, 0x00658A91, 0xA0812802, 0x00000002, + 0x0065808E, 0x00659491, 0x00000003, 0x0065808E, 0x00659491, 0xA0812802, + 0x00000002, 0x0065808E, 0x00659E8F, 0x00000002, 0x0065808E, 0x00659E91, + 0x00000003, 0x0065808E, 0x00659E91, 0xA0812802, 0x00000002, 0x0065808E, + 0x0065A891, 0x00000002, 0x0065808E, 0x0065B28F, 0x00000002, 0x0065808E, + 0x0065B291, 0x00000003, 0x0065808E, 0x0065B291, + // Block 250, offset 0x3e80 + 0xA0812802, 0x00000003, 0x0065808E, 0x0065B291, 0xA0812902, 0x00000002, + 0x0065808E, 0x0065BC91, 0x00000002, 0x0065808E, 0x0065C48F, 0x00000002, + 0x0065808E, 0x0065C491, 0x00000002, 0x0065808E, 0x0065CE8F, 0x00000002, + 0x0065808E, 0x0065CE91, 0x00000002, 0x0065808E, 0x0065D691, 0x00000003, + 0x0065808E, 0x0065D691, 0xA0812802, 0x00000002, 0x00658290, 0x0065828F, + 0x00000002, 0x00658290, 0x00658291, 0x00000003, 0x0065848F, 0x00658291, + 0xA0812802, 0x00000002, 0x00658490, 0x00658491, 0x00000003, 0x00658490, + 0x00658491, 0xA0812802, 0x00000004, 0x00658490, 0x00658491, 0xA0812802, + 0xA0812802, 0x00000002, 0x00658690, 0x0065868F, 0x00000002, 0x00658690, + 0x00658691, 0x00000003, 0x00658690, 0x0065868F, 0xA0812802, 0x00000003, + 0x00658690, 0x00658691, 0xA0812802, 0x00000004, + // Block 251, offset 0x3ec0 + 0x00658690, 0x00658691, 0xA0812802, 0xA0812802, 0x00000002, 0x00658890, + 0x0065888F, 0x00000002, 0x00658890, 0x00658891, 0x00000003, 0x00658A8F, + 0x00658891, 0xA0812802, 0x00000002, 0x00658A90, 0x00658A91, 0x00000003, + 0x00658A90, 0x00658A91, 0xA0812802, 0x00000004, 0x00658A90, 0x00658A91, + 0xA0812802, 0xA0812802, 0x00000002, 0x40658A21, 0x00659E91, 0x00000002, + 0x00658C90, 0x00658C91, 0x00000003, 0x00658C90, 0x00658C91, 0xA0812802, + 0x00000004, 0x00658C90, 0x00658C91, 0xA0812802, 0xA0812802, 0x00000002, + 0x00658E90, 0x00658E8F, 0x00000002, 0x00658E90, 0x00658E91, 0x00000003, + 0x00658E90, 0x00658E8F, 0xA0812802, 0x00000003, 0x00658E90, 0x00658E91, + 0xA0812802, 0x00000004, 0x00658E90, 0x00658E91, 0xA0812802, 0xA0812802, + 0x00000002, 0x00659090, 0x0065908F, 0x00000002, + // Block 252, offset 0x3f00 + 0x00659090, 0x00659091, 0x00000003, 0x00659090, 0x0065908F, 0xA0812802, + 0x00000003, 0x00659090, 0x00659091, 0xA0812802, 0x00000004, 0x00659090, + 0x00659091, 0xA0812802, 0xA0812802, 0x00000002, 0x00659290, 0x00659291, + 0x00000003, 0x00659290, 0x00659291, 0xA0812802, 0x00000004, 0x00659290, + 0x00659291, 0xA0812802, 0xA0812802, 0x00000002, 0x00659490, 0x00659491, + 0x00000003, 0x00659490, 0x00659491, 0xA0812802, 0x00000004, 0x00659490, + 0x00659491, 0xA0812802, 0xA0812802, 0x00000002, 0x00659690, 0x00659691, + 0x00000003, 0x00659690, 0x00659691, 0xA0812802, 0x00000004, 0x00659690, + 0x00659691, 0xA0812802, 0xA0812802, 0x00000002, 0x00659890, 0x00659891, + 0x00000003, 0x00659890, 0x00659891, 0xA0812802, 0x00000004, 0x00659890, + 0x00659891, 0xA0812802, 0xA0812802, 0x00000002, + // Block 253, offset 0x3f40 + 0x00659A90, 0x00659A8F, 0x00000002, 0x00659A90, 0x00659A91, 0x00000003, + 0x00659A90, 0x00659A8F, 0xA0812802, 0x00000003, 0x00659A90, 0x00659A91, + 0xA0812802, 0x00000004, 0x00659A90, 0x00659A91, 0xA0812802, 0xA0812802, + 0x00000002, 0x00659C90, 0x00659C91, 0x00000003, 0x00659C90, 0x00659C91, + 0xA0812802, 0x00000004, 0x00659C90, 0x00659C91, 0xA0812802, 0xA0812802, + 0x00000002, 0x00659E90, 0x00659E8F, 0x00000002, 0x00659E90, 0x00659E91, + 0x00000003, 0x00659E90, 0x00659E8F, 0xA0812802, 0x00000003, 0x00659E90, + 0x00659E91, 0xA0812802, 0x00000004, 0x00659E90, 0x00659E91, 0xA0812802, + 0xA0812802, 0x00000002, 0x0065A090, 0x0065A091, 0x00000002, 0x0065A290, + 0x0065A291, 0x00000002, 0x0065A490, 0x0065A48F, 0x00000002, 0x0065A490, + 0x0065A491, 0x00000002, 0x0065A690, 0x0065A691, + // Block 254, offset 0x3f80 + 0x00000002, 0x0065A890, 0x0065A891, 0x00000002, 0x0065AA90, 0x0065AA8F, + 0x00000002, 0x0065AA90, 0x0065AA91, 0x00000003, 0x0065AA90, 0x0065AA8F, + 0xA0812802, 0x00000003, 0x0065AA90, 0x0065AA91, 0xA0812802, 0x00000004, + 0x0065AA90, 0x0065AA91, 0xA0812802, 0xA0812802, 0x00000003, 0x0065AA90, + 0x0065AA91, 0xA0812902, 0x00000004, 0x0065AA90, 0x0065AA91, 0xA0812902, + 0xA0812802, 0x00000002, 0x0065AC90, 0x0065AC8F, 0x00000002, 0x0065AC90, + 0x0065AC91, 0x00000003, 0x0065AC90, 0x0065AC8F, 0xA0812802, 0x00000003, + 0x0065AC90, 0x0065AC91, 0xA0812802, 0x00000004, 0x0065AC90, 0x0065AC91, + 0xA0812802, 0xA0812802, 0x00000003, 0x0065AC90, 0x0065AC91, 0xA0812902, + 0x00000004, 0x0065AC90, 0x0065AC91, 0xA0812902, 0xA0812802, 0x00000002, + 0x0065AE90, 0x0065AE8F, 0x00000002, 0x0065AE90, + // Block 255, offset 0x3fc0 + 0x0065AE91, 0x00000003, 0x0065AE90, 0x0065AE8F, 0xA0812802, 0x00000003, + 0x0065AE90, 0x0065AE91, 0xA0812802, 0x00000004, 0x0065AE90, 0x0065AE91, + 0xA0812802, 0xA0812802, 0x00000003, 0x0065AE90, 0x0065AE91, 0xA0812902, + 0x00000004, 0x0065AE90, 0x0065AE91, 0xA0812902, 0xA0812802, 0x00000002, + 0x0065B090, 0x0065B08F, 0x00000002, 0x0065B090, 0x0065B091, 0x00000003, + 0x0065B090, 0x0065B08F, 0xA0812802, 0x00000003, 0x0065B090, 0x0065B091, + 0xA0812802, 0x00000004, 0x0065B090, 0x0065B091, 0xA0812802, 0xA0812802, + 0x00000003, 0x0065B090, 0x0065B091, 0xA0812902, 0x00000004, 0x0065B090, + 0x0065B091, 0xA0812902, 0xA0812802, 0x00000002, 0x0065B290, 0x0065B28F, + 0x00000002, 0x0065B290, 0x0065B291, 0x00000003, 0x0065B290, 0x0065B28F, + 0xA0812802, 0x00000003, 0x0065B290, 0x0065B291, + // Block 256, offset 0x4000 + 0xA0812802, 0x00000004, 0x0065B290, 0x0065B291, 0xA0812802, 0xA0812802, + 0x00000003, 0x0065B290, 0x0065B291, 0xA0812902, 0x00000004, 0x0065B290, + 0x0065B291, 0xA0812902, 0xA0812802, 0x00000002, 0x0065B490, 0x0065B491, + 0x00000002, 0x0065B690, 0x0065B691, 0x00000002, 0x0065B890, 0x0065B88F, + 0x00000002, 0x0065B890, 0x0065B891, 0x00000002, 0x0065BA90, 0x0065BA91, + 0x00000002, 0x0065BC90, 0x0065BC91, 0x00000002, 0x0065BE90, 0x0065BE8F, + 0x00000002, 0x0065BE90, 0x0065BE91, 0x00000002, 0x0065C090, 0x0065C08F, + 0x00000002, 0x0065C090, 0x0065C091, 0x00000002, 0x0065C490, 0x0065C48F, + 0x00000002, 0x0065C490, 0x0065C491, 0x00000002, 0x4065C421, 0x0065C891, + 0x00000002, 0x0065C690, 0x0065C68F, 0x00000002, 0x0065C690, 0x0065C691, + 0x00000002, 0x0065C890, 0x0065C88F, 0x00000002, + // Block 257, offset 0x4040 + 0x0065C890, 0x0065C891, 0x00000002, 0x0065CA90, 0x0065CA8F, 0x00000002, + 0x0065CA90, 0x0065CA91, 0x00000002, 0x0065CC90, 0x0065CC8F, 0x00000002, + 0x0065CC90, 0x0065CC91, 0x00000002, 0x0065CE90, 0x0065CE8F, 0x00000002, + 0x0065CE90, 0x0065CE91, 0x00000002, 0x0065D090, 0x0065D08F, 0x00000002, + 0x0065D090, 0x0065D091, 0x00000003, 0x0065D090, 0x0065D08F, 0xA0812802, + 0x00000003, 0x0065D090, 0x0065D091, 0xA0812802, 0x00000004, 0x0065D090, + 0x0065D091, 0xA0812802, 0xA0812802, 0x00000002, 0x0065D290, 0x0065D291, + 0x00000003, 0x0065D290, 0x0065D291, 0xA0812802, 0x00000004, 0x0065D290, + 0x0065D291, 0xA0812802, 0xA0812802, 0x00000002, 0x0065D490, 0x0065D491, + 0x00000003, 0x0065D490, 0x0065D491, 0xA0812802, 0x00000004, 0x0065D490, + 0x0065D491, 0xA0812802, 0xA0812802, 0x00000002, + // Block 258, offset 0x4080 + 0x0065D690, 0x0065D691, 0x00000003, 0x0065D690, 0x0065D691, 0xA0812802, + 0x00000004, 0x0065D690, 0x0065D691, 0xA0812802, 0xA0812802, 0x00000002, + 0x0065D890, 0x0065D891, 0x00000002, 0x02B24E9C, 0x02D6C69C, 0x00000002, + 0x02BCE69C, 0x02C4209C, 0x00000002, 0x02CC1C9C, 0x02D9769C, 0x00000002, + 0x02CC5A9C, 0x02A9189C, 0x00000003, 0x00032683, 0x404FDA20, 0x40032620, + 0x00000003, 0x404FD821, 0x82092817, 0x404FA420, 0x00000003, 0x404FD821, + 0x82092817, 0x404FA620, 0x00000003, 0x404FD821, 0x82092817, 0x404FA820, + 0x00000003, 0x404FD821, 0x82092817, 0x404FAA20, 0x00000003, 0x404FD821, + 0x82092817, 0x404FAC20, 0x00000003, 0x404FD821, 0x82092817, 0x404FAE20, + 0x00000003, 0x404FD821, 0x82092817, 0x404FB020, 0x00000003, 0x404FD821, + 0x82092817, 0x404FB220, 0x00000003, 0x404FD821, + // Block 259, offset 0x40c0 + 0x82092817, 0x404FB420, 0x00000003, 0x404FD821, 0x82092817, 0x404FB620, + 0x00000003, 0x404FD821, 0x82092817, 0x404FB820, 0x00000003, 0x404FD821, + 0x82092817, 0x404FBA20, 0x00000003, 0x404FD821, 0x82092817, 0x404FBC20, + 0x00000003, 0x404FD821, 0x82092817, 0x404FBE20, 0x00000003, 0x404FD821, + 0x82092817, 0x404FC020, 0x00000003, 0x404FD821, 0x82092817, 0x404FC220, + 0x00000003, 0x404FD821, 0x82092817, 0x404FC420, 0x00000003, 0x404FD821, + 0x82092817, 0x404FC620, 0x00000003, 0x404FD821, 0x82092817, 0x404FC820, + 0x00000003, 0x404FD821, 0x82092817, 0x404FCA20, 0x00000003, 0x404FD821, + 0x82092817, 0x404FCC20, 0x00000003, 0x404FD821, 0x82092817, 0x404FCE20, + 0x00000003, 0x404FD821, 0x82092817, 0x404FD020, 0x00000003, 0x404FD821, + 0x82092817, 0x404FD220, 0x00000003, 0x404FD821, + // Block 260, offset 0x4100 + 0x82092817, 0x404FD420, 0x00000003, 0x404FD821, 0x82092817, 0x404FD620, + 0x00000003, 0x404FD821, 0x82092817, 0x404FD820, 0x00000003, 0x404FD821, + 0x82092817, 0x404FDA20, 0x00000003, 0x404FD821, 0x82092817, 0x404FDA20, + 0x00000003, 0x404FD821, 0x82092817, 0x404FDC20, 0x00000003, 0x404FD821, + 0x82092817, 0x404FDC20, 0x00000003, 0x404FD821, 0x82092817, 0x404FDC20, + 0x00000003, 0x404FD821, 0x82092817, 0x404FDE20, 0x00000003, 0x404FD821, + 0x82092817, 0x404FDE20, 0x00000003, 0x404FD821, 0x82092817, 0x404FE020, + 0x00000003, 0x404FD821, 0x82092817, 0x404FE220, 0x00000003, 0x404FD821, + 0x82092817, 0x404FE420, 0x00000003, 0x404FD821, 0x82092817, 0x404FE620, + 0x00000003, 0x404FD821, 0x82092817, 0x404FE820, 0x00000002, 0x404FE820, + 0x40500E20, 0x00000002, 0x404FE821, 0x40501020, + // Block 261, offset 0x4140 + 0x00000002, 0x404FE821, 0x40501220, 0x00000002, 0x404FE821, 0x40501820, + 0x00000003, 0x004FE8A3, 0x40501820, 0x404FA420, 0x00000002, 0x404FE821, + 0x40501A20, 0x00000003, 0x004FE8A3, 0x40501A20, 0x404FDC20, 0x00000002, + 0x404FE821, 0x40502620, 0x00000002, 0x404FE821, 0x40502820, 0x00000002, + 0x404FE821, 0x40502A20, 0x00000002, 0x004FE8A3, 0x40502A20, 0x00000002, + 0x404FE821, 0x40502C20, 0x00000002, 0x4062AC21, 0x4063A820, 0x00000002, + 0x4062AC22, 0x4063A820, 0x00000002, 0x4062AC23, 0x4063A820, 0x00000002, + 0x4062AC24, 0x4063A820, 0x00000002, 0x4062AC25, 0x4063A820, 0x00000002, + 0x4062AC26, 0x4063A820, 0x00000002, 0x4062AC27, 0x4063A820, 0x00000002, + 0x4062AC28, 0x4063A820, 0x00000002, 0x4062AC29, 0x4063A820, 0x00000002, + 0x4062AC2A, 0x4063A820, 0x00000002, 0x4062AC2B, + // Block 262, offset 0x4180 + 0x4063A820, 0x00000002, 0x4062AC2C, 0x4063A820, 0x00000002, 0x4062AC2D, + 0x4063A820, 0x00000002, 0x4062AC2E, 0x4063A820, 0x00000002, 0x4062AC2F, + 0x4063A820, 0x00000002, 0x4062AC30, 0x4063A820, 0x00000002, 0x4062AC31, + 0x4063A820, 0x00000002, 0x4062AC32, 0x4063A820, 0x00000002, 0x4062AC33, + 0x4063A820, 0x00000002, 0x4062AC34, 0x4063A820, 0x00000002, 0x4062AC35, + 0x4063A820, 0x00000002, 0x4062AC36, 0x4063A820, 0x00000002, 0x4062AC37, + 0x4063A820, 0x00000002, 0x4062AC38, 0x4063A820, 0x00000002, 0x4062AC39, + 0x4063A820, 0x00000002, 0x4062AC3A, 0x4063A820, 0x00000002, 0x4062AC3B, + 0x4063A820, 0x00000002, 0x4062AC3C, 0x4063A820, 0x00000002, 0x4062AC3D, + 0x4063A820, 0x00000002, 0x4062AC3E, 0x4063A820, 0x00000002, 0x4062AC3F, + 0x4063A820, 0x00000002, 0x4062AC40, 0x4063A820, + // Block 263, offset 0x41c0 + 0x00000002, 0x4062AC41, 0x4063A820, 0x00000002, 0x4062AC42, 0x4063A820, + 0x00000002, 0x4062AC43, 0x4063A820, 0x00000002, 0x4062AC44, 0x4063A820, + 0x00000002, 0x4062AC45, 0x4063A820, 0x00000002, 0x4062AC46, 0x4063A820, + 0x00000002, 0x4062AC47, 0x4063A820, 0x00000002, 0x4062AC48, 0x4063A820, + 0x00000002, 0x4062AC49, 0x4063A820, 0x00000002, 0x4062AC4A, 0x4063A820, + 0x00000002, 0x4062AC4B, 0x4063A820, 0x00000002, 0x4062AC4C, 0x4063A820, + 0x00000003, 0x4062AC21, 0x4063A820, 0x40646420, 0x00000003, 0x4062AC22, + 0x4063A820, 0x40646420, 0x00000003, 0x4062AC23, 0x4063A820, 0x40646420, + 0x00000003, 0x4062AC24, 0x4063A820, 0x40646420, 0x00000003, 0x4062AC25, + 0x4063A820, 0x40646420, 0x00000003, 0x4062AC26, 0x4063A820, 0x40646420, + 0x00000003, 0x4062AC27, 0x4063A820, 0x40646420, + // Block 264, offset 0x4200 + 0x00000003, 0x4062AC28, 0x4063A820, 0x40646420, 0x00000003, 0x4062AC29, + 0x4063A820, 0x40646420, 0x00000003, 0x4062AC2A, 0x4063A820, 0x40646420, + 0x00000003, 0x4062AC2B, 0x4063A820, 0x40646420, 0x00000003, 0x4062AC2C, + 0x4063A820, 0x40646420, 0x00000003, 0x4062AC2D, 0x4063A820, 0x40646420, + 0x00000003, 0x4062AC2E, 0x4063A820, 0x40646420, 0x00000003, 0x4062AC2F, + 0x4063A820, 0x40646420, 0x00000003, 0x4062AC30, 0x4063A820, 0x40646420, + 0x00000003, 0x4062AC31, 0x4063A820, 0x40646420, 0x00000003, 0x4062AC21, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062AC22, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062AC23, 0x4063A820, 0x40646A20, 0x00000003, 0x4062AC24, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062AC25, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062AC26, 0x4063A820, 0x40646A20, + // Block 265, offset 0x4240 + 0x00000003, 0x4062AC27, 0x4063A820, 0x40646A20, 0x00000003, 0x4062AC28, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062AC29, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062AC2A, 0x4063A820, 0x40646A20, 0x00000003, 0x4062AC2B, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062AC2C, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062AC2D, 0x4063A820, 0x40646A20, 0x00000003, 0x4062AC2E, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062AC2F, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062AC30, 0x4063A820, 0x40646A20, 0x00000003, 0x4062AC31, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062AC32, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062AC33, 0x4063A820, 0x40646A20, 0x00000003, 0x4062AC34, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062AC35, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062AC36, 0x4063A820, 0x40646A20, + // Block 266, offset 0x4280 + 0x00000003, 0x4062AC37, 0x4063A820, 0x40646A20, 0x00000003, 0x4062AC38, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062AC39, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062AC3A, 0x4063A820, 0x40646A20, 0x00000003, 0x4062AC3B, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062AC3C, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062AC3D, 0x4063A820, 0x40646A20, 0x00000003, 0x4062AC3E, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062AC3F, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062AC40, 0x4063A820, 0x40646A20, 0x00000003, 0x4062AC41, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062AC42, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062AC43, 0x4063A820, 0x40646A20, 0x00000003, 0x4062AC21, + 0x4063A820, 0x40647220, 0x00000003, 0x4062AC22, 0x4063A820, 0x40647220, + 0x00000003, 0x4062AC23, 0x4063A820, 0x40647220, + // Block 267, offset 0x42c0 + 0x00000003, 0x4062AC24, 0x4063A820, 0x40647220, 0x00000003, 0x4062AC25, + 0x4063A820, 0x40647220, 0x00000003, 0x4062AC26, 0x4063A820, 0x40647220, + 0x00000003, 0x4062AC27, 0x4063A820, 0x40647220, 0x00000003, 0x4062AC28, + 0x4063A820, 0x40647220, 0x00000003, 0x4062AC29, 0x4063A820, 0x40647220, + 0x00000003, 0x4062AC2A, 0x4063A820, 0x40647220, 0x00000003, 0x4062AC2B, + 0x4063A820, 0x40647220, 0x00000003, 0x4062AC2C, 0x4063A820, 0x40647220, + 0x00000003, 0x4062AC2D, 0x4063A820, 0x40647220, 0x00000003, 0x4062AC2E, + 0x4063A820, 0x40647220, 0x00000003, 0x4062AC2F, 0x4063A820, 0x40647220, + 0x00000003, 0x4062AC30, 0x4063A820, 0x40647220, 0x00000003, 0x4062AC21, + 0x4063A820, 0x40648220, 0x00000003, 0x4062AC22, 0x4063A820, 0x40648220, + 0x00000003, 0x4062AC23, 0x4063A820, 0x40648220, + // Block 268, offset 0x4300 + 0x00000003, 0x4062AC24, 0x4063A820, 0x40648220, 0x00000003, 0x4062AC25, + 0x4063A820, 0x40648220, 0x00000003, 0x4062AC26, 0x4063A820, 0x40648220, + 0x00000003, 0x4062AC27, 0x4063A820, 0x40648220, 0x00000003, 0x4062AC28, + 0x4063A820, 0x40648220, 0x00000003, 0x4062AC29, 0x4063A820, 0x40648220, + 0x00000003, 0x4062AC2A, 0x4063A820, 0x40648220, 0x00000003, 0x4062AC2B, + 0x4063A820, 0x40648220, 0x00000003, 0x4062AC2C, 0x4063A820, 0x40648220, + 0x00000003, 0x4062AC2D, 0x4063A820, 0x40648220, 0x00000003, 0x4062AC2E, + 0x4063A820, 0x40648220, 0x00000003, 0x4062AC2F, 0x4063A820, 0x40648220, + 0x00000003, 0x4062AC30, 0x4063A820, 0x40648220, 0x00000003, 0x4062AC31, + 0x4063A820, 0x40648220, 0x00000003, 0x4062AC32, 0x4063A820, 0x40648220, + 0x00000003, 0x4062AC33, 0x4063A820, 0x40648220, + // Block 269, offset 0x4340 + 0x00000003, 0x4062AC34, 0x4063A820, 0x40648220, 0x00000003, 0x4062AC35, + 0x4063A820, 0x40648220, 0x00000003, 0x4062AC36, 0x4063A820, 0x40648220, + 0x00000003, 0x4062AC37, 0x4063A820, 0x40648220, 0x00000003, 0x4062AC38, + 0x4063A820, 0x40648220, 0x00000003, 0x4062AC39, 0x4063A820, 0x40648220, + 0x00000003, 0x4062AC3A, 0x4063A820, 0x40648220, 0x00000003, 0x4062AC3B, + 0x4063A820, 0x40648220, 0x00000003, 0x4062AC3C, 0x4063A820, 0x40648220, + 0x00000003, 0x4062AC3D, 0x4063A820, 0x40648220, 0x00000003, 0x4062AC3E, + 0x4063A820, 0x40648220, 0x00000003, 0x4062AC3F, 0x4063A820, 0x40648220, + 0x00000003, 0x4062AC40, 0x4063A820, 0x40648220, 0x00000003, 0x4062AC41, + 0x4063A820, 0x40648220, 0x00000003, 0x4062AC42, 0x4063A820, 0x40648220, + 0x00000003, 0x4062AC43, 0x4063A820, 0x40648220, + // Block 270, offset 0x4380 + 0x00000003, 0x4062AC21, 0x4063A820, 0x40648420, 0x00000003, 0x4062AC22, + 0x4063A820, 0x40648420, 0x00000003, 0x4062AC23, 0x4063A820, 0x40648420, + 0x00000003, 0x4062AC24, 0x4063A820, 0x40648420, 0x00000003, 0x4062AC25, + 0x4063A820, 0x40648420, 0x00000003, 0x4062AC26, 0x4063A820, 0x40648420, + 0x00000003, 0x4062AC27, 0x4063A820, 0x40648420, 0x00000003, 0x4062AC21, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062AC22, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062AC23, 0x4063A820, 0x40648C20, 0x00000003, 0x4062AC24, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062AC25, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062AC26, 0x4063A820, 0x40648C20, 0x00000003, 0x4062AC27, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062AC28, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062AC29, 0x4063A820, 0x40648C20, + // Block 271, offset 0x43c0 + 0x00000003, 0x4062AC2A, 0x4063A820, 0x40648C20, 0x00000003, 0x4062AC2B, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062AC2C, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062AC2D, 0x4063A820, 0x40648C20, 0x00000003, 0x4062AC2E, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062AC2F, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062AC30, 0x4063A820, 0x40648C20, 0x00000003, 0x4062AC31, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062AC32, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062AC33, 0x4063A820, 0x40648C20, 0x00000003, 0x4062AC34, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062AC35, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062AC36, 0x4063A820, 0x40648C20, 0x00000003, 0x4062AC37, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062AC38, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062AC39, 0x4063A820, 0x40648C20, + // Block 272, offset 0x4400 + 0x00000003, 0x4062AC3A, 0x4063A820, 0x40648C20, 0x00000003, 0x4062AC3B, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062AC3C, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062AC3D, 0x4063A820, 0x40648C20, 0x00000003, 0x4062AC3E, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062AC3F, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062AC40, 0x4063A820, 0x40648C20, 0x00000003, 0x4062AC41, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062AC42, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062AC43, 0x4063A820, 0x40648C20, 0x00000003, 0x4062AC44, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062AC45, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062AC46, 0x4063A820, 0x40648C20, 0x00000003, 0x4062AC47, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062AC48, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062AC49, 0x4063A820, 0x40648C20, + // Block 273, offset 0x4440 + 0x00000002, 0x4062AC21, 0x4063AA20, 0x00000002, 0x4062AC22, 0x4063AA20, + 0x00000002, 0x4062AC23, 0x4063AA20, 0x00000002, 0x4062AC24, 0x4063AA20, + 0x00000002, 0x4062AC25, 0x4063AA20, 0x00000002, 0x4062AC26, 0x4063AA20, + 0x00000002, 0x4062AC27, 0x4063AA20, 0x00000002, 0x4062AC28, 0x4063AA20, + 0x00000002, 0x4062AC29, 0x4063AA20, 0x00000002, 0x4062AC2A, 0x4063AA20, + 0x00000002, 0x4062AC2B, 0x4063AA20, 0x00000002, 0x4062AC2C, 0x4063AA20, + 0x00000002, 0x4062AC2D, 0x4063AA20, 0x00000002, 0x4062AC2E, 0x4063AA20, + 0x00000002, 0x4062AC2F, 0x4063AA20, 0x00000002, 0x4062AC30, 0x4063AA20, + 0x00000002, 0x4062AC31, 0x4063AA20, 0x00000002, 0x4062AC32, 0x4063AA20, + 0x00000002, 0x4062AC33, 0x4063AA20, 0x00000002, 0x4062AC34, 0x4063AA20, + 0x00000002, 0x4062AC35, 0x4063AA20, 0x00000002, + // Block 274, offset 0x4480 + 0x4062AC36, 0x4063AA20, 0x00000002, 0x4062AC37, 0x4063AA20, 0x00000002, + 0x4062AC38, 0x4063AA20, 0x00000002, 0x4062AC39, 0x4063AA20, 0x00000002, + 0x4062AC3A, 0x4063AA20, 0x00000003, 0x4062AC21, 0x4063AA20, 0x40646420, + 0x00000003, 0x4062AC22, 0x4063AA20, 0x40646420, 0x00000003, 0x4062AC21, + 0x4063AA20, 0x40648C20, 0x00000003, 0x4062AC22, 0x4063AA20, 0x40648C20, + 0x00000003, 0x4062AC23, 0x4063AA20, 0x40648C20, 0x00000003, 0x4062AC24, + 0x4063AA20, 0x40648C20, 0x00000003, 0x4062AC25, 0x4063AA20, 0x40648C20, + 0x00000003, 0x4062AC26, 0x4063AA20, 0x40648C20, 0x00000003, 0x4062AC21, + 0x4063AC20, 0x40646420, 0x00000002, 0x4062AC21, 0x4063B020, 0x00000002, + 0x4062AC22, 0x4063B020, 0x00000002, 0x4062AC23, 0x4063B020, 0x00000002, + 0x4062AC24, 0x4063B020, 0x00000002, 0x4062AC25, + // Block 275, offset 0x44c0 + 0x4063B020, 0x00000002, 0x4062AC26, 0x4063B020, 0x00000002, 0x4062AC27, + 0x4063B020, 0x00000002, 0x4062AC28, 0x4063B020, 0x00000002, 0x4062AC29, + 0x4063B020, 0x00000002, 0x4062AC2A, 0x4063B020, 0x00000002, 0x4062AC2B, + 0x4063B020, 0x00000002, 0x4062AC2C, 0x4063B020, 0x00000002, 0x4062AC2D, + 0x4063B020, 0x00000002, 0x4062AC2E, 0x4063B020, 0x00000002, 0x4062AC2F, + 0x4063B020, 0x00000002, 0x4062AC30, 0x4063B020, 0x00000002, 0x4062AC31, + 0x4063B020, 0x00000002, 0x4062AC32, 0x4063B020, 0x00000002, 0x4062AC33, + 0x4063B020, 0x00000002, 0x4062AC34, 0x4063B020, 0x00000002, 0x4062AC35, + 0x4063B020, 0x00000002, 0x4062AC36, 0x4063B020, 0x00000002, 0x4062AC37, + 0x4063B020, 0x00000002, 0x4062AC38, 0x4063B020, 0x00000002, 0x4062AC39, + 0x4063B020, 0x00000002, 0x4062AC3A, 0x4063B020, + // Block 276, offset 0x4500 + 0x00000002, 0x4062AC3B, 0x4063B020, 0x00000002, 0x4062AC3C, 0x4063B020, + 0x00000002, 0x4062AC3D, 0x4063B020, 0x00000002, 0x4062AC3E, 0x4063B020, + 0x00000003, 0x4062AC21, 0x4063B020, 0x40646A20, 0x00000003, 0x4062AC22, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062AC23, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062AC24, 0x4063B020, 0x40646A20, 0x00000003, 0x4062AC25, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062AC26, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062AC27, 0x4063B020, 0x40646A20, 0x00000003, 0x4062AC28, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062AC29, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062AC2A, 0x4063B020, 0x40646A20, 0x00000003, 0x4062AC2B, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062AC2C, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062AC2D, 0x4063B020, 0x40646A20, + // Block 277, offset 0x4540 + 0x00000003, 0x4062AC2E, 0x4063B020, 0x40646A20, 0x00000003, 0x4062AC2F, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062AC30, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062AC31, 0x4063B020, 0x40646A20, 0x00000003, 0x4062AC32, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062AC21, 0x4063B020, 0x40647220, + 0x00000003, 0x4062AC22, 0x4063B020, 0x40647220, 0x00000003, 0x4062AC23, + 0x4063B020, 0x40647220, 0x00000003, 0x4062AC24, 0x4063B020, 0x40647220, + 0x00000003, 0x4062AC25, 0x4063B020, 0x40647220, 0x00000003, 0x4062AC26, + 0x4063B020, 0x40647220, 0x00000003, 0x4062AC27, 0x4063B020, 0x40647220, + 0x00000003, 0x4062AC21, 0x4063B020, 0x40648220, 0x00000003, 0x4062AC22, + 0x4063B020, 0x40648220, 0x00000003, 0x4062AC23, 0x4063B020, 0x40648220, + 0x00000003, 0x4062AC24, 0x4063B020, 0x40648220, + // Block 278, offset 0x4580 + 0x00000003, 0x4062AC25, 0x4063B020, 0x40648220, 0x00000003, 0x4062AC26, + 0x4063B020, 0x40648220, 0x00000003, 0x4062AC27, 0x4063B020, 0x40648220, + 0x00000003, 0x4062AC28, 0x4063B020, 0x40648220, 0x00000003, 0x4062AC29, + 0x4063B020, 0x40648220, 0x00000003, 0x4062AC21, 0x4063B020, 0x40648420, + 0x00000003, 0x4062AC22, 0x4063B020, 0x40648420, 0x00000003, 0x4062AC23, + 0x4063B020, 0x40648420, 0x00000003, 0x4062AC24, 0x4063B020, 0x40648420, + 0x00000003, 0x4062AC25, 0x4063B020, 0x40648420, 0x00000002, 0x4062AC21, + 0x4063B220, 0x00000002, 0x4062AC22, 0x4063B220, 0x00000002, 0x4062AC23, + 0x4063B220, 0x00000003, 0x4062AC21, 0x4063B420, 0x40646420, 0x00000003, + 0x4062AC22, 0x4063B420, 0x40646420, 0x00000003, 0x4062AC23, 0x4063B420, + 0x40646420, 0x00000003, 0x4062AC24, 0x4063B420, + // Block 279, offset 0x45c0 + 0x40646420, 0x00000003, 0x4062AC25, 0x4063B420, 0x40646420, 0x00000003, + 0x4062AC26, 0x4063B420, 0x40646420, 0x00000003, 0x4062AC27, 0x4063B420, + 0x40646420, 0x00000003, 0x4062AC28, 0x4063B420, 0x40646420, 0x00000003, + 0x4062AC29, 0x4063B420, 0x40646420, 0x00000003, 0x4062AC2A, 0x4063B420, + 0x40646420, 0x00000003, 0x4062AC2B, 0x4063B420, 0x40646420, 0x00000003, + 0x4062AC2C, 0x4063B420, 0x40646420, 0x00000003, 0x4062AC2D, 0x4063B420, + 0x40646420, 0x00000003, 0x4062AC21, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062AC22, 0x4063B420, 0x40646A20, 0x00000003, 0x4062AC23, 0x4063B420, + 0x40646A20, 0x00000003, 0x4062AC24, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062AC25, 0x4063B420, 0x40646A20, 0x00000003, 0x4062AC26, 0x4063B420, + 0x40646A20, 0x00000003, 0x4062AC27, 0x4063B420, + // Block 280, offset 0x4600 + 0x40646A20, 0x00000003, 0x4062AC28, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062AC29, 0x4063B420, 0x40646A20, 0x00000003, 0x4062AC2A, 0x4063B420, + 0x40646A20, 0x00000003, 0x4062AC2B, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062AC2C, 0x4063B420, 0x40646A20, 0x00000003, 0x4062AC2D, 0x4063B420, + 0x40646A20, 0x00000003, 0x4062AC2E, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062AC2F, 0x4063B420, 0x40646A20, 0x00000003, 0x4062AC30, 0x4063B420, + 0x40646A20, 0x00000003, 0x4062AC31, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062AC32, 0x4063B420, 0x40646A20, 0x00000003, 0x4062AC33, 0x4063B420, + 0x40646A20, 0x00000003, 0x4062AC34, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062AC21, 0x4063B420, 0x40647220, 0x00000003, 0x4062AC22, 0x4063B420, + 0x40647220, 0x00000003, 0x4062AC23, 0x4063B420, + // Block 281, offset 0x4640 + 0x40647220, 0x00000003, 0x4062AC24, 0x4063B420, 0x40647220, 0x00000003, + 0x4062AC25, 0x4063B420, 0x40647220, 0x00000003, 0x4062AC26, 0x4063B420, + 0x40647220, 0x00000003, 0x4062AC27, 0x4063B420, 0x40647220, 0x00000003, + 0x4062AC28, 0x4063B420, 0x40647220, 0x00000003, 0x4062AC29, 0x4063B420, + 0x40647220, 0x00000003, 0x4062AC21, 0x4063B420, 0x40648220, 0x00000003, + 0x4062AC22, 0x4063B420, 0x40648220, 0x00000003, 0x4062AC23, 0x4063B420, + 0x40648220, 0x00000003, 0x4062AC24, 0x4063B420, 0x40648220, 0x00000003, + 0x4062AC25, 0x4063B420, 0x40648220, 0x00000003, 0x4062AC26, 0x4063B420, + 0x40648220, 0x00000003, 0x4062AC27, 0x4063B420, 0x40648220, 0x00000003, + 0x4062AC28, 0x4063B420, 0x40648220, 0x00000003, 0x4062AC29, 0x4063B420, + 0x40648220, 0x00000003, 0x4062AC2A, 0x4063B420, + // Block 282, offset 0x4680 + 0x40648220, 0x00000003, 0x4062AC2B, 0x4063B420, 0x40648220, 0x00000003, + 0x4062AC2C, 0x4063B420, 0x40648220, 0x00000003, 0x4062AC2D, 0x4063B420, + 0x40648220, 0x00000003, 0x4062AC2E, 0x4063B420, 0x40648220, 0x00000003, + 0x4062AC2F, 0x4063B420, 0x40648220, 0x00000003, 0x4062AC21, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062AC22, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062AC23, 0x4063B420, 0x40648C20, 0x00000003, 0x4062AC24, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062AC25, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062AC26, 0x4063B420, 0x40648C20, 0x00000003, 0x4062AC27, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062AC28, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062AC29, 0x4063B420, 0x40648C20, 0x00000003, 0x4062AC2A, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062AC2B, 0x4063B420, + // Block 283, offset 0x46c0 + 0x40648C20, 0x00000003, 0x4062AC2C, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062AC2D, 0x4063B420, 0x40648C20, 0x00000003, 0x4062AC2E, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062AC2F, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062AC30, 0x4063B420, 0x40648C20, 0x00000003, 0x4062AC31, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062AC32, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062AC33, 0x4063B420, 0x40648C20, 0x00000003, 0x4062AC34, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062AC35, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062AC36, 0x4063B420, 0x40648C20, 0x00000003, 0x4062AC37, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062AC38, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062AC39, 0x4063B420, 0x40648C20, 0x00000003, 0x4062AC3A, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062AC3B, 0x4063B420, + // Block 284, offset 0x4700 + 0x40648C20, 0x00000003, 0x4062AC3C, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062AC3D, 0x4063B420, 0x40648C20, 0x00000003, 0x4062AC3E, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062AC3F, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062AC40, 0x4063B420, 0x40648C20, 0x00000003, 0x4062AC41, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062AC42, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062AC43, 0x4063B420, 0x40648C20, 0x00000003, 0x4062AC44, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062AC45, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062AC46, 0x4063B420, 0x40648C20, 0x00000003, 0x4062AC47, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062AC48, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062AC49, 0x4063B420, 0x40648C20, 0x00000003, 0x4062AC4A, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062AC4B, 0x4063B420, + // Block 285, offset 0x4740 + 0x40648C20, 0x00000003, 0x4062AC4C, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062AC4D, 0x4063B420, 0x40648C20, 0x00000003, 0x4062AC4E, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062AC4F, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062AC50, 0x4063B420, 0x40648C20, 0x00000003, 0x4062AC51, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062AC52, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062AC53, 0x4063B420, 0x40648C20, 0x00000003, 0x4062AC54, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062AC55, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062AC56, 0x4063B420, 0x40648C20, 0x00000003, 0x4062AC57, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062AC58, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062AC59, 0x4063B420, 0x40648C20, 0x00000003, 0x4062AC5A, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062AC5B, 0x4063B420, + // Block 286, offset 0x4780 + 0x40648C20, 0x00000003, 0x4062AC5C, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062AC5D, 0x4063B420, 0x40648C20, 0x00000003, 0x4062AC5E, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062AC5F, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062AC60, 0x4063B420, 0x40648C20, 0x00000003, 0x4062AC61, 0x4063B420, + 0x40648C20, 0x00000002, 0x4062AC21, 0x4063B620, 0x00000002, 0x4062AC22, + 0x4063B620, 0x00000002, 0x4062AC23, 0x4063B620, 0x00000002, 0x4062AC24, + 0x4063B620, 0x00000002, 0x4062AC25, 0x4063B620, 0x00000002, 0x4062AC26, + 0x4063B620, 0x00000002, 0x4062AC27, 0x4063B620, 0x00000002, 0x4062AC28, + 0x4063B620, 0x00000002, 0x4062AC29, 0x4063B620, 0x00000002, 0x4062AC2A, + 0x4063B620, 0x00000002, 0x4062AC2B, 0x4063B620, 0x00000002, 0x4062AC2C, + 0x4063B620, 0x00000002, 0x4062AC2D, 0x4063B620, + // Block 287, offset 0x47c0 + 0x00000002, 0x4062AC2E, 0x4063B620, 0x00000002, 0x4062AC2F, 0x4063B620, + 0x00000002, 0x4062AC30, 0x4063B620, 0x00000002, 0x4062AC31, 0x4063B620, + 0x00000002, 0x4062AC32, 0x4063B620, 0x00000002, 0x4062AC33, 0x4063B620, + 0x00000002, 0x4062AC34, 0x4063B620, 0x00000002, 0x4062AC35, 0x4063B620, + 0x00000002, 0x4062AC36, 0x4063B620, 0x00000002, 0x4062AC37, 0x4063B620, + 0x00000002, 0x4062AC38, 0x4063B620, 0x00000002, 0x4062AC39, 0x4063B620, + 0x00000002, 0x4062AC3A, 0x4063B620, 0x00000002, 0x4062AC3B, 0x4063B620, + 0x00000002, 0x4062AC3C, 0x4063B620, 0x00000002, 0x4062AC3D, 0x4063B620, + 0x00000002, 0x4062AC3E, 0x4063B620, 0x00000002, 0x4062AC3F, 0x4063B620, + 0x00000002, 0x4062AC40, 0x4063B620, 0x00000002, 0x4062AC41, 0x4063B620, + 0x00000002, 0x4062AC42, 0x4063B620, 0x00000002, + // Block 288, offset 0x4800 + 0x4062AC43, 0x4063B620, 0x00000002, 0x4062AC44, 0x4063B620, 0x00000002, + 0x4062AC21, 0x4063B820, 0x00000002, 0x4062AC22, 0x4063B820, 0x00000002, + 0x4062AC23, 0x4063B820, 0x00000002, 0x4062AC24, 0x4063B820, 0x00000002, + 0x4062AC25, 0x4063B820, 0x00000002, 0x4062AC26, 0x4063B820, 0x00000002, + 0x4062AC27, 0x4063B820, 0x00000002, 0x4062AC28, 0x4063B820, 0x00000002, + 0x4062AC29, 0x4063B820, 0x00000002, 0x4062AC2A, 0x4063B820, 0x00000002, + 0x4062AC2B, 0x4063B820, 0x00000002, 0x4062AC2C, 0x4063B820, 0x00000002, + 0x4062AC2D, 0x4063B820, 0x00000002, 0x4062AC2E, 0x4063B820, 0x00000002, + 0x4062AC2F, 0x4063B820, 0x00000002, 0x4062AC30, 0x4063B820, 0x00000002, + 0x4062AC31, 0x4063B820, 0x00000002, 0x4062AC32, 0x4063B820, 0x00000002, + 0x4062AC33, 0x4063B820, 0x00000002, 0x4062AC34, + // Block 289, offset 0x4840 + 0x4063B820, 0x00000002, 0x4062AC35, 0x4063B820, 0x00000002, 0x4062AC36, + 0x4063B820, 0x00000002, 0x4062AC37, 0x4063B820, 0x00000002, 0x4062AC38, + 0x4063B820, 0x00000002, 0x4062AC39, 0x4063B820, 0x00000002, 0x4062AC3A, + 0x4063B820, 0x00000002, 0x4062AC3B, 0x4063B820, 0x00000002, 0x4062AC3C, + 0x4063B820, 0x00000002, 0x4062AC3D, 0x4063B820, 0x00000002, 0x4062AC3E, + 0x4063B820, 0x00000002, 0x4062AC3F, 0x4063B820, 0x00000002, 0x4062AC40, + 0x4063B820, 0x00000002, 0x4062AC41, 0x4063B820, 0x00000002, 0x4062AC42, + 0x4063B820, 0x00000002, 0x4062AC43, 0x4063B820, 0x00000002, 0x4062AC44, + 0x4063B820, 0x00000002, 0x4062AC45, 0x4063B820, 0x00000002, 0x4062AC46, + 0x4063B820, 0x00000002, 0x4062AC47, 0x4063B820, 0x00000002, 0x4062AC48, + 0x4063B820, 0x00000002, 0x4062AC49, 0x4063B820, + // Block 290, offset 0x4880 + 0x00000002, 0x4062AC4A, 0x4063B820, 0x00000002, 0x4062AC4B, 0x4063B820, + 0x00000002, 0x4062AC4C, 0x4063B820, 0x00000002, 0x4062AC4D, 0x4063B820, + 0x00000002, 0x4062AC4E, 0x4063B820, 0x00000002, 0x4062AC4F, 0x4063B820, + 0x00000002, 0x4062AC50, 0x4063B820, 0x00000002, 0x4062AC51, 0x4063B820, + 0x00000002, 0x4062AC52, 0x4063B820, 0x00000002, 0x4062AC53, 0x4063B820, + 0x00000002, 0x4062AC54, 0x4063B820, 0x00000002, 0x4062AC55, 0x4063B820, + 0x00000002, 0x4062AC56, 0x4063B820, 0x00000002, 0x4062AC57, 0x4063B820, + 0x00000002, 0x4062AC58, 0x4063B820, 0x00000002, 0x4062AC59, 0x4063B820, + 0x00000002, 0x4062AC5A, 0x4063B820, 0x00000002, 0x4062AC5B, 0x4063B820, + 0x00000002, 0x4062AC5C, 0x4063B820, 0x00000002, 0x4062AC5D, 0x4063B820, + 0x00000002, 0x4062AC5E, 0x4063B820, 0x00000002, + // Block 291, offset 0x48c0 + 0x4062AC5F, 0x4063B820, 0x00000002, 0x4062AC60, 0x4063B820, 0x00000002, + 0x4062AC61, 0x4063B820, 0x00000002, 0x4062AC62, 0x4063B820, 0x00000002, + 0x4062AC63, 0x4063B820, 0x00000003, 0x4062AC21, 0x4063B820, 0x40646420, + 0x00000003, 0x4062AC22, 0x4063B820, 0x40646420, 0x00000003, 0x4062AC23, + 0x4063B820, 0x40646420, 0x00000003, 0x4062AC24, 0x4063B820, 0x40646420, + 0x00000003, 0x4062AC25, 0x4063B820, 0x40646420, 0x00000003, 0x4062AC26, + 0x4063B820, 0x40646420, 0x00000003, 0x4062AC27, 0x4063B820, 0x40646420, + 0x00000003, 0x4062AC28, 0x4063B820, 0x40646420, 0x00000003, 0x4062AC29, + 0x4063B820, 0x40646420, 0x00000003, 0x4062AC2A, 0x4063B820, 0x40646420, + 0x00000003, 0x4062AC2B, 0x4063B820, 0x40646420, 0x00000003, 0x4062AC2C, + 0x4063B820, 0x40646420, 0x00000003, 0x4062AC21, + // Block 292, offset 0x4900 + 0x4063B820, 0x40646A20, 0x00000003, 0x4062AC22, 0x4063B820, 0x40646A20, + 0x00000003, 0x4062AC23, 0x4063B820, 0x40646A20, 0x00000003, 0x4062AC24, + 0x4063B820, 0x40646A20, 0x00000003, 0x4062AC25, 0x4063B820, 0x40646A20, + 0x00000003, 0x4062AC26, 0x4063B820, 0x40646A20, 0x00000003, 0x4062AC27, + 0x4063B820, 0x40646A20, 0x00000003, 0x4062AC28, 0x4063B820, 0x40646A20, + 0x00000003, 0x4062AC29, 0x4063B820, 0x40646A20, 0x00000003, 0x4062AC2A, + 0x4063B820, 0x40646A20, 0x00000003, 0x4062AC2B, 0x4063B820, 0x40646A20, + 0x00000003, 0x4062AC2C, 0x4063B820, 0x40646A20, 0x00000003, 0x4062AC2D, + 0x4063B820, 0x40646A20, 0x00000003, 0x4062AC2E, 0x4063B820, 0x40646A20, + 0x00000003, 0x4062AC2F, 0x4063B820, 0x40646A20, 0x00000003, 0x4062AC30, + 0x4063B820, 0x40646A20, 0x00000003, 0x4062AC31, + // Block 293, offset 0x4940 + 0x4063B820, 0x40646A20, 0x00000003, 0x4062AC32, 0x4063B820, 0x40646A20, + 0x00000003, 0x4062AC33, 0x4063B820, 0x40646A20, 0x00000003, 0x4062AC34, + 0x4063B820, 0x40646A20, 0x00000003, 0x4062AC35, 0x4063B820, 0x40646A20, + 0x00000003, 0x4062AC36, 0x4063B820, 0x40646A20, 0x00000003, 0x4062AC37, + 0x4063B820, 0x40646A20, 0x00000003, 0x4062AC38, 0x4063B820, 0x40646A20, + 0x00000003, 0x4062AC21, 0x4063B820, 0x40647220, 0x00000003, 0x4062AC22, + 0x4063B820, 0x40647220, 0x00000003, 0x4062AC23, 0x4063B820, 0x40647220, + 0x00000003, 0x4062AC24, 0x4063B820, 0x40647220, 0x00000003, 0x4062AC25, + 0x4063B820, 0x40647220, 0x00000003, 0x4062AC26, 0x4063B820, 0x40647220, + 0x00000003, 0x4062AC21, 0x4063B820, 0x40648C20, 0x00000003, 0x4062AC22, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062AC23, + // Block 294, offset 0x4980 + 0x4063B820, 0x40648C20, 0x00000003, 0x4062AC24, 0x4063B820, 0x40648C20, + 0x00000003, 0x4062AC25, 0x4063B820, 0x40648C20, 0x00000003, 0x4062AC26, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062AC27, 0x4063B820, 0x40648C20, + 0x00000003, 0x4062AC28, 0x4063B820, 0x40648C20, 0x00000003, 0x4062AC29, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062AC2A, 0x4063B820, 0x40648C20, + 0x00000003, 0x4062AC2B, 0x4063B820, 0x40648C20, 0x00000003, 0x4062AC2C, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062AC2D, 0x4063B820, 0x40648C20, + 0x00000003, 0x4062AC2E, 0x4063B820, 0x40648C20, 0x00000003, 0x4062AC2F, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062AC30, 0x4063B820, 0x40648C20, + 0x00000003, 0x4062AC31, 0x4063B820, 0x40648C20, 0x00000003, 0x4062AC32, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062AC33, + // Block 295, offset 0x49c0 + 0x4063B820, 0x40648C20, 0x00000003, 0x4062AC34, 0x4063B820, 0x40648C20, + 0x00000003, 0x4062AC35, 0x4063B820, 0x40648C20, 0x00000003, 0x4062AC36, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062AC37, 0x4063B820, 0x40648C20, + 0x00000003, 0x4062AC38, 0x4063B820, 0x40648C20, 0x00000003, 0x4062AC39, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062AC3A, 0x4063B820, 0x40648C20, + 0x00000003, 0x4062AC3B, 0x4063B820, 0x40648C20, 0x00000003, 0x4062AC3C, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062AC21, 0x4063B820, 0x40648E20, + 0x00000002, 0x4062AC21, 0x4063BA20, 0x00000002, 0x4062AC22, 0x4063BA20, + 0x00000002, 0x4062AC23, 0x4063BA20, 0x00000002, 0x4062AC24, 0x4063BA20, + 0x00000002, 0x4062AC25, 0x4063BA20, 0x00000002, 0x4062AC26, 0x4063BA20, + 0x00000002, 0x4062AC27, 0x4063BA20, 0x00000002, + // Block 296, offset 0x4a00 + 0x4062AC28, 0x4063BA20, 0x00000002, 0x4062AC29, 0x4063BA20, 0x00000002, + 0x4062AC2A, 0x4063BA20, 0x00000002, 0x4062AC2B, 0x4063BA20, 0x00000002, + 0x4062AC2C, 0x4063BA20, 0x00000002, 0x4062AC2D, 0x4063BA20, 0x00000002, + 0x4062AC2E, 0x4063BA20, 0x00000002, 0x4062AC2F, 0x4063BA20, 0x00000002, + 0x4062AC30, 0x4063BA20, 0x00000002, 0x4062AC31, 0x4063BA20, 0x00000002, + 0x4062AC32, 0x4063BA20, 0x00000002, 0x4062AC33, 0x4063BA20, 0x00000002, + 0x4062AC34, 0x4063BA20, 0x00000002, 0x4062AC35, 0x4063BA20, 0x00000002, + 0x4062AC36, 0x4063BA20, 0x00000002, 0x4062AC37, 0x4063BA20, 0x00000002, + 0x4062AC38, 0x4063BA20, 0x00000002, 0x4062AC39, 0x4063BA20, 0x00000003, + 0x4062AC21, 0x4063BA20, 0x40646420, 0x00000003, 0x4062AC22, 0x4063BA20, + 0x40646420, 0x00000003, 0x4062AC23, 0x4063BA20, + // Block 297, offset 0x4a40 + 0x40646420, 0x00000003, 0x4062AC24, 0x4063BA20, 0x40646420, 0x00000003, + 0x4062AC25, 0x4063BA20, 0x40646420, 0x00000003, 0x4062AC26, 0x4063BA20, + 0x40646420, 0x00000003, 0x4062AC27, 0x4063BA20, 0x40646420, 0x00000003, + 0x4062AC28, 0x4063BA20, 0x40646420, 0x00000003, 0x4062AC29, 0x4063BA20, + 0x40646420, 0x00000003, 0x4062AC21, 0x4063BA20, 0x40646A20, 0x00000003, + 0x4062AC22, 0x4063BA20, 0x40646A20, 0x00000003, 0x4062AC23, 0x4063BA20, + 0x40646A20, 0x00000003, 0x4062AC24, 0x4063BA20, 0x40646A20, 0x00000003, + 0x4062AC25, 0x4063BA20, 0x40646A20, 0x00000003, 0x4062AC26, 0x4063BA20, + 0x40646A20, 0x00000003, 0x4062AC27, 0x4063BA20, 0x40646A20, 0x00000003, + 0x4062AC28, 0x4063BA20, 0x40646A20, 0x00000003, 0x4062AC29, 0x4063BA20, + 0x40646A20, 0x00000003, 0x4062AC2A, 0x4063BA20, + // Block 298, offset 0x4a80 + 0x40646A20, 0x00000003, 0x4062AC2B, 0x4063BA20, 0x40646A20, 0x00000003, + 0x4062AC2C, 0x4063BA20, 0x40646A20, 0x00000003, 0x4062AC2D, 0x4063BA20, + 0x40646A20, 0x00000003, 0x4062AC2E, 0x4063BA20, 0x40646A20, 0x00000003, + 0x4062AC2F, 0x4063BA20, 0x40646A20, 0x00000003, 0x4062AC30, 0x4063BA20, + 0x40646A20, 0x00000003, 0x4062AC31, 0x4063BA20, 0x40646A20, 0x00000003, + 0x4062AC32, 0x4063BA20, 0x40646A20, 0x00000003, 0x4062AC33, 0x4063BA20, + 0x40646A20, 0x00000003, 0x4062AC34, 0x4063BA20, 0x40646A20, 0x00000003, + 0x4062AC35, 0x4063BA20, 0x40646A20, 0x00000003, 0x4062AC36, 0x4063BA20, + 0x40646A20, 0x00000003, 0x4062AC37, 0x4063BA20, 0x40646A20, 0x00000003, + 0x4062AC38, 0x4063BA20, 0x40646A20, 0x00000003, 0x4062AC39, 0x4063BA20, + 0x40646A20, 0x00000003, 0x4062AC3A, 0x4063BA20, + // Block 299, offset 0x4ac0 + 0x40646A20, 0x00000003, 0x4062AC3B, 0x4063BA20, 0x40646A20, 0x00000003, + 0x4062AC3C, 0x4063BA20, 0x40646A20, 0x00000003, 0x4062AC3D, 0x4063BA20, + 0x40646A20, 0x00000003, 0x4062AC3E, 0x4063BA20, 0x40646A20, 0x00000003, + 0x4062AC3F, 0x4063BA20, 0x40646A20, 0x00000003, 0x4062AC21, 0x4063BA20, + 0x40647220, 0x00000003, 0x4062AC22, 0x4063BA20, 0x40647220, 0x00000003, + 0x4062AC23, 0x4063BA20, 0x40647220, 0x00000003, 0x4062AC24, 0x4063BA20, + 0x40647220, 0x00000003, 0x4062AC25, 0x4063BA20, 0x40647220, 0x00000003, + 0x4062AC26, 0x4063BA20, 0x40647220, 0x00000003, 0x4062AC27, 0x4063BA20, + 0x40647220, 0x00000003, 0x4062AC28, 0x4063BA20, 0x40647220, 0x00000003, + 0x4062AC29, 0x4063BA20, 0x40647220, 0x00000003, 0x4062AC2A, 0x4063BA20, + 0x40647220, 0x00000003, 0x4062AC21, 0x4063BA20, + // Block 300, offset 0x4b00 + 0x40648C20, 0x00000003, 0x4062AC22, 0x4063BA20, 0x40648C20, 0x00000003, + 0x4062AC23, 0x4063BA20, 0x40648C20, 0x00000003, 0x4062AC24, 0x4063BA20, + 0x40648C20, 0x00000003, 0x4062AC25, 0x4063BA20, 0x40648C20, 0x00000003, + 0x4062AC26, 0x4063BA20, 0x40648C20, 0x00000003, 0x4062AC27, 0x4063BA20, + 0x40648C20, 0x00000003, 0x4062AC28, 0x4063BA20, 0x40648C20, 0x00000003, + 0x4062AC29, 0x4063BA20, 0x40648C20, 0x00000003, 0x4062AC2A, 0x4063BA20, + 0x40648C20, 0x00000003, 0x4062AC2B, 0x4063BA20, 0x40648C20, 0x00000003, + 0x4062AC2C, 0x4063BA20, 0x40648C20, 0x00000003, 0x4062AC2D, 0x4063BA20, + 0x40648C20, 0x00000003, 0x4062AC2E, 0x4063BA20, 0x40648C20, 0x00000003, + 0x4062AC2F, 0x4063BA20, 0x40648C20, 0x00000003, 0x4062AC30, 0x4063BA20, + 0x40648C20, 0x00000003, 0x4062AC31, 0x4063BA20, + // Block 301, offset 0x4b40 + 0x40648C20, 0x00000003, 0x4062AC32, 0x4063BA20, 0x40648C20, 0x00000003, + 0x4062AC33, 0x4063BA20, 0x40648C20, 0x00000003, 0x4062AC34, 0x4063BA20, + 0x40648C20, 0x00000003, 0x4062AC35, 0x4063BA20, 0x40648C20, 0x00000003, + 0x4062AC36, 0x4063BA20, 0x40648C20, 0x00000003, 0x4062AC37, 0x4063BA20, + 0x40648C20, 0x00000003, 0x4062AC38, 0x4063BA20, 0x40648C20, 0x00000002, + 0x4062AC21, 0x4063BC20, 0x00000002, 0x4062AC22, 0x4063BC20, 0x00000002, + 0x4062AC23, 0x4063BC20, 0x00000002, 0x4062AC24, 0x4063BC20, 0x00000002, + 0x4062AC25, 0x4063BC20, 0x00000002, 0x4062AC26, 0x4063BC20, 0x00000002, + 0x4062AC27, 0x4063BC20, 0x00000002, 0x4062AC21, 0x4063BE20, 0x00000002, + 0x4062AC22, 0x4063BE20, 0x00000002, 0x4062AC23, 0x4063BE20, 0x00000002, + 0x4062AC24, 0x4063BE20, 0x00000002, 0x4062AC25, + // Block 302, offset 0x4b80 + 0x4063BE20, 0x00000002, 0x4062AC26, 0x4063BE20, 0x00000002, 0x4062AC27, + 0x4063BE20, 0x00000002, 0x4062AC28, 0x4063BE20, 0x00000002, 0x4062AC29, + 0x4063BE20, 0x00000002, 0x4062AC2A, 0x4063BE20, 0x00000002, 0x4062AC2B, + 0x4063BE20, 0x00000002, 0x4062AC2C, 0x4063BE20, 0x00000002, 0x4062AC2D, + 0x4063BE20, 0x00000002, 0x4062AC2E, 0x4063BE20, 0x00000002, 0x4062AC2F, + 0x4063BE20, 0x00000002, 0x4062AC30, 0x4063BE20, 0x00000003, 0x4062AC21, + 0x4063BE20, 0x40646420, 0x00000003, 0x4062AC21, 0x4063BE20, 0x40648C20, + 0x00000003, 0x4062AC22, 0x4063BE20, 0x40648C20, 0x00000003, 0x4062AC23, + 0x4063BE20, 0x40648C20, 0x00000003, 0x4062AC24, 0x4063BE20, 0x40648C20, + 0x00000003, 0x4062AC25, 0x4063BE20, 0x40648C20, 0x00000003, 0x4062AC26, + 0x4063BE20, 0x40648C20, 0x00000003, 0x4062AC27, + // Block 303, offset 0x4bc0 + 0x4063BE20, 0x40648C20, 0x00000003, 0x4062AC28, 0x4063BE20, 0x40648C20, + 0x00000002, 0x4062AC21, 0x4063C020, 0x00000002, 0x4062AC22, 0x4063C020, + 0x00000002, 0x4062AC23, 0x4063C020, 0x00000002, 0x4062AC24, 0x4063C020, + 0x00000002, 0x4062AC25, 0x4063C020, 0x00000002, 0x4062AC26, 0x4063C020, + 0x00000002, 0x4062AC27, 0x4063C020, 0x00000002, 0x4062AC28, 0x4063C020, + 0x00000002, 0x4062AC29, 0x4063C020, 0x00000002, 0x4062AC2A, 0x4063C020, + 0x00000002, 0x4062AC2B, 0x4063C020, 0x00000002, 0x4062AC2C, 0x4063C020, + 0x00000002, 0x4062AC2D, 0x4063C020, 0x00000002, 0x4062AC2E, 0x4063C020, + 0x00000002, 0x4062AC2F, 0x4063C020, 0x00000002, 0x4062AC30, 0x4063C020, + 0x00000002, 0x4062AC31, 0x4063C020, 0x00000002, 0x4062AC32, 0x4063C020, + 0x00000002, 0x4062AC33, 0x4063C020, 0x00000002, + // Block 304, offset 0x4c00 + 0x4062AC34, 0x4063C020, 0x00000002, 0x4062AC35, 0x4063C020, 0x00000002, + 0x4062AC36, 0x4063C020, 0x00000002, 0x4062AC37, 0x4063C020, 0x00000002, + 0x4062AC38, 0x4063C020, 0x00000002, 0x4062AC39, 0x4063C020, 0x00000002, + 0x4062AC3A, 0x4063C020, 0x00000002, 0x4062AC3B, 0x4063C020, 0x00000002, + 0x4062AC3C, 0x4063C020, 0x00000002, 0x4062AC3D, 0x4063C020, 0x00000002, + 0x4062AC3E, 0x4063C020, 0x00000002, 0x4062AC3F, 0x4063C020, 0x00000002, + 0x4062AC40, 0x4063C020, 0x00000002, 0x4062AC41, 0x4063C020, 0x00000002, + 0x4062AC42, 0x4063C020, 0x00000002, 0x4062AC43, 0x4063C020, 0x00000002, + 0x4062AC44, 0x4063C020, 0x00000002, 0x4062AC45, 0x4063C020, 0x00000002, + 0x4062AC46, 0x4063C020, 0x00000002, 0x4062AC47, 0x4063C020, 0x00000002, + 0x4062AC48, 0x4063C020, 0x00000002, 0x4062AC49, + // Block 305, offset 0x4c40 + 0x4063C020, 0x00000002, 0x4062AC4A, 0x4063C020, 0x00000002, 0x4062AC4B, + 0x4063C020, 0x00000002, 0x4062AC4C, 0x4063C020, 0x00000002, 0x4062AC21, + 0x4063C220, 0x00000002, 0x4062AC22, 0x4063C220, 0x00000002, 0x4062AC23, + 0x4063C220, 0x00000002, 0x4062AC24, 0x4063C220, 0x00000002, 0x4062AC25, + 0x4063C220, 0x00000002, 0x4062AC26, 0x4063C220, 0x00000002, 0x4062AC27, + 0x4063C220, 0x00000002, 0x4062AC28, 0x4063C220, 0x00000002, 0x4062AC29, + 0x4063C220, 0x00000002, 0x4062AC2A, 0x4063C220, 0x00000002, 0x4062AC2B, + 0x4063C220, 0x00000002, 0x4062AC2C, 0x4063C220, 0x00000002, 0x4062AC2D, + 0x4063C220, 0x00000002, 0x4062AC2E, 0x4063C220, 0x00000002, 0x4062AC2F, + 0x4063C220, 0x00000002, 0x4062AC30, 0x4063C220, 0x00000002, 0x4062AC31, + 0x4063C220, 0x00000002, 0x4062AC32, 0x4063C220, + // Block 306, offset 0x4c80 + 0x00000002, 0x4062AC33, 0x4063C220, 0x00000002, 0x4062AC34, 0x4063C220, + 0x00000002, 0x4062AC35, 0x4063C220, 0x00000002, 0x4062AC36, 0x4063C220, + 0x00000002, 0x4062AC37, 0x4063C220, 0x00000002, 0x4062AC38, 0x4063C220, + 0x00000002, 0x4062AC39, 0x4063C220, 0x00000002, 0x4062AC3A, 0x4063C220, + 0x00000002, 0x4062AC3B, 0x4063C220, 0x00000002, 0x4062AC3C, 0x4063C220, + 0x00000002, 0x4062AC3D, 0x4063C220, 0x00000002, 0x4062AC3E, 0x4063C220, + 0x00000002, 0x4062AC3F, 0x4063C220, 0x00000002, 0x4062AC40, 0x4063C220, + 0x00000002, 0x4062AC41, 0x4063C220, 0x00000002, 0x4062AC42, 0x4063C220, + 0x00000002, 0x4062AC43, 0x4063C220, 0x00000002, 0x4062AC44, 0x4063C220, + 0x00000002, 0x4062AC45, 0x4063C220, 0x00000002, 0x4062AC46, 0x4063C220, + 0x00000002, 0x4062AC47, 0x4063C220, 0x00000002, + // Block 307, offset 0x4cc0 + 0x4062AC48, 0x4063C220, 0x00000002, 0x4062AC49, 0x4063C220, 0x00000002, + 0x4062AC4A, 0x4063C220, 0x00000002, 0x4062AC4B, 0x4063C220, 0x00000002, + 0x4062AC4C, 0x4063C220, 0x00000002, 0x4062AC4D, 0x4063C220, 0x00000002, + 0x4062AC4E, 0x4063C220, 0x00000002, 0x4062AC4F, 0x4063C220, 0x00000002, + 0x4062AC50, 0x4063C220, 0x00000002, 0x4062AC51, 0x4063C220, 0x00000002, + 0x4062AC52, 0x4063C220, 0x00000002, 0x4062AC53, 0x4063C220, 0x00000002, + 0x4062AC54, 0x4063C220, 0x00000002, 0x4062AC55, 0x4063C220, 0x00000002, + 0x4062AC56, 0x4063C220, 0x00000002, 0x4062AC57, 0x4063C220, 0x00000002, + 0x4062AC58, 0x4063C220, 0x00000002, 0x4062AC59, 0x4063C220, 0x00000002, + 0x4062AC5A, 0x4063C220, 0x00000002, 0x4062AC5B, 0x4063C220, 0x00000002, + 0x4062AC5C, 0x4063C220, 0x00000002, 0x4062AC5D, + // Block 308, offset 0x4d00 + 0x4063C220, 0x00000002, 0x4062AC5E, 0x4063C220, 0x00000002, 0x4062AC5F, + 0x4063C220, 0x00000002, 0x4062AC60, 0x4063C220, 0x00000002, 0x4062AC61, + 0x4063C220, 0x00000002, 0x4062AC62, 0x4063C220, 0x00000002, 0x4062AC63, + 0x4063C220, 0x00000002, 0x4062AC64, 0x4063C220, 0x00000002, 0x4062AC65, + 0x4063C220, 0x00000002, 0x4062AC66, 0x4063C220, 0x00000002, 0x4062AC67, + 0x4063C220, 0x00000002, 0x4062AC68, 0x4063C220, 0x00000002, 0x4062AC69, + 0x4063C220, 0x00000002, 0x4062AC6A, 0x4063C220, 0x00000002, 0x4062AC6B, + 0x4063C220, 0x00000002, 0x4062AC6C, 0x4063C220, 0x00000002, 0x4062AC6D, + 0x4063C220, 0x00000002, 0x4062AC6E, 0x4063C220, 0x00000002, 0x4062AC6F, + 0x4063C220, 0x00000002, 0x4062AC70, 0x4063C220, 0x00000002, 0x4062AC71, + 0x4063C220, 0x00000002, 0x4062AC72, 0x4063C220, + // Block 309, offset 0x4d40 + 0x00000002, 0x4062AC73, 0x4063C220, 0x00000002, 0x4062AC74, 0x4063C220, + 0x00000002, 0x4062AC75, 0x4063C220, 0x00000002, 0x4062AC76, 0x4063C220, + 0x00000002, 0x4062AC77, 0x4063C220, 0x00000002, 0x4062AC78, 0x4063C220, + 0x00000002, 0x4062AC79, 0x4063C220, 0x00000002, 0x4062AC7A, 0x4063C220, + 0x00000002, 0x4062AC7B, 0x4063C220, 0x00000002, 0x4062AC7C, 0x4063C220, + 0x00000002, 0x4062AC7D, 0x4063C220, 0x00000002, 0x4062AC7E, 0x4063C220, + 0x00000002, 0x4062AC7F, 0x4063C220, 0x00000002, 0x4062AC80, 0x4063C220, + 0x00000002, 0x4062AC81, 0x4063C220, 0x00000002, 0x4062AC82, 0x4063C220, + 0x00000002, 0x4062AC83, 0x4063C220, 0x00000002, 0x4062AC84, 0x4063C220, + 0x00000002, 0x4062AC85, 0x4063C220, 0x00000002, 0x4062AC86, 0x4063C220, + 0x00000002, 0x4062AC87, 0x4063C220, 0x00000003, + // Block 310, offset 0x4d80 + 0x4062AC21, 0x4063C220, 0x40646420, 0x00000003, 0x4062AC22, 0x4063C220, + 0x40646420, 0x00000003, 0x4062AC23, 0x4063C220, 0x40646420, 0x00000003, + 0x4062AC24, 0x4063C220, 0x40646420, 0x00000003, 0x4062AC25, 0x4063C220, + 0x40646420, 0x00000003, 0x4062AC26, 0x4063C220, 0x40646420, 0x00000003, + 0x4062AC27, 0x4063C220, 0x40646420, 0x00000003, 0x4062AC28, 0x4063C220, + 0x40646420, 0x00000003, 0x4062AC29, 0x4063C220, 0x40646420, 0x00000003, + 0x4062AC2A, 0x4063C220, 0x40646420, 0x00000003, 0x4062AC21, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062AC22, 0x4063C220, 0x40646A20, 0x00000003, + 0x4062AC23, 0x4063C220, 0x40646A20, 0x00000003, 0x4062AC24, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062AC25, 0x4063C220, 0x40646A20, 0x00000003, + 0x4062AC26, 0x4063C220, 0x40646A20, 0x00000003, + // Block 311, offset 0x4dc0 + 0x4062AC27, 0x4063C220, 0x40646A20, 0x00000003, 0x4062AC28, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062AC29, 0x4063C220, 0x40646A20, 0x00000003, + 0x4062AC21, 0x4063C220, 0x40647220, 0x00000003, 0x4062AC22, 0x4063C220, + 0x40647220, 0x00000003, 0x4062AC23, 0x4063C220, 0x40647220, 0x00000003, + 0x4062AC24, 0x4063C220, 0x40647220, 0x00000003, 0x4062AC25, 0x4063C220, + 0x40647220, 0x00000003, 0x4062AC26, 0x4063C220, 0x40647220, 0x00000003, + 0x4062AC27, 0x4063C220, 0x40647220, 0x00000003, 0x4062AC28, 0x4063C220, + 0x40647220, 0x00000003, 0x4062AC21, 0x4063C220, 0x40648C20, 0x00000003, + 0x4062AC22, 0x4063C220, 0x40648C20, 0x00000003, 0x4062AC23, 0x4063C220, + 0x40648C20, 0x00000003, 0x4062AC24, 0x4063C220, 0x40648C20, 0x00000003, + 0x4062AC25, 0x4063C220, 0x40648C20, 0x00000003, + // Block 312, offset 0x4e00 + 0x4062AC26, 0x4063C220, 0x40648C20, 0x00000003, 0x4062AC27, 0x4063C220, + 0x40648C20, 0x00000003, 0x4062AC21, 0x4063C420, 0x40646A20, 0x00000003, + 0x4062AC22, 0x4063C420, 0x40646A20, 0x00000003, 0x4062AC23, 0x4063C420, + 0x40646A20, 0x00000003, 0x4062AC24, 0x4063C420, 0x40646A20, 0x00000003, + 0x4062AC25, 0x4063C420, 0x40646A20, 0x00000003, 0x4062AC26, 0x4063C420, + 0x40646A20, 0x00000003, 0x4062AC27, 0x4063C420, 0x40646A20, 0x00000003, + 0x4062AC28, 0x4063C420, 0x40646A20, 0x00000003, 0x4062AC29, 0x4063C420, + 0x40646A20, 0x00000003, 0x4062AC2A, 0x4063C420, 0x40646A20, 0x00000003, + 0x4062AC2B, 0x4063C420, 0x40646A20, 0x00000003, 0x4062AC2C, 0x4063C420, + 0x40646A20, 0x00000003, 0x4062AC2D, 0x4063C420, 0x40646A20, 0x00000003, + 0x4062AC2E, 0x4063C420, 0x40646A20, 0x00000003, + // Block 313, offset 0x4e40 + 0x4062AC2F, 0x4063C420, 0x40646A20, 0x00000003, 0x4062AC30, 0x4063C420, + 0x40646A20, 0x00000003, 0x4062AC21, 0x4063C420, 0x40647220, 0x00000003, + 0x4062AC22, 0x4063C420, 0x40647220, 0x00000003, 0x4062AC23, 0x4063C420, + 0x40647220, 0x00000003, 0x4062AC24, 0x4063C420, 0x40647220, 0x00000003, + 0x4062AC25, 0x4063C420, 0x40647220, 0x00000002, 0x4062AC21, 0x4063C620, + 0x00000002, 0x4062AC22, 0x4063C620, 0x00000002, 0x4062AC23, 0x4063C620, + 0x00000002, 0x4062AC24, 0x4063C620, 0x00000002, 0x4062AC25, 0x4063C620, + 0x00000002, 0x4062AC26, 0x4063C620, 0x00000002, 0x4062AC27, 0x4063C620, + 0x00000002, 0x4062AC28, 0x4063C620, 0x00000002, 0x4062AC29, 0x4063C620, + 0x00000002, 0x4062AC2A, 0x4063C620, 0x00000002, 0x4062AC2B, 0x4063C620, + 0x00000002, 0x4062AC2C, 0x4063C620, 0x00000002, + // Block 314, offset 0x4e80 + 0x4062AC2D, 0x4063C620, 0x00000002, 0x4062AC2E, 0x4063C620, 0x00000002, + 0x4062AC2F, 0x4063C620, 0x00000002, 0x4062AC30, 0x4063C620, 0x00000002, + 0x4062AC31, 0x4063C620, 0x00000002, 0x4062AC32, 0x4063C620, 0x00000002, + 0x4062AC33, 0x4063C620, 0x00000002, 0x4062AC34, 0x4063C620, 0x00000002, + 0x4062AC21, 0x4063C820, 0x00000002, 0x4062AC22, 0x4063C820, 0x00000002, + 0x4062AC23, 0x4063C820, 0x00000002, 0x4062AC24, 0x4063C820, 0x00000002, + 0x4062AC21, 0x4063CA20, 0x00000002, 0x4062AC22, 0x4063CA20, 0x00000002, + 0x4062AC23, 0x4063CA20, 0x00000002, 0x4062AC24, 0x4063CA20, 0x00000002, + 0x4062AC25, 0x4063CA20, 0x00000002, 0x4062AC26, 0x4063CA20, 0x00000002, + 0x4062AC27, 0x4063CA20, 0x00000002, 0x4062AC28, 0x4063CA20, 0x00000002, + 0x4062AC29, 0x4063CA20, 0x00000002, 0x4062AC2A, + // Block 315, offset 0x4ec0 + 0x4063CA20, 0x00000002, 0x4062AC2B, 0x4063CA20, 0x00000002, 0x4062AC2C, + 0x4063CA20, 0x00000002, 0x4062AC2D, 0x4063CA20, 0x00000002, 0x4062AC2E, + 0x4063CA20, 0x00000002, 0x4062AC2F, 0x4063CA20, 0x00000002, 0x4062AC30, + 0x4063CA20, 0x00000002, 0x4062AC31, 0x4063CA20, 0x00000002, 0x4062AC32, + 0x4063CA20, 0x00000002, 0x4062AC33, 0x4063CA20, 0x00000002, 0x4062AC34, + 0x4063CA20, 0x00000002, 0x4062AC35, 0x4063CA20, 0x00000002, 0x4062AC36, + 0x4063CA20, 0x00000002, 0x4062AC37, 0x4063CA20, 0x00000002, 0x4062AC38, + 0x4063CA20, 0x00000002, 0x4062AC39, 0x4063CA20, 0x00000002, 0x4062AC3A, + 0x4063CA20, 0x00000002, 0x4062AC3B, 0x4063CA20, 0x00000002, 0x4062AC3C, + 0x4063CA20, 0x00000002, 0x4062AC3D, 0x4063CA20, 0x00000002, 0x4062AC3E, + 0x4063CA20, 0x00000002, 0x4062AC3F, 0x4063CA20, + // Block 316, offset 0x4f00 + 0x00000002, 0x4062AC40, 0x4063CA20, 0x00000003, 0x4062AC21, 0x4063CA20, + 0x40646A20, 0x00000003, 0x4062AC22, 0x4063CA20, 0x40646A20, 0x00000003, + 0x4062AC23, 0x4063CA20, 0x40646A20, 0x00000003, 0x4062AC24, 0x4063CA20, + 0x40646A20, 0x00000003, 0x4062AC25, 0x4063CA20, 0x40646A20, 0x00000003, + 0x4062AC26, 0x4063CA20, 0x40646A20, 0x00000003, 0x4062AC27, 0x4063CA20, + 0x40646A20, 0x00000003, 0x4062AC28, 0x4063CA20, 0x40646A20, 0x00000003, + 0x4062AC21, 0x4063CA20, 0x40647220, 0x00000003, 0x4062AC21, 0x4063CC20, + 0x40646420, 0x00000003, 0x4062AC22, 0x4063CC20, 0x40646420, 0x00000003, + 0x4062AC23, 0x4063CC20, 0x40646420, 0x00000003, 0x4062AC24, 0x4063CC20, + 0x40646420, 0x00000003, 0x4062AC25, 0x4063CC20, 0x40646420, 0x00000003, + 0x4062AC26, 0x4063CC20, 0x40646420, 0x00000003, + // Block 317, offset 0x4f40 + 0x4062AC27, 0x4063CC20, 0x40646420, 0x00000003, 0x4062AC28, 0x4063CC20, + 0x40646420, 0x00000003, 0x4062AC29, 0x4063CC20, 0x40646420, 0x00000003, + 0x4062AC2A, 0x4063CC20, 0x40646420, 0x00000003, 0x4062AC2B, 0x4063CC20, + 0x40646420, 0x00000003, 0x4062AC21, 0x4063CC20, 0x40646A20, 0x00000003, + 0x4062AC22, 0x4063CC20, 0x40646A20, 0x00000003, 0x4062AC23, 0x4063CC20, + 0x40646A20, 0x00000003, 0x4062AC24, 0x4063CC20, 0x40646A20, 0x00000003, + 0x4062AC25, 0x4063CC20, 0x40646A20, 0x00000003, 0x4062AC26, 0x4063CC20, + 0x40646A20, 0x00000003, 0x4062AC27, 0x4063CC20, 0x40646A20, 0x00000003, + 0x4062AC28, 0x4063CC20, 0x40646A20, 0x00000003, 0x4062AC29, 0x4063CC20, + 0x40646A20, 0x00000003, 0x4062AC2A, 0x4063CC20, 0x40646A20, 0x00000003, + 0x4062AC2B, 0x4063CC20, 0x40646A20, 0x00000003, + // Block 318, offset 0x4f80 + 0x4062AC2C, 0x4063CC20, 0x40646A20, 0x00000003, 0x4062AC2D, 0x4063CC20, + 0x40646A20, 0x00000003, 0x4062AC2E, 0x4063CC20, 0x40646A20, 0x00000003, + 0x4062AC2F, 0x4063CC20, 0x40646A20, 0x00000003, 0x4062AC30, 0x4063CC20, + 0x40646A20, 0x00000003, 0x4062AC31, 0x4063CC20, 0x40646A20, 0x00000003, + 0x4062AC32, 0x4063CC20, 0x40646A20, 0x00000003, 0x4062AC33, 0x4063CC20, + 0x40646A20, 0x00000003, 0x4062AC34, 0x4063CC20, 0x40646A20, 0x00000003, + 0x4062AC35, 0x4063CC20, 0x40646A20, 0x00000003, 0x4062AC36, 0x4063CC20, + 0x40646A20, 0x00000003, 0x4062AC37, 0x4063CC20, 0x40646A20, 0x00000003, + 0x4062AC38, 0x4063CC20, 0x40646A20, 0x00000003, 0x4062AC39, 0x4063CC20, + 0x40646A20, 0x00000003, 0x4062AC21, 0x4063CC20, 0x40648220, 0x00000003, + 0x4062AC22, 0x4063CC20, 0x40648220, 0x00000003, + // Block 319, offset 0x4fc0 + 0x4062AC23, 0x4063CC20, 0x40648220, 0x00000003, 0x4062AC24, 0x4063CC20, + 0x40648220, 0x00000003, 0x4062AC25, 0x4063CC20, 0x40648220, 0x00000003, + 0x4062AC26, 0x4063CC20, 0x40648220, 0x00000003, 0x4062AC27, 0x4063CC20, + 0x40648220, 0x00000003, 0x4062AC28, 0x4063CC20, 0x40648220, 0x00000003, + 0x4062AC29, 0x4063CC20, 0x40648220, 0x00000003, 0x4062AC2A, 0x4063CC20, + 0x40648220, 0x00000003, 0x4062AC2B, 0x4063CC20, 0x40648220, 0x00000003, + 0x4062AC2C, 0x4063CC20, 0x40648220, 0x00000003, 0x4062AC2D, 0x4063CC20, + 0x40648220, 0x00000003, 0x4062AC2E, 0x4063CC20, 0x40648220, 0x00000003, + 0x4062AC2F, 0x4063CC20, 0x40648220, 0x00000003, 0x4062AC30, 0x4063CC20, + 0x40648220, 0x00000003, 0x4062AC31, 0x4063CC20, 0x40648220, 0x00000003, + 0x4062AC32, 0x4063CC20, 0x40648220, 0x00000003, + // Block 320, offset 0x5000 + 0x4062AC21, 0x4063CC20, 0x40648420, 0x00000003, 0x4062AC22, 0x4063CC20, + 0x40648420, 0x00000003, 0x4062AC23, 0x4063CC20, 0x40648420, 0x00000003, + 0x4062AC24, 0x4063CC20, 0x40648420, 0x00000003, 0x4062AC25, 0x4063CC20, + 0x40648420, 0x00000003, 0x4062AC26, 0x4063CC20, 0x40648420, 0x00000003, + 0x4062AC27, 0x4063CC20, 0x40648420, 0x00000003, 0x4062AC28, 0x4063CC20, + 0x40648420, 0x00000003, 0x4062AC29, 0x4063CC20, 0x40648420, 0x00000003, + 0x4062AC2A, 0x4063CC20, 0x40648420, 0x00000003, 0x4062AC2B, 0x4063CC20, + 0x40648420, 0x00000003, 0x4062AC2C, 0x4063CC20, 0x40648420, 0x00000003, + 0x4062AC2D, 0x4063CC20, 0x40648420, 0x00000003, 0x4062AC21, 0x4063CC20, + 0x40648C20, 0x00000003, 0x4062AC22, 0x4063CC20, 0x40648C20, 0x00000003, + 0x4062AC23, 0x4063CC20, 0x40648C20, 0x00000003, + // Block 321, offset 0x5040 + 0x4062AC24, 0x4063CC20, 0x40648C20, 0x00000003, 0x4062AC25, 0x4063CC20, + 0x40648C20, 0x00000003, 0x4062AC26, 0x4063CC20, 0x40648C20, 0x00000002, + 0x4062AC21, 0x4063D020, 0x00000002, 0x4062AC22, 0x4063D020, 0x00000002, + 0x4062AC23, 0x4063D020, 0x00000002, 0x4062AC24, 0x4063D020, 0x00000002, + 0x4062AC25, 0x4063D020, 0x00000002, 0x4062AC26, 0x4063D020, 0x00000002, + 0x4062AC27, 0x4063D020, 0x00000002, 0x4062AC28, 0x4063D020, 0x00000002, + 0x4062AC29, 0x4063D020, 0x00000002, 0x4062AC2A, 0x4063D020, 0x00000002, + 0x4062AC2B, 0x4063D020, 0x00000002, 0x4062AC2C, 0x4063D020, 0x00000002, + 0x4062AC2D, 0x4063D020, 0x00000002, 0x4062AC2E, 0x4063D020, 0x00000002, + 0x4062AC2F, 0x4063D020, 0x00000002, 0x4062AC30, 0x4063D020, 0x00000002, + 0x4062AC31, 0x4063D020, 0x00000002, 0x4062AC32, + // Block 322, offset 0x5080 + 0x4063D020, 0x00000002, 0x4062AC33, 0x4063D020, 0x00000002, 0x4062AC34, + 0x4063D020, 0x00000002, 0x4062AC35, 0x4063D020, 0x00000002, 0x4062AC36, + 0x4063D020, 0x00000002, 0x4062AC37, 0x4063D020, 0x00000002, 0x4062AC38, + 0x4063D020, 0x00000002, 0x4062AC39, 0x4063D020, 0x00000002, 0x4062AC3A, + 0x4063D020, 0x00000002, 0x4062AC3B, 0x4063D020, 0x00000002, 0x4062AC3C, + 0x4063D020, 0x00000002, 0x4062AC3D, 0x4063D020, 0x00000002, 0x4062AC3E, + 0x4063D020, 0x00000002, 0x4062AC3F, 0x4063D020, 0x00000002, 0x4062AC40, + 0x4063D020, 0x00000002, 0x4062AC41, 0x4063D020, 0x00000002, 0x4062AC42, + 0x4063D020, 0x00000002, 0x4062AC43, 0x4063D020, 0x00000002, 0x4062AC44, + 0x4063D020, 0x00000002, 0x4062AC45, 0x4063D020, 0x00000002, 0x4062AC46, + 0x4063D020, 0x00000002, 0x4062AC47, 0x4063D020, + // Block 323, offset 0x50c0 + 0x00000002, 0x4062AC48, 0x4063D020, 0x00000002, 0x4062AC49, 0x4063D020, + 0x00000002, 0x4062AC4A, 0x4063D020, 0x00000002, 0x4062AC4B, 0x4063D020, + 0x00000002, 0x4062AC4C, 0x4063D020, 0x00000002, 0x4062AC4D, 0x4063D020, + 0x00000002, 0x4062AC4E, 0x4063D020, 0x00000002, 0x4062AC4F, 0x4063D020, + 0x00000002, 0x4062AC50, 0x4063D020, 0x00000002, 0x4062AC51, 0x4063D020, + 0x00000002, 0x4062AC52, 0x4063D020, 0x00000002, 0x4062AC53, 0x4063D020, + 0x00000002, 0x4062AC54, 0x4063D020, 0x00000002, 0x4062AC55, 0x4063D020, + 0x00000002, 0x4062AC56, 0x4063D020, 0x00000002, 0x4062AC57, 0x4063D020, + 0x00000002, 0x4062AC58, 0x4063D020, 0x00000002, 0x4062AC59, 0x4063D020, + 0x00000002, 0x4062AC5A, 0x4063D020, 0x00000002, 0x4062AC5B, 0x4063D020, + 0x00000002, 0x4062AC5C, 0x4063D020, 0x00000002, + // Block 324, offset 0x5100 + 0x4062AC5D, 0x4063D020, 0x00000002, 0x4062AC5E, 0x4063D020, 0x00000002, + 0x4062AC5F, 0x4063D020, 0x00000002, 0x4062AC60, 0x4063D020, 0x00000002, + 0x4062AC61, 0x4063D020, 0x00000002, 0x4062AC62, 0x4063D020, 0x00000002, + 0x4062AC63, 0x4063D020, 0x00000002, 0x4062AC64, 0x4063D020, 0x00000002, + 0x4062AC65, 0x4063D020, 0x00000002, 0x4062AC66, 0x4063D020, 0x00000002, + 0x4062AC67, 0x4063D020, 0x00000002, 0x4062AC68, 0x4063D020, 0x00000002, + 0x4062AC69, 0x4063D020, 0x00000002, 0x4062AC6A, 0x4063D020, 0x00000002, + 0x4062AC6B, 0x4063D020, 0x00000002, 0x4062AC6C, 0x4063D020, 0x00000002, + 0x4062AC6D, 0x4063D020, 0x00000002, 0x4062AC6E, 0x4063D020, 0x00000002, + 0x4062AC6F, 0x4063D020, 0x00000002, 0x4062AC70, 0x4063D020, 0x00000002, + 0x4062AC71, 0x4063D020, 0x00000002, 0x4062AC72, + // Block 325, offset 0x5140 + 0x4063D020, 0x00000002, 0x4062AC73, 0x4063D020, 0x00000002, 0x4062AC74, + 0x4063D020, 0x00000002, 0x4062AC75, 0x4063D020, 0x00000002, 0x4062AC76, + 0x4063D020, 0x00000002, 0x4062AC77, 0x4063D020, 0x00000002, 0x4062AC78, + 0x4063D020, 0x00000002, 0x4062AC79, 0x4063D020, 0x00000002, 0x4062AC7A, + 0x4063D020, 0x00000002, 0x4062AC7B, 0x4063D020, 0x00000002, 0x4062AC7C, + 0x4063D020, 0x00000002, 0x4062AC7D, 0x4063D020, 0x00000002, 0x4062AC7E, + 0x4063D020, 0x00000002, 0x4062AC7F, 0x4063D020, 0x00000002, 0x4062AC80, + 0x4063D020, 0x00000002, 0x4062AC81, 0x4063D020, 0x00000002, 0x4062AC82, + 0x4063D020, 0x00000002, 0x4062AC83, 0x4063D020, 0x00000002, 0x4062AC84, + 0x4063D020, 0x00000003, 0x4062AC21, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062AC21, 0x4063D020, 0x40647220, 0x00000003, + // Block 326, offset 0x5180 + 0x4062AC22, 0x4063D020, 0x40647220, 0x00000003, 0x4062AC23, 0x4063D020, + 0x40647220, 0x00000003, 0x4062AC24, 0x4063D020, 0x40647220, 0x00000003, + 0x4062AC25, 0x4063D020, 0x40647220, 0x00000003, 0x4062AC26, 0x4063D020, + 0x40647220, 0x00000003, 0x4062AC21, 0x4063D020, 0x40648220, 0x00000003, + 0x4062AE21, 0x4063D020, 0x40646420, 0x00000002, 0x4062B021, 0x4063A820, + 0x00000002, 0x4062B022, 0x4063A820, 0x00000002, 0x4062B023, 0x4063A820, + 0x00000002, 0x4062B024, 0x4063A820, 0x00000002, 0x4062B025, 0x4063A820, + 0x00000002, 0x4062B026, 0x4063A820, 0x00000002, 0x4062B027, 0x4063A820, + 0x00000002, 0x4062B028, 0x4063A820, 0x00000002, 0x4062B029, 0x4063A820, + 0x00000002, 0x4062B02A, 0x4063A820, 0x00000002, 0x4062B02B, 0x4063A820, + 0x00000003, 0x4062B021, 0x4063A820, 0x40646420, + // Block 327, offset 0x51c0 + 0x00000003, 0x4062B021, 0x4063A820, 0x40646A20, 0x00000003, 0x4062B022, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062B023, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062B024, 0x4063A820, 0x40646A20, 0x00000003, 0x4062B025, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062B026, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062B027, 0x4063A820, 0x40646A20, 0x00000003, 0x4062B021, + 0x4063A820, 0x40647220, 0x00000003, 0x4062B022, 0x4063A820, 0x40647220, + 0x00000003, 0x4062B021, 0x4063A820, 0x40648220, 0x00000003, 0x4062B022, + 0x4063A820, 0x40648220, 0x00000003, 0x4062B023, 0x4063A820, 0x40648220, + 0x00000003, 0x4062B024, 0x4063A820, 0x40648220, 0x00000003, 0x4062B025, + 0x4063A820, 0x40648220, 0x00000003, 0x4062B026, 0x4063A820, 0x40648220, + 0x00000003, 0x4062B027, 0x4063A820, 0x40648220, + // Block 328, offset 0x5200 + 0x00000003, 0x4062B021, 0x4063A820, 0x40648420, 0x00000003, 0x4062B022, + 0x4063A820, 0x40648420, 0x00000003, 0x4062B021, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062B022, 0x4063A820, 0x40648C20, 0x00000003, 0x4062B023, + 0x4063A820, 0x40648C20, 0x00000002, 0x4062B021, 0x4063AA20, 0x00000002, + 0x4062B022, 0x4063AA20, 0x00000002, 0x4062B023, 0x4063AA20, 0x00000002, + 0x4062B024, 0x4063AA20, 0x00000002, 0x4062B025, 0x4063AA20, 0x00000002, + 0x4062B026, 0x4063AA20, 0x00000002, 0x4062B027, 0x4063AA20, 0x00000002, + 0x4062B028, 0x4063AA20, 0x00000002, 0x4062B029, 0x4063AA20, 0x00000002, + 0x4062B02A, 0x4063AA20, 0x00000002, 0x4062B021, 0x4063B420, 0x00000003, + 0x4062B021, 0x4063B420, 0x40646420, 0x00000003, 0x4062B021, 0x4063B420, + 0x40646A20, 0x00000003, 0x4062B022, 0x4063B420, + // Block 329, offset 0x5240 + 0x40646A20, 0x00000003, 0x4062B023, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062B024, 0x4063B420, 0x40646A20, 0x00000003, 0x4062B021, 0x4063B420, + 0x40648220, 0x00000003, 0x4062B022, 0x4063B420, 0x40648220, 0x00000003, + 0x4062B023, 0x4063B420, 0x40648220, 0x00000003, 0x4062B024, 0x4063B420, + 0x40648220, 0x00000003, 0x4062B021, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062B022, 0x4063B420, 0x40648C20, 0x00000003, 0x4062B023, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062B024, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062B025, 0x4063B420, 0x40648C20, 0x00000003, 0x4062B026, 0x4063B420, + 0x40648C20, 0x00000002, 0x4062B021, 0x4063B820, 0x00000002, 0x4062B022, + 0x4063B820, 0x00000002, 0x4062B023, 0x4063B820, 0x00000002, 0x4062B024, + 0x4063B820, 0x00000002, 0x4062B025, 0x4063B820, + // Block 330, offset 0x5280 + 0x00000002, 0x4062B026, 0x4063B820, 0x00000002, 0x4062B027, 0x4063B820, + 0x00000002, 0x4062B028, 0x4063B820, 0x00000002, 0x4062B029, 0x4063B820, + 0x00000002, 0x4062B02A, 0x4063B820, 0x00000002, 0x4062B02B, 0x4063B820, + 0x00000002, 0x4062B02C, 0x4063B820, 0x00000003, 0x4062B021, 0x4063B820, + 0x40648C20, 0x00000003, 0x4062B022, 0x4063B820, 0x40648C20, 0x00000003, + 0x4062B023, 0x4063B820, 0x40648C20, 0x00000003, 0x4062B024, 0x4063B820, + 0x40648C20, 0x00000003, 0x4062B025, 0x4063B820, 0x40648C20, 0x00000003, + 0x4062B026, 0x4063B820, 0x40648C20, 0x00000003, 0x4062B027, 0x4063B820, + 0x40648C20, 0x00000002, 0x4062B021, 0x4063BE20, 0x00000002, 0x4062B022, + 0x4063BE20, 0x00000002, 0x4062B023, 0x4063BE20, 0x00000002, 0x4062B021, + 0x4063C020, 0x00000002, 0x4062B022, 0x4063C020, + // Block 331, offset 0x52c0 + 0x00000002, 0x4062B023, 0x4063C020, 0x00000002, 0x4062B024, 0x4063C020, + 0x00000002, 0x4062B025, 0x4063C020, 0x00000002, 0x4062B026, 0x4063C020, + 0x00000002, 0x4062B027, 0x4063C020, 0x00000002, 0x4062B021, 0x4063C220, + 0x00000002, 0x4062B022, 0x4063C220, 0x00000003, 0x4062B021, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062B021, 0x4063C220, 0x40647220, 0x00000003, + 0x4062B022, 0x4063C220, 0x40647220, 0x00000003, 0x4062B023, 0x4063C220, + 0x40647220, 0x00000002, 0x4062B021, 0x4063CA20, 0x00000002, 0x4062B022, + 0x4063CA20, 0x00000002, 0x4062B023, 0x4063CA20, 0x00000002, 0x4062B024, + 0x4063CA20, 0x00000003, 0x4062B021, 0x4063CA20, 0x40646420, 0x00000003, + 0x4062B021, 0x4063CC20, 0x40648C20, 0x00000002, 0x4062B021, 0x4063D020, + 0x00000002, 0x4062B022, 0x4063D020, 0x00000002, + // Block 332, offset 0x5300 + 0x4062B023, 0x4063D020, 0x00000002, 0x4062B024, 0x4063D020, 0x00000002, + 0x4062B025, 0x4063D020, 0x00000002, 0x4062B026, 0x4063D020, 0x00000002, + 0x4062B027, 0x4063D020, 0x00000002, 0x4062B028, 0x4063D020, 0x00000003, + 0x4062B021, 0x4063D020, 0x40646420, 0x00000003, 0x4062B022, 0x4063D020, + 0x40646420, 0x00000003, 0x4062B023, 0x4063D020, 0x40646420, 0x00000003, + 0x4062B024, 0x4063D020, 0x40646420, 0x00000002, 0x4062B221, 0x4063A820, + 0x00000002, 0x4062B222, 0x4063A820, 0x00000002, 0x4062B223, 0x4063A820, + 0x00000003, 0x4062B221, 0x4063A820, 0x40646A20, 0x00000003, 0x4062B222, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062B223, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062B224, 0x4063A820, 0x40646A20, 0x00000003, 0x4062B225, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062B226, + // Block 333, offset 0x5340 + 0x4063A820, 0x40646A20, 0x00000003, 0x4062B227, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062B228, 0x4063A820, 0x40646A20, 0x00000003, 0x4062B229, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062B22A, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062B22B, 0x4063A820, 0x40646A20, 0x00000003, 0x4062B22C, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062B22D, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062B22E, 0x4063A820, 0x40646A20, 0x00000003, 0x4062B22F, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062B230, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062B231, 0x4063A820, 0x40646A20, 0x00000003, 0x4062B232, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062B233, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062B234, 0x4063A820, 0x40646A20, 0x00000003, 0x4062B235, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062B236, + // Block 334, offset 0x5380 + 0x4063A820, 0x40646A20, 0x00000003, 0x4062B237, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062B238, 0x4063A820, 0x40646A20, 0x00000003, 0x4062B239, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062B23A, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062B23B, 0x4063A820, 0x40646A20, 0x00000003, 0x4062B23C, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062B23D, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062B221, 0x4063A820, 0x40647220, 0x00000003, 0x4062B222, + 0x4063A820, 0x40647220, 0x00000003, 0x4062B223, 0x4063A820, 0x40647220, + 0x00000003, 0x4062B224, 0x4063A820, 0x40647220, 0x00000003, 0x4062B225, + 0x4063A820, 0x40647220, 0x00000003, 0x4062B226, 0x4063A820, 0x40647220, + 0x00000003, 0x4062B227, 0x4063A820, 0x40647220, 0x00000003, 0x4062B228, + 0x4063A820, 0x40647220, 0x00000003, 0x4062B229, + // Block 335, offset 0x53c0 + 0x4063A820, 0x40647220, 0x00000003, 0x4062B22A, 0x4063A820, 0x40647220, + 0x00000003, 0x4062B221, 0x4063A820, 0x40648220, 0x00000003, 0x4062B222, + 0x4063A820, 0x40648220, 0x00000003, 0x4062B223, 0x4063A820, 0x40648220, + 0x00000003, 0x4062B224, 0x4063A820, 0x40648220, 0x00000003, 0x4062B225, + 0x4063A820, 0x40648220, 0x00000003, 0x4062B226, 0x4063A820, 0x40648220, + 0x00000003, 0x4062B227, 0x4063A820, 0x40648220, 0x00000003, 0x4062B228, + 0x4063A820, 0x40648220, 0x00000003, 0x4062B229, 0x4063A820, 0x40648220, + 0x00000003, 0x4062B22A, 0x4063A820, 0x40648220, 0x00000003, 0x4062B22B, + 0x4063A820, 0x40648220, 0x00000003, 0x4062B22C, 0x4063A820, 0x40648220, + 0x00000003, 0x4062B22D, 0x4063A820, 0x40648220, 0x00000003, 0x4062B22E, + 0x4063A820, 0x40648220, 0x00000003, 0x4062B22F, + // Block 336, offset 0x5400 + 0x4063A820, 0x40648220, 0x00000003, 0x4062B230, 0x4063A820, 0x40648220, + 0x00000003, 0x4062B231, 0x4063A820, 0x40648220, 0x00000003, 0x4062B232, + 0x4063A820, 0x40648220, 0x00000003, 0x4062B233, 0x4063A820, 0x40648220, + 0x00000003, 0x4062B234, 0x4063A820, 0x40648220, 0x00000003, 0x4062B235, + 0x4063A820, 0x40648220, 0x00000003, 0x4062B236, 0x4063A820, 0x40648220, + 0x00000003, 0x4062B237, 0x4063A820, 0x40648220, 0x00000003, 0x4062B238, + 0x4063A820, 0x40648220, 0x00000003, 0x4062B239, 0x4063A820, 0x40648220, + 0x00000003, 0x4062B23A, 0x4063A820, 0x40648220, 0x00000003, 0x4062B23B, + 0x4063A820, 0x40648220, 0x00000003, 0x4062B23C, 0x4063A820, 0x40648220, + 0x00000003, 0x4062B23D, 0x4063A820, 0x40648220, 0x00000003, 0x4062B221, + 0x4063A820, 0x40648420, 0x00000003, 0x4062B222, + // Block 337, offset 0x5440 + 0x4063A820, 0x40648420, 0x00000003, 0x4062B223, 0x4063A820, 0x40648420, + 0x00000003, 0x4062B224, 0x4063A820, 0x40648420, 0x00000003, 0x4062B225, + 0x4063A820, 0x40648420, 0x00000003, 0x4062B221, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062B222, 0x4063A820, 0x40648C20, 0x00000003, 0x4062B223, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062B224, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062B225, 0x4063A820, 0x40648C20, 0x00000003, 0x4062B226, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062B227, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062B228, 0x4063A820, 0x40648C20, 0x00000003, 0x4062B229, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062B22A, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062B22B, 0x4063A820, 0x40648C20, 0x00000003, 0x4062B22C, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062B22D, + // Block 338, offset 0x5480 + 0x4063A820, 0x40648C20, 0x00000003, 0x4062B22E, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062B22F, 0x4063A820, 0x40648C20, 0x00000003, 0x4062B230, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062B231, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062B232, 0x4063A820, 0x40648C20, 0x00000003, 0x4062B233, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062B234, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062B235, 0x4063A820, 0x40648C20, 0x00000003, 0x4062B236, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062B237, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062B238, 0x4063A820, 0x40648C20, 0x00000003, 0x4062B239, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062B23A, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062B23B, 0x4063A820, 0x40648C20, 0x00000003, 0x4062B23C, + 0x4063A820, 0x40648C20, 0x00000002, 0x4062B221, + // Block 339, offset 0x54c0 + 0x4063AA20, 0x00000002, 0x4062B222, 0x4063AA20, 0x00000002, 0x4062B223, + 0x4063AA20, 0x00000002, 0x4062B224, 0x4063AA20, 0x00000002, 0x4062B225, + 0x4063AA20, 0x00000002, 0x4062B226, 0x4063AA20, 0x00000002, 0x4062B227, + 0x4063AA20, 0x00000002, 0x4062B228, 0x4063AA20, 0x00000002, 0x4062B229, + 0x4063AA20, 0x00000002, 0x4062B22A, 0x4063AA20, 0x00000002, 0x4062B22B, + 0x4063AA20, 0x00000002, 0x4062B22C, 0x4063AA20, 0x00000002, 0x4062B22D, + 0x4063AA20, 0x00000002, 0x4062B22E, 0x4063AA20, 0x00000002, 0x4062B22F, + 0x4063AA20, 0x00000002, 0x4062B230, 0x4063AA20, 0x00000002, 0x4062B231, + 0x4063AA20, 0x00000002, 0x4062B232, 0x4063AA20, 0x00000002, 0x4062B233, + 0x4063AA20, 0x00000002, 0x4062B234, 0x4063AA20, 0x00000002, 0x4062B235, + 0x4063AA20, 0x00000002, 0x4062B236, 0x4063AA20, + // Block 340, offset 0x5500 + 0x00000003, 0x4062B221, 0x4063AA20, 0x40646420, 0x00000003, 0x4062B221, + 0x4063B020, 0x40646420, 0x00000003, 0x4062B222, 0x4063B020, 0x40646420, + 0x00000002, 0x4062B221, 0x4063B820, 0x00000002, 0x4062B222, 0x4063B820, + 0x00000002, 0x4062B223, 0x4063B820, 0x00000002, 0x4062B224, 0x4063B820, + 0x00000002, 0x4062B225, 0x4063B820, 0x00000002, 0x4062B226, 0x4063B820, + 0x00000002, 0x4062B227, 0x4063B820, 0x00000002, 0x4062B228, 0x4063B820, + 0x00000002, 0x4062B229, 0x4063B820, 0x00000002, 0x4062B22A, 0x4063B820, + 0x00000002, 0x4062B22B, 0x4063B820, 0x00000002, 0x4062B22C, 0x4063B820, + 0x00000002, 0x4062B22D, 0x4063B820, 0x00000002, 0x4062B22E, 0x4063B820, + 0x00000002, 0x4062B22F, 0x4063B820, 0x00000002, 0x4062B230, 0x4063B820, + 0x00000002, 0x4062B231, 0x4063B820, 0x00000002, + // Block 341, offset 0x5540 + 0x4062B232, 0x4063B820, 0x00000002, 0x4062B233, 0x4063B820, 0x00000002, + 0x4062B234, 0x4063B820, 0x00000002, 0x4062B235, 0x4063B820, 0x00000002, + 0x4062B236, 0x4063B820, 0x00000002, 0x4062B237, 0x4063B820, 0x00000002, + 0x4062B238, 0x4063B820, 0x00000002, 0x4062B239, 0x4063B820, 0x00000002, + 0x4062B23A, 0x4063B820, 0x00000002, 0x4062B23B, 0x4063B820, 0x00000002, + 0x4062B23C, 0x4063B820, 0x00000002, 0x4062B23D, 0x4063B820, 0x00000002, + 0x4062B23E, 0x4063B820, 0x00000002, 0x4062B23F, 0x4063B820, 0x00000002, + 0x4062B240, 0x4063B820, 0x00000002, 0x4062B241, 0x4063B820, 0x00000002, + 0x4062B242, 0x4063B820, 0x00000002, 0x4062B243, 0x4063B820, 0x00000002, + 0x4062B244, 0x4063B820, 0x00000002, 0x4062B245, 0x4063B820, 0x00000002, + 0x4062B246, 0x4063B820, 0x00000002, 0x4062B247, + // Block 342, offset 0x5580 + 0x4063B820, 0x00000002, 0x4062B248, 0x4063B820, 0x00000002, 0x4062B249, + 0x4063B820, 0x00000002, 0x4062B24A, 0x4063B820, 0x00000002, 0x4062B24B, + 0x4063B820, 0x00000002, 0x4062B24C, 0x4063B820, 0x00000002, 0x4062B24D, + 0x4063B820, 0x00000002, 0x4062B24E, 0x4063B820, 0x00000002, 0x4062B24F, + 0x4063B820, 0x00000002, 0x4062B250, 0x4063B820, 0x00000002, 0x4062B251, + 0x4063B820, 0x00000002, 0x4062B252, 0x4063B820, 0x00000002, 0x4062B253, + 0x4063B820, 0x00000002, 0x4062B254, 0x4063B820, 0x00000002, 0x4062B255, + 0x4063B820, 0x00000002, 0x4062B256, 0x4063B820, 0x00000002, 0x4062B257, + 0x4063B820, 0x00000002, 0x4062B258, 0x4063B820, 0x00000002, 0x4062B259, + 0x4063B820, 0x00000002, 0x4062B25A, 0x4063B820, 0x00000002, 0x4062B25B, + 0x4063B820, 0x00000003, 0x4062B221, 0x4063B820, + // Block 343, offset 0x55c0 + 0x40646420, 0x00000003, 0x4062B222, 0x4063B820, 0x40646420, 0x00000003, + 0x4062B223, 0x4063B820, 0x40646420, 0x00000003, 0x4062B224, 0x4063B820, + 0x40646420, 0x00000003, 0x4062B225, 0x4063B820, 0x40646420, 0x00000003, + 0x4062B226, 0x4063B820, 0x40646420, 0x00000003, 0x4062B227, 0x4063B820, + 0x40646420, 0x00000003, 0x4062B228, 0x4063B820, 0x40646420, 0x00000003, + 0x4062B229, 0x4063B820, 0x40646420, 0x00000003, 0x4062B22A, 0x4063B820, + 0x40646420, 0x00000003, 0x4062B22B, 0x4063B820, 0x40646420, 0x00000003, + 0x4062B22C, 0x4063B820, 0x40646420, 0x00000003, 0x4062B221, 0x4063B820, + 0x40646A20, 0x00000003, 0x4062B222, 0x4063B820, 0x40646A20, 0x00000003, + 0x4062B223, 0x4063B820, 0x40646A20, 0x00000003, 0x4062B224, 0x4063B820, + 0x40646A20, 0x00000003, 0x4062B225, 0x4063B820, + // Block 344, offset 0x5600 + 0x40646A20, 0x00000003, 0x4062B226, 0x4063B820, 0x40646A20, 0x00000003, + 0x4062B227, 0x4063B820, 0x40646A20, 0x00000003, 0x4062B228, 0x4063B820, + 0x40646A20, 0x00000003, 0x4062B229, 0x4063B820, 0x40646A20, 0x00000003, + 0x4062B22A, 0x4063B820, 0x40646A20, 0x00000003, 0x4062B22B, 0x4063B820, + 0x40646A20, 0x00000003, 0x4062B22C, 0x4063B820, 0x40646A20, 0x00000003, + 0x4062B22D, 0x4063B820, 0x40646A20, 0x00000003, 0x4062B221, 0x4063B820, + 0x40647220, 0x00000003, 0x4062B222, 0x4063B820, 0x40647220, 0x00000003, + 0x4062B223, 0x4063B820, 0x40647220, 0x00000003, 0x4062B224, 0x4063B820, + 0x40647220, 0x00000003, 0x4062B221, 0x4063B820, 0x40648C20, 0x00000003, + 0x4062B222, 0x4063B820, 0x40648C20, 0x00000003, 0x4062B223, 0x4063B820, + 0x40648C20, 0x00000003, 0x4062B224, 0x4063B820, + // Block 345, offset 0x5640 + 0x40648C20, 0x00000003, 0x4062B225, 0x4063B820, 0x40648C20, 0x00000003, + 0x4062B226, 0x4063B820, 0x40648C20, 0x00000003, 0x4062B227, 0x4063B820, + 0x40648C20, 0x00000003, 0x4062B228, 0x4063B820, 0x40648C20, 0x00000003, + 0x4062B229, 0x4063B820, 0x40648C20, 0x00000003, 0x4062B22A, 0x4063B820, + 0x40648C20, 0x00000003, 0x4062B22B, 0x4063B820, 0x40648C20, 0x00000003, + 0x4062B22C, 0x4063B820, 0x40648C20, 0x00000003, 0x4062B22D, 0x4063B820, + 0x40648C20, 0x00000003, 0x4062B22E, 0x4063B820, 0x40648C20, 0x00000003, + 0x4062B22F, 0x4063B820, 0x40648C20, 0x00000003, 0x4062B230, 0x4063B820, + 0x40648C20, 0x00000003, 0x4062B231, 0x4063B820, 0x40648C20, 0x00000003, + 0x4062B232, 0x4063B820, 0x40648C20, 0x00000003, 0x4062B233, 0x4063B820, + 0x40648C20, 0x00000003, 0x4062B234, 0x4063B820, + // Block 346, offset 0x5680 + 0x40648C20, 0x00000003, 0x4062B235, 0x4063B820, 0x40648C20, 0x00000003, + 0x4062B236, 0x4063B820, 0x40648C20, 0x00000003, 0x4062B237, 0x4063B820, + 0x40648C20, 0x00000003, 0x4062B238, 0x4063B820, 0x40648C20, 0x00000003, + 0x4062B239, 0x4063B820, 0x40648C20, 0x00000003, 0x4062B23A, 0x4063B820, + 0x40648C20, 0x00000003, 0x4062B23B, 0x4063B820, 0x40648C20, 0x00000003, + 0x4062B23C, 0x4063B820, 0x40648C20, 0x00000003, 0x4062B23D, 0x4063B820, + 0x40648C20, 0x00000003, 0x4062B23E, 0x4063B820, 0x40648C20, 0x00000003, + 0x4062B23F, 0x4063B820, 0x40648C20, 0x00000003, 0x4062B240, 0x4063B820, + 0x40648C20, 0x00000003, 0x4062B241, 0x4063B820, 0x40648C20, 0x00000002, + 0x4062B221, 0x4063C220, 0x00000002, 0x4062B222, 0x4063C220, 0x00000002, + 0x4062B223, 0x4063C220, 0x00000002, 0x4062B224, + // Block 347, offset 0x56c0 + 0x4063C220, 0x00000002, 0x4062B225, 0x4063C220, 0x00000002, 0x4062B226, + 0x4063C220, 0x00000002, 0x4062B227, 0x4063C220, 0x00000002, 0x4062B228, + 0x4063C220, 0x00000002, 0x4062B229, 0x4063C220, 0x00000002, 0x4062B22A, + 0x4063C220, 0x00000002, 0x4062B22B, 0x4063C220, 0x00000002, 0x4062B22C, + 0x4063C220, 0x00000002, 0x4062B22D, 0x4063C220, 0x00000002, 0x4062B22E, + 0x4063C220, 0x00000002, 0x4062B22F, 0x4063C220, 0x00000002, 0x4062B230, + 0x4063C220, 0x00000002, 0x4062B231, 0x4063C220, 0x00000003, 0x4062B221, + 0x4063C220, 0x40646A20, 0x00000003, 0x4062B222, 0x4063C220, 0x40646A20, + 0x00000003, 0x4062B223, 0x4063C220, 0x40646A20, 0x00000003, 0x4062B224, + 0x4063C220, 0x40646A20, 0x00000003, 0x4062B225, 0x4063C220, 0x40646A20, + 0x00000003, 0x4062B226, 0x4063C220, 0x40646A20, + // Block 348, offset 0x5700 + 0x00000003, 0x4062B227, 0x4063C220, 0x40646A20, 0x00000003, 0x4062B228, + 0x4063C220, 0x40646A20, 0x00000003, 0x4062B221, 0x4063C220, 0x40647220, + 0x00000003, 0x4062B221, 0x4063CC20, 0x40646420, 0x00000003, 0x4062B221, + 0x4063CC20, 0x40648C20, 0x00000003, 0x4062B222, 0x4063CC20, 0x40648C20, + 0x00000003, 0x4062B223, 0x4063CC20, 0x40648C20, 0x00000003, 0x4062B224, + 0x4063CC20, 0x40648C20, 0x00000003, 0x4062B225, 0x4063CC20, 0x40648C20, + 0x00000003, 0x4062B226, 0x4063CC20, 0x40648C20, 0x00000003, 0x4062B227, + 0x4063CC20, 0x40648C20, 0x00000003, 0x4062B228, 0x4063CC20, 0x40648C20, + 0x00000003, 0x4062B229, 0x4063CC20, 0x40648C20, 0x00000003, 0x4062B22A, + 0x4063CC20, 0x40648C20, 0x00000003, 0x4062B22B, 0x4063CC20, 0x40648C20, + 0x00000003, 0x4062B22C, 0x4063CC20, 0x40648C20, + // Block 349, offset 0x5740 + 0x00000003, 0x4062B22D, 0x4063CC20, 0x40648C20, 0x00000003, 0x4062B22E, + 0x4063CC20, 0x40648C20, 0x00000003, 0x4062B22F, 0x4063CC20, 0x40648C20, + 0x00000003, 0x4062B230, 0x4063CC20, 0x40648C20, 0x00000003, 0x4062B231, + 0x4063CC20, 0x40648C20, 0x00000002, 0x4062B621, 0x4063A820, 0x00000002, + 0x4062B622, 0x4063A820, 0x00000002, 0x4062B623, 0x4063A820, 0x00000002, + 0x4062B624, 0x4063A820, 0x00000002, 0x4062B625, 0x4063A820, 0x00000002, + 0x4062B626, 0x4063A820, 0x00000002, 0x4062B627, 0x4063A820, 0x00000002, + 0x4062B628, 0x4063A820, 0x00000002, 0x4062B629, 0x4063A820, 0x00000002, + 0x4062B62A, 0x4063A820, 0x00000002, 0x4062B62B, 0x4063A820, 0x00000002, + 0x4062B62C, 0x4063A820, 0x00000002, 0x4062B62D, 0x4063A820, 0x00000002, + 0x4062B62E, 0x4063A820, 0x00000002, 0x4062B62F, + // Block 350, offset 0x5780 + 0x4063A820, 0x00000002, 0x4062B630, 0x4063A820, 0x00000002, 0x4062B631, + 0x4063A820, 0x00000003, 0x4062B621, 0x4063A820, 0x40646420, 0x00000003, + 0x4062B622, 0x4063A820, 0x40646420, 0x00000003, 0x4062B623, 0x4063A820, + 0x40646420, 0x00000003, 0x4062B624, 0x4063A820, 0x40646420, 0x00000003, + 0x4062B625, 0x4063A820, 0x40646420, 0x00000003, 0x4062B626, 0x4063A820, + 0x40646420, 0x00000003, 0x4062B627, 0x4063A820, 0x40646420, 0x00000003, + 0x4062B628, 0x4063A820, 0x40646420, 0x00000003, 0x4062B629, 0x4063A820, + 0x40646420, 0x00000003, 0x4062B621, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062B622, 0x4063A820, 0x40646A20, 0x00000003, 0x4062B623, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062B624, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062B625, 0x4063A820, 0x40646A20, 0x00000003, + // Block 351, offset 0x57c0 + 0x4062B626, 0x4063A820, 0x40646A20, 0x00000003, 0x4062B627, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062B628, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062B629, 0x4063A820, 0x40646A20, 0x00000003, 0x4062B62A, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062B62B, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062B62C, 0x4063A820, 0x40646A20, 0x00000003, 0x4062B62D, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062B62E, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062B62F, 0x4063A820, 0x40646A20, 0x00000003, 0x4062B621, 0x4063A820, + 0x40647220, 0x00000003, 0x4062B622, 0x4063A820, 0x40647220, 0x00000003, + 0x4062B623, 0x4063A820, 0x40647220, 0x00000003, 0x4062B624, 0x4063A820, + 0x40647220, 0x00000003, 0x4062B621, 0x4063A820, 0x40648220, 0x00000003, + 0x4062B622, 0x4063A820, 0x40648220, 0x00000003, + // Block 352, offset 0x5800 + 0x4062B623, 0x4063A820, 0x40648220, 0x00000003, 0x4062B624, 0x4063A820, + 0x40648220, 0x00000003, 0x4062B625, 0x4063A820, 0x40648220, 0x00000003, + 0x4062B626, 0x4063A820, 0x40648220, 0x00000003, 0x4062B627, 0x4063A820, + 0x40648220, 0x00000003, 0x4062B628, 0x4063A820, 0x40648220, 0x00000003, + 0x4062B629, 0x4063A820, 0x40648220, 0x00000003, 0x4062B62A, 0x4063A820, + 0x40648220, 0x00000003, 0x4062B62B, 0x4063A820, 0x40648220, 0x00000003, + 0x4062B62C, 0x4063A820, 0x40648220, 0x00000003, 0x4062B621, 0x4063A820, + 0x40648420, 0x00000003, 0x4062B622, 0x4063A820, 0x40648420, 0x00000003, + 0x4062B623, 0x4063A820, 0x40648420, 0x00000003, 0x4062B624, 0x4063A820, + 0x40648420, 0x00000003, 0x4062B621, 0x4063A820, 0x40648C20, 0x00000003, + 0x4062B622, 0x4063A820, 0x40648C20, 0x00000003, + // Block 353, offset 0x5840 + 0x4062B623, 0x4063A820, 0x40648C20, 0x00000003, 0x4062B624, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062B625, 0x4063A820, 0x40648C20, 0x00000003, + 0x4062B626, 0x4063A820, 0x40648C20, 0x00000003, 0x4062B627, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062B628, 0x4063A820, 0x40648C20, 0x00000003, + 0x4062B629, 0x4063A820, 0x40648C20, 0x00000003, 0x4062B62A, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062B62B, 0x4063A820, 0x40648C20, 0x00000003, + 0x4062B62C, 0x4063A820, 0x40648C20, 0x00000003, 0x4062B62D, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062B62E, 0x4063A820, 0x40648C20, 0x00000002, + 0x4062B621, 0x4063AA20, 0x00000002, 0x4062B622, 0x4063AA20, 0x00000002, + 0x4062B623, 0x4063AA20, 0x00000002, 0x4062B624, 0x4063AA20, 0x00000002, + 0x4062B625, 0x4063AA20, 0x00000002, 0x4062B626, + // Block 354, offset 0x5880 + 0x4063AA20, 0x00000003, 0x4062B621, 0x4063AA20, 0x40648C20, 0x00000003, + 0x4062B621, 0x4063AC20, 0x40646420, 0x00000003, 0x4062B622, 0x4063AC20, + 0x40646420, 0x00000003, 0x4062B623, 0x4063AC20, 0x40646420, 0x00000003, + 0x4062B621, 0x4063AC20, 0x40648C20, 0x00000003, 0x4062B622, 0x4063AC20, + 0x40648C20, 0x00000003, 0x4062B623, 0x4063AC20, 0x40648C20, 0x00000003, + 0x4062B624, 0x4063AC20, 0x40648C20, 0x00000003, 0x4062B625, 0x4063AC20, + 0x40648C20, 0x00000003, 0x4062B626, 0x4063AC20, 0x40648C20, 0x00000003, + 0x4062B627, 0x4063AC20, 0x40648C20, 0x00000003, 0x4062B628, 0x4063AC20, + 0x40648C20, 0x00000003, 0x4062B629, 0x4063AC20, 0x40648C20, 0x00000003, + 0x4062B62A, 0x4063AC20, 0x40648C20, 0x00000003, 0x4062B62B, 0x4063AC20, + 0x40648C20, 0x00000003, 0x4062B62C, 0x4063AC20, + // Block 355, offset 0x58c0 + 0x40648C20, 0x00000003, 0x4062B62D, 0x4063AC20, 0x40648C20, 0x00000003, + 0x4062B62E, 0x4063AC20, 0x40648C20, 0x00000003, 0x4062B62F, 0x4063AC20, + 0x40648C20, 0x00000003, 0x4062B630, 0x4063AC20, 0x40648C20, 0x00000003, + 0x4062B631, 0x4063AC20, 0x40648C20, 0x00000003, 0x4062B632, 0x4063AC20, + 0x40648C20, 0x00000003, 0x4062B633, 0x4063AC20, 0x40648C20, 0x00000002, + 0x4062B621, 0x4063B420, 0x00000002, 0x4062B622, 0x4063B420, 0x00000002, + 0x4062B623, 0x4063B420, 0x00000002, 0x4062B624, 0x4063B420, 0x00000002, + 0x4062B625, 0x4063B420, 0x00000002, 0x4062B626, 0x4063B420, 0x00000002, + 0x4062B627, 0x4063B420, 0x00000002, 0x4062B628, 0x4063B420, 0x00000002, + 0x4062B629, 0x4063B420, 0x00000002, 0x4062B62A, 0x4063B420, 0x00000002, + 0x4062B62B, 0x4063B420, 0x00000002, 0x4062B62C, + // Block 356, offset 0x5900 + 0x4063B420, 0x00000002, 0x4062B62D, 0x4063B420, 0x00000002, 0x4062B62E, + 0x4063B420, 0x00000002, 0x4062B62F, 0x4063B420, 0x00000002, 0x4062B630, + 0x4063B420, 0x00000002, 0x4062B631, 0x4063B420, 0x00000002, 0x4062B632, + 0x4063B420, 0x00000002, 0x4062B633, 0x4063B420, 0x00000002, 0x4062B634, + 0x4063B420, 0x00000002, 0x4062B635, 0x4063B420, 0x00000002, 0x4062B636, + 0x4063B420, 0x00000002, 0x4062B637, 0x4063B420, 0x00000002, 0x4062B638, + 0x4063B420, 0x00000002, 0x4062B639, 0x4063B420, 0x00000002, 0x4062B63A, + 0x4063B420, 0x00000002, 0x4062B63B, 0x4063B420, 0x00000002, 0x4062B63C, + 0x4063B420, 0x00000002, 0x4062B63D, 0x4063B420, 0x00000003, 0x4062B621, + 0x4063B420, 0x40646420, 0x00000003, 0x4062B622, 0x4063B420, 0x40646420, + 0x00000003, 0x4062B623, 0x4063B420, 0x40646420, + // Block 357, offset 0x5940 + 0x00000003, 0x4062B624, 0x4063B420, 0x40646420, 0x00000003, 0x4062B625, + 0x4063B420, 0x40646420, 0x00000003, 0x4062B626, 0x4063B420, 0x40646420, + 0x00000003, 0x4062B627, 0x4063B420, 0x40646420, 0x00000003, 0x4062B628, + 0x4063B420, 0x40646420, 0x00000003, 0x4062B629, 0x4063B420, 0x40646420, + 0x00000003, 0x4062B62A, 0x4063B420, 0x40646420, 0x00000003, 0x4062B62B, + 0x4063B420, 0x40646420, 0x00000003, 0x4062B62C, 0x4063B420, 0x40646420, + 0x00000003, 0x4062B62D, 0x4063B420, 0x40646420, 0x00000003, 0x4062B621, + 0x4063B420, 0x40646A20, 0x00000003, 0x4062B622, 0x4063B420, 0x40646A20, + 0x00000003, 0x4062B623, 0x4063B420, 0x40646A20, 0x00000003, 0x4062B624, + 0x4063B420, 0x40646A20, 0x00000003, 0x4062B625, 0x4063B420, 0x40646A20, + 0x00000003, 0x4062B626, 0x4063B420, 0x40646A20, + // Block 358, offset 0x5980 + 0x00000003, 0x4062B627, 0x4063B420, 0x40646A20, 0x00000003, 0x4062B628, + 0x4063B420, 0x40646A20, 0x00000003, 0x4062B629, 0x4063B420, 0x40646A20, + 0x00000003, 0x4062B62A, 0x4063B420, 0x40646A20, 0x00000003, 0x4062B62B, + 0x4063B420, 0x40646A20, 0x00000003, 0x4062B62C, 0x4063B420, 0x40646A20, + 0x00000003, 0x4062B62D, 0x4063B420, 0x40646A20, 0x00000003, 0x4062B62E, + 0x4063B420, 0x40646A20, 0x00000003, 0x4062B62F, 0x4063B420, 0x40646A20, + 0x00000003, 0x4062B630, 0x4063B420, 0x40646A20, 0x00000003, 0x4062B631, + 0x4063B420, 0x40646A20, 0x00000003, 0x4062B632, 0x4063B420, 0x40646A20, + 0x00000003, 0x4062B633, 0x4063B420, 0x40646A20, 0x00000003, 0x4062B621, + 0x4063B420, 0x40647220, 0x00000003, 0x4062B622, 0x4063B420, 0x40647220, + 0x00000003, 0x4062B623, 0x4063B420, 0x40647220, + // Block 359, offset 0x59c0 + 0x00000003, 0x4062B624, 0x4063B420, 0x40647220, 0x00000003, 0x4062B625, + 0x4063B420, 0x40647220, 0x00000003, 0x4062B626, 0x4063B420, 0x40647220, + 0x00000003, 0x4062B627, 0x4063B420, 0x40647220, 0x00000003, 0x4062B628, + 0x4063B420, 0x40647220, 0x00000003, 0x4062B629, 0x4063B420, 0x40647220, + 0x00000003, 0x4062B621, 0x4063B420, 0x40648220, 0x00000003, 0x4062B622, + 0x4063B420, 0x40648220, 0x00000003, 0x4062B623, 0x4063B420, 0x40648220, + 0x00000003, 0x4062B624, 0x4063B420, 0x40648220, 0x00000003, 0x4062B625, + 0x4063B420, 0x40648220, 0x00000003, 0x4062B626, 0x4063B420, 0x40648220, + 0x00000003, 0x4062B627, 0x4063B420, 0x40648220, 0x00000003, 0x4062B628, + 0x4063B420, 0x40648220, 0x00000003, 0x4062B621, 0x4063B420, 0x40648420, + 0x00000003, 0x4062B622, 0x4063B420, 0x40648420, + // Block 360, offset 0x5a00 + 0x00000003, 0x4062B623, 0x4063B420, 0x40648420, 0x00000003, 0x4062B621, + 0x4063B420, 0x40648C20, 0x00000003, 0x4062B622, 0x4063B420, 0x40648C20, + 0x00000003, 0x4062B623, 0x4063B420, 0x40648C20, 0x00000003, 0x4062B624, + 0x4063B420, 0x40648C20, 0x00000003, 0x4062B625, 0x4063B420, 0x40648C20, + 0x00000003, 0x4062B626, 0x4063B420, 0x40648C20, 0x00000003, 0x4062B627, + 0x4063B420, 0x40648C20, 0x00000003, 0x4062B628, 0x4063B420, 0x40648C20, + 0x00000003, 0x4062B629, 0x4063B420, 0x40648C20, 0x00000003, 0x4062B62A, + 0x4063B420, 0x40648C20, 0x00000003, 0x4062B62B, 0x4063B420, 0x40648C20, + 0x00000003, 0x4062B62C, 0x4063B420, 0x40648C20, 0x00000003, 0x4062B62D, + 0x4063B420, 0x40648C20, 0x00000003, 0x4062B62E, 0x4063B420, 0x40648C20, + 0x00000003, 0x4062B62F, 0x4063B420, 0x40648C20, + // Block 361, offset 0x5a40 + 0x00000003, 0x4062B630, 0x4063B420, 0x40648C20, 0x00000003, 0x4062B631, + 0x4063B420, 0x40648C20, 0x00000003, 0x4062B632, 0x4063B420, 0x40648C20, + 0x00000003, 0x4062B633, 0x4063B420, 0x40648C20, 0x00000003, 0x4062B634, + 0x4063B420, 0x40648C20, 0x00000003, 0x4062B635, 0x4063B420, 0x40648C20, + 0x00000003, 0x4062B636, 0x4063B420, 0x40648C20, 0x00000003, 0x4062B637, + 0x4063B420, 0x40648C20, 0x00000003, 0x4062B638, 0x4063B420, 0x40648C20, + 0x00000003, 0x4062B639, 0x4063B420, 0x40648C20, 0x00000003, 0x4062B63A, + 0x4063B420, 0x40648C20, 0x00000003, 0x4062B63B, 0x4063B420, 0x40648C20, + 0x00000003, 0x4062B63C, 0x4063B420, 0x40648C20, 0x00000003, 0x4062B63D, + 0x4063B420, 0x40648C20, 0x00000003, 0x4062B63E, 0x4063B420, 0x40648C20, + 0x00000002, 0x4062B621, 0x4063B620, 0x00000002, + // Block 362, offset 0x5a80 + 0x4062B622, 0x4063B620, 0x00000002, 0x4062B623, 0x4063B620, 0x00000002, + 0x4062B624, 0x4063B620, 0x00000002, 0x4062B625, 0x4063B620, 0x00000002, + 0x4062B626, 0x4063B620, 0x00000002, 0x4062B627, 0x4063B620, 0x00000002, + 0x4062B621, 0x4063B820, 0x00000002, 0x4062B622, 0x4063B820, 0x00000002, + 0x4062B623, 0x4063B820, 0x00000002, 0x4062B624, 0x4063B820, 0x00000002, + 0x4062B625, 0x4063B820, 0x00000002, 0x4062B626, 0x4063B820, 0x00000002, + 0x4062B627, 0x4063B820, 0x00000002, 0x4062B628, 0x4063B820, 0x00000002, + 0x4062B629, 0x4063B820, 0x00000002, 0x4062B62A, 0x4063B820, 0x00000002, + 0x4062B62B, 0x4063B820, 0x00000002, 0x4062B62C, 0x4063B820, 0x00000002, + 0x4062B62D, 0x4063B820, 0x00000002, 0x4062B62E, 0x4063B820, 0x00000002, + 0x4062B62F, 0x4063B820, 0x00000002, 0x4062B630, + // Block 363, offset 0x5ac0 + 0x4063B820, 0x00000002, 0x4062B631, 0x4063B820, 0x00000002, 0x4062B632, + 0x4063B820, 0x00000002, 0x4062B633, 0x4063B820, 0x00000002, 0x4062B634, + 0x4063B820, 0x00000002, 0x4062B635, 0x4063B820, 0x00000002, 0x4062B636, + 0x4063B820, 0x00000002, 0x4062B637, 0x4063B820, 0x00000002, 0x4062B638, + 0x4063B820, 0x00000002, 0x4062B639, 0x4063B820, 0x00000002, 0x4062B63A, + 0x4063B820, 0x00000002, 0x4062B63B, 0x4063B820, 0x00000002, 0x4062B63C, + 0x4063B820, 0x00000002, 0x4062B63D, 0x4063B820, 0x00000002, 0x4062B63E, + 0x4063B820, 0x00000002, 0x4062B63F, 0x4063B820, 0x00000003, 0x4062B621, + 0x4063B820, 0x40646420, 0x00000003, 0x4062B622, 0x4063B820, 0x40646420, + 0x00000003, 0x4062B623, 0x4063B820, 0x40646420, 0x00000003, 0x4062B624, + 0x4063B820, 0x40646420, 0x00000003, 0x4062B625, + // Block 364, offset 0x5b00 + 0x4063B820, 0x40646420, 0x00000003, 0x4062B626, 0x4063B820, 0x40646420, + 0x00000003, 0x4062B627, 0x4063B820, 0x40646420, 0x00000003, 0x4062B628, + 0x4063B820, 0x40646420, 0x00000003, 0x4062B629, 0x4063B820, 0x40646420, + 0x00000003, 0x4062B62A, 0x4063B820, 0x40646420, 0x00000003, 0x4062B62B, + 0x4063B820, 0x40646420, 0x00000003, 0x4062B62C, 0x4063B820, 0x40646420, + 0x00000003, 0x4062B62D, 0x4063B820, 0x40646420, 0x00000003, 0x4062B62E, + 0x4063B820, 0x40646420, 0x00000003, 0x4062B621, 0x4063B820, 0x40646A20, + 0x00000003, 0x4062B621, 0x4063B820, 0x40648C20, 0x00000003, 0x4062B622, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062B623, 0x4063B820, 0x40648C20, + 0x00000003, 0x4062B624, 0x4063B820, 0x40648C20, 0x00000003, 0x4062B625, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062B626, + // Block 365, offset 0x5b40 + 0x4063B820, 0x40648C20, 0x00000003, 0x4062B627, 0x4063B820, 0x40648C20, + 0x00000003, 0x4062B628, 0x4063B820, 0x40648C20, 0x00000003, 0x4062B629, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062B62A, 0x4063B820, 0x40648C20, + 0x00000003, 0x4062B62B, 0x4063B820, 0x40648C20, 0x00000003, 0x4062B62C, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062B62D, 0x4063B820, 0x40648C20, + 0x00000003, 0x4062B62E, 0x4063B820, 0x40648C20, 0x00000002, 0x4062B621, + 0x4063BE20, 0x00000002, 0x4062B622, 0x4063BE20, 0x00000002, 0x4062B623, + 0x4063BE20, 0x00000002, 0x4062B624, 0x4063BE20, 0x00000002, 0x4062B625, + 0x4063BE20, 0x00000002, 0x4062B626, 0x4063BE20, 0x00000002, 0x4062B627, + 0x4063BE20, 0x00000002, 0x4062B628, 0x4063BE20, 0x00000002, 0x4062B629, + 0x4063BE20, 0x00000002, 0x4062B62A, 0x4063BE20, + // Block 366, offset 0x5b80 + 0x00000002, 0x4062B62B, 0x4063BE20, 0x00000002, 0x4062B62C, 0x4063BE20, + 0x00000002, 0x4062B62D, 0x4063BE20, 0x00000002, 0x4062B62E, 0x4063BE20, + 0x00000002, 0x4062B62F, 0x4063BE20, 0x00000002, 0x4062B630, 0x4063BE20, + 0x00000002, 0x4062B631, 0x4063BE20, 0x00000002, 0x4062B632, 0x4063BE20, + 0x00000002, 0x4062B633, 0x4063BE20, 0x00000002, 0x4062B621, 0x4063C020, + 0x00000002, 0x4062B622, 0x4063C020, 0x00000002, 0x4062B623, 0x4063C020, + 0x00000002, 0x4062B624, 0x4063C020, 0x00000002, 0x4062B625, 0x4063C020, + 0x00000002, 0x4062B626, 0x4063C020, 0x00000002, 0x4062B627, 0x4063C020, + 0x00000002, 0x4062B628, 0x4063C020, 0x00000002, 0x4062B629, 0x4063C020, + 0x00000002, 0x4062B62A, 0x4063C020, 0x00000002, 0x4062B62B, 0x4063C020, + 0x00000002, 0x4062B62C, 0x4063C020, 0x00000002, + // Block 367, offset 0x5bc0 + 0x4062B62D, 0x4063C020, 0x00000002, 0x4062B62E, 0x4063C020, 0x00000002, + 0x4062B62F, 0x4063C020, 0x00000002, 0x4062B630, 0x4063C020, 0x00000002, + 0x4062B631, 0x4063C020, 0x00000002, 0x4062B632, 0x4063C020, 0x00000002, + 0x4062B633, 0x4063C020, 0x00000002, 0x4062B634, 0x4063C020, 0x00000002, + 0x4062B635, 0x4063C020, 0x00000002, 0x4062B636, 0x4063C020, 0x00000002, + 0x4062B637, 0x4063C020, 0x00000002, 0x4062B638, 0x4063C020, 0x00000003, + 0x4062B621, 0x4063C020, 0x40648C20, 0x00000003, 0x4062B622, 0x4063C020, + 0x40648C20, 0x00000002, 0x4062B621, 0x4063C220, 0x00000002, 0x4062B622, + 0x4063C220, 0x00000002, 0x4062B623, 0x4063C220, 0x00000002, 0x4062B624, + 0x4063C220, 0x00000002, 0x4062B625, 0x4063C220, 0x00000002, 0x4062B626, + 0x4063C220, 0x00000002, 0x4062B627, 0x4063C220, + // Block 368, offset 0x5c00 + 0x00000002, 0x4062B628, 0x4063C220, 0x00000002, 0x4062B629, 0x4063C220, + 0x00000002, 0x4062B62A, 0x4063C220, 0x00000002, 0x4062B62B, 0x4063C220, + 0x00000002, 0x4062B62C, 0x4063C220, 0x00000002, 0x4062B62D, 0x4063C220, + 0x00000002, 0x4062B62E, 0x4063C220, 0x00000002, 0x4062B62F, 0x4063C220, + 0x00000002, 0x4062B630, 0x4063C220, 0x00000002, 0x4062B631, 0x4063C220, + 0x00000002, 0x4062B632, 0x4063C220, 0x00000002, 0x4062B633, 0x4063C220, + 0x00000002, 0x4062B634, 0x4063C220, 0x00000002, 0x4062B621, 0x4063CA20, + 0x00000002, 0x4062B622, 0x4063CA20, 0x00000002, 0x4062B623, 0x4063CA20, + 0x00000002, 0x4062B624, 0x4063CA20, 0x00000002, 0x4062B625, 0x4063CA20, + 0x00000002, 0x4062B626, 0x4063CA20, 0x00000002, 0x4062B627, 0x4063CA20, + 0x00000002, 0x4062B628, 0x4063CA20, 0x00000002, + // Block 369, offset 0x5c40 + 0x4062B629, 0x4063CA20, 0x00000002, 0x4062B62A, 0x4063CA20, 0x00000002, + 0x4062B62B, 0x4063CA20, 0x00000002, 0x4062B62C, 0x4063CA20, 0x00000002, + 0x4062B62D, 0x4063CA20, 0x00000002, 0x4062B62E, 0x4063CA20, 0x00000002, + 0x4062B62F, 0x4063CA20, 0x00000002, 0x4062B630, 0x4063CA20, 0x00000002, + 0x4062B631, 0x4063CA20, 0x00000002, 0x4062B632, 0x4063CA20, 0x00000002, + 0x4062B633, 0x4063CA20, 0x00000003, 0x4062B621, 0x4063CA20, 0x40646420, + 0x00000003, 0x4062B622, 0x4063CA20, 0x40646420, 0x00000003, 0x4062B623, + 0x4063CA20, 0x40646420, 0x00000003, 0x4062B624, 0x4063CA20, 0x40646420, + 0x00000003, 0x4062B621, 0x4063CA20, 0x40646A20, 0x00000003, 0x4062B622, + 0x4063CA20, 0x40646A20, 0x00000003, 0x4062B623, 0x4063CA20, 0x40646A20, + 0x00000003, 0x4062B624, 0x4063CA20, 0x40646A20, + // Block 370, offset 0x5c80 + 0x00000003, 0x4062B625, 0x4063CA20, 0x40646A20, 0x00000003, 0x4062B626, + 0x4063CA20, 0x40646A20, 0x00000003, 0x4062B627, 0x4063CA20, 0x40646A20, + 0x00000003, 0x4062B621, 0x4063CA20, 0x40647220, 0x00000003, 0x4062B622, + 0x4063CA20, 0x40647220, 0x00000003, 0x4062B623, 0x4063CA20, 0x40647220, + 0x00000003, 0x4062B624, 0x4063CA20, 0x40647220, 0x00000003, 0x4062B625, + 0x4063CA20, 0x40647220, 0x00000003, 0x4062B621, 0x4063CA20, 0x40648C20, + 0x00000003, 0x4062B622, 0x4063CA20, 0x40648C20, 0x00000003, 0x4062B623, + 0x4063CA20, 0x40648C20, 0x00000003, 0x4062B621, 0x4063CC20, 0x40646420, + 0x00000003, 0x4062B622, 0x4063CC20, 0x40646420, 0x00000003, 0x4062B623, + 0x4063CC20, 0x40646420, 0x00000003, 0x4062B621, 0x4063CC20, 0x40648220, + 0x00000003, 0x4062B622, 0x4063CC20, 0x40648220, + // Block 371, offset 0x5cc0 + 0x00000003, 0x4062B623, 0x4063CC20, 0x40648220, 0x00000003, 0x4062B624, + 0x4063CC20, 0x40648220, 0x00000003, 0x4062B621, 0x4063CC20, 0x40648C20, + 0x00000003, 0x4062B622, 0x4063CC20, 0x40648C20, 0x00000003, 0x4062B623, + 0x4063CC20, 0x40648C20, 0x00000003, 0x4062B624, 0x4063CC20, 0x40648C20, + 0x00000003, 0x4062B625, 0x4063CC20, 0x40648C20, 0x00000003, 0x4062B626, + 0x4063CC20, 0x40648C20, 0x00000003, 0x4062B627, 0x4063CC20, 0x40648C20, + 0x00000003, 0x4062B628, 0x4063CC20, 0x40648C20, 0x00000002, 0x4062B621, + 0x4063D020, 0x00000002, 0x4062B622, 0x4063D020, 0x00000002, 0x4062B623, + 0x4063D020, 0x00000002, 0x4062B624, 0x4063D020, 0x00000002, 0x4062B625, + 0x4063D020, 0x00000002, 0x4062B626, 0x4063D020, 0x00000002, 0x4062B627, + 0x4063D020, 0x00000002, 0x4062B628, 0x4063D020, + // Block 372, offset 0x5d00 + 0x00000002, 0x4062B629, 0x4063D020, 0x00000002, 0x4062B62A, 0x4063D020, + 0x00000002, 0x4062B62B, 0x4063D020, 0x00000002, 0x4062B62C, 0x4063D020, + 0x00000002, 0x4062B62D, 0x4063D020, 0x00000002, 0x4062B62E, 0x4063D020, + 0x00000002, 0x4062B62F, 0x4063D020, 0x00000002, 0x4062B630, 0x4063D020, + 0x00000002, 0x4062B631, 0x4063D020, 0x00000002, 0x4062B632, 0x4063D020, + 0x00000002, 0x4062B633, 0x4063D020, 0x00000002, 0x4062B634, 0x4063D020, + 0x00000002, 0x4062B635, 0x4063D020, 0x00000002, 0x4062B636, 0x4063D020, + 0x00000002, 0x4062B637, 0x4063D020, 0x00000002, 0x4062B638, 0x4063D020, + 0x00000002, 0x4062B639, 0x4063D020, 0x00000002, 0x4062B63A, 0x4063D020, + 0x00000002, 0x4062B63B, 0x4063D020, 0x00000002, 0x4062B63C, 0x4063D020, + 0x00000002, 0x4062B63D, 0x4063D020, 0x00000002, + // Block 373, offset 0x5d40 + 0x4062B63E, 0x4063D020, 0x00000002, 0x4062B63F, 0x4063D020, 0x00000002, + 0x4062B640, 0x4063D020, 0x00000002, 0x4062B641, 0x4063D020, 0x00000002, + 0x4062B642, 0x4063D020, 0x00000002, 0x4062B643, 0x4063D020, 0x00000002, + 0x4062B644, 0x4063D020, 0x00000002, 0x4062B645, 0x4063D020, 0x00000002, + 0x4062B646, 0x4063D020, 0x00000002, 0x4062B647, 0x4063D020, 0x00000003, + 0x4062B621, 0x4063D020, 0x40646A20, 0x00000003, 0x4062B622, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062B623, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062B624, 0x4063D020, 0x40646A20, 0x00000003, 0x4062B625, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062B626, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062B627, 0x4063D020, 0x40646A20, 0x00000003, 0x4062B628, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062B629, 0x4063D020, + // Block 374, offset 0x5d80 + 0x40646A20, 0x00000003, 0x4062B62A, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062B62B, 0x4063D020, 0x40646A20, 0x00000003, 0x4062B62C, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062B62D, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062B62E, 0x4063D020, 0x40646A20, 0x00000003, 0x4062B62F, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062B630, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062B631, 0x4063D020, 0x40646A20, 0x00000003, 0x4062B632, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062B633, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062B634, 0x4063D020, 0x40646A20, 0x00000003, 0x4062B635, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062B621, 0x4063D020, 0x40648220, 0x00000003, + 0x4062B622, 0x4063D020, 0x40648220, 0x00000003, 0x4062B623, 0x4063D020, + 0x40648220, 0x00000003, 0x4062B624, 0x4063D020, + // Block 375, offset 0x5dc0 + 0x40648220, 0x00000003, 0x4062B625, 0x4063D020, 0x40648220, 0x00000003, + 0x4062B626, 0x4063D020, 0x40648220, 0x00000003, 0x4062B621, 0x4063D020, + 0x40648420, 0x00000003, 0x4062B622, 0x4063D020, 0x40648420, 0x00000003, + 0x4062B623, 0x4063D020, 0x40648420, 0x00000003, 0x4062B624, 0x4063D020, + 0x40648420, 0x00000003, 0x4062B625, 0x4063D020, 0x40648420, 0x00000002, + 0x4062B821, 0x4063A820, 0x00000002, 0x4062B822, 0x4063A820, 0x00000002, + 0x4062B823, 0x4063A820, 0x00000002, 0x4062B824, 0x4063A820, 0x00000002, + 0x4062B825, 0x4063A820, 0x00000002, 0x4062B826, 0x4063A820, 0x00000002, + 0x4062B827, 0x4063A820, 0x00000002, 0x4062B828, 0x4063A820, 0x00000002, + 0x4062B829, 0x4063A820, 0x00000002, 0x4062B82A, 0x4063A820, 0x00000002, + 0x4062B82B, 0x4063A820, 0x00000002, 0x4062B82C, + // Block 376, offset 0x5e00 + 0x4063A820, 0x00000002, 0x4062B82D, 0x4063A820, 0x00000002, 0x4062B82E, + 0x4063A820, 0x00000003, 0x4062B821, 0x4063A820, 0x40646420, 0x00000003, + 0x4062B822, 0x4063A820, 0x40646420, 0x00000003, 0x4062B823, 0x4063A820, + 0x40646420, 0x00000003, 0x4062B824, 0x4063A820, 0x40646420, 0x00000003, + 0x4062B825, 0x4063A820, 0x40646420, 0x00000003, 0x4062B826, 0x4063A820, + 0x40646420, 0x00000003, 0x4062B827, 0x4063A820, 0x40646420, 0x00000003, + 0x4062B828, 0x4063A820, 0x40646420, 0x00000003, 0x4062B821, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062B822, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062B823, 0x4063A820, 0x40646A20, 0x00000003, 0x4062B824, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062B825, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062B826, 0x4063A820, 0x40646A20, 0x00000003, + // Block 377, offset 0x5e40 + 0x4062B827, 0x4063A820, 0x40646A20, 0x00000003, 0x4062B828, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062B829, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062B82A, 0x4063A820, 0x40646A20, 0x00000003, 0x4062B82B, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062B82C, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062B82D, 0x4063A820, 0x40646A20, 0x00000003, 0x4062B82E, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062B82F, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062B830, 0x4063A820, 0x40646A20, 0x00000003, 0x4062B831, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062B832, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062B833, 0x4063A820, 0x40646A20, 0x00000003, 0x4062B834, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062B835, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062B836, 0x4063A820, 0x40646A20, 0x00000003, + // Block 378, offset 0x5e80 + 0x4062B837, 0x4063A820, 0x40646A20, 0x00000003, 0x4062B838, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062B839, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062B83A, 0x4063A820, 0x40646A20, 0x00000003, 0x4062B83B, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062B83C, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062B821, 0x4063A820, 0x40647220, 0x00000003, 0x4062B822, 0x4063A820, + 0x40647220, 0x00000003, 0x4062B823, 0x4063A820, 0x40647220, 0x00000003, + 0x4062B824, 0x4063A820, 0x40647220, 0x00000003, 0x4062B825, 0x4063A820, + 0x40647220, 0x00000003, 0x4062B826, 0x4063A820, 0x40647220, 0x00000003, + 0x4062B827, 0x4063A820, 0x40647220, 0x00000003, 0x4062B828, 0x4063A820, + 0x40647220, 0x00000003, 0x4062B829, 0x4063A820, 0x40647220, 0x00000003, + 0x4062B821, 0x4063A820, 0x40648C20, 0x00000003, + // Block 379, offset 0x5ec0 + 0x4062B822, 0x4063A820, 0x40648C20, 0x00000003, 0x4062B823, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062B824, 0x4063A820, 0x40648C20, 0x00000003, + 0x4062B825, 0x4063A820, 0x40648C20, 0x00000003, 0x4062B826, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062B827, 0x4063A820, 0x40648C20, 0x00000003, + 0x4062B828, 0x4063A820, 0x40648C20, 0x00000003, 0x4062B829, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062B82A, 0x4063A820, 0x40648C20, 0x00000003, + 0x4062B82B, 0x4063A820, 0x40648C20, 0x00000003, 0x4062B82C, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062B82D, 0x4063A820, 0x40648C20, 0x00000003, + 0x4062B82E, 0x4063A820, 0x40648C20, 0x00000003, 0x4062B82F, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062B830, 0x4063A820, 0x40648C20, 0x00000003, + 0x4062B831, 0x4063A820, 0x40648C20, 0x00000003, + // Block 380, offset 0x5f00 + 0x4062B832, 0x4063A820, 0x40648C20, 0x00000002, 0x4062B821, 0x4063AA20, + 0x00000002, 0x4062B822, 0x4063AA20, 0x00000002, 0x4062B823, 0x4063AA20, + 0x00000002, 0x4062B824, 0x4063AA20, 0x00000002, 0x4062B825, 0x4063AA20, + 0x00000002, 0x4062B826, 0x4063AA20, 0x00000002, 0x4062B827, 0x4063AA20, + 0x00000002, 0x4062B828, 0x4063AA20, 0x00000002, 0x4062B829, 0x4063AA20, + 0x00000002, 0x4062B82A, 0x4063AA20, 0x00000002, 0x4062B82B, 0x4063AA20, + 0x00000002, 0x4062B82C, 0x4063AA20, 0x00000002, 0x4062B82D, 0x4063AA20, + 0x00000002, 0x4062B82E, 0x4063AA20, 0x00000002, 0x4062B82F, 0x4063AA20, + 0x00000002, 0x4062B830, 0x4063AA20, 0x00000002, 0x4062B831, 0x4063AA20, + 0x00000002, 0x4062B832, 0x4063AA20, 0x00000002, 0x4062B833, 0x4063AA20, + 0x00000002, 0x4062B834, 0x4063AA20, 0x00000002, + // Block 381, offset 0x5f40 + 0x4062B835, 0x4063AA20, 0x00000002, 0x4062B836, 0x4063AA20, 0x00000002, + 0x4062B837, 0x4063AA20, 0x00000003, 0x4062B821, 0x4063AA20, 0x40646420, + 0x00000003, 0x4062B822, 0x4063AA20, 0x40646420, 0x00000003, 0x4062B823, + 0x4063AA20, 0x40646420, 0x00000003, 0x4062B824, 0x4063AA20, 0x40646420, + 0x00000003, 0x4062B825, 0x4063AA20, 0x40646420, 0x00000003, 0x4062B826, + 0x4063AA20, 0x40646420, 0x00000003, 0x4062B827, 0x4063AA20, 0x40646420, + 0x00000003, 0x4062B828, 0x4063AA20, 0x40646420, 0x00000003, 0x4062B821, + 0x4063AA20, 0x40648C20, 0x00000003, 0x4062B822, 0x4063AA20, 0x40648C20, + 0x00000003, 0x4062B823, 0x4063AA20, 0x40648C20, 0x00000003, 0x4062B824, + 0x4063AA20, 0x40648C20, 0x00000003, 0x4062B825, 0x4063AA20, 0x40648C20, + 0x00000003, 0x4062B826, 0x4063AA20, 0x40648C20, + // Block 382, offset 0x5f80 + 0x00000003, 0x4062B827, 0x4063AA20, 0x40648C20, 0x00000003, 0x4062B828, + 0x4063AA20, 0x40648C20, 0x00000003, 0x4062B829, 0x4063AA20, 0x40648C20, + 0x00000003, 0x4062B82A, 0x4063AA20, 0x40648C20, 0x00000003, 0x4062B821, + 0x4063B420, 0x40646420, 0x00000003, 0x4062B822, 0x4063B420, 0x40646420, + 0x00000003, 0x4062B823, 0x4063B420, 0x40646420, 0x00000003, 0x4062B824, + 0x4063B420, 0x40646420, 0x00000003, 0x4062B821, 0x4063B420, 0x40646A20, + 0x00000003, 0x4062B822, 0x4063B420, 0x40646A20, 0x00000003, 0x4062B823, + 0x4063B420, 0x40646A20, 0x00000003, 0x4062B824, 0x4063B420, 0x40646A20, + 0x00000003, 0x4062B825, 0x4063B420, 0x40646A20, 0x00000003, 0x4062B826, + 0x4063B420, 0x40646A20, 0x00000003, 0x4062B827, 0x4063B420, 0x40646A20, + 0x00000003, 0x4062B828, 0x4063B420, 0x40646A20, + // Block 383, offset 0x5fc0 + 0x00000003, 0x4062B829, 0x4063B420, 0x40646A20, 0x00000003, 0x4062B82A, + 0x4063B420, 0x40646A20, 0x00000003, 0x4062B82B, 0x4063B420, 0x40646A20, + 0x00000003, 0x4062B82C, 0x4063B420, 0x40646A20, 0x00000003, 0x4062B82D, + 0x4063B420, 0x40646A20, 0x00000003, 0x4062B82E, 0x4063B420, 0x40646A20, + 0x00000003, 0x4062B82F, 0x4063B420, 0x40646A20, 0x00000003, 0x4062B830, + 0x4063B420, 0x40646A20, 0x00000003, 0x4062B821, 0x4063B420, 0x40647220, + 0x00000003, 0x4062B822, 0x4063B420, 0x40647220, 0x00000003, 0x4062B823, + 0x4063B420, 0x40647220, 0x00000003, 0x4062B824, 0x4063B420, 0x40647220, + 0x00000003, 0x4062B821, 0x4063B420, 0x40648C20, 0x00000003, 0x4062B822, + 0x4063B420, 0x40648C20, 0x00000003, 0x4062B823, 0x4063B420, 0x40648C20, + 0x00000003, 0x4062B824, 0x4063B420, 0x40648C20, + // Block 384, offset 0x6000 + 0x00000003, 0x4062B825, 0x4063B420, 0x40648C20, 0x00000003, 0x4062B826, + 0x4063B420, 0x40648C20, 0x00000003, 0x4062B827, 0x4063B420, 0x40648C20, + 0x00000003, 0x4062B828, 0x4063B420, 0x40648C20, 0x00000003, 0x4062B829, + 0x4063B420, 0x40648C20, 0x00000003, 0x4062B82A, 0x4063B420, 0x40648C20, + 0x00000003, 0x4062B82B, 0x4063B420, 0x40648C20, 0x00000003, 0x4062B82C, + 0x4063B420, 0x40648C20, 0x00000003, 0x4062B82D, 0x4063B420, 0x40648C20, + 0x00000003, 0x4062B82E, 0x4063B420, 0x40648C20, 0x00000003, 0x4062B82F, + 0x4063B420, 0x40648C20, 0x00000003, 0x4062B830, 0x4063B420, 0x40648C20, + 0x00000002, 0x4062B821, 0x4063B620, 0x00000002, 0x4062B821, 0x4063B820, + 0x00000002, 0x4062B822, 0x4063B820, 0x00000002, 0x4062B823, 0x4063B820, + 0x00000002, 0x4062B824, 0x4063B820, 0x00000002, + // Block 385, offset 0x6040 + 0x4062B825, 0x4063B820, 0x00000002, 0x4062B826, 0x4063B820, 0x00000002, + 0x4062B827, 0x4063B820, 0x00000002, 0x4062B828, 0x4063B820, 0x00000002, + 0x4062B829, 0x4063B820, 0x00000002, 0x4062B82A, 0x4063B820, 0x00000002, + 0x4062B82B, 0x4063B820, 0x00000002, 0x4062B82C, 0x4063B820, 0x00000002, + 0x4062B82D, 0x4063B820, 0x00000002, 0x4062B82E, 0x4063B820, 0x00000002, + 0x4062B82F, 0x4063B820, 0x00000002, 0x4062B830, 0x4063B820, 0x00000002, + 0x4062B831, 0x4063B820, 0x00000002, 0x4062B832, 0x4063B820, 0x00000002, + 0x4062B833, 0x4063B820, 0x00000002, 0x4062B834, 0x4063B820, 0x00000002, + 0x4062B835, 0x4063B820, 0x00000002, 0x4062B836, 0x4063B820, 0x00000002, + 0x4062B837, 0x4063B820, 0x00000002, 0x4062B838, 0x4063B820, 0x00000002, + 0x4062B839, 0x4063B820, 0x00000002, 0x4062B83A, + // Block 386, offset 0x6080 + 0x4063B820, 0x00000002, 0x4062B83B, 0x4063B820, 0x00000002, 0x4062B83C, + 0x4063B820, 0x00000002, 0x4062B83D, 0x4063B820, 0x00000002, 0x4062B83E, + 0x4063B820, 0x00000002, 0x4062B83F, 0x4063B820, 0x00000002, 0x4062B840, + 0x4063B820, 0x00000002, 0x4062B841, 0x4063B820, 0x00000002, 0x4062B842, + 0x4063B820, 0x00000002, 0x4062B843, 0x4063B820, 0x00000002, 0x4062B844, + 0x4063B820, 0x00000002, 0x4062B845, 0x4063B820, 0x00000002, 0x4062B846, + 0x4063B820, 0x00000002, 0x4062B847, 0x4063B820, 0x00000003, 0x4062B821, + 0x4063B820, 0x40646420, 0x00000003, 0x4062B822, 0x4063B820, 0x40646420, + 0x00000003, 0x4062B823, 0x4063B820, 0x40646420, 0x00000003, 0x4062B824, + 0x4063B820, 0x40646420, 0x00000003, 0x4062B825, 0x4063B820, 0x40646420, + 0x00000003, 0x4062B826, 0x4063B820, 0x40646420, + // Block 387, offset 0x60c0 + 0x00000003, 0x4062B827, 0x4063B820, 0x40646420, 0x00000003, 0x4062B828, + 0x4063B820, 0x40646420, 0x00000003, 0x4062B829, 0x4063B820, 0x40646420, + 0x00000003, 0x4062B821, 0x4063B820, 0x40647220, 0x00000003, 0x4062B822, + 0x4063B820, 0x40647220, 0x00000003, 0x4062B821, 0x4063B820, 0x40648C20, + 0x00000003, 0x4062B822, 0x4063B820, 0x40648C20, 0x00000003, 0x4062B823, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062B824, 0x4063B820, 0x40648C20, + 0x00000003, 0x4062B825, 0x4063B820, 0x40648C20, 0x00000003, 0x4062B826, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062B827, 0x4063B820, 0x40648C20, + 0x00000003, 0x4062B828, 0x4063B820, 0x40648C20, 0x00000003, 0x4062B829, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062B82A, 0x4063B820, 0x40648C20, + 0x00000003, 0x4062B82B, 0x4063B820, 0x40648C20, + // Block 388, offset 0x6100 + 0x00000003, 0x4062B82C, 0x4063B820, 0x40648C20, 0x00000003, 0x4062B82D, + 0x4063B820, 0x40648C20, 0x00000002, 0x4062B821, 0x4063C020, 0x00000002, + 0x4062B822, 0x4063C020, 0x00000002, 0x4062B823, 0x4063C020, 0x00000002, + 0x4062B824, 0x4063C020, 0x00000002, 0x4062B825, 0x4063C020, 0x00000002, + 0x4062B826, 0x4063C020, 0x00000002, 0x4062B827, 0x4063C020, 0x00000002, + 0x4062B828, 0x4063C020, 0x00000002, 0x4062B829, 0x4063C020, 0x00000002, + 0x4062B82A, 0x4063C020, 0x00000002, 0x4062B82B, 0x4063C020, 0x00000002, + 0x4062B82C, 0x4063C020, 0x00000002, 0x4062B82D, 0x4063C020, 0x00000002, + 0x4062B82E, 0x4063C020, 0x00000002, 0x4062B82F, 0x4063C020, 0x00000002, + 0x4062B830, 0x4063C020, 0x00000002, 0x4062B821, 0x4063C220, 0x00000002, + 0x4062B822, 0x4063C220, 0x00000002, 0x4062B823, + // Block 389, offset 0x6140 + 0x4063C220, 0x00000002, 0x4062B824, 0x4063C220, 0x00000002, 0x4062B825, + 0x4063C220, 0x00000002, 0x4062B826, 0x4063C220, 0x00000002, 0x4062B827, + 0x4063C220, 0x00000002, 0x4062B828, 0x4063C220, 0x00000002, 0x4062B829, + 0x4063C220, 0x00000002, 0x4062B82A, 0x4063C220, 0x00000002, 0x4062B82B, + 0x4063C220, 0x00000002, 0x4062B82C, 0x4063C220, 0x00000002, 0x4062B82D, + 0x4063C220, 0x00000002, 0x4062B82E, 0x4063C220, 0x00000002, 0x4062B82F, + 0x4063C220, 0x00000002, 0x4062B830, 0x4063C220, 0x00000002, 0x4062B831, + 0x4063C220, 0x00000002, 0x4062B832, 0x4063C220, 0x00000002, 0x4062B833, + 0x4063C220, 0x00000002, 0x4062B834, 0x4063C220, 0x00000002, 0x4062B835, + 0x4063C220, 0x00000002, 0x4062B836, 0x4063C220, 0x00000002, 0x4062B837, + 0x4063C220, 0x00000002, 0x4062B838, 0x4063C220, + // Block 390, offset 0x6180 + 0x00000002, 0x4062B839, 0x4063C220, 0x00000002, 0x4062B83A, 0x4063C220, + 0x00000002, 0x4062B83B, 0x4063C220, 0x00000003, 0x4062B821, 0x4063C220, + 0x40646420, 0x00000003, 0x4062B822, 0x4063C220, 0x40646420, 0x00000003, + 0x4062B823, 0x4063C220, 0x40646420, 0x00000003, 0x4062B821, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062B822, 0x4063C220, 0x40646A20, 0x00000003, + 0x4062B823, 0x4063C220, 0x40646A20, 0x00000003, 0x4062B824, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062B825, 0x4063C220, 0x40646A20, 0x00000003, + 0x4062B826, 0x4063C220, 0x40646A20, 0x00000003, 0x4062B827, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062B828, 0x4063C220, 0x40646A20, 0x00000003, + 0x4062B829, 0x4063C220, 0x40646A20, 0x00000003, 0x4062B82A, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062B82B, 0x4063C220, + // Block 391, offset 0x61c0 + 0x40646A20, 0x00000003, 0x4062B82C, 0x4063C220, 0x40646A20, 0x00000003, + 0x4062B82D, 0x4063C220, 0x40646A20, 0x00000003, 0x4062B82E, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062B82F, 0x4063C220, 0x40646A20, 0x00000003, + 0x4062B830, 0x4063C220, 0x40646A20, 0x00000003, 0x4062B831, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062B832, 0x4063C220, 0x40646A20, 0x00000003, + 0x4062B833, 0x4063C220, 0x40646A20, 0x00000003, 0x4062B821, 0x4063C220, + 0x40647220, 0x00000003, 0x4062B822, 0x4063C220, 0x40647220, 0x00000003, + 0x4062B823, 0x4063C220, 0x40647220, 0x00000002, 0x4062B821, 0x4063D020, + 0x00000002, 0x4062B822, 0x4063D020, 0x00000002, 0x4062B823, 0x4063D020, + 0x00000002, 0x4062B824, 0x4063D020, 0x00000002, 0x4062B825, 0x4063D020, + 0x00000002, 0x4062B826, 0x4063D020, 0x00000002, + // Block 392, offset 0x6200 + 0x4062B827, 0x4063D020, 0x00000002, 0x4062B828, 0x4063D020, 0x00000002, + 0x4062B829, 0x4063D020, 0x00000002, 0x4062B82A, 0x4063D020, 0x00000002, + 0x4062B82B, 0x4063D020, 0x00000002, 0x4062B82C, 0x4063D020, 0x00000002, + 0x4062B82D, 0x4063D020, 0x00000002, 0x4062B82E, 0x4063D020, 0x00000002, + 0x4062B82F, 0x4063D020, 0x00000002, 0x4062B830, 0x4063D020, 0x00000002, + 0x4062B831, 0x4063D020, 0x00000002, 0x4062B832, 0x4063D020, 0x00000002, + 0x4062B833, 0x4063D020, 0x00000002, 0x4062B834, 0x4063D020, 0x00000002, + 0x4062B835, 0x4063D020, 0x00000002, 0x4062B836, 0x4063D020, 0x00000002, + 0x4062B837, 0x4063D020, 0x00000002, 0x4062B838, 0x4063D020, 0x00000002, + 0x4062B839, 0x4063D020, 0x00000002, 0x4062B83A, 0x4063D020, 0x00000002, + 0x4062B83B, 0x4063D020, 0x00000002, 0x4062B83C, + // Block 393, offset 0x6240 + 0x4063D020, 0x00000002, 0x4062B83D, 0x4063D020, 0x00000002, 0x4062B83E, + 0x4063D020, 0x00000002, 0x4062B83F, 0x4063D020, 0x00000002, 0x4062B840, + 0x4063D020, 0x00000002, 0x4062B841, 0x4063D020, 0x00000003, 0x4062B821, + 0x4063D020, 0x40646A20, 0x00000003, 0x4062B822, 0x4063D020, 0x40646A20, + 0x00000003, 0x4062B823, 0x4063D020, 0x40646A20, 0x00000003, 0x4062B824, + 0x4063D020, 0x40646A20, 0x00000003, 0x4062B825, 0x4063D020, 0x40646A20, + 0x00000003, 0x4062B826, 0x4063D020, 0x40646A20, 0x00000003, 0x4062B827, + 0x4063D020, 0x40646A20, 0x00000003, 0x4062B828, 0x4063D020, 0x40646A20, + 0x00000003, 0x4062B829, 0x4063D020, 0x40646A20, 0x00000003, 0x4062B82A, + 0x4063D020, 0x40646A20, 0x00000003, 0x4062B82B, 0x4063D020, 0x40646A20, + 0x00000003, 0x4062B82C, 0x4063D020, 0x40646A20, + // Block 394, offset 0x6280 + 0x00000003, 0x4062B82D, 0x4063D020, 0x40646A20, 0x00000003, 0x4062B82E, + 0x4063D020, 0x40646A20, 0x00000003, 0x4062B82F, 0x4063D020, 0x40646A20, + 0x00000003, 0x4062B830, 0x4063D020, 0x40646A20, 0x00000003, 0x4062B831, + 0x4063D020, 0x40646A20, 0x00000003, 0x4062B832, 0x4063D020, 0x40646A20, + 0x00000003, 0x4062B833, 0x4063D020, 0x40646A20, 0x00000003, 0x4062B834, + 0x4063D020, 0x40646A20, 0x00000003, 0x4062B835, 0x4063D020, 0x40646A20, + 0x00000003, 0x4062B836, 0x4063D020, 0x40646A20, 0x00000003, 0x4062B837, + 0x4063D020, 0x40646A20, 0x00000003, 0x4062B821, 0x4063D020, 0x40647220, + 0x00000003, 0x4062B822, 0x4063D020, 0x40647220, 0x00000003, 0x4062B823, + 0x4063D020, 0x40647220, 0x00000003, 0x4062B824, 0x4063D020, 0x40647220, + 0x00000003, 0x4062B825, 0x4063D020, 0x40647220, + // Block 395, offset 0x62c0 + 0x00000003, 0x4062BA21, 0x4063A820, 0x40646420, 0x00000003, 0x4062BA22, + 0x4063A820, 0x40646420, 0x00000003, 0x4062BA23, 0x4063A820, 0x40646420, + 0x00000003, 0x4062BA24, 0x4063A820, 0x40646420, 0x00000003, 0x4062BA25, + 0x4063A820, 0x40646420, 0x00000003, 0x4062BA26, 0x4063A820, 0x40646420, + 0x00000003, 0x4062BA27, 0x4063A820, 0x40646420, 0x00000003, 0x4062BA28, + 0x4063A820, 0x40646420, 0x00000003, 0x4062BA29, 0x4063A820, 0x40646420, + 0x00000003, 0x4062BA2A, 0x4063A820, 0x40646420, 0x00000003, 0x4062BA2B, + 0x4063A820, 0x40646420, 0x00000003, 0x4062BA2C, 0x4063A820, 0x40646420, + 0x00000003, 0x4062BA2D, 0x4063A820, 0x40646420, 0x00000003, 0x4062BA2E, + 0x4063A820, 0x40646420, 0x00000003, 0x4062BA2F, 0x4063A820, 0x40646420, + 0x00000003, 0x4062BA30, 0x4063A820, 0x40646420, + // Block 396, offset 0x6300 + 0x00000003, 0x4062BA31, 0x4063A820, 0x40646420, 0x00000003, 0x4062BA32, + 0x4063A820, 0x40646420, 0x00000003, 0x4062BA33, 0x4063A820, 0x40646420, + 0x00000003, 0x4062BA34, 0x4063A820, 0x40646420, 0x00000003, 0x4062BA35, + 0x4063A820, 0x40646420, 0x00000003, 0x4062BA36, 0x4063A820, 0x40646420, + 0x00000003, 0x4062BA37, 0x4063A820, 0x40646420, 0x00000003, 0x4062BA38, + 0x4063A820, 0x40646420, 0x00000003, 0x4062BA39, 0x4063A820, 0x40646420, + 0x00000003, 0x4062BA21, 0x4063A820, 0x40646A20, 0x00000003, 0x4062BA22, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062BA23, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062BA24, 0x4063A820, 0x40646A20, 0x00000003, 0x4062BA25, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062BA26, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062BA27, 0x4063A820, 0x40646A20, + // Block 397, offset 0x6340 + 0x00000003, 0x4062BA28, 0x4063A820, 0x40646A20, 0x00000003, 0x4062BA29, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062BA2A, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062BA2B, 0x4063A820, 0x40646A20, 0x00000003, 0x4062BA2C, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062BA2D, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062BA2E, 0x4063A820, 0x40646A20, 0x00000003, 0x4062BA2F, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062BA30, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062BA31, 0x4063A820, 0x40646A20, 0x00000003, 0x4062BA32, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062BA33, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062BA34, 0x4063A820, 0x40646A20, 0x00000003, 0x4062BA35, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062BA36, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062BA37, 0x4063A820, 0x40646A20, + // Block 398, offset 0x6380 + 0x00000003, 0x4062BA38, 0x4063A820, 0x40646A20, 0x00000003, 0x4062BA39, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062BA3A, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062BA3B, 0x4063A820, 0x40646A20, 0x00000003, 0x4062BA3C, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062BA3D, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062BA3E, 0x4063A820, 0x40646A20, 0x00000003, 0x4062BA3F, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062BA40, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062BA41, 0x4063A820, 0x40646A20, 0x00000003, 0x4062BA21, + 0x4063A820, 0x40647220, 0x00000003, 0x4062BA22, 0x4063A820, 0x40647220, + 0x00000003, 0x4062BA23, 0x4063A820, 0x40647220, 0x00000003, 0x4062BA24, + 0x4063A820, 0x40647220, 0x00000003, 0x4062BA25, 0x4063A820, 0x40647220, + 0x00000003, 0x4062BA26, 0x4063A820, 0x40647220, + // Block 399, offset 0x63c0 + 0x00000003, 0x4062BA27, 0x4063A820, 0x40647220, 0x00000003, 0x4062BA28, + 0x4063A820, 0x40647220, 0x00000003, 0x4062BA29, 0x4063A820, 0x40647220, + 0x00000003, 0x4062BA2A, 0x4063A820, 0x40647220, 0x00000003, 0x4062BA2B, + 0x4063A820, 0x40647220, 0x00000003, 0x4062BA2C, 0x4063A820, 0x40647220, + 0x00000003, 0x4062BA2D, 0x4063A820, 0x40647220, 0x00000003, 0x4062BA2E, + 0x4063A820, 0x40647220, 0x00000003, 0x4062BA2F, 0x4063A820, 0x40647220, + 0x00000003, 0x4062BA30, 0x4063A820, 0x40647220, 0x00000003, 0x4062BA21, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062BA22, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062BA23, 0x4063A820, 0x40648C20, 0x00000003, 0x4062BA24, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062BA25, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062BA26, 0x4063A820, 0x40648C20, + // Block 400, offset 0x6400 + 0x00000003, 0x4062BA27, 0x4063A820, 0x40648C20, 0x00000003, 0x4062BA28, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062BA29, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062BA2A, 0x4063A820, 0x40648C20, 0x00000003, 0x4062BA2B, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062BA2C, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062BA2D, 0x4063A820, 0x40648C20, 0x00000003, 0x4062BA2E, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062BA2F, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062BA30, 0x4063A820, 0x40648C20, 0x00000003, 0x4062BA31, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062BA32, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062BA33, 0x4063A820, 0x40648C20, 0x00000003, 0x4062BA34, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062BA35, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062BA36, 0x4063A820, 0x40648C20, + // Block 401, offset 0x6440 + 0x00000003, 0x4062BA37, 0x4063A820, 0x40648C20, 0x00000003, 0x4062BA38, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062BA39, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062BA3A, 0x4063A820, 0x40648C20, 0x00000003, 0x4062BA3B, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062BA3C, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062BA3D, 0x4063A820, 0x40648C20, 0x00000003, 0x4062BA3E, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062BA3F, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062BA40, 0x4063A820, 0x40648C20, 0x00000003, 0x4062BA41, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062BA42, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062BA43, 0x4063A820, 0x40648C20, 0x00000003, 0x4062BA44, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062BA45, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062BA46, 0x4063A820, 0x40648C20, + // Block 402, offset 0x6480 + 0x00000003, 0x4062BA47, 0x4063A820, 0x40648C20, 0x00000003, 0x4062BA48, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062BA49, 0x4063A820, 0x40648C20, + 0x00000002, 0x4062BA21, 0x4063AA20, 0x00000002, 0x4062BA22, 0x4063AA20, + 0x00000002, 0x4062BA23, 0x4063AA20, 0x00000002, 0x4062BA24, 0x4063AA20, + 0x00000002, 0x4062BA25, 0x4063AA20, 0x00000002, 0x4062BA26, 0x4063AA20, + 0x00000002, 0x4062BA27, 0x4063AA20, 0x00000002, 0x4062BA28, 0x4063AA20, + 0x00000002, 0x4062BA29, 0x4063AA20, 0x00000002, 0x4062BA2A, 0x4063AA20, + 0x00000002, 0x4062BA2B, 0x4063AA20, 0x00000002, 0x4062BA2C, 0x4063AA20, + 0x00000002, 0x4062BA2D, 0x4063AA20, 0x00000002, 0x4062BA2E, 0x4063AA20, + 0x00000002, 0x4062BA2F, 0x4063AA20, 0x00000002, 0x4062BA30, 0x4063AA20, + 0x00000002, 0x4062BA31, 0x4063AA20, 0x00000002, + // Block 403, offset 0x64c0 + 0x4062BA32, 0x4063AA20, 0x00000002, 0x4062BA33, 0x4063AA20, 0x00000002, + 0x4062BA34, 0x4063AA20, 0x00000002, 0x4062BA35, 0x4063AA20, 0x00000002, + 0x4062BA36, 0x4063AA20, 0x00000002, 0x4062BA37, 0x4063AA20, 0x00000002, + 0x4062BA38, 0x4063AA20, 0x00000003, 0x4062BA21, 0x4063AA20, 0x40646420, + 0x00000003, 0x4062BA22, 0x4063AA20, 0x40646420, 0x00000003, 0x4062BA23, + 0x4063AA20, 0x40646420, 0x00000003, 0x4062BA24, 0x4063AA20, 0x40646420, + 0x00000003, 0x4062BA25, 0x4063AA20, 0x40646420, 0x00000003, 0x4062BA26, + 0x4063AA20, 0x40646420, 0x00000003, 0x4062BA27, 0x4063AA20, 0x40646420, + 0x00000003, 0x4062BA28, 0x4063AA20, 0x40646420, 0x00000003, 0x4062BA29, + 0x4063AA20, 0x40646420, 0x00000003, 0x4062BA21, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062BA22, 0x4063B020, 0x40646A20, + // Block 404, offset 0x6500 + 0x00000003, 0x4062BA23, 0x4063B020, 0x40646A20, 0x00000003, 0x4062BA24, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062BA25, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062BA26, 0x4063B020, 0x40646A20, 0x00000003, 0x4062BA27, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062BA28, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062BA29, 0x4063B020, 0x40646A20, 0x00000003, 0x4062BA2A, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062BA2B, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062BA2C, 0x4063B020, 0x40646A20, 0x00000003, 0x4062BA2D, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062BA2E, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062BA21, 0x4063B020, 0x40647220, 0x00000003, 0x4062BA22, + 0x4063B020, 0x40647220, 0x00000003, 0x4062BA23, 0x4063B020, 0x40647220, + 0x00000003, 0x4062BA24, 0x4063B020, 0x40647220, + // Block 405, offset 0x6540 + 0x00000003, 0x4062BA25, 0x4063B020, 0x40647220, 0x00000003, 0x4062BA26, + 0x4063B020, 0x40647220, 0x00000003, 0x4062BA21, 0x4063B020, 0x40648220, + 0x00000003, 0x4062BA22, 0x4063B020, 0x40648220, 0x00000003, 0x4062BA23, + 0x4063B020, 0x40648220, 0x00000003, 0x4062BA24, 0x4063B020, 0x40648220, + 0x00000003, 0x4062BA25, 0x4063B020, 0x40648220, 0x00000003, 0x4062BA26, + 0x4063B020, 0x40648220, 0x00000003, 0x4062BA27, 0x4063B020, 0x40648220, + 0x00000003, 0x4062BA28, 0x4063B020, 0x40648220, 0x00000003, 0x4062BA29, + 0x4063B020, 0x40648220, 0x00000003, 0x4062BA2A, 0x4063B020, 0x40648220, + 0x00000003, 0x4062BA2B, 0x4063B020, 0x40648220, 0x00000003, 0x4062BA2C, + 0x4063B020, 0x40648220, 0x00000003, 0x4062BA21, 0x4063B020, 0x40648420, + 0x00000003, 0x4062BA22, 0x4063B020, 0x40648420, + // Block 406, offset 0x6580 + 0x00000003, 0x4062BA21, 0x4063B420, 0x40646420, 0x00000003, 0x4062BA22, + 0x4063B420, 0x40646420, 0x00000003, 0x4062BA23, 0x4063B420, 0x40646420, + 0x00000003, 0x4062BA24, 0x4063B420, 0x40646420, 0x00000003, 0x4062BA25, + 0x4063B420, 0x40646420, 0x00000003, 0x4062BA26, 0x4063B420, 0x40646420, + 0x00000003, 0x4062BA27, 0x4063B420, 0x40646420, 0x00000003, 0x4062BA28, + 0x4063B420, 0x40646420, 0x00000003, 0x4062BA29, 0x4063B420, 0x40646420, + 0x00000003, 0x4062BA2A, 0x4063B420, 0x40646420, 0x00000003, 0x4062BA2B, + 0x4063B420, 0x40646420, 0x00000003, 0x4062BA2C, 0x4063B420, 0x40646420, + 0x00000003, 0x4062BA2D, 0x4063B420, 0x40646420, 0x00000003, 0x4062BA2E, + 0x4063B420, 0x40646420, 0x00000003, 0x4062BA2F, 0x4063B420, 0x40646420, + 0x00000003, 0x4062BA30, 0x4063B420, 0x40646420, + // Block 407, offset 0x65c0 + 0x00000003, 0x4062BA31, 0x4063B420, 0x40646420, 0x00000003, 0x4062BA21, + 0x4063B420, 0x40646A20, 0x00000003, 0x4062BA22, 0x4063B420, 0x40646A20, + 0x00000003, 0x4062BA23, 0x4063B420, 0x40646A20, 0x00000003, 0x4062BA24, + 0x4063B420, 0x40646A20, 0x00000003, 0x4062BA25, 0x4063B420, 0x40646A20, + 0x00000003, 0x4062BA26, 0x4063B420, 0x40646A20, 0x00000003, 0x4062BA27, + 0x4063B420, 0x40646A20, 0x00000003, 0x4062BA28, 0x4063B420, 0x40646A20, + 0x00000003, 0x4062BA29, 0x4063B420, 0x40646A20, 0x00000003, 0x4062BA2A, + 0x4063B420, 0x40646A20, 0x00000003, 0x4062BA2B, 0x4063B420, 0x40646A20, + 0x00000003, 0x4062BA2C, 0x4063B420, 0x40646A20, 0x00000003, 0x4062BA2D, + 0x4063B420, 0x40646A20, 0x00000003, 0x4062BA2E, 0x4063B420, 0x40646A20, + 0x00000003, 0x4062BA2F, 0x4063B420, 0x40646A20, + // Block 408, offset 0x6600 + 0x00000003, 0x4062BA21, 0x4063B420, 0x40647220, 0x00000003, 0x4062BA22, + 0x4063B420, 0x40647220, 0x00000003, 0x4062BA23, 0x4063B420, 0x40647220, + 0x00000003, 0x4062BA24, 0x4063B420, 0x40647220, 0x00000003, 0x4062BA25, + 0x4063B420, 0x40647220, 0x00000003, 0x4062BA26, 0x4063B420, 0x40647220, + 0x00000003, 0x4062BA21, 0x4063B420, 0x40648C20, 0x00000003, 0x4062BA22, + 0x4063B420, 0x40648C20, 0x00000003, 0x4062BA23, 0x4063B420, 0x40648C20, + 0x00000003, 0x4062BA24, 0x4063B420, 0x40648C20, 0x00000003, 0x4062BA25, + 0x4063B420, 0x40648C20, 0x00000003, 0x4062BA26, 0x4063B420, 0x40648C20, + 0x00000003, 0x4062BA27, 0x4063B420, 0x40648C20, 0x00000003, 0x4062BA28, + 0x4063B420, 0x40648C20, 0x00000003, 0x4062BA29, 0x4063B420, 0x40648C20, + 0x00000003, 0x4062BA2A, 0x4063B420, 0x40648C20, + // Block 409, offset 0x6640 + 0x00000003, 0x4062BA2B, 0x4063B420, 0x40648C20, 0x00000003, 0x4062BA2C, + 0x4063B420, 0x40648C20, 0x00000003, 0x4062BA2D, 0x4063B420, 0x40648C20, + 0x00000003, 0x4062BA2E, 0x4063B420, 0x40648C20, 0x00000003, 0x4062BA2F, + 0x4063B420, 0x40648C20, 0x00000003, 0x4062BA30, 0x4063B420, 0x40648C20, + 0x00000003, 0x4062BA31, 0x4063B420, 0x40648C20, 0x00000003, 0x4062BA32, + 0x4063B420, 0x40648C20, 0x00000003, 0x4062BA33, 0x4063B420, 0x40648C20, + 0x00000003, 0x4062BA34, 0x4063B420, 0x40648C20, 0x00000003, 0x4062BA35, + 0x4063B420, 0x40648C20, 0x00000003, 0x4062BA36, 0x4063B420, 0x40648C20, + 0x00000003, 0x4062BA37, 0x4063B420, 0x40648C20, 0x00000003, 0x4062BA38, + 0x4063B420, 0x40648C20, 0x00000003, 0x4062BA39, 0x4063B420, 0x40648C20, + 0x00000002, 0x4062BA21, 0x4063B820, 0x00000002, + // Block 410, offset 0x6680 + 0x4062BA22, 0x4063B820, 0x00000002, 0x4062BA23, 0x4063B820, 0x00000002, + 0x4062BA24, 0x4063B820, 0x00000002, 0x4062BA25, 0x4063B820, 0x00000002, + 0x4062BA26, 0x4063B820, 0x00000002, 0x4062BA27, 0x4063B820, 0x00000002, + 0x4062BA28, 0x4063B820, 0x00000002, 0x4062BA29, 0x4063B820, 0x00000002, + 0x4062BA2A, 0x4063B820, 0x00000002, 0x4062BA2B, 0x4063B820, 0x00000002, + 0x4062BA2C, 0x4063B820, 0x00000002, 0x4062BA2D, 0x4063B820, 0x00000002, + 0x4062BA2E, 0x4063B820, 0x00000002, 0x4062BA2F, 0x4063B820, 0x00000002, + 0x4062BA30, 0x4063B820, 0x00000002, 0x4062BA31, 0x4063B820, 0x00000002, + 0x4062BA32, 0x4063B820, 0x00000002, 0x4062BA33, 0x4063B820, 0x00000002, + 0x4062BA34, 0x4063B820, 0x00000002, 0x4062BA35, 0x4063B820, 0x00000002, + 0x4062BA36, 0x4063B820, 0x00000002, 0x4062BA37, + // Block 411, offset 0x66c0 + 0x4063B820, 0x00000003, 0x4062BA21, 0x4063B820, 0x40646420, 0x00000003, + 0x4062BA22, 0x4063B820, 0x40646420, 0x00000003, 0x4062BA23, 0x4063B820, + 0x40646420, 0x00000003, 0x4062BA24, 0x4063B820, 0x40646420, 0x00000003, + 0x4062BA25, 0x4063B820, 0x40646420, 0x00000003, 0x4062BA26, 0x4063B820, + 0x40646420, 0x00000003, 0x4062BA27, 0x4063B820, 0x40646420, 0x00000003, + 0x4062BA28, 0x4063B820, 0x40646420, 0x00000003, 0x4062BA29, 0x4063B820, + 0x40646420, 0x00000003, 0x4062BA2A, 0x4063B820, 0x40646420, 0x00000003, + 0x4062BA2B, 0x4063B820, 0x40646420, 0x00000003, 0x4062BA2C, 0x4063B820, + 0x40646420, 0x00000003, 0x4062BA2D, 0x4063B820, 0x40646420, 0x00000003, + 0x4062BA2E, 0x4063B820, 0x40646420, 0x00000003, 0x4062BA2F, 0x4063B820, + 0x40646420, 0x00000003, 0x4062BA30, 0x4063B820, + // Block 412, offset 0x6700 + 0x40646420, 0x00000003, 0x4062BA31, 0x4063B820, 0x40646420, 0x00000003, + 0x4062BA32, 0x4063B820, 0x40646420, 0x00000003, 0x4062BA33, 0x4063B820, + 0x40646420, 0x00000003, 0x4062BA34, 0x4063B820, 0x40646420, 0x00000003, + 0x4062BA35, 0x4063B820, 0x40646420, 0x00000003, 0x4062BA36, 0x4063B820, + 0x40646420, 0x00000003, 0x4062BA37, 0x4063B820, 0x40646420, 0x00000003, + 0x4062BA38, 0x4063B820, 0x40646420, 0x00000003, 0x4062BA39, 0x4063B820, + 0x40646420, 0x00000003, 0x4062BA3A, 0x4063B820, 0x40646420, 0x00000003, + 0x4062BA21, 0x4063B820, 0x40646A20, 0x00000003, 0x4062BA21, 0x4063B820, + 0x40647220, 0x00000003, 0x4062BA21, 0x4063B820, 0x40648C20, 0x00000003, + 0x4062BA22, 0x4063B820, 0x40648C20, 0x00000003, 0x4062BA23, 0x4063B820, + 0x40648C20, 0x00000003, 0x4062BA24, 0x4063B820, + // Block 413, offset 0x6740 + 0x40648C20, 0x00000003, 0x4062BA25, 0x4063B820, 0x40648C20, 0x00000003, + 0x4062BA26, 0x4063B820, 0x40648C20, 0x00000003, 0x4062BA27, 0x4063B820, + 0x40648C20, 0x00000003, 0x4062BA28, 0x4063B820, 0x40648C20, 0x00000003, + 0x4062BA29, 0x4063B820, 0x40648C20, 0x00000003, 0x4062BA2A, 0x4063B820, + 0x40648C20, 0x00000003, 0x4062BA2B, 0x4063B820, 0x40648C20, 0x00000003, + 0x4062BA2C, 0x4063B820, 0x40648C20, 0x00000003, 0x4062BA2D, 0x4063B820, + 0x40648C20, 0x00000003, 0x4062BA2E, 0x4063B820, 0x40648C20, 0x00000003, + 0x4062BA2F, 0x4063B820, 0x40648C20, 0x00000003, 0x4062BA30, 0x4063B820, + 0x40648C20, 0x00000003, 0x4062BA31, 0x4063B820, 0x40648C20, 0x00000003, + 0x4062BA32, 0x4063B820, 0x40648C20, 0x00000003, 0x4062BA33, 0x4063B820, + 0x40648C20, 0x00000003, 0x4062BA34, 0x4063B820, + // Block 414, offset 0x6780 + 0x40648C20, 0x00000003, 0x4062BA35, 0x4063B820, 0x40648C20, 0x00000003, + 0x4062BA36, 0x4063B820, 0x40648C20, 0x00000002, 0x4062BA21, 0x4063C220, + 0x00000002, 0x4062BA22, 0x4063C220, 0x00000002, 0x4062BA23, 0x4063C220, + 0x00000002, 0x4062BA24, 0x4063C220, 0x00000002, 0x4062BA25, 0x4063C220, + 0x00000002, 0x4062BA26, 0x4063C220, 0x00000002, 0x4062BA27, 0x4063C220, + 0x00000002, 0x4062BA28, 0x4063C220, 0x00000002, 0x4062BA29, 0x4063C220, + 0x00000002, 0x4062BA2A, 0x4063C220, 0x00000002, 0x4062BA2B, 0x4063C220, + 0x00000002, 0x4062BA2C, 0x4063C220, 0x00000002, 0x4062BA2D, 0x4063C220, + 0x00000002, 0x4062BA2E, 0x4063C220, 0x00000002, 0x4062BA2F, 0x4063C220, + 0x00000002, 0x4062BA30, 0x4063C220, 0x00000002, 0x4062BA31, 0x4063C220, + 0x00000002, 0x4062BA32, 0x4063C220, 0x00000002, + // Block 415, offset 0x67c0 + 0x4062BA33, 0x4063C220, 0x00000002, 0x4062BA34, 0x4063C220, 0x00000002, + 0x4062BA35, 0x4063C220, 0x00000002, 0x4062BA36, 0x4063C220, 0x00000002, + 0x4062BA37, 0x4063C220, 0x00000002, 0x4062BA38, 0x4063C220, 0x00000002, + 0x4062BA39, 0x4063C220, 0x00000002, 0x4062BA3A, 0x4063C220, 0x00000002, + 0x4062BA3B, 0x4063C220, 0x00000002, 0x4062BA3C, 0x4063C220, 0x00000002, + 0x4062BA3D, 0x4063C220, 0x00000002, 0x4062BA3E, 0x4063C220, 0x00000002, + 0x4062BA3F, 0x4063C220, 0x00000002, 0x4062BA40, 0x4063C220, 0x00000002, + 0x4062BA41, 0x4063C220, 0x00000002, 0x4062BA42, 0x4063C220, 0x00000002, + 0x4062BA43, 0x4063C220, 0x00000002, 0x4062BA44, 0x4063C220, 0x00000002, + 0x4062BA45, 0x4063C220, 0x00000002, 0x4062BA46, 0x4063C220, 0x00000002, + 0x4062BA47, 0x4063C220, 0x00000002, 0x4062BA48, + // Block 416, offset 0x6800 + 0x4063C220, 0x00000002, 0x4062BA49, 0x4063C220, 0x00000002, 0x4062BA4A, + 0x4063C220, 0x00000002, 0x4062BA4B, 0x4063C220, 0x00000002, 0x4062BA4C, + 0x4063C220, 0x00000002, 0x4062BA4D, 0x4063C220, 0x00000002, 0x4062BA4E, + 0x4063C220, 0x00000002, 0x4062BA4F, 0x4063C220, 0x00000002, 0x4062BA50, + 0x4063C220, 0x00000002, 0x4062BA51, 0x4063C220, 0x00000002, 0x4062BA52, + 0x4063C220, 0x00000002, 0x4062BA53, 0x4063C220, 0x00000002, 0x4062BA54, + 0x4063C220, 0x00000002, 0x4062BA55, 0x4063C220, 0x00000002, 0x4062BA56, + 0x4063C220, 0x00000002, 0x4062BA57, 0x4063C220, 0x00000002, 0x4062BA58, + 0x4063C220, 0x00000002, 0x4062BA59, 0x4063C220, 0x00000002, 0x4062BA5A, + 0x4063C220, 0x00000002, 0x4062BA5B, 0x4063C220, 0x00000002, 0x4062BA5C, + 0x4063C220, 0x00000002, 0x4062BA5D, 0x4063C220, + // Block 417, offset 0x6840 + 0x00000002, 0x4062BA5E, 0x4063C220, 0x00000002, 0x4062BA5F, 0x4063C220, + 0x00000002, 0x4062BA60, 0x4063C220, 0x00000002, 0x4062BA61, 0x4063C220, + 0x00000002, 0x4062BA62, 0x4063C220, 0x00000002, 0x4062BA63, 0x4063C220, + 0x00000002, 0x4062BA64, 0x4063C220, 0x00000002, 0x4062BA65, 0x4063C220, + 0x00000003, 0x4062BA21, 0x4063C220, 0x40646420, 0x00000003, 0x4062BA21, + 0x4063C220, 0x40646A20, 0x00000003, 0x4062BA22, 0x4063C220, 0x40646A20, + 0x00000003, 0x4062BA23, 0x4063C220, 0x40646A20, 0x00000003, 0x4062BA24, + 0x4063C220, 0x40646A20, 0x00000003, 0x4062BA25, 0x4063C220, 0x40646A20, + 0x00000003, 0x4062BA26, 0x4063C220, 0x40646A20, 0x00000003, 0x4062BA27, + 0x4063C220, 0x40646A20, 0x00000003, 0x4062BA28, 0x4063C220, 0x40646A20, + 0x00000003, 0x4062BA29, 0x4063C220, 0x40646A20, + // Block 418, offset 0x6880 + 0x00000003, 0x4062BA2A, 0x4063C220, 0x40646A20, 0x00000003, 0x4062BA2B, + 0x4063C220, 0x40646A20, 0x00000003, 0x4062BA2C, 0x4063C220, 0x40646A20, + 0x00000003, 0x4062BA2D, 0x4063C220, 0x40646A20, 0x00000003, 0x4062BA2E, + 0x4063C220, 0x40646A20, 0x00000003, 0x4062BA2F, 0x4063C220, 0x40646A20, + 0x00000003, 0x4062BA30, 0x4063C220, 0x40646A20, 0x00000003, 0x4062BA31, + 0x4063C220, 0x40646A20, 0x00000003, 0x4062BA32, 0x4063C220, 0x40646A20, + 0x00000003, 0x4062BA33, 0x4063C220, 0x40646A20, 0x00000003, 0x4062BA34, + 0x4063C220, 0x40646A20, 0x00000003, 0x4062BA35, 0x4063C220, 0x40646A20, + 0x00000003, 0x4062BA36, 0x4063C220, 0x40646A20, 0x00000003, 0x4062BA37, + 0x4063C220, 0x40646A20, 0x00000003, 0x4062BA38, 0x4063C220, 0x40646A20, + 0x00000003, 0x4062BA39, 0x4063C220, 0x40646A20, + // Block 419, offset 0x68c0 + 0x00000003, 0x4062BA3A, 0x4063C220, 0x40646A20, 0x00000003, 0x4062BA3B, + 0x4063C220, 0x40646A20, 0x00000003, 0x4062BA3C, 0x4063C220, 0x40646A20, + 0x00000003, 0x4062BA3D, 0x4063C220, 0x40646A20, 0x00000003, 0x4062BA3E, + 0x4063C220, 0x40646A20, 0x00000003, 0x4062BA3F, 0x4063C220, 0x40646A20, + 0x00000003, 0x4062BA40, 0x4063C220, 0x40646A20, 0x00000003, 0x4062BA41, + 0x4063C220, 0x40646A20, 0x00000003, 0x4062BA42, 0x4063C220, 0x40646A20, + 0x00000003, 0x4062BA43, 0x4063C220, 0x40646A20, 0x00000003, 0x4062BA44, + 0x4063C220, 0x40646A20, 0x00000003, 0x4062BA45, 0x4063C220, 0x40646A20, + 0x00000003, 0x4062BA46, 0x4063C220, 0x40646A20, 0x00000003, 0x4062BA21, + 0x4063C220, 0x40647220, 0x00000003, 0x4062BA22, 0x4063C220, 0x40647220, + 0x00000003, 0x4062BA23, 0x4063C220, 0x40647220, + // Block 420, offset 0x6900 + 0x00000003, 0x4062BA24, 0x4063C220, 0x40647220, 0x00000003, 0x4062BA25, + 0x4063C220, 0x40647220, 0x00000003, 0x4062BA26, 0x4063C220, 0x40647220, + 0x00000003, 0x4062BA27, 0x4063C220, 0x40647220, 0x00000003, 0x4062BA28, + 0x4063C220, 0x40647220, 0x00000003, 0x4062BA29, 0x4063C220, 0x40647220, + 0x00000003, 0x4062BA2A, 0x4063C220, 0x40647220, 0x00000003, 0x4062BA2B, + 0x4063C220, 0x40647220, 0x00000003, 0x4062BA2C, 0x4063C220, 0x40647220, + 0x00000003, 0x4062BA21, 0x4063C220, 0x40648C20, 0x00000003, 0x4062BA22, + 0x4063C220, 0x40648C20, 0x00000003, 0x4062BA23, 0x4063C220, 0x40648C20, + 0x00000003, 0x4062BA24, 0x4063C220, 0x40648C20, 0x00000003, 0x4062BA25, + 0x4063C220, 0x40648C20, 0x00000003, 0x4062BA26, 0x4063C220, 0x40648C20, + 0x00000003, 0x4062BA27, 0x4063C220, 0x40648C20, + // Block 421, offset 0x6940 + 0x00000003, 0x4062BA28, 0x4063C220, 0x40648C20, 0x00000003, 0x4062BA29, + 0x4063C220, 0x40648C20, 0x00000002, 0x4062BA21, 0x4063D020, 0x00000002, + 0x4062BA22, 0x4063D020, 0x00000002, 0x4062BA23, 0x4063D020, 0x00000002, + 0x4062BA24, 0x4063D020, 0x00000002, 0x4062BA25, 0x4063D020, 0x00000002, + 0x4062BA26, 0x4063D020, 0x00000002, 0x4062BA27, 0x4063D020, 0x00000002, + 0x4062BA28, 0x4063D020, 0x00000002, 0x4062BA29, 0x4063D020, 0x00000002, + 0x4062BA2A, 0x4063D020, 0x00000002, 0x4062BA2B, 0x4063D020, 0x00000002, + 0x4062BA2C, 0x4063D020, 0x00000002, 0x4062BA2D, 0x4063D020, 0x00000002, + 0x4062BA2E, 0x4063D020, 0x00000002, 0x4062BA2F, 0x4063D020, 0x00000002, + 0x4062BA30, 0x4063D020, 0x00000002, 0x4062BA31, 0x4063D020, 0x00000002, + 0x4062BA32, 0x4063D020, 0x00000002, 0x4062BA33, + // Block 422, offset 0x6980 + 0x4063D020, 0x00000002, 0x4062BA34, 0x4063D020, 0x00000002, 0x4062BA35, + 0x4063D020, 0x00000002, 0x4062BA36, 0x4063D020, 0x00000002, 0x4062BA37, + 0x4063D020, 0x00000002, 0x4062BA38, 0x4063D020, 0x00000002, 0x4062BA39, + 0x4063D020, 0x00000002, 0x4062BA3A, 0x4063D020, 0x00000002, 0x4062BA3B, + 0x4063D020, 0x00000002, 0x4062BA3C, 0x4063D020, 0x00000002, 0x4062BA3D, + 0x4063D020, 0x00000002, 0x4062BA3E, 0x4063D020, 0x00000002, 0x4062BA3F, + 0x4063D020, 0x00000002, 0x4062BA40, 0x4063D020, 0x00000002, 0x4062BA41, + 0x4063D020, 0x00000002, 0x4062BA42, 0x4063D020, 0x00000002, 0x4062BA43, + 0x4063D020, 0x00000002, 0x4062BA44, 0x4063D020, 0x00000002, 0x4062BA45, + 0x4063D020, 0x00000002, 0x4062BA46, 0x4063D020, 0x00000002, 0x4062BA47, + 0x4063D020, 0x00000002, 0x4062BA48, 0x4063D020, + // Block 423, offset 0x69c0 + 0x00000002, 0x4062BA49, 0x4063D020, 0x00000002, 0x4062BA4A, 0x4063D020, + 0x00000002, 0x4062BA4B, 0x4063D020, 0x00000002, 0x4062BA4C, 0x4063D020, + 0x00000002, 0x4062BA4D, 0x4063D020, 0x00000002, 0x4062BA4E, 0x4063D020, + 0x00000002, 0x4062BA4F, 0x4063D020, 0x00000002, 0x4062BA50, 0x4063D020, + 0x00000002, 0x4062BA51, 0x4063D020, 0x00000002, 0x4062BA52, 0x4063D020, + 0x00000002, 0x4062BA53, 0x4063D020, 0x00000002, 0x4062BA54, 0x4063D020, + 0x00000002, 0x4062BA55, 0x4063D020, 0x00000002, 0x4062BA56, 0x4063D020, + 0x00000002, 0x4062BA57, 0x4063D020, 0x00000002, 0x4062BA58, 0x4063D020, + 0x00000002, 0x4062BA59, 0x4063D020, 0x00000002, 0x4062BA5A, 0x4063D020, + 0x00000002, 0x4062BA5B, 0x4063D020, 0x00000002, 0x4062BA5C, 0x4063D020, + 0x00000002, 0x4062BA5D, 0x4063D020, 0x00000002, + // Block 424, offset 0x6a00 + 0x4062BA5E, 0x4063D020, 0x00000002, 0x4062BA5F, 0x4063D020, 0x00000002, + 0x4062BA60, 0x4063D020, 0x00000002, 0x4062BA61, 0x4063D020, 0x00000002, + 0x4062BA62, 0x4063D020, 0x00000002, 0x4062BA63, 0x4063D020, 0x00000002, + 0x4062BA64, 0x4063D020, 0x00000002, 0x4062BA65, 0x4063D020, 0x00000002, + 0x4062BA66, 0x4063D020, 0x00000002, 0x4062BA67, 0x4063D020, 0x00000002, + 0x4062BA68, 0x4063D020, 0x00000002, 0x4062BA69, 0x4063D020, 0x00000002, + 0x4062BA6A, 0x4063D020, 0x00000002, 0x4062BA6B, 0x4063D020, 0x00000002, + 0x4062BA6C, 0x4063D020, 0x00000002, 0x4062BA6D, 0x4063D020, 0x00000002, + 0x4062BA6E, 0x4063D020, 0x00000002, 0x4062BA6F, 0x4063D020, 0x00000002, + 0x4062BA70, 0x4063D020, 0x00000002, 0x4062BA71, 0x4063D020, 0x00000002, + 0x4062BA72, 0x4063D020, 0x00000002, 0x4062BA73, + // Block 425, offset 0x6a40 + 0x4063D020, 0x00000002, 0x4062BA74, 0x4063D020, 0x00000002, 0x4062BA75, + 0x4063D020, 0x00000003, 0x4062BA21, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062BA22, 0x4063D020, 0x40646A20, 0x00000003, 0x4062BA23, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062BA24, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062BA25, 0x4063D020, 0x40646A20, 0x00000003, 0x4062BA26, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062BA27, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062BA28, 0x4063D020, 0x40646A20, 0x00000003, 0x4062BA29, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062BA2A, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062BA2B, 0x4063D020, 0x40646A20, 0x00000003, 0x4062BA2C, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062BA2D, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062BA2E, 0x4063D020, 0x40646A20, 0x00000003, + // Block 426, offset 0x6a80 + 0x4062BA2F, 0x4063D020, 0x40646A20, 0x00000003, 0x4062BA30, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062BA31, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062BA32, 0x4063D020, 0x40646A20, 0x00000003, 0x4062BA33, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062BA34, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062BA35, 0x4063D020, 0x40646A20, 0x00000003, 0x4062BA36, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062BA37, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062BA38, 0x4063D020, 0x40646A20, 0x00000003, 0x4062BA39, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062BA3A, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062BA3B, 0x4063D020, 0x40646A20, 0x00000003, 0x4062BA21, 0x4063D020, + 0x40648C20, 0x00000003, 0x4062BA22, 0x4063D020, 0x40648C20, 0x00000003, + 0x4062BA23, 0x4063D020, 0x40648C20, 0x00000003, + // Block 427, offset 0x6ac0 + 0x4062BA24, 0x4063D020, 0x40648C20, 0x00000003, 0x4062BA25, 0x4063D020, + 0x40648C20, 0x00000003, 0x4062BA26, 0x4063D020, 0x40648C20, 0x00000003, + 0x4062BA27, 0x4063D020, 0x40648C20, 0x00000003, 0x4062BA28, 0x4063D020, + 0x40648C20, 0x00000002, 0x4062BE21, 0x4063A820, 0x00000002, 0x4062BE22, + 0x4063A820, 0x00000002, 0x4062BE23, 0x4063A820, 0x00000002, 0x4062BE24, + 0x4063A820, 0x00000002, 0x4062BE25, 0x4063A820, 0x00000002, 0x4062BE26, + 0x4063A820, 0x00000002, 0x4062BE27, 0x4063A820, 0x00000002, 0x4062BE28, + 0x4063A820, 0x00000002, 0x4062BE29, 0x4063A820, 0x00000002, 0x4062BE2A, + 0x4063A820, 0x00000002, 0x4062BE2B, 0x4063A820, 0x00000002, 0x4062BE2C, + 0x4063A820, 0x00000002, 0x4062BE2D, 0x4063A820, 0x00000002, 0x4062BE2E, + 0x4063A820, 0x00000002, 0x4062BE2F, 0x4063A820, + // Block 428, offset 0x6b00 + 0x00000002, 0x4062BE30, 0x4063A820, 0x00000002, 0x4062BE31, 0x4063A820, + 0x00000002, 0x4062BE32, 0x4063A820, 0x00000002, 0x4062BE33, 0x4063A820, + 0x00000002, 0x4062BE34, 0x4063A820, 0x00000002, 0x4062BE35, 0x4063A820, + 0x00000002, 0x4062BE36, 0x4063A820, 0x00000002, 0x4062BE37, 0x4063A820, + 0x00000002, 0x4062BE38, 0x4063A820, 0x00000002, 0x4062BE39, 0x4063A820, + 0x00000002, 0x4062BE3A, 0x4063A820, 0x00000002, 0x4062BE3B, 0x4063A820, + 0x00000002, 0x4062BE3C, 0x4063A820, 0x00000002, 0x4062BE3D, 0x4063A820, + 0x00000002, 0x4062BE3E, 0x4063A820, 0x00000002, 0x4062BE3F, 0x4063A820, + 0x00000002, 0x4062BE40, 0x4063A820, 0x00000002, 0x4062BE41, 0x4063A820, + 0x00000002, 0x4062BE42, 0x4063A820, 0x00000002, 0x4062BE43, 0x4063A820, + 0x00000002, 0x4062BE44, 0x4063A820, 0x00000002, + // Block 429, offset 0x6b40 + 0x4062BE45, 0x4063A820, 0x00000002, 0x4062BE46, 0x4063A820, 0x00000002, + 0x4062BE47, 0x4063A820, 0x00000002, 0x4062BE48, 0x4063A820, 0x00000002, + 0x4062BE49, 0x4063A820, 0x00000002, 0x4062BE4A, 0x4063A820, 0x00000002, + 0x4062BE4B, 0x4063A820, 0x00000002, 0x4062BE4C, 0x4063A820, 0x00000002, + 0x4062BE4D, 0x4063A820, 0x00000002, 0x4062BE4E, 0x4063A820, 0x00000002, + 0x4062BE4F, 0x4063A820, 0x00000002, 0x4062BE50, 0x4063A820, 0x00000002, + 0x4062BE51, 0x4063A820, 0x00000002, 0x4062BE52, 0x4063A820, 0x00000002, + 0x4062BE53, 0x4063A820, 0x00000002, 0x4062BE54, 0x4063A820, 0x00000002, + 0x4062BE55, 0x4063A820, 0x00000002, 0x4062BE56, 0x4063A820, 0x00000002, + 0x4062BE57, 0x4063A820, 0x00000002, 0x4062BE58, 0x4063A820, 0x00000002, + 0x4062BE59, 0x4063A820, 0x00000002, 0x4062BE5A, + // Block 430, offset 0x6b80 + 0x4063A820, 0x00000002, 0x4062BE5B, 0x4063A820, 0x00000002, 0x4062BE5C, + 0x4063A820, 0x00000002, 0x4062BE5D, 0x4063A820, 0x00000002, 0x4062BE5E, + 0x4063A820, 0x00000002, 0x4062BE5F, 0x4063A820, 0x00000002, 0x4062BE60, + 0x4063A820, 0x00000002, 0x4062BE61, 0x4063A820, 0x00000002, 0x4062BE62, + 0x4063A820, 0x00000002, 0x4062BE63, 0x4063A820, 0x00000002, 0x4062BE64, + 0x4063A820, 0x00000002, 0x4062BE65, 0x4063A820, 0x00000002, 0x4062BE66, + 0x4063A820, 0x00000002, 0x4062BE67, 0x4063A820, 0x00000002, 0x4062BE68, + 0x4063A820, 0x00000002, 0x4062BE69, 0x4063A820, 0x00000002, 0x4062BE6A, + 0x4063A820, 0x00000002, 0x4062BE6B, 0x4063A820, 0x00000002, 0x4062BE6C, + 0x4063A820, 0x00000002, 0x4062BE6D, 0x4063A820, 0x00000002, 0x4062BE6E, + 0x4063A820, 0x00000002, 0x4062BE6F, 0x4063A820, + // Block 431, offset 0x6bc0 + 0x00000003, 0x4062BE21, 0x4063A820, 0x40646420, 0x00000003, 0x4062BE22, + 0x4063A820, 0x40646420, 0x00000003, 0x4062BE23, 0x4063A820, 0x40646420, + 0x00000003, 0x4062BE24, 0x4063A820, 0x40646420, 0x00000003, 0x4062BE25, + 0x4063A820, 0x40646420, 0x00000003, 0x4062BE26, 0x4063A820, 0x40646420, + 0x00000003, 0x4062BE21, 0x4063A820, 0x40646A20, 0x00000003, 0x4062BE22, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062BE23, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062BE24, 0x4063A820, 0x40646A20, 0x00000003, 0x4062BE25, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062BE26, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062BE27, 0x4063A820, 0x40646A20, 0x00000003, 0x4062BE28, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062BE29, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062BE2A, 0x4063A820, 0x40646A20, + // Block 432, offset 0x6c00 + 0x00000003, 0x4062BE2B, 0x4063A820, 0x40646A20, 0x00000003, 0x4062BE2C, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062BE2D, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062BE2E, 0x4063A820, 0x40646A20, 0x00000003, 0x4062BE2F, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062BE30, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062BE31, 0x4063A820, 0x40646A20, 0x00000003, 0x4062BE32, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062BE33, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062BE34, 0x4063A820, 0x40646A20, 0x00000003, 0x4062BE35, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062BE36, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062BE37, 0x4063A820, 0x40646A20, 0x00000003, 0x4062BE38, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062BE21, 0x4063A820, 0x40647220, + 0x00000003, 0x4062BE22, 0x4063A820, 0x40647220, + // Block 433, offset 0x6c40 + 0x00000003, 0x4062BE23, 0x4063A820, 0x40647220, 0x00000003, 0x4062BE24, + 0x4063A820, 0x40647220, 0x00000003, 0x4062BE25, 0x4063A820, 0x40647220, + 0x00000003, 0x4062BE21, 0x4063A820, 0x40648220, 0x00000003, 0x4062BE22, + 0x4063A820, 0x40648220, 0x00000003, 0x4062BE23, 0x4063A820, 0x40648220, + 0x00000003, 0x4062BE24, 0x4063A820, 0x40648220, 0x00000003, 0x4062BE25, + 0x4063A820, 0x40648220, 0x00000003, 0x4062BE26, 0x4063A820, 0x40648220, + 0x00000003, 0x4062BE27, 0x4063A820, 0x40648220, 0x00000003, 0x4062BE28, + 0x4063A820, 0x40648220, 0x00000003, 0x4062BE29, 0x4063A820, 0x40648220, + 0x00000003, 0x4062BE2A, 0x4063A820, 0x40648220, 0x00000003, 0x4062BE21, + 0x4063A820, 0x40648420, 0x00000003, 0x4062BE22, 0x4063A820, 0x40648420, + 0x00000003, 0x4062BE23, 0x4063A820, 0x40648420, + // Block 434, offset 0x6c80 + 0x00000003, 0x4062BE24, 0x4063A820, 0x40648420, 0x00000003, 0x4062BE25, + 0x4063A820, 0x40648420, 0x00000003, 0x4062BE26, 0x4063A820, 0x40648420, + 0x00000003, 0x4062BE27, 0x4063A820, 0x40648420, 0x00000003, 0x4062BE28, + 0x4063A820, 0x40648420, 0x00000003, 0x4062BE29, 0x4063A820, 0x40648420, + 0x00000003, 0x4062BE2A, 0x4063A820, 0x40648420, 0x00000003, 0x4062BE2B, + 0x4063A820, 0x40648420, 0x00000003, 0x4062BE21, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062BE22, 0x4063A820, 0x40648C20, 0x00000003, 0x4062BE23, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062BE24, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062BE25, 0x4063A820, 0x40648C20, 0x00000003, 0x4062BE26, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062BE27, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062BE28, 0x4063A820, 0x40648C20, + // Block 435, offset 0x6cc0 + 0x00000003, 0x4062BE29, 0x4063A820, 0x40648C20, 0x00000003, 0x4062BE2A, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062BE2B, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062BE2C, 0x4063A820, 0x40648C20, 0x00000003, 0x4062BE2D, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062BE2E, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062BE2F, 0x4063A820, 0x40648C20, 0x00000003, 0x4062BE30, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062BE31, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062BE32, 0x4063A820, 0x40648C20, 0x00000003, 0x4062BE33, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062BE34, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062BE35, 0x4063A820, 0x40648C20, 0x00000003, 0x4062BE36, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062BE37, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062BE38, 0x4063A820, 0x40648C20, + // Block 436, offset 0x6d00 + 0x00000003, 0x4062BE39, 0x4063A820, 0x40648C20, 0x00000003, 0x4062BE3A, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062BE3B, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062BE3C, 0x4063A820, 0x40648C20, 0x00000003, 0x4062BE3D, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062BE3E, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062BE3F, 0x4063A820, 0x40648C20, 0x00000003, 0x4062BE40, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062BE41, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062BE42, 0x4063A820, 0x40648C20, 0x00000003, 0x4062BE43, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062BE44, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062BE45, 0x4063A820, 0x40648C20, 0x00000003, 0x4062BE46, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062BE47, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062BE48, 0x4063A820, 0x40648C20, + // Block 437, offset 0x6d40 + 0x00000002, 0x4062BE21, 0x4063AA20, 0x00000002, 0x4062BE22, 0x4063AA20, + 0x00000002, 0x4062BE23, 0x4063AA20, 0x00000002, 0x4062BE24, 0x4063AA20, + 0x00000003, 0x4062BE21, 0x4063AA20, 0x40646420, 0x00000003, 0x4062BE22, + 0x4063AA20, 0x40646420, 0x00000003, 0x4062BE23, 0x4063AA20, 0x40646420, + 0x00000003, 0x4062BE24, 0x4063AA20, 0x40646420, 0x00000003, 0x4062BE25, + 0x4063AA20, 0x40646420, 0x00000003, 0x4062BE26, 0x4063AA20, 0x40646420, + 0x00000003, 0x4062BE27, 0x4063AA20, 0x40646420, 0x00000003, 0x4062BE21, + 0x4063AA20, 0x40648C20, 0x00000003, 0x4062BE22, 0x4063AA20, 0x40648C20, + 0x00000003, 0x4062BE23, 0x4063AA20, 0x40648C20, 0x00000003, 0x4062BE24, + 0x4063AA20, 0x40648C20, 0x00000003, 0x4062BE25, 0x4063AA20, 0x40648C20, + 0x00000003, 0x4062BE26, 0x4063AA20, 0x40648C20, + // Block 438, offset 0x6d80 + 0x00000002, 0x4062BE21, 0x4063B020, 0x00000002, 0x4062BE22, 0x4063B020, + 0x00000002, 0x4062BE23, 0x4063B020, 0x00000002, 0x4062BE24, 0x4063B020, + 0x00000002, 0x4062BE25, 0x4063B020, 0x00000002, 0x4062BE26, 0x4063B020, + 0x00000002, 0x4062BE27, 0x4063B020, 0x00000002, 0x4062BE28, 0x4063B020, + 0x00000002, 0x4062BE29, 0x4063B020, 0x00000002, 0x4062BE2A, 0x4063B020, + 0x00000002, 0x4062BE2B, 0x4063B020, 0x00000002, 0x4062BE2C, 0x4063B020, + 0x00000002, 0x4062BE2D, 0x4063B020, 0x00000002, 0x4062BE2E, 0x4063B020, + 0x00000002, 0x4062BE2F, 0x4063B020, 0x00000002, 0x4062BE30, 0x4063B020, + 0x00000002, 0x4062BE31, 0x4063B020, 0x00000002, 0x4062BE32, 0x4063B020, + 0x00000002, 0x4062BE33, 0x4063B020, 0x00000002, 0x4062BE34, 0x4063B020, + 0x00000002, 0x4062BE35, 0x4063B020, 0x00000002, + // Block 439, offset 0x6dc0 + 0x4062BE36, 0x4063B020, 0x00000002, 0x4062BE37, 0x4063B020, 0x00000002, + 0x4062BE38, 0x4063B020, 0x00000002, 0x4062BE39, 0x4063B020, 0x00000002, + 0x4062BE3A, 0x4063B020, 0x00000002, 0x4062BE3B, 0x4063B020, 0x00000002, + 0x4062BE3C, 0x4063B020, 0x00000002, 0x4062BE3D, 0x4063B020, 0x00000002, + 0x4062BE3E, 0x4063B020, 0x00000002, 0x4062BE3F, 0x4063B020, 0x00000002, + 0x4062BE40, 0x4063B020, 0x00000002, 0x4062BE41, 0x4063B020, 0x00000002, + 0x4062BE42, 0x4063B020, 0x00000002, 0x4062BE43, 0x4063B020, 0x00000002, + 0x4062BE44, 0x4063B020, 0x00000002, 0x4062BE45, 0x4063B020, 0x00000002, + 0x4062BE46, 0x4063B020, 0x00000002, 0x4062BE47, 0x4063B020, 0x00000002, + 0x4062BE48, 0x4063B020, 0x00000003, 0x4062BE21, 0x4063B020, 0x40646420, + 0x00000003, 0x4062BE22, 0x4063B020, 0x40646420, + // Block 440, offset 0x6e00 + 0x00000003, 0x4062BE23, 0x4063B020, 0x40646420, 0x00000003, 0x4062BE24, + 0x4063B020, 0x40646420, 0x00000003, 0x4062BE25, 0x4063B020, 0x40646420, + 0x00000003, 0x4062BE26, 0x4063B020, 0x40646420, 0x00000003, 0x4062BE27, + 0x4063B020, 0x40646420, 0x00000003, 0x4062BE28, 0x4063B020, 0x40646420, + 0x00000003, 0x4062BE29, 0x4063B020, 0x40646420, 0x00000003, 0x4062BE2A, + 0x4063B020, 0x40646420, 0x00000003, 0x4062BE2B, 0x4063B020, 0x40646420, + 0x00000003, 0x4062BE2C, 0x4063B020, 0x40646420, 0x00000003, 0x4062BE2D, + 0x4063B020, 0x40646420, 0x00000003, 0x4062BE2E, 0x4063B020, 0x40646420, + 0x00000003, 0x4062BE2F, 0x4063B020, 0x40646420, 0x00000003, 0x4062BE30, + 0x4063B020, 0x40646420, 0x00000003, 0x4062BE31, 0x4063B020, 0x40646420, + 0x00000003, 0x4062BE32, 0x4063B020, 0x40646420, + // Block 441, offset 0x6e40 + 0x00000003, 0x4062BE33, 0x4063B020, 0x40646420, 0x00000003, 0x4062BE34, + 0x4063B020, 0x40646420, 0x00000003, 0x4062BE35, 0x4063B020, 0x40646420, + 0x00000003, 0x4062BE36, 0x4063B020, 0x40646420, 0x00000003, 0x4062BE21, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062BE22, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062BE23, 0x4063B020, 0x40646A20, 0x00000003, 0x4062BE24, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062BE25, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062BE26, 0x4063B020, 0x40646A20, 0x00000003, 0x4062BE27, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062BE28, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062BE29, 0x4063B020, 0x40646A20, 0x00000003, 0x4062BE2A, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062BE2B, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062BE2C, 0x4063B020, 0x40646A20, + // Block 442, offset 0x6e80 + 0x00000003, 0x4062BE2D, 0x4063B020, 0x40646A20, 0x00000003, 0x4062BE2E, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062BE2F, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062BE30, 0x4063B020, 0x40646A20, 0x00000003, 0x4062BE31, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062BE32, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062BE33, 0x4063B020, 0x40646A20, 0x00000003, 0x4062BE34, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062BE35, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062BE36, 0x4063B020, 0x40646A20, 0x00000003, 0x4062BE37, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062BE38, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062BE39, 0x4063B020, 0x40646A20, 0x00000003, 0x4062BE3A, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062BE3B, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062BE3C, 0x4063B020, 0x40646A20, + // Block 443, offset 0x6ec0 + 0x00000003, 0x4062BE3D, 0x4063B020, 0x40646A20, 0x00000003, 0x4062BE3E, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062BE3F, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062BE40, 0x4063B020, 0x40646A20, 0x00000003, 0x4062BE41, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062BE42, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062BE43, 0x4063B020, 0x40646A20, 0x00000003, 0x4062BE44, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062BE45, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062BE46, 0x4063B020, 0x40646A20, 0x00000003, 0x4062BE47, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062BE48, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062BE49, 0x4063B020, 0x40646A20, 0x00000003, 0x4062BE4A, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062BE4B, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062BE4C, 0x4063B020, 0x40646A20, + // Block 444, offset 0x6f00 + 0x00000003, 0x4062BE4D, 0x4063B020, 0x40646A20, 0x00000003, 0x4062BE4E, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062BE4F, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062BE50, 0x4063B020, 0x40646A20, 0x00000003, 0x4062BE21, + 0x4063B020, 0x40647220, 0x00000003, 0x4062BE22, 0x4063B020, 0x40647220, + 0x00000003, 0x4062BE23, 0x4063B020, 0x40647220, 0x00000003, 0x4062BE24, + 0x4063B020, 0x40647220, 0x00000003, 0x4062BE25, 0x4063B020, 0x40647220, + 0x00000003, 0x4062BE26, 0x4063B020, 0x40647220, 0x00000003, 0x4062BE27, + 0x4063B020, 0x40647220, 0x00000003, 0x4062BE28, 0x4063B020, 0x40647220, + 0x00000003, 0x4062BE29, 0x4063B020, 0x40647220, 0x00000003, 0x4062BE2A, + 0x4063B020, 0x40647220, 0x00000003, 0x4062BE2B, 0x4063B020, 0x40647220, + 0x00000003, 0x4062BE2C, 0x4063B020, 0x40647220, + // Block 445, offset 0x6f40 + 0x00000003, 0x4062BE2D, 0x4063B020, 0x40647220, 0x00000003, 0x4062BE2E, + 0x4063B020, 0x40647220, 0x00000003, 0x4062BE2F, 0x4063B020, 0x40647220, + 0x00000003, 0x4062BE30, 0x4063B020, 0x40647220, 0x00000003, 0x4062BE31, + 0x4063B020, 0x40647220, 0x00000003, 0x4062BE32, 0x4063B020, 0x40647220, + 0x00000003, 0x4062BE33, 0x4063B020, 0x40647220, 0x00000003, 0x4062BE34, + 0x4063B020, 0x40647220, 0x00000003, 0x4062BE35, 0x4063B020, 0x40647220, + 0x00000003, 0x4062BE21, 0x4063B020, 0x40648220, 0x00000003, 0x4062BE22, + 0x4063B020, 0x40648220, 0x00000003, 0x4062BE23, 0x4063B020, 0x40648220, + 0x00000003, 0x4062BE24, 0x4063B020, 0x40648220, 0x00000003, 0x4062BE25, + 0x4063B020, 0x40648220, 0x00000003, 0x4062BE26, 0x4063B020, 0x40648220, + 0x00000003, 0x4062BE27, 0x4063B020, 0x40648220, + // Block 446, offset 0x6f80 + 0x00000003, 0x4062BE28, 0x4063B020, 0x40648220, 0x00000003, 0x4062BE29, + 0x4063B020, 0x40648220, 0x00000003, 0x4062BE2A, 0x4063B020, 0x40648220, + 0x00000003, 0x4062BE2B, 0x4063B020, 0x40648220, 0x00000003, 0x4062BE2C, + 0x4063B020, 0x40648220, 0x00000003, 0x4062BE2D, 0x4063B020, 0x40648220, + 0x00000003, 0x4062BE2E, 0x4063B020, 0x40648220, 0x00000003, 0x4062BE2F, + 0x4063B020, 0x40648220, 0x00000003, 0x4062BE21, 0x4063B020, 0x40648420, + 0x00000003, 0x4062BE22, 0x4063B020, 0x40648420, 0x00000003, 0x4062BE23, + 0x4063B020, 0x40648420, 0x00000003, 0x4062BE24, 0x4063B020, 0x40648420, + 0x00000003, 0x4062BE25, 0x4063B020, 0x40648420, 0x00000003, 0x4062BE26, + 0x4063B020, 0x40648420, 0x00000003, 0x4062BE27, 0x4063B020, 0x40648420, + 0x00000003, 0x4062BE28, 0x4063B020, 0x40648420, + // Block 447, offset 0x6fc0 + 0x00000003, 0x4062BE29, 0x4063B020, 0x40648420, 0x00000003, 0x4062BE2A, + 0x4063B020, 0x40648420, 0x00000003, 0x4062BE21, 0x4063B020, 0x40648C20, + 0x00000003, 0x4062BE22, 0x4063B020, 0x40648C20, 0x00000003, 0x4062BE23, + 0x4063B020, 0x40648C20, 0x00000003, 0x4062BE24, 0x4063B020, 0x40648C20, + 0x00000003, 0x4062BE25, 0x4063B020, 0x40648C20, 0x00000003, 0x4062BE26, + 0x4063B020, 0x40648C20, 0x00000003, 0x4062BE27, 0x4063B020, 0x40648C20, + 0x00000003, 0x4062BE28, 0x4063B020, 0x40648C20, 0x00000003, 0x4062BE29, + 0x4063B020, 0x40648C20, 0x00000003, 0x4062BE2A, 0x4063B020, 0x40648C20, + 0x00000003, 0x4062BE2B, 0x4063B020, 0x40648C20, 0x00000003, 0x4062BE2C, + 0x4063B020, 0x40648C20, 0x00000003, 0x4062BE2D, 0x4063B020, 0x40648C20, + 0x00000003, 0x4062BE2E, 0x4063B020, 0x40648C20, + // Block 448, offset 0x7000 + 0x00000003, 0x4062BE2F, 0x4063B020, 0x40648C20, 0x00000003, 0x4062BE30, + 0x4063B020, 0x40648C20, 0x00000003, 0x4062BE31, 0x4063B020, 0x40648C20, + 0x00000003, 0x4062BE32, 0x4063B020, 0x40648C20, 0x00000003, 0x4062BE33, + 0x4063B020, 0x40648C20, 0x00000003, 0x4062BE34, 0x4063B020, 0x40648C20, + 0x00000002, 0x4062BE21, 0x4063B220, 0x00000002, 0x4062BE22, 0x4063B220, + 0x00000002, 0x4062BE23, 0x4063B220, 0x00000002, 0x4062BE24, 0x4063B220, + 0x00000002, 0x4062BE25, 0x4063B220, 0x00000002, 0x4062BE26, 0x4063B220, + 0x00000002, 0x4062BE27, 0x4063B220, 0x00000002, 0x4062BE28, 0x4063B220, + 0x00000002, 0x4062BE29, 0x4063B220, 0x00000002, 0x4062BE2A, 0x4063B220, + 0x00000002, 0x4062BE2B, 0x4063B220, 0x00000002, 0x4062BE2C, 0x4063B220, + 0x00000002, 0x4062BE21, 0x4063B820, 0x00000002, + // Block 449, offset 0x7040 + 0x4062BE22, 0x4063B820, 0x00000002, 0x4062BE23, 0x4063B820, 0x00000002, + 0x4062BE24, 0x4063B820, 0x00000002, 0x4062BE25, 0x4063B820, 0x00000002, + 0x4062BE26, 0x4063B820, 0x00000002, 0x4062BE27, 0x4063B820, 0x00000002, + 0x4062BE28, 0x4063B820, 0x00000002, 0x4062BE29, 0x4063B820, 0x00000002, + 0x4062BE2A, 0x4063B820, 0x00000002, 0x4062BE2B, 0x4063B820, 0x00000002, + 0x4062BE2C, 0x4063B820, 0x00000002, 0x4062BE2D, 0x4063B820, 0x00000002, + 0x4062BE2E, 0x4063B820, 0x00000002, 0x4062BE2F, 0x4063B820, 0x00000002, + 0x4062BE30, 0x4063B820, 0x00000002, 0x4062BE31, 0x4063B820, 0x00000002, + 0x4062BE32, 0x4063B820, 0x00000002, 0x4062BE33, 0x4063B820, 0x00000002, + 0x4062BE34, 0x4063B820, 0x00000002, 0x4062BE35, 0x4063B820, 0x00000002, + 0x4062BE36, 0x4063B820, 0x00000002, 0x4062BE37, + // Block 450, offset 0x7080 + 0x4063B820, 0x00000002, 0x4062BE38, 0x4063B820, 0x00000002, 0x4062BE39, + 0x4063B820, 0x00000002, 0x4062BE3A, 0x4063B820, 0x00000002, 0x4062BE3B, + 0x4063B820, 0x00000002, 0x4062BE3C, 0x4063B820, 0x00000002, 0x4062BE3D, + 0x4063B820, 0x00000002, 0x4062BE3E, 0x4063B820, 0x00000002, 0x4062BE3F, + 0x4063B820, 0x00000002, 0x4062BE40, 0x4063B820, 0x00000002, 0x4062BE41, + 0x4063B820, 0x00000002, 0x4062BE42, 0x4063B820, 0x00000002, 0x4062BE43, + 0x4063B820, 0x00000002, 0x4062BE44, 0x4063B820, 0x00000002, 0x4062BE45, + 0x4063B820, 0x00000002, 0x4062BE46, 0x4063B820, 0x00000002, 0x4062BE47, + 0x4063B820, 0x00000002, 0x4062BE48, 0x4063B820, 0x00000002, 0x4062BE49, + 0x4063B820, 0x00000002, 0x4062BE4A, 0x4063B820, 0x00000002, 0x4062BE4B, + 0x4063B820, 0x00000002, 0x4062BE4C, 0x4063B820, + // Block 451, offset 0x70c0 + 0x00000002, 0x4062BE4D, 0x4063B820, 0x00000002, 0x4062BE4E, 0x4063B820, + 0x00000002, 0x4062BE4F, 0x4063B820, 0x00000002, 0x4062BE50, 0x4063B820, + 0x00000002, 0x4062BE51, 0x4063B820, 0x00000002, 0x4062BE52, 0x4063B820, + 0x00000002, 0x4062BE53, 0x4063B820, 0x00000002, 0x4062BE54, 0x4063B820, + 0x00000002, 0x4062BE55, 0x4063B820, 0x00000002, 0x4062BE56, 0x4063B820, + 0x00000002, 0x4062BE57, 0x4063B820, 0x00000002, 0x4062BE58, 0x4063B820, + 0x00000002, 0x4062BE59, 0x4063B820, 0x00000002, 0x4062BE5A, 0x4063B820, + 0x00000002, 0x4062BE5B, 0x4063B820, 0x00000002, 0x4062BE5C, 0x4063B820, + 0x00000003, 0x4062BE21, 0x4063B820, 0x40646420, 0x00000003, 0x4062BE22, + 0x4063B820, 0x40646420, 0x00000003, 0x4062BE23, 0x4063B820, 0x40646420, + 0x00000003, 0x4062BE24, 0x4063B820, 0x40646420, + // Block 452, offset 0x7100 + 0x00000003, 0x4062BE25, 0x4063B820, 0x40646420, 0x00000003, 0x4062BE26, + 0x4063B820, 0x40646420, 0x00000003, 0x4062BE27, 0x4063B820, 0x40646420, + 0x00000003, 0x4062BE28, 0x4063B820, 0x40646420, 0x00000003, 0x4062BE29, + 0x4063B820, 0x40646420, 0x00000003, 0x4062BE2A, 0x4063B820, 0x40646420, + 0x00000003, 0x4062BE2B, 0x4063B820, 0x40646420, 0x00000003, 0x4062BE21, + 0x4063B820, 0x40646A20, 0x00000003, 0x4062BE22, 0x4063B820, 0x40646A20, + 0x00000003, 0x4062BE23, 0x4063B820, 0x40646A20, 0x00000003, 0x4062BE24, + 0x4063B820, 0x40646A20, 0x00000003, 0x4062BE25, 0x4063B820, 0x40646A20, + 0x00000003, 0x4062BE26, 0x4063B820, 0x40646A20, 0x00000003, 0x4062BE27, + 0x4063B820, 0x40646A20, 0x00000003, 0x4062BE28, 0x4063B820, 0x40646A20, + 0x00000003, 0x4062BE21, 0x4063B820, 0x40647220, + // Block 453, offset 0x7140 + 0x00000003, 0x4062BE22, 0x4063B820, 0x40647220, 0x00000003, 0x4062BE23, + 0x4063B820, 0x40647220, 0x00000003, 0x4062BE21, 0x4063B820, 0x40648C20, + 0x00000003, 0x4062BE22, 0x4063B820, 0x40648C20, 0x00000003, 0x4062BE23, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062BE24, 0x4063B820, 0x40648C20, + 0x00000003, 0x4062BE25, 0x4063B820, 0x40648C20, 0x00000003, 0x4062BE26, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062BE27, 0x4063B820, 0x40648C20, + 0x00000003, 0x4062BE28, 0x4063B820, 0x40648C20, 0x00000003, 0x4062BE29, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062BE2A, 0x4063B820, 0x40648C20, + 0x00000003, 0x4062BE2B, 0x4063B820, 0x40648C20, 0x00000002, 0x4062BE21, + 0x4063BC20, 0x00000002, 0x4062BE22, 0x4063BC20, 0x00000002, 0x4062BE23, + 0x4063BC20, 0x00000002, 0x4062BE24, 0x4063BC20, + // Block 454, offset 0x7180 + 0x00000002, 0x4062BE25, 0x4063BC20, 0x00000002, 0x4062BE26, 0x4063BC20, + 0x00000002, 0x4062BE27, 0x4063BC20, 0x00000002, 0x4062BE21, 0x4063BE20, + 0x00000002, 0x4062BE22, 0x4063BE20, 0x00000002, 0x4062BE21, 0x4063C220, + 0x00000002, 0x4062BE22, 0x4063C220, 0x00000002, 0x4062BE23, 0x4063C220, + 0x00000002, 0x4062BE24, 0x4063C220, 0x00000002, 0x4062BE25, 0x4063C220, + 0x00000002, 0x4062BE26, 0x4063C220, 0x00000002, 0x4062BE27, 0x4063C220, + 0x00000002, 0x4062BE28, 0x4063C220, 0x00000002, 0x4062BE29, 0x4063C220, + 0x00000002, 0x4062BE2A, 0x4063C220, 0x00000002, 0x4062BE2B, 0x4063C220, + 0x00000002, 0x4062BE2C, 0x4063C220, 0x00000002, 0x4062BE2D, 0x4063C220, + 0x00000002, 0x4062BE2E, 0x4063C220, 0x00000002, 0x4062BE2F, 0x4063C220, + 0x00000002, 0x4062BE30, 0x4063C220, 0x00000002, + // Block 455, offset 0x71c0 + 0x4062BE31, 0x4063C220, 0x00000002, 0x4062BE32, 0x4063C220, 0x00000002, + 0x4062BE33, 0x4063C220, 0x00000002, 0x4062BE34, 0x4063C220, 0x00000002, + 0x4062BE35, 0x4063C220, 0x00000002, 0x4062BE36, 0x4063C220, 0x00000002, + 0x4062BE37, 0x4063C220, 0x00000002, 0x4062BE38, 0x4063C220, 0x00000002, + 0x4062BE39, 0x4063C220, 0x00000002, 0x4062BE3A, 0x4063C220, 0x00000002, + 0x4062BE3B, 0x4063C220, 0x00000002, 0x4062BE3C, 0x4063C220, 0x00000002, + 0x4062BE3D, 0x4063C220, 0x00000002, 0x4062BE3E, 0x4063C220, 0x00000002, + 0x4062BE3F, 0x4063C220, 0x00000002, 0x4062BE40, 0x4063C220, 0x00000002, + 0x4062BE41, 0x4063C220, 0x00000002, 0x4062BE42, 0x4063C220, 0x00000002, + 0x4062BE43, 0x4063C220, 0x00000002, 0x4062BE44, 0x4063C220, 0x00000002, + 0x4062BE45, 0x4063C220, 0x00000002, 0x4062BE46, + // Block 456, offset 0x7200 + 0x4063C220, 0x00000002, 0x4062BE47, 0x4063C220, 0x00000002, 0x4062BE48, + 0x4063C220, 0x00000002, 0x4062BE49, 0x4063C220, 0x00000002, 0x4062BE4A, + 0x4063C220, 0x00000002, 0x4062BE4B, 0x4063C220, 0x00000002, 0x4062BE4C, + 0x4063C220, 0x00000002, 0x4062BE4D, 0x4063C220, 0x00000002, 0x4062BE4E, + 0x4063C220, 0x00000002, 0x4062BE4F, 0x4063C220, 0x00000002, 0x4062BE50, + 0x4063C220, 0x00000002, 0x4062BE51, 0x4063C220, 0x00000002, 0x4062BE52, + 0x4063C220, 0x00000002, 0x4062BE53, 0x4063C220, 0x00000002, 0x4062BE54, + 0x4063C220, 0x00000002, 0x4062BE55, 0x4063C220, 0x00000002, 0x4062BE56, + 0x4063C220, 0x00000002, 0x4062BE57, 0x4063C220, 0x00000002, 0x4062BE58, + 0x4063C220, 0x00000002, 0x4062BE59, 0x4063C220, 0x00000002, 0x4062BE5A, + 0x4063C220, 0x00000002, 0x4062BE5B, 0x4063C220, + // Block 457, offset 0x7240 + 0x00000002, 0x4062BE5C, 0x4063C220, 0x00000002, 0x4062BE5D, 0x4063C220, + 0x00000002, 0x4062BE5E, 0x4063C220, 0x00000002, 0x4062BE5F, 0x4063C220, + 0x00000002, 0x4062BE60, 0x4063C220, 0x00000002, 0x4062BE61, 0x4063C220, + 0x00000002, 0x4062BE62, 0x4063C220, 0x00000002, 0x4062BE63, 0x4063C220, + 0x00000002, 0x4062BE64, 0x4063C220, 0x00000002, 0x4062BE65, 0x4063C220, + 0x00000002, 0x4062BE66, 0x4063C220, 0x00000002, 0x4062BE67, 0x4063C220, + 0x00000002, 0x4062BE68, 0x4063C220, 0x00000002, 0x4062BE69, 0x4063C220, + 0x00000002, 0x4062BE6A, 0x4063C220, 0x00000002, 0x4062BE6B, 0x4063C220, + 0x00000002, 0x4062BE6C, 0x4063C220, 0x00000002, 0x4062BE6D, 0x4063C220, + 0x00000002, 0x4062BE6E, 0x4063C220, 0x00000002, 0x4062BE6F, 0x4063C220, + 0x00000002, 0x4062BE70, 0x4063C220, 0x00000002, + // Block 458, offset 0x7280 + 0x4062BE71, 0x4063C220, 0x00000002, 0x4062BE72, 0x4063C220, 0x00000003, + 0x4062BE21, 0x4063C220, 0x40646420, 0x00000003, 0x4062BE22, 0x4063C220, + 0x40646420, 0x00000003, 0x4062BE23, 0x4063C220, 0x40646420, 0x00000003, + 0x4062BE24, 0x4063C220, 0x40646420, 0x00000003, 0x4062BE25, 0x4063C220, + 0x40646420, 0x00000003, 0x4062BE26, 0x4063C220, 0x40646420, 0x00000003, + 0x4062BE27, 0x4063C220, 0x40646420, 0x00000003, 0x4062BE28, 0x4063C220, + 0x40646420, 0x00000003, 0x4062BE29, 0x4063C220, 0x40646420, 0x00000003, + 0x4062BE2A, 0x4063C220, 0x40646420, 0x00000003, 0x4062BE2B, 0x4063C220, + 0x40646420, 0x00000003, 0x4062BE2C, 0x4063C220, 0x40646420, 0x00000003, + 0x4062BE2D, 0x4063C220, 0x40646420, 0x00000003, 0x4062BE2E, 0x4063C220, + 0x40646420, 0x00000003, 0x4062BE2F, 0x4063C220, + // Block 459, offset 0x72c0 + 0x40646420, 0x00000003, 0x4062BE30, 0x4063C220, 0x40646420, 0x00000003, + 0x4062BE31, 0x4063C220, 0x40646420, 0x00000003, 0x4062BE32, 0x4063C220, + 0x40646420, 0x00000003, 0x4062BE33, 0x4063C220, 0x40646420, 0x00000003, + 0x4062BE21, 0x4063C220, 0x40646A20, 0x00000003, 0x4062BE22, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062BE23, 0x4063C220, 0x40646A20, 0x00000003, + 0x4062BE24, 0x4063C220, 0x40646A20, 0x00000003, 0x4062BE25, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062BE26, 0x4063C220, 0x40646A20, 0x00000003, + 0x4062BE27, 0x4063C220, 0x40646A20, 0x00000003, 0x4062BE28, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062BE29, 0x4063C220, 0x40646A20, 0x00000003, + 0x4062BE2A, 0x4063C220, 0x40646A20, 0x00000003, 0x4062BE2B, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062BE2C, 0x4063C220, + // Block 460, offset 0x7300 + 0x40646A20, 0x00000003, 0x4062BE2D, 0x4063C220, 0x40646A20, 0x00000003, + 0x4062BE2E, 0x4063C220, 0x40646A20, 0x00000003, 0x4062BE2F, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062BE30, 0x4063C220, 0x40646A20, 0x00000003, + 0x4062BE31, 0x4063C220, 0x40646A20, 0x00000003, 0x4062BE32, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062BE33, 0x4063C220, 0x40646A20, 0x00000003, + 0x4062BE34, 0x4063C220, 0x40646A20, 0x00000003, 0x4062BE35, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062BE36, 0x4063C220, 0x40646A20, 0x00000003, + 0x4062BE37, 0x4063C220, 0x40646A20, 0x00000003, 0x4062BE38, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062BE39, 0x4063C220, 0x40646A20, 0x00000003, + 0x4062BE3A, 0x4063C220, 0x40646A20, 0x00000003, 0x4062BE3B, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062BE3C, 0x4063C220, + // Block 461, offset 0x7340 + 0x40646A20, 0x00000003, 0x4062BE3D, 0x4063C220, 0x40646A20, 0x00000003, + 0x4062BE3E, 0x4063C220, 0x40646A20, 0x00000003, 0x4062BE3F, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062BE40, 0x4063C220, 0x40646A20, 0x00000003, + 0x4062BE41, 0x4063C220, 0x40646A20, 0x00000003, 0x4062BE42, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062BE43, 0x4063C220, 0x40646A20, 0x00000003, + 0x4062BE44, 0x4063C220, 0x40646A20, 0x00000003, 0x4062BE21, 0x4063C220, + 0x40647220, 0x00000003, 0x4062BE22, 0x4063C220, 0x40647220, 0x00000003, + 0x4062BE23, 0x4063C220, 0x40647220, 0x00000003, 0x4062BE24, 0x4063C220, + 0x40647220, 0x00000003, 0x4062BE25, 0x4063C220, 0x40647220, 0x00000003, + 0x4062BE21, 0x4063C220, 0x40648C20, 0x00000003, 0x4062BE22, 0x4063C220, + 0x40648C20, 0x00000003, 0x4062BE23, 0x4063C220, + // Block 462, offset 0x7380 + 0x40648C20, 0x00000003, 0x4062BE24, 0x4063C220, 0x40648C20, 0x00000002, + 0x4062BE21, 0x4063C820, 0x00000002, 0x4062BE22, 0x4063C820, 0x00000002, + 0x4062BE23, 0x4063C820, 0x00000003, 0x4062BE21, 0x4063CC20, 0x40647220, + 0x00000003, 0x4062BE22, 0x4063CC20, 0x40647220, 0x00000003, 0x4062BE23, + 0x4063CC20, 0x40647220, 0x00000003, 0x4062BE24, 0x4063CC20, 0x40647220, + 0x00000003, 0x4062BE21, 0x4063CC20, 0x40648420, 0x00000003, 0x4062BE22, + 0x4063CC20, 0x40648420, 0x00000003, 0x4062BE23, 0x4063CC20, 0x40648420, + 0x00000003, 0x4062BE24, 0x4063CC20, 0x40648420, 0x00000003, 0x4062BE25, + 0x4063CC20, 0x40648420, 0x00000003, 0x4062BE26, 0x4063CC20, 0x40648420, + 0x00000003, 0x4062BE27, 0x4063CC20, 0x40648420, 0x00000003, 0x4062BE28, + 0x4063CC20, 0x40648420, 0x00000003, 0x4062BE21, + // Block 463, offset 0x73c0 + 0x4063CC20, 0x40648C20, 0x00000003, 0x4062BE22, 0x4063CC20, 0x40648C20, + 0x00000003, 0x4062BE23, 0x4063CC20, 0x40648C20, 0x00000003, 0x4062BE24, + 0x4063CC20, 0x40648C20, 0x00000003, 0x4062BE25, 0x4063CC20, 0x40648C20, + 0x00000003, 0x4062BE26, 0x4063CC20, 0x40648C20, 0x00000003, 0x4062BE27, + 0x4063CC20, 0x40648C20, 0x00000003, 0x4062BE28, 0x4063CC20, 0x40648C20, + 0x00000003, 0x4062BE29, 0x4063CC20, 0x40648C20, 0x00000003, 0x4062BE2A, + 0x4063CC20, 0x40648C20, 0x00000003, 0x4062BE2B, 0x4063CC20, 0x40648C20, + 0x00000003, 0x4062BE2C, 0x4063CC20, 0x40648C20, 0x00000002, 0x4062BE21, + 0x4063D020, 0x00000002, 0x4062BE22, 0x4063D020, 0x00000002, 0x4062BE23, + 0x4063D020, 0x00000002, 0x4062BE24, 0x4063D020, 0x00000002, 0x4062BE25, + 0x4063D020, 0x00000002, 0x4062BE26, 0x4063D020, + // Block 464, offset 0x7400 + 0x00000002, 0x4062BE27, 0x4063D020, 0x00000002, 0x4062BE28, 0x4063D020, + 0x00000002, 0x4062BE29, 0x4063D020, 0x00000002, 0x4062BE2A, 0x4063D020, + 0x00000002, 0x4062BE2B, 0x4063D020, 0x00000002, 0x4062BE2C, 0x4063D020, + 0x00000002, 0x4062BE2D, 0x4063D020, 0x00000002, 0x4062BE2E, 0x4063D020, + 0x00000002, 0x4062BE2F, 0x4063D020, 0x00000002, 0x4062BE30, 0x4063D020, + 0x00000002, 0x4062BE31, 0x4063D020, 0x00000002, 0x4062BE32, 0x4063D020, + 0x00000002, 0x4062BE33, 0x4063D020, 0x00000002, 0x4062BE34, 0x4063D020, + 0x00000002, 0x4062BE35, 0x4063D020, 0x00000002, 0x4062BE36, 0x4063D020, + 0x00000002, 0x4062BE37, 0x4063D020, 0x00000002, 0x4062BE38, 0x4063D020, + 0x00000002, 0x4062BE39, 0x4063D020, 0x00000002, 0x4062BE3A, 0x4063D020, + 0x00000002, 0x4062BE3B, 0x4063D020, 0x00000002, + // Block 465, offset 0x7440 + 0x4062BE3C, 0x4063D020, 0x00000002, 0x4062BE3D, 0x4063D020, 0x00000002, + 0x4062BE3E, 0x4063D020, 0x00000002, 0x4062BE3F, 0x4063D020, 0x00000002, + 0x4062BE40, 0x4063D020, 0x00000002, 0x4062BE41, 0x4063D020, 0x00000002, + 0x4062BE42, 0x4063D020, 0x00000002, 0x4062BE43, 0x4063D020, 0x00000002, + 0x4062BE44, 0x4063D020, 0x00000002, 0x4062BE45, 0x4063D020, 0x00000002, + 0x4062BE46, 0x4063D020, 0x00000002, 0x4062BE47, 0x4063D020, 0x00000002, + 0x4062BE48, 0x4063D020, 0x00000002, 0x4062BE49, 0x4063D020, 0x00000002, + 0x4062BE4A, 0x4063D020, 0x00000002, 0x4062BE4B, 0x4063D020, 0x00000002, + 0x4062BE4C, 0x4063D020, 0x00000002, 0x4062BE4D, 0x4063D020, 0x00000003, + 0x4062BE21, 0x4063D020, 0x40646420, 0x00000003, 0x4062BE22, 0x4063D020, + 0x40646420, 0x00000003, 0x4062BE23, 0x4063D020, + // Block 466, offset 0x7480 + 0x40646420, 0x00000003, 0x4062BE24, 0x4063D020, 0x40646420, 0x00000003, + 0x4062BE25, 0x4063D020, 0x40646420, 0x00000003, 0x4062BE26, 0x4063D020, + 0x40646420, 0x00000003, 0x4062BE27, 0x4063D020, 0x40646420, 0x00000003, + 0x4062BE28, 0x4063D020, 0x40646420, 0x00000003, 0x4062BE29, 0x4063D020, + 0x40646420, 0x00000003, 0x4062BE2A, 0x4063D020, 0x40646420, 0x00000003, + 0x4062BE2B, 0x4063D020, 0x40646420, 0x00000003, 0x4062BE2C, 0x4063D020, + 0x40646420, 0x00000003, 0x4062BE2D, 0x4063D020, 0x40646420, 0x00000003, + 0x4062BE2E, 0x4063D020, 0x40646420, 0x00000003, 0x4062BE2F, 0x4063D020, + 0x40646420, 0x00000003, 0x4062BE30, 0x4063D020, 0x40646420, 0x00000003, + 0x4062BE31, 0x4063D020, 0x40646420, 0x00000003, 0x4062BE32, 0x4063D020, + 0x40646420, 0x00000003, 0x4062BE21, 0x4063D020, + // Block 467, offset 0x74c0 + 0x40646A20, 0x00000003, 0x4062BE22, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062BE23, 0x4063D020, 0x40646A20, 0x00000003, 0x4062BE24, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062BE25, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062BE26, 0x4063D020, 0x40646A20, 0x00000003, 0x4062BE27, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062BE28, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062BE29, 0x4063D020, 0x40646A20, 0x00000003, 0x4062BE2A, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062BE2B, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062BE2C, 0x4063D020, 0x40646A20, 0x00000003, 0x4062BE2D, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062BE2E, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062BE2F, 0x4063D020, 0x40646A20, 0x00000003, 0x4062BE30, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062BE31, 0x4063D020, + // Block 468, offset 0x7500 + 0x40646A20, 0x00000003, 0x4062BE32, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062BE33, 0x4063D020, 0x40646A20, 0x00000003, 0x4062BE34, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062BE35, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062BE36, 0x4063D020, 0x40646A20, 0x00000003, 0x4062BE37, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062BE38, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062BE39, 0x4063D020, 0x40646A20, 0x00000003, 0x4062BE3A, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062BE3B, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062BE3C, 0x4063D020, 0x40646A20, 0x00000003, 0x4062BE3D, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062BE3E, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062BE3F, 0x4063D020, 0x40646A20, 0x00000003, 0x4062BE40, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062BE41, 0x4063D020, + // Block 469, offset 0x7540 + 0x40646A20, 0x00000003, 0x4062BE21, 0x4063D020, 0x40647220, 0x00000003, + 0x4062BE22, 0x4063D020, 0x40647220, 0x00000003, 0x4062BE23, 0x4063D020, + 0x40647220, 0x00000003, 0x4062BE24, 0x4063D020, 0x40647220, 0x00000003, + 0x4062BE25, 0x4063D020, 0x40647220, 0x00000003, 0x4062BE26, 0x4063D020, + 0x40647220, 0x00000003, 0x4062BE21, 0x4063D020, 0x40648220, 0x00000003, + 0x4062BE22, 0x4063D020, 0x40648220, 0x00000003, 0x4062BE23, 0x4063D020, + 0x40648220, 0x00000003, 0x4062BE24, 0x4063D020, 0x40648220, 0x00000003, + 0x4062BE25, 0x4063D020, 0x40648220, 0x00000003, 0x4062BE26, 0x4063D020, + 0x40648220, 0x00000003, 0x4062BE27, 0x4063D020, 0x40648220, 0x00000003, + 0x4062BE28, 0x4063D020, 0x40648220, 0x00000003, 0x4062BE29, 0x4063D020, + 0x40648220, 0x00000003, 0x4062BE2A, 0x4063D020, + // Block 470, offset 0x7580 + 0x40648220, 0x00000003, 0x4062BE2B, 0x4063D020, 0x40648220, 0x00000003, + 0x4062BE2C, 0x4063D020, 0x40648220, 0x00000003, 0x4062BE2D, 0x4063D020, + 0x40648220, 0x00000003, 0x4062BE2E, 0x4063D020, 0x40648220, 0x00000003, + 0x4062BE2F, 0x4063D020, 0x40648220, 0x00000003, 0x4062BE21, 0x4063D020, + 0x40648420, 0x00000003, 0x4062BE22, 0x4063D020, 0x40648420, 0x00000003, + 0x4062BE23, 0x4063D020, 0x40648420, 0x00000003, 0x4062C021, 0x4063A820, + 0x40648C20, 0x00000002, 0x4062C021, 0x4063D020, 0x00000002, 0x4062C221, + 0x4063A820, 0x00000002, 0x4062C222, 0x4063A820, 0x00000002, 0x4062C223, + 0x4063A820, 0x00000002, 0x4062C224, 0x4063A820, 0x00000002, 0x4062C225, + 0x4063A820, 0x00000002, 0x4062C226, 0x4063A820, 0x00000002, 0x4062C227, + 0x4063A820, 0x00000002, 0x4062C228, 0x4063A820, + // Block 471, offset 0x75c0 + 0x00000002, 0x4062C229, 0x4063A820, 0x00000002, 0x4062C22A, 0x4063A820, + 0x00000002, 0x4062C22B, 0x4063A820, 0x00000002, 0x4062C22C, 0x4063A820, + 0x00000002, 0x4062C22D, 0x4063A820, 0x00000002, 0x4062C22E, 0x4063A820, + 0x00000002, 0x4062C22F, 0x4063A820, 0x00000002, 0x4062C230, 0x4063A820, + 0x00000002, 0x4062C231, 0x4063A820, 0x00000002, 0x4062C232, 0x4063A820, + 0x00000002, 0x4062C233, 0x4063A820, 0x00000002, 0x4062C234, 0x4063A820, + 0x00000002, 0x4062C235, 0x4063A820, 0x00000002, 0x4062C236, 0x4063A820, + 0x00000002, 0x4062C237, 0x4063A820, 0x00000002, 0x4062C238, 0x4063A820, + 0x00000002, 0x4062C239, 0x4063A820, 0x00000002, 0x4062C23A, 0x4063A820, + 0x00000002, 0x4062C23B, 0x4063A820, 0x00000002, 0x4062C23C, 0x4063A820, + 0x00000002, 0x4062C23D, 0x4063A820, 0x00000003, + // Block 472, offset 0x7600 + 0x4062C221, 0x4063A820, 0x40646420, 0x00000003, 0x4062C222, 0x4063A820, + 0x40646420, 0x00000003, 0x4062C223, 0x4063A820, 0x40646420, 0x00000003, + 0x4062C224, 0x4063A820, 0x40646420, 0x00000003, 0x4062C225, 0x4063A820, + 0x40646420, 0x00000003, 0x4062C226, 0x4063A820, 0x40646420, 0x00000003, + 0x4062C227, 0x4063A820, 0x40646420, 0x00000003, 0x4062C228, 0x4063A820, + 0x40646420, 0x00000003, 0x4062C229, 0x4063A820, 0x40646420, 0x00000003, + 0x4062C22A, 0x4063A820, 0x40646420, 0x00000003, 0x4062C22B, 0x4063A820, + 0x40646420, 0x00000003, 0x4062C22C, 0x4063A820, 0x40646420, 0x00000003, + 0x4062C22D, 0x4063A820, 0x40646420, 0x00000003, 0x4062C22E, 0x4063A820, + 0x40646420, 0x00000003, 0x4062C22F, 0x4063A820, 0x40646420, 0x00000003, + 0x4062C230, 0x4063A820, 0x40646420, 0x00000003, + // Block 473, offset 0x7640 + 0x4062C231, 0x4063A820, 0x40646420, 0x00000003, 0x4062C232, 0x4063A820, + 0x40646420, 0x00000003, 0x4062C233, 0x4063A820, 0x40646420, 0x00000003, + 0x4062C234, 0x4063A820, 0x40646420, 0x00000003, 0x4062C235, 0x4063A820, + 0x40646420, 0x00000003, 0x4062C236, 0x4063A820, 0x40646420, 0x00000003, + 0x4062C237, 0x4063A820, 0x40646420, 0x00000003, 0x4062C238, 0x4063A820, + 0x40646420, 0x00000003, 0x4062C239, 0x4063A820, 0x40646420, 0x00000003, + 0x4062C221, 0x4063A820, 0x40646A20, 0x00000003, 0x4062C222, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062C223, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062C224, 0x4063A820, 0x40646A20, 0x00000003, 0x4062C225, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062C226, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062C227, 0x4063A820, 0x40646A20, 0x00000003, + // Block 474, offset 0x7680 + 0x4062C228, 0x4063A820, 0x40646A20, 0x00000003, 0x4062C229, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062C22A, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062C22B, 0x4063A820, 0x40646A20, 0x00000003, 0x4062C22C, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062C22D, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062C22E, 0x4063A820, 0x40646A20, 0x00000003, 0x4062C221, 0x4063A820, + 0x40647220, 0x00000003, 0x4062C222, 0x4063A820, 0x40647220, 0x00000003, + 0x4062C223, 0x4063A820, 0x40647220, 0x00000003, 0x4062C224, 0x4063A820, + 0x40647220, 0x00000003, 0x4062C225, 0x4063A820, 0x40647220, 0x00000003, + 0x4062C226, 0x4063A820, 0x40647220, 0x00000003, 0x4062C227, 0x4063A820, + 0x40647220, 0x00000003, 0x4062C228, 0x4063A820, 0x40647220, 0x00000003, + 0x4062C229, 0x4063A820, 0x40647220, 0x00000003, + // Block 475, offset 0x76c0 + 0x4062C22A, 0x4063A820, 0x40647220, 0x00000003, 0x4062C22B, 0x4063A820, + 0x40647220, 0x00000003, 0x4062C22C, 0x4063A820, 0x40647220, 0x00000003, + 0x4062C221, 0x4063A820, 0x40648220, 0x00000003, 0x4062C222, 0x4063A820, + 0x40648220, 0x00000003, 0x4062C223, 0x4063A820, 0x40648220, 0x00000003, + 0x4062C224, 0x4063A820, 0x40648220, 0x00000003, 0x4062C225, 0x4063A820, + 0x40648220, 0x00000003, 0x4062C226, 0x4063A820, 0x40648220, 0x00000003, + 0x4062C227, 0x4063A820, 0x40648220, 0x00000003, 0x4062C228, 0x4063A820, + 0x40648220, 0x00000003, 0x4062C229, 0x4063A820, 0x40648220, 0x00000003, + 0x4062C22A, 0x4063A820, 0x40648220, 0x00000003, 0x4062C22B, 0x4063A820, + 0x40648220, 0x00000003, 0x4062C22C, 0x4063A820, 0x40648220, 0x00000003, + 0x4062C22D, 0x4063A820, 0x40648220, 0x00000003, + // Block 476, offset 0x7700 + 0x4062C22E, 0x4063A820, 0x40648220, 0x00000003, 0x4062C22F, 0x4063A820, + 0x40648220, 0x00000003, 0x4062C230, 0x4063A820, 0x40648220, 0x00000003, + 0x4062C231, 0x4063A820, 0x40648220, 0x00000003, 0x4062C232, 0x4063A820, + 0x40648220, 0x00000003, 0x4062C233, 0x4063A820, 0x40648220, 0x00000003, + 0x4062C221, 0x4063A820, 0x40648420, 0x00000003, 0x4062C222, 0x4063A820, + 0x40648420, 0x00000003, 0x4062C223, 0x4063A820, 0x40648420, 0x00000003, + 0x4062C224, 0x4063A820, 0x40648420, 0x00000003, 0x4062C221, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062C222, 0x4063A820, 0x40648C20, 0x00000003, + 0x4062C223, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C224, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062C225, 0x4063A820, 0x40648C20, 0x00000003, + 0x4062C226, 0x4063A820, 0x40648C20, 0x00000003, + // Block 477, offset 0x7740 + 0x4062C227, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C228, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062C229, 0x4063A820, 0x40648C20, 0x00000003, + 0x4062C22A, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C22B, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062C22C, 0x4063A820, 0x40648C20, 0x00000002, + 0x4062C221, 0x4063AA20, 0x00000002, 0x4062C222, 0x4063AA20, 0x00000002, + 0x4062C223, 0x4063AA20, 0x00000002, 0x4062C224, 0x4063AA20, 0x00000002, + 0x4062C225, 0x4063AA20, 0x00000002, 0x4062C226, 0x4063AA20, 0x00000002, + 0x4062C227, 0x4063AA20, 0x00000002, 0x4062C228, 0x4063AA20, 0x00000002, + 0x4062C229, 0x4063AA20, 0x00000002, 0x4062C22A, 0x4063AA20, 0x00000002, + 0x4062C22B, 0x4063AA20, 0x00000002, 0x4062C22C, 0x4063AA20, 0x00000002, + 0x4062C22D, 0x4063AA20, 0x00000002, 0x4062C22E, + // Block 478, offset 0x7780 + 0x4063AA20, 0x00000002, 0x4062C22F, 0x4063AA20, 0x00000002, 0x4062C230, + 0x4063AA20, 0x00000002, 0x4062C231, 0x4063AA20, 0x00000002, 0x4062C232, + 0x4063AA20, 0x00000002, 0x4062C233, 0x4063AA20, 0x00000002, 0x4062C234, + 0x4063AA20, 0x00000002, 0x4062C235, 0x4063AA20, 0x00000002, 0x4062C236, + 0x4063AA20, 0x00000002, 0x4062C237, 0x4063AA20, 0x00000002, 0x4062C238, + 0x4063AA20, 0x00000002, 0x4062C239, 0x4063AA20, 0x00000002, 0x4062C23A, + 0x4063AA20, 0x00000002, 0x4062C23B, 0x4063AA20, 0x00000002, 0x4062C23C, + 0x4063AA20, 0x00000002, 0x4062C23D, 0x4063AA20, 0x00000002, 0x4062C23E, + 0x4063AA20, 0x00000002, 0x4062C23F, 0x4063AA20, 0x00000003, 0x4062C221, + 0x4063AA20, 0x40646420, 0x00000003, 0x4062C222, 0x4063AA20, 0x40646420, + 0x00000003, 0x4062C223, 0x4063AA20, 0x40646420, + // Block 479, offset 0x77c0 + 0x00000003, 0x4062C224, 0x4063AA20, 0x40646420, 0x00000003, 0x4062C225, + 0x4063AA20, 0x40646420, 0x00000003, 0x4062C226, 0x4063AA20, 0x40646420, + 0x00000003, 0x4062C227, 0x4063AA20, 0x40646420, 0x00000003, 0x4062C228, + 0x4063AA20, 0x40646420, 0x00000003, 0x4062C229, 0x4063AA20, 0x40646420, + 0x00000003, 0x4062C22A, 0x4063AA20, 0x40646420, 0x00000003, 0x4062C22B, + 0x4063AA20, 0x40646420, 0x00000003, 0x4062C221, 0x4063AA20, 0x40648C20, + 0x00000003, 0x4062C222, 0x4063AA20, 0x40648C20, 0x00000003, 0x4062C223, + 0x4063AA20, 0x40648C20, 0x00000003, 0x4062C224, 0x4063AA20, 0x40648C20, + 0x00000003, 0x4062C225, 0x4063AA20, 0x40648C20, 0x00000003, 0x4062C226, + 0x4063AA20, 0x40648C20, 0x00000003, 0x4062C227, 0x4063AA20, 0x40648C20, + 0x00000003, 0x4062C228, 0x4063AA20, 0x40648C20, + // Block 480, offset 0x7800 + 0x00000002, 0x4062C221, 0x4063AC20, 0x00000002, 0x4062C222, 0x4063AC20, + 0x00000002, 0x4062C223, 0x4063AC20, 0x00000002, 0x4062C224, 0x4063AC20, + 0x00000002, 0x4062C225, 0x4063AC20, 0x00000002, 0x4062C226, 0x4063AC20, + 0x00000002, 0x4062C227, 0x4063AC20, 0x00000002, 0x4062C228, 0x4063AC20, + 0x00000002, 0x4062C229, 0x4063AC20, 0x00000002, 0x4062C22A, 0x4063AC20, + 0x00000002, 0x4062C22B, 0x4063AC20, 0x00000003, 0x4062C221, 0x4063AC20, + 0x40646420, 0x00000003, 0x4062C222, 0x4063AC20, 0x40646420, 0x00000003, + 0x4062C223, 0x4063AC20, 0x40646420, 0x00000003, 0x4062C224, 0x4063AC20, + 0x40646420, 0x00000003, 0x4062C225, 0x4063AC20, 0x40646420, 0x00000003, + 0x4062C226, 0x4063AC20, 0x40646420, 0x00000003, 0x4062C227, 0x4063AC20, + 0x40646420, 0x00000003, 0x4062C228, 0x4063AC20, + // Block 481, offset 0x7840 + 0x40646420, 0x00000003, 0x4062C229, 0x4063AC20, 0x40646420, 0x00000003, + 0x4062C22A, 0x4063AC20, 0x40646420, 0x00000003, 0x4062C22B, 0x4063AC20, + 0x40646420, 0x00000003, 0x4062C22C, 0x4063AC20, 0x40646420, 0x00000003, + 0x4062C22D, 0x4063AC20, 0x40646420, 0x00000003, 0x4062C22E, 0x4063AC20, + 0x40646420, 0x00000003, 0x4062C22F, 0x4063AC20, 0x40646420, 0x00000003, + 0x4062C221, 0x4063AC20, 0x40648C20, 0x00000003, 0x4062C222, 0x4063AC20, + 0x40648C20, 0x00000003, 0x4062C223, 0x4063AC20, 0x40648C20, 0x00000003, + 0x4062C224, 0x4063AC20, 0x40648C20, 0x00000003, 0x4062C225, 0x4063AC20, + 0x40648C20, 0x00000003, 0x4062C226, 0x4063AC20, 0x40648C20, 0x00000003, + 0x4062C227, 0x4063AC20, 0x40648C20, 0x00000003, 0x4062C228, 0x4063AC20, + 0x40648C20, 0x00000003, 0x4062C229, 0x4063AC20, + // Block 482, offset 0x7880 + 0x40648C20, 0x00000003, 0x4062C22A, 0x4063AC20, 0x40648C20, 0x00000003, + 0x4062C22B, 0x4063AC20, 0x40648C20, 0x00000003, 0x4062C22C, 0x4063AC20, + 0x40648C20, 0x00000003, 0x4062C22D, 0x4063AC20, 0x40648C20, 0x00000003, + 0x4062C22E, 0x4063AC20, 0x40648C20, 0x00000003, 0x4062C22F, 0x4063AC20, + 0x40648C20, 0x00000003, 0x4062C230, 0x4063AC20, 0x40648C20, 0x00000003, + 0x4062C231, 0x4063AC20, 0x40648C20, 0x00000003, 0x4062C232, 0x4063AC20, + 0x40648C20, 0x00000003, 0x4062C233, 0x4063AC20, 0x40648C20, 0x00000003, + 0x4062C234, 0x4063AC20, 0x40648C20, 0x00000003, 0x4062C235, 0x4063AC20, + 0x40648C20, 0x00000003, 0x4062C236, 0x4063AC20, 0x40648C20, 0x00000003, + 0x4062C237, 0x4063AC20, 0x40648C20, 0x00000003, 0x4062C238, 0x4063AC20, + 0x40648C20, 0x00000003, 0x4062C239, 0x4063AC20, + // Block 483, offset 0x78c0 + 0x40648C20, 0x00000003, 0x4062C23A, 0x4063AC20, 0x40648C20, 0x00000003, + 0x4062C23B, 0x4063AC20, 0x40648C20, 0x00000003, 0x4062C23C, 0x4063AC20, + 0x40648C20, 0x00000003, 0x4062C23D, 0x4063AC20, 0x40648C20, 0x00000003, + 0x4062C23E, 0x4063AC20, 0x40648C20, 0x00000003, 0x4062C23F, 0x4063AC20, + 0x40648C20, 0x00000003, 0x4062C240, 0x4063AC20, 0x40648C20, 0x00000003, + 0x4062C241, 0x4063AC20, 0x40648C20, 0x00000003, 0x4062C242, 0x4063AC20, + 0x40648C20, 0x00000002, 0x4062C221, 0x4063B020, 0x00000002, 0x4062C222, + 0x4063B020, 0x00000002, 0x4062C223, 0x4063B020, 0x00000002, 0x4062C224, + 0x4063B020, 0x00000002, 0x4062C225, 0x4063B020, 0x00000002, 0x4062C226, + 0x4063B020, 0x00000002, 0x4062C227, 0x4063B020, 0x00000002, 0x4062C228, + 0x4063B020, 0x00000002, 0x4062C229, 0x4063B020, + // Block 484, offset 0x7900 + 0x00000002, 0x4062C22A, 0x4063B020, 0x00000002, 0x4062C22B, 0x4063B020, + 0x00000002, 0x4062C22C, 0x4063B020, 0x00000002, 0x4062C22D, 0x4063B020, + 0x00000002, 0x4062C22E, 0x4063B020, 0x00000003, 0x4062C221, 0x4063B020, + 0x40646420, 0x00000003, 0x4062C222, 0x4063B020, 0x40646420, 0x00000003, + 0x4062C223, 0x4063B020, 0x40646420, 0x00000003, 0x4062C224, 0x4063B020, + 0x40646420, 0x00000003, 0x4062C225, 0x4063B020, 0x40646420, 0x00000003, + 0x4062C226, 0x4063B020, 0x40646420, 0x00000003, 0x4062C221, 0x4063B020, + 0x40646A20, 0x00000003, 0x4062C222, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062C223, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C224, 0x4063B020, + 0x40646A20, 0x00000003, 0x4062C225, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062C226, 0x4063B020, 0x40646A20, 0x00000003, + // Block 485, offset 0x7940 + 0x4062C227, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C228, 0x4063B020, + 0x40646A20, 0x00000003, 0x4062C229, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062C22A, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C22B, 0x4063B020, + 0x40646A20, 0x00000003, 0x4062C22C, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062C22D, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C221, 0x4063B020, + 0x40647220, 0x00000003, 0x4062C222, 0x4063B020, 0x40647220, 0x00000003, + 0x4062C223, 0x4063B020, 0x40647220, 0x00000003, 0x4062C221, 0x4063B020, + 0x40648220, 0x00000003, 0x4062C222, 0x4063B020, 0x40648220, 0x00000003, + 0x4062C223, 0x4063B020, 0x40648220, 0x00000003, 0x4062C224, 0x4063B020, + 0x40648220, 0x00000003, 0x4062C225, 0x4063B020, 0x40648220, 0x00000003, + 0x4062C226, 0x4063B020, 0x40648220, 0x00000003, + // Block 486, offset 0x7980 + 0x4062C227, 0x4063B020, 0x40648220, 0x00000003, 0x4062C228, 0x4063B020, + 0x40648220, 0x00000003, 0x4062C229, 0x4063B020, 0x40648220, 0x00000003, + 0x4062C22A, 0x4063B020, 0x40648220, 0x00000003, 0x4062C22B, 0x4063B020, + 0x40648220, 0x00000003, 0x4062C22C, 0x4063B020, 0x40648220, 0x00000003, + 0x4062C221, 0x4063B020, 0x40648420, 0x00000003, 0x4062C222, 0x4063B020, + 0x40648420, 0x00000003, 0x4062C223, 0x4063B020, 0x40648420, 0x00000003, + 0x4062C224, 0x4063B020, 0x40648420, 0x00000002, 0x4062C221, 0x4063B220, + 0x00000002, 0x4062C222, 0x4063B220, 0x00000003, 0x4062C221, 0x4063B220, + 0x40646A20, 0x00000002, 0x4062C221, 0x4063B420, 0x00000002, 0x4062C222, + 0x4063B420, 0x00000002, 0x4062C223, 0x4063B420, 0x00000002, 0x4062C224, + 0x4063B420, 0x00000002, 0x4062C225, 0x4063B420, + // Block 487, offset 0x79c0 + 0x00000002, 0x4062C226, 0x4063B420, 0x00000002, 0x4062C227, 0x4063B420, + 0x00000002, 0x4062C228, 0x4063B420, 0x00000002, 0x4062C229, 0x4063B420, + 0x00000002, 0x4062C22A, 0x4063B420, 0x00000002, 0x4062C22B, 0x4063B420, + 0x00000002, 0x4062C22C, 0x4063B420, 0x00000002, 0x4062C22D, 0x4063B420, + 0x00000002, 0x4062C22E, 0x4063B420, 0x00000003, 0x4062C221, 0x4063B420, + 0x40646420, 0x00000003, 0x4062C222, 0x4063B420, 0x40646420, 0x00000003, + 0x4062C223, 0x4063B420, 0x40646420, 0x00000003, 0x4062C224, 0x4063B420, + 0x40646420, 0x00000003, 0x4062C225, 0x4063B420, 0x40646420, 0x00000003, + 0x4062C226, 0x4063B420, 0x40646420, 0x00000003, 0x4062C227, 0x4063B420, + 0x40646420, 0x00000003, 0x4062C228, 0x4063B420, 0x40646420, 0x00000003, + 0x4062C229, 0x4063B420, 0x40646420, 0x00000003, + // Block 488, offset 0x7a00 + 0x4062C22A, 0x4063B420, 0x40646420, 0x00000003, 0x4062C22B, 0x4063B420, + 0x40646420, 0x00000003, 0x4062C22C, 0x4063B420, 0x40646420, 0x00000003, + 0x4062C22D, 0x4063B420, 0x40646420, 0x00000003, 0x4062C221, 0x4063B420, + 0x40646A20, 0x00000003, 0x4062C222, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062C223, 0x4063B420, 0x40646A20, 0x00000003, 0x4062C224, 0x4063B420, + 0x40646A20, 0x00000003, 0x4062C225, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062C226, 0x4063B420, 0x40646A20, 0x00000003, 0x4062C227, 0x4063B420, + 0x40646A20, 0x00000003, 0x4062C228, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062C229, 0x4063B420, 0x40646A20, 0x00000003, 0x4062C22A, 0x4063B420, + 0x40646A20, 0x00000003, 0x4062C22B, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062C22C, 0x4063B420, 0x40646A20, 0x00000003, + // Block 489, offset 0x7a40 + 0x4062C22D, 0x4063B420, 0x40646A20, 0x00000003, 0x4062C22E, 0x4063B420, + 0x40646A20, 0x00000003, 0x4062C22F, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062C230, 0x4063B420, 0x40646A20, 0x00000003, 0x4062C231, 0x4063B420, + 0x40646A20, 0x00000003, 0x4062C232, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062C233, 0x4063B420, 0x40646A20, 0x00000003, 0x4062C234, 0x4063B420, + 0x40646A20, 0x00000003, 0x4062C235, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062C236, 0x4063B420, 0x40646A20, 0x00000003, 0x4062C237, 0x4063B420, + 0x40646A20, 0x00000003, 0x4062C238, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062C239, 0x4063B420, 0x40646A20, 0x00000003, 0x4062C23A, 0x4063B420, + 0x40646A20, 0x00000003, 0x4062C23B, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062C23C, 0x4063B420, 0x40646A20, 0x00000003, + // Block 490, offset 0x7a80 + 0x4062C23D, 0x4063B420, 0x40646A20, 0x00000003, 0x4062C23E, 0x4063B420, + 0x40646A20, 0x00000003, 0x4062C23F, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062C240, 0x4063B420, 0x40646A20, 0x00000003, 0x4062C241, 0x4063B420, + 0x40646A20, 0x00000003, 0x4062C242, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062C243, 0x4063B420, 0x40646A20, 0x00000003, 0x4062C244, 0x4063B420, + 0x40646A20, 0x00000003, 0x4062C245, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062C246, 0x4063B420, 0x40646A20, 0x00000003, 0x4062C247, 0x4063B420, + 0x40646A20, 0x00000003, 0x4062C248, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062C249, 0x4063B420, 0x40646A20, 0x00000003, 0x4062C24A, 0x4063B420, + 0x40646A20, 0x00000003, 0x4062C24B, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062C24C, 0x4063B420, 0x40646A20, 0x00000003, + // Block 491, offset 0x7ac0 + 0x4062C221, 0x4063B420, 0x40647220, 0x00000003, 0x4062C222, 0x4063B420, + 0x40647220, 0x00000003, 0x4062C223, 0x4063B420, 0x40647220, 0x00000003, + 0x4062C224, 0x4063B420, 0x40647220, 0x00000003, 0x4062C225, 0x4063B420, + 0x40647220, 0x00000003, 0x4062C221, 0x4063B420, 0x40648220, 0x00000003, + 0x4062C222, 0x4063B420, 0x40648220, 0x00000003, 0x4062C223, 0x4063B420, + 0x40648220, 0x00000003, 0x4062C224, 0x4063B420, 0x40648220, 0x00000003, + 0x4062C225, 0x4063B420, 0x40648220, 0x00000003, 0x4062C226, 0x4063B420, + 0x40648220, 0x00000003, 0x4062C227, 0x4063B420, 0x40648220, 0x00000003, + 0x4062C228, 0x4063B420, 0x40648220, 0x00000003, 0x4062C229, 0x4063B420, + 0x40648220, 0x00000003, 0x4062C22A, 0x4063B420, 0x40648220, 0x00000003, + 0x4062C22B, 0x4063B420, 0x40648220, 0x00000003, + // Block 492, offset 0x7b00 + 0x4062C22C, 0x4063B420, 0x40648220, 0x00000003, 0x4062C22D, 0x4063B420, + 0x40648220, 0x00000003, 0x4062C22E, 0x4063B420, 0x40648220, 0x00000003, + 0x4062C22F, 0x4063B420, 0x40648220, 0x00000003, 0x4062C230, 0x4063B420, + 0x40648220, 0x00000003, 0x4062C231, 0x4063B420, 0x40648220, 0x00000003, + 0x4062C232, 0x4063B420, 0x40648220, 0x00000003, 0x4062C233, 0x4063B420, + 0x40648220, 0x00000003, 0x4062C234, 0x4063B420, 0x40648220, 0x00000003, + 0x4062C235, 0x4063B420, 0x40648220, 0x00000003, 0x4062C236, 0x4063B420, + 0x40648220, 0x00000003, 0x4062C221, 0x4063B420, 0x40648420, 0x00000003, + 0x4062C222, 0x4063B420, 0x40648420, 0x00000003, 0x4062C223, 0x4063B420, + 0x40648420, 0x00000003, 0x4062C224, 0x4063B420, 0x40648420, 0x00000003, + 0x4062C225, 0x4063B420, 0x40648420, 0x00000003, + // Block 493, offset 0x7b40 + 0x4062C226, 0x4063B420, 0x40648420, 0x00000003, 0x4062C227, 0x4063B420, + 0x40648420, 0x00000003, 0x4062C221, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062C222, 0x4063B420, 0x40648C20, 0x00000003, 0x4062C223, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062C224, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062C225, 0x4063B420, 0x40648C20, 0x00000003, 0x4062C226, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062C227, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062C228, 0x4063B420, 0x40648C20, 0x00000003, 0x4062C229, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062C22A, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062C22B, 0x4063B420, 0x40648C20, 0x00000003, 0x4062C22C, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062C22D, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062C22E, 0x4063B420, 0x40648C20, 0x00000003, + // Block 494, offset 0x7b80 + 0x4062C22F, 0x4063B420, 0x40648C20, 0x00000003, 0x4062C230, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062C231, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062C232, 0x4063B420, 0x40648C20, 0x00000003, 0x4062C233, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062C234, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062C235, 0x4063B420, 0x40648C20, 0x00000003, 0x4062C236, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062C237, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062C238, 0x4063B420, 0x40648C20, 0x00000003, 0x4062C239, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062C23A, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062C23B, 0x4063B420, 0x40648C20, 0x00000003, 0x4062C23C, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062C23D, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062C23E, 0x4063B420, 0x40648C20, 0x00000003, + // Block 495, offset 0x7bc0 + 0x4062C23F, 0x4063B420, 0x40648C20, 0x00000003, 0x4062C240, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062C241, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062C242, 0x4063B420, 0x40648C20, 0x00000003, 0x4062C243, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062C244, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062C245, 0x4063B420, 0x40648C20, 0x00000003, 0x4062C246, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062C247, 0x4063B420, 0x40648C20, 0x00000002, + 0x4062C221, 0x4063B620, 0x00000002, 0x4062C222, 0x4063B620, 0x00000002, + 0x4062C223, 0x4063B620, 0x00000002, 0x4062C224, 0x4063B620, 0x00000002, + 0x4062C225, 0x4063B620, 0x00000002, 0x4062C226, 0x4063B620, 0x00000002, + 0x4062C227, 0x4063B620, 0x00000002, 0x4062C228, 0x4063B620, 0x00000002, + 0x4062C229, 0x4063B620, 0x00000002, 0x4062C22A, + // Block 496, offset 0x7c00 + 0x4063B620, 0x00000002, 0x4062C22B, 0x4063B620, 0x00000002, 0x4062C22C, + 0x4063B620, 0x00000002, 0x4062C22D, 0x4063B620, 0x00000002, 0x4062C22E, + 0x4063B620, 0x00000002, 0x4062C22F, 0x4063B620, 0x00000002, 0x4062C230, + 0x4063B620, 0x00000002, 0x4062C231, 0x4063B620, 0x00000002, 0x4062C232, + 0x4063B620, 0x00000002, 0x4062C233, 0x4063B620, 0x00000002, 0x4062C234, + 0x4063B620, 0x00000002, 0x4062C235, 0x4063B620, 0x00000002, 0x4062C236, + 0x4063B620, 0x00000002, 0x4062C237, 0x4063B620, 0x00000002, 0x4062C238, + 0x4063B620, 0x00000002, 0x4062C239, 0x4063B620, 0x00000002, 0x4062C23A, + 0x4063B620, 0x00000002, 0x4062C23B, 0x4063B620, 0x00000002, 0x4062C23C, + 0x4063B620, 0x00000002, 0x4062C23D, 0x4063B620, 0x00000002, 0x4062C23E, + 0x4063B620, 0x00000002, 0x4062C23F, 0x4063B620, + // Block 497, offset 0x7c40 + 0x00000002, 0x4062C240, 0x4063B620, 0x00000002, 0x4062C241, 0x4063B620, + 0x00000002, 0x4062C242, 0x4063B620, 0x00000002, 0x4062C243, 0x4063B620, + 0x00000002, 0x4062C244, 0x4063B620, 0x00000002, 0x4062C245, 0x4063B620, + 0x00000002, 0x4062C246, 0x4063B620, 0x00000002, 0x4062C247, 0x4063B620, + 0x00000002, 0x4062C221, 0x4063B820, 0x00000002, 0x4062C222, 0x4063B820, + 0x00000002, 0x4062C223, 0x4063B820, 0x00000002, 0x4062C224, 0x4063B820, + 0x00000002, 0x4062C225, 0x4063B820, 0x00000002, 0x4062C226, 0x4063B820, + 0x00000002, 0x4062C227, 0x4063B820, 0x00000002, 0x4062C228, 0x4063B820, + 0x00000002, 0x4062C229, 0x4063B820, 0x00000002, 0x4062C22A, 0x4063B820, + 0x00000002, 0x4062C22B, 0x4063B820, 0x00000002, 0x4062C22C, 0x4063B820, + 0x00000002, 0x4062C22D, 0x4063B820, 0x00000002, + // Block 498, offset 0x7c80 + 0x4062C22E, 0x4063B820, 0x00000002, 0x4062C22F, 0x4063B820, 0x00000002, + 0x4062C230, 0x4063B820, 0x00000002, 0x4062C231, 0x4063B820, 0x00000002, + 0x4062C232, 0x4063B820, 0x00000002, 0x4062C233, 0x4063B820, 0x00000002, + 0x4062C234, 0x4063B820, 0x00000002, 0x4062C235, 0x4063B820, 0x00000002, + 0x4062C236, 0x4063B820, 0x00000002, 0x4062C237, 0x4063B820, 0x00000002, + 0x4062C238, 0x4063B820, 0x00000002, 0x4062C239, 0x4063B820, 0x00000002, + 0x4062C23A, 0x4063B820, 0x00000002, 0x4062C23B, 0x4063B820, 0x00000002, + 0x4062C23C, 0x4063B820, 0x00000002, 0x4062C23D, 0x4063B820, 0x00000002, + 0x4062C23E, 0x4063B820, 0x00000002, 0x4062C23F, 0x4063B820, 0x00000002, + 0x4062C240, 0x4063B820, 0x00000002, 0x4062C241, 0x4063B820, 0x00000002, + 0x4062C242, 0x4063B820, 0x00000002, 0x4062C243, + // Block 499, offset 0x7cc0 + 0x4063B820, 0x00000002, 0x4062C244, 0x4063B820, 0x00000002, 0x4062C245, + 0x4063B820, 0x00000002, 0x4062C246, 0x4063B820, 0x00000002, 0x4062C247, + 0x4063B820, 0x00000002, 0x4062C248, 0x4063B820, 0x00000002, 0x4062C249, + 0x4063B820, 0x00000002, 0x4062C24A, 0x4063B820, 0x00000002, 0x4062C24B, + 0x4063B820, 0x00000002, 0x4062C24C, 0x4063B820, 0x00000002, 0x4062C24D, + 0x4063B820, 0x00000002, 0x4062C24E, 0x4063B820, 0x00000002, 0x4062C24F, + 0x4063B820, 0x00000002, 0x4062C250, 0x4063B820, 0x00000002, 0x4062C251, + 0x4063B820, 0x00000002, 0x4062C252, 0x4063B820, 0x00000002, 0x4062C253, + 0x4063B820, 0x00000002, 0x4062C254, 0x4063B820, 0x00000002, 0x4062C255, + 0x4063B820, 0x00000002, 0x4062C256, 0x4063B820, 0x00000003, 0x4062C221, + 0x4063B820, 0x40646420, 0x00000003, 0x4062C222, + // Block 500, offset 0x7d00 + 0x4063B820, 0x40646420, 0x00000003, 0x4062C223, 0x4063B820, 0x40646420, + 0x00000003, 0x4062C224, 0x4063B820, 0x40646420, 0x00000003, 0x4062C225, + 0x4063B820, 0x40646420, 0x00000003, 0x4062C221, 0x4063B820, 0x40646A20, + 0x00000003, 0x4062C222, 0x4063B820, 0x40646A20, 0x00000003, 0x4062C223, + 0x4063B820, 0x40646A20, 0x00000003, 0x4062C224, 0x4063B820, 0x40646A20, + 0x00000003, 0x4062C225, 0x4063B820, 0x40646A20, 0x00000003, 0x4062C226, + 0x4063B820, 0x40646A20, 0x00000003, 0x4062C227, 0x4063B820, 0x40646A20, + 0x00000003, 0x4062C228, 0x4063B820, 0x40646A20, 0x00000003, 0x4062C229, + 0x4063B820, 0x40646A20, 0x00000003, 0x4062C22A, 0x4063B820, 0x40646A20, + 0x00000003, 0x4062C22B, 0x4063B820, 0x40646A20, 0x00000003, 0x4062C22C, + 0x4063B820, 0x40646A20, 0x00000003, 0x4062C22D, + // Block 501, offset 0x7d40 + 0x4063B820, 0x40646A20, 0x00000003, 0x4062C22E, 0x4063B820, 0x40646A20, + 0x00000003, 0x4062C22F, 0x4063B820, 0x40646A20, 0x00000003, 0x4062C230, + 0x4063B820, 0x40646A20, 0x00000003, 0x4062C231, 0x4063B820, 0x40646A20, + 0x00000003, 0x4062C221, 0x4063B820, 0x40647220, 0x00000003, 0x4062C222, + 0x4063B820, 0x40647220, 0x00000003, 0x4062C223, 0x4063B820, 0x40647220, + 0x00000003, 0x4062C221, 0x4063B820, 0x40648C20, 0x00000003, 0x4062C222, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062C223, 0x4063B820, 0x40648C20, + 0x00000003, 0x4062C224, 0x4063B820, 0x40648C20, 0x00000003, 0x4062C225, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062C226, 0x4063B820, 0x40648C20, + 0x00000003, 0x4062C227, 0x4063B820, 0x40648C20, 0x00000003, 0x4062C228, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062C229, + // Block 502, offset 0x7d80 + 0x4063B820, 0x40648C20, 0x00000003, 0x4062C22A, 0x4063B820, 0x40648C20, + 0x00000003, 0x4062C22B, 0x4063B820, 0x40648C20, 0x00000003, 0x4062C22C, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062C22D, 0x4063B820, 0x40648C20, + 0x00000003, 0x4062C22E, 0x4063B820, 0x40648C20, 0x00000003, 0x4062C22F, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062C230, 0x4063B820, 0x40648C20, + 0x00000003, 0x4062C231, 0x4063B820, 0x40648C20, 0x00000003, 0x4062C232, + 0x4063B820, 0x40648C20, 0x00000002, 0x4062C221, 0x4063BA20, 0x00000002, + 0x4062C222, 0x4063BA20, 0x00000002, 0x4062C223, 0x4063BA20, 0x00000002, + 0x4062C224, 0x4063BA20, 0x00000002, 0x4062C225, 0x4063BA20, 0x00000002, + 0x4062C226, 0x4063BA20, 0x00000002, 0x4062C227, 0x4063BA20, 0x00000002, + 0x4062C228, 0x4063BA20, 0x00000002, 0x4062C229, + // Block 503, offset 0x7dc0 + 0x4063BA20, 0x00000002, 0x4062C22A, 0x4063BA20, 0x00000002, 0x4062C22B, + 0x4063BA20, 0x00000002, 0x4062C22C, 0x4063BA20, 0x00000002, 0x4062C22D, + 0x4063BA20, 0x00000002, 0x4062C22E, 0x4063BA20, 0x00000002, 0x4062C22F, + 0x4063BA20, 0x00000002, 0x4062C230, 0x4063BA20, 0x00000002, 0x4062C231, + 0x4063BA20, 0x00000003, 0x4062C221, 0x4063BA20, 0x40646A20, 0x00000003, + 0x4062C222, 0x4063BA20, 0x40646A20, 0x00000003, 0x4062C223, 0x4063BA20, + 0x40646A20, 0x00000003, 0x4062C224, 0x4063BA20, 0x40646A20, 0x00000003, + 0x4062C225, 0x4063BA20, 0x40646A20, 0x00000003, 0x4062C226, 0x4063BA20, + 0x40646A20, 0x00000003, 0x4062C227, 0x4063BA20, 0x40646A20, 0x00000003, + 0x4062C228, 0x4063BA20, 0x40646A20, 0x00000003, 0x4062C229, 0x4063BA20, + 0x40646A20, 0x00000003, 0x4062C22A, 0x4063BA20, + // Block 504, offset 0x7e00 + 0x40646A20, 0x00000003, 0x4062C22B, 0x4063BA20, 0x40646A20, 0x00000003, + 0x4062C22C, 0x4063BA20, 0x40646A20, 0x00000003, 0x4062C22D, 0x4063BA20, + 0x40646A20, 0x00000003, 0x4062C22E, 0x4063BA20, 0x40646A20, 0x00000003, + 0x4062C22F, 0x4063BA20, 0x40646A20, 0x00000003, 0x4062C230, 0x4063BA20, + 0x40646A20, 0x00000003, 0x4062C231, 0x4063BA20, 0x40646A20, 0x00000003, + 0x4062C232, 0x4063BA20, 0x40646A20, 0x00000003, 0x4062C233, 0x4063BA20, + 0x40646A20, 0x00000003, 0x4062C234, 0x4063BA20, 0x40646A20, 0x00000003, + 0x4062C235, 0x4063BA20, 0x40646A20, 0x00000003, 0x4062C236, 0x4063BA20, + 0x40646A20, 0x00000003, 0x4062C237, 0x4063BA20, 0x40646A20, 0x00000003, + 0x4062C238, 0x4063BA20, 0x40646A20, 0x00000003, 0x4062C239, 0x4063BA20, + 0x40646A20, 0x00000003, 0x4062C23A, 0x4063BA20, + // Block 505, offset 0x7e40 + 0x40646A20, 0x00000003, 0x4062C221, 0x4063BA20, 0x40647220, 0x00000003, + 0x4062C221, 0x4063BA20, 0x40648C20, 0x00000003, 0x4062C222, 0x4063BA20, + 0x40648C20, 0x00000003, 0x4062C223, 0x4063BA20, 0x40648C20, 0x00000003, + 0x4062C224, 0x4063BA20, 0x40648C20, 0x00000003, 0x4062C225, 0x4063BA20, + 0x40648C20, 0x00000003, 0x4062C226, 0x4063BA20, 0x40648C20, 0x00000003, + 0x4062C227, 0x4063BA20, 0x40648C20, 0x00000003, 0x4062C228, 0x4063BA20, + 0x40648C20, 0x00000002, 0x4062C221, 0x4063BC20, 0x00000002, 0x4062C222, + 0x4063BC20, 0x00000002, 0x4062C223, 0x4063BC20, 0x00000002, 0x4062C224, + 0x4063BC20, 0x00000002, 0x4062C225, 0x4063BC20, 0x00000002, 0x4062C221, + 0x4063BE20, 0x00000002, 0x4062C222, 0x4063BE20, 0x00000002, 0x4062C223, + 0x4063BE20, 0x00000002, 0x4062C224, 0x4063BE20, + // Block 506, offset 0x7e80 + 0x00000002, 0x4062C225, 0x4063BE20, 0x00000002, 0x4062C226, 0x4063BE20, + 0x00000002, 0x4062C227, 0x4063BE20, 0x00000002, 0x4062C228, 0x4063BE20, + 0x00000002, 0x4062C229, 0x4063BE20, 0x00000002, 0x4062C22A, 0x4063BE20, + 0x00000002, 0x4062C22B, 0x4063BE20, 0x00000002, 0x4062C22C, 0x4063BE20, + 0x00000002, 0x4062C22D, 0x4063BE20, 0x00000002, 0x4062C22E, 0x4063BE20, + 0x00000002, 0x4062C221, 0x4063C020, 0x00000002, 0x4062C222, 0x4063C020, + 0x00000002, 0x4062C223, 0x4063C020, 0x00000002, 0x4062C224, 0x4063C020, + 0x00000002, 0x4062C225, 0x4063C020, 0x00000002, 0x4062C226, 0x4063C020, + 0x00000002, 0x4062C227, 0x4063C020, 0x00000002, 0x4062C228, 0x4063C020, + 0x00000002, 0x4062C229, 0x4063C020, 0x00000002, 0x4062C22A, 0x4063C020, + 0x00000002, 0x4062C22B, 0x4063C020, 0x00000002, + // Block 507, offset 0x7ec0 + 0x4062C22C, 0x4063C020, 0x00000002, 0x4062C22D, 0x4063C020, 0x00000002, + 0x4062C22E, 0x4063C020, 0x00000002, 0x4062C22F, 0x4063C020, 0x00000002, + 0x4062C230, 0x4063C020, 0x00000002, 0x4062C231, 0x4063C020, 0x00000002, + 0x4062C232, 0x4063C020, 0x00000002, 0x4062C233, 0x4063C020, 0x00000002, + 0x4062C234, 0x4063C020, 0x00000002, 0x4062C235, 0x4063C020, 0x00000002, + 0x4062C236, 0x4063C020, 0x00000002, 0x4062C237, 0x4063C020, 0x00000002, + 0x4062C238, 0x4063C020, 0x00000002, 0x4062C239, 0x4063C020, 0x00000002, + 0x4062C23A, 0x4063C020, 0x00000002, 0x4062C23B, 0x4063C020, 0x00000002, + 0x4062C23C, 0x4063C020, 0x00000002, 0x4062C23D, 0x4063C020, 0x00000002, + 0x4062C23E, 0x4063C020, 0x00000002, 0x4062C23F, 0x4063C020, 0x00000002, + 0x4062C240, 0x4063C020, 0x00000002, 0x4062C241, + // Block 508, offset 0x7f00 + 0x4063C020, 0x00000002, 0x4062C242, 0x4063C020, 0x00000002, 0x4062C243, + 0x4063C020, 0x00000002, 0x4062C244, 0x4063C020, 0x00000002, 0x4062C245, + 0x4063C020, 0x00000002, 0x4062C246, 0x4063C020, 0x00000002, 0x4062C247, + 0x4063C020, 0x00000002, 0x4062C248, 0x4063C020, 0x00000002, 0x4062C249, + 0x4063C020, 0x00000002, 0x4062C24A, 0x4063C020, 0x00000002, 0x4062C24B, + 0x4063C020, 0x00000002, 0x4062C24C, 0x4063C020, 0x00000003, 0x4062C221, + 0x4063C020, 0x40646420, 0x00000003, 0x4062C222, 0x4063C020, 0x40646420, + 0x00000003, 0x4062C223, 0x4063C020, 0x40646420, 0x00000003, 0x4062C224, + 0x4063C020, 0x40646420, 0x00000003, 0x4062C225, 0x4063C020, 0x40646420, + 0x00000003, 0x4062C226, 0x4063C020, 0x40646420, 0x00000003, 0x4062C227, + 0x4063C020, 0x40646420, 0x00000003, 0x4062C228, + // Block 509, offset 0x7f40 + 0x4063C020, 0x40646420, 0x00000003, 0x4062C221, 0x4063C020, 0x40648C20, + 0x00000003, 0x4062C222, 0x4063C020, 0x40648C20, 0x00000003, 0x4062C223, + 0x4063C020, 0x40648C20, 0x00000003, 0x4062C224, 0x4063C020, 0x40648C20, + 0x00000003, 0x4062C225, 0x4063C020, 0x40648C20, 0x00000003, 0x4062C226, + 0x4063C020, 0x40648C20, 0x00000003, 0x4062C227, 0x4063C020, 0x40648C20, + 0x00000003, 0x4062C228, 0x4063C020, 0x40648C20, 0x00000003, 0x4062C229, + 0x4063C020, 0x40648C20, 0x00000003, 0x4062C22A, 0x4063C020, 0x40648C20, + 0x00000003, 0x4062C22B, 0x4063C020, 0x40648C20, 0x00000003, 0x4062C22C, + 0x4063C020, 0x40648C20, 0x00000003, 0x4062C22D, 0x4063C020, 0x40648C20, + 0x00000003, 0x4062C22E, 0x4063C020, 0x40648C20, 0x00000003, 0x4062C22F, + 0x4063C020, 0x40648C20, 0x00000003, 0x4062C230, + // Block 510, offset 0x7f80 + 0x4063C020, 0x40648C20, 0x00000003, 0x4062C231, 0x4063C020, 0x40648C20, + 0x00000003, 0x4062C232, 0x4063C020, 0x40648C20, 0x00000003, 0x4062C233, + 0x4063C020, 0x40648C20, 0x00000003, 0x4062C234, 0x4063C020, 0x40648C20, + 0x00000003, 0x4062C235, 0x4063C020, 0x40648C20, 0x00000003, 0x4062C236, + 0x4063C020, 0x40648C20, 0x00000003, 0x4062C237, 0x4063C020, 0x40648C20, + 0x00000003, 0x4062C238, 0x4063C020, 0x40648C20, 0x00000003, 0x4062C239, + 0x4063C020, 0x40648C20, 0x00000003, 0x4062C23A, 0x4063C020, 0x40648C20, + 0x00000003, 0x4062C23B, 0x4063C020, 0x40648C20, 0x00000003, 0x4062C23C, + 0x4063C020, 0x40648C20, 0x00000003, 0x4062C23D, 0x4063C020, 0x40648C20, + 0x00000003, 0x4062C23E, 0x4063C020, 0x40648C20, 0x00000003, 0x4062C23F, + 0x4063C020, 0x40648C20, 0x00000003, 0x4062C240, + // Block 511, offset 0x7fc0 + 0x4063C020, 0x40648C20, 0x00000003, 0x4062C241, 0x4063C020, 0x40648C20, + 0x00000002, 0x4062C221, 0x4063C220, 0x00000002, 0x4062C222, 0x4063C220, + 0x00000002, 0x4062C223, 0x4063C220, 0x00000002, 0x4062C224, 0x4063C220, + 0x00000002, 0x4062C225, 0x4063C220, 0x00000002, 0x4062C226, 0x4063C220, + 0x00000002, 0x4062C227, 0x4063C220, 0x00000002, 0x4062C228, 0x4063C220, + 0x00000002, 0x4062C229, 0x4063C220, 0x00000002, 0x4062C22A, 0x4063C220, + 0x00000002, 0x4062C22B, 0x4063C220, 0x00000002, 0x4062C22C, 0x4063C220, + 0x00000002, 0x4062C22D, 0x4063C220, 0x00000002, 0x4062C22E, 0x4063C220, + 0x00000002, 0x4062C22F, 0x4063C220, 0x00000002, 0x4062C230, 0x4063C220, + 0x00000002, 0x4062C231, 0x4063C220, 0x00000002, 0x4062C232, 0x4063C220, + 0x00000002, 0x4062C233, 0x4063C220, 0x00000002, + // Block 512, offset 0x8000 + 0x4062C234, 0x4063C220, 0x00000002, 0x4062C235, 0x4063C220, 0x00000002, + 0x4062C236, 0x4063C220, 0x00000002, 0x4062C237, 0x4063C220, 0x00000002, + 0x4062C238, 0x4063C220, 0x00000002, 0x4062C239, 0x4063C220, 0x00000002, + 0x4062C23A, 0x4063C220, 0x00000002, 0x4062C23B, 0x4063C220, 0x00000002, + 0x4062C23C, 0x4063C220, 0x00000002, 0x4062C23D, 0x4063C220, 0x00000002, + 0x4062C23E, 0x4063C220, 0x00000002, 0x4062C23F, 0x4063C220, 0x00000002, + 0x4062C240, 0x4063C220, 0x00000002, 0x4062C241, 0x4063C220, 0x00000002, + 0x4062C242, 0x4063C220, 0x00000002, 0x4062C243, 0x4063C220, 0x00000002, + 0x4062C244, 0x4063C220, 0x00000002, 0x4062C245, 0x4063C220, 0x00000002, + 0x4062C246, 0x4063C220, 0x00000002, 0x4062C247, 0x4063C220, 0x00000002, + 0x4062C248, 0x4063C220, 0x00000002, 0x4062C249, + // Block 513, offset 0x8040 + 0x4063C220, 0x00000002, 0x4062C24A, 0x4063C220, 0x00000002, 0x4062C24B, + 0x4063C220, 0x00000002, 0x4062C24C, 0x4063C220, 0x00000002, 0x4062C24D, + 0x4063C220, 0x00000002, 0x4062C24E, 0x4063C220, 0x00000002, 0x4062C24F, + 0x4063C220, 0x00000002, 0x4062C250, 0x4063C220, 0x00000002, 0x4062C251, + 0x4063C220, 0x00000002, 0x4062C252, 0x4063C220, 0x00000002, 0x4062C253, + 0x4063C220, 0x00000002, 0x4062C254, 0x4063C220, 0x00000003, 0x4062C221, + 0x4063C220, 0x40646420, 0x00000003, 0x4062C222, 0x4063C220, 0x40646420, + 0x00000003, 0x4062C223, 0x4063C220, 0x40646420, 0x00000003, 0x4062C224, + 0x4063C220, 0x40646420, 0x00000003, 0x4062C225, 0x4063C220, 0x40646420, + 0x00000003, 0x4062C226, 0x4063C220, 0x40646420, 0x00000003, 0x4062C227, + 0x4063C220, 0x40646420, 0x00000003, 0x4062C228, + // Block 514, offset 0x8080 + 0x4063C220, 0x40646420, 0x00000003, 0x4062C229, 0x4063C220, 0x40646420, + 0x00000003, 0x4062C22A, 0x4063C220, 0x40646420, 0x00000003, 0x4062C221, + 0x4063C220, 0x40646A20, 0x00000003, 0x4062C222, 0x4063C220, 0x40646A20, + 0x00000003, 0x4062C223, 0x4063C220, 0x40646A20, 0x00000003, 0x4062C224, + 0x4063C220, 0x40646A20, 0x00000003, 0x4062C225, 0x4063C220, 0x40646A20, + 0x00000003, 0x4062C226, 0x4063C220, 0x40646A20, 0x00000003, 0x4062C227, + 0x4063C220, 0x40646A20, 0x00000003, 0x4062C228, 0x4063C220, 0x40646A20, + 0x00000003, 0x4062C229, 0x4063C220, 0x40646A20, 0x00000003, 0x4062C22A, + 0x4063C220, 0x40646A20, 0x00000003, 0x4062C22B, 0x4063C220, 0x40646A20, + 0x00000003, 0x4062C22C, 0x4063C220, 0x40646A20, 0x00000003, 0x4062C22D, + 0x4063C220, 0x40646A20, 0x00000003, 0x4062C22E, + // Block 515, offset 0x80c0 + 0x4063C220, 0x40646A20, 0x00000003, 0x4062C22F, 0x4063C220, 0x40646A20, + 0x00000003, 0x4062C230, 0x4063C220, 0x40646A20, 0x00000003, 0x4062C231, + 0x4063C220, 0x40646A20, 0x00000003, 0x4062C232, 0x4063C220, 0x40646A20, + 0x00000003, 0x4062C221, 0x4063C220, 0x40647220, 0x00000003, 0x4062C222, + 0x4063C220, 0x40647220, 0x00000003, 0x4062C223, 0x4063C220, 0x40647220, + 0x00000003, 0x4062C221, 0x4063C220, 0x40648C20, 0x00000003, 0x4062C222, + 0x4063C220, 0x40648C20, 0x00000003, 0x4062C221, 0x4063C420, 0x40646A20, + 0x00000003, 0x4062C222, 0x4063C420, 0x40646A20, 0x00000003, 0x4062C223, + 0x4063C420, 0x40646A20, 0x00000003, 0x4062C224, 0x4063C420, 0x40646A20, + 0x00000003, 0x4062C225, 0x4063C420, 0x40646A20, 0x00000003, 0x4062C226, + 0x4063C420, 0x40646A20, 0x00000003, 0x4062C227, + // Block 516, offset 0x8100 + 0x4063C420, 0x40646A20, 0x00000003, 0x4062C228, 0x4063C420, 0x40646A20, + 0x00000003, 0x4062C229, 0x4063C420, 0x40646A20, 0x00000003, 0x4062C22A, + 0x4063C420, 0x40646A20, 0x00000003, 0x4062C22B, 0x4063C420, 0x40646A20, + 0x00000003, 0x4062C22C, 0x4063C420, 0x40646A20, 0x00000003, 0x4062C22D, + 0x4063C420, 0x40646A20, 0x00000003, 0x4062C22E, 0x4063C420, 0x40646A20, + 0x00000003, 0x4062C22F, 0x4063C420, 0x40646A20, 0x00000003, 0x4062C230, + 0x4063C420, 0x40646A20, 0x00000003, 0x4062C231, 0x4063C420, 0x40646A20, + 0x00000003, 0x4062C232, 0x4063C420, 0x40646A20, 0x00000003, 0x4062C233, + 0x4063C420, 0x40646A20, 0x00000003, 0x4062C234, 0x4063C420, 0x40646A20, + 0x00000003, 0x4062C235, 0x4063C420, 0x40646A20, 0x00000003, 0x4062C236, + 0x4063C420, 0x40646A20, 0x00000003, 0x4062C237, + // Block 517, offset 0x8140 + 0x4063C420, 0x40646A20, 0x00000003, 0x4062C238, 0x4063C420, 0x40646A20, + 0x00000003, 0x4062C239, 0x4063C420, 0x40646A20, 0x00000003, 0x4062C23A, + 0x4063C420, 0x40646A20, 0x00000003, 0x4062C23B, 0x4063C420, 0x40646A20, + 0x00000003, 0x4062C23C, 0x4063C420, 0x40646A20, 0x00000003, 0x4062C23D, + 0x4063C420, 0x40646A20, 0x00000003, 0x4062C23E, 0x4063C420, 0x40646A20, + 0x00000003, 0x4062C23F, 0x4063C420, 0x40646A20, 0x00000003, 0x4062C240, + 0x4063C420, 0x40646A20, 0x00000003, 0x4062C241, 0x4063C420, 0x40646A20, + 0x00000003, 0x4062C242, 0x4063C420, 0x40646A20, 0x00000003, 0x4062C243, + 0x4063C420, 0x40646A20, 0x00000003, 0x4062C244, 0x4063C420, 0x40646A20, + 0x00000003, 0x4062C245, 0x4063C420, 0x40646A20, 0x00000003, 0x4062C246, + 0x4063C420, 0x40646A20, 0x00000003, 0x4062C247, + // Block 518, offset 0x8180 + 0x4063C420, 0x40646A20, 0x00000003, 0x4062C248, 0x4063C420, 0x40646A20, + 0x00000003, 0x4062C221, 0x4063C420, 0x40647220, 0x00000003, 0x4062C222, + 0x4063C420, 0x40647220, 0x00000003, 0x4062C223, 0x4063C420, 0x40647220, + 0x00000003, 0x4062C224, 0x4063C420, 0x40647220, 0x00000003, 0x4062C225, + 0x4063C420, 0x40647220, 0x00000002, 0x4062C221, 0x4063C820, 0x00000002, + 0x4062C222, 0x4063C820, 0x00000002, 0x4062C223, 0x4063C820, 0x00000002, + 0x4062C224, 0x4063C820, 0x00000002, 0x4062C225, 0x4063C820, 0x00000002, + 0x4062C226, 0x4063C820, 0x00000002, 0x4062C227, 0x4063C820, 0x00000002, + 0x4062C228, 0x4063C820, 0x00000002, 0x4062C229, 0x4063C820, 0x00000002, + 0x4062C22A, 0x4063C820, 0x00000002, 0x4062C22B, 0x4063C820, 0x00000002, + 0x4062C22C, 0x4063C820, 0x00000002, 0x4062C22D, + // Block 519, offset 0x81c0 + 0x4063C820, 0x00000002, 0x4062C22E, 0x4063C820, 0x00000002, 0x4062C22F, + 0x4063C820, 0x00000002, 0x4062C230, 0x4063C820, 0x00000002, 0x4062C231, + 0x4063C820, 0x00000002, 0x4062C232, 0x4063C820, 0x00000002, 0x4062C233, + 0x4063C820, 0x00000002, 0x4062C234, 0x4063C820, 0x00000002, 0x4062C235, + 0x4063C820, 0x00000002, 0x4062C236, 0x4063C820, 0x00000002, 0x4062C237, + 0x4063C820, 0x00000002, 0x4062C238, 0x4063C820, 0x00000002, 0x4062C239, + 0x4063C820, 0x00000002, 0x4062C23A, 0x4063C820, 0x00000002, 0x4062C23B, + 0x4063C820, 0x00000002, 0x4062C23C, 0x4063C820, 0x00000002, 0x4062C23D, + 0x4063C820, 0x00000002, 0x4062C23E, 0x4063C820, 0x00000002, 0x4062C23F, + 0x4063C820, 0x00000002, 0x4062C240, 0x4063C820, 0x00000002, 0x4062C241, + 0x4063C820, 0x00000002, 0x4062C242, 0x4063C820, + // Block 520, offset 0x8200 + 0x00000002, 0x4062C243, 0x4063C820, 0x00000002, 0x4062C244, 0x4063C820, + 0x00000002, 0x4062C245, 0x4063C820, 0x00000002, 0x4062C246, 0x4063C820, + 0x00000002, 0x4062C247, 0x4063C820, 0x00000002, 0x4062C221, 0x4063CA20, + 0x00000002, 0x4062C222, 0x4063CA20, 0x00000002, 0x4062C223, 0x4063CA20, + 0x00000002, 0x4062C224, 0x4063CA20, 0x00000002, 0x4062C225, 0x4063CA20, + 0x00000002, 0x4062C226, 0x4063CA20, 0x00000002, 0x4062C227, 0x4063CA20, + 0x00000002, 0x4062C228, 0x4063CA20, 0x00000002, 0x4062C229, 0x4063CA20, + 0x00000002, 0x4062C22A, 0x4063CA20, 0x00000002, 0x4062C22B, 0x4063CA20, + 0x00000002, 0x4062C22C, 0x4063CA20, 0x00000002, 0x4062C22D, 0x4063CA20, + 0x00000002, 0x4062C22E, 0x4063CA20, 0x00000002, 0x4062C22F, 0x4063CA20, + 0x00000002, 0x4062C230, 0x4063CA20, 0x00000002, + // Block 521, offset 0x8240 + 0x4062C231, 0x4063CA20, 0x00000002, 0x4062C232, 0x4063CA20, 0x00000002, + 0x4062C233, 0x4063CA20, 0x00000002, 0x4062C234, 0x4063CA20, 0x00000002, + 0x4062C235, 0x4063CA20, 0x00000002, 0x4062C236, 0x4063CA20, 0x00000002, + 0x4062C237, 0x4063CA20, 0x00000002, 0x4062C238, 0x4063CA20, 0x00000002, + 0x4062C239, 0x4063CA20, 0x00000002, 0x4062C23A, 0x4063CA20, 0x00000002, + 0x4062C23B, 0x4063CA20, 0x00000002, 0x4062C23C, 0x4063CA20, 0x00000002, + 0x4062C23D, 0x4063CA20, 0x00000002, 0x4062C23E, 0x4063CA20, 0x00000002, + 0x4062C23F, 0x4063CA20, 0x00000002, 0x4062C240, 0x4063CA20, 0x00000002, + 0x4062C241, 0x4063CA20, 0x00000002, 0x4062C242, 0x4063CA20, 0x00000002, + 0x4062C243, 0x4063CA20, 0x00000002, 0x4062C244, 0x4063CA20, 0x00000002, + 0x4062C245, 0x4063CA20, 0x00000002, 0x4062C246, + // Block 522, offset 0x8280 + 0x4063CA20, 0x00000002, 0x4062C247, 0x4063CA20, 0x00000002, 0x4062C248, + 0x4063CA20, 0x00000002, 0x4062C249, 0x4063CA20, 0x00000002, 0x4062C24A, + 0x4063CA20, 0x00000002, 0x4062C24B, 0x4063CA20, 0x00000002, 0x4062C24C, + 0x4063CA20, 0x00000002, 0x4062C24D, 0x4063CA20, 0x00000002, 0x4062C24E, + 0x4063CA20, 0x00000002, 0x4062C24F, 0x4063CA20, 0x00000002, 0x4062C250, + 0x4063CA20, 0x00000002, 0x4062C251, 0x4063CA20, 0x00000002, 0x4062C252, + 0x4063CA20, 0x00000002, 0x4062C253, 0x4063CA20, 0x00000002, 0x4062C254, + 0x4063CA20, 0x00000002, 0x4062C255, 0x4063CA20, 0x00000002, 0x4062C256, + 0x4063CA20, 0x00000002, 0x4062C257, 0x4063CA20, 0x00000002, 0x4062C258, + 0x4063CA20, 0x00000002, 0x4062C259, 0x4063CA20, 0x00000002, 0x4062C25A, + 0x4063CA20, 0x00000002, 0x4062C25B, 0x4063CA20, + // Block 523, offset 0x82c0 + 0x00000002, 0x4062C25C, 0x4063CA20, 0x00000002, 0x4062C25D, 0x4063CA20, + 0x00000002, 0x4062C25E, 0x4063CA20, 0x00000002, 0x4062C25F, 0x4063CA20, + 0x00000002, 0x4062C260, 0x4063CA20, 0x00000002, 0x4062C261, 0x4063CA20, + 0x00000002, 0x4062C262, 0x4063CA20, 0x00000002, 0x4062C263, 0x4063CA20, + 0x00000002, 0x4062C264, 0x4063CA20, 0x00000002, 0x4062C265, 0x4063CA20, + 0x00000002, 0x4062C266, 0x4063CA20, 0x00000002, 0x4062C267, 0x4063CA20, + 0x00000002, 0x4062C268, 0x4063CA20, 0x00000002, 0x4062C269, 0x4063CA20, + 0x00000002, 0x4062C26A, 0x4063CA20, 0x00000002, 0x4062C26B, 0x4063CA20, + 0x00000002, 0x4062C26C, 0x4063CA20, 0x00000002, 0x4062C26D, 0x4063CA20, + 0x00000003, 0x4062C221, 0x4063CA20, 0x40646420, 0x00000003, 0x4062C222, + 0x4063CA20, 0x40646420, 0x00000003, 0x4062C223, + // Block 524, offset 0x8300 + 0x4063CA20, 0x40646420, 0x00000003, 0x4062C224, 0x4063CA20, 0x40646420, + 0x00000003, 0x4062C225, 0x4063CA20, 0x40646420, 0x00000003, 0x4062C221, + 0x4063CA20, 0x40646A20, 0x00000003, 0x4062C222, 0x4063CA20, 0x40646A20, + 0x00000003, 0x4062C223, 0x4063CA20, 0x40646A20, 0x00000003, 0x4062C224, + 0x4063CA20, 0x40646A20, 0x00000003, 0x4062C225, 0x4063CA20, 0x40646A20, + 0x00000003, 0x4062C226, 0x4063CA20, 0x40646A20, 0x00000003, 0x4062C227, + 0x4063CA20, 0x40646A20, 0x00000003, 0x4062C228, 0x4063CA20, 0x40646A20, + 0x00000003, 0x4062C229, 0x4063CA20, 0x40646A20, 0x00000003, 0x4062C22A, + 0x4063CA20, 0x40646A20, 0x00000003, 0x4062C22B, 0x4063CA20, 0x40646A20, + 0x00000003, 0x4062C221, 0x4063CA20, 0x40647220, 0x00000003, 0x4062C222, + 0x4063CA20, 0x40647220, 0x00000003, 0x4062C223, + // Block 525, offset 0x8340 + 0x4063CA20, 0x40647220, 0x00000003, 0x4062C221, 0x4063CA20, 0x40648C20, + 0x00000003, 0x4062C222, 0x4063CA20, 0x40648C20, 0x00000003, 0x4062C223, + 0x4063CA20, 0x40648C20, 0x00000003, 0x4062C224, 0x4063CA20, 0x40648C20, + 0x00000003, 0x4062C225, 0x4063CA20, 0x40648C20, 0x00000003, 0x4062C221, + 0x4063CC20, 0x40646A20, 0x00000003, 0x4062C222, 0x4063CC20, 0x40646A20, + 0x00000003, 0x4062C223, 0x4063CC20, 0x40646A20, 0x00000003, 0x4062C224, + 0x4063CC20, 0x40646A20, 0x00000003, 0x4062C225, 0x4063CC20, 0x40646A20, + 0x00000003, 0x4062C226, 0x4063CC20, 0x40646A20, 0x00000003, 0x4062C227, + 0x4063CC20, 0x40646A20, 0x00000003, 0x4062C228, 0x4063CC20, 0x40646A20, + 0x00000003, 0x4062C229, 0x4063CC20, 0x40646A20, 0x00000003, 0x4062C22A, + 0x4063CC20, 0x40646A20, 0x00000003, 0x4062C22B, + // Block 526, offset 0x8380 + 0x4063CC20, 0x40646A20, 0x00000003, 0x4062C22C, 0x4063CC20, 0x40646A20, + 0x00000003, 0x4062C22D, 0x4063CC20, 0x40646A20, 0x00000003, 0x4062C22E, + 0x4063CC20, 0x40646A20, 0x00000003, 0x4062C22F, 0x4063CC20, 0x40646A20, + 0x00000003, 0x4062C230, 0x4063CC20, 0x40646A20, 0x00000003, 0x4062C231, + 0x4063CC20, 0x40646A20, 0x00000003, 0x4062C232, 0x4063CC20, 0x40646A20, + 0x00000003, 0x4062C233, 0x4063CC20, 0x40646A20, 0x00000003, 0x4062C234, + 0x4063CC20, 0x40646A20, 0x00000003, 0x4062C221, 0x4063CC20, 0x40647220, + 0x00000003, 0x4062C222, 0x4063CC20, 0x40647220, 0x00000003, 0x4062C221, + 0x4063CC20, 0x40648220, 0x00000003, 0x4062C222, 0x4063CC20, 0x40648220, + 0x00000003, 0x4062C223, 0x4063CC20, 0x40648220, 0x00000003, 0x4062C224, + 0x4063CC20, 0x40648220, 0x00000003, 0x4062C225, + // Block 527, offset 0x83c0 + 0x4063CC20, 0x40648220, 0x00000003, 0x4062C226, 0x4063CC20, 0x40648220, + 0x00000003, 0x4062C227, 0x4063CC20, 0x40648220, 0x00000003, 0x4062C228, + 0x4063CC20, 0x40648220, 0x00000003, 0x4062C229, 0x4063CC20, 0x40648220, + 0x00000003, 0x4062C22A, 0x4063CC20, 0x40648220, 0x00000003, 0x4062C22B, + 0x4063CC20, 0x40648220, 0x00000003, 0x4062C221, 0x4063CC20, 0x40648420, + 0x00000003, 0x4062C222, 0x4063CC20, 0x40648420, 0x00000003, 0x4062C223, + 0x4063CC20, 0x40648420, 0x00000003, 0x4062C224, 0x4063CC20, 0x40648420, + 0x00000003, 0x4062C225, 0x4063CC20, 0x40648420, 0x00000003, 0x4062C226, + 0x4063CC20, 0x40648420, 0x00000003, 0x4062C221, 0x4063CC20, 0x40648C20, + 0x00000003, 0x4062C222, 0x4063CC20, 0x40648C20, 0x00000003, 0x4062C223, + 0x4063CC20, 0x40648C20, 0x00000003, 0x4062C224, + // Block 528, offset 0x8400 + 0x4063CC20, 0x40648C20, 0x00000002, 0x4062C221, 0x4063CE20, 0x00000002, + 0x4062C222, 0x4063CE20, 0x00000002, 0x4062C223, 0x4063CE20, 0x00000002, + 0x4062C224, 0x4063CE20, 0x00000002, 0x4062C225, 0x4063CE20, 0x00000002, + 0x4062C226, 0x4063CE20, 0x00000002, 0x4062C227, 0x4063CE20, 0x00000002, + 0x4062C228, 0x4063CE20, 0x00000002, 0x4062C229, 0x4063CE20, 0x00000002, + 0x4062C22A, 0x4063CE20, 0x00000002, 0x4062C22B, 0x4063CE20, 0x00000002, + 0x4062C22C, 0x4063CE20, 0x00000002, 0x4062C22D, 0x4063CE20, 0x00000002, + 0x4062C22E, 0x4063CE20, 0x00000002, 0x4062C22F, 0x4063CE20, 0x00000002, + 0x4062C230, 0x4063CE20, 0x00000002, 0x4062C231, 0x4063CE20, 0x00000002, + 0x4062C232, 0x4063CE20, 0x00000002, 0x4062C233, 0x4063CE20, 0x00000002, + 0x4062C234, 0x4063CE20, 0x00000002, 0x4062C235, + // Block 529, offset 0x8440 + 0x4063CE20, 0x00000002, 0x4062C236, 0x4063CE20, 0x00000002, 0x4062C237, + 0x4063CE20, 0x00000002, 0x4062C238, 0x4063CE20, 0x00000002, 0x4062C239, + 0x4063CE20, 0x00000002, 0x4062C23A, 0x4063CE20, 0x00000002, 0x4062C23B, + 0x4063CE20, 0x00000002, 0x4062C23C, 0x4063CE20, 0x00000002, 0x4062C23D, + 0x4063CE20, 0x00000002, 0x4062C221, 0x4063D020, 0x00000002, 0x4062C222, + 0x4063D020, 0x00000002, 0x4062C223, 0x4063D020, 0x00000002, 0x4062C224, + 0x4063D020, 0x00000002, 0x4062C225, 0x4063D020, 0x00000002, 0x4062C226, + 0x4063D020, 0x00000002, 0x4062C227, 0x4063D020, 0x00000002, 0x4062C228, + 0x4063D020, 0x00000002, 0x4062C229, 0x4063D020, 0x00000002, 0x4062C22A, + 0x4063D020, 0x00000002, 0x4062C22B, 0x4063D020, 0x00000002, 0x4062C22C, + 0x4063D020, 0x00000002, 0x4062C22D, 0x4063D020, + // Block 530, offset 0x8480 + 0x00000002, 0x4062C22E, 0x4063D020, 0x00000002, 0x4062C22F, 0x4063D020, + 0x00000002, 0x4062C230, 0x4063D020, 0x00000002, 0x4062C231, 0x4063D020, + 0x00000002, 0x4062C232, 0x4063D020, 0x00000002, 0x4062C233, 0x4063D020, + 0x00000002, 0x4062C234, 0x4063D020, 0x00000002, 0x4062C235, 0x4063D020, + 0x00000002, 0x4062C236, 0x4063D020, 0x00000002, 0x4062C237, 0x4063D020, + 0x00000002, 0x4062C238, 0x4063D020, 0x00000002, 0x4062C239, 0x4063D020, + 0x00000002, 0x4062C23A, 0x4063D020, 0x00000002, 0x4062C23B, 0x4063D020, + 0x00000002, 0x4062C23C, 0x4063D020, 0x00000002, 0x4062C23D, 0x4063D020, + 0x00000002, 0x4062C23E, 0x4063D020, 0x00000002, 0x4062C23F, 0x4063D020, + 0x00000002, 0x4062C240, 0x4063D020, 0x00000002, 0x4062C241, 0x4063D020, + 0x00000002, 0x4062C242, 0x4063D020, 0x00000002, + // Block 531, offset 0x84c0 + 0x4062C243, 0x4063D020, 0x00000003, 0x4062C221, 0x4063D020, 0x40646420, + 0x00000003, 0x4062C222, 0x4063D020, 0x40646420, 0x00000003, 0x4062C223, + 0x4063D020, 0x40646420, 0x00000003, 0x4062C224, 0x4063D020, 0x40646420, + 0x00000003, 0x4062C225, 0x4063D020, 0x40646420, 0x00000003, 0x4062C226, + 0x4063D020, 0x40646420, 0x00000003, 0x4062C227, 0x4063D020, 0x40646420, + 0x00000003, 0x4062C228, 0x4063D020, 0x40646420, 0x00000003, 0x4062C229, + 0x4063D020, 0x40646420, 0x00000003, 0x4062C221, 0x4063D020, 0x40646A20, + 0x00000003, 0x4062C222, 0x4063D020, 0x40646A20, 0x00000003, 0x4062C223, + 0x4063D020, 0x40646A20, 0x00000003, 0x4062C224, 0x4063D020, 0x40646A20, + 0x00000003, 0x4062C225, 0x4063D020, 0x40646A20, 0x00000003, 0x4062C226, + 0x4063D020, 0x40646A20, 0x00000003, 0x4062C227, + // Block 532, offset 0x8500 + 0x4063D020, 0x40646A20, 0x00000003, 0x4062C228, 0x4063D020, 0x40646A20, + 0x00000003, 0x4062C229, 0x4063D020, 0x40646A20, 0x00000003, 0x4062C22A, + 0x4063D020, 0x40646A20, 0x00000003, 0x4062C22B, 0x4063D020, 0x40646A20, + 0x00000003, 0x4062C22C, 0x4063D020, 0x40646A20, 0x00000003, 0x4062C22D, + 0x4063D020, 0x40646A20, 0x00000003, 0x4062C22E, 0x4063D020, 0x40646A20, + 0x00000003, 0x4062C22F, 0x4063D020, 0x40646A20, 0x00000003, 0x4062C230, + 0x4063D020, 0x40646A20, 0x00000003, 0x4062C231, 0x4063D020, 0x40646A20, + 0x00000003, 0x4062C232, 0x4063D020, 0x40646A20, 0x00000003, 0x4062C233, + 0x4063D020, 0x40646A20, 0x00000003, 0x4062C234, 0x4063D020, 0x40646A20, + 0x00000003, 0x4062C235, 0x4063D020, 0x40646A20, 0x00000003, 0x4062C236, + 0x4063D020, 0x40646A20, 0x00000003, 0x4062C237, + // Block 533, offset 0x8540 + 0x4063D020, 0x40646A20, 0x00000003, 0x4062C238, 0x4063D020, 0x40646A20, + 0x00000003, 0x4062C239, 0x4063D020, 0x40646A20, 0x00000003, 0x4062C23A, + 0x4063D020, 0x40646A20, 0x00000003, 0x4062C23B, 0x4063D020, 0x40646A20, + 0x00000003, 0x4062C23C, 0x4063D020, 0x40646A20, 0x00000003, 0x4062C221, + 0x4063D020, 0x40647220, 0x00000003, 0x4062C222, 0x4063D020, 0x40647220, + 0x00000003, 0x4062C223, 0x4063D020, 0x40647220, 0x00000003, 0x4062C224, + 0x4063D020, 0x40647220, 0x00000003, 0x4062C225, 0x4063D020, 0x40647220, + 0x00000003, 0x4062C226, 0x4063D020, 0x40647220, 0x00000003, 0x4062C227, + 0x4063D020, 0x40647220, 0x00000003, 0x4062C228, 0x4063D020, 0x40647220, + 0x00000003, 0x4062C229, 0x4063D020, 0x40647220, 0x00000003, 0x4062C22A, + 0x4063D020, 0x40647220, 0x00000003, 0x4062C22B, + // Block 534, offset 0x8580 + 0x4063D020, 0x40647220, 0x00000003, 0x4062C221, 0x4063D020, 0x40648220, + 0x00000003, 0x4062C222, 0x4063D020, 0x40648220, 0x00000003, 0x4062C223, + 0x4063D020, 0x40648220, 0x00000003, 0x4062C224, 0x4063D020, 0x40648220, + 0x00000003, 0x4062C225, 0x4063D020, 0x40648220, 0x00000003, 0x4062C226, + 0x4063D020, 0x40648220, 0x00000003, 0x4062C227, 0x4063D020, 0x40648220, + 0x00000003, 0x4062C228, 0x4063D020, 0x40648220, 0x00000003, 0x4062C229, + 0x4063D020, 0x40648220, 0x00000003, 0x4062C22A, 0x4063D020, 0x40648220, + 0x00000003, 0x4062C22B, 0x4063D020, 0x40648220, 0x00000003, 0x4062C22C, + 0x4063D020, 0x40648220, 0x00000003, 0x4062C221, 0x4063D020, 0x40648420, + 0x00000003, 0x4062C222, 0x4063D020, 0x40648420, 0x00000003, 0x4062C223, + 0x4063D020, 0x40648420, 0x00000003, 0x4062C221, + // Block 535, offset 0x85c0 + 0x4063D020, 0x40648C20, 0x00000003, 0x4062C222, 0x4063D020, 0x40648C20, + 0x00000003, 0x4062C223, 0x4063D020, 0x40648C20, 0x00000003, 0x4062C224, + 0x4063D020, 0x40648C20, 0x00000003, 0x4062C225, 0x4063D020, 0x40648C20, + 0x00000002, 0x4062C421, 0x4063A820, 0x00000002, 0x4062C422, 0x4063A820, + 0x00000002, 0x4062C423, 0x4063A820, 0x00000002, 0x4062C424, 0x4063A820, + 0x00000002, 0x4062C425, 0x4063A820, 0x00000002, 0x4062C426, 0x4063A820, + 0x00000002, 0x4062C427, 0x4063A820, 0x00000002, 0x4062C428, 0x4063A820, + 0x00000002, 0x4062C429, 0x4063A820, 0x00000002, 0x4062C42A, 0x4063A820, + 0x00000002, 0x4062C42B, 0x4063A820, 0x00000002, 0x4062C42C, 0x4063A820, + 0x00000002, 0x4062C42D, 0x4063A820, 0x00000002, 0x4062C42E, 0x4063A820, + 0x00000002, 0x4062C42F, 0x4063A820, 0x00000002, + // Block 536, offset 0x8600 + 0x4062C430, 0x4063A820, 0x00000002, 0x4062C431, 0x4063A820, 0x00000002, + 0x4062C432, 0x4063A820, 0x00000002, 0x4062C433, 0x4063A820, 0x00000002, + 0x4062C434, 0x4063A820, 0x00000002, 0x4062C435, 0x4063A820, 0x00000002, + 0x4062C436, 0x4063A820, 0x00000002, 0x4062C437, 0x4063A820, 0x00000002, + 0x4062C438, 0x4063A820, 0x00000002, 0x4062C439, 0x4063A820, 0x00000002, + 0x4062C43A, 0x4063A820, 0x00000002, 0x4062C43B, 0x4063A820, 0x00000002, + 0x4062C43C, 0x4063A820, 0x00000002, 0x4062C43D, 0x4063A820, 0x00000002, + 0x4062C43E, 0x4063A820, 0x00000002, 0x4062C43F, 0x4063A820, 0x00000002, + 0x4062C440, 0x4063A820, 0x00000002, 0x4062C441, 0x4063A820, 0x00000002, + 0x4062C442, 0x4063A820, 0x00000002, 0x4062C443, 0x4063A820, 0x00000002, + 0x4062C444, 0x4063A820, 0x00000002, 0x4062C445, + // Block 537, offset 0x8640 + 0x4063A820, 0x00000002, 0x4062C446, 0x4063A820, 0x00000002, 0x4062C447, + 0x4063A820, 0x00000002, 0x4062C448, 0x4063A820, 0x00000002, 0x4062C449, + 0x4063A820, 0x00000002, 0x4062C44A, 0x4063A820, 0x00000002, 0x4062C44B, + 0x4063A820, 0x00000002, 0x4062C44C, 0x4063A820, 0x00000002, 0x4062C44D, + 0x4063A820, 0x00000002, 0x4062C44E, 0x4063A820, 0x00000002, 0x4062C44F, + 0x4063A820, 0x00000002, 0x4062C450, 0x4063A820, 0x00000002, 0x4062C451, + 0x4063A820, 0x00000002, 0x4062C452, 0x4063A820, 0x00000002, 0x4062C453, + 0x4063A820, 0x00000002, 0x4062C454, 0x4063A820, 0x00000003, 0x4062C421, + 0x4063A820, 0x40646420, 0x00000003, 0x4062C422, 0x4063A820, 0x40646420, + 0x00000003, 0x4062C423, 0x4063A820, 0x40646420, 0x00000003, 0x4062C424, + 0x4063A820, 0x40646420, 0x00000003, 0x4062C425, + // Block 538, offset 0x8680 + 0x4063A820, 0x40646420, 0x00000003, 0x4062C426, 0x4063A820, 0x40646420, + 0x00000003, 0x4062C427, 0x4063A820, 0x40646420, 0x00000003, 0x4062C428, + 0x4063A820, 0x40646420, 0x00000003, 0x4062C429, 0x4063A820, 0x40646420, + 0x00000003, 0x4062C42A, 0x4063A820, 0x40646420, 0x00000003, 0x4062C42B, + 0x4063A820, 0x40646420, 0x00000003, 0x4062C42C, 0x4063A820, 0x40646420, + 0x00000003, 0x4062C42D, 0x4063A820, 0x40646420, 0x00000003, 0x4062C42E, + 0x4063A820, 0x40646420, 0x00000003, 0x4062C42F, 0x4063A820, 0x40646420, + 0x00000003, 0x4062C430, 0x4063A820, 0x40646420, 0x00000003, 0x4062C431, + 0x4063A820, 0x40646420, 0x00000003, 0x4062C432, 0x4063A820, 0x40646420, + 0x00000003, 0x4062C433, 0x4063A820, 0x40646420, 0x00000003, 0x4062C434, + 0x4063A820, 0x40646420, 0x00000003, 0x4062C435, + // Block 539, offset 0x86c0 + 0x4063A820, 0x40646420, 0x00000003, 0x4062C421, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062C422, 0x4063A820, 0x40646A20, 0x00000003, 0x4062C423, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062C424, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062C425, 0x4063A820, 0x40646A20, 0x00000003, 0x4062C426, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062C427, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062C428, 0x4063A820, 0x40646A20, 0x00000003, 0x4062C421, + 0x4063A820, 0x40648220, 0x00000003, 0x4062C422, 0x4063A820, 0x40648220, + 0x00000003, 0x4062C423, 0x4063A820, 0x40648220, 0x00000003, 0x4062C424, + 0x4063A820, 0x40648220, 0x00000003, 0x4062C425, 0x4063A820, 0x40648220, + 0x00000003, 0x4062C426, 0x4063A820, 0x40648220, 0x00000003, 0x4062C427, + 0x4063A820, 0x40648220, 0x00000003, 0x4062C428, + // Block 540, offset 0x8700 + 0x4063A820, 0x40648220, 0x00000003, 0x4062C429, 0x4063A820, 0x40648220, + 0x00000003, 0x4062C421, 0x4063A820, 0x40648420, 0x00000003, 0x4062C422, + 0x4063A820, 0x40648420, 0x00000003, 0x4062C423, 0x4063A820, 0x40648420, + 0x00000003, 0x4062C424, 0x4063A820, 0x40648420, 0x00000003, 0x4062C425, + 0x4063A820, 0x40648420, 0x00000003, 0x4062C426, 0x4063A820, 0x40648420, + 0x00000003, 0x4062C421, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C422, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062C423, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062C424, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C425, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062C426, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062C427, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C428, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062C429, + // Block 541, offset 0x8740 + 0x4063A820, 0x40648C20, 0x00000003, 0x4062C42A, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062C42B, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C42C, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062C42D, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062C42E, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C42F, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062C430, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062C431, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C432, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062C433, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062C434, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C435, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062C436, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062C437, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C438, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062C439, + // Block 542, offset 0x8780 + 0x4063A820, 0x40648C20, 0x00000003, 0x4062C43A, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062C43B, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C43C, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062C43D, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062C43E, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C43F, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062C440, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062C441, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C442, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062C443, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062C444, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C445, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062C446, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062C447, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C448, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062C449, + // Block 543, offset 0x87c0 + 0x4063A820, 0x40648C20, 0x00000003, 0x4062C44A, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062C44B, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C44C, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062C44D, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062C44E, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C44F, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062C450, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062C451, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C452, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062C453, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062C454, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C455, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062C456, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062C457, 0x4063A820, 0x40648C20, 0x00000002, 0x4062C421, + 0x4063AA20, 0x00000002, 0x4062C422, 0x4063AA20, + // Block 544, offset 0x8800 + 0x00000002, 0x4062C423, 0x4063AA20, 0x00000002, 0x4062C424, 0x4063AA20, + 0x00000002, 0x4062C425, 0x4063AA20, 0x00000002, 0x4062C426, 0x4063AA20, + 0x00000002, 0x4062C427, 0x4063AA20, 0x00000002, 0x4062C428, 0x4063AA20, + 0x00000002, 0x4062C429, 0x4063AA20, 0x00000002, 0x4062C42A, 0x4063AA20, + 0x00000002, 0x4062C42B, 0x4063AA20, 0x00000002, 0x4062C42C, 0x4063AA20, + 0x00000002, 0x4062C42D, 0x4063AA20, 0x00000002, 0x4062C42E, 0x4063AA20, + 0x00000002, 0x4062C42F, 0x4063AA20, 0x00000002, 0x4062C430, 0x4063AA20, + 0x00000002, 0x4062C431, 0x4063AA20, 0x00000002, 0x4062C432, 0x4063AA20, + 0x00000002, 0x4062C433, 0x4063AA20, 0x00000002, 0x4062C434, 0x4063AA20, + 0x00000002, 0x4062C435, 0x4063AA20, 0x00000002, 0x4062C436, 0x4063AA20, + 0x00000002, 0x4062C437, 0x4063AA20, 0x00000003, + // Block 545, offset 0x8840 + 0x4062C421, 0x4063AA20, 0x40648C20, 0x00000003, 0x4062C422, 0x4063AA20, + 0x40648C20, 0x00000003, 0x4062C423, 0x4063AA20, 0x40648C20, 0x00000003, + 0x4062C424, 0x4063AA20, 0x40648C20, 0x00000003, 0x4062C425, 0x4063AA20, + 0x40648C20, 0x00000003, 0x4062C426, 0x4063AA20, 0x40648C20, 0x00000003, + 0x4062C427, 0x4063AA20, 0x40648C20, 0x00000003, 0x4062C428, 0x4063AA20, + 0x40648C20, 0x00000002, 0x4062C421, 0x4063B020, 0x00000002, 0x4062C422, + 0x4063B020, 0x00000002, 0x4062C423, 0x4063B020, 0x00000002, 0x4062C424, + 0x4063B020, 0x00000002, 0x4062C425, 0x4063B020, 0x00000002, 0x4062C426, + 0x4063B020, 0x00000002, 0x4062C427, 0x4063B020, 0x00000002, 0x4062C428, + 0x4063B020, 0x00000002, 0x4062C429, 0x4063B020, 0x00000002, 0x4062C42A, + 0x4063B020, 0x00000002, 0x4062C42B, 0x4063B020, + // Block 546, offset 0x8880 + 0x00000002, 0x4062C42C, 0x4063B020, 0x00000002, 0x4062C42D, 0x4063B020, + 0x00000002, 0x4062C42E, 0x4063B020, 0x00000002, 0x4062C42F, 0x4063B020, + 0x00000002, 0x4062C430, 0x4063B020, 0x00000002, 0x4062C431, 0x4063B020, + 0x00000002, 0x4062C432, 0x4063B020, 0x00000002, 0x4062C433, 0x4063B020, + 0x00000002, 0x4062C434, 0x4063B020, 0x00000002, 0x4062C435, 0x4063B020, + 0x00000002, 0x4062C436, 0x4063B020, 0x00000002, 0x4062C437, 0x4063B020, + 0x00000002, 0x4062C438, 0x4063B020, 0x00000002, 0x4062C439, 0x4063B020, + 0x00000002, 0x4062C43A, 0x4063B020, 0x00000002, 0x4062C43B, 0x4063B020, + 0x00000002, 0x4062C43C, 0x4063B020, 0x00000002, 0x4062C43D, 0x4063B020, + 0x00000002, 0x4062C43E, 0x4063B020, 0x00000002, 0x4062C43F, 0x4063B020, + 0x00000002, 0x4062C440, 0x4063B020, 0x00000002, + // Block 547, offset 0x88c0 + 0x4062C441, 0x4063B020, 0x00000002, 0x4062C442, 0x4063B020, 0x00000002, + 0x4062C443, 0x4063B020, 0x00000002, 0x4062C444, 0x4063B020, 0x00000002, + 0x4062C445, 0x4063B020, 0x00000002, 0x4062C446, 0x4063B020, 0x00000002, + 0x4062C447, 0x4063B020, 0x00000002, 0x4062C448, 0x4063B020, 0x00000002, + 0x4062C449, 0x4063B020, 0x00000002, 0x4062C44A, 0x4063B020, 0x00000002, + 0x4062C44B, 0x4063B020, 0x00000002, 0x4062C44C, 0x4063B020, 0x00000002, + 0x4062C44D, 0x4063B020, 0x00000002, 0x4062C44E, 0x4063B020, 0x00000003, + 0x4062C421, 0x4063B020, 0x40646420, 0x00000003, 0x4062C422, 0x4063B020, + 0x40646420, 0x00000003, 0x4062C423, 0x4063B020, 0x40646420, 0x00000003, + 0x4062C424, 0x4063B020, 0x40646420, 0x00000003, 0x4062C425, 0x4063B020, + 0x40646420, 0x00000003, 0x4062C426, 0x4063B020, + // Block 548, offset 0x8900 + 0x40646420, 0x00000003, 0x4062C427, 0x4063B020, 0x40646420, 0x00000003, + 0x4062C428, 0x4063B020, 0x40646420, 0x00000003, 0x4062C429, 0x4063B020, + 0x40646420, 0x00000003, 0x4062C42A, 0x4063B020, 0x40646420, 0x00000003, + 0x4062C42B, 0x4063B020, 0x40646420, 0x00000003, 0x4062C42C, 0x4063B020, + 0x40646420, 0x00000003, 0x4062C42D, 0x4063B020, 0x40646420, 0x00000003, + 0x4062C42E, 0x4063B020, 0x40646420, 0x00000003, 0x4062C42F, 0x4063B020, + 0x40646420, 0x00000003, 0x4062C430, 0x4063B020, 0x40646420, 0x00000003, + 0x4062C431, 0x4063B020, 0x40646420, 0x00000003, 0x4062C432, 0x4063B020, + 0x40646420, 0x00000003, 0x4062C433, 0x4063B020, 0x40646420, 0x00000003, + 0x4062C434, 0x4063B020, 0x40646420, 0x00000003, 0x4062C435, 0x4063B020, + 0x40646420, 0x00000003, 0x4062C436, 0x4063B020, + // Block 549, offset 0x8940 + 0x40646420, 0x00000003, 0x4062C437, 0x4063B020, 0x40646420, 0x00000003, + 0x4062C438, 0x4063B020, 0x40646420, 0x00000003, 0x4062C439, 0x4063B020, + 0x40646420, 0x00000003, 0x4062C43A, 0x4063B020, 0x40646420, 0x00000003, + 0x4062C43B, 0x4063B020, 0x40646420, 0x00000003, 0x4062C43C, 0x4063B020, + 0x40646420, 0x00000003, 0x4062C43D, 0x4063B020, 0x40646420, 0x00000003, + 0x4062C43E, 0x4063B020, 0x40646420, 0x00000003, 0x4062C43F, 0x4063B020, + 0x40646420, 0x00000003, 0x4062C421, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062C422, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C423, 0x4063B020, + 0x40646A20, 0x00000003, 0x4062C424, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062C425, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C426, 0x4063B020, + 0x40646A20, 0x00000003, 0x4062C427, 0x4063B020, + // Block 550, offset 0x8980 + 0x40646A20, 0x00000003, 0x4062C428, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062C429, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C42A, 0x4063B020, + 0x40646A20, 0x00000003, 0x4062C42B, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062C42C, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C42D, 0x4063B020, + 0x40646A20, 0x00000003, 0x4062C42E, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062C42F, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C430, 0x4063B020, + 0x40646A20, 0x00000003, 0x4062C431, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062C432, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C433, 0x4063B020, + 0x40646A20, 0x00000003, 0x4062C434, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062C435, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C436, 0x4063B020, + 0x40646A20, 0x00000003, 0x4062C437, 0x4063B020, + // Block 551, offset 0x89c0 + 0x40646A20, 0x00000003, 0x4062C438, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062C439, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C43A, 0x4063B020, + 0x40646A20, 0x00000003, 0x4062C43B, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062C43C, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C43D, 0x4063B020, + 0x40646A20, 0x00000003, 0x4062C43E, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062C43F, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C440, 0x4063B020, + 0x40646A20, 0x00000003, 0x4062C441, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062C442, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C443, 0x4063B020, + 0x40646A20, 0x00000003, 0x4062C444, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062C445, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C446, 0x4063B020, + 0x40646A20, 0x00000003, 0x4062C447, 0x4063B020, + // Block 552, offset 0x8a00 + 0x40646A20, 0x00000003, 0x4062C448, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062C449, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C44A, 0x4063B020, + 0x40646A20, 0x00000003, 0x4062C44B, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062C44C, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C44D, 0x4063B020, + 0x40646A20, 0x00000003, 0x4062C44E, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062C44F, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C450, 0x4063B020, + 0x40646A20, 0x00000003, 0x4062C451, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062C452, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C453, 0x4063B020, + 0x40646A20, 0x00000003, 0x4062C454, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062C455, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C456, 0x4063B020, + 0x40646A20, 0x00000003, 0x4062C457, 0x4063B020, + // Block 553, offset 0x8a40 + 0x40646A20, 0x00000003, 0x4062C458, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062C459, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C45A, 0x4063B020, + 0x40646A20, 0x00000003, 0x4062C45B, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062C45C, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C45D, 0x4063B020, + 0x40646A20, 0x00000003, 0x4062C45E, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062C45F, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C460, 0x4063B020, + 0x40646A20, 0x00000003, 0x4062C461, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062C462, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C463, 0x4063B020, + 0x40646A20, 0x00000003, 0x4062C464, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062C465, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C466, 0x4063B020, + 0x40646A20, 0x00000003, 0x4062C467, 0x4063B020, + // Block 554, offset 0x8a80 + 0x40646A20, 0x00000003, 0x4062C468, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062C469, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C46A, 0x4063B020, + 0x40646A20, 0x00000003, 0x4062C46B, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062C46C, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C46D, 0x4063B020, + 0x40646A20, 0x00000003, 0x4062C46E, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062C46F, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C470, 0x4063B020, + 0x40646A20, 0x00000003, 0x4062C471, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062C421, 0x4063B020, 0x40647220, 0x00000003, 0x4062C422, 0x4063B020, + 0x40647220, 0x00000003, 0x4062C423, 0x4063B020, 0x40647220, 0x00000003, + 0x4062C424, 0x4063B020, 0x40647220, 0x00000003, 0x4062C425, 0x4063B020, + 0x40647220, 0x00000003, 0x4062C426, 0x4063B020, + // Block 555, offset 0x8ac0 + 0x40647220, 0x00000003, 0x4062C427, 0x4063B020, 0x40647220, 0x00000003, + 0x4062C428, 0x4063B020, 0x40647220, 0x00000003, 0x4062C429, 0x4063B020, + 0x40647220, 0x00000003, 0x4062C42A, 0x4063B020, 0x40647220, 0x00000003, + 0x4062C42B, 0x4063B020, 0x40647220, 0x00000003, 0x4062C421, 0x4063B020, + 0x40648220, 0x00000003, 0x4062C422, 0x4063B020, 0x40648220, 0x00000003, + 0x4062C423, 0x4063B020, 0x40648220, 0x00000003, 0x4062C424, 0x4063B020, + 0x40648220, 0x00000003, 0x4062C425, 0x4063B020, 0x40648220, 0x00000003, + 0x4062C426, 0x4063B020, 0x40648220, 0x00000003, 0x4062C427, 0x4063B020, + 0x40648220, 0x00000003, 0x4062C428, 0x4063B020, 0x40648220, 0x00000003, + 0x4062C429, 0x4063B020, 0x40648220, 0x00000003, 0x4062C42A, 0x4063B020, + 0x40648220, 0x00000003, 0x4062C42B, 0x4063B020, + // Block 556, offset 0x8b00 + 0x40648220, 0x00000003, 0x4062C42C, 0x4063B020, 0x40648220, 0x00000003, + 0x4062C42D, 0x4063B020, 0x40648220, 0x00000003, 0x4062C42E, 0x4063B020, + 0x40648220, 0x00000003, 0x4062C42F, 0x4063B020, 0x40648220, 0x00000003, + 0x4062C430, 0x4063B020, 0x40648220, 0x00000003, 0x4062C431, 0x4063B020, + 0x40648220, 0x00000003, 0x4062C432, 0x4063B020, 0x40648220, 0x00000003, + 0x4062C433, 0x4063B020, 0x40648220, 0x00000003, 0x4062C434, 0x4063B020, + 0x40648220, 0x00000003, 0x4062C421, 0x4063B020, 0x40648420, 0x00000003, + 0x4062C422, 0x4063B020, 0x40648420, 0x00000003, 0x4062C423, 0x4063B020, + 0x40648420, 0x00000003, 0x4062C424, 0x4063B020, 0x40648420, 0x00000003, + 0x4062C425, 0x4063B020, 0x40648420, 0x00000003, 0x4062C426, 0x4063B020, + 0x40648420, 0x00000003, 0x4062C427, 0x4063B020, + // Block 557, offset 0x8b40 + 0x40648420, 0x00000003, 0x4062C428, 0x4063B020, 0x40648420, 0x00000003, + 0x4062C429, 0x4063B020, 0x40648420, 0x00000003, 0x4062C421, 0x4063B020, + 0x40648C20, 0x00000003, 0x4062C422, 0x4063B020, 0x40648C20, 0x00000003, + 0x4062C423, 0x4063B020, 0x40648C20, 0x00000003, 0x4062C424, 0x4063B020, + 0x40648C20, 0x00000003, 0x4062C425, 0x4063B020, 0x40648C20, 0x00000003, + 0x4062C426, 0x4063B020, 0x40648C20, 0x00000003, 0x4062C427, 0x4063B020, + 0x40648C20, 0x00000003, 0x4062C428, 0x4063B020, 0x40648C20, 0x00000003, + 0x4062C429, 0x4063B020, 0x40648C20, 0x00000003, 0x4062C42A, 0x4063B020, + 0x40648C20, 0x00000003, 0x4062C42B, 0x4063B020, 0x40648C20, 0x00000003, + 0x4062C42C, 0x4063B020, 0x40648C20, 0x00000003, 0x4062C42D, 0x4063B020, + 0x40648C20, 0x00000003, 0x4062C42E, 0x4063B020, + // Block 558, offset 0x8b80 + 0x40648C20, 0x00000003, 0x4062C42F, 0x4063B020, 0x40648C20, 0x00000003, + 0x4062C430, 0x4063B020, 0x40648C20, 0x00000003, 0x4062C431, 0x4063B020, + 0x40648C20, 0x00000003, 0x4062C432, 0x4063B020, 0x40648C20, 0x00000003, + 0x4062C433, 0x4063B020, 0x40648C20, 0x00000003, 0x4062C434, 0x4063B020, + 0x40648C20, 0x00000003, 0x4062C435, 0x4063B020, 0x40648C20, 0x00000003, + 0x4062C436, 0x4063B020, 0x40648C20, 0x00000003, 0x4062C437, 0x4063B020, + 0x40648C20, 0x00000003, 0x4062C438, 0x4063B020, 0x40648C20, 0x00000003, + 0x4062C439, 0x4063B020, 0x40648C20, 0x00000003, 0x4062C43A, 0x4063B020, + 0x40648C20, 0x00000003, 0x4062C43B, 0x4063B020, 0x40648C20, 0x00000003, + 0x4062C43C, 0x4063B020, 0x40648C20, 0x00000003, 0x4062C43D, 0x4063B020, + 0x40648C20, 0x00000003, 0x4062C43E, 0x4063B020, + // Block 559, offset 0x8bc0 + 0x40648C20, 0x00000003, 0x4062C43F, 0x4063B020, 0x40648C20, 0x00000003, + 0x4062C440, 0x4063B020, 0x40648C20, 0x00000003, 0x4062C441, 0x4063B020, + 0x40648C20, 0x00000003, 0x4062C442, 0x4063B020, 0x40648C20, 0x00000003, + 0x4062C443, 0x4063B020, 0x40648C20, 0x00000003, 0x4062C444, 0x4063B020, + 0x40648C20, 0x00000003, 0x4062C445, 0x4063B020, 0x40648C20, 0x00000003, + 0x4062C446, 0x4063B020, 0x40648C20, 0x00000003, 0x4062C447, 0x4063B020, + 0x40648C20, 0x00000003, 0x4062C448, 0x4063B020, 0x40648C20, 0x00000003, + 0x4062C449, 0x4063B020, 0x40648C20, 0x00000003, 0x4062C44A, 0x4063B020, + 0x40648C20, 0x00000003, 0x4062C44B, 0x4063B020, 0x40648C20, 0x00000003, + 0x4062C44C, 0x4063B020, 0x40648C20, 0x00000003, 0x4062C44D, 0x4063B020, + 0x40648C20, 0x00000003, 0x4062C44E, 0x4063B020, + // Block 560, offset 0x8c00 + 0x40648C20, 0x00000003, 0x4062C44F, 0x4063B020, 0x40648C20, 0x00000003, + 0x4062C450, 0x4063B020, 0x40648C20, 0x00000003, 0x4062C451, 0x4063B020, + 0x40648C20, 0x00000003, 0x4062C452, 0x4063B020, 0x40648C20, 0x00000003, + 0x4062C453, 0x4063B020, 0x40648C20, 0x00000003, 0x4062C454, 0x4063B020, + 0x40648C20, 0x00000003, 0x4062C455, 0x4063B020, 0x40648C20, 0x00000003, + 0x4062C456, 0x4063B020, 0x40648C20, 0x00000003, 0x4062C457, 0x4063B020, + 0x40648C20, 0x00000003, 0x4062C458, 0x4063B020, 0x40648C20, 0x00000003, + 0x4062C459, 0x4063B020, 0x40648C20, 0x00000003, 0x4062C45A, 0x4063B020, + 0x40648C20, 0x00000003, 0x4062C45B, 0x4063B020, 0x40648C20, 0x00000003, + 0x4062C45C, 0x4063B020, 0x40648C20, 0x00000003, 0x4062C45D, 0x4063B020, + 0x40648C20, 0x00000003, 0x4062C45E, 0x4063B020, + // Block 561, offset 0x8c40 + 0x40648C20, 0x00000003, 0x4062C45F, 0x4063B020, 0x40648C20, 0x00000003, + 0x4062C460, 0x4063B020, 0x40648C20, 0x00000003, 0x4062C461, 0x4063B020, + 0x40648C20, 0x00000003, 0x4062C462, 0x4063B020, 0x40648C20, 0x00000003, + 0x4062C463, 0x4063B020, 0x40648C20, 0x00000003, 0x4062C464, 0x4063B020, + 0x40648C20, 0x00000003, 0x4062C465, 0x4063B020, 0x40648C20, 0x00000003, + 0x4062C466, 0x4063B020, 0x40648C20, 0x00000003, 0x4062C467, 0x4063B020, + 0x40648C20, 0x00000003, 0x4062C468, 0x4063B020, 0x40648C20, 0x00000003, + 0x4062C469, 0x4063B020, 0x40648C20, 0x00000003, 0x4062C46A, 0x4063B020, + 0x40648C20, 0x00000002, 0x4062C421, 0x4063B220, 0x00000002, 0x4062C422, + 0x4063B220, 0x00000002, 0x4062C423, 0x4063B220, 0x00000002, 0x4062C424, + 0x4063B220, 0x00000002, 0x4062C425, 0x4063B220, + // Block 562, offset 0x8c80 + 0x00000002, 0x4062C426, 0x4063B220, 0x00000002, 0x4062C427, 0x4063B220, + 0x00000002, 0x4062C428, 0x4063B220, 0x00000002, 0x4062C429, 0x4063B220, + 0x00000002, 0x4062C42A, 0x4063B220, 0x00000002, 0x4062C42B, 0x4063B220, + 0x00000002, 0x4062C42C, 0x4063B220, 0x00000002, 0x4062C42D, 0x4063B220, + 0x00000002, 0x4062C42E, 0x4063B220, 0x00000002, 0x4062C42F, 0x4063B220, + 0x00000002, 0x4062C430, 0x4063B220, 0x00000002, 0x4062C431, 0x4063B220, + 0x00000002, 0x4062C432, 0x4063B220, 0x00000002, 0x4062C433, 0x4063B220, + 0x00000002, 0x4062C434, 0x4063B220, 0x00000002, 0x4062C435, 0x4063B220, + 0x00000002, 0x4062C436, 0x4063B220, 0x00000002, 0x4062C437, 0x4063B220, + 0x00000002, 0x4062C438, 0x4063B220, 0x00000002, 0x4062C439, 0x4063B220, + 0x00000002, 0x4062C43A, 0x4063B220, 0x00000002, + // Block 563, offset 0x8cc0 + 0x4062C43B, 0x4063B220, 0x00000002, 0x4062C43C, 0x4063B220, 0x00000002, + 0x4062C43D, 0x4063B220, 0x00000002, 0x4062C43E, 0x4063B220, 0x00000002, + 0x4062C43F, 0x4063B220, 0x00000002, 0x4062C440, 0x4063B220, 0x00000002, + 0x4062C441, 0x4063B220, 0x00000002, 0x4062C442, 0x4063B220, 0x00000002, + 0x4062C443, 0x4063B220, 0x00000002, 0x4062C444, 0x4063B220, 0x00000002, + 0x4062C445, 0x4063B220, 0x00000002, 0x4062C446, 0x4063B220, 0x00000002, + 0x4062C447, 0x4063B220, 0x00000002, 0x4062C448, 0x4063B220, 0x00000002, + 0x4062C421, 0x4063B820, 0x00000002, 0x4062C422, 0x4063B820, 0x00000002, + 0x4062C423, 0x4063B820, 0x00000002, 0x4062C424, 0x4063B820, 0x00000002, + 0x4062C425, 0x4063B820, 0x00000002, 0x4062C426, 0x4063B820, 0x00000002, + 0x4062C427, 0x4063B820, 0x00000002, 0x4062C428, + // Block 564, offset 0x8d00 + 0x4063B820, 0x00000002, 0x4062C429, 0x4063B820, 0x00000002, 0x4062C42A, + 0x4063B820, 0x00000002, 0x4062C42B, 0x4063B820, 0x00000002, 0x4062C42C, + 0x4063B820, 0x00000002, 0x4062C42D, 0x4063B820, 0x00000002, 0x4062C42E, + 0x4063B820, 0x00000002, 0x4062C42F, 0x4063B820, 0x00000002, 0x4062C430, + 0x4063B820, 0x00000002, 0x4062C431, 0x4063B820, 0x00000002, 0x4062C432, + 0x4063B820, 0x00000002, 0x4062C433, 0x4063B820, 0x00000002, 0x4062C434, + 0x4063B820, 0x00000002, 0x4062C435, 0x4063B820, 0x00000002, 0x4062C436, + 0x4063B820, 0x00000002, 0x4062C437, 0x4063B820, 0x00000002, 0x4062C438, + 0x4063B820, 0x00000002, 0x4062C439, 0x4063B820, 0x00000002, 0x4062C43A, + 0x4063B820, 0x00000002, 0x4062C43B, 0x4063B820, 0x00000002, 0x4062C43C, + 0x4063B820, 0x00000002, 0x4062C43D, 0x4063B820, + // Block 565, offset 0x8d40 + 0x00000002, 0x4062C43E, 0x4063B820, 0x00000002, 0x4062C43F, 0x4063B820, + 0x00000002, 0x4062C440, 0x4063B820, 0x00000002, 0x4062C441, 0x4063B820, + 0x00000002, 0x4062C442, 0x4063B820, 0x00000002, 0x4062C443, 0x4063B820, + 0x00000002, 0x4062C444, 0x4063B820, 0x00000002, 0x4062C445, 0x4063B820, + 0x00000002, 0x4062C446, 0x4063B820, 0x00000002, 0x4062C447, 0x4063B820, + 0x00000002, 0x4062C448, 0x4063B820, 0x00000002, 0x4062C449, 0x4063B820, + 0x00000002, 0x4062C44A, 0x4063B820, 0x00000002, 0x4062C44B, 0x4063B820, + 0x00000002, 0x4062C44C, 0x4063B820, 0x00000002, 0x4062C44D, 0x4063B820, + 0x00000002, 0x4062C44E, 0x4063B820, 0x00000002, 0x4062C44F, 0x4063B820, + 0x00000002, 0x4062C450, 0x4063B820, 0x00000002, 0x4062C451, 0x4063B820, + 0x00000002, 0x4062C452, 0x4063B820, 0x00000002, + // Block 566, offset 0x8d80 + 0x4062C453, 0x4063B820, 0x00000002, 0x4062C454, 0x4063B820, 0x00000002, + 0x4062C455, 0x4063B820, 0x00000002, 0x4062C456, 0x4063B820, 0x00000002, + 0x4062C457, 0x4063B820, 0x00000002, 0x4062C458, 0x4063B820, 0x00000002, + 0x4062C459, 0x4063B820, 0x00000002, 0x4062C45A, 0x4063B820, 0x00000002, + 0x4062C45B, 0x4063B820, 0x00000002, 0x4062C45C, 0x4063B820, 0x00000002, + 0x4062C45D, 0x4063B820, 0x00000002, 0x4062C45E, 0x4063B820, 0x00000002, + 0x4062C45F, 0x4063B820, 0x00000002, 0x4062C460, 0x4063B820, 0x00000002, + 0x4062C461, 0x4063B820, 0x00000002, 0x4062C462, 0x4063B820, 0x00000002, + 0x4062C463, 0x4063B820, 0x00000002, 0x4062C464, 0x4063B820, 0x00000002, + 0x4062C465, 0x4063B820, 0x00000002, 0x4062C466, 0x4063B820, 0x00000002, + 0x4062C467, 0x4063B820, 0x00000002, 0x4062C468, + // Block 567, offset 0x8dc0 + 0x4063B820, 0x00000002, 0x4062C469, 0x4063B820, 0x00000002, 0x4062C46A, + 0x4063B820, 0x00000002, 0x4062C46B, 0x4063B820, 0x00000002, 0x4062C46C, + 0x4063B820, 0x00000002, 0x4062C46D, 0x4063B820, 0x00000002, 0x4062C46E, + 0x4063B820, 0x00000002, 0x4062C46F, 0x4063B820, 0x00000002, 0x4062C470, + 0x4063B820, 0x00000003, 0x4062C421, 0x4063B820, 0x40646420, 0x00000003, + 0x4062C422, 0x4063B820, 0x40646420, 0x00000003, 0x4062C423, 0x4063B820, + 0x40646420, 0x00000003, 0x4062C424, 0x4063B820, 0x40646420, 0x00000003, + 0x4062C425, 0x4063B820, 0x40646420, 0x00000003, 0x4062C421, 0x4063B820, + 0x40646A20, 0x00000003, 0x4062C422, 0x4063B820, 0x40646A20, 0x00000003, + 0x4062C423, 0x4063B820, 0x40646A20, 0x00000003, 0x4062C421, 0x4063B820, + 0x40647220, 0x00000003, 0x4062C422, 0x4063B820, + // Block 568, offset 0x8e00 + 0x40647220, 0x00000003, 0x4062C423, 0x4063B820, 0x40647220, 0x00000003, + 0x4062C421, 0x4063B820, 0x40648C20, 0x00000003, 0x4062C422, 0x4063B820, + 0x40648C20, 0x00000003, 0x4062C423, 0x4063B820, 0x40648C20, 0x00000003, + 0x4062C424, 0x4063B820, 0x40648C20, 0x00000003, 0x4062C425, 0x4063B820, + 0x40648C20, 0x00000003, 0x4062C426, 0x4063B820, 0x40648C20, 0x00000003, + 0x4062C427, 0x4063B820, 0x40648C20, 0x00000003, 0x4062C428, 0x4063B820, + 0x40648C20, 0x00000003, 0x4062C429, 0x4063B820, 0x40648C20, 0x00000003, + 0x4062C42A, 0x4063B820, 0x40648C20, 0x00000003, 0x4062C42B, 0x4063B820, + 0x40648C20, 0x00000003, 0x4062C42C, 0x4063B820, 0x40648C20, 0x00000003, + 0x4062C42D, 0x4063B820, 0x40648C20, 0x00000003, 0x4062C42E, 0x4063B820, + 0x40648C20, 0x00000003, 0x4062C42F, 0x4063B820, + // Block 569, offset 0x8e40 + 0x40648C20, 0x00000003, 0x4062C430, 0x4063B820, 0x40648C20, 0x00000003, + 0x4062C431, 0x4063B820, 0x40648C20, 0x00000003, 0x4062C432, 0x4063B820, + 0x40648C20, 0x00000003, 0x4062C433, 0x4063B820, 0x40648C20, 0x00000003, + 0x4062C434, 0x4063B820, 0x40648C20, 0x00000003, 0x4062C435, 0x4063B820, + 0x40648C20, 0x00000003, 0x4062C436, 0x4063B820, 0x40648C20, 0x00000003, + 0x4062C437, 0x4063B820, 0x40648C20, 0x00000003, 0x4062C438, 0x4063B820, + 0x40648C20, 0x00000003, 0x4062C439, 0x4063B820, 0x40648C20, 0x00000003, + 0x4062C43A, 0x4063B820, 0x40648C20, 0x00000003, 0x4062C43B, 0x4063B820, + 0x40648C20, 0x00000002, 0x4062C421, 0x4063BA20, 0x00000002, 0x4062C422, + 0x4063BA20, 0x00000002, 0x4062C423, 0x4063BA20, 0x00000002, 0x4062C424, + 0x4063BA20, 0x00000002, 0x4062C425, 0x4063BA20, + // Block 570, offset 0x8e80 + 0x00000002, 0x4062C426, 0x4063BA20, 0x00000002, 0x4062C427, 0x4063BA20, + 0x00000002, 0x4062C428, 0x4063BA20, 0x00000002, 0x4062C429, 0x4063BA20, + 0x00000002, 0x4062C421, 0x4063BE20, 0x00000002, 0x4062C421, 0x4063C220, + 0x00000002, 0x4062C422, 0x4063C220, 0x00000002, 0x4062C423, 0x4063C220, + 0x00000002, 0x4062C424, 0x4063C220, 0x00000002, 0x4062C425, 0x4063C220, + 0x00000002, 0x4062C426, 0x4063C220, 0x00000002, 0x4062C427, 0x4063C220, + 0x00000002, 0x4062C428, 0x4063C220, 0x00000002, 0x4062C429, 0x4063C220, + 0x00000002, 0x4062C42A, 0x4063C220, 0x00000002, 0x4062C42B, 0x4063C220, + 0x00000002, 0x4062C42C, 0x4063C220, 0x00000002, 0x4062C42D, 0x4063C220, + 0x00000002, 0x4062C42E, 0x4063C220, 0x00000002, 0x4062C42F, 0x4063C220, + 0x00000002, 0x4062C430, 0x4063C220, 0x00000002, + // Block 571, offset 0x8ec0 + 0x4062C431, 0x4063C220, 0x00000002, 0x4062C432, 0x4063C220, 0x00000002, + 0x4062C433, 0x4063C220, 0x00000002, 0x4062C434, 0x4063C220, 0x00000002, + 0x4062C435, 0x4063C220, 0x00000002, 0x4062C436, 0x4063C220, 0x00000002, + 0x4062C437, 0x4063C220, 0x00000002, 0x4062C438, 0x4063C220, 0x00000002, + 0x4062C439, 0x4063C220, 0x00000002, 0x4062C43A, 0x4063C220, 0x00000002, + 0x4062C43B, 0x4063C220, 0x00000002, 0x4062C43C, 0x4063C220, 0x00000002, + 0x4062C43D, 0x4063C220, 0x00000002, 0x4062C43E, 0x4063C220, 0x00000002, + 0x4062C43F, 0x4063C220, 0x00000002, 0x4062C440, 0x4063C220, 0x00000002, + 0x4062C441, 0x4063C220, 0x00000002, 0x4062C442, 0x4063C220, 0x00000002, + 0x4062C443, 0x4063C220, 0x00000002, 0x4062C444, 0x4063C220, 0x00000002, + 0x4062C445, 0x4063C220, 0x00000002, 0x4062C446, + // Block 572, offset 0x8f00 + 0x4063C220, 0x00000002, 0x4062C447, 0x4063C220, 0x00000002, 0x4062C448, + 0x4063C220, 0x00000002, 0x4062C449, 0x4063C220, 0x00000002, 0x4062C44A, + 0x4063C220, 0x00000002, 0x4062C44B, 0x4063C220, 0x00000002, 0x4062C44C, + 0x4063C220, 0x00000002, 0x4062C44D, 0x4063C220, 0x00000002, 0x4062C44E, + 0x4063C220, 0x00000002, 0x4062C44F, 0x4063C220, 0x00000002, 0x4062C450, + 0x4063C220, 0x00000002, 0x4062C451, 0x4063C220, 0x00000002, 0x4062C452, + 0x4063C220, 0x00000002, 0x4062C453, 0x4063C220, 0x00000002, 0x4062C454, + 0x4063C220, 0x00000002, 0x4062C455, 0x4063C220, 0x00000002, 0x4062C456, + 0x4063C220, 0x00000002, 0x4062C457, 0x4063C220, 0x00000002, 0x4062C458, + 0x4063C220, 0x00000002, 0x4062C459, 0x4063C220, 0x00000002, 0x4062C45A, + 0x4063C220, 0x00000002, 0x4062C45B, 0x4063C220, + // Block 573, offset 0x8f40 + 0x00000002, 0x4062C45C, 0x4063C220, 0x00000002, 0x4062C45D, 0x4063C220, + 0x00000002, 0x4062C45E, 0x4063C220, 0x00000003, 0x4062C421, 0x4063C220, + 0x40646420, 0x00000003, 0x4062C422, 0x4063C220, 0x40646420, 0x00000003, + 0x4062C421, 0x4063C220, 0x40646A20, 0x00000003, 0x4062C422, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062C423, 0x4063C220, 0x40646A20, 0x00000003, + 0x4062C424, 0x4063C220, 0x40646A20, 0x00000003, 0x4062C425, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062C426, 0x4063C220, 0x40646A20, 0x00000003, + 0x4062C427, 0x4063C220, 0x40646A20, 0x00000003, 0x4062C428, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062C429, 0x4063C220, 0x40646A20, 0x00000003, + 0x4062C42A, 0x4063C220, 0x40646A20, 0x00000003, 0x4062C42B, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062C42C, 0x4063C220, + // Block 574, offset 0x8f80 + 0x40646A20, 0x00000003, 0x4062C42D, 0x4063C220, 0x40646A20, 0x00000003, + 0x4062C42E, 0x4063C220, 0x40646A20, 0x00000003, 0x4062C42F, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062C430, 0x4063C220, 0x40646A20, 0x00000003, + 0x4062C431, 0x4063C220, 0x40646A20, 0x00000003, 0x4062C432, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062C433, 0x4063C220, 0x40646A20, 0x00000003, + 0x4062C434, 0x4063C220, 0x40646A20, 0x00000003, 0x4062C435, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062C436, 0x4063C220, 0x40646A20, 0x00000003, + 0x4062C437, 0x4063C220, 0x40646A20, 0x00000003, 0x4062C438, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062C439, 0x4063C220, 0x40646A20, 0x00000003, + 0x4062C43A, 0x4063C220, 0x40646A20, 0x00000003, 0x4062C43B, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062C43C, 0x4063C220, + // Block 575, offset 0x8fc0 + 0x40646A20, 0x00000003, 0x4062C43D, 0x4063C220, 0x40646A20, 0x00000003, + 0x4062C43E, 0x4063C220, 0x40646A20, 0x00000003, 0x4062C43F, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062C440, 0x4063C220, 0x40646A20, 0x00000003, + 0x4062C441, 0x4063C220, 0x40646A20, 0x00000003, 0x4062C442, 0x4063C220, + 0x40646A20, 0x00000003, 0x4062C421, 0x4063C220, 0x40647220, 0x00000003, + 0x4062C422, 0x4063C220, 0x40647220, 0x00000003, 0x4062C421, 0x4063C220, + 0x40648C20, 0x00000003, 0x4062C422, 0x4063C220, 0x40648C20, 0x00000003, + 0x4062C423, 0x4063C220, 0x40648C20, 0x00000003, 0x4062C424, 0x4063C220, + 0x40648C20, 0x00000003, 0x4062C425, 0x4063C220, 0x40648C20, 0x00000003, + 0x4062C421, 0x4063CC20, 0x40646420, 0x00000003, 0x4062C422, 0x4063CC20, + 0x40646420, 0x00000003, 0x4062C423, 0x4063CC20, + // Block 576, offset 0x9000 + 0x40646420, 0x00000003, 0x4062C421, 0x4063CC20, 0x40647220, 0x00000003, + 0x4062C422, 0x4063CC20, 0x40647220, 0x00000003, 0x4062C421, 0x4063CC20, + 0x40648420, 0x00000003, 0x4062C422, 0x4063CC20, 0x40648420, 0x00000003, + 0x4062C423, 0x4063CC20, 0x40648420, 0x00000003, 0x4062C424, 0x4063CC20, + 0x40648420, 0x00000003, 0x4062C425, 0x4063CC20, 0x40648420, 0x00000003, + 0x4062C421, 0x4063CC20, 0x40648C20, 0x00000003, 0x4062C422, 0x4063CC20, + 0x40648C20, 0x00000003, 0x4062C423, 0x4063CC20, 0x40648C20, 0x00000003, + 0x4062C424, 0x4063CC20, 0x40648C20, 0x00000003, 0x4062C425, 0x4063CC20, + 0x40648C20, 0x00000003, 0x4062C426, 0x4063CC20, 0x40648C20, 0x00000003, + 0x4062C427, 0x4063CC20, 0x40648C20, 0x00000003, 0x4062C428, 0x4063CC20, + 0x40648C20, 0x00000003, 0x4062C429, 0x4063CC20, + // Block 577, offset 0x9040 + 0x40648C20, 0x00000003, 0x4062C42A, 0x4063CC20, 0x40648C20, 0x00000003, + 0x4062C42B, 0x4063CC20, 0x40648C20, 0x00000003, 0x4062C42C, 0x4063CC20, + 0x40648C20, 0x00000003, 0x4062C42D, 0x4063CC20, 0x40648C20, 0x00000003, + 0x4062C42E, 0x4063CC20, 0x40648C20, 0x00000002, 0x4062C421, 0x4063D020, + 0x00000002, 0x4062C422, 0x4063D020, 0x00000002, 0x4062C423, 0x4063D020, + 0x00000002, 0x4062C424, 0x4063D020, 0x00000002, 0x4062C425, 0x4063D020, + 0x00000002, 0x4062C426, 0x4063D020, 0x00000002, 0x4062C427, 0x4063D020, + 0x00000002, 0x4062C428, 0x4063D020, 0x00000002, 0x4062C429, 0x4063D020, + 0x00000002, 0x4062C42A, 0x4063D020, 0x00000002, 0x4062C42B, 0x4063D020, + 0x00000002, 0x4062C42C, 0x4063D020, 0x00000002, 0x4062C42D, 0x4063D020, + 0x00000002, 0x4062C42E, 0x4063D020, 0x00000002, + // Block 578, offset 0x9080 + 0x4062C42F, 0x4063D020, 0x00000002, 0x4062C430, 0x4063D020, 0x00000002, + 0x4062C431, 0x4063D020, 0x00000002, 0x4062C432, 0x4063D020, 0x00000002, + 0x4062C433, 0x4063D020, 0x00000002, 0x4062C434, 0x4063D020, 0x00000002, + 0x4062C435, 0x4063D020, 0x00000002, 0x4062C436, 0x4063D020, 0x00000002, + 0x4062C437, 0x4063D020, 0x00000002, 0x4062C438, 0x4063D020, 0x00000002, + 0x4062C439, 0x4063D020, 0x00000002, 0x4062C43A, 0x4063D020, 0x00000002, + 0x4062C43B, 0x4063D020, 0x00000002, 0x4062C43C, 0x4063D020, 0x00000002, + 0x4062C43D, 0x4063D020, 0x00000002, 0x4062C43E, 0x4063D020, 0x00000002, + 0x4062C43F, 0x4063D020, 0x00000002, 0x4062C440, 0x4063D020, 0x00000002, + 0x4062C441, 0x4063D020, 0x00000002, 0x4062C442, 0x4063D020, 0x00000002, + 0x4062C443, 0x4063D020, 0x00000002, 0x4062C444, + // Block 579, offset 0x90c0 + 0x4063D020, 0x00000002, 0x4062C445, 0x4063D020, 0x00000002, 0x4062C446, + 0x4063D020, 0x00000002, 0x4062C447, 0x4063D020, 0x00000002, 0x4062C448, + 0x4063D020, 0x00000002, 0x4062C449, 0x4063D020, 0x00000002, 0x4062C44A, + 0x4063D020, 0x00000002, 0x4062C44B, 0x4063D020, 0x00000002, 0x4062C44C, + 0x4063D020, 0x00000002, 0x4062C44D, 0x4063D020, 0x00000002, 0x4062C44E, + 0x4063D020, 0x00000002, 0x4062C44F, 0x4063D020, 0x00000002, 0x4062C450, + 0x4063D020, 0x00000003, 0x4062C421, 0x4063D020, 0x40646420, 0x00000003, + 0x4062C422, 0x4063D020, 0x40646420, 0x00000003, 0x4062C423, 0x4063D020, + 0x40646420, 0x00000003, 0x4062C424, 0x4063D020, 0x40646420, 0x00000003, + 0x4062C425, 0x4063D020, 0x40646420, 0x00000003, 0x4062C426, 0x4063D020, + 0x40646420, 0x00000003, 0x4062C421, 0x4063D020, + // Block 580, offset 0x9100 + 0x40646A20, 0x00000003, 0x4062C422, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062C423, 0x4063D020, 0x40646A20, 0x00000003, 0x4062C424, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062C425, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062C426, 0x4063D020, 0x40646A20, 0x00000003, 0x4062C427, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062C428, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062C429, 0x4063D020, 0x40646A20, 0x00000003, 0x4062C42A, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062C42B, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062C42C, 0x4063D020, 0x40646A20, 0x00000003, 0x4062C42D, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062C42E, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062C42F, 0x4063D020, 0x40646A20, 0x00000003, 0x4062C430, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062C431, 0x4063D020, + // Block 581, offset 0x9140 + 0x40646A20, 0x00000003, 0x4062C432, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062C433, 0x4063D020, 0x40646A20, 0x00000003, 0x4062C434, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062C435, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062C436, 0x4063D020, 0x40646A20, 0x00000003, 0x4062C437, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062C438, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062C439, 0x4063D020, 0x40646A20, 0x00000003, 0x4062C43A, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062C43B, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062C43C, 0x4063D020, 0x40646A20, 0x00000003, 0x4062C43D, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062C43E, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062C43F, 0x4063D020, 0x40646A20, 0x00000003, 0x4062C440, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062C441, 0x4063D020, + // Block 582, offset 0x9180 + 0x40646A20, 0x00000003, 0x4062C442, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062C443, 0x4063D020, 0x40646A20, 0x00000003, 0x4062C444, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062C445, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062C446, 0x4063D020, 0x40646A20, 0x00000003, 0x4062C447, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062C448, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062C449, 0x4063D020, 0x40646A20, 0x00000003, 0x4062C44A, 0x4063D020, + 0x40646A20, 0x00000003, 0x4062C44B, 0x4063D020, 0x40646A20, 0x00000003, + 0x4062C44C, 0x4063D020, 0x40646A20, 0x00000003, 0x4062C421, 0x4063D020, + 0x40647220, 0x00000003, 0x4062C422, 0x4063D020, 0x40647220, 0x00000003, + 0x4062C423, 0x4063D020, 0x40647220, 0x00000003, 0x4062C424, 0x4063D020, + 0x40647220, 0x00000003, 0x4062C425, 0x4063D020, + // Block 583, offset 0x91c0 + 0x40647220, 0x00000003, 0x4062C426, 0x4063D020, 0x40647220, 0x00000003, + 0x4062C427, 0x4063D020, 0x40647220, 0x00000003, 0x4062C428, 0x4063D020, + 0x40647220, 0x00000003, 0x4062C429, 0x4063D020, 0x40647220, 0x00000003, + 0x4062C42A, 0x4063D020, 0x40647220, 0x00000003, 0x4062C42B, 0x4063D020, + 0x40647220, 0x00000003, 0x4062C42C, 0x4063D020, 0x40647220, 0x00000003, + 0x4062C42D, 0x4063D020, 0x40647220, 0x00000003, 0x4062C42E, 0x4063D020, + 0x40647220, 0x00000003, 0x4062C42F, 0x4063D020, 0x40647220, 0x00000003, + 0x4062C430, 0x4063D020, 0x40647220, 0x00000003, 0x4062C431, 0x4063D020, + 0x40647220, 0x00000003, 0x4062C432, 0x4063D020, 0x40647220, 0x00000003, + 0x4062C433, 0x4063D020, 0x40647220, 0x00000003, 0x4062C434, 0x4063D020, + 0x40647220, 0x00000003, 0x4062C421, 0x4063D020, + // Block 584, offset 0x9200 + 0x40648220, 0x00000003, 0x4062C422, 0x4063D020, 0x40648220, 0x00000003, + 0x4062C423, 0x4063D020, 0x40648220, 0x00000003, 0x4062C421, 0x4063D020, + 0x40648420, 0x00000003, 0x4062C422, 0x4063D020, 0x40648420, 0x00000003, + 0x4062C423, 0x4063D020, 0x40648420, 0x00000003, 0x4062C424, 0x4063D020, + 0x40648420, 0x00000003, 0x4062C425, 0x4063D020, 0x40648420, 0x00000003, + 0x4062C426, 0x4063D020, 0x40648420, 0x00000003, 0x4062C427, 0x4063D020, + 0x40648420, 0x00000003, 0x4062C428, 0x4063D020, 0x40648420, 0x00000003, + 0x4062C421, 0x4063D020, 0x40648C20, 0x00000003, 0x4062C422, 0x4063D020, + 0x40648C20, 0x00000003, 0x4062C423, 0x4063D020, 0x40648C20, 0x00000003, + 0x4062C424, 0x4063D020, 0x40648C20, 0x00000003, 0x4062C425, 0x4063D020, + 0x40648C20, 0x00000003, 0x4062C426, 0x4063D020, + // Block 585, offset 0x9240 + 0x40648C20, 0x00000003, 0x4062C427, 0x4063D020, 0x40648C20, 0x00000002, + 0x4062C821, 0x4063A820, 0x00000002, 0x4062C822, 0x4063A820, 0x00000002, + 0x4062C823, 0x4063A820, 0x00000002, 0x4062C824, 0x4063A820, 0x00000002, + 0x4062C825, 0x4063A820, 0x00000002, 0x4062C826, 0x4063A820, 0x00000002, + 0x4062C827, 0x4063A820, 0x00000002, 0x4062C828, 0x4063A820, 0x00000002, + 0x4062C829, 0x4063A820, 0x00000002, 0x4062C82A, 0x4063A820, 0x00000002, + 0x4062C82B, 0x4063A820, 0x00000002, 0x4062C82C, 0x4063A820, 0x00000002, + 0x4062C82D, 0x4063A820, 0x00000002, 0x4062C82E, 0x4063A820, 0x00000002, + 0x4062C82F, 0x4063A820, 0x00000002, 0x4062C830, 0x4063A820, 0x00000002, + 0x4062C831, 0x4063A820, 0x00000002, 0x4062C832, 0x4063A820, 0x00000002, + 0x4062C833, 0x4063A820, 0x00000002, 0x4062C834, + // Block 586, offset 0x9280 + 0x4063A820, 0x00000002, 0x4062C835, 0x4063A820, 0x00000002, 0x4062C836, + 0x4063A820, 0x00000003, 0x4062C821, 0x4063A820, 0x40646420, 0x00000003, + 0x4062C822, 0x4063A820, 0x40646420, 0x00000003, 0x4062C823, 0x4063A820, + 0x40646420, 0x00000003, 0x4062C824, 0x4063A820, 0x40646420, 0x00000003, + 0x4062C825, 0x4063A820, 0x40646420, 0x00000003, 0x4062C826, 0x4063A820, + 0x40646420, 0x00000003, 0x4062C827, 0x4063A820, 0x40646420, 0x00000003, + 0x4062C828, 0x4063A820, 0x40646420, 0x00000003, 0x4062C829, 0x4063A820, + 0x40646420, 0x00000003, 0x4062C82A, 0x4063A820, 0x40646420, 0x00000003, + 0x4062C821, 0x4063A820, 0x40646A20, 0x00000003, 0x4062C822, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062C823, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062C824, 0x4063A820, 0x40646A20, 0x00000003, + // Block 587, offset 0x92c0 + 0x4062C825, 0x4063A820, 0x40646A20, 0x00000003, 0x4062C826, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062C827, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062C828, 0x4063A820, 0x40646A20, 0x00000003, 0x4062C829, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062C82A, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062C82B, 0x4063A820, 0x40646A20, 0x00000003, 0x4062C82C, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062C82D, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062C82E, 0x4063A820, 0x40646A20, 0x00000003, 0x4062C82F, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062C830, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062C831, 0x4063A820, 0x40646A20, 0x00000003, 0x4062C832, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062C833, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062C834, 0x4063A820, 0x40646A20, 0x00000003, + // Block 588, offset 0x9300 + 0x4062C835, 0x4063A820, 0x40646A20, 0x00000003, 0x4062C836, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062C837, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062C821, 0x4063A820, 0x40647220, 0x00000003, 0x4062C822, 0x4063A820, + 0x40647220, 0x00000003, 0x4062C823, 0x4063A820, 0x40647220, 0x00000003, + 0x4062C824, 0x4063A820, 0x40647220, 0x00000003, 0x4062C825, 0x4063A820, + 0x40647220, 0x00000003, 0x4062C826, 0x4063A820, 0x40647220, 0x00000003, + 0x4062C827, 0x4063A820, 0x40647220, 0x00000003, 0x4062C821, 0x4063A820, + 0x40648220, 0x00000003, 0x4062C822, 0x4063A820, 0x40648220, 0x00000003, + 0x4062C823, 0x4063A820, 0x40648220, 0x00000003, 0x4062C824, 0x4063A820, + 0x40648220, 0x00000003, 0x4062C825, 0x4063A820, 0x40648220, 0x00000003, + 0x4062C826, 0x4063A820, 0x40648220, 0x00000003, + // Block 589, offset 0x9340 + 0x4062C827, 0x4063A820, 0x40648220, 0x00000003, 0x4062C828, 0x4063A820, + 0x40648220, 0x00000003, 0x4062C829, 0x4063A820, 0x40648220, 0x00000003, + 0x4062C82A, 0x4063A820, 0x40648220, 0x00000003, 0x4062C82B, 0x4063A820, + 0x40648220, 0x00000003, 0x4062C82C, 0x4063A820, 0x40648220, 0x00000003, + 0x4062C82D, 0x4063A820, 0x40648220, 0x00000003, 0x4062C82E, 0x4063A820, + 0x40648220, 0x00000003, 0x4062C82F, 0x4063A820, 0x40648220, 0x00000003, + 0x4062C830, 0x4063A820, 0x40648220, 0x00000003, 0x4062C831, 0x4063A820, + 0x40648220, 0x00000003, 0x4062C832, 0x4063A820, 0x40648220, 0x00000003, + 0x4062C833, 0x4063A820, 0x40648220, 0x00000003, 0x4062C834, 0x4063A820, + 0x40648220, 0x00000003, 0x4062C835, 0x4063A820, 0x40648220, 0x00000003, + 0x4062C836, 0x4063A820, 0x40648220, 0x00000003, + // Block 590, offset 0x9380 + 0x4062C837, 0x4063A820, 0x40648220, 0x00000003, 0x4062C838, 0x4063A820, + 0x40648220, 0x00000003, 0x4062C839, 0x4063A820, 0x40648220, 0x00000003, + 0x4062C83A, 0x4063A820, 0x40648220, 0x00000003, 0x4062C821, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062C822, 0x4063A820, 0x40648C20, 0x00000003, + 0x4062C823, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C824, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062C825, 0x4063A820, 0x40648C20, 0x00000003, + 0x4062C826, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C827, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062C828, 0x4063A820, 0x40648C20, 0x00000003, + 0x4062C829, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C82A, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062C82B, 0x4063A820, 0x40648C20, 0x00000003, + 0x4062C82C, 0x4063A820, 0x40648C20, 0x00000003, + // Block 591, offset 0x93c0 + 0x4062C82D, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C82E, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062C82F, 0x4063A820, 0x40648C20, 0x00000003, + 0x4062C830, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C831, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062C832, 0x4063A820, 0x40648C20, 0x00000003, + 0x4062C833, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C834, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062C835, 0x4063A820, 0x40648C20, 0x00000003, + 0x4062C836, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C837, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062C838, 0x4063A820, 0x40648C20, 0x00000003, + 0x4062C839, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C83A, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062C83B, 0x4063A820, 0x40648C20, 0x00000003, + 0x4062C83C, 0x4063A820, 0x40648C20, 0x00000003, + // Block 592, offset 0x9400 + 0x4062C83D, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C83E, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062C83F, 0x4063A820, 0x40648C20, 0x00000003, + 0x4062C840, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C841, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062C842, 0x4063A820, 0x40648C20, 0x00000003, + 0x4062C843, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C844, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062C845, 0x4063A820, 0x40648C20, 0x00000003, + 0x4062C846, 0x4063A820, 0x40648C20, 0x00000003, 0x4062C847, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062C848, 0x4063A820, 0x40648C20, 0x00000003, + 0x4062C849, 0x4063A820, 0x40648C20, 0x00000002, 0x4062C821, 0x4063AA20, + 0x00000002, 0x4062C822, 0x4063AA20, 0x00000002, 0x4062C823, 0x4063AA20, + 0x00000002, 0x4062C824, 0x4063AA20, 0x00000002, + // Block 593, offset 0x9440 + 0x4062C825, 0x4063AA20, 0x00000002, 0x4062C826, 0x4063AA20, 0x00000002, + 0x4062C827, 0x4063AA20, 0x00000002, 0x4062C828, 0x4063AA20, 0x00000002, + 0x4062C829, 0x4063AA20, 0x00000002, 0x4062C82A, 0x4063AA20, 0x00000002, + 0x4062C82B, 0x4063AA20, 0x00000002, 0x4062C82C, 0x4063AA20, 0x00000002, + 0x4062C82D, 0x4063AA20, 0x00000002, 0x4062C82E, 0x4063AA20, 0x00000003, + 0x4062C821, 0x4063AA20, 0x40646420, 0x00000003, 0x4062C822, 0x4063AA20, + 0x40646420, 0x00000003, 0x4062C823, 0x4063AA20, 0x40646420, 0x00000003, + 0x4062C824, 0x4063AA20, 0x40646420, 0x00000003, 0x4062C825, 0x4063AA20, + 0x40646420, 0x00000003, 0x4062C826, 0x4063AA20, 0x40646420, 0x00000003, + 0x4062C827, 0x4063AA20, 0x40646420, 0x00000003, 0x4062C828, 0x4063AA20, + 0x40646420, 0x00000003, 0x4062C829, 0x4063AA20, + // Block 594, offset 0x9480 + 0x40646420, 0x00000003, 0x4062C82A, 0x4063AA20, 0x40646420, 0x00000002, + 0x4062C821, 0x4063B020, 0x00000002, 0x4062C822, 0x4063B020, 0x00000002, + 0x4062C823, 0x4063B020, 0x00000002, 0x4062C824, 0x4063B020, 0x00000002, + 0x4062C825, 0x4063B020, 0x00000002, 0x4062C826, 0x4063B020, 0x00000002, + 0x4062C827, 0x4063B020, 0x00000002, 0x4062C828, 0x4063B020, 0x00000002, + 0x4062C829, 0x4063B020, 0x00000003, 0x4062C821, 0x4063B020, 0x40646420, + 0x00000003, 0x4062C822, 0x4063B020, 0x40646420, 0x00000003, 0x4062C823, + 0x4063B020, 0x40646420, 0x00000003, 0x4062C824, 0x4063B020, 0x40646420, + 0x00000003, 0x4062C825, 0x4063B020, 0x40646420, 0x00000003, 0x4062C826, + 0x4063B020, 0x40646420, 0x00000003, 0x4062C827, 0x4063B020, 0x40646420, + 0x00000003, 0x4062C828, 0x4063B020, 0x40646420, + // Block 595, offset 0x94c0 + 0x00000003, 0x4062C829, 0x4063B020, 0x40646420, 0x00000003, 0x4062C82A, + 0x4063B020, 0x40646420, 0x00000003, 0x4062C82B, 0x4063B020, 0x40646420, + 0x00000003, 0x4062C82C, 0x4063B020, 0x40646420, 0x00000003, 0x4062C82D, + 0x4063B020, 0x40646420, 0x00000003, 0x4062C82E, 0x4063B020, 0x40646420, + 0x00000003, 0x4062C82F, 0x4063B020, 0x40646420, 0x00000003, 0x4062C830, + 0x4063B020, 0x40646420, 0x00000003, 0x4062C831, 0x4063B020, 0x40646420, + 0x00000003, 0x4062C832, 0x4063B020, 0x40646420, 0x00000003, 0x4062C833, + 0x4063B020, 0x40646420, 0x00000003, 0x4062C834, 0x4063B020, 0x40646420, + 0x00000003, 0x4062C835, 0x4063B020, 0x40646420, 0x00000003, 0x4062C836, + 0x4063B020, 0x40646420, 0x00000003, 0x4062C837, 0x4063B020, 0x40646420, + 0x00000003, 0x4062C821, 0x4063B020, 0x40646A20, + // Block 596, offset 0x9500 + 0x00000003, 0x4062C822, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C823, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062C824, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062C825, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C826, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062C827, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062C828, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C829, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062C82A, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062C82B, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C82C, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062C82D, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062C82E, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C82F, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062C830, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062C831, 0x4063B020, 0x40646A20, + // Block 597, offset 0x9540 + 0x00000003, 0x4062C832, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C833, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062C834, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062C835, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C836, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062C837, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062C838, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C839, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062C83A, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062C83B, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C83C, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062C83D, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062C83E, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C83F, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062C840, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062C841, 0x4063B020, 0x40646A20, + // Block 598, offset 0x9580 + 0x00000003, 0x4062C842, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C843, + 0x4063B020, 0x40646A20, 0x00000003, 0x4062C844, 0x4063B020, 0x40646A20, + 0x00000003, 0x4062C845, 0x4063B020, 0x40646A20, 0x00000003, 0x4062C821, + 0x4063B020, 0x40647220, 0x00000003, 0x4062C822, 0x4063B020, 0x40647220, + 0x00000003, 0x4062C823, 0x4063B020, 0x40647220, 0x00000003, 0x4062C824, + 0x4063B020, 0x40647220, 0x00000003, 0x4062C825, 0x4063B020, 0x40647220, + 0x00000003, 0x4062C826, 0x4063B020, 0x40647220, 0x00000003, 0x4062C827, + 0x4063B020, 0x40647220, 0x00000003, 0x4062C828, 0x4063B020, 0x40647220, + 0x00000003, 0x4062C829, 0x4063B020, 0x40647220, 0x00000003, 0x4062C82A, + 0x4063B020, 0x40647220, 0x00000003, 0x4062C82B, 0x4063B020, 0x40647220, + 0x00000003, 0x4062C82C, 0x4063B020, 0x40647220, + // Block 599, offset 0x95c0 + 0x00000003, 0x4062C82D, 0x4063B020, 0x40647220, 0x00000003, 0x4062C82E, + 0x4063B020, 0x40647220, 0x00000003, 0x4062C82F, 0x4063B020, 0x40647220, + 0x00000003, 0x4062C830, 0x4063B020, 0x40647220, 0x00000003, 0x4062C831, + 0x4063B020, 0x40647220, 0x00000003, 0x4062C832, 0x4063B020, 0x40647220, + 0x00000003, 0x4062C833, 0x4063B020, 0x40647220, 0x00000003, 0x4062C834, + 0x4063B020, 0x40647220, 0x00000003, 0x4062C821, 0x4063B020, 0x40648220, + 0x00000003, 0x4062C822, 0x4063B020, 0x40648220, 0x00000003, 0x4062C823, + 0x4063B020, 0x40648220, 0x00000003, 0x4062C824, 0x4063B020, 0x40648220, + 0x00000003, 0x4062C825, 0x4063B020, 0x40648220, 0x00000003, 0x4062C826, + 0x4063B020, 0x40648220, 0x00000003, 0x4062C827, 0x4063B020, 0x40648220, + 0x00000003, 0x4062C828, 0x4063B020, 0x40648220, + // Block 600, offset 0x9600 + 0x00000003, 0x4062C829, 0x4063B020, 0x40648220, 0x00000003, 0x4062C82A, + 0x4063B020, 0x40648220, 0x00000003, 0x4062C82B, 0x4063B020, 0x40648220, + 0x00000003, 0x4062C82C, 0x4063B020, 0x40648220, 0x00000003, 0x4062C82D, + 0x4063B020, 0x40648220, 0x00000003, 0x4062C82E, 0x4063B020, 0x40648220, + 0x00000003, 0x4062C82F, 0x4063B020, 0x40648220, 0x00000003, 0x4062C830, + 0x4063B020, 0x40648220, 0x00000003, 0x4062C831, 0x4063B020, 0x40648220, + 0x00000003, 0x4062C832, 0x4063B020, 0x40648220, 0x00000003, 0x4062C821, + 0x4063B020, 0x40648420, 0x00000003, 0x4062C822, 0x4063B020, 0x40648420, + 0x00000003, 0x4062C823, 0x4063B020, 0x40648420, 0x00000003, 0x4062C824, + 0x4063B020, 0x40648420, 0x00000003, 0x4062C825, 0x4063B020, 0x40648420, + 0x00000003, 0x4062C826, 0x4063B020, 0x40648420, + // Block 601, offset 0x9640 + 0x00000003, 0x4062C827, 0x4063B020, 0x40648420, 0x00000003, 0x4062C828, + 0x4063B020, 0x40648420, 0x00000003, 0x4062C829, 0x4063B020, 0x40648420, + 0x00000003, 0x4062C82A, 0x4063B020, 0x40648420, 0x00000003, 0x4062C82B, + 0x4063B020, 0x40648420, 0x00000003, 0x4062C82C, 0x4063B020, 0x40648420, + 0x00000003, 0x4062C82D, 0x4063B020, 0x40648420, 0x00000003, 0x4062C82E, + 0x4063B020, 0x40648420, 0x00000003, 0x4062C82F, 0x4063B020, 0x40648420, + 0x00000003, 0x4062C821, 0x4063B020, 0x40648C20, 0x00000003, 0x4062C822, + 0x4063B020, 0x40648C20, 0x00000003, 0x4062C823, 0x4063B020, 0x40648C20, + 0x00000003, 0x4062C824, 0x4063B020, 0x40648C20, 0x00000003, 0x4062C825, + 0x4063B020, 0x40648C20, 0x00000003, 0x4062C826, 0x4063B020, 0x40648C20, + 0x00000003, 0x4062C827, 0x4063B020, 0x40648C20, + // Block 602, offset 0x9680 + 0x00000003, 0x4062C828, 0x4063B020, 0x40648C20, 0x00000003, 0x4062C829, + 0x4063B020, 0x40648C20, 0x00000003, 0x4062C82A, 0x4063B020, 0x40648C20, + 0x00000003, 0x4062C82B, 0x4063B020, 0x40648C20, 0x00000003, 0x4062C82C, + 0x4063B020, 0x40648C20, 0x00000002, 0x4062C821, 0x4063B220, 0x00000002, + 0x4062C822, 0x4063B220, 0x00000002, 0x4062C823, 0x4063B220, 0x00000002, + 0x4062C824, 0x4063B220, 0x00000002, 0x4062C825, 0x4063B220, 0x00000002, + 0x4062C826, 0x4063B220, 0x00000002, 0x4062C827, 0x4063B220, 0x00000002, + 0x4062C828, 0x4063B220, 0x00000002, 0x4062C829, 0x4063B220, 0x00000002, + 0x4062C82A, 0x4063B220, 0x00000002, 0x4062C82B, 0x4063B220, 0x00000002, + 0x4062C82C, 0x4063B220, 0x00000002, 0x4062C82D, 0x4063B220, 0x00000002, + 0x4062C82E, 0x4063B220, 0x00000002, 0x4062C82F, + // Block 603, offset 0x96c0 + 0x4063B220, 0x00000002, 0x4062C830, 0x4063B220, 0x00000002, 0x4062C831, + 0x4063B220, 0x00000002, 0x4062C832, 0x4063B220, 0x00000002, 0x4062C833, + 0x4063B220, 0x00000002, 0x4062C834, 0x4063B220, 0x00000002, 0x4062C821, + 0x4063B820, 0x00000002, 0x4062C822, 0x4063B820, 0x00000002, 0x4062C823, + 0x4063B820, 0x00000002, 0x4062C824, 0x4063B820, 0x00000002, 0x4062C825, + 0x4063B820, 0x00000002, 0x4062C826, 0x4063B820, 0x00000002, 0x4062C827, + 0x4063B820, 0x00000002, 0x4062C828, 0x4063B820, 0x00000002, 0x4062C829, + 0x4063B820, 0x00000002, 0x4062C82A, 0x4063B820, 0x00000002, 0x4062C82B, + 0x4063B820, 0x00000002, 0x4062C82C, 0x4063B820, 0x00000002, 0x4062C82D, + 0x4063B820, 0x00000002, 0x4062C82E, 0x4063B820, 0x00000002, 0x4062C82F, + 0x4063B820, 0x00000002, 0x4062C830, 0x4063B820, + // Block 604, offset 0x9700 + 0x00000002, 0x4062C831, 0x4063B820, 0x00000002, 0x4062C832, 0x4063B820, + 0x00000002, 0x4062C833, 0x4063B820, 0x00000002, 0x4062C834, 0x4063B820, + 0x00000002, 0x4062C835, 0x4063B820, 0x00000002, 0x4062C836, 0x4063B820, + 0x00000002, 0x4062C837, 0x4063B820, 0x00000002, 0x4062C838, 0x4063B820, + 0x00000002, 0x4062C839, 0x4063B820, 0x00000002, 0x4062C83A, 0x4063B820, + 0x00000002, 0x4062C83B, 0x4063B820, 0x00000002, 0x4062C83C, 0x4063B820, + 0x00000002, 0x4062C83D, 0x4063B820, 0x00000002, 0x4062C83E, 0x4063B820, + 0x00000002, 0x4062C83F, 0x4063B820, 0x00000002, 0x4062C840, 0x4063B820, + 0x00000002, 0x4062C841, 0x4063B820, 0x00000002, 0x4062C842, 0x4063B820, + 0x00000002, 0x4062C843, 0x4063B820, 0x00000002, 0x4062C844, 0x4063B820, + 0x00000002, 0x4062C845, 0x4063B820, 0x00000002, + // Block 605, offset 0x9740 + 0x4062C846, 0x4063B820, 0x00000002, 0x4062C847, 0x4063B820, 0x00000002, + 0x4062C848, 0x4063B820, 0x00000002, 0x4062C849, 0x4063B820, 0x00000002, + 0x4062C84A, 0x4063B820, 0x00000002, 0x4062C84B, 0x4063B820, 0x00000002, + 0x4062C84C, 0x4063B820, 0x00000002, 0x4062C84D, 0x4063B820, 0x00000002, + 0x4062C84E, 0x4063B820, 0x00000002, 0x4062C84F, 0x4063B820, 0x00000002, + 0x4062C850, 0x4063B820, 0x00000002, 0x4062C851, 0x4063B820, 0x00000002, + 0x4062C852, 0x4063B820, 0x00000002, 0x4062C853, 0x4063B820, 0x00000002, + 0x4062C854, 0x4063B820, 0x00000002, 0x4062C855, 0x4063B820, 0x00000002, + 0x4062C856, 0x4063B820, 0x00000002, 0x4062C857, 0x4063B820, 0x00000002, + 0x4062C858, 0x4063B820, 0x00000003, 0x4062C821, 0x4063B820, 0x40646420, + 0x00000003, 0x4062C822, 0x4063B820, 0x40646420, + // Block 606, offset 0x9780 + 0x00000003, 0x4062C823, 0x4063B820, 0x40646420, 0x00000003, 0x4062C824, + 0x4063B820, 0x40646420, 0x00000003, 0x4062C825, 0x4063B820, 0x40646420, + 0x00000003, 0x4062C826, 0x4063B820, 0x40646420, 0x00000003, 0x4062C827, + 0x4063B820, 0x40646420, 0x00000003, 0x4062C828, 0x4063B820, 0x40646420, + 0x00000003, 0x4062C829, 0x4063B820, 0x40646420, 0x00000003, 0x4062C82A, + 0x4063B820, 0x40646420, 0x00000003, 0x4062C82B, 0x4063B820, 0x40646420, + 0x00000003, 0x4062C82C, 0x4063B820, 0x40646420, 0x00000003, 0x4062C821, + 0x4063B820, 0x40646A20, 0x00000003, 0x4062C822, 0x4063B820, 0x40646A20, + 0x00000003, 0x4062C823, 0x4063B820, 0x40646A20, 0x00000003, 0x4062C824, + 0x4063B820, 0x40646A20, 0x00000003, 0x4062C825, 0x4063B820, 0x40646A20, + 0x00000003, 0x4062C821, 0x4063B820, 0x40648C20, + // Block 607, offset 0x97c0 + 0x00000003, 0x4062C822, 0x4063B820, 0x40648C20, 0x00000003, 0x4062C823, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062C824, 0x4063B820, 0x40648C20, + 0x00000003, 0x4062C825, 0x4063B820, 0x40648C20, 0x00000003, 0x4062C826, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062C827, 0x4063B820, 0x40648C20, + 0x00000003, 0x4062C828, 0x4063B820, 0x40648C20, 0x00000003, 0x4062C829, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062C82A, 0x4063B820, 0x40648C20, + 0x00000003, 0x4062C82B, 0x4063B820, 0x40648C20, 0x00000003, 0x4062C82C, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062C82D, 0x4063B820, 0x40648C20, + 0x00000003, 0x4062C82E, 0x4063B820, 0x40648C20, 0x00000003, 0x4062C82F, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062C821, 0x4063BA20, 0x40647220, + 0x00000002, 0x4062C821, 0x4063BE20, 0x00000002, + // Block 608, offset 0x9800 + 0x4062C822, 0x4063BE20, 0x00000002, 0x4062C823, 0x4063BE20, 0x00000002, + 0x4062C824, 0x4063BE20, 0x00000002, 0x4062C825, 0x4063BE20, 0x00000002, + 0x4062C826, 0x4063BE20, 0x00000002, 0x4062C827, 0x4063BE20, 0x00000002, + 0x4062C828, 0x4063BE20, 0x00000002, 0x4062C829, 0x4063BE20, 0x00000002, + 0x4062C82A, 0x4063BE20, 0x00000002, 0x4062C82B, 0x4063BE20, 0x00000002, + 0x4062C821, 0x4063C220, 0x00000002, 0x4062C822, 0x4063C220, 0x00000002, + 0x4062C823, 0x4063C220, 0x00000002, 0x4062C824, 0x4063C220, 0x00000002, + 0x4062C825, 0x4063C220, 0x00000002, 0x4062C826, 0x4063C220, 0x00000002, + 0x4062C827, 0x4063C220, 0x00000002, 0x4062C828, 0x4063C220, 0x00000002, + 0x4062C829, 0x4063C220, 0x00000002, 0x4062C82A, 0x4063C220, 0x00000002, + 0x4062C82B, 0x4063C220, 0x00000002, 0x4062C82C, + // Block 609, offset 0x9840 + 0x4063C220, 0x00000002, 0x4062C82D, 0x4063C220, 0x00000002, 0x4062C82E, + 0x4063C220, 0x00000002, 0x4062C82F, 0x4063C220, 0x00000002, 0x4062C830, + 0x4063C220, 0x00000002, 0x4062C831, 0x4063C220, 0x00000002, 0x4062C832, + 0x4063C220, 0x00000002, 0x4062C833, 0x4063C220, 0x00000002, 0x4062C834, + 0x4063C220, 0x00000002, 0x4062C835, 0x4063C220, 0x00000002, 0x4062C836, + 0x4063C220, 0x00000002, 0x4062C837, 0x4063C220, 0x00000002, 0x4062C838, + 0x4063C220, 0x00000002, 0x4062C839, 0x4063C220, 0x00000002, 0x4062C83A, + 0x4063C220, 0x00000002, 0x4062C83B, 0x4063C220, 0x00000002, 0x4062C83C, + 0x4063C220, 0x00000002, 0x4062C83D, 0x4063C220, 0x00000002, 0x4062C83E, + 0x4063C220, 0x00000002, 0x4062C83F, 0x4063C220, 0x00000002, 0x4062C840, + 0x4063C220, 0x00000002, 0x4062C841, 0x4063C220, + // Block 610, offset 0x9880 + 0x00000002, 0x4062C842, 0x4063C220, 0x00000002, 0x4062C843, 0x4063C220, + 0x00000002, 0x4062C844, 0x4063C220, 0x00000002, 0x4062C845, 0x4063C220, + 0x00000002, 0x4062C846, 0x4063C220, 0x00000002, 0x4062C847, 0x4063C220, + 0x00000002, 0x4062C848, 0x4063C220, 0x00000002, 0x4062C849, 0x4063C220, + 0x00000002, 0x4062C84A, 0x4063C220, 0x00000002, 0x4062C84B, 0x4063C220, + 0x00000002, 0x4062C84C, 0x4063C220, 0x00000002, 0x4062C84D, 0x4063C220, + 0x00000002, 0x4062C84E, 0x4063C220, 0x00000002, 0x4062C84F, 0x4063C220, + 0x00000002, 0x4062C850, 0x4063C220, 0x00000002, 0x4062C851, 0x4063C220, + 0x00000002, 0x4062C852, 0x4063C220, 0x00000002, 0x4062C853, 0x4063C220, + 0x00000003, 0x4062C821, 0x4063C220, 0x40646420, 0x00000003, 0x4062C822, + 0x4063C220, 0x40646420, 0x00000003, 0x4062C823, + // Block 611, offset 0x98c0 + 0x4063C220, 0x40646420, 0x00000003, 0x4062C824, 0x4063C220, 0x40646420, + 0x00000003, 0x4062C825, 0x4063C220, 0x40646420, 0x00000003, 0x4062C826, + 0x4063C220, 0x40646420, 0x00000003, 0x4062C827, 0x4063C220, 0x40646420, + 0x00000003, 0x4062C828, 0x4063C220, 0x40646420, 0x00000003, 0x4062C829, + 0x4063C220, 0x40646420, 0x00000003, 0x4062C82A, 0x4063C220, 0x40646420, + 0x00000003, 0x4062C82B, 0x4063C220, 0x40646420, 0x00000003, 0x4062C82C, + 0x4063C220, 0x40646420, 0x00000003, 0x4062C82D, 0x4063C220, 0x40646420, + 0x00000003, 0x4062C82E, 0x4063C220, 0x40646420, 0x00000003, 0x4062C82F, + 0x4063C220, 0x40646420, 0x00000003, 0x4062C830, 0x4063C220, 0x40646420, + 0x00000003, 0x4062C831, 0x4063C220, 0x40646420, 0x00000003, 0x4062C821, + 0x4063C220, 0x40646A20, 0x00000003, 0x4062C822, + // Block 612, offset 0x9900 + 0x4063C220, 0x40646A20, 0x00000003, 0x4062C823, 0x4063C220, 0x40646A20, + 0x00000003, 0x4062C821, 0x4063C220, 0x40647220, 0x00000003, 0x4062C822, + 0x4063C220, 0x40647220, 0x00000003, 0x4062C823, 0x4063C220, 0x40647220, + 0x00000003, 0x4062C824, 0x4063C220, 0x40647220, 0x00000003, 0x4062C821, + 0x4063C220, 0x40648C20, 0x00000003, 0x4062C822, 0x4063C220, 0x40648C20, + 0x00000003, 0x4062C823, 0x4063C220, 0x40648C20, 0x00000003, 0x4062C824, + 0x4063C220, 0x40648C20, 0x00000003, 0x4062C825, 0x4063C220, 0x40648C20, + 0x00000003, 0x4062C826, 0x4063C220, 0x40648C20, 0x00000003, 0x4062C827, + 0x4063C220, 0x40648C20, 0x00000003, 0x4062C828, 0x4063C220, 0x40648C20, + 0x00000003, 0x4062C829, 0x4063C220, 0x40648C20, 0x00000002, 0x4062C821, + 0x4063C620, 0x00000002, 0x4062C822, 0x4063C620, + // Block 613, offset 0x9940 + 0x00000002, 0x4062C823, 0x4063C620, 0x00000002, 0x4062C824, 0x4063C620, + 0x00000002, 0x4062C825, 0x4063C620, 0x00000002, 0x4062C826, 0x4063C620, + 0x00000002, 0x4062C827, 0x4063C620, 0x00000002, 0x4062C828, 0x4063C620, + 0x00000002, 0x4062C829, 0x4063C620, 0x00000002, 0x4062C821, 0x4063C820, + 0x00000002, 0x4062C822, 0x4063C820, 0x00000002, 0x4062C823, 0x4063C820, + 0x00000002, 0x4062C824, 0x4063C820, 0x00000002, 0x4062C825, 0x4063C820, + 0x00000002, 0x4062C826, 0x4063C820, 0x00000002, 0x4062C827, 0x4063C820, + 0x00000002, 0x4062C828, 0x4063C820, 0x00000002, 0x4062C829, 0x4063C820, + 0x00000002, 0x4062C82A, 0x4063C820, 0x00000002, 0x4062C82B, 0x4063C820, + 0x00000002, 0x4062C82C, 0x4063C820, 0x00000002, 0x4062C82D, 0x4063C820, + 0x00000002, 0x4062C82E, 0x4063C820, 0x00000002, + // Block 614, offset 0x9980 + 0x4062C82F, 0x4063C820, 0x00000002, 0x4062C830, 0x4063C820, 0x00000002, + 0x4062C831, 0x4063C820, 0x00000003, 0x4062C821, 0x4063CC20, 0x40646420, + 0x00000003, 0x4062C822, 0x4063CC20, 0x40646420, 0x00000003, 0x4062C823, + 0x4063CC20, 0x40646420, 0x00000003, 0x4062C824, 0x4063CC20, 0x40646420, + 0x00000003, 0x4062C825, 0x4063CC20, 0x40646420, 0x00000003, 0x4062C826, + 0x4063CC20, 0x40646420, 0x00000003, 0x4062C827, 0x4063CC20, 0x40646420, + 0x00000003, 0x4062C821, 0x4063CC20, 0x40648C20, 0x00000002, 0x4062C821, + 0x4063D020, 0x00000002, 0x4062C822, 0x4063D020, 0x00000002, 0x4062C823, + 0x4063D020, 0x00000002, 0x4062C824, 0x4063D020, 0x00000002, 0x4062C825, + 0x4063D020, 0x00000002, 0x4062C826, 0x4063D020, 0x00000002, 0x4062C827, + 0x4063D020, 0x00000002, 0x4062C828, 0x4063D020, + // Block 615, offset 0x99c0 + 0x00000002, 0x4062C829, 0x4063D020, 0x00000002, 0x4062C82A, 0x4063D020, + 0x00000002, 0x4062C82B, 0x4063D020, 0x00000002, 0x4062C82C, 0x4063D020, + 0x00000002, 0x4062C82D, 0x4063D020, 0x00000002, 0x4062C82E, 0x4063D020, + 0x00000002, 0x4062C82F, 0x4063D020, 0x00000002, 0x4062C830, 0x4063D020, + 0x00000002, 0x4062C831, 0x4063D020, 0x00000002, 0x4062C832, 0x4063D020, + 0x00000002, 0x4062C833, 0x4063D020, 0x00000002, 0x4062C834, 0x4063D020, + 0x00000002, 0x4062C835, 0x4063D020, 0x00000002, 0x4062C836, 0x4063D020, + 0x00000002, 0x4062C837, 0x4063D020, 0x00000002, 0x4062C838, 0x4063D020, + 0x00000002, 0x4062C839, 0x4063D020, 0x00000002, 0x4062C83A, 0x4063D020, + 0x00000002, 0x4062C83B, 0x4063D020, 0x00000002, 0x4062C83C, 0x4063D020, + 0x00000002, 0x4062C83D, 0x4063D020, 0x00000002, + // Block 616, offset 0x9a00 + 0x4062C83E, 0x4063D020, 0x00000002, 0x4062C83F, 0x4063D020, 0x00000002, + 0x4062C840, 0x4063D020, 0x00000002, 0x4062C841, 0x4063D020, 0x00000002, + 0x4062C842, 0x4063D020, 0x00000002, 0x4062C843, 0x4063D020, 0x00000002, + 0x4062C844, 0x4063D020, 0x00000002, 0x4062C845, 0x4063D020, 0x00000002, + 0x4062C846, 0x4063D020, 0x00000002, 0x4062C847, 0x4063D020, 0x00000002, + 0x4062C848, 0x4063D020, 0x00000002, 0x4062C849, 0x4063D020, 0x00000002, + 0x4062C84A, 0x4063D020, 0x00000003, 0x4062C821, 0x4063D020, 0x40646420, + 0x00000003, 0x4062C822, 0x4063D020, 0x40646420, 0x00000003, 0x4062C823, + 0x4063D020, 0x40646420, 0x00000003, 0x4062C824, 0x4063D020, 0x40646420, + 0x00000003, 0x4062C821, 0x4063D020, 0x40646A20, 0x00000003, 0x4062C822, + 0x4063D020, 0x40646A20, 0x00000003, 0x4062C823, + // Block 617, offset 0x9a40 + 0x4063D020, 0x40646A20, 0x00000003, 0x4062C824, 0x4063D020, 0x40646A20, + 0x00000003, 0x4062C825, 0x4063D020, 0x40646A20, 0x00000003, 0x4062C821, + 0x4063D020, 0x40647220, 0x00000003, 0x4062C822, 0x4063D020, 0x40647220, + 0x00000003, 0x4062C823, 0x4063D020, 0x40647220, 0x00000003, 0x4062C821, + 0x4063D020, 0x40648220, 0x00000003, 0x4062C822, 0x4063D020, 0x40648220, + 0x00000003, 0x4062C823, 0x4063D020, 0x40648220, 0x00000003, 0x4062C824, + 0x4063D020, 0x40648220, 0x00000003, 0x4062C825, 0x4063D020, 0x40648220, + 0x00000003, 0x4062C826, 0x4063D020, 0x40648220, 0x00000003, 0x4062C827, + 0x4063D020, 0x40648220, 0x00000003, 0x4062C828, 0x4063D020, 0x40648220, + 0x00000003, 0x4062C829, 0x4063D020, 0x40648220, 0x00000003, 0x4062C82A, + 0x4063D020, 0x40648220, 0x00000003, 0x4062C82B, + // Block 618, offset 0x9a80 + 0x4063D020, 0x40648220, 0x00000003, 0x4062C82C, 0x4063D020, 0x40648220, + 0x00000003, 0x4062C82D, 0x4063D020, 0x40648220, 0x00000003, 0x4062C82E, + 0x4063D020, 0x40648220, 0x00000003, 0x4062C82F, 0x4063D020, 0x40648220, + 0x00000003, 0x4062C830, 0x4063D020, 0x40648220, 0x00000003, 0x4062C821, + 0x4063D020, 0x40648420, 0x00000003, 0x4062C821, 0x4063D020, 0x40648C20, + 0x00000003, 0x4062C822, 0x4063D020, 0x40648C20, 0x00000002, 0x4062CA21, + 0x4063BC20, 0x00000002, 0x4062CA22, 0x4063BC20, 0x00000002, 0x4062CA23, + 0x4063BC20, 0x00000002, 0x4062CC21, 0x4063A820, 0x00000002, 0x4062CC22, + 0x4063A820, 0x00000002, 0x4062CC23, 0x4063A820, 0x00000002, 0x4062CC24, + 0x4063A820, 0x00000002, 0x4062CC25, 0x4063A820, 0x00000002, 0x4062CC26, + 0x4063A820, 0x00000002, 0x4062CC27, 0x4063A820, + // Block 619, offset 0x9ac0 + 0x00000002, 0x4062CC28, 0x4063A820, 0x00000002, 0x4062CC29, 0x4063A820, + 0x00000002, 0x4062CC2A, 0x4063A820, 0x00000002, 0x4062CC2B, 0x4063A820, + 0x00000002, 0x4062CC2C, 0x4063A820, 0x00000002, 0x4062CC2D, 0x4063A820, + 0x00000002, 0x4062CC2E, 0x4063A820, 0x00000002, 0x4062CC2F, 0x4063A820, + 0x00000002, 0x4062CC30, 0x4063A820, 0x00000002, 0x4062CC31, 0x4063A820, + 0x00000002, 0x4062CC32, 0x4063A820, 0x00000002, 0x4062CC33, 0x4063A820, + 0x00000002, 0x4062CC34, 0x4063A820, 0x00000002, 0x4062CC35, 0x4063A820, + 0x00000002, 0x4062CC36, 0x4063A820, 0x00000002, 0x4062CC37, 0x4063A820, + 0x00000002, 0x4062CC38, 0x4063A820, 0x00000002, 0x4062CC39, 0x4063A820, + 0x00000002, 0x4062CC3A, 0x4063A820, 0x00000002, 0x4062CC3B, 0x4063A820, + 0x00000003, 0x4062CC21, 0x4063A820, 0x40646420, + // Block 620, offset 0x9b00 + 0x00000003, 0x4062CC22, 0x4063A820, 0x40646420, 0x00000003, 0x4062CC23, + 0x4063A820, 0x40646420, 0x00000003, 0x4062CC24, 0x4063A820, 0x40646420, + 0x00000003, 0x4062CC25, 0x4063A820, 0x40646420, 0x00000003, 0x4062CC26, + 0x4063A820, 0x40646420, 0x00000003, 0x4062CC27, 0x4063A820, 0x40646420, + 0x00000003, 0x4062CC28, 0x4063A820, 0x40646420, 0x00000003, 0x4062CC29, + 0x4063A820, 0x40646420, 0x00000003, 0x4062CC2A, 0x4063A820, 0x40646420, + 0x00000003, 0x4062CC2B, 0x4063A820, 0x40646420, 0x00000003, 0x4062CC2C, + 0x4063A820, 0x40646420, 0x00000003, 0x4062CC2D, 0x4063A820, 0x40646420, + 0x00000003, 0x4062CC2E, 0x4063A820, 0x40646420, 0x00000003, 0x4062CC2F, + 0x4063A820, 0x40646420, 0x00000003, 0x4062CC30, 0x4063A820, 0x40646420, + 0x00000003, 0x4062CC31, 0x4063A820, 0x40646420, + // Block 621, offset 0x9b40 + 0x00000003, 0x4062CC32, 0x4063A820, 0x40646420, 0x00000003, 0x4062CC33, + 0x4063A820, 0x40646420, 0x00000003, 0x4062CC34, 0x4063A820, 0x40646420, + 0x00000003, 0x4062CC35, 0x4063A820, 0x40646420, 0x00000003, 0x4062CC36, + 0x4063A820, 0x40646420, 0x00000003, 0x4062CC37, 0x4063A820, 0x40646420, + 0x00000003, 0x4062CC21, 0x4063A820, 0x40646A20, 0x00000003, 0x4062CC22, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062CC23, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062CC24, 0x4063A820, 0x40646A20, 0x00000003, 0x4062CC25, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062CC26, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062CC27, 0x4063A820, 0x40646A20, 0x00000003, 0x4062CC28, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062CC29, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062CC2A, 0x4063A820, 0x40646A20, + // Block 622, offset 0x9b80 + 0x00000003, 0x4062CC2B, 0x4063A820, 0x40646A20, 0x00000003, 0x4062CC2C, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062CC2D, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062CC2E, 0x4063A820, 0x40646A20, 0x00000003, 0x4062CC2F, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062CC21, 0x4063A820, 0x40647220, + 0x00000003, 0x4062CC22, 0x4063A820, 0x40647220, 0x00000003, 0x4062CC23, + 0x4063A820, 0x40647220, 0x00000003, 0x4062CC21, 0x4063A820, 0x40648220, + 0x00000003, 0x4062CC22, 0x4063A820, 0x40648220, 0x00000003, 0x4062CC23, + 0x4063A820, 0x40648220, 0x00000003, 0x4062CC24, 0x4063A820, 0x40648220, + 0x00000003, 0x4062CC25, 0x4063A820, 0x40648220, 0x00000003, 0x4062CC26, + 0x4063A820, 0x40648220, 0x00000003, 0x4062CC27, 0x4063A820, 0x40648220, + 0x00000003, 0x4062CC21, 0x4063A820, 0x40648420, + // Block 623, offset 0x9bc0 + 0x00000003, 0x4062CC22, 0x4063A820, 0x40648420, 0x00000003, 0x4062CC23, + 0x4063A820, 0x40648420, 0x00000003, 0x4062CC24, 0x4063A820, 0x40648420, + 0x00000003, 0x4062CC25, 0x4063A820, 0x40648420, 0x00000003, 0x4062CC26, + 0x4063A820, 0x40648420, 0x00000003, 0x4062CC21, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062CC22, 0x4063A820, 0x40648C20, 0x00000003, 0x4062CC23, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062CC24, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062CC25, 0x4063A820, 0x40648C20, 0x00000003, 0x4062CC26, + 0x4063A820, 0x40648C20, 0x00000003, 0x4062CC27, 0x4063A820, 0x40648C20, + 0x00000003, 0x4062CC28, 0x4063A820, 0x40648C20, 0x00000002, 0x4062CC21, + 0x4063AA20, 0x00000002, 0x4062CC22, 0x4063AA20, 0x00000002, 0x4062CC23, + 0x4063AA20, 0x00000002, 0x4062CC24, 0x4063AA20, + // Block 624, offset 0x9c00 + 0x00000002, 0x4062CC25, 0x4063AA20, 0x00000002, 0x4062CC26, 0x4063AA20, + 0x00000002, 0x4062CC27, 0x4063AA20, 0x00000002, 0x4062CC28, 0x4063AA20, + 0x00000002, 0x4062CC29, 0x4063AA20, 0x00000002, 0x4062CC2A, 0x4063AA20, + 0x00000002, 0x4062CC2B, 0x4063AA20, 0x00000002, 0x4062CC2C, 0x4063AA20, + 0x00000002, 0x4062CC2D, 0x4063AA20, 0x00000002, 0x4062CC2E, 0x4063AA20, + 0x00000002, 0x4062CC2F, 0x4063AA20, 0x00000002, 0x4062CC30, 0x4063AA20, + 0x00000002, 0x4062CC31, 0x4063AA20, 0x00000002, 0x4062CC32, 0x4063AA20, + 0x00000002, 0x4062CC33, 0x4063AA20, 0x00000002, 0x4062CC34, 0x4063AA20, + 0x00000002, 0x4062CC35, 0x4063AA20, 0x00000003, 0x4062CC21, 0x4063AA20, + 0x40646420, 0x00000003, 0x4062CC22, 0x4063AA20, 0x40646420, 0x00000003, + 0x4062CC21, 0x4063AA20, 0x40648C20, 0x00000003, + // Block 625, offset 0x9c40 + 0x4062CC22, 0x4063AA20, 0x40648C20, 0x00000003, 0x4062CC23, 0x4063AA20, + 0x40648C20, 0x00000002, 0x4062CC21, 0x4063B020, 0x00000002, 0x4062CC21, + 0x4063B820, 0x00000002, 0x4062CC22, 0x4063B820, 0x00000002, 0x4062CC23, + 0x4063B820, 0x00000002, 0x4062CC24, 0x4063B820, 0x00000003, 0x4062CC21, + 0x4063B820, 0x40646A20, 0x00000003, 0x4062CC22, 0x4063B820, 0x40646A20, + 0x00000003, 0x4062CC23, 0x4063B820, 0x40646A20, 0x00000003, 0x4062CC21, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062CC22, 0x4063B820, 0x40648C20, + 0x00000003, 0x4062CC23, 0x4063B820, 0x40648C20, 0x00000003, 0x4062CC24, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062CC25, 0x4063B820, 0x40648C20, + 0x00000003, 0x4062CC26, 0x4063B820, 0x40648C20, 0x00000003, 0x4062CC27, + 0x4063B820, 0x40648C20, 0x00000003, 0x4062CC28, + // Block 626, offset 0x9c80 + 0x4063B820, 0x40648C20, 0x00000003, 0x4062CC29, 0x4063B820, 0x40648C20, + 0x00000002, 0x4062CC21, 0x4063BE20, 0x00000002, 0x4062CC22, 0x4063BE20, + 0x00000002, 0x4062CC23, 0x4063BE20, 0x00000002, 0x4062CC24, 0x4063BE20, + 0x00000002, 0x4062CC25, 0x4063BE20, 0x00000002, 0x4062CC26, 0x4063BE20, + 0x00000002, 0x4062CC27, 0x4063BE20, 0x00000002, 0x4062CC21, 0x4063C220, + 0x00000002, 0x4062CC22, 0x4063C220, 0x00000002, 0x4062CC23, 0x4063C220, + 0x00000002, 0x4062CC24, 0x4063C220, 0x00000002, 0x4062CC25, 0x4063C220, + 0x00000002, 0x4062CC26, 0x4063C220, 0x00000002, 0x4062CC27, 0x4063C220, + 0x00000002, 0x4062CC28, 0x4063C220, 0x00000002, 0x4062CC29, 0x4063C220, + 0x00000003, 0x4062CC21, 0x4063C220, 0x40648C20, 0x00000003, 0x4062CC21, + 0x4063CC20, 0x40646420, 0x00000003, 0x4062CC22, + // Block 627, offset 0x9cc0 + 0x4063CC20, 0x40646420, 0x00000003, 0x4062CC23, 0x4063CC20, 0x40646420, + 0x00000003, 0x4062CC21, 0x4063CC20, 0x40648220, 0x00000002, 0x4062CE21, + 0x4063A820, 0x00000002, 0x4062CE22, 0x4063A820, 0x00000002, 0x4062CE23, + 0x4063A820, 0x00000002, 0x4062CE24, 0x4063A820, 0x00000002, 0x4062CE25, + 0x4063A820, 0x00000002, 0x4062CE26, 0x4063A820, 0x00000002, 0x4062CE27, + 0x4063A820, 0x00000002, 0x4062CE28, 0x4063A820, 0x00000002, 0x4062CE29, + 0x4063A820, 0x00000002, 0x4062CE2A, 0x4063A820, 0x00000002, 0x4062CE2B, + 0x4063A820, 0x00000002, 0x4062CE2C, 0x4063A820, 0x00000002, 0x4062CE2D, + 0x4063A820, 0x00000002, 0x4062CE2E, 0x4063A820, 0x00000002, 0x4062CE2F, + 0x4063A820, 0x00000002, 0x4062CE30, 0x4063A820, 0x00000002, 0x4062CE31, + 0x4063A820, 0x00000002, 0x4062CE32, 0x4063A820, + // Block 628, offset 0x9d00 + 0x00000002, 0x4062CE33, 0x4063A820, 0x00000002, 0x4062CE34, 0x4063A820, + 0x00000002, 0x4062CE35, 0x4063A820, 0x00000002, 0x4062CE36, 0x4063A820, + 0x00000002, 0x4062CE37, 0x4063A820, 0x00000002, 0x4062CE38, 0x4063A820, + 0x00000002, 0x4062CE39, 0x4063A820, 0x00000002, 0x4062CE3A, 0x4063A820, + 0x00000002, 0x4062CE3B, 0x4063A820, 0x00000002, 0x4062CE3C, 0x4063A820, + 0x00000002, 0x4062CE3D, 0x4063A820, 0x00000002, 0x4062CE3E, 0x4063A820, + 0x00000003, 0x4062CE21, 0x4063A820, 0x40646A20, 0x00000003, 0x4062CE22, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062CE23, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062CE24, 0x4063A820, 0x40646A20, 0x00000003, 0x4062CE25, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062CE26, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062CE27, 0x4063A820, 0x40646A20, + // Block 629, offset 0x9d40 + 0x00000003, 0x4062CE28, 0x4063A820, 0x40646A20, 0x00000003, 0x4062CE29, + 0x4063A820, 0x40646A20, 0x00000003, 0x4062CE2A, 0x4063A820, 0x40646A20, + 0x00000003, 0x4062CE21, 0x4063A820, 0x40647220, 0x00000003, 0x4062CE22, + 0x4063A820, 0x40647220, 0x00000003, 0x4062CE23, 0x4063A820, 0x40647220, + 0x00000003, 0x4062CE24, 0x4063A820, 0x40647220, 0x00000003, 0x4062CE25, + 0x4063A820, 0x40647220, 0x00000002, 0x4062CE21, 0x4063AA20, 0x00000002, + 0x4062CE22, 0x4063AA20, 0x00000002, 0x4062CE23, 0x4063AA20, 0x00000002, + 0x4062CE24, 0x4063AA20, 0x00000002, 0x4062CE25, 0x4063AA20, 0x00000002, + 0x4062CE26, 0x4063AA20, 0x00000002, 0x4062CE27, 0x4063AA20, 0x00000002, + 0x4062CE28, 0x4063AA20, 0x00000002, 0x4062CE29, 0x4063AA20, 0x00000002, + 0x4062CE2A, 0x4063AA20, 0x00000002, 0x4062CE2B, + // Block 630, offset 0x9d80 + 0x4063AA20, 0x00000002, 0x4062CE2C, 0x4063AA20, 0x00000002, 0x4062CE2D, + 0x4063AA20, 0x00000002, 0x4062CE2E, 0x4063AA20, 0x00000002, 0x4062CE2F, + 0x4063AA20, 0x00000002, 0x4062CE30, 0x4063AA20, 0x00000003, 0x4062CE21, + 0x4063AA20, 0x40648C20, 0x00000003, 0x4062CE22, 0x4063AA20, 0x40648C20, + 0x00000003, 0x4062CE23, 0x4063AA20, 0x40648C20, 0x00000003, 0x4062CE24, + 0x4063AA20, 0x40648C20, 0x00000003, 0x4062CE25, 0x4063AA20, 0x40648C20, + 0x00000003, 0x4062CE26, 0x4063AA20, 0x40648C20, 0x00000003, 0x4062CE27, + 0x4063AA20, 0x40648C20, 0x00000003, 0x4062CE28, 0x4063AA20, 0x40648C20, + 0x00000003, 0x4062CE21, 0x4063AC20, 0x40646420, 0x00000003, 0x4062CE21, + 0x4063B420, 0x40646A20, 0x00000003, 0x4062CE22, 0x4063B420, 0x40646A20, + 0x00000003, 0x4062CE23, 0x4063B420, 0x40646A20, + // Block 631, offset 0x9dc0 + 0x00000003, 0x4062CE24, 0x4063B420, 0x40646A20, 0x00000003, 0x4062CE25, + 0x4063B420, 0x40646A20, 0x00000003, 0x4062CE26, 0x4063B420, 0x40646A20, + 0x00000003, 0x4062CE27, 0x4063B420, 0x40646A20, 0x00000003, 0x4062CE28, + 0x4063B420, 0x40646A20, 0x00000003, 0x4062CE29, 0x4063B420, 0x40646A20, + 0x00000003, 0x4062CE2A, 0x4063B420, 0x40646A20, 0x00000003, 0x4062CE2B, + 0x4063B420, 0x40646A20, 0x00000003, 0x4062CE2C, 0x4063B420, 0x40646A20, + 0x00000003, 0x4062CE2D, 0x4063B420, 0x40646A20, 0x00000003, 0x4062CE2E, + 0x4063B420, 0x40646A20, 0x00000003, 0x4062CE2F, 0x4063B420, 0x40646A20, + 0x00000003, 0x4062CE30, 0x4063B420, 0x40646A20, 0x00000003, 0x4062CE31, + 0x4063B420, 0x40646A20, 0x00000003, 0x4062CE32, 0x4063B420, 0x40646A20, + 0x00000003, 0x4062CE33, 0x4063B420, 0x40646A20, + // Block 632, offset 0x9e00 + 0x00000003, 0x4062CE21, 0x4063B420, 0x40648220, 0x00000003, 0x4062CE22, + 0x4063B420, 0x40648220, 0x00000003, 0x4062CE23, 0x4063B420, 0x40648220, + 0x00000003, 0x4062CE21, 0x4063B420, 0x40648C20, 0x00000003, 0x4062CE22, + 0x4063B420, 0x40648C20, 0x00000003, 0x4062CE23, 0x4063B420, 0x40648C20, + 0x00000003, 0x4062CE24, 0x4063B420, 0x40648C20, 0x00000003, 0x4062CE25, + 0x4063B420, 0x40648C20, 0x00000003, 0x4062CE26, 0x4063B420, 0x40648C20, + 0x00000003, 0x4062CE27, 0x4063B420, 0x40648C20, 0x00000003, 0x4062CE28, + 0x4063B420, 0x40648C20, 0x00000003, 0x4062CE29, 0x4063B420, 0x40648C20, + 0x00000003, 0x4062CE2A, 0x4063B420, 0x40648C20, 0x00000003, 0x4062CE2B, + 0x4063B420, 0x40648C20, 0x00000002, 0x4062CE21, 0x4063B620, 0x00000002, + 0x4062CE22, 0x4063B620, 0x00000002, 0x4062CE23, + // Block 633, offset 0x9e40 + 0x4063B620, 0x00000002, 0x4062CE24, 0x4063B620, 0x00000002, 0x4062CE25, + 0x4063B620, 0x00000002, 0x4062CE26, 0x4063B620, 0x00000002, 0x4062CE27, + 0x4063B620, 0x00000002, 0x4062CE28, 0x4063B620, 0x00000002, 0x4062CE29, + 0x4063B620, 0x00000002, 0x4062CE2A, 0x4063B620, 0x00000002, 0x4062CE2B, + 0x4063B620, 0x00000002, 0x4062CE2C, 0x4063B620, 0x00000002, 0x4062CE2D, + 0x4063B620, 0x00000002, 0x4062CE2E, 0x4063B620, 0x00000002, 0x4062CE21, + 0x4063B820, 0x00000002, 0x4062CE22, 0x4063B820, 0x00000002, 0x4062CE23, + 0x4063B820, 0x00000002, 0x4062CE24, 0x4063B820, 0x00000002, 0x4062CE25, + 0x4063B820, 0x00000002, 0x4062CE26, 0x4063B820, 0x00000002, 0x4062CE27, + 0x4063B820, 0x00000002, 0x4062CE28, 0x4063B820, 0x00000002, 0x4062CE29, + 0x4063B820, 0x00000002, 0x4062CE2A, 0x4063B820, + // Block 634, offset 0x9e80 + 0x00000002, 0x4062CE2B, 0x4063B820, 0x00000002, 0x4062CE2C, 0x4063B820, + 0x00000002, 0x4062CE2D, 0x4063B820, 0x00000002, 0x4062CE2E, 0x4063B820, + 0x00000002, 0x4062CE2F, 0x4063B820, 0x00000002, 0x4062CE30, 0x4063B820, + 0x00000002, 0x4062CE31, 0x4063B820, 0x00000002, 0x4062CE32, 0x4063B820, + 0x00000002, 0x4062CE33, 0x4063B820, 0x00000002, 0x4062CE34, 0x4063B820, + 0x00000002, 0x4062CE35, 0x4063B820, 0x00000002, 0x4062CE36, 0x4063B820, + 0x00000002, 0x4062CE37, 0x4063B820, 0x00000002, 0x4062CE38, 0x4063B820, + 0x00000002, 0x4062CE39, 0x4063B820, 0x00000002, 0x4062CE3A, 0x4063B820, + 0x00000002, 0x4062CE3B, 0x4063B820, 0x00000002, 0x4062CE3C, 0x4063B820, + 0x00000002, 0x4062CE3D, 0x4063B820, 0x00000002, 0x4062CE3E, 0x4063B820, + 0x00000002, 0x4062CE3F, 0x4063B820, 0x00000002, + // Block 635, offset 0x9ec0 + 0x4062CE40, 0x4063B820, 0x00000002, 0x4062CE41, 0x4063B820, 0x00000002, + 0x4062CE42, 0x4063B820, 0x00000002, 0x4062CE43, 0x4063B820, 0x00000002, + 0x4062CE44, 0x4063B820, 0x00000002, 0x4062CE45, 0x4063B820, 0x00000002, + 0x4062CE46, 0x4063B820, 0x00000002, 0x4062CE47, 0x4063B820, 0x00000003, + 0x4062CE21, 0x4063B820, 0x40646420, 0x00000003, 0x4062CE22, 0x4063B820, + 0x40646420, 0x00000003, 0x4062CE23, 0x4063B820, 0x40646420, 0x00000003, + 0x4062CE24, 0x4063B820, 0x40646420, 0x00000003, 0x4062CE25, 0x4063B820, + 0x40646420, 0x00000002, 0x4062CE21, 0x4063C020, 0x00000002, 0x4062CE22, + 0x4063C020, 0x00000002, 0x4062CE23, 0x4063C020, 0x00000002, 0x4062CE24, + 0x4063C020, 0x00000002, 0x4062CE25, 0x4063C020, 0x00000002, 0x4062CE26, + 0x4063C020, 0x00000002, 0x4062CE27, 0x4063C020, + // Block 636, offset 0x9f00 + 0x00000002, 0x4062CE28, 0x4063C020, 0x00000002, 0x4062CE29, 0x4063C020, + 0x00000002, 0x4062CE2A, 0x4063C020, 0x00000002, 0x4062CE2B, 0x4063C020, + 0x00000002, 0x4062CE2C, 0x4063C020, 0x00000002, 0x4062CE2D, 0x4063C020, + 0x00000002, 0x4062CE2E, 0x4063C020, 0x00000002, 0x4062CE2F, 0x4063C020, + 0x00000002, 0x4062CE30, 0x4063C020, 0x00000002, 0x4062CE31, 0x4063C020, + 0x00000002, 0x4062CE32, 0x4063C020, 0x00000002, 0x4062CE33, 0x4063C020, + 0x00000002, 0x4062CE34, 0x4063C020, 0x00000002, 0x4062CE35, 0x4063C020, + 0x00000002, 0x4062CE36, 0x4063C020, 0x00000002, 0x4062CE37, 0x4063C020, + 0x00000002, 0x4062CE38, 0x4063C020, 0x00000002, 0x4062CE39, 0x4063C020, + 0x00000002, 0x4062CE3A, 0x4063C020, 0x00000002, 0x4062CE3B, 0x4063C020, + 0x00000003, 0x4062CE21, 0x4063C220, 0x40648220, + // Block 637, offset 0x9f40 + 0x00000003, 0x4062CE22, 0x4063C220, 0x40648220, 0x00000003, 0x4062CE23, + 0x4063C220, 0x40648220, 0x00000003, 0x4062CE21, 0x4063C220, 0x40648C20, + 0x00000003, 0x4062CE22, 0x4063C220, 0x40648C20, 0x00000003, 0x4062CE23, + 0x4063C220, 0x40648C20, 0x00000003, 0x4062CE24, 0x4063C220, 0x40648C20, + 0x00000003, 0x4062CE25, 0x4063C220, 0x40648C20, 0x00000003, 0x4062CE26, + 0x4063C220, 0x40648C20, 0x00000003, 0x4062CE27, 0x4063C220, 0x40648C20, + 0x00000002, 0x4062CE21, 0x4063D020, 0x00000002, 0x4062CE22, 0x4063D020, + 0x00000002, 0x4062CE23, 0x4063D020, 0x00000002, 0x4062CE24, 0x4063D020, + 0x00000002, 0x4062CE25, 0x4063D020, 0x00000002, 0x4062CE26, 0x4063D020, + 0x00000002, 0x4062CE27, 0x4063D020, 0x00000002, 0x4062CE28, 0x4063D020, + 0x00000002, 0x4062CE29, 0x4063D020, 0x00000002, + // Block 638, offset 0x9f80 + 0x4062CE2A, 0x4063D020, 0x00000002, 0x4062CE2B, 0x4063D020, 0x00000003, + 0x4062CE21, 0x4063D020, 0x40646420, 0x00000003, 0x4062CE21, 0x4063D020, + 0x40647220, 0x00000003, 0x4062CE22, 0x4063D020, 0x40647220, 0x00000003, + 0x4062CE23, 0x4063D020, 0x40647220, 0x00000003, 0x4062CE24, 0x4063D020, + 0x40647220, 0x00000003, 0x4062CE25, 0x4063D020, 0x40647220, 0x00000003, + 0x4062CE26, 0x4063D020, 0x40647220, 0x00000003, 0x4062CE27, 0x4063D020, + 0x40647220, 0x00000003, 0x4062CE28, 0x4063D020, 0x40647220, 0x00000003, + 0x4062CE29, 0x4063D020, 0x40647220, 0x00000003, 0x4062CE2A, 0x4063D020, + 0x40647220, 0x00000003, 0x4062CE2B, 0x4063D020, 0x40647220, 0x00000003, + 0x4062CE2C, 0x4063D020, 0x40647220, 0x00000003, 0x4062CE2D, 0x4063D020, + 0x40647220, 0x00000003, 0x4062CE2E, 0x4063D020, + // Block 639, offset 0x9fc0 + 0x40647220, 0x00000003, 0x4062CE2F, 0x4063D020, 0x40647220, 0x00000003, + 0x4062CE30, 0x4063D020, 0x40647220, 0x00000003, 0x4062CE31, 0x4063D020, + 0x40647220, 0x00000003, 0x4062CE32, 0x4063D020, 0x40647220, 0x00000003, + 0x4062CE33, 0x4063D020, 0x40647220, 0x00000003, 0x4062CE34, 0x4063D020, + 0x40647220, 0x00000003, 0x4062CE35, 0x4063D020, 0x40647220, 0x00000003, + 0x4062CE36, 0x4063D020, 0x40647220, 0x00000003, 0x4062CE21, 0x4063D020, + 0x40648420, 0x00000003, 0x4062CE22, 0x4063D020, 0x40648420, 0x00000003, + 0x4062CE23, 0x4063D020, 0x40648420, 0x00000002, 0x4062D021, 0x4063A820, + 0x00000002, 0x4062D022, 0x4063A820, 0x00000002, 0x4062D023, 0x4063A820, + 0x00000002, 0x4062D024, 0x4063A820, 0x00000002, 0x4062D025, 0x4063A820, + 0x00000002, 0x4062D026, 0x4063A820, 0x00000002, + // Block 640, offset 0xa000 + 0x4062D027, 0x4063A820, 0x00000002, 0x4062D028, 0x4063A820, 0x00000002, + 0x4062D029, 0x4063A820, 0x00000002, 0x4062D02A, 0x4063A820, 0x00000002, + 0x4062D02B, 0x4063A820, 0x00000002, 0x4062D02C, 0x4063A820, 0x00000002, + 0x4062D02D, 0x4063A820, 0x00000002, 0x4062D02E, 0x4063A820, 0x00000002, + 0x4062D02F, 0x4063A820, 0x00000002, 0x4062D030, 0x4063A820, 0x00000002, + 0x4062D031, 0x4063A820, 0x00000002, 0x4062D032, 0x4063A820, 0x00000002, + 0x4062D033, 0x4063A820, 0x00000002, 0x4062D034, 0x4063A820, 0x00000002, + 0x4062D035, 0x4063A820, 0x00000002, 0x4062D036, 0x4063A820, 0x00000003, + 0x4062D021, 0x4063A820, 0x40646420, 0x00000003, 0x4062D022, 0x4063A820, + 0x40646420, 0x00000003, 0x4062D023, 0x4063A820, 0x40646420, 0x00000003, + 0x4062D024, 0x4063A820, 0x40646420, 0x00000003, + // Block 641, offset 0xa040 + 0x4062D025, 0x4063A820, 0x40646420, 0x00000003, 0x4062D026, 0x4063A820, + 0x40646420, 0x00000003, 0x4062D027, 0x4063A820, 0x40646420, 0x00000003, + 0x4062D028, 0x4063A820, 0x40646420, 0x00000003, 0x4062D029, 0x4063A820, + 0x40646420, 0x00000003, 0x4062D02A, 0x4063A820, 0x40646420, 0x00000003, + 0x4062D02B, 0x4063A820, 0x40646420, 0x00000003, 0x4062D021, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062D022, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062D023, 0x4063A820, 0x40646A20, 0x00000003, 0x4062D024, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062D025, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062D026, 0x4063A820, 0x40646A20, 0x00000003, 0x4062D027, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062D028, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062D029, 0x4063A820, 0x40646A20, 0x00000003, + // Block 642, offset 0xa080 + 0x4062D02A, 0x4063A820, 0x40646A20, 0x00000003, 0x4062D02B, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062D02C, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062D02D, 0x4063A820, 0x40646A20, 0x00000003, 0x4062D02E, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062D02F, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062D030, 0x4063A820, 0x40646A20, 0x00000003, 0x4062D031, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062D032, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062D033, 0x4063A820, 0x40646A20, 0x00000003, 0x4062D034, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062D035, 0x4063A820, 0x40646A20, 0x00000003, + 0x4062D036, 0x4063A820, 0x40646A20, 0x00000003, 0x4062D037, 0x4063A820, + 0x40646A20, 0x00000003, 0x4062D021, 0x4063A820, 0x40647220, 0x00000003, + 0x4062D022, 0x4063A820, 0x40647220, 0x00000003, + // Block 643, offset 0xa0c0 + 0x4062D023, 0x4063A820, 0x40647220, 0x00000003, 0x4062D021, 0x4063A820, + 0x40648220, 0x00000003, 0x4062D022, 0x4063A820, 0x40648220, 0x00000003, + 0x4062D023, 0x4063A820, 0x40648220, 0x00000003, 0x4062D024, 0x4063A820, + 0x40648220, 0x00000003, 0x4062D025, 0x4063A820, 0x40648220, 0x00000003, + 0x4062D026, 0x4063A820, 0x40648220, 0x00000003, 0x4062D027, 0x4063A820, + 0x40648220, 0x00000003, 0x4062D028, 0x4063A820, 0x40648220, 0x00000003, + 0x4062D029, 0x4063A820, 0x40648220, 0x00000003, 0x4062D02A, 0x4063A820, + 0x40648220, 0x00000003, 0x4062D02B, 0x4063A820, 0x40648220, 0x00000003, + 0x4062D02C, 0x4063A820, 0x40648220, 0x00000003, 0x4062D02D, 0x4063A820, + 0x40648220, 0x00000003, 0x4062D02E, 0x4063A820, 0x40648220, 0x00000003, + 0x4062D02F, 0x4063A820, 0x40648220, 0x00000003, + // Block 644, offset 0xa100 + 0x4062D030, 0x4063A820, 0x40648220, 0x00000003, 0x4062D031, 0x4063A820, + 0x40648220, 0x00000003, 0x4062D021, 0x4063A820, 0x40648420, 0x00000003, + 0x4062D022, 0x4063A820, 0x40648420, 0x00000003, 0x4062D023, 0x4063A820, + 0x40648420, 0x00000003, 0x4062D024, 0x4063A820, 0x40648420, 0x00000003, + 0x4062D025, 0x4063A820, 0x40648420, 0x00000003, 0x4062D026, 0x4063A820, + 0x40648420, 0x00000003, 0x4062D027, 0x4063A820, 0x40648420, 0x00000003, + 0x4062D028, 0x4063A820, 0x40648420, 0x00000003, 0x4062D029, 0x4063A820, + 0x40648420, 0x00000003, 0x4062D02A, 0x4063A820, 0x40648420, 0x00000003, + 0x4062D02B, 0x4063A820, 0x40648420, 0x00000003, 0x4062D02C, 0x4063A820, + 0x40648420, 0x00000003, 0x4062D02D, 0x4063A820, 0x40648420, 0x00000003, + 0x4062D02E, 0x4063A820, 0x40648420, 0x00000003, + // Block 645, offset 0xa140 + 0x4062D021, 0x4063A820, 0x40648C20, 0x00000003, 0x4062D022, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062D023, 0x4063A820, 0x40648C20, 0x00000003, + 0x4062D024, 0x4063A820, 0x40648C20, 0x00000003, 0x4062D025, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062D026, 0x4063A820, 0x40648C20, 0x00000003, + 0x4062D027, 0x4063A820, 0x40648C20, 0x00000003, 0x4062D028, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062D029, 0x4063A820, 0x40648C20, 0x00000003, + 0x4062D02A, 0x4063A820, 0x40648C20, 0x00000003, 0x4062D02B, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062D02C, 0x4063A820, 0x40648C20, 0x00000003, + 0x4062D02D, 0x4063A820, 0x40648C20, 0x00000003, 0x4062D02E, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062D02F, 0x4063A820, 0x40648C20, 0x00000003, + 0x4062D030, 0x4063A820, 0x40648C20, 0x00000003, + // Block 646, offset 0xa180 + 0x4062D031, 0x4063A820, 0x40648C20, 0x00000003, 0x4062D032, 0x4063A820, + 0x40648C20, 0x00000003, 0x4062D033, 0x4063A820, 0x40648C20, 0x00000003, + 0x4062D034, 0x4063A820, 0x40648C20, 0x00000002, 0x4062D021, 0x4063AA20, + 0x00000002, 0x4062D022, 0x4063AA20, 0x00000002, 0x4062D023, 0x4063AA20, + 0x00000002, 0x4062D024, 0x4063AA20, 0x00000002, 0x4062D025, 0x4063AA20, + 0x00000002, 0x4062D026, 0x4063AA20, 0x00000002, 0x4062D027, 0x4063AA20, + 0x00000002, 0x4062D028, 0x4063AA20, 0x00000002, 0x4062D029, 0x4063AA20, + 0x00000002, 0x4062D02A, 0x4063AA20, 0x00000002, 0x4062D02B, 0x4063AA20, + 0x00000002, 0x4062D02C, 0x4063AA20, 0x00000002, 0x4062D02D, 0x4063AA20, + 0x00000002, 0x4062D02E, 0x4063AA20, 0x00000002, 0x4062D02F, 0x4063AA20, + 0x00000002, 0x4062D030, 0x4063AA20, 0x00000002, + // Block 647, offset 0xa1c0 + 0x4062D031, 0x4063AA20, 0x00000002, 0x4062D032, 0x4063AA20, 0x00000002, + 0x4062D033, 0x4063AA20, 0x00000002, 0x4062D034, 0x4063AA20, 0x00000002, + 0x4062D035, 0x4063AA20, 0x00000002, 0x4062D036, 0x4063AA20, 0x00000002, + 0x4062D037, 0x4063AA20, 0x00000002, 0x4062D038, 0x4063AA20, 0x00000002, + 0x4062D039, 0x4063AA20, 0x00000002, 0x4062D03A, 0x4063AA20, 0x00000002, + 0x4062D03B, 0x4063AA20, 0x00000002, 0x4062D03C, 0x4063AA20, 0x00000002, + 0x4062D03D, 0x4063AA20, 0x00000003, 0x4062D021, 0x4063AA20, 0x40646420, + 0x00000003, 0x4062D022, 0x4063AA20, 0x40646420, 0x00000003, 0x4062D023, + 0x4063AA20, 0x40646420, 0x00000003, 0x4062D024, 0x4063AA20, 0x40646420, + 0x00000003, 0x4062D021, 0x4063AA20, 0x40648C20, 0x00000003, 0x4062D022, + 0x4063AA20, 0x40648C20, 0x00000003, 0x4062D023, + // Block 648, offset 0xa200 + 0x4063AA20, 0x40648C20, 0x00000003, 0x4062D024, 0x4063AA20, 0x40648C20, + 0x00000003, 0x4062D025, 0x4063AA20, 0x40648C20, 0x00000003, 0x4062D026, + 0x4063AA20, 0x40648C20, 0x00000003, 0x4062D021, 0x4063AC20, 0x40648C20, + 0x00000003, 0x4062D022, 0x4063AC20, 0x40648C20, 0x00000003, 0x4062D023, + 0x4063AC20, 0x40648C20, 0x00000003, 0x4062D024, 0x4063AC20, 0x40648C20, + 0x00000003, 0x4062D025, 0x4063AC20, 0x40648C20, 0x00000003, 0x4062D026, + 0x4063AC20, 0x40648C20, 0x00000003, 0x4062D027, 0x4063AC20, 0x40648C20, + 0x00000003, 0x4062D028, 0x4063AC20, 0x40648C20, 0x00000003, 0x4062D029, + 0x4063AC20, 0x40648C20, 0x00000003, 0x4062D02A, 0x4063AC20, 0x40648C20, + 0x00000002, 0x4062D021, 0x4063B020, 0x00000002, 0x4062D022, 0x4063B020, + 0x00000002, 0x4062D023, 0x4063B020, 0x00000002, + // Block 649, offset 0xa240 + 0x4062D024, 0x4063B020, 0x00000002, 0x4062D025, 0x4063B020, 0x00000003, + 0x4062D021, 0x4063B020, 0x40646A20, 0x00000003, 0x4062D022, 0x4063B020, + 0x40646A20, 0x00000003, 0x4062D023, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062D024, 0x4063B020, 0x40646A20, 0x00000003, 0x4062D025, 0x4063B020, + 0x40646A20, 0x00000003, 0x4062D026, 0x4063B020, 0x40646A20, 0x00000003, + 0x4062D027, 0x4063B020, 0x40646A20, 0x00000003, 0x4062D021, 0x4063B020, + 0x40647220, 0x00000003, 0x4062D021, 0x4063B020, 0x40648220, 0x00000003, + 0x4062D022, 0x4063B020, 0x40648220, 0x00000003, 0x4062D023, 0x4063B020, + 0x40648220, 0x00000003, 0x4062D024, 0x4063B020, 0x40648220, 0x00000003, + 0x4062D025, 0x4063B020, 0x40648220, 0x00000003, 0x4062D021, 0x4063B420, + 0x40646420, 0x00000003, 0x4062D022, 0x4063B420, + // Block 650, offset 0xa280 + 0x40646420, 0x00000003, 0x4062D023, 0x4063B420, 0x40646420, 0x00000003, + 0x4062D024, 0x4063B420, 0x40646420, 0x00000003, 0x4062D025, 0x4063B420, + 0x40646420, 0x00000003, 0x4062D026, 0x4063B420, 0x40646420, 0x00000003, + 0x4062D027, 0x4063B420, 0x40646420, 0x00000003, 0x4062D028, 0x4063B420, + 0x40646420, 0x00000003, 0x4062D021, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062D022, 0x4063B420, 0x40646A20, 0x00000003, 0x4062D023, 0x4063B420, + 0x40646A20, 0x00000003, 0x4062D024, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062D025, 0x4063B420, 0x40646A20, 0x00000003, 0x4062D026, 0x4063B420, + 0x40646A20, 0x00000003, 0x4062D027, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062D028, 0x4063B420, 0x40646A20, 0x00000003, 0x4062D029, 0x4063B420, + 0x40646A20, 0x00000003, 0x4062D02A, 0x4063B420, + // Block 651, offset 0xa2c0 + 0x40646A20, 0x00000003, 0x4062D02B, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062D02C, 0x4063B420, 0x40646A20, 0x00000003, 0x4062D02D, 0x4063B420, + 0x40646A20, 0x00000003, 0x4062D02E, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062D02F, 0x4063B420, 0x40646A20, 0x00000003, 0x4062D030, 0x4063B420, + 0x40646A20, 0x00000003, 0x4062D031, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062D032, 0x4063B420, 0x40646A20, 0x00000003, 0x4062D033, 0x4063B420, + 0x40646A20, 0x00000003, 0x4062D034, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062D035, 0x4063B420, 0x40646A20, 0x00000003, 0x4062D036, 0x4063B420, + 0x40646A20, 0x00000003, 0x4062D037, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062D038, 0x4063B420, 0x40646A20, 0x00000003, 0x4062D039, 0x4063B420, + 0x40646A20, 0x00000003, 0x4062D03A, 0x4063B420, + // Block 652, offset 0xa300 + 0x40646A20, 0x00000003, 0x4062D03B, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062D03C, 0x4063B420, 0x40646A20, 0x00000003, 0x4062D03D, 0x4063B420, + 0x40646A20, 0x00000003, 0x4062D03E, 0x4063B420, 0x40646A20, 0x00000003, + 0x4062D03F, 0x4063B420, 0x40646A20, 0x00000003, 0x4062D040, 0x4063B420, + 0x40646A20, 0x00000003, 0x4062D021, 0x4063B420, 0x40647220, 0x00000003, + 0x4062D022, 0x4063B420, 0x40647220, 0x00000003, 0x4062D023, 0x4063B420, + 0x40647220, 0x00000003, 0x4062D024, 0x4063B420, 0x40647220, 0x00000003, + 0x4062D025, 0x4063B420, 0x40647220, 0x00000003, 0x4062D026, 0x4063B420, + 0x40647220, 0x00000003, 0x4062D021, 0x4063B420, 0x40648220, 0x00000003, + 0x4062D021, 0x4063B420, 0x40648420, 0x00000003, 0x4062D022, 0x4063B420, + 0x40648420, 0x00000003, 0x4062D023, 0x4063B420, + // Block 653, offset 0xa340 + 0x40648420, 0x00000003, 0x4062D024, 0x4063B420, 0x40648420, 0x00000003, + 0x4062D025, 0x4063B420, 0x40648420, 0x00000003, 0x4062D026, 0x4063B420, + 0x40648420, 0x00000003, 0x4062D027, 0x4063B420, 0x40648420, 0x00000003, + 0x4062D028, 0x4063B420, 0x40648420, 0x00000003, 0x4062D029, 0x4063B420, + 0x40648420, 0x00000003, 0x4062D02A, 0x4063B420, 0x40648420, 0x00000003, + 0x4062D02B, 0x4063B420, 0x40648420, 0x00000003, 0x4062D02C, 0x4063B420, + 0x40648420, 0x00000003, 0x4062D02D, 0x4063B420, 0x40648420, 0x00000003, + 0x4062D02E, 0x4063B420, 0x40648420, 0x00000003, 0x4062D02F, 0x4063B420, + 0x40648420, 0x00000003, 0x4062D030, 0x4063B420, 0x40648420, 0x00000003, + 0x4062D031, 0x4063B420, 0x40648420, 0x00000003, 0x4062D032, 0x4063B420, + 0x40648420, 0x00000003, 0x4062D033, 0x4063B420, + // Block 654, offset 0xa380 + 0x40648420, 0x00000003, 0x4062D021, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062D022, 0x4063B420, 0x40648C20, 0x00000003, 0x4062D023, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062D024, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062D025, 0x4063B420, 0x40648C20, 0x00000003, 0x4062D026, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062D027, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062D028, 0x4063B420, 0x40648C20, 0x00000003, 0x4062D029, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062D02A, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062D02B, 0x4063B420, 0x40648C20, 0x00000003, 0x4062D02C, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062D02D, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062D02E, 0x4063B420, 0x40648C20, 0x00000003, 0x4062D02F, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062D030, 0x4063B420, + // Block 655, offset 0xa3c0 + 0x40648C20, 0x00000003, 0x4062D031, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062D032, 0x4063B420, 0x40648C20, 0x00000003, 0x4062D033, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062D034, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062D035, 0x4063B420, 0x40648C20, 0x00000003, 0x4062D036, 0x4063B420, + 0x40648C20, 0x00000003, 0x4062D037, 0x4063B420, 0x40648C20, 0x00000003, + 0x4062D038, 0x4063B420, 0x40648C20, 0x00000003, 0x4062D039, 0x4063B420, + 0x40648C20, 0x00000002, 0x4062D021, 0x4063B620, 0x00000002, 0x4062D022, + 0x4063B620, 0x00000002, 0x4062D023, 0x4063B620, 0x00000002, 0x4062D024, + 0x4063B620, 0x00000002, 0x4062D025, 0x4063B620, 0x00000002, 0x4062D026, + 0x4063B620, 0x00000002, 0x4062D027, 0x4063B620, 0x00000002, 0x4062D028, + 0x4063B620, 0x00000002, 0x4062D029, 0x4063B620, + // Block 656, offset 0xa400 + 0x00000002, 0x4062D02A, 0x4063B620, 0x00000002, 0x4062D02B, 0x4063B620, + 0x00000002, 0x4062D02C, 0x4063B620, 0x00000002, 0x4062D02D, 0x4063B620, + 0x00000002, 0x4062D02E, 0x4063B620, 0x00000002, 0x4062D02F, 0x4063B620, + 0x00000002, 0x4062D030, 0x4063B620, 0x00000002, 0x4062D031, 0x4063B620, + 0x00000002, 0x4062D021, 0x4063B820, 0x00000002, 0x4062D022, 0x4063B820, + 0x00000002, 0x4062D023, 0x4063B820, 0x00000002, 0x4062D024, 0x4063B820, + 0x00000002, 0x4062D025, 0x4063B820, 0x00000002, 0x4062D026, 0x4063B820, + 0x00000002, 0x4062D027, 0x4063B820, 0x00000002, 0x4062D028, 0x4063B820, + 0x00000002, 0x4062D029, 0x4063B820, 0x00000002, 0x4062D02A, 0x4063B820, + 0x00000002, 0x4062D02B, 0x4063B820, 0x00000002, 0x4062D02C, 0x4063B820, + 0x00000002, 0x4062D02D, 0x4063B820, 0x00000002, + // Block 657, offset 0xa440 + 0x4062D02E, 0x4063B820, 0x00000002, 0x4062D02F, 0x4063B820, 0x00000002, + 0x4062D030, 0x4063B820, 0x00000002, 0x4062D031, 0x4063B820, 0x00000002, + 0x4062D032, 0x4063B820, 0x00000002, 0x4062D033, 0x4063B820, 0x00000002, + 0x4062D034, 0x4063B820, 0x00000002, 0x4062D035, 0x4063B820, 0x00000002, + 0x4062D036, 0x4063B820, 0x00000002, 0x4062D037, 0x4063B820, 0x00000002, + 0x4062D038, 0x4063B820, 0x00000002, 0x4062D039, 0x4063B820, 0x00000002, + 0x4062D03A, 0x4063B820, 0x00000002, 0x4062D03B, 0x4063B820, 0x00000002, + 0x4062D03C, 0x4063B820, 0x00000002, 0x4062D03D, 0x4063B820, 0x00000002, + 0x4062D03E, 0x4063B820, 0x00000002, 0x4062D03F, 0x4063B820, 0x00000002, + 0x4062D040, 0x4063B820, 0x00000002, 0x4062D041, 0x4063B820, 0x00000002, + 0x4062D042, 0x4063B820, 0x00000002, 0x4062D043, + // Block 658, offset 0xa480 + 0x4063B820, 0x00000002, 0x4062D044, 0x4063B820, 0x00000002, 0x4062D045, + 0x4063B820, 0x00000002, 0x4062D046, 0x4063B820, 0x00000002, 0x4062D047, + 0x4063B820, 0x00000002, 0x4062D048, 0x4063B820, 0x00000002, 0x4062D049, + 0x4063B820, 0x00000002, 0x4062D04A, 0x4063B820, 0x00000002, 0x4062D04B, + 0x4063B820, 0x00000002, 0x4062D04C, 0x4063B820, 0x00000002, 0x4062D04D, + 0x4063B820, 0x00000002, 0x4062D04E, 0x4063B820, 0x00000002, 0x4062D04F, + 0x4063B820, 0x00000002, 0x4062D050, 0x4063B820, 0x00000002, 0x4062D051, + 0x4063B820, 0x00000002, 0x4062D052, 0x4063B820, 0x00000002, 0x4062D053, + 0x4063B820, 0x00000002, 0x4062D054, 0x4063B820, 0x00000002, 0x4062D055, + 0x4063B820, 0x00000002, 0x4062D056, 0x4063B820, 0x00000002, 0x4062D057, + 0x4063B820, 0x00000002, 0x4062D058, 0x4063B820, + // Block 659, offset 0xa4c0 + 0x00000002, 0x4062D059, 0x4063B820, 0x00000002, 0x4062D05A, 0x4063B820, + 0x00000002, 0x4062D05B, 0x4063B820, 0x00000003, 0x4062D021, 0x4063B820, + 0x40646420, 0x00000003, 0x4062D022, 0x4063B820, 0x40646420, 0x00000003, + 0x4062D023, 0x4063B820, 0x40646420, 0x00000003, 0x4062D021, 0x4063B820, + 0x40646A20, 0x00000003, 0x4062D022, 0x4063B820, 0x40646A20, 0x00000003, + 0x4062D023, 0x4063B820, 0x40646A20, 0x00000003, 0x4062D024, 0x4063B820, + 0x40646A20, 0x00000003, 0x4062D025, 0x4063B820, 0x40646A20, 0x00000003, + 0x4062D026, 0x4063B820, 0x40646A20, 0x00000003, 0x4062D027, 0x4063B820, + 0x40646A20, 0x00000003, 0x4062D028, 0x4063B820, 0x40646A20, 0x00000003, + 0x4062D029, 0x4063B820, 0x40646A20, 0x00000003, 0x4062D02A, 0x4063B820, + 0x40646A20, 0x00000003, 0x4062D02B, 0x4063B820, + // Block 660, offset 0xa500 + 0x40646A20, 0x00000003, 0x4062D021, 0x4063B820, 0x40647220, 0x00000003, + 0x4062D022, 0x4063B820, 0x40647220, 0x00000003, 0x4062D023, 0x4063B820, + 0x40647220, 0x00000003, 0x4062D024, 0x4063B820, 0x40647220, 0x00000003, + 0x4062D021, 0x4063B820, 0x40648C20, 0x00000003, 0x4062D022, 0x4063B820, + 0x40648C20, 0x00000003, 0x4062D023, 0x4063B820, 0x40648C20, 0x00000003, + 0x4062D024, 0x4063B820, 0x40648C20, 0x00000003, 0x4062D025, 0x4063B820, + 0x40648C20, 0x00000003, 0x4062D026, 0x4063B820, 0x40648C20, 0x00000003, + 0x4062D027, 0x4063B820, 0x40648C20, 0x00000003, 0x4062D028, 0x4063B820, + 0x40648C20, 0x00000003, 0x4062D029, 0x4063B820, 0x40648C20, 0x00000003, + 0x4062D02A, 0x4063B820, 0x40648C20, 0x00000003, 0x4062D02B, 0x4063B820, + 0x40648C20, 0x00000003, 0x4062D02C, 0x4063B820, + // Block 661, offset 0xa540 + 0x40648C20, 0x00000003, 0x4062D02D, 0x4063B820, 0x40648C20, 0x00000003, + 0x4062D02E, 0x4063B820, 0x40648C20, 0x00000003, 0x4062D02F, 0x4063B820, + 0x40648C20, 0x00000002, 0x4062D021, 0x4063BA20, 0x00000002, 0x4062D022, + 0x4063BA20, 0x00000002, 0x4062D023, 0x4063BA20, 0x00000002, 0x4062D024, + 0x4063BA20, 0x00000002, 0x4062D025, 0x4063BA20, 0x00000002, 0x4062D026, + 0x4063BA20, 0x00000002, 0x4062D027, 0x4063BA20, 0x00000002, 0x4062D028, + 0x4063BA20, 0x00000002, 0x4062D029, 0x4063BA20, 0x00000002, 0x4062D02A, + 0x4063BA20, 0x00000002, 0x4062D02B, 0x4063BA20, 0x00000002, 0x4062D02C, + 0x4063BA20, 0x00000002, 0x4062D02D, 0x4063BA20, 0x00000002, 0x4062D02E, + 0x4063BA20, 0x00000002, 0x4062D02F, 0x4063BA20, 0x00000002, 0x4062D030, + 0x4063BA20, 0x00000002, 0x4062D031, 0x4063BA20, + // Block 662, offset 0xa580 + 0x00000002, 0x4062D032, 0x4063BA20, 0x00000002, 0x4062D033, 0x4063BA20, + 0x00000002, 0x4062D034, 0x4063BA20, 0x00000002, 0x4062D035, 0x4063BA20, + 0x00000003, 0x4062D021, 0x4063BA20, 0x40646420, 0x00000003, 0x4062D022, + 0x4063BA20, 0x40646420, 0x00000003, 0x4062D023, 0x4063BA20, 0x40646420, + 0x00000003, 0x4062D024, 0x4063BA20, 0x40646420, 0x00000003, 0x4062D025, + 0x4063BA20, 0x40646420, 0x00000003, 0x4062D026, 0x4063BA20, 0x40646420, + 0x00000003, 0x4062D027, 0x4063BA20, 0x40646420, 0x00000003, 0x4062D028, + 0x4063BA20, 0x40646420, 0x00000003, 0x4062D029, 0x4063BA20, 0x40646420, + 0x00000003, 0x4062D021, 0x4063BA20, 0x40646A20, 0x00000003, 0x4062D022, + 0x4063BA20, 0x40646A20, 0x00000003, 0x4062D023, 0x4063BA20, 0x40646A20, + 0x00000003, 0x4062D024, 0x4063BA20, 0x40646A20, + // Block 663, offset 0xa5c0 + 0x00000003, 0x4062D025, 0x4063BA20, 0x40646A20, 0x00000003, 0x4062D026, + 0x4063BA20, 0x40646A20, 0x00000003, 0x4062D027, 0x4063BA20, 0x40646A20, + 0x00000003, 0x4062D028, 0x4063BA20, 0x40646A20, 0x00000003, 0x4062D029, + 0x4063BA20, 0x40646A20, 0x00000003, 0x4062D02A, 0x4063BA20, 0x40646A20, + 0x00000003, 0x4062D02B, 0x4063BA20, 0x40646A20, 0x00000003, 0x4062D02C, + 0x4063BA20, 0x40646A20, 0x00000003, 0x4062D02D, 0x4063BA20, 0x40646A20, + 0x00000003, 0x4062D02E, 0x4063BA20, 0x40646A20, 0x00000003, 0x4062D02F, + 0x4063BA20, 0x40646A20, 0x00000003, 0x4062D030, 0x4063BA20, 0x40646A20, + 0x00000003, 0x4062D031, 0x4063BA20, 0x40646A20, 0x00000003, 0x4062D032, + 0x4063BA20, 0x40646A20, 0x00000003, 0x4062D033, 0x4063BA20, 0x40646A20, + 0x00000003, 0x4062D034, 0x4063BA20, 0x40646A20, + // Block 664, offset 0xa600 + 0x00000003, 0x4062D035, 0x4063BA20, 0x40646A20, 0x00000003, 0x4062D036, + 0x4063BA20, 0x40646A20, 0x00000003, 0x4062D037, 0x4063BA20, 0x40646A20, + 0x00000003, 0x4062D038, 0x4063BA20, 0x40646A20, 0x00000003, 0x4062D039, + 0x4063BA20, 0x40646A20, 0x00000003, 0x4062D03A, 0x4063BA20, 0x40646A20, + 0x00000003, 0x4062D03B, 0x4063BA20, 0x40646A20, 0x00000003, 0x4062D03C, + 0x4063BA20, 0x40646A20, 0x00000003, 0x4062D03D, 0x4063BA20, 0x40646A20, + 0x00000003, 0x4062D021, 0x4063BA20, 0x40647220, 0x00000003, 0x4062D022, + 0x4063BA20, 0x40647220, 0x00000003, 0x4062D023, 0x4063BA20, 0x40647220, + 0x00000003, 0x4062D024, 0x4063BA20, 0x40647220, 0x00000003, 0x4062D025, + 0x4063BA20, 0x40647220, 0x00000003, 0x4062D026, 0x4063BA20, 0x40647220, + 0x00000003, 0x4062D021, 0x4063BA20, 0x40648C20, + // Block 665, offset 0xa640 + 0x00000003, 0x4062D022, 0x4063BA20, 0x40648C20, 0x00000003, 0x4062D023, + 0x4063BA20, 0x40648C20, 0x00000003, 0x4062D024, 0x4063BA20, 0x40648C20, + 0x00000003, 0x4062D025, 0x4063BA20, 0x40648C20, 0x00000003, 0x4062D026, + 0x4063BA20, 0x40648C20, 0x00000003, 0x4062D027, 0x4063BA20, 0x40648C20, + 0x00000003, 0x4062D028, 0x4063BA20, 0x40648C20, 0x00000003, 0x4062D029, + 0x4063BA20, 0x40648C20, 0x00000003, 0x4062D02A, 0x4063BA20, 0x40648C20, + 0x00000003, 0x4062D02B, 0x4063BA20, 0x40648C20, 0x00000003, 0x4062D02C, + 0x4063BA20, 0x40648C20, 0x00000003, 0x4062D02D, 0x4063BA20, 0x40648C20, + 0x00000003, 0x4062D02E, 0x4063BA20, 0x40648C20, 0x00000003, 0x4062D02F, + 0x4063BA20, 0x40648C20, 0x00000003, 0x4062D030, 0x4063BA20, 0x40648C20, + 0x00000003, 0x4062D031, 0x4063BA20, 0x40648C20, + // Block 666, offset 0xa680 + 0x00000003, 0x4062D032, 0x4063BA20, 0x40648C20, 0x00000003, 0x4062D033, + 0x4063BA20, 0x40648C20, 0x00000003, 0x4062D034, 0x4063BA20, 0x40648C20, + 0x00000003, 0x4062D035, 0x4063BA20, 0x40648C20, 0x00000003, 0x4062D036, + 0x4063BA20, 0x40648C20, 0x00000003, 0x4062D037, 0x4063BA20, 0x40648C20, + 0x00000003, 0x4062D038, 0x4063BA20, 0x40648C20, 0x00000003, 0x4062D039, + 0x4063BA20, 0x40648C20, 0x00000003, 0x4062D03A, 0x4063BA20, 0x40648C20, + 0x00000003, 0x4062D03B, 0x4063BA20, 0x40648C20, 0x00000003, 0x4062D03C, + 0x4063BA20, 0x40648C20, 0x00000003, 0x4062D03D, 0x4063BA20, 0x40648C20, + 0x00000003, 0x4062D03E, 0x4063BA20, 0x40648C20, 0x00000003, 0x4062D03F, + 0x4063BA20, 0x40648C20, 0x00000002, 0x4062D021, 0x4063BE20, 0x00000002, + 0x4062D022, 0x4063BE20, 0x00000002, 0x4062D023, + // Block 667, offset 0xa6c0 + 0x4063BE20, 0x00000002, 0x4062D024, 0x4063BE20, 0x00000002, 0x4062D025, + 0x4063BE20, 0x00000002, 0x4062D026, 0x4063BE20, 0x00000002, 0x4062D027, + 0x4063BE20, 0x00000002, 0x4062D028, 0x4063BE20, 0x00000002, 0x4062D029, + 0x4063BE20, 0x00000002, 0x4062D02A, 0x4063BE20, 0x00000002, 0x4062D02B, + 0x4063BE20, 0x00000002, 0x4062D02C, 0x4063BE20, 0x00000002, 0x4062D02D, + 0x4063BE20, 0x00000002, 0x4062D02E, 0x4063BE20, 0x00000002, 0x4062D02F, + 0x4063BE20, 0x00000002, 0x4062D030, 0x4063BE20, 0x00000002, 0x4062D031, + 0x4063BE20, 0x00000002, 0x4062D032, 0x4063BE20, 0x00000002, 0x4062D033, + 0x4063BE20, 0x00000002, 0x4062D034, 0x4063BE20, 0x00000002, 0x4062D035, + 0x4063BE20, 0x00000002, 0x4062D036, 0x4063BE20, 0x00000002, 0x4062D037, + 0x4063BE20, 0x00000002, 0x4062D038, 0x4063BE20, + // Block 668, offset 0xa700 + 0x00000002, 0x4062D039, 0x4063BE20, 0x00000002, 0x4062D03A, 0x4063BE20, + 0x00000002, 0x4062D03B, 0x4063BE20, 0x00000002, 0x4062D03C, 0x4063BE20, + 0x00000002, 0x4062D03D, 0x4063BE20, 0x00000003, 0x4062D021, 0x4063BE20, + 0x40646420, 0x00000003, 0x4062D022, 0x4063BE20, 0x40646420, 0x00000003, + 0x4062D023, 0x4063BE20, 0x40646420, 0x00000003, 0x4062D021, 0x4063BE20, + 0x40648C20, 0x00000003, 0x4062D022, 0x4063BE20, 0x40648C20, 0x00000003, + 0x4062D023, 0x4063BE20, 0x40648C20, 0x00000003, 0x4062D024, 0x4063BE20, + 0x40648C20, 0x00000003, 0x4062D025, 0x4063BE20, 0x40648C20, 0x00000003, + 0x4062D026, 0x4063BE20, 0x40648C20, 0x00000002, 0x4062D021, 0x4063C020, + 0x00000002, 0x4062D022, 0x4063C020, 0x00000002, 0x4062D023, 0x4063C020, + 0x00000002, 0x4062D024, 0x4063C020, 0x00000002, + // Block 669, offset 0xa740 + 0x4062D025, 0x4063C020, 0x00000002, 0x4062D026, 0x4063C020, 0x00000002, + 0x4062D027, 0x4063C020, 0x00000002, 0x4062D028, 0x4063C020, 0x00000002, + 0x4062D029, 0x4063C020, 0x00000002, 0x4062D02A, 0x4063C020, 0x00000002, + 0x4062D02B, 0x4063C020, 0x00000002, 0x4062D02C, 0x4063C020, 0x00000002, + 0x4062D02D, 0x4063C020, 0x00000002, 0x4062D02E, 0x4063C020, 0x00000002, + 0x4062D02F, 0x4063C020, 0x00000002, 0x4062D030, 0x4063C020, 0x00000002, + 0x4062D031, 0x4063C020, 0x00000002, 0x4062D032, 0x4063C020, 0x00000002, + 0x4062D033, 0x4063C020, 0x00000002, 0x4062D034, 0x4063C020, 0x00000002, + 0x4062D035, 0x4063C020, 0x00000002, 0x4062D021, 0x4063C220, 0x00000002, + 0x4062D022, 0x4063C220, 0x00000002, 0x4062D023, 0x4063C220, 0x00000002, + 0x4062D024, 0x4063C220, 0x00000002, 0x4062D025, + // Block 670, offset 0xa780 + 0x4063C220, 0x00000002, 0x4062D026, 0x4063C220, 0x00000002, 0x4062D027, + 0x4063C220, 0x00000002, 0x4062D028, 0x4063C220, 0x00000002, 0x4062D029, + 0x4063C220, 0x00000002, 0x4062D02A, 0x4063C220, 0x00000002, 0x4062D02B, + 0x4063C220, 0x00000002, 0x4062D02C, 0x4063C220, 0x00000002, 0x4062D02D, + 0x4063C220, 0x00000002, 0x4062D02E, 0x4063C220, 0x00000002, 0x4062D02F, + 0x4063C220, 0x00000002, 0x4062D030, 0x4063C220, 0x00000002, 0x4062D031, + 0x4063C220, 0x00000002, 0x4062D032, 0x4063C220, 0x00000002, 0x4062D033, + 0x4063C220, 0x00000002, 0x4062D034, 0x4063C220, 0x00000002, 0x4062D035, + 0x4063C220, 0x00000002, 0x4062D036, 0x4063C220, 0x00000002, 0x4062D037, + 0x4063C220, 0x00000002, 0x4062D038, 0x4063C220, 0x00000003, 0x4062D021, + 0x4063C220, 0x40646A20, 0x00000003, 0x4062D022, + // Block 671, offset 0xa7c0 + 0x4063C220, 0x40646A20, 0x00000003, 0x4062D023, 0x4063C220, 0x40646A20, + 0x00000003, 0x4062D024, 0x4063C220, 0x40646A20, 0x00000003, 0x4062D025, + 0x4063C220, 0x40646A20, 0x00000003, 0x4062D026, 0x4063C220, 0x40646A20, + 0x00000003, 0x4062D027, 0x4063C220, 0x40646A20, 0x00000003, 0x4062D028, + 0x4063C220, 0x40646A20, 0x00000003, 0x4062D029, 0x4063C220, 0x40646A20, + 0x00000003, 0x4062D02A, 0x4063C220, 0x40646A20, 0x00000003, 0x4062D02B, + 0x4063C220, 0x40646A20, 0x00000003, 0x4062D02C, 0x4063C220, 0x40646A20, + 0x00000003, 0x4062D02D, 0x4063C220, 0x40646A20, 0x00000003, 0x4062D02E, + 0x4063C220, 0x40646A20, 0x00000003, 0x4062D02F, 0x4063C220, 0x40646A20, + 0x00000003, 0x4062D030, 0x4063C220, 0x40646A20, 0x00000003, 0x4062D021, + 0x4063C220, 0x40647220, 0x00000003, 0x4062D021, + // Block 672, offset 0xa800 + 0x4063C220, 0x40648C20, 0x00000003, 0x4062D021, 0x4063C420, 0x40646A20, + 0x00000003, 0x4062D022, 0x4063C420, 0x40646A20, 0x00000003, 0x4062D023, + 0x4063C420, 0x40646A20, 0x00000003, 0x4062D024, 0x4063C420, 0x40646A20, + 0x00000003, 0x4062D025, 0x4063C420, 0x40646A20, 0x00000003, 0x4062D026, + 0x4063C420, 0x40646A20, 0x00000003, 0x4062D027, 0x4063C420, 0x40646A20, + 0x00000002, 0x4062D021, 0x4063C620, 0x00000002, 0x4062D022, 0x4063C620, + 0x00000002, 0x4062D023, 0x4063C620, 0x00000002, 0x4062D024, 0x4063C620, + 0x00000002, 0x4062D025, 0x4063C620, 0x00000002, 0x4062D026, 0x4063C620, + 0x00000002, 0x4062D027, 0x4063C620, 0x00000002, 0x4062D021, 0x4063C820, + 0x00000002, 0x4062D022, 0x4063C820, 0x00000002, 0x4062D023, 0x4063C820, + 0x00000002, 0x4062D024, 0x4063C820, 0x00000002, + // Block 673, offset 0xa840 + 0x4062D025, 0x4063C820, 0x00000002, 0x4062D026, 0x4063C820, 0x00000002, + 0x4062D027, 0x4063C820, 0x00000002, 0x4062D028, 0x4063C820, 0x00000002, + 0x4062D029, 0x4063C820, 0x00000002, 0x4062D02A, 0x4063C820, 0x00000002, + 0x4062D021, 0x4063CA20, 0x00000002, 0x4062D022, 0x4063CA20, 0x00000002, + 0x4062D023, 0x4063CA20, 0x00000002, 0x4062D024, 0x4063CA20, 0x00000002, + 0x4062D025, 0x4063CA20, 0x00000002, 0x4062D026, 0x4063CA20, 0x00000002, + 0x4062D027, 0x4063CA20, 0x00000002, 0x4062D028, 0x4063CA20, 0x00000002, + 0x4062D029, 0x4063CA20, 0x00000002, 0x4062D02A, 0x4063CA20, 0x00000003, + 0x4062D021, 0x4063CA20, 0x40647220, 0x00000003, 0x4062D022, 0x4063CA20, + 0x40647220, 0x00000003, 0x4062D023, 0x4063CA20, 0x40647220, 0x00000003, + 0x4062D024, 0x4063CA20, 0x40647220, 0x00000003, + // Block 674, offset 0xa880 + 0x4062D021, 0x4063CA20, 0x40648C20, 0x00000003, 0x4062D022, 0x4063CA20, + 0x40648C20, 0x00000003, 0x4062D023, 0x4063CA20, 0x40648C20, 0x00000003, + 0x4062D024, 0x4063CA20, 0x40648C20, 0x00000003, 0x4062D025, 0x4063CA20, + 0x40648C20, 0x00000003, 0x4062D026, 0x4063CA20, 0x40648C20, 0x00000003, + 0x4062D027, 0x4063CA20, 0x40648C20, 0x00000003, 0x4062D021, 0x4063CC20, + 0x40646420, 0x00000003, 0x4062D021, 0x4063CC20, 0x40646A20, 0x00000003, + 0x4062D022, 0x4063CC20, 0x40646A20, 0x00000003, 0x4062D023, 0x4063CC20, + 0x40646A20, 0x00000003, 0x4062D024, 0x4063CC20, 0x40646A20, 0x00000003, + 0x4062D025, 0x4063CC20, 0x40646A20, 0x00000003, 0x4062D026, 0x4063CC20, + 0x40646A20, 0x00000003, 0x4062D027, 0x4063CC20, 0x40646A20, 0x00000003, + 0x4062D028, 0x4063CC20, 0x40646A20, 0x00000003, + // Block 675, offset 0xa8c0 + 0x4062D029, 0x4063CC20, 0x40646A20, 0x00000003, 0x4062D02A, 0x4063CC20, + 0x40646A20, 0x00000003, 0x4062D021, 0x4063CC20, 0x40647220, 0x00000003, + 0x4062D022, 0x4063CC20, 0x40647220, 0x00000003, 0x4062D023, 0x4063CC20, + 0x40647220, 0x00000003, 0x4062D024, 0x4063CC20, 0x40647220, 0x00000003, + 0x4062D025, 0x4063CC20, 0x40647220, 0x00000003, 0x4062D026, 0x4063CC20, + 0x40647220, 0x00000003, 0x4062D027, 0x4063CC20, 0x40647220, 0x00000003, + 0x4062D028, 0x4063CC20, 0x40647220, 0x00000003, 0x4062D029, 0x4063CC20, + 0x40647220, 0x00000003, 0x4062D021, 0x4063CC20, 0x40648220, 0x00000003, + 0x4062D022, 0x4063CC20, 0x40648220, 0x00000003, 0x4062D023, 0x4063CC20, + 0x40648220, 0x00000003, 0x4062D024, 0x4063CC20, 0x40648220, 0x00000003, + 0x4062D021, 0x4063CC20, 0x40648420, 0x00000003, + // Block 676, offset 0xa900 + 0x4062D022, 0x4063CC20, 0x40648420, 0x00000003, 0x4062D023, 0x4063CC20, + 0x40648420, 0x00000003, 0x4062D024, 0x4063CC20, 0x40648420, 0x00000003, + 0x4062D025, 0x4063CC20, 0x40648420, 0x00000003, 0x4062D026, 0x4063CC20, + 0x40648420, 0x00000003, 0x4062D027, 0x4063CC20, 0x40648420, 0x00000003, + 0x4062D028, 0x4063CC20, 0x40648420, 0x00000003, 0x4062D021, 0x4063CC20, + 0x40648C20, 0x00000002, 0x4062D021, 0x4063CE20, 0x00000002, 0x4062D022, + 0x4063CE20, 0x00000002, 0x4062D023, 0x4063CE20, 0x00000002, 0x4062D024, + 0x4063CE20, 0x00000002, 0x4062D025, 0x4063CE20, 0x00000002, 0x4062D026, + 0x4063CE20, 0x00000002, 0x4062D027, 0x4063CE20, 0x00000002, 0x4062D028, + 0x4063CE20, 0x00000002, 0x4062D029, 0x4063CE20, 0x00000002, 0x4062D02A, + 0x4063CE20, 0x00000002, 0x4062D02B, 0x4063CE20, + // Block 677, offset 0xa940 + 0x00000002, 0x4062D02C, 0x4063CE20, 0x00000002, 0x4062D02D, 0x4063CE20, + 0x00000002, 0x4062D02E, 0x4063CE20, 0x00000002, 0x4062D02F, 0x4063CE20, + 0x00000002, 0x4062D030, 0x4063CE20, 0x00000002, 0x4062D031, 0x4063CE20, + 0x00000002, 0x4062D032, 0x4063CE20, 0x00000002, 0x4062D033, 0x4063CE20, + 0x00000002, 0x4062D034, 0x4063CE20, 0x00000002, 0x4062D035, 0x4063CE20, + 0x00000002, 0x4062D036, 0x4063CE20, 0x00000002, 0x4062D037, 0x4063CE20, + 0x00000002, 0x4062D038, 0x4063CE20, 0x00000002, 0x4062D039, 0x4063CE20, + 0x00000002, 0x4062D03A, 0x4063CE20, 0x00000002, 0x4062D03B, 0x4063CE20, + 0x00000002, 0x4062D03C, 0x4063CE20, 0x00000002, 0x4062D03D, 0x4063CE20, + 0x00000002, 0x4062D03E, 0x4063CE20, 0x00000002, 0x4062D03F, 0x4063CE20, + 0x00000003, 0x4062D021, 0x4063D020, 0x40647220, + // Block 678, offset 0xa980 + 0x00000003, 0x4062D022, 0x4063D020, 0x40647220, 0x00000003, 0x4062D023, + 0x4063D020, 0x40647220, 0x00000003, 0x4062D024, 0x4063D020, 0x40647220, + 0x00000003, 0x4062D025, 0x4063D020, 0x40647220, 0x00000003, 0x4062D026, + 0x4063D020, 0x40647220, 0x00000002, 0x40403C20, 0xA070F102, 0x00000002, + 0x402D9A22, 0xAE603202, 0x00000002, 0x002D9AC3, 0xAE603202, 0x00000002, + 0x402D9A22, 0xAE603502, 0x00000002, 0x002D9AC3, 0xAE603502, 0x00000002, + 0x402D9A22, 0xAE603C02, 0x00000002, 0x002D9AC3, 0xAE603C02, 0x00000002, + 0x402D9A22, 0xAE604302, 0x00000002, 0x402D9A22, 0xAE604702, 0x00000002, + 0x002D9AC3, 0xAE604702, 0x00000002, 0x402D9A22, 0xAE604E02, 0x00000002, + 0x002D9AC3, 0xAE604E02, 0x00000002, 0x402D9A22, 0xAE605202, 0x00000002, + 0x002D9AC3, 0xAE605202, 0x00000002, 0x402D9A22, + // Block 679, offset 0xa9c0 + 0xAE605B02, 0x00000002, 0x002D9AC3, 0xAE605B02, 0x00000002, 0x402D9A22, + 0xAE606402, 0x00000002, 0x002D9AC3, 0xAE606402, 0x00000002, 0x402D9A22, + 0xADC07002, 0x00000002, 0x002D9AC3, 0xADC07002, 0x00000002, 0x40306C22, + 0xAE604702, 0x00000002, 0x00306CC3, 0xAE604702, 0x00000002, 0x40302A20, + 0xAE605202, 0x00000002, 0x00302A83, 0xAE605202, 0x00000002, 0x40442221, + 0x82092248, 0x00000002, 0x004422A3, 0x82092248, 0x00000002, 0x40443E21, + 0x82092248, 0x00000002, 0x00443EA3, 0x82092248, 0x00000002, 0x00444883, + 0x82092248, 0x00000002, 0x40444821, 0x82092248, 0x00000002, 0x004448A3, + 0x82092248, 0x00000002, 0x40445421, 0x82092248, 0x00000002, 0x40445821, + 0x82092248, 0x00000002, 0x004458A3, 0x82092248, 0x00000002, 0x40445A21, + 0x82092248, 0x00000002, 0x00445AA3, 0x82092248, + // Block 680, offset 0xaa00 + 0x00000002, 0x40446621, 0x82092248, 0x00000002, 0x004466A3, 0x82092248, + 0x00000002, 0x402D6820, 0xA0007D02, 0x00000002, 0x002D6894, 0xA0007D14, + 0x00000005, 0x404E6020, 0x404E8420, 0x404E2420, 0x8209278B, 0x404F3020, + 0x00000006, 0x404E6A20, 0x8209278B, 0x404E6A20, 0x404EEE20, 0x404E7220, + 0x8209278B, 0x00000006, 0x404E6A21, 0x40510E20, 0x404EE620, 0x404EEE20, + 0x404E1420, 0x8209278B, 0x00000004, 0x404E8C21, 0x40510A20, 0x404EFE20, + 0x404F2E20, 0x00000006, 0x404E9420, 0x404E1420, 0x8209278B, 0x404E8220, + 0x404E1420, 0x8209278B, 0x00000005, 0x404E9420, 0x404E1420, 0x8209278B, + 0x404E8820, 0x404EDE20, 0x0000000A, 0x404E9421, 0x404E4820, 0x8209278B, + 0x404F3020, 0x404E1420, 0x404EFE20, 0x404EDE20, 0x404E2420, 0x8209278B, + 0x404F3020, 0x00000003, 0x404EA620, 0x404E8420, + // Block 681, offset 0xaa40 + 0x404EEA20, 0x00000003, 0x404EA620, 0x8209278A, 0x404EA620, 0x00000002, + 0x004EC283, 0x404EE620, 0x00000002, 0x404EC221, 0x404EE620, 0x00000002, + 0x004EC283, 0x404EEA20, 0x00000002, 0x004EC283, 0x404EEE20, 0x00000003, + 0x004EC283, 0x404EEE20, 0x404F0C20, 0x00000002, 0x004EC283, 0x404EF420, + 0x00000002, 0x004EC283, 0x404EFE20, 0x00000002, 0x004EC284, 0x404EFE20, + 0x00000003, 0x004EC283, 0x404EFE20, 0x404EDE20, 0x00000005, 0x004EC283, + 0x404EFE20, 0x404EDE20, 0x404E1420, 0x8209278A, 0x00000005, 0x004EC284, + 0x404EFE20, 0x404EDE20, 0x404E1420, 0x8209278A, 0x00000005, 0x004EC283, + 0x404EFE20, 0x404EDE20, 0x404E1420, 0x8209278B, 0x00000005, 0x004EC284, + 0x404EFE20, 0x404EDE20, 0x404E1420, 0x8209278B, 0x00000005, 0x004EC283, + 0x404EFE20, 0x404EDE20, 0x404E1820, 0x8209278A, + // Block 682, offset 0xaa80 + 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, 0x404E1820, 0x8209278A, + 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, 0x404E1820, 0x8209278B, + 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, 0x404E1820, 0x8209278B, + 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, 0x404E1C20, 0x8209278A, + 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, 0x404E1C20, 0x8209278A, + 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, 0x404E1C20, 0x8209278B, + 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, 0x404E1C20, 0x8209278B, + 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, 0x404E2220, 0x8209278A, + 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, 0x404E2220, 0x8209278A, + 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, 0x404E2220, 0x8209278B, + 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, + // Block 683, offset 0xaac0 + 0x404E2220, 0x8209278B, 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, + 0x404E2420, 0x8209278A, 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, + 0x404E2420, 0x8209278A, 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, + 0x404E2420, 0x8209278B, 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, + 0x404E2420, 0x8209278B, 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, + 0x404E2820, 0x8209278A, 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, + 0x404E2820, 0x8209278A, 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, + 0x404E2820, 0x8209278B, 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, + 0x404E2820, 0x8209278B, 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, + 0x404E2E20, 0x8209278A, 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, + 0x404E2E20, 0x8209278A, 0x00000005, 0x004EC283, + // Block 684, offset 0xab00 + 0x404EFE20, 0x404EDE20, 0x404E2E20, 0x8209278B, 0x00000005, 0x004EC284, + 0x404EFE20, 0x404EDE20, 0x404E2E20, 0x8209278B, 0x00000005, 0x004EC283, + 0x404EFE20, 0x404EDE20, 0x404E3220, 0x8209278A, 0x00000005, 0x004EC284, + 0x404EFE20, 0x404EDE20, 0x404E3220, 0x8209278A, 0x00000005, 0x004EC283, + 0x404EFE20, 0x404EDE20, 0x404E3220, 0x8209278B, 0x00000005, 0x004EC284, + 0x404EFE20, 0x404EDE20, 0x404E3220, 0x8209278B, 0x00000005, 0x004EC283, + 0x404EFE20, 0x404EDE20, 0x404E4220, 0x8209278A, 0x00000005, 0x004EC284, + 0x404EFE20, 0x404EDE20, 0x404E4220, 0x8209278A, 0x00000005, 0x004EC283, + 0x404EFE20, 0x404EDE20, 0x404E4220, 0x8209278B, 0x00000005, 0x004EC284, + 0x404EFE20, 0x404EDE20, 0x404E4220, 0x8209278B, 0x00000005, 0x004EC283, + 0x404EFE20, 0x404EDE20, 0x404E4820, 0x8209278A, + // Block 685, offset 0xab40 + 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, 0x404E4820, 0x8209278A, + 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, 0x404E4820, 0x8209278B, + 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, 0x404E4820, 0x8209278B, + 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, 0x404E4A20, 0x8209278A, + 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, 0x404E4A20, 0x8209278A, + 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, 0x404E4A20, 0x8209278B, + 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, 0x404E4A20, 0x8209278B, + 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, 0x404E4E20, 0x8209278A, + 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, 0x404E4E20, 0x8209278A, + 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, 0x404E4E20, 0x8209278B, + 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, + // Block 686, offset 0xab80 + 0x404E4E20, 0x8209278B, 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, + 0x404E5220, 0x8209278A, 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, + 0x404E5220, 0x8209278A, 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, + 0x404E5220, 0x8209278B, 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, + 0x404E5220, 0x8209278B, 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, + 0x404E5620, 0x8209278A, 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, + 0x404E5620, 0x8209278A, 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, + 0x404E5620, 0x8209278B, 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, + 0x404E5620, 0x8209278B, 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, + 0x404E5A20, 0x8209278A, 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, + 0x404E5A20, 0x8209278A, 0x00000005, 0x004EC283, + // Block 687, offset 0xabc0 + 0x404EFE20, 0x404EDE20, 0x404E5A20, 0x8209278B, 0x00000005, 0x004EC284, + 0x404EFE20, 0x404EDE20, 0x404E5A20, 0x8209278B, 0x00000005, 0x004EC283, + 0x404EFE20, 0x404EDE20, 0x404E5E20, 0x8209278A, 0x00000005, 0x004EC284, + 0x404EFE20, 0x404EDE20, 0x404E5E20, 0x8209278A, 0x00000005, 0x004EC283, + 0x404EFE20, 0x404EDE20, 0x404E5E20, 0x8209278B, 0x00000005, 0x004EC284, + 0x404EFE20, 0x404EDE20, 0x404E5E20, 0x8209278B, 0x00000005, 0x004EC283, + 0x404EFE20, 0x404EDE20, 0x404E6020, 0x8209278A, 0x00000005, 0x004EC284, + 0x404EFE20, 0x404EDE20, 0x404E6020, 0x8209278A, 0x00000005, 0x004EC283, + 0x404EFE20, 0x404EDE20, 0x404E6020, 0x8209278B, 0x00000005, 0x004EC284, + 0x404EFE20, 0x404EDE20, 0x404E6020, 0x8209278B, 0x00000005, 0x004EC283, + 0x404EFE20, 0x404EDE20, 0x404E6220, 0x8209278A, + // Block 688, offset 0xac00 + 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, 0x404E6220, 0x8209278A, + 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, 0x404E6220, 0x8209278B, + 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, 0x404E6220, 0x8209278B, + 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, 0x404E6620, 0x8209278A, + 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, 0x404E6620, 0x8209278A, + 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, 0x404E6620, 0x8209278B, + 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, 0x404E6620, 0x8209278B, + 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, 0x404E6A20, 0x8209278A, + 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, 0x404E6A20, 0x8209278A, + 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, 0x404E6A20, 0x8209278B, + 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, + // Block 689, offset 0xac40 + 0x404E6A20, 0x8209278B, 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, + 0x404E7220, 0x8209278A, 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, + 0x404E7220, 0x8209278A, 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, + 0x404E7220, 0x8209278B, 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, + 0x404E7220, 0x8209278B, 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, + 0x404E7420, 0x8209278A, 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, + 0x404E7420, 0x8209278A, 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, + 0x404E7420, 0x8209278B, 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, + 0x404E7420, 0x8209278B, 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, + 0x404E7E20, 0x8209278A, 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, + 0x404E7E20, 0x8209278A, 0x00000005, 0x004EC283, + // Block 690, offset 0xac80 + 0x404EFE20, 0x404EDE20, 0x404E7E20, 0x8209278B, 0x00000005, 0x004EC284, + 0x404EFE20, 0x404EDE20, 0x404E7E20, 0x8209278B, 0x00000005, 0x004EC283, + 0x404EFE20, 0x404EDE20, 0x404E8220, 0x8209278A, 0x00000005, 0x004EC284, + 0x404EFE20, 0x404EDE20, 0x404E8220, 0x8209278A, 0x00000005, 0x004EC283, + 0x404EFE20, 0x404EDE20, 0x404E8220, 0x8209278B, 0x00000005, 0x004EC284, + 0x404EFE20, 0x404EDE20, 0x404E8220, 0x8209278B, 0x00000005, 0x004EC283, + 0x404EFE20, 0x404EDE20, 0x404E8420, 0x8209278A, 0x00000005, 0x004EC284, + 0x404EFE20, 0x404EDE20, 0x404E8420, 0x8209278A, 0x00000005, 0x004EC283, + 0x404EFE20, 0x404EDE20, 0x404E8420, 0x8209278B, 0x00000005, 0x004EC284, + 0x404EFE20, 0x404EDE20, 0x404E8420, 0x8209278B, 0x00000005, 0x004EC283, + 0x404EFE20, 0x404EDE20, 0x404E8820, 0x8209278A, + // Block 691, offset 0xacc0 + 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, 0x404E8820, 0x8209278A, + 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, 0x404E8820, 0x8209278B, + 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, 0x404E8820, 0x8209278B, + 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, 0x404E8C20, 0x8209278A, + 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, 0x404E8C20, 0x8209278A, + 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, 0x404E8C20, 0x8209278B, + 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, 0x404E8C20, 0x8209278B, + 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, 0x404E9420, 0x8209278A, + 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, 0x404E9420, 0x8209278A, + 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, 0x404E9420, 0x8209278B, + 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, + // Block 692, offset 0xad00 + 0x404E9420, 0x8209278B, 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, + 0x404EA620, 0x8209278A, 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, + 0x404EA620, 0x8209278A, 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, + 0x404EA620, 0x8209278B, 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, + 0x404EA620, 0x8209278B, 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, + 0x404EAA20, 0x8209278A, 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, + 0x404EAA20, 0x8209278A, 0x00000005, 0x004EC283, 0x404EFE20, 0x404EDE20, + 0x404EAA20, 0x8209278B, 0x00000005, 0x004EC284, 0x404EFE20, 0x404EDE20, + 0x404EAA20, 0x8209278B, 0x00000004, 0x004EC283, 0x404EFE20, 0x404EDE20, + 0x8209278B, 0x00000006, 0x404EFE20, 0x404EDE20, 0x404E1420, 0x8209278B, + 0x404E1420, 0x40510420, 0x00000002, 0x402C9A20, + // Block 693, offset 0xad40 + 0xAE603202, 0x00000002, 0x002C9A83, 0xAE603202, 0x00000002, 0x402C9A20, + 0xAE603502, 0x00000002, 0x002C9A83, 0xAE603502, 0x00000002, 0x402C9A20, + 0xAE604E02, 0x00000002, 0x002C9A83, 0xAE604E02, 0x00000002, 0x402C9A20, + 0xAE606402, 0x00000002, 0x002C9A83, 0xAE606402, 0x00000002, 0x402C9A20, + 0xADC07002, 0x00000002, 0x002C9A83, 0xADC07002, 0x00000002, 0x402EE420, + 0xAE603202, 0x00000002, 0x002EE483, 0xAE603202, 0x00000002, 0x402EE420, + 0xAE603502, 0x00000002, 0x002EE483, 0xAE603502, 0x00000002, 0x402EE420, + 0xAE606402, 0x00000002, 0x002EE483, 0xAE606402, 0x00000002, 0x402EE420, + 0xADC07002, 0x00000002, 0x002EE483, 0xADC07002, 0x00000002, 0x40411620, + 0xA000FA02, 0x00000002, 0x40411E20, 0xA000FA02, 0x00000002, 0x40412020, + 0xA000FA02, 0x00000002, 0x40412A20, 0xA000FA02, + // Block 694, offset 0xad80 + 0x00000002, 0x40414620, 0xA000FA02, 0x00000002, 0x40415420, 0xA000FA02, + 0x00000002, 0x403A6822, 0xAE60BE02, 0x00000002, 0x003A7C84, 0x00391C84, + 0x00000002, 0x003A7C9A, 0x00391C9A, 0x00000002, 0x40320820, 0xAE603202, + 0x00000002, 0x00320883, 0xAE603202, 0x00000002, 0x40320A20, 0xAE603202, + 0x00000002, 0x00320A83, 0xAE603202, 0x00000002, 0x40320A20, 0xAE605B02, + 0x00000002, 0x00320A83, 0xAE605B02, 0x00000002, 0x40320E21, 0xAE603702, + 0x00000002, 0x00320EA3, 0xAE603702, 0x00000002, 0x40320E21, 0xAE603C02, + 0x00000002, 0x00320EA3, 0xAE603C02, 0x00000002, 0x40321022, 0xAE603202, + 0x00000002, 0x003210C3, 0xAE603202, 0x00000002, 0x40321022, 0xAE604702, + 0x00000002, 0x003210C3, 0xAE604702, 0x00000002, 0x40321022, 0xAE605B02, + 0x00000002, 0x003210C3, 0xAE605B02, 0x00000002, + // Block 695, offset 0xadc0 + 0x40321022, 0xAD806802, 0x00000002, 0x003210C3, 0xAD806802, 0x00000002, + 0x40321023, 0xAE603502, 0x00000002, 0x003210E3, 0xAE603502, 0x00000002, + 0x40321023, 0xAE604E02, 0x00000002, 0x003210E3, 0xAE604E02, 0x00000002, + 0x40321023, 0xAE606402, 0x00000002, 0x003210E3, 0xAE606402, 0x00000002, + 0x40321023, 0xADC07002, 0x00000002, 0x003210E3, 0xADC07002, 0x00000002, + 0x40321024, 0xAE605B02, 0x00000002, 0x00321103, 0xAE605B02, 0x00000002, + 0x402C6020, 0xAE603202, 0x00000002, 0x002C6083, 0xAE603202, 0x00000002, + 0x40321024, 0xAE603202, 0x00000002, 0x00321103, 0xAE603202, 0x00000002, + 0x40321024, 0xAE603502, 0x00000002, 0x00321103, 0xAE603502, 0x00000002, + 0x40321024, 0xAE604E02, 0x00000002, 0x00321103, 0xAE604E02, 0x00000002, + 0x40321024, 0xAE606402, 0x00000002, 0x00321103, + // Block 696, offset 0xae00 + 0xAE606402, 0x00000002, 0x40321024, 0xADC07002, 0x00000002, 0x00321103, + 0xADC07002, 0x00000002, 0x0030BE83, 0xAE604E02, 0x00000002, 0x0030BE83, + 0xADC07002, 0x00000002, 0x00497283, 0x40496C20, 0x00000002, 0x00497284, + 0x40496C20, 0x00000002, 0x402BDE21, 0xAE603702, 0x00000002, 0x002BDEA3, + 0xAE603702, 0x00000002, 0x402BDE21, 0xAE603C02, 0x00000002, 0x002BDEA3, + 0xAE603C02, 0x00000002, 0x402BDE21, 0xAE604302, 0x00000002, 0x002BDEA3, + 0xAE604302, 0x00000002, 0x402BDE22, 0xAE604702, 0x00000002, 0x002BDEC3, + 0xAE604702, 0x00000002, 0x402BDE22, 0xAE605202, 0x00000002, 0x002BDEC3, + 0xAE605202, 0x00000002, 0x402C9821, 0xAE603C02, 0x00000002, 0x002C98A3, + 0xAE603C02, 0x00000002, 0x402C9822, 0xAE603202, 0x00000002, 0x002C98C3, + 0xAE603202, 0x00000002, 0x402C9822, 0xAE603502, + // Block 697, offset 0xae40 + 0x00000002, 0x002C98C3, 0xAE603502, 0x00000002, 0x402D9A21, 0xAE604702, + 0x00000002, 0x002D9AA3, 0xAE604702, 0x00000002, 0x402EE221, 0xAE603C02, + 0x00000002, 0x002EE2A3, 0xAE603C02, 0x00000002, 0x402EE221, 0xAE604E02, + 0x00000002, 0x002EE2A3, 0xAE604E02, 0x00000002, 0x402EE221, 0xAD806802, + 0x00000002, 0x002EE2A3, 0xAD806802, 0x00000002, 0x402EE222, 0xAE603202, + 0x00000002, 0x002EE2C3, 0xAE603202, 0x00000002, 0x402EE222, 0xAE603502, + 0x00000002, 0x002EE2C3, 0xAE603502, 0x00000002, 0x402EE222, 0xAE604702, + 0x00000002, 0x002EE2C3, 0xAE604702, 0x00000002, 0x402EE222, 0xAE604E02, + 0x00000002, 0x002EE2C3, 0xAE604E02, 0x00000002, 0x402EE222, 0xAE605202, + 0x00000002, 0x002EE2C3, 0xAE605202, 0x00000002, 0x402EE222, 0xACA05902, + 0x00000002, 0x002EE2C3, 0xACA05902, 0x00000002, + // Block 698, offset 0xae80 + 0x40306C21, 0xAE604702, 0x00000002, 0x00306CA3, 0xAE604702, 0x00000002, + 0x40306C21, 0xAE604E02, 0x00000002, 0x00306CA3, 0xAE604E02, 0x00000002, + 0x40306C21, 0xAD806802, 0x00000002, 0x00306CA3, 0xAD806802, 0x00000002, + 0xA000AD18, 0xA000BA18, 0x00000002, 0x00393C97, 0x00396497, 0x00000002, + 0x00393C9A, 0x0039649A, 0x00000002, 0x00393C97, 0x00397297, 0x00000002, + 0x00393C9A, 0x0039729A, 0x00000002, 0x00393C97, 0x00397497, 0x00000002, + 0x00393C9A, 0x0039749A, 0x00000002, 0x00393C99, 0x0039A499, 0x00000002, + 0x00393C99, 0x0039A699, 0x00000002, 0x00393C97, 0x003A4E97, 0x00000002, + 0x00393C98, 0x003A4E98, 0x00000002, 0x00393C99, 0x003A4E99, 0x00000002, + 0x00393C9A, 0x003A4E9A, 0x00000002, 0x00393C99, 0x003A5699, 0x00000002, + 0x00395697, 0x00396497, 0x00000002, 0x0039569A, + // Block 699, offset 0xaec0 + 0x0039649A, 0x00000002, 0x00395697, 0x00397297, 0x00000002, 0x0039569A, + 0x0039729A, 0x00000002, 0x00395697, 0x00397497, 0x00000002, 0x0039569A, + 0x0039749A, 0x00000002, 0x00395699, 0x0039A499, 0x00000002, 0x00395699, + 0x0039A699, 0x00000002, 0x00395697, 0x003A4E97, 0x00000002, 0x00395698, + 0x003A4E98, 0x00000002, 0x00395699, 0x003A4E99, 0x00000002, 0x0039569A, + 0x003A4E9A, 0x00000002, 0x00395699, 0x003A5699, 0x00000002, 0x0039589A, + 0x0039649A, 0x00000002, 0x00395899, 0x0039A499, 0x00000002, 0x00395899, + 0x0039A699, 0x00000002, 0x00395897, 0x003A4E97, 0x00000002, 0x00395898, + 0x003A4E98, 0x00000002, 0x00395899, 0x003A4E99, 0x00000002, 0x0039589A, + 0x003A4E9A, 0x00000002, 0x00395899, 0x003A5699, 0x00000002, 0x00396497, + 0x00397297, 0x00000002, 0x0039649A, 0x0039729A, + // Block 700, offset 0xaf00 + 0x00000002, 0x00396497, 0x003A4E97, 0x00000002, 0x0039649A, 0x003A4E9A, + 0x00000002, 0x00397297, 0x00396497, 0x00000002, 0x0039729A, 0x0039649A, + 0x00000002, 0x00397297, 0x003A4E97, 0x00000002, 0x0039729A, 0x003A4E9A, + 0x00000002, 0x00397497, 0x00396497, 0x00000002, 0x0039749A, 0x0039649A, + 0x00000002, 0x0039749A, 0x0039729A, 0x00000002, 0x00397497, 0x003A4E97, + 0x00000002, 0x0039749A, 0x003A4E9A, 0x00000002, 0x00398A9A, 0xA000D11A, + 0x00000002, 0x0039A49A, 0xA000D11A, 0x00000002, 0x0039C697, 0x00396497, + 0x00000002, 0x0039C698, 0x00396498, 0x00000002, 0x0039C69A, 0x0039649A, + 0x00000002, 0x0039C697, 0x00397297, 0x00000002, 0x0039C698, 0x00397298, + 0x00000002, 0x0039C69A, 0x0039729A, 0x00000002, 0x0039C697, 0x00397497, + 0x00000002, 0x0039C698, 0x00397498, 0x00000002, + // Block 701, offset 0xaf40 + 0x0039C69A, 0x0039749A, 0x00000002, 0x0039C699, 0x0039A499, 0x00000002, + 0x0039C69A, 0x0039A49A, 0x00000002, 0x0039C697, 0x003A4E97, 0x00000002, + 0x0039C698, 0x003A4E98, 0x00000002, 0x0039C69A, 0x003A4E9A, 0x00000002, + 0x0039C897, 0x00396497, 0x00000002, 0x0039C898, 0x00396498, 0x00000002, + 0x0039C899, 0x00396499, 0x00000002, 0x0039C89A, 0x0039649A, 0x00000002, + 0x0039C897, 0x00397297, 0x00000002, 0x0039C898, 0x00397298, 0x00000002, + 0x0039C899, 0x00397299, 0x00000002, 0x0039C89A, 0x0039729A, 0x00000002, + 0x0039C897, 0x00397497, 0x00000002, 0x0039C898, 0x00397498, 0x00000002, + 0x0039C899, 0x00397499, 0x00000002, 0x0039C89A, 0x0039749A, 0x00000002, + 0x0039C899, 0x0039A499, 0x00000002, 0x0039C89A, 0x0039A49A, 0x00000002, + 0x0039C897, 0x003A4E97, 0x00000002, 0x0039C898, + // Block 702, offset 0xaf80 + 0x003A4E98, 0x00000002, 0x0039C899, 0x003A4E99, 0x00000002, 0x0039C89A, + 0x003A4E9A, 0x00000002, 0x0039DC97, 0x00397297, 0x00000002, 0x0039DC9A, + 0x0039729A, 0x00000002, 0x0039DC97, 0x00397497, 0x00000002, 0x0039DC99, + 0x0039A499, 0x00000002, 0x0039DC9A, 0x0039A49A, 0x00000002, 0x0039DC97, + 0x003A4E97, 0x00000002, 0x0039DC9A, 0x003A4E9A, 0x00000002, 0x0039DE97, + 0x00396497, 0x00000002, 0x0039DE9A, 0x0039649A, 0x00000002, 0x0039DE97, + 0x00397297, 0x00000002, 0x0039DE9A, 0x0039729A, 0x00000002, 0x0039DE97, + 0x00397497, 0x00000002, 0x0039DE9A, 0x0039749A, 0x00000002, 0x0039DE99, + 0x0039A499, 0x00000002, 0x0039DE9A, 0x0039A49A, 0x00000002, 0x0039DE97, + 0x003A4E97, 0x00000002, 0x0039DE9A, 0x003A4E9A, 0x00000002, 0x0039E697, + 0x00397297, 0x00000002, 0x0039E69A, 0x0039729A, + // Block 703, offset 0xafc0 + 0x00000002, 0x0039E697, 0x003A4E97, 0x00000002, 0x0039E698, 0x003A4E98, + 0x00000002, 0x0039E69A, 0x003A4E9A, 0x00000002, 0x0039E897, 0x003A4E97, + 0x00000002, 0x0039E898, 0x003A4E98, 0x00000002, 0x0039E89A, 0x003A4E9A, + 0x00000002, 0x0039EE97, 0x00396497, 0x00000002, 0x0039EE9A, 0x0039649A, + 0x00000002, 0x0039EE97, 0x003A4E97, 0x00000002, 0x0039EE9A, 0x003A4E9A, + 0x00000002, 0x0039F097, 0x00396497, 0x00000002, 0x0039F09A, 0x0039649A, + 0x00000002, 0x0039F097, 0x003A4E97, 0x00000002, 0x0039F09A, 0x003A4E9A, + 0x00000002, 0x0039FC97, 0x00396497, 0x00000002, 0x0039FC9A, 0x0039649A, + 0x00000002, 0x0039FC97, 0x00397297, 0x00000002, 0x0039FC9A, 0x0039729A, + 0x00000002, 0x0039FC97, 0x00397497, 0x00000002, 0x0039FC9A, 0x0039749A, + 0x00000002, 0x0039FC97, 0x003A4E97, 0x00000002, + // Block 704, offset 0xb000 + 0x0039FC9A, 0x003A4E9A, 0x00000002, 0x003A1297, 0x00397297, 0x00000002, + 0x003A129A, 0x0039729A, 0x00000002, 0x003A1297, 0x003A4E97, 0x00000002, + 0x003A129A, 0x003A4E9A, 0x00000002, 0x003A4099, 0x00393899, 0x00000002, + 0x003A409A, 0x0039389A, 0x00000002, 0x003A4097, 0x00396497, 0x00000002, + 0x003A409A, 0x0039649A, 0x00000002, 0x003A4097, 0x00397297, 0x00000002, + 0x003A409A, 0x0039729A, 0x00000002, 0x003A4097, 0x00397497, 0x00000002, + 0x003A409A, 0x0039749A, 0x00000002, 0x003A4097, 0x003A4E97, 0x00000002, + 0x003A4098, 0x003A4E98, 0x00000002, 0x003A4099, 0x003A4E99, 0x00000002, + 0x003A409A, 0x003A4E9A, 0x00000002, 0x003A4E99, 0x00393899, 0x00000002, + 0x003A4E97, 0x00396497, 0x00000002, 0x003A4E9A, 0x0039649A, 0x00000002, + 0x003A4E97, 0x00397297, 0x00000002, 0x003A4E9A, + // Block 705, offset 0xb040 + 0x0039729A, 0x00000002, 0x003A4E97, 0x00397497, 0x00000002, 0x003A4E9A, + 0x0039749A, 0x00000002, 0x003A4E97, 0x003A4E97, 0x00000002, 0x003A4E99, + 0x003A4E99, 0x00000002, 0x003A4E9A, 0x003A4E9A, 0x00000002, 0x003A5697, + 0x00396497, 0x00000002, 0x003A569A, 0x0039649A, 0x00000002, 0x003A5697, + 0x00397297, 0x00000002, 0x003A569A, 0x0039729A, 0x00000002, 0x003A5697, + 0x00397497, 0x00000002, 0x003A569A, 0x0039749A, 0x00000002, 0x003A5699, + 0x0039A499, 0x00000002, 0x003A5699, 0x0039A699, 0x00000002, 0x003A5697, + 0x003A4E97, 0x00000002, 0x003A5698, 0x003A4E98, 0x00000002, 0x003A5699, + 0x003A4E99, 0x00000002, 0x003A569A, 0x003A4E9A, 0x00000002, 0x003A5699, + 0x003A5699, 0x00000002, 0x403A7220, 0xA000C602, 0x00000002, 0x003A7484, + 0x00391C84, 0x00000002, 0xAE604702, 0xAE603802, + // Block 706, offset 0xb080 + 0x00000002, 0x40062C20, 0xAE603802, 0x00000002, 0x40063620, 0xAE603802, + 0x00000002, 0x40063820, 0xAE603802, 0x00000002, 0x402BDE20, 0xAE603602, + 0x00000002, 0x002BDE88, 0xAE603602, 0x00000002, 0x402BDE20, 0xAE603702, + 0x00000002, 0x002BDE88, 0xAE603702, 0x00000002, 0x402BDE20, 0xAE603802, + 0x00000002, 0x002BDE88, 0xAE603802, 0x00000002, 0x402BDE20, 0xAE603902, + 0x00000002, 0x002BDE88, 0xAE603902, 0x00000003, 0x402BDE20, 0xAE604302, + 0xAE603802, 0x00000003, 0x002BDE88, 0xAE604302, 0xAE603802, 0x00000004, + 0x002BDE84, 0xA0013904, 0x002C9884, 0xAE603802, 0x00000004, 0x002BDE8A, + 0xA0013904, 0x002C988A, 0xAE603802, 0x00000002, 0x402BE020, 0xAE603602, + 0x00000002, 0x002BE083, 0xAE603602, 0x00000002, 0x402BE020, 0xAE603702, + 0x00000002, 0x002BE083, 0xAE603702, 0x00000002, + // Block 707, offset 0xb0c0 + 0x402BE020, 0xAE603802, 0x00000002, 0x002BE083, 0xAE603802, 0x00000002, + 0x402BE020, 0xAE603902, 0x00000002, 0x002BE083, 0xAE603902, 0x00000002, + 0x402BE220, 0xAE603602, 0x00000002, 0x002BE283, 0xAE603602, 0x00000002, + 0x402BE220, 0xAE603702, 0x00000002, 0x002BE283, 0xAE603702, 0x00000002, + 0x402BE220, 0xAE603802, 0x00000002, 0x002BE283, 0xAE603802, 0x00000002, + 0x402BE220, 0xAE603902, 0x00000002, 0x002BE283, 0xAE603902, 0x00000002, + 0x402C0A20, 0xAE603902, 0x00000002, 0x002C0A88, 0xAE603902, 0x00000002, + 0x402C3A20, 0xAE603802, 0x00000002, 0x002C3A88, 0xAE603802, 0x00000003, + 0x402C3A20, 0xACA05602, 0xAE603802, 0x00000003, 0x002C3A88, 0xACA05602, + 0xAE603802, 0x00000002, 0x402C6220, 0xAE603902, 0x00000002, 0x002C6288, + 0xAE603902, 0x00000002, 0x402C9820, 0xAE603602, + // Block 708, offset 0xb100 + 0x00000002, 0x002C9888, 0xAE603602, 0x00000002, 0x402C9820, 0xAE603702, + 0x00000002, 0x002C9888, 0xAE603702, 0x00000002, 0x402C9820, 0xAE603802, + 0x00000002, 0x002C9888, 0xAE603802, 0x00000002, 0x402C9820, 0xAE603902, + 0x00000002, 0x002C9888, 0xAE603902, 0x00000003, 0x402C9820, 0xAE605B02, + 0xAE603802, 0x00000003, 0x002C9888, 0xAE605B02, 0xAE603802, 0x00000002, + 0x402C9A20, 0xAE603602, 0x00000002, 0x002C9A83, 0xAE603602, 0x00000002, + 0x402C9A20, 0xAE603702, 0x00000002, 0x002C9A83, 0xAE603702, 0x00000002, + 0x402C9A20, 0xAE603802, 0x00000002, 0x002C9A83, 0xAE603802, 0x00000002, + 0x402C9A20, 0xAE603902, 0x00000002, 0x002C9A83, 0xAE603902, 0x00000002, + 0x402D2220, 0xAE603802, 0x00000002, 0x002D2288, 0xAE603802, 0x00000002, + 0x402D6820, 0xAE603902, 0x00000002, 0x002D6888, + // Block 709, offset 0xb140 + 0xAE603902, 0x00000002, 0x402D9A20, 0xAE603602, 0x00000002, 0x002D9A88, + 0xAE603602, 0x00000002, 0x402D9A20, 0xAE603702, 0x00000002, 0x002D9A88, + 0xAE603702, 0x00000002, 0x402D9A20, 0xAE603802, 0x00000002, 0x002D9A88, + 0xAE603802, 0x00000002, 0x402D9A20, 0xAE603902, 0x00000002, 0x002D9A88, + 0xAE603902, 0x00000003, 0x402D9A20, 0xAE604702, 0xAE603802, 0x00000003, + 0x002D9A88, 0xAE604702, 0xAE603802, 0x00000002, 0x402DFE20, 0xAE603802, + 0x00000002, 0x002DFE88, 0xAE603802, 0x00000002, 0x402DFE20, 0xAE603902, + 0x00000002, 0x002DFE88, 0xAE603902, 0x00000002, 0x402E2220, 0xAE603802, + 0x00000002, 0x002E2288, 0xAE603802, 0x00000002, 0x402E2220, 0xAE603902, + 0x00000002, 0x002E2288, 0xAE603902, 0x00000003, 0x402E2220, 0xAE603902, + 0xAE605B02, 0x00000003, 0x002E2288, 0xAE603902, + // Block 710, offset 0xb180 + 0xAE605B02, 0x00000002, 0x402E8220, 0xAE603802, 0x00000002, 0x002E8288, + 0xAE603802, 0x00000002, 0x402E8220, 0xAE603902, 0x00000002, 0x002E8288, + 0xAE603902, 0x00000002, 0x402E9E20, 0xAE603702, 0x00000002, 0x002E9E88, + 0xAE603702, 0x00000002, 0x402E9E20, 0xAE603802, 0x00000002, 0x002E9E88, + 0xAE603802, 0x00000002, 0x402E9E20, 0xAE603902, 0x00000002, 0x002E9E88, + 0xAE603902, 0x00000002, 0x402EE220, 0xAE603602, 0x00000002, 0x002EE288, + 0xAE603602, 0x00000002, 0x402EE220, 0xAE603702, 0x00000002, 0x002EE288, + 0xAE603702, 0x00000003, 0x402EE220, 0xAE603702, 0xAE603802, 0x00000003, + 0x002EE288, 0xAE603702, 0xAE603802, 0x00000003, 0x402EE220, 0xAE603702, + 0xAE604702, 0x00000003, 0x002EE288, 0xAE603702, 0xAE604702, 0x00000003, + 0x402EE220, 0xAE603702, 0xAE605B02, 0x00000003, + // Block 711, offset 0xb1c0 + 0x002EE288, 0xAE603702, 0xAE605B02, 0x00000002, 0x402EE220, 0xAE603802, + 0x00000002, 0x002EE288, 0xAE603802, 0x00000002, 0x402EE220, 0xAE603902, + 0x00000002, 0x002EE288, 0xAE603902, 0x00000003, 0x402EE220, 0xA0005402, + 0xAE603802, 0x00000003, 0x002EE288, 0xA0005402, 0xAE603802, 0x00000003, + 0x402EE220, 0xAE605B02, 0xAE603802, 0x00000003, 0x002EE288, 0xAE605B02, + 0xAE603802, 0x00000002, 0x402EE420, 0xAE603602, 0x00000002, 0x002EE483, + 0xAE603602, 0x00000002, 0x402EE420, 0xAE603702, 0x00000002, 0x002EE483, + 0xAE603702, 0x00000002, 0x402EE420, 0xAE603802, 0x00000002, 0x002EE483, + 0xAE603802, 0x00000002, 0x402EE420, 0xAE603902, 0x00000002, 0x002EE483, + 0xAE603902, 0x00000002, 0x402EE620, 0xAE603502, 0x00000002, 0x002EE683, + 0xAE603502, 0x00000002, 0x402EE620, 0xAE603602, + // Block 712, offset 0xb200 + 0x00000002, 0x002EE683, 0xAE603602, 0x00000002, 0x402EE620, 0xAE603702, + 0x00000002, 0x002EE683, 0xAE603702, 0x00000002, 0x402EE620, 0xAE603802, + 0x00000002, 0x002EE683, 0xAE603802, 0x00000002, 0x402EE620, 0xAE603902, + 0x00000002, 0x002EE683, 0xAE603902, 0x00000002, 0x402F2C20, 0xAE603802, + 0x00000002, 0x002F2C88, 0xAE603802, 0x00000002, 0x402F7A20, 0xAE603802, + 0x00000002, 0x002F7A88, 0xAE603802, 0x00000002, 0x402F7A20, 0xAE603902, + 0x00000002, 0x002F7A88, 0xAE603902, 0x00000003, 0x402F7A20, 0xAE603902, + 0xAE605B02, 0x00000003, 0x002F7A88, 0xAE603902, 0xAE605B02, 0x00000002, + 0x402FE620, 0xAE603802, 0x00000002, 0x002FE688, 0xAE603802, 0x00000003, + 0x402FE620, 0xAE603802, 0xAE605202, 0x00000003, 0x002FE688, 0xAE603802, + 0xAE605202, 0x00000002, 0x402FE620, 0xAE603902, + // Block 713, offset 0xb240 + 0x00000002, 0x002FE688, 0xAE603902, 0x00000003, 0x402FE620, 0xAE603902, + 0xAE605202, 0x00000003, 0x002FE688, 0xAE603902, 0xAE605202, 0x00000002, + 0x40302C20, 0xAE603902, 0x00000002, 0x00302C88, 0xAE603902, 0x00000002, + 0x40306C20, 0xAE603602, 0x00000002, 0x00306C88, 0xAE603602, 0x00000002, + 0x40306C20, 0xAE603702, 0x00000002, 0x00306C88, 0xAE603702, 0x00000003, + 0x40306C20, 0xAE603702, 0xAE603802, 0x00000003, 0x00306C88, 0xAE603702, + 0xAE603802, 0x00000002, 0x40306C20, 0xAE603802, 0x00000002, 0x00306C88, + 0xAE603802, 0x00000002, 0x40306C20, 0xAE603902, 0x00000002, 0x00306C88, + 0xAE603902, 0x00000003, 0x40306C20, 0xAE604702, 0xAE603802, 0x00000003, + 0x00306C88, 0xAE604702, 0xAE603802, 0x00000002, 0x40306E20, 0xAE603602, + 0x00000002, 0x00306E83, 0xAE603602, 0x00000002, + // Block 714, offset 0xb280 + 0x40306E20, 0xAE603702, 0x00000002, 0x00306E83, 0xAE603702, 0x00000002, + 0x40306E20, 0xAE603802, 0x00000002, 0x00306E83, 0xAE603802, 0x00000002, + 0x40306E20, 0xAE603902, 0x00000002, 0x00306E83, 0xAE603902, 0x00000002, + 0x4030BE20, 0xAE603702, 0x00000002, 0x0030BE88, 0xAE603702, 0x00000002, + 0x4030BE20, 0xAE603902, 0x00000002, 0x0030BE88, 0xAE603902, 0x00000002, + 0x4030E220, 0xAE603802, 0x00000002, 0x0030E288, 0xAE603802, 0x00000002, + 0x4030E220, 0xAE603902, 0x00000002, 0x0030E288, 0xAE603902, 0x00000002, + 0x40310020, 0xAE603602, 0x00000002, 0x00310088, 0xAE603602, 0x00000002, + 0x40310020, 0xAE603702, 0x00000002, 0x00310088, 0xAE603702, 0x00000002, + 0x40310020, 0xAE603802, 0x00000002, 0x00310088, 0xAE603802, 0x00000002, + 0x40310020, 0xAE603902, 0x00000002, 0x00310088, + // Block 715, offset 0xb2c0 + 0xAE603902, 0x00000002, 0x40312A20, 0xAE603802, 0x00000002, 0x00312A88, + 0xAE603802, 0x00000002, 0x40312A20, 0xAE603902, 0x00000002, 0x00312A88, + 0xAE603902, 0x00000003, 0x40325220, 0xAE602202, 0xAE603802, 0x00000003, + 0x00325288, 0xAE602202, 0xAE603802, 0x00000004, 0x40325220, 0xAE602202, + 0xAE603802, 0xAF007F02, 0x00000004, 0x00325288, 0xAE602202, 0xAE603802, + 0xAF007F02, 0x00000003, 0x40325220, 0xAE602A02, 0xAE603802, 0x00000003, + 0x00325288, 0xAE602A02, 0xAE603802, 0x00000004, 0x40325220, 0xAE602A02, + 0xAE603802, 0xAF007F02, 0x00000004, 0x00325288, 0xAE602A02, 0xAE603802, + 0xAF007F02, 0x00000002, 0x40325220, 0xAE603802, 0x00000002, 0x00325288, + 0xAE603802, 0x00000003, 0x40325220, 0xAE603802, 0xAF007F02, 0x00000003, + 0x40325C20, 0xAE602202, 0xAE603802, 0x00000003, + // Block 716, offset 0xb300 + 0x00325C88, 0xAE602202, 0xAE603802, 0x00000003, 0x40325C20, 0xAE602A02, + 0xAE603802, 0x00000003, 0x00325C88, 0xAE602A02, 0xAE603802, 0x00000002, + 0x40325C20, 0xAE603802, 0x00000002, 0x00325C88, 0xAE603802, 0x00000003, + 0x40326820, 0xAE602202, 0xAE603802, 0x00000003, 0x00326888, 0xAE602202, + 0xAE603802, 0x00000004, 0x40326820, 0xAE602202, 0xAE603802, 0xAF007F02, + 0x00000004, 0x00326888, 0xAE602202, 0xAE603802, 0xAF007F02, 0x00000003, + 0x40326820, 0xAE602A02, 0xAE603802, 0x00000003, 0x00326888, 0xAE602A02, + 0xAE603802, 0x00000004, 0x40326820, 0xAE602A02, 0xAE603802, 0xAF007F02, + 0x00000004, 0x00326888, 0xAE602A02, 0xAE603802, 0xAF007F02, 0x00000002, + 0x40326820, 0xAE603802, 0x00000002, 0x00326888, 0xAE603802, 0x00000003, + 0x40326820, 0xAE603802, 0xAF007F02, 0x00000003, + // Block 717, offset 0xb340 + 0x40326C20, 0xAE602202, 0xAE603802, 0x00000003, 0x00326C88, 0xAE602202, + 0xAE603802, 0x00000003, 0x40326C20, 0xAE602A02, 0xAE603802, 0x00000003, + 0x00326C88, 0xAE602A02, 0xAE603802, 0x00000002, 0x40326C20, 0xAE603802, + 0x00000002, 0x00326C88, 0xAE603802, 0x00000003, 0x40326C20, 0xAE604702, + 0xAE603802, 0x00000003, 0x40327C20, 0xAE602202, 0xAE603802, 0x00000003, + 0x00327C88, 0xAE602202, 0xAE603802, 0x00000003, 0x40327C20, 0xAE602A02, + 0xAE603802, 0x00000003, 0x00327C88, 0xAE602A02, 0xAE603802, 0x00000002, + 0x40327C20, 0xAE603802, 0x00000002, 0x00327C88, 0xAE603802, 0x00000003, + 0x40329820, 0xAE602202, 0xAE603802, 0x00000003, 0x40329820, 0xAE602A02, + 0xAE603802, 0x00000003, 0x00329888, 0xAE602A02, 0xAE603802, 0x00000002, + 0x40329820, 0xAE603802, 0x00000002, 0x00329888, + // Block 718, offset 0xb380 + 0xAE603802, 0x00000003, 0x40329820, 0xAE604702, 0xAE603802, 0x00000003, + 0x4032A220, 0xAE602202, 0xAE603802, 0x00000003, 0x0032A288, 0xAE602202, + 0xAE603802, 0x00000004, 0x4032A220, 0xAE602202, 0xAE603802, 0xAF007F02, + 0x00000004, 0x0032A288, 0xAE602202, 0xAE603802, 0xAF007F02, 0x00000003, + 0x4032A220, 0xAE602A02, 0xAE603802, 0x00000003, 0x0032A288, 0xAE602A02, + 0xAE603802, 0x00000004, 0x4032A220, 0xAE602A02, 0xAE603802, 0xAF007F02, + 0x00000004, 0x0032A288, 0xAE602A02, 0xAE603802, 0xAF007F02, 0x00000002, + 0x4032A220, 0xAE603802, 0x00000002, 0x0032A288, 0xAE603802, 0x00000003, + 0x4032A220, 0xAE603802, 0xAF007F02, 0x00000002, 0x402BDE20, 0xAE603202, + 0x00000002, 0x402C9820, 0xAE603202, 0x00000002, 0x402D9A20, 0xAE603202, + 0x00000002, 0x402EE220, 0xAE603202, 0x00000002, + // Block 719, offset 0xb3c0 + 0x40306C20, 0xAE603202, 0x00000002, 0x402C9A20, 0xAE603C02, 0x00000002, + 0x002C9A83, 0xAE603C02, 0x00000003, 0x0003F483, 0x6C030A20, 0x4003F620, + 0x00000003, 0x0003F483, 0x6C110E20, 0x4003F620, 0x00000003, 0x0003F483, + 0x6C272220, 0x4003F620, 0x00000003, 0x0003F483, 0x6C37B420, 0x4003F620, + 0x00000003, 0x0003F483, 0x6C549820, 0x4003F620, 0x00000003, 0x0003F483, + 0x6C5D8420, 0x4003F620, 0x00000003, 0x0003F483, 0x6C61F420, 0x4003F620, + 0x00000003, 0x0003F483, 0x6C64CA20, 0x4003F620, 0x00000003, 0x0003F483, + 0x6C6C2E20, 0x4003F620, 0x00000003, 0x0003F483, 0x6C6F9A20, 0x4003F620, + 0x00000003, 0x0003F483, 0x6C814020, 0x4003F620, 0x00000003, 0x0003F483, + 0x6C8F2420, 0x4003F620, 0x00000003, 0x0003F483, 0x6C9FE620, 0x4003F620, + 0x00000003, 0x0003F483, 0x6CA25C20, 0x4003F620, + // Block 720, offset 0xb400 + 0x00000003, 0x0003F483, 0x6CB4C620, 0x4003F620, 0x00000003, 0x0003F483, + 0x6CB6C820, 0x4003F620, 0x00000003, 0x0003F483, 0x6CC63620, 0x4003F620, + 0x00000003, 0x0003F483, 0x6CC9F220, 0x4003F620, 0x00000003, 0x0003F483, + 0x6CCF3620, 0x4003F620, 0x00000003, 0x0003F483, 0x6CD22420, 0x4003F620, + 0x00000003, 0x0003F483, 0x6CD70220, 0x4003F620, 0x00000003, 0x0003F483, + 0x6CD87420, 0x4003F620, 0x00000003, 0x0003F483, 0x6CE27020, 0x4003F620, + 0x00000003, 0x0003F483, 0x6CE91020, 0x4003F620, 0x00000003, 0x0003F483, + 0x6CF41420, 0x4003F620, 0x00000003, 0x0003F483, 0x6D007020, 0x4003F620, + 0x00000003, 0x0003F483, 0x6D04B220, 0x4003F620, 0x00000003, 0x0003F483, + 0x6D08F820, 0x4003F620, 0x00000003, 0x0003F483, 0x6D13B620, 0x4003F620, + 0x00000003, 0x0003F483, 0x6D1F9820, 0x4003F620, + // Block 721, offset 0xb440 + 0x00000003, 0x0003F483, 0x6D266820, 0x4003F620, 0x00000003, 0x0003F483, + 0x6D357020, 0x4003F620, 0x00000003, 0x0003F483, 0x6D399220, 0x4003F620, + 0x00000003, 0x0003F483, 0x6D3AC620, 0x4003F620, 0x00000003, 0x0003F483, + 0x6D3E6020, 0x4003F620, 0x00000003, 0x0003F483, 0x6D3F2A20, 0x4003F620, + 0x00000003, 0x0004B083, 0x6C011220, 0x4004B220, 0x00000003, 0x0004B083, + 0x6C044020, 0x4004B220, 0x00000003, 0x0004B083, 0x6C079220, 0x4004B220, + 0x00000003, 0x0004B083, 0x6C26E020, 0x4004B220, 0x00000003, 0x0004B083, + 0x6C2A1220, 0x4004B220, 0x00000003, 0x0004B083, 0x6C2D0A20, 0x4004B220, + 0x00000003, 0x0004B083, 0x6C37B420, 0x4004B220, 0x00000003, 0x0004B083, + 0x6CC9F220, 0x4004B220, 0x00000003, 0x0004B083, 0x6CD16420, 0x4004B220, + 0x00000003, 0x0029CE83, 0x4029CC20, 0x6C2D0A20, + // Block 722, offset 0xb480 + 0x00000003, 0x0029CE83, 0x4029CC20, 0x6CC63620, 0x00000003, 0x0029CE83, + 0x4029CC20, 0x6D266820, 0x00000003, 0x0029CE83, 0x4029CE20, 0x6C2D0A20, + 0x00000003, 0x0029CE83, 0x4029CE20, 0x6CC63620, 0x00000003, 0x0029CE83, + 0x4029CE20, 0x6D266820, 0x00000003, 0x0029CE83, 0x4029D020, 0x6C2D0A20, + 0x00000003, 0x0029CE83, 0x4029D020, 0x6CC63620, 0x00000003, 0x0029CE83, + 0x4029D020, 0x6D266820, 0x00000003, 0x0029CE83, 0x4029D220, 0x6C2D0A20, + 0x00000003, 0x0029CE83, 0x4029D220, 0x6CC63620, 0x00000003, 0x0029CE83, + 0x4029D420, 0x6C2D0A20, 0x00000003, 0x0029CE83, 0x4029D420, 0x6CC63620, + 0x00000003, 0x0029CE83, 0x4029D620, 0x6C2D0A20, 0x00000003, 0x0029CE83, + 0x4029D620, 0x6CC63620, 0x00000003, 0x0029CE83, 0x4029D820, 0x6C2D0A20, + 0x00000003, 0x0029CE83, 0x4029D820, 0x6CC63620, + // Block 723, offset 0xb4c0 + 0x00000003, 0x0029CE83, 0x4029DA20, 0x6C2D0A20, 0x00000003, 0x0029CE83, + 0x4029DA20, 0x6CC63620, 0x00000003, 0x0029CE83, 0x4029DC20, 0x6C2D0A20, + 0x00000003, 0x0029CE83, 0x4029DC20, 0x6CC63620, 0x00000003, 0x0029CE83, + 0x4029DE20, 0x6C2D0A20, 0x00000003, 0x0029CE83, 0x4029DE20, 0x6CC63620, + 0x00000003, 0x0029D083, 0x4029CC20, 0x6C2D0A20, 0x00000003, 0x0029D083, + 0x4029CC20, 0x6CC63620, 0x00000003, 0x0029D083, 0x4029CE20, 0x6C2D0A20, + 0x00000003, 0x0029D083, 0x4029CE20, 0x6CC63620, 0x00000003, 0x0029D083, + 0x4029D020, 0x6C2D0A20, 0x00000003, 0x0029D083, 0x4029D020, 0x6CC63620, + 0x00000003, 0x0029D083, 0x4029D220, 0x6C2D0A20, 0x00000003, 0x0029D083, + 0x4029D220, 0x6CC63620, 0x00000003, 0x0029D083, 0x4029D420, 0x6C2D0A20, + 0x00000003, 0x0029D083, 0x4029D420, 0x6CC63620, + // Block 724, offset 0xb500 + 0x00000003, 0x0029D083, 0x4029D620, 0x6CC63620, 0x00000003, 0x0029D083, + 0x4029D820, 0x6CC63620, 0x00000003, 0x0029D083, 0x4029DA20, 0x6CC63620, + 0x00000003, 0x0029D083, 0x4029DC20, 0x6CC63620, 0x00000003, 0x0029D083, + 0x4029DE20, 0x6CC63620, 0x00000003, 0x0029D283, 0x4029CC20, 0x6CC63620, + 0x00000003, 0x0029D283, 0x4029CE20, 0x6CC63620, 0x00000002, 0x402BDE1C, + 0xAE604702, 0x00000002, 0x002BDE03, 0xAE604702, 0x00000002, 0x402BDE1C, + 0xAE605202, 0x00000002, 0x002BDE03, 0xAE605202, 0x00000002, 0x402BDE1D, + 0xAE603702, 0x00000002, 0x002BDE23, 0xAE603702, 0x00000002, 0x402BDE1D, + 0xAE603C02, 0x00000002, 0x002BDE23, 0xAE603C02, 0x00000002, 0x402BDE1D, + 0xAE604302, 0x00000002, 0x002BDE23, 0xAE604302, 0x00000002, 0x402BDE1F, + 0xAE603702, 0x00000002, 0x002BDE63, 0xAE603702, + // Block 725, offset 0xb540 + 0x00000002, 0x402BDE1F, 0xAE603C02, 0x00000002, 0x002BDE63, 0xAE603C02, + 0x00000002, 0x402C981C, 0xAE603202, 0x00000002, 0x002C9803, 0xAE603202, + 0x00000002, 0x402C981C, 0xAE603502, 0x00000002, 0x002C9803, 0xAE603502, + 0x00000002, 0x402D9A1D, 0xAE604702, 0x00000002, 0x002D9A23, 0xAE604702, + 0x00000002, 0x402EE21C, 0xAE603202, 0x00000002, 0x002EE203, 0xAE603202, + 0x00000002, 0x402EE21C, 0xAE603502, 0x00000002, 0x002EE203, 0xAE603502, + 0x00000002, 0x402EE21C, 0xAE604702, 0x00000002, 0x002EE203, 0xAE604702, + 0x00000002, 0x402EE21C, 0xAE604E02, 0x00000002, 0x002EE203, 0xAE604E02, + 0x00000002, 0x402EE21C, 0xAE605202, 0x00000002, 0x002EE203, 0xAE605202, + 0x00000002, 0x402EE21C, 0xACA05902, 0x00000002, 0x002EE203, 0xACA05902, + 0x00000002, 0x402EE21D, 0xAE603C02, 0x00000002, + // Block 726, offset 0xb580 + 0x002EE223, 0xAE603C02, 0x00000002, 0x402EE21D, 0xAE604E02, 0x00000002, + 0x002EE223, 0xAE604E02, 0x00000002, 0x402EE21D, 0xAD806802, 0x00000002, + 0x002EE223, 0xAD806802, 0x00000002, 0x402EE21F, 0xAE603C02, 0x00000002, + 0x002EE263, 0xAE603C02, 0x00000002, 0x402EE21F, 0xAD806802, 0x00000002, + 0x002EE263, 0xAD806802, 0x00000002, 0x40306C1C, 0xAE604702, 0x00000002, + 0x00306C03, 0xAE604702, 0x00000002, 0x40306C1D, 0xAE604E02, 0x00000002, + 0x00306C23, 0xAE604E02, 0x00000002, 0x40306C1D, 0xAD806802, 0x00000002, + 0x00306C23, 0xAD806802, 0x00000002, 0x40306C1F, 0xAD806802, 0x00000002, + 0x00306C63, 0xAD806802, 0x00000004, 0x2D399283, 0x6CD2FC20, 0x6C5B8A20, + 0x6CCF3620, 0x00000003, 0x0003F483, 0x6C000220, 0x4003F620, 0x00000003, + 0x0003F483, 0x6C003620, 0x4003F620, 0x00000003, + // Block 727, offset 0xb5c0 + 0x0003F483, 0x6C006220, 0x4003F620, 0x00000003, 0x0003F483, 0x6C007420, + 0x4003F620, 0x00000003, 0x0003F483, 0x6C008820, 0x4003F620, 0x00000003, + 0x0003F483, 0x6C00B620, 0x4003F620, 0x00000003, 0x0003F483, 0x6C00DC20, + 0x4003F620, 0x00000003, 0x0003F483, 0x6C018420, 0x4003F620, 0x00000003, + 0x0003F483, 0x6C028820, 0x4003F620, 0x00000003, 0x0003F483, 0x6C02D820, + 0x4003F620, 0x00000003, 0x0003F483, 0x6C049620, 0x4003F620, 0x00000003, + 0x0003F483, 0x6C049C20, 0x4003F620, 0x00000003, 0x0003F483, 0x6C049E20, + 0x4003F620, 0x00000003, 0x0003F483, 0x6C04C620, 0x4003F620, 0x00000003, + 0x0003F483, 0x6C04D020, 0x4003F620, 0x00000003, 0x0003F483, 0x6C05E620, + 0x4003F620, 0x00000003, 0x0003F483, 0x6C079020, 0x4003F620, 0x00000003, + 0x0003F483, 0x6C0BA020, 0x4003F620, 0x00000003, + // Block 728, offset 0xb600 + 0x0003F483, 0x6C0BC020, 0x4003F620, 0x00000003, 0x0003F483, 0x6C0E3E20, + 0x4003F620, 0x00000003, 0x0003F483, 0x6C127420, 0x4003F620, 0x00000003, + 0x0003F483, 0x6C147E20, 0x4003F620, 0x00000003, 0x0003F483, 0x6C148220, + 0x4003F620, 0x00000003, 0x0003F483, 0x6C185220, 0x4003F620, 0x00000003, + 0x0003F483, 0x6C2BB220, 0x4003F620, 0x00000003, 0x0003F483, 0x6C2CA220, + 0x4003F620, 0x00000003, 0x0003F483, 0x6C2FD820, 0x4003F620, 0x00000003, + 0x0003F483, 0x6C3CEE20, 0x4003F620, 0x00000003, 0x0003F483, 0x6C41DC20, + 0x4003F620, 0x00000003, 0x0003F483, 0x6C741620, 0x4003F620, 0x00000003, + 0x0003F483, 0x6C791620, 0x4003F620, 0x00000003, 0x0003F483, 0x6C7DE020, + 0x4003F620, 0x00000003, 0x0003F483, 0x6C86F020, 0x4003F620, 0x00000003, + 0x0003F483, 0x6CA6A420, 0x4003F620, 0x00000003, + // Block 729, offset 0xb640 + 0x0003F483, 0x6D0F3820, 0x4003F620, 0x00000003, 0x0003F483, 0x6D2EFA20, + 0x4003F620, 0x00000003, 0x0004B083, 0x6C007420, 0x4004B220, 0x00000003, + 0x0004B083, 0x6C00DC20, 0x4004B220, 0x00000003, 0x0004B083, 0x6C093E20, + 0x4004B220, 0x00000003, 0x0004B083, 0x6C096620, 0x4004B220, 0x00000003, + 0x0004B083, 0x6C0FC420, 0x4004B220, 0x00000003, 0x0004B083, 0x6C555C20, + 0x4004B220, 0x00000003, 0x0004B083, 0x6C9AC020, 0x4004B220, 0x00000003, + 0x0004B083, 0x6CA4CC20, 0x4004B220, 0x00000003, 0x0004B083, 0x6CB9B020, + 0x4004B220, 0x00000003, 0x0029CE83, 0x4029CC20, 0x6C049620, 0x00000003, + 0x0029CE83, 0x4029CC20, 0x6C049C20, 0x00000003, 0x0029CE83, 0x4029CC20, + 0x6C555C20, 0x00000003, 0x0029CE83, 0x4029CE20, 0x6C049620, 0x00000003, + 0x0029CE83, 0x4029CE20, 0x6C049C20, 0x00000003, + // Block 730, offset 0xb680 + 0x0029CE83, 0x4029CE20, 0x6C555C20, 0x00000003, 0x0029CE83, 0x4029D020, + 0x6C049620, 0x00000003, 0x0029CE83, 0x4029D020, 0x6C049C20, 0x00000003, + 0x0029CE83, 0x4029D020, 0x6C555C20, 0x00000003, 0x0029CE83, 0x4029D220, + 0x6C049620, 0x00000003, 0x0029CE83, 0x4029D220, 0x6C555C20, 0x00000003, + 0x0029CE83, 0x4029D420, 0x6C049620, 0x00000003, 0x0029CE83, 0x4029D420, + 0x6C555C20, 0x00000003, 0x0029CE83, 0x4029D620, 0x6C049620, 0x00000003, + 0x0029CE83, 0x4029D620, 0x6C555C20, 0x00000003, 0x0029CE83, 0x4029D820, + 0x6C049620, 0x00000003, 0x0029CE83, 0x4029D820, 0x6C555C20, 0x00000003, + 0x0029CE83, 0x4029DA20, 0x6C049620, 0x00000003, 0x0029CE83, 0x4029DA20, + 0x6C555C20, 0x00000003, 0x0029CE83, 0x4029DC20, 0x6C049620, 0x00000003, + 0x0029CE83, 0x4029DC20, 0x6C555C20, 0x00000003, + // Block 731, offset 0xb6c0 + 0x0029CE83, 0x4029DE20, 0x6C049620, 0x00000003, 0x0029CE83, 0x4029DE20, + 0x6C555C20, 0x00000003, 0x0029D083, 0x4029CC20, 0x6C049620, 0x00000003, + 0x0029D083, 0x4029CC20, 0x6C555C20, 0x00000003, 0x0029D083, 0x4029CE20, + 0x6C049620, 0x00000003, 0x0029D083, 0x4029CE20, 0x6C555C20, 0x00000003, + 0x0029D083, 0x4029D020, 0x6C049620, 0x00000003, 0x0029D083, 0x4029D020, + 0x6C555C20, 0x00000003, 0x0029D083, 0x4029D220, 0x6C049620, 0x00000003, + 0x0029D083, 0x4029D220, 0x6C555C20, 0x00000003, 0x0029D083, 0x4029D420, + 0x6C049620, 0x00000003, 0x0029D083, 0x4029D420, 0x6C555C20, 0x00000003, + 0x0029D083, 0x4029D620, 0x6C049620, 0x00000003, 0x0029D083, 0x4029D820, + 0x6C049620, 0x00000003, 0x0029D083, 0x4029DA20, 0x6C049620, 0x00000003, + 0x0029D083, 0x4029DC20, 0x6C049620, 0x00000003, + // Block 732, offset 0xb700 + 0x0029D083, 0x4029DE20, 0x6C049620, 0x00000003, 0x0029D283, 0x4029CC20, + 0x6C049620, 0x00000003, 0x0029D283, 0x4029CE20, 0x6C049620, 0x00000004, + 0x2C741683, 0x6C111820, 0x6C0BD220, 0x6C3CEE20, +} + +// mainContractElem: 4120 entries, 16480 bytes +var mainContractElem = [4120]uint32{ + // Block 0, offset 0x0 + 0x402E2220, 0xE0000CFB, 0xE0000CFB, 0x002E2288, 0xE0000D01, 0xE0000D01, + 0x40332220, 0x40332A20, 0x40333220, 0x00332288, 0x00332A88, 0x00333288, + 0x40333A20, 0x40334220, 0x00333A88, 0x00334288, 0x40336220, 0x4033A220, + 0x4033A220, 0x00336288, 0x0033A288, 0x0033A288, 0x4033B220, 0x4033BA20, + 0x0033B288, 0x0033BA88, 0x4033CA20, 0x4033D420, 0x0033CA88, 0x0033D488, + 0x4033E420, 0x4033F220, 0x0033E488, 0x0033F288, 0x40341420, 0x40343E20, + 0x40342420, 0x00341488, 0x00343E88, 0x00342488, 0x40342C20, 0x40343620, + 0x00342C88, 0x00343688, 0x4034EE20, 0x4034F620, 0x0034EE88, 0x0034F688, + 0x4034FE20, 0x40350620, 0x0034FE88, 0x00350688, 0x40345020, 0x40356A20, + 0x40356A20, 0x00345088, 0x00356A88, 0x00356A88, 0x40357220, 0x40357A20, + 0x40358220, 0x40358A20, 0x00357288, 0x00357A88, + // Block 1, offset 0x40 + 0x00358288, 0x00358A88, 0x40361820, 0x40362220, 0x00361888, 0x00362288, + 0x40367E20, 0x40368620, 0x00367E88, 0x00368688, 0x4036A820, 0x4036B020, + 0x0036A888, 0x0036B088, 0x40371420, 0x40371C20, 0x00371488, 0x00371C88, + 0x40393820, 0x40391E20, 0x40392020, 0x40392820, 0x403A7420, 0x40392620, + 0x403A9020, 0x40393020, 0x4040F020, 0x4040F420, 0x4040F620, 0x40426E20, + 0x40427220, 0x40427020, 0x40427420, 0x40429020, 0x40429420, 0x4042D020, + 0x4042D620, 0x4042DA20, 0x4042D220, 0x4042D820, 0x40435E20, 0x40436220, + 0x4043E020, 0x4043E220, 0x4043F020, 0x4043F820, 0x4043F620, 0x4043F220, + 0x4043F420, 0x4043F620, 0x4043F820, 0x40448220, 0x40448820, 0x40448C20, + 0x40448420, 0x40448A20, 0x40451E20, 0x40452620, 0x40452020, 0x40452420, + 0x40452820, 0x40452420, 0x40452620, 0x40498420, + // Block 2, offset 0x80 + 0xE0001881, 0xE0001890, 0xE000189F, 0xE00018AE, 0xE00018BD, 0xE00018CC, + 0xE00018DB, 0xE00018EA, 0xE00018F9, 0xE0001908, 0xE0001917, 0xE0001926, + 0xE0001935, 0xE0001944, 0xE0001953, 0xE0001962, 0xE0001971, 0xE0001980, + 0xE000198F, 0xE000199E, 0xE00019AD, 0xE00019BC, 0xE00019CB, 0xE00019DA, + 0xE00019E9, 0xE00019F8, 0xE0001A07, 0xE0001A16, 0xE0001A25, 0xE0001A34, + 0xE0001A43, 0xE0001A52, 0xE0001A61, 0xE0001A70, 0xE0001A7F, 0xE0001A8E, + 0xE0001A9D, 0xE0001AAC, 0xE0001ABB, 0xE0001ACA, 0xE0001AD9, 0xE0001AE8, + 0xE0001AF7, 0xE0001B06, 0xE0001B15, 0xE0001B24, 0x40498620, 0xE0001884, + 0xE0001893, 0xE00018A2, 0xE00018B1, 0xE00018C0, 0xE00018CF, 0xE00018DE, + 0xE00018ED, 0xE00018FC, 0xE000190B, 0xE000191A, 0xE0001929, 0xE0001938, + 0xE0001947, 0xE0001956, 0xE0001965, 0xE0001974, + // Block 3, offset 0xc0 + 0xE0001983, 0xE0001992, 0xE00019A1, 0xE00019B0, 0xE00019BF, 0xE00019CE, + 0xE00019DD, 0xE00019EC, 0xE00019FB, 0xE0001A0A, 0xE0001A19, 0xE0001A28, + 0xE0001A37, 0xE0001A46, 0xE0001A55, 0xE0001A64, 0xE0001A73, 0xE0001A82, + 0xE0001A91, 0xE0001AA0, 0xE0001AAF, 0xE0001ABE, 0xE0001ACD, 0xE0001ADC, + 0xE0001AEB, 0xE0001AFA, 0xE0001B09, 0xE0001B18, 0xE0001B27, 0x40498820, + 0xE0001887, 0xE0001896, 0xE00018A5, 0xE00018B4, 0xE00018C3, 0xE00018D2, + 0xE00018E1, 0xE00018F0, 0xE00018FF, 0xE000190E, 0xE000191D, 0xE000192C, + 0xE000193B, 0xE000194A, 0xE0001959, 0xE0001968, 0xE0001977, 0xE0001986, + 0xE0001995, 0xE00019A4, 0xE00019B3, 0xE00019C2, 0xE00019D1, 0xE00019E0, + 0xE00019EF, 0xE00019FE, 0xE0001A0D, 0xE0001A1C, 0xE0001A2B, 0xE0001A3A, + 0xE0001A49, 0xE0001A58, 0xE0001A67, 0xE0001A76, + // Block 4, offset 0x100 + 0xE0001A85, 0xE0001A94, 0xE0001AA3, 0xE0001AB2, 0xE0001AC1, 0xE0001AD0, + 0xE0001ADF, 0xE0001AEE, 0xE0001AFD, 0xE0001B0C, 0xE0001B1B, 0xE0001B2A, + 0x40498A20, 0xE000188A, 0xE0001899, 0xE00018A8, 0xE00018B7, 0xE00018C6, + 0xE00018D5, 0xE00018E4, 0xE00018F3, 0xE0001902, 0xE0001911, 0xE0001920, + 0xE000192F, 0xE000193E, 0xE000194D, 0xE000195C, 0xE000196B, 0xE000197A, + 0xE0001989, 0xE0001998, 0xE00019A7, 0xE00019B6, 0xE00019C5, 0xE00019D4, + 0xE00019E3, 0xE00019F2, 0xE0001A01, 0xE0001A10, 0xE0001A1F, 0xE0001A2E, + 0xE0001A3D, 0xE0001A4C, 0xE0001A5B, 0xE0001A6A, 0xE0001A79, 0xE0001A88, + 0xE0001A97, 0xE0001AA6, 0xE0001AB5, 0xE0001AC4, 0xE0001AD3, 0xE0001AE2, + 0xE0001AF1, 0xE0001B00, 0xE0001B0F, 0xE0001B1E, 0xE0001B2D, 0x40498C20, + 0xE000188D, 0xE000189C, 0xE00018AB, 0xE00018BA, + // Block 5, offset 0x140 + 0xE00018C9, 0xE00018D8, 0xE00018E7, 0xE00018F6, 0xE0001905, 0xE0001914, + 0xE0001923, 0xE0001932, 0xE0001941, 0xE0001950, 0xE000195F, 0xE000196E, + 0xE000197D, 0xE000198C, 0xE000199B, 0xE00019AA, 0xE00019B9, 0xE00019C8, + 0xE00019D7, 0xE00019E6, 0xE00019F5, 0xE0001A04, 0xE0001A13, 0xE0001A22, + 0xE0001A31, 0xE0001A40, 0xE0001A4F, 0xE0001A5E, 0xE0001A6D, 0xE0001A7C, + 0xE0001A8B, 0xE0001A9A, 0xE0001AA9, 0xE0001AB8, 0xE0001AC7, 0xE0001AD6, + 0xE0001AE5, 0xE0001AF4, 0xE0001B03, 0xE0001B12, 0xE0001B21, 0xE0001B30, + 0xA0010502, 0x40497420, 0x4049E620, 0xE0001B42, 0xE0001B51, 0xE0001B60, + 0xE0001B6F, 0xE0001B7E, 0xE0001B9C, 0xE0001BBA, 0xE0001BC9, 0xE0001BD8, + 0xE0001BE7, 0xE0001BF6, 0xE0001C05, 0xE0001C14, 0xE0001C23, 0xE0001C32, + 0xE0001C41, 0xE0001C50, 0xE0001C5F, 0xE0001C6E, + // Block 6, offset 0x180 + 0xE0001C7D, 0xE0001C8C, 0xE0001C9B, 0xE0001CAA, 0xE0001B8D, 0xE0001CE1, + 0xE0001CF0, 0xE0001CFF, 0xE0001CB9, 0xE0001CCD, 0xE0001B33, 0xE0001BAB, + 0x4049E820, 0xE0001B45, 0xE0001B54, 0xE0001B63, 0xE0001B72, 0xE0001B81, + 0xE0001B9F, 0xE0001BBD, 0xE0001BCC, 0xE0001BDB, 0xE0001BEA, 0xE0001BF9, + 0xE0001C08, 0xE0001C17, 0xE0001C26, 0xE0001C35, 0xE0001C44, 0xE0001C53, + 0xE0001C62, 0xE0001C71, 0xE0001C80, 0xE0001C8F, 0xE0001C9E, 0xE0001CAD, + 0xE0001B90, 0xE0001CE4, 0xE0001CF3, 0xE0001D02, 0xE0001CBD, 0xE0001CD1, + 0xE0001B36, 0xE0001BAE, 0x4049EA20, 0xE0001B48, 0xE0001B57, 0xE0001B66, + 0xE0001B75, 0xE0001B84, 0xE0001BA2, 0xE0001BC0, 0xE0001BCF, 0xE0001BDE, + 0xE0001BED, 0xE0001BFC, 0xE0001C0B, 0xE0001C1A, 0xE0001C29, 0xE0001C38, + 0xE0001C47, 0xE0001C56, 0xE0001C65, 0xE0001C74, + // Block 7, offset 0x1c0 + 0xE0001C83, 0xE0001C92, 0xE0001CA1, 0xE0001CB0, 0xE0001B93, 0xE0001CE7, + 0xE0001CF6, 0xE0001D05, 0xE0001CC1, 0xE0001CD5, 0xE0001B39, 0xE0001BB1, + 0x4049EC20, 0xE0001B4B, 0xE0001B5A, 0xE0001B69, 0xE0001B78, 0xE0001B87, + 0xE0001BA5, 0xE0001BC3, 0xE0001BD2, 0xE0001BE1, 0xE0001BF0, 0xE0001BFF, + 0xE0001C0E, 0xE0001C1D, 0xE0001C2C, 0xE0001C3B, 0xE0001C4A, 0xE0001C59, + 0xE0001C68, 0xE0001C77, 0xE0001C86, 0xE0001C95, 0xE0001CA4, 0xE0001CB3, + 0xE0001B96, 0xE0001CEA, 0xE0001CF9, 0xE0001D08, 0xE0001CC5, 0xE0001CD9, + 0xE0001B3C, 0xE0001BB4, 0x4049EE20, 0xE0001B4E, 0xE0001B5D, 0xE0001B6C, + 0xE0001B7B, 0xE0001B8A, 0xE0001BA8, 0xE0001BC6, 0xE0001BD5, 0xE0001BE4, + 0xE0001BF3, 0xE0001C02, 0xE0001C11, 0xE0001C20, 0xE0001C2F, 0xE0001C3E, + 0xE0001C4D, 0xE0001C5C, 0xE0001C6B, 0xE0001C7A, + // Block 8, offset 0x200 + 0xE0001C89, 0xE0001C98, 0xE0001CA7, 0xE0001CB6, 0xE0001B99, 0xE0001CED, + 0xE0001CFC, 0xE0001D0B, 0xE0001CC9, 0xE0001CDD, 0xE0001B3F, 0xE0001BB7, + 0xA0010B02, 0x4049D220, 0x404A5A20, 0xE0001D0E, 0xE0001D1D, 0xE0001D2C, + 0xE0001D3B, 0xE0001D4A, 0xE0001D59, 0xE0001D68, 0xE0001D77, 0xE0001D86, + 0xE0001D95, 0xE0001DA4, 0xE0001DB3, 0xE0001DC2, 0xE0001DD1, 0xE0001DE0, + 0xE0001DEF, 0xE0001DFE, 0xE0001E0D, 0xE0001E1C, 0xE0001E2B, 0xE0001E3A, + 0xE0001E49, 0xE0001E58, 0xE0001E67, 0xE0001E76, 0xE0001E85, 0xE0001E94, + 0xE0001EA3, 0xE0001EB2, 0xE0001EC1, 0xE0001ED0, 0xE0001EDF, 0xE0001EEE, + 0xE0001EFD, 0xE0001F0C, 0xE0001F1B, 0xE0001F2A, 0xE0001F39, 0xE0001F48, + 0xE0001F57, 0xE0001F66, 0xE0001F75, 0xE0001F84, 0xE0001F93, 0xE0001FA2, + 0xE0001FB1, 0xE0001FC0, 0xE0001FCF, 0x404A5C20, + // Block 9, offset 0x240 + 0xE0001D11, 0xE0001D20, 0xE0001D2F, 0xE0001D3E, 0xE0001D4D, 0xE0001D5C, + 0xE0001D6B, 0xE0001D7A, 0xE0001D89, 0xE0001D98, 0xE0001DA7, 0xE0001DB6, + 0xE0001DC5, 0xE0001DD4, 0xE0001DE3, 0xE0001DF2, 0xE0001E01, 0xE0001E10, + 0xE0001E1F, 0xE0001E2E, 0xE0001E3D, 0xE0001E4C, 0xE0001E5B, 0xE0001E6A, + 0xE0001E79, 0xE0001E88, 0xE0001E97, 0xE0001EA6, 0xE0001EB5, 0xE0001EC4, + 0xE0001ED3, 0xE0001EE2, 0xE0001EF1, 0xE0001F00, 0xE0001F0F, 0xE0001F1E, + 0xE0001F2D, 0xE0001F3C, 0xE0001F4B, 0xE0001F5A, 0xE0001F69, 0xE0001F78, + 0xE0001F87, 0xE0001F96, 0xE0001FA5, 0xE0001FB4, 0xE0001FC3, 0xE0001FD2, + 0x404A6220, 0xE0001D14, 0xE0001D23, 0xE0001D32, 0xE0001D41, 0xE0001D50, + 0xE0001D5F, 0xE0001D6E, 0xE0001D7D, 0xE0001D8C, 0xE0001D9B, 0xE0001DAA, + 0xE0001DB9, 0xE0001DC8, 0xE0001DD7, 0xE0001DE6, + // Block 10, offset 0x280 + 0xE0001DF5, 0xE0001E04, 0xE0001E13, 0xE0001E22, 0xE0001E31, 0xE0001E40, + 0xE0001E4F, 0xE0001E5E, 0xE0001E6D, 0xE0001E7C, 0xE0001E8B, 0xE0001E9A, + 0xE0001EA9, 0xE0001EB8, 0xE0001EC7, 0xE0001ED6, 0xE0001EE5, 0xE0001EF4, + 0xE0001F03, 0xE0001F12, 0xE0001F21, 0xE0001F30, 0xE0001F3F, 0xE0001F4E, + 0xE0001F5D, 0xE0001F6C, 0xE0001F7B, 0xE0001F8A, 0xE0001F99, 0xE0001FA8, + 0xE0001FB7, 0xE0001FC6, 0xE0001FD5, 0x404A6620, 0xE0001D17, 0xE0001D26, + 0xE0001D35, 0xE0001D44, 0xE0001D53, 0xE0001D62, 0xE0001D71, 0xE0001D80, + 0xE0001D8F, 0xE0001D9E, 0xE0001DAD, 0xE0001DBC, 0xE0001DCB, 0xE0001DDA, + 0xE0001DE9, 0xE0001DF8, 0xE0001E07, 0xE0001E16, 0xE0001E25, 0xE0001E34, + 0xE0001E43, 0xE0001E52, 0xE0001E61, 0xE0001E70, 0xE0001E7F, 0xE0001E8E, + 0xE0001E9D, 0xE0001EAC, 0xE0001EBB, 0xE0001ECA, + // Block 11, offset 0x2c0 + 0xE0001ED9, 0xE0001EE8, 0xE0001EF7, 0xE0001F06, 0xE0001F15, 0xE0001F24, + 0xE0001F33, 0xE0001F42, 0xE0001F51, 0xE0001F60, 0xE0001F6F, 0xE0001F7E, + 0xE0001F8D, 0xE0001F9C, 0xE0001FAB, 0xE0001FBA, 0xE0001FC9, 0xE0001FD8, + 0x404A6820, 0xE0001D1A, 0xE0001D29, 0xE0001D38, 0xE0001D47, 0xE0001D56, + 0xE0001D65, 0xE0001D74, 0xE0001D83, 0xE0001D92, 0xE0001DA1, 0xE0001DB0, + 0xE0001DBF, 0xE0001DCE, 0xE0001DDD, 0xE0001DEC, 0xE0001DFB, 0xE0001E0A, + 0xE0001E19, 0xE0001E28, 0xE0001E37, 0xE0001E46, 0xE0001E55, 0xE0001E64, + 0xE0001E73, 0xE0001E82, 0xE0001E91, 0xE0001EA0, 0xE0001EAF, 0xE0001EBE, + 0xE0001ECD, 0xE0001EDC, 0xE0001EEB, 0xE0001EFA, 0xE0001F09, 0xE0001F18, + 0xE0001F27, 0xE0001F36, 0xE0001F45, 0xE0001F54, 0xE0001F63, 0xE0001F72, + 0xE0001F81, 0xE0001F90, 0xE0001F9F, 0xE0001FAE, + // Block 12, offset 0x300 + 0xE0001FBD, 0xE0001FCC, 0xE0001FDB, 0x404AEA20, 0xE000200E, 0xE0002011, + 0x404B2620, 0x404B2420, 0x404B2620, 0x404AF020, 0xE0002014, 0xE0002017, + 0x404B2A20, 0x404B2820, 0x404B2A20, 0x8281258B, 0x8281258D, 0x82812591, + 0x8281258F, 0x404ECA20, 0x404ECC20, 0x404F9C20, 0x404F9620, 0x404F9E20, + 0x404F9820, 0x40522620, 0x40522820, 0x40522A20, 0x40522C20, 0x40522E20, + 0x40523020, 0x40523220, 0x40523420, 0x40523620, 0x40523820, 0x40523E20, + 0x40524020, 0x40529C20, 0x40529E20, 0x4052A020, 0x4052A220, 0x4052A420, + 0x4052A820, 0x4052A620, 0x4052AA20, 0x4052AC20, 0x4052AE20, 0x4040B620, + 0x4040B420, 0x40409820, 0x4040DC20, 0x402C3A20, 0x402C3C20, 0x002C3A88, + 0x002C3C83, 0x402D2220, 0x402D2420, 0x002D2288, 0x002D2483, 0x002D9883, + 0x002D9A83, 0x402EE220, 0x402EE420, 0x002EE288, + // Block 13, offset 0x340 + 0x002EE483, 0x402FE620, 0x402FE820, 0x002FE688, 0x002FE883, 0x40306C20, + 0x40306E20, 0x00306C88, 0x00306E83, 0x4033B220, 0x4033BA20, 0x4033B420, + 0x0033B288, 0x0033BA88, 0x0033B483, 0x402E2220, 0x402E2221, 0x402E2221, + 0x002E2288, 0x002E22A3, 0x002E22A3, 0x402C3A20, 0x402C3C20, 0x002D6A83, + 0x402D6A20, 0x002C3A88, 0x002C3C83, 0x002D6A85, 0x002D6A84, 0x402F7A20, + 0x402F7C20, 0x002F7A88, 0x002F7C83, 0x40312A20, 0x40312C20, 0x00312A88, + 0x00312C83, 0x002C3A88, 0x002C3C84, 0x002C3C83, 0x402C6220, 0x402C6420, + 0x002C6288, 0x002C6484, 0x002C6483, 0x402D0820, 0x402D0A20, 0x002D0888, + 0x002D0A84, 0x002D0A83, 0x402E9E20, 0x402D2420, 0x002E9E88, 0x002D2484, + 0x002D2483, 0x402E2220, 0xE0000CFB, 0xE0000CFB, 0x402E2420, 0x002E2288, + 0xE0000D01, 0xE0000D01, 0x002E2484, 0x002E2483, + // Block 14, offset 0x380 + 0x402F2C20, 0x402F2E20, 0x002F2C88, 0x002F2E84, 0x002F2E83, 0x002F7A88, + 0x002F7C84, 0x002F7C83, 0x40302C20, 0x40302E20, 0x00302C88, 0x00302E84, + 0x00302E83, 0x40306C20, 0x40310021, 0x40310022, 0x00306C88, 0x003100A3, + 0x003100C3, 0x402BDE20, 0x40320C21, 0x40321020, 0x00321084, 0x002BDE88, + 0x00320CA3, 0x00321083, 0x00321086, 0x00321085, 0x402C9820, 0x40320C22, + 0x002C9888, 0x00320CC3, 0x402EE220, 0x40320E21, 0x40320E22, 0x002EE288, + 0x00320EA3, 0x00320EC3, 0x402BDE20, 0xE00029B8, 0x002BDE88, 0xE00029BB, + 0x402EE220, 0xE00029C6, 0x002EE288, 0xE00029C9, 0x40306C20, 0xE00029DC, + 0x00306C88, 0xE00029DF, 0xAE611302, 0x404A7621, 0x404A7C21, 0x404AB020, + 0x404ACC20, 0x404ACE20, 0x404AD020, 0x404AD220, 0x404AD420, 0x404ADA20, + 0x404A8220, 0x404A8420, 0xE0002A26, 0xE0002A2B, + // Block 15, offset 0x3c0 + 0x404A8620, 0x404A8820, 0x404A8A20, 0x404A8C20, 0x404A8E20, 0x404A9020, + 0x404A9220, 0x404A9420, 0x404A9620, 0x404A9820, 0x404A9A20, 0x404A9C20, + 0x404A8620, 0x404A8820, 0xE0002A30, 0xE0002A35, 0x404A8A20, 0x404A8C20, + 0x404A8E20, 0x404A9020, 0x404ABA20, 0x404ABC20, 0xE0002A3A, 0xE0002A3F, + 0x404ABE20, 0x404AC020, 0x404AC220, 0x404AC420, 0x404AC620, 0x404AC820, + 0x404ACA20, 0x404AD620, 0x404AD820, 0x404AC220, 0x404AC420, 0xE0002A44, + 0xE0002A49, 0x404AC620, 0x404AC820, 0x404ACA20, 0x404ACC20, 0x404ACE20, + 0x404AD020, 0x404AD220, 0x404AD420, 0x404AD620, 0x404AD820, 0x404ADA20, + 0x404ADC20, 0x404AC620, 0x404AC820, 0xE0002A4E, 0xE0002A53, 0x404ACA20, + 0x404ACC20, 0x404ACE20, 0x404AD020, 0x404AD220, 0x404AD420, 0x404AD620, + 0x404AD820, 0x404ADC20, 0x404A7820, 0x404AC020, + // Block 16, offset 0x400 + 0x404A9E20, 0xE0002A5E, 0xE0002A63, 0x404AA020, 0x404AA220, 0x404AA420, + 0x404AA620, 0x404AA820, 0x404AAA20, 0x404AAC20, 0x004AA283, 0x404AAE20, + 0x404AB020, 0x404AB220, 0x404ACC20, 0xE0002A68, 0xE0002A6D, 0x404ACE20, + 0x404AD020, 0x404AD220, 0x404AD420, 0x404AD620, 0x404AD820, 0x404ADA20, + 0x404ADC20, 0x004ACE83, 0x404A8220, 0x404AE820, 0x404AA420, 0x404A9A20, + 0x404A9E20, 0x404AB420, 0x404B1420, 0x404AE420, 0x404AD220, 0x404AD820, + 0x404AEA20, 0x404A9020, 0x404AB620, 0x404B1620, 0x404B1620, 0x404B1820, + 0xE0002A72, 0xE0002A77, 0x404B1A20, 0x404B1C20, 0x404B1E20, 0x404B2020, + 0x404B2220, 0x404B2420, 0x404B2620, 0x404B2820, 0x404B2A20, 0x004B1E83, + 0x404A8420, 0x404AEA20, 0x404AA620, 0x404AA020, 0x404AB820, 0x404B1820, + 0x404AE620, 0x404AD420, 0x404B2C20, 0x404B2E20, + // Block 17, offset 0x440 + 0x404B3020, 0x404A7A20, 0x404A8C20, 0x404AAC20, 0x404ACC20, 0x404ADC20, + 0x404AE020, 0x404AF620, 0x404AE820, 0x404A7C20, 0x404AE220, 0x404A9E20, + 0x404A9620, 0x404A9A20, 0x404AAE20, 0x404B0E20, 0x404AE020, 0x404AFC20, + 0x404ADE20, 0x404ACE20, 0x404AD620, 0x404AEE20, 0x404A7E20, 0x404AE420, + 0x404AA020, 0x404A8E20, 0x404A9820, 0x404AB020, 0x404B1020, 0x404ADA20, + 0x404AFE20, 0x404B0020, 0x404AC420, 0x404AB420, 0x404AB620, 0x404AB820, + 0x404ABA20, 0x404ABC20, 0x404ABE20, 0x404AC020, 0x404A9220, 0xE0002A7F, + 0xE0002A84, 0x404A9420, 0x404A9620, 0x404A9820, 0x404A9A20, 0x404A9C20, + 0x404ADE20, 0x404AE020, 0xE0002A89, 0xE0002A8E, 0x404AE220, 0x404AE420, + 0x404AE620, 0x404AE820, 0x404AEA20, 0x404AEC20, 0x404ACA20, 0x404ACC20, + 0xE0002A93, 0xE0002A98, 0x404ACE20, 0x404AD020, + // Block 18, offset 0x480 + 0x404AD220, 0x404AD420, 0x404AD620, 0x404AD820, 0x404ADA20, 0x404ADC20, + 0x404ADE20, 0x004AD283, 0x404A7E20, 0x404A8E20, 0x404A9220, 0x404A9820, + 0x404AAE20, 0x404ACE20, 0x404AD220, 0x404AFA20, 0x404A8020, 0x404AE620, + 0x404AA220, 0x404A9C20, 0x404AB220, 0x404B1220, 0x404AE220, 0x404ADC20, + 0x404B0020, 0x404AE020, 0x404AD020, 0x404AE020, 0x404AC220, 0x404AC420, + 0xE0002AA0, 0xE0002AA5, 0x404AC620, 0x404AC820, 0x404ACA20, 0x404ACC20, + 0x404ACE20, 0x404AD020, 0x404AD220, 0x404AD420, 0x404AD620, 0x404AD820, + 0x404ADA20, 0x404ADC20, 0x004ACC83, 0x404ADE20, 0x404AE020, 0x404AEE20, + 0x404AF020, 0xE0002AAA, 0xE0002AAF, 0x404AF220, 0x404AF420, 0x404AF620, + 0x404AF820, 0x404AFA20, 0x404AFC20, 0x404AFE20, 0x404B0020, 0x404B0220, + 0x404B0420, 0x404B0620, 0x404B0820, 0x404B0A20, + // Block 19, offset 0x4c0 + 0x004AF883, 0x404B0C20, 0x404ADE20, 0x404AE020, 0xE0002AB4, 0xE0002AB9, + 0x404AE220, 0x404AE420, 0x404AE620, 0x404AE820, 0x404AEA20, 0x404AEC20, + 0x404AEE20, 0x404AF020, 0x404AF220, 0x404AF420, 0x404AF620, 0x004AE883, + 0x404AF820, 0x404AFA20, 0x404A8020, 0x404A9020, 0x404A9420, 0x404AB020, + 0x404ABE20, 0x404AD020, 0x404AD420, 0x404A8020, 0x404AB220, 0x404AB420, + 0xE0002A05, 0xE0002A0A, 0x404AB620, 0x404AB820, 0x404ABA20, 0x404ABC20, + 0x404ABE20, 0x404AC020, 0x404AC220, 0x404AC420, 0x404AC620, 0x404AC820, + 0x404ACA20, 0x004ABA83, 0x404AB620, 0x404AB820, 0xE0002A0F, 0xE0002A14, + 0x404ABA20, 0x404ABC20, 0x404ABE20, 0x404AC020, 0x404AC220, 0x404AC420, + 0x404AC620, 0x404AC820, 0x004ABE83, 0x404AFC20, 0x404AFE20, 0xE0002A19, + 0xE0002A1E, 0x404B0020, 0x404B0220, 0x404B0420, + // Block 20, offset 0x500 + 0x404B0620, 0x404B0820, 0x404B0A20, 0x404B0C20, 0x404B0E20, 0x404B1020, + 0x404B1220, 0x404B1420, 0x404A8A20, 0x404A9620, 0x404AAA20, 0x404ACA20, + 0x404ADA20, 0x404ADE20, 0x404AE620, 0x404AF420, 0xAE611602, 0x404A9421, + 0xAE611402, 0x404AB821, 0x404ABC21, 0x828225B1, 0xE000200E, 0xE0002011, + 0x404B2620, 0xE0002ABE, 0xE000200E, 0xE0002011, 0x404B2420, 0x404B2620, + 0x828225B2, 0xE0002014, 0xE0002017, 0x404B2A20, 0xE0002AC1, 0xE0002014, + 0xE0002017, 0x404B2820, 0x404B2A20, 0xAE610F02, 0x8281258D, 0x82812591, + 0x8281258F, 0x002D2288, 0x002D2484, 0x002D2483, 0x402DFE20, 0x402E0020, + 0x002DFE88, 0x002E0084, 0x002E0083, 0x402E9E20, 0x402EA020, 0x002E9E88, + 0x002EA084, 0x002EA083, 0x402C7820, 0xE0000CFB, 0xE0000CFB, 0x402C3820, + 0xE0000D01, 0xE0000D01, 0x402D6820, 0x402D6A20, + // Block 21, offset 0x540 + 0x002D6888, 0x002D6A83, 0x402DCC20, 0x402DCE20, 0x002DCC88, 0x002DCE83, + 0x002E9E88, 0x002EA083, 0x402FE620, 0x40302620, 0x002FE688, 0x00302683, + 0x40302820, 0x40302A20, 0x00302883, 0x00302A83, 0x402EE220, 0x4030EE20, + 0x4030F220, 0x002EE288, 0x0030EE83, 0x0030F283, 0x402BDE20, 0x4030F020, + 0x002BDE88, 0x0030F083, 0x40306C20, 0x4030F420, 0x00306C88, 0x0030F483, + 0x40393820, 0x40393620, 0x40393A21, 0x40393A23, 0x403A7420, 0x40393A25, + 0x403A9220, 0x40393A26, 0x403A9221, 0x00393B43, 0x403A9223, 0x00393B44, + 0x403A8821, 0x403A8825, 0x40306C20, 0x40310021, 0x00306C88, 0x003100A3, + 0x402BDE20, 0x40320E20, 0x40320C20, 0x002BDE88, 0x00320E83, 0x00320C83, + 0x402EE220, 0x40321020, 0x002EE288, 0x00321083, 0x402EE220, 0x40321023, + 0x40321020, 0x40321022, 0x002EE288, 0x003210E3, + // Block 22, offset 0x580 + 0x00321083, 0x003210C3, 0x402E9E20, 0x402EA020, 0x402EA220, 0x002E9E88, + 0x002EA083, 0x002EA284, 0x002EA283, 0x002FE688, 0x002FE884, 0x002FE883, + 0x4031DE20, 0x00310286, 0x00310283, 0x4003D220, 0x00310287, 0x00310284, + 0x402BEC20, 0xE0000CFB, 0xE0000CFB, 0x002BEC83, 0xE0000D01, 0xE0000D01, + 0x402C3A20, 0x402C3E20, 0x402C3C20, 0x002C3A88, 0x002C3E83, 0x002C3C83, + 0x402C6220, 0x402C6420, 0x402C6420, 0x002C6288, 0x002C6486, 0x002C6484, + 0x002C6486, 0x002C6484, 0x002E2288, 0xE0000D01, 0xE0000D01, 0x002E2486, + 0x002E2484, 0x002E9E88, 0x002EA086, 0x002EA084, 0x402C3A20, 0xE0003C42, + 0x402C3C20, 0x002C3A88, 0xE0003C48, 0xE0003C45, 0x002C3C86, 0x002C3C84, + 0x402C6220, 0xE0003C54, 0xE0003C4B, 0x402C6620, 0x402C6420, 0x002C6288, + 0xE0003C5A, 0xE0003C57, 0xE0003C51, 0x002C6686, + // Block 23, offset 0x5c0 + 0xE0003C4E, 0x002C6684, 0x002C6486, 0x002C6484, 0x402D2220, 0xE0003C5D, + 0x402D2420, 0x002D2288, 0xE0003C63, 0xE0003C60, 0x002D2486, 0x002D2484, + 0x402E2220, 0xE0003C66, 0xE0000CFB, 0xE0000CFB, 0x402E2420, 0x002E2288, + 0xE0003C6C, 0xE0003C69, 0xE0000D01, 0xE0000D01, 0x002E2486, 0x002E2484, + 0x402E9E20, 0xE0003C6F, 0x402EA020, 0x002E9E88, 0xE0003C75, 0xE0003C72, + 0x002EA086, 0x002EA084, 0x402EE220, 0x402EE420, 0x402EE421, 0x002EE288, + 0x002EE483, 0x002EE4A3, 0x402FE620, 0xE0003C78, 0x402FE820, 0x002FE688, + 0xE0003C7E, 0xE0003C7B, 0x002FE886, 0x002FE884, 0x40302C20, 0xE0003C81, + 0x40302E20, 0x00302C88, 0xE0003C87, 0xE0003C84, 0x00302E86, 0x00302E84, + 0x40306C20, 0x40306E20, 0x40306E21, 0x00306C88, 0x00306E83, 0x00306EA3, + 0x40312A20, 0xE0003C8A, 0x40312C20, 0x00312A88, + // Block 24, offset 0x600 + 0xE0003C90, 0xE0003C8D, 0x00312C86, 0x00312C84, 0x00384A88, 0x00388A83, + 0x402C3A20, 0x402C0C20, 0x002C3A88, 0x002C0C84, 0x002C0C83, 0x402D2220, + 0x402D2420, 0x402D2620, 0x402D2820, 0x002D2288, 0x002D2484, 0x002D2684, + 0x002D2884, 0x002D2483, 0x002D2683, 0x002D2883, 0x402D9A20, 0x402D9C20, + 0x002D9A88, 0x002D9C83, 0x402DFE20, 0x402E0020, 0x402E0220, 0x002DFE88, + 0x002E0084, 0x002E0284, 0x002E0083, 0x002E0283, 0x402E9E20, 0x402EA020, + 0x402EA220, 0x402EA420, 0x002E9E88, 0x002EA083, 0x002EA284, 0x002EA484, + 0x002EA283, 0x002EA483, 0x402BDE20, 0x402C0820, 0x40320C21, 0x40321020, + 0x002BDE88, 0x002C0883, 0x00320CA3, 0x00321083, 0x402C9820, 0x402D0620, + 0x002C9888, 0x002D0683, 0x402D9A20, 0x402DCA20, 0x002D9A88, 0x002DCA83, + 0x402EE220, 0x402F2A20, 0x40320E20, 0x002EE288, + // Block 25, offset 0x640 + 0x002F2A83, 0x00320E83, 0x40306C20, 0x4030BC20, 0x00306C88, 0x0030BC83, + 0x40310020, 0x40312820, 0x00310088, 0x00312883, 0x0065768F, 0xE0003D1D, + 0xE0003D17, 0x0065768F, 0xE0003D17, 0xE0003D1D, 0x00657691, 0xE0003D20, + 0xE0003D1A, 0x00657691, 0xE0003D1A, 0xE0003D20, 0x0065828F, 0xE0003E9B, + 0xE0003D23, 0x0065828F, 0xE0003D23, 0xE0003E9B, 0x00658291, 0xE0003EA1, + 0xE0003D29, 0xE0003E9E, 0xE0003D26, 0x00658291, 0xE0003D29, 0xE0003EA1, + 0xE0003D26, 0xE0003E9E, 0x00658291, 0xE0003D26, 0xE0003E9E, 0xE000216D, + 0xE0003EA1, 0xE0003D29, 0xE000216D, 0xE0003D29, 0xE0003EA1, 0x00658C91, + 0xE0003EE4, 0xE0003EE0, 0xE0003D30, 0xE0003EE0, 0xE0003EDD, 0xE0003EE0, + 0xE0003D2D, 0x00658C91, 0xE0003EE4, 0xE0003D30, 0xE0003EE0, 0xE0003EE0, + 0xE0003D2D, 0xE0003EDD, 0xE0003EE0, 0x00658C91, + // Block 26, offset 0x680 + 0xE0003EE0, 0xE0003D2D, 0xE0003EDD, 0xE0003EE0, 0xE00021F2, 0xE0003EE0, + 0xE0003EE4, 0xE0003D30, 0xE00021F2, 0xE0003D30, 0xE0003EE0, 0xE0003EE4, + 0x00659691, 0xE0003F2E, 0xE0003F2A, 0xE0003D37, 0xE0003F2A, 0xE0003F27, + 0xE0003F2A, 0xE0003D34, 0x00659691, 0xE0003F2E, 0xE0003D37, 0xE0003F2A, + 0xE0003F2A, 0xE0003D34, 0xE0003F27, 0xE0003F2A, 0x00659691, 0xE0003F2A, + 0xE0003D34, 0xE0003F27, 0xE0003F2A, 0xE000222C, 0xE0003F2A, 0xE0003F2E, + 0xE0003D37, 0xE000222C, 0xE0003D37, 0xE0003F2A, 0xE0003F2E, 0x0065A091, + 0xE0003F71, 0xE0003D3B, 0x0065A091, 0xE0003D3B, 0xE0003F71, 0x0065AA8F, + 0xE0003F89, 0xE0003D3E, 0xE0003F83, 0xE0003F89, 0x0065AA91, 0xE0003F91, + 0xE0003F9A, 0xE0003F8D, 0xE0003D44, 0xE0003F96, 0xE0003D48, 0xE0003F8D, + 0xE0003F86, 0xE0003F8D, 0xE0003D41, 0x0065AA91, + // Block 27, offset 0x6c0 + 0xE0003F91, 0xE0003F9A, 0xE0003D44, 0xE0003F8D, 0xE0003D48, 0xE0003F96, + 0xE0003F8D, 0xE0003D41, 0xE0003F86, 0xE0003F8D, 0x0065AA91, 0xE0003F8D, + 0xE0003D41, 0xE0003F86, 0xE0003F8D, 0xE000225B, 0xE0003F8D, 0xE0003F91, + 0xE0003D44, 0xE000225B, 0xE0003D44, 0xE0003F8D, 0xE0003F91, 0xE0002261, + 0xE0003F96, 0xE0003F9A, 0xE0003D48, 0xE0002261, 0xE0003D48, 0xE0003F96, + 0xE0003F9A, 0x0065B491, 0xE000400F, 0xE0003D4C, 0x0065B491, 0xE0003D4C, + 0xE000400F, 0x0065BE8F, 0xE0004021, 0xE0003D4F, 0x0065BE8F, 0xE0003D4F, + 0xE0004021, 0x0065BE91, 0xE0004024, 0xE0003D52, 0x0065BE91, 0xE0003D52, + 0xE0004024, 0x0065C68F, 0xE0003D55, 0xE0004036, 0x0065C691, 0xE0004039, + 0xE0003D58, 0x0065C691, 0xE0003D58, 0xE0004039, 0x0065D08F, 0xE000405A, + 0xE0004054, 0xE000405A, 0xE0003D5B, 0x0065D08F, + // Block 28, offset 0x700 + 0xE000405A, 0xE0003D5B, 0xE0004054, 0xE000405A, 0x0065D091, 0xE000405E, + 0xE0004057, 0xE000405E, 0xE0003D5E, 0x0065D091, 0xE0004062, 0xE0003D61, + 0xE000405E, 0xE000405E, 0xE0003D5E, 0xE0004057, 0xE000405E, 0x0065D091, + 0xE000405E, 0xE0003D5E, 0xE0004057, 0xE000405E, 0xE000236A, 0xE0003D61, + 0xE000405E, 0xE0004062, 0x0065788F, 0xE0003D6B, 0xE0003D65, 0x0065788F, + 0xE0003D65, 0xE0003D6B, 0x00657891, 0xE0003D6E, 0xE0003D68, 0x00657891, + 0xE0003D68, 0xE0003D6E, 0x00658491, 0xE0003EAC, 0xE0003EA8, 0xE0003D74, + 0xE0003EA8, 0xE0003EA5, 0xE0003EA8, 0xE0003D71, 0x00658491, 0xE0003EAC, + 0xE0003D74, 0xE0003EA8, 0xE0003EA8, 0xE0003D71, 0xE0003EA5, 0xE0003EA8, + 0x00658491, 0xE0003EA8, 0xE0003D71, 0xE0003EA5, 0xE0003EA8, 0xE000218B, + 0xE0003EA8, 0xE0003EAC, 0xE0003D74, 0xE000218B, + // Block 29, offset 0x740 + 0xE0003D74, 0xE0003EA8, 0xE0003EAC, 0x00658E8F, 0xE0003EEF, 0xE0003D78, + 0xE0003EE9, 0xE0003EEF, 0x00658E91, 0xE0003EF7, 0xE0003EF3, 0xE0003D7E, + 0xE0003EF3, 0xE0003EEC, 0xE0003EF3, 0xE0003D7B, 0x00658E91, 0xE0003EF7, + 0xE0003D7E, 0xE0003EF3, 0xE0003EF3, 0xE0003D7B, 0xE0003EEC, 0xE0003EF3, + 0x00658E91, 0xE0003EF3, 0xE0003D7B, 0xE0003EEC, 0xE0003EF3, 0xE0002203, + 0xE0003EF3, 0xE0003EF7, 0xE0003D7E, 0xE0002203, 0xE0003D7E, 0xE0003EF3, + 0xE0003EF7, 0x00659891, 0xE0003F3A, 0xE0003F36, 0xE0003D85, 0xE0003F36, + 0xE0003F33, 0xE0003F36, 0xE0003D82, 0x00659891, 0xE0003F3A, 0xE0003D85, + 0xE0003F36, 0xE0003F36, 0xE0003D82, 0xE0003F33, 0xE0003F36, 0x00659891, + 0xE0003F36, 0xE0003D82, 0xE0003F33, 0xE0003F36, 0xE0002237, 0xE0003F36, + 0xE0003F3A, 0xE0003D85, 0xE0002237, 0xE0003D85, + // Block 30, offset 0x780 + 0xE0003F36, 0xE0003F3A, 0x0065A291, 0xE0003F74, 0xE0003D89, 0x0065A291, + 0xE0003D89, 0xE0003F74, 0x0065AC8F, 0xE0003FA5, 0xE0003D8C, 0xE0003F9F, + 0xE0003FA5, 0x0065AC91, 0xE0003FAD, 0xE0003FB6, 0xE0003FA9, 0xE0003D92, + 0xE0003FB2, 0xE0003D96, 0xE0003FA9, 0xE0003FA2, 0xE0003FA9, 0xE0003D8F, + 0x0065AC91, 0xE0003FAD, 0xE0003FB6, 0xE0003D92, 0xE0003FA9, 0xE0003D96, + 0xE0003FB2, 0xE0003FA9, 0xE0003D8F, 0xE0003FA2, 0xE0003FA9, 0x0065AC91, + 0xE0003FA9, 0xE0003D8F, 0xE0003FA2, 0xE0003FA9, 0xE000227D, 0xE0003FA9, + 0xE0003FAD, 0xE0003D92, 0xE000227D, 0xE0003D92, 0xE0003FA9, 0xE0003FAD, + 0xE0002283, 0xE0003FB2, 0xE0003FB6, 0xE0003D96, 0xE0002283, 0xE0003D96, + 0xE0003FB2, 0xE0003FB6, 0x0065B691, 0xE0004012, 0xE0003D9A, 0x0065B691, + 0xE0003D9A, 0xE0004012, 0x0065C88F, 0xE0003D9D, + // Block 31, offset 0x7c0 + 0xE000403C, 0x0065C891, 0xE000403F, 0xE0003DA0, 0x0065C891, 0xE0003DA0, + 0xE000403F, 0x0065D291, 0xE000406A, 0xE0004067, 0xE000406A, 0xE0003DA3, + 0x0065D291, 0xE000406E, 0xE0003DA6, 0xE000406A, 0xE000406A, 0xE0003DA3, + 0xE0004067, 0xE000406A, 0xE0002371, 0xE0003DA6, 0xE000406A, 0xE000406E, + 0x00657A8F, 0xE0003DBA, 0xE0003DB0, 0xE0003DBA, 0xE0003DAA, 0x00657A8F, + 0xE0003DBA, 0xE0003DAA, 0xE0003DB0, 0xE0003DBA, 0x00657A91, 0xE0003DC2, + 0xE0003DBE, 0xE0003DB6, 0xE0003DBE, 0xE0003DB3, 0xE0003DBE, 0xE0003DAD, + 0x00657A91, 0xE0003DC2, 0xE0003DB6, 0xE0003DBE, 0xE0003DBE, 0xE0003DAD, + 0xE0003DB3, 0xE0003DBE, 0x00657A91, 0xE0003DBE, 0xE0003DAD, 0xE0003DB3, + 0xE0003DBE, 0xE000214F, 0xE0003DBE, 0xE0003DC2, 0xE0003DB6, 0xE000214F, + 0xE0003DB6, 0xE0003DBE, 0xE0003DC2, 0x0065868F, + // Block 32, offset 0x800 + 0xE0003EB7, 0xE0003DC7, 0xE0003EB1, 0xE0003EB7, 0x00658691, 0xE0003EBF, + 0xE0003EBB, 0xE0003DCD, 0xE0003EBB, 0xE0003EB4, 0xE0003EBB, 0xE0003DCA, + 0x00658691, 0xE0003EBF, 0xE0003DCD, 0xE0003EBB, 0xE0003EBB, 0xE0003DCA, + 0xE0003EB4, 0xE0003EBB, 0x00658691, 0xE0003EBB, 0xE0003DCA, 0xE0003EB4, + 0xE0003EBB, 0xE00021BB, 0xE0003EBB, 0xE0003EBF, 0xE0003DCD, 0xE00021BB, + 0xE0003DCD, 0xE0003EBB, 0xE0003EBF, 0x0065908F, 0xE0003F02, 0xE0003DD1, + 0xE0003EFC, 0xE0003F02, 0x00659091, 0xE0003F0A, 0xE0003F06, 0xE0003DD7, + 0xE0003F06, 0xE0003EFF, 0xE0003F06, 0xE0003DD4, 0x00659091, 0xE0003F0A, + 0xE0003DD7, 0xE0003F06, 0xE0003F06, 0xE0003DD4, 0xE0003EFF, 0xE0003F06, + 0x00659091, 0xE0003F06, 0xE0003DD4, 0xE0003EFF, 0xE0003F06, 0xE0002212, + 0xE0003F06, 0xE0003F0A, 0xE0003DD7, 0xE0002212, + // Block 33, offset 0x840 + 0xE0003DD7, 0xE0003F06, 0xE0003F0A, 0x00659A8F, 0xE0003F45, 0xE0003F3F, + 0xE0003F45, 0xE0003DDB, 0x00659A8F, 0xE0003F45, 0xE0003DDB, 0xE0003F3F, + 0xE0003F45, 0x00659A91, 0xE0003F4D, 0xE0003F49, 0xE0003DE1, 0xE0003F49, + 0xE0003F42, 0xE0003F49, 0xE0003DDE, 0x00659A91, 0xE0003F4D, 0xE0003DE1, + 0xE0003F49, 0xE0003F49, 0xE0003DDE, 0xE0003F42, 0xE0003F49, 0x00659A91, + 0xE0003F49, 0xE0003DDE, 0xE0003F42, 0xE0003F49, 0xE000223D, 0xE0003F49, + 0xE0003F4D, 0xE0003DE1, 0xE000223D, 0xE0003DE1, 0xE0003F49, 0xE0003F4D, + 0x0065A48F, 0xE0003DE5, 0xE0003F77, 0x0065A491, 0xE0003F7A, 0xE0003DE8, + 0x0065A491, 0xE0003DE8, 0xE0003F7A, 0x0065AE8F, 0xE0003FC1, 0xE0003DEB, + 0xE0003FBB, 0xE0003FC1, 0x0065AE91, 0xE0003FC9, 0xE0003FD2, 0xE0003FC5, + 0xE0003DF1, 0xE0003FCE, 0xE0003DF5, 0xE0003FC5, + // Block 34, offset 0x880 + 0xE0003FBE, 0xE0003FC5, 0xE0003DEE, 0x0065AE91, 0xE0003FC9, 0xE0003FD2, + 0xE0003DF1, 0xE0003FC5, 0xE0003DF5, 0xE0003FCE, 0xE0003FC5, 0xE0003DEE, + 0xE0003FBE, 0xE0003FC5, 0x0065AE91, 0xE0003FC5, 0xE0003DEE, 0xE0003FBE, + 0xE0003FC5, 0xE000229D, 0xE0003FC5, 0xE0003FC9, 0xE0003DF1, 0xE000229D, + 0xE0003DF1, 0xE0003FC5, 0xE0003FC9, 0xE00022A3, 0xE0003FCE, 0xE0003FD2, + 0xE0003DF5, 0xE00022A3, 0xE0003DF5, 0xE0003FCE, 0xE0003FD2, 0x0065B88F, + 0xE0003DF9, 0xE0004015, 0x0065B891, 0xE0004018, 0xE0003DFC, 0x0065B891, + 0xE0003DFC, 0xE0004018, 0x0065C08F, 0xE0004027, 0xE0003DFF, 0x0065C08F, + 0xE0003DFF, 0xE0004027, 0x0065C091, 0xE000402A, 0xE0003E02, 0x0065C091, + 0xE0003E02, 0xE000402A, 0x0065CA8F, 0xE0003E05, 0xE0004042, 0x0065CA91, + 0xE0004045, 0xE0003E08, 0x0065CA91, 0xE0003E08, + // Block 35, offset 0x8c0 + 0xE0004045, 0x00657E8F, 0xE0003E11, 0xE0003E0B, 0x00657E8F, 0xE0003E0B, + 0xE0003E11, 0x00657E91, 0xE0003E14, 0xE0003E0E, 0x00657E91, 0xE0003E0E, + 0xE0003E14, 0x0065888F, 0xE0003EC4, 0xE0003E17, 0x0065888F, 0xE0003E17, + 0xE0003EC4, 0x00658891, 0xE0003ECA, 0xE0003E1D, 0xE0003EC7, 0xE0003E1A, + 0x00658891, 0xE0003E1D, 0xE0003ECA, 0xE0003E1A, 0xE0003EC7, 0x00658891, + 0xE0003E1A, 0xE0003EC7, 0xE00021D9, 0xE0003ECA, 0xE0003E1D, 0xE00021D9, + 0xE0003E1D, 0xE0003ECA, 0x00659291, 0xE0003F16, 0xE0003F12, 0xE0003E24, + 0xE0003F12, 0xE0003F0F, 0xE0003F12, 0xE0003E21, 0x00659291, 0xE0003F16, + 0xE0003E24, 0xE0003F12, 0xE0003F12, 0xE0003E21, 0xE0003F0F, 0xE0003F12, + 0x00659291, 0xE0003F12, 0xE0003E21, 0xE0003F0F, 0xE0003F12, 0xE0002218, + 0xE0003F12, 0xE0003F16, 0xE0003E24, 0xE0002218, + // Block 36, offset 0x900 + 0xE0003E24, 0xE0003F12, 0xE0003F16, 0x00659C91, 0xE0003F59, 0xE0003F55, + 0xE0003E2B, 0xE0003F55, 0xE0003F52, 0xE0003F55, 0xE0003E28, 0x00659C91, + 0xE0003F59, 0xE0003E2B, 0xE0003F55, 0xE0003F55, 0xE0003E28, 0xE0003F52, + 0xE0003F55, 0x00659C91, 0xE0003F55, 0xE0003E28, 0xE0003F52, 0xE0003F55, + 0xE0002243, 0xE0003F55, 0xE0003F59, 0xE0003E2B, 0xE0002243, 0xE0003E2B, + 0xE0003F55, 0xE0003F59, 0x0065A691, 0xE0003F7D, 0xE0003E2F, 0x0065A691, + 0xE0003E2F, 0xE0003F7D, 0x0065B08F, 0xE0003FDD, 0xE0003E32, 0xE0003FD7, + 0xE0003FDD, 0x0065B091, 0xE0003FE5, 0xE0003FEE, 0xE0003FE1, 0xE0003E38, + 0xE0003FEA, 0xE0003E3C, 0xE0003FE1, 0xE0003FDA, 0xE0003FE1, 0xE0003E35, + 0x0065B091, 0xE0003FE5, 0xE0003FEE, 0xE0003E38, 0xE0003FE1, 0xE0003E3C, + 0xE0003FEA, 0xE0003FE1, 0xE0003E35, 0xE0003FDA, + // Block 37, offset 0x940 + 0xE0003FE1, 0x0065B091, 0xE0003FE1, 0xE0003E35, 0xE0003FDA, 0xE0003FE1, + 0xE00022C0, 0xE0003FE1, 0xE0003FE5, 0xE0003E38, 0xE00022C0, 0xE0003E38, + 0xE0003FE1, 0xE0003FE5, 0xE00022C6, 0xE0003FEA, 0xE0003FEE, 0xE0003E3C, + 0xE00022C6, 0xE0003E3C, 0xE0003FEA, 0xE0003FEE, 0x0065BA91, 0xE000401B, + 0xE0003E40, 0x0065BA91, 0xE0003E40, 0xE000401B, 0x0065CC8F, 0xE0003E43, + 0xE0004048, 0x0065CC91, 0xE000404B, 0xE0003E46, 0x0065CC91, 0xE0003E46, + 0xE000404B, 0x0065D491, 0xE0004076, 0xE0004073, 0xE0004076, 0xE0003E49, + 0x0065D491, 0xE000407A, 0xE0003E4C, 0xE0004076, 0xE0004076, 0xE0003E49, + 0xE0004073, 0xE0004076, 0xE0002374, 0xE0003E4C, 0xE0004076, 0xE000407A, + 0x0065808F, 0xE0003E56, 0xE0003E50, 0x0065808F, 0xE0003E50, 0xE0003E56, + 0x00658091, 0xE0003E59, 0xE0003E53, 0x00658091, + // Block 38, offset 0x980 + 0xE0003E53, 0xE0003E59, 0x00658A91, 0xE0003ED5, 0xE0003ED1, 0xE0003E5F, + 0xE0003ED1, 0xE0003ECE, 0xE0003ED1, 0xE0003E5C, 0x00658A91, 0xE0003ED5, + 0xE0003E5F, 0xE0003ED1, 0xE0003ED1, 0xE0003E5C, 0xE0003ECE, 0xE0003ED1, + 0x00658A91, 0xE0003ED1, 0xE0003E5C, 0xE0003ECE, 0xE0003ED1, 0xE00021E3, + 0xE0003ED1, 0xE0003ED5, 0xE0003E5F, 0xE00021E3, 0xE0003E5F, 0xE0003ED1, + 0xE0003ED5, 0x00659491, 0xE0003F22, 0xE0003F1E, 0xE0003E66, 0xE0003F1E, + 0xE0003F1B, 0xE0003F1E, 0xE0003E63, 0x00659491, 0xE0003F22, 0xE0003E66, + 0xE0003F1E, 0xE0003F1E, 0xE0003E63, 0xE0003F1B, 0xE0003F1E, 0x00659491, + 0xE0003F1E, 0xE0003E63, 0xE0003F1B, 0xE0003F1E, 0xE0002226, 0xE0003F1E, + 0xE0003F22, 0xE0003E66, 0xE0002226, 0xE0003E66, 0xE0003F1E, 0xE0003F22, + 0x00659E8F, 0xE0003F64, 0xE0003E6A, 0xE0003F5E, + // Block 39, offset 0x9c0 + 0xE0003F64, 0x00659E91, 0xE0003F6C, 0xE0003F68, 0xE0003E70, 0xE0003F68, + 0xE0003F61, 0xE0003F68, 0xE0003E6D, 0x00659E91, 0xE0003F6C, 0xE0003E70, + 0xE0003F68, 0xE0003F68, 0xE0003E6D, 0xE0003F61, 0xE0003F68, 0x00659E91, + 0xE0003F68, 0xE0003E6D, 0xE0003F61, 0xE0003F68, 0xE000224D, 0xE0003F68, + 0xE0003F6C, 0xE0003E70, 0xE000224D, 0xE0003E70, 0xE0003F68, 0xE0003F6C, + 0x0065A891, 0xE0003F80, 0xE0003E74, 0x0065A891, 0xE0003E74, 0xE0003F80, + 0x0065B28F, 0xE0003FF9, 0xE0003E77, 0xE0003FF3, 0xE0003FF9, 0x0065B291, + 0xE0004001, 0xE000400A, 0xE0003FFD, 0xE0003E7D, 0xE0004006, 0xE0003E81, + 0xE0003FFD, 0xE0003FF6, 0xE0003FFD, 0xE0003E7A, 0x0065B291, 0xE0004001, + 0xE000400A, 0xE0003E7D, 0xE0003FFD, 0xE0003E81, 0xE0004006, 0xE0003FFD, + 0xE0003E7A, 0xE0003FF6, 0xE0003FFD, 0x0065B291, + // Block 40, offset 0xa00 + 0xE0003FFD, 0xE0003E7A, 0xE0003FF6, 0xE0003FFD, 0xE00022EF, 0xE0003FFD, + 0xE0004001, 0xE0003E7D, 0xE00022EF, 0xE0003E7D, 0xE0003FFD, 0xE0004001, + 0xE00022F5, 0xE0004006, 0xE000400A, 0xE0003E81, 0xE00022F5, 0xE0003E81, + 0xE0004006, 0xE000400A, 0x0065BC91, 0xE000401E, 0xE0003E85, 0x0065BC91, + 0xE0003E85, 0xE000401E, 0x0065C48F, 0xE000402D, 0xE0003E88, 0x0065C48F, + 0xE0003E88, 0xE000402D, 0x0065C491, 0xE0004030, 0xE0003E8B, 0x0065C491, + 0xE0003E8B, 0xE0004030, 0x0065CE8F, 0xE0003E8E, 0xE000404E, 0x0065CE91, + 0xE0004051, 0xE0003E91, 0x0065CE91, 0xE0003E91, 0xE0004051, 0x0065D691, + 0xE0004082, 0xE000407F, 0xE0004082, 0xE0003E94, 0x0065D691, 0xE0004086, + 0xE0003E97, 0xE0004082, 0xE0004082, 0xE0003E94, 0xE000407F, 0xE0004082, + 0x0065D691, 0xE0004082, 0xE0003E94, 0xE000407F, + // Block 41, offset 0xa40 + 0xE0004082, 0xE0002377, 0xE0003E97, 0xE0004082, 0xE0004086, 0x0065D891, + 0xE000408B, 0x40368C20, 0x40343620, 0x00368C83, 0x00343688, 0x002DFE88, + 0x002F56A3, 0x402BDE20, 0x40320C21, 0x40321020, 0x002BDE88, 0x00320CA3, + 0x00321083, 0x404FA420, 0xE000409E, 0x404FA620, 0xE00040A2, 0x404FA820, + 0xE00040A6, 0x404FAA20, 0xE00040AA, 0x404FAC20, 0xE00040AE, 0x404FAE20, + 0xE00040B2, 0x404FB020, 0xE00040B6, 0x404FB220, 0xE00040BA, 0x404FB420, + 0xE00040BE, 0x404FB620, 0xE00040C2, 0x404FB820, 0xE00040C6, 0x404FBA20, + 0xE00040CA, 0x404FBC20, 0xE00040CE, 0x404FBE20, 0xE00040D2, 0x404FC020, + 0xE00040D6, 0x404FC220, 0xE00040DA, 0x404FC420, 0xE00040DE, 0x404FC620, + 0xE00040E2, 0x404FC820, 0xE00040E6, 0x404FCA20, 0xE00040EA, 0x404FCC20, + 0xE00040EE, 0x404FCE20, 0xE00040F2, 0x404FD020, + // Block 42, offset 0xa80 + 0xE00040F6, 0x404FD220, 0xE00040FA, 0x404FD420, 0xE00040FE, 0x404FD620, + 0xE0004102, 0x404FD820, 0xE0004106, 0x404FDA20, 0xE000410A, 0x404FDA20, + 0xE000410E, 0x404FDC20, 0xE0004112, 0x404FDC20, 0xE0004116, 0x404FDC20, + 0xE000411A, 0x404FDE20, 0xE000411E, 0x404FDE20, 0xE0004122, 0x404FE020, + 0xE0004126, 0x404FE220, 0xE000412A, 0x404FE420, 0xE000412E, 0x404FE620, + 0xE0004132, 0x404FE820, 0xE0004136, 0x40501820, 0x40502E20, 0x40503820, + 0x40500E20, 0x40503220, 0x40501020, 0x40503620, 0x40502420, 0x40503A20, + 0x40502A20, 0x40503C20, 0x403FEC20, 0x40403E20, 0x402D2220, 0x002D2483, + 0x402D2420, 0x002D2288, 0x002D2485, 0x002D2484, 0x402DFE20, 0x002E0083, + 0x402E0020, 0x002DFE88, 0x002E0085, 0x002E0084, 0x402E8220, 0x002E8483, + 0x002E8683, 0x002E8883, 0x002E8A83, 0x402E8420, + // Block 43, offset 0xac0 + 0x402E8620, 0x402E8820, 0x402E8A20, 0x002E8288, 0x002E8485, 0x002E8685, + 0x002E8885, 0x002E8A85, 0x002E8484, 0x002E8684, 0x002E8884, 0x002E8A84, + 0x402E9E20, 0x002EA485, 0x002EA484, 0x002EA483, 0x402EA420, 0x002EA083, + 0x002EA283, 0x002EA683, 0x002EA883, 0x002EAA83, 0x002EAC83, 0x002EAE83, + 0x402EA020, 0x402EA220, 0x402EA620, 0x402EA820, 0x402EAA20, 0x402EAC20, + 0x402EAE20, 0x002E9E88, 0x002EA488, 0x002EA487, 0x002EA486, 0x002EA085, + 0x002EA285, 0x002EA685, 0x002EA885, 0x002EAA85, 0x002EAC85, 0x002EAE85, + 0x002EA084, 0x002EA284, 0x002EA684, 0x002EA884, 0x002EAA84, 0x002EAC84, + 0x002EAE84, 0x402FE620, 0x002FE883, 0x402FE820, 0x002FE688, 0x002FE885, + 0x002FE884, 0x40302C20, 0x00302E83, 0x40302E20, 0x00302C88, 0x00302E85, + 0x00302E84, 0xAE605202, 0xAE603502, 0xAE603202, + // Block 44, offset 0xb00 + 0xAE604E02, 0x402BDE20, 0x402BDE21, 0x002BDE88, 0x002BDEA3, 0x402C9820, + 0x402C9822, 0x402C9821, 0x002C9888, 0x002C98C3, 0x002C98A3, 0x402D9A20, + 0x402D9A21, 0x002D9A88, 0x002D9AA3, 0x40306C20, 0x40306C22, 0x40306C21, + 0x00306C88, 0x00306CC3, 0x00306CA3, 0x402C3A20, 0x402C6020, 0x002C3A88, + 0x002C6083, 0x402D2220, 0x402D6620, 0x002D2288, 0x002D6683, 0x402DFE20, + 0x402E2020, 0x002DFE88, 0x002E2083, 0x402E2220, 0xE0000CFB, 0x402E8020, + 0xE0000CFB, 0x002E2288, 0xE0000D01, 0x002E8083, 0xE0000D01, 0x402E9E20, + 0x402EE020, 0x002E9E88, 0x002EE083, 0x402F7A20, 0x402FE420, 0x002F7A88, + 0x002FE483, 0x402FE620, 0x40302A20, 0x002FE688, 0x00302A83, 0x40312A20, + 0x40316220, 0x00312A88, 0x00316283, 0x40442220, 0xE000A9DC, 0x40443E20, + 0xE000A9E2, 0xE000A9EE, 0xE000A9E8, 0x40444820, + // Block 45, offset 0xb40 + 0xE000A9EB, 0x40445820, 0xE000A9F4, 0x40445A20, 0xE000A9FA, 0x40446620, + 0xE000AA00, 0x40448220, 0x40448820, 0x00448C83, 0x403FFC20, 0x40404020, + 0x002C3A88, 0x402C3820, 0x402C3A20, 0x002C3883, 0x002D2288, 0x402D6620, + 0x002D6683, 0x402D2020, 0x402D2220, 0x002D6684, 0x002D6685, 0x002D2083, + 0x00312A88, 0x40312820, 0x40312A20, 0x00312883, 0x404E6020, 0xE000AA0C, + 0x404FFE20, 0x404FFE21, 0x404E6A20, 0xE000AA12, 0x40502820, 0x40502821, + 0x404E9420, 0xE000AA2C, 0xE000AA25, 0x4050AC20, 0x4050AC21, 0x4005B820, + 0xE000AA32, 0x404EA620, 0xE000AA3D, 0x4050C820, 0x4050C821, 0xE000AA4E, + 0xE000AA51, 0xE000AA55, 0xE000AA5E, 0xE000AA62, 0xE000AA6E, 0xE000AA7A, + 0xE000AA86, 0xE000AA92, 0xE000AA9E, 0xE000AAAA, 0xE000AAB6, 0xE000AAC2, + 0xE000AACE, 0xE000AADA, 0xE000AAE6, 0xE000AAF2, + // Block 46, offset 0xb80 + 0xE000AAFE, 0xE000AB0A, 0xE000AB16, 0xE000AB22, 0xE000AB2E, 0xE000AB3A, + 0xE000AB46, 0xE000AB52, 0xE000AB5E, 0xE000AB6A, 0xE000AB76, 0xE000AB82, + 0xE000AB8E, 0xE000AB9A, 0xE000ABA6, 0xE000ABB2, 0xE000ABBE, 0xE000ABCA, + 0xE000ABD6, 0xE000ABE2, 0xE000ABEE, 0xE000ABFA, 0xE000AC06, 0xE000AC12, + 0xE000AC1E, 0xE000AC2A, 0xE000AC36, 0xE000AC42, 0xE000AC4E, 0xE000AC5A, + 0xE000AC66, 0xE000AC72, 0xE000AC7E, 0xE000AC8A, 0xE000AC96, 0xE000ACA2, + 0xE000ACAE, 0xE000ACBA, 0xE000ACC6, 0xE000ACD2, 0xE000ACDE, 0xE000ACEA, + 0xE000ACF6, 0xE000AD02, 0xE000AD0E, 0xE000AD1A, 0xE000AD26, 0xE000AA68, + 0xE000AA74, 0xE000AA80, 0xE000AA8C, 0xE000AA98, 0xE000AAA4, 0xE000AAB0, + 0xE000AABC, 0xE000AAC8, 0xE000AAD4, 0xE000AAE0, 0xE000AAEC, 0xE000AAF8, + 0xE000AB04, 0xE000AB10, 0xE000AB1C, 0xE000AB28, + // Block 47, offset 0xbc0 + 0xE000AB34, 0xE000AB40, 0xE000AB4C, 0xE000AB58, 0xE000AB64, 0xE000AB70, + 0xE000AB7C, 0xE000AB88, 0xE000AB94, 0xE000ABA0, 0xE000ABAC, 0xE000ABB8, + 0xE000ABC4, 0xE000ABD0, 0xE000ABDC, 0xE000ABE8, 0xE000ABF4, 0xE000AC00, + 0xE000AC0C, 0xE000AC18, 0xE000AC24, 0xE000AC30, 0xE000AC3C, 0xE000AC48, + 0xE000AC54, 0xE000AC60, 0xE000AC6C, 0xE000AC78, 0xE000AC84, 0xE000AC90, + 0xE000AC9C, 0xE000ACA8, 0xE000ACB4, 0xE000ACC0, 0xE000ACCC, 0xE000ACD8, + 0xE000ACE4, 0xE000ACF0, 0xE000ACFC, 0xE000AD08, 0xE000AD14, 0xE000AD20, + 0xE000AD2C, 0x404EFE20, 0x404F5222, 0xE000AD37, 0x404F5220, 0x404F5020, + 0x404F1A22, 0x404F1A23, 0x404F2822, 0x404F2823, 0x404F3622, 0x404F3623, + 0x404F4422, 0x404F4423, 0x404F5223, 0x404F6022, 0x404F6023, 0x404F6E22, + 0x404F6E23, 0x404F7C22, 0x404F7C23, 0x404F8A21, + // Block 48, offset 0xc00 + 0x404F9822, 0x404F9823, 0x404FA622, 0x404FA623, 0x404FB422, 0x404FB423, + 0x404FC222, 0x404FC223, 0x404FD022, 0x404FD023, 0x404FDE22, 0x404FDE23, + 0x404FEC22, 0x404FEC23, 0x404FFA22, 0x404FFA23, 0x40500822, 0x40500823, + 0x40501622, 0x40501623, 0x40502422, 0x40502423, 0x40503222, 0x40503223, + 0x40504022, 0x40504023, 0x40504E22, 0x40504E23, 0x40505C22, 0x40505C23, + 0x40506A22, 0x40506A23, 0x40508C22, 0x40508C23, 0x40509A22, 0x40509A23, + 0x4050A822, 0x4050A823, 0x4050B622, 0x4050B623, 0x4050C421, 0x4050D222, + 0x4050D223, 0x4050E022, 0x4050E023, 0x4050EE21, 0x4050FC21, 0x404F1A20, + 0x404F1A21, 0x404F2820, 0x404F2821, 0x404F3620, 0x404F3621, 0x404F4420, + 0x404F4421, 0x404F5221, 0x404F6020, 0x404F6021, 0x404F6E20, 0x404F6E21, + 0x404F7C20, 0x404F7C21, 0x404F8A20, 0x404F9820, + // Block 49, offset 0xc40 + 0x404F9821, 0x404FA620, 0x404FA621, 0x404FB420, 0x404FB421, 0x404FC220, + 0x404FC221, 0x404FD020, 0x404FD021, 0x404FDE20, 0x404FDE21, 0x404FEC20, + 0x404FEC21, 0x404FFA20, 0x404FFA21, 0x40500820, 0x40500821, 0x40501620, + 0x40501621, 0x40502420, 0x40502421, 0x40503220, 0x40503221, 0x40504020, + 0x40504021, 0x40504E20, 0x40504E21, 0x40505C20, 0x40505C21, 0x40506A20, + 0x40506A21, 0x40508C20, 0x40508C21, 0x40509A20, 0x40509A21, 0x4050A820, + 0x4050A821, 0x4050B620, 0x4050B621, 0x4050C420, 0x4050D220, 0x4050D221, + 0x4050E020, 0x4050E021, 0x4050EE20, 0x4050FC20, 0x404F1820, 0x404F1821, + 0x404F2620, 0x404F2621, 0x404F3420, 0x404F3421, 0x404F4220, 0x404F4221, + 0x404F5021, 0x404F5E20, 0x404F5E21, 0x404F6C20, 0x404F6C21, 0x404F7A20, + 0x404F7A21, 0x404F8820, 0x404F9620, 0x404F9621, + // Block 50, offset 0xc80 + 0x404FA420, 0x404FA421, 0x404FB220, 0x404FB221, 0x404FC020, 0x404FC021, + 0x404FCE20, 0x404FCE21, 0x404FDC20, 0x404FDC21, 0x404FEA20, 0x404FEA21, + 0x404FF820, 0x404FF821, 0x40500620, 0x40500621, 0x40501420, 0x40501421, + 0x40502220, 0x40502221, 0x40503020, 0x40503021, 0x40503E20, 0x40503E21, + 0x40504C20, 0x40504C21, 0x40505A20, 0x40505A21, 0x40506820, 0x40506821, + 0x40508A20, 0x40508A21, 0x40509820, 0x40509821, 0x4050A620, 0x4050A621, + 0x4050B420, 0x4050B421, 0x4050C220, 0x4050D020, 0x4050D021, 0x4050DE20, + 0x4050DE21, 0x4050EC20, 0x4050FA20, 0x404F0A21, 0x404F0A20, 0x404F0821, + 0x404F0820, 0x404EE620, 0x404F5420, 0x404F4C20, 0x40507620, 0x40507A20, + 0x404F1C20, 0x404F1C21, 0x404F2A20, 0x404F2A21, 0x404F3820, 0x404F3821, + 0x404F4620, 0x404F4621, 0x404F5421, 0x404F6220, + // Block 51, offset 0xcc0 + 0x404F6221, 0x404F7020, 0x404F7021, 0x404F7E20, 0x404F7E21, 0x404F8C20, + 0x404F9A20, 0x404F9A21, 0x404FA820, 0x404FA821, 0x404FB620, 0x404FB621, + 0x404FC420, 0x404FC421, 0x404FD220, 0x404FD221, 0x404FE020, 0x404FE021, + 0x404FEE20, 0x404FEE21, 0x404FFC20, 0x404FFC21, 0x40500A20, 0x40500A21, + 0x40501820, 0x40501821, 0x40502620, 0x40502621, 0x40503420, 0x40503421, + 0x40504220, 0x40504221, 0x40505020, 0x40505021, 0x40505E20, 0x40505E21, + 0x40506C20, 0x40506C21, 0x40508E20, 0x40508E21, 0x40509C20, 0x40509C21, + 0x4050AA20, 0x4050AA21, 0x4050B820, 0x4050B821, 0x4050C620, 0x4050D420, + 0x4050D421, 0x4050E220, 0x4050E221, 0x4050F020, 0x4050FE20, 0x404F1420, + 0x404F1421, 0x404F2220, 0x404F2221, 0x404F3020, 0x404F3021, 0x404F3E20, + 0x404F3E21, 0x404F4C21, 0x404F5A20, 0x404F5A21, + // Block 52, offset 0xd00 + 0x404F6820, 0x404F6821, 0x404F7620, 0x404F7621, 0x404F8420, 0x404F9220, + 0x404F9221, 0x404FA020, 0x404FA021, 0x404FAE20, 0x404FAE21, 0x404FBC20, + 0x404FBC21, 0x404FCA20, 0x404FCA21, 0x404FD820, 0x404FD821, 0x404FE620, + 0x404FE621, 0x404FF420, 0x404FF421, 0x40500220, 0x40500221, 0x40501020, + 0x40501021, 0x40501E20, 0x40501E21, 0x40502C20, 0x40502C21, 0x40503A20, + 0x40503A21, 0x40504820, 0x40504821, 0x40505620, 0x40505621, 0x40506420, + 0x40506421, 0x40507220, 0x40507221, 0x40509420, 0x40509421, 0x4050A220, + 0x4050A221, 0x4050B020, 0x4050B021, 0x4050BE20, 0x4050CC20, 0x4050CC21, + 0x4050DA20, 0x4050DA21, 0x4050E820, 0x4050F620, 0x40507820, 0x40507C20, + 0x404F0E20, 0x40507420, 0x404E1420, 0x404F1020, 0x404F1021, 0x404EDE20, + 0x404F4A20, 0x404F1220, 0x404F1221, 0x404F2020, + // Block 53, offset 0xd40 + 0x404F2021, 0x404F2E20, 0x404F2E21, 0x404F3C20, 0x404F3C21, 0x404F4A21, + 0x404F5820, 0x404F5821, 0x404F6620, 0x404F6621, 0x404F7420, 0x404F7421, + 0x404F8220, 0x404F9020, 0x404F9021, 0x404F9E20, 0x404F9E21, 0x404FAC20, + 0x404FAC21, 0x404FBA20, 0x404FBA21, 0x404FC820, 0x404FC821, 0x404FD620, + 0x404FD621, 0x404FE420, 0x404FE421, 0x404FF220, 0x404FF221, 0x40500020, + 0x40500021, 0x40500E20, 0x40500E21, 0x40501C20, 0x40501C21, 0x40502A20, + 0x40502A21, 0x40503820, 0x40503821, 0x40504620, 0x40504621, 0x40505420, + 0x40505421, 0x40506220, 0x40506221, 0x40507020, 0x40507021, 0x40509220, + 0x40509221, 0x4050A020, 0x4050A021, 0x4050AE20, 0x4050AE21, 0x4050BC20, + 0x4050CA20, 0x4050CA21, 0x4050D820, 0x4050D821, 0x4050E620, 0x4050F420, + 0x404EDE21, 0x404F4A22, 0x404F1222, 0x404F1223, + // Block 54, offset 0xd80 + 0x404F2022, 0x404F2023, 0x404F2E22, 0x404F2E23, 0x404F3C22, 0x404F3C23, + 0x404F4A23, 0x404F5822, 0x404F5823, 0x404F6622, 0x404F6623, 0x404F7422, + 0x404F7423, 0x404F8221, 0x404F9022, 0x404F9023, 0x404F9E22, 0x404F9E23, + 0x404FAC22, 0x404FAC23, 0x404FBA22, 0x404FBA23, 0x404FC822, 0x404FC823, + 0x404FD622, 0x404FD623, 0x404FE422, 0x404FE423, 0x404FF222, 0x404FF223, + 0x40500022, 0x40500023, 0x40500E22, 0x40500E23, 0x40501C22, 0x40501C23, + 0x40502A22, 0x40502A23, 0x40503822, 0x40503823, 0x40504622, 0x40504623, + 0x40505422, 0x40505423, 0x40506222, 0x40506223, 0x40507022, 0x40507023, + 0x40509222, 0x40509223, 0x4050A022, 0x4050A023, 0x4050AE22, 0x4050AE23, + 0x4050BC21, 0x4050CA22, 0x4050CA23, 0x4050D822, 0x4050D823, 0x4050E621, + 0x4050F421, 0x404EEE20, 0x404F4E20, 0x40508220, + // Block 55, offset 0xdc0 + 0x40508620, 0x404F1620, 0x404F1621, 0x404F2420, 0x404F2421, 0x404F3220, + 0x404F3221, 0x404F4020, 0x404F4021, 0x404F4E21, 0x404F5C20, 0x404F5C21, + 0x404F6A20, 0x404F6A21, 0x404F7820, 0x404F7821, 0x404F8620, 0x404F9420, + 0x404F9421, 0x404FA220, 0x404FA221, 0x404FB020, 0x404FB021, 0x404FBE20, + 0x404FBE21, 0x404FCC20, 0x404FCC21, 0x404FDA20, 0x404FDA21, 0x404FE820, + 0x404FE821, 0x404FF620, 0x404FF621, 0x40500420, 0x40500421, 0x40501220, + 0x40501221, 0x40502020, 0x40502021, 0x40502E20, 0x40502E21, 0x40503C20, + 0x40503C21, 0x40504A20, 0x40504A21, 0x40505820, 0x40505821, 0x40506620, + 0x40506621, 0x40507E20, 0x40507E21, 0x40509620, 0x40509621, 0x4050A420, + 0x4050A421, 0x4050B220, 0x4050B221, 0x4050C020, 0x4050CE20, 0x4050CE21, + 0x4050DC20, 0x4050DC21, 0x4050EA20, 0x4050F820, + // Block 56, offset 0xe00 + 0x40508420, 0x40508820, 0x40508020, 0x404E1820, 0x404F1E20, 0x404F1E21, + 0x404E1C20, 0x404F2C20, 0x404F2C21, 0x404F2E20, 0x404F3220, 0x404E2220, + 0x404F3A20, 0x404F3A21, 0x404E2420, 0x404F4820, 0x404F4821, 0x404E2820, + 0x404F5620, 0x404F5621, 0x404E2E20, 0x404F6420, 0x404F6421, 0x404E3220, + 0x404F7220, 0x404F7221, 0x404E3A20, 0x404F8020, 0x404E4220, 0x404F8E20, + 0x404F8E21, 0x404E4820, 0x404F9C20, 0x404F9C21, 0x404E4A20, 0x404FAA20, + 0x404FAA21, 0x404E4E20, 0x404FB820, 0x404FB821, 0x404E5220, 0x404FC620, + 0x404FC621, 0x404E5620, 0x404FD420, 0x404FD421, 0x404E5A20, 0x404FE220, + 0x404FE221, 0x404E5E20, 0x404FF020, 0x404FF021, 0x404E6220, 0x40500C20, + 0x40500C21, 0x404E6620, 0x40501A20, 0x40501A21, 0x404E7220, 0x40503620, + 0x40503621, 0x404E7420, 0x40504420, 0x40504421, + // Block 57, offset 0xe40 + 0x404E7E20, 0x40505220, 0x40505221, 0x404E8220, 0x40506020, 0x40506021, + 0x404E8420, 0x40506E20, 0x40506E21, 0x404E8820, 0x40509020, 0x40509021, + 0x404E8C20, 0x40509E20, 0x40509E21, 0x404E9820, 0x4050BA20, 0x404EAA20, + 0x4050D620, 0x4050D621, 0x404EB620, 0x4050E420, 0x404EC220, 0x4050F220, + 0x40510420, 0x40511A20, 0x40511020, 0x40511420, 0x40510620, 0x40511C20, + 0x40511220, 0x40511620, 0x40510A20, 0x40511820, 0x402BDE20, 0x40320C21, + 0x40321020, 0x40321021, 0x002BDE88, 0x00320CA3, 0x00321083, 0x003210A4, + 0x003210A3, 0x402C9820, 0x402C9A20, 0x002C9888, 0x002C9A83, 0x402C3A20, + 0x40312C20, 0x002C3A88, 0x00312C84, 0x00312C83, 0x402C6220, 0x40312E20, + 0x002C6288, 0x00312E84, 0x00312E83, 0x402DFE20, 0x40313020, 0x002DFE88, + 0x00313084, 0x00313083, 0x402E9E20, 0x40313220, + // Block 58, offset 0xe80 + 0x002E9E88, 0x00313284, 0x00313283, 0x402F2C20, 0x40313420, 0x002F2C88, + 0x00313484, 0x00313483, 0x402FE620, 0x40313620, 0x002FE688, 0x00313683, + 0x40421220, 0x40425A20, 0x402BDE20, 0x402BE020, 0x002BDE88, 0x002BE083, + 0x40312A20, 0x40312C20, 0x40312E20, 0x00312A88, 0x00312C83, 0x00312E83, + 0x40393820, 0x40393620, 0x40393821, 0x40393824, 0x40397220, 0x40396621, + 0x403A6821, 0x003A6883, 0x403A6820, 0x003A6884, 0x403A7420, 0x403A7421, + 0x403A9220, 0x403A9226, 0x403A9221, 0x003A9343, 0x403A9223, 0x003A9344, + 0x402BDE20, 0x402BE220, 0x402BE020, 0x002BDE88, 0x002BE283, 0x002BE083, + 0x402FE620, 0x402FE820, 0x402FE820, 0x002FE688, 0x002FE883, 0x002FE883, + 0x40302C20, 0x40302E20, 0x40302E20, 0x00302C88, 0x00302E83, 0x00302E83, + 0x402BDE20, 0x402C0820, 0x40320E21, 0x40320C21, + // Block 59, offset 0xec0 + 0x40320E20, 0x40320C20, 0x002BDE88, 0x002C0883, 0x00320EA3, 0x00320CA3, + 0x00320E83, 0x00320C83, 0x402C3A20, 0x402C5C20, 0x002C3A88, 0x002C5C83, + 0x402C5E20, 0x402C6020, 0x002C5E83, 0x002C6083, 0x402D2220, 0x402D6420, + 0x002D2288, 0x002D6483, 0x402E9E20, 0x402EE021, 0x402EE022, 0x002E9E88, + 0x002EE0A3, 0x002EE0C3, 0x40312A20, 0x40320620, 0x00312A88, 0x00320683, + 0x402EE220, 0x40321023, 0x40321022, 0x40321020, 0x40321021, 0x40321024, + 0x002EE288, 0x003210E3, 0x003210C3, 0x00321083, 0x003210A3, 0x00321103, + 0x402C6220, 0x402C9620, 0x002C6288, 0x002C9684, 0x002C9683, 0x002D2288, + 0x002D6684, 0x002D6683, 0x402E2220, 0xE0000CFB, 0xE0000CFB, 0x402E8020, + 0x002E2288, 0xE0000D01, 0xE0000D01, 0x002E8084, 0x002E8083, 0x002E9E88, + 0x002EE084, 0x002EE083, 0x002F7A88, 0x002FE484, + // Block 60, offset 0xf00 + 0x002FE483, 0x002FE688, 0x00302A84, 0x00302A83, 0x40302C20, 0x40306A20, + 0x00302C88, 0x00306A84, 0x00306A83, 0x4030F620, 0x4030FE20, 0x0030F688, + 0x0030FE84, 0x0030FE83, 0x00312A88, 0x00316284, 0x00316283, 0x402C9820, + 0x40320E22, 0x002C9888, 0x00320EC3, 0x402EE220, 0x40321024, 0x40321020, + 0x40321022, 0x002EE288, 0x00321103, 0x00321083, 0x003210C3, 0x40429820, + 0x4042C220, 0x4042C420, 0x40429620, 0x40429A20, 0x40429820, 0x40429C20, + 0x40429A20, 0x40429E20, 0x40429C20, 0x4042A020, 0x40429E20, 0x4042A220, + 0x4042A020, 0x4042A420, 0x4042A220, 0x4042A620, 0x4042A420, 0x4042A820, + 0x4042A620, 0x4042AA20, 0x4042A820, 0x4042AC20, 0x4042AA20, 0x4042AE20, + 0x4042AC20, 0x4042B020, 0x4042AE20, 0x4042B220, 0x4042B020, 0x4042B420, + 0x4042B220, 0x4042B620, 0x4042B420, 0x4042B820, + // Block 61, offset 0xf40 + 0x4042B620, 0x4042BA20, 0x4042B820, 0x4042BC20, 0x4042BA20, 0x4042BE20, + 0x4042BC20, 0x4042C020, 0x4042BE20, 0x4042C220, 0x4042C020, 0x4042C420, + 0x4042C220, 0x40496C20, 0xE000AE0D, 0xE000AE10, 0x402BDE20, 0x402BDE21, + 0x402BDE22, 0x002BDE88, 0x002BDEA3, 0x002BDEC3, 0x402C9820, 0x402C9821, + 0x402C9822, 0x002C9888, 0x002C98A3, 0x002C98C3, 0x402D9A20, 0x402D9A21, + 0x402D9A22, 0x002D9A88, 0x002D9AA3, 0x002D9AC3, 0x402EE220, 0x402EE221, + 0x402EE222, 0x002EE288, 0x002EE2A3, 0x002EE2C3, 0x40306C20, 0x40306C21, + 0x40306C22, 0x00306C88, 0x00306CA3, 0x00306CC3, 0x40393820, 0x40393A20, + 0x40393821, 0x40392820, 0x40393C20, 0x40393E20, 0x40394020, 0x40394220, + 0x40394420, 0x40394620, 0x40394820, 0x40394A20, 0x40394E20, 0x40395020, + 0x40395220, 0x40395420, 0x40395A20, 0x40395C20, + // Block 62, offset 0xf80 + 0x40395E20, 0x40396020, 0x40396420, 0x40396620, 0x40396820, 0x40396A20, + 0x40398420, 0x40398620, 0x40398820, 0x40398A20, 0x40398C20, 0x40398E20, + 0x40399020, 0x40399220, 0x40399420, 0x40399620, 0x40399820, 0x40399A20, + 0x40399C20, 0x40399C21, 0x40399E20, 0x4039A020, 0x4039A021, 0x403A9020, + 0x4039A821, 0x4039A820, 0x4039AA20, 0x4039AC20, 0x4039AC21, 0x402EE220, + 0x402EE420, 0x402EE620, 0x002EE288, 0x002EE483, 0x002EE683, 0x402BDE20, + 0xE0000966, 0xE000B3B3, 0xE0000958, 0xE0000966, 0x402C3A20, 0xE0000A41, + 0x402C9820, 0xE000B3B6, 0x402D9A20, 0xE000B3B9, 0x402EE220, 0xE0000DE3, + 0xE000B3BC, 0xE0000DCF, 0xE0000DE3, 0x402FE620, 0xE0000F30, 0x40306C20, + 0xE0001028, 0xE000B3BF, 0xE0000FFC, 0xE0001028, 0x402BDE20, 0x402BDE1F, + 0x402BDE1D, 0x402BDE1C, 0x402BDE1E, 0x002BDE88, + // Block 63, offset 0xfc0 + 0x002BDE63, 0x002BDE23, 0x002BDE03, 0x002BDE43, 0x402C9820, 0x402C9824, + 0x402C9822, 0x402C9821, 0x402C9823, 0x402C981F, 0x402C981D, 0x402C981C, + 0x402C981E, 0x002C9888, 0x002C9903, 0x002C98C3, 0x002C98A3, 0x002C98E3, + 0x002C9863, 0x002C9823, 0x002C9803, 0x002C9843, 0xE0000AF1, 0x402C9821, + 0x402C9823, 0xE0000AF4, 0x002C98A3, 0x002C98E3, 0x402D9A20, 0x402D9A1F, + 0x402D9A1D, 0x402D9A1C, 0x402D9A1E, 0x002D9A88, 0x002D9A63, 0x002D9A23, + 0x002D9A03, 0x002D9A43, 0x402E8220, 0x402E821F, 0x402E821D, 0x402E821C, + 0x402E821E, 0x002E8288, 0x002E8263, 0x002E8223, 0x002E8203, 0x002E8243, + 0x402E9E20, 0x402E9E1F, 0x402E9E1D, 0x402E9E1C, 0x402E9E1E, 0x002E9E88, + 0x002E9E63, 0x002E9E23, 0x002E9E03, 0x002E9E43, 0x402EE220, 0x402EE21F, + 0x402EE21D, 0x402EE21C, 0x402EE21E, 0x002EE288, + // Block 64, offset 0x1000 + 0x002EE263, 0x002EE223, 0x002EE203, 0x002EE243, 0x40306C20, 0x40306C24, + 0x40306C22, 0x40306C21, 0x40306C23, 0x40306C1F, 0x40306C1D, 0x40306C1C, + 0x40306C25, 0x40306C1E, 0x00306C88, 0x00306D03, 0x00306CC3, 0x00306CA3, + 0x00306CE3, 0x00306C63, 0x00306C23, 0x00306C03, 0x00306D23, 0x00306C43, +} + +// mainValues: 251456 entries, 1005824 bytes +// Block 2 is the null block. +var mainValues = [251456]uint32{ + // Block 0x0, offset 0x0 + 0x0000: 0xa0000000, 0x0001: 0xa0000000, 0x0002: 0xa0000000, 0x0003: 0xa0000000, + 0x0004: 0xa0000000, 0x0005: 0xa0000000, 0x0006: 0xa0000000, 0x0007: 0xa0000000, + 0x0008: 0xa0000000, 0x0009: 0x40020020, 0x000a: 0x40020220, 0x000b: 0x40020420, + 0x000c: 0x40020620, 0x000d: 0x40020820, 0x000e: 0xa0000000, 0x000f: 0xa0000000, + 0x0010: 0xa0000000, 0x0011: 0xa0000000, 0x0012: 0xa0000000, 0x0013: 0xa0000000, + 0x0014: 0xa0000000, 0x0015: 0xa0000000, 0x0016: 0xa0000000, 0x0017: 0xa0000000, + 0x0018: 0xa0000000, 0x0019: 0xa0000000, 0x001a: 0xa0000000, 0x001b: 0xa0000000, + 0x001c: 0xa0000000, 0x001d: 0xa0000000, 0x001e: 0xa0000000, 0x001f: 0xa0000000, + 0x0020: 0x40021220, 0x0021: 0x4002ba20, 0x0022: 0x4003e020, 0x0023: 0x4004ea20, + 0x0024: 0x4027de20, 0x0025: 0x4004ec20, 0x0026: 0x4004e620, 0x0027: 0x4003d220, + 0x0028: 0x4003f420, 0x0029: 0x4003f620, 0x002a: 0x4004d820, 0x002b: 0x40093820, + 0x002c: 0x40024020, 0x002d: 0x40021a20, 0x002e: 0x4002e420, 0x002f: 0x4004e220, + 0x0030: 0x4029cc20, 0x0031: 0x4029ce20, 0x0032: 0x4029d020, 0x0033: 0x4029d220, + 0x0034: 0x4029d420, 0x0035: 0x4029d620, 0x0036: 0x4029d820, 0x0037: 0x4029da20, + 0x0038: 0x4029dc20, 0x0039: 0x4029de20, 0x003a: 0x40026c20, 0x003b: 0x40026220, + 0x003c: 0x40094020, 0x003d: 0x40094220, 0x003e: 0x40094420, 0x003f: 0x4002c420, + // Block 0x1, offset 0x40 + 0x0040: 0x4004d620, 0x0041: 0x002bde88, 0x0042: 0x002c0a88, 0x0043: 0x002c3a88, + 0x0044: 0x002c6288, 0x0045: 0x002c9888, 0x0046: 0x002d0888, 0x0047: 0x002d2288, + 0x0048: 0x002d6888, 0x0049: 0x002d9a88, 0x004a: 0x002dcc88, 0x004b: 0x002dfe88, + 0x004c: 0xc0030002, 0x004d: 0x002e8288, 0x004e: 0x002e9e88, 0x004f: 0x002ee288, + 0x0050: 0x002f2c88, 0x0051: 0x002f5688, 0x0052: 0x002f7a88, 0x0053: 0x002fe688, + 0x0054: 0x00302c88, 0x0055: 0x00306c88, 0x0056: 0x0030be88, 0x0057: 0x0030e288, + 0x0058: 0x0030f688, 0x0059: 0x00310088, 0x005a: 0x00312a88, 0x005b: 0x4003f820, + 0x005c: 0x4004e420, 0x005d: 0x4003fa20, 0x005e: 0x40062420, 0x005f: 0x40021620, + 0x0060: 0x40061e20, 0x0061: 0x402bde20, 0x0062: 0x402c0a20, 0x0063: 0x402c3a20, + 0x0064: 0x402c6220, 0x0065: 0x402c9820, 0x0066: 0x402d0820, 0x0067: 0x402d2220, + 0x0068: 0x402d6820, 0x0069: 0x402d9a20, 0x006a: 0x402dcc20, 0x006b: 0x402dfe20, + 0x006c: 0xc0000002, 0x006d: 0x402e8220, 0x006e: 0x402e9e20, 0x006f: 0x402ee220, + 0x0070: 0x402f2c20, 0x0071: 0x402f5620, 0x0072: 0x402f7a20, 0x0073: 0x402fe620, + 0x0074: 0x40302c20, 0x0075: 0x40306c20, 0x0076: 0x4030be20, 0x0077: 0x4030e220, + 0x0078: 0x4030f620, 0x0079: 0x40310020, 0x007a: 0x40312a20, 0x007b: 0x4003fc20, + 0x007c: 0x40094820, 0x007d: 0x4003fe20, 0x007e: 0x40094c20, 0x007f: 0xa0000000, + // Block 0x2, offset 0x80 + // Block 0x3, offset 0xc0 + 0x00c0: 0xa0000000, 0x00c1: 0xa0000000, 0x00c2: 0xa0000000, 0x00c3: 0xa0000000, + 0x00c4: 0xa0000000, 0x00c5: 0x40020a20, 0x00c6: 0xa0000000, 0x00c7: 0xa0000000, + 0x00c8: 0xa0000000, 0x00c9: 0xa0000000, 0x00ca: 0xa0000000, 0x00cb: 0xa0000000, + 0x00cc: 0xa0000000, 0x00cd: 0xa0000000, 0x00ce: 0xa0000000, 0x00cf: 0xa0000000, + 0x00d0: 0xa0000000, 0x00d1: 0xa0000000, 0x00d2: 0xa0000000, 0x00d3: 0xa0000000, + 0x00d4: 0xa0000000, 0x00d5: 0xa0000000, 0x00d6: 0xa0000000, 0x00d7: 0xa0000000, + 0x00d8: 0xa0000000, 0x00d9: 0xa0000000, 0x00da: 0xa0000000, 0x00db: 0xa0000000, + 0x00dc: 0xa0000000, 0x00dd: 0xa0000000, 0x00de: 0xa0000000, 0x00df: 0xa0000000, + 0x00e0: 0x0002129b, 0x00e1: 0x4002bc20, 0x00e2: 0x4027dc20, 0x00e3: 0x4027e020, + 0x00e4: 0x4027da20, 0x00e5: 0x4027e220, 0x00e6: 0x40094a20, 0x00e7: 0x4004ce20, + 0x00e8: 0x40062c20, 0x00e9: 0x40081820, 0x00ea: 0x002bde94, 0x00eb: 0x4003f020, + 0x00ec: 0x40094620, 0x00ed: 0xa0000000, 0x00ee: 0x40081a20, 0x00ef: 0x40062620, + 0x00f0: 0x40070420, 0x00f1: 0x40093a20, 0x00f2: 0x0029d094, 0x00f3: 0x0029d294, + 0x00f4: 0x40062020, 0x00f5: 0x00327684, 0x00f6: 0x4004d220, 0x00f7: 0x40030620, + 0x00f8: 0x40063220, 0x00f9: 0x0029ce94, 0x00fa: 0x002ee294, 0x00fb: 0x4003f220, + 0x00fc: 0xe00002bf, 0x00fd: 0xe00002b7, 0x00fe: 0xe00004a7, 0x00ff: 0x4002c620, + // Block 0x4, offset 0x100 + 0x0100: 0xe00008f5, 0x0101: 0xe00008ef, 0x0102: 0xe0000921, 0x0103: 0xe0000969, + 0x0104: 0xe000095b, 0x0105: 0xe000094d, 0x0106: 0xe00009dd, 0x0107: 0xe0000a53, + 0x0108: 0xe0000ae8, 0x0109: 0xe0000ae2, 0x010a: 0xe0000af4, 0x010b: 0xe0000b20, + 0x010c: 0xe0000c2b, 0x010d: 0xe0000c25, 0x010e: 0xe0000c37, 0x010f: 0xe0000c43, + 0x0110: 0xe0000ab3, 0x0111: 0xe0000d63, 0x0112: 0xe0000d9a, 0x0113: 0xe0000d94, + 0x0114: 0xe0000da6, 0x0115: 0xe0000de6, 0x0116: 0xe0000dd2, 0x0117: 0x40093e20, + 0x0118: 0xe0000e12, 0x0119: 0xe0000fe1, 0x011a: 0xe0000fdb, 0x011b: 0xe0000fed, + 0x011c: 0xe0000fff, 0x011d: 0xe0001102, 0x011e: 0x00318888, 0x011f: 0xe0000f7b, + 0x0120: 0xe00008f2, 0x0121: 0xe00008ec, 0x0122: 0xe000091e, 0x0123: 0xe0000966, + 0x0124: 0xe0000958, 0x0125: 0xe000094a, 0x0126: 0xe00009d5, 0x0127: 0xe0000a4d, + 0x0128: 0xe0000ae5, 0x0129: 0xe0000adf, 0x012a: 0xe0000af1, 0x012b: 0xe0000b1d, + 0x012c: 0xe0000c28, 0x012d: 0xe0000c22, 0x012e: 0xe0000c34, 0x012f: 0xe0000c40, + 0x0130: 0xe0000aad, 0x0131: 0xe0000d60, 0x0132: 0xe0000d97, 0x0133: 0xe0000d91, + 0x0134: 0xe0000da3, 0x0135: 0xe0000de3, 0x0136: 0xe0000dcf, 0x0137: 0x40093c20, + 0x0138: 0xe0000e0f, 0x0139: 0xe0000fde, 0x013a: 0xe0000fd8, 0x013b: 0xe0000fea, + 0x013c: 0xe0000ffc, 0x013d: 0xe00010ff, 0x013e: 0x40318820, 0x013f: 0xe0001114, + // Block 0x5, offset 0x140 + 0x0140: 0xe0000983, 0x0141: 0xe0000980, 0x0142: 0xe00008fb, 0x0143: 0xe00008f8, + 0x0144: 0xe000097d, 0x0145: 0xe000097a, 0x0146: 0xe0000a38, 0x0147: 0xe0000a35, + 0x0148: 0xe0000a3e, 0x0149: 0xe0000a3b, 0x014a: 0xe0000a4a, 0x014b: 0xe0000a47, + 0x014c: 0xe0000a44, 0x014d: 0xe0000a41, 0x014e: 0xe0000a86, 0x014f: 0xe0000a83, + 0x0150: 0xe0000aaa, 0x0151: 0xe0000aa7, 0x0152: 0xe0000b46, 0x0153: 0xe0000b43, + 0x0154: 0xe0000aee, 0x0155: 0xe0000aeb, 0x0156: 0xe0000b2c, 0x0157: 0xe0000b29, + 0x0158: 0xe0000b40, 0x0159: 0xe0000b3d, 0x015a: 0xe0000b1a, 0x015b: 0xe0000b17, + 0x015c: 0xe0000bb8, 0x015d: 0xe0000bb5, 0x015e: 0xe0000bb2, 0x015f: 0xe0000baf, + 0x0160: 0xe0000bc4, 0x0161: 0xe0000bc1, 0x0162: 0xe0000bca, 0x0163: 0xe0000bc7, + 0x0164: 0xe0000bee, 0x0165: 0xe0000beb, 0x0166: 0xe0000c1b, 0x0167: 0xe0000c18, + 0x0168: 0xe0000c51, 0x0169: 0xe0000c4e, 0x016a: 0xe0000c60, 0x016b: 0xe0000c5d, + 0x016c: 0xe0000c31, 0x016d: 0xe0000c2e, 0x016e: 0xe0000c5a, 0x016f: 0xe0000c57, + 0x0170: 0xe0000c54, 0x0171: 0x402da220, 0x0172: 0xf0000a0a, 0x0173: 0xf0000404, + 0x0174: 0xe0000c8a, 0x0175: 0xe0000c87, 0x0176: 0xe0000c9f, 0x0177: 0xe0000c9c, + 0x0178: 0x402f7220, 0x0179: 0xe0000ccc, 0x017a: 0xe0000cc9, 0x017b: 0xe0000cd8, + 0x017c: 0xe0000cd5, 0x017d: 0xe0000cd2, 0x017e: 0xe0000ccf, 0x017f: 0xe0000d04, + // Block 0x6, offset 0x180 + 0x0180: 0xe0000cfe, 0x0181: 0xe0000cf8, 0x0182: 0xe0000cf5, 0x0183: 0xe0000d51, + 0x0184: 0xe0000d4e, 0x0185: 0xe0000d6f, 0x0186: 0xe0000d6c, 0x0187: 0xe0000d5d, + 0x0188: 0xe0000d5a, 0x0189: 0xf0000404, 0x018a: 0x002eda88, 0x018b: 0x402eda20, + 0x018c: 0xe0000e2e, 0x018d: 0xe0000e2b, 0x018e: 0xe0000da0, 0x018f: 0xe0000d9d, + 0x0190: 0xe0000de0, 0x0191: 0xe0000ddd, 0x0192: 0xe0000e93, 0x0193: 0xe0000e8f, + 0x0194: 0xe0000eca, 0x0195: 0xe0000ec7, 0x0196: 0xe0000edc, 0x0197: 0xe0000ed9, + 0x0198: 0xe0000ed0, 0x0199: 0xe0000ecd, 0x019a: 0xe0000f1f, 0x019b: 0xe0000f1c, + 0x019c: 0xe0000f2d, 0x019d: 0xe0000f2a, 0x019e: 0xe0000f47, 0x019f: 0xe0000f44, + 0x01a0: 0xe0000f33, 0x01a1: 0xe0000f30, 0x01a2: 0xe0000f99, 0x01a3: 0xe0000f96, + 0x01a4: 0xe0000f8a, 0x01a5: 0xe0000f87, 0x01a6: 0x00303688, 0x01a7: 0x40303620, + 0x01a8: 0xe000102b, 0x01a9: 0xe0001028, 0x01aa: 0xe000103f, 0x01ab: 0xe000103c, + 0x01ac: 0xe0000fe7, 0x01ad: 0xe0000fe4, 0x01ae: 0xe0000ff9, 0x01af: 0xe0000ff6, + 0x01b0: 0xe0001025, 0x01b1: 0xe0001022, 0x01b2: 0xe0001039, 0x01b3: 0xe0001036, + 0x01b4: 0xe00010d8, 0x01b5: 0xe00010d5, 0x01b6: 0xe000110e, 0x01b7: 0xe000110b, + 0x01b8: 0xe0001117, 0x01b9: 0xe000113b, 0x01ba: 0xe0001138, 0x01bb: 0xe000114d, + 0x01bc: 0xe000114a, 0x01bd: 0xe0001147, 0x01be: 0xe0001144, 0x01bf: 0xe0000f64, + // Block 0x7, offset 0x1c0 + 0x01c0: 0x402c1a20, 0x01c1: 0x002c2a88, 0x01c2: 0x002c3288, 0x01c3: 0x402c3220, + 0x01c4: 0x0031c488, 0x01c5: 0x4031c420, 0x01c6: 0x002efa88, 0x01c7: 0x002c4e88, + 0x01c8: 0x402c4e20, 0x01c9: 0x002c7288, 0x01ca: 0x002c7a88, 0x01cb: 0x002c8488, + 0x01cc: 0x402c8420, 0x01cd: 0xe000115c, 0x01ce: 0x002cae88, 0x01cf: 0x002cb888, + 0x01d0: 0x002cc288, 0x01d1: 0x002d1688, 0x01d2: 0x402d1620, 0x01d3: 0x002d4488, + 0x01d4: 0x002d5888, 0x01d5: 0x402d7820, 0x01d6: 0x002dc288, 0x01d7: 0x002db688, + 0x01d8: 0x002e0a88, 0x01d9: 0x402e0a20, 0x01da: 0x402e3820, 0x01db: 0x402e7220, + 0x01dc: 0x0030a088, 0x01dd: 0x002eb488, 0x01de: 0x402ebc20, 0x01df: 0x002f1088, + 0x01e0: 0xe0000e56, 0x01e1: 0xe0000e53, 0x01e2: 0x002d6088, 0x01e3: 0x402d6020, + 0x01e4: 0x002f3e88, 0x01e5: 0x402f3e20, 0x01e6: 0x002f8288, 0x01e7: 0x0031b488, + 0x01e8: 0x4031b420, 0x01e9: 0x00300888, 0x01ea: 0x40301220, 0x01eb: 0x40304220, + 0x01ec: 0x00304a88, 0x01ed: 0x40304a20, 0x01ee: 0x00305288, 0x01ef: 0xe000105f, + 0x01f0: 0xe000105c, 0x01f1: 0x0030b488, 0x01f2: 0x0030cc88, 0x01f3: 0x00311888, + 0x01f4: 0x40311820, 0x01f5: 0x00313488, 0x01f6: 0x40313420, 0x01f7: 0x00316488, + 0x01f8: 0x00316e88, 0x01f9: 0x40316e20, 0x01fa: 0x40317820, 0x01fb: 0x4031a620, + 0x01fc: 0x0031bc88, 0x01fd: 0x4031bc20, 0x01fe: 0xe0000fc9, 0x01ff: 0x40319420, + // Block 0x8, offset 0x200 + 0x0200: 0x40321220, 0x0201: 0x40321a20, 0x0202: 0x40322220, 0x0203: 0x40322a20, + 0x0204: 0xe0000ad5, 0x0205: 0xe0000ad1, 0x0206: 0xe0000acd, 0x0207: 0xf0000a0a, + 0x0208: 0xf000040a, 0x0209: 0xf0000404, 0x020a: 0xf0000a0a, 0x020b: 0xf000040a, + 0x020c: 0xf0000404, 0x020d: 0xe0000947, 0x020e: 0xe0000944, 0x020f: 0xe0000c3d, + 0x0210: 0xe0000c3a, 0x0211: 0xe0000dcc, 0x0212: 0xe0000dc9, 0x0213: 0xe0000ff3, + 0x0214: 0xe0000ff0, 0x0215: 0xe000101e, 0x0216: 0xe000101a, 0x0217: 0xe0001006, + 0x0218: 0xe0001002, 0x0219: 0xe0001016, 0x021a: 0xe0001012, 0x021b: 0xe000100e, + 0x021c: 0xe000100a, 0x021d: 0x402cae20, 0x021e: 0xe0000962, 0x021f: 0xe000095e, + 0x0220: 0xe0000976, 0x0221: 0xe0000972, 0x0222: 0xe00009f4, 0x0223: 0xe00009ef, + 0x0224: 0x002d3a88, 0x0225: 0x402d3a20, 0x0226: 0xe0000bbe, 0x0227: 0xe0000bbb, + 0x0228: 0xe0000c99, 0x0229: 0xe0000c96, 0x022a: 0xe0000e20, 0x022b: 0xe0000e1d, + 0x022c: 0xe0000e27, 0x022d: 0xe0000e23, 0x022e: 0xe0001162, 0x022f: 0xe000115f, + 0x0230: 0xe0000c8d, 0x0231: 0xf0000a0a, 0x0232: 0xf000040a, 0x0233: 0xf0000404, + 0x0234: 0xe0000bac, 0x0235: 0xe0000ba9, 0x0236: 0x002d7888, 0x0237: 0x00319488, + 0x0238: 0xe0000d57, 0x0239: 0xe0000d54, 0x023a: 0xe0000954, 0x023b: 0xe0000950, + 0x023c: 0xe00009ea, 0x023d: 0xe00009e5, 0x023e: 0xe0000e19, 0x023f: 0xe0000e15, + // Block 0x9, offset 0x240 + 0x0240: 0xe000098f, 0x0241: 0xe000098c, 0x0242: 0xe0000995, 0x0243: 0xe0000992, + 0x0244: 0xe0000b62, 0x0245: 0xe0000b5f, 0x0246: 0xe0000b68, 0x0247: 0xe0000b65, + 0x0248: 0xe0000c6c, 0x0249: 0xe0000c69, 0x024a: 0xe0000c72, 0x024b: 0xe0000c6f, + 0x024c: 0xe0000e4a, 0x024d: 0xe0000e47, 0x024e: 0xe0000e50, 0x024f: 0xe0000e4d, + 0x0250: 0xe0000ee8, 0x0251: 0xe0000ee5, 0x0252: 0xe0000eee, 0x0253: 0xe0000eeb, + 0x0254: 0xe0001053, 0x0255: 0xe0001050, 0x0256: 0xe0001059, 0x0257: 0xe0001056, + 0x0258: 0xe0000f61, 0x0259: 0xe0000f5e, 0x025a: 0xe0000fa5, 0x025b: 0xe0000fa2, + 0x025c: 0x00312288, 0x025d: 0x40312220, 0x025e: 0xe0000bf4, 0x025f: 0xe0000bf1, + 0x0260: 0x002ebc88, 0x0261: 0x402c8c20, 0x0262: 0x002f2288, 0x0263: 0x402f2220, + 0x0264: 0x00314088, 0x0265: 0x40314020, 0x0266: 0xe000096f, 0x0267: 0xe000096c, + 0x0268: 0xe0000b32, 0x0269: 0xe0000b2f, 0x026a: 0xe0000dd9, 0x026b: 0xe0000dd5, + 0x026c: 0xe0000dfd, 0x026d: 0xe0000df9, 0x026e: 0xe0000e04, 0x026f: 0xe0000e01, + 0x0270: 0xe0000e0b, 0x0271: 0xe0000e07, 0x0272: 0xe0001129, 0x0273: 0xe0001126, + 0x0274: 0x402e5e20, 0x0275: 0x402ed020, 0x0276: 0x40305a20, 0x0277: 0x402dd420, + 0x0278: 0xe0000abf, 0x0279: 0xe0000ec4, 0x027a: 0x002be888, 0x027b: 0x002c4488, + 0x027c: 0x402c4420, 0x027d: 0x002e3888, 0x027e: 0x00303e88, 0x027f: 0x402ffc20, + // Block 0xa, offset 0x280 + 0x0280: 0x40315820, 0x0281: 0x0031d488, 0x0282: 0x4031d420, 0x0283: 0x002c1a88, + 0x0284: 0x00307c88, 0x0285: 0x0030da88, 0x0286: 0x002ca288, 0x0287: 0x402ca220, + 0x0288: 0x002dde88, 0x0289: 0x402dde20, 0x028a: 0x002f6a88, 0x028b: 0x402f6a20, + 0x028c: 0x002f8e88, 0x028d: 0x402f8e20, 0x028e: 0x00311088, 0x028f: 0x40311020, + 0x0290: 0x402bf020, 0x0291: 0x402bf820, 0x0292: 0x402c0220, 0x0293: 0x402c2a20, + 0x0294: 0x402efa20, 0x0295: 0x402c5620, 0x0296: 0x402c7220, 0x0297: 0x402c7a20, + 0x0298: 0x402ccc20, 0x0299: 0x402cb820, 0x029a: 0x402cd420, 0x029b: 0x402cc220, + 0x029c: 0x402cdc20, 0x029d: 0x402ce820, 0x029e: 0x402cf020, 0x029f: 0x402dee20, + 0x02a0: 0x402d4420, 0x02a1: 0x402d2a20, 0x02a2: 0x402d3220, 0x02a3: 0x402d5820, + 0x02a4: 0x402d0020, 0x02a5: 0x40308820, 0x02a6: 0x402d8020, 0x02a7: 0x402d8e20, + 0x02a8: 0x402db620, 0x02a9: 0x402dc220, 0x02aa: 0x402daa20, 0x02ab: 0x402e4220, + 0x02ac: 0x402e4a20, 0x02ad: 0x402e5420, 0x02ae: 0x402e6820, 0x02af: 0x4030a020, + 0x02b0: 0x4030ac20, 0x02b1: 0x402e9020, 0x02b2: 0x402eb420, 0x02b3: 0x402ec820, + 0x02b4: 0x402ea620, 0x02b5: 0x402f1020, 0x02b6: 0x402eee20, 0x02b7: 0x402f1a20, + 0x02b8: 0x402f4c20, 0x02b9: 0x402f9820, 0x02ba: 0x402fa220, 0x02bb: 0x402fac20, + 0x02bc: 0x402fb620, 0x02bd: 0x402fbe20, 0x02be: 0x402fc620, 0x02bf: 0x402fd020, + // Block 0xb, offset 0x2c0 + 0x02c0: 0x402f8220, 0x02c1: 0x402fd820, 0x02c2: 0x402ff420, 0x02c3: 0x40300820, + 0x02c4: 0x402df620, 0x02c5: 0x40301a20, 0x02c6: 0x40302420, 0x02c7: 0x40306420, + 0x02c8: 0x40305220, 0x02c9: 0x40307c20, 0x02ca: 0x4030b420, 0x02cb: 0x4030cc20, + 0x02cc: 0x4030da20, 0x02cd: 0x4030ee20, 0x02ce: 0x402e7a20, 0x02cf: 0x40310820, + 0x02d0: 0x40314820, 0x02d1: 0x40315020, 0x02d2: 0x40316420, 0x02d3: 0x40318020, + 0x02d4: 0x4031cc20, 0x02d5: 0x4031e820, 0x02d6: 0x40320a20, 0x02d7: 0x40323220, + 0x02d8: 0x40323a20, 0x02d9: 0x402c1220, 0x02da: 0x402cf820, 0x02db: 0x402d4c20, + 0x02dc: 0x402d7020, 0x02dd: 0x402de620, 0x02de: 0x402e1a20, 0x02df: 0x402e2a20, + 0x02e0: 0x402f6220, 0x02e1: 0x4031fa20, 0x02e2: 0x40320220, 0x02e3: 0xe0000aca, + 0x02e4: 0xe0000adc, 0x02e5: 0xe0000ad9, 0x02e6: 0xe0000fcc, 0x02e7: 0xe0000fcf, + 0x02e8: 0xe0000fba, 0x02e9: 0xe0000ba1, 0x02ea: 0xe0000d11, 0x02eb: 0xe0000d18, + 0x02ec: 0x40324220, 0x02ed: 0x40324a20, 0x02ee: 0x40309020, 0x02ef: 0x40309820, + 0x02f0: 0x002d6894, 0x02f1: 0x002d8094, 0x02f2: 0x002dcc94, 0x02f3: 0x002f7a94, + 0x02f4: 0x002f9894, 0x02f5: 0x002fac94, 0x02f6: 0x002fd894, 0x02f7: 0x0030e294, + 0x02f8: 0x00310094, 0x02f9: 0x40064020, 0x02fa: 0x40064420, 0x02fb: 0x402d9620, + 0x02fc: 0x4031de20, 0x02fd: 0x402d9820, 0x02fe: 0x4031e220, 0x02ff: 0x4031f020, + // Block 0xc, offset 0x300 + 0x0300: 0x4031dc20, 0x0301: 0x4031f220, 0x0302: 0x40064620, 0x0303: 0x40064820, + 0x0304: 0x40064a20, 0x0305: 0x40064c20, 0x0306: 0x40064e20, 0x0307: 0x40065020, + 0x0308: 0x40065220, 0x0309: 0x40065420, 0x030a: 0x40065620, 0x030b: 0x40065820, + 0x030c: 0x40065a20, 0x030d: 0x40065c20, 0x030e: 0x40065e20, 0x030f: 0x40066020, + 0x0310: 0x4027b220, 0x0311: 0x4027b420, 0x0312: 0x40066220, 0x0313: 0x40066420, + 0x0314: 0x40066620, 0x0315: 0x40066820, 0x0316: 0x40066a20, 0x0317: 0x40066c20, + 0x0318: 0x40062820, 0x0319: 0x40062a20, 0x031a: 0x40062e20, 0x031b: 0x40063420, + 0x031c: 0x40062220, 0x031d: 0x40063020, 0x031e: 0x40066e20, 0x031f: 0x40067020, + 0x0320: 0x002d5894, 0x0321: 0x002e2294, 0x0322: 0x002fe694, 0x0323: 0x0030f694, + 0x0324: 0x0031e894, 0x0325: 0x40067220, 0x0326: 0x40067420, 0x0327: 0x40067620, + 0x0328: 0x40067820, 0x0329: 0x40067a20, 0x032a: 0x40067c20, 0x032b: 0x40067e20, + 0x032c: 0x40068020, 0x032d: 0x40068220, 0x032e: 0x4031e020, 0x032f: 0x40068420, + 0x0330: 0x40068620, 0x0331: 0x40068820, 0x0332: 0x40068a20, 0x0333: 0x40068c20, + 0x0334: 0x40068e20, 0x0335: 0x40069020, 0x0336: 0x40069220, 0x0337: 0x40069420, + 0x0338: 0x40069620, 0x0339: 0x40069820, 0x033a: 0x40069a20, 0x033b: 0x40069c20, + 0x033c: 0x40069e20, 0x033d: 0x4006a020, 0x033e: 0x4006a220, 0x033f: 0x4006a420, + // Block 0xd, offset 0x340 + 0x0340: 0xae603502, 0x0341: 0xae603202, 0x0342: 0xae603c02, 0x0343: 0xae604e02, + 0x0344: 0xae605b02, 0x0345: 0xae606302, 0x0346: 0xae603702, 0x0347: 0xae605202, + 0x0348: 0xae604702, 0x0349: 0xae606402, 0x034a: 0xae604302, 0x034b: 0xae604d02, + 0x034c: 0xae604102, 0x034d: 0xae605f02, 0x034e: 0xae605f02, 0x034f: 0xae606502, + 0x0350: 0xae606602, 0x0351: 0xae606702, 0x0352: 0xae605f02, 0x0353: 0xae602202, + 0x0354: 0xae602a02, 0x0355: 0xae805f02, 0x0356: 0xadc06002, 0x0357: 0xadc06002, + 0x0358: 0xadc06002, 0x0359: 0xadc06002, 0x035a: 0xae805f02, 0x035b: 0xad806802, + 0x035c: 0xadc06002, 0x035d: 0xadc06002, 0x035e: 0xadc06002, 0x035f: 0xadc06002, + 0x0360: 0xadc06002, 0x0361: 0xaca06e02, 0x0362: 0xaca06f02, 0x0363: 0xadc07002, + 0x0364: 0xadc07502, 0x0365: 0xadc07602, 0x0366: 0xadc07702, 0x0367: 0xaca05602, + 0x0368: 0xaca05902, 0x0369: 0xadc06002, 0x036a: 0xadc06002, 0x036b: 0xadc06002, + 0x036c: 0xadc06002, 0x036d: 0xadc07802, 0x036e: 0xadc07902, 0x036f: 0xadc06002, + 0x0370: 0xadc07a02, 0x0371: 0xadc07b02, 0x0372: 0xadc02102, 0x0373: 0xadc06002, + 0x0374: 0xa0107c02, 0x0375: 0xa0107d02, 0x0376: 0xa0106102, 0x0377: 0xa0106102, + 0x0378: 0xa0105402, 0x0379: 0xadc07e02, 0x037a: 0xadc06002, 0x037b: 0xadc06002, + 0x037c: 0xadc06002, 0x037d: 0xae605f02, 0x037e: 0xae605f02, 0x037f: 0xae605f02, + // Block 0xe, offset 0x380 + 0x0380: 0xae603502, 0x0381: 0xae603202, 0x0382: 0xae604502, 0x0383: 0xae602202, + 0x0384: 0xe0000000, 0x0385: 0xaf007f02, 0x0386: 0xae605f02, 0x0387: 0xadc06002, + 0x0388: 0xadc06002, 0x0389: 0xadc06002, 0x038a: 0xae605f02, 0x038b: 0xae605f02, + 0x038c: 0xae605f02, 0x038d: 0xadc06002, 0x038e: 0xadc06002, 0x038f: 0xa0000000, + 0x0390: 0xae605f02, 0x0391: 0xae605f02, 0x0392: 0xae605f02, 0x0393: 0xadc06002, + 0x0394: 0xadc06002, 0x0395: 0xadc06002, 0x0396: 0xadc06002, 0x0397: 0xae605f02, + 0x0398: 0xae808002, 0x0399: 0xadc06002, 0x039a: 0xadc06002, 0x039b: 0xae605f02, + 0x039c: 0xae906002, 0x039d: 0xaea05f02, 0x039e: 0xaea05f02, 0x039f: 0xae906002, + 0x03a0: 0xaea08102, 0x03a1: 0xaea08202, 0x03a2: 0xae906002, 0x03a3: 0x84e615ef, + 0x03a4: 0x84e6164c, 0x03a5: 0x84e616cd, 0x03a6: 0x84e61771, 0x03a7: 0x84e61836, + 0x03a8: 0x84e6161d, 0x03a9: 0x84e61631, 0x03aa: 0x84e616b4, 0x03ab: 0x84e61741, + 0x03ac: 0x84e617bd, 0x03ad: 0x84e61816, 0x03ae: 0x84e6185f, 0x03af: 0x84e6187b, + 0x03b0: 0x00326688, 0x03b1: 0x40326620, 0x03b2: 0x0032a688, 0x03b3: 0x4032a620, + 0x03b4: 0x40064020, 0x03b5: 0x40064220, 0x03b6: 0x00326088, 0x03b7: 0x40326020, + 0x03ba: 0x00326c84, 0x03bb: 0x40329220, + 0x03bc: 0x40329020, 0x03bd: 0x40329420, 0x03be: 0x40026220, + // Block 0xf, offset 0x3c0 + 0x03c4: 0x40062020, 0x03c5: 0xe00000ab, 0x03c6: 0xe00011f0, 0x03c7: 0x40030620, + 0x03c8: 0xe0001249, 0x03c9: 0xe00012dd, 0x03ca: 0xe000133a, + 0x03cc: 0xe000139b, 0x03ce: 0xe00013dd, 0x03cf: 0xe0001492, + 0x03d0: 0xe0001352, 0x03d1: 0x00325288, 0x03d2: 0x00325488, 0x03d3: 0x00325688, + 0x03d4: 0x00325a88, 0x03d5: 0x00325c88, 0x03d6: 0x00326488, 0x03d7: 0x00326888, + 0x03d8: 0x00326a88, 0x03d9: 0x00326c88, 0x03da: 0x00327088, 0x03db: 0x00327288, + 0x03dc: 0x00327688, 0x03dd: 0x00327888, 0x03de: 0x00327a88, 0x03df: 0x00327c88, + 0x03e0: 0x00327e88, 0x03e1: 0x00328888, 0x03e3: 0x00328e88, + 0x03e4: 0x00329688, 0x03e5: 0x00329888, 0x03e6: 0x00329a88, 0x03e7: 0x00329c88, + 0x03e8: 0x00329e88, 0x03e9: 0x0032a288, 0x03ea: 0xe000134f, 0x03eb: 0xe00013f2, + 0x03ec: 0xe00011ed, 0x03ed: 0xe0001246, 0x03ee: 0xe00012da, 0x03ef: 0xe0001337, + 0x03f0: 0xe00013f5, 0x03f1: 0x40325220, 0x03f2: 0x40325420, 0x03f3: 0x40325620, + 0x03f4: 0x40325a20, 0x03f5: 0x40325c20, 0x03f6: 0x40326420, 0x03f7: 0x40326820, + 0x03f8: 0x40326a20, 0x03f9: 0x40326c20, 0x03fa: 0x40327020, 0x03fb: 0x40327220, + 0x03fc: 0x40327620, 0x03fd: 0x40327820, 0x03fe: 0x40327a20, 0x03ff: 0x40327c20, + // Block 0x10, offset 0x400 + 0x0400: 0x40327e20, 0x0401: 0x40328820, 0x0402: 0x00328e99, 0x0403: 0x40328e20, + 0x0404: 0x40329620, 0x0405: 0x40329820, 0x0406: 0x40329a20, 0x0407: 0x40329c20, + 0x0408: 0x40329e20, 0x0409: 0x4032a220, 0x040a: 0xe000134c, 0x040b: 0xe00013ef, + 0x040c: 0xe0001398, 0x040d: 0xe00013da, 0x040e: 0xe000148f, 0x040f: 0xe0001368, + 0x0410: 0x00325484, 0x0411: 0x00326a84, 0x0412: 0x0032988a, 0x0413: 0xf000020a, + 0x0414: 0xf000020a, 0x0415: 0x00329a84, 0x0416: 0x00327e84, 0x0417: 0xe0001364, + 0x0418: 0x00328688, 0x0419: 0x40328620, 0x041a: 0x00326288, 0x041b: 0x40326220, + 0x041c: 0x00325e88, 0x041d: 0x40325e20, 0x041e: 0x00328488, 0x041f: 0x40328420, + 0x0420: 0x0032a488, 0x0421: 0x4032a420, 0x0422: 0x0032e888, 0x0423: 0x4032e820, + 0x0424: 0x0032f288, 0x0425: 0x4032f220, 0x0426: 0x0032f488, 0x0427: 0x4032f420, + 0x0428: 0x0032fa88, 0x0429: 0x4032fa20, 0x042a: 0x00330888, 0x042b: 0x40330820, + 0x042c: 0x00330e88, 0x042d: 0x40330e20, 0x042e: 0x00331688, 0x042f: 0x40331620, + 0x0430: 0x00327084, 0x0431: 0x00328884, 0x0432: 0x00328e84, 0x0433: 0x40326e20, + 0x0434: 0x00326a8a, 0x0435: 0x00325c84, 0x0436: 0x40092e20, 0x0437: 0x0032a888, + 0x0438: 0x4032a820, 0x0439: 0x00328e8a, 0x043a: 0x00328288, 0x043b: 0x40328220, + 0x043c: 0x40328c20, 0x043d: 0x00329288, 0x043e: 0x00329088, 0x043f: 0x00329488, + // Block 0x11, offset 0x440 + 0x0440: 0xe00014bd, 0x0441: 0xe00014c3, 0x0442: 0x00339688, 0x0443: 0x0033a288, + 0x0444: 0x0033c288, 0x0445: 0x0033fc88, 0x0446: 0xc02a0071, 0x0447: 0x00343688, + 0x0448: 0x00344688, 0x0449: 0x00349a88, 0x044a: 0x0034e488, 0x044b: 0x00356288, + 0x044c: 0x00356a88, 0x044d: 0xe00014cf, 0x044e: 0x00357a88, 0x044f: 0x00365488, + 0x0450: 0xc0090041, 0x0451: 0x00335288, 0x0452: 0x00335a88, 0x0453: 0xc0130092, + 0x0454: 0x00338a88, 0x0455: 0xc01800d1, 0x0456: 0xc01c0071, 0x0457: 0xc0200071, + 0x0458: 0xc0250041, 0x0459: 0x00343e88, 0x045a: 0xc0370092, 0x045b: 0x00348488, + 0x045c: 0x0034a888, 0x045d: 0x0034ba88, 0x045e: 0xc02e0071, 0x045f: 0x00350e88, + 0x0460: 0x00352888, 0x0461: 0x00353a88, 0x0462: 0x00354c88, 0x0463: 0xc03e00f1, + 0x0464: 0x0035ac88, 0x0465: 0x0035b488, 0x0466: 0x00360288, 0x0467: 0xc0440071, + 0x0468: 0x00365c88, 0x0469: 0x00366688, 0x046a: 0x00367488, 0x046b: 0xc0480071, + 0x046c: 0x00368e88, 0x046d: 0xc04c0071, 0x046e: 0x0036b888, 0x046f: 0x0036c488, + 0x0470: 0xc0060041, 0x0471: 0x40335220, 0x0472: 0x40335a20, 0x0473: 0xc0100092, + 0x0474: 0x40338a20, 0x0475: 0xc01600d1, 0x0476: 0xc01a0071, 0x0477: 0xc01e0071, + 0x0478: 0xc0220041, 0x0479: 0x40343e20, 0x047a: 0xc0340092, 0x047b: 0x40348420, + 0x047c: 0x4034a820, 0x047d: 0x4034ba20, 0x047e: 0xc02c0071, 0x047f: 0x40350e20, + // Block 0x12, offset 0x480 + 0x0480: 0x40352820, 0x0481: 0x40353a20, 0x0482: 0x40354c20, 0x0483: 0xc03a00f1, + 0x0484: 0x4035ac20, 0x0485: 0x4035b420, 0x0486: 0x40360220, 0x0487: 0xc0420071, + 0x0488: 0x40365c20, 0x0489: 0x40366620, 0x048a: 0x40367420, 0x048b: 0xc0460071, + 0x048c: 0x40368e20, 0x048d: 0xc04a0071, 0x048e: 0x4036b820, 0x048f: 0x4036c420, + 0x0490: 0xe00014ba, 0x0491: 0xe00014c0, 0x0492: 0x40339620, 0x0493: 0x4033a220, + 0x0494: 0x4033c220, 0x0495: 0x4033fc20, 0x0496: 0xc0280071, 0x0497: 0x40343620, + 0x0498: 0x40344620, 0x0499: 0x40349a20, 0x049a: 0x4034e420, 0x049b: 0x40356220, + 0x049c: 0x40356a20, 0x049d: 0xe00014cc, 0x049e: 0x40357a20, 0x049f: 0x40365420, + 0x04a0: 0x0035e088, 0x04a1: 0x4035e020, 0x04a2: 0x00369e88, 0x04a3: 0x40369e20, + 0x04a4: 0x0036ce88, 0x04a5: 0x4036ce20, 0x04a6: 0x0036d688, 0x04a7: 0x4036d620, + 0x04a8: 0x0036ea88, 0x04a9: 0x4036ea20, 0x04aa: 0x0036e088, 0x04ab: 0x4036e020, + 0x04ac: 0x0036f488, 0x04ad: 0x4036f420, 0x04ae: 0x0036fc88, 0x04af: 0x4036fc20, + 0x04b0: 0x00370488, 0x04b1: 0x40370420, 0x04b2: 0x00370c88, 0x04b3: 0x40370c20, + 0x04b4: 0xc0500131, 0x04b5: 0xc04e0131, 0x04b6: 0x00371c88, 0x04b7: 0x40371c20, + 0x04b8: 0x0035a488, 0x04b9: 0x4035a420, 0x04ba: 0x0035fa88, 0x04bb: 0x4035fa20, + 0x04bc: 0x0035f288, 0x04bd: 0x4035f220, 0x04be: 0x0035e888, 0x04bf: 0x4035e820, + // Block 0x13, offset 0x4c0 + 0x04c0: 0x00352088, 0x04c1: 0x40352020, 0x04c2: 0x40070620, 0x04c3: 0xae608302, + 0x04c4: 0xae605f02, 0x04c5: 0xae602a02, 0x04c6: 0xae602202, 0x04c7: 0xae605f02, + 0x04c8: 0xa0000000, 0x04c9: 0xa0000000, 0x04ca: 0x00341c88, 0x04cb: 0x40341c20, + 0x04cc: 0x00369688, 0x04cd: 0x40369620, 0x04ce: 0x00353088, 0x04cf: 0x40353020, + 0x04d0: 0xe00014b7, 0x04d1: 0xe00014b4, 0x04d2: 0x00336a88, 0x04d3: 0x40336a20, + 0x04d4: 0x00337a88, 0x04d5: 0x40337a20, 0x04d6: 0x0033dc88, 0x04d7: 0x4033dc20, + 0x04d8: 0x0033aa88, 0x04d9: 0x4033aa20, 0x04da: 0x00345888, 0x04db: 0x40345820, + 0x04dc: 0x00347888, 0x04dd: 0x40347820, 0x04de: 0x00347088, 0x04df: 0x40347020, + 0x04e0: 0x00346888, 0x04e1: 0x40346820, 0x04e2: 0x0034ca88, 0x04e3: 0x4034ca20, + 0x04e4: 0x0034dc88, 0x04e5: 0x4034dc20, 0x04e6: 0x00351888, 0x04e7: 0x40351820, + 0x04e8: 0x00372688, 0x04e9: 0x40372620, 0x04ea: 0x00354488, 0x04eb: 0x40354420, + 0x04ec: 0x00355888, 0x04ed: 0x40355820, 0x04ee: 0x00359288, 0x04ef: 0x40359220, + 0x04f0: 0x00359a88, 0x04f1: 0x40359a20, 0x04f2: 0x0035cc88, 0x04f3: 0x4035cc20, + 0x04f4: 0x00360e88, 0x04f5: 0x40360e20, 0x04f6: 0x00362a88, 0x04f7: 0x40362a20, + 0x04f8: 0x00363a88, 0x04f9: 0x40363a20, 0x04fa: 0x0035d488, 0x04fb: 0x4035d420, + 0x04fc: 0x00364488, 0x04fd: 0x40364420, 0x04fe: 0x00364c88, 0x04ff: 0x40364c20, + // Block 0x14, offset 0x500 + 0x0500: 0x00373088, 0x0501: 0xe00014c9, 0x0502: 0xe00014c6, 0x0503: 0x00346088, + 0x0504: 0x40346020, 0x0505: 0x00348e88, 0x0506: 0x40348e20, 0x0507: 0x0034d288, + 0x0508: 0x4034d220, 0x0509: 0x0034c288, 0x050a: 0x4034c220, 0x050b: 0x00363288, + 0x050c: 0x40363220, 0x050d: 0x0034b088, 0x050e: 0x4034b020, 0x050f: 0x40373020, + 0x0510: 0x00332a88, 0x0511: 0x40332a20, 0x0512: 0x00333288, 0x0513: 0x40333220, + 0x0514: 0x00334a88, 0x0515: 0x40334a20, 0x0516: 0x0033ba88, 0x0517: 0x4033ba20, + 0x0518: 0xc00e0071, 0x0519: 0xc00c0071, 0x051a: 0x00334288, 0x051b: 0x40334220, + 0x051c: 0x0033d488, 0x051d: 0x4033d420, 0x051e: 0x0033f288, 0x051f: 0x4033f220, + 0x0520: 0x00340688, 0x0521: 0x40340620, 0x0522: 0xe00014d5, 0x0523: 0xe00014d2, + 0x0524: 0x00342488, 0x0525: 0x40342420, 0x0526: 0x0034f688, 0x0527: 0x4034f620, + 0x0528: 0xc0320071, 0x0529: 0xc0300071, 0x052a: 0x00350688, 0x052b: 0x40350620, + 0x052c: 0x0036b088, 0x052d: 0x4036b020, 0x052e: 0xe00014de, 0x052f: 0xe00014db, + 0x0530: 0x00358288, 0x0531: 0x40358220, 0x0532: 0x00358a88, 0x0533: 0x40358a20, + 0x0534: 0x00362288, 0x0535: 0x40362220, 0x0536: 0x00338288, 0x0537: 0x40338220, + 0x0538: 0x00368688, 0x0539: 0x40368620, 0x053a: 0x00337288, 0x053b: 0x40337220, + 0x053c: 0x0035bc88, 0x053d: 0x4035bc20, 0x053e: 0x0035c488, 0x053f: 0x4035c420, + // Block 0x15, offset 0x540 + 0x0540: 0x00339288, 0x0541: 0x40339220, 0x0542: 0x0033a088, 0x0543: 0x4033a020, + 0x0544: 0x0033ee88, 0x0545: 0x4033ee20, 0x0546: 0x00341088, 0x0547: 0x40341020, + 0x0548: 0x0034a488, 0x0549: 0x4034a420, 0x054a: 0x0034ec88, 0x054b: 0x4034ec20, + 0x054c: 0x00354288, 0x054d: 0x40354220, 0x054e: 0x00355688, 0x054f: 0x40355620, + 0x0550: 0x0033f088, 0x0551: 0x4033f020, 0x0552: 0x00349688, 0x0553: 0x40349620, + 0x0554: 0x0034a688, 0x0555: 0x4034a620, 0x0556: 0x00353888, 0x0557: 0x40353820, + 0x0558: 0x0036cc88, 0x0559: 0x4036cc20, 0x055a: 0x00348288, 0x055b: 0x40348220, + 0x055c: 0x00372e88, 0x055d: 0x40372e20, 0x055e: 0x00348088, 0x055f: 0x40348020, + 0x0560: 0x00349888, 0x0561: 0x40349820, 0x0562: 0x0034da88, 0x0563: 0x4034da20, + 0x0564: 0x00351688, 0x0565: 0x40351620, 0x0566: 0x0035dc88, 0x0567: 0x4035dc20, + 0x0571: 0x00384288, 0x0572: 0x00384488, 0x0573: 0x00384688, + 0x0574: 0x00384888, 0x0575: 0x00384a88, 0x0576: 0x00384c88, 0x0577: 0x00384e88, + 0x0578: 0x00385088, 0x0579: 0x00385288, 0x057a: 0x00385488, 0x057b: 0x00385688, + 0x057c: 0x00385888, 0x057d: 0x00385a88, 0x057e: 0x00385c88, 0x057f: 0x00385e88, + // Block 0x16, offset 0x580 + 0x0580: 0x00386088, 0x0581: 0x00386288, 0x0582: 0x00386488, 0x0583: 0x00386688, + 0x0584: 0x00386888, 0x0585: 0x00386a88, 0x0586: 0x00386c88, 0x0587: 0x00386e88, + 0x0588: 0x00387088, 0x0589: 0x00387288, 0x058a: 0x00387488, 0x058b: 0x00387688, + 0x058c: 0x00387888, 0x058d: 0x00387a88, 0x058e: 0x00387c88, 0x058f: 0x00387e88, + 0x0590: 0x00388088, 0x0591: 0x00388288, 0x0592: 0x00388488, 0x0593: 0x00388688, + 0x0594: 0x00388888, 0x0595: 0x00388a88, 0x0596: 0x00388c88, + 0x0599: 0x40388e20, 0x059a: 0x40054e20, 0x059b: 0x40055020, + 0x059c: 0x4002be20, 0x059d: 0x40024620, 0x059e: 0x4002ca20, 0x059f: 0x40055220, + 0x05a1: 0x40384220, 0x05a2: 0x40384420, 0x05a3: 0x40384620, + 0x05a4: 0x40384820, 0x05a5: 0x40384a20, 0x05a6: 0x40384c20, 0x05a7: 0x40384e20, + 0x05a8: 0x40385020, 0x05a9: 0x40385220, 0x05aa: 0x40385420, 0x05ab: 0x40385620, + 0x05ac: 0x40385820, 0x05ad: 0x40385a20, 0x05ae: 0x40385c20, 0x05af: 0x40385e20, + 0x05b0: 0x40386020, 0x05b1: 0x40386220, 0x05b2: 0x40386420, 0x05b3: 0x40386620, + 0x05b4: 0x40386820, 0x05b5: 0x40386a20, 0x05b6: 0x40386c20, 0x05b7: 0x40386e20, + 0x05b8: 0x40387020, 0x05b9: 0x40387220, 0x05ba: 0x40387420, 0x05bb: 0x40387620, + 0x05bc: 0x40387820, 0x05bd: 0x40387a20, 0x05be: 0x40387c20, 0x05bf: 0x40387e20, + // Block 0x17, offset 0x5c0 + 0x05c0: 0x40388020, 0x05c1: 0x40388220, 0x05c2: 0x40388420, 0x05c3: 0x40388620, + 0x05c4: 0x40388820, 0x05c5: 0x40388a20, 0x05c6: 0x40388c20, 0x05c7: 0xf0000404, + 0x05c9: 0x40026e20, 0x05ca: 0x40021c20, + 0x05cf: 0x4027e420, + 0x05d1: 0xadc00000, 0x05d2: 0xae600000, 0x05d3: 0xae600000, + 0x05d4: 0xae600000, 0x05d5: 0xae600000, 0x05d6: 0xadc00000, 0x05d7: 0xae600000, + 0x05d8: 0xae600000, 0x05d9: 0xae600000, 0x05da: 0xade00000, 0x05db: 0xadc00000, + 0x05dc: 0xae600000, 0x05dd: 0xae600000, 0x05de: 0xae600000, 0x05df: 0xae600000, + 0x05e0: 0xae600000, 0x05e1: 0xae600000, 0x05e2: 0xadc00000, 0x05e3: 0xadc00000, + 0x05e4: 0xadc00000, 0x05e5: 0xadc00000, 0x05e6: 0xadc00000, 0x05e7: 0xadc00000, + 0x05e8: 0xae600000, 0x05e9: 0xae600000, 0x05ea: 0xadc00000, 0x05eb: 0xae600000, + 0x05ec: 0xae600000, 0x05ed: 0xade00000, 0x05ee: 0xae400000, 0x05ef: 0xae600000, + 0x05f0: 0xa0a08502, 0x05f1: 0xa0b08602, 0x05f2: 0xa0c08702, 0x05f3: 0xa0d08802, + 0x05f4: 0xa0e08902, 0x05f5: 0xa0f08a02, 0x05f6: 0xa1008b02, 0x05f7: 0xa1108c02, + 0x05f8: 0xa1208d02, 0x05f9: 0xa1308e02, 0x05fa: 0xa1308e02, 0x05fb: 0xa1408f02, + 0x05fc: 0xa1509202, 0x05fd: 0xa1600000, 0x05fe: 0x40055420, 0x05ff: 0xa1709502, + // Block 0x18, offset 0x600 + 0x0600: 0x40055620, 0x0601: 0xa1809102, 0x0602: 0xa1909002, 0x0603: 0x40055820, + 0x0604: 0xae600000, 0x0605: 0xadc00000, 0x0606: 0x40055a20, 0x0607: 0xa1208d02, + 0x0610: 0x40389020, 0x0611: 0x40389220, 0x0612: 0x40389420, 0x0613: 0x40389620, + 0x0614: 0x40389820, 0x0615: 0x40389a20, 0x0616: 0x40389c20, 0x0617: 0x40389e20, + 0x0618: 0x4038a020, 0x0619: 0x4038a220, 0x061a: 0x0038a499, 0x061b: 0x4038a420, + 0x061c: 0x4038a620, 0x061d: 0x0038a899, 0x061e: 0x4038a820, 0x061f: 0x0038aa99, + 0x0620: 0x4038aa20, 0x0621: 0x4038ac20, 0x0622: 0x4038ae20, 0x0623: 0x0038b099, + 0x0624: 0x4038b020, 0x0625: 0x0038b299, 0x0626: 0x4038b220, 0x0627: 0x4038b420, + 0x0628: 0x4038b620, 0x0629: 0x4038b820, 0x062a: 0x4038ba20, + 0x0630: 0xe00014ff, 0x0631: 0xe0001502, 0x0632: 0xe0001511, 0x0633: 0x40055c20, + 0x0634: 0x40055e20, + // Block 0x19, offset 0x640 + 0x0640: 0xa0000000, 0x0641: 0xa0000000, 0x0642: 0xa0000000, 0x0643: 0xa0000000, + 0x0644: 0xa0000000, 0x0646: 0x40096620, 0x0647: 0x40096a20, + 0x0648: 0x40070820, 0x0649: 0x4004f220, 0x064a: 0x4004f620, 0x064b: 0x4027e620, + 0x064c: 0x40024820, 0x064d: 0x40024a20, 0x064e: 0x40070e20, 0x064f: 0x40071020, + 0x0650: 0xae600000, 0x0651: 0xae600000, 0x0652: 0xae600000, 0x0653: 0xae600000, + 0x0654: 0xae600000, 0x0655: 0xae600000, 0x0656: 0xae600000, 0x0657: 0xae600000, + 0x0658: 0xa1e00000, 0x0659: 0xa1f00000, 0x065a: 0xa2000000, 0x065b: 0x40026420, + 0x065e: 0x40027020, 0x065f: 0x4002cc20, + 0x0660: 0x403aa220, 0x0661: 0x40391c20, 0x0662: 0x40391e20, 0x0663: 0x40392020, + 0x0664: 0x40392620, 0x0665: 0x40392820, 0x0666: 0x40393020, 0x0667: 0xc0520151, + 0x0668: 0x40393c20, 0x0669: 0x40395420, 0x066a: 0x40395620, 0x066b: 0x40395820, + 0x066c: 0x40396420, 0x066d: 0x40397220, 0x066e: 0x40397420, 0x066f: 0x40398820, + 0x0670: 0x40398a20, 0x0671: 0x4039a420, 0x0672: 0x4039a620, 0x0673: 0x4039c620, + 0x0674: 0x4039c820, 0x0675: 0x4039dc20, 0x0676: 0x4039de20, 0x0677: 0x4039e620, + 0x0678: 0x4039e820, 0x0679: 0x4039ee20, 0x067a: 0x4039f020, 0x067b: 0x403a3820, + 0x067c: 0x403a3a20, 0x067d: 0x403a9c20, 0x067e: 0x403a9e20, 0x067f: 0x403aa020, + // Block 0x1a, offset 0x680 + 0x0680: 0xa0000000, 0x0681: 0x4039fc20, 0x0682: 0x403a1220, 0x0683: 0x403a1a20, + 0x0684: 0x403a4020, 0x0685: 0x403a4e20, 0x0686: 0x403a5620, 0x0687: 0x403a6820, + 0x0688: 0xc0560171, 0x0689: 0x403a8e20, 0x068a: 0xc0580171, 0x068b: 0xa1b0a202, + 0x068c: 0xa1c0a502, 0x068d: 0xa1d0a902, 0x068e: 0xa1e0ad02, 0x068f: 0xa1f0b202, + 0x0690: 0xa200b602, 0x0691: 0xa210ba02, 0x0692: 0xa220bc02, 0x0693: 0xae60bd02, + 0x0694: 0xae60be02, 0x0695: 0xadc0bf02, 0x0696: 0xadc0c102, 0x0697: 0xae60c202, + 0x0698: 0xae60c302, 0x0699: 0xae60c402, 0x069a: 0xae60c502, 0x069b: 0xae60c602, + 0x069c: 0xadc0c702, 0x069d: 0xae60c802, 0x069e: 0xae60c902, 0x069f: 0xadc0c002, + 0x06a0: 0xe000015e, 0x06a1: 0xe00001e6, 0x06a2: 0xe0000301, 0x06a3: 0xe00003db, + 0x06a4: 0xe00004b6, 0x06a5: 0xe0000580, 0x06a6: 0xe000064b, 0x06a7: 0xe00006f3, + 0x06a8: 0xe000079f, 0x06a9: 0xe0000844, 0x06aa: 0x4004ee20, 0x06ab: 0x40024c20, + 0x06ac: 0x40024e20, 0x06ad: 0x4004de20, 0x06ae: 0x40393a20, 0x06af: 0x403a1020, + 0x06b0: 0xa230d102, 0x06b1: 0x40392420, 0x06b2: 0x40392220, 0x06b3: 0x40392a20, + 0x06b4: 0x00391c84, 0x06b5: 0xf0000404, 0x06b6: 0xf0000404, 0x06b7: 0xf0000404, + 0x06b8: 0xf0000404, 0x06b9: 0x40395a20, 0x06ba: 0x40395c20, 0x06bb: 0x40393e20, + 0x06bc: 0x40395e20, 0x06bd: 0x40396020, 0x06be: 0x40394020, 0x06bf: 0x40396220, + // Block 0x1b, offset 0x6c0 + 0x06c0: 0x40394220, 0x06c1: 0x40397620, 0x06c2: 0x40397820, 0x06c3: 0x40396620, + 0x06c4: 0x40396820, 0x06c5: 0x40397a20, 0x06c6: 0x40396a20, 0x06c7: 0x40396e20, + 0x06c8: 0x40398c20, 0x06c9: 0x40398e20, 0x06ca: 0x40399020, 0x06cb: 0x40399220, + 0x06cc: 0x40399420, 0x06cd: 0x40399620, 0x06ce: 0x40399820, 0x06cf: 0x40399a20, + 0x06d0: 0x40399c20, 0x06d1: 0x4039a820, 0x06d2: 0x4039aa20, 0x06d3: 0x4039ac20, + 0x06d4: 0x4039ae20, 0x06d5: 0x4039b020, 0x06d6: 0x4039b220, 0x06d7: 0x4039b420, + 0x06d8: 0x4039b620, 0x06d9: 0x4039b820, 0x06da: 0x4039ca20, 0x06db: 0x4039cc20, + 0x06dc: 0x4039ce20, 0x06dd: 0x4039e020, 0x06de: 0x4039e220, 0x06df: 0x4039ea20, + 0x06e0: 0x4039f220, 0x06e1: 0x4039fe20, 0x06e2: 0x403a0020, 0x06e3: 0x403a0220, + 0x06e4: 0x403a0420, 0x06e5: 0x403a0820, 0x06e6: 0x403a0a20, 0x06e7: 0x403a1420, + 0x06e8: 0x403a1620, 0x06e9: 0x403a1c20, 0x06ea: 0x403a1e20, 0x06eb: 0x403a2020, + 0x06ec: 0x403a2220, 0x06ed: 0x403a2620, 0x06ee: 0x403a2820, 0x06ef: 0x403a2a20, + 0x06f0: 0x403a2c20, 0x06f1: 0x403a2e20, 0x06f2: 0x403a3020, 0x06f3: 0x403a3220, + 0x06f4: 0x403a3420, 0x06f5: 0x403a4220, 0x06f6: 0x403a4420, 0x06f7: 0x403a4620, + 0x06f8: 0x403a4820, 0x06f9: 0x403a6020, 0x06fa: 0x403a5820, 0x06fb: 0x403a5a20, + 0x06fc: 0x403a5c20, 0x06fd: 0x403a5e20, 0x06fe: 0x403a6a20, 0x06ff: 0x40396c20, + // Block 0x1c, offset 0x700 + 0x0700: 0xe00017e4, 0x0701: 0x403a6c20, 0x0702: 0xe00017e1, 0x0703: 0x403a6e20, + 0x0704: 0x403a7620, 0x0705: 0x403a7820, 0x0706: 0x403a7a20, 0x0707: 0x403a7c20, + 0x0708: 0x403a7e20, 0x0709: 0x403a8020, 0x070a: 0x403a8220, 0x070b: 0x403a8420, + 0x070c: 0x403a9220, 0x070d: 0x403a9420, 0x070e: 0x403a9620, 0x070f: 0x403a8620, + 0x0710: 0x403a9820, 0x0711: 0x403a9a20, 0x0712: 0x403aaa20, 0x0713: 0xe0001800, + 0x0714: 0x4002e820, 0x0715: 0x403a7220, 0x0716: 0xae600000, 0x0717: 0xae600000, + 0x0718: 0xae600000, 0x0719: 0xae600000, 0x071a: 0xae600000, 0x071b: 0xae600000, + 0x071c: 0xae600000, 0x071d: 0xa0000000, 0x071e: 0x40071220, 0x071f: 0xae600000, + 0x0720: 0xae600000, 0x0721: 0xae600000, 0x0722: 0xae600000, 0x0723: 0xadc00000, + 0x0724: 0xae600000, 0x0725: 0x003a7484, 0x0726: 0x003a9084, 0x0727: 0xae600000, + 0x0728: 0xae600000, 0x0729: 0x40071420, 0x072a: 0xadc00000, 0x072b: 0xae600000, + 0x072c: 0xae600000, 0x072d: 0xadc00000, 0x072e: 0x40399e20, 0x072f: 0x4039ba20, + 0x0730: 0xe0000161, 0x0731: 0xe00001e9, 0x0732: 0xe0000304, 0x0733: 0xe00003de, + 0x0734: 0xe00004b9, 0x0735: 0xe0000583, 0x0736: 0xe000064e, 0x0737: 0xe00006f6, + 0x0738: 0xe00007a2, 0x0739: 0xe0000847, 0x073a: 0x4039d020, 0x073b: 0x4039e420, + 0x073c: 0x4039f420, 0x073d: 0xe0001553, 0x073e: 0xe0001779, 0x073f: 0x403a7020, + // Block 0x1d, offset 0x740 + 0x0740: 0x40035c20, 0x0741: 0x4002ea20, 0x0742: 0x4002ec20, 0x0743: 0x40027220, + 0x0744: 0x40027420, 0x0745: 0x40027620, 0x0746: 0x40027820, 0x0747: 0x40027a20, + 0x0748: 0x40027c20, 0x0749: 0x4002ce20, 0x074a: 0x40056020, 0x074b: 0x40056220, + 0x074c: 0x40056420, 0x074d: 0x40056620, 0x074f: 0xa0000000, + 0x0750: 0x403ab020, 0x0751: 0xa240d202, 0x0752: 0x403ab220, 0x0753: 0x403ab420, + 0x0754: 0xe0001806, 0x0755: 0x403ab820, 0x0756: 0x403ab620, 0x0757: 0x403aba20, + 0x0758: 0x403abc20, 0x0759: 0x403abe20, 0x075a: 0x403ac220, 0x075b: 0x403ac420, + 0x075c: 0xe000180f, 0x075d: 0x403ac620, 0x075e: 0x403ac820, 0x075f: 0x403aca20, + 0x0760: 0x403ace20, 0x0761: 0x403ad020, 0x0762: 0x403ad220, 0x0763: 0x403ad420, + 0x0764: 0x003ad499, 0x0765: 0x403ad620, 0x0766: 0x403ad820, 0x0767: 0xe0001812, + 0x0768: 0x403adc20, 0x0769: 0x403ade20, 0x076a: 0x403ae020, 0x076b: 0x403ae220, + 0x076c: 0x403ae420, 0x076d: 0xe0001803, 0x076e: 0xe0001809, 0x076f: 0xe000180c, + 0x0770: 0xae60d302, 0x0771: 0xadc0d402, 0x0772: 0xae60d502, 0x0773: 0xae60d602, + 0x0774: 0xadc0d702, 0x0775: 0xae60d802, 0x0776: 0xae60d902, 0x0777: 0xadc0da02, + 0x0778: 0xadc0db02, 0x0779: 0xadc0dc02, 0x077a: 0xae60dd02, 0x077b: 0xadc0de02, + 0x077c: 0xadc0df02, 0x077d: 0xae60e002, 0x077e: 0xadc0e102, 0x077f: 0xae60e202, + // Block 0x1e, offset 0x780 + 0x0780: 0xae600000, 0x0781: 0xae605f02, 0x0782: 0xadc06002, 0x0783: 0xae600000, + 0x0784: 0xadc00000, 0x0785: 0xae605f02, 0x0786: 0xadc06002, 0x0787: 0xae600000, + 0x0788: 0xadc00000, 0x0789: 0xae600000, 0x078a: 0xae600000, + 0x078d: 0x403ac020, 0x078e: 0x403acc20, 0x078f: 0x403ada20, + 0x0790: 0x40394420, 0x0791: 0x40394620, 0x0792: 0x40394820, 0x0793: 0x40394a20, + 0x0794: 0x40394c20, 0x0795: 0x40394e20, 0x0796: 0x40395220, 0x0797: 0x40397c20, + 0x0798: 0x40397e20, 0x0799: 0x4039a020, 0x079a: 0x4039a220, 0x079b: 0x4039bc20, + 0x079c: 0x4039d220, 0x079d: 0x4039f620, 0x079e: 0x4039f820, 0x079f: 0x4039fa20, + 0x07a0: 0x403a0c20, 0x07a1: 0x403a0e20, 0x07a2: 0x403a3620, 0x07a3: 0x403a3c20, + 0x07a4: 0x403a3e20, 0x07a5: 0x403a5020, 0x07a6: 0x403a5220, 0x07a7: 0x403a6220, + 0x07a8: 0x403a6420, 0x07a9: 0x403a6620, 0x07aa: 0x403a4a20, 0x07ab: 0x4039be20, + 0x07ac: 0x4039c020, 0x07ad: 0x4039d420, 0x07ae: 0x40398020, 0x07af: 0x40398220, + 0x07b0: 0x4039d620, 0x07b1: 0x4039c220, 0x07b2: 0x40398420, 0x07b3: 0x40392c20, + 0x07b4: 0x40392e20, 0x07b5: 0x403aa420, 0x07b6: 0x403aa620, 0x07b7: 0x403aa820, + 0x07b8: 0x403a8820, 0x07b9: 0x403a8a20, 0x07ba: 0x403aac20, 0x07bb: 0x403aae20, + 0x07bc: 0x40398620, 0x07bd: 0x4039d820, 0x07be: 0x4039da20, 0x07bf: 0x403a2420, + // Block 0x1f, offset 0x7c0 + 0x07c0: 0x403b1820, 0x07c1: 0x403b1e20, 0x07c2: 0x403b2020, 0x07c3: 0x403b2220, + 0x07c4: 0x403b2620, 0x07c5: 0x403b2820, 0x07c6: 0x403b2a20, 0x07c7: 0x403b2c20, + 0x07c8: 0x403b3220, 0x07c9: 0x403b3620, 0x07ca: 0x403b3820, 0x07cb: 0x403b3a20, + 0x07cc: 0x403b3e20, 0x07cd: 0x403b4620, 0x07ce: 0x403b4820, 0x07cf: 0x403b4c20, + 0x07d0: 0x403b4e20, 0x07d1: 0x403b5620, 0x07d2: 0x403b5820, 0x07d3: 0x403b5a20, + 0x07d4: 0x403b5c20, 0x07d5: 0x403b5e20, 0x07d6: 0x403b6020, 0x07d7: 0x403b6220, + 0x07d8: 0x403b4020, 0x07d9: 0x403b1a20, 0x07da: 0x403b1c20, 0x07db: 0x403b3c20, + 0x07dc: 0x403b2420, 0x07dd: 0x403b5020, 0x07de: 0x403b5220, 0x07df: 0x403b5420, + 0x07e0: 0x403b4220, 0x07e1: 0x403b4420, 0x07e2: 0x403b2e20, 0x07e3: 0x403b3020, + 0x07e4: 0x403b4a20, 0x07e5: 0x403b3420, 0x07e6: 0x403b6620, 0x07e7: 0x403b6820, + 0x07e8: 0x403b6a20, 0x07e9: 0x403b6c20, 0x07ea: 0x403b6e20, 0x07eb: 0x403b7020, + 0x07ec: 0x403b7220, 0x07ed: 0x403b7420, 0x07ee: 0x403b7620, 0x07ef: 0x403b7820, + 0x07f0: 0x403b7a20, 0x07f1: 0x403b6420, + // Block 0x20, offset 0x800 + 0x0800: 0xe0000164, 0x0801: 0xe00001ef, 0x0802: 0xe000030a, 0x0803: 0xe00003e4, + 0x0804: 0xe00004bf, 0x0805: 0xe0000589, 0x0806: 0xe0000654, 0x0807: 0xe00006fc, + 0x0808: 0xe00007a8, 0x0809: 0xe000084d, 0x080a: 0x403b7c20, 0x080b: 0x403b7e20, + 0x080c: 0x403b8020, 0x080d: 0x403b8220, 0x080e: 0x403b8420, 0x080f: 0x403b8620, + 0x0810: 0x403b8820, 0x0811: 0x403b8a20, 0x0812: 0x403b8c20, 0x0813: 0x403b8e20, + 0x0814: 0x403b9020, 0x0815: 0x403b9220, 0x0816: 0x403b9420, 0x0817: 0x403b9620, + 0x0818: 0x403b9820, 0x0819: 0x403b9a20, 0x081a: 0x403b9c20, 0x081b: 0x403b9e20, + 0x081c: 0x403ba020, 0x081d: 0x403ba220, 0x081e: 0x403ba420, 0x081f: 0x403ba620, + 0x0820: 0x403ba820, 0x0821: 0x403baa20, 0x0822: 0x403bac20, 0x0823: 0x403bae20, + 0x0824: 0x403bb020, 0x0825: 0x403bb220, 0x0826: 0x403bb420, 0x0827: 0x403bb620, + 0x0828: 0xe0001815, 0x0829: 0xe0001818, 0x082a: 0xe000181b, 0x082b: 0xae60e302, + 0x082c: 0xae60e402, 0x082d: 0xae60e502, 0x082e: 0xae60e602, 0x082f: 0xae60e702, + 0x0830: 0xae60e802, 0x0831: 0xae60e902, 0x0832: 0xadc0ea02, 0x0833: 0xae60eb02, + 0x0834: 0x403bb820, 0x0835: 0x403bba20, 0x0836: 0x40073820, 0x0837: 0x40035e20, + 0x0838: 0x40025020, 0x0839: 0x4002c020, 0x083a: 0xa0000000, + // Block 0x21, offset 0x840 + 0x0840: 0x4038e820, 0x0841: 0x4038ea20, 0x0842: 0x4038ec20, 0x0843: 0x4038ee20, + 0x0844: 0x4038f020, 0x0845: 0x4038f220, 0x0846: 0x4038f420, 0x0847: 0x4038f620, + 0x0848: 0x4038f820, 0x0849: 0x4038fa20, 0x084a: 0x4038fc20, 0x084b: 0x4038fe20, + 0x084c: 0x40390020, 0x084d: 0x40390220, 0x084e: 0x40390420, 0x084f: 0x40390620, + 0x0850: 0x40390820, 0x0851: 0x40390a20, 0x0852: 0x40390c20, 0x0853: 0x40390e20, + 0x0854: 0x40391020, 0x0855: 0x40391220, 0x0856: 0x82e61c8a, 0x0857: 0x82e61c8b, + 0x0858: 0xae609f02, 0x0859: 0xae60a002, 0x085a: 0x40391820, 0x085b: 0x82e61c8d, + 0x085c: 0xae609702, 0x085d: 0xae609702, 0x085e: 0xae609802, 0x085f: 0xae609802, + 0x0860: 0xae609802, 0x0861: 0xae609902, 0x0862: 0xae609902, 0x0863: 0xae609902, + 0x0864: 0xa0009a02, 0x0865: 0xae609a02, 0x0866: 0xae609b02, 0x0867: 0xae609b02, + 0x0868: 0xa0009c02, 0x0869: 0xae609c02, 0x086a: 0xae609c02, 0x086b: 0xae609d02, + 0x086c: 0xae609e02, 0x086d: 0xae60a102, + 0x0870: 0x40027e20, 0x0871: 0x40028020, 0x0872: 0x40028220, 0x0873: 0x40028420, + 0x0874: 0x40028620, 0x0875: 0x40028820, 0x0876: 0x40028a20, 0x0877: 0x40028c20, + 0x0878: 0x40028e20, 0x0879: 0x40029020, 0x087a: 0x40029220, 0x087b: 0x40029420, + 0x087c: 0x40029620, 0x087d: 0x40029820, 0x087e: 0x40029a20, + // Block 0x22, offset 0x880 + 0x0880: 0x403ae620, 0x0881: 0x403ae820, 0x0882: 0x403aea20, 0x0883: 0x403aec20, + 0x0884: 0x403aee20, 0x0885: 0x403af020, 0x0886: 0x403af220, 0x0887: 0x403af420, + 0x0888: 0x403af620, 0x0889: 0x403af820, 0x088a: 0x403afa20, 0x088b: 0x403afc20, + 0x088c: 0x403afe20, 0x088d: 0x403b0020, 0x088e: 0x403b0220, 0x088f: 0x403b0420, + 0x0890: 0x403b0620, 0x0891: 0x403b0820, 0x0892: 0x403b0a20, 0x0893: 0x403b0c20, + 0x0894: 0x403b0e20, 0x0895: 0x403b1020, 0x0896: 0x403b1220, 0x0897: 0x403b1420, + 0x0898: 0x403b1620, 0x0899: 0xadc06002, 0x089a: 0xadc06002, 0x089b: 0xadc06002, + 0x089e: 0x40056820, + // Block 0x23, offset 0x8c0 + 0x08e0: 0x40395020, 0x08e2: 0x40397020, 0x08e3: 0x4039ec20, + 0x08e4: 0x403a0620, 0x08e5: 0x403a1820, 0x08e6: 0x403a4c20, 0x08e7: 0x403a5420, + 0x08e8: 0x40393220, 0x08e9: 0x40393420, 0x08ea: 0x4039c420, 0x08eb: 0x403a8c20, + 0x08ec: 0x40393620, + // Block 0x24, offset 0x900 + 0x0924: 0xae60af02, 0x0925: 0xae60b402, 0x0926: 0xadc0b802, 0x0927: 0xae60a402, + 0x0928: 0xae60a802, 0x0929: 0xadc0ac02, 0x092a: 0xae600000, 0x092b: 0xae600000, + 0x092c: 0xae600000, 0x092d: 0xadc00000, 0x092e: 0xadc00000, 0x092f: 0xadc00000, + 0x0930: 0xa1b0a302, 0x0931: 0xa1c0a702, 0x0932: 0xa1d0ab02, 0x0933: 0xae600000, + 0x0934: 0xae60b002, 0x0935: 0xae60b102, 0x0936: 0xadc0b902, 0x0937: 0xae60ca02, + 0x0938: 0xae60cb02, 0x0939: 0xadc0cf02, 0x093a: 0xadc0d002, 0x093b: 0xae60cd02, + 0x093c: 0xae60ce02, 0x093d: 0xae60cc02, 0x093e: 0xae60b502, + // Block 0x25, offset 0x940 + 0x0940: 0xa000f202, 0x0941: 0xa000f202, 0x0942: 0xa000f302, 0x0943: 0xa000f402, + 0x0944: 0x403fbc20, 0x0945: 0x403fbe20, 0x0946: 0x403fc020, 0x0947: 0x403fcc20, + 0x0948: 0x403fce20, 0x0949: 0x403fd020, 0x094a: 0x403fd220, 0x094b: 0x403fd420, + 0x094c: 0x403fd820, 0x094d: 0x403fdc20, 0x094e: 0x403fde20, 0x094f: 0x403fe020, + 0x0950: 0x403fe220, 0x0951: 0x403fe420, 0x0952: 0x403fe620, 0x0953: 0x403fe820, + 0x0954: 0x403fea20, 0x0955: 0x403fec20, 0x0956: 0x403fee20, 0x0957: 0x403ff020, + 0x0958: 0x403ff420, 0x0959: 0x403ff620, 0x095a: 0x403ff820, 0x095b: 0x403ffa20, + 0x095c: 0x403ffc20, 0x095d: 0x40400220, 0x095e: 0x40400420, 0x095f: 0x40400620, + 0x0960: 0x40400820, 0x0961: 0x40400a20, 0x0962: 0x40400e20, 0x0963: 0x40401020, + 0x0964: 0x40401220, 0x0965: 0x40401420, 0x0966: 0x40401620, 0x0967: 0x40401820, + 0x0968: 0x40401a20, 0x0969: 0xe0001830, 0x096a: 0x40401c20, 0x096b: 0x40401e20, + 0x096c: 0x40402020, 0x096d: 0x40402420, 0x096e: 0x40402620, 0x096f: 0x40402820, + 0x0970: 0x40402c20, 0x0971: 0xe0001839, 0x0972: 0x40402e20, 0x0973: 0x40403020, + 0x0974: 0xe000183c, 0x0975: 0x40403220, 0x0976: 0x40403420, 0x0977: 0x40403620, + 0x0978: 0x40403820, 0x0979: 0x40403a20, 0x097a: 0x40404c20, 0x097b: 0x40404e20, + 0x097c: 0xa070f102, 0x097d: 0x40403c20, 0x097e: 0x40404a20, 0x097f: 0x40405620, + // Block 0x26, offset 0x980 + 0x0980: 0x40405820, 0x0981: 0x40405a20, 0x0982: 0x40405c20, 0x0983: 0x40405e20, + 0x0984: 0x40406020, 0x0985: 0x40406620, 0x0986: 0x40406a20, 0x0987: 0x40406c20, + 0x0988: 0x40407020, 0x0989: 0x40407220, 0x098a: 0x40407420, 0x098b: 0x40407620, + 0x098c: 0x40407820, 0x098d: 0x8209203d, 0x098e: 0x40406e20, 0x098f: 0x40405020, + 0x0990: 0x403fb820, 0x0991: 0xae600000, 0x0992: 0xadc00000, 0x0993: 0xae603502, + 0x0994: 0xae603202, 0x0995: 0x40406820, 0x0996: 0x40405220, 0x0997: 0x40405420, + 0x0998: 0xe000181e, 0x0999: 0xe0001821, 0x099a: 0xe0001824, 0x099b: 0xe0001827, + 0x099c: 0xe000182a, 0x099d: 0xe000182d, 0x099e: 0xe0001833, 0x099f: 0xe0001836, + 0x09a0: 0x403fd620, 0x09a1: 0x403fda20, 0x09a2: 0x40406220, 0x09a3: 0x40406420, + 0x09a4: 0x40030c20, 0x09a5: 0x40030e20, 0x09a6: 0xe000016a, 0x09a7: 0xe00001f8, + 0x09a8: 0xe0000313, 0x09a9: 0xe00003ed, 0x09aa: 0xe00004c8, 0x09ab: 0xe0000592, + 0x09ac: 0xe000065d, 0x09ad: 0xe0000705, 0x09ae: 0xe00007b1, 0x09af: 0xe0000856, + 0x09b0: 0x40056c20, 0x09b1: 0x4027b620, 0x09b2: 0x403fba20, 0x09b3: 0x403fc220, + 0x09b4: 0x403fc420, 0x09b5: 0x403fc620, 0x09b6: 0x403fc820, 0x09b7: 0x403fca20, + 0x09b9: 0x403ffe20, 0x09ba: 0x40402a20, 0x09bb: 0x403ff220, + 0x09bc: 0x40400020, 0x09bd: 0x40403e20, 0x09be: 0x40400c20, 0x09bf: 0x40402220, + // Block 0x27, offset 0x9c0 + 0x09c1: 0xa000f202, 0x09c2: 0xa000f302, 0x09c3: 0xa000f402, + 0x09c5: 0x40407c20, 0x09c6: 0x40407e20, 0x09c7: 0x40408020, + 0x09c8: 0x40408220, 0x09c9: 0x40408420, 0x09ca: 0x40408620, 0x09cb: 0x40408820, + 0x09cc: 0x40408c20, 0x09cf: 0x40409020, + 0x09d0: 0x40409220, 0x09d3: 0x40409420, + 0x09d4: 0x40409620, 0x09d5: 0x40409820, 0x09d6: 0x40409a20, 0x09d7: 0x40409c20, + 0x09d8: 0x40409e20, 0x09d9: 0x4040a020, 0x09da: 0x4040a220, 0x09db: 0x4040a420, + 0x09dc: 0x4040a620, 0x09dd: 0x4040a820, 0x09de: 0x4040aa20, 0x09df: 0x4040ac20, + 0x09e0: 0x4040ae20, 0x09e1: 0x4040b020, 0x09e2: 0x4040b220, 0x09e3: 0x4040b420, + 0x09e4: 0x4040b620, 0x09e5: 0x4040b820, 0x09e6: 0x4040ba20, 0x09e7: 0x4040bc20, + 0x09e8: 0x4040be20, 0x09ea: 0x4040c020, 0x09eb: 0x4040c220, + 0x09ec: 0x4040c420, 0x09ed: 0x4040c620, 0x09ee: 0x4040c820, 0x09ef: 0x4040ca20, + 0x09f0: 0x4040cc20, 0x09f2: 0x4040d020, + 0x09f6: 0x4040d420, 0x09f7: 0x4040d620, + 0x09f8: 0x4040d820, 0x09f9: 0x4040da20, + 0x09fc: 0xa070f102, 0x09fd: 0x4040dc20, 0x09fe: 0x4040de20, 0x09ff: 0x4040e020, + // Block 0x28, offset 0xa00 + 0x0a00: 0x4040e220, 0x0a01: 0x4040e420, 0x0a02: 0x4040e620, 0x0a03: 0x4040e820, + 0x0a04: 0x4040ea20, 0x0a07: 0xc05a0191, + 0x0a08: 0x4040f220, 0x0a0b: 0x4040f420, + 0x0a0c: 0x4040f620, 0x0a0d: 0x8209207c, 0x0a0e: 0xe0001845, + 0x0a17: 0x4040fa20, + 0x0a1c: 0xe000183f, 0x0a1d: 0xe0001842, 0x0a1f: 0xe0001848, + 0x0a20: 0x40408a20, 0x0a21: 0x40408e20, 0x0a22: 0x4040ec20, 0x0a23: 0x4040ee20, + 0x0a26: 0xe000016d, 0x0a27: 0xe00001fb, + 0x0a28: 0xe0000316, 0x0a29: 0xe00003f0, 0x0a2a: 0xe00004cb, 0x0a2b: 0xe0000595, + 0x0a2c: 0xe0000660, 0x0a2d: 0xe0000708, 0x0a2e: 0xe00007b4, 0x0a2f: 0xe0000859, + 0x0a30: 0x4040ce20, 0x0a31: 0x4040d220, 0x0a32: 0x4027e820, 0x0a33: 0x4027ea20, + 0x0a34: 0x40283020, 0x0a35: 0x40283220, 0x0a36: 0x40283420, 0x0a37: 0x40283620, + 0x0a38: 0x40283820, 0x0a39: 0x40283a20, 0x0a3a: 0x40073a20, 0x0a3b: 0x4027ec20, + // Block 0x29, offset 0xa40 + 0x0a41: 0xa000f202, 0x0a42: 0xa000f302, 0x0a43: 0xa000f402, + 0x0a45: 0x40410620, 0x0a46: 0x40410820, 0x0a47: 0x40411020, + 0x0a48: 0x40411220, 0x0a49: 0x40410020, 0x0a4a: 0x40410220, + 0x0a4f: 0x40411420, + 0x0a50: 0x40410a20, 0x0a53: 0x40410420, + 0x0a54: 0x40410c20, 0x0a55: 0x40411c20, 0x0a56: 0x40411e20, 0x0a57: 0x40412020, + 0x0a58: 0x40412220, 0x0a59: 0x40412420, 0x0a5a: 0x40412620, 0x0a5b: 0x40412820, + 0x0a5c: 0x40412a20, 0x0a5d: 0x40412c20, 0x0a5e: 0x40412e20, 0x0a5f: 0x40413020, + 0x0a60: 0x40413220, 0x0a61: 0x40413420, 0x0a62: 0x40413620, 0x0a63: 0x40413820, + 0x0a64: 0x40413a20, 0x0a65: 0x40413c20, 0x0a66: 0x40413e20, 0x0a67: 0x40414020, + 0x0a68: 0x40414220, 0x0a6a: 0x40414420, 0x0a6b: 0x40414620, + 0x0a6c: 0x40414820, 0x0a6d: 0x40414a20, 0x0a6e: 0x40414c20, 0x0a6f: 0x40414e20, + 0x0a70: 0x40415220, 0x0a72: 0x40415420, 0x0a73: 0xe000185a, + 0x0a75: 0x40415620, 0x0a76: 0xe000184b, + 0x0a78: 0x40411620, 0x0a79: 0x40411820, + 0x0a7c: 0xa070f102, 0x0a7e: 0x40415a20, 0x0a7f: 0x40415c20, + // Block 0x2a, offset 0xa80 + 0x0a80: 0x40415e20, 0x0a81: 0x40416020, 0x0a82: 0x40416220, + 0x0a87: 0x40416420, + 0x0a88: 0x40416620, 0x0a8b: 0x40416820, + 0x0a8c: 0x40416a20, 0x0a8d: 0x820920b6, + 0x0a91: 0x40411a20, + 0x0a99: 0xe000184e, 0x0a9a: 0xe0001851, 0x0a9b: 0xe0001854, + 0x0a9c: 0x40415820, 0x0a9e: 0xe0001857, + 0x0aa6: 0xe0000170, 0x0aa7: 0xe00001fe, + 0x0aa8: 0xe0000319, 0x0aa9: 0xe00003f3, 0x0aaa: 0xe00004ce, 0x0aab: 0xe0000598, + 0x0aac: 0xe0000663, 0x0aad: 0xe000070b, 0x0aae: 0xe00007b7, 0x0aaf: 0xe000085c, + 0x0ab0: 0xa000f502, 0x0ab1: 0xa000f602, 0x0ab2: 0x40410e20, 0x0ab3: 0x4040fe20, + 0x0ab4: 0x4040fc20, 0x0ab5: 0x40415020, + // Block 0x2b, offset 0xac0 + 0x0ac1: 0xa000f202, 0x0ac2: 0xa000f302, 0x0ac3: 0xa000f402, + 0x0ac5: 0x40417020, 0x0ac6: 0x40417220, 0x0ac7: 0x40417420, + 0x0ac8: 0x40417620, 0x0ac9: 0x40417820, 0x0aca: 0x40417a20, 0x0acb: 0x40417c20, + 0x0acc: 0x40418020, 0x0acd: 0x40418420, 0x0acf: 0x40418620, + 0x0ad0: 0x40418820, 0x0ad1: 0x40418a20, 0x0ad3: 0x40418c20, + 0x0ad4: 0x40418e20, 0x0ad5: 0x40419020, 0x0ad6: 0x40419220, 0x0ad7: 0x40419420, + 0x0ad8: 0x40419620, 0x0ad9: 0x40419820, 0x0ada: 0x40419a20, 0x0adb: 0x40419c20, + 0x0adc: 0x40419e20, 0x0add: 0x4041a020, 0x0ade: 0x4041a220, 0x0adf: 0x4041a420, + 0x0ae0: 0x4041a620, 0x0ae1: 0x4041a820, 0x0ae2: 0x4041aa20, 0x0ae3: 0x4041ac20, + 0x0ae4: 0x4041ae20, 0x0ae5: 0x4041b020, 0x0ae6: 0x4041b220, 0x0ae7: 0x4041b420, + 0x0ae8: 0x4041b620, 0x0aea: 0x4041b820, 0x0aeb: 0x4041ba20, + 0x0aec: 0x4041bc20, 0x0aed: 0x4041be20, 0x0aee: 0x4041c020, 0x0aef: 0x4041c220, + 0x0af0: 0x4041c420, 0x0af2: 0x4041c620, 0x0af3: 0x4041d220, + 0x0af5: 0x4041c820, 0x0af6: 0x4041ca20, 0x0af7: 0x4041cc20, + 0x0af8: 0x4041ce20, 0x0af9: 0x4041d020, + 0x0afc: 0xa070f102, 0x0afd: 0x4041d420, 0x0afe: 0x4041d620, 0x0aff: 0x4041d820, + // Block 0x2c, offset 0xb00 + 0x0b00: 0x4041da20, 0x0b01: 0x4041dc20, 0x0b02: 0x4041de20, 0x0b03: 0x4041e020, + 0x0b04: 0x4041e220, 0x0b05: 0x4041e820, 0x0b07: 0x4041ea20, + 0x0b08: 0x4041ec20, 0x0b09: 0x4041ee20, 0x0b0b: 0x4041f020, + 0x0b0c: 0x4041f220, 0x0b0d: 0x820920fa, + 0x0b10: 0x40416e20, + 0x0b20: 0x40417e20, 0x0b21: 0x40418220, 0x0b22: 0x4041e420, 0x0b23: 0x4041e620, + 0x0b26: 0xe0000173, 0x0b27: 0xe0000201, + 0x0b28: 0xe000031c, 0x0b29: 0xe00003f6, 0x0b2a: 0xe00004d1, 0x0b2b: 0xe000059b, + 0x0b2c: 0xe0000666, 0x0b2d: 0xe000070e, 0x0b2e: 0xe00007ba, 0x0b2f: 0xe000085f, + 0x0b30: 0x40057420, 0x0b31: 0x4027ee20, + // Block 0x2d, offset 0xb40 + 0x0b41: 0xa000f202, 0x0b42: 0xa000f302, 0x0b43: 0xa000f402, + 0x0b45: 0x4041f620, 0x0b46: 0x4041f820, 0x0b47: 0x4041fa20, + 0x0b48: 0x4041fc20, 0x0b49: 0x4041fe20, 0x0b4a: 0x40420020, 0x0b4b: 0x40420220, + 0x0b4c: 0x40420620, 0x0b4f: 0x40420a20, + 0x0b50: 0x40420c20, 0x0b53: 0x40420e20, + 0x0b54: 0x40421020, 0x0b55: 0x40421220, 0x0b56: 0x40421420, 0x0b57: 0x40421620, + 0x0b58: 0x40421820, 0x0b59: 0x40421a20, 0x0b5a: 0x40421c20, 0x0b5b: 0x40421e20, + 0x0b5c: 0x40422020, 0x0b5d: 0x40422220, 0x0b5e: 0x40422420, 0x0b5f: 0x40422620, + 0x0b60: 0x40422820, 0x0b61: 0x40422a20, 0x0b62: 0x40422c20, 0x0b63: 0x40422e20, + 0x0b64: 0x40423020, 0x0b65: 0x40423220, 0x0b66: 0x40423420, 0x0b67: 0x40423620, + 0x0b68: 0x40423820, 0x0b6a: 0x40423a20, 0x0b6b: 0x40423c20, + 0x0b6c: 0x40423e20, 0x0b6d: 0x40424020, 0x0b6e: 0x40424220, 0x0b6f: 0x40424420, + 0x0b70: 0x40424820, 0x0b72: 0x40424a20, 0x0b73: 0x40424c20, + 0x0b75: 0x40424e20, 0x0b76: 0x40425220, 0x0b77: 0x40425420, + 0x0b78: 0x40425620, 0x0b79: 0x40425820, + 0x0b7c: 0xa070f102, 0x0b7d: 0x40425a20, 0x0b7e: 0x40425c20, 0x0b7f: 0x40425e20, + // Block 0x2e, offset 0xb80 + 0x0b80: 0x40426020, 0x0b81: 0x40426220, 0x0b82: 0x40426420, 0x0b83: 0x40426620, + 0x0b84: 0x40426820, 0x0b87: 0xc05d01e1, + 0x0b88: 0x40427020, 0x0b8b: 0x40427220, + 0x0b8c: 0x40427420, 0x0b8d: 0x8209213b, + 0x0b96: 0x40427820, 0x0b97: 0x40427a20, + 0x0b9c: 0xe000185d, 0x0b9d: 0xe0001860, 0x0b9f: 0x40424620, + 0x0ba0: 0x40420420, 0x0ba1: 0x40420820, 0x0ba2: 0x40426a20, 0x0ba3: 0x40426c20, + 0x0ba6: 0xe0000176, 0x0ba7: 0xe0000204, + 0x0ba8: 0xe000031f, 0x0ba9: 0xe00003f9, 0x0baa: 0xe00004d4, 0x0bab: 0xe000059e, + 0x0bac: 0xe0000669, 0x0bad: 0xe0000711, 0x0bae: 0xe00007bd, 0x0baf: 0xe0000862, + 0x0bb0: 0x40073c20, 0x0bb1: 0x40425020, 0x0bb2: 0x40283c20, 0x0bb3: 0x40283e20, + 0x0bb4: 0x40284020, 0x0bb5: 0x40284220, 0x0bb6: 0x40284420, 0x0bb7: 0x40284620, + // Block 0x2f, offset 0xbc0 + 0x0bc2: 0xa000f302, 0x0bc3: 0x40429620, + 0x0bc5: 0x40427e20, 0x0bc6: 0x40428020, 0x0bc7: 0x40428220, + 0x0bc8: 0x40428420, 0x0bc9: 0x40428620, 0x0bca: 0x40428820, + 0x0bce: 0x40428a20, 0x0bcf: 0x40428c20, + 0x0bd0: 0x40428e20, 0x0bd2: 0xc0610231, 0x0bd3: 0x40429220, + 0x0bd4: 0x40429420, 0x0bd5: 0x40429820, + 0x0bd9: 0x40429a20, 0x0bda: 0x40429c20, + 0x0bdc: 0x4042bc20, 0x0bde: 0x40429e20, 0x0bdf: 0x4042a020, + 0x0be3: 0x4042a220, + 0x0be4: 0x4042a420, + 0x0be8: 0x4042a620, 0x0be9: 0x4042ba20, 0x0bea: 0x4042a820, + 0x0bee: 0x4042aa20, 0x0bef: 0x4042ac20, + 0x0bf0: 0x4042ae20, 0x0bf1: 0x4042b820, 0x0bf2: 0x4042b020, 0x0bf3: 0x4042b620, + 0x0bf4: 0x4042b420, 0x0bf5: 0x4042b220, 0x0bf6: 0x4042be20, 0x0bf7: 0x4042c020, + 0x0bf8: 0x4042c220, 0x0bf9: 0x4042c420, + 0x0bfe: 0x4042c620, 0x0bff: 0x4042c820, + // Block 0x30, offset 0xc00 + 0x0c00: 0x4042ca20, 0x0c01: 0x4042cc20, 0x0c02: 0x4042ce20, + 0x0c06: 0xc0630261, 0x0c07: 0xc06602b1, + 0x0c08: 0x4042d420, 0x0c0a: 0x4042d620, 0x0c0b: 0x4042d820, + 0x0c0c: 0x4042da20, 0x0c0d: 0x8209216e, + 0x0c10: 0x40427c20, + 0x0c17: 0x4042de20, + 0x0c26: 0xe0000179, 0x0c27: 0xe0000207, + 0x0c28: 0xe0000322, 0x0c29: 0xe00003fc, 0x0c2a: 0xe00004d7, 0x0c2b: 0xe00005a1, + 0x0c2c: 0xe000066c, 0x0c2d: 0xe0000714, 0x0c2e: 0xe00007c0, 0x0c2f: 0xe0000865, + 0x0c30: 0x40285420, 0x0c31: 0x40285620, 0x0c32: 0x40285820, 0x0c33: 0x40073e20, + 0x0c34: 0x40074020, 0x0c35: 0x40074220, 0x0c36: 0x40074420, 0x0c37: 0x40074620, + 0x0c38: 0x40074820, 0x0c39: 0x4027f220, 0x0c3a: 0x40074a20, + // Block 0x31, offset 0xc40 + 0x0c41: 0xa000f202, 0x0c42: 0xa000f302, 0x0c43: 0xa000f402, + 0x0c45: 0x4042e020, 0x0c46: 0x4042e220, 0x0c47: 0x4042e420, + 0x0c48: 0x4042e620, 0x0c49: 0x4042e820, 0x0c4a: 0x4042ea20, 0x0c4b: 0x4042ec20, + 0x0c4c: 0x4042f020, 0x0c4e: 0x4042f420, 0x0c4f: 0x4042f620, + 0x0c50: 0x4042f820, 0x0c52: 0x4042fa20, 0x0c53: 0x4042fc20, + 0x0c54: 0x4042fe20, 0x0c55: 0x40430020, 0x0c56: 0x40430220, 0x0c57: 0x40430420, + 0x0c58: 0x40430620, 0x0c59: 0x40430820, 0x0c5a: 0x40430a20, 0x0c5b: 0x40430e20, + 0x0c5c: 0x40431020, 0x0c5d: 0x40431420, 0x0c5e: 0x40431620, 0x0c5f: 0x40431820, + 0x0c60: 0x40431a20, 0x0c61: 0x40431c20, 0x0c62: 0x40431e20, 0x0c63: 0x40432020, + 0x0c64: 0x40432220, 0x0c65: 0x40432420, 0x0c66: 0x40432620, 0x0c67: 0x40432820, + 0x0c68: 0x40432a20, 0x0c6a: 0x40432c20, 0x0c6b: 0x40432e20, + 0x0c6c: 0x40433020, 0x0c6d: 0x40433220, 0x0c6e: 0x40433420, 0x0c6f: 0x40433620, + 0x0c70: 0x40433820, 0x0c71: 0x40433a20, 0x0c72: 0x40433c20, 0x0c73: 0x40434820, + 0x0c75: 0x40433e20, 0x0c76: 0x40434020, 0x0c77: 0x40434220, + 0x0c78: 0x40434420, 0x0c79: 0x40434620, + 0x0c7d: 0x40434a20, 0x0c7e: 0x40434c20, 0x0c7f: 0x40434e20, + // Block 0x32, offset 0xc80 + 0x0c80: 0x40435020, 0x0c81: 0x40435220, 0x0c82: 0x40435420, 0x0c83: 0x40435620, + 0x0c84: 0x40435820, 0x0c86: 0xc06802e1, 0x0c87: 0x40436020, + 0x0c88: 0x40436220, 0x0c8a: 0x40436420, 0x0c8b: 0x40436620, + 0x0c8c: 0x40436820, 0x0c8d: 0x820921b5, + 0x0c95: 0x825421b6, 0x0c96: 0x825b21b7, + 0x0c98: 0x40430c20, 0x0c99: 0x40431220, + 0x0ca0: 0x4042ee20, 0x0ca1: 0x4042f220, 0x0ca2: 0x40435a20, 0x0ca3: 0x40435c20, + 0x0ca6: 0xe000017c, 0x0ca7: 0xe000020a, + 0x0ca8: 0xe0000325, 0x0ca9: 0xe00003ff, 0x0caa: 0xe00004da, 0x0cab: 0xe00005a4, + 0x0cac: 0xe000066f, 0x0cad: 0xe0000717, 0x0cae: 0xe00007c3, 0x0caf: 0xe0000868, + 0x0cb8: 0xe000017f, 0x0cb9: 0xe000020d, 0x0cba: 0xe0000328, 0x0cbb: 0xe0000402, + 0x0cbc: 0xe0000210, 0x0cbd: 0xe000032b, 0x0cbe: 0xe0000405, 0x0cbf: 0x40074c20, + // Block 0x33, offset 0xcc0 + 0x0cc2: 0xa000f302, 0x0cc3: 0xa000f402, + 0x0cc5: 0x40437020, 0x0cc6: 0x40437220, 0x0cc7: 0x40437420, + 0x0cc8: 0x40437620, 0x0cc9: 0x40437820, 0x0cca: 0x40437a20, 0x0ccb: 0x40437c20, + 0x0ccc: 0x40438020, 0x0cce: 0x40438420, 0x0ccf: 0x40438620, + 0x0cd0: 0x40438820, 0x0cd2: 0x40438a20, 0x0cd3: 0x40438c20, + 0x0cd4: 0x40438e20, 0x0cd5: 0x40439020, 0x0cd6: 0x40439220, 0x0cd7: 0x40439420, + 0x0cd8: 0x40439620, 0x0cd9: 0x40439820, 0x0cda: 0x40439a20, 0x0cdb: 0x40439c20, + 0x0cdc: 0x40439e20, 0x0cdd: 0x4043a020, 0x0cde: 0x4043a220, 0x0cdf: 0x4043a420, + 0x0ce0: 0x4043a620, 0x0ce1: 0x4043a820, 0x0ce2: 0x4043aa20, 0x0ce3: 0x4043ac20, + 0x0ce4: 0x4043ae20, 0x0ce5: 0x4043b020, 0x0ce6: 0x4043b220, 0x0ce7: 0x4043b420, + 0x0ce8: 0x4043b620, 0x0cea: 0x4043b820, 0x0ceb: 0x4043ba20, + 0x0cec: 0x4043bc20, 0x0ced: 0x4043be20, 0x0cee: 0x4043c020, 0x0cef: 0x4043c220, + 0x0cf0: 0x4043c420, 0x0cf1: 0x4043c620, 0x0cf2: 0x4043c820, 0x0cf3: 0x4043d420, + 0x0cf5: 0x4043ca20, 0x0cf6: 0x4043cc20, 0x0cf7: 0x4043ce20, + 0x0cf8: 0x4043d020, 0x0cf9: 0x4043d220, + 0x0cfc: 0xa070f102, 0x0cfd: 0x4043d820, 0x0cfe: 0x4043de20, 0x0cff: 0xc06a0311, + // Block 0x34, offset 0xd00 + 0x0d00: 0x4043e220, 0x0d01: 0x4043e420, 0x0d02: 0x4043e620, 0x0d03: 0x4043e820, + 0x0d04: 0x4043ea20, 0x0d06: 0xc06c0341, 0x0d07: 0x4043f220, + 0x0d08: 0x4043f420, 0x0d0a: 0xc0710311, 0x0d0b: 0x4043f820, + 0x0d0c: 0x4043fa20, 0x0d0d: 0x820921fe, + 0x0d15: 0x4043fe20, 0x0d16: 0x40440020, + 0x0d1e: 0x4043d620, + 0x0d20: 0x40437e20, 0x0d21: 0x40438220, 0x0d22: 0x4043ec20, 0x0d23: 0x4043ee20, + 0x0d26: 0xe0000182, 0x0d27: 0xe0000213, + 0x0d28: 0xe000032e, 0x0d29: 0xe0000408, 0x0d2a: 0xe00004dd, 0x0d2b: 0xe00005a7, + 0x0d2c: 0xe0000672, 0x0d2d: 0xe000071a, 0x0d2e: 0xe00007c6, 0x0d2f: 0xe000086b, + 0x0d31: 0x4043da20, 0x0d32: 0x4043dc20, + // Block 0x35, offset 0xd40 + 0x0d42: 0xa000f302, 0x0d43: 0xa000f402, + 0x0d45: 0x40440220, 0x0d46: 0x40440420, 0x0d47: 0x40440620, + 0x0d48: 0x40440820, 0x0d49: 0x40440a20, 0x0d4a: 0x40440c20, 0x0d4b: 0x40440e20, + 0x0d4c: 0x40441220, 0x0d4e: 0x40441620, 0x0d4f: 0x40441820, + 0x0d50: 0x40441a20, 0x0d52: 0x40441c20, 0x0d53: 0x40441e20, + 0x0d54: 0x40442020, 0x0d55: 0x40442220, 0x0d56: 0x40442420, 0x0d57: 0x40442620, + 0x0d58: 0x40442820, 0x0d59: 0x40442a20, 0x0d5a: 0x40442c20, 0x0d5b: 0x40442e20, + 0x0d5c: 0x40443020, 0x0d5d: 0x40443220, 0x0d5e: 0x40443420, 0x0d5f: 0x40443620, + 0x0d60: 0x40443820, 0x0d61: 0x40443a20, 0x0d62: 0x40443c20, 0x0d63: 0x40443e20, + 0x0d64: 0x40444020, 0x0d65: 0x40444220, 0x0d66: 0x40444420, 0x0d67: 0x40444620, + 0x0d68: 0x40444820, 0x0d69: 0x40444a20, 0x0d6a: 0x40444c20, 0x0d6b: 0x40444e20, + 0x0d6c: 0x40445020, 0x0d6d: 0x40445220, 0x0d6e: 0x40445420, 0x0d6f: 0x40445620, + 0x0d70: 0x40445820, 0x0d71: 0x40446a20, 0x0d72: 0x40445a20, 0x0d73: 0x40446620, + 0x0d74: 0x40446820, 0x0d75: 0x40445c20, 0x0d76: 0x40445e20, 0x0d77: 0x40446020, + 0x0d78: 0x40446220, 0x0d79: 0x40446420, 0x0d7a: 0x40446c20, + 0x0d7d: 0x40446e20, 0x0d7e: 0x40447020, 0x0d7f: 0x40447220, + // Block 0x36, offset 0xd80 + 0x0d80: 0x40447420, 0x0d81: 0x40447620, 0x0d82: 0x40447820, 0x0d83: 0x40447a20, + 0x0d84: 0x40447c20, 0x0d86: 0xc07303b1, 0x0d87: 0xc0760401, + 0x0d88: 0x40448620, 0x0d8a: 0x40448820, 0x0d8b: 0x40448a20, + 0x0d8c: 0x40448c20, 0x0d8d: 0x82092248, 0x0d8e: 0xe000186c, + 0x0d97: 0x40448e20, + 0x0da0: 0x40441020, 0x0da1: 0x40441420, 0x0da2: 0x40447e20, 0x0da3: 0x40448020, + 0x0da6: 0xe0000185, 0x0da7: 0xe0000216, + 0x0da8: 0xe0000331, 0x0da9: 0xe000040b, 0x0daa: 0xe00004e0, 0x0dab: 0xe00005aa, + 0x0dac: 0xe0000675, 0x0dad: 0xe000071d, 0x0dae: 0xe00007c9, 0x0daf: 0xe000086e, + 0x0db0: 0x40285a20, 0x0db1: 0x40285c20, 0x0db2: 0x40285e20, 0x0db3: 0x40286020, + 0x0db4: 0x40286220, 0x0db5: 0x40286420, + 0x0db9: 0x40074e20, 0x0dba: 0xe0001866, 0x0dbb: 0xe0001869, + 0x0dbc: 0xe000186f, 0x0dbd: 0xe0001872, 0x0dbe: 0xe0001875, 0x0dbf: 0xe0001863, + // Block 0x37, offset 0xdc0 + 0x0dc2: 0xa000f302, 0x0dc3: 0xa000f402, + 0x0dc5: 0x40449220, 0x0dc6: 0x40449420, 0x0dc7: 0x40449620, + 0x0dc8: 0x40449820, 0x0dc9: 0x40449a20, 0x0dca: 0x40449c20, 0x0dcb: 0x40449e20, + 0x0dcc: 0x4044a020, 0x0dcd: 0x4044a220, 0x0dce: 0x4044a420, 0x0dcf: 0x4044a620, + 0x0dd0: 0x4044a820, 0x0dd1: 0x4044aa20, 0x0dd2: 0x4044ac20, 0x0dd3: 0x4044ae20, + 0x0dd4: 0x4044b020, 0x0dd5: 0x4044b220, 0x0dd6: 0x4044b420, + 0x0dda: 0x4044b620, 0x0ddb: 0x4044b820, + 0x0ddc: 0x4044ba20, 0x0ddd: 0x4044bc20, 0x0dde: 0x4044be20, 0x0ddf: 0x4044c020, + 0x0de0: 0x4044c220, 0x0de1: 0x4044c420, 0x0de2: 0x4044c620, 0x0de3: 0x4044c820, + 0x0de4: 0x4044ca20, 0x0de5: 0x4044cc20, 0x0de6: 0x4044ce20, 0x0de7: 0x4044d020, + 0x0de8: 0x4044d220, 0x0de9: 0x4044d420, 0x0dea: 0x4044d620, 0x0deb: 0x4044d820, + 0x0dec: 0x4044da20, 0x0ded: 0x4044dc20, 0x0dee: 0x4044de20, 0x0def: 0x4044e020, + 0x0df0: 0x4044e220, 0x0df1: 0x4044e420, 0x0df3: 0x4044e620, + 0x0df4: 0x4044e820, 0x0df5: 0x4044ea20, 0x0df6: 0x4044ec20, 0x0df7: 0x4044ee20, + 0x0df8: 0x4044f020, 0x0df9: 0x4044f220, 0x0dfa: 0x4044f420, 0x0dfb: 0x4044f620, + 0x0dfd: 0x4044f820, + // Block 0x38, offset 0xe00 + 0x0e00: 0x4044fa20, 0x0e01: 0x4044fc20, 0x0e02: 0x4044fe20, 0x0e03: 0x40450020, + 0x0e04: 0x40450220, 0x0e05: 0x40450420, 0x0e06: 0x40450620, + 0x0e0a: 0x82092295, + 0x0e0f: 0x40450820, + 0x0e10: 0x40450a20, 0x0e11: 0x40450c20, 0x0e12: 0x40450e20, 0x0e13: 0x40451020, + 0x0e14: 0x40451220, 0x0e16: 0x40451420, + 0x0e18: 0x40451620, 0x0e19: 0xc0780431, 0x0e1a: 0x40452020, 0x0e1b: 0x40452220, + 0x0e1c: 0xc07d04b1, 0x0e1d: 0x40452620, 0x0e1e: 0x40452820, 0x0e1f: 0x40451a20, + 0x0e32: 0x40451820, 0x0e33: 0x40451c20, + 0x0e34: 0x40057620, + // Block 0x39, offset 0xe40 + 0x0e41: 0x40491020, 0x0e42: 0x40491220, 0x0e43: 0x40491420, + 0x0e44: 0x40491620, 0x0e45: 0x40491820, 0x0e46: 0x40491a20, 0x0e47: 0x40491c20, + 0x0e48: 0x40491e20, 0x0e49: 0x40492020, 0x0e4a: 0x40492220, 0x0e4b: 0x40492420, + 0x0e4c: 0x40492620, 0x0e4d: 0x40492820, 0x0e4e: 0x40492a20, 0x0e4f: 0x40492c20, + 0x0e50: 0x40492e20, 0x0e51: 0x40493020, 0x0e52: 0x40493220, 0x0e53: 0x40493420, + 0x0e54: 0x40493620, 0x0e55: 0x40493820, 0x0e56: 0x40493a20, 0x0e57: 0x40493c20, + 0x0e58: 0x40493e20, 0x0e59: 0x40494020, 0x0e5a: 0x40494220, 0x0e5b: 0x40494420, + 0x0e5c: 0x40494620, 0x0e5d: 0x40494820, 0x0e5e: 0x40494a20, 0x0e5f: 0x40494c20, + 0x0e60: 0x40494e20, 0x0e61: 0x40495020, 0x0e62: 0x40495220, 0x0e63: 0x40495420, + 0x0e64: 0x40495620, 0x0e65: 0x40495820, 0x0e66: 0x40495a20, 0x0e67: 0x40495c20, + 0x0e68: 0x40495e20, 0x0e69: 0x40496020, 0x0e6a: 0x40496220, 0x0e6b: 0x40496420, + 0x0e6c: 0x40496620, 0x0e6d: 0x40496820, 0x0e6e: 0x40496a20, 0x0e6f: 0x40496c20, + 0x0e70: 0x40496e20, 0x0e71: 0x40497020, 0x0e72: 0x40497220, 0x0e73: 0x40497420, + 0x0e74: 0x40497620, 0x0e75: 0x40497820, 0x0e76: 0x40497a20, 0x0e77: 0x40497c20, + 0x0e78: 0x826724bf, 0x0e79: 0x826724c0, 0x0e7a: 0x820924c1, + 0x0e7f: 0x4027f420, + // Block 0x3a, offset 0xe80 + 0x0e80: 0xc07f04e1, 0x0e81: 0xc0ae04e1, 0x0e82: 0xc0dd04e1, 0x0e83: 0xc10c04e1, + 0x0e84: 0xc13b04e1, 0x0e85: 0x40498e20, 0x0e86: 0x4027b820, 0x0e87: 0xa000ff02, + 0x0e88: 0xa6b10002, 0x0e89: 0xa6b10102, 0x0e8a: 0xa6b10202, 0x0e8b: 0xa6b10302, + 0x0e8c: 0xa0010402, 0x0e8d: 0xc16a0511, 0x0e8e: 0xa000fe02, 0x0e8f: 0x40057820, + 0x0e90: 0xe000019a, 0x0e91: 0xe000022e, 0x0e92: 0xe0000346, 0x0e93: 0xe0000420, + 0x0e94: 0xe00004f5, 0x0e95: 0xe00005bf, 0x0e96: 0xe000068a, 0x0e97: 0xe0000732, + 0x0e98: 0xe00007de, 0x0e99: 0xe0000883, 0x0e9a: 0x40057a20, 0x0e9b: 0x40057c20, + // Block 0x3b, offset 0xec0 + 0x0ec1: 0x40499220, 0x0ec2: 0x40499420, + 0x0ec4: 0x40499620, 0x0ec7: 0x40499820, + 0x0ec8: 0x40499a20, 0x0eca: 0x40499e20, + 0x0ecd: 0x4049a220, + 0x0ed4: 0x4049a420, 0x0ed5: 0x4049a620, 0x0ed6: 0x4049a820, 0x0ed7: 0x4049aa20, + 0x0ed9: 0x4049ac20, 0x0eda: 0x4049ae20, 0x0edb: 0x4049b020, + 0x0edc: 0x4049b220, 0x0edd: 0x4049b420, 0x0ede: 0x4049b620, 0x0edf: 0x4049b820, + 0x0ee1: 0x4049ba20, 0x0ee2: 0x4049bc20, 0x0ee3: 0x4049be20, + 0x0ee5: 0x4049c020, 0x0ee7: 0x4049c220, + 0x0eea: 0x40499c20, 0x0eeb: 0x4049c420, + 0x0eed: 0x4049c620, 0x0eee: 0x4049c820, 0x0eef: 0x4049ca20, + 0x0ef0: 0x4049cc20, 0x0ef1: 0x4049ce20, 0x0ef2: 0x4049d020, 0x0ef3: 0x4049d220, + 0x0ef4: 0x4049d420, 0x0ef5: 0x4049d620, 0x0ef6: 0x4049d820, 0x0ef7: 0x4049da20, + 0x0ef8: 0x827624ee, 0x0ef9: 0x827624ef, 0x0efb: 0x4049e020, + 0x0efc: 0x4049e220, 0x0efd: 0x4049e420, + // Block 0x3c, offset 0xf00 + 0x0f00: 0xc16c0541, 0x0f01: 0xc18c0541, 0x0f02: 0xc1ac0541, 0x0f03: 0xc1cc0541, + 0x0f04: 0xc1ec0541, 0x0f06: 0x4027ba20, + 0x0f08: 0xa7a10602, 0x0f09: 0xa7a10702, 0x0f0a: 0xa7a10802, 0x0f0b: 0xa7a10902, + 0x0f0c: 0xa0010a02, 0x0f0d: 0xc20c0641, + 0x0f10: 0xe000019d, 0x0f11: 0xe0000231, 0x0f12: 0xe0000349, 0x0f13: 0xe0000423, + 0x0f14: 0xe00004f8, 0x0f15: 0xe00005c2, 0x0f16: 0xe000068d, 0x0f17: 0xe0000735, + 0x0f18: 0xe00007e1, 0x0f19: 0xe0000886, + 0x0f1c: 0xf0000404, 0x0f1d: 0xf0000404, 0x0f1e: 0x40499020, 0x0f1f: 0x4049a020, + // Block 0x3d, offset 0xf40 + 0x0f40: 0xe000201a, 0x0f41: 0x40075e20, 0x0f42: 0x40076020, 0x0f43: 0x40076220, + 0x0f44: 0x40058220, 0x0f45: 0x40058420, 0x0f46: 0x40058620, 0x0f47: 0x40058820, + 0x0f48: 0x40058a20, 0x0f49: 0x40058c20, 0x0f4a: 0x40058e20, 0x0f4b: 0x40059420, + 0x0f4c: 0x0005949b, 0x0f4d: 0x40059620, 0x0f4e: 0x40059820, 0x0f4f: 0x40059a20, + 0x0f50: 0x40059c20, 0x0f51: 0x40059e20, 0x0f52: 0x4005a020, 0x0f53: 0x40076420, + 0x0f54: 0x4002aa20, 0x0f55: 0x40076620, 0x0f56: 0x40076820, 0x0f57: 0x40076a20, + 0x0f58: 0xadc00000, 0x0f59: 0xadc00000, 0x0f5a: 0x40076c20, 0x0f5b: 0x40076e20, + 0x0f5c: 0x40077020, 0x0f5d: 0x40077220, 0x0f5e: 0x40077420, 0x0f5f: 0x40077620, + 0x0f60: 0xe00001a0, 0x0f61: 0xe0000234, 0x0f62: 0xe000034c, 0x0f63: 0xe0000426, + 0x0f64: 0xe00004fb, 0x0f65: 0xe00005c5, 0x0f66: 0xe0000690, 0x0f67: 0xe0000738, + 0x0f68: 0xe00007e4, 0x0f69: 0xe0000889, 0x0f6a: 0xe0000237, 0x0f6b: 0xe000034f, + 0x0f6c: 0xe0000429, 0x0f6d: 0xe00004fe, 0x0f6e: 0xe00005c8, 0x0f6f: 0xe0000693, + 0x0f70: 0xe000073b, 0x0f71: 0xe00007e7, 0x0f72: 0xe000088c, 0x0f73: 0xe00001a3, + 0x0f74: 0x40077820, 0x0f75: 0xadc00000, 0x0f76: 0x40077a20, 0x0f77: 0xadc00000, + 0x0f78: 0x40077c20, 0x0f79: 0xad810e02, 0x0f7a: 0x40040020, 0x0f7b: 0x40040220, + 0x0f7c: 0x40040420, 0x0f7d: 0x40040620, 0x0f7e: 0xa0000000, 0x0f7f: 0xa0000000, + // Block 0x3e, offset 0xf80 + 0x0f80: 0x404a7620, 0x0f81: 0x404a7c20, 0x0f82: 0x404a8020, 0x0f83: 0xe0001fe4, + 0x0f84: 0x404a8420, 0x0f85: 0x404a8820, 0x0f86: 0x404a8c20, 0x0f87: 0x404a9020, + 0x0f89: 0x404a9420, 0x0f8a: 0x404a9820, 0x0f8b: 0x404a9c20, + 0x0f8c: 0x404aa020, 0x0f8d: 0xe0001fea, 0x0f8e: 0x404aa420, 0x0f8f: 0x404aa820, + 0x0f90: 0x404aac20, 0x0f91: 0x404ab020, 0x0f92: 0xe0001ff0, 0x0f93: 0x404ab420, + 0x0f94: 0x404ab820, 0x0f95: 0x404abc20, 0x0f96: 0x404ac020, 0x0f97: 0xe0001ff6, + 0x0f98: 0x404ac420, 0x0f99: 0x404ac820, 0x0f9a: 0x404acc20, 0x0f9b: 0x404ad020, + 0x0f9c: 0xe0001ffc, 0x0f9d: 0x404ad420, 0x0f9e: 0x404ad820, 0x0f9f: 0x404adc20, + 0x0fa0: 0x404ae020, 0x0fa1: 0x404ae420, 0x0fa2: 0x404ae820, 0x0fa3: 0x404aee20, + 0x0fa4: 0x404af220, 0x0fa5: 0x404af620, 0x0fa6: 0x404afa20, 0x0fa7: 0x404afe20, + 0x0fa8: 0x404b0220, 0x0fa9: 0xe0001fde, 0x0faa: 0xe0002008, 0x0fab: 0x404a7a20, + 0x0fac: 0x404aec20, + 0x0fb1: 0xc30f0751, 0x0fb2: 0x8282258c, 0x0fb3: 0x8281258d, + 0x0fb4: 0x82842590, 0x0fb5: 0x82812591, 0x0fb6: 0x404b2420, 0x0fb7: 0x404b2620, + 0x0fb8: 0x404b2820, 0x0fb9: 0x404b2a20, 0x0fba: 0x82822596, 0x0fbb: 0x82822597, + 0x0fbc: 0x82822598, 0x0fbd: 0x82822599, 0x0fbe: 0xa000f302, 0x0fbf: 0xa000f402, + // Block 0x3f, offset 0xfc0 + 0x0fc0: 0x8282258e, 0x0fc1: 0x8281258f, 0x0fc2: 0xae600000, 0x0fc3: 0xae600000, + 0x0fc4: 0x8209259a, 0x0fc5: 0x4005a220, 0x0fc6: 0xae600000, 0x0fc7: 0xae600000, + 0x0fc8: 0x404b0620, 0x0fc9: 0x404b0a20, 0x0fca: 0x404b1220, 0x0fcb: 0x404b1420, + 0x0fcc: 0x404b0e20, 0x0fcd: 0x404b0820, 0x0fce: 0x404b0c20, 0x0fcf: 0x404b1020, + 0x0fd0: 0x404a7820, 0x0fd1: 0x404a7e20, 0x0fd2: 0x404a8220, 0x0fd3: 0xe0001fe7, + 0x0fd4: 0x404a8620, 0x0fd5: 0x404a8a20, 0x0fd6: 0x404a8e20, 0x0fd7: 0x404a9220, + 0x0fd9: 0x404a9620, 0x0fda: 0x404a9a20, 0x0fdb: 0x404a9e20, + 0x0fdc: 0x404aa220, 0x0fdd: 0xe0001fed, 0x0fde: 0x404aa620, 0x0fdf: 0x404aaa20, + 0x0fe0: 0x404aae20, 0x0fe1: 0x404ab220, 0x0fe2: 0xe0001ff3, 0x0fe3: 0x404ab620, + 0x0fe4: 0x404aba20, 0x0fe5: 0x404abe20, 0x0fe6: 0x404ac220, 0x0fe7: 0xe0001ff9, + 0x0fe8: 0x404ac620, 0x0fe9: 0x404aca20, 0x0fea: 0x404ace20, 0x0feb: 0x404ad220, + 0x0fec: 0xe0001fff, 0x0fed: 0x404ad620, 0x0fee: 0x404ada20, 0x0fef: 0x404ade20, + 0x0ff0: 0x404ae220, 0x0ff1: 0x404ae620, 0x0ff2: 0xc30306a1, 0x0ff3: 0xc30906a1, + 0x0ff4: 0x404af420, 0x0ff5: 0x404af820, 0x0ff6: 0x404afc20, 0x0ff7: 0x404b0020, + 0x0ff8: 0x404b0420, 0x0ff9: 0xe0001fe1, 0x0ffa: 0xe0002002, 0x0ffb: 0xe0002005, + 0x0ffc: 0xe000200b, 0x0ffe: 0x40077e20, 0x0fff: 0x40078020, + // Block 0x40, offset 0x1000 + 0x1000: 0x40078220, 0x1001: 0x40078420, 0x1002: 0x40078620, 0x1003: 0x40078820, + 0x1004: 0x40078a20, 0x1005: 0x40078c20, 0x1006: 0xadc00000, 0x1007: 0x40078e20, + 0x1008: 0x40079020, 0x1009: 0x40079220, 0x100a: 0x40079420, 0x100b: 0x40079620, + 0x100c: 0x40079820, 0x100e: 0x40079a20, 0x100f: 0x40079c20, + 0x1010: 0x40059020, 0x1011: 0x40059220, 0x1012: 0x4005a420, 0x1013: 0x4005a620, + 0x1014: 0x4005a820, 0x1015: 0x40079e20, 0x1016: 0x4007a020, 0x1017: 0x4007a220, + 0x1018: 0x4007a420, 0x1019: 0x4005aa20, 0x101a: 0x4005ac20, + // Block 0x41, offset 0x1040 + 0x1040: 0x404e1420, 0x1041: 0x404e1820, 0x1042: 0x404e1c20, 0x1043: 0x404e2220, + 0x1044: 0x404e2420, 0x1045: 0x404e2820, 0x1046: 0x404e2e20, 0x1047: 0x404e3220, + 0x1048: 0x404e3a20, 0x1049: 0x404e4220, 0x104a: 0x404e4820, 0x104b: 0x404e4a20, + 0x104c: 0x404e4e20, 0x104d: 0x404e5220, 0x104e: 0x404e5620, 0x104f: 0x404e5a20, + 0x1050: 0x404e5e20, 0x1051: 0x404e6020, 0x1052: 0x404e6220, 0x1053: 0x404e6620, + 0x1054: 0x404e6a20, 0x1055: 0x404e7220, 0x1056: 0x404e7420, 0x1057: 0x404e7e20, + 0x1058: 0x404e8220, 0x1059: 0x404e8420, 0x105a: 0x404e8820, 0x105b: 0x404e8c20, + 0x105c: 0x404e9420, 0x105d: 0x404e9820, 0x105e: 0x404ea620, 0x105f: 0x404eaa20, + 0x1060: 0x404eb620, 0x1061: 0x404ec220, 0x1062: 0x404ec420, 0x1063: 0x404ec620, + 0x1064: 0x404ec820, 0x1065: 0xc31307b1, 0x1066: 0x404ecc20, 0x1067: 0x404ed620, + 0x1068: 0x404ed820, 0x1069: 0x404eda20, 0x106a: 0x404edc20, 0x106b: 0x004ede84, + 0x106c: 0x404ede20, 0x106d: 0x404ee620, 0x106e: 0x404eea20, 0x106f: 0x404eee20, + 0x1070: 0x404ef420, 0x1071: 0x404efe20, 0x1072: 0x404f0620, 0x1073: 0x404eec20, + 0x1074: 0x404f0a20, 0x1075: 0x404f0220, 0x1076: 0xa000f302, 0x1077: 0xa0711202, + 0x1078: 0xa000f402, 0x1079: 0x8209278a, 0x107a: 0x8209278b, 0x107b: 0x404e8a20, + 0x107c: 0x404e9220, 0x107d: 0x404e9a20, 0x107e: 0x404eb020, 0x107f: 0xe000201e, + // Block 0x42, offset 0x1080 + 0x1080: 0xe00001ac, 0x1081: 0xe0000240, 0x1082: 0xe0000358, 0x1083: 0xe0000432, + 0x1084: 0xe0000507, 0x1085: 0xe00005d1, 0x1086: 0xe000069c, 0x1087: 0xe0000744, + 0x1088: 0xe00007f0, 0x1089: 0xe0000895, 0x108a: 0x40032220, 0x108b: 0x40032420, + 0x108c: 0x4005b420, 0x108d: 0x4005b620, 0x108e: 0x4005b820, 0x108f: 0x4005ba20, + 0x1090: 0x404ea020, 0x1091: 0x404ea220, 0x1092: 0x404ece20, 0x1093: 0x404ed020, + 0x1094: 0x404ed220, 0x1095: 0x404ed420, 0x1096: 0x404ef620, 0x1097: 0x404ef820, + 0x1098: 0x404efa20, 0x1099: 0x404efc20, 0x109a: 0x404e2620, 0x109b: 0x404e3c20, + 0x109c: 0x404eb820, 0x109d: 0x404eba20, 0x109e: 0x404e7020, 0x109f: 0x404e8620, + 0x10a0: 0x404e9620, 0x10a1: 0x404e4020, 0x10a2: 0x404f0c20, 0x10a3: 0x404f1820, + 0x10a4: 0x404f1a20, 0x10a5: 0x404ea420, 0x10a6: 0x404ec020, 0x10a7: 0x404f0e20, + 0x10a8: 0x404f1020, 0x10a9: 0x404f1c20, 0x10aa: 0x404f1e20, 0x10ab: 0x404f2020, + 0x10ac: 0x404f2220, 0x10ad: 0x404f2420, 0x10ae: 0x404e5c20, 0x10af: 0x404ebc20, + 0x10b0: 0x404ebe20, 0x10b1: 0x404ee820, 0x10b2: 0x404ee220, 0x10b3: 0x404ef020, + 0x10b4: 0x404ef220, 0x10b5: 0x404e1620, 0x10b6: 0x404e1a20, 0x10b7: 0x404e1e20, + 0x10b8: 0x404e2a20, 0x10b9: 0x404e3620, 0x10ba: 0x404e4420, 0x10bb: 0x404e6420, + 0x10bc: 0x404e6c20, 0x10bd: 0x404e7620, 0x10be: 0x404e7820, 0x10bf: 0x404e8020, + // Block 0x43, offset 0x10c0 + 0x10c0: 0x404e9e20, 0x10c1: 0x404eac20, 0x10c2: 0x404e9c20, 0x10c3: 0x404ee020, + 0x10c4: 0x404f0020, 0x10c5: 0x404f0420, 0x10c6: 0x404f1220, 0x10c7: 0x404f2620, + 0x10c8: 0x404f2a20, 0x10c9: 0x404f2e20, 0x10ca: 0x404f3020, 0x10cb: 0x404f2820, + 0x10cc: 0x404f2c20, 0x10cd: 0xadc11302, 0x10ce: 0x404e7c20, 0x10cf: 0x404f3220, + 0x10d0: 0xe00001af, 0x10d1: 0xe0000243, 0x10d2: 0xe000035b, 0x10d3: 0xe0000435, + 0x10d4: 0xe000050a, 0x10d5: 0xe00005d4, 0x10d6: 0xe000069f, 0x10d7: 0xe0000747, + 0x10d8: 0xe00007f3, 0x10d9: 0xe0000898, 0x10da: 0x404f3420, 0x10db: 0x404f3620, + 0x10dc: 0x404ee420, 0x10dd: 0x404f0820, 0x10de: 0x4007a820, 0x10df: 0x4007aa20, + 0x10e0: 0x00379888, 0x10e1: 0x00379c88, 0x10e2: 0x0037a088, 0x10e3: 0x0037a488, + 0x10e4: 0x0037a888, 0x10e5: 0x0037ac88, 0x10e6: 0x0037b088, 0x10e7: 0x0037b888, + 0x10e8: 0x0037bc88, 0x10e9: 0x0037c088, 0x10ea: 0x0037c488, 0x10eb: 0x0037c888, + 0x10ec: 0x0037cc88, 0x10ed: 0x0037d488, 0x10ee: 0x0037d888, 0x10ef: 0x0037dc88, + 0x10f0: 0x0037e088, 0x10f1: 0x0037e488, 0x10f2: 0x0037e888, 0x10f3: 0x0037f088, + 0x10f4: 0x0037f488, 0x10f5: 0x0037f888, 0x10f6: 0x0037fc88, 0x10f7: 0x00380088, + 0x10f8: 0x00380488, 0x10f9: 0x00380888, 0x10fa: 0x00380c88, 0x10fb: 0x00381088, + 0x10fc: 0x00381488, 0x10fd: 0x00381888, 0x10fe: 0x00381c88, 0x10ff: 0x00382488, + // Block 0x44, offset 0x1100 + 0x1100: 0x00382888, 0x1101: 0x0037b488, 0x1102: 0x0037d088, 0x1103: 0x0037ec88, + 0x1104: 0x00382088, 0x1105: 0x00382c88, 0x1107: 0x00383288, + 0x110d: 0x00383c88, + 0x1110: 0x40379620, 0x1111: 0x40379a20, 0x1112: 0x40379e20, 0x1113: 0x4037a220, + 0x1114: 0x4037a620, 0x1115: 0x4037aa20, 0x1116: 0x4037ae20, 0x1117: 0x4037b620, + 0x1118: 0x4037ba20, 0x1119: 0x4037be20, 0x111a: 0x4037c220, 0x111b: 0x4037c620, + 0x111c: 0x4037ca20, 0x111d: 0x4037d220, 0x111e: 0x4037d620, 0x111f: 0x4037da20, + 0x1120: 0x4037de20, 0x1121: 0x4037e220, 0x1122: 0x4037e620, 0x1123: 0x4037ee20, + 0x1124: 0x4037f220, 0x1125: 0x4037f620, 0x1126: 0x4037fa20, 0x1127: 0x4037fe20, + 0x1128: 0x40380220, 0x1129: 0x40380620, 0x112a: 0x40380a20, 0x112b: 0x40380e20, + 0x112c: 0x40381220, 0x112d: 0x40381620, 0x112e: 0x40381a20, 0x112f: 0x40382220, + 0x1130: 0x40382620, 0x1131: 0x4037b220, 0x1132: 0x4037ce20, 0x1133: 0x4037ea20, + 0x1134: 0x40381e20, 0x1135: 0x40382a20, 0x1136: 0x40382e20, 0x1137: 0x40383020, + 0x1138: 0x40383420, 0x1139: 0x40383620, 0x113a: 0x40383820, 0x113b: 0x40036020, + 0x113c: 0x0037ca94, 0x113d: 0x40383a20, 0x113e: 0x40383e20, 0x113f: 0x40384020, + // Block 0x45, offset 0x1140 + 0x1140: 0x4062ac20, 0x1141: 0x4062ae20, 0x1142: 0x4062b020, 0x1143: 0x4062b220, + 0x1144: 0x4062b420, 0x1145: 0x4062b620, 0x1146: 0x4062b820, 0x1147: 0x4062ba20, + 0x1148: 0x4062bc20, 0x1149: 0x4062be20, 0x114a: 0x4062c020, 0x114b: 0x4062c220, + 0x114c: 0x4062c420, 0x114d: 0x4062c620, 0x114e: 0x4062c820, 0x114f: 0x4062ca20, + 0x1150: 0x4062cc20, 0x1151: 0x4062ce20, 0x1152: 0x4062d020, 0x1153: 0x4062d220, + 0x1154: 0x4062d420, 0x1155: 0x4062d620, 0x1156: 0x4062d820, 0x1157: 0x4062da20, + 0x1158: 0x4062dc20, 0x1159: 0x4062de20, 0x115a: 0x4062e020, 0x115b: 0x4062e220, + 0x115c: 0x4062e420, 0x115d: 0x4062e620, 0x115e: 0x4062e820, 0x115f: 0x4062ea20, + 0x1160: 0x4062ec20, 0x1161: 0x4062ee20, 0x1162: 0x4062f020, 0x1163: 0x4062f220, + 0x1164: 0x4062f420, 0x1165: 0x4062f620, 0x1166: 0x4062f820, 0x1167: 0x4062fa20, + 0x1168: 0x4062fc20, 0x1169: 0x4062fe20, 0x116a: 0x40630020, 0x116b: 0x40630220, + 0x116c: 0x40630420, 0x116d: 0x40630620, 0x116e: 0x40630820, 0x116f: 0x40630a20, + 0x1170: 0x40630c20, 0x1171: 0x40630e20, 0x1172: 0x40631020, 0x1173: 0x40631220, + 0x1174: 0x40631420, 0x1175: 0x40631620, 0x1176: 0x40631820, 0x1177: 0x40631a20, + 0x1178: 0x40631c20, 0x1179: 0x40631e20, 0x117a: 0x40632020, 0x117b: 0x40632220, + 0x117c: 0x40632420, 0x117d: 0x40632620, 0x117e: 0x40632820, 0x117f: 0x40632a20, + // Block 0x46, offset 0x1180 + 0x1180: 0x40632c20, 0x1181: 0x40632e20, 0x1182: 0x40633020, 0x1183: 0x40633220, + 0x1184: 0x40633420, 0x1185: 0x40633620, 0x1186: 0x40633820, 0x1187: 0x40633a20, + 0x1188: 0x40633c20, 0x1189: 0x40633e20, 0x118a: 0x40634020, 0x118b: 0x40634220, + 0x118c: 0x40634420, 0x118d: 0x40634620, 0x118e: 0x40634820, 0x118f: 0x40634a20, + 0x1190: 0x40634c20, 0x1191: 0x40634e20, 0x1192: 0x40635020, 0x1193: 0x40635220, + 0x1194: 0x40635420, 0x1195: 0x40635620, 0x1196: 0x40635820, 0x1197: 0x40635a20, + 0x1198: 0x40635c20, 0x1199: 0x40635e20, 0x119a: 0x40636020, 0x119b: 0x40636220, + 0x119c: 0x40636420, 0x119d: 0x40636620, 0x119e: 0x40636820, 0x119f: 0x4063a420, + 0x11a0: 0x4063a620, 0x11a1: 0x4063a820, 0x11a2: 0x4063aa20, 0x11a3: 0x4063ac20, + 0x11a4: 0x4063ae20, 0x11a5: 0x4063b020, 0x11a6: 0x4063b220, 0x11a7: 0x4063b420, + 0x11a8: 0x4063b620, 0x11a9: 0x4063b820, 0x11aa: 0x4063ba20, 0x11ab: 0x4063bc20, + 0x11ac: 0x4063be20, 0x11ad: 0x4063c020, 0x11ae: 0x4063c220, 0x11af: 0x4063c420, + 0x11b0: 0x4063c620, 0x11b1: 0x4063c820, 0x11b2: 0x4063ca20, 0x11b3: 0x4063cc20, + 0x11b4: 0x4063ce20, 0x11b5: 0x4063d020, 0x11b6: 0x4063d220, 0x11b7: 0x4063d420, + 0x11b8: 0x4063d620, 0x11b9: 0x4063d820, 0x11ba: 0x4063da20, 0x11bb: 0x4063dc20, + 0x11bc: 0x4063de20, 0x11bd: 0x4063e020, 0x11be: 0x4063e220, 0x11bf: 0x4063e420, + // Block 0x47, offset 0x11c0 + 0x11c0: 0x4063e620, 0x11c1: 0x4063e820, 0x11c2: 0x4063ea20, 0x11c3: 0x4063ec20, + 0x11c4: 0x4063ee20, 0x11c5: 0x4063f020, 0x11c6: 0x4063f220, 0x11c7: 0x4063f420, + 0x11c8: 0x4063f620, 0x11c9: 0x4063f820, 0x11ca: 0x4063fa20, 0x11cb: 0x4063fc20, + 0x11cc: 0x4063fe20, 0x11cd: 0x40640020, 0x11ce: 0x40640220, 0x11cf: 0x40640420, + 0x11d0: 0x40640620, 0x11d1: 0x40640820, 0x11d2: 0x40640a20, 0x11d3: 0x40640c20, + 0x11d4: 0x40640e20, 0x11d5: 0x40641020, 0x11d6: 0x40641220, 0x11d7: 0x40641420, + 0x11d8: 0x40641620, 0x11d9: 0x40641820, 0x11da: 0x40641a20, 0x11db: 0x40641c20, + 0x11dc: 0x40641e20, 0x11dd: 0x40642020, 0x11de: 0x40642220, 0x11df: 0x40642420, + 0x11e0: 0x40642620, 0x11e1: 0x40642820, 0x11e2: 0x40642a20, 0x11e3: 0x40642c20, + 0x11e4: 0x40642e20, 0x11e5: 0x40643020, 0x11e6: 0x40643220, 0x11e7: 0x40643420, + 0x11e8: 0x40646420, 0x11e9: 0x40646620, 0x11ea: 0x40646820, 0x11eb: 0x40646a20, + 0x11ec: 0x40646c20, 0x11ed: 0x40646e20, 0x11ee: 0x40647020, 0x11ef: 0x40647220, + 0x11f0: 0x40647420, 0x11f1: 0x40647620, 0x11f2: 0x40647820, 0x11f3: 0x40647a20, + 0x11f4: 0x40647c20, 0x11f5: 0x40647e20, 0x11f6: 0x40648020, 0x11f7: 0x40648220, + 0x11f8: 0x40648420, 0x11f9: 0x40648620, 0x11fa: 0x40648820, 0x11fb: 0x40648a20, + 0x11fc: 0x40648c20, 0x11fd: 0x40648e20, 0x11fe: 0x40649020, 0x11ff: 0x40649220, + // Block 0x48, offset 0x1200 + 0x1200: 0x40649420, 0x1201: 0x40649620, 0x1202: 0x40649820, 0x1203: 0x40649a20, + 0x1204: 0x40649c20, 0x1205: 0x40649e20, 0x1206: 0x4064a020, 0x1207: 0x4064a220, + 0x1208: 0x4064a420, 0x1209: 0x4064a620, 0x120a: 0x4064a820, 0x120b: 0x4064aa20, + 0x120c: 0x4064ac20, 0x120d: 0x4064ae20, 0x120e: 0x4064b020, 0x120f: 0x4064b220, + 0x1210: 0x4064b420, 0x1211: 0x4064b620, 0x1212: 0x4064b820, 0x1213: 0x4064ba20, + 0x1214: 0x4064bc20, 0x1215: 0x4064be20, 0x1216: 0x4064c020, 0x1217: 0x4064c220, + 0x1218: 0x4064c420, 0x1219: 0x4064c620, 0x121a: 0x4064c820, 0x121b: 0x4064ca20, + 0x121c: 0x4064cc20, 0x121d: 0x4064ce20, 0x121e: 0x4064d020, 0x121f: 0x4064d220, + 0x1220: 0x4064d420, 0x1221: 0x4064d620, 0x1222: 0x4064d820, 0x1223: 0x4064da20, + 0x1224: 0x4064dc20, 0x1225: 0x4064de20, 0x1226: 0x4064e020, 0x1227: 0x4064e220, + 0x1228: 0x4064e420, 0x1229: 0x4064e620, 0x122a: 0x4064e820, 0x122b: 0x4064ea20, + 0x122c: 0x4064ec20, 0x122d: 0x4064ee20, 0x122e: 0x4064f020, 0x122f: 0x4064f220, + 0x1230: 0x4064f420, 0x1231: 0x4064f620, 0x1232: 0x4064f820, 0x1233: 0x4064fa20, + 0x1234: 0x4064fc20, 0x1235: 0x4064fe20, 0x1236: 0x40650020, 0x1237: 0x40650220, + 0x1238: 0x40650420, 0x1239: 0x40650620, 0x123a: 0x40650820, 0x123b: 0x40650a20, + 0x123c: 0x40650c20, 0x123d: 0x40650e20, 0x123e: 0x40651020, 0x123f: 0x40651220, + // Block 0x49, offset 0x1240 + 0x1240: 0x403c2e20, 0x1241: 0x403c3020, 0x1242: 0x403c3220, 0x1243: 0x403c3420, + 0x1244: 0x403c3620, 0x1245: 0x403c3820, 0x1246: 0x403c3a20, 0x1247: 0x403c3c20, + 0x1248: 0x403c3e20, 0x1249: 0x403c4020, 0x124a: 0x403c4220, 0x124b: 0x403c4420, + 0x124c: 0x403c4620, 0x124d: 0x403c4820, 0x124e: 0x403c4a20, 0x124f: 0x403c4c20, + 0x1250: 0x403c5020, 0x1251: 0x403c5220, 0x1252: 0x403c5420, 0x1253: 0x403c5620, + 0x1254: 0x403c5820, 0x1255: 0x403c5a20, 0x1256: 0x403c5c20, 0x1257: 0x403c5e20, + 0x1258: 0x403c6020, 0x1259: 0x403c6220, 0x125a: 0x403c6420, 0x125b: 0x403c6620, + 0x125c: 0x403c6820, 0x125d: 0x403c6a20, 0x125e: 0x403c6c20, 0x125f: 0x403c6e20, + 0x1260: 0x403c7a20, 0x1261: 0x403c7c20, 0x1262: 0x403c7e20, 0x1263: 0x403c8020, + 0x1264: 0x403c8220, 0x1265: 0x403c8420, 0x1266: 0x403c8620, 0x1267: 0x403c8820, + 0x1268: 0x403c8a20, 0x1269: 0x403c8c20, 0x126a: 0x403c8e20, 0x126b: 0x403c9020, + 0x126c: 0x403c9220, 0x126d: 0x403c9420, 0x126e: 0x403c9620, 0x126f: 0x403c9820, + 0x1270: 0x403c9c20, 0x1271: 0x403c9e20, 0x1272: 0x403ca020, 0x1273: 0x403ca220, + 0x1274: 0x403ca420, 0x1275: 0x403ca620, 0x1276: 0x403ca820, 0x1277: 0x403caa20, + 0x1278: 0x403cba20, 0x1279: 0x403cbc20, 0x127a: 0x403cbe20, 0x127b: 0x403cc020, + 0x127c: 0x403cc220, 0x127d: 0x403cc420, 0x127e: 0x403cc620, 0x127f: 0x403cc820, + // Block 0x4a, offset 0x1280 + 0x1280: 0x403ccc20, 0x1281: 0x403cce20, 0x1282: 0x403cd020, 0x1283: 0x403cd220, + 0x1284: 0x403cd420, 0x1285: 0x403cd620, 0x1286: 0x403cd820, 0x1287: 0x403cda20, + 0x1288: 0x403cdc20, 0x128a: 0x403cde20, 0x128b: 0x403ce020, + 0x128c: 0x403ce220, 0x128d: 0x403ce420, + 0x1290: 0x403ce620, 0x1291: 0x403ce820, 0x1292: 0x403cea20, 0x1293: 0x403cec20, + 0x1294: 0x403cee20, 0x1295: 0x403cf020, 0x1296: 0x403cf220, + 0x1298: 0x403cf420, 0x129a: 0x403cf620, 0x129b: 0x403cf820, + 0x129c: 0x403cfa20, 0x129d: 0x403cfc20, + 0x12a0: 0x403cfe20, 0x12a1: 0x403d0020, 0x12a2: 0x403d0220, 0x12a3: 0x403d0420, + 0x12a4: 0x403d0620, 0x12a5: 0x403d0820, 0x12a6: 0x403d0a20, 0x12a7: 0x403d0c20, + 0x12a8: 0x403d1820, 0x12a9: 0x403d1a20, 0x12aa: 0x403d1c20, 0x12ab: 0x403d1e20, + 0x12ac: 0x403d2020, 0x12ad: 0x403d2220, 0x12ae: 0x403d2420, 0x12af: 0x403d2620, + 0x12b0: 0x403d2820, 0x12b1: 0x403d2a20, 0x12b2: 0x403d2c20, 0x12b3: 0x403d2e20, + 0x12b4: 0x403d3020, 0x12b5: 0x403d3220, 0x12b6: 0x403d3420, 0x12b7: 0x403d3620, + 0x12b8: 0x403d3a20, 0x12b9: 0x403d3c20, 0x12ba: 0x403d3e20, 0x12bb: 0x403d4020, + 0x12bc: 0x403d4220, 0x12bd: 0x403d4420, 0x12be: 0x403d4620, 0x12bf: 0x403d4820, + // Block 0x4b, offset 0x12c0 + 0x12c0: 0x403d4c20, 0x12c1: 0x403d4e20, 0x12c2: 0x403d5020, 0x12c3: 0x403d5220, + 0x12c4: 0x403d5420, 0x12c5: 0x403d5620, 0x12c6: 0x403d5820, 0x12c7: 0x403d5a20, + 0x12c8: 0x403d5c20, 0x12ca: 0x403d5e20, 0x12cb: 0x403d6020, + 0x12cc: 0x403d6220, 0x12cd: 0x403d6420, + 0x12d0: 0x403d6620, 0x12d1: 0x403d6820, 0x12d2: 0x403d6a20, 0x12d3: 0x403d6c20, + 0x12d4: 0x403d6e20, 0x12d5: 0x403d7020, 0x12d6: 0x403d7220, 0x12d7: 0x403d7420, + 0x12d8: 0x403d7820, 0x12d9: 0x403d7a20, 0x12da: 0x403d7c20, 0x12db: 0x403d7e20, + 0x12dc: 0x403d8020, 0x12dd: 0x403d8220, 0x12de: 0x403d8420, 0x12df: 0x403d8620, + 0x12e0: 0x403d8a20, 0x12e1: 0x403d8c20, 0x12e2: 0x403d8e20, 0x12e3: 0x403d9020, + 0x12e4: 0x403d9220, 0x12e5: 0x403d9420, 0x12e6: 0x403d9620, 0x12e7: 0x403d9820, + 0x12e8: 0x403d9c20, 0x12e9: 0x403d9e20, 0x12ea: 0x403da020, 0x12eb: 0x403da220, + 0x12ec: 0x403da420, 0x12ed: 0x403da620, 0x12ee: 0x403da820, 0x12ef: 0x403daa20, + 0x12f0: 0x403dac20, 0x12f2: 0x403dae20, 0x12f3: 0x403db020, + 0x12f4: 0x403db220, 0x12f5: 0x403db420, + 0x12f8: 0x403db620, 0x12f9: 0x403db820, 0x12fa: 0x403dba20, 0x12fb: 0x403dbc20, + 0x12fc: 0x403dbe20, 0x12fd: 0x403dc020, 0x12fe: 0x403dc220, + // Block 0x4c, offset 0x1300 + 0x1300: 0x403dc420, 0x1302: 0x403dc620, 0x1303: 0x403dc820, + 0x1304: 0x403dca20, 0x1305: 0x403dcc20, + 0x1308: 0x403dce20, 0x1309: 0x403dd020, 0x130a: 0x403dd220, 0x130b: 0x403dd420, + 0x130c: 0x403dd620, 0x130d: 0x403dd820, 0x130e: 0x403dda20, 0x130f: 0x403ddc20, + 0x1310: 0x403dde20, 0x1311: 0x403de020, 0x1312: 0x403de220, 0x1313: 0x403de420, + 0x1314: 0x403de620, 0x1315: 0x403de820, 0x1316: 0x403dea20, + 0x1318: 0x403dec20, 0x1319: 0x403dee20, 0x131a: 0x403df020, 0x131b: 0x403df220, + 0x131c: 0x403df420, 0x131d: 0x403df620, 0x131e: 0x403df820, 0x131f: 0x403dfa20, + 0x1320: 0x403e0a20, 0x1321: 0x403e0c20, 0x1322: 0x403e0e20, 0x1323: 0x403e1020, + 0x1324: 0x403e1220, 0x1325: 0x403e1420, 0x1326: 0x403e1620, 0x1327: 0x403e1820, + 0x1328: 0x403e1a20, 0x1329: 0x403e1c20, 0x132a: 0x403e1e20, 0x132b: 0x403e2020, + 0x132c: 0x403e2220, 0x132d: 0x403e2420, 0x132e: 0x403e2620, 0x132f: 0x403e2820, + 0x1330: 0x403e2a20, 0x1331: 0x403e2c20, 0x1332: 0x403e2e20, 0x1333: 0x403e3020, + 0x1334: 0x403e3220, 0x1335: 0x403e3420, 0x1336: 0x403e3620, 0x1337: 0x403e3820, + 0x1338: 0x403e4820, 0x1339: 0x403e4a20, 0x133a: 0x403e4c20, 0x133b: 0x403e4e20, + 0x133c: 0x403e5020, 0x133d: 0x403e5220, 0x133e: 0x403e5420, 0x133f: 0x403e5620, + // Block 0x4d, offset 0x1340 + 0x1340: 0x403e5a20, 0x1341: 0x403e5c20, 0x1342: 0x403e5e20, 0x1343: 0x403e6020, + 0x1344: 0x403e6220, 0x1345: 0x403e6420, 0x1346: 0x403e6620, 0x1347: 0x403e6820, + 0x1348: 0x403e6c20, 0x1349: 0x403e6e20, 0x134a: 0x403e7020, 0x134b: 0x403e7220, + 0x134c: 0x403e7420, 0x134d: 0x403e7620, 0x134e: 0x403e7820, 0x134f: 0x403e7a20, + 0x1350: 0x403e7c20, 0x1352: 0x403e7e20, 0x1353: 0x403e8020, + 0x1354: 0x403e8220, 0x1355: 0x403e8420, + 0x1358: 0x403e8620, 0x1359: 0x403e8820, 0x135a: 0x403e8a20, 0x135b: 0x403e8c20, + 0x135c: 0x403e8e20, 0x135d: 0x403e9020, 0x135e: 0x403e9220, 0x135f: 0x403e9420, + 0x1360: 0x403e9e20, 0x1361: 0x403ea020, 0x1362: 0x403ea220, 0x1363: 0x403ea420, + 0x1364: 0x403ea620, 0x1365: 0x403ea820, 0x1366: 0x403eaa20, 0x1367: 0x403eac20, + 0x1368: 0x403eb020, 0x1369: 0x403eb220, 0x136a: 0x403eb420, 0x136b: 0x403eb620, + 0x136c: 0x403eb820, 0x136d: 0x403eba20, 0x136e: 0x403ebc20, 0x136f: 0x403ebe20, + 0x1370: 0x403ed020, 0x1371: 0x403ed220, 0x1372: 0x403ed420, 0x1373: 0x403ed620, + 0x1374: 0x403ed820, 0x1375: 0x403eda20, 0x1376: 0x403edc20, 0x1377: 0x403ede20, + 0x1378: 0x403ee220, 0x1379: 0x403ee420, 0x137a: 0x403ee620, 0x137b: 0x403ee820, + 0x137c: 0x403eea20, 0x137d: 0x403eec20, 0x137e: 0x403eee20, 0x137f: 0x403ef020, + // Block 0x4e, offset 0x1380 + 0x1380: 0x403f0020, 0x1381: 0x403f0220, 0x1382: 0x403f0420, 0x1383: 0x403f0620, + 0x1384: 0x403f0820, 0x1385: 0x403f0a20, 0x1386: 0x403f0c20, 0x1387: 0x403f0e20, + 0x1388: 0x403f1020, 0x1389: 0x403f1220, 0x138a: 0x403f1420, 0x138b: 0x403f1620, + 0x138c: 0x403f1820, 0x138d: 0x403f1a20, 0x138e: 0x403f1c20, 0x138f: 0x403f1e20, + 0x1390: 0x403f2820, 0x1391: 0x403f2a20, 0x1392: 0x403f2c20, 0x1393: 0x403f2e20, + 0x1394: 0x403f3020, 0x1395: 0x403f3220, 0x1396: 0x403f3420, 0x1397: 0x403f3620, + 0x1398: 0x403f4220, 0x1399: 0x403f4420, 0x139a: 0x403f4620, + 0x139d: 0xae60ee02, 0x139e: 0xae60ed02, 0x139f: 0xae60ec02, + 0x13a0: 0x40036220, 0x13a1: 0x40029c20, 0x13a2: 0x4002ee20, 0x13a3: 0x40029e20, + 0x13a4: 0x4002a020, 0x13a5: 0x4002a220, 0x13a6: 0x4002a420, 0x13a7: 0x4002d020, + 0x13a8: 0x40036420, 0x13a9: 0xe00001f2, 0x13aa: 0xe000030d, 0x13ab: 0xe00003e7, + 0x13ac: 0xe00004c2, 0x13ad: 0xe000058c, 0x13ae: 0xe0000657, 0x13af: 0xe00006ff, + 0x13b0: 0xe00007ab, 0x13b1: 0xe0000850, 0x13b2: 0x40286620, 0x13b3: 0x40286820, + 0x13b4: 0x40286a20, 0x13b5: 0x40286c20, 0x13b6: 0x40286e20, 0x13b7: 0x40287020, + 0x13b8: 0x40287220, 0x13b9: 0x40287420, 0x13ba: 0x40287620, 0x13bb: 0x40287820, + 0x13bc: 0x40287a20, + // Block 0x4f, offset 0x13c0 + 0x13c0: 0x403c7020, 0x13c1: 0x403c7220, 0x13c2: 0x403c7420, 0x13c3: 0x403c7620, + 0x13c4: 0x403d0e20, 0x13c5: 0x403d1020, 0x13c6: 0x403d1220, 0x13c7: 0x403d1420, + 0x13c8: 0x403f2020, 0x13c9: 0x403f2220, 0x13ca: 0x403f2420, 0x13cb: 0x403f2620, + 0x13cc: 0x403f3820, 0x13cd: 0x403f3a20, 0x13ce: 0x403f3c20, 0x13cf: 0x403f3e20, + 0x13d0: 0x4006a620, 0x13d1: 0x4006a820, 0x13d2: 0x4006aa20, 0x13d3: 0x4006ac20, + 0x13d4: 0x4006ae20, 0x13d5: 0x4006b020, 0x13d6: 0x4006b220, 0x13d7: 0x4006b420, + 0x13d8: 0x4006b620, 0x13d9: 0x4006b820, + 0x13e0: 0x40547620, 0x13e1: 0x40547820, 0x13e2: 0x40547a20, 0x13e3: 0x40547c20, + 0x13e4: 0x40547e20, 0x13e5: 0x40548020, 0x13e6: 0x40548220, 0x13e7: 0x40548420, + 0x13e8: 0x40548620, 0x13e9: 0x40548820, 0x13ea: 0x40548a20, 0x13eb: 0x40548c20, + 0x13ec: 0x40548e20, 0x13ed: 0x40549020, 0x13ee: 0x40549220, 0x13ef: 0x40549420, + 0x13f0: 0x40549620, 0x13f1: 0x40549820, 0x13f2: 0x40549a20, 0x13f3: 0x40549c20, + 0x13f4: 0x40549e20, 0x13f5: 0x4054a020, 0x13f6: 0x4054a220, 0x13f7: 0x4054a420, + 0x13f8: 0x4054a620, 0x13f9: 0x4054a820, 0x13fa: 0x4054aa20, 0x13fb: 0x4054ac20, + 0x13fc: 0x4054ae20, 0x13fd: 0x4054b020, 0x13fe: 0x4054b220, 0x13ff: 0x4054b420, + // Block 0x50, offset 0x1400 + 0x1400: 0x4054b620, 0x1401: 0x4054b820, 0x1402: 0x4054ba20, 0x1403: 0x4054bc20, + 0x1404: 0x4054be20, 0x1405: 0x4054c020, 0x1406: 0x4054c220, 0x1407: 0x4054c420, + 0x1408: 0x4054c620, 0x1409: 0x4054c820, 0x140a: 0x4054ca20, 0x140b: 0x4054cc20, + 0x140c: 0x4054ce20, 0x140d: 0x4054d020, 0x140e: 0x4054d220, 0x140f: 0x4054d420, + 0x1410: 0x4054d620, 0x1411: 0x4054d820, 0x1412: 0x4054da20, 0x1413: 0x4054dc20, + 0x1414: 0x4054de20, 0x1415: 0x4054e020, 0x1416: 0x4054e220, 0x1417: 0x4054e420, + 0x1418: 0x4054e620, 0x1419: 0x4054e820, 0x141a: 0x4054ea20, 0x141b: 0x4054ec20, + 0x141c: 0x4054ee20, 0x141d: 0x4054f020, 0x141e: 0x4054f220, 0x141f: 0x4054f420, + 0x1420: 0x4054f620, 0x1421: 0x4054f820, 0x1422: 0x4054fa20, 0x1423: 0x4054fc20, + 0x1424: 0x4054fe20, 0x1425: 0x40550020, 0x1426: 0x40550220, 0x1427: 0x40550420, + 0x1428: 0x40550620, 0x1429: 0x40550820, 0x142a: 0x40550a20, 0x142b: 0x40550c20, + 0x142c: 0x40550e20, 0x142d: 0x40551020, 0x142e: 0x40551220, 0x142f: 0x40551420, + 0x1430: 0x40551620, 0x1431: 0x40551820, 0x1432: 0x40551a20, 0x1433: 0x40551c20, + 0x1434: 0x40551e20, + // Block 0x51, offset 0x1440 + 0x1440: 0x40021e20, 0x1441: 0x40552020, 0x1442: 0x40552220, 0x1443: 0x40552420, + 0x1444: 0x40552620, 0x1445: 0x40552820, 0x1446: 0x40552a20, 0x1447: 0x40552c20, + 0x1448: 0x40552e20, 0x1449: 0x40553020, 0x144a: 0x40553220, 0x144b: 0x40553420, + 0x144c: 0x40553620, 0x144d: 0x40553820, 0x144e: 0x40553a20, 0x144f: 0x40553c20, + 0x1450: 0x40553e20, 0x1451: 0x40554020, 0x1452: 0x40554220, 0x1453: 0x40554420, + 0x1454: 0x40554620, 0x1455: 0x40554820, 0x1456: 0x40554a20, 0x1457: 0x40554c20, + 0x1458: 0x40554e20, 0x1459: 0x40555020, 0x145a: 0x40555220, 0x145b: 0x40555420, + 0x145c: 0x40555620, 0x145d: 0x40555820, 0x145e: 0x40555a20, 0x145f: 0x40555c20, + 0x1460: 0x40555e20, 0x1461: 0x40556020, 0x1462: 0x40556220, 0x1463: 0x40556420, + 0x1464: 0x40556620, 0x1465: 0x40556820, 0x1466: 0x40556a20, 0x1467: 0x40556c20, + 0x1468: 0x40556e20, 0x1469: 0x40557020, 0x146a: 0x40557220, 0x146b: 0x40557420, + 0x146c: 0x40557620, 0x146d: 0x40557820, 0x146e: 0x40557a20, 0x146f: 0x40557c20, + 0x1470: 0x40557e20, 0x1471: 0x40558020, 0x1472: 0x40558220, 0x1473: 0x40558420, + 0x1474: 0x40558620, 0x1475: 0x40558820, 0x1476: 0x40558a20, 0x1477: 0x40558c20, + 0x1478: 0x40558e20, 0x1479: 0x40559020, 0x147a: 0x40559220, 0x147b: 0x40559420, + 0x147c: 0x40559620, 0x147d: 0x40559820, 0x147e: 0x40559a20, 0x147f: 0x40559c20, + // Block 0x52, offset 0x1480 + 0x1480: 0x40559e20, 0x1481: 0x4055a020, 0x1482: 0x4055a220, 0x1483: 0x4055a420, + 0x1484: 0x4055a620, 0x1485: 0x4055a820, 0x1486: 0x4055aa20, 0x1487: 0x4055ac20, + 0x1488: 0x4055ae20, 0x1489: 0x4055b020, 0x148a: 0x4055b220, 0x148b: 0x4055b420, + 0x148c: 0x4055b620, 0x148d: 0x4055b820, 0x148e: 0x4055ba20, 0x148f: 0x4055bc20, + 0x1490: 0x4055be20, 0x1491: 0x4055c020, 0x1492: 0x4055c220, 0x1493: 0x4055c420, + 0x1494: 0x4055c620, 0x1495: 0x4055c820, 0x1496: 0x4055ca20, 0x1497: 0x4055cc20, + 0x1498: 0x4055ce20, 0x1499: 0x4055d020, 0x149a: 0x4055d220, 0x149b: 0x4055d420, + 0x149c: 0x4055d620, 0x149d: 0x4055d820, 0x149e: 0x4055da20, 0x149f: 0x4055dc20, + 0x14a0: 0x4055de20, 0x14a1: 0x4055e020, 0x14a2: 0x4055e220, 0x14a3: 0x4055e420, + 0x14a4: 0x4055e620, 0x14a5: 0x4055e820, 0x14a6: 0x4055ea20, 0x14a7: 0x4055ec20, + 0x14a8: 0x4055ee20, 0x14a9: 0x4055f020, 0x14aa: 0x4055f220, 0x14ab: 0x4055f420, + 0x14ac: 0x4055f620, 0x14ad: 0x4055f820, 0x14ae: 0x4055fa20, 0x14af: 0x4055fc20, + 0x14b0: 0x4055fe20, 0x14b1: 0x40560020, 0x14b2: 0x40560220, 0x14b3: 0x40560420, + 0x14b4: 0x40560620, 0x14b5: 0x40560820, 0x14b6: 0x40560a20, 0x14b7: 0x40560c20, + 0x14b8: 0x40560e20, 0x14b9: 0x40561020, 0x14ba: 0x40561220, 0x14bb: 0x40561420, + 0x14bc: 0x40561620, 0x14bd: 0x40561820, 0x14be: 0x40561a20, 0x14bf: 0x40561c20, + // Block 0x53, offset 0x14c0 + 0x14c0: 0x40561e20, 0x14c1: 0x40562020, 0x14c2: 0x40562220, 0x14c3: 0x40562420, + 0x14c4: 0x40562620, 0x14c5: 0x40562820, 0x14c6: 0x40562a20, 0x14c7: 0x40562c20, + 0x14c8: 0x40562e20, 0x14c9: 0x40563020, 0x14ca: 0x40563220, 0x14cb: 0x40563420, + 0x14cc: 0x40563620, 0x14cd: 0x40563820, 0x14ce: 0x40563a20, 0x14cf: 0x40563c20, + 0x14d0: 0x40563e20, 0x14d1: 0x40564020, 0x14d2: 0x40564220, 0x14d3: 0x40564420, + 0x14d4: 0x40564620, 0x14d5: 0x40564820, 0x14d6: 0x40564a20, 0x14d7: 0x40564c20, + 0x14d8: 0x40564e20, 0x14d9: 0x40565020, 0x14da: 0x40565220, 0x14db: 0x40565420, + 0x14dc: 0x40565620, 0x14dd: 0x40565820, 0x14de: 0x40565a20, 0x14df: 0x40565c20, + 0x14e0: 0x40565e20, 0x14e1: 0x40566020, 0x14e2: 0x40566220, 0x14e3: 0x40566420, + 0x14e4: 0x40566620, 0x14e5: 0x40566820, 0x14e6: 0x40566a20, 0x14e7: 0x40566c20, + 0x14e8: 0x40566e20, 0x14e9: 0x40567020, 0x14ea: 0x40567220, 0x14eb: 0x40567420, + 0x14ec: 0x40567620, 0x14ed: 0x40567820, 0x14ee: 0x40567a20, 0x14ef: 0x40567c20, + 0x14f0: 0x40567e20, 0x14f1: 0x40568020, 0x14f2: 0x40568220, 0x14f3: 0x40568420, + 0x14f4: 0x40568620, 0x14f5: 0x40568820, 0x14f6: 0x40568a20, 0x14f7: 0x40568c20, + 0x14f8: 0x40568e20, 0x14f9: 0x40569020, 0x14fa: 0x40569220, 0x14fb: 0x40569420, + 0x14fc: 0x40569620, 0x14fd: 0x40569820, 0x14fe: 0x40569a20, 0x14ff: 0x40569c20, + // Block 0x54, offset 0x1500 + 0x1500: 0x40569e20, 0x1501: 0x4056a020, 0x1502: 0x4056a220, 0x1503: 0x4056a420, + 0x1504: 0x4056a620, 0x1505: 0x4056a820, 0x1506: 0x4056aa20, 0x1507: 0x4056ac20, + 0x1508: 0x4056ae20, 0x1509: 0x4056b020, 0x150a: 0x4056b220, 0x150b: 0x4056b420, + 0x150c: 0x4056b620, 0x150d: 0x4056b820, 0x150e: 0x4056ba20, 0x150f: 0x4056bc20, + 0x1510: 0x4056be20, 0x1511: 0x4056c020, 0x1512: 0x4056c220, 0x1513: 0x4056c420, + 0x1514: 0x4056c620, 0x1515: 0x4056c820, 0x1516: 0x4056ca20, 0x1517: 0x4056cc20, + 0x1518: 0x4056ce20, 0x1519: 0x4056d020, 0x151a: 0x4056d220, 0x151b: 0x4056d420, + 0x151c: 0x4056d620, 0x151d: 0x4056d820, 0x151e: 0x4056da20, 0x151f: 0x4056dc20, + 0x1520: 0x4056de20, 0x1521: 0x4056e020, 0x1522: 0x4056e220, 0x1523: 0x4056e420, + 0x1524: 0x4056e620, 0x1525: 0x4056e820, 0x1526: 0x4056ea20, 0x1527: 0x4056ec20, + 0x1528: 0x4056ee20, 0x1529: 0x4056f020, 0x152a: 0x4056f220, 0x152b: 0x4056f420, + 0x152c: 0x4056f620, 0x152d: 0x4056f820, 0x152e: 0x4056fa20, 0x152f: 0x4056fc20, + 0x1530: 0x4056fe20, 0x1531: 0x40570020, 0x1532: 0x40570220, 0x1533: 0x40570420, + 0x1534: 0x40570620, 0x1535: 0x40570820, 0x1536: 0x40570a20, 0x1537: 0x40570c20, + 0x1538: 0x40570e20, 0x1539: 0x40571020, 0x153a: 0x40571220, 0x153b: 0x40571420, + 0x153c: 0x40571620, 0x153d: 0x40571820, 0x153e: 0x40571a20, 0x153f: 0x40571c20, + // Block 0x55, offset 0x1540 + 0x1540: 0x40571e20, 0x1541: 0x40572020, 0x1542: 0x40572220, 0x1543: 0x40572420, + 0x1544: 0x40572620, 0x1545: 0x40572820, 0x1546: 0x40572a20, 0x1547: 0x40572c20, + 0x1548: 0x40572e20, 0x1549: 0x40573020, 0x154a: 0x40573220, 0x154b: 0x40573420, + 0x154c: 0x40573620, 0x154d: 0x40573820, 0x154e: 0x40573a20, 0x154f: 0x40573c20, + 0x1550: 0x40573e20, 0x1551: 0x40574020, 0x1552: 0x40574220, 0x1553: 0x40574420, + 0x1554: 0x40574620, 0x1555: 0x40574820, 0x1556: 0x40574a20, 0x1557: 0x40574c20, + 0x1558: 0x40574e20, 0x1559: 0x40575020, 0x155a: 0x40575220, 0x155b: 0x40575420, + 0x155c: 0x40575620, 0x155d: 0x40575820, 0x155e: 0x40575a20, 0x155f: 0x40575c20, + 0x1560: 0x40575e20, 0x1561: 0x40576020, 0x1562: 0x40576220, 0x1563: 0x40576420, + 0x1564: 0x40576620, 0x1565: 0x40576820, 0x1566: 0x40576a20, 0x1567: 0x40576c20, + 0x1568: 0x40576e20, 0x1569: 0x40577020, 0x156a: 0x40577220, 0x156b: 0x40577420, + 0x156c: 0x40577620, 0x156d: 0x40577820, 0x156e: 0x40577a20, 0x156f: 0x40577c20, + 0x1570: 0x40577e20, 0x1571: 0x40578020, 0x1572: 0x40578220, 0x1573: 0x40578420, + 0x1574: 0x40578620, 0x1575: 0x40578820, 0x1576: 0x40578a20, 0x1577: 0x40578c20, + 0x1578: 0x40578e20, 0x1579: 0x40579020, 0x157a: 0x40579220, 0x157b: 0x40579420, + 0x157c: 0x40579620, 0x157d: 0x40579820, 0x157e: 0x40579a20, 0x157f: 0x40579c20, + // Block 0x56, offset 0x1580 + 0x1580: 0x40579e20, 0x1581: 0x4057a020, 0x1582: 0x4057a220, 0x1583: 0x4057a420, + 0x1584: 0x4057a620, 0x1585: 0x4057a820, 0x1586: 0x4057aa20, 0x1587: 0x4057ac20, + 0x1588: 0x4057ae20, 0x1589: 0x4057b020, 0x158a: 0x4057b220, 0x158b: 0x4057b420, + 0x158c: 0x4057b620, 0x158d: 0x4057b820, 0x158e: 0x4057ba20, 0x158f: 0x4057bc20, + 0x1590: 0x4057be20, 0x1591: 0x4057c020, 0x1592: 0x4057c220, 0x1593: 0x4057c420, + 0x1594: 0x4057c620, 0x1595: 0x4057c820, 0x1596: 0x4057ca20, 0x1597: 0x4057cc20, + 0x1598: 0x4057ce20, 0x1599: 0x4057d020, 0x159a: 0x4057d220, 0x159b: 0x4057d420, + 0x159c: 0x4057d620, 0x159d: 0x4057d820, 0x159e: 0x4057da20, 0x159f: 0x4057dc20, + 0x15a0: 0x4057de20, 0x15a1: 0x4057e020, 0x15a2: 0x4057e220, 0x15a3: 0x4057e420, + 0x15a4: 0x4057e620, 0x15a5: 0x4057e820, 0x15a6: 0x4057ea20, 0x15a7: 0x4057ec20, + 0x15a8: 0x4057ee20, 0x15a9: 0x4057f020, 0x15aa: 0x4057f220, 0x15ab: 0x4057f420, + 0x15ac: 0x4057f620, 0x15ad: 0x4057f820, 0x15ae: 0x4057fa20, 0x15af: 0x4057fc20, + 0x15b0: 0x4057fe20, 0x15b1: 0x40580020, 0x15b2: 0x40580220, 0x15b3: 0x40580420, + 0x15b4: 0x40580620, 0x15b5: 0x40580820, 0x15b6: 0x40580a20, 0x15b7: 0x40580c20, + 0x15b8: 0x40580e20, 0x15b9: 0x40581020, 0x15ba: 0x40581220, 0x15bb: 0x40581420, + 0x15bc: 0x40587a20, 0x15bd: 0x40581620, 0x15be: 0x40581a20, 0x15bf: 0x40581c20, + // Block 0x57, offset 0x15c0 + 0x15c0: 0x40581e20, 0x15c1: 0x40582020, 0x15c2: 0x40582220, 0x15c3: 0x40582420, + 0x15c4: 0x40582620, 0x15c5: 0x40582820, 0x15c6: 0x40582a20, 0x15c7: 0x40582c20, + 0x15c8: 0x40582e20, 0x15c9: 0x40583020, 0x15ca: 0x40583220, 0x15cb: 0x40583420, + 0x15cc: 0x40583620, 0x15cd: 0x40583820, 0x15ce: 0x40583c20, 0x15cf: 0x40583e20, + 0x15d0: 0x40584020, 0x15d1: 0x40584220, 0x15d2: 0x40584420, 0x15d3: 0x40584620, + 0x15d4: 0x40584820, 0x15d5: 0x40584a20, 0x15d6: 0x40585820, 0x15d7: 0x40585a20, + 0x15d8: 0x40585c20, 0x15d9: 0x40585e20, 0x15da: 0x40586020, 0x15db: 0x40586220, + 0x15dc: 0x40586420, 0x15dd: 0x40586620, 0x15de: 0x40586820, 0x15df: 0x40586a20, + 0x15e0: 0x40586c20, 0x15e1: 0x40586e20, 0x15e2: 0x40587020, 0x15e3: 0x40587220, + 0x15e4: 0x40587420, 0x15e5: 0x40587620, 0x15e6: 0x40587820, 0x15e7: 0x40587c20, + 0x15e8: 0x40587e20, 0x15e9: 0x40588020, 0x15ea: 0x40588220, 0x15eb: 0x40588420, + 0x15ec: 0x40588620, 0x15ed: 0x40588820, 0x15ee: 0x40588a20, 0x15ef: 0x40588c20, + 0x15f0: 0x40588e20, 0x15f1: 0x40589020, 0x15f2: 0x40589220, 0x15f3: 0x40589420, + 0x15f4: 0x40589620, 0x15f5: 0x40589820, 0x15f6: 0x40589a20, 0x15f7: 0x40589c20, + 0x15f8: 0x40589e20, 0x15f9: 0x4058a020, 0x15fa: 0x4058a220, 0x15fb: 0x4058a420, + 0x15fc: 0x4058a620, 0x15fd: 0x4058a820, 0x15fe: 0x4058aa20, 0x15ff: 0x4058ac20, + // Block 0x58, offset 0x1600 + 0x1600: 0x4058ae20, 0x1601: 0x4058b020, 0x1602: 0x4058b220, 0x1603: 0x4058b420, + 0x1604: 0x4058b620, 0x1605: 0x4058b820, 0x1606: 0x4058ba20, 0x1607: 0x4058bc20, + 0x1608: 0x4058be20, 0x1609: 0x4058c020, 0x160a: 0x4058c220, 0x160b: 0x4058c420, + 0x160c: 0x4058c620, 0x160d: 0x4058c820, 0x160e: 0x4058ca20, 0x160f: 0x4058cc20, + 0x1610: 0x4058ce20, 0x1611: 0x4058d020, 0x1612: 0x4058d220, 0x1613: 0x4058d420, + 0x1614: 0x4058d620, 0x1615: 0x4058d820, 0x1616: 0x4058da20, 0x1617: 0x4058dc20, + 0x1618: 0x4058de20, 0x1619: 0x4058e020, 0x161a: 0x4058e220, 0x161b: 0x4058e420, + 0x161c: 0x4058e620, 0x161d: 0x4058e820, 0x161e: 0x4058ea20, 0x161f: 0x4058ec20, + 0x1620: 0x4058ee20, 0x1621: 0x4058f020, 0x1622: 0x4058f220, 0x1623: 0x4058f420, + 0x1624: 0x4058f620, 0x1625: 0x4058f820, 0x1626: 0x4058fa20, 0x1627: 0x4058fc20, + 0x1628: 0x4058fe20, 0x1629: 0x40590020, 0x162a: 0x40590220, 0x162b: 0x40590420, + 0x162c: 0x40590620, 0x162d: 0x40590820, 0x162e: 0x40590a20, 0x162f: 0x40590c20, + 0x1630: 0x40590e20, 0x1631: 0x40591020, 0x1632: 0x40591220, 0x1633: 0x40591420, + 0x1634: 0x40591620, 0x1635: 0x40591820, 0x1636: 0x40591a20, 0x1637: 0x40591c20, + 0x1638: 0x40591e20, 0x1639: 0x40592020, 0x163a: 0x40592220, 0x163b: 0x40592420, + 0x163c: 0x40592620, 0x163d: 0x40592820, 0x163e: 0x40592a20, 0x163f: 0x40592c20, + // Block 0x59, offset 0x1640 + 0x1640: 0x40592e20, 0x1641: 0x40593020, 0x1642: 0x40593220, 0x1643: 0x40593420, + 0x1644: 0x40593620, 0x1645: 0x40593820, 0x1646: 0x40593a20, 0x1647: 0x40593c20, + 0x1648: 0x40593e20, 0x1649: 0x40594020, 0x164a: 0x40594220, 0x164b: 0x40594420, + 0x164c: 0x40594620, 0x164d: 0x40594820, 0x164e: 0x40594a20, 0x164f: 0x40594c20, + 0x1650: 0x40594e20, 0x1651: 0x40595020, 0x1652: 0x40595220, 0x1653: 0x40595420, + 0x1654: 0x40595620, 0x1655: 0x40595820, 0x1656: 0x40595a20, 0x1657: 0x40595c20, + 0x1658: 0x40595e20, 0x1659: 0x40596020, 0x165a: 0x40596220, 0x165b: 0x40596420, + 0x165c: 0x40596620, 0x165d: 0x40596820, 0x165e: 0x40596a20, 0x165f: 0x40596c20, + 0x1660: 0x40596e20, 0x1661: 0x40597020, 0x1662: 0x40597220, 0x1663: 0x40597420, + 0x1664: 0x40597620, 0x1665: 0x40597820, 0x1666: 0x40597a20, 0x1667: 0x40597c20, + 0x1668: 0x40597e20, 0x1669: 0x40598020, 0x166a: 0x40598220, 0x166b: 0x40598420, + 0x166c: 0x40598620, 0x166d: 0x40598820, 0x166e: 0x40598a20, 0x166f: 0x40598c20, + 0x1670: 0x40598e20, 0x1671: 0x40599020, 0x1672: 0x40599220, 0x1673: 0x40599420, + 0x1674: 0x40599620, 0x1675: 0x40599820, 0x1676: 0x40599a20, 0x1677: 0x40599c20, + 0x1678: 0x40599e20, 0x1679: 0x4059a020, 0x167a: 0x4059a220, 0x167b: 0x4059a420, + 0x167c: 0x4059a620, 0x167d: 0x4059a820, 0x167e: 0x4059aa20, 0x167f: 0x4059ac20, + // Block 0x5a, offset 0x1680 + 0x1680: 0x4059ae20, 0x1681: 0x4059b020, 0x1682: 0x4059b220, 0x1683: 0x4059b420, + 0x1684: 0x4059b620, 0x1685: 0x4059b820, 0x1686: 0x4059ba20, 0x1687: 0x4059bc20, + 0x1688: 0x4059be20, 0x1689: 0x4059c020, 0x168a: 0x4059c220, 0x168b: 0x4059c420, + 0x168c: 0x4059c620, 0x168d: 0x4059c820, 0x168e: 0x4059ca20, 0x168f: 0x4059cc20, + 0x1690: 0x4059ce20, 0x1691: 0x4059d020, 0x1692: 0x4059d220, 0x1693: 0x4059d420, + 0x1694: 0x4059d620, 0x1695: 0x4059d820, 0x1696: 0x4059da20, 0x1697: 0x4059dc20, + 0x1698: 0x4059de20, 0x1699: 0x4059e020, 0x169a: 0x4059e220, 0x169b: 0x4059e420, + 0x169c: 0x4059e620, 0x169d: 0x4059e820, 0x169e: 0x4059ea20, 0x169f: 0x4059ec20, + 0x16a0: 0x4059ee20, 0x16a1: 0x4059f020, 0x16a2: 0x4059f220, 0x16a3: 0x4059f420, + 0x16a4: 0x4059f620, 0x16a5: 0x4059f820, 0x16a6: 0x4059fa20, 0x16a7: 0x4059fc20, + 0x16a8: 0x4059fe20, 0x16a9: 0x405a0020, 0x16aa: 0x405a0220, 0x16ab: 0x405a0420, + 0x16ac: 0x405a0620, 0x16ad: 0x4005d420, 0x16ae: 0x4002f420, 0x16af: 0x40581820, + 0x16b0: 0x40583a20, 0x16b1: 0x40584c20, 0x16b2: 0x40584e20, 0x16b3: 0x40585020, + 0x16b4: 0x40585220, 0x16b5: 0x40585420, 0x16b6: 0x40585620, 0x16b7: 0x405a0820, + 0x16b8: 0x405a0a20, 0x16b9: 0x405a0c20, 0x16ba: 0x405a0e20, 0x16bb: 0x405a1020, + 0x16bc: 0x405a1220, 0x16bd: 0x405a1420, 0x16be: 0x405a1620, 0x16bf: 0x405a1820, + // Block 0x5b, offset 0x16c0 + 0x16c0: 0x00021284, 0x16c1: 0x405aa620, 0x16c2: 0x405aa820, 0x16c3: 0x405aaa20, + 0x16c4: 0x405aac20, 0x16c5: 0x405aae20, 0x16c6: 0x405ab020, 0x16c7: 0x405ab220, + 0x16c8: 0x405ab420, 0x16c9: 0x405ab620, 0x16ca: 0x405ab820, 0x16cb: 0x405aba20, + 0x16cc: 0x405abc20, 0x16cd: 0x405abe20, 0x16ce: 0x405ac020, 0x16cf: 0x405ac220, + 0x16d0: 0x405ac420, 0x16d1: 0x405ac620, 0x16d2: 0x405ac820, 0x16d3: 0x405aca20, + 0x16d4: 0x405acc20, 0x16d5: 0x405ace20, 0x16d6: 0x405ad020, 0x16d7: 0x405ad220, + 0x16d8: 0x405ad420, 0x16d9: 0x405ad620, 0x16da: 0x405ad820, 0x16db: 0x40040820, + 0x16dc: 0x40040a20, + 0x16e0: 0x405ada20, 0x16e1: 0xe000202d, 0x16e2: 0x405adc20, 0x16e3: 0x405b1420, + 0x16e4: 0xe0002030, 0x16e5: 0xe0002033, 0x16e6: 0x405ade20, 0x16e7: 0xe0002036, + 0x16e8: 0x405ae020, 0x16e9: 0xe000203c, 0x16ea: 0x405b1020, 0x16eb: 0x405b1220, + 0x16ec: 0xe000203f, 0x16ed: 0xe0002042, 0x16ee: 0xe0002045, 0x16ef: 0x405ae220, + 0x16f0: 0x405ae420, 0x16f1: 0x405ae620, 0x16f2: 0x405ae820, 0x16f3: 0xe0002048, + 0x16f4: 0xe000204b, 0x16f5: 0xe000204e, 0x16f6: 0xe0002051, 0x16f7: 0x405aea20, + 0x16f8: 0x405b1a20, 0x16f9: 0x405aec20, 0x16fa: 0x405aee20, 0x16fb: 0xe0002057, + 0x16fc: 0xe000205a, 0x16fd: 0xe000205d, 0x16fe: 0x405af020, 0x16ff: 0xe0002060, + // Block 0x5c, offset 0x1700 + 0x1700: 0xe0002063, 0x1701: 0x405af220, 0x1702: 0xe0002066, 0x1703: 0x405af420, + 0x1704: 0xe0002069, 0x1705: 0x405af620, 0x1706: 0xe000206c, 0x1707: 0x405af820, + 0x1708: 0x405afa20, 0x1709: 0x405afc20, 0x170a: 0x405afe20, 0x170b: 0xe0002075, + 0x170c: 0xe000207b, 0x170d: 0xe000207e, 0x170e: 0xe0002081, 0x170f: 0x405b0020, + 0x1710: 0xe0002084, 0x1711: 0xe0002087, 0x1712: 0x405b0220, 0x1713: 0xe000208a, + 0x1714: 0xe000208d, 0x1715: 0xe0002072, 0x1716: 0x405b0420, 0x1717: 0x405b0620, + 0x1718: 0xe0002090, 0x1719: 0xe0002093, 0x171a: 0x405b0820, 0x171b: 0xe000209b, + 0x171c: 0x405b0a20, 0x171d: 0xe000209e, 0x171e: 0x405b0c20, 0x171f: 0x405b0e20, + 0x1720: 0x405b1620, 0x1721: 0x405b1e20, 0x1722: 0x405b2020, 0x1723: 0x405b1820, + 0x1724: 0x405b1c20, 0x1725: 0x405b2220, 0x1726: 0x405b2420, 0x1727: 0xe00020a1, + 0x1728: 0xe00020a4, 0x1729: 0xe0002054, 0x172a: 0xe0002078, 0x172b: 0x4002b220, + 0x172c: 0x4002b420, 0x172d: 0x4002b620, 0x172e: 0xe000206f, 0x172f: 0xe0002096, + 0x1730: 0xe0002039, + // Block 0x5d, offset 0x1740 + 0x1740: 0x404c7620, 0x1741: 0x404c7820, 0x1742: 0x404c7a20, 0x1743: 0x404c7c20, + 0x1744: 0x404c7e20, 0x1745: 0x404c8020, 0x1746: 0x404c8220, 0x1747: 0x404c8420, + 0x1748: 0x404c8620, 0x1749: 0x404c8820, 0x174a: 0x404c8a20, 0x174b: 0x404c8c20, + 0x174c: 0x404c8e20, 0x174e: 0x404c9020, 0x174f: 0x404c9220, + 0x1750: 0x404c9420, 0x1751: 0x404c9620, 0x1752: 0x404c9820, 0x1753: 0x404c9a20, + 0x1754: 0x8209264e, + 0x1760: 0x404c9e20, 0x1761: 0x404ca020, 0x1762: 0x404ca220, 0x1763: 0x404ca420, + 0x1764: 0x404ca620, 0x1765: 0x404ca820, 0x1766: 0x404caa20, 0x1767: 0x404cac20, + 0x1768: 0x404cae20, 0x1769: 0x404cb020, 0x176a: 0x404cb220, 0x176b: 0x404cb420, + 0x176c: 0x404cb620, 0x176d: 0x404cb820, 0x176e: 0x404cba20, 0x176f: 0x404cbc20, + 0x1770: 0x404cbe20, 0x1771: 0x404cc020, 0x1772: 0x404cc220, 0x1773: 0x404cc420, + 0x1774: 0x82092663, 0x1775: 0x40031c20, 0x1776: 0x40031e20, + // Block 0x5e, offset 0x1780 + 0x1780: 0x404cc820, 0x1781: 0x404cca20, 0x1782: 0x404ccc20, 0x1783: 0x404cce20, + 0x1784: 0x404cd020, 0x1785: 0x404cd220, 0x1786: 0x404cd420, 0x1787: 0x404cd620, + 0x1788: 0x404cd820, 0x1789: 0x404cda20, 0x178a: 0x404cdc20, 0x178b: 0x404cde20, + 0x178c: 0x404ce020, 0x178d: 0x404ce220, 0x178e: 0x404ce420, 0x178f: 0x404ce620, + 0x1790: 0x404ce820, 0x1791: 0x404cea20, 0x1792: 0x404cec20, 0x1793: 0x404cee20, + 0x17a0: 0x404cf020, 0x17a1: 0x404cf220, 0x17a2: 0x404cf420, 0x17a3: 0x404cf620, + 0x17a4: 0x404cf820, 0x17a5: 0x404cfa20, 0x17a6: 0x404cfc20, 0x17a7: 0x404cfe20, + 0x17a8: 0x404d0020, 0x17a9: 0x404d0220, 0x17aa: 0x404d0420, 0x17ab: 0x404d0620, + 0x17ac: 0x404d0820, 0x17ae: 0x404d0a20, 0x17af: 0x404d0c20, + 0x17b0: 0x404d0e20, 0x17b2: 0x404d1020, 0x17b3: 0x404d1220, + // Block 0x5f, offset 0x17c0 + 0x17c0: 0x404fa420, 0x17c1: 0x404fa620, 0x17c2: 0x404fa820, 0x17c3: 0x404faa20, + 0x17c4: 0x404fac20, 0x17c5: 0x404fae20, 0x17c6: 0x404fb020, 0x17c7: 0x404fb220, + 0x17c8: 0x404fb420, 0x17c9: 0x404fb620, 0x17ca: 0x404fb820, 0x17cb: 0x404fba20, + 0x17cc: 0x404fbc20, 0x17cd: 0x404fbe20, 0x17ce: 0x404fc020, 0x17cf: 0x404fc220, + 0x17d0: 0x404fc420, 0x17d1: 0x404fc620, 0x17d2: 0x404fc820, 0x17d3: 0x404fca20, + 0x17d4: 0x404fcc20, 0x17d5: 0x404fce20, 0x17d6: 0x404fd020, 0x17d7: 0x404fd220, + 0x17d8: 0x404fd420, 0x17d9: 0x404fd620, 0x17da: 0x404fd820, 0x17db: 0x404fda20, + 0x17dc: 0x404fdc20, 0x17dd: 0x404fde20, 0x17de: 0x404fe020, 0x17df: 0x404fe220, + 0x17e0: 0x404fe420, 0x17e1: 0x404fe620, 0x17e2: 0x404fe820, 0x17e3: 0x404fec20, + 0x17e4: 0x404fee20, 0x17e5: 0x404ff020, 0x17e6: 0x404ff220, 0x17e7: 0x404ff420, + 0x17e8: 0x404ff620, 0x17e9: 0x404ff820, 0x17ea: 0x404ffa20, 0x17eb: 0x404ffc20, + 0x17ec: 0x404ffe20, 0x17ed: 0x40500020, 0x17ee: 0x40500220, 0x17ef: 0x40500420, + 0x17f0: 0x40500620, 0x17f1: 0x40500820, 0x17f2: 0x40500a20, 0x17f3: 0x40500c20, + 0x17f4: 0xa0000000, 0x17f5: 0xa0000000, 0x17f6: 0x40500e20, 0x17f7: 0x40501020, + 0x17f8: 0x40501220, 0x17f9: 0x40501420, 0x17fa: 0x40501620, 0x17fb: 0x40501820, + 0x17fc: 0x40501a20, 0x17fd: 0x40501c20, 0x17fe: 0x40501e20, 0x17ff: 0x40502020, + // Block 0x60, offset 0x1800 + 0x1800: 0x40502220, 0x1801: 0x40502420, 0x1802: 0x40502620, 0x1803: 0x40502820, + 0x1804: 0x40502a20, 0x1805: 0x40502c20, 0x1806: 0xa000f302, 0x1807: 0xa000f402, + 0x1808: 0xa0011402, 0x1809: 0xa0011502, 0x180a: 0xa0011602, 0x180b: 0xa0005f02, + 0x180c: 0xa0005f02, 0x180d: 0xa0005f02, 0x180e: 0xa0005f02, 0x180f: 0xa0005f02, + 0x1810: 0xa0005f02, 0x1811: 0xa0005f02, 0x1812: 0x82092817, 0x1813: 0xa0000000, + 0x1814: 0x40032620, 0x1815: 0x40032820, 0x1816: 0x4002ac20, 0x1817: 0x4027bc20, + 0x1818: 0x4005bc20, 0x1819: 0x4005be20, 0x181a: 0x4005c020, 0x181b: 0x4027f620, + 0x181c: 0x404fea20, 0x181d: 0xae605f02, + 0x1820: 0xe00001b5, 0x1821: 0xe0000249, 0x1822: 0xe0000361, 0x1823: 0xe000043b, + 0x1824: 0xe0000510, 0x1825: 0xe00005da, 0x1826: 0xe00006a5, 0x1827: 0xe000074d, + 0x1828: 0xe00007f9, 0x1829: 0xe000089e, + 0x1830: 0xe00001b8, 0x1831: 0xe000024c, 0x1832: 0xe0000364, 0x1833: 0xe000043e, + 0x1834: 0xe0000513, 0x1835: 0xe00005dd, 0x1836: 0xe00006a8, 0x1837: 0xe0000750, + 0x1838: 0xe00007fc, 0x1839: 0xe00008a1, + // Block 0x61, offset 0x1840 + 0x1840: 0x40056a20, 0x1841: 0x4002e620, 0x1842: 0x40025220, 0x1843: 0x4002f020, + 0x1844: 0x4002a620, 0x1845: 0x4002a820, 0x1846: 0x40022220, 0x1847: 0x40022420, + 0x1848: 0x40025420, 0x1849: 0x4002f220, 0x184a: 0xa0000000, 0x184b: 0xa0000000, + 0x184c: 0xa0000000, 0x184d: 0xa0000000, 0x184e: 0x40020c20, + 0x1850: 0xe00001c7, 0x1851: 0xe000025b, 0x1852: 0xe0000373, 0x1853: 0xe000044d, + 0x1854: 0xe0000522, 0x1855: 0xe00005ec, 0x1856: 0xe00006b7, 0x1857: 0xe000075f, + 0x1858: 0xe000080b, 0x1859: 0xe00008b0, + 0x1860: 0x40533820, 0x1861: 0x40533c20, 0x1862: 0x40534220, 0x1863: 0x40534e20, + 0x1864: 0x40535220, 0x1865: 0x40535820, 0x1866: 0x40535c20, 0x1867: 0x40536220, + 0x1868: 0x40536420, 0x1869: 0x40536620, 0x186a: 0x40537020, 0x186b: 0x40537420, + 0x186c: 0x40537a20, 0x186d: 0x40537e20, 0x186e: 0x40538820, 0x186f: 0x40538c20, + 0x1870: 0x40538e20, 0x1871: 0x40539020, 0x1872: 0x40539e20, 0x1873: 0x4053a420, + 0x1874: 0x4053aa20, 0x1875: 0x4053b420, 0x1876: 0x4053bc20, 0x1877: 0x4053c220, + 0x1878: 0x4053c620, 0x1879: 0x4053ca20, 0x187a: 0x4053d020, 0x187b: 0x4053da20, + 0x187c: 0x4053dc20, 0x187d: 0x4053e220, 0x187e: 0x4053ea20, 0x187f: 0x4053f020, + // Block 0x62, offset 0x1880 + 0x1880: 0x4053f220, 0x1881: 0x4053f420, 0x1882: 0x4053f620, 0x1883: 0x40533620, + 0x1884: 0x40533e20, 0x1885: 0x40534420, 0x1886: 0x40535020, 0x1887: 0x40535420, + 0x1888: 0x40535a20, 0x1889: 0x40535e20, 0x188a: 0x40536820, 0x188b: 0x40537220, + 0x188c: 0x40537620, 0x188d: 0x40537c20, 0x188e: 0x40538020, 0x188f: 0x40538a20, + 0x1890: 0x4053a020, 0x1891: 0x4053a620, 0x1892: 0x4053ac20, 0x1893: 0x4053b620, + 0x1894: 0x4053de20, 0x1895: 0x4053be20, 0x1896: 0x4053c820, 0x1897: 0x4053d220, + 0x1898: 0x4053e620, 0x1899: 0x4053ec20, 0x189a: 0x4053f820, 0x189b: 0x4053fa20, + 0x189c: 0x4053b020, 0x189d: 0x40534020, 0x189e: 0x40534620, 0x189f: 0x40534c20, + 0x18a0: 0x40536020, 0x18a1: 0x40535620, 0x18a2: 0x40536a20, 0x18a3: 0x4053d420, + 0x18a4: 0x40538220, 0x18a5: 0x40538620, 0x18a6: 0x40537820, 0x18a7: 0x40539220, + 0x18a8: 0x4053a220, 0x18a9: 0x4053a820, 0x18aa: 0x4053b820, 0x18ab: 0x4053cc20, + 0x18ac: 0x4053e820, 0x18ad: 0x4053ee20, 0x18ae: 0x4053e020, 0x18af: 0x4053e420, + 0x18b0: 0x4053fc20, 0x18b1: 0x4053ae20, 0x18b2: 0x4053c020, 0x18b3: 0x40534820, + 0x18b4: 0x4053d620, 0x18b5: 0x4053c420, 0x18b6: 0x4053ce20, 0x18b7: 0x4053ba20, + // Block 0x63, offset 0x18c0 + 0x18c0: 0x40532820, 0x18c1: 0x40532a20, 0x18c2: 0x40532c20, 0x18c3: 0x40532e20, + 0x18c4: 0x40533020, 0x18c5: 0x40533220, 0x18c6: 0x40533420, 0x18c7: 0x40533a20, + 0x18c8: 0x40534a20, 0x18c9: 0x4053d820, 0x18ca: 0x40536c20, 0x18cb: 0x4053b220, + 0x18cc: 0x4053fe20, 0x18cd: 0x40540220, 0x18ce: 0x40540420, 0x18cf: 0x40540820, + 0x18d0: 0x40540a20, 0x18d1: 0x40541020, 0x18d2: 0x40541420, 0x18d3: 0x40541620, + 0x18d4: 0x40541a20, 0x18d5: 0x40541e20, 0x18d6: 0x40542220, 0x18d7: 0x40542420, + 0x18d8: 0x40540c20, 0x18d9: 0x40542020, 0x18da: 0x40538420, 0x18db: 0x40536e20, + 0x18dc: 0x40539420, 0x18dd: 0x40539620, 0x18de: 0x40540020, 0x18df: 0x40540620, + 0x18e0: 0x40540e20, 0x18e1: 0x40541220, 0x18e2: 0x40539820, 0x18e3: 0x40541c20, + 0x18e4: 0x40539a20, 0x18e5: 0x40539c20, 0x18e6: 0x40542620, 0x18e7: 0x40542820, + 0x18e8: 0x40541820, 0x18e9: 0x82e42a16, 0x18ea: 0x40542a20, + 0x18f0: 0x405a1a20, 0x18f1: 0x405a1c20, 0x18f2: 0x405a1e20, 0x18f3: 0x405a2020, + 0x18f4: 0x405a2220, 0x18f5: 0x405a2420, 0x18f6: 0x405a2620, 0x18f7: 0x405a2820, + 0x18f8: 0x405a2a20, 0x18f9: 0x405a2c20, 0x18fa: 0x405a2e20, 0x18fb: 0x405a3020, + 0x18fc: 0x405a3220, 0x18fd: 0x405a3420, 0x18fe: 0x405a3620, 0x18ff: 0x405a3820, + // Block 0x64, offset 0x1900 + 0x1900: 0x405a3a20, 0x1901: 0x405a3c20, 0x1902: 0x405a3e20, 0x1903: 0x405a4020, + 0x1904: 0x405a4220, 0x1905: 0x405a4420, 0x1906: 0x405a4620, 0x1907: 0x405a4820, + 0x1908: 0x405a4a20, 0x1909: 0x405a4c20, 0x190a: 0x405a4e20, 0x190b: 0x405a5020, + 0x190c: 0x405a5220, 0x190d: 0x405a5420, 0x190e: 0x405a5620, 0x190f: 0x405a5820, + 0x1910: 0x405a5a20, 0x1911: 0x405a5c20, 0x1912: 0x405a5e20, 0x1913: 0x405a6020, + 0x1914: 0x405a6220, 0x1915: 0x405a6420, 0x1916: 0x405a6620, 0x1917: 0x405a6820, + 0x1918: 0x405a6a20, 0x1919: 0x405a6c20, 0x191a: 0x405a6e20, 0x191b: 0x405a7020, + 0x191c: 0x405a7220, 0x191d: 0x405a7420, 0x191e: 0x405a7620, 0x191f: 0x405a7820, + 0x1920: 0x405a7a20, 0x1921: 0x405a7c20, 0x1922: 0x405a7e20, 0x1923: 0x405a8020, + 0x1924: 0x405a8220, 0x1925: 0x405a8420, 0x1926: 0x405a8620, 0x1927: 0x405a8820, + 0x1928: 0x405a8a20, 0x1929: 0x405a8c20, 0x192a: 0x405a8e20, 0x192b: 0x405a9020, + 0x192c: 0x405a9220, 0x192d: 0x405a9420, 0x192e: 0x405a9620, 0x192f: 0x405a9820, + 0x1930: 0x405a9a20, 0x1931: 0x405a9c20, 0x1932: 0x405a9e20, 0x1933: 0x405aa020, + 0x1934: 0x405aa220, 0x1935: 0x405aa420, + // Block 0x65, offset 0x1940 + 0x1940: 0x404c1220, 0x1941: 0x404c1420, 0x1942: 0x404c1620, 0x1943: 0x404c1820, + 0x1944: 0x404c1a20, 0x1945: 0x404c1c20, 0x1946: 0x404c1e20, 0x1947: 0x404c2020, + 0x1948: 0x404c2220, 0x1949: 0x404c2420, 0x194a: 0x404c2620, 0x194b: 0x404c2820, + 0x194c: 0x404c2a20, 0x194d: 0x404c2c20, 0x194e: 0x404c2e20, 0x194f: 0x404c3020, + 0x1950: 0x404c3220, 0x1951: 0x404c3420, 0x1952: 0x404c3620, 0x1953: 0x404c3820, + 0x1954: 0x404c3a20, 0x1955: 0x404c3c20, 0x1956: 0x404c3e20, 0x1957: 0x404c4020, + 0x1958: 0x404c4220, 0x1959: 0x404c4420, 0x195a: 0x404c4620, 0x195b: 0x404c4820, + 0x195c: 0x404c4a20, + 0x1960: 0x404c4c20, 0x1961: 0x404c4e20, 0x1962: 0x404c5020, 0x1963: 0x404c5220, + 0x1964: 0x404c5420, 0x1965: 0x404c5620, 0x1966: 0x404c5820, 0x1967: 0x404c5a20, + 0x1968: 0x404c5c20, 0x1969: 0x404c5e20, 0x196a: 0x404c6020, 0x196b: 0x404c6220, + 0x1970: 0x404c6420, 0x1971: 0x404c6620, 0x1972: 0x404c6820, 0x1973: 0x404c6a20, + 0x1974: 0x404c6c20, 0x1975: 0x404c6e20, 0x1976: 0x404c7020, 0x1977: 0x404c7220, + 0x1978: 0x404c7420, 0x1979: 0xade11f02, 0x197a: 0xae612002, 0x197b: 0xadc12102, + // Block 0x66, offset 0x1980 + 0x1980: 0x4007a620, + 0x1984: 0x4002c220, 0x1985: 0x4002d220, 0x1986: 0xe000018e, 0x1987: 0xe000021f, + 0x1988: 0xe000033a, 0x1989: 0xe0000414, 0x198a: 0xe00004e9, 0x198b: 0xe00005b3, + 0x198c: 0xe000067e, 0x198d: 0xe0000726, 0x198e: 0xe00007d2, 0x198f: 0xe0000877, + 0x1990: 0x40503020, 0x1991: 0x40503220, 0x1992: 0x40503420, 0x1993: 0x40503620, + 0x1994: 0x40503820, 0x1995: 0x40503a20, 0x1996: 0x40503c20, 0x1997: 0x40503e20, + 0x1998: 0x40504020, 0x1999: 0x40504220, 0x199a: 0x40504420, 0x199b: 0x40504620, + 0x199c: 0x40504820, 0x199d: 0x40504a20, 0x199e: 0x40504c20, 0x199f: 0x40504e20, + 0x19a0: 0x40505020, 0x19a1: 0x40505220, 0x19a2: 0x40505420, 0x19a3: 0x40505620, + 0x19a4: 0x40505820, 0x19a5: 0x40505a20, 0x19a6: 0x40505c20, 0x19a7: 0x40505e20, + 0x19a8: 0x40506020, 0x19a9: 0x40506220, 0x19aa: 0x40506420, 0x19ab: 0x40506620, + 0x19ac: 0x40506820, 0x19ad: 0x40506a20, + 0x19b0: 0x40506c20, 0x19b1: 0x40506e20, 0x19b2: 0x40507020, 0x19b3: 0x40507220, + 0x19b4: 0x40507420, + // Block 0x67, offset 0x19c0 + 0x19c0: 0x40507620, 0x19c1: 0x40507820, 0x19c2: 0x40507a20, 0x19c3: 0x40507c20, + 0x19c4: 0x40507e20, 0x19c5: 0x40508020, 0x19c6: 0x40508220, 0x19c7: 0x40508420, + 0x19c8: 0x40508620, 0x19c9: 0x40508820, 0x19ca: 0x40508a20, 0x19cb: 0x40508c20, + 0x19cc: 0x40508e20, 0x19cd: 0x40509020, 0x19ce: 0x40509220, 0x19cf: 0x40509420, + 0x19d0: 0x40509620, 0x19d1: 0x40509820, 0x19d2: 0x40509a20, 0x19d3: 0x40509c20, + 0x19d4: 0x40509e20, 0x19d5: 0x4050a020, 0x19d6: 0x4050a220, 0x19d7: 0x4050a420, + 0x19d8: 0x4050a620, 0x19d9: 0x4050a820, 0x19da: 0x4050aa20, 0x19db: 0x4050ac20, + 0x19dc: 0x4050ae20, 0x19dd: 0x4050b020, 0x19de: 0x4050b220, 0x19df: 0x4050b420, + 0x19e0: 0x4050b620, 0x19e1: 0x4050b820, 0x19e2: 0x4050ba20, 0x19e3: 0x4050bc20, + 0x19e4: 0x4050be20, 0x19e5: 0x4050c020, 0x19e6: 0x4050c220, 0x19e7: 0x4050c420, + 0x19e8: 0x4050c620, 0x19e9: 0x4050c820, 0x19ea: 0x4050ca20, 0x19eb: 0x4050cc20, + 0x19f0: 0x4050ce20, 0x19f1: 0x4050d020, 0x19f2: 0x4050d220, 0x19f3: 0x4050d420, + 0x19f4: 0x4050d620, 0x19f5: 0x4050d820, 0x19f6: 0x4050da20, 0x19f7: 0x4050dc20, + 0x19f8: 0x4050de20, 0x19f9: 0x4050e020, 0x19fa: 0x4050e220, 0x19fb: 0x4050e420, + 0x19fc: 0x4050e620, 0x19fd: 0x4050e820, 0x19fe: 0x4050ea20, 0x19ff: 0x4050ec20, + // Block 0x68, offset 0x1a00 + 0x1a00: 0x4050ee20, 0x1a01: 0x4050f020, 0x1a02: 0x4050f220, 0x1a03: 0x4050f420, + 0x1a04: 0x4050f620, 0x1a05: 0x4050f820, 0x1a06: 0x4050fa20, 0x1a07: 0x4050fc20, + 0x1a08: 0x4050fe20, 0x1a09: 0x40510020, + 0x1a10: 0xe0000191, 0x1a11: 0xe0000222, 0x1a12: 0xe000033d, 0x1a13: 0xe0000417, + 0x1a14: 0xe00004ec, 0x1a15: 0xe00005b6, 0x1a16: 0xe0000681, 0x1a17: 0xe0000729, + 0x1a18: 0xe00007d5, 0x1a19: 0xe000087a, 0x1a1a: 0xe0000225, + 0x1a1e: 0xe0002022, 0x1a1f: 0xe0002025, + 0x1a20: 0x4007b220, 0x1a21: 0x4007b420, 0x1a22: 0x4007b620, 0x1a23: 0x4007b820, + 0x1a24: 0x4007ba20, 0x1a25: 0x4007bc20, 0x1a26: 0x4007be20, 0x1a27: 0x4007c020, + 0x1a28: 0x4007c220, 0x1a29: 0x4007c420, 0x1a2a: 0x4007c620, 0x1a2b: 0x4007c820, + 0x1a2c: 0x4007ca20, 0x1a2d: 0x4007cc20, 0x1a2e: 0x4007ce20, 0x1a2f: 0x4007d020, + 0x1a30: 0x4007d220, 0x1a31: 0x4007d420, 0x1a32: 0x4007d620, 0x1a33: 0x4007d820, + 0x1a34: 0x4007da20, 0x1a35: 0x4007dc20, 0x1a36: 0x4007de20, 0x1a37: 0x4007e020, + 0x1a38: 0x4007e220, 0x1a39: 0x4007e420, 0x1a3a: 0x4007e620, 0x1a3b: 0x4007e820, + 0x1a3c: 0x4007ea20, 0x1a3d: 0x4007ec20, 0x1a3e: 0x4007ee20, 0x1a3f: 0x4007f020, + // Block 0x69, offset 0x1a40 + 0x1a40: 0x404d1420, 0x1a41: 0x404d1620, 0x1a42: 0x404d1820, 0x1a43: 0x404d1a20, + 0x1a44: 0x404d1c20, 0x1a45: 0x404d1e20, 0x1a46: 0x404d2020, 0x1a47: 0x404d2220, + 0x1a48: 0x404d2420, 0x1a49: 0x404d2620, 0x1a4a: 0x404d2820, 0x1a4b: 0x404d2a20, + 0x1a4c: 0x404d2c20, 0x1a4d: 0x404d2e20, 0x1a4e: 0x404d3020, 0x1a4f: 0x404d3220, + 0x1a50: 0x404d3420, 0x1a51: 0x404d3620, 0x1a52: 0x404d3820, 0x1a53: 0x404d3a20, + 0x1a54: 0x404d3c20, 0x1a55: 0x404d3e20, 0x1a56: 0x404d4020, 0x1a57: 0x82e626a1, + 0x1a58: 0x82dc26a2, 0x1a59: 0x404d4620, 0x1a5a: 0x404d4820, 0x1a5b: 0x404d4a20, + 0x1a5e: 0x40036620, 0x1a5f: 0x40036820, + 0x1a60: 0x40510220, 0x1a61: 0x40510420, 0x1a62: 0x40510620, 0x1a63: 0x40510820, + 0x1a64: 0x40510a20, 0x1a65: 0x40510c20, 0x1a66: 0x40510e20, 0x1a67: 0x40511020, + 0x1a68: 0x40511220, 0x1a69: 0x40511420, 0x1a6a: 0x40511620, 0x1a6b: 0x40511820, + 0x1a6c: 0x40511a20, 0x1a6d: 0x40511c20, 0x1a6e: 0x40511e20, 0x1a6f: 0x40512020, + 0x1a70: 0x40512220, 0x1a71: 0x40512420, 0x1a72: 0x40512620, 0x1a73: 0x40512820, + 0x1a74: 0x40512a20, 0x1a75: 0x40512c20, 0x1a76: 0x40512e20, 0x1a77: 0x40513020, + 0x1a78: 0x40513220, 0x1a79: 0x40513420, 0x1a7a: 0x40513620, 0x1a7b: 0x40513820, + 0x1a7c: 0x40513a20, 0x1a7d: 0x40513c20, 0x1a7e: 0x40513e20, 0x1a7f: 0x40514020, + // Block 0x6a, offset 0x1a80 + 0x1a80: 0x40514220, 0x1a81: 0x40514420, 0x1a82: 0x40514620, 0x1a83: 0x40514820, + 0x1a84: 0x40514a20, 0x1a85: 0x40514c20, 0x1a86: 0x40514e20, 0x1a87: 0x40515020, + 0x1a88: 0x40515220, 0x1a89: 0x40515420, 0x1a8a: 0x40515620, 0x1a8b: 0x40515820, + 0x1a8c: 0x40515a20, 0x1a8d: 0x40516c20, 0x1a8e: 0x40516e20, 0x1a8f: 0x40517020, + 0x1a90: 0x40517220, 0x1a91: 0x40517420, 0x1a92: 0x40517620, 0x1a93: 0x40515c20, + 0x1a94: 0xe0002029, 0x1a95: 0x40516020, 0x1a96: 0x40516220, 0x1a97: 0x40516420, + 0x1a98: 0x00510e84, 0x1a99: 0x00510e84, 0x1a9a: 0x00513884, 0x1a9b: 0x00513884, + 0x1a9c: 0x40516620, 0x1a9d: 0x40516820, 0x1a9e: 0x40516a20, + 0x1aa0: 0x820928cd, 0x1aa1: 0x40517820, 0x1aa2: 0x40517c20, 0x1aa3: 0x40517e20, + 0x1aa4: 0x00517e84, 0x1aa5: 0x40518020, 0x1aa6: 0x40518220, 0x1aa7: 0x40518420, + 0x1aa8: 0x40518620, 0x1aa9: 0x40518820, 0x1aaa: 0x40518a20, 0x1aab: 0x40515e20, + 0x1aac: 0x40517a20, 0x1aad: 0x40519820, 0x1aae: 0x40518c20, 0x1aaf: 0x40518e20, + 0x1ab0: 0x40519220, 0x1ab1: 0x40519420, 0x1ab2: 0x40519620, 0x1ab3: 0x40519020, + 0x1ab4: 0xa000f302, 0x1ab5: 0xae611702, 0x1ab6: 0xae611802, 0x1ab7: 0xae611902, + 0x1ab8: 0xae611a02, 0x1ab9: 0xae611b02, 0x1aba: 0xae611c02, 0x1abb: 0xae611d02, + 0x1abc: 0xae611e02, 0x1abf: 0xadc00000, + // Block 0x6b, offset 0x1ac0 + 0x1ac0: 0xe0000194, 0x1ac1: 0xe0000228, 0x1ac2: 0xe0000340, 0x1ac3: 0xe000041a, + 0x1ac4: 0xe00004ef, 0x1ac5: 0xe00005b9, 0x1ac6: 0xe0000684, 0x1ac7: 0xe000072c, + 0x1ac8: 0xe00007d8, 0x1ac9: 0xe000087d, + 0x1ad0: 0xe0000197, 0x1ad1: 0xe000022b, 0x1ad2: 0xe0000343, 0x1ad3: 0xe000041d, + 0x1ad4: 0xe00004f2, 0x1ad5: 0xe00005bc, 0x1ad6: 0xe0000687, 0x1ad7: 0xe000072f, + 0x1ad8: 0xe00007db, 0x1ad9: 0xe0000880, + 0x1ae0: 0x4005c220, 0x1ae1: 0x4005c420, 0x1ae2: 0x4005c620, 0x1ae3: 0x4005c820, + 0x1ae4: 0x4005ca20, 0x1ae5: 0x4005cc20, 0x1ae6: 0x4005ce20, 0x1ae7: 0x4027be20, + 0x1ae8: 0x40032a20, 0x1ae9: 0x40032c20, 0x1aea: 0x40032e20, 0x1aeb: 0x40033020, + 0x1aec: 0x4005d020, 0x1aed: 0x4005d220, + // Block 0x6c, offset 0x1b00 + 0x1b00: 0xa000f202, 0x1b01: 0xa000f202, 0x1b02: 0xa000f302, 0x1b03: 0xa000f702, + 0x1b04: 0xa000f402, 0x1b05: 0xc3190821, 0x1b06: 0x40522820, 0x1b07: 0xc31b0821, + 0x1b08: 0x40522c20, 0x1b09: 0xc31d0821, 0x1b0a: 0x40523020, 0x1b0b: 0xc31f0821, + 0x1b0c: 0x40523420, 0x1b0d: 0xc3210821, 0x1b0e: 0x40523820, 0x1b0f: 0x40523a20, + 0x1b10: 0x40523c20, 0x1b11: 0xc3230821, 0x1b12: 0x40524020, 0x1b13: 0x40524220, + 0x1b14: 0x40524820, 0x1b15: 0x40524a20, 0x1b16: 0x40524c20, 0x1b17: 0x40524e20, + 0x1b18: 0x40525020, 0x1b19: 0x40525220, 0x1b1a: 0x40525420, 0x1b1b: 0x40525620, + 0x1b1c: 0x40525820, 0x1b1d: 0x40525a20, 0x1b1e: 0x40525c20, 0x1b1f: 0x40525e20, + 0x1b20: 0x40526020, 0x1b21: 0x40526220, 0x1b22: 0x40526420, 0x1b23: 0x40526820, + 0x1b24: 0x40526a20, 0x1b25: 0x40526c20, 0x1b26: 0x40526e20, 0x1b27: 0x40527020, + 0x1b28: 0x40527420, 0x1b29: 0x40527620, 0x1b2a: 0x40527820, 0x1b2b: 0x40527a20, + 0x1b2c: 0x40527c20, 0x1b2d: 0x40527e20, 0x1b2e: 0x40528020, 0x1b2f: 0x40528220, + 0x1b30: 0x40528620, 0x1b31: 0x40528820, 0x1b32: 0x40528a20, 0x1b33: 0x40529020, + 0x1b34: 0xa070f102, 0x1b35: 0x40529220, 0x1b36: 0x40529420, 0x1b37: 0x40529620, + 0x1b38: 0x40529820, 0x1b39: 0x40529a20, 0x1b3a: 0xc3250821, 0x1b3b: 0x40529e20, + 0x1b3c: 0xc3270821, 0x1b3d: 0x4052a220, 0x1b3e: 0xc3290821, 0x1b3f: 0xc32b0821, + // Block 0x6d, offset 0x1b40 + 0x1b40: 0x4052a820, 0x1b41: 0x4052aa20, 0x1b42: 0xc32d0821, 0x1b43: 0x4052ae20, + 0x1b44: 0x82092958, 0x1b45: 0x40524420, 0x1b46: 0x40524620, 0x1b47: 0x40526620, + 0x1b48: 0x40527220, 0x1b49: 0x40528420, 0x1b4a: 0x40528c20, 0x1b4b: 0x40528e20, + 0x1b50: 0xe00001be, 0x1b51: 0xe0000252, 0x1b52: 0xe000036a, 0x1b53: 0xe0000444, + 0x1b54: 0xe0000519, 0x1b55: 0xe00005e3, 0x1b56: 0xe00006ae, 0x1b57: 0xe0000756, + 0x1b58: 0xe0000802, 0x1b59: 0xe00008a7, 0x1b5a: 0x40036a20, 0x1b5b: 0x40036c20, + 0x1b5c: 0x4002f620, 0x1b5d: 0x4002ae20, 0x1b5e: 0x40033220, 0x1b5f: 0x40033420, + 0x1b60: 0x40022020, 0x1b61: 0x4007f220, 0x1b62: 0x4007f420, 0x1b63: 0x4007f620, + 0x1b64: 0x4007f820, 0x1b65: 0x4007fa20, 0x1b66: 0x4007fc20, 0x1b67: 0x4007fe20, + 0x1b68: 0x40080020, 0x1b69: 0x40080220, 0x1b6a: 0x40080420, 0x1b6b: 0xae600000, + 0x1b6c: 0xadc00000, 0x1b6d: 0xae600000, 0x1b6e: 0xae600000, 0x1b6f: 0xae600000, + 0x1b70: 0xae600000, 0x1b71: 0xae600000, 0x1b72: 0xae600000, 0x1b73: 0xae600000, + 0x1b74: 0x40080620, 0x1b75: 0x40080820, 0x1b76: 0x40080a20, 0x1b77: 0x40080c20, + 0x1b78: 0x40080e20, 0x1b79: 0x40081020, 0x1b7a: 0x40081220, 0x1b7b: 0x40081420, + 0x1b7c: 0x40081620, + // Block 0x6e, offset 0x1b80 + 0x1b80: 0xa000f302, 0x1b81: 0xa000f902, 0x1b82: 0xa000f402, 0x1b83: 0x4047d420, + 0x1b84: 0x4047d620, 0x1b85: 0x4047d820, 0x1b86: 0x4047da20, 0x1b87: 0x4047dc20, + 0x1b88: 0x4047de20, 0x1b89: 0x4047e020, 0x1b8a: 0x4047e220, 0x1b8b: 0x4047e620, + 0x1b8c: 0x4047e820, 0x1b8d: 0x4047ea20, 0x1b8e: 0x4047ec20, 0x1b8f: 0x4047ee20, + 0x1b90: 0x4047f020, 0x1b91: 0x4047f220, 0x1b92: 0x4047f420, 0x1b93: 0x4047f620, + 0x1b94: 0x4047f820, 0x1b95: 0x4047fa20, 0x1b96: 0x4047fc20, 0x1b97: 0x4047fe20, + 0x1b98: 0x40480020, 0x1b99: 0x40480420, 0x1b9a: 0x40480820, 0x1b9b: 0x40480c20, + 0x1b9c: 0x40481220, 0x1b9d: 0x40481820, 0x1b9e: 0x40481c20, 0x1b9f: 0x40481e20, + 0x1ba0: 0x40482220, 0x1ba1: 0x40480a20, 0x1ba2: 0x40480e20, 0x1ba3: 0x40481420, + 0x1ba4: 0x40482420, 0x1ba5: 0x40482620, 0x1ba6: 0x40482820, 0x1ba7: 0x40482a20, + 0x1ba8: 0x40482c20, 0x1ba9: 0x40482e20, 0x1baa: 0x82092418, 0x1bab: 0x82092419, + 0x1bac: 0x40480620, 0x1bad: 0x40481a20, 0x1bae: 0x4047e420, 0x1baf: 0x40482020, + 0x1bb0: 0xe00001c4, 0x1bb1: 0xe0000258, 0x1bb2: 0xe0000370, 0x1bb3: 0xe000044a, + 0x1bb4: 0xe000051f, 0x1bb5: 0xe00005e9, 0x1bb6: 0xe00006b4, 0x1bb7: 0xe000075c, + 0x1bb8: 0xe0000808, 0x1bb9: 0xe00008ad, 0x1bba: 0x0047d484, 0x1bbb: 0x40481020, + 0x1bbc: 0x40481620, 0x1bbd: 0x40480220, 0x1bbe: 0x0047e299, 0x1bbf: 0x00480499, + // Block 0x6f, offset 0x1bc0 + 0x1bc0: 0x404d4c20, 0x1bc1: 0x004d4c84, 0x1bc2: 0x404d4e20, 0x1bc3: 0x004d4e84, + 0x1bc4: 0x004d4e84, 0x1bc5: 0x404d5020, 0x1bc6: 0x004d5084, 0x1bc7: 0x404d5220, + 0x1bc8: 0x004d5284, 0x1bc9: 0x404d5420, 0x1bca: 0x004d5484, 0x1bcb: 0x404d5620, + 0x1bcc: 0x004d5684, 0x1bcd: 0x004d5684, 0x1bce: 0x404d5820, 0x1bcf: 0x004d5884, + 0x1bd0: 0x404d5a20, 0x1bd1: 0x404d5c20, 0x1bd2: 0x404d5e20, 0x1bd3: 0x004d5e84, + 0x1bd4: 0x404d6020, 0x1bd5: 0x004d6084, 0x1bd6: 0x404d6220, 0x1bd7: 0x004d6284, + 0x1bd8: 0x404d6420, 0x1bd9: 0x004d6484, 0x1bda: 0x004d6484, 0x1bdb: 0x404d6620, + 0x1bdc: 0x004d6684, 0x1bdd: 0x404d6820, 0x1bde: 0x404d6a20, 0x1bdf: 0x004d6a84, + 0x1be0: 0x404d6c20, 0x1be1: 0x404d6e20, 0x1be2: 0x404d7020, 0x1be3: 0x404d7220, + 0x1be4: 0x404d7420, 0x1be5: 0x404d7620, 0x1be6: 0xa070f102, 0x1be7: 0x404d7820, + 0x1be8: 0x004d7884, 0x1be9: 0x404d7a20, 0x1bea: 0x404d7c20, 0x1beb: 0x004d7c84, + 0x1bec: 0x404d7e20, 0x1bed: 0x004d7e84, 0x1bee: 0x404d8020, 0x1bef: 0x004d8084, + 0x1bf0: 0x404d8220, 0x1bf1: 0x404d8420, 0x1bf2: 0x820926c3, 0x1bf3: 0x820926c4, + 0x1bfc: 0x4005ec20, 0x1bfd: 0x4005ee20, 0x1bfe: 0x4005f020, 0x1bff: 0x4005f220, + // Block 0x70, offset 0x1c00 + 0x1c00: 0x404b3620, 0x1c01: 0x404b3820, 0x1c02: 0x404b3a20, 0x1c03: 0x404b3c20, + 0x1c04: 0x404b3e20, 0x1c05: 0x404b4020, 0x1c06: 0x404b4220, 0x1c07: 0x404b4420, + 0x1c08: 0x404b4620, 0x1c09: 0x404b4820, 0x1c0a: 0x404b5020, 0x1c0b: 0x404b5220, + 0x1c0c: 0x404b5420, 0x1c0d: 0x404b5620, 0x1c0e: 0x404b5820, 0x1c0f: 0x404b5a20, + 0x1c10: 0x404b5c20, 0x1c11: 0x404b5e20, 0x1c12: 0x404b6020, 0x1c13: 0x404b6220, + 0x1c14: 0x404b6420, 0x1c15: 0x404b6620, 0x1c16: 0x404b6820, 0x1c17: 0x404b6a20, + 0x1c18: 0x404b6c20, 0x1c19: 0x404b6e20, 0x1c1a: 0x404b7020, 0x1c1b: 0x404b7420, + 0x1c1c: 0x404b7820, 0x1c1d: 0x404b7a20, 0x1c1e: 0x404b7c20, 0x1c1f: 0x404b7e20, + 0x1c20: 0x404b8020, 0x1c21: 0x404b8220, 0x1c22: 0x404b8420, 0x1c23: 0x404b8620, + 0x1c24: 0x404b7220, 0x1c25: 0x404b7620, 0x1c26: 0x404b8a20, 0x1c27: 0x404b8c20, + 0x1c28: 0x404b8e20, 0x1c29: 0x404b9020, 0x1c2a: 0x404b9220, 0x1c2b: 0x404b9420, + 0x1c2c: 0x404b9620, 0x1c2d: 0x404b9820, 0x1c2e: 0x404b9a20, 0x1c2f: 0x404b9c20, + 0x1c30: 0x404b9e20, 0x1c31: 0x404ba020, 0x1c32: 0x404ba220, 0x1c33: 0x404ba420, + 0x1c34: 0x404ba620, 0x1c35: 0x404ba820, 0x1c36: 0x404b8820, 0x1c37: 0xa070f102, + 0x1c3b: 0x40031420, + 0x1c3c: 0x40031620, 0x1c3d: 0x4005ae20, 0x1c3e: 0x4005b020, 0x1c3f: 0x4005b220, + // Block 0x71, offset 0x1c40 + 0x1c40: 0xe00001a6, 0x1c41: 0xe000023a, 0x1c42: 0xe0000352, 0x1c43: 0xe000042c, + 0x1c44: 0xe0000501, 0x1c45: 0xe00005cb, 0x1c46: 0xe0000696, 0x1c47: 0xe000073e, + 0x1c48: 0xe00007ea, 0x1c49: 0xe000088f, + 0x1c4d: 0x404b4a20, 0x1c4e: 0x404b4c20, 0x1c4f: 0x404b4e20, + 0x1c50: 0xe00001ca, 0x1c51: 0xe000025e, 0x1c52: 0xe0000376, 0x1c53: 0xe0000450, + 0x1c54: 0xe0000525, 0x1c55: 0xe00005ef, 0x1c56: 0xe00006ba, 0x1c57: 0xe0000762, + 0x1c58: 0xe000080e, 0x1c59: 0xe00008b3, 0x1c5a: 0x40542e20, 0x1c5b: 0x40543020, + 0x1c5c: 0x40543220, 0x1c5d: 0x40543420, 0x1c5e: 0x40543620, 0x1c5f: 0x40543820, + 0x1c60: 0x40543a20, 0x1c61: 0x40543c20, 0x1c62: 0x40543e20, 0x1c63: 0x40544020, + 0x1c64: 0x40544220, 0x1c65: 0x40544420, 0x1c66: 0x40544620, 0x1c67: 0x40544820, + 0x1c68: 0x40544a20, 0x1c69: 0x40544c20, 0x1c6a: 0x40544e20, 0x1c6b: 0x40545020, + 0x1c6c: 0x40545220, 0x1c6d: 0x40545420, 0x1c6e: 0x40545620, 0x1c6f: 0x40545820, + 0x1c70: 0x40545a20, 0x1c71: 0x40545c20, 0x1c72: 0x40545e20, 0x1c73: 0x40546020, + 0x1c74: 0x40546220, 0x1c75: 0x40546420, 0x1c76: 0x40546620, 0x1c77: 0x40546820, + 0x1c78: 0x40546a20, 0x1c79: 0x40546c20, 0x1c7a: 0x40546e20, 0x1c7b: 0x40547020, + 0x1c7c: 0x40547220, 0x1c7d: 0x40547420, 0x1c7e: 0x40035820, 0x1c7f: 0x40035a20, + // Block 0x72, offset 0x1c80 + 0x1c80: 0x4005d620, 0x1c81: 0x4005d820, 0x1c82: 0x4005da20, 0x1c83: 0x4005dc20, + 0x1c84: 0x4005de20, 0x1c85: 0x4005e020, 0x1c86: 0x4005e220, 0x1c87: 0x4005e420, + 0x1c90: 0xae600000, 0x1c91: 0xae600000, 0x1c92: 0xae600000, 0x1c93: 0xa0000000, + 0x1c94: 0xa0100000, 0x1c95: 0xadc00000, 0x1c96: 0xadc00000, 0x1c97: 0xadc00000, + 0x1c98: 0xadc00000, 0x1c99: 0xadc00000, 0x1c9a: 0xae600000, 0x1c9b: 0xae600000, + 0x1c9c: 0xadc00000, 0x1c9d: 0xadc00000, 0x1c9e: 0xadc00000, 0x1c9f: 0xadc00000, + 0x1ca0: 0xae600000, 0x1ca1: 0xa0000000, 0x1ca2: 0xa0100000, 0x1ca3: 0xa0100000, + 0x1ca4: 0xa0100000, 0x1ca5: 0xa0100000, 0x1ca6: 0xa0100000, 0x1ca7: 0xa0100000, + 0x1ca8: 0xa0100000, 0x1ca9: 0x40404020, 0x1caa: 0x00404084, 0x1cab: 0x00404084, + 0x1cac: 0x00404084, 0x1cad: 0xadc0f302, 0x1cae: 0x00404084, 0x1caf: 0x00404084, + 0x1cb0: 0x00404084, 0x1cb1: 0x00404084, 0x1cb2: 0xa000f402, 0x1cb3: 0xa000f402, + 0x1cb4: 0xae600000, 0x1cb5: 0x40404220, 0x1cb6: 0x40404420, + // Block 0x73, offset 0x1cc0 + 0x1cc0: 0x402be620, 0x1cc1: 0x402bec20, 0x1cc2: 0x402bee20, 0x1cc3: 0x402c2420, + 0x1cc4: 0x402c4220, 0x1cc5: 0x402c6a20, 0x1cc6: 0x402c6c20, 0x1cc7: 0x402ca020, + 0x1cc8: 0x402ce620, 0x1cc9: 0x402db420, 0x1cca: 0x402ddc20, 0x1ccb: 0x402e0620, + 0x1ccc: 0x402e3420, 0x1ccd: 0x402e8a20, 0x1cce: 0x402eb020, 0x1ccf: 0x402eea20, + 0x1cd0: 0x402f0220, 0x1cd1: 0x402eec20, 0x1cd2: 0x402f0420, 0x1cd3: 0x402ef820, + 0x1cd4: 0x402ef620, 0x1cd5: 0x402f2a20, 0x1cd6: 0x402f0a20, 0x1cd7: 0x402f0c20, + 0x1cd8: 0x402f3420, 0x1cd9: 0x402f8c20, 0x1cda: 0x402fa020, 0x1cdb: 0x40303420, + 0x1cdc: 0x40307420, 0x1cdd: 0x40307620, 0x1cde: 0x40307820, 0x1cdf: 0x4030aa20, + 0x1ce0: 0x4030c620, 0x1ce1: 0x4030ea20, 0x1ce2: 0x40313220, 0x1ce3: 0x40316c20, + 0x1ce4: 0x4031f420, 0x1ce5: 0x4031f620, 0x1ce6: 0x40325820, 0x1ce7: 0x40327420, + 0x1ce8: 0x40328020, 0x1ce9: 0x40328a20, 0x1cea: 0x4032a020, 0x1ceb: 0x40348c20, + 0x1cec: 0x002bde9d, 0x1ced: 0xe00009e1, 0x1cee: 0x002c0a9d, 0x1cef: 0x402c2220, + 0x1cf0: 0x002c629d, 0x1cf1: 0x002c989d, 0x1cf2: 0x002cae9d, 0x1cf3: 0x002d229d, + 0x1cf4: 0x002d689d, 0x1cf5: 0x002d9a9d, 0x1cf6: 0x002dcc9d, 0x1cf7: 0x002dfe9d, + 0x1cf8: 0x002e229d, 0x1cf9: 0x002e829d, 0x1cfa: 0x002e9e9d, 0x1cfb: 0x402eae20, + 0x1cfc: 0x002ee29d, 0x1cfd: 0x002f229d, 0x1cfe: 0x002f2c9d, 0x1cff: 0x002f7a9d, + // Block 0x74, offset 0x1d00 + 0x1d00: 0x00302c9d, 0x1d01: 0x00306c9d, 0x1d02: 0x0030e29d, 0x1d03: 0x002bde94, + 0x1d04: 0x002bf094, 0x1d05: 0x002bf894, 0x1d06: 0x002bee94, 0x1d07: 0x002c0a94, + 0x1d08: 0x002c6294, 0x1d09: 0x002c9894, 0x1d0a: 0x002cb894, 0x1d0b: 0x002cc294, + 0x1d0c: 0x002ce694, 0x1d0d: 0x002d2294, 0x1d0e: 0x002db494, 0x1d0f: 0x002dfe94, + 0x1d10: 0x002e8294, 0x1d11: 0x002eda94, 0x1d12: 0x002ee294, 0x1d13: 0x002efa94, + 0x1d14: 0x002f0a94, 0x1d15: 0x002f0c94, 0x1d16: 0x002f2c94, 0x1d17: 0x00302c94, + 0x1d18: 0x00306c94, 0x1d19: 0x00307694, 0x1d1a: 0x0030a094, 0x1d1b: 0x0030be94, + 0x1d1c: 0x0031f694, 0x1d1d: 0x00325494, 0x1d1e: 0x00325694, 0x1d1f: 0x00325a94, + 0x1d20: 0x00329a94, 0x1d21: 0x00329c94, 0x1d22: 0x002d9a95, 0x1d23: 0x002f7a95, + 0x1d24: 0x00306c95, 0x1d25: 0x0030be95, 0x1d26: 0x00325495, 0x1d27: 0x00325695, + 0x1d28: 0x00328895, 0x1d29: 0x00329a95, 0x1d2a: 0x00329c95, 0x1d2b: 0x40307a20, + 0x1d2c: 0x402c2620, 0x1d2d: 0x402c6e20, 0x1d2e: 0x402d1220, 0x1d2f: 0x402e8c20, + 0x1d30: 0x402eb220, 0x1d31: 0x402f3a20, 0x1d32: 0x402f9620, 0x1d33: 0x402fce20, + 0x1d34: 0x402ff020, 0x1d35: 0x40304020, 0x1d36: 0x40313c20, 0x1d37: 0x402d5420, + 0x1d38: 0x0034ba94, 0x1d39: 0xe0000bd9, 0x1d3a: 0xe0000fc1, 0x1d3b: 0x402dbe20, + 0x1d3c: 0x402dca20, 0x1d3d: 0x402f3620, 0x1d3e: 0x40308420, 0x1d3f: 0x4030bc20, + // Block 0x75, offset 0x1d40 + 0x1d40: 0x402c2820, 0x1d41: 0x402c7020, 0x1d42: 0x402d1420, 0x1d43: 0x402d4220, + 0x1d44: 0x402e0820, 0x1d45: 0x402e5220, 0x1d46: 0x402e8e20, 0x1d47: 0x402ec620, + 0x1d48: 0x402f3c20, 0x1d49: 0x402faa20, 0x1d4a: 0x402ff220, 0x1d4b: 0x40301020, + 0x1d4c: 0x4030ca20, 0x1d4d: 0x4030fe20, 0x1d4e: 0x40313e20, 0x1d4f: 0x402bea20, + 0x1d50: 0x402c0020, 0x1d51: 0x402c8220, 0x1d52: 0x402caa20, 0x1d53: 0x402cca20, + 0x1d54: 0x402ce420, 0x1d55: 0x402cc020, 0x1d56: 0x402dc020, 0x1d57: 0x402f0620, + 0x1d58: 0x40302220, 0x1d59: 0x40308620, 0x1d5a: 0x40317620, 0x1d5b: 0x002c0294, + 0x1d5c: 0x002c3a94, 0x1d5d: 0x002c5694, 0x1d5e: 0xf0001414, 0x1d5f: 0x002cdc94, + 0x1d60: 0x002d0894, 0x1d61: 0x002dee94, 0x1d62: 0x002d2a94, 0x1d63: 0x00308894, + 0x1d64: 0x002db694, 0x1d65: 0x002dc294, 0x1d66: 0x002daa94, 0x1d67: 0x002dbe94, + 0x1d68: 0x002de694, 0x1d69: 0x002e5494, 0x1d6a: 0x002e5294, 0x1d6b: 0x002e2a94, + 0x1d6c: 0x002e9094, 0x1d6d: 0x0030ac94, 0x1d6e: 0x002eb494, 0x1d6f: 0x002ec894, + 0x1d70: 0x002ea694, 0x1d71: 0x002f1094, 0x1d72: 0x002f4c94, 0x1d73: 0x002ff494, + 0x1d74: 0x00300894, 0x1d75: 0x00304294, 0x1d76: 0x00307c94, 0x1d77: 0x0030b494, + 0x1d78: 0x00307494, 0x1d79: 0x0030cc94, 0x1d7a: 0x0030da94, 0x1d7b: 0x00312a94, + 0x1d7c: 0x00314894, 0x1d7d: 0x00315094, 0x1d7e: 0x00316494, 0x1d7f: 0x00326a94, + // Block 0x76, offset 0x1d80 + 0x1d80: 0xae605f02, 0x1d81: 0xae605f02, 0x1d82: 0xadc06002, 0x1d83: 0xae605f02, + 0x1d84: 0xae605f02, 0x1d85: 0xae605f02, 0x1d86: 0xae605f02, 0x1d87: 0xae605f02, + 0x1d88: 0xae605f02, 0x1d89: 0xae605f02, 0x1d8a: 0x84dc17bd, 0x1d8b: 0xae605f02, + 0x1d8c: 0xae605f02, 0x1d8d: 0xaea05f02, 0x1d8e: 0xad605f02, 0x1d8f: 0xadc06002, + 0x1d90: 0xaca06002, 0x1d91: 0xae605f02, 0x1d92: 0x84e618d1, 0x1d93: 0xe00009b4, + 0x1d94: 0xe00009d9, 0x1d95: 0xe00009f9, 0x1d96: 0xe0000a08, 0x1d97: 0xe0000a50, + 0x1d98: 0xe0000ab6, 0x1d99: 0xe0000ab0, 0x1d9a: 0x84e61691, 0x1d9b: 0x84e61699, + 0x1d9c: 0x84e616ff, 0x1d9d: 0x84e61711, 0x1d9e: 0x84e61715, 0x1d9f: 0x84e61745, + 0x1da0: 0x84e6174f, 0x1da1: 0x84e61753, 0x1da2: 0x84e617c1, 0x1da3: 0x84e617c5, + 0x1da4: 0x84e617f3, 0x1da5: 0xe0000f67, 0x1da6: 0x84e61895, + 0x1dbc: 0xae906002, 0x1dbd: 0xadc06002, 0x1dbe: 0xae605f02, 0x1dbf: 0xadc06002, + // Block 0x77, offset 0x1dc0 + 0x1dc0: 0xe00009b1, 0x1dc1: 0xe00009ae, 0x1dc2: 0xe0000a22, 0x1dc3: 0xe0000a1f, + 0x1dc4: 0xe0000a28, 0x1dc5: 0xe0000a25, 0x1dc6: 0xe0000a2e, 0x1dc7: 0xe0000a2b, + 0x1dc8: 0xe0000a5a, 0x1dc9: 0xe0000a56, 0x1dca: 0xe0000a8c, 0x1dcb: 0xe0000a89, + 0x1dcc: 0xe0000a98, 0x1dcd: 0xe0000a95, 0x1dce: 0xe0000aa4, 0x1dcf: 0xe0000aa1, + 0x1dd0: 0xe0000a92, 0x1dd1: 0xe0000a8f, 0x1dd2: 0xe0000a9e, 0x1dd3: 0xe0000a9b, + 0x1dd4: 0xe0000b55, 0x1dd5: 0xe0000b51, 0x1dd6: 0xe0000b4d, 0x1dd7: 0xe0000b49, + 0x1dd8: 0xe0000b7c, 0x1dd9: 0xe0000b79, 0x1dda: 0xe0000b82, 0x1ddb: 0xe0000b7f, + 0x1ddc: 0xe0000b39, 0x1ddd: 0xe0000b35, 0x1dde: 0xe0000b8c, 0x1ddf: 0xe0000b89, + 0x1de0: 0xe0000bd0, 0x1de1: 0xe0000bcd, 0x1de2: 0xe0000c00, 0x1de3: 0xe0000bfd, + 0x1de4: 0xe0000c0c, 0x1de5: 0xe0000c09, 0x1de6: 0xe0000bfa, 0x1de7: 0xe0000bf7, + 0x1de8: 0xe0000c06, 0x1de9: 0xe0000c03, 0x1dea: 0xe0000c12, 0x1deb: 0xe0000c0f, + 0x1dec: 0xe0000c7e, 0x1ded: 0xe0000c7b, 0x1dee: 0xe0000c4a, 0x1def: 0xe0000c46, + 0x1df0: 0xe0000c93, 0x1df1: 0xe0000c90, 0x1df2: 0xe0000cab, 0x1df3: 0xe0000ca8, + 0x1df4: 0xe0000cb1, 0x1df5: 0xe0000cae, 0x1df6: 0xe0000cde, 0x1df7: 0xe0000cdb, + 0x1df8: 0xe0000ce5, 0x1df9: 0xe0000ce1, 0x1dfa: 0xe0000cf2, 0x1dfb: 0xe0000cef, + 0x1dfc: 0xe0000cec, 0x1dfd: 0xe0000ce9, 0x1dfe: 0xe0000d1e, 0x1dff: 0xe0000d1b, + // Block 0x78, offset 0x1e00 + 0x1e00: 0xe0000d24, 0x1e01: 0xe0000d21, 0x1e02: 0xe0000d2a, 0x1e03: 0xe0000d27, + 0x1e04: 0xe0000d69, 0x1e05: 0xe0000d66, 0x1e06: 0xe0000d7b, 0x1e07: 0xe0000d78, + 0x1e08: 0xe0000d87, 0x1e09: 0xe0000d84, 0x1e0a: 0xe0000d81, 0x1e0b: 0xe0000d7e, + 0x1e0c: 0xe0000ded, 0x1e0d: 0xe0000de9, 0x1e0e: 0xe0000df5, 0x1e0f: 0xe0000df1, + 0x1e10: 0xe0000e3d, 0x1e11: 0xe0000e39, 0x1e12: 0xe0000e35, 0x1e13: 0xe0000e31, + 0x1e14: 0xe0000ea7, 0x1e15: 0xe0000ea4, 0x1e16: 0xe0000ead, 0x1e17: 0xe0000eaa, + 0x1e18: 0xe0000ed6, 0x1e19: 0xe0000ed3, 0x1e1a: 0xe0000ef4, 0x1e1b: 0xe0000ef1, + 0x1e1c: 0xe0000efb, 0x1e1d: 0xe0000ef7, 0x1e1e: 0xe0000f02, 0x1e1f: 0xe0000eff, + 0x1e20: 0xe0000f41, 0x1e21: 0xe0000f3e, 0x1e22: 0xe0000f53, 0x1e23: 0xe0000f50, + 0x1e24: 0xe0000f26, 0x1e25: 0xe0000f22, 0x1e26: 0xe0000f3a, 0x1e27: 0xe0000f36, + 0x1e28: 0xe0000f5a, 0x1e29: 0xe0000f56, 0x1e2a: 0xe0000f93, 0x1e2b: 0xe0000f90, + 0x1e2c: 0xe0000f9f, 0x1e2d: 0xe0000f9c, 0x1e2e: 0xe0000fb1, 0x1e2f: 0xe0000fae, + 0x1e30: 0xe0000fab, 0x1e31: 0xe0000fa8, 0x1e32: 0xe0001093, 0x1e33: 0xe0001090, + 0x1e34: 0xe000109f, 0x1e35: 0xe000109c, 0x1e36: 0xe0001099, 0x1e37: 0xe0001096, + 0x1e38: 0xe0001032, 0x1e39: 0xe000102e, 0x1e3a: 0xe0001046, 0x1e3b: 0xe0001042, + 0x1e3c: 0xe00010a9, 0x1e3d: 0xe00010a6, 0x1e3e: 0xe00010af, 0x1e3f: 0xe00010ac, + // Block 0x79, offset 0x1e40 + 0x1e40: 0xe00010d2, 0x1e41: 0xe00010cf, 0x1e42: 0xe00010cc, 0x1e43: 0xe00010c9, + 0x1e44: 0xe00010e1, 0x1e45: 0xe00010de, 0x1e46: 0xe00010e7, 0x1e47: 0xe00010e4, + 0x1e48: 0xe00010ed, 0x1e49: 0xe00010ea, 0x1e4a: 0xe00010fc, 0x1e4b: 0xe00010f9, + 0x1e4c: 0xe00010f6, 0x1e4d: 0xe00010f3, 0x1e4e: 0xe0001123, 0x1e4f: 0xe0001120, + 0x1e50: 0xe0001141, 0x1e51: 0xe000113e, 0x1e52: 0xe0001153, 0x1e53: 0xe0001150, + 0x1e54: 0xe0001159, 0x1e55: 0xe0001156, 0x1e56: 0xe0000c15, 0x1e57: 0xe0000f8d, + 0x1e58: 0xe00010db, 0x1e59: 0xe0001111, 0x1e5a: 0xf0000404, 0x1e5b: 0xe0000f70, + 0x1e5c: 0x40300420, 0x1e5d: 0x40300620, 0x1e5e: 0xe0000f7f, 0x1e5f: 0x402c9620, + 0x1e60: 0xe000099b, 0x1e61: 0xe0000998, 0x1e62: 0xe0000989, 0x1e63: 0xe0000986, + 0x1e64: 0xe0000928, 0x1e65: 0xe0000924, 0x1e66: 0xe0000930, 0x1e67: 0xe000092c, + 0x1e68: 0xe0000940, 0x1e69: 0xe000093c, 0x1e6a: 0xe0000938, 0x1e6b: 0xe0000934, + 0x1e6c: 0xe00009aa, 0x1e6d: 0xe00009a6, 0x1e6e: 0xe0000902, 0x1e6f: 0xe00008fe, + 0x1e70: 0xe000090a, 0x1e71: 0xe0000906, 0x1e72: 0xe000091a, 0x1e73: 0xe0000916, + 0x1e74: 0xe0000912, 0x1e75: 0xe000090e, 0x1e76: 0xe00009a2, 0x1e77: 0xe000099e, + 0x1e78: 0xe0000b6e, 0x1e79: 0xe0000b6b, 0x1e7a: 0xe0000b5c, 0x1e7b: 0xe0000b59, + 0x1e7c: 0xe0000b26, 0x1e7d: 0xe0000b23, 0x1e7e: 0xe0000afb, 0x1e7f: 0xe0000af7, + // Block 0x7a, offset 0x1e80 + 0x1e80: 0xe0000b03, 0x1e81: 0xe0000aff, 0x1e82: 0xe0000b13, 0x1e83: 0xe0000b0f, + 0x1e84: 0xe0000b0b, 0x1e85: 0xe0000b07, 0x1e86: 0xe0000b75, 0x1e87: 0xe0000b71, + 0x1e88: 0xe0000c66, 0x1e89: 0xe0000c63, 0x1e8a: 0xe0000c78, 0x1e8b: 0xe0000c75, + 0x1e8c: 0xe0000e84, 0x1e8d: 0xe0000e81, 0x1e8e: 0xe0000e44, 0x1e8f: 0xe0000e41, + 0x1e90: 0xe0000dad, 0x1e91: 0xe0000da9, 0x1e92: 0xe0000db5, 0x1e93: 0xe0000db1, + 0x1e94: 0xe0000dc5, 0x1e95: 0xe0000dc1, 0x1e96: 0xe0000dbd, 0x1e97: 0xe0000db9, + 0x1e98: 0xe0000e8b, 0x1e99: 0xe0000e87, 0x1e9a: 0xe0000e5d, 0x1e9b: 0xe0000e59, + 0x1e9c: 0xe0000e65, 0x1e9d: 0xe0000e61, 0x1e9e: 0xe0000e75, 0x1e9f: 0xe0000e71, + 0x1ea0: 0xe0000e6d, 0x1ea1: 0xe0000e69, 0x1ea2: 0xe0000e7d, 0x1ea3: 0xe0000e79, + 0x1ea4: 0xe000108d, 0x1ea5: 0xe000108a, 0x1ea6: 0xe000104d, 0x1ea7: 0xe000104a, + 0x1ea8: 0xe0001066, 0x1ea9: 0xe0001062, 0x1eaa: 0xe000106e, 0x1eab: 0xe000106a, + 0x1eac: 0xe000107e, 0x1ead: 0xe000107a, 0x1eae: 0xe0001076, 0x1eaf: 0xe0001072, + 0x1eb0: 0xe0001086, 0x1eb1: 0xe0001082, 0x1eb2: 0xe0001108, 0x1eb3: 0xe0001105, + 0x1eb4: 0xe0001135, 0x1eb5: 0xe0001132, 0x1eb6: 0xe000112f, 0x1eb7: 0xe000112c, + 0x1eb8: 0xe000111d, 0x1eb9: 0xe000111a, 0x1eba: 0xe0000d0a, 0x1ebb: 0xe0000d07, + 0x1ebc: 0x0030d888, 0x1ebd: 0x4030d820, 0x1ebe: 0x00312088, 0x1ebf: 0x40312020, + // Block 0x7b, offset 0x1ec0 + 0x1ec0: 0xe0001165, 0x1ec1: 0xe00011a9, 0x1ec2: 0xe000117d, 0x1ec3: 0xe00011c1, + 0x1ec4: 0xe000116b, 0x1ec5: 0xe00011af, 0x1ec6: 0xe000118f, 0x1ec7: 0xe00011d3, + 0x1ec8: 0xe0001168, 0x1ec9: 0xe00011ac, 0x1eca: 0xe0001181, 0x1ecb: 0xe00011c5, + 0x1ecc: 0xe000116f, 0x1ecd: 0xe00011b3, 0x1ece: 0xe0001193, 0x1ecf: 0xe00011d7, + 0x1ed0: 0xe000121a, 0x1ed1: 0xe0001230, 0x1ed2: 0xe0001228, 0x1ed3: 0xe000123e, + 0x1ed4: 0xe0001220, 0x1ed5: 0xe0001236, + 0x1ed8: 0xe000121d, 0x1ed9: 0xe0001233, 0x1eda: 0xe000122c, 0x1edb: 0xe0001242, + 0x1edc: 0xe0001224, 0x1edd: 0xe000123a, + 0x1ee0: 0xe0001252, 0x1ee1: 0xe0001296, 0x1ee2: 0xe000126a, 0x1ee3: 0xe00012ae, + 0x1ee4: 0xe0001258, 0x1ee5: 0xe000129c, 0x1ee6: 0xe000127c, 0x1ee7: 0xe00012c0, + 0x1ee8: 0xe0001255, 0x1ee9: 0xe0001299, 0x1eea: 0xe000126e, 0x1eeb: 0xe00012b2, + 0x1eec: 0xe000125c, 0x1eed: 0xe00012a0, 0x1eee: 0xe0001280, 0x1eef: 0xe00012c4, + 0x1ef0: 0xe00012fb, 0x1ef1: 0xe0001319, 0x1ef2: 0xe0001309, 0x1ef3: 0xe0001327, + 0x1ef4: 0xe0001301, 0x1ef5: 0xe000131f, 0x1ef6: 0xe0001311, 0x1ef7: 0xe000132f, + 0x1ef8: 0xe00012fe, 0x1ef9: 0xe000131c, 0x1efa: 0xe000130d, 0x1efb: 0xe000132b, + 0x1efc: 0xe0001305, 0x1efd: 0xe0001323, 0x1efe: 0xe0001315, 0x1eff: 0xe0001333, + // Block 0x7c, offset 0x1f00 + 0x1f00: 0xe000136c, 0x1f01: 0xe0001382, 0x1f02: 0xe000137a, 0x1f03: 0xe0001390, + 0x1f04: 0xe0001372, 0x1f05: 0xe0001388, + 0x1f08: 0xe000136f, 0x1f09: 0xe0001385, 0x1f0a: 0xe000137e, 0x1f0b: 0xe0001394, + 0x1f0c: 0xe0001376, 0x1f0d: 0xe000138c, + 0x1f10: 0xe00013ad, 0x1f11: 0xe00013bc, 0x1f12: 0xe00013b4, 0x1f13: 0xe00013ca, + 0x1f14: 0xe00013b0, 0x1f15: 0xe00013c2, 0x1f16: 0xe00013b8, 0x1f17: 0xe00013d2, + 0x1f19: 0xe00013bf, 0x1f1b: 0xe00013ce, + 0x1f1d: 0xe00013c6, 0x1f1f: 0xe00013d6, + 0x1f20: 0xe0001407, 0x1f21: 0xe000144b, 0x1f22: 0xe000141f, 0x1f23: 0xe0001463, + 0x1f24: 0xe000140d, 0x1f25: 0xe0001451, 0x1f26: 0xe0001431, 0x1f27: 0xe0001475, + 0x1f28: 0xe000140a, 0x1f29: 0xe000144e, 0x1f2a: 0xe0001423, 0x1f2b: 0xe0001467, + 0x1f2c: 0xe0001411, 0x1f2d: 0xe0001455, 0x1f2e: 0xe0001435, 0x1f2f: 0xe0001479, + 0x1f30: 0xe00011f7, 0x1f31: 0xe00011ed, 0x1f32: 0xe000124c, 0x1f33: 0xe0001246, + 0x1f34: 0xe00012e4, 0x1f35: 0xe00012da, 0x1f36: 0xe000133d, 0x1f37: 0xe0001337, + 0x1f38: 0xe000139e, 0x1f39: 0xe0001398, 0x1f3a: 0xe00013e0, 0x1f3b: 0xe00013da, + 0x1f3c: 0xe0001499, 0x1f3d: 0xe000148f, + // Block 0x7d, offset 0x1f40 + 0x1f40: 0xe00011a1, 0x1f41: 0xe00011e5, 0x1f42: 0xe0001185, 0x1f43: 0xe00011c9, + 0x1f44: 0xe0001173, 0x1f45: 0xe00011b7, 0x1f46: 0xe0001197, 0x1f47: 0xe00011db, + 0x1f48: 0xe00011a5, 0x1f49: 0xe00011e9, 0x1f4a: 0xe000118a, 0x1f4b: 0xe00011ce, + 0x1f4c: 0xe0001178, 0x1f4d: 0xe00011bc, 0x1f4e: 0xe000119c, 0x1f4f: 0xe00011e0, + 0x1f50: 0xe000128e, 0x1f51: 0xe00012d2, 0x1f52: 0xe0001272, 0x1f53: 0xe00012b6, + 0x1f54: 0xe0001260, 0x1f55: 0xe00012a4, 0x1f56: 0xe0001284, 0x1f57: 0xe00012c8, + 0x1f58: 0xe0001292, 0x1f59: 0xe00012d6, 0x1f5a: 0xe0001277, 0x1f5b: 0xe00012bb, + 0x1f5c: 0xe0001265, 0x1f5d: 0xe00012a9, 0x1f5e: 0xe0001289, 0x1f5f: 0xe00012cd, + 0x1f60: 0xe0001443, 0x1f61: 0xe0001487, 0x1f62: 0xe0001427, 0x1f63: 0xe000146b, + 0x1f64: 0xe0001415, 0x1f65: 0xe0001459, 0x1f66: 0xe0001439, 0x1f67: 0xe000147d, + 0x1f68: 0xe0001447, 0x1f69: 0xe000148b, 0x1f6a: 0xe000142c, 0x1f6b: 0xe0001470, + 0x1f6c: 0xe000141a, 0x1f6d: 0xe000145e, 0x1f6e: 0xe000143e, 0x1f6f: 0xe0001482, + 0x1f70: 0xe0001201, 0x1f71: 0xe000120e, 0x1f72: 0xe00011fd, 0x1f73: 0xe0001214, + 0x1f74: 0xe00011f3, 0x1f76: 0xe0001207, 0x1f77: 0xe000120a, + 0x1f78: 0xe0001204, 0x1f79: 0xe0001211, 0x1f7a: 0xe00011fa, 0x1f7b: 0xe00011f0, + 0x1f7c: 0xe0001217, 0x1f7d: 0x40063620, 0x1f7e: 0x40326c20, 0x1f7f: 0x40063620, + // Block 0x7e, offset 0x1f80 + 0x1f80: 0x40063a20, 0x1f81: 0xe00000b1, 0x1f82: 0xe00012ea, 0x1f83: 0xe00012f5, + 0x1f84: 0xe00012e0, 0x1f86: 0xe00012ee, 0x1f87: 0xe00012f1, + 0x1f88: 0xe000124f, 0x1f89: 0xe0001249, 0x1f8a: 0xe00012e7, 0x1f8b: 0xe00012dd, + 0x1f8c: 0xe00012f8, 0x1f8d: 0xe00000b7, 0x1f8e: 0xe00000b4, 0x1f8f: 0xe00000ba, + 0x1f90: 0xe0001343, 0x1f91: 0xe000135e, 0x1f92: 0xe0001356, 0x1f93: 0xe0001352, + 0x1f96: 0xe0001349, 0x1f97: 0xe000135a, + 0x1f98: 0xe0001346, 0x1f99: 0xe0001361, 0x1f9a: 0xe0001340, 0x1f9b: 0xe000133a, + 0x1f9d: 0xe00000c0, 0x1f9e: 0xe00000bd, 0x1f9f: 0xe00000c3, + 0x1fa0: 0xe00013e6, 0x1fa1: 0xe0001401, 0x1fa2: 0xe00013f9, 0x1fa3: 0xe00013f5, + 0x1fa4: 0xe00013a4, 0x1fa5: 0xe00013a7, 0x1fa6: 0xe00013ec, 0x1fa7: 0xe00013fd, + 0x1fa8: 0xe00013e9, 0x1fa9: 0xe0001404, 0x1faa: 0xe00013e3, 0x1fab: 0xe00013dd, + 0x1fac: 0xe00013aa, 0x1fad: 0xe00000ae, 0x1fae: 0xe00000ab, 0x1faf: 0x40061e20, + 0x1fb2: 0xe000149f, 0x1fb3: 0xe00014aa, + 0x1fb4: 0xe0001495, 0x1fb6: 0xe00014a3, 0x1fb7: 0xe00014a6, + 0x1fb8: 0xe00013a1, 0x1fb9: 0xe000139b, 0x1fba: 0xe000149c, 0x1fbb: 0xe0001492, + 0x1fbc: 0xe00014ad, 0x1fbd: 0x40062020, 0x1fbe: 0x40063820, + // Block 0x7f, offset 0x1fc0 + 0x1fc0: 0x00021284, 0x1fc1: 0x00021284, 0x1fc2: 0x00021284, 0x1fc3: 0x00021284, + 0x1fc4: 0x00021284, 0x1fc5: 0x00021284, 0x1fc6: 0x00021284, 0x1fc7: 0x0002129b, + 0x1fc8: 0x00021284, 0x1fc9: 0x00021284, 0x1fca: 0x00021284, 0x1fcb: 0xa0000000, + 0x1fcc: 0xa0000000, 0x1fcd: 0xa0000000, 0x1fce: 0xa0000000, 0x1fcf: 0xa0000000, + 0x1fd0: 0x40022620, 0x1fd1: 0x0002269b, 0x1fd2: 0x40022820, 0x1fd3: 0x40022a20, + 0x1fd4: 0x40022c20, 0x1fd5: 0x40022e20, 0x1fd6: 0x4004c420, 0x1fd7: 0x40021820, + 0x1fd8: 0x4003d420, 0x1fd9: 0x4003d620, 0x1fda: 0x4003d820, 0x1fdb: 0x4003da20, + 0x1fdc: 0x4003e220, 0x1fdd: 0x4003e420, 0x1fde: 0x4003e620, 0x1fdf: 0x4003e820, + 0x1fe0: 0x4004f820, 0x1fe1: 0x4004fa20, 0x1fe2: 0x40050220, 0x1fe3: 0x40050420, + 0x1fe4: 0x0002e484, 0x1fe5: 0xf0001f04, 0x1fe6: 0xf0000404, 0x1fe7: 0x40050620, + 0x1fe8: 0x40020e20, 0x1fe9: 0x40021020, 0x1fea: 0xa0000000, 0x1feb: 0xa0000000, + 0x1fec: 0xa0000000, 0x1fed: 0xa0000000, 0x1fee: 0xa0000000, 0x1fef: 0x0002129b, + 0x1ff0: 0x4004f020, 0x1ff1: 0x4004f420, 0x1ff2: 0x40050e20, 0x1ff3: 0xf0001f04, + 0x1ff4: 0xf0000404, 0x1ff5: 0x40051020, 0x1ff6: 0xf0001f04, 0x1ff7: 0xf0000404, + 0x1ff8: 0x40051620, 0x1ff9: 0x4003dc20, 0x1ffa: 0x4003de20, 0x1ffb: 0x40051820, + 0x1ffc: 0xf0001f04, 0x1ffd: 0x4002e020, 0x1ffe: 0x40021420, 0x1fff: 0x40051a20, + // Block 0x80, offset 0x2000 + 0x2000: 0x40051e20, 0x2001: 0x40052220, 0x2002: 0x40052420, 0x2003: 0x40050820, + 0x2004: 0x40095820, 0x2005: 0x40040c20, 0x2006: 0x40040e20, 0x2007: 0xf0001f04, + 0x2008: 0xf0001f04, 0x2009: 0xf0001f04, 0x200a: 0x4004e820, 0x200b: 0x4004d420, + 0x200c: 0x40050a20, 0x200d: 0x40050c20, 0x200e: 0x4004da20, 0x200f: 0x40026620, + 0x2010: 0x40052020, 0x2011: 0x4004dc20, 0x2012: 0x40095020, 0x2013: 0x40023420, + 0x2014: 0x40051c20, 0x2015: 0x40039c20, 0x2016: 0x40039e20, 0x2017: 0xe00000a6, + 0x2018: 0x4003a020, 0x2019: 0x4003a220, 0x201a: 0x4003a420, 0x201b: 0x4003a620, + 0x201c: 0x4003a820, 0x201d: 0x4003aa20, 0x201e: 0x4003ac20, 0x201f: 0x00021284, + 0x2020: 0xa0000000, 0x2021: 0xa0000000, 0x2022: 0xa0000000, 0x2023: 0xa0000000, + 0x2024: 0xa0000000, + 0x202a: 0xa0000000, 0x202b: 0xa0000000, + 0x202c: 0xa0000000, 0x202d: 0xa0000000, 0x202e: 0xa0000000, 0x202f: 0xa0000000, + 0x2030: 0x0029cc94, 0x2031: 0x002d9a94, + 0x2034: 0x0029d494, 0x2035: 0x0029d694, 0x2036: 0x0029d894, 0x2037: 0x0029da94, + 0x2038: 0x0029dc94, 0x2039: 0x0029de94, 0x203a: 0x00093894, 0x203b: 0x00094e94, + 0x203c: 0x00094294, 0x203d: 0x0003f494, 0x203e: 0x0003f694, 0x203f: 0x002e9e94, + // Block 0x81, offset 0x2040 + 0x2040: 0x0029cc95, 0x2041: 0x0029ce95, 0x2042: 0x0029d095, 0x2043: 0x0029d295, + 0x2044: 0x0029d495, 0x2045: 0x0029d695, 0x2046: 0x0029d895, 0x2047: 0x0029da95, + 0x2048: 0x0029dc95, 0x2049: 0x0029de95, 0x204a: 0x00093895, 0x204b: 0x00094e95, + 0x204c: 0x00094295, 0x204d: 0x0003f495, 0x204e: 0x0003f695, + 0x2050: 0x002bde95, 0x2051: 0x002c9895, 0x2052: 0x002ee295, 0x2053: 0x0030f695, + 0x2054: 0x002cb895, 0x2055: 0x002d6895, 0x2056: 0x002dfe95, 0x2057: 0x002e2295, + 0x2058: 0x002e8295, 0x2059: 0x002e9e95, 0x205a: 0x002f2c95, 0x205b: 0x002fe695, + 0x205c: 0x00302c95, + 0x2060: 0x4027f820, 0x2061: 0x4027fa20, 0x2062: 0x4027fc20, 0x2063: 0x4027fe20, + 0x2064: 0x40280020, 0x2065: 0x40280220, 0x2066: 0x40280420, 0x2067: 0x40280620, + 0x2068: 0x40282c20, 0x2069: 0x40280820, 0x206a: 0x40280a20, 0x206b: 0x40280c20, + 0x206c: 0x40280e20, 0x206d: 0x40281020, 0x206e: 0x40281220, 0x206f: 0x40281420, + 0x2070: 0x40281620, 0x2071: 0x40281820, 0x2072: 0x40281a20, 0x2073: 0x40281c20, + 0x2074: 0x40281e20, 0x2075: 0x40282020, 0x2076: 0x40282220, 0x2077: 0x40282420, + 0x2078: 0x40282620, 0x2079: 0x40282820, 0x207a: 0x40282a20, + // Block 0x82, offset 0x2080 + 0x2090: 0xae612a02, 0x2091: 0xae612b02, 0x2092: 0xa0112c02, 0x2093: 0xa0112c02, + 0x2094: 0xae612d02, 0x2095: 0xae612e02, 0x2096: 0xae612f02, 0x2097: 0xae613002, + 0x2098: 0xa0106102, 0x2099: 0xa0106102, 0x209a: 0xa0106102, 0x209b: 0xae613102, + 0x209c: 0xae613202, 0x209d: 0xa0006202, 0x209e: 0xa0006202, 0x209f: 0xa0006202, + 0x20a0: 0xa0006202, 0x20a1: 0xae613302, 0x20a2: 0xa0006202, 0x20a3: 0xa0006202, + 0x20a4: 0xa0006202, 0x20a5: 0xa0106102, 0x20a6: 0xa0113402, 0x20a7: 0xae613502, + 0x20a8: 0xadc13602, 0x20a9: 0xae613702, 0x20aa: 0xa0106102, 0x20ab: 0xa0106102, + 0x20ac: 0xadc06002, 0x20ad: 0xadc06002, 0x20ae: 0xadc06002, 0x20af: 0xadc06002, + 0x20b0: 0xae605f02, + // Block 0x83, offset 0x20c0 + 0x20c0: 0xe00009bc, 0x20c1: 0xe00009c0, 0x20c2: 0x002c3a8b, 0x20c3: 0xf0000a04, + 0x20c4: 0x40081c20, 0x20c5: 0xe0000a5e, 0x20c6: 0xe0000a62, 0x20c7: 0x002cc28a, + 0x20c8: 0x40081e20, 0x20c9: 0xf0000a04, 0x20ca: 0x002d2285, 0x20cb: 0x002d688b, + 0x20cc: 0x002d688b, 0x20cd: 0x002d688b, 0x20ce: 0x002d6885, 0x20cf: 0xf0000202, + 0x20d0: 0x002d9a8b, 0x20d1: 0x002d9a8b, 0x20d2: 0x002e228b, 0x20d3: 0x002e2285, + 0x20d4: 0x40082020, 0x20d5: 0x002e9e8b, 0x20d6: 0xf000040a, 0x20d7: 0x40082220, + 0x20d8: 0x40082420, 0x20d9: 0x002f2c8b, 0x20da: 0x002f568b, 0x20db: 0x002f7a8b, + 0x20dc: 0x002f7a8b, 0x20dd: 0x002f7a8b, 0x20de: 0x40082620, 0x20df: 0x40082820, + 0x20e0: 0xf0001414, 0x20e1: 0xe0000fbd, 0x20e2: 0xf0001414, 0x20e3: 0x40082a20, + 0x20e4: 0x00312a8b, 0x20e5: 0x40082c20, 0x20e6: 0x0032a288, 0x20e7: 0x40082e20, + 0x20e8: 0x00312a8b, 0x20e9: 0x40083020, 0x20ea: 0x002dfe88, 0x20eb: 0xe000094d, + 0x20ec: 0x002c0a8b, 0x20ed: 0x002c3a8b, 0x20ee: 0x40083220, 0x20ef: 0x002c9885, + 0x20f0: 0x002c988b, 0x20f1: 0x002d088b, 0x20f2: 0x002d1e88, 0x20f3: 0x002e828b, + 0x20f4: 0x002ee285, 0x20f5: 0x00389084, 0x20f6: 0x00389284, 0x20f7: 0x00389484, + 0x20f8: 0x00389684, 0x20f9: 0x002d9a85, 0x20fa: 0x40083420, 0x20fb: 0xe0000b95, + 0x20fc: 0x00327e85, 0x20fd: 0x00325685, 0x20fe: 0x0032568b, 0x20ff: 0x00327e8b, + // Block 0x84, offset 0x2100 + 0x2100: 0x00093685, 0x2101: 0x40083620, 0x2102: 0x40083820, 0x2103: 0x40083a20, + 0x2104: 0x40083c20, 0x2105: 0x002c628b, 0x2106: 0x002c6285, 0x2107: 0x002c9885, + 0x2108: 0x002d9a85, 0x2109: 0x002dcc85, 0x210a: 0x40083e20, 0x210b: 0x400a6e20, + 0x210c: 0x40084020, 0x210d: 0xe00009c4, 0x210e: 0x402d1e20, 0x210f: 0x40084220, + 0x2110: 0xe00002cb, 0x2111: 0xe00002d3, 0x2112: 0xe00002b2, 0x2113: 0xe00002bb, + 0x2114: 0xe00003cd, 0x2115: 0xe00002c3, 0x2116: 0xe00003d1, 0x2117: 0xe00004ab, + 0x2118: 0xe0000579, 0x2119: 0xe00002c7, 0x211a: 0xe0000640, 0x211b: 0xe00002cf, + 0x211c: 0xe00004af, 0x211d: 0xe0000644, 0x211e: 0xe0000798, 0x211f: 0xf0001e1e, + 0x2120: 0x002d9a8a, 0x2121: 0xf0001f0a, 0x2122: 0xf0000a0a, 0x2123: 0xf0001f0a, + 0x2124: 0x0030be8a, 0x2125: 0xf0001f0a, 0x2126: 0xf0000a0a, 0x2127: 0xe00010bb, + 0x2128: 0xf0001f0a, 0x2129: 0x0030f68a, 0x212a: 0xf0001f0a, 0x212b: 0xf0000a0a, + 0x212c: 0x002e228a, 0x212d: 0x002c3a8a, 0x212e: 0x002c628a, 0x212f: 0x002e828a, + 0x2130: 0x002d9a84, 0x2131: 0xf0001f04, 0x2132: 0xf0000404, 0x2133: 0xf0001f04, + 0x2134: 0x0030be84, 0x2135: 0xf0001f04, 0x2136: 0xf0000404, 0x2137: 0xe00010b6, + 0x2138: 0xf0001f04, 0x2139: 0x0030f684, 0x213a: 0xf0001f04, 0x213b: 0xf0000404, + 0x213c: 0x002e2284, 0x213d: 0x002c3a84, 0x213e: 0x002c6284, 0x213f: 0x002e8284, + // Block 0x85, offset 0x2140 + 0x2140: 0x40287c20, 0x2141: 0x40287e20, 0x2142: 0x40288020, 0x2143: 0x002c5e88, + 0x2144: 0x402c5e20, 0x2145: 0xe00006c9, 0x2146: 0x40288220, 0x2147: 0x40288420, + 0x2148: 0x40288620, 0x2149: 0xe00001e2, + 0x2150: 0x40084420, 0x2151: 0x40084820, 0x2152: 0x40084620, 0x2153: 0x40084a20, + 0x2154: 0x40084c20, 0x2155: 0x40084e20, 0x2156: 0x40085020, 0x2157: 0x40085220, + 0x2158: 0x40085420, 0x2159: 0x40085620, 0x215a: 0xe00000c6, 0x215b: 0xe00000c9, + 0x215c: 0x40085820, 0x215d: 0x40085a20, 0x215e: 0x40085c20, 0x215f: 0x40085e20, + 0x2160: 0x40086020, 0x2161: 0x40086220, 0x2162: 0x40086420, 0x2163: 0x40086620, + 0x2164: 0x40086820, 0x2165: 0x40086a20, 0x2166: 0x40086c20, 0x2167: 0x40086e20, + 0x2168: 0x40087020, 0x2169: 0x40087220, 0x216a: 0x40087420, 0x216b: 0x40087620, + 0x216c: 0x40087820, 0x216d: 0x40087a20, 0x216e: 0xe00000cc, 0x216f: 0x40087c20, + 0x2170: 0x40087e20, 0x2171: 0x40088020, 0x2172: 0x40088220, 0x2173: 0x40088420, + 0x2174: 0x40088620, 0x2175: 0x40088820, 0x2176: 0x40088a20, 0x2177: 0x40088c20, + 0x2178: 0x40088e20, 0x2179: 0x40089020, 0x217a: 0x40089220, 0x217b: 0x40089420, + 0x217c: 0x40089620, 0x217d: 0x40089820, 0x217e: 0x40089a20, 0x217f: 0x40089c20, + // Block 0x86, offset 0x2180 + 0x2180: 0x40089e20, 0x2181: 0x4008a020, 0x2182: 0x4008a220, 0x2183: 0x4008a420, + 0x2184: 0x4008a620, 0x2185: 0x4008a820, 0x2186: 0x4008aa20, 0x2187: 0x4008ac20, + 0x2188: 0x4008ae20, 0x2189: 0x4008b020, 0x218a: 0x4008b220, 0x218b: 0x4008b420, + 0x218c: 0x4008b620, 0x218d: 0xe00000cf, 0x218e: 0xe00000d5, 0x218f: 0xe00000d2, + 0x2190: 0x4008b820, 0x2191: 0x4008ba20, 0x2192: 0x4008bc20, 0x2193: 0x4008be20, + 0x2194: 0x4008c020, 0x2195: 0x4008c220, 0x2196: 0x4008c420, 0x2197: 0x4008c620, + 0x2198: 0x4008c820, 0x2199: 0x4008ca20, 0x219a: 0x4008cc20, 0x219b: 0x4008ce20, + 0x219c: 0x4008d020, 0x219d: 0x4008d220, 0x219e: 0x4008d420, 0x219f: 0x4008d620, + 0x21a0: 0x4008d820, 0x21a1: 0x4008da20, 0x21a2: 0x4008dc20, 0x21a3: 0x4008de20, + 0x21a4: 0x4008e020, 0x21a5: 0x4008e220, 0x21a6: 0x4008e420, 0x21a7: 0x4008e620, + 0x21a8: 0x4008e820, 0x21a9: 0x4008ea20, 0x21aa: 0x4008ec20, 0x21ab: 0x4008ee20, + 0x21ac: 0x4008f020, 0x21ad: 0x4008f220, 0x21ae: 0x4008f420, 0x21af: 0x4008f620, + 0x21b0: 0x4008f820, 0x21b1: 0x4008fa20, 0x21b2: 0x4008fc20, 0x21b3: 0x4008fe20, + 0x21b4: 0x40090020, 0x21b5: 0x40090220, 0x21b6: 0x40090420, 0x21b7: 0x40090620, + 0x21b8: 0x40090820, 0x21b9: 0x40090a20, 0x21ba: 0x40090c20, 0x21bb: 0x40090e20, + 0x21bc: 0x40091020, 0x21bd: 0x40091220, 0x21be: 0x40091420, 0x21bf: 0x40091620, + // Block 0x87, offset 0x21c0 + 0x21c0: 0x40091820, 0x21c1: 0x40091a20, 0x21c2: 0x40091c20, 0x21c3: 0x40091e20, + 0x21c4: 0xe00000d8, 0x21c5: 0x40092020, 0x21c6: 0x40092220, 0x21c7: 0x40092420, + 0x21c8: 0x40092620, 0x21c9: 0xe00000db, 0x21ca: 0x40092820, 0x21cb: 0x40092a20, + 0x21cc: 0xe00000de, 0x21cd: 0x40092c20, 0x21ce: 0x40093020, 0x21cf: 0x40093220, + 0x21d0: 0x40093420, 0x21d1: 0x40093620, 0x21d2: 0x40094e20, 0x21d3: 0x40095220, + 0x21d4: 0x40095420, 0x21d5: 0x40095620, 0x21d6: 0x40095a20, 0x21d7: 0x40095c20, + 0x21d8: 0x40095e20, 0x21d9: 0x40096020, 0x21da: 0x40096220, 0x21db: 0x40096420, + 0x21dc: 0x40096820, 0x21dd: 0x40096c20, 0x21de: 0x40096e20, 0x21df: 0x40097020, + 0x21e0: 0x40097220, 0x21e1: 0x40097420, 0x21e2: 0x40097620, 0x21e3: 0x40097820, + 0x21e4: 0xe00000ea, 0x21e5: 0x40097a20, 0x21e6: 0xe00000ed, 0x21e7: 0x40097c20, + 0x21e8: 0x40097e20, 0x21e9: 0x40098020, 0x21ea: 0x40098220, 0x21eb: 0x40098420, + 0x21ec: 0xf0001f04, 0x21ed: 0xf0000404, 0x21ee: 0x40098620, 0x21ef: 0xf0001f04, + 0x21f0: 0xf0000404, 0x21f1: 0x40098820, 0x21f2: 0x40098a20, 0x21f3: 0x40098c20, + 0x21f4: 0x40098e20, 0x21f5: 0x40099020, 0x21f6: 0x40099220, 0x21f7: 0x40099420, + 0x21f8: 0x40099620, 0x21f9: 0x40099820, 0x21fa: 0x40099a20, 0x21fb: 0x40099c20, + 0x21fc: 0x40099e20, 0x21fd: 0x4009a020, 0x21fe: 0x4009a220, 0x21ff: 0x4009a420, + // Block 0x88, offset 0x2200 + 0x2200: 0x4009a620, 0x2201: 0xe00000f5, 0x2202: 0x4009a820, 0x2203: 0x4009aa20, + 0x2204: 0xe00000f8, 0x2205: 0x4009ac20, 0x2206: 0x4009ae20, 0x2207: 0xe00000fb, + 0x2208: 0x4009b020, 0x2209: 0xe00000fe, 0x220a: 0x4009b220, 0x220b: 0x4009b420, + 0x220c: 0x4009b620, 0x220d: 0x4009b820, 0x220e: 0x4009ba20, 0x220f: 0x4009bc20, + 0x2210: 0x4009be20, 0x2211: 0x4009c020, 0x2212: 0x4009c220, 0x2213: 0x4009c420, + 0x2214: 0x4009c620, 0x2215: 0x4009c820, 0x2216: 0x4009ca20, 0x2217: 0x4009cc20, + 0x2218: 0x4009ce20, 0x2219: 0x4009d020, 0x221a: 0x4009d220, 0x221b: 0x4009d420, + 0x221c: 0x4009d620, 0x221d: 0x4009d820, 0x221e: 0x4009da20, 0x221f: 0x4009dc20, + 0x2220: 0xe00000e4, 0x2221: 0x4009de20, 0x2222: 0xe0000104, 0x2223: 0x4009e020, + 0x2224: 0x4009e220, 0x2225: 0x4009e420, 0x2226: 0x4009e620, 0x2227: 0x4009e820, + 0x2228: 0x4009ea20, 0x2229: 0x4009ec20, 0x222a: 0x4009ee20, 0x222b: 0x4009f020, + 0x222c: 0x4009f220, 0x222d: 0xe0000101, 0x222e: 0xe00000e1, 0x222f: 0xe00000e7, + 0x2230: 0xe0000107, 0x2231: 0xe000010a, 0x2232: 0x4009f420, 0x2233: 0x4009f620, + 0x2234: 0xe000010d, 0x2235: 0xe0000110, 0x2236: 0x4009f820, 0x2237: 0x4009fa20, + 0x2238: 0xe0000113, 0x2239: 0xe0000116, 0x223a: 0x4009fc20, 0x223b: 0x4009fe20, + 0x223c: 0x400a0020, 0x223d: 0x400a0220, 0x223e: 0x400a0420, 0x223f: 0x400a0620, + // Block 0x89, offset 0x2240 + 0x2240: 0xe0000119, 0x2241: 0xe000011c, 0x2242: 0x400a0820, 0x2243: 0x400a0a20, + 0x2244: 0xe0000125, 0x2245: 0xe0000128, 0x2246: 0x400a0c20, 0x2247: 0x400a0e20, + 0x2248: 0xe000012b, 0x2249: 0xe000012e, 0x224a: 0x400a1020, 0x224b: 0x400a1220, + 0x224c: 0x400a1420, 0x224d: 0x400a1620, 0x224e: 0x400a1820, 0x224f: 0x400a1a20, + 0x2250: 0x400a1c20, 0x2251: 0x400a1e20, 0x2252: 0x400a2020, 0x2253: 0x400a2220, + 0x2254: 0x400a2420, 0x2255: 0x400a2620, 0x2256: 0x400a2820, 0x2257: 0x400a2a20, + 0x2258: 0x400a2c20, 0x2259: 0x400a2e20, 0x225a: 0x400a3020, 0x225b: 0x400a3220, + 0x225c: 0x400a3420, 0x225d: 0x400a3620, 0x225e: 0x400a3820, 0x225f: 0x400a3a20, + 0x2260: 0x400a3c20, 0x2261: 0x400a3e20, 0x2262: 0x400a4020, 0x2263: 0x400a4220, + 0x2264: 0x400a4420, 0x2265: 0x400a4620, 0x2266: 0x400a4820, 0x2267: 0x400a4a20, + 0x2268: 0x400a4c20, 0x2269: 0x400a4e20, 0x226a: 0x400a5020, 0x226b: 0x400a5220, + 0x226c: 0xe0000137, 0x226d: 0xe000013a, 0x226e: 0xe000013d, 0x226f: 0xe0000140, + 0x2270: 0x400a5420, 0x2271: 0x400a5620, 0x2272: 0x400a5820, 0x2273: 0x400a5a20, + 0x2274: 0x400a5c20, 0x2275: 0x400a5e20, 0x2276: 0x400a6020, 0x2277: 0x400a6220, + 0x2278: 0x400a6420, 0x2279: 0x400a6620, 0x227a: 0x400a6820, 0x227b: 0x400a6a20, + 0x227c: 0x400a6c20, 0x227d: 0x400a7020, 0x227e: 0x400a7220, 0x227f: 0x400a7420, + // Block 0x8a, offset 0x2280 + 0x2280: 0x400a7620, 0x2281: 0x400a7820, 0x2282: 0x400a7a20, 0x2283: 0x400a7c20, + 0x2284: 0x400a7e20, 0x2285: 0x400a8020, 0x2286: 0x400a8220, 0x2287: 0x400a8420, + 0x2288: 0x400a8620, 0x2289: 0x400a8820, 0x228a: 0x400a8a20, 0x228b: 0x400a8c20, + 0x228c: 0x400a8e20, 0x228d: 0x400a9020, 0x228e: 0x400a9220, 0x228f: 0x400a9420, + 0x2290: 0x400a9620, 0x2291: 0x400a9820, 0x2292: 0x400a9a20, 0x2293: 0x400a9c20, + 0x2294: 0x400a9e20, 0x2295: 0x400aa020, 0x2296: 0x400aa220, 0x2297: 0x400aa420, + 0x2298: 0x400aa620, 0x2299: 0x400aa820, 0x229a: 0x400aaa20, 0x229b: 0x400aac20, + 0x229c: 0x400aae20, 0x229d: 0x400ab020, 0x229e: 0x400ab220, 0x229f: 0x400ab420, + 0x22a0: 0xe000011f, 0x22a1: 0xe0000122, 0x22a2: 0xe0000131, 0x22a3: 0xe0000134, + 0x22a4: 0x400ab620, 0x22a5: 0x400ab820, 0x22a6: 0x400aba20, 0x22a7: 0x400abc20, + 0x22a8: 0x400abe20, 0x22a9: 0x400ac020, 0x22aa: 0xe0000143, 0x22ab: 0xe0000146, + 0x22ac: 0xe0000149, 0x22ad: 0xe000014c, 0x22ae: 0x400ac220, 0x22af: 0x400ac420, + 0x22b0: 0x400ac620, 0x22b1: 0x400ac820, 0x22b2: 0x400aca20, 0x22b3: 0x400acc20, + 0x22b4: 0x400ace20, 0x22b5: 0x400ad020, 0x22b6: 0x400ad220, 0x22b7: 0x400ad420, + 0x22b8: 0x400ad620, 0x22b9: 0x400ad820, 0x22ba: 0x400ada20, 0x22bb: 0x400adc20, + 0x22bc: 0x400ade20, 0x22bd: 0x400ae020, 0x22be: 0x400ae220, 0x22bf: 0x400ae420, + // Block 0x8b, offset 0x22c0 + 0x22c0: 0x400ae620, 0x22c1: 0x400ae820, 0x22c2: 0x400aea20, 0x22c3: 0x400aec20, + 0x22c4: 0x400aee20, 0x22c5: 0x400af020, 0x22c6: 0x400af220, 0x22c7: 0x400af420, + 0x22c8: 0x400af620, 0x22c9: 0x400af820, 0x22ca: 0x400afa20, 0x22cb: 0x400afc20, + 0x22cc: 0x400afe20, 0x22cd: 0x400b0020, 0x22ce: 0x400b0220, 0x22cf: 0x400b0420, + 0x22d0: 0x400b0620, 0x22d1: 0x400b0820, 0x22d2: 0x400b0a20, 0x22d3: 0x400b0c20, + 0x22d4: 0x400b0e20, 0x22d5: 0x400b1020, 0x22d6: 0x400b1220, 0x22d7: 0x400b1420, + 0x22d8: 0x400b1620, 0x22d9: 0x400b1820, 0x22da: 0x400b1a20, 0x22db: 0x400b1c20, + 0x22dc: 0x400b1e20, 0x22dd: 0x400b2020, 0x22de: 0x400b2220, 0x22df: 0x400b2420, + 0x22e0: 0x400b2620, 0x22e1: 0x400b2820, 0x22e2: 0x400b2a20, 0x22e3: 0x400b2c20, + 0x22e4: 0x400b2e20, 0x22e5: 0x400b3020, 0x22e6: 0x400b3220, 0x22e7: 0x400b3420, + 0x22e8: 0x400b3620, 0x22e9: 0x40049c20, 0x22ea: 0x40049e20, 0x22eb: 0x400b3820, + 0x22ec: 0x400b3a20, 0x22ed: 0x400b3c20, 0x22ee: 0x400b3e20, 0x22ef: 0x400b4020, + 0x22f0: 0x400b4220, 0x22f1: 0x400b4420, 0x22f2: 0x400b4620, 0x22f3: 0x400b4820, + 0x22f4: 0x400b4a20, 0x22f5: 0x400b4c20, 0x22f6: 0x400b4e20, 0x22f7: 0x400b5020, + 0x22f8: 0x400b5220, 0x22f9: 0x400b5420, 0x22fa: 0x400b5620, 0x22fb: 0x400b5820, + 0x22fc: 0x400b5a20, 0x22fd: 0x400b5c20, 0x22fe: 0x400b5e20, 0x22ff: 0x400b6020, + // Block 0x8c, offset 0x2300 + 0x2300: 0x400b6220, 0x2301: 0x400b6420, 0x2302: 0x400b6620, 0x2303: 0x400b6820, + 0x2304: 0x400b6a20, 0x2305: 0x400b6c20, 0x2306: 0x400b6e20, 0x2307: 0x400b7020, + 0x2308: 0x400b7220, 0x2309: 0x400b7420, 0x230a: 0x400b7620, 0x230b: 0x400b7820, + 0x230c: 0x400b7a20, 0x230d: 0x400b7c20, 0x230e: 0x400b7e20, 0x230f: 0x400b8020, + 0x2310: 0x400b8220, 0x2311: 0x400b8420, 0x2312: 0x400b8620, 0x2313: 0x400b8820, + 0x2314: 0x400b8a20, 0x2315: 0x400b8c20, 0x2316: 0x400b8e20, 0x2317: 0x400b9020, + 0x2318: 0x400b9220, 0x2319: 0x400b9420, 0x231a: 0x400b9620, 0x231b: 0x400b9820, + 0x231c: 0x400b9a20, 0x231d: 0x400b9c20, 0x231e: 0x400b9e20, 0x231f: 0x400ba020, + 0x2320: 0x400ba220, 0x2321: 0x400ba420, 0x2322: 0x400ba620, 0x2323: 0x400ba820, + 0x2324: 0x400baa20, 0x2325: 0x400bac20, 0x2326: 0x400bae20, 0x2327: 0x400bb020, + 0x2328: 0x400bb220, 0x2329: 0x400bb420, 0x232a: 0x400bb620, 0x232b: 0x400bb820, + 0x232c: 0x400bba20, 0x232d: 0x400bbc20, 0x232e: 0x400bbe20, 0x232f: 0x400bc020, + 0x2330: 0x400bc220, 0x2331: 0x400bc420, 0x2332: 0x400bc620, 0x2333: 0x400bc820, + 0x2334: 0x400bca20, 0x2335: 0x400bcc20, 0x2336: 0x400bce20, 0x2337: 0x400bd020, + 0x2338: 0x400bd220, 0x2339: 0x400bd420, 0x233a: 0x400bd620, 0x233b: 0x400bd820, + 0x233c: 0x400bda20, 0x233d: 0x400bdc20, 0x233e: 0x400bde20, 0x233f: 0x400be020, + // Block 0x8d, offset 0x2340 + 0x2340: 0x400be220, 0x2341: 0x400be420, 0x2342: 0x400be620, 0x2343: 0x400be820, + 0x2344: 0x400bea20, 0x2345: 0x400bec20, 0x2346: 0x400bee20, 0x2347: 0x400bf020, + 0x2348: 0x400bf220, 0x2349: 0x400bf420, 0x234a: 0x400bf620, 0x234b: 0x400bf820, + 0x234c: 0x400bfa20, 0x234d: 0x400bfc20, 0x234e: 0x400bfe20, 0x234f: 0x400c0020, + 0x2350: 0x400c0220, 0x2351: 0x400c0420, 0x2352: 0x400c0620, 0x2353: 0x400c0820, + 0x2354: 0x400c0a20, 0x2355: 0x400c0c20, 0x2356: 0x400c0e20, 0x2357: 0x400c1020, + 0x2358: 0x400c1220, 0x2359: 0x400c1420, 0x235a: 0x400c1620, 0x235b: 0x400c1820, + 0x235c: 0x400c1a20, 0x235d: 0x400c1c20, 0x235e: 0x400c1e20, 0x235f: 0x400c2020, + 0x2360: 0x400c2220, 0x2361: 0x400c2420, 0x2362: 0x400c2620, 0x2363: 0x400c2820, + 0x2364: 0x400c2a20, 0x2365: 0x400c2c20, 0x2366: 0x400c2e20, 0x2367: 0x400c3020, + 0x2368: 0x400c3220, 0x2369: 0x400c3420, 0x236a: 0x400c3620, 0x236b: 0x400c3820, + 0x236c: 0x400c3a20, 0x236d: 0x400c3c20, 0x236e: 0x400c3e20, 0x236f: 0x400c4020, + 0x2370: 0x400c4220, 0x2371: 0x400c4420, 0x2372: 0x400c4620, 0x2373: 0x400c4820, + 0x2374: 0x400c4a20, 0x2375: 0x400c4c20, 0x2376: 0x400c4e20, 0x2377: 0x400c5020, + 0x2378: 0x400c5220, 0x2379: 0x400c5420, 0x237a: 0x400c5620, 0x237b: 0x400c5820, + 0x237c: 0x400c5a20, 0x237d: 0x400c5c20, 0x237e: 0x400c5e20, 0x237f: 0x400c6020, + // Block 0x8e, offset 0x2380 + 0x2380: 0x400c6220, 0x2381: 0x400c6420, 0x2382: 0x400c6620, 0x2383: 0x400c6820, + 0x2384: 0x400c6a20, 0x2385: 0x400c6c20, 0x2386: 0x400c6e20, 0x2387: 0x400c7020, + 0x2388: 0x400c7220, 0x2389: 0x400c7420, 0x238a: 0x400c7620, 0x238b: 0x400c7820, + 0x238c: 0x400c7a20, 0x238d: 0x400c7c20, 0x238e: 0x400c7e20, 0x238f: 0x400c8020, + 0x2390: 0x400c8220, 0x2391: 0x400c8420, 0x2392: 0x400c8620, 0x2393: 0x400c8820, + 0x2394: 0x400c8a20, 0x2395: 0x400c8c20, 0x2396: 0x400c8e20, 0x2397: 0x400c9020, + 0x2398: 0x400c9220, 0x2399: 0x400c9420, 0x239a: 0x400c9620, 0x239b: 0x400c9820, + 0x239c: 0x400c9a20, 0x239d: 0x400c9c20, 0x239e: 0x400c9e20, 0x239f: 0x400ca020, + 0x23a0: 0x400ca220, 0x23a1: 0x400ca420, 0x23a2: 0x400ca620, 0x23a3: 0x400ca820, + 0x23a4: 0x400caa20, 0x23a5: 0x400cac20, 0x23a6: 0x400cae20, 0x23a7: 0x400cb020, + 0x23a8: 0x400cb220, 0x23a9: 0x400cb420, 0x23aa: 0x400cb620, 0x23ab: 0x400cb820, + 0x23ac: 0x400cba20, 0x23ad: 0x400cbc20, 0x23ae: 0x400cbe20, 0x23af: 0x400cc020, + 0x23b0: 0x400cc220, 0x23b1: 0x400cc420, 0x23b2: 0x400cc620, 0x23b3: 0x400cc820, + // Block 0x8f, offset 0x23c0 + 0x23c0: 0x400cca20, 0x23c1: 0x400ccc20, 0x23c2: 0x400cce20, 0x23c3: 0x400cd020, + 0x23c4: 0x400cd220, 0x23c5: 0x400cd420, 0x23c6: 0x400cd620, 0x23c7: 0x400cd820, + 0x23c8: 0x400cda20, 0x23c9: 0x400cdc20, 0x23ca: 0x400cde20, 0x23cb: 0x400ce020, + 0x23cc: 0x400ce220, 0x23cd: 0x400ce420, 0x23ce: 0x400ce620, 0x23cf: 0x400ce820, + 0x23d0: 0x400cea20, 0x23d1: 0x400cec20, 0x23d2: 0x400cee20, 0x23d3: 0x400cf020, + 0x23d4: 0x400cf220, 0x23d5: 0x400cf420, 0x23d6: 0x400cf620, 0x23d7: 0x400cf820, + 0x23d8: 0x400cfa20, 0x23d9: 0x400cfc20, 0x23da: 0x400cfe20, 0x23db: 0x400d0020, + 0x23dc: 0x400d0220, 0x23dd: 0x400d0420, 0x23de: 0x400d0620, 0x23df: 0x400d0820, + 0x23e0: 0x400d0a20, 0x23e1: 0x400d0c20, 0x23e2: 0x400d0e20, 0x23e3: 0x400d1020, + 0x23e4: 0x400d1220, 0x23e5: 0x400d1420, 0x23e6: 0x400d1620, + // Block 0x90, offset 0x2400 + 0x2400: 0x400d1820, 0x2401: 0x400d1a20, 0x2402: 0x400d1c20, 0x2403: 0x400d1e20, + 0x2404: 0x400d2020, 0x2405: 0x400d2220, 0x2406: 0x400d2420, 0x2407: 0x400d2620, + 0x2408: 0x400d2820, 0x2409: 0x400d2a20, 0x240a: 0x400d2c20, + 0x2420: 0x0029ce86, 0x2421: 0x0029d086, 0x2422: 0x0029d286, 0x2423: 0x0029d486, + 0x2424: 0x0029d686, 0x2425: 0x0029d886, 0x2426: 0x0029da86, 0x2427: 0x0029dc86, + 0x2428: 0x0029de86, 0x2429: 0xf0000606, 0x242a: 0xf0000606, 0x242b: 0xf0000606, + 0x242c: 0xf0000606, 0x242d: 0xf0000606, 0x242e: 0xf0000606, 0x242f: 0xf0000606, + 0x2430: 0xf0000606, 0x2431: 0xf0000606, 0x2432: 0xf0000606, 0x2433: 0xf0000606, + 0x2434: 0xf0000404, 0x2435: 0xf0000404, 0x2436: 0xf0000404, 0x2437: 0xf0000404, + 0x2438: 0xf0000404, 0x2439: 0xf0000404, 0x243a: 0xf0000404, 0x243b: 0xf0000404, + 0x243c: 0xf0000404, 0x243d: 0xe0000015, 0x243e: 0xe000001a, 0x243f: 0xe000001f, + // Block 0x91, offset 0x2440 + 0x2440: 0xe0000024, 0x2441: 0xe0000029, 0x2442: 0xe000002e, 0x2443: 0xe0000033, + 0x2444: 0xe0000038, 0x2445: 0xe000003d, 0x2446: 0xe0000042, 0x2447: 0xe0000047, + 0x2448: 0xf0001f04, 0x2449: 0xf0001f04, 0x244a: 0xf0001f04, 0x244b: 0xf0001f04, + 0x244c: 0xf0001f04, 0x244d: 0xf0001f04, 0x244e: 0xf0001f04, 0x244f: 0xf0001f04, + 0x2450: 0xf0001f04, 0x2451: 0xf0000404, 0x2452: 0xf0000404, 0x2453: 0xf0000404, + 0x2454: 0xf0000404, 0x2455: 0xf0000404, 0x2456: 0xf0000404, 0x2457: 0xf0000404, + 0x2458: 0xf0000404, 0x2459: 0xf0000404, 0x245a: 0xf0000404, 0x245b: 0xf0000404, + 0x245c: 0xf0000404, 0x245d: 0xf0000404, 0x245e: 0xf0000404, 0x245f: 0xf0000404, + 0x2460: 0xf0000404, 0x2461: 0xf0000404, 0x2462: 0xf0000404, 0x2463: 0xf0000404, + 0x2464: 0xf0000404, 0x2465: 0xf0000404, 0x2466: 0xf0000404, 0x2467: 0xf0000404, + 0x2468: 0xf0000404, 0x2469: 0xf0000404, 0x246a: 0xf0000404, 0x246b: 0xf0000404, + 0x246c: 0xf0000404, 0x246d: 0xf0000404, 0x246e: 0xf0000404, 0x246f: 0xf0000404, + 0x2470: 0xf0000404, 0x2471: 0xf0000404, 0x2472: 0xf0000404, 0x2473: 0xf0000404, + 0x2474: 0xf0000404, 0x2475: 0xf0000404, 0x2476: 0x002bde8c, 0x2477: 0x002c0a8c, + 0x2478: 0x002c3a8c, 0x2479: 0x002c628c, 0x247a: 0x002c988c, 0x247b: 0x002d088c, + 0x247c: 0x002d228c, 0x247d: 0x002d688c, 0x247e: 0x002d9a8c, 0x247f: 0x002dcc8c, + // Block 0x92, offset 0x2480 + 0x2480: 0x002dfe8c, 0x2481: 0x002e228c, 0x2482: 0x002e828c, 0x2483: 0x002e9e8c, + 0x2484: 0x002ee28c, 0x2485: 0x002f2c8c, 0x2486: 0x002f568c, 0x2487: 0x002f7a8c, + 0x2488: 0x002fe68c, 0x2489: 0x00302c8c, 0x248a: 0x00306c8c, 0x248b: 0x0030be8c, + 0x248c: 0x0030e28c, 0x248d: 0x0030f68c, 0x248e: 0x0031008c, 0x248f: 0x00312a8c, + 0x2490: 0x002bde86, 0x2491: 0x002c0a86, 0x2492: 0x002c3a86, 0x2493: 0x002c6286, + 0x2494: 0x002c9886, 0x2495: 0x002d0886, 0x2496: 0x002d2286, 0x2497: 0x002d6886, + 0x2498: 0x002d9a86, 0x2499: 0x002dcc86, 0x249a: 0x002dfe86, 0x249b: 0x002e2286, + 0x249c: 0x002e8286, 0x249d: 0x002e9e86, 0x249e: 0x002ee286, 0x249f: 0x002f2c86, + 0x24a0: 0x002f5686, 0x24a1: 0x002f7a86, 0x24a2: 0x002fe686, 0x24a3: 0x00302c86, + 0x24a4: 0x00306c86, 0x24a5: 0x0030be86, 0x24a6: 0x0030e286, 0x24a7: 0x0030f686, + 0x24a8: 0x00310086, 0x24a9: 0x00312a86, 0x24aa: 0x0029cc86, 0x24ab: 0xe00002e6, + 0x24ac: 0xe00002e9, 0x24ad: 0xe00002ec, 0x24ae: 0xe00002ef, 0x24af: 0xe00002f2, + 0x24b0: 0xe00002f5, 0x24b1: 0xe00002f8, 0x24b2: 0xe00002fb, 0x24b3: 0xe00002fe, + 0x24b4: 0xe00003d5, 0x24b5: 0x0029ce86, 0x24b6: 0x0029d086, 0x24b7: 0x0029d286, + 0x24b8: 0x0029d486, 0x24b9: 0x0029d686, 0x24ba: 0x0029d886, 0x24bb: 0x0029da86, + 0x24bc: 0x0029dc86, 0x24bd: 0x0029de86, 0x24be: 0xe00002d7, 0x24bf: 0x0029cc86, + // Block 0x93, offset 0x24c0 + 0x24c0: 0x400d2e20, 0x24c1: 0x400d3020, 0x24c2: 0x400d3220, 0x24c3: 0x400d3420, + 0x24c4: 0x400d3620, 0x24c5: 0x400d3820, 0x24c6: 0x400d3a20, 0x24c7: 0x400d3c20, + 0x24c8: 0x400d3e20, 0x24c9: 0x400d4020, 0x24ca: 0x400d4220, 0x24cb: 0x400d4420, + 0x24cc: 0x400d4620, 0x24cd: 0x400d4820, 0x24ce: 0x400d4a20, 0x24cf: 0x400d4c20, + 0x24d0: 0x400d4e20, 0x24d1: 0x400d5020, 0x24d2: 0x400d5220, 0x24d3: 0x400d5420, + 0x24d4: 0x400d5620, 0x24d5: 0x400d5820, 0x24d6: 0x400d5a20, 0x24d7: 0x400d5c20, + 0x24d8: 0x400d5e20, 0x24d9: 0x400d6020, 0x24da: 0x400d6220, 0x24db: 0x400d6420, + 0x24dc: 0x400d6620, 0x24dd: 0x400d6820, 0x24de: 0x400d6a20, 0x24df: 0x400d6c20, + 0x24e0: 0x400d6e20, 0x24e1: 0x400d7020, 0x24e2: 0x400d7220, 0x24e3: 0x400d7420, + 0x24e4: 0x400d7620, 0x24e5: 0x400d7820, 0x24e6: 0x400d7a20, 0x24e7: 0x400d7c20, + 0x24e8: 0x400d7e20, 0x24e9: 0x400d8020, 0x24ea: 0x400d8220, 0x24eb: 0x400d8420, + 0x24ec: 0x400d8620, 0x24ed: 0x400d8820, 0x24ee: 0x400d8a20, 0x24ef: 0x400d8c20, + 0x24f0: 0x400d8e20, 0x24f1: 0x400d9020, 0x24f2: 0x400d9220, 0x24f3: 0x400d9420, + 0x24f4: 0x400d9620, 0x24f5: 0x400d9820, 0x24f6: 0x400d9a20, 0x24f7: 0x400d9c20, + 0x24f8: 0x400d9e20, 0x24f9: 0x400da020, 0x24fa: 0x400da220, 0x24fb: 0x400da420, + 0x24fc: 0x400da620, 0x24fd: 0x400da820, 0x24fe: 0x400daa20, 0x24ff: 0x400dac20, + // Block 0x94, offset 0x2500 + 0x2500: 0x400dae20, 0x2501: 0x400db020, 0x2502: 0x400db220, 0x2503: 0x400db420, + 0x2504: 0x400db620, 0x2505: 0x400db820, 0x2506: 0x400dba20, 0x2507: 0x400dbc20, + 0x2508: 0x400dbe20, 0x2509: 0x400dc020, 0x250a: 0x400dc220, 0x250b: 0x400dc420, + 0x250c: 0x400dc620, 0x250d: 0x400dc820, 0x250e: 0x400dca20, 0x250f: 0x400dcc20, + 0x2510: 0x400dce20, 0x2511: 0x400dd020, 0x2512: 0x400dd220, 0x2513: 0x400dd420, + 0x2514: 0x400dd620, 0x2515: 0x400dd820, 0x2516: 0x400dda20, 0x2517: 0x400ddc20, + 0x2518: 0x400dde20, 0x2519: 0x400de020, 0x251a: 0x400de220, 0x251b: 0x400de420, + 0x251c: 0x400de620, 0x251d: 0x400de820, 0x251e: 0x400dea20, 0x251f: 0x400dec20, + 0x2520: 0x400dee20, 0x2521: 0x400df020, 0x2522: 0x400df220, 0x2523: 0x400df420, + 0x2524: 0x400df620, 0x2525: 0x400df820, 0x2526: 0x400dfa20, 0x2527: 0x400dfc20, + 0x2528: 0x400dfe20, 0x2529: 0x400e0020, 0x252a: 0x400e0220, 0x252b: 0x400e0420, + 0x252c: 0x400e0620, 0x252d: 0x400e0820, 0x252e: 0x400e0a20, 0x252f: 0x400e0c20, + 0x2530: 0x400e0e20, 0x2531: 0x400e1020, 0x2532: 0x400e1220, 0x2533: 0x400e1420, + 0x2534: 0x400e1620, 0x2535: 0x400e1820, 0x2536: 0x400e1a20, 0x2537: 0x400e1c20, + 0x2538: 0x400e1e20, 0x2539: 0x400e2020, 0x253a: 0x400e2220, 0x253b: 0x400e2420, + 0x253c: 0x400e2620, 0x253d: 0x400e2820, 0x253e: 0x400e2a20, 0x253f: 0x400e2c20, + // Block 0x95, offset 0x2540 + 0x2540: 0x400e2e20, 0x2541: 0x400e3020, 0x2542: 0x400e3220, 0x2543: 0x400e3420, + 0x2544: 0x400e3620, 0x2545: 0x400e3820, 0x2546: 0x400e3a20, 0x2547: 0x400e3c20, + 0x2548: 0x400e3e20, 0x2549: 0x400e4020, 0x254a: 0x400e4220, 0x254b: 0x400e4420, + 0x254c: 0x400e4620, 0x254d: 0x400e4820, 0x254e: 0x400e4a20, 0x254f: 0x400e4c20, + 0x2550: 0x400e4e20, 0x2551: 0x400e5020, 0x2552: 0x400e5220, 0x2553: 0x400e5420, + 0x2554: 0x400e5620, 0x2555: 0x400e5820, 0x2556: 0x400e5a20, 0x2557: 0x400e5c20, + 0x2558: 0x400e5e20, 0x2559: 0x400e6020, 0x255a: 0x400e6220, 0x255b: 0x400e6420, + 0x255c: 0x400e6620, 0x255d: 0x400e6820, 0x255e: 0x400e6a20, 0x255f: 0x400e6c20, + 0x2560: 0x400e6e20, 0x2561: 0x400e7020, 0x2562: 0x400e7220, 0x2563: 0x400e7420, + 0x2564: 0x400e7620, 0x2565: 0x400e7820, 0x2566: 0x400e7a20, 0x2567: 0x400e7c20, + 0x2568: 0x400e7e20, 0x2569: 0x400e8020, 0x256a: 0x400e8220, 0x256b: 0x400e8420, + 0x256c: 0x400e8620, 0x256d: 0x400e8820, 0x256e: 0x400e8a20, 0x256f: 0x400e8c20, + 0x2570: 0x400e8e20, 0x2571: 0x400e9020, 0x2572: 0x400e9220, 0x2573: 0x400e9420, + 0x2574: 0x400e9620, 0x2575: 0x400e9820, 0x2576: 0x400e9a20, 0x2577: 0x400e9c20, + 0x2578: 0x400e9e20, 0x2579: 0x400ea020, 0x257a: 0x400ea220, 0x257b: 0x400ea420, + 0x257c: 0x400ea620, 0x257d: 0x400ea820, 0x257e: 0x400eaa20, 0x257f: 0x400eac20, + // Block 0x96, offset 0x2580 + 0x2580: 0x400eae20, 0x2581: 0x400eb020, 0x2582: 0x400eb220, 0x2583: 0x400eb420, + 0x2584: 0x400eb620, 0x2585: 0x400eb820, 0x2586: 0x400eba20, 0x2587: 0x400ebc20, + 0x2588: 0x400ebe20, 0x2589: 0x400ec020, 0x258a: 0x400ec220, 0x258b: 0x400ec420, + 0x258c: 0x400ec620, 0x258d: 0x400ec820, 0x258e: 0x400eca20, 0x258f: 0x400ecc20, + 0x2590: 0x400ece20, 0x2591: 0x400ed020, 0x2592: 0x400ed220, 0x2593: 0x400ed420, + 0x2594: 0x400ed620, 0x2595: 0x400ed820, 0x2596: 0x400eda20, 0x2597: 0x400edc20, + 0x2598: 0x400ede20, 0x2599: 0x400ee020, 0x259a: 0x400ee220, 0x259b: 0x400ee420, + 0x259c: 0x400ee620, 0x259d: 0x400ee820, 0x259e: 0x400eea20, 0x259f: 0x400eec20, + 0x25a0: 0x400eee20, 0x25a1: 0x400ef020, 0x25a2: 0x400ef220, 0x25a3: 0x400ef420, + 0x25a4: 0x400ef620, 0x25a5: 0x400ef820, 0x25a6: 0x400efa20, 0x25a7: 0x400efc20, + 0x25a8: 0x400efe20, 0x25a9: 0x400f0020, 0x25aa: 0x400f0220, 0x25ab: 0x400f0420, + 0x25ac: 0x400f0620, 0x25ad: 0x400f0820, 0x25ae: 0x400f0a20, 0x25af: 0x400f0c20, + 0x25b0: 0x400f0e20, 0x25b1: 0x400f1020, 0x25b2: 0x400f1220, 0x25b3: 0x400f1420, + 0x25b4: 0x400f1620, 0x25b5: 0x400f1820, 0x25b6: 0x400f1a20, 0x25b7: 0x400f1c20, + 0x25b8: 0x400f1e20, 0x25b9: 0x400f2020, 0x25ba: 0x400f2220, 0x25bb: 0x400f2420, + 0x25bc: 0x400f2620, 0x25bd: 0x400f2820, 0x25be: 0x400f2a20, 0x25bf: 0x400f2c20, + // Block 0x97, offset 0x25c0 + 0x25c0: 0x400f2e20, 0x25c1: 0x400f3020, 0x25c2: 0x400f3220, 0x25c3: 0x400f3420, + 0x25c4: 0x400f3620, 0x25c5: 0x400f3820, 0x25c6: 0x400f3a20, 0x25c7: 0x400f3c20, + 0x25c8: 0x400f3e20, 0x25c9: 0x400f4020, 0x25ca: 0x400f4220, 0x25cb: 0x400f4420, + 0x25cc: 0x400f4620, 0x25cd: 0x400f4820, 0x25ce: 0x400f4a20, 0x25cf: 0x400f4c20, + 0x25d0: 0x400f4e20, 0x25d1: 0x400f5020, 0x25d2: 0x400f5220, 0x25d3: 0x400f5420, + 0x25d4: 0x400f5620, 0x25d5: 0x400f5820, 0x25d6: 0x400f5a20, 0x25d7: 0x400f5c20, + 0x25d8: 0x400f5e20, 0x25d9: 0x400f6020, 0x25da: 0x400f6220, 0x25db: 0x400f6420, + 0x25dc: 0x400f6620, 0x25dd: 0x400f6820, 0x25de: 0x400f6a20, 0x25df: 0x400f6c20, + 0x25e0: 0x400f6e20, 0x25e1: 0x400f7020, 0x25e2: 0x400f7220, 0x25e3: 0x400f7420, + 0x25e4: 0x400f7620, 0x25e5: 0x400f7820, 0x25e6: 0x400f7a20, 0x25e7: 0x400f7c20, + 0x25e8: 0x400f7e20, 0x25e9: 0x400f8020, 0x25ea: 0x400f8220, 0x25eb: 0x400f8420, + 0x25ec: 0x400f8620, 0x25ed: 0x400f8820, 0x25ee: 0x400f8a20, 0x25ef: 0x400f8c20, + 0x25f0: 0x40195220, 0x25f1: 0x40195420, 0x25f2: 0x40195620, 0x25f3: 0x40195820, + 0x25f4: 0x40195a20, 0x25f5: 0x40195c20, 0x25f6: 0x40195e20, 0x25f7: 0x40196020, + 0x25f8: 0x400f8e20, 0x25f9: 0x400f9020, 0x25fa: 0x400f9220, 0x25fb: 0x400f9420, + 0x25fc: 0x400f9620, 0x25fd: 0x400f9820, 0x25fe: 0x400f9a20, 0x25ff: 0x400f9c20, + // Block 0x98, offset 0x2600 + 0x2600: 0x400f9e20, 0x2601: 0x400fa020, 0x2602: 0x400fa220, 0x2603: 0x400fa420, + 0x2604: 0x400fa620, 0x2605: 0x400fa820, 0x2606: 0x400faa20, 0x2607: 0x400fac20, + 0x2608: 0x400fae20, 0x2609: 0x400fb020, 0x260a: 0x400fb220, 0x260b: 0x400fb420, + 0x260c: 0x400fb620, 0x260d: 0x400fb820, 0x260e: 0x400fba20, 0x260f: 0x400fbc20, + 0x2610: 0x400fbe20, 0x2611: 0x400fc020, 0x2612: 0x400fc220, 0x2613: 0x400fc420, + 0x2614: 0x400fc620, 0x2615: 0x400fc820, 0x2616: 0x400fca20, 0x2617: 0x400fcc20, + 0x2618: 0x400fce20, 0x2619: 0x400fd020, 0x261a: 0x400fd220, 0x261b: 0x400fd420, + 0x261c: 0x400fd620, 0x261d: 0x400fd820, 0x261e: 0x400fda20, 0x261f: 0x400fdc20, + 0x2620: 0x400fde20, 0x2621: 0x400fe020, 0x2622: 0x400fe220, 0x2623: 0x400fe420, + 0x2624: 0x400fe620, 0x2625: 0x400fe820, 0x2626: 0x400fea20, 0x2627: 0x400fec20, + 0x2628: 0x400fee20, 0x2629: 0x400ff020, 0x262a: 0x400ff220, 0x262b: 0x400ff420, + 0x262c: 0x400ff620, 0x262d: 0x401dde20, 0x262e: 0x401de020, 0x262f: 0x401de220, + 0x2630: 0x400ff820, 0x2631: 0x400ffa20, 0x2632: 0x400ffc20, 0x2633: 0x400ffe20, + 0x2634: 0x40100020, 0x2635: 0x40100220, 0x2636: 0x40100420, 0x2637: 0x40100620, + 0x2638: 0x40100820, 0x2639: 0x40100a20, 0x263a: 0x40100c20, 0x263b: 0x40100e20, + 0x263c: 0x40101020, 0x263d: 0x40101220, 0x263e: 0x40101420, 0x263f: 0x40101620, + // Block 0x99, offset 0x2640 + 0x2640: 0x40101820, 0x2641: 0x40101a20, 0x2642: 0x40101c20, 0x2643: 0x40101e20, + 0x2644: 0x40102020, 0x2645: 0x40102220, 0x2646: 0x40102420, 0x2647: 0x40102620, + 0x2648: 0x40102820, 0x2649: 0x40102a20, 0x264a: 0x40194620, 0x264b: 0x40194820, + 0x264c: 0x40194a20, 0x264d: 0x40194c20, 0x264e: 0x40194e20, 0x264f: 0x40195020, + 0x2650: 0x40102c20, 0x2651: 0x40102e20, 0x2652: 0x40103020, 0x2653: 0x40103220, + 0x2654: 0x40103420, 0x2655: 0x40103620, 0x2656: 0x40103820, 0x2657: 0x40103a20, + 0x2658: 0x40103c20, 0x2659: 0x40103e20, 0x265a: 0x40104020, 0x265b: 0x40104220, + 0x265c: 0x40104420, 0x265d: 0x40104620, 0x265e: 0x40104820, 0x265f: 0x40104a20, + 0x2660: 0x40104c20, 0x2661: 0x40104e20, 0x2662: 0x40105020, 0x2663: 0x40105220, + 0x2664: 0x40105420, 0x2665: 0x40105620, 0x2666: 0x40105820, 0x2667: 0x40105a20, + 0x2668: 0x40105c20, 0x2669: 0x40105e20, 0x266a: 0x40106020, 0x266b: 0x40106220, + 0x266c: 0x40106420, 0x266d: 0x40106620, 0x266e: 0x40106820, 0x266f: 0x40106a20, + 0x2670: 0x40106c20, 0x2671: 0x40106e20, 0x2672: 0x40107020, 0x2673: 0x40107220, + 0x2674: 0x40107420, 0x2675: 0x40107620, 0x2676: 0x40107820, 0x2677: 0x40107a20, + 0x2678: 0x40107c20, 0x2679: 0x40107e20, 0x267a: 0x40108020, 0x267b: 0x40108220, + 0x267c: 0x40108420, 0x267d: 0x40108620, 0x267e: 0x40108820, 0x267f: 0x40108a20, + // Block 0x9a, offset 0x2680 + 0x2680: 0x40108c20, 0x2681: 0x40108e20, 0x2682: 0x40109020, 0x2683: 0x40109220, + 0x2684: 0x40109420, 0x2685: 0x40109620, 0x2686: 0x40109820, 0x2687: 0x40109a20, + 0x2688: 0x40109c20, 0x2689: 0x40109e20, 0x268a: 0x4010a020, 0x268b: 0x4010a220, + 0x268c: 0x4010a420, 0x268d: 0x4010a620, 0x268e: 0x4010a820, 0x268f: 0x4010aa20, + 0x2690: 0x4010ac20, 0x2691: 0x4010ae20, 0x2692: 0x4010b020, 0x2693: 0x4010b220, + 0x2694: 0x4010b420, 0x2695: 0x4010b620, 0x2696: 0x4010b820, 0x2697: 0x4010ba20, + 0x2698: 0x4010bc20, 0x2699: 0x4010be20, 0x269a: 0x4010c020, 0x269b: 0x4010c220, + 0x269c: 0x4010c420, 0x269d: 0x4010c620, 0x269e: 0x4010c820, 0x269f: 0x4010ca20, + 0x26a0: 0x4010cc20, 0x26a1: 0x4010ce20, 0x26a2: 0x4010d020, 0x26a3: 0x4010d220, + 0x26a4: 0x4010d420, 0x26a5: 0x4010d620, 0x26a6: 0x4010d820, 0x26a7: 0x4010da20, + 0x26a8: 0x4010dc20, 0x26a9: 0x4010de20, 0x26aa: 0x4010e020, 0x26ab: 0x4010e220, + 0x26ac: 0x4010e420, 0x26ad: 0x4010e620, 0x26ae: 0x4010e820, 0x26af: 0x4010ea20, + 0x26b0: 0x4010ec20, 0x26b1: 0x4010ee20, 0x26b2: 0x4010f020, 0x26b3: 0x4010f220, + 0x26b4: 0x4010f420, 0x26b5: 0x4010f620, 0x26b6: 0x4010f820, 0x26b7: 0x4010fa20, + 0x26b8: 0x4010fc20, 0x26b9: 0x4010fe20, 0x26ba: 0x40110020, 0x26bb: 0x40110220, + 0x26bc: 0x40110420, 0x26bd: 0x40110620, 0x26be: 0x40110820, 0x26bf: 0x40110a20, + // Block 0x9b, offset 0x26c0 + 0x26c1: 0x40114020, 0x26c2: 0x40114220, 0x26c3: 0x40114420, + 0x26c4: 0x40114620, 0x26c5: 0x40114820, 0x26c6: 0x40114a20, 0x26c7: 0x40114c20, + 0x26c8: 0x40114e20, 0x26c9: 0x40115020, 0x26ca: 0x40115220, 0x26cb: 0x40115420, + 0x26cc: 0x40115620, 0x26cd: 0x40115820, 0x26ce: 0x40115a20, 0x26cf: 0x40115c20, + 0x26d0: 0x40115e20, 0x26d1: 0x40116020, 0x26d2: 0x40116220, 0x26d3: 0x40116420, + 0x26d4: 0x40116620, 0x26d5: 0x40116820, 0x26d6: 0x40116a20, 0x26d7: 0x40116c20, + 0x26d8: 0x40116e20, 0x26d9: 0x40117020, 0x26da: 0x40117220, 0x26db: 0x40117420, + 0x26dc: 0x40117620, 0x26dd: 0x40117820, 0x26de: 0x40117a20, 0x26df: 0x40117c20, + 0x26e0: 0x40117e20, 0x26e1: 0x40118020, 0x26e2: 0x40118220, 0x26e3: 0x40118420, + 0x26e4: 0x40118620, 0x26e5: 0x40118820, 0x26e6: 0x40118a20, 0x26e7: 0x40118c20, + 0x26e8: 0x40118e20, 0x26e9: 0x40119020, 0x26ea: 0x40119220, 0x26eb: 0x40119420, + 0x26ec: 0x40119620, 0x26ed: 0x40119820, 0x26ee: 0x40119a20, 0x26ef: 0x40119c20, + 0x26f0: 0x40119e20, 0x26f1: 0x4011a020, 0x26f2: 0x4011a220, 0x26f3: 0x4011a420, + 0x26f4: 0x4011a620, 0x26f5: 0x4011a820, 0x26f6: 0x4011aa20, 0x26f7: 0x4011ac20, + 0x26f8: 0x4011ae20, 0x26f9: 0x4011b020, 0x26fa: 0x4011b220, 0x26fb: 0x4011b420, + 0x26fc: 0x4011b620, 0x26fd: 0x4011b820, 0x26fe: 0x4011ba20, 0x26ff: 0x4011bc20, + // Block 0x9c, offset 0x2700 + 0x2700: 0x4011be20, 0x2701: 0x4011c020, 0x2702: 0x4011c220, 0x2703: 0x4011c420, + 0x2704: 0x4011c620, 0x2705: 0x4011c820, 0x2706: 0x4011ca20, 0x2707: 0x4011cc20, + 0x2708: 0x4011ce20, 0x2709: 0x4011d020, 0x270a: 0x4011d220, 0x270b: 0x4011d420, + 0x270c: 0x4011d620, 0x270d: 0x4011d820, 0x270e: 0x4011da20, 0x270f: 0x4011dc20, + 0x2710: 0x4011de20, 0x2711: 0x4011e020, 0x2712: 0x4011e220, 0x2713: 0x4011e420, + 0x2714: 0x4011e620, 0x2715: 0x4011e820, 0x2716: 0x4011ea20, 0x2717: 0x4011ec20, + 0x2718: 0x4011ee20, 0x2719: 0x4011f020, 0x271a: 0x4011f220, 0x271b: 0x4011f420, + 0x271c: 0x4011f620, 0x271d: 0x4011f820, 0x271e: 0x4011fa20, 0x271f: 0x4011fc20, + 0x2720: 0x4011fe20, 0x2721: 0x40120020, 0x2722: 0x40120220, 0x2723: 0x40120420, + 0x2724: 0x40120620, 0x2725: 0x40120820, 0x2726: 0x40120a20, 0x2727: 0x40120c20, + 0x2728: 0x40045820, 0x2729: 0x40045a20, 0x272a: 0x40045c20, 0x272b: 0x40045e20, + 0x272c: 0x40046020, 0x272d: 0x40046220, 0x272e: 0x40046420, 0x272f: 0x40046620, + 0x2730: 0x40046820, 0x2731: 0x40046a20, 0x2732: 0x40046c20, 0x2733: 0x40046e20, + 0x2734: 0x40047020, 0x2735: 0x40047220, 0x2736: 0x0029ce86, 0x2737: 0x0029d086, + 0x2738: 0x0029d286, 0x2739: 0x0029d486, 0x273a: 0x0029d686, 0x273b: 0x0029d886, + 0x273c: 0x0029da86, 0x273d: 0x0029dc86, 0x273e: 0x0029de86, 0x273f: 0xe00002da, + // Block 0x9d, offset 0x2740 + 0x2740: 0x0029ce86, 0x2741: 0x0029d086, 0x2742: 0x0029d286, 0x2743: 0x0029d486, + 0x2744: 0x0029d686, 0x2745: 0x0029d886, 0x2746: 0x0029da86, 0x2747: 0x0029dc86, + 0x2748: 0x0029de86, 0x2749: 0xe00002dd, 0x274a: 0x0029ce86, 0x274b: 0x0029d086, + 0x274c: 0x0029d286, 0x274d: 0x0029d486, 0x274e: 0x0029d686, 0x274f: 0x0029d886, + 0x2750: 0x0029da86, 0x2751: 0x0029dc86, 0x2752: 0x0029de86, 0x2753: 0xe00002e0, + 0x2754: 0x40120e20, 0x2755: 0x40121020, 0x2756: 0x40121220, 0x2757: 0x40121420, + 0x2758: 0x40121620, 0x2759: 0x40121820, 0x275a: 0x40121a20, 0x275b: 0x40121c20, + 0x275c: 0x40121e20, 0x275d: 0x40122020, 0x275e: 0x40122220, 0x275f: 0x40122420, + 0x2760: 0x40122620, 0x2761: 0x40122820, 0x2762: 0x40122a20, 0x2763: 0x40122c20, + 0x2764: 0x40122e20, 0x2765: 0x40123020, 0x2766: 0x40123220, 0x2767: 0x40123420, + 0x2768: 0x40123620, 0x2769: 0x40123820, 0x276a: 0x40123a20, 0x276b: 0x40123c20, + 0x276c: 0x40123e20, 0x276d: 0x40124020, 0x276e: 0x40124220, 0x276f: 0x40124420, + 0x2770: 0x40124620, 0x2771: 0x40124820, 0x2772: 0x40124a20, 0x2773: 0x40124c20, + 0x2774: 0x40124e20, 0x2775: 0x40125020, 0x2776: 0x40125220, 0x2777: 0x40125420, + 0x2778: 0x40125620, 0x2779: 0x40125820, 0x277a: 0x40125a20, 0x277b: 0x40125c20, + 0x277c: 0x40125e20, 0x277d: 0x40126020, 0x277e: 0x40126220, 0x277f: 0x40126420, + // Block 0x9e, offset 0x2780 + 0x2780: 0x40126620, 0x2781: 0x40126820, 0x2782: 0x40126a20, 0x2783: 0x40126c20, + 0x2784: 0x40126e20, 0x2785: 0x40044020, 0x2786: 0x40044220, 0x2787: 0x40127020, + 0x2788: 0x40127220, 0x2789: 0x40127420, 0x278a: 0x40127620, 0x278b: 0x40127820, + 0x278c: 0x40127a20, 0x278d: 0x40127c20, 0x278e: 0x40127e20, 0x278f: 0x40128020, + 0x2790: 0x40128220, 0x2791: 0x40128420, 0x2792: 0x40128620, 0x2793: 0x40128820, + 0x2794: 0x40128a20, 0x2795: 0x40128c20, 0x2796: 0x40128e20, 0x2797: 0x40129020, + 0x2798: 0x40129220, 0x2799: 0x40129420, 0x279a: 0x40129620, 0x279b: 0x40129820, + 0x279c: 0x40129a20, 0x279d: 0x40129c20, 0x279e: 0x40129e20, 0x279f: 0x4012a020, + 0x27a0: 0x4012a220, 0x27a1: 0x4012a420, 0x27a2: 0x4012a620, 0x27a3: 0x4012a820, + 0x27a4: 0x4012aa20, 0x27a5: 0x4012ac20, 0x27a6: 0x40044420, 0x27a7: 0x40044620, + 0x27a8: 0x40044820, 0x27a9: 0x40044a20, 0x27aa: 0x40044c20, 0x27ab: 0x40044e20, + 0x27ac: 0x40045020, 0x27ad: 0x40045220, 0x27ae: 0x40045420, 0x27af: 0x40045620, + 0x27b0: 0x4012ae20, 0x27b1: 0x4012b020, 0x27b2: 0x4012b220, 0x27b3: 0x4012b420, + 0x27b4: 0x4012b620, 0x27b5: 0x4012b820, 0x27b6: 0x4012ba20, 0x27b7: 0x4012bc20, + 0x27b8: 0x4012be20, 0x27b9: 0x4012c020, 0x27ba: 0x4012c220, 0x27bb: 0x4012c420, + 0x27bc: 0x4012c620, 0x27bd: 0x4012c820, 0x27be: 0x4012ca20, 0x27bf: 0x4012cc20, + // Block 0x9f, offset 0x27c0 + 0x27c0: 0x40174620, 0x27c1: 0x40174820, 0x27c2: 0x40174a20, 0x27c3: 0x40174c20, + 0x27c4: 0x40174e20, 0x27c5: 0x40175020, 0x27c6: 0x40175220, 0x27c7: 0x40175420, + 0x27c8: 0x40175620, 0x27c9: 0x40175820, 0x27ca: 0x40175a20, 0x27cb: 0x40175c20, + 0x27cc: 0x40175e20, 0x27cd: 0x40176020, 0x27ce: 0x40176220, 0x27cf: 0x40176420, + 0x27d0: 0x40176620, 0x27d1: 0x40176820, 0x27d2: 0x40176a20, 0x27d3: 0x40176c20, + 0x27d4: 0x40176e20, 0x27d5: 0x40177020, 0x27d6: 0x40177220, 0x27d7: 0x40177420, + 0x27d8: 0x40177620, 0x27d9: 0x40177820, 0x27da: 0x40177a20, 0x27db: 0x40177c20, + 0x27dc: 0x40177e20, 0x27dd: 0x40178020, 0x27de: 0x40178220, 0x27df: 0x40178420, + 0x27e0: 0x40178620, 0x27e1: 0x40178820, 0x27e2: 0x40178a20, 0x27e3: 0x40178c20, + 0x27e4: 0x40178e20, 0x27e5: 0x40179020, 0x27e6: 0x40179220, 0x27e7: 0x40179420, + 0x27e8: 0x40179620, 0x27e9: 0x40179820, 0x27ea: 0x40179a20, 0x27eb: 0x40179c20, + 0x27ec: 0x40179e20, 0x27ed: 0x4017a020, 0x27ee: 0x4017a220, 0x27ef: 0x4017a420, + 0x27f0: 0x4017a620, 0x27f1: 0x4017a820, 0x27f2: 0x4017aa20, 0x27f3: 0x4017ac20, + 0x27f4: 0x4017ae20, 0x27f5: 0x4017b020, 0x27f6: 0x4017b220, 0x27f7: 0x4017b420, + 0x27f8: 0x4017b620, 0x27f9: 0x4017b820, 0x27fa: 0x4017ba20, 0x27fb: 0x4017bc20, + 0x27fc: 0x4017be20, 0x27fd: 0x4017c020, 0x27fe: 0x4017c220, 0x27ff: 0x4017c420, + // Block 0xa0, offset 0x2800 + 0x2800: 0x4017c620, 0x2801: 0x4017c820, 0x2802: 0x4017ca20, 0x2803: 0x4017cc20, + 0x2804: 0x4017ce20, 0x2805: 0x4017d020, 0x2806: 0x4017d220, 0x2807: 0x4017d420, + 0x2808: 0x4017d620, 0x2809: 0x4017d820, 0x280a: 0x4017da20, 0x280b: 0x4017dc20, + 0x280c: 0x4017de20, 0x280d: 0x4017e020, 0x280e: 0x4017e220, 0x280f: 0x4017e420, + 0x2810: 0x4017e620, 0x2811: 0x4017e820, 0x2812: 0x4017ea20, 0x2813: 0x4017ec20, + 0x2814: 0x4017ee20, 0x2815: 0x4017f020, 0x2816: 0x4017f220, 0x2817: 0x4017f420, + 0x2818: 0x4017f620, 0x2819: 0x4017f820, 0x281a: 0x4017fa20, 0x281b: 0x4017fc20, + 0x281c: 0x4017fe20, 0x281d: 0x40180020, 0x281e: 0x40180220, 0x281f: 0x40180420, + 0x2820: 0x40180620, 0x2821: 0x40180820, 0x2822: 0x40180a20, 0x2823: 0x40180c20, + 0x2824: 0x40180e20, 0x2825: 0x40181020, 0x2826: 0x40181220, 0x2827: 0x40181420, + 0x2828: 0x40181620, 0x2829: 0x40181820, 0x282a: 0x40181a20, 0x282b: 0x40181c20, + 0x282c: 0x40181e20, 0x282d: 0x40182020, 0x282e: 0x40182220, 0x282f: 0x40182420, + 0x2830: 0x40182620, 0x2831: 0x40182820, 0x2832: 0x40182a20, 0x2833: 0x40182c20, + 0x2834: 0x40182e20, 0x2835: 0x40183020, 0x2836: 0x40183220, 0x2837: 0x40183420, + 0x2838: 0x40183620, 0x2839: 0x40183820, 0x283a: 0x40183a20, 0x283b: 0x40183c20, + 0x283c: 0x40183e20, 0x283d: 0x40184020, 0x283e: 0x40184220, 0x283f: 0x40184420, + // Block 0xa1, offset 0x2840 + 0x2840: 0x40184620, 0x2841: 0x40184820, 0x2842: 0x40184a20, 0x2843: 0x40184c20, + 0x2844: 0x40184e20, 0x2845: 0x40185020, 0x2846: 0x40185220, 0x2847: 0x40185420, + 0x2848: 0x40185620, 0x2849: 0x40185820, 0x284a: 0x40185a20, 0x284b: 0x40185c20, + 0x284c: 0x40185e20, 0x284d: 0x40186020, 0x284e: 0x40186220, 0x284f: 0x40186420, + 0x2850: 0x40186620, 0x2851: 0x40186820, 0x2852: 0x40186a20, 0x2853: 0x40186c20, + 0x2854: 0x40186e20, 0x2855: 0x40187020, 0x2856: 0x40187220, 0x2857: 0x40187420, + 0x2858: 0x40187620, 0x2859: 0x40187820, 0x285a: 0x40187a20, 0x285b: 0x40187c20, + 0x285c: 0x40187e20, 0x285d: 0x40188020, 0x285e: 0x40188220, 0x285f: 0x40188420, + 0x2860: 0x40188620, 0x2861: 0x40188820, 0x2862: 0x40188a20, 0x2863: 0x40188c20, + 0x2864: 0x40188e20, 0x2865: 0x40189020, 0x2866: 0x40189220, 0x2867: 0x40189420, + 0x2868: 0x40189620, 0x2869: 0x40189820, 0x286a: 0x40189a20, 0x286b: 0x40189c20, + 0x286c: 0x40189e20, 0x286d: 0x4018a020, 0x286e: 0x4018a220, 0x286f: 0x4018a420, + 0x2870: 0x4018a620, 0x2871: 0x4018a820, 0x2872: 0x4018aa20, 0x2873: 0x4018ac20, + 0x2874: 0x4018ae20, 0x2875: 0x4018b020, 0x2876: 0x4018b220, 0x2877: 0x4018b420, + 0x2878: 0x4018b620, 0x2879: 0x4018b820, 0x287a: 0x4018ba20, 0x287b: 0x4018bc20, + 0x287c: 0x4018be20, 0x287d: 0x4018c020, 0x287e: 0x4018c220, 0x287f: 0x4018c420, + // Block 0xa2, offset 0x2880 + 0x2880: 0x4018c620, 0x2881: 0x4018c820, 0x2882: 0x4018ca20, 0x2883: 0x4018cc20, + 0x2884: 0x4018ce20, 0x2885: 0x4018d020, 0x2886: 0x4018d220, 0x2887: 0x4018d420, + 0x2888: 0x4018d620, 0x2889: 0x4018d820, 0x288a: 0x4018da20, 0x288b: 0x4018dc20, + 0x288c: 0x4018de20, 0x288d: 0x4018e020, 0x288e: 0x4018e220, 0x288f: 0x4018e420, + 0x2890: 0x4018e620, 0x2891: 0x4018e820, 0x2892: 0x4018ea20, 0x2893: 0x4018ec20, + 0x2894: 0x4018ee20, 0x2895: 0x4018f020, 0x2896: 0x4018f220, 0x2897: 0x4018f420, + 0x2898: 0x4018f620, 0x2899: 0x4018f820, 0x289a: 0x4018fa20, 0x289b: 0x4018fc20, + 0x289c: 0x4018fe20, 0x289d: 0x40190020, 0x289e: 0x40190220, 0x289f: 0x40190420, + 0x28a0: 0x40190620, 0x28a1: 0x40190820, 0x28a2: 0x40190a20, 0x28a3: 0x40190c20, + 0x28a4: 0x40190e20, 0x28a5: 0x40191020, 0x28a6: 0x40191220, 0x28a7: 0x40191420, + 0x28a8: 0x40191620, 0x28a9: 0x40191820, 0x28aa: 0x40191a20, 0x28ab: 0x40191c20, + 0x28ac: 0x40191e20, 0x28ad: 0x40192020, 0x28ae: 0x40192220, 0x28af: 0x40192420, + 0x28b0: 0x40192620, 0x28b1: 0x40192820, 0x28b2: 0x40192a20, 0x28b3: 0x40192c20, + 0x28b4: 0x40192e20, 0x28b5: 0x40193020, 0x28b6: 0x40193220, 0x28b7: 0x40193420, + 0x28b8: 0x40193620, 0x28b9: 0x40193820, 0x28ba: 0x40193a20, 0x28bb: 0x40193c20, + 0x28bc: 0x40193e20, 0x28bd: 0x40194020, 0x28be: 0x40194220, 0x28bf: 0x40194420, + // Block 0xa3, offset 0x28c0 + 0x28c0: 0x4012ce20, 0x28c1: 0x4012d020, 0x28c2: 0x4012d220, 0x28c3: 0x4012d420, + 0x28c4: 0x4012d620, 0x28c5: 0x4012d820, 0x28c6: 0x4012da20, 0x28c7: 0x4012dc20, + 0x28c8: 0x4012de20, 0x28c9: 0x4012e020, 0x28ca: 0x4012e220, 0x28cb: 0x4012e420, + 0x28cc: 0x4012e620, 0x28cd: 0x4012e820, 0x28ce: 0x4012ea20, 0x28cf: 0x4012ec20, + 0x28d0: 0x4012ee20, 0x28d1: 0x4012f020, 0x28d2: 0x4012f220, 0x28d3: 0x4012f420, + 0x28d4: 0x4012f620, 0x28d5: 0x4012f820, 0x28d6: 0x4012fa20, 0x28d7: 0x4012fc20, + 0x28d8: 0x4012fe20, 0x28d9: 0x40130020, 0x28da: 0x40130220, 0x28db: 0x40130420, + 0x28dc: 0x40130620, 0x28dd: 0x40130820, 0x28de: 0x40130a20, 0x28df: 0x40130c20, + 0x28e0: 0x40130e20, 0x28e1: 0x40131020, 0x28e2: 0x40131220, 0x28e3: 0x40131420, + 0x28e4: 0x40131620, 0x28e5: 0x40131820, 0x28e6: 0x40131a20, 0x28e7: 0x40131c20, + 0x28e8: 0x40131e20, 0x28e9: 0x40132020, 0x28ea: 0x40132220, 0x28eb: 0x40132420, + 0x28ec: 0x40132620, 0x28ed: 0x40132820, 0x28ee: 0x40132a20, 0x28ef: 0x40132c20, + 0x28f0: 0x40132e20, 0x28f1: 0x40133020, 0x28f2: 0x40133220, 0x28f3: 0x40133420, + 0x28f4: 0x40133620, 0x28f5: 0x40133820, 0x28f6: 0x40133a20, 0x28f7: 0x40133c20, + 0x28f8: 0x40133e20, 0x28f9: 0x40134020, 0x28fa: 0x40134220, 0x28fb: 0x40134420, + 0x28fc: 0x40134620, 0x28fd: 0x40134820, 0x28fe: 0x40134a20, 0x28ff: 0x40134c20, + // Block 0xa4, offset 0x2900 + 0x2900: 0x40134e20, 0x2901: 0x40135020, 0x2902: 0x40135220, 0x2903: 0x40135420, + 0x2904: 0x40135620, 0x2905: 0x40135820, 0x2906: 0x40135a20, 0x2907: 0x40135c20, + 0x2908: 0x40135e20, 0x2909: 0x40136020, 0x290a: 0x40136220, 0x290b: 0x40136420, + 0x290c: 0x40136620, 0x290d: 0x40136820, 0x290e: 0x40136a20, 0x290f: 0x40136c20, + 0x2910: 0x40136e20, 0x2911: 0x40137020, 0x2912: 0x40137220, 0x2913: 0x40137420, + 0x2914: 0x40137620, 0x2915: 0x40137820, 0x2916: 0x40137a20, 0x2917: 0x40137c20, + 0x2918: 0x40137e20, 0x2919: 0x40138020, 0x291a: 0x40138220, 0x291b: 0x40138420, + 0x291c: 0x40138620, 0x291d: 0x40138820, 0x291e: 0x40138a20, 0x291f: 0x40138c20, + 0x2920: 0x40138e20, 0x2921: 0x40139020, 0x2922: 0x40139220, 0x2923: 0x40139420, + 0x2924: 0x40139620, 0x2925: 0x40139820, 0x2926: 0x40139a20, 0x2927: 0x40139c20, + 0x2928: 0x40139e20, 0x2929: 0x4013a020, 0x292a: 0x4013a220, 0x292b: 0x4013a420, + 0x292c: 0x4013a620, 0x292d: 0x4013a820, 0x292e: 0x4013aa20, 0x292f: 0x4013ac20, + 0x2930: 0x4013ae20, 0x2931: 0x4013b020, 0x2932: 0x4013b220, 0x2933: 0x4013b420, + 0x2934: 0x4013b620, 0x2935: 0x4013b820, 0x2936: 0x4013ba20, 0x2937: 0x4013bc20, + 0x2938: 0x4013be20, 0x2939: 0x4013c020, 0x293a: 0x4013c220, 0x293b: 0x4013c420, + 0x293c: 0x4013c620, 0x293d: 0x4013c820, 0x293e: 0x4013ca20, 0x293f: 0x4013cc20, + // Block 0xa5, offset 0x2940 + 0x2940: 0x4013ce20, 0x2941: 0x4013d020, 0x2942: 0x4013d220, 0x2943: 0x40041420, + 0x2944: 0x40041620, 0x2945: 0x40041820, 0x2946: 0x40041a20, 0x2947: 0x40041c20, + 0x2948: 0x40041e20, 0x2949: 0x40042020, 0x294a: 0x40042220, 0x294b: 0x40042420, + 0x294c: 0x40042620, 0x294d: 0x40042820, 0x294e: 0x40042a20, 0x294f: 0x40042c20, + 0x2950: 0x40042e20, 0x2951: 0x40043020, 0x2952: 0x40043220, 0x2953: 0x40043420, + 0x2954: 0x40043620, 0x2955: 0x40043820, 0x2956: 0x40043a20, 0x2957: 0x40043c20, + 0x2958: 0x40043e20, 0x2959: 0x4013d420, 0x295a: 0x4013d620, 0x295b: 0x4013d820, + 0x295c: 0x4013da20, 0x295d: 0x4013dc20, 0x295e: 0x4013de20, 0x295f: 0x4013e020, + 0x2960: 0x4013e220, 0x2961: 0x4013e420, 0x2962: 0x4013e620, 0x2963: 0x4013e820, + 0x2964: 0x4013ea20, 0x2965: 0x4013ec20, 0x2966: 0x4013ee20, 0x2967: 0x4013f020, + 0x2968: 0x4013f220, 0x2969: 0x4013f420, 0x296a: 0x4013f620, 0x296b: 0x4013f820, + 0x296c: 0x4013fa20, 0x296d: 0x4013fc20, 0x296e: 0x4013fe20, 0x296f: 0x40140020, + 0x2970: 0x40140220, 0x2971: 0x40140420, 0x2972: 0x40140620, 0x2973: 0x40140820, + 0x2974: 0x40140a20, 0x2975: 0x40140c20, 0x2976: 0x40140e20, 0x2977: 0x40141020, + 0x2978: 0x40141220, 0x2979: 0x40141420, 0x297a: 0x40141620, 0x297b: 0x40141820, + 0x297c: 0x40141a20, 0x297d: 0x40141c20, 0x297e: 0x40141e20, 0x297f: 0x40142020, + // Block 0xa6, offset 0x2980 + 0x2980: 0x40142220, 0x2981: 0x40142420, 0x2982: 0x40142620, 0x2983: 0x40142820, + 0x2984: 0x40142a20, 0x2985: 0x40142c20, 0x2986: 0x40142e20, 0x2987: 0x40143020, + 0x2988: 0x40143220, 0x2989: 0x40143420, 0x298a: 0x40143620, 0x298b: 0x40143820, + 0x298c: 0x40143a20, 0x298d: 0x40143c20, 0x298e: 0x40143e20, 0x298f: 0x40144020, + 0x2990: 0x40144220, 0x2991: 0x40144420, 0x2992: 0x40144620, 0x2993: 0x40144820, + 0x2994: 0x40144a20, 0x2995: 0x40144c20, 0x2996: 0x40144e20, 0x2997: 0x40145020, + 0x2998: 0x4004c620, 0x2999: 0x4004c820, 0x299a: 0x4004ca20, 0x299b: 0x4004cc20, + 0x299c: 0x40145220, 0x299d: 0x40145420, 0x299e: 0x40145620, 0x299f: 0x40145820, + 0x29a0: 0x40145a20, 0x29a1: 0x40145c20, 0x29a2: 0x40145e20, 0x29a3: 0x40146020, + 0x29a4: 0x40146220, 0x29a5: 0x40146420, 0x29a6: 0x40146620, 0x29a7: 0x40146820, + 0x29a8: 0x40146a20, 0x29a9: 0x40146c20, 0x29aa: 0x40146e20, 0x29ab: 0x40147020, + 0x29ac: 0x40147220, 0x29ad: 0x40147420, 0x29ae: 0x40147620, 0x29af: 0x40147820, + 0x29b0: 0x40147a20, 0x29b1: 0x40147c20, 0x29b2: 0x40147e20, 0x29b3: 0x40148020, + 0x29b4: 0x40148220, 0x29b5: 0x40148420, 0x29b6: 0x40148620, 0x29b7: 0x40148820, + 0x29b8: 0x40148a20, 0x29b9: 0x40148c20, 0x29ba: 0x40148e20, 0x29bb: 0x40149020, + 0x29bc: 0x40041020, 0x29bd: 0x40041220, 0x29be: 0x40149220, 0x29bf: 0x40149420, + // Block 0xa7, offset 0x29c0 + 0x29c0: 0x40149620, 0x29c1: 0x40149820, 0x29c2: 0x40149a20, 0x29c3: 0x40149c20, + 0x29c4: 0x40149e20, 0x29c5: 0x4014a020, 0x29c6: 0x4014a220, 0x29c7: 0x4014a420, + 0x29c8: 0x4014a620, 0x29c9: 0x4014a820, 0x29ca: 0x4014aa20, 0x29cb: 0x4014ac20, + 0x29cc: 0xe00000f0, 0x29cd: 0x4014ae20, 0x29ce: 0x4014b020, 0x29cf: 0x4014b220, + 0x29d0: 0x4014b420, 0x29d1: 0x4014b620, 0x29d2: 0x4014b820, 0x29d3: 0x4014ba20, + 0x29d4: 0x4014bc20, 0x29d5: 0x4014be20, 0x29d6: 0x4014c020, 0x29d7: 0x4014c220, + 0x29d8: 0x4014c420, 0x29d9: 0x4014c620, 0x29da: 0x4014c820, 0x29db: 0x4014ca20, + 0x29dc: 0x4014cc20, 0x29dd: 0x4014ce20, 0x29de: 0x4014d020, 0x29df: 0x4014d220, + 0x29e0: 0x4014d420, 0x29e1: 0x4014d620, 0x29e2: 0x4014d820, 0x29e3: 0x4014da20, + 0x29e4: 0x4014dc20, 0x29e5: 0x4014de20, 0x29e6: 0x4014e020, 0x29e7: 0x4014e220, + 0x29e8: 0x4014e420, 0x29e9: 0x4014e620, 0x29ea: 0x4014e820, 0x29eb: 0x4014ea20, + 0x29ec: 0x4014ec20, 0x29ed: 0x4014ee20, 0x29ee: 0x4014f020, 0x29ef: 0x4014f220, + 0x29f0: 0x4014f420, 0x29f1: 0x4014f620, 0x29f2: 0x4014f820, 0x29f3: 0x4014fa20, + 0x29f4: 0x4014fc20, 0x29f5: 0x4014fe20, 0x29f6: 0x40150020, 0x29f7: 0x40150220, + 0x29f8: 0x40150420, 0x29f9: 0x40150620, 0x29fa: 0x40150820, 0x29fb: 0x40150a20, + 0x29fc: 0x40150c20, 0x29fd: 0x40150e20, 0x29fe: 0x40151020, 0x29ff: 0x40151220, + // Block 0xa8, offset 0x2a00 + 0x2a00: 0x40151420, 0x2a01: 0x40151620, 0x2a02: 0x40151820, 0x2a03: 0x40151a20, + 0x2a04: 0x40151c20, 0x2a05: 0x40151e20, 0x2a06: 0x40152020, 0x2a07: 0x40152220, + 0x2a08: 0x40152420, 0x2a09: 0x40152620, 0x2a0a: 0x40152820, 0x2a0b: 0x40152a20, + 0x2a0c: 0x40152c20, 0x2a0d: 0x40152e20, 0x2a0e: 0x40153020, 0x2a0f: 0x40153220, + 0x2a10: 0x40153420, 0x2a11: 0x40153620, 0x2a12: 0x40153820, 0x2a13: 0x40153a20, + 0x2a14: 0x40153c20, 0x2a15: 0x40153e20, 0x2a16: 0x40154020, 0x2a17: 0x40154220, + 0x2a18: 0x40154420, 0x2a19: 0x40154620, 0x2a1a: 0x40154820, 0x2a1b: 0x40154a20, + 0x2a1c: 0x40154c20, 0x2a1d: 0x40154e20, 0x2a1e: 0x40155020, 0x2a1f: 0x40155220, + 0x2a20: 0x40155420, 0x2a21: 0x40155620, 0x2a22: 0x40155820, 0x2a23: 0x40155a20, + 0x2a24: 0x40155c20, 0x2a25: 0x40155e20, 0x2a26: 0x40156020, 0x2a27: 0x40156220, + 0x2a28: 0x40156420, 0x2a29: 0x40156620, 0x2a2a: 0x40156820, 0x2a2b: 0x40156a20, + 0x2a2c: 0x40156c20, 0x2a2d: 0x40156e20, 0x2a2e: 0x40157020, 0x2a2f: 0x40157220, + 0x2a30: 0x40157420, 0x2a31: 0x40157620, 0x2a32: 0x40157820, 0x2a33: 0x40157a20, + 0x2a34: 0xf0000404, 0x2a35: 0xf0001f04, 0x2a36: 0xf0000404, 0x2a37: 0x40157c20, + 0x2a38: 0x40157e20, 0x2a39: 0x40158020, 0x2a3a: 0x40158220, 0x2a3b: 0x40158420, + 0x2a3c: 0x40158620, 0x2a3d: 0x40158820, 0x2a3e: 0x40158a20, 0x2a3f: 0x40158c20, + // Block 0xa9, offset 0x2a40 + 0x2a40: 0x40158e20, 0x2a41: 0x40159020, 0x2a42: 0x40159220, 0x2a43: 0x40159420, + 0x2a44: 0x40159620, 0x2a45: 0x40159820, 0x2a46: 0x40159a20, 0x2a47: 0x40159c20, + 0x2a48: 0x40159e20, 0x2a49: 0x4015a020, 0x2a4a: 0x4015a220, 0x2a4b: 0x4015a420, + 0x2a4c: 0x4015a620, 0x2a4d: 0x4015a820, 0x2a4e: 0x4015aa20, 0x2a4f: 0x4015ac20, + 0x2a50: 0x4015ae20, 0x2a51: 0x4015b020, 0x2a52: 0x4015b220, 0x2a53: 0x4015b420, + 0x2a54: 0x4015b620, 0x2a55: 0x4015b820, 0x2a56: 0x4015ba20, 0x2a57: 0x4015bc20, + 0x2a58: 0x4015be20, 0x2a59: 0x4015c020, 0x2a5a: 0x4015c220, 0x2a5b: 0x4015c420, + 0x2a5c: 0x4015c620, 0x2a5d: 0x4015c820, 0x2a5e: 0x4015ca20, 0x2a5f: 0x4015cc20, + 0x2a60: 0x4015ce20, 0x2a61: 0x4015d020, 0x2a62: 0x4015d220, 0x2a63: 0x4015d420, + 0x2a64: 0x4015d620, 0x2a65: 0x4015d820, 0x2a66: 0x4015da20, 0x2a67: 0x4015dc20, + 0x2a68: 0x4015de20, 0x2a69: 0x4015e020, 0x2a6a: 0x4015e220, 0x2a6b: 0x4015e420, + 0x2a6c: 0x4015e620, 0x2a6d: 0x4015e820, 0x2a6e: 0x4015ea20, 0x2a6f: 0x4015ec20, + 0x2a70: 0x4015ee20, 0x2a71: 0x4015f020, 0x2a72: 0x4015f220, 0x2a73: 0x4015f420, + 0x2a74: 0x4015f620, 0x2a75: 0x4015f820, 0x2a76: 0x4015fa20, 0x2a77: 0x4015fc20, + 0x2a78: 0x4015fe20, 0x2a79: 0x40160020, 0x2a7a: 0x40160220, 0x2a7b: 0x40160420, + 0x2a7c: 0x40160620, 0x2a7d: 0x40160820, 0x2a7e: 0x40160a20, 0x2a7f: 0x40160c20, + // Block 0xaa, offset 0x2a80 + 0x2a80: 0x40160e20, 0x2a81: 0x40161020, 0x2a82: 0x40161220, 0x2a83: 0x40161420, + 0x2a84: 0x40161620, 0x2a85: 0x40161820, 0x2a86: 0x40161a20, 0x2a87: 0x40161c20, + 0x2a88: 0x40161e20, 0x2a89: 0x40162020, 0x2a8a: 0x40162220, 0x2a8b: 0x40162420, + 0x2a8c: 0x40162620, 0x2a8d: 0x40162820, 0x2a8e: 0x40162a20, 0x2a8f: 0x40162c20, + 0x2a90: 0x40162e20, 0x2a91: 0x40163020, 0x2a92: 0x40163220, 0x2a93: 0x40163420, + 0x2a94: 0x40163620, 0x2a95: 0x40163820, 0x2a96: 0x40163a20, 0x2a97: 0x40163c20, + 0x2a98: 0x40163e20, 0x2a99: 0x40164020, 0x2a9a: 0x40164220, 0x2a9b: 0x40164420, + 0x2a9c: 0xe000014f, 0x2a9d: 0x40164620, 0x2a9e: 0x40164820, 0x2a9f: 0x40164a20, + 0x2aa0: 0x40164c20, 0x2aa1: 0x40164e20, 0x2aa2: 0x40165020, 0x2aa3: 0x40165220, + 0x2aa4: 0x40165420, 0x2aa5: 0x40165620, 0x2aa6: 0x40165820, 0x2aa7: 0x40165a20, + 0x2aa8: 0x40165c20, 0x2aa9: 0x40165e20, 0x2aaa: 0x40166020, 0x2aab: 0x40166220, + 0x2aac: 0x40166420, 0x2aad: 0x40166620, 0x2aae: 0x40166820, 0x2aaf: 0x40166a20, + 0x2ab0: 0x40166c20, 0x2ab1: 0x40166e20, 0x2ab2: 0x40167020, 0x2ab3: 0x40167220, + 0x2ab4: 0x40167420, 0x2ab5: 0x40167620, 0x2ab6: 0x40167820, 0x2ab7: 0x40167a20, + 0x2ab8: 0x40167c20, 0x2ab9: 0x40167e20, 0x2aba: 0x40168020, 0x2abb: 0x40168220, + 0x2abc: 0x40168420, 0x2abd: 0x40168620, 0x2abe: 0x40168820, 0x2abf: 0x40168a20, + // Block 0xab, offset 0x2ac0 + 0x2ac0: 0x40168c20, 0x2ac1: 0x40168e20, 0x2ac2: 0x40169020, 0x2ac3: 0x40169220, + 0x2ac4: 0x40169420, 0x2ac5: 0x40169620, 0x2ac6: 0x40169820, 0x2ac7: 0x40169a20, + 0x2ac8: 0x40169c20, 0x2ac9: 0x40169e20, 0x2aca: 0x4016a020, 0x2acb: 0x4016a220, + 0x2acc: 0x4016a420, 0x2acd: 0x4016a620, 0x2ace: 0x4016a820, 0x2acf: 0x4016aa20, + 0x2ad0: 0x4016ac20, 0x2ad1: 0x4016ae20, 0x2ad2: 0x4016b020, 0x2ad3: 0x4016b220, + 0x2ad4: 0x4016b420, 0x2ad5: 0x4016b620, 0x2ad6: 0x4016b820, 0x2ad7: 0x4016ba20, + 0x2ad8: 0x4016bc20, 0x2ad9: 0x4016be20, 0x2ada: 0x4016c020, 0x2adb: 0x4016c220, + 0x2adc: 0x4016c420, 0x2add: 0x4016c620, 0x2ade: 0x4016c820, 0x2adf: 0x4016ca20, + 0x2ae0: 0x4016cc20, 0x2ae1: 0x4016ce20, 0x2ae2: 0x4016d020, 0x2ae3: 0x4016d220, + 0x2ae4: 0x4016d420, 0x2ae5: 0x4016d620, 0x2ae6: 0x4016d820, 0x2ae7: 0x4016da20, + 0x2ae8: 0x4016dc20, 0x2ae9: 0x4016de20, 0x2aea: 0x4016e020, 0x2aeb: 0x4016e220, + 0x2aec: 0x4016e420, 0x2aed: 0x4016e620, 0x2aee: 0x4016e820, 0x2aef: 0x4016ea20, + 0x2af0: 0x4016ec20, 0x2af1: 0x4016ee20, 0x2af2: 0x4016f020, 0x2af3: 0x4016f220, + 0x2af4: 0x4016f420, 0x2af5: 0x4016f620, 0x2af6: 0x4016f820, 0x2af7: 0x4016fa20, + 0x2af8: 0x4016fc20, 0x2af9: 0x4016fe20, 0x2afa: 0x40170020, 0x2afb: 0x40170220, + 0x2afc: 0x40170420, 0x2afd: 0x40170620, 0x2afe: 0x40170820, 0x2aff: 0x40170a20, + // Block 0xac, offset 0x2b00 + 0x2b00: 0x40170c20, 0x2b01: 0x40170e20, 0x2b02: 0x40171020, 0x2b03: 0x40171220, + 0x2b04: 0x40171420, 0x2b05: 0x40171620, 0x2b06: 0x40171820, 0x2b07: 0x40171a20, + 0x2b08: 0x40171c20, 0x2b09: 0x40171e20, 0x2b0a: 0x40172020, 0x2b0b: 0x40172220, + 0x2b0c: 0x40172420, + 0x2b10: 0x40172620, 0x2b11: 0x40172820, 0x2b12: 0x40172a20, 0x2b13: 0x40172c20, + 0x2b14: 0x40172e20, 0x2b15: 0x40173020, 0x2b16: 0x40173220, 0x2b17: 0x40173420, + 0x2b18: 0x40173620, 0x2b19: 0x40173820, + // Block 0xad, offset 0x2b40 + 0x2b40: 0x00373888, 0x2b41: 0x00373a88, 0x2b42: 0x00373c88, 0x2b43: 0x00373e88, + 0x2b44: 0x00374088, 0x2b45: 0x00374288, 0x2b46: 0x00374488, 0x2b47: 0x00374688, + 0x2b48: 0x00374888, 0x2b49: 0x00374a88, 0x2b4a: 0x00374c88, 0x2b4b: 0x00374e88, + 0x2b4c: 0x00375088, 0x2b4d: 0x00375288, 0x2b4e: 0x00375488, 0x2b4f: 0x00375688, + 0x2b50: 0x00375888, 0x2b51: 0x00375a88, 0x2b52: 0x00375c88, 0x2b53: 0x00375e88, + 0x2b54: 0x00376088, 0x2b55: 0x00376288, 0x2b56: 0x00376488, 0x2b57: 0x00376688, + 0x2b58: 0x00376888, 0x2b59: 0x00376a88, 0x2b5a: 0x00376c88, 0x2b5b: 0x00376e88, + 0x2b5c: 0x00377088, 0x2b5d: 0x00377288, 0x2b5e: 0x00377488, 0x2b5f: 0x00377688, + 0x2b60: 0x00377888, 0x2b61: 0x00377a88, 0x2b62: 0x00377c88, 0x2b63: 0x00377e88, + 0x2b64: 0x00378088, 0x2b65: 0x00378288, 0x2b66: 0x00378488, 0x2b67: 0x00378688, + 0x2b68: 0x00378888, 0x2b69: 0x00378a88, 0x2b6a: 0x00378c88, 0x2b6b: 0x00378e88, + 0x2b6c: 0x00379088, 0x2b6d: 0x00379288, 0x2b6e: 0x00379488, + 0x2b70: 0x40373820, 0x2b71: 0x40373a20, 0x2b72: 0x40373c20, 0x2b73: 0x40373e20, + 0x2b74: 0x40374020, 0x2b75: 0x40374220, 0x2b76: 0x40374420, 0x2b77: 0x40374620, + 0x2b78: 0x40374820, 0x2b79: 0x40374a20, 0x2b7a: 0x40374c20, 0x2b7b: 0x40374e20, + 0x2b7c: 0x40375020, 0x2b7d: 0x40375220, 0x2b7e: 0x40375420, 0x2b7f: 0x40375620, + // Block 0xae, offset 0x2b80 + 0x2b80: 0x40375820, 0x2b81: 0x40375a20, 0x2b82: 0x40375c20, 0x2b83: 0x40375e20, + 0x2b84: 0x40376020, 0x2b85: 0x40376220, 0x2b86: 0x40376420, 0x2b87: 0x40376620, + 0x2b88: 0x40376820, 0x2b89: 0x40376a20, 0x2b8a: 0x40376c20, 0x2b8b: 0x40376e20, + 0x2b8c: 0x40377020, 0x2b8d: 0x40377220, 0x2b8e: 0x40377420, 0x2b8f: 0x40377620, + 0x2b90: 0x40377820, 0x2b91: 0x40377a20, 0x2b92: 0x40377c20, 0x2b93: 0x40377e20, + 0x2b94: 0x40378020, 0x2b95: 0x40378220, 0x2b96: 0x40378420, 0x2b97: 0x40378620, + 0x2b98: 0x40378820, 0x2b99: 0x40378a20, 0x2b9a: 0x40378c20, 0x2b9b: 0x40378e20, + 0x2b9c: 0x40379020, 0x2b9d: 0x40379220, 0x2b9e: 0x40379420, + 0x2ba0: 0x002e4088, 0x2ba1: 0x402e4020, 0x2ba2: 0x002e4288, 0x2ba3: 0x002f3688, + 0x2ba4: 0x002fbe88, 0x2ba5: 0x402be820, 0x2ba6: 0x40303e20, 0x2ba7: 0x002d8888, + 0x2ba8: 0x402d8820, 0x2ba9: 0x002e1288, 0x2baa: 0x402e1220, 0x2bab: 0x00316088, + 0x2bac: 0x40316020, 0x2bad: 0x002bf888, 0x2bae: 0x002e9088, 0x2baf: 0x002bf088, + 0x2bb0: 0x002c0288, 0x2bb1: 0x4030d420, 0x2bb2: 0x0030ec88, 0x2bb3: 0x4030ec20, + 0x2bb4: 0x4030d620, 0x2bb5: 0x002d8a88, 0x2bb6: 0x402d8a20, 0x2bb7: 0x402f5420, + 0x2bb8: 0x402cac20, 0x2bb9: 0x402fb420, 0x2bba: 0x402f0e20, 0x2bbb: 0x402cb620, + 0x2bbc: 0x002dcc95, 0x2bbd: 0x0030be9d, 0x2bbe: 0x002ffc88, 0x2bbf: 0x00315888, + // Block 0xaf, offset 0x2bc0 + 0x2bc0: 0x0032aa88, 0x2bc1: 0x4032aa20, 0x2bc2: 0x0032ac88, 0x2bc3: 0x4032ac20, + 0x2bc4: 0x0032ae88, 0x2bc5: 0x4032ae20, 0x2bc6: 0x0032b088, 0x2bc7: 0x4032b020, + 0x2bc8: 0x0032b288, 0x2bc9: 0x4032b220, 0x2bca: 0x0032b688, 0x2bcb: 0x4032b620, + 0x2bcc: 0x0032b888, 0x2bcd: 0x4032b820, 0x2bce: 0x0032ba88, 0x2bcf: 0x4032ba20, + 0x2bd0: 0x0032bc88, 0x2bd1: 0x4032bc20, 0x2bd2: 0x0032be88, 0x2bd3: 0x4032be20, + 0x2bd4: 0x0032c088, 0x2bd5: 0x4032c020, 0x2bd6: 0x0032c488, 0x2bd7: 0x4032c420, + 0x2bd8: 0x0032c688, 0x2bd9: 0x4032c620, 0x2bda: 0x0032c888, 0x2bdb: 0x4032c820, + 0x2bdc: 0x0032ce88, 0x2bdd: 0x4032ce20, 0x2bde: 0x0032d088, 0x2bdf: 0x4032d020, + 0x2be0: 0x0032d288, 0x2be1: 0x4032d220, 0x2be2: 0x0032d488, 0x2be3: 0x4032d420, + 0x2be4: 0x0032d688, 0x2be5: 0x4032d620, 0x2be6: 0x0032d888, 0x2be7: 0x4032d820, + 0x2be8: 0x0032da88, 0x2be9: 0x4032da20, 0x2bea: 0x0032dc88, 0x2beb: 0x4032dc20, + 0x2bec: 0x0032de88, 0x2bed: 0x4032de20, 0x2bee: 0x0032e088, 0x2bef: 0x4032e020, + 0x2bf0: 0x0032e288, 0x2bf1: 0x4032e220, 0x2bf2: 0x00331888, 0x2bf3: 0x40331820, + 0x2bf4: 0x00331a88, 0x2bf5: 0x40331a20, 0x2bf6: 0x0032b488, 0x2bf7: 0x4032b420, + 0x2bf8: 0x0032c288, 0x2bf9: 0x4032c220, 0x2bfa: 0x0032ca88, 0x2bfb: 0x4032ca20, + 0x2bfc: 0x0032cc88, 0x2bfd: 0x4032cc20, 0x2bfe: 0x0032e488, 0x2bff: 0x4032e420, + // Block 0xb0, offset 0x2c00 + 0x2c00: 0x0032e688, 0x2c01: 0x4032e620, 0x2c02: 0x0032ec88, 0x2c03: 0x4032ec20, + 0x2c04: 0x0032ee88, 0x2c05: 0x4032ee20, 0x2c06: 0x0032f088, 0x2c07: 0x4032f020, + 0x2c08: 0x0032f888, 0x2c09: 0x4032f820, 0x2c0a: 0x0032fc88, 0x2c0b: 0x4032fc20, + 0x2c0c: 0x0032fe88, 0x2c0d: 0x4032fe20, 0x2c0e: 0x00330088, 0x2c0f: 0x40330020, + 0x2c10: 0x00330288, 0x2c11: 0x40330220, 0x2c12: 0x00330488, 0x2c13: 0x40330420, + 0x2c14: 0x00330688, 0x2c15: 0x40330620, 0x2c16: 0x00330c88, 0x2c17: 0x40330c20, + 0x2c18: 0x00331088, 0x2c19: 0x40331020, 0x2c1a: 0x00331288, 0x2c1b: 0x40331220, + 0x2c1c: 0x00331488, 0x2c1d: 0x40331420, 0x2c1e: 0x00331c88, 0x2c1f: 0x40331c20, + 0x2c20: 0x00331e88, 0x2c21: 0x40331e20, 0x2c22: 0x00332088, 0x2c23: 0x40332020, + 0x2c24: 0xe00014b0, 0x2c25: 0x40173a20, 0x2c26: 0x40173c20, 0x2c27: 0x40173e20, + 0x2c28: 0x40174020, 0x2c29: 0x40174220, 0x2c2a: 0x40174420, 0x2c2b: 0x0032ea88, + 0x2c2c: 0x4032ea20, 0x2c2d: 0x00330a88, 0x2c2e: 0x40330a20, 0x2c2f: 0xae605f02, + 0x2c30: 0xae602a02, 0x2c31: 0xae602202, 0x2c32: 0x0032f688, 0x2c33: 0x4032f620, + 0x2c39: 0x4002f820, 0x2c3a: 0x4002d420, 0x2c3b: 0x4002d620, + 0x2c3c: 0x4003b620, 0x2c3d: 0x4028b420, 0x2c3e: 0x4002fa20, 0x2c3f: 0x4003b820, + // Block 0xb1, offset 0x2c40 + 0x2c40: 0x40379820, 0x2c41: 0x40379c20, 0x2c42: 0x4037a020, 0x2c43: 0x4037a420, + 0x2c44: 0x4037a820, 0x2c45: 0x4037ac20, 0x2c46: 0x4037b020, 0x2c47: 0x4037b820, + 0x2c48: 0x4037bc20, 0x2c49: 0x4037c020, 0x2c4a: 0x4037c420, 0x2c4b: 0x4037c820, + 0x2c4c: 0x4037cc20, 0x2c4d: 0x4037d420, 0x2c4e: 0x4037d820, 0x2c4f: 0x4037dc20, + 0x2c50: 0x4037e020, 0x2c51: 0x4037e420, 0x2c52: 0x4037e820, 0x2c53: 0x4037f020, + 0x2c54: 0x4037f420, 0x2c55: 0x4037f820, 0x2c56: 0x4037fc20, 0x2c57: 0x40380020, + 0x2c58: 0x40380420, 0x2c59: 0x40380820, 0x2c5a: 0x40380c20, 0x2c5b: 0x40381020, + 0x2c5c: 0x40381420, 0x2c5d: 0x40381820, 0x2c5e: 0x40381c20, 0x2c5f: 0x40382420, + 0x2c60: 0x40382820, 0x2c61: 0x4037b420, 0x2c62: 0x4037d020, 0x2c63: 0x4037ec20, + 0x2c64: 0x40382020, 0x2c65: 0x40382c20, 0x2c67: 0x40383220, + 0x2c6d: 0x40383c20, + 0x2c70: 0x403bbc20, 0x2c71: 0x403bbe20, 0x2c72: 0x403bc020, 0x2c73: 0x403bc220, + 0x2c74: 0x403bc420, 0x2c75: 0x403bc620, 0x2c76: 0x403bc820, 0x2c77: 0x403bca20, + 0x2c78: 0x403bcc20, 0x2c79: 0x403bce20, 0x2c7a: 0x403bd020, 0x2c7b: 0x403bd220, + 0x2c7c: 0x403bd620, 0x2c7d: 0x403bd820, 0x2c7e: 0x403bda20, 0x2c7f: 0x403bdc20, + // Block 0xb2, offset 0x2c80 + 0x2c80: 0x403bde20, 0x2c81: 0x403be020, 0x2c82: 0x403be220, 0x2c83: 0x403be420, + 0x2c84: 0x403be620, 0x2c85: 0x403be820, 0x2c86: 0x403bea20, 0x2c87: 0x403bec20, + 0x2c88: 0x403bee20, 0x2c89: 0x403bf020, 0x2c8a: 0x403bf220, 0x2c8b: 0x403bf420, + 0x2c8c: 0x403bf620, 0x2c8d: 0x403bf820, 0x2c8e: 0x403bfa20, 0x2c8f: 0x403bfc20, + 0x2c90: 0x403bfe20, 0x2c91: 0x403c0020, 0x2c92: 0x403c0220, 0x2c93: 0x403c0420, + 0x2c94: 0x403c0820, 0x2c95: 0x403c0a20, 0x2c96: 0x403c0c20, 0x2c97: 0x403c0e20, + 0x2c98: 0x403c1020, 0x2c99: 0x403c1220, 0x2c9a: 0x403c1420, 0x2c9b: 0x403c1620, + 0x2c9c: 0x403c1820, 0x2c9d: 0x403c1a20, 0x2c9e: 0x403c1c20, 0x2c9f: 0x403c1e20, + 0x2ca0: 0x403c2020, 0x2ca1: 0x403c2220, 0x2ca2: 0x403c2420, 0x2ca3: 0x403c2620, + 0x2ca4: 0x403c2820, 0x2ca5: 0x403c2a20, 0x2ca6: 0x403bd420, 0x2ca7: 0x403c0620, + 0x2caf: 0x403c2c20, + 0x2cb0: 0x4005e620, + 0x2cbf: 0xa0900000, + // Block 0xb3, offset 0x2cc0 + 0x2cc0: 0x403c4e20, 0x2cc1: 0x403c7820, 0x2cc2: 0x403c9a20, 0x2cc3: 0x403cac20, + 0x2cc4: 0x403cca20, 0x2cc5: 0x403d1620, 0x2cc6: 0x403d3820, 0x2cc7: 0x403d4a20, + 0x2cc8: 0x403d7620, 0x2cc9: 0x403d8820, 0x2cca: 0x403d9a20, 0x2ccb: 0x403dfc20, + 0x2ccc: 0x403e3a20, 0x2ccd: 0x403e5820, 0x2cce: 0x403e6a20, 0x2ccf: 0x403eae20, + 0x2cd0: 0x403ec020, 0x2cd1: 0x403ee020, 0x2cd2: 0x403f4020, 0x2cd3: 0x403e9620, + 0x2cd4: 0x403e9820, 0x2cd5: 0x403e9a20, 0x2cd6: 0x403e9c20, + 0x2ce0: 0x403f4820, 0x2ce1: 0x403f4a20, 0x2ce2: 0x403f4c20, 0x2ce3: 0x403f4e20, + 0x2ce4: 0x403f5020, 0x2ce5: 0x403f5220, 0x2ce6: 0x403f5420, + 0x2ce8: 0x403f5620, 0x2ce9: 0x403f5820, 0x2cea: 0x403f5a20, 0x2ceb: 0x403f5c20, + 0x2cec: 0x403f5e20, 0x2ced: 0x403f6020, 0x2cee: 0x403f6220, + 0x2cf0: 0x403f6420, 0x2cf1: 0x403f6620, 0x2cf2: 0x403f6820, 0x2cf3: 0x403f6a20, + 0x2cf4: 0x403f6c20, 0x2cf5: 0x403f6e20, 0x2cf6: 0x403f7020, + 0x2cf8: 0x403f7220, 0x2cf9: 0x403f7420, 0x2cfa: 0x403f7620, 0x2cfb: 0x403f7820, + 0x2cfc: 0x403f7a20, 0x2cfd: 0x403f7c20, 0x2cfe: 0x403f7e20, + // Block 0xb4, offset 0x2d00 + 0x2d00: 0x403f8020, 0x2d01: 0x403f8220, 0x2d02: 0x403f8420, 0x2d03: 0x403f8620, + 0x2d04: 0x403f8820, 0x2d05: 0x403f8a20, 0x2d06: 0x403f8c20, + 0x2d08: 0x403f8e20, 0x2d09: 0x403f9020, 0x2d0a: 0x403f9220, 0x2d0b: 0x403f9420, + 0x2d0c: 0x403f9620, 0x2d0d: 0x403f9820, 0x2d0e: 0x403f9a20, + 0x2d10: 0x403f9c20, 0x2d11: 0x403f9e20, 0x2d12: 0x403fa020, 0x2d13: 0x403fa220, + 0x2d14: 0x403fa420, 0x2d15: 0x403fa620, 0x2d16: 0x403fa820, + 0x2d18: 0x403faa20, 0x2d19: 0x403fac20, 0x2d1a: 0x403fae20, 0x2d1b: 0x403fb020, + 0x2d1c: 0x403fb220, 0x2d1d: 0x403fb420, 0x2d1e: 0x403fb620, + 0x2d20: 0x84e619a9, 0x2d21: 0x84e619ad, 0x2d22: 0x84e619b1, 0x2d23: 0x84e619c5, + 0x2d24: 0x84e619e5, 0x2d25: 0x84e619f2, 0x2d26: 0x84e61a28, 0x2d27: 0x84e61a42, + 0x2d28: 0x84e61a54, 0x2d29: 0x84e61a5d, 0x2d2a: 0x84e61a77, 0x2d2b: 0x84e61a87, + 0x2d2c: 0x84e61a94, 0x2d2d: 0x84e61a9d, 0x2d2e: 0x84e61aa6, 0x2d2f: 0x84e61ada, + 0x2d30: 0x84e61b01, 0x2d31: 0x84e61b0c, 0x2d32: 0x84e61b2e, 0x2d33: 0x84e61b33, + 0x2d34: 0x84e61b86, 0x2d35: 0xe00014d8, 0x2d36: 0x84e61991, 0x2d37: 0x84e619d9, + 0x2d38: 0x84e61a27, 0x2d39: 0x84e61ad1, 0x2d3a: 0x84e61b4f, 0x2d3b: 0x84e61b5c, + 0x2d3c: 0x84e61b61, 0x2d3d: 0x84e61b6b, 0x2d3e: 0x84e61b70, 0x2d3f: 0x84e61b7a, + // Block 0xb5, offset 0x2d40 + 0x2d40: 0x40052620, 0x2d41: 0x40052820, 0x2d42: 0x40047420, 0x2d43: 0x40047620, + 0x2d44: 0x40047820, 0x2d45: 0x40047a20, 0x2d46: 0x40052a20, 0x2d47: 0x40052c20, + 0x2d48: 0x40052e20, 0x2d49: 0x40047c20, 0x2d4a: 0x40047e20, 0x2d4b: 0x40053020, + 0x2d4c: 0x40048020, 0x2d4d: 0x40048220, 0x2d4e: 0x40053220, 0x2d4f: 0x40053420, + 0x2d50: 0x40053620, 0x2d51: 0x40053820, 0x2d52: 0x40053a20, 0x2d53: 0x40053c20, + 0x2d54: 0x40053e20, 0x2d55: 0x40054020, 0x2d56: 0x40054220, 0x2d57: 0x40023620, + 0x2d58: 0x4002e220, 0x2d59: 0x4003ba20, 0x2d5a: 0x40054420, 0x2d5b: 0x40054620, + 0x2d5c: 0x40048420, 0x2d5d: 0x40048620, 0x2d5e: 0x40054820, 0x2d5f: 0x40054a20, + 0x2d60: 0x40048820, 0x2d61: 0x40048a20, 0x2d62: 0x40048c20, 0x2d63: 0x40048e20, + 0x2d64: 0x40049020, 0x2d65: 0x40049220, 0x2d66: 0x40049420, 0x2d67: 0x40049620, + 0x2d68: 0x40049820, 0x2d69: 0x40049a20, 0x2d6a: 0x4003ae20, 0x2d6b: 0x4003b020, + 0x2d6c: 0x4003b220, 0x2d6d: 0x4003b420, 0x2d6e: 0x4002c820, 0x2d6f: 0x40367020, + 0x2d70: 0x4002fc20, 0x2d71: 0x40030820, 0x2d72: 0x40024420, 0x2d73: 0x40030a20, + 0x2d74: 0x40024220, 0x2d75: 0x40026820, 0x2d76: 0x4004fc20, 0x2d77: 0x4004fe20, + 0x2d78: 0x40050020, 0x2d79: 0x4004d020, 0x2d7a: 0x40023020, 0x2d7b: 0x40023220, + // Block 0xb6, offset 0x2d80 + 0x2d80: 0xe0002401, 0x2d81: 0xe0002416, 0x2d82: 0x029cb684, 0x2d83: 0x029cb484, + 0x2d84: 0xe0002404, 0x2d85: 0x029d7684, 0x2d86: 0xe0002407, 0x2d87: 0xe000240a, + 0x2d88: 0xe000240d, 0x2d89: 0x02a40484, 0x2d8a: 0xe0002410, 0x2d8b: 0xe0002413, + 0x2d8c: 0xe0002419, 0x2d8d: 0xe000241c, 0x2d8e: 0xe000241f, 0x2d8f: 0x02b84684, + 0x2d90: 0x02b84484, 0x2d91: 0xe0002422, 0x2d92: 0x02bbe684, 0x2d93: 0x02bcf484, + 0x2d94: 0x02bea284, 0x2d95: 0xe0002425, 0x2d96: 0x02bf8884, 0x2d97: 0xe0002428, + 0x2d98: 0x02c49884, 0x2d99: 0x02ca6a84, 0x2d9b: 0x02cbc284, + 0x2d9c: 0xe000242b, 0x2d9d: 0xe000242e, 0x2d9e: 0xe0002436, 0x2d9f: 0x02d79a84, + 0x2da0: 0x02d82284, 0x2da1: 0x02d86a84, 0x2da2: 0x02d87484, 0x2da3: 0x02e0d884, + 0x2da4: 0x02e45684, 0x2da5: 0xe0002439, 0x2da6: 0x029c5884, 0x2da7: 0xe000243c, + 0x2da8: 0x02e55a84, 0x2da9: 0xe000243f, 0x2daa: 0xe0002442, 0x2dab: 0xe0002445, + 0x2dac: 0xe0002448, 0x2dad: 0x02f27684, 0x2dae: 0xe000244b, 0x2daf: 0x02f9f284, + 0x2db0: 0x02fd3e84, 0x2db1: 0x02fea684, 0x2db2: 0x02fea484, 0x2db3: 0xe0002451, + 0x2db4: 0xe0002454, 0x2db5: 0xe000244e, 0x2db6: 0xe0002457, 0x2db7: 0xe000245a, + 0x2db8: 0x02ff1684, 0x2db9: 0x03000484, 0x2dba: 0x03010084, 0x2dbb: 0xe000245d, + 0x2dbc: 0xe0002460, 0x2dbd: 0xe0002463, 0x2dbe: 0x0304f284, 0x2dbf: 0xe0002466, + // Block 0xb7, offset 0x2dc0 + 0x2dc0: 0xe0002469, 0x2dc1: 0x030c9c84, 0x2dc2: 0x0310c884, 0x2dc3: 0x03130084, + 0x2dc4: 0x0312fe84, 0x2dc5: 0x03138284, 0x2dc6: 0x0313a484, 0x2dc7: 0xe000246c, + 0x2dc8: 0x03174084, 0x2dc9: 0x031a3a84, 0x2dca: 0xe000246f, 0x2dcb: 0x031ecc84, + 0x2dcc: 0x031f6c84, 0x2dcd: 0xe0002472, 0x2dce: 0xe0002475, 0x2dcf: 0xe0002478, + 0x2dd0: 0x03290a84, 0x2dd1: 0x032aee84, 0x2dd2: 0x032af084, 0x2dd3: 0x032afe84, + 0x2dd4: 0x032bd084, 0x2dd5: 0xe000247b, 0x2dd6: 0x032c3a84, 0x2dd7: 0xe000247e, + 0x2dd8: 0x032ea484, 0x2dd9: 0x032fcc84, 0x2dda: 0x0330ea84, 0x2ddb: 0x03319c84, + 0x2ddc: 0x0331bc84, 0x2ddd: 0x0331be84, 0x2dde: 0xe0002481, 0x2ddf: 0x0331c084, + 0x2de0: 0x0332c684, 0x2de1: 0xe0002484, 0x2de2: 0x0334d884, 0x2de3: 0xe0002487, + 0x2de4: 0xe000248a, 0x2de5: 0x0338f884, 0x2de6: 0x033c3e84, 0x2de7: 0xe000248d, + 0x2de8: 0x033d4c84, 0x2de9: 0x033d8884, 0x2dea: 0x033dfc84, 0x2deb: 0xe0002490, + 0x2dec: 0x033ea084, 0x2ded: 0xe0002493, 0x2dee: 0x033efe84, 0x2def: 0xe0002496, + 0x2df0: 0x033f3284, 0x2df1: 0xe0002499, 0x2df2: 0xe000249c, 0x2df3: 0x033f3e84, + // Block 0xb8, offset 0x2e00 + 0x2e00: 0x029c0084, 0x2e01: 0x029c5084, 0x2e02: 0x029c6c84, 0x2e03: 0x029c7e84, + 0x2e04: 0x029cb284, 0x2e05: 0x029d0a84, 0x2e06: 0x029d1884, 0x2e07: 0x029d4084, + 0x2e08: 0x029d7484, 0x2e09: 0x02a27e84, 0x2e0a: 0x02a2ca84, 0x2e0b: 0x02a2d684, + 0x2e0c: 0x02a30484, 0x2e0d: 0x02a32c84, 0x2e0e: 0x02a35684, 0x2e0f: 0x02a3c084, + 0x2e10: 0x02a3ea84, 0x2e11: 0x02a40084, 0x2e12: 0x02a53684, 0x2e13: 0x02a5f284, + 0x2e14: 0x02a62a84, 0x2e15: 0x02a63484, 0x2e16: 0x02a67084, 0x2e17: 0x02a68284, + 0x2e18: 0x02a6b884, 0x2e19: 0x02a6d284, 0x2e1a: 0x02a70484, 0x2e1b: 0x02a76c84, + 0x2e1c: 0x02a79084, 0x2e1d: 0x02a7c684, 0x2e1e: 0x02adae84, 0x2e1f: 0x02ae3e84, + 0x2e20: 0x02b1d684, 0x2e21: 0x02b20484, 0x2e22: 0x02b21484, 0x2e23: 0x02b22a84, + 0x2e24: 0x02b24e84, 0x2e25: 0x02b2e684, 0x2e26: 0x02b6a084, 0x2e27: 0x02b70084, + 0x2e28: 0x02b7f084, 0x2e29: 0x02b81e84, 0x2e2a: 0x02b84484, 0x2e2b: 0x02b87084, + 0x2e2c: 0x02b8dc84, 0x2e2d: 0x02b8e284, 0x2e2e: 0x02bbb684, 0x2e2f: 0x02bbca84, + 0x2e30: 0x02bbe284, 0x2e31: 0x02bbfc84, 0x2e32: 0x02bce484, 0x2e33: 0x02bcf484, + 0x2e34: 0x02bcfe84, 0x2e35: 0x02bde884, 0x2e36: 0x02bdfc84, 0x2e37: 0x02be1684, + 0x2e38: 0x02be2684, 0x2e39: 0x02bea084, 0x2e3a: 0x02bec284, 0x2e3b: 0x02bee684, + 0x2e3c: 0x02bf8684, 0x2e3d: 0x02c41084, 0x2e3e: 0x02c46c84, 0x2e3f: 0x02c49684, + // Block 0xb9, offset 0x2e40 + 0x2e40: 0x02ca5e84, 0x2e41: 0x02ca6884, 0x2e42: 0x02cb0e84, 0x2e43: 0x02cb2e84, + 0x2e44: 0x02cb4884, 0x2e45: 0x02cb7284, 0x2e46: 0x02cbc084, 0x2e47: 0x02cbca84, + 0x2e48: 0x02cde084, 0x2e49: 0x02ce1084, 0x2e4a: 0x02ce5084, 0x2e4b: 0x02d64084, + 0x2e4c: 0x02d6c484, 0x2e4d: 0x02d6f284, 0x2e4e: 0x02d76684, 0x2e4f: 0x02d79684, + 0x2e50: 0x02d7a884, 0x2e51: 0x02d7b684, 0x2e52: 0x02d81e84, 0x2e53: 0x02d82884, + 0x2e54: 0x02d86884, 0x2e55: 0x02e0d684, 0x2e56: 0x02e45484, 0x2e57: 0x02e46c84, + 0x2e58: 0x02e47684, 0x2e59: 0x02e47e84, 0x2e5a: 0x02e48e84, 0x2e5b: 0x02e4b284, + 0x2e5c: 0x02e4b684, 0x2e5d: 0x02e55884, 0x2e5e: 0x02e70884, 0x2e5f: 0x02e71284, + 0x2e60: 0x02e9b884, 0x2e61: 0x02e9cc84, 0x2e62: 0x02ea3084, 0x2e63: 0x02ea3e84, + 0x2e64: 0x02ea5084, 0x2e65: 0x02ea6084, 0x2e66: 0x02eb1684, 0x2e67: 0x02eb2484, + 0x2e68: 0x02ecec84, 0x2e69: 0x02ecfa84, 0x2e6a: 0x02ed5c84, 0x2e6b: 0x02ed7e84, + 0x2e6c: 0x02eddc84, 0x2e6d: 0x02efb684, 0x2e6e: 0x02efc484, 0x2e6f: 0x02efe684, + 0x2e70: 0x02f27484, 0x2e71: 0x02f37084, 0x2e72: 0x02f37c84, 0x2e73: 0x02f4e884, + 0x2e74: 0x02f59684, 0x2e75: 0x02f5f284, 0x2e76: 0x02f8e684, 0x2e77: 0x02f9f084, + 0x2e78: 0x02fe6c84, 0x2e79: 0x02fea284, 0x2e7a: 0x02ff1484, 0x2e7b: 0x02ff7a84, + 0x2e7c: 0x03000284, 0x2e7d: 0x03001884, 0x2e7e: 0x03002484, 0x2e7f: 0x03006684, + // Block 0xba, offset 0x2e80 + 0x2e80: 0x0300fe84, 0x2e81: 0x03011284, 0x2e82: 0x0303c684, 0x2e83: 0x0303d484, + 0x2e84: 0x0303e684, 0x2e85: 0x0303f884, 0x2e86: 0x03041884, 0x2e87: 0x03043684, + 0x2e88: 0x03043e84, 0x2e89: 0x0304dc84, 0x2e8a: 0x0304e484, 0x2e8b: 0x0304f084, + 0x2e8c: 0x030c9a84, 0x2e8d: 0x030cd684, 0x2e8e: 0x03108084, 0x2e8f: 0x03109884, + 0x2e90: 0x0310c684, 0x2e91: 0x0312fc84, 0x2e92: 0x03131684, 0x2e93: 0x0313a484, + 0x2e94: 0x03140084, 0x2e95: 0x03186e84, 0x2e96: 0x03188c84, 0x2e97: 0x0318aa84, + 0x2e98: 0x0318f084, 0x2e99: 0x03193a84, 0x2e9a: 0x031ac884, 0x2e9b: 0x031ae084, + 0x2e9c: 0x031b6684, 0x2e9d: 0x031d5684, 0x2e9e: 0x031d9484, 0x2e9f: 0x031f3684, + 0x2ea0: 0x031f6084, 0x2ea1: 0x031f6a84, 0x2ea2: 0x03212284, 0x2ea3: 0x03229284, + 0x2ea4: 0x03238c84, 0x2ea5: 0x03239884, 0x2ea6: 0x0323a284, 0x2ea7: 0x032aee84, + 0x2ea8: 0x032b0084, 0x2ea9: 0x032c3884, 0x2eaa: 0x032d6c84, 0x2eab: 0x032d7284, + 0x2eac: 0x032dd084, 0x2ead: 0x032ea284, 0x2eae: 0x032ebc84, 0x2eaf: 0x032ec484, + 0x2eb0: 0x032ed284, 0x2eb1: 0x032f9684, 0x2eb2: 0x032fda84, 0x2eb3: 0x032fe684, + 0x2eb4: 0x03300284, 0x2eb5: 0x03315084, 0x2eb6: 0x0331b684, 0x2eb7: 0x0331be84, + 0x2eb8: 0x03332c84, 0x2eb9: 0x03333284, 0x2eba: 0x03335884, 0x2ebb: 0x03355084, + 0x2ebc: 0x0335b084, 0x2ebd: 0x0335be84, 0x2ebe: 0x03364a84, 0x2ebf: 0x03365e84, + // Block 0xbb, offset 0x2ec0 + 0x2ec0: 0x03366484, 0x2ec1: 0x03367884, 0x2ec2: 0x0336b484, 0x2ec3: 0x0339ca84, + 0x2ec4: 0x033cea84, 0x2ec5: 0x033cfe84, 0x2ec6: 0x033d4a84, 0x2ec7: 0x033d7684, + 0x2ec8: 0x033d8684, 0x2ec9: 0x033d9a84, 0x2eca: 0x033da284, 0x2ecb: 0x033df284, + 0x2ecc: 0x033dfa84, 0x2ecd: 0x033e1c84, 0x2ece: 0x033e2684, 0x2ecf: 0x033e4084, + 0x2ed0: 0x033e7684, 0x2ed1: 0x033e9484, 0x2ed2: 0x033ea484, 0x2ed3: 0x033f1a84, + 0x2ed4: 0x033f3884, 0x2ed5: 0x033f4084, + 0x2ef0: 0x40273a20, 0x2ef1: 0x40273c20, 0x2ef2: 0x40273e20, 0x2ef3: 0x40274020, + 0x2ef4: 0x40274220, 0x2ef5: 0x40274420, 0x2ef6: 0x40274620, 0x2ef7: 0x40274820, + 0x2ef8: 0x40274a20, 0x2ef9: 0x40274c20, 0x2efa: 0x40274e20, 0x2efb: 0x40275020, + // Block 0xbc, offset 0x2f00 + 0x2f00: 0x00021283, 0x2f01: 0x40025c20, 0x2f02: 0x40030420, 0x2f03: 0x40051220, + 0x2f04: 0x40279a20, 0x2f05: 0x4027ca20, 0x2f06: 0xe0002206, 0x2f07: 0xe00001d3, + 0x2f08: 0x40049c20, 0x2f09: 0x40049e20, 0x2f0a: 0x4004a020, 0x2f0b: 0x4004a220, + 0x2f0c: 0x4004a420, 0x2f0d: 0x4004a620, 0x2f0e: 0x4004a820, 0x2f0f: 0x4004aa20, + 0x2f10: 0x4004ac20, 0x2f11: 0x4004ae20, 0x2f12: 0x40279c20, 0x2f13: 0x40279e20, + 0x2f14: 0x4004b020, 0x2f15: 0x4004b220, 0x2f16: 0x4004b420, 0x2f17: 0x4004b620, + 0x2f18: 0x4004b820, 0x2f19: 0x4004ba20, 0x2f1a: 0x4004bc20, 0x2f1b: 0x4004be20, + 0x2f1c: 0x40023820, 0x2f1d: 0x4003ea20, 0x2f1e: 0x4003ec20, 0x2f1f: 0x4003ee20, + 0x2f20: 0x4027a020, 0x2f21: 0xe0000267, 0x2f22: 0xe000037f, 0x2f23: 0xe0000459, + 0x2f24: 0xe000052e, 0x2f25: 0xe00005f8, 0x2f26: 0xe00006c3, 0x2f27: 0xe000076b, + 0x2f28: 0xe0000817, 0x2f29: 0xe00008bc, 0x2f2a: 0xada12202, 0x2f2b: 0xae412302, + 0x2f2c: 0xae812402, 0x2f2d: 0xade12502, 0x2f2e: 0xae012602, 0x2f2f: 0xae012702, + 0x2f30: 0x40023a20, 0x2f31: 0x4027ce20, 0x2f32: 0xe0000152, 0x2f33: 0x4027d020, + 0x2f34: 0xe0000155, 0x2f35: 0x4027d220, 0x2f36: 0x00279c84, 0x2f37: 0x4027a220, + 0x2f38: 0x02a68284, 0x2f39: 0x02a68884, 0x2f3a: 0x02a68a84, 0x2f3b: 0x4027cc20, + 0x2f3c: 0xe000231a, 0x2f3d: 0x40051420, 0x2f3e: 0x4027a420, 0x2f3f: 0x4027a620, + // Block 0xbd, offset 0x2f40 + 0x2f41: 0x0065768d, 0x2f42: 0x0065768e, 0x2f43: 0x0065788d, + 0x2f44: 0x0065788e, 0x2f45: 0x00657a8d, 0x2f46: 0x00657a8e, 0x2f47: 0x00657e8d, + 0x2f48: 0x00657e8e, 0x2f49: 0x0065808d, 0x2f4a: 0x0065808e, 0x2f4b: 0x0065828e, + 0x2f4c: 0xe000216a, 0x2f4d: 0x0065848e, 0x2f4e: 0xe0002188, 0x2f4f: 0x0065868e, + 0x2f50: 0xe00021b8, 0x2f51: 0x0065888e, 0x2f52: 0xe00021d6, 0x2f53: 0x00658a8e, + 0x2f54: 0xe00021e0, 0x2f55: 0x00658c8e, 0x2f56: 0xe00021ef, 0x2f57: 0x00658e8e, + 0x2f58: 0xe0002200, 0x2f59: 0x0065908e, 0x2f5a: 0xe000220f, 0x2f5b: 0x0065928e, + 0x2f5c: 0xe0002215, 0x2f5d: 0x0065948e, 0x2f5e: 0xe0002223, 0x2f5f: 0x0065968e, + 0x2f60: 0xe0002229, 0x2f61: 0x0065988e, 0x2f62: 0xe0002234, 0x2f63: 0x00659a8d, + 0x2f64: 0x00659a8e, 0x2f65: 0xe000223a, 0x2f66: 0x00659c8e, 0x2f67: 0xe0002240, + 0x2f68: 0x00659e8e, 0x2f69: 0xe000224a, 0x2f6a: 0x0065a08e, 0x2f6b: 0x0065a28e, + 0x2f6c: 0x0065a48e, 0x2f6d: 0x0065a68e, 0x2f6e: 0x0065a88e, 0x2f6f: 0x0065aa8e, + 0x2f70: 0xe0002258, 0x2f71: 0xe000225e, 0x2f72: 0x0065ac8e, 0x2f73: 0xe000227a, + 0x2f74: 0xe0002280, 0x2f75: 0x0065ae8e, 0x2f76: 0xe000229a, 0x2f77: 0xe00022a0, + 0x2f78: 0x0065b08e, 0x2f79: 0xe00022bd, 0x2f7a: 0xe00022c3, 0x2f7b: 0x0065b28e, + 0x2f7c: 0xe00022ec, 0x2f7d: 0xe00022f2, 0x2f7e: 0x0065b48e, 0x2f7f: 0x0065b68e, + // Block 0xbe, offset 0x2f80 + 0x2f80: 0x0065b88e, 0x2f81: 0x0065ba8e, 0x2f82: 0x0065bc8e, 0x2f83: 0x0065be8d, + 0x2f84: 0x0065be8e, 0x2f85: 0x0065c08d, 0x2f86: 0x0065c08e, 0x2f87: 0x0065c48d, + 0x2f88: 0x0065c48e, 0x2f89: 0x0065c68e, 0x2f8a: 0x0065c88e, 0x2f8b: 0x0065ca8e, + 0x2f8c: 0x0065cc8e, 0x2f8d: 0x0065ce8e, 0x2f8e: 0x0065d08d, 0x2f8f: 0x0065d08e, + 0x2f90: 0x0065d28e, 0x2f91: 0x0065d48e, 0x2f92: 0x0065d68e, 0x2f93: 0x0065d88e, + 0x2f94: 0xe000214c, 0x2f95: 0x0065828d, 0x2f96: 0x0065888d, + 0x2f99: 0xa0812802, 0x2f9a: 0xa0812902, 0x2f9b: 0x40063c20, + 0x2f9c: 0x40063e20, 0x2f9d: 0x4027d420, 0x2f9e: 0xe0000158, 0x2f9f: 0xf0001616, + 0x2fa0: 0x40023c20, 0x2fa1: 0x0065768f, 0x2fa2: 0x00657691, 0x2fa3: 0x0065788f, + 0x2fa4: 0x00657891, 0x2fa5: 0x00657a8f, 0x2fa6: 0x00657a91, 0x2fa7: 0x00657e8f, + 0x2fa8: 0x00657e91, 0x2fa9: 0x0065808f, 0x2faa: 0x00658091, 0x2fab: 0x00658291, + 0x2fac: 0xe000216d, 0x2fad: 0x00658491, 0x2fae: 0xe000218b, 0x2faf: 0x00658691, + 0x2fb0: 0xe00021bb, 0x2fb1: 0x00658891, 0x2fb2: 0xe00021d9, 0x2fb3: 0x00658a91, + 0x2fb4: 0xe00021e3, 0x2fb5: 0x00658c91, 0x2fb6: 0xe00021f2, 0x2fb7: 0x00658e91, + 0x2fb8: 0xe0002203, 0x2fb9: 0x00659091, 0x2fba: 0xe0002212, 0x2fbb: 0x00659291, + 0x2fbc: 0xe0002218, 0x2fbd: 0x00659491, 0x2fbe: 0xe0002226, 0x2fbf: 0x00659691, + // Block 0xbf, offset 0x2fc0 + 0x2fc0: 0xe000222c, 0x2fc1: 0x00659891, 0x2fc2: 0xe0002237, 0x2fc3: 0x00659a8f, + 0x2fc4: 0x00659a91, 0x2fc5: 0xe000223d, 0x2fc6: 0x00659c91, 0x2fc7: 0xe0002243, + 0x2fc8: 0x00659e91, 0x2fc9: 0xe000224d, 0x2fca: 0x0065a091, 0x2fcb: 0x0065a291, + 0x2fcc: 0x0065a491, 0x2fcd: 0x0065a691, 0x2fce: 0x0065a891, 0x2fcf: 0x0065aa91, + 0x2fd0: 0xe000225b, 0x2fd1: 0xe0002261, 0x2fd2: 0x0065ac91, 0x2fd3: 0xe000227d, + 0x2fd4: 0xe0002283, 0x2fd5: 0x0065ae91, 0x2fd6: 0xe000229d, 0x2fd7: 0xe00022a3, + 0x2fd8: 0x0065b091, 0x2fd9: 0xe00022c0, 0x2fda: 0xe00022c6, 0x2fdb: 0x0065b291, + 0x2fdc: 0xe00022ef, 0x2fdd: 0xe00022f5, 0x2fde: 0x0065b491, 0x2fdf: 0x0065b691, + 0x2fe0: 0x0065b891, 0x2fe1: 0x0065ba91, 0x2fe2: 0x0065bc91, 0x2fe3: 0x0065be8f, + 0x2fe4: 0x0065be91, 0x2fe5: 0x0065c08f, 0x2fe6: 0x0065c091, 0x2fe7: 0x0065c48f, + 0x2fe8: 0x0065c491, 0x2fe9: 0x0065c691, 0x2fea: 0x0065c891, 0x2feb: 0x0065ca91, + 0x2fec: 0x0065cc91, 0x2fed: 0x0065ce91, 0x2fee: 0x0065d08f, 0x2fef: 0x0065d091, + 0x2ff0: 0x0065d291, 0x2ff1: 0x0065d491, 0x2ff2: 0x0065d691, 0x2ff3: 0x0065d891, + 0x2ff4: 0xe000214f, 0x2ff5: 0x0065828f, 0x2ff6: 0x0065888f, 0x2ff7: 0xe000236a, + 0x2ff8: 0xe0002371, 0x2ff9: 0xe0002374, 0x2ffa: 0xe0002377, 0x2ffb: 0x40023e20, + 0x2ffc: 0x4027d620, 0x2ffd: 0x4027d820, 0x2ffe: 0xe000015b, 0x2fff: 0xf0001616, + // Block 0xc0, offset 0x3000 + 0x3005: 0x4065da20, 0x3006: 0x4065dc20, 0x3007: 0x4065de20, + 0x3008: 0x4065e020, 0x3009: 0x4065e420, 0x300a: 0x4065e620, 0x300b: 0x4065e820, + 0x300c: 0x4065ea20, 0x300d: 0x4065ec20, 0x300e: 0x4065ee20, 0x300f: 0x4065f420, + 0x3010: 0x4065f620, 0x3011: 0x4065f820, 0x3012: 0x4065fa20, 0x3013: 0x4065fe20, + 0x3014: 0x40660020, 0x3015: 0x40660220, 0x3016: 0x40660420, 0x3017: 0x40660620, + 0x3018: 0x40660820, 0x3019: 0x40660a20, 0x301a: 0x40661220, 0x301b: 0x40661420, + 0x301c: 0x40661820, 0x301d: 0x40661a20, 0x301e: 0x40661e20, 0x301f: 0x40662020, + 0x3020: 0x40662220, 0x3021: 0x40662420, 0x3022: 0x40662620, 0x3023: 0x40662820, + 0x3024: 0x40662a20, 0x3025: 0x40662e20, 0x3026: 0x40663620, 0x3027: 0x40663820, + 0x3028: 0x40663a20, 0x3029: 0x40663c20, 0x302a: 0x4065e220, 0x302b: 0x4065f020, + 0x302c: 0x4065fc20, 0x302d: 0x40663e20, + 0x3031: 0x0062ac84, 0x3032: 0x0062ae84, 0x3033: 0x00646884, + 0x3034: 0x0062b084, 0x3035: 0x00646c84, 0x3036: 0x00646e84, 0x3037: 0x0062b284, + 0x3038: 0x0062b484, 0x3039: 0x0062b684, 0x303a: 0x00647484, 0x303b: 0x00647684, + 0x303c: 0x00647884, 0x303d: 0x00647a84, 0x303e: 0x00647c84, 0x303f: 0x00647e84, + // Block 0xc1, offset 0x3040 + 0x3040: 0x0062e084, 0x3041: 0x0062b884, 0x3042: 0x0062ba84, 0x3043: 0x0062bc84, + 0x3044: 0x0062ee84, 0x3045: 0x0062be84, 0x3046: 0x0062c084, 0x3047: 0x0062c284, + 0x3048: 0x0062c484, 0x3049: 0x0062c684, 0x304a: 0x0062c884, 0x304b: 0x0062ca84, + 0x304c: 0x0062cc84, 0x304d: 0x0062ce84, 0x304e: 0x0062d084, 0x304f: 0x0063a884, + 0x3050: 0x0063aa84, 0x3051: 0x0063ac84, 0x3052: 0x0063ae84, 0x3053: 0x0063b084, + 0x3054: 0x0063b284, 0x3055: 0x0063b484, 0x3056: 0x0063b684, 0x3057: 0x0063b884, + 0x3058: 0x0063ba84, 0x3059: 0x0063bc84, 0x305a: 0x0063be84, 0x305b: 0x0063c084, + 0x305c: 0x0063c284, 0x305d: 0x0063c484, 0x305e: 0x0063c684, 0x305f: 0x0063c884, + 0x3060: 0x0063ca84, 0x3061: 0x0063cc84, 0x3062: 0x0063ce84, 0x3063: 0x0063d084, + 0x3064: 0x0063a684, 0x3065: 0x0062d484, 0x3066: 0x0062d684, 0x3067: 0x0064a284, + 0x3068: 0x0064a484, 0x3069: 0x0064ac84, 0x306a: 0x0064b084, 0x306b: 0x0064ba84, + 0x306c: 0x0064c284, 0x306d: 0x0064c684, 0x306e: 0x0062e484, 0x306f: 0x0064ce84, + 0x3070: 0x0064d284, 0x3071: 0x0062e684, 0x3072: 0x0062e884, 0x3073: 0x0062ec84, + 0x3074: 0x0062f084, 0x3075: 0x0062f284, 0x3076: 0x0062fa84, 0x3077: 0x0062fe84, + 0x3078: 0x00630284, 0x3079: 0x00630484, 0x307a: 0x00630684, 0x307b: 0x00630884, + 0x307c: 0x00630a84, 0x307d: 0x00631084, 0x307e: 0x00631884, 0x307f: 0x00632c84, + // Block 0xc2, offset 0x3080 + 0x3080: 0x00633a84, 0x3081: 0x00634484, 0x3082: 0x0064f684, 0x3083: 0x0064f884, + 0x3084: 0x00635a84, 0x3085: 0x00635c84, 0x3086: 0x00635e84, 0x3087: 0x0063ee84, + 0x3088: 0x0063f084, 0x3089: 0x0063f684, 0x308a: 0x00640884, 0x308b: 0x00640a84, + 0x308c: 0x00640e84, 0x308d: 0x00642284, 0x308e: 0x00642884, + 0x3090: 0x4027a820, 0x3091: 0x4027aa20, 0x3092: 0x029c0094, 0x3093: 0x029d1894, + 0x3094: 0x029c1294, 0x3095: 0x02adb694, 0x3096: 0x029c1494, 0x3097: 0x029c5a94, + 0x3098: 0x029c1694, 0x3099: 0x02ea6494, 0x309a: 0x029cb294, 0x309b: 0x029c3294, + 0x309c: 0x029c0294, 0x309d: 0x02b25294, 0x309e: 0x02ae6094, 0x309f: 0x029d7494, + 0x30a0: 0xe000237a, 0x30a1: 0xe0002383, 0x30a2: 0xe0002380, 0x30a3: 0xe000237d, + 0x30a4: 0x40661c20, 0x30a5: 0xe000238c, 0x30a6: 0x40661620, 0x30a7: 0xe0002389, + 0x30a8: 0xe000239e, 0x30a9: 0xe0002386, 0x30aa: 0xe0002395, 0x30ab: 0xe000239b, + 0x30ac: 0x40663420, 0x30ad: 0x4065f220, 0x30ae: 0xe000238f, 0x30af: 0xe0002392, + 0x30b0: 0x40663020, 0x30b1: 0x40663220, 0x30b2: 0x40662c20, 0x30b3: 0xe0002398, + 0x30b4: 0x0065dc99, 0x30b5: 0x0065e699, 0x30b6: 0x0065ee99, 0x30b7: 0x0065f499, + 0x30b8: 0x40660c20, 0x30b9: 0x40660e20, 0x30ba: 0x40661020, + // Block 0xc3, offset 0x30c0 + 0x30c0: 0x40275220, 0x30c1: 0x40275420, 0x30c2: 0x40275620, 0x30c3: 0x40275820, + 0x30c4: 0x40275a20, 0x30c5: 0x40275c20, 0x30c6: 0x40275e20, 0x30c7: 0x40276020, + 0x30c8: 0x40276220, 0x30c9: 0x40276420, 0x30ca: 0x40276620, 0x30cb: 0x40276820, + 0x30cc: 0x40276a20, 0x30cd: 0x40276c20, 0x30ce: 0x40276e20, 0x30cf: 0x40277020, + 0x30d0: 0x40277220, 0x30d1: 0x40277420, 0x30d2: 0x40277620, 0x30d3: 0x40277820, + 0x30d4: 0x40277a20, 0x30d5: 0x40277c20, 0x30d6: 0x40277e20, 0x30d7: 0x40278020, + 0x30d8: 0x40278220, 0x30d9: 0x40278420, 0x30da: 0x40278620, 0x30db: 0x40278820, + 0x30dc: 0x40278a20, 0x30dd: 0x40278c20, 0x30de: 0x40278e20, 0x30df: 0x40279020, + 0x30e0: 0x40279220, 0x30e1: 0x40279420, 0x30e2: 0x40279620, 0x30e3: 0x40279820, + 0x30f0: 0x0065868f, 0x30f1: 0x00658e8f, 0x30f2: 0x0065908f, 0x30f3: 0x00659e8f, + 0x30f4: 0x0065a48f, 0x30f5: 0x0065aa8f, 0x30f6: 0x0065ac8f, 0x30f7: 0x0065ae8f, + 0x30f8: 0x0065b08f, 0x30f9: 0x0065b28f, 0x30fa: 0x0065b88f, 0x30fb: 0x0065c68f, + 0x30fc: 0x0065c88f, 0x30fd: 0x0065ca8f, 0x30fe: 0x0065cc8f, 0x30ff: 0x0065ce8f, + // Block 0xc4, offset 0x3100 + 0x3100: 0xf0000404, 0x3101: 0xf0000404, 0x3102: 0xf0000404, 0x3103: 0xf0000404, + 0x3104: 0xf0000404, 0x3105: 0xf0000404, 0x3106: 0xf0000404, 0x3107: 0xf0000404, + 0x3108: 0xf0000404, 0x3109: 0xf0000404, 0x310a: 0xf0000404, 0x310b: 0xf0000404, + 0x310c: 0xf0000404, 0x310d: 0xf0000404, 0x310e: 0xe000004c, 0x310f: 0xe0000051, + 0x3110: 0xe0000056, 0x3111: 0xe000005b, 0x3112: 0xe0000060, 0x3113: 0xe0000065, + 0x3114: 0xe000006a, 0x3115: 0xe000006f, 0x3116: 0xe0000083, 0x3117: 0xe000008d, + 0x3118: 0xe0000092, 0x3119: 0xe0000097, 0x311a: 0xe000009c, 0x311b: 0xe00000a1, + 0x311c: 0xe0000088, 0x311d: 0xe0000074, 0x311e: 0xe000007c, + 0x3120: 0xf0000404, 0x3121: 0xf0000404, 0x3122: 0xf0000404, 0x3123: 0xf0000404, + 0x3124: 0xf0000404, 0x3125: 0xf0000404, 0x3126: 0xf0000404, 0x3127: 0xf0000404, + 0x3128: 0xf0000404, 0x3129: 0xf0000404, 0x312a: 0xf0000404, 0x312b: 0xf0000404, + 0x312c: 0xf0000404, 0x312d: 0xf0000404, 0x312e: 0xf0000404, 0x312f: 0xf0000404, + 0x3130: 0xf0000404, 0x3131: 0xf0000404, 0x3132: 0xf0000404, 0x3133: 0xf0000404, + 0x3134: 0xf0000404, 0x3135: 0xf0000404, 0x3136: 0xf0000404, 0x3137: 0xf0000404, + 0x3138: 0xf0000404, 0x3139: 0xf0000404, 0x313a: 0xf0000404, 0x313b: 0xf0000404, + 0x313c: 0xf0000404, 0x313d: 0xf0000404, 0x313e: 0xf0000404, 0x313f: 0xf0000404, + // Block 0xc5, offset 0x3140 + 0x3140: 0xf0000404, 0x3141: 0xf0000404, 0x3142: 0xf0000404, 0x3143: 0xf0000404, + 0x3144: 0x02aa9e86, 0x3145: 0x02bcf886, 0x3146: 0x02cb0e86, 0x3147: 0x02f71e86, + 0x3148: 0xe00002e3, 0x3149: 0xe00003d8, 0x314a: 0xe00004b3, 0x314b: 0xe000057d, + 0x314c: 0xe0000648, 0x314d: 0xe00006f0, 0x314e: 0xe000079c, 0x314f: 0xe0000841, + 0x3150: 0xe0000ec0, 0x3151: 0xf0000606, 0x3152: 0xf0000606, 0x3153: 0xf0000606, + 0x3154: 0xf0000606, 0x3155: 0xf0000606, 0x3156: 0xf0000606, 0x3157: 0xf0000606, + 0x3158: 0xf0000606, 0x3159: 0xf0000606, 0x315a: 0xf0000606, 0x315b: 0xf0000606, + 0x315c: 0xf0000606, 0x315d: 0xf0000606, 0x315e: 0xf0000606, 0x315f: 0xf0000606, + 0x3160: 0x0062ac86, 0x3161: 0x0062b086, 0x3162: 0x0062b286, 0x3163: 0x0062b686, + 0x3164: 0x0062b886, 0x3165: 0x0062ba86, 0x3166: 0x0062be86, 0x3167: 0x0062c286, + 0x3168: 0x0062c486, 0x3169: 0x0062c886, 0x316a: 0x0062ca86, 0x316b: 0x0062cc86, + 0x316c: 0x0062ce86, 0x316d: 0x0062d086, 0x316e: 0xf0000606, 0x316f: 0xf0000606, + 0x3170: 0xf0000606, 0x3171: 0xf0000606, 0x3172: 0xf0000606, 0x3173: 0xf0000606, + 0x3174: 0xf0000606, 0x3175: 0xf0000606, 0x3176: 0xf0000606, 0x3177: 0xf0000606, + 0x3178: 0xf0000606, 0x3179: 0xf0000606, 0x317a: 0xf0000606, 0x317b: 0xf0000606, + 0x317c: 0xe0002127, 0x317d: 0xe0002122, 0x317e: 0xf0000606, 0x317f: 0x4027ac20, + // Block 0xc6, offset 0x3180 + 0x3180: 0x029c0086, 0x3181: 0x029d1886, 0x3182: 0x029c1286, 0x3183: 0x02adb686, + 0x3184: 0x029d2886, 0x3185: 0x02a2da86, 0x3186: 0x029c0686, 0x3187: 0x02a2d686, + 0x3188: 0x029cba86, 0x3189: 0x02a68286, 0x318a: 0x02ce1086, 0x318b: 0x02e0d686, + 0x318c: 0x02d86886, 0x318d: 0x02ce5086, 0x318e: 0x0323a286, 0x318f: 0x02ae3e86, + 0x3190: 0x02cbca86, 0x3191: 0x02d05486, 0x3192: 0x02ce1286, 0x3193: 0x02f27c86, + 0x3194: 0x02a81a86, 0x3195: 0x02e4f286, 0x3196: 0x03194286, 0x3197: 0x02f2ba86, + 0x3198: 0x02a56886, 0x3199: 0x02f3b086, 0x319a: 0x02ea6e86, 0x319b: 0x02b2e686, + 0x319c: 0x0320d286, 0x319d: 0x02a25486, 0x319e: 0x02a6e086, 0x319f: 0x02d9d086, + 0x31a0: 0x03300a86, 0x31a1: 0x029e2286, 0x31a2: 0x02a33286, 0x31a3: 0x02d6c686, + 0x31a4: 0x029c1486, 0x31a5: 0x029c5a86, 0x31a6: 0x029c1686, 0x31a7: 0x02bbcc86, + 0x31a8: 0x02a7e686, 0x31a9: 0x02a67686, 0x31aa: 0x02b72e86, 0x31ab: 0x02b6cc86, + 0x31ac: 0x02edc686, 0x31ad: 0x029e0286, 0x31ae: 0x03198e86, 0x31af: 0x02a6a886, + 0x31b0: 0x02b23886, 0x31b1: 0xf0000606, 0x31b2: 0xf0000606, 0x31b3: 0xf0000606, + 0x31b4: 0xf0000606, 0x31b5: 0xf0000606, 0x31b6: 0xf0000606, 0x31b7: 0xf0000606, + 0x31b8: 0xf0000606, 0x31b9: 0xf0000606, 0x31ba: 0xf0000606, 0x31bb: 0xf0000606, + 0x31bc: 0xf0000606, 0x31bd: 0xf0000606, 0x31be: 0xf0000606, 0x31bf: 0xf0000606, + // Block 0xc7, offset 0x31c0 + 0x31c0: 0xf0001f04, 0x31c1: 0xf0001f04, 0x31c2: 0xf0001f04, 0x31c3: 0xf0001f04, + 0x31c4: 0xf0001f04, 0x31c5: 0xf0001f04, 0x31c6: 0xf0001f04, 0x31c7: 0xf0001f04, + 0x31c8: 0xf0001f04, 0x31c9: 0xf0000404, 0x31ca: 0xf0000404, 0x31cb: 0xf0000404, + 0x31cc: 0xf0001c1d, 0x31cd: 0xe0000b85, 0x31ce: 0xf0001d1c, 0x31cf: 0xe0000d14, + 0x31d0: 0x00657693, 0x31d1: 0x00657893, 0x31d2: 0x00657a93, 0x31d3: 0x00657e93, + 0x31d4: 0x00658093, 0x31d5: 0x00658293, 0x31d6: 0x00658493, 0x31d7: 0x00658693, + 0x31d8: 0x00658893, 0x31d9: 0x00658a93, 0x31da: 0x00658c93, 0x31db: 0x00658e93, + 0x31dc: 0x00659093, 0x31dd: 0x00659293, 0x31de: 0x00659493, 0x31df: 0x00659693, + 0x31e0: 0x00659893, 0x31e1: 0x00659a93, 0x31e2: 0x00659c93, 0x31e3: 0x00659e93, + 0x31e4: 0x0065a093, 0x31e5: 0x0065a293, 0x31e6: 0x0065a493, 0x31e7: 0x0065a693, + 0x31e8: 0x0065a893, 0x31e9: 0x0065aa93, 0x31ea: 0x0065ac93, 0x31eb: 0x0065ae93, + 0x31ec: 0x0065b093, 0x31ed: 0x0065b293, 0x31ee: 0x0065b493, 0x31ef: 0x0065b693, + 0x31f0: 0x0065b893, 0x31f1: 0x0065ba93, 0x31f2: 0x0065bc93, 0x31f3: 0x0065be93, + 0x31f4: 0x0065c093, 0x31f5: 0x0065c493, 0x31f6: 0x0065c693, 0x31f7: 0x0065c893, + 0x31f8: 0x0065ca93, 0x31f9: 0x0065cc93, 0x31fa: 0x0065ce93, 0x31fb: 0x0065d093, + 0x31fc: 0x0065d293, 0x31fd: 0x0065d493, 0x31fe: 0x0065d693, + // Block 0xc8, offset 0x3200 + 0x3200: 0xe0002131, 0x3201: 0xe0002137, 0x3202: 0xe000213c, 0x3203: 0xe000212d, + 0x3204: 0xe0002142, 0x3205: 0xe0002148, 0x3206: 0xe0002152, 0x3207: 0xe000215b, + 0x3208: 0xe0002156, 0x3209: 0xe0002166, 0x320a: 0xe0002162, 0x320b: 0xe0002170, + 0x320c: 0xe0002174, 0x320d: 0xe0002179, 0x320e: 0xe000217e, 0x320f: 0xe0002183, + 0x3210: 0xe000218e, 0x3211: 0xe0002193, 0x3212: 0xe0002198, 0x3213: 0xe000219d, + 0x3214: 0xf0001c1c, 0x3215: 0xe00021a4, 0x3216: 0xe00021ab, 0x3217: 0xe00021b2, + 0x3218: 0xe00021be, 0x3219: 0xe00021c3, 0x321a: 0xe00021ca, 0x321b: 0xe00021d1, + 0x321c: 0xe00021dc, 0x321d: 0xe00021eb, 0x321e: 0xe00021e6, 0x321f: 0xe00021f5, + 0x3220: 0xe00021fa, 0x3221: 0xe0002209, 0x3222: 0xe000221b, 0x3223: 0xe000221f, + 0x3224: 0xe000222f, 0x3225: 0xe0002246, 0x3226: 0xe0002250, 0x3227: 0xf0001c1c, + 0x3228: 0xf0001c1c, 0x3229: 0xe0002254, 0x322a: 0xe0002276, 0x322b: 0xe0002264, + 0x322c: 0xe000226b, 0x322d: 0xe0002270, 0x322e: 0xe0002286, 0x322f: 0xe000228d, + 0x3230: 0xe0002292, 0x3231: 0xe0002296, 0x3232: 0xe00022a6, 0x3233: 0xe00022ad, + 0x3234: 0xe00022b2, 0x3235: 0xe00022b9, 0x3236: 0xe00022d4, 0x3237: 0xe00022da, + 0x3238: 0xe00022de, 0x3239: 0xe00022e3, 0x323a: 0xe00022e7, 0x323b: 0xe00022c9, + 0x323c: 0xe00022cf, 0x323d: 0xe0002300, 0x323e: 0xe0002306, 0x323f: 0xf0001c1c, + // Block 0xc9, offset 0x3240 + 0x3240: 0xe000230b, 0x3241: 0xe00022f8, 0x3242: 0xe00022fc, 0x3243: 0xe0002311, + 0x3244: 0xe0002316, 0x3245: 0xe000231d, 0x3246: 0xe0002321, 0x3247: 0xe0002325, + 0x3248: 0xe000232b, 0x3249: 0xf0001c1c, 0x324a: 0xe0002330, 0x324b: 0xe000233c, + 0x324c: 0xe0002340, 0x324d: 0xe0002337, 0x324e: 0xe0002346, 0x324f: 0xe000234b, + 0x3250: 0xe000234f, 0x3251: 0xe0002353, 0x3252: 0xf0001c1c, 0x3253: 0xe000235e, + 0x3254: 0xe0002358, 0x3255: 0xf0001c1c, 0x3256: 0xe0002363, 0x3257: 0xe000236d, + 0x3258: 0xf0001f04, 0x3259: 0xf0001f04, 0x325a: 0xf0001f04, 0x325b: 0xf0001f04, + 0x325c: 0xf0001f04, 0x325d: 0xf0001f04, 0x325e: 0xf0001f04, 0x325f: 0xf0001f04, + 0x3260: 0xf0001f04, 0x3261: 0xf0001f04, 0x3262: 0xf0000404, 0x3263: 0xf0000404, + 0x3264: 0xf0000404, 0x3265: 0xf0000404, 0x3266: 0xf0000404, 0x3267: 0xf0000404, + 0x3268: 0xf0000404, 0x3269: 0xf0000404, 0x326a: 0xf0000404, 0x326b: 0xf0000404, + 0x326c: 0xf0000404, 0x326d: 0xf0000404, 0x326e: 0xf0000404, 0x326f: 0xf0000404, + 0x3270: 0xf0000404, 0x3271: 0xe0000c1e, 0x3272: 0xf0001c1c, 0x3273: 0xf0001d1d, + 0x3274: 0xe0000a31, 0x3275: 0xf0001d1c, 0x3276: 0xf0001c1c, 0x3277: 0xf0001c1c, + 0x3278: 0xe0000ac2, 0x3279: 0xe0000ac6, 0x327a: 0xf0001d1d, 0x327b: 0xf0001c1c, + 0x327c: 0xf0001c1c, 0x327d: 0xf0001c1c, 0x327e: 0xf0001c1c, 0x327f: 0xe0002431, + // Block 0xca, offset 0x3280 + 0x3280: 0xf0001d1c, 0x3281: 0xf0001d1c, 0x3282: 0xf0001d1c, 0x3283: 0xf0001d1c, + 0x3284: 0xf0001d1c, 0x3285: 0xf0001d1d, 0x3286: 0xf0001d1d, 0x3287: 0xf0001d1d, + 0x3288: 0xe0000a6b, 0x3289: 0xe0000cb4, 0x328a: 0xf0001d1c, 0x328b: 0xf0001d1c, + 0x328c: 0xf0001d1c, 0x328d: 0xf0001c1c, 0x328e: 0xf0001c1c, 0x328f: 0xf0001c1c, + 0x3290: 0xf0001c1d, 0x3291: 0xe0000cb9, 0x3292: 0xe0000d36, 0x3293: 0xe0000be3, + 0x3294: 0xe0000fc5, 0x3295: 0xf0001c1c, 0x3296: 0xf0001c1c, 0x3297: 0xf0001c1c, + 0x3298: 0xf0001c1c, 0x3299: 0xf0001c1c, 0x329a: 0xf0001c1c, 0x329b: 0xf0001c1c, + 0x329c: 0xf0001c1c, 0x329d: 0xf0001c1c, 0x329e: 0xf0001c1c, 0x329f: 0xe0000d3e, + 0x32a0: 0xe0000a72, 0x32a1: 0xf0001c1c, 0x32a2: 0xe0000cbd, 0x32a3: 0xe0000d42, + 0x32a4: 0xe0000a76, 0x32a5: 0xf0001c1c, 0x32a6: 0xe0000cc1, 0x32a7: 0xe0000d2d, + 0x32a8: 0xe0000d31, 0x32a9: 0xf0001c1d, 0x32aa: 0xe0000cc5, 0x32ab: 0xe0000d4a, + 0x32ac: 0xe0000be7, 0x32ad: 0xe0000f0b, 0x32ae: 0xe0000f0f, 0x32af: 0xe0000f15, + 0x32b0: 0xf0001c1c, 0x32b1: 0xf0001c1c, 0x32b2: 0xf0001c1c, 0x32b3: 0xf0001c1c, + 0x32b4: 0xf0001d1c, 0x32b5: 0xf0001d1c, 0x32b6: 0xf0001d1c, 0x32b7: 0xf0001d1c, + 0x32b8: 0xf0001d1c, 0x32b9: 0xf0001d1d, 0x32ba: 0xf0001d1c, 0x32bb: 0xf0001d1c, + 0x32bc: 0xf0001d1c, 0x32bd: 0xf0001d1c, 0x32be: 0xf0001d1c, 0x32bf: 0xf0001d1d, + // Block 0xcb, offset 0x32c0 + 0x32c0: 0xf0001d1c, 0x32c1: 0xf0001d1d, 0x32c2: 0xe00009b7, 0x32c3: 0xf0001c1d, + 0x32c4: 0xf0001c1c, 0x32c5: 0xf0001c1c, 0x32c6: 0xe0000a66, 0x32c7: 0xe0000a7a, + 0x32c8: 0xf0001d1c, 0x32c9: 0xf0001c1d, 0x32ca: 0xf0001c1c, 0x32cb: 0xf0001d1d, + 0x32cc: 0xf0001c1c, 0x32cd: 0xf0001d1d, 0x32ce: 0xf0001d1d, 0x32cf: 0xf0001c1c, + 0x32d0: 0xf0001c1c, 0x32d1: 0xf0001c1c, 0x32d2: 0xe0000d0d, 0x32d3: 0xf0001c1c, + 0x32d4: 0xf0001c1c, 0x32d5: 0xe0000d3a, 0x32d6: 0xe0000d46, 0x32d7: 0xf0001d1d, + 0x32d8: 0xe0000eb0, 0x32d9: 0xe0000eb8, 0x32da: 0xf0001d1d, 0x32db: 0xf0001c1c, + 0x32dc: 0xf0001c1d, 0x32dd: 0xf0001c1d, 0x32de: 0xe00010b2, 0x32df: 0xe00009c8, + 0x32e0: 0xf0001f04, 0x32e1: 0xf0001f04, 0x32e2: 0xf0001f04, 0x32e3: 0xf0001f04, + 0x32e4: 0xf0001f04, 0x32e5: 0xf0001f04, 0x32e6: 0xf0001f04, 0x32e7: 0xf0001f04, + 0x32e8: 0xf0001f04, 0x32e9: 0xf0000404, 0x32ea: 0xf0000404, 0x32eb: 0xf0000404, + 0x32ec: 0xf0000404, 0x32ed: 0xf0000404, 0x32ee: 0xf0000404, 0x32ef: 0xf0000404, + 0x32f0: 0xf0000404, 0x32f1: 0xf0000404, 0x32f2: 0xf0000404, 0x32f3: 0xf0000404, + 0x32f4: 0xf0000404, 0x32f5: 0xf0000404, 0x32f6: 0xf0000404, 0x32f7: 0xf0000404, + 0x32f8: 0xf0000404, 0x32f9: 0xf0000404, 0x32fa: 0xf0000404, 0x32fb: 0xf0000404, + 0x32fc: 0xf0000404, 0x32fd: 0xf0000404, 0x32fe: 0xf0000404, 0x32ff: 0xe0000bdf, + // Block 0xcc, offset 0x3300 + 0x3300: 0x40196220, 0x3301: 0x40196420, 0x3302: 0x40196620, 0x3303: 0x40196820, + 0x3304: 0x40196a20, 0x3305: 0x40196c20, 0x3306: 0x40196e20, 0x3307: 0x40197020, + 0x3308: 0x40197220, 0x3309: 0x40197420, 0x330a: 0x40197620, 0x330b: 0x40197820, + 0x330c: 0x40197a20, 0x330d: 0x40197c20, 0x330e: 0x40197e20, 0x330f: 0x40198020, + 0x3310: 0x40198220, 0x3311: 0x40198420, 0x3312: 0x40198620, 0x3313: 0x40198820, + 0x3314: 0x40198a20, 0x3315: 0x40198c20, 0x3316: 0x40198e20, 0x3317: 0x40199020, + 0x3318: 0x40199220, 0x3319: 0x40199420, 0x331a: 0x40199620, 0x331b: 0x40199820, + 0x331c: 0x40199a20, 0x331d: 0x40199c20, 0x331e: 0x40199e20, 0x331f: 0x4019a020, + 0x3320: 0x4019a220, 0x3321: 0x4019a420, 0x3322: 0x4019a620, 0x3323: 0x4019a820, + 0x3324: 0x4019aa20, 0x3325: 0x4019ac20, 0x3326: 0x4019ae20, 0x3327: 0x4019b020, + 0x3328: 0x4019b220, 0x3329: 0x4019b420, 0x332a: 0x4019b620, 0x332b: 0x4019b820, + 0x332c: 0x4019ba20, 0x332d: 0x4019bc20, 0x332e: 0x4019be20, 0x332f: 0x4019c020, + 0x3330: 0x4019c220, 0x3331: 0x4019c420, 0x3332: 0x4019c620, 0x3333: 0x4019c820, + 0x3334: 0x4019ca20, 0x3335: 0x4019cc20, 0x3336: 0x4019ce20, 0x3337: 0x4019d020, + 0x3338: 0x4019d220, 0x3339: 0x4019d420, 0x333a: 0x4019d620, 0x333b: 0x4019d820, + 0x333c: 0x4019da20, 0x333d: 0x4019dc20, 0x333e: 0x4019de20, 0x333f: 0x4019e020, + // Block 0xcd, offset 0x3340 + 0x3340: 0x40664020, 0x3341: 0x40664220, 0x3342: 0x40664420, 0x3343: 0x40664620, + 0x3344: 0x40664820, 0x3345: 0x40664a20, 0x3346: 0x40664c20, 0x3347: 0x40664e20, + 0x3348: 0x40665020, 0x3349: 0x40665220, 0x334a: 0x40665420, 0x334b: 0x40665620, + 0x334c: 0x40665820, 0x334d: 0x40665a20, 0x334e: 0x40665c20, 0x334f: 0x40665e20, + 0x3350: 0x40666020, 0x3351: 0x40666220, 0x3352: 0x40666420, 0x3353: 0x40666620, + 0x3354: 0x40666820, 0x3355: 0x40666a20, 0x3356: 0x40666c20, 0x3357: 0x40666e20, + 0x3358: 0x40667020, 0x3359: 0x40667220, 0x335a: 0x40667420, 0x335b: 0x40667620, + 0x335c: 0x40667820, 0x335d: 0x40667a20, 0x335e: 0x40667c20, 0x335f: 0x40667e20, + 0x3360: 0x40668020, 0x3361: 0x40668220, 0x3362: 0x40668420, 0x3363: 0x40668620, + 0x3364: 0x40668820, 0x3365: 0x40668a20, 0x3366: 0x40668c20, 0x3367: 0x40668e20, + 0x3368: 0x40669020, 0x3369: 0x40669220, 0x336a: 0x40669420, 0x336b: 0x40669620, + 0x336c: 0x40669820, 0x336d: 0x40669a20, 0x336e: 0x40669c20, 0x336f: 0x40669e20, + 0x3370: 0x4066a020, 0x3371: 0x4066a220, 0x3372: 0x4066a420, 0x3373: 0x4066a620, + 0x3374: 0x4066a820, 0x3375: 0x4066aa20, 0x3376: 0x4066ac20, 0x3377: 0x4066ae20, + 0x3378: 0x4066b020, 0x3379: 0x4066b220, 0x337a: 0x4066b420, 0x337b: 0x4066b620, + 0x337c: 0x4066b820, 0x337d: 0x4066ba20, 0x337e: 0x4066bc20, 0x337f: 0x4066be20, + // Block 0xce, offset 0x3380 + 0x3380: 0x4066c020, 0x3381: 0x4066c220, 0x3382: 0x4066c420, 0x3383: 0x4066c620, + 0x3384: 0x4066c820, 0x3385: 0x4066ca20, 0x3386: 0x4066cc20, 0x3387: 0x4066ce20, + 0x3388: 0x4066d020, 0x3389: 0x4066d220, 0x338a: 0x4066d420, 0x338b: 0x4066d620, + 0x338c: 0x4066d820, 0x338d: 0x4066da20, 0x338e: 0x4066dc20, 0x338f: 0x4066de20, + 0x3390: 0x4066e020, 0x3391: 0x4066e220, 0x3392: 0x4066e420, 0x3393: 0x4066e620, + 0x3394: 0x4066e820, 0x3395: 0x4066ea20, 0x3396: 0x4066ec20, 0x3397: 0x4066ee20, + 0x3398: 0x4066f020, 0x3399: 0x4066f220, 0x339a: 0x4066f420, 0x339b: 0x4066f620, + 0x339c: 0x4066f820, 0x339d: 0x4066fa20, 0x339e: 0x4066fc20, 0x339f: 0x4066fe20, + 0x33a0: 0x40670020, 0x33a1: 0x40670220, 0x33a2: 0x40670420, 0x33a3: 0x40670620, + 0x33a4: 0x40670820, 0x33a5: 0x40670a20, 0x33a6: 0x40670c20, 0x33a7: 0x40670e20, + 0x33a8: 0x40671020, 0x33a9: 0x40671220, 0x33aa: 0x40671420, 0x33ab: 0x40671620, + 0x33ac: 0x40671820, 0x33ad: 0x40671a20, 0x33ae: 0x40671c20, 0x33af: 0x40671e20, + 0x33b0: 0x40672020, 0x33b1: 0x40672220, 0x33b2: 0x40672420, 0x33b3: 0x40672620, + 0x33b4: 0x40672820, 0x33b5: 0x40672a20, 0x33b6: 0x40672c20, 0x33b7: 0x40672e20, + 0x33b8: 0x40673020, 0x33b9: 0x40673220, 0x33ba: 0x40673420, 0x33bb: 0x40673620, + 0x33bc: 0x40673820, 0x33bd: 0x40673a20, 0x33be: 0x40673c20, 0x33bf: 0x40673e20, + // Block 0xcf, offset 0x33c0 + 0x33c0: 0x40674020, 0x33c1: 0x40674220, 0x33c2: 0x40674420, 0x33c3: 0x40674620, + 0x33c4: 0x40674820, 0x33c5: 0x40674a20, 0x33c6: 0x40674c20, 0x33c7: 0x40674e20, + 0x33c8: 0x40675020, 0x33c9: 0x40675220, 0x33ca: 0x40675420, 0x33cb: 0x40675620, + 0x33cc: 0x40675820, 0x33cd: 0x40675a20, 0x33ce: 0x40675c20, 0x33cf: 0x40675e20, + 0x33d0: 0x40676020, 0x33d1: 0x40676220, 0x33d2: 0x40676420, 0x33d3: 0x40676620, + 0x33d4: 0x40676820, 0x33d5: 0x40676a20, 0x33d6: 0x40676c20, 0x33d7: 0x40676e20, + 0x33d8: 0x40677020, 0x33d9: 0x40677220, 0x33da: 0x40677420, 0x33db: 0x40677620, + 0x33dc: 0x40677820, 0x33dd: 0x40677a20, 0x33de: 0x40677c20, 0x33df: 0x40677e20, + 0x33e0: 0x40678020, 0x33e1: 0x40678220, 0x33e2: 0x40678420, 0x33e3: 0x40678620, + 0x33e4: 0x40678820, 0x33e5: 0x40678a20, 0x33e6: 0x40678c20, 0x33e7: 0x40678e20, + 0x33e8: 0x40679020, 0x33e9: 0x40679220, 0x33ea: 0x40679420, 0x33eb: 0x40679620, + 0x33ec: 0x40679820, 0x33ed: 0x40679a20, 0x33ee: 0x40679c20, 0x33ef: 0x40679e20, + 0x33f0: 0x4067a020, 0x33f1: 0x4067a220, 0x33f2: 0x4067a420, 0x33f3: 0x4067a620, + 0x33f4: 0x4067a820, 0x33f5: 0x4067aa20, 0x33f6: 0x4067ac20, 0x33f7: 0x4067ae20, + 0x33f8: 0x4067b020, 0x33f9: 0x4067b220, 0x33fa: 0x4067b420, 0x33fb: 0x4067b620, + 0x33fc: 0x4067b820, 0x33fd: 0x4067ba20, 0x33fe: 0x4067bc20, 0x33ff: 0x4067be20, + // Block 0xd0, offset 0x3400 + 0x3400: 0x4067c020, 0x3401: 0x4067c220, 0x3402: 0x4067c420, 0x3403: 0x4067c620, + 0x3404: 0x4067c820, 0x3405: 0x4067ca20, 0x3406: 0x4067cc20, 0x3407: 0x4067ce20, + 0x3408: 0x4067d020, 0x3409: 0x4067d220, 0x340a: 0x4067d420, 0x340b: 0x4067d620, + 0x340c: 0x4067d820, 0x340d: 0x4067da20, 0x340e: 0x4067dc20, 0x340f: 0x4067de20, + 0x3410: 0x4067e020, 0x3411: 0x4067e220, 0x3412: 0x4067e420, 0x3413: 0x4067e620, + 0x3414: 0x4067e820, 0x3415: 0x4067ea20, 0x3416: 0x4067ec20, 0x3417: 0x4067ee20, + 0x3418: 0x4067f020, 0x3419: 0x4067f220, 0x341a: 0x4067f420, 0x341b: 0x4067f620, + 0x341c: 0x4067f820, 0x341d: 0x4067fa20, 0x341e: 0x4067fc20, 0x341f: 0x4067fe20, + 0x3420: 0x40680020, 0x3421: 0x40680220, 0x3422: 0x40680420, 0x3423: 0x40680620, + 0x3424: 0x40680820, 0x3425: 0x40680a20, 0x3426: 0x40680c20, 0x3427: 0x40680e20, + 0x3428: 0x40681020, 0x3429: 0x40681220, 0x342a: 0x40681420, 0x342b: 0x40681620, + 0x342c: 0x40681820, 0x342d: 0x40681a20, 0x342e: 0x40681c20, 0x342f: 0x40681e20, + 0x3430: 0x40682020, 0x3431: 0x40682220, 0x3432: 0x40682420, 0x3433: 0x40682620, + 0x3434: 0x40682820, 0x3435: 0x40682a20, 0x3436: 0x40682c20, 0x3437: 0x40682e20, + 0x3438: 0x40683020, 0x3439: 0x40683220, 0x343a: 0x40683420, 0x343b: 0x40683620, + 0x343c: 0x40683820, 0x343d: 0x40683a20, 0x343e: 0x40683c20, 0x343f: 0x40683e20, + // Block 0xd1, offset 0x3440 + 0x3440: 0x40684020, 0x3441: 0x40684220, 0x3442: 0x40684420, 0x3443: 0x40684620, + 0x3444: 0x40684820, 0x3445: 0x40684a20, 0x3446: 0x40684c20, 0x3447: 0x40684e20, + 0x3448: 0x40685020, 0x3449: 0x40685220, 0x344a: 0x40685420, 0x344b: 0x40685620, + 0x344c: 0x40685820, 0x344d: 0x40685a20, 0x344e: 0x40685c20, 0x344f: 0x40685e20, + 0x3450: 0x40686020, 0x3451: 0x40686220, 0x3452: 0x40686420, 0x3453: 0x40686620, + 0x3454: 0x40686820, 0x3455: 0x40686a20, 0x3456: 0x40686c20, 0x3457: 0x40686e20, + 0x3458: 0x40687020, 0x3459: 0x40687220, 0x345a: 0x40687420, 0x345b: 0x40687620, + 0x345c: 0x40687820, 0x345d: 0x40687a20, 0x345e: 0x40687c20, 0x345f: 0x40687e20, + 0x3460: 0x40688020, 0x3461: 0x40688220, 0x3462: 0x40688420, 0x3463: 0x40688620, + 0x3464: 0x40688820, 0x3465: 0x40688a20, 0x3466: 0x40688c20, 0x3467: 0x40688e20, + 0x3468: 0x40689020, 0x3469: 0x40689220, 0x346a: 0x40689420, 0x346b: 0x40689620, + 0x346c: 0x40689820, 0x346d: 0x40689a20, 0x346e: 0x40689c20, 0x346f: 0x40689e20, + 0x3470: 0x4068a020, 0x3471: 0x4068a220, 0x3472: 0x4068a420, 0x3473: 0x4068a620, + 0x3474: 0x4068a820, 0x3475: 0x4068aa20, 0x3476: 0x4068ac20, 0x3477: 0x4068ae20, + 0x3478: 0x4068b020, 0x3479: 0x4068b220, 0x347a: 0x4068b420, 0x347b: 0x4068b620, + 0x347c: 0x4068b820, 0x347d: 0x4068ba20, 0x347e: 0x4068bc20, 0x347f: 0x4068be20, + // Block 0xd2, offset 0x3480 + 0x3480: 0x4068c020, 0x3481: 0x4068c220, 0x3482: 0x4068c420, 0x3483: 0x4068c620, + 0x3484: 0x4068c820, 0x3485: 0x4068ca20, 0x3486: 0x4068cc20, 0x3487: 0x4068ce20, + 0x3488: 0x4068d020, 0x3489: 0x4068d220, 0x348a: 0x4068d420, 0x348b: 0x4068d620, + 0x348c: 0x4068d820, 0x348d: 0x4068da20, 0x348e: 0x4068dc20, 0x348f: 0x4068de20, + 0x3490: 0x4068e020, 0x3491: 0x4068e220, 0x3492: 0x4068e420, 0x3493: 0x4068e620, + 0x3494: 0x4068e820, 0x3495: 0x4068ea20, 0x3496: 0x4068ec20, 0x3497: 0x4068ee20, + 0x3498: 0x4068f020, 0x3499: 0x4068f220, 0x349a: 0x4068f420, 0x349b: 0x4068f620, + 0x349c: 0x4068f820, 0x349d: 0x4068fa20, 0x349e: 0x4068fc20, 0x349f: 0x4068fe20, + 0x34a0: 0x40690020, 0x34a1: 0x40690220, 0x34a2: 0x40690420, 0x34a3: 0x40690620, + 0x34a4: 0x40690820, 0x34a5: 0x40690a20, 0x34a6: 0x40690c20, 0x34a7: 0x40690e20, + 0x34a8: 0x40691020, 0x34a9: 0x40691220, 0x34aa: 0x40691420, 0x34ab: 0x40691620, + 0x34ac: 0x40691820, 0x34ad: 0x40691a20, 0x34ae: 0x40691c20, 0x34af: 0x40691e20, + 0x34b0: 0x40692020, 0x34b1: 0x40692220, 0x34b2: 0x40692420, 0x34b3: 0x40692620, + 0x34b4: 0x40692820, 0x34b5: 0x40692a20, 0x34b6: 0x40692c20, 0x34b7: 0x40692e20, + 0x34b8: 0x40693020, 0x34b9: 0x40693220, 0x34ba: 0x40693420, 0x34bb: 0x40693620, + 0x34bc: 0x40693820, 0x34bd: 0x40693a20, 0x34be: 0x40693c20, 0x34bf: 0x40693e20, + // Block 0xd3, offset 0x34c0 + 0x34c0: 0x40694020, 0x34c1: 0x40694220, 0x34c2: 0x40694420, 0x34c3: 0x40694620, + 0x34c4: 0x40694820, 0x34c5: 0x40694a20, 0x34c6: 0x40694c20, 0x34c7: 0x40694e20, + 0x34c8: 0x40695020, 0x34c9: 0x40695220, 0x34ca: 0x40695420, 0x34cb: 0x40695620, + 0x34cc: 0x40695820, 0x34cd: 0x40695a20, 0x34ce: 0x40695c20, 0x34cf: 0x40695e20, + 0x34d0: 0x40696020, 0x34d1: 0x40696220, 0x34d2: 0x40696420, 0x34d3: 0x40696620, + 0x34d4: 0x40696820, 0x34d5: 0x40696a20, 0x34d6: 0x40696c20, 0x34d7: 0x40696e20, + 0x34d8: 0x40697020, 0x34d9: 0x40697220, 0x34da: 0x40697420, 0x34db: 0x40697620, + 0x34dc: 0x40697820, 0x34dd: 0x40697a20, 0x34de: 0x40697c20, 0x34df: 0x40697e20, + 0x34e0: 0x40698020, 0x34e1: 0x40698220, 0x34e2: 0x40698420, 0x34e3: 0x40698620, + 0x34e4: 0x40698820, 0x34e5: 0x40698a20, 0x34e6: 0x40698c20, 0x34e7: 0x40698e20, + 0x34e8: 0x40699020, 0x34e9: 0x40699220, 0x34ea: 0x40699420, 0x34eb: 0x40699620, + 0x34ec: 0x40699820, 0x34ed: 0x40699a20, 0x34ee: 0x40699c20, 0x34ef: 0x40699e20, + 0x34f0: 0x4069a020, 0x34f1: 0x4069a220, 0x34f2: 0x4069a420, 0x34f3: 0x4069a620, + 0x34f4: 0x4069a820, 0x34f5: 0x4069aa20, 0x34f6: 0x4069ac20, 0x34f7: 0x4069ae20, + 0x34f8: 0x4069b020, 0x34f9: 0x4069b220, 0x34fa: 0x4069b420, 0x34fb: 0x4069b620, + 0x34fc: 0x4069b820, 0x34fd: 0x4069ba20, 0x34fe: 0x4069bc20, 0x34ff: 0x4069be20, + // Block 0xd4, offset 0x3500 + 0x3500: 0x4069c020, 0x3501: 0x4069c220, 0x3502: 0x4069c420, 0x3503: 0x4069c620, + 0x3504: 0x4069c820, 0x3505: 0x4069ca20, 0x3506: 0x4069cc20, 0x3507: 0x4069ce20, + 0x3508: 0x4069d020, 0x3509: 0x4069d220, 0x350a: 0x4069d420, 0x350b: 0x4069d620, + 0x350c: 0x4069d820, 0x350d: 0x4069da20, 0x350e: 0x4069dc20, 0x350f: 0x4069de20, + 0x3510: 0x4069e020, 0x3511: 0x4069e220, 0x3512: 0x4069e420, 0x3513: 0x4069e620, + 0x3514: 0x4069e820, 0x3515: 0x4069ea20, 0x3516: 0x4069ec20, 0x3517: 0x4069ee20, + 0x3518: 0x4069f020, 0x3519: 0x4069f220, 0x351a: 0x4069f420, 0x351b: 0x4069f620, + 0x351c: 0x4069f820, 0x351d: 0x4069fa20, 0x351e: 0x4069fc20, 0x351f: 0x4069fe20, + 0x3520: 0x406a0020, 0x3521: 0x406a0220, 0x3522: 0x406a0420, 0x3523: 0x406a0620, + 0x3524: 0x406a0820, 0x3525: 0x406a0a20, 0x3526: 0x406a0c20, 0x3527: 0x406a0e20, + 0x3528: 0x406a1020, 0x3529: 0x406a1220, 0x352a: 0x406a1420, 0x352b: 0x406a1620, + 0x352c: 0x406a1820, 0x352d: 0x406a1a20, 0x352e: 0x406a1c20, 0x352f: 0x406a1e20, + 0x3530: 0x406a2020, 0x3531: 0x406a2220, 0x3532: 0x406a2420, 0x3533: 0x406a2620, + 0x3534: 0x406a2820, 0x3535: 0x406a2a20, 0x3536: 0x406a2c20, 0x3537: 0x406a2e20, + 0x3538: 0x406a3020, 0x3539: 0x406a3220, 0x353a: 0x406a3420, 0x353b: 0x406a3620, + 0x353c: 0x406a3820, 0x353d: 0x406a3a20, 0x353e: 0x406a3c20, 0x353f: 0x406a3e20, + // Block 0xd5, offset 0x3540 + 0x3540: 0x406a4020, 0x3541: 0x406a4220, 0x3542: 0x406a4420, 0x3543: 0x406a4620, + 0x3544: 0x406a4820, 0x3545: 0x406a4a20, 0x3546: 0x406a4c20, 0x3547: 0x406a4e20, + 0x3548: 0x406a5020, 0x3549: 0x406a5220, 0x354a: 0x406a5420, 0x354b: 0x406a5620, + 0x354c: 0x406a5820, 0x354d: 0x406a5a20, 0x354e: 0x406a5c20, 0x354f: 0x406a5e20, + 0x3550: 0x406a6020, 0x3551: 0x406a6220, 0x3552: 0x406a6420, 0x3553: 0x406a6620, + 0x3554: 0x406a6820, 0x3555: 0x406a6a20, 0x3556: 0x406a6c20, 0x3557: 0x406a6e20, + 0x3558: 0x406a7020, 0x3559: 0x406a7220, 0x355a: 0x406a7420, 0x355b: 0x406a7620, + 0x355c: 0x406a7820, 0x355d: 0x406a7a20, 0x355e: 0x406a7c20, 0x355f: 0x406a7e20, + 0x3560: 0x406a8020, 0x3561: 0x406a8220, 0x3562: 0x406a8420, 0x3563: 0x406a8620, + 0x3564: 0x406a8820, 0x3565: 0x406a8a20, 0x3566: 0x406a8c20, 0x3567: 0x406a8e20, + 0x3568: 0x406a9020, 0x3569: 0x406a9220, 0x356a: 0x406a9420, 0x356b: 0x406a9620, + 0x356c: 0x406a9820, 0x356d: 0x406a9a20, 0x356e: 0x406a9c20, 0x356f: 0x406a9e20, + 0x3570: 0x406aa020, 0x3571: 0x406aa220, 0x3572: 0x406aa420, 0x3573: 0x406aa620, + 0x3574: 0x406aa820, 0x3575: 0x406aaa20, 0x3576: 0x406aac20, 0x3577: 0x406aae20, + 0x3578: 0x406ab020, 0x3579: 0x406ab220, 0x357a: 0x406ab420, 0x357b: 0x406ab620, + 0x357c: 0x406ab820, 0x357d: 0x406aba20, 0x357e: 0x406abc20, 0x357f: 0x406abe20, + // Block 0xd6, offset 0x3580 + 0x3580: 0x406ac020, 0x3581: 0x406ac220, 0x3582: 0x406ac420, 0x3583: 0x406ac620, + 0x3584: 0x406ac820, 0x3585: 0x406aca20, 0x3586: 0x406acc20, 0x3587: 0x406ace20, + 0x3588: 0x406ad020, 0x3589: 0x406ad220, 0x358a: 0x406ad420, 0x358b: 0x406ad620, + 0x358c: 0x406ad820, 0x358d: 0x406ada20, 0x358e: 0x406adc20, 0x358f: 0x406ade20, + 0x3590: 0x406ae020, 0x3591: 0x406ae220, 0x3592: 0x406ae420, 0x3593: 0x406ae620, + 0x3594: 0x406ae820, 0x3595: 0x406aea20, 0x3596: 0x406aec20, 0x3597: 0x406aee20, + 0x3598: 0x406af020, 0x3599: 0x406af220, 0x359a: 0x406af420, 0x359b: 0x406af620, + 0x359c: 0x406af820, 0x359d: 0x406afa20, 0x359e: 0x406afc20, 0x359f: 0x406afe20, + 0x35a0: 0x406b0020, 0x35a1: 0x406b0220, 0x35a2: 0x406b0420, 0x35a3: 0x406b0620, + 0x35a4: 0x406b0820, 0x35a5: 0x406b0a20, 0x35a6: 0x406b0c20, 0x35a7: 0x406b0e20, + 0x35a8: 0x406b1020, 0x35a9: 0x406b1220, 0x35aa: 0x406b1420, 0x35ab: 0x406b1620, + 0x35ac: 0x406b1820, 0x35ad: 0x406b1a20, 0x35ae: 0x406b1c20, 0x35af: 0x406b1e20, + 0x35b0: 0x406b2020, 0x35b1: 0x406b2220, 0x35b2: 0x406b2420, 0x35b3: 0x406b2620, + 0x35b4: 0x406b2820, 0x35b5: 0x406b2a20, 0x35b6: 0x406b2c20, 0x35b7: 0x406b2e20, + 0x35b8: 0x406b3020, 0x35b9: 0x406b3220, 0x35ba: 0x406b3420, 0x35bb: 0x406b3620, + 0x35bc: 0x406b3820, 0x35bd: 0x406b3a20, 0x35be: 0x406b3c20, 0x35bf: 0x406b3e20, + // Block 0xd7, offset 0x35c0 + 0x35c0: 0x406b4020, 0x35c1: 0x406b4220, 0x35c2: 0x406b4420, 0x35c3: 0x406b4620, + 0x35c4: 0x406b4820, 0x35c5: 0x406b4a20, 0x35c6: 0x406b4c20, 0x35c7: 0x406b4e20, + 0x35c8: 0x406b5020, 0x35c9: 0x406b5220, 0x35ca: 0x406b5420, 0x35cb: 0x406b5620, + 0x35cc: 0x406b5820, 0x35cd: 0x406b5a20, 0x35ce: 0x406b5c20, 0x35cf: 0x406b5e20, + 0x35d0: 0x406b6020, 0x35d1: 0x406b6220, 0x35d2: 0x406b6420, 0x35d3: 0x406b6620, + 0x35d4: 0x406b6820, 0x35d5: 0x406b6a20, 0x35d6: 0x406b6c20, 0x35d7: 0x406b6e20, + 0x35d8: 0x406b7020, 0x35d9: 0x406b7220, 0x35da: 0x406b7420, 0x35db: 0x406b7620, + 0x35dc: 0x406b7820, 0x35dd: 0x406b7a20, 0x35de: 0x406b7c20, 0x35df: 0x406b7e20, + 0x35e0: 0x406b8020, 0x35e1: 0x406b8220, 0x35e2: 0x406b8420, 0x35e3: 0x406b8620, + 0x35e4: 0x406b8820, 0x35e5: 0x406b8a20, 0x35e6: 0x406b8c20, 0x35e7: 0x406b8e20, + 0x35e8: 0x406b9020, 0x35e9: 0x406b9220, 0x35ea: 0x406b9420, 0x35eb: 0x406b9620, + 0x35ec: 0x406b9820, 0x35ed: 0x406b9a20, 0x35ee: 0x406b9c20, 0x35ef: 0x406b9e20, + 0x35f0: 0x406ba020, 0x35f1: 0x406ba220, 0x35f2: 0x406ba420, 0x35f3: 0x406ba620, + 0x35f4: 0x406ba820, 0x35f5: 0x406baa20, 0x35f6: 0x406bac20, 0x35f7: 0x406bae20, + 0x35f8: 0x406bb020, 0x35f9: 0x406bb220, 0x35fa: 0x406bb420, 0x35fb: 0x406bb620, + 0x35fc: 0x406bb820, 0x35fd: 0x406bba20, 0x35fe: 0x406bbc20, 0x35ff: 0x406bbe20, + // Block 0xd8, offset 0x3600 + 0x3600: 0x406bc020, 0x3601: 0x406bc220, 0x3602: 0x406bc420, 0x3603: 0x406bc620, + 0x3604: 0x406bc820, 0x3605: 0x406bca20, 0x3606: 0x406bcc20, 0x3607: 0x406bce20, + 0x3608: 0x406bd020, 0x3609: 0x406bd220, 0x360a: 0x406bd420, 0x360b: 0x406bd620, + 0x360c: 0x406bd820, 0x360d: 0x406bda20, 0x360e: 0x406bdc20, 0x360f: 0x406bde20, + 0x3610: 0x406be020, 0x3611: 0x406be220, 0x3612: 0x406be420, 0x3613: 0x406be620, + 0x3614: 0x406be820, 0x3615: 0x406bea20, 0x3616: 0x406bec20, 0x3617: 0x406bee20, + 0x3618: 0x406bf020, 0x3619: 0x406bf220, 0x361a: 0x406bf420, 0x361b: 0x406bf620, + 0x361c: 0x406bf820, 0x361d: 0x406bfa20, 0x361e: 0x406bfc20, 0x361f: 0x406bfe20, + 0x3620: 0x406c0020, 0x3621: 0x406c0220, 0x3622: 0x406c0420, 0x3623: 0x406c0620, + 0x3624: 0x406c0820, 0x3625: 0x406c0a20, 0x3626: 0x406c0c20, 0x3627: 0x406c0e20, + 0x3628: 0x406c1020, 0x3629: 0x406c1220, 0x362a: 0x406c1420, 0x362b: 0x406c1620, + 0x362c: 0x406c1820, 0x362d: 0x406c1a20, 0x362e: 0x406c1c20, 0x362f: 0x406c1e20, + 0x3630: 0x406c2020, 0x3631: 0x406c2220, 0x3632: 0x406c2420, 0x3633: 0x406c2620, + 0x3634: 0x406c2820, 0x3635: 0x406c2a20, 0x3636: 0x406c2c20, 0x3637: 0x406c2e20, + 0x3638: 0x406c3020, 0x3639: 0x406c3220, 0x363a: 0x406c3420, 0x363b: 0x406c3620, + 0x363c: 0x406c3820, 0x363d: 0x406c3a20, 0x363e: 0x406c3c20, 0x363f: 0x406c3e20, + // Block 0xd9, offset 0x3640 + 0x3640: 0x406c4020, 0x3641: 0x406c4220, 0x3642: 0x406c4420, 0x3643: 0x406c4620, + 0x3644: 0x406c4820, 0x3645: 0x406c4a20, 0x3646: 0x406c4c20, 0x3647: 0x406c4e20, + 0x3648: 0x406c5020, 0x3649: 0x406c5220, 0x364a: 0x406c5420, 0x364b: 0x406c5620, + 0x364c: 0x406c5820, 0x364d: 0x406c5a20, 0x364e: 0x406c5c20, 0x364f: 0x406c5e20, + 0x3650: 0x406c6020, 0x3651: 0x406c6220, 0x3652: 0x406c6420, 0x3653: 0x406c6620, + 0x3654: 0x406c6820, 0x3655: 0x406c6a20, 0x3656: 0x406c6c20, 0x3657: 0x406c6e20, + 0x3658: 0x406c7020, 0x3659: 0x406c7220, 0x365a: 0x406c7420, 0x365b: 0x406c7620, + 0x365c: 0x406c7820, 0x365d: 0x406c7a20, 0x365e: 0x406c7c20, 0x365f: 0x406c7e20, + 0x3660: 0x406c8020, 0x3661: 0x406c8220, 0x3662: 0x406c8420, 0x3663: 0x406c8620, + 0x3664: 0x406c8820, 0x3665: 0x406c8a20, 0x3666: 0x406c8c20, 0x3667: 0x406c8e20, + 0x3668: 0x406c9020, 0x3669: 0x406c9220, 0x366a: 0x406c9420, 0x366b: 0x406c9620, + 0x366c: 0x406c9820, 0x366d: 0x406c9a20, 0x366e: 0x406c9c20, 0x366f: 0x406c9e20, + 0x3670: 0x406ca020, 0x3671: 0x406ca220, 0x3672: 0x406ca420, 0x3673: 0x406ca620, + 0x3674: 0x406ca820, 0x3675: 0x406caa20, 0x3676: 0x406cac20, 0x3677: 0x406cae20, + 0x3678: 0x406cb020, 0x3679: 0x406cb220, 0x367a: 0x406cb420, 0x367b: 0x406cb620, + 0x367c: 0x406cb820, 0x367d: 0x406cba20, 0x367e: 0x406cbc20, 0x367f: 0x406cbe20, + // Block 0xda, offset 0x3680 + 0x3680: 0x406cc020, 0x3681: 0x406cc220, 0x3682: 0x406cc420, 0x3683: 0x406cc620, + 0x3684: 0x406cc820, 0x3685: 0x406cca20, 0x3686: 0x406ccc20, 0x3687: 0x406cce20, + 0x3688: 0x406cd020, 0x3689: 0x406cd220, 0x368a: 0x406cd420, 0x368b: 0x406cd620, + 0x368c: 0x406cd820, 0x368d: 0x406cda20, 0x368e: 0x406cdc20, 0x368f: 0x406cde20, + 0x3690: 0x406ce020, 0x3691: 0x406ce220, 0x3692: 0x406ce420, 0x3693: 0x406ce620, + 0x3694: 0x406ce820, 0x3695: 0x406cea20, 0x3696: 0x406cec20, 0x3697: 0x406cee20, + 0x3698: 0x406cf020, 0x3699: 0x406cf220, 0x369a: 0x406cf420, 0x369b: 0x406cf620, + 0x369c: 0x406cf820, 0x369d: 0x406cfa20, 0x369e: 0x406cfc20, 0x369f: 0x406cfe20, + 0x36a0: 0x406d0020, 0x36a1: 0x406d0220, 0x36a2: 0x406d0420, 0x36a3: 0x406d0620, + 0x36a4: 0x406d0820, 0x36a5: 0x406d0a20, 0x36a6: 0x406d0c20, 0x36a7: 0x406d0e20, + 0x36a8: 0x406d1020, 0x36a9: 0x406d1220, 0x36aa: 0x406d1420, 0x36ab: 0x406d1620, + 0x36ac: 0x406d1820, 0x36ad: 0x406d1a20, 0x36ae: 0x406d1c20, 0x36af: 0x406d1e20, + 0x36b0: 0x406d2020, 0x36b1: 0x406d2220, 0x36b2: 0x406d2420, 0x36b3: 0x406d2620, + 0x36b4: 0x406d2820, 0x36b5: 0x406d2a20, 0x36b6: 0x406d2c20, 0x36b7: 0x406d2e20, + 0x36b8: 0x406d3020, 0x36b9: 0x406d3220, 0x36ba: 0x406d3420, 0x36bb: 0x406d3620, + 0x36bc: 0x406d3820, 0x36bd: 0x406d3a20, 0x36be: 0x406d3c20, 0x36bf: 0x406d3e20, + // Block 0xdb, offset 0x36c0 + 0x36c0: 0x406d4020, 0x36c1: 0x406d4220, 0x36c2: 0x406d4420, 0x36c3: 0x406d4620, + 0x36c4: 0x406d4820, 0x36c5: 0x406d4a20, 0x36c6: 0x406d4c20, 0x36c7: 0x406d4e20, + 0x36c8: 0x406d5020, 0x36c9: 0x406d5220, 0x36ca: 0x406d5420, 0x36cb: 0x406d5620, + 0x36cc: 0x406d5820, 0x36cd: 0x406d5a20, 0x36ce: 0x406d5c20, 0x36cf: 0x406d5e20, + 0x36d0: 0x406d6020, 0x36d1: 0x406d6220, 0x36d2: 0x406d6420, 0x36d3: 0x406d6620, + 0x36d4: 0x406d6820, 0x36d5: 0x406d6a20, 0x36d6: 0x406d6c20, 0x36d7: 0x406d6e20, + 0x36d8: 0x406d7020, 0x36d9: 0x406d7220, 0x36da: 0x406d7420, 0x36db: 0x406d7620, + 0x36dc: 0x406d7820, 0x36dd: 0x406d7a20, 0x36de: 0x406d7c20, 0x36df: 0x406d7e20, + 0x36e0: 0x406d8020, 0x36e1: 0x406d8220, 0x36e2: 0x406d8420, 0x36e3: 0x406d8620, + 0x36e4: 0x406d8820, 0x36e5: 0x406d8a20, 0x36e6: 0x406d8c20, 0x36e7: 0x406d8e20, + 0x36e8: 0x406d9020, 0x36e9: 0x406d9220, 0x36ea: 0x406d9420, 0x36eb: 0x406d9620, + 0x36ec: 0x406d9820, 0x36ed: 0x406d9a20, 0x36ee: 0x406d9c20, 0x36ef: 0x406d9e20, + 0x36f0: 0x406da020, 0x36f1: 0x406da220, 0x36f2: 0x406da420, 0x36f3: 0x406da620, + 0x36f4: 0x406da820, 0x36f5: 0x406daa20, 0x36f6: 0x406dac20, 0x36f7: 0x406dae20, + 0x36f8: 0x406db020, 0x36f9: 0x406db220, 0x36fa: 0x406db420, 0x36fb: 0x406db620, + 0x36fc: 0x406db820, 0x36fd: 0x406dba20, 0x36fe: 0x406dbc20, 0x36ff: 0x406dbe20, + // Block 0xdc, offset 0x3700 + 0x3700: 0x406dc020, 0x3701: 0x406dc220, 0x3702: 0x406dc420, 0x3703: 0x406dc620, + 0x3704: 0x406dc820, 0x3705: 0x406dca20, 0x3706: 0x406dcc20, 0x3707: 0x406dce20, + 0x3708: 0x406dd020, 0x3709: 0x406dd220, 0x370a: 0x406dd420, 0x370b: 0x406dd620, + 0x370c: 0x406dd820, 0x370d: 0x406dda20, 0x370e: 0x406ddc20, 0x370f: 0x406dde20, + 0x3710: 0x406de020, 0x3711: 0x406de220, 0x3712: 0x406de420, 0x3713: 0x406de620, + 0x3714: 0x406de820, 0x3715: 0x406dea20, 0x3716: 0x406dec20, 0x3717: 0x406dee20, + 0x3718: 0x406df020, 0x3719: 0x406df220, 0x371a: 0x406df420, 0x371b: 0x406df620, + 0x371c: 0x406df820, 0x371d: 0x406dfa20, 0x371e: 0x406dfc20, 0x371f: 0x406dfe20, + 0x3720: 0x406e0020, 0x3721: 0x406e0220, 0x3722: 0x406e0420, 0x3723: 0x406e0620, + 0x3724: 0x406e0820, 0x3725: 0x406e0a20, 0x3726: 0x406e0c20, 0x3727: 0x406e0e20, + 0x3728: 0x406e1020, 0x3729: 0x406e1220, 0x372a: 0x406e1420, 0x372b: 0x406e1620, + 0x372c: 0x406e1820, 0x372d: 0x406e1a20, 0x372e: 0x406e1c20, 0x372f: 0x406e1e20, + 0x3730: 0x406e2020, 0x3731: 0x406e2220, 0x3732: 0x406e2420, 0x3733: 0x406e2620, + 0x3734: 0x406e2820, 0x3735: 0x406e2a20, 0x3736: 0x406e2c20, 0x3737: 0x406e2e20, + 0x3738: 0x406e3020, 0x3739: 0x406e3220, 0x373a: 0x406e3420, 0x373b: 0x406e3620, + 0x373c: 0x406e3820, 0x373d: 0x406e3a20, 0x373e: 0x406e3c20, 0x373f: 0x406e3e20, + // Block 0xdd, offset 0x3740 + 0x3740: 0x406e4020, 0x3741: 0x406e4220, 0x3742: 0x406e4420, 0x3743: 0x406e4620, + 0x3744: 0x406e4820, 0x3745: 0x406e4a20, 0x3746: 0x406e4c20, 0x3747: 0x406e4e20, + 0x3748: 0x406e5020, 0x3749: 0x406e5220, 0x374a: 0x406e5420, 0x374b: 0x406e5620, + 0x374c: 0x406e5820, 0x374d: 0x406e5a20, 0x374e: 0x406e5c20, 0x374f: 0x406e5e20, + 0x3750: 0x406e6020, 0x3751: 0x406e6220, 0x3752: 0x406e6420, 0x3753: 0x406e6620, + 0x3754: 0x406e6820, 0x3755: 0x406e6a20, 0x3756: 0x406e6c20, 0x3757: 0x406e6e20, + 0x3758: 0x406e7020, 0x3759: 0x406e7220, 0x375a: 0x406e7420, 0x375b: 0x406e7620, + 0x375c: 0x406e7820, 0x375d: 0x406e7a20, 0x375e: 0x406e7c20, 0x375f: 0x406e7e20, + 0x3760: 0x406e8020, 0x3761: 0x406e8220, 0x3762: 0x406e8420, 0x3763: 0x406e8620, + 0x3764: 0x406e8820, 0x3765: 0x406e8a20, 0x3766: 0x406e8c20, 0x3767: 0x406e8e20, + 0x3768: 0x406e9020, 0x3769: 0x406e9220, 0x376a: 0x406e9420, 0x376b: 0x406e9620, + 0x376c: 0x406e9820, 0x376d: 0x406e9a20, 0x376e: 0x406e9c20, 0x376f: 0x406e9e20, + 0x3770: 0x406ea020, 0x3771: 0x406ea220, 0x3772: 0x406ea420, 0x3773: 0x406ea620, + 0x3774: 0x406ea820, 0x3775: 0x406eaa20, 0x3776: 0x406eac20, 0x3777: 0x406eae20, + 0x3778: 0x406eb020, 0x3779: 0x406eb220, 0x377a: 0x406eb420, 0x377b: 0x406eb620, + 0x377c: 0x406eb820, 0x377d: 0x406eba20, 0x377e: 0x406ebc20, 0x377f: 0x406ebe20, + // Block 0xde, offset 0x3780 + 0x3780: 0x406ec020, 0x3781: 0x406ec220, 0x3782: 0x406ec420, 0x3783: 0x406ec620, + 0x3784: 0x406ec820, 0x3785: 0x406eca20, 0x3786: 0x406ecc20, 0x3787: 0x406ece20, + 0x3788: 0x406ed020, 0x3789: 0x406ed220, 0x378a: 0x406ed420, 0x378b: 0x406ed620, + 0x378c: 0x406ed820, 0x378d: 0x406eda20, 0x378e: 0x406edc20, 0x378f: 0x406ede20, + 0x3790: 0x406ee020, 0x3791: 0x406ee220, 0x3792: 0x406ee420, 0x3793: 0x406ee620, + 0x3794: 0x406ee820, 0x3795: 0x406eea20, 0x3796: 0x406eec20, 0x3797: 0x406eee20, + 0x3798: 0x406ef020, 0x3799: 0x406ef220, 0x379a: 0x406ef420, 0x379b: 0x406ef620, + 0x379c: 0x406ef820, 0x379d: 0x406efa20, 0x379e: 0x406efc20, 0x379f: 0x406efe20, + 0x37a0: 0x406f0020, 0x37a1: 0x406f0220, 0x37a2: 0x406f0420, 0x37a3: 0x406f0620, + 0x37a4: 0x406f0820, 0x37a5: 0x406f0a20, 0x37a6: 0x406f0c20, 0x37a7: 0x406f0e20, + 0x37a8: 0x406f1020, 0x37a9: 0x406f1220, 0x37aa: 0x406f1420, 0x37ab: 0x406f1620, + 0x37ac: 0x406f1820, 0x37ad: 0x406f1a20, 0x37ae: 0x406f1c20, 0x37af: 0x406f1e20, + 0x37b0: 0x406f2020, 0x37b1: 0x406f2220, 0x37b2: 0x406f2420, 0x37b3: 0x406f2620, + 0x37b4: 0x406f2820, 0x37b5: 0x406f2a20, 0x37b6: 0x406f2c20, 0x37b7: 0x406f2e20, + 0x37b8: 0x406f3020, 0x37b9: 0x406f3220, 0x37ba: 0x406f3420, 0x37bb: 0x406f3620, + 0x37bc: 0x406f3820, 0x37bd: 0x406f3a20, 0x37be: 0x406f3c20, 0x37bf: 0x406f3e20, + // Block 0xdf, offset 0x37c0 + 0x37c0: 0x406f4020, 0x37c1: 0x406f4220, 0x37c2: 0x406f4420, 0x37c3: 0x406f4620, + 0x37c4: 0x406f4820, 0x37c5: 0x406f4a20, 0x37c6: 0x406f4c20, 0x37c7: 0x406f4e20, + 0x37c8: 0x406f5020, 0x37c9: 0x406f5220, 0x37ca: 0x406f5420, 0x37cb: 0x406f5620, + 0x37cc: 0x406f5820, + 0x37d0: 0x401a9020, 0x37d1: 0x401a9220, 0x37d2: 0x401a9420, 0x37d3: 0x401a9620, + 0x37d4: 0x401a9820, 0x37d5: 0x401a9a20, 0x37d6: 0x401a9c20, 0x37d7: 0x401a9e20, + 0x37d8: 0x401aa020, 0x37d9: 0x401aa220, 0x37da: 0x401aa420, 0x37db: 0x401aa620, + 0x37dc: 0x401aa820, 0x37dd: 0x401aaa20, 0x37de: 0x401aac20, 0x37df: 0x401aae20, + 0x37e0: 0x401ab020, 0x37e1: 0x401ab220, 0x37e2: 0x401ab420, 0x37e3: 0x401ab620, + 0x37e4: 0x401ab820, 0x37e5: 0x401aba20, 0x37e6: 0x401abc20, 0x37e7: 0x401abe20, + 0x37e8: 0x401ac020, 0x37e9: 0x401ac220, 0x37ea: 0x401ac420, 0x37eb: 0x401ac620, + 0x37ec: 0x401ac820, 0x37ed: 0x401aca20, 0x37ee: 0x401acc20, 0x37ef: 0x401ace20, + 0x37f0: 0x401ad020, 0x37f1: 0x401ad220, 0x37f2: 0x401ad420, 0x37f3: 0x401ad620, + 0x37f4: 0x401ad820, 0x37f5: 0x401ada20, 0x37f6: 0x401adc20, 0x37f7: 0x401ade20, + 0x37f8: 0x401ae020, 0x37f9: 0x401ae220, 0x37fa: 0x401ae420, 0x37fb: 0x401ae620, + 0x37fc: 0x401ae820, 0x37fd: 0x401aea20, 0x37fe: 0x401aec20, 0x37ff: 0x401aee20, + // Block 0xe0, offset 0x3800 + 0x3800: 0x401af020, 0x3801: 0x401af220, 0x3802: 0x401af420, 0x3803: 0x401af620, + 0x3804: 0x401af820, 0x3805: 0x401afa20, 0x3806: 0x401afc20, + 0x3810: 0x406f6620, 0x3811: 0x406f6820, 0x3812: 0x406f6a20, 0x3813: 0x406f6c20, + 0x3814: 0x406f6e20, 0x3815: 0x406f7020, 0x3816: 0x406f7220, 0x3817: 0x406f7420, + 0x3818: 0x406f7620, 0x3819: 0x406f7820, 0x381a: 0x406f7a20, 0x381b: 0x406f7c20, + 0x381c: 0x406f7e20, 0x381d: 0x406f8020, 0x381e: 0x406f8220, 0x381f: 0x406f8420, + 0x3820: 0x406f8620, 0x3821: 0x406f8820, 0x3822: 0x406f8a20, 0x3823: 0x406f8c20, + 0x3824: 0x406f8e20, 0x3825: 0x406f9020, 0x3826: 0x406f9220, 0x3827: 0x406f9420, + 0x3828: 0x406f9620, 0x3829: 0x406f9820, 0x382a: 0x406f9e20, 0x382b: 0x406f9a20, + 0x382c: 0x406fa020, 0x382d: 0x406f9c20, 0x382e: 0x406fa220, 0x382f: 0x406fa420, + 0x3830: 0x406fa620, 0x3831: 0x406fa820, 0x3832: 0x406faa20, 0x3833: 0x406fac20, + 0x3834: 0x406fae20, 0x3835: 0x406fb020, 0x3836: 0x406fb220, 0x3837: 0x406fb420, + 0x3838: 0x406f5a20, 0x3839: 0x406f5c20, 0x383a: 0x406f5e20, 0x383b: 0x406f6020, + 0x383c: 0x406f6420, 0x383d: 0x406f6220, 0x383e: 0x40025620, 0x383f: 0x4002fe20, + // Block 0xe1, offset 0x3840 + 0x3840: 0x405b8020, 0x3841: 0x405b8220, 0x3842: 0x405b8420, 0x3843: 0x405b8620, + 0x3844: 0x405b8820, 0x3845: 0x405b8a20, 0x3846: 0x405b8c20, 0x3847: 0x405b8e20, + 0x3848: 0x405b9020, 0x3849: 0x405b9220, 0x384a: 0x405b9420, 0x384b: 0x405b9620, + 0x384c: 0x405b9820, 0x384d: 0x405b9a20, 0x384e: 0x405b9c20, 0x384f: 0x405b9e20, + 0x3850: 0x405ba020, 0x3851: 0x405ba220, 0x3852: 0x405ba420, 0x3853: 0x405ba620, + 0x3854: 0x405ba820, 0x3855: 0x405baa20, 0x3856: 0x405bac20, 0x3857: 0x405bae20, + 0x3858: 0x405bb020, 0x3859: 0x405bb220, 0x385a: 0x405bb420, 0x385b: 0x405bb620, + 0x385c: 0x405bb820, 0x385d: 0x405bba20, 0x385e: 0x405bbc20, 0x385f: 0x405bbe20, + 0x3860: 0x405bc020, 0x3861: 0x405bc220, 0x3862: 0x405bc420, 0x3863: 0x405bc620, + 0x3864: 0x405bc820, 0x3865: 0x405bca20, 0x3866: 0x405bcc20, 0x3867: 0x405bce20, + 0x3868: 0x405bd020, 0x3869: 0x405bd220, 0x386a: 0x405bd420, 0x386b: 0x405bd620, + 0x386c: 0x405bd820, 0x386d: 0x405bda20, 0x386e: 0x405bdc20, 0x386f: 0x405bde20, + 0x3870: 0x405be020, 0x3871: 0x405be220, 0x3872: 0x405be420, 0x3873: 0x405be620, + 0x3874: 0x405be820, 0x3875: 0x405bea20, 0x3876: 0x405bec20, 0x3877: 0x405bee20, + 0x3878: 0x405bf020, 0x3879: 0x405bf220, 0x387a: 0x405bf420, 0x387b: 0x405bf620, + 0x387c: 0x405bf820, 0x387d: 0x405bfa20, 0x387e: 0x405bfc20, 0x387f: 0x405bfe20, + // Block 0xe2, offset 0x3880 + 0x3880: 0x405c0020, 0x3881: 0x405c0220, 0x3882: 0x405c0420, 0x3883: 0x405c0620, + 0x3884: 0x405c0820, 0x3885: 0x405c0a20, 0x3886: 0x405c0c20, 0x3887: 0x405c0e20, + 0x3888: 0x405c1020, 0x3889: 0x405c1220, 0x388a: 0x405c1420, 0x388b: 0x405c1620, + 0x388c: 0x405c1820, 0x388d: 0x405c1a20, 0x388e: 0x405c1c20, 0x388f: 0x405c1e20, + 0x3890: 0x405c2020, 0x3891: 0x405c2220, 0x3892: 0x405c2420, 0x3893: 0x405c2620, + 0x3894: 0x405c2820, 0x3895: 0x405c2a20, 0x3896: 0x405c2c20, 0x3897: 0x405c2e20, + 0x3898: 0x405c3020, 0x3899: 0x405c3220, 0x389a: 0x405c3420, 0x389b: 0x405c3620, + 0x389c: 0x405c3820, 0x389d: 0x405c3a20, 0x389e: 0x405c3c20, 0x389f: 0x405c3e20, + 0x38a0: 0x405c4020, 0x38a1: 0x405c4220, 0x38a2: 0x405c4420, 0x38a3: 0x405c4620, + 0x38a4: 0x405c4820, 0x38a5: 0x405c4a20, 0x38a6: 0x405c4c20, 0x38a7: 0x405c4e20, + 0x38a8: 0x405c5020, 0x38a9: 0x405c5220, 0x38aa: 0x405c5420, 0x38ab: 0x405c5620, + 0x38ac: 0x405c5820, 0x38ad: 0x405c5a20, 0x38ae: 0x405c5c20, 0x38af: 0x405c5e20, + 0x38b0: 0x405c6020, 0x38b1: 0x405c6220, 0x38b2: 0x405c6420, 0x38b3: 0x405c6620, + 0x38b4: 0x405c6820, 0x38b5: 0x405c6a20, 0x38b6: 0x405c6c20, 0x38b7: 0x405c6e20, + 0x38b8: 0x405c7020, 0x38b9: 0x405c7220, 0x38ba: 0x405c7420, 0x38bb: 0x405c7620, + 0x38bc: 0x405c7820, 0x38bd: 0x405c7a20, 0x38be: 0x405c7c20, 0x38bf: 0x405c7e20, + // Block 0xe3, offset 0x38c0 + 0x38c0: 0x405c8020, 0x38c1: 0x405c8220, 0x38c2: 0x405c8420, 0x38c3: 0x405c8620, + 0x38c4: 0x405c8820, 0x38c5: 0x405c8a20, 0x38c6: 0x405c8c20, 0x38c7: 0x405c8e20, + 0x38c8: 0x405c9020, 0x38c9: 0x405c9220, 0x38ca: 0x405c9420, 0x38cb: 0x405c9620, + 0x38cc: 0x405c9820, 0x38cd: 0x405c9a20, 0x38ce: 0x405c9c20, 0x38cf: 0x405c9e20, + 0x38d0: 0x405ca020, 0x38d1: 0x405ca220, 0x38d2: 0x405ca420, 0x38d3: 0x405ca620, + 0x38d4: 0x405ca820, 0x38d5: 0x405caa20, 0x38d6: 0x405cac20, 0x38d7: 0x405cae20, + 0x38d8: 0x405cb020, 0x38d9: 0x405cb220, 0x38da: 0x405cb420, 0x38db: 0x405cb620, + 0x38dc: 0x405cb820, 0x38dd: 0x405cba20, 0x38de: 0x405cbc20, 0x38df: 0x405cbe20, + 0x38e0: 0x405cc020, 0x38e1: 0x405cc220, 0x38e2: 0x405cc420, 0x38e3: 0x405cc620, + 0x38e4: 0x405cc820, 0x38e5: 0x405cca20, 0x38e6: 0x405ccc20, 0x38e7: 0x405cce20, + 0x38e8: 0x405cd020, 0x38e9: 0x405cd220, 0x38ea: 0x405cd420, 0x38eb: 0x405cd620, + 0x38ec: 0x405cd820, 0x38ed: 0x405cda20, 0x38ee: 0x405cdc20, 0x38ef: 0x405cde20, + 0x38f0: 0x405ce020, 0x38f1: 0x405ce220, 0x38f2: 0x405ce420, 0x38f3: 0x405ce620, + 0x38f4: 0x405ce820, 0x38f5: 0x405cea20, 0x38f6: 0x405cec20, 0x38f7: 0x405cee20, + 0x38f8: 0x405cf020, 0x38f9: 0x405cf220, 0x38fa: 0x405cf420, 0x38fb: 0x405cf620, + 0x38fc: 0x405cf820, 0x38fd: 0x405cfa20, 0x38fe: 0x405cfc20, 0x38ff: 0x405cfe20, + // Block 0xe4, offset 0x3900 + 0x3900: 0x405d0020, 0x3901: 0x405d0220, 0x3902: 0x405d0420, 0x3903: 0x405d0620, + 0x3904: 0x405d0820, 0x3905: 0x405d0a20, 0x3906: 0x405d0c20, 0x3907: 0x405d0e20, + 0x3908: 0x405d1020, 0x3909: 0x405d1220, 0x390a: 0x405d1420, 0x390b: 0x405d1620, + 0x390c: 0x405d1820, 0x390d: 0x405d1a20, 0x390e: 0x405d1c20, 0x390f: 0x405d1e20, + 0x3910: 0x405d2020, 0x3911: 0x405d2220, 0x3912: 0x405d2420, 0x3913: 0x405d2620, + 0x3914: 0x405d2820, 0x3915: 0x405d2a20, 0x3916: 0x405d2c20, 0x3917: 0x405d2e20, + 0x3918: 0x405d3020, 0x3919: 0x405d3220, 0x391a: 0x405d3420, 0x391b: 0x405d3620, + 0x391c: 0x405d3820, 0x391d: 0x405d3a20, 0x391e: 0x405d3c20, 0x391f: 0x405d3e20, + 0x3920: 0x405d4020, 0x3921: 0x405d4220, 0x3922: 0x405d4420, 0x3923: 0x405d4620, + 0x3924: 0x405d4820, 0x3925: 0x405d4a20, 0x3926: 0x405d4c20, 0x3927: 0x405d4e20, + 0x3928: 0x405d5020, 0x3929: 0x405d5220, 0x392a: 0x405d5420, 0x392b: 0x405d5620, + 0x392c: 0x405d5820, 0x392d: 0x405d5a20, 0x392e: 0x405d5c20, 0x392f: 0x405d5e20, + 0x3930: 0x405d6020, 0x3931: 0x405d6220, 0x3932: 0x405d6420, 0x3933: 0x405d6620, + 0x3934: 0x405d6820, 0x3935: 0x405d6a20, 0x3936: 0x405d6c20, 0x3937: 0x405d6e20, + 0x3938: 0x405d7020, 0x3939: 0x405d7220, 0x393a: 0x405d7420, 0x393b: 0x405d7620, + 0x393c: 0x405d7820, 0x393d: 0x405d7a20, 0x393e: 0x405d7c20, 0x393f: 0x405d7e20, + // Block 0xe5, offset 0x3940 + 0x3940: 0x405d8020, 0x3941: 0x405d8220, 0x3942: 0x405d8420, 0x3943: 0x405d8620, + 0x3944: 0x405d8820, 0x3945: 0x405d8a20, 0x3946: 0x405d8c20, 0x3947: 0x405d8e20, + 0x3948: 0x405d9020, 0x3949: 0x405d9220, 0x394a: 0x405d9420, 0x394b: 0x405d9620, + 0x394c: 0x405d9820, 0x394d: 0x40025820, 0x394e: 0x40030020, 0x394f: 0x4002d820, + 0x3950: 0x005c3084, 0x3951: 0x005c5484, 0x3952: 0x005c8e84, 0x3953: 0xe00020fb, + 0x3954: 0xe00020fe, 0x3955: 0xe0002101, 0x3956: 0xe0002104, 0x3957: 0xe0002107, + 0x3958: 0xe000210a, 0x3959: 0xe000210d, 0x395a: 0xe0002110, 0x395b: 0xe0002113, + 0x395c: 0xe0002116, 0x395d: 0xe0002119, 0x395e: 0xe000211c, 0x395f: 0xe000211f, + 0x3960: 0xe00001cd, 0x3961: 0xe0000261, 0x3962: 0xe0000379, 0x3963: 0xe0000453, + 0x3964: 0xe0000528, 0x3965: 0xe00005f2, 0x3966: 0xe00006bd, 0x3967: 0xe0000765, + 0x3968: 0xe0000811, 0x3969: 0xe00008b6, 0x396a: 0x005c5c84, 0x396b: 0x005d2284, + // Block 0xe6, offset 0x3980 + 0x3980: 0x0033ec88, 0x3981: 0x4033ec20, 0x3982: 0x0033fa88, 0x3983: 0x4033fa20, + 0x3984: 0x00340488, 0x3985: 0x40340420, 0x3986: 0x00343488, 0x3987: 0x40343420, + 0x3988: 0x00344e88, 0x3989: 0x40344e20, 0x398a: 0x0035a288, 0x398b: 0x4035a220, + 0x398c: 0x0035f088, 0x398d: 0x4035f020, 0x398e: 0x00366e88, 0x398f: 0x40366e20, + 0x3990: 0x00367c88, 0x3991: 0x40367c20, 0x3992: 0x0036a688, 0x3993: 0x4036a620, + 0x3994: 0x0036c088, 0x3995: 0x4036c020, 0x3996: 0x0036c288, 0x3997: 0x4036c220, + 0x3998: 0x0036de88, 0x3999: 0x4036de20, 0x399a: 0x0036e888, 0x399b: 0x4036e820, + 0x399c: 0x0036f288, 0x399d: 0x4036f220, 0x399e: 0x00372488, 0x399f: 0x40372420, + 0x39a0: 0x00360a88, 0x39a1: 0x40360a20, 0x39a2: 0x00339e88, 0x39a3: 0x40339e20, + 0x39a4: 0x0034a288, 0x39a5: 0x4034a220, 0x39a6: 0x0034b888, 0x39a7: 0x4034b820, + 0x39a8: 0x0034ee8a, 0x39a9: 0x0034ee84, 0x39aa: 0x0034ee8a, 0x39ab: 0x0034ee84, + 0x39ac: 0x0034ee8a, 0x39ad: 0x0034ee84, 0x39ae: 0x0034ee84, 0x39af: 0xae608402, + 0x39b0: 0xa0000000, 0x39b1: 0xa0000000, 0x39b2: 0xa0000000, 0x39b3: 0x4004e020, + 0x39b4: 0x84e619e1, 0x39b5: 0x84e61a0a, 0x39b6: 0x84e61a1b, 0x39b7: 0x84e61ab9, + 0x39b8: 0x84e61b3a, 0x39b9: 0x84e61b3f, 0x39ba: 0x84e61b47, 0x39bb: 0x84e61af0, + 0x39bc: 0xae605f02, 0x39bd: 0xae605f02, 0x39be: 0x40054c20, 0x39bf: 0x40367220, + // Block 0xe7, offset 0x39c0 + 0x39c0: 0x00339488, 0x39c1: 0x40339420, 0x39c2: 0x00341288, 0x39c3: 0x40341220, + 0x39c4: 0x0033d288, 0x39c5: 0x4033d220, 0x39c6: 0x00364288, 0x39c7: 0x40364220, + 0x39c8: 0x00340e88, 0x39c9: 0x40340e20, 0x39ca: 0x00356088, 0x39cb: 0x40356020, + 0x39cc: 0x00355488, 0x39cd: 0x40355420, 0x39ce: 0x00360c88, 0x39cf: 0x40360c20, + 0x39d0: 0x00361688, 0x39d1: 0x40361620, 0x39d2: 0x00362088, 0x39d3: 0x40362020, + 0x39d4: 0x0035de88, 0x39d5: 0x4035de20, 0x39d6: 0x00366488, 0x39d7: 0x40366420, + 0x39df: 0x84e61b67, + 0x39e0: 0x405d9a20, 0x39e1: 0x405d9c20, 0x39e2: 0x405d9e20, 0x39e3: 0x405da020, + 0x39e4: 0x405da220, 0x39e5: 0x405da420, 0x39e6: 0x405da620, 0x39e7: 0x405da820, + 0x39e8: 0x405daa20, 0x39e9: 0x405dac20, 0x39ea: 0x405dae20, 0x39eb: 0x405db020, + 0x39ec: 0x405db220, 0x39ed: 0x405db420, 0x39ee: 0x405db620, 0x39ef: 0x405db820, + 0x39f0: 0x405dba20, 0x39f1: 0x405dbc20, 0x39f2: 0x405dbe20, 0x39f3: 0x405dc020, + 0x39f4: 0x405dc220, 0x39f5: 0x405dc420, 0x39f6: 0x405dc620, 0x39f7: 0x405dc820, + 0x39f8: 0x405dca20, 0x39f9: 0x405dcc20, 0x39fa: 0x405dce20, 0x39fb: 0x405dd020, + 0x39fc: 0x405dd220, 0x39fd: 0x405dd420, 0x39fe: 0x405dd620, 0x39ff: 0x405dd820, + // Block 0xe8, offset 0x3a00 + 0x3a00: 0x405dda20, 0x3a01: 0x405ddc20, 0x3a02: 0x405dde20, 0x3a03: 0x405de020, + 0x3a04: 0x405de220, 0x3a05: 0x405de420, 0x3a06: 0x405de620, 0x3a07: 0x405de820, + 0x3a08: 0x405dea20, 0x3a09: 0x405dec20, 0x3a0a: 0x405dee20, 0x3a0b: 0x405df020, + 0x3a0c: 0x405df220, 0x3a0d: 0x405df420, 0x3a0e: 0x405df620, 0x3a0f: 0x405df820, + 0x3a10: 0x405dfa20, 0x3a11: 0x405dfc20, 0x3a12: 0x405dfe20, 0x3a13: 0x405e0020, + 0x3a14: 0x405e0220, 0x3a15: 0x405e0420, 0x3a16: 0x405e0620, 0x3a17: 0x405e0820, + 0x3a18: 0x405e0a20, 0x3a19: 0x405e0c20, 0x3a1a: 0x405e0e20, 0x3a1b: 0x405e1020, + 0x3a1c: 0x405e1220, 0x3a1d: 0x405e1420, 0x3a1e: 0x405e1620, 0x3a1f: 0x405e1820, + 0x3a20: 0x405e1a20, 0x3a21: 0x405e1c20, 0x3a22: 0x405e1e20, 0x3a23: 0x405e2020, + 0x3a24: 0x405e2220, 0x3a25: 0x405e2420, 0x3a26: 0x405e2620, 0x3a27: 0x405e2820, + 0x3a28: 0x405e2a20, 0x3a29: 0x405e2c20, 0x3a2a: 0x405e2e20, 0x3a2b: 0x405e3020, + 0x3a2c: 0x405e3220, 0x3a2d: 0x405e3420, 0x3a2e: 0x405e3620, 0x3a2f: 0x405e3820, + 0x3a30: 0xae60ef02, 0x3a31: 0xae60f002, 0x3a32: 0x40038220, 0x3a33: 0x40030220, + 0x3a34: 0x4002b820, 0x3a35: 0x40025a20, 0x3a36: 0x40026a20, 0x3a37: 0x4002da20, + // Block 0xe9, offset 0x3a40 + 0x3a40: 0x4006ba20, 0x3a41: 0x4006bc20, 0x3a42: 0x4006be20, 0x3a43: 0x4006c020, + 0x3a44: 0x4006c220, 0x3a45: 0x4006c420, 0x3a46: 0x4006c620, 0x3a47: 0x4006c820, + 0x3a48: 0x4006ca20, 0x3a49: 0x4006cc20, 0x3a4a: 0x4006ce20, 0x3a4b: 0x4006d020, + 0x3a4c: 0x4006d220, 0x3a4d: 0x4006d420, 0x3a4e: 0x4006d620, 0x3a4f: 0x4006d820, + 0x3a50: 0x4006da20, 0x3a51: 0x4006dc20, 0x3a52: 0x4006de20, 0x3a53: 0x4006e020, + 0x3a54: 0x4006e220, 0x3a55: 0x4006e420, 0x3a56: 0x4006e620, 0x3a57: 0x4006e820, + 0x3a58: 0x4006ea20, 0x3a59: 0x4006ec20, 0x3a5a: 0x4006ee20, 0x3a5b: 0x4006f020, + 0x3a5c: 0x4006f220, 0x3a5d: 0x4006f420, 0x3a5e: 0x4006f620, 0x3a5f: 0x4006f820, + 0x3a60: 0x4006fa20, 0x3a61: 0x4006fc20, 0x3a62: 0x0031e488, 0x3a63: 0x4031e420, + 0x3a64: 0x0031f888, 0x3a65: 0x4031f820, 0x3a66: 0x002d8c88, 0x3a67: 0x402d8c20, + 0x3a68: 0xe0000fd5, 0x3a69: 0xe0000fd2, 0x3a6a: 0x0031ae88, 0x3a6b: 0x4031ae20, + 0x3a6c: 0x0031b088, 0x3a6d: 0x4031b020, 0x3a6e: 0x0031b288, 0x3a6f: 0x4031b220, + 0x3a70: 0x402d1020, 0x3a71: 0x402fee20, 0x3a72: 0xe00009cf, 0x3a73: 0xe00009cc, + 0x3a74: 0xe00009ff, 0x3a75: 0xe00009fc, 0x3a76: 0xe0000a05, 0x3a77: 0xe0000a02, + 0x3a78: 0xe0000a0e, 0x3a79: 0xe0000a0b, 0x3a7a: 0xe0000a15, 0x3a7b: 0xe0000a11, + 0x3a7c: 0xe0000a1c, 0x3a7d: 0xe0000a19, 0x3a7e: 0x002c6088, 0x3a7f: 0x402c6020, + // Block 0xea, offset 0x3a80 + 0x3a80: 0x002e1488, 0x3a81: 0x402e1420, 0x3a82: 0x002e1688, 0x3a83: 0x402e1620, + 0x3a84: 0x002e1888, 0x3a85: 0x402e1820, 0x3a86: 0x002e3288, 0x3a87: 0x402e3220, + 0x3a88: 0x002e3688, 0x3a89: 0x402e3620, 0x3a8a: 0x002f1888, 0x3a8b: 0x402f1820, + 0x3a8c: 0x002f0888, 0x3a8d: 0x402f0820, 0x3a8e: 0xe0000ea1, 0x3a8f: 0xe0000e9e, + 0x3a90: 0x002f3888, 0x3a91: 0x402f3820, 0x3a92: 0x002f4688, 0x3a93: 0x402f4620, + 0x3a94: 0x002f4888, 0x3a95: 0x402f4820, 0x3a96: 0x002f5e88, 0x3a97: 0x402f5e20, + 0x3a98: 0x002f6088, 0x3a99: 0x402f6020, 0x3a9a: 0x002f8a88, 0x3a9b: 0x402f8a20, + 0x3a9c: 0x002fe488, 0x3a9d: 0x402fe420, 0x3a9e: 0x0030c888, 0x3a9f: 0x4030c820, + 0x3aa0: 0xe00010c6, 0x3aa1: 0xe00010c3, 0x3aa2: 0x00316288, 0x3aa3: 0x40316220, + 0x3aa4: 0x00319088, 0x3aa5: 0x40319020, 0x3aa6: 0x00319288, 0x3aa7: 0x40319220, + 0x3aa8: 0x00319c88, 0x3aa9: 0x40319c20, 0x3aaa: 0x00319e88, 0x3aab: 0x40319e20, + 0x3aac: 0x0031a088, 0x3aad: 0x4031a020, 0x3aae: 0x0031a288, 0x3aaf: 0x4031a220, + 0x3ab0: 0x0031a294, 0x3ab1: 0x402c9420, 0x3ab2: 0x402e6620, 0x3ab3: 0x402e9c20, + 0x3ab4: 0x402ed820, 0x3ab5: 0x402fe020, 0x3ab6: 0x402fe220, 0x3ab7: 0x40306220, + 0x3ab8: 0x4031a420, 0x3ab9: 0xe0000abc, 0x3aba: 0xe0000ab9, 0x3abb: 0xe0000b92, + 0x3abc: 0xe0000b8f, 0x3abd: 0xe0000bdc, 0x3abe: 0x002d5688, 0x3abf: 0x402d5620, + // Block 0xeb, offset 0x3ac0 + 0x3ac0: 0x002e7088, 0x3ac1: 0x402e7020, 0x3ac2: 0xe0000f08, 0x3ac3: 0xe0000f05, + 0x3ac4: 0xe0000f6d, 0x3ac5: 0xe0000f6a, 0x3ac6: 0xe0000fb7, 0x3ac7: 0xe0000fb4, + 0x3ac8: 0x4006fe20, 0x3ac9: 0x40070020, 0x3aca: 0x40070220, 0x3acb: 0x0031e688, + 0x3acc: 0x4031e620, 0x3acd: 0x00308888, 0x3ace: 0x402e5c20, + 0x3ad0: 0x002ec488, 0x3ad1: 0x402ec420, 0x3ad2: 0x002c4c88, 0x3ad3: 0x402c4c20, + 0x3ae0: 0xe0000bd6, 0x3ae1: 0xe0000bd3, 0x3ae2: 0xe0000ca5, 0x3ae3: 0xe0000ca2, + 0x3ae4: 0xe0000d75, 0x3ae5: 0xe0000d72, 0x3ae6: 0xe0000ee2, 0x3ae7: 0xe0000edf, + 0x3ae8: 0xe0000f4d, 0x3ae9: 0xe0000f4a, 0x3aea: 0x002d8088, + // Block 0xec, offset 0x3b00 + 0x3b38: 0xf0001414, 0x3b39: 0xe0000e97, 0x3b3a: 0x4030a820, 0x3b3b: 0x402d2020, + 0x3b3c: 0x402f4a20, 0x3b3d: 0x402e9820, 0x3b3e: 0x402db220, 0x3b3f: 0x402e9a20, + // Block 0xed, offset 0x3b40 + 0x3b40: 0x4045aa20, 0x3b41: 0x4045ac20, 0x3b42: 0x4045ae20, 0x3b43: 0x4045b020, + 0x3b44: 0x4045b220, 0x3b45: 0x4045b420, 0x3b46: 0x820922db, 0x3b47: 0x4045b820, + 0x3b48: 0x4045ba20, 0x3b49: 0x4045bc20, 0x3b4a: 0x4045be20, 0x3b4b: 0xa000f302, + 0x3b4c: 0x4045c020, 0x3b4d: 0x4045c220, 0x3b4e: 0x4045c420, 0x3b4f: 0x4045c620, + 0x3b50: 0x4045c820, 0x3b51: 0x4045ca20, 0x3b52: 0x4045cc20, 0x3b53: 0x4045ce20, + 0x3b54: 0x4045d020, 0x3b55: 0x4045d220, 0x3b56: 0x4045d420, 0x3b57: 0x4045d620, + 0x3b58: 0x4045d820, 0x3b59: 0x4045da20, 0x3b5a: 0x4045dc20, 0x3b5b: 0x4045de20, + 0x3b5c: 0x4045e020, 0x3b5d: 0x4045e220, 0x3b5e: 0x4045e420, 0x3b5f: 0x4045e620, + 0x3b60: 0x4045e820, 0x3b61: 0x4045ea20, 0x3b62: 0x4045ec20, 0x3b63: 0x4045ee20, + 0x3b64: 0x4045f020, 0x3b65: 0x4045f220, 0x3b66: 0x4045f420, 0x3b67: 0x4045f620, + 0x3b68: 0x40075020, 0x3b69: 0x40075220, 0x3b6a: 0x40075420, 0x3b6b: 0x40075620, + 0x3b70: 0x40284820, 0x3b71: 0x40284a20, 0x3b72: 0x40284c20, 0x3b73: 0x40284e20, + 0x3b74: 0x40285020, 0x3b75: 0x40285220, 0x3b76: 0x40075820, 0x3b77: 0x40075a20, + 0x3b78: 0x4027f020, 0x3b79: 0x40075c20, + // Block 0xee, offset 0x3b80 + 0x3b80: 0x404baa20, 0x3b81: 0x404bac20, 0x3b82: 0x404bae20, 0x3b83: 0x404bb020, + 0x3b84: 0x404bb220, 0x3b85: 0x404bb420, 0x3b86: 0x404bb620, 0x3b87: 0x404bb820, + 0x3b88: 0x404bc220, 0x3b89: 0x404bc420, 0x3b8a: 0x404bc620, 0x3b8b: 0x404bc820, + 0x3b8c: 0x404bca20, 0x3b8d: 0x404bcc20, 0x3b8e: 0x404bce20, 0x3b8f: 0x404bd020, + 0x3b90: 0x404bd220, 0x3b91: 0x404bd420, 0x3b92: 0x404bd620, 0x3b93: 0x404bd820, + 0x3b94: 0x404bdc20, 0x3b95: 0x404bde20, 0x3b96: 0x404be020, 0x3b97: 0x404be220, + 0x3b98: 0x404be820, 0x3b99: 0x404bee20, 0x3b9a: 0x404bf020, 0x3b9b: 0x404bf420, + 0x3b9c: 0x404bf620, 0x3b9d: 0x404bfc20, 0x3b9e: 0x404c0620, 0x3b9f: 0x404c0820, + 0x3ba0: 0x404c0a20, 0x3ba1: 0x404c0c20, 0x3ba2: 0x404bfe20, 0x3ba3: 0x404c0020, + 0x3ba4: 0x404c0220, 0x3ba5: 0x404c0420, 0x3ba6: 0x404c0e20, 0x3ba7: 0x404bda20, + 0x3ba8: 0x404be420, 0x3ba9: 0x404bba20, 0x3baa: 0x404bbc20, 0x3bab: 0x404bbe20, + 0x3bac: 0x404bc020, 0x3bad: 0x404be620, 0x3bae: 0x404bf220, 0x3baf: 0x404bf820, + 0x3bb0: 0x404bfa20, 0x3bb1: 0x404bea20, 0x3bb2: 0x404bec20, 0x3bb3: 0x404c1020, + 0x3bb4: 0x4005e820, 0x3bb5: 0x4005ea20, 0x3bb6: 0x40031820, 0x3bb7: 0x40031a20, + // Block 0xef, offset 0x3bc0 + 0x3bc0: 0xa000f302, 0x3bc1: 0xa000f402, 0x3bc2: 0x4045f820, 0x3bc3: 0x4045fa20, + 0x3bc4: 0x4045fc20, 0x3bc5: 0x4045fe20, 0x3bc6: 0x40460020, 0x3bc7: 0x40460220, + 0x3bc8: 0x40460420, 0x3bc9: 0x40460620, 0x3bca: 0x40460820, 0x3bcb: 0x40460a20, + 0x3bcc: 0x40460c20, 0x3bcd: 0x40460e20, 0x3bce: 0x40461020, 0x3bcf: 0x40461220, + 0x3bd0: 0x40461420, 0x3bd1: 0x40461620, 0x3bd2: 0x40461820, 0x3bd3: 0x40461a20, + 0x3bd4: 0x40461c20, 0x3bd5: 0x40461e20, 0x3bd6: 0x40462020, 0x3bd7: 0x40462220, + 0x3bd8: 0x40462420, 0x3bd9: 0x40462620, 0x3bda: 0x40462820, 0x3bdb: 0x40462a20, + 0x3bdc: 0x40462c20, 0x3bdd: 0x40462e20, 0x3bde: 0x40463020, 0x3bdf: 0x40463220, + 0x3be0: 0x40463420, 0x3be1: 0x40463620, 0x3be2: 0x40463820, 0x3be3: 0x40463a20, + 0x3be4: 0x40463c20, 0x3be5: 0x40463e20, 0x3be6: 0x40464020, 0x3be7: 0x40464220, + 0x3be8: 0x40464420, 0x3be9: 0x40464620, 0x3bea: 0x40464820, 0x3beb: 0x40464a20, + 0x3bec: 0x40464c20, 0x3bed: 0x40464e20, 0x3bee: 0x40465020, 0x3bef: 0x40465220, + 0x3bf0: 0x40465420, 0x3bf1: 0x40465620, 0x3bf2: 0x40465820, 0x3bf3: 0x40465a20, + 0x3bf4: 0x40465c20, 0x3bf5: 0x40465e20, 0x3bf6: 0x40466020, 0x3bf7: 0x40466220, + 0x3bf8: 0x40466420, 0x3bf9: 0x40466620, 0x3bfa: 0x40466820, 0x3bfb: 0x40466a20, + 0x3bfc: 0x40466c20, 0x3bfd: 0x40466e20, 0x3bfe: 0x40467020, 0x3bff: 0x40467220, + // Block 0xf0, offset 0x3c00 + 0x3c00: 0x40467420, 0x3c01: 0x40467620, 0x3c02: 0x40467820, 0x3c03: 0x40467a20, + 0x3c04: 0x8209233e, + 0x3c0e: 0x40031020, 0x3c0f: 0x40031220, + 0x3c10: 0xe000018b, 0x3c11: 0xe000021c, 0x3c12: 0xe0000337, 0x3c13: 0xe0000411, + 0x3c14: 0xe00004e6, 0x3c15: 0xe00005b0, 0x3c16: 0xe000067b, 0x3c17: 0xe0000723, + 0x3c18: 0xe00007cf, 0x3c19: 0xe0000874, + 0x3c20: 0xae600000, 0x3c21: 0xae600000, 0x3c22: 0xae600000, 0x3c23: 0xae600000, + 0x3c24: 0xae600000, 0x3c25: 0xae600000, 0x3c26: 0xae600000, 0x3c27: 0xae600000, + 0x3c28: 0xae600000, 0x3c29: 0xae600000, 0x3c2a: 0xae600000, 0x3c2b: 0xae600000, + 0x3c2c: 0xae600000, 0x3c2d: 0xae600000, 0x3c2e: 0xae600000, 0x3c2f: 0xae600000, + 0x3c30: 0xae600000, 0x3c31: 0xae600000, 0x3c32: 0x40404620, 0x3c33: 0x00404684, + 0x3c34: 0x00404684, 0x3c35: 0x00404684, 0x3c36: 0x00404684, 0x3c37: 0x00404684, + 0x3c38: 0x40056e20, 0x3c39: 0x40057020, 0x3c3a: 0x40057220, 0x3c3b: 0x40404820, + // Block 0xf1, offset 0x3c40 + 0x3c40: 0xe00001a9, 0x3c41: 0xe000023d, 0x3c42: 0xe0000355, 0x3c43: 0xe000042f, + 0x3c44: 0xe0000504, 0x3c45: 0xe00005ce, 0x3c46: 0xe0000699, 0x3c47: 0xe0000741, + 0x3c48: 0xe00007ed, 0x3c49: 0xe0000892, 0x3c4a: 0x404dd220, 0x3c4b: 0x404dd420, + 0x3c4c: 0x404dd620, 0x3c4d: 0x404dd820, 0x3c4e: 0x404dda20, 0x3c4f: 0x404ddc20, + 0x3c50: 0x404dde20, 0x3c51: 0x404de020, 0x3c52: 0x404de220, 0x3c53: 0x404de420, + 0x3c54: 0x404de620, 0x3c55: 0x404de820, 0x3c56: 0x404dea20, 0x3c57: 0x404dec20, + 0x3c58: 0x404dee20, 0x3c59: 0x404df020, 0x3c5a: 0x404df220, 0x3c5b: 0x404df420, + 0x3c5c: 0x404df620, 0x3c5d: 0x404df820, 0x3c5e: 0x404dfa20, 0x3c5f: 0x404dfc20, + 0x3c60: 0x404dfe20, 0x3c61: 0x404e0020, 0x3c62: 0x404e0220, 0x3c63: 0x404e0420, + 0x3c64: 0x404e0620, 0x3c65: 0x404e0820, 0x3c66: 0x404e0a20, 0x3c67: 0x404e0c20, + 0x3c68: 0x404e0e20, 0x3c69: 0x404e1020, 0x3c6a: 0x404e1220, 0x3c6b: 0xadc10f02, + 0x3c6c: 0xadc11002, 0x3c6d: 0xadc11102, 0x3c6e: 0x4005f420, 0x3c6f: 0x40032020, + 0x3c70: 0x404d8a20, 0x3c71: 0x404d8c20, 0x3c72: 0x404d8e20, 0x3c73: 0x404d9020, + 0x3c74: 0x404d9220, 0x3c75: 0x404d9420, 0x3c76: 0x404d9620, 0x3c77: 0x404d9820, + 0x3c78: 0x404d9a20, 0x3c79: 0x404d9c20, 0x3c7a: 0x404d9e20, 0x3c7b: 0x404da020, + 0x3c7c: 0x404da220, 0x3c7d: 0x404da420, 0x3c7e: 0x404da620, 0x3c7f: 0x404da820, + // Block 0xf2, offset 0x3c80 + 0x3c80: 0x404daa20, 0x3c81: 0x404dac20, 0x3c82: 0x404dae20, 0x3c83: 0x404db020, + 0x3c84: 0x404db220, 0x3c85: 0x404db420, 0x3c86: 0x404db620, 0x3c87: 0x404db820, + 0x3c88: 0x404dba20, 0x3c89: 0x404dbc20, 0x3c8a: 0x404dbe20, 0x3c8b: 0x404dc020, + 0x3c8c: 0x404dc220, 0x3c8d: 0x404dc420, 0x3c8e: 0x404dc620, 0x3c8f: 0x404dc820, + 0x3c90: 0x404dca20, 0x3c91: 0x404dcc20, 0x3c92: 0x404dce20, 0x3c93: 0x820926e8, + 0x3c9f: 0x40038420, + 0x3ca0: 0x40636a20, 0x3ca1: 0x40636c20, 0x3ca2: 0x40636e20, 0x3ca3: 0x40637020, + 0x3ca4: 0x40637220, 0x3ca5: 0x40637420, 0x3ca6: 0x40637620, 0x3ca7: 0x40637820, + 0x3ca8: 0x40637a20, 0x3ca9: 0x40637c20, 0x3caa: 0x40637e20, 0x3cab: 0x40638020, + 0x3cac: 0x40638220, 0x3cad: 0x40638420, 0x3cae: 0x40638620, 0x3caf: 0x40638820, + 0x3cb0: 0x40638a20, 0x3cb1: 0x40638c20, 0x3cb2: 0x40638e20, 0x3cb3: 0x40639020, + 0x3cb4: 0x40639220, 0x3cb5: 0x40639420, 0x3cb6: 0x40639620, 0x3cb7: 0x40639820, + 0x3cb8: 0x40639a20, 0x3cb9: 0x40639c20, 0x3cba: 0x40639e20, 0x3cbb: 0x4063a020, + 0x3cbc: 0x4063a220, + // Block 0xf3, offset 0x3cc0 + 0x3cc0: 0xa000f202, 0x3cc1: 0xa000f302, 0x3cc2: 0xa000f802, 0x3cc3: 0xa000f402, + 0x3cc4: 0x4052b220, 0x3cc5: 0x4052b420, 0x3cc6: 0x4052b620, 0x3cc7: 0x4052b820, + 0x3cc8: 0x4052ba20, 0x3cc9: 0x4052bc20, 0x3cca: 0x4052be20, 0x3ccb: 0x4052c020, + 0x3ccc: 0x4052c220, 0x3ccd: 0x4052c420, 0x3cce: 0x4052c620, 0x3ccf: 0x4052c820, + 0x3cd0: 0x4052ca20, 0x3cd1: 0x4052cc20, 0x3cd2: 0x4052ce20, 0x3cd3: 0x4052d020, + 0x3cd4: 0x4052d220, 0x3cd5: 0x4052d420, 0x3cd6: 0x4052d620, 0x3cd7: 0x4052d820, + 0x3cd8: 0x4052da20, 0x3cd9: 0x4052dc20, 0x3cda: 0x4052de20, 0x3cdb: 0x4052e020, + 0x3cdc: 0x4052e220, 0x3cdd: 0x4052e420, 0x3cde: 0x4052e620, 0x3cdf: 0x4052e820, + 0x3ce0: 0x4052ea20, 0x3ce1: 0x4052ec20, 0x3ce2: 0x4052ee20, 0x3ce3: 0x4052f020, + 0x3ce4: 0x4052f220, 0x3ce5: 0x4052f420, 0x3ce6: 0x4052f620, 0x3ce7: 0x4052f820, + 0x3ce8: 0x4052fa20, 0x3ce9: 0x4052fc20, 0x3cea: 0x4052fe20, 0x3ceb: 0x40530220, + 0x3cec: 0x00530284, 0x3ced: 0x40530620, 0x3cee: 0x40530820, 0x3cef: 0x40530a20, + 0x3cf0: 0x40530c20, 0x3cf1: 0x40530e20, 0x3cf2: 0x40531020, 0x3cf3: 0xa070f102, + 0x3cf4: 0x40531220, 0x3cf5: 0x40532420, 0x3cf6: 0x40531620, 0x3cf7: 0x40531820, + 0x3cf8: 0x40531a20, 0x3cf9: 0x40531c20, 0x3cfa: 0x40532020, 0x3cfb: 0x40532220, + 0x3cfc: 0x40531420, 0x3cfd: 0x40531e20, 0x3cfe: 0x40530020, 0x3cff: 0x40530420, + // Block 0xf4, offset 0x3d00 + 0x3d00: 0x82092993, 0x3d01: 0x40036e20, 0x3d02: 0x40037020, 0x3d03: 0x40037220, + 0x3d04: 0x40037420, 0x3d05: 0x40037620, 0x3d06: 0x40037820, 0x3d07: 0x4002b020, + 0x3d08: 0x40033620, 0x3d09: 0x40033820, 0x3d0a: 0x40037a20, 0x3d0b: 0x40037c20, + 0x3d0c: 0x40037e20, 0x3d0d: 0x40038020, 0x3d0f: 0x4027c020, + 0x3d10: 0xe00001c1, 0x3d11: 0xe0000255, 0x3d12: 0xe000036d, 0x3d13: 0xe0000447, + 0x3d14: 0xe000051c, 0x3d15: 0xe00005e6, 0x3d16: 0xe00006b1, 0x3d17: 0xe0000759, + 0x3d18: 0xe0000805, 0x3d19: 0xe00008aa, + 0x3d1e: 0x4005f620, 0x3d1f: 0x4005f820, + // Block 0xf5, offset 0x3d40 + 0x3d40: 0x40519c20, 0x3d41: 0x40519e20, 0x3d42: 0x4051a020, 0x3d43: 0x4051a220, + 0x3d44: 0x4051a420, 0x3d45: 0x4051a620, 0x3d46: 0x4051a820, 0x3d47: 0x4051aa20, + 0x3d48: 0x4051ac20, 0x3d49: 0x4051ae20, 0x3d4a: 0x4051b020, 0x3d4b: 0x4051b220, + 0x3d4c: 0x4051b420, 0x3d4d: 0x4051b620, 0x3d4e: 0x4051b820, 0x3d4f: 0x4051ba20, + 0x3d50: 0x4051bc20, 0x3d51: 0x4051be20, 0x3d52: 0x4051c020, 0x3d53: 0x4051c220, + 0x3d54: 0x4051c420, 0x3d55: 0x4051c620, 0x3d56: 0x4051c820, 0x3d57: 0x4051ca20, + 0x3d58: 0x4051cc20, 0x3d59: 0x4051ce20, 0x3d5a: 0x4051d020, 0x3d5b: 0x4051d220, + 0x3d5c: 0x4051d420, 0x3d5d: 0x4051d620, 0x3d5e: 0x4051d820, 0x3d5f: 0x4051da20, + 0x3d60: 0x4051dc20, 0x3d61: 0x4051de20, 0x3d62: 0x4051e020, 0x3d63: 0x4051e220, + 0x3d64: 0x4051e420, 0x3d65: 0x4051e620, 0x3d66: 0x4051e820, 0x3d67: 0x4051ea20, + 0x3d68: 0x4051ec20, 0x3d69: 0x4051f620, 0x3d6a: 0x4051f820, 0x3d6b: 0x4051fa20, + 0x3d6c: 0x4051fc20, 0x3d6d: 0x4051fe20, 0x3d6e: 0x40520020, 0x3d6f: 0x40520220, + 0x3d70: 0x40520420, 0x3d71: 0x40520620, 0x3d72: 0x40520820, 0x3d73: 0x4051ee20, + 0x3d74: 0x4051f020, 0x3d75: 0x4051f220, 0x3d76: 0x4051f420, + // Block 0xf6, offset 0x3d80 + 0x3d80: 0x40520a20, 0x3d81: 0x40520c20, 0x3d82: 0x40520e20, 0x3d83: 0x40521020, + 0x3d84: 0x40521220, 0x3d85: 0x40521420, 0x3d86: 0x40521620, 0x3d87: 0x40521820, + 0x3d88: 0x40521a20, 0x3d89: 0x40521c20, 0x3d8a: 0x40521e20, 0x3d8b: 0x40522020, + 0x3d8c: 0x40522220, 0x3d8d: 0x40522420, + 0x3d90: 0xe00001bb, 0x3d91: 0xe000024f, 0x3d92: 0xe0000367, 0x3d93: 0xe0000441, + 0x3d94: 0xe0000516, 0x3d95: 0xe00005e0, 0x3d96: 0xe00006ab, 0x3d97: 0xe0000753, + 0x3d98: 0xe00007ff, 0x3d99: 0xe00008a4, + 0x3d9c: 0x4005fa20, 0x3d9d: 0x40033a20, 0x3d9e: 0x40033c20, 0x3d9f: 0x40033e20, + 0x3da0: 0x404e2020, 0x3da1: 0x404e2c20, 0x3da2: 0x404e3020, 0x3da3: 0x404e3420, + 0x3da4: 0x404e3e20, 0x3da5: 0x404e4620, 0x3da6: 0x404e4c20, 0x3da7: 0x404e5020, + 0x3da8: 0x404e5420, 0x3da9: 0x404e5820, 0x3daa: 0x404e6820, 0x3dab: 0x404e6e20, + 0x3dac: 0x404ea820, 0x3dad: 0x404eae20, 0x3dae: 0x404eb220, 0x3daf: 0x404e7a20, + 0x3db0: 0x4027c220, 0x3db1: 0x404eb420, 0x3db2: 0x404e3820, 0x3db3: 0x404e8e20, + 0x3db4: 0x404f3a20, 0x3db5: 0x404f3c20, 0x3db6: 0x404f3e20, 0x3db7: 0x4007ac20, + 0x3db8: 0x4007ae20, 0x3db9: 0x4007b020, 0x3dba: 0x404e9020, 0x3dbb: 0x404f3820, + // Block 0xf7, offset 0x3dc0 + 0x3dc0: 0x4049f020, 0x3dc1: 0x4049f220, 0x3dc2: 0x4049f420, 0x3dc3: 0x4049f620, + 0x3dc4: 0x4049f820, 0x3dc5: 0x4049fa20, 0x3dc6: 0x4049fc20, 0x3dc7: 0x4049fe20, + 0x3dc8: 0x404a0020, 0x3dc9: 0x404a0220, 0x3dca: 0x404a0420, 0x3dcb: 0x404a0620, + 0x3dcc: 0x404a0820, 0x3dcd: 0x404a0a20, 0x3dce: 0x404a0c20, 0x3dcf: 0x404a0e20, + 0x3dd0: 0x404a1020, 0x3dd1: 0x404a1220, 0x3dd2: 0x404a1420, 0x3dd3: 0x404a1620, + 0x3dd4: 0x404a1820, 0x3dd5: 0x404a1a20, 0x3dd6: 0x404a1c20, 0x3dd7: 0x404a1e20, + 0x3dd8: 0x404a2020, 0x3dd9: 0x404a2220, 0x3dda: 0x404a2420, 0x3ddb: 0x404a2620, + 0x3ddc: 0x404a2820, 0x3ddd: 0x404a2a20, 0x3dde: 0x404a2c20, 0x3ddf: 0x404a2e20, + 0x3de0: 0x404a3020, 0x3de1: 0x404a3220, 0x3de2: 0x404a3420, 0x3de3: 0x404a3620, + 0x3de4: 0x404a3820, 0x3de5: 0x404a3a20, 0x3de6: 0x404a3c20, 0x3de7: 0x404a3e20, + 0x3de8: 0x404a4020, 0x3de9: 0x404a4220, 0x3dea: 0x404a4420, 0x3deb: 0x404a4620, + 0x3dec: 0x404a4820, 0x3ded: 0x404a4a20, 0x3dee: 0x404a4c20, 0x3def: 0x404a4e20, + 0x3df0: 0x82e62528, 0x3df1: 0x404a5220, 0x3df2: 0x82e6252a, 0x3df3: 0x82e6252b, + 0x3df4: 0x82dc252c, 0x3df5: 0xc20e0671, 0x3df6: 0xc23f0671, 0x3df7: 0x82e6252f, + 0x3df8: 0x82e62530, 0x3df9: 0xc2700671, 0x3dfa: 0x404a6420, 0x3dfb: 0xc2a10671, + 0x3dfc: 0xc2d20671, 0x3dfd: 0x404a6a20, 0x3dfe: 0x82e62536, 0x3dff: 0xae610c02, + // Block 0xf8, offset 0x3e00 + 0x3e00: 0x404a6e20, 0x3e01: 0xae610d02, 0x3e02: 0x404a7020, + 0x3e1b: 0x404a7220, + 0x3e1c: 0x404a7420, 0x3e1d: 0x4027c420, 0x3e1e: 0x40057e20, 0x3e1f: 0x40058020, + 0x3e20: 0x40456420, 0x3e21: 0x40456620, 0x3e22: 0x40456820, 0x3e23: 0x40456a20, + 0x3e24: 0x40456c20, 0x3e25: 0x40456e20, 0x3e26: 0x40457020, 0x3e27: 0x40457220, + 0x3e28: 0x40457420, 0x3e29: 0x40457620, 0x3e2a: 0x40457820, 0x3e2b: 0x40458a20, + 0x3e2c: 0x40458c20, 0x3e2d: 0x40458e20, 0x3e2e: 0x40459020, 0x3e2f: 0x40459220, + 0x3e30: 0x40034020, 0x3e31: 0x4002dc20, 0x3e32: 0x40452c20, 0x3e33: 0x4027c620, + 0x3e34: 0x4027c820, 0x3e35: 0x40459420, 0x3e36: 0x820922d4, + // Block 0xf9, offset 0x3e40 + 0x3e41: 0x403cae20, 0x3e42: 0x403cb020, 0x3e43: 0x403cb220, + 0x3e44: 0x403cb420, 0x3e45: 0x403cb620, 0x3e46: 0x403cb820, + 0x3e49: 0x403e3c20, 0x3e4a: 0x403e3e20, 0x3e4b: 0x403e4020, + 0x3e4c: 0x403e4220, 0x3e4d: 0x403e4420, 0x3e4e: 0x403e4620, + 0x3e51: 0x403dfe20, 0x3e52: 0x403e0020, 0x3e53: 0x403e0220, + 0x3e54: 0x403e0420, 0x3e55: 0x403e0620, 0x3e56: 0x403e0820, + 0x3e60: 0x403ec220, 0x3e61: 0x403ec420, 0x3e62: 0x403ec620, 0x3e63: 0x403ec820, + 0x3e64: 0x403eca20, 0x3e65: 0x403ecc20, 0x3e66: 0x403ece20, + 0x3e68: 0x403ef220, 0x3e69: 0x403ef420, 0x3e6a: 0x403ef620, 0x3e6b: 0x403ef820, + 0x3e6c: 0x403efa20, 0x3e6d: 0x403efc20, 0x3e6e: 0x403efe20, + // Block 0xfa, offset 0x3e80 + 0x3e80: 0x40452e20, 0x3e81: 0x40453020, 0x3e82: 0x40453220, 0x3e83: 0x40453420, + 0x3e84: 0x40453620, 0x3e85: 0x40453820, 0x3e86: 0x40453a20, 0x3e87: 0x40453c20, + 0x3e88: 0x40453e20, 0x3e89: 0x40454020, 0x3e8a: 0x40454220, 0x3e8b: 0x40454420, + 0x3e8c: 0x40454620, 0x3e8d: 0x40454820, 0x3e8e: 0x40454a20, 0x3e8f: 0x40454c20, + 0x3e90: 0x40454e20, 0x3e91: 0x40455020, 0x3e92: 0x40455220, 0x3e93: 0x40455420, + 0x3e94: 0x40455620, 0x3e95: 0x40455820, 0x3e96: 0x40455a20, 0x3e97: 0x40455c20, + 0x3e98: 0x40455e20, 0x3e99: 0x40456020, 0x3e9a: 0x40456220, 0x3e9b: 0x40459620, + 0x3e9c: 0x40459820, 0x3e9d: 0x40459a20, 0x3e9e: 0x40459c20, 0x3e9f: 0x40459e20, + 0x3ea0: 0x4045a020, 0x3ea1: 0x4045a220, 0x3ea2: 0x4045a420, 0x3ea3: 0x40457a20, + 0x3ea4: 0x40457c20, 0x3ea5: 0x40457e20, 0x3ea6: 0x40458020, 0x3ea7: 0x40458220, + 0x3ea8: 0x40458420, 0x3ea9: 0x40458620, 0x3eaa: 0x40458820, 0x3eab: 0x40034220, + 0x3eac: 0xa000fa02, 0x3ead: 0x820922d3, + 0x3eb0: 0xe0000188, 0x3eb1: 0xe0000219, 0x3eb2: 0xe0000334, 0x3eb3: 0xe000040e, + 0x3eb4: 0xe00004e3, 0x3eb5: 0xe00005ad, 0x3eb6: 0xe0000678, 0x3eb7: 0xe0000720, + 0x3eb8: 0xe00007cc, 0x3eb9: 0xe0000871, + // Block 0xfb, offset 0x3ec0 + 0x3ef0: 0x40643620, 0x3ef1: 0x40643820, 0x3ef2: 0x40643a20, 0x3ef3: 0x40643c20, + 0x3ef4: 0x40643e20, 0x3ef5: 0x40644020, 0x3ef6: 0x40644220, 0x3ef7: 0x40644420, + 0x3ef8: 0x40644620, 0x3ef9: 0x40644820, 0x3efa: 0x40644a20, 0x3efb: 0x40644c20, + 0x3efc: 0x40644e20, 0x3efd: 0x40645020, 0x3efe: 0x40645220, 0x3eff: 0x40645420, + // Block 0xfc, offset 0x3f00 + 0x3f00: 0x40645620, 0x3f01: 0x40645820, 0x3f02: 0x40645a20, 0x3f03: 0x40645c20, + 0x3f04: 0x40645e20, 0x3f05: 0x40646020, 0x3f06: 0x40646220, + 0x3f0b: 0x40651420, + 0x3f0c: 0x40651620, 0x3f0d: 0x40651820, 0x3f0e: 0x40651a20, 0x3f0f: 0x40651c20, + 0x3f10: 0x40651e20, 0x3f11: 0x40652020, 0x3f12: 0x40652220, 0x3f13: 0x40652420, + 0x3f14: 0x40652620, 0x3f15: 0x40652820, 0x3f16: 0x40652a20, 0x3f17: 0x40652c20, + 0x3f18: 0x40652e20, 0x3f19: 0x40653020, 0x3f1a: 0x40653220, 0x3f1b: 0x40653420, + 0x3f1c: 0x40653620, 0x3f1d: 0x40653820, 0x3f1e: 0x40653a20, 0x3f1f: 0x40653c20, + 0x3f20: 0x40653e20, 0x3f21: 0x40654020, 0x3f22: 0x40654220, 0x3f23: 0x40654420, + 0x3f24: 0x40654620, 0x3f25: 0x40654820, 0x3f26: 0x40654a20, 0x3f27: 0x40654c20, + 0x3f28: 0x40654e20, 0x3f29: 0x40655020, 0x3f2a: 0x40655220, 0x3f2b: 0x40655420, + 0x3f2c: 0x40655620, 0x3f2d: 0x40655820, 0x3f2e: 0x40655a20, 0x3f2f: 0x40655c20, + 0x3f30: 0x40655e20, 0x3f31: 0x40656020, 0x3f32: 0x40656220, 0x3f33: 0x40656420, + 0x3f34: 0x40656620, 0x3f35: 0x40656820, 0x3f36: 0x40656a20, 0x3f37: 0x40656c20, + 0x3f38: 0x40656e20, 0x3f39: 0x40657020, 0x3f3a: 0x40657220, 0x3f3b: 0x40657420, + // Block 0xfd, offset 0x3f40 + 0x3f40: 0x43189020, 0x3f41: 0x42cde820, 0x3f42: 0x431d9420, 0x3f43: 0x43199020, + 0x3f44: 0x42dda220, 0x3f45: 0x429c6420, 0x3f46: 0x42a7ca20, 0x3f47: 0x433f3820, + 0x3f48: 0x433f3820, 0x3f49: 0x42b2a220, 0x3f4a: 0x4323a220, 0x3f4b: 0x42ab0e20, + 0x3f4c: 0x42b29020, 0x3f4d: 0x42c3ec20, 0x3f4e: 0x42ecd220, 0x3f4f: 0x42ff0a20, + 0x3f50: 0x430c7e20, 0x3f51: 0x430f7420, 0x3f52: 0x4311f020, 0x3f53: 0x43211e20, + 0x3f54: 0x42d40420, 0x3f55: 0x42da3620, 0x3f56: 0x42e1b220, 0x3f57: 0x42e7bc20, + 0x3f58: 0x43087a20, 0x3f59: 0x4322d420, 0x3f5a: 0x4333e220, 0x3f5b: 0x429d0420, + 0x3f5c: 0x42a6ea20, 0x3f5d: 0x42d60820, 0x3f5e: 0x42e43620, 0x3f5f: 0x430c5a20, + 0x3f60: 0x433c3c20, 0x3f61: 0x42baa020, 0x3f62: 0x42dfd620, 0x3f63: 0x430b9a20, + 0x3f64: 0x4312c820, 0x3f65: 0x42c59220, 0x3f66: 0x4303b020, 0x3f67: 0x43103e20, + 0x3f68: 0x42bd9420, 0x3f69: 0x42ce2e20, 0x3f6a: 0x42dad420, 0x3f6b: 0x42e5f820, + 0x3f6c: 0x43219c20, 0x3f6d: 0x429f0c20, 0x3f6e: 0x42a36e20, 0x3f6f: 0x42a5bc20, + 0x3f70: 0x42c98820, 0x3f71: 0x42d5a620, 0x3f72: 0x42e42020, 0x3f73: 0x42edce20, + 0x3f74: 0x43000220, 0x3f75: 0x430c0c20, 0x3f76: 0x430cb820, 0x3f77: 0x431bde20, + 0x3f78: 0x432e6420, 0x3f79: 0x4336de20, 0x3f7a: 0x433bf420, 0x3f7b: 0x42f11820, + 0x3f7c: 0x42f2fe20, 0x3f7d: 0x42fb4020, 0x3f7e: 0x43079220, 0x3f7f: 0x43260820, + // Block 0xfe, offset 0x3f80 + 0x3f80: 0x433cfe20, 0x3f81: 0x4315ac20, 0x3f82: 0x42b1be20, 0x3f83: 0x42be0820, + 0x3f84: 0x42f8c020, 0x3f85: 0x4300fc20, 0x3f86: 0x42e4c420, 0x3f87: 0x42f19420, + 0x3f88: 0x43198420, 0x3f89: 0x432dee20, 0x3f8a: 0x42b1b020, 0x3f8b: 0x42b8c420, + 0x3f8c: 0x42d42620, 0x3f8d: 0x42dbb420, 0x3f8e: 0x42de1e20, 0x3f8f: 0x42fa5e20, + 0x3f90: 0x42fc6e20, 0x3f91: 0x432c9620, 0x3f92: 0x42a5a420, 0x3f93: 0x43011620, + 0x3f94: 0x42a3b820, 0x3f95: 0x42a39820, 0x3f96: 0x42f43820, 0x3f97: 0x42fb7c20, + 0x3f98: 0x4307e220, 0x3f99: 0x432cea20, 0x3f9a: 0x43170020, 0x3f9b: 0x42c59e20, + 0x3f9c: 0x42d40420, 0x3f9d: 0x4315fc20, 0x3f9e: 0x429c7220, 0x3f9f: 0x42b7ce20, + 0x3fa0: 0x42c02420, 0x3fa1: 0x42e70e20, 0x3fa2: 0x42eae020, 0x3fa3: 0x42a62e20, + 0x3fa4: 0x42f1f620, 0x3fa5: 0x429f7e20, 0x3fa6: 0x42bf5220, 0x3fa7: 0x429c1a20, + 0x3fa8: 0x42d99820, 0x3fa9: 0x42caf020, 0x3faa: 0x42fa4420, 0x3fab: 0x42a78620, + 0x3fac: 0x42b0bc20, 0x3fad: 0x42ee0220, 0x3fae: 0x43089220, 0x3faf: 0x43155420, + 0x3fb0: 0x42d77420, 0x3fb1: 0x431f6020, 0x3fb2: 0x42d91020, 0x3fb3: 0x42c5fc20, + 0x3fb4: 0x4305ca20, 0x3fb5: 0x42c74020, 0x3fb6: 0x42eaca20, 0x3fb7: 0x429d5c20, + 0x3fb8: 0x42a2d220, 0x3fb9: 0x42a39220, 0x3fba: 0x42d10220, 0x3fbb: 0x42f9ce20, + 0x3fbc: 0x4304de20, 0x3fbd: 0x4315a420, 0x3fbe: 0x43239e20, 0x3fbf: 0x42a5ea20, + // Block 0xff, offset 0x3fc0 + 0x3fc0: 0x42a88420, 0x3fc1: 0x42b2e620, 0x3fc2: 0x42bdd820, 0x3fc3: 0x42cb8a20, + 0x3fc4: 0x42dffc20, 0x3fc5: 0x42f25420, 0x3fc6: 0x432b5a20, 0x3fc7: 0x4334d420, + 0x3fc8: 0x433d2e20, 0x3fc9: 0x433d9c20, 0x3fca: 0x42a53620, 0x3fcb: 0x42cd8c20, + 0x3fcc: 0x42d6ee20, 0x3fcd: 0x431ec420, 0x3fce: 0x42bce820, 0x3fcf: 0x42c32020, + 0x3fd0: 0x42c40020, 0x3fd1: 0x42c93420, 0x3fd2: 0x42de4620, 0x3fd3: 0x42e29220, + 0x3fd4: 0x42e91220, 0x3fd5: 0x42f39420, 0x3fd6: 0x42fbe820, 0x3fd7: 0x4300de20, + 0x3fd8: 0x431e4c20, 0x3fd9: 0x4309dc20, 0x3fda: 0x43204620, 0x3fdb: 0x43269420, + 0x3fdc: 0x42a42e20, 0x3fdd: 0x42a54620, 0x3fde: 0x42a97a20, 0x3fdf: 0x42e19020, + 0x3fe0: 0x43118420, 0x3fe1: 0x43155420, 0x3fe2: 0x42bd9220, 0x3fe3: 0x42bfea20, + 0x3fe4: 0x42c6f620, 0x3fe5: 0x42d75c20, 0x3fe6: 0x42f87c20, 0x3fe7: 0x42e6ea20, + 0x3fe8: 0x429dc820, 0x3fe9: 0x42adf220, 0x3fea: 0x42b7ce20, 0x3feb: 0x42bb7420, + 0x3fec: 0x42c03820, 0x3fed: 0x42e76420, 0x3fee: 0x42e8d220, 0x3fef: 0x42ff3420, + 0x3ff0: 0x43008c20, 0x3ff1: 0x43246820, 0x3ff2: 0x432dec20, 0x3ff3: 0x432e9020, + 0x3ff4: 0x43303020, 0x3ff5: 0x429f1620, 0x3ff6: 0x42f35c20, 0x3ff7: 0x43236820, + 0x3ff8: 0x432d7020, 0x3ff9: 0x42c1c220, 0x3ffa: 0x429d0c20, 0x3ffb: 0x42a1b420, + 0x3ffc: 0x42b7dc20, 0x3ffd: 0x42b87e20, 0x3ffe: 0x42cb3220, 0x3fff: 0x42d40420, + // Block 0x100, offset 0x4000 + 0x4000: 0x42e39c20, 0x4001: 0x42ec8420, 0x4002: 0x4309f820, 0x4003: 0x4320f820, + 0x4004: 0x433f1a20, 0x4005: 0x42cd1020, 0x4006: 0x432c5c20, 0x4007: 0x42a51220, + 0x4008: 0x42cef620, 0x4009: 0x42cfe620, 0x400a: 0x42da8220, 0x400b: 0x42dd3820, + 0x400c: 0x42e81220, 0x400d: 0x42eab220, 0x400e: 0x42f0d620, 0x400f: 0x42fa2020, + 0x4010: 0x4330bc20, 0x4011: 0x42a2da20, 0x4012: 0x42c45c20, 0x4013: 0x432cf020, + 0x4014: 0x42a05620, 0x4015: 0x42ba3220, 0x4016: 0x42dbd420, 0x4017: 0x431e5420, + 0x4018: 0x42bf1620, 0x4019: 0x42c28820, 0x401a: 0x42d02e20, 0x401b: 0x42e70e20, + 0x401c: 0x432d0c20, 0x401d: 0x42a45220, 0x401e: 0x42a81e20, 0x401f: 0x42b8ca20, + 0x4020: 0x42cc2620, 0x4021: 0x42ce9c20, 0x4022: 0x42d15020, 0x4023: 0x42d9ca20, + 0x4024: 0x42e80c20, 0x4025: 0x42ebc420, 0x4026: 0x42fef220, 0x4027: 0x43119e20, + 0x4028: 0x4311c220, 0x4029: 0x43239820, 0x402a: 0x432dc420, 0x402b: 0x42a67e20, + 0x402c: 0x42dd7420, 0x402d: 0x42a83a20, 0x402e: 0x42e3a020, 0x402f: 0x42e93020, + 0x4030: 0x430bf420, 0x4031: 0x432d4620, 0x4032: 0x4338ae20, 0x4033: 0x433d3e20, + 0x4034: 0x42cf2e20, 0x4035: 0x42db9620, 0x4036: 0x4303d020, 0x4037: 0x42f59620, + 0x4038: 0x42f64020, 0x4039: 0x42f92420, 0x403a: 0x42e58020, 0x403b: 0x42e13220, + 0x403c: 0x4316b020, 0x403d: 0x429d8020, 0x403e: 0x43066c20, 0x403f: 0x42a47420, + // Block 0x101, offset 0x4040 + 0x4040: 0x42a40e20, 0x4041: 0x42bd4c20, 0x4042: 0x42c5a620, 0x4043: 0x42f9ac20, + 0x4044: 0x42b70a20, 0x4045: 0x42da3c20, 0x4046: 0x42cd6820, 0x4047: 0x431e7620, + 0x4048: 0x43109820, 0x4049: 0x432c9a20, 0x404a: 0x43131620, 0x404b: 0x42bda620, + 0x404c: 0x42a28020, 0x404d: 0x42ab8020, 0x404e: 0x43f41c20, 0x404f: 0x43f41e20, + 0x4050: 0x42b0b420, 0x4051: 0x43f42220, 0x4052: 0x42cce820, 0x4053: 0x43f42620, + 0x4054: 0x43f42820, 0x4055: 0x42a3bc20, 0x4056: 0x42e65420, 0x4057: 0x42ed9420, + 0x4058: 0x42f27820, 0x4059: 0x42f2bc20, 0x405a: 0x42f2ca20, 0x405b: 0x42f31e20, + 0x405c: 0x432eac20, 0x405d: 0x42f97c20, 0x405e: 0x42ff7a20, 0x405f: 0x43f43e20, + 0x4060: 0x430c2420, 0x4061: 0x43f44220, 0x4062: 0x4315f020, 0x4063: 0x43f44620, + 0x4064: 0x43f44820, 0x4065: 0x43207020, 0x4066: 0x4321fa20, 0x4067: 0x43f44e20, + 0x4068: 0x43f45020, 0x4069: 0x43f45220, 0x406a: 0x4331de20, 0x406b: 0x4331f820, + 0x406c: 0x43325020, 0x406d: 0x433b6820, 0x406e: 0x4321bc20, 0x406f: 0x432d6e20, + 0x4070: 0x429f5c20, 0x4071: 0x42a1ce20, 0x4072: 0x42a29a20, 0x4073: 0x42a59220, + 0x4074: 0x42a5c820, 0x4075: 0x42a6a220, 0x4076: 0x42ab3a20, 0x4077: 0x42ac0c20, + 0x4078: 0x42acd020, 0x4079: 0x42b08020, 0x407a: 0x42b15020, 0x407b: 0x42b8c820, + 0x407c: 0x42b8dc20, 0x407d: 0x42c12820, 0x407e: 0x42c2d020, 0x407f: 0x42c31c20, + // Block 0x102, offset 0x4080 + 0x4080: 0x42c3e420, 0x4081: 0x42ca9e20, 0x4082: 0x42cbc420, 0x4083: 0x42cd2220, + 0x4084: 0x42d10a20, 0x4085: 0x42daee20, 0x4086: 0x42dc3420, 0x4087: 0x42de4420, + 0x4088: 0x42e2dc20, 0x4089: 0x42e45620, 0x408a: 0x42e84420, 0x408b: 0x42f12220, + 0x408c: 0x42f27c20, 0x408d: 0x42f29220, 0x408e: 0x42f29020, 0x408f: 0x42f2a020, + 0x4090: 0x42f2ac20, 0x4091: 0x42f2ba20, 0x4092: 0x42f31a20, 0x4093: 0x42f31c20, + 0x4094: 0x42f48020, 0x4095: 0x42f50220, 0x4096: 0x42f78020, 0x4097: 0x42fbe820, + 0x4098: 0x42fc1220, 0x4099: 0x42fc8220, 0x409a: 0x42fee420, 0x409b: 0x43000a20, + 0x409c: 0x4303da20, 0x409d: 0x4304f220, 0x409e: 0x4304f220, 0x409f: 0x4308ae20, + 0x40a0: 0x43122020, 0x40a1: 0x43132c20, 0x40a2: 0x43160220, 0x40a3: 0x43167220, + 0x40a4: 0x4319a620, 0x40a5: 0x431a1020, 0x40a6: 0x431f6c20, 0x40a7: 0x43207020, + 0x40a8: 0x432dc620, 0x40a9: 0x432ffe20, 0x40aa: 0x43307620, 0x40ab: 0x42c0ea20, + 0x40ac: 0x4885dc20, 0x40ad: 0x43043020, + 0x40b0: 0x429c4c20, 0x40b1: 0x42a36a20, 0x40b2: 0x42a2d020, 0x40b3: 0x429f0020, + 0x40b4: 0x42a28a20, 0x40b5: 0x42a30020, 0x40b6: 0x42a58e20, 0x40b7: 0x42a5f420, + 0x40b8: 0x42ab3a20, 0x40b9: 0x42aaaa20, 0x40ba: 0x42ab3220, 0x40bb: 0x42abc420, + 0x40bc: 0x42b0b420, 0x40bd: 0x42b16620, 0x40be: 0x42b28820, 0x40bf: 0x42b2a820, + // Block 0x103, offset 0x40c0 + 0x40c0: 0x42b4c420, 0x40c1: 0x42b65020, 0x40c2: 0x42bda420, 0x40c3: 0x42bdb220, + 0x40c4: 0x42bed220, 0x40c5: 0x42bf5a20, 0x40c6: 0x42c1b020, 0x40c7: 0x42c29c20, + 0x40c8: 0x42c21020, 0x40c9: 0x42c31c20, 0x40ca: 0x42c2c020, 0x40cb: 0x42c3e420, + 0x40cc: 0x42c46820, 0x40cd: 0x42c78820, 0x40ce: 0x42c83820, 0x40cf: 0x42c8a420, + 0x40d0: 0x42caac20, 0x40d1: 0x42cce820, 0x40d2: 0x42ce2e20, 0x40d3: 0x42ce3620, + 0x40d4: 0x42ceac20, 0x40d5: 0x42d6f220, 0x40d6: 0x42d77420, 0x40d7: 0x42da8220, + 0x40d8: 0x42ddb620, 0x40d9: 0x42dd9620, 0x40da: 0x42de4420, 0x40db: 0x42e03c20, + 0x40dc: 0x42e2dc20, 0x40dd: 0x42ef4e20, 0x40de: 0x42e46a20, 0x40df: 0x42e55e20, + 0x40e0: 0x42e65420, 0x40e1: 0x42e8e220, 0x40e2: 0x42ea0c20, 0x40e3: 0x42ea7620, + 0x40e4: 0x42ec3a20, 0x40e5: 0x42ec3e20, 0x40e6: 0x42ed9420, 0x40e7: 0x42edb620, + 0x40e8: 0x42ede820, 0x40e9: 0x42ee9420, 0x40ea: 0x42ee8020, 0x40eb: 0x42f19820, + 0x40ec: 0x42f56220, 0x40ed: 0x42f78020, 0x40ee: 0x42f8f620, 0x40ef: 0x42fab620, + 0x40f0: 0x42fbe820, 0x40f1: 0x42fe7c20, 0x40f2: 0x43000a20, 0x40f3: 0x4306a420, + 0x40f4: 0x4307de20, 0x40f5: 0x430ef220, 0x40f6: 0x43128220, 0x40f7: 0x43130c20, + 0x40f8: 0x43132c20, 0x40f9: 0x43157e20, 0x40fa: 0x4315f020, 0x40fb: 0x43159620, + 0x40fc: 0x43160220, 0x40fd: 0x4315fc20, 0x40fe: 0x4315da20, 0x40ff: 0x43167220, + // Block 0x104, offset 0x4100 + 0x4100: 0x43171420, 0x4101: 0x431a1020, 0x4102: 0x431e7020, 0x4103: 0x4320e420, + 0x4104: 0x43233220, 0x4105: 0x4324ec20, 0x4106: 0x432cf820, 0x4107: 0x432dc620, + 0x4108: 0x432eac20, 0x4109: 0x432fb620, 0x410a: 0x432ffe20, 0x410b: 0x43301620, + 0x410c: 0x43307620, 0x410d: 0x43362420, 0x410e: 0x433f3820, 0x410f: 0x48509420, + 0x4110: 0x48508820, 0x4111: 0x4867aa20, 0x4112: 0x44773a20, 0x4113: 0x44803020, + 0x4114: 0x44807220, 0x4115: 0x48a49220, 0x4116: 0x48b9a020, 0x4117: 0x48fda620, + 0x4118: 0x433e8620, 0x4119: 0x433f1c20, + // Block 0x105, offset 0x4140 + 0x4140: 0xf0000404, 0x4141: 0xf0000404, 0x4142: 0xf0000404, 0x4143: 0xe0000b99, + 0x4144: 0xe0000b9d, 0x4145: 0xe0000f83, 0x4146: 0xf0000404, + 0x4153: 0xf0000404, + 0x4154: 0xf0000404, 0x4155: 0xf0000404, 0x4156: 0xf0000404, 0x4157: 0xf0000404, + 0x415d: 0xe000150b, 0x415e: 0xa1a09602, 0x415f: 0xe0001514, + 0x4160: 0x0038ae85, 0x4161: 0x00389085, 0x4162: 0x00389685, 0x4163: 0x00389885, + 0x4164: 0x0038a485, 0x4165: 0x0038a685, 0x4166: 0x0038a885, 0x4167: 0x0038b685, + 0x4168: 0x0038ba85, 0x4169: 0x00093885, 0x416a: 0xe0001542, 0x416b: 0xe000153f, + 0x416c: 0xe000154c, 0x416d: 0xe0001548, 0x416e: 0xe00014e1, 0x416f: 0xe00014e4, + 0x4170: 0xe00014e7, 0x4171: 0xe00014ea, 0x4172: 0xe00014f0, 0x4173: 0xe00014f3, + 0x4174: 0xe00014f6, 0x4175: 0xe00014fc, 0x4176: 0xe0001505, + 0x4178: 0xe0001508, 0x4179: 0xe000150e, 0x417a: 0xe000151b, 0x417b: 0xe0001518, + 0x417c: 0xe0001521, 0x417e: 0xe0001524, + // Block 0x106, offset 0x4180 + 0x4180: 0xe0001527, 0x4181: 0xe000152a, 0x4183: 0xe0001530, + 0x4184: 0xe000152d, 0x4186: 0xe0001536, 0x4187: 0xe0001539, + 0x4188: 0xe000153c, 0x4189: 0xe0001545, 0x418a: 0xe0001550, 0x418b: 0xe00014f9, + 0x418c: 0xe00014ed, 0x418d: 0xe000151e, 0x418e: 0xe0001533, 0x418f: 0xf0000404, + 0x4190: 0x0039249a, 0x4191: 0x00392499, 0x4192: 0x00393e9a, 0x4193: 0x00393e99, + 0x4194: 0x00393e97, 0x4195: 0x00393e98, 0x4196: 0x0039409a, 0x4197: 0x00394099, + 0x4198: 0x00394097, 0x4199: 0x00394098, 0x419a: 0x0039429a, 0x419b: 0x00394299, + 0x419c: 0x00394297, 0x419d: 0x00394298, 0x419e: 0x00395c9a, 0x419f: 0x00395c99, + 0x41a0: 0x00395c97, 0x41a1: 0x00395c98, 0x41a2: 0x0039629a, 0x41a3: 0x00396299, + 0x41a4: 0x00396297, 0x41a5: 0x00396298, 0x41a6: 0x00395a9a, 0x41a7: 0x00395a99, + 0x41a8: 0x00395a97, 0x41a9: 0x00395a98, 0x41aa: 0x003a049a, 0x41ab: 0x003a0499, + 0x41ac: 0x003a0497, 0x41ad: 0x003a0498, 0x41ae: 0x003a0a9a, 0x41af: 0x003a0a99, + 0x41b0: 0x003a0a97, 0x41b1: 0x003a0a98, 0x41b2: 0x0039689a, 0x41b3: 0x00396899, + 0x41b4: 0x00396897, 0x41b5: 0x00396898, 0x41b6: 0x0039669a, 0x41b7: 0x00396699, + 0x41b8: 0x00396697, 0x41b9: 0x00396698, 0x41ba: 0x00396a9a, 0x41bb: 0x00396a99, + 0x41bc: 0x00396a97, 0x41bd: 0x00396a98, 0x41be: 0x00396e9a, 0x41bf: 0x00396e99, + // Block 0x107, offset 0x41c0 + 0x41c0: 0x00396e97, 0x41c1: 0x00396e98, 0x41c2: 0x0039969a, 0x41c3: 0x00399699, + 0x41c4: 0x0039949a, 0x41c5: 0x00399499, 0x41c6: 0x0039989a, 0x41c7: 0x00399899, + 0x41c8: 0x00398c9a, 0x41c9: 0x00398c99, 0x41ca: 0x0039b69a, 0x41cb: 0x0039b699, + 0x41cc: 0x0039a89a, 0x41cd: 0x0039a899, 0x41ce: 0x003a1c9a, 0x41cf: 0x003a1c99, + 0x41d0: 0x003a1c97, 0x41d1: 0x003a1c98, 0x41d2: 0x003a2a9a, 0x41d3: 0x003a2a99, + 0x41d4: 0x003a2a97, 0x41d5: 0x003a2a98, 0x41d6: 0x003a329a, 0x41d7: 0x003a3299, + 0x41d8: 0x003a3297, 0x41d9: 0x003a3298, 0x41da: 0x003a2e9a, 0x41db: 0x003a2e99, + 0x41dc: 0x003a2e97, 0x41dd: 0x003a2e98, 0x41de: 0x003a589a, 0x41df: 0x003a5899, + 0x41e0: 0x003a5a9a, 0x41e1: 0x003a5a99, 0x41e2: 0x003a5a97, 0x41e3: 0x003a5a98, + 0x41e4: 0xf0001a1a, 0x41e5: 0xf0001919, 0x41e6: 0x003a6c9a, 0x41e7: 0x003a6c99, + 0x41e8: 0x003a6c97, 0x41e9: 0x003a6c98, 0x41ea: 0x003a6a9a, 0x41eb: 0x003a6a99, + 0x41ec: 0x003a6a97, 0x41ed: 0x003a6a98, 0x41ee: 0x003aaa9a, 0x41ef: 0x003aaa99, + 0x41f0: 0xf0001a1a, 0x41f1: 0xf0001919, 0x41f2: 0x40071820, 0x41f3: 0x40071a20, + 0x41f4: 0x40071c20, 0x41f5: 0x40071e20, 0x41f6: 0x40072020, 0x41f7: 0x40072220, + 0x41f8: 0x40072420, 0x41f9: 0x40072620, 0x41fa: 0x40072820, 0x41fb: 0x40072a20, + 0x41fc: 0x40072c20, 0x41fd: 0x40072e20, 0x41fe: 0x40073020, 0x41ff: 0x40073220, + // Block 0x108, offset 0x4200 + 0x4200: 0x40073420, 0x4201: 0x40073620, + 0x4213: 0x003a269a, + 0x4214: 0x003a2699, 0x4215: 0x003a2697, 0x4216: 0x003a2698, 0x4217: 0x003a7c9a, + 0x4218: 0x003a7c99, 0x4219: 0x003a7a9a, 0x421a: 0x003a7a99, 0x421b: 0x003a7e9a, + 0x421c: 0x003a7e99, 0x421d: 0xf0001a1a, 0x421e: 0x003a849a, 0x421f: 0x003a8499, + 0x4220: 0x003a789a, 0x4221: 0x003a7899, 0x4222: 0x003a809a, 0x4223: 0x003a8099, + 0x4224: 0x003a989a, 0x4225: 0x003a9899, 0x4226: 0x003a9897, 0x4227: 0x003a9898, + 0x4228: 0x003a8e97, 0x4229: 0x003a8e98, 0x422a: 0xe0001559, 0x422b: 0xe0001556, + 0x422c: 0xe0001589, 0x422d: 0xe0001586, 0x422e: 0xe000158f, 0x422f: 0xe000158c, + 0x4230: 0xe000159b, 0x4231: 0xe0001598, 0x4232: 0xe0001595, 0x4233: 0xe0001592, + 0x4234: 0xe00015a1, 0x4235: 0xe000159e, 0x4236: 0xe00015bf, 0x4237: 0xe00015bc, + 0x4238: 0xe00015b9, 0x4239: 0xe00015ad, 0x423a: 0xe00015a7, 0x423b: 0xe00015a4, + 0x423c: 0x003a929a, 0x423d: 0x003a9299, 0x423e: 0x003a9297, 0x423f: 0x003a9298, + // Block 0x109, offset 0x4240 + 0x4240: 0xe000155f, 0x4241: 0xe0001565, 0x4242: 0xe000157a, 0x4243: 0xe00015b0, + 0x4244: 0xe00015b6, 0x4245: 0xf0001a1a, 0x4246: 0xf0001a1a, 0x4247: 0xf0001a1a, + 0x4248: 0xf0001a1a, 0x4249: 0xf0001a1a, 0x424a: 0xf0001a1a, 0x424b: 0xf0001a1a, + 0x424c: 0xf0001a1a, 0x424d: 0xf0001a1a, 0x424e: 0xf0001a1a, 0x424f: 0xf0001a1a, + 0x4250: 0xf0001a1a, 0x4251: 0xf0001a1a, 0x4252: 0xf0001a1a, 0x4253: 0xf0001a1a, + 0x4254: 0xf0001a1a, 0x4255: 0xf0001a1a, 0x4256: 0xf0001a1a, 0x4257: 0xf0001a1a, + 0x4258: 0xf0001a1a, 0x4259: 0xf0001a1a, 0x425a: 0xf0001a1a, 0x425b: 0xf0001a1a, + 0x425c: 0xf0001a1a, 0x425d: 0xf0001a1a, 0x425e: 0xf0001a1a, 0x425f: 0xf0001a1a, + 0x4260: 0xf0001a1a, 0x4261: 0xf0001a1a, 0x4262: 0xf0001a1a, 0x4263: 0xf0001a1a, + 0x4264: 0xf0001a1a, 0x4265: 0xf0001a1a, 0x4266: 0xf0001a1a, 0x4267: 0xf0001a1a, + 0x4268: 0xf0001a1a, 0x4269: 0xf0001a1a, 0x426a: 0xf0001a1a, 0x426b: 0xf0001a1a, + 0x426c: 0xf0001a1a, 0x426d: 0xf0001a1a, 0x426e: 0xf0001a1a, 0x426f: 0xf0001a1a, + 0x4270: 0xf0001a1a, 0x4271: 0xf0001a1a, 0x4272: 0xf0001a1a, 0x4273: 0xf0001a1a, + 0x4274: 0xf0001a1a, 0x4275: 0xf0001a1a, 0x4276: 0xf0001a1a, 0x4277: 0xf0001a1a, + 0x4278: 0xf0001a1a, 0x4279: 0xf0001a1a, 0x427a: 0xf0001a1a, 0x427b: 0xf0001a1a, + 0x427c: 0xf0001a1a, 0x427d: 0xf0001a1a, 0x427e: 0xf0001a1a, 0x427f: 0xf0001a1a, + // Block 0x10a, offset 0x4280 + 0x4280: 0xf0001a1a, 0x4281: 0xf0001a1a, 0x4282: 0xf0001a1a, 0x4283: 0xf0001a1a, + 0x4284: 0xf0001a1a, 0x4285: 0xf0001a1a, 0x4286: 0xf0001a1a, 0x4287: 0xf0001a1a, + 0x4288: 0xf0001a1a, 0x4289: 0xf0001a1a, 0x428a: 0xf0001a1a, 0x428b: 0xf0001a1a, + 0x428c: 0xf0001a1a, 0x428d: 0xf0001a1a, 0x428e: 0xf0001a1a, 0x428f: 0xf0001a1a, + 0x4290: 0xf0001a1a, 0x4291: 0xf0001a1a, 0x4292: 0xf0001a1a, 0x4293: 0xf0001a1a, + 0x4294: 0xf0001a1a, 0x4295: 0xf0001a1a, 0x4296: 0xf0001a1a, 0x4297: 0xf0001a1a, + 0x4298: 0xf0001a1a, 0x4299: 0xf0001a1a, 0x429a: 0xf0001a1a, 0x429b: 0xf0001a1a, + 0x429c: 0xf0001a1a, 0x429d: 0xf0001a1a, 0x429e: 0xe0000003, 0x429f: 0xe0000006, + 0x42a0: 0xe0000009, 0x42a1: 0xe000000c, 0x42a2: 0xe000000f, 0x42a3: 0xe0000012, + 0x42a4: 0xe000156b, 0x42a5: 0xe000156e, 0x42a6: 0xe0001577, 0x42a7: 0xe000157d, + 0x42a8: 0xe00015aa, 0x42a9: 0xe00015b3, 0x42aa: 0xf0001919, 0x42ab: 0xf0001919, + 0x42ac: 0xf0001919, 0x42ad: 0xf0001919, 0x42ae: 0xf0001919, 0x42af: 0xf0001919, + 0x42b0: 0xf0001919, 0x42b1: 0xf0001919, 0x42b2: 0xf0001919, 0x42b3: 0xf0001919, + 0x42b4: 0xf0001919, 0x42b5: 0xf0001919, 0x42b6: 0xf0001919, 0x42b7: 0xf0001919, + 0x42b8: 0xf0001919, 0x42b9: 0xf0001919, 0x42ba: 0xf0001919, 0x42bb: 0xf0001919, + 0x42bc: 0xf0001919, 0x42bd: 0xf0001919, 0x42be: 0xf0001919, 0x42bf: 0xf0001919, + // Block 0x10b, offset 0x42c0 + 0x42c0: 0xf0001919, 0x42c1: 0xf0001919, 0x42c2: 0xf0001919, 0x42c3: 0xf0001919, + 0x42c4: 0xf0001919, 0x42c5: 0xf0001919, 0x42c6: 0xf0001919, 0x42c7: 0xf0001919, + 0x42c8: 0xf0001919, 0x42c9: 0xf0001919, 0x42ca: 0xf0001919, 0x42cb: 0xf0001919, + 0x42cc: 0xf0001919, 0x42cd: 0xf0001919, 0x42ce: 0xf0001919, 0x42cf: 0xf0001919, + 0x42d0: 0xf0001919, 0x42d1: 0xf0001919, 0x42d2: 0xf0001919, 0x42d3: 0xf0001919, + 0x42d4: 0xf0001919, 0x42d5: 0xf0001919, 0x42d6: 0xf0001919, 0x42d7: 0xe000155c, + 0x42d8: 0xe0001562, 0x42d9: 0xe0001568, 0x42da: 0xe0001571, 0x42db: 0xe0001580, + 0x42dc: 0xf0001717, 0x42dd: 0xf0001717, 0x42de: 0xf0001717, 0x42df: 0xf0001717, + 0x42e0: 0xf0001717, 0x42e1: 0xf0001717, 0x42e2: 0xf0001717, 0x42e3: 0xf0001717, + 0x42e4: 0xf0001717, 0x42e5: 0xf0001717, 0x42e6: 0xf0001717, 0x42e7: 0xf0001717, + 0x42e8: 0xf0001717, 0x42e9: 0xf0001717, 0x42ea: 0xf0001717, 0x42eb: 0xf0001717, + 0x42ec: 0xf0001717, 0x42ed: 0xf0001717, 0x42ee: 0xf0001717, 0x42ef: 0xf0001717, + 0x42f0: 0xf0001717, 0x42f1: 0xf0001717, 0x42f2: 0xf0001717, 0x42f3: 0xf0001717, + 0x42f4: 0xf0001717, 0x42f5: 0xf0001717, 0x42f6: 0xf0001717, 0x42f7: 0xf0001717, + 0x42f8: 0xf0001717, 0x42f9: 0xf0001717, 0x42fa: 0xf0001717, 0x42fb: 0xf0001717, + 0x42fc: 0xf0001717, 0x42fd: 0xf0001717, 0x42fe: 0xf0001717, 0x42ff: 0xf0001717, + // Block 0x10c, offset 0x4300 + 0x4300: 0xf0001717, 0x4301: 0xf0001717, 0x4302: 0xf0001717, 0x4303: 0xf0001717, + 0x4304: 0xf0001717, 0x4305: 0xf0001717, 0x4306: 0xf0001717, 0x4307: 0xf0001717, + 0x4308: 0xf0001717, 0x4309: 0xf0001717, 0x430a: 0xf0001717, 0x430b: 0xf0001717, + 0x430c: 0xf0001717, 0x430d: 0xf0001717, 0x430e: 0xf0001717, 0x430f: 0xf0001717, + 0x4310: 0xf0001717, 0x4311: 0xf0001717, 0x4312: 0xf0001717, 0x4313: 0xf0001717, + 0x4314: 0xf0001717, 0x4315: 0xf0001717, 0x4316: 0xf0001717, 0x4317: 0xf0001717, + 0x4318: 0xf0001717, 0x4319: 0xf0001717, 0x431a: 0xf0001717, 0x431b: 0xf0001717, + 0x431c: 0xf0001717, 0x431d: 0xf0001717, 0x431e: 0xf0001717, 0x431f: 0xe0001574, + 0x4320: 0xe0001583, 0x4321: 0xf0001818, 0x4322: 0xf0001818, 0x4323: 0xf0001818, + 0x4324: 0xf0001818, 0x4325: 0xf0001818, 0x4326: 0xf0001818, 0x4327: 0xf0001818, + 0x4328: 0xf0001818, 0x4329: 0xf0001818, 0x432a: 0xf0001818, 0x432b: 0xf0001818, + 0x432c: 0xf0001818, 0x432d: 0xf0001818, 0x432e: 0xf0001818, 0x432f: 0xf0001818, + 0x4330: 0xf0001818, 0x4331: 0xf0001818, 0x4332: 0xf0001818, 0x4333: 0xf0001818, + 0x4334: 0xf0001818, 0x4335: 0xf0001a1a, 0x4336: 0xf0001a1a, 0x4337: 0xf0001a1a, + 0x4338: 0xf0001a1a, 0x4339: 0xf0001a1a, 0x433a: 0xf0001a1a, 0x433b: 0xf0001a1a, + 0x433c: 0xf0001a1a, 0x433d: 0xf0001a1a, 0x433e: 0xf0001a1a, 0x433f: 0xf0001a1a, + // Block 0x10d, offset 0x4340 + 0x4340: 0xf0001a1a, 0x4341: 0xf0001a1a, 0x4342: 0xf0001a1a, 0x4343: 0xf0001a1a, + 0x4344: 0xf0001a1a, 0x4345: 0xf0001a1a, 0x4346: 0xf0001a1a, 0x4347: 0xf0001a1a, + 0x4348: 0xf0001a1a, 0x4349: 0xf0001a1a, 0x434a: 0xf0001a1a, 0x434b: 0xf0001a1a, + 0x434c: 0xf0001a1a, 0x434d: 0xf0001a1a, 0x434e: 0xf0001a1a, 0x434f: 0xf0001a1a, + 0x4350: 0xf0001a1a, 0x4351: 0xf0001919, 0x4352: 0xf0001919, 0x4353: 0xf0001919, + 0x4354: 0xf0001919, 0x4355: 0xf0001919, 0x4356: 0xf0001919, 0x4357: 0xf0001919, + 0x4358: 0xf0001919, 0x4359: 0xf0001919, 0x435a: 0xf0001919, 0x435b: 0xf0001919, + 0x435c: 0xf0001919, 0x435d: 0xf0001919, 0x435e: 0xf0001919, 0x435f: 0xf0001919, + 0x4360: 0xf0001919, 0x4361: 0xf0001919, 0x4362: 0xf0001919, 0x4363: 0xf0001919, + 0x4364: 0xf0001919, 0x4365: 0xf0001919, 0x4366: 0xf0001919, 0x4367: 0xf0001919, + 0x4368: 0xf0001919, 0x4369: 0xf0001919, 0x436a: 0xf0001919, 0x436b: 0xf0001919, + 0x436c: 0xf0001919, 0x436d: 0xf0001717, 0x436e: 0xf0001717, 0x436f: 0xf0001717, + 0x4370: 0xf0001717, 0x4371: 0xf0001717, 0x4372: 0xf0001717, 0x4373: 0xf0001717, + 0x4374: 0xf0001818, 0x4375: 0xf0001818, 0x4376: 0xf0001818, 0x4377: 0xf0001818, + 0x4378: 0xf0001818, 0x4379: 0xf0001818, 0x437a: 0xf0001818, 0x437b: 0xf0001818, + 0x437c: 0xf0001919, 0x437d: 0xf0001a1a, 0x437e: 0x4004c020, 0x437f: 0x4004c220, + // Block 0x10e, offset 0x4380 + 0x4390: 0xe00015d4, 0x4391: 0xe00015e4, 0x4392: 0xe00015e0, 0x4393: 0xe00015e8, + 0x4394: 0xe00015ec, 0x4395: 0xe00015f8, 0x4396: 0xe00015fc, 0x4397: 0xe0001600, + 0x4398: 0xe0001621, 0x4399: 0xe000161d, 0x439a: 0xe0001635, 0x439b: 0xe0001631, + 0x439c: 0xe0001646, 0x439d: 0xe000163e, 0x439e: 0xe0001642, 0x439f: 0xe000165a, + 0x43a0: 0xe0001656, 0x43a1: 0xe0001652, 0x43a2: 0xe0001662, 0x43a3: 0xe000165e, + 0x43a4: 0xe000168a, 0x43a5: 0xe0001686, 0x43a6: 0xe00016b6, 0x43a7: 0xe000166e, + 0x43a8: 0xe000166a, 0x43a9: 0xe0001666, 0x43aa: 0xe000167a, 0x43ab: 0xe0001676, + 0x43ac: 0xe0001682, 0x43ad: 0xe000167e, 0x43ae: 0xe00016ba, 0x43af: 0xe00016c6, + 0x43b0: 0xe00016c2, 0x43b1: 0xe00016ce, 0x43b2: 0xe00016ca, 0x43b3: 0xe00016d2, + 0x43b4: 0xe00016d6, 0x43b5: 0xe00016de, 0x43b6: 0xe00016eb, 0x43b7: 0xe00016e7, + 0x43b8: 0xe00016ef, 0x43b9: 0xe00016f7, 0x43ba: 0xe00016ff, 0x43bb: 0xe00016fb, + 0x43bc: 0xe0001707, 0x43bd: 0xe0001703, 0x43be: 0xe0001717, 0x43bf: 0xe000171b, + // Block 0x10f, offset 0x43c0 + 0x43c0: 0xe0001759, 0x43c1: 0xe0001761, 0x43c2: 0xe000175d, 0x43c3: 0xe0001741, + 0x43c4: 0xe0001745, 0x43c5: 0xe0001769, 0x43c6: 0xe0001765, 0x43c7: 0xe0001771, + 0x43c8: 0xe000176d, 0x43c9: 0xe000178c, 0x43ca: 0xe0001790, 0x43cb: 0xe0001799, + 0x43cc: 0xe000177c, 0x43cd: 0xe0001784, 0x43ce: 0xe000179d, 0x43cf: 0xe00017a1, + 0x43d2: 0xe0001780, 0x43d3: 0xe00017d9, + 0x43d4: 0xe00017dd, 0x43d5: 0xe00017c5, 0x43d6: 0xe00017c9, 0x43d7: 0xe00017b9, + 0x43d8: 0xe00017b5, 0x43d9: 0xe00017bd, 0x43da: 0xe00017d5, 0x43db: 0xe00017d1, + 0x43dc: 0xe00017f8, 0x43dd: 0xe00017f4, 0x43de: 0xe00015d0, 0x43df: 0xe00015dc, + 0x43e0: 0xe00015d8, 0x43e1: 0xe00015f4, 0x43e2: 0xe00015f0, 0x43e3: 0xe0001608, + 0x43e4: 0xe0001604, 0x43e5: 0xe0001629, 0x43e6: 0xe000160c, 0x43e7: 0xe0001625, + 0x43e8: 0xe000164a, 0x43e9: 0xe000168e, 0x43ea: 0xe0001672, 0x43eb: 0xe00016be, + 0x43ec: 0xe0001751, 0x43ed: 0xe0001775, 0x43ee: 0xe00017f0, 0x43ef: 0xe00017ec, + 0x43f0: 0xe00017fc, 0x43f1: 0xe00017a9, 0x43f2: 0xe000171f, 0x43f3: 0xe00017cd, + 0x43f4: 0xe0001713, 0x43f5: 0xe0001755, 0x43f6: 0xe00016f3, 0x43f7: 0xe000172b, + 0x43f8: 0xe00017ad, 0x43f9: 0xe00017a5, 0x43fa: 0xe0001749, 0x43fb: 0xe0001727, + 0x43fc: 0xe000174d, 0x43fd: 0xe00017b1, 0x43fe: 0xe0001610, 0x43ff: 0xe000162d, + // Block 0x110, offset 0x4400 + 0x4400: 0xe0001788, 0x4401: 0xe000170b, 0x4402: 0xe00015cc, 0x4403: 0xe0001723, + 0x4404: 0xe00016da, 0x4405: 0xe00016b2, 0x4406: 0xe000164e, 0x4407: 0xe00017c1, + 0x4430: 0xe00016ae, 0x4431: 0xe000170f, 0x4432: 0xe00015c7, 0x4433: 0xe00015c2, + 0x4434: 0xe0001794, 0x4435: 0xe0001692, 0x4436: 0xe0001639, 0x4437: 0xe00016e2, + 0x4438: 0xe00017e7, 0x4439: 0xe0001697, 0x443a: 0xe000169b, 0x443b: 0xe0001614, + 0x443c: 0x40282e20, 0x443d: 0x40071620, + // Block 0x111, offset 0x4440 + 0x4440: 0xa0000000, 0x4441: 0xa0000000, 0x4442: 0xa0000000, 0x4443: 0xa0000000, + 0x4444: 0xa0000000, 0x4445: 0xa0000000, 0x4446: 0xa0000000, 0x4447: 0xa0000000, + 0x4448: 0xa0000000, 0x4449: 0xa0000000, 0x444a: 0xa0000000, 0x444b: 0xa0000000, + 0x444c: 0xa0000000, 0x444d: 0xa0000000, 0x444e: 0xa0000000, 0x444f: 0xa0000000, + 0x4450: 0x00024096, 0x4451: 0x00025c96, 0x4452: 0x00030496, 0x4453: 0x00026c96, + 0x4454: 0x00026296, 0x4455: 0x0002ba96, 0x4456: 0x0002c496, 0x4457: 0x0004b496, + 0x4458: 0x0004b696, 0x4459: 0xf0001616, + 0x4460: 0xae608202, 0x4461: 0xae600000, 0x4462: 0xae608102, 0x4463: 0xae600000, + 0x4464: 0xae600000, 0x4465: 0xae600000, 0x4466: 0xae600000, + 0x4470: 0xf0001f16, 0x4471: 0x00022c96, 0x4472: 0x00022a96, 0x4473: 0x00021696, + 0x4474: 0x00021696, 0x4475: 0x0003f496, 0x4476: 0x0003f696, 0x4477: 0x0003fc96, + 0x4478: 0x0003fe96, 0x4479: 0x0004b096, 0x447a: 0x0004b296, 0x447b: 0x0004ac96, + 0x447c: 0x0004ae96, 0x447d: 0x0004a096, 0x447e: 0x0004a296, 0x447f: 0x00049c96, + // Block 0x112, offset 0x4480 + 0x4480: 0x00049e96, 0x4481: 0x0004a496, 0x4482: 0x0004a696, 0x4483: 0x0004a896, + 0x4484: 0x0004aa96, 0x4485: 0x40025e20, 0x4486: 0x40026020, 0x4487: 0x0003f896, + 0x4488: 0x0003fa96, 0x4489: 0x00021484, 0x448a: 0x00021484, 0x448b: 0x00021484, + 0x448c: 0x00021484, 0x448d: 0x00021684, 0x448e: 0x00021684, 0x448f: 0x00021684, + 0x4490: 0x0002408f, 0x4491: 0x00025c8f, 0x4492: 0x0002e48f, + 0x4494: 0x0002628f, 0x4495: 0x00026c8f, 0x4496: 0x0002c48f, 0x4497: 0x0002ba8f, + 0x4498: 0x00022c8f, 0x4499: 0x0003f48f, 0x449a: 0x0003f68f, 0x449b: 0x0003fc8f, + 0x449c: 0x0003fe8f, 0x449d: 0x0004b08f, 0x449e: 0x0004b28f, 0x449f: 0x0004ea8f, + 0x44a0: 0x0004e68f, 0x44a1: 0x0004d88f, 0x44a2: 0x0009388f, 0x44a3: 0x00021a8f, + 0x44a4: 0x0009408f, 0x44a5: 0x0009448f, 0x44a6: 0x0009428f, + 0x44a8: 0x0004e48f, 0x44a9: 0x0027de8f, 0x44aa: 0x0004ec8f, 0x44ab: 0x0004d68f, + 0x44b0: 0xa000a21a, 0x44b1: 0xa000a218, 0x44b2: 0xa000a51a, 0x44b3: 0xa0000000, + 0x44b4: 0xa000a91a, 0x44b6: 0xa000ad1a, 0x44b7: 0xa000ad18, + 0x44b8: 0xa000b21a, 0x44b9: 0xa000b218, 0x44ba: 0xa000b61a, 0x44bb: 0xa000b618, + 0x44bc: 0xa000ba1a, 0x44bd: 0xa000ba18, 0x44be: 0xa000bc1a, 0x44bf: 0xa000bc18, + // Block 0x113, offset 0x44c0 + 0x44c0: 0x00391c9a, 0x44c1: 0x00391e9a, 0x44c2: 0x00391e99, 0x44c3: 0x0039209a, + 0x44c4: 0x00392099, 0x44c5: 0x0039269a, 0x44c6: 0x00392699, 0x44c7: 0x0039289a, + 0x44c8: 0x00392899, 0x44c9: 0x0039309a, 0x44ca: 0x00393099, 0x44cb: 0x00393097, + 0x44cc: 0x00393098, 0x44cd: 0x0039389a, 0x44ce: 0x00393899, 0x44cf: 0x00393c9a, + 0x44d0: 0x00393c99, 0x44d1: 0x00393c97, 0x44d2: 0x00393c98, 0x44d3: 0x0039549a, + 0x44d4: 0x00395499, 0x44d5: 0x0039569a, 0x44d6: 0x00395699, 0x44d7: 0x00395697, + 0x44d8: 0x00395698, 0x44d9: 0x0039589a, 0x44da: 0x00395899, 0x44db: 0x00395897, + 0x44dc: 0x00395898, 0x44dd: 0x0039649a, 0x44de: 0x00396499, 0x44df: 0x00396497, + 0x44e0: 0x00396498, 0x44e1: 0x0039729a, 0x44e2: 0x00397299, 0x44e3: 0x00397297, + 0x44e4: 0x00397298, 0x44e5: 0x0039749a, 0x44e6: 0x00397499, 0x44e7: 0x00397497, + 0x44e8: 0x00397498, 0x44e9: 0x0039889a, 0x44ea: 0x00398899, 0x44eb: 0x00398a9a, + 0x44ec: 0x00398a99, 0x44ed: 0x0039a49a, 0x44ee: 0x0039a499, 0x44ef: 0x0039a69a, + 0x44f0: 0x0039a699, 0x44f1: 0x0039c69a, 0x44f2: 0x0039c699, 0x44f3: 0x0039c697, + 0x44f4: 0x0039c698, 0x44f5: 0x0039c89a, 0x44f6: 0x0039c899, 0x44f7: 0x0039c897, + 0x44f8: 0x0039c898, 0x44f9: 0x0039dc9a, 0x44fa: 0x0039dc99, 0x44fb: 0x0039dc97, + 0x44fc: 0x0039dc98, 0x44fd: 0x0039de9a, 0x44fe: 0x0039de99, 0x44ff: 0x0039de97, + // Block 0x114, offset 0x4500 + 0x4500: 0x0039de98, 0x4501: 0x0039e69a, 0x4502: 0x0039e699, 0x4503: 0x0039e697, + 0x4504: 0x0039e698, 0x4505: 0x0039e89a, 0x4506: 0x0039e899, 0x4507: 0x0039e897, + 0x4508: 0x0039e898, 0x4509: 0x0039ee9a, 0x450a: 0x0039ee99, 0x450b: 0x0039ee97, + 0x450c: 0x0039ee98, 0x450d: 0x0039f09a, 0x450e: 0x0039f099, 0x450f: 0x0039f097, + 0x4510: 0x0039f098, 0x4511: 0x0039fc9a, 0x4512: 0x0039fc99, 0x4513: 0x0039fc97, + 0x4514: 0x0039fc98, 0x4515: 0x003a129a, 0x4516: 0x003a1299, 0x4517: 0x003a1297, + 0x4518: 0x003a1298, 0x4519: 0x003a1a9a, 0x451a: 0x003a1a99, 0x451b: 0x003a1a97, + 0x451c: 0x003a1a98, 0x451d: 0x003a409a, 0x451e: 0x003a4099, 0x451f: 0x003a4097, + 0x4520: 0x003a4098, 0x4521: 0x003a4e9a, 0x4522: 0x003a4e99, 0x4523: 0x003a4e97, + 0x4524: 0x003a4e98, 0x4525: 0x003a569a, 0x4526: 0x003a5699, 0x4527: 0x003a5697, + 0x4528: 0x003a5698, 0x4529: 0x003a689a, 0x452a: 0x003a6899, 0x452b: 0x003a6897, + 0x452c: 0x003a6898, 0x452d: 0x003a749a, 0x452e: 0x003a7499, 0x452f: 0x003a8e9a, + 0x4530: 0x003a8e99, 0x4531: 0x003a909a, 0x4532: 0x003a9099, 0x4533: 0x003a9097, + 0x4534: 0x003a9098, 0x4535: 0xe0001732, 0x4536: 0xe000172f, 0x4537: 0xe0001738, + 0x4538: 0xe0001735, 0x4539: 0xe000173e, 0x453a: 0xe000173b, 0x453b: 0xf0001a1a, + 0x453c: 0xf0001919, 0x453f: 0xa0000000, + // Block 0x115, offset 0x4540 + 0x4541: 0x0002ba83, 0x4542: 0x0003e083, 0x4543: 0x0004ea83, + 0x4544: 0x0027de83, 0x4545: 0x0004ec83, 0x4546: 0x0004e683, 0x4547: 0x0003d283, + 0x4548: 0x0003f483, 0x4549: 0x0003f683, 0x454a: 0x0004d883, 0x454b: 0x00093883, + 0x454c: 0x00024083, 0x454d: 0x00021a83, 0x454e: 0x0002e483, 0x454f: 0x0004e283, + 0x4550: 0x0029cc83, 0x4551: 0x0029ce83, 0x4552: 0x0029d083, 0x4553: 0x0029d283, + 0x4554: 0x0029d483, 0x4555: 0x0029d683, 0x4556: 0x0029d883, 0x4557: 0x0029da83, + 0x4558: 0x0029dc83, 0x4559: 0x0029de83, 0x455a: 0x00026c83, 0x455b: 0x00026283, + 0x455c: 0x00094083, 0x455d: 0x00094283, 0x455e: 0x00094483, 0x455f: 0x0002c483, + 0x4560: 0x0004d683, 0x4561: 0x002bde89, 0x4562: 0x002c0a89, 0x4563: 0x002c3a89, + 0x4564: 0x002c6289, 0x4565: 0x002c9889, 0x4566: 0x002d0889, 0x4567: 0x002d2289, + 0x4568: 0x002d6889, 0x4569: 0x002d9a89, 0x456a: 0x002dcc89, 0x456b: 0x002dfe89, + 0x456c: 0x002e2289, 0x456d: 0x002e8289, 0x456e: 0x002e9e89, 0x456f: 0x002ee289, + 0x4570: 0x002f2c89, 0x4571: 0x002f5689, 0x4572: 0x002f7a89, 0x4573: 0x002fe689, + 0x4574: 0x00302c89, 0x4575: 0x00306c89, 0x4576: 0x0030be89, 0x4577: 0x0030e289, + 0x4578: 0x0030f689, 0x4579: 0x00310089, 0x457a: 0x00312a89, 0x457b: 0x0003f883, + 0x457c: 0x0004e483, 0x457d: 0x0003fa83, 0x457e: 0x00062483, 0x457f: 0x00021683, + // Block 0x116, offset 0x4580 + 0x4580: 0x00061e83, 0x4581: 0x002bde83, 0x4582: 0x002c0a83, 0x4583: 0x002c3a83, + 0x4584: 0x002c6283, 0x4585: 0x002c9883, 0x4586: 0x002d0883, 0x4587: 0x002d2283, + 0x4588: 0x002d6883, 0x4589: 0x002d9a83, 0x458a: 0x002dcc83, 0x458b: 0x002dfe83, + 0x458c: 0x002e2283, 0x458d: 0x002e8283, 0x458e: 0x002e9e83, 0x458f: 0x002ee283, + 0x4590: 0x002f2c83, 0x4591: 0x002f5683, 0x4592: 0x002f7a83, 0x4593: 0x002fe683, + 0x4594: 0x00302c83, 0x4595: 0x00306c83, 0x4596: 0x0030be83, 0x4597: 0x0030e283, + 0x4598: 0x0030f683, 0x4599: 0x00310083, 0x459a: 0x00312a83, 0x459b: 0x0003fc83, + 0x459c: 0x00094883, 0x459d: 0x0003fe83, 0x459e: 0x00094c83, 0x459f: 0x00041883, + 0x45a0: 0x00041a83, 0x45a1: 0x00030492, 0x45a2: 0x0004a492, 0x45a3: 0x0004a692, + 0x45a4: 0x00025c92, 0x45a5: 0x00023e92, 0x45a6: 0x0065d692, 0x45a7: 0x00657690, + 0x45a8: 0x00657890, 0x45a9: 0x00657a90, 0x45aa: 0x00657e90, 0x45ab: 0x00658090, + 0x45ac: 0x0065be90, 0x45ad: 0x0065c090, 0x45ae: 0x0065c490, 0x45af: 0x00659a90, + 0x45b0: 0x0027d692, 0x45b1: 0x00657692, 0x45b2: 0x00657892, 0x45b3: 0x00657a92, + 0x45b4: 0x00657e92, 0x45b5: 0x00658092, 0x45b6: 0x00658292, 0x45b7: 0x00658492, + 0x45b8: 0x00658692, 0x45b9: 0x00658892, 0x45ba: 0x00658a92, 0x45bb: 0x00658c92, + 0x45bc: 0x00658e92, 0x45bd: 0x00659092, 0x45be: 0x00659292, 0x45bf: 0x00659492, + // Block 0x117, offset 0x45c0 + 0x45c0: 0x00659692, 0x45c1: 0x00659892, 0x45c2: 0x00659a92, 0x45c3: 0x00659c92, + 0x45c4: 0x00659e92, 0x45c5: 0x0065a092, 0x45c6: 0x0065a292, 0x45c7: 0x0065a492, + 0x45c8: 0x0065a692, 0x45c9: 0x0065a892, 0x45ca: 0x0065aa92, 0x45cb: 0x0065ac92, + 0x45cc: 0x0065ae92, 0x45cd: 0x0065b092, 0x45ce: 0x0065b292, 0x45cf: 0x0065b492, + 0x45d0: 0x0065b692, 0x45d1: 0x0065b892, 0x45d2: 0x0065ba92, 0x45d3: 0x0065bc92, + 0x45d4: 0x0065be92, 0x45d5: 0x0065c092, 0x45d6: 0x0065c492, 0x45d7: 0x0065c692, + 0x45d8: 0x0065c892, 0x45d9: 0x0065ca92, 0x45da: 0x0065cc92, 0x45db: 0x0065ce92, + 0x45dc: 0x0065d092, 0x45dd: 0x0065d892, 0x45de: 0xa0012812, 0x45df: 0xa0012912, + 0x45e0: 0x0063a692, 0x45e1: 0x0062ac92, 0x45e2: 0x0062ae92, 0x45e3: 0x00646892, + 0x45e4: 0x0062b092, 0x45e5: 0x00646c92, 0x45e6: 0x00646e92, 0x45e7: 0x0062b292, + 0x45e8: 0x0062b492, 0x45e9: 0x0062b692, 0x45ea: 0x00647492, 0x45eb: 0x00647692, + 0x45ec: 0x00647892, 0x45ed: 0x00647a92, 0x45ee: 0x00647c92, 0x45ef: 0x00647e92, + 0x45f0: 0x0062e092, 0x45f1: 0x0062b892, 0x45f2: 0x0062ba92, 0x45f3: 0x0062bc92, + 0x45f4: 0x0062ee92, 0x45f5: 0x0062be92, 0x45f6: 0x0062c092, 0x45f7: 0x0062c292, + 0x45f8: 0x0062c492, 0x45f9: 0x0062c692, 0x45fa: 0x0062c892, 0x45fb: 0x0062ca92, + 0x45fc: 0x0062cc92, 0x45fd: 0x0062ce92, 0x45fe: 0x0062d092, + // Block 0x118, offset 0x4600 + 0x4602: 0x0063a892, 0x4603: 0x0063aa92, + 0x4604: 0x0063ac92, 0x4605: 0x0063ae92, 0x4606: 0x0063b092, 0x4607: 0x0063b292, + 0x460a: 0x0063b492, 0x460b: 0x0063b692, + 0x460c: 0x0063b892, 0x460d: 0x0063ba92, 0x460e: 0x0063bc92, 0x460f: 0x0063be92, + 0x4612: 0x0063c092, 0x4613: 0x0063c292, + 0x4614: 0x0063c492, 0x4615: 0x0063c692, 0x4616: 0x0063c892, 0x4617: 0x0063ca92, + 0x461a: 0x0063cc92, 0x461b: 0x0063ce92, + 0x461c: 0x0063d092, + 0x4620: 0x0027dc83, 0x4621: 0x0027e083, 0x4622: 0x00094683, 0x4623: 0x00062683, + 0x4624: 0x00094a83, 0x4625: 0x0027e283, 0x4626: 0x00280883, + 0x4628: 0x000d3292, 0x4629: 0x00084492, 0x462a: 0x00084892, 0x462b: 0x00084692, + 0x462c: 0x00084a92, 0x462d: 0x000e6e92, 0x462e: 0x000ec492, + 0x4639: 0xa0000000, 0x463a: 0xa0000000, 0x463b: 0xa0000000, + 0x463c: 0x4027ae20, 0x463d: 0x4027b020, 0x463e: 0x00000285, 0x463f: 0x2bfffe85, + // Block 0x119, offset 0x4640 + 0x4640: 0x40731a20, 0x4641: 0x40731c20, 0x4642: 0x40731e20, 0x4643: 0x40732020, + 0x4644: 0x40732220, 0x4645: 0x40732420, 0x4646: 0x40732620, 0x4647: 0x40732820, + 0x4648: 0x40732a20, 0x4649: 0x40732c20, 0x464a: 0x40732e20, 0x464b: 0x40733020, + 0x464d: 0x40733220, 0x464e: 0x40733420, 0x464f: 0x40733620, + 0x4650: 0x40733820, 0x4651: 0x40733a20, 0x4652: 0x40733c20, 0x4653: 0x40733e20, + 0x4654: 0x40734020, 0x4655: 0x40734220, 0x4656: 0x40734420, 0x4657: 0x40734620, + 0x4658: 0x40734820, 0x4659: 0x40734a20, 0x465a: 0x40734c20, 0x465b: 0x40734e20, + 0x465c: 0x40735020, 0x465d: 0x40735220, 0x465e: 0x40735420, 0x465f: 0x40735620, + 0x4660: 0x40735820, 0x4661: 0x40735a20, 0x4662: 0x40735c20, 0x4663: 0x40735e20, + 0x4664: 0x40736020, 0x4665: 0x40736220, 0x4666: 0x40736420, + 0x4668: 0x40736620, 0x4669: 0x40736820, 0x466a: 0x40736a20, 0x466b: 0x40736c20, + 0x466c: 0x40736e20, 0x466d: 0x40737020, 0x466e: 0x40737220, 0x466f: 0x40737420, + 0x4670: 0x40737620, 0x4671: 0x40737820, 0x4672: 0x40737a20, 0x4673: 0x40737c20, + 0x4674: 0x40737e20, 0x4675: 0x40738020, 0x4676: 0x40738220, 0x4677: 0x40738420, + 0x4678: 0x40738620, 0x4679: 0x40738820, 0x467a: 0x40738a20, + 0x467c: 0x40738c20, 0x467d: 0x40738e20, 0x467f: 0x40739020, + // Block 0x11a, offset 0x4680 + 0x4680: 0x40739220, 0x4681: 0x40739420, 0x4682: 0x40739620, 0x4683: 0x40739820, + 0x4684: 0x40739a20, 0x4685: 0x40739c20, 0x4686: 0x40739e20, 0x4687: 0x4073a020, + 0x4688: 0x4073a220, 0x4689: 0x4073a420, 0x468a: 0x4073a620, 0x468b: 0x4073a820, + 0x468c: 0x4073aa20, 0x468d: 0x4073ac20, + 0x4690: 0x4073ae20, 0x4691: 0x4073b020, 0x4692: 0x4073b220, 0x4693: 0x4073b420, + 0x4694: 0x4073b620, 0x4695: 0x4073b820, 0x4696: 0x4073ba20, 0x4697: 0x4073bc20, + 0x4698: 0x4073be20, 0x4699: 0x4073c020, 0x469a: 0x4073c220, 0x469b: 0x4073c420, + 0x469c: 0x4073c620, 0x469d: 0x4073c820, + // Block 0x11b, offset 0x46c0 + 0x46c0: 0x4073ca20, 0x46c1: 0x4073cc20, 0x46c2: 0x4073ce20, 0x46c3: 0x4073d020, + 0x46c4: 0x4073d220, 0x46c5: 0x4073d420, 0x46c6: 0x4073d620, 0x46c7: 0x4073d820, + 0x46c8: 0x4073da20, 0x46c9: 0x4073dc20, 0x46ca: 0x4073de20, 0x46cb: 0x4073e020, + 0x46cc: 0x4073e220, 0x46cd: 0x4073e420, 0x46ce: 0x4073e620, 0x46cf: 0x4073e820, + 0x46d0: 0x4073ea20, 0x46d1: 0x4073ec20, 0x46d2: 0x4073ee20, 0x46d3: 0x4073f020, + 0x46d4: 0x4073f220, 0x46d5: 0x4073f420, 0x46d6: 0x4073f620, 0x46d7: 0x4073f820, + 0x46d8: 0x4073fa20, 0x46d9: 0x4073fc20, 0x46da: 0x4073fe20, 0x46db: 0x40740020, + 0x46dc: 0x40740220, 0x46dd: 0x40740420, 0x46de: 0x40740620, 0x46df: 0x40740820, + 0x46e0: 0x40740a20, 0x46e1: 0x40740c20, 0x46e2: 0x40740e20, 0x46e3: 0x40741020, + 0x46e4: 0x40741220, 0x46e5: 0x40741420, 0x46e6: 0x40741620, 0x46e7: 0x40741820, + 0x46e8: 0x40741a20, 0x46e9: 0x40741c20, 0x46ea: 0x40741e20, 0x46eb: 0x40742020, + 0x46ec: 0x40742220, 0x46ed: 0x40742420, 0x46ee: 0x40742620, 0x46ef: 0x40742820, + 0x46f0: 0x40742a20, 0x46f1: 0x40742c20, 0x46f2: 0x40742e20, 0x46f3: 0x40743020, + 0x46f4: 0x40743220, 0x46f5: 0x40743420, 0x46f6: 0x40743620, 0x46f7: 0x40743820, + 0x46f8: 0x40743a20, 0x46f9: 0x40743c20, 0x46fa: 0x40743e20, 0x46fb: 0x40744020, + 0x46fc: 0x40744220, 0x46fd: 0x40744420, 0x46fe: 0x40744620, 0x46ff: 0x40744820, + // Block 0x11c, offset 0x4700 + 0x4700: 0x40744a20, 0x4701: 0x40744c20, 0x4702: 0x40744e20, 0x4703: 0x40745020, + 0x4704: 0x40745220, 0x4705: 0x40745420, 0x4706: 0x40745620, 0x4707: 0x40745820, + 0x4708: 0x40745a20, 0x4709: 0x40745c20, 0x470a: 0x40745e20, 0x470b: 0x40746020, + 0x470c: 0x40746220, 0x470d: 0x40746420, 0x470e: 0x40746620, 0x470f: 0x40746820, + 0x4710: 0x40746a20, 0x4711: 0x40746c20, 0x4712: 0x40746e20, 0x4713: 0x40747020, + 0x4714: 0x40747220, 0x4715: 0x40747420, 0x4716: 0x40747620, 0x4717: 0x40747820, + 0x4718: 0x40747a20, 0x4719: 0x40747c20, 0x471a: 0x40747e20, 0x471b: 0x40748020, + 0x471c: 0x40748220, 0x471d: 0x40748420, 0x471e: 0x40748620, 0x471f: 0x40748820, + 0x4720: 0x40748a20, 0x4721: 0x40748c20, 0x4722: 0x40748e20, 0x4723: 0x40749020, + 0x4724: 0x40749220, 0x4725: 0x40749420, 0x4726: 0x40749620, 0x4727: 0x40749820, + 0x4728: 0x40749a20, 0x4729: 0x40749c20, 0x472a: 0x40749e20, 0x472b: 0x4074a020, + 0x472c: 0x4074a220, 0x472d: 0x4074a420, 0x472e: 0x4074a620, 0x472f: 0x4074a820, + 0x4730: 0x4074aa20, 0x4731: 0x4074ac20, 0x4732: 0x4074ae20, 0x4733: 0x4074b020, + 0x4734: 0x4074b220, 0x4735: 0x4074b420, 0x4736: 0x4074b620, 0x4737: 0x4074b820, + 0x4738: 0x4074ba20, 0x4739: 0x4074bc20, 0x473a: 0x4074be20, + // Block 0x11d, offset 0x4740 + 0x4740: 0x4003be20, 0x4741: 0x4003c020, 0x4742: 0x4003c220, + 0x4747: 0xe000026a, + 0x4748: 0xe0000382, 0x4749: 0xe000045c, 0x474a: 0xe0000531, 0x474b: 0xe00005fb, + 0x474c: 0xe00006c6, 0x474d: 0xe000076e, 0x474e: 0xe000081a, 0x474f: 0xe00008bf, + 0x4750: 0x4028ba20, 0x4751: 0x4028bc20, 0x4752: 0x4028be20, 0x4753: 0x4028c020, + 0x4754: 0x4028c220, 0x4755: 0x4028c420, 0x4756: 0x4028c620, 0x4757: 0x4028c820, + 0x4758: 0x4028ca20, 0x4759: 0x4028cc20, 0x475a: 0x4028ce20, 0x475b: 0x4028d020, + 0x475c: 0x4028d220, 0x475d: 0x4028d420, 0x475e: 0x4028d620, 0x475f: 0x4028d820, + 0x4760: 0x4028da20, 0x4761: 0x4028dc20, 0x4762: 0x4028de20, 0x4763: 0x4028e020, + 0x4764: 0x4028e220, 0x4765: 0x4028e420, 0x4766: 0x4028e620, 0x4767: 0x4028e820, + 0x4768: 0x4028ea20, 0x4769: 0x4028ec20, 0x476a: 0x4028ee20, 0x476b: 0x4028f020, + 0x476c: 0x4028f220, 0x476d: 0x4028f420, 0x476e: 0x4028f620, 0x476f: 0x4028f820, + 0x4770: 0x4028fa20, 0x4771: 0x4028fc20, 0x4772: 0x4028fe20, 0x4773: 0x40290020, + 0x4777: 0x401afe20, + 0x4778: 0x401b0020, 0x4779: 0x401b0220, 0x477a: 0x401b0420, 0x477b: 0x401b0620, + 0x477c: 0x401b0820, 0x477d: 0x401b0a20, 0x477e: 0x401b0c20, 0x477f: 0x401b0e20, + // Block 0x11e, offset 0x4780 + 0x4780: 0x40290220, 0x4781: 0x40290420, 0x4782: 0xe000026d, 0x4783: 0xe00005fe, + 0x4784: 0x40290620, 0x4785: 0x40290820, 0x4786: 0x40290a20, 0x4787: 0x40290c20, + 0x4788: 0xe0000601, 0x4789: 0x40290e20, 0x478a: 0x40291020, 0x478b: 0x40291220, + 0x478c: 0x40291420, 0x478d: 0x40291620, 0x478e: 0x40291820, 0x478f: 0xe0000604, + 0x4790: 0x40291a20, 0x4791: 0x40291c20, 0x4792: 0x40291e20, 0x4793: 0x40292020, + 0x4794: 0x40292220, 0x4795: 0x40292420, 0x4796: 0x40292620, 0x4797: 0x40292820, + 0x4798: 0xe0000270, 0x4799: 0xe0000273, 0x479a: 0xe0000276, 0x479b: 0xe0000385, + 0x479c: 0xe0000388, 0x479d: 0xe000038b, 0x479e: 0xe000038e, 0x479f: 0xe0000607, + 0x47a0: 0x40292a20, 0x47a1: 0x40292c20, 0x47a2: 0x40292e20, 0x47a3: 0x40293020, + 0x47a4: 0x40293220, 0x47a5: 0x40293420, 0x47a6: 0x40293620, 0x47a7: 0x40293820, + 0x47a8: 0x40293a20, 0x47a9: 0x40293c20, 0x47aa: 0x40293e20, 0x47ab: 0x40294020, + 0x47ac: 0x40294220, 0x47ad: 0x40294420, 0x47ae: 0x40294620, 0x47af: 0x40294820, + 0x47b0: 0x40294a20, 0x47b1: 0x40294c20, 0x47b2: 0x40294e20, 0x47b3: 0xe000060a, + 0x47b4: 0x40295020, 0x47b5: 0x40295220, 0x47b6: 0x40295420, 0x47b7: 0x40295620, + 0x47b8: 0x40295820, 0x47b9: 0x401b1020, 0x47ba: 0x401b1220, 0x47bb: 0x401b1420, + 0x47bc: 0x401b1620, 0x47bd: 0x401b1820, 0x47be: 0x401b1a20, 0x47bf: 0x401b1c20, + // Block 0x11f, offset 0x47c0 + 0x47c0: 0x401b1e20, 0x47c1: 0x401b2020, 0x47c2: 0x401b2220, 0x47c3: 0x401b2420, + 0x47c4: 0x401b2620, 0x47c5: 0x401b2820, 0x47c6: 0x401b2a20, 0x47c7: 0x401b2c20, + 0x47c8: 0x401b2e20, 0x47c9: 0x401b3020, 0x47ca: 0xe00001d6, + 0x47d0: 0x401b3220, 0x47d1: 0x401b3420, 0x47d2: 0x401b3620, 0x47d3: 0x401b3820, + 0x47d4: 0x401b3a20, 0x47d5: 0x401b3c20, 0x47d6: 0x401b3e20, 0x47d7: 0x401b4020, + 0x47d8: 0x401b4220, 0x47d9: 0x401b4420, 0x47da: 0x401b4620, 0x47db: 0x401b4820, + // Block 0x120, offset 0x4800 + 0x4810: 0x401b4a20, 0x4811: 0x401b4c20, 0x4812: 0x401b4e20, 0x4813: 0x401b5020, + 0x4814: 0x401b5220, 0x4815: 0x401b5420, 0x4816: 0x401b5620, 0x4817: 0x401b5820, + 0x4818: 0x401b5a20, 0x4819: 0x401b5c20, 0x481a: 0x401b5e20, 0x481b: 0x401b6020, + 0x481c: 0x401b6220, 0x481d: 0x401b6420, 0x481e: 0x401b6620, 0x481f: 0x401b6820, + 0x4820: 0x401b6a20, 0x4821: 0x401b6c20, 0x4822: 0x401b6e20, 0x4823: 0x401b7020, + 0x4824: 0x401b7220, 0x4825: 0x401b7420, 0x4826: 0x401b7620, 0x4827: 0x401b7820, + 0x4828: 0x401b7a20, 0x4829: 0x401b7c20, 0x482a: 0x401b7e20, 0x482b: 0x401b8020, + 0x482c: 0x401b8220, 0x482d: 0x401b8420, 0x482e: 0x401b8620, 0x482f: 0x401b8820, + 0x4830: 0x401b8a20, 0x4831: 0x401b8c20, 0x4832: 0x401b8e20, 0x4833: 0x401b9020, + 0x4834: 0x401b9220, 0x4835: 0x401b9420, 0x4836: 0x401b9620, 0x4837: 0x401b9820, + 0x4838: 0x401b9a20, 0x4839: 0x401b9c20, 0x483a: 0x401b9e20, 0x483b: 0x401ba020, + 0x483c: 0x401ba220, 0x483d: 0xadc13802, + // Block 0x121, offset 0x4840 + 0x4840: 0x4070b820, 0x4841: 0x4070ba20, 0x4842: 0x4070bc20, 0x4843: 0x4070be20, + 0x4844: 0x4070c020, 0x4845: 0x4070c220, 0x4846: 0x4070c420, 0x4847: 0x4070c620, + 0x4848: 0x4070c820, 0x4849: 0x4070ca20, 0x484a: 0x4070cc20, 0x484b: 0x4070ce20, + 0x484c: 0x4070d020, 0x484d: 0x4070d220, 0x484e: 0x4070d420, 0x484f: 0x4070d620, + 0x4850: 0x4070d820, 0x4851: 0x4070da20, 0x4852: 0x4070dc20, 0x4853: 0x4070de20, + 0x4854: 0x4070e020, 0x4855: 0x4070e220, 0x4856: 0x4070e420, 0x4857: 0x4070e620, + 0x4858: 0x4070e820, 0x4859: 0x4070ea20, 0x485a: 0x4070ec20, 0x485b: 0x4070ee20, + 0x485c: 0x4070f020, + 0x4860: 0x4070f220, 0x4861: 0x4070f420, 0x4862: 0x4070f620, 0x4863: 0x4070f820, + 0x4864: 0x4070fa20, 0x4865: 0x4070fc20, 0x4866: 0x4070fe20, 0x4867: 0x40710020, + 0x4868: 0x40710220, 0x4869: 0x40710420, 0x486a: 0x40710620, 0x486b: 0x40710820, + 0x486c: 0x40710a20, 0x486d: 0x40710c20, 0x486e: 0x40710e20, 0x486f: 0x40711020, + 0x4870: 0x40711220, 0x4871: 0x40711420, 0x4872: 0x40711620, 0x4873: 0x40711820, + 0x4874: 0x40711a20, 0x4875: 0x40711c20, 0x4876: 0x40711e20, 0x4877: 0x40712020, + 0x4878: 0x40712220, 0x4879: 0x40712420, 0x487a: 0x40712620, 0x487b: 0x40712820, + 0x487c: 0x40712a20, 0x487d: 0x40712c20, 0x487e: 0x40712e20, 0x487f: 0x40713020, + // Block 0x122, offset 0x4880 + 0x4880: 0x40713220, 0x4881: 0x40713420, 0x4882: 0x40713620, 0x4883: 0x40713820, + 0x4884: 0x40713a20, 0x4885: 0x40713c20, 0x4886: 0x40713e20, 0x4887: 0x40714020, + 0x4888: 0x40714220, 0x4889: 0x40714420, 0x488a: 0x40714620, 0x488b: 0x40714820, + 0x488c: 0x40714a20, 0x488d: 0x40714c20, 0x488e: 0x40714e20, 0x488f: 0x40715020, + 0x4890: 0x40715220, + // Block 0x123, offset 0x48c0 + 0x48c0: 0x40718820, 0x48c1: 0x40718a20, 0x48c2: 0x40718c20, 0x48c3: 0x40718e20, + 0x48c4: 0x40719020, 0x48c5: 0x40719220, 0x48c6: 0x40719420, 0x48c7: 0x40719620, + 0x48c8: 0x40719820, 0x48c9: 0x40719a20, 0x48ca: 0x40719c20, 0x48cb: 0x40719e20, + 0x48cc: 0x4071a020, 0x48cd: 0x4071a220, 0x48ce: 0x4071a420, 0x48cf: 0x4071a620, + 0x48d0: 0x4071a820, 0x48d1: 0x4071aa20, 0x48d2: 0x4071ac20, 0x48d3: 0x4071ae20, + 0x48d4: 0x4071b020, 0x48d5: 0x4071b220, 0x48d6: 0x4071b420, 0x48d7: 0x4071b620, + 0x48d8: 0x4071b820, 0x48d9: 0x4071ba20, 0x48da: 0x4071bc20, 0x48db: 0x4071be20, + 0x48dc: 0x4071c020, 0x48dd: 0x4071c220, 0x48de: 0x4071c420, + 0x48e0: 0xe0000279, 0x48e1: 0xe000060d, 0x48e2: 0x4028b620, 0x48e3: 0x4028b820, + 0x48f0: 0x4071c620, 0x48f1: 0x4071c820, 0x48f2: 0x4071ca20, 0x48f3: 0x4071cc20, + 0x48f4: 0x4071ce20, 0x48f5: 0x4071d020, 0x48f6: 0x4071d220, 0x48f7: 0x4071d420, + 0x48f8: 0x4071d620, 0x48f9: 0x4071d820, 0x48fa: 0x4071da20, 0x48fb: 0x4071dc20, + 0x48fc: 0x4071de20, 0x48fd: 0x4071e020, 0x48fe: 0x4071e220, 0x48ff: 0x4071e420, + // Block 0x124, offset 0x4900 + 0x4900: 0x4071e620, 0x4901: 0x4071e820, 0x4902: 0x4071ea20, 0x4903: 0x4071ec20, + 0x4904: 0x4071ee20, 0x4905: 0x4071f020, 0x4906: 0x4071f220, 0x4907: 0x4071f420, + 0x4908: 0x4071f620, 0x4909: 0x4071f820, 0x490a: 0x4071fa20, + // Block 0x125, offset 0x4940 + 0x4940: 0x40765020, 0x4941: 0x40765220, 0x4942: 0x40765420, 0x4943: 0x40765620, + 0x4944: 0x40765820, 0x4945: 0x40765a20, 0x4946: 0x40765c20, 0x4947: 0x40765e20, + 0x4948: 0x40766020, 0x4949: 0x40766220, 0x494a: 0x40766420, 0x494b: 0x40766620, + 0x494c: 0x40766820, 0x494d: 0x40766a20, 0x494e: 0x40766c20, 0x494f: 0x40766e20, + 0x4950: 0x40767020, 0x4951: 0x40767220, 0x4952: 0x40767420, 0x4953: 0x40767620, + 0x4954: 0x40767820, 0x4955: 0x40767a20, 0x4956: 0x40767c20, 0x4957: 0x40767e20, + 0x4958: 0x40768020, 0x4959: 0x40768220, 0x495a: 0x40768420, 0x495b: 0x40768620, + 0x495c: 0x40768820, 0x495d: 0x40768a20, 0x495f: 0x4003c420, + 0x4960: 0x40768c20, 0x4961: 0x40768e20, 0x4962: 0x40769020, 0x4963: 0x40769220, + 0x4964: 0x40769420, 0x4965: 0x40769620, 0x4966: 0x40769820, 0x4967: 0x40769a20, + 0x4968: 0x40769c20, 0x4969: 0x40769e20, 0x496a: 0x4076a020, 0x496b: 0x4076a220, + 0x496c: 0x4076a420, 0x496d: 0x4076a620, 0x496e: 0x4076a820, 0x496f: 0x4076aa20, + 0x4970: 0x4076ac20, 0x4971: 0x4076ae20, 0x4972: 0x4076b020, 0x4973: 0x4076b220, + 0x4974: 0x4076b420, 0x4975: 0x4076b620, 0x4976: 0x4076b820, 0x4977: 0x4076ba20, + 0x4978: 0x4076bc20, 0x4979: 0x4076be20, 0x497a: 0x4076c020, 0x497b: 0x4076c220, + 0x497c: 0x4076c420, 0x497d: 0x4076c620, 0x497e: 0x4076c820, 0x497f: 0x4076ca20, + // Block 0x126, offset 0x4980 + 0x4980: 0x4076cc20, 0x4981: 0x4076ce20, 0x4982: 0x4076d020, 0x4983: 0x4076d220, + 0x4988: 0x4076d420, 0x4989: 0x4076d620, 0x498a: 0x4076d820, 0x498b: 0x4076da20, + 0x498c: 0x4076dc20, 0x498d: 0x4076de20, 0x498e: 0x4076e020, 0x498f: 0x4076e220, + 0x4990: 0x4003c620, 0x4991: 0xe000027c, 0x4992: 0xe0000391, 0x4993: 0x40295a20, + 0x4994: 0x40295c20, 0x4995: 0x40295e20, + // Block 0x127, offset 0x49c0 + 0x49c0: 0x0071fc88, 0x49c1: 0x0071fe88, 0x49c2: 0x00720088, 0x49c3: 0x00720288, + 0x49c4: 0x00720488, 0x49c5: 0x00720688, 0x49c6: 0x00720888, 0x49c7: 0x00720a88, + 0x49c8: 0x00720c88, 0x49c9: 0x00720e88, 0x49ca: 0x00721088, 0x49cb: 0x00721288, + 0x49cc: 0x00721488, 0x49cd: 0x00721688, 0x49ce: 0x00721888, 0x49cf: 0x00721a88, + 0x49d0: 0x00721c88, 0x49d1: 0x00721e88, 0x49d2: 0x00722088, 0x49d3: 0x00722288, + 0x49d4: 0x00722488, 0x49d5: 0x00722688, 0x49d6: 0x00722888, 0x49d7: 0x00722a88, + 0x49d8: 0x00722c88, 0x49d9: 0x00722e88, 0x49da: 0x00723088, 0x49db: 0x00723288, + 0x49dc: 0x00723488, 0x49dd: 0x00723688, 0x49de: 0x00723888, 0x49df: 0x00723a88, + 0x49e0: 0x00723c88, 0x49e1: 0x00723e88, 0x49e2: 0x00724088, 0x49e3: 0x00724288, + 0x49e4: 0x00724488, 0x49e5: 0x00724688, 0x49e6: 0x00724888, 0x49e7: 0x00724a88, + 0x49e8: 0x4071fc20, 0x49e9: 0x4071fe20, 0x49ea: 0x40720020, 0x49eb: 0x40720220, + 0x49ec: 0x40720420, 0x49ed: 0x40720620, 0x49ee: 0x40720820, 0x49ef: 0x40720a20, + 0x49f0: 0x40720c20, 0x49f1: 0x40720e20, 0x49f2: 0x40721020, 0x49f3: 0x40721220, + 0x49f4: 0x40721420, 0x49f5: 0x40721620, 0x49f6: 0x40721820, 0x49f7: 0x40721a20, + 0x49f8: 0x40721c20, 0x49f9: 0x40721e20, 0x49fa: 0x40722020, 0x49fb: 0x40722220, + 0x49fc: 0x40722420, 0x49fd: 0x40722620, 0x49fe: 0x40722820, 0x49ff: 0x40722a20, + // Block 0x128, offset 0x4a00 + 0x4a00: 0x40722c20, 0x4a01: 0x40722e20, 0x4a02: 0x40723020, 0x4a03: 0x40723220, + 0x4a04: 0x40723420, 0x4a05: 0x40723620, 0x4a06: 0x40723820, 0x4a07: 0x40723a20, + 0x4a08: 0x40723c20, 0x4a09: 0x40723e20, 0x4a0a: 0x40724020, 0x4a0b: 0x40724220, + 0x4a0c: 0x40724420, 0x4a0d: 0x40724620, 0x4a0e: 0x40724820, 0x4a0f: 0x40724a20, + 0x4a10: 0x40724c20, 0x4a11: 0x40724e20, 0x4a12: 0x40725020, 0x4a13: 0x40725220, + 0x4a14: 0x40725420, 0x4a15: 0x40725620, 0x4a16: 0x40725820, 0x4a17: 0x40725a20, + 0x4a18: 0x40725c20, 0x4a19: 0x40725e20, 0x4a1a: 0x40726020, 0x4a1b: 0x40726220, + 0x4a1c: 0x40726420, 0x4a1d: 0x40726620, 0x4a1e: 0x40726820, 0x4a1f: 0x40726a20, + 0x4a20: 0x40726c20, 0x4a21: 0x40726e20, 0x4a22: 0x40727020, 0x4a23: 0x40727220, + 0x4a24: 0x40727420, 0x4a25: 0x40727620, 0x4a26: 0x40727820, 0x4a27: 0x40727a20, + 0x4a28: 0x40727c20, 0x4a29: 0x40727e20, 0x4a2a: 0x40728020, 0x4a2b: 0x40728220, + 0x4a2c: 0x40728420, 0x4a2d: 0x40728620, 0x4a2e: 0x40728820, 0x4a2f: 0x40728a20, + 0x4a30: 0x40728c20, 0x4a31: 0x40728e20, 0x4a32: 0x40729020, 0x4a33: 0x40729220, + 0x4a34: 0x40729420, 0x4a35: 0x40729620, 0x4a36: 0x40729820, 0x4a37: 0x40729a20, + 0x4a38: 0x40729c20, 0x4a39: 0x40729e20, 0x4a3a: 0x4072a020, 0x4a3b: 0x4072a220, + 0x4a3c: 0x4072a420, 0x4a3d: 0x4072a620, 0x4a3e: 0x4072a820, 0x4a3f: 0x4072aa20, + // Block 0x129, offset 0x4a40 + 0x4a40: 0x4072ac20, 0x4a41: 0x4072ae20, 0x4a42: 0x4072b020, 0x4a43: 0x4072b220, + 0x4a44: 0x4072b420, 0x4a45: 0x4072b620, 0x4a46: 0x4072b820, 0x4a47: 0x4072ba20, + 0x4a48: 0x4072bc20, 0x4a49: 0x4072be20, 0x4a4a: 0x4072c020, 0x4a4b: 0x4072c220, + 0x4a4c: 0x4072c420, 0x4a4d: 0x4072c620, 0x4a4e: 0x4072c820, 0x4a4f: 0x4072ca20, + 0x4a50: 0x4072cc20, 0x4a51: 0x4072ce20, 0x4a52: 0x4072d020, 0x4a53: 0x4072d220, + 0x4a54: 0x4072d420, 0x4a55: 0x4072d620, 0x4a56: 0x4072d820, 0x4a57: 0x4072da20, + 0x4a58: 0x4072dc20, 0x4a59: 0x4072de20, 0x4a5a: 0x4072e020, 0x4a5b: 0x4072e220, + 0x4a5c: 0x4072e420, 0x4a5d: 0x4072e620, + 0x4a60: 0xe0000167, 0x4a61: 0xe00001f5, 0x4a62: 0xe0000310, 0x4a63: 0xe00003ea, + 0x4a64: 0xe00004c5, 0x4a65: 0xe000058f, 0x4a66: 0xe000065a, 0x4a67: 0xe0000702, + 0x4a68: 0xe00007ae, 0x4a69: 0xe0000853, + // Block 0x12a, offset 0x4a80 + 0x4a80: 0x4074c020, 0x4a81: 0x4074c220, 0x4a82: 0x4074c420, 0x4a83: 0x4074c620, + 0x4a84: 0x4074c820, 0x4a85: 0x4074ca20, + 0x4a88: 0x4074cc20, 0x4a8a: 0x4074ce20, 0x4a8b: 0x4074d020, + 0x4a8c: 0x4074d220, 0x4a8d: 0x4074d420, 0x4a8e: 0x4074d620, 0x4a8f: 0x4074d820, + 0x4a90: 0x4074da20, 0x4a91: 0x4074dc20, 0x4a92: 0x4074de20, 0x4a93: 0x4074e020, + 0x4a94: 0x4074e220, 0x4a95: 0x4074e420, 0x4a96: 0x4074e620, 0x4a97: 0x4074e820, + 0x4a98: 0x4074ea20, 0x4a99: 0x4074ec20, 0x4a9a: 0x4074ee20, 0x4a9b: 0x4074f020, + 0x4a9c: 0x4074f220, 0x4a9d: 0x4074f420, 0x4a9e: 0x4074f620, 0x4a9f: 0x4074f820, + 0x4aa0: 0x4074fa20, 0x4aa1: 0x4074fc20, 0x4aa2: 0x4074fe20, 0x4aa3: 0x40750020, + 0x4aa4: 0x40750220, 0x4aa5: 0x40750420, 0x4aa6: 0x40750620, 0x4aa7: 0x40750820, + 0x4aa8: 0x40750a20, 0x4aa9: 0x40750c20, 0x4aaa: 0x40750e20, 0x4aab: 0x40751020, + 0x4aac: 0x40751220, 0x4aad: 0x40751420, 0x4aae: 0x40751620, 0x4aaf: 0x40751820, + 0x4ab0: 0x40751a20, 0x4ab1: 0x40751c20, 0x4ab2: 0x40751e20, 0x4ab3: 0x40752020, + 0x4ab4: 0x40752220, 0x4ab5: 0x40752420, 0x4ab7: 0x40752620, + 0x4ab8: 0x40752820, + 0x4abc: 0x40752a20, 0x4abf: 0x40752c20, + // Block 0x12b, offset 0x4ac0 + 0x4ac0: 0x4075d220, 0x4ac1: 0x4075d420, 0x4ac2: 0x4075d620, 0x4ac3: 0x4075d820, + 0x4ac4: 0x4075da20, 0x4ac5: 0x4075dc20, 0x4ac6: 0x4075de20, 0x4ac7: 0x4075e020, + 0x4ac8: 0x4075e220, 0x4ac9: 0x4075e420, 0x4aca: 0x4075e620, 0x4acb: 0x4075e820, + 0x4acc: 0x4075ea20, 0x4acd: 0x4075ec20, 0x4ace: 0x4075ee20, 0x4acf: 0x4075f020, + 0x4ad0: 0x4075f220, 0x4ad1: 0x4075f420, 0x4ad2: 0x4075f620, 0x4ad3: 0x4075f820, + 0x4ad4: 0x4075fa20, 0x4ad5: 0x4075fc20, 0x4ad7: 0x40038620, + 0x4ad8: 0xe0000297, 0x4ad9: 0xe00003b2, 0x4ada: 0xe000048c, 0x4adb: 0x40296820, + 0x4adc: 0x40296a20, 0x4add: 0x40296c20, 0x4ade: 0x40296e20, 0x4adf: 0x40297020, + // Block 0x12c, offset 0x4b00 + 0x4b00: 0x4038bc20, 0x4b01: 0x4038be20, 0x4b02: 0x4038c020, 0x4b03: 0x4038c220, + 0x4b04: 0x4038c420, 0x4b05: 0x4038c620, 0x4b06: 0x4038c820, 0x4b07: 0x4038ca20, + 0x4b08: 0x4038cc20, 0x4b09: 0x4038ce20, 0x4b0a: 0x4038d020, 0x4b0b: 0x4038d220, + 0x4b0c: 0x4038d420, 0x4b0d: 0x4038d620, 0x4b0e: 0x4038d820, 0x4b0f: 0x4038da20, + 0x4b10: 0x4038dc20, 0x4b11: 0x4038de20, 0x4b12: 0x4038e020, 0x4b13: 0x4038e220, + 0x4b14: 0x4038e420, 0x4b15: 0x4038e620, 0x4b16: 0xe0000294, 0x4b17: 0x40296220, + 0x4b18: 0x40296420, 0x4b19: 0x40296620, 0x4b1a: 0xe00003af, 0x4b1b: 0xe0000489, + 0x4b1f: 0x4003c820, + 0x4b20: 0x40715420, 0x4b21: 0x40715620, 0x4b22: 0x40715820, 0x4b23: 0x40715a20, + 0x4b24: 0x40715c20, 0x4b25: 0x40715e20, 0x4b26: 0x40716020, 0x4b27: 0x40716220, + 0x4b28: 0x40716420, 0x4b29: 0x40716620, 0x4b2a: 0x40716820, 0x4b2b: 0x40716a20, + 0x4b2c: 0x40716c20, 0x4b2d: 0x40716e20, 0x4b2e: 0x40717020, 0x4b2f: 0x40717220, + 0x4b30: 0x40717420, 0x4b31: 0x40717620, 0x4b32: 0x40717820, 0x4b33: 0x40717a20, + 0x4b34: 0x40717c20, 0x4b35: 0x40717e20, 0x4b36: 0x40718020, 0x4b37: 0x40718220, + 0x4b38: 0x40718420, 0x4b39: 0x40718620, + 0x4b3f: 0x4003bc20, + // Block 0x12d, offset 0x4b40 + 0x4b40: 0xe00023a4, 0x4b41: 0xe00023a7, 0x4b42: 0xe00023aa, 0x4b43: 0xe00023ad, + 0x4b44: 0xe00023b0, 0x4b45: 0xe00023b3, 0x4b46: 0xe00023b6, 0x4b47: 0xe00023b9, + 0x4b48: 0xe00023bc, 0x4b49: 0xe00023bf, 0x4b4a: 0xe00023c2, 0x4b4b: 0xe00023c5, + 0x4b4c: 0xe00023c8, 0x4b4d: 0xe00023cb, 0x4b4e: 0xe00023ce, 0x4b4f: 0xe00023d1, + 0x4b50: 0xe00023d4, 0x4b51: 0xe00023d7, 0x4b52: 0xe00023da, 0x4b53: 0xe00023e0, + 0x4b54: 0xe00023e3, 0x4b55: 0xe00023e6, 0x4b56: 0xe00023e9, 0x4b57: 0xe00023ec, + 0x4b58: 0xe00023ef, 0x4b59: 0xe00023f2, 0x4b5a: 0xe00023f5, 0x4b5b: 0xe00023f8, + 0x4b5c: 0xe00023fb, 0x4b5d: 0xe00023fe, 0x4b5e: 0x40865220, 0x4b5f: 0x40865420, + 0x4b60: 0x40862020, 0x4b61: 0x40862220, 0x4b62: 0x40862420, 0x4b63: 0x40862620, + 0x4b64: 0x40862820, 0x4b65: 0x40862a20, 0x4b66: 0x40862c20, 0x4b67: 0x40862e20, + 0x4b68: 0x40863020, 0x4b69: 0x40863220, 0x4b6a: 0x40863420, 0x4b6b: 0x40863620, + 0x4b6c: 0x40863820, 0x4b6d: 0x40863a20, 0x4b6e: 0x40863c20, 0x4b6f: 0x40863e20, + 0x4b70: 0xe00023dd, 0x4b71: 0x40864020, 0x4b72: 0x40864220, 0x4b73: 0x40864420, + 0x4b74: 0x40864620, 0x4b75: 0x40864820, 0x4b76: 0x40864a20, 0x4b77: 0x40864c20, + 0x4b7e: 0x40864e20, 0x4b7f: 0x40865020, + // Block 0x12e, offset 0x4b80 + 0x4b80: 0x4048bc20, 0x4b81: 0x4048be20, 0x4b82: 0x4048c020, 0x4b83: 0x4048c220, + 0x4b85: 0x4048c420, 0x4b86: 0x4048c620, + 0x4b8c: 0x4048c820, 0x4b8d: 0xadc06002, 0x4b8e: 0xa000f302, 0x4b8f: 0xae60f402, + 0x4b90: 0x4048ca20, 0x4b91: 0x4048cc20, 0x4b92: 0x4048ce20, 0x4b93: 0x4048d020, + 0x4b95: 0x4048d220, 0x4b96: 0x4048d420, 0x4b97: 0x4048d620, + 0x4b99: 0x4048d820, 0x4b9a: 0x4048da20, 0x4b9b: 0x4048dc20, + 0x4b9c: 0x4048de20, 0x4b9d: 0x4048e020, 0x4b9e: 0x4048e220, 0x4b9f: 0x4048e420, + 0x4ba0: 0x4048e620, 0x4ba1: 0x4048e820, 0x4ba2: 0x4048ea20, 0x4ba3: 0x4048ec20, + 0x4ba4: 0x4048ee20, 0x4ba5: 0x4048f020, 0x4ba6: 0x4048f220, 0x4ba7: 0x4048f420, + 0x4ba8: 0x4048f620, 0x4ba9: 0x4048f820, 0x4baa: 0x4048fa20, 0x4bab: 0x4048fc20, + 0x4bac: 0x4048fe20, 0x4bad: 0x40490020, 0x4bae: 0x40490220, 0x4baf: 0x40490420, + 0x4bb0: 0x40490620, 0x4bb1: 0x40490820, 0x4bb2: 0x40490a20, 0x4bb3: 0x40490c20, + 0x4bb8: 0xae60fb02, 0x4bb9: 0xa010fc02, 0x4bba: 0xadc0fd02, + 0x4bbf: 0x82092487, + // Block 0x12f, offset 0x4bc0 + 0x4bc0: 0xe00002ac, 0x4bc1: 0xe00003c7, 0x4bc2: 0xe00004a1, 0x4bc3: 0xe0000573, + 0x4bc4: 0x40299820, 0x4bc5: 0x40299a20, 0x4bc6: 0x40299c20, 0x4bc7: 0x40299e20, + 0x4bd0: 0x40060620, 0x4bd1: 0x40060820, 0x4bd2: 0x40060a20, 0x4bd3: 0x40060c20, + 0x4bd4: 0x40060e20, 0x4bd5: 0x40061020, 0x4bd6: 0x40034420, 0x4bd7: 0x40034620, + 0x4bd8: 0x40061220, + 0x4be0: 0x40752e20, 0x4be1: 0x40753020, 0x4be2: 0x40753220, 0x4be3: 0x40753420, + 0x4be4: 0x40753620, 0x4be5: 0x40753820, 0x4be6: 0x40753a20, 0x4be7: 0x40753c20, + 0x4be8: 0x40753e20, 0x4be9: 0x40754020, 0x4bea: 0x40754220, 0x4beb: 0x40754420, + 0x4bec: 0x40754620, 0x4bed: 0x40754820, 0x4bee: 0x40754a20, 0x4bef: 0x40754c20, + 0x4bf0: 0x40754e20, 0x4bf1: 0x40755020, 0x4bf2: 0x40755220, 0x4bf3: 0x40755420, + 0x4bf4: 0x40755620, 0x4bf5: 0x40755820, 0x4bf6: 0x40755a20, 0x4bf7: 0x40755c20, + 0x4bf8: 0x40755e20, 0x4bf9: 0x40756020, 0x4bfa: 0x40756220, 0x4bfb: 0x40756420, + 0x4bfc: 0x40756620, 0x4bfd: 0xe0000291, 0x4bfe: 0x40296020, 0x4bff: 0x40061c20, + // Block 0x130, offset 0x4c00 + 0x4c00: 0x40756820, 0x4c01: 0x40756a20, 0x4c02: 0x40756c20, 0x4c03: 0x40756e20, + 0x4c04: 0x40757020, 0x4c05: 0x40757220, 0x4c06: 0x40757420, 0x4c07: 0x40757620, + 0x4c08: 0x40757820, 0x4c09: 0x40757a20, 0x4c0a: 0x40757c20, 0x4c0b: 0x40757e20, + 0x4c0c: 0x40758020, 0x4c0d: 0x40758220, 0x4c0e: 0x40758420, 0x4c0f: 0x40758620, + 0x4c10: 0x40758820, 0x4c11: 0x40758a20, 0x4c12: 0x40758c20, 0x4c13: 0x40758e20, + 0x4c14: 0x40759020, 0x4c15: 0x40759220, 0x4c16: 0x40759420, 0x4c17: 0x40759620, + 0x4c18: 0x40759820, 0x4c19: 0x40759a20, 0x4c1a: 0x40759c20, 0x4c1b: 0x40759e20, + 0x4c1c: 0x4075a020, 0x4c1d: 0x4075a220, 0x4c1e: 0x4075a420, 0x4c1f: 0x4075a620, + 0x4c20: 0x4075a820, 0x4c21: 0x4075aa20, 0x4c22: 0x4075ac20, 0x4c23: 0x4075ae20, + 0x4c24: 0x4075b020, 0x4c25: 0x4075b220, 0x4c26: 0x4075b420, 0x4c27: 0x4075b620, + 0x4c28: 0x4075b820, 0x4c29: 0x4075ba20, 0x4c2a: 0x4075bc20, 0x4c2b: 0x4075be20, + 0x4c2c: 0x4075c020, 0x4c2d: 0x4075c220, 0x4c2e: 0xe00023a1, 0x4c2f: 0x4075c420, + 0x4c30: 0x4075c620, 0x4c31: 0x4075c820, 0x4c32: 0x4075ca20, 0x4c33: 0x4075cc20, + 0x4c34: 0x4075ce20, 0x4c35: 0x4075d020, + 0x4c39: 0x40061420, 0x4c3a: 0x40038820, 0x4c3b: 0x40038a20, + 0x4c3c: 0x40038c20, 0x4c3d: 0x40038e20, 0x4c3e: 0x40039020, 0x4c3f: 0x40039220, + // Block 0x131, offset 0x4c40 + 0x4c40: 0x4075fe20, 0x4c41: 0x40760020, 0x4c42: 0x40760220, 0x4c43: 0x40760420, + 0x4c44: 0x40760620, 0x4c45: 0x40760820, 0x4c46: 0x40760a20, 0x4c47: 0x40760c20, + 0x4c48: 0x40760e20, 0x4c49: 0x40761020, 0x4c4a: 0x40761220, 0x4c4b: 0x40761420, + 0x4c4c: 0x40761620, 0x4c4d: 0x40761820, 0x4c4e: 0x40761a20, 0x4c4f: 0x40761c20, + 0x4c50: 0x40761e20, 0x4c51: 0x40762020, 0x4c52: 0x40762220, 0x4c53: 0x40762420, + 0x4c54: 0x40762620, 0x4c55: 0x40762820, + 0x4c58: 0xe000029a, 0x4c59: 0xe00003b5, 0x4c5a: 0xe000048f, 0x4c5b: 0xe0000561, + 0x4c5c: 0x40297220, 0x4c5d: 0x40297420, 0x4c5e: 0x40297620, 0x4c5f: 0x40297820, + 0x4c60: 0x40762a20, 0x4c61: 0x40762c20, 0x4c62: 0x40762e20, 0x4c63: 0x40763020, + 0x4c64: 0x40763220, 0x4c65: 0x40763420, 0x4c66: 0x40763620, 0x4c67: 0x40763820, + 0x4c68: 0x40763a20, 0x4c69: 0x40763c20, 0x4c6a: 0x40763e20, 0x4c6b: 0x40764020, + 0x4c6c: 0x40764220, 0x4c6d: 0x40764420, 0x4c6e: 0x40764620, 0x4c6f: 0x40764820, + 0x4c70: 0x40764a20, 0x4c71: 0x40764c20, 0x4c72: 0x40764e20, + 0x4c78: 0xe000029d, 0x4c79: 0xe00003b8, 0x4c7a: 0xe0000492, 0x4c7b: 0xe0000564, + 0x4c7c: 0x40297a20, 0x4c7d: 0x40297c20, 0x4c7e: 0x40297e20, 0x4c7f: 0x40298020, + // Block 0x132, offset 0x4c80 + 0x4c80: 0x405b2620, 0x4c81: 0xe00020a7, 0x4c82: 0x405b2820, 0x4c83: 0x405b2a20, + 0x4c84: 0xe00020aa, 0x4c85: 0x405b2c20, 0x4c86: 0x405b2e20, 0x4c87: 0x405b3020, + 0x4c88: 0xe00020ad, 0x4c89: 0x405b3220, 0x4c8a: 0xe00020b0, 0x4c8b: 0x405b3420, + 0x4c8c: 0xe00020b3, 0x4c8d: 0x405b3620, 0x4c8e: 0xe00020b6, 0x4c8f: 0x405b3820, + 0x4c90: 0xe00020b9, 0x4c91: 0x405b3a20, 0x4c92: 0xe00020bc, 0x4c93: 0x405b3c20, + 0x4c94: 0x405b3e20, 0x4c95: 0xe00020bf, 0x4c96: 0x405b4020, 0x4c97: 0xe00020c2, + 0x4c98: 0x405b4220, 0x4c99: 0xe00020c5, 0x4c9a: 0x405b4420, 0x4c9b: 0xe00020c8, + 0x4c9c: 0x405b4620, 0x4c9d: 0xe00020cb, 0x4c9e: 0x405b4820, 0x4c9f: 0xe00020ce, + 0x4ca0: 0x405b4a20, 0x4ca1: 0x405b4c20, 0x4ca2: 0x405b4e20, 0x4ca3: 0x405b5020, + 0x4ca4: 0x405b5220, 0x4ca5: 0xe00020d1, 0x4ca6: 0x405b5420, 0x4ca7: 0xe00020d4, + 0x4ca8: 0x405b5620, 0x4ca9: 0xe00020d7, 0x4caa: 0x405b5820, 0x4cab: 0xe00020da, + 0x4cac: 0x405b5a20, 0x4cad: 0x405b5c20, 0x4cae: 0xe00020dd, 0x4caf: 0x405b5e20, + 0x4cb0: 0x405b6020, 0x4cb1: 0x405b6220, 0x4cb2: 0x405b6420, 0x4cb3: 0xe00020e0, + 0x4cb4: 0x405b6620, 0x4cb5: 0xe00020e3, 0x4cb6: 0x405b6820, 0x4cb7: 0xe00020e6, + 0x4cb8: 0x405b6a20, 0x4cb9: 0xe00020e9, 0x4cba: 0x405b6c20, 0x4cbb: 0xe00020ec, + 0x4cbc: 0x405b6e20, 0x4cbd: 0x405b7020, 0x4cbe: 0x405b7220, 0x4cbf: 0x405b7420, + // Block 0x133, offset 0x4cc0 + 0x4cc0: 0xe00020ef, 0x4cc1: 0x405b7620, 0x4cc2: 0xe00020f2, 0x4cc3: 0x405b7820, + 0x4cc4: 0xe00020f5, 0x4cc5: 0x405b7a20, 0x4cc6: 0xe00020f8, 0x4cc7: 0x405b7c20, + 0x4cc8: 0x405b7e20, + // Block 0x134, offset 0x4d00 + 0x4d20: 0xe00001ec, 0x4d21: 0xe0000307, 0x4d22: 0xe00003e1, 0x4d23: 0xe00004bc, + 0x4d24: 0xe0000586, 0x4d25: 0xe0000651, 0x4d26: 0xe00006f9, 0x4d27: 0xe00007a5, + 0x4d28: 0xe000084a, 0x4d29: 0x40288820, 0x4d2a: 0x40288a20, 0x4d2b: 0x40288c20, + 0x4d2c: 0x40288e20, 0x4d2d: 0x40289020, 0x4d2e: 0x40289220, 0x4d2f: 0x40289420, + 0x4d30: 0x40289620, 0x4d31: 0x40289820, 0x4d32: 0x40289a20, 0x4d33: 0x40289c20, + 0x4d34: 0x40289e20, 0x4d35: 0x4028a020, 0x4d36: 0x4028a220, 0x4d37: 0x4028a420, + 0x4d38: 0x4028a620, 0x4d39: 0x4028a820, 0x4d3a: 0x4028aa20, 0x4d3b: 0x4028ac20, + 0x4d3c: 0x4028ae20, 0x4d3d: 0x4028b020, 0x4d3e: 0x4028b220, + // Block 0x135, offset 0x4d40 + 0x4d40: 0xa000f202, 0x4d41: 0xa000f302, 0x4d42: 0xa000f402, 0x4d43: 0x40489220, + 0x4d44: 0x40489420, 0x4d45: 0x40483420, 0x4d46: 0x40483620, 0x4d47: 0x40483820, + 0x4d48: 0x40483a20, 0x4d49: 0x40483c20, 0x4d4a: 0x40483e20, 0x4d4b: 0x40484020, + 0x4d4c: 0x40484220, 0x4d4d: 0x40484420, 0x4d4e: 0x40484620, 0x4d4f: 0x40484820, + 0x4d50: 0x40484a20, 0x4d51: 0x40484c20, 0x4d52: 0x40484e20, 0x4d53: 0x40485020, + 0x4d54: 0x40485220, 0x4d55: 0x40485420, 0x4d56: 0x40485620, 0x4d57: 0x40485820, + 0x4d58: 0x40485a20, 0x4d59: 0x40485c20, 0x4d5a: 0x40485e20, 0x4d5b: 0x40486020, + 0x4d5c: 0x40486220, 0x4d5d: 0x40486420, 0x4d5e: 0x40486620, 0x4d5f: 0x40486820, + 0x4d60: 0x40486a20, 0x4d61: 0x40486c20, 0x4d62: 0x40486e20, 0x4d63: 0x40487020, + 0x4d64: 0x40487220, 0x4d65: 0x40487420, 0x4d66: 0x40487620, 0x4d67: 0x40487820, + 0x4d68: 0x40487a20, 0x4d69: 0x40487c20, 0x4d6a: 0x40487e20, 0x4d6b: 0x40488020, + 0x4d6c: 0x40488220, 0x4d6d: 0x40488420, 0x4d6e: 0x40488620, 0x4d6f: 0x40488820, + 0x4d70: 0x40488a20, 0x4d71: 0x40488c20, 0x4d72: 0x40488e20, 0x4d73: 0x40489020, + 0x4d74: 0x40489620, 0x4d75: 0x40489820, 0x4d76: 0x40489a20, 0x4d77: 0x40489c20, + 0x4d78: 0x40489e20, 0x4d79: 0x4048a020, 0x4d7a: 0x4048a220, 0x4d7b: 0x4048a420, + 0x4d7c: 0x4048a620, 0x4d7d: 0x4048a820, 0x4d7e: 0x4048aa20, 0x4d7f: 0x4048ac20, + // Block 0x136, offset 0x4d80 + 0x4d80: 0x4048ae20, 0x4d81: 0x4048b020, 0x4d82: 0x4048b220, 0x4d83: 0x4048b420, + 0x4d84: 0x4048b620, 0x4d85: 0x4048b820, 0x4d86: 0x8209245d, 0x4d87: 0x40034820, + 0x4d88: 0x40034a20, 0x4d89: 0x4005fc20, 0x4d8a: 0x4005fe20, 0x4d8b: 0x40060020, + 0x4d8c: 0x40060220, 0x4d8d: 0x40060420, + 0x4d92: 0xe00002a9, 0x4d93: 0xe00003c4, + 0x4d94: 0xe000049e, 0x4d95: 0xe0000570, 0x4d96: 0xe000063a, 0x4d97: 0xe00006ea, + 0x4d98: 0xe0000792, 0x4d99: 0xe000083b, 0x4d9a: 0xe00008e6, 0x4d9b: 0x40298220, + 0x4d9c: 0x40298420, 0x4d9d: 0x40298620, 0x4d9e: 0x40298820, 0x4d9f: 0x40298a20, + 0x4da0: 0x40298c20, 0x4da1: 0x40298e20, 0x4da2: 0x40299020, 0x4da3: 0x40299220, + 0x4da4: 0x40299420, 0x4da5: 0x40299620, 0x4da6: 0xe00001df, 0x4da7: 0xe00002a6, + 0x4da8: 0xe00003c1, 0x4da9: 0xe000049b, 0x4daa: 0xe000056d, 0x4dab: 0xe0000637, + 0x4dac: 0xe00006e7, 0x4dad: 0xe000078f, 0x4dae: 0xe0000838, 0x4daf: 0xe00008e3, + // Block 0x137, offset 0x4dc0 + 0x4dc0: 0xa000f202, 0x4dc1: 0xa000f302, 0x4dc2: 0xa000f402, 0x4dc3: 0x40467e20, + 0x4dc4: 0x40468020, 0x4dc5: 0x40468220, 0x4dc6: 0x40468420, 0x4dc7: 0x40468620, + 0x4dc8: 0x40468820, 0x4dc9: 0x40468a20, 0x4dca: 0x40468c20, 0x4dcb: 0x40468e20, + 0x4dcc: 0x40469020, 0x4dcd: 0x40469220, 0x4dce: 0x40469420, 0x4dcf: 0x40469620, + 0x4dd0: 0x40469820, 0x4dd1: 0x40469a20, 0x4dd2: 0x40469c20, 0x4dd3: 0x40469e20, + 0x4dd4: 0x4046a020, 0x4dd5: 0x4046a220, 0x4dd6: 0x4046a420, 0x4dd7: 0x4046a620, + 0x4dd8: 0x4046a820, 0x4dd9: 0x4046aa20, 0x4dda: 0xe0001878, 0x4ddb: 0x4046ac20, + 0x4ddc: 0xe000187b, 0x4ddd: 0x4046ae20, 0x4dde: 0x4046b020, 0x4ddf: 0x4046b220, + 0x4de0: 0x4046b420, 0x4de1: 0x4046b620, 0x4de2: 0x4046b820, 0x4de3: 0x4046ba20, + 0x4de4: 0x4046bc20, 0x4de5: 0x4046be20, 0x4de6: 0x4046c020, 0x4de7: 0x4046c220, + 0x4de8: 0x4046c420, 0x4de9: 0x4046c620, 0x4dea: 0x4046c820, 0x4deb: 0xe000187e, + 0x4dec: 0x4046ca20, 0x4ded: 0x4046cc20, 0x4dee: 0x4046ce20, 0x4def: 0x4046d020, + 0x4df0: 0x4046d220, 0x4df1: 0x4046d420, 0x4df2: 0x4046d620, 0x4df3: 0x4046d820, + 0x4df4: 0x4046da20, 0x4df5: 0x4046dc20, 0x4df6: 0x4046de20, 0x4df7: 0x4046e020, + 0x4df8: 0x4046e220, 0x4df9: 0x82092372, 0x4dfa: 0xa070f102, 0x4dfb: 0x40061620, + 0x4dfc: 0x40061820, 0x4dfd: 0xa0000000, 0x4dfe: 0x40039420, 0x4dff: 0x40039620, + // Block 0x138, offset 0x4e00 + 0x4e00: 0x40034c20, 0x4e01: 0x40034e20, + 0x4e10: 0x4072e820, 0x4e11: 0x4072ea20, 0x4e12: 0x4072ec20, 0x4e13: 0x4072ee20, + 0x4e14: 0x4072f020, 0x4e15: 0x4072f220, 0x4e16: 0x4072f420, 0x4e17: 0x4072f620, + 0x4e18: 0x4072f820, 0x4e19: 0x4072fa20, 0x4e1a: 0x4072fc20, 0x4e1b: 0x4072fe20, + 0x4e1c: 0x40730020, 0x4e1d: 0x40730220, 0x4e1e: 0x40730420, 0x4e1f: 0x40730620, + 0x4e20: 0x40730820, 0x4e21: 0x40730a20, 0x4e22: 0x40730c20, 0x4e23: 0x40730e20, + 0x4e24: 0x40731020, 0x4e25: 0x40731220, 0x4e26: 0x40731420, 0x4e27: 0x40731620, + 0x4e28: 0x40731820, + 0x4e30: 0xe00001d0, 0x4e31: 0xe0000264, 0x4e32: 0xe000037c, 0x4e33: 0xe0000456, + 0x4e34: 0xe000052b, 0x4e35: 0xe00005f5, 0x4e36: 0xe00006c0, 0x4e37: 0xe0000768, + 0x4e38: 0xe0000814, 0x4e39: 0xe00008b9, + // Block 0x139, offset 0x4e40 + 0x4e40: 0xae60f202, 0x4e41: 0xae60f302, 0x4e42: 0xae60f402, 0x4e43: 0x404f4020, + 0x4e44: 0x404f4220, 0x4e45: 0x404f4420, 0x4e46: 0x404f4620, 0x4e47: 0x404f4820, + 0x4e48: 0x404f4a20, 0x4e49: 0x404f4c20, 0x4e4a: 0x404f4e20, 0x4e4b: 0x404f5020, + 0x4e4c: 0x404f5220, 0x4e4d: 0x404f5420, 0x4e4e: 0x404f5620, 0x4e4f: 0x404f5820, + 0x4e50: 0x404f5a20, 0x4e51: 0x404f5c20, 0x4e52: 0x404f5e20, 0x4e53: 0x404f6020, + 0x4e54: 0x404f6220, 0x4e55: 0x404f6420, 0x4e56: 0x404f6620, 0x4e57: 0x404f6820, + 0x4e58: 0x404f6a20, 0x4e59: 0x404f6c20, 0x4e5a: 0x404f6e20, 0x4e5b: 0x404f7020, + 0x4e5c: 0x404f7220, 0x4e5d: 0x404f7420, 0x4e5e: 0x404f7620, 0x4e5f: 0x404f7820, + 0x4e60: 0x404f7a20, 0x4e61: 0x404f7c20, 0x4e62: 0x404f7e20, 0x4e63: 0x404f8020, + 0x4e64: 0x404f8220, 0x4e65: 0x404f8420, 0x4e66: 0x404f8620, 0x4e67: 0x404f8820, + 0x4e68: 0x404f8a20, 0x4e69: 0x404f8c20, 0x4e6a: 0x404f8e20, 0x4e6b: 0x404f9020, + 0x4e6c: 0x404f9220, 0x4e6d: 0x404f9420, 0x4e6e: 0x404f9620, 0x4e6f: 0x404f9820, + 0x4e70: 0x404f9a20, 0x4e71: 0xc31507e1, 0x4e72: 0xc31707e1, 0x4e73: 0x820927d0, + 0x4e74: 0x820927d1, 0x4e76: 0xe00001b2, 0x4e77: 0xe0000246, + 0x4e78: 0xe000035e, 0x4e79: 0xe0000438, 0x4e7a: 0xe000050d, 0x4e7b: 0xe00005d7, + 0x4e7c: 0xe00006a2, 0x4e7d: 0xe000074a, 0x4e7e: 0xe00007f6, 0x4e7f: 0xe000089b, + // Block 0x13a, offset 0x4e80 + 0x4e80: 0x40039820, 0x4e81: 0x40035020, 0x4e82: 0x40035220, 0x4e83: 0x4002de20, + // Block 0x13b, offset 0x4ec0 + 0x4ec0: 0xa000f202, 0x4ec1: 0xa000f302, 0x4ec2: 0xa000f402, 0x4ec3: 0x4046e820, + 0x4ec4: 0x4046ea20, 0x4ec5: 0x4046ec20, 0x4ec6: 0x4046ee20, 0x4ec7: 0x4046f020, + 0x4ec8: 0x4046f220, 0x4ec9: 0x4046f420, 0x4eca: 0x4046f620, 0x4ecb: 0x4046f820, + 0x4ecc: 0x4046fa20, 0x4ecd: 0x4046fc20, 0x4ece: 0x4046fe20, 0x4ecf: 0x40470020, + 0x4ed0: 0x40470220, 0x4ed1: 0x40470420, 0x4ed2: 0x40470620, 0x4ed3: 0x40470820, + 0x4ed4: 0x40470a20, 0x4ed5: 0x40470c20, 0x4ed6: 0x40470e20, 0x4ed7: 0x40471020, + 0x4ed8: 0x40471220, 0x4ed9: 0x40471420, 0x4eda: 0x40471620, 0x4edb: 0x40471820, + 0x4edc: 0x40471a20, 0x4edd: 0x40471c20, 0x4ede: 0x40471e20, 0x4edf: 0x40472020, + 0x4ee0: 0x40472220, 0x4ee1: 0x40472420, 0x4ee2: 0x40472620, 0x4ee3: 0x40472820, + 0x4ee4: 0x40472a20, 0x4ee5: 0x40472c20, 0x4ee6: 0x40472e20, 0x4ee7: 0x40473020, + 0x4ee8: 0x40473220, 0x4ee9: 0x40473420, 0x4eea: 0x40473620, 0x4eeb: 0x40473820, + 0x4eec: 0x40473a20, 0x4eed: 0x40473c20, 0x4eee: 0x40473e20, 0x4eef: 0x40474020, + 0x4ef0: 0x40474220, 0x4ef1: 0x40474420, 0x4ef2: 0x40474620, 0x4ef3: 0x40474820, + 0x4ef4: 0x40474a20, 0x4ef5: 0x40474c20, 0x4ef6: 0x40474e20, 0x4ef7: 0x40475020, + 0x4ef8: 0x40475220, 0x4ef9: 0x40475420, 0x4efa: 0x40475620, 0x4efb: 0x40475820, + 0x4efc: 0x40475a20, 0x4efd: 0x40475c20, 0x4efe: 0x40475e20, 0x4eff: 0x40476020, + // Block 0x13c, offset 0x4f00 + 0x4f00: 0x820923b1, 0x4f01: 0x40476420, 0x4f02: 0x40476620, 0x4f03: 0x40476820, + 0x4f04: 0x4046e620, 0x4f05: 0x40035420, 0x4f06: 0x40035620, 0x4f07: 0x40061a20, + 0x4f08: 0x40039a20, + 0x4f10: 0xe00001d9, 0x4f11: 0xe00002a0, 0x4f12: 0xe00003bb, 0x4f13: 0xe0000495, + 0x4f14: 0xe0000567, 0x4f15: 0xe0000631, 0x4f16: 0xe00006e1, 0x4f17: 0xe0000789, + 0x4f18: 0xe0000832, 0x4f19: 0xe00008dd, + // Block 0x13d, offset 0x4f40 + 0x4f40: 0x40476a20, 0x4f41: 0x40476c20, 0x4f42: 0x40476e20, 0x4f43: 0x40477020, + 0x4f44: 0x40477220, 0x4f45: 0x40477420, 0x4f46: 0x40477620, 0x4f47: 0x40477820, + 0x4f48: 0x40477a20, 0x4f49: 0x40477c20, 0x4f4a: 0x40478420, 0x4f4b: 0x40478620, + 0x4f4c: 0x40478820, 0x4f4d: 0x40478a20, 0x4f4e: 0x40478c20, 0x4f4f: 0x40478e20, + 0x4f50: 0x40479020, 0x4f51: 0x40479220, 0x4f52: 0x40479420, 0x4f53: 0x40479620, + 0x4f54: 0x40479820, 0x4f55: 0x40479a20, 0x4f56: 0x40479c20, 0x4f57: 0x40479e20, + 0x4f58: 0x4047a020, 0x4f59: 0x4047a220, 0x4f5a: 0x4047a420, 0x4f5b: 0x4047a620, + 0x4f5c: 0x4047a820, 0x4f5d: 0x4047aa20, 0x4f5e: 0x4047ac20, 0x4f5f: 0x4047ae20, + 0x4f60: 0x4047b020, 0x4f61: 0x4047b220, 0x4f62: 0x4047b420, 0x4f63: 0x4047b620, + 0x4f64: 0x4047b820, 0x4f65: 0x4047ba20, 0x4f66: 0x4047bc20, 0x4f67: 0x40478020, + 0x4f68: 0x40477e20, 0x4f69: 0x40478220, 0x4f6a: 0x4047be20, 0x4f6b: 0xa000f302, + 0x4f6c: 0xa000f402, 0x4f6d: 0x4047c020, 0x4f6e: 0x4047c220, 0x4f6f: 0x4047c420, + 0x4f70: 0x4047c620, 0x4f71: 0x4047c820, 0x4f72: 0x4047ca20, 0x4f73: 0x4047cc20, + 0x4f74: 0x4047ce20, 0x4f75: 0x4047d020, 0x4f76: 0x820923e9, 0x4f77: 0xa070f102, + // Block 0x13e, offset 0x4f80 + 0x4f80: 0xe00001dc, 0x4f81: 0xe00002a3, 0x4f82: 0xe00003be, 0x4f83: 0xe0000498, + 0x4f84: 0xe000056a, 0x4f85: 0xe0000634, 0x4f86: 0xe00006e4, 0x4f87: 0xe000078c, + 0x4f88: 0xe0000835, 0x4f89: 0xe00008e0, + // Block 0x13f, offset 0x4fc0 + 0x4fc0: 0x4076e420, 0x4fc1: 0x4076e620, 0x4fc2: 0x4076e820, 0x4fc3: 0x4076ea20, + 0x4fc4: 0x4076ec20, 0x4fc5: 0x4076ee20, 0x4fc6: 0x4076f020, 0x4fc7: 0x4076f220, + 0x4fc8: 0x4076f420, 0x4fc9: 0x4076f620, 0x4fca: 0x4076f820, 0x4fcb: 0x4076fa20, + 0x4fcc: 0x4076fc20, 0x4fcd: 0x4076fe20, 0x4fce: 0x40770020, 0x4fcf: 0x40770220, + 0x4fd0: 0x40770420, 0x4fd1: 0x40770620, 0x4fd2: 0x40770820, 0x4fd3: 0x40770a20, + 0x4fd4: 0x40770c20, 0x4fd5: 0x40770e20, 0x4fd6: 0x40771020, 0x4fd7: 0x40771220, + 0x4fd8: 0x40771420, 0x4fd9: 0x40771620, 0x4fda: 0x40771820, 0x4fdb: 0x40771a20, + 0x4fdc: 0x40771c20, 0x4fdd: 0x40771e20, 0x4fde: 0x40772020, 0x4fdf: 0x40772220, + 0x4fe0: 0x40772420, 0x4fe1: 0x40772620, 0x4fe2: 0x40772820, 0x4fe3: 0x40772a20, + 0x4fe4: 0x40772c20, 0x4fe5: 0x40772e20, 0x4fe6: 0x40773020, 0x4fe7: 0x40773220, + 0x4fe8: 0x40773420, 0x4fe9: 0x40773620, 0x4fea: 0x40773820, 0x4feb: 0x40773a20, + 0x4fec: 0x40773c20, 0x4fed: 0x40773e20, 0x4fee: 0x40774020, 0x4fef: 0x40774220, + 0x4ff0: 0x40774420, 0x4ff1: 0x40774620, 0x4ff2: 0x40774820, 0x4ff3: 0x40774a20, + 0x4ff4: 0x40774c20, 0x4ff5: 0x40774e20, 0x4ff6: 0x40775020, 0x4ff7: 0x40775220, + 0x4ff8: 0x40775420, 0x4ff9: 0x40775620, 0x4ffa: 0x40775820, 0x4ffb: 0x40775a20, + 0x4ffc: 0x40775c20, 0x4ffd: 0x40775e20, 0x4ffe: 0x40776020, 0x4fff: 0x40776220, + // Block 0x140, offset 0x5000 + 0x5000: 0x40776420, 0x5001: 0x40776620, 0x5002: 0x40776820, 0x5003: 0x40776a20, + 0x5004: 0x40776c20, 0x5005: 0x40776e20, 0x5006: 0x40777020, 0x5007: 0x40777220, + 0x5008: 0x40777420, 0x5009: 0x40777620, 0x500a: 0x40777820, 0x500b: 0x40777a20, + 0x500c: 0x40777c20, 0x500d: 0x40777e20, 0x500e: 0x40778020, 0x500f: 0x40778220, + 0x5010: 0x40778420, 0x5011: 0x40778620, 0x5012: 0x40778820, 0x5013: 0x40778a20, + 0x5014: 0x40778c20, 0x5015: 0x40778e20, 0x5016: 0x40779020, 0x5017: 0x40779220, + 0x5018: 0x40779420, 0x5019: 0x40779620, 0x501a: 0x40779820, 0x501b: 0x40779a20, + 0x501c: 0x40779c20, 0x501d: 0x40779e20, 0x501e: 0x4077a020, 0x501f: 0x4077a220, + 0x5020: 0x4077a420, 0x5021: 0x4077a620, 0x5022: 0x4077a820, 0x5023: 0x4077aa20, + 0x5024: 0x4077ac20, 0x5025: 0x4077ae20, 0x5026: 0x4077b020, 0x5027: 0x4077b220, + 0x5028: 0x4077b420, 0x5029: 0x4077b620, 0x502a: 0x4077b820, 0x502b: 0x4077ba20, + 0x502c: 0x4077bc20, 0x502d: 0x4077be20, 0x502e: 0x4077c020, 0x502f: 0x4077c220, + 0x5030: 0x4077c420, 0x5031: 0x4077c620, 0x5032: 0x4077c820, 0x5033: 0x4077ca20, + 0x5034: 0x4077cc20, 0x5035: 0x4077ce20, 0x5036: 0x4077d020, 0x5037: 0x4077d220, + 0x5038: 0x4077d420, 0x5039: 0x4077d620, 0x503a: 0x4077d820, 0x503b: 0x4077da20, + 0x503c: 0x4077dc20, 0x503d: 0x4077de20, 0x503e: 0x4077e020, 0x503f: 0x4077e220, + // Block 0x141, offset 0x5040 + 0x5040: 0x4077e420, 0x5041: 0x4077e620, 0x5042: 0x4077e820, 0x5043: 0x4077ea20, + 0x5044: 0x4077ec20, 0x5045: 0x4077ee20, 0x5046: 0x4077f020, 0x5047: 0x4077f220, + 0x5048: 0x4077f420, 0x5049: 0x4077f620, 0x504a: 0x4077f820, 0x504b: 0x4077fa20, + 0x504c: 0x4077fc20, 0x504d: 0x4077fe20, 0x504e: 0x40780020, 0x504f: 0x40780220, + 0x5050: 0x40780420, 0x5051: 0x40780620, 0x5052: 0x40780820, 0x5053: 0x40780a20, + 0x5054: 0x40780c20, 0x5055: 0x40780e20, 0x5056: 0x40781020, 0x5057: 0x40781220, + 0x5058: 0x40781420, 0x5059: 0x40781620, 0x505a: 0x40781820, 0x505b: 0x40781a20, + 0x505c: 0x40781c20, 0x505d: 0x40781e20, 0x505e: 0x40782020, 0x505f: 0x40782220, + 0x5060: 0x40782420, 0x5061: 0x40782620, 0x5062: 0x40782820, 0x5063: 0x40782a20, + 0x5064: 0x40782c20, 0x5065: 0x40782e20, 0x5066: 0x40783020, 0x5067: 0x40783220, + 0x5068: 0x40783420, 0x5069: 0x40783620, 0x506a: 0x40783820, 0x506b: 0x40783a20, + 0x506c: 0x40783c20, 0x506d: 0x40783e20, 0x506e: 0x40784020, 0x506f: 0x40784220, + 0x5070: 0x40784420, 0x5071: 0x40784620, 0x5072: 0x40784820, 0x5073: 0x40784a20, + 0x5074: 0x40784c20, 0x5075: 0x40784e20, 0x5076: 0x40785020, 0x5077: 0x40785220, + 0x5078: 0x40785420, 0x5079: 0x40785620, 0x507a: 0x40785820, 0x507b: 0x40785a20, + 0x507c: 0x40785c20, 0x507d: 0x40785e20, 0x507e: 0x40786020, 0x507f: 0x40786220, + // Block 0x142, offset 0x5080 + 0x5080: 0x40786420, 0x5081: 0x40786620, 0x5082: 0x40786820, 0x5083: 0x40786a20, + 0x5084: 0x40786c20, 0x5085: 0x40786e20, 0x5086: 0x40787020, 0x5087: 0x40787220, + 0x5088: 0x40787420, 0x5089: 0x40787620, 0x508a: 0x40787820, 0x508b: 0x40787a20, + 0x508c: 0x40787c20, 0x508d: 0x40787e20, 0x508e: 0x40788020, 0x508f: 0x40788220, + 0x5090: 0x40788420, 0x5091: 0x40788620, 0x5092: 0x40788820, 0x5093: 0x40788a20, + 0x5094: 0x40788c20, 0x5095: 0x40788e20, 0x5096: 0x40789020, 0x5097: 0x40789220, + 0x5098: 0x40789420, 0x5099: 0x40789620, 0x509a: 0x40789820, 0x509b: 0x40789a20, + 0x509c: 0x40789c20, 0x509d: 0x40789e20, 0x509e: 0x4078a020, 0x509f: 0x4078a220, + 0x50a0: 0x4078a420, 0x50a1: 0x4078a620, 0x50a2: 0x4078a820, 0x50a3: 0x4078aa20, + 0x50a4: 0x4078ac20, 0x50a5: 0x4078ae20, 0x50a6: 0x4078b020, 0x50a7: 0x4078b220, + 0x50a8: 0x4078b420, 0x50a9: 0x4078b620, 0x50aa: 0x4078b820, 0x50ab: 0x4078ba20, + 0x50ac: 0x4078bc20, 0x50ad: 0x4078be20, 0x50ae: 0x4078c020, 0x50af: 0x4078c220, + 0x50b0: 0x4078c420, 0x50b1: 0x4078c620, 0x50b2: 0x4078c820, 0x50b3: 0x4078ca20, + 0x50b4: 0x4078cc20, 0x50b5: 0x4078ce20, 0x50b6: 0x4078d020, 0x50b7: 0x4078d220, + 0x50b8: 0x4078d420, 0x50b9: 0x4078d620, 0x50ba: 0x4078d820, 0x50bb: 0x4078da20, + 0x50bc: 0x4078dc20, 0x50bd: 0x4078de20, 0x50be: 0x4078e020, 0x50bf: 0x4078e220, + // Block 0x143, offset 0x50c0 + 0x50c0: 0x4078e420, 0x50c1: 0x4078e620, 0x50c2: 0x4078e820, 0x50c3: 0x4078ea20, + 0x50c4: 0x4078ec20, 0x50c5: 0x4078ee20, 0x50c6: 0x4078f020, 0x50c7: 0x4078f220, + 0x50c8: 0x4078f420, 0x50c9: 0x4078f620, 0x50ca: 0x4078f820, 0x50cb: 0x4078fa20, + 0x50cc: 0x4078fc20, 0x50cd: 0x4078fe20, 0x50ce: 0x40790020, 0x50cf: 0x40790220, + 0x50d0: 0x40790420, 0x50d1: 0x40790620, 0x50d2: 0x40790820, 0x50d3: 0x40790a20, + 0x50d4: 0x40790c20, 0x50d5: 0x40790e20, 0x50d6: 0x40791020, 0x50d7: 0x40791220, + 0x50d8: 0x40791420, 0x50d9: 0x40791620, 0x50da: 0x40791820, 0x50db: 0x40791a20, + 0x50dc: 0x40791c20, 0x50dd: 0x40791e20, 0x50de: 0x40792020, 0x50df: 0x40792220, + 0x50e0: 0x40792420, 0x50e1: 0x40792620, 0x50e2: 0x40792820, 0x50e3: 0x40792a20, + 0x50e4: 0x40792c20, 0x50e5: 0x40792e20, 0x50e6: 0x40793020, 0x50e7: 0x40793220, + 0x50e8: 0x40793420, 0x50e9: 0x40793620, 0x50ea: 0x40793820, 0x50eb: 0x40793a20, + 0x50ec: 0x40793c20, 0x50ed: 0x40793e20, 0x50ee: 0x40794020, 0x50ef: 0x40794220, + 0x50f0: 0x40794420, 0x50f1: 0x40794620, 0x50f2: 0x40794820, 0x50f3: 0x40794a20, + 0x50f4: 0x40794c20, 0x50f5: 0x40794e20, 0x50f6: 0x40795020, 0x50f7: 0x40795220, + 0x50f8: 0x40795420, 0x50f9: 0x40795620, 0x50fa: 0x40795820, 0x50fb: 0x40795a20, + 0x50fc: 0x40795c20, 0x50fd: 0x40795e20, 0x50fe: 0x40796020, 0x50ff: 0x40796220, + // Block 0x144, offset 0x5100 + 0x5100: 0x40796420, 0x5101: 0x40796620, 0x5102: 0x40796820, 0x5103: 0x40796a20, + 0x5104: 0x40796c20, 0x5105: 0x40796e20, 0x5106: 0x40797020, 0x5107: 0x40797220, + 0x5108: 0x40797420, 0x5109: 0x40797620, 0x510a: 0x40797820, 0x510b: 0x40797a20, + 0x510c: 0x40797c20, 0x510d: 0x40797e20, 0x510e: 0x40798020, 0x510f: 0x40798220, + 0x5110: 0x40798420, 0x5111: 0x40798620, 0x5112: 0x40798820, 0x5113: 0x40798a20, + 0x5114: 0x40798c20, 0x5115: 0x40798e20, 0x5116: 0x40799020, 0x5117: 0x40799220, + 0x5118: 0x40799420, 0x5119: 0x40799620, 0x511a: 0x40799820, 0x511b: 0x40799a20, + 0x511c: 0x40799c20, 0x511d: 0x40799e20, 0x511e: 0x4079a020, 0x511f: 0x4079a220, + 0x5120: 0x4079a420, 0x5121: 0x4079a620, 0x5122: 0x4079a820, 0x5123: 0x4079aa20, + 0x5124: 0x4079ac20, 0x5125: 0x4079ae20, 0x5126: 0x4079b020, 0x5127: 0x4079b220, + 0x5128: 0x4079b420, 0x5129: 0x4079b620, 0x512a: 0x4079b820, 0x512b: 0x4079ba20, + 0x512c: 0x4079bc20, 0x512d: 0x4079be20, 0x512e: 0x4079c020, 0x512f: 0x4079c220, + 0x5130: 0x4079c420, 0x5131: 0x4079c620, 0x5132: 0x4079c820, 0x5133: 0x4079ca20, + 0x5134: 0x4079cc20, 0x5135: 0x4079ce20, 0x5136: 0x4079d020, 0x5137: 0x4079d220, + 0x5138: 0x4079d420, 0x5139: 0x4079d620, 0x513a: 0x4079d820, 0x513b: 0x4079da20, + 0x513c: 0x4079dc20, 0x513d: 0x4079de20, 0x513e: 0x4079e020, 0x513f: 0x4079e220, + // Block 0x145, offset 0x5140 + 0x5140: 0x4079e420, 0x5141: 0x4079e620, 0x5142: 0x4079e820, 0x5143: 0x4079ea20, + 0x5144: 0x4079ec20, 0x5145: 0x4079ee20, 0x5146: 0x4079f020, 0x5147: 0x4079f220, + 0x5148: 0x4079f420, 0x5149: 0x4079f620, 0x514a: 0x4079f820, 0x514b: 0x4079fa20, + 0x514c: 0x4079fc20, 0x514d: 0x4079fe20, 0x514e: 0x407a0020, 0x514f: 0x407a0220, + 0x5150: 0x407a0420, 0x5151: 0x407a0620, 0x5152: 0x407a0820, 0x5153: 0x407a0a20, + 0x5154: 0x407a0c20, 0x5155: 0x407a0e20, 0x5156: 0x407a1020, 0x5157: 0x407a1220, + 0x5158: 0x407a1420, 0x5159: 0x407a1620, 0x515a: 0x407a1820, 0x515b: 0x407a1a20, + 0x515c: 0x407a1c20, 0x515d: 0x407a1e20, 0x515e: 0x407a2020, 0x515f: 0x407a2220, + 0x5160: 0x407a2420, 0x5161: 0x407a2620, 0x5162: 0x407a2820, 0x5163: 0x407a2a20, + 0x5164: 0x407a2c20, 0x5165: 0x407a2e20, 0x5166: 0x407a3020, 0x5167: 0x407a3220, + 0x5168: 0x407a3420, 0x5169: 0x407a3620, 0x516a: 0x407a3820, 0x516b: 0x407a3a20, + 0x516c: 0x407a3c20, 0x516d: 0x407a3e20, 0x516e: 0x407a4020, 0x516f: 0x407a4220, + 0x5170: 0x407a4420, 0x5171: 0x407a4620, 0x5172: 0x407a4820, 0x5173: 0x407a4a20, + 0x5174: 0x407a4c20, 0x5175: 0x407a4e20, 0x5176: 0x407a5020, 0x5177: 0x407a5220, + 0x5178: 0x407a5420, 0x5179: 0x407a5620, 0x517a: 0x407a5820, 0x517b: 0x407a5a20, + 0x517c: 0x407a5c20, 0x517d: 0x407a5e20, 0x517e: 0x407a6020, 0x517f: 0x407a6220, + // Block 0x146, offset 0x5180 + 0x5180: 0x407a6420, 0x5181: 0x407a6620, 0x5182: 0x407a6820, 0x5183: 0x407a6a20, + 0x5184: 0x407a6c20, 0x5185: 0x407a6e20, 0x5186: 0x407a7020, 0x5187: 0x407a7220, + 0x5188: 0x407a7420, 0x5189: 0x407a7620, 0x518a: 0x407a7820, 0x518b: 0x407a7a20, + 0x518c: 0x407a7c20, 0x518d: 0x407a7e20, 0x518e: 0x407a8020, 0x518f: 0x407a8220, + 0x5190: 0x407a8420, 0x5191: 0x407a8620, 0x5192: 0x407a8820, 0x5193: 0x407a8a20, + 0x5194: 0x407a8c20, 0x5195: 0x407a8e20, 0x5196: 0x407a9020, 0x5197: 0x407a9220, + 0x5198: 0x407a9420, 0x5199: 0x407a9620, 0x519a: 0x407a9820, 0x519b: 0x407a9a20, + 0x519c: 0x407a9c20, 0x519d: 0x407a9e20, 0x519e: 0x407aa020, 0x519f: 0x407aa220, + 0x51a0: 0x407aa420, 0x51a1: 0x407aa620, 0x51a2: 0x407aa820, 0x51a3: 0x407aaa20, + 0x51a4: 0x407aac20, 0x51a5: 0x407aae20, 0x51a6: 0x407ab020, 0x51a7: 0x407ab220, + 0x51a8: 0x407ab420, 0x51a9: 0x407ab620, 0x51aa: 0x407ab820, 0x51ab: 0x407aba20, + 0x51ac: 0x407abc20, 0x51ad: 0x407abe20, 0x51ae: 0x407ac020, 0x51af: 0x407ac220, + 0x51b0: 0x407ac420, 0x51b1: 0x407ac620, 0x51b2: 0x407ac820, 0x51b3: 0x407aca20, + 0x51b4: 0x407acc20, 0x51b5: 0x407ace20, 0x51b6: 0x407ad020, 0x51b7: 0x407ad220, + 0x51b8: 0x407ad420, 0x51b9: 0x407ad620, 0x51ba: 0x407ad820, 0x51bb: 0x407ada20, + 0x51bc: 0x407adc20, 0x51bd: 0x407ade20, 0x51be: 0x407ae020, 0x51bf: 0x407ae220, + // Block 0x147, offset 0x51c0 + 0x51c0: 0x407ae420, 0x51c1: 0x407ae620, 0x51c2: 0x407ae820, 0x51c3: 0x407aea20, + 0x51c4: 0x407aec20, 0x51c5: 0x407aee20, 0x51c6: 0x407af020, 0x51c7: 0x407af220, + 0x51c8: 0x407af420, 0x51c9: 0x407af620, 0x51ca: 0x407af820, 0x51cb: 0x407afa20, + 0x51cc: 0x407afc20, 0x51cd: 0x407afe20, 0x51ce: 0x407b0020, 0x51cf: 0x407b0220, + 0x51d0: 0x407b0420, 0x51d1: 0x407b0620, 0x51d2: 0x407b0820, 0x51d3: 0x407b0a20, + 0x51d4: 0x407b0c20, 0x51d5: 0x407b0e20, 0x51d6: 0x407b1020, 0x51d7: 0x407b1220, + 0x51d8: 0x407b1420, 0x51d9: 0x407b1620, 0x51da: 0x407b1820, 0x51db: 0x407b1a20, + 0x51dc: 0x407b1c20, 0x51dd: 0x407b1e20, 0x51de: 0x407b2020, 0x51df: 0x407b2220, + 0x51e0: 0x407b2420, 0x51e1: 0x407b2620, 0x51e2: 0x407b2820, 0x51e3: 0x407b2a20, + 0x51e4: 0x407b2c20, 0x51e5: 0x407b2e20, 0x51e6: 0x407b3020, 0x51e7: 0x407b3220, + 0x51e8: 0x407b3420, 0x51e9: 0x407b3620, 0x51ea: 0x407b3820, 0x51eb: 0x407b3a20, + 0x51ec: 0x407b3c20, 0x51ed: 0x407b3e20, 0x51ee: 0x407b4020, 0x51ef: 0x407b4220, + 0x51f0: 0x407b4420, 0x51f1: 0x407b4620, 0x51f2: 0x407b4820, 0x51f3: 0x407b4a20, + 0x51f4: 0x407b4c20, 0x51f5: 0x407b4e20, 0x51f6: 0x407b5020, 0x51f7: 0x407b5220, + 0x51f8: 0x407b5420, 0x51f9: 0x407b5620, 0x51fa: 0x407b5820, 0x51fb: 0x407b5a20, + 0x51fc: 0x407b5c20, 0x51fd: 0x407b5e20, 0x51fe: 0x407b6020, 0x51ff: 0x407b6220, + // Block 0x148, offset 0x5200 + 0x5200: 0x407b6420, 0x5201: 0x407b6620, 0x5202: 0x407b6820, 0x5203: 0x407b6a20, + 0x5204: 0x407b6c20, 0x5205: 0x407b6e20, 0x5206: 0x407b7020, 0x5207: 0x407b7220, + 0x5208: 0x407b7420, 0x5209: 0x407b7620, 0x520a: 0x407b7820, 0x520b: 0x407b7a20, + 0x520c: 0x407b7c20, 0x520d: 0x407b7e20, 0x520e: 0x407b8020, 0x520f: 0x407b8220, + 0x5210: 0x407b8420, 0x5211: 0x407b8620, 0x5212: 0x407b8820, 0x5213: 0x407b8a20, + 0x5214: 0x407b8c20, 0x5215: 0x407b8e20, 0x5216: 0x407b9020, 0x5217: 0x407b9220, + 0x5218: 0x407b9420, 0x5219: 0x407b9620, 0x521a: 0x407b9820, 0x521b: 0x407b9a20, + 0x521c: 0x407b9c20, 0x521d: 0x407b9e20, 0x521e: 0x407ba020, 0x521f: 0x407ba220, + 0x5220: 0x407ba420, 0x5221: 0x407ba620, 0x5222: 0x407ba820, 0x5223: 0x407baa20, + 0x5224: 0x407bac20, 0x5225: 0x407bae20, 0x5226: 0x407bb020, 0x5227: 0x407bb220, + 0x5228: 0x407bb420, 0x5229: 0x407bb620, 0x522a: 0x407bb820, 0x522b: 0x407bba20, + 0x522c: 0x407bbc20, 0x522d: 0x407bbe20, 0x522e: 0x407bc020, 0x522f: 0x407bc220, + 0x5230: 0x407bc420, 0x5231: 0x407bc620, 0x5232: 0x407bc820, 0x5233: 0x407bca20, + 0x5234: 0x407bcc20, 0x5235: 0x407bce20, 0x5236: 0x407bd020, 0x5237: 0x407bd220, + 0x5238: 0x407bd420, 0x5239: 0x407bd620, 0x523a: 0x407bd820, 0x523b: 0x407bda20, + 0x523c: 0x407bdc20, 0x523d: 0x407bde20, 0x523e: 0x407be020, 0x523f: 0x407be220, + // Block 0x149, offset 0x5240 + 0x5240: 0x407be420, 0x5241: 0x407be620, 0x5242: 0x407be820, 0x5243: 0x407bea20, + 0x5244: 0x407bec20, 0x5245: 0x407bee20, 0x5246: 0x407bf020, 0x5247: 0x407bf220, + 0x5248: 0x407bf420, 0x5249: 0x407bf620, 0x524a: 0x407bf820, 0x524b: 0x407bfa20, + 0x524c: 0x407bfc20, 0x524d: 0x407bfe20, 0x524e: 0x407c0020, 0x524f: 0x407c0220, + 0x5250: 0x407c0420, 0x5251: 0x407c0620, 0x5252: 0x407c0820, 0x5253: 0x407c0a20, + 0x5254: 0x407c0c20, 0x5255: 0x407c0e20, 0x5256: 0x407c1020, 0x5257: 0x407c1220, + 0x5258: 0x407c1420, 0x5259: 0x407c1620, 0x525a: 0x407c1820, 0x525b: 0x407c1a20, + 0x525c: 0x407c1c20, 0x525d: 0x407c1e20, 0x525e: 0x407c2020, 0x525f: 0x407c2220, + 0x5260: 0x407c2420, 0x5261: 0x407c2620, 0x5262: 0x407c2820, 0x5263: 0x407c2a20, + 0x5264: 0x407c2c20, 0x5265: 0x407c2e20, 0x5266: 0x407c3020, 0x5267: 0x407c3220, + 0x5268: 0x407c3420, 0x5269: 0x407c3620, 0x526a: 0x407c3820, 0x526b: 0x407c3a20, + 0x526c: 0x407c3c20, 0x526d: 0x407c3e20, 0x526e: 0x407c4020, 0x526f: 0x407c4220, + 0x5270: 0x407c4420, 0x5271: 0x407c4620, 0x5272: 0x407c4820, 0x5273: 0x407c4a20, + 0x5274: 0x407c4c20, 0x5275: 0x407c4e20, 0x5276: 0x407c5020, 0x5277: 0x407c5220, + 0x5278: 0x407c5420, 0x5279: 0x407c5620, 0x527a: 0x407c5820, 0x527b: 0x407c5a20, + 0x527c: 0x407c5c20, 0x527d: 0x407c5e20, 0x527e: 0x407c6020, 0x527f: 0x407c6220, + // Block 0x14a, offset 0x5280 + 0x5280: 0x407c6420, 0x5281: 0x407c6620, 0x5282: 0x407c6820, 0x5283: 0x407c6a20, + 0x5284: 0x407c6c20, 0x5285: 0x407c6e20, 0x5286: 0x407c7020, 0x5287: 0x407c7220, + 0x5288: 0x407c7420, 0x5289: 0x407c7620, 0x528a: 0x407c7820, 0x528b: 0x407c7a20, + 0x528c: 0x407c7c20, 0x528d: 0x407c7e20, 0x528e: 0x407c8020, 0x528f: 0x407c8220, + 0x5290: 0x407c8420, 0x5291: 0x407c8620, 0x5292: 0x407c8820, 0x5293: 0x407c8a20, + 0x5294: 0x407c8c20, 0x5295: 0x407c8e20, 0x5296: 0x407c9020, 0x5297: 0x407c9220, + 0x5298: 0x407c9420, 0x5299: 0x407c9620, 0x529a: 0x407c9820, 0x529b: 0x407c9a20, + 0x529c: 0x407c9c20, 0x529d: 0x407c9e20, 0x529e: 0x407ca020, 0x529f: 0x407ca220, + 0x52a0: 0x407ca420, 0x52a1: 0x407ca620, 0x52a2: 0x407ca820, 0x52a3: 0x407caa20, + 0x52a4: 0x407cac20, 0x52a5: 0x407cae20, 0x52a6: 0x407cb020, 0x52a7: 0x407cb220, + 0x52a8: 0x407cb420, 0x52a9: 0x407cb620, 0x52aa: 0x407cb820, 0x52ab: 0x407cba20, + 0x52ac: 0x407cbc20, 0x52ad: 0x407cbe20, 0x52ae: 0x407cc020, 0x52af: 0x407cc220, + 0x52b0: 0x407cc420, 0x52b1: 0x407cc620, 0x52b2: 0x407cc820, 0x52b3: 0x407cca20, + 0x52b4: 0x407ccc20, 0x52b5: 0x407cce20, 0x52b6: 0x407cd020, 0x52b7: 0x407cd220, + 0x52b8: 0x407cd420, 0x52b9: 0x407cd620, 0x52ba: 0x407cd820, 0x52bb: 0x407cda20, + 0x52bc: 0x407cdc20, 0x52bd: 0x407cde20, 0x52be: 0x407ce020, 0x52bf: 0x407ce220, + // Block 0x14b, offset 0x52c0 + 0x52c0: 0x407ce420, 0x52c1: 0x407ce620, 0x52c2: 0x407ce820, 0x52c3: 0x407cea20, + 0x52c4: 0x407cec20, 0x52c5: 0x407cee20, 0x52c6: 0x407cf020, 0x52c7: 0x407cf220, + 0x52c8: 0x407cf420, 0x52c9: 0x407cf620, 0x52ca: 0x407cf820, 0x52cb: 0x407cfa20, + 0x52cc: 0x407cfc20, 0x52cd: 0x407cfe20, 0x52ce: 0x407d0020, 0x52cf: 0x407d0220, + 0x52d0: 0x407d0420, 0x52d1: 0x407d0620, 0x52d2: 0x407d0820, 0x52d3: 0x407d0a20, + 0x52d4: 0x407d0c20, 0x52d5: 0x407d0e20, 0x52d6: 0x407d1020, 0x52d7: 0x407d1220, + 0x52d8: 0x407d1420, 0x52d9: 0x407d1620, 0x52da: 0x407d1820, 0x52db: 0x407d1a20, + 0x52dc: 0x407d1c20, 0x52dd: 0x407d1e20, 0x52de: 0x407d2020, 0x52df: 0x407d2220, + 0x52e0: 0x407d2420, 0x52e1: 0x407d2620, 0x52e2: 0x407d2820, 0x52e3: 0x407d2a20, + 0x52e4: 0x407d2c20, 0x52e5: 0x407d2e20, 0x52e6: 0x407d3020, 0x52e7: 0x407d3220, + 0x52e8: 0x407d3420, 0x52e9: 0x407d3620, 0x52ea: 0x407d3820, 0x52eb: 0x407d3a20, + 0x52ec: 0x407d3c20, 0x52ed: 0x407d3e20, 0x52ee: 0x407d4020, 0x52ef: 0x407d4220, + 0x52f0: 0x407d4420, 0x52f1: 0x407d4620, 0x52f2: 0x407d4820, 0x52f3: 0x407d4a20, + 0x52f4: 0x407d4c20, 0x52f5: 0x407d4e20, 0x52f6: 0x407d5020, 0x52f7: 0x407d5220, + 0x52f8: 0x407d5420, 0x52f9: 0x407d5620, 0x52fa: 0x407d5820, 0x52fb: 0x407d5a20, + 0x52fc: 0x407d5c20, 0x52fd: 0x407d5e20, 0x52fe: 0x407d6020, 0x52ff: 0x407d6220, + // Block 0x14c, offset 0x5300 + 0x5300: 0x407d6420, 0x5301: 0x407d6620, 0x5302: 0x407d6820, 0x5303: 0x407d6a20, + 0x5304: 0x407d6c20, 0x5305: 0x407d6e20, 0x5306: 0x407d7020, 0x5307: 0x407d7220, + 0x5308: 0x407d7420, 0x5309: 0x407d7620, 0x530a: 0x407d7820, 0x530b: 0x407d7a20, + 0x530c: 0x407d7c20, 0x530d: 0x407d7e20, 0x530e: 0x407d8020, 0x530f: 0x407d8220, + 0x5310: 0x407d8420, 0x5311: 0x407d8620, 0x5312: 0x407d8820, 0x5313: 0x407d8a20, + 0x5314: 0x407d8c20, 0x5315: 0x407d8e20, 0x5316: 0x407d9020, 0x5317: 0x407d9220, + 0x5318: 0x407d9420, 0x5319: 0x407d9620, 0x531a: 0x407d9820, 0x531b: 0x407d9a20, + 0x531c: 0x407d9c20, 0x531d: 0x407d9e20, 0x531e: 0x407da020, 0x531f: 0x407da220, + 0x5320: 0x407da420, 0x5321: 0x407da620, 0x5322: 0x407da820, 0x5323: 0x407daa20, + 0x5324: 0x407dac20, 0x5325: 0x407dae20, 0x5326: 0x407db020, 0x5327: 0x407db220, + 0x5328: 0x407db420, 0x5329: 0x407db620, 0x532a: 0x407db820, 0x532b: 0x407dba20, + 0x532c: 0x407dbc20, 0x532d: 0x407dbe20, 0x532e: 0x407dc020, + // Block 0x14d, offset 0x5340 + 0x5340: 0xe0000394, 0x5341: 0xe000045f, 0x5342: 0xe0000534, 0x5343: 0xe0000610, + 0x5344: 0xe00006cc, 0x5345: 0xe0000771, 0x5346: 0xe000081d, 0x5347: 0xe00008c2, + 0x5348: 0xe0000462, 0x5349: 0xe0000537, 0x534a: 0xe0000613, 0x534b: 0xe00006cf, + 0x534c: 0xe0000774, 0x534d: 0xe0000820, 0x534e: 0xe00008c5, 0x534f: 0xe000053a, + 0x5350: 0xe0000616, 0x5351: 0xe00006d2, 0x5352: 0xe0000777, 0x5353: 0xe0000823, + 0x5354: 0xe00008c8, 0x5355: 0xe000027f, 0x5356: 0xe0000397, 0x5357: 0xe0000465, + 0x5358: 0xe000053d, 0x5359: 0xe0000619, 0x535a: 0xe00006d5, 0x535b: 0xe000077a, + 0x535c: 0xe0000826, 0x535d: 0xe00008cb, 0x535e: 0xe0000282, 0x535f: 0xe000039a, + 0x5360: 0xe0000468, 0x5361: 0xe0000540, 0x5362: 0xe000061c, 0x5363: 0xe000039d, + 0x5364: 0xe000046b, 0x5365: 0xe000046e, 0x5366: 0xe0000543, 0x5367: 0xe000061f, + 0x5368: 0xe00006d8, 0x5369: 0xe000077d, 0x536a: 0xe0000829, 0x536b: 0xe00008ce, + 0x536c: 0xe0000285, 0x536d: 0xe00003a0, 0x536e: 0xe0000471, 0x536f: 0xe0000474, + 0x5370: 0xe0000546, 0x5371: 0xe0000622, 0x5372: 0x4029a020, 0x5373: 0x4029a220, + 0x5374: 0xe0000288, 0x5375: 0xe00003a3, 0x5376: 0xe0000477, 0x5377: 0xe000047a, + 0x5378: 0xe0000549, 0x5379: 0xe0000625, 0x537a: 0xe000047d, 0x537b: 0xe0000480, + 0x537c: 0xe000054c, 0x537d: 0xe000054f, 0x537e: 0xe0000552, 0x537f: 0xe0000555, + // Block 0x14e, offset 0x5380 + 0x5380: 0xe00006db, 0x5381: 0xe0000780, 0x5382: 0xe0000783, 0x5383: 0xe0000786, + 0x5384: 0xe000082c, 0x5385: 0xe000082f, 0x5386: 0xe00008d1, 0x5387: 0xe00008d4, + 0x5388: 0xe00008d7, 0x5389: 0xe00008da, 0x538a: 0xe00003a6, 0x538b: 0xe0000483, + 0x538c: 0xe0000558, 0x538d: 0xe0000628, 0x538e: 0xe00006de, 0x538f: 0xe000028b, + 0x5390: 0xe00003a9, 0x5391: 0xe0000486, 0x5392: 0xe000055b, 0x5393: 0xe000055e, + 0x5394: 0xe000062b, 0x5395: 0xe000062e, 0x5396: 0x4029a420, 0x5397: 0x4029a620, + 0x5398: 0xe000028e, 0x5399: 0xe00003ac, 0x539a: 0x4029a820, 0x539b: 0x4029aa20, + 0x539c: 0x4029ac20, 0x539d: 0x4029ae20, 0x539e: 0x4029b020, 0x539f: 0x4029b220, + 0x53a0: 0x4029b420, 0x53a1: 0x4029b620, 0x53a2: 0x4029b820, + 0x53b0: 0x4003ca20, 0x53b1: 0x4003cc20, 0x53b2: 0x4003ce20, 0x53b3: 0x4003d020, + // Block 0x14f, offset 0x53c0 + 0x53c0: 0x407dc220, 0x53c1: 0x407dc420, 0x53c2: 0x407dc620, 0x53c3: 0x407dc820, + 0x53c4: 0x407dca20, 0x53c5: 0x407dcc20, 0x53c6: 0x407dce20, 0x53c7: 0x407dd020, + 0x53c8: 0x407dd220, 0x53c9: 0x407dd420, 0x53ca: 0x407dd620, 0x53cb: 0x407dd820, + 0x53cc: 0x407dda20, 0x53cd: 0x407ddc20, 0x53ce: 0x407dde20, 0x53cf: 0x407de020, + 0x53d0: 0x407de220, 0x53d1: 0x407de420, 0x53d2: 0x407de620, 0x53d3: 0x407de820, + 0x53d4: 0x407dea20, 0x53d5: 0x407dec20, 0x53d6: 0x407dee20, 0x53d7: 0x407df020, + 0x53d8: 0x407df220, 0x53d9: 0x407df420, 0x53da: 0x407df620, 0x53db: 0x407df820, + 0x53dc: 0x407dfa20, 0x53dd: 0x407dfc20, 0x53de: 0x407dfe20, 0x53df: 0x407e0020, + 0x53e0: 0x407e0220, 0x53e1: 0x407e0420, 0x53e2: 0x407e0620, 0x53e3: 0x407e0820, + 0x53e4: 0x407e0a20, 0x53e5: 0x407e0c20, 0x53e6: 0x407e0e20, 0x53e7: 0x407e1020, + 0x53e8: 0x407e1220, 0x53e9: 0x407e1420, 0x53ea: 0x407e1620, 0x53eb: 0x407e1820, + 0x53ec: 0x407e1a20, 0x53ed: 0x407e1c20, 0x53ee: 0x407e1e20, 0x53ef: 0x407e2020, + 0x53f0: 0x407e2220, 0x53f1: 0x407e2420, 0x53f2: 0x407e2620, 0x53f3: 0x407e2820, + 0x53f4: 0x407e2a20, 0x53f5: 0x407e2c20, 0x53f6: 0x407e2e20, 0x53f7: 0x407e3020, + 0x53f8: 0x407e3220, 0x53f9: 0x407e3420, 0x53fa: 0x407e3620, 0x53fb: 0x407e3820, + 0x53fc: 0x407e3a20, 0x53fd: 0x407e3c20, 0x53fe: 0x407e3e20, 0x53ff: 0x407e4020, + // Block 0x150, offset 0x5400 + 0x5400: 0x407e4220, 0x5401: 0x407e4420, 0x5402: 0x407e4620, 0x5403: 0x407e4820, + 0x5404: 0x407e4a20, 0x5405: 0x407e4c20, 0x5406: 0x407e4e20, 0x5407: 0x407e5020, + 0x5408: 0x407e5220, 0x5409: 0x407e5420, 0x540a: 0x407e5620, 0x540b: 0x407e5820, + 0x540c: 0x407e5a20, 0x540d: 0x407e5c20, 0x540e: 0x407e5e20, 0x540f: 0x407e6020, + 0x5410: 0x407e6220, 0x5411: 0x407e6420, 0x5412: 0x407e6620, 0x5413: 0x407e6820, + 0x5414: 0x407e6a20, 0x5415: 0x407e6c20, 0x5416: 0x407e6e20, 0x5417: 0x407e7020, + 0x5418: 0x407e7220, 0x5419: 0x407e7420, 0x541a: 0x407e7620, 0x541b: 0x407e7820, + 0x541c: 0x407e7a20, 0x541d: 0x407e7c20, 0x541e: 0x407e7e20, 0x541f: 0x407e8020, + 0x5420: 0x407e8220, 0x5421: 0x407e8420, 0x5422: 0x407e8620, 0x5423: 0x407e8820, + 0x5424: 0x407e8a20, 0x5425: 0x407e8c20, 0x5426: 0x407e8e20, 0x5427: 0x407e9020, + 0x5428: 0x407e9220, 0x5429: 0x407e9420, 0x542a: 0x407e9620, 0x542b: 0x407e9820, + 0x542c: 0x407e9a20, 0x542d: 0x407e9c20, 0x542e: 0x407e9e20, 0x542f: 0x407ea020, + 0x5430: 0x407ea220, 0x5431: 0x407ea420, 0x5432: 0x407ea620, 0x5433: 0x407ea820, + 0x5434: 0x407eaa20, 0x5435: 0x407eac20, 0x5436: 0x407eae20, 0x5437: 0x407eb020, + 0x5438: 0x407eb220, 0x5439: 0x407eb420, 0x543a: 0x407eb620, 0x543b: 0x407eb820, + 0x543c: 0x407eba20, 0x543d: 0x407ebc20, 0x543e: 0x407ebe20, 0x543f: 0x407ec020, + // Block 0x151, offset 0x5440 + 0x5440: 0x407ec220, 0x5441: 0x407ec420, 0x5442: 0x407ec620, 0x5443: 0x407ec820, + 0x5444: 0x407eca20, 0x5445: 0x407ecc20, 0x5446: 0x407ece20, 0x5447: 0x407ed020, + 0x5448: 0x407ed220, 0x5449: 0x407ed420, 0x544a: 0x407ed620, 0x544b: 0x407ed820, + 0x544c: 0x407eda20, 0x544d: 0x407edc20, 0x544e: 0x407ede20, 0x544f: 0x407ee020, + 0x5450: 0x407ee220, 0x5451: 0x407ee420, 0x5452: 0x407ee620, 0x5453: 0x407ee820, + 0x5454: 0x407eea20, 0x5455: 0x407eec20, 0x5456: 0x407eee20, 0x5457: 0x407ef020, + 0x5458: 0x407ef220, 0x5459: 0x407ef420, 0x545a: 0x407ef620, 0x545b: 0x407ef820, + 0x545c: 0x407efa20, 0x545d: 0x407efc20, 0x545e: 0x407efe20, 0x545f: 0x407f0020, + 0x5460: 0x407f0220, 0x5461: 0x407f0420, 0x5462: 0x407f0620, 0x5463: 0x407f0820, + 0x5464: 0x407f0a20, 0x5465: 0x407f0c20, 0x5466: 0x407f0e20, 0x5467: 0x407f1020, + 0x5468: 0x407f1220, 0x5469: 0x407f1420, 0x546a: 0x407f1620, 0x546b: 0x407f1820, + 0x546c: 0x407f1a20, 0x546d: 0x407f1c20, 0x546e: 0x407f1e20, 0x546f: 0x407f2020, + 0x5470: 0x407f2220, 0x5471: 0x407f2420, 0x5472: 0x407f2620, 0x5473: 0x407f2820, + 0x5474: 0x407f2a20, 0x5475: 0x407f2c20, 0x5476: 0x407f2e20, 0x5477: 0x407f3020, + 0x5478: 0x407f3220, 0x5479: 0x407f3420, 0x547a: 0x407f3620, 0x547b: 0x407f3820, + 0x547c: 0x407f3a20, 0x547d: 0x407f3c20, 0x547e: 0x407f3e20, 0x547f: 0x407f4020, + // Block 0x152, offset 0x5480 + 0x5480: 0x407f4220, 0x5481: 0x407f4420, 0x5482: 0x407f4620, 0x5483: 0x407f4820, + 0x5484: 0x407f4a20, 0x5485: 0x407f4c20, 0x5486: 0x407f4e20, 0x5487: 0x407f5020, + 0x5488: 0x407f5220, 0x5489: 0x407f5420, 0x548a: 0x407f5620, 0x548b: 0x407f5820, + 0x548c: 0x407f5a20, 0x548d: 0x407f5c20, 0x548e: 0x407f5e20, 0x548f: 0x407f6020, + 0x5490: 0x407f6220, 0x5491: 0x407f6420, 0x5492: 0x407f6620, 0x5493: 0x407f6820, + 0x5494: 0x407f6a20, 0x5495: 0x407f6c20, 0x5496: 0x407f6e20, 0x5497: 0x407f7020, + 0x5498: 0x407f7220, 0x5499: 0x407f7420, 0x549a: 0x407f7620, 0x549b: 0x407f7820, + 0x549c: 0x407f7a20, 0x549d: 0x407f7c20, 0x549e: 0x407f7e20, 0x549f: 0x407f8020, + 0x54a0: 0x407f8220, 0x54a1: 0x407f8420, 0x54a2: 0x407f8620, 0x54a3: 0x407f8820, + 0x54a4: 0x407f8a20, 0x54a5: 0x407f8c20, 0x54a6: 0x407f8e20, 0x54a7: 0x407f9020, + 0x54a8: 0x407f9220, 0x54a9: 0x407f9420, 0x54aa: 0x407f9620, 0x54ab: 0x407f9820, + 0x54ac: 0x407f9a20, 0x54ad: 0x407f9c20, 0x54ae: 0x407f9e20, 0x54af: 0x407fa020, + 0x54b0: 0x407fa220, 0x54b1: 0x407fa420, 0x54b2: 0x407fa620, 0x54b3: 0x407fa820, + 0x54b4: 0x407faa20, 0x54b5: 0x407fac20, 0x54b6: 0x407fae20, 0x54b7: 0x407fb020, + 0x54b8: 0x407fb220, 0x54b9: 0x407fb420, 0x54ba: 0x407fb620, 0x54bb: 0x407fb820, + 0x54bc: 0x407fba20, 0x54bd: 0x407fbc20, 0x54be: 0x407fbe20, 0x54bf: 0x407fc020, + // Block 0x153, offset 0x54c0 + 0x54c0: 0x407fc220, 0x54c1: 0x407fc420, 0x54c2: 0x407fc620, 0x54c3: 0x407fc820, + 0x54c4: 0x407fca20, 0x54c5: 0x407fcc20, 0x54c6: 0x407fce20, 0x54c7: 0x407fd020, + 0x54c8: 0x407fd220, 0x54c9: 0x407fd420, 0x54ca: 0x407fd620, 0x54cb: 0x407fd820, + 0x54cc: 0x407fda20, 0x54cd: 0x407fdc20, 0x54ce: 0x407fde20, 0x54cf: 0x407fe020, + 0x54d0: 0x407fe220, 0x54d1: 0x407fe420, 0x54d2: 0x407fe620, 0x54d3: 0x407fe820, + 0x54d4: 0x407fea20, 0x54d5: 0x407fec20, 0x54d6: 0x407fee20, 0x54d7: 0x407ff020, + 0x54d8: 0x407ff220, 0x54d9: 0x407ff420, 0x54da: 0x407ff620, 0x54db: 0x407ff820, + 0x54dc: 0x407ffa20, 0x54dd: 0x407ffc20, 0x54de: 0x407ffe20, 0x54df: 0x40800020, + 0x54e0: 0x40800220, 0x54e1: 0x40800420, 0x54e2: 0x40800620, 0x54e3: 0x40800820, + 0x54e4: 0x40800a20, 0x54e5: 0x40800c20, 0x54e6: 0x40800e20, 0x54e7: 0x40801020, + 0x54e8: 0x40801220, 0x54e9: 0x40801420, 0x54ea: 0x40801620, 0x54eb: 0x40801820, + 0x54ec: 0x40801a20, 0x54ed: 0x40801c20, 0x54ee: 0x40801e20, 0x54ef: 0x40802020, + 0x54f0: 0x40802220, 0x54f1: 0x40802420, 0x54f2: 0x40802620, 0x54f3: 0x40802820, + 0x54f4: 0x40802a20, 0x54f5: 0x40802c20, 0x54f6: 0x40802e20, 0x54f7: 0x40803020, + 0x54f8: 0x40803220, 0x54f9: 0x40803420, 0x54fa: 0x40803620, 0x54fb: 0x40803820, + 0x54fc: 0x40803a20, 0x54fd: 0x40803c20, 0x54fe: 0x40803e20, 0x54ff: 0x40804020, + // Block 0x154, offset 0x5500 + 0x5500: 0x40804220, 0x5501: 0x40804420, 0x5502: 0x40804620, 0x5503: 0x40804820, + 0x5504: 0x40804a20, 0x5505: 0x40804c20, 0x5506: 0x40804e20, 0x5507: 0x40805020, + 0x5508: 0x40805220, 0x5509: 0x40805420, 0x550a: 0x40805620, 0x550b: 0x40805820, + 0x550c: 0x40805a20, 0x550d: 0x40805c20, 0x550e: 0x40805e20, 0x550f: 0x40806020, + 0x5510: 0x40806220, 0x5511: 0x40806420, 0x5512: 0x40806620, 0x5513: 0x40806820, + 0x5514: 0x40806a20, 0x5515: 0x40806c20, 0x5516: 0x40806e20, 0x5517: 0x40807020, + 0x5518: 0x40807220, 0x5519: 0x40807420, 0x551a: 0x40807620, 0x551b: 0x40807820, + 0x551c: 0x40807a20, 0x551d: 0x40807c20, 0x551e: 0x40807e20, 0x551f: 0x40808020, + 0x5520: 0x40808220, 0x5521: 0x40808420, 0x5522: 0x40808620, 0x5523: 0x40808820, + 0x5524: 0x40808a20, 0x5525: 0x40808c20, 0x5526: 0x40808e20, 0x5527: 0x40809020, + 0x5528: 0x40809220, 0x5529: 0x40809420, 0x552a: 0x40809620, 0x552b: 0x40809820, + 0x552c: 0x40809a20, 0x552d: 0x40809c20, 0x552e: 0x40809e20, 0x552f: 0x4080a020, + 0x5530: 0x4080a220, 0x5531: 0x4080a420, 0x5532: 0x4080a620, 0x5533: 0x4080a820, + 0x5534: 0x4080aa20, 0x5535: 0x4080ac20, 0x5536: 0x4080ae20, 0x5537: 0x4080b020, + 0x5538: 0x4080b220, 0x5539: 0x4080b420, 0x553a: 0x4080b620, 0x553b: 0x4080b820, + 0x553c: 0x4080ba20, 0x553d: 0x4080bc20, 0x553e: 0x4080be20, 0x553f: 0x4080c020, + // Block 0x155, offset 0x5540 + 0x5540: 0x4080c220, 0x5541: 0x4080c420, 0x5542: 0x4080c620, 0x5543: 0x4080c820, + 0x5544: 0x4080ca20, 0x5545: 0x4080cc20, 0x5546: 0x4080ce20, 0x5547: 0x4080d020, + 0x5548: 0x4080d220, 0x5549: 0x4080d420, 0x554a: 0x4080d620, 0x554b: 0x4080d820, + 0x554c: 0x4080da20, 0x554d: 0x4080dc20, 0x554e: 0x4080de20, 0x554f: 0x4080e020, + 0x5550: 0x4080e220, 0x5551: 0x4080e420, 0x5552: 0x4080e620, 0x5553: 0x4080e820, + 0x5554: 0x4080ea20, 0x5555: 0x4080ec20, 0x5556: 0x4080ee20, 0x5557: 0x4080f020, + 0x5558: 0x4080f220, 0x5559: 0x4080f420, 0x555a: 0x4080f620, 0x555b: 0x4080f820, + 0x555c: 0x4080fa20, 0x555d: 0x4080fc20, 0x555e: 0x4080fe20, 0x555f: 0x40810020, + 0x5560: 0x40810220, 0x5561: 0x40810420, 0x5562: 0x40810620, 0x5563: 0x40810820, + 0x5564: 0x40810a20, 0x5565: 0x40810c20, 0x5566: 0x40810e20, 0x5567: 0x40811020, + 0x5568: 0x40811220, 0x5569: 0x40811420, 0x556a: 0x40811620, 0x556b: 0x40811820, + 0x556c: 0x40811a20, 0x556d: 0x40811c20, 0x556e: 0x40811e20, 0x556f: 0x40812020, + 0x5570: 0x40812220, 0x5571: 0x40812420, 0x5572: 0x40812620, 0x5573: 0x40812820, + 0x5574: 0x40812a20, 0x5575: 0x40812c20, 0x5576: 0x40812e20, 0x5577: 0x40813020, + 0x5578: 0x40813220, 0x5579: 0x40813420, 0x557a: 0x40813620, 0x557b: 0x40813820, + 0x557c: 0x40813a20, 0x557d: 0x40813c20, 0x557e: 0x40813e20, 0x557f: 0x40814020, + // Block 0x156, offset 0x5580 + 0x5580: 0x40814220, 0x5581: 0x40814420, 0x5582: 0x40814620, 0x5583: 0x40814820, + 0x5584: 0x40814a20, 0x5585: 0x40814c20, 0x5586: 0x40814e20, 0x5587: 0x40815020, + 0x5588: 0x40815220, 0x5589: 0x40815420, 0x558a: 0x40815620, 0x558b: 0x40815820, + 0x558c: 0x40815a20, 0x558d: 0x40815c20, 0x558e: 0x40815e20, 0x558f: 0x40816020, + 0x5590: 0x40816220, 0x5591: 0x40816420, 0x5592: 0x40816620, 0x5593: 0x40816820, + 0x5594: 0x40816a20, 0x5595: 0x40816c20, 0x5596: 0x40816e20, 0x5597: 0x40817020, + 0x5598: 0x40817220, 0x5599: 0x40817420, 0x559a: 0x40817620, 0x559b: 0x40817820, + 0x559c: 0x40817a20, 0x559d: 0x40817c20, 0x559e: 0x40817e20, 0x559f: 0x40818020, + 0x55a0: 0x40818220, 0x55a1: 0x40818420, 0x55a2: 0x40818620, 0x55a3: 0x40818820, + 0x55a4: 0x40818a20, 0x55a5: 0x40818c20, 0x55a6: 0x40818e20, 0x55a7: 0x40819020, + 0x55a8: 0x40819220, 0x55a9: 0x40819420, 0x55aa: 0x40819620, 0x55ab: 0x40819820, + 0x55ac: 0x40819a20, 0x55ad: 0x40819c20, 0x55ae: 0x40819e20, 0x55af: 0x4081a020, + 0x55b0: 0x4081a220, 0x55b1: 0x4081a420, 0x55b2: 0x4081a620, 0x55b3: 0x4081a820, + 0x55b4: 0x4081aa20, 0x55b5: 0x4081ac20, 0x55b6: 0x4081ae20, 0x55b7: 0x4081b020, + 0x55b8: 0x4081b220, 0x55b9: 0x4081b420, 0x55ba: 0x4081b620, 0x55bb: 0x4081b820, + 0x55bc: 0x4081ba20, 0x55bd: 0x4081bc20, 0x55be: 0x4081be20, 0x55bf: 0x4081c020, + // Block 0x157, offset 0x55c0 + 0x55c0: 0x4081c220, 0x55c1: 0x4081c420, 0x55c2: 0x4081c620, 0x55c3: 0x4081c820, + 0x55c4: 0x4081ca20, 0x55c5: 0x4081cc20, 0x55c6: 0x4081ce20, 0x55c7: 0x4081d020, + 0x55c8: 0x4081d220, 0x55c9: 0x4081d420, 0x55ca: 0x4081d620, 0x55cb: 0x4081d820, + 0x55cc: 0x4081da20, 0x55cd: 0x4081dc20, 0x55ce: 0x4081de20, 0x55cf: 0x4081e020, + 0x55d0: 0x4081e220, 0x55d1: 0x4081e420, 0x55d2: 0x4081e620, 0x55d3: 0x4081e820, + 0x55d4: 0x4081ea20, 0x55d5: 0x4081ec20, 0x55d6: 0x4081ee20, 0x55d7: 0x4081f020, + 0x55d8: 0x4081f220, 0x55d9: 0x4081f420, 0x55da: 0x4081f620, 0x55db: 0x4081f820, + 0x55dc: 0x4081fa20, 0x55dd: 0x4081fc20, 0x55de: 0x4081fe20, 0x55df: 0x40820020, + 0x55e0: 0x40820220, 0x55e1: 0x40820420, 0x55e2: 0x40820620, 0x55e3: 0x40820820, + 0x55e4: 0x40820a20, 0x55e5: 0x40820c20, 0x55e6: 0x40820e20, 0x55e7: 0x40821020, + 0x55e8: 0x40821220, 0x55e9: 0x40821420, 0x55ea: 0x40821620, 0x55eb: 0x40821820, + 0x55ec: 0x40821a20, 0x55ed: 0x40821c20, 0x55ee: 0x40821e20, 0x55ef: 0x40822020, + 0x55f0: 0x40822220, 0x55f1: 0x40822420, 0x55f2: 0x40822620, 0x55f3: 0x40822820, + 0x55f4: 0x40822a20, 0x55f5: 0x40822c20, 0x55f6: 0x40822e20, 0x55f7: 0x40823020, + 0x55f8: 0x40823220, 0x55f9: 0x40823420, 0x55fa: 0x40823620, 0x55fb: 0x40823820, + 0x55fc: 0x40823a20, 0x55fd: 0x40823c20, 0x55fe: 0x40823e20, 0x55ff: 0x40824020, + // Block 0x158, offset 0x5600 + 0x5600: 0x40824220, 0x5601: 0x40824420, 0x5602: 0x40824620, 0x5603: 0x40824820, + 0x5604: 0x40824a20, 0x5605: 0x40824c20, 0x5606: 0x40824e20, 0x5607: 0x40825020, + 0x5608: 0x40825220, 0x5609: 0x40825420, 0x560a: 0x40825620, 0x560b: 0x40825820, + 0x560c: 0x40825a20, 0x560d: 0x40825c20, 0x560e: 0x40825e20, 0x560f: 0x40826020, + 0x5610: 0x40826220, 0x5611: 0x40826420, 0x5612: 0x40826620, 0x5613: 0x40826820, + 0x5614: 0x40826a20, 0x5615: 0x40826c20, 0x5616: 0x40826e20, 0x5617: 0x40827020, + 0x5618: 0x40827220, 0x5619: 0x40827420, 0x561a: 0x40827620, 0x561b: 0x40827820, + 0x561c: 0x40827a20, 0x561d: 0x40827c20, 0x561e: 0x40827e20, 0x561f: 0x40828020, + 0x5620: 0x40828220, 0x5621: 0x40828420, 0x5622: 0x40828620, 0x5623: 0x40828820, + 0x5624: 0x40828a20, 0x5625: 0x40828c20, 0x5626: 0x40828e20, 0x5627: 0x40829020, + 0x5628: 0x40829220, 0x5629: 0x40829420, 0x562a: 0x40829620, 0x562b: 0x40829820, + 0x562c: 0x40829a20, 0x562d: 0x40829c20, 0x562e: 0x40829e20, 0x562f: 0x4082a020, + 0x5630: 0x4082a220, 0x5631: 0x4082a420, 0x5632: 0x4082a620, 0x5633: 0x4082a820, + 0x5634: 0x4082aa20, 0x5635: 0x4082ac20, 0x5636: 0x4082ae20, 0x5637: 0x4082b020, + 0x5638: 0x4082b220, 0x5639: 0x4082b420, 0x563a: 0x4082b620, 0x563b: 0x4082b820, + 0x563c: 0x4082ba20, 0x563d: 0x4082bc20, 0x563e: 0x4082be20, 0x563f: 0x4082c020, + // Block 0x159, offset 0x5640 + 0x5640: 0x4082c220, 0x5641: 0x4082c420, 0x5642: 0x4082c620, 0x5643: 0x4082c820, + 0x5644: 0x4082ca20, 0x5645: 0x4082cc20, 0x5646: 0x4082ce20, 0x5647: 0x4082d020, + 0x5648: 0x4082d220, 0x5649: 0x4082d420, 0x564a: 0x4082d620, 0x564b: 0x4082d820, + 0x564c: 0x4082da20, 0x564d: 0x4082dc20, 0x564e: 0x4082de20, 0x564f: 0x4082e020, + 0x5650: 0x4082e220, 0x5651: 0x4082e420, 0x5652: 0x4082e620, 0x5653: 0x4082e820, + 0x5654: 0x4082ea20, 0x5655: 0x4082ec20, 0x5656: 0x4082ee20, 0x5657: 0x4082f020, + 0x5658: 0x4082f220, 0x5659: 0x4082f420, 0x565a: 0x4082f620, 0x565b: 0x4082f820, + 0x565c: 0x4082fa20, 0x565d: 0x4082fc20, 0x565e: 0x4082fe20, 0x565f: 0x40830020, + 0x5660: 0x40830220, 0x5661: 0x40830420, 0x5662: 0x40830620, 0x5663: 0x40830820, + 0x5664: 0x40830a20, 0x5665: 0x40830c20, 0x5666: 0x40830e20, 0x5667: 0x40831020, + 0x5668: 0x40831220, 0x5669: 0x40831420, 0x566a: 0x40831620, 0x566b: 0x40831820, + 0x566c: 0x40831a20, 0x566d: 0x40831c20, 0x566e: 0x40831e20, 0x566f: 0x40832020, + 0x5670: 0x40832220, 0x5671: 0x40832420, 0x5672: 0x40832620, 0x5673: 0x40832820, + 0x5674: 0x40832a20, 0x5675: 0x40832c20, 0x5676: 0x40832e20, 0x5677: 0x40833020, + 0x5678: 0x40833220, 0x5679: 0x40833420, 0x567a: 0x40833620, 0x567b: 0x40833820, + 0x567c: 0x40833a20, 0x567d: 0x40833c20, 0x567e: 0x40833e20, 0x567f: 0x40834020, + // Block 0x15a, offset 0x5680 + 0x5680: 0x40834220, 0x5681: 0x40834420, 0x5682: 0x40834620, 0x5683: 0x40834820, + 0x5684: 0x40834a20, 0x5685: 0x40834c20, 0x5686: 0x40834e20, 0x5687: 0x40835020, + 0x5688: 0x40835220, 0x5689: 0x40835420, 0x568a: 0x40835620, 0x568b: 0x40835820, + 0x568c: 0x40835a20, 0x568d: 0x40835c20, 0x568e: 0x40835e20, 0x568f: 0x40836020, + 0x5690: 0x40836220, 0x5691: 0x40836420, 0x5692: 0x40836620, 0x5693: 0x40836820, + 0x5694: 0x40836a20, 0x5695: 0x40836c20, 0x5696: 0x40836e20, 0x5697: 0x40837020, + 0x5698: 0x40837220, 0x5699: 0x40837420, 0x569a: 0x40837620, 0x569b: 0x40837820, + 0x569c: 0x40837a20, 0x569d: 0x40837c20, 0x569e: 0x40837e20, 0x569f: 0x40838020, + 0x56a0: 0x40838220, 0x56a1: 0x40838420, 0x56a2: 0x40838620, 0x56a3: 0x40838820, + 0x56a4: 0x40838a20, 0x56a5: 0x40838c20, 0x56a6: 0x40838e20, 0x56a7: 0x40839020, + 0x56a8: 0x40839220, 0x56a9: 0x40839420, 0x56aa: 0x40839620, 0x56ab: 0x40839820, + 0x56ac: 0x40839a20, 0x56ad: 0x40839c20, 0x56ae: 0x40839e20, 0x56af: 0x4083a020, + 0x56b0: 0x4083a220, 0x56b1: 0x4083a420, 0x56b2: 0x4083a620, 0x56b3: 0x4083a820, + 0x56b4: 0x4083aa20, 0x56b5: 0x4083ac20, 0x56b6: 0x4083ae20, 0x56b7: 0x4083b020, + 0x56b8: 0x4083b220, 0x56b9: 0x4083b420, 0x56ba: 0x4083b620, 0x56bb: 0x4083b820, + 0x56bc: 0x4083ba20, 0x56bd: 0x4083bc20, 0x56be: 0x4083be20, 0x56bf: 0x4083c020, + // Block 0x15b, offset 0x56c0 + 0x56c0: 0x4083c220, 0x56c1: 0x4083c420, 0x56c2: 0x4083c620, 0x56c3: 0x4083c820, + 0x56c4: 0x4083ca20, 0x56c5: 0x4083cc20, 0x56c6: 0x4083ce20, 0x56c7: 0x4083d020, + 0x56c8: 0x4083d220, 0x56c9: 0x4083d420, 0x56ca: 0x4083d620, 0x56cb: 0x4083d820, + 0x56cc: 0x4083da20, 0x56cd: 0x4083dc20, 0x56ce: 0x4083de20, 0x56cf: 0x4083e020, + 0x56d0: 0x4083e220, 0x56d1: 0x4083e420, 0x56d2: 0x4083e620, 0x56d3: 0x4083e820, + 0x56d4: 0x4083ea20, 0x56d5: 0x4083ec20, 0x56d6: 0x4083ee20, 0x56d7: 0x4083f020, + 0x56d8: 0x4083f220, 0x56d9: 0x4083f420, 0x56da: 0x4083f620, 0x56db: 0x4083f820, + 0x56dc: 0x4083fa20, 0x56dd: 0x4083fc20, 0x56de: 0x4083fe20, 0x56df: 0x40840020, + 0x56e0: 0x40840220, 0x56e1: 0x40840420, 0x56e2: 0x40840620, 0x56e3: 0x40840820, + 0x56e4: 0x40840a20, 0x56e5: 0x40840c20, 0x56e6: 0x40840e20, 0x56e7: 0x40841020, + 0x56e8: 0x40841220, 0x56e9: 0x40841420, 0x56ea: 0x40841620, 0x56eb: 0x40841820, + 0x56ec: 0x40841a20, 0x56ed: 0x40841c20, 0x56ee: 0x40841e20, 0x56ef: 0x40842020, + 0x56f0: 0x40842220, 0x56f1: 0x40842420, 0x56f2: 0x40842620, 0x56f3: 0x40842820, + 0x56f4: 0x40842a20, 0x56f5: 0x40842c20, 0x56f6: 0x40842e20, 0x56f7: 0x40843020, + 0x56f8: 0x40843220, 0x56f9: 0x40843420, 0x56fa: 0x40843620, 0x56fb: 0x40843820, + 0x56fc: 0x40843a20, 0x56fd: 0x40843c20, 0x56fe: 0x40843e20, 0x56ff: 0x40844020, + // Block 0x15c, offset 0x5700 + 0x5700: 0x40844220, 0x5701: 0x40844420, 0x5702: 0x40844620, 0x5703: 0x40844820, + 0x5704: 0x40844a20, 0x5705: 0x40844c20, 0x5706: 0x40844e20, 0x5707: 0x40845020, + 0x5708: 0x40845220, 0x5709: 0x40845420, 0x570a: 0x40845620, 0x570b: 0x40845820, + 0x570c: 0x40845a20, 0x570d: 0x40845c20, 0x570e: 0x40845e20, 0x570f: 0x40846020, + 0x5710: 0x40846220, 0x5711: 0x40846420, 0x5712: 0x40846620, 0x5713: 0x40846820, + 0x5714: 0x40846a20, 0x5715: 0x40846c20, 0x5716: 0x40846e20, 0x5717: 0x40847020, + 0x5718: 0x40847220, 0x5719: 0x40847420, 0x571a: 0x40847620, 0x571b: 0x40847820, + 0x571c: 0x40847a20, 0x571d: 0x40847c20, 0x571e: 0x40847e20, 0x571f: 0x40848020, + 0x5720: 0x40848220, 0x5721: 0x40848420, 0x5722: 0x40848620, 0x5723: 0x40848820, + 0x5724: 0x40848a20, 0x5725: 0x40848c20, 0x5726: 0x40848e20, 0x5727: 0x40849020, + 0x5728: 0x40849220, 0x5729: 0x40849420, 0x572a: 0x40849620, 0x572b: 0x40849820, + 0x572c: 0x40849a20, 0x572d: 0x40849c20, 0x572e: 0x40849e20, 0x572f: 0x4084a020, + 0x5730: 0x4084a220, 0x5731: 0x4084a420, 0x5732: 0x4084a620, 0x5733: 0x4084a820, + 0x5734: 0x4084aa20, 0x5735: 0x4084ac20, 0x5736: 0x4084ae20, 0x5737: 0x4084b020, + 0x5738: 0x4084b220, 0x5739: 0x4084b420, 0x573a: 0x4084b620, 0x573b: 0x4084b820, + 0x573c: 0x4084ba20, 0x573d: 0x4084bc20, 0x573e: 0x4084be20, 0x573f: 0x4084c020, + // Block 0x15d, offset 0x5740 + 0x5740: 0x4084c220, 0x5741: 0x4084c420, 0x5742: 0x4084c620, 0x5743: 0x4084c820, + 0x5744: 0x4084ca20, 0x5745: 0x4084cc20, 0x5746: 0x4084ce20, 0x5747: 0x4084d020, + 0x5748: 0x4084d220, 0x5749: 0x4084d420, 0x574a: 0x4084d620, 0x574b: 0x4084d820, + 0x574c: 0x4084da20, 0x574d: 0x4084dc20, 0x574e: 0x4084de20, 0x574f: 0x4084e020, + 0x5750: 0x4084e220, 0x5751: 0x4084e420, 0x5752: 0x4084e620, 0x5753: 0x4084e820, + 0x5754: 0x4084ea20, 0x5755: 0x4084ec20, 0x5756: 0x4084ee20, 0x5757: 0x4084f020, + 0x5758: 0x4084f220, 0x5759: 0x4084f420, 0x575a: 0x4084f620, 0x575b: 0x4084f820, + 0x575c: 0x4084fa20, 0x575d: 0x4084fc20, 0x575e: 0x4084fe20, 0x575f: 0x40850020, + 0x5760: 0x40850220, 0x5761: 0x40850420, 0x5762: 0x40850620, 0x5763: 0x40850820, + 0x5764: 0x40850a20, 0x5765: 0x40850c20, 0x5766: 0x40850e20, 0x5767: 0x40851020, + 0x5768: 0x40851220, 0x5769: 0x40851420, 0x576a: 0x40851620, 0x576b: 0x40851820, + 0x576c: 0x40851a20, 0x576d: 0x40851c20, 0x576e: 0x40851e20, 0x576f: 0x40852020, + 0x5770: 0x40852220, 0x5771: 0x40852420, 0x5772: 0x40852620, 0x5773: 0x40852820, + 0x5774: 0x40852a20, 0x5775: 0x40852c20, 0x5776: 0x40852e20, 0x5777: 0x40853020, + 0x5778: 0x40853220, 0x5779: 0x40853420, 0x577a: 0x40853620, 0x577b: 0x40853820, + 0x577c: 0x40853a20, 0x577d: 0x40853c20, 0x577e: 0x40853e20, 0x577f: 0x40854020, + // Block 0x15e, offset 0x5780 + 0x5780: 0x40854220, 0x5781: 0x40854420, 0x5782: 0x40854620, 0x5783: 0x40854820, + 0x5784: 0x40854a20, 0x5785: 0x40854c20, 0x5786: 0x40854e20, 0x5787: 0x40855020, + 0x5788: 0x40855220, 0x5789: 0x40855420, 0x578a: 0x40855620, 0x578b: 0x40855820, + 0x578c: 0x40855a20, 0x578d: 0x40855c20, 0x578e: 0x40855e20, 0x578f: 0x40856020, + 0x5790: 0x40856220, 0x5791: 0x40856420, 0x5792: 0x40856620, 0x5793: 0x40856820, + 0x5794: 0x40856a20, 0x5795: 0x40856c20, 0x5796: 0x40856e20, 0x5797: 0x40857020, + 0x5798: 0x40857220, 0x5799: 0x40857420, 0x579a: 0x40857620, 0x579b: 0x40857820, + 0x579c: 0x40857a20, 0x579d: 0x40857c20, 0x579e: 0x40857e20, 0x579f: 0x40858020, + 0x57a0: 0x40858220, 0x57a1: 0x40858420, 0x57a2: 0x40858620, 0x57a3: 0x40858820, + 0x57a4: 0x40858a20, 0x57a5: 0x40858c20, 0x57a6: 0x40858e20, 0x57a7: 0x40859020, + 0x57a8: 0x40859220, 0x57a9: 0x40859420, 0x57aa: 0x40859620, 0x57ab: 0x40859820, + 0x57ac: 0x40859a20, 0x57ad: 0x40859c20, 0x57ae: 0x40859e20, 0x57af: 0x4085a020, + 0x57b0: 0x4085a220, 0x57b1: 0x4085a420, 0x57b2: 0x4085a620, 0x57b3: 0x4085a820, + 0x57b4: 0x4085aa20, 0x57b5: 0x4085ac20, 0x57b6: 0x4085ae20, 0x57b7: 0x4085b020, + 0x57b8: 0x4085b220, 0x57b9: 0x4085b420, 0x57ba: 0x4085b620, 0x57bb: 0x4085b820, + 0x57bc: 0x4085ba20, 0x57bd: 0x4085bc20, 0x57be: 0x4085be20, 0x57bf: 0x4085c020, + // Block 0x15f, offset 0x57c0 + 0x57c0: 0x4085c220, 0x57c1: 0x4085c420, 0x57c2: 0x4085c620, 0x57c3: 0x4085c820, + 0x57c4: 0x4085ca20, 0x57c5: 0x4085cc20, 0x57c6: 0x4085ce20, 0x57c7: 0x4085d020, + 0x57c8: 0x4085d220, 0x57c9: 0x4085d420, 0x57ca: 0x4085d620, 0x57cb: 0x4085d820, + 0x57cc: 0x4085da20, 0x57cd: 0x4085dc20, 0x57ce: 0x4085de20, 0x57cf: 0x4085e020, + 0x57d0: 0x4085e220, 0x57d1: 0x4085e420, 0x57d2: 0x4085e620, 0x57d3: 0x4085e820, + 0x57d4: 0x4085ea20, 0x57d5: 0x4085ec20, 0x57d6: 0x4085ee20, 0x57d7: 0x4085f020, + 0x57d8: 0x4085f220, 0x57d9: 0x4085f420, 0x57da: 0x4085f620, 0x57db: 0x4085f820, + 0x57dc: 0x4085fa20, 0x57dd: 0x4085fc20, 0x57de: 0x4085fe20, 0x57df: 0x40860020, + 0x57e0: 0x40860220, 0x57e1: 0x40860420, 0x57e2: 0x40860620, 0x57e3: 0x40860820, + 0x57e4: 0x40860a20, 0x57e5: 0x40860c20, 0x57e6: 0x40860e20, 0x57e7: 0x40861020, + 0x57e8: 0x40861220, 0x57e9: 0x40861420, 0x57ea: 0x40861620, 0x57eb: 0x40861820, + 0x57ec: 0x40861a20, 0x57ed: 0x40861c20, 0x57ee: 0x40861e20, + // Block 0x160, offset 0x5800 + 0x5800: 0x405e3a20, 0x5801: 0x405e3c20, 0x5802: 0x405e3e20, 0x5803: 0x405e4020, + 0x5804: 0x405e4220, 0x5805: 0x405e4420, 0x5806: 0x405e4620, 0x5807: 0x405e4820, + 0x5808: 0x405e4a20, 0x5809: 0x405e4c20, 0x580a: 0x405e4e20, 0x580b: 0x405e5020, + 0x580c: 0x405e5220, 0x580d: 0x405e5420, 0x580e: 0x405e5620, 0x580f: 0x405e5820, + 0x5810: 0x405e5a20, 0x5811: 0x405e5c20, 0x5812: 0x405e5e20, 0x5813: 0x405e6020, + 0x5814: 0x405e6220, 0x5815: 0x405e6420, 0x5816: 0x405e6620, 0x5817: 0x405e6820, + 0x5818: 0x405e6a20, 0x5819: 0x405e6c20, 0x581a: 0x405e6e20, 0x581b: 0x405e7020, + 0x581c: 0x405e7220, 0x581d: 0x405e7420, 0x581e: 0x405e7620, 0x581f: 0x405e7820, + 0x5820: 0x405e7a20, 0x5821: 0x405e7c20, 0x5822: 0x405e7e20, 0x5823: 0x405e8020, + 0x5824: 0x405e8220, 0x5825: 0x405e8420, 0x5826: 0x405e8620, 0x5827: 0x405e8820, + 0x5828: 0x405e8a20, 0x5829: 0x405e8c20, 0x582a: 0x405e8e20, 0x582b: 0x405e9020, + 0x582c: 0x405e9220, 0x582d: 0x405e9420, 0x582e: 0x405e9620, 0x582f: 0x405e9820, + 0x5830: 0x405e9a20, 0x5831: 0x405e9c20, 0x5832: 0x405e9e20, 0x5833: 0x405ea020, + 0x5834: 0x405ea220, 0x5835: 0x405ea420, 0x5836: 0x405ea620, 0x5837: 0x405ea820, + 0x5838: 0x405eaa20, 0x5839: 0x405eac20, 0x583a: 0x405eae20, 0x583b: 0x405eb020, + 0x583c: 0x405eb220, 0x583d: 0x405eb420, 0x583e: 0x405eb620, 0x583f: 0x405eb820, + // Block 0x161, offset 0x5840 + 0x5840: 0x405eba20, 0x5841: 0x405ebc20, 0x5842: 0x405ebe20, 0x5843: 0x405ec020, + 0x5844: 0x405ec220, 0x5845: 0x405ec420, 0x5846: 0x405ec620, 0x5847: 0x405ec820, + 0x5848: 0x405eca20, 0x5849: 0x405ecc20, 0x584a: 0x405ece20, 0x584b: 0x405ed020, + 0x584c: 0x405ed220, 0x584d: 0x405ed420, 0x584e: 0x405ed620, 0x584f: 0x405ed820, + 0x5850: 0x405eda20, 0x5851: 0x405edc20, 0x5852: 0x405ede20, 0x5853: 0x405ee020, + 0x5854: 0x405ee220, 0x5855: 0x405ee420, 0x5856: 0x405ee620, 0x5857: 0x405ee820, + 0x5858: 0x405eea20, 0x5859: 0x405eec20, 0x585a: 0x405eee20, 0x585b: 0x405ef020, + 0x585c: 0x405ef220, 0x585d: 0x405ef420, 0x585e: 0x405ef620, 0x585f: 0x405ef820, + 0x5860: 0x405efa20, 0x5861: 0x405efc20, 0x5862: 0x405efe20, 0x5863: 0x405f0020, + 0x5864: 0x405f0220, 0x5865: 0x405f0420, 0x5866: 0x405f0620, 0x5867: 0x405f0820, + 0x5868: 0x405f0a20, 0x5869: 0x405f0c20, 0x586a: 0x405f0e20, 0x586b: 0x405f1020, + 0x586c: 0x405f1220, 0x586d: 0x405f1420, 0x586e: 0x405f1620, 0x586f: 0x405f1820, + 0x5870: 0x405f1a20, 0x5871: 0x405f1c20, 0x5872: 0x405f1e20, 0x5873: 0x405f2020, + 0x5874: 0x405f2220, 0x5875: 0x405f2420, 0x5876: 0x405f2620, 0x5877: 0x405f2820, + 0x5878: 0x405f2a20, 0x5879: 0x405f2c20, 0x587a: 0x405f2e20, 0x587b: 0x405f3020, + 0x587c: 0x405f3220, 0x587d: 0x405f3420, 0x587e: 0x405f3620, 0x587f: 0x405f3820, + // Block 0x162, offset 0x5880 + 0x5880: 0x405f3a20, 0x5881: 0x405f3c20, 0x5882: 0x405f3e20, 0x5883: 0x405f4020, + 0x5884: 0x405f4220, 0x5885: 0x405f4420, 0x5886: 0x405f4620, 0x5887: 0x405f4820, + 0x5888: 0x405f4a20, 0x5889: 0x405f4c20, 0x588a: 0x405f4e20, 0x588b: 0x405f5020, + 0x588c: 0x405f5220, 0x588d: 0x405f5420, 0x588e: 0x405f5620, 0x588f: 0x405f5820, + 0x5890: 0x405f5a20, 0x5891: 0x405f5c20, 0x5892: 0x405f5e20, 0x5893: 0x405f6020, + 0x5894: 0x405f6220, 0x5895: 0x405f6420, 0x5896: 0x405f6620, 0x5897: 0x405f6820, + 0x5898: 0x405f6a20, 0x5899: 0x405f6c20, 0x589a: 0x405f6e20, 0x589b: 0x405f7020, + 0x589c: 0x405f7220, 0x589d: 0x405f7420, 0x589e: 0x405f7620, 0x589f: 0x405f7820, + 0x58a0: 0x405f7a20, 0x58a1: 0x405f7c20, 0x58a2: 0x405f7e20, 0x58a3: 0x405f8020, + 0x58a4: 0x405f8220, 0x58a5: 0x405f8420, 0x58a6: 0x405f8620, 0x58a7: 0x405f8820, + 0x58a8: 0x405f8a20, 0x58a9: 0x405f8c20, 0x58aa: 0x405f8e20, 0x58ab: 0x405f9020, + 0x58ac: 0x405f9220, 0x58ad: 0x405f9420, 0x58ae: 0x405f9620, 0x58af: 0x405f9820, + 0x58b0: 0x405f9a20, 0x58b1: 0x405f9c20, 0x58b2: 0x405f9e20, 0x58b3: 0x405fa020, + 0x58b4: 0x405fa220, 0x58b5: 0x405fa420, 0x58b6: 0x405fa620, 0x58b7: 0x405fa820, + 0x58b8: 0x405faa20, 0x58b9: 0x405fac20, 0x58ba: 0x405fae20, 0x58bb: 0x405fb020, + 0x58bc: 0x405fb220, 0x58bd: 0x405fb420, 0x58be: 0x405fb620, 0x58bf: 0x405fb820, + // Block 0x163, offset 0x58c0 + 0x58c0: 0x405fba20, 0x58c1: 0x405fbc20, 0x58c2: 0x405fbe20, 0x58c3: 0x405fc020, + 0x58c4: 0x405fc220, 0x58c5: 0x405fc420, 0x58c6: 0x405fc620, 0x58c7: 0x405fc820, + 0x58c8: 0x405fca20, 0x58c9: 0x405fcc20, 0x58ca: 0x405fce20, 0x58cb: 0x405fd020, + 0x58cc: 0x405fd220, 0x58cd: 0x405fd420, 0x58ce: 0x405fd620, 0x58cf: 0x405fd820, + 0x58d0: 0x405fda20, 0x58d1: 0x405fdc20, 0x58d2: 0x405fde20, 0x58d3: 0x405fe020, + 0x58d4: 0x405fe220, 0x58d5: 0x405fe420, 0x58d6: 0x405fe620, 0x58d7: 0x405fe820, + 0x58d8: 0x405fea20, 0x58d9: 0x405fec20, 0x58da: 0x405fee20, 0x58db: 0x405ff020, + 0x58dc: 0x405ff220, 0x58dd: 0x405ff420, 0x58de: 0x405ff620, 0x58df: 0x405ff820, + 0x58e0: 0x405ffa20, 0x58e1: 0x405ffc20, 0x58e2: 0x405ffe20, 0x58e3: 0x40600020, + 0x58e4: 0x40600220, 0x58e5: 0x40600420, 0x58e6: 0x40600620, 0x58e7: 0x40600820, + 0x58e8: 0x40600a20, 0x58e9: 0x40600c20, 0x58ea: 0x40600e20, 0x58eb: 0x40601020, + 0x58ec: 0x40601220, 0x58ed: 0x40601420, 0x58ee: 0x40601620, 0x58ef: 0x40601820, + 0x58f0: 0x40601a20, 0x58f1: 0x40601c20, 0x58f2: 0x40601e20, 0x58f3: 0x40602020, + 0x58f4: 0x40602220, 0x58f5: 0x40602420, 0x58f6: 0x40602620, 0x58f7: 0x40602820, + 0x58f8: 0x40602a20, 0x58f9: 0x40602c20, 0x58fa: 0x40602e20, 0x58fb: 0x40603020, + 0x58fc: 0x40603220, 0x58fd: 0x40603420, 0x58fe: 0x40603620, 0x58ff: 0x40603820, + // Block 0x164, offset 0x5900 + 0x5900: 0x40603a20, 0x5901: 0x40603c20, 0x5902: 0x40603e20, 0x5903: 0x40604020, + 0x5904: 0x40604220, 0x5905: 0x40604420, 0x5906: 0x40604620, 0x5907: 0x40604820, + 0x5908: 0x40604a20, 0x5909: 0x40604c20, 0x590a: 0x40604e20, 0x590b: 0x40605020, + 0x590c: 0x40605220, 0x590d: 0x40605420, 0x590e: 0x40605620, 0x590f: 0x40605820, + 0x5910: 0x40605a20, 0x5911: 0x40605c20, 0x5912: 0x40605e20, 0x5913: 0x40606020, + 0x5914: 0x40606220, 0x5915: 0x40606420, 0x5916: 0x40606620, 0x5917: 0x40606820, + 0x5918: 0x40606a20, 0x5919: 0x40606c20, 0x591a: 0x40606e20, 0x591b: 0x40607020, + 0x591c: 0x40607220, 0x591d: 0x40607420, 0x591e: 0x40607620, 0x591f: 0x40607820, + 0x5920: 0x40607a20, 0x5921: 0x40607c20, 0x5922: 0x40607e20, 0x5923: 0x40608020, + 0x5924: 0x40608220, 0x5925: 0x40608420, 0x5926: 0x40608620, 0x5927: 0x40608820, + 0x5928: 0x40608a20, 0x5929: 0x40608c20, 0x592a: 0x40608e20, 0x592b: 0x40609020, + 0x592c: 0x40609220, 0x592d: 0x40609420, 0x592e: 0x40609620, 0x592f: 0x40609820, + 0x5930: 0x40609a20, 0x5931: 0x40609c20, 0x5932: 0x40609e20, 0x5933: 0x4060a020, + 0x5934: 0x4060a220, 0x5935: 0x4060a420, 0x5936: 0x4060a620, 0x5937: 0x4060a820, + 0x5938: 0x4060aa20, 0x5939: 0x4060ac20, 0x593a: 0x4060ae20, 0x593b: 0x4060b020, + 0x593c: 0x4060b220, 0x593d: 0x4060b420, 0x593e: 0x4060b620, 0x593f: 0x4060b820, + // Block 0x165, offset 0x5940 + 0x5940: 0x4060ba20, 0x5941: 0x4060bc20, 0x5942: 0x4060be20, 0x5943: 0x4060c020, + 0x5944: 0x4060c220, 0x5945: 0x4060c420, 0x5946: 0x4060c620, 0x5947: 0x4060c820, + 0x5948: 0x4060ca20, 0x5949: 0x4060cc20, 0x594a: 0x4060ce20, 0x594b: 0x4060d020, + 0x594c: 0x4060d220, 0x594d: 0x4060d420, 0x594e: 0x4060d620, 0x594f: 0x4060d820, + 0x5950: 0x4060da20, 0x5951: 0x4060dc20, 0x5952: 0x4060de20, 0x5953: 0x4060e020, + 0x5954: 0x4060e220, 0x5955: 0x4060e420, 0x5956: 0x4060e620, 0x5957: 0x4060e820, + 0x5958: 0x4060ea20, 0x5959: 0x4060ec20, 0x595a: 0x4060ee20, 0x595b: 0x4060f020, + 0x595c: 0x4060f220, 0x595d: 0x4060f420, 0x595e: 0x4060f620, 0x595f: 0x4060f820, + 0x5960: 0x4060fa20, 0x5961: 0x4060fc20, 0x5962: 0x4060fe20, 0x5963: 0x40610020, + 0x5964: 0x40610220, 0x5965: 0x40610420, 0x5966: 0x40610620, 0x5967: 0x40610820, + 0x5968: 0x40610a20, 0x5969: 0x40610c20, 0x596a: 0x40610e20, 0x596b: 0x40611020, + 0x596c: 0x40611220, 0x596d: 0x40611420, 0x596e: 0x40611620, 0x596f: 0x40611820, + 0x5970: 0x40611a20, 0x5971: 0x40611c20, 0x5972: 0x40611e20, 0x5973: 0x40612020, + 0x5974: 0x40612220, 0x5975: 0x40612420, 0x5976: 0x40612620, 0x5977: 0x40612820, + 0x5978: 0x40612a20, 0x5979: 0x40612c20, 0x597a: 0x40612e20, 0x597b: 0x40613020, + 0x597c: 0x40613220, 0x597d: 0x40613420, 0x597e: 0x40613620, 0x597f: 0x40613820, + // Block 0x166, offset 0x5980 + 0x5980: 0x40613a20, 0x5981: 0x40613c20, 0x5982: 0x40613e20, 0x5983: 0x40614020, + 0x5984: 0x40614220, 0x5985: 0x40614420, 0x5986: 0x40614620, 0x5987: 0x40614820, + 0x5988: 0x40614a20, 0x5989: 0x40614c20, 0x598a: 0x40614e20, 0x598b: 0x40615020, + 0x598c: 0x40615220, 0x598d: 0x40615420, 0x598e: 0x40615620, 0x598f: 0x40615820, + 0x5990: 0x40615a20, 0x5991: 0x40615c20, 0x5992: 0x40615e20, 0x5993: 0x40616020, + 0x5994: 0x40616220, 0x5995: 0x40616420, 0x5996: 0x40616620, 0x5997: 0x40616820, + 0x5998: 0x40616a20, 0x5999: 0x40616c20, 0x599a: 0x40616e20, 0x599b: 0x40617020, + 0x599c: 0x40617220, 0x599d: 0x40617420, 0x599e: 0x40617620, 0x599f: 0x40617820, + 0x59a0: 0x40617a20, 0x59a1: 0x40617c20, 0x59a2: 0x40617e20, 0x59a3: 0x40618020, + 0x59a4: 0x40618220, 0x59a5: 0x40618420, 0x59a6: 0x40618620, 0x59a7: 0x40618820, + 0x59a8: 0x40618a20, 0x59a9: 0x40618c20, 0x59aa: 0x40618e20, 0x59ab: 0x40619020, + 0x59ac: 0x40619220, 0x59ad: 0x40619420, 0x59ae: 0x40619620, 0x59af: 0x40619820, + 0x59b0: 0x40619a20, 0x59b1: 0x40619c20, 0x59b2: 0x40619e20, 0x59b3: 0x4061a020, + 0x59b4: 0x4061a220, 0x59b5: 0x4061a420, 0x59b6: 0x4061a620, 0x59b7: 0x4061a820, + 0x59b8: 0x4061aa20, 0x59b9: 0x4061ac20, 0x59ba: 0x4061ae20, 0x59bb: 0x4061b020, + 0x59bc: 0x4061b220, 0x59bd: 0x4061b420, 0x59be: 0x4061b620, 0x59bf: 0x4061b820, + // Block 0x167, offset 0x59c0 + 0x59c0: 0x4061ba20, 0x59c1: 0x4061bc20, 0x59c2: 0x4061be20, 0x59c3: 0x4061c020, + 0x59c4: 0x4061c220, 0x59c5: 0x4061c420, 0x59c6: 0x4061c620, 0x59c7: 0x4061c820, + 0x59c8: 0x4061ca20, 0x59c9: 0x4061cc20, 0x59ca: 0x4061ce20, 0x59cb: 0x4061d020, + 0x59cc: 0x4061d220, 0x59cd: 0x4061d420, 0x59ce: 0x4061d620, 0x59cf: 0x4061d820, + 0x59d0: 0x4061da20, 0x59d1: 0x4061dc20, 0x59d2: 0x4061de20, 0x59d3: 0x4061e020, + 0x59d4: 0x4061e220, 0x59d5: 0x4061e420, 0x59d6: 0x4061e620, 0x59d7: 0x4061e820, + 0x59d8: 0x4061ea20, 0x59d9: 0x4061ec20, 0x59da: 0x4061ee20, 0x59db: 0x4061f020, + 0x59dc: 0x4061f220, 0x59dd: 0x4061f420, 0x59de: 0x4061f620, 0x59df: 0x4061f820, + 0x59e0: 0x4061fa20, 0x59e1: 0x4061fc20, 0x59e2: 0x4061fe20, 0x59e3: 0x40620020, + 0x59e4: 0x40620220, 0x59e5: 0x40620420, 0x59e6: 0x40620620, 0x59e7: 0x40620820, + 0x59e8: 0x40620a20, 0x59e9: 0x40620c20, 0x59ea: 0x40620e20, 0x59eb: 0x40621020, + 0x59ec: 0x40621220, 0x59ed: 0x40621420, 0x59ee: 0x40621620, 0x59ef: 0x40621820, + 0x59f0: 0x40621a20, 0x59f1: 0x40621c20, 0x59f2: 0x40621e20, 0x59f3: 0x40622020, + 0x59f4: 0x40622220, 0x59f5: 0x40622420, 0x59f6: 0x40622620, 0x59f7: 0x40622820, + 0x59f8: 0x40622a20, 0x59f9: 0x40622c20, 0x59fa: 0x40622e20, 0x59fb: 0x40623020, + 0x59fc: 0x40623220, 0x59fd: 0x40623420, 0x59fe: 0x40623620, 0x59ff: 0x40623820, + // Block 0x168, offset 0x5a00 + 0x5a00: 0x40623a20, 0x5a01: 0x40623c20, 0x5a02: 0x40623e20, 0x5a03: 0x40624020, + 0x5a04: 0x40624220, 0x5a05: 0x40624420, 0x5a06: 0x40624620, 0x5a07: 0x40624820, + 0x5a08: 0x40624a20, 0x5a09: 0x40624c20, 0x5a0a: 0x40624e20, 0x5a0b: 0x40625020, + 0x5a0c: 0x40625220, 0x5a0d: 0x40625420, 0x5a0e: 0x40625620, 0x5a0f: 0x40625820, + 0x5a10: 0x40625a20, 0x5a11: 0x40625c20, 0x5a12: 0x40625e20, 0x5a13: 0x40626020, + 0x5a14: 0x40626220, 0x5a15: 0x40626420, 0x5a16: 0x40626620, 0x5a17: 0x40626820, + 0x5a18: 0x40626a20, 0x5a19: 0x40626c20, 0x5a1a: 0x40626e20, 0x5a1b: 0x40627020, + 0x5a1c: 0x40627220, 0x5a1d: 0x40627420, 0x5a1e: 0x40627620, 0x5a1f: 0x40627820, + 0x5a20: 0x40627a20, 0x5a21: 0x40627c20, 0x5a22: 0x40627e20, 0x5a23: 0x40628020, + 0x5a24: 0x40628220, 0x5a25: 0x40628420, 0x5a26: 0x40628620, 0x5a27: 0x40628820, + 0x5a28: 0x40628a20, 0x5a29: 0x40628c20, 0x5a2a: 0x40628e20, 0x5a2b: 0x40629020, + 0x5a2c: 0x40629220, 0x5a2d: 0x40629420, 0x5a2e: 0x40629620, 0x5a2f: 0x40629820, + 0x5a30: 0x40629a20, 0x5a31: 0x40629c20, 0x5a32: 0x40629e20, 0x5a33: 0x4062a020, + 0x5a34: 0x4062a220, 0x5a35: 0x4062a420, 0x5a36: 0x4062a620, 0x5a37: 0x4062a820, + 0x5a38: 0x4062aa20, + // Block 0x169, offset 0x5a40 + 0x5a40: 0x406fb620, 0x5a41: 0x406fb820, 0x5a42: 0x406fba20, 0x5a43: 0x406fbc20, + 0x5a44: 0x406fbe20, 0x5a45: 0x406fc020, 0x5a46: 0x006fbe84, 0x5a47: 0x406fc220, + 0x5a48: 0x406fc420, 0x5a49: 0x406fc620, 0x5a4a: 0x406fc820, 0x5a4b: 0x406fca20, + 0x5a4c: 0x406fcc20, 0x5a4d: 0x406fce20, 0x5a4e: 0x406fd020, 0x5a4f: 0x406fd220, + 0x5a50: 0x406fd420, 0x5a51: 0x406fd620, 0x5a52: 0x406fd820, 0x5a53: 0x006fd484, + 0x5a54: 0x406fda20, 0x5a55: 0x406fdc20, 0x5a56: 0x406fde20, 0x5a57: 0x406fe020, + 0x5a58: 0x406fe220, 0x5a59: 0x406fe420, 0x5a5a: 0x406fe620, 0x5a5b: 0x406fe820, + 0x5a5c: 0x406fea20, 0x5a5d: 0x406fec20, 0x5a5e: 0x406fee20, 0x5a5f: 0x406ff020, + 0x5a60: 0x406ff220, 0x5a61: 0x406ff420, 0x5a62: 0x406ff620, 0x5a63: 0x406ff820, + 0x5a64: 0x406ffa20, 0x5a65: 0x006ff884, 0x5a66: 0x406ffc20, 0x5a67: 0x406ffe20, + 0x5a68: 0x40700020, 0x5a69: 0x40700220, 0x5a6a: 0x40700420, 0x5a6b: 0x40700620, + 0x5a6c: 0x40700820, 0x5a6d: 0x40700a20, 0x5a6e: 0x40700c20, 0x5a6f: 0x40700e20, + 0x5a70: 0x40701020, 0x5a71: 0x40701220, 0x5a72: 0x40701420, 0x5a73: 0x40701620, + 0x5a74: 0x40701820, 0x5a75: 0x40701a20, 0x5a76: 0x40701c20, 0x5a77: 0x40701e20, + 0x5a78: 0x40702020, 0x5a79: 0x40702220, 0x5a7a: 0x40702420, 0x5a7b: 0x40702620, + 0x5a7c: 0x40702820, 0x5a7d: 0x40702a20, 0x5a7e: 0x40702c20, 0x5a7f: 0x00702a84, + // Block 0x16a, offset 0x5a80 + 0x5a80: 0x40702e20, 0x5a81: 0x40703020, 0x5a82: 0x40703220, 0x5a83: 0x40703420, + 0x5a84: 0x40703620, + 0x5a90: 0x40703820, 0x5a91: 0x40703a20, 0x5a92: 0x40703c20, 0x5a93: 0x40703e20, + 0x5a94: 0x40704020, 0x5a95: 0x40704220, 0x5a96: 0x40704420, 0x5a97: 0x40704620, + 0x5a98: 0x40704820, 0x5a99: 0x40704a20, 0x5a9a: 0x40704c20, 0x5a9b: 0x40704e20, + 0x5a9c: 0x40705020, 0x5a9d: 0x40705220, 0x5a9e: 0x40705420, 0x5a9f: 0x40705620, + 0x5aa0: 0x40705820, 0x5aa1: 0x40705a20, 0x5aa2: 0x40705c20, 0x5aa3: 0x40705e20, + 0x5aa4: 0x40706020, 0x5aa5: 0x40706220, 0x5aa6: 0x40706420, 0x5aa7: 0x40706620, + 0x5aa8: 0x40706820, 0x5aa9: 0x40706a20, 0x5aaa: 0x40706c20, 0x5aab: 0x40706e20, + 0x5aac: 0x40707020, 0x5aad: 0x40707220, 0x5aae: 0x40707420, 0x5aaf: 0x40707620, + 0x5ab0: 0x40707820, 0x5ab1: 0x40707a20, 0x5ab2: 0x40707c20, 0x5ab3: 0x40707e20, + 0x5ab4: 0x40708020, 0x5ab5: 0x40708220, 0x5ab6: 0x40708420, 0x5ab7: 0x40708620, + 0x5ab8: 0x40708820, 0x5ab9: 0x40708a20, 0x5aba: 0x40708c20, 0x5abb: 0x40708e20, + 0x5abc: 0x40709020, 0x5abd: 0x40709220, 0x5abe: 0x40709420, + // Block 0x16b, offset 0x5ac0 + 0x5acf: 0x40709620, + 0x5ad0: 0x40709820, 0x5ad1: 0x40709a20, 0x5ad2: 0x40709c20, 0x5ad3: 0x40709e20, + 0x5ad4: 0x4070a020, 0x5ad5: 0x4070a220, 0x5ad6: 0x4070a420, 0x5ad7: 0x4070a620, + 0x5ad8: 0x4070a820, 0x5ad9: 0x4070aa20, 0x5ada: 0x4070ac20, 0x5adb: 0x4070ae20, + 0x5adc: 0x4070b020, 0x5add: 0x4070b220, 0x5ade: 0x4070b420, 0x5adf: 0x4070b620, + // Block 0x16c, offset 0x5b00 + 0x5b00: 0x00657c91, 0x5b01: 0x0065c28e, + // Block 0x16d, offset 0x5b40 + 0x5b40: 0x401ba420, 0x5b41: 0x401ba620, 0x5b42: 0x401ba820, 0x5b43: 0x401baa20, + 0x5b44: 0x401bac20, 0x5b45: 0x401bae20, 0x5b46: 0x401bb020, 0x5b47: 0x401bb220, + 0x5b48: 0x401bb420, 0x5b49: 0x401bb620, 0x5b4a: 0x401bb820, 0x5b4b: 0x401bba20, + 0x5b4c: 0x401bbc20, 0x5b4d: 0x401bbe20, 0x5b4e: 0x401bc020, 0x5b4f: 0x401bc220, + 0x5b50: 0x401bc420, 0x5b51: 0x401bc620, 0x5b52: 0x401bc820, 0x5b53: 0x401bca20, + 0x5b54: 0x401bcc20, 0x5b55: 0x401bce20, 0x5b56: 0x401bd020, 0x5b57: 0x401bd220, + 0x5b58: 0x401bd420, 0x5b59: 0x401bd620, 0x5b5a: 0x401bd820, 0x5b5b: 0x401bda20, + 0x5b5c: 0x401bdc20, 0x5b5d: 0x401bde20, 0x5b5e: 0x401be020, 0x5b5f: 0x401be220, + 0x5b60: 0x401be420, 0x5b61: 0x401be620, 0x5b62: 0x401be820, 0x5b63: 0x401bea20, + 0x5b64: 0x401bec20, 0x5b65: 0x401bee20, 0x5b66: 0x401bf020, 0x5b67: 0x401bf220, + 0x5b68: 0x401bf420, 0x5b69: 0x401bf620, 0x5b6a: 0x401bf820, 0x5b6b: 0x401bfa20, + 0x5b6c: 0x401bfc20, 0x5b6d: 0x401bfe20, 0x5b6e: 0x401c0020, 0x5b6f: 0x401c0220, + 0x5b70: 0x401c0420, 0x5b71: 0x401c0620, 0x5b72: 0x401c0820, 0x5b73: 0x401c0a20, + 0x5b74: 0x401c0c20, 0x5b75: 0x401c0e20, 0x5b76: 0x401c1020, 0x5b77: 0x401c1220, + 0x5b78: 0x401c1420, 0x5b79: 0x401c1620, 0x5b7a: 0x401c1820, 0x5b7b: 0x401c1a20, + 0x5b7c: 0x401c1c20, 0x5b7d: 0x401c1e20, 0x5b7e: 0x401c2020, 0x5b7f: 0x401c2220, + // Block 0x16e, offset 0x5b80 + 0x5b80: 0x401c2420, 0x5b81: 0x401c2620, 0x5b82: 0x401c2820, 0x5b83: 0x401c2a20, + 0x5b84: 0x401c2c20, 0x5b85: 0x401c2e20, 0x5b86: 0x401c3020, 0x5b87: 0x401c3220, + 0x5b88: 0x401c3420, 0x5b89: 0x401c3620, 0x5b8a: 0x401c3820, 0x5b8b: 0x401c3a20, + 0x5b8c: 0x401c3c20, 0x5b8d: 0x401c3e20, 0x5b8e: 0x401c4020, 0x5b8f: 0x401c4220, + 0x5b90: 0x401c4420, 0x5b91: 0x401c4620, 0x5b92: 0x401c4820, 0x5b93: 0x401c4a20, + 0x5b94: 0x401c4c20, 0x5b95: 0x401c4e20, 0x5b96: 0x401c5020, 0x5b97: 0x401c5220, + 0x5b98: 0x401c5420, 0x5b99: 0x401c5620, 0x5b9a: 0x401c5820, 0x5b9b: 0x401c5a20, + 0x5b9c: 0x401c5c20, 0x5b9d: 0x401c5e20, 0x5b9e: 0x401c6020, 0x5b9f: 0x401c6220, + 0x5ba0: 0x401c6420, 0x5ba1: 0x401c6620, 0x5ba2: 0x401c6820, 0x5ba3: 0x401c6a20, + 0x5ba4: 0x401c6c20, 0x5ba5: 0x401c6e20, 0x5ba6: 0x401c7020, 0x5ba7: 0x401c7220, + 0x5ba8: 0x401c7420, 0x5ba9: 0x401c7620, 0x5baa: 0x401c7820, 0x5bab: 0x401c7a20, + 0x5bac: 0x401c7c20, 0x5bad: 0x401c7e20, 0x5bae: 0x401c8020, 0x5baf: 0x401c8220, + 0x5bb0: 0x401c8420, 0x5bb1: 0x401c8620, 0x5bb2: 0x401c8820, 0x5bb3: 0x401c8a20, + 0x5bb4: 0x401c8c20, 0x5bb5: 0x401c8e20, 0x5bb6: 0x401c9020, 0x5bb7: 0x401c9220, + 0x5bb8: 0x401c9420, 0x5bb9: 0x401c9620, 0x5bba: 0x401c9820, 0x5bbb: 0x401c9a20, + 0x5bbc: 0x401c9c20, 0x5bbd: 0x401c9e20, 0x5bbe: 0x401ca020, 0x5bbf: 0x401ca220, + // Block 0x16f, offset 0x5bc0 + 0x5bc0: 0x401ca420, 0x5bc1: 0x401ca620, 0x5bc2: 0x401ca820, 0x5bc3: 0x401caa20, + 0x5bc4: 0x401cac20, 0x5bc5: 0x401cae20, 0x5bc6: 0x401cb020, 0x5bc7: 0x401cb220, + 0x5bc8: 0x401cb420, 0x5bc9: 0x401cb620, 0x5bca: 0x401cb820, 0x5bcb: 0x401cba20, + 0x5bcc: 0x401cbc20, 0x5bcd: 0x401cbe20, 0x5bce: 0x401cc020, 0x5bcf: 0x401cc220, + 0x5bd0: 0x401cc420, 0x5bd1: 0x401cc620, 0x5bd2: 0x401cc820, 0x5bd3: 0x401cca20, + 0x5bd4: 0x401ccc20, 0x5bd5: 0x401cce20, 0x5bd6: 0x401cd020, 0x5bd7: 0x401cd220, + 0x5bd8: 0x401cd420, 0x5bd9: 0x401cd620, 0x5bda: 0x401cd820, 0x5bdb: 0x401cda20, + 0x5bdc: 0x401cdc20, 0x5bdd: 0x401cde20, 0x5bde: 0x401ce020, 0x5bdf: 0x401ce220, + 0x5be0: 0x401ce420, 0x5be1: 0x401ce620, 0x5be2: 0x401ce820, 0x5be3: 0x401cea20, + 0x5be4: 0x401cec20, 0x5be5: 0x401cee20, 0x5be6: 0x401cf020, 0x5be7: 0x401cf220, + 0x5be8: 0x401cf420, 0x5be9: 0x401cf620, 0x5bea: 0x401cf820, 0x5beb: 0x401cfa20, + 0x5bec: 0x401cfc20, 0x5bed: 0x401cfe20, 0x5bee: 0x401d0020, 0x5bef: 0x401d0220, + 0x5bf0: 0x401d0420, 0x5bf1: 0x401d0620, 0x5bf2: 0x401d0820, 0x5bf3: 0x401d0a20, + 0x5bf4: 0x401d0c20, 0x5bf5: 0x401d0e20, 0x5bf6: 0x401d1020, 0x5bf7: 0x401d1220, + 0x5bf8: 0x401d1420, 0x5bf9: 0x401d1620, 0x5bfa: 0x401d1820, 0x5bfb: 0x401d1a20, + 0x5bfc: 0x401d1c20, 0x5bfd: 0x401d1e20, 0x5bfe: 0x401d2020, 0x5bff: 0x401d2220, + // Block 0x170, offset 0x5c00 + 0x5c00: 0x401d2420, 0x5c01: 0x401d2620, 0x5c02: 0x401d2820, 0x5c03: 0x401d2a20, + 0x5c04: 0x401d2c20, 0x5c05: 0x401d2e20, 0x5c06: 0x401d3020, 0x5c07: 0x401d3220, + 0x5c08: 0x401d3420, 0x5c09: 0x401d3620, 0x5c0a: 0x401d3820, 0x5c0b: 0x401d3a20, + 0x5c0c: 0x401d3c20, 0x5c0d: 0x401d3e20, 0x5c0e: 0x401d4020, 0x5c0f: 0x401d4220, + 0x5c10: 0x401d4420, 0x5c11: 0x401d4620, 0x5c12: 0x401d4820, 0x5c13: 0x401d4a20, + 0x5c14: 0x401d4c20, 0x5c15: 0x401d4e20, 0x5c16: 0x401d5020, 0x5c17: 0x401d5220, + 0x5c18: 0x401d5420, 0x5c19: 0x401d5620, 0x5c1a: 0x401d5820, 0x5c1b: 0x401d5a20, + 0x5c1c: 0x401d5c20, 0x5c1d: 0x401d5e20, 0x5c1e: 0x401d6020, 0x5c1f: 0x401d6220, + 0x5c20: 0x401d6420, 0x5c21: 0x401d6620, 0x5c22: 0x401d6820, 0x5c23: 0x401d6a20, + 0x5c24: 0x401d6c20, 0x5c25: 0x401d6e20, 0x5c26: 0x401d7020, 0x5c27: 0x401d7220, + 0x5c28: 0x401d7420, 0x5c29: 0x401d7620, 0x5c2a: 0x401d7820, 0x5c2b: 0x401d7a20, + 0x5c2c: 0x401d7c20, 0x5c2d: 0x401d7e20, 0x5c2e: 0x401d8020, 0x5c2f: 0x401d8220, + 0x5c30: 0x401d8420, 0x5c31: 0x401d8620, 0x5c32: 0x401d8820, 0x5c33: 0x401d8a20, + 0x5c34: 0x401d8c20, 0x5c35: 0x401d8e20, + // Block 0x171, offset 0x5c40 + 0x5c40: 0x401d9020, 0x5c41: 0x401d9220, 0x5c42: 0x401d9420, 0x5c43: 0x401d9620, + 0x5c44: 0x401d9820, 0x5c45: 0x401d9a20, 0x5c46: 0x401d9c20, 0x5c47: 0x401d9e20, + 0x5c48: 0x401da020, 0x5c49: 0x401da220, 0x5c4a: 0x401da420, 0x5c4b: 0x401da620, + 0x5c4c: 0x401da820, 0x5c4d: 0x401daa20, 0x5c4e: 0x401dac20, 0x5c4f: 0x401dae20, + 0x5c50: 0x401db020, 0x5c51: 0x401db220, 0x5c52: 0x401db420, 0x5c53: 0x401db620, + 0x5c54: 0x401db820, 0x5c55: 0x401dba20, 0x5c56: 0x401dbc20, 0x5c57: 0x401dbe20, + 0x5c58: 0x401dc020, 0x5c59: 0x401dc220, 0x5c5a: 0x401dc420, 0x5c5b: 0x401dc620, + 0x5c5c: 0x401dc820, 0x5c5d: 0x401dca20, 0x5c5e: 0x401dcc20, 0x5c5f: 0x401dce20, + 0x5c60: 0x401dd020, 0x5c61: 0x401dd220, 0x5c62: 0x401dd420, 0x5c63: 0x401dd620, + 0x5c64: 0x401dd820, 0x5c65: 0x401dda20, 0x5c66: 0x401ddc20, + 0x5c69: 0x401e0420, 0x5c6a: 0x401de420, 0x5c6b: 0x401de620, + 0x5c6c: 0x401de820, 0x5c6d: 0x401dea20, 0x5c6e: 0x401dec20, 0x5c6f: 0x401dee20, + 0x5c70: 0x401df020, 0x5c71: 0x401df220, 0x5c72: 0x401df420, 0x5c73: 0x401df620, + 0x5c74: 0x401df820, 0x5c75: 0x401dfa20, 0x5c76: 0x401dfc20, 0x5c77: 0x401dfe20, + 0x5c78: 0x401e0020, 0x5c79: 0x401e0220, 0x5c7a: 0x401e0620, 0x5c7b: 0x401e0820, + 0x5c7c: 0x401e0a20, 0x5c7d: 0x401e0c20, 0x5c7e: 0x401e0e20, 0x5c7f: 0x401e1020, + // Block 0x172, offset 0x5c80 + 0x5c80: 0x401e1220, 0x5c81: 0x401e1420, 0x5c82: 0x401e1620, 0x5c83: 0x401e1820, + 0x5c84: 0x401e1a20, 0x5c85: 0x401e1c20, 0x5c86: 0x401e1e20, 0x5c87: 0x401e2020, + 0x5c88: 0x401e2220, 0x5c89: 0x401e2420, 0x5c8a: 0x401e2620, 0x5c8b: 0x401e2820, + 0x5c8c: 0x401e2a20, 0x5c8d: 0x401e2c20, 0x5c8e: 0x401e2e20, 0x5c8f: 0x401e3020, + 0x5c90: 0x401e3220, 0x5c91: 0x401e3420, 0x5c92: 0x401e3620, 0x5c93: 0x401e3820, + 0x5c94: 0x401e3a20, 0x5c95: 0x401e3c20, 0x5c96: 0x401e3e20, 0x5c97: 0x401e4020, + 0x5c98: 0x401e4220, 0x5c99: 0x401e4420, 0x5c9a: 0x401e4620, 0x5c9b: 0x401e4820, + 0x5c9c: 0x401e4a20, 0x5c9d: 0x401e4c20, 0x5c9e: 0x401e4020, 0x5c9f: 0x401e4220, + 0x5ca0: 0x401e4220, 0x5ca1: 0x401e4220, 0x5ca2: 0x401e4220, 0x5ca3: 0x401e4220, + 0x5ca4: 0x401e4220, 0x5ca5: 0xad800000, 0x5ca6: 0xad800000, 0x5ca7: 0xa0100000, + 0x5ca8: 0xa0100000, 0x5ca9: 0xa0100000, 0x5caa: 0x401e4e20, 0x5cab: 0x401e5020, + 0x5cac: 0x401e5220, 0x5cad: 0xae200000, 0x5cae: 0xad800000, 0x5caf: 0xad800000, + 0x5cb0: 0xad800000, 0x5cb1: 0xad800000, 0x5cb2: 0xad800000, 0x5cb3: 0xa0000000, + 0x5cb4: 0xa0000000, 0x5cb5: 0xa0000000, 0x5cb6: 0xa0000000, 0x5cb7: 0xa0000000, + 0x5cb8: 0xa0000000, 0x5cb9: 0xa0000000, 0x5cba: 0xa0000000, 0x5cbb: 0xadc00000, + 0x5cbc: 0xadc00000, 0x5cbd: 0xadc00000, 0x5cbe: 0xadc00000, 0x5cbf: 0xadc00000, + // Block 0x173, offset 0x5cc0 + 0x5cc0: 0xadc00000, 0x5cc1: 0xadc00000, 0x5cc2: 0xadc00000, 0x5cc3: 0x401e5420, + 0x5cc4: 0x401e5620, 0x5cc5: 0xae600000, 0x5cc6: 0xae600000, 0x5cc7: 0xae600000, + 0x5cc8: 0xae600000, 0x5cc9: 0xae600000, 0x5cca: 0xadc00000, 0x5ccb: 0xadc00000, + 0x5ccc: 0x401e5820, 0x5ccd: 0x401e5a20, 0x5cce: 0x401e5c20, 0x5ccf: 0x401e5e20, + 0x5cd0: 0x401e6020, 0x5cd1: 0x401e6220, 0x5cd2: 0x401e6420, 0x5cd3: 0x401e6620, + 0x5cd4: 0x401e6820, 0x5cd5: 0x401e6a20, 0x5cd6: 0x401e6c20, 0x5cd7: 0x401e6e20, + 0x5cd8: 0x401e7020, 0x5cd9: 0x401e7220, 0x5cda: 0x401e7420, 0x5cdb: 0x401e7620, + 0x5cdc: 0x401e7820, 0x5cdd: 0x401e7a20, 0x5cde: 0x401e7c20, 0x5cdf: 0x401e7e20, + 0x5ce0: 0x401e8020, 0x5ce1: 0x401e8220, 0x5ce2: 0x401e8420, 0x5ce3: 0x401e8620, + 0x5ce4: 0x401e8820, 0x5ce5: 0x401e8a20, 0x5ce6: 0x401e8c20, 0x5ce7: 0x401e8e20, + 0x5ce8: 0x401e9020, 0x5ce9: 0x401e9220, 0x5cea: 0xae600000, 0x5ceb: 0xae600000, + 0x5cec: 0xae600000, 0x5ced: 0xae600000, 0x5cee: 0x401e9420, 0x5cef: 0x401e9620, + 0x5cf0: 0x401e9820, 0x5cf1: 0x401e9a20, 0x5cf2: 0x401e9c20, 0x5cf3: 0x401e9e20, + 0x5cf4: 0x401ea020, 0x5cf5: 0x401ea220, 0x5cf6: 0x401ea420, 0x5cf7: 0x401ea620, + 0x5cf8: 0x401ea820, 0x5cf9: 0x401eaa20, 0x5cfa: 0x401eac20, 0x5cfb: 0x401eaa20, + 0x5cfc: 0x401eac20, 0x5cfd: 0x401eaa20, 0x5cfe: 0x401eac20, 0x5cff: 0x401eaa20, + // Block 0x174, offset 0x5d00 + 0x5d00: 0x401eac20, 0x5d01: 0x401eae20, 0x5d02: 0x401eb020, 0x5d03: 0x401eb220, + 0x5d04: 0x401eb420, 0x5d05: 0x401eb620, 0x5d06: 0x401eb820, 0x5d07: 0x401eba20, + 0x5d08: 0x401ebc20, 0x5d09: 0x401ebe20, 0x5d0a: 0x401ec020, 0x5d0b: 0x401ec220, + 0x5d0c: 0x401ec420, 0x5d0d: 0x401ec620, 0x5d0e: 0x401ec820, 0x5d0f: 0x401eca20, + 0x5d10: 0x401ecc20, 0x5d11: 0x401ece20, 0x5d12: 0x401ed020, 0x5d13: 0x401ed220, + 0x5d14: 0x401ed420, 0x5d15: 0x401ed620, 0x5d16: 0x401ed820, 0x5d17: 0x401eda20, + 0x5d18: 0x401edc20, 0x5d19: 0x401ede20, 0x5d1a: 0x401ee020, 0x5d1b: 0x401ee220, + 0x5d1c: 0x401ee420, 0x5d1d: 0x401ee620, + // Block 0x175, offset 0x5d40 + 0x5d40: 0x401ee820, 0x5d41: 0x401eea20, 0x5d42: 0x401eec20, 0x5d43: 0x401eee20, + 0x5d44: 0x401ef020, 0x5d45: 0x401ef220, 0x5d46: 0x401ef420, 0x5d47: 0x401ef620, + 0x5d48: 0x401ef820, 0x5d49: 0x401efa20, 0x5d4a: 0x401efc20, 0x5d4b: 0x401efe20, + 0x5d4c: 0x401f0020, 0x5d4d: 0x401f0220, 0x5d4e: 0x401f0420, 0x5d4f: 0x401f0620, + 0x5d50: 0x401f0820, 0x5d51: 0x401f0a20, 0x5d52: 0x401f0c20, 0x5d53: 0x401f0e20, + 0x5d54: 0x401f1020, 0x5d55: 0x401f1220, 0x5d56: 0x401f1420, 0x5d57: 0x401f1620, + 0x5d58: 0x401f1820, 0x5d59: 0x401f1a20, 0x5d5a: 0x401f1c20, 0x5d5b: 0x401f1e20, + 0x5d5c: 0x401f2020, 0x5d5d: 0x401f2220, 0x5d5e: 0x401f2420, 0x5d5f: 0x401f2620, + 0x5d60: 0x401f2820, 0x5d61: 0x401f2a20, 0x5d62: 0x401f2c20, 0x5d63: 0x401f2e20, + 0x5d64: 0x401f3020, 0x5d65: 0x401f3220, 0x5d66: 0x401f3420, 0x5d67: 0x401f3620, + 0x5d68: 0x401f3820, 0x5d69: 0x401f3a20, 0x5d6a: 0x401f3c20, 0x5d6b: 0x401f3e20, + 0x5d6c: 0x401f4020, 0x5d6d: 0x401f4220, 0x5d6e: 0x401f4420, 0x5d6f: 0x401f4620, + 0x5d70: 0x401f4820, 0x5d71: 0x401f4a20, 0x5d72: 0x401f4c20, 0x5d73: 0x401f4e20, + 0x5d74: 0x401f5020, 0x5d75: 0x401f5220, 0x5d76: 0x401f5420, 0x5d77: 0x401f5620, + 0x5d78: 0x401f5820, 0x5d79: 0x401f5a20, 0x5d7a: 0x401f5c20, 0x5d7b: 0x401f5e20, + 0x5d7c: 0x401f6020, 0x5d7d: 0x401f6220, 0x5d7e: 0x401f6420, 0x5d7f: 0x401f6620, + // Block 0x176, offset 0x5d80 + 0x5d80: 0x401f6820, 0x5d81: 0x401f6a20, 0x5d82: 0xae600000, 0x5d83: 0xae600000, + 0x5d84: 0xae600000, 0x5d85: 0x401f6c20, + // Block 0x177, offset 0x5dc0 + 0x5dc0: 0x4019e220, 0x5dc1: 0x4019e420, 0x5dc2: 0x4019e620, 0x5dc3: 0x4019e820, + 0x5dc4: 0x4019ea20, 0x5dc5: 0x4019ec20, 0x5dc6: 0x4019ee20, 0x5dc7: 0x4019f020, + 0x5dc8: 0x4019f220, 0x5dc9: 0x4019f420, 0x5dca: 0x4019f620, 0x5dcb: 0x4019f820, + 0x5dcc: 0x4019fa20, 0x5dcd: 0x4019fc20, 0x5dce: 0x4019fe20, 0x5dcf: 0x401a0020, + 0x5dd0: 0x401a0220, 0x5dd1: 0x401a0420, 0x5dd2: 0x401a0620, 0x5dd3: 0x401a0820, + 0x5dd4: 0x401a0a20, 0x5dd5: 0x401a0c20, 0x5dd6: 0x401a0e20, 0x5dd7: 0x401a1020, + 0x5dd8: 0x401a1220, 0x5dd9: 0x401a1420, 0x5dda: 0x401a1620, 0x5ddb: 0x401a1820, + 0x5ddc: 0x401a1a20, 0x5ddd: 0x401a1c20, 0x5dde: 0x401a1e20, 0x5ddf: 0x401a2020, + 0x5de0: 0x401a2220, 0x5de1: 0x401a2420, 0x5de2: 0x401a2620, 0x5de3: 0x401a2820, + 0x5de4: 0x401a2a20, 0x5de5: 0x401a2c20, 0x5de6: 0x401a2e20, 0x5de7: 0x401a3020, + 0x5de8: 0x401a3220, 0x5de9: 0x401a3420, 0x5dea: 0x401a3620, 0x5deb: 0x401a3820, + 0x5dec: 0x401a3a20, 0x5ded: 0x401a3c20, 0x5dee: 0x401a3e20, 0x5def: 0x401a4020, + 0x5df0: 0x401a4220, 0x5df1: 0x401a4420, 0x5df2: 0x401a4620, 0x5df3: 0x401a4820, + 0x5df4: 0x401a4a20, 0x5df5: 0x401a4c20, 0x5df6: 0x401a4e20, 0x5df7: 0x401a5020, + 0x5df8: 0x401a5220, 0x5df9: 0x401a5420, 0x5dfa: 0x401a5620, 0x5dfb: 0x401a5820, + 0x5dfc: 0x401a5a20, 0x5dfd: 0x401a5c20, 0x5dfe: 0x401a5e20, 0x5dff: 0x401a6020, + // Block 0x178, offset 0x5e00 + 0x5e00: 0x401a6220, 0x5e01: 0x401a6420, 0x5e02: 0x401a6620, 0x5e03: 0x401a6820, + 0x5e04: 0x401a6a20, 0x5e05: 0x401a6c20, 0x5e06: 0x401a6e20, 0x5e07: 0x401a7020, + 0x5e08: 0x401a7220, 0x5e09: 0x401a7420, 0x5e0a: 0x401a7620, 0x5e0b: 0x401a7820, + 0x5e0c: 0x401a7a20, 0x5e0d: 0x401a7c20, 0x5e0e: 0x401a7e20, 0x5e0f: 0x401a8020, + 0x5e10: 0x401a8220, 0x5e11: 0x401a8420, 0x5e12: 0x401a8620, 0x5e13: 0x401a8820, + 0x5e14: 0x401a8a20, 0x5e15: 0x401a8c20, 0x5e16: 0x401a8e20, + 0x5e20: 0xe00002af, 0x5e21: 0xe00003ca, 0x5e22: 0xe00004a4, 0x5e23: 0xe0000576, + 0x5e24: 0xe000063d, 0x5e25: 0xe00006ed, 0x5e26: 0xe0000795, 0x5e27: 0xe000083e, + 0x5e28: 0xe00008e9, 0x5e29: 0x4029ba20, 0x5e2a: 0x4029bc20, 0x5e2b: 0x4029be20, + 0x5e2c: 0x4029c020, 0x5e2d: 0x4029c220, 0x5e2e: 0x4029c420, 0x5e2f: 0x4029c620, + 0x5e30: 0x4029c820, 0x5e31: 0x4029ca20, + // Block 0x179, offset 0x5e40 + 0x5e40: 0x002bde8b, 0x5e41: 0x002c0a8b, 0x5e42: 0x002c3a8b, 0x5e43: 0x002c628b, + 0x5e44: 0x002c988b, 0x5e45: 0x002d088b, 0x5e46: 0x002d228b, 0x5e47: 0x002d688b, + 0x5e48: 0x002d9a8b, 0x5e49: 0x002dcc8b, 0x5e4a: 0x002dfe8b, 0x5e4b: 0x002e228b, + 0x5e4c: 0x002e828b, 0x5e4d: 0x002e9e8b, 0x5e4e: 0x002ee28b, 0x5e4f: 0x002f2c8b, + 0x5e50: 0x002f568b, 0x5e51: 0x002f7a8b, 0x5e52: 0x002fe68b, 0x5e53: 0x00302c8b, + 0x5e54: 0x00306c8b, 0x5e55: 0x0030be8b, 0x5e56: 0x0030e28b, 0x5e57: 0x0030f68b, + 0x5e58: 0x0031008b, 0x5e59: 0x00312a8b, 0x5e5a: 0x002bde85, 0x5e5b: 0x002c0a85, + 0x5e5c: 0x002c3a85, 0x5e5d: 0x002c6285, 0x5e5e: 0x002c9885, 0x5e5f: 0x002d0885, + 0x5e60: 0x002d2285, 0x5e61: 0x002d6885, 0x5e62: 0x002d9a85, 0x5e63: 0x002dcc85, + 0x5e64: 0x002dfe85, 0x5e65: 0x002e2285, 0x5e66: 0x002e8285, 0x5e67: 0x002e9e85, + 0x5e68: 0x002ee285, 0x5e69: 0x002f2c85, 0x5e6a: 0x002f5685, 0x5e6b: 0x002f7a85, + 0x5e6c: 0x002fe685, 0x5e6d: 0x00302c85, 0x5e6e: 0x00306c85, 0x5e6f: 0x0030be85, + 0x5e70: 0x0030e285, 0x5e71: 0x0030f685, 0x5e72: 0x00310085, 0x5e73: 0x00312a85, + 0x5e74: 0x002bde8b, 0x5e75: 0x002c0a8b, 0x5e76: 0x002c3a8b, 0x5e77: 0x002c628b, + 0x5e78: 0x002c988b, 0x5e79: 0x002d088b, 0x5e7a: 0x002d228b, 0x5e7b: 0x002d688b, + 0x5e7c: 0x002d9a8b, 0x5e7d: 0x002dcc8b, 0x5e7e: 0x002dfe8b, 0x5e7f: 0x002e228b, + // Block 0x17a, offset 0x5e80 + 0x5e80: 0x002e828b, 0x5e81: 0x002e9e8b, 0x5e82: 0x002ee28b, 0x5e83: 0x002f2c8b, + 0x5e84: 0x002f568b, 0x5e85: 0x002f7a8b, 0x5e86: 0x002fe68b, 0x5e87: 0x00302c8b, + 0x5e88: 0x00306c8b, 0x5e89: 0x0030be8b, 0x5e8a: 0x0030e28b, 0x5e8b: 0x0030f68b, + 0x5e8c: 0x0031008b, 0x5e8d: 0x00312a8b, 0x5e8e: 0x002bde85, 0x5e8f: 0x002c0a85, + 0x5e90: 0x002c3a85, 0x5e91: 0x002c6285, 0x5e92: 0x002c9885, 0x5e93: 0x002d0885, + 0x5e94: 0x002d2285, 0x5e96: 0x002d9a85, 0x5e97: 0x002dcc85, + 0x5e98: 0x002dfe85, 0x5e99: 0x002e2285, 0x5e9a: 0x002e8285, 0x5e9b: 0x002e9e85, + 0x5e9c: 0x002ee285, 0x5e9d: 0x002f2c85, 0x5e9e: 0x002f5685, 0x5e9f: 0x002f7a85, + 0x5ea0: 0x002fe685, 0x5ea1: 0x00302c85, 0x5ea2: 0x00306c85, 0x5ea3: 0x0030be85, + 0x5ea4: 0x0030e285, 0x5ea5: 0x0030f685, 0x5ea6: 0x00310085, 0x5ea7: 0x00312a85, + 0x5ea8: 0x002bde8b, 0x5ea9: 0x002c0a8b, 0x5eaa: 0x002c3a8b, 0x5eab: 0x002c628b, + 0x5eac: 0x002c988b, 0x5ead: 0x002d088b, 0x5eae: 0x002d228b, 0x5eaf: 0x002d688b, + 0x5eb0: 0x002d9a8b, 0x5eb1: 0x002dcc8b, 0x5eb2: 0x002dfe8b, 0x5eb3: 0x002e228b, + 0x5eb4: 0x002e828b, 0x5eb5: 0x002e9e8b, 0x5eb6: 0x002ee28b, 0x5eb7: 0x002f2c8b, + 0x5eb8: 0x002f568b, 0x5eb9: 0x002f7a8b, 0x5eba: 0x002fe68b, 0x5ebb: 0x00302c8b, + 0x5ebc: 0x00306c8b, 0x5ebd: 0x0030be8b, 0x5ebe: 0x0030e28b, 0x5ebf: 0x0030f68b, + // Block 0x17b, offset 0x5ec0 + 0x5ec0: 0x0031008b, 0x5ec1: 0x00312a8b, 0x5ec2: 0x002bde85, 0x5ec3: 0x002c0a85, + 0x5ec4: 0x002c3a85, 0x5ec5: 0x002c6285, 0x5ec6: 0x002c9885, 0x5ec7: 0x002d0885, + 0x5ec8: 0x002d2285, 0x5ec9: 0x002d6885, 0x5eca: 0x002d9a85, 0x5ecb: 0x002dcc85, + 0x5ecc: 0x002dfe85, 0x5ecd: 0x002e2285, 0x5ece: 0x002e8285, 0x5ecf: 0x002e9e85, + 0x5ed0: 0x002ee285, 0x5ed1: 0x002f2c85, 0x5ed2: 0x002f5685, 0x5ed3: 0x002f7a85, + 0x5ed4: 0x002fe685, 0x5ed5: 0x00302c85, 0x5ed6: 0x00306c85, 0x5ed7: 0x0030be85, + 0x5ed8: 0x0030e285, 0x5ed9: 0x0030f685, 0x5eda: 0x00310085, 0x5edb: 0x00312a85, + 0x5edc: 0x002bde8b, 0x5ede: 0x002c3a8b, 0x5edf: 0x002c628b, + 0x5ee2: 0x002d228b, + 0x5ee5: 0x002dcc8b, 0x5ee6: 0x002dfe8b, + 0x5ee9: 0x002e9e8b, 0x5eea: 0x002ee28b, 0x5eeb: 0x002f2c8b, + 0x5eec: 0x002f568b, 0x5eee: 0x002fe68b, 0x5eef: 0x00302c8b, + 0x5ef0: 0x00306c8b, 0x5ef1: 0x0030be8b, 0x5ef2: 0x0030e28b, 0x5ef3: 0x0030f68b, + 0x5ef4: 0x0031008b, 0x5ef5: 0x00312a8b, 0x5ef6: 0x002bde85, 0x5ef7: 0x002c0a85, + 0x5ef8: 0x002c3a85, 0x5ef9: 0x002c6285, 0x5efb: 0x002d0885, + 0x5efd: 0x002d6885, 0x5efe: 0x002d9a85, 0x5eff: 0x002dcc85, + // Block 0x17c, offset 0x5f00 + 0x5f00: 0x002dfe85, 0x5f01: 0x002e2285, 0x5f02: 0x002e8285, 0x5f03: 0x002e9e85, + 0x5f05: 0x002f2c85, 0x5f06: 0x002f5685, 0x5f07: 0x002f7a85, + 0x5f08: 0x002fe685, 0x5f09: 0x00302c85, 0x5f0a: 0x00306c85, 0x5f0b: 0x0030be85, + 0x5f0c: 0x0030e285, 0x5f0d: 0x0030f685, 0x5f0e: 0x00310085, 0x5f0f: 0x00312a85, + 0x5f10: 0x002bde8b, 0x5f11: 0x002c0a8b, 0x5f12: 0x002c3a8b, 0x5f13: 0x002c628b, + 0x5f14: 0x002c988b, 0x5f15: 0x002d088b, 0x5f16: 0x002d228b, 0x5f17: 0x002d688b, + 0x5f18: 0x002d9a8b, 0x5f19: 0x002dcc8b, 0x5f1a: 0x002dfe8b, 0x5f1b: 0x002e228b, + 0x5f1c: 0x002e828b, 0x5f1d: 0x002e9e8b, 0x5f1e: 0x002ee28b, 0x5f1f: 0x002f2c8b, + 0x5f20: 0x002f568b, 0x5f21: 0x002f7a8b, 0x5f22: 0x002fe68b, 0x5f23: 0x00302c8b, + 0x5f24: 0x00306c8b, 0x5f25: 0x0030be8b, 0x5f26: 0x0030e28b, 0x5f27: 0x0030f68b, + 0x5f28: 0x0031008b, 0x5f29: 0x00312a8b, 0x5f2a: 0x002bde85, 0x5f2b: 0x002c0a85, + 0x5f2c: 0x002c3a85, 0x5f2d: 0x002c6285, 0x5f2e: 0x002c9885, 0x5f2f: 0x002d0885, + 0x5f30: 0x002d2285, 0x5f31: 0x002d6885, 0x5f32: 0x002d9a85, 0x5f33: 0x002dcc85, + 0x5f34: 0x002dfe85, 0x5f35: 0x002e2285, 0x5f36: 0x002e8285, 0x5f37: 0x002e9e85, + 0x5f38: 0x002ee285, 0x5f39: 0x002f2c85, 0x5f3a: 0x002f5685, 0x5f3b: 0x002f7a85, + 0x5f3c: 0x002fe685, 0x5f3d: 0x00302c85, 0x5f3e: 0x00306c85, 0x5f3f: 0x0030be85, + // Block 0x17d, offset 0x5f40 + 0x5f40: 0x0030e285, 0x5f41: 0x0030f685, 0x5f42: 0x00310085, 0x5f43: 0x00312a85, + 0x5f44: 0x002bde8b, 0x5f45: 0x002c0a8b, 0x5f47: 0x002c628b, + 0x5f48: 0x002c988b, 0x5f49: 0x002d088b, 0x5f4a: 0x002d228b, + 0x5f4d: 0x002dcc8b, 0x5f4e: 0x002dfe8b, 0x5f4f: 0x002e228b, + 0x5f50: 0x002e828b, 0x5f51: 0x002e9e8b, 0x5f52: 0x002ee28b, 0x5f53: 0x002f2c8b, + 0x5f54: 0x002f568b, 0x5f56: 0x002fe68b, 0x5f57: 0x00302c8b, + 0x5f58: 0x00306c8b, 0x5f59: 0x0030be8b, 0x5f5a: 0x0030e28b, 0x5f5b: 0x0030f68b, + 0x5f5c: 0x0031008b, 0x5f5e: 0x002bde85, 0x5f5f: 0x002c0a85, + 0x5f60: 0x002c3a85, 0x5f61: 0x002c6285, 0x5f62: 0x002c9885, 0x5f63: 0x002d0885, + 0x5f64: 0x002d2285, 0x5f65: 0x002d6885, 0x5f66: 0x002d9a85, 0x5f67: 0x002dcc85, + 0x5f68: 0x002dfe85, 0x5f69: 0x002e2285, 0x5f6a: 0x002e8285, 0x5f6b: 0x002e9e85, + 0x5f6c: 0x002ee285, 0x5f6d: 0x002f2c85, 0x5f6e: 0x002f5685, 0x5f6f: 0x002f7a85, + 0x5f70: 0x002fe685, 0x5f71: 0x00302c85, 0x5f72: 0x00306c85, 0x5f73: 0x0030be85, + 0x5f74: 0x0030e285, 0x5f75: 0x0030f685, 0x5f76: 0x00310085, 0x5f77: 0x00312a85, + 0x5f78: 0x002bde8b, 0x5f79: 0x002c0a8b, 0x5f7b: 0x002c628b, + 0x5f7c: 0x002c988b, 0x5f7d: 0x002d088b, 0x5f7e: 0x002d228b, + // Block 0x17e, offset 0x5f80 + 0x5f80: 0x002d9a8b, 0x5f81: 0x002dcc8b, 0x5f82: 0x002dfe8b, 0x5f83: 0x002e228b, + 0x5f84: 0x002e828b, 0x5f86: 0x002ee28b, + 0x5f8a: 0x002fe68b, 0x5f8b: 0x00302c8b, + 0x5f8c: 0x00306c8b, 0x5f8d: 0x0030be8b, 0x5f8e: 0x0030e28b, 0x5f8f: 0x0030f68b, + 0x5f90: 0x0031008b, 0x5f92: 0x002bde85, 0x5f93: 0x002c0a85, + 0x5f94: 0x002c3a85, 0x5f95: 0x002c6285, 0x5f96: 0x002c9885, 0x5f97: 0x002d0885, + 0x5f98: 0x002d2285, 0x5f99: 0x002d6885, 0x5f9a: 0x002d9a85, 0x5f9b: 0x002dcc85, + 0x5f9c: 0x002dfe85, 0x5f9d: 0x002e2285, 0x5f9e: 0x002e8285, 0x5f9f: 0x002e9e85, + 0x5fa0: 0x002ee285, 0x5fa1: 0x002f2c85, 0x5fa2: 0x002f5685, 0x5fa3: 0x002f7a85, + 0x5fa4: 0x002fe685, 0x5fa5: 0x00302c85, 0x5fa6: 0x00306c85, 0x5fa7: 0x0030be85, + 0x5fa8: 0x0030e285, 0x5fa9: 0x0030f685, 0x5faa: 0x00310085, 0x5fab: 0x00312a85, + 0x5fac: 0x002bde8b, 0x5fad: 0x002c0a8b, 0x5fae: 0x002c3a8b, 0x5faf: 0x002c628b, + 0x5fb0: 0x002c988b, 0x5fb1: 0x002d088b, 0x5fb2: 0x002d228b, 0x5fb3: 0x002d688b, + 0x5fb4: 0x002d9a8b, 0x5fb5: 0x002dcc8b, 0x5fb6: 0x002dfe8b, 0x5fb7: 0x002e228b, + 0x5fb8: 0x002e828b, 0x5fb9: 0x002e9e8b, 0x5fba: 0x002ee28b, 0x5fbb: 0x002f2c8b, + 0x5fbc: 0x002f568b, 0x5fbd: 0x002f7a8b, 0x5fbe: 0x002fe68b, 0x5fbf: 0x00302c8b, + // Block 0x17f, offset 0x5fc0 + 0x5fc0: 0x00306c8b, 0x5fc1: 0x0030be8b, 0x5fc2: 0x0030e28b, 0x5fc3: 0x0030f68b, + 0x5fc4: 0x0031008b, 0x5fc5: 0x00312a8b, 0x5fc6: 0x002bde85, 0x5fc7: 0x002c0a85, + 0x5fc8: 0x002c3a85, 0x5fc9: 0x002c6285, 0x5fca: 0x002c9885, 0x5fcb: 0x002d0885, + 0x5fcc: 0x002d2285, 0x5fcd: 0x002d6885, 0x5fce: 0x002d9a85, 0x5fcf: 0x002dcc85, + 0x5fd0: 0x002dfe85, 0x5fd1: 0x002e2285, 0x5fd2: 0x002e8285, 0x5fd3: 0x002e9e85, + 0x5fd4: 0x002ee285, 0x5fd5: 0x002f2c85, 0x5fd6: 0x002f5685, 0x5fd7: 0x002f7a85, + 0x5fd8: 0x002fe685, 0x5fd9: 0x00302c85, 0x5fda: 0x00306c85, 0x5fdb: 0x0030be85, + 0x5fdc: 0x0030e285, 0x5fdd: 0x0030f685, 0x5fde: 0x00310085, 0x5fdf: 0x00312a85, + 0x5fe0: 0x002bde8b, 0x5fe1: 0x002c0a8b, 0x5fe2: 0x002c3a8b, 0x5fe3: 0x002c628b, + 0x5fe4: 0x002c988b, 0x5fe5: 0x002d088b, 0x5fe6: 0x002d228b, 0x5fe7: 0x002d688b, + 0x5fe8: 0x002d9a8b, 0x5fe9: 0x002dcc8b, 0x5fea: 0x002dfe8b, 0x5feb: 0x002e228b, + 0x5fec: 0x002e828b, 0x5fed: 0x002e9e8b, 0x5fee: 0x002ee28b, 0x5fef: 0x002f2c8b, + 0x5ff0: 0x002f568b, 0x5ff1: 0x002f7a8b, 0x5ff2: 0x002fe68b, 0x5ff3: 0x00302c8b, + 0x5ff4: 0x00306c8b, 0x5ff5: 0x0030be8b, 0x5ff6: 0x0030e28b, 0x5ff7: 0x0030f68b, + 0x5ff8: 0x0031008b, 0x5ff9: 0x00312a8b, 0x5ffa: 0x002bde85, 0x5ffb: 0x002c0a85, + 0x5ffc: 0x002c3a85, 0x5ffd: 0x002c6285, 0x5ffe: 0x002c9885, 0x5fff: 0x002d0885, + // Block 0x180, offset 0x6000 + 0x6000: 0x002d2285, 0x6001: 0x002d6885, 0x6002: 0x002d9a85, 0x6003: 0x002dcc85, + 0x6004: 0x002dfe85, 0x6005: 0x002e2285, 0x6006: 0x002e8285, 0x6007: 0x002e9e85, + 0x6008: 0x002ee285, 0x6009: 0x002f2c85, 0x600a: 0x002f5685, 0x600b: 0x002f7a85, + 0x600c: 0x002fe685, 0x600d: 0x00302c85, 0x600e: 0x00306c85, 0x600f: 0x0030be85, + 0x6010: 0x0030e285, 0x6011: 0x0030f685, 0x6012: 0x00310085, 0x6013: 0x00312a85, + 0x6014: 0x002bde8b, 0x6015: 0x002c0a8b, 0x6016: 0x002c3a8b, 0x6017: 0x002c628b, + 0x6018: 0x002c988b, 0x6019: 0x002d088b, 0x601a: 0x002d228b, 0x601b: 0x002d688b, + 0x601c: 0x002d9a8b, 0x601d: 0x002dcc8b, 0x601e: 0x002dfe8b, 0x601f: 0x002e228b, + 0x6020: 0x002e828b, 0x6021: 0x002e9e8b, 0x6022: 0x002ee28b, 0x6023: 0x002f2c8b, + 0x6024: 0x002f568b, 0x6025: 0x002f7a8b, 0x6026: 0x002fe68b, 0x6027: 0x00302c8b, + 0x6028: 0x00306c8b, 0x6029: 0x0030be8b, 0x602a: 0x0030e28b, 0x602b: 0x0030f68b, + 0x602c: 0x0031008b, 0x602d: 0x00312a8b, 0x602e: 0x002bde85, 0x602f: 0x002c0a85, + 0x6030: 0x002c3a85, 0x6031: 0x002c6285, 0x6032: 0x002c9885, 0x6033: 0x002d0885, + 0x6034: 0x002d2285, 0x6035: 0x002d6885, 0x6036: 0x002d9a85, 0x6037: 0x002dcc85, + 0x6038: 0x002dfe85, 0x6039: 0x002e2285, 0x603a: 0x002e8285, 0x603b: 0x002e9e85, + 0x603c: 0x002ee285, 0x603d: 0x002f2c85, 0x603e: 0x002f5685, 0x603f: 0x002f7a85, + // Block 0x181, offset 0x6040 + 0x6040: 0x002fe685, 0x6041: 0x00302c85, 0x6042: 0x00306c85, 0x6043: 0x0030be85, + 0x6044: 0x0030e285, 0x6045: 0x0030f685, 0x6046: 0x00310085, 0x6047: 0x00312a85, + 0x6048: 0x002bde8b, 0x6049: 0x002c0a8b, 0x604a: 0x002c3a8b, 0x604b: 0x002c628b, + 0x604c: 0x002c988b, 0x604d: 0x002d088b, 0x604e: 0x002d228b, 0x604f: 0x002d688b, + 0x6050: 0x002d9a8b, 0x6051: 0x002dcc8b, 0x6052: 0x002dfe8b, 0x6053: 0x002e228b, + 0x6054: 0x002e828b, 0x6055: 0x002e9e8b, 0x6056: 0x002ee28b, 0x6057: 0x002f2c8b, + 0x6058: 0x002f568b, 0x6059: 0x002f7a8b, 0x605a: 0x002fe68b, 0x605b: 0x00302c8b, + 0x605c: 0x00306c8b, 0x605d: 0x0030be8b, 0x605e: 0x0030e28b, 0x605f: 0x0030f68b, + 0x6060: 0x0031008b, 0x6061: 0x00312a8b, 0x6062: 0x002bde85, 0x6063: 0x002c0a85, + 0x6064: 0x002c3a85, 0x6065: 0x002c6285, 0x6066: 0x002c9885, 0x6067: 0x002d0885, + 0x6068: 0x002d2285, 0x6069: 0x002d6885, 0x606a: 0x002d9a85, 0x606b: 0x002dcc85, + 0x606c: 0x002dfe85, 0x606d: 0x002e2285, 0x606e: 0x002e8285, 0x606f: 0x002e9e85, + 0x6070: 0x002ee285, 0x6071: 0x002f2c85, 0x6072: 0x002f5685, 0x6073: 0x002f7a85, + 0x6074: 0x002fe685, 0x6075: 0x00302c85, 0x6076: 0x00306c85, 0x6077: 0x0030be85, + 0x6078: 0x0030e285, 0x6079: 0x0030f685, 0x607a: 0x00310085, 0x607b: 0x00312a85, + 0x607c: 0x002bde8b, 0x607d: 0x002c0a8b, 0x607e: 0x002c3a8b, 0x607f: 0x002c628b, + // Block 0x182, offset 0x6080 + 0x6080: 0x002c988b, 0x6081: 0x002d088b, 0x6082: 0x002d228b, 0x6083: 0x002d688b, + 0x6084: 0x002d9a8b, 0x6085: 0x002dcc8b, 0x6086: 0x002dfe8b, 0x6087: 0x002e228b, + 0x6088: 0x002e828b, 0x6089: 0x002e9e8b, 0x608a: 0x002ee28b, 0x608b: 0x002f2c8b, + 0x608c: 0x002f568b, 0x608d: 0x002f7a8b, 0x608e: 0x002fe68b, 0x608f: 0x00302c8b, + 0x6090: 0x00306c8b, 0x6091: 0x0030be8b, 0x6092: 0x0030e28b, 0x6093: 0x0030f68b, + 0x6094: 0x0031008b, 0x6095: 0x00312a8b, 0x6096: 0x002bde85, 0x6097: 0x002c0a85, + 0x6098: 0x002c3a85, 0x6099: 0x002c6285, 0x609a: 0x002c9885, 0x609b: 0x002d0885, + 0x609c: 0x002d2285, 0x609d: 0x002d6885, 0x609e: 0x002d9a85, 0x609f: 0x002dcc85, + 0x60a0: 0x002dfe85, 0x60a1: 0x002e2285, 0x60a2: 0x002e8285, 0x60a3: 0x002e9e85, + 0x60a4: 0x002ee285, 0x60a5: 0x002f2c85, 0x60a6: 0x002f5685, 0x60a7: 0x002f7a85, + 0x60a8: 0x002fe685, 0x60a9: 0x00302c85, 0x60aa: 0x00306c85, 0x60ab: 0x0030be85, + 0x60ac: 0x0030e285, 0x60ad: 0x0030f685, 0x60ae: 0x00310085, 0x60af: 0x00312a85, + 0x60b0: 0x002bde8b, 0x60b1: 0x002c0a8b, 0x60b2: 0x002c3a8b, 0x60b3: 0x002c628b, + 0x60b4: 0x002c988b, 0x60b5: 0x002d088b, 0x60b6: 0x002d228b, 0x60b7: 0x002d688b, + 0x60b8: 0x002d9a8b, 0x60b9: 0x002dcc8b, 0x60ba: 0x002dfe8b, 0x60bb: 0x002e228b, + 0x60bc: 0x002e828b, 0x60bd: 0x002e9e8b, 0x60be: 0x002ee28b, 0x60bf: 0x002f2c8b, + // Block 0x183, offset 0x60c0 + 0x60c0: 0x002f568b, 0x60c1: 0x002f7a8b, 0x60c2: 0x002fe68b, 0x60c3: 0x00302c8b, + 0x60c4: 0x00306c8b, 0x60c5: 0x0030be8b, 0x60c6: 0x0030e28b, 0x60c7: 0x0030f68b, + 0x60c8: 0x0031008b, 0x60c9: 0x00312a8b, 0x60ca: 0x002bde85, 0x60cb: 0x002c0a85, + 0x60cc: 0x002c3a85, 0x60cd: 0x002c6285, 0x60ce: 0x002c9885, 0x60cf: 0x002d0885, + 0x60d0: 0x002d2285, 0x60d1: 0x002d6885, 0x60d2: 0x002d9a85, 0x60d3: 0x002dcc85, + 0x60d4: 0x002dfe85, 0x60d5: 0x002e2285, 0x60d6: 0x002e8285, 0x60d7: 0x002e9e85, + 0x60d8: 0x002ee285, 0x60d9: 0x002f2c85, 0x60da: 0x002f5685, 0x60db: 0x002f7a85, + 0x60dc: 0x002fe685, 0x60dd: 0x00302c85, 0x60de: 0x00306c85, 0x60df: 0x0030be85, + 0x60e0: 0x0030e285, 0x60e1: 0x0030f685, 0x60e2: 0x00310085, 0x60e3: 0x00312a85, + 0x60e4: 0x002da285, 0x60e5: 0x002dd485, + 0x60e8: 0x0032528b, 0x60e9: 0x0032548b, 0x60ea: 0x0032568b, 0x60eb: 0x00325a8b, + 0x60ec: 0x00325c8b, 0x60ed: 0x0032648b, 0x60ee: 0x0032688b, 0x60ef: 0x00326a8b, + 0x60f0: 0x00326c8b, 0x60f1: 0x0032708b, 0x60f2: 0x0032728b, 0x60f3: 0x0032768b, + 0x60f4: 0x0032788b, 0x60f5: 0x00327a8b, 0x60f6: 0x00327c8b, 0x60f7: 0x00327e8b, + 0x60f8: 0x0032888b, 0x60f9: 0x00326a8b, 0x60fa: 0x00328e8b, 0x60fb: 0x0032968b, + 0x60fc: 0x0032988b, 0x60fd: 0x00329a8b, 0x60fe: 0x00329c8b, 0x60ff: 0x00329e8b, + // Block 0x184, offset 0x6100 + 0x6100: 0x0032a28b, 0x6101: 0x00092485, 0x6102: 0x00325285, 0x6103: 0x00325485, + 0x6104: 0x00325685, 0x6105: 0x00325a85, 0x6106: 0x00325c85, 0x6107: 0x00326485, + 0x6108: 0x00326885, 0x6109: 0x00326a85, 0x610a: 0x00326c85, 0x610b: 0x00327085, + 0x610c: 0x00327285, 0x610d: 0x00327685, 0x610e: 0x00327885, 0x610f: 0x00327a85, + 0x6110: 0x00327c85, 0x6111: 0x00327e85, 0x6112: 0x00328885, 0x6113: 0x00328e85, + 0x6114: 0x00328e85, 0x6115: 0x00329685, 0x6116: 0x00329885, 0x6117: 0x00329a85, + 0x6118: 0x00329c85, 0x6119: 0x00329e85, 0x611a: 0x0032a285, 0x611b: 0x00091c85, + 0x611c: 0x00325c85, 0x611d: 0x00326a85, 0x611e: 0x00327085, 0x611f: 0x00329a85, + 0x6120: 0x00328885, 0x6121: 0x00327e85, 0x6122: 0x0032528b, 0x6123: 0x0032548b, + 0x6124: 0x0032568b, 0x6125: 0x00325a8b, 0x6126: 0x00325c8b, 0x6127: 0x0032648b, + 0x6128: 0x0032688b, 0x6129: 0x00326a8b, 0x612a: 0x00326c8b, 0x612b: 0x0032708b, + 0x612c: 0x0032728b, 0x612d: 0x0032768b, 0x612e: 0x0032788b, 0x612f: 0x00327a8b, + 0x6130: 0x00327c8b, 0x6131: 0x00327e8b, 0x6132: 0x0032888b, 0x6133: 0x00326a8b, + 0x6134: 0x00328e8b, 0x6135: 0x0032968b, 0x6136: 0x0032988b, 0x6137: 0x00329a8b, + 0x6138: 0x00329c8b, 0x6139: 0x00329e8b, 0x613a: 0x0032a28b, 0x613b: 0x00092485, + 0x613c: 0x00325285, 0x613d: 0x00325485, 0x613e: 0x00325685, 0x613f: 0x00325a85, + // Block 0x185, offset 0x6140 + 0x6140: 0x00325c85, 0x6141: 0x00326485, 0x6142: 0x00326885, 0x6143: 0x00326a85, + 0x6144: 0x00326c85, 0x6145: 0x00327085, 0x6146: 0x00327285, 0x6147: 0x00327685, + 0x6148: 0x00327885, 0x6149: 0x00327a85, 0x614a: 0x00327c85, 0x614b: 0x00327e85, + 0x614c: 0x00328885, 0x614d: 0x00328e85, 0x614e: 0x00328e85, 0x614f: 0x00329685, + 0x6150: 0x00329885, 0x6151: 0x00329a85, 0x6152: 0x00329c85, 0x6153: 0x00329e85, + 0x6154: 0x0032a285, 0x6155: 0x00091c85, 0x6156: 0x00325c85, 0x6157: 0x00326a85, + 0x6158: 0x00327085, 0x6159: 0x00329a85, 0x615a: 0x00328885, 0x615b: 0x00327e85, + 0x615c: 0x0032528b, 0x615d: 0x0032548b, 0x615e: 0x0032568b, 0x615f: 0x00325a8b, + 0x6160: 0x00325c8b, 0x6161: 0x0032648b, 0x6162: 0x0032688b, 0x6163: 0x00326a8b, + 0x6164: 0x00326c8b, 0x6165: 0x0032708b, 0x6166: 0x0032728b, 0x6167: 0x0032768b, + 0x6168: 0x0032788b, 0x6169: 0x00327a8b, 0x616a: 0x00327c8b, 0x616b: 0x00327e8b, + 0x616c: 0x0032888b, 0x616d: 0x00326a8b, 0x616e: 0x00328e8b, 0x616f: 0x0032968b, + 0x6170: 0x0032988b, 0x6171: 0x00329a8b, 0x6172: 0x00329c8b, 0x6173: 0x00329e8b, + 0x6174: 0x0032a28b, 0x6175: 0x00092485, 0x6176: 0x00325285, 0x6177: 0x00325485, + 0x6178: 0x00325685, 0x6179: 0x00325a85, 0x617a: 0x00325c85, 0x617b: 0x00326485, + 0x617c: 0x00326885, 0x617d: 0x00326a85, 0x617e: 0x00326c85, 0x617f: 0x00327085, + // Block 0x186, offset 0x6180 + 0x6180: 0x00327285, 0x6181: 0x00327685, 0x6182: 0x00327885, 0x6183: 0x00327a85, + 0x6184: 0x00327c85, 0x6185: 0x00327e85, 0x6186: 0x00328885, 0x6187: 0x00328e85, + 0x6188: 0x00328e85, 0x6189: 0x00329685, 0x618a: 0x00329885, 0x618b: 0x00329a85, + 0x618c: 0x00329c85, 0x618d: 0x00329e85, 0x618e: 0x0032a285, 0x618f: 0x00091c85, + 0x6190: 0x00325c85, 0x6191: 0x00326a85, 0x6192: 0x00327085, 0x6193: 0x00329a85, + 0x6194: 0x00328885, 0x6195: 0x00327e85, 0x6196: 0x0032528b, 0x6197: 0x0032548b, + 0x6198: 0x0032568b, 0x6199: 0x00325a8b, 0x619a: 0x00325c8b, 0x619b: 0x0032648b, + 0x619c: 0x0032688b, 0x619d: 0x00326a8b, 0x619e: 0x00326c8b, 0x619f: 0x0032708b, + 0x61a0: 0x0032728b, 0x61a1: 0x0032768b, 0x61a2: 0x0032788b, 0x61a3: 0x00327a8b, + 0x61a4: 0x00327c8b, 0x61a5: 0x00327e8b, 0x61a6: 0x0032888b, 0x61a7: 0x00326a8b, + 0x61a8: 0x00328e8b, 0x61a9: 0x0032968b, 0x61aa: 0x0032988b, 0x61ab: 0x00329a8b, + 0x61ac: 0x00329c8b, 0x61ad: 0x00329e8b, 0x61ae: 0x0032a28b, 0x61af: 0x00092485, + 0x61b0: 0x00325285, 0x61b1: 0x00325485, 0x61b2: 0x00325685, 0x61b3: 0x00325a85, + 0x61b4: 0x00325c85, 0x61b5: 0x00326485, 0x61b6: 0x00326885, 0x61b7: 0x00326a85, + 0x61b8: 0x00326c85, 0x61b9: 0x00327085, 0x61ba: 0x00327285, 0x61bb: 0x00327685, + 0x61bc: 0x00327885, 0x61bd: 0x00327a85, 0x61be: 0x00327c85, 0x61bf: 0x00327e85, + // Block 0x187, offset 0x61c0 + 0x61c0: 0x00328885, 0x61c1: 0x00328e85, 0x61c2: 0x00328e85, 0x61c3: 0x00329685, + 0x61c4: 0x00329885, 0x61c5: 0x00329a85, 0x61c6: 0x00329c85, 0x61c7: 0x00329e85, + 0x61c8: 0x0032a285, 0x61c9: 0x00091c85, 0x61ca: 0x00325c85, 0x61cb: 0x00326a85, + 0x61cc: 0x00327085, 0x61cd: 0x00329a85, 0x61ce: 0x00328885, 0x61cf: 0x00327e85, + 0x61d0: 0x0032528b, 0x61d1: 0x0032548b, 0x61d2: 0x0032568b, 0x61d3: 0x00325a8b, + 0x61d4: 0x00325c8b, 0x61d5: 0x0032648b, 0x61d6: 0x0032688b, 0x61d7: 0x00326a8b, + 0x61d8: 0x00326c8b, 0x61d9: 0x0032708b, 0x61da: 0x0032728b, 0x61db: 0x0032768b, + 0x61dc: 0x0032788b, 0x61dd: 0x00327a8b, 0x61de: 0x00327c8b, 0x61df: 0x00327e8b, + 0x61e0: 0x0032888b, 0x61e1: 0x00326a8b, 0x61e2: 0x00328e8b, 0x61e3: 0x0032968b, + 0x61e4: 0x0032988b, 0x61e5: 0x00329a8b, 0x61e6: 0x00329c8b, 0x61e7: 0x00329e8b, + 0x61e8: 0x0032a28b, 0x61e9: 0x00092485, 0x61ea: 0x00325285, 0x61eb: 0x00325485, + 0x61ec: 0x00325685, 0x61ed: 0x00325a85, 0x61ee: 0x00325c85, 0x61ef: 0x00326485, + 0x61f0: 0x00326885, 0x61f1: 0x00326a85, 0x61f2: 0x00326c85, 0x61f3: 0x00327085, + 0x61f4: 0x00327285, 0x61f5: 0x00327685, 0x61f6: 0x00327885, 0x61f7: 0x00327a85, + 0x61f8: 0x00327c85, 0x61f9: 0x00327e85, 0x61fa: 0x00328885, 0x61fb: 0x00328e85, + 0x61fc: 0x00328e85, 0x61fd: 0x00329685, 0x61fe: 0x00329885, 0x61ff: 0x00329a85, + // Block 0x188, offset 0x6200 + 0x6200: 0x00329c85, 0x6201: 0x00329e85, 0x6202: 0x0032a285, 0x6203: 0x00091c85, + 0x6204: 0x00325c85, 0x6205: 0x00326a85, 0x6206: 0x00327085, 0x6207: 0x00329a85, + 0x6208: 0x00328885, 0x6209: 0x00327e85, 0x620a: 0x00325e8b, 0x620b: 0x00325e85, + 0x620e: 0x0029cc85, 0x620f: 0x0029ce85, + 0x6210: 0x0029d085, 0x6211: 0x0029d285, 0x6212: 0x0029d485, 0x6213: 0x0029d685, + 0x6214: 0x0029d885, 0x6215: 0x0029da85, 0x6216: 0x0029dc85, 0x6217: 0x0029de85, + 0x6218: 0x0029cc85, 0x6219: 0x0029ce85, 0x621a: 0x0029d085, 0x621b: 0x0029d285, + 0x621c: 0x0029d485, 0x621d: 0x0029d685, 0x621e: 0x0029d885, 0x621f: 0x0029da85, + 0x6220: 0x0029dc85, 0x6221: 0x0029de85, 0x6222: 0x0029cc85, 0x6223: 0x0029ce85, + 0x6224: 0x0029d085, 0x6225: 0x0029d285, 0x6226: 0x0029d485, 0x6227: 0x0029d685, + 0x6228: 0x0029d885, 0x6229: 0x0029da85, 0x622a: 0x0029dc85, 0x622b: 0x0029de85, + 0x622c: 0x0029cc85, 0x622d: 0x0029ce85, 0x622e: 0x0029d085, 0x622f: 0x0029d285, + 0x6230: 0x0029d485, 0x6231: 0x0029d685, 0x6232: 0x0029d885, 0x6233: 0x0029da85, + 0x6234: 0x0029dc85, 0x6235: 0x0029de85, 0x6236: 0x0029cc85, 0x6237: 0x0029ce85, + 0x6238: 0x0029d085, 0x6239: 0x0029d285, 0x623a: 0x0029d485, 0x623b: 0x0029d685, + 0x623c: 0x0029d885, 0x623d: 0x0029da85, 0x623e: 0x0029dc85, 0x623f: 0x0029de85, + // Block 0x189, offset 0x6240 + 0x6240: 0x00393885, 0x6241: 0x00393c85, 0x6242: 0x00396485, 0x6243: 0x00398885, + 0x6245: 0x003a7485, 0x6246: 0x0039a685, 0x6247: 0x00397285, + 0x6248: 0x0039e685, 0x6249: 0x003a9085, 0x624a: 0x003a1a85, 0x624b: 0x003a4085, + 0x624c: 0x003a4e85, 0x624d: 0x003a5685, 0x624e: 0x0039c685, 0x624f: 0x0039ee85, + 0x6250: 0x0039fc85, 0x6251: 0x0039dc85, 0x6252: 0x003a1285, 0x6253: 0x0039a485, + 0x6254: 0x0039c885, 0x6255: 0x00395685, 0x6256: 0x00395885, 0x6257: 0x00397485, + 0x6258: 0x00398a85, 0x6259: 0x0039de85, 0x625a: 0x0039e885, 0x625b: 0x0039f085, + 0x625c: 0x00393a85, 0x625d: 0x003a5885, 0x625e: 0x0039fe85, 0x625f: 0x003a1085, + 0x6261: 0x00393c85, 0x6262: 0x00396485, + 0x6264: 0x003a6885, 0x6267: 0x00397285, + 0x6269: 0x003a9085, 0x626a: 0x003a1a85, 0x626b: 0x003a4085, + 0x626c: 0x003a4e85, 0x626d: 0x003a5685, 0x626e: 0x0039c685, 0x626f: 0x0039ee85, + 0x6270: 0x0039fc85, 0x6271: 0x0039dc85, 0x6272: 0x003a1285, + 0x6274: 0x0039c885, 0x6275: 0x00395685, 0x6276: 0x00395885, 0x6277: 0x00397485, + 0x6279: 0x0039de85, 0x627b: 0x0039f085, + // Block 0x18a, offset 0x6280 + 0x6282: 0x00396485, + 0x6287: 0x00397285, + 0x6289: 0x003a9085, 0x628b: 0x003a4085, + 0x628d: 0x003a5685, 0x628e: 0x0039c685, 0x628f: 0x0039ee85, + 0x6291: 0x0039dc85, 0x6292: 0x003a1285, + 0x6294: 0x0039c885, 0x6297: 0x00397485, + 0x6299: 0x0039de85, 0x629b: 0x0039f085, + 0x629d: 0x003a5885, 0x629f: 0x003a1085, + 0x62a1: 0x00393c85, 0x62a2: 0x00396485, + 0x62a4: 0x003a6885, 0x62a7: 0x00397285, + 0x62a8: 0x0039e685, 0x62a9: 0x003a9085, 0x62aa: 0x003a1a85, + 0x62ac: 0x003a4e85, 0x62ad: 0x003a5685, 0x62ae: 0x0039c685, 0x62af: 0x0039ee85, + 0x62b0: 0x0039fc85, 0x62b1: 0x0039dc85, 0x62b2: 0x003a1285, + 0x62b4: 0x0039c885, 0x62b5: 0x00395685, 0x62b6: 0x00395885, 0x62b7: 0x00397485, + 0x62b9: 0x0039de85, 0x62ba: 0x0039e885, 0x62bb: 0x0039f085, + 0x62bc: 0x00393a85, 0x62be: 0x0039fe85, + // Block 0x18b, offset 0x62c0 + 0x62c0: 0x00393885, 0x62c1: 0x00393c85, 0x62c2: 0x00396485, 0x62c3: 0x00398885, + 0x62c4: 0x003a6885, 0x62c5: 0x003a7485, 0x62c6: 0x0039a685, 0x62c7: 0x00397285, + 0x62c8: 0x0039e685, 0x62c9: 0x003a9085, 0x62cb: 0x003a4085, + 0x62cc: 0x003a4e85, 0x62cd: 0x003a5685, 0x62ce: 0x0039c685, 0x62cf: 0x0039ee85, + 0x62d0: 0x0039fc85, 0x62d1: 0x0039dc85, 0x62d2: 0x003a1285, 0x62d3: 0x0039a485, + 0x62d4: 0x0039c885, 0x62d5: 0x00395685, 0x62d6: 0x00395885, 0x62d7: 0x00397485, + 0x62d8: 0x00398a85, 0x62d9: 0x0039de85, 0x62da: 0x0039e885, 0x62db: 0x0039f085, + 0x62e1: 0x00393c85, 0x62e2: 0x00396485, 0x62e3: 0x00398885, + 0x62e5: 0x003a7485, 0x62e6: 0x0039a685, 0x62e7: 0x00397285, + 0x62e8: 0x0039e685, 0x62e9: 0x003a9085, 0x62eb: 0x003a4085, + 0x62ec: 0x003a4e85, 0x62ed: 0x003a5685, 0x62ee: 0x0039c685, 0x62ef: 0x0039ee85, + 0x62f0: 0x0039fc85, 0x62f1: 0x0039dc85, 0x62f2: 0x003a1285, 0x62f3: 0x0039a485, + 0x62f4: 0x0039c885, 0x62f5: 0x00395685, 0x62f6: 0x00395885, 0x62f7: 0x00397485, + 0x62f8: 0x00398a85, 0x62f9: 0x0039de85, 0x62fa: 0x0039e885, 0x62fb: 0x0039f085, + // Block 0x18c, offset 0x6300 + 0x6330: 0x40070a20, 0x6331: 0x40070c20, + // Block 0x18d, offset 0x6340 + 0x6340: 0x401f6e20, 0x6341: 0x401f7020, 0x6342: 0x401f7220, 0x6343: 0x401f7420, + 0x6344: 0x401f7620, 0x6345: 0x401f7820, 0x6346: 0x401f7a20, 0x6347: 0x401f7c20, + 0x6348: 0x401f7e20, 0x6349: 0x401f8020, 0x634a: 0x401f8220, 0x634b: 0x401f8420, + 0x634c: 0x401f8620, 0x634d: 0x401f8820, 0x634e: 0x401f8a20, 0x634f: 0x401f8c20, + 0x6350: 0x401f8e20, 0x6351: 0x401f9020, 0x6352: 0x401f9220, 0x6353: 0x401f9420, + 0x6354: 0x401f9620, 0x6355: 0x401f9820, 0x6356: 0x401f9a20, 0x6357: 0x401f9c20, + 0x6358: 0x401f9e20, 0x6359: 0x401fa020, 0x635a: 0x401fa220, 0x635b: 0x401fa420, + 0x635c: 0x401fa620, 0x635d: 0x401fa820, 0x635e: 0x401faa20, 0x635f: 0x401fac20, + 0x6360: 0x401fae20, 0x6361: 0x401fb020, 0x6362: 0x401fb220, 0x6363: 0x401fb420, + 0x6364: 0x401fb620, 0x6365: 0x401fb820, 0x6366: 0x401fba20, 0x6367: 0x401fbc20, + 0x6368: 0x401fbe20, 0x6369: 0x401fc020, 0x636a: 0x401fc220, 0x636b: 0x401fc420, + 0x6370: 0x401fc620, 0x6371: 0x401fc820, 0x6372: 0x401fca20, 0x6373: 0x401fcc20, + 0x6374: 0x401fce20, 0x6375: 0x401fd020, 0x6376: 0x401fd220, 0x6377: 0x401fd420, + 0x6378: 0x401fd620, 0x6379: 0x401fd820, 0x637a: 0x401fda20, 0x637b: 0x401fdc20, + 0x637c: 0x401fde20, 0x637d: 0x401fe020, 0x637e: 0x401fe220, 0x637f: 0x401fe420, + // Block 0x18e, offset 0x6380 + 0x6380: 0x401fe620, 0x6381: 0x401fe820, 0x6382: 0x401fea20, 0x6383: 0x401fec20, + 0x6384: 0x401fee20, 0x6385: 0x401ff020, 0x6386: 0x401ff220, 0x6387: 0x401ff420, + 0x6388: 0x401ff620, 0x6389: 0x401ff820, 0x638a: 0x401ffa20, 0x638b: 0x401ffc20, + 0x638c: 0x401ffe20, 0x638d: 0x40200020, 0x638e: 0x40200220, 0x638f: 0x40200420, + 0x6390: 0x40200620, 0x6391: 0x40200820, 0x6392: 0x40200a20, 0x6393: 0x40200c20, + 0x6394: 0x40200e20, 0x6395: 0x40201020, 0x6396: 0x40201220, 0x6397: 0x40201420, + 0x6398: 0x40201620, 0x6399: 0x40201820, 0x639a: 0x40201a20, 0x639b: 0x40201c20, + 0x639c: 0x40201e20, 0x639d: 0x40202020, 0x639e: 0x40202220, 0x639f: 0x40202420, + 0x63a0: 0x40202620, 0x63a1: 0x40202820, 0x63a2: 0x40202a20, 0x63a3: 0x40202c20, + 0x63a4: 0x40202e20, 0x63a5: 0x40203020, 0x63a6: 0x40203220, 0x63a7: 0x40203420, + 0x63a8: 0x40203620, 0x63a9: 0x40203820, 0x63aa: 0x40203a20, 0x63ab: 0x40203c20, + 0x63ac: 0x40203e20, 0x63ad: 0x40204020, 0x63ae: 0x40204220, 0x63af: 0x40204420, + 0x63b0: 0x40204620, 0x63b1: 0x40204820, 0x63b2: 0x40204a20, 0x63b3: 0x40204c20, + 0x63b4: 0x40204e20, 0x63b5: 0x40205020, 0x63b6: 0x40205220, 0x63b7: 0x40205420, + 0x63b8: 0x40205620, 0x63b9: 0x40205820, 0x63ba: 0x40205a20, 0x63bb: 0x40205c20, + 0x63bc: 0x40205e20, 0x63bd: 0x40206020, 0x63be: 0x40206220, 0x63bf: 0x40206420, + // Block 0x18f, offset 0x63c0 + 0x63c0: 0x40206620, 0x63c1: 0x40206820, 0x63c2: 0x40206a20, 0x63c3: 0x40206c20, + 0x63c4: 0x40206e20, 0x63c5: 0x40207020, 0x63c6: 0x40207220, 0x63c7: 0x40207420, + 0x63c8: 0x40207620, 0x63c9: 0x40207820, 0x63ca: 0x40207a20, 0x63cb: 0x40207c20, + 0x63cc: 0x40207e20, 0x63cd: 0x40208020, 0x63ce: 0x40208220, 0x63cf: 0x40208420, + 0x63d0: 0x40208620, 0x63d1: 0x40208820, 0x63d2: 0x40208a20, 0x63d3: 0x40208c20, + 0x63e0: 0x40208e20, 0x63e1: 0x40209020, 0x63e2: 0x40209220, 0x63e3: 0x40209420, + 0x63e4: 0x40209620, 0x63e5: 0x40209820, 0x63e6: 0x40209a20, 0x63e7: 0x40209c20, + 0x63e8: 0x40209e20, 0x63e9: 0x4020a020, 0x63ea: 0x4020a220, 0x63eb: 0x4020a420, + 0x63ec: 0x4020a620, 0x63ed: 0x4020a820, 0x63ee: 0x4020aa20, + 0x63f1: 0x4020ac20, 0x63f2: 0x4020ae20, 0x63f3: 0x4020b020, + 0x63f4: 0x4020b220, 0x63f5: 0x4020b420, 0x63f6: 0x4020b620, 0x63f7: 0x4020b820, + 0x63f8: 0x4020ba20, 0x63f9: 0x4020bc20, 0x63fa: 0x4020be20, 0x63fb: 0x4020c020, + 0x63fc: 0x4020c220, 0x63fd: 0x4020c420, 0x63fe: 0x4020c620, + // Block 0x190, offset 0x6400 + 0x6401: 0x4020c820, 0x6402: 0x4020ca20, 0x6403: 0x4020cc20, + 0x6404: 0x4020ce20, 0x6405: 0x4020d020, 0x6406: 0x4020d220, 0x6407: 0x4020d420, + 0x6408: 0x4020d620, 0x6409: 0x4020d820, 0x640a: 0x4020da20, 0x640b: 0x4020dc20, + 0x640c: 0x4020de20, 0x640d: 0x4020e020, 0x640e: 0x4020e220, 0x640f: 0x4020e420, + 0x6411: 0x4020e620, 0x6412: 0x4020e820, 0x6413: 0x4020ea20, + 0x6414: 0x4020ec20, 0x6415: 0x4020ee20, 0x6416: 0x4020f020, 0x6417: 0x4020f220, + 0x6418: 0x4020f420, 0x6419: 0x4020f620, 0x641a: 0x4020f820, 0x641b: 0x4020fa20, + 0x641c: 0x4020fc20, 0x641d: 0x4020fe20, 0x641e: 0x40210020, 0x641f: 0x40210220, + // Block 0x191, offset 0x6440 + 0x6440: 0xf0001f04, 0x6441: 0xf0001f04, 0x6442: 0xf0001f04, 0x6443: 0xf0001f04, + 0x6444: 0xf0001f04, 0x6445: 0xf0001f04, 0x6446: 0xf0001f04, 0x6447: 0xf0001f04, + 0x6448: 0xf0001f04, 0x6449: 0xf0001f04, 0x644a: 0xf0001f04, + 0x6450: 0xf0000a04, 0x6451: 0xf0000a04, 0x6452: 0xf0000a04, 0x6453: 0xf0000a04, + 0x6454: 0xf0000a04, 0x6455: 0xf0000a04, 0x6456: 0xf0000a04, 0x6457: 0xf0000a04, + 0x6458: 0xf0000a04, 0x6459: 0xf0000a04, 0x645a: 0xf0000a04, 0x645b: 0xf0000a04, + 0x645c: 0xf0000a04, 0x645d: 0xf0000a04, 0x645e: 0xf0000a04, 0x645f: 0xf0000a04, + 0x6460: 0xf0000a04, 0x6461: 0xf0000a04, 0x6462: 0xf0000a04, 0x6463: 0xf0000a04, + 0x6464: 0xf0000a04, 0x6465: 0xf0000a04, 0x6466: 0xf0000a04, 0x6467: 0xf0000a04, + 0x6468: 0xf0000a04, 0x6469: 0xf0000a04, 0x646a: 0xf0000a04, 0x646b: 0x002c3a8c, + 0x646c: 0x002f7a8c, 0x646d: 0xf0000c0c, 0x646e: 0xf0000c0c, + 0x6470: 0x002bde9d, 0x6471: 0x002c0a9d, 0x6472: 0x002c3a9d, 0x6473: 0x002c629d, + 0x6474: 0x002c989d, 0x6475: 0x002d089d, 0x6476: 0x002d229d, 0x6477: 0x002d689d, + 0x6478: 0x002d9a9d, 0x6479: 0x002dcc9d, 0x647a: 0x002dfe9d, 0x647b: 0x002e229d, + 0x647c: 0x002e829d, 0x647d: 0x002e9e9d, 0x647e: 0x002ee29d, 0x647f: 0x002f2c9d, + // Block 0x192, offset 0x6480 + 0x6480: 0x002f569d, 0x6481: 0x002f7a9d, 0x6482: 0x002fe69d, 0x6483: 0x00302c9d, + 0x6484: 0x00306c9d, 0x6485: 0x0030be9d, 0x6486: 0x0030e29d, 0x6487: 0x0030f69d, + 0x6488: 0x0031009d, 0x6489: 0x00312a9d, 0x648a: 0xf0001d1d, 0x648b: 0xf0001d1d, + 0x648c: 0xf0001d1d, 0x648d: 0xf0001d1d, 0x648e: 0xe0000ebc, 0x648f: 0xf0001d1d, + 0x6490: 0x002bde8c, 0x6491: 0x002c0a8c, 0x6492: 0x002c3a8c, 0x6493: 0x002c628c, + 0x6494: 0x002c988c, 0x6495: 0x002d088c, 0x6496: 0x002d228c, 0x6497: 0x002d688c, + 0x6498: 0x002d9a8c, 0x6499: 0x002dcc8c, 0x649a: 0x002dfe8c, 0x649b: 0x002e228c, + 0x649c: 0x002e828c, 0x649d: 0x002e9e8c, 0x649e: 0x002ee28c, 0x649f: 0x002f2c8c, + 0x64a0: 0x002f568c, 0x64a1: 0x002f7a8c, 0x64a2: 0x002fe68c, 0x64a3: 0x00302c8c, + 0x64a4: 0x00306c8c, 0x64a5: 0x0030be8c, 0x64a6: 0x0030e28c, 0x64a7: 0x0030f68c, + 0x64a8: 0x0031008c, 0x64a9: 0x00312a8c, 0x64aa: 0xf0001414, 0x64ab: 0xf0001414, + 0x64b0: 0x002bde9d, 0x64b1: 0x002c0a9d, 0x64b2: 0x002c3a9d, 0x64b3: 0x002c629d, + 0x64b4: 0x002c989d, 0x64b5: 0x002d089d, 0x64b6: 0x002d229d, 0x64b7: 0x002d689d, + 0x64b8: 0x002d9a9d, 0x64b9: 0x002dcc9d, 0x64ba: 0x002dfe9d, 0x64bb: 0x002e229d, + 0x64bc: 0x002e829d, 0x64bd: 0x002e9e9d, 0x64be: 0x002ee29d, 0x64bf: 0x002f2c9d, + // Block 0x193, offset 0x64c0 + 0x64c0: 0x002f569d, 0x64c1: 0x002f7a9d, 0x64c2: 0x002fe69d, 0x64c3: 0x00302c9d, + 0x64c4: 0x00306c9d, 0x64c5: 0x0030be9d, 0x64c6: 0x0030e29d, 0x64c7: 0x0030f69d, + 0x64c8: 0x0031009d, 0x64c9: 0x00312a9d, 0x64ca: 0x002f2c9d, 0x64cb: 0xe0000c81, + 0x64cc: 0xe0000eb5, 0x64cd: 0xe0000f74, 0x64ce: 0xe00009d2, 0x64cf: 0xe00010f0, + 0x64d0: 0xf0001d1d, 0x64d1: 0xe0000a6f, 0x64d2: 0xe0000a7e, 0x64d3: 0xe0000ba4, + 0x64d4: 0xe0000c84, 0x64d5: 0xe0000d8a, 0x64d6: 0xe0000d8e, 0x64d7: 0xe0000e9b, + 0x64d8: 0xe0000f77, 0x64d9: 0xe00010a2, 0x64da: 0xe00010c0, + // Block 0x194, offset 0x6500 + 0x6526: 0x40110c20, 0x6527: 0x40110e20, + 0x6528: 0x40111020, 0x6529: 0x40111220, 0x652a: 0x40111420, 0x652b: 0x40111620, + 0x652c: 0x40111820, 0x652d: 0x40111a20, 0x652e: 0x40111c20, 0x652f: 0x40111e20, + 0x6530: 0x40112020, 0x6531: 0x40112220, 0x6532: 0x40112420, 0x6533: 0x40112620, + 0x6534: 0x40112820, 0x6535: 0x40112a20, 0x6536: 0x40112c20, 0x6537: 0x40112e20, + 0x6538: 0x40113020, 0x6539: 0x40113220, 0x653a: 0x40113420, 0x653b: 0x40113620, + 0x653c: 0x40113820, 0x653d: 0x40113a20, 0x653e: 0x40113c20, 0x653f: 0x40113e20, + // Block 0x195, offset 0x6540 + 0x6540: 0xf0001c1c, 0x6541: 0xf0001c1c, 0x6542: 0x00658c9c, + 0x6550: 0x02c4969c, 0x6551: 0x02b6ae9c, 0x6552: 0x02a7989c, 0x6553: 0xf0001c1c, + 0x6554: 0x029d189c, 0x6555: 0x02b2349c, 0x6556: 0x0313c69c, 0x6557: 0x02b2529c, + 0x6558: 0x029d489c, 0x6559: 0x02cc409c, 0x655a: 0x02e2429c, 0x655b: 0x02cb329c, + 0x655c: 0x02a49a9c, 0x655d: 0x02bf189c, 0x655e: 0x02a31a9c, 0x655f: 0x02cb609c, + 0x6560: 0x02a43a9c, 0x6561: 0x02fa849c, 0x6562: 0x02ea3e9c, 0x6563: 0x0319529c, + 0x6564: 0x02b1e09c, 0x6565: 0x02a8729c, 0x6566: 0x02de289c, 0x6567: 0x02c52a9c, + 0x6568: 0x02c6aa9c, 0x6569: 0x029c009c, 0x656a: 0x029c129c, 0x656b: 0x0320949c, + 0x656c: 0x02bbcc9c, 0x656d: 0x029c5a9c, 0x656e: 0x02a7e69c, 0x656f: 0x02c60e9c, + 0x6570: 0x031ae09c, 0x6571: 0x02c4a69c, 0x6572: 0x02f3029c, 0x6573: 0x02f4f49c, + 0x6574: 0x02a8109c, 0x6575: 0x02dd009c, 0x6576: 0x02ce129c, 0x6577: 0x02ce109c, + 0x6578: 0x02ea669c, 0x6579: 0x02a4e49c, 0x657a: 0x02ab6c9c, + // Block 0x196, offset 0x6580 + 0x6580: 0xf0000404, 0x6581: 0xf0000404, 0x6582: 0xf0000404, 0x6583: 0xf0000404, + 0x6584: 0xf0000404, 0x6585: 0xf0000404, 0x6586: 0xf0000404, 0x6587: 0xf0000404, + 0x6588: 0xf0000404, + 0x6590: 0x02bf2e86, 0x6591: 0x02a7de86, + // Block 0x197, offset 0x65c0 + 0x65c0: 0x40210420, 0x65c1: 0x40210620, 0x65c2: 0x40210820, 0x65c3: 0x40210a20, + 0x65c4: 0x40210c20, 0x65c5: 0x40210e20, 0x65c6: 0x40211020, 0x65c7: 0x40211220, + 0x65c8: 0x40211420, 0x65c9: 0x40211620, 0x65ca: 0x40211820, 0x65cb: 0x40211a20, + 0x65cc: 0x40211c20, 0x65cd: 0x40211e20, 0x65ce: 0x40212020, 0x65cf: 0x40212220, + 0x65d0: 0x40212420, 0x65d1: 0x40212620, 0x65d2: 0x40212820, 0x65d3: 0x40212a20, + 0x65d4: 0x40212c20, 0x65d5: 0x40212e20, 0x65d6: 0x40213020, 0x65d7: 0x40213220, + 0x65d8: 0x40213420, 0x65d9: 0x40213620, 0x65da: 0x40213820, 0x65db: 0x40213a20, + 0x65dc: 0x40213c20, 0x65dd: 0x40213e20, 0x65de: 0x40214020, 0x65df: 0x40214220, + 0x65e0: 0x40214420, + 0x65f0: 0x40214620, 0x65f1: 0x40214820, 0x65f2: 0x40214a20, 0x65f3: 0x40214c20, + 0x65f4: 0x40214e20, 0x65f5: 0x40215020, 0x65f7: 0x40215220, + 0x65f8: 0x40215420, 0x65f9: 0x40215620, 0x65fa: 0x40215820, 0x65fb: 0x40215a20, + 0x65fc: 0x40215c20, 0x65fd: 0x40215e20, 0x65fe: 0x40216020, 0x65ff: 0x40216220, + // Block 0x198, offset 0x6600 + 0x6600: 0x40216420, 0x6601: 0x40216620, 0x6602: 0x40216820, 0x6603: 0x40216a20, + 0x6604: 0x40216c20, 0x6605: 0x40216e20, 0x6606: 0x40217020, 0x6607: 0x40217220, + 0x6608: 0x40217420, 0x6609: 0x40217620, 0x660a: 0x40217820, 0x660b: 0x40217a20, + 0x660c: 0x40217c20, 0x660d: 0x40217e20, 0x660e: 0x40218020, 0x660f: 0x40218220, + 0x6610: 0x40218420, 0x6611: 0x40218620, 0x6612: 0x40218820, 0x6613: 0x40218a20, + 0x6614: 0x40218c20, 0x6615: 0x40218e20, 0x6616: 0x40219020, 0x6617: 0x40219220, + 0x6618: 0x40219420, 0x6619: 0x40219620, 0x661a: 0x40219820, 0x661b: 0x40219a20, + 0x661c: 0x40219c20, 0x661d: 0x40219e20, 0x661e: 0x4021a020, 0x661f: 0x4021a220, + 0x6620: 0x4021a420, 0x6621: 0x4021a620, 0x6622: 0x4021a820, 0x6623: 0x4021aa20, + 0x6624: 0x4021ac20, 0x6625: 0x4021ae20, 0x6626: 0x4021b020, 0x6627: 0x4021b220, + 0x6628: 0x4021b420, 0x6629: 0x4021b620, 0x662a: 0x4021b820, 0x662b: 0x4021ba20, + 0x662c: 0x4021bc20, 0x662d: 0x4021be20, 0x662e: 0x4021c020, 0x662f: 0x4021c220, + 0x6630: 0x4021c420, 0x6631: 0x4021c620, 0x6632: 0x4021c820, 0x6633: 0x4021ca20, + 0x6634: 0x4021cc20, 0x6635: 0x4021ce20, 0x6636: 0x4021d020, 0x6637: 0x4021d220, + 0x6638: 0x4021d420, 0x6639: 0x4021d620, 0x663a: 0x4021d820, 0x663b: 0x4021da20, + 0x663c: 0x4021dc20, + // Block 0x199, offset 0x6640 + 0x6640: 0x4021de20, 0x6641: 0x4021e020, 0x6642: 0x4021e220, 0x6643: 0x4021e420, + 0x6644: 0x4021e620, 0x6645: 0x4021e820, 0x6646: 0x4021ea20, 0x6647: 0x4021ec20, + 0x6648: 0x4021ee20, 0x6649: 0x4021f020, 0x664a: 0x4021f220, 0x664b: 0x4021f420, + 0x664c: 0x4021f620, 0x664d: 0x4021f820, 0x664e: 0x4021fa20, 0x664f: 0x4021fc20, + 0x6650: 0x4021fe20, 0x6651: 0x40220020, 0x6652: 0x40220220, 0x6653: 0x40220420, + 0x6660: 0x40220620, 0x6661: 0x40220820, 0x6662: 0x40220a20, 0x6663: 0x40220c20, + 0x6664: 0x40220e20, 0x6665: 0x40221020, 0x6666: 0x40221220, 0x6667: 0x40221420, + 0x6668: 0x40221620, 0x6669: 0x40221820, 0x666a: 0x40221a20, 0x666b: 0x40221c20, + 0x666c: 0x40221e20, 0x666d: 0x40222020, 0x666e: 0x40222220, 0x666f: 0x40222420, + 0x6670: 0x40222620, 0x6671: 0x40222820, 0x6672: 0x40222a20, 0x6673: 0x40222c20, + 0x6674: 0x40222e20, 0x6675: 0x40223020, 0x6676: 0x40223220, 0x6677: 0x40223420, + 0x6678: 0x40223620, 0x6679: 0x40223820, 0x667a: 0x40223a20, 0x667b: 0x40223c20, + 0x667c: 0x40223e20, 0x667d: 0x40224020, 0x667e: 0x40224220, 0x667f: 0x40224420, + // Block 0x19a, offset 0x6680 + 0x6680: 0x40224620, 0x6681: 0x40224820, 0x6682: 0x40224a20, 0x6683: 0x40224c20, + 0x6684: 0x40224e20, 0x6686: 0x40225020, 0x6687: 0x40225220, + 0x6688: 0x40225420, 0x6689: 0x40225620, 0x668a: 0x40225820, + 0x66a0: 0x40225a20, 0x66a1: 0x40225c20, 0x66a2: 0x40225e20, 0x66a3: 0x40226020, + 0x66a4: 0x40226220, 0x66a5: 0x40226420, 0x66a6: 0x40226620, 0x66a7: 0x40226820, + 0x66a8: 0x40226a20, 0x66a9: 0x40226c20, 0x66aa: 0x40226e20, 0x66ab: 0x40227020, + 0x66ac: 0x40227220, 0x66ad: 0x40227420, 0x66ae: 0x40227620, 0x66af: 0x40227820, + 0x66b0: 0x40227a20, + // Block 0x19b, offset 0x66c0 + 0x66c0: 0x40227c20, 0x66c1: 0x40227e20, 0x66c2: 0x40228020, 0x66c3: 0x40228220, + 0x66c4: 0x40228420, 0x66c5: 0x40228620, 0x66c6: 0x40228820, 0x66c7: 0x40228a20, + 0x66c8: 0x40228c20, 0x66c9: 0x40228e20, 0x66ca: 0x40229020, 0x66cb: 0x40229220, + 0x66cc: 0x40229420, 0x66cd: 0x40229620, 0x66ce: 0x40229820, 0x66cf: 0x40229a20, + 0x66d0: 0x40229c20, 0x66d1: 0x40229e20, 0x66d2: 0x4022a020, 0x66d3: 0x4022a220, + 0x66d4: 0x4022a420, 0x66d5: 0x4022a620, 0x66d6: 0x4022a820, 0x66d7: 0x4022aa20, + 0x66d8: 0x4022ac20, 0x66d9: 0x4022ae20, 0x66da: 0x4022b020, 0x66db: 0x4022b220, + 0x66dc: 0x4022b420, 0x66dd: 0x4022b620, 0x66de: 0x4022b820, 0x66df: 0x4022ba20, + 0x66e0: 0x4022bc20, 0x66e1: 0x4022be20, 0x66e2: 0x4022c020, 0x66e3: 0x4022c220, + 0x66e4: 0x4022c420, 0x66e5: 0x4022c620, 0x66e6: 0x4022c820, 0x66e7: 0x4022ca20, + 0x66e8: 0x4022cc20, 0x66e9: 0x4022ce20, 0x66ea: 0x4022d020, 0x66eb: 0x4022d220, + 0x66ec: 0x4022d420, 0x66ed: 0x4022d620, 0x66ee: 0x4022d820, 0x66ef: 0x4022da20, + 0x66f0: 0x4022dc20, 0x66f1: 0x4022de20, 0x66f2: 0x4022e020, 0x66f3: 0x4022e220, + 0x66f4: 0x4022e420, 0x66f5: 0x4022e620, 0x66f6: 0x4022e820, 0x66f7: 0x4022ea20, + 0x66f8: 0x4022ec20, 0x66f9: 0x4022ee20, 0x66fa: 0x4022f020, 0x66fb: 0x4022f220, + 0x66fc: 0x4022f420, 0x66fd: 0x4022f620, 0x66fe: 0x4022f820, + // Block 0x19c, offset 0x6700 + 0x6700: 0x4022fa20, 0x6702: 0x4022fc20, 0x6703: 0x4022fe20, + 0x6704: 0x40230020, 0x6705: 0x40230220, 0x6706: 0x40230420, 0x6707: 0x40230620, + 0x6708: 0x40230820, 0x6709: 0x40230a20, 0x670a: 0x40230c20, 0x670b: 0x40230e20, + 0x670c: 0x40231020, 0x670d: 0x40231220, 0x670e: 0x40231420, 0x670f: 0x40231620, + 0x6710: 0x40231820, 0x6711: 0x40231a20, 0x6712: 0x40231c20, 0x6713: 0x40231e20, + 0x6714: 0x40232020, 0x6715: 0x40232220, 0x6716: 0x40232420, 0x6717: 0x40232620, + 0x6718: 0x40232820, 0x6719: 0x40232a20, 0x671a: 0x40232c20, 0x671b: 0x40232e20, + 0x671c: 0x40233020, 0x671d: 0x40233220, 0x671e: 0x40233420, 0x671f: 0x40233620, + 0x6720: 0x40233820, 0x6721: 0x40233a20, 0x6722: 0x40233c20, 0x6723: 0x40233e20, + 0x6724: 0x40234020, 0x6725: 0x40234220, 0x6726: 0x40234420, 0x6727: 0x40234620, + 0x6728: 0x40234820, 0x6729: 0x40234a20, 0x672a: 0x40234c20, 0x672b: 0x40234e20, + 0x672c: 0x40235020, 0x672d: 0x40235220, 0x672e: 0x40235420, 0x672f: 0x40235620, + 0x6730: 0x40235820, 0x6731: 0x40235a20, 0x6732: 0x40235c20, 0x6733: 0x40235e20, + 0x6734: 0x40236020, 0x6735: 0x40236220, 0x6736: 0x40236420, 0x6737: 0x40236620, + 0x6738: 0x40236820, 0x6739: 0x40236a20, 0x673a: 0x40236c20, 0x673b: 0x40236e20, + 0x673c: 0x40237020, 0x673d: 0x40237220, 0x673e: 0x40237420, 0x673f: 0x40237620, + // Block 0x19d, offset 0x6740 + 0x6740: 0x40237820, 0x6741: 0x40237a20, 0x6742: 0x40237c20, 0x6743: 0x40237e20, + 0x6744: 0x40238020, 0x6745: 0x40238220, 0x6746: 0x40238420, 0x6747: 0x40238620, + 0x6748: 0x40238820, 0x6749: 0x40238a20, 0x674a: 0x40238c20, 0x674b: 0x40238e20, + 0x674c: 0x40239020, 0x674d: 0x40239220, 0x674e: 0x40239420, 0x674f: 0x40239620, + 0x6750: 0x40239820, 0x6751: 0x40239a20, 0x6752: 0x40239c20, 0x6753: 0x40239e20, + 0x6754: 0x4023a020, 0x6755: 0x4023a220, 0x6756: 0x4023a420, 0x6757: 0x4023a620, + 0x6758: 0x4023a820, 0x6759: 0x4023aa20, 0x675a: 0x4023ac20, 0x675b: 0x4023ae20, + 0x675c: 0x4023b020, 0x675d: 0x4023b220, 0x675e: 0x4023b420, 0x675f: 0x4023b620, + 0x6760: 0x4023b820, 0x6761: 0x4023ba20, 0x6762: 0x4023bc20, 0x6763: 0x4023be20, + 0x6764: 0x4023c020, 0x6765: 0x4023c220, 0x6766: 0x4023c420, 0x6767: 0x4023c620, + 0x6768: 0x4023c820, 0x6769: 0x4023ca20, 0x676a: 0x4023cc20, 0x676b: 0x4023ce20, + 0x676c: 0x4023d020, 0x676d: 0x4023d220, 0x676e: 0x4023d420, 0x676f: 0x4023d620, + 0x6770: 0x4023d820, 0x6771: 0x4023da20, 0x6772: 0x4023dc20, 0x6773: 0x4023de20, + 0x6774: 0x4023e020, 0x6775: 0x4023e220, 0x6776: 0x4023e420, 0x6777: 0x4023e620, + 0x6778: 0x4023e820, 0x6779: 0x4023ea20, 0x677a: 0x4023ec20, 0x677b: 0x4023ee20, + 0x677c: 0x4023f020, 0x677d: 0x4023f220, 0x677e: 0x4023f420, 0x677f: 0x4023f620, + // Block 0x19e, offset 0x6780 + 0x6780: 0x4023f820, 0x6781: 0x4023fa20, 0x6782: 0x4023fc20, 0x6783: 0x4023fe20, + 0x6784: 0x40240020, 0x6785: 0x40240220, 0x6786: 0x40240420, 0x6787: 0x40240620, + 0x6788: 0x40240820, 0x6789: 0x40240a20, 0x678a: 0x40240c20, 0x678b: 0x40240e20, + 0x678c: 0x40241020, 0x678d: 0x40241220, 0x678e: 0x40241420, 0x678f: 0x40241620, + 0x6790: 0x40241820, 0x6791: 0x40241a20, 0x6792: 0x40241c20, 0x6793: 0x40241e20, + 0x6794: 0x40242020, 0x6795: 0x40242220, 0x6796: 0x40242420, 0x6797: 0x40242620, + 0x6798: 0x40242820, 0x6799: 0x40242a20, 0x679a: 0x40242c20, 0x679b: 0x40242e20, + 0x679c: 0x40243020, 0x679d: 0x40243220, 0x679e: 0x40243420, 0x679f: 0x40243620, + 0x67a0: 0x40243820, 0x67a1: 0x40243a20, 0x67a2: 0x40243c20, 0x67a3: 0x40243e20, + 0x67a4: 0x40244020, 0x67a5: 0x40244220, 0x67a6: 0x40244420, 0x67a7: 0x40244620, + 0x67a8: 0x40244820, 0x67a9: 0x40244a20, 0x67aa: 0x40244c20, 0x67ab: 0x40244e20, + 0x67ac: 0x40245020, 0x67ad: 0x40245220, 0x67ae: 0x40245420, 0x67af: 0x40245620, + 0x67b0: 0x40245820, 0x67b1: 0x40245a20, 0x67b2: 0x40245c20, 0x67b3: 0x40245e20, + 0x67b4: 0x40246020, 0x67b5: 0x40246220, 0x67b6: 0x40246420, 0x67b7: 0x40246620, + 0x67b9: 0x40246820, 0x67ba: 0x40246a20, 0x67bb: 0x40246c20, + 0x67bc: 0x40246e20, + // Block 0x19f, offset 0x67c0 + 0x67c0: 0x40247020, 0x67c1: 0x40247220, 0x67c2: 0x40247420, 0x67c3: 0x40247620, + 0x67c4: 0x40247820, 0x67c5: 0x40247a20, 0x67c6: 0x40247c20, 0x67c7: 0x40247e20, + 0x67c8: 0x40248020, 0x67c9: 0x40248220, 0x67ca: 0x40248420, 0x67cb: 0x40248620, + 0x67cc: 0x40248820, 0x67cd: 0x40248a20, 0x67ce: 0x40248c20, 0x67cf: 0x40248e20, + 0x67d0: 0x40249020, 0x67d1: 0x40249220, 0x67d2: 0x40249420, 0x67d3: 0x40249620, + 0x67d4: 0x40249820, 0x67d5: 0x40249a20, 0x67d6: 0x40249c20, 0x67d7: 0x40249e20, + 0x67d8: 0x4024a020, 0x67d9: 0x4024a220, 0x67da: 0x4024a420, 0x67db: 0x4024a620, + 0x67dc: 0x4024a820, 0x67dd: 0x4024aa20, 0x67de: 0x4024ac20, 0x67df: 0x4024ae20, + 0x67e0: 0x4024b020, 0x67e1: 0x4024b220, 0x67e2: 0x4024b420, 0x67e3: 0x4024b620, + 0x67e4: 0x4024b820, 0x67e5: 0x4024ba20, 0x67e6: 0x4024bc20, 0x67e7: 0x4024be20, + 0x67e8: 0x4024c020, 0x67e9: 0x4024c220, 0x67ea: 0x4024c420, 0x67eb: 0x4024c620, + 0x67ec: 0x4024c820, 0x67ed: 0x4024ca20, 0x67ee: 0x4024cc20, 0x67ef: 0x4024ce20, + 0x67f0: 0x4024d020, 0x67f1: 0x4024d220, 0x67f2: 0x4024d420, 0x67f3: 0x4024d620, + 0x67f4: 0x4024d820, 0x67f5: 0x4024da20, 0x67f6: 0x4024dc20, 0x67f7: 0x4024de20, + 0x67f8: 0x4024e020, 0x67f9: 0x4024e220, 0x67fa: 0x4024e420, 0x67fb: 0x4024e620, + 0x67fc: 0x4024e820, 0x67fd: 0x4024ea20, + // Block 0x1a0, offset 0x6800 + 0x6800: 0x4024ec20, 0x6801: 0x4024ee20, 0x6802: 0x4024f020, 0x6803: 0x4024f220, + 0x6810: 0x4024f420, 0x6811: 0x4024f620, 0x6812: 0x4024f820, 0x6813: 0x4024fa20, + 0x6814: 0x4024fc20, 0x6815: 0x4024fe20, 0x6816: 0x40250020, 0x6817: 0x40250220, + 0x6818: 0x40250420, 0x6819: 0x40250620, 0x681a: 0x40250820, 0x681b: 0x40250a20, + 0x681c: 0x40250c20, 0x681d: 0x40250e20, 0x681e: 0x40251020, 0x681f: 0x40251220, + 0x6820: 0x40251420, 0x6821: 0x40251620, 0x6822: 0x40251820, 0x6823: 0x40251a20, + 0x6824: 0x40251c20, 0x6825: 0x40251e20, 0x6826: 0x40252020, 0x6827: 0x40252220, + // Block 0x1a1, offset 0x6840 + 0x687b: 0x40252420, + 0x687c: 0x40252620, 0x687d: 0x40252820, 0x687e: 0x40252a20, 0x687f: 0x40252c20, + // Block 0x1a2, offset 0x6880 + 0x6880: 0x40252e20, 0x6881: 0x40253020, 0x6882: 0x40253220, 0x6883: 0x40253420, + 0x6884: 0x40253620, 0x6885: 0x40253820, 0x6886: 0x40253a20, 0x6887: 0x40253c20, + 0x6888: 0x40253e20, 0x6889: 0x40254020, 0x688a: 0x40254220, 0x688b: 0x40254420, + 0x688c: 0x40254620, 0x688d: 0x40254820, 0x688e: 0x40254a20, 0x688f: 0x40254c20, + 0x6890: 0x40254e20, 0x6891: 0x40255020, 0x6892: 0x40255220, 0x6893: 0x40255420, + 0x6894: 0x40255620, 0x6895: 0x40255820, 0x6896: 0x40255a20, 0x6897: 0x40255c20, + 0x6898: 0x40255e20, 0x6899: 0x40256020, 0x689a: 0x40256220, 0x689b: 0x40256420, + 0x689c: 0x40256620, 0x689d: 0x40256820, 0x689e: 0x40256a20, 0x689f: 0x40256c20, + 0x68a0: 0x40256e20, 0x68a1: 0x40257020, 0x68a2: 0x40257220, 0x68a3: 0x40257420, + 0x68a4: 0x40257620, 0x68a5: 0x40257820, 0x68a6: 0x40257a20, 0x68a7: 0x40257c20, + 0x68a8: 0x40257e20, 0x68a9: 0x40258020, 0x68aa: 0x40258220, 0x68ab: 0x40258420, + 0x68ac: 0x40258620, 0x68ad: 0x40258820, 0x68ae: 0x40258a20, 0x68af: 0x40258c20, + 0x68b0: 0x40258e20, 0x68b1: 0x40259020, 0x68b2: 0x40259220, 0x68b3: 0x40259420, + 0x68b4: 0x40259620, 0x68b5: 0x40259820, 0x68b6: 0x40259a20, 0x68b7: 0x40259c20, + 0x68b8: 0x40259e20, 0x68b9: 0x4025a020, 0x68ba: 0x4025a220, 0x68bb: 0x4025a420, + 0x68bc: 0x4025a620, 0x68bd: 0x4025a820, 0x68be: 0x4025aa20, 0x68bf: 0x4025ac20, + // Block 0x1a3, offset 0x68c0 + 0x68c0: 0x4025ae20, + 0x68c5: 0x4025b020, 0x68c6: 0x4025b220, 0x68c7: 0x4025b420, + 0x68c8: 0x4025b620, 0x68c9: 0x4025b820, 0x68ca: 0x4025ba20, 0x68cb: 0x4025bc20, + 0x68cc: 0x4025be20, 0x68cd: 0x4025c020, 0x68ce: 0x4025c220, 0x68cf: 0x4025c420, + // Block 0x1a4, offset 0x6900 + 0x6900: 0x4025c620, 0x6901: 0x4025c820, 0x6902: 0x4025ca20, 0x6903: 0x4025cc20, + 0x6904: 0x4025ce20, 0x6905: 0x4025d020, 0x6906: 0x4025d220, 0x6907: 0x4025d420, + 0x6908: 0x4025d620, 0x6909: 0x4025d820, 0x690a: 0x4025da20, 0x690b: 0x4025dc20, + 0x690c: 0x4025de20, 0x690d: 0x4025e020, 0x690e: 0x4025e220, 0x690f: 0x4025e420, + 0x6910: 0x4025e620, 0x6911: 0x4025e820, 0x6912: 0x4025ea20, 0x6913: 0x4025ec20, + 0x6914: 0x4025ee20, 0x6915: 0x4025f020, 0x6916: 0x4025f220, 0x6917: 0x4025f420, + 0x6918: 0x4025f620, 0x6919: 0x4025f820, 0x691a: 0x4025fa20, 0x691b: 0x4025fc20, + 0x691c: 0x4025fe20, 0x691d: 0x40260020, 0x691e: 0x40260220, 0x691f: 0x40260420, + 0x6920: 0x40260620, 0x6921: 0x40260820, 0x6922: 0x40260a20, 0x6923: 0x40260c20, + 0x6924: 0x40260e20, 0x6925: 0x40261020, 0x6926: 0x40261220, 0x6927: 0x40261420, + 0x6928: 0x40261620, 0x6929: 0x40261820, 0x692a: 0x40261a20, 0x692b: 0x40261c20, + 0x692c: 0x40261e20, 0x692d: 0x40262020, 0x692e: 0x40262220, 0x692f: 0x40262420, + 0x6930: 0x40262620, 0x6931: 0x40262820, 0x6932: 0x40262a20, 0x6933: 0x40262c20, + 0x6934: 0x40262e20, 0x6935: 0x40263020, 0x6936: 0x40263220, 0x6937: 0x40263420, + 0x6938: 0x40263620, 0x6939: 0x40263820, 0x693a: 0x40263a20, 0x693b: 0x40263c20, + 0x693c: 0x40263e20, 0x693d: 0x40264020, 0x693e: 0x40264220, 0x693f: 0x40264420, + // Block 0x1a5, offset 0x6940 + 0x6940: 0x40264620, 0x6941: 0x40264820, 0x6942: 0x40264a20, 0x6943: 0x40264c20, + 0x6944: 0x40264e20, 0x6945: 0x40265020, + // Block 0x1a6, offset 0x6980 + 0x6980: 0x40265220, 0x6981: 0x40265420, 0x6982: 0x40265620, 0x6983: 0x40265820, + 0x6984: 0x40265a20, 0x6985: 0x40265c20, 0x6986: 0x40265e20, 0x6987: 0x40266020, + 0x6988: 0x40266220, 0x6989: 0x40266420, 0x698a: 0x40266620, 0x698b: 0x40266820, + 0x698c: 0x40266a20, 0x698d: 0x40266c20, 0x698e: 0x40266e20, 0x698f: 0x40267020, + 0x6990: 0x40267220, 0x6991: 0x40267420, 0x6992: 0x40267620, 0x6993: 0x40267820, + 0x6994: 0x40267a20, 0x6995: 0x40267c20, 0x6996: 0x40267e20, 0x6997: 0x40268020, + 0x6998: 0x40268220, 0x6999: 0x40268420, 0x699a: 0x40268620, 0x699b: 0x40268820, + 0x699c: 0x40268a20, 0x699d: 0x40268c20, 0x699e: 0x40268e20, 0x699f: 0x40269020, + 0x69a0: 0x40269220, 0x69a1: 0x40269420, 0x69a2: 0x40269620, 0x69a3: 0x40269820, + 0x69a4: 0x40269a20, 0x69a5: 0x40269c20, 0x69a6: 0x40269e20, 0x69a7: 0x4026a020, + 0x69a8: 0x4026a220, 0x69a9: 0x4026a420, 0x69aa: 0x4026a620, 0x69ab: 0x4026a820, + 0x69ac: 0x4026aa20, 0x69ad: 0x4026ac20, 0x69ae: 0x4026ae20, 0x69af: 0x4026b020, + 0x69b0: 0x4026b220, 0x69b1: 0x4026b420, 0x69b2: 0x4026b620, 0x69b3: 0x4026b820, + 0x69b4: 0x4026ba20, 0x69b5: 0x4026bc20, 0x69b6: 0x4026be20, 0x69b7: 0x4026c020, + 0x69b8: 0x4026c220, 0x69b9: 0x4026c420, 0x69ba: 0x4026c620, 0x69bb: 0x4026c820, + 0x69bc: 0x4026ca20, 0x69bd: 0x4026cc20, 0x69be: 0x4026ce20, 0x69bf: 0x4026d020, + // Block 0x1a7, offset 0x69c0 + 0x69c0: 0x4026d220, 0x69c1: 0x4026d420, 0x69c2: 0x4026d620, 0x69c3: 0x4026d820, + 0x69c4: 0x4026da20, 0x69c5: 0x4026dc20, 0x69c6: 0x4026de20, 0x69c7: 0x4026e020, + 0x69c8: 0x4026e220, 0x69c9: 0x4026e420, 0x69ca: 0x4026e620, 0x69cb: 0x4026e820, + 0x69cc: 0x4026ea20, 0x69cd: 0x4026ec20, 0x69ce: 0x4026ee20, 0x69cf: 0x4026f020, + 0x69d0: 0x4026f220, 0x69d1: 0x4026f420, 0x69d2: 0x4026f620, 0x69d3: 0x4026f820, + 0x69d4: 0x4026fa20, 0x69d5: 0x4026fc20, 0x69d6: 0x4026fe20, 0x69d7: 0x40270020, + 0x69d8: 0x40270220, 0x69d9: 0x40270420, 0x69da: 0x40270620, 0x69db: 0x40270820, + 0x69dc: 0x40270a20, 0x69dd: 0x40270c20, 0x69de: 0x40270e20, 0x69df: 0x40271020, + 0x69e0: 0x40271220, 0x69e1: 0x40271420, 0x69e2: 0x40271620, 0x69e3: 0x40271820, + 0x69e4: 0x40271a20, 0x69e5: 0x40271c20, 0x69e6: 0x40271e20, 0x69e7: 0x40272020, + 0x69e8: 0x40272220, 0x69e9: 0x40272420, 0x69ea: 0x40272620, 0x69eb: 0x40272820, + 0x69ec: 0x40272a20, 0x69ed: 0x40272c20, 0x69ee: 0x40272e20, 0x69ef: 0x40273020, + 0x69f0: 0x40273220, 0x69f1: 0x40273420, 0x69f2: 0x40273620, 0x69f3: 0x40273820, + // Block 0x1a8, offset 0x6a00 + 0x6a00: 0x429c7a20, 0x6a01: 0x429c7020, 0x6a02: 0x429c8220, 0x6a03: 0x48024420, + 0x6a04: 0x429ec020, 0x6a05: 0x429f5c20, 0x6a06: 0x429f7620, 0x6a07: 0x42a00420, + 0x6a08: 0x42a0f420, 0x6a09: 0x42a13220, 0x6a0a: 0x42a1ce20, 0x6a0b: 0x42a19e20, + 0x6a0c: 0x44693c20, 0x6a0d: 0x480c7420, 0x6a0e: 0x42a29a20, 0x6a0f: 0x42a2a820, + 0x6a10: 0x42a2c820, 0x6a11: 0x42a2ee20, 0x6a12: 0x480a3820, 0x6a13: 0x44697220, + 0x6a14: 0x42a2ce20, 0x6a15: 0x42a31a20, 0x6a16: 0x480a9620, 0x6a17: 0x42a32e20, + 0x6a18: 0x42a34820, 0x6a19: 0x429d9820, 0x6a1a: 0x42a35820, 0x6a1b: 0x42a36a20, + 0x6a1c: 0x4923be20, 0x6a1d: 0x42a3ea20, 0x6a1e: 0x42a40620, 0x6a1f: 0x4469be20, + 0x6a20: 0x42a47620, 0x6a21: 0x42a48c20, 0x6a22: 0x42a4e420, 0x6a23: 0x42a4ee20, + 0x6a24: 0x446a2a20, 0x6a25: 0x42a58e20, 0x6a26: 0x42a59220, 0x6a27: 0x42a5c820, + 0x6a28: 0x42a5f420, 0x6a29: 0x42a60a20, 0x6a2a: 0x42a60c20, 0x6a2b: 0x42a62e20, + 0x6a2c: 0x42a69220, 0x6a2d: 0x42a6a220, 0x6a2e: 0x42a6b420, 0x6a2f: 0x42a6e620, + 0x6a30: 0x42a6fa20, 0x6a31: 0x42a6fe20, 0x6a32: 0x42a6fe20, 0x6a33: 0x42a6fe20, + 0x6a34: 0x48145820, 0x6a35: 0x42e0e020, 0x6a36: 0x42a79420, 0x6a37: 0x42a7be20, + 0x6a38: 0x4816c620, 0x6a39: 0x42a7d620, 0x6a3a: 0x42a7e220, 0x6a3b: 0x42a80c20, + 0x6a3c: 0x42a93c20, 0x6a3d: 0x42a87020, 0x6a3e: 0x42a89020, 0x6a3f: 0x42a8d020, + // Block 0x1a9, offset 0x6a40 + 0x6a40: 0x42a94420, 0x6a41: 0x42a9ec20, 0x6a42: 0x42aa2020, 0x6a43: 0x42aaa620, + 0x6a44: 0x42aac620, 0x6a45: 0x42ab0820, 0x6a46: 0x42ab0820, 0x6a47: 0x42ab3220, + 0x6a48: 0x42ab5620, 0x6a49: 0x42ab6620, 0x6a4a: 0x42ab8420, 0x6a4b: 0x42ae2c20, + 0x6a4c: 0x42ac0c20, 0x6a4d: 0x42ae2e20, 0x6a4e: 0x42aca220, 0x6a4f: 0x42ace820, + 0x6a50: 0x42a40e20, 0x6a51: 0x42b1dc20, 0x6a52: 0x42af9c20, 0x6a53: 0x42afe820, + 0x6a54: 0x42b01a20, 0x6a55: 0x42af1620, 0x6a56: 0x42b06420, 0x6a57: 0x42b06220, + 0x6a58: 0x42b15820, 0x6a59: 0x4829c820, 0x6a5a: 0x42b1e420, 0x6a5b: 0x42b1ee20, + 0x6a5c: 0x42b20c20, 0x6a5d: 0x42b23420, 0x6a5e: 0x42b24420, 0x6a5f: 0x42b2c420, + 0x6a60: 0x482d5020, 0x6a61: 0x482dd420, 0x6a62: 0x42b3d820, 0x6a63: 0x42b43620, + 0x6a64: 0x42b44e20, 0x6a65: 0x42b3b020, 0x6a66: 0x42b4cc20, 0x6a67: 0x446ddc20, + 0x6a68: 0x446df820, 0x6a69: 0x42b61020, 0x6a6a: 0x42b67c20, 0x6a6b: 0x42b67c20, + 0x6a6c: 0x48339020, 0x6a6d: 0x42b78620, 0x6a6e: 0x42b7b020, 0x6a6f: 0x42b7ce20, + 0x6a70: 0x42b7e620, 0x6a71: 0x48363020, 0x6a72: 0x42b7fe20, 0x6a73: 0x42b80c20, + 0x6a74: 0x42bea620, 0x6a75: 0x42b84420, 0x6a76: 0x446f0220, 0x6a77: 0x42b8c020, + 0x6a78: 0x42b8dc20, 0x6a79: 0x42b98020, 0x6a7a: 0x42b91a20, 0x6a7b: 0x483bc820, + 0x6a7c: 0x42ba8620, 0x6a7d: 0x483bcc20, 0x6a7e: 0x42badc20, 0x6a7f: 0x42bad620, + // Block 0x1aa, offset 0x6a80 + 0x6a80: 0x42baf820, 0x6a81: 0x42bbc220, 0x6a82: 0x42bbc420, 0x6a83: 0x44705e20, + 0x6a84: 0x42bbfa20, 0x6a85: 0x42bc5020, 0x6a86: 0x42bc7a20, 0x6a87: 0x42bcd220, + 0x6a88: 0x4470c420, 0x6a89: 0x48430620, 0x6a8a: 0x4470f820, 0x6a8b: 0x42bd6020, + 0x6a8c: 0x42bd6620, 0x6a8d: 0x42bd6c20, 0x6a8e: 0x42bd9420, 0x6a8f: 0x49472420, + 0x6a90: 0x42bdfc20, 0x6a91: 0x48466220, 0x6a92: 0x48466220, 0x6a93: 0x43040220, + 0x6a94: 0x42be4420, 0x6a95: 0x42be4420, 0x6a96: 0x44718e20, 0x6a97: 0x48657020, + 0x6a98: 0x48c3b420, 0x6a99: 0x42bec420, 0x6a9a: 0x42bed620, 0x6a9b: 0x4471c620, + 0x6a9c: 0x42bf3420, 0x6a9d: 0x42bf9a20, 0x6a9e: 0x42bfae20, 0x6a9f: 0x42bff220, + 0x6aa0: 0x42c10220, 0x6aa1: 0x44727420, 0x6aa2: 0x44723820, 0x6aa3: 0x42c12820, + 0x6aa4: 0x484da820, 0x6aa5: 0x42c18e20, 0x6aa6: 0x42c29020, 0x6aa7: 0x42c29820, + 0x6aa8: 0x42c29c20, 0x6aa9: 0x42c29820, 0x6aaa: 0x42c2f420, 0x6aab: 0x42c31c20, + 0x6aac: 0x42c36420, 0x6aad: 0x42c34820, 0x6aae: 0x42c35e20, 0x6aaf: 0x42c3bc20, + 0x6ab0: 0x42c3e420, 0x6ab1: 0x42c3ec20, 0x6ab2: 0x42c42020, 0x6ab3: 0x42c43620, + 0x6ab4: 0x42c4ba20, 0x6ab5: 0x42c56220, 0x6ab6: 0x42c5a820, 0x6ab7: 0x42c6a020, + 0x6ab8: 0x48561820, 0x6ab9: 0x42c67a20, 0x6aba: 0x42c5f820, 0x6abb: 0x42c6d020, + 0x6abc: 0x42c70620, 0x6abd: 0x42c7c820, 0x6abe: 0x4857e220, 0x6abf: 0x42c84420, + // Block 0x1ab, offset 0x6ac0 + 0x6ac0: 0x42c78a20, 0x6ac1: 0x42c75220, 0x6ac2: 0x44745c20, 0x6ac3: 0x42c8d220, + 0x6ac4: 0x42c8fc20, 0x6ac5: 0x42c93a20, 0x6ac6: 0x42c8ee20, 0x6ac7: 0x4474d820, + 0x6ac8: 0x42ca9e20, 0x6ac9: 0x42cad820, 0x6aca: 0x48601420, 0x6acb: 0x42cbc620, + 0x6acc: 0x42cdf020, 0x6acd: 0x42cc9220, 0x6ace: 0x44763220, 0x6acf: 0x42cd2220, + 0x6ad0: 0x44761020, 0x6ad1: 0x4475c820, 0x6ad2: 0x42a32420, 0x6ad3: 0x42a32a20, + 0x6ad4: 0x42ce0020, 0x6ad5: 0x42cd3820, 0x6ad6: 0x43015a20, 0x6ad7: 0x4487b220, + 0x6ad8: 0x42ce2e20, 0x6ad9: 0x42ce3620, 0x6ada: 0x42ce4220, 0x6adb: 0x42cebc20, + 0x6adc: 0x42cea620, 0x6add: 0x48678620, 0x6ade: 0x44769220, 0x6adf: 0x42cff420, + 0x6ae0: 0x42cf0a20, 0x6ae1: 0x42d0a420, 0x6ae2: 0x42d10a20, 0x6ae3: 0x4868da20, + 0x6ae4: 0x42d11c20, 0x6ae5: 0x42d03e20, 0x6ae6: 0x42d22820, 0x6ae7: 0x44773a20, + 0x6ae8: 0x42d28420, 0x6ae9: 0x42d34620, 0x6aea: 0x42d3d420, 0x6aeb: 0x42d55020, + 0x6aec: 0x486d4620, 0x6aed: 0x42d5b620, 0x6aee: 0x44783020, 0x6aef: 0x42d64220, + 0x6af0: 0x48714e20, 0x6af1: 0x42d6a820, 0x6af2: 0x44789c20, 0x6af3: 0x42d6e420, + 0x6af4: 0x42d73e20, 0x6af5: 0x42d77420, 0x6af6: 0x42d77620, 0x6af7: 0x48751a20, + 0x6af8: 0x483a1620, 0x6af9: 0x4875f420, 0x6afa: 0x42d89c20, 0x6afb: 0x48797820, + 0x6afc: 0x42d97e20, 0x6afd: 0x42d99a20, 0x6afe: 0x42d8ce20, 0x6aff: 0x42da2c20, + // Block 0x1ac, offset 0x6b00 + 0x6b00: 0x42da7c20, 0x6b01: 0x42daee20, 0x6b02: 0x42da8220, 0x6b03: 0x42dad220, + 0x6b04: 0x42daf020, 0x6b05: 0x42db0a20, 0x6b06: 0x487a3c20, 0x6b07: 0x42da6820, + 0x6b08: 0x42dc5e20, 0x6b09: 0x42dcdc20, 0x6b0a: 0x447a6620, 0x6b0b: 0x42dd9620, + 0x6b0c: 0x42dd8e20, 0x6b0d: 0x487da220, 0x6b0e: 0x42dbf220, 0x6b0f: 0x42dedc20, + 0x6b10: 0x487ebc20, 0x6b11: 0x487f1c20, 0x6b12: 0x42df8c20, 0x6b13: 0x42e07220, + 0x6b14: 0x42e03c20, 0x6b15: 0x42e03620, 0x6b16: 0x447b2c20, 0x6b17: 0x42e09420, + 0x6b18: 0x42e0fa20, 0x6b19: 0x42e0ee20, 0x6b1a: 0x42e15a20, 0x6b1b: 0x480a4a20, + 0x6b1c: 0x42e28a20, 0x6b1d: 0x4884c620, 0x6b1e: 0x42e33820, 0x6b1f: 0x48875620, + 0x6b20: 0x42e45020, 0x6b21: 0x42e46a20, 0x6b22: 0x42e4a020, 0x6b23: 0x488c1020, + 0x6b24: 0x42e50020, 0x6b25: 0x42e52a20, 0x6b26: 0x488e6a20, 0x6b27: 0x48902820, + 0x6b28: 0x42e6f420, 0x6b29: 0x42e71620, 0x6b2a: 0x447d5820, 0x6b2b: 0x42e74a20, + 0x6b2c: 0x447d7020, 0x6b2d: 0x447d7020, 0x6b2e: 0x42e88e20, 0x6b2f: 0x42e8b820, + 0x6b30: 0x42e8e220, 0x6b31: 0x42e90a20, 0x6b32: 0x42e99420, 0x6b33: 0x447e3620, + 0x6b34: 0x42ea4820, 0x6b35: 0x48986c20, 0x6b36: 0x42ea7c20, 0x6b37: 0x48992420, + 0x6b38: 0x42eae020, 0x6b39: 0x48433e20, 0x6b3a: 0x42ec2020, 0x6b3b: 0x489f4220, + 0x6b3c: 0x489f7020, 0x6b3d: 0x48a08820, 0x6b3e: 0x447ff820, 0x6b3f: 0x44801020, + // Block 0x1ad, offset 0x6b40 + 0x6b40: 0x42ede820, 0x6b41: 0x48a1e620, 0x6b42: 0x48a1e420, 0x6b43: 0x48a23220, + 0x6b44: 0x48a26620, 0x6b45: 0x42ee3c20, 0x6b46: 0x42ee3e20, 0x6b47: 0x42ee3e20, + 0x6b48: 0x42ee9420, 0x6b49: 0x44807220, 0x6b4a: 0x42ef1620, 0x6b4b: 0x44808c20, + 0x6b4c: 0x44812c20, 0x6b4d: 0x48a83a20, 0x6b4e: 0x42f09c20, 0x6b4f: 0x42f11820, + 0x6b50: 0x42f19820, 0x6b51: 0x4481c620, 0x6b52: 0x48ac4c20, 0x6b53: 0x42f2ac20, + 0x6b54: 0x48ad3420, 0x6b55: 0x48ad8a20, 0x6b56: 0x42f31e20, 0x6b57: 0x42f3d620, + 0x6b58: 0x44825e20, 0x6b59: 0x42f48020, 0x6b5a: 0x42f49420, 0x6b5b: 0x42f49e20, + 0x6b5c: 0x48b2f820, 0x6b5d: 0x48b54e20, 0x6b5e: 0x48b54e20, 0x6b5f: 0x42f5dc20, + 0x6b60: 0x44840420, 0x6b61: 0x48b75620, 0x6b62: 0x42f78c20, 0x6b63: 0x42f79220, + 0x6b64: 0x44844e20, 0x6b65: 0x48b90020, 0x6b66: 0x42f9a420, 0x6b67: 0x44854020, + 0x6b68: 0x42f9d020, 0x6b69: 0x42f9c620, 0x6b6a: 0x42fa0020, 0x6b6b: 0x48bf0c20, + 0x6b6c: 0x42fac620, 0x6b6d: 0x44860220, 0x6b6e: 0x42fb8e20, 0x6b6f: 0x42fc0420, + 0x6b70: 0x42fc8a20, 0x6b71: 0x44866820, 0x6b72: 0x48c45020, 0x6b73: 0x48c48e20, + 0x6b74: 0x4486b220, 0x6b75: 0x48c5b220, 0x6b76: 0x42fef420, 0x6b77: 0x48c67c20, + 0x6b78: 0x42ff2a20, 0x6b79: 0x42fff420, 0x6b7a: 0x43000a20, 0x6b7b: 0x48c9b420, + 0x6b7c: 0x48ca4620, 0x6b7d: 0x4300c020, 0x6b7e: 0x48cb5020, 0x6b7f: 0x4300e020, + // Block 0x1ae, offset 0x6b80 + 0x6b80: 0x4866be20, 0x6b81: 0x4487aa20, 0x6b82: 0x43016420, 0x6b83: 0x43020620, + 0x6b84: 0x44881620, 0x6b85: 0x43027c20, 0x6b86: 0x42b56a20, 0x6b87: 0x48cf4e20, + 0x6b88: 0x48cf6a20, 0x6b89: 0x48672620, 0x6b8a: 0x48673820, 0x6b8b: 0x43040220, + 0x6b8c: 0x43040820, 0x6b8d: 0x431f3c20, 0x6b8e: 0x4488d620, 0x6b8f: 0x43052220, + 0x6b90: 0x43051620, 0x6b91: 0x43053a20, 0x6b92: 0x42a56620, 0x6b93: 0x43056220, + 0x6b94: 0x43056620, 0x6b95: 0x43057a20, 0x6b96: 0x4305cc20, 0x6b97: 0x48d67820, + 0x6b98: 0x4305ca20, 0x6b99: 0x43063a20, 0x6b9a: 0x4306c620, 0x6b9b: 0x43075a20, + 0x6b9c: 0x43064620, 0x6b9d: 0x43077a20, 0x6b9e: 0x4307ce20, 0x6b9f: 0x4308ae20, + 0x6ba0: 0x4306a620, 0x6ba1: 0x43079420, 0x6ba2: 0x43079820, 0x6ba3: 0x4307b820, + 0x6ba4: 0x48d86c20, 0x6ba5: 0x48dad620, 0x6ba6: 0x48d9aa20, 0x6ba7: 0x448a5620, + 0x6ba8: 0x4309e220, 0x6ba9: 0x4309e620, 0x6baa: 0x430a2c20, 0x6bab: 0x48e79420, + 0x6bac: 0x430ac820, 0x6bad: 0x48de5820, 0x6bae: 0x448aba20, 0x6baf: 0x448ac220, + 0x6bb0: 0x48df6220, 0x6bb1: 0x48e1a420, 0x6bb2: 0x448ad620, 0x6bb3: 0x430ca020, + 0x6bb4: 0x430cb820, 0x6bb5: 0x430cce20, 0x6bb6: 0x430cd220, 0x6bb7: 0x430d5220, + 0x6bb8: 0x430d1020, 0x6bb9: 0x430e1c20, 0x6bba: 0x430dc420, 0x6bbb: 0x430ef220, + 0x6bbc: 0x430e5020, 0x6bbd: 0x430ed620, 0x6bbe: 0x430f0c20, 0x6bbf: 0x448bae20, + // Block 0x1af, offset 0x6bc0 + 0x6bc0: 0x430fc220, 0x6bc1: 0x43100220, 0x6bc2: 0x448bf220, 0x6bc3: 0x4310c020, + 0x6bc4: 0x4310c620, 0x6bc5: 0x48ecce20, 0x6bc6: 0x4311ae20, 0x6bc7: 0x4311bc20, + 0x6bc8: 0x448c6a20, 0x6bc9: 0x4311f420, 0x6bca: 0x44697620, 0x6bcb: 0x48f15c20, + 0x6bcc: 0x48f2cc20, 0x6bcd: 0x448d7c20, 0x6bce: 0x448d8e20, 0x6bcf: 0x43154020, + 0x6bd0: 0x4315da20, 0x6bd1: 0x43171420, 0x6bd2: 0x4318aa20, 0x6bd3: 0x48f95020, + 0x6bd4: 0x43195620, 0x6bd5: 0x43198220, 0x6bd6: 0x431a3620, 0x6bd7: 0x431aee20, + 0x6bd8: 0x48fe5e20, 0x6bd9: 0x48100820, 0x6bda: 0x431b9620, 0x6bdb: 0x431b7820, + 0x6bdc: 0x431be020, 0x6bdd: 0x4811bc20, 0x6bde: 0x431da820, 0x6bdf: 0x431e7020, + 0x6be0: 0x490ba420, 0x6be1: 0x490bda20, 0x6be2: 0x43212820, 0x6be3: 0x4321e220, + 0x6be4: 0x43222220, 0x6be5: 0x490e5c20, 0x6be6: 0x43223620, 0x6be7: 0x43247020, + 0x6be8: 0x4325ae20, 0x6be9: 0x4325b020, 0x6bea: 0x4324f820, 0x6beb: 0x4327f220, + 0x6bec: 0x43282a20, 0x6bed: 0x4917f420, 0x6bee: 0x432b1620, 0x6bef: 0x44932a20, + 0x6bf0: 0x432b6e20, 0x6bf1: 0x491aee20, 0x6bf2: 0x4493cc20, 0x6bf3: 0x432d8620, + 0x6bf4: 0x42bb6420, 0x6bf5: 0x432e4620, 0x6bf6: 0x49228a20, 0x6bf7: 0x49243420, + 0x6bf8: 0x4494dc20, 0x6bf9: 0x4494ec20, 0x6bfa: 0x432fc020, 0x6bfb: 0x49281420, + 0x6bfc: 0x44956420, 0x6bfd: 0x49292c20, 0x6bfe: 0x43301620, 0x6bff: 0x43301620, + // Block 0x1b0, offset 0x6c00 + 0x6c00: 0x43305220, 0x6c01: 0x492b6c20, 0x6c02: 0x4331c420, 0x6c03: 0x44966620, + 0x6c04: 0x43325220, 0x6c05: 0x43334e20, 0x6c06: 0x43338420, 0x6c07: 0x4333fc20, + 0x6c08: 0x44979c20, 0x6c09: 0x49366020, 0x6c0a: 0x43362420, 0x6c0b: 0x43388020, + 0x6c0c: 0x4339fa20, 0x6c0d: 0x44999c20, 0x6c0e: 0x4499da20, 0x6c0f: 0x433ace20, + 0x6c10: 0x49419c20, 0x6c11: 0x4499f020, 0x6c12: 0x49420a20, 0x6c13: 0x49441c20, + 0x6c14: 0x49452220, 0x6c15: 0x433d7620, 0x6c16: 0x449aac20, 0x6c17: 0x433df220, + 0x6c18: 0x433dfc20, 0x6c19: 0x433e0a20, 0x6c1a: 0x433e1e20, 0x6c1b: 0x433e2c20, + 0x6c1c: 0x433e7620, 0x6c1d: 0x494c0020, + // Block 0x1b1, offset 0x6c40 + 0x6c41: 0xa0000000, + 0x6c60: 0xa0000000, 0x6c61: 0xa0000000, 0x6c62: 0xa0000000, 0x6c63: 0xa0000000, + 0x6c64: 0xa0000000, 0x6c65: 0xa0000000, 0x6c66: 0xa0000000, 0x6c67: 0xa0000000, + 0x6c68: 0xa0000000, 0x6c69: 0xa0000000, 0x6c6a: 0xa0000000, 0x6c6b: 0xa0000000, + 0x6c6c: 0xa0000000, 0x6c6d: 0xa0000000, 0x6c6e: 0xa0000000, 0x6c6f: 0xa0000000, + 0x6c70: 0xa0000000, 0x6c71: 0xa0000000, 0x6c72: 0xa0000000, 0x6c73: 0xa0000000, + 0x6c74: 0xa0000000, 0x6c75: 0xa0000000, 0x6c76: 0xa0000000, 0x6c77: 0xa0000000, + 0x6c78: 0xa0000000, 0x6c79: 0xa0000000, 0x6c7a: 0xa0000000, 0x6c7b: 0xa0000000, + 0x6c7c: 0xa0000000, 0x6c7d: 0xa0000000, 0x6c7e: 0xa0000000, 0x6c7f: 0xa0000000, + // Block 0x1b2, offset 0x6c80 + 0x6c80: 0xa0000000, 0x6c81: 0xa0000000, 0x6c82: 0xa0000000, 0x6c83: 0xa0000000, + 0x6c84: 0xa0000000, 0x6c85: 0xa0000000, 0x6c86: 0xa0000000, 0x6c87: 0xa0000000, + 0x6c88: 0xa0000000, 0x6c89: 0xa0000000, 0x6c8a: 0xa0000000, 0x6c8b: 0xa0000000, + 0x6c8c: 0xa0000000, 0x6c8d: 0xa0000000, 0x6c8e: 0xa0000000, 0x6c8f: 0xa0000000, + 0x6c90: 0xa0000000, 0x6c91: 0xa0000000, 0x6c92: 0xa0000000, 0x6c93: 0xa0000000, + 0x6c94: 0xa0000000, 0x6c95: 0xa0000000, 0x6c96: 0xa0000000, 0x6c97: 0xa0000000, + 0x6c98: 0xa0000000, 0x6c99: 0xa0000000, 0x6c9a: 0xa0000000, 0x6c9b: 0xa0000000, + 0x6c9c: 0xa0000000, 0x6c9d: 0xa0000000, 0x6c9e: 0xa0000000, 0x6c9f: 0xa0000000, + 0x6ca0: 0xa0000000, 0x6ca1: 0xa0000000, 0x6ca2: 0xa0000000, 0x6ca3: 0xa0000000, + 0x6ca4: 0xa0000000, 0x6ca5: 0xa0000000, 0x6ca6: 0xa0000000, 0x6ca7: 0xa0000000, + 0x6ca8: 0xa0000000, 0x6ca9: 0xa0000000, 0x6caa: 0xa0000000, 0x6cab: 0xa0000000, + 0x6cac: 0xa0000000, 0x6cad: 0xa0000000, 0x6cae: 0xa0000000, 0x6caf: 0xa0000000, + 0x6cb0: 0xa0000000, 0x6cb1: 0xa0000000, 0x6cb2: 0xa0000000, 0x6cb3: 0xa0000000, + 0x6cb4: 0xa0000000, 0x6cb5: 0xa0000000, 0x6cb6: 0xa0000000, 0x6cb7: 0xa0000000, + 0x6cb8: 0xa0000000, 0x6cb9: 0xa0000000, 0x6cba: 0xa0000000, 0x6cbb: 0xa0000000, + 0x6cbc: 0xa0000000, 0x6cbd: 0xa0000000, 0x6cbe: 0xa0000000, 0x6cbf: 0xa0000000, + // Block 0x1b3, offset 0x6cc0 + 0x6cc0: 0xa0000000, 0x6cc1: 0xa0000000, 0x6cc2: 0xa0000000, 0x6cc3: 0xa0000000, + 0x6cc4: 0xa0000000, 0x6cc5: 0xa0000000, 0x6cc6: 0xa0000000, 0x6cc7: 0xa0000000, + 0x6cc8: 0xa0000000, 0x6cc9: 0xa0000000, 0x6cca: 0xa0000000, 0x6ccb: 0xa0000000, + 0x6ccc: 0xa0000000, 0x6ccd: 0xa0000000, 0x6cce: 0xa0000000, 0x6ccf: 0xa0000000, + 0x6cd0: 0xa0000000, 0x6cd1: 0xa0000000, 0x6cd2: 0xa0000000, 0x6cd3: 0xa0000000, + 0x6cd4: 0xa0000000, 0x6cd5: 0xa0000000, 0x6cd6: 0xa0000000, 0x6cd7: 0xa0000000, + 0x6cd8: 0xa0000000, 0x6cd9: 0xa0000000, 0x6cda: 0xa0000000, 0x6cdb: 0xa0000000, + 0x6cdc: 0xa0000000, 0x6cdd: 0xa0000000, 0x6cde: 0xa0000000, 0x6cdf: 0xa0000000, + 0x6ce0: 0xa0000000, 0x6ce1: 0xa0000000, 0x6ce2: 0xa0000000, 0x6ce3: 0xa0000000, + 0x6ce4: 0xa0000000, 0x6ce5: 0xa0000000, 0x6ce6: 0xa0000000, 0x6ce7: 0xa0000000, + 0x6ce8: 0xa0000000, 0x6ce9: 0xa0000000, 0x6cea: 0xa0000000, 0x6ceb: 0xa0000000, + 0x6cec: 0xa0000000, 0x6ced: 0xa0000000, 0x6cee: 0xa0000000, 0x6cef: 0xa0000000, + // Block 0x1b4, offset 0x6d00 + 0x6d00: 0xa0000000, 0x6d01: 0xa0000000, 0x6d02: 0xa0000000, 0x6d03: 0xa0000000, + 0x6d04: 0xa0000000, 0x6d05: 0xa0000000, 0x6d06: 0xa0000000, 0x6d07: 0xa0000000, + 0x6d08: 0xa0000000, 0x6d09: 0x40020020, 0x6d0a: 0x40020220, 0x6d0b: 0x40020420, + 0x6d0c: 0x40020620, 0x6d0d: 0x40020820, 0x6d0e: 0xa0000000, 0x6d0f: 0xa0000000, + 0x6d10: 0xa0000000, 0x6d11: 0xa0000000, 0x6d12: 0xa0000000, 0x6d13: 0xa0000000, + 0x6d14: 0xa0000000, 0x6d15: 0xa0000000, 0x6d16: 0xa0000000, 0x6d17: 0xa0000000, + 0x6d18: 0xa0000000, 0x6d19: 0xa0000000, 0x6d1a: 0xa0000000, 0x6d1b: 0xa0000000, + 0x6d1c: 0xa0000000, 0x6d1d: 0xa0000000, 0x6d1e: 0xa0000000, 0x6d1f: 0xa0000000, + 0x6d20: 0x40021220, 0x6d21: 0x4002ba20, 0x6d22: 0x4003e020, 0x6d23: 0x4004ea20, + 0x6d24: 0x4027de20, 0x6d25: 0x4004ec20, 0x6d26: 0x4004e620, 0x6d27: 0x4003d220, + 0x6d28: 0x4003f420, 0x6d29: 0x4003f620, 0x6d2a: 0x4004d820, 0x6d2b: 0x40093820, + 0x6d2c: 0x40024020, 0x6d2d: 0x40021a20, 0x6d2e: 0x4002e420, 0x6d2f: 0x4004e220, + 0x6d30: 0x4029cc20, 0x6d31: 0x4029ce20, 0x6d32: 0x4029d020, 0x6d33: 0x4029d220, + 0x6d34: 0x4029d420, 0x6d35: 0x4029d620, 0x6d36: 0x4029d820, 0x6d37: 0x4029da20, + 0x6d38: 0x4029dc20, 0x6d39: 0x4029de20, 0x6d3a: 0x40026c20, 0x6d3b: 0x40026220, + 0x6d3c: 0x40094020, 0x6d3d: 0x40094220, 0x6d3e: 0x40094420, 0x6d3f: 0x4002c420, + // Block 0x1b5, offset 0x6d40 + 0x6d40: 0x4004d620, 0x6d41: 0x002bde88, 0x6d42: 0x002c0a88, 0x6d43: 0x002c3a88, + 0x6d44: 0x002c6288, 0x6d45: 0x002c1083, 0x6d46: 0x002d0888, 0x6d47: 0x002d2288, + 0x6d48: 0x0030e483, 0x6d49: 0x002c4083, 0x6d4a: 0x002dcc88, 0x6d4b: 0x002c3c83, + 0x6d4c: 0xc0030002, 0x6d4d: 0x002e8288, 0x6d4e: 0x002e9e88, 0x6d4f: 0x002d2483, + 0x6d50: 0x002f2c88, 0x6d51: 0x002c6483, 0x6d52: 0x002c6683, 0x6d53: 0x002c0e83, + 0x6d54: 0x002c0c83, 0x6d55: 0x00306c88, 0x6d56: 0x0030be88, 0x6d57: 0x0030e288, + 0x6d58: 0x002c3e83, 0x6d59: 0x00310088, 0x6d5a: 0x00312a88, 0x6d5b: 0x4003f820, + 0x6d5c: 0x4004e420, 0x6d5d: 0x4003fa20, 0x6d5e: 0x40062420, 0x6d5f: 0x40021620, + 0x6d60: 0x40061e20, 0x6d61: 0x402bde20, 0x6d62: 0x402c0a20, 0x6d63: 0x402c3a20, + 0x6d64: 0x402c6220, 0x6d65: 0x402c1020, 0x6d66: 0x402d0820, 0x6d67: 0x402d2220, + 0x6d68: 0x4030e420, 0x6d69: 0x402c4020, 0x6d6a: 0x402dcc20, 0x6d6b: 0x402c3c20, + 0x6d6c: 0xc0000002, 0x6d6d: 0x402e8220, 0x6d6e: 0x402e9e20, 0x6d6f: 0x402d2420, + 0x6d70: 0x402f2c20, 0x6d71: 0x402c6420, 0x6d72: 0x402c6620, 0x6d73: 0x402c0e20, + 0x6d74: 0x402c0c20, 0x6d75: 0x40306c20, 0x6d76: 0x4030be20, 0x6d77: 0x4030e220, + 0x6d78: 0x402c3e20, 0x6d79: 0x40310020, 0x6d7a: 0x40312a20, 0x6d7b: 0x4003fc20, + 0x6d7c: 0x40094820, 0x6d7d: 0x4003fe20, 0x6d7e: 0x40094c20, 0x6d7f: 0xa0000000, + // Block 0x1b6, offset 0x6d80 + 0x6d80: 0xe00008f5, 0x6d81: 0xe00008ef, 0x6d82: 0xe0000921, 0x6d83: 0xe0000969, + 0x6d84: 0xe000095b, 0x6d85: 0xe000094d, 0x6d86: 0xe00009dd, 0x6d87: 0xe0000a53, + 0x6d88: 0xe000256e, 0x6d89: 0xe0002568, 0x6d8a: 0xe000257a, 0x6d8b: 0xe00025a6, + 0x6d8c: 0xe000263e, 0x6d8d: 0xe0002638, 0x6d8e: 0xe000264a, 0x6d8f: 0xe0002656, + 0x6d90: 0xe0000ab3, 0x6d91: 0xe0000d63, 0x6d92: 0xe00026db, 0x6d93: 0xe00026d5, + 0x6d94: 0xe00026e7, 0x6d95: 0xe0002727, 0x6d96: 0xe0002713, 0x6d97: 0x40093e20, + 0x6d98: 0xe0000e12, 0x6d99: 0xe0000fe1, 0x6d9a: 0xe0000fdb, 0x6d9b: 0xe0000fed, + 0x6d9c: 0xe0000fff, 0x6d9d: 0xe0001102, 0x6d9e: 0x00318888, 0x6d9f: 0xe0000f7b, + 0x6da0: 0xe00008f2, 0x6da1: 0xe00008ec, 0x6da2: 0xe000091e, 0x6da3: 0xe0000966, + 0x6da4: 0xe0000958, 0x6da5: 0xe000094a, 0x6da6: 0xe00009d5, 0x6da7: 0xe0000a4d, + 0x6da8: 0xe000256b, 0x6da9: 0xe0002565, 0x6daa: 0xe0002577, 0x6dab: 0xe00025a3, + 0x6dac: 0xe000263b, 0x6dad: 0xe0002635, 0x6dae: 0xe0002647, 0x6daf: 0xe0002653, + 0x6db0: 0xe0000aad, 0x6db1: 0xe0000d60, 0x6db2: 0xe00026d8, 0x6db3: 0xe00026d2, + 0x6db4: 0xe00026e4, 0x6db5: 0xe0002724, 0x6db6: 0xe0002710, 0x6db7: 0x40093c20, + 0x6db8: 0xe0000e0f, 0x6db9: 0xe0000fde, 0x6dba: 0xe0000fd8, 0x6dbb: 0xe0000fea, + 0x6dbc: 0xe0000ffc, 0x6dbd: 0xe00010ff, 0x6dbe: 0x40318820, 0x6dbf: 0xe0001114, + // Block 0x1b7, offset 0x6dc0 + 0x6dc0: 0xe0000983, 0x6dc1: 0xe0000980, 0x6dc2: 0xe00008fb, 0x6dc3: 0xe00008f8, + 0x6dc4: 0xe000097d, 0x6dc5: 0xe000097a, 0x6dc6: 0xe0000a38, 0x6dc7: 0xe0000a35, + 0x6dc8: 0xe0000a3e, 0x6dc9: 0xe0000a3b, 0x6dca: 0xe0000a4a, 0x6dcb: 0xe0000a47, + 0x6dcc: 0xe0000a44, 0x6dcd: 0xe0000a41, 0x6dce: 0xe0000a86, 0x6dcf: 0xe0000a83, + 0x6dd0: 0xe0000aaa, 0x6dd1: 0xe0000aa7, 0x6dd2: 0xe00025cc, 0x6dd3: 0xe00025c9, + 0x6dd4: 0xe0002574, 0x6dd5: 0xe0002571, 0x6dd6: 0xe00025b2, 0x6dd7: 0xe00025af, + 0x6dd8: 0xe00025c6, 0x6dd9: 0xe00025c3, 0x6dda: 0xe00025a0, 0x6ddb: 0xe000259d, + 0x6ddc: 0xe0000bb8, 0x6ddd: 0xe0000bb5, 0x6dde: 0xe0000bb2, 0x6ddf: 0xe0000baf, + 0x6de0: 0xe0000bc4, 0x6de1: 0xe0000bc1, 0x6de2: 0xe0000bca, 0x6de3: 0xe0000bc7, + 0x6de4: 0xe0002856, 0x6de5: 0xe0002853, 0x6de6: 0xe0000c1b, 0x6de7: 0xe0000c18, + 0x6de8: 0xe0002664, 0x6de9: 0xe0002661, 0x6dea: 0xe0002673, 0x6deb: 0xe0002670, + 0x6dec: 0xe0002644, 0x6ded: 0xe0002641, 0x6dee: 0xe000266d, 0x6def: 0xe000266a, + 0x6df0: 0xe0002667, 0x6df1: 0x402da220, 0x6df2: 0xe00027e2, 0x6df3: 0xe00027df, + 0x6df4: 0xe0000c8a, 0x6df5: 0xe0000c87, 0x6df6: 0xe000261a, 0x6df7: 0xe0002617, + 0x6df8: 0x402f7220, 0x6df9: 0xe0000ccc, 0x6dfa: 0xe0000cc9, 0x6dfb: 0xe0000cd8, + 0x6dfc: 0xe0000cd5, 0x6dfd: 0xe0000cd2, 0x6dfe: 0xe0000ccf, 0x6dff: 0xe0000d04, + // Block 0x1b8, offset 0x6e00 + 0x6e00: 0xe0000cfe, 0x6e01: 0xe0000cf8, 0x6e02: 0xe0000cf5, 0x6e03: 0xe0000d51, + 0x6e04: 0xe0000d4e, 0x6e05: 0xe0000d6f, 0x6e06: 0xe0000d6c, 0x6e07: 0xe0000d5d, + 0x6e08: 0xe0000d5a, 0x6e09: 0xf0000404, 0x6e0a: 0x002eda88, 0x6e0b: 0x402eda20, + 0x6e0c: 0xe0002761, 0x6e0d: 0xe000275e, 0x6e0e: 0xe00026e1, 0x6e0f: 0xe00026de, + 0x6e10: 0xe0002721, 0x6e11: 0xe000271e, 0x6e12: 0xe0000e93, 0x6e13: 0xe0000e8f, + 0x6e14: 0xe0002697, 0x6e15: 0xe0002694, 0x6e16: 0xe00026a9, 0x6e17: 0xe00026a6, + 0x6e18: 0xe000269d, 0x6e19: 0xe000269a, 0x6e1a: 0xe0002526, 0x6e1b: 0xe0002523, + 0x6e1c: 0xe0002534, 0x6e1d: 0xe0002531, 0x6e1e: 0xe000254e, 0x6e1f: 0xe000254b, + 0x6e20: 0xe000253a, 0x6e21: 0xe0002537, 0x6e22: 0xe0002508, 0x6e23: 0xe0002505, + 0x6e24: 0xe00024f9, 0x6e25: 0xe00024f6, 0x6e26: 0x00303688, 0x6e27: 0x40303620, + 0x6e28: 0xe000102b, 0x6e29: 0xe0001028, 0x6e2a: 0xe000103f, 0x6e2b: 0xe000103c, + 0x6e2c: 0xe0000fe7, 0x6e2d: 0xe0000fe4, 0x6e2e: 0xe0000ff9, 0x6e2f: 0xe0000ff6, + 0x6e30: 0xe0001025, 0x6e31: 0xe0001022, 0x6e32: 0xe0001039, 0x6e33: 0xe0001036, + 0x6e34: 0xe00010d8, 0x6e35: 0xe00010d5, 0x6e36: 0xe000110e, 0x6e37: 0xe000110b, + 0x6e38: 0xe0001117, 0x6e39: 0xe000113b, 0x6e3a: 0xe0001138, 0x6e3b: 0xe000114d, + 0x6e3c: 0xe000114a, 0x6e3d: 0xe0001147, 0x6e3e: 0xe0001144, 0x6e3f: 0xe0000f64, + // Block 0x1b9, offset 0x6e40 + 0x6e40: 0x402c1a20, 0x6e41: 0x002c2a88, 0x6e42: 0x002c3288, 0x6e43: 0x402c3220, + 0x6e44: 0x0031c488, 0x6e45: 0x4031c420, 0x6e46: 0x002efa88, 0x6e47: 0x002c4e88, + 0x6e48: 0x402c4e20, 0x6e49: 0x002c7288, 0x6e4a: 0x002c7a88, 0x6e4b: 0x002c8488, + 0x6e4c: 0x402c8420, 0x6e4d: 0xe000115c, 0x6e4e: 0x002cae88, 0x6e4f: 0x002cb888, + 0x6e50: 0x002cc288, 0x6e51: 0x002d1688, 0x6e52: 0x402d1620, 0x6e53: 0x002d4488, + 0x6e54: 0x002d5888, 0x6e55: 0x402d7820, 0x6e56: 0x002dc288, 0x6e57: 0x002db688, + 0x6e58: 0x002e0a88, 0x6e59: 0x402e0a20, 0x6e5a: 0x402e3820, 0x6e5b: 0x402e7220, + 0x6e5c: 0x0030a088, 0x6e5d: 0x002eb488, 0x6e5e: 0x402ebc20, 0x6e5f: 0x002f1088, + 0x6e60: 0xe0002789, 0x6e61: 0xe0002786, 0x6e62: 0x002d6088, 0x6e63: 0x402d6020, + 0x6e64: 0x002f3e88, 0x6e65: 0x402f3e20, 0x6e66: 0x002f8288, 0x6e67: 0x0031b488, + 0x6e68: 0x4031b420, 0x6e69: 0x00300888, 0x6e6a: 0x40301220, 0x6e6b: 0x40304220, + 0x6e6c: 0x00304a88, 0x6e6d: 0x40304a20, 0x6e6e: 0x00305288, 0x6e6f: 0xe000105f, + 0x6e70: 0xe000105c, 0x6e71: 0x0030b488, 0x6e72: 0x0030cc88, 0x6e73: 0x00311888, + 0x6e74: 0x40311820, 0x6e75: 0x00313488, 0x6e76: 0x40313420, 0x6e77: 0x00316488, + 0x6e78: 0x00316e88, 0x6e79: 0x40316e20, 0x6e7a: 0x40317820, 0x6e7b: 0x4031a620, + 0x6e7c: 0x0031bc88, 0x6e7d: 0x4031bc20, 0x6e7e: 0xe0000fc9, 0x6e7f: 0x40319420, + // Block 0x1ba, offset 0x6e80 + 0x6e80: 0x40321220, 0x6e81: 0x40321a20, 0x6e82: 0x40322220, 0x6e83: 0x40322a20, + 0x6e84: 0xe0000ad5, 0x6e85: 0xe0000ad1, 0x6e86: 0xe0000acd, 0x6e87: 0xf0000a0a, + 0x6e88: 0xf000040a, 0x6e89: 0xf0000404, 0x6e8a: 0xf0000a0a, 0x6e8b: 0xf000040a, + 0x6e8c: 0xf0000404, 0x6e8d: 0xe0000947, 0x6e8e: 0xe0000944, 0x6e8f: 0xe0002650, + 0x6e90: 0xe000264d, 0x6e91: 0xe000270d, 0x6e92: 0xe000270a, 0x6e93: 0xe0000ff3, + 0x6e94: 0xe0000ff0, 0x6e95: 0xe000101e, 0x6e96: 0xe000101a, 0x6e97: 0xe0001006, + 0x6e98: 0xe0001002, 0x6e99: 0xe0001016, 0x6e9a: 0xe0001012, 0x6e9b: 0xe000100e, + 0x6e9c: 0xe000100a, 0x6e9d: 0x402cae20, 0x6e9e: 0xe0000962, 0x6e9f: 0xe000095e, + 0x6ea0: 0xe0000976, 0x6ea1: 0xe0000972, 0x6ea2: 0xe00009f4, 0x6ea3: 0xe00009ef, + 0x6ea4: 0x002d3a88, 0x6ea5: 0x402d3a20, 0x6ea6: 0xe0000bbe, 0x6ea7: 0xe0000bbb, + 0x6ea8: 0xe0002614, 0x6ea9: 0xe0002611, 0x6eaa: 0xe0002753, 0x6eab: 0xe0002750, + 0x6eac: 0xe000275a, 0x6ead: 0xe0002756, 0x6eae: 0xe0001162, 0x6eaf: 0xe000115f, + 0x6eb0: 0xe0000c8d, 0x6eb1: 0xf0000a0a, 0x6eb2: 0xf000040a, 0x6eb3: 0xf0000404, + 0x6eb4: 0xe0000bac, 0x6eb5: 0xe0000ba9, 0x6eb6: 0x002d7888, 0x6eb7: 0x00319488, + 0x6eb8: 0xe0000d57, 0x6eb9: 0xe0000d54, 0x6eba: 0xe0000954, 0x6ebb: 0xe0000950, + 0x6ebc: 0xe00009ea, 0x6ebd: 0xe00009e5, 0x6ebe: 0xe0000e19, 0x6ebf: 0xe0000e15, + // Block 0x1bb, offset 0x6ec0 + 0x6ec0: 0xe000098f, 0x6ec1: 0xe000098c, 0x6ec2: 0xe0000995, 0x6ec3: 0xe0000992, + 0x6ec4: 0xe00025e8, 0x6ec5: 0xe00025e5, 0x6ec6: 0xe00025ee, 0x6ec7: 0xe00025eb, + 0x6ec8: 0xe000267f, 0x6ec9: 0xe000267c, 0x6eca: 0xe0002685, 0x6ecb: 0xe0002682, + 0x6ecc: 0xe000277d, 0x6ecd: 0xe000277a, 0x6ece: 0xe0002783, 0x6ecf: 0xe0002780, + 0x6ed0: 0xe00026af, 0x6ed1: 0xe00026ac, 0x6ed2: 0xe00026b5, 0x6ed3: 0xe00026b2, + 0x6ed4: 0xe0001053, 0x6ed5: 0xe0001050, 0x6ed6: 0xe0001059, 0x6ed7: 0xe0001056, + 0x6ed8: 0xe0002562, 0x6ed9: 0xe000255f, 0x6eda: 0xe0002514, 0x6edb: 0xe0002511, + 0x6edc: 0x00312288, 0x6edd: 0x40312220, 0x6ede: 0xe000285c, 0x6edf: 0xe0002859, + 0x6ee0: 0x002ebc88, 0x6ee1: 0x402c8c20, 0x6ee2: 0x002f2288, 0x6ee3: 0x402f2220, + 0x6ee4: 0x00314088, 0x6ee5: 0x40314020, 0x6ee6: 0xe000096f, 0x6ee7: 0xe000096c, + 0x6ee8: 0xe00025b8, 0x6ee9: 0xe00025b5, 0x6eea: 0xe000271a, 0x6eeb: 0xe0002716, + 0x6eec: 0xe000273e, 0x6eed: 0xe000273a, 0x6eee: 0xe0002745, 0x6eef: 0xe0002742, + 0x6ef0: 0xe000274c, 0x6ef1: 0xe0002748, 0x6ef2: 0xe0001129, 0x6ef3: 0xe0001126, + 0x6ef4: 0x402e5e20, 0x6ef5: 0x402ed020, 0x6ef6: 0x40305a20, 0x6ef7: 0x402dd420, + 0x6ef8: 0xe0000abf, 0x6ef9: 0xe0000ec4, 0x6efa: 0x002be888, 0x6efb: 0x002c4488, + 0x6efc: 0x402c4420, 0x6efd: 0x002e3888, 0x6efe: 0x00303e88, 0x6eff: 0x402ffc20, + // Block 0x1bc, offset 0x6f00 + 0x6f00: 0xe00009b1, 0x6f01: 0xe00009ae, 0x6f02: 0xe0000a22, 0x6f03: 0xe0000a1f, + 0x6f04: 0xe0000a28, 0x6f05: 0xe0000a25, 0x6f06: 0xe0000a2e, 0x6f07: 0xe0000a2b, + 0x6f08: 0xe0000a5a, 0x6f09: 0xe0000a56, 0x6f0a: 0xe0000a8c, 0x6f0b: 0xe0000a89, + 0x6f0c: 0xe0000a98, 0x6f0d: 0xe0000a95, 0x6f0e: 0xe0000aa4, 0x6f0f: 0xe0000aa1, + 0x6f10: 0xe0000a92, 0x6f11: 0xe0000a8f, 0x6f12: 0xe0000a9e, 0x6f13: 0xe0000a9b, + 0x6f14: 0xe00025db, 0x6f15: 0xe00025d7, 0x6f16: 0xe00025d3, 0x6f17: 0xe00025cf, + 0x6f18: 0xe0002602, 0x6f19: 0xe00025ff, 0x6f1a: 0xe0002608, 0x6f1b: 0xe0002605, + 0x6f1c: 0xe00025bf, 0x6f1d: 0xe00025bb, 0x6f1e: 0xe0000b8c, 0x6f1f: 0xe0000b89, + 0x6f20: 0xe0000bd0, 0x6f21: 0xe0000bcd, 0x6f22: 0xe0002868, 0x6f23: 0xe0002865, + 0x6f24: 0xe0002874, 0x6f25: 0xe0002871, 0x6f26: 0xe0002862, 0x6f27: 0xe000285f, + 0x6f28: 0xe000286e, 0x6f29: 0xe000286b, 0x6f2a: 0xe000287a, 0x6f2b: 0xe0002877, + 0x6f2c: 0xe0002691, 0x6f2d: 0xe000268e, 0x6f2e: 0xe000265d, 0x6f2f: 0xe0002659, + 0x6f30: 0xe000260e, 0x6f31: 0xe000260b, 0x6f32: 0xe0002620, 0x6f33: 0xe000261d, + 0x6f34: 0xe0002626, 0x6f35: 0xe0002623, 0x6f36: 0xe0000cde, 0x6f37: 0xe0000cdb, + 0x6f38: 0xe0000ce5, 0x6f39: 0xe0000ce1, 0x6f3a: 0xe0000cf2, 0x6f3b: 0xe0000cef, + 0x6f3c: 0xe0000cec, 0x6f3d: 0xe0000ce9, 0x6f3e: 0xe0000d1e, 0x6f3f: 0xe0000d1b, + // Block 0x1bd, offset 0x6f40 + 0x6f40: 0xe0000d24, 0x6f41: 0xe0000d21, 0x6f42: 0xe0000d2a, 0x6f43: 0xe0000d27, + 0x6f44: 0xe0000d69, 0x6f45: 0xe0000d66, 0x6f46: 0xe0000d7b, 0x6f47: 0xe0000d78, + 0x6f48: 0xe0000d87, 0x6f49: 0xe0000d84, 0x6f4a: 0xe0000d81, 0x6f4b: 0xe0000d7e, + 0x6f4c: 0xe000272e, 0x6f4d: 0xe000272a, 0x6f4e: 0xe0002736, 0x6f4f: 0xe0002732, + 0x6f50: 0xe0002770, 0x6f51: 0xe000276c, 0x6f52: 0xe0002768, 0x6f53: 0xe0002764, + 0x6f54: 0xe0000ea7, 0x6f55: 0xe0000ea4, 0x6f56: 0xe0000ead, 0x6f57: 0xe0000eaa, + 0x6f58: 0xe00026a3, 0x6f59: 0xe00026a0, 0x6f5a: 0xe00026bb, 0x6f5b: 0xe00026b8, + 0x6f5c: 0xe00026c2, 0x6f5d: 0xe00026be, 0x6f5e: 0xe00026c9, 0x6f5f: 0xe00026c6, + 0x6f60: 0xe0002548, 0x6f61: 0xe0002545, 0x6f62: 0xe0002554, 0x6f63: 0xe0002551, + 0x6f64: 0xe000252d, 0x6f65: 0xe0002529, 0x6f66: 0xe0002541, 0x6f67: 0xe000253d, + 0x6f68: 0xe000255b, 0x6f69: 0xe0002557, 0x6f6a: 0xe0002502, 0x6f6b: 0xe00024ff, + 0x6f6c: 0xe000250e, 0x6f6d: 0xe000250b, 0x6f6e: 0xe0002520, 0x6f6f: 0xe000251d, + 0x6f70: 0xe000251a, 0x6f71: 0xe0002517, 0x6f72: 0xe0001093, 0x6f73: 0xe0001090, + 0x6f74: 0xe000109f, 0x6f75: 0xe000109c, 0x6f76: 0xe0001099, 0x6f77: 0xe0001096, + 0x6f78: 0xe0001032, 0x6f79: 0xe000102e, 0x6f7a: 0xe0001046, 0x6f7b: 0xe0001042, + 0x6f7c: 0xe00010a9, 0x6f7d: 0xe00010a6, 0x6f7e: 0xe00010af, 0x6f7f: 0xe00010ac, + // Block 0x1be, offset 0x6f80 + 0x6f80: 0xe00010d2, 0x6f81: 0xe00010cf, 0x6f82: 0xe00010cc, 0x6f83: 0xe00010c9, + 0x6f84: 0xe00010e1, 0x6f85: 0xe00010de, 0x6f86: 0xe00010e7, 0x6f87: 0xe00010e4, + 0x6f88: 0xe00010ed, 0x6f89: 0xe00010ea, 0x6f8a: 0xe0002632, 0x6f8b: 0xe000262f, + 0x6f8c: 0xe000262c, 0x6f8d: 0xe0002629, 0x6f8e: 0xe0001123, 0x6f8f: 0xe0001120, + 0x6f90: 0xe0001141, 0x6f91: 0xe000113e, 0x6f92: 0xe0001153, 0x6f93: 0xe0001150, + 0x6f94: 0xe0001159, 0x6f95: 0xe0001156, 0x6f96: 0xe000287d, 0x6f97: 0xe00024fc, + 0x6f98: 0xe00010db, 0x6f99: 0xe0001111, 0x6f9a: 0xf0000404, 0x6f9b: 0xe0000f70, + 0x6f9c: 0x40300420, 0x6f9d: 0x40300620, 0x6f9e: 0xe0000f7f, 0x6f9f: 0x402c9620, + 0x6fa0: 0xe000099b, 0x6fa1: 0xe0000998, 0x6fa2: 0xe0000989, 0x6fa3: 0xe0000986, + 0x6fa4: 0xe0000928, 0x6fa5: 0xe0000924, 0x6fa6: 0xe0000930, 0x6fa7: 0xe000092c, + 0x6fa8: 0xe0000940, 0x6fa9: 0xe000093c, 0x6faa: 0xe0000938, 0x6fab: 0xe0000934, + 0x6fac: 0xe00009aa, 0x6fad: 0xe00009a6, 0x6fae: 0xe0000902, 0x6faf: 0xe00008fe, + 0x6fb0: 0xe000090a, 0x6fb1: 0xe0000906, 0x6fb2: 0xe000091a, 0x6fb3: 0xe0000916, + 0x6fb4: 0xe0000912, 0x6fb5: 0xe000090e, 0x6fb6: 0xe00009a2, 0x6fb7: 0xe000099e, + 0x6fb8: 0xe00025f4, 0x6fb9: 0xe00025f1, 0x6fba: 0xe00025e2, 0x6fbb: 0xe00025df, + 0x6fbc: 0xe00025ac, 0x6fbd: 0xe00025a9, 0x6fbe: 0xe0002581, 0x6fbf: 0xe000257d, + // Block 0x1bf, offset 0x6fc0 + 0x6fc0: 0xe0002589, 0x6fc1: 0xe0002585, 0x6fc2: 0xe0002599, 0x6fc3: 0xe0002595, + 0x6fc4: 0xe0002591, 0x6fc5: 0xe000258d, 0x6fc6: 0xe00025fb, 0x6fc7: 0xe00025f7, + 0x6fc8: 0xe0002679, 0x6fc9: 0xe0002676, 0x6fca: 0xe000268b, 0x6fcb: 0xe0002688, + 0x6fcc: 0xe00027b7, 0x6fcd: 0xe00027b4, 0x6fce: 0xe0002777, 0x6fcf: 0xe0002774, + 0x6fd0: 0xe00026ee, 0x6fd1: 0xe00026ea, 0x6fd2: 0xe00026f6, 0x6fd3: 0xe00026f2, + 0x6fd4: 0xe0002706, 0x6fd5: 0xe0002702, 0x6fd6: 0xe00026fe, 0x6fd7: 0xe00026fa, + 0x6fd8: 0xe00027be, 0x6fd9: 0xe00027ba, 0x6fda: 0xe0002790, 0x6fdb: 0xe000278c, + 0x6fdc: 0xe0002798, 0x6fdd: 0xe0002794, 0x6fde: 0xe00027a8, 0x6fdf: 0xe00027a4, + 0x6fe0: 0xe00027a0, 0x6fe1: 0xe000279c, 0x6fe2: 0xe00027b0, 0x6fe3: 0xe00027ac, + 0x6fe4: 0xe000108d, 0x6fe5: 0xe000108a, 0x6fe6: 0xe000104d, 0x6fe7: 0xe000104a, + 0x6fe8: 0xe0001066, 0x6fe9: 0xe0001062, 0x6fea: 0xe000106e, 0x6feb: 0xe000106a, + 0x6fec: 0xe000107e, 0x6fed: 0xe000107a, 0x6fee: 0xe0001076, 0x6fef: 0xe0001072, + 0x6ff0: 0xe0001086, 0x6ff1: 0xe0001082, 0x6ff2: 0xe0001108, 0x6ff3: 0xe0001105, + 0x6ff4: 0xe0001135, 0x6ff5: 0xe0001132, 0x6ff6: 0xe000112f, 0x6ff7: 0xe000112c, + 0x6ff8: 0xe000111d, 0x6ff9: 0xe000111a, 0x6ffa: 0xe0000d0a, 0x6ffb: 0xe0000d07, + 0x6ffc: 0x0030d888, 0x6ffd: 0x4030d820, 0x6ffe: 0x00312088, 0x6fff: 0x40312020, + // Block 0x1c0, offset 0x7000 + 0x7000: 0xe00009bc, 0x7001: 0xe00009c0, 0x7002: 0x002c3a8b, 0x7003: 0xf0000a04, + 0x7004: 0x40081c20, 0x7005: 0xe0000a5e, 0x7006: 0xe0000a62, 0x7007: 0x002cc28a, + 0x7008: 0x40081e20, 0x7009: 0xf0000a04, 0x700a: 0x002d2285, 0x700b: 0x002d688b, + 0x700c: 0x002d688b, 0x700d: 0x002d688b, 0x700e: 0x002d6885, 0x700f: 0xf0000202, + 0x7010: 0x002d9a8b, 0x7011: 0x002d9a8b, 0x7012: 0x002e228b, 0x7013: 0x002e2285, + 0x7014: 0x40082020, 0x7015: 0x002e9e8b, 0x7016: 0xe000281e, 0x7017: 0x40082220, + 0x7018: 0x40082420, 0x7019: 0x002f2c8b, 0x701a: 0x002f568b, 0x701b: 0x002f7a8b, + 0x701c: 0x002f7a8b, 0x701d: 0x002f7a8b, 0x701e: 0x40082620, 0x701f: 0x40082820, + 0x7020: 0xe0002833, 0x7021: 0xe0000fbd, 0x7022: 0xe0002842, 0x7023: 0x40082a20, + 0x7024: 0x00312a8b, 0x7025: 0x40082c20, 0x7026: 0x0032a288, 0x7027: 0x40082e20, + 0x7028: 0x00312a8b, 0x7029: 0x40083020, 0x702a: 0x002c3c83, 0x702b: 0xe000094d, + 0x702c: 0x002c0a8b, 0x702d: 0x002c3a8b, 0x702e: 0x40083220, 0x702f: 0x002c9885, + 0x7030: 0x002c988b, 0x7031: 0x002d088b, 0x7032: 0x002d1e88, 0x7033: 0x002e828b, + 0x7034: 0x002ee285, 0x7035: 0x00389084, 0x7036: 0x00389284, 0x7037: 0x00389484, + 0x7038: 0x00389684, 0x7039: 0x002d9a85, 0x703a: 0x40083420, 0x703b: 0xe0000b95, + 0x703c: 0x00327e85, 0x703d: 0x00325685, 0x703e: 0x0032568b, 0x703f: 0x00327e8b, + // Block 0x1c1, offset 0x7040 + 0x7040: 0x00093685, 0x7041: 0x40083620, 0x7042: 0x40083820, 0x7043: 0x40083a20, + 0x7044: 0x40083c20, 0x7045: 0x002c628b, 0x7046: 0x002c6285, 0x7047: 0x002c9885, + 0x7048: 0x002d9a85, 0x7049: 0x002dcc85, 0x704a: 0x40083e20, 0x704b: 0x400a6e20, + 0x704c: 0x40084020, 0x704d: 0xe00009c4, 0x704e: 0x402d1e20, 0x704f: 0x40084220, + 0x7050: 0xe00002cb, 0x7051: 0xe00002d3, 0x7052: 0xe00002b2, 0x7053: 0xe00002bb, + 0x7054: 0xe00003cd, 0x7055: 0xe00002c3, 0x7056: 0xe00003d1, 0x7057: 0xe00004ab, + 0x7058: 0xe0000579, 0x7059: 0xe00002c7, 0x705a: 0xe0000640, 0x705b: 0xe00002cf, + 0x705c: 0xe00004af, 0x705d: 0xe0000644, 0x705e: 0xe0000798, 0x705f: 0xf0001e1e, + 0x7060: 0x002d9a8a, 0x7061: 0xe00027d4, 0x7062: 0xe00027db, 0x7063: 0xe00027ee, + 0x7064: 0x0030be8a, 0x7065: 0xe0002848, 0x7066: 0xe000284f, 0x7067: 0xe00010bb, + 0x7068: 0xe00027f4, 0x7069: 0x0030f68a, 0x706a: 0xe0002883, 0x706b: 0xe000288a, + 0x706c: 0x002e228a, 0x706d: 0x002c3a8a, 0x706e: 0x002c628a, 0x706f: 0x002e828a, + 0x7070: 0x002d9a84, 0x7071: 0xe00027d1, 0x7072: 0xe00027d7, 0x7073: 0xe00027eb, + 0x7074: 0x0030be84, 0x7075: 0xe0002845, 0x7076: 0xe000284b, 0x7077: 0xe00010b6, + 0x7078: 0xe00027f1, 0x7079: 0x0030f684, 0x707a: 0xe0002880, 0x707b: 0xe0002886, + 0x707c: 0x002e2284, 0x707d: 0x002c3a84, 0x707e: 0x002c6284, 0x707f: 0x002e8284, + // Block 0x1c2, offset 0x7080 + 0x7080: 0xe0000024, 0x7081: 0xe0000029, 0x7082: 0xe000002e, 0x7083: 0xe0000033, + 0x7084: 0xe0000038, 0x7085: 0xe000003d, 0x7086: 0xe0000042, 0x7087: 0xe0000047, + 0x7088: 0xf0001f04, 0x7089: 0xf0001f04, 0x708a: 0xf0001f04, 0x708b: 0xf0001f04, + 0x708c: 0xf0001f04, 0x708d: 0xf0001f04, 0x708e: 0xf0001f04, 0x708f: 0xf0001f04, + 0x7090: 0xf0001f04, 0x7091: 0xf0000404, 0x7092: 0xf0000404, 0x7093: 0xf0000404, + 0x7094: 0xf0000404, 0x7095: 0xf0000404, 0x7096: 0xf0000404, 0x7097: 0xf0000404, + 0x7098: 0xf0000404, 0x7099: 0xf0000404, 0x709a: 0xf0000404, 0x709b: 0xf0000404, + 0x709c: 0xf0000404, 0x709d: 0xf0000404, 0x709e: 0xf0000404, 0x709f: 0xf0000404, + 0x70a0: 0xe000249f, 0x70a1: 0xf0000404, 0x70a2: 0xf0000404, 0x70a3: 0xe00024a7, + 0x70a4: 0xe00024af, 0x70a5: 0xf0000404, 0x70a6: 0xe00024b7, 0x70a7: 0xf0000404, + 0x70a8: 0xf0000404, 0x70a9: 0xf0000404, 0x70aa: 0xe00024bf, 0x70ab: 0xf0000404, + 0x70ac: 0xe00024c7, 0x70ad: 0xe00024cf, 0x70ae: 0xe00024d7, 0x70af: 0xe00024df, + 0x70b0: 0xf0000404, 0x70b1: 0xf0000404, 0x70b2: 0xf0000404, 0x70b3: 0xe00024e7, + 0x70b4: 0xf0000404, 0x70b5: 0xf0000404, 0x70b6: 0x002bde8c, 0x70b7: 0x002c0a8c, + 0x70b8: 0x002c3a8c, 0x70b9: 0x002c628c, 0x70ba: 0x002c988c, 0x70bb: 0x002d088c, + 0x70bc: 0x002d228c, 0x70bd: 0x002d688c, 0x70be: 0x002d9a8c, 0x70bf: 0x002dcc8c, + // Block 0x1c3, offset 0x70c0 + 0x70c0: 0xf0001f04, 0x70c1: 0xf0001f04, 0x70c2: 0xf0001f04, 0x70c3: 0xf0001f04, + 0x70c4: 0xf0001f04, 0x70c5: 0xf0001f04, 0x70c6: 0xf0001f04, 0x70c7: 0xf0001f04, + 0x70c8: 0xf0001f04, 0x70c9: 0xf0000404, 0x70ca: 0xf0000404, 0x70cb: 0xf0000404, + 0x70cc: 0xe00027c5, 0x70cd: 0xe0000b85, 0x70ce: 0xe00026cc, 0x70cf: 0xe0000d14, + 0x70d0: 0x00657693, 0x70d1: 0x00657893, 0x70d2: 0x00657a93, 0x70d3: 0x00657e93, + 0x70d4: 0x00658093, 0x70d5: 0x00658293, 0x70d6: 0x00658493, 0x70d7: 0x00658693, + 0x70d8: 0x00658893, 0x70d9: 0x00658a93, 0x70da: 0x00658c93, 0x70db: 0x00658e93, + 0x70dc: 0x00659093, 0x70dd: 0x00659293, 0x70de: 0x00659493, 0x70df: 0x00659693, + 0x70e0: 0x00659893, 0x70e1: 0x00659a93, 0x70e2: 0x00659c93, 0x70e3: 0x00659e93, + 0x70e4: 0x0065a093, 0x70e5: 0x0065a293, 0x70e6: 0x0065a493, 0x70e7: 0x0065a693, + 0x70e8: 0x0065a893, 0x70e9: 0x0065aa93, 0x70ea: 0x0065ac93, 0x70eb: 0x0065ae93, + 0x70ec: 0x0065b093, 0x70ed: 0x0065b293, 0x70ee: 0x0065b493, 0x70ef: 0x0065b693, + 0x70f0: 0x0065b893, 0x70f1: 0x0065ba93, 0x70f2: 0x0065bc93, 0x70f3: 0x0065be93, + 0x70f4: 0x0065c093, 0x70f5: 0x0065c493, 0x70f6: 0x0065c693, 0x70f7: 0x0065c893, + 0x70f8: 0x0065ca93, 0x70f9: 0x0065cc93, 0x70fa: 0x0065ce93, 0x70fb: 0x0065d093, + 0x70fc: 0x0065d293, 0x70fd: 0x0065d493, 0x70fe: 0x0065d693, + // Block 0x1c4, offset 0x7100 + 0x7100: 0xe000230b, 0x7101: 0xe00022f8, 0x7102: 0xe00022fc, 0x7103: 0xe0002311, + 0x7104: 0xe0002316, 0x7105: 0xe000231d, 0x7106: 0xe0002321, 0x7107: 0xe0002325, + 0x7108: 0xe000232b, 0x7109: 0xf0001c1c, 0x710a: 0xe0002330, 0x710b: 0xe000233c, + 0x710c: 0xe0002340, 0x710d: 0xe0002337, 0x710e: 0xe0002346, 0x710f: 0xe000234b, + 0x7110: 0xe000234f, 0x7111: 0xe0002353, 0x7112: 0xf0001c1c, 0x7113: 0xe000235e, + 0x7114: 0xe0002358, 0x7115: 0xf0001c1c, 0x7116: 0xe0002363, 0x7117: 0xe000236d, + 0x7118: 0xf0001f04, 0x7119: 0xf0001f04, 0x711a: 0xf0001f04, 0x711b: 0xf0001f04, + 0x711c: 0xf0001f04, 0x711d: 0xf0001f04, 0x711e: 0xf0001f04, 0x711f: 0xf0001f04, + 0x7120: 0xf0001f04, 0x7121: 0xf0001f04, 0x7122: 0xf0000404, 0x7123: 0xf0000404, + 0x7124: 0xf0000404, 0x7125: 0xf0000404, 0x7126: 0xf0000404, 0x7127: 0xf0000404, + 0x7128: 0xf0000404, 0x7129: 0xf0000404, 0x712a: 0xf0000404, 0x712b: 0xf0000404, + 0x712c: 0xf0000404, 0x712d: 0xf0000404, 0x712e: 0xf0000404, 0x712f: 0xf0000404, + 0x7130: 0xf0000404, 0x7131: 0xe0000c1e, 0x7132: 0xf0001c1c, 0x7133: 0xf0001d1d, + 0x7134: 0xe0000a31, 0x7135: 0xe0002824, 0x7136: 0xf0001c1c, 0x7137: 0xf0001c1c, + 0x7138: 0xe0000ac2, 0x7139: 0xe0000ac6, 0x713a: 0xe00027e8, 0x713b: 0xf0001c1c, + 0x713c: 0xf0001c1c, 0x713d: 0xf0001c1c, 0x713e: 0xf0001c1c, 0x713f: 0xe0002431, + // Block 0x1c5, offset 0x7140 + 0x7140: 0xf0001d1c, 0x7141: 0xf0001d1c, 0x7142: 0xf0001d1c, 0x7143: 0xf0001d1c, + 0x7144: 0xe00027f7, 0x7145: 0xe00027fa, 0x7146: 0xf0001d1d, 0x7147: 0xf0001d1d, + 0x7148: 0xe0000a6b, 0x7149: 0xe0000cb4, 0x714a: 0xf0001d1c, 0x714b: 0xf0001d1c, + 0x714c: 0xf0001d1c, 0x714d: 0xf0001c1c, 0x714e: 0xf0001c1c, 0x714f: 0xe00027fd, + 0x7150: 0xe00027ce, 0x7151: 0xe0000cb9, 0x7152: 0xe0000d36, 0x7153: 0xe0000be3, + 0x7154: 0xe0000fc5, 0x7155: 0xf0001c1c, 0x7156: 0xf0001c1c, 0x7157: 0xf0001c1c, + 0x7158: 0xe0002803, 0x7159: 0xf0001c1c, 0x715a: 0xf0001c1c, 0x715b: 0xf0001c1c, + 0x715c: 0xf0001c1c, 0x715d: 0xf0001c1c, 0x715e: 0xe0002806, 0x715f: 0xe0000d3e, + 0x7160: 0xe0000a72, 0x7161: 0xf0001c1c, 0x7162: 0xe0000cbd, 0x7163: 0xe0000d42, + 0x7164: 0xe0000a76, 0x7165: 0xf0001c1c, 0x7166: 0xe0000cc1, 0x7167: 0xe0000d2d, + 0x7168: 0xe0000d31, 0x7169: 0xf0001c1d, 0x716a: 0xe0000cc5, 0x716b: 0xe0000d4a, + 0x716c: 0xe0000be7, 0x716d: 0xe0000f0b, 0x716e: 0xe0000f0f, 0x716f: 0xe0000f15, + 0x7170: 0xe000282d, 0x7171: 0xe0002821, 0x7172: 0xe000288e, 0x7173: 0xe000281b, + 0x7174: 0xf0001d1c, 0x7175: 0xf0001d1c, 0x7176: 0xf0001d1c, 0x7177: 0xf0001d1c, + 0x7178: 0xe000280f, 0x7179: 0xf0001d1d, 0x717a: 0xf0001d1c, 0x717b: 0xf0001d1c, + 0x717c: 0xf0001d1c, 0x717d: 0xf0001d1c, 0x717e: 0xe0002812, 0x717f: 0xf0001d1d, + // Block 0x1c6, offset 0x7180 + 0x7180: 0xe0002815, 0x7181: 0xf0001d1d, 0x7182: 0xe00009b7, 0x7183: 0xe00024f3, + 0x7184: 0xf0001c1c, 0x7185: 0xf0001c1c, 0x7186: 0xe0000a66, 0x7187: 0xe0000a7a, + 0x7188: 0xf0001d1c, 0x7189: 0xf0001c1d, 0x718a: 0xe00027c2, 0x718b: 0xe00027c8, + 0x718c: 0xe00027e5, 0x718d: 0xe0002800, 0x718e: 0xe0002809, 0x718f: 0xe000280c, + 0x7190: 0xf0001c1c, 0x7191: 0xf0001c1c, 0x7192: 0xe0000d0d, 0x7193: 0xe0002818, + 0x7194: 0xf0001c1c, 0x7195: 0xe0000d3a, 0x7196: 0xe0000d46, 0x7197: 0xe0002827, + 0x7198: 0xe0000eb0, 0x7199: 0xe0000eb8, 0x719a: 0xe000282a, 0x719b: 0xe0002836, + 0x719c: 0xe000283f, 0x719d: 0xf0001c1d, 0x719e: 0xe00010b2, 0x719f: 0xe00009c8, + 0x71a0: 0xf0001f04, 0x71a1: 0xf0001f04, 0x71a2: 0xf0001f04, 0x71a3: 0xf0001f04, + 0x71a4: 0xf0001f04, 0x71a5: 0xf0001f04, 0x71a6: 0xf0001f04, 0x71a7: 0xf0001f04, + 0x71a8: 0xf0001f04, 0x71a9: 0xf0000404, 0x71aa: 0xf0000404, 0x71ab: 0xf0000404, + 0x71ac: 0xf0000404, 0x71ad: 0xf0000404, 0x71ae: 0xf0000404, 0x71af: 0xf0000404, + 0x71b0: 0xf0000404, 0x71b1: 0xf0000404, 0x71b2: 0xf0000404, 0x71b3: 0xf0000404, + 0x71b4: 0xf0000404, 0x71b5: 0xf0000404, 0x71b6: 0xf0000404, 0x71b7: 0xf0000404, + 0x71b8: 0xf0000404, 0x71b9: 0xf0000404, 0x71ba: 0xf0000404, 0x71bb: 0xf0000404, + 0x71bc: 0xf0000404, 0x71bd: 0xf0000404, 0x71be: 0xf0000404, 0x71bf: 0xe0000bdf, + // Block 0x1c7, offset 0x71c0 + 0x71c0: 0xf0000404, 0x71c1: 0xe00026cf, 0x71c2: 0xf0000404, 0x71c3: 0xe0000b99, + 0x71c4: 0xe0000b9d, 0x71c5: 0xe0000f83, 0x71c6: 0xe000283c, + 0x71d3: 0xf0000404, + 0x71d4: 0xf0000404, 0x71d5: 0xf0000404, 0x71d6: 0xf0000404, 0x71d7: 0xf0000404, + 0x71dd: 0xe000150b, 0x71de: 0xa1a09602, 0x71df: 0xe0001514, + 0x71e0: 0x0038ae85, 0x71e1: 0x00389085, 0x71e2: 0x00389685, 0x71e3: 0x00389885, + 0x71e4: 0x0038a485, 0x71e5: 0x0038a685, 0x71e6: 0x0038a885, 0x71e7: 0x0038b685, + 0x71e8: 0x0038ba85, 0x71e9: 0x00093885, 0x71ea: 0xe0001542, 0x71eb: 0xe000153f, + 0x71ec: 0xe000154c, 0x71ed: 0xe0001548, 0x71ee: 0xe00014e1, 0x71ef: 0xe00014e4, + 0x71f0: 0xe00014e7, 0x71f1: 0xe00014ea, 0x71f2: 0xe00014f0, 0x71f3: 0xe00014f3, + 0x71f4: 0xe00014f6, 0x71f5: 0xe00014fc, 0x71f6: 0xe0001505, + 0x71f8: 0xe0001508, 0x71f9: 0xe000150e, 0x71fa: 0xe000151b, 0x71fb: 0xe0001518, + 0x71fc: 0xe0001521, 0x71fe: 0xe0001524, + // Block 0x1c8, offset 0x7200 + 0x7200: 0xf0001f04, 0x7201: 0xf0001f04, 0x7202: 0xf0001f04, 0x7203: 0xf0001f04, + 0x7204: 0xf0001f04, 0x7205: 0xf0001f04, 0x7206: 0xf0001f04, 0x7207: 0xf0001f04, + 0x7208: 0xf0001f04, 0x7209: 0xf0001f04, 0x720a: 0xf0001f04, + 0x7210: 0xf0000a04, 0x7211: 0xf0000a04, 0x7212: 0xf0000a04, 0x7213: 0xf0000a04, + 0x7214: 0xe00024a3, 0x7215: 0xf0000a04, 0x7216: 0xf0000a04, 0x7217: 0xe00024ab, + 0x7218: 0xe00024b3, 0x7219: 0xf0000a04, 0x721a: 0xe00024bb, 0x721b: 0xf0000a04, + 0x721c: 0xf0000a04, 0x721d: 0xf0000a04, 0x721e: 0xe00024c3, 0x721f: 0xf0000a04, + 0x7220: 0xe00024cb, 0x7221: 0xe00024d3, 0x7222: 0xe00024db, 0x7223: 0xe00024e3, + 0x7224: 0xf0000a04, 0x7225: 0xf0000a04, 0x7226: 0xf0000a04, 0x7227: 0xe00024eb, + 0x7228: 0xf0000a04, 0x7229: 0xf0000a04, 0x722a: 0xe00024ef, 0x722b: 0x002c3a8c, + 0x722c: 0x002f7a8c, 0x722d: 0xf0000c0c, 0x722e: 0xf0000c0c, + 0x7230: 0x002bde9d, 0x7231: 0x002c0a9d, 0x7232: 0x002c3a9d, 0x7233: 0x002c629d, + 0x7234: 0x002c989d, 0x7235: 0x002d089d, 0x7236: 0x002d229d, 0x7237: 0x002d689d, + 0x7238: 0x002d9a9d, 0x7239: 0x002dcc9d, 0x723a: 0x002dfe9d, 0x723b: 0x002e229d, + 0x723c: 0x002e829d, 0x723d: 0x002e9e9d, 0x723e: 0x002ee29d, 0x723f: 0x002f2c9d, + // Block 0x1c9, offset 0x7240 + 0x7240: 0x002f569d, 0x7241: 0x002f7a9d, 0x7242: 0x002fe69d, 0x7243: 0x00302c9d, + 0x7244: 0x00306c9d, 0x7245: 0x0030be9d, 0x7246: 0x0030e29d, 0x7247: 0x0030f69d, + 0x7248: 0x0031009d, 0x7249: 0x00312a9d, 0x724a: 0xe00027cb, 0x724b: 0xf0001d1d, + 0x724c: 0xe0002830, 0x724d: 0xe0002839, 0x724e: 0xe0000ebc, 0x724f: 0xf0001d1d, + 0x7250: 0x002bde8c, 0x7251: 0x002c0a8c, 0x7252: 0x002c3a8c, 0x7253: 0x002c628c, + 0x7254: 0x002c988c, 0x7255: 0x002d088c, 0x7256: 0x002d228c, 0x7257: 0x002d688c, + 0x7258: 0x002d9a8c, 0x7259: 0x002dcc8c, 0x725a: 0x002dfe8c, 0x725b: 0x002e228c, + 0x725c: 0x002e828c, 0x725d: 0x002e9e8c, 0x725e: 0x002ee28c, 0x725f: 0x002f2c8c, + 0x7260: 0x002f568c, 0x7261: 0x002f7a8c, 0x7262: 0x002fe68c, 0x7263: 0x00302c8c, + 0x7264: 0x00306c8c, 0x7265: 0x0030be8c, 0x7266: 0x0030e28c, 0x7267: 0x0030f68c, + 0x7268: 0x0031008c, 0x7269: 0x00312a8c, 0x726a: 0xf0001414, 0x726b: 0xf0001414, + 0x7270: 0x002bde9d, 0x7271: 0x002c0a9d, 0x7272: 0x002c3a9d, 0x7273: 0x002c629d, + 0x7274: 0x002c989d, 0x7275: 0x002d089d, 0x7276: 0x002d229d, 0x7277: 0x002d689d, + 0x7278: 0x002d9a9d, 0x7279: 0x002dcc9d, 0x727a: 0x002dfe9d, 0x727b: 0x002e229d, + 0x727c: 0x002e829d, 0x727d: 0x002e9e9d, 0x727e: 0x002ee29d, 0x727f: 0x002f2c9d, + // Block 0x1ca, offset 0x7280 + 0x7280: 0xe0000cfe, 0x7281: 0xe0000cf8, 0x7282: 0xe0000cf5, 0x7283: 0xe0000d51, + 0x7284: 0xe0000d4e, 0x7285: 0xe0000d6f, 0x7286: 0xe0000d6c, 0x7287: 0xe0000d5d, + 0x7288: 0xe0000d5a, 0x7289: 0x002e9e89, 0x728a: 0x002eda88, 0x728b: 0x402eda20, + 0x728c: 0xe0000e2e, 0x728d: 0xe0000e2b, 0x728e: 0xe0000da0, 0x728f: 0xe0000d9d, + 0x7290: 0xe0000de0, 0x7291: 0xe0000ddd, 0x7292: 0xe0000e93, 0x7293: 0xe0000e8f, + 0x7294: 0xe0000eca, 0x7295: 0xe0000ec7, 0x7296: 0xe0000edc, 0x7297: 0xe0000ed9, + 0x7298: 0xe0000ed0, 0x7299: 0xe0000ecd, 0x729a: 0xe0000f1f, 0x729b: 0xe0000f1c, + 0x729c: 0xe0000f2d, 0x729d: 0xe0000f2a, 0x729e: 0xe0000f47, 0x729f: 0xe0000f44, + 0x72a0: 0xe0000f33, 0x72a1: 0xe0000f30, 0x72a2: 0xe0000f99, 0x72a3: 0xe0000f96, + 0x72a4: 0xe0000f8a, 0x72a5: 0xe0000f87, 0x72a6: 0x00303688, 0x72a7: 0x40303620, + 0x72a8: 0xe000102b, 0x72a9: 0xe0001028, 0x72aa: 0xe000103f, 0x72ab: 0xe000103c, + 0x72ac: 0xe0000fe7, 0x72ad: 0xe0000fe4, 0x72ae: 0xe0000ff9, 0x72af: 0xe0000ff6, + 0x72b0: 0xe0001025, 0x72b1: 0xe0001022, 0x72b2: 0xe0001039, 0x72b3: 0xe0001036, + 0x72b4: 0xe00010d8, 0x72b5: 0xe00010d5, 0x72b6: 0xe000110e, 0x72b7: 0xe000110b, + 0x72b8: 0xe0001117, 0x72b9: 0xe000113b, 0x72ba: 0xe0001138, 0x72bb: 0xe000114d, + 0x72bc: 0xe000114a, 0x72bd: 0xe0001147, 0x72be: 0xe0001144, 0x72bf: 0xe0000f64, + // Block 0x1cb, offset 0x72c0 + 0x72c0: 0xa0000000, 0x72c1: 0xa0000000, 0x72c2: 0xa0000000, 0x72c3: 0xa0000000, + 0x72c4: 0xa0000000, 0x72c6: 0x40096620, 0x72c7: 0x40096a20, + 0x72c8: 0x40070820, 0x72c9: 0x4004f220, 0x72ca: 0x4004f620, 0x72cb: 0x4027e620, + 0x72cc: 0x40024820, 0x72cd: 0x40024a20, 0x72ce: 0x40070e20, 0x72cf: 0x40071020, + 0x72d0: 0xae600000, 0x72d1: 0xae600000, 0x72d2: 0xae600000, 0x72d3: 0xae600000, + 0x72d4: 0xae600000, 0x72d5: 0xae600000, 0x72d6: 0xae600000, 0x72d7: 0xae600000, + 0x72d8: 0xa1e00000, 0x72d9: 0xa1f00000, 0x72da: 0xa2000000, 0x72db: 0x40026420, + 0x72de: 0x40027020, 0x72df: 0x4002cc20, + 0x72e0: 0x403aa220, 0x72e1: 0x40391c20, 0x72e2: 0x40391e20, 0x72e3: 0x40392020, + 0x72e4: 0x40392620, 0x72e5: 0x40392820, 0x72e6: 0x40393020, 0x72e7: 0xc0520151, + 0x72e8: 0x40393c20, 0x72e9: 0x40395621, 0x72ea: 0x40395620, 0x72eb: 0x40395820, + 0x72ec: 0x40396420, 0x72ed: 0x40397220, 0x72ee: 0x40397420, 0x72ef: 0x40398820, + 0x72f0: 0x40398a20, 0x72f1: 0x4039a420, 0x72f2: 0x4039a620, 0x72f3: 0x4039c620, + 0x72f4: 0x4039c820, 0x72f5: 0x4039dc20, 0x72f6: 0x4039de20, 0x72f7: 0x4039e620, + 0x72f8: 0x4039e820, 0x72f9: 0x4039ee20, 0x72fa: 0x4039f020, 0x72fb: 0x403a3820, + 0x72fc: 0x403a3a20, 0x72fd: 0x403a9c20, 0x72fe: 0x403a9e20, 0x72ff: 0x403aa020, + // Block 0x1cc, offset 0x7300 + 0x7300: 0xa0000000, 0x7301: 0x4039fc20, 0x7302: 0x403a1220, 0x7303: 0x403a1a20, + 0x7304: 0x403a4020, 0x7305: 0x403a4e20, 0x7306: 0x403a5620, 0x7307: 0x403a6820, + 0x7308: 0xc0560171, 0x7309: 0x403a9021, 0x730a: 0xc0580171, 0x730b: 0xa1b0a202, + 0x730c: 0xa1c0a502, 0x730d: 0xa1d0a902, 0x730e: 0xa1e0ad02, 0x730f: 0xa1f0b202, + 0x7310: 0xa200b602, 0x7311: 0xa210ba02, 0x7312: 0xa220bc02, 0x7313: 0xae60bd02, + 0x7314: 0xae60be02, 0x7315: 0xadc0bf02, 0x7316: 0xadc0c102, 0x7317: 0xae60c202, + 0x7318: 0xae60c302, 0x7319: 0xae60c402, 0x731a: 0xae60c502, 0x731b: 0xae60c602, + 0x731c: 0xadc0c702, 0x731d: 0xae60c802, 0x731e: 0xae60c902, 0x731f: 0xadc0c002, + 0x7320: 0xe000015e, 0x7321: 0xe00001e6, 0x7322: 0xe0000301, 0x7323: 0xe00003db, + 0x7324: 0xe00004b6, 0x7325: 0xe0000580, 0x7326: 0xe000064b, 0x7327: 0xe00006f3, + 0x7328: 0xe000079f, 0x7329: 0xe0000844, 0x732a: 0x4004ee20, 0x732b: 0x40024c20, + 0x732c: 0x40024e20, 0x732d: 0x4004de20, 0x732e: 0x40393a20, 0x732f: 0x403a1020, + 0x7330: 0xa230d102, 0x7331: 0x40392420, 0x7332: 0x40392220, 0x7333: 0x40392a20, + 0x7334: 0x00391c84, 0x7335: 0xf0000404, 0x7336: 0xf0000404, 0x7337: 0xf0000404, + 0x7338: 0xf0000404, 0x7339: 0x40395a20, 0x733a: 0x40395c20, 0x733b: 0x40393e20, + 0x733c: 0x40395e20, 0x733d: 0x40396020, 0x733e: 0x40394020, 0x733f: 0x40396220, + // Block 0x1cd, offset 0x7340 + 0x7340: 0x40073420, 0x7341: 0x40073620, + 0x7353: 0x003a269a, + 0x7354: 0x003a2699, 0x7355: 0x003a2697, 0x7356: 0x003a2698, 0x7357: 0x003a7c9a, + 0x7358: 0x003a7c99, 0x7359: 0x003a7a9a, 0x735a: 0x003a7a99, 0x735b: 0x003a7e9a, + 0x735c: 0x003a7e99, 0x735d: 0xf0001a1a, 0x735e: 0x003a849a, 0x735f: 0x003a8499, + 0x7360: 0x003a789a, 0x7361: 0x003a7899, 0x7362: 0x003a809a, 0x7363: 0x003a8099, + 0x7364: 0x003a989a, 0x7365: 0x003a9899, 0x7366: 0x003a9897, 0x7367: 0x003a9898, + 0x7368: 0x003a90a3, 0x7369: 0x003a90a4, 0x736a: 0xe0001559, 0x736b: 0xe0001556, + 0x736c: 0xe0001589, 0x736d: 0xe0001586, 0x736e: 0xe000158f, 0x736f: 0xe000158c, + 0x7370: 0xe000159b, 0x7371: 0xe0001598, 0x7372: 0xe0001595, 0x7373: 0xe0001592, + 0x7374: 0xe00015a1, 0x7375: 0xe000159e, 0x7376: 0xe00015bf, 0x7377: 0xe00015bc, + 0x7378: 0xe00015b9, 0x7379: 0xe00015ad, 0x737a: 0xe00015a7, 0x737b: 0xe00015a4, + 0x737c: 0x003a929a, 0x737d: 0x003a9299, 0x737e: 0x003a9297, 0x737f: 0x003a9298, + // Block 0x1ce, offset 0x7380 + 0x7380: 0xe000155f, 0x7381: 0xe0001565, 0x7382: 0xe000157a, 0x7383: 0xe00015b0, + 0x7384: 0xe00015b6, 0x7385: 0xf0001a1a, 0x7386: 0xf0001a1a, 0x7387: 0xf0001a1a, + 0x7388: 0xf0001a1a, 0x7389: 0xe0002894, 0x738a: 0xf0001a1a, 0x738b: 0xf0001a1a, + 0x738c: 0xf0001a1a, 0x738d: 0xf0001a1a, 0x738e: 0xf0001a1a, 0x738f: 0xe000289a, + 0x7390: 0xf0001a1a, 0x7391: 0xf0001a1a, 0x7392: 0xf0001a1a, 0x7393: 0xe00028a0, + 0x7394: 0xf0001a1a, 0x7395: 0xf0001a1a, 0x7396: 0xf0001a1a, 0x7397: 0xf0001a1a, + 0x7398: 0xf0001a1a, 0x7399: 0xf0001a1a, 0x739a: 0xf0001a1a, 0x739b: 0xf0001a1a, + 0x739c: 0xf0001a1a, 0x739d: 0xf0001a1a, 0x739e: 0xf0001a1a, 0x739f: 0xf0001a1a, + 0x73a0: 0xf0001a1a, 0x73a1: 0xf0001a1a, 0x73a2: 0xf0001a1a, 0x73a3: 0xf0001a1a, + 0x73a4: 0xf0001a1a, 0x73a5: 0xf0001a1a, 0x73a6: 0xf0001a1a, 0x73a7: 0xf0001a1a, + 0x73a8: 0xf0001a1a, 0x73a9: 0xf0001a1a, 0x73aa: 0xf0001a1a, 0x73ab: 0xf0001a1a, + 0x73ac: 0xf0001a1a, 0x73ad: 0xf0001a1a, 0x73ae: 0xf0001a1a, 0x73af: 0xf0001a1a, + 0x73b0: 0xf0001a1a, 0x73b1: 0xe00028e2, 0x73b2: 0xf0001a1a, 0x73b3: 0xf0001a1a, + 0x73b4: 0xf0001a1a, 0x73b5: 0xe00028e8, 0x73b6: 0xf0001a1a, 0x73b7: 0xf0001a1a, + 0x73b8: 0xf0001a1a, 0x73b9: 0xf0001a1a, 0x73ba: 0xf0001a1a, 0x73bb: 0xf0001a1a, + 0x73bc: 0xf0001a1a, 0x73bd: 0xe00028ee, 0x73be: 0xf0001a1a, 0x73bf: 0xf0001a1a, + // Block 0x1cf, offset 0x73c0 + 0x73c0: 0xf0001a1a, 0x73c1: 0xf0001a1a, 0x73c2: 0xf0001a1a, 0x73c3: 0xe00028f4, + 0x73c4: 0xf0001a1a, 0x73c5: 0xf0001a1a, 0x73c6: 0xf0001a1a, 0x73c7: 0xf0001a1a, + 0x73c8: 0xf0001a1a, 0x73c9: 0xe00028f7, 0x73ca: 0xf0001a1a, 0x73cb: 0xf0001a1a, + 0x73cc: 0xf0001a1a, 0x73cd: 0xf0001a1a, 0x73ce: 0xf0001a1a, 0x73cf: 0xe00028fd, + 0x73d0: 0xf0001a1a, 0x73d1: 0xf0001a1a, 0x73d2: 0xf0001a1a, 0x73d3: 0xe0002900, + 0x73d4: 0xf0001a1a, 0x73d5: 0xf0001a1a, 0x73d6: 0xf0001a1a, 0x73d7: 0xf0001a1a, + 0x73d8: 0xf0001a1a, 0x73d9: 0xe0002906, 0x73da: 0xf0001a1a, 0x73db: 0xf0001a1a, + 0x73dc: 0xf0001a1a, 0x73dd: 0x003a90a8, 0x73de: 0xe0000003, 0x73df: 0xe0000006, + 0x73e0: 0xe0000009, 0x73e1: 0xe000000c, 0x73e2: 0xe000000f, 0x73e3: 0xe0000012, + 0x73e4: 0xe000156b, 0x73e5: 0xe000156e, 0x73e6: 0xe0001577, 0x73e7: 0xe000157d, + 0x73e8: 0xe00015aa, 0x73e9: 0xe00015b3, 0x73ea: 0xf0001919, 0x73eb: 0xf0001919, + 0x73ec: 0xf0001919, 0x73ed: 0xf0001919, 0x73ee: 0xe0002891, 0x73ef: 0xf0001919, + 0x73f0: 0xf0001919, 0x73f1: 0xf0001919, 0x73f2: 0xf0001919, 0x73f3: 0xf0001919, + 0x73f4: 0xe0002897, 0x73f5: 0xf0001919, 0x73f6: 0xf0001919, 0x73f7: 0xf0001919, + 0x73f8: 0xf0001919, 0x73f9: 0xf0001919, 0x73fa: 0xe000289d, 0x73fb: 0xf0001919, + 0x73fc: 0xe00028df, 0x73fd: 0xf0001919, 0x73fe: 0xe00028e5, 0x73ff: 0xf0001919, + // Block 0x1d0, offset 0x7400 + 0x7400: 0xf0001919, 0x7401: 0xf0001919, 0x7402: 0xf0001919, 0x7403: 0xe00028eb, + 0x7404: 0xf0001919, 0x7405: 0xf0001919, 0x7406: 0xe00028f1, 0x7407: 0xf0001919, + 0x7408: 0xf0001919, 0x7409: 0xf0001919, 0x740a: 0xf0001919, 0x740b: 0xf0001919, + 0x740c: 0xf0001919, 0x740d: 0xf0001919, 0x740e: 0xe00028fa, 0x740f: 0xf0001919, + 0x7410: 0x003a90a7, 0x7411: 0xf0001919, 0x7412: 0xf0001919, 0x7413: 0xf0001919, + 0x7414: 0xf0001919, 0x7415: 0xe0002903, 0x7416: 0xf0001919, 0x7417: 0xe000155c, + 0x7418: 0xe0001562, 0x7419: 0xe0001568, 0x741a: 0xe0001571, 0x741b: 0xe0001580, + 0x741c: 0xf0001717, 0x741d: 0xf0001717, 0x741e: 0xf0001717, 0x741f: 0xf0001717, + 0x7420: 0xf0001717, 0x7421: 0xf0001717, 0x7422: 0xf0001717, 0x7423: 0xf0001717, + 0x7424: 0xf0001717, 0x7425: 0xf0001717, 0x7426: 0xf0001717, 0x7427: 0xf0001717, + 0x7428: 0xf0001717, 0x7429: 0xf0001717, 0x742a: 0xf0001717, 0x742b: 0xf0001717, + 0x742c: 0xf0001717, 0x742d: 0xf0001717, 0x742e: 0xf0001717, 0x742f: 0xf0001717, + 0x7430: 0xf0001717, 0x7431: 0xf0001717, 0x7432: 0xf0001717, 0x7433: 0xf0001717, + 0x7434: 0xf0001717, 0x7435: 0xf0001717, 0x7436: 0xf0001717, 0x7437: 0xf0001717, + 0x7438: 0xf0001717, 0x7439: 0xf0001717, 0x743a: 0xf0001717, 0x743b: 0xf0001717, + 0x743c: 0xf0001717, 0x743d: 0xf0001717, 0x743e: 0xf0001717, 0x743f: 0xf0001717, + // Block 0x1d1, offset 0x7440 + 0x7440: 0xf0001717, 0x7441: 0xf0001717, 0x7442: 0xf0001717, 0x7443: 0xf0001717, + 0x7444: 0xf0001717, 0x7445: 0xf0001717, 0x7446: 0xf0001717, 0x7447: 0xf0001717, + 0x7448: 0xf0001717, 0x7449: 0xf0001717, 0x744a: 0xf0001717, 0x744b: 0xf0001717, + 0x744c: 0xf0001717, 0x744d: 0xf0001717, 0x744e: 0xf0001717, 0x744f: 0xf0001717, + 0x7450: 0xf0001717, 0x7451: 0xf0001717, 0x7452: 0xf0001717, 0x7453: 0xf0001717, + 0x7454: 0xf0001717, 0x7455: 0xf0001717, 0x7456: 0xf0001717, 0x7457: 0xf0001717, + 0x7458: 0xf0001717, 0x7459: 0xf0001717, 0x745a: 0xf0001717, 0x745b: 0xf0001717, + 0x745c: 0xf0001717, 0x745d: 0xf0001717, 0x745e: 0xf0001717, 0x745f: 0xe0001574, + 0x7460: 0xe0001583, 0x7461: 0xf0001818, 0x7462: 0xf0001818, 0x7463: 0xf0001818, + 0x7464: 0xf0001818, 0x7465: 0xf0001818, 0x7466: 0xf0001818, 0x7467: 0xf0001818, + 0x7468: 0xf0001818, 0x7469: 0xf0001818, 0x746a: 0xf0001818, 0x746b: 0xf0001818, + 0x746c: 0xf0001818, 0x746d: 0xf0001818, 0x746e: 0xf0001818, 0x746f: 0xf0001818, + 0x7470: 0xf0001818, 0x7471: 0xf0001818, 0x7472: 0xf0001818, 0x7473: 0xf0001818, + 0x7474: 0xf0001818, 0x7475: 0xe00028d0, 0x7476: 0xf0001a1a, 0x7477: 0xe00028d6, + 0x7478: 0xf0001a1a, 0x7479: 0xe00028dc, 0x747a: 0xf0001a1a, 0x747b: 0xe00028b8, + 0x747c: 0xf0001a1a, 0x747d: 0xe00028be, 0x747e: 0xf0001a1a, 0x747f: 0xe00028ac, + // Block 0x1d2, offset 0x7480 + 0x7480: 0xf0001a1a, 0x7481: 0xe00028a6, 0x7482: 0xf0001a1a, 0x7483: 0xe00028b2, + 0x7484: 0xf0001a1a, 0x7485: 0xe00028c4, 0x7486: 0xf0001a1a, 0x7487: 0xe00028ca, + 0x7488: 0xf0001a1a, 0x7489: 0xf0001a1a, 0x748a: 0xf0001a1a, 0x748b: 0xf0001a1a, + 0x748c: 0xf0001a1a, 0x748d: 0xf0001a1a, 0x748e: 0xf0001a1a, 0x748f: 0xf0001a1a, + 0x7490: 0xf0001a1a, 0x7491: 0xe00028cd, 0x7492: 0xf0001919, 0x7493: 0xe00028d3, + 0x7494: 0xf0001919, 0x7495: 0xe00028d9, 0x7496: 0xf0001919, 0x7497: 0xe00028b5, + 0x7498: 0xf0001919, 0x7499: 0xe00028bb, 0x749a: 0xf0001919, 0x749b: 0xe00028a9, + 0x749c: 0xf0001919, 0x749d: 0xe00028a3, 0x749e: 0xf0001919, 0x749f: 0xe00028af, + 0x74a0: 0xf0001919, 0x74a1: 0xe00028c1, 0x74a2: 0xf0001919, 0x74a3: 0xe00028c7, + 0x74a4: 0xf0001919, 0x74a5: 0xf0001919, 0x74a6: 0xf0001919, 0x74a7: 0xf0001919, + 0x74a8: 0xf0001919, 0x74a9: 0xf0001919, 0x74aa: 0xf0001919, 0x74ab: 0xf0001919, + 0x74ac: 0xf0001919, 0x74ad: 0xf0001717, 0x74ae: 0xf0001717, 0x74af: 0xf0001717, + 0x74b0: 0xf0001717, 0x74b1: 0xf0001717, 0x74b2: 0xf0001717, 0x74b3: 0xf0001717, + 0x74b4: 0xf0001818, 0x74b5: 0xf0001818, 0x74b6: 0xf0001818, 0x74b7: 0xf0001818, + 0x74b8: 0xf0001818, 0x74b9: 0xf0001818, 0x74ba: 0xf0001818, 0x74bb: 0xf0001818, + 0x74bc: 0xf0001919, 0x74bd: 0xf0001a1a, 0x74be: 0x4004c020, 0x74bf: 0x4004c220, + // Block 0x1d3, offset 0x74c0 + 0x74c0: 0x00391c9a, 0x74c1: 0x00391e9a, 0x74c2: 0x00391e99, 0x74c3: 0x0039209a, + 0x74c4: 0x00392099, 0x74c5: 0x0039269a, 0x74c6: 0x00392699, 0x74c7: 0x0039289a, + 0x74c8: 0x00392899, 0x74c9: 0x0039309a, 0x74ca: 0x00393099, 0x74cb: 0x00393097, + 0x74cc: 0x00393098, 0x74cd: 0x0039389a, 0x74ce: 0x00393899, 0x74cf: 0x00393c9a, + 0x74d0: 0x00393c99, 0x74d1: 0x00393c97, 0x74d2: 0x00393c98, 0x74d3: 0x003956a4, + 0x74d4: 0x003956a3, 0x74d5: 0x0039569a, 0x74d6: 0x00395699, 0x74d7: 0x00395697, + 0x74d8: 0x00395698, 0x74d9: 0x0039589a, 0x74da: 0x00395899, 0x74db: 0x00395897, + 0x74dc: 0x00395898, 0x74dd: 0x0039649a, 0x74de: 0x00396499, 0x74df: 0x00396497, + 0x74e0: 0x00396498, 0x74e1: 0x0039729a, 0x74e2: 0x00397299, 0x74e3: 0x00397297, + 0x74e4: 0x00397298, 0x74e5: 0x0039749a, 0x74e6: 0x00397499, 0x74e7: 0x00397497, + 0x74e8: 0x00397498, 0x74e9: 0x0039889a, 0x74ea: 0x00398899, 0x74eb: 0x00398a9a, + 0x74ec: 0x00398a99, 0x74ed: 0x0039a49a, 0x74ee: 0x0039a499, 0x74ef: 0x0039a69a, + 0x74f0: 0x0039a699, 0x74f1: 0x0039c69a, 0x74f2: 0x0039c699, 0x74f3: 0x0039c697, + 0x74f4: 0x0039c698, 0x74f5: 0x0039c89a, 0x74f6: 0x0039c899, 0x74f7: 0x0039c897, + 0x74f8: 0x0039c898, 0x74f9: 0x0039dc9a, 0x74fa: 0x0039dc99, 0x74fb: 0x0039dc97, + 0x74fc: 0x0039dc98, 0x74fd: 0x0039de9a, 0x74fe: 0x0039de99, 0x74ff: 0x0039de97, + // Block 0x1d4, offset 0x7500 + 0x7500: 0x0039de98, 0x7501: 0x0039e69a, 0x7502: 0x0039e699, 0x7503: 0x0039e697, + 0x7504: 0x0039e698, 0x7505: 0x0039e89a, 0x7506: 0x0039e899, 0x7507: 0x0039e897, + 0x7508: 0x0039e898, 0x7509: 0x0039ee9a, 0x750a: 0x0039ee99, 0x750b: 0x0039ee97, + 0x750c: 0x0039ee98, 0x750d: 0x0039f09a, 0x750e: 0x0039f099, 0x750f: 0x0039f097, + 0x7510: 0x0039f098, 0x7511: 0x0039fc9a, 0x7512: 0x0039fc99, 0x7513: 0x0039fc97, + 0x7514: 0x0039fc98, 0x7515: 0x003a129a, 0x7516: 0x003a1299, 0x7517: 0x003a1297, + 0x7518: 0x003a1298, 0x7519: 0x003a1a9a, 0x751a: 0x003a1a99, 0x751b: 0x003a1a97, + 0x751c: 0x003a1a98, 0x751d: 0x003a409a, 0x751e: 0x003a4099, 0x751f: 0x003a4097, + 0x7520: 0x003a4098, 0x7521: 0x003a4e9a, 0x7522: 0x003a4e99, 0x7523: 0x003a4e97, + 0x7524: 0x003a4e98, 0x7525: 0x003a569a, 0x7526: 0x003a5699, 0x7527: 0x003a5697, + 0x7528: 0x003a5698, 0x7529: 0x003a689a, 0x752a: 0x003a6899, 0x752b: 0x003a6897, + 0x752c: 0x003a6898, 0x752d: 0x003a749a, 0x752e: 0x003a7499, 0x752f: 0x003a90a6, + 0x7530: 0x003a90a5, 0x7531: 0x003a909a, 0x7532: 0x003a9099, 0x7533: 0x003a9097, + 0x7534: 0x003a9098, 0x7535: 0xe0001732, 0x7536: 0xe000172f, 0x7537: 0xe0001738, + 0x7538: 0xe0001735, 0x7539: 0xe000173e, 0x753a: 0xe000173b, 0x753b: 0xf0001a1a, + 0x753c: 0xf0001919, 0x753f: 0xa0000000, + // Block 0x1d5, offset 0x7540 + 0x7541: 0x40409a20, 0x7542: 0x40409820, 0x7543: 0x40409c20, + 0x7545: 0x40407c20, 0x7546: 0x40407e20, 0x7547: 0x40408020, + 0x7548: 0x40408220, 0x7549: 0x40408420, 0x754a: 0x40408620, 0x754b: 0x40408820, + 0x754c: 0x40408c20, 0x754f: 0x40409020, + 0x7550: 0x40409220, 0x7553: 0x40409420, + 0x7554: 0x40409620, 0x7555: 0xc33108b1, 0x7556: 0x40409a20, 0x7557: 0x40409c20, + 0x7558: 0x40409e20, 0x7559: 0x4040a020, 0x755a: 0x4040a220, 0x755b: 0x4040a420, + 0x755c: 0x4040a620, 0x755d: 0x4040a820, 0x755e: 0x4040aa20, 0x755f: 0x4040ac20, + 0x7560: 0x4040ae20, 0x7561: 0x4040b020, 0x7562: 0x4040b220, 0x7563: 0x4040b420, + 0x7564: 0xc32f0851, 0x7565: 0x4040b820, 0x7566: 0x4040ba20, 0x7567: 0x4040bc20, + 0x7568: 0x4040be20, 0x756a: 0x4040c020, 0x756b: 0x4040c220, + 0x756c: 0x4040c420, 0x756d: 0x4040c620, 0x756e: 0x4040c820, 0x756f: 0x4040ca20, + 0x7570: 0x4040cc20, 0x7572: 0x4040d020, + 0x7576: 0x4040d420, 0x7577: 0x4040d620, + 0x7578: 0x4040d820, 0x7579: 0x4040da20, + 0x757c: 0xa070f102, 0x757d: 0x4040dc20, 0x757e: 0x4040de20, 0x757f: 0x4040e020, + // Block 0x1d6, offset 0x7580 + 0x7580: 0x4040e220, 0x7581: 0x4040e420, 0x7582: 0x4040e620, 0x7583: 0x4040e820, + 0x7584: 0x4040ea20, 0x7587: 0xc05a0191, + 0x7588: 0x4040f220, 0x758b: 0x4040f420, + 0x758c: 0x4040f620, 0x758d: 0x8209207c, 0x758e: 0x4040b420, + 0x7597: 0x4040fa20, + 0x759c: 0xe000183f, 0x759d: 0xe0001842, 0x759f: 0xe0001848, + 0x75a0: 0x40408a20, 0x75a1: 0x40408e20, 0x75a2: 0x4040ec20, 0x75a3: 0x4040ee20, + 0x75a6: 0xe000016d, 0x75a7: 0xe00001fb, + 0x75a8: 0xe0000316, 0x75a9: 0xe00003f0, 0x75aa: 0xe00004cb, 0x75ab: 0xe0000595, + 0x75ac: 0xe0000660, 0x75ad: 0xe0000708, 0x75ae: 0xe00007b4, 0x75af: 0xe0000859, + 0x75b0: 0x4040ce20, 0x75b1: 0x4040d220, 0x75b2: 0x4027e820, 0x75b3: 0x4027ea20, + 0x75b4: 0x40283020, 0x75b5: 0x40283220, 0x75b6: 0x40283420, 0x75b7: 0x40283620, + 0x75b8: 0x40283820, 0x75b9: 0x40283a20, 0x75ba: 0x40073a20, 0x75bb: 0x4027ec20, + // Block 0x1d7, offset 0x75c0 + 0x75c0: 0xa0000000, 0x75c1: 0xa0000000, 0x75c2: 0xa0000000, 0x75c3: 0xa0000000, + 0x75c4: 0xa0000000, 0x75c5: 0xa0000000, 0x75c6: 0xa0000000, 0x75c7: 0xa0000000, + 0x75c8: 0xa0000000, 0x75c9: 0x40020020, 0x75ca: 0x40020220, 0x75cb: 0x40020420, + 0x75cc: 0x40020620, 0x75cd: 0x40020820, 0x75ce: 0xa0000000, 0x75cf: 0xa0000000, + 0x75d0: 0xa0000000, 0x75d1: 0xa0000000, 0x75d2: 0xa0000000, 0x75d3: 0xa0000000, + 0x75d4: 0xa0000000, 0x75d5: 0xa0000000, 0x75d6: 0xa0000000, 0x75d7: 0xa0000000, + 0x75d8: 0xa0000000, 0x75d9: 0xa0000000, 0x75da: 0xa0000000, 0x75db: 0xa0000000, + 0x75dc: 0xa0000000, 0x75dd: 0xa0000000, 0x75de: 0xa0000000, 0x75df: 0xa0000000, + 0x75e0: 0x40021220, 0x75e1: 0x4002ba20, 0x75e2: 0x4003e020, 0x75e3: 0x4004ea20, + 0x75e4: 0x4027de20, 0x75e5: 0x4004ec20, 0x75e6: 0x4004e620, 0x75e7: 0x4003d220, + 0x75e8: 0x4003f420, 0x75e9: 0x4003f620, 0x75ea: 0x4004d820, 0x75eb: 0x40093820, + 0x75ec: 0x40024020, 0x75ed: 0x40021a20, 0x75ee: 0x4002e420, 0x75ef: 0x4004e220, + 0x75f0: 0x4029cc20, 0x75f1: 0x4029ce20, 0x75f2: 0x4029d020, 0x75f3: 0x4029d220, + 0x75f4: 0x4029d420, 0x75f5: 0x4029d620, 0x75f6: 0x4029d820, 0x75f7: 0x4029da20, + 0x75f8: 0x4029dc20, 0x75f9: 0x4029de20, 0x75fa: 0x40026c20, 0x75fb: 0x40026220, + 0x75fc: 0x40094020, 0x75fd: 0x40094220, 0x75fe: 0x40094420, 0x75ff: 0x4002c420, + // Block 0x1d8, offset 0x7600 + 0x7600: 0x4004d620, 0x7601: 0x002bde88, 0x7602: 0x002c0a88, 0x7603: 0xc3350911, + 0x7604: 0x002c6288, 0x7605: 0x002c9888, 0x7606: 0x002d0888, 0x7607: 0xc33900d1, + 0x7608: 0x002d6888, 0x7609: 0xc33b0931, 0x760a: 0x002dcc88, 0x760b: 0x002dfe88, + 0x760c: 0xc0030002, 0x760d: 0x002e8288, 0x760e: 0x002e9e88, 0x760f: 0xc33f0071, + 0x7610: 0x002f2c88, 0x7611: 0x002e0083, 0x7612: 0x002f7a88, 0x7613: 0xc3430911, + 0x7614: 0x00302c88, 0x7615: 0xc3470071, 0x7616: 0x0030be88, 0x7617: 0x0030e288, + 0x7618: 0x002d6a83, 0x7619: 0x00310088, 0x761a: 0x00312a88, 0x761b: 0x4003f820, + 0x761c: 0x4004e420, 0x761d: 0x4003fa20, 0x761e: 0x40062420, 0x761f: 0x40021620, + 0x7620: 0x40061e20, 0x7621: 0x402bde20, 0x7622: 0x402c0a20, 0x7623: 0xc3330911, + 0x7624: 0x402c6220, 0x7625: 0x402c9820, 0x7626: 0x402d0820, 0x7627: 0xc33700d1, + 0x7628: 0x402d6820, 0x7629: 0x402d9a20, 0x762a: 0x402dcc20, 0x762b: 0x402dfe20, + 0x762c: 0xc0000002, 0x762d: 0x402e8220, 0x762e: 0x402e9e20, 0x762f: 0xc33d0071, + 0x7630: 0x402f2c20, 0x7631: 0x402e0020, 0x7632: 0x402f7a20, 0x7633: 0xc3410911, + 0x7634: 0x40302c20, 0x7635: 0xc3450071, 0x7636: 0x4030be20, 0x7637: 0x4030e220, + 0x7638: 0x402d6a20, 0x7639: 0x40310020, 0x763a: 0x40312a20, 0x763b: 0x4003fc20, + 0x763c: 0x40094820, 0x763d: 0x4003fe20, 0x763e: 0x40094c20, 0x763f: 0xa0000000, + // Block 0x1d9, offset 0x7640 + 0x7640: 0xe00008f5, 0x7641: 0xe00008ef, 0x7642: 0xe0000921, 0x7643: 0xe0000969, + 0x7644: 0xe000095b, 0x7645: 0xe000094d, 0x7646: 0xe00009dd, 0x7647: 0x002c3c83, + 0x7648: 0xe0000ae8, 0x7649: 0xe0000ae2, 0x764a: 0xe0000af4, 0x764b: 0xe0000b20, + 0x764c: 0xe0002918, 0x764d: 0xe0002915, 0x764e: 0xe000291e, 0x764f: 0xe0002924, + 0x7650: 0xe0000ab3, 0x7651: 0xe0000d63, 0x7652: 0xe0000d9a, 0x7653: 0xe0000d94, + 0x7654: 0xe0000da6, 0x7655: 0xe0000de6, 0x7656: 0x002ee483, 0x7657: 0x40093e20, + 0x7658: 0xe0000e12, 0x7659: 0xe0000fe1, 0x765a: 0xe0000fdb, 0x765b: 0xe0000fed, + 0x765c: 0x00306e83, 0x765d: 0xe0001102, 0x765e: 0x00318888, 0x765f: 0xe0000f7b, + 0x7660: 0xe00008f2, 0x7661: 0xe00008ec, 0x7662: 0xe000091e, 0x7663: 0xe0000966, + 0x7664: 0xe0000958, 0x7665: 0xe000094a, 0x7666: 0xe00009d5, 0x7667: 0x402c3c20, + 0x7668: 0xe0000ae5, 0x7669: 0xe0000adf, 0x766a: 0xe0000af1, 0x766b: 0xe0000b1d, + 0x766c: 0xe0000c28, 0x766d: 0xe0000c22, 0x766e: 0xe0000c34, 0x766f: 0xe0000c40, + 0x7670: 0xe0000aad, 0x7671: 0xe0000d60, 0x7672: 0xe0000d97, 0x7673: 0xe0000d91, + 0x7674: 0xe0000da3, 0x7675: 0xe0000de3, 0x7676: 0x402ee420, 0x7677: 0x40093c20, + 0x7678: 0xe0000e0f, 0x7679: 0xe0000fde, 0x767a: 0xe0000fd8, 0x767b: 0xe0000fea, + 0x767c: 0x40306e20, 0x767d: 0xe00010ff, 0x767e: 0x40318820, 0x767f: 0xe0001114, + // Block 0x1da, offset 0x7680 + 0x7680: 0xe0000983, 0x7681: 0xe0000980, 0x7682: 0xe00008fb, 0x7683: 0xe00008f8, + 0x7684: 0xe000097d, 0x7685: 0xe000097a, 0x7686: 0xe0000a38, 0x7687: 0xe0000a35, + 0x7688: 0xe0000a3e, 0x7689: 0xe0000a3b, 0x768a: 0xe0000a4a, 0x768b: 0xe0000a47, + 0x768c: 0xe0000a44, 0x768d: 0xe0000a41, 0x768e: 0xe0000a86, 0x768f: 0xe0000a83, + 0x7690: 0xe0000aaa, 0x7691: 0xe0000aa7, 0x7692: 0xe0000b46, 0x7693: 0xe0000b43, + 0x7694: 0xe0000aee, 0x7695: 0xe0000aeb, 0x7696: 0xe0000b2c, 0x7697: 0xe0000b29, + 0x7698: 0xe0000b40, 0x7699: 0xe0000b3d, 0x769a: 0xe0000b1a, 0x769b: 0xe0000b17, + 0x769c: 0xe0000bb8, 0x769d: 0xe0000bb5, 0x769e: 0x002d2483, 0x769f: 0x402d2420, + 0x76a0: 0xe0000bc4, 0x76a1: 0xe0000bc1, 0x76a2: 0xe0000bca, 0x76a3: 0xe0000bc7, + 0x76a4: 0xe0000bee, 0x76a5: 0xe0000beb, 0x76a6: 0xe0000c1b, 0x76a7: 0xe0000c18, + 0x76a8: 0xe000292b, 0x76a9: 0xe0000c4e, 0x76aa: 0xe0002931, 0x76ab: 0xe0000c5d, + 0x76ac: 0xe000291b, 0x76ad: 0xe0000c2e, 0x76ae: 0xe000292e, 0x76af: 0xe0000c57, + 0x76b0: 0x002d9a83, 0x76b1: 0x402d9820, 0x76b2: 0xe00027e2, 0x76b3: 0xf0000404, + 0x76b4: 0xe0000c8a, 0x76b5: 0xe0000c87, 0x76b6: 0xe0000c9f, 0x76b7: 0xe0000c9c, + 0x76b8: 0x402f7220, 0x76b9: 0xe0000ccc, 0x76ba: 0xe0000cc9, 0x76bb: 0xe0000cd8, + 0x76bc: 0xe0000cd5, 0x76bd: 0xe0000cd2, 0x76be: 0xe0000ccf, 0x76bf: 0xe0000d04, + // Block 0x1db, offset 0x76c0 + 0x76c0: 0xe0000cfe, 0x76c1: 0xe0000cf8, 0x76c2: 0xe0000cf5, 0x76c3: 0xe0000d51, + 0x76c4: 0xe0000d4e, 0x76c5: 0xe0000d6f, 0x76c6: 0xe0000d6c, 0x76c7: 0xe0000d5d, + 0x76c8: 0xe0000d5a, 0x76c9: 0xf0000404, 0x76ca: 0x002eda88, 0x76cb: 0x402eda20, + 0x76cc: 0xe0000e2e, 0x76cd: 0xe0000e2b, 0x76ce: 0xe0000da0, 0x76cf: 0xe0000d9d, + 0x76d0: 0xe0000de0, 0x76d1: 0xe0000ddd, 0x76d2: 0xe0000e93, 0x76d3: 0xe0000e8f, + 0x76d4: 0xe0000eca, 0x76d5: 0xe0000ec7, 0x76d6: 0xe0000edc, 0x76d7: 0xe0000ed9, + 0x76d8: 0xe0000ed0, 0x76d9: 0xe0000ecd, 0x76da: 0xe0000f1f, 0x76db: 0xe0000f1c, + 0x76dc: 0xe0000f2d, 0x76dd: 0xe0000f2a, 0x76de: 0x002fe883, 0x76df: 0x402fe820, + 0x76e0: 0xe0000f33, 0x76e1: 0xe0000f30, 0x76e2: 0xe0000f99, 0x76e3: 0xe0000f96, + 0x76e4: 0xe0000f8a, 0x76e5: 0xe0000f87, 0x76e6: 0x00303688, 0x76e7: 0x40303620, + 0x76e8: 0xe000102b, 0x76e9: 0xe0001028, 0x76ea: 0xe000103f, 0x76eb: 0xe000103c, + 0x76ec: 0xe0000fe7, 0x76ed: 0xe0000fe4, 0x76ee: 0xe0000ff9, 0x76ef: 0xe0000ff6, + 0x76f0: 0xe0001025, 0x76f1: 0xe0001022, 0x76f2: 0xe0001039, 0x76f3: 0xe0001036, + 0x76f4: 0xe00010d8, 0x76f5: 0xe00010d5, 0x76f6: 0xe000110e, 0x76f7: 0xe000110b, + 0x76f8: 0xe0001117, 0x76f9: 0xe000113b, 0x76fa: 0xe0001138, 0x76fb: 0xe000114d, + 0x76fc: 0xe000114a, 0x76fd: 0xe0001147, 0x76fe: 0xe0001144, 0x76ff: 0xe0000f64, + // Block 0x1dc, offset 0x7700 + 0x7700: 0x402c1a20, 0x7701: 0x002c2a88, 0x7702: 0x002c3288, 0x7703: 0x402c3220, + 0x7704: 0x0031c488, 0x7705: 0x4031c420, 0x7706: 0x002efa88, 0x7707: 0x002c4e88, + 0x7708: 0x402c4e20, 0x7709: 0x002c7288, 0x770a: 0x002c7a88, 0x770b: 0x002c8488, + 0x770c: 0x402c8420, 0x770d: 0xe000115c, 0x770e: 0x002cae88, 0x770f: 0x002c9a83, + 0x7710: 0x002cc288, 0x7711: 0x002d1688, 0x7712: 0x402d1620, 0x7713: 0x002d4488, + 0x7714: 0x002d5888, 0x7715: 0x402d7820, 0x7716: 0x002dc288, 0x7717: 0x002db688, + 0x7718: 0x002e0a88, 0x7719: 0x402e0a20, 0x771a: 0x402e3820, 0x771b: 0x402e7220, + 0x771c: 0x0030a088, 0x771d: 0x002eb488, 0x771e: 0x402ebc20, 0x771f: 0x002f1088, + 0x7720: 0xe0000e56, 0x7721: 0xe0000e53, 0x7722: 0x002d6088, 0x7723: 0x402d6020, + 0x7724: 0x002f3e88, 0x7725: 0x402f3e20, 0x7726: 0x002f8288, 0x7727: 0x0031b488, + 0x7728: 0x4031b420, 0x7729: 0x00300888, 0x772a: 0x40301220, 0x772b: 0x40304220, + 0x772c: 0x00304a88, 0x772d: 0x40304a20, 0x772e: 0x00305288, 0x772f: 0xe000105f, + 0x7730: 0xe000105c, 0x7731: 0x0030b488, 0x7732: 0x0030cc88, 0x7733: 0x00311888, + 0x7734: 0x40311820, 0x7735: 0x00313488, 0x7736: 0x40313420, 0x7737: 0x00316488, + 0x7738: 0x00316e88, 0x7739: 0x40316e20, 0x773a: 0x40317820, 0x773b: 0x4031a620, + 0x773c: 0x0031bc88, 0x773d: 0x4031bc20, 0x773e: 0xe0000fc9, 0x773f: 0x40319420, + // Block 0x1dd, offset 0x7740 + 0x7740: 0x40321220, 0x7741: 0x40321a20, 0x7742: 0x40322220, 0x7743: 0x40322a20, + 0x7744: 0xe0000ad5, 0x7745: 0xe0000ad1, 0x7746: 0xe0000acd, 0x7747: 0xf0000a0a, + 0x7748: 0xf000040a, 0x7749: 0xf0000404, 0x774a: 0xf0000a0a, 0x774b: 0xf000040a, + 0x774c: 0xf0000404, 0x774d: 0xe0000947, 0x774e: 0xe0000944, 0x774f: 0xe0002921, + 0x7750: 0xe0000c3a, 0x7751: 0xe0000dcc, 0x7752: 0xe0000dc9, 0x7753: 0xe0000ff3, + 0x7754: 0xe0000ff0, 0x7755: 0xe0002964, 0x7756: 0xe0002961, 0x7757: 0xe0002952, + 0x7758: 0xe000294f, 0x7759: 0xe000295e, 0x775a: 0xe000295b, 0x775b: 0xe0002958, + 0x775c: 0xe0002955, 0x775d: 0x402cae20, 0x775e: 0xe0000962, 0x775f: 0xe000095e, + 0x7760: 0xe0000976, 0x7761: 0xe0000972, 0x7762: 0xe00009f4, 0x7763: 0xe00009ef, + 0x7764: 0x002d3a88, 0x7765: 0x402d3a20, 0x7766: 0xe0000bbe, 0x7767: 0xe0000bbb, + 0x7768: 0xe0000c99, 0x7769: 0xe0000c96, 0x776a: 0xe0000e20, 0x776b: 0xe0000e1d, + 0x776c: 0xe0000e27, 0x776d: 0xe0000e23, 0x776e: 0xe0001162, 0x776f: 0xe000115f, + 0x7770: 0xe0000c8d, 0x7771: 0xf0000a0a, 0x7772: 0xf000040a, 0x7773: 0xf0000404, + 0x7774: 0xe0000bac, 0x7775: 0xe0000ba9, 0x7776: 0x002d7888, 0x7777: 0x00319488, + 0x7778: 0xe0000d57, 0x7779: 0xe0000d54, 0x777a: 0xe0000954, 0x777b: 0xe0000950, + 0x777c: 0xe00009ea, 0x777d: 0xe00009e5, 0x777e: 0xe0000e19, 0x777f: 0xe0000e15, + // Block 0x1de, offset 0x7780 + 0x7780: 0xe000098f, 0x7781: 0xe000098c, 0x7782: 0xe0000995, 0x7783: 0xe0000992, + 0x7784: 0xe0000b62, 0x7785: 0xe0000b5f, 0x7786: 0xe0000b68, 0x7787: 0xe0000b65, + 0x7788: 0xe0002937, 0x7789: 0xe0000c69, 0x778a: 0xe000293a, 0x778b: 0xe0000c6f, + 0x778c: 0xe0000e4a, 0x778d: 0xe0000e47, 0x778e: 0xe0000e50, 0x778f: 0xe0000e4d, + 0x7790: 0xe0000ee8, 0x7791: 0xe0000ee5, 0x7792: 0xe0000eee, 0x7793: 0xe0000eeb, + 0x7794: 0xe0001053, 0x7795: 0xe0001050, 0x7796: 0xe0001059, 0x7797: 0xe0001056, + 0x7798: 0xe0000f61, 0x7799: 0xe0000f5e, 0x779a: 0xe0000fa5, 0x779b: 0xe0000fa2, + 0x779c: 0x00312288, 0x779d: 0x40312220, 0x779e: 0xe0000bf4, 0x779f: 0xe0000bf1, + 0x77a0: 0x002ebc88, 0x77a1: 0x402c8c20, 0x77a2: 0x002f2288, 0x77a3: 0x402f2220, + 0x77a4: 0x00314088, 0x77a5: 0x40314020, 0x77a6: 0xe000096f, 0x77a7: 0xe000096c, + 0x77a8: 0xe0000b32, 0x77a9: 0xe0000b2f, 0x77aa: 0xe000294c, 0x77ab: 0xe0002949, + 0x77ac: 0xe0000dfd, 0x77ad: 0xe0000df9, 0x77ae: 0xe0000e04, 0x77af: 0xe0000e01, + 0x77b0: 0xe0000e0b, 0x77b1: 0xe0000e07, 0x77b2: 0xe0001129, 0x77b3: 0xe0001126, + 0x77b4: 0x402e5e20, 0x77b5: 0x402ed020, 0x77b6: 0x40305a20, 0x77b7: 0x402dd420, + 0x77b8: 0xe0000abf, 0x77b9: 0xe0000ec4, 0x77ba: 0x002be888, 0x77bb: 0x002c4488, + 0x77bc: 0x402c4420, 0x77bd: 0x002e3888, 0x77be: 0x00303e88, 0x77bf: 0x402ffc20, + // Block 0x1df, offset 0x77c0 + 0x77c0: 0x40315820, 0x77c1: 0x0031d488, 0x77c2: 0x4031d420, 0x77c3: 0x002c1a88, + 0x77c4: 0x00307c88, 0x77c5: 0x0030da88, 0x77c6: 0x002ca288, 0x77c7: 0x402ca220, + 0x77c8: 0x002dde88, 0x77c9: 0x402dde20, 0x77ca: 0x002f6a88, 0x77cb: 0x402f6a20, + 0x77cc: 0x002f8e88, 0x77cd: 0x402f8e20, 0x77ce: 0x00311088, 0x77cf: 0x40311020, + 0x77d0: 0x402bf020, 0x77d1: 0x402bf820, 0x77d2: 0x402c0220, 0x77d3: 0x402c2a20, + 0x77d4: 0x402efa20, 0x77d5: 0x402c5620, 0x77d6: 0x402c7220, 0x77d7: 0x402c7a20, + 0x77d8: 0x402ccc20, 0x77d9: 0x402c9a20, 0x77da: 0x402cd420, 0x77db: 0x402cc220, + 0x77dc: 0x402cdc20, 0x77dd: 0x402ce820, 0x77de: 0x402cf020, 0x77df: 0x402dee20, + 0x77e0: 0x402d4420, 0x77e1: 0x402d2a20, 0x77e2: 0x402d3220, 0x77e3: 0x402d5820, + 0x77e4: 0x402d0020, 0x77e5: 0x40308820, 0x77e6: 0x402d8020, 0x77e7: 0x402d8e20, + 0x77e8: 0x402db620, 0x77e9: 0x402dc220, 0x77ea: 0x402daa20, 0x77eb: 0x402e4220, + 0x77ec: 0x402e4a20, 0x77ed: 0x402e5420, 0x77ee: 0x402e6820, 0x77ef: 0x4030a020, + 0x77f0: 0x4030ac20, 0x77f1: 0x402e9020, 0x77f2: 0x402eb420, 0x77f3: 0x402ec820, + 0x77f4: 0x402ea620, 0x77f5: 0x402f1020, 0x77f6: 0x402eee20, 0x77f7: 0x402f1a20, + 0x77f8: 0x402f4c20, 0x77f9: 0x402f9820, 0x77fa: 0x402fa220, 0x77fb: 0x402fac20, + 0x77fc: 0x402fb620, 0x77fd: 0x402fbe20, 0x77fe: 0x402fc620, 0x77ff: 0x402fd020, + // Block 0x1e0, offset 0x7800 + 0x7800: 0xe00009b1, 0x7801: 0xe00009ae, 0x7802: 0xe0000a22, 0x7803: 0xe0000a1f, + 0x7804: 0xe0000a28, 0x7805: 0xe0000a25, 0x7806: 0xe0000a2e, 0x7807: 0xe0000a2b, + 0x7808: 0xe000260e, 0x7809: 0xe000260b, 0x780a: 0xe0000a8c, 0x780b: 0xe0000a89, + 0x780c: 0xe0000a98, 0x780d: 0xe0000a95, 0x780e: 0xe0000aa4, 0x780f: 0xe0000aa1, + 0x7810: 0xe0000a92, 0x7811: 0xe0000a8f, 0x7812: 0xe0000a9e, 0x7813: 0xe0000a9b, + 0x7814: 0xe0000b55, 0x7815: 0xe0000b51, 0x7816: 0xe0000b4d, 0x7817: 0xe0000b49, + 0x7818: 0xe0000b7c, 0x7819: 0xe0000b79, 0x781a: 0xe0000b82, 0x781b: 0xe0000b7f, + 0x781c: 0xe0000b39, 0x781d: 0xe0000b35, 0x781e: 0xe0000b8c, 0x781f: 0xe0000b89, + 0x7820: 0xe0000bd0, 0x7821: 0xe0000bcd, 0x7822: 0xe0000c00, 0x7823: 0xe0000bfd, + 0x7824: 0xe0000c0c, 0x7825: 0xe0000c09, 0x7826: 0xe0000bfa, 0x7827: 0xe0000bf7, + 0x7828: 0xe0000c06, 0x7829: 0xe0000c03, 0x782a: 0xe0000c12, 0x782b: 0xe0000c0f, + 0x782c: 0xe0002940, 0x782d: 0xe0000c7b, 0x782e: 0xe0002927, 0x782f: 0xe0000c46, + 0x7830: 0xe0000c93, 0x7831: 0xe0000c90, 0x7832: 0xe0000cab, 0x7833: 0xe0000ca8, + 0x7834: 0xe0000cb1, 0x7835: 0xe0000cae, 0x7836: 0xe0000cde, 0x7837: 0xe0000cdb, + 0x7838: 0xe0000ce5, 0x7839: 0xe0000ce1, 0x783a: 0xe0000cf2, 0x783b: 0xe0000cef, + 0x783c: 0xe0000cec, 0x783d: 0xe0000ce9, 0x783e: 0xe0000d1e, 0x783f: 0xe0000d1b, + // Block 0x1e1, offset 0x7840 + 0x7840: 0xe0000d24, 0x7841: 0xe0000d21, 0x7842: 0xe0000d2a, 0x7843: 0xe0000d27, + 0x7844: 0xe0000d69, 0x7845: 0xe0000d66, 0x7846: 0xe0000d7b, 0x7847: 0xe0000d78, + 0x7848: 0xe0000d87, 0x7849: 0xe0000d84, 0x784a: 0xe0000d81, 0x784b: 0xe0000d7e, + 0x784c: 0xe0000ded, 0x784d: 0xe0000de9, 0x784e: 0xe0002946, 0x784f: 0xe0002943, + 0x7850: 0xe0000e3d, 0x7851: 0xe0000e39, 0x7852: 0xe0000e35, 0x7853: 0xe0000e31, + 0x7854: 0xe0000ea7, 0x7855: 0xe0000ea4, 0x7856: 0xe0000ead, 0x7857: 0xe0000eaa, + 0x7858: 0xe0000ed6, 0x7859: 0xe0000ed3, 0x785a: 0xe0000ef4, 0x785b: 0xe0000ef1, + 0x785c: 0xe0000efb, 0x785d: 0xe0000ef7, 0x785e: 0xe0000f02, 0x785f: 0xe0000eff, + 0x7860: 0xe0000f41, 0x7861: 0xe0000f3e, 0x7862: 0xe0000f53, 0x7863: 0xe0000f50, + 0x7864: 0xe0000f26, 0x7865: 0xe0000f22, 0x7866: 0xe0000f3a, 0x7867: 0xe0000f36, + 0x7868: 0xe0000f5a, 0x7869: 0xe0000f56, 0x786a: 0xe0000f93, 0x786b: 0xe0000f90, + 0x786c: 0xe0000f9f, 0x786d: 0xe0000f9c, 0x786e: 0xe0000fb1, 0x786f: 0xe0000fae, + 0x7870: 0xe0000fab, 0x7871: 0xe0000fa8, 0x7872: 0xe0001093, 0x7873: 0xe0001090, + 0x7874: 0xe000109f, 0x7875: 0xe000109c, 0x7876: 0xe0001099, 0x7877: 0xe0001096, + 0x7878: 0xe0001032, 0x7879: 0xe000102e, 0x787a: 0xe0002964, 0x787b: 0xe0002961, + 0x787c: 0xe00010a9, 0x787d: 0xe00010a6, 0x787e: 0xe00010af, 0x787f: 0xe00010ac, + // Block 0x1e2, offset 0x7880 + 0x7880: 0xe00010d2, 0x7881: 0xe00010cf, 0x7882: 0xe00010cc, 0x7883: 0xe00010c9, + 0x7884: 0xe00010e1, 0x7885: 0xe00010de, 0x7886: 0xe00010e7, 0x7887: 0xe00010e4, + 0x7888: 0xe00010ed, 0x7889: 0xe00010ea, 0x788a: 0xe0002912, 0x788b: 0xe000290f, + 0x788c: 0xe000290c, 0x788d: 0xe0002909, 0x788e: 0xe0001123, 0x788f: 0xe0001120, + 0x7890: 0xe0001141, 0x7891: 0xe000113e, 0x7892: 0xe0001153, 0x7893: 0xe0001150, + 0x7894: 0xe0001159, 0x7895: 0xe0001156, 0x7896: 0xe0000c15, 0x7897: 0xe0000f8d, + 0x7898: 0xe00010db, 0x7899: 0xe0001111, 0x789a: 0xf0000404, 0x789b: 0xe0000f70, + 0x789c: 0x40300420, 0x789d: 0x40300620, 0x789e: 0xe0000f7f, 0x789f: 0x402c9620, + 0x78a0: 0xe000099b, 0x78a1: 0xe0000998, 0x78a2: 0xe0000989, 0x78a3: 0xe0000986, + 0x78a4: 0xe0000928, 0x78a5: 0xe0000924, 0x78a6: 0xe0000930, 0x78a7: 0xe000092c, + 0x78a8: 0xe0000940, 0x78a9: 0xe000093c, 0x78aa: 0xe0000938, 0x78ab: 0xe0000934, + 0x78ac: 0xe00009aa, 0x78ad: 0xe00009a6, 0x78ae: 0xe0000902, 0x78af: 0xe00008fe, + 0x78b0: 0xe000090a, 0x78b1: 0xe0000906, 0x78b2: 0xe000091a, 0x78b3: 0xe0000916, + 0x78b4: 0xe0000912, 0x78b5: 0xe000090e, 0x78b6: 0xe00009a2, 0x78b7: 0xe000099e, + 0x78b8: 0xe0000b6e, 0x78b9: 0xe0000b6b, 0x78ba: 0xe0000b5c, 0x78bb: 0xe0000b59, + 0x78bc: 0xe0000b26, 0x78bd: 0xe0000b23, 0x78be: 0xe0000afb, 0x78bf: 0xe0000af7, + // Block 0x1e3, offset 0x78c0 + 0x78c0: 0xe0000b03, 0x78c1: 0xe0000aff, 0x78c2: 0xe0000b13, 0x78c3: 0xe0000b0f, + 0x78c4: 0xe0000b0b, 0x78c5: 0xe0000b07, 0x78c6: 0xe0000b75, 0x78c7: 0xe0000b71, + 0x78c8: 0xe0002934, 0x78c9: 0xe0000c63, 0x78ca: 0xe000293d, 0x78cb: 0xe0000c75, + 0x78cc: 0xe0000e84, 0x78cd: 0xe0000e81, 0x78ce: 0xe0000e44, 0x78cf: 0xe0000e41, + 0x78d0: 0xe0000dad, 0x78d1: 0xe0000da9, 0x78d2: 0xe0000db5, 0x78d3: 0xe0000db1, + 0x78d4: 0xe0000dc5, 0x78d5: 0xe0000dc1, 0x78d6: 0xe0000dbd, 0x78d7: 0xe0000db9, + 0x78d8: 0xe0000e8b, 0x78d9: 0xe0000e87, 0x78da: 0xe0000e5d, 0x78db: 0xe0000e59, + 0x78dc: 0xe0000e65, 0x78dd: 0xe0000e61, 0x78de: 0xe0000e75, 0x78df: 0xe0000e71, + 0x78e0: 0xe0000e6d, 0x78e1: 0xe0000e69, 0x78e2: 0xe0000e7d, 0x78e3: 0xe0000e79, + 0x78e4: 0xe000108d, 0x78e5: 0xe000108a, 0x78e6: 0xe000104d, 0x78e7: 0xe000104a, + 0x78e8: 0xe0001066, 0x78e9: 0xe0001062, 0x78ea: 0xe000106e, 0x78eb: 0xe000106a, + 0x78ec: 0xe000107e, 0x78ed: 0xe000107a, 0x78ee: 0xe0001076, 0x78ef: 0xe0001072, + 0x78f0: 0xe0001086, 0x78f1: 0xe0001082, 0x78f2: 0xe0001108, 0x78f3: 0xe0001105, + 0x78f4: 0xe0001135, 0x78f5: 0xe0001132, 0x78f6: 0xe000112f, 0x78f7: 0xe000112c, + 0x78f8: 0xe000111d, 0x78f9: 0xe000111a, 0x78fa: 0xe0000d0a, 0x78fb: 0xe0000d07, + 0x78fc: 0x0030d888, 0x78fd: 0x4030d820, 0x78fe: 0x00312088, 0x78ff: 0x40312020, + // Block 0x1e4, offset 0x7900 + 0x7900: 0x00093685, 0x7901: 0x40083620, 0x7902: 0x40083820, 0x7903: 0x40083a20, + 0x7904: 0x40083c20, 0x7905: 0x002c628b, 0x7906: 0x002c6285, 0x7907: 0x002c9885, + 0x7908: 0x002d9a85, 0x7909: 0x002dcc85, 0x790a: 0x40083e20, 0x790b: 0x400a6e20, + 0x790c: 0x40084020, 0x790d: 0xe00009c4, 0x790e: 0x402d1e20, 0x790f: 0x40084220, + 0x7910: 0xe00002cb, 0x7911: 0xe00002d3, 0x7912: 0xe00002b2, 0x7913: 0xe00002bb, + 0x7914: 0xe00003cd, 0x7915: 0xe00002c3, 0x7916: 0xe00003d1, 0x7917: 0xe00004ab, + 0x7918: 0xe0000579, 0x7919: 0xe00002c7, 0x791a: 0xe0000640, 0x791b: 0xe00002cf, + 0x791c: 0xe00004af, 0x791d: 0xe0000644, 0x791e: 0xe0000798, 0x791f: 0xf0001e1e, + 0x7920: 0x002d9a8a, 0x7921: 0xe00027d4, 0x7922: 0xe00027db, 0x7923: 0xe00027ee, + 0x7924: 0x0030be8a, 0x7925: 0xe0002848, 0x7926: 0xe000284f, 0x7927: 0xe00010bb, + 0x7928: 0xe00027f4, 0x7929: 0x0030f68a, 0x792a: 0xe0002883, 0x792b: 0xe000288a, + 0x792c: 0x002e228a, 0x792d: 0x002c3a8a, 0x792e: 0x002c628a, 0x792f: 0x002e828a, + 0x7930: 0x002d9a84, 0x7931: 0xf0001f04, 0x7932: 0xf0000404, 0x7933: 0xf0001f04, + 0x7934: 0x0030be84, 0x7935: 0xf0001f04, 0x7936: 0xf0000404, 0x7937: 0xe00010b6, + 0x7938: 0xe00027f1, 0x7939: 0x0030f684, 0x793a: 0xe0002880, 0x793b: 0xe0002886, + 0x793c: 0x002e2284, 0x793d: 0x002c3a84, 0x793e: 0x002c6284, 0x793f: 0x002e8284, + // Block 0x1e5, offset 0x7940 + 0x7940: 0xe0000024, 0x7941: 0xe0000029, 0x7942: 0xe000002e, 0x7943: 0xe0000033, + 0x7944: 0xe0000038, 0x7945: 0xe000003d, 0x7946: 0xe0000042, 0x7947: 0xe0000047, + 0x7948: 0xf0001f04, 0x7949: 0xf0001f04, 0x794a: 0xf0001f04, 0x794b: 0xf0001f04, + 0x794c: 0xf0001f04, 0x794d: 0xf0001f04, 0x794e: 0xf0001f04, 0x794f: 0xf0001f04, + 0x7950: 0xf0001f04, 0x7951: 0xf0000404, 0x7952: 0xf0000404, 0x7953: 0xf0000404, + 0x7954: 0xf0000404, 0x7955: 0xf0000404, 0x7956: 0xf0000404, 0x7957: 0xf0000404, + 0x7958: 0xf0000404, 0x7959: 0xf0000404, 0x795a: 0xf0000404, 0x795b: 0xf0000404, + 0x795c: 0xf0000404, 0x795d: 0xf0000404, 0x795e: 0xf0000404, 0x795f: 0xf0000404, + 0x7960: 0xf0000404, 0x7961: 0xf0000404, 0x7962: 0xf0000404, 0x7963: 0xf0000404, + 0x7964: 0xf0000404, 0x7965: 0xf0000404, 0x7966: 0xf0000404, 0x7967: 0xf0000404, + 0x7968: 0xf0000404, 0x7969: 0xf0000404, 0x796a: 0xf0000404, 0x796b: 0xf0000404, + 0x796c: 0xe00024c7, 0x796d: 0xf0000404, 0x796e: 0xf0000404, 0x796f: 0xf0000404, + 0x7970: 0xf0000404, 0x7971: 0xf0000404, 0x7972: 0xf0000404, 0x7973: 0xe00024e7, + 0x7974: 0xf0000404, 0x7975: 0xf0000404, 0x7976: 0x002bde8c, 0x7977: 0x002c0a8c, + 0x7978: 0x002c3a8c, 0x7979: 0x002c628c, 0x797a: 0x002c988c, 0x797b: 0x002d088c, + 0x797c: 0x002d228c, 0x797d: 0x002d688c, 0x797e: 0x002d9a8c, 0x797f: 0x002dcc8c, + // Block 0x1e6, offset 0x7980 + 0x7980: 0xe000230b, 0x7981: 0xe00022f8, 0x7982: 0xe00022fc, 0x7983: 0xe0002311, + 0x7984: 0xe0002316, 0x7985: 0xe000231d, 0x7986: 0xe0002321, 0x7987: 0xe0002325, + 0x7988: 0xe000232b, 0x7989: 0xf0001c1c, 0x798a: 0xe0002330, 0x798b: 0xe000233c, + 0x798c: 0xe0002340, 0x798d: 0xe0002337, 0x798e: 0xe0002346, 0x798f: 0xe000234b, + 0x7990: 0xe000234f, 0x7991: 0xe0002353, 0x7992: 0xf0001c1c, 0x7993: 0xe000235e, + 0x7994: 0xe0002358, 0x7995: 0xf0001c1c, 0x7996: 0xe0002363, 0x7997: 0xe000236d, + 0x7998: 0xf0001f04, 0x7999: 0xf0001f04, 0x799a: 0xf0001f04, 0x799b: 0xf0001f04, + 0x799c: 0xf0001f04, 0x799d: 0xf0001f04, 0x799e: 0xf0001f04, 0x799f: 0xf0001f04, + 0x79a0: 0xf0001f04, 0x79a1: 0xf0001f04, 0x79a2: 0xf0000404, 0x79a3: 0xf0000404, + 0x79a4: 0xf0000404, 0x79a5: 0xf0000404, 0x79a6: 0xf0000404, 0x79a7: 0xf0000404, + 0x79a8: 0xf0000404, 0x79a9: 0xf0000404, 0x79aa: 0xf0000404, 0x79ab: 0xf0000404, + 0x79ac: 0xf0000404, 0x79ad: 0xf0000404, 0x79ae: 0xf0000404, 0x79af: 0xf0000404, + 0x79b0: 0xf0000404, 0x79b1: 0xe0000c1e, 0x79b2: 0xf0001c1c, 0x79b3: 0xf0001d1d, + 0x79b4: 0xe0000a31, 0x79b5: 0xf0001d1c, 0x79b6: 0xf0001c1c, 0x79b7: 0xf0001c1c, + 0x79b8: 0xe0000ac2, 0x79b9: 0xe0000ac6, 0x79ba: 0xe00027e8, 0x79bb: 0xf0001c1c, + 0x79bc: 0xf0001c1c, 0x79bd: 0xf0001c1c, 0x79be: 0xf0001c1c, 0x79bf: 0xe0002431, + // Block 0x1e7, offset 0x79c0 + 0x79c0: 0xf0001d1c, 0x79c1: 0xf0001d1d, 0x79c2: 0xe00009b7, 0x79c3: 0xe00024f3, + 0x79c4: 0xf0001c1c, 0x79c5: 0xf0001c1c, 0x79c6: 0xe0000a66, 0x79c7: 0xe0000a7a, + 0x79c8: 0xf0001d1c, 0x79c9: 0xf0001c1d, 0x79ca: 0xf0001c1c, 0x79cb: 0xf0001d1d, + 0x79cc: 0xf0001c1c, 0x79cd: 0xf0001d1d, 0x79ce: 0xf0001d1d, 0x79cf: 0xf0001c1c, + 0x79d0: 0xf0001c1c, 0x79d1: 0xf0001c1c, 0x79d2: 0xe0000d0d, 0x79d3: 0xe0002818, + 0x79d4: 0xf0001c1c, 0x79d5: 0xe0000d3a, 0x79d6: 0xe0000d46, 0x79d7: 0xf0001d1d, + 0x79d8: 0xe0000eb0, 0x79d9: 0xe0000eb8, 0x79da: 0xf0001d1d, 0x79db: 0xf0001c1c, + 0x79dc: 0xf0001c1d, 0x79dd: 0xf0001c1d, 0x79de: 0xe00010b2, 0x79df: 0xe00009c8, + 0x79e0: 0xf0001f04, 0x79e1: 0xf0001f04, 0x79e2: 0xf0001f04, 0x79e3: 0xf0001f04, + 0x79e4: 0xf0001f04, 0x79e5: 0xf0001f04, 0x79e6: 0xf0001f04, 0x79e7: 0xf0001f04, + 0x79e8: 0xf0001f04, 0x79e9: 0xf0000404, 0x79ea: 0xf0000404, 0x79eb: 0xf0000404, + 0x79ec: 0xf0000404, 0x79ed: 0xf0000404, 0x79ee: 0xf0000404, 0x79ef: 0xf0000404, + 0x79f0: 0xf0000404, 0x79f1: 0xf0000404, 0x79f2: 0xf0000404, 0x79f3: 0xf0000404, + 0x79f4: 0xf0000404, 0x79f5: 0xf0000404, 0x79f6: 0xf0000404, 0x79f7: 0xf0000404, + 0x79f8: 0xf0000404, 0x79f9: 0xf0000404, 0x79fa: 0xf0000404, 0x79fb: 0xf0000404, + 0x79fc: 0xf0000404, 0x79fd: 0xf0000404, 0x79fe: 0xf0000404, 0x79ff: 0xe0000bdf, + // Block 0x1e8, offset 0x7a00 + 0x7a00: 0xf0001f04, 0x7a01: 0xf0001f04, 0x7a02: 0xf0001f04, 0x7a03: 0xf0001f04, + 0x7a04: 0xf0001f04, 0x7a05: 0xf0001f04, 0x7a06: 0xf0001f04, 0x7a07: 0xf0001f04, + 0x7a08: 0xf0001f04, 0x7a09: 0xf0001f04, 0x7a0a: 0xf0001f04, + 0x7a10: 0xf0000a04, 0x7a11: 0xf0000a04, 0x7a12: 0xf0000a04, 0x7a13: 0xf0000a04, + 0x7a14: 0xf0000a04, 0x7a15: 0xf0000a04, 0x7a16: 0xf0000a04, 0x7a17: 0xf0000a04, + 0x7a18: 0xe00024b3, 0x7a19: 0xf0000a04, 0x7a1a: 0xf0000a04, 0x7a1b: 0xf0000a04, + 0x7a1c: 0xf0000a04, 0x7a1d: 0xf0000a04, 0x7a1e: 0xf0000a04, 0x7a1f: 0xf0000a04, + 0x7a20: 0xe00024cb, 0x7a21: 0xf0000a04, 0x7a22: 0xf0000a04, 0x7a23: 0xf0000a04, + 0x7a24: 0xf0000a04, 0x7a25: 0xf0000a04, 0x7a26: 0xf0000a04, 0x7a27: 0xe00024eb, + 0x7a28: 0xf0000a04, 0x7a29: 0xf0000a04, 0x7a2a: 0xf0000a04, 0x7a2b: 0x002c3a8c, + 0x7a2c: 0x002f7a8c, 0x7a2d: 0xf0000c0c, 0x7a2e: 0xf0000c0c, + 0x7a30: 0x002bde9d, 0x7a31: 0x002c0a9d, 0x7a32: 0x002c3a9d, 0x7a33: 0x002c629d, + 0x7a34: 0x002c989d, 0x7a35: 0x002d089d, 0x7a36: 0x002d229d, 0x7a37: 0x002d689d, + 0x7a38: 0x002d9a9d, 0x7a39: 0x002dcc9d, 0x7a3a: 0x002dfe9d, 0x7a3b: 0x002e229d, + 0x7a3c: 0x002e829d, 0x7a3d: 0x002e9e9d, 0x7a3e: 0x002ee29d, 0x7a3f: 0x002f2c9d, + // Block 0x1e9, offset 0x7a40 + 0x7a40: 0xe00014bd, 0x7a41: 0x0033b483, 0x7a42: 0x00339688, 0x7a43: 0x0033a288, + 0x7a44: 0x0033c288, 0x7a45: 0x0033fc88, 0x7a46: 0xc02a0071, 0x7a47: 0x00343688, + 0x7a48: 0x00344688, 0x7a49: 0x00349a88, 0x7a4a: 0x0034e488, 0x7a4b: 0x00356288, + 0x7a4c: 0x00356a88, 0x7a4d: 0xe00014cf, 0x7a4e: 0x00357a88, 0x7a4f: 0x00365488, + 0x7a50: 0xc0090041, 0x7a51: 0x00335288, 0x7a52: 0x00335a88, 0x7a53: 0xc0130092, + 0x7a54: 0x00338a88, 0x7a55: 0xc34c0041, 0x7a56: 0xc01c0071, 0x7a57: 0xc0200071, + 0x7a58: 0xc0250041, 0x7a59: 0x00343e88, 0x7a5a: 0xc0370092, 0x7a5b: 0x00348488, + 0x7a5c: 0x0034a888, 0x7a5d: 0x0034ba88, 0x7a5e: 0xc02e0071, 0x7a5f: 0x00350e88, + 0x7a60: 0x00352888, 0x7a61: 0x00353a88, 0x7a62: 0x00354c88, 0x7a63: 0xc03e00f1, + 0x7a64: 0x0035ac88, 0x7a65: 0x0035b488, 0x7a66: 0x00360288, 0x7a67: 0xc0440071, + 0x7a68: 0x00365c88, 0x7a69: 0x00366688, 0x7a6a: 0x00367488, 0x7a6b: 0xc0480071, + 0x7a6c: 0x00368e88, 0x7a6d: 0xc04c0071, 0x7a6e: 0x0036b888, 0x7a6f: 0x0036c488, + 0x7a70: 0xc0060041, 0x7a71: 0x40335220, 0x7a72: 0x40335a20, 0x7a73: 0xc0100092, + 0x7a74: 0x40338a20, 0x7a75: 0xc3490041, 0x7a76: 0xc01a0071, 0x7a77: 0xc01e0071, + 0x7a78: 0xc0220041, 0x7a79: 0x40343e20, 0x7a7a: 0xc0340092, 0x7a7b: 0x40348420, + 0x7a7c: 0x4034a820, 0x7a7d: 0x4034ba20, 0x7a7e: 0xc02c0071, 0x7a7f: 0x40350e20, + // Block 0x1ea, offset 0x7a80 + 0x7a80: 0x40352820, 0x7a81: 0x40353a20, 0x7a82: 0x40354c20, 0x7a83: 0xc03a00f1, + 0x7a84: 0x4035ac20, 0x7a85: 0x4035b420, 0x7a86: 0x40360220, 0x7a87: 0xc0420071, + 0x7a88: 0x40365c20, 0x7a89: 0x40366620, 0x7a8a: 0x40367420, 0x7a8b: 0xc0460071, + 0x7a8c: 0x40368e20, 0x7a8d: 0xc04a0071, 0x7a8e: 0x4036b820, 0x7a8f: 0x4036c420, + 0x7a90: 0xe00014ba, 0x7a91: 0x4033b420, 0x7a92: 0x40339620, 0x7a93: 0x4033a220, + 0x7a94: 0x4033c220, 0x7a95: 0x4033fc20, 0x7a96: 0xc0280071, 0x7a97: 0x40343620, + 0x7a98: 0x40344620, 0x7a99: 0x40349a20, 0x7a9a: 0x4034e420, 0x7a9b: 0x40356220, + 0x7a9c: 0x40356a20, 0x7a9d: 0xe00014cc, 0x7a9e: 0x40357a20, 0x7a9f: 0x40365420, + 0x7aa0: 0x0035e088, 0x7aa1: 0x4035e020, 0x7aa2: 0x00369e88, 0x7aa3: 0x40369e20, + 0x7aa4: 0x0036ce88, 0x7aa5: 0x4036ce20, 0x7aa6: 0x0036d688, 0x7aa7: 0x4036d620, + 0x7aa8: 0x0036ea88, 0x7aa9: 0x4036ea20, 0x7aaa: 0x0036e088, 0x7aab: 0x4036e020, + 0x7aac: 0x0036f488, 0x7aad: 0x4036f420, 0x7aae: 0x0036fc88, 0x7aaf: 0x4036fc20, + 0x7ab0: 0x00370488, 0x7ab1: 0x40370420, 0x7ab2: 0x00370c88, 0x7ab3: 0x40370c20, + 0x7ab4: 0xc0500131, 0x7ab5: 0xc04e0131, 0x7ab6: 0x00371c88, 0x7ab7: 0x40371c20, + 0x7ab8: 0x0035a488, 0x7ab9: 0x4035a420, 0x7aba: 0x0035fa88, 0x7abb: 0x4035fa20, + 0x7abc: 0x0035f288, 0x7abd: 0x4035f220, 0x7abe: 0x0035e888, 0x7abf: 0x4035e820, + // Block 0x1eb, offset 0x7ac0 + 0x7ac1: 0x40409c20, 0x7ac2: 0x40409820, 0x7ac3: 0x40409a20, + 0x7ac5: 0x40407c20, 0x7ac6: 0x40407e20, 0x7ac7: 0x40408020, + 0x7ac8: 0x40408220, 0x7ac9: 0x40408420, 0x7aca: 0x40408620, 0x7acb: 0x40408820, + 0x7acc: 0x40408c20, 0x7acf: 0x40409020, + 0x7ad0: 0x40409220, 0x7ad3: 0x40409420, + 0x7ad4: 0x40409620, 0x7ad5: 0x40409820, 0x7ad6: 0x40409a20, 0x7ad7: 0x40409c20, + 0x7ad8: 0x40409e20, 0x7ad9: 0x4040a020, 0x7ada: 0x4040a220, 0x7adb: 0x4040a420, + 0x7adc: 0x4040a620, 0x7add: 0x4040a820, 0x7ade: 0x4040aa20, 0x7adf: 0x4040ac20, + 0x7ae0: 0x4040ae20, 0x7ae1: 0x4040b020, 0x7ae2: 0x4040b220, 0x7ae3: 0x4040b420, + 0x7ae4: 0x4040b620, 0x7ae5: 0x4040b820, 0x7ae6: 0x4040ba20, 0x7ae7: 0x4040bc20, + 0x7ae8: 0x4040be20, 0x7aea: 0x4040c020, 0x7aeb: 0x4040c220, + 0x7aec: 0x4040c420, 0x7aed: 0x4040c620, 0x7aee: 0x4040c820, 0x7aef: 0x4040ca20, + 0x7af0: 0x4040cc20, 0x7af2: 0x4040d020, + 0x7af6: 0x4040d420, 0x7af7: 0x4040d620, + 0x7af8: 0x4040d820, 0x7af9: 0x4040da20, + 0x7afc: 0xa070f102, 0x7afd: 0x4040dc20, 0x7afe: 0x4040de20, 0x7aff: 0x4040e020, + // Block 0x1ec, offset 0x7b00 + 0x7b00: 0xa0000000, 0x7b01: 0xa0000000, 0x7b02: 0xa0000000, 0x7b03: 0xa0000000, + 0x7b04: 0xa0000000, 0x7b05: 0xa0000000, 0x7b06: 0xa0000000, 0x7b07: 0xa0000000, + 0x7b08: 0xa0000000, 0x7b09: 0x40020020, 0x7b0a: 0x40020220, 0x7b0b: 0x40020420, + 0x7b0c: 0x40020620, 0x7b0d: 0x40020820, 0x7b0e: 0xa0000000, 0x7b0f: 0xa0000000, + 0x7b10: 0xa0000000, 0x7b11: 0xa0000000, 0x7b12: 0xa0000000, 0x7b13: 0xa0000000, + 0x7b14: 0xa0000000, 0x7b15: 0xa0000000, 0x7b16: 0xa0000000, 0x7b17: 0xa0000000, + 0x7b18: 0xa0000000, 0x7b19: 0xa0000000, 0x7b1a: 0xa0000000, 0x7b1b: 0xa0000000, + 0x7b1c: 0xa0000000, 0x7b1d: 0xa0000000, 0x7b1e: 0xa0000000, 0x7b1f: 0xa0000000, + 0x7b20: 0x40021220, 0x7b21: 0x4002ba20, 0x7b22: 0x4003e020, 0x7b23: 0x4004ea20, + 0x7b24: 0x4027de20, 0x7b25: 0x4004ec20, 0x7b26: 0x4004e620, 0x7b27: 0x4003d220, + 0x7b28: 0x4003f420, 0x7b29: 0x4003f620, 0x7b2a: 0x4004d820, 0x7b2b: 0x40093820, + 0x7b2c: 0x40024020, 0x7b2d: 0x40021a20, 0x7b2e: 0x4002e420, 0x7b2f: 0x4004e220, + 0x7b30: 0x4029cc20, 0x7b31: 0x4029ce20, 0x7b32: 0x4029d020, 0x7b33: 0x4029d220, + 0x7b34: 0x4029d420, 0x7b35: 0x4029d620, 0x7b36: 0x4029d820, 0x7b37: 0x4029da20, + 0x7b38: 0x4029dc20, 0x7b39: 0x4029de20, 0x7b3a: 0x40026c20, 0x7b3b: 0x40026220, + 0x7b3c: 0x40094020, 0x7b3d: 0x40094220, 0x7b3e: 0x40094420, 0x7b3f: 0x4002c420, + // Block 0x1ed, offset 0x7b40 + 0x7b40: 0x4004d620, 0x7b41: 0x002bde88, 0x7b42: 0x002c0a88, 0x7b43: 0x002c3a88, + 0x7b44: 0x002c6288, 0x7b45: 0x002c9888, 0x7b46: 0x002d0888, 0x7b47: 0x002d2288, + 0x7b48: 0x002d6888, 0x7b49: 0x002d9a88, 0x7b4a: 0x002dcc88, 0x7b4b: 0x002dfe88, + 0x7b4c: 0xc3520002, 0x7b4d: 0x002e8288, 0x7b4e: 0x002e9e88, 0x7b4f: 0x002ee288, + 0x7b50: 0x002f2c88, 0x7b51: 0x002f5688, 0x7b52: 0x002f7a88, 0x7b53: 0x002fe688, + 0x7b54: 0x00302c88, 0x7b55: 0x00306c88, 0x7b56: 0x0030be88, 0x7b57: 0x0030e288, + 0x7b58: 0x0030f688, 0x7b59: 0x00310088, 0x7b5a: 0x00312a88, 0x7b5b: 0x4003f820, + 0x7b5c: 0x4004e420, 0x7b5d: 0x4003fa20, 0x7b5e: 0x40062420, 0x7b5f: 0x40021620, + 0x7b60: 0x40061e20, 0x7b61: 0x402bde20, 0x7b62: 0x402c0a20, 0x7b63: 0x402c3a20, + 0x7b64: 0x402c6220, 0x7b65: 0x402c9820, 0x7b66: 0x402d0820, 0x7b67: 0x402d2220, + 0x7b68: 0x402d6820, 0x7b69: 0x402d9a20, 0x7b6a: 0x402dcc20, 0x7b6b: 0x402dfe20, + 0x7b6c: 0xc34f0002, 0x7b6d: 0x402e8220, 0x7b6e: 0x402e9e20, 0x7b6f: 0x402ee220, + 0x7b70: 0x402f2c20, 0x7b71: 0x402f5620, 0x7b72: 0x402f7a20, 0x7b73: 0x402fe620, + 0x7b74: 0x40302c20, 0x7b75: 0x40306c20, 0x7b76: 0x4030be20, 0x7b77: 0x4030e220, + 0x7b78: 0x4030f620, 0x7b79: 0x40310020, 0x7b7a: 0x40312a20, 0x7b7b: 0x4003fc20, + 0x7b7c: 0x40094820, 0x7b7d: 0x4003fe20, 0x7b7e: 0x40094c20, 0x7b7f: 0xa0000000, + // Block 0x1ee, offset 0x7b80 + 0x7b80: 0xe0000983, 0x7b81: 0xe0000980, 0x7b82: 0xe00008fb, 0x7b83: 0xe00008f8, + 0x7b84: 0xe000097d, 0x7b85: 0xe000097a, 0x7b86: 0xe0000a38, 0x7b87: 0xe0000a35, + 0x7b88: 0xe0000a3e, 0x7b89: 0xe0000a3b, 0x7b8a: 0xe0000a4a, 0x7b8b: 0xe0000a47, + 0x7b8c: 0xe0000a44, 0x7b8d: 0xe0000a41, 0x7b8e: 0xe0000a86, 0x7b8f: 0xe0000a83, + 0x7b90: 0xe0000aaa, 0x7b91: 0xe0000aa7, 0x7b92: 0xe0000b46, 0x7b93: 0xe0000b43, + 0x7b94: 0xe0000aee, 0x7b95: 0xe0000aeb, 0x7b96: 0xe0000b2c, 0x7b97: 0xe0000b29, + 0x7b98: 0xe0000b40, 0x7b99: 0xe0000b3d, 0x7b9a: 0xe0000b1a, 0x7b9b: 0xe0000b17, + 0x7b9c: 0xe0000bb8, 0x7b9d: 0xe0000bb5, 0x7b9e: 0xe0000bb2, 0x7b9f: 0xe0000baf, + 0x7ba0: 0xe0000bc4, 0x7ba1: 0xe0000bc1, 0x7ba2: 0xe0000bca, 0x7ba3: 0xe0000bc7, + 0x7ba4: 0xe0000bee, 0x7ba5: 0xe0000beb, 0x7ba6: 0xe0000c1b, 0x7ba7: 0xe0000c18, + 0x7ba8: 0xe0000c51, 0x7ba9: 0xe0000c4e, 0x7baa: 0xe0000c60, 0x7bab: 0xe0000c5d, + 0x7bac: 0xe0000c31, 0x7bad: 0xe0000c2e, 0x7bae: 0xe0000c5a, 0x7baf: 0xe0000c57, + 0x7bb0: 0xe0000c54, 0x7bb1: 0x402da220, 0x7bb2: 0xf0000a0a, 0x7bb3: 0xf0000404, + 0x7bb4: 0xe0000c8a, 0x7bb5: 0xe0000c87, 0x7bb6: 0xe0000c9f, 0x7bb7: 0xe0000c9c, + 0x7bb8: 0x402f7220, 0x7bb9: 0xe0000ccc, 0x7bba: 0xe0000cc9, 0x7bbb: 0xe0000cd8, + 0x7bbc: 0xe0000cd5, 0x7bbd: 0xe0000cd2, 0x7bbe: 0xe0000ccf, 0x7bbf: 0x002e22a3, + // Block 0x1ef, offset 0x7bc0 + 0x7bc0: 0x402e2221, 0x7bc1: 0xe0000cf8, 0x7bc2: 0xe0000cf5, 0x7bc3: 0xe0000d51, + 0x7bc4: 0xe0000d4e, 0x7bc5: 0xe0000d6f, 0x7bc6: 0xe0000d6c, 0x7bc7: 0xe0000d5d, + 0x7bc8: 0xe0000d5a, 0x7bc9: 0xf0000404, 0x7bca: 0x002eda88, 0x7bcb: 0x402eda20, + 0x7bcc: 0xe0000e2e, 0x7bcd: 0xe0000e2b, 0x7bce: 0xe0000da0, 0x7bcf: 0xe0000d9d, + 0x7bd0: 0xe0000de0, 0x7bd1: 0xe0000ddd, 0x7bd2: 0xe0000e93, 0x7bd3: 0xe0000e8f, + 0x7bd4: 0xe0000eca, 0x7bd5: 0xe0000ec7, 0x7bd6: 0xe0000edc, 0x7bd7: 0xe0000ed9, + 0x7bd8: 0xe0000ed0, 0x7bd9: 0xe0000ecd, 0x7bda: 0xe0000f1f, 0x7bdb: 0xe0000f1c, + 0x7bdc: 0xe0000f2d, 0x7bdd: 0xe0000f2a, 0x7bde: 0xe0000f47, 0x7bdf: 0xe0000f44, + 0x7be0: 0xe0000f33, 0x7be1: 0xe0000f30, 0x7be2: 0xe0000f99, 0x7be3: 0xe0000f96, + 0x7be4: 0xe0000f8a, 0x7be5: 0xe0000f87, 0x7be6: 0x00303688, 0x7be7: 0x40303620, + 0x7be8: 0xe000102b, 0x7be9: 0xe0001028, 0x7bea: 0xe000103f, 0x7beb: 0xe000103c, + 0x7bec: 0xe0000fe7, 0x7bed: 0xe0000fe4, 0x7bee: 0xe0000ff9, 0x7bef: 0xe0000ff6, + 0x7bf0: 0xe0001025, 0x7bf1: 0xe0001022, 0x7bf2: 0xe0001039, 0x7bf3: 0xe0001036, + 0x7bf4: 0xe00010d8, 0x7bf5: 0xe00010d5, 0x7bf6: 0xe000110e, 0x7bf7: 0xe000110b, + 0x7bf8: 0xe0001117, 0x7bf9: 0xe000113b, 0x7bfa: 0xe0001138, 0x7bfb: 0xe000114d, + 0x7bfc: 0xe000114a, 0x7bfd: 0xe0001147, 0x7bfe: 0xe0001144, 0x7bff: 0xe0000f64, + // Block 0x1f0, offset 0x7c00 + 0x7c00: 0xa0000000, 0x7c01: 0xa0000000, 0x7c02: 0xa0000000, 0x7c03: 0xa0000000, + 0x7c04: 0xa0000000, 0x7c05: 0xa0000000, 0x7c06: 0xa0000000, 0x7c07: 0xa0000000, + 0x7c08: 0xa0000000, 0x7c09: 0x40020020, 0x7c0a: 0x40020220, 0x7c0b: 0x40020420, + 0x7c0c: 0x40020620, 0x7c0d: 0x40020820, 0x7c0e: 0xa0000000, 0x7c0f: 0xa0000000, + 0x7c10: 0xa0000000, 0x7c11: 0xa0000000, 0x7c12: 0xa0000000, 0x7c13: 0xa0000000, + 0x7c14: 0xa0000000, 0x7c15: 0xa0000000, 0x7c16: 0xa0000000, 0x7c17: 0xa0000000, + 0x7c18: 0xa0000000, 0x7c19: 0xa0000000, 0x7c1a: 0xa0000000, 0x7c1b: 0xa0000000, + 0x7c1c: 0xa0000000, 0x7c1d: 0xa0000000, 0x7c1e: 0xa0000000, 0x7c1f: 0xa0000000, + 0x7c20: 0x40021220, 0x7c21: 0x4002ba20, 0x7c22: 0x4003e020, 0x7c23: 0x4004ea20, + 0x7c24: 0x4027de20, 0x7c25: 0x4004ec20, 0x7c26: 0x4004e620, 0x7c27: 0x4003d220, + 0x7c28: 0x4003f420, 0x7c29: 0x4003f620, 0x7c2a: 0x4004d820, 0x7c2b: 0x40093820, + 0x7c2c: 0x40024020, 0x7c2d: 0x40021a20, 0x7c2e: 0x4002e420, 0x7c2f: 0x4004e220, + 0x7c30: 0x4029cc20, 0x7c31: 0x4029ce20, 0x7c32: 0x4029d020, 0x7c33: 0x4029d220, + 0x7c34: 0x4029d420, 0x7c35: 0x4029d620, 0x7c36: 0x4029d820, 0x7c37: 0x4029da20, + 0x7c38: 0x4029dc20, 0x7c39: 0x4029de20, 0x7c3a: 0x40026c20, 0x7c3b: 0x40026220, + 0x7c3c: 0x40094020, 0x7c3d: 0x40094220, 0x7c3e: 0x40094420, 0x7c3f: 0x4002c420, + // Block 0x1f1, offset 0x7c40 + 0x7c40: 0x4004d620, 0x7c41: 0x002bde88, 0x7c42: 0x002c0a88, 0x7c43: 0xc3590953, + 0x7c44: 0x002c6288, 0x7c45: 0x002c9888, 0x7c46: 0x002d0888, 0x7c47: 0x002d2288, + 0x7c48: 0x002d6888, 0x7c49: 0x002d9a88, 0x7c4a: 0x002dcc88, 0x7c4b: 0x002dfe88, + 0x7c4c: 0xc0030002, 0x7c4d: 0x002e8288, 0x7c4e: 0x002e9e88, 0x7c4f: 0x002ee288, + 0x7c50: 0x002f2c88, 0x7c51: 0x002f5688, 0x7c52: 0xc35f0991, 0x7c53: 0xc3430991, + 0x7c54: 0x00302c88, 0x7c55: 0x00306c88, 0x7c56: 0x0030be88, 0x7c57: 0x0030e288, + 0x7c58: 0x0030f688, 0x7c59: 0x00310088, 0x7c5a: 0xc3630991, 0x7c5b: 0x4003f820, + 0x7c5c: 0x4004e420, 0x7c5d: 0x4003fa20, 0x7c5e: 0x40062420, 0x7c5f: 0x40021620, + 0x7c60: 0x40061e20, 0x7c61: 0x402bde20, 0x7c62: 0x402c0a20, 0x7c63: 0xc3550953, + 0x7c64: 0x402c6220, 0x7c65: 0x402c9820, 0x7c66: 0x402d0820, 0x7c67: 0x402d2220, + 0x7c68: 0x402d6820, 0x7c69: 0x402d9a20, 0x7c6a: 0x402dcc20, 0x7c6b: 0x402dfe20, + 0x7c6c: 0xc0000002, 0x7c6d: 0x402e8220, 0x7c6e: 0x402e9e20, 0x7c6f: 0x402ee220, + 0x7c70: 0x402f2c20, 0x7c71: 0x402f5620, 0x7c72: 0xc35d0991, 0x7c73: 0xc3410991, + 0x7c74: 0x40302c20, 0x7c75: 0x40306c20, 0x7c76: 0x4030be20, 0x7c77: 0x4030e220, + 0x7c78: 0x4030f620, 0x7c79: 0x40310020, 0x7c7a: 0xc3610991, 0x7c7b: 0x4003fc20, + 0x7c7c: 0x40094820, 0x7c7d: 0x4003fe20, 0x7c7e: 0x40094c20, 0x7c7f: 0xa0000000, + // Block 0x1f2, offset 0x7c80 + 0x7c80: 0xe0000983, 0x7c81: 0xe0000980, 0x7c82: 0xe00008fb, 0x7c83: 0xe00008f8, + 0x7c84: 0xe000097d, 0x7c85: 0xe000097a, 0x7c86: 0xe0000a38, 0x7c87: 0xe0000a35, + 0x7c88: 0xe0000a3e, 0x7c89: 0xe0000a3b, 0x7c8a: 0xe0000a4a, 0x7c8b: 0xe0000a47, + 0x7c8c: 0x002c3c83, 0x7c8d: 0x402c3c20, 0x7c8e: 0xe0000a86, 0x7c8f: 0xe0000a83, + 0x7c90: 0xe0000aaa, 0x7c91: 0xe0000aa7, 0x7c92: 0xe0000b46, 0x7c93: 0xe0000b43, + 0x7c94: 0xe0000aee, 0x7c95: 0xe0000aeb, 0x7c96: 0xe0000b2c, 0x7c97: 0xe0000b29, + 0x7c98: 0xe0000b40, 0x7c99: 0xe0000b3d, 0x7c9a: 0xe0000b1a, 0x7c9b: 0xe0000b17, + 0x7c9c: 0xe0000bb8, 0x7c9d: 0xe0000bb5, 0x7c9e: 0xe0000bb2, 0x7c9f: 0xe0000baf, + 0x7ca0: 0xe0000bc4, 0x7ca1: 0xe0000bc1, 0x7ca2: 0xe0000bca, 0x7ca3: 0xe0000bc7, + 0x7ca4: 0xe0000bee, 0x7ca5: 0xe0000beb, 0x7ca6: 0xe0000c1b, 0x7ca7: 0xe0000c18, + 0x7ca8: 0xe0000c51, 0x7ca9: 0xe0000c4e, 0x7caa: 0xe0000c60, 0x7cab: 0xe0000c5d, + 0x7cac: 0xe0000c31, 0x7cad: 0xe0000c2e, 0x7cae: 0xe0000c5a, 0x7caf: 0xe0000c57, + 0x7cb0: 0xe0000c54, 0x7cb1: 0x402da220, 0x7cb2: 0xf0000a0a, 0x7cb3: 0xf0000404, + 0x7cb4: 0xe0000c8a, 0x7cb5: 0xe0000c87, 0x7cb6: 0xe0000c9f, 0x7cb7: 0xe0000c9c, + 0x7cb8: 0x402f7220, 0x7cb9: 0xe0000ccc, 0x7cba: 0xe0000cc9, 0x7cbb: 0xe0000cd8, + 0x7cbc: 0xe0000cd5, 0x7cbd: 0xe0000cd2, 0x7cbe: 0xe0000ccf, 0x7cbf: 0xe0000d04, + // Block 0x1f3, offset 0x7cc0 + 0x7cc0: 0xe0000cfe, 0x7cc1: 0xe0000cf8, 0x7cc2: 0xe0000cf5, 0x7cc3: 0xe0000d51, + 0x7cc4: 0xe0000d4e, 0x7cc5: 0xe0000d6f, 0x7cc6: 0xe0000d6c, 0x7cc7: 0xe0000d5d, + 0x7cc8: 0xe0000d5a, 0x7cc9: 0xf0000404, 0x7cca: 0x002eda88, 0x7ccb: 0x402eda20, + 0x7ccc: 0xe0000e2e, 0x7ccd: 0xe0000e2b, 0x7cce: 0xe0000da0, 0x7ccf: 0xe0000d9d, + 0x7cd0: 0xe0000de0, 0x7cd1: 0xe0000ddd, 0x7cd2: 0xe0000e93, 0x7cd3: 0xe0000e8f, + 0x7cd4: 0xe0000eca, 0x7cd5: 0xe0000ec7, 0x7cd6: 0xe0000edc, 0x7cd7: 0xe0000ed9, + 0x7cd8: 0x002f7c83, 0x7cd9: 0x402f7c20, 0x7cda: 0xe0000f1f, 0x7cdb: 0xe0000f1c, + 0x7cdc: 0xe0000f2d, 0x7cdd: 0xe0000f2a, 0x7cde: 0xe0000f47, 0x7cdf: 0xe0000f44, + 0x7ce0: 0x002fe883, 0x7ce1: 0x402fe820, 0x7ce2: 0xe0000f99, 0x7ce3: 0xe0000f96, + 0x7ce4: 0xe0000f8a, 0x7ce5: 0xe0000f87, 0x7ce6: 0x00303688, 0x7ce7: 0x40303620, + 0x7ce8: 0xe000102b, 0x7ce9: 0xe0001028, 0x7cea: 0xe000103f, 0x7ceb: 0xe000103c, + 0x7cec: 0xe0000fe7, 0x7ced: 0xe0000fe4, 0x7cee: 0xe0000ff9, 0x7cef: 0xe0000ff6, + 0x7cf0: 0xe0001025, 0x7cf1: 0xe0001022, 0x7cf2: 0xe0001039, 0x7cf3: 0xe0001036, + 0x7cf4: 0xe00010d8, 0x7cf5: 0xe00010d5, 0x7cf6: 0xe000110e, 0x7cf7: 0xe000110b, + 0x7cf8: 0xe0001117, 0x7cf9: 0xe000113b, 0x7cfa: 0xe0001138, 0x7cfb: 0xe000114d, + 0x7cfc: 0xe000114a, 0x7cfd: 0x00312c83, 0x7cfe: 0x40312c20, 0x7cff: 0xe0000f64, + // Block 0x1f4, offset 0x7d00 + 0x7d00: 0xe0000d24, 0x7d01: 0xe0000d21, 0x7d02: 0xe0000d2a, 0x7d03: 0xe0000d27, + 0x7d04: 0xe0000d69, 0x7d05: 0xe0000d66, 0x7d06: 0xe0000d7b, 0x7d07: 0xe0000d78, + 0x7d08: 0xe0000d87, 0x7d09: 0xe0000d84, 0x7d0a: 0xe0000d81, 0x7d0b: 0xe0000d7e, + 0x7d0c: 0xe0000ded, 0x7d0d: 0xe0000de9, 0x7d0e: 0xe0000df5, 0x7d0f: 0xe0000df1, + 0x7d10: 0xe0000e3d, 0x7d11: 0xe0000e39, 0x7d12: 0xe0000e35, 0x7d13: 0xe0000e31, + 0x7d14: 0xe0000ea7, 0x7d15: 0xe0000ea4, 0x7d16: 0xe0000ead, 0x7d17: 0xe0000eaa, + 0x7d18: 0xe0000ed6, 0x7d19: 0xe0000ed3, 0x7d1a: 0xe0000ef4, 0x7d1b: 0xe0000ef1, + 0x7d1c: 0xe0000efb, 0x7d1d: 0xe0000ef7, 0x7d1e: 0xe0000f02, 0x7d1f: 0xe0000eff, + 0x7d20: 0xe0000f41, 0x7d21: 0xe0000f3e, 0x7d22: 0xe0000f53, 0x7d23: 0xe0000f50, + 0x7d24: 0xe0000f26, 0x7d25: 0xe0000f22, 0x7d26: 0xe000296a, 0x7d27: 0xe0002967, + 0x7d28: 0xe0000f5a, 0x7d29: 0xe0000f56, 0x7d2a: 0xe0000f93, 0x7d2b: 0xe0000f90, + 0x7d2c: 0xe0000f9f, 0x7d2d: 0xe0000f9c, 0x7d2e: 0xe0000fb1, 0x7d2f: 0xe0000fae, + 0x7d30: 0xe0000fab, 0x7d31: 0xe0000fa8, 0x7d32: 0xe0001093, 0x7d33: 0xe0001090, + 0x7d34: 0xe000109f, 0x7d35: 0xe000109c, 0x7d36: 0xe0001099, 0x7d37: 0xe0001096, + 0x7d38: 0xe0001032, 0x7d39: 0xe000102e, 0x7d3a: 0xe0001046, 0x7d3b: 0xe0001042, + 0x7d3c: 0xe00010a9, 0x7d3d: 0xe00010a6, 0x7d3e: 0xe00010af, 0x7d3f: 0xe00010ac, + // Block 0x1f5, offset 0x7d40 + 0x7d40: 0xa0000000, 0x7d41: 0xa0000000, 0x7d42: 0xa0000000, 0x7d43: 0xa0000000, + 0x7d44: 0xa0000000, 0x7d45: 0xa0000000, 0x7d46: 0xa0000000, 0x7d47: 0xa0000000, + 0x7d48: 0xa0000000, 0x7d49: 0x40020020, 0x7d4a: 0x40020220, 0x7d4b: 0x40020420, + 0x7d4c: 0x40020620, 0x7d4d: 0x40020820, 0x7d4e: 0xa0000000, 0x7d4f: 0xa0000000, + 0x7d50: 0xa0000000, 0x7d51: 0xa0000000, 0x7d52: 0xa0000000, 0x7d53: 0xa0000000, + 0x7d54: 0xa0000000, 0x7d55: 0xa0000000, 0x7d56: 0xa0000000, 0x7d57: 0xa0000000, + 0x7d58: 0xa0000000, 0x7d59: 0xa0000000, 0x7d5a: 0xa0000000, 0x7d5b: 0xa0000000, + 0x7d5c: 0xa0000000, 0x7d5d: 0xa0000000, 0x7d5e: 0xa0000000, 0x7d5f: 0xa0000000, + 0x7d60: 0x40021220, 0x7d61: 0x4002ba20, 0x7d62: 0x4003e020, 0x7d63: 0x4004ea20, + 0x7d64: 0x4027de20, 0x7d65: 0x4004ec20, 0x7d66: 0x4004e620, 0x7d67: 0x4003d220, + 0x7d68: 0x4003f420, 0x7d69: 0x4003f620, 0x7d6a: 0x4004d820, 0x7d6b: 0x40093820, + 0x7d6c: 0x40024020, 0x7d6d: 0x40021a20, 0x7d6e: 0x4002e420, 0x7d6f: 0x4004e220, + 0x7d70: 0x4029cc20, 0x7d71: 0x4029ce20, 0x7d72: 0x4029d020, 0x7d73: 0x4029d220, + 0x7d74: 0x4029d420, 0x7d75: 0x4029d620, 0x7d76: 0x4029d820, 0x7d77: 0x4029da20, + 0x7d78: 0x4029dc20, 0x7d79: 0x4029de20, 0x7d7a: 0x40026c20, 0x7d7b: 0x40026220, + 0x7d7c: 0x40094020, 0x7d7d: 0x40094220, 0x7d7e: 0x40094420, 0x7d7f: 0x4002c420, + // Block 0x1f6, offset 0x7d80 + 0x7d80: 0x4004d620, 0x7d81: 0x002bde88, 0x7d82: 0x002c0a88, 0x7d83: 0xc36509c2, + 0x7d84: 0xc36a09f2, 0x7d85: 0x002c9888, 0x7d86: 0xc36f0a22, 0x7d87: 0x002d2288, + 0x7d88: 0x002d6888, 0x7d89: 0x002d9a88, 0x7d8a: 0x002dcc88, 0x7d8b: 0x002dfe88, + 0x7d8c: 0xc37b0ac4, 0x7d8d: 0x002e8288, 0x7d8e: 0xc3740a52, 0x7d8f: 0x002ee288, + 0x7d90: 0xc38209c2, 0x7d91: 0x002f5688, 0x7d92: 0xc38509c2, 0x7d93: 0x002fe688, + 0x7d94: 0xc38a09c2, 0x7d95: 0x00306c88, 0x7d96: 0x0030be88, 0x7d97: 0x0030e288, + 0x7d98: 0x0030f688, 0x7d99: 0x00310088, 0x7d9a: 0x00312a88, 0x7d9b: 0x4003f820, + 0x7d9c: 0x4004e420, 0x7d9d: 0x4003fa20, 0x7d9e: 0x40062420, 0x7d9f: 0x40021620, + 0x7da0: 0x40061e20, 0x7da1: 0x402bde20, 0x7da2: 0x402c0a20, 0x7da3: 0xc33309b1, + 0x7da4: 0xc36809e1, 0x7da5: 0x402c9820, 0x7da6: 0xc36d0a11, 0x7da7: 0x402d2220, + 0x7da8: 0x402d6820, 0x7da9: 0x402d9a20, 0x7daa: 0x402dcc20, 0x7dab: 0x402dfe20, + 0x7dac: 0xc3770a73, 0x7dad: 0x402e8220, 0x7dae: 0xc3720a41, 0x7daf: 0x402ee220, + 0x7db0: 0xc38009b1, 0x7db1: 0x402f5620, 0x7db2: 0xc35d09b1, 0x7db3: 0x402fe620, + 0x7db4: 0xc38809b1, 0x7db5: 0x40306c20, 0x7db6: 0x4030be20, 0x7db7: 0x4030e220, + 0x7db8: 0x4030f620, 0x7db9: 0x40310020, 0x7dba: 0x40312a20, 0x7dbb: 0x4003fc20, + 0x7dbc: 0x40094820, 0x7dbd: 0x4003fe20, 0x7dbe: 0x40094c20, 0x7dbf: 0xa0000000, + // Block 0x1f7, offset 0x7dc0 + 0x7dc0: 0xa0000000, 0x7dc1: 0xa0000000, 0x7dc2: 0xa0000000, 0x7dc3: 0xa0000000, + 0x7dc4: 0xa0000000, 0x7dc5: 0xa0000000, 0x7dc6: 0xa0000000, 0x7dc7: 0xa0000000, + 0x7dc8: 0xa0000000, 0x7dc9: 0x40020020, 0x7dca: 0x40020220, 0x7dcb: 0x40020420, + 0x7dcc: 0x40020620, 0x7dcd: 0x40020820, 0x7dce: 0xa0000000, 0x7dcf: 0xa0000000, + 0x7dd0: 0xa0000000, 0x7dd1: 0xa0000000, 0x7dd2: 0xa0000000, 0x7dd3: 0xa0000000, + 0x7dd4: 0xa0000000, 0x7dd5: 0xa0000000, 0x7dd6: 0xa0000000, 0x7dd7: 0xa0000000, + 0x7dd8: 0xa0000000, 0x7dd9: 0xa0000000, 0x7dda: 0xa0000000, 0x7ddb: 0xa0000000, + 0x7ddc: 0xa0000000, 0x7ddd: 0xa0000000, 0x7dde: 0xa0000000, 0x7ddf: 0xa0000000, + 0x7de0: 0x40021220, 0x7de1: 0x4002ba20, 0x7de2: 0x4003e020, 0x7de3: 0x4004ea20, + 0x7de4: 0x4027de20, 0x7de5: 0x4004ec20, 0x7de6: 0x4004e620, 0x7de7: 0x4003d220, + 0x7de8: 0x4003f420, 0x7de9: 0x4003f620, 0x7dea: 0x4004d820, 0x7deb: 0x40093820, + 0x7dec: 0x40024020, 0x7ded: 0x40021a20, 0x7dee: 0x4002e420, 0x7def: 0x4004e220, + 0x7df0: 0x4029cc20, 0x7df1: 0x4029ce20, 0x7df2: 0x4029d020, 0x7df3: 0x4029d220, + 0x7df4: 0x4029d420, 0x7df5: 0x4029d620, 0x7df6: 0x4029d820, 0x7df7: 0x4029da20, + 0x7df8: 0x4029dc20, 0x7df9: 0x4029de20, 0x7dfa: 0x40026c20, 0x7dfb: 0x40026220, + 0x7dfc: 0x40094020, 0x7dfd: 0x40094220, 0x7dfe: 0x40094420, 0x7dff: 0x4002c420, + // Block 0x1f8, offset 0x7e00 + 0x7e00: 0x4004d620, 0x7e01: 0xc3970b93, 0x7e02: 0x002c0a88, 0x7e03: 0x002c3a88, + 0x7e04: 0x002c6288, 0x7e05: 0xc39e0be1, 0x7e06: 0x002d0888, 0x7e07: 0x002d2288, + 0x7e08: 0x002d6888, 0x7e09: 0x002d9a88, 0x7e0a: 0x002dcc88, 0x7e0b: 0x002dfe88, + 0x7e0c: 0xc0030002, 0x7e0d: 0x002e8288, 0x7e0e: 0x002e9e88, 0x7e0f: 0xc3a30b21, + 0x7e10: 0x002f2c88, 0x7e11: 0x002f5688, 0x7e12: 0x002f7a88, 0x7e13: 0x002fe688, + 0x7e14: 0x00302c88, 0x7e15: 0xc3900b21, 0x7e16: 0x0030be88, 0x7e17: 0x0030e288, + 0x7e18: 0x0030f688, 0x7e19: 0x00310088, 0x7e1a: 0x00312a88, 0x7e1b: 0x4003f820, + 0x7e1c: 0x4004e420, 0x7e1d: 0x4003fa20, 0x7e1e: 0x40062420, 0x7e1f: 0x40021620, + 0x7e20: 0x40061e20, 0x7e21: 0xc3930b52, 0x7e22: 0x402c0a20, 0x7e23: 0x402c3a20, + 0x7e24: 0x402c6220, 0x7e25: 0xc39c0be1, 0x7e26: 0x402d0820, 0x7e27: 0x402d2220, + 0x7e28: 0x402d6820, 0x7e29: 0x402d9a20, 0x7e2a: 0x402dcc20, 0x7e2b: 0x402dfe20, + 0x7e2c: 0xc0000002, 0x7e2d: 0x402e8220, 0x7e2e: 0x402e9e20, 0x7e2f: 0xc3a00b21, + 0x7e30: 0x402f2c20, 0x7e31: 0x402f5620, 0x7e32: 0x402f7a20, 0x7e33: 0x402fe620, + 0x7e34: 0x40302c20, 0x7e35: 0xc38d0b21, 0x7e36: 0x4030be20, 0x7e37: 0x4030e220, + 0x7e38: 0x4030f620, 0x7e39: 0x40310020, 0x7e3a: 0x40312a20, 0x7e3b: 0x4003fc20, + 0x7e3c: 0x40094820, 0x7e3d: 0x4003fe20, 0x7e3e: 0x40094c20, 0x7e3f: 0xa0000000, + // Block 0x1f9, offset 0x7e40 + 0x7e40: 0xe00008f5, 0x7e41: 0xe00008ef, 0x7e42: 0xe0000921, 0x7e43: 0xe0000969, + 0x7e44: 0x00320ca3, 0x7e45: 0x00321083, 0x7e46: 0x00320c83, 0x7e47: 0xe0000a53, + 0x7e48: 0xe0000ae8, 0x7e49: 0xe0000ae2, 0x7e4a: 0xe0000af4, 0x7e4b: 0xe0000b20, + 0x7e4c: 0xe0000c2b, 0x7e4d: 0xe0000c25, 0x7e4e: 0xe0000c37, 0x7e4f: 0xe0000c43, + 0x7e50: 0x002c62c3, 0x7e51: 0xe0000d63, 0x7e52: 0xe0000d9a, 0x7e53: 0xe0000d94, + 0x7e54: 0xe0000da6, 0x7e55: 0xe0000de6, 0x7e56: 0x00320ea3, 0x7e57: 0x40093e20, + 0x7e58: 0x00320e83, 0x7e59: 0xe0000fe1, 0x7e5a: 0xe0000fdb, 0x7e5b: 0xe0000fed, + 0x7e5c: 0x003100a3, 0x7e5d: 0xe0001102, 0x7e5e: 0xe0002973, 0x7e5f: 0xe0000f7b, + 0x7e60: 0xe00008f2, 0x7e61: 0xe00008ec, 0x7e62: 0xe000091e, 0x7e63: 0xe0000966, + 0x7e64: 0x40320c21, 0x7e65: 0x40321020, 0x7e66: 0x40320c20, 0x7e67: 0xe0000a4d, + 0x7e68: 0xe0000ae5, 0x7e69: 0xe0000adf, 0x7e6a: 0xe0000af1, 0x7e6b: 0xe0000b1d, + 0x7e6c: 0xe0000c28, 0x7e6d: 0xe0000c22, 0x7e6e: 0xe0000c34, 0x7e6f: 0xe0000c40, + 0x7e70: 0x402c6222, 0x7e71: 0xe0000d60, 0x7e72: 0xe0000d97, 0x7e73: 0xe0000d91, + 0x7e74: 0xe0000da3, 0x7e75: 0xe0000de3, 0x7e76: 0x40320e21, 0x7e77: 0x40093c20, + 0x7e78: 0x40320e20, 0x7e79: 0xe0000fde, 0x7e7a: 0xe0000fd8, 0x7e7b: 0xe0000fea, + 0x7e7c: 0x40310021, 0x7e7d: 0xe00010ff, 0x7e7e: 0xe0002970, 0x7e7f: 0xe0001114, + // Block 0x1fa, offset 0x7e80 + 0x7e80: 0xe0000983, 0x7e81: 0xe0000980, 0x7e82: 0xe00008fb, 0x7e83: 0xe00008f8, + 0x7e84: 0xe000097d, 0x7e85: 0xe000097a, 0x7e86: 0xe0000a38, 0x7e87: 0xe0000a35, + 0x7e88: 0xe0000a3e, 0x7e89: 0xe0000a3b, 0x7e8a: 0xe0000a4a, 0x7e8b: 0xe0000a47, + 0x7e8c: 0xe0000a44, 0x7e8d: 0xe0000a41, 0x7e8e: 0xe0000a86, 0x7e8f: 0xe0000a83, + 0x7e90: 0x002c62a3, 0x7e91: 0x402c6221, 0x7e92: 0xe0000b46, 0x7e93: 0xe0000b43, + 0x7e94: 0xe0000aee, 0x7e95: 0xe0000aeb, 0x7e96: 0xe0000b2c, 0x7e97: 0xe0000b29, + 0x7e98: 0x00320cc3, 0x7e99: 0x40320c22, 0x7e9a: 0xe0000b1a, 0x7e9b: 0xe0000b17, + 0x7e9c: 0xe0000bb8, 0x7e9d: 0xe0000bb5, 0x7e9e: 0xe0000bb2, 0x7e9f: 0xe0000baf, + 0x7ea0: 0xe0000bc4, 0x7ea1: 0xe0000bc1, 0x7ea2: 0xe0000bca, 0x7ea3: 0xe0000bc7, + 0x7ea4: 0xe0000bee, 0x7ea5: 0xe0000beb, 0x7ea6: 0xe0000c1b, 0x7ea7: 0xe0000c18, + 0x7ea8: 0xe0000c51, 0x7ea9: 0xe0000c4e, 0x7eaa: 0xe0000c60, 0x7eab: 0xe0000c5d, + 0x7eac: 0xe0000c31, 0x7ead: 0xe0000c2e, 0x7eae: 0xe0000c5a, 0x7eaf: 0xe0000c57, + 0x7eb0: 0xe0000c54, 0x7eb1: 0x402da220, 0x7eb2: 0xf0000a0a, 0x7eb3: 0xf0000404, + 0x7eb4: 0xe0000c8a, 0x7eb5: 0xe0000c87, 0x7eb6: 0xe0000c9f, 0x7eb7: 0xe0000c9c, + 0x7eb8: 0x402f7220, 0x7eb9: 0xe0000ccc, 0x7eba: 0xe0000cc9, 0x7ebb: 0xe0000cd8, + 0x7ebc: 0xe0000cd5, 0x7ebd: 0xe0000cd2, 0x7ebe: 0xe0000ccf, 0x7ebf: 0xe0000d04, + // Block 0x1fb, offset 0x7ec0 + 0x7ec0: 0xe0000cfe, 0x7ec1: 0xe0000cf8, 0x7ec2: 0xe0000cf5, 0x7ec3: 0xe0000d51, + 0x7ec4: 0xe0000d4e, 0x7ec5: 0xe0000d6f, 0x7ec6: 0xe0000d6c, 0x7ec7: 0xe0000d5d, + 0x7ec8: 0xe0000d5a, 0x7ec9: 0xf0000404, 0x7eca: 0x002eda88, 0x7ecb: 0x402eda20, + 0x7ecc: 0xe0000e2e, 0x7ecd: 0xe0000e2b, 0x7ece: 0xe0000da0, 0x7ecf: 0xe0000d9d, + 0x7ed0: 0x00320ec3, 0x7ed1: 0x40320e22, 0x7ed2: 0x00320ee3, 0x7ed3: 0x40320e23, + 0x7ed4: 0xe0000eca, 0x7ed5: 0xe0000ec7, 0x7ed6: 0xe0000edc, 0x7ed7: 0xe0000ed9, + 0x7ed8: 0xe0000ed0, 0x7ed9: 0xe0000ecd, 0x7eda: 0xe0000f1f, 0x7edb: 0xe0000f1c, + 0x7edc: 0xe0000f2d, 0x7edd: 0xe0000f2a, 0x7ede: 0xe0000f47, 0x7edf: 0xe0000f44, + 0x7ee0: 0xe0000f33, 0x7ee1: 0xe0000f30, 0x7ee2: 0xe0000f99, 0x7ee3: 0xe0000f96, + 0x7ee4: 0xe0000f8a, 0x7ee5: 0xe0000f87, 0x7ee6: 0x00303688, 0x7ee7: 0x40303620, + 0x7ee8: 0xe000102b, 0x7ee9: 0xe0001028, 0x7eea: 0xe000103f, 0x7eeb: 0xe000103c, + 0x7eec: 0xe0000fe7, 0x7eed: 0xe0000fe4, 0x7eee: 0xe0000ff9, 0x7eef: 0xe0000ff6, + 0x7ef0: 0x003100c3, 0x7ef1: 0x40310022, 0x7ef2: 0xe0001039, 0x7ef3: 0xe0001036, + 0x7ef4: 0xe00010d8, 0x7ef5: 0xe00010d5, 0x7ef6: 0xe000110e, 0x7ef7: 0xe000110b, + 0x7ef8: 0xe0001117, 0x7ef9: 0xe000113b, 0x7efa: 0xe0001138, 0x7efb: 0xe000114d, + 0x7efc: 0xe000114a, 0x7efd: 0xe0001147, 0x7efe: 0xe0001144, 0x7eff: 0xe0000f64, + // Block 0x1fc, offset 0x7f00 + 0x7f00: 0x40321220, 0x7f01: 0x40321a20, 0x7f02: 0x40322220, 0x7f03: 0x40322a20, + 0x7f04: 0xe0000ad5, 0x7f05: 0xe0000ad1, 0x7f06: 0xe0000acd, 0x7f07: 0xf0000a0a, + 0x7f08: 0xf000040a, 0x7f09: 0xf0000404, 0x7f0a: 0xf0000a0a, 0x7f0b: 0xf000040a, + 0x7f0c: 0xf0000404, 0x7f0d: 0xe0000947, 0x7f0e: 0xe0000944, 0x7f0f: 0xe0000c3d, + 0x7f10: 0xe0000c3a, 0x7f11: 0xe0000dcc, 0x7f12: 0xe0000dc9, 0x7f13: 0xe0000ff3, + 0x7f14: 0xe0000ff0, 0x7f15: 0xe000298b, 0x7f16: 0xe0002988, 0x7f17: 0xe0002979, + 0x7f18: 0xe0002976, 0x7f19: 0xe0002985, 0x7f1a: 0xe0002982, 0x7f1b: 0xe000297f, + 0x7f1c: 0xe000297c, 0x7f1d: 0x402cae20, 0x7f1e: 0xe000299d, 0x7f1f: 0xe000299a, + 0x7f20: 0xe0000976, 0x7f21: 0xe0000972, 0x7f22: 0xe0002997, 0x7f23: 0xe0002994, + 0x7f24: 0x002d3a88, 0x7f25: 0x402d3a20, 0x7f26: 0xe0000bbe, 0x7f27: 0xe0000bbb, + 0x7f28: 0xe0000c99, 0x7f29: 0xe0000c96, 0x7f2a: 0xe0000e20, 0x7f2b: 0xe0000e1d, + 0x7f2c: 0xe0000e27, 0x7f2d: 0xe0000e23, 0x7f2e: 0xe0001162, 0x7f2f: 0xe000115f, + 0x7f30: 0xe0000c8d, 0x7f31: 0xf0000a0a, 0x7f32: 0xf000040a, 0x7f33: 0xf0000404, + 0x7f34: 0xe0000bac, 0x7f35: 0xe0000ba9, 0x7f36: 0x002d7888, 0x7f37: 0x00319488, + 0x7f38: 0xe0000d57, 0x7f39: 0xe0000d54, 0x7f3a: 0xe00029b5, 0x7f3b: 0xe00029b2, + 0x7f3c: 0xe0002991, 0x7f3d: 0xe000298e, 0x7f3e: 0xe00029a3, 0x7f3f: 0xe00029a0, + // Block 0x1fd, offset 0x7f40 + 0x7f40: 0xe000098f, 0x7f41: 0xe000098c, 0x7f42: 0xe0000995, 0x7f43: 0xe0000992, + 0x7f44: 0xe0000b62, 0x7f45: 0xe0000b5f, 0x7f46: 0xe0000b68, 0x7f47: 0xe0000b65, + 0x7f48: 0xe0000c6c, 0x7f49: 0xe0000c69, 0x7f4a: 0xe0000c72, 0x7f4b: 0xe0000c6f, + 0x7f4c: 0xe0000e4a, 0x7f4d: 0xe0000e47, 0x7f4e: 0xe0000e50, 0x7f4f: 0xe0000e4d, + 0x7f50: 0xe0000ee8, 0x7f51: 0xe0000ee5, 0x7f52: 0xe0000eee, 0x7f53: 0xe0000eeb, + 0x7f54: 0xe0001053, 0x7f55: 0xe0001050, 0x7f56: 0xe0001059, 0x7f57: 0xe0001056, + 0x7f58: 0xe0000f61, 0x7f59: 0xe0000f5e, 0x7f5a: 0xe0000fa5, 0x7f5b: 0xe0000fa2, + 0x7f5c: 0x00312288, 0x7f5d: 0x40312220, 0x7f5e: 0xe0000bf4, 0x7f5f: 0xe0000bf1, + 0x7f60: 0x002ebc88, 0x7f61: 0x402c8c20, 0x7f62: 0x002f2288, 0x7f63: 0x402f2220, + 0x7f64: 0x00314088, 0x7f65: 0x40314020, 0x7f66: 0xe000096f, 0x7f67: 0xe000096c, + 0x7f68: 0xe0000b32, 0x7f69: 0xe0000b2f, 0x7f6a: 0xe00029af, 0x7f6b: 0xe00029ac, + 0x7f6c: 0xe0000dfd, 0x7f6d: 0xe0000df9, 0x7f6e: 0xe0000e04, 0x7f6f: 0xe0000e01, + 0x7f70: 0xe0000e0b, 0x7f71: 0xe0000e07, 0x7f72: 0xe0001129, 0x7f73: 0xe0001126, + 0x7f74: 0x402e5e20, 0x7f75: 0x402ed020, 0x7f76: 0x40305a20, 0x7f77: 0x402dd420, + 0x7f78: 0xe0000abf, 0x7f79: 0xe0000ec4, 0x7f7a: 0x002be888, 0x7f7b: 0x002c4488, + 0x7f7c: 0x402c4420, 0x7f7d: 0x002e3888, 0x7f7e: 0x00303e88, 0x7f7f: 0x402ffc20, + // Block 0x1fe, offset 0x7f80 + 0x7f80: 0x402c2820, 0x7f81: 0x402c7020, 0x7f82: 0x402d1420, 0x7f83: 0x402d4220, + 0x7f84: 0x402e0820, 0x7f85: 0x402e5220, 0x7f86: 0x402e8e20, 0x7f87: 0x402ec620, + 0x7f88: 0x402f3c20, 0x7f89: 0x402faa20, 0x7f8a: 0x402ff220, 0x7f8b: 0x40301020, + 0x7f8c: 0x4030ca20, 0x7f8d: 0x4030fe20, 0x7f8e: 0x40313e20, 0x7f8f: 0x402bea20, + 0x7f90: 0x402c0020, 0x7f91: 0x402c8220, 0x7f92: 0x402caa20, 0x7f93: 0x402cca20, + 0x7f94: 0x402ce420, 0x7f95: 0x402cc020, 0x7f96: 0x402dc020, 0x7f97: 0x402f0620, + 0x7f98: 0x40302220, 0x7f99: 0x40308620, 0x7f9a: 0x40317620, 0x7f9b: 0x002c0294, + 0x7f9c: 0x002c3a94, 0x7f9d: 0x002c5694, 0x7f9e: 0xe000296d, 0x7f9f: 0x002cdc94, + 0x7fa0: 0x002d0894, 0x7fa1: 0x002dee94, 0x7fa2: 0x002d2a94, 0x7fa3: 0x00308894, + 0x7fa4: 0x002db694, 0x7fa5: 0x002dc294, 0x7fa6: 0x002daa94, 0x7fa7: 0x002dbe94, + 0x7fa8: 0x002de694, 0x7fa9: 0x002e5494, 0x7faa: 0x002e5294, 0x7fab: 0x002e2a94, + 0x7fac: 0x002e9094, 0x7fad: 0x0030ac94, 0x7fae: 0x002eb494, 0x7faf: 0x002ec894, + 0x7fb0: 0x002ea694, 0x7fb1: 0x002f1094, 0x7fb2: 0x002f4c94, 0x7fb3: 0x002ff494, + 0x7fb4: 0x00300894, 0x7fb5: 0x00304294, 0x7fb6: 0x00307c94, 0x7fb7: 0x0030b494, + 0x7fb8: 0x00307494, 0x7fb9: 0x0030cc94, 0x7fba: 0x0030da94, 0x7fbb: 0x00312a94, + 0x7fbc: 0x00314894, 0x7fbd: 0x00315094, 0x7fbe: 0x00316494, 0x7fbf: 0x00326a94, + // Block 0x1ff, offset 0x7fc0 + 0x7fc0: 0xe0000d24, 0x7fc1: 0xe0000d21, 0x7fc2: 0xe0000d2a, 0x7fc3: 0xe0000d27, + 0x7fc4: 0xe0000d69, 0x7fc5: 0xe0000d66, 0x7fc6: 0xe0000d7b, 0x7fc7: 0xe0000d78, + 0x7fc8: 0xe0000d87, 0x7fc9: 0xe0000d84, 0x7fca: 0xe0000d81, 0x7fcb: 0xe0000d7e, + 0x7fcc: 0xe0000ded, 0x7fcd: 0xe0000de9, 0x7fce: 0xe00029a9, 0x7fcf: 0xe00029a6, + 0x7fd0: 0xe0000e3d, 0x7fd1: 0xe0000e39, 0x7fd2: 0xe0000e35, 0x7fd3: 0xe0000e31, + 0x7fd4: 0xe0000ea7, 0x7fd5: 0xe0000ea4, 0x7fd6: 0xe0000ead, 0x7fd7: 0xe0000eaa, + 0x7fd8: 0xe0000ed6, 0x7fd9: 0xe0000ed3, 0x7fda: 0xe0000ef4, 0x7fdb: 0xe0000ef1, + 0x7fdc: 0xe0000efb, 0x7fdd: 0xe0000ef7, 0x7fde: 0xe0000f02, 0x7fdf: 0xe0000eff, + 0x7fe0: 0xe0000f41, 0x7fe1: 0xe0000f3e, 0x7fe2: 0xe0000f53, 0x7fe3: 0xe0000f50, + 0x7fe4: 0xe0000f26, 0x7fe5: 0xe0000f22, 0x7fe6: 0xe0000f3a, 0x7fe7: 0xe0000f36, + 0x7fe8: 0xe0000f5a, 0x7fe9: 0xe0000f56, 0x7fea: 0xe0000f93, 0x7feb: 0xe0000f90, + 0x7fec: 0xe0000f9f, 0x7fed: 0xe0000f9c, 0x7fee: 0xe0000fb1, 0x7fef: 0xe0000fae, + 0x7ff0: 0xe0000fab, 0x7ff1: 0xe0000fa8, 0x7ff2: 0xe0001093, 0x7ff3: 0xe0001090, + 0x7ff4: 0xe000109f, 0x7ff5: 0xe000109c, 0x7ff6: 0xe0001099, 0x7ff7: 0xe0001096, + 0x7ff8: 0xe0001032, 0x7ff9: 0xe000102e, 0x7ffa: 0xe000298b, 0x7ffb: 0xe0002988, + 0x7ffc: 0xe00010a9, 0x7ffd: 0xe00010a6, 0x7ffe: 0xe00010af, 0x7fff: 0xe00010ac, + // Block 0x200, offset 0x8000 + 0x8000: 0xe00009bc, 0x8001: 0xe00009c0, 0x8002: 0x002c3a8b, 0x8003: 0xf0000a04, + 0x8004: 0x40081c20, 0x8005: 0xe0000a5e, 0x8006: 0xe0000a62, 0x8007: 0x002cc28a, + 0x8008: 0x40081e20, 0x8009: 0xf0000a04, 0x800a: 0x002d2285, 0x800b: 0x002d688b, + 0x800c: 0x002d688b, 0x800d: 0x002d688b, 0x800e: 0x002d6885, 0x800f: 0xf0000202, + 0x8010: 0x002d9a8b, 0x8011: 0x002d9a8b, 0x8012: 0x002e228b, 0x8013: 0x002e2285, + 0x8014: 0x40082020, 0x8015: 0x002e9e8b, 0x8016: 0xf000040a, 0x8017: 0x40082220, + 0x8018: 0x40082420, 0x8019: 0x002f2c8b, 0x801a: 0x002f568b, 0x801b: 0x002f7a8b, + 0x801c: 0x002f7a8b, 0x801d: 0x002f7a8b, 0x801e: 0x40082620, 0x801f: 0x40082820, + 0x8020: 0xf0001414, 0x8021: 0xe0000fbd, 0x8022: 0xf0001414, 0x8023: 0x40082a20, + 0x8024: 0x00312a8b, 0x8025: 0x40082c20, 0x8026: 0x0032a288, 0x8027: 0x40082e20, + 0x8028: 0x00312a8b, 0x8029: 0x40083020, 0x802a: 0x002dfe88, 0x802b: 0x00321083, + 0x802c: 0x002c0a8b, 0x802d: 0x002c3a8b, 0x802e: 0x40083220, 0x802f: 0x002c9885, + 0x8030: 0x002c988b, 0x8031: 0x002d088b, 0x8032: 0x002d1e88, 0x8033: 0x002e828b, + 0x8034: 0x002ee285, 0x8035: 0x00389084, 0x8036: 0x00389284, 0x8037: 0x00389484, + 0x8038: 0x00389684, 0x8039: 0x002d9a85, 0x803a: 0x40083420, 0x803b: 0xe0000b95, + 0x803c: 0x00327e85, 0x803d: 0x00325685, 0x803e: 0x0032568b, 0x803f: 0x00327e8b, + // Block 0x201, offset 0x8040 + 0x8040: 0xa0000000, 0x8041: 0xa0000000, 0x8042: 0xa0000000, 0x8043: 0xa0000000, + 0x8044: 0xa0000000, 0x8045: 0xa0000000, 0x8046: 0xa0000000, 0x8047: 0xa0000000, + 0x8048: 0xa0000000, 0x8049: 0x40020020, 0x804a: 0x40020220, 0x804b: 0x40020420, + 0x804c: 0x40020620, 0x804d: 0x40020820, 0x804e: 0xa0000000, 0x804f: 0xa0000000, + 0x8050: 0xa0000000, 0x8051: 0xa0000000, 0x8052: 0xa0000000, 0x8053: 0xa0000000, + 0x8054: 0xa0000000, 0x8055: 0xa0000000, 0x8056: 0xa0000000, 0x8057: 0xa0000000, + 0x8058: 0xa0000000, 0x8059: 0xa0000000, 0x805a: 0xa0000000, 0x805b: 0xa0000000, + 0x805c: 0xa0000000, 0x805d: 0xa0000000, 0x805e: 0xa0000000, 0x805f: 0xa0000000, + 0x8060: 0x40021220, 0x8061: 0x4002ba20, 0x8062: 0x4003e020, 0x8063: 0x4004ea20, + 0x8064: 0x4027de20, 0x8065: 0x4004ec20, 0x8066: 0x4004e620, 0x8067: 0x4003d220, + 0x8068: 0x4003f420, 0x8069: 0x4003f620, 0x806a: 0x4004d820, 0x806b: 0x40093820, + 0x806c: 0x40024020, 0x806d: 0x40021a20, 0x806e: 0x4002e420, 0x806f: 0x4004e220, + 0x8070: 0x4029cc20, 0x8071: 0x4029ce20, 0x8072: 0x4029d020, 0x8073: 0x4029d220, + 0x8074: 0x4029d420, 0x8075: 0x4029d620, 0x8076: 0x4029d820, 0x8077: 0x4029da20, + 0x8078: 0x4029dc20, 0x8079: 0x4029de20, 0x807a: 0x40026c20, 0x807b: 0x40026220, + 0x807c: 0x40094020, 0x807d: 0x40094220, 0x807e: 0x40094420, 0x807f: 0x4002c420, + // Block 0x202, offset 0x8080 + 0x8080: 0x4004d620, 0x8081: 0xc3a80071, 0x8082: 0x002c0a88, 0x8083: 0x002c3a88, + 0x8084: 0x002c6288, 0x8085: 0x002c9888, 0x8086: 0x002d0888, 0x8087: 0x002d2288, + 0x8088: 0x002d6888, 0x8089: 0x002d9a88, 0x808a: 0x002dcc88, 0x808b: 0x002dfe88, + 0x808c: 0xc0030002, 0x808d: 0x002e8288, 0x808e: 0x002e9e88, 0x808f: 0xc3ac0071, + 0x8090: 0x002f2c88, 0x8091: 0x002f5688, 0x8092: 0x002f7a88, 0x8093: 0x002fe688, + 0x8094: 0x00302c88, 0x8095: 0xc3b00071, 0x8096: 0x0030be88, 0x8097: 0x0030e288, + 0x8098: 0x0030f688, 0x8099: 0x00310088, 0x809a: 0x00312a88, 0x809b: 0x4003f820, + 0x809c: 0x4004e420, 0x809d: 0x4003fa20, 0x809e: 0x40062420, 0x809f: 0x40021620, + 0x80a0: 0x40061e20, 0x80a1: 0xc3a60071, 0x80a2: 0x402c0a20, 0x80a3: 0x402c3a20, + 0x80a4: 0x402c6220, 0x80a5: 0x402c9820, 0x80a6: 0x402d0820, 0x80a7: 0x402d2220, + 0x80a8: 0x402d6820, 0x80a9: 0x402d9a20, 0x80aa: 0x402dcc20, 0x80ab: 0x402dfe20, + 0x80ac: 0xc0000002, 0x80ad: 0x402e8220, 0x80ae: 0x402e9e20, 0x80af: 0xc3aa0071, + 0x80b0: 0x402f2c20, 0x80b1: 0x402f5620, 0x80b2: 0x402f7a20, 0x80b3: 0x402fe620, + 0x80b4: 0x40302c20, 0x80b5: 0xc3ae0071, 0x80b6: 0x4030be20, 0x80b7: 0x4030e220, + 0x80b8: 0x4030f620, 0x80b9: 0x40310020, 0x80ba: 0x40312a20, 0x80bb: 0x4003fc20, + 0x80bc: 0x40094820, 0x80bd: 0x4003fe20, 0x80be: 0x40094c20, 0x80bf: 0xa0000000, + // Block 0x203, offset 0x80c0 + 0x80c0: 0xe00008f5, 0x80c1: 0xe00008ef, 0x80c2: 0xe0000921, 0x80c3: 0xe0000969, + 0x80c4: 0xe00029bb, 0x80c5: 0xe000094d, 0x80c6: 0xe00009dd, 0x80c7: 0xe0000a53, + 0x80c8: 0xe0000ae8, 0x80c9: 0xe0000ae2, 0x80ca: 0xe0000af4, 0x80cb: 0xe0000b20, + 0x80cc: 0xe0000c2b, 0x80cd: 0xe0000c25, 0x80ce: 0xe0000c37, 0x80cf: 0xe0000c43, + 0x80d0: 0xe0000ab3, 0x80d1: 0xe0000d63, 0x80d2: 0xe0000d9a, 0x80d3: 0xe0000d94, + 0x80d4: 0xe0000da6, 0x80d5: 0xe0000de6, 0x80d6: 0xe00029c9, 0x80d7: 0x40093e20, + 0x80d8: 0xe0000e12, 0x80d9: 0xe0000fe1, 0x80da: 0xe0000fdb, 0x80db: 0xe0000fed, + 0x80dc: 0xe00029df, 0x80dd: 0xe0001102, 0x80de: 0x00318888, 0x80df: 0xe0000f7b, + 0x80e0: 0xe00008f2, 0x80e1: 0xe00008ec, 0x80e2: 0xe000091e, 0x80e3: 0xe0000966, + 0x80e4: 0xe00029b8, 0x80e5: 0xe000094a, 0x80e6: 0xe00009d5, 0x80e7: 0xe0000a4d, + 0x80e8: 0xe0000ae5, 0x80e9: 0xe0000adf, 0x80ea: 0xe0000af1, 0x80eb: 0xe0000b1d, + 0x80ec: 0xe0000c28, 0x80ed: 0xe0000c22, 0x80ee: 0xe0000c34, 0x80ef: 0xe0000c40, + 0x80f0: 0xe0000aad, 0x80f1: 0xe0000d60, 0x80f2: 0xe0000d97, 0x80f3: 0xe0000d91, + 0x80f4: 0xe0000da3, 0x80f5: 0xe0000de3, 0x80f6: 0xe00029c6, 0x80f7: 0x40093c20, + 0x80f8: 0xe0000e0f, 0x80f9: 0xe0000fde, 0x80fa: 0xe0000fd8, 0x80fb: 0xe0000fea, + 0x80fc: 0xe00029dc, 0x80fd: 0xe00010ff, 0x80fe: 0x40318820, 0x80ff: 0xe0001114, + // Block 0x204, offset 0x8100 + 0x8100: 0x40321220, 0x8101: 0x40321a20, 0x8102: 0x40322220, 0x8103: 0x40322a20, + 0x8104: 0xe0000ad5, 0x8105: 0xe0000ad1, 0x8106: 0xe0000acd, 0x8107: 0xf0000a0a, + 0x8108: 0xf000040a, 0x8109: 0xf0000404, 0x810a: 0xf0000a0a, 0x810b: 0xf000040a, + 0x810c: 0xf0000404, 0x810d: 0xe0000947, 0x810e: 0xe0000944, 0x810f: 0xe0000c3d, + 0x8110: 0xe0000c3a, 0x8111: 0xe0000dcc, 0x8112: 0xe0000dc9, 0x8113: 0xe0000ff3, + 0x8114: 0xe0000ff0, 0x8115: 0xe00029fe, 0x8116: 0xe00029fa, 0x8117: 0xe00029e6, + 0x8118: 0xe00029e2, 0x8119: 0xe00029f6, 0x811a: 0xe00029f2, 0x811b: 0xe00029ee, + 0x811c: 0xe00029ea, 0x811d: 0x402cae20, 0x811e: 0xe00029c2, 0x811f: 0xe00029be, + 0x8120: 0xe0000976, 0x8121: 0xe0000972, 0x8122: 0xe00009f4, 0x8123: 0xe00009ef, + 0x8124: 0x002d3a88, 0x8125: 0x402d3a20, 0x8126: 0xe0000bbe, 0x8127: 0xe0000bbb, + 0x8128: 0xe0000c99, 0x8129: 0xe0000c96, 0x812a: 0xe0000e20, 0x812b: 0xe0000e1d, + 0x812c: 0xe0000e27, 0x812d: 0xe0000e23, 0x812e: 0xe0001162, 0x812f: 0xe000115f, + 0x8130: 0xe0000c8d, 0x8131: 0xf0000a0a, 0x8132: 0xf000040a, 0x8133: 0xf0000404, + 0x8134: 0xe0000bac, 0x8135: 0xe0000ba9, 0x8136: 0x002d7888, 0x8137: 0x00319488, + 0x8138: 0xe0000d57, 0x8139: 0xe0000d54, 0x813a: 0xe0000954, 0x813b: 0xe0000950, + 0x813c: 0xe00009ea, 0x813d: 0xe00009e5, 0x813e: 0xe0000e19, 0x813f: 0xe0000e15, + // Block 0x205, offset 0x8140 + 0x8140: 0xe000098f, 0x8141: 0xe000098c, 0x8142: 0xe0000995, 0x8143: 0xe0000992, + 0x8144: 0xe0000b62, 0x8145: 0xe0000b5f, 0x8146: 0xe0000b68, 0x8147: 0xe0000b65, + 0x8148: 0xe0000c6c, 0x8149: 0xe0000c69, 0x814a: 0xe0000c72, 0x814b: 0xe0000c6f, + 0x814c: 0xe0000e4a, 0x814d: 0xe0000e47, 0x814e: 0xe0000e50, 0x814f: 0xe0000e4d, + 0x8150: 0xe0000ee8, 0x8151: 0xe0000ee5, 0x8152: 0xe0000eee, 0x8153: 0xe0000eeb, + 0x8154: 0xe0001053, 0x8155: 0xe0001050, 0x8156: 0xe0001059, 0x8157: 0xe0001056, + 0x8158: 0xe0000f61, 0x8159: 0xe0000f5e, 0x815a: 0xe0000fa5, 0x815b: 0xe0000fa2, + 0x815c: 0x00312288, 0x815d: 0x40312220, 0x815e: 0xe0000bf4, 0x815f: 0xe0000bf1, + 0x8160: 0x002ebc88, 0x8161: 0x402c8c20, 0x8162: 0x002f2288, 0x8163: 0x402f2220, + 0x8164: 0x00314088, 0x8165: 0x40314020, 0x8166: 0xe000096f, 0x8167: 0xe000096c, + 0x8168: 0xe0000b32, 0x8169: 0xe0000b2f, 0x816a: 0xe00029d8, 0x816b: 0xe00029d4, + 0x816c: 0xe0000dfd, 0x816d: 0xe0000df9, 0x816e: 0xe0000e04, 0x816f: 0xe0000e01, + 0x8170: 0xe0000e0b, 0x8171: 0xe0000e07, 0x8172: 0xe0001129, 0x8173: 0xe0001126, + 0x8174: 0x402e5e20, 0x8175: 0x402ed020, 0x8176: 0x40305a20, 0x8177: 0x402dd420, + 0x8178: 0xe0000abf, 0x8179: 0xe0000ec4, 0x817a: 0x002be888, 0x817b: 0x002c4488, + 0x817c: 0x402c4420, 0x817d: 0x002e3888, 0x817e: 0x00303e88, 0x817f: 0x402ffc20, + // Block 0x206, offset 0x8180 + 0x8180: 0xe0000d24, 0x8181: 0xe0000d21, 0x8182: 0xe0000d2a, 0x8183: 0xe0000d27, + 0x8184: 0xe0000d69, 0x8185: 0xe0000d66, 0x8186: 0xe0000d7b, 0x8187: 0xe0000d78, + 0x8188: 0xe0000d87, 0x8189: 0xe0000d84, 0x818a: 0xe0000d81, 0x818b: 0xe0000d7e, + 0x818c: 0xe0000ded, 0x818d: 0xe0000de9, 0x818e: 0xe00029d0, 0x818f: 0xe00029cc, + 0x8190: 0xe0000e3d, 0x8191: 0xe0000e39, 0x8192: 0xe0000e35, 0x8193: 0xe0000e31, + 0x8194: 0xe0000ea7, 0x8195: 0xe0000ea4, 0x8196: 0xe0000ead, 0x8197: 0xe0000eaa, + 0x8198: 0xe0000ed6, 0x8199: 0xe0000ed3, 0x819a: 0xe0000ef4, 0x819b: 0xe0000ef1, + 0x819c: 0xe0000efb, 0x819d: 0xe0000ef7, 0x819e: 0xe0000f02, 0x819f: 0xe0000eff, + 0x81a0: 0xe0000f41, 0x81a1: 0xe0000f3e, 0x81a2: 0xe0000f53, 0x81a3: 0xe0000f50, + 0x81a4: 0xe0000f26, 0x81a5: 0xe0000f22, 0x81a6: 0xe0000f3a, 0x81a7: 0xe0000f36, + 0x81a8: 0xe0000f5a, 0x81a9: 0xe0000f56, 0x81aa: 0xe0000f93, 0x81ab: 0xe0000f90, + 0x81ac: 0xe0000f9f, 0x81ad: 0xe0000f9c, 0x81ae: 0xe0000fb1, 0x81af: 0xe0000fae, + 0x81b0: 0xe0000fab, 0x81b1: 0xe0000fa8, 0x81b2: 0xe0001093, 0x81b3: 0xe0001090, + 0x81b4: 0xe000109f, 0x81b5: 0xe000109c, 0x81b6: 0xe0001099, 0x81b7: 0xe0001096, + 0x81b8: 0xe0001032, 0x81b9: 0xe000102e, 0x81ba: 0xe00029fe, 0x81bb: 0xe00029fa, + 0x81bc: 0xe00010a9, 0x81bd: 0xe00010a6, 0x81be: 0xe00010af, 0x81bf: 0xe00010ac, + // Block 0x207, offset 0x81c0 + 0x81c0: 0x40078220, 0x81c1: 0x40075e20, 0x81c2: 0x40076020, 0x81c3: 0x40076220, + 0x81c4: 0x40058220, 0x81c5: 0x40058420, 0x81c6: 0x40058620, 0x81c7: 0x40058820, + 0x81c8: 0x40058a20, 0x81c9: 0x40058c20, 0x81ca: 0x40058e20, 0x81cb: 0x4027bc20, + 0x81cc: 0x0027bc83, 0x81cd: 0x4027bc21, 0x81ce: 0x4027bc22, 0x81cf: 0x4027bc23, + 0x81d0: 0x4027bc24, 0x81d1: 0x4027bc25, 0x81d2: 0x4005a020, 0x81d3: 0x40076420, + 0x81d4: 0x4027bc26, 0x81d5: 0x40076620, 0x81d6: 0x40076820, 0x81d7: 0x40076a20, + 0x81d8: 0xadc00000, 0x81d9: 0xadc00000, 0x81da: 0x40076c20, 0x81db: 0x40076e20, + 0x81dc: 0x40077020, 0x81dd: 0x40077220, 0x81de: 0x40077420, 0x81df: 0x40077620, + 0x81e0: 0xe00001a0, 0x81e1: 0xe0000234, 0x81e2: 0xe000034c, 0x81e3: 0xe0000426, + 0x81e4: 0xe00004fb, 0x81e5: 0xe00005c5, 0x81e6: 0xe0000690, 0x81e7: 0xe0000738, + 0x81e8: 0xe00007e4, 0x81e9: 0xe0000889, 0x81ea: 0xe0000237, 0x81eb: 0xe000034f, + 0x81ec: 0xe0000429, 0x81ed: 0xe00004fe, 0x81ee: 0xe00005c8, 0x81ef: 0xe0000693, + 0x81f0: 0xe000073b, 0x81f1: 0xe00007e7, 0x81f2: 0xe000088c, 0x81f3: 0xe00001a3, + 0x81f4: 0x4027bc27, 0x81f5: 0xadc00000, 0x81f6: 0x40077a20, 0x81f7: 0xadc00000, + 0x81f8: 0x40077c20, 0x81f9: 0xae611002, 0x81fa: 0x40040020, 0x81fb: 0x40040220, + 0x81fc: 0x40040420, 0x81fd: 0x40040620, 0x81fe: 0xa0000000, 0x81ff: 0xa0000000, + // Block 0x208, offset 0x8200 + 0x8200: 0x404a7620, 0x8201: 0x404a7c20, 0x8202: 0xc4db2161, 0x8203: 0xe0002a23, + 0x8204: 0x404a8420, 0x8205: 0x404a8820, 0x8206: 0x404a8c20, 0x8207: 0x404a9020, + 0x8209: 0x404a9420, 0x820a: 0x004aa883, 0x820b: 0x004aac83, + 0x820c: 0x004ab083, 0x820d: 0xe0002a5b, 0x820e: 0x004ab483, 0x820f: 0x404aa820, + 0x8210: 0x404aac20, 0x8211: 0xc3b50c31, 0x8212: 0xe0002a58, 0x8213: 0x404ab420, + 0x8214: 0x404ab820, 0x8215: 0x404abc20, 0x8216: 0xc3ff1211, 0x8217: 0xe0002a7c, + 0x8218: 0xc46018e1, 0x8219: 0x404ac820, 0x821a: 0x404acc20, 0x821b: 0x404ad020, + 0x821c: 0xe0002a9d, 0x821d: 0x404ad420, 0x821e: 0x404ad820, 0x821f: 0x404adc20, + 0x8220: 0xc49b1d01, 0x8221: 0x404ae420, 0x8222: 0xc4481761, 0x8223: 0xc4551831, + 0x8224: 0x404af220, 0x8225: 0x004af283, 0x8226: 0xc48f1c51, 0x8227: 0x404afe20, + 0x8228: 0x404b0220, 0x8229: 0xe0002a02, 0x822a: 0x004ae883, 0x822b: 0x404a7a20, + 0x822c: 0x404aec20, + 0x8231: 0xc5270751, 0x8232: 0x8282258c, 0x8233: 0x8281258d, + 0x8234: 0x82842590, 0x8235: 0x82812591, 0x8236: 0x404b2420, 0x8237: 0x404b2620, + 0x8238: 0x404b2820, 0x8239: 0x404b2a20, 0x823a: 0x82822596, 0x823b: 0x83822596, + 0x823c: 0x82822598, 0x823d: 0x83822598, 0x823e: 0x004ac483, 0x823f: 0xae611102, + // Block 0x209, offset 0x8240 + 0x8240: 0x8382258c, 0x8241: 0x8281258f, 0x8242: 0x004ac484, 0x8243: 0x004ac485, + 0x8244: 0xae610e02, 0x8245: 0xae611202, 0x8246: 0xae600000, 0x8247: 0xae600000, + 0x8248: 0xc3b20c01, 0x8249: 0xc5122551, 0x824a: 0xae611502, 0x824b: 0xc5102521, + 0x824c: 0x404b0e20, 0x824d: 0x404b0820, 0x824e: 0x404b0c20, 0x824f: 0x404b1020, + 0x8250: 0x82822599, 0x8251: 0x8282259a, 0x8252: 0x8282259b, 0x8253: 0xe0002ac7, + 0x8254: 0x8282259c, 0x8255: 0x8282259d, 0x8256: 0x8282259e, 0x8257: 0x8282259f, + 0x8259: 0x828225a0, 0x825a: 0x838225a1, 0x825b: 0x838225a2, + 0x825c: 0x838225a3, 0x825d: 0xe0002acd, 0x825e: 0x838225a4, 0x825f: 0x828225a1, + 0x8260: 0x828225a2, 0x8261: 0x828225a3, 0x8262: 0xe0002aca, 0x8263: 0x828225a4, + 0x8264: 0x828225a5, 0x8265: 0x828225a6, 0x8266: 0x828225a7, 0x8267: 0xe0002ad0, + 0x8268: 0x828225a8, 0x8269: 0x828225a9, 0x826a: 0x828225aa, 0x826b: 0x828225ab, + 0x826c: 0xe0002ad3, 0x826d: 0x828225ac, 0x826e: 0x828225ad, 0x826f: 0x828225ae, + 0x8270: 0x828225af, 0x8271: 0x828225b0, 0x8272: 0xc5152581, 0x8273: 0xc51e2581, + 0x8274: 0x828225b3, 0x8275: 0x838225b3, 0x8276: 0x828225b4, 0x8277: 0x828225b5, + 0x8278: 0x828225b6, 0x8279: 0xe0002ac4, 0x827a: 0x838225ac, 0x827b: 0x838225b0, + 0x827c: 0x838225b1, 0x827e: 0x40077e20, 0x827f: 0x40078020, + // Block 0x20a, offset 0x8280 + 0x8280: 0xa0000000, 0x8281: 0xa0000000, 0x8282: 0xa0000000, 0x8283: 0xa0000000, + 0x8284: 0xa0000000, 0x8285: 0xa0000000, 0x8286: 0xa0000000, 0x8287: 0xa0000000, + 0x8288: 0xa0000000, 0x8289: 0x40020020, 0x828a: 0x40020220, 0x828b: 0x40020420, + 0x828c: 0x40020620, 0x828d: 0x40020820, 0x828e: 0xa0000000, 0x828f: 0xa0000000, + 0x8290: 0xa0000000, 0x8291: 0xa0000000, 0x8292: 0xa0000000, 0x8293: 0xa0000000, + 0x8294: 0xa0000000, 0x8295: 0xa0000000, 0x8296: 0xa0000000, 0x8297: 0xa0000000, + 0x8298: 0xa0000000, 0x8299: 0xa0000000, 0x829a: 0xa0000000, 0x829b: 0xa0000000, + 0x829c: 0xa0000000, 0x829d: 0xa0000000, 0x829e: 0xa0000000, 0x829f: 0xa0000000, + 0x82a0: 0x40021220, 0x82a1: 0x4002ba20, 0x82a2: 0x4003e020, 0x82a3: 0x4004ea20, + 0x82a4: 0x4027de20, 0x82a5: 0x4004ec20, 0x82a6: 0x4004e620, 0x82a7: 0x4003d220, + 0x82a8: 0x4003f420, 0x82a9: 0x4003f620, 0x82aa: 0x4004d820, 0x82ab: 0x40093820, + 0x82ac: 0x40024020, 0x82ad: 0x40021a20, 0x82ae: 0x4002e420, 0x82af: 0x4004e220, + 0x82b0: 0x4029cc20, 0x82b1: 0x4029ce20, 0x82b2: 0x4029d020, 0x82b3: 0x4029d220, + 0x82b4: 0x4029d420, 0x82b5: 0x4029d620, 0x82b6: 0x4029d820, 0x82b7: 0x4029da20, + 0x82b8: 0x4029dc20, 0x82b9: 0x4029de20, 0x82ba: 0x40026c20, 0x82bb: 0x40026220, + 0x82bc: 0x40094020, 0x82bd: 0x40094220, 0x82be: 0x40094420, 0x82bf: 0x4002c420, + // Block 0x20b, offset 0x82c0 + 0x82c0: 0x4004d620, 0x82c1: 0x002bde88, 0x82c2: 0x002c0a88, 0x82c3: 0x002c3a88, + 0x82c4: 0xc36a2662, 0x82c5: 0x002c9888, 0x82c6: 0x002d0888, 0x82c7: 0xc52b2692, + 0x82c8: 0x002d6888, 0x82c9: 0x002d9a88, 0x82ca: 0x002dcc88, 0x82cb: 0xc53026c2, + 0x82cc: 0xc0030002, 0x82cd: 0x002e8288, 0x82ce: 0xc53526f2, 0x82cf: 0x002ee288, + 0x82d0: 0x002f2c88, 0x82d1: 0x002f5688, 0x82d2: 0x002f7a88, 0x82d3: 0x002fe688, + 0x82d4: 0xc38a2722, 0x82d5: 0x00306c88, 0x82d6: 0x0030be88, 0x82d7: 0x0030e288, + 0x82d8: 0x002d6a83, 0x82d9: 0x00310088, 0x82da: 0x00312a88, 0x82db: 0x4003f820, + 0x82dc: 0x4004e420, 0x82dd: 0x4003fa20, 0x82de: 0x40062420, 0x82df: 0x40021620, + 0x82e0: 0x40061e20, 0x82e1: 0x402bde20, 0x82e2: 0x402c0a20, 0x82e3: 0x402c3a20, + 0x82e4: 0xc3682651, 0x82e5: 0x402c9820, 0x82e6: 0x402d0820, 0x82e7: 0xc3372681, + 0x82e8: 0x402d6820, 0x82e9: 0x402d9a20, 0x82ea: 0x402dcc20, 0x82eb: 0xc52e26b1, + 0x82ec: 0xc0000002, 0x82ed: 0x402e8220, 0x82ee: 0xc53326e1, 0x82ef: 0x402ee220, + 0x82f0: 0x402f2c20, 0x82f1: 0x402f5620, 0x82f2: 0x402f7a20, 0x82f3: 0x402fe620, + 0x82f4: 0xc3882711, 0x82f5: 0x40306c20, 0x82f6: 0x4030be20, 0x82f7: 0x4030e220, + 0x82f8: 0x402d6a20, 0x82f9: 0x40310020, 0x82fa: 0x40312a20, 0x82fb: 0x4003fc20, + 0x82fc: 0x40094820, 0x82fd: 0x4003fe20, 0x82fe: 0x40094c20, 0x82ff: 0xa0000000, + // Block 0x20c, offset 0x8300 + 0x8300: 0xe00008f5, 0x8301: 0xe00008ef, 0x8302: 0xe0002ad9, 0x8303: 0xe0000969, + 0x8304: 0xe000095b, 0x8305: 0xe000094d, 0x8306: 0xe00009dd, 0x8307: 0xe0000a53, + 0x8308: 0xe0000ae8, 0x8309: 0xe0000ae2, 0x830a: 0xe0002b0d, 0x830b: 0xe0000b20, + 0x830c: 0xe0000c2b, 0x830d: 0xe0000c25, 0x830e: 0xe0002b47, 0x830f: 0xe0000c43, + 0x8310: 0xe0000ab3, 0x8311: 0xe0000d63, 0x8312: 0xe0000d9a, 0x8313: 0xe0000d94, + 0x8314: 0xe0002b53, 0x8315: 0xe0000de6, 0x8316: 0xe0000dd2, 0x8317: 0x40093e20, + 0x8318: 0xe0000e12, 0x8319: 0xe0000fe1, 0x831a: 0xe0000fdb, 0x831b: 0xe0002b87, + 0x831c: 0xe0000fff, 0x831d: 0xe0001102, 0x831e: 0x00318888, 0x831f: 0xe0000f7b, + 0x8320: 0xe00008f2, 0x8321: 0xe00008ec, 0x8322: 0xe0002ad6, 0x8323: 0xe0000966, + 0x8324: 0xe0000958, 0x8325: 0xe000094a, 0x8326: 0xe00009d5, 0x8327: 0xe0000a4d, + 0x8328: 0xe0000ae5, 0x8329: 0xe0000adf, 0x832a: 0xe0002b0a, 0x832b: 0xe0000b1d, + 0x832c: 0xe0000c28, 0x832d: 0xe0000c22, 0x832e: 0xe0002b44, 0x832f: 0xe0000c40, + 0x8330: 0xe0000aad, 0x8331: 0xe0000d60, 0x8332: 0xe0000d97, 0x8333: 0xe0000d91, + 0x8334: 0xe0002b50, 0x8335: 0xe0000de3, 0x8336: 0xe0000dcf, 0x8337: 0x40093c20, + 0x8338: 0xe0000e0f, 0x8339: 0xe0000fde, 0x833a: 0xe0000fd8, 0x833b: 0xe0002b84, + 0x833c: 0xe0000ffc, 0x833d: 0xe00010ff, 0x833e: 0x40318820, 0x833f: 0xe0001114, + // Block 0x20d, offset 0x8340 + 0x8340: 0xe0000983, 0x8341: 0xe0000980, 0x8342: 0xe00008fb, 0x8343: 0xe00008f8, + 0x8344: 0xe000097d, 0x8345: 0xe000097a, 0x8346: 0xe0000a38, 0x8347: 0xe0000a35, + 0x8348: 0xe0002b07, 0x8349: 0xe0002b04, 0x834a: 0xe0000a4a, 0x834b: 0xe0000a47, + 0x834c: 0xe0000a44, 0x834d: 0xe0000a41, 0x834e: 0xe0000a86, 0x834f: 0xe0000a83, + 0x8350: 0xe0000aaa, 0x8351: 0xe0000aa7, 0x8352: 0xe0000b46, 0x8353: 0xe0000b43, + 0x8354: 0xe0000aee, 0x8355: 0xe0000aeb, 0x8356: 0xe0000b2c, 0x8357: 0xe0000b29, + 0x8358: 0xe0000b40, 0x8359: 0xe0000b3d, 0x835a: 0xe0000b1a, 0x835b: 0xe0000b17, + 0x835c: 0xe0002b3b, 0x835d: 0xe0002b38, 0x835e: 0xe0000bb2, 0x835f: 0xe0000baf, + 0x8360: 0xe0000bc4, 0x8361: 0xe0000bc1, 0x8362: 0xe0000bca, 0x8363: 0xe0000bc7, + 0x8364: 0xe0002b41, 0x8365: 0xe0002b3e, 0x8366: 0xe0000c1b, 0x8367: 0xe0000c18, + 0x8368: 0xe0000c51, 0x8369: 0xe0000c4e, 0x836a: 0xe0000c60, 0x836b: 0xe0000c5d, + 0x836c: 0xe0000c31, 0x836d: 0xe0000c2e, 0x836e: 0xe0000c5a, 0x836f: 0xe0000c57, + 0x8370: 0xe0000c54, 0x8371: 0x402da220, 0x8372: 0xf0000a0a, 0x8373: 0xf0000404, + 0x8374: 0xe0002b4d, 0x8375: 0xe0002b4a, 0x8376: 0xe0000c9f, 0x8377: 0xe0000c9c, + 0x8378: 0x402f7220, 0x8379: 0xe0000ccc, 0x837a: 0xe0000cc9, 0x837b: 0xe0000cd8, + 0x837c: 0xe0000cd5, 0x837d: 0xe0000cd2, 0x837e: 0xe0000ccf, 0x837f: 0xe0000d04, + // Block 0x20e, offset 0x8380 + 0x8380: 0xe0000cfe, 0x8381: 0xe0000cf8, 0x8382: 0xe0000cf5, 0x8383: 0xe0000d51, + 0x8384: 0xe0000d4e, 0x8385: 0xe0000d6f, 0x8386: 0xe0000d6c, 0x8387: 0xe0000d5d, + 0x8388: 0xe0000d5a, 0x8389: 0xf0000404, 0x838a: 0x002ea283, 0x838b: 0x402ea220, + 0x838c: 0xe0000e2e, 0x838d: 0xe0000e2b, 0x838e: 0xe0000da0, 0x838f: 0xe0000d9d, + 0x8390: 0xe0000de0, 0x8391: 0xe0000ddd, 0x8392: 0xe0000e93, 0x8393: 0xe0000e8f, + 0x8394: 0xe0000eca, 0x8395: 0xe0000ec7, 0x8396: 0xe0000edc, 0x8397: 0xe0000ed9, + 0x8398: 0xe0000ed0, 0x8399: 0xe0000ecd, 0x839a: 0xe0000f1f, 0x839b: 0xe0000f1c, + 0x839c: 0xe0002b81, 0x839d: 0xe0002b7e, 0x839e: 0xe0000f47, 0x839f: 0xe0000f44, + 0x83a0: 0xe0000f33, 0x83a1: 0xe0000f30, 0x83a2: 0xe0000f99, 0x83a3: 0xe0000f96, + 0x83a4: 0xe0000f8a, 0x83a5: 0xe0000f87, 0x83a6: 0x00303688, 0x83a7: 0x40303620, + 0x83a8: 0xe000102b, 0x83a9: 0xe0001028, 0x83aa: 0xe000103f, 0x83ab: 0xe000103c, + 0x83ac: 0xe0000fe7, 0x83ad: 0xe0000fe4, 0x83ae: 0xe0000ff9, 0x83af: 0xe0000ff6, + 0x83b0: 0xe0001025, 0x83b1: 0xe0001022, 0x83b2: 0xe0001039, 0x83b3: 0xe0001036, + 0x83b4: 0xe0002b8d, 0x83b5: 0xe0002b8a, 0x83b6: 0xe0002b93, 0x83b7: 0xe0002b90, + 0x83b8: 0xe0001117, 0x83b9: 0xe000113b, 0x83ba: 0xe0001138, 0x83bb: 0xe000114d, + 0x83bc: 0xe000114a, 0x83bd: 0xe0001147, 0x83be: 0xe0001144, 0x83bf: 0xe0000f64, + // Block 0x20f, offset 0x83c0 + 0x83c0: 0x402c1a20, 0x83c1: 0x002c2a88, 0x83c2: 0x002c3288, 0x83c3: 0x402c3220, + 0x83c4: 0x0031c488, 0x83c5: 0x4031c420, 0x83c6: 0x002ee483, 0x83c7: 0x002c4e88, + 0x83c8: 0x402c4e20, 0x83c9: 0x002c6683, 0x83ca: 0x002c7a88, 0x83cb: 0x002c8488, + 0x83cc: 0x402c8420, 0x83cd: 0xe000115c, 0x83ce: 0x002cae88, 0x83cf: 0x002cb888, + 0x83d0: 0x002c9a83, 0x83d1: 0x002d0a83, 0x83d2: 0x402d0a20, 0x83d3: 0x002d4488, + 0x83d4: 0x002d2683, 0x83d5: 0x402d7820, 0x83d6: 0x002dc288, 0x83d7: 0x002db688, + 0x83d8: 0x002e0a88, 0x83d9: 0x402e0a20, 0x83da: 0x402e3820, 0x83db: 0x402e7220, + 0x83dc: 0x0030a088, 0x83dd: 0x002eb488, 0x83de: 0x402ebc20, 0x83df: 0x002f1088, + 0x83e0: 0xe0000e56, 0x83e1: 0xe0000e53, 0x83e2: 0x002d6088, 0x83e3: 0x402d6020, + 0x83e4: 0x002f3e88, 0x83e5: 0x402f3e20, 0x83e6: 0x002f8288, 0x83e7: 0x0031b488, + 0x83e8: 0x4031b420, 0x83e9: 0x00300888, 0x83ea: 0x40301220, 0x83eb: 0x40304220, + 0x83ec: 0x00304a88, 0x83ed: 0x40304a20, 0x83ee: 0x00305288, 0x83ef: 0xe000105f, + 0x83f0: 0xe000105c, 0x83f1: 0x0030b488, 0x83f2: 0x0030c083, 0x83f3: 0x00311888, + 0x83f4: 0x40311820, 0x83f5: 0x00313488, 0x83f6: 0x40313420, 0x83f7: 0x00316488, + 0x83f8: 0x00316e88, 0x83f9: 0x40316e20, 0x83fa: 0x40317820, 0x83fb: 0x4031a620, + 0x83fc: 0x0031bc88, 0x83fd: 0x4031bc20, 0x83fe: 0xe0000fc9, 0x83ff: 0x40319420, + // Block 0x210, offset 0x8400 + 0x8400: 0x40315820, 0x8401: 0x0031d488, 0x8402: 0x4031d420, 0x8403: 0x002c1a88, + 0x8404: 0x00307c88, 0x8405: 0x0030da88, 0x8406: 0x002ca288, 0x8407: 0x402ca220, + 0x8408: 0x002dde88, 0x8409: 0x402dde20, 0x840a: 0x002f6a88, 0x840b: 0x402f6a20, + 0x840c: 0x002f8e88, 0x840d: 0x402f8e20, 0x840e: 0x00311088, 0x840f: 0x40311020, + 0x8410: 0x402bf020, 0x8411: 0x402bf820, 0x8412: 0x402c0220, 0x8413: 0x402c2a20, + 0x8414: 0x402ee420, 0x8415: 0x402c5620, 0x8416: 0x402c6620, 0x8417: 0x402c7a20, + 0x8418: 0x402ccc20, 0x8419: 0x402cb820, 0x841a: 0x402cd420, 0x841b: 0x402c9a20, + 0x841c: 0x402cdc20, 0x841d: 0x402ce820, 0x841e: 0x402cf020, 0x841f: 0x402dee20, + 0x8420: 0x402d4420, 0x8421: 0x402d2a20, 0x8422: 0x402d3220, 0x8423: 0x402d2620, + 0x8424: 0x402d0020, 0x8425: 0x40308820, 0x8426: 0x402d8020, 0x8427: 0x402d8e20, + 0x8428: 0x402db620, 0x8429: 0x402dc220, 0x842a: 0x402daa20, 0x842b: 0x402e4220, + 0x842c: 0x402e4a20, 0x842d: 0x402e5420, 0x842e: 0x402e6820, 0x842f: 0x4030a020, + 0x8430: 0x4030ac20, 0x8431: 0x402e9020, 0x8432: 0x402eb420, 0x8433: 0x402ec820, + 0x8434: 0x402ea620, 0x8435: 0x402f1020, 0x8436: 0x402eee20, 0x8437: 0x402f1a20, + 0x8438: 0x402f4c20, 0x8439: 0x402f9820, 0x843a: 0x402fa220, 0x843b: 0x402fac20, + 0x843c: 0x402fb620, 0x843d: 0x402fbe20, 0x843e: 0x402fc620, 0x843f: 0x402fd020, + // Block 0x211, offset 0x8440 + 0x8440: 0x402f8220, 0x8441: 0x402fd820, 0x8442: 0x402ff420, 0x8443: 0x40300820, + 0x8444: 0x402df620, 0x8445: 0x40301a20, 0x8446: 0x40302420, 0x8447: 0x40306420, + 0x8448: 0x40305220, 0x8449: 0x40307c20, 0x844a: 0x4030b420, 0x844b: 0x4030c020, + 0x844c: 0x4030da20, 0x844d: 0x4030ee20, 0x844e: 0x402e7a20, 0x844f: 0x40310820, + 0x8450: 0x40314820, 0x8451: 0x40315020, 0x8452: 0x40316420, 0x8453: 0x40318020, + 0x8454: 0x4031cc20, 0x8455: 0x4031e820, 0x8456: 0x40320a20, 0x8457: 0x40323220, + 0x8458: 0x40323a20, 0x8459: 0x402c1220, 0x845a: 0x402cf820, 0x845b: 0x402d4c20, + 0x845c: 0x402d7020, 0x845d: 0x402de620, 0x845e: 0x402e1a20, 0x845f: 0x402e2a20, + 0x8460: 0x402f6220, 0x8461: 0x4031fa20, 0x8462: 0x40320220, 0x8463: 0xe0000aca, + 0x8464: 0xe0000adc, 0x8465: 0xe0000ad9, 0x8466: 0xe0000fcc, 0x8467: 0xe0000fcf, + 0x8468: 0xe0000fba, 0x8469: 0xe0000ba1, 0x846a: 0xe0000d11, 0x846b: 0xe0000d18, + 0x846c: 0x40324220, 0x846d: 0x40324a20, 0x846e: 0x40309020, 0x846f: 0x40309820, + 0x8470: 0x002d6894, 0x8471: 0x002d8094, 0x8472: 0x002dcc94, 0x8473: 0x002f7a94, + 0x8474: 0x002f9894, 0x8475: 0x002fac94, 0x8476: 0x002fd894, 0x8477: 0x0030e294, + 0x8478: 0x00310094, 0x8479: 0x40064020, 0x847a: 0x40064420, 0x847b: 0x402d9620, + 0x847c: 0x4031de20, 0x847d: 0x402d9820, 0x847e: 0x4031e220, 0x847f: 0x4031f020, + // Block 0x212, offset 0x8480 + 0x8480: 0xae603502, 0x8481: 0xae603202, 0x8482: 0xae604202, 0x8483: 0xae604e02, + 0x8484: 0xae605b02, 0x8485: 0xae606302, 0x8486: 0xae603702, 0x8487: 0xae605202, + 0x8488: 0xae604702, 0x8489: 0xae606402, 0x848a: 0xae604302, 0x848b: 0xae604d02, + 0x848c: 0xae604102, 0x848d: 0xae605f02, 0x848e: 0xae605f02, 0x848f: 0xae606502, + 0x8490: 0xae606602, 0x8491: 0xae606702, 0x8492: 0xae605f02, 0x8493: 0xae602202, + 0x8494: 0xae602a02, 0x8495: 0xae805f02, 0x8496: 0xadc06002, 0x8497: 0xadc06002, + 0x8498: 0xadc06002, 0x8499: 0xadc06002, 0x849a: 0xae805f02, 0x849b: 0xad806802, + 0x849c: 0xadc06002, 0x849d: 0xadc06002, 0x849e: 0xadc06002, 0x849f: 0xadc06002, + 0x84a0: 0xadc06002, 0x84a1: 0xaca06e02, 0x84a2: 0xaca06f02, 0x84a3: 0xadc07002, + 0x84a4: 0xadc07502, 0x84a5: 0xadc07602, 0x84a6: 0xadc07702, 0x84a7: 0xaca05602, + 0x84a8: 0xaca05902, 0x84a9: 0xadc06002, 0x84aa: 0xadc06002, 0x84ab: 0xadc06002, + 0x84ac: 0xadc06002, 0x84ad: 0xadc07802, 0x84ae: 0xadc07902, 0x84af: 0xadc06002, + 0x84b0: 0xadc07a02, 0x84b1: 0xadc07b02, 0x84b2: 0xadc02102, 0x84b3: 0xadc06002, + 0x84b4: 0xa0107c02, 0x84b5: 0xa0107d02, 0x84b6: 0xa0106102, 0x84b7: 0xa0106102, + 0x84b8: 0xa0105402, 0x84b9: 0xadc07e02, 0x84ba: 0xadc06002, 0x84bb: 0xadc06002, + 0x84bc: 0xadc06002, 0x84bd: 0xae605f02, 0x84be: 0xae605f02, 0x84bf: 0xae605f02, + // Block 0x213, offset 0x84c0 + 0x84c0: 0xe00010d2, 0x84c1: 0xe00010cf, 0x84c2: 0xe00010cc, 0x84c3: 0xe00010c9, + 0x84c4: 0xe00010e1, 0x84c5: 0xe00010de, 0x84c6: 0xe00010e7, 0x84c7: 0xe00010e4, + 0x84c8: 0xe00010ed, 0x84c9: 0xe00010ea, 0x84ca: 0xe0002912, 0x84cb: 0xe000290f, + 0x84cc: 0xe000290c, 0x84cd: 0xe0002909, 0x84ce: 0xe0001123, 0x84cf: 0xe0001120, + 0x84d0: 0xe0002b99, 0x84d1: 0xe0002b96, 0x84d2: 0xe0001153, 0x84d3: 0xe0001150, + 0x84d4: 0xe0001159, 0x84d5: 0xe0001156, 0x84d6: 0xe0000c15, 0x84d7: 0xe0000f8d, + 0x84d8: 0xe00010db, 0x84d9: 0xe0001111, 0x84da: 0xf0000404, 0x84db: 0xe0000f70, + 0x84dc: 0x40300420, 0x84dd: 0x40300620, 0x84de: 0xe0000f7f, 0x84df: 0x402c9620, + 0x84e0: 0xe000099b, 0x84e1: 0xe0000998, 0x84e2: 0xe0000989, 0x84e3: 0xe0000986, + 0x84e4: 0xe0002ae0, 0x84e5: 0xe0002adc, 0x84e6: 0xe0002ae8, 0x84e7: 0xe0002ae4, + 0x84e8: 0xe0002af8, 0x84e9: 0xe0002af4, 0x84ea: 0xe0002af0, 0x84eb: 0xe0002aec, + 0x84ec: 0xe0002b00, 0x84ed: 0xe0002afc, 0x84ee: 0xe0000902, 0x84ef: 0xe00008fe, + 0x84f0: 0xe000090a, 0x84f1: 0xe0000906, 0x84f2: 0xe000091a, 0x84f3: 0xe0000916, + 0x84f4: 0xe0000912, 0x84f5: 0xe000090e, 0x84f6: 0xe00009a2, 0x84f7: 0xe000099e, + 0x84f8: 0xe0000b6e, 0x84f9: 0xe0000b6b, 0x84fa: 0xe0000b5c, 0x84fb: 0xe0000b59, + 0x84fc: 0xe0000b26, 0x84fd: 0xe0000b23, 0x84fe: 0xe0002b14, 0x84ff: 0xe0002b10, + // Block 0x214, offset 0x8500 + 0x8500: 0xe0002b1c, 0x8501: 0xe0002b18, 0x8502: 0xe0002b2c, 0x8503: 0xe0002b28, + 0x8504: 0xe0002b24, 0x8505: 0xe0002b20, 0x8506: 0xe0002b34, 0x8507: 0xe0002b30, + 0x8508: 0xe0000c66, 0x8509: 0xe0000c63, 0x850a: 0xe0000c78, 0x850b: 0xe0000c75, + 0x850c: 0xe0000e84, 0x850d: 0xe0000e81, 0x850e: 0xe0000e44, 0x850f: 0xe0000e41, + 0x8510: 0xe0002b5a, 0x8511: 0xe0002b56, 0x8512: 0xe0002b62, 0x8513: 0xe0002b5e, + 0x8514: 0xe0002b72, 0x8515: 0xe0002b6e, 0x8516: 0xe0002b6a, 0x8517: 0xe0002b66, + 0x8518: 0xe0002b7a, 0x8519: 0xe0002b76, 0x851a: 0xe0000e5d, 0x851b: 0xe0000e59, + 0x851c: 0xe0000e65, 0x851d: 0xe0000e61, 0x851e: 0xe0000e75, 0x851f: 0xe0000e71, + 0x8520: 0xe0000e6d, 0x8521: 0xe0000e69, 0x8522: 0xe0000e7d, 0x8523: 0xe0000e79, + 0x8524: 0xe000108d, 0x8525: 0xe000108a, 0x8526: 0xe000104d, 0x8527: 0xe000104a, + 0x8528: 0xe0001066, 0x8529: 0xe0001062, 0x852a: 0xe000106e, 0x852b: 0xe000106a, + 0x852c: 0xe000107e, 0x852d: 0xe000107a, 0x852e: 0xe0001076, 0x852f: 0xe0001072, + 0x8530: 0xe0001086, 0x8531: 0xe0001082, 0x8532: 0xe0001108, 0x8533: 0xe0001105, + 0x8534: 0xe0001135, 0x8535: 0xe0001132, 0x8536: 0xe000112f, 0x8537: 0xe000112c, + 0x8538: 0xe000111d, 0x8539: 0xe000111a, 0x853a: 0xe0000d0a, 0x853b: 0xe0000d07, + 0x853c: 0x0030d888, 0x853d: 0x4030d820, 0x853e: 0x00312088, 0x853f: 0x40312020, + // Block 0x215, offset 0x8540 + 0x8540: 0x00093685, 0x8541: 0x40083620, 0x8542: 0x40083820, 0x8543: 0x40083a20, + 0x8544: 0x40083c20, 0x8545: 0x002c628b, 0x8546: 0x002c6285, 0x8547: 0x002c9885, + 0x8548: 0x002d9a85, 0x8549: 0x002dcc85, 0x854a: 0x40083e20, 0x854b: 0x400a6e20, + 0x854c: 0x40084020, 0x854d: 0xe00009c4, 0x854e: 0x402d1e20, 0x854f: 0x40084220, + 0x8550: 0xe00002cb, 0x8551: 0xe00002d3, 0x8552: 0xe00002b2, 0x8553: 0xe00002bb, + 0x8554: 0xe00003cd, 0x8555: 0xe00002c3, 0x8556: 0xe00003d1, 0x8557: 0xe00004ab, + 0x8558: 0xe0000579, 0x8559: 0xe00002c7, 0x855a: 0xe0000640, 0x855b: 0xe00002cf, + 0x855c: 0xe00004af, 0x855d: 0xe0000644, 0x855e: 0xe0000798, 0x855f: 0xf0001e1e, + 0x8560: 0x002d9a8a, 0x8561: 0xf0001f0a, 0x8562: 0xf0000a0a, 0x8563: 0xf0001f0a, + 0x8564: 0x0030be8a, 0x8565: 0xf0001f0a, 0x8566: 0xf0000a0a, 0x8567: 0xe00010bb, + 0x8568: 0xe00027f4, 0x8569: 0x0030f68a, 0x856a: 0xe0002883, 0x856b: 0xe000288a, + 0x856c: 0x002e228a, 0x856d: 0x002c3a8a, 0x856e: 0x002c628a, 0x856f: 0x002e828a, + 0x8570: 0x002d9a84, 0x8571: 0xf0001f04, 0x8572: 0xf0000404, 0x8573: 0xf0001f04, + 0x8574: 0x0030be84, 0x8575: 0xf0001f04, 0x8576: 0xf0000404, 0x8577: 0xe00010b6, + 0x8578: 0xe00027f1, 0x8579: 0x0030f684, 0x857a: 0xe0002880, 0x857b: 0xe0002886, + 0x857c: 0x002e2284, 0x857d: 0x002c3a84, 0x857e: 0x002c6284, 0x857f: 0x002e8284, + // Block 0x216, offset 0x8580 + 0x8580: 0xe0000024, 0x8581: 0xe0000029, 0x8582: 0xe000002e, 0x8583: 0xe0000033, + 0x8584: 0xe0000038, 0x8585: 0xe000003d, 0x8586: 0xe0000042, 0x8587: 0xe0000047, + 0x8588: 0xf0001f04, 0x8589: 0xf0001f04, 0x858a: 0xf0001f04, 0x858b: 0xf0001f04, + 0x858c: 0xf0001f04, 0x858d: 0xf0001f04, 0x858e: 0xf0001f04, 0x858f: 0xf0001f04, + 0x8590: 0xf0001f04, 0x8591: 0xf0000404, 0x8592: 0xf0000404, 0x8593: 0xf0000404, + 0x8594: 0xf0000404, 0x8595: 0xf0000404, 0x8596: 0xf0000404, 0x8597: 0xf0000404, + 0x8598: 0xf0000404, 0x8599: 0xf0000404, 0x859a: 0xf0000404, 0x859b: 0xf0000404, + 0x859c: 0xf0000404, 0x859d: 0xf0000404, 0x859e: 0xf0000404, 0x859f: 0xf0000404, + 0x85a0: 0xf0000404, 0x85a1: 0xf0000404, 0x85a2: 0xf0000404, 0x85a3: 0xf0000404, + 0x85a4: 0xf0000404, 0x85a5: 0xf0000404, 0x85a6: 0xf0000404, 0x85a7: 0xf0000404, + 0x85a8: 0xf0000404, 0x85a9: 0xf0000404, 0x85aa: 0xf0000404, 0x85ab: 0xf0000404, + 0x85ac: 0xf0000404, 0x85ad: 0xf0000404, 0x85ae: 0xf0000404, 0x85af: 0xf0000404, + 0x85b0: 0xf0000404, 0x85b1: 0xf0000404, 0x85b2: 0xf0000404, 0x85b3: 0xe00024e7, + 0x85b4: 0xf0000404, 0x85b5: 0xf0000404, 0x85b6: 0x002bde8c, 0x85b7: 0x002c0a8c, + 0x85b8: 0x002c3a8c, 0x85b9: 0x002c628c, 0x85ba: 0x002c988c, 0x85bb: 0x002d088c, + 0x85bc: 0x002d228c, 0x85bd: 0x002d688c, 0x85be: 0x002d9a8c, 0x85bf: 0x002dcc8c, + // Block 0x217, offset 0x85c0 + 0x85c0: 0xf0001d1c, 0x85c1: 0xf0001d1d, 0x85c2: 0xe00009b7, 0x85c3: 0xf0001c1d, + 0x85c4: 0xf0001c1c, 0x85c5: 0xf0001c1c, 0x85c6: 0xe0000a66, 0x85c7: 0xe0000a7a, + 0x85c8: 0xf0001d1c, 0x85c9: 0xf0001c1d, 0x85ca: 0xf0001c1c, 0x85cb: 0xf0001d1d, + 0x85cc: 0xf0001c1c, 0x85cd: 0xf0001d1d, 0x85ce: 0xf0001d1d, 0x85cf: 0xf0001c1c, + 0x85d0: 0xf0001c1c, 0x85d1: 0xf0001c1c, 0x85d2: 0xe0000d0d, 0x85d3: 0xe0002818, + 0x85d4: 0xf0001c1c, 0x85d5: 0xe0000d3a, 0x85d6: 0xe0000d46, 0x85d7: 0xf0001d1d, + 0x85d8: 0xe0000eb0, 0x85d9: 0xe0000eb8, 0x85da: 0xf0001d1d, 0x85db: 0xf0001c1c, + 0x85dc: 0xf0001c1d, 0x85dd: 0xf0001c1d, 0x85de: 0xe00010b2, 0x85df: 0xe00009c8, + 0x85e0: 0xf0001f04, 0x85e1: 0xf0001f04, 0x85e2: 0xf0001f04, 0x85e3: 0xf0001f04, + 0x85e4: 0xf0001f04, 0x85e5: 0xf0001f04, 0x85e6: 0xf0001f04, 0x85e7: 0xf0001f04, + 0x85e8: 0xf0001f04, 0x85e9: 0xf0000404, 0x85ea: 0xf0000404, 0x85eb: 0xf0000404, + 0x85ec: 0xf0000404, 0x85ed: 0xf0000404, 0x85ee: 0xf0000404, 0x85ef: 0xf0000404, + 0x85f0: 0xf0000404, 0x85f1: 0xf0000404, 0x85f2: 0xf0000404, 0x85f3: 0xf0000404, + 0x85f4: 0xf0000404, 0x85f5: 0xf0000404, 0x85f6: 0xf0000404, 0x85f7: 0xf0000404, + 0x85f8: 0xf0000404, 0x85f9: 0xf0000404, 0x85fa: 0xf0000404, 0x85fb: 0xf0000404, + 0x85fc: 0xf0000404, 0x85fd: 0xf0000404, 0x85fe: 0xf0000404, 0x85ff: 0xe0000bdf, + // Block 0x218, offset 0x8600 + 0x8600: 0xf0001f04, 0x8601: 0xf0001f04, 0x8602: 0xf0001f04, 0x8603: 0xf0001f04, + 0x8604: 0xf0001f04, 0x8605: 0xf0001f04, 0x8606: 0xf0001f04, 0x8607: 0xf0001f04, + 0x8608: 0xf0001f04, 0x8609: 0xf0001f04, 0x860a: 0xf0001f04, + 0x8610: 0xf0000a04, 0x8611: 0xf0000a04, 0x8612: 0xf0000a04, 0x8613: 0xf0000a04, + 0x8614: 0xf0000a04, 0x8615: 0xf0000a04, 0x8616: 0xf0000a04, 0x8617: 0xf0000a04, + 0x8618: 0xf0000a04, 0x8619: 0xf0000a04, 0x861a: 0xf0000a04, 0x861b: 0xf0000a04, + 0x861c: 0xf0000a04, 0x861d: 0xf0000a04, 0x861e: 0xf0000a04, 0x861f: 0xf0000a04, + 0x8620: 0xf0000a04, 0x8621: 0xf0000a04, 0x8622: 0xf0000a04, 0x8623: 0xf0000a04, + 0x8624: 0xf0000a04, 0x8625: 0xf0000a04, 0x8626: 0xf0000a04, 0x8627: 0xe00024eb, + 0x8628: 0xf0000a04, 0x8629: 0xf0000a04, 0x862a: 0xf0000a04, 0x862b: 0x002c3a8c, + 0x862c: 0x002f7a8c, 0x862d: 0xf0000c0c, 0x862e: 0xf0000c0c, + 0x8630: 0x002bde9d, 0x8631: 0x002c0a9d, 0x8632: 0x002c3a9d, 0x8633: 0x002c629d, + 0x8634: 0x002c989d, 0x8635: 0x002d089d, 0x8636: 0x002d229d, 0x8637: 0x002d689d, + 0x8638: 0x002d9a9d, 0x8639: 0x002dcc9d, 0x863a: 0x002dfe9d, 0x863b: 0x002e229d, + 0x863c: 0x002e829d, 0x863d: 0x002e9e9d, 0x863e: 0x002ee29d, 0x863f: 0x002f2c9d, + // Block 0x219, offset 0x8640 + 0x8640: 0xa0000000, 0x8641: 0xa0000000, 0x8642: 0xa0000000, 0x8643: 0xa0000000, + 0x8644: 0xa0000000, 0x8645: 0xa0000000, 0x8646: 0xa0000000, 0x8647: 0xa0000000, + 0x8648: 0xa0000000, 0x8649: 0x40020020, 0x864a: 0x40020220, 0x864b: 0x40020420, + 0x864c: 0x40020620, 0x864d: 0x40020820, 0x864e: 0xa0000000, 0x864f: 0xa0000000, + 0x8650: 0xa0000000, 0x8651: 0xa0000000, 0x8652: 0xa0000000, 0x8653: 0xa0000000, + 0x8654: 0xa0000000, 0x8655: 0xa0000000, 0x8656: 0xa0000000, 0x8657: 0xa0000000, + 0x8658: 0xa0000000, 0x8659: 0xa0000000, 0x865a: 0xa0000000, 0x865b: 0xa0000000, + 0x865c: 0xa0000000, 0x865d: 0xa0000000, 0x865e: 0xa0000000, 0x865f: 0xa0000000, + 0x8660: 0x402be020, 0x8661: 0x402be220, 0x8662: 0x402be420, 0x8663: 0x402be620, + 0x8664: 0x402be820, 0x8665: 0x402bea20, 0x8666: 0x402bec20, 0x8667: 0x402bee20, + 0x8668: 0x402bf020, 0x8669: 0x402bf220, 0x866a: 0x402bf420, 0x866b: 0x402bf620, + 0x866c: 0x402bf820, 0x866d: 0x402bfa20, 0x866e: 0x402bfc20, 0x866f: 0x402bfe20, + 0x8670: 0x402c0020, 0x8671: 0x402c0220, 0x8672: 0x402c0420, 0x8673: 0x402c0620, + 0x8674: 0x402c0820, 0x8675: 0x402c0a20, 0x8676: 0x402c0c20, 0x8677: 0x402c0e20, + 0x8678: 0x402c1020, 0x8679: 0x402c1220, 0x867a: 0x402c1420, 0x867b: 0x402c1620, + 0x867c: 0x402c1820, 0x867d: 0x402c1a20, 0x867e: 0x402c1c20, 0x867f: 0x402c1e20, + // Block 0x21a, offset 0x8680 + 0x8680: 0x402c2020, 0x8681: 0x402c2220, 0x8682: 0x402c2420, 0x8683: 0x402c2620, + 0x8684: 0x402c2820, 0x8685: 0x402c2a20, 0x8686: 0x402c2c20, 0x8687: 0x402c2e20, + 0x8688: 0x402c3020, 0x8689: 0x402c3220, 0x868a: 0x402c3420, 0x868b: 0x402c3620, + 0x868c: 0xc53b0002, 0x868d: 0x402c3a20, 0x868e: 0x402c3c20, 0x868f: 0x402c3e20, + 0x8690: 0x402c4020, 0x8691: 0x402c4220, 0x8692: 0x402c4420, 0x8693: 0x402c4620, + 0x8694: 0x402c4820, 0x8695: 0x402c4a20, 0x8696: 0x402c4c20, 0x8697: 0x402c4e20, + 0x8698: 0x402c5020, 0x8699: 0x402c5220, 0x869a: 0x402c5420, 0x869b: 0x402c5620, + 0x869c: 0x402c5820, 0x869d: 0x402c5a20, 0x869e: 0x402c5c20, 0x869f: 0x402c5e20, + 0x86a0: 0x402c6020, 0x86a1: 0x402c6220, 0x86a2: 0x402c6420, 0x86a3: 0x402c6620, + 0x86a4: 0x402c6820, 0x86a5: 0x402c6a20, 0x86a6: 0x402c6c20, 0x86a7: 0x402c6e20, + 0x86a8: 0x402c7020, 0x86a9: 0x402c7220, 0x86aa: 0x402c7420, 0x86ab: 0x402c7620, + 0x86ac: 0xc5380002, 0x86ad: 0x402c7a20, 0x86ae: 0x402c7c20, 0x86af: 0x402c7e20, + 0x86b0: 0x402c8020, 0x86b1: 0x402c8220, 0x86b2: 0x402c8420, 0x86b3: 0x402c8620, + 0x86b4: 0x402c8820, 0x86b5: 0x402c8a20, 0x86b6: 0x402c8c20, 0x86b7: 0x402c8e20, + 0x86b8: 0x402c9020, 0x86b9: 0x402c9220, 0x86ba: 0x402c9420, 0x86bb: 0x402c9620, + 0x86bc: 0x402c9820, 0x86bd: 0x402c9a20, 0x86be: 0x402c9c20, 0x86bf: 0x402c9e20, + // Block 0x21b, offset 0x86c0 + 0x86c0: 0xe0002f1f, 0x86c1: 0xe0002f1c, 0x86c2: 0xe0002f35, 0x86c3: 0xe0002f59, + 0x86c4: 0xe0002f52, 0x86c5: 0xe0002f4b, 0x86c6: 0xe00009dd, 0x86c7: 0xe0002f95, + 0x86c8: 0xe0002fb1, 0x86c9: 0xe0002fae, 0x86ca: 0xe0002fb7, 0x86cb: 0xe0002fcd, + 0x86cc: 0xe0003031, 0x86cd: 0xe000302e, 0x86ce: 0xe0003037, 0x86cf: 0xe000303d, + 0x86d0: 0xe0000ab3, 0x86d1: 0xe00030a5, 0x86d2: 0xe00030ba, 0x86d3: 0xe00030b7, + 0x86d4: 0xe00030c0, 0x86d5: 0xe00030e0, 0x86d6: 0xe00030d6, 0x86d7: 0x40093e20, + 0x86d8: 0xe0000e12, 0x86d9: 0xe000318a, 0x86da: 0xe0003187, 0x86db: 0xe0003190, + 0x86dc: 0xe0003199, 0x86dd: 0xe000320a, 0x86de: 0x00318888, 0x86df: 0xe0000f7b, + 0x86e0: 0xe000323a, 0x86e1: 0xe0003237, 0x86e2: 0xe0003250, 0x86e3: 0xe0003274, + 0x86e4: 0xe000326d, 0x86e5: 0xe0003266, 0x86e6: 0xe00009d5, 0x86e7: 0xe00032c8, + 0x86e8: 0xe00032e4, 0x86e9: 0xe00032e1, 0x86ea: 0xe00032ea, 0x86eb: 0xe0003300, + 0x86ec: 0xe0003367, 0x86ed: 0xe0003364, 0x86ee: 0xe000336d, 0x86ef: 0xe0003373, + 0x86f0: 0xe0000aad, 0x86f1: 0xe00033cf, 0x86f2: 0xe00033e4, 0x86f3: 0xe00033e1, + 0x86f4: 0xe00033ea, 0x86f5: 0xe000340a, 0x86f6: 0xe0003400, 0x86f7: 0x40093c20, + 0x86f8: 0xe0000e0f, 0x86f9: 0xe00034b7, 0x86fa: 0xe00034b4, 0x86fb: 0xe00034bd, + 0x86fc: 0xe00034c6, 0x86fd: 0xe000353a, 0x86fe: 0x40318820, 0x86ff: 0xe0003546, + // Block 0x21c, offset 0x8700 + 0x8700: 0xe0002f66, 0x8701: 0xe0003281, 0x8702: 0xe0002f22, 0x8703: 0xe000323d, + 0x8704: 0xe0002f63, 0x8705: 0xe000327e, 0x8706: 0xe0002f89, 0x8707: 0xe00032bc, + 0x8708: 0xe0002f8c, 0x8709: 0xe00032bf, 0x870a: 0xe0002f92, 0x870b: 0xe00032c5, + 0x870c: 0xe0002f8f, 0x870d: 0xe00032c2, 0x870e: 0xe0002f9c, 0x870f: 0xe00032cf, + 0x8710: 0xe0000aaa, 0x8711: 0xe0000aa7, 0x8712: 0xe0002fe0, 0x8713: 0xe0003313, + 0x8714: 0xe0002fb4, 0x8715: 0xe00032e7, 0x8716: 0xe0002fd3, 0x8717: 0xe0003306, + 0x8718: 0xe0002fdd, 0x8719: 0xe0003310, 0x871a: 0xe0002fca, 0x871b: 0xe00032fd, + 0x871c: 0xe000300a, 0x871d: 0xe000333d, 0x871e: 0xe0003007, 0x871f: 0xe000333a, + 0x8720: 0xe0003010, 0x8721: 0xe0003343, 0x8722: 0xe0003013, 0x8723: 0xe0003346, + 0x8724: 0xe0003019, 0x8725: 0xe000334c, 0x8726: 0xe0000c1b, 0x8727: 0xe0000c18, + 0x8728: 0xe0003044, 0x8729: 0xe000337a, 0x872a: 0xe000304d, 0x872b: 0xe0003380, + 0x872c: 0xe0003034, 0x872d: 0xe000336a, 0x872e: 0xe000304a, 0x872f: 0xe000337d, + 0x8730: 0xe0003047, 0x8731: 0x402da220, 0x8732: 0xe00027e2, 0x8733: 0xe00027df, + 0x8734: 0xe000305f, 0x8735: 0xe0003392, 0x8736: 0xe0003068, 0x8737: 0xe000339e, + 0x8738: 0x402f7220, 0x8739: 0xe0003071, 0x873a: 0xe00033a7, 0x873b: 0xe0003077, + 0x873c: 0xe00033ad, 0x873d: 0xe0003074, 0x873e: 0xe00033aa, 0x873f: 0xe0000d04, + // Block 0x21d, offset 0x8740 + 0x8740: 0xe0000cfe, 0x8741: 0xe0000cf8, 0x8742: 0xe0000cf5, 0x8743: 0xe000309c, + 0x8744: 0xe00033c6, 0x8745: 0xe00030ab, 0x8746: 0xe00033d5, 0x8747: 0xe00030a2, + 0x8748: 0xe00033cc, 0x8749: 0xe00035eb, 0x874a: 0x002eda88, 0x874b: 0x402eda20, + 0x874c: 0xe00030fd, 0x874d: 0xe0003427, 0x874e: 0xe00030bd, 0x874f: 0xe00033e7, + 0x8750: 0xe00030dd, 0x8751: 0xe0003407, 0x8752: 0xe0000e93, 0x8753: 0xe0000e8f, + 0x8754: 0xe0003135, 0x8755: 0xe000345f, 0x8756: 0xe000313e, 0x8757: 0xe0003468, + 0x8758: 0xe0003138, 0x8759: 0xe0003462, 0x875a: 0xe0003151, 0x875b: 0xe000347b, + 0x875c: 0xe0003158, 0x875d: 0xe0003482, 0x875e: 0xe0003165, 0x875f: 0xe000348f, + 0x8760: 0xe000315b, 0x8761: 0xe0003485, 0x8762: 0xe0003178, 0x8763: 0xe00034a5, + 0x8764: 0xe0003172, 0x8765: 0xe000349c, 0x8766: 0x00303688, 0x8767: 0x40303620, + 0x8768: 0xe00031af, 0x8769: 0xe00034dc, 0x876a: 0xe00031b9, 0x876b: 0xe00034e6, + 0x876c: 0xe000318d, 0x876d: 0xe00034ba, 0x876e: 0xe0003196, 0x876f: 0xe00034c3, + 0x8770: 0xe00031ac, 0x8771: 0xe00034d9, 0x8772: 0xe00031b6, 0x8773: 0xe00034e3, + 0x8774: 0xe00031f8, 0x8775: 0xe0003525, 0x8776: 0xe0003210, 0x8777: 0xe0003540, + 0x8778: 0xe0003213, 0x8779: 0xe0003225, 0x877a: 0xe0003558, 0x877b: 0xe000322e, + 0x877c: 0xe0003561, 0x877d: 0xe000322b, 0x877e: 0xe000355e, 0x877f: 0xe0000f64, + // Block 0x21e, offset 0x8780 + 0x8780: 0x402c1a20, 0x8781: 0x002c2a88, 0x8782: 0x002c3288, 0x8783: 0x402c3220, + 0x8784: 0x0031c488, 0x8785: 0x4031c420, 0x8786: 0x002efa88, 0x8787: 0x002c4e88, + 0x8788: 0x402c4e20, 0x8789: 0x002c7288, 0x878a: 0x002c7a88, 0x878b: 0x002c8488, + 0x878c: 0x402c8420, 0x878d: 0xe000115c, 0x878e: 0x002cae88, 0x878f: 0x002cb888, + 0x8790: 0x002cc288, 0x8791: 0x002d1688, 0x8792: 0x402d1620, 0x8793: 0x002d4488, + 0x8794: 0x002d5888, 0x8795: 0x402d7820, 0x8796: 0x002dc288, 0x8797: 0x002db688, + 0x8798: 0x002e0a88, 0x8799: 0x402e0a20, 0x879a: 0x402e3820, 0x879b: 0x402e7220, + 0x879c: 0x0030a088, 0x879d: 0x002eb488, 0x879e: 0x402ebc20, 0x879f: 0x002f1088, + 0x87a0: 0xe0003111, 0x87a1: 0xe000343b, 0x87a2: 0x002d6088, 0x87a3: 0x402d6020, + 0x87a4: 0x002f3e88, 0x87a5: 0x402f3e20, 0x87a6: 0x002f8288, 0x87a7: 0x0031b488, + 0x87a8: 0x4031b420, 0x87a9: 0x00300888, 0x87aa: 0x40301220, 0x87ab: 0x40304220, + 0x87ac: 0x00304a88, 0x87ad: 0x40304a20, 0x87ae: 0x00305288, 0x87af: 0xe00031c9, + 0x87b0: 0xe00034f6, 0x87b1: 0x0030b488, 0x87b2: 0x0030cc88, 0x87b3: 0x00311888, + 0x87b4: 0x40311820, 0x87b5: 0x00313488, 0x87b6: 0x40313420, 0x87b7: 0x00316488, + 0x87b8: 0x00316e88, 0x87b9: 0x40316e20, 0x87ba: 0x40317820, 0x87bb: 0x4031a620, + 0x87bc: 0x0031bc88, 0x87bd: 0x4031bc20, 0x87be: 0xe0000fc9, 0x87bf: 0x40319420, + // Block 0x21f, offset 0x87c0 + 0x87c0: 0x40321220, 0x87c1: 0x40321a20, 0x87c2: 0x40322220, 0x87c3: 0x40322a20, + 0x87c4: 0xe0000ad5, 0x87c5: 0xe0000ad1, 0x87c6: 0xe0000acd, 0x87c7: 0xe000357f, + 0x87c8: 0xe000357c, 0x87c9: 0xe0003579, 0x87ca: 0xe00035c4, 0x87cb: 0xe00035c1, + 0x87cc: 0xe00035be, 0x87cd: 0xe0002f48, 0x87ce: 0xe0003263, 0x87cf: 0xe000303a, + 0x87d0: 0xe0003370, 0x87d1: 0xe00030d3, 0x87d2: 0xe00033fd, 0x87d3: 0xe0003193, + 0x87d4: 0xe00034c0, 0x87d5: 0xe00031a8, 0x87d6: 0xe00034d5, 0x87d7: 0xe000319c, + 0x87d8: 0xe00034c9, 0x87d9: 0xe00031a4, 0x87da: 0xe00034d1, 0x87db: 0xe00031a0, + 0x87dc: 0xe00034cd, 0x87dd: 0x402cae20, 0x87de: 0xe0002f55, 0x87df: 0xe0003270, + 0x87e0: 0xe0002f5f, 0x87e1: 0xe000327a, 0x87e2: 0xe00009f4, 0x87e3: 0xe00009ef, + 0x87e4: 0x002d3a88, 0x87e5: 0x402d3a20, 0x87e6: 0xe000300d, 0x87e7: 0xe0003340, + 0x87e8: 0xe0003065, 0x87e9: 0xe000339b, 0x87ea: 0xe00030f6, 0x87eb: 0xe0003420, + 0x87ec: 0xe00030f9, 0x87ed: 0xe0003423, 0x87ee: 0xe0001162, 0x87ef: 0xe000115f, + 0x87f0: 0xe0003395, 0x87f1: 0xe00032b0, 0x87f2: 0xe00032ad, 0x87f3: 0xe00032aa, + 0x87f4: 0xe0003004, 0x87f5: 0xe0003337, 0x87f6: 0x002d7888, 0x87f7: 0x00319488, + 0x87f8: 0xe000309f, 0x87f9: 0xe00033c9, 0x87fa: 0xe0002f4e, 0x87fb: 0xe0003269, + 0x87fc: 0xe00009ea, 0x87fd: 0xe00009e5, 0x87fe: 0xe0000e19, 0x87ff: 0xe0000e15, + // Block 0x220, offset 0x8800 + 0x8800: 0xe0002f6c, 0x8801: 0xe0003287, 0x8802: 0xe0002f6f, 0x8803: 0xe000328a, + 0x8804: 0xe0002fee, 0x8805: 0xe0003321, 0x8806: 0xe0002ff1, 0x8807: 0xe0003324, + 0x8808: 0xe0003053, 0x8809: 0xe0003386, 0x880a: 0xe0003056, 0x880b: 0xe0003389, + 0x880c: 0xe000310b, 0x880d: 0xe0003435, 0x880e: 0xe000310e, 0x880f: 0xe0003438, + 0x8810: 0xe0003141, 0x8811: 0xe000346b, 0x8812: 0xe0003144, 0x8813: 0xe000346e, + 0x8814: 0xe00031c3, 0x8815: 0xe00034f0, 0x8816: 0xe00031c6, 0x8817: 0xe00034f3, + 0x8818: 0xe000316f, 0x8819: 0xe0003499, 0x881a: 0xe000317e, 0x881b: 0xe00034ab, + 0x881c: 0x00312288, 0x881d: 0x40312220, 0x881e: 0xe000301c, 0x881f: 0xe000334f, + 0x8820: 0x002ebc88, 0x8821: 0x402c8c20, 0x8822: 0x002f2288, 0x8823: 0x402f2220, + 0x8824: 0x00314088, 0x8825: 0x40314020, 0x8826: 0xe0002f5c, 0x8827: 0xe0003277, + 0x8828: 0xe0002fd6, 0x8829: 0xe0003309, 0x882a: 0xe00030d9, 0x882b: 0xe0003403, + 0x882c: 0xe00030eb, 0x882d: 0xe0003415, 0x882e: 0xe00030ef, 0x882f: 0xe0003419, + 0x8830: 0xe00030f2, 0x8831: 0xe000341c, 0x8832: 0xe000321c, 0x8833: 0xe000354f, + 0x8834: 0x402e5e20, 0x8835: 0x402ed020, 0x8836: 0x40305a20, 0x8837: 0x402dd420, + 0x8838: 0xe0000abf, 0x8839: 0xe0000ec4, 0x883a: 0x002be888, 0x883b: 0x002c4488, + 0x883c: 0x402c4420, 0x883d: 0x002e3888, 0x883e: 0x00303e88, 0x883f: 0x402ffc20, + // Block 0x221, offset 0x8840 + 0x8840: 0xae603502, 0x8841: 0xae603202, 0x8842: 0xae604502, 0x8843: 0xae602202, + 0x8844: 0xe0000000, 0x8845: 0xaf007f02, 0x8846: 0xae605f02, 0x8847: 0xadc06002, + 0x8848: 0xadc06002, 0x8849: 0xadc06002, 0x884a: 0xae605f02, 0x884b: 0xae605f02, + 0x884c: 0xae605f02, 0x884d: 0xadc06002, 0x884e: 0xadc06002, 0x884f: 0xa0000000, + 0x8850: 0xae605f02, 0x8851: 0xae605f02, 0x8852: 0xae605f02, 0x8853: 0xadc06002, + 0x8854: 0xadc06002, 0x8855: 0xadc06002, 0x8856: 0xadc06002, 0x8857: 0xae605f02, + 0x8858: 0xae808002, 0x8859: 0xadc06002, 0x885a: 0xadc06002, 0x885b: 0xae605f02, + 0x885c: 0xae906002, 0x885d: 0xaea05f02, 0x885e: 0xaea05f02, 0x885f: 0xae906002, + 0x8860: 0xaea08102, 0x8861: 0xaea08202, 0x8862: 0xae906002, 0x8863: 0x84e615ef, + 0x8864: 0x84e6164c, 0x8865: 0x84e616cd, 0x8866: 0x84e61771, 0x8867: 0x84e61836, + 0x8868: 0x84e6161d, 0x8869: 0x84e61631, 0x886a: 0x84e616b4, 0x886b: 0x84e61741, + 0x886c: 0x84e617bd, 0x886d: 0x84e61816, 0x886e: 0x84e6185f, 0x886f: 0x84e6187b, + 0x8870: 0x00326688, 0x8871: 0x40326620, 0x8872: 0x0032a688, 0x8873: 0x4032a620, + 0x8874: 0x40064020, 0x8875: 0x40064220, 0x8876: 0x00326088, 0x8877: 0x40326020, + 0x887a: 0x00326c84, 0x887b: 0x40329220, + 0x887c: 0x40329020, 0x887d: 0x40329420, 0x887e: 0x402c1620, + // Block 0x222, offset 0x8880 + 0x8880: 0xe0002f7d, 0x8881: 0xe0003298, 0x8882: 0xe0002f80, 0x8883: 0xe00032b3, + 0x8884: 0xe0002f83, 0x8885: 0xe00032b6, 0x8886: 0xe0002f86, 0x8887: 0xe00032b9, + 0x8888: 0xe0002f98, 0x8889: 0xe00032cb, 0x888a: 0xe0002f9f, 0x888b: 0xe00032d2, + 0x888c: 0xe0002fa5, 0x888d: 0xe00032d8, 0x888e: 0xe0002fab, 0x888f: 0xe00032de, + 0x8890: 0xe0002fa2, 0x8891: 0xe00032d5, 0x8892: 0xe0002fa8, 0x8893: 0xe00032db, + 0x8894: 0xe0002fe7, 0x8895: 0xe000331a, 0x8896: 0xe0002fe3, 0x8897: 0xe0003316, + 0x8898: 0xe0002ffb, 0x8899: 0xe000332e, 0x889a: 0xe0002ffe, 0x889b: 0xe0003331, + 0x889c: 0xe0002fd9, 0x889d: 0xe000330c, 0x889e: 0xe0003001, 0x889f: 0xe0003334, + 0x88a0: 0xe0003016, 0x88a1: 0xe0003349, 0x88a2: 0xe0003022, 0x88a3: 0xe0003355, + 0x88a4: 0xe0003028, 0x88a5: 0xe000335b, 0x88a6: 0xe000301f, 0x88a7: 0xe0003352, + 0x88a8: 0xe0003025, 0x88a9: 0xe0003358, 0x88aa: 0xe000302b, 0x88ab: 0xe000335e, + 0x88ac: 0xe000305c, 0x88ad: 0xe000338f, 0x88ae: 0xe0003040, 0x88af: 0xe0003376, + 0x88b0: 0xe0003062, 0x88b1: 0xe0003398, 0x88b2: 0xe000306b, 0x88b3: 0xe00033a1, + 0x88b4: 0xe000306e, 0x88b5: 0xe00033a4, 0x88b6: 0xe000307a, 0x88b7: 0xe00033b0, + 0x88b8: 0xe000307d, 0x88b9: 0xe00033b3, 0x88ba: 0xe0003084, 0x88bb: 0xe00033ba, + 0x88bc: 0xe0003081, 0x88bd: 0xe00033b7, 0x88be: 0xe0003087, 0x88bf: 0xe00033bd, + // Block 0x223, offset 0x88c0 + 0x88c0: 0xe000308a, 0x88c1: 0xe00033c0, 0x88c2: 0xe000308d, 0x88c3: 0xe00033c3, + 0x88c4: 0xe00030a8, 0x88c5: 0xe00033d2, 0x88c6: 0xe00030ae, 0x88c7: 0xe00033d8, + 0x88c8: 0xe00030b4, 0x88c9: 0xe00033de, 0x88ca: 0xe00030b1, 0x88cb: 0xe00033db, + 0x88cc: 0xe00030e3, 0x88cd: 0xe000340d, 0x88ce: 0xe00030e7, 0x88cf: 0xe0003411, + 0x88d0: 0xe0003104, 0x88d1: 0xe000342e, 0x88d2: 0xe0003100, 0x88d3: 0xe000342a, + 0x88d4: 0xe000312f, 0x88d5: 0xe0003459, 0x88d6: 0xe0003132, 0x88d7: 0xe000345c, + 0x88d8: 0xe000313b, 0x88d9: 0xe0003465, 0x88da: 0xe0003147, 0x88db: 0xe0003471, + 0x88dc: 0xe000314a, 0x88dd: 0xe0003474, 0x88de: 0xe000314e, 0x88df: 0xe0003478, + 0x88e0: 0xe0003162, 0x88e1: 0xe000348c, 0x88e2: 0xe0003168, 0x88e3: 0xe0003492, + 0x88e4: 0xe0003154, 0x88e5: 0xe000347e, 0x88e6: 0xe000315e, 0x88e7: 0xe0003488, + 0x88e8: 0xe000316b, 0x88e9: 0xe0003495, 0x88ea: 0xe0003175, 0x88eb: 0xe00034a2, + 0x88ec: 0xe000317b, 0x88ed: 0xe00034a8, 0x88ee: 0xe0003184, 0x88ef: 0xe00034b1, + 0x88f0: 0xe0003181, 0x88f1: 0xe00034ae, 0x88f2: 0xe00031e3, 0x88f3: 0xe0003510, + 0x88f4: 0xe00031e9, 0x88f5: 0xe0003516, 0x88f6: 0xe00031e6, 0x88f7: 0xe0003513, + 0x88f8: 0xe00031b2, 0x88f9: 0xe00034df, 0x88fa: 0xe00031bc, 0x88fb: 0xe00034e9, + 0x88fc: 0xe00031ec, 0x88fd: 0xe0003519, 0x88fe: 0xe00031ef, 0x88ff: 0xe000351c, + // Block 0x224, offset 0x8900 + 0x8900: 0xe00031f5, 0x8901: 0xe0003522, 0x8902: 0xe00031f2, 0x8903: 0xe000351f, + 0x8904: 0xe00031fb, 0x8905: 0xe000352b, 0x8906: 0xe00031fe, 0x8907: 0xe000352e, + 0x8908: 0xe0003201, 0x8909: 0xe0003531, 0x890a: 0xe0003207, 0x890b: 0xe0003537, + 0x890c: 0xe0003204, 0x890d: 0xe0003534, 0x890e: 0xe0003219, 0x890f: 0xe000354c, + 0x8910: 0xe0003228, 0x8911: 0xe000355b, 0x8912: 0xe0003231, 0x8913: 0xe0003564, + 0x8914: 0xe0003234, 0x8915: 0xe0003567, 0x8916: 0xe0003361, 0x8917: 0xe000349f, + 0x8918: 0xe0003528, 0x8919: 0xe0003543, 0x891a: 0xe0002f10, 0x891b: 0xe0000f70, + 0x891c: 0x40300420, 0x891d: 0x40300620, 0x891e: 0xe0000f7f, 0x891f: 0x402c9620, + 0x8920: 0xe0002f72, 0x8921: 0xe000328d, 0x8922: 0xe0002f69, 0x8923: 0xe0003284, + 0x8924: 0xe0002f38, 0x8925: 0xe0003253, 0x8926: 0xe0002f3c, 0x8927: 0xe0003257, + 0x8928: 0xe0002f44, 0x8929: 0xe000325f, 0x892a: 0xe0002f40, 0x892b: 0xe000325b, + 0x892c: 0xe0002f79, 0x892d: 0xe0003294, 0x892e: 0xe0002f25, 0x892f: 0xe0003240, + 0x8930: 0xe0002f29, 0x8931: 0xe0003244, 0x8932: 0xe0002f31, 0x8933: 0xe000324c, + 0x8934: 0xe0002f2d, 0x8935: 0xe0003248, 0x8936: 0xe0002f75, 0x8937: 0xe0003290, + 0x8938: 0xe0002ff4, 0x8939: 0xe0003327, 0x893a: 0xe0002feb, 0x893b: 0xe000331e, + 0x893c: 0xe0002fd0, 0x893d: 0xe0003303, 0x893e: 0xe0002fba, 0x893f: 0xe00032ed, + // Block 0x225, offset 0x8940 + 0x8940: 0xe0002fbe, 0x8941: 0xe00032f1, 0x8942: 0xe0002fc6, 0x8943: 0xe00032f9, + 0x8944: 0xe0002fc2, 0x8945: 0xe00032f5, 0x8946: 0xe0002ff7, 0x8947: 0xe000332a, + 0x8948: 0xe0003050, 0x8949: 0xe0003383, 0x894a: 0xe0003059, 0x894b: 0xe000338c, + 0x894c: 0xe0003128, 0x894d: 0xe0003452, 0x894e: 0xe0003108, 0x894f: 0xe0003432, + 0x8950: 0xe00030c3, 0x8951: 0xe00033ed, 0x8952: 0xe00030c7, 0x8953: 0xe00033f1, + 0x8954: 0xe00030cf, 0x8955: 0xe00033f9, 0x8956: 0xe00030cb, 0x8957: 0xe00033f5, + 0x8958: 0xe000312b, 0x8959: 0xe0003455, 0x895a: 0xe0003114, 0x895b: 0xe000343e, + 0x895c: 0xe0003118, 0x895d: 0xe0003442, 0x895e: 0xe0003120, 0x895f: 0xe000344a, + 0x8960: 0xe000311c, 0x8961: 0xe0003446, 0x8962: 0xe0003124, 0x8963: 0xe000344e, + 0x8964: 0xe00031e0, 0x8965: 0xe000350d, 0x8966: 0xe00031c0, 0x8967: 0xe00034ed, + 0x8968: 0xe00031cc, 0x8969: 0xe00034f9, 0x896a: 0xe00031d0, 0x896b: 0xe00034fd, + 0x896c: 0xe00031d8, 0x896d: 0xe0003505, 0x896e: 0xe00031d4, 0x896f: 0xe0003501, + 0x8970: 0xe00031dc, 0x8971: 0xe0003509, 0x8972: 0xe000320d, 0x8973: 0xe000353d, + 0x8974: 0xe0003222, 0x8975: 0xe0003555, 0x8976: 0xe000321f, 0x8977: 0xe0003552, + 0x8978: 0xe0003216, 0x8979: 0xe0003549, 0x897a: 0xe0000d0a, 0x897b: 0xe0000d07, + 0x897c: 0x0030d888, 0x897d: 0x4030d820, 0x897e: 0x00312088, 0x897f: 0x40312020, + // Block 0x226, offset 0x8980 + 0x8980: 0x40063a20, 0x8981: 0xe00000b1, 0x8982: 0xe00012ea, 0x8983: 0xe00012f5, + 0x8984: 0xe00012e0, 0x8986: 0xe00012ee, 0x8987: 0xe00012f1, + 0x8988: 0xe000124f, 0x8989: 0xe0001249, 0x898a: 0xe00012e7, 0x898b: 0xe00012dd, + 0x898c: 0xe00012f8, 0x898d: 0xe00000b7, 0x898e: 0xe00000b4, 0x898f: 0xe00000ba, + 0x8990: 0xe0001343, 0x8991: 0xe000135e, 0x8992: 0xe0001356, 0x8993: 0xe0001352, + 0x8996: 0xe0001349, 0x8997: 0xe000135a, + 0x8998: 0xe0001346, 0x8999: 0xe0001361, 0x899a: 0xe0001340, 0x899b: 0xe000133a, + 0x899d: 0xe00000c0, 0x899e: 0xe00000bd, 0x899f: 0xe00000c3, + 0x89a0: 0xe00013e6, 0x89a1: 0xe0001401, 0x89a2: 0xe00013f9, 0x89a3: 0xe00013f5, + 0x89a4: 0xe00013a4, 0x89a5: 0xe00013a7, 0x89a6: 0xe00013ec, 0x89a7: 0xe00013fd, + 0x89a8: 0xe00013e9, 0x89a9: 0xe0001404, 0x89aa: 0xe00013e3, 0x89ab: 0xe00013dd, + 0x89ac: 0xe00013aa, 0x89ad: 0xe00000ae, 0x89ae: 0xe00000ab, 0x89af: 0x402c6020, + 0x89b2: 0xe000149f, 0x89b3: 0xe00014aa, + 0x89b4: 0xe0001495, 0x89b6: 0xe00014a3, 0x89b7: 0xe00014a6, + 0x89b8: 0xe00013a1, 0x89b9: 0xe000139b, 0x89ba: 0xe000149c, 0x89bb: 0xe0001492, + 0x89bc: 0xe00014ad, 0x89bd: 0x40062020, 0x89be: 0x40063820, + // Block 0x227, offset 0x89c0 + 0x89c0: 0x00021284, 0x89c1: 0x00021284, 0x89c2: 0x00021284, 0x89c3: 0x00021284, + 0x89c4: 0x00021284, 0x89c5: 0x00021284, 0x89c6: 0x00021284, 0x89c7: 0x0002129b, + 0x89c8: 0x00021284, 0x89c9: 0x00021284, 0x89ca: 0x00021284, 0x89cb: 0xa0000000, + 0x89cc: 0xa0000000, 0x89cd: 0xa0000000, 0x89ce: 0xa0000000, 0x89cf: 0xa0000000, + 0x89d0: 0x40022620, 0x89d1: 0x0002269b, 0x89d2: 0x40022820, 0x89d3: 0x40022a20, + 0x89d4: 0x40022c20, 0x89d5: 0x40022e20, 0x89d6: 0x4004c420, 0x89d7: 0x40021820, + 0x89d8: 0x4003d420, 0x89d9: 0x4003d620, 0x89da: 0x4003d820, 0x89db: 0x4003da20, + 0x89dc: 0x4003e220, 0x89dd: 0x4003e420, 0x89de: 0x4003e620, 0x89df: 0x4003e820, + 0x89e0: 0x4004f820, 0x89e1: 0x4004fa20, 0x89e2: 0x40050220, 0x89e3: 0x40050420, + 0x89e4: 0x0002e484, 0x89e5: 0xe0002bac, 0x89e6: 0xe0002bb2, 0x89e7: 0x40050620, + 0x89e8: 0x40020e20, 0x89e9: 0x40021020, 0x89ea: 0xa0000000, 0x89eb: 0xa0000000, + 0x89ec: 0xa0000000, 0x89ed: 0xa0000000, 0x89ee: 0xa0000000, 0x89ef: 0x0002129b, + 0x89f0: 0x4004f020, 0x89f1: 0x4004f420, 0x89f2: 0x40050e20, 0x89f3: 0xf0001f04, + 0x89f4: 0xf0000404, 0x89f5: 0x40051020, 0x89f6: 0xf0001f04, 0x89f7: 0xf0000404, + 0x89f8: 0x40051620, 0x89f9: 0x4003dc20, 0x89fa: 0x4003de20, 0x89fb: 0x40051820, + 0x89fc: 0xe0002ba0, 0x89fd: 0x4002e020, 0x89fe: 0x40021420, 0x89ff: 0x40051a20, + // Block 0x228, offset 0x8a00 + 0x8a00: 0x40051e20, 0x8a01: 0x40052220, 0x8a02: 0x40052420, 0x8a03: 0x40050820, + 0x8a04: 0x40095820, 0x8a05: 0x40040c20, 0x8a06: 0x40040e20, 0x8a07: 0xe0002ba9, + 0x8a08: 0xe0002ba6, 0x8a09: 0xe0002ba3, 0x8a0a: 0x4004e820, 0x8a0b: 0x4004d420, + 0x8a0c: 0x40050a20, 0x8a0d: 0x40050c20, 0x8a0e: 0x4004da20, 0x8a0f: 0x40026620, + 0x8a10: 0x40052020, 0x8a11: 0x4004dc20, 0x8a12: 0x40095020, 0x8a13: 0x40023420, + 0x8a14: 0x40051c20, 0x8a15: 0x40039c20, 0x8a16: 0x40039e20, 0x8a17: 0xe00000a6, + 0x8a18: 0x4003a020, 0x8a19: 0x4003a220, 0x8a1a: 0x4003a420, 0x8a1b: 0x4003a620, + 0x8a1c: 0x4003a820, 0x8a1d: 0x4003aa20, 0x8a1e: 0x4003ac20, 0x8a1f: 0x00021284, + 0x8a20: 0xa0000000, 0x8a21: 0xa0000000, 0x8a22: 0xa0000000, 0x8a23: 0xa0000000, + 0x8a24: 0xa0000000, + 0x8a2a: 0xa0000000, 0x8a2b: 0xa0000000, + 0x8a2c: 0xa0000000, 0x8a2d: 0xa0000000, 0x8a2e: 0xa0000000, 0x8a2f: 0xa0000000, + 0x8a30: 0x0029cc94, 0x8a31: 0x002d9a94, + 0x8a34: 0x0029d494, 0x8a35: 0x0029d694, 0x8a36: 0x0029d894, 0x8a37: 0x0029da94, + 0x8a38: 0x0029dc94, 0x8a39: 0x0029de94, 0x8a3a: 0x00093894, 0x8a3b: 0x00094e94, + 0x8a3c: 0x00094294, 0x8a3d: 0x0003f494, 0x8a3e: 0x0003f694, 0x8a3f: 0x002e9e94, + // Block 0x229, offset 0x8a40 + 0x8a40: 0xe00009bc, 0x8a41: 0xe00009c0, 0x8a42: 0x002c3a8b, 0x8a43: 0xe0002d26, + 0x8a44: 0x40081c20, 0x8a45: 0xe0000a5e, 0x8a46: 0xe0000a62, 0x8a47: 0x002cc28a, + 0x8a48: 0x40081e20, 0x8a49: 0xe0002d29, 0x8a4a: 0x002d2285, 0x8a4b: 0x002d688b, + 0x8a4c: 0x002d688b, 0x8a4d: 0x002d688b, 0x8a4e: 0x002d6885, 0x8a4f: 0xf0000202, + 0x8a50: 0x002d9a8b, 0x8a51: 0x002d9a8b, 0x8a52: 0x002e228b, 0x8a53: 0x002e2285, + 0x8a54: 0x40082020, 0x8a55: 0x002e9e8b, 0x8a56: 0xe000281e, 0x8a57: 0x40082220, + 0x8a58: 0x40082420, 0x8a59: 0x002f2c8b, 0x8a5a: 0x002f568b, 0x8a5b: 0x002f7a8b, + 0x8a5c: 0x002f7a8b, 0x8a5d: 0x002f7a8b, 0x8a5e: 0x40082620, 0x8a5f: 0x40082820, + 0x8a60: 0xe0002833, 0x8a61: 0xe0000fbd, 0x8a62: 0xe0002842, 0x8a63: 0x40082a20, + 0x8a64: 0x00312a8b, 0x8a65: 0x40082c20, 0x8a66: 0x0032a288, 0x8a67: 0x40082e20, + 0x8a68: 0x00312a8b, 0x8a69: 0x40083020, 0x8a6a: 0x402c3620, 0x8a6b: 0xe0002f4b, + 0x8a6c: 0x002c0a8b, 0x8a6d: 0x002c3a8b, 0x8a6e: 0x40083220, 0x8a6f: 0x002c9885, + 0x8a70: 0x002c988b, 0x8a71: 0x002d088b, 0x8a72: 0x002d1e88, 0x8a73: 0x002e828b, + 0x8a74: 0x002ee285, 0x8a75: 0x00389084, 0x8a76: 0x00389284, 0x8a77: 0x00389484, + 0x8a78: 0x00389684, 0x8a79: 0x002d9a85, 0x8a7a: 0x40083420, 0x8a7b: 0xe0000b95, + 0x8a7c: 0x00327e85, 0x8a7d: 0x00325685, 0x8a7e: 0x0032568b, 0x8a7f: 0x00327e8b, + // Block 0x22a, offset 0x8a80 + 0x8a80: 0x00093685, 0x8a81: 0x40083620, 0x8a82: 0x40083820, 0x8a83: 0x40083a20, + 0x8a84: 0x40083c20, 0x8a85: 0x002c628b, 0x8a86: 0x002c6285, 0x8a87: 0x002c9885, + 0x8a88: 0x002d9a85, 0x8a89: 0x002dcc85, 0x8a8a: 0x40083e20, 0x8a8b: 0x400a6e20, + 0x8a8c: 0x40084020, 0x8a8d: 0xe00009c4, 0x8a8e: 0x402d1e20, 0x8a8f: 0x40084220, + 0x8a90: 0xe00002cb, 0x8a91: 0xe00002d3, 0x8a92: 0xe00002b2, 0x8a93: 0xe00002bb, + 0x8a94: 0xe00003cd, 0x8a95: 0xe00002c3, 0x8a96: 0xe00003d1, 0x8a97: 0xe00004ab, + 0x8a98: 0xe0000579, 0x8a99: 0xe00002c7, 0x8a9a: 0xe0000640, 0x8a9b: 0xe00002cf, + 0x8a9c: 0xe00004af, 0x8a9d: 0xe0000644, 0x8a9e: 0xe0000798, 0x8a9f: 0xe0002d42, + 0x8aa0: 0x002d9a8a, 0x8aa1: 0xe00027d4, 0x8aa2: 0xe00027db, 0x8aa3: 0xe00027ee, + 0x8aa4: 0x0030be8a, 0x8aa5: 0xe0002848, 0x8aa6: 0xe000284f, 0x8aa7: 0xe00010bb, + 0x8aa8: 0xe00027f4, 0x8aa9: 0x0030f68a, 0x8aaa: 0xe0002883, 0x8aab: 0xe000288a, + 0x8aac: 0x002e228a, 0x8aad: 0x002c3a8a, 0x8aae: 0x002c628a, 0x8aaf: 0x002e828a, + 0x8ab0: 0x002d9a84, 0x8ab1: 0xe00027d1, 0x8ab2: 0xe00027d7, 0x8ab3: 0xe00027eb, + 0x8ab4: 0x0030be84, 0x8ab5: 0xe0002845, 0x8ab6: 0xe000284b, 0x8ab7: 0xe00010b6, + 0x8ab8: 0xe00027f1, 0x8ab9: 0x0030f684, 0x8aba: 0xe0002880, 0x8abb: 0xe0002886, + 0x8abc: 0x002e2284, 0x8abd: 0x002c3a84, 0x8abe: 0x002c6284, 0x8abf: 0x002e8284, + // Block 0x22b, offset 0x8ac0 + 0x8ac0: 0x4009a620, 0x8ac1: 0xe00000f5, 0x8ac2: 0x4009a820, 0x8ac3: 0x4009aa20, + 0x8ac4: 0xe00000f8, 0x8ac5: 0x4009ac20, 0x8ac6: 0x4009ae20, 0x8ac7: 0xe00000fb, + 0x8ac8: 0x4009b020, 0x8ac9: 0xe00000fe, 0x8aca: 0x4009b220, 0x8acb: 0x4009b420, + 0x8acc: 0x4009b620, 0x8acd: 0x4009b820, 0x8ace: 0x4009ba20, 0x8acf: 0x4009bc20, + 0x8ad0: 0x4009be20, 0x8ad1: 0x4009c020, 0x8ad2: 0x4009c220, 0x8ad3: 0x4009c420, + 0x8ad4: 0x4009c620, 0x8ad5: 0x4009c820, 0x8ad6: 0x4009ca20, 0x8ad7: 0x4009cc20, + 0x8ad8: 0x4009ce20, 0x8ad9: 0x4009d020, 0x8ada: 0x4009d220, 0x8adb: 0x4009d420, + 0x8adc: 0x4009d620, 0x8add: 0x4009d820, 0x8ade: 0x4009da20, 0x8adf: 0x4009dc20, + 0x8ae0: 0xe0002f16, 0x8ae1: 0x4009de20, 0x8ae2: 0xe0000104, 0x8ae3: 0x4009e020, + 0x8ae4: 0x4009e220, 0x8ae5: 0x4009e420, 0x8ae6: 0x4009e620, 0x8ae7: 0x4009e820, + 0x8ae8: 0x4009ea20, 0x8ae9: 0x4009ec20, 0x8aea: 0x4009ee20, 0x8aeb: 0x4009f020, + 0x8aec: 0x4009f220, 0x8aed: 0xe0000101, 0x8aee: 0xe0002f13, 0x8aef: 0xe0002f19, + 0x8af0: 0xe0000107, 0x8af1: 0xe000010a, 0x8af2: 0x4009f420, 0x8af3: 0x4009f620, + 0x8af4: 0xe000010d, 0x8af5: 0xe0000110, 0x8af6: 0x4009f820, 0x8af7: 0x4009fa20, + 0x8af8: 0xe0000113, 0x8af9: 0xe0000116, 0x8afa: 0x4009fc20, 0x8afb: 0x4009fe20, + 0x8afc: 0x400a0020, 0x8afd: 0x400a0220, 0x8afe: 0x400a0420, 0x8aff: 0x400a0620, + // Block 0x22c, offset 0x8b00 + 0x8b00: 0x400d1820, 0x8b01: 0x400d1a20, 0x8b02: 0x400d1c20, 0x8b03: 0x400d1e20, + 0x8b04: 0x400d2020, 0x8b05: 0x400d2220, 0x8b06: 0x400d2420, 0x8b07: 0x400d2620, + 0x8b08: 0x400d2820, 0x8b09: 0x400d2a20, 0x8b0a: 0x400d2c20, + 0x8b20: 0x0029ce86, 0x8b21: 0x0029d086, 0x8b22: 0x0029d286, 0x8b23: 0x0029d486, + 0x8b24: 0x0029d686, 0x8b25: 0x0029d886, 0x8b26: 0x0029da86, 0x8b27: 0x0029dc86, + 0x8b28: 0x0029de86, 0x8b29: 0xe0002d45, 0x8b2a: 0xe0002d58, 0x8b2b: 0xe0002d6b, + 0x8b2c: 0xe0002d7e, 0x8b2d: 0xe0002d8d, 0x8b2e: 0xe0002d9c, 0x8b2f: 0xe0002dab, + 0x8b30: 0xe0002dba, 0x8b31: 0xe0002dc9, 0x8b32: 0xe0002dd8, 0x8b33: 0xe0002df6, + 0x8b34: 0xe0002bba, 0x8b35: 0xe0002bbe, 0x8b36: 0xe0002bc2, 0x8b37: 0xe0002bc6, + 0x8b38: 0xe0002bca, 0x8b39: 0xe0002bce, 0x8b3a: 0xe0002bd2, 0x8b3b: 0xe0002bd6, + 0x8b3c: 0xe0002bda, 0x8b3d: 0xe0000015, 0x8b3e: 0xe000001a, 0x8b3f: 0xe000001f, + // Block 0x22d, offset 0x8b40 + 0x8b40: 0xe0000024, 0x8b41: 0xe0000029, 0x8b42: 0xe000002e, 0x8b43: 0xe0000033, + 0x8b44: 0xe0000038, 0x8b45: 0xe000003d, 0x8b46: 0xe0000042, 0x8b47: 0xe0000047, + 0x8b48: 0xe0002d3f, 0x8b49: 0xe0002df3, 0x8b4a: 0xe0002e60, 0x8b4b: 0xe0002e95, + 0x8b4c: 0xe0002ec2, 0x8b4d: 0xe0002ed4, 0x8b4e: 0xe0002ee3, 0x8b4f: 0xe0002ef2, + 0x8b50: 0xe0002f01, 0x8b51: 0xe0002d48, 0x8b52: 0xe0002d5b, 0x8b53: 0xe0002d6e, + 0x8b54: 0xe0002d81, 0x8b55: 0xe0002d90, 0x8b56: 0xe0002d9f, 0x8b57: 0xe0002dae, + 0x8b58: 0xe0002dbd, 0x8b59: 0xe0002dcc, 0x8b5a: 0xe0002ddb, 0x8b5b: 0xe0002df9, + 0x8b5c: 0xe0002bde, 0x8b5d: 0xe0002be6, 0x8b5e: 0xe0002bee, 0x8b5f: 0xe0002bf6, + 0x8b60: 0xe000249f, 0x8b61: 0xe0002bfe, 0x8b62: 0xe0002c06, 0x8b63: 0xe00024a7, + 0x8b64: 0xe00024af, 0x8b65: 0xe0002c0e, 0x8b66: 0xe00024b7, 0x8b67: 0xe0002c16, + 0x8b68: 0xe0002c1e, 0x8b69: 0xe0002c26, 0x8b6a: 0xe00024bf, 0x8b6b: 0xe0002c2e, + 0x8b6c: 0xe00024c7, 0x8b6d: 0xe00024cf, 0x8b6e: 0xe00024d7, 0x8b6f: 0xe00024df, + 0x8b70: 0xe0002c36, 0x8b71: 0xe0002c3e, 0x8b72: 0xe0002c46, 0x8b73: 0xe00024e7, + 0x8b74: 0xe0002c4e, 0x8b75: 0xe0002c56, 0x8b76: 0x002bde8c, 0x8b77: 0x002c0a8c, + 0x8b78: 0x002c3a8c, 0x8b79: 0x002c628c, 0x8b7a: 0x002c988c, 0x8b7b: 0x002d088c, + 0x8b7c: 0x002d228c, 0x8b7d: 0x002d688c, 0x8b7e: 0x002d9a8c, 0x8b7f: 0x002dcc8c, + // Block 0x22e, offset 0x8b80 + 0x8b80: 0x40151420, 0x8b81: 0x40151620, 0x8b82: 0x40151820, 0x8b83: 0x40151a20, + 0x8b84: 0x40151c20, 0x8b85: 0x40151e20, 0x8b86: 0x40152020, 0x8b87: 0x40152220, + 0x8b88: 0x40152420, 0x8b89: 0x40152620, 0x8b8a: 0x40152820, 0x8b8b: 0x40152a20, + 0x8b8c: 0x40152c20, 0x8b8d: 0x40152e20, 0x8b8e: 0x40153020, 0x8b8f: 0x40153220, + 0x8b90: 0x40153420, 0x8b91: 0x40153620, 0x8b92: 0x40153820, 0x8b93: 0x40153a20, + 0x8b94: 0x40153c20, 0x8b95: 0x40153e20, 0x8b96: 0x40154020, 0x8b97: 0x40154220, + 0x8b98: 0x40154420, 0x8b99: 0x40154620, 0x8b9a: 0x40154820, 0x8b9b: 0x40154a20, + 0x8b9c: 0x40154c20, 0x8b9d: 0x40154e20, 0x8b9e: 0x40155020, 0x8b9f: 0x40155220, + 0x8ba0: 0x40155420, 0x8ba1: 0x40155620, 0x8ba2: 0x40155820, 0x8ba3: 0x40155a20, + 0x8ba4: 0x40155c20, 0x8ba5: 0x40155e20, 0x8ba6: 0x40156020, 0x8ba7: 0x40156220, + 0x8ba8: 0x40156420, 0x8ba9: 0x40156620, 0x8baa: 0x40156820, 0x8bab: 0x40156a20, + 0x8bac: 0x40156c20, 0x8bad: 0x40156e20, 0x8bae: 0x40157020, 0x8baf: 0x40157220, + 0x8bb0: 0x40157420, 0x8bb1: 0x40157620, 0x8bb2: 0x40157820, 0x8bb3: 0x40157a20, + 0x8bb4: 0xe0002b9c, 0x8bb5: 0xe0002d2c, 0x8bb6: 0xe0002d2f, 0x8bb7: 0x40157c20, + 0x8bb8: 0x40157e20, 0x8bb9: 0x40158020, 0x8bba: 0x40158220, 0x8bbb: 0x40158420, + 0x8bbc: 0x40158620, 0x8bbd: 0x40158820, 0x8bbe: 0x40158a20, 0x8bbf: 0x40158c20, + // Block 0x22f, offset 0x8bc0 + 0x8bc0: 0xe0002c5e, 0x8bc1: 0xe0002c62, 0x8bc2: 0xe0002c66, 0x8bc3: 0xe0002c6a, + 0x8bc4: 0xe0002c6e, 0x8bc5: 0xe0002c72, 0x8bc6: 0xe0002c76, 0x8bc7: 0xe0002c7a, + 0x8bc8: 0xe0002c7e, 0x8bc9: 0xe0002c82, 0x8bca: 0xe0002c86, 0x8bcb: 0xe0002c8a, + 0x8bcc: 0xe0002c8e, 0x8bcd: 0xe0002c92, 0x8bce: 0xe000004c, 0x8bcf: 0xe0000051, + 0x8bd0: 0xe0000056, 0x8bd1: 0xe000005b, 0x8bd2: 0xe0000060, 0x8bd3: 0xe0000065, + 0x8bd4: 0xe000006a, 0x8bd5: 0xe000006f, 0x8bd6: 0xe0000083, 0x8bd7: 0xe000008d, + 0x8bd8: 0xe0000092, 0x8bd9: 0xe0000097, 0x8bda: 0xe000009c, 0x8bdb: 0xe00000a1, + 0x8bdc: 0xe0000088, 0x8bdd: 0xe0000074, 0x8bde: 0xe000007c, + 0x8be0: 0xe0002c96, 0x8be1: 0xe0002ca6, 0x8be2: 0xe0002c9e, 0x8be3: 0xe0002cd6, + 0x8be4: 0xe0002caa, 0x8be5: 0xe0002cbe, 0x8be6: 0xe0002c9a, 0x8be7: 0xe0002cba, + 0x8be8: 0xe0002ca2, 0x8be9: 0xe0002cc6, 0x8bea: 0xe0002ce6, 0x8beb: 0xe0002cfa, + 0x8bec: 0xe0002cf6, 0x8bed: 0xe0002cee, 0x8bee: 0xe0002d22, 0x8bef: 0xe0002cda, + 0x8bf0: 0xe0002ce2, 0x8bf1: 0xe0002cf2, 0x8bf2: 0xe0002cea, 0x8bf3: 0xe0002d06, + 0x8bf4: 0xe0002cce, 0x8bf5: 0xe0002cfe, 0x8bf6: 0xe0002d1a, 0x8bf7: 0xe0002d0a, + 0x8bf8: 0xe0002cc2, 0x8bf9: 0xe0002cae, 0x8bfa: 0xe0002cd2, 0x8bfb: 0xe0002cde, + 0x8bfc: 0xe0002d02, 0x8bfd: 0xe0002cb2, 0x8bfe: 0xe0002d1e, 0x8bff: 0xe0002cca, + // Block 0x230, offset 0x8c00 + 0x8c00: 0xe0002d0e, 0x8c01: 0xe0002cb6, 0x8c02: 0xe0002d12, 0x8c03: 0xe0002d16, + 0x8c04: 0x02aa9e86, 0x8c05: 0x02bcf886, 0x8c06: 0x02cb0e86, 0x8c07: 0x02f71e86, + 0x8c08: 0xe00002e3, 0x8c09: 0xe00003d8, 0x8c0a: 0xe00004b3, 0x8c0b: 0xe000057d, + 0x8c0c: 0xe0000648, 0x8c0d: 0xe00006f0, 0x8c0e: 0xe000079c, 0x8c0f: 0xe0000841, + 0x8c10: 0xe0000ec0, 0x8c11: 0xe0002e05, 0x8c12: 0xe0002e10, 0x8c13: 0xe0002e1b, + 0x8c14: 0xe0002e26, 0x8c15: 0xe0002e31, 0x8c16: 0xe0002e38, 0x8c17: 0xe0002e3f, + 0x8c18: 0xe0002e46, 0x8c19: 0xe0002e4d, 0x8c1a: 0xe0002e63, 0x8c1b: 0xe0002e6a, + 0x8c1c: 0xe0002e71, 0x8c1d: 0xe0002e74, 0x8c1e: 0xe0002e77, 0x8c1f: 0xe0002e7a, + 0x8c20: 0x0062ac86, 0x8c21: 0x0062b086, 0x8c22: 0x0062b286, 0x8c23: 0x0062b686, + 0x8c24: 0x0062b886, 0x8c25: 0x0062ba86, 0x8c26: 0x0062be86, 0x8c27: 0x0062c286, + 0x8c28: 0x0062c486, 0x8c29: 0x0062c886, 0x8c2a: 0x0062ca86, 0x8c2b: 0x0062cc86, + 0x8c2c: 0x0062ce86, 0x8c2d: 0x0062d086, 0x8c2e: 0xf0000606, 0x8c2f: 0xf0000606, + 0x8c30: 0xf0000606, 0x8c31: 0xf0000606, 0x8c32: 0xf0000606, 0x8c33: 0xf0000606, + 0x8c34: 0xf0000606, 0x8c35: 0xf0000606, 0x8c36: 0xf0000606, 0x8c37: 0xf0000606, + 0x8c38: 0xf0000606, 0x8c39: 0xf0000606, 0x8c3a: 0xf0000606, 0x8c3b: 0xf0000606, + 0x8c3c: 0xe0002127, 0x8c3d: 0xe0002122, 0x8c3e: 0xf0000606, 0x8c3f: 0x4027ac20, + // Block 0x231, offset 0x8c40 + 0x8c40: 0x029c0086, 0x8c41: 0x029d1886, 0x8c42: 0x029c1286, 0x8c43: 0x02adb686, + 0x8c44: 0x029d2886, 0x8c45: 0x02a2da86, 0x8c46: 0x029c0686, 0x8c47: 0x02a2d686, + 0x8c48: 0x029cba86, 0x8c49: 0x02a68286, 0x8c4a: 0x02ce1086, 0x8c4b: 0x02e0d686, + 0x8c4c: 0x02d86886, 0x8c4d: 0x02ce5086, 0x8c4e: 0x0323a286, 0x8c4f: 0x02ae3e86, + 0x8c50: 0x02cbca86, 0x8c51: 0x02d05486, 0x8c52: 0x02ce1286, 0x8c53: 0x02f27c86, + 0x8c54: 0x02a81a86, 0x8c55: 0x02e4f286, 0x8c56: 0x03194286, 0x8c57: 0x02f2ba86, + 0x8c58: 0x02a56886, 0x8c59: 0x02f3b086, 0x8c5a: 0x02ea6e86, 0x8c5b: 0x02b2e686, + 0x8c5c: 0x0320d286, 0x8c5d: 0x02a25486, 0x8c5e: 0x02a6e086, 0x8c5f: 0x02d9d086, + 0x8c60: 0x03300a86, 0x8c61: 0x029e2286, 0x8c62: 0x02a33286, 0x8c63: 0x02d6c686, + 0x8c64: 0x029c1486, 0x8c65: 0x029c5a86, 0x8c66: 0x029c1686, 0x8c67: 0x02bbcc86, + 0x8c68: 0x02a7e686, 0x8c69: 0x02a67686, 0x8c6a: 0x02b72e86, 0x8c6b: 0x02b6cc86, + 0x8c6c: 0x02edc686, 0x8c6d: 0x029e0286, 0x8c6e: 0x03198e86, 0x8c6f: 0x02a6a886, + 0x8c70: 0x02b23886, 0x8c71: 0xe0002e7d, 0x8c72: 0xe0002e80, 0x8c73: 0xe0002e83, + 0x8c74: 0xe0002e86, 0x8c75: 0xe0002e98, 0x8c76: 0xe0002e9b, 0x8c77: 0xe0002e9e, + 0x8c78: 0xe0002ea1, 0x8c79: 0xe0002ea4, 0x8c7a: 0xe0002ea7, 0x8c7b: 0xe0002eaa, + 0x8c7c: 0xe0002ead, 0x8c7d: 0xe0002eb0, 0x8c7e: 0xe0002eb3, 0x8c7f: 0xe0002ec5, + // Block 0x232, offset 0x8c80 + 0x8c80: 0xe0002dea, 0x8c81: 0xe0002e57, 0x8c82: 0xe0002e8c, 0x8c83: 0xe0002eb9, + 0x8c84: 0xe0002ecb, 0x8c85: 0xe0002eda, 0x8c86: 0xe0002ee9, 0x8c87: 0xe0002ef8, + 0x8c88: 0xe0002f07, 0x8c89: 0xe0002d50, 0x8c8a: 0xe0002d63, 0x8c8b: 0xe0002d76, + 0x8c8c: 0xe00027c5, 0x8c8d: 0xe0000b85, 0x8c8e: 0xe00026cc, 0x8c8f: 0xe0000d14, + 0x8c90: 0x00657693, 0x8c91: 0x00657893, 0x8c92: 0x00657a93, 0x8c93: 0x00657e93, + 0x8c94: 0x00658093, 0x8c95: 0x00658293, 0x8c96: 0x00658493, 0x8c97: 0x00658693, + 0x8c98: 0x00658893, 0x8c99: 0x00658a93, 0x8c9a: 0x00658c93, 0x8c9b: 0x00658e93, + 0x8c9c: 0x00659093, 0x8c9d: 0x00659293, 0x8c9e: 0x00659493, 0x8c9f: 0x00659693, + 0x8ca0: 0x00659893, 0x8ca1: 0x00659a93, 0x8ca2: 0x00659c93, 0x8ca3: 0x00659e93, + 0x8ca4: 0x0065a093, 0x8ca5: 0x0065a293, 0x8ca6: 0x0065a493, 0x8ca7: 0x0065a693, + 0x8ca8: 0x0065a893, 0x8ca9: 0x0065aa93, 0x8caa: 0x0065ac93, 0x8cab: 0x0065ae93, + 0x8cac: 0x0065b093, 0x8cad: 0x0065b293, 0x8cae: 0x0065b493, 0x8caf: 0x0065b693, + 0x8cb0: 0x0065b893, 0x8cb1: 0x0065ba93, 0x8cb2: 0x0065bc93, 0x8cb3: 0x0065be93, + 0x8cb4: 0x0065c093, 0x8cb5: 0x0065c493, 0x8cb6: 0x0065c693, 0x8cb7: 0x0065c893, + 0x8cb8: 0x0065ca93, 0x8cb9: 0x0065cc93, 0x8cba: 0x0065ce93, 0x8cbb: 0x0065d093, + 0x8cbc: 0x0065d293, 0x8cbd: 0x0065d493, 0x8cbe: 0x0065d693, + // Block 0x233, offset 0x8cc0 + 0x8cc0: 0xe000230b, 0x8cc1: 0xe00022f8, 0x8cc2: 0xe00022fc, 0x8cc3: 0xe0002311, + 0x8cc4: 0xe0002316, 0x8cc5: 0xe000231d, 0x8cc6: 0xe0002321, 0x8cc7: 0xe0002325, + 0x8cc8: 0xe000232b, 0x8cc9: 0xf0001c1c, 0x8cca: 0xe0002330, 0x8ccb: 0xe000233c, + 0x8ccc: 0xe0002340, 0x8ccd: 0xe0002337, 0x8cce: 0xe0002346, 0x8ccf: 0xe000234b, + 0x8cd0: 0xe000234f, 0x8cd1: 0xe0002353, 0x8cd2: 0xf0001c1c, 0x8cd3: 0xe000235e, + 0x8cd4: 0xe0002358, 0x8cd5: 0xf0001c1c, 0x8cd6: 0xe0002363, 0x8cd7: 0xe000236d, + 0x8cd8: 0xe0002d39, 0x8cd9: 0xe0002ded, 0x8cda: 0xe0002e5a, 0x8cdb: 0xe0002e8f, + 0x8cdc: 0xe0002ebc, 0x8cdd: 0xe0002ece, 0x8cde: 0xe0002edd, 0x8cdf: 0xe0002eec, + 0x8ce0: 0xe0002efb, 0x8ce1: 0xe0002f0a, 0x8ce2: 0xe0002d54, 0x8ce3: 0xe0002d67, + 0x8ce4: 0xe0002d7a, 0x8ce5: 0xe0002d89, 0x8ce6: 0xe0002d98, 0x8ce7: 0xe0002da7, + 0x8ce8: 0xe0002db6, 0x8ce9: 0xe0002dc5, 0x8cea: 0xe0002dd4, 0x8ceb: 0xe0002de3, + 0x8cec: 0xe0002e01, 0x8ced: 0xe0002e0c, 0x8cee: 0xe0002e17, 0x8cef: 0xe0002e22, + 0x8cf0: 0xe0002e2d, 0x8cf1: 0xe0000c1e, 0x8cf2: 0xe000329b, 0x8cf3: 0xe0002f0d, + 0x8cf4: 0xe0000a31, 0x8cf5: 0xe0002824, 0x8cf6: 0xe00035d6, 0x8cf7: 0xe00032a7, + 0x8cf8: 0xe0000ac2, 0x8cf9: 0xe0000ac6, 0x8cfa: 0xe00027e8, 0x8cfb: 0xf0001c1c, + 0x8cfc: 0xf0001c1c, 0x8cfd: 0xf0001c1c, 0x8cfe: 0xf0001c1c, 0x8cff: 0xe0002431, + // Block 0x234, offset 0x8d00 + 0x8d00: 0xe00035d0, 0x8d01: 0xe00035b8, 0x8d02: 0xe00035ee, 0x8d03: 0xe000358e, + 0x8d04: 0xe00027f7, 0x8d05: 0xe00027fa, 0x8d06: 0xe0003594, 0x8d07: 0xe0003573, + 0x8d08: 0xe0000a6b, 0x8d09: 0xe0000cb4, 0x8d0a: 0xe00035d9, 0x8d0b: 0xe00035bb, + 0x8d0c: 0xe00035f1, 0x8d0d: 0xe00035f4, 0x8d0e: 0xe000359d, 0x8d0f: 0xe00027fd, + 0x8d10: 0xe00027ce, 0x8d11: 0xe0000cb9, 0x8d12: 0xe0000d36, 0x8d13: 0xe0000be3, + 0x8d14: 0xe0000fc5, 0x8d15: 0xe00035f7, 0x8d16: 0xe00035a0, 0x8d17: 0xe00032a4, + 0x8d18: 0xe0002803, 0x8d19: 0xe0003570, 0x8d1a: 0xe00035c7, 0x8d1b: 0xe00035fa, + 0x8d1c: 0xe00035a3, 0x8d1d: 0xe0003099, 0x8d1e: 0xe0002806, 0x8d1f: 0xe0000d3e, + 0x8d20: 0xe0000a72, 0x8d21: 0xe0003588, 0x8d22: 0xe0000cbd, 0x8d23: 0xe0000d42, + 0x8d24: 0xe0000a76, 0x8d25: 0xe000358b, 0x8d26: 0xe0000cc1, 0x8d27: 0xe0000d2d, + 0x8d28: 0xe0000d31, 0x8d29: 0xe00035d3, 0x8d2a: 0xe0000cc5, 0x8d2b: 0xe0000d4a, + 0x8d2c: 0xe0000be7, 0x8d2d: 0xe0000f0b, 0x8d2e: 0xe0000f0f, 0x8d2f: 0xe0000f15, + 0x8d30: 0xe000282d, 0x8d31: 0xe0002821, 0x8d32: 0xe000288e, 0x8d33: 0xe000281b, + 0x8d34: 0xe00035dc, 0x8d35: 0xe00035ca, 0x8d36: 0xe00035fd, 0x8d37: 0xe00035a6, + 0x8d38: 0xe000280f, 0x8d39: 0xe00035a9, 0x8d3a: 0xe00035df, 0x8d3b: 0xe00035cd, + 0x8d3c: 0xe0003600, 0x8d3d: 0xe00035af, 0x8d3e: 0xe0002812, 0x8d3f: 0xe00035b2, + // Block 0x235, offset 0x8d40 + 0x8d40: 0xe0002815, 0x8d41: 0xe00035b5, 0x8d42: 0xe00009b7, 0x8d43: 0xe00024f3, + 0x8d44: 0xe0003090, 0x8d45: 0xe0003096, 0x8d46: 0xe0000a66, 0x8d47: 0xe0000a7a, + 0x8d48: 0xe000329e, 0x8d49: 0xe0003576, 0x8d4a: 0xe00027c2, 0x8d4b: 0xe00027c8, + 0x8d4c: 0xe00027e5, 0x8d4d: 0xe0002800, 0x8d4e: 0xe0002809, 0x8d4f: 0xe000280c, + 0x8d50: 0xe0003582, 0x8d51: 0xe0003585, 0x8d52: 0xe0000d0d, 0x8d53: 0xe0002818, + 0x8d54: 0xe0003591, 0x8d55: 0xe0000d3a, 0x8d56: 0xe0000d46, 0x8d57: 0xe0002827, + 0x8d58: 0xe0000eb0, 0x8d59: 0xe0000eb8, 0x8d5a: 0xe000282a, 0x8d5b: 0xe0002836, + 0x8d5c: 0xe000283f, 0x8d5d: 0xe00035e2, 0x8d5e: 0xe00010b2, 0x8d5f: 0xe00009c8, + 0x8d60: 0xe0002de7, 0x8d61: 0xe0002e54, 0x8d62: 0xe0002e89, 0x8d63: 0xe0002eb6, + 0x8d64: 0xe0002ec8, 0x8d65: 0xe0002ed7, 0x8d66: 0xe0002ee6, 0x8d67: 0xe0002ef5, + 0x8d68: 0xe0002f04, 0x8d69: 0xe0002d4c, 0x8d6a: 0xe0002d5f, 0x8d6b: 0xe0002d72, + 0x8d6c: 0xe0002d85, 0x8d6d: 0xe0002d94, 0x8d6e: 0xe0002da3, 0x8d6f: 0xe0002db2, + 0x8d70: 0xe0002dc1, 0x8d71: 0xe0002dd0, 0x8d72: 0xe0002ddf, 0x8d73: 0xe0002dfd, + 0x8d74: 0xe0002e08, 0x8d75: 0xe0002e13, 0x8d76: 0xe0002e1e, 0x8d77: 0xe0002e29, + 0x8d78: 0xe0002e34, 0x8d79: 0xe0002e3b, 0x8d7a: 0xe0002e42, 0x8d7b: 0xe0002e49, + 0x8d7c: 0xe0002e50, 0x8d7d: 0xe0002e66, 0x8d7e: 0xe0002e6d, 0x8d7f: 0xe0000bdf, + // Block 0x236, offset 0x8d80 + 0x8d80: 0xe000356a, 0x8d81: 0xe00026cf, 0x8d82: 0xe000356d, 0x8d83: 0xe0000b99, + 0x8d84: 0xe0000b9d, 0x8d85: 0xe0000f83, 0x8d86: 0xe000283c, + 0x8d93: 0xf0000404, + 0x8d94: 0xf0000404, 0x8d95: 0xf0000404, 0x8d96: 0xf0000404, 0x8d97: 0xf0000404, + 0x8d9d: 0xe000150b, 0x8d9e: 0xa1a09602, 0x8d9f: 0xe0001514, + 0x8da0: 0x0038ae85, 0x8da1: 0x00389085, 0x8da2: 0x00389685, 0x8da3: 0x00389885, + 0x8da4: 0x0038a485, 0x8da5: 0x0038a685, 0x8da6: 0x0038a885, 0x8da7: 0x0038b685, + 0x8da8: 0x0038ba85, 0x8da9: 0x00093885, 0x8daa: 0xe0001542, 0x8dab: 0xe000153f, + 0x8dac: 0xe000154c, 0x8dad: 0xe0001548, 0x8dae: 0xe00014e1, 0x8daf: 0xe00014e4, + 0x8db0: 0xe00014e7, 0x8db1: 0xe00014ea, 0x8db2: 0xe00014f0, 0x8db3: 0xe00014f3, + 0x8db4: 0xe00014f6, 0x8db5: 0xe00014fc, 0x8db6: 0xe0001505, + 0x8db8: 0xe0001508, 0x8db9: 0xe000150e, 0x8dba: 0xe000151b, 0x8dbb: 0xe0001518, + 0x8dbc: 0xe0001521, 0x8dbe: 0xe0001524, + // Block 0x237, offset 0x8dc0 + 0x8dc0: 0xa0000000, 0x8dc1: 0xa0000000, 0x8dc2: 0xa0000000, 0x8dc3: 0xa0000000, + 0x8dc4: 0xa0000000, 0x8dc5: 0xa0000000, 0x8dc6: 0xa0000000, 0x8dc7: 0xa0000000, + 0x8dc8: 0xa0000000, 0x8dc9: 0xa0000000, 0x8dca: 0xa0000000, 0x8dcb: 0xa0000000, + 0x8dcc: 0xa0000000, 0x8dcd: 0xa0000000, 0x8dce: 0xa0000000, 0x8dcf: 0xa0000000, + 0x8dd0: 0x00024096, 0x8dd1: 0x00025c96, 0x8dd2: 0x00030496, 0x8dd3: 0x00026c96, + 0x8dd4: 0x00026296, 0x8dd5: 0x0002ba96, 0x8dd6: 0x0002c496, 0x8dd7: 0x0004b496, + 0x8dd8: 0x0004b696, 0x8dd9: 0xe0002bb6, + 0x8de0: 0xae608202, 0x8de1: 0xae600000, 0x8de2: 0xae608102, 0x8de3: 0xae600000, + 0x8de4: 0xae600000, 0x8de5: 0xae600000, 0x8de6: 0xae600000, + 0x8df0: 0xe0002baf, 0x8df1: 0x00022c96, 0x8df2: 0x00022a96, 0x8df3: 0x00021696, + 0x8df4: 0x00021696, 0x8df5: 0x0003f496, 0x8df6: 0x0003f696, 0x8df7: 0x0003fc96, + 0x8df8: 0x0003fe96, 0x8df9: 0x0004b096, 0x8dfa: 0x0004b296, 0x8dfb: 0x0004ac96, + 0x8dfc: 0x0004ae96, 0x8dfd: 0x0004a096, 0x8dfe: 0x0004a296, 0x8dff: 0x00049c96, + // Block 0x238, offset 0x8e00 + 0x8e00: 0xe0002d36, 0x8e01: 0xe0002d33, 0x8e02: 0xe0002d3c, 0x8e03: 0xe0002df0, + 0x8e04: 0xe0002e5d, 0x8e05: 0xe0002e92, 0x8e06: 0xe0002ebf, 0x8e07: 0xe0002ed1, + 0x8e08: 0xe0002ee0, 0x8e09: 0xe0002eef, 0x8e0a: 0xe0002efe, + 0x8e10: 0xe0002be2, 0x8e11: 0xe0002bea, 0x8e12: 0xe0002bf2, 0x8e13: 0xe0002bfa, + 0x8e14: 0xe00024a3, 0x8e15: 0xe0002c02, 0x8e16: 0xe0002c0a, 0x8e17: 0xe00024ab, + 0x8e18: 0xe00024b3, 0x8e19: 0xe0002c12, 0x8e1a: 0xe00024bb, 0x8e1b: 0xe0002c1a, + 0x8e1c: 0xe0002c22, 0x8e1d: 0xe0002c2a, 0x8e1e: 0xe00024c3, 0x8e1f: 0xe0002c32, + 0x8e20: 0xe00024cb, 0x8e21: 0xe00024d3, 0x8e22: 0xe00024db, 0x8e23: 0xe00024e3, + 0x8e24: 0xe0002c3a, 0x8e25: 0xe0002c42, 0x8e26: 0xe0002c4a, 0x8e27: 0xe00024eb, + 0x8e28: 0xe0002c52, 0x8e29: 0xe0002c5a, 0x8e2a: 0xe00024ef, 0x8e2b: 0x002c3a8c, + 0x8e2c: 0x002f7a8c, 0x8e2d: 0xe0003093, 0x8e2e: 0xe00035e8, + 0x8e30: 0x002bde9d, 0x8e31: 0x002c0a9d, 0x8e32: 0x002c3a9d, 0x8e33: 0x002c629d, + 0x8e34: 0x002c989d, 0x8e35: 0x002d089d, 0x8e36: 0x002d229d, 0x8e37: 0x002d689d, + 0x8e38: 0x002d9a9d, 0x8e39: 0x002dcc9d, 0x8e3a: 0x002dfe9d, 0x8e3b: 0x002e229d, + 0x8e3c: 0x002e829d, 0x8e3d: 0x002e9e9d, 0x8e3e: 0x002ee29d, 0x8e3f: 0x002f2c9d, + // Block 0x239, offset 0x8e40 + 0x8e40: 0x002f569d, 0x8e41: 0x002f7a9d, 0x8e42: 0x002fe69d, 0x8e43: 0x00302c9d, + 0x8e44: 0x00306c9d, 0x8e45: 0x0030be9d, 0x8e46: 0x0030e29d, 0x8e47: 0x0030f69d, + 0x8e48: 0x0031009d, 0x8e49: 0x00312a9d, 0x8e4a: 0xe00027cb, 0x8e4b: 0xe00035ac, + 0x8e4c: 0xe0002830, 0x8e4d: 0xe0002839, 0x8e4e: 0xe0000ebc, 0x8e4f: 0xe00035e5, + 0x8e50: 0x002bde8c, 0x8e51: 0x002c0a8c, 0x8e52: 0x002c3a8c, 0x8e53: 0x002c628c, + 0x8e54: 0x002c988c, 0x8e55: 0x002d088c, 0x8e56: 0x002d228c, 0x8e57: 0x002d688c, + 0x8e58: 0x002d9a8c, 0x8e59: 0x002dcc8c, 0x8e5a: 0x002dfe8c, 0x8e5b: 0x002e228c, + 0x8e5c: 0x002e828c, 0x8e5d: 0x002e9e8c, 0x8e5e: 0x002ee28c, 0x8e5f: 0x002f2c8c, + 0x8e60: 0x002f568c, 0x8e61: 0x002f7a8c, 0x8e62: 0x002fe68c, 0x8e63: 0x00302c8c, + 0x8e64: 0x00306c8c, 0x8e65: 0x0030be8c, 0x8e66: 0x0030e28c, 0x8e67: 0x0030f68c, + 0x8e68: 0x0031008c, 0x8e69: 0x00312a8c, 0x8e6a: 0xe0003597, 0x8e6b: 0xe000359a, + 0x8e70: 0x002bde9d, 0x8e71: 0x002c0a9d, 0x8e72: 0x002c3a9d, 0x8e73: 0x002c629d, + 0x8e74: 0x002c989d, 0x8e75: 0x002d089d, 0x8e76: 0x002d229d, 0x8e77: 0x002d689d, + 0x8e78: 0x002d9a9d, 0x8e79: 0x002dcc9d, 0x8e7a: 0x002dfe9d, 0x8e7b: 0x002e229d, + 0x8e7c: 0x002e829d, 0x8e7d: 0x002e9e9d, 0x8e7e: 0x002ee29d, 0x8e7f: 0x002f2c9d, + // Block 0x23a, offset 0x8e80 + 0x8e80: 0x002f569d, 0x8e81: 0x002f7a9d, 0x8e82: 0x002fe69d, 0x8e83: 0x00302c9d, + 0x8e84: 0x00306c9d, 0x8e85: 0x0030be9d, 0x8e86: 0x0030e29d, 0x8e87: 0x0030f69d, + 0x8e88: 0x0031009d, 0x8e89: 0x00312a9d, 0x8e8a: 0x002f2c9d, 0x8e8b: 0xe0000c81, + 0x8e8c: 0xe0000eb5, 0x8e8d: 0xe0000f74, 0x8e8e: 0xe00009d2, 0x8e8f: 0xe00010f0, + 0x8e90: 0xe00032a1, 0x8e91: 0xe0000a6f, 0x8e92: 0xe0000a7e, 0x8e93: 0xe0000ba4, + 0x8e94: 0xe0000c84, 0x8e95: 0xe0000d8a, 0x8e96: 0xe0000d8e, 0x8e97: 0xe0000e9b, + 0x8e98: 0xe0000f77, 0x8e99: 0xe00010a2, 0x8e9a: 0xe00010c0, + // Block 0x23b, offset 0x8ec0 + 0x8ec0: 0xa0000000, 0x8ec1: 0xa0000000, 0x8ec2: 0xa0000000, 0x8ec3: 0xa0000000, + 0x8ec4: 0xa0000000, 0x8ec5: 0xa0000000, 0x8ec6: 0xa0000000, 0x8ec7: 0xa0000000, + 0x8ec8: 0xa0000000, 0x8ec9: 0x40020020, 0x8eca: 0x40020220, 0x8ecb: 0x40020420, + 0x8ecc: 0x40020620, 0x8ecd: 0x40020820, 0x8ece: 0xa0000000, 0x8ecf: 0xa0000000, + 0x8ed0: 0xa0000000, 0x8ed1: 0xa0000000, 0x8ed2: 0xa0000000, 0x8ed3: 0xa0000000, + 0x8ed4: 0xa0000000, 0x8ed5: 0xa0000000, 0x8ed6: 0xa0000000, 0x8ed7: 0xa0000000, + 0x8ed8: 0xa0000000, 0x8ed9: 0xa0000000, 0x8eda: 0xa0000000, 0x8edb: 0xa0000000, + 0x8edc: 0xa0000000, 0x8edd: 0xa0000000, 0x8ede: 0xa0000000, 0x8edf: 0xa0000000, + 0x8ee0: 0x40021220, 0x8ee1: 0x4002ba20, 0x8ee2: 0x4003e020, 0x8ee3: 0x4004ea20, + 0x8ee4: 0x4027de20, 0x8ee5: 0x4004ec20, 0x8ee6: 0x4004e620, 0x8ee7: 0x4003d220, + 0x8ee8: 0x4003f420, 0x8ee9: 0x4003f620, 0x8eea: 0x4004d820, 0x8eeb: 0x40093820, + 0x8eec: 0x40024020, 0x8eed: 0x40021a20, 0x8eee: 0x4002e420, 0x8eef: 0x4004e220, + 0x8ef0: 0x4029cc20, 0x8ef1: 0x4029ce20, 0x8ef2: 0x4029d020, 0x8ef3: 0x4029d220, + 0x8ef4: 0x4029d420, 0x8ef5: 0x4029d620, 0x8ef6: 0x4029d820, 0x8ef7: 0x4029da20, + 0x8ef8: 0x4029dc20, 0x8ef9: 0x4029de20, 0x8efa: 0x40026c20, 0x8efb: 0x40026220, + 0x8efc: 0x40094020, 0x8efd: 0x40094220, 0x8efe: 0x40094420, 0x8eff: 0x4002c420, + // Block 0x23c, offset 0x8f00 + 0x8f00: 0x4004d620, 0x8f01: 0x002bde88, 0x8f02: 0x002c0a88, 0x8f03: 0xc3352741, + 0x8f04: 0x002c6288, 0x8f05: 0x002c9888, 0x8f06: 0x002d0888, 0x8f07: 0xc3392741, + 0x8f08: 0xc5402741, 0x8f09: 0x002d9a88, 0x8f0a: 0xc5442741, 0x8f0b: 0x002dfe88, + 0x8f0c: 0xc0030002, 0x8f0d: 0x002e8288, 0x8f0e: 0x002e9e88, 0x8f0f: 0x002ee288, + 0x8f10: 0x002f2c88, 0x8f11: 0x002f5688, 0x8f12: 0x002f7a88, 0x8f13: 0xc3432741, + 0x8f14: 0x00302c88, 0x8f15: 0xc34700d1, 0x8f16: 0x0030be88, 0x8f17: 0x0030e288, + 0x8f18: 0x0030f688, 0x8f19: 0x00310088, 0x8f1a: 0x00312a88, 0x8f1b: 0x4003f820, + 0x8f1c: 0x4004e420, 0x8f1d: 0x4003fa20, 0x8f1e: 0x40062420, 0x8f1f: 0x40021620, + 0x8f20: 0x40061e20, 0x8f21: 0x402bde20, 0x8f22: 0x402c0a20, 0x8f23: 0xc3332741, + 0x8f24: 0x402c6220, 0x8f25: 0x402c9820, 0x8f26: 0x402d0820, 0x8f27: 0xc3372741, + 0x8f28: 0xc53e2741, 0x8f29: 0x402d9a20, 0x8f2a: 0xc5422741, 0x8f2b: 0x402dfe20, + 0x8f2c: 0xc0000002, 0x8f2d: 0x402e8220, 0x8f2e: 0x402e9e20, 0x8f2f: 0x402ee220, + 0x8f30: 0x402f2c20, 0x8f31: 0x402f5620, 0x8f32: 0x402f7a20, 0x8f33: 0xc3412741, + 0x8f34: 0x40302c20, 0x8f35: 0xc34500d1, 0x8f36: 0x4030be20, 0x8f37: 0x4030e220, + 0x8f38: 0x4030f620, 0x8f39: 0x40310020, 0x8f3a: 0x40312a20, 0x8f3b: 0x4003fc20, + 0x8f3c: 0x40094820, 0x8f3d: 0x4003fe20, 0x8f3e: 0x40094c20, 0x8f3f: 0xa0000000, + // Block 0x23d, offset 0x8f40 + 0x8f40: 0xe0000983, 0x8f41: 0xe0000980, 0x8f42: 0xe00008fb, 0x8f43: 0xe00008f8, + 0x8f44: 0xe000097d, 0x8f45: 0xe000097a, 0x8f46: 0xe0000a38, 0x8f47: 0xe0000a35, + 0x8f48: 0x002c3c83, 0x8f49: 0x402c3c20, 0x8f4a: 0xe0000a4a, 0x8f4b: 0xe0000a47, + 0x8f4c: 0xe0000a44, 0x8f4d: 0xe0000a41, 0x8f4e: 0xe0000a86, 0x8f4f: 0xe0000a83, + 0x8f50: 0xe0000aaa, 0x8f51: 0xe0000aa7, 0x8f52: 0xe0000b46, 0x8f53: 0xe0000b43, + 0x8f54: 0xe0000aee, 0x8f55: 0xe0000aeb, 0x8f56: 0xe0000b2c, 0x8f57: 0xe0000b29, + 0x8f58: 0xe0000b40, 0x8f59: 0xe0000b3d, 0x8f5a: 0xe0000b1a, 0x8f5b: 0xe0000b17, + 0x8f5c: 0x002d2483, 0x8f5d: 0x402d2420, 0x8f5e: 0xe0000bb2, 0x8f5f: 0xe0000baf, + 0x8f60: 0xe0000bc4, 0x8f61: 0xe0000bc1, 0x8f62: 0xe0000bca, 0x8f63: 0xe0000bc7, + 0x8f64: 0x002d6a83, 0x8f65: 0x402d6a20, 0x8f66: 0xe0000c1b, 0x8f67: 0xe0000c18, + 0x8f68: 0xe0000c51, 0x8f69: 0xe0000c4e, 0x8f6a: 0xe0000c60, 0x8f6b: 0xe0000c5d, + 0x8f6c: 0xe0000c31, 0x8f6d: 0xe0000c2e, 0x8f6e: 0xe0000c5a, 0x8f6f: 0xe0000c57, + 0x8f70: 0xe0000c54, 0x8f71: 0x402da220, 0x8f72: 0xf0000a0a, 0x8f73: 0xf0000404, + 0x8f74: 0x002dce83, 0x8f75: 0x402dce20, 0x8f76: 0xe0000c9f, 0x8f77: 0xe0000c9c, + 0x8f78: 0x402f7220, 0x8f79: 0xe0000ccc, 0x8f7a: 0xe0000cc9, 0x8f7b: 0xe0000cd8, + 0x8f7c: 0xe0000cd5, 0x8f7d: 0xe0000cd2, 0x8f7e: 0xe0000ccf, 0x8f7f: 0xe0000d04, + // Block 0x23e, offset 0x8f80 + 0x8f80: 0xe0000cfe, 0x8f81: 0xe0000cf8, 0x8f82: 0xe0000cf5, 0x8f83: 0xe0000d51, + 0x8f84: 0xe0000d4e, 0x8f85: 0xe0000d6f, 0x8f86: 0xe0000d6c, 0x8f87: 0xe0000d5d, + 0x8f88: 0xe0000d5a, 0x8f89: 0xf0000404, 0x8f8a: 0x002eda88, 0x8f8b: 0x402eda20, + 0x8f8c: 0xe0000e2e, 0x8f8d: 0xe0000e2b, 0x8f8e: 0xe0000da0, 0x8f8f: 0xe0000d9d, + 0x8f90: 0xe0000de0, 0x8f91: 0xe0000ddd, 0x8f92: 0xe0000e93, 0x8f93: 0xe0000e8f, + 0x8f94: 0xe0000eca, 0x8f95: 0xe0000ec7, 0x8f96: 0xe0000edc, 0x8f97: 0xe0000ed9, + 0x8f98: 0xe0000ed0, 0x8f99: 0xe0000ecd, 0x8f9a: 0xe0000f1f, 0x8f9b: 0xe0000f1c, + 0x8f9c: 0x002fe883, 0x8f9d: 0x402fe820, 0x8f9e: 0xe0000f47, 0x8f9f: 0xe0000f44, + 0x8fa0: 0xe0000f33, 0x8fa1: 0xe0000f30, 0x8fa2: 0xe0000f99, 0x8fa3: 0xe0000f96, + 0x8fa4: 0xe0000f8a, 0x8fa5: 0xe0000f87, 0x8fa6: 0x00303688, 0x8fa7: 0x40303620, + 0x8fa8: 0xe000102b, 0x8fa9: 0xe0001028, 0x8faa: 0xe000103f, 0x8fab: 0xe000103c, + 0x8fac: 0x00306e83, 0x8fad: 0x40306e20, 0x8fae: 0xe0000ff9, 0x8faf: 0xe0000ff6, + 0x8fb0: 0xe0001025, 0x8fb1: 0xe0001022, 0x8fb2: 0xe0001039, 0x8fb3: 0xe0001036, + 0x8fb4: 0xe00010d8, 0x8fb5: 0xe00010d5, 0x8fb6: 0xe000110e, 0x8fb7: 0xe000110b, + 0x8fb8: 0xe0001117, 0x8fb9: 0xe000113b, 0x8fba: 0xe0001138, 0x8fbb: 0xe000114d, + 0x8fbc: 0xe000114a, 0x8fbd: 0xe0001147, 0x8fbe: 0xe0001144, 0x8fbf: 0xe0000f64, + // Block 0x23f, offset 0x8fc0 + 0x8fc0: 0xa0000000, 0x8fc1: 0xa0000000, 0x8fc2: 0xa0000000, 0x8fc3: 0xa0000000, + 0x8fc4: 0xa0000000, 0x8fc5: 0xa0000000, 0x8fc6: 0xa0000000, 0x8fc7: 0xa0000000, + 0x8fc8: 0xa0000000, 0x8fc9: 0x40020020, 0x8fca: 0x40020220, 0x8fcb: 0x40020420, + 0x8fcc: 0x40020620, 0x8fcd: 0x40020820, 0x8fce: 0xa0000000, 0x8fcf: 0xa0000000, + 0x8fd0: 0xa0000000, 0x8fd1: 0xa0000000, 0x8fd2: 0xa0000000, 0x8fd3: 0xa0000000, + 0x8fd4: 0xa0000000, 0x8fd5: 0xa0000000, 0x8fd6: 0xa0000000, 0x8fd7: 0xa0000000, + 0x8fd8: 0xa0000000, 0x8fd9: 0xa0000000, 0x8fda: 0xa0000000, 0x8fdb: 0xa0000000, + 0x8fdc: 0xa0000000, 0x8fdd: 0xa0000000, 0x8fde: 0xa0000000, 0x8fdf: 0xa0000000, + 0x8fe0: 0x40021220, 0x8fe1: 0x4002ba20, 0x8fe2: 0x4003e020, 0x8fe3: 0x4004ea20, + 0x8fe4: 0x4027de20, 0x8fe5: 0x4004ec20, 0x8fe6: 0x4004e620, 0x8fe7: 0x4003d220, + 0x8fe8: 0x4003f420, 0x8fe9: 0x4003f620, 0x8fea: 0x4004d820, 0x8feb: 0x40093820, + 0x8fec: 0x40024020, 0x8fed: 0x40021a20, 0x8fee: 0x4002e420, 0x8fef: 0x4004e220, + 0x8ff0: 0x4029cc20, 0x8ff1: 0x4029ce20, 0x8ff2: 0x4029d020, 0x8ff3: 0x4029d220, + 0x8ff4: 0x4029d420, 0x8ff5: 0x4029d620, 0x8ff6: 0x4029d820, 0x8ff7: 0x4029da20, + 0x8ff8: 0x4029dc20, 0x8ff9: 0x4029de20, 0x8ffa: 0x40026c20, 0x8ffb: 0x40026220, + 0x8ffc: 0x40094020, 0x8ffd: 0x40094220, 0x8ffe: 0x40094420, 0x8fff: 0x4002c420, + // Block 0x240, offset 0x9000 + 0x9000: 0x4004d620, 0x9001: 0x002bde88, 0x9002: 0x002c0a88, 0x9003: 0x002c3a88, + 0x9004: 0x002c6288, 0x9005: 0x002c9888, 0x9006: 0x002d0888, 0x9007: 0x002d2288, + 0x9008: 0x002d6888, 0x9009: 0x002d9a88, 0x900a: 0x002dcc88, 0x900b: 0x002dfe88, + 0x900c: 0xc0030002, 0x900d: 0x002e8288, 0x900e: 0xc5462761, 0x900f: 0x002ee288, + 0x9010: 0x002f2c88, 0x9011: 0x002f5688, 0x9012: 0x002f7a88, 0x9013: 0x002fe688, + 0x9014: 0x00302c88, 0x9015: 0x00306c88, 0x9016: 0x0030be88, 0x9017: 0x0030e288, + 0x9018: 0x0030f688, 0x9019: 0x00310088, 0x901a: 0x00312a88, 0x901b: 0x4003f820, + 0x901c: 0x4004e420, 0x901d: 0x4003fa20, 0x901e: 0x40062420, 0x901f: 0x40021620, + 0x9020: 0x40061e20, 0x9021: 0x402bde20, 0x9022: 0x402c0a20, 0x9023: 0x402c3a20, + 0x9024: 0x402c6220, 0x9025: 0x402c9820, 0x9026: 0x402d0820, 0x9027: 0x402d2220, + 0x9028: 0x402d6820, 0x9029: 0x402d9a20, 0x902a: 0x402dcc20, 0x902b: 0x402dfe20, + 0x902c: 0xc0000002, 0x902d: 0x402e8220, 0x902e: 0xc5332761, 0x902f: 0x402ee220, + 0x9030: 0x402f2c20, 0x9031: 0x402f5620, 0x9032: 0x402f7a20, 0x9033: 0x402fe620, + 0x9034: 0x40302c20, 0x9035: 0x40306c20, 0x9036: 0x4030be20, 0x9037: 0x4030e220, + 0x9038: 0x4030f620, 0x9039: 0x40310020, 0x903a: 0x40312a20, 0x903b: 0x4003fc20, + 0x903c: 0x40094820, 0x903d: 0x4003fe20, 0x903e: 0x40094c20, 0x903f: 0xa0000000, + // Block 0x241, offset 0x9040 + 0x9040: 0xe00008f5, 0x9041: 0xe00008ef, 0x9042: 0xe0000921, 0x9043: 0xe0000969, + 0x9044: 0xe000095b, 0x9045: 0xe000094d, 0x9046: 0xe00009dd, 0x9047: 0xe0000a53, + 0x9048: 0xe0000ae8, 0x9049: 0xe0000ae2, 0x904a: 0xe0000af4, 0x904b: 0xe0000b20, + 0x904c: 0xe0000c2b, 0x904d: 0xe0000c25, 0x904e: 0xe0000c37, 0x904f: 0xe0000c43, + 0x9050: 0xe0000ab3, 0x9051: 0x002ea083, 0x9052: 0xe0000d9a, 0x9053: 0xe0000d94, + 0x9054: 0xe0000da6, 0x9055: 0xe0000de6, 0x9056: 0xe0000dd2, 0x9057: 0x40093e20, + 0x9058: 0xe0000e12, 0x9059: 0xe0000fe1, 0x905a: 0xe0000fdb, 0x905b: 0xe0000fed, + 0x905c: 0xe0000fff, 0x905d: 0xe0001102, 0x905e: 0x00318888, 0x905f: 0xe0000f7b, + 0x9060: 0xe00008f2, 0x9061: 0xe00008ec, 0x9062: 0xe000091e, 0x9063: 0xe0000966, + 0x9064: 0xe0000958, 0x9065: 0xe000094a, 0x9066: 0xe00009d5, 0x9067: 0xe0000a4d, + 0x9068: 0xe0000ae5, 0x9069: 0xe0000adf, 0x906a: 0xe0000af1, 0x906b: 0xe0000b1d, + 0x906c: 0xe0000c28, 0x906d: 0xe0000c22, 0x906e: 0xe0000c34, 0x906f: 0xe0000c40, + 0x9070: 0xe0000aad, 0x9071: 0x402ea020, 0x9072: 0xe0000d97, 0x9073: 0xe0000d91, + 0x9074: 0xe0000da3, 0x9075: 0xe0000de3, 0x9076: 0xe0000dcf, 0x9077: 0x40093c20, + 0x9078: 0xe0000e0f, 0x9079: 0xe0000fde, 0x907a: 0xe0000fd8, 0x907b: 0xe0000fea, + 0x907c: 0xe0000ffc, 0x907d: 0xe00010ff, 0x907e: 0x40318820, 0x907f: 0xe0001114, + // Block 0x242, offset 0x9080 + 0x9080: 0xa0000000, 0x9081: 0xa0000000, 0x9082: 0xa0000000, 0x9083: 0xa0000000, + 0x9084: 0xa0000000, 0x9085: 0xa0000000, 0x9086: 0xa0000000, 0x9087: 0xa0000000, + 0x9088: 0xa0000000, 0x9089: 0x40020020, 0x908a: 0x40020220, 0x908b: 0x40020420, + 0x908c: 0x40020620, 0x908d: 0x40020820, 0x908e: 0xa0000000, 0x908f: 0xa0000000, + 0x9090: 0xa0000000, 0x9091: 0xa0000000, 0x9092: 0xa0000000, 0x9093: 0xa0000000, + 0x9094: 0xa0000000, 0x9095: 0xa0000000, 0x9096: 0xa0000000, 0x9097: 0xa0000000, + 0x9098: 0xa0000000, 0x9099: 0xa0000000, 0x909a: 0xa0000000, 0x909b: 0xa0000000, + 0x909c: 0xa0000000, 0x909d: 0xa0000000, 0x909e: 0xa0000000, 0x909f: 0xa0000000, + 0x90a0: 0x40021220, 0x90a1: 0x4002ba20, 0x90a2: 0x4003e020, 0x90a3: 0x4004ea20, + 0x90a4: 0x4027de20, 0x90a5: 0x4004ec20, 0x90a6: 0x4004e620, 0x90a7: 0x4003d220, + 0x90a8: 0x4003f420, 0x90a9: 0x4003f620, 0x90aa: 0x4004d820, 0x90ab: 0x40093820, + 0x90ac: 0x40024020, 0x90ad: 0x40021a20, 0x90ae: 0x4002e420, 0x90af: 0x4004e220, + 0x90b0: 0x4029cc20, 0x90b1: 0x4029ce20, 0x90b2: 0x4029d020, 0x90b3: 0x4029d220, + 0x90b4: 0x4029d420, 0x90b5: 0x4029d620, 0x90b6: 0x4029d820, 0x90b7: 0x4029da20, + 0x90b8: 0x4029dc20, 0x90b9: 0x4029de20, 0x90ba: 0x40026c20, 0x90bb: 0x40026220, + 0x90bc: 0x40094020, 0x90bd: 0x40094220, 0x90be: 0x40094420, 0x90bf: 0x4002c420, + // Block 0x243, offset 0x90c0 + 0x90c0: 0x4004d620, 0x90c1: 0xc5580071, 0x90c2: 0x002c0a88, 0x90c3: 0x002c3a88, + 0x90c4: 0x002c6288, 0x90c5: 0x002c9888, 0x90c6: 0x002d0888, 0x90c7: 0x002d2288, + 0x90c8: 0x002d6888, 0x90c9: 0x002d9a88, 0x90ca: 0x002dcc88, 0x90cb: 0x002dfe88, + 0x90cc: 0xc0030002, 0x90cd: 0x002e8288, 0x90ce: 0x002e9e88, 0x90cf: 0xc5532781, + 0x90d0: 0x002f2c88, 0x90d1: 0x002f5688, 0x90d2: 0x002f7a88, 0x90d3: 0xc54a0991, + 0x90d4: 0x00302c88, 0x90d5: 0xc55c0071, 0x90d6: 0x0030be88, 0x90d7: 0x0030bea3, + 0x90d8: 0x0030f688, 0x90d9: 0x00310088, 0x90da: 0xc54e0991, 0x90db: 0x4003f820, + 0x90dc: 0x4004e420, 0x90dd: 0x4003fa20, 0x90de: 0x40062420, 0x90df: 0x40021620, + 0x90e0: 0x40061e20, 0x90e1: 0xc5560071, 0x90e2: 0x402c0a20, 0x90e3: 0x402c3a20, + 0x90e4: 0x402c6220, 0x90e5: 0x402c9820, 0x90e6: 0x402d0820, 0x90e7: 0x402d2220, + 0x90e8: 0x402d6820, 0x90e9: 0x402d9a20, 0x90ea: 0x402dcc20, 0x90eb: 0x402dfe20, + 0x90ec: 0xc0000002, 0x90ed: 0x402e8220, 0x90ee: 0x402e9e20, 0x90ef: 0xc5502781, + 0x90f0: 0x402f2c20, 0x90f1: 0x402f5620, 0x90f2: 0x402f7a20, 0x90f3: 0xc5480991, + 0x90f4: 0x40302c20, 0x90f5: 0xc55a0071, 0x90f6: 0x4030be20, 0x90f7: 0x4030be21, + 0x90f8: 0x4030f620, 0x90f9: 0x40310020, 0x90fa: 0xc54c0991, 0x90fb: 0x4003fc20, + 0x90fc: 0x40094820, 0x90fd: 0x4003fe20, 0x90fe: 0x40094c20, 0x90ff: 0xa0000000, + // Block 0x244, offset 0x9100 + 0x9100: 0xe00008f5, 0x9101: 0xe00008ef, 0x9102: 0xe0000921, 0x9103: 0xe0000969, + 0x9104: 0x0030f083, 0x9105: 0xe000094d, 0x9106: 0xe00009dd, 0x9107: 0xe0000a53, + 0x9108: 0xe0000ae8, 0x9109: 0xe0000ae2, 0x910a: 0xe0000af4, 0x910b: 0xe0000b20, + 0x910c: 0xe0000c2b, 0x910d: 0xe0000c25, 0x910e: 0xe0000c37, 0x910f: 0xe0000c43, + 0x9110: 0xe0000ab3, 0x9111: 0xe0000d63, 0x9112: 0xe0000d9a, 0x9113: 0xe0000d94, + 0x9114: 0xe0000da6, 0x9115: 0x0030ee83, 0x9116: 0x0030f283, 0x9117: 0x40093e20, + 0x9118: 0xe0000e12, 0x9119: 0xe0000fe1, 0x911a: 0xe0000fdb, 0x911b: 0xe0000fed, + 0x911c: 0x0030f483, 0x911d: 0xe0001102, 0x911e: 0x00318888, 0x911f: 0xe0000f7b, + 0x9120: 0xe00008f2, 0x9121: 0xe00008ec, 0x9122: 0xe000091e, 0x9123: 0xe0000966, + 0x9124: 0x4030f020, 0x9125: 0xe000094a, 0x9126: 0xe00009d5, 0x9127: 0xe0000a4d, + 0x9128: 0xe0000ae5, 0x9129: 0xe0000adf, 0x912a: 0xe0000af1, 0x912b: 0xe0000b1d, + 0x912c: 0xe0000c28, 0x912d: 0xe0000c22, 0x912e: 0xe0000c34, 0x912f: 0xe0000c40, + 0x9130: 0xe0000aad, 0x9131: 0xe0000d60, 0x9132: 0xe0000d97, 0x9133: 0xe0000d91, + 0x9134: 0xe0000da3, 0x9135: 0x4030ee20, 0x9136: 0x4030f220, 0x9137: 0x40093c20, + 0x9138: 0xe0000e0f, 0x9139: 0xe0000fde, 0x913a: 0xe0000fd8, 0x913b: 0xe0000fea, + 0x913c: 0x4030f420, 0x913d: 0xe00010ff, 0x913e: 0x40318820, 0x913f: 0xe0001114, + // Block 0x245, offset 0x9140 + 0x9140: 0xe0000cfe, 0x9141: 0xe0000cf8, 0x9142: 0xe0000cf5, 0x9143: 0xe0000d51, + 0x9144: 0xe0000d4e, 0x9145: 0xe0000d6f, 0x9146: 0xe0000d6c, 0x9147: 0xe0000d5d, + 0x9148: 0xe0000d5a, 0x9149: 0xf0000404, 0x914a: 0x002eda88, 0x914b: 0x402eda20, + 0x914c: 0xe0000e2e, 0x914d: 0xe0000e2b, 0x914e: 0xe0000da0, 0x914f: 0xe0000d9d, + 0x9150: 0xe0000de0, 0x9151: 0xe0000ddd, 0x9152: 0xe0000e93, 0x9153: 0xe0000e8f, + 0x9154: 0xe0000eca, 0x9155: 0xe0000ec7, 0x9156: 0xe0000edc, 0x9157: 0xe0000ed9, + 0x9158: 0xe0000ed0, 0x9159: 0xe0000ecd, 0x915a: 0xe0000f1f, 0x915b: 0xe0000f1c, + 0x915c: 0xe0000f2d, 0x915d: 0xe0000f2a, 0x915e: 0xe0000f47, 0x915f: 0xe0000f44, + 0x9160: 0x00302683, 0x9161: 0x40302620, 0x9162: 0xe0000f99, 0x9163: 0xe0000f96, + 0x9164: 0xe0000f8a, 0x9165: 0xe0000f87, 0x9166: 0x00303688, 0x9167: 0x40303620, + 0x9168: 0xe000102b, 0x9169: 0xe0001028, 0x916a: 0xe000103f, 0x916b: 0xe000103c, + 0x916c: 0xe0000fe7, 0x916d: 0xe0000fe4, 0x916e: 0xe0000ff9, 0x916f: 0xe0000ff6, + 0x9170: 0xe0001025, 0x9171: 0xe0001022, 0x9172: 0xe0001039, 0x9173: 0xe0001036, + 0x9174: 0xe0003636, 0x9175: 0xe0003633, 0x9176: 0xe000110e, 0x9177: 0xe000110b, + 0x9178: 0xe0001117, 0x9179: 0xe000360c, 0x917a: 0xe0003609, 0x917b: 0xe0003618, + 0x917c: 0xe0003615, 0x917d: 0x00302a83, 0x917e: 0x40302a20, 0x917f: 0xe0000f64, + // Block 0x246, offset 0x9180 + 0x9180: 0x40321220, 0x9181: 0x40321a20, 0x9182: 0x40322220, 0x9183: 0x40322a20, + 0x9184: 0xe0000ad5, 0x9185: 0xe0000ad1, 0x9186: 0xe0000acd, 0x9187: 0xf0000a0a, + 0x9188: 0xf000040a, 0x9189: 0xf0000404, 0x918a: 0xf0000a0a, 0x918b: 0xf000040a, + 0x918c: 0xf0000404, 0x918d: 0xe0000947, 0x918e: 0xe0000944, 0x918f: 0xe0000c3d, + 0x9190: 0xe0000c3a, 0x9191: 0xe0000dcc, 0x9192: 0xe0000dc9, 0x9193: 0xe0000ff3, + 0x9194: 0xe0000ff0, 0x9195: 0xe000368d, 0x9196: 0xe000368a, 0x9197: 0xe000367b, + 0x9198: 0xe0003678, 0x9199: 0xe0003687, 0x919a: 0xe0003684, 0x919b: 0xe0003681, + 0x919c: 0xe000367e, 0x919d: 0x402cae20, 0x919e: 0xe000366f, 0x919f: 0xe000366c, + 0x91a0: 0xe0000976, 0x91a1: 0xe0000972, 0x91a2: 0xe00009f4, 0x91a3: 0xe00009ef, + 0x91a4: 0x002d3a88, 0x91a5: 0x402d3a20, 0x91a6: 0xe0000bbe, 0x91a7: 0xe0000bbb, + 0x91a8: 0xe0000c99, 0x91a9: 0xe0000c96, 0x91aa: 0xe0000e20, 0x91ab: 0xe0000e1d, + 0x91ac: 0xe0000e27, 0x91ad: 0xe0000e23, 0x91ae: 0xe0001162, 0x91af: 0xe000115f, + 0x91b0: 0xe0000c8d, 0x91b1: 0xe00032b0, 0x91b2: 0xe00032ad, 0x91b3: 0xe00032aa, + 0x91b4: 0xe0000bac, 0x91b5: 0xe0000ba9, 0x91b6: 0x002d7888, 0x91b7: 0x00319488, + 0x91b8: 0xe0000d57, 0x91b9: 0xe0000d54, 0x91ba: 0xe0000954, 0x91bb: 0xe0000950, + 0x91bc: 0xe00009ea, 0x91bd: 0xe00009e5, 0x91be: 0xe0000e19, 0x91bf: 0xe0000e15, + // Block 0x247, offset 0x91c0 + 0x91c0: 0xe000098f, 0x91c1: 0xe000098c, 0x91c2: 0xe0000995, 0x91c3: 0xe0000992, + 0x91c4: 0xe0000b62, 0x91c5: 0xe0000b5f, 0x91c6: 0xe0000b68, 0x91c7: 0xe0000b65, + 0x91c8: 0xe0000c6c, 0x91c9: 0xe0000c69, 0x91ca: 0xe0000c72, 0x91cb: 0xe0000c6f, + 0x91cc: 0xe0000e4a, 0x91cd: 0xe0000e47, 0x91ce: 0xe0000e50, 0x91cf: 0xe0000e4d, + 0x91d0: 0xe0000ee8, 0x91d1: 0xe0000ee5, 0x91d2: 0xe0000eee, 0x91d3: 0xe0000eeb, + 0x91d4: 0xe0001053, 0x91d5: 0xe0001050, 0x91d6: 0xe0001059, 0x91d7: 0xe0001056, + 0x91d8: 0xe0000f61, 0x91d9: 0xe0000f5e, 0x91da: 0xe0000fa5, 0x91db: 0xe0000fa2, + 0x91dc: 0x00312288, 0x91dd: 0x40312220, 0x91de: 0xe0000bf4, 0x91df: 0xe0000bf1, + 0x91e0: 0x002ebc88, 0x91e1: 0x402c8c20, 0x91e2: 0x002f2288, 0x91e3: 0x402f2220, + 0x91e4: 0x00314088, 0x91e5: 0x40314020, 0x91e6: 0xe000096f, 0x91e7: 0xe000096c, + 0x91e8: 0xe0000b32, 0x91e9: 0xe0000b2f, 0x91ea: 0xe0003675, 0x91eb: 0xe0003672, + 0x91ec: 0xe0003663, 0x91ed: 0xe0003660, 0x91ee: 0xe0000e04, 0x91ef: 0xe0000e01, + 0x91f0: 0xe0000e0b, 0x91f1: 0xe0000e07, 0x91f2: 0xe0001129, 0x91f3: 0xe0001126, + 0x91f4: 0x402e5e20, 0x91f5: 0x402ed020, 0x91f6: 0x40305a20, 0x91f7: 0x402dd420, + 0x91f8: 0xe0000abf, 0x91f9: 0xe0000ec4, 0x91fa: 0x002be888, 0x91fb: 0x002c4488, + 0x91fc: 0x402c4420, 0x91fd: 0x002e3888, 0x91fe: 0x00303e88, 0x91ff: 0x402ffc20, + // Block 0x248, offset 0x9200 + 0x9200: 0xe0000d24, 0x9201: 0xe0000d21, 0x9202: 0xe0000d2a, 0x9203: 0xe0000d27, + 0x9204: 0xe0000d69, 0x9205: 0xe0000d66, 0x9206: 0xe0000d7b, 0x9207: 0xe0000d78, + 0x9208: 0xe0000d87, 0x9209: 0xe0000d84, 0x920a: 0xe0000d81, 0x920b: 0xe0000d7e, + 0x920c: 0xe0003651, 0x920d: 0xe000364e, 0x920e: 0xe000365d, 0x920f: 0xe000365a, + 0x9210: 0xe0000e3d, 0x9211: 0xe0000e39, 0x9212: 0xe0000e35, 0x9213: 0xe0000e31, + 0x9214: 0xe0000ea7, 0x9215: 0xe0000ea4, 0x9216: 0xe0000ead, 0x9217: 0xe0000eaa, + 0x9218: 0xe0000ed6, 0x9219: 0xe0000ed3, 0x921a: 0xe0000ef4, 0x921b: 0xe0000ef1, + 0x921c: 0xe0000efb, 0x921d: 0xe0000ef7, 0x921e: 0xe0000f02, 0x921f: 0xe0000eff, + 0x9220: 0xe0000f41, 0x9221: 0xe0000f3e, 0x9222: 0xe0000f53, 0x9223: 0xe0000f50, + 0x9224: 0xe0000f26, 0x9225: 0xe0000f22, 0x9226: 0xe0003606, 0x9227: 0xe0003603, + 0x9228: 0xe0000f5a, 0x9229: 0xe0000f56, 0x922a: 0xe0000f93, 0x922b: 0xe0000f90, + 0x922c: 0xe0000f9f, 0x922d: 0xe0000f9c, 0x922e: 0xe0000fb1, 0x922f: 0xe0000fae, + 0x9230: 0xe0000fab, 0x9231: 0xe0000fa8, 0x9232: 0xe0001093, 0x9233: 0xe0001090, + 0x9234: 0xe000109f, 0x9235: 0xe000109c, 0x9236: 0xe0001099, 0x9237: 0xe0001096, + 0x9238: 0xe0001032, 0x9239: 0xe000102e, 0x923a: 0xe000368d, 0x923b: 0xe000368a, + 0x923c: 0xe00010a9, 0x923d: 0xe00010a6, 0x923e: 0xe00010af, 0x923f: 0xe00010ac, + // Block 0x249, offset 0x9240 + 0x9240: 0xe0003630, 0x9241: 0xe000362d, 0x9242: 0xe000362a, 0x9243: 0xe0003627, + 0x9244: 0xe000363f, 0x9245: 0xe000363c, 0x9246: 0xe0003645, 0x9247: 0xe0003642, + 0x9248: 0xe000364b, 0x9249: 0xe0003648, 0x924a: 0xe00010fc, 0x924b: 0xe00010f9, + 0x924c: 0xe00010f6, 0x924d: 0xe00010f3, 0x924e: 0xe0001123, 0x924f: 0xe0001120, + 0x9250: 0xe0003612, 0x9251: 0xe000360f, 0x9252: 0xe000361e, 0x9253: 0xe000361b, + 0x9254: 0xe0003624, 0x9255: 0xe0003621, 0x9256: 0xe0000c15, 0x9257: 0xe0000f8d, + 0x9258: 0xe0003639, 0x9259: 0xe0001111, 0x925a: 0xf0000404, 0x925b: 0xe0000f70, + 0x925c: 0x40300420, 0x925d: 0x40300620, 0x925e: 0xe0000f7f, 0x925f: 0x402c9620, + 0x9260: 0xe000099b, 0x9261: 0xe0000998, 0x9262: 0xe0000989, 0x9263: 0xe0000986, + 0x9264: 0xe0000928, 0x9265: 0xe0000924, 0x9266: 0xe0000930, 0x9267: 0xe000092c, + 0x9268: 0xe0000940, 0x9269: 0xe000093c, 0x926a: 0xe0000938, 0x926b: 0xe0000934, + 0x926c: 0xe00009aa, 0x926d: 0xe00009a6, 0x926e: 0xe0000902, 0x926f: 0xe00008fe, + 0x9270: 0xe000090a, 0x9271: 0xe0000906, 0x9272: 0xe000091a, 0x9273: 0xe0000916, + 0x9274: 0xe0000912, 0x9275: 0xe000090e, 0x9276: 0xe00009a2, 0x9277: 0xe000099e, + 0x9278: 0xe0000b6e, 0x9279: 0xe0000b6b, 0x927a: 0xe0000b5c, 0x927b: 0xe0000b59, + 0x927c: 0xe0000b26, 0x927d: 0xe0000b23, 0x927e: 0xe0000afb, 0x927f: 0xe0000af7, + // Block 0x24a, offset 0x9280 + 0x9280: 0xe0000b03, 0x9281: 0xe0000aff, 0x9282: 0xe0000b13, 0x9283: 0xe0000b0f, + 0x9284: 0xe0000b0b, 0x9285: 0xe0000b07, 0x9286: 0xe0000b75, 0x9287: 0xe0000b71, + 0x9288: 0xe0000c66, 0x9289: 0xe0000c63, 0x928a: 0xe0000c78, 0x928b: 0xe0000c75, + 0x928c: 0xe0000e84, 0x928d: 0xe0000e81, 0x928e: 0xe0000e44, 0x928f: 0xe0000e41, + 0x9290: 0xe0000dad, 0x9291: 0xe0000da9, 0x9292: 0xe0000db5, 0x9293: 0xe0000db1, + 0x9294: 0xe0000dc5, 0x9295: 0xe0000dc1, 0x9296: 0xe0003657, 0x9297: 0xe0003654, + 0x9298: 0xe0000e8b, 0x9299: 0xe0000e87, 0x929a: 0xe0000e5d, 0x929b: 0xe0000e59, + 0x929c: 0xe0000e65, 0x929d: 0xe0000e61, 0x929e: 0xe0000e75, 0x929f: 0xe0000e71, + 0x92a0: 0xe0003669, 0x92a1: 0xe0003666, 0x92a2: 0xe0000e7d, 0x92a3: 0xe0000e79, + 0x92a4: 0xe000108d, 0x92a5: 0xe000108a, 0x92a6: 0xe000104d, 0x92a7: 0xe000104a, + 0x92a8: 0xe0001066, 0x92a9: 0xe0001062, 0x92aa: 0xe000106e, 0x92ab: 0xe000106a, + 0x92ac: 0xe000107e, 0x92ad: 0xe000107a, 0x92ae: 0xe0001076, 0x92af: 0xe0001072, + 0x92b0: 0xe0001086, 0x92b1: 0xe0001082, 0x92b2: 0xe0001108, 0x92b3: 0xe0001105, + 0x92b4: 0xe0001135, 0x92b5: 0xe0001132, 0x92b6: 0xe000112f, 0x92b7: 0xe000112c, + 0x92b8: 0xe000111d, 0x92b9: 0xe000111a, 0x92ba: 0xe0000d0a, 0x92bb: 0xe0000d07, + 0x92bc: 0x0030d888, 0x92bd: 0x4030d820, 0x92be: 0x00312088, 0x92bf: 0x40312020, + // Block 0x24b, offset 0x92c0 + 0x92c0: 0xe0000024, 0x92c1: 0xe0000029, 0x92c2: 0xe000002e, 0x92c3: 0xe0000033, + 0x92c4: 0xe0000038, 0x92c5: 0xe000003d, 0x92c6: 0xe0000042, 0x92c7: 0xe0000047, + 0x92c8: 0xf0001f04, 0x92c9: 0xf0001f04, 0x92ca: 0xf0001f04, 0x92cb: 0xf0001f04, + 0x92cc: 0xf0001f04, 0x92cd: 0xf0001f04, 0x92ce: 0xf0001f04, 0x92cf: 0xf0001f04, + 0x92d0: 0xf0001f04, 0x92d1: 0xf0000404, 0x92d2: 0xf0000404, 0x92d3: 0xf0000404, + 0x92d4: 0xf0000404, 0x92d5: 0xf0000404, 0x92d6: 0xf0000404, 0x92d7: 0xf0000404, + 0x92d8: 0xf0000404, 0x92d9: 0xf0000404, 0x92da: 0xf0000404, 0x92db: 0xf0000404, + 0x92dc: 0xf0000404, 0x92dd: 0xf0000404, 0x92de: 0xf0000404, 0x92df: 0xf0000404, + 0x92e0: 0xf0000404, 0x92e1: 0xf0000404, 0x92e2: 0xf0000404, 0x92e3: 0xf0000404, + 0x92e4: 0xf0000404, 0x92e5: 0xf0000404, 0x92e6: 0xf0000404, 0x92e7: 0xf0000404, + 0x92e8: 0xf0000404, 0x92e9: 0xf0000404, 0x92ea: 0xf0000404, 0x92eb: 0xf0000404, + 0x92ec: 0xf0000404, 0x92ed: 0xf0000404, 0x92ee: 0xf0000404, 0x92ef: 0xf0000404, + 0x92f0: 0xf0000404, 0x92f1: 0xf0000404, 0x92f2: 0xe0002c46, 0x92f3: 0xf0000404, + 0x92f4: 0xf0000404, 0x92f5: 0xe0002c56, 0x92f6: 0x002bde8c, 0x92f7: 0x002c0a8c, + 0x92f8: 0x002c3a8c, 0x92f9: 0x002c628c, 0x92fa: 0x002c988c, 0x92fb: 0x002d088c, + 0x92fc: 0x002d228c, 0x92fd: 0x002d688c, 0x92fe: 0x002d9a8c, 0x92ff: 0x002dcc8c, + // Block 0x24c, offset 0x9300 + 0x9300: 0xf0001d1c, 0x9301: 0xf0001d1c, 0x9302: 0xf0001d1c, 0x9303: 0xf0001d1c, + 0x9304: 0xf0001d1c, 0x9305: 0xf0001d1d, 0x9306: 0xf0001d1d, 0x9307: 0xf0001d1d, + 0x9308: 0xe0000a6b, 0x9309: 0xe0000cb4, 0x930a: 0xf0001d1c, 0x930b: 0xf0001d1c, + 0x930c: 0xf0001d1c, 0x930d: 0xf0001c1c, 0x930e: 0xf0001c1c, 0x930f: 0xf0001c1c, + 0x9310: 0xe00027ce, 0x9311: 0xe0000cb9, 0x9312: 0xe0000d36, 0x9313: 0xe0000be3, + 0x9314: 0xe0000fc5, 0x9315: 0xf0001c1c, 0x9316: 0xf0001c1c, 0x9317: 0xf0001c1c, + 0x9318: 0xf0001c1c, 0x9319: 0xf0001c1c, 0x931a: 0xf0001c1c, 0x931b: 0xf0001c1c, + 0x931c: 0xf0001c1c, 0x931d: 0xf0001c1c, 0x931e: 0xf0001c1c, 0x931f: 0xe0000d3e, + 0x9320: 0xe0000a72, 0x9321: 0xf0001c1c, 0x9322: 0xe0000cbd, 0x9323: 0xe0000d42, + 0x9324: 0xe0000a76, 0x9325: 0xf0001c1c, 0x9326: 0xe0000cc1, 0x9327: 0xe0000d2d, + 0x9328: 0xe0000d31, 0x9329: 0xf0001c1d, 0x932a: 0xe0000cc5, 0x932b: 0xe0000d4a, + 0x932c: 0xe0000be7, 0x932d: 0xe0000f0b, 0x932e: 0xe0000f0f, 0x932f: 0xe0000f15, + 0x9330: 0xf0001c1c, 0x9331: 0xf0001c1c, 0x9332: 0xf0001c1c, 0x9333: 0xf0001c1c, + 0x9334: 0xf0001d1c, 0x9335: 0xf0001d1c, 0x9336: 0xf0001d1c, 0x9337: 0xf0001d1c, + 0x9338: 0xf0001d1c, 0x9339: 0xf0001d1d, 0x933a: 0xe00035df, 0x933b: 0xe00035cd, + 0x933c: 0xe0003600, 0x933d: 0xe00035af, 0x933e: 0xe0002812, 0x933f: 0xe00035b2, + // Block 0x24d, offset 0x9340 + 0x9340: 0xf0001d1c, 0x9341: 0xf0001d1d, 0x9342: 0xe00009b7, 0x9343: 0xf0001c1d, + 0x9344: 0xf0001c1c, 0x9345: 0xf0001c1c, 0x9346: 0xe0000a66, 0x9347: 0xe0000a7a, + 0x9348: 0xf0001d1c, 0x9349: 0xf0001c1d, 0x934a: 0xf0001c1c, 0x934b: 0xf0001d1d, + 0x934c: 0xf0001c1c, 0x934d: 0xf0001d1d, 0x934e: 0xf0001d1d, 0x934f: 0xf0001c1c, + 0x9350: 0xf0001c1c, 0x9351: 0xf0001c1c, 0x9352: 0xe0000d0d, 0x9353: 0xf0001c1c, + 0x9354: 0xf0001c1c, 0x9355: 0xe0000d3a, 0x9356: 0xe0000d46, 0x9357: 0xf0001d1d, + 0x9358: 0xe0000eb0, 0x9359: 0xe0000eb8, 0x935a: 0xf0001d1d, 0x935b: 0xf0001c1c, + 0x935c: 0xf0001c1d, 0x935d: 0xe00035e2, 0x935e: 0xe00010b2, 0x935f: 0xe00009c8, + 0x9360: 0xf0001f04, 0x9361: 0xf0001f04, 0x9362: 0xf0001f04, 0x9363: 0xf0001f04, + 0x9364: 0xf0001f04, 0x9365: 0xf0001f04, 0x9366: 0xf0001f04, 0x9367: 0xf0001f04, + 0x9368: 0xf0001f04, 0x9369: 0xf0000404, 0x936a: 0xf0000404, 0x936b: 0xf0000404, + 0x936c: 0xf0000404, 0x936d: 0xf0000404, 0x936e: 0xf0000404, 0x936f: 0xf0000404, + 0x9370: 0xf0000404, 0x9371: 0xf0000404, 0x9372: 0xf0000404, 0x9373: 0xf0000404, + 0x9374: 0xf0000404, 0x9375: 0xf0000404, 0x9376: 0xf0000404, 0x9377: 0xf0000404, + 0x9378: 0xf0000404, 0x9379: 0xf0000404, 0x937a: 0xf0000404, 0x937b: 0xf0000404, + 0x937c: 0xf0000404, 0x937d: 0xf0000404, 0x937e: 0xf0000404, 0x937f: 0xe0000bdf, + // Block 0x24e, offset 0x9380 + 0x9380: 0xf0001f04, 0x9381: 0xf0001f04, 0x9382: 0xf0001f04, 0x9383: 0xf0001f04, + 0x9384: 0xf0001f04, 0x9385: 0xf0001f04, 0x9386: 0xf0001f04, 0x9387: 0xf0001f04, + 0x9388: 0xf0001f04, 0x9389: 0xf0001f04, 0x938a: 0xf0001f04, + 0x9390: 0xf0000a04, 0x9391: 0xf0000a04, 0x9392: 0xf0000a04, 0x9393: 0xf0000a04, + 0x9394: 0xf0000a04, 0x9395: 0xf0000a04, 0x9396: 0xf0000a04, 0x9397: 0xf0000a04, + 0x9398: 0xf0000a04, 0x9399: 0xf0000a04, 0x939a: 0xf0000a04, 0x939b: 0xf0000a04, + 0x939c: 0xf0000a04, 0x939d: 0xf0000a04, 0x939e: 0xf0000a04, 0x939f: 0xf0000a04, + 0x93a0: 0xf0000a04, 0x93a1: 0xf0000a04, 0x93a2: 0xf0000a04, 0x93a3: 0xf0000a04, + 0x93a4: 0xf0000a04, 0x93a5: 0xf0000a04, 0x93a6: 0xe0002c4a, 0x93a7: 0xf0000a04, + 0x93a8: 0xf0000a04, 0x93a9: 0xe0002c5a, 0x93aa: 0xf0000a04, 0x93ab: 0x002c3a8c, + 0x93ac: 0x002f7a8c, 0x93ad: 0xf0000c0c, 0x93ae: 0xe00035e8, + 0x93b0: 0x002bde9d, 0x93b1: 0x002c0a9d, 0x93b2: 0x002c3a9d, 0x93b3: 0x002c629d, + 0x93b4: 0x002c989d, 0x93b5: 0x002d089d, 0x93b6: 0x002d229d, 0x93b7: 0x002d689d, + 0x93b8: 0x002d9a9d, 0x93b9: 0x002dcc9d, 0x93ba: 0x002dfe9d, 0x93bb: 0x002e229d, + 0x93bc: 0x002e829d, 0x93bd: 0x002e9e9d, 0x93be: 0x002ee29d, 0x93bf: 0x002f2c9d, + // Block 0x24f, offset 0x93c0 + 0x93c0: 0x002f569d, 0x93c1: 0x002f7a9d, 0x93c2: 0x002fe69d, 0x93c3: 0x00302c9d, + 0x93c4: 0x00306c9d, 0x93c5: 0x0030be9d, 0x93c6: 0x0030e29d, 0x93c7: 0x0030f69d, + 0x93c8: 0x0031009d, 0x93c9: 0x00312a9d, 0x93ca: 0xf0001d1d, 0x93cb: 0xf0001d1d, + 0x93cc: 0xf0001d1d, 0x93cd: 0xf0001d1d, 0x93ce: 0xe0000ebc, 0x93cf: 0xe00035e5, + 0x93d0: 0x002bde8c, 0x93d1: 0x002c0a8c, 0x93d2: 0x002c3a8c, 0x93d3: 0x002c628c, + 0x93d4: 0x002c988c, 0x93d5: 0x002d088c, 0x93d6: 0x002d228c, 0x93d7: 0x002d688c, + 0x93d8: 0x002d9a8c, 0x93d9: 0x002dcc8c, 0x93da: 0x002dfe8c, 0x93db: 0x002e228c, + 0x93dc: 0x002e828c, 0x93dd: 0x002e9e8c, 0x93de: 0x002ee28c, 0x93df: 0x002f2c8c, + 0x93e0: 0x002f568c, 0x93e1: 0x002f7a8c, 0x93e2: 0x002fe68c, 0x93e3: 0x00302c8c, + 0x93e4: 0x00306c8c, 0x93e5: 0x0030be8c, 0x93e6: 0x0030e28c, 0x93e7: 0x0030f68c, + 0x93e8: 0x0031008c, 0x93e9: 0x00312a8c, 0x93ea: 0xf0001414, 0x93eb: 0xf0001414, + 0x93f0: 0x002bde9d, 0x93f1: 0x002c0a9d, 0x93f2: 0x002c3a9d, 0x93f3: 0x002c629d, + 0x93f4: 0x002c989d, 0x93f5: 0x002d089d, 0x93f6: 0x002d229d, 0x93f7: 0x002d689d, + 0x93f8: 0x002d9a9d, 0x93f9: 0x002dcc9d, 0x93fa: 0x002dfe9d, 0x93fb: 0x002e229d, + 0x93fc: 0x002e829d, 0x93fd: 0x002e9e9d, 0x93fe: 0x002ee29d, 0x93ff: 0x002f2c9d, + // Block 0x250, offset 0x9400 + 0x9400: 0xa0000000, 0x9401: 0xa0000000, 0x9402: 0xa0000000, 0x9403: 0xa0000000, + 0x9404: 0xa0000000, 0x9406: 0x40096620, 0x9407: 0x40096a20, + 0x9408: 0x40070820, 0x9409: 0x4004f220, 0x940a: 0x4004f620, 0x940b: 0x4027e620, + 0x940c: 0x40024820, 0x940d: 0x40024a20, 0x940e: 0x40070e20, 0x940f: 0x40071020, + 0x9410: 0xae600000, 0x9411: 0xae600000, 0x9412: 0xae600000, 0x9413: 0xae600000, + 0x9414: 0xae600000, 0x9415: 0xae600000, 0x9416: 0xae600000, 0x9417: 0xae600000, + 0x9418: 0xa1e00000, 0x9419: 0xa1f00000, 0x941a: 0xa2000000, 0x941b: 0x40026420, + 0x941e: 0x40027020, 0x941f: 0x4002cc20, + 0x9420: 0x403aa220, 0x9421: 0x40393a20, 0x9422: 0x40393620, 0x9423: 0x40393a21, + 0x9424: 0x40393a25, 0x9425: 0x40393a23, 0x9426: 0x00393b44, 0x9427: 0xc55e0151, + 0x9428: 0x40393c20, 0x9429: 0x403a8823, 0x942a: 0x40395620, 0x942b: 0x40395820, + 0x942c: 0x40396420, 0x942d: 0x40397220, 0x942e: 0x40397420, 0x942f: 0x40398820, + 0x9430: 0x40398a20, 0x9431: 0x4039a420, 0x9432: 0x4039a620, 0x9433: 0x4039c620, + 0x9434: 0x4039c820, 0x9435: 0x4039dc20, 0x9436: 0x4039de20, 0x9437: 0x4039e620, + 0x9438: 0x4039e820, 0x9439: 0x4039ee20, 0x943a: 0x4039f020, 0x943b: 0x403a3820, + 0x943c: 0x403a3a20, 0x943d: 0x403a9c20, 0x943e: 0x403a9e20, 0x943f: 0x403aa020, + // Block 0x251, offset 0x9440 + 0x9440: 0xa0000000, 0x9441: 0x4039fc20, 0x9442: 0x403a1220, 0x9443: 0x403a1c23, + 0x9444: 0x403a4020, 0x9445: 0x403a4e20, 0x9446: 0x403a5620, 0x9447: 0x403a8820, + 0x9448: 0xc5620171, 0x9449: 0xc5660171, 0x944a: 0xc5680171, 0x944b: 0xa000b002, + 0x944c: 0xa000b202, 0x944d: 0xa000b102, 0x944e: 0xa1e0ad02, 0x944f: 0xa000af02, + 0x9450: 0xa000ae02, 0x9451: 0xa210ba02, 0x9452: 0xa220bc02, 0x9453: 0xae60bd02, + 0x9454: 0xae60be02, 0x9455: 0xadc0bf02, 0x9456: 0xadc0c102, 0x9457: 0xae60c202, + 0x9458: 0xae60c302, 0x9459: 0xae60c402, 0x945a: 0xae60c502, 0x945b: 0xae60c602, + 0x945c: 0xadc0c702, 0x945d: 0xae60c802, 0x945e: 0xae60c902, 0x945f: 0xadc0c002, + 0x9460: 0xe000015e, 0x9461: 0xe00001e6, 0x9462: 0xe0000301, 0x9463: 0xe00003db, + 0x9464: 0xe00004b6, 0x9465: 0xe0000580, 0x9466: 0xe000064b, 0x9467: 0xe00006f3, + 0x9468: 0xe000079f, 0x9469: 0xe0000844, 0x946a: 0x4004ee20, 0x946b: 0x40024c20, + 0x946c: 0x40024e20, 0x946d: 0x4004de20, 0x946e: 0x40393a20, 0x946f: 0x403a1020, + 0x9470: 0xa230d102, 0x9471: 0x40393821, 0x9472: 0x40393a22, 0x9473: 0x40393a24, + 0x9474: 0x00391c84, 0x9475: 0xf0000404, 0x9476: 0xf0000404, 0x9477: 0xf0000404, + 0x9478: 0xe0003780, 0x9479: 0x40395a20, 0x947a: 0x40395c20, 0x947b: 0x40393e20, + 0x947c: 0x40395e20, 0x947d: 0x40396020, 0x947e: 0x40394020, 0x947f: 0x40396220, + // Block 0x252, offset 0x9480 + 0x9480: 0x40394220, 0x9481: 0x40397620, 0x9482: 0x40397820, 0x9483: 0x40396620, + 0x9484: 0x40396820, 0x9485: 0x40397a20, 0x9486: 0x40396a20, 0x9487: 0x40396e20, + 0x9488: 0x40398c20, 0x9489: 0x40398e20, 0x948a: 0x40399020, 0x948b: 0x40399220, + 0x948c: 0x40399420, 0x948d: 0x40399620, 0x948e: 0x40399820, 0x948f: 0x40399a20, + 0x9490: 0x40399c20, 0x9491: 0x4039a820, 0x9492: 0x4039aa20, 0x9493: 0x4039ac20, + 0x9494: 0x4039ae20, 0x9495: 0x4039b020, 0x9496: 0x4039b220, 0x9497: 0x4039b420, + 0x9498: 0x4039b620, 0x9499: 0x4039b820, 0x949a: 0x4039ca20, 0x949b: 0x4039cc20, + 0x949c: 0x4039ce20, 0x949d: 0x4039e020, 0x949e: 0x4039e220, 0x949f: 0x4039ea20, + 0x94a0: 0x4039f220, 0x94a1: 0x4039fe20, 0x94a2: 0x403a0020, 0x94a3: 0x403a0220, + 0x94a4: 0x403a0420, 0x94a5: 0x403a0820, 0x94a6: 0x403a0a20, 0x94a7: 0x403a1420, + 0x94a8: 0x403a1620, 0x94a9: 0x403a1c20, 0x94aa: 0x403a1c21, 0x94ab: 0x403a1c22, + 0x94ac: 0x403a1c24, 0x94ad: 0x403a1c25, 0x94ae: 0x403a1c26, 0x94af: 0x403a2a20, + 0x94b0: 0x403a2c20, 0x94b1: 0x403a2e20, 0x94b2: 0x403a3020, 0x94b3: 0x403a3220, + 0x94b4: 0x403a3420, 0x94b5: 0x403a4220, 0x94b6: 0x403a4420, 0x94b7: 0x403a4620, + 0x94b8: 0x403a4820, 0x94b9: 0x403a6020, 0x94ba: 0x403a5820, 0x94bb: 0x403a5a20, + 0x94bc: 0x403a5c20, 0x94bd: 0x403a5e20, 0x94be: 0x403a8826, 0x94bf: 0x40396c20, + // Block 0x253, offset 0x94c0 + 0x94c0: 0x403a8825, 0x94c1: 0x403a8822, 0x94c2: 0xe0003777, 0x94c3: 0x403a8824, + 0x94c4: 0x403a7620, 0x94c5: 0x403a7820, 0x94c6: 0x403a7a20, 0x94c7: 0x403a7c20, + 0x94c8: 0x403a7e20, 0x94c9: 0x403a8020, 0x94ca: 0x403a8220, 0x94cb: 0x403a8420, + 0x94cc: 0xc5640171, 0x94cd: 0x403a9226, 0x94ce: 0x403a9227, 0x94cf: 0x403a8620, + 0x94d0: 0x403a9224, 0x94d1: 0x403a9225, 0x94d2: 0x403a9222, 0x94d3: 0xe00037b6, + 0x94d4: 0x4002e820, 0x94d5: 0xc56a0171, 0x94d6: 0xae600000, 0x94d7: 0xae600000, + 0x94d8: 0xae600000, 0x94d9: 0xae600000, 0x94da: 0xae600000, 0x94db: 0xae600000, + 0x94dc: 0xae600000, 0x94dd: 0xa0000000, 0x94de: 0x40071220, 0x94df: 0xae600000, + 0x94e0: 0xae600000, 0x94e1: 0xae600000, 0x94e2: 0xae600000, 0x94e3: 0xadc00000, + 0x94e4: 0xae600000, 0x94e5: 0x003a7484, 0x94e6: 0x003a9084, 0x94e7: 0xae600000, + 0x94e8: 0xae600000, 0x94e9: 0x40071420, 0x94ea: 0xadc00000, 0x94eb: 0xae600000, + 0x94ec: 0xae600000, 0x94ed: 0xadc00000, 0x94ee: 0x40399e20, 0x94ef: 0x4039ba20, + 0x94f0: 0xe0000161, 0x94f1: 0xe00001e9, 0x94f2: 0xe0000304, 0x94f3: 0xe00003de, + 0x94f4: 0xe00004b9, 0x94f5: 0xe0000583, 0x94f6: 0xe000064e, 0x94f7: 0xe00006f6, + 0x94f8: 0xe00007a2, 0x94f9: 0xe0000847, 0x94fa: 0x4039d020, 0x94fb: 0x4039e420, + 0x94fc: 0x4039f420, 0x94fd: 0xe0001553, 0x94fe: 0xe0001779, 0x94ff: 0x403a7020, + // Block 0x254, offset 0x9500 + 0x9500: 0x00396e97, 0x9501: 0x00396e98, 0x9502: 0x0039969a, 0x9503: 0x00399699, + 0x9504: 0x0039949a, 0x9505: 0x00399499, 0x9506: 0x0039989a, 0x9507: 0x00399899, + 0x9508: 0x00398c9a, 0x9509: 0x00398c99, 0x950a: 0x0039b69a, 0x950b: 0x0039b699, + 0x950c: 0x0039a89a, 0x950d: 0x0039a899, 0x950e: 0x003a1c9a, 0x950f: 0x003a1c99, + 0x9510: 0x003a1c97, 0x9511: 0x003a1c98, 0x9512: 0x003a2a9a, 0x9513: 0x003a2a99, + 0x9514: 0x003a2a97, 0x9515: 0x003a2a98, 0x9516: 0x003a329a, 0x9517: 0x003a3299, + 0x9518: 0x003a3297, 0x9519: 0x003a3298, 0x951a: 0x003a2e9a, 0x951b: 0x003a2e99, + 0x951c: 0x003a2e97, 0x951d: 0x003a2e98, 0x951e: 0x003a589a, 0x951f: 0x003a5899, + 0x9520: 0x003a5a9a, 0x9521: 0x003a5a99, 0x9522: 0x003a5a97, 0x9523: 0x003a5a98, + 0x9524: 0xe0003774, 0x9525: 0xe0003771, 0x9526: 0x003a6c9a, 0x9527: 0x003a6c99, + 0x9528: 0x003a6c97, 0x9529: 0x003a6c98, 0x952a: 0x003a6a9a, 0x952b: 0x003a6a99, + 0x952c: 0x003a6a97, 0x952d: 0x003a6a98, 0x952e: 0x003aaa9a, 0x952f: 0x003aaa99, + 0x9530: 0xe00037bc, 0x9531: 0xe00037b9, 0x9532: 0x40071820, 0x9533: 0x40071a20, + 0x9534: 0x40071c20, 0x9535: 0x40071e20, 0x9536: 0x40072020, 0x9537: 0x40072220, + 0x9538: 0x40072420, 0x9539: 0x40072620, 0x953a: 0x40072820, 0x953b: 0x40072a20, + 0x953c: 0x40072c20, 0x953d: 0x40072e20, 0x953e: 0x40073020, 0x953f: 0x40073220, + // Block 0x255, offset 0x9540 + 0x9540: 0xe000155f, 0x9541: 0xe0001565, 0x9542: 0xe000157a, 0x9543: 0xe00015b0, + 0x9544: 0xe00015b6, 0x9545: 0xf0001a1a, 0x9546: 0xf0001a1a, 0x9547: 0xf0001a1a, + 0x9548: 0xf0001a1a, 0x9549: 0xe0002894, 0x954a: 0xe00036a5, 0x954b: 0xf0001a1a, + 0x954c: 0xf0001a1a, 0x954d: 0xf0001a1a, 0x954e: 0xf0001a1a, 0x954f: 0xe000289a, + 0x9550: 0xe00036b1, 0x9551: 0xf0001a1a, 0x9552: 0xf0001a1a, 0x9553: 0xe00028a0, + 0x9554: 0xe00036ba, 0x9555: 0xf0001a1a, 0x9556: 0xf0001a1a, 0x9557: 0xf0001a1a, + 0x9558: 0xf0001a1a, 0x9559: 0xf0001a1a, 0x955a: 0xf0001a1a, 0x955b: 0xf0001a1a, + 0x955c: 0xf0001a1a, 0x955d: 0xf0001a1a, 0x955e: 0xf0001a1a, 0x955f: 0xf0001a1a, + 0x9560: 0xf0001a1a, 0x9561: 0xf0001a1a, 0x9562: 0xf0001a1a, 0x9563: 0xf0001a1a, + 0x9564: 0xf0001a1a, 0x9565: 0xf0001a1a, 0x9566: 0xf0001a1a, 0x9567: 0xf0001a1a, + 0x9568: 0xf0001a1a, 0x9569: 0xf0001a1a, 0x956a: 0xf0001a1a, 0x956b: 0xf0001a1a, + 0x956c: 0xf0001a1a, 0x956d: 0xf0001a1a, 0x956e: 0xf0001a1a, 0x956f: 0xf0001a1a, + 0x9570: 0xf0001a1a, 0x9571: 0xe00028e2, 0x9572: 0xe0003708, 0x9573: 0xf0001a1a, + 0x9574: 0xf0001a1a, 0x9575: 0xe00028e8, 0x9576: 0xe000370e, 0x9577: 0xe0003714, + 0x9578: 0xe000371a, 0x9579: 0xe0003720, 0x957a: 0xe0003726, 0x957b: 0xe0003732, + 0x957c: 0xe000373e, 0x957d: 0xe00028ee, 0x957e: 0xe0003744, 0x957f: 0xf0001a1a, + // Block 0x256, offset 0x9580 + 0x9580: 0xf0001a1a, 0x9581: 0xf0001a1a, 0x9582: 0xf0001a1a, 0x9583: 0xe00028f4, + 0x9584: 0xe000374d, 0x9585: 0xf0001a1a, 0x9586: 0xf0001a1a, 0x9587: 0xf0001a1a, + 0x9588: 0xf0001a1a, 0x9589: 0xe00028f7, 0x958a: 0xe0003750, 0x958b: 0xf0001a1a, + 0x958c: 0xf0001a1a, 0x958d: 0xf0001a1a, 0x958e: 0xf0001a1a, 0x958f: 0xe00028fd, + 0x9590: 0xe000375c, 0x9591: 0xe0003765, 0x9592: 0xe000376b, 0x9593: 0xe0002900, + 0x9594: 0xe000376e, 0x9595: 0xe0003786, 0x9596: 0xe000378c, 0x9597: 0xe0003792, + 0x9598: 0xe00037a4, 0x9599: 0xe0002906, 0x959a: 0xe00037b3, 0x959b: 0xf0001a1a, + 0x959c: 0xf0001a1a, 0x959d: 0xe000377d, 0x959e: 0xe0000003, 0x959f: 0xe0000006, + 0x95a0: 0xe0000009, 0x95a1: 0xe000000c, 0x95a2: 0xe000000f, 0x95a3: 0xe0000012, + 0x95a4: 0xe000156b, 0x95a5: 0xe000156e, 0x95a6: 0xe0001577, 0x95a7: 0xe000157d, + 0x95a8: 0xe00015aa, 0x95a9: 0xe00015b3, 0x95aa: 0xf0001919, 0x95ab: 0xf0001919, + 0x95ac: 0xf0001919, 0x95ad: 0xf0001919, 0x95ae: 0xe0002891, 0x95af: 0xe00036a2, + 0x95b0: 0xf0001919, 0x95b1: 0xf0001919, 0x95b2: 0xf0001919, 0x95b3: 0xf0001919, + 0x95b4: 0xe0002897, 0x95b5: 0xe00036ae, 0x95b6: 0xf0001919, 0x95b7: 0xf0001919, + 0x95b8: 0xf0001919, 0x95b9: 0xf0001919, 0x95ba: 0xe000289d, 0x95bb: 0xe00036b7, + 0x95bc: 0xe00028df, 0x95bd: 0xe0003705, 0x95be: 0xe00028e5, 0x95bf: 0xe000370b, + // Block 0x257, offset 0x95c0 + 0x95c0: 0xe0003711, 0x95c1: 0xe000372f, 0x95c2: 0xe000373b, 0x95c3: 0xe00028eb, + 0x95c4: 0xe0003741, 0x95c5: 0xf0001919, 0x95c6: 0xe00028f1, 0x95c7: 0xe000374a, + 0x95c8: 0xf0001919, 0x95c9: 0xf0001919, 0x95ca: 0xf0001919, 0x95cb: 0xf0001919, + 0x95cc: 0xf0001919, 0x95cd: 0xf0001919, 0x95ce: 0xe00028fa, 0x95cf: 0xe0003759, + 0x95d0: 0xe000377a, 0x95d1: 0xe0003795, 0x95d2: 0xe0003798, 0x95d3: 0xe00037a1, + 0x95d4: 0xe00037a7, 0x95d5: 0xe0002903, 0x95d6: 0xe00037b0, 0x95d7: 0xe000155c, + 0x95d8: 0xe0001562, 0x95d9: 0xe0001568, 0x95da: 0xe0001571, 0x95db: 0xe0001580, + 0x95dc: 0xf0001717, 0x95dd: 0xf0001717, 0x95de: 0xf0001717, 0x95df: 0xf0001717, + 0x95e0: 0xe000369c, 0x95e1: 0xf0001717, 0x95e2: 0xf0001717, 0x95e3: 0xf0001717, + 0x95e4: 0xf0001717, 0x95e5: 0xe00036a8, 0x95e6: 0xf0001717, 0x95e7: 0xf0001717, + 0x95e8: 0xf0001717, 0x95e9: 0xf0001717, 0x95ea: 0xf0001717, 0x95eb: 0xf0001717, + 0x95ec: 0xf0001717, 0x95ed: 0xf0001717, 0x95ee: 0xf0001717, 0x95ef: 0xf0001717, + 0x95f0: 0xf0001717, 0x95f1: 0xf0001717, 0x95f2: 0xf0001717, 0x95f3: 0xf0001717, + 0x95f4: 0xf0001717, 0x95f5: 0xf0001717, 0x95f6: 0xf0001717, 0x95f7: 0xf0001717, + 0x95f8: 0xf0001717, 0x95f9: 0xf0001717, 0x95fa: 0xf0001717, 0x95fb: 0xf0001717, + 0x95fc: 0xf0001717, 0x95fd: 0xf0001717, 0x95fe: 0xf0001717, 0x95ff: 0xf0001717, + // Block 0x258, offset 0x9600 + 0x9600: 0xf0001717, 0x9601: 0xf0001717, 0x9602: 0xf0001717, 0x9603: 0xf0001717, + 0x9604: 0xe0003717, 0x9605: 0xe000371d, 0x9606: 0xe0003723, 0x9607: 0xe0003729, + 0x9608: 0xe0003735, 0x9609: 0xf0001717, 0x960a: 0xf0001717, 0x960b: 0xf0001717, + 0x960c: 0xf0001717, 0x960d: 0xe0003747, 0x960e: 0xf0001717, 0x960f: 0xf0001717, + 0x9610: 0xf0001717, 0x9611: 0xf0001717, 0x9612: 0xf0001717, 0x9613: 0xf0001717, + 0x9614: 0xf0001717, 0x9615: 0xf0001717, 0x9616: 0xe0003753, 0x9617: 0xe0003762, + 0x9618: 0xe0003768, 0x9619: 0xe000375f, 0x961a: 0xe0003783, 0x961b: 0xe0003789, + 0x961c: 0xe000378f, 0x961d: 0xe000379b, 0x961e: 0xe00037aa, 0x961f: 0xe0001574, + 0x9620: 0xe0001583, 0x9621: 0xf0001818, 0x9622: 0xe000369f, 0x9623: 0xf0001818, + 0x9624: 0xe00036ab, 0x9625: 0xf0001818, 0x9626: 0xe00036b4, 0x9627: 0xf0001818, + 0x9628: 0xe00036d2, 0x9629: 0xf0001818, 0x962a: 0xe00036de, 0x962b: 0xe000372c, + 0x962c: 0xe0003738, 0x962d: 0xf0001818, 0x962e: 0xf0001818, 0x962f: 0xe0003756, + 0x9630: 0xe000379e, 0x9631: 0xe00037ad, 0x9632: 0xf0001818, 0x9633: 0xe0003690, + 0x9634: 0xe0003693, 0x9635: 0xe00028d0, 0x9636: 0xe00036f6, 0x9637: 0xe00028d6, + 0x9638: 0xe00036fc, 0x9639: 0xe00028dc, 0x963a: 0xe0003702, 0x963b: 0xe00028b8, + 0x963c: 0xe00036d8, 0x963d: 0xe00028be, 0x963e: 0xe00036e4, 0x963f: 0xe00028ac, + // Block 0x259, offset 0x9640 + 0x9640: 0xe00036c6, 0x9641: 0xe00028a6, 0x9642: 0xe00036c0, 0x9643: 0xe00028b2, + 0x9644: 0xe00036cc, 0x9645: 0xe00028c4, 0x9646: 0xe00036ea, 0x9647: 0xe00028ca, + 0x9648: 0xe00036f0, 0x9649: 0xf0001a1a, 0x964a: 0xf0001a1a, 0x964b: 0xf0001a1a, + 0x964c: 0xf0001a1a, 0x964d: 0xf0001a1a, 0x964e: 0xf0001a1a, 0x964f: 0xf0001a1a, + 0x9650: 0xf0001a1a, 0x9651: 0xe00028cd, 0x9652: 0xe00036f3, 0x9653: 0xe00028d3, + 0x9654: 0xe00036f9, 0x9655: 0xe00028d9, 0x9656: 0xe00036ff, 0x9657: 0xe00028b5, + 0x9658: 0xe00036d5, 0x9659: 0xe00028bb, 0x965a: 0xe00036e1, 0x965b: 0xe00028a9, + 0x965c: 0xe00036c3, 0x965d: 0xe00028a3, 0x965e: 0xe00036bd, 0x965f: 0xe00028af, + 0x9660: 0xe00036c9, 0x9661: 0xe00028c1, 0x9662: 0xe00036e7, 0x9663: 0xe00028c7, + 0x9664: 0xe00036ed, 0x9665: 0xf0001919, 0x9666: 0xf0001919, 0x9667: 0xf0001919, + 0x9668: 0xf0001919, 0x9669: 0xf0001919, 0x966a: 0xf0001919, 0x966b: 0xf0001919, + 0x966c: 0xf0001919, 0x966d: 0xf0001717, 0x966e: 0xf0001717, 0x966f: 0xf0001717, + 0x9670: 0xf0001717, 0x9671: 0xe00036cf, 0x9672: 0xe00036db, 0x9673: 0xf0001717, + 0x9674: 0xf0001818, 0x9675: 0xf0001818, 0x9676: 0xf0001818, 0x9677: 0xf0001818, + 0x9678: 0xf0001818, 0x9679: 0xf0001818, 0x967a: 0xf0001818, 0x967b: 0xf0001818, + 0x967c: 0xe0003696, 0x967d: 0xe0003699, 0x967e: 0x4004c020, 0x967f: 0x4004c220, + // Block 0x25a, offset 0x9680 + 0x9680: 0xa0000000, 0x9681: 0xa0000000, 0x9682: 0xa0000000, 0x9683: 0xa0000000, + 0x9684: 0xa0000000, 0x9685: 0xa0000000, 0x9686: 0xa0000000, 0x9687: 0xa0000000, + 0x9688: 0xa0000000, 0x9689: 0x40020020, 0x968a: 0x40020220, 0x968b: 0x40020420, + 0x968c: 0x40020620, 0x968d: 0x40020820, 0x968e: 0xa0000000, 0x968f: 0xa0000000, + 0x9690: 0xa0000000, 0x9691: 0xa0000000, 0x9692: 0xa0000000, 0x9693: 0xa0000000, + 0x9694: 0xa0000000, 0x9695: 0xa0000000, 0x9696: 0xa0000000, 0x9697: 0xa0000000, + 0x9698: 0xa0000000, 0x9699: 0xa0000000, 0x969a: 0xa0000000, 0x969b: 0xa0000000, + 0x969c: 0xa0000000, 0x969d: 0xa0000000, 0x969e: 0xa0000000, 0x969f: 0xa0000000, + 0x96a0: 0x40021220, 0x96a1: 0x4002ba20, 0x96a2: 0x4003e020, 0x96a3: 0x4004ea20, + 0x96a4: 0x4027de20, 0x96a5: 0x4004ec20, 0x96a6: 0x4004e620, 0x96a7: 0x4003d220, + 0x96a8: 0x4003f420, 0x96a9: 0x4003f620, 0x96aa: 0x4004d820, 0x96ab: 0x40093820, + 0x96ac: 0x40024020, 0x96ad: 0x40021a20, 0x96ae: 0x4002e420, 0x96af: 0x4004e220, + 0x96b0: 0x4029cc20, 0x96b1: 0x4029ce20, 0x96b2: 0x4029d020, 0x96b3: 0x4029d220, + 0x96b4: 0x4029d420, 0x96b5: 0x4029d620, 0x96b6: 0x4029d820, 0x96b7: 0x4029da20, + 0x96b8: 0x4029dc20, 0x96b9: 0x4029de20, 0x96ba: 0x40026c20, 0x96bb: 0x40026220, + 0x96bc: 0x40094020, 0x96bd: 0x40094220, 0x96be: 0x40094420, 0x96bf: 0x4002c420, + // Block 0x25b, offset 0x96c0 + 0x96c0: 0x4004d620, 0x96c1: 0xc57327b1, 0x96c2: 0x002c0a88, 0x96c3: 0x002c3a88, + 0x96c4: 0x002c6288, 0x96c5: 0x002c9888, 0x96c6: 0x002d0888, 0x96c7: 0x002d2288, + 0x96c8: 0x002d6888, 0x96c9: 0x002d9a88, 0x96ca: 0x002dcc88, 0x96cb: 0x002dfe88, + 0x96cc: 0xc0030002, 0x96cd: 0x002e8288, 0x96ce: 0x002e9e88, 0x96cf: 0xc5780071, + 0x96d0: 0x002f2c88, 0x96d1: 0x002f5688, 0x96d2: 0x002f7a88, 0x96d3: 0x002fe688, + 0x96d4: 0x00302c88, 0x96d5: 0xc56e0071, 0x96d6: 0x0030be88, 0x96d7: 0x0030e288, + 0x96d8: 0x0030f688, 0x96d9: 0x00310088, 0x96da: 0x00312a88, 0x96db: 0x4003f820, + 0x96dc: 0x4004e420, 0x96dd: 0x4003fa20, 0x96de: 0x40062420, 0x96df: 0x40021620, + 0x96e0: 0x40061e20, 0x96e1: 0xc57027b1, 0x96e2: 0x402c0a20, 0x96e3: 0x402c3a20, + 0x96e4: 0x402c6220, 0x96e5: 0x402c9820, 0x96e6: 0x402d0820, 0x96e7: 0x402d2220, + 0x96e8: 0x402d6820, 0x96e9: 0x402d9a20, 0x96ea: 0x402dcc20, 0x96eb: 0x402dfe20, + 0x96ec: 0xc0000002, 0x96ed: 0x402e8220, 0x96ee: 0x402e9e20, 0x96ef: 0xc5760071, + 0x96f0: 0x402f2c20, 0x96f1: 0x402f5620, 0x96f2: 0x402f7a20, 0x96f3: 0x402fe620, + 0x96f4: 0x40302c20, 0x96f5: 0xc56c0071, 0x96f6: 0x4030be20, 0x96f7: 0x4030e220, + 0x96f8: 0x4030f620, 0x96f9: 0x40310020, 0x96fa: 0x40312a20, 0x96fb: 0x4003fc20, + 0x96fc: 0x40094820, 0x96fd: 0x4003fe20, 0x96fe: 0x40094c20, 0x96ff: 0xa0000000, + // Block 0x25c, offset 0x9700 + 0x9700: 0xe00008f5, 0x9701: 0xe00008ef, 0x9702: 0xe0000921, 0x9703: 0xe0000969, + 0x9704: 0x00320e83, 0x9705: 0x00320c83, 0x9706: 0x00320ea3, 0x9707: 0xe0000a53, + 0x9708: 0xe0000ae8, 0x9709: 0xe0000ae2, 0x970a: 0xe0000af4, 0x970b: 0xe0000b20, + 0x970c: 0xe0000c2b, 0x970d: 0xe0000c25, 0x970e: 0xe0000c37, 0x970f: 0xe0000c43, + 0x9710: 0xe0000ab3, 0x9711: 0xe0000d63, 0x9712: 0xe0000d9a, 0x9713: 0xe0000d94, + 0x9714: 0xe0000da6, 0x9715: 0xe0000de6, 0x9716: 0x00321083, 0x9717: 0x40093e20, + 0x9718: 0x003210a3, 0x9719: 0xe0000fe1, 0x971a: 0xe0000fdb, 0x971b: 0xe0000fed, + 0x971c: 0x003100a3, 0x971d: 0xe0001102, 0x971e: 0x00318888, 0x971f: 0xe0000f7b, + 0x9720: 0xe00008f2, 0x9721: 0xe00008ec, 0x9722: 0xe000091e, 0x9723: 0xe0000966, + 0x9724: 0x40320e20, 0x9725: 0x40320c20, 0x9726: 0x40320e21, 0x9727: 0xe0000a4d, + 0x9728: 0xe0000ae5, 0x9729: 0xe0000adf, 0x972a: 0xe0000af1, 0x972b: 0xe0000b1d, + 0x972c: 0xe0000c28, 0x972d: 0xe0000c22, 0x972e: 0xe0000c34, 0x972f: 0xe0000c40, + 0x9730: 0xe0000aad, 0x9731: 0xe0000d60, 0x9732: 0xe0000d97, 0x9733: 0xe0000d91, + 0x9734: 0xe0000da3, 0x9735: 0xe0000de3, 0x9736: 0x40321020, 0x9737: 0x40093c20, + 0x9738: 0x40321021, 0x9739: 0xe0000fde, 0x973a: 0xe0000fd8, 0x973b: 0xe0000fea, + 0x973c: 0x40310021, 0x973d: 0xe00010ff, 0x973e: 0x40318820, 0x973f: 0xe0001114, + // Block 0x25d, offset 0x9740 + 0x9740: 0xe0000983, 0x9741: 0xe0000980, 0x9742: 0xe00008fb, 0x9743: 0xe00008f8, + 0x9744: 0xe000097d, 0x9745: 0xe000097a, 0x9746: 0xe0000a38, 0x9747: 0xe0000a35, + 0x9748: 0xe0000a3e, 0x9749: 0xe0000a3b, 0x974a: 0xe0000a4a, 0x974b: 0xe0000a47, + 0x974c: 0xe0000a44, 0x974d: 0xe0000a41, 0x974e: 0xe0000a86, 0x974f: 0xe0000a83, + 0x9750: 0xe00037c2, 0x9751: 0xe00037bf, 0x9752: 0xe0000b46, 0x9753: 0xe0000b43, + 0x9754: 0xe0000aee, 0x9755: 0xe0000aeb, 0x9756: 0xe0000b2c, 0x9757: 0xe0000b29, + 0x9758: 0xe0000b40, 0x9759: 0xe0000b3d, 0x975a: 0xe0000b1a, 0x975b: 0xe0000b17, + 0x975c: 0xe0000bb8, 0x975d: 0xe0000bb5, 0x975e: 0xe0000bb2, 0x975f: 0xe0000baf, + 0x9760: 0xe0000bc4, 0x9761: 0xe0000bc1, 0x9762: 0xe0000bca, 0x9763: 0xe0000bc7, + 0x9764: 0xe0000bee, 0x9765: 0xe0000beb, 0x9766: 0xe0000c1b, 0x9767: 0xe0000c18, + 0x9768: 0xe0000c51, 0x9769: 0xe0000c4e, 0x976a: 0xe0000c60, 0x976b: 0xe0000c5d, + 0x976c: 0xe0000c31, 0x976d: 0xe0000c2e, 0x976e: 0xe0000c5a, 0x976f: 0xe0000c57, + 0x9770: 0xe0000c54, 0x9771: 0x402da220, 0x9772: 0xf0000a0a, 0x9773: 0xf0000404, + 0x9774: 0xe0000c8a, 0x9775: 0xe0000c87, 0x9776: 0xe0000c9f, 0x9777: 0xe0000c9c, + 0x9778: 0x402f7220, 0x9779: 0xe0000ccc, 0x977a: 0xe0000cc9, 0x977b: 0xe0000cd8, + 0x977c: 0xe0000cd5, 0x977d: 0xe0000cd2, 0x977e: 0xe0000ccf, 0x977f: 0xe0000d04, + // Block 0x25e, offset 0x9780 + 0x9780: 0xe0000cfe, 0x9781: 0xe0000cf8, 0x9782: 0xe0000cf5, 0x9783: 0xe0000d51, + 0x9784: 0xe0000d4e, 0x9785: 0xe0000d6f, 0x9786: 0xe0000d6c, 0x9787: 0xe0000d5d, + 0x9788: 0xe0000d5a, 0x9789: 0xf0000404, 0x978a: 0xe00037ce, 0x978b: 0xe00037cb, + 0x978c: 0xe0000e2e, 0x978d: 0xe0000e2b, 0x978e: 0xe0000da0, 0x978f: 0xe0000d9d, + 0x9790: 0xe0000de0, 0x9791: 0xe0000ddd, 0x9792: 0xe0000e93, 0x9793: 0xe0000e8f, + 0x9794: 0xe0000eca, 0x9795: 0xe0000ec7, 0x9796: 0xe0000edc, 0x9797: 0xe0000ed9, + 0x9798: 0xe0000ed0, 0x9799: 0xe0000ecd, 0x979a: 0xe0000f1f, 0x979b: 0xe0000f1c, + 0x979c: 0xe0000f2d, 0x979d: 0xe0000f2a, 0x979e: 0xe0000f47, 0x979f: 0xe0000f44, + 0x97a0: 0xe0000f33, 0x97a1: 0xe0000f30, 0x97a2: 0xe0000f99, 0x97a3: 0xe0000f96, + 0x97a4: 0xe0000f8a, 0x97a5: 0xe0000f87, 0x97a6: 0xe00037d4, 0x97a7: 0xe00037d1, + 0x97a8: 0xe000102b, 0x97a9: 0xe0001028, 0x97aa: 0xe000103f, 0x97ab: 0xe000103c, + 0x97ac: 0xe0000fe7, 0x97ad: 0xe0000fe4, 0x97ae: 0xe0000ff9, 0x97af: 0xe0000ff6, + 0x97b0: 0xe0001025, 0x97b1: 0xe0001022, 0x97b2: 0xe0001039, 0x97b3: 0xe0001036, + 0x97b4: 0xe00010d8, 0x97b5: 0xe00010d5, 0x97b6: 0xe000110e, 0x97b7: 0xe000110b, + 0x97b8: 0xe0001117, 0x97b9: 0xe000113b, 0x97ba: 0xe0001138, 0x97bb: 0xe000114d, + 0x97bc: 0xe000114a, 0x97bd: 0xe0001147, 0x97be: 0xe0001144, 0x97bf: 0xe0000f64, + // Block 0x25f, offset 0x97c0 + 0x97c0: 0x402c1a20, 0x97c1: 0x002c2a88, 0x97c2: 0x002c3288, 0x97c3: 0x402c3220, + 0x97c4: 0x0031c488, 0x97c5: 0x4031c420, 0x97c6: 0x002efa88, 0x97c7: 0x002c4e88, + 0x97c8: 0x402c4e20, 0x97c9: 0x002c7288, 0x97ca: 0x002c7a88, 0x97cb: 0x002c8488, + 0x97cc: 0x402c8420, 0x97cd: 0xe000115c, 0x97ce: 0x002cae88, 0x97cf: 0x002cb888, + 0x97d0: 0x002cc288, 0x97d1: 0x002d1688, 0x97d2: 0x402d1620, 0x97d3: 0x002d4488, + 0x97d4: 0x002d5888, 0x97d5: 0x402d7820, 0x97d6: 0x002dc288, 0x97d7: 0x002db688, + 0x97d8: 0x002e0a88, 0x97d9: 0x402e0a20, 0x97da: 0x402e3820, 0x97db: 0x402e7220, + 0x97dc: 0x0030a088, 0x97dd: 0x002eb488, 0x97de: 0x402ebc20, 0x97df: 0x002f1088, + 0x97e0: 0xe0000e56, 0x97e1: 0xe0000e53, 0x97e2: 0x002d6088, 0x97e3: 0x402d6020, + 0x97e4: 0x002f3e88, 0x97e5: 0x402f3e20, 0x97e6: 0x002f8288, 0x97e7: 0x0031b488, + 0x97e8: 0x4031b420, 0x97e9: 0x00300888, 0x97ea: 0x40301220, 0x97eb: 0x40304220, + 0x97ec: 0x00304a88, 0x97ed: 0x40304a20, 0x97ee: 0x00305288, 0x97ef: 0xe000105f, + 0x97f0: 0xe000105c, 0x97f1: 0x0030b488, 0x97f2: 0x0030cc88, 0x97f3: 0x00311888, + 0x97f4: 0x40311820, 0x97f5: 0x00313488, 0x97f6: 0x40313420, 0x97f7: 0xe00037da, + 0x97f8: 0x00316e88, 0x97f9: 0x40316e20, 0x97fa: 0x40317820, 0x97fb: 0x4031a620, + 0x97fc: 0x0031bc88, 0x97fd: 0x4031bc20, 0x97fe: 0xe0000fc9, 0x97ff: 0x40319420, + // Block 0x260, offset 0x9800 + 0x9800: 0x40321220, 0x9801: 0x40321a20, 0x9802: 0x40322220, 0x9803: 0x40322a20, + 0x9804: 0xe0000ad5, 0x9805: 0xe0000ad1, 0x9806: 0xe0000acd, 0x9807: 0xf0000a0a, + 0x9808: 0xf000040a, 0x9809: 0xf0000404, 0x980a: 0xf0000a0a, 0x980b: 0xf000040a, + 0x980c: 0xf0000404, 0x980d: 0xe0000947, 0x980e: 0xe0000944, 0x980f: 0xe0000c3d, + 0x9810: 0xe0000c3a, 0x9811: 0xe0000dcc, 0x9812: 0xe0000dc9, 0x9813: 0xe0000ff3, + 0x9814: 0xe0000ff0, 0x9815: 0xe000298b, 0x9816: 0xe0002988, 0x9817: 0xe0002979, + 0x9818: 0xe0002976, 0x9819: 0xe0002985, 0x981a: 0xe0002982, 0x981b: 0xe000297f, + 0x981c: 0xe000297c, 0x981d: 0x402cae20, 0x981e: 0xe00037e8, 0x981f: 0xe00037e5, + 0x9820: 0xe0000976, 0x9821: 0xe0000972, 0x9822: 0xe00029af, 0x9823: 0xe00029ac, + 0x9824: 0xe00037c8, 0x9825: 0xe00037c5, 0x9826: 0xe0000bbe, 0x9827: 0xe0000bbb, + 0x9828: 0xe0000c99, 0x9829: 0xe0000c96, 0x982a: 0xe0000e20, 0x982b: 0xe0000e1d, + 0x982c: 0xe0000e27, 0x982d: 0xe0000e23, 0x982e: 0xe00037e1, 0x982f: 0xe00037dd, + 0x9830: 0xe0000c8d, 0x9831: 0xf0000a0a, 0x9832: 0xf000040a, 0x9833: 0xf0000404, + 0x9834: 0xe0000bac, 0x9835: 0xe0000ba9, 0x9836: 0x002d7888, 0x9837: 0x00319488, + 0x9838: 0xe0000d57, 0x9839: 0xe0000d54, 0x983a: 0xe0002991, 0x983b: 0xe000298e, + 0x983c: 0xe00037ee, 0x983d: 0xe00037eb, 0x983e: 0xe0003800, 0x983f: 0xe00037fd, + // Block 0x261, offset 0x9840 + 0x9840: 0xe000098f, 0x9841: 0xe000098c, 0x9842: 0xe0000995, 0x9843: 0xe0000992, + 0x9844: 0xe0000b62, 0x9845: 0xe0000b5f, 0x9846: 0xe0000b68, 0x9847: 0xe0000b65, + 0x9848: 0xe0000c6c, 0x9849: 0xe0000c69, 0x984a: 0xe0000c72, 0x984b: 0xe0000c6f, + 0x984c: 0xe0000e4a, 0x984d: 0xe0000e47, 0x984e: 0xe0000e50, 0x984f: 0xe0000e4d, + 0x9850: 0xe0000ee8, 0x9851: 0xe0000ee5, 0x9852: 0xe0000eee, 0x9853: 0xe0000eeb, + 0x9854: 0xe0001053, 0x9855: 0xe0001050, 0x9856: 0xe0001059, 0x9857: 0xe0001056, + 0x9858: 0xe0000f61, 0x9859: 0xe0000f5e, 0x985a: 0xe0000fa5, 0x985b: 0xe0000fa2, + 0x985c: 0x00312288, 0x985d: 0x40312220, 0x985e: 0xe0000bf4, 0x985f: 0xe0000bf1, + 0x9860: 0x002ebc88, 0x9861: 0x402c8c20, 0x9862: 0x002f2288, 0x9863: 0x402f2220, + 0x9864: 0x00314088, 0x9865: 0x40314020, 0x9866: 0xe000096f, 0x9867: 0xe000096c, + 0x9868: 0xe0000b32, 0x9869: 0xe0000b2f, 0x986a: 0xe00037fa, 0x986b: 0xe00037f7, + 0x986c: 0xe0000dfd, 0x986d: 0xe0000df9, 0x986e: 0xe0000e04, 0x986f: 0xe0000e01, + 0x9870: 0xe0000e0b, 0x9871: 0xe0000e07, 0x9872: 0xe0001129, 0x9873: 0xe0001126, + 0x9874: 0x402e5e20, 0x9875: 0x402ed020, 0x9876: 0x40305a20, 0x9877: 0x402dd420, + 0x9878: 0xe0000abf, 0x9879: 0xe0000ec4, 0x987a: 0x002be888, 0x987b: 0x002c4488, + 0x987c: 0x402c4420, 0x987d: 0x002e3888, 0x987e: 0x00303e88, 0x987f: 0x402ffc20, + // Block 0x262, offset 0x9880 + 0x9880: 0x402f8220, 0x9881: 0x402fd820, 0x9882: 0x402ff420, 0x9883: 0x40300820, + 0x9884: 0x402df620, 0x9885: 0x40301a20, 0x9886: 0x40302420, 0x9887: 0x40306420, + 0x9888: 0x40305220, 0x9889: 0x40307c20, 0x988a: 0x4030b420, 0x988b: 0x4030cc20, + 0x988c: 0x4030da20, 0x988d: 0x4030ee20, 0x988e: 0x402e7a20, 0x988f: 0x40310820, + 0x9890: 0x40314820, 0x9891: 0x40315020, 0x9892: 0xe00037d7, 0x9893: 0x40318020, + 0x9894: 0x4031cc20, 0x9895: 0x4031e820, 0x9896: 0x40320a20, 0x9897: 0x40323220, + 0x9898: 0x40323a20, 0x9899: 0x402c1220, 0x989a: 0x402cf820, 0x989b: 0x402d4c20, + 0x989c: 0x402d7020, 0x989d: 0x402de620, 0x989e: 0x402e1a20, 0x989f: 0x402e2a20, + 0x98a0: 0x402f6220, 0x98a1: 0x4031fa20, 0x98a2: 0x40320220, 0x98a3: 0xe0000aca, + 0x98a4: 0xe0000adc, 0x98a5: 0xe0000ad9, 0x98a6: 0xe0000fcc, 0x98a7: 0xe0000fcf, + 0x98a8: 0xe0000fba, 0x98a9: 0xe0000ba1, 0x98aa: 0xe0000d11, 0x98ab: 0xe0000d18, + 0x98ac: 0x40324220, 0x98ad: 0x40324a20, 0x98ae: 0x40309020, 0x98af: 0x40309820, + 0x98b0: 0x002d6894, 0x98b1: 0x002d8094, 0x98b2: 0x002dcc94, 0x98b3: 0x002f7a94, + 0x98b4: 0x002f9894, 0x98b5: 0x002fac94, 0x98b6: 0x002fd894, 0x98b7: 0x0030e294, + 0x98b8: 0x00310094, 0x98b9: 0x40064020, 0x98ba: 0x40064420, 0x98bb: 0x402d9620, + 0x98bc: 0x4031de20, 0x98bd: 0x402d9820, 0x98be: 0x4031e220, 0x98bf: 0x4031f020, + // Block 0x263, offset 0x98c0 + 0x98c0: 0xe0000d24, 0x98c1: 0xe0000d21, 0x98c2: 0xe0000d2a, 0x98c3: 0xe0000d27, + 0x98c4: 0xe0000d69, 0x98c5: 0xe0000d66, 0x98c6: 0xe0000d7b, 0x98c7: 0xe0000d78, + 0x98c8: 0xe0000d87, 0x98c9: 0xe0000d84, 0x98ca: 0xe0000d81, 0x98cb: 0xe0000d7e, + 0x98cc: 0xe0000ded, 0x98cd: 0xe0000de9, 0x98ce: 0xe00037f4, 0x98cf: 0xe00037f1, + 0x98d0: 0xe0000e3d, 0x98d1: 0xe0000e39, 0x98d2: 0xe0000e35, 0x98d3: 0xe0000e31, + 0x98d4: 0xe0000ea7, 0x98d5: 0xe0000ea4, 0x98d6: 0xe0000ead, 0x98d7: 0xe0000eaa, + 0x98d8: 0xe0000ed6, 0x98d9: 0xe0000ed3, 0x98da: 0xe0000ef4, 0x98db: 0xe0000ef1, + 0x98dc: 0xe0000efb, 0x98dd: 0xe0000ef7, 0x98de: 0xe0000f02, 0x98df: 0xe0000eff, + 0x98e0: 0xe0000f41, 0x98e1: 0xe0000f3e, 0x98e2: 0xe0000f53, 0x98e3: 0xe0000f50, + 0x98e4: 0xe0000f26, 0x98e5: 0xe0000f22, 0x98e6: 0xe0000f3a, 0x98e7: 0xe0000f36, + 0x98e8: 0xe0000f5a, 0x98e9: 0xe0000f56, 0x98ea: 0xe0000f93, 0x98eb: 0xe0000f90, + 0x98ec: 0xe0000f9f, 0x98ed: 0xe0000f9c, 0x98ee: 0xe0000fb1, 0x98ef: 0xe0000fae, + 0x98f0: 0xe0000fab, 0x98f1: 0xe0000fa8, 0x98f2: 0xe0001093, 0x98f3: 0xe0001090, + 0x98f4: 0xe000109f, 0x98f5: 0xe000109c, 0x98f6: 0xe0001099, 0x98f7: 0xe0001096, + 0x98f8: 0xe0001032, 0x98f9: 0xe000102e, 0x98fa: 0xe000298b, 0x98fb: 0xe0002988, + 0x98fc: 0xe00010a9, 0x98fd: 0xe00010a6, 0x98fe: 0xe00010af, 0x98ff: 0xe00010ac, + // Block 0x264, offset 0x9900 + 0x9900: 0xe00009bc, 0x9901: 0xe00009c0, 0x9902: 0x002c3a8b, 0x9903: 0xf0000a04, + 0x9904: 0x40081c20, 0x9905: 0xe0000a5e, 0x9906: 0xe0000a62, 0x9907: 0x002cc28a, + 0x9908: 0x40081e20, 0x9909: 0xf0000a04, 0x990a: 0x002d2285, 0x990b: 0x002d688b, + 0x990c: 0x002d688b, 0x990d: 0x002d688b, 0x990e: 0x002d6885, 0x990f: 0xf0000202, + 0x9910: 0x002d9a8b, 0x9911: 0x002d9a8b, 0x9912: 0x002e228b, 0x9913: 0x002e2285, + 0x9914: 0x40082020, 0x9915: 0x002e9e8b, 0x9916: 0xf000040a, 0x9917: 0x40082220, + 0x9918: 0x40082420, 0x9919: 0x002f2c8b, 0x991a: 0x002f568b, 0x991b: 0x002f7a8b, + 0x991c: 0x002f7a8b, 0x991d: 0x002f7a8b, 0x991e: 0x40082620, 0x991f: 0x40082820, + 0x9920: 0xf0001414, 0x9921: 0xe0000fbd, 0x9922: 0xf0001414, 0x9923: 0x40082a20, + 0x9924: 0x00312a8b, 0x9925: 0x40082c20, 0x9926: 0x0032a288, 0x9927: 0x40082e20, + 0x9928: 0x00312a8b, 0x9929: 0x40083020, 0x992a: 0x002dfe88, 0x992b: 0x00320c83, + 0x992c: 0x002c0a8b, 0x992d: 0x002c3a8b, 0x992e: 0x40083220, 0x992f: 0x002c9885, + 0x9930: 0x002c988b, 0x9931: 0x002d088b, 0x9932: 0x002d1e88, 0x9933: 0x002e828b, + 0x9934: 0x002ee285, 0x9935: 0x00389084, 0x9936: 0x00389284, 0x9937: 0x00389484, + 0x9938: 0x00389684, 0x9939: 0x002d9a85, 0x993a: 0x40083420, 0x993b: 0xe0000b95, + 0x993c: 0x00327e85, 0x993d: 0x00325685, 0x993e: 0x0032568b, 0x993f: 0x00327e8b, + // Block 0x265, offset 0x9940 + 0x9940: 0xa0000000, 0x9941: 0xa0000000, 0x9942: 0xa0000000, 0x9943: 0xa0000000, + 0x9944: 0xa0000000, 0x9945: 0xa0000000, 0x9946: 0xa0000000, 0x9947: 0xa0000000, + 0x9948: 0xa0000000, 0x9949: 0x40020020, 0x994a: 0x40020220, 0x994b: 0x40020420, + 0x994c: 0x40020620, 0x994d: 0x40020820, 0x994e: 0xa0000000, 0x994f: 0xa0000000, + 0x9950: 0xa0000000, 0x9951: 0xa0000000, 0x9952: 0xa0000000, 0x9953: 0xa0000000, + 0x9954: 0xa0000000, 0x9955: 0xa0000000, 0x9956: 0xa0000000, 0x9957: 0xa0000000, + 0x9958: 0xa0000000, 0x9959: 0xa0000000, 0x995a: 0xa0000000, 0x995b: 0xa0000000, + 0x995c: 0xa0000000, 0x995d: 0xa0000000, 0x995e: 0xa0000000, 0x995f: 0xa0000000, + 0x9960: 0x40021220, 0x9961: 0x4002ba20, 0x9962: 0x4003e020, 0x9963: 0x4004ea20, + 0x9964: 0x4027de20, 0x9965: 0x4004ec20, 0x9966: 0x4004e620, 0x9967: 0x4003d220, + 0x9968: 0x4003f420, 0x9969: 0x4003f620, 0x996a: 0x4004d820, 0x996b: 0x40093820, + 0x996c: 0x40024020, 0x996d: 0x40021a20, 0x996e: 0x4002e420, 0x996f: 0x4004e220, + 0x9970: 0x4029cc20, 0x9971: 0x4029ce20, 0x9972: 0x4029d020, 0x9973: 0x4029d220, + 0x9974: 0x4029d420, 0x9975: 0x4029d620, 0x9976: 0x4029d820, 0x9977: 0x4029da20, + 0x9978: 0x4029dc20, 0x9979: 0x4029de20, 0x997a: 0x40026c20, 0x997b: 0x40026220, + 0x997c: 0x40094020, 0x997d: 0x40094220, 0x997e: 0x40094420, 0x997f: 0x4002c420, + // Block 0x266, offset 0x9980 + 0x9980: 0x4004d620, 0x9981: 0xc57327b1, 0x9982: 0x002c0a88, 0x9983: 0x002c3a88, + 0x9984: 0x002c6288, 0x9985: 0x002c9888, 0x9986: 0x002d0888, 0x9987: 0x002d2288, + 0x9988: 0x002d6888, 0x9989: 0x002d9a88, 0x998a: 0x002dcc88, 0x998b: 0x002dfe88, + 0x998c: 0xc0030002, 0x998d: 0x002e8288, 0x998e: 0x002e9e88, 0x998f: 0xc57e27e1, + 0x9990: 0x002f2c88, 0x9991: 0x002f5688, 0x9992: 0x002f7a88, 0x9993: 0x002fe688, + 0x9994: 0x00302c88, 0x9995: 0xc3900b21, 0x9996: 0x0030be88, 0x9997: 0x0030bea3, + 0x9998: 0x0030f688, 0x9999: 0x00310088, 0x999a: 0x00312a88, 0x999b: 0x4003f820, + 0x999c: 0x4004e420, 0x999d: 0x4003fa20, 0x999e: 0x40062420, 0x999f: 0x40021620, + 0x99a0: 0x40061e20, 0x99a1: 0xc57027b1, 0x99a2: 0x402c0a20, 0x99a3: 0x402c3a20, + 0x99a4: 0x402c6220, 0x99a5: 0x402c9820, 0x99a6: 0x402d0820, 0x99a7: 0x402d2220, + 0x99a8: 0x402d6820, 0x99a9: 0x402d9a20, 0x99aa: 0x402dcc20, 0x99ab: 0x402dfe20, + 0x99ac: 0xc0000002, 0x99ad: 0x402e8220, 0x99ae: 0x402e9e20, 0x99af: 0xc57a27e1, + 0x99b0: 0x402f2c20, 0x99b1: 0x402f5620, 0x99b2: 0x402f7a20, 0x99b3: 0x402fe620, + 0x99b4: 0x40302c20, 0x99b5: 0xc38d0b21, 0x99b6: 0x4030be20, 0x99b7: 0x4030be21, + 0x99b8: 0x4030f620, 0x99b9: 0x40310020, 0x99ba: 0x40312a20, 0x99bb: 0x4003fc20, + 0x99bc: 0x40094820, 0x99bd: 0x4003fe20, 0x99be: 0x40094c20, 0x99bf: 0xa0000000, + // Block 0x267, offset 0x99c0 + 0x99c0: 0xe00008f5, 0x99c1: 0xe00008ef, 0x99c2: 0xe0000921, 0x99c3: 0xe0000969, + 0x99c4: 0x00320e83, 0x99c5: 0x00320c83, 0x99c6: 0x00320ea3, 0x99c7: 0xe0000a53, + 0x99c8: 0xe0000ae8, 0x99c9: 0xe0000ae2, 0x99ca: 0xe0000af4, 0x99cb: 0xe0000b20, + 0x99cc: 0xe0000c2b, 0x99cd: 0xe0000c25, 0x99ce: 0xe0000c37, 0x99cf: 0xe0000c43, + 0x99d0: 0x002c62a3, 0x99d1: 0xe0000d63, 0x99d2: 0xe0000d9a, 0x99d3: 0xe0000d94, + 0x99d4: 0xe0000da6, 0x99d5: 0x003210e3, 0x99d6: 0x00321083, 0x99d7: 0x40093e20, + 0x99d8: 0x003210a3, 0x99d9: 0xe0000fe1, 0x99da: 0xe0000fdb, 0x99db: 0xe0000fed, + 0x99dc: 0x003100a3, 0x99dd: 0xe0001102, 0x99de: 0xe0003806, 0x99df: 0xe0000f7b, + 0x99e0: 0xe00008f2, 0x99e1: 0xe00008ec, 0x99e2: 0xe000091e, 0x99e3: 0xe0000966, + 0x99e4: 0x40320e20, 0x99e5: 0x40320c20, 0x99e6: 0x40320e21, 0x99e7: 0xe0000a4d, + 0x99e8: 0xe0000ae5, 0x99e9: 0xe0000adf, 0x99ea: 0xe0000af1, 0x99eb: 0xe0000b1d, + 0x99ec: 0xe0000c28, 0x99ed: 0xe0000c22, 0x99ee: 0xe0000c34, 0x99ef: 0xe0000c40, + 0x99f0: 0x402c6221, 0x99f1: 0xe0000d60, 0x99f2: 0xe0000d97, 0x99f3: 0xe0000d91, + 0x99f4: 0xe0000da3, 0x99f5: 0x40321023, 0x99f6: 0x40321020, 0x99f7: 0x40093c20, + 0x99f8: 0x40321021, 0x99f9: 0xe0000fde, 0x99fa: 0xe0000fd8, 0x99fb: 0xe0000fea, + 0x99fc: 0x40310021, 0x99fd: 0xe00010ff, 0x99fe: 0xe0003803, 0x99ff: 0xe0001114, + // Block 0x268, offset 0x9a00 + 0x9a00: 0xe0000983, 0x9a01: 0xe0000980, 0x9a02: 0xe00008fb, 0x9a03: 0xe00008f8, + 0x9a04: 0xe000097d, 0x9a05: 0xe000097a, 0x9a06: 0xe0000a38, 0x9a07: 0xe0000a35, + 0x9a08: 0xe0000a3e, 0x9a09: 0xe0000a3b, 0x9a0a: 0xe0000a4a, 0x9a0b: 0xe0000a47, + 0x9a0c: 0xe0000a44, 0x9a0d: 0xe0000a41, 0x9a0e: 0xe0000a86, 0x9a0f: 0xe0000a83, + 0x9a10: 0x002c62c3, 0x9a11: 0x402c6222, 0x9a12: 0xe0000b46, 0x9a13: 0xe0000b43, + 0x9a14: 0xe0000aee, 0x9a15: 0xe0000aeb, 0x9a16: 0xe0000b2c, 0x9a17: 0xe0000b29, + 0x9a18: 0xe0000b40, 0x9a19: 0xe0000b3d, 0x9a1a: 0xe0000b1a, 0x9a1b: 0xe0000b17, + 0x9a1c: 0xe0000bb8, 0x9a1d: 0xe0000bb5, 0x9a1e: 0xe0000bb2, 0x9a1f: 0xe0000baf, + 0x9a20: 0xe0000bc4, 0x9a21: 0xe0000bc1, 0x9a22: 0xe0000bca, 0x9a23: 0xe0000bc7, + 0x9a24: 0xe0000bee, 0x9a25: 0xe0000beb, 0x9a26: 0xe0000c1b, 0x9a27: 0xe0000c18, + 0x9a28: 0xe0000c51, 0x9a29: 0xe0000c4e, 0x9a2a: 0xe0000c60, 0x9a2b: 0xe0000c5d, + 0x9a2c: 0xe0000c31, 0x9a2d: 0xe0000c2e, 0x9a2e: 0xe0000c5a, 0x9a2f: 0xe0000c57, + 0x9a30: 0xe0000c54, 0x9a31: 0x402da220, 0x9a32: 0xf0000a0a, 0x9a33: 0xf0000404, + 0x9a34: 0xe0000c8a, 0x9a35: 0xe0000c87, 0x9a36: 0xe0000c9f, 0x9a37: 0xe0000c9c, + 0x9a38: 0x402f7220, 0x9a39: 0xe0000ccc, 0x9a3a: 0xe0000cc9, 0x9a3b: 0xe0000cd8, + 0x9a3c: 0xe0000cd5, 0x9a3d: 0xe0000cd2, 0x9a3e: 0xe0000ccf, 0x9a3f: 0xe0000d04, + // Block 0x269, offset 0x9a40 + 0x9a40: 0xe0000cfe, 0x9a41: 0xe0000cf8, 0x9a42: 0xe0000cf5, 0x9a43: 0xe0000d51, + 0x9a44: 0xe0000d4e, 0x9a45: 0xe0000d6f, 0x9a46: 0xe0000d6c, 0x9a47: 0xe0000d5d, + 0x9a48: 0xe0000d5a, 0x9a49: 0xf0000404, 0x9a4a: 0x002e9ea3, 0x9a4b: 0x402e9e21, + 0x9a4c: 0xe0000e2e, 0x9a4d: 0xe0000e2b, 0x9a4e: 0xe0000da0, 0x9a4f: 0xe0000d9d, + 0x9a50: 0x003210c3, 0x9a51: 0x40321022, 0x9a52: 0x00321103, 0x9a53: 0x40321024, + 0x9a54: 0xe0000eca, 0x9a55: 0xe0000ec7, 0x9a56: 0xe0000edc, 0x9a57: 0xe0000ed9, + 0x9a58: 0xe0000ed0, 0x9a59: 0xe0000ecd, 0x9a5a: 0xe0000f1f, 0x9a5b: 0xe0000f1c, + 0x9a5c: 0xe0000f2d, 0x9a5d: 0xe0000f2a, 0x9a5e: 0xe0000f47, 0x9a5f: 0xe0000f44, + 0x9a60: 0xe0000f33, 0x9a61: 0xe0000f30, 0x9a62: 0xe0000f99, 0x9a63: 0xe0000f96, + 0x9a64: 0xe0000f8a, 0x9a65: 0xe0000f87, 0x9a66: 0x00303688, 0x9a67: 0x40303620, + 0x9a68: 0xe000102b, 0x9a69: 0xe0001028, 0x9a6a: 0xe000103f, 0x9a6b: 0xe000103c, + 0x9a6c: 0xe0000fe7, 0x9a6d: 0xe0000fe4, 0x9a6e: 0xe0000ff9, 0x9a6f: 0xe0000ff6, + 0x9a70: 0x003100c3, 0x9a71: 0x40310022, 0x9a72: 0xe0001039, 0x9a73: 0xe0001036, + 0x9a74: 0xe0003636, 0x9a75: 0xe0003633, 0x9a76: 0xe000110e, 0x9a77: 0xe000110b, + 0x9a78: 0xe0001117, 0x9a79: 0xe000113b, 0x9a7a: 0xe0001138, 0x9a7b: 0xe000114d, + 0x9a7c: 0xe000114a, 0x9a7d: 0xe0001147, 0x9a7e: 0xe0001144, 0x9a7f: 0xe0000f64, + // Block 0x26a, offset 0x9a80 + 0x9a80: 0x40321220, 0x9a81: 0x40321a20, 0x9a82: 0x40322220, 0x9a83: 0x40322a20, + 0x9a84: 0xe0000ad5, 0x9a85: 0xe0000ad1, 0x9a86: 0xe0000acd, 0x9a87: 0xf0000a0a, + 0x9a88: 0xf000040a, 0x9a89: 0xf0000404, 0x9a8a: 0xf0000a0a, 0x9a8b: 0xf000040a, + 0x9a8c: 0xf0000404, 0x9a8d: 0xe0000947, 0x9a8e: 0xe0000944, 0x9a8f: 0xe0000c3d, + 0x9a90: 0xe0000c3a, 0x9a91: 0xe0000dcc, 0x9a92: 0xe0000dc9, 0x9a93: 0xe0000ff3, + 0x9a94: 0xe0000ff0, 0x9a95: 0xe000298b, 0x9a96: 0xe0002988, 0x9a97: 0xe0002979, + 0x9a98: 0xe0002976, 0x9a99: 0xe0002985, 0x9a9a: 0xe0002982, 0x9a9b: 0xe000297f, + 0x9a9c: 0xe000297c, 0x9a9d: 0x402cae20, 0x9a9e: 0xe00037e8, 0x9a9f: 0xe00037e5, + 0x9aa0: 0xe0000976, 0x9aa1: 0xe0000972, 0x9aa2: 0xe00029af, 0x9aa3: 0xe00029ac, + 0x9aa4: 0x002d3a88, 0x9aa5: 0x402d3a20, 0x9aa6: 0xe0000bbe, 0x9aa7: 0xe0000bbb, + 0x9aa8: 0xe0000c99, 0x9aa9: 0xe0000c96, 0x9aaa: 0xe0000e20, 0x9aab: 0xe0000e1d, + 0x9aac: 0xe0000e27, 0x9aad: 0xe0000e23, 0x9aae: 0xe0001162, 0x9aaf: 0xe000115f, + 0x9ab0: 0xe0000c8d, 0x9ab1: 0xf0000a0a, 0x9ab2: 0xf000040a, 0x9ab3: 0xf0000404, + 0x9ab4: 0xe0000bac, 0x9ab5: 0xe0000ba9, 0x9ab6: 0x002d7888, 0x9ab7: 0x00319488, + 0x9ab8: 0xe0000d57, 0x9ab9: 0xe0000d54, 0x9aba: 0xe0002991, 0x9abb: 0xe000298e, + 0x9abc: 0xe00037ee, 0x9abd: 0xe00037eb, 0x9abe: 0xe0003800, 0x9abf: 0xe00037fd, + // Block 0x26b, offset 0x9ac0 + 0x9ac0: 0xe000098f, 0x9ac1: 0xe000098c, 0x9ac2: 0xe0000995, 0x9ac3: 0xe0000992, + 0x9ac4: 0xe0000b62, 0x9ac5: 0xe0000b5f, 0x9ac6: 0xe0000b68, 0x9ac7: 0xe0000b65, + 0x9ac8: 0xe0000c6c, 0x9ac9: 0xe0000c69, 0x9aca: 0xe0000c72, 0x9acb: 0xe0000c6f, + 0x9acc: 0xe0000e4a, 0x9acd: 0xe0000e47, 0x9ace: 0xe0000e50, 0x9acf: 0xe0000e4d, + 0x9ad0: 0xe0000ee8, 0x9ad1: 0xe0000ee5, 0x9ad2: 0xe0000eee, 0x9ad3: 0xe0000eeb, + 0x9ad4: 0xe0001053, 0x9ad5: 0xe0001050, 0x9ad6: 0xe0001059, 0x9ad7: 0xe0001056, + 0x9ad8: 0xe0000f61, 0x9ad9: 0xe0000f5e, 0x9ada: 0xe0000fa5, 0x9adb: 0xe0000fa2, + 0x9adc: 0x00312288, 0x9add: 0x40312220, 0x9ade: 0xe0000bf4, 0x9adf: 0xe0000bf1, + 0x9ae0: 0x002ebc88, 0x9ae1: 0x402c8c20, 0x9ae2: 0x002f2288, 0x9ae3: 0x402f2220, + 0x9ae4: 0x00314088, 0x9ae5: 0x40314020, 0x9ae6: 0xe000096f, 0x9ae7: 0xe000096c, + 0x9ae8: 0xe0000b32, 0x9ae9: 0xe0000b2f, 0x9aea: 0xe00037fa, 0x9aeb: 0xe00037f7, + 0x9aec: 0xe000381e, 0x9aed: 0xe000381b, 0x9aee: 0xe0000e04, 0x9aef: 0xe0000e01, + 0x9af0: 0xe0000e0b, 0x9af1: 0xe0000e07, 0x9af2: 0xe0001129, 0x9af3: 0xe0001126, + 0x9af4: 0x402e5e20, 0x9af5: 0x402ed020, 0x9af6: 0x40305a20, 0x9af7: 0x402dd420, + 0x9af8: 0xe0000abf, 0x9af9: 0xe0000ec4, 0x9afa: 0x002be888, 0x9afb: 0x002c4488, + 0x9afc: 0x402c4420, 0x9afd: 0x002e3888, 0x9afe: 0x00303e88, 0x9aff: 0x402ffc20, + // Block 0x26c, offset 0x9b00 + 0x9b00: 0xe0000d24, 0x9b01: 0xe0000d21, 0x9b02: 0xe0000d2a, 0x9b03: 0xe0000d27, + 0x9b04: 0xe0000d69, 0x9b05: 0xe0000d66, 0x9b06: 0xe0000d7b, 0x9b07: 0xe0000d78, + 0x9b08: 0xe0000d87, 0x9b09: 0xe0000d84, 0x9b0a: 0xe0000d81, 0x9b0b: 0xe0000d7e, + 0x9b0c: 0xe000380c, 0x9b0d: 0xe0003809, 0x9b0e: 0xe0003818, 0x9b0f: 0xe0003815, + 0x9b10: 0xe0000e3d, 0x9b11: 0xe0000e39, 0x9b12: 0xe0000e35, 0x9b13: 0xe0000e31, + 0x9b14: 0xe0000ea7, 0x9b15: 0xe0000ea4, 0x9b16: 0xe0000ead, 0x9b17: 0xe0000eaa, + 0x9b18: 0xe0000ed6, 0x9b19: 0xe0000ed3, 0x9b1a: 0xe0000ef4, 0x9b1b: 0xe0000ef1, + 0x9b1c: 0xe0000efb, 0x9b1d: 0xe0000ef7, 0x9b1e: 0xe0000f02, 0x9b1f: 0xe0000eff, + 0x9b20: 0xe0000f41, 0x9b21: 0xe0000f3e, 0x9b22: 0xe0000f53, 0x9b23: 0xe0000f50, + 0x9b24: 0xe0000f26, 0x9b25: 0xe0000f22, 0x9b26: 0xe0000f3a, 0x9b27: 0xe0000f36, + 0x9b28: 0xe0000f5a, 0x9b29: 0xe0000f56, 0x9b2a: 0xe0000f93, 0x9b2b: 0xe0000f90, + 0x9b2c: 0xe0000f9f, 0x9b2d: 0xe0000f9c, 0x9b2e: 0xe0000fb1, 0x9b2f: 0xe0000fae, + 0x9b30: 0xe0000fab, 0x9b31: 0xe0000fa8, 0x9b32: 0xe0001093, 0x9b33: 0xe0001090, + 0x9b34: 0xe000109f, 0x9b35: 0xe000109c, 0x9b36: 0xe0001099, 0x9b37: 0xe0001096, + 0x9b38: 0xe0001032, 0x9b39: 0xe000102e, 0x9b3a: 0xe000298b, 0x9b3b: 0xe0002988, + 0x9b3c: 0xe00010a9, 0x9b3d: 0xe00010a6, 0x9b3e: 0xe00010af, 0x9b3f: 0xe00010ac, + // Block 0x26d, offset 0x9b40 + 0x9b40: 0xe0003630, 0x9b41: 0xe000362d, 0x9b42: 0xe000362a, 0x9b43: 0xe0003627, + 0x9b44: 0xe000363f, 0x9b45: 0xe000363c, 0x9b46: 0xe0003645, 0x9b47: 0xe0003642, + 0x9b48: 0xe000364b, 0x9b49: 0xe0003648, 0x9b4a: 0xe00010fc, 0x9b4b: 0xe00010f9, + 0x9b4c: 0xe00010f6, 0x9b4d: 0xe00010f3, 0x9b4e: 0xe0001123, 0x9b4f: 0xe0001120, + 0x9b50: 0xe0001141, 0x9b51: 0xe000113e, 0x9b52: 0xe0001153, 0x9b53: 0xe0001150, + 0x9b54: 0xe0001159, 0x9b55: 0xe0001156, 0x9b56: 0xe0000c15, 0x9b57: 0xe0000f8d, + 0x9b58: 0xe0003639, 0x9b59: 0xe0001111, 0x9b5a: 0xf0000404, 0x9b5b: 0xe0000f70, + 0x9b5c: 0x40300420, 0x9b5d: 0x40300620, 0x9b5e: 0xe0000f7f, 0x9b5f: 0x402c9620, + 0x9b60: 0xe000099b, 0x9b61: 0xe0000998, 0x9b62: 0xe0000989, 0x9b63: 0xe0000986, + 0x9b64: 0xe0000928, 0x9b65: 0xe0000924, 0x9b66: 0xe0000930, 0x9b67: 0xe000092c, + 0x9b68: 0xe0000940, 0x9b69: 0xe000093c, 0x9b6a: 0xe0000938, 0x9b6b: 0xe0000934, + 0x9b6c: 0xe00009aa, 0x9b6d: 0xe00009a6, 0x9b6e: 0xe0000902, 0x9b6f: 0xe00008fe, + 0x9b70: 0xe000090a, 0x9b71: 0xe0000906, 0x9b72: 0xe000091a, 0x9b73: 0xe0000916, + 0x9b74: 0xe0000912, 0x9b75: 0xe000090e, 0x9b76: 0xe00009a2, 0x9b77: 0xe000099e, + 0x9b78: 0xe0000b6e, 0x9b79: 0xe0000b6b, 0x9b7a: 0xe0000b5c, 0x9b7b: 0xe0000b59, + 0x9b7c: 0xe0000b26, 0x9b7d: 0xe0000b23, 0x9b7e: 0xe0000afb, 0x9b7f: 0xe0000af7, + // Block 0x26e, offset 0x9b80 + 0x9b80: 0xe0000b03, 0x9b81: 0xe0000aff, 0x9b82: 0xe0000b13, 0x9b83: 0xe0000b0f, + 0x9b84: 0xe0000b0b, 0x9b85: 0xe0000b07, 0x9b86: 0xe0000b75, 0x9b87: 0xe0000b71, + 0x9b88: 0xe0000c66, 0x9b89: 0xe0000c63, 0x9b8a: 0xe0000c78, 0x9b8b: 0xe0000c75, + 0x9b8c: 0xe0000e84, 0x9b8d: 0xe0000e81, 0x9b8e: 0xe0000e44, 0x9b8f: 0xe0000e41, + 0x9b90: 0xe0000dad, 0x9b91: 0xe0000da9, 0x9b92: 0xe0000db5, 0x9b93: 0xe0000db1, + 0x9b94: 0xe0000dc5, 0x9b95: 0xe0000dc1, 0x9b96: 0xe0003812, 0x9b97: 0xe000380f, + 0x9b98: 0xe0000e8b, 0x9b99: 0xe0000e87, 0x9b9a: 0xe0000e5d, 0x9b9b: 0xe0000e59, + 0x9b9c: 0xe0000e65, 0x9b9d: 0xe0000e61, 0x9b9e: 0xe0000e75, 0x9b9f: 0xe0000e71, + 0x9ba0: 0xe0003824, 0x9ba1: 0xe0003821, 0x9ba2: 0xe0000e7d, 0x9ba3: 0xe0000e79, + 0x9ba4: 0xe000108d, 0x9ba5: 0xe000108a, 0x9ba6: 0xe000104d, 0x9ba7: 0xe000104a, + 0x9ba8: 0xe0001066, 0x9ba9: 0xe0001062, 0x9baa: 0xe000106e, 0x9bab: 0xe000106a, + 0x9bac: 0xe000107e, 0x9bad: 0xe000107a, 0x9bae: 0xe0001076, 0x9baf: 0xe0001072, + 0x9bb0: 0xe0001086, 0x9bb1: 0xe0001082, 0x9bb2: 0xe0001108, 0x9bb3: 0xe0001105, + 0x9bb4: 0xe0001135, 0x9bb5: 0xe0001132, 0x9bb6: 0xe000112f, 0x9bb7: 0xe000112c, + 0x9bb8: 0xe000111d, 0x9bb9: 0xe000111a, 0x9bba: 0xe0000d0a, 0x9bbb: 0xe0000d07, + 0x9bbc: 0x0030d888, 0x9bbd: 0x4030d820, 0x9bbe: 0x00312088, 0x9bbf: 0x40312020, + // Block 0x26f, offset 0x9bc0 + 0x9bc0: 0xe0000024, 0x9bc1: 0xe0000029, 0x9bc2: 0xe000002e, 0x9bc3: 0xe0000033, + 0x9bc4: 0xe0000038, 0x9bc5: 0xe000003d, 0x9bc6: 0xe0000042, 0x9bc7: 0xe0000047, + 0x9bc8: 0xf0001f04, 0x9bc9: 0xf0001f04, 0x9bca: 0xf0001f04, 0x9bcb: 0xf0001f04, + 0x9bcc: 0xf0001f04, 0x9bcd: 0xf0001f04, 0x9bce: 0xf0001f04, 0x9bcf: 0xf0001f04, + 0x9bd0: 0xf0001f04, 0x9bd1: 0xf0000404, 0x9bd2: 0xf0000404, 0x9bd3: 0xf0000404, + 0x9bd4: 0xf0000404, 0x9bd5: 0xf0000404, 0x9bd6: 0xf0000404, 0x9bd7: 0xf0000404, + 0x9bd8: 0xf0000404, 0x9bd9: 0xf0000404, 0x9bda: 0xf0000404, 0x9bdb: 0xf0000404, + 0x9bdc: 0xf0000404, 0x9bdd: 0xf0000404, 0x9bde: 0xf0000404, 0x9bdf: 0xf0000404, + 0x9be0: 0xf0000404, 0x9be1: 0xf0000404, 0x9be2: 0xf0000404, 0x9be3: 0xf0000404, + 0x9be4: 0xf0000404, 0x9be5: 0xf0000404, 0x9be6: 0xf0000404, 0x9be7: 0xf0000404, + 0x9be8: 0xf0000404, 0x9be9: 0xf0000404, 0x9bea: 0xf0000404, 0x9beb: 0xf0000404, + 0x9bec: 0xf0000404, 0x9bed: 0xf0000404, 0x9bee: 0xf0000404, 0x9bef: 0xf0000404, + 0x9bf0: 0xf0000404, 0x9bf1: 0xf0000404, 0x9bf2: 0xe0002c46, 0x9bf3: 0xf0000404, + 0x9bf4: 0xf0000404, 0x9bf5: 0xf0000404, 0x9bf6: 0x002bde8c, 0x9bf7: 0x002c0a8c, + 0x9bf8: 0x002c3a8c, 0x9bf9: 0x002c628c, 0x9bfa: 0x002c988c, 0x9bfb: 0x002d088c, + 0x9bfc: 0x002d228c, 0x9bfd: 0x002d688c, 0x9bfe: 0x002d9a8c, 0x9bff: 0x002dcc8c, + // Block 0x270, offset 0x9c00 + 0x9c00: 0xf0001d1c, 0x9c01: 0xf0001d1c, 0x9c02: 0xf0001d1c, 0x9c03: 0xf0001d1c, + 0x9c04: 0xf0001d1c, 0x9c05: 0xf0001d1d, 0x9c06: 0xf0001d1d, 0x9c07: 0xf0001d1d, + 0x9c08: 0xe0000a6b, 0x9c09: 0xe0000cb4, 0x9c0a: 0xf0001d1c, 0x9c0b: 0xf0001d1c, + 0x9c0c: 0xf0001d1c, 0x9c0d: 0xf0001c1c, 0x9c0e: 0xf0001c1c, 0x9c0f: 0xf0001c1c, + 0x9c10: 0xf0001c1d, 0x9c11: 0xe0000cb9, 0x9c12: 0xe0000d36, 0x9c13: 0xe0000be3, + 0x9c14: 0xe0000fc5, 0x9c15: 0xf0001c1c, 0x9c16: 0xf0001c1c, 0x9c17: 0xf0001c1c, + 0x9c18: 0xf0001c1c, 0x9c19: 0xf0001c1c, 0x9c1a: 0xf0001c1c, 0x9c1b: 0xf0001c1c, + 0x9c1c: 0xf0001c1c, 0x9c1d: 0xf0001c1c, 0x9c1e: 0xf0001c1c, 0x9c1f: 0xe0000d3e, + 0x9c20: 0xe0000a72, 0x9c21: 0xf0001c1c, 0x9c22: 0xe0000cbd, 0x9c23: 0xe0000d42, + 0x9c24: 0xe0000a76, 0x9c25: 0xf0001c1c, 0x9c26: 0xe0000cc1, 0x9c27: 0xe0000d2d, + 0x9c28: 0xe0000d31, 0x9c29: 0xf0001c1d, 0x9c2a: 0xe0000cc5, 0x9c2b: 0xe0000d4a, + 0x9c2c: 0xe0000be7, 0x9c2d: 0xe0000f0b, 0x9c2e: 0xe0000f0f, 0x9c2f: 0xe0000f15, + 0x9c30: 0xf0001c1c, 0x9c31: 0xf0001c1c, 0x9c32: 0xf0001c1c, 0x9c33: 0xf0001c1c, + 0x9c34: 0xf0001d1c, 0x9c35: 0xf0001d1c, 0x9c36: 0xf0001d1c, 0x9c37: 0xf0001d1c, + 0x9c38: 0xf0001d1c, 0x9c39: 0xf0001d1d, 0x9c3a: 0xe00035df, 0x9c3b: 0xe00035cd, + 0x9c3c: 0xe0003600, 0x9c3d: 0xe00035af, 0x9c3e: 0xe0002812, 0x9c3f: 0xe00035b2, + // Block 0x271, offset 0x9c40 + 0x9c40: 0xf0001f04, 0x9c41: 0xf0001f04, 0x9c42: 0xf0001f04, 0x9c43: 0xf0001f04, + 0x9c44: 0xf0001f04, 0x9c45: 0xf0001f04, 0x9c46: 0xf0001f04, 0x9c47: 0xf0001f04, + 0x9c48: 0xf0001f04, 0x9c49: 0xf0001f04, 0x9c4a: 0xf0001f04, + 0x9c50: 0xf0000a04, 0x9c51: 0xf0000a04, 0x9c52: 0xf0000a04, 0x9c53: 0xf0000a04, + 0x9c54: 0xf0000a04, 0x9c55: 0xf0000a04, 0x9c56: 0xf0000a04, 0x9c57: 0xf0000a04, + 0x9c58: 0xf0000a04, 0x9c59: 0xf0000a04, 0x9c5a: 0xf0000a04, 0x9c5b: 0xf0000a04, + 0x9c5c: 0xf0000a04, 0x9c5d: 0xf0000a04, 0x9c5e: 0xf0000a04, 0x9c5f: 0xf0000a04, + 0x9c60: 0xf0000a04, 0x9c61: 0xf0000a04, 0x9c62: 0xf0000a04, 0x9c63: 0xf0000a04, + 0x9c64: 0xf0000a04, 0x9c65: 0xf0000a04, 0x9c66: 0xe0002c4a, 0x9c67: 0xf0000a04, + 0x9c68: 0xf0000a04, 0x9c69: 0xf0000a04, 0x9c6a: 0xf0000a04, 0x9c6b: 0x002c3a8c, + 0x9c6c: 0x002f7a8c, 0x9c6d: 0xf0000c0c, 0x9c6e: 0xe00035e8, + 0x9c70: 0x002bde9d, 0x9c71: 0x002c0a9d, 0x9c72: 0x002c3a9d, 0x9c73: 0x002c629d, + 0x9c74: 0x002c989d, 0x9c75: 0x002d089d, 0x9c76: 0x002d229d, 0x9c77: 0x002d689d, + 0x9c78: 0x002d9a9d, 0x9c79: 0x002dcc9d, 0x9c7a: 0x002dfe9d, 0x9c7b: 0x002e229d, + 0x9c7c: 0x002e829d, 0x9c7d: 0x002e9e9d, 0x9c7e: 0x002ee29d, 0x9c7f: 0x002f2c9d, + // Block 0x272, offset 0x9c80 + 0x9c80: 0xa0000000, 0x9c81: 0xa0000000, 0x9c82: 0xa0000000, 0x9c83: 0xa0000000, + 0x9c84: 0xa0000000, 0x9c85: 0xa0000000, 0x9c86: 0xa0000000, 0x9c87: 0xa0000000, + 0x9c88: 0xa0000000, 0x9c89: 0x40020020, 0x9c8a: 0x40020220, 0x9c8b: 0x40020420, + 0x9c8c: 0x40020620, 0x9c8d: 0x40020820, 0x9c8e: 0xa0000000, 0x9c8f: 0xa0000000, + 0x9c90: 0xa0000000, 0x9c91: 0xa0000000, 0x9c92: 0xa0000000, 0x9c93: 0xa0000000, + 0x9c94: 0xa0000000, 0x9c95: 0xa0000000, 0x9c96: 0xa0000000, 0x9c97: 0xa0000000, + 0x9c98: 0xa0000000, 0x9c99: 0xa0000000, 0x9c9a: 0xa0000000, 0x9c9b: 0xa0000000, + 0x9c9c: 0xa0000000, 0x9c9d: 0xa0000000, 0x9c9e: 0xa0000000, 0x9c9f: 0xa0000000, + 0x9ca0: 0x40021220, 0x9ca1: 0x4002ba20, 0x9ca2: 0x4003e020, 0x9ca3: 0x4004ea20, + 0x9ca4: 0x4027de20, 0x9ca5: 0x4004ec20, 0x9ca6: 0x4004e620, 0x9ca7: 0x4003d220, + 0x9ca8: 0x4003f420, 0x9ca9: 0x4003f620, 0x9caa: 0x4004d820, 0x9cab: 0x40093820, + 0x9cac: 0x40024020, 0x9cad: 0x40021a20, 0x9cae: 0x4002e420, 0x9caf: 0x4004e220, + 0x9cb0: 0x4029cc20, 0x9cb1: 0x4029ce20, 0x9cb2: 0x4029d020, 0x9cb3: 0x4029d220, + 0x9cb4: 0x4029d420, 0x9cb5: 0x4029d620, 0x9cb6: 0x4029d820, 0x9cb7: 0x4029da20, + 0x9cb8: 0x4029dc20, 0x9cb9: 0x4029de20, 0x9cba: 0x40026c20, 0x9cbb: 0x40026220, + 0x9cbc: 0x40094020, 0x9cbd: 0x40094220, 0x9cbe: 0x40094420, 0x9cbf: 0x4002c420, + // Block 0x273, offset 0x9cc0 + 0x9cc0: 0x4004d620, 0x9cc1: 0x002bde88, 0x9cc2: 0x002c0a88, 0x9cc3: 0x002c3a88, + 0x9cc4: 0x002c6288, 0x9cc5: 0x002c9888, 0x9cc6: 0x002d0888, 0x9cc7: 0x002d2288, + 0x9cc8: 0x002d6888, 0x9cc9: 0x002d9a88, 0x9cca: 0x002dcc88, 0x9ccb: 0x002dfe88, + 0x9ccc: 0xc0030002, 0x9ccd: 0x002e8288, 0x9cce: 0xc5852853, 0x9ccf: 0x002ee288, + 0x9cd0: 0x002f2c88, 0x9cd1: 0x002f5688, 0x9cd2: 0x002f7a88, 0x9cd3: 0x002fe688, + 0x9cd4: 0x00302c88, 0x9cd5: 0x00306c88, 0x9cd6: 0x0030be88, 0x9cd7: 0x0030e288, + 0x9cd8: 0x0030f688, 0x9cd9: 0x00310088, 0x9cda: 0x00312a88, 0x9cdb: 0x4003f820, + 0x9cdc: 0x4004e420, 0x9cdd: 0x4003fa20, 0x9cde: 0x40062420, 0x9cdf: 0x40021620, + 0x9ce0: 0x40061e20, 0x9ce1: 0x402bde20, 0x9ce2: 0x402c0a20, 0x9ce3: 0x402c3a20, + 0x9ce4: 0x402c6220, 0x9ce5: 0x402c9820, 0x9ce6: 0x402d0820, 0x9ce7: 0x402d2220, + 0x9ce8: 0x402d6820, 0x9ce9: 0x402d9a20, 0x9cea: 0x402dcc20, 0x9ceb: 0x402dfe20, + 0x9cec: 0xc0000002, 0x9ced: 0x402e8220, 0x9cee: 0xc5822822, 0x9cef: 0x402ee220, + 0x9cf0: 0x402f2c20, 0x9cf1: 0x402f5620, 0x9cf2: 0x402f7a20, 0x9cf3: 0x402fe620, + 0x9cf4: 0x40302c20, 0x9cf5: 0x40306c20, 0x9cf6: 0x4030be20, 0x9cf7: 0x4030e220, + 0x9cf8: 0x4030f620, 0x9cf9: 0x40310020, 0x9cfa: 0x40312a20, 0x9cfb: 0x4003fc20, + 0x9cfc: 0x40094820, 0x9cfd: 0x4003fe20, 0x9cfe: 0x40094c20, 0x9cff: 0xa0000000, + // Block 0x274, offset 0x9d00 + 0x9d01: 0x40417021, 0x9d02: 0x40417020, 0x9d03: 0x40417220, + 0x9d05: 0x40417020, 0x9d06: 0x40417220, 0x9d07: 0x40417420, + 0x9d08: 0x40417620, 0x9d09: 0x40417820, 0x9d0a: 0x40417a20, 0x9d0b: 0x40417c20, + 0x9d0c: 0x40418020, 0x9d0d: 0x40418420, 0x9d0f: 0x40418620, + 0x9d10: 0x40418820, 0x9d11: 0x40418a20, 0x9d13: 0x40418c20, + 0x9d14: 0x40418e20, 0x9d15: 0x40419020, 0x9d16: 0x40419220, 0x9d17: 0x40419420, + 0x9d18: 0x40419620, 0x9d19: 0x40419820, 0x9d1a: 0x40419a20, 0x9d1b: 0x40419c20, + 0x9d1c: 0x40419e20, 0x9d1d: 0x4041a020, 0x9d1e: 0x4041a220, 0x9d1f: 0x4041a420, + 0x9d20: 0x4041a620, 0x9d21: 0x4041a820, 0x9d22: 0x4041aa20, 0x9d23: 0x4041ac20, + 0x9d24: 0x4041ae20, 0x9d25: 0x4041b020, 0x9d26: 0x4041b220, 0x9d27: 0x4041b420, + 0x9d28: 0x4041b620, 0x9d2a: 0x4041b820, 0x9d2b: 0x4041ba20, + 0x9d2c: 0x4041bc20, 0x9d2d: 0x4041be20, 0x9d2e: 0x4041c020, 0x9d2f: 0x4041c220, + 0x9d30: 0x4041c420, 0x9d32: 0x4041c620, 0x9d33: 0x4041d220, + 0x9d35: 0x4041c820, 0x9d36: 0x4041ca20, 0x9d37: 0x4041cc20, + 0x9d38: 0x4041ce20, 0x9d39: 0x4041d020, + 0x9d3c: 0xa070f102, 0x9d3d: 0x4041d420, 0x9d3e: 0x4041d620, 0x9d3f: 0x4041d820, + // Block 0x275, offset 0x9d40 + 0x9d40: 0xa0000000, 0x9d41: 0xa0000000, 0x9d42: 0xa0000000, 0x9d43: 0xa0000000, + 0x9d44: 0xa0000000, 0x9d45: 0xa0000000, 0x9d46: 0xa0000000, 0x9d47: 0xa0000000, + 0x9d48: 0xa0000000, 0x9d49: 0x40020020, 0x9d4a: 0x40020220, 0x9d4b: 0x40020420, + 0x9d4c: 0x40020620, 0x9d4d: 0x40020820, 0x9d4e: 0xa0000000, 0x9d4f: 0xa0000000, + 0x9d50: 0xa0000000, 0x9d51: 0xa0000000, 0x9d52: 0xa0000000, 0x9d53: 0xa0000000, + 0x9d54: 0xa0000000, 0x9d55: 0xa0000000, 0x9d56: 0xa0000000, 0x9d57: 0xa0000000, + 0x9d58: 0xa0000000, 0x9d59: 0xa0000000, 0x9d5a: 0xa0000000, 0x9d5b: 0xa0000000, + 0x9d5c: 0xa0000000, 0x9d5d: 0xa0000000, 0x9d5e: 0xa0000000, 0x9d5f: 0xa0000000, + 0x9d60: 0x40021220, 0x9d61: 0x4002ba20, 0x9d62: 0x4003e020, 0x9d63: 0x4004ea20, + 0x9d64: 0x4027de20, 0x9d65: 0x4004ec20, 0x9d66: 0x4004e620, 0x9d67: 0xc58f26f2, + 0x9d68: 0x4003f420, 0x9d69: 0x4003f620, 0x9d6a: 0x4004d820, 0x9d6b: 0x40093820, + 0x9d6c: 0x40024020, 0x9d6d: 0x40021a20, 0x9d6e: 0x4002e420, 0x9d6f: 0x4004e220, + 0x9d70: 0x4029cc20, 0x9d71: 0x4029ce20, 0x9d72: 0x4029d020, 0x9d73: 0x4029d220, + 0x9d74: 0x4029d420, 0x9d75: 0x4029d620, 0x9d76: 0x4029d820, 0x9d77: 0x4029da20, + 0x9d78: 0x4029dc20, 0x9d79: 0x4029de20, 0x9d7a: 0x40026c20, 0x9d7b: 0x40026220, + 0x9d7c: 0x40094020, 0x9d7d: 0x40094220, 0x9d7e: 0x40094420, 0x9d7f: 0x4002c420, + // Block 0x276, offset 0x9d80 + 0x9d80: 0x4004d620, 0x9d81: 0x002bde88, 0x9d82: 0x002c0a88, 0x9d83: 0x002c3a88, + 0x9d84: 0x002c6288, 0x9d85: 0x002c9888, 0x9d86: 0x002d0888, 0x9d87: 0x002d2288, + 0x9d88: 0x002d6888, 0x9d89: 0x002d9a88, 0x9d8a: 0x002dcc88, 0x9d8b: 0x002dfe88, + 0x9d8c: 0xc0030002, 0x9d8d: 0x002e8288, 0x9d8e: 0x002e9e88, 0x9d8f: 0x002ee288, + 0x9d90: 0x002f2c88, 0x9d91: 0x002f5688, 0x9d92: 0x002f7a88, 0x9d93: 0xc58909c2, + 0x9d94: 0xc38a2722, 0x9d95: 0x00306c88, 0x9d96: 0x0030be88, 0x9d97: 0x0030e288, + 0x9d98: 0x0030f688, 0x9d99: 0x00310088, 0x9d9a: 0x00312a88, 0x9d9b: 0x4003f820, + 0x9d9c: 0x4004e420, 0x9d9d: 0x4003fa20, 0x9d9e: 0x40062420, 0x9d9f: 0x40021620, + 0x9da0: 0x40061e20, 0x9da1: 0x402bde20, 0x9da2: 0x402c0a20, 0x9da3: 0x402c3a20, + 0x9da4: 0x402c6220, 0x9da5: 0x402c9820, 0x9da6: 0x402d0820, 0x9da7: 0x402d2220, + 0x9da8: 0x402d6820, 0x9da9: 0x402d9a20, 0x9daa: 0x402dcc20, 0x9dab: 0x402dfe20, + 0x9dac: 0xc0000002, 0x9dad: 0x402e8220, 0x9dae: 0x402e9e20, 0x9daf: 0x402ee220, + 0x9db0: 0x402f2c20, 0x9db1: 0x402f5620, 0x9db2: 0x402f7a20, 0x9db3: 0xc34109b1, + 0x9db4: 0xc3882711, 0x9db5: 0x40306c20, 0x9db6: 0x4030be20, 0x9db7: 0x4030e220, + 0x9db8: 0x4030f620, 0x9db9: 0x40310020, 0x9dba: 0x40312a20, 0x9dbb: 0x4003fc20, + 0x9dbc: 0x40094820, 0x9dbd: 0x4003fe20, 0x9dbe: 0x40094c20, 0x9dbf: 0xa0000000, + // Block 0x277, offset 0x9dc0 + 0x9dc0: 0x402c1a20, 0x9dc1: 0x002c0c83, 0x9dc2: 0x002c3288, 0x9dc3: 0x402c3220, + 0x9dc4: 0x0031c488, 0x9dc5: 0x4031c420, 0x9dc6: 0x002efa88, 0x9dc7: 0x002c4e88, + 0x9dc8: 0x402c4e20, 0x9dc9: 0x002c7288, 0x9dca: 0x002c6483, 0x9dcb: 0x002c8488, + 0x9dcc: 0x402c8420, 0x9dcd: 0xe000115c, 0x9dce: 0x002cae88, 0x9dcf: 0x002cb888, + 0x9dd0: 0x002cc288, 0x9dd1: 0x002d1688, 0x9dd2: 0x402d1620, 0x9dd3: 0x002d4488, + 0x9dd4: 0x002d5888, 0x9dd5: 0x402d7820, 0x9dd6: 0x002dc288, 0x9dd7: 0x002db688, + 0x9dd8: 0x002e0083, 0x9dd9: 0x402e0020, 0x9dda: 0x402e3820, 0x9ddb: 0x402e7220, + 0x9ddc: 0x0030a088, 0x9ddd: 0x002eb488, 0x9dde: 0x402ebc20, 0x9ddf: 0x002f1088, + 0x9de0: 0xe0000e56, 0x9de1: 0xe0000e53, 0x9de2: 0x002d6088, 0x9de3: 0x402d6020, + 0x9de4: 0x002f3e88, 0x9de5: 0x402f3e20, 0x9de6: 0x002f8288, 0x9de7: 0x0031b488, + 0x9de8: 0x4031b420, 0x9de9: 0x00300888, 0x9dea: 0x40301220, 0x9deb: 0x40304220, + 0x9dec: 0x00304a88, 0x9ded: 0x40304a20, 0x9dee: 0x00305288, 0x9def: 0xe000105f, + 0x9df0: 0xe000105c, 0x9df1: 0x0030b488, 0x9df2: 0x0030cc88, 0x9df3: 0x00310285, + 0x9df4: 0x40310220, 0x9df5: 0x00313488, 0x9df6: 0x40313420, 0x9df7: 0x00316488, + 0x9df8: 0x00316e88, 0x9df9: 0x40316e20, 0x9dfa: 0x40317820, 0x9dfb: 0x4031a620, + 0x9dfc: 0x0031bc88, 0x9dfd: 0x4031bc20, 0x9dfe: 0xe0000fc9, 0x9dff: 0x40319420, + // Block 0x278, offset 0x9e00 + 0x9e00: 0x40315820, 0x9e01: 0x0031d488, 0x9e02: 0x4031d420, 0x9e03: 0x002c1a88, + 0x9e04: 0x00307c88, 0x9e05: 0x0030da88, 0x9e06: 0x002ca288, 0x9e07: 0x402ca220, + 0x9e08: 0x002dde88, 0x9e09: 0x402dde20, 0x9e0a: 0x002f6a88, 0x9e0b: 0x402f6a20, + 0x9e0c: 0x002f8e88, 0x9e0d: 0x402f8e20, 0x9e0e: 0x00311088, 0x9e0f: 0x40311020, + 0x9e10: 0x402bf020, 0x9e11: 0x402bf820, 0x9e12: 0x402c0220, 0x9e13: 0x402c0c20, + 0x9e14: 0x402efa20, 0x9e15: 0x402c5620, 0x9e16: 0x402c7220, 0x9e17: 0x402c6420, + 0x9e18: 0x402ccc20, 0x9e19: 0x402cb820, 0x9e1a: 0x402cd420, 0x9e1b: 0x402cc220, + 0x9e1c: 0x402cdc20, 0x9e1d: 0x402ce820, 0x9e1e: 0x402cf020, 0x9e1f: 0x402dee20, + 0x9e20: 0x402d4420, 0x9e21: 0x402d2a20, 0x9e22: 0x402d3220, 0x9e23: 0x402d5820, + 0x9e24: 0x402d0020, 0x9e25: 0x40308820, 0x9e26: 0x402d8020, 0x9e27: 0x402d8e20, + 0x9e28: 0x402db620, 0x9e29: 0x402dc220, 0x9e2a: 0x402daa20, 0x9e2b: 0x402e4220, + 0x9e2c: 0x402e4a20, 0x9e2d: 0x402e5420, 0x9e2e: 0x402e6820, 0x9e2f: 0x4030a020, + 0x9e30: 0x4030ac20, 0x9e31: 0x402e9020, 0x9e32: 0x402eb420, 0x9e33: 0x402ec820, + 0x9e34: 0x402ea620, 0x9e35: 0x402f1020, 0x9e36: 0x402eee20, 0x9e37: 0x402f1a20, + 0x9e38: 0x402f4c20, 0x9e39: 0x402f9820, 0x9e3a: 0x402fa220, 0x9e3b: 0x402fac20, + 0x9e3c: 0x402fb620, 0x9e3d: 0x402fbe20, 0x9e3e: 0x402fc620, 0x9e3f: 0x402fd020, + // Block 0x279, offset 0x9e40 + 0x9e40: 0x402f8220, 0x9e41: 0x402fd820, 0x9e42: 0x402ff420, 0x9e43: 0x40300820, + 0x9e44: 0x402df620, 0x9e45: 0x40301a20, 0x9e46: 0x40302420, 0x9e47: 0x40306420, + 0x9e48: 0x40305220, 0x9e49: 0x40307c20, 0x9e4a: 0x4030b420, 0x9e4b: 0x4030cc20, + 0x9e4c: 0x4030da20, 0x9e4d: 0x4030ee20, 0x9e4e: 0x402e7a20, 0x9e4f: 0x40310820, + 0x9e50: 0x40314820, 0x9e51: 0x40315020, 0x9e52: 0x40316420, 0x9e53: 0x40318020, + 0x9e54: 0x4031cc20, 0x9e55: 0x4031e820, 0x9e56: 0x40320a20, 0x9e57: 0x40323220, + 0x9e58: 0x40323a20, 0x9e59: 0x402c1220, 0x9e5a: 0x402cf820, 0x9e5b: 0x402d4c20, + 0x9e5c: 0x402d7020, 0x9e5d: 0x402de620, 0x9e5e: 0x402e1a20, 0x9e5f: 0x402e2a20, + 0x9e60: 0x402f6220, 0x9e61: 0x4031fa20, 0x9e62: 0x40320220, 0x9e63: 0xe0000aca, + 0x9e64: 0xe0000adc, 0x9e65: 0xe0000ad9, 0x9e66: 0xe0000fcc, 0x9e67: 0xe0000fcf, + 0x9e68: 0xe0000fba, 0x9e69: 0xe0000ba1, 0x9e6a: 0xe0000d11, 0x9e6b: 0xe0000d18, + 0x9e6c: 0x40324220, 0x9e6d: 0x40324a20, 0x9e6e: 0x40309020, 0x9e6f: 0x40309820, + 0x9e70: 0x002d6894, 0x9e71: 0x002d8094, 0x9e72: 0x002dcc94, 0x9e73: 0x002f7a94, + 0x9e74: 0x002f9894, 0x9e75: 0x002fac94, 0x9e76: 0x002fd894, 0x9e77: 0x0030e294, + 0x9e78: 0x00310094, 0x9e79: 0x40064020, 0x9e7a: 0x40064420, 0x9e7b: 0x402d9620, + 0x9e7c: 0xc58c26f2, 0x9e7d: 0x402d9820, 0x9e7e: 0x4031e220, 0x9e7f: 0x4031f020, + // Block 0x27a, offset 0x9e80 + 0x9e80: 0xa0000000, 0x9e81: 0xa0000000, 0x9e82: 0xa0000000, 0x9e83: 0xa0000000, + 0x9e84: 0xa0000000, 0x9e85: 0xa0000000, 0x9e86: 0xa0000000, 0x9e87: 0xa0000000, + 0x9e88: 0xa0000000, 0x9e89: 0x40020020, 0x9e8a: 0x40020220, 0x9e8b: 0x40020420, + 0x9e8c: 0x40020620, 0x9e8d: 0x40020820, 0x9e8e: 0xa0000000, 0x9e8f: 0xa0000000, + 0x9e90: 0xa0000000, 0x9e91: 0xa0000000, 0x9e92: 0xa0000000, 0x9e93: 0xa0000000, + 0x9e94: 0xa0000000, 0x9e95: 0xa0000000, 0x9e96: 0xa0000000, 0x9e97: 0xa0000000, + 0x9e98: 0xa0000000, 0x9e99: 0xa0000000, 0x9e9a: 0xa0000000, 0x9e9b: 0xa0000000, + 0x9e9c: 0xa0000000, 0x9e9d: 0xa0000000, 0x9e9e: 0xa0000000, 0x9e9f: 0xa0000000, + 0x9ea0: 0x40021220, 0x9ea1: 0x4002ba20, 0x9ea2: 0x4003e020, 0x9ea3: 0x4004ea20, + 0x9ea4: 0x4027de20, 0x9ea5: 0x4004ec20, 0x9ea6: 0x4004e620, 0x9ea7: 0x4003d220, + 0x9ea8: 0x4003f420, 0x9ea9: 0x4003f620, 0x9eaa: 0x4004d820, 0x9eab: 0x40093820, + 0x9eac: 0x40024020, 0x9ead: 0x40021a20, 0x9eae: 0x4002e420, 0x9eaf: 0x4004e220, + 0x9eb0: 0x4029cc20, 0x9eb1: 0x4029ce20, 0x9eb2: 0x4029d020, 0x9eb3: 0x4029d220, + 0x9eb4: 0x4029d420, 0x9eb5: 0x4029d620, 0x9eb6: 0x4029d820, 0x9eb7: 0x4029da20, + 0x9eb8: 0x4029dc20, 0x9eb9: 0x4029de20, 0x9eba: 0x40026c20, 0x9ebb: 0x40026220, + 0x9ebc: 0x40094020, 0x9ebd: 0x40094220, 0x9ebe: 0x40094420, 0x9ebf: 0x4002c420, + // Block 0x27b, offset 0x9ec0 + 0x9ec0: 0x4004d620, 0x9ec1: 0x002bde83, 0x9ec2: 0x002c0a88, 0x9ec3: 0x002c3a88, + 0x9ec4: 0x002c6288, 0x9ec5: 0x002be083, 0x9ec6: 0x002d0888, 0x9ec7: 0x002d2288, + 0x9ec8: 0x002be883, 0x9ec9: 0x002be283, 0x9eca: 0x002dcc88, 0x9ecb: 0x002bea83, + 0x9ecc: 0xc5950002, 0x9ecd: 0x002bee83, 0x9ece: 0x002bf083, 0x9ecf: 0x002be483, + 0x9ed0: 0x002bf283, 0x9ed1: 0x002f5688, 0x9ed2: 0x002f7a88, 0x9ed3: 0x002fe688, + 0x9ed4: 0x00302c88, 0x9ed5: 0x002be683, 0x9ed6: 0x0030be88, 0x9ed7: 0x002bf483, + 0x9ed8: 0x0030f688, 0x9ed9: 0x00310088, 0x9eda: 0x00312a88, 0x9edb: 0x4003f820, + 0x9edc: 0x4004e420, 0x9edd: 0x4003fa20, 0x9ede: 0x40062420, 0x9edf: 0x40021620, + 0x9ee0: 0x40061e20, 0x9ee1: 0x402bde20, 0x9ee2: 0x402c0a20, 0x9ee3: 0x402c3a20, + 0x9ee4: 0x402c6220, 0x9ee5: 0x402be020, 0x9ee6: 0x402d0820, 0x9ee7: 0x402d2220, + 0x9ee8: 0x402be820, 0x9ee9: 0x402be220, 0x9eea: 0x402dcc20, 0x9eeb: 0x402bea20, + 0x9eec: 0xc5920002, 0x9eed: 0x402bee20, 0x9eee: 0x402bf020, 0x9eef: 0x402be420, + 0x9ef0: 0x402bf220, 0x9ef1: 0x402f5620, 0x9ef2: 0x402f7a20, 0x9ef3: 0x402fe620, + 0x9ef4: 0x40302c20, 0x9ef5: 0x402be620, 0x9ef6: 0x4030be20, 0x9ef7: 0x402bf420, + 0x9ef8: 0x4030f620, 0x9ef9: 0x40310020, 0x9efa: 0x40312a20, 0x9efb: 0x4003fc20, + 0x9efc: 0x40094820, 0x9efd: 0x4003fe20, 0x9efe: 0x40094c20, 0x9eff: 0xa0000000, + // Block 0x27c, offset 0x9f00 + 0x9f00: 0xe000382a, 0x9f01: 0xe0003827, 0x9f02: 0xe0003840, 0x9f03: 0xe0003864, + 0x9f04: 0xe000385d, 0x9f05: 0xe0003856, 0x9f06: 0xe00009dd, 0x9f07: 0xe0000a53, + 0x9f08: 0xe0003894, 0x9f09: 0xe000388e, 0x9f0a: 0xe00038a0, 0x9f0b: 0xe00038cc, + 0x9f0c: 0xe000393a, 0x9f0d: 0xe0003934, 0x9f0e: 0xe0003946, 0x9f0f: 0xe0003952, + 0x9f10: 0xe0000ab3, 0x9f11: 0xe0003be8, 0x9f12: 0xe0003999, 0x9f13: 0xe0003993, + 0x9f14: 0xe00039a5, 0x9f15: 0xe00039e5, 0x9f16: 0xe00039d1, 0x9f17: 0x40093e20, + 0x9f18: 0xe0000e12, 0x9f19: 0xe0003a89, 0x9f1a: 0xe0003a83, 0x9f1b: 0xe0003a95, + 0x9f1c: 0xe0003aa7, 0x9f1d: 0xe0001102, 0x9f1e: 0x00318888, 0x9f1f: 0xe0000f7b, + 0x9f20: 0xe00008f2, 0x9f21: 0xe00008ec, 0x9f22: 0xe000091e, 0x9f23: 0xe0000966, + 0x9f24: 0xe0000958, 0x9f25: 0xe000094a, 0x9f26: 0xe00009d5, 0x9f27: 0xe0000a4d, + 0x9f28: 0xe0003891, 0x9f29: 0xe000388b, 0x9f2a: 0xe000389d, 0x9f2b: 0xe00038c9, + 0x9f2c: 0xe0003937, 0x9f2d: 0xe0003931, 0x9f2e: 0xe0003943, 0x9f2f: 0xe000394f, + 0x9f30: 0xe0000aad, 0x9f31: 0xe0003be5, 0x9f32: 0xe0003996, 0x9f33: 0xe0003990, + 0x9f34: 0xe00039a2, 0x9f35: 0xe00039e2, 0x9f36: 0xe00039ce, 0x9f37: 0x40093c20, + 0x9f38: 0xe0000e0f, 0x9f39: 0xe0003a86, 0x9f3a: 0xe0003a80, 0x9f3b: 0xe0003a92, + 0x9f3c: 0xe0003aa4, 0x9f3d: 0xe00010ff, 0x9f3e: 0x40318820, 0x9f3f: 0xe0001114, + // Block 0x27d, offset 0x9f40 + 0x9f40: 0xe0003871, 0x9f41: 0xe0000980, 0x9f42: 0xe000382d, 0x9f43: 0xe00008f8, + 0x9f44: 0xe000386e, 0x9f45: 0xe000097a, 0x9f46: 0xe0000a38, 0x9f47: 0xe0000a35, + 0x9f48: 0xe0000a3e, 0x9f49: 0xe0000a3b, 0x9f4a: 0xe0000a4a, 0x9f4b: 0xe0000a47, + 0x9f4c: 0xe0000a44, 0x9f4d: 0xe0000a41, 0x9f4e: 0xe0000a86, 0x9f4f: 0xe0000a83, + 0x9f50: 0xe0000aaa, 0x9f51: 0xe0000aa7, 0x9f52: 0xe00038f2, 0x9f53: 0xe00038ef, + 0x9f54: 0xe000389a, 0x9f55: 0xe0003897, 0x9f56: 0xe00038d8, 0x9f57: 0xe00038d5, + 0x9f58: 0xe00038ec, 0x9f59: 0xe00038e9, 0x9f5a: 0xe00038c6, 0x9f5b: 0xe00038c3, + 0x9f5c: 0xe0000bb8, 0x9f5d: 0xe0000bb5, 0x9f5e: 0xe0000bb2, 0x9f5f: 0xe0000baf, + 0x9f60: 0xe0000bc4, 0x9f61: 0xe0000bc1, 0x9f62: 0xe0000bca, 0x9f63: 0xe0000bc7, + 0x9f64: 0xe0003b4d, 0x9f65: 0xe0003b4a, 0x9f66: 0xe0000c1b, 0x9f67: 0xe0000c18, + 0x9f68: 0xe0003960, 0x9f69: 0xe000395d, 0x9f6a: 0xe000396f, 0x9f6b: 0xe000396c, + 0x9f6c: 0xe0003940, 0x9f6d: 0xe000393d, 0x9f6e: 0xe0003969, 0x9f6f: 0xe0003966, + 0x9f70: 0xe0003963, 0x9f71: 0x402da220, 0x9f72: 0xe00027e2, 0x9f73: 0xe00027df, + 0x9f74: 0xe0000c8a, 0x9f75: 0xe0000c87, 0x9f76: 0xe0003b86, 0x9f77: 0xe0003b83, + 0x9f78: 0x402f7220, 0x9f79: 0xe0003b98, 0x9f7a: 0xe0003b95, 0x9f7b: 0xe0003ba4, + 0x9f7c: 0xe0003ba1, 0x9f7d: 0xe0003b9e, 0x9f7e: 0xe0003b9b, 0x9f7f: 0xe0000d04, + // Block 0x27e, offset 0x9f80 + 0x9f80: 0xe0000cfe, 0x9f81: 0xe0000cf8, 0x9f82: 0xe0000cf5, 0x9f83: 0xe0003bd6, + 0x9f84: 0xe0003bd3, 0x9f85: 0xe0003bf4, 0x9f86: 0xe0003bf1, 0x9f87: 0xe0003be2, + 0x9f88: 0xe0003bdf, 0x9f89: 0xe00035eb, 0x9f8a: 0x002eda88, 0x9f8b: 0x402eda20, + 0x9f8c: 0xe0003a1f, 0x9f8d: 0xe0003a1c, 0x9f8e: 0xe000399f, 0x9f8f: 0xe000399c, + 0x9f90: 0xe00039df, 0x9f91: 0xe00039dc, 0x9f92: 0xe0000e93, 0x9f93: 0xe0000e8f, + 0x9f94: 0xe0000eca, 0x9f95: 0xe0000ec7, 0x9f96: 0xe0000edc, 0x9f97: 0xe0000ed9, + 0x9f98: 0xe0000ed0, 0x9f99: 0xe0000ecd, 0x9f9a: 0xe0000f1f, 0x9f9b: 0xe0000f1c, + 0x9f9c: 0xe0000f2d, 0x9f9d: 0xe0000f2a, 0x9f9e: 0xe0000f47, 0x9f9f: 0xe0000f44, + 0x9fa0: 0xe0000f33, 0x9fa1: 0xe0000f30, 0x9fa2: 0xe0000f99, 0x9fa3: 0xe0000f96, + 0x9fa4: 0xe0000f8a, 0x9fa5: 0xe0000f87, 0x9fa6: 0x00303688, 0x9fa7: 0x40303620, + 0x9fa8: 0xe0003ad3, 0x9fa9: 0xe0003ad0, 0x9faa: 0xe0003ae7, 0x9fab: 0xe0003ae4, + 0x9fac: 0xe0003a8f, 0x9fad: 0xe0003a8c, 0x9fae: 0xe0003aa1, 0x9faf: 0xe0003a9e, + 0x9fb0: 0xe0003acd, 0x9fb1: 0xe0003aca, 0x9fb2: 0xe0003ae1, 0x9fb3: 0xe0003ade, + 0x9fb4: 0xe0003c24, 0x9fb5: 0xe0003c21, 0x9fb6: 0xe000110e, 0x9fb7: 0xe000110b, + 0x9fb8: 0xe0001117, 0x9fb9: 0xe000113b, 0x9fba: 0xe0001138, 0x9fbb: 0xe000114d, + 0x9fbc: 0xe000114a, 0x9fbd: 0xe0001147, 0x9fbe: 0xe0001144, 0x9fbf: 0xe0000f64, + // Block 0x27f, offset 0x9fc0 + 0x9fc0: 0x402c1a20, 0x9fc1: 0x002c2a88, 0x9fc2: 0x002c3288, 0x9fc3: 0x402c3220, + 0x9fc4: 0x0031c488, 0x9fc5: 0x4031c420, 0x9fc6: 0x002efa88, 0x9fc7: 0x002c4e88, + 0x9fc8: 0x402c4e20, 0x9fc9: 0x002c7288, 0x9fca: 0x002c7a88, 0x9fcb: 0x002c8488, + 0x9fcc: 0x402c8420, 0x9fcd: 0xe000115c, 0x9fce: 0x002cae88, 0x9fcf: 0x002cb888, + 0x9fd0: 0x002cc288, 0x9fd1: 0x002d1688, 0x9fd2: 0x402d1620, 0x9fd3: 0x002d4488, + 0x9fd4: 0x002d5888, 0x9fd5: 0x402d7820, 0x9fd6: 0x002dc288, 0x9fd7: 0x002db688, + 0x9fd8: 0x002e0a88, 0x9fd9: 0x402e0a20, 0x9fda: 0x402e3820, 0x9fdb: 0x402e7220, + 0x9fdc: 0x0030a088, 0x9fdd: 0x002eb488, 0x9fde: 0x402ebc20, 0x9fdf: 0x002f1088, + 0x9fe0: 0xe0003a47, 0x9fe1: 0xe0003a44, 0x9fe2: 0x002d6088, 0x9fe3: 0x402d6020, + 0x9fe4: 0x002f3e88, 0x9fe5: 0x402f3e20, 0x9fe6: 0x002f8288, 0x9fe7: 0x0031b488, + 0x9fe8: 0x4031b420, 0x9fe9: 0x00300888, 0x9fea: 0x40301220, 0x9feb: 0x40304220, + 0x9fec: 0x00304a88, 0x9fed: 0x40304a20, 0x9fee: 0x00305288, 0x9fef: 0xe0003b07, + 0x9ff0: 0xe0003b04, 0x9ff1: 0x0030b488, 0x9ff2: 0x0030cc88, 0x9ff3: 0x00311888, + 0x9ff4: 0x40311820, 0x9ff5: 0x00313488, 0x9ff6: 0x40313420, 0x9ff7: 0x00316488, + 0x9ff8: 0x00316e88, 0x9ff9: 0x40316e20, 0x9ffa: 0x40317820, 0x9ffb: 0x4031a620, + 0x9ffc: 0x0031bc88, 0x9ffd: 0x4031bc20, 0x9ffe: 0xe0000fc9, 0x9fff: 0x40319420, + // Block 0x280, offset 0xa000 + 0xa000: 0x40321220, 0xa001: 0x40321a20, 0xa002: 0x40322220, 0xa003: 0x40322a20, + 0xa004: 0xe0000ad5, 0xa005: 0xe0000ad1, 0xa006: 0xe0000acd, 0xa007: 0xe000357f, + 0xa008: 0xe000357c, 0xa009: 0xe0003579, 0xa00a: 0xe00035c4, 0xa00b: 0xe00035c1, + 0xa00c: 0xe00035be, 0xa00d: 0xe0003853, 0xa00e: 0xe0000944, 0xa00f: 0xe000394c, + 0xa010: 0xe0003949, 0xa011: 0xe00039cb, 0xa012: 0xe00039c8, 0xa013: 0xe0003a9b, + 0xa014: 0xe0003a98, 0xa015: 0xe0003ac6, 0xa016: 0xe0003ac2, 0xa017: 0xe0003aae, + 0xa018: 0xe0003aaa, 0xa019: 0xe0003abe, 0xa01a: 0xe0003aba, 0xa01b: 0xe0003ab6, + 0xa01c: 0xe0003ab2, 0xa01d: 0x402cae20, 0xa01e: 0xe0003860, 0xa01f: 0xe000095e, + 0xa020: 0xe000386a, 0xa021: 0xe0000972, 0xa022: 0xe00009f4, 0xa023: 0xe00009ef, + 0xa024: 0x002d3a88, 0xa025: 0x402d3a20, 0xa026: 0xe0000bbe, 0xa027: 0xe0000bbb, + 0xa028: 0xe0003b80, 0xa029: 0xe0003b7d, 0xa02a: 0xe0003a11, 0xa02b: 0xe0003a0e, + 0xa02c: 0xe0003a18, 0xa02d: 0xe0003a14, 0xa02e: 0xe0001162, 0xa02f: 0xe000115f, + 0xa030: 0xe0000c8d, 0xa031: 0xf0000a0a, 0xa032: 0xf000040a, 0xa033: 0xf0000404, + 0xa034: 0xe0000bac, 0xa035: 0xe0000ba9, 0xa036: 0x002d7888, 0xa037: 0x00319488, + 0xa038: 0xe0003bdc, 0xa039: 0xe0003bd9, 0xa03a: 0xe0003859, 0xa03b: 0xe0000950, + 0xa03c: 0xe00009ea, 0xa03d: 0xe00009e5, 0xa03e: 0xe0000e19, 0xa03f: 0xe0000e15, + // Block 0x281, offset 0xa040 + 0xa040: 0xe0003877, 0xa041: 0xe000098c, 0xa042: 0xe000387a, 0xa043: 0xe0000992, + 0xa044: 0xe000390e, 0xa045: 0xe000390b, 0xa046: 0xe0003914, 0xa047: 0xe0003911, + 0xa048: 0xe000397b, 0xa049: 0xe0003978, 0xa04a: 0xe0003981, 0xa04b: 0xe000397e, + 0xa04c: 0xe0003a3b, 0xa04d: 0xe0003a38, 0xa04e: 0xe0003a41, 0xa04f: 0xe0003a3e, + 0xa050: 0xe0000ee8, 0xa051: 0xe0000ee5, 0xa052: 0xe0000eee, 0xa053: 0xe0000eeb, + 0xa054: 0xe0003afb, 0xa055: 0xe0003af8, 0xa056: 0xe0003b01, 0xa057: 0xe0003afe, + 0xa058: 0xe0000f61, 0xa059: 0xe0000f5e, 0xa05a: 0xe0000fa5, 0xa05b: 0xe0000fa2, + 0xa05c: 0x00312288, 0xa05d: 0x40312220, 0xa05e: 0xe0003b53, 0xa05f: 0xe0003b50, + 0xa060: 0x002ebc88, 0xa061: 0x402c8c20, 0xa062: 0x002f2288, 0xa063: 0x402f2220, + 0xa064: 0x00314088, 0xa065: 0x40314020, 0xa066: 0xe0003867, 0xa067: 0xe000096c, + 0xa068: 0xe00038de, 0xa069: 0xe00038db, 0xa06a: 0xe00039d8, 0xa06b: 0xe00039d4, + 0xa06c: 0xe00039fc, 0xa06d: 0xe00039f8, 0xa06e: 0xe0003a03, 0xa06f: 0xe0003a00, + 0xa070: 0xe0003a0a, 0xa071: 0xe0003a06, 0xa072: 0xe0001129, 0xa073: 0xe0001126, + 0xa074: 0x402e5e20, 0xa075: 0x402ed020, 0xa076: 0x40305a20, 0xa077: 0x402dd420, + 0xa078: 0xe0000abf, 0xa079: 0xe0000ec4, 0xa07a: 0x002be888, 0xa07b: 0x002c4488, + 0xa07c: 0x402c4420, 0xa07d: 0x002e3888, 0xa07e: 0x00303e88, 0xa07f: 0x402ffc20, + // Block 0x282, offset 0xa080 + 0xa080: 0x402f8220, 0xa081: 0x402fd820, 0xa082: 0x402ff420, 0xa083: 0x40300820, + 0xa084: 0x402df620, 0xa085: 0x40301a20, 0xa086: 0x40302420, 0xa087: 0x40306420, + 0xa088: 0x40305220, 0xa089: 0x40307c20, 0xa08a: 0x4030b420, 0xa08b: 0x4030cc20, + 0xa08c: 0x4030da20, 0xa08d: 0x4030ee20, 0xa08e: 0x402e7a20, 0xa08f: 0x40310820, + 0xa090: 0x40314820, 0xa091: 0x40315020, 0xa092: 0x40316420, 0xa093: 0x40318020, + 0xa094: 0x4031cc20, 0xa095: 0x4031e820, 0xa096: 0x40320a20, 0xa097: 0x40323220, + 0xa098: 0x40323a20, 0xa099: 0x402c1220, 0xa09a: 0x402cf820, 0xa09b: 0x402d4c20, + 0xa09c: 0x402d7020, 0xa09d: 0x402de620, 0xa09e: 0x402e1a20, 0xa09f: 0x402e2a20, + 0xa0a0: 0x402f6220, 0xa0a1: 0x4031fa20, 0xa0a2: 0x40320220, 0xa0a3: 0xe0000aca, + 0xa0a4: 0xe0000adc, 0xa0a5: 0xe0000ad9, 0xa0a6: 0xe0000fcc, 0xa0a7: 0xe0000fcf, + 0xa0a8: 0xe0000fba, 0xa0a9: 0xe0000ba1, 0xa0aa: 0xe0000d11, 0xa0ab: 0xe0000d18, + 0xa0ac: 0x40324220, 0xa0ad: 0x40324a20, 0xa0ae: 0x40309020, 0xa0af: 0x40309820, + 0xa0b0: 0x002d6894, 0xa0b1: 0x002d8094, 0xa0b2: 0x002dcc94, 0xa0b3: 0x002f7a94, + 0xa0b4: 0x002f9894, 0xa0b5: 0x002fac94, 0xa0b6: 0x002fd894, 0xa0b7: 0x0030e294, + 0xa0b8: 0x00310094, 0xa0b9: 0x40064020, 0xa0ba: 0x40064420, 0xa0bb: 0x402bf620, + 0xa0bc: 0x4031de20, 0xa0bd: 0x402d9820, 0xa0be: 0x4031e220, 0xa0bf: 0x4031f020, + // Block 0x283, offset 0xa0c0 + 0xa0c0: 0xe0003888, 0xa0c1: 0xe00009ae, 0xa0c2: 0xe0000a22, 0xa0c3: 0xe0000a1f, + 0xa0c4: 0xe0000a28, 0xa0c5: 0xe0000a25, 0xa0c6: 0xe0000a2e, 0xa0c7: 0xe0000a2b, + 0xa0c8: 0xe0000a5a, 0xa0c9: 0xe0000a56, 0xa0ca: 0xe0000a8c, 0xa0cb: 0xe0000a89, + 0xa0cc: 0xe0000a98, 0xa0cd: 0xe0000a95, 0xa0ce: 0xe0000aa4, 0xa0cf: 0xe0000aa1, + 0xa0d0: 0xe0000a92, 0xa0d1: 0xe0000a8f, 0xa0d2: 0xe0000a9e, 0xa0d3: 0xe0000a9b, + 0xa0d4: 0xe0003901, 0xa0d5: 0xe00038fd, 0xa0d6: 0xe00038f9, 0xa0d7: 0xe00038f5, + 0xa0d8: 0xe0003928, 0xa0d9: 0xe0003925, 0xa0da: 0xe000392e, 0xa0db: 0xe000392b, + 0xa0dc: 0xe00038e5, 0xa0dd: 0xe00038e1, 0xa0de: 0xe0000b8c, 0xa0df: 0xe0000b89, + 0xa0e0: 0xe0000bd0, 0xa0e1: 0xe0000bcd, 0xa0e2: 0xe0003b5f, 0xa0e3: 0xe0003b5c, + 0xa0e4: 0xe0003b6b, 0xa0e5: 0xe0003b68, 0xa0e6: 0xe0003b59, 0xa0e7: 0xe0003b56, + 0xa0e8: 0xe0003b65, 0xa0e9: 0xe0003b62, 0xa0ea: 0xe0003b71, 0xa0eb: 0xe0003b6e, + 0xa0ec: 0xe000398d, 0xa0ed: 0xe000398a, 0xa0ee: 0xe0003959, 0xa0ef: 0xe0003955, + 0xa0f0: 0xe0003b7a, 0xa0f1: 0xe0003b77, 0xa0f2: 0xe0003b8c, 0xa0f3: 0xe0003b89, + 0xa0f4: 0xe0003b92, 0xa0f5: 0xe0003b8f, 0xa0f6: 0xe0003baa, 0xa0f7: 0xe0003ba7, + 0xa0f8: 0xe0003bb1, 0xa0f9: 0xe0003bad, 0xa0fa: 0xe0003bbe, 0xa0fb: 0xe0003bbb, + 0xa0fc: 0xe0003bb8, 0xa0fd: 0xe0003bb5, 0xa0fe: 0xe0003bc4, 0xa0ff: 0xe0003bc1, + // Block 0x284, offset 0xa100 + 0xa100: 0xe0003bca, 0xa101: 0xe0003bc7, 0xa102: 0xe0003bd0, 0xa103: 0xe0003bcd, + 0xa104: 0xe0003bee, 0xa105: 0xe0003beb, 0xa106: 0xe0003bfa, 0xa107: 0xe0003bf7, + 0xa108: 0xe0003c06, 0xa109: 0xe0003c03, 0xa10a: 0xe0003c00, 0xa10b: 0xe0003bfd, + 0xa10c: 0xe00039ec, 0xa10d: 0xe00039e8, 0xa10e: 0xe00039f4, 0xa10f: 0xe00039f0, + 0xa110: 0xe0003a2e, 0xa111: 0xe0003a2a, 0xa112: 0xe0003a26, 0xa113: 0xe0003a22, + 0xa114: 0xe0003c0c, 0xa115: 0xe0003c09, 0xa116: 0xe0003c12, 0xa117: 0xe0003c0f, + 0xa118: 0xe0000ed6, 0xa119: 0xe0000ed3, 0xa11a: 0xe0000ef4, 0xa11b: 0xe0000ef1, + 0xa11c: 0xe0000efb, 0xa11d: 0xe0000ef7, 0xa11e: 0xe0000f02, 0xa11f: 0xe0000eff, + 0xa120: 0xe0000f41, 0xa121: 0xe0000f3e, 0xa122: 0xe0000f53, 0xa123: 0xe0000f50, + 0xa124: 0xe0000f26, 0xa125: 0xe0000f22, 0xa126: 0xe0000f3a, 0xa127: 0xe0000f36, + 0xa128: 0xe0000f5a, 0xa129: 0xe0000f56, 0xa12a: 0xe0000f93, 0xa12b: 0xe0000f90, + 0xa12c: 0xe0000f9f, 0xa12d: 0xe0000f9c, 0xa12e: 0xe0000fb1, 0xa12f: 0xe0000fae, + 0xa130: 0xe0000fab, 0xa131: 0xe0000fa8, 0xa132: 0xe0003b3b, 0xa133: 0xe0003b38, + 0xa134: 0xe0003b47, 0xa135: 0xe0003b44, 0xa136: 0xe0003b41, 0xa137: 0xe0003b3e, + 0xa138: 0xe0003ada, 0xa139: 0xe0003ad6, 0xa13a: 0xe0003aee, 0xa13b: 0xe0003aea, + 0xa13c: 0xe00010a9, 0xa13d: 0xe00010a6, 0xa13e: 0xe00010af, 0xa13f: 0xe00010ac, + // Block 0x285, offset 0xa140 + 0xa140: 0xe0003c1e, 0xa141: 0xe0003c1b, 0xa142: 0xe0003c18, 0xa143: 0xe0003c15, + 0xa144: 0xe0003c2d, 0xa145: 0xe0003c2a, 0xa146: 0xe0003c33, 0xa147: 0xe0003c30, + 0xa148: 0xe0003c39, 0xa149: 0xe0003c36, 0xa14a: 0xe00010fc, 0xa14b: 0xe00010f9, + 0xa14c: 0xe00010f6, 0xa14d: 0xe00010f3, 0xa14e: 0xe0001123, 0xa14f: 0xe0001120, + 0xa150: 0xe0001141, 0xa151: 0xe000113e, 0xa152: 0xe0001153, 0xa153: 0xe0001150, + 0xa154: 0xe0001159, 0xa155: 0xe0001156, 0xa156: 0xe0003b74, 0xa157: 0xe0000f8d, + 0xa158: 0xe0003c27, 0xa159: 0xe0001111, 0xa15a: 0xf0000404, 0xa15b: 0xe0000f70, + 0xa15c: 0x40300420, 0xa15d: 0x40300620, 0xa15e: 0xe0000f7f, 0xa15f: 0x402c9620, + 0xa160: 0xe000387d, 0xa161: 0xe0000998, 0xa162: 0xe0003874, 0xa163: 0xe0000986, + 0xa164: 0xe0003843, 0xa165: 0xe0000924, 0xa166: 0xe0003847, 0xa167: 0xe000092c, + 0xa168: 0xe000384f, 0xa169: 0xe000093c, 0xa16a: 0xe000384b, 0xa16b: 0xe0000934, + 0xa16c: 0xe0003884, 0xa16d: 0xe00009a6, 0xa16e: 0xe0003830, 0xa16f: 0xe00008fe, + 0xa170: 0xe0003834, 0xa171: 0xe0000906, 0xa172: 0xe000383c, 0xa173: 0xe0000916, + 0xa174: 0xe0003838, 0xa175: 0xe000090e, 0xa176: 0xe0003880, 0xa177: 0xe000099e, + 0xa178: 0xe000391a, 0xa179: 0xe0003917, 0xa17a: 0xe0003908, 0xa17b: 0xe0003905, + 0xa17c: 0xe00038d2, 0xa17d: 0xe00038cf, 0xa17e: 0xe00038a7, 0xa17f: 0xe00038a3, + // Block 0x286, offset 0xa180 + 0xa180: 0xe00038af, 0xa181: 0xe00038ab, 0xa182: 0xe00038bf, 0xa183: 0xe00038bb, + 0xa184: 0xe00038b7, 0xa185: 0xe00038b3, 0xa186: 0xe0003921, 0xa187: 0xe000391d, + 0xa188: 0xe0003975, 0xa189: 0xe0003972, 0xa18a: 0xe0003987, 0xa18b: 0xe0003984, + 0xa18c: 0xe0003a75, 0xa18d: 0xe0003a72, 0xa18e: 0xe0003a35, 0xa18f: 0xe0003a32, + 0xa190: 0xe00039ac, 0xa191: 0xe00039a8, 0xa192: 0xe00039b4, 0xa193: 0xe00039b0, + 0xa194: 0xe00039c4, 0xa195: 0xe00039c0, 0xa196: 0xe00039bc, 0xa197: 0xe00039b8, + 0xa198: 0xe0003a7c, 0xa199: 0xe0003a78, 0xa19a: 0xe0003a4e, 0xa19b: 0xe0003a4a, + 0xa19c: 0xe0003a56, 0xa19d: 0xe0003a52, 0xa19e: 0xe0003a66, 0xa19f: 0xe0003a62, + 0xa1a0: 0xe0003a5e, 0xa1a1: 0xe0003a5a, 0xa1a2: 0xe0003a6e, 0xa1a3: 0xe0003a6a, + 0xa1a4: 0xe0003b35, 0xa1a5: 0xe0003b32, 0xa1a6: 0xe0003af5, 0xa1a7: 0xe0003af2, + 0xa1a8: 0xe0003b0e, 0xa1a9: 0xe0003b0a, 0xa1aa: 0xe0003b16, 0xa1ab: 0xe0003b12, + 0xa1ac: 0xe0003b26, 0xa1ad: 0xe0003b22, 0xa1ae: 0xe0003b1e, 0xa1af: 0xe0003b1a, + 0xa1b0: 0xe0003b2e, 0xa1b1: 0xe0003b2a, 0xa1b2: 0xe0001108, 0xa1b3: 0xe0001105, + 0xa1b4: 0xe0001135, 0xa1b5: 0xe0001132, 0xa1b6: 0xe000112f, 0xa1b7: 0xe000112c, + 0xa1b8: 0xe000111d, 0xa1b9: 0xe000111a, 0xa1ba: 0xe0000d0a, 0xa1bb: 0xe0000d07, + 0xa1bc: 0x0030d888, 0xa1bd: 0x4030d820, 0xa1be: 0x00312088, 0xa1bf: 0x40312020, + // Block 0x287, offset 0xa1c0 + 0xa1c0: 0xe00009bc, 0xa1c1: 0xe00009c0, 0xa1c2: 0x002c3a8b, 0xa1c3: 0xf0000a04, + 0xa1c4: 0x40081c20, 0xa1c5: 0xe0000a5e, 0xa1c6: 0xe0000a62, 0xa1c7: 0x002cc28a, + 0xa1c8: 0x40081e20, 0xa1c9: 0xf0000a04, 0xa1ca: 0x002d2285, 0xa1cb: 0x002d688b, + 0xa1cc: 0x002d688b, 0xa1cd: 0x002d688b, 0xa1ce: 0x002d6885, 0xa1cf: 0xf0000202, + 0xa1d0: 0x002d9a8b, 0xa1d1: 0x002d9a8b, 0xa1d2: 0x002e228b, 0xa1d3: 0x002e2285, + 0xa1d4: 0x40082020, 0xa1d5: 0x002e9e8b, 0xa1d6: 0xe000281e, 0xa1d7: 0x40082220, + 0xa1d8: 0x40082420, 0xa1d9: 0x002f2c8b, 0xa1da: 0x002f568b, 0xa1db: 0x002f7a8b, + 0xa1dc: 0x002f7a8b, 0xa1dd: 0x002f7a8b, 0xa1de: 0x40082620, 0xa1df: 0x40082820, + 0xa1e0: 0xe0002833, 0xa1e1: 0xe0000fbd, 0xa1e2: 0xe0002842, 0xa1e3: 0x40082a20, + 0xa1e4: 0x00312a8b, 0xa1e5: 0x40082c20, 0xa1e6: 0x0032a288, 0xa1e7: 0x40082e20, + 0xa1e8: 0x00312a8b, 0xa1e9: 0x40083020, 0xa1ea: 0x002bea83, 0xa1eb: 0xe0003856, + 0xa1ec: 0x002c0a8b, 0xa1ed: 0x002c3a8b, 0xa1ee: 0x40083220, 0xa1ef: 0x002c9885, + 0xa1f0: 0x002c988b, 0xa1f1: 0x002d088b, 0xa1f2: 0x002d1e88, 0xa1f3: 0x002e828b, + 0xa1f4: 0x002ee285, 0xa1f5: 0x00389084, 0xa1f6: 0x00389284, 0xa1f7: 0x00389484, + 0xa1f8: 0x00389684, 0xa1f9: 0x002d9a85, 0xa1fa: 0x40083420, 0xa1fb: 0xe0000b95, + 0xa1fc: 0x00327e85, 0xa1fd: 0x00325685, 0xa1fe: 0x0032568b, 0xa1ff: 0x00327e8b, + // Block 0x288, offset 0xa200 + 0xa200: 0xe0000024, 0xa201: 0xe0000029, 0xa202: 0xe000002e, 0xa203: 0xe0000033, + 0xa204: 0xe0000038, 0xa205: 0xe000003d, 0xa206: 0xe0000042, 0xa207: 0xe0000047, + 0xa208: 0xf0001f04, 0xa209: 0xf0001f04, 0xa20a: 0xf0001f04, 0xa20b: 0xf0001f04, + 0xa20c: 0xf0001f04, 0xa20d: 0xf0001f04, 0xa20e: 0xf0001f04, 0xa20f: 0xf0001f04, + 0xa210: 0xf0001f04, 0xa211: 0xf0000404, 0xa212: 0xf0000404, 0xa213: 0xf0000404, + 0xa214: 0xf0000404, 0xa215: 0xf0000404, 0xa216: 0xf0000404, 0xa217: 0xf0000404, + 0xa218: 0xf0000404, 0xa219: 0xf0000404, 0xa21a: 0xf0000404, 0xa21b: 0xf0000404, + 0xa21c: 0xf0000404, 0xa21d: 0xf0000404, 0xa21e: 0xf0000404, 0xa21f: 0xf0000404, + 0xa220: 0xe000249f, 0xa221: 0xf0000404, 0xa222: 0xf0000404, 0xa223: 0xe00024a7, + 0xa224: 0xe00024af, 0xa225: 0xf0000404, 0xa226: 0xe00024b7, 0xa227: 0xe0002c16, + 0xa228: 0xe0002c1e, 0xa229: 0xe0002c26, 0xa22a: 0xe00024bf, 0xa22b: 0xe0002c2e, + 0xa22c: 0xf0000404, 0xa22d: 0xf0000404, 0xa22e: 0xf0000404, 0xa22f: 0xf0000404, + 0xa230: 0xe0002c36, 0xa231: 0xf0000404, 0xa232: 0xe0002c46, 0xa233: 0xf0000404, + 0xa234: 0xf0000404, 0xa235: 0xf0000404, 0xa236: 0x002bde8c, 0xa237: 0x002c0a8c, + 0xa238: 0x002c3a8c, 0xa239: 0x002c628c, 0xa23a: 0x002c988c, 0xa23b: 0x002d088c, + 0xa23c: 0x002d228c, 0xa23d: 0x002d688c, 0xa23e: 0x002d9a8c, 0xa23f: 0x002dcc8c, + // Block 0x289, offset 0xa240 + 0xa240: 0xe000230b, 0xa241: 0xe00022f8, 0xa242: 0xe00022fc, 0xa243: 0xe0002311, + 0xa244: 0xe0002316, 0xa245: 0xe000231d, 0xa246: 0xe0002321, 0xa247: 0xe0002325, + 0xa248: 0xe000232b, 0xa249: 0xf0001c1c, 0xa24a: 0xe0002330, 0xa24b: 0xe000233c, + 0xa24c: 0xe0002340, 0xa24d: 0xe0002337, 0xa24e: 0xe0002346, 0xa24f: 0xe000234b, + 0xa250: 0xe000234f, 0xa251: 0xe0002353, 0xa252: 0xf0001c1c, 0xa253: 0xe000235e, + 0xa254: 0xe0002358, 0xa255: 0xf0001c1c, 0xa256: 0xe0002363, 0xa257: 0xe000236d, + 0xa258: 0xf0001f04, 0xa259: 0xf0001f04, 0xa25a: 0xf0001f04, 0xa25b: 0xf0001f04, + 0xa25c: 0xf0001f04, 0xa25d: 0xf0001f04, 0xa25e: 0xf0001f04, 0xa25f: 0xf0001f04, + 0xa260: 0xf0001f04, 0xa261: 0xf0001f04, 0xa262: 0xf0000404, 0xa263: 0xf0000404, + 0xa264: 0xf0000404, 0xa265: 0xf0000404, 0xa266: 0xf0000404, 0xa267: 0xf0000404, + 0xa268: 0xf0000404, 0xa269: 0xf0000404, 0xa26a: 0xf0000404, 0xa26b: 0xf0000404, + 0xa26c: 0xf0000404, 0xa26d: 0xf0000404, 0xa26e: 0xf0000404, 0xa26f: 0xf0000404, + 0xa270: 0xf0000404, 0xa271: 0xe0000c1e, 0xa272: 0xf0001c1c, 0xa273: 0xe0002f0d, + 0xa274: 0xe0000a31, 0xa275: 0xe0002824, 0xa276: 0xe00035d6, 0xa277: 0xe00032a7, + 0xa278: 0xe0000ac2, 0xa279: 0xe0000ac6, 0xa27a: 0xe00027e8, 0xa27b: 0xf0001c1c, + 0xa27c: 0xf0001c1c, 0xa27d: 0xf0001c1c, 0xa27e: 0xf0001c1c, 0xa27f: 0xe0002431, + // Block 0x28a, offset 0xa280 + 0xa280: 0xe00035d0, 0xa281: 0xe00035b8, 0xa282: 0xf0001d1c, 0xa283: 0xe000358e, + 0xa284: 0xe00027f7, 0xa285: 0xe00027fa, 0xa286: 0xe0003594, 0xa287: 0xf0001d1d, + 0xa288: 0xe0000a6b, 0xa289: 0xe0000cb4, 0xa28a: 0xe00035d9, 0xa28b: 0xe00035bb, + 0xa28c: 0xf0001d1c, 0xa28d: 0xf0001c1c, 0xa28e: 0xe000359d, 0xa28f: 0xe00027fd, + 0xa290: 0xe00027ce, 0xa291: 0xe0000cb9, 0xa292: 0xe0000d36, 0xa293: 0xe0000be3, + 0xa294: 0xe0000fc5, 0xa295: 0xe00035f7, 0xa296: 0xe00035a0, 0xa297: 0xe00032a4, + 0xa298: 0xe0002803, 0xa299: 0xe0003570, 0xa29a: 0xe00035c7, 0xa29b: 0xe00035fa, + 0xa29c: 0xe00035a3, 0xa29d: 0xe0003099, 0xa29e: 0xe0002806, 0xa29f: 0xe0000d3e, + 0xa2a0: 0xe0000a72, 0xa2a1: 0xe0003588, 0xa2a2: 0xe0000cbd, 0xa2a3: 0xe0000d42, + 0xa2a4: 0xe0000a76, 0xa2a5: 0xe000358b, 0xa2a6: 0xe0000cc1, 0xa2a7: 0xe0000d2d, + 0xa2a8: 0xe0000d31, 0xa2a9: 0xe00035d3, 0xa2aa: 0xe0000cc5, 0xa2ab: 0xe0000d4a, + 0xa2ac: 0xe0000be7, 0xa2ad: 0xe0000f0b, 0xa2ae: 0xe0000f0f, 0xa2af: 0xe0000f15, + 0xa2b0: 0xe000282d, 0xa2b1: 0xe0002821, 0xa2b2: 0xf0001c1c, 0xa2b3: 0xe000281b, + 0xa2b4: 0xe00035dc, 0xa2b5: 0xe00035ca, 0xa2b6: 0xf0001d1c, 0xa2b7: 0xe00035a6, + 0xa2b8: 0xe000280f, 0xa2b9: 0xe00035a9, 0xa2ba: 0xe00035df, 0xa2bb: 0xe00035cd, + 0xa2bc: 0xe0003600, 0xa2bd: 0xe00035af, 0xa2be: 0xe0002812, 0xa2bf: 0xe00035b2, + // Block 0x28b, offset 0xa2c0 + 0xa2c0: 0xe0002815, 0xa2c1: 0xe00035b5, 0xa2c2: 0xe00009b7, 0xa2c3: 0xf0001c1d, + 0xa2c4: 0xf0001c1c, 0xa2c5: 0xf0001c1c, 0xa2c6: 0xe0000a66, 0xa2c7: 0xe0000a7a, + 0xa2c8: 0xf0001d1c, 0xa2c9: 0xf0001c1d, 0xa2ca: 0xe00027c2, 0xa2cb: 0xe00027c8, + 0xa2cc: 0xe00027e5, 0xa2cd: 0xe0002800, 0xa2ce: 0xe0002809, 0xa2cf: 0xe000280c, + 0xa2d0: 0xe0003582, 0xa2d1: 0xe0003585, 0xa2d2: 0xe0000d0d, 0xa2d3: 0xe0002818, + 0xa2d4: 0xe0003591, 0xa2d5: 0xe0000d3a, 0xa2d6: 0xe0000d46, 0xa2d7: 0xe0002827, + 0xa2d8: 0xe0000eb0, 0xa2d9: 0xe0000eb8, 0xa2da: 0xe000282a, 0xa2db: 0xf0001c1c, + 0xa2dc: 0xf0001c1d, 0xa2dd: 0xe00035e2, 0xa2de: 0xe00010b2, 0xa2df: 0xe00009c8, + 0xa2e0: 0xf0001f04, 0xa2e1: 0xf0001f04, 0xa2e2: 0xf0001f04, 0xa2e3: 0xf0001f04, + 0xa2e4: 0xf0001f04, 0xa2e5: 0xf0001f04, 0xa2e6: 0xf0001f04, 0xa2e7: 0xf0001f04, + 0xa2e8: 0xf0001f04, 0xa2e9: 0xf0000404, 0xa2ea: 0xf0000404, 0xa2eb: 0xf0000404, + 0xa2ec: 0xf0000404, 0xa2ed: 0xf0000404, 0xa2ee: 0xf0000404, 0xa2ef: 0xf0000404, + 0xa2f0: 0xf0000404, 0xa2f1: 0xf0000404, 0xa2f2: 0xf0000404, 0xa2f3: 0xf0000404, + 0xa2f4: 0xf0000404, 0xa2f5: 0xf0000404, 0xa2f6: 0xf0000404, 0xa2f7: 0xf0000404, + 0xa2f8: 0xf0000404, 0xa2f9: 0xf0000404, 0xa2fa: 0xf0000404, 0xa2fb: 0xf0000404, + 0xa2fc: 0xf0000404, 0xa2fd: 0xf0000404, 0xa2fe: 0xf0000404, 0xa2ff: 0xe0000bdf, + // Block 0x28c, offset 0xa300 + 0xa300: 0xf0000404, 0xa301: 0xe00026cf, 0xa302: 0xe000356d, 0xa303: 0xe0000b99, + 0xa304: 0xe0000b9d, 0xa305: 0xe0000f83, 0xa306: 0xf0000404, + 0xa313: 0xf0000404, + 0xa314: 0xf0000404, 0xa315: 0xf0000404, 0xa316: 0xf0000404, 0xa317: 0xf0000404, + 0xa31d: 0xe000150b, 0xa31e: 0xa1a09602, 0xa31f: 0xe0001514, + 0xa320: 0x0038ae85, 0xa321: 0x00389085, 0xa322: 0x00389685, 0xa323: 0x00389885, + 0xa324: 0x0038a485, 0xa325: 0x0038a685, 0xa326: 0x0038a885, 0xa327: 0x0038b685, + 0xa328: 0x0038ba85, 0xa329: 0x00093885, 0xa32a: 0xe0001542, 0xa32b: 0xe000153f, + 0xa32c: 0xe000154c, 0xa32d: 0xe0001548, 0xa32e: 0xe00014e1, 0xa32f: 0xe00014e4, + 0xa330: 0xe00014e7, 0xa331: 0xe00014ea, 0xa332: 0xe00014f0, 0xa333: 0xe00014f3, + 0xa334: 0xe00014f6, 0xa335: 0xe00014fc, 0xa336: 0xe0001505, + 0xa338: 0xe0001508, 0xa339: 0xe000150e, 0xa33a: 0xe000151b, 0xa33b: 0xe0001518, + 0xa33c: 0xe0001521, 0xa33e: 0xe0001524, + // Block 0x28d, offset 0xa340 + 0xa340: 0xf0001f04, 0xa341: 0xf0001f04, 0xa342: 0xf0001f04, 0xa343: 0xf0001f04, + 0xa344: 0xf0001f04, 0xa345: 0xf0001f04, 0xa346: 0xf0001f04, 0xa347: 0xf0001f04, + 0xa348: 0xf0001f04, 0xa349: 0xf0001f04, 0xa34a: 0xf0001f04, + 0xa350: 0xf0000a04, 0xa351: 0xf0000a04, 0xa352: 0xf0000a04, 0xa353: 0xf0000a04, + 0xa354: 0xe00024a3, 0xa355: 0xf0000a04, 0xa356: 0xf0000a04, 0xa357: 0xe00024ab, + 0xa358: 0xe00024b3, 0xa359: 0xf0000a04, 0xa35a: 0xe00024bb, 0xa35b: 0xe0002c1a, + 0xa35c: 0xe0002c22, 0xa35d: 0xe0002c2a, 0xa35e: 0xe00024c3, 0xa35f: 0xe0002c32, + 0xa360: 0xf0000a04, 0xa361: 0xf0000a04, 0xa362: 0xf0000a04, 0xa363: 0xf0000a04, + 0xa364: 0xe0002c3a, 0xa365: 0xf0000a04, 0xa366: 0xe0002c4a, 0xa367: 0xf0000a04, + 0xa368: 0xf0000a04, 0xa369: 0xf0000a04, 0xa36a: 0xf0000a04, 0xa36b: 0x002c3a8c, + 0xa36c: 0x002f7a8c, 0xa36d: 0xf0000c0c, 0xa36e: 0xe00035e8, + 0xa370: 0x002bde9d, 0xa371: 0x002c0a9d, 0xa372: 0x002c3a9d, 0xa373: 0x002c629d, + 0xa374: 0x002c989d, 0xa375: 0x002d089d, 0xa376: 0x002d229d, 0xa377: 0x002d689d, + 0xa378: 0x002d9a9d, 0xa379: 0x002dcc9d, 0xa37a: 0x002dfe9d, 0xa37b: 0x002e229d, + 0xa37c: 0x002e829d, 0xa37d: 0x002e9e9d, 0xa37e: 0x002ee29d, 0xa37f: 0x002f2c9d, + // Block 0x28e, offset 0xa380 + 0xa380: 0x002f569d, 0xa381: 0x002f7a9d, 0xa382: 0x002fe69d, 0xa383: 0x00302c9d, + 0xa384: 0x00306c9d, 0xa385: 0x0030be9d, 0xa386: 0x0030e29d, 0xa387: 0x0030f69d, + 0xa388: 0x0031009d, 0xa389: 0x00312a9d, 0xa38a: 0xe00027cb, 0xa38b: 0xe00035ac, + 0xa38c: 0xf0001d1d, 0xa38d: 0xf0001d1d, 0xa38e: 0xe0000ebc, 0xa38f: 0xe00035e5, + 0xa390: 0x002bde8c, 0xa391: 0x002c0a8c, 0xa392: 0x002c3a8c, 0xa393: 0x002c628c, + 0xa394: 0x002c988c, 0xa395: 0x002d088c, 0xa396: 0x002d228c, 0xa397: 0x002d688c, + 0xa398: 0x002d9a8c, 0xa399: 0x002dcc8c, 0xa39a: 0x002dfe8c, 0xa39b: 0x002e228c, + 0xa39c: 0x002e828c, 0xa39d: 0x002e9e8c, 0xa39e: 0x002ee28c, 0xa39f: 0x002f2c8c, + 0xa3a0: 0x002f568c, 0xa3a1: 0x002f7a8c, 0xa3a2: 0x002fe68c, 0xa3a3: 0x00302c8c, + 0xa3a4: 0x00306c8c, 0xa3a5: 0x0030be8c, 0xa3a6: 0x0030e28c, 0xa3a7: 0x0030f68c, + 0xa3a8: 0x0031008c, 0xa3a9: 0x00312a8c, 0xa3aa: 0xe0003597, 0xa3ab: 0xe000359a, + 0xa3b0: 0x002bde9d, 0xa3b1: 0x002c0a9d, 0xa3b2: 0x002c3a9d, 0xa3b3: 0x002c629d, + 0xa3b4: 0x002c989d, 0xa3b5: 0x002d089d, 0xa3b6: 0x002d229d, 0xa3b7: 0x002d689d, + 0xa3b8: 0x002d9a9d, 0xa3b9: 0x002dcc9d, 0xa3ba: 0x002dfe9d, 0xa3bb: 0x002e229d, + 0xa3bc: 0x002e829d, 0xa3bd: 0x002e9e9d, 0xa3be: 0x002ee29d, 0xa3bf: 0x002f2c9d, + // Block 0x28f, offset 0xa3c0 + 0xa3c0: 0x40055620, 0xa3c1: 0xa1809102, 0xa3c2: 0xa1909002, 0xa3c3: 0x40055820, + 0xa3c4: 0xae600000, 0xa3c5: 0xadc00000, 0xa3c6: 0x40055a20, 0xa3c7: 0xa1208d02, + 0xa3d0: 0x40389020, 0xa3d1: 0x40389220, 0xa3d2: 0x40389420, 0xa3d3: 0x40389620, + 0xa3d4: 0x40389820, 0xa3d5: 0x40389a20, 0xa3d6: 0x40389c20, 0xa3d7: 0x40389e20, + 0xa3d8: 0x4038a020, 0xa3d9: 0x4038a220, 0xa3da: 0x0038a499, 0xa3db: 0x4038a420, + 0xa3dc: 0x4038a620, 0xa3dd: 0x0038a899, 0xa3de: 0x4038a820, 0xa3df: 0x0038aa99, + 0xa3e0: 0x4038aa20, 0xa3e1: 0x4038ac20, 0xa3e2: 0x4038ae20, 0xa3e3: 0x0038b099, + 0xa3e4: 0x4038b020, 0xa3e5: 0x0038b299, 0xa3e6: 0x4038b220, 0xa3e7: 0x4038b420, + 0xa3e8: 0x4038b620, 0xa3e9: 0x4038b820, 0xa3ea: 0x4038ba20, + 0xa3f0: 0xe00014ff, 0xa3f1: 0xe0001502, 0xa3f2: 0xe0001511, 0xa3f3: 0x4003d21f, + 0xa3f4: 0x4003e01f, + // Block 0x290, offset 0xa400 + 0xa400: 0xa000f202, 0xa401: 0x403fba21, 0xa402: 0x403fba20, 0xa403: 0x403fbc20, + 0xa404: 0x403fbc20, 0xa405: 0x403fbe20, 0xa406: 0x403fc020, 0xa407: 0x403fcc20, + 0xa408: 0x403fce20, 0xa409: 0x403fd020, 0xa40a: 0x403fd220, 0xa40b: 0x403fd420, + 0xa40c: 0x403fd820, 0xa40d: 0x403fdc20, 0xa40e: 0x403fde20, 0xa40f: 0x403fe020, + 0xa410: 0x403fe220, 0xa411: 0x403fe420, 0xa412: 0x403fe620, 0xa413: 0x403fe820, + 0xa414: 0x403fea20, 0xa415: 0x403fec20, 0xa416: 0x403fee20, 0xa417: 0x403ff020, + 0xa418: 0x403ff420, 0xa419: 0x403ff620, 0xa41a: 0x403ff820, 0xa41b: 0x403ffa20, + 0xa41c: 0x403ffc20, 0xa41d: 0x40400220, 0xa41e: 0x40400420, 0xa41f: 0x40400620, + 0xa420: 0x40400820, 0xa421: 0x40400a20, 0xa422: 0x40400e20, 0xa423: 0x40401020, + 0xa424: 0x40401220, 0xa425: 0x40401420, 0xa426: 0x40401620, 0xa427: 0x40401820, + 0xa428: 0x40401a20, 0xa429: 0xe0001830, 0xa42a: 0x40401c20, 0xa42b: 0x40401e20, + 0xa42c: 0x40402020, 0xa42d: 0x40402420, 0xa42e: 0x40402620, 0xa42f: 0x40402820, + 0xa430: 0x40402c20, 0xa431: 0xe0001839, 0xa432: 0x40402e20, 0xa433: 0x40403020, + 0xa434: 0xe000183c, 0xa435: 0x40403220, 0xa436: 0x40403420, 0xa437: 0x40403620, + 0xa438: 0x40403820, 0xa439: 0x40403a20, 0xa43a: 0x40404c20, 0xa43b: 0x40404e20, + 0xa43c: 0xa070f102, 0xa43d: 0x40403c20, 0xa43e: 0x40404a20, 0xa43f: 0x40405620, + // Block 0x291, offset 0xa440 + 0xa440: 0xa0000000, 0xa441: 0xa0000000, 0xa442: 0xa0000000, 0xa443: 0xa0000000, + 0xa444: 0xa0000000, 0xa445: 0xa0000000, 0xa446: 0xa0000000, 0xa447: 0xa0000000, + 0xa448: 0xa0000000, 0xa449: 0x40020020, 0xa44a: 0x40020220, 0xa44b: 0x40020420, + 0xa44c: 0x40020620, 0xa44d: 0x40020820, 0xa44e: 0xa0000000, 0xa44f: 0xa0000000, + 0xa450: 0xa0000000, 0xa451: 0xa0000000, 0xa452: 0xa0000000, 0xa453: 0xa0000000, + 0xa454: 0xa0000000, 0xa455: 0xa0000000, 0xa456: 0xa0000000, 0xa457: 0xa0000000, + 0xa458: 0xa0000000, 0xa459: 0xa0000000, 0xa45a: 0xa0000000, 0xa45b: 0xa0000000, + 0xa45c: 0xa0000000, 0xa45d: 0xa0000000, 0xa45e: 0xa0000000, 0xa45f: 0xa0000000, + 0xa460: 0x40021220, 0xa461: 0x4002ba20, 0xa462: 0x4003e020, 0xa463: 0x4004ea20, + 0xa464: 0x4027de20, 0xa465: 0x4004ec20, 0xa466: 0x4004e620, 0xa467: 0x4003d220, + 0xa468: 0x4003f420, 0xa469: 0x4003f620, 0xa46a: 0x4004d820, 0xa46b: 0x40093820, + 0xa46c: 0x40024020, 0xa46d: 0x40021a20, 0xa46e: 0x4002e420, 0xa46f: 0x4004e220, + 0xa470: 0x4029cc20, 0xa471: 0x4029ce20, 0xa472: 0x4029d020, 0xa473: 0x4029d220, + 0xa474: 0x4029d420, 0xa475: 0x4029d620, 0xa476: 0x4029d820, 0xa477: 0x4029da20, + 0xa478: 0x4029dc20, 0xa479: 0x4029de20, 0xa47a: 0x40026c20, 0xa47b: 0x40026220, + 0xa47c: 0x40094020, 0xa47d: 0x40094220, 0xa47e: 0x40094420, 0xa47f: 0x4002c420, + // Block 0x292, offset 0xa480 + 0xa480: 0x4004d620, 0xa481: 0x002bde88, 0xa482: 0x002c0a88, 0xa483: 0xc59b2891, + 0xa484: 0xc5a12913, 0xa485: 0x002c9888, 0xa486: 0x002d0888, 0xa487: 0x002d2288, + 0xa488: 0x002d6888, 0xa489: 0x002d9a88, 0xa48a: 0x002dcc88, 0xa48b: 0x002dfe88, + 0xa48c: 0xc5a629e4, 0xa48d: 0x002e8288, 0xa48e: 0xc5ab2a52, 0xa48f: 0x002ee288, + 0xa490: 0x002f2c88, 0xa491: 0x002f5688, 0xa492: 0x002f7a88, 0xa493: 0xc3430991, + 0xa494: 0x00302c88, 0xa495: 0x00306c88, 0xa496: 0x0030be88, 0xa497: 0x0030e288, + 0xa498: 0x0030f688, 0xa499: 0x00310088, 0xa49a: 0xc3630991, 0xa49b: 0x4003f820, + 0xa49c: 0x4004e420, 0xa49d: 0x4003fa20, 0xa49e: 0x40062420, 0xa49f: 0x40021620, + 0xa4a0: 0x40061e20, 0xa4a1: 0x402bde20, 0xa4a2: 0x402c0a20, 0xa4a3: 0xc5982891, + 0xa4a4: 0xc59e28c2, 0xa4a5: 0x402c9820, 0xa4a6: 0x402d0820, 0xa4a7: 0x402d2220, + 0xa4a8: 0x402d6820, 0xa4a9: 0x402d9a20, 0xa4aa: 0x402dcc20, 0xa4ab: 0x402dfe20, + 0xa4ac: 0xc3772993, 0xa4ad: 0x402e8220, 0xa4ae: 0xc5332a41, 0xa4af: 0x402ee220, + 0xa4b0: 0x402f2c20, 0xa4b1: 0x402f5620, 0xa4b2: 0x402f7a20, 0xa4b3: 0xc3410991, + 0xa4b4: 0x40302c20, 0xa4b5: 0x40306c20, 0xa4b6: 0x4030be20, 0xa4b7: 0x4030e220, + 0xa4b8: 0x4030f620, 0xa4b9: 0x40310020, 0xa4ba: 0xc3610991, 0xa4bb: 0x4003fc20, + 0xa4bc: 0x40094820, 0xa4bd: 0x4003fe20, 0xa4be: 0x40094c20, 0xa4bf: 0xa0000000, + // Block 0x293, offset 0xa4c0 + 0xa4c0: 0xe0000983, 0xa4c1: 0xe0000980, 0xa4c2: 0xe00008fb, 0xa4c3: 0xe00008f8, + 0xa4c4: 0xe000097d, 0xa4c5: 0xe000097a, 0xa4c6: 0x002c3e83, 0xa4c7: 0x402c3e20, + 0xa4c8: 0xe0000a3e, 0xa4c9: 0xe0000a3b, 0xa4ca: 0xe0000a4a, 0xa4cb: 0xe0000a47, + 0xa4cc: 0x002c3c83, 0xa4cd: 0x402c3c20, 0xa4ce: 0xe0000a86, 0xa4cf: 0xe0000a83, + 0xa4d0: 0x002c6683, 0xa4d1: 0x402c6620, 0xa4d2: 0xe0000b46, 0xa4d3: 0xe0000b43, + 0xa4d4: 0xe0000aee, 0xa4d5: 0xe0000aeb, 0xa4d6: 0xe0000b2c, 0xa4d7: 0xe0000b29, + 0xa4d8: 0xe0000b40, 0xa4d9: 0xe0000b3d, 0xa4da: 0xe0000b1a, 0xa4db: 0xe0000b17, + 0xa4dc: 0xe0000bb8, 0xa4dd: 0xe0000bb5, 0xa4de: 0xe0000bb2, 0xa4df: 0xe0000baf, + 0xa4e0: 0xe0000bc4, 0xa4e1: 0xe0000bc1, 0xa4e2: 0xe0000bca, 0xa4e3: 0xe0000bc7, + 0xa4e4: 0xe0000bee, 0xa4e5: 0xe0000beb, 0xa4e6: 0xe0000c1b, 0xa4e7: 0xe0000c18, + 0xa4e8: 0xe0000c51, 0xa4e9: 0xe0000c4e, 0xa4ea: 0xe0000c60, 0xa4eb: 0xe0000c5d, + 0xa4ec: 0xe0000c31, 0xa4ed: 0xe0000c2e, 0xa4ee: 0xe0000c5a, 0xa4ef: 0xe0000c57, + 0xa4f0: 0xe0000c54, 0xa4f1: 0x402da220, 0xa4f2: 0xf0000a0a, 0xa4f3: 0xf0000404, + 0xa4f4: 0xe0000c8a, 0xa4f5: 0xe0000c87, 0xa4f6: 0xe0000c9f, 0xa4f7: 0xe0000c9c, + 0xa4f8: 0x402f7220, 0xa4f9: 0xe0000ccc, 0xa4fa: 0xe0000cc9, 0xa4fb: 0xe0000cd8, + 0xa4fc: 0xe0000cd5, 0xa4fd: 0xe0000cd2, 0xa4fe: 0xe0000ccf, 0xa4ff: 0xe0000d04, + // Block 0x294, offset 0xa500 + 0xa500: 0xe0000cfe, 0xa501: 0xe0000cf8, 0xa502: 0xe0000cf5, 0xa503: 0xe0000d51, + 0xa504: 0xe0000d4e, 0xa505: 0xe0000d6f, 0xa506: 0xe0000d6c, 0xa507: 0xe0000d5d, + 0xa508: 0xe0000d5a, 0xa509: 0xf0000404, 0xa50a: 0x002eda88, 0xa50b: 0x402eda20, + 0xa50c: 0xe0000e2e, 0xa50d: 0xe0000e2b, 0xa50e: 0xe0000da0, 0xa50f: 0xe0000d9d, + 0xa510: 0xe0000de0, 0xa511: 0xe0000ddd, 0xa512: 0xe0000e93, 0xa513: 0xe0000e8f, + 0xa514: 0xe0000eca, 0xa515: 0xe0000ec7, 0xa516: 0xe0000edc, 0xa517: 0xe0000ed9, + 0xa518: 0xe0000ed0, 0xa519: 0xe0000ecd, 0xa51a: 0xe0000f1f, 0xa51b: 0xe0000f1c, + 0xa51c: 0xe0000f2d, 0xa51d: 0xe0000f2a, 0xa51e: 0xe0000f47, 0xa51f: 0xe0000f44, + 0xa520: 0x002fe883, 0xa521: 0x402fe820, 0xa522: 0xe0000f99, 0xa523: 0xe0000f96, + 0xa524: 0xe0000f8a, 0xa525: 0xe0000f87, 0xa526: 0x00303688, 0xa527: 0x40303620, + 0xa528: 0xe000102b, 0xa529: 0xe0001028, 0xa52a: 0xe000103f, 0xa52b: 0xe000103c, + 0xa52c: 0xe0000fe7, 0xa52d: 0xe0000fe4, 0xa52e: 0xe0000ff9, 0xa52f: 0xe0000ff6, + 0xa530: 0xe0001025, 0xa531: 0xe0001022, 0xa532: 0xe0001039, 0xa533: 0xe0001036, + 0xa534: 0xe00010d8, 0xa535: 0xe00010d5, 0xa536: 0xe000110e, 0xa537: 0xe000110b, + 0xa538: 0xe0001117, 0xa539: 0xe000113b, 0xa53a: 0xe0001138, 0xa53b: 0xe000114d, + 0xa53c: 0xe000114a, 0xa53d: 0x00312c83, 0xa53e: 0x40312c20, 0xa53f: 0xe0000f64, + // Block 0x295, offset 0xa540 + 0xa540: 0x40321220, 0xa541: 0x40321a20, 0xa542: 0x40322220, 0xa543: 0x40322a20, + 0xa544: 0x002c6487, 0xa545: 0x002c6485, 0xa546: 0x002c6483, 0xa547: 0x002e2487, + 0xa548: 0x002e2485, 0xa549: 0x002e2483, 0xa54a: 0x002ea087, 0xa54b: 0x002ea085, + 0xa54c: 0x002ea083, 0xa54d: 0xe0000947, 0xa54e: 0xe0000944, 0xa54f: 0xe0000c3d, + 0xa550: 0xe0000c3a, 0xa551: 0xe0000dcc, 0xa552: 0xe0000dc9, 0xa553: 0xe0000ff3, + 0xa554: 0xe0000ff0, 0xa555: 0xe000101e, 0xa556: 0xe000101a, 0xa557: 0xe0001006, + 0xa558: 0xe0001002, 0xa559: 0xe0001016, 0xa55a: 0xe0001012, 0xa55b: 0xe000100e, + 0xa55c: 0xe000100a, 0xa55d: 0x402cae20, 0xa55e: 0xe0000962, 0xa55f: 0xe000095e, + 0xa560: 0xe0000976, 0xa561: 0xe0000972, 0xa562: 0xe00009f4, 0xa563: 0xe00009ef, + 0xa564: 0x002d3a88, 0xa565: 0x402d3a20, 0xa566: 0xe0000bbe, 0xa567: 0xe0000bbb, + 0xa568: 0xe0000c99, 0xa569: 0xe0000c96, 0xa56a: 0xe0000e20, 0xa56b: 0xe0000e1d, + 0xa56c: 0xe0000e27, 0xa56d: 0xe0000e23, 0xa56e: 0xe0001162, 0xa56f: 0xe000115f, + 0xa570: 0xe0000c8d, 0xa571: 0xf0000a0a, 0xa572: 0xf000040a, 0xa573: 0xf0000404, + 0xa574: 0xe0000bac, 0xa575: 0xe0000ba9, 0xa576: 0x002d7888, 0xa577: 0x00319488, + 0xa578: 0xe0000d57, 0xa579: 0xe0000d54, 0xa57a: 0xe0000954, 0xa57b: 0xe0000950, + 0xa57c: 0xe00009ea, 0xa57d: 0xe00009e5, 0xa57e: 0xe0000e19, 0xa57f: 0xe0000e15, + // Block 0x296, offset 0xa580 + 0xa580: 0xe00009b1, 0xa581: 0xe00009ae, 0xa582: 0xe0000a22, 0xa583: 0xe0000a1f, + 0xa584: 0xe0000a28, 0xa585: 0xe0000a25, 0xa586: 0xe0000a2e, 0xa587: 0xe0000a2b, + 0xa588: 0xe0003c3f, 0xa589: 0xe0003c3c, 0xa58a: 0xe0000a8c, 0xa58b: 0xe0000a89, + 0xa58c: 0xe0000a98, 0xa58d: 0xe0000a95, 0xa58e: 0xe0000aa4, 0xa58f: 0xe0000aa1, + 0xa590: 0xe0000a92, 0xa591: 0xe0000a8f, 0xa592: 0xe0000a9e, 0xa593: 0xe0000a9b, + 0xa594: 0xe0000b55, 0xa595: 0xe0000b51, 0xa596: 0xe0000b4d, 0xa597: 0xe0000b49, + 0xa598: 0xe0000b7c, 0xa599: 0xe0000b79, 0xa59a: 0xe0000b82, 0xa59b: 0xe0000b7f, + 0xa59c: 0xe0000b39, 0xa59d: 0xe0000b35, 0xa59e: 0xe0000b8c, 0xa59f: 0xe0000b89, + 0xa5a0: 0xe0000bd0, 0xa5a1: 0xe0000bcd, 0xa5a2: 0xe0000c00, 0xa5a3: 0xe0000bfd, + 0xa5a4: 0xe0000c0c, 0xa5a5: 0xe0000c09, 0xa5a6: 0xe0000bfa, 0xa5a7: 0xe0000bf7, + 0xa5a8: 0xe0000c06, 0xa5a9: 0xe0000c03, 0xa5aa: 0xe0000c12, 0xa5ab: 0xe0000c0f, + 0xa5ac: 0xe0000c7e, 0xa5ad: 0xe0000c7b, 0xa5ae: 0xe0000c4a, 0xa5af: 0xe0000c46, + 0xa5b0: 0xe0000c93, 0xa5b1: 0xe0000c90, 0xa5b2: 0xe0000cab, 0xa5b3: 0xe0000ca8, + 0xa5b4: 0xe0000cb1, 0xa5b5: 0xe0000cae, 0xa5b6: 0xe0000cde, 0xa5b7: 0xe0000cdb, + 0xa5b8: 0xe0000ce5, 0xa5b9: 0xe0000ce1, 0xa5ba: 0xe0000cf2, 0xa5bb: 0xe0000cef, + 0xa5bc: 0xe0000cec, 0xa5bd: 0xe0000ce9, 0xa5be: 0xe0000d1e, 0xa5bf: 0xe0000d1b, + // Block 0x297, offset 0xa5c0 + 0xa5c0: 0xa0000000, 0xa5c1: 0xa0000000, 0xa5c2: 0xa0000000, 0xa5c3: 0xa0000000, + 0xa5c4: 0xa0000000, 0xa5c5: 0xa0000000, 0xa5c6: 0xa0000000, 0xa5c7: 0xa0000000, + 0xa5c8: 0xa0000000, 0xa5c9: 0x40020020, 0xa5ca: 0x40020220, 0xa5cb: 0x40020420, + 0xa5cc: 0x40020620, 0xa5cd: 0x40020820, 0xa5ce: 0xa0000000, 0xa5cf: 0xa0000000, + 0xa5d0: 0xa0000000, 0xa5d1: 0xa0000000, 0xa5d2: 0xa0000000, 0xa5d3: 0xa0000000, + 0xa5d4: 0xa0000000, 0xa5d5: 0xa0000000, 0xa5d6: 0xa0000000, 0xa5d7: 0xa0000000, + 0xa5d8: 0xa0000000, 0xa5d9: 0xa0000000, 0xa5da: 0xa0000000, 0xa5db: 0xa0000000, + 0xa5dc: 0xa0000000, 0xa5dd: 0xa0000000, 0xa5de: 0xa0000000, 0xa5df: 0xa0000000, + 0xa5e0: 0x40021220, 0xa5e1: 0x4002ba20, 0xa5e2: 0x4003e020, 0xa5e3: 0x4004ea20, + 0xa5e4: 0x4027de20, 0xa5e5: 0x4004ec20, 0xa5e6: 0x4004e620, 0xa5e7: 0x4003d220, + 0xa5e8: 0x4003f420, 0xa5e9: 0x4003f620, 0xa5ea: 0x4004d820, 0xa5eb: 0x40093820, + 0xa5ec: 0x40024020, 0xa5ed: 0x40021a20, 0xa5ee: 0x4002e420, 0xa5ef: 0x4004e220, + 0xa5f0: 0x4029cc20, 0xa5f1: 0x4029ce20, 0xa5f2: 0x4029d020, 0xa5f3: 0x4029d220, + 0xa5f4: 0x4029d420, 0xa5f5: 0x4029d620, 0xa5f6: 0x4029d820, 0xa5f7: 0x4029da20, + 0xa5f8: 0x4029dc20, 0xa5f9: 0x4029de20, 0xa5fa: 0x40026c20, 0xa5fb: 0x40026220, + 0xa5fc: 0x40094020, 0xa5fd: 0x40094220, 0xa5fe: 0x40094420, 0xa5ff: 0x4002c420, + // Block 0x298, offset 0xa600 + 0xa600: 0x4004d620, 0xa601: 0x002bde88, 0xa602: 0x002c0a88, 0xa603: 0xc5b12aa4, + 0xa604: 0xc5bb2b54, 0xa605: 0x002c9888, 0xa606: 0x002d0888, 0xa607: 0xc5c72c24, + 0xa608: 0x002d6888, 0xa609: 0x002d9a88, 0xa60a: 0x002dcc88, 0xa60b: 0x002dfe88, + 0xa60c: 0xc5d12cf6, 0xa60d: 0x002e8288, 0xa60e: 0xc5db2dc4, 0xa60f: 0xc5e30b21, + 0xa610: 0x002f2c88, 0xa611: 0x002f5688, 0xa612: 0x002f7a88, 0xa613: 0xc5e92e54, + 0xa614: 0xc5f12ee4, 0xa615: 0xc5f90b21, 0xa616: 0x0030be88, 0xa617: 0x0030e288, + 0xa618: 0x0030f688, 0xa619: 0x00310088, 0xa61a: 0xc5ff2f74, 0xa61b: 0x4003f820, + 0xa61c: 0x4004e420, 0xa61d: 0x4003fa20, 0xa61e: 0x40062420, 0xa61f: 0x40021620, + 0xa620: 0x40061e20, 0xa621: 0x402bde20, 0xa622: 0x402c0a20, 0xa623: 0xc5ae2a72, + 0xa624: 0xc5b62b02, 0xa625: 0x402c9820, 0xa626: 0x402d0820, 0xa627: 0xc5c42bf2, + 0xa628: 0x402d6820, 0xa629: 0x402d9a20, 0xa62a: 0x402dcc20, 0xa62b: 0x402dfe20, + 0xa62c: 0xc5cc2c84, 0xa62d: 0x402e8220, 0xa62e: 0xc5d82d92, 0xa62f: 0xc5e00b21, + 0xa630: 0x402f2c20, 0xa631: 0x402f5620, 0xa632: 0x402f7a20, 0xa633: 0xc5e62e22, + 0xa634: 0xc5ee2eb2, 0xa635: 0xc5f60b21, 0xa636: 0x4030be20, 0xa637: 0x4030e220, + 0xa638: 0x4030f620, 0xa639: 0x40310020, 0xa63a: 0xc5fc2f42, 0xa63b: 0x4003fc20, + 0xa63c: 0x40094820, 0xa63d: 0x4003fe20, 0xa63e: 0x40094c20, 0xa63f: 0xa0000000, + // Block 0x299, offset 0xa640 + 0xa640: 0xe00008f5, 0xa641: 0xe00008ef, 0xa642: 0xe0000921, 0xa643: 0xe0000969, + 0xa644: 0xe000095b, 0xa645: 0xe000094d, 0xa646: 0xe00009dd, 0xa647: 0xe0000a53, + 0xa648: 0xe0000ae8, 0xa649: 0xe0000ae2, 0xa64a: 0xe0000af4, 0xa64b: 0xe0000b20, + 0xa64c: 0xe0000c2b, 0xa64d: 0xe0000c25, 0xa64e: 0xe0000c37, 0xa64f: 0xe0000c43, + 0xa650: 0xe0000ab3, 0xa651: 0xe0000d63, 0xa652: 0xe0000d9a, 0xa653: 0xe0000d94, + 0xa654: 0xe0000da6, 0xa655: 0xe0000de6, 0xa656: 0x002ee483, 0xa657: 0x40093e20, + 0xa658: 0xe0000e12, 0xa659: 0xe0000fe1, 0xa65a: 0xe0000fdb, 0xa65b: 0xe0000fed, + 0xa65c: 0x00306e83, 0xa65d: 0xe0001102, 0xa65e: 0x00318888, 0xa65f: 0xe0000f7b, + 0xa660: 0xe00008f2, 0xa661: 0xe00008ec, 0xa662: 0xe000091e, 0xa663: 0xe0000966, + 0xa664: 0xe0000958, 0xa665: 0xe000094a, 0xa666: 0xe00009d5, 0xa667: 0xe0000a4d, + 0xa668: 0xe0000ae5, 0xa669: 0xe0000adf, 0xa66a: 0xe0000af1, 0xa66b: 0xe0000b1d, + 0xa66c: 0xe0000c28, 0xa66d: 0xe0000c22, 0xa66e: 0xe0000c34, 0xa66f: 0xe0000c40, + 0xa670: 0xe0000aad, 0xa671: 0xe0000d60, 0xa672: 0xe0000d97, 0xa673: 0xe0000d91, + 0xa674: 0xe0000da3, 0xa675: 0xe0000de3, 0xa676: 0x402ee420, 0xa677: 0x40093c20, + 0xa678: 0xe0000e0f, 0xa679: 0xe0000fde, 0xa67a: 0xe0000fd8, 0xa67b: 0xe0000fea, + 0xa67c: 0x40306e20, 0xa67d: 0xe00010ff, 0xa67e: 0x40318820, 0xa67f: 0xe0001114, + // Block 0x29a, offset 0xa680 + 0xa680: 0xe0000cfe, 0xa681: 0xe0000cf8, 0xa682: 0xe0000cf5, 0xa683: 0xe0000d51, + 0xa684: 0xe0000d4e, 0xa685: 0xe0000d6f, 0xa686: 0xe0000d6c, 0xa687: 0xe0000d5d, + 0xa688: 0xe0000d5a, 0xa689: 0xf0000404, 0xa68a: 0x002eda88, 0xa68b: 0x402eda20, + 0xa68c: 0xe0000e2e, 0xa68d: 0xe0000e2b, 0xa68e: 0xe0000da0, 0xa68f: 0xe0000d9d, + 0xa690: 0x002ee4a3, 0xa691: 0x402ee421, 0xa692: 0xe0000e93, 0xa693: 0xe0000e8f, + 0xa694: 0xe0000eca, 0xa695: 0xe0000ec7, 0xa696: 0xe0000edc, 0xa697: 0xe0000ed9, + 0xa698: 0xe0000ed0, 0xa699: 0xe0000ecd, 0xa69a: 0xe0000f1f, 0xa69b: 0xe0000f1c, + 0xa69c: 0xe0000f2d, 0xa69d: 0xe0000f2a, 0xa69e: 0xe0000f47, 0xa69f: 0xe0000f44, + 0xa6a0: 0xe0000f33, 0xa6a1: 0xe0000f30, 0xa6a2: 0xe0000f99, 0xa6a3: 0xe0000f96, + 0xa6a4: 0xe0000f8a, 0xa6a5: 0xe0000f87, 0xa6a6: 0x00303688, 0xa6a7: 0x40303620, + 0xa6a8: 0xe000102b, 0xa6a9: 0xe0001028, 0xa6aa: 0xe000103f, 0xa6ab: 0xe000103c, + 0xa6ac: 0xe0000fe7, 0xa6ad: 0xe0000fe4, 0xa6ae: 0xe0000ff9, 0xa6af: 0xe0000ff6, + 0xa6b0: 0x00306ea3, 0xa6b1: 0x40306e21, 0xa6b2: 0xe0001039, 0xa6b3: 0xe0001036, + 0xa6b4: 0xe00010d8, 0xa6b5: 0xe00010d5, 0xa6b6: 0xe000110e, 0xa6b7: 0xe000110b, + 0xa6b8: 0xe0001117, 0xa6b9: 0xe000113b, 0xa6ba: 0xe0001138, 0xa6bb: 0xe000114d, + 0xa6bc: 0xe000114a, 0xa6bd: 0xe0001147, 0xa6be: 0xe0001144, 0xa6bf: 0xe0000f64, + // Block 0x29b, offset 0xa6c0 + 0xa6c0: 0x40321220, 0xa6c1: 0x40321a20, 0xa6c2: 0x40322220, 0xa6c3: 0x40322a20, + 0xa6c4: 0xe0000ad5, 0xa6c5: 0xe0000ad1, 0xa6c6: 0xe0000acd, 0xa6c7: 0xf0000a0a, + 0xa6c8: 0xf000040a, 0xa6c9: 0xf0000404, 0xa6ca: 0xf0000a0a, 0xa6cb: 0xf000040a, + 0xa6cc: 0xf0000404, 0xa6cd: 0xe0000947, 0xa6ce: 0xe0000944, 0xa6cf: 0xe0000c3d, + 0xa6d0: 0xe0000c3a, 0xa6d1: 0xe0000dcc, 0xa6d2: 0xe0000dc9, 0xa6d3: 0xe0000ff3, + 0xa6d4: 0xe0000ff0, 0xa6d5: 0xe0002964, 0xa6d6: 0xe0002961, 0xa6d7: 0xe0002952, + 0xa6d8: 0xe000294f, 0xa6d9: 0xe000295e, 0xa6da: 0xe000295b, 0xa6db: 0xe0002958, + 0xa6dc: 0xe0002955, 0xa6dd: 0x402cae20, 0xa6de: 0xe0000962, 0xa6df: 0xe000095e, + 0xa6e0: 0xe0000976, 0xa6e1: 0xe0000972, 0xa6e2: 0xe00009f4, 0xa6e3: 0xe00009ef, + 0xa6e4: 0x002d3a88, 0xa6e5: 0x402d3a20, 0xa6e6: 0xe0000bbe, 0xa6e7: 0xe0000bbb, + 0xa6e8: 0xe0000c99, 0xa6e9: 0xe0000c96, 0xa6ea: 0xe0000e20, 0xa6eb: 0xe0000e1d, + 0xa6ec: 0xe0000e27, 0xa6ed: 0xe0000e23, 0xa6ee: 0xe0001162, 0xa6ef: 0xe000115f, + 0xa6f0: 0xe0000c8d, 0xa6f1: 0xf0000a0a, 0xa6f2: 0xf000040a, 0xa6f3: 0xf0000404, + 0xa6f4: 0xe0000bac, 0xa6f5: 0xe0000ba9, 0xa6f6: 0x002d7888, 0xa6f7: 0x00319488, + 0xa6f8: 0xe0000d57, 0xa6f9: 0xe0000d54, 0xa6fa: 0xe0000954, 0xa6fb: 0xe0000950, + 0xa6fc: 0xe00009ea, 0xa6fd: 0xe00009e5, 0xa6fe: 0xe0000e19, 0xa6ff: 0xe0000e15, + // Block 0x29c, offset 0xa700 + 0xa700: 0xe000098f, 0xa701: 0xe000098c, 0xa702: 0xe0000995, 0xa703: 0xe0000992, + 0xa704: 0xe0000b62, 0xa705: 0xe0000b5f, 0xa706: 0xe0000b68, 0xa707: 0xe0000b65, + 0xa708: 0xe0000c6c, 0xa709: 0xe0000c69, 0xa70a: 0xe0000c72, 0xa70b: 0xe0000c6f, + 0xa70c: 0xe0000e4a, 0xa70d: 0xe0000e47, 0xa70e: 0xe0000e50, 0xa70f: 0xe0000e4d, + 0xa710: 0xe0000ee8, 0xa711: 0xe0000ee5, 0xa712: 0xe0000eee, 0xa713: 0xe0000eeb, + 0xa714: 0xe0001053, 0xa715: 0xe0001050, 0xa716: 0xe0001059, 0xa717: 0xe0001056, + 0xa718: 0xe0000f61, 0xa719: 0xe0000f5e, 0xa71a: 0xe0000fa5, 0xa71b: 0xe0000fa2, + 0xa71c: 0x00312288, 0xa71d: 0x40312220, 0xa71e: 0xe0000bf4, 0xa71f: 0xe0000bf1, + 0xa720: 0x002ebc88, 0xa721: 0x402c8c20, 0xa722: 0x002f2288, 0xa723: 0x402f2220, + 0xa724: 0x00314088, 0xa725: 0x40314020, 0xa726: 0xe000096f, 0xa727: 0xe000096c, + 0xa728: 0xe0000b32, 0xa729: 0xe0000b2f, 0xa72a: 0xe000294c, 0xa72b: 0xe0002949, + 0xa72c: 0xe0000dfd, 0xa72d: 0xe0000df9, 0xa72e: 0xe0000e04, 0xa72f: 0xe0000e01, + 0xa730: 0xe0000e0b, 0xa731: 0xe0000e07, 0xa732: 0xe0001129, 0xa733: 0xe0001126, + 0xa734: 0x402e5e20, 0xa735: 0x402ed020, 0xa736: 0x40305a20, 0xa737: 0x402dd420, + 0xa738: 0xe0000abf, 0xa739: 0xe0000ec4, 0xa73a: 0x002be888, 0xa73b: 0x002c4488, + 0xa73c: 0x402c4420, 0xa73d: 0x002e3888, 0xa73e: 0x00303e88, 0xa73f: 0x402ffc20, + // Block 0x29d, offset 0xa740 + 0xa740: 0x00339288, 0xa741: 0x40339220, 0xa742: 0x0033a088, 0xa743: 0x4033a020, + 0xa744: 0x0033ee88, 0xa745: 0x4033ee20, 0xa746: 0x00341088, 0xa747: 0x40341020, + 0xa748: 0x0034a488, 0xa749: 0x4034a420, 0xa74a: 0x0034ec88, 0xa74b: 0x4034ec20, + 0xa74c: 0x00354288, 0xa74d: 0x40354220, 0xa74e: 0x00355688, 0xa74f: 0x40355620, + 0xa750: 0x0033f088, 0xa751: 0x4033f020, 0xa752: 0x00349688, 0xa753: 0x40349620, + 0xa754: 0x0034a688, 0xa755: 0x4034a620, 0xa756: 0x00353888, 0xa757: 0x40353820, + 0xa758: 0x0036cc88, 0xa759: 0x4036cc20, 0xa75a: 0x00348288, 0xa75b: 0x40348220, + 0xa75c: 0x00372e88, 0xa75d: 0x40372e20, 0xa75e: 0x00348088, 0xa75f: 0x40348020, + 0xa760: 0x00349888, 0xa761: 0x40349820, 0xa762: 0x0034da88, 0xa763: 0x4034da20, + 0xa764: 0x00351688, 0xa765: 0x40351620, 0xa766: 0x0035dc88, 0xa767: 0x4035dc20, + 0xa771: 0x00384288, 0xa772: 0x00384488, 0xa773: 0x00384688, + 0xa774: 0x00384888, 0xa775: 0xc6042fd1, 0xa776: 0x00384c88, 0xa777: 0x00384e88, + 0xa778: 0x00385088, 0xa779: 0x00385288, 0xa77a: 0x00385488, 0xa77b: 0x00385688, + 0xa77c: 0x00385888, 0xa77d: 0x00385a88, 0xa77e: 0x00385c88, 0xa77f: 0x00385e88, + // Block 0x29e, offset 0xa780 + 0xa780: 0x40388020, 0xa781: 0x40388220, 0xa782: 0x40388420, 0xa783: 0x40388620, + 0xa784: 0x40388820, 0xa785: 0x40388a20, 0xa786: 0x40388c20, 0xa787: 0x40388a20, + 0xa789: 0x40026e20, 0xa78a: 0x40021c20, + 0xa78f: 0x4027e420, + 0xa791: 0xadc00000, 0xa792: 0xae600000, 0xa793: 0xae600000, + 0xa794: 0xae600000, 0xa795: 0xae600000, 0xa796: 0xadc00000, 0xa797: 0xae600000, + 0xa798: 0xae600000, 0xa799: 0xae600000, 0xa79a: 0xade00000, 0xa79b: 0xadc00000, + 0xa79c: 0xae600000, 0xa79d: 0xae600000, 0xa79e: 0xae600000, 0xa79f: 0xae600000, + 0xa7a0: 0xae600000, 0xa7a1: 0xae600000, 0xa7a2: 0xadc00000, 0xa7a3: 0xadc00000, + 0xa7a4: 0xadc00000, 0xa7a5: 0xadc00000, 0xa7a6: 0xadc00000, 0xa7a7: 0xadc00000, + 0xa7a8: 0xae600000, 0xa7a9: 0xae600000, 0xa7aa: 0xadc00000, 0xa7ab: 0xae600000, + 0xa7ac: 0xae600000, 0xa7ad: 0xade00000, 0xa7ae: 0xae400000, 0xa7af: 0xae600000, + 0xa7b0: 0xa0a08502, 0xa7b1: 0xa0b08602, 0xa7b2: 0xa0c08702, 0xa7b3: 0xa0d08802, + 0xa7b4: 0xa0e08902, 0xa7b5: 0xa0f08a02, 0xa7b6: 0xa1008b02, 0xa7b7: 0xa1108c02, + 0xa7b8: 0xa1208d02, 0xa7b9: 0xa1308e02, 0xa7ba: 0xa1308e02, 0xa7bb: 0xa1408f02, + 0xa7bc: 0xa1509202, 0xa7bd: 0xa1600000, 0xa7be: 0x40055420, 0xa7bf: 0xa1709502, + // Block 0x29f, offset 0xa7c0 + 0xa7c0: 0xa0000000, 0xa7c1: 0xa0000000, 0xa7c2: 0xa0000000, 0xa7c3: 0xa0000000, + 0xa7c4: 0xa0000000, 0xa7c5: 0xa0000000, 0xa7c6: 0xa0000000, 0xa7c7: 0xa0000000, + 0xa7c8: 0xa0000000, 0xa7c9: 0x40020020, 0xa7ca: 0x40020220, 0xa7cb: 0x40020420, + 0xa7cc: 0x40020620, 0xa7cd: 0x40020820, 0xa7ce: 0xa0000000, 0xa7cf: 0xa0000000, + 0xa7d0: 0xa0000000, 0xa7d1: 0xa0000000, 0xa7d2: 0xa0000000, 0xa7d3: 0xa0000000, + 0xa7d4: 0xa0000000, 0xa7d5: 0xa0000000, 0xa7d6: 0xa0000000, 0xa7d7: 0xa0000000, + 0xa7d8: 0xa0000000, 0xa7d9: 0xa0000000, 0xa7da: 0xa0000000, 0xa7db: 0xa0000000, + 0xa7dc: 0xa0000000, 0xa7dd: 0xa0000000, 0xa7de: 0xa0000000, 0xa7df: 0xa0000000, + 0xa7e0: 0x40021220, 0xa7e1: 0x4002ba20, 0xa7e2: 0x4003e020, 0xa7e3: 0x4004ea20, + 0xa7e4: 0x4027de20, 0xa7e5: 0x4004ec20, 0xa7e6: 0x4004e620, 0xa7e7: 0x4003d220, + 0xa7e8: 0x4003f420, 0xa7e9: 0x4003f620, 0xa7ea: 0x4004d820, 0xa7eb: 0x40093820, + 0xa7ec: 0x40024020, 0xa7ed: 0x40021a20, 0xa7ee: 0x4002e420, 0xa7ef: 0x4004e220, + 0xa7f0: 0x4029cc20, 0xa7f1: 0x4029ce20, 0xa7f2: 0x4029d020, 0xa7f3: 0x4029d220, + 0xa7f4: 0x4029d420, 0xa7f5: 0x4029d620, 0xa7f6: 0x4029d820, 0xa7f7: 0x4029da20, + 0xa7f8: 0x4029dc20, 0xa7f9: 0x4029de20, 0xa7fa: 0x40026c20, 0xa7fb: 0x40026220, + 0xa7fc: 0x40094020, 0xa7fd: 0x40094220, 0xa7fe: 0x40094420, 0xa7ff: 0x4002c420, + // Block 0x2a0, offset 0xa800 + 0xa800: 0x4004d620, 0xa801: 0x002bde88, 0xa802: 0x002c0a88, 0xa803: 0xc60809c2, + 0xa804: 0x002c6288, 0xa805: 0x002c9888, 0xa806: 0x002d0888, 0xa807: 0xc60f3026, + 0xa808: 0x002d6888, 0xa809: 0xc6183081, 0xa80a: 0x002dcc88, 0xa80b: 0xc61d30c4, + 0xa80c: 0xc0030002, 0xa80d: 0x002e8288, 0xa80e: 0xc6263145, 0xa80f: 0xc33f3081, + 0xa810: 0x002f2c88, 0xa811: 0x002f5688, 0xa812: 0x002f7a88, 0xa813: 0xc58909c2, + 0xa814: 0x00302c88, 0xa815: 0xc3473081, 0xa816: 0x0030be88, 0xa817: 0x0030e288, + 0xa818: 0x0030f688, 0xa819: 0x00310088, 0xa81a: 0x00312a88, 0xa81b: 0x4003f820, + 0xa81c: 0x4004e420, 0xa81d: 0x4003fa20, 0xa81e: 0x40062420, 0xa81f: 0x40021620, + 0xa820: 0x40061e20, 0xa821: 0x402bde20, 0xa822: 0x402c0a20, 0xa823: 0xc60609b1, + 0xa824: 0x402c6220, 0xa825: 0x402c9820, 0xa826: 0x402d0820, 0xa827: 0xc60b2ff3, + 0xa828: 0x402d6820, 0xa829: 0xc6163081, 0xa82a: 0x402dcc20, 0xa82b: 0xc61a30a2, + 0xa82c: 0xc0000002, 0xa82d: 0x402e8220, 0xa82e: 0xc6223103, 0xa82f: 0xc33d3081, + 0xa830: 0x402f2c20, 0xa831: 0x402f5620, 0xa832: 0x402f7a20, 0xa833: 0xc34109b1, + 0xa834: 0x40302c20, 0xa835: 0xc3453081, 0xa836: 0x4030be20, 0xa837: 0x4030e220, + 0xa838: 0x4030f620, 0xa839: 0x40310020, 0xa83a: 0x40312a20, 0xa83b: 0x4003fc20, + 0xa83c: 0x40094820, 0xa83d: 0x4003fe20, 0xa83e: 0x40094c20, 0xa83f: 0xa0000000, + // Block 0x2a1, offset 0xa840 + 0xa840: 0xe0000d24, 0xa841: 0xe0000d21, 0xa842: 0xe0000d2a, 0xa843: 0xe0000d27, + 0xa844: 0x002ea083, 0xa845: 0x402ea020, 0xa846: 0xe0000d7b, 0xa847: 0xe0000d78, + 0xa848: 0xe0000d87, 0xa849: 0xe0000d84, 0xa84a: 0xe0000d81, 0xa84b: 0xe0000d7e, + 0xa84c: 0xe0000ded, 0xa84d: 0xe0000de9, 0xa84e: 0xe0000df5, 0xa84f: 0xe0000df1, + 0xa850: 0xe0000e3d, 0xa851: 0xe0000e39, 0xa852: 0xe0000e35, 0xa853: 0xe0000e31, + 0xa854: 0xe0000ea7, 0xa855: 0xe0000ea4, 0xa856: 0xe0000ead, 0xa857: 0xe0000eaa, + 0xa858: 0xe0000ed6, 0xa859: 0xe0000ed3, 0xa85a: 0xe0000ef4, 0xa85b: 0xe0000ef1, + 0xa85c: 0xe0000efb, 0xa85d: 0xe0000ef7, 0xa85e: 0xe0000f02, 0xa85f: 0xe0000eff, + 0xa860: 0xe0000f41, 0xa861: 0xe0000f3e, 0xa862: 0xe0000f53, 0xa863: 0xe0000f50, + 0xa864: 0xe0000f26, 0xa865: 0xe0000f22, 0xa866: 0xe0000f3a, 0xa867: 0xe0000f36, + 0xa868: 0xe0000f5a, 0xa869: 0xe0000f56, 0xa86a: 0xe0000f93, 0xa86b: 0xe0000f90, + 0xa86c: 0xe0000f9f, 0xa86d: 0xe0000f9c, 0xa86e: 0xe0000fb1, 0xa86f: 0xe0000fae, + 0xa870: 0xe0000fab, 0xa871: 0xe0000fa8, 0xa872: 0xe0001093, 0xa873: 0xe0001090, + 0xa874: 0xe000109f, 0xa875: 0xe000109c, 0xa876: 0xe0001099, 0xa877: 0xe0001096, + 0xa878: 0xe0001032, 0xa879: 0xe000102e, 0xa87a: 0xe0001046, 0xa87b: 0xe0001042, + 0xa87c: 0xe00010a9, 0xa87d: 0xe00010a6, 0xa87e: 0xe00010af, 0xa87f: 0xe00010ac, + // Block 0x2a2, offset 0xa880 + 0xa880: 0xe0000b03, 0xa881: 0xe0000aff, 0xa882: 0xe0000b13, 0xa883: 0xe0000b0f, + 0xa884: 0xe0000b0b, 0xa885: 0xe0000b07, 0xa886: 0xe0000b75, 0xa887: 0xe0000b71, + 0xa888: 0xe0000c66, 0xa889: 0xe0000c63, 0xa88a: 0x002d9c83, 0xa88b: 0x402d9c20, + 0xa88c: 0x002ee483, 0xa88d: 0x402ee420, 0xa88e: 0xe0000e44, 0xa88f: 0xe0000e41, + 0xa890: 0xe0000dad, 0xa891: 0xe0000da9, 0xa892: 0xe0000db5, 0xa893: 0xe0000db1, + 0xa894: 0xe0000dc5, 0xa895: 0xe0000dc1, 0xa896: 0xe0000dbd, 0xa897: 0xe0000db9, + 0xa898: 0xe0003c96, 0xa899: 0xe0003c93, 0xa89a: 0xe0000e5d, 0xa89b: 0xe0000e59, + 0xa89c: 0xe0000e65, 0xa89d: 0xe0000e61, 0xa89e: 0xe0000e75, 0xa89f: 0xe0000e71, + 0xa8a0: 0xe0000e6d, 0xa8a1: 0xe0000e69, 0xa8a2: 0xe0003c9c, 0xa8a3: 0xe0003c99, + 0xa8a4: 0x00306e83, 0xa8a5: 0x40306e20, 0xa8a6: 0xe000104d, 0xa8a7: 0xe000104a, + 0xa8a8: 0xe0001066, 0xa8a9: 0xe0001062, 0xa8aa: 0xe000106e, 0xa8ab: 0xe000106a, + 0xa8ac: 0xe000107e, 0xa8ad: 0xe000107a, 0xa8ae: 0xe0001076, 0xa8af: 0xe0001072, + 0xa8b0: 0xe0003ca2, 0xa8b1: 0xe0003c9f, 0xa8b2: 0xe0001108, 0xa8b3: 0xe0001105, + 0xa8b4: 0xe0001135, 0xa8b5: 0xe0001132, 0xa8b6: 0xe000112f, 0xa8b7: 0xe000112c, + 0xa8b8: 0xe000111d, 0xa8b9: 0xe000111a, 0xa8ba: 0xe0000d0a, 0xa8bb: 0xe0000d07, + 0xa8bc: 0x0030d888, 0xa8bd: 0x4030d820, 0xa8be: 0x00312088, 0xa8bf: 0x40312020, + // Block 0x2a3, offset 0xa8c0 + 0xa8c0: 0xa0000000, 0xa8c1: 0xa0000000, 0xa8c2: 0xa0000000, 0xa8c3: 0xa0000000, + 0xa8c4: 0xa0000000, 0xa8c5: 0xa0000000, 0xa8c6: 0xa0000000, 0xa8c7: 0xa0000000, + 0xa8c8: 0xa0000000, 0xa8c9: 0x40020020, 0xa8ca: 0x40020220, 0xa8cb: 0x40020420, + 0xa8cc: 0x40020620, 0xa8cd: 0x40020820, 0xa8ce: 0xa0000000, 0xa8cf: 0xa0000000, + 0xa8d0: 0xa0000000, 0xa8d1: 0xa0000000, 0xa8d2: 0xa0000000, 0xa8d3: 0xa0000000, + 0xa8d4: 0xa0000000, 0xa8d5: 0xa0000000, 0xa8d6: 0xa0000000, 0xa8d7: 0xa0000000, + 0xa8d8: 0xa0000000, 0xa8d9: 0xa0000000, 0xa8da: 0xa0000000, 0xa8db: 0xa0000000, + 0xa8dc: 0xa0000000, 0xa8dd: 0xa0000000, 0xa8de: 0xa0000000, 0xa8df: 0xa0000000, + 0xa8e0: 0x40021220, 0xa8e1: 0x4002ba20, 0xa8e2: 0x4003e020, 0xa8e3: 0x4004ea20, + 0xa8e4: 0x4027de20, 0xa8e5: 0x4004ec20, 0xa8e6: 0x4004e620, 0xa8e7: 0x4003d220, + 0xa8e8: 0x4003f420, 0xa8e9: 0x4003f620, 0xa8ea: 0x4004d820, 0xa8eb: 0x40093820, + 0xa8ec: 0x40024020, 0xa8ed: 0x40021a20, 0xa8ee: 0x4002e420, 0xa8ef: 0x4004e220, + 0xa8f0: 0x4029cc20, 0xa8f1: 0x4029ce20, 0xa8f2: 0x4029d020, 0xa8f3: 0x4029d220, + 0xa8f4: 0x4029d420, 0xa8f5: 0x4029d620, 0xa8f6: 0x4029d820, 0xa8f7: 0x4029da20, + 0xa8f8: 0x4029dc20, 0xa8f9: 0x4029de20, 0xa8fa: 0x40026c20, 0xa8fb: 0x40026220, + 0xa8fc: 0x40094020, 0xa8fd: 0x40094220, 0xa8fe: 0x40094420, 0xa8ff: 0x4002c420, + // Block 0x2a4, offset 0xa900 + 0xa900: 0x4004d620, 0xa901: 0xc63031a1, 0xa902: 0x002c0a88, 0xa903: 0x002c3a88, + 0xa904: 0x002c6288, 0xa905: 0xc63631e1, 0xa906: 0x002d0888, 0xa907: 0x002d2288, + 0xa908: 0x002d6888, 0xa909: 0xc63a31e1, 0xa90a: 0x002dcc88, 0xa90b: 0x002dfe88, + 0xa90c: 0xc0030002, 0xa90d: 0x002e8288, 0xa90e: 0x002e9e88, 0xa90f: 0xc63f3201, + 0xa910: 0x002f2c88, 0xa911: 0x002f5688, 0xa912: 0x002f7a88, 0xa913: 0x002fe688, + 0xa914: 0x00302c88, 0xa915: 0xc64431e1, 0xa916: 0x0030be88, 0xa917: 0x0030e288, + 0xa918: 0x0030f688, 0xa919: 0xc64831e1, 0xa91a: 0x00312a88, 0xa91b: 0x4003f820, + 0xa91c: 0x4004e420, 0xa91d: 0x4003fa20, 0xa91e: 0x40062420, 0xa91f: 0x40021620, + 0xa920: 0x40061e20, 0xa921: 0xc62c31a1, 0xa922: 0x402c0a20, 0xa923: 0x402c3a20, + 0xa924: 0x402c6220, 0xa925: 0xc63431e1, 0xa926: 0x402d0820, 0xa927: 0x402d2220, + 0xa928: 0x402d6820, 0xa929: 0xc63831e1, 0xa92a: 0x402dcc20, 0xa92b: 0x402dfe20, + 0xa92c: 0xc0000002, 0xa92d: 0x402e8220, 0xa92e: 0x402e9e20, 0xa92f: 0xc63c3201, + 0xa930: 0x402f2c20, 0xa931: 0x402f5620, 0xa932: 0x402f7a20, 0xa933: 0x402fe620, + 0xa934: 0x40302c20, 0xa935: 0xc64231e1, 0xa936: 0x4030be20, 0xa937: 0x4030e220, + 0xa938: 0x4030f620, 0xa939: 0xc64631e1, 0xa93a: 0x40312a20, 0xa93b: 0x4003fc20, + 0xa93c: 0x40094820, 0xa93d: 0x4003fe20, 0xa93e: 0x40094c20, 0xa93f: 0xa0000000, + // Block 0x2a5, offset 0xa940 + 0xa940: 0xe00008f5, 0xa941: 0x002c0883, 0xa942: 0xe0000921, 0xa943: 0xe0000969, + 0xa944: 0x00320ca3, 0xa945: 0x00321083, 0xa946: 0x00320c83, 0xa947: 0xe0000a53, + 0xa948: 0xe0000ae8, 0xa949: 0x002d0683, 0xa94a: 0xe0000af4, 0xa94b: 0xe0000b20, + 0xa94c: 0xe0000c2b, 0xa94d: 0x002dca83, 0xa94e: 0xe0000c37, 0xa94f: 0xe0000c43, + 0xa950: 0x002c6483, 0xa951: 0xe0000d63, 0xa952: 0xe0000d9a, 0xa953: 0x002f2a83, + 0xa954: 0xe0000da6, 0xa955: 0xe0000de6, 0xa956: 0x00320e83, 0xa957: 0x40093e20, + 0xa958: 0x00320ea3, 0xa959: 0xe0000fe1, 0xa95a: 0x0030bc83, 0xa95b: 0xe0000fed, + 0xa95c: 0xe0000fff, 0xa95d: 0x00312883, 0xa95e: 0x00318888, 0xa95f: 0xe0000f7b, + 0xa960: 0xe00008f2, 0xa961: 0x402c0820, 0xa962: 0xe000091e, 0xa963: 0xe0000966, + 0xa964: 0x40320c21, 0xa965: 0x40321020, 0xa966: 0x40320c20, 0xa967: 0xe0000a4d, + 0xa968: 0xe0000ae5, 0xa969: 0x402d0620, 0xa96a: 0xe0000af1, 0xa96b: 0xe0000b1d, + 0xa96c: 0xe0000c28, 0xa96d: 0x402dca20, 0xa96e: 0xe0000c34, 0xa96f: 0xe0000c40, + 0xa970: 0x402c6420, 0xa971: 0xe0000d60, 0xa972: 0xe0000d97, 0xa973: 0x402f2a20, + 0xa974: 0xe0000da3, 0xa975: 0xe0000de3, 0xa976: 0x40320e20, 0xa977: 0x40093c20, + 0xa978: 0x40320e21, 0xa979: 0xe0000fde, 0xa97a: 0x4030bc20, 0xa97b: 0xe0000fea, + 0xa97c: 0xe0000ffc, 0xa97d: 0x40312820, 0xa97e: 0x40318820, 0xa97f: 0xe0001114, + // Block 0x2a6, offset 0xa980 + 0xa980: 0xe0000983, 0xa981: 0xe0000980, 0xa982: 0xe00008fb, 0xa983: 0xe00008f8, + 0xa984: 0xe000097d, 0xa985: 0xe000097a, 0xa986: 0xe0000a38, 0xa987: 0xe0000a35, + 0xa988: 0xe0000a3e, 0xa989: 0xe0000a3b, 0xa98a: 0xe0000a4a, 0xa98b: 0xe0000a47, + 0xa98c: 0xe0000a44, 0xa98d: 0xe0000a41, 0xa98e: 0xe0000a86, 0xa98f: 0xe0000a83, + 0xa990: 0x002c62a3, 0xa991: 0x402c6221, 0xa992: 0xe0000b46, 0xa993: 0xe0000b43, + 0xa994: 0xe0000aee, 0xa995: 0xe0000aeb, 0xa996: 0xe0000b2c, 0xa997: 0xe0000b29, + 0xa998: 0xe0000b40, 0xa999: 0xe0000b3d, 0xa99a: 0xe0000b1a, 0xa99b: 0xe0000b17, + 0xa99c: 0xe0000bb8, 0xa99d: 0xe0000bb5, 0xa99e: 0xe0000bb2, 0xa99f: 0xe0000baf, + 0xa9a0: 0xe0000bc4, 0xa9a1: 0xe0000bc1, 0xa9a2: 0xe0000bca, 0xa9a3: 0xe0000bc7, + 0xa9a4: 0xe0000bee, 0xa9a5: 0xe0000beb, 0xa9a6: 0xe0000c1b, 0xa9a7: 0xe0000c18, + 0xa9a8: 0xe0000c51, 0xa9a9: 0xe0000c4e, 0xa9aa: 0xe0000c60, 0xa9ab: 0xe0000c5d, + 0xa9ac: 0xe0000c31, 0xa9ad: 0xe0000c2e, 0xa9ae: 0xe0000c5a, 0xa9af: 0xe0000c57, + 0xa9b0: 0xe0000c54, 0xa9b1: 0x402da220, 0xa9b2: 0xf0000a0a, 0xa9b3: 0xf0000404, + 0xa9b4: 0xe0000c8a, 0xa9b5: 0xe0000c87, 0xa9b6: 0xe0000c9f, 0xa9b7: 0xe0000c9c, + 0xa9b8: 0x402f7220, 0xa9b9: 0xe0000ccc, 0xa9ba: 0xe0000cc9, 0xa9bb: 0xe0000cd8, + 0xa9bc: 0xe0000cd5, 0xa9bd: 0xe0000cd2, 0xa9be: 0xe0000ccf, 0xa9bf: 0xe0000d04, + // Block 0x2a7, offset 0xa9c0 + 0xa9c0: 0x40321220, 0xa9c1: 0x40321a20, 0xa9c2: 0x40322220, 0xa9c3: 0x40322a20, + 0xa9c4: 0xe0000ad5, 0xa9c5: 0xe0000ad1, 0xa9c6: 0xe0000acd, 0xa9c7: 0xf0000a0a, + 0xa9c8: 0xf000040a, 0xa9c9: 0xf0000404, 0xa9ca: 0xf0000a0a, 0xa9cb: 0xf000040a, + 0xa9cc: 0xf0000404, 0xa9cd: 0xe0000947, 0xa9ce: 0xe0000944, 0xa9cf: 0xe0000c3d, + 0xa9d0: 0xe0000c3a, 0xa9d1: 0xe0000dcc, 0xa9d2: 0xe0000dc9, 0xa9d3: 0xe0000ff3, + 0xa9d4: 0xe0000ff0, 0xa9d5: 0xe000101e, 0xa9d6: 0xe000101a, 0xa9d7: 0xe0003cde, + 0xa9d8: 0xe0003cdb, 0xa9d9: 0xe0001016, 0xa9da: 0xe0001012, 0xa9db: 0xe000100e, + 0xa9dc: 0xe000100a, 0xa9dd: 0x402cae20, 0xa9de: 0xe000299d, 0xa9df: 0xe000299a, + 0xa9e0: 0xe0000976, 0xa9e1: 0xe0000972, 0xa9e2: 0xe0002997, 0xa9e3: 0xe0002994, + 0xa9e4: 0x002d3a88, 0xa9e5: 0x402d3a20, 0xa9e6: 0xe0000bbe, 0xa9e7: 0xe0000bbb, + 0xa9e8: 0xe0000c99, 0xa9e9: 0xe0000c96, 0xa9ea: 0xe0000e20, 0xa9eb: 0xe0000e1d, + 0xa9ec: 0xe0000e27, 0xa9ed: 0xe0000e23, 0xa9ee: 0xe0001162, 0xa9ef: 0xe000115f, + 0xa9f0: 0xe0000c8d, 0xa9f1: 0xf0000a0a, 0xa9f2: 0xf000040a, 0xa9f3: 0xf0000404, + 0xa9f4: 0xe0000bac, 0xa9f5: 0xe0000ba9, 0xa9f6: 0x002d7888, 0xa9f7: 0x00319488, + 0xa9f8: 0xe0000d57, 0xa9f9: 0xe0000d54, 0xa9fa: 0xe00029b5, 0xa9fb: 0xe00029b2, + 0xa9fc: 0xe0002991, 0xa9fd: 0xe000298e, 0xa9fe: 0xe00037ee, 0xa9ff: 0xe00037eb, + // Block 0x2a8, offset 0xaa00 + 0xaa00: 0xe000098f, 0xaa01: 0xe000098c, 0xaa02: 0xe0000995, 0xaa03: 0xe0000992, + 0xaa04: 0xe0000b62, 0xaa05: 0xe0000b5f, 0xaa06: 0xe0000b68, 0xaa07: 0xe0000b65, + 0xaa08: 0xe0000c6c, 0xaa09: 0xe0000c69, 0xaa0a: 0xe0000c72, 0xaa0b: 0xe0000c6f, + 0xaa0c: 0xe0000e4a, 0xaa0d: 0xe0000e47, 0xaa0e: 0xe0000e50, 0xaa0f: 0xe0000e4d, + 0xaa10: 0xe0000ee8, 0xaa11: 0xe0000ee5, 0xaa12: 0xe0000eee, 0xaa13: 0xe0000eeb, + 0xaa14: 0xe0001053, 0xaa15: 0xe0001050, 0xaa16: 0xe0001059, 0xaa17: 0xe0001056, + 0xaa18: 0xe0000f61, 0xaa19: 0xe0000f5e, 0xaa1a: 0xe0000fa5, 0xaa1b: 0xe0000fa2, + 0xaa1c: 0x00312288, 0xaa1d: 0x40312220, 0xaa1e: 0xe0000bf4, 0xaa1f: 0xe0000bf1, + 0xaa20: 0x002ebc88, 0xaa21: 0x402c8c20, 0xaa22: 0x002f2288, 0xaa23: 0x402f2220, + 0xaa24: 0x00314088, 0xaa25: 0x40314020, 0xaa26: 0xe000096f, 0xaa27: 0xe000096c, + 0xaa28: 0xe0000b32, 0xaa29: 0xe0000b2f, 0xaa2a: 0xe00037e8, 0xaa2b: 0xe00037e5, + 0xaa2c: 0xe0000dfd, 0xaa2d: 0xe0000df9, 0xaa2e: 0xe0000e04, 0xaa2f: 0xe0000e01, + 0xaa30: 0xe0000e0b, 0xaa31: 0xe0000e07, 0xaa32: 0xe0001129, 0xaa33: 0xe0001126, + 0xaa34: 0x402e5e20, 0xaa35: 0x402ed020, 0xaa36: 0x40305a20, 0xaa37: 0x402dd420, + 0xaa38: 0xe0000abf, 0xaa39: 0xe0000ec4, 0xaa3a: 0x002be888, 0xaa3b: 0x002c4488, + 0xaa3c: 0x402c4420, 0xaa3d: 0x002e3888, 0xaa3e: 0x00303e88, 0xaa3f: 0x402ffc20, + // Block 0x2a9, offset 0xaa40 + 0xaa40: 0xe00009b1, 0xaa41: 0xe00009ae, 0xaa42: 0xe0000a22, 0xaa43: 0xe0000a1f, + 0xaa44: 0xe0000a28, 0xaa45: 0xe0000a25, 0xaa46: 0xe0000a2e, 0xaa47: 0xe0000a2b, + 0xaa48: 0xe0000a5a, 0xaa49: 0xe0000a56, 0xaa4a: 0xe0000a8c, 0xaa4b: 0xe0000a89, + 0xaa4c: 0xe0000a98, 0xaa4d: 0xe0000a95, 0xaa4e: 0xe0000aa4, 0xaa4f: 0xe0000aa1, + 0xaa50: 0xe0000a92, 0xaa51: 0xe0000a8f, 0xaa52: 0xe0000a9e, 0xaa53: 0xe0000a9b, + 0xaa54: 0xe0000b55, 0xaa55: 0xe0000b51, 0xaa56: 0xe0003cba, 0xaa57: 0xe0003cb7, + 0xaa58: 0xe0000b7c, 0xaa59: 0xe0000b79, 0xaa5a: 0xe0000b82, 0xaa5b: 0xe0000b7f, + 0xaa5c: 0xe0000b39, 0xaa5d: 0xe0000b35, 0xaa5e: 0xe0000b8c, 0xaa5f: 0xe0000b89, + 0xaa60: 0xe0000bd0, 0xaa61: 0xe0000bcd, 0xaa62: 0xe0000c00, 0xaa63: 0xe0000bfd, + 0xaa64: 0xe0000c0c, 0xaa65: 0xe0000c09, 0xaa66: 0xe0000bfa, 0xaa67: 0xe0000bf7, + 0xaa68: 0xe0000c06, 0xaa69: 0xe0000c03, 0xaa6a: 0xe0000c12, 0xaa6b: 0xe0000c0f, + 0xaa6c: 0xe0000c7e, 0xaa6d: 0xe0000c7b, 0xaa6e: 0xe0003cc0, 0xaa6f: 0xe0003cbd, + 0xaa70: 0xe0000c93, 0xaa71: 0xe0000c90, 0xaa72: 0xe0000cab, 0xaa73: 0xe0000ca8, + 0xaa74: 0xe0000cb1, 0xaa75: 0xe0000cae, 0xaa76: 0xe0000cde, 0xaa77: 0xe0000cdb, + 0xaa78: 0xe0000ce5, 0xaa79: 0xe0000ce1, 0xaa7a: 0xe0000cf2, 0xaa7b: 0xe0000cef, + 0xaa7c: 0xe0000cec, 0xaa7d: 0xe0000ce9, 0xaa7e: 0xe0000d1e, 0xaa7f: 0xe0000d1b, + // Block 0x2aa, offset 0xaa80 + 0xaa80: 0xe0000d24, 0xaa81: 0xe0000d21, 0xaa82: 0xe0000d2a, 0xaa83: 0xe0000d27, + 0xaa84: 0xe0000d69, 0xaa85: 0xe0000d66, 0xaa86: 0xe0000d7b, 0xaa87: 0xe0000d78, + 0xaa88: 0xe0000d87, 0xaa89: 0xe0000d84, 0xaa8a: 0xe0000d81, 0xaa8b: 0xe0000d7e, + 0xaa8c: 0xe0003ccc, 0xaa8d: 0xe0003cc9, 0xaa8e: 0xe0003cf0, 0xaa8f: 0xe0003ced, + 0xaa90: 0xe0000e3d, 0xaa91: 0xe0000e39, 0xaa92: 0xe0003cd2, 0xaa93: 0xe0003ccf, + 0xaa94: 0xe0000ea7, 0xaa95: 0xe0000ea4, 0xaa96: 0xe0000ead, 0xaa97: 0xe0000eaa, + 0xaa98: 0xe0000ed6, 0xaa99: 0xe0000ed3, 0xaa9a: 0xe0000ef4, 0xaa9b: 0xe0000ef1, + 0xaa9c: 0xe0000efb, 0xaa9d: 0xe0000ef7, 0xaa9e: 0xe0000f02, 0xaa9f: 0xe0000eff, + 0xaaa0: 0xe0000f41, 0xaaa1: 0xe0000f3e, 0xaaa2: 0xe0000f53, 0xaaa3: 0xe0000f50, + 0xaaa4: 0xe0000f26, 0xaaa5: 0xe0000f22, 0xaaa6: 0xe0000f3a, 0xaaa7: 0xe0000f36, + 0xaaa8: 0xe0000f5a, 0xaaa9: 0xe0000f56, 0xaaaa: 0xe0000f93, 0xaaab: 0xe0000f90, + 0xaaac: 0xe0000f9f, 0xaaad: 0xe0000f9c, 0xaaae: 0xe0000fb1, 0xaaaf: 0xe0000fae, + 0xaab0: 0xe0000fab, 0xaab1: 0xe0000fa8, 0xaab2: 0xe0001093, 0xaab3: 0xe0001090, + 0xaab4: 0xe000109f, 0xaab5: 0xe000109c, 0xaab6: 0xe0001099, 0xaab7: 0xe0001096, + 0xaab8: 0xe0003ce4, 0xaab9: 0xe0003ce1, 0xaaba: 0xe0001046, 0xaabb: 0xe0001042, + 0xaabc: 0xe00010a9, 0xaabd: 0xe00010a6, 0xaabe: 0xe00010af, 0xaabf: 0xe00010ac, + // Block 0x2ab, offset 0xaac0 + 0xaac0: 0xe00010d2, 0xaac1: 0xe00010cf, 0xaac2: 0xe00010cc, 0xaac3: 0xe00010c9, + 0xaac4: 0xe00010e1, 0xaac5: 0xe00010de, 0xaac6: 0xe00010e7, 0xaac7: 0xe00010e4, + 0xaac8: 0xe00010ed, 0xaac9: 0xe00010ea, 0xaaca: 0xe00010fc, 0xaacb: 0xe00010f9, + 0xaacc: 0xe00010f6, 0xaacd: 0xe00010f3, 0xaace: 0xe0001123, 0xaacf: 0xe0001120, + 0xaad0: 0xe0001141, 0xaad1: 0xe000113e, 0xaad2: 0xe0001153, 0xaad3: 0xe0001150, + 0xaad4: 0xe0001159, 0xaad5: 0xe0001156, 0xaad6: 0xe0000c15, 0xaad7: 0xe0000f8d, + 0xaad8: 0xe00010db, 0xaad9: 0xe0001111, 0xaada: 0xf0000404, 0xaadb: 0xe0000f70, + 0xaadc: 0x40300420, 0xaadd: 0x40300620, 0xaade: 0xe0000f7f, 0xaadf: 0x402c9620, + 0xaae0: 0xe000099b, 0xaae1: 0xe0000998, 0xaae2: 0xe0000989, 0xaae3: 0xe0000986, + 0xaae4: 0xe0003cae, 0xaae5: 0xe0003cab, 0xaae6: 0xe0000930, 0xaae7: 0xe000092c, + 0xaae8: 0xe0000940, 0xaae9: 0xe000093c, 0xaaea: 0xe0000938, 0xaaeb: 0xe0000934, + 0xaaec: 0xe00009aa, 0xaaed: 0xe00009a6, 0xaaee: 0xe0003ca8, 0xaaef: 0xe0003ca5, + 0xaaf0: 0xe000090a, 0xaaf1: 0xe0000906, 0xaaf2: 0xe000091a, 0xaaf3: 0xe0000916, + 0xaaf4: 0xe0000912, 0xaaf5: 0xe000090e, 0xaaf6: 0xe00009a2, 0xaaf7: 0xe000099e, + 0xaaf8: 0xe0000b6e, 0xaaf9: 0xe0000b6b, 0xaafa: 0xe0000b5c, 0xaafb: 0xe0000b59, + 0xaafc: 0xe0000b26, 0xaafd: 0xe0000b23, 0xaafe: 0xe0003cb4, 0xaaff: 0xe0003cb1, + // Block 0x2ac, offset 0xab00 + 0xab00: 0xe0000b03, 0xab01: 0xe0000aff, 0xab02: 0xe0000b13, 0xab03: 0xe0000b0f, + 0xab04: 0xe0000b0b, 0xab05: 0xe0000b07, 0xab06: 0xe0000b75, 0xab07: 0xe0000b71, + 0xab08: 0xe0000c66, 0xab09: 0xe0000c63, 0xab0a: 0xe0000c78, 0xab0b: 0xe0000c75, + 0xab0c: 0xe0000e84, 0xab0d: 0xe0000e81, 0xab0e: 0xe0000e44, 0xab0f: 0xe0000e41, + 0xab10: 0xe0003cc6, 0xab11: 0xe0003cc3, 0xab12: 0xe0000db5, 0xab13: 0xe0000db1, + 0xab14: 0xe0000dc5, 0xab15: 0xe0000dc1, 0xab16: 0xe0000dbd, 0xab17: 0xe0000db9, + 0xab18: 0xe0000e8b, 0xab19: 0xe0000e87, 0xab1a: 0xe0003cd8, 0xab1b: 0xe0003cd5, + 0xab1c: 0xe0000e65, 0xab1d: 0xe0000e61, 0xab1e: 0xe0000e75, 0xab1f: 0xe0000e71, + 0xab20: 0xe0000e6d, 0xab21: 0xe0000e69, 0xab22: 0xe0000e7d, 0xab23: 0xe0000e79, + 0xab24: 0xe000108d, 0xab25: 0xe000108a, 0xab26: 0xe000104d, 0xab27: 0xe000104a, + 0xab28: 0xe0003cea, 0xab29: 0xe0003ce7, 0xab2a: 0xe000106e, 0xab2b: 0xe000106a, + 0xab2c: 0xe000107e, 0xab2d: 0xe000107a, 0xab2e: 0xe0001076, 0xab2f: 0xe0001072, + 0xab30: 0xe0001086, 0xab31: 0xe0001082, 0xab32: 0xe0001108, 0xab33: 0xe0001105, + 0xab34: 0xe0001135, 0xab35: 0xe0001132, 0xab36: 0xe000112f, 0xab37: 0xe000112c, + 0xab38: 0xe000111d, 0xab39: 0xe000111a, 0xab3a: 0xe0000d0a, 0xab3b: 0xe0000d07, + 0xab3c: 0x0030d888, 0xab3d: 0x4030d820, 0xab3e: 0x00312088, 0xab3f: 0x40312020, + // Block 0x2ad, offset 0xab40 + 0xab40: 0x40021220, 0xab41: 0x40025c20, 0xab42: 0x40030420, 0xab43: 0x40051220, + 0xab44: 0x40279a20, 0xab45: 0x4027ca20, 0xab46: 0xe0002206, 0xab47: 0xe00001d3, + 0xab48: 0x40049c20, 0xab49: 0x40049e20, 0xab4a: 0x4004a020, 0xab4b: 0x4004a220, + 0xab4c: 0x4004a420, 0xab4d: 0x4004a620, 0xab4e: 0x4004a820, 0xab4f: 0x4004aa20, + 0xab50: 0x4004ac20, 0xab51: 0x4004ae20, 0xab52: 0x40279c20, 0xab53: 0x40279e20, + 0xab54: 0x4004b020, 0xab55: 0x4004b220, 0xab56: 0x4004b420, 0xab57: 0x4004b620, + 0xab58: 0x4004b820, 0xab59: 0x4004ba20, 0xab5a: 0x4004bc20, 0xab5b: 0x4004be20, + 0xab5c: 0x40023820, 0xab5d: 0x4003ea20, 0xab5e: 0x4003ec20, 0xab5f: 0x4003ee20, + 0xab60: 0x4027a020, 0xab61: 0xe0000267, 0xab62: 0xe000037f, 0xab63: 0xe0000459, + 0xab64: 0xe000052e, 0xab65: 0xe00005f8, 0xab66: 0xe00006c3, 0xab67: 0xe000076b, + 0xab68: 0xe0000817, 0xab69: 0xe00008bc, 0xab6a: 0xada12202, 0xab6b: 0xae412302, + 0xab6c: 0xae812402, 0xab6d: 0xade12502, 0xab6e: 0xae012602, 0xab6f: 0xae012702, + 0xab70: 0x40023a20, 0xab71: 0x4027ce20, 0xab72: 0xe0000152, 0xab73: 0x4027d020, + 0xab74: 0xe0000155, 0xab75: 0x4027d220, 0xab76: 0x00279c84, 0xab77: 0x4027a220, + 0xab78: 0x02a68284, 0xab79: 0x02a68884, 0xab7a: 0x02a68a84, 0xab7b: 0x4027cc20, + 0xab7c: 0xe000231a, 0xab7d: 0x40051420, 0xab7e: 0x4027a420, 0xab7f: 0x4027a620, + // Block 0x2ae, offset 0xab80 + 0xab81: 0xc64a3231, 0xab82: 0xc6503231, 0xab83: 0xc71a3231, + 0xab84: 0xc7203231, 0xab85: 0xc7d83a21, 0xab86: 0xc7e233e1, 0xab87: 0xc8c13231, + 0xab88: 0xc8c73231, 0xab89: 0xc9763231, 0xab8a: 0xc97c3231, 0xab8b: 0xc65c32b1, + 0xab8c: 0xc6693231, 0xab8d: 0xc72633e1, 0xab8e: 0xc73b3671, 0xab8f: 0xc80433e1, + 0xab90: 0xc8193671, 0xab91: 0xc8d332b1, 0xab92: 0xc8e03231, 0xab93: 0xc98233e1, + 0xab94: 0xc9973671, 0xab95: 0xc66f33e1, 0xab96: 0xc6843671, 0xab97: 0xc74833e1, + 0xab98: 0xc75d3671, 0xab99: 0xc82633e1, 0xab9a: 0xc83b3671, 0xab9b: 0xc8e633e1, + 0xab9c: 0xc8fb3671, 0xab9d: 0xc99f33e1, 0xab9e: 0xc9b43671, 0xab9f: 0xc68c33e1, + 0xaba0: 0xc6a13671, 0xaba1: 0xc76533e1, 0xaba2: 0xc77a3671, 0xaba3: 0xc8433a21, + 0xaba4: 0xc84d33e1, 0xaba5: 0xc8623671, 0xaba6: 0xc90333e1, 0xaba7: 0xc9183671, + 0xaba8: 0xc9c133e1, 0xaba9: 0xc9d63671, 0xabaa: 0xc6a93231, 0xabab: 0xc7823231, + 0xabac: 0xc86d3231, 0xabad: 0xc9203231, 0xabae: 0xc9de3231, 0xabaf: 0xc6b436f1, + 0xabb0: 0xc6cf3671, 0xabb1: 0xc6d73671, 0xabb2: 0xc78d36f1, 0xabb3: 0xc7a83671, + 0xabb4: 0xc7b03671, 0xabb5: 0xc87836f1, 0xabb6: 0xc8933671, 0xabb7: 0xc89b3671, + 0xabb8: 0xc92b36f1, 0xabb9: 0xc9463671, 0xabba: 0xc94e3671, 0xabbb: 0xc9e936f1, + 0xabbc: 0xca043671, 0xabbd: 0xca0c3671, 0xabbe: 0xc6df3231, 0xabbf: 0xc7b83231, + // Block 0x2af, offset 0xabc0 + 0xabc0: 0xc8a63231, 0xabc1: 0xc9563231, 0xabc2: 0xca143231, 0xabc3: 0xc6e53231, + 0xabc4: 0xc6eb3231, 0xabc5: 0xc8ac3231, 0xabc6: 0xc8b23231, 0xabc7: 0xca1a3231, + 0xabc8: 0xca203231, 0xabc9: 0xc6f43231, 0xabca: 0xc7c13231, 0xabcb: 0xc8bb3231, + 0xabcc: 0xc95f3231, 0xabcd: 0xca293231, 0xabce: 0xc6fa3a21, 0xabcf: 0xc7043a21, + 0xabd0: 0xc7c73a21, 0xabd1: 0xc9653a21, 0xabd2: 0xca2f3a21, 0xabd3: 0xca453ab1, + 0xabd4: 0xc7f73671, 0xabd5: 0xc6563231, 0xabd6: 0xc8cd3231, + 0xabd9: 0xa0812802, 0xabda: 0xa0812902, 0xabdb: 0x40063c20, + 0xabdc: 0x40063e20, 0xabdd: 0x4027d820, 0xabde: 0xe000015b, 0xabdf: 0xe0004033, + 0xabe0: 0x40023c20, 0xabe1: 0xc64d3281, 0xabe2: 0xc6533281, 0xabe3: 0xc71d3281, + 0xabe4: 0xc7233281, 0xabe5: 0xc7dd3601, 0xabe6: 0xc7ea3501, 0xabe7: 0xc8c43281, + 0xabe8: 0xc8ca3281, 0xabe9: 0xc9793281, 0xabea: 0xc97f3281, 0xabeb: 0xc6613361, + 0xabec: 0xc66c3281, 0xabed: 0xc72e3501, 0xabee: 0xc73f36c1, 0xabef: 0xc80c3501, + 0xabf0: 0xc81d36c1, 0xabf1: 0xc8d83361, 0xabf2: 0xc8e33281, 0xabf3: 0xc98a3501, + 0xabf4: 0xc99b36c1, 0xabf5: 0xc6773501, 0xabf6: 0xc68836c1, 0xabf7: 0xc7503501, + 0xabf8: 0xc76136c1, 0xabf9: 0xc82e3501, 0xabfa: 0xc83f36c1, 0xabfb: 0xc8ee3501, + 0xabfc: 0xc8ff36c1, 0xabfd: 0xc9a73501, 0xabfe: 0xc9b836c1, 0xabff: 0xc6943501, + // Block 0x2b0, offset 0xac00 + 0xac00: 0xc6a536c1, 0xac01: 0xc76d3501, 0xac02: 0xc77e36c1, 0xac03: 0xc8483601, + 0xac04: 0xc8553501, 0xac05: 0xc86636c1, 0xac06: 0xc90b3501, 0xac07: 0xc91c36c1, + 0xac08: 0xc9c93501, 0xac09: 0xc9da36c1, 0xac0a: 0xc6ac3281, 0xac0b: 0xc7853281, + 0xac0c: 0xc8703281, 0xac0d: 0xc9233281, 0xac0e: 0xc9e13281, 0xac0f: 0xc6bf38a1, + 0xac10: 0xc6d336c1, 0xac11: 0xc6db36c1, 0xac12: 0xc79838a1, 0xac13: 0xc7ac36c1, + 0xac14: 0xc7b436c1, 0xac15: 0xc88338a1, 0xac16: 0xc89736c1, 0xac17: 0xc89f36c1, + 0xac18: 0xc93638a1, 0xac19: 0xc94a36c1, 0xac1a: 0xc95236c1, 0xac1b: 0xc9f438a1, + 0xac1c: 0xca0836c1, 0xac1d: 0xca1036c1, 0xac1e: 0xc6e23281, 0xac1f: 0xc7bb3281, + 0xac20: 0xc8a93281, 0xac21: 0xc9593281, 0xac22: 0xca173281, 0xac23: 0xc6e83281, + 0xac24: 0xc6ee3281, 0xac25: 0xc8af3281, 0xac26: 0xc8b53281, 0xac27: 0xca1d3281, + 0xac28: 0xca233281, 0xac29: 0xc6f73281, 0xac2a: 0xc7c43281, 0xac2b: 0xc8be3281, + 0xac2c: 0xc9623281, 0xac2d: 0xca2c3281, 0xac2e: 0xc6ff3601, 0xac2f: 0xc7093501, + 0xac30: 0xc7cc3501, 0xac31: 0xc96a3501, 0xac32: 0xca343501, 0xac33: 0xca453ae1, + 0xac34: 0xc7fb36c1, 0xac35: 0xc6593281, 0xac36: 0xc8d03281, 0xac37: 0xc71636c1, + 0xac38: 0xc7d436c1, 0xac39: 0xc97236c1, 0xac3a: 0xca4136c1, 0xac3b: 0x40023e20, + 0xac3c: 0x4027d620, 0xac3d: 0x4027d820, 0xac3e: 0xe000015b, 0xac3f: 0xe0003eda, + // Block 0x2b1, offset 0xac40 + 0xac45: 0x4065da20, 0xac46: 0x4065dc20, 0xac47: 0x4065de20, + 0xac48: 0x4065e020, 0xac49: 0x4065e420, 0xac4a: 0x4065e620, 0xac4b: 0x4065e820, + 0xac4c: 0x4065ea20, 0xac4d: 0x4065ec20, 0xac4e: 0x4065ee20, 0xac4f: 0x4065f420, + 0xac50: 0x4065f620, 0xac51: 0x4065f820, 0xac52: 0x4065fa20, 0xac53: 0x4065fe20, + 0xac54: 0x40660020, 0xac55: 0x40660220, 0xac56: 0x40660420, 0xac57: 0x40660620, + 0xac58: 0x40660820, 0xac59: 0x40660a20, 0xac5a: 0x40661220, 0xac5b: 0x40661420, + 0xac5c: 0x40661820, 0xac5d: 0x40661a20, 0xac5e: 0x40661e20, 0xac5f: 0x40662020, + 0xac60: 0x40662220, 0xac61: 0x40662420, 0xac62: 0x40662620, 0xac63: 0x40662820, + 0xac64: 0x40662a20, 0xac65: 0x40662e20, 0xac66: 0x40663620, 0xac67: 0x40663820, + 0xac68: 0x40663a20, 0xac69: 0x40663c20, 0xac6a: 0x4065e220, 0xac6b: 0x4065f020, + 0xac6c: 0x4065fc20, 0xac6d: 0x40663e20, + 0xac71: 0x4062ac20, 0xac72: 0x4062ae20, 0xac73: 0x40646820, + 0xac74: 0x4062b020, 0xac75: 0x40646c20, 0xac76: 0x40646e20, 0xac77: 0x4062b220, + 0xac78: 0x4062b420, 0xac79: 0x4062b620, 0xac7a: 0x40647420, 0xac7b: 0x40647620, + 0xac7c: 0x40647820, 0xac7d: 0x40647a20, 0xac7e: 0x40647c20, 0xac7f: 0x40647e20, + // Block 0x2b2, offset 0xac80 + 0xac80: 0x4062e020, 0xac81: 0x4062b820, 0xac82: 0x4062ba20, 0xac83: 0x4062bc20, + 0xac84: 0x4062ee20, 0xac85: 0x4062be20, 0xac86: 0x4062c020, 0xac87: 0x4062c220, + 0xac88: 0x4062c420, 0xac89: 0x4062c620, 0xac8a: 0x4062c820, 0xac8b: 0x4062ca20, + 0xac8c: 0x4062cc20, 0xac8d: 0x4062ce20, 0xac8e: 0x4062d020, 0xac8f: 0x4063a820, + 0xac90: 0x4063aa20, 0xac91: 0x4063ac20, 0xac92: 0x4063ae20, 0xac93: 0x4063b020, + 0xac94: 0x4063b220, 0xac95: 0x4063b420, 0xac96: 0x4063b620, 0xac97: 0x4063b820, + 0xac98: 0x4063ba20, 0xac99: 0x4063bc20, 0xac9a: 0x4063be20, 0xac9b: 0x4063c020, + 0xac9c: 0x4063c220, 0xac9d: 0x4063c420, 0xac9e: 0x4063c620, 0xac9f: 0x4063c820, + 0xaca0: 0x4063ca20, 0xaca1: 0x4063cc20, 0xaca2: 0x4063ce20, 0xaca3: 0x4063d020, + 0xaca4: 0x4063a620, 0xaca5: 0x0062d484, 0xaca6: 0x0062d684, 0xaca7: 0x0064a284, + 0xaca8: 0x0064a484, 0xaca9: 0x0064ac84, 0xacaa: 0x0064b084, 0xacab: 0x0064ba84, + 0xacac: 0x0064c284, 0xacad: 0x0064c684, 0xacae: 0x0062e484, 0xacaf: 0x0064ce84, + 0xacb0: 0x0064d284, 0xacb1: 0x0062e684, 0xacb2: 0x0062e884, 0xacb3: 0x0062ec84, + 0xacb4: 0x0062f084, 0xacb5: 0x0062f284, 0xacb6: 0x0062fa84, 0xacb7: 0x0062fe84, + 0xacb8: 0x00630284, 0xacb9: 0x00630484, 0xacba: 0x00630684, 0xacbb: 0x00630884, + 0xacbc: 0x00630a84, 0xacbd: 0x00631084, 0xacbe: 0x00631884, 0xacbf: 0x00632c84, + // Block 0x2b3, offset 0xacc0 + 0xacc0: 0x40275220, 0xacc1: 0x40275420, 0xacc2: 0x40275620, 0xacc3: 0x40275820, + 0xacc4: 0x40275a20, 0xacc5: 0x40275c20, 0xacc6: 0x40275e20, 0xacc7: 0x40276020, + 0xacc8: 0x40276220, 0xacc9: 0x40276420, 0xacca: 0x40276620, 0xaccb: 0x40276820, + 0xaccc: 0x40276a20, 0xaccd: 0x40276c20, 0xacce: 0x40276e20, 0xaccf: 0x40277020, + 0xacd0: 0x40277220, 0xacd1: 0x40277420, 0xacd2: 0x40277620, 0xacd3: 0x40277820, + 0xacd4: 0x40277a20, 0xacd5: 0x40277c20, 0xacd6: 0x40277e20, 0xacd7: 0x40278020, + 0xacd8: 0x40278220, 0xacd9: 0x40278420, 0xacda: 0x40278620, 0xacdb: 0x40278820, + 0xacdc: 0x40278a20, 0xacdd: 0x40278c20, 0xacde: 0x40278e20, 0xacdf: 0x40279020, + 0xace0: 0x40279220, 0xace1: 0x40279420, 0xace2: 0x40279620, 0xace3: 0x40279820, + 0xacf0: 0xc7ff3601, 0xacf1: 0xc7433601, 0xacf2: 0xc8213601, 0xacf3: 0xc9bc3601, + 0xacf4: 0xc86a3281, 0xacf5: 0xc6af3601, 0xacf6: 0xc7883601, 0xacf7: 0xc8733601, + 0xacf8: 0xc9263601, 0xacf9: 0xc9e43601, 0xacfa: 0xc8a33281, 0xacfb: 0xc6f13281, + 0xacfc: 0xc7be3281, 0xacfd: 0xc8b83281, 0xacfe: 0xc95c3281, 0xacff: 0xca263281, + // Block 0x2b4, offset 0xad00 + 0xad00: 0xf0000404, 0xad01: 0xf0000404, 0xad02: 0xf0000404, 0xad03: 0xf0000404, + 0xad04: 0xf0000404, 0xad05: 0xf0000404, 0xad06: 0xf0000404, 0xad07: 0xf0000404, + 0xad08: 0xf0000404, 0xad09: 0xf0000404, 0xad0a: 0xf0000404, 0xad0b: 0xf0000404, + 0xad0c: 0xf0000404, 0xad0d: 0xf0000404, 0xad0e: 0xe000004c, 0xad0f: 0xe0000051, + 0xad10: 0xe0000056, 0xad11: 0xe000005b, 0xad12: 0xe0000060, 0xad13: 0xe0000065, + 0xad14: 0xe000006a, 0xad15: 0xe000006f, 0xad16: 0xe0000083, 0xad17: 0xe000008d, + 0xad18: 0xe0000092, 0xad19: 0xe0000097, 0xad1a: 0xe000009c, 0xad1b: 0xe00000a1, + 0xad1c: 0xe0000088, 0xad1d: 0xe0000074, 0xad1e: 0xe000007c, + 0xad20: 0xe0002c96, 0xad21: 0xe0002ca6, 0xad22: 0xe0002c9e, 0xad23: 0xe0002cd6, + 0xad24: 0xe0002caa, 0xad25: 0xe0002cbe, 0xad26: 0xe0002c9a, 0xad27: 0xe0002cba, + 0xad28: 0xe0002ca2, 0xad29: 0xe0002cc6, 0xad2a: 0xe0002ce6, 0xad2b: 0xe0002cfa, + 0xad2c: 0xe0002cf6, 0xad2d: 0xe0002cee, 0xad2e: 0xe0002d22, 0xad2f: 0xe0002cda, + 0xad30: 0xe0002ce2, 0xad31: 0xe0002cf2, 0xad32: 0xe0002cea, 0xad33: 0xe0002d06, + 0xad34: 0xe0002cce, 0xad35: 0xe0002cfe, 0xad36: 0xe0002d1a, 0xad37: 0xe0002d0a, + 0xad38: 0xe0002cc2, 0xad39: 0xe0002cae, 0xad3a: 0xe0002cd2, 0xad3b: 0xe0002cde, + 0xad3c: 0xe0002d02, 0xad3d: 0xe0002cb2, 0xad3e: 0xe0002d1e, 0xad3f: 0xe0002cca, + // Block 0x2b5, offset 0xad40 + 0xad40: 0xe0002d0e, 0xad41: 0xe0002cb6, 0xad42: 0xe0002d12, 0xad43: 0xe0002d16, + 0xad44: 0x02aa9e86, 0xad45: 0x02bcf886, 0xad46: 0x02cb0e86, 0xad47: 0x02f71e86, + 0xad48: 0xe00002e3, 0xad49: 0xe00003d8, 0xad4a: 0xe00004b3, 0xad4b: 0xe000057d, + 0xad4c: 0xe0000648, 0xad4d: 0xe00006f0, 0xad4e: 0xe000079c, 0xad4f: 0xe0000841, + 0xad50: 0xe0000ec0, 0xad51: 0xf0000606, 0xad52: 0xf0000606, 0xad53: 0xf0000606, + 0xad54: 0xf0000606, 0xad55: 0xf0000606, 0xad56: 0xf0000606, 0xad57: 0xf0000606, + 0xad58: 0xf0000606, 0xad59: 0xf0000606, 0xad5a: 0xf0000606, 0xad5b: 0xf0000606, + 0xad5c: 0xf0000606, 0xad5d: 0xf0000606, 0xad5e: 0xf0000606, 0xad5f: 0xf0000606, + 0xad60: 0x0062ac86, 0xad61: 0x0062b086, 0xad62: 0x0062b286, 0xad63: 0x0062b686, + 0xad64: 0x0062b886, 0xad65: 0x0062ba86, 0xad66: 0x0062be86, 0xad67: 0x0062c286, + 0xad68: 0x0062c486, 0xad69: 0x0062c886, 0xad6a: 0x0062ca86, 0xad6b: 0x0062cc86, + 0xad6c: 0x0062ce86, 0xad6d: 0x0062d086, 0xad6e: 0xf0000606, 0xad6f: 0xf0000606, + 0xad70: 0xf0000606, 0xad71: 0xf0000606, 0xad72: 0xf0000606, 0xad73: 0xf0000606, + 0xad74: 0xf0000606, 0xad75: 0xf0000606, 0xad76: 0xf0000606, 0xad77: 0xf0000606, + 0xad78: 0xf0000606, 0xad79: 0xf0000606, 0xad7a: 0xf0000606, 0xad7b: 0xf0000606, + 0xad7c: 0xe0002127, 0xad7d: 0xe0002122, 0xad7e: 0xf0000606, 0xad7f: 0x4027ac20, + // Block 0x2b6, offset 0xad80 + 0xad80: 0xe0002dea, 0xad81: 0xe0002e57, 0xad82: 0xe0002e8c, 0xad83: 0xe0002eb9, + 0xad84: 0xe0002ecb, 0xad85: 0xe0002eda, 0xad86: 0xe0002ee9, 0xad87: 0xe0002ef8, + 0xad88: 0xe0002f07, 0xad89: 0xe0002d50, 0xad8a: 0xe0002d63, 0xad8b: 0xe0002d76, + 0xad8c: 0xf0001c1d, 0xad8d: 0xe0000b85, 0xad8e: 0xf0001d1c, 0xad8f: 0xe0000d14, + 0xad90: 0x00657693, 0xad91: 0x00657893, 0xad92: 0x00657a93, 0xad93: 0x00657e93, + 0xad94: 0x00658093, 0xad95: 0x00658293, 0xad96: 0x00658493, 0xad97: 0x00658693, + 0xad98: 0x00658893, 0xad99: 0x00658a93, 0xad9a: 0x00658c93, 0xad9b: 0x00658e93, + 0xad9c: 0x00659093, 0xad9d: 0x00659293, 0xad9e: 0x00659493, 0xad9f: 0x00659693, + 0xada0: 0x00659893, 0xada1: 0x00659a93, 0xada2: 0x00659c93, 0xada3: 0x00659e93, + 0xada4: 0x0065a093, 0xada5: 0x0065a293, 0xada6: 0x0065a493, 0xada7: 0x0065a693, + 0xada8: 0x0065a893, 0xada9: 0x0065aa93, 0xadaa: 0x0065ac93, 0xadab: 0x0065ae93, + 0xadac: 0x0065b093, 0xadad: 0x0065b293, 0xadae: 0x0065b493, 0xadaf: 0x0065b693, + 0xadb0: 0x0065b893, 0xadb1: 0x0065ba93, 0xadb2: 0x0065bc93, 0xadb3: 0x0065be93, + 0xadb4: 0x0065c093, 0xadb5: 0x0065c493, 0xadb6: 0x0065c693, 0xadb7: 0x0065c893, + 0xadb8: 0x0065ca93, 0xadb9: 0x0065cc93, 0xadba: 0x0065ce93, 0xadbb: 0x0065d093, + 0xadbc: 0x0065d293, 0xadbd: 0x0065d493, 0xadbe: 0x0065d693, + // Block 0x2b7, offset 0xadc0 + 0xadc0: 0xe000230b, 0xadc1: 0xe00022f8, 0xadc2: 0xe00022fc, 0xadc3: 0xe0002311, + 0xadc4: 0xe0002316, 0xadc5: 0xe000231d, 0xadc6: 0xe0002321, 0xadc7: 0xe0002325, + 0xadc8: 0xe000232b, 0xadc9: 0xf0001c1c, 0xadca: 0xe0002330, 0xadcb: 0xe000233c, + 0xadcc: 0xe0002340, 0xadcd: 0xe0002337, 0xadce: 0xe0002346, 0xadcf: 0xe000234b, + 0xadd0: 0xe000234f, 0xadd1: 0xe0002353, 0xadd2: 0xf0001c1c, 0xadd3: 0xe000235e, + 0xadd4: 0xe0002358, 0xadd5: 0xf0001c1c, 0xadd6: 0xe0002363, 0xadd7: 0xe000236d, + 0xadd8: 0xe0002d39, 0xadd9: 0xe0002ded, 0xadda: 0xe0002e5a, 0xaddb: 0xe0002e8f, + 0xaddc: 0xe0002ebc, 0xaddd: 0xe0002ece, 0xadde: 0xe0002edd, 0xaddf: 0xe0002eec, + 0xade0: 0xe0002efb, 0xade1: 0xe0002f0a, 0xade2: 0xe0002d54, 0xade3: 0xe0002d67, + 0xade4: 0xe0002d7a, 0xade5: 0xe0002d89, 0xade6: 0xe0002d98, 0xade7: 0xe0002da7, + 0xade8: 0xe0002db6, 0xade9: 0xe0002dc5, 0xadea: 0xe0002dd4, 0xadeb: 0xe0002de3, + 0xadec: 0xe0002e01, 0xaded: 0xe0002e0c, 0xadee: 0xe0002e17, 0xadef: 0xe0002e22, + 0xadf0: 0xe0002e2d, 0xadf1: 0xe0000c1e, 0xadf2: 0xf0001c1c, 0xadf3: 0xf0001d1d, + 0xadf4: 0xe0000a31, 0xadf5: 0xf0001d1c, 0xadf6: 0xf0001c1c, 0xadf7: 0xf0001c1c, + 0xadf8: 0xe0000ac2, 0xadf9: 0xe0000ac6, 0xadfa: 0xf0001d1d, 0xadfb: 0xe0004091, + 0xadfc: 0xe0004097, 0xadfd: 0xe000408e, 0xadfe: 0xe0004094, 0xadff: 0xe0002431, + // Block 0x2b8, offset 0xae00 + 0xae00: 0xf0001d1c, 0xae01: 0xf0001d1d, 0xae02: 0xe00009b7, 0xae03: 0xf0001c1d, + 0xae04: 0xf0001c1c, 0xae05: 0xf0001c1c, 0xae06: 0xe0000a66, 0xae07: 0xe0000a7a, + 0xae08: 0xf0001d1c, 0xae09: 0xf0001c1d, 0xae0a: 0xf0001c1c, 0xae0b: 0xf0001d1d, + 0xae0c: 0xf0001c1c, 0xae0d: 0xf0001d1d, 0xae0e: 0xf0001d1d, 0xae0f: 0xf0001c1c, + 0xae10: 0xf0001c1c, 0xae11: 0xf0001c1c, 0xae12: 0xe0000d0d, 0xae13: 0xf0001c1c, + 0xae14: 0xf0001c1c, 0xae15: 0xe0000d3a, 0xae16: 0xe0000d46, 0xae17: 0xf0001d1d, + 0xae18: 0xe0000eb0, 0xae19: 0xe0000eb8, 0xae1a: 0xf0001d1d, 0xae1b: 0xf0001c1c, + 0xae1c: 0xf0001c1d, 0xae1d: 0xf0001c1d, 0xae1e: 0xe00010b2, 0xae1f: 0xe00009c8, + 0xae20: 0xe0002de7, 0xae21: 0xe0002e54, 0xae22: 0xe0002e89, 0xae23: 0xe0002eb6, + 0xae24: 0xe0002ec8, 0xae25: 0xe0002ed7, 0xae26: 0xe0002ee6, 0xae27: 0xe0002ef5, + 0xae28: 0xe0002f04, 0xae29: 0xe0002d4c, 0xae2a: 0xe0002d5f, 0xae2b: 0xe0002d72, + 0xae2c: 0xe0002d85, 0xae2d: 0xe0002d94, 0xae2e: 0xe0002da3, 0xae2f: 0xe0002db2, + 0xae30: 0xe0002dc1, 0xae31: 0xe0002dd0, 0xae32: 0xe0002ddf, 0xae33: 0xe0002dfd, + 0xae34: 0xe0002e08, 0xae35: 0xe0002e13, 0xae36: 0xe0002e1e, 0xae37: 0xe0002e29, + 0xae38: 0xe0002e34, 0xae39: 0xe0002e3b, 0xae3a: 0xe0002e42, 0xae3b: 0xe0002e49, + 0xae3c: 0xe0002e50, 0xae3d: 0xe0002e66, 0xae3e: 0xe0002e6d, 0xae3f: 0xe0000bdf, + // Block 0x2b9, offset 0xae40 + 0xae40: 0x6c009820, 0xae41: 0x6c0ea820, 0xae43: 0x6c08fe20, + 0xae47: 0x6c148c20, + 0xae48: 0x6c0ad420, 0xae49: 0x6c083420, 0xae4a: 0x6c0ad220, 0xae4b: 0x6c01b020, + 0xae4d: 0x6c12c420, 0xae4e: 0x6c158a20, + 0xae50: 0x6c172e20, 0xae51: 0x6c00da20, + 0xae54: 0x6c02d020, 0xae55: 0x6c173020, 0xae56: 0x6c0bc820, 0xae57: 0x6c18e620, + 0xae58: 0x6c041820, 0xae59: 0x6c134c20, + 0xae5e: 0x6c0ad620, + 0xae61: 0x6c164420, + 0xae66: 0x6c135c20, + 0xae6a: 0x6c173220, + 0xae6d: 0x6c0e8020, + 0xae71: 0x6c173420, 0xae72: 0x6c051c20, + 0xae76: 0x6c173620, + 0xae78: 0x6c036a20, 0xae79: 0x6c0e1420, 0xae7b: 0x6c095e20, + 0xae7c: 0x6c173820, 0xae7f: 0x6c173a20, + // Block 0x2ba, offset 0xae80 + 0xae82: 0x6c173c20, 0xae83: 0x6c110e20, + 0xae85: 0x6c041a20, + 0xae8b: 0x6c111220, + 0xae8d: 0x6c10ae20, 0xae8e: 0x6c062620, 0xae8f: 0x6c13fa20, + 0xae95: 0x6c29d820, 0xae96: 0x6c173e20, 0xae97: 0x6c0ad820, + 0xae98: 0x6c174020, 0xae99: 0x6c01a220, + 0xae9d: 0x6c04f220, 0xae9e: 0x6c068020, 0xae9f: 0x6c152220, + 0xaea2: 0x6c1b9e20, + 0xaeb1: 0x6c15ec20, 0xaeb3: 0x6c10e220, + 0xaebe: 0x6c02fa20, + // Block 0x2bb, offset 0xaec0 + 0xaec0: 0x6c03d620, 0xaec2: 0x6c174220, + 0xaec5: 0x6c174420, 0xaec6: 0x6c163e20, + 0xaec8: 0x6c158620, 0xaec9: 0x6c0d0c20, 0xaeca: 0x6c174820, 0xaecb: 0x6c08c020, + 0xaecc: 0x6c10ce20, 0xaece: 0x6c174e20, + 0xaed1: 0x6c00f820, 0xaed2: 0x6c065e20, + 0xaed4: 0x6c065c20, 0xaed5: 0x6c008c20, + 0xaed8: 0x6c171a20, 0xaed9: 0x6c171820, 0xaedb: 0x6c077e20, + 0xaedc: 0x6c000220, 0xaede: 0x6c175020, 0xaedf: 0x6c175220, + 0xaee0: 0x6c175420, 0xaee1: 0x6c13fc20, 0xaee2: 0x6c175620, + 0xaee4: 0x6c068420, 0xaee5: 0x6c008e20, 0xaee6: 0x6c147820, + 0xaee8: 0x6c046420, 0xaeeb: 0x6c046620, + 0xaeec: 0x6c046820, 0xaeed: 0x6c0f3420, 0xaeee: 0x6c164020, + 0xaef0: 0x6c175820, 0xaef3: 0x6c175a20, + 0xaef6: 0x6c175c20, + 0xaefa: 0x6c0b5e20, + // Block 0x2bc, offset 0xaf00 + 0xaf00: 0x6c09c020, 0xaf01: 0x6c0b6020, 0xaf02: 0x6c176620, + 0xaf04: 0x6c176220, 0xaf06: 0x6c176420, 0xaf07: 0x6c041c20, + 0xaf0a: 0x6c075e20, 0xaf0b: 0x6c021820, + 0xaf0d: 0x6c176020, 0xaf0e: 0x6c175e20, 0xaf0f: 0x6c132a20, + 0xaf14: 0x6c086020, 0xaf15: 0x6c085e20, 0xaf16: 0x6c0d7420, 0xaf17: 0x6c176820, + 0xaf18: 0x6c12c620, 0xaf19: 0x6c0c4e20, + 0xaf1e: 0x6c176a20, 0xaf1f: 0x6c176e20, + 0xaf23: 0x6c0dc220, + 0xaf24: 0x6c168a20, 0xaf25: 0x6c005420, + 0xaf2d: 0x6c176c20, 0xaf2e: 0x6c01b420, + 0xaf30: 0x6c04b020, 0xaf32: 0x6c0e8220, + 0xaf36: 0x6c05c220, 0xaf37: 0x6c177020, + 0xaf3b: 0x6c10ec20, + // Block 0x2bd, offset 0xaf40 + 0xaf41: 0x6c038620, + 0xaf49: 0x6c177220, 0xaf4a: 0x6c005620, + 0xaf4d: 0x6c066020, 0xaf4e: 0x6c038820, 0xaf4f: 0x6c131020, + 0xaf50: 0x6c11c420, 0xaf51: 0x6c041e20, + 0xaf5a: 0x6c021a20, + 0xaf5c: 0x6c17b820, 0xaf5d: 0x6c0fae20, + 0xaf6f: 0x6c117c20, + 0xaf70: 0x6c177620, + 0xaf74: 0x6c11d820, 0xaf76: 0x6c168c20, + 0xaf78: 0x6c0b1e20, 0xaf7a: 0x6c086220, + 0xaf7c: 0x6c08c220, 0xaf7d: 0x6c01b820, + // Block 0x2be, offset 0xaf80 + 0xaf83: 0x6c0f1220, + 0xaf86: 0x6c0df820, 0xaf87: 0x6c177e20, + 0xaf8d: 0x6c005820, 0xaf8e: 0x6c0f3620, 0xaf8f: 0x6c09c220, + 0xaf90: 0x6c078020, 0xaf91: 0x6c155420, 0xaf93: 0x6c0d9420, + 0xaf95: 0x6c01b620, 0xaf97: 0x6c177c20, + 0xaf99: 0x6c158820, 0xaf9a: 0x6c177420, 0xaf9b: 0x6c177820, + 0xaf9c: 0x6c07f420, 0xaf9d: 0x6c177a20, 0xaf9e: 0x6c1ade20, + 0xafa9: 0x6c178a20, + 0xafaf: 0x6c179020, + 0xafb0: 0x6c178c20, 0xafb3: 0x6c01bc20, + 0xafb5: 0x6c134e20, 0xafb6: 0x6c178020, + 0xafbb: 0x6c178820, + 0xafbc: 0x6c068620, 0xafbf: 0x6c086420, + // Block 0x2bf, offset 0xafc0 + 0xafc3: 0x6c02fc20, + 0xafc6: 0x6c179220, + 0xafc8: 0x6c178220, 0xafcb: 0x6c168e20, + 0xafcd: 0x6c08c420, 0xafcf: 0x6c178420, + 0xafd1: 0x6c178e20, + 0xafd6: 0x6c179420, + 0xafd8: 0x6c178620, 0xafdb: 0x6c046a20, + 0xafdd: 0x6c005a20, + 0xafe0: 0x6c046c20, 0xafe1: 0x6c01ba20, + 0xafeb: 0x6c1ae020, + 0xafed: 0x6c148620, 0xafee: 0x6c12f820, 0xafef: 0x6c068820, + 0xaff5: 0x6c0b2220, 0xaff6: 0x6c163620, + 0xafff: 0x6c138820, + // Block 0x2c0, offset 0xb000 + 0xb002: 0x6c055420, 0xb003: 0x6c0d4220, + 0xb004: 0x6c020020, + 0xb00a: 0x6c09f220, + 0xb00e: 0x6c179c20, + 0xb010: 0x6c17a620, 0xb011: 0x6c17a220, + 0xb014: 0x6c179820, 0xb017: 0x6c0d5620, + 0xb018: 0x6c179e20, 0xb01a: 0x6c17a420, 0xb01b: 0x6c17a020, + 0xb01d: 0x6c139220, 0xb01f: 0x6c179a20, + 0xb021: 0x6c0b2020, 0xb023: 0x6c147a20, + 0xb024: 0x6c17a820, 0xb025: 0x6c17aa20, + 0xb02e: 0x6c099420, 0xb02f: 0x6c17c420, + 0xb033: 0x6c114420, + 0xb035: 0x6c128820, 0xb036: 0x6c17ba20, + 0xb038: 0x6c13b820, 0xb03a: 0x6c01a420, + 0xb03e: 0x6c17c220, + // Block 0x2c1, offset 0xb040 + 0xb045: 0x6c17b620, 0xb046: 0x6c17c820, + 0xb049: 0x6c0ce020, 0xb04b: 0x6c062820, + 0xb04d: 0x6c115c20, 0xb04f: 0x6c233820, + 0xb051: 0x6c17c620, 0xb052: 0x6c0fe620, + 0xb054: 0x6c17b020, 0xb056: 0x6c068c20, + 0xb059: 0x6c068a20, 0xb05a: 0x6c17ac20, + 0xb05f: 0x6c094420, + 0xb061: 0x6c17bc20, 0xb063: 0x6c13b620, + 0xb064: 0x6c0e4e20, 0xb065: 0x6c17b420, 0xb066: 0x6c05c620, + 0xb068: 0x6c17ae20, 0xb069: 0x6c17be20, 0xb06a: 0x6c17b220, 0xb06b: 0x6c166a20, + 0xb06c: 0x6c17c020, 0xb06d: 0x6c170620, + 0xb076: 0x6c04f420, + 0xb079: 0x6c05c420, + // Block 0x2c2, offset 0xb080 + 0xb083: 0x6c17ca20, + 0xb087: 0x6c17cc20, + 0xb088: 0x6c17d420, 0xb089: 0x6c005c20, + 0xb08f: 0x6c137820, + 0xb090: 0x6c17d220, + 0xb095: 0x6c17d020, 0xb096: 0x6c17d820, + 0xb09a: 0x6c17d620, + 0xb09c: 0x6c0f3820, + 0xb0a5: 0x6c05c820, + 0xb0ac: 0x6c17da20, + 0xb0b2: 0x6c091a20, + 0xb0b4: 0x6c0d4420, 0xb0b5: 0x6c0f3a20, 0xb0b6: 0x6c051420, + 0xb0b8: 0x6c17dc20, + 0xb0bd: 0x6c03d820, + // Block 0x2c3, offset 0xb0c0 + 0xb0c0: 0x6c17de20, + 0xb0c5: 0x6c17e220, + 0xb0cd: 0x6c13fe20, + 0xb0d1: 0x6c05b020, + 0xb0d8: 0x6c083620, 0xb0d9: 0x6c124e20, 0xb0da: 0x6c17e020, + 0xb0ec: 0x6c07a220, 0xb0ed: 0x6c159220, + 0xb0f2: 0x6c17e620, 0xb0f3: 0x6c17ec20, + 0xb0f4: 0x6c17e420, 0xb0f5: 0x6c07a020, 0xb0f7: 0x6c0a4620, + 0xb0fe: 0x6c055620, + // Block 0x2c4, offset 0xb100 + 0xb102: 0x6c17ee20, + 0xb105: 0x6c04c620, + 0xb109: 0x6c17e820, 0xb10a: 0x6c17ea20, + 0xb10d: 0x6c104620, 0xb10f: 0x6c0d3420, + 0xb111: 0x6c046e20, + 0xb115: 0x6c142e20, 0xb116: 0x6c17f020, + 0xb11a: 0x6c164220, + 0xb11e: 0x6c17f220, + 0xb123: 0x6c17f820, + 0xb125: 0x6c17f420, 0xb127: 0x6c0cd820, + 0xb12d: 0x6c17f620, 0xb12e: 0x6c17fa20, + 0xb135: 0x6c17fe20, + 0xb139: 0x6c17fc20, 0xb13b: 0x6c136820, + // Block 0x2c5, offset 0xb140 + 0xb140: 0x6c03da20, 0xb141: 0x6c180220, 0xb142: 0x6c180420, + 0xb144: 0x6c019620, + 0xb149: 0x6c180020, + 0xb152: 0x6c097820, + 0xb154: 0x6c180a20, 0xb155: 0x6c180820, 0xb156: 0x6c180620, + 0xb158: 0x6c179620, 0xb15a: 0x6c180c20, + 0xb15f: 0x6c0a4820, + 0xb161: 0x6c180e20, + 0xb16a: 0x6c155620, + 0xb172: 0x6c150220, + 0xb177: 0x6c181220, + 0xb17a: 0x6c181020, 0xb17b: 0x6c181620, + 0xb17c: 0x6c181420, 0xb17f: 0x6c181820, + // Block 0x2c6, offset 0xb180 + 0xb180: 0x6c181a20, 0xb181: 0x6c00a820, 0xb183: 0x6c060a20, + 0xb184: 0x6c055a20, 0xb185: 0x6c09c420, 0xb186: 0x6c0eaa20, 0xb187: 0x6c047020, + 0xb188: 0x6c0c5020, 0xb189: 0x6c068e20, 0xb18b: 0x6c073820, + 0xb18c: 0x6c181e20, 0xb18d: 0x6c14e020, 0xb18e: 0x6c0fb820, + 0xb190: 0x6c08c620, 0xb192: 0x6c181c20, + 0xb194: 0x6c182020, + 0xb19a: 0x6c0fe820, + 0xb19c: 0x6c02de20, + 0xb1a2: 0x6c182220, + 0xb1a5: 0x6c10e420, + 0xb1a8: 0x6c0ca420, 0xb1a9: 0x6c182620, 0xb1aa: 0x6c182820, 0xb1ab: 0x6c11b820, + 0xb1ac: 0x6c069020, 0xb1ad: 0x6c16fa20, 0xb1ae: 0x6c182a20, + 0xb1b1: 0x6c047420, + 0xb1b5: 0x6c135020, 0xb1b6: 0x6c0d6420, 0xb1b7: 0x6c050a20, + 0xb1b8: 0x6c0f9620, + 0xb1bc: 0x6c05ca20, + // Block 0x2c7, offset 0xb1c0 + 0xb1c0: 0x6c182c20, 0xb1c2: 0x6c182e20, + 0xb1c5: 0x6c10ac20, 0xb1c6: 0x6c013a20, + 0xb1c9: 0x6c183420, 0xb1ca: 0x6c081220, + 0xb1cc: 0x6c183220, 0xb1cd: 0x6c07a420, 0xb1cf: 0x6c183620, + 0xb1d0: 0x6c27ee20, 0xb1d1: 0x6c183820, 0xb1d2: 0x6c141620, 0xb1d3: 0x6c183a20, + 0xb1d5: 0x6c183c20, 0xb1d6: 0x6c183e20, 0xb1d7: 0x6c0ada20, + 0xb1d9: 0x6c092820, + 0xb1e0: 0x6c02fe20, 0xb1e2: 0x6c184420, + 0xb1e4: 0x6c184020, 0xb1e5: 0x6c14ca20, 0xb1e6: 0x6c184220, + 0xb1e8: 0x6c12d020, 0xb1e9: 0x6c184620, 0xb1ea: 0x6c184820, 0xb1eb: 0x6c184a20, + 0xb1ec: 0x6c0fea20, + 0xb1f0: 0x6c185220, 0xb1f1: 0x6c184e20, 0xb1f2: 0x6c185020, 0xb1f3: 0x6c184c20, + 0xb1f4: 0x6c07de20, 0xb1f5: 0x6c185420, 0xb1f6: 0x6c152420, 0xb1f7: 0x6c169020, + 0xb1fd: 0x6c185620, + // Block 0x2c8, offset 0xb200 + 0xb204: 0x6c0bd020, 0xb205: 0x6c185820, 0xb206: 0x6c0a0020, + 0xb209: 0x6c185a20, 0xb20b: 0x6c0eac20, + 0xb20c: 0x6c164620, 0xb20d: 0x6c0fec20, + 0xb216: 0x6c18ec20, + 0xb21b: 0x6c185c20, + 0xb21c: 0x6c31a420, 0xb21d: 0x6c04b220, + 0xb220: 0x6c185e20, 0xb221: 0x6c145020, + 0xb226: 0x6c0a1c20, 0xb227: 0x6c0df020, + 0xb229: 0x6c186220, 0xb22a: 0x6c10b020, + 0xb22d: 0x6c186420, + 0xb230: 0x6c186620, 0xb231: 0x6c025020, + 0xb235: 0x6c186820, 0xb236: 0x6c047620, + 0xb238: 0x6c108020, 0xb239: 0x6c017020, 0xb23a: 0x6c09ec20, + 0xb23d: 0x6c11a220, 0xb23e: 0x6c186a20, + // Block 0x2c9, offset 0xb240 + 0xb240: 0x6c0fee20, 0xb243: 0x6c0b6220, + 0xb244: 0x6c186c20, 0xb246: 0x6c133020, 0xb247: 0x6c0c3420, + 0xb248: 0x6c02f420, 0xb24a: 0x6c030220, 0xb24b: 0x6c186e20, + 0xb24e: 0x6c187220, + 0xb251: 0x6c055820, + 0xb254: 0x6c187020, 0xb257: 0x6c16ae20, + 0xb25d: 0x6c0a1e20, + 0xb264: 0x6c11da20, 0xb265: 0x6c137020, 0xb267: 0x6c187420, + 0xb269: 0x6c15fc20, 0xb26a: 0x6c187620, + 0xb26e: 0x6c187820, + 0xb270: 0x6c102820, 0xb273: 0x6c187a20, + 0xb276: 0x6c0bd220, 0xb277: 0x6c081420, + 0xb278: 0x6c05cc20, 0xb279: 0x6c187c20, 0xb27a: 0x6c086620, 0xb27b: 0x6c073a20, + // Block 0x2ca, offset 0xb280 + 0xb283: 0x6c0f3c20, + 0xb284: 0x6c188020, 0xb287: 0x6c0d4620, + 0xb28a: 0x6c07f620, 0xb28b: 0x6c188220, + 0xb28c: 0x6c188420, 0xb28d: 0x6c0c9c20, 0xb28f: 0x6c187e20, + 0xb294: 0x6c188820, 0xb296: 0x6c140020, + 0xb29b: 0x6c072420, + 0xb29e: 0x6c188620, + 0xb2a3: 0x6c05ce20, + 0xb2a4: 0x6c07d420, 0xb2a5: 0x6c117e20, + 0xb2a9: 0x6c188e20, 0xb2aa: 0x6c188a20, + 0xb2af: 0x6c131220, + 0xb2b0: 0x6c0adc20, 0xb2b1: 0x6c189c20, 0xb2b2: 0x6c02bc20, 0xb2b3: 0x6c189020, + 0xb2b4: 0x6c188c20, 0xb2b5: 0x6c0cda20, + 0xb2bd: 0x6c189420, 0xb2bf: 0x6c189220, + // Block 0x2cb, offset 0xb2c0 + 0xb2c3: 0x6c027c20, + 0xb2c7: 0x6c05a420, + 0xb2c8: 0x6c189e20, 0xb2c9: 0x6c162220, + 0xb2cd: 0x6c189620, + 0xb2d1: 0x6c18a020, 0xb2d2: 0x6c189a20, + 0xb2d4: 0x6c189820, + 0xb2db: 0x6c166620, + 0xb2df: 0x6c069220, + 0xb2e0: 0x6c01be20, 0xb2e3: 0x6c16b020, + 0xb2e9: 0x6c0a3620, 0xb2ea: 0x6c0fdc20, 0xb2eb: 0x6c072620, + 0xb2ec: 0x6c18a620, 0xb2ed: 0x6c18a820, + 0xb2f1: 0x6c169220, + 0xb2f4: 0x6c16da20, 0xb2f5: 0x6c18ac20, + 0xb2f9: 0x6c069420, + 0xb2fc: 0x6c18aa20, 0xb2fe: 0x6c025220, + // Block 0x2cc, offset 0xb300 + 0xb301: 0x6c18ae20, 0xb303: 0x6c144020, + 0xb305: 0x6c0ee820, 0xb307: 0x6c155820, + 0xb309: 0x6c138a20, + 0xb30d: 0x6c18b020, + 0xb312: 0x6c2f1420, + 0xb315: 0x6c104820, 0xb317: 0x6c18b220, + 0xb318: 0x6c030420, 0xb319: 0x6c14b620, + 0xb31d: 0x6c0a4a20, 0xb31e: 0x6c18b420, 0xb31f: 0x6c13a620, + 0xb320: 0x6c18bc20, 0xb322: 0x6c0bd420, 0xb323: 0x6c18b620, + 0xb324: 0x6c04c820, 0xb326: 0x6c18b820, 0xb327: 0x6c030620, + 0xb332: 0x6c054020, 0xb333: 0x6c18be20, + 0xb335: 0x6c18c020, + 0xb338: 0x6c18c220, 0xb339: 0x6c18c420, 0xb33a: 0x6c094620, + 0xb33e: 0x6c069620, 0xb33f: 0x6c150c20, + // Block 0x2cd, offset 0xb340 + 0xb341: 0x6c152020, 0xb342: 0x6c10d620, + 0xb345: 0x6c13ba20, 0xb346: 0x6c18c620, + 0xb348: 0x6c18c820, + 0xb34d: 0x6c18cc20, 0xb34f: 0x6c18d020, + 0xb350: 0x6c18ce20, + 0xb355: 0x6c18d220, 0xb356: 0x6c01b220, 0xb357: 0x6c142c20, + 0xb359: 0x6c081020, 0xb35a: 0x6c18d420, + 0xb35d: 0x6c0cee20, + 0xb360: 0x6c0a4c20, 0xb361: 0x6c047a20, 0xb363: 0x6c18d620, + 0xb36a: 0x6c121620, + 0xb36f: 0x6c18d820, + 0xb371: 0x6c18da20, 0xb373: 0x6c18dc20, + 0xb378: 0x6c18de20, 0xb379: 0x6c126420, 0xb37a: 0x6c04f820, 0xb37b: 0x6c008a20, + 0xb37f: 0x6c106620, + // Block 0x2ce, offset 0xb380 + 0xb380: 0x6c18e020, 0xb381: 0x6c09c620, 0xb383: 0x6c0c5220, + 0xb385: 0x6c18e420, 0xb386: 0x6c18e220, 0xb387: 0x6c0a4e20, + 0xb388: 0x6c066220, 0xb389: 0x6c18e820, 0xb38a: 0x6c11dc20, + 0xb38d: 0x6c18ea20, + 0xb391: 0x6c121820, 0xb392: 0x6c0d6020, 0xb393: 0x6c0dd420, + 0xb394: 0x6c047820, 0xb397: 0x6c10c420, + 0xb398: 0x6c0e1620, 0xb39a: 0x6c118020, + 0xb39c: 0x6c143020, 0xb39e: 0x6c18ee20, + 0xb3a0: 0x6c0c5420, + 0xb3a6: 0x6c054e20, + 0xb3a9: 0x6c18f020, + 0xb3ae: 0x6c18f220, 0xb3af: 0x6c00d420, + 0xb3b0: 0x6c00aa20, 0xb3b1: 0x6c038a20, 0xb3b3: 0x6c0d4820, + 0xb3b4: 0x6c040e20, 0xb3b5: 0x6c15ee20, 0xb3b7: 0x6c18f820, + 0xb3b8: 0x6c01a620, 0xb3bb: 0x6c18f620, + 0xb3bf: 0x6c047c20, + // Block 0x2cf, offset 0xb3c0 + 0xb3c2: 0x6c18fa20, + 0xb3c4: 0x6c153220, + 0xb3d6: 0x6c18fc20, + 0xb3d8: 0x6c166c20, 0xb3da: 0x6c069820, + 0xb3df: 0x6c060c20, + 0xb3e0: 0x6c18fe20, + 0xb3e5: 0x6c190220, 0xb3e6: 0x6c190020, + 0xb3e8: 0x6c0b8220, 0xb3e9: 0x6c00ee20, + 0xb3ed: 0x6c013820, 0xb3ee: 0x6c190420, + 0xb3f0: 0x6c190620, 0xb3f3: 0x6c060e20, + 0xb3f6: 0x6c190820, + 0xb3fb: 0x6c044820, + // Block 0x2d0, offset 0xb400 + 0xb402: 0x6c083820, 0xb403: 0x6c190a20, + 0xb408: 0x6c147c20, 0xb409: 0x6c078220, 0xb40a: 0x6c042020, 0xb40b: 0x6c155a20, + 0xb40c: 0x6c0cdc20, 0xb40d: 0x6c11de20, 0xb40e: 0x6c098a20, + 0xb414: 0x6c09da20, 0xb416: 0x6c096020, 0xb417: 0x6c097a20, + 0xb419: 0x6c0a3820, 0xb41b: 0x6c11e020, + 0xb41f: 0x6c191020, + 0xb421: 0x6c010220, 0xb422: 0x6c0cde20, 0xb423: 0x6c069a20, + 0xb424: 0x6c062a20, 0xb425: 0x6c04f620, + 0xb428: 0x6c191820, 0xb429: 0x6c0df620, 0xb42a: 0x6c0df420, 0xb42b: 0x6c047e20, + 0xb42c: 0x6c0a5020, 0xb42d: 0x6c191a20, 0xb42e: 0x6c191620, 0xb42f: 0x6c01c020, + 0xb430: 0x6c0dc420, 0xb431: 0x6c090020, 0xb432: 0x6c086a20, 0xb433: 0x6c00c820, + 0xb436: 0x6c02d420, 0xb437: 0x6c072820, + 0xb438: 0x6c086820, 0xb43a: 0x6c191c20, + // Block 0x2d1, offset 0xb440 + 0xb441: 0x6c191e20, 0xb443: 0x6c03fe20, + 0xb444: 0x6c028020, + 0xb448: 0x6c072a20, 0xb449: 0x6c03fc20, 0xb44a: 0x6c0f2e20, 0xb44b: 0x6c00c620, + 0xb44c: 0x6c104a20, 0xb44d: 0x6c14cc20, 0xb44e: 0x6c069e20, 0xb44f: 0x6c15fe20, + 0xb450: 0x6c0fba20, 0xb451: 0x6c069c20, + 0xb45b: 0x6c054220, + 0xb45d: 0x6c193020, 0xb45f: 0x6c04ee20, + 0xb460: 0x6c142820, + 0xb466: 0x6c121a20, + 0xb469: 0x6c192e20, 0xb46b: 0x6c036c20, + 0xb46c: 0x6c192420, 0xb46d: 0x6c192620, 0xb46e: 0x6c192a20, + 0xb476: 0x6c192c20, + 0xb478: 0x6c042220, 0xb479: 0x6c0b8620, 0xb47b: 0x6c133220, + 0xb47c: 0x6c192820, 0xb47d: 0x6c192020, 0xb47e: 0x6c066620, + // Block 0x2d2, offset 0xb480 + 0xb480: 0x6c192220, 0xb482: 0x6c16cc20, + 0xb486: 0x6c13bc20, + 0xb488: 0x6c0f4020, 0xb489: 0x6c066420, 0xb48a: 0x6c073c20, + 0xb48e: 0x6c193220, + 0xb491: 0x6c10a220, + 0xb49f: 0x6c193a20, + 0xb4a8: 0x6c098c20, 0xb4aa: 0x6c097c20, + 0xb4b0: 0x6c194020, 0xb4b1: 0x6c193c20, 0xb4b3: 0x6c149620, + 0xb4b5: 0x6c193620, 0xb4b6: 0x6c194820, 0xb4b7: 0x6c193e20, + 0xb4bb: 0x6c194420, + 0xb4bc: 0x6c062c20, 0xb4bd: 0x6c14ce20, + // Block 0x2d3, offset 0xb4c0 + 0xb4c0: 0x6c194620, + 0xb4c4: 0x6c194a20, 0xb4c6: 0x6c194e20, + 0xb4cb: 0x6c07f820, + 0xb4cc: 0x6c170820, 0xb4ce: 0x6c193820, 0xb4cf: 0x6c193420, + 0xb4d0: 0x6c194c20, 0xb4d2: 0x6c194220, + 0xb4e2: 0x6c195220, + 0xb4e4: 0x6c196420, 0xb4e5: 0x6c195620, + 0xb4e8: 0x6c195e20, 0xb4eb: 0x6c196020, + 0xb4ec: 0x6c195820, 0xb4ef: 0x6c199a20, + 0xb4f2: 0x6c07ea20, 0xb4f3: 0x6c025620, + 0xb4f8: 0x6c195420, + 0xb4fc: 0x6c196820, 0xb4fd: 0x6c00ac20, 0xb4fe: 0x6c196620, + // Block 0x2d4, offset 0xb500 + 0xb500: 0x6c000a20, 0xb501: 0x6c12b020, 0xb502: 0x6c196220, + 0xb504: 0x6c195a20, 0xb507: 0x6c195020, + 0xb508: 0x6c195c20, 0xb509: 0x6c07a820, + 0xb518: 0x6c196a20, + 0xb521: 0x6c00ae20, 0xb522: 0x6c197c20, + 0xb525: 0x6c196c20, 0xb526: 0x6c196e20, + 0xb528: 0x6c0a5220, 0xb529: 0x6c146620, + 0xb52d: 0x6c197820, 0xb52e: 0x6c197620, + 0xb532: 0x6c0f8a20, + 0xb53a: 0x6c197a20, + 0xb53d: 0x6c197420, + // Block 0x2d5, offset 0xb540 + 0xb544: 0x6c00e420, 0xb546: 0x6c078420, 0xb547: 0x6c0b2420, + 0xb54f: 0x6c197020, + 0xb550: 0x6c0ff020, + 0xb554: 0x6c197220, 0xb556: 0x6c000420, + 0xb56e: 0x6c198620, 0xb56f: 0x6c155220, + 0xb571: 0x6c0a5620, 0xb573: 0x6c199220, + 0xb578: 0x6c199020, 0xb579: 0x6c197e20, + 0xb57e: 0x6c0d7e20, + // Block 0x2d6, offset 0xb580 + 0xb580: 0x6c198020, + 0xb584: 0x6c0dd620, 0xb585: 0x6c198a20, 0xb586: 0x6c0a5420, + 0xb58c: 0x6c198420, 0xb58f: 0x6c151820, + 0xb593: 0x6c055c20, + 0xb596: 0x6c198c20, 0xb597: 0x6c198e20, + 0xb59c: 0x6c198820, 0xb59d: 0x6c199420, + 0xb5a3: 0x6c198220, + 0xb5bb: 0x6c19a020, + 0xb5bc: 0x6c19aa20, 0xb5be: 0x6c19a220, + // Block 0x2d7, offset 0xb5c0 + 0xb5c0: 0x6c199820, 0xb5c3: 0x6c19ac20, + 0xb5c4: 0x6c0c9e20, 0xb5c7: 0x6c19b020, + 0xb5c9: 0x6c06a020, 0xb5ca: 0x6c199c20, 0xb5cb: 0x6c0eae20, + 0xb5d8: 0x6c19a420, 0xb5d9: 0x6c199620, 0xb5da: 0x6c030a20, + 0xb5dc: 0x6c038c20, 0xb5dd: 0x6c02be20, 0xb5de: 0x6c19a620, 0xb5df: 0x6c199e20, + 0xb5e7: 0x6c05d020, + 0xb5e8: 0x6c19b220, 0xb5e9: 0x6c19ae20, 0xb5ea: 0x6c0ce220, 0xb5eb: 0x6c040020, + 0xb5ec: 0x6c048020, 0xb5ee: 0x6c19a820, + 0xb5f0: 0x6c051020, + 0xb5f6: 0x6c010420, + // Block 0x2d8, offset 0xb600 + 0xb604: 0x6c19ba20, 0xb605: 0x6c19b620, 0xb607: 0x6c1a2820, + 0xb614: 0x6c19c020, + 0xb61a: 0x6c19b420, + 0xb61c: 0x6c19bc20, 0xb61f: 0x6c19b820, + 0xb623: 0x6c086c20, + 0xb624: 0x6c19be20, + 0xb637: 0x6c19c420, + 0xb639: 0x6c19ce20, + 0xb63d: 0x6c19ca20, 0xb63e: 0x6c19c820, + // Block 0x2d9, offset 0xb640 + 0xb646: 0x6c0e1820, + 0xb649: 0x6c01c220, + 0xb654: 0x6c19c220, 0xb656: 0x6c19c620, 0xb657: 0x6c0a5820, + 0xb658: 0x6c00e220, 0xb65b: 0x6c19cc20, + 0xb669: 0x6c01f420, + 0xb66f: 0x6c19e220, + 0xb671: 0x6c0b0020, 0xb672: 0x6c19da20, + 0xb674: 0x6c19d620, 0xb676: 0x6c19d820, + 0xb678: 0x6c19dc20, + // Block 0x2da, offset 0xb680 + 0xb682: 0x6c00f620, + 0xb68c: 0x6c0cae20, 0xb68e: 0x6c19d020, + 0xb690: 0x6c19d220, + 0xb69b: 0x6c02e820, + 0xb6a4: 0x6c19e020, + 0xb6a8: 0x6c038e20, 0xb6aa: 0x6c19e620, 0xb6ab: 0x6c19de20, + 0xb6ac: 0x6c19e420, + 0xb6b4: 0x6c133420, + 0xb6b8: 0x6c109220, 0xb6ba: 0x6c11d020, + // Block 0x2db, offset 0xb6c0 + 0xb6c0: 0x6c19ea20, + 0xb6c6: 0x6c19e820, 0xb6c7: 0x6c027e20, + 0xb6ca: 0x6c19ec20, + 0xb6cf: 0x6c19f220, + 0xb6d4: 0x6c19f020, + 0xb6e0: 0x6c19ee20, 0xb6e2: 0x6c111620, + 0xb6e5: 0x6c19f420, + 0xb6ee: 0x6c19f620, + 0xb6f4: 0x6c19fa20, 0xb6f6: 0x6c19f820, + 0xb6fc: 0x6c19fe20, + // Block 0x2dc, offset 0xb700 + 0xb700: 0x6c1a0420, 0xb701: 0x6c1a0020, 0xb702: 0x6c19fc20, 0xb703: 0x6c1a0220, + 0xb708: 0x6c1a0620, + 0xb70e: 0x6c1a0820, + 0xb711: 0x6c1a0a20, 0xb713: 0x6c1a0c20, + 0xb717: 0x6c1a0e20, + 0xb718: 0x6c183020, 0xb71a: 0x6c098820, 0xb71b: 0x6c086e20, + 0xb71e: 0x6c021e20, + 0xb720: 0x6c00b020, 0xb723: 0x6c0e3c20, + 0xb72e: 0x6c1a1020, + 0xb730: 0x6c076020, 0xb732: 0x6c005e20, 0xb733: 0x6c0b8020, + 0xb739: 0x6c1a1220, 0xb73a: 0x6c062e20, + 0xb73d: 0x6c073e20, 0xb73f: 0x6c1a1620, + // Block 0x2dd, offset 0xb740 + 0xb740: 0x6c1a1420, 0xb743: 0x6c139820, + 0xb744: 0x6c1a1820, + 0xb748: 0x6c1a1c20, 0xb749: 0x6c1a1a20, 0xb74b: 0x6c1a1e20, + 0xb74d: 0x6c1a2020, 0xb74f: 0x6c05d220, + 0xb752: 0x6c013c20, 0xb753: 0x6c1a2220, + 0xb756: 0x6c1a2620, + 0xb758: 0x6c1a2420, + 0xb75c: 0x6c1a2a20, 0xb75f: 0x6c0fe020, + 0xb766: 0x6c1a2c20, 0xb767: 0x6c002a20, + 0xb768: 0x6c07d620, + 0xb76d: 0x6c055e20, + 0xb770: 0x6c0e5220, + 0xb777: 0x6c1a2e20, + 0xb778: 0x6c1a3020, 0xb77b: 0x6c1a3420, + // Block 0x2de, offset 0xb780 + 0xb780: 0x6c1a3620, 0xb782: 0x6c07e020, + 0xb787: 0x6c04ca20, + 0xb78a: 0x6c140220, + 0xb78e: 0x6c1a3220, 0xb78f: 0x6c1a3820, + 0xb790: 0x6c079a20, 0xb791: 0x6c06a220, + 0xb7a1: 0x6c1a4020, + 0xb7a4: 0x6c076220, 0xb7a6: 0x6c0e1a20, + 0xb7a9: 0x6c1a3a20, 0xb7aa: 0x6c0f2420, + 0xb7bf: 0x6c1a4220, + // Block 0x2df, offset 0xb7c0 + 0xb7c2: 0x6c0b8820, + 0xb7c8: 0x6c1a3e20, 0xb7c9: 0x6c1a4420, 0xb7cb: 0x6c056220, + 0xb7d3: 0x6c1a4620, + 0xb7e0: 0x6c1a4820, 0xb7e2: 0x6c06a420, 0xb7e3: 0x6c027420, + 0xb7e4: 0x6c1a4c20, + 0xb7ea: 0x6c1a4e20, + 0xb7f0: 0x6c1a5020, 0xb7f3: 0x6c1a4a20, + // Block 0x2e0, offset 0xb800 + 0xb800: 0x6c1a3c20, 0xb803: 0x6c1a5220, + 0xb806: 0x6c1a5420, + 0xb80b: 0x6c145c20, + 0xb80e: 0x6c0ade20, + 0xb812: 0x6c1a5820, 0xb813: 0x6c1a5a20, + 0xb814: 0x6c1a5620, 0xb816: 0x6c1a5e20, + 0xb81c: 0x6c111420, 0xb81f: 0x6c009020, + 0xb820: 0x6c12c820, 0xb823: 0x6c1a6020, + 0xb834: 0x6c0b0220, 0xb837: 0x6c090220, + 0xb839: 0x6c115e20, 0xb83a: 0x6c039020, + 0xb83c: 0x6c07ee20, + // Block 0x2e1, offset 0xb840 + 0xb840: 0x6c144620, 0xb842: 0x6c104c20, + 0xb845: 0x6c05d420, 0xb846: 0x6c0d9620, + 0xb84a: 0x6c1a5c20, 0xb84b: 0x6c1a6220, + 0xb855: 0x6c0d8020, + 0xb859: 0x6c1a6420, + 0xb85d: 0x6c1a6620, + 0xb861: 0x6c1a6a20, + 0xb864: 0x6c0f4220, + 0xb86a: 0x6c030c20, + 0xb86f: 0x6c319c20, + 0xb870: 0x6c013e20, 0xb871: 0x6c13be20, + 0xb874: 0x6c0ae020, 0xb875: 0x6c0fbc20, + 0xb87a: 0x6c07e420, + 0xb87d: 0x6c1a7620, + // Block 0x2e2, offset 0xb880 + 0xb880: 0x6c135220, 0xb881: 0x6c168220, + 0xb88a: 0x6c022020, 0xb88b: 0x6c1a6e20, + 0xb891: 0x6c0cb020, 0xb892: 0x6c1a7420, + 0xb894: 0x6c0ff220, 0xb897: 0x6c0fbe20, + 0xb898: 0x6c0ff420, 0xb899: 0x6c11d220, 0xb89a: 0x6c0f0a20, + 0xb89e: 0x6c07aa20, + 0xb8a2: 0x6c1a6c20, + 0xb8a9: 0x6c016820, 0xb8ab: 0x6c0f9820, + 0xb8b0: 0x6c1a7020, 0xb8b2: 0x6c1a6820, + 0xb8b5: 0x6c0b6420, + 0xb8b9: 0x6c1a7820, + 0xb8be: 0x6c09e820, + // Block 0x2e3, offset 0xb8c0 + 0xb8c3: 0x6c048220, + 0xb8c5: 0x6c1a7a20, + 0xb8d3: 0x6c13a820, + 0xb8d7: 0x6c0d3620, + 0xb8dc: 0x6c0efc20, 0xb8df: 0x6c1a7e20, + 0xb8e8: 0x6c143220, 0xb8eb: 0x6c1a8020, + 0xb8ee: 0x6c1a8a20, + 0xb8f3: 0x6c133620, + 0xb8f8: 0x6c1a8820, 0xb8f9: 0x6c1a7c20, 0xb8fa: 0x6c1a8220, 0xb8fb: 0x6c1a8620, + 0xb8fe: 0x6c076420, + // Block 0x2e4, offset 0xb900 + 0xb901: 0x6c136a20, + 0xb905: 0x6c1a8c20, 0xb907: 0x6c0e3e20, + 0xb90a: 0x6c022220, + 0xb90c: 0x6c0ae220, + 0xb911: 0x6c1a9020, 0xb913: 0x6c1a8e20, + 0xb915: 0x6c072c20, 0xb917: 0x6c1a9220, + 0xb918: 0x6c1a9620, 0xb919: 0x6c1a9420, + 0xb91c: 0x6c1a9a20, 0xb91e: 0x6c1a8420, 0xb91f: 0x6c1a9e20, + 0xb924: 0x6c1a9c20, 0xb925: 0x6c1a9820, + 0xb92b: 0x6c087020, + 0xb92c: 0x6c0b6620, 0xb92e: 0x6c0ce420, 0xb92f: 0x6c1aa020, + 0xb930: 0x6c0bf820, 0xb931: 0x6c009a20, 0xb932: 0x6c116c20, + 0xb937: 0x6c0f2620, + 0xb939: 0x6c1aa420, 0xb93a: 0x6c1aa220, 0xb93b: 0x6c1aa620, + 0xb93c: 0x6c1aa820, 0xb93d: 0x6c1aaa20, + // Block 0x2e5, offset 0xb940 + 0xb942: 0x6c1aac20, + 0xb949: 0x6c137a20, 0xb94a: 0x6c1aae20, + 0xb94f: 0x6c01c420, + 0xb950: 0x6c1ab020, + 0xb955: 0x6c158420, 0xb956: 0x6c025420, + 0xb958: 0x6c18f420, 0xb959: 0x6c09dc20, 0xb95a: 0x6c0d7620, 0xb95b: 0x6c1ab220, + 0xb95c: 0x6c152620, + 0xb962: 0x6c14b820, + 0xb965: 0x6c1ab620, 0xb967: 0x6c0dc620, + 0xb969: 0x6c0f9a20, 0xb96a: 0x6c0d7820, 0xb96b: 0x6c12ca20, + 0xb96c: 0x6c1ab820, 0xb96d: 0x6c1aba20, 0xb96e: 0x6c017220, + 0xb971: 0x6c090420, 0xb972: 0x6c1abc20, + 0xb977: 0x6c006020, + 0xb978: 0x6c1abe20, + 0xb97e: 0x6c1ac020, + // Block 0x2e6, offset 0xb980 + 0xb984: 0x6c014020, 0xb987: 0x6c039220, + 0xb988: 0x6c10a820, 0xb989: 0x6c13c020, + 0xb98e: 0x6c1ac820, 0xb98f: 0x6c0ce620, + 0xb990: 0x6c1ac620, 0xb991: 0x6c056420, + 0xb994: 0x6c144a20, 0xb995: 0x6c1ac420, 0xb997: 0x6c0ff620, + 0xb998: 0x6c1acc20, 0xb99a: 0x6c1aca20, + 0xb9a0: 0x6c1ad020, 0xb9a2: 0x6c1ace20, + 0xb9a5: 0x6c017420, 0xb9a7: 0x6c1ad220, + 0xb9a8: 0x6c0a5a20, 0xb9a9: 0x6c1ad620, 0xb9aa: 0x6c0dfe20, + 0xb9ac: 0x6c1ad420, 0xb9ae: 0x6c133e20, + 0xb9b3: 0x6c0a3a20, + 0xb9b4: 0x6c0fe220, + 0xb9b8: 0x6c1ad820, + 0xb9bd: 0x6c06a620, + // Block 0x2e7, offset 0xb9c0 + 0xb9c1: 0x6c1ada20, 0xb9c2: 0x6c10e620, 0xb9c3: 0x6c121c20, + 0xb9c4: 0x6c14f220, + 0xb9ca: 0x6c10ee20, + 0xb9cd: 0x6c1aec20, + 0xb9d3: 0x6c03dc20, + 0xb9d6: 0x6c159620, + 0xb9d9: 0x6c14ae20, 0xb9db: 0x6c1baa20, + 0xb9dd: 0x6c1adc20, + 0xb9e3: 0x6c1ae220, + 0xb9e5: 0x6c0d8220, + 0xb9e8: 0x6c140420, + 0xb9ec: 0x6c0fc020, + 0xb9f2: 0x6c1ae420, + 0xb9f9: 0x6c145e20, 0xb9fb: 0x6c07ac20, + 0xb9fe: 0x6c0a5c20, + // Block 0x2e8, offset 0xba00 + 0xba06: 0x6c1ae620, + 0xba09: 0x6c087420, 0xba0b: 0x6c087220, + 0xba10: 0x6c003220, 0xba11: 0x6c063020, 0xba13: 0x6c0bd620, + 0xba14: 0x6c006220, + 0xba19: 0x6c1aee20, 0xba1a: 0x6c1af020, + 0xba1c: 0x6c1aea20, + 0xba25: 0x6c00ec20, 0xba26: 0x6c030e20, + 0xba28: 0x6c1ae820, 0xba2a: 0x6c14da20, 0xba2b: 0x6c127e20, + 0xba36: 0x6c001020, + 0xba3b: 0x6c00b220, + 0xba3f: 0x6c087620, + // Block 0x2e9, offset 0xba40 + 0xba41: 0x6c006420, 0xba43: 0x6c000620, + 0xba49: 0x6c1afa20, + 0xba51: 0x6c1af620, + 0xba58: 0x6c14c820, 0xba5a: 0x6c1afc20, + 0xba5c: 0x6c1af820, 0xba5f: 0x6c1af420, + 0xba60: 0x6c0b2620, + 0xba65: 0x6c1af220, + 0xba69: 0x6c138c20, + 0xba6f: 0x6c066820, + 0xba75: 0x6c1b0420, 0xba76: 0x6c1b0620, + 0xba7c: 0x6c0a5e20, + // Block 0x2ea, offset 0xba80 + 0xba80: 0x6c1afe20, 0xba81: 0x6c16dc20, + 0xba86: 0x6c113c20, + 0xba89: 0x6c1b0220, + 0xba9a: 0x6c076620, + 0xbaa2: 0x6c1b0820, + 0xbaa6: 0x6c12cc20, + 0xbaaa: 0x6c1b0a20, + 0xbaac: 0x6c1b0020, + 0xbabf: 0x6c14c620, + // Block 0x2eb, offset 0xbac0 + 0xbad2: 0x6c116020, + 0xbada: 0x6c1b0c20, 0xbadb: 0x6c128020, + 0xbafc: 0x6c1b0e20, 0xbafd: 0x6c1b1620, 0xbafe: 0x6c1b1020, + // Block 0x2ec, offset 0xbb00 + 0xbb01: 0x6c01c620, 0xbb02: 0x6c1b1420, + 0xbb09: 0x6c090620, 0xbb0b: 0x6c1b1220, + 0xbb0c: 0x6c05d620, + 0xbb10: 0x6c1b2e20, + 0xbb16: 0x6c1b2020, 0xbb17: 0x6c1b1a20, + 0xbb21: 0x6c0e7c20, 0xbb23: 0x6c1b1820, + 0xbb26: 0x6c1b1c20, + 0xbb29: 0x6c1b1e20, + 0xbb3a: 0x6c1b2220, 0xbb3b: 0x6c1b2420, + // Block 0x2ed, offset 0xbb40 + 0xbb49: 0x6c039420, 0xbb4b: 0x6c1b2820, + 0xbb4c: 0x6c1b2620, + 0xbb56: 0x6c1b2a20, + 0xbb62: 0x6c0ae420, + 0xbb6a: 0x6c1b3020, + 0xbb6c: 0x6c0f2820, + 0xbb70: 0x6c010620, 0xbb72: 0x6c1b2c20, + 0xbb76: 0x6c1b3220, + 0xbb7e: 0x6c1b3420, + // Block 0x2ee, offset 0xbb80 + 0xbb80: 0x6c1b3a20, 0xbb83: 0x6c1b3620, + 0xbb85: 0x6c1b3820, + 0xbb90: 0x6c087820, 0xbb91: 0x6c1b3c20, + 0xbb94: 0x6c06a820, 0xbb95: 0x6c1b3e20, 0xbb97: 0x6c08c820, + 0xbb98: 0x6c0d6820, 0xbb9a: 0x6c1b4020, 0xbb9b: 0x6c1b4220, + 0xbb9c: 0x6c088820, 0xbb9d: 0x6c06aa20, 0xbb9f: 0x6c14f420, + 0xbba3: 0x6c03bc20, + 0xbba4: 0x6c063220, 0xbba5: 0x6c1b4420, 0xbba6: 0x6c02a420, + 0xbba9: 0x6c1b4620, 0xbbab: 0x6c0d6a20, + 0xbbb0: 0x6c1b4820, 0xbbb1: 0x6c1b9820, 0xbbb3: 0x6c1b4a20, + 0xbbb5: 0x6c1b4c20, + 0xbbb8: 0x6c1b4e20, 0xbbba: 0x6c1b5220, + // Block 0x2ef, offset 0xbbc0 + 0xbbc0: 0x6c1b5420, 0xbbc3: 0x6c1b5620, + 0xbbc5: 0x6c0dd820, 0xbbc7: 0x6c00ca20, + 0xbbc8: 0x6c096220, 0xbbc9: 0x6c004420, 0xbbcb: 0x6c0cea20, + 0xbbcc: 0x6c031020, 0xbbcd: 0x6c08fa20, 0xbbcf: 0x6c06ac20, + 0xbbd5: 0x6c0ff820, 0xbbd7: 0x6c098e20, + 0xbbd8: 0x6c031220, 0xbbd9: 0x6c0e8420, 0xbbda: 0x6c0f4420, 0xbbdb: 0x6c003020, + 0xbbdc: 0x6c03de20, 0xbbdd: 0x6c13c220, 0xbbdf: 0x6c091420, + 0xbbe2: 0x6c041020, 0xbbe3: 0x6c0c5620, + 0xbbe4: 0x6c090820, 0xbbe5: 0x6c155c20, 0xbbe6: 0x6c1b5820, + 0xbbee: 0x6c042420, + 0xbbf0: 0x6c07ae20, 0xbbf3: 0x6c025820, + 0xbbf4: 0x6c014220, 0xbbf5: 0x6c0a6020, 0xbbf6: 0x6c01c820, + 0xbbf8: 0x6c1b5a20, 0xbbf9: 0x6c159820, + 0xbbff: 0x6c09de20, + // Block 0x2f0, offset 0xbc00 + 0xbc02: 0x6c095820, 0xbc03: 0x6c1b5c20, + 0xbc04: 0x6c039620, 0xbc05: 0x6c108c20, 0xbc06: 0x6c14a220, 0xbc07: 0x6c1b5e20, + 0xbc09: 0x6c1b6020, + 0xbc0c: 0x6c12ce20, + 0xbc10: 0x6c1b6420, 0xbc12: 0x6c030020, 0xbc13: 0x6c051620, + 0xbc14: 0x6c1b6220, + 0xbc1b: 0x6c031420, + 0xbc1d: 0x6c0b2820, 0xbc1e: 0x6c1b6c20, 0xbc1f: 0x6c081620, + 0xbc21: 0x6c01ca20, 0xbc22: 0x6c1b6a20, + 0xbc24: 0x6c1b6620, 0xbc25: 0x6c1b6e20, 0xbc26: 0x6c1b6820, 0xbc27: 0x6c10fa20, + 0xbc28: 0x6c205420, 0xbc29: 0x6c0b2a20, 0xbc2b: 0x6c1b7020, + 0xbc2e: 0x6c164820, + 0xbc30: 0x6c1b7220, 0xbc33: 0x6c1b7620, + 0xbc35: 0x6c0eb020, 0xbc36: 0x6c1b7420, + 0xbc38: 0x6c0bc620, 0xbc3a: 0x6c08ca20, + 0xbc3e: 0x6c0d9820, 0xbc3f: 0x6c097e20, + // Block 0x2f1, offset 0xbc40 + 0xbc41: 0x6c130620, 0xbc42: 0x6c0c5820, + 0xbc44: 0x6c092a20, 0xbc45: 0x6c1b7820, 0xbc46: 0x6c0a6220, 0xbc47: 0x6c1b7a20, + 0xbc48: 0x6c1b7c20, 0xbc49: 0x6c006620, 0xbc4a: 0x6c0d6c20, 0xbc4b: 0x6c0b6820, + 0xbc4d: 0x6c1b7e20, 0xbc4e: 0x6c104e20, 0xbc4f: 0x6c0a6420, + 0xbc51: 0x6c0a6620, 0xbc53: 0x6c1b8020, + 0xbc56: 0x6c0c5a20, + 0xbc5a: 0x6c0a6820, + 0xbc60: 0x6c1b8220, 0xbc62: 0x6c1b8420, + 0xbc64: 0x6c151020, + 0xbc68: 0x6c1b8620, + 0xbc6d: 0x6c04b420, + 0xbc71: 0x6c099020, + 0xbc78: 0x6c1b8820, 0xbc79: 0x6c1b8a20, 0xbc7a: 0x6c094820, 0xbc7b: 0x6c0b1c20, + 0xbc7c: 0x6c10d020, 0xbc7d: 0x6c0b6c20, 0xbc7e: 0x6c125020, 0xbc7f: 0x6c10e820, + // Block 0x2f2, offset 0xbc80 + 0xbc80: 0x6c04ba20, 0xbc81: 0x6c1b8c20, + 0xbc85: 0x6c044a20, 0xbc86: 0x6c1b8e20, + 0xbc88: 0x6c052420, 0xbc8a: 0x6c108620, 0xbc8b: 0x6c019820, + 0xbc8d: 0x6c087a20, 0xbc8e: 0x6c1b9020, 0xbc8f: 0x6c1b9620, + 0xbc90: 0x6c1b9420, 0xbc91: 0x6c052220, 0xbc93: 0x6c1b9220, + 0xbc95: 0x6c0f9c20, + 0xbc9e: 0x6c0d5820, + 0xbca0: 0x6c0fc220, 0xbca1: 0x6c092020, + 0xbca4: 0x6c0cec20, 0xbca5: 0x6c160020, + 0xbcac: 0x6c1b9a20, 0xbcae: 0x6c1b9c20, 0xbcaf: 0x6c109420, + 0xbcb1: 0x6c083a20, + 0xbcb6: 0x6c1ba020, + 0xbcb9: 0x6c1ba220, + // Block 0x2f3, offset 0xbcc0 + 0xbccc: 0x6c1ba420, + 0xbcd0: 0x6c039820, 0xbcd1: 0x6c1ba620, + 0xbcd4: 0x6c1ba820, + 0xbce1: 0x6c019020, + 0xbce8: 0x6c0cb220, 0xbce9: 0x6c037820, 0xbceb: 0x6c1bac20, + 0xbcec: 0x6c14a020, + 0xbcf1: 0x6c0d9c20, 0xbcf3: 0x6c02a620, + 0xbcf6: 0x6c1bb020, 0xbcf7: 0x6c1bb420, + 0xbcf8: 0x6c036e20, 0xbcfb: 0x6c1bae20, + 0xbcfc: 0x6c1bb220, 0xbcfe: 0x6c1bb820, + // Block 0x2f4, offset 0xbd00 + 0xbd05: 0x6c1bb620, 0xbd07: 0x6c1bba20, + 0xbd19: 0x6c1bbc20, + 0xbd20: 0x6c106220, 0xbd21: 0x6c048420, + 0xbd28: 0x6c020220, 0xbd29: 0x6c1bbe20, 0xbd2a: 0x6c1bc820, + 0xbd2d: 0x6c1bc420, 0xbd2f: 0x6c13c620, + 0xbd30: 0x6c13c420, + 0xbd36: 0x6c0ffa20, + 0xbd3a: 0x6c1bc220, 0xbd3b: 0x6c09f420, + 0xbd3d: 0x6c1bc020, + // Block 0x2f5, offset 0xbd40 + 0xbd47: 0x6c0ba820, + 0xbd4b: 0x6c1bca20, + 0xbd4e: 0x6c07ec20, + 0xbd51: 0x6c1bd620, + 0xbd54: 0x6c1bd820, 0xbd55: 0x6c1bcc20, 0xbd56: 0x6c025a20, 0xbd57: 0x6c1bce20, + 0xbd58: 0x6c1be020, 0xbd59: 0x6c1bde20, 0xbd5a: 0x6c1bdc20, 0xbd5b: 0x6c1bd420, + 0xbd5f: 0x6c1bd220, + 0xbd62: 0x6c1bda20, + 0xbd69: 0x6c13c820, + // Block 0x2f6, offset 0xbd80 + 0xbd8b: 0x6c1be820, + 0xbd8c: 0x6c1be220, 0xbd8e: 0x6c1be620, + 0xbd90: 0x6c15f020, 0xbd92: 0x6c1be420, + 0xbd9c: 0x6c1bd020, + 0xbda9: 0x6c0baa20, + 0xbdac: 0x6c1bea20, 0xbdaf: 0x6c078620, + 0xbdb3: 0x6c1bec20, + 0xbdb6: 0x6c1bee20, + // Block 0x2f7, offset 0xbdc0 + 0xbdc2: 0x6c1bf420, + 0xbdc4: 0x6c1bf220, 0xbdc7: 0x6c1bf020, + 0xbdcb: 0x6c0ffc20, + 0xbdcc: 0x6c1bc620, + 0xbdd0: 0x6c1c0020, + 0xbddd: 0x6c1bf820, + 0xbde2: 0x6c1bf620, + 0xbdec: 0x6c1bfa20, 0xbdee: 0x6c1bfc20, + 0xbdf7: 0x6c1c0220, + 0xbdfa: 0x6c169420, + 0xbdfc: 0x6c1c0420, 0xbdfd: 0x6c1bfe20, + // Block 0x2f8, offset 0xbe00 + 0xbe09: 0x6c1c0620, + 0xbe0c: 0x6c037020, 0xbe0d: 0x6c1c0820, + 0xbe12: 0x6c1c0c20, 0xbe13: 0x6c1c0a20, + 0xbe16: 0x6c1c0e20, + 0xbe1b: 0x6c1c1020, + 0xbe1d: 0x6c0c5c20, 0xbe1e: 0x6c099220, + 0xbe21: 0x6c0a1420, 0xbe23: 0x6c0d0220, + 0xbe25: 0x6c06ae20, 0xbe26: 0x6c078820, 0xbe27: 0x6c06b020, + 0xbe28: 0x6c044c20, 0xbe2b: 0x6c1c1220, + 0xbe2e: 0x6c078a20, + 0xbe31: 0x6c063420, 0xbe32: 0x6c1c1420, 0xbe33: 0x6c149c20, + 0xbe34: 0x6c112a20, 0xbe35: 0x6c1c1620, 0xbe37: 0x6c06b220, + 0xbe3b: 0x6c030820, + 0xbe3d: 0x6c0e0220, 0xbe3e: 0x6c04cc20, + // Block 0x2f9, offset 0xbe40 + 0xbe42: 0x6c087c20, 0xbe43: 0x6c12d220, + 0xbe46: 0x6c11e220, + 0xbe4b: 0x6c1c1820, + 0xbe4c: 0x6c039a20, + 0xbe51: 0x6c1c1e20, + 0xbe56: 0x6c0eb220, + 0xbe59: 0x6c1c1c20, 0xbe5a: 0x6c1c1a20, 0xbe5b: 0x6c1c2020, + 0xbe5d: 0x6c0f4620, + 0xbe65: 0x6c0b8a20, + 0xbe6b: 0x6c087e20, + 0xbe6d: 0x6c0c1420, 0xbe6f: 0x6c0d9e20, + 0xbe70: 0x6c03b020, 0xbe73: 0x6c0eb420, + 0xbe76: 0x6c1c2220, 0xbe77: 0x6c1c2420, + 0xbe78: 0x6c0ae620, + 0xbe7d: 0x6c140620, + // Block 0x2fa, offset 0xbe80 + 0xbe80: 0x6c1c2a20, 0xbe83: 0x6c1c2820, + 0xbe84: 0x6c1c2620, 0xbe85: 0x6c131620, 0xbe87: 0x6c1c3820, + 0xbe8c: 0x6c144820, 0xbe8e: 0x6c1c2c20, + 0xbe94: 0x6c1c3020, 0xbe95: 0x6c146a20, 0xbe97: 0x6c1c2e20, + 0xbe9f: 0x6c1c3220, + 0xbea1: 0x6c11b020, 0xbea2: 0x6c1c3420, 0xbea3: 0x6c135420, + 0xbea4: 0x6c1c3620, + 0xbeb2: 0x6c031620, 0xbeb3: 0x6c135620, + 0xbeb4: 0x6c110220, 0xbeb5: 0x6c1c3a20, 0xbeb6: 0x6c1c3c20, + 0xbeb8: 0x6c06b420, 0xbeb9: 0x6c031820, 0xbeba: 0x6c1c3e20, 0xbebb: 0x6c061020, + 0xbebc: 0x6c159420, 0xbebd: 0x6c155e20, 0xbebe: 0x6c039c20, 0xbebf: 0x6c1c4220, + // Block 0x2fb, offset 0xbec0 + 0xbec1: 0x6c0eb620, 0xbec3: 0x6c06b620, + 0xbec4: 0x6c0a6a20, 0xbec7: 0x6c121e20, + 0xbeca: 0x6c0a6c20, + 0xbecf: 0x6c0a3c20, + 0xbed5: 0x6c0f4820, 0xbed6: 0x6c13ca20, 0xbed7: 0x6c0f9e20, + 0xbeda: 0x6c06b820, + 0xbedc: 0x6c12d420, + 0xbee0: 0x6c1c4420, + 0xbee6: 0x6c0fde20, 0xbee7: 0x6c079c20, + 0xbeeb: 0x6c063620, + 0xbeed: 0x6c0f4a20, + 0xbef5: 0x6c004620, 0xbef6: 0x6c0a2820, 0xbef7: 0x6c06ba20, + 0xbef8: 0x6c159a20, + // Block 0x2fc, offset 0xbf00 + 0xbf01: 0x6c1c4620, 0xbf02: 0x6c1c4820, 0xbf03: 0x6c114620, + 0xbf08: 0x6c1c4a20, 0xbf09: 0x6c16b620, 0xbf0a: 0x6c16de20, + 0xbf0f: 0x6c1c4e20, + 0xbf10: 0x6c1c4c20, 0xbf13: 0x6c028220, + 0xbf16: 0x6c1c5020, + 0xbf1a: 0x6c1c5620, 0xbf1b: 0x6c1c5820, + 0xbf1d: 0x6c1c5420, 0xbf1f: 0x6c129c20, + 0xbf20: 0x6c0a6e20, 0xbf21: 0x6c1c5c20, 0xbf22: 0x6c1c5a20, 0xbf23: 0x6c1c5220, + 0xbf28: 0x6c1c5e20, 0xbf29: 0x6c1c6020, + 0xbf2c: 0x6c1c6220, + 0xbf30: 0x6c1c6820, 0xbf31: 0x6c1c6420, 0xbf33: 0x6c1c6620, + 0xbf34: 0x6c1c6a20, 0xbf36: 0x6c014420, 0xbf37: 0x6c0f4c20, + 0xbf38: 0x6c1c6c20, 0xbf3a: 0x6c05d820, 0xbf3b: 0x6c022420, + 0xbf3c: 0x6c111020, 0xbf3e: 0x6c1c6e20, 0xbf3f: 0x6c10de20, + // Block 0x2fd, offset 0xbf40 + 0xbf41: 0x6c138e20, 0xbf43: 0x6c1c7020, + 0xbf44: 0x6c16e020, + 0xbf49: 0x6c1c7220, 0xbf4a: 0x6c135820, 0xbf4b: 0x6c1c7820, + 0xbf4c: 0x6c172c20, 0xbf4d: 0x6c174c20, 0xbf4f: 0x6c08f020, + 0xbf50: 0x6c10d220, 0xbf51: 0x6c1c7a20, 0xbf53: 0x6c042620, + 0xbf54: 0x6c0eb820, 0xbf55: 0x6c00b420, 0xbf56: 0x6c1c7c20, 0xbf57: 0x6c132420, + 0xbf58: 0x6c06bc20, 0xbf5b: 0x6c0e5420, + 0xbf5f: 0x6c0f4e20, + 0xbf65: 0x6c152e20, 0xbf66: 0x6c061220, 0xbf67: 0x6c063820, + 0xbf69: 0x6c1c7e20, + 0xbf6d: 0x6c1c8020, 0xbf6f: 0x6c1c8c20, + 0xbf71: 0x6c095a20, + 0xbf75: 0x6c0eba20, 0xbf77: 0x6c048620, + 0xbf78: 0x6c1c8220, + 0xbf7c: 0x6c127220, 0xbf7e: 0x6c0e4020, + // Block 0x2fe, offset 0xbf80 + 0xbf81: 0x6c1c8420, + 0xbf88: 0x6c1c8620, 0xbf8a: 0x6c048820, + 0xbf8c: 0x6c1c8820, 0xbf8e: 0x6c1c8a20, + 0xbf91: 0x6c1c8e20, 0xbf93: 0x6c101820, + 0xbf96: 0x6c1c9020, 0xbf97: 0x6c1c9220, + 0xbf99: 0x6c1c9420, + 0xbf9c: 0x6c1c7620, 0xbf9d: 0x6c1c7420, + 0xbfa1: 0x6c1c9620, 0xbfa2: 0x6c056620, + 0xbfa6: 0x6c126a20, + 0xbfa9: 0x6c07b020, 0xbfaa: 0x6c128a20, 0xbfab: 0x6c0ebc20, + 0xbfac: 0x6c12b220, 0xbfad: 0x6c1c9820, + 0xbfb0: 0x6c0a7020, 0xbfb1: 0x6c010820, 0xbfb3: 0x6c1c9a20, + 0xbfb7: 0x6c1c9c20, + 0xbfb9: 0x6c153420, + 0xbfbc: 0x6c122020, 0xbfbf: 0x6c1ca220, + // Block 0x2ff, offset 0xbfc0 + 0xbfc0: 0x6c017620, 0xbfc1: 0x6c0bd820, 0xbfc2: 0x6c1ca020, 0xbfc3: 0x6c1c9e20, + 0xbfc4: 0x6c056820, 0xbfc5: 0x6c0da020, 0xbfc7: 0x6c1caa20, + 0xbfc8: 0x6c1ca620, 0xbfca: 0x6c1ca420, 0xbfcb: 0x6c161620, + 0xbfcc: 0x6c066a20, + 0xbfd0: 0x6c0a3e20, 0xbfd1: 0x6c1ca820, 0xbfd2: 0x6c0fc420, 0xbfd3: 0x6c09c820, + 0xbfd7: 0x6c106820, + 0xbfd8: 0x6c1cb020, 0xbfd9: 0x6c1cae20, + 0xbfde: 0x6c1cac20, + 0xbfe0: 0x6c1cb220, 0xbfe1: 0x6c066c20, + 0xbfe8: 0x6c1cb420, 0xbfe9: 0x6c131420, 0xbfea: 0x6c0a0220, + 0xbfed: 0x6c1cb620, 0xbfee: 0x6c125220, + 0xbff3: 0x6c106a20, + 0xbff4: 0x6c0ebe20, + 0xbff9: 0x6c0f8c20, + 0xbffc: 0x6c1cb820, 0xbffd: 0x6c03c220, + // Block 0x300, offset 0xc000 + 0xc003: 0x6c0b2c20, + 0xc005: 0x6c127420, + 0xc00c: 0x6c039e20, 0xc00d: 0x6c10f020, + 0xc016: 0x6c1cba20, 0xc017: 0x6c088020, + 0xc018: 0x6c140820, 0xc019: 0x6c140a20, + 0xc01c: 0x6c017820, 0xc01d: 0x6c1cc420, + 0xc020: 0x6c0e8620, + 0xc024: 0x6c1cbe20, + 0xc02b: 0x6c022620, + 0xc030: 0x6c1d2420, 0xc031: 0x6c1cc220, + 0xc035: 0x6c110420, + 0xc038: 0x6c1cc020, 0xc03b: 0x6c1cbc20, + 0xc03d: 0x6c075020, 0xc03f: 0x6c1cc820, + // Block 0x301, offset 0xc040 + 0xc04e: 0x6c1cd420, 0xc04f: 0x6c1ce020, + 0xc050: 0x6c1cd020, 0xc052: 0x6c0fe420, + 0xc055: 0x6c1cda20, 0xc056: 0x6c12d620, + 0xc059: 0x6c1cce20, 0xc05b: 0x6c1cd820, + 0xc05c: 0x6c169620, 0xc05d: 0x6c088220, + 0xc060: 0x6c0da220, 0xc061: 0x6c1cca20, + 0xc065: 0x6c042820, 0xc066: 0x6c1cde20, 0xc067: 0x6c0bda20, + 0xc068: 0x6c014620, 0xc069: 0x6c1cd220, 0xc06a: 0x6c022820, 0xc06b: 0x6c1cdc20, + 0xc06f: 0x6c048a20, + 0xc071: 0x6c1cd620, + 0xc07a: 0x6c1ce220, + // Block 0x302, offset 0xc080 + 0xc081: 0x6c1ce620, 0xc082: 0x6c1cfa20, 0xc083: 0x6c1cf620, + 0xc086: 0x6c1cf020, + 0xc08a: 0x6c1cee20, 0xc08b: 0x6c16b820, + 0xc08d: 0x6c1cf220, + 0xc090: 0x6c048c20, 0xc092: 0x6c06be20, + 0xc095: 0x6c0a4020, + 0xc099: 0x6c1d0020, 0xc09a: 0x6c1ce420, + 0xc09f: 0x6c1cec20, + 0xc0a0: 0x6c1ccc20, 0xc0a2: 0x6c022c20, 0xc0a3: 0x6c1cf420, + 0xc0a4: 0x6c1cf820, 0xc0a5: 0x6c0e5620, + 0xc0a8: 0x6c076820, 0xc0a9: 0x6c01a820, 0xc0aa: 0x6c1ce820, 0xc0ab: 0x6c1cfe20, + 0xc0ac: 0x6c1cfc20, 0xc0ad: 0x6c048e20, 0xc0af: 0x6c0d4a20, + 0xc0b0: 0x6c02c020, + 0xc0b5: 0x6c056a20, 0xc0b7: 0x6c1cea20, + // Block 0x303, offset 0xc0c0 + 0xc0c1: 0x6c1d0220, 0xc0c3: 0x6c1d0820, + 0xc0c4: 0x6c1d0c20, + 0xc0c9: 0x6c090a20, 0xc0cb: 0x6c1d1820, + 0xc0cc: 0x6c0f5020, 0xc0cd: 0x6c1d0420, + 0xc0d2: 0x6c1d1420, + 0xc0d4: 0x6c022a20, 0xc0d6: 0x6c1d1020, 0xc0d7: 0x6c1d1220, + 0xc0da: 0x6c1d0a20, 0xc0db: 0x6c1d0e20, + 0xc0df: 0x6c066e20, + 0xc0e0: 0x6c156020, 0xc0e3: 0x6c031a20, + 0xc0e6: 0x6c012e20, 0xc0e7: 0x6c1d1620, + 0xc0e9: 0x6c111820, 0xc0ea: 0x6c001a20, + 0xc0f2: 0x6c122220, 0xc0f3: 0x6c1cc620, + 0xc0f4: 0x6c1d2220, 0xc0f5: 0x6c1d2a20, 0xc0f6: 0x6c151a20, + 0xc0f8: 0x6c1d1c20, + 0xc0fc: 0x6c0ffe20, 0xc0fd: 0x6c1d2620, + // Block 0x304, offset 0xc100 + 0xc105: 0x6c0ae820, 0xc106: 0x6c1d2820, 0xc107: 0x6c109620, + 0xc111: 0x6c171220, 0xc113: 0x6c1d2020, + 0xc118: 0x6c1d2c20, 0xc11a: 0x6c075220, + 0xc11c: 0x6c0c1620, 0xc11f: 0x6c006820, + 0xc120: 0x6c1d1e20, 0xc121: 0x6c1d1a20, 0xc123: 0x6c0cf020, + 0xc127: 0x6c1d0620, + 0xc128: 0x6c083c20, + 0xc130: 0x6c0d8420, 0xc131: 0x6c1d4420, 0xc133: 0x6c0cf220, + 0xc134: 0x6c1d3a20, 0xc136: 0x6c1d3420, 0xc137: 0x6c1d3620, + 0xc139: 0x6c095c20, 0xc13a: 0x6c1d3c20, 0xc13b: 0x6c1d4220, + // Block 0x305, offset 0xc140 + 0xc140: 0x6c1d3820, 0xc141: 0x6c099620, 0xc143: 0x6c1d3e20, + 0xc146: 0x6c1d3220, + 0xc148: 0x6c154820, 0xc149: 0x6c154620, + 0xc14d: 0x6c1d4620, 0xc14e: 0x6c1d4820, 0xc14f: 0x6c006a20, + 0xc155: 0x6c1d3020, + 0xc15a: 0x6c050c20, 0xc15b: 0x6c000c20, + 0xc15f: 0x6c031c20, + 0xc161: 0x6c1d4020, + 0xc167: 0x6c1d5020, + 0xc168: 0x6c1d4e20, + 0xc16c: 0x6c1d5820, + 0xc174: 0x6c1d5a20, + 0xc17c: 0x6c1d5620, 0xc17d: 0x6c1d5c20, 0xc17e: 0x6c1d4c20, 0xc17f: 0x6c1d5420, + // Block 0x306, offset 0xc180 + 0xc182: 0x6c1d5e20, + 0xc184: 0x6c1d6020, 0xc187: 0x6c1d4a20, + 0xc188: 0x6c08cc20, 0xc18a: 0x6c1d5220, 0xc18b: 0x6c0da420, + 0xc18c: 0x6c06c020, 0xc18d: 0x6c1d2e20, 0xc18e: 0x6c0b2e20, + 0xc193: 0x6c1d7a20, + 0xc195: 0x6c13aa20, + 0xc198: 0x6c1d6620, 0xc199: 0x6c1d6820, 0xc19a: 0x6c1d6a20, + 0xc19d: 0x6c1d7820, 0xc19f: 0x6c1d7620, + 0xc1a2: 0x6c148e20, 0xc1a3: 0x6c031e20, + 0xc1a5: 0x6c1d7220, 0xc1a7: 0x6c056e20, + 0xc1a8: 0x6c025c20, 0xc1ab: 0x6c1d6c20, + 0xc1ae: 0x6c163820, 0xc1af: 0x6c1d7020, + 0xc1b0: 0x6c006c20, 0xc1b1: 0x6c1d7420, 0xc1b3: 0x6c1d6220, + 0xc1b4: 0x6c1d6e20, 0xc1b5: 0x6c1d7c20, 0xc1b6: 0x6c056c20, 0xc1b7: 0x6c1d6420, + 0xc1be: 0x6c15c620, + // Block 0x307, offset 0xc1c0 + 0xc1c2: 0x6c156220, + 0xc1c7: 0x6c1d8220, + 0xc1ca: 0x6c1d8a20, + 0xc1ce: 0x6c0d3820, + 0xc1d0: 0x6c16ba20, 0xc1d1: 0x6c1d8c20, + 0xc1d4: 0x6c1d8620, 0xc1d6: 0x6c1d8020, + 0xc1d9: 0x6c1d7e20, 0xc1da: 0x6c1d8820, + 0xc1e4: 0x6c133820, 0xc1e7: 0x6c105020, + 0xc1e9: 0x6c057020, 0xc1eb: 0x6c1d8e20, + 0xc1ec: 0x6c1d8420, 0xc1ee: 0x6c1d9020, + 0xc1f2: 0x6c05da20, + 0xc1f6: 0x6c019a20, + 0xc1fa: 0x6c1da020, + 0xc1fe: 0x6c032020, + // Block 0x308, offset 0xc200 + 0xc203: 0x6c1d9c20, + 0xc206: 0x6c1d9e20, 0xc207: 0x6c076a20, + 0xc208: 0x6c1d9a20, 0xc209: 0x6c1d9620, 0xc20a: 0x6c1d9420, 0xc20b: 0x6c1da220, + 0xc20c: 0x6c1d9220, 0xc20d: 0x6c1da620, + 0xc210: 0x6c022e20, + 0xc223: 0x6c1daa20, + 0xc226: 0x6c1da820, + 0xc232: 0x6c0ec020, + 0xc234: 0x6c1db020, 0xc236: 0x6c1dac20, 0xc237: 0x6c1d9820, + 0xc238: 0x6c05dc20, 0xc23a: 0x6c1dae20, + 0xc23c: 0x6c1db620, 0xc23d: 0x6c1db420, 0xc23e: 0x6c1db820, 0xc23f: 0x6c1db220, + // Block 0x309, offset 0xc240 + 0xc240: 0x6c1dba20, + 0xc248: 0x6c1dbc20, 0xc249: 0x6c1dbe20, 0xc24a: 0x6c13ac20, + 0xc24c: 0x6c1dc220, 0xc24d: 0x6c1dc020, 0xc24e: 0x6c09ca20, + 0xc250: 0x6c0bdc20, 0xc251: 0x6c020420, 0xc252: 0x6c023020, + 0xc254: 0x6c1dc420, 0xc256: 0x6c003e20, + 0xc25a: 0x6c0c1820, 0xc25b: 0x6c1dc620, + 0xc25d: 0x6c2c0020, 0xc25e: 0x6c1dc820, 0xc25f: 0x6c05a620, + 0xc261: 0x6c1dca20, + 0xc266: 0x6c0c5e20, + 0xc26a: 0x6c1dcc20, + 0xc26e: 0x6c1dce20, 0xc26f: 0x6c03e020, + 0xc270: 0x6c1dd020, 0xc272: 0x6c1dd220, 0xc273: 0x6c1dd420, + 0xc274: 0x6c0da620, + 0xc278: 0x6c063a20, 0xc27b: 0x6c151220, + 0xc27f: 0x6c140c20, + // Block 0x30a, offset 0xc280 + 0xc280: 0x6c0a2020, 0xc281: 0x6c1dd620, + 0xc287: 0x6c0c6020, + 0xc288: 0x6c2d6c20, 0xc289: 0x6c122420, 0xc28b: 0x6c096420, + 0xc28d: 0x6c07b220, 0xc28e: 0x6c1dd820, + 0xc293: 0x6c0d8620, + 0xc295: 0x6c132620, + 0xc298: 0x6c0dda20, 0xc29b: 0x6c1dde20, + 0xc29e: 0x6c1dda20, + 0xc2a0: 0x6c1de020, 0xc2a3: 0x6c1ddc20, + 0xc2a8: 0x6c1de220, + 0xc2ae: 0x6c133a20, + 0xc2b1: 0x6c002e20, + 0xc2b6: 0x6c12d820, + 0xc2b9: 0x6c122620, + 0xc2bc: 0x6c1de420, 0xc2be: 0x6c1dea20, 0xc2bf: 0x6c0a7220, + // Block 0x30b, offset 0xc2c0 + 0xc2c0: 0x6c03e220, 0xc2c2: 0x6c1de620, 0xc2c3: 0x6c1df420, + 0xc2c4: 0x6c0a7420, + 0xc2c9: 0x6c1de820, 0xc2ca: 0x6c112c20, + 0xc2d1: 0x6c15c820, 0xc2d2: 0x6c1dec20, 0xc2d3: 0x6c1dee20, + 0xc2d4: 0x6c1df620, 0xc2d5: 0x6c100020, 0xc2d6: 0x6c1df020, 0xc2d7: 0x6c06c220, + 0xc2d8: 0x6c0c3c20, 0xc2db: 0x6c1e1220, + 0xc2dc: 0x6c11c820, 0xc2de: 0x6c0ddc20, + 0xc2eb: 0x6c122820, + 0xc2ec: 0x6c1e9c20, + 0xc2f1: 0x6c13cc20, + 0xc2f5: 0x6c0f5220, + 0xc2f9: 0x6c147e20, 0xc2fb: 0x6c1dfc20, + 0xc2fc: 0x6c017a20, 0xc2fd: 0x6c0e8820, + // Block 0x30c, offset 0xc300 + 0xc302: 0x6c1e0e20, + 0xc305: 0x6c0e1c20, 0xc306: 0x6c1e0220, 0xc307: 0x6c1e1020, + 0xc308: 0x6c1e0620, 0xc309: 0x6c1e1420, 0xc30a: 0x6c1e0c20, + 0xc30c: 0x6c1e0a20, 0xc30d: 0x6c118220, 0xc30f: 0x6c1dfe20, + 0xc310: 0x6c023220, 0xc311: 0x6c1dfa20, 0xc312: 0x6c044e20, 0xc313: 0x6c0dde20, + 0xc314: 0x6c1df220, 0xc317: 0x6c1df820, + 0xc318: 0x6c06c420, 0xc319: 0x6c0c3620, 0xc31b: 0x6c0a7620, + 0xc31c: 0x6c1e0820, 0xc31d: 0x6c114820, + 0xc320: 0x6c045020, 0xc321: 0x6c028420, + 0xc32c: 0x6c02c220, 0xc32d: 0x6c0b0620, 0xc32e: 0x6c1e1820, 0xc32f: 0x6c1e2220, + 0xc331: 0x6c1e1a20, 0xc333: 0x6c05de20, + 0xc335: 0x6c1e2420, 0xc336: 0x6c081820, 0xc337: 0x6c072e20, + 0xc33e: 0x6c099820, 0xc33f: 0x6c1e0020, + // Block 0x30d, offset 0xc340 + 0xc341: 0x6c08ce20, 0xc342: 0x6c1e1e20, + 0xc347: 0x6c088420, + 0xc348: 0x6c1e2020, 0xc349: 0x6c004820, + 0xc34c: 0x6c1e1620, + 0xc351: 0x6c0ec220, + 0xc359: 0x6c045220, + 0xc35f: 0x6c049020, + 0xc367: 0x6c1e1c20, + 0xc368: 0x6c000e20, 0xc36b: 0x6c079e20, + 0xc36f: 0x6c0b3020, + 0xc37a: 0x6c0f5420, + 0xc37d: 0x6c120820, 0xc37e: 0x6c1e2820, 0xc37f: 0x6c0cf820, + // Block 0x30e, offset 0xc380 + 0xc389: 0x6c0d4c20, + 0xc38c: 0x6c082a20, 0xc38d: 0x6c1e2a20, 0xc38f: 0x6c1e2e20, + 0xc390: 0x6c1e2620, + 0xc395: 0x6c139a20, 0xc397: 0x6c0eea20, + 0xc39c: 0x6c0cf420, + 0xc3a7: 0x6c13ce20, + 0xc3a8: 0x6c092c20, 0xc3a9: 0x6c1e4620, 0xc3ab: 0x6c1e4420, + 0xc3ae: 0x6c0bb420, + 0xc3b2: 0x6c05e020, + 0xc3b6: 0x6c1e3820, 0xc3b7: 0x6c0a7a20, + 0xc3ba: 0x6c10b820, 0xc3bb: 0x6c110620, + // Block 0x30f, offset 0xc3c0 + 0xc3c0: 0x6c1e3420, 0xc3c3: 0x6c0cf620, + 0xc3c8: 0x6c098020, 0xc3c9: 0x6c1e3e20, + 0xc3cc: 0x6c0a7820, 0xc3ce: 0x6c1e3220, 0xc3cf: 0x6c1e3c20, + 0xc3d2: 0x6c114a20, + 0xc3d6: 0x6c1e3020, + 0xc3d8: 0x6c052620, 0xc3db: 0x6c02ae20, + 0xc3df: 0x6c1e4020, + 0xc3e0: 0x6c161e20, 0xc3e1: 0x6c07b420, 0xc3e2: 0x6c0e1e20, 0xc3e3: 0x6c1e3a20, + 0xc3e5: 0x6c0c3820, 0xc3e7: 0x6c06c620, + 0xc3e8: 0x6c0b8c20, 0xc3e9: 0x6c014820, 0xc3ea: 0x6c0cb420, 0xc3eb: 0x6c1e3620, + 0xc3ec: 0x6c03f620, + 0xc3f2: 0x6c057220, + 0xc3f4: 0x6c0f0e20, 0xc3f5: 0x6c1e4220, + 0xc3fb: 0x6c0cfa20, + 0xc3fe: 0x6c1e4820, + // Block 0x310, offset 0xc400 + 0xc400: 0x6c1e4c20, 0xc403: 0x6c0d6620, + 0xc404: 0x6c1e5820, 0xc406: 0x6c1e4e20, + 0xc409: 0x6c1e5220, + 0xc40f: 0x6c129e20, + 0xc410: 0x6c0f5620, 0xc412: 0x6c1e5420, + 0xc416: 0x6c156420, + 0xc41a: 0x6c159c20, 0xc41b: 0x6c032220, + 0xc421: 0x6c001c20, 0xc423: 0x6c1e5020, + 0xc429: 0x6c1e4a20, + 0xc42e: 0x6c03a020, + 0xc434: 0x6c014a20, 0xc436: 0x6c1e5620, + 0xc43a: 0x6c159e20, + // Block 0x311, offset 0xc440 + 0xc446: 0x6c1e5e20, + 0xc44d: 0x6c0d6e20, 0xc44f: 0x6c1e6c20, + 0xc453: 0x6c1e6020, + 0xc456: 0x6c1e5a20, 0xc457: 0x6c1e6820, + 0xc45c: 0x6c1e2c20, + 0xc466: 0x6c1e6220, + 0xc468: 0x6c1e6a20, + 0xc46c: 0x6c11e420, 0xc46d: 0x6c100220, + 0xc474: 0x6c1e5c20, 0xc476: 0x6c1e6420, + 0xc47a: 0x6c057420, + 0xc47e: 0x6c07fa20, + // Block 0x312, offset 0xc480 + 0xc482: 0x6c0c3a20, + 0xc48e: 0x6c1e7420, + 0xc498: 0x6c0f7820, + 0xc4a7: 0x6c1e6e20, + 0xc4a9: 0x6c145420, + 0xc4af: 0x6c1e7020, + 0xc4b6: 0x6c1e7220, + 0xc4b8: 0x6c14ec20, 0xc4ba: 0x6c0bc420, + // Block 0x313, offset 0xc4c0 + 0xc4c3: 0x6c05a820, + 0xc4c8: 0x6c1e8020, + 0xc4d2: 0x6c083e20, 0xc4d3: 0x6c1e7a20, + 0xc4d5: 0x6c1e7820, + 0xc4da: 0x6c110820, + 0xc4de: 0x6c105220, + 0xc4e4: 0x6c0f8e20, 0xc4e5: 0x6c1e7c20, + 0xc4e9: 0x6c1e7e20, 0xc4eb: 0x6c12fa20, + 0xc4ed: 0x6c112e20, 0xc4ee: 0x6c081a20, + 0xc4f0: 0x6c0c6220, 0xc4f2: 0x6c143420, + 0xc4f9: 0x6c028620, 0xc4fb: 0x6c1e8c20, + 0xc4fc: 0x6c1e8220, + // Block 0x314, offset 0xc500 + 0xc501: 0x6c15a020, 0xc502: 0x6c1e9020, + 0xc505: 0x6c1e8820, 0xc507: 0x6c1e8a20, + 0xc50d: 0x6c0cfc20, + 0xc512: 0x6c1e8620, + 0xc514: 0x6c1e0420, + 0xc518: 0x6c1e8e20, 0xc51a: 0x6c1e8420, + 0xc520: 0x6c1e9820, 0xc521: 0x6c1e9a20, 0xc522: 0x6c0f7a20, 0xc523: 0x6c1e9e20, + 0xc526: 0x6c081c20, 0xc527: 0x6c1e9420, + 0xc52c: 0x6c03e420, 0xc52f: 0x6c1ea020, + 0xc531: 0x6c1e9220, 0xc532: 0x6c1ea820, + 0xc534: 0x6c1ea620, 0xc536: 0x6c1ea420, + 0xc53a: 0x6c1eaa20, + 0xc53d: 0x6c1eae20, 0xc53e: 0x6c0aea20, + // Block 0x315, offset 0xc540 + 0xc540: 0x6c1eac20, + 0xc545: 0x6c1eb420, + 0xc558: 0x6c1eb020, + 0xc55c: 0x6c1eb220, 0xc55d: 0x6c1e6620, + 0xc563: 0x6c1eb820, + 0xc564: 0x6c1eb620, + 0xc56a: 0x6c1e7620, 0xc56b: 0x6c1eba20, + 0xc56c: 0x6c1ea220, 0xc56f: 0x6c088620, + 0xc574: 0x6c1ebc20, 0xc575: 0x6c1ebe20, 0xc576: 0x6c1ec220, 0xc577: 0x6c1ec020, + 0xc578: 0x6c1ec420, 0xc579: 0x6c023420, 0xc57b: 0x6c06c820, + 0xc57e: 0x6c13d020, 0xc57f: 0x6c0bde20, + // Block 0x316, offset 0xc580 + 0xc585: 0x6c063c20, + 0xc588: 0x6c1ec820, + 0xc58d: 0x6c1ece20, 0xc58f: 0x6c12c020, + 0xc591: 0x6c042a20, + 0xc595: 0x6c1ecc20, 0xc596: 0x6c1eca20, 0xc597: 0x6c114c20, + 0xc598: 0x6c1ed020, 0xc599: 0x6c049220, + 0xc59d: 0x6c1ed420, 0xc59e: 0x6c1ed220, + 0xc5a2: 0x6c032420, 0xc5a3: 0x6c084020, + 0xc5a6: 0x6c109820, + 0xc5ac: 0x6c057620, + 0xc5b0: 0x6c0bac20, 0xc5b2: 0x6c1ed620, + 0xc5b4: 0x6c0be020, 0xc5b5: 0x6c0f7c20, 0xc5b7: 0x6c12da20, + 0xc5b8: 0x6c1ed820, + // Block 0x317, offset 0xc5c0 + 0xc5c2: 0x6c1eda20, 0xc5c3: 0x6c1edc20, + 0xc5c7: 0x6c134820, + 0xc5c8: 0x6c1b5020, 0xc5c9: 0x6c0c0c20, + 0xc5cc: 0x6c12b420, 0xc5ce: 0x6c07c820, + 0xc5d0: 0x6c122a20, 0xc5d1: 0x6c11e620, + 0xc5d7: 0x6c0fc620, + 0xc5d9: 0x6c164a20, 0xc5db: 0x6c1ee020, + 0xc5dc: 0x6c093020, 0xc5df: 0x6c1ee220, + 0xc5e1: 0x6c002c20, + 0xc5e4: 0x6c04d020, 0xc5e5: 0x6c0c1a20, 0xc5e7: 0x6c12dc20, + 0xc5eb: 0x6c1ee420, + 0xc5ec: 0x6c085820, 0xc5ed: 0x6c0e4220, 0xc5ef: 0x6c088a20, + 0xc5f0: 0x6c0b3220, + 0xc5f7: 0x6c1ee620, + 0xc5f9: 0x6c13d220, + 0xc5fc: 0x6c016a20, 0xc5fd: 0x6c088c20, + // Block 0x318, offset 0xc600 + 0xc601: 0x6c1eec20, 0xc603: 0x6c1ee820, + 0xc604: 0x6c1eee20, 0xc605: 0x6c163a20, 0xc606: 0x6c1eea20, + 0xc60b: 0x6c0c7620, + 0xc60c: 0x6c1ef020, 0xc60f: 0x6c0d5c20, + 0xc612: 0x6c1ef220, + 0xc617: 0x6c03a420, + 0xc619: 0x6c1ef620, 0xc61b: 0x6c1ef420, + 0xc620: 0x6c1ef820, 0xc621: 0x6c1efa20, 0xc622: 0x6c03a620, + 0xc625: 0x6c10e020, 0xc626: 0x6c0e2020, 0xc627: 0x6c044420, + 0xc628: 0x6c088e20, 0xc629: 0x6c0cfe20, + 0xc62c: 0x6c0a0420, 0xc62d: 0x6c002020, + 0xc631: 0x6c1efc20, + 0xc63a: 0x6c017c20, 0xc63b: 0x6c1f0420, + // Block 0x319, offset 0xc640 + 0xc642: 0x6c06ca20, 0xc643: 0x6c1f0220, + 0xc646: 0x6c076e20, 0xc647: 0x6c0a7c20, + 0xc64a: 0x6c1f0020, + 0xc64c: 0x6c0a7e20, 0xc64e: 0x6c14d020, 0xc64f: 0x6c076c20, + 0xc653: 0x6c006e20, + 0xc654: 0x6c0c1c20, + 0xc65c: 0x6c1f0e20, 0xc65f: 0x6c0be220, + 0xc660: 0x6c010a20, + 0xc665: 0x6c09f620, 0xc667: 0x6c146020, + 0xc668: 0x6c07fc20, + 0xc66d: 0x6c0a8020, 0xc66f: 0x6c0bce20, + 0xc674: 0x6c1f0c20, 0xc675: 0x6c1f0820, 0xc676: 0x6c1f0a20, + 0xc67c: 0x6c0e8a20, 0xc67f: 0x6c1f4a20, + // Block 0x31a, offset 0xc680 + 0xc681: 0x6c1f1620, 0xc682: 0x6c08d020, 0xc683: 0x6c06cc20, + 0xc684: 0x6c1f1220, + 0xc689: 0x6c1f1420, 0xc68b: 0x6c0b3420, + 0xc68f: 0x6c1f1020, + 0xc692: 0x6c083220, + 0xc69d: 0x6c1f1a20, 0xc69e: 0x6c1f1820, 0xc69f: 0x6c1f2220, + 0xc6a2: 0x6c1f2420, + 0xc6a4: 0x6c1f1c20, 0xc6a6: 0x6c023820, 0xc6a7: 0x6c1f1e20, + 0xc6a8: 0x6c1f2020, 0xc6a9: 0x6c120a20, + 0xc6ae: 0x6c12de20, 0xc6af: 0x6c057820, + 0xc6b0: 0x6c1f2620, + 0xc6b4: 0x6c0be420, 0xc6b6: 0x6c0a8220, + 0xc6ba: 0x6c0e5820, + // Block 0x31b, offset 0xc6c0 + 0xc6c1: 0x6c04b620, 0xc6c3: 0x6c1f2820, + 0xc6c4: 0x6c1f3020, 0xc6c7: 0x6c01ce20, + 0xc6c8: 0x6c1f2a20, 0xc6c9: 0x6c1f2e20, + 0xc6ce: 0x6c1f2c20, + 0xc6d1: 0x6c0a2220, + 0xc6d6: 0x6c0e4420, 0xc6d7: 0x6c004a20, + 0xc6d8: 0x6c1f3220, + 0xc6dd: 0x6c1f3420, + 0xc6e2: 0x6c0ec420, + 0xc6e6: 0x6c16aa20, + 0xc6eb: 0x6c085a20, + 0xc6ee: 0x6c13ae20, + 0xc6f4: 0x6c140e20, + 0xc6f8: 0x6c1f4220, 0xc6f9: 0x6c1f3820, + 0xc6fc: 0x6c1f3e20, 0xc6fe: 0x6c1f3c20, + // Block 0x31c, offset 0xc700 + 0xc701: 0x6c1f3620, + 0xc704: 0x6c1f4020, 0xc707: 0x6c10a420, + 0xc709: 0x6c1f3a20, + 0xc716: 0x6c1f4420, + 0xc719: 0x6c0a2420, 0xc71a: 0x6c1f4620, + 0xc71c: 0x6c15a220, 0xc71d: 0x6c119420, + 0xc720: 0x6c1f4820, + 0xc726: 0x6c1f4c20, + 0xc729: 0x6c1f4e20, + 0xc730: 0x6c1f5020, 0xc732: 0x6c04bc20, 0xc733: 0x6c010c20, + 0xc734: 0x6c06ce20, 0xc735: 0x6c1f5220, 0xc737: 0x6c1f5420, + 0xc738: 0x6c0a2e20, 0xc739: 0x6c0d0020, + 0xc73c: 0x6c191220, 0xc73d: 0x6c0cb820, 0xc73e: 0x6c0cb620, 0xc73f: 0x6c0da820, + // Block 0x31d, offset 0xc740 + 0xc740: 0x6c07a620, 0xc743: 0x6c17ce20, + 0xc748: 0x6c05c020, 0xc749: 0x6c156620, 0xc74b: 0x6c13d420, + 0xc74d: 0x6c131820, 0xc74f: 0x6c1f5620, + 0xc754: 0x6c07fe20, 0xc755: 0x6c0eee20, 0xc756: 0x6c1f5820, 0xc757: 0x6c16e220, + 0xc75b: 0x6c141020, + 0xc75d: 0x6c0ec620, 0xc75e: 0x6c1f5a20, 0xc75f: 0x6c03a820, + 0xc766: 0x6c1f5c20, 0xc767: 0x6c1f5e20, + 0xc768: 0x6c150420, 0xc76a: 0x6c149820, 0xc76b: 0x6c148020, + 0xc76c: 0x6c144c20, 0xc76d: 0x6c081e20, 0xc76e: 0x6c1f6220, + 0xc771: 0x6c096620, + 0xc774: 0x6c143620, 0xc776: 0x6c1f6620, 0xc777: 0x6c1f6c20, + 0xc778: 0x6c1f6a20, 0xc77a: 0x6c03a220, + 0xc77d: 0x6c042c20, 0xc77f: 0x6c1f6420, + // Block 0x31e, offset 0xc780 + 0xc781: 0x6c1f6820, + 0xc786: 0x6c1f6e20, + 0xc789: 0x6c0bb620, + 0xc78e: 0x6c160220, 0xc78f: 0x6c005220, + 0xc790: 0x6c07d820, 0xc791: 0x6c0d7020, 0xc793: 0x6c094a20, + 0xc796: 0x6c0aee20, + 0xc799: 0x6c1f7420, + 0xc79c: 0x6c0fc820, 0xc79e: 0x6c1f7020, 0xc79f: 0x6c0d4e20, + 0xc7a0: 0x6c1f7220, 0xc7a1: 0x6c0aec20, 0xc7a2: 0x6c150a20, 0xc7a3: 0x6c1f7620, + 0xc7a4: 0x6c1f7820, 0xc7a5: 0x6c15dc20, + 0xc7aa: 0x6c1f8220, + 0xc7ad: 0x6c06d020, 0xc7af: 0x6c114e20, + 0xc7b0: 0x6c1f7c20, 0xc7b1: 0x6c100420, 0xc7b2: 0x6c1efe20, 0xc7b3: 0x6c1f0620, + 0xc7b5: 0x6c040a20, 0xc7b7: 0x6c113220, + 0xc7bc: 0x6c1f8020, 0xc7be: 0x6c0a8420, 0xc7bf: 0x6c11e820, + // Block 0x31f, offset 0xc7c0 + 0xc7c5: 0x6c1f8c20, 0xc7c7: 0x6c125420, + 0xc7c9: 0x6c1f7a20, 0xc7cb: 0x6c1f8620, + 0xc7cc: 0x6c1f8420, + 0xc7d0: 0x6c0c1e20, + 0xc7d5: 0x6c146e20, 0xc7d7: 0x6c166e20, + 0xc7da: 0x6c146220, + 0xc7dc: 0x6c01d020, 0xc7dd: 0x6c089020, + 0xc7e0: 0x6c171420, 0xc7e1: 0x6c1f8a20, 0xc7e2: 0x6c0bae20, + 0xc7e6: 0x6c1f8820, + 0xc7e9: 0x6c1f7e20, + 0xc7ef: 0x6c063e20, + 0xc7f3: 0x6c1f9620, + 0xc7f4: 0x6c1f9220, 0xc7f6: 0x6c01d220, 0xc7f7: 0x6c1f8e20, + 0xc7f8: 0x6c1f9a20, 0xc7f9: 0x6c1fa620, + // Block 0x320, offset 0xc800 + 0xc801: 0x6c0d8820, + 0xc804: 0x6c135a20, 0xc806: 0x6c1faa20, + 0xc80a: 0x6c126020, + 0xc80e: 0x6c1fa820, 0xc80f: 0x6c118420, + 0xc810: 0x6c141220, 0xc811: 0x6c032620, 0xc813: 0x6c0c6e20, + 0xc814: 0x6c09cc20, + 0xc818: 0x6c0f1620, 0xc81a: 0x6c156820, + 0xc81d: 0x6c1fa020, 0xc81e: 0x6c1f9e20, + 0xc822: 0x6c1fa220, + 0xc824: 0x6c1f9c20, 0xc827: 0x6c1fac20, + 0xc829: 0x6c1f9820, + 0xc82c: 0x6c1f9420, 0xc82e: 0x6c1fa420, 0xc82f: 0x6c1f9020, + 0xc831: 0x6c0e8c20, 0xc833: 0x6c154020, + 0xc834: 0x6c091c20, 0xc835: 0x6c080020, + 0xc83b: 0x6c078c20, + 0xc83e: 0x6c147220, 0xc83f: 0x6c027620, + // Block 0x321, offset 0xc840 + 0xc842: 0x6c0f0c20, 0xc843: 0x6c107c20, + 0xc844: 0x6c010e20, + 0xc853: 0x6c0c6420, + 0xc856: 0x6c0be820, 0xc857: 0x6c053820, + 0xc85e: 0x6c1fb020, + 0xc861: 0x6c06d220, 0xc862: 0x6c02ec20, + 0xc869: 0x6c1fb420, 0xc86a: 0x6c02dc20, 0xc86b: 0x6c1fc020, + 0xc872: 0x6c1fba20, + 0xc874: 0x6c0c6620, + 0xc878: 0x6c028a20, 0xc879: 0x6c077020, + 0xc87c: 0x6c028820, 0xc87d: 0x6c07b620, + // Block 0x322, offset 0xc880 + 0xc880: 0x6c1fb620, 0xc881: 0x6c05ae20, 0xc882: 0x6c057a20, 0xc883: 0x6c100620, + 0xc886: 0x6c1fb220, + 0xc888: 0x6c004c20, + 0xc88d: 0x6c1fb820, 0xc88e: 0x6c1fbc20, + 0xc890: 0x6c04c220, 0xc891: 0x6c053c20, 0xc893: 0x6c032820, + 0xc894: 0x6c040220, + 0xc899: 0x6c1fc220, + 0xc89c: 0x6c080a20, 0xc89d: 0x6c147620, 0xc89f: 0x6c084220, + 0xc8a3: 0x6c1fc420, + 0xc8a7: 0x6c127c20, + 0xc8b4: 0x6c1fdc20, 0xc8b6: 0x6c019e20, 0xc8b7: 0x6c1fc620, + 0xc8be: 0x6c1fe820, 0xc8bf: 0x6c1fc820, + // Block 0x323, offset 0xc8c0 + 0xc8c1: 0x6c164c20, 0xc8c3: 0x6c1fd620, + 0xc8c5: 0x6c116220, + 0xc8cd: 0x6c1fe620, 0xc8cf: 0x6c1fcc20, + 0xc8d3: 0x6c002820, + 0xc8d4: 0x6c1fd020, 0xc8d7: 0x6c06d420, + 0xc8db: 0x6c1fd420, + 0xc8dd: 0x6c1fd220, 0xc8df: 0x6c1fca20, + 0xc8e0: 0x6c1fe020, 0xc8e2: 0x6c0a8620, + 0xc8e6: 0x6c1ab420, 0xc8e7: 0x6c067020, + 0xc8e8: 0x6c160420, + 0xc8ed: 0x6c1fce20, 0xc8ef: 0x6c0f5820, + 0xc8f0: 0x6c023a20, 0xc8f1: 0x6c077220, 0xc8f3: 0x6c1fbe20, + 0xc8f5: 0x6c1fde20, 0xc8f6: 0x6c02b620, + 0xc8f9: 0x6c1fda20, 0xc8fa: 0x6c1fe220, + 0xc8fc: 0x6c100820, + // Block 0x324, offset 0xc900 + 0xc904: 0x6c03ac20, 0xc906: 0x6c201e20, + 0xc909: 0x6c14e220, 0xc90a: 0x6c1fec20, 0xc90b: 0x6c03aa20, + 0xc90d: 0x6c1ffa20, + 0xc912: 0x6c141420, + 0xc914: 0x6c1ffc20, 0xc915: 0x6c200020, 0xc917: 0x6c200820, + 0xc918: 0x6c1ff020, 0xc91a: 0x6c0e0820, + 0xc91f: 0x6c100a20, + 0xc920: 0x6c201020, 0xc921: 0x6c1ff620, 0xc923: 0x6c200a20, + 0xc927: 0x6c1ffe20, + 0xc92e: 0x6c0b3620, 0xc92f: 0x6c201220, + 0xc932: 0x6c0be620, + 0xc939: 0x6c200e20, 0xc93a: 0x6c032a20, + // Block 0x325, offset 0xc940 + 0xc940: 0x6c172420, 0xc941: 0x6c1fea20, + 0xc944: 0x6c200620, 0xc945: 0x6c007020, + 0xc948: 0x6c1fee20, 0xc94b: 0x6c14c420, + 0xc94c: 0x6c1ff820, 0xc94d: 0x6c0b0820, 0xc94e: 0x6c0efe20, 0xc94f: 0x6c1fe420, + 0xc952: 0x6c200420, + 0xc959: 0x6c0bb820, 0xc95a: 0x6c201820, 0xc95b: 0x6c02d620, + 0xc95c: 0x6c05e220, + 0xc961: 0x6c201c20, 0xc962: 0x6c1ff220, 0xc963: 0x6c201a20, + 0xc965: 0x6c200c20, 0xc966: 0x6c1ff420, + 0xc968: 0x6c201420, 0xc96a: 0x6c201620, + 0xc970: 0x6c203820, + 0xc974: 0x6c108420, 0xc976: 0x6c200220, + 0xc979: 0x6c203020, + 0xc97d: 0x6c203420, 0xc97f: 0x6c0f2020, + // Block 0x326, offset 0xc980 + 0xc98a: 0x6c15a420, + 0xc993: 0x6c130820, + 0xc994: 0x6c202a20, 0xc995: 0x6c0d8c20, + 0xc999: 0x6c203620, 0xc99a: 0x6c0cba20, + 0xc99c: 0x6c202420, 0xc99d: 0x6c203e20, 0xc99e: 0x6c203c20, + 0xc9a0: 0x6c10c620, 0xc9a1: 0x6c203a20, 0xc9a2: 0x6c10bc20, + 0xc9aa: 0x6c204220, 0xc9ab: 0x6c202820, + 0xc9ad: 0x6c04b820, 0xc9ae: 0x6c202e20, 0xc9af: 0x6c0a0620, + 0xc9b3: 0x6c116420, + 0xc9b4: 0x6c203220, 0xc9b5: 0x6c04be20, 0xc9b7: 0x6c202220, + 0xc9b8: 0x6c202620, 0xc9b9: 0x6c202020, + 0xc9bc: 0x6c16e420, 0xc9bd: 0x6c02a820, 0xc9be: 0x6c202c20, + // Block 0x327, offset 0xc9c0 + 0xc9c1: 0x6c204020, 0xc9c2: 0x6c025e20, + 0xc9ca: 0x6c07e620, + 0xc9ce: 0x6c013620, + 0xc9d1: 0x6c206220, + 0xc9d4: 0x6c16e620, 0xc9d5: 0x6c206820, + 0xc9db: 0x6c0b3820, + 0xc9dc: 0x6c206620, + 0xc9e0: 0x6c206420, + 0xc9e7: 0x6c205e20, + 0xc9ee: 0x6c204620, + 0xc9f1: 0x6c208020, 0xc9f2: 0x6c204420, + 0xc9f4: 0x6c206a20, + 0xc9fb: 0x6c205a20, + 0xc9fe: 0x6c205020, 0xc9ff: 0x6c204a20, + // Block 0x328, offset 0xca00 + 0xca01: 0x6c204c20, 0xca03: 0x6c205c20, + 0xca07: 0x6c319e20, + 0xca0a: 0x6c205620, 0xca0b: 0x6c06d620, + 0xca0c: 0x6c0f0020, 0xca0d: 0x6c0d0420, 0xca0e: 0x6c205220, + 0xca10: 0x6c204820, 0xca13: 0x6c204e20, + 0xca18: 0x6c15a620, 0xca19: 0x6c146820, + 0xca1d: 0x6c205820, 0xca1e: 0x6c206c20, + 0xca27: 0x6c207c20, + 0xca28: 0x6c206e20, 0xca2b: 0x6c208820, + 0xca2d: 0x6c208420, + 0xca32: 0x6c207a20, + 0xca39: 0x6c207820, 0xca3b: 0x6c0f1020, + 0xca3d: 0x6c0d0620, 0xca3f: 0x6c207420, + // Block 0x329, offset 0xca40 + 0xca42: 0x6c207020, + 0xca45: 0x6c207e20, + 0xca4a: 0x6c208a20, 0xca4b: 0x6c124a20, + 0xca4c: 0x6c209620, + 0xca52: 0x6c208c20, 0xca53: 0x6c209220, + 0xca54: 0x6c208620, 0xca57: 0x6c0e9c20, + 0xca59: 0x6c128c20, 0xca5b: 0x6c207220, + 0xca5e: 0x6c208220, 0xca5f: 0x6c0a8820, + 0xca61: 0x6c14ee20, 0xca62: 0x6c20aa20, 0xca63: 0x6c209020, + 0xca69: 0x6c05e420, 0xca6a: 0x6c017e20, 0xca6b: 0x6c02b220, + 0xca6e: 0x6c206020, + 0xca75: 0x6c0a8a20, 0xca76: 0x6c209a20, + 0xca78: 0x6c20a820, 0xca79: 0x6c098220, 0xca7a: 0x6c02d820, + 0xca7d: 0x6c0e1020, + // Block 0x32a, offset 0xca80 + 0xca84: 0x6c209420, 0xca87: 0x6c209e20, + 0xca88: 0x6c20a620, 0xca8b: 0x6c049420, + 0xca98: 0x6c040420, 0xca99: 0x6c20a220, + 0xca9f: 0x6c03ae20, + 0xcaa1: 0x6c107e20, 0xcaa2: 0x6c20a020, + 0xcaa6: 0x6c20a420, + 0xcab2: 0x6c209820, + 0xcab8: 0x6c209c20, + 0xcabf: 0x6c02b420, + // Block 0x32b, offset 0xcac0 + 0xcac0: 0x6c0e4620, + 0xcac4: 0x6c20b220, + 0xcacd: 0x6c20ae20, 0xcace: 0x6c067220, + 0xcad0: 0x6c20ac20, + 0xcad7: 0x6c20b820, + 0xcadc: 0x6c1fae20, + 0xcae0: 0x6c20b020, 0xcae2: 0x6c20b420, 0xcae3: 0x6c20b620, + 0xcaea: 0x6c20ce20, + 0xcaec: 0x6c20c620, 0xcaee: 0x6c1fd820, + 0xcaf3: 0x6c20c420, + 0xcaf8: 0x6c20c220, 0xcafb: 0x6c20bc20, + // Block 0x32c, offset 0xcb00 + 0xcb01: 0x6c208e20, 0xcb02: 0x6c20c020, 0xcb03: 0x6c20be20, + 0xcb11: 0x6c20ca20, 0xcb13: 0x6c16d020, + 0xcb1a: 0x6c20d020, 0xcb1b: 0x6c051e20, + 0xcb1e: 0x6c20c820, 0xcb1f: 0x6c20cc20, + 0xcb28: 0x6c11ae20, 0xcb2a: 0x6c20d220, + 0xcb3a: 0x6c20da20, 0xcb3b: 0x6c20d420, + // Block 0x32d, offset 0xcb40 + 0xcb44: 0x6c15f220, 0xcb45: 0x6c20d620, + 0xcb4a: 0x6c207620, + 0xcb52: 0x6c20dc20, + 0xcb56: 0x6c20de20, + 0xcb5d: 0x6c00e620, 0xcb5f: 0x6c20e220, + 0xcb60: 0x6c05b220, 0xcb61: 0x6c08d220, 0xcb63: 0x6c04d220, + 0xcb67: 0x6c018020, + 0xcb72: 0x6c15ca20, + 0xcb77: 0x6c20e620, + 0xcb78: 0x6c20e420, 0xcb79: 0x6c20ea20, 0xcb7a: 0x6c03e620, + 0xcb7d: 0x6c04d420, 0xcb7e: 0x6c032c20, + // Block 0x32e, offset 0xcb80 + 0xcb83: 0x6c20f020, + 0xcb87: 0x6c20ee20, + 0xcb89: 0x6c20f220, + 0xcb8c: 0x6c01d420, 0xcb8e: 0x6c0e2220, + 0xcb90: 0x6c20f420, 0xcb93: 0x6c032e20, + 0xcb94: 0x6c20f820, + 0xcb99: 0x6c20f620, 0xcb9b: 0x6c20fa20, + 0xcb9f: 0x6c20fc20, + 0xcba1: 0x6c20fe20, 0xcba2: 0x6c089220, 0xcba3: 0x6c0bea20, + 0xcba4: 0x6c075a20, 0xcba6: 0x6c12fc20, + 0xcba9: 0x6c139c20, 0xcbaa: 0x6c170c20, + 0xcbaf: 0x6c08be20, + 0xcbb3: 0x6c07b820, + 0xcbb4: 0x6c16ac20, + 0xcbb8: 0x6c210020, 0xcbb9: 0x6c210220, 0xcbbb: 0x6c089420, + 0xcbbf: 0x6c210420, + // Block 0x32f, offset 0xcbc0 + 0xcbc0: 0x6c210620, 0xcbc3: 0x6c210a20, + 0xcbc4: 0x6c210820, 0xcbc6: 0x6c144420, + 0xcbc9: 0x6c0a0820, 0xcbca: 0x6c096820, 0xcbcb: 0x6c085c20, + 0xcbcd: 0x6c210c20, + 0xcbd5: 0x6c211020, 0xcbd6: 0x6c0b0a20, + 0xcbd8: 0x6c210e20, + 0xcbde: 0x6c211220, + 0xcbe4: 0x6c211420, + 0xcbea: 0x6c211620, 0xcbeb: 0x6c211820, + 0xcbef: 0x6c211a20, + 0xcbf1: 0x6c211e20, 0xcbf2: 0x6c211c20, 0xcbf3: 0x6c212020, + 0xcbf4: 0x6c018220, 0xcbf5: 0x6c0e4820, 0xcbf7: 0x6c212220, + 0xcbfa: 0x6c082020, 0xcbfb: 0x6c028c20, + 0xcbfc: 0x6c212420, 0xcbff: 0x6c0fb020, + // Block 0x330, offset 0xcc00 + 0xcc00: 0x6c1a7220, + 0xcc05: 0x6c03b220, 0xcc06: 0x6c212620, + 0xcc0b: 0x6c212820, + 0xcc0d: 0x6c13b020, 0xcc0e: 0x6c146420, + 0xcc12: 0x6c107620, 0xcc13: 0x6c212a20, + 0xcc14: 0x6c122c20, + 0xcc18: 0x6c125620, 0xcc1b: 0x6c14f620, + 0xcc1f: 0x6c212c20, + 0xcc2b: 0x6c213020, + 0xcc2c: 0x6c212e20, 0xcc2f: 0x6c213420, + 0xcc33: 0x6c213220, + // Block 0x331, offset 0xcc40 + 0xcc48: 0x6c213820, + 0xcc4f: 0x6c089620, + 0xcc51: 0x6c14b220, 0xcc53: 0x6c213a20, + 0xcc54: 0x6c213c20, 0xcc57: 0x6c03b420, + 0xcc5b: 0x6c213e20, + 0xcc63: 0x6c214220, + 0xcc64: 0x6c214020, + 0xcc74: 0x6c0b8e20, 0xcc77: 0x6c128e20, + 0xcc78: 0x6c011020, + 0xcc7e: 0x6c11ea20, + // Block 0x332, offset 0xcc80 + 0xcc80: 0x6c0f5a20, 0xcc81: 0x6c09ce20, 0xcc82: 0x6c042e20, + 0xcc8e: 0x6c11ec20, + 0xcc90: 0x6c08ec20, + 0xcc95: 0x6c214620, 0xcc97: 0x6c033020, + 0xcc9a: 0x6c016c20, + 0xcc9d: 0x6c10cc20, 0xcc9e: 0x6c214420, 0xcc9f: 0x6c06d820, + 0xcca0: 0x6c0e5a20, 0xcca2: 0x6c214820, + 0xcca8: 0x6c215820, 0xccaa: 0x6c214a20, + 0xccb0: 0x6c0d7a20, 0xccb2: 0x6c043020, 0xccb3: 0x6c215a20, + 0xccba: 0x6c05b420, + 0xccbd: 0x6c03b620, 0xccbe: 0x6c215620, + // Block 0x333, offset 0xccc0 + 0xccc1: 0x6c215220, 0xccc2: 0x6c214c20, 0xccc3: 0x6c15cc20, + 0xccc8: 0x6c0ef020, + 0xcccc: 0x6c109a20, 0xcccd: 0x6c214e20, + 0xccd0: 0x6c215e20, 0xccd2: 0x6c215c20, 0xccd3: 0x6c052a20, + 0xccd6: 0x6c019220, + 0xccd9: 0x6c078e20, 0xccda: 0x6c215020, 0xccdb: 0x6c215420, + 0xcce1: 0x6c144220, 0xcce2: 0x6c0de020, + 0xcceb: 0x6c148220, + 0xccee: 0x6c216e20, + 0xccf1: 0x6c217020, 0xccf3: 0x6c01d620, + 0xccf8: 0x6c132820, 0xccf9: 0x6c154a20, 0xccfa: 0x6c217420, 0xccfb: 0x6c08d620, + 0xccfc: 0x6c0a8c20, 0xccfd: 0x6c216620, 0xccfe: 0x6c217220, 0xccff: 0x6c014c20, + // Block 0x334, offset 0xcd00 + 0xcd01: 0x6c049620, + 0xcd04: 0x6c216020, 0xcd05: 0x6c216a20, + 0xcd09: 0x6c0c6820, 0xcd0a: 0x6c118620, + 0xcd0c: 0x6c122e20, + 0xcd13: 0x6c216420, + 0xcd15: 0x6c13d620, 0xcd17: 0x6c216820, + 0xcd19: 0x6c217a20, 0xcd1b: 0x6c217620, + 0xcd1d: 0x6c216c20, + 0xcd21: 0x6c13d820, 0xcd22: 0x6c113420, 0xcd23: 0x6c043220, + 0xcd25: 0x6c0f7620, + 0xcd28: 0x6c0e8e20, 0xcd2a: 0x6c217c20, + 0xcd2f: 0x6c217820, + 0xcd30: 0x6c0daa20, 0xcd31: 0x6c216220, 0xcd33: 0x6c011220, + // Block 0x335, offset 0xcd40 + 0xcd4b: 0x6c15a820, + 0xcd4c: 0x6c219220, + 0xcd52: 0x6c219020, + 0xcd57: 0x6c0c6c20, + 0xcd59: 0x6c218a20, 0xcd5b: 0x6c15e420, + 0xcd5e: 0x6c105420, 0xcd5f: 0x6c217e20, + 0xcd65: 0x6c0efa20, + 0xcd69: 0x6c011420, 0xcd6a: 0x6c06da20, 0xcd6b: 0x6c218420, + 0xcd72: 0x6c099a20, 0xcd73: 0x6c218e20, + 0xcd75: 0x6c218c20, 0xcd76: 0x6c218220, + 0xcd78: 0x6c218820, 0xcd7b: 0x6c02c420, + 0xcd7d: 0x6c218620, 0xcd7e: 0x6c113620, + // Block 0x336, offset 0xcd80 + 0xcd81: 0x6c162420, + 0xcd84: 0x6c0af020, 0xcd85: 0x6c0c6a20, + 0xcd99: 0x6c219e20, 0xcd9a: 0x6c219a20, + 0xcd9c: 0x6c12b620, + 0xcda3: 0x6c219420, + 0xcda4: 0x6c219820, 0xcda6: 0x6c00f020, + 0xcda9: 0x6c06dc20, 0xcdaa: 0x6c16e820, + 0xcdac: 0x6c026e20, 0xcdae: 0x6c12e020, + 0xcdb4: 0x6c15ce20, 0xcdb7: 0x6c023c20, + 0xcdb8: 0x6c0b3a20, 0xcdb9: 0x6c219c20, + // Block 0x337, offset 0xcdc0 + 0xcdc5: 0x6c21a620, + 0xcdc8: 0x6c0a8e20, + 0xcdcc: 0x6c156c20, 0xcdce: 0x6c21a020, + 0xcdd3: 0x6c219620, + 0xcdd5: 0x6c21a220, + 0xcdd9: 0x6c168420, 0xcddb: 0x6c101220, + 0xcddc: 0x6c106c20, + 0xcdef: 0x6c026020, + 0xcdf2: 0x6c012620, + 0xcdf5: 0x6c21ae20, + 0xcdf8: 0x6c21b420, + 0xcdfc: 0x6c164e20, + // Block 0x338, offset 0xce00 + 0xce00: 0x6c15d420, + 0xce05: 0x6c21c220, 0xce06: 0x6c21b620, 0xce07: 0x6c21b020, + 0xce0b: 0x6c167020, + 0xce0c: 0x6c21bc20, + 0xce11: 0x6c09e020, 0xce12: 0x6c21c020, + 0xce15: 0x6c21ca20, + 0xce18: 0x6c100e20, 0xce19: 0x6c21c620, + 0xce1e: 0x6c21ba20, + 0xce21: 0x6c0e2420, + 0xce24: 0x6c21c820, 0xce26: 0x6c21b220, + 0xce28: 0x6c21be20, 0xce2a: 0x6c21cc20, 0xce2b: 0x6c00b820, + 0xce2c: 0x6c21b820, 0xce2e: 0x6c21ce20, + 0xce31: 0x6c0b3c20, 0xce33: 0x6c0a0a20, + 0xce35: 0x6c132220, 0xce37: 0x6c077420, + 0xce39: 0x6c21a820, 0xce3a: 0x6c21c420, 0xce3b: 0x6c0fa020, + // Block 0x339, offset 0xce40 + 0xce45: 0x6c0bec20, 0xce47: 0x6c02c620, + 0xce48: 0x6c07ba20, 0xce49: 0x6c0a9020, 0xce4a: 0x6c21ac20, 0xce4b: 0x6c09d020, + 0xce53: 0x6c057c20, + 0xce55: 0x6c21aa20, + 0xce59: 0x6c21d620, 0xce5a: 0x6c0a2620, 0xce5b: 0x6c061420, + 0xce5d: 0x6c21f420, 0xce5f: 0x6c21e820, + 0xce60: 0x6c045420, 0xce61: 0x6c0fca20, 0xce63: 0x6c21de20, + 0xce64: 0x6c21f020, 0xce65: 0x6c001e20, 0xce66: 0x6c00e020, + 0xce69: 0x6c01aa20, 0xce6b: 0x6c21e220, + 0xce6c: 0x6c0d5020, 0xce6d: 0x6c21d020, 0xce6e: 0x6c21d420, 0xce6f: 0x6c06de20, + 0xce78: 0x6c21f620, 0xce7a: 0x6c21ec20, + 0xce7e: 0x6c21dc20, + // Block 0x33a, offset 0xce80 + 0xce83: 0x6c21ea20, + 0xce8a: 0x6c14a620, + 0xce8d: 0x6c21e620, 0xce8e: 0x6c21ee20, + 0xce96: 0x6c064020, + 0xce98: 0x6c0a9220, 0xce9b: 0x6c0e2620, + 0xce9f: 0x6c21da20, + 0xcea7: 0x6c156a20, + 0xceab: 0x6c21e020, + 0xceae: 0x6c21d220, 0xceaf: 0x6c101020, + 0xceb2: 0x6c21d820, + 0xceb6: 0x6c21e420, + 0xcebe: 0x6c172620, 0xcebf: 0x6c090c20, + // Block 0x33b, offset 0xcec0 + 0xcec0: 0x6c149020, 0xcec2: 0x6c21f820, + 0xcecc: 0x6c11bc20, 0xcecf: 0x6c221020, + 0xced0: 0x6c061620, + 0xced6: 0x6c0a0c20, + 0xced8: 0x6c21fc20, + 0xcedc: 0x6c162620, 0xcedd: 0x6c06e020, 0xcedf: 0x6c221620, + 0xcee2: 0x6c009c20, + 0xcee5: 0x6c221220, + 0xceea: 0x6c21fa20, + 0xceef: 0x6c220620, + 0xcef2: 0x6c220a20, + 0xcef6: 0x6c15aa20, 0xcef7: 0x6c220020, + 0xcefa: 0x6c0f8820, + 0xcefd: 0x6c220420, + // Block 0x33c, offset 0xcf00 + 0xcf02: 0x6c221420, + 0xcf04: 0x6c220820, 0xcf05: 0x6c14de20, + 0xcf09: 0x6c21fe20, 0xcf0b: 0x6c08d420, + 0xcf0c: 0x6c222e20, + 0xcf11: 0x6c02c820, 0xcf13: 0x6c220220, + 0xcf14: 0x6c220c20, 0xcf15: 0x6c220e20, + 0xcf1d: 0x6c0dd020, 0xcf1e: 0x6c0dac20, + 0xcf2c: 0x6c221e20, 0xcf2f: 0x6c222a20, + 0xcf32: 0x6c222620, + 0xcf34: 0x6c0f7e20, 0xcf37: 0x6c223420, + 0xcf38: 0x6c222020, + 0xcf3e: 0x6c222220, 0xcf3f: 0x6c21f220, + // Block 0x33d, offset 0xcf40 + 0xcf41: 0x6c045e20, 0xcf42: 0x6c129020, + 0xcf46: 0x6c090e20, + 0xcf49: 0x6c074a20, + 0xcf4f: 0x6c16ea20, + 0xcf51: 0x6c221a20, 0xcf53: 0x6c223220, + 0xcf54: 0x6c014e20, 0xcf55: 0x6c0d0820, + 0xcf60: 0x6c119620, 0xcf62: 0x6c033220, 0xcf63: 0x6c16bc20, + 0xcf6b: 0x6c149220, + 0xcf6c: 0x6c0f1420, + 0xcf71: 0x6c222820, 0xcf72: 0x6c222c20, + 0xcf78: 0x6c0ca020, + 0xcf7e: 0x6c223020, 0xcf7f: 0x6c222420, + // Block 0x33e, offset 0xcf80 + 0xcf81: 0x6c221820, + 0xcf85: 0x6c033620, + 0xcf94: 0x6c05b620, + 0xcf98: 0x6c224c20, 0xcf9b: 0x6c224220, + 0xcf9c: 0x6c0c7020, 0xcf9f: 0x6c02ba20, + 0xcfa4: 0x6c0a0e20, 0xcfa6: 0x6c225420, + 0xcfad: 0x6c224620, 0xcfae: 0x6c0ec820, 0xcfaf: 0x6c224020, + 0xcfb0: 0x6c0f2220, + 0xcfb4: 0x6c228620, + 0xcfb8: 0x6c223a20, 0xcfba: 0x6c223820, + 0xcfbc: 0x6c224a20, + // Block 0x33f, offset 0xcfc0 + 0xcfc0: 0x6c223e20, 0xcfc1: 0x6c223c20, 0xcfc2: 0x6c224820, + 0xcfc4: 0x6c0bc220, 0xcfc6: 0x6c223620, + 0xcfce: 0x6c224e20, + 0xcfd1: 0x6c225020, + 0xcfd7: 0x6c033420, + 0xcfe1: 0x6c225a20, 0xcfe3: 0x6c225820, + 0xcfe4: 0x6c225c20, + 0xcfea: 0x6c226220, + 0xcff1: 0x6c0fb220, 0xcff3: 0x6c225620, + 0xcff9: 0x6c225e20, + // Block 0x340, offset 0xd000 + 0xd000: 0x6c05aa20, 0xd001: 0x6c0dea20, 0xd002: 0x6c225220, 0xd003: 0x6c111a20, + 0xd006: 0x6c226020, + 0xd014: 0x6c226a20, 0xd015: 0x6c226620, + 0xd018: 0x6c226c20, 0xd01b: 0x6c227220, + 0xd01f: 0x6c226420, + 0xd020: 0x6c073020, 0xd021: 0x6c10f420, + 0xd024: 0x6c21a420, + 0xd02b: 0x6c15f420, + 0xd02c: 0x6c226820, 0xd02e: 0x6c227020, 0xd02f: 0x6c0de220, + 0xd031: 0x6c226e20, 0xd033: 0x6c224420, + 0xd036: 0x6c2e8020, + 0xd03a: 0x6c227820, + 0xd03e: 0x6c228020, + // Block 0x341, offset 0xd040 + 0xd041: 0x6c227c20, + 0xd049: 0x6c227420, 0xd04b: 0x6c227620, + 0xd04f: 0x6c227e20, + 0xd051: 0x6c227a20, + 0xd055: 0x6c12b820, + 0xd058: 0x6c228a20, 0xd05a: 0x6c228420, 0xd05b: 0x6c228220, + 0xd05d: 0x6c228820, 0xd05e: 0x6c109020, 0xd05f: 0x6c228c20, + 0xd066: 0x6c0e9e20, 0xd067: 0x6c0dd220, + 0xd06c: 0x6c0bca20, + 0xd070: 0x6c228e20, 0xd072: 0x6c229220, + 0xd07e: 0x6c229020, + // Block 0x342, offset 0xd080 + 0xd08c: 0x6c221c20, + 0xd091: 0x6c229420, + 0xd098: 0x6c10b620, + 0xd0a3: 0x6c229620, + 0xd0ab: 0x6c01d820, + 0xd0af: 0x6c101420, + 0xd0b0: 0x6c023e20, + 0xd0b8: 0x6c043420, + 0xd0bc: 0x6c094c20, 0xd0bd: 0x6c07bc20, + // Block 0x343, offset 0xd0c0 + 0xd0c9: 0x6c16d220, 0xd0ca: 0x6c0b9020, + 0xd0ce: 0x6c015020, + 0xd0d2: 0x6c229a20, + 0xd0d9: 0x6c229820, + 0xd0ec: 0x6c22a020, 0xd0ed: 0x6c0e2820, 0xd0ee: 0x6c22a620, 0xd0ef: 0x6c229c20, + 0xd0f3: 0x6c22a420, + 0xd0f8: 0x6c22a220, 0xd0f9: 0x6c0fac20, 0xd0fa: 0x6c007220, + // Block 0x344, offset 0xd100 + 0xd108: 0x6c16b220, 0xd10b: 0x6c22aa20, + 0xd10f: 0x6c00cc20, + 0xd119: 0x6c22ae20, + 0xd11d: 0x6c22ac20, 0xd11f: 0x6c22a820, + 0xd131: 0x6c229e20, + 0xd139: 0x6c13da20, + 0xd13d: 0x6c22b220, + // Block 0x345, offset 0xd140 + 0xd149: 0x6c22b020, + 0xd154: 0x6c015220, + 0xd159: 0x6c22b620, 0xd15a: 0x6c133c20, + 0xd15c: 0x6c22b420, + 0xd161: 0x6c14ba20, + 0xd166: 0x6c0a9620, + 0xd176: 0x6c0ca220, + 0xd17c: 0x6c0a9420, + // Block 0x346, offset 0xd180 + 0xd189: 0x6c16be20, + 0xd18c: 0x6c22c220, 0xd18e: 0x6c0c7220, + 0xd195: 0x6c22ba20, 0xd196: 0x6c22c420, + 0xd199: 0x6c015420, + 0xd1a2: 0x6c22c020, + 0xd1a4: 0x6c116620, 0xd1a5: 0x6c22b820, 0xd1a6: 0x6c22be20, 0xd1a7: 0x6c0a9820, + 0xd1a9: 0x6c120220, + 0xd1ac: 0x6c22c620, 0xd1ae: 0x6c093220, + 0xd1bd: 0x6c0c7420, + // Block 0x347, offset 0xd1c0 + 0xd1c4: 0x6c22cc20, + 0xd1c8: 0x6c22bc20, 0xd1ca: 0x6c053220, + 0xd1cf: 0x6c22c820, + 0xd1d4: 0x6c15ac20, 0xd1d5: 0x6c22ce20, + 0xd1d9: 0x6c31a620, + 0xd1df: 0x6c09ea20, + 0xd1e8: 0x6c22d020, + 0xd1ec: 0x6c22d220, + 0xd1f1: 0x6c110020, + 0xd1f9: 0x6c22d620, + 0xd1fe: 0x6c22d820, + // Block 0x348, offset 0xd200 + 0xd203: 0x6c110a20, + 0xd208: 0x6c101620, 0xd209: 0x6c22dc20, + 0xd20e: 0x6c22e020, + 0xd210: 0x6c167220, 0xd212: 0x6c22da20, + 0xd214: 0x6c22de20, 0xd215: 0x6c015620, 0xd217: 0x6c22d420, + 0xd21f: 0x6c19d420, + 0xd220: 0x6c22e220, + 0xd225: 0x6c0d0a20, 0xd226: 0x6c084420, 0xd227: 0x6c22e620, + 0xd22c: 0x6c22e420, 0xd22d: 0x6c0b0c20, 0xd22e: 0x6c191420, + 0xd235: 0x6c22e820, + 0xd239: 0x6c22ec20, 0xd23b: 0x6c22ca20, + 0xd23c: 0x6c22ea20, 0xd23f: 0x6c22ee20, + // Block 0x349, offset 0xd240 + 0xd246: 0x6c119820, + 0xd24d: 0x6c22f020, + 0xd250: 0x6c22f220, + 0xd25b: 0x6c22f420, + 0xd268: 0x6c22f620, 0xd26a: 0x6c0f2c20, + 0xd26c: 0x6c22fa20, 0xd26d: 0x6c22f820, + 0xd270: 0x6c22fc20, 0xd272: 0x6c22fe20, + 0xd275: 0x6c094e20, 0xd276: 0x6c12e220, + 0xd27a: 0x6c152820, 0xd27b: 0x6c230020, + 0xd27c: 0x6c230220, 0xd27d: 0x6c0ce820, 0xd27e: 0x6c08d820, 0xd27f: 0x6c230420, + // Block 0x34a, offset 0xd280 + 0xd280: 0x6c230620, + 0xd286: 0x6c230820, 0xd287: 0x6c137c20, + 0xd288: 0x6c11ee20, 0xd28b: 0x6c230a20, + 0xd28c: 0x6c115220, + 0xd292: 0x6c0eca20, + 0xd298: 0x6c230c20, 0xd299: 0x6c020620, 0xd29b: 0x6c044620, + 0xd29d: 0x6c14dc20, 0xd29f: 0x6c14bc20, + 0xd2a1: 0x6c01a020, 0xd2a2: 0x6c16ec20, + 0xd2a7: 0x6c143820, + 0xd2a9: 0x6c132c20, + 0xd2b2: 0x6c0bee20, + 0xd2b4: 0x6c230e20, + 0xd2b9: 0x6c106e20, + 0xd2bd: 0x6c05e620, 0xd2be: 0x6c231020, + // Block 0x34b, offset 0xd2c0 + 0xd2c0: 0x6c07c020, 0xd2c1: 0x6c231420, 0xd2c2: 0x6c231220, + 0xd2c7: 0x6c231620, + 0xd2d2: 0x6c231820, + 0xd2d6: 0x6c231a20, + 0xd2e0: 0x6c03e820, 0xd2e2: 0x6c231c20, + 0xd2e7: 0x6c231e20, + 0xd2ec: 0x6c05e820, 0xd2ef: 0x6c11f020, + 0xd2f2: 0x6c232220, + 0xd2f6: 0x6c0af220, + 0xd2f9: 0x6c232020, + // Block 0x34c, offset 0xd300 + 0xd302: 0x6c049820, 0xd303: 0x6c232420, + 0xd304: 0x6c232820, 0xd306: 0x6c232620, + 0xd30e: 0x6c232a20, + 0xd310: 0x6c064220, 0xd312: 0x6c232c20, + 0xd317: 0x6c04fa20, + 0xd319: 0x6c0cbc20, 0xd31b: 0x6c075620, + 0xd320: 0x6c233020, 0xd321: 0x6c233220, 0xd322: 0x6c232e20, + 0xd329: 0x6c096a20, + 0xd32c: 0x6c107820, 0xd32d: 0x6c049a20, + 0xd337: 0x6c233620, + 0xd338: 0x6c0e0c20, 0xd339: 0x6c233420, + 0xd33c: 0x6c16ee20, 0xd33d: 0x6c116820, + // Block 0x34d, offset 0xd340 + 0xd34a: 0x6c233c20, + 0xd356: 0x6c234020, 0xd357: 0x6c233a20, + 0xd35b: 0x6c14f820, + 0xd35c: 0x6c233e20, 0xd35d: 0x6c234220, 0xd35f: 0x6c165020, + 0xd365: 0x6c234a20, + 0xd369: 0x6c234820, 0xd36a: 0x6c0ea020, 0xd36b: 0x6c10fe20, + 0xd36e: 0x6c05ea20, 0xd36f: 0x6c234620, + 0xd374: 0x6c234420, 0xd376: 0x6c156e20, 0xd377: 0x6c157020, + 0xd37e: 0x6c234c20, 0xd37f: 0x6c015820, + // Block 0x34e, offset 0xd380 + 0xd384: 0x6c074820, 0xd385: 0x6c089820, + 0xd38e: 0x6c234e20, 0xd38f: 0x6c235020, + 0xd397: 0x6c235420, + 0xd3a3: 0x6c09d220, + 0xd3a8: 0x6c235820, 0xd3aa: 0x6c235620, + 0xd3b0: 0x6c235a20, 0xd3b2: 0x6c028e20, + 0xd3b5: 0x6c235e20, + 0xd3b8: 0x6c235c20, 0xd3ba: 0x6c236220, 0xd3bb: 0x6c236020, + // Block 0x34f, offset 0xd3c0 + 0xd3c4: 0x6c061820, 0xd3c7: 0x6c161820, + 0xd3c9: 0x6c04c020, 0xd3cb: 0x6c018420, + 0xd3d6: 0x6c04fc20, + 0xd3e9: 0x6c037220, + 0xd3f2: 0x6c169820, 0xd3f3: 0x6c236620, + 0xd3fb: 0x6c236a20, + // Block 0x350, offset 0xd400 + 0xd400: 0x6c236c20, 0xd402: 0x6c01da20, + 0xd408: 0x6c236420, 0xd40a: 0x6c084620, + 0xd40d: 0x6c0ef220, 0xd40e: 0x6c236820, + 0xd41e: 0x6c237220, + 0xd420: 0x6c096c20, + 0xd425: 0x6c236e20, + 0xd42a: 0x6c056020, + 0xd42d: 0x6c11f220, 0xd42e: 0x6c237020, + 0xd431: 0x6c23a620, + 0xd438: 0x6c237c20, + 0xd43e: 0x6c061a20, + // Block 0x351, offset 0xd440 + 0xd443: 0x6c043620, + 0xd445: 0x6c237620, 0xd446: 0x6c160620, + 0xd449: 0x6c162820, + 0xd462: 0x6c0de420, + 0xd465: 0x6c237a20, + 0xd472: 0x6c237e20, 0xd473: 0x6c167420, + 0xd474: 0x6c04d620, 0xd475: 0x6c125820, 0xd476: 0x6c113820, + 0xd47a: 0x6c238020, + 0xd47f: 0x6c238420, + // Block 0x352, offset 0xd480 + 0xd481: 0x6c238a20, + 0xd495: 0x6c238220, + 0xd499: 0x6c238820, 0xd49a: 0x6c067420, 0xd49b: 0x6c011620, + 0xd49c: 0x6c238c20, 0xd49e: 0x6c0ba420, 0xd49f: 0x6c238620, + 0xd4a0: 0x6c168020, 0xd4a3: 0x6c239220, + 0xd4a4: 0x6c31a220, + 0xd4a9: 0x6c238e20, 0xd4aa: 0x6c239420, + 0xd4af: 0x6c237820, + 0xd4b0: 0x6c239020, 0xd4b3: 0x6c079020, + 0xd4b6: 0x6c239620, + 0xd4be: 0x6c239820, + // Block 0x353, offset 0xd4c0 + 0xd4c3: 0x6c160820, + 0xd4cb: 0x6c239a20, + 0xd4de: 0x6c239c20, + 0xd4e2: 0x6c237420, + 0xd4e7: 0x6c239e20, + 0xd4f0: 0x6c033820, + 0xd4fd: 0x6c08da20, + // Block 0x354, offset 0xd500 + 0xd50a: 0x6c23a020, + 0xd50f: 0x6c23a220, + 0xd514: 0x6c23a420, + 0xd51c: 0x6c00f220, + 0xd520: 0x6c23a820, 0xd522: 0x6c129220, 0xd523: 0x6c23aa20, + 0xd526: 0x6c02f820, 0xd527: 0x6c23ac20, + 0xd529: 0x6c23ae20, + 0xd52e: 0x6c23b020, + 0xd530: 0x6c23b420, 0xd531: 0x6c23b620, 0xd532: 0x6c23b220, + 0xd536: 0x6c12c220, 0xd537: 0x6c23ba20, + 0xd538: 0x6c23b820, + // Block 0x355, offset 0xd540 + 0xd543: 0x6c23be20, + 0xd544: 0x6c23bc20, 0xd545: 0x6c23c020, + 0xd54c: 0x6c23c220, 0xd54d: 0x6c23c620, 0xd54e: 0x6c23c420, + 0xd551: 0x6c074e20, 0xd553: 0x6c23ca20, + 0xd555: 0x6c23c820, + 0xd558: 0x6c033a20, 0xd55a: 0x6c0b6a20, + 0xd55c: 0x6c0fa420, 0xd55e: 0x6c23cc20, 0xd55f: 0x6c0bf020, + 0xd563: 0x6c084820, + 0xd565: 0x6c016e20, 0xd566: 0x6c23ce20, + 0xd568: 0x6c15ae20, 0xd56b: 0x6c139e20, + 0xd56c: 0x6c23d020, + 0xd570: 0x6c0fb420, 0xd571: 0x6c157220, 0xd572: 0x6c06e220, 0xd573: 0x6c0b3e20, + 0xd577: 0x6c0e4a20, + 0xd578: 0x6c18ca20, 0xd57a: 0x6c0ecc20, 0xd57b: 0x6c020820, + 0xd57c: 0x6c23d220, + // Block 0x356, offset 0xd580 + 0xd584: 0x6c23d420, 0xd586: 0x6c23de20, + 0xd589: 0x6c23da20, 0xd58a: 0x6c23d820, 0xd58b: 0x6c1ec620, + 0xd58c: 0x6c024020, 0xd58d: 0x6c23d620, 0xd58f: 0x6c007420, + 0xd591: 0x6c11b420, + 0xd594: 0x6c11f420, + 0xd599: 0x6c162a20, 0xd59a: 0x6c23e020, 0xd59b: 0x6c23dc20, + 0xd59c: 0x6c0e6c20, 0xd59d: 0x6c0bcc20, + 0xd5a0: 0x6c11b620, 0xd5a2: 0x6c127620, + 0xd5a4: 0x6c23e420, 0xd5a5: 0x6c162020, 0xd5a6: 0x6c057e20, 0xd5a7: 0x6c23e620, + 0xd5a9: 0x6c23e220, 0xd5aa: 0x6c120c20, 0xd5ab: 0x6c23e820, + 0xd5ad: 0x6c23ea20, + 0xd5b0: 0x6c007620, 0xd5b3: 0x6c0af420, + 0xd5b4: 0x6c23f420, 0xd5b6: 0x6c23ee20, 0xd5b7: 0x6c10c220, + 0xd5b8: 0x6c23ec20, + 0xd5bf: 0x6c03b820, + // Block 0x357, offset 0xd5c0 + 0xd5c2: 0x6c23fa20, + 0xd5c6: 0x6c23f020, 0xd5c7: 0x6c23f220, + 0xd5c9: 0x6c23f820, 0xd5ca: 0x6c23f620, 0xd5cb: 0x6c126620, + 0xd5ce: 0x6c0cc020, 0xd5cf: 0x6c0cbe20, + 0xd5d1: 0x6c03ea20, + 0xd5d4: 0x6c23fc20, + 0xd5da: 0x6c23fe20, + 0xd5dd: 0x6c240020, + 0xd5e3: 0x6c240420, + 0xd5e5: 0x6c240220, + 0xd5eb: 0x6c012820, + 0xd5f1: 0x6c241420, 0xd5f2: 0x6c123020, 0xd5f3: 0x6c240820, + 0xd5f5: 0x6c240c20, + 0xd5f8: 0x6c241020, 0xd5f9: 0x6c0b4020, + 0xd5fc: 0x6c241220, 0xd5fd: 0x6c240e20, 0xd5fe: 0x6c091020, + // Block 0x358, offset 0xd600 + 0xd602: 0x6c240620, 0xd603: 0x6c240a20, + 0xd605: 0x6c12a020, 0xd607: 0x6c0a9a20, + 0xd60a: 0x6c241820, + 0xd60d: 0x6c241620, + 0xd612: 0x6c241a20, + 0xd614: 0x6c08dc20, 0xd615: 0x6c077620, + 0xd618: 0x6c101a20, 0xd619: 0x6c241c20, 0xd61b: 0x6c0f0620, + 0xd61e: 0x6c242020, + 0xd622: 0x6c160a20, 0xd623: 0x6c241e20, + 0xd629: 0x6c0d0e20, + 0xd630: 0x6c242a20, 0xd632: 0x6c242e20, 0xd633: 0x6c243020, + 0xd634: 0x6c0e5c20, + 0xd63a: 0x6c242c20, + 0xd63c: 0x6c242620, 0xd63e: 0x6c242220, 0xd63f: 0x6c242420, + // Block 0x359, offset 0xd640 + 0xd641: 0x6c242820, + 0xd649: 0x6c243620, 0xd64b: 0x6c243220, + 0xd64d: 0x6c243420, + 0xd65f: 0x6c243820, + 0xd660: 0x6c243c20, 0xd661: 0x6c243e20, 0xd662: 0x6c244020, + 0xd664: 0x6c244220, 0xd667: 0x6c243a20, + 0xd670: 0x6c244620, + 0xd674: 0x6c244420, + 0xd67b: 0x6c244820, + // Block 0x35a, offset 0xd680 + 0xd682: 0x6c165220, + 0xd686: 0x6c244e20, 0xd687: 0x6c244a20, + 0xd688: 0x6c244c20, + 0xd68c: 0x6c037420, + 0xd692: 0x6c154c20, + 0xd696: 0x6c136c20, + 0xd698: 0x6c245220, + 0xd69c: 0x6c245020, + 0xd6a1: 0x6c245420, 0xd6a2: 0x6c245620, + 0xd6a7: 0x6c245e20, + 0xd6a8: 0x6c245820, 0xd6a9: 0x6c245a20, 0xd6aa: 0x6c245c20, + 0xd6ac: 0x6c246020, + 0xd6b0: 0x6c246220, 0xd6b2: 0x6c246420, + 0xd6b6: 0x6c246620, + 0xd6b8: 0x6c246820, 0xd6ba: 0x6c11be20, 0xd6bb: 0x6c0fcc20, + 0xd6bc: 0x6c246a20, 0xd6bd: 0x6c118820, 0xd6be: 0x6c128420, + // Block 0x35b, offset 0xd6c0 + 0xd6c0: 0x6c246c20, 0xd6c3: 0x6c246e20, + 0xd6c4: 0x6c0f8020, 0xd6c6: 0x6c024220, 0xd6c7: 0x6c06e420, + 0xd6c8: 0x6c247020, 0xd6cb: 0x6c247220, + 0xd6ce: 0x6c247420, + 0xd6d0: 0x6c082620, 0xd6d3: 0x6c247820, + 0xd6d6: 0x6c247620, + 0xd6d9: 0x6c247a20, 0xd6da: 0x6c247c20, + 0xd6ee: 0x6c123220, + 0xd6f0: 0x6c247e20, + 0xd6f4: 0x6c248020, 0xd6f7: 0x6c317020, + 0xd6f8: 0x6c248220, 0xd6f9: 0x6c248420, 0xd6fa: 0x6c248620, + 0xd6ff: 0x6c083020, + // Block 0x35c, offset 0xd700 + 0xd702: 0x6c248820, 0xd703: 0x6c115020, + 0xd706: 0x6c145220, + 0xd708: 0x6c011820, 0xd70a: 0x6c012a20, + 0xd70d: 0x6c248a20, + 0xd712: 0x6c248e20, + 0xd716: 0x6c248c20, 0xd717: 0x6c100c20, + 0xd71b: 0x6c0bf220, + 0xd71c: 0x6c20e820, 0xd71e: 0x6c249020, 0xd71f: 0x6c14d220, + 0xd721: 0x6c249220, 0xd723: 0x6c033c20, + 0xd724: 0x6c120e20, 0xd725: 0x6c249420, 0xd727: 0x6c249620, + 0xd72a: 0x6c249820, + 0xd72e: 0x6c150820, + 0xd732: 0x6c14fa20, + 0xd734: 0x6c0eec20, + 0xd738: 0x6c0d1020, 0xd73b: 0x6c249c20, + 0xd73e: 0x6c0a1020, + // Block 0x35d, offset 0xd740 + 0xd741: 0x6c0a9c20, + 0xd744: 0x6c24a220, 0xd747: 0x6c24a020, + 0xd748: 0x6c249e20, 0xd749: 0x6c125a20, 0xd74b: 0x6c033e20, + 0xd74c: 0x6c05f220, + 0xd75b: 0x6c24ae20, + 0xd75e: 0x6c24a820, 0xd75f: 0x6c0b4220, + 0xd760: 0x6c14b420, + 0xd764: 0x6c24a620, 0xd765: 0x6c24aa20, 0xd766: 0x6c24ac20, + 0xd769: 0x6c24a420, + 0xd777: 0x6c24b020, + 0xd778: 0x6c24b220, 0xd77a: 0x6c0ece20, + 0xd77c: 0x6c037620, + // Block 0x35e, offset 0xd780 + 0xd780: 0x6c0e7e20, + 0xd787: 0x6c24b420, + 0xd79a: 0x6c24b620, 0xd79b: 0x6c24bc20, + 0xd7a1: 0x6c0b9220, 0xd7a3: 0x6c107020, + 0xd7a5: 0x6c24be20, 0xd7a6: 0x6c143a20, + 0xd7a8: 0x6c24b820, 0xd7ab: 0x6c24ba20, + 0xd7b9: 0x6c24c420, + 0xd7be: 0x6c24c220, 0xd7bf: 0x6c24c020, + // Block 0x35f, offset 0xd7c0 + 0xd7cb: 0x6c24c820, + 0xd7ce: 0x6c24c620, + 0xd7d1: 0x6c24ca20, + 0xd7de: 0x6c24ce20, + 0xd7e0: 0x6c24cc20, + 0xd7e5: 0x6c137220, + 0xd7ec: 0x6c09f820, 0xd7ed: 0x6c165420, + 0xd7f0: 0x6c24d020, 0xd7f3: 0x6c105620, + 0xd7f6: 0x6c24d220, + 0xd7f9: 0x6c24d420, 0xd7fb: 0x6c24dc20, + 0xd7fc: 0x6c24d820, 0xd7fd: 0x6c24da20, 0xd7ff: 0x6c24d620, + // Block 0x360, offset 0xd800 + 0xd807: 0x6c24de20, + 0xd80d: 0x6c24e020, + 0xd817: 0x6c24e220, + 0xd81a: 0x6c24e420, 0xd81b: 0x6c14be20, + 0xd81c: 0x6c24e620, + 0xd822: 0x6c153020, 0xd823: 0x6c24e820, + 0xd825: 0x6c0e5020, 0xd827: 0x6c117820, + 0xd829: 0x6c04fe20, + 0xd82d: 0x6c0e2a20, 0xd82e: 0x6c24ea20, 0xd82f: 0x6c049c20, + 0xd833: 0x6c0c2020, + 0xd83c: 0x6c24ec20, + // Block 0x361, offset 0xd840 + 0xd842: 0x6c079220, + 0xd84c: 0x6c24ee20, + 0xd852: 0x6c24f020, + 0xd854: 0x6c05ec20, 0xd855: 0x6c07c220, + 0xd860: 0x6c24f420, + 0xd865: 0x6c0fd820, 0xd866: 0x6c07c420, 0xd867: 0x6c040820, + 0xd872: 0x6c13dc20, + 0xd874: 0x6c113a20, + 0xd87a: 0x6c0fda20, + 0xd87f: 0x6c071420, + // Block 0x362, offset 0xd880 + 0xd885: 0x6c24f820, + 0xd89d: 0x6c0a9e20, + 0xd8ab: 0x6c162c20, + 0xd8ac: 0x6c06e620, 0xd8af: 0x6c05ee20, + 0xd8b2: 0x6c11a620, + 0xd8b4: 0x6c24fc20, + 0xd8bc: 0x6c250020, + // Block 0x363, offset 0xd8c0 + 0xd8c1: 0x6c067620, + 0xd8c6: 0x6c24fe20, 0xd8c7: 0x6c0f5c20, + 0xd8cc: 0x6c250420, 0xd8cd: 0x6c026220, 0xd8ce: 0x6c24fa20, + 0xd8d1: 0x6c123420, 0xd8d3: 0x6c00dc20, + 0xd8d5: 0x6c07f020, 0xd8d7: 0x6c172820, + 0xd8da: 0x6c250220, + 0xd8e3: 0x6c250620, + 0xd8e7: 0x6c136e20, + 0xd8e9: 0x6c0c3220, 0xd8ea: 0x6c250a20, + 0xd8ef: 0x6c250c20, + 0xd8f5: 0x6c250820, + 0xd8fa: 0x6c029020, + 0xd8fc: 0x6c251820, 0xd8fe: 0x6c251620, + // Block 0x364, offset 0xd900 + 0xd901: 0x6c08de20, + 0xd905: 0x6c251a20, 0xd906: 0x6c251020, + 0xd90a: 0x6c251c20, 0xd90b: 0x6c251220, + 0xd910: 0x6c121020, 0xd911: 0x6c250e20, + 0xd914: 0x6c251420, + 0xd91a: 0x6c252220, + 0xd927: 0x6c252020, + 0xd928: 0x6c145620, + 0xd92c: 0x6c251e20, 0xd92f: 0x6c009620, + 0xd934: 0x6c252620, + 0xd93d: 0x6c252420, + // Block 0x365, offset 0xd940 + 0xd941: 0x6c0aa020, + 0xd947: 0x6c252820, + 0xd94e: 0x6c0cc220, + 0xd951: 0x6c252c20, 0xd952: 0x6c252a20, + 0xd959: 0x6c252e20, + 0xd966: 0x6c24f220, + 0xd96a: 0x6c24f620, 0xd96b: 0x6c253220, + 0xd96c: 0x6c253020, + 0xd97a: 0x6c08e020, + 0xd97c: 0x6c169a20, 0xd97e: 0x6c093420, + // Block 0x366, offset 0xd980 + 0xd980: 0x6c253420, 0xd981: 0x6c055220, + 0xd987: 0x6c03ec20, + 0xd988: 0x6c03ba20, 0xd989: 0x6c089a20, + 0xd990: 0x6c157420, 0xd993: 0x6c254020, + 0xd995: 0x6c253e20, 0xd996: 0x6c0cc420, 0xd997: 0x6c253820, + 0xd99a: 0x6c253c20, + 0xd99d: 0x6c09e220, 0xd99e: 0x6c0b4420, 0xd99f: 0x6c253a20, + 0xd9a0: 0x6c253620, 0xd9a2: 0x6c10f820, + 0xd9a5: 0x6c0aa220, + 0xd9a8: 0x6c129420, + 0xd9ad: 0x6c07c620, + 0xd9b7: 0x6c101c20, + 0xd9ba: 0x6c254220, + 0xd9bf: 0x6c254420, + // Block 0x367, offset 0xd9c0 + 0xd9c0: 0x6c257020, 0xd9c1: 0x6c04d820, + 0xd9c4: 0x6c16fe20, 0xd9c5: 0x6c0ca620, + 0xd9ca: 0x6c254620, + 0xd9cd: 0x6c01dc20, 0xd9ce: 0x6c0f5e20, 0xd9cf: 0x6c131a20, + 0xd9dd: 0x6c254820, + 0xd9e6: 0x6c046020, 0xd9e7: 0x6c254a20, + 0xd9ea: 0x6c254e20, + 0xd9ee: 0x6c255020, + 0xd9f0: 0x6c10f620, 0xd9f3: 0x6c255220, + 0xd9f9: 0x6c255420, 0xd9fa: 0x6c255620, + 0xd9fd: 0x6c04da20, 0xd9fe: 0x6c01de20, 0xd9ff: 0x6c107220, + // Block 0x368, offset 0xda00 + 0xda00: 0x6c099c20, 0xda01: 0x6c089c20, + 0xda09: 0x6c255820, 0xda0b: 0x6c099e20, + 0xda11: 0x6c01cc20, 0xda12: 0x6c12a220, + 0xda15: 0x6c255a20, + 0xda18: 0x6c123620, + 0xda1f: 0x6c0cc620, + 0xda21: 0x6c256020, 0xda23: 0x6c256220, + 0xda24: 0x6c117620, 0xda26: 0x6c0b4620, 0xda27: 0x6c255c20, + 0xda29: 0x6c0e7620, + 0xda2c: 0x6c255e20, + 0xda30: 0x6c0aa420, + 0xda3b: 0x6c007820, + // Block 0x369, offset 0xda40 + 0xda40: 0x6c03be20, + 0xda48: 0x6c256420, 0xda4b: 0x6c0f6020, + 0xda4d: 0x6c256620, 0xda4e: 0x6c0c0e20, + 0xda54: 0x6c14aa20, 0xda57: 0x6c126220, + 0xda58: 0x6c256820, 0xda59: 0x6c256a20, 0xda5a: 0x6c0e5e20, + 0xda5c: 0x6c165620, 0xda5f: 0x6c256e20, + 0xda60: 0x6c256c20, + 0xda6e: 0x6c096e20, + 0xda71: 0x6c257220, 0xda72: 0x6c00a020, + 0xda77: 0x6c257820, + 0xda7b: 0x6c257420, + 0xda7c: 0x6c01e020, 0xda7d: 0x6c058020, 0xda7e: 0x6c257620, 0xda7f: 0x6c06e820, + // Block 0x36a, offset 0xda80 + 0xda80: 0x6c074020, 0xda82: 0x6c13a420, 0xda83: 0x6c257a20, + 0xda86: 0x6c143c20, + 0xda89: 0x6c257e20, + 0xda8d: 0x6c0c2220, 0xda8e: 0x6c011a20, 0xda8f: 0x6c01ac20, + 0xda90: 0x6c001820, + 0xda97: 0x6c257c20, + 0xdaa1: 0x6c258020, 0xdaa2: 0x6c258220, 0xdaa3: 0x6c0af620, + 0xdaa9: 0x6c258420, 0xdaab: 0x6c029220, + 0xdab0: 0x6c258820, + 0xdab4: 0x6c05b820, 0xdab6: 0x6c043820, + 0xdab9: 0x6c258a20, 0xdaba: 0x6c051220, + 0xdabd: 0x6c258c20, 0xdabf: 0x6c0c7820, + // Block 0x36b, offset 0xdac0 + 0xdac1: 0x6c108220, 0xdac3: 0x6c0c4020, + 0xdac4: 0x6c080220, + 0xdac8: 0x6c258e20, + 0xdad2: 0x6c0e7820, 0xdad3: 0x6c0d1220, + 0xdad5: 0x6c259220, 0xdad6: 0x6c259620, 0xdad7: 0x6c259020, + 0xdad8: 0x6c259420, + 0xdadf: 0x6c052820, + 0xdae9: 0x6c259820, 0xdaea: 0x6c053020, + 0xdaee: 0x6c043a20, 0xdaef: 0x6c15b020, + 0xdaf0: 0x6c259c20, + 0xdaf6: 0x6c259e20, + 0xdafa: 0x6c00d820, + 0xdaff: 0x6c25a420, + // Block 0x36c, offset 0xdb00 + 0xdb03: 0x6c02e020, + 0xdb04: 0x6c25a220, 0xdb05: 0x6c25a020, 0xdb07: 0x6c25a820, + 0xdb08: 0x6c259a20, 0xdb0a: 0x6c25aa20, 0xdb0b: 0x6c161a20, + 0xdb0d: 0x6c25ac20, 0xdb0f: 0x6c25ae20, + 0xdb12: 0x6c1ac220, 0xdb13: 0x6c25b220, + 0xdb15: 0x6c25b020, + 0xdb19: 0x6c25b420, 0xdb1a: 0x6c25b620, + 0xdb1c: 0x6c163220, 0xdb1d: 0x6c25b820, 0xdb1f: 0x6c2f4820, + 0xdb20: 0x6c0aa620, 0xdb21: 0x6c25ba20, 0xdb22: 0x6c25bc20, 0xdb23: 0x6c09fa20, + 0xdb25: 0x6c105820, 0xdb26: 0x6c25be20, + 0xdb2a: 0x6c0e0420, + 0xdb2d: 0x6c25c020, 0xdb2f: 0x6c0e2c20, + 0xdb30: 0x6c25c220, + 0xdb36: 0x6c047220, + 0xdb38: 0x6c182420, 0xdb39: 0x6c0e6e20, 0xdb3a: 0x6c08f620, + 0xdb3f: 0x6c034020, + // Block 0x36d, offset 0xdb40 + 0xdb42: 0x6c25c420, + 0xdb44: 0x6c25de20, 0xdb46: 0x6c25ca20, + 0xdb48: 0x6c043c20, 0xdb4a: 0x6c25c820, 0xdb4b: 0x6c25e220, + 0xdb4f: 0x6c25c620, + 0xdb51: 0x6c0aa820, + 0xdb58: 0x6c25ce20, 0xdb59: 0x6c25d020, 0xdb5b: 0x6c0f8220, + 0xdb5e: 0x6c25d220, + 0xdb60: 0x6c02b020, + 0xdb65: 0x6c0b7820, 0xdb66: 0x6c12e420, + 0xdb68: 0x6c25d620, + 0xdb6c: 0x6c0dc820, + 0xdb73: 0x6c25cc20, + 0xdb75: 0x6c25d420, 0xdb76: 0x6c25d820, + 0xdb79: 0x6c080e20, + // Block 0x36e, offset 0xdb80 + 0xdb85: 0x6c25e620, 0xdb86: 0x6c127820, + 0xdb88: 0x6c11ac20, 0xdb89: 0x6c101e20, 0xdb8b: 0x6c04dc20, + 0xdb8c: 0x6c25e420, 0xdb8d: 0x6c25e020, 0xdb8f: 0x6c11ca20, + 0xdb90: 0x6c25da20, 0xdb91: 0x6c0e7020, 0xdb92: 0x6c102220, + 0xdb94: 0x6c102020, 0xdb96: 0x6c080420, + 0xdb9d: 0x6c260a20, + 0xdba5: 0x6c25ea20, 0xdba7: 0x6c25ee20, + 0xdbac: 0x6c25f420, 0xdbae: 0x6c25f620, + 0xdbb0: 0x6c25f020, 0xdbb1: 0x6c25f220, + 0xdbb4: 0x6c25ec20, 0xdbb5: 0x6c25e820, + 0xdbba: 0x6c25dc20, + // Block 0x36f, offset 0xdbc0 + 0xdbc6: 0x6c137620, 0xdbc7: 0x6c01e220, + 0xdbcb: 0x6c260420, + 0xdbcd: 0x6c25fe20, 0xdbcf: 0x6c260820, + 0xdbd2: 0x6c260620, + 0xdbd4: 0x6c118a20, 0xdbd5: 0x6c149e20, 0xdbd7: 0x6c084a20, + 0xdbd8: 0x6c25fa20, 0xdbd9: 0x6c260c20, 0xdbda: 0x6c260220, + 0xdbdc: 0x6c260020, 0xdbdd: 0x6c25f820, 0xdbdf: 0x6c25fc20, + 0xdbe1: 0x6c034220, + 0xdbea: 0x6c0e2e20, + 0xdbed: 0x6c0c7a20, + 0xdbf1: 0x6c11a420, + 0xdbf4: 0x6c261620, + 0xdbf8: 0x6c11a820, + // Block 0x370, offset 0xdc00 + 0xdc00: 0x6c0c4220, 0xdc01: 0x6c261020, + 0xdc04: 0x6c11fe20, 0xdc06: 0x6c261820, 0xdc07: 0x6c137e20, + 0xdc09: 0x6c0e6a20, 0xdc0b: 0x6c260e20, + 0xdc0c: 0x6c261220, 0xdc0f: 0x6c261420, + 0xdc1d: 0x6c261a20, + 0xdc20: 0x6c091820, + 0xdc24: 0x6c107420, 0xdc25: 0x6c262420, 0xdc26: 0x6c262220, + 0xdc29: 0x6c261c20, + 0xdc2d: 0x6c16f020, + 0xdc33: 0x6c262e20, + 0xdc36: 0x6c263620, 0xdc37: 0x6c263020, + // Block 0x371, offset 0xdc40 + 0xdc40: 0x6c262820, + 0xdc47: 0x6c262a20, + 0xdc4d: 0x6c263420, + 0xdc51: 0x6c261e20, 0xdc52: 0x6c190c20, 0xdc53: 0x6c262c20, + 0xdc54: 0x6c262020, 0xdc57: 0x6c263220, + 0xdc5f: 0x6c263e20, + 0xdc61: 0x6c034420, 0xdc63: 0x6c263820, + 0xdc67: 0x6c263a20, + 0xdc6a: 0x6c263c20, 0xdc6b: 0x6c264220, + 0xdc77: 0x6c264020, + 0xdc78: 0x6c124c20, + 0xdc7d: 0x6c264420, 0xdc7e: 0x6c16c020, 0xdc7f: 0x6c13b220, + // Block 0x372, offset 0xdc80 + 0xdc80: 0x6c264e20, 0xdc83: 0x6c264820, + 0xdc8c: 0x6c264620, 0xdc8d: 0x6c0c2420, 0xdc8f: 0x6c264c20, + 0xdc90: 0x6c265020, + 0xdc94: 0x6c264a20, 0xdc96: 0x6c265820, + 0xdc98: 0x6c265220, + 0xdc9f: 0x6c265420, + 0xdca0: 0x6c262620, + 0xdca4: 0x6c265620, 0xdca5: 0x6c265a20, + 0xdcac: 0x6c265c20, + 0xdcb3: 0x6c136420, + 0xdcb5: 0x6c265e20, + 0xdcbe: 0x6c151420, + // Block 0x373, offset 0xdcc0 + 0xdcc1: 0x6c04c420, 0xdcc2: 0x6c053620, 0xdcc3: 0x6c266020, + 0xdcc9: 0x6c134020, 0xdccb: 0x6c0b9420, + 0xdccd: 0x6c14b020, + 0xdcd0: 0x6c266220, 0xdcd2: 0x6c162e20, + 0xdcd5: 0x6c118c20, 0xdcd7: 0x6c0cc820, + 0xdcd8: 0x6c110c20, 0xdcdb: 0x6c09e620, + 0xdcdf: 0x6c004020, + 0xdce1: 0x6c266c20, 0xdce2: 0x6c266820, + 0xdce4: 0x6c266420, 0xdce5: 0x6c02f220, 0xdce7: 0x6c0aaa20, + 0xdce8: 0x6c266e20, 0xdceb: 0x6c266a20, + 0xdced: 0x6c266620, 0xdcee: 0x6c267620, + 0xdcf1: 0x6c267420, 0xdcf2: 0x6c267220, 0xdcf3: 0x6c267020, + 0xdcf9: 0x6c267820, + 0xdcfd: 0x6c267a20, 0xdcfe: 0x6c0bf420, + // Block 0x374, offset 0xdd00 + 0xdd00: 0x6c267c20, 0xdd02: 0x6c268020, + 0xdd05: 0x6c267e20, + 0xdd0a: 0x6c064420, + 0xdd0e: 0x6c0cac20, + 0xdd12: 0x6c268420, + 0xdd16: 0x6c102420, + 0xdd18: 0x6c268220, + 0xdd1c: 0x6c268620, 0xdd1e: 0x6c134220, 0xdd1f: 0x6c0d1420, + 0xdd20: 0x6c06ea20, 0xdd22: 0x6c268820, + 0xdd27: 0x6c165820, + 0xdd2f: 0x6c268c20, + 0xdd32: 0x6c268e20, + 0xdd34: 0x6c269020, 0xdd36: 0x6c269220, + 0xdd38: 0x6c089e20, 0xdd3a: 0x6c269420, 0xdd3b: 0x6c058220, + 0xdd3e: 0x6c044020, + // Block 0x375, offset 0xdd40 + 0xdd40: 0x6c03c020, 0xdd42: 0x6c269820, + 0xdd44: 0x6c153620, 0xdd45: 0x6c06ec20, 0xdd46: 0x6c269620, + 0xdd4a: 0x6c269e20, 0xdd4b: 0x6c151c20, + 0xdd4d: 0x6c111c20, + 0xdd50: 0x6c128220, + 0xdd54: 0x6c0a1220, 0xdd55: 0x6c269c20, 0xdd57: 0x6c093620, + 0xdd58: 0x6c06ee20, 0xdd59: 0x6c08a020, 0xdd5a: 0x6c043e20, 0xdd5b: 0x6c134420, + 0xdd5c: 0x6c269a20, + 0xdd60: 0x6c0cca20, 0xdd61: 0x6c141820, 0xdd62: 0x6c080620, + 0xdd6b: 0x6c08a220, + 0xdd6c: 0x6c0f2a20, 0xdd6e: 0x6c26a420, 0xdd6f: 0x6c168620, + 0xdd70: 0x6c07ca20, 0xdd72: 0x6c26a620, 0xdd73: 0x6c0b4820, + 0xdd75: 0x6c26aa20, + 0xdd79: 0x6c0aac20, 0xdd7a: 0x6c077820, + 0xdd7f: 0x6c26a820, + // Block 0x376, offset 0xdd80 + 0xdd82: 0x6c09a020, 0xdd83: 0x6c061c20, + 0xdd84: 0x6c0ccc20, 0xdd85: 0x6c26a020, 0xdd86: 0x6c26ac20, + 0xdd8b: 0x6c26a220, + 0xdd8c: 0x6c058420, 0xdd8e: 0x6c26b220, 0xdd8f: 0x6c26ba20, + 0xdd90: 0x6c05ba20, + 0xdd96: 0x6c26b020, + 0xdd9b: 0x6c26c220, + 0xdd9e: 0x6c06f020, + 0xdda1: 0x6c15e620, 0xdda2: 0x6c003820, 0xdda3: 0x6c26bc20, + 0xdda6: 0x6c044220, + 0xdda8: 0x6c26b620, + 0xddae: 0x6c26b820, + 0xddb1: 0x6c102620, 0xddb2: 0x6c26b420, 0xddb3: 0x6c26ae20, + 0xddb5: 0x6c024420, 0xddb6: 0x6c0c4820, + 0xddb9: 0x6c05f020, + 0xddbd: 0x6c26c620, + // Block 0x377, offset 0xddc0 + 0xddc9: 0x6c26c020, + 0xddcf: 0x6c26c420, + 0xddd3: 0x6c26be20, + 0xddd9: 0x6c058620, 0xddda: 0x6c0d5e20, 0xdddb: 0x6c26c820, + 0xdddc: 0x6c0d1820, 0xdddf: 0x6c26e220, + 0xdde2: 0x6c26da20, 0xdde3: 0x6c26ce20, + 0xddeb: 0x6c26d620, + 0xddec: 0x6c098420, 0xdded: 0x6c007a20, 0xddee: 0x6c26cc20, 0xddef: 0x6c26dc20, + 0xddf0: 0x6c26e420, 0xddf1: 0x6c06f220, 0xddf2: 0x6c14fc20, + 0xddf4: 0x6c0f1c20, 0xddf5: 0x6c26d020, + 0xddf8: 0x6c26e020, 0xddfa: 0x6c26ca20, 0xddfb: 0x6c0e3020, + 0xddfd: 0x6c26d420, 0xddfe: 0x6c003a20, 0xddff: 0x6c14e420, + // Block 0x378, offset 0xde00 + 0xde07: 0x6c26d220, + 0xde0a: 0x6c04de20, 0xde0b: 0x6c123820, + 0xde0f: 0x6c0d1620, + 0xde11: 0x6c166820, 0xde12: 0x6c0a2a20, + 0xde15: 0x6c273220, + 0xde18: 0x6c26e620, 0xde1a: 0x6c0c7c20, + 0xde1c: 0x6c26de20, 0xde1d: 0x6c26e820, 0xde1e: 0x6c26ec20, + 0xde20: 0x6c0f6220, 0xde21: 0x6c26f220, + 0xde24: 0x6c26ea20, + 0xde28: 0x6c138020, 0xde29: 0x6c034620, + 0xde2c: 0x6c14e620, 0xde2f: 0x6c007c20, + 0xde32: 0x6c26f020, + 0xde34: 0x6c16c220, + 0xde3b: 0x6c26ee20, + // Block 0x379, offset 0xde40 + 0xde41: 0x6c015a20, + 0xde44: 0x6c10c020, 0xde45: 0x6c26f420, + 0xde49: 0x6c270220, 0xde4a: 0x6c26f620, 0xde4b: 0x6c270420, + 0xde52: 0x6c26fc20, + 0xde5b: 0x6c119a20, + 0xde5e: 0x6c092420, 0xde5f: 0x6c270020, + 0xde61: 0x6c26fa20, 0xde62: 0x6c270620, 0xde63: 0x6c26f820, + 0xde66: 0x6c09d420, + 0xde6b: 0x6c13de20, + 0xde6e: 0x6c09e420, + 0xde71: 0x6c26fe20, 0xde72: 0x6c271620, + 0xde75: 0x6c270e20, 0xde77: 0x6c271420, + 0xde79: 0x6c271020, 0xde7a: 0x6c271820, 0xde7b: 0x6c270c20, + 0xde7d: 0x6c26d820, 0xde7e: 0x6c0c2620, + // Block 0x37a, offset 0xde80 + 0xde81: 0x6c11f620, 0xde83: 0x6c271220, + 0xde86: 0x6c270820, + 0xde8a: 0x6c0c7e20, 0xde8b: 0x6c058820, + 0xde8d: 0x6c09a220, + 0xde94: 0x6c0b0e20, 0xde95: 0x6c0ca820, 0xde96: 0x6c271e20, + 0xde99: 0x6c272220, 0xde9a: 0x6c272420, + 0xde9d: 0x6c271c20, 0xde9e: 0x6c272020, + 0xdea6: 0x6c270a20, 0xdea7: 0x6c271a20, + 0xdea9: 0x6c272a20, 0xdeaa: 0x6c272820, + 0xdead: 0x6c148820, + 0xdeb0: 0x6c053a20, + 0xdeb9: 0x6c272620, 0xdebb: 0x6c272e20, + 0xdebc: 0x6c272c20, 0xdebd: 0x6c273420, 0xdebf: 0x6c273820, + // Block 0x37b, offset 0xdec0 + 0xdec2: 0x6c084c20, 0xdec3: 0x6c273020, + 0xdec8: 0x6c273a20, 0xdec9: 0x6c273c20, + 0xdecc: 0x6c273e20, 0xdece: 0x6c274a20, 0xdecf: 0x6c0fa220, + 0xded0: 0x6c274220, 0xded2: 0x6c274020, 0xded3: 0x6c274420, + 0xded4: 0x6c274620, 0xded6: 0x6c274820, + 0xdedb: 0x6c274c20, + 0xdedc: 0x6c274e20, + // Block 0x37c, offset 0xdf00 + 0xdf36: 0x6c034820, + 0xdf38: 0x6c275020, 0xdf3a: 0x6c275220, + // Block 0x37d, offset 0xdf40 + 0xdf45: 0x6c275420, + 0xdf4c: 0x6c275620, 0xdf4d: 0x6c275820, 0xdf4e: 0x6c275a20, + 0xdf50: 0x6c275c20, 0xdf51: 0x6c275e20, + 0xdf54: 0x6c276220, 0xdf55: 0x6c276020, + 0xdf58: 0x6c276420, + 0xdf5f: 0x6c276620, + 0xdf60: 0x6c276820, + 0xdf67: 0x6c276e20, + 0xdf68: 0x6c276a20, 0xdf69: 0x6c276c20, 0xdf6a: 0x6c07da20, 0xdf6b: 0x6c058a20, + 0xdf6e: 0x6c0e6020, + 0xdf70: 0x6c11c620, 0xdf72: 0x6c0a2c20, + 0xdf75: 0x6c113e20, 0xdf77: 0x6c123a20, + 0xdf78: 0x6c277020, 0xdf79: 0x6c1da420, + // Block 0x37e, offset 0xdf80 + 0xdf82: 0x6c277220, 0xdf83: 0x6c277620, + 0xdf85: 0x6c15d620, 0xdf86: 0x6c277420, 0xdf87: 0x6c277a20, + 0xdf88: 0x6c277820, 0xdf8a: 0x6c15b220, + 0xdf8c: 0x6c277c20, 0xdf8e: 0x6c125c20, + 0xdf94: 0x6c277e20, + 0xdf9a: 0x6c278420, + 0xdf9d: 0x6c278220, 0xdf9e: 0x6c278020, + 0xdfa3: 0x6c278620, + 0xdfa4: 0x6c054820, + 0xdfa8: 0x6c0c8020, 0xdfa9: 0x6c03ee20, + 0xdfae: 0x6c278e20, 0xdfaf: 0x6c278820, + 0xdfb2: 0x6c278a20, + 0xdfb6: 0x6c279020, + 0xdfb8: 0x6c279220, 0xdfb9: 0x6c278c20, + 0xdfbd: 0x6c00ce20, + // Block 0x37f, offset 0xdfc0 + 0xdfc1: 0x6c018620, + 0xdfc5: 0x6c279620, 0xdfc6: 0x6c279820, + 0xdfca: 0x6c279a20, + 0xdfcc: 0x6c15d020, + 0xdfd2: 0x6c09a420, + 0xdfd4: 0x6c279e20, 0xdfd5: 0x6c279c20, + 0xdfe0: 0x6c0b9620, 0xdfe1: 0x6c27a020, + 0xdfe6: 0x6c27a220, + 0xdfe9: 0x6c27a420, 0xdfeb: 0x6c037a20, + 0xdff0: 0x6c034a20, 0xdff3: 0x6c27a620, + 0xdff9: 0x6c27a820, 0xdffb: 0x6c144e20, + 0xdffc: 0x6c15d220, + // Block 0x380, offset 0xe000 + 0xe000: 0x6c15b420, 0xe001: 0x6c16f220, 0xe003: 0x6c06f620, + 0xe004: 0x6c27ae20, 0xe005: 0x6c093820, 0xe006: 0x6c27ac20, + 0xe00b: 0x6c27b020, + 0xe00c: 0x6c08e220, + 0xe010: 0x6c0d9a20, 0xe012: 0x6c27b220, + 0xe015: 0x6c06f420, 0xe017: 0x6c14fe20, + 0xe018: 0x6c27b420, 0xe019: 0x6c27b620, + 0xe01c: 0x6c27b820, + 0xe021: 0x6c27ba20, + 0xe028: 0x6c27bc20, + 0xe033: 0x6c08e420, + 0xe036: 0x6c152a20, + 0xe03b: 0x6c27c020, + 0xe03d: 0x6c0e3220, 0xe03f: 0x6c27be20, + // Block 0x381, offset 0xe040 + 0xe046: 0x6c27c420, + 0xe04a: 0x6c27c220, + 0xe052: 0x6c27c620, + 0xe056: 0x6c0bf620, + 0xe058: 0x6c27c820, 0xe05a: 0x6c27ca20, + 0xe05e: 0x6c134a20, 0xe05f: 0x6c27cc20, + 0xe061: 0x6c0d1a20, 0xe062: 0x6c27ce20, + 0xe068: 0x6c27d020, + 0xe06f: 0x6c16c420, + 0xe070: 0x6c27d620, 0xe072: 0x6c27d420, 0xe073: 0x6c27d220, + 0xe074: 0x6c0ed020, 0xe076: 0x6c27d820, 0xe077: 0x6c0b1020, + 0xe079: 0x6c27da20, + 0xe07d: 0x6c27dc20, 0xe07e: 0x6c16f420, 0xe07f: 0x6c27de20, + // Block 0x382, offset 0xe080 + 0xe084: 0x6c27e020, 0xe085: 0x6c27e420, 0xe086: 0x6c27e220, 0xe087: 0x6c11aa20, + 0xe089: 0x6c10da20, 0xe08b: 0x6c170020, + 0xe08c: 0x6c11b220, + 0xe093: 0x6c27e820, + 0xe096: 0x6c0aae20, + 0xe098: 0x6c127020, 0xe09a: 0x6c27ea20, 0xe09b: 0x6c27e620, + 0xe09d: 0x6c034c20, + 0xe0a1: 0x6c064820, 0xe0a2: 0x6c08a420, + 0xe0a5: 0x6c123c20, + 0xe0a9: 0x6c05f420, 0xe0aa: 0x6c141a20, + 0xe0ac: 0x6c27f020, 0xe0ad: 0x6c27ec20, 0xe0af: 0x6c06f820, + 0xe0b1: 0x6c06fa20, 0xe0b2: 0x6c009220, + 0xe0b4: 0x6c07e820, + 0xe0ba: 0x6c115620, + // Block 0x383, offset 0xe0c0 + 0xe0c3: 0x6c007e20, + 0xe0c4: 0x6c27fa20, 0xe0c6: 0x6c0e3420, + 0xe0cc: 0x6c115420, 0xe0ce: 0x6c0dae20, + 0xe0d6: 0x6c27fe20, + 0xe0d9: 0x6c27f620, 0xe0da: 0x6c27fc20, 0xe0db: 0x6c27f220, + 0xe0dd: 0x6c27f820, 0xe0de: 0x6c13e020, + 0xe0e1: 0x6c064a20, + 0xe0e4: 0x6c00ba20, 0xe0e5: 0x6c27f420, + 0xe0ef: 0x6c280220, + 0xe0f1: 0x6c280420, + 0xe0f4: 0x6c105a20, + 0xe0f8: 0x6c049e20, + 0xe0fc: 0x6c281a20, 0xe0fd: 0x6c111e20, + // Block 0x384, offset 0xe100 + 0xe102: 0x6c08a620, + 0xe105: 0x6c04a020, 0xe106: 0x6c0c1020, 0xe107: 0x6c171020, + 0xe108: 0x6c14ac20, 0xe109: 0x6c280020, 0xe10a: 0x6c0c2820, + 0xe11a: 0x6c041220, 0xe11b: 0x6c280620, + 0xe123: 0x6c280a20, + 0xe129: 0x6c280820, + 0xe12f: 0x6c280c20, + 0xe131: 0x6c0e0020, 0xe133: 0x6c112020, + 0xe139: 0x6c0ed220, + 0xe13e: 0x6c281420, + // Block 0x385, offset 0xe140 + 0xe146: 0x6c281220, + 0xe14b: 0x6c280e20, + 0xe14e: 0x6c0b6e20, + 0xe150: 0x6c12e620, 0xe151: 0x6c281820, 0xe153: 0x6c281620, + 0xe154: 0x6c06fc20, 0xe155: 0x6c172a20, + 0xe15f: 0x6c283820, + 0xe165: 0x6c282020, 0xe166: 0x6c282220, + 0xe16b: 0x6c097020, + 0xe16e: 0x6c281e20, + 0xe170: 0x6c074c20, 0xe171: 0x6c281c20, + 0xe174: 0x6c282420, + 0xe178: 0x6c0ed420, 0xe179: 0x6c131c20, 0xe17a: 0x6c0c8220, + 0xe17f: 0x6c0db020, + // Block 0x386, offset 0xe180 + 0xe180: 0x6c282c20, 0xe182: 0x6c282e20, 0xe183: 0x6c282620, + 0xe188: 0x6c282820, 0xe18a: 0x6c282a20, + 0xe18f: 0x6c06fe20, + 0xe193: 0x6c283a20, + 0xe195: 0x6c283220, + 0xe19a: 0x6c12e820, + 0xe19c: 0x6c146c20, 0xe19d: 0x6c126c20, + 0xe1a0: 0x6c283020, 0xe1a3: 0x6c283620, + 0xe1a4: 0x6c283420, + 0xe1a8: 0x6c141c20, 0xe1a9: 0x6c283c20, + 0xe1b0: 0x6c283e20, 0xe1b3: 0x6c0caa20, + 0xe1b5: 0x6c284020, + 0xe1b8: 0x6c284420, 0xe1ba: 0x6c284c20, + 0xe1bd: 0x6c284620, 0xe1be: 0x6c284220, 0xe1bf: 0x6c112220, + // Block 0x387, offset 0xe1c0 + 0xe1c0: 0x6c284820, 0xe1c2: 0x6c284a20, + 0xe1c6: 0x6c019c20, + 0xe1c8: 0x6c285820, 0xe1c9: 0x6c284e20, + 0xe1cd: 0x6c285020, + 0xe1d1: 0x6c285220, 0xe1d3: 0x6c0d3a20, + 0xe1d8: 0x6c285620, 0xe1d9: 0x6c285420, 0xe1da: 0x6c285a20, + 0xe1df: 0x6c285c20, + 0xe1e0: 0x6c285e20, 0xe1e3: 0x6c0b4a20, + 0xe1e5: 0x6c020a20, 0xe1e7: 0x6c286020, + 0xe1e8: 0x6c167620, 0xe1ea: 0x6c08e620, + 0xe1ed: 0x6c09a620, + 0xe1f3: 0x6c08a820, + 0xe1f4: 0x6c0e6220, + 0xe1fa: 0x6c286220, 0xe1fb: 0x6c286420, + 0xe1fc: 0x6c00de20, 0xe1fe: 0x6c286620, + // Block 0x388, offset 0xe200 + 0xe201: 0x6c286820, 0xe202: 0x6c286a20, + 0xe205: 0x6c286c20, 0xe207: 0x6c286e20, + 0xe208: 0x6c04a220, 0xe209: 0x6c1e9620, 0xe20a: 0x6c287020, + 0xe20c: 0x6c0c4a20, 0xe20d: 0x6c287220, 0xe20e: 0x6c092620, + 0xe210: 0x6c287420, 0xe212: 0x6c174a20, + 0xe216: 0x6c287620, 0xe217: 0x6c139420, + 0xe218: 0x6c036820, 0xe21b: 0x6c0c8420, + 0xe21c: 0x6c09fc20, 0xe21e: 0x6c12fe20, 0xe21f: 0x6c09a820, + 0xe229: 0x6c287820, 0xe22a: 0x6c070020, 0xe22b: 0x6c287a20, + 0xe22c: 0x6c11f820, 0xe22e: 0x6c289620, + 0xe233: 0x6c287e20, + 0xe235: 0x6c0d8a20, 0xe236: 0x6c118e20, 0xe237: 0x6c061e20, + 0xe238: 0x6c287c20, 0xe239: 0x6c0c8620, + // Block 0x389, offset 0xe240 + 0xe240: 0x6c288020, + 0xe247: 0x6c0f6420, + 0xe258: 0x6c288420, 0xe259: 0x6c288220, 0xe25a: 0x6c288820, + 0xe25d: 0x6c288620, 0xe25f: 0x6c288a20, + 0xe262: 0x6c288e20, + 0xe264: 0x6c288c20, 0xe266: 0x6c034e20, + 0xe268: 0x6c289020, 0xe26a: 0x6c289220, 0xe26b: 0x6c289420, + 0xe26e: 0x6c077a20, 0xe26f: 0x6c165a20, + 0xe271: 0x6c289820, 0xe272: 0x6c0b1220, + 0xe276: 0x6c015c20, 0xe277: 0x6c289a20, + 0xe278: 0x6c289c20, + 0xe27e: 0x6c289e20, + // Block 0x38a, offset 0xe280 + 0xe28b: 0x6c00a420, + 0xe28d: 0x6c28a020, + 0xe292: 0x6c28a220, + 0xe299: 0x6c12ea20, + 0xe29d: 0x6c091e20, 0xe29f: 0x6c28a620, + 0xe2a5: 0x6c024620, 0xe2a6: 0x6c002420, + 0xe2ab: 0x6c28a420, + 0xe2ac: 0x6c28aa20, 0xe2ad: 0x6c114020, 0xe2af: 0x6c0b4c20, + 0xe2b1: 0x6c01e420, 0xe2b3: 0x6c13e220, + 0xe2b8: 0x6c059e20, 0xe2b9: 0x6c04e020, 0xe2bb: 0x6c28a820, + 0xe2bd: 0x6c020c20, + // Block 0x38b, offset 0xe2c0 + 0xe2c5: 0x6c02f620, + 0xe2d1: 0x6c015e20, 0xe2d2: 0x6c28b220, 0xe2d3: 0x6c169c20, + 0xe2d4: 0x6c0db220, 0xe2d7: 0x6c12a420, + 0xe2d9: 0x6c28ca20, 0xe2db: 0x6c01e620, + 0xe2dc: 0x6c28c620, 0xe2de: 0x6c28c220, 0xe2df: 0x6c28b020, + 0xe2e1: 0x6c28ac20, 0xe2e3: 0x6c28ae20, + 0xe2e5: 0x6c095620, 0xe2e6: 0x6c050020, 0xe2e7: 0x6c0ea220, + 0xe2eb: 0x6c108a20, + 0xe2f1: 0x6c011e20, 0xe2f3: 0x6c28b620, + 0xe2f4: 0x6c28b420, + 0xe2f9: 0x6c28c020, 0xe2fa: 0x6c28b820, 0xe2fb: 0x6c28be20, + // Block 0x38c, offset 0xe300 + 0xe302: 0x6c14f020, 0xe303: 0x6c28bc20, + 0xe304: 0x6c01e820, 0xe305: 0x6c02ee20, 0xe306: 0x6c28c420, + 0xe309: 0x6c28c820, + 0xe30e: 0x6c058c20, + 0xe316: 0x6c28d020, 0xe317: 0x6c28e220, + 0xe318: 0x6c28e420, + 0xe31c: 0x6c001620, + 0xe323: 0x6c28f220, + 0xe328: 0x6c00a220, 0xe32b: 0x6c28e020, + 0xe32f: 0x6c28de20, + 0xe331: 0x6c28d420, 0xe332: 0x6c28d220, + 0xe334: 0x6c28ce20, 0xe335: 0x6c28cc20, 0xe336: 0x6c0e7a20, + 0xe338: 0x6c0dee20, 0xe339: 0x6c28d820, + // Block 0x38d, offset 0xe340 + 0xe340: 0x6c28d620, + 0xe345: 0x6c28dc20, + 0xe349: 0x6c0d1c20, 0xe34a: 0x6c058e20, + 0xe34f: 0x6c00fe20, + 0xe350: 0x6c28da20, 0xe352: 0x6c070220, + 0xe358: 0x6c0d1e20, + 0xe373: 0x6c28fe20, + 0xe375: 0x6c290020, 0xe377: 0x6c01ea20, + 0xe37b: 0x6c019420, + 0xe37c: 0x6c28fa20, + // Block 0x38e, offset 0xe380 + 0xe385: 0x6c28e620, 0xe387: 0x6c28f620, + 0xe389: 0x6c290420, 0xe38a: 0x6c28f820, + 0xe38e: 0x6c28f420, + 0xe393: 0x6c28ba20, + 0xe396: 0x6c28f020, + 0xe39a: 0x6c28e820, + 0xe39e: 0x6c035020, 0xe39f: 0x6c28ec20, + 0xe3a0: 0x6c290220, 0xe3a2: 0x6c28ee20, + 0xe3a8: 0x6c290620, 0xe3aa: 0x6c28ea20, 0xe3ab: 0x6c119c20, + 0xe3b1: 0x6c15de20, + 0xe3b5: 0x6c28fc20, + 0xe3bd: 0x6c292820, + // Block 0x38f, offset 0xe3c0 + 0xe3c1: 0x6c291820, + 0xe3c5: 0x6c0bba20, + 0xe3ca: 0x6c03f820, + 0xe3cc: 0x6c04e220, 0xe3ce: 0x6c290e20, + 0xe3d3: 0x6c01ee20, + 0xe3d6: 0x6c0ab020, + 0xe3d8: 0x6c291420, + 0xe3dc: 0x6c07cc20, 0xe3df: 0x6c0fce20, + 0xe3e0: 0x6c291e20, + 0xe3e9: 0x6c13b420, 0xe3eb: 0x6c290c20, + 0xe3ef: 0x6c01ec20, + 0xe3f0: 0x6c064c20, 0xe3f1: 0x6c126e20, 0xe3f2: 0x6c292020, + 0xe3f4: 0x6c290820, 0xe3f7: 0x6c291a20, + 0xe3fb: 0x6c292e20, + 0xe3fd: 0x6c291020, + // Block 0x390, offset 0xe400 + 0xe403: 0x6c291220, + 0xe404: 0x6c105c20, 0xe407: 0x6c291c20, + 0xe40b: 0x6c291620, + 0xe40c: 0x6c13e420, 0xe40d: 0x6c292220, 0xe40e: 0x6c008020, + 0xe413: 0x6c290a20, + 0xe420: 0x6c292620, 0xe422: 0x6c292420, + 0xe429: 0x6c117a20, 0xe42a: 0x6c293220, + 0xe42c: 0x6c294820, + 0xe431: 0x6c02f020, + 0xe435: 0x6c294e20, + 0xe438: 0x6c292a20, + 0xe43c: 0x6c293420, 0xe43d: 0x6c15e820, + // Block 0x391, offset 0xe440 + 0xe446: 0x6c294620, + 0xe449: 0x6c15b620, + 0xe44e: 0x6c161c20, + 0xe457: 0x6c0ea420, + 0xe45b: 0x6c02ca20, + 0xe461: 0x6c130020, 0xe462: 0x6c295220, 0xe463: 0x6c102a20, + 0xe466: 0x6c002220, + 0xe469: 0x6c294420, 0xe46b: 0x6c293c20, + 0xe46c: 0x6c0d2020, 0xe46d: 0x6c293020, 0xe46e: 0x6c294020, 0xe46f: 0x6c294a20, + 0xe471: 0x6c10fc20, + 0xe475: 0x6c001420, 0xe477: 0x6c293a20, + 0xe479: 0x6c294c20, 0xe47a: 0x6c130c20, + // Block 0x392, offset 0xe480 + 0xe482: 0x6c294220, + 0xe484: 0x6c293820, + 0xe48b: 0x6c0ab220, + 0xe490: 0x6c09aa20, + 0xe494: 0x6c08e820, + 0xe499: 0x6c150020, + 0xe49c: 0x6c12aa20, 0xe49f: 0x6c295820, + 0xe4a1: 0x6c296a20, + 0xe4ad: 0x6c293e20, + 0xe4b2: 0x6c02e220, + 0xe4b8: 0x6c0af820, 0xe4b9: 0x6c295420, 0xe4bb: 0x6c295e20, + 0xe4bc: 0x6c0d2220, 0xe4bf: 0x6c295620, + // Block 0x393, offset 0xe4c0 + 0xe4c1: 0x6c296420, + 0xe4c4: 0x6c0e7220, 0xe4c6: 0x6c296620, + 0xe4c9: 0x6c15b820, 0xe4ca: 0x6c295020, 0xe4cb: 0x6c026420, + 0xe4cd: 0x6c295c20, + 0xe4d0: 0x6c296220, 0xe4d1: 0x6c14a820, + 0xe4d6: 0x6c296820, + 0xe4d9: 0x6c295a20, 0xe4da: 0x6c296020, + 0xe4ec: 0x6c13e620, 0xe4ee: 0x6c16c620, + 0xe4f4: 0x6c297020, + 0xe4fc: 0x6c297e20, 0xe4ff: 0x6c296e20, + // Block 0x394, offset 0xe500 + 0xe500: 0x6c091620, + 0xe506: 0x6c292c20, + 0xe511: 0x6c137420, 0xe513: 0x6c149420, + 0xe514: 0x6c297c20, 0xe515: 0x6c297a20, 0xe517: 0x6c297220, + 0xe518: 0x6c297420, 0xe51a: 0x6c00e820, + 0xe51f: 0x6c297820, + 0xe521: 0x6c296c20, + 0xe526: 0x6c0f1a20, + 0xe52c: 0x6c297620, 0xe52d: 0x6c00bc20, + 0xe535: 0x6c0d3c20, + 0xe53d: 0x6c135e20, + // Block 0x395, offset 0xe540 + 0xe540: 0x6c298020, 0xe541: 0x6c298820, 0xe543: 0x6c121220, + 0xe548: 0x6c298620, 0xe549: 0x6c0ab420, 0xe54a: 0x6c092220, 0xe54b: 0x6c298c20, + 0xe54e: 0x6c04a420, + 0xe555: 0x6c298e20, 0xe557: 0x6c130e20, + 0xe558: 0x6c298420, 0xe55a: 0x6c293620, + 0xe563: 0x6c298220, + 0xe568: 0x6c172220, 0xe569: 0x6c102c20, 0xe56a: 0x6c130220, + 0xe56d: 0x6c299c20, + 0xe577: 0x6c29a820, + 0xe57e: 0x6c29aa20, + // Block 0x396, offset 0xe580 + 0xe580: 0x6c299020, + 0xe584: 0x6c119020, 0xe587: 0x6c29a420, + 0xe588: 0x6c299420, 0xe58a: 0x6c299820, + 0xe590: 0x6c29ac20, 0xe591: 0x6c299620, + 0xe594: 0x6c299e20, 0xe597: 0x6c016020, + 0xe599: 0x6c10b220, 0xe59b: 0x6c29a020, + 0xe59c: 0x6c29a620, + 0xe5a4: 0x6c299220, 0xe5a6: 0x6c0c8820, + 0xe5a8: 0x6c299a20, 0xe5a9: 0x6c082220, 0xe5aa: 0x6c0b4e20, 0xe5ab: 0x6c054420, + 0xe5ac: 0x6c153820, 0xe5ae: 0x6c154220, 0xe5af: 0x6c0a3020, + 0xe5b9: 0x6c29b420, 0xe5ba: 0x6c29b020, + // Block 0x397, offset 0xe5c0 + 0xe5c1: 0x6c172020, + 0xe5c9: 0x6c29ae20, + 0xe5cd: 0x6c15f620, 0xe5cf: 0x6c29b220, + 0xe5d0: 0x6c29b620, + 0xe5d5: 0x6c29b820, + 0xe5dc: 0x6c29be20, 0xe5dd: 0x6c29ba20, + 0xe5e4: 0x6c102e20, 0xe5e5: 0x6c29bc20, + 0xe5e9: 0x6c11fa20, 0xe5ea: 0x6c29a220, + 0xe5f7: 0x6c0a3220, + 0xe5f9: 0x6c29c020, 0xe5fa: 0x6c29ca20, 0xe5fb: 0x6c0d2420, + 0xe5fe: 0x6c29c820, + // Block 0x398, offset 0xe600 + 0xe602: 0x6c298a20, + 0xe606: 0x6c29cc20, 0xe607: 0x6c0cce20, + 0xe60a: 0x6c29c220, 0xe60b: 0x6c29c620, + 0xe613: 0x6c29c420, + 0xe616: 0x6c20d820, 0xe617: 0x6c20ba20, + 0xe61a: 0x6c29d020, + 0xe622: 0x6c29ce20, + 0xe62d: 0x6c15f820, 0xe62f: 0x6c249a20, + 0xe630: 0x6c29d220, + 0xe63f: 0x6c29d420, + // Block 0x399, offset 0xe640 + 0xe64d: 0x6c29d620, 0xe64e: 0x6c064e20, + 0xe650: 0x6c041420, + 0xe654: 0x6c29da20, 0xe655: 0x6c186020, + 0xe65a: 0x6c045620, + 0xe65c: 0x6c163c20, 0xe65e: 0x6c050e20, 0xe65f: 0x6c29dc20, + 0xe667: 0x6c29de20, + 0xe66b: 0x6c0e9020, + 0xe671: 0x6c29e020, + 0xe679: 0x6c10dc20, 0xe67b: 0x6c003420, + // Block 0x39a, offset 0xe680 + 0xe68a: 0x6c01fe20, 0xe68b: 0x6c29ea20, + 0xe68c: 0x6c29ec20, + 0xe693: 0x6c29e220, + 0xe695: 0x6c084e20, + 0xe6a3: 0x6c29e420, + 0xe6a4: 0x6c112820, + 0xe6a9: 0x6c29e620, 0xe6aa: 0x6c29e820, 0xe6ab: 0x6c29fc20, + 0xe6af: 0x6c29f020, + 0xe6b0: 0x6c29f620, + 0xe6b6: 0x6c29ee20, + // Block 0x39b, offset 0xe6c0 + 0xe6c4: 0x6c29f220, 0xe6c6: 0x6c29f420, 0xe6c7: 0x6c094020, + 0xe6c9: 0x6c29f820, 0xe6cb: 0x6c0e3620, + 0xe6cd: 0x6c059020, 0xe6ce: 0x6c027820, + 0xe6d4: 0x6c29fe20, + 0xe6d9: 0x6c027220, 0xe6db: 0x6c2a0820, + 0xe6de: 0x6c2a0020, 0xe6df: 0x6c2a0620, + 0xe6e4: 0x6c11d420, + 0xe6e9: 0x6c2a0220, + 0xe6ec: 0x6c2a0420, 0xe6ed: 0x6c12ac20, 0xe6ee: 0x6c121420, 0xe6ef: 0x6c2a0a20, + 0xe6f8: 0x6c0df220, 0xe6f9: 0x6c2a1e20, 0xe6fb: 0x6c2a1620, + 0xe6fe: 0x6c020e20, + // Block 0x39c, offset 0xe700 + 0xe700: 0x6c2a1220, 0xe702: 0x6c13e820, 0xe703: 0x6c2a1420, + 0xe706: 0x6c2a0e20, + 0xe708: 0x6c2a1020, 0xe709: 0x6c2a1a20, 0xe70a: 0x6c2a2020, + 0xe70d: 0x6c2a1c20, + 0xe711: 0x6c2a1820, 0xe712: 0x6c2a0c20, + 0xe718: 0x6c0e6420, 0xe71a: 0x6c2a2e20, + 0xe71c: 0x6c14a420, + 0xe725: 0x6c2a2a20, + 0xe729: 0x6c2a2c20, + 0xe734: 0x6c2a2220, 0xe737: 0x6c2a2620, + 0xe73b: 0x6c2a2820, + 0xe73f: 0x6c2a2420, + // Block 0x39d, offset 0xe740 + 0xe749: 0x6c0c4c20, 0xe74b: 0x6c16f620, + 0xe74c: 0x6c2a3620, 0xe74e: 0x6c2a3820, + 0xe753: 0x6c2a4420, + 0xe755: 0x6c0b1820, 0xe757: 0x6c2a3c20, + 0xe759: 0x6c2a4220, + 0xe75f: 0x6c2a3220, + 0xe760: 0x6c2a3020, 0xe763: 0x6c2a4620, + 0xe766: 0x6c01f020, + 0xe768: 0x6c2a3e20, 0xe76a: 0x6c2a4820, + 0xe76e: 0x6c2a4020, + 0xe774: 0x6c2a3a20, 0xe776: 0x6c0ed620, + 0xe778: 0x6c2a3420, + 0xe77f: 0x6c117420, + // Block 0x39e, offset 0xe780 + 0xe782: 0x6c2a5020, + 0xe78d: 0x6c158220, + 0xe79f: 0x6c2a4e20, + 0xe7a2: 0x6c2a4c20, + 0xe7ab: 0x6c2a5e20, + 0xe7af: 0x6c2a5220, + 0xe7b3: 0x6c2a6220, + 0xe7ba: 0x6c15d820, 0xe7bb: 0x6c2a6820, + 0xe7bd: 0x6c2a5620, + // Block 0x39f, offset 0xe7c0 + 0xe7c0: 0x6c2a5820, + 0xe7c4: 0x6c2a6020, 0xe7c6: 0x6c2a6620, 0xe7c7: 0x6c2a6420, + 0xe7cb: 0x6c2a5420, + 0xe7d0: 0x6c2a5a20, 0xe7d2: 0x6c2a7c20, + 0xe7e0: 0x6c2a6e20, + 0xe7ef: 0x6c2a6a20, + 0xe7f2: 0x6c2a6c20, + 0xe7f6: 0x6c2a7620, 0xe7f7: 0x6c2a7820, + 0xe7f9: 0x6c024820, 0xe7fb: 0x6c03f020, + 0xe7fe: 0x6c2a7420, + // Block 0x3a0, offset 0xe800 + 0xe805: 0x6c2a4a20, + 0xe80d: 0x6c2a7220, 0xe80e: 0x6c2a7a20, 0xe80f: 0x6c2a7020, + 0xe811: 0x6c2a7e20, + 0xe815: 0x6c2a8220, 0xe816: 0x6c2a8020, + 0xe821: 0x6c2a8620, 0xe822: 0x6c2a8420, 0xe823: 0x6c29fa20, + 0xe827: 0x6c2a8e20, + 0xe831: 0x6c2a8820, + 0xe836: 0x6c2a8a20, + 0xe839: 0x6c2a8c20, 0xe83b: 0x6c2a9020, + // Block 0x3a1, offset 0xe840 + 0xe840: 0x6c05bc20, 0xe842: 0x6c2a9420, + 0xe844: 0x6c2a9220, 0xe846: 0x6c09ac20, + 0xe84c: 0x6c070420, 0xe84d: 0x6c218020, + 0xe852: 0x6c2a9620, 0xe853: 0x6c09ee20, + 0xe857: 0x6c026620, + 0xe859: 0x6c2a9820, 0xe85b: 0x6c012020, + 0xe85d: 0x6c0ab620, 0xe85e: 0x6c2a9a20, + 0xe861: 0x6c070620, 0xe862: 0x6c2a9c20, 0xe863: 0x6c008220, + 0xe868: 0x6c129620, 0xe86b: 0x6c2a9e20, + 0xe870: 0x6c0b9820, 0xe872: 0x6c2aac20, + 0xe875: 0x6c2aa620, 0xe877: 0x6c0e9220, + 0xe87d: 0x6c2aa820, 0xe87e: 0x6c2aa220, 0xe87f: 0x6c04e420, + // Block 0x3a2, offset 0xe880 + 0xe881: 0x6c2aa020, 0xe882: 0x6c2aae20, + 0xe888: 0x6c055020, 0xe88b: 0x6c0db420, + 0xe88d: 0x6c2aba20, + 0xe892: 0x6c2ab220, + 0xe896: 0x6c0d6220, 0xe897: 0x6c2ab020, + 0xe899: 0x6c2ab620, + 0xe89e: 0x6c2aa420, + 0xe8a2: 0x6c2ab820, + 0xe8a4: 0x6c2abc20, + 0xe8ab: 0x6c123e20, + 0xe8ae: 0x6c2ab420, + 0xe8b0: 0x6c2abe20, 0xe8b1: 0x6c2ac220, + 0xe8b4: 0x6c064620, 0xe8b5: 0x6c2aaa20, 0xe8b7: 0x6c004220, + 0xe8bf: 0x6c2ac020, + // Block 0x3a3, offset 0xe8c0 + 0xe8c1: 0x6c07ce20, 0xe8c2: 0x6c16b420, 0xe8c3: 0x6c2ac420, + 0xe8c4: 0x6c2ac620, 0xe8c5: 0x6c0d2620, + 0xe8cf: 0x6c160c20, + 0xe8d4: 0x6c2ac820, 0xe8d5: 0x6c157620, + 0xe8d8: 0x6c2aca20, 0xe8d9: 0x6c2acc20, + 0xe8dc: 0x6c13a020, 0xe8dd: 0x6c2ace20, 0xe8df: 0x6c079820, + 0xe8e1: 0x6c160e20, + 0xe8e8: 0x6c2ad820, + 0xe8f2: 0x6c2ada20, 0xe8f3: 0x6c0ab820, + 0xe8f4: 0x6c2ad620, + 0xe8f8: 0x6c15da20, 0xe8f9: 0x6c2ad020, + 0xe8fc: 0x6c2ad420, 0xe8fd: 0x6c0bfa20, 0xe8fe: 0x6c0bc020, + // Block 0x3a4, offset 0xe900 + 0xe902: 0x6c2ad220, + 0xe904: 0x6c2adc20, 0xe907: 0x6c131e20, + 0xe90a: 0x6c2ae020, + 0xe90c: 0x6c2ade20, + 0xe910: 0x6c02cc20, 0xe912: 0x6c13ea20, 0xe913: 0x6c2ae220, + 0xe91d: 0x6c2afa20, 0xe91e: 0x6c2ae620, + 0xe925: 0x6c2ae820, + 0xe92a: 0x6c2aea20, 0xe92b: 0x6c2aec20, + 0xe936: 0x6c2af420, + 0xe938: 0x6c2af620, 0xe93b: 0x6c2af220, + // Block 0x3a5, offset 0xe940 + 0xe941: 0x6c2aee20, 0xe943: 0x6c2ae420, + 0xe944: 0x6c2af020, + 0xe94c: 0x6c2af820, 0xe94d: 0x6c2ed820, + 0xe956: 0x6c018820, + 0xe95e: 0x6c2afe20, 0xe95f: 0x6c04e620, + 0xe960: 0x6c2afc20, + 0xe964: 0x6c2b0220, 0xe966: 0x6c2b0020, + 0xe96a: 0x6c2b0620, + 0xe96d: 0x6c2b0420, 0xe96f: 0x6c2b0820, + 0xe972: 0x6c09ae20, + 0xe974: 0x6c2b0a20, 0xe977: 0x6c2b0c20, + 0xe97e: 0x6c2b0e20, 0xe97f: 0x6c0bfc20, + // Block 0x3a6, offset 0xe980 + 0xe981: 0x6c15ba20, 0xe983: 0x6c2b1020, + 0xe986: 0x6c132020, 0xe987: 0x6c113020, + 0xe988: 0x6c2b1220, 0xe98a: 0x6c2b1420, 0xe98b: 0x6c05f620, + 0xe98f: 0x6c03c420, + 0xe993: 0x6c2b1620, + 0xe996: 0x6c08aa20, 0xe997: 0x6c112620, + 0xe998: 0x6c2b1820, 0xe99a: 0x6c029420, + 0xe9a1: 0x6c2b1a20, + 0xe9a6: 0x6c2b1e20, 0xe9a7: 0x6c15fa20, + 0xe9a9: 0x6c2b1c20, 0xe9aa: 0x6c0b5020, + 0xe9ac: 0x6c2b2020, 0xe9af: 0x6c2b2220, + 0xe9b2: 0x6c2b2420, 0xe9b3: 0x6c035220, + 0xe9ba: 0x6c2b2620, + 0xe9bd: 0x6c2b2820, 0xe9bf: 0x6c2b2a20, + // Block 0x3a7, offset 0xe9c0 + 0xe9c0: 0x6c2b2c20, + 0xe9d2: 0x6c029620, + 0xe9da: 0x6c2b2e20, + 0xe9dc: 0x6c2b3020, 0xe9dd: 0x6c2b3220, + 0xe9e3: 0x6c021c20, + 0xe9e6: 0x6c0b1420, 0xe9e7: 0x6c2b3420, + 0xe9f4: 0x6c2b3620, + 0xe9f8: 0x6c2b3820, + // Block 0x3a8, offset 0xea00 + 0xea00: 0x6c062020, 0xea02: 0x6c0f6620, 0xea03: 0x6c2b3a20, + 0xea08: 0x6c059220, 0xea0a: 0x6c0b7020, + 0xea0c: 0x6c2b4020, 0xea0e: 0x6c103020, + 0xea10: 0x6c2b3e20, 0xea13: 0x6c054620, + 0xea16: 0x6c2b3c20, 0xea17: 0x6c0de620, + 0xea18: 0x6c03c620, 0xea1b: 0x6c2b4220, + 0xea1d: 0x6c2b4420, 0xea1f: 0x6c0aba20, + 0xea23: 0x6c05be20, + 0xea25: 0x6c2b4620, + 0xea2a: 0x6c13ec20, + 0xea2d: 0x6c0c3e20, + 0xea31: 0x6c045820, 0xea33: 0x6c153a20, + 0xea34: 0x6c0cd020, 0xea36: 0x6c2b4820, + 0xea3a: 0x6c0b5220, 0xea3b: 0x6c0e9420, + 0xea3c: 0x6c0abc20, + // Block 0x3a9, offset 0xea40 + 0xea41: 0x6c2b4a20, + 0xea46: 0x6c2b5020, + 0xea48: 0x6c2b5220, + 0xea50: 0x6c079420, 0xea51: 0x6c0d7c20, 0xea52: 0x6c2b4e20, + 0xea54: 0x6c0abe20, 0xea55: 0x6c129820, + 0xea5b: 0x6c2b4c20, + 0xea5e: 0x6c08ac20, + 0xea60: 0x6c012220, 0xea62: 0x6c2b5a20, 0xea63: 0x6c059420, + 0xea66: 0x6c08b020, + 0xea69: 0x6c08ae20, 0xea6b: 0x6c171e20, + 0xea6c: 0x6c2b5820, 0xea6d: 0x6c2b5620, 0xea6e: 0x6c0c8a20, + 0xea70: 0x6c040620, 0xea71: 0x6c170a20, 0xea72: 0x6c026820, 0xea73: 0x6c0ac020, + 0xea7c: 0x6c2b5420, + // Block 0x3aa, offset 0xea80 + 0xea82: 0x6c2b5e20, + 0xea84: 0x6c2b6020, 0xea85: 0x6c2b5c20, 0xea87: 0x6c065020, + 0xea89: 0x6c158c20, + 0xea8c: 0x6c08b220, 0xea8d: 0x6c10f220, + 0xea91: 0x6c2b6620, 0xea93: 0x6c0c0020, + 0xea95: 0x6c0e3820, + 0xea98: 0x6c157820, 0xea9a: 0x6c2b6c20, + 0xea9e: 0x6c067820, + 0xeaa0: 0x6c0bfe20, 0xeaa1: 0x6c2b6420, 0xeaa3: 0x6c2b6e20, + 0xeaa4: 0x6c067a20, 0xeaa5: 0x6c2b6820, 0xeaa6: 0x6c2b6a20, + 0xeaa8: 0x6c2b6220, + 0xeaac: 0x6c0c4420, 0xeaad: 0x6c107a20, + 0xeab0: 0x6c0e1220, 0xeab2: 0x6c01f220, + 0xeab9: 0x6c124020, + 0xeabc: 0x6c03f220, 0xeabf: 0x6c0ed820, + // Block 0x3ab, offset 0xeac0 + 0xeac2: 0x6c2b7420, + 0xeac4: 0x6c2b7020, 0xeac7: 0x6c0e4c20, + 0xeacb: 0x6c0c0220, + 0xeacc: 0x6c035420, 0xeacd: 0x6c2b7220, 0xeacf: 0x6c0b7a20, + 0xead2: 0x6c165c20, + 0xead6: 0x6c170420, + 0xeada: 0x6c2b7620, 0xeadb: 0x6c2b8c20, + 0xeadc: 0x6c0eda20, 0xeade: 0x6c2b8a20, + 0xeae0: 0x6c2b8420, 0xeae1: 0x6c2b9420, 0xeae2: 0x6c2b8620, + 0xeae4: 0x6c2b7e20, 0xeae6: 0x6c0f6820, 0xeae7: 0x6c2b7c20, + 0xeaeb: 0x6c2b7820, + 0xeaed: 0x6c154e20, 0xeaee: 0x6c08b420, + 0xeaf1: 0x6c2b8020, 0xeaf3: 0x6c2b7a20, + 0xeaf7: 0x6c2b8820, + 0xeaf8: 0x6c0a3420, 0xeafa: 0x6c062220, + 0xeafe: 0x6c0dec20, + // Block 0x3ac, offset 0xeb00 + 0xeb00: 0x6c141e20, 0xeb01: 0x6c013020, 0xeb02: 0x6c008420, + 0xeb04: 0x6c103220, 0xeb07: 0x6c2b9020, + 0xeb0c: 0x6c2b8e20, 0xeb0e: 0x6c10b420, + 0xeb10: 0x6c2b9820, + 0xeb14: 0x6c2b8220, 0xeb16: 0x6c2b9620, 0xeb17: 0x6c2b9a20, + 0xeb19: 0x6c05f820, 0xeb1a: 0x6c2b9220, 0xeb1b: 0x6c070820, + 0xeb1d: 0x6c093a20, + 0xeb20: 0x6c2b9c20, 0xeb21: 0x6c15bc20, + 0xeb26: 0x6c2ba220, + 0xeb28: 0x6c2ba820, 0xeb2b: 0x6c2ba420, + 0xeb2c: 0x6c128620, + 0xeb33: 0x6c2b9e20, + 0xeb39: 0x6c04e820, + 0xeb3e: 0x6c2ba620, + // Block 0x3ad, offset 0xeb40 + 0xeb41: 0x6c2baa20, + 0xeb49: 0x6c2bb220, + 0xeb4c: 0x6c2bac20, 0xeb4e: 0x6c2bb020, 0xeb4f: 0x6c2bae20, + 0xeb56: 0x6c2bb420, + 0xeb58: 0x6c08f220, 0xeb5a: 0x6c2bb820, 0xeb5b: 0x6c2bb620, + 0xeb5c: 0x6c12ec20, 0xeb5f: 0x6c2bbc20, + 0xeb66: 0x6c059620, + 0xeb6b: 0x6c2bba20, + 0xeb6c: 0x6c2bbe20, 0xeb6f: 0x6c2bc020, + 0xeb70: 0x6c03f420, 0xeb71: 0x6c279420, 0xeb72: 0x6c0afa20, + 0xeb74: 0x6c2bc220, 0xeb77: 0x6c067c20, + 0xeb7d: 0x6c2bc420, + // Block 0x3ae, offset 0xeb80 + 0xeb80: 0x6c2bc620, 0xeb83: 0x6c085020, + 0xeb8a: 0x6c1ede20, + 0xeb8c: 0x6c2bc820, 0xeb8e: 0x6c2bca20, + 0xeb90: 0x6c09b020, 0xeb92: 0x6c2bcc20, 0xeb93: 0x6c2bce20, + 0xeb96: 0x6c2bd020, + 0xeb99: 0x6c2bd220, 0xeb9a: 0x6c2bd420, + // Block 0x3af, offset 0xebc0 + 0xebf7: 0x6c0e0a20, + 0xebfa: 0x6c2bd620, + 0xebff: 0x6c2bda20, + // Block 0x3b0, offset 0xec00 + 0xec01: 0x6c2bd820, + 0xec06: 0x6c103420, + 0xec08: 0x6c2bdc20, 0xec0a: 0x6c13ee20, + 0xec0c: 0x6c2bde20, 0xec0e: 0x6c2be020, + 0xec10: 0x6c2be220, + 0xec15: 0x6c2be420, + 0xec1a: 0x6c109c20, + 0xec21: 0x6c0ac220, 0xec22: 0x6c2be620, + 0xec2a: 0x6c073220, 0xec2b: 0x6c174620, + 0xec2c: 0x6c2be820, + 0xec38: 0x6c2bea20, 0xec39: 0x6c129a20, 0xec3a: 0x6c2bec20, + 0xec3c: 0x6c2bfc20, + // Block 0x3b1, offset 0xec40 + 0xec42: 0x6c2bee20, + 0xec45: 0x6c2bf220, + 0xec49: 0x6c2bf020, 0xec4a: 0x6c2bf420, + 0xec4c: 0x6c142020, 0xec4d: 0x6c2bf620, 0xec4e: 0x6c2bf820, + 0xec54: 0x6c2bfa20, + 0xec58: 0x6c2bfe20, + 0xec5d: 0x6c024e20, 0xec5e: 0x6c0f3e20, + 0xec60: 0x6c12ee20, 0xec61: 0x6c07dc20, 0xec62: 0x6c070a20, + 0xec67: 0x6c12ba20, + 0xec68: 0x6c01f620, 0xec69: 0x6c11fc20, 0xec6a: 0x6c2c0420, 0xec6b: 0x6c035620, + 0xec6c: 0x6c0c2a20, 0xec6d: 0x6c2c0220, 0xec6e: 0x6c2c0c20, 0xec6f: 0x6c0ea620, + 0xec70: 0x6c151620, 0xec72: 0x6c2c0820, 0xec73: 0x6c2c0a20, + 0xec74: 0x6c03c820, 0xec76: 0x6c2c0e20, 0xec77: 0x6c116a20, + 0xec78: 0x6c0db620, 0xec7b: 0x6c124220, + 0xec7c: 0x6c0fa620, 0xec7d: 0x6c2c0620, 0xec7f: 0x6c142220, + // Block 0x3b2, offset 0xec80 + 0xec80: 0x6c021020, 0xec81: 0x6c2c1220, 0xec82: 0x6c16d420, 0xec83: 0x6c0ef420, + 0xec84: 0x6c170e20, 0xec87: 0x6c08b620, + 0xec88: 0x6c2c1020, 0xec8a: 0x6c0d5a20, + 0xec8d: 0x6c2c3220, 0xec8e: 0x6c0c8c20, + 0xec91: 0x6c10d820, 0xec93: 0x6c12bc20, + 0xec9a: 0x6c2c1820, 0xec9b: 0x6c085220, + 0xec9c: 0x6c08b820, 0xec9e: 0x6c0ac420, + 0xeca0: 0x6c116e20, 0xeca2: 0x6c05fa20, 0xeca3: 0x6c2c1620, + 0xeca4: 0x6c2c1420, 0xeca6: 0x6c12f020, + 0xecaa: 0x6c091220, + 0xecad: 0x6c0fd020, + 0xecba: 0x6c2c1c20, 0xecbb: 0x6c2c1e20, + 0xecbc: 0x6c070c20, 0xecbd: 0x6c2c1a20, + // Block 0x3b3, offset 0xecc0 + 0xecc4: 0x6c2c2020, 0xecc5: 0x6c2c2220, 0xecc7: 0x6c2c2620, + 0xecc8: 0x6c0d3e20, 0xecca: 0x6c2c2420, 0xeccb: 0x6c037c20, + 0xeccd: 0x6c2c2a20, 0xeccf: 0x6c2c2820, + 0xecd0: 0x6c2c2c20, 0xecd3: 0x6c2c3020, + 0xecd4: 0x6c2c3420, 0xecd6: 0x6c2c3620, + // Block 0x3b4, offset 0xed00 + 0xed24: 0x6c0c2c20, 0xed26: 0x6c092e20, 0xed27: 0x6c2c3820, + 0xed2b: 0x6c029820, + 0xed2d: 0x6c2c3a20, + 0xed30: 0x6c0d2820, 0xed31: 0x6c2c3c20, 0xed33: 0x6c2c3e20, + 0xed34: 0x6c12f220, 0xed37: 0x6c03ca20, + // Block 0x3b5, offset 0xed40 + 0xed41: 0x6c2c4020, + 0xed45: 0x6c0edc20, + 0xed4a: 0x6c013220, + 0xed59: 0x6c2c4220, + 0xed63: 0x6c097220, + 0xed68: 0x6c0bb020, + 0xed73: 0x6c0d5220, + 0xed7a: 0x6c2c4820, + 0xed7e: 0x6c2c4620, + // Block 0x3b6, offset 0xed80 + 0xed82: 0x6c2c4420, + 0xed8b: 0x6c2c5420, + 0xed8c: 0x6c2c5020, 0xed8f: 0x6c2c4a20, + 0xed96: 0x6c2c4e20, + 0xed9a: 0x6c2c4c20, 0xed9b: 0x6c2c5220, + 0xed9d: 0x6c045a20, 0xed9f: 0x6c2c5a20, + 0xeda1: 0x6c0c2e20, 0xeda3: 0x6c2c5c20, + 0xeda8: 0x6c065220, 0xedaa: 0x6c2c5620, 0xedab: 0x6c2c5820, + 0xedaf: 0x6c16d620, + 0xedb3: 0x6c0ede20, + 0xedb5: 0x6c0c8e20, + 0xedbc: 0x6c2c5e20, 0xedbf: 0x6c2c6420, + // Block 0x3b7, offset 0xedc0 + 0xedc8: 0x6c2c6020, 0xedc9: 0x6c2c6220, 0xedca: 0x6c15be20, + 0xedcf: 0x6c103620, + 0xedd0: 0x6c2c6a20, + 0xeddd: 0x6c2c6620, 0xedde: 0x6c2c6820, 0xeddf: 0x6c2c6c20, + 0xedea: 0x6c2c8820, + 0xedf0: 0x6c2c7220, + 0xedf4: 0x6c2c7420, 0xedf5: 0x6c2c7020, + // Block 0x3b8, offset 0xee00 + 0xee02: 0x6c2c6e20, + 0xee04: 0x6c0f6a20, 0xee07: 0x6c2c7820, + 0xee08: 0x6c2c8020, 0xee09: 0x6c2c7a20, 0xee0a: 0x6c2c7620, + 0xee0c: 0x6c2c7c20, + 0xee10: 0x6c2c7e20, + 0xee15: 0x6c2c8c20, + 0xee19: 0x6c2c8220, + 0xee1f: 0x6c0c3020, + 0xee20: 0x6c2c8620, 0xee23: 0x6c2c8a20, + 0xee24: 0x6c2c8420, + 0xee32: 0x6c2c9020, + 0xee34: 0x6c09b220, 0xee36: 0x6c2c8e20, + 0xee3c: 0x6c2c9220, + // Block 0x3b9, offset 0xee40 + 0xee41: 0x6c2c9420, + 0xee44: 0x6c2c9a20, 0xee45: 0x6c2c9820, 0xee47: 0x6c2c9620, + 0xee4a: 0x6c2c9e20, 0xee4b: 0x6c2c9c20, + 0xee4d: 0x6c153c20, + 0xee51: 0x6c2ca220, 0xee53: 0x6c2ca020, + 0xee54: 0x6c2ca420, + 0xee59: 0x6c2ca620, + 0xee61: 0x6c2caa20, + 0xee6a: 0x6c2ca820, 0xee6b: 0x6c0b5420, + 0xee6c: 0x6c2cac20, 0xee6f: 0x6c050220, + 0xee70: 0x6c2cae20, 0xee71: 0x6c2cb220, + 0xee7e: 0x6c2cb420, + // Block 0x3ba, offset 0xee80 + 0xee85: 0x6c2cb620, 0xee86: 0x6c2cb020, + 0xee88: 0x6c2cb820, 0xee8a: 0x6c093c20, 0xee8b: 0x6c2cba20, + 0xee8c: 0x6c03cc20, 0xee8d: 0x6c054a20, + 0xee92: 0x6c05fc20, + 0xee9b: 0x6c2cbc20, + 0xee9f: 0x6c10c820, + 0xeea2: 0x6c0fa820, 0xeea3: 0x6c2cbe20, + 0xeeab: 0x6c2cc420, + 0xeeb8: 0x6c08f820, 0xeebb: 0x6c2cc220, + 0xeebc: 0x6c2cc020, 0xeebd: 0x6c059820, 0xeebe: 0x6c2cc620, + // Block 0x3bb, offset 0xeec0 + 0xeec3: 0x6c029a20, + 0xeec5: 0x6c2cca20, + 0xeec9: 0x6c07d020, 0xeeca: 0x6c2cc820, + 0xeecc: 0x6c2cda20, + 0xeed2: 0x6c2cce20, 0xeed3: 0x6c2cd220, + 0xeed4: 0x6c13a220, 0xeed5: 0x6c2ccc20, + 0xeed9: 0x6c2cd020, 0xeedb: 0x6c2cd820, + 0xeedc: 0x6c2cd420, 0xeedd: 0x6c03ce20, 0xeedf: 0x6c2cd620, + 0xeee6: 0x6c2cdc20, + 0xeee9: 0x6c115820, 0xeeea: 0x6c167820, + 0xeeef: 0x6c09b420, + 0xeef3: 0x6c2cde20, + 0xeef8: 0x6c155020, 0xeef9: 0x6c2ce220, 0xeefb: 0x6c2ce020, + 0xeefe: 0x6c2ce820, 0xeeff: 0x6c158e20, + // Block 0x3bc, offset 0xef00 + 0xef02: 0x6c2ce620, + 0xef04: 0x6c02ce20, 0xef05: 0x6c2ce420, 0xef06: 0x6c2cee20, + 0xef09: 0x6c2cec20, + 0xef0c: 0x6c2cea20, 0xef0d: 0x6c0f9020, 0xef0e: 0x6c2cf020, + 0xef17: 0x6c2cf220, + 0xef1c: 0x6c2cf420, 0xef1f: 0x6c073420, + 0xef21: 0x6c052e20, 0xef22: 0x6c2cf620, 0xef23: 0x6c2cf820, + 0xef24: 0x6c2cfa20, + // Block 0x3bd, offset 0xef40 + 0xef5b: 0x6c0b5620, + 0xef5c: 0x6c2cfc20, 0xef5e: 0x6c08ea20, 0xef5f: 0x6c2cfe20, + 0xef63: 0x6c2d0020, + 0xef67: 0x6c18a420, + 0xef68: 0x6c18a220, + 0xef6d: 0x6c2d0220, 0xef6e: 0x6c273620, 0xef6f: 0x6c2d0420, + 0xef70: 0x6c0dfc20, 0xef71: 0x6c0b1a20, 0xef72: 0x6c112420, + 0xef77: 0x6c2d0620, + 0xef7a: 0x6c138220, 0xef7b: 0x6c0f1820, + 0xef7c: 0x6c075820, 0xef7f: 0x6c0e0620, + // Block 0x3be, offset 0xef80 + 0xef82: 0x6c00d020, + 0xef84: 0x6c148420, 0xef85: 0x6c0b7220, + 0xef8e: 0x6c05a020, + 0xef91: 0x6c04ea20, + 0xef94: 0x6c138420, + 0xef9a: 0x6c2d0820, + 0xefa2: 0x6c2d0c20, + 0xefa5: 0x6c2d0a20, 0xefa6: 0x6c01f820, + 0xefa9: 0x6c10d420, 0xefaa: 0x6c2d0e20, 0xefab: 0x6c119220, + 0xefad: 0x6c0f9220, 0xefaf: 0x6c2d1020, + 0xefb0: 0x6c09f020, + 0xefb4: 0x6c2d1420, 0xefb7: 0x6c14d420, + 0xefb8: 0x6c2d3220, 0xefb9: 0x6c2d1820, 0xefba: 0x6c2d1a20, + 0xefbd: 0x6c0f0220, + // Block 0x3bf, offset 0xefc0 + 0xefc0: 0x6c0db820, 0xefc1: 0x6c0d2a20, 0xefc3: 0x6c103820, + 0xefc5: 0x6c2d1620, 0xefc6: 0x6c041620, + 0xefcb: 0x6c2d2820, + 0xefcd: 0x6c2d2220, 0xefce: 0x6c2d3c20, 0xefcf: 0x6c103a20, + 0xefd0: 0x6c0e7420, 0xefd1: 0x6c2d1c20, 0xefd3: 0x6c0f6c20, + 0xefd4: 0x6c0fd220, 0xefd5: 0x6c2d1e20, 0xefd6: 0x6c2d2620, 0xefd7: 0x6c0b8420, + 0xefd9: 0x6c117220, 0xefda: 0x6c0f0820, + 0xefdd: 0x6c0c0420, 0xefde: 0x6c2d2420, 0xefdf: 0x6c0d5420, + 0xefe0: 0x6c0d4020, 0xefe1: 0x6c2d2020, 0xefe2: 0x6c001220, 0xefe3: 0x6c16c820, + 0xefe7: 0x6c2d2a20, + 0xefee: 0x6c0dba20, + 0xeff1: 0x6c09b620, 0xeff2: 0x6c0b5820, + 0xeff5: 0x6c2d2e20, 0xeff6: 0x6c2d2c20, + 0xeff8: 0x6c009e20, 0xeff9: 0x6c2d3020, + 0xeffc: 0x6c127a20, 0xeffe: 0x6c2d4020, + // Block 0x3c0, offset 0xf000 + 0xf001: 0x6c109e20, 0xf002: 0x6c0b9a20, + 0xf005: 0x6c0e6620, 0xf007: 0x6c051820, + 0xf009: 0x6c2d3e20, 0xf00a: 0x6c157a20, 0xf00b: 0x6c00fa20, + 0xf00d: 0x6c138620, 0xf00e: 0x6c01fa20, 0xf00f: 0x6c2d3420, + 0xf010: 0x6c2d3620, 0xf011: 0x6c2d3820, 0xf012: 0x6c2d3a20, 0xf013: 0x6c105e20, + 0xf014: 0x6c0dfa20, 0xf015: 0x6c008620, 0xf016: 0x6c2d4220, + 0xf018: 0x6c2d4420, 0xf019: 0x6c31a020, + 0xf01c: 0x6c0d7220, 0xf01e: 0x6c2d4620, + 0xf020: 0x6c016220, 0xf021: 0x6c0cd420, 0xf023: 0x6c05fe20, + 0xf025: 0x6c15c020, + 0xf028: 0x6c2d4820, 0xf029: 0x6c0f8420, + 0xf02d: 0x6c0d2c20, 0xf02e: 0x6c093e20, 0xf02f: 0x6c2d4a20, + 0xf032: 0x6c2d5020, + 0xf035: 0x6c0a1620, 0xf036: 0x6c2d4c20, 0xf037: 0x6c0c9220, + 0xf038: 0x6c0c9020, 0xf03a: 0x6c008820, + 0xf03c: 0x6c165e20, 0xf03d: 0x6c2d5420, 0xf03f: 0x6c124420, + // Block 0x3c1, offset 0xf040 + 0xf040: 0x6c2d5820, 0xf041: 0x6c2d5620, 0xf042: 0x6c2d5220, 0xf043: 0x6c25a620, + 0xf044: 0x6c035820, 0xf047: 0x6c2d1220, + 0xf049: 0x6c2d5c20, 0xf04a: 0x6c2d5a20, + 0xf04f: 0x6c2d5e20, + 0xf051: 0x6c157c20, + 0xf063: 0x6c10aa20, + 0xf066: 0x6c13f020, + 0xf068: 0x6c2d6020, 0xf06a: 0x6c094220, + 0xf06f: 0x6c2d6220, + 0xf071: 0x6c2d6420, + 0xf075: 0x6c2d6620, + 0xf078: 0x6c0f6e20, + // Block 0x3c2, offset 0xf080 + 0xf081: 0x6c009420, + 0xf08a: 0x6c070e20, + 0xf08e: 0x6c16f820, + 0xf09b: 0x6c2d6e20, + 0xf0a1: 0x6c054c20, 0xf0a2: 0x6c2d6820, + 0xf0a4: 0x6c2d6a20, + 0xf0a8: 0x6c130420, + 0xf0ad: 0x6c029c20, + 0xf0b5: 0x6c157e20, 0xf0b7: 0x6c04a620, + 0xf0bd: 0x6c0fd420, + // Block 0x3c3, offset 0xf0c0 + 0xf0c2: 0x6c2d7020, + 0xf0d2: 0x6c2d7220, + 0xf0d9: 0x6c2d7420, + 0xf0ed: 0x6c0f7020, + 0xf0f0: 0x6c2d7820, 0xf0f2: 0x6c2d7620, + // Block 0x3c4, offset 0xf100 + 0xf109: 0x6c108e20, 0xf10a: 0x6c2d7a20, 0xf10b: 0x6c09b820, + 0xf10c: 0x6c095020, 0xf10d: 0x6c115a20, 0xf10e: 0x6c0e9620, + 0xf112: 0x6c097420, + 0xf114: 0x6c0b9c20, 0xf116: 0x6c2d7c20, + 0xf118: 0x6c2d7e20, + 0xf122: 0x6c0b7e20, 0xf123: 0x6c2d8020, + 0xf125: 0x6c2d8220, + 0xf129: 0x6c2d8420, 0xf12a: 0x6c15ea20, + 0xf12c: 0x6c09ba20, + 0xf132: 0x6c2d8820, 0xf133: 0x6c2d8620, + 0xf135: 0x6c071020, 0xf137: 0x6c074220, + 0xf138: 0x6c085420, + // Block 0x3c5, offset 0xf140 + 0xf142: 0x6c2d8e20, + 0xf147: 0x6c0a1820, + 0xf149: 0x6c2d8c20, 0xf14b: 0x6c2d8a20, + 0xf14d: 0x6c0dca20, + 0xf150: 0x6c067e20, 0xf152: 0x6c0c0620, + 0xf157: 0x6c11c020, + 0xf15c: 0x6c09be20, + 0xf162: 0x6c2d9020, + 0xf164: 0x6c0ac620, + 0xf16a: 0x6c2d9620, 0xf16b: 0x6c2d9220, + 0xf16f: 0x6c2d9420, + 0xf174: 0x6c2d9a20, 0xf175: 0x6c2d9820, + 0xf178: 0x6c0afc20, 0xf17a: 0x6c2d9c20, + // Block 0x3c6, offset 0xf180 + 0xf180: 0x6c2d9e20, 0xf181: 0x6c2da020, + 0xf186: 0x6c120020, 0xf187: 0x6c07be20, + 0xf188: 0x6c095220, 0xf189: 0x6c2da220, 0xf18b: 0x6c2da420, + 0xf18c: 0x6c161020, 0xf18d: 0x6c09d620, 0xf18e: 0x6c152c20, 0xf18f: 0x6c166020, + 0xf190: 0x6c2da620, 0xf191: 0x6c04ec20, + 0xf196: 0x6c2da820, + 0xf198: 0x6c0f7220, 0xf19b: 0x6c2dae20, + 0xf19c: 0x6c02e420, 0xf19d: 0x6c0b5a20, 0xf19f: 0x6c2daa20, + 0xf1a1: 0x6c2dac20, 0xf1a3: 0x6c0f3020, + 0xf1a6: 0x6c143e20, 0xf1a7: 0x6c052020, + 0xf1b5: 0x6c2db220, 0xf1b6: 0x6c2db420, + 0xf1bc: 0x6c2db020, 0xf1bf: 0x6c2db820, + // Block 0x3c7, offset 0xf1c0 + 0xf1cd: 0x6c10a620, 0xf1ce: 0x6c027a20, + 0xf1d1: 0x6c2dc020, + 0xf1d4: 0x6c2dba20, 0xf1d5: 0x6c2dbe20, + 0xf1de: 0x6c2db620, + 0xf1e9: 0x6c2e4c20, + 0xf1ec: 0x6c2dbc20, + 0xf1f4: 0x6c169e20, 0xf1f7: 0x6c065420, + 0xf1ff: 0x6c2dd020, + // Block 0x3c8, offset 0xf200 + 0xf204: 0x6c0f9420, 0xf205: 0x6c2dc620, + 0xf208: 0x6c2dcc20, 0xf209: 0x6c2dc820, 0xf20b: 0x6c2dd220, + 0xf210: 0x6c2dd420, + 0xf217: 0x6c2dc420, + 0xf21a: 0x6c2dde20, 0xf21b: 0x6c016420, + 0xf21e: 0x6c2dc220, + 0xf222: 0x6c11ba20, + 0xf224: 0x6c2dca20, 0xf226: 0x6c0ac820, + 0xf231: 0x6c071220, + 0xf23e: 0x6c142420, + // Block 0x3c9, offset 0xf240 + 0xf240: 0x6c04f020, 0xf243: 0x6c09d820, + 0xf245: 0x6c106020, + 0xf251: 0x6c0c9620, 0xf253: 0x6c2dda20, + 0xf255: 0x6c2dce20, 0xf256: 0x6c2dd820, + 0xf258: 0x6c14d620, 0xf25a: 0x6c0ee020, 0xf25b: 0x6c2ddc20, + 0xf25c: 0x6c2dd620, + 0xf26d: 0x6c0c9420, + 0xf277: 0x6c2de420, + 0xf279: 0x6c2de220, + // Block 0x3ca, offset 0xf280 + 0xf28f: 0x6c2de020, + 0xf292: 0x6c13f220, + 0xf2a4: 0x6c0a4220, + 0xf2a9: 0x6c2de620, 0xf2aa: 0x6c139620, + 0xf2ad: 0x6c012420, + 0xf2b2: 0x6c12a820, 0xf2b3: 0x6c0e9820, + 0xf2b8: 0x6c045c20, 0xf2ba: 0x6c2dea20, + 0xf2bc: 0x6c071620, + // Block 0x3cb, offset 0xf2c0 + 0xf2c6: 0x6c082c20, + 0xf2cf: 0x6c2de820, + 0xf2d0: 0x6c0b9e20, + 0xf2d8: 0x6c0ba020, 0xf2d9: 0x6c2df020, 0xf2da: 0x6c2df420, + 0xf2e0: 0x6c0afe20, 0xf2e2: 0x6c2df220, 0xf2e3: 0x6c2df620, + 0xf2e6: 0x6c04ce20, + 0xf2e8: 0x6c12a620, 0xf2eb: 0x6c095420, + 0xf2ec: 0x6c16ca20, 0xf2ee: 0x6c2dee20, 0xf2ef: 0x6c080820, + 0xf2f2: 0x6c170220, + 0xf2f5: 0x6c2dfa20, + 0xf2fa: 0x6c2df820, 0xf2fb: 0x6c2dfc20, + // Block 0x3cc, offset 0xf300 + 0xf304: 0x6c2dec20, + 0xf30b: 0x6c10ba20, + 0xf30d: 0x6c0fd620, + 0xf314: 0x6c0f1e20, 0xf316: 0x6c2e0620, + 0xf31b: 0x6c0e3a20, + 0xf31c: 0x6c2dfe20, + 0xf320: 0x6c2e0020, + 0xf32c: 0x6c053e20, 0xf32e: 0x6c2e0420, + 0xf335: 0x6c060020, + 0xf33c: 0x6c2e0220, 0xf33e: 0x6c0aca20, + // Block 0x3cd, offset 0xf340 + 0xf34c: 0x6c02e620, + 0xf354: 0x6c2e0e20, 0xf356: 0x6c079620, 0xf357: 0x6c0d2e20, + 0xf35a: 0x6c0f0420, + 0xf367: 0x6c026a20, + 0xf36c: 0x6c2e0a20, 0xf36d: 0x6c2e0c20, 0xf36e: 0x6c0ef620, + 0xf370: 0x6c2e0820, + 0xf379: 0x6c2e1020, + // Block 0x3ce, offset 0xf380 + 0xf383: 0x6c2e1c20, + 0xf388: 0x6c2e2220, + 0xf390: 0x6c2e2020, 0xf391: 0x6c0f8620, + 0xf396: 0x6c2e1220, 0xf397: 0x6c2e1420, + 0xf398: 0x6c2e1a20, + 0xf39d: 0x6c2e1e20, + 0xf3a1: 0x6c04a820, + 0xf3a4: 0x6c2e2420, 0xf3a5: 0x6c2e1820, + 0xf3a8: 0x6c2e1620, + // Block 0x3cf, offset 0xf3c0 + 0xf3c3: 0x6c2e2c20, + 0xf3c7: 0x6c2e2e20, + 0xf3d0: 0x6c2e3020, 0xf3d3: 0x6c2e2a20, + 0xf3d4: 0x6c2e2820, + 0xf3d8: 0x6c0acc20, 0xf3d9: 0x6c103c20, 0xf3da: 0x6c2e2620, + 0xf3e1: 0x6c2e3820, + 0xf3eb: 0x6c2e3420, + 0xf3f5: 0x6c2e3620, 0xf3f6: 0x6c2e3220, + 0xf3f8: 0x6c0de820, 0xf3fa: 0x6c2e3a20, + // Block 0x3d0, offset 0xf400 + 0xf401: 0x6c2e3c20, + 0xf404: 0x6c2e4020, + 0xf411: 0x6c035a20, 0xf412: 0x6c2e3e20, 0xf413: 0x6c154420, + 0xf41a: 0x6c2e5620, 0xf41b: 0x6c2e4220, + 0xf41e: 0x6c2e4820, + 0xf420: 0x6c2e4420, 0xf422: 0x6c2e4620, + 0xf42a: 0x6c2e4a20, + 0xf430: 0x6c2e4e20, + 0xf435: 0x6c2e5020, 0xf437: 0x6c2e5220, + 0xf43c: 0x6c2e5820, 0xf43d: 0x6c2e5420, 0xf43e: 0x6c2e5a20, 0xf43f: 0x6c2e5e20, + // Block 0x3d1, offset 0xf440 + 0xf441: 0x6c2e5c20, + // Block 0x3d2, offset 0xf480 + 0xf4b7: 0x6c0ee220, + // Block 0x3d3, offset 0xf4c0 + 0xf4c0: 0x6c151e20, 0xf4c2: 0x6c2e6020, 0xf4c3: 0x6c0c9820, + 0xf4c7: 0x6c2e6220, + 0xf4c9: 0x6c136020, 0xf4ca: 0x6c2e6420, 0xf4cb: 0x6c024a20, + 0xf4cf: 0x6c00f420, + 0xf4d1: 0x6c035e20, 0xf4d3: 0x6c035c20, + 0xf4d4: 0x6c2e6620, 0xf4d6: 0x6c2e6820, + 0xf4d8: 0x6c2e6a20, 0xf4d9: 0x6c2e6c20, + 0xf4e0: 0x6c2e6e20, 0xf4e2: 0x6c036020, 0xf4e3: 0x6c029e20, + 0xf4e4: 0x6c071820, 0xf4e5: 0x6c11cc20, 0xf4e7: 0x6c2e7220, + 0xf4e8: 0x6c2e7020, + 0xf4ed: 0x6c2e7420, + 0xf4f2: 0x6c013420, + 0xf4f9: 0x6c2e7a20, 0xf4fb: 0x6c2e7820, + 0xf4fc: 0x6c2e7620, 0xf4fe: 0x6c2e7c20, + // Block 0x3d4, offset 0xf500 + 0xf503: 0x6c2e8220, + 0xf507: 0x6c004e20, + 0xf50a: 0x6c2e7e20, + 0xf50c: 0x6c2e8620, 0xf50d: 0x6c2e8420, + 0xf514: 0x6c2e8a20, 0xf515: 0x6c2e8820, 0xf516: 0x6c2e8c20, + 0xf518: 0x6c104420, + 0xf51c: 0x6c2e8e20, + 0xf521: 0x6c2e9020, 0xf522: 0x6c2e9420, + 0xf525: 0x6c2e9220, + // Block 0x3d5, offset 0xf540 + 0xf55c: 0x6c12f420, + 0xf561: 0x6c2e9620, + 0xf568: 0x6c2e9820, 0xf56a: 0x6c07e220, + 0xf56e: 0x6c2e9a20, 0xf56f: 0x6c2e9c20, + 0xf572: 0x6c142620, + 0xf57b: 0x6c0cd220, + 0xf57f: 0x6c000820, + // Block 0x3d6, offset 0xf580 + 0xf580: 0x6c0d8e20, 0xf582: 0x6c2e9e20, + 0xf584: 0x6c12f620, + 0xf58b: 0x6c2ea420, + 0xf58c: 0x6c2ea020, 0xf58d: 0x6c071a20, 0xf58f: 0x6c2ea220, + 0xf590: 0x6c062420, + 0xf59b: 0x6c136220, + 0xf59c: 0x6c2ea820, 0xf59d: 0x6c2eac20, 0xf59e: 0x6c2eaa20, 0xf59f: 0x6c2eae20, + 0xf5a2: 0x6c00be20, 0xf5a3: 0x6c0b7420, + 0xf5a4: 0x6c0a4420, 0xf5a5: 0x6c036220, 0xf5a6: 0x6c2eb020, + 0xf5aa: 0x6c117020, + 0xf5ac: 0x6c2eb420, + 0xf5b0: 0x6c00c020, 0xf5b2: 0x6c2eb220, 0xf5b3: 0x6c0ef820, + 0xf5b5: 0x6c166220, 0xf5b6: 0x6c103e20, 0xf5b7: 0x6c2ea620, + 0xf5b8: 0x6c161420, 0xf5ba: 0x6c060220, + 0xf5bd: 0x6c15c220, + // Block 0x3d7, offset 0xf5c0 + 0xf5c5: 0x6c051a20, 0xf5c6: 0x6c163020, + 0xf5c8: 0x6c053420, 0xf5ca: 0x6c0dbc20, 0xf5cb: 0x6c281020, + 0xf5cd: 0x6c2eb620, 0xf5ce: 0x6c024c20, 0xf5cf: 0x6c0ba220, + 0xf5d4: 0x6c02a020, 0xf5d5: 0x6c2eba20, 0xf5d7: 0x6c2ebc20, + 0xf5d8: 0x6c2eb820, 0xf5d9: 0x6c05ac20, 0xf5db: 0x6c07d220, + 0xf5dc: 0x6c0ace20, + 0xf5e0: 0x6c00c220, 0xf5e3: 0x6c167a20, + 0xf5e7: 0x6c2ec020, + 0xf5e8: 0x6c2d4e20, 0xf5ea: 0x6c2ebe20, + 0xf5f0: 0x6c2ec620, 0xf5f1: 0x6c2ec220, 0xf5f2: 0x6c2ec420, + 0xf5f4: 0x6c2ec820, 0xf5f6: 0x6c2eca20, 0xf5f7: 0x6c16a020, + 0xf5f8: 0x6c2ecc20, 0xf5f9: 0x6c2ece20, 0xf5fb: 0x6c0c1220, + 0xf5fc: 0x6c11d620, + // Block 0x3d8, offset 0xf600 + 0xf600: 0x6c0bbe20, 0xf601: 0x6c037e20, + 0xf604: 0x6c158020, 0xf605: 0x6c021220, 0xf606: 0x6c09bc20, 0xf607: 0x6c065620, + 0xf609: 0x6c2ed420, 0xf60b: 0x6c2ed220, + 0xf60c: 0x6c08ba20, 0xf60d: 0x6c2ed620, 0xf60e: 0x6c2ed020, + 0xf611: 0x6c082420, + 0xf615: 0x6c2ede20, 0xf616: 0x6c2a5c20, + 0xf619: 0x6c190e20, 0xf61b: 0x6c0bb220, + 0xf61c: 0x6c2eda20, + 0xf622: 0x6c161220, 0xf623: 0x6c10ca20, + 0xf628: 0x6c00d220, 0xf62a: 0x6c0c4620, 0xf62b: 0x6c08fc20, + 0xf630: 0x6c134620, 0xf632: 0x6c00fc20, + 0xf636: 0x6c16a220, 0xf637: 0x6c15e220, + 0xf639: 0x6c2ee020, 0xf63b: 0x6c0fb620, + // Block 0x3d9, offset 0xf640 + 0xf640: 0x6c098620, + 0xf644: 0x6c2ee220, 0xf646: 0x6c2ee420, 0xf647: 0x6c0b5c20, + 0xf648: 0x6c2ee620, 0xf64a: 0x6c16a420, + 0xf64d: 0x6c2edc20, 0xf64e: 0x6c2eea20, 0xf64f: 0x6c2eee20, + 0xf651: 0x6c2eec20, 0xf653: 0x6c2ee820, + 0xf656: 0x6c2ef020, + 0xf659: 0x6c2ef220, + 0xf65c: 0x6c0d3020, 0xf65e: 0x6c01fc20, + 0xf664: 0x6c2ef420, 0xf667: 0x6c14c020, + 0xf66a: 0x6c2ef620, + 0xf670: 0x6c2ef820, 0xf672: 0x6c16d820, + 0xf678: 0x6c1f6020, 0xf679: 0x6c2efa20, + 0xf67d: 0x6c2efc20, 0xf67e: 0x6c2efe20, + // Block 0x3da, offset 0xf680 + 0xf682: 0x6c2f0620, + 0xf684: 0x6c2f0020, 0xf686: 0x6c2f0220, + 0xf688: 0x6c2f0420, 0xf689: 0x6c2f0820, + 0xf692: 0x6c0c0820, + 0xf696: 0x6c153e20, + 0xf699: 0x6c0c0a20, + 0xf69c: 0x6c2f0a20, 0xf69e: 0x6c124620, + 0xf6a0: 0x6c2f0c20, 0xf6a1: 0x6c314420, 0xf6a2: 0x6c14e820, + 0xf6a4: 0x6c2f0e20, 0xf6a6: 0x6c2f1020, + 0xf6a8: 0x6c2f1220, 0xf6a9: 0x6c02a220, 0xf6ab: 0x6c2f1620, + 0xf6ad: 0x6c0b7620, + 0xf6b1: 0x6c2f1820, + 0xf6b4: 0x6c052c20, + 0xf6b9: 0x6c2f1a20, 0xf6ba: 0x6c2f2220, + 0xf6bc: 0x6c2f1e20, + // Block 0x3db, offset 0xf6c0 + 0xf6c1: 0x6c2f2020, + 0xf6c4: 0x6c02da20, 0xf6c5: 0x6c2f1c20, 0xf6c6: 0x6c2f2420, + 0xf6cb: 0x6c2f2620, + 0xf6cd: 0x6c005020, 0xf6cf: 0x6c2f2820, + 0xf6d0: 0x6c2f2a20, + 0xf6d8: 0x6c0ad020, + 0xf6dc: 0x6c2f2c20, + 0xf6e0: 0x6c03fa20, 0xf6e3: 0x6c2f3220, + 0xf6e6: 0x6c2f3020, + 0xf6e8: 0x6c2f2e20, 0xf6eb: 0x6c2ba020, + 0xf6ed: 0x6c139020, + 0xf6f3: 0x6c2f3420, + 0xf6f4: 0x6c2f3620, + // Block 0x3dc, offset 0xf700 + 0xf703: 0x6c2f3820, + 0xf706: 0x6c2f3a20, + 0xf708: 0x6c2f3c20, 0xf70b: 0x6c2f3e20, + 0xf713: 0x6c036420, + 0xf71c: 0x6c2f4020, + 0xf72d: 0x6c2f4220, 0xf72e: 0x6c10ea20, + 0xf732: 0x6c2f4620, 0xf733: 0x6c01ae20, + 0xf735: 0x6c2f4c20, 0xf736: 0x6c2f4a20, + 0xf73b: 0x6c00c420, + 0xf73f: 0x6c04aa20, + // Block 0x3dd, offset 0xf740 + 0xf741: 0x6c136620, 0xf742: 0x6c0ee420, 0xf743: 0x6c075c20, + 0xf745: 0x6c071c20, 0xf746: 0x6c0a1a20, + 0xf748: 0x6c0b7c20, + 0xf74c: 0x6c2f5020, 0xf74f: 0x6c2f4e20, + 0xf750: 0x6c159020, 0xf751: 0x6c038020, 0xf752: 0x6c120420, 0xf753: 0x6c10a020, + 0xf757: 0x6c0bbc20, + 0xf758: 0x6c166420, 0xf75a: 0x6c059a20, + 0xf761: 0x6c2f5620, + 0xf764: 0x6c2f5420, + 0xf76c: 0x6c142a20, 0xf76d: 0x6c104020, + 0xf774: 0x6c011c20, 0xf777: 0x6c2f5820, + 0xf778: 0x6c2f5220, 0xf77b: 0x6c12be20, + 0xf77c: 0x6c15e020, 0xf77d: 0x6c2f5a20, + // Block 0x3de, offset 0xf780 + 0xf786: 0x6c2f5c20, + 0xf78b: 0x6c2f6020, + 0xf78c: 0x6c0dcc20, 0xf78d: 0x6c02aa20, 0xf78e: 0x6c02ac20, 0xf78f: 0x6c2f5e20, + 0xf794: 0x6c038220, 0xf795: 0x6c060420, + 0xf798: 0x6c038420, 0xf79b: 0x6c0faa20, + 0xf79e: 0x6c168820, + 0xf7a7: 0x6c065820, + 0xf7ab: 0x6c2f6220, + 0xf7af: 0x6c2f6420, + 0xf7b0: 0x6c2f6620, 0xf7b1: 0x6c2f6820, 0xf7b3: 0x6c2f6c20, + 0xf7b4: 0x6c2f6a20, + // Block 0x3df, offset 0xf7c0 + 0xf7e8: 0x6c130a20, 0xf7ea: 0x6c2f6e20, + 0xf7ef: 0x6c2f7020, + 0xf7f1: 0x6c2f7220, + 0xf7f6: 0x6c2f7420, + // Block 0x3e0, offset 0xf800 + 0xf803: 0x6c2f7820, + 0xf804: 0x6c2f7620, 0xf806: 0x6c2f7a20, + 0xf81b: 0x6c124820, + 0xf81c: 0x6c27aa20, 0xf81f: 0x6c0b1620, + 0xf822: 0x6c03d020, + 0xf829: 0x6c2f7c20, 0xf82b: 0x6c2f7e20, + 0xf82d: 0x6c18ba20, 0xf82e: 0x6c20ec20, 0xf82f: 0x6c120620, + 0xf832: 0x6c00b620, + 0xf834: 0x6c003620, + 0xf83c: 0x6c08bc20, 0xf83d: 0x6c13f420, 0xf83e: 0x6c0b0420, + // Block 0x3e1, offset 0xf840 + 0xf843: 0x6c2f8020, + 0xf845: 0x6c150e20, + 0xf849: 0x6c2f8220, 0xf84a: 0x6c15c420, + 0xf84c: 0x6c010020, + 0xf850: 0x6c085620, 0xf852: 0x6c2f8420, 0xf853: 0x6c021420, + 0xf854: 0x6c2f8620, + 0xf858: 0x6c2f8820, + 0xf85d: 0x6c2f8c20, 0xf85e: 0x6c2f8e20, + 0xf860: 0x6c2f9220, 0xf861: 0x6c2f8a20, + 0xf864: 0x6c2f9020, + 0xf868: 0x6c036620, + 0xf86c: 0x6c2f9420, 0xf86e: 0x6c2f9620, + 0xf87d: 0x6c2f9820, 0xf87e: 0x6c2f9a20, + // Block 0x3e2, offset 0xf880 + 0xf882: 0x6c2f9c20, + 0xf885: 0x6c2fa020, + 0xf889: 0x6c2f9e20, 0xf88b: 0x6c2fa420, + 0xf88c: 0x6c2faa20, + 0xf890: 0x6c2fa220, 0xf891: 0x6c2fa620, 0xf892: 0x6c2fa820, + 0xf895: 0x6c2fac20, 0xf897: 0x6c04ac20, + // Block 0x3e3, offset 0xf8c0 + 0xf8d6: 0x6c097620, 0xf8d7: 0x6c2fae20, + 0xf8d8: 0x6c2fb020, 0xf8d9: 0x6c071e20, + 0xf8e5: 0x6c2fb220, + 0xf8e8: 0x6c027020, + 0xf8ec: 0x6c114220, 0xf8ed: 0x6c2fb420, 0xf8ee: 0x6c2fb620, + 0xf8f3: 0x6c0e6820, + 0xf8f4: 0x6c10be20, + 0xf8fc: 0x6c2fb820, + // Block 0x3e4, offset 0xf900 + 0xf901: 0x6c119e20, + 0xf904: 0x6c0d9020, 0xf905: 0x6c012c20, 0xf906: 0x6c050420, + 0xf908: 0x6c050620, + 0xf910: 0x6c0e9a20, 0xf911: 0x6c2fc220, 0xf912: 0x6c050820, + 0xf915: 0x6c021620, + 0xf918: 0x6c2fc020, 0xf91b: 0x6c2fbc20, + 0xf91d: 0x6c2fbe20, 0xf91f: 0x6c2fba20, + 0xf922: 0x6c2fd620, + 0xf92d: 0x6c2fc420, 0xf92e: 0x6c2fc620, + 0xf931: 0x6c2fc820, 0xf932: 0x6c2fca20, + 0xf938: 0x6c2fce20, 0xf93b: 0x6c2fcc20, + 0xf93f: 0x6c09fe20, + // Block 0x3e5, offset 0xf940 + 0xf941: 0x6c2fd020, + 0xf945: 0x6c2fd420, + 0xf94e: 0x6c03d220, 0xf94f: 0x6c2fd220, + 0xf952: 0x6c0d3220, 0xf953: 0x6c060620, + 0xf959: 0x6c2fd820, + 0xf968: 0x6c0d9220, 0xf96b: 0x6c2fda20, + 0xf970: 0x6c104220, + 0xf977: 0x6c2fdc20, + 0xf97e: 0x6c2fe620, + // Block 0x3e6, offset 0xf980 + 0xf980: 0x6c2fe220, 0xf982: 0x6c2fe020, 0xf983: 0x6c2fe420, + 0xf985: 0x6c2fde20, + 0xf98d: 0x6c2fea20, + 0xf995: 0x6c2fe820, 0xf997: 0x6c2fee20, + 0xf99a: 0x6c04ae20, 0xf99b: 0x6c2fec20, + 0xf99f: 0x6c2ff020, + 0xf9a2: 0x6c2ff220, + 0xf9a4: 0x6c2ff620, 0xf9a5: 0x6c2ff420, + 0xf9a9: 0x6c2ff820, 0xf9aa: 0x6c2ffc20, 0xf9ab: 0x6c2ffa20, + // Block 0x3e7, offset 0xf9c0 + 0xf9e8: 0x6c075420, + 0xf9ed: 0x6c2ffe20, + 0xf9f0: 0x6c300020, + 0xf9f8: 0x6c026c20, + 0xf9fc: 0x6c300220, + // Block 0x3e8, offset 0xfa00 + 0xfa00: 0x6c300420, + 0xfa04: 0x6c0ba620, + 0xfa0f: 0x6c300620, + 0xfa11: 0x6c300820, 0xfa13: 0x6c300a20, + 0xfa14: 0x6c300c20, + 0xfa18: 0x6c072020, + 0xfa1e: 0x6c300e20, 0xfa1f: 0x6c301020, + 0xfa22: 0x6c301220, 0xfa23: 0x6c301420, + 0xfa26: 0x6c301620, + 0xfa2a: 0x6c11c220, 0xfa2b: 0x6c301a20, + 0xfa2d: 0x6c126820, 0xfa2e: 0x6c301c20, 0xfa2f: 0x6c301820, + 0xfa31: 0x6c302020, + 0xfa34: 0x6c301e20, 0xfa37: 0x6c302220, + 0xfa3b: 0x6c302420, + // Block 0x3e9, offset 0xfa40 + 0xfa46: 0x6c302620, + 0xfa58: 0x6c302820, 0xfa5a: 0x6c302a20, + 0xfa5f: 0x6c302c20, + 0xfa62: 0x6c302e20, 0xfa63: 0x6c303020, + 0xfa65: 0x6c303220, 0xfa67: 0x6c303420, + 0xfa68: 0x6c303620, 0xfa69: 0x6c303820, 0xfa6a: 0x6c303a20, + 0xfa6e: 0x6c303c20, 0xfa6f: 0x6c303e20, + 0xfa71: 0x6c20e020, 0xfa72: 0x6c304020, + 0xfa7b: 0x6c268a20, + 0xfa7c: 0x6c03d420, + // Block 0x3ea, offset 0xfa80 + 0xfa81: 0x6c023620, 0xfa82: 0x6c077c20, 0xfa83: 0x6c304420, + 0xfa84: 0x6c304220, 0xfa85: 0x6c149a20, + 0xfa8d: 0x6c304820, 0xfa8e: 0x6c304a20, 0xfa8f: 0x6c304620, + 0xfa91: 0x6c304c20, + 0xfa94: 0x6c145820, + 0xfa98: 0x6c304e20, 0xfa9a: 0x6c046220, + 0xfaaf: 0x6c16ce20, + 0xfab4: 0x6c305020, + // Block 0x3eb, offset 0xfac0 + 0xfac3: 0x6c305420, + 0xface: 0x6c003c20, + 0xfad1: 0x6c305620, 0xfad2: 0x6c132e20, 0xfad3: 0x6c305220, + 0xfad6: 0x6c305820, 0xfad7: 0x6c305a20, + 0xfadf: 0x6c305c20, + 0xfae0: 0x6c305e20, + 0xfae8: 0x6c306020, 0xfaea: 0x6c147020, 0xfaeb: 0x6c082e20, + 0xfaed: 0x6c080c20, 0xfaee: 0x6c0c9a20, + 0xfaf4: 0x6c306220, + 0xfaf9: 0x6c306820, + // Block 0x3ec, offset 0xfb00 + 0xfb00: 0x6c306420, + 0xfb06: 0x6c306a20, + 0xfb09: 0x6c068220, 0xfb0a: 0x6c306620, + 0xfb0f: 0x6c306c20, + 0xfb11: 0x6c306e20, 0xfb12: 0x6c307020, + 0xfb14: 0x6c307820, 0xfb16: 0x6c082820, + 0xfb1b: 0x6c0dc020, + 0xfb21: 0x6c307a20, 0xfb22: 0x6c307420, 0xfb23: 0x6c307220, + 0xfb24: 0x6c307620, + 0xfb28: 0x6c05a220, + 0xfb30: 0x6c308220, 0xfb31: 0x6c308020, 0xfb32: 0x6c307e20, + 0xfb35: 0x6c002620, + // Block 0x3ed, offset 0xfb40 + 0xfb44: 0x6c309620, 0xfb46: 0x6c308e20, + 0xfb48: 0x6c309020, 0xfb49: 0x6c308820, 0xfb4a: 0x6c309420, + 0xfb4c: 0x6c308c20, 0xfb4d: 0x6c02b820, + 0xfb50: 0x6c171c20, 0xfb52: 0x6c309220, 0xfb53: 0x6c308a20, + 0xfb54: 0x6c308620, 0xfb55: 0x6c308420, + 0xfb5b: 0x6c309a20, + 0xfb61: 0x6c30a020, + 0xfb64: 0x6c309e20, 0xfb65: 0x6c309c20, + 0xfb6d: 0x6c12ae20, 0xfb6e: 0x6c309820, 0xfb6f: 0x6c00a620, + 0xfb70: 0x6c30a220, 0xfb72: 0x6c30a620, + 0xfb79: 0x6c02d220, 0xfb7a: 0x6c307c20, 0xfb7b: 0x6c00ea20, + 0xfb7e: 0x6c30aa20, + // Block 0x3ee, offset 0xfb80 + 0xfb86: 0x6c30a820, 0xfb87: 0x6c30a420, + 0xfb88: 0x6c0e0e20, + 0xfb92: 0x6c147420, + 0xfb97: 0x6c167c20, + 0xfb9a: 0x6c30ac20, + 0xfba0: 0x6c30ae20, + 0xfba7: 0x6c30b020, + 0xfbb6: 0x6c30b220, + 0xfbb8: 0x6c30b420, + // Block 0x3ef, offset 0xfbc0 + 0xfbe5: 0x6c0ee620, 0xfbe7: 0x6c30b620, + 0xfbe9: 0x6c11ce20, 0xfbeb: 0x6c30c020, + 0xfbec: 0x6c30b820, + 0xfbf0: 0x6c30ba20, 0xfbf3: 0x6c13f620, + 0xfbf4: 0x6c14d820, 0xfbf6: 0x6c108820, + // Block 0x3f0, offset 0xfc00 + 0xfc03: 0x6c30c220, + 0xfc06: 0x6c30c420, 0xfc07: 0x6c106420, + 0xfc08: 0x6c30be20, 0xfc09: 0x6c30bc20, + 0xfc0e: 0x6c018c20, + 0xfc12: 0x6c30d420, + 0xfc15: 0x6c30d220, + 0xfc1b: 0x6c016620, + 0xfc1f: 0x6c30ce20, + 0xfc23: 0x6c30cc20, + 0xfc26: 0x6c30c820, + 0xfc28: 0x6c02ea20, 0xfc2a: 0x6c30c620, 0xfc2b: 0x6c08f420, + 0xfc2c: 0x6c018a20, + 0xfc3b: 0x6c072220, + 0xfc3e: 0x6c30da20, 0xfc3f: 0x6c30d820, + // Block 0x3f1, offset 0xfc40 + 0xfc41: 0x6c30d620, + 0xfc44: 0x6c30d020, 0xfc46: 0x6c30dc20, + 0xfc48: 0x6c30de20, + 0xfc50: 0x6c30e820, 0xfc51: 0x6c30e620, + 0xfc59: 0x6c30ea20, + 0xfc5c: 0x6c00d620, 0xfc5d: 0x6c30e020, 0xfc5e: 0x6c30e220, + 0xfc60: 0x6c074420, 0xfc61: 0x6c14c220, + 0xfc64: 0x6c30e420, + 0xfc6c: 0x6c13f820, 0xfc6f: 0x6c30f420, + 0xfc72: 0x6c30ec20, + 0xfc7a: 0x6c30f620, + // Block 0x3f2, offset 0xfc80 + 0xfc87: 0x6c30f020, + 0xfc89: 0x6c30ee20, + 0xfc8f: 0x6c059c20, + 0xfc9a: 0x6c30f820, + 0xfca4: 0x6c30fa20, + 0xfca9: 0x6c30fc20, 0xfcab: 0x6c30f220, + 0xfcaf: 0x6c30ca20, + 0xfcb2: 0x6c30fe20, + 0xfcb4: 0x6c0f3220, + 0xfcb8: 0x6c310620, 0xfcba: 0x6c310820, 0xfcbb: 0x6c310420, + // Block 0x3f3, offset 0xfcc0 + 0xfcc1: 0x6c310220, 0xfcc2: 0x6c310e20, + 0xfcc4: 0x6c310020, 0xfcc6: 0x6c310a20, + 0xfccf: 0x6c310c20, + 0xfcd3: 0x6c311220, + 0xfcd9: 0x6c311020, + 0xfce6: 0x6c311620, + 0xfced: 0x6c311820, 0xfcef: 0x6c311a20, + 0xfcf2: 0x6c171620, + 0xfcf8: 0x6c311420, 0xfcf9: 0x6c0dce20, 0xfcfa: 0x6c07f220, + 0xfcfd: 0x6c311c20, + // Block 0x3f4, offset 0xfd00 + 0xfd1a: 0x6c311e20, 0xfd1b: 0x6c312020, + 0xfd1e: 0x6c312220, + // Block 0x3f5, offset 0xfd40 + 0xfd75: 0x6c312420, + 0xfd78: 0x6c060820, 0xfd79: 0x6c312620, + 0xfd7d: 0x6c312820, 0xfd7f: 0x6c08ee20, + // Block 0x3f6, offset 0xfd80 + 0xfd81: 0x6c312a20, + 0xfd88: 0x6c312c20, 0xfd8b: 0x6c312e20, + 0xfd8c: 0x6c313020, + 0xfd91: 0x6c313620, 0xfd92: 0x6c313220, 0xfd93: 0x6c16fc20, + 0xfd95: 0x6c313420, 0xfd97: 0x6c16a620, + 0xfd9d: 0x6c313820, 0xfd9f: 0x6c167e20, + 0xfda5: 0x6c313a20, 0xfda6: 0x6c11a020, + 0xfda9: 0x6c313c20, 0xfdaa: 0x6c314020, + 0xfdad: 0x6c314220, + 0xfdb8: 0x6c313e20, 0xfdb9: 0x6c073620, 0xfdba: 0x6c14ea20, 0xfdbb: 0x6c145a20, + 0xfdbc: 0x6c1c4020, 0xfdbe: 0x6c213620, 0xfdbf: 0x6c148a20, + // Block 0x3f7, offset 0xfdc0 + 0xfdc4: 0x6c018e20, + 0xfdcc: 0x6c314620, 0xfdcd: 0x6c040c20, 0xfdce: 0x6c314820, 0xfdcf: 0x6c314a20, + 0xfdd0: 0x6c314c20, 0xfdd2: 0x6c074620, + 0xfdd4: 0x6c314e20, + 0xfdd8: 0x6c235220, 0xfdd9: 0x6c150620, 0xfddb: 0x6c0dbe20, + 0xfddc: 0x6c315020, 0xfddd: 0x6c315420, 0xfdde: 0x6c315220, + 0xfde0: 0x6c315620, + 0xfde5: 0x6c315820, + 0xfde8: 0x6c315a20, + 0xfdef: 0x6c315c20, + 0xfdf4: 0x6c315e20, 0xfdf6: 0x6c316020, 0xfdf7: 0x6c316220, + 0xfdf9: 0x6c316420, 0xfdfb: 0x6c316620, + 0xfdfc: 0x6c316820, 0xfdfd: 0x6c316a20, + // Block 0x3f8, offset 0xfe00 + 0xfe07: 0x6c316c20, + 0xfe08: 0x6c316e20, + 0xfe0e: 0x6c0f7420, + 0xfe13: 0x6c065a20, + 0xfe15: 0x6c317220, + 0xfe20: 0x6c0cd620, 0xfe21: 0x6c317420, + 0xfe2c: 0x6c317620, + 0xfe3b: 0x6c125e20, + 0xfe3e: 0x6c317820, + // Block 0x3f9, offset 0xfe40 + 0xfe4a: 0x6c317a20, 0xfe4b: 0x6c254c20, + 0xfe4e: 0x6c2c2e20, 0xfe4f: 0x6c2f4420, + 0xfe52: 0x6c317c20, + 0xfe54: 0x6c317e20, + 0xfe5f: 0x6c318220, + 0xfe60: 0x6c318420, 0xfe61: 0x6c318620, 0xfe62: 0x6c16a820, 0xfe63: 0x6c318020, + 0xfe66: 0x6c318820, 0xfe67: 0x6c318a20, + 0xfe6a: 0x6c318e20, + 0xfe6c: 0x6c318c20, + 0xfe72: 0x6c319220, + 0xfe76: 0x6c319420, 0xfe77: 0x6c319020, + // Block 0x3fa, offset 0xfe80 + 0xfe8d: 0x6c163420, + 0xfe95: 0x6c319620, + 0xfe9c: 0x6c319820, 0xfe9d: 0x6c258620, + 0xfea0: 0x6c319a20, + // Block 0x3fb, offset 0xfec0 + 0xfec0: 0x6c2bdc20, 0xfec1: 0x6c06ce20, 0xfec2: 0x6c093c20, 0xfec3: 0x6c2c1020, + 0xfec4: 0x6c02c820, 0xfec5: 0x6c051c20, 0xfec6: 0x6c04f620, 0xfec7: 0x6c319820, + 0xfec8: 0x6c319820, 0xfec9: 0x6c056420, 0xfeca: 0x6c04ec20, 0xfecb: 0x6c19b020, + 0xfecc: 0x6c10a820, 0xfecd: 0x6c1dac20, 0xfece: 0x6c245a20, 0xfecf: 0x6c15d620, + 0xfed0: 0x6c29d420, 0xfed1: 0x6c15d820, 0xfed2: 0x6c15da20, 0xfed3: 0x6c2d5e20, + 0xfed4: 0x6c207020, 0xfed5: 0x6c15e420, 0xfed6: 0x6c22ae20, 0xfed7: 0x6c237220, + 0xfed8: 0x6c15e820, 0xfed9: 0x6c15ea20, 0xfeda: 0x6c2fc820, 0xfedb: 0x6c174220, + 0xfedc: 0x6c15ee20, 0xfedd: 0x6c15f220, 0xfede: 0x6c22f420, 0xfedf: 0x6c15f820, + 0xfee0: 0x6c312220, 0xfee1: 0x6c15f020, 0xfee2: 0x6c15f420, 0xfee3: 0x6c15f620, + 0xfee4: 0x6c2b0220, 0xfee5: 0x6c1e1420, 0xfee6: 0x6c285620, 0xfee7: 0x43103e20, + 0xfee8: 0x6c16de20, 0xfee9: 0x6c16e220, 0xfeea: 0x6c16e820, 0xfeeb: 0x6c16ee20, + 0xfeec: 0x6c16f820, 0xfeed: 0x6c179220, 0xfeee: 0x6c169020, 0xfeef: 0x6c18b420, + 0xfef0: 0x42c98820, 0xfef1: 0x6c16d020, 0xfef2: 0x6c22f220, 0xfef3: 0x6c249620, + 0xfef4: 0x6c16f220, 0xfef5: 0x6c29cc20, 0xfef6: 0x6c163c20, 0xfef7: 0x6c16d620, + 0xfef8: 0x6c16d820, 0xfef9: 0x6c16ce20, 0xfefa: 0x6c07f220, 0xfefb: 0x6c250420, + 0xfefc: 0x6c254420, 0xfefd: 0x42fb4020, 0xfefe: 0x43079220, 0xfeff: 0x43260820, + // Block 0x3fc, offset 0xff00 + 0xff00: 0x6c08ee20, 0xff01: 0x6c170420, 0xff02: 0x6c1a9e20, 0xff03: 0x6c16e020, + 0xff04: 0x6c262620, 0xff05: 0x6c16f420, 0xff06: 0x6c16ec20, 0xff07: 0x6c251c20, + 0xff08: 0x6c16d420, 0xff09: 0x6c15e220, 0xff0a: 0x6c1a9620, 0xff0b: 0x42b8c420, + 0xff0c: 0x6c209220, 0xff0d: 0x42dbb420, 0xff0e: 0x6c16ea20, 0xff0f: 0x6c168620, + 0xff10: 0x6c271420, 0xff11: 0x6c2ea420, 0xff12: 0x6c2f1420, 0xff13: 0x6c170020, + 0xff14: 0x6c31a420, 0xff15: 0x6c164620, 0xff16: 0x6c165620, 0xff17: 0x6c003a20, + 0xff18: 0x6c126e20, 0xff19: 0x6c166220, 0xff1a: 0x6c2bc620, 0xff1b: 0x6c1dfe20, + 0xff1c: 0x6c207020, 0xff1d: 0x6c0dec20, 0xff1e: 0x6c0e1420, 0xff1f: 0x6c10fa20, + 0xff20: 0x6c0fe420, 0xff21: 0x6c161820, 0xff22: 0x6c007620, 0xff23: 0x6c142c20, + 0xff24: 0x42f1f620, 0xff25: 0x6c138820, 0xff26: 0x6c131420, 0xff27: 0x6c12c420, + 0xff28: 0x6c122e20, 0xff29: 0x6c1ed820, 0xff2a: 0x6c080620, 0xff2b: 0x6c190a20, + 0xff2c: 0x6c07aa20, 0xff2d: 0x6c0a9c20, 0xff2e: 0x6c15b620, 0xff2f: 0x43155420, + 0xff30: 0x6c082020, 0xff31: 0x6c0dfc20, 0xff32: 0x6c0ef020, 0xff33: 0x6c099820, + 0xff34: 0x6c095620, 0xff35: 0x6c161e20, 0xff36: 0x6c162020, 0xff37: 0x6c164020, + 0xff38: 0x6c182620, 0xff39: 0x6c185a20, 0xff3a: 0x6c164c20, 0xff3b: 0x6c165820, + 0xff3c: 0x6c165a20, 0xff3d: 0x6c165c20, 0xff3e: 0x6c166020, 0xff3f: 0x6c18c020, + // Block 0x3fd, offset 0xff40 + 0xff40: 0x6c16cc20, 0xff41: 0x6c0a3a20, 0xff42: 0x6c1c6220, 0xff43: 0x6c163a20, + 0xff44: 0x6c228020, 0xff45: 0x6c24f620, 0xff46: 0x6c2e7420, 0xff47: 0x6c2ffc20, + 0xff48: 0x6c16a620, 0xff49: 0x6c314820, 0xff4a: 0x6c166620, 0xff4b: 0x42cd8c20, + 0xff4c: 0x42d6ee20, 0xff4d: 0x6c2cf620, 0xff4e: 0x6c110220, 0xff4f: 0x6c16ba20, + 0xff50: 0x6c1dba20, 0xff51: 0x6c110820, 0xff52: 0x6c16bc20, 0xff53: 0x6c16be20, + 0xff54: 0x42e91220, 0xff55: 0x42f39420, 0xff56: 0x6c16c220, 0xff57: 0x6c16c420, + 0xff58: 0x6c2cdc20, 0xff59: 0x6c16c620, 0xff5a: 0x6c16c820, 0xff5b: 0x43269420, + 0xff5c: 0x6c16ae20, 0xff5d: 0x6c16b020, 0xff5e: 0x6c00ac20, 0xff5f: 0x6c16b220, + 0xff60: 0x6c16b420, 0xff61: 0x43155420, 0xff62: 0x6c16b620, 0xff63: 0x6c110420, + 0xff64: 0x6c110620, 0xff65: 0x42d75c20, 0xff66: 0x6c16c020, 0xff67: 0x6c235e20, + 0xff68: 0x6c168a20, 0xff69: 0x6c1a1220, 0xff6a: 0x6c10fa20, 0xff6b: 0x6c169420, + 0xff6c: 0x6c169620, 0xff6d: 0x6c169820, 0xff6e: 0x6c238e20, 0xff6f: 0x6c278420, + 0xff70: 0x6c27c420, 0xff71: 0x6c169e20, 0xff72: 0x6c16a220, 0xff73: 0x6c2f0420, + 0xff74: 0x6c166420, 0xff75: 0x6c168e20, 0xff76: 0x6c255020, 0xff77: 0x6c2d9a20, + 0xff78: 0x6c2ecc20, 0xff79: 0x6c1d1a20, 0xff7a: 0x6c163e20, 0xff7b: 0x6c164220, + 0xff7c: 0x6c164820, 0xff7d: 0x6c10e820, 0xff7e: 0x6c164a20, 0xff7f: 0x6c207020, + // Block 0x3fe, offset 0xff80 + 0xff80: 0x6c22e020, 0xff81: 0x6c165220, 0xff82: 0x6c297e20, 0xff83: 0x6c165e20, + 0xff84: 0x6c163420, 0xff85: 0x6c1f2a20, 0xff86: 0x6c2e9a20, 0xff87: 0x6c162220, + 0xff88: 0x42cef620, 0xff89: 0x6c154020, 0xff8a: 0x6c162420, 0xff8b: 0x6c162620, + 0xff8c: 0x6c162820, 0xff8d: 0x6c162a20, 0xff8e: 0x6c162c20, 0xff8f: 0x6c128220, + 0xff90: 0x6c168820, 0xff91: 0x6c16fa20, 0xff92: 0x6c1dce20, 0xff93: 0x6c161420, + 0xff94: 0x6c166a20, 0xff95: 0x6c1bde20, 0xff96: 0x6c21cc20, 0xff97: 0x6c167820, + 0xff98: 0x6c161620, 0xff99: 0x6c1d6020, 0xff9a: 0x6c053820, 0xff9b: 0x6c161820, + 0xff9c: 0x6c163020, 0xff9d: 0x6c15fc20, 0xff9e: 0x6c15fe20, 0xff9f: 0x6c160020, + 0xffa0: 0x6c006e20, 0xffa1: 0x6c160220, 0xffa2: 0x6c160420, 0xffa3: 0x6c0f7620, + 0xffa4: 0x6c160620, 0xffa5: 0x6c160a20, 0xffa6: 0x6c1da420, 0xffa7: 0x6c160c20, + 0xffa8: 0x6c160e20, 0xffa9: 0x6c161020, 0xffaa: 0x6c161220, 0xffab: 0x6c106620, + 0xffac: 0x6c0f8820, 0xffad: 0x6c193020, 0xffae: 0x6c167220, 0xffaf: 0x42e93020, + 0xffb0: 0x6c29ca20, 0xffb1: 0x6c167a20, 0xffb2: 0x6c167c20, 0xffb3: 0x6c167e20, + 0xffb4: 0x6c166e20, 0xffb5: 0x6c167020, 0xffb6: 0x6c167620, 0xffb7: 0x6c161a20, + 0xffb8: 0x6c02b020, 0xffb9: 0x6c162e20, 0xffba: 0x42e58020, 0xffbb: 0x6c229820, + 0xffbc: 0x6c08f220, 0xffbd: 0x6c09c020, 0xffbe: 0x6c0e7a20, 0xffbf: 0x6c086620, + // Block 0x3ff, offset 0xffc0 + 0xffc0: 0x6c0c3420, 0xffc1: 0x6c0fde20, 0xffc2: 0x6c0dde20, 0xffc3: 0x6c102420, + 0xffc4: 0x6c0dd820, 0xffc5: 0x6c105420, 0xffc6: 0x6c140e20, 0xffc7: 0x6c2ce020, + 0xffc8: 0x6c070420, 0xffc9: 0x6c071a20, 0xffca: 0x6c05f620, 0xffcb: 0x6c028220, + 0xffcc: 0x6c181a20, 0xffcd: 0x42ab8020, 0xffce: 0x43f41c20, 0xffcf: 0x43f41e20, + 0xffd0: 0x6c0f0a20, 0xffd1: 0x43f42220, 0xffd2: 0x6c0be420, 0xffd3: 0x43f42620, + 0xffd4: 0x43f42820, 0xffd5: 0x42a3bc20, 0xffd6: 0x6c0ea020, 0xffd7: 0x6c012a20, + 0xffd8: 0x6c169a20, 0xffd9: 0x6c0b4420, 0xffda: 0x6c0aa220, 0xffdb: 0x6c131a20, + 0xffdc: 0x6c153e20, 0xffdd: 0x6c0bf420, 0xffde: 0x6c00ce20, 0xffdf: 0x43f43e20, + 0xffe0: 0x430c2420, 0xffe1: 0x43f44220, 0xffe2: 0x6c0a3420, 0xffe3: 0x43f44620, + 0xffe4: 0x43f44820, 0xffe5: 0x6c009e20, 0xffe6: 0x6c0fd420, 0xffe7: 0x43f44e20, + 0xffe8: 0x43f45020, 0xffe9: 0x43f45220, 0xffea: 0x6c120620, 0xffeb: 0x6c08bc20, + 0xffec: 0x6c036620, 0xffed: 0x6c0f3220, 0xffee: 0x4321bc20, 0xffef: 0x6c16a020, + 0xfff0: 0x6c12f820, 0xfff1: 0x6c0cd820, 0xfff2: 0x6c14e020, 0xfff3: 0x6c138a20, + 0xfff4: 0x6c04c820, 0xfff5: 0x6c121820, 0xfff6: 0x6c02be20, 0xfff7: 0x6c0e1820, + 0xfff8: 0x6c038e20, 0xfff9: 0x6c135220, 0xfffa: 0x6c143220, 0xfffb: 0x6c0cec20, + 0xfffc: 0x6c1b9c20, 0xfffd: 0x6c022a20, 0xfffe: 0x6c025c20, 0xffff: 0x6c0d3820, + // Block 0x400, offset 0x10000 + 0x10000: 0x6c0ec020, 0x10001: 0x6c12c020, 0x10002: 0x6c03a620, 0x10003: 0x6c0a2220, + 0x10004: 0x6c116220, 0x10005: 0x6c023c20, 0x10006: 0x6c0a2620, 0x10007: 0x6c033220, + 0x10008: 0x6c093220, 0x10009: 0x42e45620, 0x1000a: 0x6c0de420, 0x1000b: 0x6c123420, + 0x1000c: 0x6c093420, 0x1000d: 0x6c089a20, 0x1000e: 0x6c03ba20, 0x1000f: 0x6c157420, + 0x10010: 0x6c0cc420, 0x10011: 0x6c09e220, 0x10012: 0x6c01dc20, 0x10013: 0x6c0f5e20, + 0x10014: 0x6c074020, 0x10015: 0x6c108220, 0x10016: 0x6c0c4220, 0x10017: 0x6c16c220, + 0x10018: 0x6c270220, 0x10019: 0x6c11f620, 0x1001a: 0x6c0a2c20, 0x1001b: 0x6c093820, + 0x1001c: 0x6c09a620, 0x1001d: 0x4304f220, 0x1001e: 0x4304f220, 0x1001f: 0x6c0ea420, + 0x10020: 0x6c02cc20, 0x10021: 0x6c08aa20, 0x10022: 0x6c013020, 0x10023: 0x6c04e820, + 0x10024: 0x6c12bc20, 0x10025: 0x6c0d3e20, 0x10026: 0x431f6c20, 0x10027: 0x6c009e20, + 0x10028: 0x6c10ca20, 0x10029: 0x6c04aa20, 0x1002a: 0x6c12be20, 0x1002b: 0x6c056a20, + 0x1002c: 0x4885dc20, 0x1002d: 0x6c036820, + 0x10030: 0x6c135c20, 0x10031: 0x6c185420, 0x10032: 0x6c0ca420, 0x10033: 0x429f0020, + 0x10034: 0x6c09c420, 0x10035: 0x6c182c20, 0x10036: 0x6c155820, 0x10037: 0x6c094620, + 0x10038: 0x6c02be20, 0x10039: 0x42aaaa20, 0x1003a: 0x6c199620, 0x1003b: 0x42abc420, + 0x1003c: 0x6c0f0a20, 0x1003d: 0x6c133620, 0x1003e: 0x6c014020, 0x1003f: 0x6c144a20, + // Block 0x401, offset 0x10040 + 0x10040: 0x6c1b0820, 0x10041: 0x42b65020, 0x10042: 0x42bda420, 0x10043: 0x42bdb220, + 0x10044: 0x6c07b020, 0x10045: 0x6c1cb620, 0x10046: 0x6c1d2c20, 0x10047: 0x6c0b2e20, + 0x10048: 0x6c154820, 0x10049: 0x6c0d3820, 0x1004a: 0x42c2c020, 0x1004b: 0x6c0ec020, + 0x1004c: 0x6c0da620, 0x1004d: 0x6c1e5820, 0x1004e: 0x6c1e2c20, 0x1004f: 0x42c8a420, + 0x10050: 0x6c1eca20, 0x10051: 0x6c0be420, 0x10052: 0x6c16e220, 0x10053: 0x6c141020, + 0x10054: 0x6c0aee20, 0x10055: 0x6c210220, 0x10056: 0x6c082020, 0x10057: 0x6c162420, + 0x10058: 0x42ddb620, 0x10059: 0x6c08d420, 0x1005a: 0x6c033220, 0x1005b: 0x6c109020, + 0x1005c: 0x6c093220, 0x1005d: 0x42ef4e20, 0x1005e: 0x6c094e20, 0x1005f: 0x6c11f020, + 0x10060: 0x6c0ea020, 0x10061: 0x42e8e220, 0x10062: 0x42ea0c20, 0x10063: 0x6c020820, + 0x10064: 0x42ec3a20, 0x10065: 0x6c243820, 0x10066: 0x6c012a20, 0x10067: 0x6c0bf220, + 0x10068: 0x6c0eec20, 0x10069: 0x42ee9420, 0x1006a: 0x6c0e7e20, 0x1006b: 0x42f19820, + 0x1006c: 0x42f56220, 0x1006d: 0x6c0c4220, 0x1006e: 0x42f8f620, 0x1006f: 0x6c26c220, + 0x10070: 0x6c16c220, 0x10071: 0x42fe7c20, 0x10072: 0x6c093820, 0x10073: 0x6c070220, + 0x10074: 0x6c01ec20, 0x10075: 0x430ef220, 0x10076: 0x6c2aee20, 0x10077: 0x6c132020, + 0x10078: 0x6c08aa20, 0x10079: 0x6c0ed820, 0x1007a: 0x6c0a3420, 0x1007b: 0x6c0c0220, + 0x1007c: 0x6c013020, 0x1007d: 0x6c0dec20, 0x1007e: 0x6c154e20, 0x1007f: 0x6c04e820, + // Block 0x402, offset 0x10080 + 0x10080: 0x6c1ede20, 0x10081: 0x6c0d3e20, 0x10082: 0x6c155020, 0x10083: 0x6c2d5020, + 0x10084: 0x43233220, 0x10085: 0x4324ec20, 0x10086: 0x432cf820, 0x10087: 0x6c10ca20, + 0x10088: 0x6c153e20, 0x10089: 0x432fb620, 0x1008a: 0x6c04aa20, 0x1008b: 0x43301620, + 0x1008c: 0x6c12be20, 0x1008d: 0x43362420, 0x1008e: 0x6c319820, 0x1008f: 0x48509420, + 0x10090: 0x48508820, 0x10091: 0x4867aa20, 0x10092: 0x44773a20, 0x10093: 0x44803020, + 0x10094: 0x44807220, 0x10095: 0x48a49220, 0x10096: 0x48b9a020, 0x10097: 0x48fda620, + 0x10098: 0x433e8620, 0x10099: 0x433f1c20, + // Block 0x403, offset 0x100c0 + 0x100c1: 0x4002ba20, 0x100c2: 0x4003e020, 0x100c3: 0x4004ea20, + 0x100c4: 0x4027de20, 0x100c5: 0x4004ec20, 0x100c6: 0x4004e620, 0x100c7: 0x4003d220, + 0x100c8: 0x4003f420, 0x100c9: 0x4003f620, 0x100ca: 0x4004d820, 0x100cb: 0x40093820, + 0x100cc: 0x40024020, 0x100cd: 0x40021a20, 0x100ce: 0x4002e420, 0x100cf: 0x4004e220, + 0x100d0: 0x4029cc20, 0x100d1: 0x4029ce20, 0x100d2: 0x4029d020, 0x100d3: 0x4029d220, + 0x100d4: 0x4029d420, 0x100d5: 0x4029d620, 0x100d6: 0x4029d820, 0x100d7: 0x4029da20, + 0x100d8: 0x4029dc20, 0x100d9: 0x4029de20, 0x100da: 0x40026c20, 0x100db: 0x40026220, + 0x100dc: 0x40094020, 0x100dd: 0x40094220, 0x100de: 0x40094420, 0x100df: 0x4002c420, + 0x100e0: 0x4004d620, 0x100e1: 0x002bde88, 0x100e2: 0x002c0a88, 0x100e3: 0x002c3a88, + 0x100e4: 0x002c6288, 0x100e5: 0x002c9888, 0x100e6: 0x002d0888, 0x100e7: 0x002d2288, + 0x100e8: 0x002d6888, 0x100e9: 0x002d9a88, 0x100ea: 0x002dcc88, 0x100eb: 0x002dfe88, + 0x100ec: 0x002e2288, 0x100ed: 0x002e8288, 0x100ee: 0x002e9e88, 0x100ef: 0x002ee288, + 0x100f0: 0x002f2c88, 0x100f1: 0x002f5688, 0x100f2: 0x002f7a88, 0x100f3: 0x002fe688, + 0x100f4: 0x00302c88, 0x100f5: 0x00306c88, 0x100f6: 0x0030be88, 0x100f7: 0x0030e288, + 0x100f8: 0x0030f688, 0x100f9: 0x00310088, 0x100fa: 0x00312a88, 0x100fb: 0x4003f820, + 0x100fc: 0x4003d220, 0x100fd: 0x4003fa20, 0x100fe: 0x40062420, 0x100ff: 0x40021620, + // Block 0x404, offset 0x10100 + 0x10100: 0x40061e20, 0x10101: 0x402bde20, 0x10102: 0x402c0a20, 0x10103: 0x402c3a20, + 0x10104: 0x402c6220, 0x10105: 0x402c9820, 0x10106: 0x402d0820, 0x10107: 0x402d2220, + 0x10108: 0x402d6820, 0x10109: 0x402d9a20, 0x1010a: 0x402dcc20, 0x1010b: 0x402dfe20, + 0x1010c: 0x402e2220, 0x1010d: 0x402e8220, 0x1010e: 0x402e9e20, 0x1010f: 0x402ee220, + 0x10110: 0x402f2c20, 0x10111: 0x402f5620, 0x10112: 0x402f7a20, 0x10113: 0x402fe620, + 0x10114: 0x40302c20, 0x10115: 0x40306c20, 0x10116: 0x4030be20, 0x10117: 0x4030e220, + 0x10118: 0x4030f620, 0x10119: 0x40310020, 0x1011a: 0x40312a20, 0x1011b: 0x4003fc20, + 0x1011c: 0x40094820, 0x1011d: 0x4003fe20, 0x1011e: 0x40094c20, 0x1011f: 0x00041883, + 0x10120: 0x00041a83, 0x10121: 0x40030420, 0x10122: 0x4004a420, 0x10123: 0x4004a620, + 0x10124: 0x40025c20, 0x10125: 0x00023e92, 0x10126: 0xca3c3601, 0x10127: 0xc64d3281, + 0x10128: 0xc71d3281, 0x10129: 0xc7dd3601, 0x1012a: 0xc8c43281, 0x1012b: 0xc9793281, + 0x1012c: 0xc6e83281, 0x1012d: 0xc8af3281, 0x1012e: 0xca1d3281, 0x1012f: 0xc8483601, + 0x10130: 0x0027d692, 0x10131: 0xc6533281, 0x10132: 0xc7233281, 0x10133: 0xc7f23601, + 0x10134: 0xc8ca3281, 0x10135: 0xc97f3281, 0x10136: 0xc6663281, 0x10137: 0xc7363601, + 0x10138: 0xc8143601, 0x10139: 0xc8dd3281, 0x1013a: 0xc9923601, 0x1013b: 0xc67f3601, + 0x1013c: 0xc7583601, 0x1013d: 0xc8363601, 0x1013e: 0xc8f63601, 0x1013f: 0xc9af3601, + // Block 0x405, offset 0x10140 + 0x10140: 0xc69c3601, 0x10141: 0xc7753601, 0x10142: 0xc85d3601, 0x10143: 0xc9133601, + 0x10144: 0xc9d13601, 0x10145: 0xc6ac3281, 0x10146: 0xc7853281, 0x10147: 0xc8703281, + 0x10148: 0xc9233281, 0x10149: 0xc9e13281, 0x1014a: 0xc6ca3601, 0x1014b: 0xc7a33601, + 0x1014c: 0xc88e3601, 0x1014d: 0xc9413601, 0x1014e: 0xc9ff3601, 0x1014f: 0xc6e23281, + 0x10150: 0xc7bb3281, 0x10151: 0xc8a93281, 0x10152: 0xc9593281, 0x10153: 0xca173281, + 0x10154: 0xc6ee3281, 0x10155: 0xc8b53281, 0x10156: 0xca233281, 0x10157: 0xc6f73281, + 0x10158: 0xc7c43281, 0x10159: 0xc8be3281, 0x1015a: 0xc9623281, 0x1015b: 0xca2c3281, + 0x1015c: 0xc7113601, 0x1015d: 0xca453ae1, 0x1015e: 0xa0012812, 0x1015f: 0xa0012912, + 0x10160: 0x4063a620, 0x10161: 0x4062ac20, 0x10162: 0x4062ae20, 0x10163: 0x40646820, + 0x10164: 0x4062b020, 0x10165: 0x40646c20, 0x10166: 0x40646e20, 0x10167: 0x4062b220, + 0x10168: 0x4062b420, 0x10169: 0x4062b620, 0x1016a: 0x40647420, 0x1016b: 0x40647620, + 0x1016c: 0x40647820, 0x1016d: 0x40647a20, 0x1016e: 0x40647c20, 0x1016f: 0x40647e20, + 0x10170: 0x4062e020, 0x10171: 0x4062b820, 0x10172: 0x4062ba20, 0x10173: 0x4062bc20, + 0x10174: 0x4062ee20, 0x10175: 0x4062be20, 0x10176: 0x4062c020, 0x10177: 0x4062c220, + 0x10178: 0x4062c420, 0x10179: 0x4062c620, 0x1017a: 0x4062c820, 0x1017b: 0x4062ca20, + 0x1017c: 0x4062cc20, 0x1017d: 0x4062ce20, 0x1017e: 0x4062d020, + // Block 0x406, offset 0x10180 + 0x10182: 0x4063a820, 0x10183: 0x4063aa20, + 0x10184: 0x4063ac20, 0x10185: 0x4063ae20, 0x10186: 0x4063b020, 0x10187: 0x4063b220, + 0x1018a: 0x4063b420, 0x1018b: 0x4063b620, + 0x1018c: 0x4063b820, 0x1018d: 0x4063ba20, 0x1018e: 0x4063bc20, 0x1018f: 0x4063be20, + 0x10192: 0x4063c020, 0x10193: 0x4063c220, + 0x10194: 0x4063c420, 0x10195: 0x4063c620, 0x10196: 0x4063c820, 0x10197: 0x4063ca20, + 0x1019a: 0x4063cc20, 0x1019b: 0x4063ce20, + 0x1019c: 0x4063d020, + 0x101a0: 0x4027dc20, 0x101a1: 0x4027e020, 0x101a2: 0x40094620, 0x101a3: 0x40021220, + 0x101a4: 0x40094a20, 0x101a5: 0x4027e220, 0x101a6: 0x40280820, + 0x101a8: 0x400d3220, 0x101a9: 0x40084420, 0x101aa: 0x40084820, 0x101ab: 0x40084620, + 0x101ac: 0x40084a20, 0x101ad: 0x400e6e20, 0x101ae: 0x400ec420, + 0x101b9: 0xa0000000, 0x101ba: 0xa0000000, 0x101bb: 0xa0000000, + 0x101bc: 0x4027ae20, 0x101bd: 0x4027b020, 0x101be: 0x00000285, 0x101bf: 0x2bfffe85, + // Block 0x407, offset 0x101c0 + 0x101c0: 0xe0003d0b, 0x101c1: 0xe0003cf3, 0x101c2: 0xe0003cf7, 0x101c3: 0xe0003cff, + 0x101c4: 0xe0003d0f, 0x101c5: 0xe0003d03, 0x101c6: 0xe0003d13, 0x101c7: 0xe0003cfb, + 0x101c8: 0xe0003d07, + 0x101d0: 0x02bf2e86, 0x101d1: 0x02a7de86, + // Block 0x408, offset 0x10200 + 0x10200: 0x429c7a20, 0x10201: 0x6c036a20, 0x10202: 0x429c8220, 0x10203: 0x48024420, + 0x10204: 0x429ec020, 0x10205: 0x6c12f820, 0x10206: 0x429f7620, 0x10207: 0x42a00420, + 0x10208: 0x42a0f420, 0x10209: 0x6c124e20, 0x1020a: 0x6c0cd820, 0x1020b: 0x6c0d3420, + 0x1020c: 0x44693c20, 0x1020d: 0x480c7420, 0x1020e: 0x6c14e020, 0x1020f: 0x6c182020, + 0x10210: 0x42a2c820, 0x10211: 0x6c050a20, 0x10212: 0x480a3820, 0x10213: 0x44697220, + 0x10214: 0x42a2ce20, 0x10215: 0x6c07a420, 0x10216: 0x480a9620, 0x10217: 0x6c0ada20, + 0x10218: 0x6c184020, 0x10219: 0x429d9820, 0x1021a: 0x6c0fea20, 0x1021b: 0x6c185420, + 0x1021c: 0x4923be20, 0x1021d: 0x6c186820, 0x1021e: 0x6c0b6220, 0x1021f: 0x4469be20, + 0x10220: 0x6c073a20, 0x10221: 0x42a48c20, 0x10222: 0x6c02bc20, 0x10223: 0x42a4ee20, + 0x10224: 0x446a2a20, 0x10225: 0x6c155820, 0x10226: 0x6c138a20, 0x10227: 0x6c04c820, + 0x10228: 0x6c094620, 0x10229: 0x6c13ba20, 0x1022a: 0x6c18c620, 0x1022b: 0x6c142c20, + 0x1022c: 0x6c18e820, 0x1022d: 0x6c121820, 0x1022e: 0x6c118020, 0x1022f: 0x6c0d4820, + 0x10230: 0x42a6fa20, 0x10231: 0x6c047c20, 0x10232: 0x6c047c20, 0x10233: 0x6c047c20, + 0x10234: 0x48145820, 0x10235: 0x6c023e20, 0x10236: 0x6c042020, 0x10237: 0x6c191020, + 0x10238: 0x4816c620, 0x10239: 0x6c047e20, 0x1023a: 0x6c090020, 0x1023b: 0x42a80c20, + 0x1023c: 0x42a93c20, 0x1023d: 0x6c042220, 0x1023e: 0x6c0f4020, 0x1023f: 0x6c098c20, + // Block 0x409, offset 0x10240 + 0x10240: 0x6c195220, 0x10241: 0x42a9ec20, 0x10242: 0x6c0ff020, 0x10243: 0x6c055c20, + 0x10244: 0x6c198220, 0x10245: 0x6c0c9e20, 0x10246: 0x6c0c9e20, 0x10247: 0x6c199620, + 0x10248: 0x6c040020, 0x10249: 0x42ab6620, 0x1024a: 0x42ab8420, 0x1024b: 0x6c1a2620, + 0x1024c: 0x6c0e1820, 0x1024d: 0x42ae2e20, 0x1024e: 0x42aca220, 0x1024f: 0x6c133420, + 0x10250: 0x6c0c3420, 0x10251: 0x6c0ce420, 0x10252: 0x6c0ade20, 0x10253: 0x6c0b0220, + 0x10254: 0x42b01a20, 0x10255: 0x6c056220, 0x10256: 0x42b06420, 0x10257: 0x6c13be20, + 0x10258: 0x42b15820, 0x10259: 0x4829c820, 0x1025a: 0x6c116c20, 0x1025b: 0x6c0f2620, + 0x1025c: 0x42b20c20, 0x1025d: 0x6c0d7620, 0x1025e: 0x6c14b820, 0x1025f: 0x6c1ace20, + 0x10260: 0x482d5020, 0x10261: 0x482dd420, 0x10262: 0x42b3d820, 0x10263: 0x42b43620, + 0x10264: 0x42b44e20, 0x10265: 0x42b3b020, 0x10266: 0x6c12cc20, 0x10267: 0x446ddc20, + 0x10268: 0x446df820, 0x10269: 0x42b61020, 0x1026a: 0x6c1b3420, 0x1026b: 0x6c1b3420, + 0x1026c: 0x48339020, 0x1026d: 0x6c1b5c20, 0x1026e: 0x42b7b020, 0x1026f: 0x6c10fa20, + 0x10270: 0x6c1b7620, 0x10271: 0x48363020, 0x10272: 0x6c097e20, 0x10273: 0x6c0a6220, + 0x10274: 0x6c101820, 0x10275: 0x6c1b8420, 0x10276: 0x446f0220, 0x10277: 0x6c0fc220, + 0x10278: 0x6c1b9c20, 0x10279: 0x42b98020, 0x1027a: 0x42b91a20, 0x1027b: 0x483bc820, + 0x1027c: 0x42ba8620, 0x1027d: 0x483bcc20, 0x1027e: 0x42badc20, 0x1027f: 0x42bad620, + // Block 0x40a, offset 0x10280 + 0x10280: 0x42baf820, 0x10281: 0x6c0a1420, 0x10282: 0x42bbc420, 0x10283: 0x44705e20, + 0x10284: 0x6c0e0220, 0x10285: 0x42bc5020, 0x10286: 0x6c140620, 0x10287: 0x42bcd220, + 0x10288: 0x4470c420, 0x10289: 0x48430620, 0x1028a: 0x4470f820, 0x1028b: 0x42bd6020, + 0x1028c: 0x42bd6620, 0x1028d: 0x6c0a2820, 0x1028e: 0x6c16de20, 0x1028f: 0x49472420, + 0x10290: 0x6c1c6e20, 0x10291: 0x48466220, 0x10292: 0x48466220, 0x10293: 0x6c286820, + 0x10294: 0x42be4420, 0x10295: 0x42be4420, 0x10296: 0x44718e20, 0x10297: 0x48657020, + 0x10298: 0x48c3b420, 0x10299: 0x6c056620, 0x1029a: 0x6c0ebc20, 0x1029b: 0x4471c620, + 0x1029c: 0x42bf3420, 0x1029d: 0x6c10f020, 0x1029e: 0x6c088020, 0x1029f: 0x42bff220, + 0x102a0: 0x6c1d0220, 0x102a1: 0x44727420, 0x102a2: 0x44723820, 0x102a3: 0x6c022a20, + 0x102a4: 0x484da820, 0x102a5: 0x6c109620, 0x102a6: 0x6c08cc20, 0x102a7: 0x6c06c020, + 0x102a8: 0x6c0b2e20, 0x102a9: 0x6c06c020, 0x102aa: 0x42c2f420, 0x102ab: 0x6c0d3820, + 0x102ac: 0x6c05da20, 0x102ad: 0x6c133820, 0x102ae: 0x42c35e20, 0x102af: 0x42c3bc20, + 0x102b0: 0x6c0ec020, 0x102b1: 0x6c1dac20, 0x102b2: 0x6c0bdc20, 0x102b3: 0x6c1dc620, + 0x102b4: 0x42c4ba20, 0x102b5: 0x6c13cc20, 0x102b6: 0x6c1df220, 0x102b7: 0x6c1e2620, + 0x102b8: 0x48561820, 0x102b9: 0x6c120820, 0x102ba: 0x42c5f820, 0x102bb: 0x6c092c20, + 0x102bc: 0x6c0cf620, 0x102bd: 0x42c7c820, 0x102be: 0x4857e220, 0x102bf: 0x42c84420, + // Block 0x40b, offset 0x102c0 + 0x102c0: 0x42c78a20, 0x102c1: 0x6c014820, 0x102c2: 0x44745c20, 0x102c3: 0x6c145420, + 0x102c4: 0x42c8fc20, 0x102c5: 0x42c93a20, 0x102c6: 0x42c8ee20, 0x102c7: 0x4474d820, + 0x102c8: 0x6c12c020, 0x102c9: 0x6c057620, 0x102ca: 0x48601420, 0x102cb: 0x42cbc620, + 0x102cc: 0x6c0a2e20, 0x102cd: 0x6c1f1420, 0x102ce: 0x44763220, 0x102cf: 0x6c0a2220, + 0x102d0: 0x44761020, 0x102d1: 0x4475c820, 0x102d2: 0x6c141620, 0x102d3: 0x6c183c20, + 0x102d4: 0x6c07a620, 0x102d5: 0x42cd3820, 0x102d6: 0x6c27ec20, 0x102d7: 0x4487b220, + 0x102d8: 0x6c16e220, 0x102d9: 0x6c141020, 0x102da: 0x42ce4220, 0x102db: 0x6c1f7020, + 0x102dc: 0x6c094a20, 0x102dd: 0x48678620, 0x102de: 0x44769220, 0x102df: 0x42cff420, + 0x102e0: 0x6c1f8c20, 0x102e1: 0x42d0a420, 0x102e2: 0x6c116220, 0x102e3: 0x4868da20, + 0x102e4: 0x42d11c20, 0x102e5: 0x42d03e20, 0x102e6: 0x42d22820, 0x102e7: 0x44773a20, + 0x102e8: 0x42d28420, 0x102e9: 0x42d34620, 0x102ea: 0x42d3d420, 0x102eb: 0x42d55020, + 0x102ec: 0x486d4620, 0x102ed: 0x6c051e20, 0x102ee: 0x44783020, 0x102ef: 0x6c08d220, + 0x102f0: 0x48714e20, 0x102f1: 0x6c20f820, 0x102f2: 0x44789c20, 0x102f3: 0x42d6e420, + 0x102f4: 0x42d73e20, 0x102f5: 0x6c082020, 0x102f6: 0x6c028c20, 0x102f7: 0x48751a20, + 0x102f8: 0x483a1620, 0x102f9: 0x4875f420, 0x102fa: 0x6c11ec20, 0x102fb: 0x48797820, + 0x102fc: 0x6c014c20, 0x102fd: 0x42d99a20, 0x102fe: 0x42d8ce20, 0x102ff: 0x42da2c20, + // Block 0x40c, offset 0x10300 + 0x10300: 0x6c113620, 0x10301: 0x6c023c20, 0x10302: 0x6c162420, 0x10303: 0x6c06dc20, + 0x10304: 0x6c0b3a20, 0x10305: 0x6c21a620, 0x10306: 0x487a3c20, 0x10307: 0x42da6820, + 0x10308: 0x6c06de20, 0x10309: 0x6c21d220, 0x1030a: 0x447a6620, 0x1030b: 0x6c08d420, + 0x1030c: 0x42dd8e20, 0x1030d: 0x487da220, 0x1030e: 0x6c21a820, 0x1030f: 0x6c0ec820, + 0x10310: 0x487ebc20, 0x10311: 0x487f1c20, 0x10312: 0x6c226020, 0x10313: 0x42e07220, + 0x10314: 0x6c109020, 0x10315: 0x6c228220, 0x10316: 0x447b2c20, 0x10317: 0x42e09420, + 0x10318: 0x6c07bc20, 0x10319: 0x42e0ee20, 0x1031a: 0x6c0e2820, 0x1031b: 0x480a4a20, + 0x1031c: 0x42e28a20, 0x1031d: 0x4884c620, 0x1031e: 0x42e33820, 0x1031f: 0x48875620, + 0x10320: 0x6c22f620, 0x10321: 0x6c094e20, 0x10322: 0x42e4a020, 0x10323: 0x488c1020, + 0x10324: 0x6c07c020, 0x10325: 0x42e52a20, 0x10326: 0x488e6a20, 0x10327: 0x48902820, + 0x10328: 0x6c236220, 0x10329: 0x6c018420, 0x1032a: 0x447d5820, 0x1032b: 0x42e74a20, + 0x1032c: 0x447d7020, 0x1032d: 0x447d7020, 0x1032e: 0x42e88e20, 0x1032f: 0x6c238c20, + 0x10330: 0x42e8e220, 0x10331: 0x42e90a20, 0x10332: 0x6c23a020, 0x10333: 0x447e3620, + 0x10334: 0x42ea4820, 0x10335: 0x48986c20, 0x10336: 0x42ea7c20, 0x10337: 0x48992420, + 0x10338: 0x6c007620, 0x10339: 0x48433e20, 0x1033a: 0x42ec2020, 0x1033b: 0x489f4220, + 0x1033c: 0x489f7020, 0x1033d: 0x48a08820, 0x1033e: 0x447ff820, 0x1033f: 0x44801020, + // Block 0x40d, offset 0x10340 + 0x10340: 0x6c0eec20, 0x10341: 0x48a1e620, 0x10342: 0x48a1e420, 0x10343: 0x48a23220, + 0x10344: 0x48a26620, 0x10345: 0x6c24a820, 0x10346: 0x6c0b4220, 0x10347: 0x6c0b4220, + 0x10348: 0x42ee9420, 0x10349: 0x44807220, 0x1034a: 0x6c24c820, 0x1034b: 0x44808c20, + 0x1034c: 0x44812c20, 0x1034d: 0x48a83a20, 0x1034e: 0x42f09c20, 0x1034f: 0x6c250420, + 0x10350: 0x42f19820, 0x10351: 0x4481c620, 0x10352: 0x48ac4c20, 0x10353: 0x6c0cc420, + 0x10354: 0x48ad3420, 0x10355: 0x48ad8a20, 0x10356: 0x6c131a20, 0x10357: 0x42f3d620, + 0x10358: 0x44825e20, 0x10359: 0x6c074020, 0x1035a: 0x42f49420, 0x1035b: 0x6c01ac20, + 0x1035c: 0x48b2f820, 0x1035d: 0x48b54e20, 0x1035e: 0x48b54e20, 0x1035f: 0x42f5dc20, + 0x10360: 0x44840420, 0x10361: 0x48b75620, 0x10362: 0x6c261820, 0x10363: 0x6c0e6a20, + 0x10364: 0x44844e20, 0x10365: 0x48b90020, 0x10366: 0x6c268420, 0x10367: 0x44854020, + 0x10368: 0x42f9d020, 0x10369: 0x42f9c620, 0x1036a: 0x6c03c020, 0x1036b: 0x48bf0c20, + 0x1036c: 0x6c26bc20, 0x1036d: 0x44860220, 0x1036e: 0x6c26d220, 0x1036f: 0x42fc0420, + 0x10370: 0x42fc8a20, 0x10371: 0x44866820, 0x10372: 0x48c45020, 0x10373: 0x48c48e20, + 0x10374: 0x4486b220, 0x10375: 0x48c5b220, 0x10376: 0x42fef420, 0x10377: 0x48c67c20, + 0x10378: 0x42ff2a20, 0x10379: 0x42fff420, 0x1037a: 0x6c093820, 0x1037b: 0x48c9b420, + 0x1037c: 0x48ca4620, 0x1037d: 0x4300c020, 0x1037e: 0x48cb5020, 0x1037f: 0x6c27d620, + // Block 0x40e, offset 0x10380 + 0x10380: 0x4866be20, 0x10381: 0x4487aa20, 0x10382: 0x6c009220, 0x10383: 0x43020620, + 0x10384: 0x44881620, 0x10385: 0x6c281420, 0x10386: 0x42b56a20, 0x10387: 0x48cf4e20, + 0x10388: 0x48cf6a20, 0x10389: 0x48672620, 0x1038a: 0x48673820, 0x1038b: 0x6c286820, + 0x1038c: 0x43040820, 0x1038d: 0x6c08ea20, 0x1038e: 0x4488d620, 0x1038f: 0x43052220, + 0x10390: 0x6c00a420, 0x10391: 0x6c091e20, 0x10392: 0x42a56620, 0x10393: 0x6c01e420, + 0x10394: 0x6c13e220, 0x10395: 0x6c020c20, 0x10396: 0x6c050020, 0x10397: 0x48d67820, + 0x10398: 0x6c095620, 0x10399: 0x43063a20, 0x1039a: 0x4306c620, 0x1039b: 0x43075a20, + 0x1039c: 0x6c28f220, 0x1039d: 0x6c292820, 0x1039e: 0x4307ce20, 0x1039f: 0x6c0ea420, + 0x103a0: 0x4306a620, 0x103a1: 0x6c03f820, 0x103a2: 0x6c04e220, 0x103a3: 0x6c07cc20, + 0x103a4: 0x48d86c20, 0x103a5: 0x48dad620, 0x103a6: 0x48d9aa20, 0x103a7: 0x448a5620, + 0x103a8: 0x4309e220, 0x103a9: 0x4309e620, 0x103aa: 0x430a2c20, 0x103ab: 0x48e79420, + 0x103ac: 0x430ac820, 0x103ad: 0x48de5820, 0x103ae: 0x448aba20, 0x103af: 0x448ac220, + 0x103b0: 0x48df6220, 0x103b1: 0x48e1a420, 0x103b2: 0x448ad620, 0x103b3: 0x6c041420, + 0x103b4: 0x6c163c20, 0x103b5: 0x6c29de20, 0x103b6: 0x430cd220, 0x103b7: 0x6c29e620, + 0x103b8: 0x430d1020, 0x103b9: 0x430e1c20, 0x103ba: 0x430dc420, 0x103bb: 0x430ef220, + 0x103bc: 0x430e5020, 0x103bd: 0x430ed620, 0x103be: 0x430f0c20, 0x103bf: 0x448bae20, + // Block 0x40f, offset 0x103c0 + 0x103c0: 0x430fc220, 0x103c1: 0x43100220, 0x103c2: 0x448bf220, 0x103c3: 0x4310c020, + 0x103c4: 0x6c008220, 0x103c5: 0x48ecce20, 0x103c6: 0x4311ae20, 0x103c7: 0x4311bc20, + 0x103c8: 0x448c6a20, 0x103c9: 0x4311f420, 0x103ca: 0x44697620, 0x103cb: 0x48f15c20, + 0x103cc: 0x48f2cc20, 0x103cd: 0x448d7c20, 0x103ce: 0x448d8e20, 0x103cf: 0x6c0bfe20, + 0x103d0: 0x6c154e20, 0x103d1: 0x6c1ede20, 0x103d2: 0x6c2be420, 0x103d3: 0x48f95020, + 0x103d4: 0x6c035620, 0x103d5: 0x6c2c1220, 0x103d6: 0x431a3620, 0x103d7: 0x6c03ca20, + 0x103d8: 0x48fe5e20, 0x103d9: 0x48100820, 0x103da: 0x6c2c5420, 0x103db: 0x431b7820, + 0x103dc: 0x431be020, 0x103dd: 0x4811bc20, 0x103de: 0x431da820, 0x103df: 0x6c155020, + 0x103e0: 0x490ba420, 0x103e1: 0x490bda20, 0x103e2: 0x43212820, 0x103e3: 0x4321e220, + 0x103e4: 0x43222220, 0x103e5: 0x490e5c20, 0x103e6: 0x43223620, 0x103e7: 0x43247020, + 0x103e8: 0x4325ae20, 0x103e9: 0x4325b020, 0x103ea: 0x4324f820, 0x103eb: 0x4327f220, + 0x103ec: 0x43282a20, 0x103ed: 0x4917f420, 0x103ee: 0x6c024a20, 0x103ef: 0x44932a20, + 0x103f0: 0x432b6e20, 0x103f1: 0x491aee20, 0x103f2: 0x4493cc20, 0x103f3: 0x432d8620, + 0x103f4: 0x42bb6420, 0x103f5: 0x432e4620, 0x103f6: 0x49228a20, 0x103f7: 0x49243420, + 0x103f8: 0x4494dc20, 0x103f9: 0x4494ec20, 0x103fa: 0x432fc020, 0x103fb: 0x49281420, + 0x103fc: 0x44956420, 0x103fd: 0x49292c20, 0x103fe: 0x43301620, 0x103ff: 0x43301620, + // Block 0x410, offset 0x10400 + 0x10400: 0x43305220, 0x10401: 0x492b6c20, 0x10402: 0x6c03d020, 0x10403: 0x44966620, + 0x10404: 0x43325220, 0x10405: 0x43334e20, 0x10406: 0x43338420, 0x10407: 0x4333fc20, + 0x10408: 0x44979c20, 0x10409: 0x49366020, 0x1040a: 0x43362420, 0x1040b: 0x43388020, + 0x1040c: 0x4339fa20, 0x1040d: 0x44999c20, 0x1040e: 0x4499da20, 0x1040f: 0x433ace20, + 0x10410: 0x49419c20, 0x10411: 0x4499f020, 0x10412: 0x49420a20, 0x10413: 0x49441c20, + 0x10414: 0x49452220, 0x10415: 0x6c145a20, 0x10416: 0x449aac20, 0x10417: 0x6c316420, + 0x10418: 0x433dfc20, 0x10419: 0x433e0a20, 0x1041a: 0x433e1e20, 0x1041b: 0x433e2c20, + 0x1041c: 0x6c125e20, 0x1041d: 0x494c0020, + // Block 0x411, offset 0x10440 + 0x10440: 0xe00014bd, 0x10441: 0x0033b483, 0x10442: 0x00339688, 0x10443: 0x0033a288, + 0x10444: 0x0033c288, 0x10445: 0x0033fc88, 0x10446: 0xca490071, 0x10447: 0x00343688, + 0x10448: 0x00344688, 0x10449: 0x00349a88, 0x1044a: 0x0034e488, 0x1044b: 0x00356288, + 0x1044c: 0x00356a88, 0x1044d: 0xe00014cf, 0x1044e: 0x00357a88, 0x1044f: 0x00365488, + 0x10450: 0xc0090041, 0x10451: 0x00335288, 0x10452: 0x00335a88, 0x10453: 0xc0130092, + 0x10454: 0x00338a88, 0x10455: 0xc34c0041, 0x10456: 0xc01c0071, 0x10457: 0xc0200071, + 0x10458: 0xc0250041, 0x10459: 0x00343e88, 0x1045a: 0xc0370092, 0x1045b: 0x00348488, + 0x1045c: 0x0034a888, 0x1045d: 0x0034ba88, 0x1045e: 0xc02e0071, 0x1045f: 0x00350e88, + 0x10460: 0x00352888, 0x10461: 0x00353a88, 0x10462: 0x00354c88, 0x10463: 0xc03e00f1, + 0x10464: 0x0035ac88, 0x10465: 0x0035b488, 0x10466: 0x00360288, 0x10467: 0xc0440071, + 0x10468: 0x00365c88, 0x10469: 0x00366688, 0x1046a: 0x00367488, 0x1046b: 0xc0480071, + 0x1046c: 0x00368e88, 0x1046d: 0xc04c0071, 0x1046e: 0x0036b888, 0x1046f: 0x0036c488, + 0x10470: 0xc0060041, 0x10471: 0x40335220, 0x10472: 0x40335a20, 0x10473: 0xc0100092, + 0x10474: 0x40338a20, 0x10475: 0xc3490041, 0x10476: 0xc01a0071, 0x10477: 0xc01e0071, + 0x10478: 0xc0220041, 0x10479: 0x40343e20, 0x1047a: 0xc0340092, 0x1047b: 0x40348420, + 0x1047c: 0x4034a820, 0x1047d: 0x4034ba20, 0x1047e: 0xc02c0071, 0x1047f: 0x40350e20, + // Block 0x412, offset 0x10480 + 0x10480: 0x40352820, 0x10481: 0x40353a20, 0x10482: 0x40354c20, 0x10483: 0xc03a00f1, + 0x10484: 0x4035ac20, 0x10485: 0x4035b420, 0x10486: 0x40360220, 0x10487: 0xc0420071, + 0x10488: 0x40365c20, 0x10489: 0x40366620, 0x1048a: 0x40367420, 0x1048b: 0xc0460071, + 0x1048c: 0x40368e20, 0x1048d: 0xc04a0071, 0x1048e: 0x4036b820, 0x1048f: 0x4036c420, + 0x10490: 0xe00014ba, 0x10491: 0x4033b420, 0x10492: 0x40339620, 0x10493: 0x4033a220, + 0x10494: 0x4033c220, 0x10495: 0x4033fc20, 0x10496: 0xca470071, 0x10497: 0x40343620, + 0x10498: 0x40344620, 0x10499: 0x40349a20, 0x1049a: 0x4034e420, 0x1049b: 0x40356220, + 0x1049c: 0x40356a20, 0x1049d: 0xe00014cc, 0x1049e: 0x40357a20, 0x1049f: 0x40365420, + 0x104a0: 0x0035e088, 0x104a1: 0x4035e020, 0x104a2: 0x00369e88, 0x104a3: 0x40369e20, + 0x104a4: 0x0036ce88, 0x104a5: 0x4036ce20, 0x104a6: 0x0036d688, 0x104a7: 0x4036d620, + 0x104a8: 0x0036ea88, 0x104a9: 0x4036ea20, 0x104aa: 0x0036e088, 0x104ab: 0x4036e020, + 0x104ac: 0x0036f488, 0x104ad: 0x4036f420, 0x104ae: 0x0036fc88, 0x104af: 0x4036fc20, + 0x104b0: 0x00370488, 0x104b1: 0x40370420, 0x104b2: 0x00370c88, 0x104b3: 0x40370c20, + 0x104b4: 0xc0500131, 0x104b5: 0xc04e0131, 0x104b6: 0x00371c88, 0x104b7: 0x40371c20, + 0x104b8: 0x0035a488, 0x104b9: 0x4035a420, 0x104ba: 0x0035fa88, 0x104bb: 0x4035fa20, + 0x104bc: 0x0035f288, 0x104bd: 0x4035f220, 0x104be: 0x0035e888, 0x104bf: 0x4035e820, + // Block 0x413, offset 0x104c0 + 0x104c0: 0x00352088, 0x104c1: 0x40352020, 0x104c2: 0x40070620, 0x104c3: 0xae608302, + 0x104c4: 0xae605f02, 0x104c5: 0xae602a02, 0x104c6: 0xae602202, 0x104c7: 0xae605f02, + 0x104c8: 0xa0000000, 0x104c9: 0xa0000000, 0x104ca: 0x00341c88, 0x104cb: 0x40341c20, + 0x104cc: 0x00369688, 0x104cd: 0x40369620, 0x104ce: 0x00353088, 0x104cf: 0x40353020, + 0x104d0: 0xe00014b7, 0x104d1: 0xe00014b4, 0x104d2: 0x00336a88, 0x104d3: 0x40336a20, + 0x104d4: 0x00337a88, 0x104d5: 0x40337a20, 0x104d6: 0x0033dc88, 0x104d7: 0x4033dc20, + 0x104d8: 0x0033aa88, 0x104d9: 0x4033aa20, 0x104da: 0x00345888, 0x104db: 0x40345820, + 0x104dc: 0x00347888, 0x104dd: 0x40347820, 0x104de: 0x00347088, 0x104df: 0x40347020, + 0x104e0: 0x00346888, 0x104e1: 0x40346820, 0x104e2: 0x0034ca88, 0x104e3: 0x4034ca20, + 0x104e4: 0x0034dc88, 0x104e5: 0x4034dc20, 0x104e6: 0x00351888, 0x104e7: 0x40351820, + 0x104e8: 0x00372688, 0x104e9: 0x40372620, 0x104ea: 0x00354488, 0x104eb: 0x40354420, + 0x104ec: 0x00355888, 0x104ed: 0x40355820, 0x104ee: 0x00359c83, 0x104ef: 0x40359c20, + 0x104f0: 0x00359a88, 0x104f1: 0x40359a20, 0x104f2: 0x0035cc88, 0x104f3: 0x4035cc20, + 0x104f4: 0x00360e88, 0x104f5: 0x40360e20, 0x104f6: 0x00362a88, 0x104f7: 0x40362a20, + 0x104f8: 0x00363a88, 0x104f9: 0x40363a20, 0x104fa: 0x0035d488, 0x104fb: 0x4035d420, + 0x104fc: 0x00364488, 0x104fd: 0x40364420, 0x104fe: 0x00364c88, 0x104ff: 0x40364c20, + // Block 0x414, offset 0x10500 + 0x10500: 0xa0000000, 0x10501: 0xa0000000, 0x10502: 0xa0000000, 0x10503: 0xa0000000, + 0x10504: 0xa0000000, 0x10505: 0xa0000000, 0x10506: 0xa0000000, 0x10507: 0xa0000000, + 0x10508: 0xa0000000, 0x10509: 0x40020020, 0x1050a: 0x40020220, 0x1050b: 0x40020420, + 0x1050c: 0x40020620, 0x1050d: 0x40020820, 0x1050e: 0xa0000000, 0x1050f: 0xa0000000, + 0x10510: 0xa0000000, 0x10511: 0xa0000000, 0x10512: 0xa0000000, 0x10513: 0xa0000000, + 0x10514: 0xa0000000, 0x10515: 0xa0000000, 0x10516: 0xa0000000, 0x10517: 0xa0000000, + 0x10518: 0xa0000000, 0x10519: 0xa0000000, 0x1051a: 0xa0000000, 0x1051b: 0xa0000000, + 0x1051c: 0xa0000000, 0x1051d: 0xa0000000, 0x1051e: 0xa0000000, 0x1051f: 0xa0000000, + 0x10520: 0x40021220, 0x10521: 0x4002ba20, 0x10522: 0x4003e020, 0x10523: 0x4004ea20, + 0x10524: 0x4027de20, 0x10525: 0x4004ec20, 0x10526: 0x4004e620, 0x10527: 0x4003d220, + 0x10528: 0x4003f420, 0x10529: 0x4003f620, 0x1052a: 0x4004d820, 0x1052b: 0x40093820, + 0x1052c: 0x40024020, 0x1052d: 0x40021a20, 0x1052e: 0x4002e420, 0x1052f: 0x4004e220, + 0x10530: 0x4029cc20, 0x10531: 0x4029ce20, 0x10532: 0x4029d020, 0x10533: 0x4029d220, + 0x10534: 0x4029d420, 0x10535: 0x4029d620, 0x10536: 0x4029d820, 0x10537: 0x4029da20, + 0x10538: 0x4029dc20, 0x10539: 0x4029de20, 0x1053a: 0x40026c20, 0x1053b: 0x40026220, + 0x1053c: 0x40094020, 0x1053d: 0x40094220, 0x1053e: 0x40094420, 0x1053f: 0x4002c420, + // Block 0x415, offset 0x10540 + 0x10540: 0x4004d620, 0x10541: 0xca5027b1, 0x10542: 0x002c0a88, 0x10543: 0x002c3a88, + 0x10544: 0x002c6288, 0x10545: 0xc39e0be1, 0x10546: 0x002d0888, 0x10547: 0x002d2288, + 0x10548: 0x002d6888, 0x10549: 0x002d9a88, 0x1054a: 0x002dcc88, 0x1054b: 0xca4b3b11, + 0x1054c: 0xc0030002, 0x1054d: 0x002e8288, 0x1054e: 0x002e9e88, 0x1054f: 0xc3a30b21, + 0x10550: 0x002f2c88, 0x10551: 0x002f5688, 0x10552: 0x002f7a88, 0x10553: 0x002fe688, + 0x10554: 0x00302c88, 0x10555: 0xc3900b21, 0x10556: 0x0030be88, 0x10557: 0x0030e288, + 0x10558: 0x0030f688, 0x10559: 0x00310088, 0x1055a: 0x00312a88, 0x1055b: 0x4003f820, + 0x1055c: 0x4004e420, 0x1055d: 0x4003fa20, 0x1055e: 0x40062420, 0x1055f: 0x40021620, + 0x10560: 0x40061e20, 0x10561: 0xca4d27b1, 0x10562: 0x402c0a20, 0x10563: 0x402c3a20, + 0x10564: 0x402c6220, 0x10565: 0xc39c0be1, 0x10566: 0x402d0820, 0x10567: 0x402d2220, + 0x10568: 0x402d6820, 0x10569: 0x402d9a20, 0x1056a: 0x402dcc20, 0x1056b: 0x402dfe20, + 0x1056c: 0xc0000002, 0x1056d: 0x402e8220, 0x1056e: 0x402e9e20, 0x1056f: 0xc3a00b21, + 0x10570: 0x402f2c20, 0x10571: 0x402f5620, 0x10572: 0x402f7a20, 0x10573: 0x402fe620, + 0x10574: 0x40302c20, 0x10575: 0xc38d0b21, 0x10576: 0x4030be20, 0x10577: 0x4030e220, + 0x10578: 0x4030f620, 0x10579: 0x40310020, 0x1057a: 0x40312a20, 0x1057b: 0x4003fc20, + 0x1057c: 0x40094820, 0x1057d: 0x4003fe20, 0x1057e: 0x40094c20, 0x1057f: 0xa0000000, + // Block 0x416, offset 0x10580 + 0x10580: 0xe0000983, 0x10581: 0xe0000980, 0x10582: 0xe00008fb, 0x10583: 0xe00008f8, + 0x10584: 0xe000097d, 0x10585: 0xe000097a, 0x10586: 0xe0000a38, 0x10587: 0xe0000a35, + 0x10588: 0xe0000a3e, 0x10589: 0xe0000a3b, 0x1058a: 0xe0000a4a, 0x1058b: 0xe0000a47, + 0x1058c: 0xe0000a44, 0x1058d: 0xe0000a41, 0x1058e: 0xe0000a86, 0x1058f: 0xe0000a83, + 0x10590: 0x002c62a3, 0x10591: 0x402c6221, 0x10592: 0xe0000b46, 0x10593: 0xe0000b43, + 0x10594: 0xe0000aee, 0x10595: 0xe0000aeb, 0x10596: 0xe0000b2c, 0x10597: 0xe0000b29, + 0x10598: 0x00320cc3, 0x10599: 0x40320c22, 0x1059a: 0xe0000b1a, 0x1059b: 0xe0000b17, + 0x1059c: 0xe0000bb8, 0x1059d: 0xe0000bb5, 0x1059e: 0xe0000bb2, 0x1059f: 0xe0000baf, + 0x105a0: 0xe0000bc4, 0x105a1: 0xe0000bc1, 0x105a2: 0xe0000bca, 0x105a3: 0xe0000bc7, + 0x105a4: 0xe0000bee, 0x105a5: 0xe0000beb, 0x105a6: 0xe0000c1b, 0x105a7: 0xe0000c18, + 0x105a8: 0xe0000c51, 0x105a9: 0xe0000c4e, 0x105aa: 0xe0000c60, 0x105ab: 0xe0000c5d, + 0x105ac: 0xe0000c31, 0x105ad: 0xe0000c2e, 0x105ae: 0xe0000c5a, 0x105af: 0xe0000c57, + 0x105b0: 0xe0000c54, 0x105b1: 0x402da220, 0x105b2: 0xf0000a0a, 0x105b3: 0xf0000404, + 0x105b4: 0xe0000c8a, 0x105b5: 0xe0000c87, 0x105b6: 0xe0000c9f, 0x105b7: 0xe0000c9c, + 0x105b8: 0x402f5621, 0x105b9: 0xe0000ccc, 0x105ba: 0xe0000cc9, 0x105bb: 0xe0000cd8, + 0x105bc: 0xe0000cd5, 0x105bd: 0xe0000cd2, 0x105be: 0xe0000ccf, 0x105bf: 0xe0000d04, + // Block 0x417, offset 0x105c0 + 0x105c0: 0xca533b21, 0x105c1: 0xca553b21, 0x105c2: 0xca573b21, 0x105c3: 0xca593b21, + 0x105c4: 0xca5b3b21, 0x105c5: 0xca5d3b21, 0x105c6: 0xca5f3b21, 0x105c7: 0xca613b21, + 0x105c8: 0xca633b21, 0x105c9: 0xca653b21, 0x105ca: 0xca673b21, 0x105cb: 0xca693b21, + 0x105cc: 0xca6b3b21, 0x105cd: 0xca6d3b21, 0x105ce: 0xca6f3b21, 0x105cf: 0xca713b21, + 0x105d0: 0xca733b21, 0x105d1: 0xca753b21, 0x105d2: 0xca773b21, 0x105d3: 0xca793b21, + 0x105d4: 0xca7b3b21, 0x105d5: 0xca7d3b21, 0x105d6: 0xca7f3b21, 0x105d7: 0xca813b21, + 0x105d8: 0xca833b21, 0x105d9: 0xca853b21, 0x105da: 0xca873b21, 0x105db: 0xca8b3b21, + 0x105dc: 0xca913b21, 0x105dd: 0xca953b21, 0x105de: 0xca973b21, 0x105df: 0xca993b21, + 0x105e0: 0xca9b3b21, 0x105e1: 0xca9d3b21, 0x105e2: 0xca9f3b21, 0x105e3: 0xca9f3b21, + 0x105e4: 0xe000413a, 0x105e5: 0xe000413d, 0x105e6: 0xe0004140, 0x105e7: 0xe0004143, + 0x105e8: 0xe0004146, 0x105e9: 0xe000414a, 0x105ea: 0xe000414d, 0x105eb: 0xca893b21, + 0x105ec: 0xca8d3b21, 0x105ed: 0xca8f3b21, 0x105ee: 0xca933b21, 0x105ef: 0xe0004151, + 0x105f0: 0xe0004154, 0x105f1: 0xe0004157, 0x105f2: 0xe000415a, 0x105f3: 0xe000415d, + 0x105f4: 0xa0000000, 0x105f5: 0xa0000000, 0x105f6: 0xcaa43b81, 0x105f7: 0xcaa63bb1, + 0x105f8: 0x40501220, 0x105f9: 0x40501420, 0x105fa: 0x40501620, 0x105fb: 0xcaa13b51, + 0x105fc: 0x40501a20, 0x105fd: 0x40501c20, 0x105fe: 0x40501e20, 0x105ff: 0x40502020, + // Block 0x418, offset 0x10600 + 0x10600: 0x40502220, 0x10601: 0xcaa83bb1, 0x10602: 0x40502620, 0x10603: 0x40502820, + 0x10604: 0xcaaa3bb1, 0x10605: 0x40502c20, 0x10606: 0x40503020, 0x10607: 0x40503420, + 0x10608: 0xadc11802, 0x10609: 0xadc11b02, 0x1060a: 0xadc11c02, 0x1060b: 0xadc11a02, + 0x1060c: 0xa0005f02, 0x1060d: 0xadc11d02, 0x1060e: 0xadc11402, 0x1060f: 0xadc11502, + 0x10610: 0xadc11702, 0x10611: 0xadc11602, 0x10612: 0x82092817, 0x10613: 0xa0000000, + 0x10614: 0x40032620, 0x10615: 0x40032820, 0x10616: 0x4002ac20, 0x10617: 0x4027bc20, + 0x10618: 0xe000409a, 0x10619: 0x4005be20, 0x1061a: 0x4005c020, 0x1061b: 0x4027f620, + 0x1061c: 0x404fea20, 0x1061d: 0xadc11902, + 0x10620: 0xe00001b5, 0x10621: 0xe0000249, 0x10622: 0xe0000361, 0x10623: 0xe000043b, + 0x10624: 0xe0000510, 0x10625: 0xe00005da, 0x10626: 0xe00006a5, 0x10627: 0xe000074d, + 0x10628: 0xe00007f9, 0x10629: 0xe000089e, + 0x10630: 0xe00001b8, 0x10631: 0xe000024c, 0x10632: 0xe0000364, 0x10633: 0xe000043e, + 0x10634: 0xe0000513, 0x10635: 0xe00005dd, 0x10636: 0xe00006a8, 0x10637: 0xe0000750, + 0x10638: 0xe00007fc, 0x10639: 0xe00008a1, + // Block 0x419, offset 0x10640 + 0x10642: 0x40439020, 0x10643: 0x40439220, + 0x10645: 0x40437020, 0x10646: 0x40437220, 0x10647: 0x40437420, + 0x10648: 0x40437620, 0x10649: 0x40437820, 0x1064a: 0x40437a20, 0x1064b: 0x40437c20, + 0x1064c: 0x40438020, 0x1064e: 0x40438420, 0x1064f: 0x40438620, + 0x10650: 0x40438820, 0x10652: 0x40438a20, 0x10653: 0x40438c20, + 0x10654: 0x40438e20, 0x10655: 0x40439020, 0x10656: 0x40439220, 0x10657: 0x40439420, + 0x10658: 0x40439620, 0x10659: 0x40439820, 0x1065a: 0x40439a20, 0x1065b: 0x40439c20, + 0x1065c: 0x40439e20, 0x1065d: 0x4043a020, 0x1065e: 0x4043a220, 0x1065f: 0x4043a420, + 0x10660: 0x4043a620, 0x10661: 0x4043a820, 0x10662: 0x4043aa20, 0x10663: 0x4043ac20, + 0x10664: 0x4043ae20, 0x10665: 0x4043b020, 0x10666: 0x4043b220, 0x10667: 0x4043b420, + 0x10668: 0x4043b620, 0x1066a: 0x4043b820, 0x1066b: 0x4043ba20, + 0x1066c: 0x4043bc20, 0x1066d: 0x4043be20, 0x1066e: 0x4043c020, 0x1066f: 0x4043c220, + 0x10670: 0x4043c420, 0x10671: 0x4043c620, 0x10672: 0x4043c820, 0x10673: 0x4043d420, + 0x10675: 0x4043ca20, 0x10676: 0x4043cc20, 0x10677: 0x4043ce20, + 0x10678: 0x4043d020, 0x10679: 0x4043d220, + 0x1067c: 0xa070f102, 0x1067d: 0x4043d820, 0x1067e: 0x4043de20, 0x1067f: 0xc06a0311, + // Block 0x41a, offset 0x10680 + 0x10680: 0x4043e220, 0x10681: 0x4043e420, 0x10682: 0x4043e620, 0x10683: 0x4043e820, + 0x10684: 0x4043ea20, 0x10686: 0xc06c0341, 0x10687: 0x4043f220, + 0x10688: 0x4043f420, 0x1068a: 0xc0710311, 0x1068b: 0x4043f820, + 0x1068c: 0x4043fa20, 0x1068d: 0x820921fe, + 0x10695: 0x4043fe20, 0x10696: 0x40440020, + 0x1069e: 0x4043d620, + 0x106a0: 0x40437e20, 0x106a1: 0x40438220, 0x106a2: 0x4043ec20, 0x106a3: 0x4043ee20, + 0x106a6: 0xe0000182, 0x106a7: 0xe0000213, + 0x106a8: 0xe000032e, 0x106a9: 0xe0000408, 0x106aa: 0xe00004dd, 0x106ab: 0xe00005a7, + 0x106ac: 0xe0000672, 0x106ad: 0xe000071a, 0x106ae: 0xe00007c6, 0x106af: 0xe000086b, + 0x106b1: 0x40439420, 0x106b2: 0x40439620, + // Block 0x41b, offset 0x106c0 + 0x106c0: 0xf0000404, 0x106c1: 0xf0000404, 0x106c2: 0xf0000404, 0x106c3: 0xf0000404, + 0x106c4: 0xf0000404, 0x106c5: 0xf0000404, 0x106c6: 0xf0000404, 0x106c7: 0xf0000404, + 0x106c8: 0xf0000404, 0x106c9: 0xf0000404, 0x106ca: 0xf0000404, 0x106cb: 0xf0000404, + 0x106cc: 0xf0000404, 0x106cd: 0xf0000404, 0x106ce: 0xe000004c, 0x106cf: 0xe0000051, + 0x106d0: 0xe0000056, 0x106d1: 0xe000005b, 0x106d2: 0xe0000060, 0x106d3: 0xe0000065, + 0x106d4: 0xe000006a, 0x106d5: 0xe000006f, 0x106d6: 0xe0000083, 0x106d7: 0xe000008d, + 0x106d8: 0xe0000092, 0x106d9: 0xe0000097, 0x106da: 0xe000009c, 0x106db: 0xe00000a1, + 0x106dc: 0xe0000088, 0x106dd: 0xe0000074, 0x106de: 0xe000007c, + 0x106e0: 0xe0002c96, 0x106e1: 0xe0002ca6, 0x106e2: 0xe0002c9e, 0x106e3: 0xe0002cd6, + 0x106e4: 0xe0002caa, 0x106e5: 0xe0002cbe, 0x106e6: 0xe0002c9a, 0x106e7: 0xe0002cba, + 0x106e8: 0xe0002ca2, 0x106e9: 0xe0002cc6, 0x106ea: 0xe0002ce6, 0x106eb: 0xe0002cfa, + 0x106ec: 0xe0002cf6, 0x106ed: 0xe0002cee, 0x106ee: 0xe0002d22, 0x106ef: 0xe0002cda, + 0x106f0: 0xe0002ce2, 0x106f1: 0xe0002cf2, 0x106f2: 0xe0002cea, 0x106f3: 0xe0002d06, + 0x106f4: 0xe0002cce, 0x106f5: 0xe0002cfe, 0x106f6: 0xe0002d1a, 0x106f7: 0xe0002d0a, + 0x106f8: 0xf0000404, 0x106f9: 0xe0002cae, 0x106fa: 0xe0002cd2, 0x106fb: 0xf0000404, + 0x106fc: 0xe0002d02, 0x106fd: 0xe0002cb2, 0x106fe: 0xe0002d1e, 0x106ff: 0xe0002cca, + // Block 0x41c, offset 0x10700 + 0x10700: 0xe0008556, 0x10701: 0xe0008b49, 0x10703: 0xe0009a4a, + 0x10707: 0xe0005e27, + 0x10708: 0xe000871e, 0x10709: 0xe0006c4c, 0x1070a: 0xe0006ca0, 0x1070b: 0xe0009fed, + 0x1070d: 0xe0006789, + 0x10711: 0xe00098b6, + 0x10714: 0xe0009245, 0x10715: 0xe0006948, 0x10716: 0xe0007018, + 0x10718: 0xe0004c4a, 0x10719: 0xe0006618, + 0x1071e: 0xe00073be, 0x1071f: 0xe0008f07, + 0x10726: 0xe000665c, + 0x1072b: 0xe00075de, + 0x1072d: 0xe0008fe1, + 0x10730: 0xe0006771, 0x10731: 0xe0004a99, 0x10732: 0xe00049e6, + 0x10738: 0xe000a5b0, 0x10739: 0xe000532a, 0x1073b: 0xe0008e8f, + // Block 0x41d, offset 0x10740 + 0x10742: 0xe0007be3, 0x10743: 0xe0005214, + 0x10745: 0xe0004c4d, + 0x1074b: 0xe0009055, + 0x1074d: 0xe0006ad3, 0x1074e: 0xe000a418, 0x1074f: 0xe0009fe1, + 0x10756: 0xe0004b72, + 0x10758: 0xe00073c2, 0x10759: 0xe00083a6, + 0x1075d: 0xe0004c50, 0x1075e: 0xe0004554, 0x1075f: 0xe0007800, + 0x10767: 0xe0005708, + 0x1076b: 0xe00042b4, + 0x1076c: 0xe0004564, 0x1076d: 0xe0005621, + 0x10773: 0xe000820f, + 0x10776: 0xe000672d, 0x10777: 0xe0006c38, + 0x1077c: 0xe0008fdd, 0x1077e: 0xe000450c, + // Block 0x41e, offset 0x10780 + 0x10782: 0xe00057ab, + 0x10786: 0xe0005b9b, + 0x10788: 0xe00079b1, 0x1078b: 0xe0006ad6, + 0x1078c: 0xe0008459, 0x1078e: 0xe0007fc6, 0x1078f: 0xe0008026, + 0x10790: 0xe00080da, 0x10791: 0xe000808a, 0x10792: 0xe000a41b, + 0x10794: 0xe0007c58, 0x10795: 0xe0008b4d, + 0x10798: 0xe0005033, 0x10799: 0xe0005043, 0x1079b: 0xe0006ad9, + 0x1079e: 0xe00075a8, 0x1079f: 0xe0004f43, + 0x107a1: 0xe0005ebb, 0x107a2: 0xe000a13f, + 0x107a4: 0xe0004bc6, 0x107a5: 0xe000a18f, 0x107a6: 0xe00079db, + 0x107a8: 0xe000a381, 0x107ab: 0xe000a20e, + 0x107ac: 0xe0004695, 0x107ad: 0xe0008b51, 0x107ae: 0xe0005891, + 0x107b3: 0xe000630c, + 0x107b4: 0xe0008029, 0x107b6: 0xe000532e, + 0x107b9: 0xe0006226, 0x107ba: 0xe00084e6, + // Block 0x41f, offset 0x107c0 + 0x107c0: 0xe0007595, 0x107c1: 0xe00084ea, + 0x107c4: 0xe000998c, 0x107c6: 0xe0006807, 0x107c7: 0xe0004c53, + 0x107ca: 0xe0004fb7, 0x107cb: 0xe0004440, + 0x107cd: 0xe00085be, + 0x107d4: 0xe00085d2, 0x107d5: 0xe0006adc, 0x107d6: 0xe0009aab, 0x107d7: 0xe0008722, + 0x107d8: 0xe000678c, 0x107d9: 0xe0006e50, + 0x107dd: 0xe0005631, 0x107de: 0xe000852a, 0x107df: 0xe00094fc, + 0x107e1: 0xe000a8d7, 0x107e3: 0xe00054be, + 0x107e4: 0xe0005a04, 0x107e5: 0xe000845c, + 0x107ee: 0xe00041b7, + 0x107f0: 0xe0007727, 0x107f2: 0xe0008fe5, 0x107f3: 0xe00069c6, + 0x107f5: 0xe0007caf, 0x107f6: 0xe0004510, 0x107f7: 0xe0004443, + 0x107fb: 0xe0008582, + 0x107ff: 0xe0006458, + // Block 0x420, offset 0x10800 + 0x10800: 0xe0008e49, 0x10801: 0xe000504b, + 0x10809: 0xe000a143, 0x1080a: 0xe000845f, 0x1080b: 0xe0004fff, + 0x1080d: 0xe0007c5b, 0x1080e: 0xe000504e, 0x1080f: 0xe00066c1, + 0x10810: 0xe0006530, 0x10811: 0xe000a851, + 0x1082f: 0xe00064d4, + 0x10830: 0xe0004877, + 0x10834: 0xe0006324, 0x10836: 0xe0005a08, + 0x10838: 0xe00074bd, 0x1083a: 0xe0006adf, + 0x1083c: 0xe0006ae2, 0x1083d: 0xe0004160, + // Block 0x421, offset 0x10840 + 0x10842: 0xe0008c25, 0x10843: 0xe0008965, + 0x10846: 0xe0005332, 0x10847: 0xe000885f, + 0x10848: 0xe0009e62, 0x10849: 0xe0004cec, 0x1084b: 0xe00070ab, + 0x1084d: 0xe000819a, 0x1084e: 0xe0008862, 0x1084f: 0xe0008e92, + 0x10850: 0xe0008e71, 0x10851: 0xe0007fc9, 0x10853: 0xe00068a8, + 0x10854: 0xe0008af9, 0x10855: 0xe0009ff0, 0x10856: 0xe0009fb1, 0x10857: 0xe0009ad5, + 0x10859: 0xe00079b4, 0x1085a: 0xe000855a, 0x1085b: 0xe00068f4, + 0x1085c: 0xe000866e, 0x1085d: 0xe0004cef, 0x1085e: 0xe0005261, 0x1085f: 0xe0009cb6, + 0x10869: 0xe0009d60, 0x1086a: 0xe000a6f4, + 0x1086f: 0xe000785d, + 0x10870: 0xe00064d8, 0x10873: 0xe0004163, + 0x10876: 0xe000517b, + 0x10878: 0xe0004ae5, 0x10879: 0xe0004e6d, 0x1087a: 0xe0008969, 0x1087b: 0xe0008d73, + 0x1087c: 0xe0004c11, 0x1087d: 0xe000926f, 0x1087e: 0xe000855e, 0x1087f: 0xe0006ae5, + // Block 0x422, offset 0x10880 + 0x10881: 0xe00074c1, 0x10883: 0xe0004228, + 0x10884: 0xe00091ad, 0x10886: 0xe000586f, + 0x10888: 0xe00099a8, 0x10889: 0xe0004a0e, 0x1088a: 0xe0004afd, 0x1088b: 0xe0005a7c, + 0x1088d: 0xe00073ee, 0x1088f: 0xe0008e95, + 0x10891: 0xe0008212, + 0x10894: 0xe000607b, 0x10896: 0xe0005c70, 0x10897: 0xe0005675, + 0x10898: 0xe0009248, 0x1089a: 0xe000733d, 0x1089b: 0xe0004976, + 0x1089c: 0xe0008f0a, 0x1089d: 0xe0008402, + 0x108ae: 0xe0006033, 0x108af: 0xe000a772, + 0x108b2: 0xe0009189, + 0x108b5: 0xe0009a56, 0x108b6: 0xe00058dd, + 0x108bb: 0xe0009b9c, + 0x108bf: 0xe0009db4, + // Block 0x423, offset 0x108c0 + 0x108c1: 0xe000802c, 0x108c2: 0xe0004799, 0x108c3: 0xe0009778, + 0x108c4: 0xe00075ab, 0x108c5: 0xe0004cf2, + 0x108c9: 0xe0007c5e, 0x108ca: 0xe0008f51, + 0x108cc: 0xe00066ac, 0x108ce: 0xe0008ce9, 0x108cf: 0xe00070ae, + 0x108d0: 0xe0005d33, 0x108d1: 0xe0007f42, 0x108d3: 0xe0004699, + 0x108d4: 0xe000a299, 0x108d7: 0xe00070f0, + 0x108d8: 0xe000680a, 0x108da: 0xe0005ce8, 0x108db: 0xe0005fcc, + 0x108dd: 0xe000667c, 0x108df: 0xe0006ae8, + 0x108e0: 0xe000a335, 0x108e1: 0xe00074c5, 0x108e3: 0xe0007cb2, + 0x108ee: 0xe000718f, 0x108ef: 0xe000678f, + 0x108f0: 0xe000a577, 0x108f1: 0xe0004c56, 0x108f3: 0xe000648f, + 0x108f4: 0xe0009548, 0x108f5: 0xe0009eeb, 0x108f6: 0xe00072b5, + 0x108f8: 0xe0006731, 0x108fa: 0xe0007967, + 0x108fe: 0xe00069c9, + // Block 0x424, offset 0x10900 + 0x10900: 0xe00093e7, 0x10902: 0xe000661c, + 0x10905: 0xe0007385, 0x10906: 0xe0005895, + 0x10909: 0xe000938f, 0x1090b: 0xe0004446, + 0x1090d: 0xe000648c, 0x1090f: 0xe00072b9, + 0x10911: 0xe0006195, 0x10912: 0xe000550c, + 0x10914: 0xe0004ddb, 0x10916: 0xe000a1f6, + 0x10918: 0xe000547a, 0x10919: 0xe000a775, 0x1091a: 0xe0008405, + 0x1091c: 0xe00094a0, 0x1091e: 0xe000469d, 0x1091f: 0xe000924b, + 0x10921: 0xe0009393, 0x10922: 0xe0009650, 0x10923: 0xe00063e8, + 0x10924: 0xe00099ab, 0x10925: 0xe00049b6, 0x10926: 0xe0004e07, 0x10927: 0xe0008e05, + 0x10928: 0xe00044b2, 0x10929: 0xe000954c, 0x1092a: 0xe0007be6, 0x1092b: 0xe0005c74, + 0x1092c: 0xe0009afc, 0x1092d: 0xe0007e65, 0x1092e: 0xe000576c, + 0x10930: 0xe0005ce0, + 0x1093b: 0xe0007803, + // Block 0x425, offset 0x10940 + 0x10943: 0xe0007927, + 0x10944: 0xe00051cc, 0x10947: 0xe0004166, + 0x10948: 0xe00045a8, 0x10949: 0xe000819d, 0x1094a: 0xe000802f, + 0x1094e: 0xe0007e83, 0x1094f: 0xe0009db8, + 0x10953: 0xe0007637, + 0x10955: 0xe000a192, 0x10956: 0xe0009272, + 0x10958: 0xe0004288, 0x1095a: 0xe0008e98, + 0x1095c: 0xe0008b55, + 0x10960: 0xe0007ef2, 0x10962: 0xe0009721, + 0x10965: 0xe0004514, + 0x1096a: 0xe0009fe9, + 0x10970: 0xe0006f44, 0x10972: 0xe0007442, + 0x10974: 0xe0009988, 0x10975: 0xe0008b59, 0x10976: 0xe0007fcc, + 0x10978: 0xe0009c9b, + // Block 0x426, offset 0x10980 + 0x10980: 0xe0004b75, + 0x10985: 0xe0006792, + 0x1098b: 0xe00043fc, + 0x1098d: 0xe00063ec, + 0x10991: 0xe0004558, 0x10992: 0xe000a400, + 0x10994: 0xe0004671, 0x10996: 0xe00093eb, + 0x10998: 0xe0006bd8, 0x10999: 0xe000694b, 0x1099a: 0xe000a75a, 0x1099b: 0xe0007f9e, + 0x1099d: 0xe0009bc8, 0x1099e: 0xe0006b87, + 0x109a2: 0xe00041ba, + 0x109ac: 0xe00097fc, 0x109ad: 0xe0007f46, 0x109ae: 0xe0008d76, + 0x109b2: 0xe0007c61, 0x109b3: 0xe000896d, + 0x109b4: 0xe0004cf5, 0x109b5: 0xe0009433, 0x109b7: 0xe0006ca4, + 0x109bd: 0xe00087ae, 0x109be: 0xe00046a1, 0x109bf: 0xe000793f, + // Block 0x427, offset 0x109c0 + 0x109c2: 0xe0005c12, + 0x109c4: 0xe0009f15, 0x109c5: 0xe0004f53, + 0x109c9: 0xe00095e0, 0x109ca: 0xe0006e54, + 0x109cf: 0xe0006ca8, + 0x109d1: 0xe0004bc9, + 0x109d5: 0xe00066c5, 0x109d6: 0xe000a91f, + 0x109da: 0xe0005b9e, 0x109db: 0xe000510b, + 0x109de: 0xe00081a0, + 0x109e2: 0xe0009550, + 0x109e5: 0xe0007e9e, 0x109e6: 0xe0009862, 0x109e7: 0xe00073c6, + 0x109e9: 0xe000a093, + 0x109ec: 0xe0009724, 0x109ed: 0xe0009327, 0x109ee: 0xe0005679, + 0x109f5: 0xe0004400, + 0x109f9: 0xe0004169, 0x109fb: 0xe0006580, + 0x109fe: 0xe0007778, 0x109ff: 0xe0006aeb, + // Block 0x428, offset 0x10a00 + 0x10a00: 0xe0008408, 0x10a01: 0xe0008f55, 0x10a02: 0xe00052a1, 0x10a03: 0xe0009554, + 0x10a04: 0xe000790f, 0x10a06: 0xe00046a5, 0x10a07: 0xe000a2e9, + 0x10a09: 0xe0004570, 0x10a0b: 0xe000540a, + 0x10a10: 0xe0006a7f, 0x10a12: 0xe0008215, 0x10a13: 0xe00054ee, + 0x10a14: 0xe0008f0d, 0x10a15: 0xe0008cb6, 0x10a17: 0xe000843b, + 0x10a18: 0xe000918d, 0x10a1a: 0xe0005f80, 0x10a1b: 0xe000617a, + 0x10a1c: 0xe0005265, 0x10a1f: 0xe0006cac, + 0x10a21: 0xe0005b62, 0x10a22: 0xe0005913, + 0x10a24: 0xe0009eb3, 0x10a25: 0xe0008306, 0x10a27: 0xe00092eb, + 0x10a2a: 0xe0007fcf, 0x10a2b: 0xe000a493, + 0x10a31: 0xe0005b46, 0x10a32: 0xe0008865, 0x10a33: 0xe000934f, + 0x10a35: 0xe00072bd, 0x10a37: 0xe00058e0, + 0x10a39: 0xe00092ef, 0x10a3a: 0xe000519b, 0x10a3b: 0xe000547e, + 0x10a3c: 0xe000796b, + // Block 0x429, offset 0x10a40 + 0x10a40: 0xe0007d52, 0x10a41: 0xe000830a, 0x10a43: 0xe00080e6, + 0x10a44: 0xe000a385, 0x10a45: 0xe0009916, 0x10a46: 0xe0008cec, 0x10a47: 0xe000a87f, + 0x10a48: 0xe0006e58, 0x10a49: 0xe0004b01, 0x10a4b: 0xe0004f27, + 0x10a4c: 0xe0009bf4, 0x10a4d: 0xe0005fa0, 0x10a4e: 0xe0009c4a, + 0x10a52: 0xe00075ae, + 0x10a55: 0xe0007445, 0x10a57: 0xe0007a83, + 0x10a5a: 0xe0005482, + 0x10a5c: 0xe00056b5, + 0x10a62: 0xe0005037, + 0x10a65: 0xe00085b2, 0x10a67: 0xe0005217, + 0x10a68: 0xe0008971, 0x10a69: 0xe0005899, 0x10a6a: 0xe0008218, 0x10a6b: 0xe0009d4c, + 0x10a6c: 0xe000497a, 0x10a6d: 0xe0005c60, 0x10a6e: 0xe000a3e5, + 0x10a71: 0xe000497e, + 0x10a75: 0xe0006620, 0x10a76: 0xe0005051, 0x10a77: 0xe0004c59, + 0x10a78: 0xe0008975, + 0x10a7c: 0xe0004659, + // Block 0x42a, offset 0x10a80 + 0x10a80: 0xe0005054, + 0x10a86: 0xe00079ad, + 0x10a89: 0xe0007afb, 0x10a8a: 0xe000945d, + 0x10a8d: 0xe00087fa, 0x10a8f: 0xe0004749, + 0x10a92: 0xe0006036, 0x10a93: 0xe0004cf8, + 0x10a95: 0xe0005fa4, 0x10a97: 0xe0007f4a, + 0x10a98: 0xe0008299, + 0x10aa0: 0xe0004a59, 0x10aa3: 0xe000997f, + 0x10aa4: 0xe000814e, 0x10aa5: 0xe0005ff0, + 0x10aaa: 0xe0005f90, + 0x10aac: 0xe0005635, + 0x10ab0: 0xe0006ac3, 0x10ab1: 0xe000a496, 0x10ab2: 0xe000992e, + 0x10ab6: 0xe0007806, 0x10ab7: 0xe0005881, + 0x10abd: 0xe00059b4, + // Block 0x42b, offset 0x10ac0 + 0x10ac4: 0xe0009485, 0x10ac5: 0xe000487a, 0x10ac6: 0xe0008f59, + 0x10ac9: 0xe000589d, 0x10aca: 0xe0009684, 0x10acb: 0xe0008cef, + 0x10acc: 0xe0005cc8, 0x10acd: 0xe0005639, + 0x10ad2: 0xe000843e, + 0x10ad4: 0xe00093ef, + 0x10adb: 0xe0005cbc, + 0x10adc: 0xe0005cb8, 0x10add: 0xe00083f2, 0x10ade: 0xe000a922, + 0x10ae0: 0xe0004e70, 0x10ae1: 0xe0006548, + 0x10ae9: 0xe00060c4, + 0x10aed: 0xe0006ac7, + 0x10af0: 0xe000a63c, 0x10af1: 0xe0004449, 0x10af3: 0xe0005734, + 0x10af4: 0xe0006acb, 0x10af6: 0xe000a883, + 0x10af8: 0xe0009590, 0x10af9: 0xe0007ea1, 0x10afa: 0xe0009906, + 0x10afd: 0xe000a0c3, + // Block 0x42c, offset 0x10b00 + 0x10b00: 0xe000550f, 0x10b01: 0xe0008d79, 0x10b03: 0xe00084ee, + 0x10b06: 0xe000685c, 0x10b07: 0xe0008aa9, + 0x10b08: 0xe0007be9, 0x10b0a: 0xe000422c, + 0x10b0e: 0xe0006199, + 0x10b11: 0xe000a389, 0x10b13: 0xe0007e21, + 0x10b16: 0xe0008192, 0x10b17: 0xe00059b8, + 0x10b1d: 0xe00096d0, + 0x10b24: 0xe0009d24, 0x10b25: 0xe0006600, 0x10b26: 0xe00045a0, 0x10b27: 0xe00045a4, + 0x10b29: 0xe0005ceb, 0x10b2a: 0xe0006bdc, + 0x10b2e: 0xe0004ad5, + 0x10b30: 0xe0005512, 0x10b31: 0xe00093f3, 0x10b32: 0xe0004ed0, 0x10b33: 0xe000487d, + 0x10b36: 0xe0008c71, 0x10b37: 0xe0007174, + 0x10b38: 0xe0004e0b, 0x10b39: 0xe000930b, 0x10b3a: 0xe00085d5, 0x10b3b: 0xe00041e4, + // Block 0x42d, offset 0x10b40 + 0x10b43: 0xe0009694, + 0x10b44: 0xe000474d, 0x10b47: 0xe0009a26, + 0x10b49: 0xe0008e80, 0x10b4a: 0xe0006bc0, 0x10b4b: 0xe0004f2b, + 0x10b4c: 0xe00057e7, 0x10b4d: 0xe0008979, + 0x10b54: 0xe00094a4, 0x10b55: 0xe00069cc, 0x10b56: 0xe0006795, 0x10b57: 0xe00086d6, + 0x10b5a: 0xe0006b8a, 0x10b5b: 0xe000439c, + 0x10b5d: 0xe00062c0, 0x10b5e: 0xe000510e, 0x10b5f: 0xe00095b8, + 0x10b61: 0xe0006f64, + 0x10b69: 0xe00085c2, 0x10b6a: 0xe000897d, + 0x10b6f: 0xe0006798, + 0x10b72: 0xe000a0b7, + 0x10b74: 0xe0004479, 0x10b75: 0xe0009397, 0x10b77: 0xe0006c08, + 0x10b7a: 0xe0005d36, + 0x10b7d: 0xe0009eee, 0x10b7f: 0xe00096d3, + // Block 0x42e, offset 0x10b80 + 0x10b82: 0xe0004e73, 0x10b83: 0xe000a70f, + 0x10b87: 0xe0004f2f, + 0x10b88: 0xe0006584, 0x10b89: 0xe0005c27, + 0x10b8d: 0xe0004574, + 0x10b91: 0xe0008c74, 0x10b92: 0xe0004578, 0x10b93: 0xe0008441, + 0x10b97: 0xe00092f3, + 0x10b98: 0xe0005df5, 0x10b9b: 0xe0005934, + 0x10b9f: 0xe0004982, + 0x10ba0: 0xe000416c, 0x10ba3: 0xe00059bc, + 0x10ba4: 0xe0004f57, + 0x10ba9: 0xe0008cf2, 0x10baa: 0xe0005271, 0x10bab: 0xe0004594, + 0x10bac: 0xe0004cfb, 0x10bad: 0xe0009727, + 0x10bbe: 0xe000a1e6, + // Block 0x42f, offset 0x10bc0 + 0x10bc1: 0xe00046a9, 0x10bc3: 0xe00063a8, + 0x10bc5: 0xe0009a2a, 0x10bc7: 0xe0007f4e, + 0x10bc9: 0xe0005fa8, + 0x10bcc: 0xe0004e2f, 0x10bcd: 0xe00046ad, + 0x10bd2: 0xe0005cac, + 0x10bd5: 0xe000563d, 0x10bd6: 0xe0008062, + 0x10bd8: 0xe00042f4, 0x10bd9: 0xe0006138, 0x10bdb: 0xe000a7ba, + 0x10bdd: 0xe00073ca, 0x10bde: 0xe0005a91, 0x10bdf: 0xe0006039, + 0x10be0: 0xe0005c6c, 0x10be1: 0xe0009f18, 0x10be2: 0xe000701b, 0x10be3: 0xe00088e9, + 0x10be4: 0xe0004f5b, 0x10be6: 0xe000972a, + 0x10bf3: 0xe000a7be, + 0x10bf5: 0xe00058e3, + 0x10bf8: 0xe0004e0f, 0x10bfa: 0xe0008672, 0x10bfb: 0xe0004f03, + 0x10bfe: 0xe0004c5c, 0x10bff: 0xe00061e1, + // Block 0x430, offset 0x10c00 + 0x10c01: 0xe00061c5, 0x10c02: 0xe0005223, 0x10c03: 0xe000447c, + 0x10c05: 0xe0009e65, + 0x10c08: 0xe000a887, 0x10c0a: 0xe0004d97, + 0x10c0c: 0xe000a123, 0x10c0d: 0xe0009e68, 0x10c0f: 0xe0009e6b, + 0x10c10: 0xe00066c9, + 0x10c15: 0xe000694e, 0x10c16: 0xe000a54d, 0x10c17: 0xe0006858, + 0x10c19: 0xe00073f1, + 0x10c20: 0xe0008726, 0x10c21: 0xe0004b05, 0x10c23: 0xe0004380, + 0x10c27: 0xe000a365, + 0x10c2a: 0xe0006951, + 0x10c2f: 0xe000a6b8, + 0x10c31: 0xe0004e76, + 0x10c36: 0xe0004cfe, + 0x10c39: 0xe0009f89, + 0x10c3d: 0xe0007943, 0x10c3e: 0xe0009ddc, 0x10c3f: 0xe0005311, + // Block 0x431, offset 0x10c40 + 0x10c40: 0xe0004c5f, 0x10c41: 0xe0007599, 0x10c43: 0xe0009500, + 0x10c44: 0xe00085b6, 0x10c45: 0xe0006c84, 0x10c47: 0xe00073ce, + 0x10c48: 0xe0007c64, 0x10c49: 0xe000a81e, 0x10c4a: 0xe0006328, + 0x10c4d: 0xe0005e2b, + 0x10c51: 0xe0006954, 0x10c52: 0xe0008df9, 0x10c53: 0xe0009b00, + 0x10c54: 0xe000a339, 0x10c57: 0xe00051e4, + 0x10c5a: 0xe00062c4, + 0x10c5c: 0xe00066cd, 0x10c5e: 0xe00065c4, + 0x10c60: 0xe0008ad5, 0x10c61: 0xe000870a, + 0x10c66: 0xe0004b5d, + 0x10c68: 0xe0006f10, + 0x10c6c: 0xe0007743, 0x10c6e: 0xe00099f0, 0x10c6f: 0xe0006108, + 0x10c70: 0xe00084f2, 0x10c71: 0xe00081a3, 0x10c72: 0xe00070b1, 0x10c73: 0xe0008ff9, + 0x10c74: 0xe00041e8, 0x10c75: 0xe00057af, 0x10c77: 0xe0004e13, + 0x10c78: 0xe0006b8d, 0x10c79: 0xe000a87b, 0x10c7a: 0xe0004f8f, 0x10c7b: 0xe0004210, + 0x10c7d: 0xe0008ff5, 0x10c7e: 0xe000763b, 0x10c7f: 0xe00046b1, + // Block 0x432, offset 0x10c80 + 0x10c84: 0xe00077b4, + 0x10c93: 0xe0007757, + 0x10c96: 0xe000645c, + 0x10c98: 0xe0005cee, 0x10c9a: 0xe000a778, + 0x10c9d: 0xe0008d7c, 0x10c9f: 0xe00080ea, + 0x10ca0: 0xe0009990, + 0x10ca5: 0xe0004e47, 0x10ca6: 0xe0009ff3, + 0x10caa: 0xe0004f93, + 0x10cad: 0xe0007ad3, 0x10cae: 0xe0007448, + 0x10cb2: 0xe0005916, + 0x10cb9: 0xe0004d01, 0x10cbb: 0xe00044b5, + // Block 0x433, offset 0x10cc0 + 0x10cc3: 0xe000932b, + 0x10cc5: 0xe0009353, + 0x10cc8: 0xe0007fd2, 0x10cc9: 0xe000924e, 0x10cca: 0xe0005003, 0x10ccb: 0xe0007fd5, + 0x10ccd: 0xe000632c, + 0x10cd4: 0xe0007285, 0x10cd6: 0xe0009955, 0x10cd7: 0xe0007192, + 0x10cdb: 0xe0006330, + 0x10cdf: 0xe0007246, + 0x10ce1: 0xe0007bec, 0x10ce2: 0xe00097bc, 0x10ce3: 0xe0004c62, + 0x10ce4: 0xe0004805, 0x10ce5: 0xe0004c65, 0x10ce6: 0xe0005a48, + 0x10ce8: 0xe0005584, 0x10ce9: 0xe0004808, 0x10cea: 0xe0009058, 0x10ceb: 0xe0004ea3, + 0x10cec: 0xe000703c, 0x10ced: 0xe0009d50, 0x10cee: 0xe0008c29, 0x10cef: 0xe000416f, + 0x10cf0: 0xe0009bf7, 0x10cf1: 0xe00091b1, 0x10cf2: 0xe0006aee, 0x10cf3: 0xe0007fd8, + 0x10cf4: 0xe0004d04, 0x10cf5: 0xe0009cfa, 0x10cf6: 0xe000a369, + 0x10cf8: 0xe0006af1, + // Block 0x434, offset 0x10d00 + 0x10d01: 0xe0008032, 0x10d03: 0xe000a8c7, + 0x10d04: 0xe00041ec, + 0x10d08: 0xe000a107, 0x10d09: 0xe000517f, 0x10d0a: 0xe00088ed, 0x10d0b: 0xe00097b8, + 0x10d0c: 0xe0005641, 0x10d0d: 0xe0005ff4, 0x10d0e: 0xe000a77b, 0x10d0f: 0xe0005cf1, + 0x10d10: 0xe0009c4d, 0x10d11: 0xe000a212, + 0x10d1b: 0xe0004da7, + 0x10d1d: 0xe0005d5d, 0x10d1f: 0xe00083ae, + 0x10d20: 0xe0009e38, + 0x10d26: 0xe000679b, + 0x10d29: 0xe0006860, 0x10d2b: 0xe000a0c7, + 0x10d2c: 0xe0008372, 0x10d2e: 0xe0008a09, + 0x10d33: 0xe0007c6a, + 0x10d36: 0xe00052dd, + 0x10d38: 0xe000a8fb, 0x10d39: 0xe0009958, 0x10d3b: 0xe000619d, + 0x10d3c: 0xe000a77e, 0x10d3d: 0xe000a799, 0x10d3e: 0xe0007c67, + // Block 0x435, offset 0x10d40 + 0x10d40: 0xe000a017, 0x10d42: 0xe00058e6, + 0x10d46: 0xe0005f2d, + 0x10d48: 0xe0008b5d, 0x10d4a: 0xe000480b, + 0x10d4e: 0xe00094d8, + 0x10d51: 0xe0009b58, + 0x10d5d: 0xe00077d0, + 0x10d62: 0xe00052ff, + 0x10d64: 0xe0005a4c, 0x10d66: 0xe000829c, + 0x10d68: 0xe0008ea4, 0x10d6a: 0xe0008ea1, 0x10d6b: 0xe0009654, + 0x10d70: 0xe0008620, 0x10d71: 0xe000480e, 0x10d73: 0xe00061ed, + 0x10d75: 0xe0004172, 0x10d76: 0xe0005283, + 0x10d7b: 0xe00074c9, + 0x10d7c: 0xe000a41e, 0x10d7d: 0xe0005ff8, 0x10d7f: 0xe00044e2, + // Block 0x436, offset 0x10d80 + 0x10d80: 0xe0008868, + 0x10d84: 0xe0005629, 0x10d86: 0xe0009e6e, 0x10d87: 0xe0009fb5, + 0x10d8b: 0xe0006b90, + 0x10d8c: 0xe000a550, 0x10d8d: 0xe000a1c5, 0x10d8e: 0xe0004c68, 0x10d8f: 0xe0007bb3, + 0x10d90: 0xe000679e, + 0x10d96: 0xe00041bd, + 0x10da0: 0xe0009221, 0x10da2: 0xe000763f, + 0x10da4: 0xe0009aae, 0x10da5: 0xe000a95b, + 0x10da8: 0xe00085d8, 0x10dab: 0xe000905b, + 0x10dac: 0xe0004bcc, 0x10daf: 0xe0004214, + 0x10db3: 0xe000a195, + 0x10db8: 0xe000a0cb, 0x10dbb: 0xe000a860, + 0x10dbc: 0xe0004b66, 0x10dbd: 0xe00084f6, 0x10dbf: 0xe00084a1, + // Block 0x437, offset 0x10dc0 + 0x10dc0: 0xe000775a, 0x10dc1: 0xe0009f3c, 0x10dc2: 0xe0007519, 0x10dc3: 0xe000567d, + 0x10dc4: 0xe000a511, 0x10dc6: 0xe00099f3, 0x10dc7: 0xe0007dbe, + 0x10dc8: 0xe000a10b, 0x10dc9: 0xe00087fd, + 0x10de1: 0xe00080ee, + 0x10de5: 0xe0004175, 0x10de6: 0xe00075e1, + 0x10de8: 0xe00096d6, 0x10de9: 0xe0005d39, + 0x10ded: 0xe00048ce, 0x10dee: 0xe000a733, + 0x10df1: 0xe00063d4, 0x10df2: 0xe0009594, + 0x10dfa: 0xe0009e71, + 0x10dfd: 0xe0004751, 0x10dff: 0xe00041c0, + // Block 0x438, offset 0x10e00 + 0x10e04: 0xe0009d63, 0x10e06: 0xe0006af4, 0x10e07: 0xe00090fd, + 0x10e09: 0xe000777b, + 0x10e0e: 0xe0005cf4, 0x10e0f: 0xe000a95e, + 0x10e10: 0xe000544e, + 0x10e14: 0xe0007cb5, + 0x10e1c: 0xe0005e97, + 0x10e2b: 0xe0004feb, + 0x10e2e: 0xe0007249, 0x10e2f: 0xe000821b, + 0x10e31: 0xe000939b, 0x10e33: 0xe0005919, + 0x10e35: 0xe00076cb, + 0x10e3c: 0xe0006c88, 0x10e3e: 0xe0009ab1, + // Block 0x439, offset 0x10e40 + 0x10e40: 0xe000777e, 0x10e42: 0xe00052cf, + 0x10e44: 0xe0009b04, 0x10e46: 0xe0006cb0, + 0x10e4f: 0xe00061a1, + 0x10e53: 0xe000479c, + 0x10e56: 0xe00053c6, 0x10e57: 0xe000540e, + 0x10e5c: 0xe00095bc, 0x10e5e: 0xe00075b1, + 0x10e63: 0xe000a0cf, + 0x10e7b: 0xe000744b, + 0x10e7c: 0xe0008c77, 0x10e7d: 0xe00076eb, 0x10e7e: 0xe0009865, + // Block 0x43a, offset 0x10e80 + 0x10e80: 0xe000448e, 0x10e81: 0xe0007d82, 0x10e83: 0xe00051f8, + 0x10e84: 0xe0006e5c, 0x10e86: 0xe0009598, 0x10e87: 0xe0005754, + 0x10e89: 0xe000a781, 0x10e8a: 0xe000a0d3, 0x10e8b: 0xe0009658, + 0x10e91: 0xe00083c6, 0x10e93: 0xe0007ef5, + 0x10e94: 0xe0007643, + 0x10e98: 0xe0009504, 0x10e99: 0xe000a821, 0x10e9a: 0xe000a5b4, + 0x10e9c: 0xe000a925, 0x10e9d: 0xe00042b8, 0x10e9e: 0xe0008ffd, 0x10e9f: 0xe00081e5, + 0x10ea3: 0xe000a79c, + 0x10ea4: 0xe000a69c, 0x10ea7: 0xe000a802, + 0x10ea8: 0xe00058c5, 0x10ea9: 0xe000821e, 0x10eaa: 0xe0006cb4, 0x10eab: 0xe0005197, + 0x10eac: 0xe0004bcf, 0x10eae: 0xe0005336, + 0x10eb0: 0xe00074b1, + // Block 0x43b, offset 0x10ec0 + 0x10ec5: 0xe000a784, 0x10ec7: 0xe0006d4c, + 0x10ec9: 0xe00070b4, + 0x10ed1: 0xe000a127, + 0x10ed4: 0xe0009101, + 0x10eda: 0xe0007c6d, 0x10edb: 0xe0004675, + 0x10edc: 0xe0005057, 0x10edf: 0xe0009251, + 0x10ee0: 0xe00057a3, 0x10ee2: 0xe0007d56, 0x10ee3: 0xe0006af7, + 0x10ee4: 0xe00099ae, + 0x10ef7: 0xe0007cb8, + 0x10efd: 0xe0007195, 0x10efe: 0xe0008ea7, 0x10eff: 0xe0009bb0, + // Block 0x43c, offset 0x10f00 + 0x10f04: 0xe0004c14, 0x10f06: 0xe0009b5c, + 0x10f08: 0xe0008d7f, 0x10f09: 0xe0004178, + 0x10f0c: 0xe0009f1b, 0x10f0d: 0xe0005c15, 0x10f0e: 0xe00076ab, + 0x10f10: 0xe0004c17, 0x10f12: 0xe000a403, + 0x10f14: 0xe0004c6b, 0x10f16: 0xe000946d, 0x10f17: 0xe0006cb8, + 0x10f29: 0xe000a57a, + 0x10f2c: 0xe0009805, 0x10f2f: 0xe000703f, + 0x10f32: 0xe0008cf5, + 0x10f34: 0xe000995b, 0x10f36: 0xe00073f4, 0x10f37: 0xe000a499, + 0x10f38: 0xe000617d, 0x10f39: 0xe0005bbf, 0x10f3b: 0xe000a961, + 0x10f3f: 0xe0006191, + // Block 0x43d, offset 0x10f40 + 0x10f41: 0xe0007cbb, 0x10f42: 0xe0008f9d, + 0x10f49: 0xe0005412, 0x10f4b: 0xe0009c56, + 0x10f4d: 0xe000972d, 0x10f4e: 0xe0007acf, 0x10f4f: 0xe000a90b, + 0x10f53: 0xe000a236, + 0x10f64: 0xe0004fef, 0x10f65: 0xe00052a5, + 0x10f68: 0xe000505a, 0x10f69: 0xe0007647, 0x10f6a: 0xe0008d82, 0x10f6b: 0xe000a928, + 0x10f6c: 0xe0006dda, 0x10f6d: 0xe0004c1a, 0x10f6f: 0xe0007781, + 0x10f72: 0xe0009aa5, + 0x10f74: 0xe0006864, 0x10f76: 0xe00042dc, + 0x10f78: 0xe0009c5a, 0x10f7a: 0xe000751d, + // Block 0x43e, offset 0x10f80 + 0x10f80: 0xe0005269, + 0x10f84: 0xe000a717, 0x10f86: 0xe000a736, 0x10f87: 0xe000a01a, + 0x10f8f: 0xe00096af, + 0x10f99: 0xe0004c1d, 0x10f9a: 0xe0008376, + 0x10fa5: 0xe0007a0f, + 0x10fac: 0xe0006a47, 0x10fae: 0xe000a216, + 0x10fb3: 0xe00048ea, + 0x10fb4: 0xe000796f, 0x10fb6: 0xe00077f0, + 0x10fbc: 0xe0008676, + // Block 0x43f, offset 0x10fc0 + 0x10fc0: 0xe0008a0d, 0x10fc1: 0xe0006fac, 0x10fc2: 0xe000a75d, 0x10fc3: 0xe000870e, + 0x10fc8: 0xe0007c1f, 0x10fc9: 0xe000576f, 0x10fca: 0xe0005208, + 0x10fcd: 0xe000a92b, + 0x10fd1: 0xe000977c, + 0x10fda: 0xe0007198, 0x10fdb: 0xe0006afa, + 0x10fde: 0xe000a6bb, 0x10fdf: 0xe0007521, + 0x10fe0: 0xe00084fa, + 0x10fe6: 0xe0007a87, + 0x10feb: 0xe000a50d, + 0x10fee: 0xe0007dc1, + 0x10ff0: 0xe00048fe, + 0x10ff7: 0xe0004f1b, + 0x10ff9: 0xe0005a0c, 0x10ffa: 0xe0004811, + 0x10fff: 0xe000829f, + // Block 0x440, offset 0x11000 + 0x11001: 0xe000837a, 0x11002: 0xe000a4ed, 0x11003: 0xe0009e74, + 0x11004: 0xe00078e5, + 0x11008: 0xe0004e17, 0x11009: 0xe0007903, 0x1100a: 0xe0009688, 0x1100b: 0xe0004d7f, + 0x1100d: 0xe00081a6, + 0x11012: 0xe00080f6, 0x11013: 0xe00080f2, + 0x11016: 0xe0005515, + 0x11018: 0xe000533a, + 0x1101c: 0xe0008152, 0x1101f: 0xe0009c50, + 0x11025: 0xe0005b0a, + 0x11028: 0xe0008800, + 0x1102c: 0xe0007cbe, 0x1102d: 0xe0004ea6, 0x1102e: 0xe00069cf, + 0x11030: 0xe000905e, + 0x1103b: 0xe000505d, + 0x1103e: 0xe000501b, + // Block 0x441, offset 0x11040 + 0x11040: 0xe0009061, 0x11042: 0xe0009d28, + 0x11047: 0xe0004f07, + 0x1104a: 0xe00063f0, + 0x1104c: 0xe00068ac, 0x1104d: 0xe00053ca, 0x1104e: 0xe00042f8, 0x1104f: 0xe00064c5, + 0x11050: 0xe0008e74, 0x11051: 0xe0004496, + 0x11061: 0xe0009cca, + 0x11064: 0xe0004902, 0x11066: 0xe0009b60, 0x11067: 0xe00094dc, + 0x11068: 0xe00084a4, 0x11069: 0xe0004344, 0x1106a: 0xe0009e0c, + 0x1106e: 0xe00054c4, 0x1106f: 0xe00064c8, + 0x11070: 0xe00046b5, 0x11071: 0xe0007747, 0x11073: 0xe0007ef8, + 0x11075: 0xe0004c6e, 0x11077: 0xe00041c3, + 0x11078: 0xe0004d07, 0x1107b: 0xe00090b8, + 0x1107c: 0xe0009b08, + // Block 0x442, offset 0x11080 + 0x11082: 0xe000719b, + 0x11088: 0xe00054c1, 0x1108b: 0xe000a38d, + 0x1108c: 0xe0005681, + 0x11093: 0xe000a198, + 0x11095: 0xe000a79f, + 0x1109e: 0xe0009ad8, + 0x110a0: 0xe0008356, 0x110a2: 0xe0004c71, 0x110a3: 0xe00080fa, + 0x110a4: 0xe00091e9, + 0x110b8: 0xe0007e25, + 0x110bd: 0xe000837e, + // Block 0x443, offset 0x110c0 + 0x110c3: 0xe000775d, + 0x110c6: 0xe0004218, 0x110c7: 0xe0007f52, + 0x110c8: 0xe0008f5d, 0x110c9: 0xe000a36d, 0x110cb: 0xe0005f03, + 0x110ce: 0xe0006fc8, 0x110cf: 0xe0007a8b, + 0x110d1: 0xe00095c0, 0x110d2: 0xe00057ef, + 0x110dc: 0xe000781e, 0x110df: 0xe00079df, + 0x110e0: 0xe00067a1, + 0x110e4: 0xe00069d2, + 0x110ed: 0xe0009c1e, + 0x110f0: 0xe0009436, 0x110f3: 0xe0004348, + 0x110f4: 0xe0007475, 0x110f7: 0xe0009209, + 0x110f9: 0xe0006492, 0x110fa: 0xe0005060, 0x110fb: 0xe0008fa1, + 0x110fc: 0xe0005063, 0x110fd: 0xe00070b7, + // Block 0x444, offset 0x11100 + 0x11100: 0xe0004dcb, 0x11102: 0xe0005452, 0x11103: 0xe0004926, + 0x11105: 0xe00045e5, 0x11106: 0xe0009c86, + 0x11108: 0xe00043a0, 0x11109: 0xe00082f6, 0x1110a: 0xe00075ff, 0x1110b: 0xe000693c, + 0x11117: 0xe000562d, + 0x11119: 0xe000852e, + 0x1111d: 0xe0004a11, 0x1111e: 0xe0009628, + 0x11120: 0xe000a7a2, 0x11121: 0xe000667f, 0x11123: 0xe0008035, + 0x11124: 0xe0008c7a, 0x11126: 0xe00047e1, 0x11127: 0xe0007a13, + 0x1112a: 0xe00042fc, + 0x1112f: 0xe0007ea4, + 0x11130: 0xe000792b, 0x11131: 0xe0006682, + 0x11134: 0xe000872a, 0x11135: 0xe0005518, + 0x1113a: 0xe000479f, + // Block 0x445, offset 0x11140 + 0x11140: 0xe0006660, + 0x11149: 0xe00094e0, 0x1114a: 0xe0004b78, 0x1114b: 0xe0007b47, + 0x1114c: 0xe0009bcc, 0x1114d: 0xe00073e6, 0x1114f: 0xe000444c, + 0x11150: 0xe00070ba, 0x11151: 0xe0007042, 0x11152: 0xe000744e, + 0x11154: 0xe0009bbc, 0x11157: 0xe000551b, + 0x11158: 0xe0005456, 0x11159: 0xe0004880, 0x1115a: 0xe00097c0, + 0x1115e: 0xe0006d40, + 0x11161: 0xe0008981, 0x11162: 0xe0007c70, + 0x11164: 0xe000a7c2, + 0x11169: 0xe0007aff, + 0x11175: 0xe0009105, + 0x11179: 0xe000932f, + 0x1117c: 0xe0008985, 0x1117d: 0xe0006d1c, 0x1117e: 0xe0007289, + // Block 0x446, offset 0x11180 + 0x11180: 0xe00090bb, 0x11181: 0xe0005e73, 0x11183: 0xe00046b9, + 0x11185: 0xe0006d80, + 0x11189: 0xe0007f56, 0x1118a: 0xe0008afd, + 0x1118d: 0xe0005111, + 0x11190: 0xe0004f97, 0x11193: 0xe000610b, + 0x1119c: 0xe000981d, 0x1119d: 0xe0007efb, 0x1119e: 0xe000901d, 0x1119f: 0xe000a239, + 0x111a1: 0xe0006ed0, 0x111a3: 0xe0006705, + 0x111a8: 0xe0006189, 0x111a9: 0xe00055ed, 0x111ab: 0xe0008fa5, + 0x111ae: 0xe0009ab4, + 0x111b0: 0xe0005416, 0x111b1: 0xe0005738, 0x111b3: 0xe0006868, + 0x111ba: 0xe0007c73, 0x111bb: 0xe000872e, + 0x111be: 0xe0004230, + // Block 0x447, offset 0x111c0 + 0x111c1: 0xe0006588, 0x111c3: 0xe0004404, + 0x111c5: 0xe0007d5e, 0x111c7: 0xe000533e, + 0x111ce: 0xe000a7c6, + 0x111d1: 0xe000a02f, 0x111d3: 0xe0007717, + 0x111d4: 0xe0005587, 0x111d5: 0xe000a421, + 0x111d8: 0xe0005beb, 0x111d9: 0xe0004b09, 0x111da: 0xe0005ac4, + 0x111dc: 0xe000541a, 0x111dd: 0xe00082a2, 0x111de: 0xe0004b7b, 0x111df: 0xe0005b2a, + 0x111e4: 0xe0007861, + 0x111eb: 0xe0006afd, + 0x111ec: 0xe0008586, 0x111ef: 0xe0008732, + 0x111f9: 0xe0008562, 0x111fa: 0xe000a424, 0x111fb: 0xe0006d83, + 0x111fd: 0xe000719e, + // Block 0x448, offset 0x11200 + 0x11206: 0xe0006775, + 0x11208: 0xe000882d, + 0x1120f: 0xe0009ff6, + 0x11210: 0xe000a3d1, + 0x11214: 0xe0005066, 0x11215: 0xe0006df8, 0x11216: 0xe0007e74, + 0x11219: 0xe000728d, 0x1121a: 0xe0005321, + 0x1121c: 0xe0007809, + 0x11222: 0xe00060d4, + 0x11224: 0xe0008532, 0x11225: 0xe0004a14, 0x11227: 0xe00054c7, + 0x11229: 0xe0009508, 0x1122a: 0xe0009bfa, 0x1122b: 0xe00067a4, + 0x1122c: 0xe0009aa8, 0x1122d: 0xe0007ea7, 0x1122e: 0xe000772b, 0x1122f: 0xe000a17b, + 0x11231: 0xe0007541, + 0x11237: 0xe0008462, + 0x11238: 0xe0004a17, + 0x1123e: 0xe000a33d, + // Block 0x449, offset 0x11240 + 0x11244: 0xe0007973, 0x11247: 0xe0005069, + 0x11248: 0xe000521a, 0x11249: 0xe0006735, + 0x1124e: 0xe0004ea9, 0x1124f: 0xe0008eaa, + 0x11250: 0xe000a5b8, 0x11251: 0xe00047a2, 0x11253: 0xe0009275, + 0x11254: 0xe000686c, 0x11255: 0xe000a279, 0x11257: 0xe0009c9e, + 0x11258: 0xe00087b2, 0x1125a: 0xe000a19b, + 0x11260: 0xe0008989, 0x11262: 0xe0006b00, + 0x11267: 0xe0007c76, + 0x11269: 0xe00059ec, 0x1126a: 0xe0009b94, 0x1126b: 0xe000830e, + 0x1126c: 0xe0008736, 0x1126d: 0xe0006dfc, 0x1126e: 0xe0006870, + 0x11273: 0xe0005232, + 0x11274: 0xe0005274, 0x11276: 0xe0005226, + 0x11278: 0xe0004234, + 0x1127d: 0xe000a427, + // Block 0x44a, offset 0x11280 + 0x11282: 0xe00079b7, 0x11283: 0xe0006957, + 0x11284: 0xe0005ebf, + 0x1128a: 0xe000858a, + 0x11291: 0xe0009cfd, 0x11292: 0xe0009cad, 0x11293: 0xe000506c, + 0x11296: 0xe0007eaa, 0x11297: 0xe0004fbb, + 0x11299: 0xe000610e, + 0x1129d: 0xe00087b6, + 0x112a3: 0xe00069d5, + 0x112a5: 0xe0009ab7, 0x112a7: 0xe0007e29, + 0x112a8: 0xe00063f4, + 0x112ac: 0xe0009ca1, 0x112af: 0xe00098e6, + 0x112b2: 0xe00053b2, + 0x112b9: 0xe0005f06, 0x112bb: 0xe0009488, + 0x112be: 0xe000962c, + // Block 0x44b, offset 0x112c0 + 0x112c3: 0xe0008b61, + 0x112c6: 0xe000603c, + 0x112c8: 0xe0005a50, 0x112c9: 0xe00085db, 0x112cb: 0xe00073f7, + 0x112cd: 0xe0006c0c, + 0x112d0: 0xe000886b, 0x112d1: 0xe0004814, 0x112d2: 0xe0006b93, 0x112d3: 0xe0006fcc, + 0x112d4: 0xe00081a9, + 0x112d9: 0xe000858e, 0x112da: 0xe0007ead, + 0x112dc: 0xe00043a4, 0x112dd: 0xe0008e9b, 0x112de: 0xe000518b, + 0x112e3: 0xe0004c20, + 0x112e4: 0xe0004d0a, 0x112e5: 0xe000607e, 0x112e6: 0xe0004238, + 0x112e8: 0xe0008465, 0x112ea: 0xe00091b5, + 0x112ec: 0xe000a92e, 0x112ee: 0xe000a147, + 0x112f8: 0xe0007a17, 0x112fa: 0xe0007525, 0x112fb: 0xe00084fe, + 0x112ff: 0xe00085de, + // Block 0x44c, offset 0x11300 + 0x11301: 0xe00081ac, 0x11303: 0xe0007e68, + 0x11309: 0xe0006acf, + 0x11311: 0xe0006b03, 0x11313: 0xe0006229, + 0x11318: 0xe000520c, 0x11319: 0xe000a3d5, 0x1131b: 0xe0007c79, + 0x1131c: 0xe000519e, 0x1131f: 0xe0007a1b, + 0x11320: 0xe00074cd, 0x11323: 0xe0008cb9, + 0x11325: 0xe00075b4, 0x11327: 0xe0009c21, + 0x11329: 0xe0005e2f, + 0x1132d: 0xe0007784, + 0x11335: 0xe0009868, 0x11336: 0xe000995e, + 0x1133c: 0xe000939f, 0x1133f: 0xe00075e4, + // Block 0x44d, offset 0x11340 + 0x11340: 0xe00075e7, 0x11341: 0xe0005bee, + 0x11346: 0xe0009ccd, + 0x11349: 0xe0007dd9, + 0x1134c: 0xe00072c1, + 0x11350: 0xe0007dc4, + 0x1135a: 0xe000a4d5, + 0x11362: 0xe000695a, 0x11363: 0xe0008536, + 0x11366: 0xe00067a7, 0x11367: 0xe0008c2d, + 0x1136a: 0xe000581f, + 0x11372: 0xe000a57d, + 0x11377: 0xe0008c31, + 0x1137f: 0xe0006ddd, + // Block 0x44e, offset 0x11380 + 0x11384: 0xe000622c, + 0x1138d: 0xe000680d, + 0x11392: 0xe0005f09, 0x11393: 0xe000a6a0, + 0x11395: 0xe00076ef, + 0x1139a: 0xe00061f0, 0x1139b: 0xe00080fe, + 0x1139f: 0xe0006f48, + 0x113a2: 0xe0006081, + 0x113a4: 0xe00073fa, 0x113a7: 0xe0007e71, + 0x113aa: 0xe0007cc1, + 0x113b3: 0xe00074b5, + 0x113b5: 0xe00085ce, + 0x113ba: 0xe000622f, 0x113bb: 0xe0006388, + 0x113bc: 0xe0007d26, 0x113bd: 0xe0005df8, 0x113be: 0xe0004d0d, 0x113bf: 0xe0004b8d, + // Block 0x44f, offset 0x113c0 + 0x113c1: 0xe000417b, 0x113c2: 0xe00071a1, + 0x113c4: 0xe0008102, + 0x113c8: 0xe00077f4, 0x113c9: 0xe00091b9, 0x113cb: 0xe00052bd, + 0x113cc: 0xe000a331, + 0x113d6: 0xe0009f1e, 0x113d7: 0xe0004d10, + 0x113d9: 0xe0006ed4, 0x113da: 0xe0005e77, 0x113db: 0xe0007c22, + 0x113e0: 0xe0005d3c, 0x113e1: 0xe00088f1, 0x113e2: 0xe0004ed3, 0x113e3: 0xe0007947, + 0x113e5: 0xe0008a11, 0x113e6: 0xe000a14b, + 0x113e9: 0xe00052d5, 0x113eb: 0xe0006084, + 0x113ed: 0xe000a49c, 0x113ee: 0xe000a49f, 0x113ef: 0xe0007cc4, + 0x113f6: 0xe0009730, + 0x113fa: 0xe000a097, 0x113fb: 0xe000a09b, + 0x113fd: 0xe0005bc2, + // Block 0x450, offset 0x11400 + 0x11400: 0xe0004ed6, + 0x11405: 0xe000a553, + 0x11408: 0xe0007efe, 0x11409: 0xe000a931, 0x1140b: 0xe0006e60, + 0x1140c: 0xe0004bd2, + 0x11416: 0xe0009e3b, + 0x11419: 0xe00087ba, 0x1141b: 0xe000a2ed, + 0x11425: 0xe0008d85, + 0x11428: 0xe0008623, 0x1142a: 0xe0006a4b, + 0x1142d: 0xe0005229, + 0x11430: 0xe0007bbb, 0x11432: 0xe00052c0, + 0x11434: 0xe0007bb7, + 0x1143e: 0xe00057cb, 0x1143f: 0xe0007a8f, + // Block 0x451, offset 0x11440 + 0x11440: 0xe0006cbc, 0x11443: 0xe0007865, + 0x11445: 0xe0006f84, + 0x1144c: 0xe0005998, + 0x11450: 0xe00085e1, 0x11451: 0xe000a319, + 0x11454: 0xe0004986, 0x11455: 0xe00085c6, 0x11456: 0xe0008626, 0x11457: 0xe00085e4, + 0x11458: 0xe0008ded, 0x1145a: 0xe00067aa, 0x1145b: 0xe0009d81, + 0x1145c: 0xe00085e7, 0x1145d: 0xe000a739, 0x1145f: 0xe0005f68, + 0x11461: 0xe0009c24, 0x11463: 0xe00047a5, + 0x11464: 0xe0004817, 0x11465: 0xe0005286, + 0x11469: 0xe000a19e, 0x1146b: 0xe000711c, + 0x11470: 0xe0007291, 0x11471: 0xe00086c2, + 0x11475: 0xe00067ad, 0x11476: 0xe0008629, + 0x11478: 0xe000a033, 0x1147a: 0xe0008221, + 0x1147c: 0xe000795b, 0x1147f: 0xe0006c10, + // Block 0x452, offset 0x11480 + 0x11481: 0xe00088b3, 0x11482: 0xe0007fa2, + 0x11485: 0xe0005500, 0x11487: 0xe0007fdb, + 0x11488: 0xe00071a4, 0x11489: 0xe0007663, 0x1148a: 0xe00041c6, 0x1148b: 0xe0007148, + 0x1148c: 0xe0007ddd, 0x1148f: 0xe0004ba6, + 0x11493: 0xe00066d1, + 0x11495: 0xe0009bd4, 0x11496: 0xe000a71b, 0x11497: 0xe0008e09, + 0x11498: 0xe0004a5d, 0x11499: 0xe0008ead, 0x1149a: 0xe0008b65, 0x1149b: 0xe0007de1, + 0x1149c: 0xe000840b, + 0x114a2: 0xe0004492, 0x114a3: 0xe0006e64, + 0x114a4: 0xe0007545, 0x114a5: 0xe0008224, 0x114a6: 0xe000a5bc, + 0x114ac: 0xe0006fd0, 0x114ae: 0xe0004deb, + 0x114b0: 0xe0008803, 0x114b3: 0xe000a1a1, + 0x114b4: 0xe0007a1f, 0x114b5: 0xe0007045, 0x114b6: 0xe000417e, + 0x114b8: 0xe00074d1, 0x114b9: 0xe0007f5a, + 0x114bf: 0xe0007295, + // Block 0x453, offset 0x114c0 + 0x114c0: 0xe0009439, 0x114c2: 0xe00088f5, 0x114c3: 0xe0008106, + 0x114c4: 0xe000506f, 0x114c5: 0xe0008502, 0x114c6: 0xe00062ac, 0x114c7: 0xe0004c74, + 0x114cc: 0xe00067b0, + 0x114d0: 0xe0005f0c, 0x114d2: 0xe000a05b, 0x114d3: 0xe0007fde, + 0x114d4: 0xe0007479, 0x114d6: 0xe0009a7a, 0x114d7: 0xe000525d, + 0x114d8: 0xe00099f6, + 0x114de: 0xe0005e07, 0x114df: 0xe000930f, + 0x114e1: 0xe00049ea, 0x114e2: 0xe0009a5a, + 0x114e4: 0xe0007c7c, 0x114e5: 0xe0007eb0, 0x114e6: 0xe0007549, 0x114e7: 0xe0005259, + 0x114e8: 0xe000943c, 0x114e9: 0xe0007559, 0x114eb: 0xe0006b06, + 0x114ec: 0xe0004a61, 0x114ed: 0xe000a406, 0x114ee: 0xe0005ba1, 0x114ef: 0xe0008f61, + 0x114f0: 0xe000a5f4, + 0x114f5: 0xe00097c4, 0x114f6: 0xe0006685, + 0x114f8: 0xe00097a8, 0x114fa: 0xe0006b09, + // Block 0x454, offset 0x11500 + 0x11501: 0xe0006739, + 0x11504: 0xe0006b0c, 0x11505: 0xe0004f47, 0x11507: 0xe000873a, + 0x11508: 0xe000898d, 0x11509: 0xe00081af, 0x1150a: 0xe0008df1, 0x1150b: 0xe000755d, + 0x1150c: 0xe0008f10, 0x1150d: 0xe00054ca, 0x1150e: 0xe000551e, 0x1150f: 0xe0007048, + 0x11511: 0xe000704b, + 0x11514: 0xe00084a7, 0x11516: 0xe00095e4, + 0x11519: 0xe0006cc0, + 0x1151f: 0xe0006ed8, + 0x11520: 0xe0006edc, + 0x11524: 0xe0007fe1, + 0x11528: 0xe00063f8, 0x1152b: 0xe0007e59, + 0x11531: 0xe0009961, + 0x11538: 0xe00073fd, 0x11539: 0xe0008312, 0x1153a: 0xe00094a8, 0x1153b: 0xe000481a, + 0x1153c: 0xe00052f9, 0x1153e: 0xe00061f3, 0x1153f: 0xe00052ba, + // Block 0x455, offset 0x11540 + 0x11540: 0xe0004d83, 0x11541: 0xe00069d8, + 0x11545: 0xe00044b8, 0x11546: 0xe00047a8, 0x11547: 0xe0008a15, + 0x11548: 0xe0004dcf, 0x1154b: 0xe0007cfa, + 0x1154d: 0xe0007403, 0x1154e: 0xe0007400, + 0x11550: 0xe0004f4b, 0x11551: 0xe0006f14, + 0x11555: 0xe0008991, + 0x1155b: 0xe0006624, + 0x11560: 0xe0005521, 0x11562: 0xe0005bf1, + 0x11564: 0xe00099a4, 0x11565: 0xe0005cf7, + 0x11568: 0xe0004d13, + 0x1156c: 0xe00070f4, 0x1156f: 0xe00056e8, + 0x11571: 0xe0006be0, 0x11573: 0xe0006ee0, + 0x11579: 0xe000a8cb, 0x1157a: 0xe0005114, + // Block 0x456, offset 0x11580 + 0x11588: 0xe000a01d, 0x1158a: 0xe0008ac9, + 0x1158c: 0xe000501f, 0x1158f: 0xe0007e2d, + 0x11590: 0xe0005072, 0x11591: 0xe00086e2, 0x11592: 0xe0004679, + 0x11594: 0xe0009278, + 0x1159d: 0xe00086a2, + 0x115a1: 0xe00043a8, 0x115a3: 0xe0004d16, + 0x115a5: 0xe0009d00, 0x115a6: 0xe0005dd9, 0x115a7: 0xe0009733, + 0x115a8: 0xe00088b6, 0x115a9: 0xe00076cf, 0x115aa: 0xe0006904, 0x115ab: 0xe00071a7, + 0x115ac: 0xe0004384, 0x115ad: 0xe0005a54, + 0x115b1: 0xe00054cd, 0x115b3: 0xe0007603, + 0x115b5: 0xe000a42a, 0x115b7: 0xe0006250, + 0x115b8: 0xe0007667, 0x115ba: 0xe0005a10, + 0x115be: 0xe0008ad9, + // Block 0x457, offset 0x115c0 + 0x115c0: 0xe00071aa, + 0x115d2: 0xe0005685, + 0x115d9: 0xe00099b1, + 0x115e0: 0xe0006cc4, + 0x115e8: 0xe00075b7, 0x115e9: 0xe00075ea, + 0x115ed: 0xe0009736, 0x115ef: 0xe000673d, + 0x115f0: 0xe0006741, 0x115f1: 0xe0005289, + 0x115f4: 0xe000a29d, 0x115f6: 0xe0005524, + 0x115fb: 0xe0008f65, + 0x115fd: 0xe000a341, + // Block 0x458, offset 0x11600 + 0x11606: 0xe00049ba, 0x11607: 0xe0007375, + 0x1160d: 0xe0005872, 0x1160e: 0xe0005075, + 0x11610: 0xe000492a, 0x11611: 0xe0004906, + 0x11614: 0xe00097ff, 0x11615: 0xe0007787, 0x11616: 0xe0007760, 0x11617: 0xe00043ac, + 0x11619: 0xe0005c78, 0x1161b: 0xe0004ddf, + 0x1161f: 0xe00083ca, + 0x11622: 0xe000884f, + 0x11624: 0xe000a760, 0x11626: 0xe000797f, 0x11627: 0xe0007379, + 0x11629: 0xe0006924, + 0x11634: 0xe0007e86, + 0x1163d: 0xe0008830, + // Block 0x459, offset 0x11640 + 0x11641: 0xe000434c, 0x11642: 0xe0005c98, + 0x1164b: 0xe00061f6, + 0x1164c: 0xe0004300, 0x1164e: 0xe0008038, + 0x11650: 0xe00057f7, 0x11653: 0xe00076f3, + 0x11654: 0xe0007e89, + 0x11669: 0xe000737d, + 0x1166c: 0xe0007e77, 0x1166f: 0xe0009254, + 0x11671: 0xe0007fa6, + // Block 0x45a, offset 0x11680 + 0x11681: 0xe0005c18, 0x11682: 0xe00087be, + 0x11684: 0xe0009357, 0x11687: 0xe0004c77, + 0x1168b: 0xe0005527, + 0x11692: 0xe0009049, + 0x11694: 0xe0004ff3, 0x11695: 0xe0009739, + 0x11699: 0xe0005d81, + 0x1169d: 0xe0005710, + 0x116a0: 0xe0004bd5, 0x116a2: 0xe0007eb3, + 0x116a7: 0xe00079ff, + 0x116aa: 0xe0007997, 0x116ab: 0xe000799f, + 0x116ae: 0xe000a26d, + 0x116b0: 0xe000a1c8, + 0x116b7: 0xe0008444, + 0x116b8: 0xe0007b4b, 0x116ba: 0xe0005a14, + 0x116bc: 0xe0006d86, 0x116bd: 0xe0007607, + // Block 0x45b, offset 0x116c0 + 0x116c9: 0xe000935b, 0x116cb: 0xe0004ed9, + 0x116cd: 0xe0007e7a, + 0x116d1: 0xe00092f7, 0x116d2: 0xe0005e33, 0x116d3: 0xe0008a19, + 0x116d6: 0xe00076d3, + 0x116da: 0xe000a255, + 0x116dd: 0xe000950c, 0x116de: 0xe0008eb0, + 0x116e1: 0xe00072d1, 0x116e2: 0xe000704e, + 0x116e5: 0xe000498a, 0x116e6: 0xe0008e77, 0x116e7: 0xe0004bd8, + 0x116e8: 0xe00044bb, 0x116eb: 0xe000613b, + 0x116ee: 0xe0009257, + 0x116f1: 0xe0005078, 0x116f2: 0xe0008468, 0x116f3: 0xe0006b0f, + 0x116f4: 0xe0009cd0, 0x116f5: 0xe00099f9, 0x116f7: 0xe000a14f, + 0x116f9: 0xe0004f9b, + 0x116fd: 0xe0007120, 0x116fe: 0xe0004518, + // Block 0x45c, offset 0x11700 + 0x11702: 0xe0007406, 0x11703: 0xe0009e77, + 0x11706: 0xe000654c, + 0x11709: 0xe00068b0, + 0x1170c: 0xe000a934, + 0x11711: 0xe0009bd8, + 0x11715: 0xe0005eb3, 0x11716: 0xe0009630, + 0x11719: 0xe00091bd, 0x1171a: 0xe000986b, 0x1171b: 0xe00064dc, + 0x1171d: 0xe0008c7d, + 0x11725: 0xe00071ad, + 0x11728: 0xe0007030, 0x1172b: 0xe0006b12, + 0x1172d: 0xe0006e00, + 0x11733: 0xe000873e, + 0x11736: 0xe00054d0, 0x11737: 0xe00082a5, + 0x11738: 0xe0006cc8, + 0x1173d: 0xe000603f, 0x1173f: 0xe000a787, + // Block 0x45d, offset 0x11740 + 0x11740: 0xe0008b69, 0x11743: 0xe00081e8, + 0x11744: 0xe000760b, 0x11745: 0xe0009ed7, 0x11747: 0xe00063fc, + 0x1174c: 0xe000a640, 0x1174e: 0xe0005f98, + 0x11754: 0xe0005e7b, 0x11755: 0xe0005e0b, + 0x11758: 0xe0009471, + 0x1175e: 0xe0006709, 0x1175f: 0xe00099b4, + 0x11761: 0xe00064f8, 0x11762: 0xe000545a, 0x11763: 0xe0009e3e, + 0x11768: 0xe0009608, 0x1176a: 0xe00060e0, 0x1176b: 0xe0006460, + 0x1176c: 0xe0008f13, + 0x11770: 0xe000a259, 0x11771: 0xe00057cf, 0x11772: 0xe000423c, 0x11773: 0xe0009e10, + 0x11774: 0xe0005239, 0x11777: 0xe0006628, + 0x11778: 0xe000a1fa, 0x11779: 0xe0004240, 0x1177a: 0xe0007f01, 0x1177b: 0xe000a5c0, + 0x1177c: 0xe0008227, 0x1177d: 0xe000822a, 0x1177e: 0xe000507b, 0x1177f: 0xe0007983, + // Block 0x45e, offset 0x11780 + 0x11784: 0xe0008742, 0x11787: 0xe000695d, + 0x1178a: 0xe0006ccc, 0x1178b: 0xe0005117, + 0x1178f: 0xe0006d89, + 0x11795: 0xe000886e, 0x11796: 0xe0009eb6, 0x11797: 0xe0008add, + 0x1179a: 0xe00046bd, + 0x1179c: 0xe00067b3, + 0x117a0: 0xe0006cd0, + 0x117a6: 0xe000552a, 0x117a7: 0xe0008e7a, + 0x117ab: 0xe000481d, + 0x117ad: 0xe0008b6d, + 0x117b3: 0xe00069db, + 0x117b5: 0xe00076d7, 0x117b6: 0xe0006d8c, 0x117b7: 0xe00043b0, + 0x117b8: 0xe0007f5e, + 0x117bd: 0xe000803b, 0x117be: 0xe000822d, + // Block 0x45f, offset 0x117c0 + 0x117c1: 0xe000999c, 0x117c2: 0xe0006cd4, + 0x117c8: 0xe0009ff9, 0x117c9: 0xe00059d8, 0x117ca: 0xe0005837, 0x117cb: 0xe000724c, + 0x117d0: 0xe0004c7a, 0x117d1: 0xe0004f9f, 0x117d3: 0xe0004a35, + 0x117d5: 0xe00083ce, 0x117d6: 0xe0005ba4, + 0x117da: 0xe0008eb3, 0x117db: 0xe0008995, + 0x117dd: 0xe0007451, 0x117de: 0xe000a8f7, 0x117df: 0xe0006111, + 0x117e0: 0xe00093a3, 0x117e1: 0xe0006180, 0x117e2: 0xe0009e41, 0x117e3: 0xe0004b0d, + 0x117e5: 0xe0004b90, 0x117e7: 0xe00087c2, + 0x117e8: 0xe000a1cb, 0x117e9: 0xe0005cc0, + 0x117ec: 0xe00058e9, + 0x117f1: 0xe0007d86, 0x117f3: 0xe0009664, + 0x117f6: 0xe0007a23, 0x117f7: 0xe0008b71, + 0x117fa: 0xe000451c, 0x117fb: 0xe000a6be, + 0x117ff: 0xe00085ba, + // Block 0x460, offset 0x11800 + 0x11801: 0xe00065c8, 0x11803: 0xe000511a, + 0x11804: 0xe0005b2e, 0x11807: 0xe0004350, + 0x11808: 0xe000a289, 0x1180a: 0xe0009e44, 0x1180b: 0xe00084da, + 0x1180f: 0xe000747d, + 0x11811: 0xe0007409, 0x11813: 0xe0004def, + 0x11814: 0xe0008cf8, 0x11815: 0xe0008506, 0x11817: 0xe00068f8, + 0x11818: 0xe000a515, 0x1181b: 0xe000846b, + 0x1181f: 0xe0008c80, + 0x11822: 0xe000558a, + 0x11825: 0xe0006232, 0x11826: 0xe000a2a1, 0x11827: 0xe000a42d, + 0x11829: 0xe0005277, + 0x1182d: 0xe0006235, + 0x11831: 0xe0007821, + 0x11834: 0xe0005615, 0x11835: 0xe0008746, + 0x1183a: 0xe00043b4, + 0x1183c: 0xe0009f8d, + // Block 0x461, offset 0x11840 + 0x11840: 0xe0004d19, + 0x11846: 0xe0006610, + 0x11848: 0xe0009b64, 0x1184a: 0xe00043b8, + 0x1184c: 0xe00061f9, 0x1184e: 0xe0005e37, + 0x11854: 0xe0005b0e, 0x11856: 0xe0005342, 0x11857: 0xe000a3e8, + 0x11858: 0xe00096b2, 0x11859: 0xe000a833, 0x1185b: 0xe000846e, + 0x1185d: 0xe00084aa, + 0x11862: 0xe000a391, + 0x11864: 0xe0005689, 0x11866: 0xe000792f, 0x11867: 0xe0008066, + 0x11869: 0xe000943f, 0x1186a: 0xe0009ef1, 0x1186b: 0xe0008cfb, + 0x1186c: 0xe0006a4f, 0x1186d: 0xe0009d90, + 0x11870: 0xe00093a7, 0x11871: 0xe0007b4f, + 0x11877: 0xe0006400, + 0x11879: 0xe00079e3, + 0x1187c: 0xe0009f64, 0x1187f: 0xe00068fc, + // Block 0x462, offset 0x11880 + 0x11880: 0xe0007e45, 0x11881: 0xe0008b75, 0x11882: 0xe0008d88, + 0x11885: 0xe00054d3, 0x11887: 0xe00072d5, + 0x11888: 0xe000a8af, 0x11889: 0xe00078b9, 0x1188a: 0xe000a6c1, 0x1188b: 0xe0005c8c, + 0x1188c: 0xe000a78a, + 0x11890: 0xe0006d8f, 0x11891: 0xe00046c1, 0x11892: 0xe000552d, + 0x11897: 0xe000570c, + 0x11898: 0xe0006495, 0x11899: 0xe0006b15, + 0x1189c: 0xe0006d20, 0x1189e: 0xe0008e0d, + 0x118a0: 0xe0005875, 0x118a1: 0xe00078e8, 0x118a3: 0xe000927b, + 0x118a7: 0xe0009de0, + 0x118a8: 0xe000a644, 0x118a9: 0xe00066d5, 0x118aa: 0xe00072d9, + 0x118ac: 0xe0006464, 0x118ad: 0xe0007f04, 0x118ae: 0xe00061fc, 0x118af: 0xe000a409, + 0x118b5: 0xe0009229, 0x118b7: 0xe0005504, + 0x118b9: 0xe000959c, + 0x118bc: 0xe0007f07, 0x118bd: 0xe000a836, + // Block 0x463, offset 0x118c0 + 0x118c3: 0xe0007561, + 0x118c5: 0xe0009f91, + 0x118c9: 0xe000558d, + 0x118cc: 0xe000507e, 0x118cd: 0xe000850a, + 0x118d0: 0xe0009bb4, 0x118d2: 0xe0009cc2, + 0x118d6: 0xe00097ac, 0x118d7: 0xe0009064, + 0x118d8: 0xe0005ec3, 0x118d9: 0xe0005ec7, + 0x118dd: 0xe000960c, 0x118de: 0xe0006284, 0x118df: 0xe0006288, + 0x118e0: 0xe000991a, 0x118e1: 0xe0009932, + 0x118e4: 0xe0007cc7, + 0x118e8: 0xe0007e31, 0x118eb: 0xe0009aa2, + 0x118ed: 0xe00065dc, 0x118ee: 0xe000511d, + 0x118f1: 0xe0009a7e, + 0x118f5: 0xe0005249, + 0x118f8: 0xe00052eb, 0x118fb: 0xe000a8b3, + 0x118fc: 0xe0004408, 0x118fd: 0xe000a501, 0x118ff: 0xe0006874, + // Block 0x464, offset 0x11900 + 0x1190a: 0xe000973c, + 0x1190d: 0xe00086a6, 0x1190f: 0xe000772f, + 0x11912: 0xe000527a, + 0x11914: 0xe0008c35, 0x11915: 0xe0009d03, 0x11916: 0xe0009e7a, 0x11917: 0xe000965c, + 0x11919: 0xe000a4a2, 0x1191b: 0xe00053b6, + 0x1191c: 0xe0005a18, 0x1191d: 0xe0006b18, + 0x11920: 0xe0009bfd, 0x11921: 0xe0008471, + 0x11925: 0xe0005007, 0x11926: 0xe0009e20, 0x11927: 0xe0006fd4, + 0x11928: 0xe000810a, 0x11929: 0xe0005302, 0x1192a: 0xe0004b7e, + 0x1192f: 0xe0004598, + 0x11933: 0xe000a6a4, + // Block 0x465, offset 0x11940 + 0x11941: 0xe0008592, 0x11942: 0xe00072dd, 0x11943: 0xe000740c, + 0x11946: 0xe000a17f, 0x11947: 0xe0004b31, + 0x11948: 0xe0006087, 0x1194a: 0xe000a371, + 0x1194d: 0xe000a648, + 0x11950: 0xe000498e, 0x11952: 0xe000a153, + 0x11955: 0xe0006d92, + 0x11959: 0xe0007869, 0x1195a: 0xe00079a7, + 0x1195d: 0xe0004ad9, 0x1195f: 0xe000a893, + 0x11960: 0xe0004b93, 0x11962: 0xe000a6c4, 0x11963: 0xe00085ea, + 0x11964: 0xe000a86f, 0x11965: 0xe00099b7, + 0x11968: 0xe000a05f, 0x11969: 0xe000835a, 0x1196a: 0xe00041f0, 0x1196b: 0xe0009c7a, + 0x1196c: 0xe000524d, 0x1196d: 0xe0004992, 0x1196f: 0xe0007481, + 0x11970: 0xe000a8ff, + // Block 0x466, offset 0x11980 + 0x11981: 0xe0007a93, 0x11983: 0xe000492e, + 0x11984: 0xe000973f, 0x11985: 0xe0007abf, + 0x11989: 0xe000754d, 0x1198b: 0xe0005d85, + 0x1198c: 0xe0008c83, 0x1198d: 0xe000a063, 0x1198f: 0xe000a375, + 0x11992: 0xe00083e6, + 0x11994: 0xe000a6c7, 0x11995: 0xe000a964, 0x11996: 0xe0009d66, 0x11997: 0xe00061c9, + 0x1199a: 0xe000714c, 0x1199b: 0xe0008999, + 0x1199f: 0xe0007c7f, + 0x119a0: 0xe0008230, 0x119a2: 0xe00058c9, 0x119a3: 0xe000a5c4, + 0x119a4: 0xe00097c8, 0x119a7: 0xe0005cfa, + 0x119b0: 0xe0008e11, 0x119b1: 0xe00069de, 0x119b2: 0xe0006960, 0x119b3: 0xe0005508, + 0x119b4: 0xe000993a, 0x119b5: 0xe00093f7, 0x119b6: 0xe0006254, + 0x119b8: 0xe00047ab, 0x119bb: 0xe000a20a, + 0x119bc: 0xe0005530, 0x119bd: 0xe000948b, 0x119be: 0xe00049be, + // Block 0x467, offset 0x119c0 + 0x119c4: 0xe0005235, 0x119c5: 0xe0008b79, 0x119c6: 0xe000986e, 0x119c7: 0xe00055f1, + 0x119c9: 0xe0009610, 0x119cb: 0xe0007e35, + 0x119cf: 0xe0005823, + 0x119d1: 0xe000a4c9, 0x119d3: 0xe0004e33, + 0x119d5: 0xe00094e4, + 0x119d8: 0xe0005eeb, 0x119d9: 0xe00095c4, 0x119da: 0xe000a505, 0x119db: 0xe000a4f1, + 0x119dc: 0xe0006e04, 0x119dd: 0xe00093fb, 0x119df: 0xe0008233, + 0x119e0: 0xe000a3eb, 0x119e1: 0xe000760f, 0x119e2: 0xe0007180, + 0x119f0: 0xe0009aba, 0x119f1: 0xe00052b1, 0x119f2: 0xe00080ba, 0x119f3: 0xe0006cd8, + 0x119f4: 0xe0009946, 0x119f6: 0xe000a64c, 0x119f7: 0xe0008fa9, + 0x119f8: 0xe0004755, 0x119f9: 0xe000780c, 0x119fa: 0xe0006fd8, 0x119fb: 0xe0009994, + 0x119fc: 0xe0009de4, + // Block 0x468, offset 0x11a00 + 0x11a00: 0xe0009742, 0x11a01: 0xe00071b0, 0x11a03: 0xe0006ee4, + 0x11a06: 0xe0004520, + 0x11a08: 0xe0008236, 0x11a09: 0xe0008239, + 0x11a0d: 0xe0006258, 0x11a0e: 0xe0009db0, 0x11a0f: 0xe000840e, + 0x11a14: 0xe00083d2, 0x11a15: 0xe0007613, + 0x11a1a: 0xe0007fe4, 0x11a1b: 0xe0007763, + 0x11a1c: 0xe000a379, 0x11a1f: 0xe0004304, + 0x11a27: 0xe0004b81, + 0x11a2c: 0xe00070bd, 0x11a2d: 0xe0005120, + 0x11a30: 0xe000a650, + 0x11a34: 0xe00093ab, 0x11a37: 0xe000444f, + 0x11a3c: 0xe00074d5, 0x11a3e: 0xe0004452, 0x11a3f: 0xe000810e, + // Block 0x469, offset 0x11a40 + 0x11a42: 0xe0007f62, + 0x11a44: 0xe0005c90, 0x11a46: 0xe0005590, 0x11a47: 0xe000835e, + 0x11a48: 0xe00085ed, 0x11a4a: 0xe000465d, 0x11a4b: 0xe0009c00, + 0x11a4c: 0xe000a654, 0x11a4d: 0xe0007d2a, + 0x11a52: 0xe0008e4d, 0x11a53: 0xe0009ef4, + 0x11a55: 0xe0006042, + 0x11a58: 0xe0009333, 0x11a59: 0xe0009337, 0x11a5a: 0xe000935f, + 0x11a5d: 0xe0009cba, 0x11a5f: 0xe0009c62, + 0x11a60: 0xe0007cca, 0x11a62: 0xe0005e3b, 0x11a63: 0xe0004a65, + 0x11a64: 0xe00041f4, 0x11a67: 0xe000a3ee, + 0x11a68: 0xe0004455, 0x11a6b: 0xe0008e15, + 0x11a6e: 0xe00058ec, + 0x11a70: 0xe00081b2, 0x11a71: 0xe000537a, 0x11a73: 0xe000428c, + 0x11a74: 0xe00073b2, 0x11a75: 0xe0007faa, 0x11a76: 0xe00046c5, 0x11a77: 0xe00043bc, + 0x11a7a: 0xe0005c1b, + 0x11a7d: 0xe00094ac, 0x11a7e: 0xe0007f22, + // Block 0x46a, offset 0x11a80 + 0x11a81: 0xe00097cc, 0x11a82: 0xe0007fe7, 0x11a83: 0xe0007fae, + 0x11a8a: 0xe0006963, + 0x11a8d: 0xe0004c23, 0x11a8e: 0xe0009021, + 0x11a90: 0xe0005968, 0x11a91: 0xe0006ab3, 0x11a92: 0xe0004e79, + 0x11a94: 0xe00096d9, 0x11a96: 0xe0008382, + 0x11a98: 0xe000a93a, 0x11a99: 0xe000a937, 0x11a9a: 0xe0009b68, + 0x11aa4: 0xe0006878, 0x11aa7: 0xe0005645, + 0x11aa8: 0xe0004354, 0x11aa9: 0xe00045ab, 0x11aab: 0xe000625c, + 0x11aac: 0xe00046c9, 0x11aae: 0xe000613e, 0x11aaf: 0xe0009363, + 0x11ab2: 0xe000a245, + 0x11ab6: 0xe0007913, + 0x11ab8: 0xe0006f88, 0x11aba: 0xe00053ce, 0x11abb: 0xe0009b80, + 0x11abc: 0xe0004759, 0x11abe: 0xe0004308, + // Block 0x46b, offset 0x11ac0 + 0x11ac3: 0xe0004f5f, + 0x11ac6: 0xe0008d8b, 0x11ac7: 0xe0004244, + 0x11ac8: 0xe000a1a4, 0x11ac9: 0xe00083f6, 0x11aca: 0xe0007c82, 0x11acb: 0xe0006141, + 0x11acc: 0xe0007a03, + 0x11ad5: 0xe0007b03, 0x11ad7: 0xe000a020, + 0x11ade: 0xe00060e4, 0x11adf: 0xe00054f1, + 0x11ae3: 0xe00061cd, + 0x11ae6: 0xe00051a1, + 0x11af2: 0xe000922d, + 0x11af6: 0xe0005757, 0x11af7: 0xe000a6ca, + 0x11af8: 0xe000a2a5, 0x11afa: 0xe000933b, + 0x11afc: 0xe0004c7d, 0x11afd: 0xe000a5f8, 0x11afe: 0xe0006fb0, 0x11aff: 0xe0008411, + // Block 0x46c, offset 0x11b00 + 0x11b00: 0xe000596c, + 0x11b07: 0xe000545e, + 0x11b08: 0xe00049ed, 0x11b0a: 0xe0006144, + 0x11b0c: 0xe0007361, 0x11b0d: 0xe00071b3, 0x11b0e: 0xe0008342, + 0x11b10: 0xe0006fdc, 0x11b11: 0xe00075ba, 0x11b12: 0xe00047ae, + 0x11b14: 0xe00086da, 0x11b15: 0xe00087c6, 0x11b16: 0xe000a4cd, + 0x11b1a: 0xe00094b0, + 0x11b1e: 0xe00076af, 0x11b1f: 0xe0004f33, + 0x11b21: 0xe000430c, 0x11b22: 0xe0009225, + 0x11b27: 0xe00093ff, + 0x11b29: 0xe0008a1d, 0x11b2a: 0xe0008aad, + 0x11b2e: 0xe0005c64, + 0x11b30: 0xe000899d, 0x11b31: 0xe000a93d, 0x11b32: 0xe000a967, 0x11b33: 0xe00092a3, + 0x11b34: 0xe00054d6, 0x11b35: 0xe0004d1c, 0x11b36: 0xe000a430, + 0x11b39: 0xe00077d4, + 0x11b3e: 0xe00058ef, 0x11b3f: 0xe0006404, + // Block 0x46d, offset 0x11b40 + 0x11b40: 0xe0007051, 0x11b41: 0xe0009dbc, 0x11b43: 0xe000475d, + 0x11b47: 0xe0006e68, + 0x11b48: 0xe000a433, 0x11b49: 0xe0006966, 0x11b4a: 0xe0007b07, 0x11b4b: 0xe00071b6, + 0x11b4d: 0xe0008806, 0x11b4e: 0xe000931f, + 0x11b51: 0xe000670d, 0x11b52: 0xe00064cb, 0x11b53: 0xe0009abd, + 0x11b57: 0xe0008833, + 0x11b58: 0xe0009b0c, 0x11b5b: 0xe000440c, + 0x11b63: 0xe0004d1f, + 0x11b68: 0xe000853a, + 0x11b6e: 0xe000687c, + 0x11b71: 0xe000500b, 0x11b73: 0xe000638c, + 0x11b76: 0xe00067b6, + 0x11b79: 0xe0006969, 0x11b7a: 0xe00090be, + 0x11b7c: 0xe00077b8, 0x11b7e: 0xe0008d8e, 0x11b7f: 0xe00073d2, + // Block 0x46e, offset 0x11b80 + 0x11b80: 0xe0005081, 0x11b83: 0xe00065e0, + 0x11b84: 0xe00096dc, 0x11b86: 0xe00061d1, + 0x11b89: 0xe0004635, 0x11b8a: 0xe0009cd3, + 0x11b91: 0xe0007917, 0x11b92: 0xe0006d95, + 0x11b94: 0xe0006810, 0x11b95: 0xe0009ca4, 0x11b96: 0xe00056d3, 0x11b97: 0xe000a157, + 0x11b98: 0xe0008ab1, 0x11b9b: 0xe0009e7d, + 0x11ba8: 0xe0009e24, 0x11bab: 0xe0009f67, + 0x11bac: 0xe0009c27, + 0x11bb1: 0xe0009e80, + 0x11bb5: 0xe0008871, + 0x11bb9: 0xe0005e9b, + 0x11bbc: 0xe000771b, 0x11bbd: 0xe0009820, + // Block 0x46f, offset 0x11bc0 + 0x11bc2: 0xe0006900, + 0x11bc4: 0xe0008f16, 0x11bc5: 0xe000537e, 0x11bc6: 0xe0009b34, 0x11bc7: 0xe0006147, + 0x11bc8: 0xe0005251, 0x11bc9: 0xe0005827, 0x11bca: 0xe0006813, + 0x11bcc: 0xe0006334, 0x11bcd: 0xe00062c8, 0x11bcf: 0xe00051a4, + 0x11bd0: 0xe0004b84, 0x11bd1: 0xe000467d, 0x11bd2: 0xe00044be, 0x11bd3: 0xe00094b4, + 0x11bd4: 0xe00063ac, 0x11bd5: 0xe0009adb, 0x11bd6: 0xe0009ac0, 0x11bd7: 0xe0007eb6, + 0x11bd8: 0xe0004c80, 0x11bd9: 0xe0008dfd, 0x11bdb: 0xe00096df, + 0x11bdc: 0xe0006498, + 0x11bec: 0xe0004add, 0x11bed: 0xe0007485, 0x11bee: 0xe0005183, 0x11bef: 0xe0009029, + 0x11bf1: 0xe0004996, 0x11bf3: 0xe0004e1b, + 0x11bf5: 0xe0008df5, 0x11bf6: 0xe0009323, 0x11bf7: 0xe0004820, + 0x11bfd: 0xe0007c25, 0x11bfe: 0xe00073a2, 0x11bff: 0xe00051a7, + // Block 0x470, offset 0x11c00 + 0x11c01: 0xe0009067, 0x11c02: 0xe0004b69, + 0x11c07: 0xe000906a, + 0x11c09: 0xe000766b, + 0x11c0c: 0xe00045cd, + 0x11c10: 0xe00051ad, 0x11c11: 0xe0005533, 0x11c12: 0xe00059cc, + 0x11c28: 0xe000778a, 0x11c2a: 0xe00051b0, 0x11c2b: 0xe0008e7d, + 0x11c2f: 0xe0009109, + 0x11c39: 0xe00083ea, 0x11c3a: 0xe0008b7d, 0x11c3b: 0xe0007a2b, + 0x11c3d: 0xe0005e3f, 0x11c3e: 0xe000a345, + // Block 0x471, offset 0x11c40 + 0x11c42: 0xe0007ccd, 0x11c43: 0xe0004dbf, + 0x11c44: 0xe0004d22, 0x11c46: 0xe0004932, + 0x11c49: 0xe0009287, + 0x11c4c: 0xe0009d54, 0x11c4d: 0xe000a09f, 0x11c4e: 0xe00070c0, 0x11c4f: 0xe00051dc, + 0x11c50: 0xe0007a27, + 0x11c55: 0xe0009e83, 0x11c57: 0xe00094e8, + 0x11c67: 0xe0006745, + 0x11c68: 0xe0006b1b, 0x11c69: 0xe00059d0, 0x11c6b: 0xe00061d5, + 0x11c6e: 0xe00044c1, + 0x11c71: 0xe000778d, 0x11c72: 0xe0004e1f, + 0x11c76: 0xe0009871, 0x11c77: 0xe0009634, + 0x11c7a: 0xe00051e0, 0x11c7b: 0xe0005255, + 0x11c7f: 0xe0006d98, + // Block 0x472, offset 0x11c80 + 0x11c80: 0xe000a8b7, 0x11c83: 0xe0007054, + 0x11c84: 0xe0005c88, 0x11c87: 0xe00095c8, + 0x11c88: 0xe00071b9, 0x11c89: 0xe0005536, 0x11c8a: 0xe0006816, + 0x11c8c: 0xe000874a, 0x11c8e: 0xe0005123, 0x11c8f: 0xe0005593, + 0x11c92: 0xe000649b, + 0x11c96: 0xe00077bc, + 0x11c98: 0xe0004dd3, 0x11c9b: 0xe0004b60, + 0x11c9c: 0xe0007c28, 0x11c9f: 0xe0008c39, + 0x11ca0: 0xe0005885, 0x11ca1: 0xe0009442, 0x11ca2: 0xe0009ba0, + 0x11ca5: 0xe0008b25, 0x11ca7: 0xe000499a, + 0x11ca8: 0xe0009823, 0x11ca9: 0xe0007977, 0x11caa: 0xe0008cfe, + 0x11cac: 0xe0004d9b, + 0x11cbe: 0xe0007a97, + // Block 0x473, offset 0x11cc0 + 0x11cc0: 0xe0004248, 0x11cc3: 0xe0008a21, + 0x11cc4: 0xe000823c, 0x11cc6: 0xe0004eac, + 0x11cc9: 0xe00082a8, + 0x11ccf: 0xe0006114, + 0x11cd0: 0xe0008c86, + 0x11cd6: 0xe00083da, + 0x11cda: 0xe000786d, 0x11cdb: 0xe000a5c8, + 0x11cdf: 0xe0006de0, + 0x11ce0: 0xe00076b3, 0x11ce1: 0xe0007617, 0x11ce3: 0xe0009949, + 0x11ce9: 0xe000447f, 0x11ceb: 0xe0009874, + 0x11ced: 0xe00045ae, 0x11cee: 0xe000a839, + 0x11cf2: 0xe0006f4c, + 0x11cf4: 0xe0008112, 0x11cf5: 0xe000453c, 0x11cf6: 0xe000780f, 0x11cf7: 0xe0006c74, + // Block 0x474, offset 0x11d00 + 0x11d06: 0xe0004d25, + 0x11d09: 0xe000421c, + 0x11d0d: 0xe0007124, 0x11d0f: 0xe00062cc, + 0x11d12: 0xe0006468, + 0x11d14: 0xe0007057, 0x11d16: 0xe0007eb9, 0x11d17: 0xe0005539, + 0x11d1c: 0xe00071bc, + 0x11d22: 0xe000910d, + 0x11d24: 0xe00077d8, 0x11d25: 0xe0009877, + 0x11d28: 0xe0009bd0, 0x11d2a: 0xe0005486, 0x11d2b: 0xe0006390, + 0x11d2c: 0xe0006338, 0x11d2d: 0xe0009bc0, 0x11d2f: 0xe0005596, + 0x11d30: 0xe0004966, + 0x11d36: 0xe0009403, + 0x11d3a: 0xe000a854, + 0x11d3e: 0xe000928b, + // Block 0x475, offset 0x11d40 + 0x11d58: 0xe00088f9, + 0x11d60: 0xe00097d0, + 0x11d67: 0xe0009808, + 0x11d69: 0xe0005ddd, + 0x11d6d: 0xe00094ec, 0x11d6f: 0xe000906d, + 0x11d73: 0xe0004d28, + 0x11d78: 0xe0006045, 0x11d79: 0xe0006048, 0x11d7a: 0xe0008b29, 0x11d7b: 0xe0006f8c, + 0x11d7d: 0xe0009f21, + // Block 0x476, offset 0x11d80 + 0x11d85: 0xe0004e7c, + 0x11d88: 0xe0005a94, + 0x11d90: 0xe0009c3f, 0x11d91: 0xe0009c3b, 0x11d92: 0xe0006c3c, 0x11d93: 0xe0007ebc, + 0x11d95: 0xe0006de3, + 0x11d99: 0xe0008fad, 0x11d9a: 0xe000523d, + 0x11d9d: 0xe000a84b, 0x11d9e: 0xe0005462, 0x11d9f: 0xe0004c26, + 0x11da4: 0xe00095a0, 0x11da5: 0xe00063b0, + 0x11da9: 0xe0005bc5, 0x11dab: 0xe000614a, + 0x11dad: 0xe0009cd6, 0x11dae: 0xe00097f8, + 0x11db0: 0xe00092af, 0x11db2: 0xe00062d0, + 0x11dbb: 0xe000539e, + 0x11dbc: 0xe0004358, 0x11dbe: 0xe0004a1a, 0x11dbf: 0xe000458c, + // Block 0x477, offset 0x11dc0 + 0x11dc1: 0xe0007d62, + 0x11dc4: 0xe0005a97, 0x11dc5: 0xe0009510, 0x11dc7: 0xe0009c33, + 0x11dc9: 0xe00092a7, 0x11dca: 0xe00045b1, + 0x11dcd: 0xe0008d01, 0x11dce: 0xe00046cd, + 0x11dd0: 0xe000a5fc, 0x11dd2: 0xe0004fbf, + 0x11dd4: 0xe00053d2, 0x11dd5: 0xe000a863, 0x11dd7: 0xe00065ac, + 0x11dd8: 0xe000658c, 0x11dda: 0xe00044c4, + 0x11de0: 0xe0008cbc, 0x11de1: 0xe00054d9, 0x11de2: 0xe0009b10, 0x11de3: 0xe0005599, + 0x11de5: 0xe00057fb, 0x11de6: 0xe0009313, 0x11de7: 0xe00044c7, + 0x11dec: 0xe0008414, 0x11ded: 0xe000a580, 0x11def: 0xe0006a83, + 0x11df1: 0xe0004220, 0x11df2: 0xe00094b8, + 0x11df4: 0xe000a58c, + 0x11dfa: 0xe0009cd9, + 0x11dfe: 0xe0007ebf, + // Block 0x478, offset 0x11e00 + 0x11e00: 0xe000633c, 0x11e02: 0xe0005b7a, + 0x11e04: 0xe0009c47, 0x11e07: 0xe000a25d, + 0x11e0a: 0xe0005950, + 0x11e0f: 0xe0005b4a, + 0x11e14: 0xe00057d3, + 0x11e18: 0xe0007871, 0x11e19: 0xe0009367, + 0x11e1d: 0xe0006fa0, + 0x11e22: 0xe00092fb, 0x11e23: 0xe0005970, + 0x11e24: 0xe0009b84, + 0x11e2a: 0xe0004bdb, 0x11e2b: 0xe000a590, + 0x11e2c: 0xe00057ff, 0x11e2f: 0xe0009070, + 0x11e32: 0xe0005126, + 0x11e36: 0xe00071bf, 0x11e37: 0xe0004823, + 0x11e38: 0xe000823f, 0x11e39: 0xe0004458, 0x11e3b: 0xe000499e, + 0x11e3d: 0xe0006394, 0x11e3e: 0xe0006408, 0x11e3f: 0xe0008b81, + // Block 0x479, offset 0x11e40 + 0x11e45: 0xe0004826, + 0x11e48: 0xe000a73c, 0x11e49: 0xe0006238, + 0x11e4d: 0xe0006d9b, 0x11e4e: 0xe0004bde, 0x11e4f: 0xe0006260, + 0x11e51: 0xe0004c83, + 0x11e54: 0xe0007906, 0x11e55: 0xe0009a32, 0x11e56: 0xe0007c85, 0x11e57: 0xe0009d69, + 0x11e5d: 0xe0009e56, 0x11e5e: 0xe00093af, + 0x11e62: 0xe0004310, 0x11e63: 0xe0006be4, + 0x11e66: 0xe00055f5, + 0x11e6c: 0xe00046d1, 0x11e6d: 0xe0007875, + 0x11e72: 0xe0004829, + 0x11e74: 0xe0008b85, 0x11e75: 0xe00088fd, 0x11e77: 0xe00067b9, + 0x11e78: 0xe00071c2, + 0x11e7e: 0xe0006e6c, + // Block 0x47a, offset 0x11e80 + 0x11e81: 0xe00056d6, 0x11e82: 0xe00059dc, 0x11e83: 0xe0009e47, + 0x11e85: 0xe000a73f, 0x11e87: 0xe00061a5, + 0x11e8c: 0xe0006a53, + 0x11e90: 0xe000696c, 0x11e91: 0xe0006340, + 0x11e97: 0xe00056b8, + 0x11e99: 0xe0005ba7, 0x11e9b: 0xe00048d2, + 0x11e9c: 0xe0006b1e, 0x11e9d: 0xe00041c9, 0x11e9f: 0xe00091fd, + 0x11ea1: 0xe000769b, + 0x11ea4: 0xe0004f63, 0x11ea5: 0xe00094bc, 0x11ea7: 0xe00067bc, + 0x11eab: 0xe000867a, + 0x11eac: 0xe000933f, 0x11eaf: 0xe0006b21, + 0x11eb0: 0xe00074d9, 0x11eb1: 0xe00086aa, 0x11eb2: 0xe00092ab, + 0x11eb7: 0xe0005346, + 0x11eb9: 0xe000640c, + 0x11ebc: 0xe00078eb, 0x11ebd: 0xe000740f, 0x11ebf: 0xe00082ab, + // Block 0x47b, offset 0x11ec0 + 0x11ec1: 0xe0006410, 0x11ec2: 0xe0005129, 0x11ec3: 0xe0008a25, + 0x11ec4: 0xe000608a, 0x11ec5: 0xe00058f2, 0x11ec6: 0xe0009d84, + 0x11eca: 0xe000646c, 0x11ecb: 0xe0006e70, + 0x11ecc: 0xe0008b89, 0x11ecf: 0xe0008dd9, + 0x11ed2: 0xe0005c2a, + 0x11ed7: 0xe0005084, + 0x11ee0: 0xe000614d, 0x11ee3: 0xe0005087, + 0x11ee5: 0xe0008566, 0x11ee6: 0xe000534a, + 0x11ee8: 0xe0009073, 0x11ee9: 0xe0008d04, + 0x11eec: 0xe00072e1, 0x11eed: 0xe000806a, + 0x11ef1: 0xe000a067, 0x11ef2: 0xe00054f4, + 0x11ef4: 0xe0007fea, + 0x11efa: 0xe0007e49, 0x11efb: 0xe0006264, + 0x11efc: 0xe0006268, 0x11efd: 0xe00055f9, 0x11eff: 0xe0007c88, + // Block 0x47c, offset 0x11f00 + 0x11f00: 0xe000832e, 0x11f03: 0xe00099a0, + 0x11f06: 0xe000490a, 0x11f07: 0xe00073d6, + 0x11f09: 0xe0006414, 0x11f0a: 0xe000a436, + 0x11f0c: 0xe00093b3, 0x11f0e: 0xe0005ffc, 0x11f0f: 0xe000a4d9, + 0x11f10: 0xe0006880, 0x11f11: 0xe0004fc3, 0x11f13: 0xe00079e7, + 0x11f14: 0xe0006e08, 0x11f15: 0xe000a89f, + 0x11f1b: 0xe00044e5, + 0x11f1e: 0xe000662c, 0x11f1f: 0xe0006fe0, + 0x11f20: 0xe0007b53, 0x11f21: 0xe000a2f1, + 0x11f24: 0xe0005a58, 0x11f25: 0xe00098fa, 0x11f27: 0xe0005f0f, + 0x11f28: 0xe000867e, 0x11f2b: 0xe0004d2b, + 0x11f2d: 0xe000705a, 0x11f2f: 0xe0007412, + 0x11f30: 0xe0009ffc, 0x11f31: 0xe000806e, + 0x11f34: 0xe0006117, 0x11f35: 0xe0005319, 0x11f36: 0xe00093b7, 0x11f37: 0xe0007d2e, + 0x11f3a: 0xe0006630, 0x11f3b: 0xe0007733, + // Block 0x47d, offset 0x11f40 + 0x11f41: 0xe0008d07, 0x11f42: 0xe0007415, 0x11f43: 0xe000a658, + 0x11f44: 0xe000a65c, + 0x11f48: 0xe0004c29, 0x11f49: 0xe0009111, 0x11f4b: 0xe0009115, + 0x11f4c: 0xe0006d24, 0x11f4e: 0xe000a539, 0x11f4f: 0xe000766f, + 0x11f59: 0xe0008f69, 0x11f5b: 0xe000a2a9, + 0x11f5d: 0xe0008eb6, 0x11f5e: 0xe000a940, 0x11f5f: 0xe0006fe4, + 0x11f61: 0xe0009eb9, 0x11f62: 0xe0008acd, + 0x11f64: 0xe0007c8b, 0x11f65: 0xe000a5d0, 0x11f66: 0xe000a6cd, 0x11f67: 0xe000a439, + 0x11f68: 0xe00074dd, 0x11f69: 0xe0005e43, 0x11f6b: 0xe0009b14, + 0x11f6c: 0xe000724f, 0x11f6e: 0xe0006688, 0x11f6f: 0xe00046d5, + 0x11f70: 0xe0006e34, 0x11f73: 0xe0006e0c, + 0x11f74: 0xe0009668, 0x11f76: 0xe0008b8d, 0x11f77: 0xe0004e97, + 0x11f78: 0xe0008b91, 0x11f7a: 0xe0009076, 0x11f7b: 0xe00076f7, + // Block 0x47e, offset 0x11f80 + 0x11f84: 0xe000a806, 0x11f87: 0xe0004181, + 0x11f88: 0xe000a7de, 0x11f89: 0xe000a83c, 0x11f8b: 0xe000628c, + 0x11f8c: 0xe0004edc, 0x11f8e: 0xe0007b57, + 0x11f90: 0xe00081b5, 0x11f91: 0xe0006d9e, + 0x11f96: 0xe00051c0, 0x11f97: 0xe00076db, + 0x11f98: 0xe0007879, + 0x11f9d: 0xe0006000, 0x11f9e: 0xe0004c2c, + 0x11fa0: 0xe000482c, 0x11fa2: 0xe00093bb, 0x11fa3: 0xe000512c, + 0x11fab: 0xe00086e6, + 0x11fac: 0xe0006f50, 0x11fae: 0xe000604b, + 0x11fb1: 0xe000531d, 0x11fb2: 0xe000874e, 0x11fb3: 0xe000a3f1, + 0x11fb4: 0xe0009edb, 0x11fb5: 0xe000a0a3, + 0x11fb8: 0xe0005bc8, 0x11fb9: 0xe0006f68, 0x11fbb: 0xe00046d9, + 0x11fbe: 0xe00055fd, 0x11fbf: 0xe000a96a, + // Block 0x47f, offset 0x11fc0 + 0x11fc0: 0xe00079aa, 0x11fc1: 0xe000512f, + 0x11fc4: 0xe0007b2b, 0x11fc5: 0xe0007b37, 0x11fc6: 0xe0005938, 0x11fc7: 0xe00053d6, + 0x11fc9: 0xe000a742, + 0x11fd3: 0xe0009ebc, + 0x11fd6: 0xe0007766, + 0x11fd9: 0xe0006da1, 0x11fda: 0xe00060e8, 0x11fdb: 0xe000a7e2, + 0x11fdc: 0xe0007ec2, 0x11fdd: 0xe0009edf, + 0x11fe0: 0xe0004b11, 0x11fe3: 0xe0007a9b, + 0x11fe6: 0xe000a943, + 0x11fe8: 0xe0005b4e, 0x11fe9: 0xe0005210, 0x11fea: 0xe0005772, + 0x11fec: 0xe0007183, 0x11fee: 0xe0007987, 0x11fef: 0xe0009790, + 0x11ff0: 0xe0007e41, 0x11ff2: 0xe00048d6, 0x11ff3: 0xe0007bef, + 0x11ff4: 0xe00046dd, 0x11ff7: 0xe00042bc, + 0x11ff8: 0xe0006da4, 0x11ff9: 0xe0008d0d, 0x11ffa: 0xe0008d0a, + 0x11ffc: 0xe0005e47, 0x11ffe: 0xe0009025, 0x11fff: 0xe0009697, + // Block 0x480, offset 0x12000 + 0x12000: 0xe0009802, 0x12003: 0xe000a6d0, + 0x12005: 0xe0004568, + 0x12008: 0xe0008186, 0x12009: 0xe0008242, 0x1200b: 0xe0006928, + 0x1200c: 0xe0006398, 0x1200d: 0xe00066d9, + 0x12014: 0xe0006bc4, 0x12015: 0xe0009201, 0x12017: 0xe000583b, + 0x1201b: 0xe0005ecb, + 0x1201d: 0xe0008d10, 0x1201e: 0xe000508a, 0x1201f: 0xe000508d, + 0x12023: 0xe000568d, + 0x12026: 0xe00060d8, 0x12027: 0xe0005b32, + 0x12028: 0xe00060a8, 0x1202a: 0xe00061ff, 0x1202b: 0xe0005e9f, + 0x1202c: 0xe0006729, 0x1202d: 0xe0009317, 0x1202e: 0xe000990a, + 0x12031: 0xe0008eb9, 0x12033: 0xe0009d58, + 0x12034: 0xe00062d4, 0x12036: 0xe0009ac3, + 0x1203a: 0xe0004e5b, + 0x1203d: 0xe000a78d, + // Block 0x481, offset 0x12040 + 0x12045: 0xe000803e, 0x12046: 0xe000424c, + 0x12049: 0xe0006c50, + 0x1204e: 0xe0005cfd, 0x1204f: 0xe000a1fe, + 0x12050: 0xe0008809, 0x12051: 0xe00097b0, 0x12053: 0xe0009ef7, + 0x12056: 0xe0008752, + 0x1205c: 0xe00056bb, 0x1205e: 0xe0005090, 0x1205f: 0xe00070f8, + 0x12060: 0xe0004410, + 0x1206a: 0xe0009745, + 0x1206c: 0xe0008156, 0x1206d: 0xe000a15b, 0x1206f: 0xe000649e, + 0x12070: 0xe000455c, 0x12071: 0xe0005649, 0x12072: 0xe0004883, 0x12073: 0xe000611a, + 0x12075: 0xe0008874, 0x12077: 0xe0009cdc, + 0x1207b: 0xe00052e5, + 0x1207c: 0xe00088b9, 0x1207e: 0xe0007150, 0x1207f: 0xe0009d2c, + // Block 0x482, offset 0x12080 + 0x12087: 0xe000696f, + 0x12089: 0xe0007e4d, 0x1208b: 0xe0006418, + 0x1208c: 0xe00068b4, 0x1208f: 0xe00051e8, + 0x12090: 0xe0006e10, 0x12093: 0xe00056be, + 0x12095: 0xe0009a5e, 0x12097: 0xe0005db1, + 0x12098: 0xe0007c2b, 0x12099: 0xe0007dc7, 0x1209a: 0xe0005f12, + 0x1209c: 0xe00049f0, 0x1209d: 0xe0009079, + 0x120af: 0xe000482f, + 0x120b0: 0xe0009e14, 0x120b2: 0xe0007454, 0x120b3: 0xe000907c, + 0x120b6: 0xe0004184, 0x120b7: 0xe0004187, + 0x120b8: 0xe0004c86, + 0x120be: 0xe0007418, + // Block 0x483, offset 0x120c0 + 0x120c1: 0xe0009ade, + 0x120c4: 0xe0006634, 0x120c5: 0xe0005305, + 0x120ca: 0xe0008e51, + 0x120cf: 0xe00064e0, + 0x120d0: 0xe000604e, 0x120d1: 0xe0004314, 0x120d2: 0xe0009a4e, 0x120d3: 0xe0007ad7, + 0x120d4: 0xe0008245, 0x120d7: 0xe0007168, + 0x120d8: 0xe000862c, 0x120d9: 0xe000a12b, 0x120da: 0xe0008248, + 0x120dd: 0xe0009b18, 0x120de: 0xe00086ae, 0x120df: 0xe00051fc, + 0x120e2: 0xe00088bc, + 0x120e9: 0xe0004c89, + 0x120ec: 0xe0004250, 0x120ef: 0xe000418a, + 0x120f0: 0xe000521d, 0x120f1: 0xe0008ebc, 0x120f3: 0xe0005c2d, + 0x120f4: 0xe000741b, 0x120f5: 0xe0009461, 0x120f6: 0xe0006b24, + 0x120f9: 0xe0007457, 0x120fb: 0xe0006b27, + 0x120fe: 0xe0008b95, + // Block 0x484, offset 0x12100 + 0x12103: 0xe000a6f7, + 0x12112: 0xe00072e5, 0x12113: 0xe00089a1, + 0x12116: 0xe0006da7, 0x12117: 0xe0005c94, + 0x1211d: 0xe0004ae9, 0x1211e: 0xe0004290, + 0x12121: 0xe0004be1, 0x12122: 0xe00064e4, + 0x1212a: 0xe0008ebf, + 0x1212e: 0xe00084ad, 0x1212f: 0xe0008072, + 0x12131: 0xe00049c2, 0x12132: 0xe0004886, + 0x12134: 0xe0008a29, + 0x12138: 0xe000a1ea, 0x12139: 0xe0004f67, 0x1213b: 0xe00074b9, + 0x1213c: 0xe00045b5, 0x1213d: 0xe000880c, + // Block 0x485, offset 0x12140 + 0x12140: 0xe0004560, 0x12141: 0xe000a15f, 0x12142: 0xe00047b1, 0x12143: 0xe000553c, + 0x12144: 0xe0004b35, 0x12146: 0xe0004b39, + 0x12148: 0xe0007673, 0x12149: 0xe000768b, + 0x1214e: 0xe00091c1, + 0x12150: 0xe000564d, 0x12151: 0xe0006cdc, 0x12153: 0xe000a5d4, + 0x12154: 0xe0005187, + 0x1216d: 0xe0009119, 0x1216f: 0xe0008c3d, + 0x12174: 0xe0006819, 0x12176: 0xe0009c66, 0x12177: 0xe0004224, + 0x1217e: 0xe0004dc3, 0x1217f: 0xe0004254, + // Block 0x486, offset 0x12180 + 0x12181: 0xe00058a1, 0x12183: 0xe0008c41, + 0x12185: 0xe0005f15, 0x12186: 0xe0006470, + 0x1218f: 0xe00048da, + 0x12193: 0xe000880f, + 0x12194: 0xe00099ba, 0x12197: 0xe00046e1, + 0x1219b: 0xe00051b3, + 0x1219d: 0xe0008d13, 0x1219f: 0xe000a745, + 0x121a0: 0xe000591c, 0x121a1: 0xe0007de5, 0x121a2: 0xe00096e2, 0x121a3: 0xe000757d, + 0x121a7: 0xe0007c8e, + 0x121a8: 0xe0005d00, + 0x121ad: 0xe0006b2a, 0x121af: 0xe0008c89, + 0x121b0: 0xe00047b4, 0x121b1: 0xe000490e, 0x121b3: 0xe000705d, + 0x121b5: 0xe0006550, 0x121b6: 0xe0006202, + // Block 0x487, offset 0x121c0 + 0x121c4: 0xe0005096, 0x121c5: 0xe0006638, + 0x121c9: 0xe0005fac, 0x121ca: 0xe0005132, 0x121cb: 0xe0005093, + 0x121cc: 0xe0009457, 0x121cd: 0xe0004912, + 0x121d0: 0xe00069e1, 0x121d2: 0xe0006749, + 0x121d5: 0xe0008e19, 0x121d6: 0xe0008c45, 0x121d7: 0xe0008d16, + 0x121d8: 0xe0004f37, 0x121da: 0xe000692c, + 0x121df: 0xe0005651, + 0x121e0: 0xe0005466, 0x121e3: 0xe00096b5, + 0x121e7: 0xe00086c6, + 0x121e8: 0xe00047b7, + 0x121ec: 0xe0004e37, 0x121ee: 0xe0006c54, + 0x121f2: 0xe0006daa, + 0x121f9: 0xe000553f, 0x121fa: 0xe0004a69, 0x121fb: 0xe00068b8, + 0x121fc: 0xe00068bc, + // Block 0x488, offset 0x12200 + 0x12200: 0xe0007de9, 0x12201: 0xe0004a45, + 0x12204: 0xe0008b31, 0x12205: 0xe0008417, + 0x1220b: 0xe00058cd, + 0x1220d: 0xe0007489, 0x1220e: 0xe0009826, + 0x12211: 0xe00069e4, 0x12212: 0xe00096e5, + 0x12219: 0xe0009407, + 0x12227: 0xe0006004, + 0x12230: 0xe0007812, + 0x12234: 0xe0005382, 0x12236: 0xe0008e55, + 0x12239: 0xe0009a82, + 0x1223d: 0xe0007a2f, 0x1223f: 0xe00098fe, + // Block 0x489, offset 0x12240 + 0x12242: 0xe0006b96, + 0x1224a: 0xe000787d, + 0x1224f: 0xe0004edf, + 0x12253: 0xe0009f48, + 0x12254: 0xe0006f18, 0x12255: 0xe0009ac6, 0x12257: 0xe0004524, + 0x12259: 0xe0006150, 0x1225a: 0xe00096e8, + 0x1225d: 0xe000599c, 0x1225e: 0xe0005ccc, + 0x12260: 0xe00051ec, 0x12261: 0xe000824b, 0x12262: 0xe000824e, 0x12263: 0xe0006205, + 0x12265: 0xe000815a, + 0x12268: 0xe0008b99, 0x1226a: 0xe0008b35, 0x1226b: 0xe0009009, + 0x1226c: 0xe00042e0, 0x1226d: 0xe000799b, 0x1226e: 0xe0008877, 0x1226f: 0xe00072e9, + 0x12273: 0xe0005f30, + 0x12275: 0xe0004f3b, 0x12277: 0xe000a1a7, + 0x12278: 0xe0009829, 0x12279: 0xe0007b5b, + // Block 0x48a, offset 0x12280 + 0x1228e: 0xe00041cc, + 0x12291: 0xe000681c, + 0x12294: 0xe0005857, 0x12295: 0xe0007f66, + 0x12298: 0xe0004d2e, 0x1229b: 0xe000911d, + 0x1229c: 0xe000641c, 0x1229f: 0xe0008836, + 0x122a4: 0xe000456c, 0x122a5: 0xe000a660, 0x122a6: 0xe0004294, 0x122a7: 0xe0006972, + 0x122ad: 0xe0006b99, 0x122ae: 0xe0007b5f, + 0x122b0: 0xe00090c1, 0x122b1: 0xe000980b, + 0x122b4: 0xe0005c30, 0x122b7: 0xe0004c2f, + 0x122bb: 0xe0009bc4, + 0x122bc: 0xe000a12f, 0x122be: 0xe000496a, + // Block 0x48b, offset 0x122c0 + 0x122c0: 0xe0004889, 0x122c1: 0xe0004832, 0x122c3: 0xe0006344, + 0x122c7: 0xe0008a2d, + 0x122ca: 0xe0006bc8, 0x122cb: 0xe0004c8c, + 0x122cc: 0xe0009c89, 0x122cd: 0xe00093bf, 0x122ce: 0xe000927e, + 0x122d0: 0xe0004b87, 0x122d3: 0xe00049c6, + 0x122e5: 0xe000a40c, 0x122e6: 0xe0007fb2, 0x122e7: 0xe000936b, + 0x122e8: 0xe0004a39, 0x122e9: 0xe0004482, 0x122ea: 0xe000445b, + 0x122ed: 0xe0006d5c, + 0x122f2: 0xe00048ee, + 0x122f9: 0xe000488c, 0x122fb: 0xe0004eaf, + 0x122fd: 0xe0008d19, 0x122ff: 0xe0004f6b, + // Block 0x48c, offset 0x12300 + 0x12300: 0xe0008949, 0x12302: 0xe000761b, + 0x12305: 0xe0008e59, + 0x1230a: 0xe00064fc, 0x1230b: 0xe0009c7e, + 0x12311: 0xe00058a5, 0x12312: 0xe00062b8, 0x12313: 0xe0005bf4, + 0x12314: 0xe00070c3, 0x12317: 0xe000887a, + 0x12319: 0xe0009efa, 0x1231b: 0xe0004ee2, + 0x1231e: 0xe000982c, 0x1231f: 0xe0008756, + 0x12321: 0xe0006051, 0x12323: 0xe0007881, + 0x1232b: 0xe0004611, + 0x12335: 0xe00096eb, + 0x12338: 0xe00062d8, 0x12339: 0xe00071c5, 0x1233a: 0xe000a556, 0x1233b: 0xe0004e7f, + 0x1233d: 0xe0008f6d, + // Block 0x48d, offset 0x12340 + 0x12343: 0xe0006540, + 0x12344: 0xe0004318, 0x12347: 0xe0009982, + 0x12348: 0xe0007ec5, 0x1234a: 0xe0005c51, 0x1234b: 0xe0004be4, + 0x12350: 0xe0009b38, 0x12352: 0xe000808e, 0x12353: 0xe00072ed, + 0x12358: 0xe0004f23, 0x12359: 0xe0005714, 0x1235a: 0xe00072c5, + 0x1235f: 0xe0005099, + 0x12361: 0xe0006ce0, 0x12362: 0xe0009ae1, + 0x12366: 0xe0005691, + 0x1236b: 0xe000a71f, + 0x12375: 0xe0006c14, + 0x1237f: 0xe0004414, + // Block 0x48e, offset 0x12380 + 0x12380: 0xe000534e, + 0x12384: 0xe00045b9, + 0x12389: 0xe0008b9d, + 0x1238d: 0xe000791b, 0x1238e: 0xe0004fc7, + 0x12390: 0xe0009614, + 0x12394: 0xe000548a, 0x12397: 0xe0006590, + 0x1239c: 0xe000a6d3, 0x1239d: 0xe0009015, 0x1239f: 0xe00041cf, + 0x123a0: 0xe0004761, 0x123a2: 0xe000457c, 0x123a3: 0xe000875a, + 0x123ae: 0xe000559c, + 0x123b3: 0xe0006a57, + 0x123b6: 0xe0007b0f, + 0x123bb: 0xe000a0d7, + 0x123bc: 0xe0008386, 0x123bf: 0xe0007b0b, + // Block 0x48f, offset 0x123c0 + 0x123c2: 0xe0005542, 0x123c3: 0xe0004e5e, + 0x123d3: 0xe0005a9a, + 0x123da: 0xe00058f5, 0x123db: 0xe0009001, + 0x123dc: 0xe000488f, 0x123dd: 0xe00055e5, 0x123de: 0xe0007a9f, 0x123df: 0xe0005954, + 0x123ea: 0xe0005958, + 0x123ec: 0xe0009a3a, + 0x123f6: 0xe000a249, + 0x123fb: 0xe00077e0, + 0x123fc: 0xe0009618, + // Block 0x490, offset 0x12400 + 0x12402: 0xe0006310, 0x12403: 0xe000936f, + 0x12404: 0xe00057b3, + 0x1240a: 0xe0004e23, + 0x1240c: 0xe000875e, + 0x12411: 0xe00092ff, 0x12412: 0xe00057b7, + 0x12416: 0xe0005803, + 0x1241e: 0xe0005a5c, + 0x12420: 0xe000a8eb, 0x12421: 0xe000925a, 0x12423: 0xe000a8a3, + 0x1242c: 0xe000a1ce, + 0x12432: 0xe0007f26, + 0x12437: 0xe000a96d, + 0x12438: 0xe0007790, 0x12439: 0xe0008447, 0x1243a: 0xe000509c, 0x1243b: 0xe000a7fa, + 0x1243d: 0xe000a8ef, 0x1243e: 0xe0004a6d, 0x1243f: 0xe000435c, + // Block 0x491, offset 0x12440 + 0x12443: 0xe0006c8c, + 0x12446: 0xe000a8f3, 0x12447: 0xe000a261, + 0x12449: 0xe0004681, + 0x1244c: 0xe000418d, 0x1244e: 0xe0009b6c, + 0x12450: 0xe0004c8f, + 0x12454: 0xe000a242, + 0x12459: 0xe000a90f, 0x1245a: 0xe0006ee8, 0x1245b: 0xe0004360, + 0x1245f: 0xe00079ba, + 0x12460: 0xe00095cc, 0x12461: 0xe000a5cc, 0x12462: 0xe000907f, 0x12463: 0xe0008ba1, + 0x12464: 0xe000925d, 0x12465: 0xe000668b, 0x12466: 0xe0006153, 0x12467: 0xe0005135, + 0x1246a: 0xe0007e6b, + 0x12472: 0xe000701e, + 0x12477: 0xe000593c, + 0x12478: 0xe0004e9a, 0x1247b: 0xe0006b2d, + 0x1247f: 0xe00060cc, + // Block 0x492, offset 0x12480 + 0x12480: 0xe0007f0a, 0x12482: 0xe0008d91, 0x12483: 0xe0007737, + 0x12484: 0xe0009121, 0x12486: 0xe0009c03, + 0x12489: 0xe00072f1, 0x1248a: 0xe00071c8, + 0x1248d: 0xe0009f24, + 0x12491: 0xe0005047, + 0x12496: 0xe000748d, + 0x12498: 0xe00086ca, + 0x1249e: 0xe0008092, + 0x124a2: 0xe00096b8, + 0x124a4: 0xe0006d28, + 0x124ab: 0xe0009b88, + 0x124ad: 0xe0004418, 0x124ae: 0xe00059e0, 0x124af: 0xe0006a5b, + 0x124b2: 0xe0006f6c, 0x124b3: 0xe0007252, + 0x124b5: 0xe0005352, 0x124b7: 0xe0008362, + 0x124ba: 0xe0006c40, + 0x124bc: 0xe00041f8, 0x124bd: 0xe000a763, 0x124bf: 0xe00089a5, + // Block 0x493, offset 0x124c0 + 0x124c1: 0xe000a824, + 0x124c4: 0xe00045d1, 0x124c5: 0xe000841a, 0x124c6: 0xe0004c92, + 0x124cb: 0xe0006156, + 0x124cd: 0xe0006054, 0x124cf: 0xe0005f18, + 0x124d2: 0xe00055bd, 0x124d3: 0xe00082fa, + 0x124d4: 0xe0006975, 0x124d6: 0xe0006978, 0x124d7: 0xe000697b, + 0x124d8: 0xe000697e, 0x124da: 0xe0009373, 0x124db: 0xe0006057, + 0x124eb: 0xe000a43c, + 0x124ec: 0xe0004c95, 0x124ef: 0xe000541e, + 0x124f3: 0xe0009985, + 0x124ff: 0xe0006c34, + // Block 0x494, offset 0x12500 + 0x12505: 0xe000940b, + 0x12508: 0xe00089a9, + 0x1250f: 0xe00075a5, + 0x12510: 0xe00088bf, 0x12511: 0xe000626c, 0x12513: 0xe0005f6c, + 0x1251b: 0xe00068c0, + 0x12523: 0xe000509f, + 0x12524: 0xe000853e, + 0x12533: 0xe0007d32, + 0x12534: 0xe00071cb, 0x12537: 0xe0006ab7, + 0x12538: 0xe0007b63, + 0x1253e: 0xe0006554, 0x1253f: 0xe0004e82, + // Block 0x495, offset 0x12540 + 0x12540: 0xe0008ba5, 0x12541: 0xe000900d, 0x12542: 0xe0004c98, 0x12543: 0xe0009d5c, + 0x1254b: 0xe00086b2, + 0x1254e: 0xe0006558, 0x1254f: 0xe00054f7, + 0x12550: 0xe0006e14, 0x12552: 0xe0005eef, + 0x12554: 0xe000a8db, 0x12555: 0xe0006be8, 0x12557: 0xe000a06b, + 0x12559: 0xe0007cd0, 0x1255a: 0xe0007c91, 0x1255b: 0xe0007529, + 0x1255c: 0xe0006b9c, 0x1255d: 0xe00079bd, 0x1255e: 0xe000a519, 0x1255f: 0xe00043c0, + 0x12560: 0xe0009082, + 0x12568: 0xe000495e, 0x1256a: 0xe0007e51, + 0x1256d: 0xe0007bf2, + 0x12570: 0xe0009c06, 0x12572: 0xe000500f, + 0x12574: 0xe0009d48, 0x12576: 0xe00061a9, + 0x1257a: 0xe0004639, + 0x1257d: 0xe00050a2, 0x1257e: 0xe0006884, + // Block 0x496, offset 0x12580 + 0x12581: 0xe0007565, 0x12582: 0xe00050a5, 0x12583: 0xe0007cfe, + 0x12584: 0xe00080be, 0x12585: 0xe0008116, 0x12586: 0xe000a163, 0x12587: 0xe0007a33, + 0x12588: 0xe0009a62, 0x12589: 0xe0009a86, + 0x1258c: 0xe0005601, 0x1258d: 0xe000a4a5, + 0x12590: 0xe00060ac, 0x12592: 0xe00060d0, 0x12593: 0xe000543a, + 0x12594: 0xe0005fb0, 0x12595: 0xe00061e5, 0x12596: 0xe000991e, + 0x12598: 0xe00069e7, 0x12599: 0xe0006b30, 0x1259a: 0xe0009085, 0x1259b: 0xe0009d6c, + 0x125ab: 0xe0005ea3, + 0x125ac: 0xe0005f33, 0x125ae: 0xe000887d, + 0x125b0: 0xe0009b3c, 0x125b1: 0xe0009ae4, 0x125b3: 0xe0009fff, + 0x125b8: 0xe0006981, 0x125b9: 0xe0008251, 0x125bb: 0xe00099bd, + 0x125bc: 0xe0007060, 0x125bd: 0xe0004835, 0x125be: 0xe00095e8, 0x125bf: 0xe0007a37, + // Block 0x497, offset 0x125c0 + 0x125c1: 0xe000a664, 0x125c2: 0xe000a395, + 0x125c4: 0xe0006f1c, 0x125c5: 0xe0007255, 0x125c6: 0xe000857a, + 0x125c9: 0xe0009514, 0x125ca: 0xe00062dc, + 0x125cc: 0xe0009f95, + 0x125d0: 0xe0005cb4, 0x125d1: 0xe00082ae, 0x125d3: 0xe000a51d, + 0x125d4: 0xe0004364, 0x125d5: 0xe0006578, 0x125d7: 0xe0006b33, + 0x125d9: 0xe0009e28, 0x125da: 0xe000862f, 0x125db: 0xe000655c, + 0x125dc: 0xe00090c4, 0x125dd: 0xe00070c6, + 0x125e0: 0xe0005a60, 0x125e1: 0xe0009e86, 0x125e2: 0xe0009cdf, 0x125e3: 0xe00083de, + 0x125e5: 0xe00052fc, + 0x125e8: 0xe0008ec2, 0x125eb: 0xe000a2ad, + 0x125ee: 0xe0006348, 0x125ef: 0xe0006270, + 0x125f0: 0xe0009c09, 0x125f1: 0xe000774b, 0x125f3: 0xe0007b67, + // Block 0x498, offset 0x12600 + 0x12604: 0xe000a6fa, 0x12607: 0xe0008542, + 0x1260a: 0xe0009558, 0x1260b: 0xe0007885, + 0x1260c: 0xe00059c0, + 0x12611: 0xe000668e, 0x12612: 0xe0007033, + 0x12617: 0xe0007021, + 0x12619: 0xe00071ce, 0x1261b: 0xe0005787, + 0x1261e: 0xe0005655, 0x1261f: 0xe00084b0, + 0x12625: 0xe0009125, 0x12627: 0xe0008254, + 0x12629: 0xe0006f20, 0x1262a: 0xe000a521, 0x1262b: 0xe000a28d, + 0x1262c: 0xe0007114, 0x1262e: 0xe000559f, + 0x12632: 0xe0008ec5, + 0x12635: 0xe00072f5, 0x12636: 0xe000a88b, + 0x12638: 0xe0004b15, 0x12639: 0xe000811a, 0x1263a: 0xe000602c, 0x1263b: 0xe000a624, + 0x1263c: 0xe0007dca, 0x1263d: 0xe000a903, 0x1263e: 0xe0009ce2, + // Block 0x499, offset 0x12640 + 0x12641: 0xe0005c33, + 0x12659: 0xe0008ab5, 0x1265a: 0xe0008f71, + 0x1265c: 0xe0006a5f, + 0x12661: 0xe00063d8, 0x12663: 0xe0007ded, + 0x12664: 0xe0004bb6, 0x12665: 0xe00083ee, 0x12666: 0xe0009e89, 0x12667: 0xe0007bbf, + 0x12669: 0xe000a43f, 0x1266a: 0xe000583f, + 0x1266c: 0xe0005d03, 0x1266e: 0xe00067bf, + 0x12674: 0xe0007f2a, 0x12677: 0xe000a1aa, + 0x12678: 0xe0009a66, 0x12679: 0xe000a349, + 0x1267f: 0xe0009d6f, + // Block 0x49a, offset 0x12680 + 0x12682: 0xe00055a2, + 0x12685: 0xe0007ac3, 0x12687: 0xe00046e5, + 0x12688: 0xe0007063, 0x12689: 0xe0006fa4, + 0x1268c: 0xe0007f6a, 0x1268d: 0xe000a748, 0x1268e: 0xe0007a3b, + 0x12691: 0xe00070fc, 0x12693: 0xe0007a3f, + 0x12694: 0xe00086fa, 0x12695: 0xe000969a, 0x12696: 0xe0005d3f, + 0x126aa: 0xe000681f, 0x126ab: 0xe0004a9d, + 0x126af: 0xe0007769, + 0x126b2: 0xe00077c0, + 0x126b4: 0xe0007e39, 0x126b5: 0xe000a0db, 0x126b7: 0xe0005695, + 0x126b8: 0xe000a7a5, + 0x126bc: 0xe00058d1, 0x126bf: 0xe0009b40, + // Block 0x49b, offset 0x126c0 + 0x126c0: 0xe0008ba9, 0x126c3: 0xe0004e27, + 0x126c4: 0xe00099c0, 0x126c5: 0xe0006e18, 0x126c6: 0xe000a74b, 0x126c7: 0xe00050a8, + 0x126c8: 0xe0004de3, 0x126cb: 0xe0005db5, + 0x126cf: 0xe000a442, + 0x126d1: 0xe0007299, 0x126d2: 0xe0009491, + 0x126d6: 0xe00052c3, + 0x126d8: 0xe0005545, 0x126d9: 0xe0008e1d, 0x126da: 0xe0005bf7, + 0x126dd: 0xe00069ea, 0x126de: 0xe0007154, + 0x126e0: 0xe00069ed, 0x126e1: 0xe00053da, 0x126e2: 0xe0007a07, + 0x126e4: 0xe0007909, 0x126e5: 0xe0005b12, 0x126e6: 0xe0004368, + 0x126e8: 0xe0008bad, 0x126ea: 0xe0005c7c, 0x126eb: 0xe00083b2, + 0x126ec: 0xe0007388, 0x126ee: 0xe000a6d6, + 0x126f1: 0xe0007569, 0x126f3: 0xe00072f9, + 0x126f5: 0xe0007a43, 0x126f6: 0xe000587b, 0x126f7: 0xe000a4dd, + 0x126f8: 0xe000966c, 0x126f9: 0xe000797b, 0x126fa: 0xe0009518, 0x126fb: 0xe00095ec, + 0x126fc: 0xe000612c, + // Block 0x49c, offset 0x12700 + 0x12717: 0xe0006c58, + 0x12719: 0xe000a5d8, 0x1271a: 0xe0008880, 0x1271b: 0xe000431c, + 0x1271d: 0xe0009cb0, 0x1271f: 0xe0008bb1, + 0x12720: 0xe00044ca, 0x12721: 0xe0005548, 0x12723: 0xe0006b36, + 0x12724: 0xe00063b4, 0x12725: 0xe000761f, 0x12726: 0xe0007da6, + 0x12728: 0xe0007e8c, 0x1272b: 0xe0006f24, + 0x1272c: 0xe0009998, 0x1272d: 0xe00081b8, 0x1272f: 0xe000a167, + 0x12732: 0xe0006e74, + 0x12734: 0xe00042c0, 0x12736: 0xe0007b6b, 0x12737: 0xe0007aa3, + 0x12738: 0xe0008257, 0x1273a: 0xe000611d, + 0x1273c: 0xe0006208, 0x1273d: 0xe0008812, 0x1273e: 0xe000a4e1, + // Block 0x49d, offset 0x12740 + 0x12743: 0xe00064a1, + 0x12744: 0xe000620b, 0x12745: 0xe00059a0, + 0x1274a: 0xe0008ec8, + 0x1274d: 0xe0005356, 0x1274e: 0xe0005fd0, + 0x12751: 0xe0006de6, 0x12753: 0xe00068c4, + 0x12754: 0xe0008a31, 0x12756: 0xe000a445, + 0x12758: 0xe0006ce4, 0x1275b: 0xe00053de, + 0x1275c: 0xe0007491, 0x1275e: 0xe0008bb5, 0x1275f: 0xe000a668, + 0x12763: 0xe0006290, + 0x12767: 0xe0007f6e, + 0x1276b: 0xe000982f, + 0x1276e: 0xe000850e, 0x1276f: 0xe0009bdc, + 0x12772: 0xe000811e, 0x12773: 0xe00051f0, + 0x1277a: 0xe0006691, + // Block 0x49e, offset 0x12780 + 0x1278f: 0xe000548e, + 0x12790: 0xe0008122, + 0x12795: 0xe00060ec, 0x12796: 0xe0008f75, + 0x12798: 0xe000a133, + 0x1279c: 0xe0005c36, 0x1279d: 0xe0004c9b, 0x1279f: 0xe0006008, + 0x127a2: 0xe000856a, + 0x127a5: 0xe00067c2, 0x127a7: 0xe0005c9c, + 0x127aa: 0xe00047ba, 0x127ab: 0xe0007d0e, + 0x127af: 0xe0007066, + 0x127b1: 0xe0009129, 0x127b2: 0xe0007258, + 0x127b5: 0xe000838a, 0x127b6: 0xe0007f72, 0x127b7: 0xe000a4f5, + 0x127ba: 0xe0005315, + 0x127bd: 0xe0007f3a, + // Block 0x49f, offset 0x127c0 + 0x127c2: 0xe0006420, 0x127c3: 0xe0007d8a, + 0x127c4: 0xe00093c3, 0x127c5: 0xe0005fe0, + 0x127c8: 0xe000a4a8, 0x127c9: 0xe000a66c, 0x127cb: 0xe00085f0, + 0x127cc: 0xe00094c0, 0x127ce: 0xe000a399, + 0x127d1: 0xe000a628, 0x127d3: 0xe0008815, + 0x127d4: 0xe000554b, 0x127d5: 0xe000573c, + 0x127d9: 0xe000a6fd, + 0x127ec: 0xe000a4ab, 0x127ed: 0xe0009fb9, 0x127ef: 0xe000969d, + 0x127f4: 0xe0008901, 0x127f5: 0xe00062bc, 0x127f7: 0xe0005ac7, + 0x127f8: 0xe000a448, + 0x127fe: 0xe0004916, 0x127ff: 0xe0005e4b, + // Block 0x4a0, offset 0x12800 + 0x12801: 0xe00078ee, 0x12802: 0xe0009efd, + 0x12804: 0xe0007793, 0x12806: 0xe0009a52, + 0x12809: 0xe0005b16, + 0x1280c: 0xe0004fa3, 0x1280f: 0xe0005bfa, + 0x12811: 0xe000445e, 0x12813: 0xe0005d42, + 0x12814: 0xe0007a47, 0x12815: 0xe0008d1c, + 0x12819: 0xe0005386, 0x1281a: 0xe0004d31, + 0x12820: 0xe0005e0f, 0x12822: 0xe000a06f, 0x12823: 0xe0005974, + 0x1282a: 0xe000844a, 0x1282b: 0xe0005e4f, + 0x1282c: 0xe0009088, 0x1282d: 0xe0005ef3, + 0x12830: 0xe0006940, 0x12831: 0xe00071d1, 0x12832: 0xe00093c7, 0x12833: 0xe00087ca, + 0x12838: 0xe0008ae1, + 0x1283c: 0xe000980e, 0x1283e: 0xe00078bd, 0x1283f: 0xe0008762, + // Block 0x4a1, offset 0x12840 + 0x12841: 0xe0007b6f, + 0x1284f: 0xe000833a, + 0x12851: 0xe00063b8, + 0x12854: 0xe000463d, 0x12857: 0xe000920d, + 0x12858: 0xe000634c, 0x12859: 0xe0004ee5, 0x1285a: 0xe000729d, 0x1285b: 0xe00086ea, + 0x1285c: 0xe00086fe, 0x1285d: 0xe000a913, 0x1285e: 0xe0005a9d, 0x1285f: 0xe0006e1c, + 0x12861: 0xe0005619, 0x12862: 0xe000a670, + 0x12864: 0xe0008316, 0x12866: 0xe0005bcb, + 0x1286d: 0xe00053e2, 0x1286e: 0xe0008d1f, 0x1286f: 0xe0007581, + 0x12870: 0xe0004e61, + 0x12874: 0xe00088c2, + 0x12878: 0xe0006c18, 0x1287a: 0xe00086ce, + 0x1287c: 0xe0005659, 0x1287d: 0xe0006694, 0x1287e: 0xe0005d61, + // Block 0x4a2, offset 0x12880 + 0x12881: 0xe0006c78, 0x12882: 0xe0009235, + 0x12884: 0xe0009231, 0x12886: 0xe0007f0d, + 0x12888: 0xe00095a4, 0x12889: 0xe000436c, 0x1288b: 0xe000a727, + 0x1288c: 0xe000745a, 0x1288d: 0xe0008ecb, 0x1288e: 0xe0009d94, + 0x12890: 0xe0008096, 0x12892: 0xe000a53d, + 0x12894: 0xe000a44b, 0x12897: 0xe0004258, + 0x12898: 0xe0006c1c, + 0x1289f: 0xe0005cc4, + 0x128a1: 0xe0008d94, 0x128a3: 0xe000a073, + 0x128a4: 0xe0009c37, 0x128a7: 0xe0005a7f, + 0x128a8: 0xe0006de9, + 0x128ae: 0xe000a6d9, 0x128af: 0xe00092b3, + 0x128b1: 0xe00089ad, 0x128b3: 0xe0007c94, + 0x128b6: 0xe0008a35, + 0x128b9: 0xe00053e6, + 0x128be: 0xe00053a2, + // Block 0x4a3, offset 0x128c0 + 0x128c0: 0xe00045bd, 0x128c1: 0xe0009b1c, 0x128c2: 0xe00059e4, 0x128c3: 0xe0005295, + 0x128c6: 0xe00068c8, 0x128c7: 0xe0006d60, + 0x128c9: 0xe000725b, 0x128ca: 0xe0007bf5, + 0x128d5: 0xe000739e, + 0x128d8: 0xe000526d, 0x128da: 0xe0007b73, 0x128db: 0xe00060f0, + 0x128de: 0xe00069f0, 0x128df: 0xe0008c8c, + 0x128e0: 0xe000a44e, 0x128e1: 0xe000825a, + 0x128e4: 0xe000554e, + 0x128e9: 0xe000a451, 0x128eb: 0xe0005807, + 0x128ec: 0xe0008f79, 0x128ee: 0xe0006711, 0x128ef: 0xe0009b20, + 0x128f1: 0xe0006a63, 0x128f3: 0xe0008702, + 0x128f4: 0xe0007bc3, + 0x128fa: 0xe000955c, + 0x128fe: 0xe00058f8, + // Block 0x4a4, offset 0x12900 + 0x12901: 0xe0007889, + 0x12905: 0xe000a39d, 0x12906: 0xe00055c1, 0x12907: 0xe0007e5d, + 0x12909: 0xe0006b39, 0x1290b: 0xe000756d, + 0x1290f: 0xe0005c39, + 0x12911: 0xe0009ee3, 0x12912: 0xe0006d64, 0x12913: 0xe0009239, + 0x12915: 0xe0006a67, + 0x12918: 0xe0005aa0, 0x1291a: 0xe000a077, 0x1291b: 0xe0007b77, + 0x1291c: 0xe0008346, 0x1291d: 0xe0005940, 0x1291e: 0xe0008bb9, 0x1291f: 0xe0007069, + 0x12923: 0xe000a1ad, + 0x12926: 0xe00088c5, 0x12927: 0xe0005b36, + 0x12928: 0xe0005b65, + 0x1292f: 0xe0007b7b, + 0x12930: 0xe000623b, 0x12932: 0xe00059f0, + 0x12937: 0xe00084c2, + 0x12938: 0xe000961c, + 0x1293c: 0xe00078c1, 0x1293e: 0xe00057bb, + // Block 0x4a5, offset 0x12940 + 0x12944: 0xe0006fb4, + 0x1294c: 0xe0004a71, 0x1294e: 0xe0007b13, + 0x12950: 0xe000a3a1, 0x12951: 0xe0007177, 0x12953: 0xe00057d7, + 0x12958: 0xe0009b70, + 0x1295d: 0xe000a454, 0x1295e: 0xe0009d06, + 0x12963: 0xe0005e53, + 0x12969: 0xe0007b17, 0x1296b: 0xe000a559, + 0x1296f: 0xe0008c49, + 0x12970: 0xe000a6dc, + 0x12978: 0xe0004c9e, + 0x1297c: 0xe0008682, 0x1297d: 0xe0008818, 0x1297e: 0xe0008839, + // Block 0x4a6, offset 0x12980 + 0x12981: 0xe0005138, + 0x12985: 0xe00046e9, 0x12986: 0xe00061d9, + 0x1298a: 0xe0009964, + 0x1298e: 0xe0007adb, + 0x12992: 0xe00096ee, + 0x12995: 0xe000a183, + 0x12998: 0xe000a8a7, 0x12999: 0xe00085f3, 0x1299a: 0xe0004b19, + 0x129a1: 0xe0008bbd, + 0x129a4: 0xe000706c, + 0x129ab: 0xe000a2b1, + 0x129ac: 0xe00044cd, 0x129ad: 0xe0009b74, 0x129ae: 0xe0009ebf, 0x129af: 0xe000a3a5, + 0x129b0: 0xe0009ec2, 0x129b3: 0xe000663c, + 0x129b7: 0xe0008ece, + 0x129b8: 0xe0008686, 0x129b9: 0xe0008ae5, + // Block 0x4a7, offset 0x129c0 + 0x129c8: 0xe00059c4, 0x129ca: 0xe00078c5, 0x129cb: 0xe000a857, + 0x129cf: 0xe0007c97, + 0x129d3: 0xe00047e4, + 0x129d8: 0xe000a525, 0x129d9: 0xe000578b, + 0x129dc: 0xe000a812, 0x129dd: 0xe000902d, 0x129df: 0xe0007a4b, + 0x129f1: 0xe00046ed, + 0x129f9: 0xe0009d98, + 0x129fd: 0xe000674d, + // Block 0x4a8, offset 0x12a00 + 0x12a04: 0xe000a7ca, + 0x12a09: 0xe0007933, + 0x12a0c: 0xe0008f7d, + 0x12a19: 0xe00064a4, 0x12a1a: 0xe0006888, + 0x12a1c: 0xe000a4f9, 0x12a1e: 0xe0005605, + 0x12a20: 0xe000738b, 0x12a21: 0xe0006159, + 0x12a26: 0xe00096f1, + 0x12a2d: 0xe0004769, 0x12a2e: 0xe000a8bb, 0x12a2f: 0xe00086b6, + 0x12a30: 0xe0007adf, 0x12a31: 0xe000a291, + 0x12a36: 0xe0007a4f, + // Block 0x4a9, offset 0x12a40 + 0x12a46: 0xe000a023, 0x12a47: 0xe000a83f, + 0x12a49: 0xe0005978, 0x12a4a: 0xe000a80a, + 0x12a4c: 0xe000a674, 0x12a4e: 0xe00089b1, + 0x12a50: 0xe0007b7f, 0x12a52: 0xe00081eb, + 0x12a56: 0xe00051c4, 0x12a57: 0xe00051d0, + 0x12a59: 0xe0007a53, + 0x12a5c: 0xe0008076, 0x12a5e: 0xe0006c44, + 0x12a62: 0xe0004765, + 0x12a64: 0xe0005f1b, 0x12a65: 0xe000a5dc, 0x12a66: 0xe000a790, 0x12a67: 0xe0008d22, + 0x12a68: 0xe0007e8f, 0x12a69: 0xe0006500, + 0x12a6c: 0xe000788d, 0x12a6e: 0xe00085f6, + 0x12a7d: 0xe0006e78, + // Block 0x4aa, offset 0x12a80 + 0x12a80: 0xe0007b3b, + 0x12a84: 0xe0007495, 0x12a85: 0xe0007d36, 0x12a87: 0xe000a766, + 0x12a89: 0xe000809a, 0x12a8a: 0xe00080de, + 0x12a8f: 0xe000a7ce, + 0x12a92: 0xe000a3a9, + 0x12a94: 0xe0007f76, + 0x12a99: 0xe000a946, 0x12a9b: 0xe0009f27, + 0x12a9f: 0xe00072a1, + 0x12aa0: 0xe00073b6, 0x12aa2: 0xe0006751, + 0x12aa4: 0xe00084de, + 0x12aa8: 0xe00081ee, + 0x12aac: 0xe0007c9a, 0x12aaf: 0xe0006eec, + 0x12ab1: 0xe0007ac7, 0x12ab2: 0xe000476d, + 0x12ab9: 0xe000a949, 0x12aba: 0xe000a94c, + 0x12abe: 0xe00099c3, + // Block 0x4ab, offset 0x12ac0 + 0x12ac1: 0xe0007b2f, 0x12ac3: 0xe0007a57, + 0x12ac8: 0xe0005718, 0x12ac9: 0xe0005609, 0x12acb: 0xe0009748, + 0x12ace: 0xe0005baa, + 0x12ad0: 0xe0005d65, 0x12ad2: 0xe000706f, + 0x12ad4: 0xe0006504, 0x12ad5: 0xe0007a5b, 0x12ad6: 0xe0007585, + 0x12ad9: 0xe0009be4, + 0x12adf: 0xe0007b83, + 0x12ae0: 0xe0008086, + 0x12ae5: 0xe0008d25, 0x12ae6: 0xe00092b7, 0x12ae7: 0xe00071d4, + 0x12aec: 0xe000a827, 0x12aed: 0xe0009780, 0x12aee: 0xe0006fa8, + 0x12af9: 0xe000a970, 0x12afb: 0xe000a7d2, + 0x12afc: 0xe00074e1, 0x12afe: 0xe0005551, 0x12aff: 0xe0007ec8, + // Block 0x4ac, offset 0x12b00 + 0x12b00: 0xe000a27d, + 0x12b06: 0xe0009ee7, 0x12b07: 0xe0006f54, + 0x12b0b: 0xe000a7e6, + 0x12b0c: 0xe0004b3d, 0x12b0d: 0xe0006bcc, + 0x12b10: 0xe0005aa3, + 0x12b14: 0xe000a973, 0x12b17: 0xe0007b3f, + 0x12b1a: 0xe000783d, 0x12b1b: 0xe00057bf, + 0x12b1f: 0xe0004aa1, + 0x12b25: 0xe0009794, + 0x12b28: 0xe0009303, 0x12b2a: 0xe0008d28, + 0x12b2c: 0xe0009ce5, 0x12b2d: 0xe000883f, + 0x12b30: 0xe0008126, 0x12b32: 0xe00081bb, + 0x12b35: 0xe000868a, 0x12b36: 0xe00067c5, + 0x12b38: 0xe0009d09, 0x12b39: 0xe0005327, 0x12b3a: 0xe0007815, 0x12b3b: 0xe000a74e, + 0x12b3d: 0xe0006ce8, 0x12b3e: 0xe0008474, + // Block 0x4ad, offset 0x12b40 + 0x12b40: 0xe0006cec, 0x12b42: 0xe00087ce, + 0x12b46: 0xe0008766, 0x12b47: 0xe0009dc0, + 0x12b48: 0xe0009d30, 0x12b4b: 0xe0008a39, + 0x12b4c: 0xe0009d72, + 0x12b52: 0xe0009638, 0x12b53: 0xe0006474, + 0x12b54: 0xe0006314, 0x12b56: 0xe00082b1, + 0x12b58: 0xe00055c5, 0x12b59: 0xe00075bd, 0x12b5a: 0xe0009c43, 0x12b5b: 0xe0007fed, + 0x12b5d: 0xe0006a6b, 0x12b5f: 0xe000605a, + 0x12b61: 0xe000605d, 0x12b62: 0xe0005b68, + 0x12b67: 0xe00060b0, + 0x12b69: 0xe00061e9, + 0x12b6f: 0xe0004892, + 0x12b72: 0xe0006d68, + 0x12b74: 0xe00088c8, + 0x12b78: 0xe0008632, 0x12b79: 0xe0009cbe, + 0x12b7d: 0xe00045e9, + // Block 0x4ae, offset 0x12b80 + 0x12b80: 0xe0006dad, 0x12b81: 0xe0005d06, + 0x12b87: 0xe00068cc, + 0x12b8d: 0xe0004540, + 0x12b92: 0xe000a4ae, + 0x12b96: 0xe00057a7, + 0x12ba2: 0xe00055c9, + 0x12ba7: 0xe000a94f, + 0x12bac: 0xe00045ed, 0x12baf: 0xe0006560, + 0x12bb3: 0xe00086ba, + 0x12bb4: 0xe000768f, 0x12bb5: 0xe000a980, + // Block 0x4af, offset 0x12bc0 + 0x12bc0: 0xe0006cf0, 0x12bc2: 0xe0004b1d, + 0x12bc4: 0xe0008905, + 0x12bc9: 0xe00069f3, + 0x12bce: 0xe000771f, + 0x12bd0: 0xe000a457, 0x12bd2: 0xe00069f6, + 0x12bd7: 0xe0004ca1, + 0x12bd9: 0xe0008883, + 0x12be1: 0xe0004be7, 0x12be2: 0xe000a043, + 0x12be5: 0xe0007341, + 0x12be8: 0xe0008352, 0x12be9: 0xe00071d7, + 0x12bf4: 0xe0009e59, 0x12bf7: 0xe0004615, + 0x12bf8: 0xe0005d09, 0x12bf9: 0xe000a34d, 0x12bfa: 0xe000838e, 0x12bfb: 0xe0006c20, + 0x12bfc: 0xe0005843, 0x12bfd: 0xe0009d75, + // Block 0x4b0, offset 0x12c00 + 0x12c09: 0xe000513b, 0x12c0a: 0xe0007bf8, + 0x12c13: 0xe0004a1d, + 0x12c16: 0xe00093cb, 0x12c17: 0xe000844d, + 0x12c18: 0xe0008cbf, 0x12c19: 0xe0008853, 0x12c1b: 0xe0005f70, + 0x12c1c: 0xe000741e, 0x12c1d: 0xe0008e01, + 0x12c22: 0xe000a4b1, + 0x12c25: 0xe0007e7d, 0x12c27: 0xe0007dcd, + 0x12c28: 0xe000815e, 0x12c29: 0xe0006fe8, 0x12c2a: 0xe0008886, 0x12c2b: 0xe0006120, + 0x12c31: 0xe000528c, + 0x12c34: 0xe000a7a8, 0x12c36: 0xe000825d, 0x12c37: 0xe0008260, + 0x12c3e: 0xe000a62c, 0x12c3f: 0xe000812a, + // Block 0x4b1, offset 0x12c40 + 0x12c43: 0xe0007796, + 0x12c44: 0xe0007d02, 0x12c45: 0xe0006b3c, + 0x12c50: 0xe000876a, 0x12c52: 0xe0007c9d, + 0x12c57: 0xe0004e4b, + 0x12c58: 0xe0009e5c, + 0x12c5c: 0xe0005d89, + 0x12c60: 0xe0005bce, + 0x12c68: 0xe00055cd, 0x12c69: 0xe0007c2e, 0x12c6a: 0xe000a6df, 0x12c6b: 0xe000a271, + 0x12c6c: 0xe000a1d1, 0x12c6f: 0xe000a7ea, + 0x12c70: 0xe0007b87, 0x12c72: 0xe000a713, + 0x12c75: 0xe00059f8, 0x12c77: 0xe0004b41, + 0x12c78: 0xe00071da, 0x12c7a: 0xe00053a6, 0x12c7b: 0xe000a24d, + 0x12c7c: 0xe000623e, + // Block 0x4b2, offset 0x12c80 + 0x12c81: 0xe000a275, + 0x12c84: 0xe000a2b5, 0x12c86: 0xe00085f9, 0x12c87: 0xe000713c, + 0x12c88: 0xe0005aca, 0x12c89: 0xe0007d06, 0x12c8b: 0xe0007e55, + 0x12c8e: 0xe0008bc1, + 0x12c94: 0xe000951c, 0x12c95: 0xe0004298, 0x12c96: 0xe0004ca4, 0x12c97: 0xe0007ff0, + 0x12c98: 0xe00050ab, + 0x12c9e: 0xe0006822, 0x12c9f: 0xe0006274, + 0x12ca0: 0xe0004485, + 0x12ca6: 0xe000464d, 0x12ca7: 0xe000831a, + 0x12ca9: 0xe0007df1, 0x12cab: 0xe0005f36, + 0x12cad: 0xe0006a6f, + 0x12cb2: 0xe0005a1c, 0x12cb3: 0xe00054dc, + 0x12cb7: 0xe0008b01, + 0x12cb9: 0xe000a2b9, 0x12cbb: 0xe0009d0c, + // Block 0x4b3, offset 0x12cc0 + 0x12cc0: 0xe00062e0, 0x12cc2: 0xe0004190, + 0x12cc6: 0xe00084b3, + 0x12cc8: 0xe00041d2, 0x12cc9: 0xe0006278, 0x12cca: 0xe0006bec, + 0x12ccc: 0xe0009f99, 0x12ccd: 0xe000912d, 0x12ccf: 0xe00041fc, + 0x12cd2: 0xe0009191, + 0x12cd6: 0xe0004b21, + 0x12cd9: 0xe00049a2, + 0x12cdd: 0xe000a793, 0x12cde: 0xe000578f, + 0x12ce0: 0xe0008ed1, 0x12ce2: 0xe0008392, 0x12ce3: 0xe00072fd, + 0x12ce4: 0xe0006697, 0x12ce5: 0xe0008477, 0x12ce6: 0xe000a21a, + 0x12ce9: 0xe000a3ad, 0x12cea: 0xe0004eb2, 0x12ceb: 0xe0009936, + 0x12ced: 0xe0006350, 0x12cee: 0xe0009d87, + 0x12cf5: 0xe0008c4d, 0x12cf7: 0xe000615c, + 0x12cf9: 0xe0006fec, + 0x12cfd: 0xe0008bc5, 0x12cfe: 0xe000a2bd, + // Block 0x4b4, offset 0x12d00 + 0x12d01: 0xe0006e7c, 0x12d03: 0xe0004ca7, + 0x12d04: 0xe000a2f5, 0x12d05: 0xe0005847, 0x12d06: 0xe0005d0c, 0x12d07: 0xe00071dd, + 0x12d09: 0xe0005c3c, + 0x12d13: 0xe0007df5, + 0x12d1b: 0xe0009a6a, + 0x12d20: 0xe00089b5, 0x12d21: 0xe00072a5, 0x12d22: 0xe0009b24, + 0x12d24: 0xe0008857, 0x12d25: 0xe000a45a, 0x12d26: 0xe00050ae, + 0x12d28: 0xe000491a, 0x12d2a: 0xe00050b1, 0x12d2b: 0xe0006755, + 0x12d2c: 0xe0007df9, 0x12d2e: 0xe0008e21, 0x12d2f: 0xe0004a75, + 0x12d30: 0xe0007ae3, 0x12d31: 0xe0008d97, 0x12d32: 0xe00064ce, 0x12d33: 0xe0005db9, + 0x12d34: 0xe0004fcb, 0x12d35: 0xe0006984, 0x12d36: 0xe0009ce8, + 0x12d38: 0xe0009b28, 0x12d3a: 0xe000657c, + 0x12d3f: 0xe000a4e5, + // Block 0x4b5, offset 0x12d40 + 0x12d40: 0xe0007ff3, 0x12d41: 0xe0006060, 0x12d43: 0xe0009902, + 0x12d44: 0xe0006e80, 0x12d45: 0xe0008cc2, 0x12d46: 0xe0007010, + 0x12d4b: 0xe00081be, + 0x12d4e: 0xe000a1d4, + 0x12d55: 0xe000a002, 0x12d57: 0xe000812e, + 0x12d59: 0xe000527d, 0x12d5a: 0xe000a45d, 0x12d5b: 0xe0007b8b, + 0x12d5c: 0xe0008263, 0x12d5d: 0xe000a6a8, 0x12d5e: 0xe0006db0, 0x12d5f: 0xe000738e, + 0x12d60: 0xe0005c3f, 0x12d62: 0xe0007f7a, 0x12d63: 0xe0007186, + 0x12d64: 0xe0007ecb, 0x12d65: 0xe0007d12, + 0x12d68: 0xe0009131, 0x12d69: 0xe000a3b1, 0x12d6a: 0xe0005de0, + 0x12d6d: 0xe0005492, 0x12d6f: 0xe000584b, + 0x12d70: 0xe0004b96, 0x12d71: 0xe0008a3d, 0x12d72: 0xe000940f, 0x12d73: 0xe0009281, + 0x12d7d: 0xe0008e5d, 0x12d7e: 0xe0004f6f, + // Block 0x4b6, offset 0x12d80 + 0x12d80: 0xe0009811, 0x12d82: 0xe00050b4, 0x12d83: 0xe0005d0f, + 0x12d86: 0xe0004d34, 0x12d87: 0xe0006e84, + 0x12d89: 0xe000597c, 0x12d8a: 0xe00061dd, 0x12d8b: 0xe000876e, + 0x12d98: 0xe0005d69, + 0x12d9c: 0xe000a678, 0x12d9d: 0xe0004b99, 0x12d9e: 0xe00062e4, 0x12d9f: 0xe00046f1, + 0x12da1: 0xe0009135, 0x12da3: 0xe00050b7, + 0x12da5: 0xe00046f5, 0x12da7: 0xe0006594, + 0x12da8: 0xe00092bb, 0x12daa: 0xe0008d2b, 0x12dab: 0xe0005496, + 0x12db0: 0xe000a5e0, 0x12db2: 0xe00071e0, + 0x12db5: 0xe00079c0, + 0x12db9: 0xe00072a9, + 0x12dbd: 0xe0006d43, 0x12dbf: 0xe0006e88, + // Block 0x4b7, offset 0x12dc0 + 0x12dc6: 0xe00091c5, + 0x12dca: 0xe00046f9, + 0x12dcf: 0xe0005b3a, + 0x12dd4: 0xe0007b8f, + 0x12dd8: 0xe0004a79, 0x12dda: 0xe00092bf, 0x12ddb: 0xe000a600, + 0x12ddc: 0xe00049f3, + 0x12de0: 0xe000a460, 0x12de2: 0xe0009f00, 0x12de3: 0xe0009d34, + 0x12de6: 0xe0007da9, + 0x12de9: 0xe0009560, + 0x12dee: 0xe0007d66, + 0x12df2: 0xe0009c5e, + 0x12df7: 0xe00085fc, + // Block 0x4b8, offset 0x12e00 + 0x12e01: 0xe0006640, 0x12e03: 0xe000987a, + 0x12e04: 0xe00045f1, + 0x12e0c: 0xe0004d37, 0x12e0d: 0xe0005f84, 0x12e0e: 0xe0008a41, + 0x12e11: 0xe0009031, 0x12e13: 0xe00065b0, + 0x12e15: 0xe0007d6a, + 0x12e18: 0xe0004320, 0x12e1a: 0xe0007571, 0x12e1b: 0xe00095f0, + 0x12e1e: 0xe0006d2c, 0x12e1f: 0xe0006d6c, + 0x12e23: 0xe0006bf0, + 0x12e25: 0xe0006d70, 0x12e26: 0xe0007072, + 0x12e28: 0xe0007f7e, 0x12e2b: 0xe000669a, + 0x12e2c: 0xe0007f82, + 0x12e30: 0xe00089b9, 0x12e31: 0xe0008266, 0x12e32: 0xe0004388, 0x12e33: 0xe00074e5, + 0x12e37: 0xe00051f4, + 0x12e38: 0xe00089bd, 0x12e3a: 0xe0008bc9, + 0x12e3f: 0xe0005f88, + // Block 0x4b9, offset 0x12e40 + 0x12e47: 0xe0004f0b, + 0x12e4a: 0xe0004771, 0x12e4b: 0xe0008a45, + 0x12e4c: 0xe00047bd, 0x12e4e: 0xe0004619, 0x12e4f: 0xe0007e80, + 0x12e51: 0xe00089c1, 0x12e53: 0xe000543e, + 0x12e54: 0xe0006354, + 0x12e59: 0xe0005c42, 0x12e5a: 0xe00068d0, 0x12e5b: 0xe0009139, + 0x12e5c: 0xe00098ba, 0x12e5d: 0xe000615f, + 0x12e60: 0xe0008a49, 0x12e62: 0xe0009f9d, + 0x12e64: 0xe00099fc, 0x12e65: 0xe0005889, 0x12e66: 0xe000a85a, 0x12e67: 0xe000588d, + 0x12e6a: 0xe0006508, 0x12e6b: 0xe000a583, + 0x12e6f: 0xe0008f81, + 0x12e70: 0xe000847a, + 0x12e75: 0xe000a55c, 0x12e76: 0xe000546a, + 0x12e78: 0xe00050ba, 0x12e7a: 0xe00043c4, + 0x12e7f: 0xe00050bd, + // Block 0x4ba, offset 0x12e80 + 0x12e86: 0xe00043c8, 0x12e87: 0xe0008ed4, + 0x12e88: 0xe00065b4, 0x12e8a: 0xe000963c, 0x12e8b: 0xe0009fa1, + 0x12e8e: 0xe0007078, 0x12e8f: 0xe0007075, + 0x12e91: 0xe000841d, + 0x12e94: 0xe0008c51, + 0x12e99: 0xe000a8df, 0x12e9a: 0xe0004d3a, + 0x12e9d: 0xe0006bf4, + 0x12ea3: 0xe0008041, + 0x12ea5: 0xe0004461, + 0x12ea9: 0xe000994c, 0x12eab: 0xe00079eb, + 0x12eb1: 0xe0009e8c, 0x12eb2: 0xe0009f6a, 0x12eb3: 0xe0004324, + 0x12eb4: 0xe00075ed, 0x12eb5: 0xe00085ff, + 0x12eb8: 0xe00053aa, 0x12eb9: 0xe000913d, + 0x12ebc: 0xe000565d, 0x12ebd: 0xe0008889, 0x12ebe: 0xe00091c9, + // Block 0x4bb, offset 0x12ec0 + 0x12ec0: 0xe0004d3d, 0x12ec2: 0xe0004193, 0x12ec3: 0xe000a2f9, + 0x12ec5: 0xe0006644, 0x12ec7: 0xe0009035, + 0x12eca: 0xe0008a4d, + 0x12ecd: 0xe000847d, 0x12ece: 0xe000a1d7, + 0x12ed2: 0xe0007891, 0x12ed3: 0xe00099ff, + 0x12ed4: 0xe00099c6, 0x12ed5: 0xe000a8ab, + 0x12ed8: 0xe00056c1, 0x12ed9: 0xe00046fd, 0x12edb: 0xe0009c6a, + 0x12ede: 0xe00069f9, + 0x12ee2: 0xe0005d12, 0x12ee3: 0xe00090c7, + 0x12ee4: 0xe0008e83, 0x12ee7: 0xe0006b9f, + 0x12ef0: 0xe00053ea, 0x12ef2: 0xe0005de3, 0x12ef3: 0xe0005dc5, + 0x12ef4: 0xe00099c9, + 0x12ef9: 0xe00069fc, 0x12efa: 0xe0006987, + 0x12efc: 0xe0004838, 0x12eff: 0xe00081f1, + // Block 0x4bc, offset 0x12f00 + 0x12f00: 0xe00078f1, 0x12f01: 0xe000994f, + 0x12f07: 0xe0008e61, + 0x12f08: 0xe00047e7, 0x12f09: 0xe00082b4, 0x12f0b: 0xe0009f5c, + 0x12f0d: 0xe0007895, + 0x12f10: 0xe00082b7, + 0x12f15: 0xe000a026, + 0x12f19: 0xe000707b, + 0x12f1f: 0xe0007d16, + 0x12f20: 0xe00094c4, 0x12f21: 0xe00093cf, 0x12f22: 0xe0006358, + 0x12f24: 0xe0005c45, 0x12f26: 0xe00071e3, 0x12f27: 0xe000a047, + 0x12f2f: 0xe0008de9, + 0x12f30: 0xe0005775, 0x12f33: 0xe000987d, + 0x12f34: 0xe00087d2, + 0x12f3b: 0xe0005bfd, + // Block 0x4bd, offset 0x12f40 + 0x12f42: 0xe0005bad, 0x12f43: 0xe0005ca4, + 0x12f46: 0xe0005acd, + 0x12f48: 0xe0009e5f, 0x12f49: 0xe000538a, + 0x12f4c: 0xe00076df, 0x12f4e: 0xe000425c, + 0x12f52: 0xe0008269, + 0x12f55: 0xe0007d8e, 0x12f56: 0xe0006598, + 0x12f58: 0xe000591f, + 0x12f5c: 0xe0008a51, + 0x12f61: 0xe00099cc, 0x12f62: 0xe00078c9, + 0x12f64: 0xe0008ab9, 0x12f65: 0xe000923d, 0x12f67: 0xe000595c, + 0x12f68: 0xe0004a49, 0x12f69: 0xe000575a, + 0x12f6c: 0xe0006e8c, 0x12f6d: 0xe0007bc7, 0x12f6e: 0xe0008396, 0x12f6f: 0xe0004d40, + 0x12f70: 0xe0007d6e, 0x12f71: 0xe0009b8c, 0x12f72: 0xe00089c5, + 0x12f78: 0xe00047c0, 0x12f7b: 0xe000571c, + 0x12f7c: 0xe00063bc, 0x12f7d: 0xe00064e8, 0x12f7e: 0xe00064ec, + // Block 0x4be, offset 0x12f80 + 0x12f80: 0xe0005023, 0x12f81: 0xe0008d9a, 0x12f83: 0xe000608d, + 0x12f84: 0xe0008909, 0x12f86: 0xe0004464, 0x12f87: 0xe000a67c, + 0x12f8b: 0xe0004895, + 0x12f8e: 0xe0004bea, + 0x12f90: 0xe000483b, 0x12f93: 0xe000a463, + 0x12f96: 0xe000a604, + 0x12f9a: 0xe0007799, 0x12f9b: 0xe000a769, + 0x12f9c: 0xe000a4b4, 0x12f9e: 0xe000a4b7, + 0x12fa4: 0xe0009d0f, + 0x12fac: 0xe000a04b, 0x12fae: 0xe0009f6d, + 0x12fb4: 0xe0008fb1, 0x12fb6: 0xe0006ba2, + 0x12fb8: 0xe0004dc7, 0x12fba: 0xe0009832, + 0x12fbf: 0xe000600c, + // Block 0x4bf, offset 0x12fc0 + 0x12fc2: 0xe0007ff6, 0x12fc3: 0xe00064a7, + 0x12fc6: 0xe000688c, + 0x12fc8: 0xe0007b93, 0x12fca: 0xe00084c6, + 0x12fcc: 0xe0007e3d, 0x12fcd: 0xe000a137, 0x12fce: 0xe000774f, + 0x12fd2: 0xe000a10f, + 0x12fd4: 0xe000a700, 0x12fd6: 0xe0004467, + 0x12fd9: 0xe00066af, 0x12fdb: 0xe0006ff0, + 0x12fdc: 0xe0005554, 0x12fde: 0xe00086d2, 0x12fdf: 0xe0005f78, + 0x12fe1: 0xe0009141, 0x12fe3: 0xe0004328, + 0x12fe4: 0xe000635c, 0x12fe5: 0xe0004aa5, 0x12fe7: 0xe0005aa6, + 0x12fea: 0xe0009be8, + 0x12fec: 0xe0004898, 0x12fee: 0xe00060b4, + 0x12ff1: 0xe0008044, 0x12ff2: 0xe0005f74, + 0x12ff4: 0xe00090e5, + 0x12ff8: 0xe0006cf4, 0x12ff9: 0xe0007345, 0x12ffb: 0xe000a40f, + 0x12ffc: 0xe0006360, 0x12ffe: 0xe0007301, + // Block 0x4c0, offset 0x13000 + 0x13001: 0xe0006ff4, + 0x13004: 0xe0005fb4, 0x13007: 0xe000612f, + 0x13008: 0xe0009ba4, 0x13009: 0xe000620e, 0x1300a: 0xe0006090, 0x1300b: 0xe0004260, + 0x1300c: 0xe000a2fd, + 0x1301a: 0xe0006d78, 0x1301b: 0xe0005f39, + 0x1301e: 0xe0009145, + 0x13020: 0xe0005fb8, + 0x13025: 0xe0008635, 0x13026: 0xe0008638, + 0x13028: 0xe0008712, 0x13029: 0xe000a2c1, + 0x13034: 0xe0007349, 0x13037: 0xe0004e2b, + 0x13038: 0xe0006063, 0x1303a: 0xe0008d2e, 0x1303b: 0xe00078cd, + 0x1303c: 0xe0007677, 0x1303e: 0xe0008ff1, + // Block 0x4c1, offset 0x13040 + 0x13040: 0xe000928f, + 0x13046: 0xe000a608, 0x13047: 0xe0008cc5, + 0x1304d: 0xe000a2c5, + 0x13052: 0xe0006f90, + 0x1305a: 0xe000779c, 0x1305b: 0xe0008bcd, + 0x1305f: 0xe000725e, + 0x13060: 0xe0004e3b, 0x13061: 0xe00071e6, 0x13062: 0xe0007261, 0x13063: 0xe00055d1, + 0x13065: 0xe00069ff, 0x13066: 0xe00060b8, + 0x13068: 0xe0007c31, 0x1306b: 0xe0009640, + 0x13077: 0xe0004544, + 0x13079: 0xe0005557, + 0x1307d: 0xe0004ee8, 0x1307e: 0xe000483e, 0x1307f: 0xe0007bfb, + // Block 0x4c2, offset 0x13080 + 0x1308b: 0xe0009149, + 0x1308d: 0xe0007264, 0x1308e: 0xe000a0bf, + 0x13091: 0xe0006010, + 0x13096: 0xe0007c34, + 0x13099: 0xe0005e1f, + 0x1309e: 0xe0005e57, + 0x130a0: 0xe000549a, 0x130a2: 0xe00060f4, + 0x130a5: 0xe0006604, + 0x130aa: 0xe0009241, + 0x130ac: 0xe0007305, 0x130ad: 0xe0005bb0, + 0x130b0: 0xe000432c, 0x130b3: 0xe0005661, + 0x130b9: 0xe000779f, 0x130bb: 0xe00095f4, + 0x130bc: 0xe0004580, 0x130bd: 0xe000489b, 0x130bf: 0xe0004caa, + // Block 0x4c3, offset 0x130c0 + 0x130c7: 0xe00060f8, + 0x130c9: 0xe0006a87, + 0x130cd: 0xe000a5a0, + 0x130d7: 0xe0009784, + 0x130d9: 0xe0004370, 0x130da: 0xe0009798, 0x130db: 0xe0006066, + 0x130dc: 0xe000503b, 0x130de: 0xe000833e, + 0x130e1: 0xe000a5a4, 0x130e2: 0xe0007421, 0x130e3: 0xe0008420, + 0x130e5: 0xe000908b, 0x130e7: 0xe000752d, + 0x130e9: 0xe0004cad, + 0x130ed: 0xe000535a, 0x130ee: 0xe0007e6e, 0x130ef: 0xe0004bed, + 0x130f0: 0xe000904d, 0x130f3: 0xe0006e20, + 0x130fa: 0xe0009b44, 0x130fb: 0xe000496e, + 0x130fc: 0xe000441c, 0x130fd: 0xe0006e38, + // Block 0x4c4, offset 0x13100 + 0x13102: 0xe0006b3f, + 0x1310c: 0xe00096bb, 0x1310f: 0xe00068d4, + 0x13111: 0xe00075f0, 0x13112: 0xe000698a, + 0x13122: 0xe0005778, + 0x13125: 0xe000908e, 0x13126: 0xe0009445, 0x13127: 0xe0009a6e, + 0x1312c: 0xe0005dc9, 0x1312d: 0xe0009e04, + 0x13130: 0xe0009da0, 0x13132: 0xe0009e8f, + 0x13134: 0xe0009ceb, + // Block 0x4c5, offset 0x13140 + 0x13143: 0xe0008f19, + 0x13145: 0xe0004eb5, + 0x1314f: 0xe0007a5f, + 0x1315c: 0xe00044a2, 0x1315d: 0xe00096f4, + 0x13160: 0xe000585b, + 0x13167: 0xe0007fb6, + 0x13168: 0xe0009284, 0x1316b: 0xe0005c48, + 0x1316c: 0xe0004701, 0x1316e: 0xe000a04f, 0x1316f: 0xe0007a63, + 0x1317c: 0xe0006930, + // Block 0x4c6, offset 0x13180 + 0x13181: 0xe00050c0, + 0x13187: 0xe0008bd1, + 0x1318c: 0xe0005aee, 0x1318d: 0xe000776c, 0x1318e: 0xe000717a, 0x1318f: 0xe00086be, + 0x13191: 0xe000698d, 0x13193: 0xe00054fa, + 0x13197: 0xe0007dfd, + 0x1319f: 0xe0006f58, + 0x131a3: 0xe00042c4, + 0x131a4: 0xe0007bcb, 0x131a7: 0xe000659c, + 0x131a8: 0xe0007e92, 0x131a9: 0xe0006e24, + 0x131ad: 0xe0009bec, + 0x131ba: 0xe000a594, 0x131bb: 0xe000a598, + 0x131bc: 0xe0005de6, 0x131be: 0xe0005245, + // Block 0x4c7, offset 0x131c0 + 0x131c1: 0xe0008602, + 0x131c5: 0xe0006424, + 0x131c8: 0xe0007e95, 0x131ca: 0xe0005b6b, 0x131cb: 0xe0009260, + 0x131ce: 0xe00047c3, 0x131cf: 0xe00059f4, + 0x131d0: 0xe0006364, 0x131d1: 0xe00077a2, + 0x131d4: 0xe0009475, 0x131d5: 0xe0004488, + 0x131da: 0xe0008a55, + 0x131e0: 0xe00052c6, + 0x131e7: 0xe000894d, + 0x131e8: 0xe0005de9, 0x131ea: 0xe0009814, + 0x131ec: 0xe0004705, 0x131ef: 0xe00050c3, + 0x131f4: 0xe0005740, 0x131f5: 0xe0004264, 0x131f7: 0xe0005d8d, + 0x131fa: 0xe0004b45, 0x131fb: 0xe0006368, + 0x131fc: 0xe0008716, 0x131fd: 0xe0004c32, + // Block 0x4c8, offset 0x13200 + 0x13201: 0xe00096f7, + 0x1320c: 0xe0005b7d, 0x1320e: 0xe00096fa, 0x1320f: 0xe0005027, + 0x13211: 0xe000549e, 0x13212: 0xe0008450, + 0x13216: 0xe00079c3, + 0x13219: 0xe00077a5, + 0x13227: 0xe0005b80, + 0x1322a: 0xe00058fb, 0x1322b: 0xe0005944, + 0x1322c: 0xe000636c, 0x1322d: 0xe000a5a8, + 0x13231: 0xe0005b52, + 0x1323a: 0xe0007424, + 0x1323e: 0xe0006b42, + // Block 0x4c9, offset 0x13240 + 0x13240: 0xe0006b45, 0x13241: 0xe00050c6, + 0x13245: 0xe0007f10, 0x13246: 0xe0009564, 0x13247: 0xe00050c9, + 0x13248: 0xe00050cc, 0x13249: 0xe0009091, 0x1324a: 0xe0009da4, + 0x13250: 0xe0007ff9, 0x13253: 0xe0006908, + 0x13254: 0xe0006825, 0x13255: 0xe0006a02, 0x13256: 0xe0008d31, 0x13257: 0xe0009094, + 0x1325a: 0xe0008d34, 0x1325b: 0xe00044d0, + 0x1325c: 0xe000a466, 0x1325d: 0xe00098be, 0x1325e: 0xe00074e9, 0x1325f: 0xe0007267, + 0x13260: 0xe0006b48, 0x13262: 0xe0005308, + 0x13265: 0xe0006cf8, 0x13267: 0xe0008d9d, + 0x13268: 0xe0009f03, + 0x1326d: 0xe0008c8f, + 0x1327a: 0xe00050cf, + 0x1327c: 0xe0004aa9, 0x1327f: 0xe0005af2, + // Block 0x4ca, offset 0x13280 + 0x13280: 0xe0009f44, 0x13281: 0xe0004fcf, + 0x1328a: 0xe00047ea, 0x1328b: 0xe0008546, + 0x1328d: 0xe000a55f, 0x1328e: 0xe0008bd5, 0x1328f: 0xe00066dd, + 0x13291: 0xe0007ffc, + 0x13294: 0xe0008cc8, + 0x1329d: 0xe00090f9, + 0x132a6: 0xe00078f4, 0x132a7: 0xe000a952, + 0x132a8: 0xe000513e, 0x132aa: 0xe0006e90, 0x132ab: 0xe0005422, + 0x132ae: 0xe0005a82, + 0x132b0: 0xe000530b, 0x132b1: 0xe000555a, 0x132b3: 0xe0007899, + 0x132b4: 0xe0007841, + 0x132b9: 0xe0007fff, 0x132ba: 0xe0007d92, 0x132bb: 0xe0005d45, + 0x132bd: 0xe0004fd3, 0x132be: 0xe000a562, 0x132bf: 0xe00055d5, + // Block 0x4cb, offset 0x132c0 + 0x132c0: 0xe00071e9, 0x132c1: 0xe0006b4b, + 0x132c6: 0xe000429c, + 0x132c9: 0xe0006648, 0x132ca: 0xe0005241, 0x132cb: 0xe0009835, + 0x132d1: 0xe00049f6, 0x132d2: 0xe00096fd, + 0x132d5: 0xe0006990, + 0x132d8: 0xe0006993, + 0x132df: 0xe0008d37, + 0x132e2: 0xe0005a64, 0x132e3: 0xe0005eb7, + 0x132e4: 0xe0009a9a, 0x132e6: 0xe000914d, 0x132e7: 0xe000773b, + 0x132e9: 0xe00091cd, 0x132ea: 0xe00090ca, 0x132eb: 0xe0009912, + 0x132ec: 0xe00044e8, + 0x132f8: 0xe00042e4, 0x132fb: 0xe0008480, + // Block 0x4cc, offset 0x13300 + 0x13300: 0xe000a955, 0x13301: 0xe000489e, 0x13302: 0xe000585f, + 0x13305: 0xe0007024, + 0x13308: 0xe0004268, 0x1330a: 0xe0008ccb, 0x1330b: 0xe0008bd9, + 0x1330c: 0xe00055a5, 0x1330d: 0xe0009700, + 0x13314: 0xe0008596, 0x13317: 0xe0009d78, + 0x13319: 0xe00090e9, 0x1331a: 0xe00099cf, + 0x1331c: 0xe0005cd0, 0x1331e: 0xe0004a20, 0x1331f: 0xe0009f40, + 0x13320: 0xe0008d3a, + 0x13327: 0xe0006f5c, + 0x1332e: 0xe0008e25, + 0x13331: 0xe0009a9e, + 0x13336: 0xe000807a, 0x13337: 0xe00090ed, + 0x13339: 0xe0009195, 0x1333b: 0xe000555d, + 0x1333c: 0xe0004196, 0x1333d: 0xe00047c6, 0x1333f: 0xe0004841, + // Block 0x4cd, offset 0x13340 + 0x13340: 0xe00048de, + 0x13345: 0xe0004420, 0x13346: 0xe00060bc, + 0x13349: 0xe00099d2, + 0x1334d: 0xe000890d, 0x1334e: 0xe0007b97, + 0x13357: 0xe00071ec, + 0x13360: 0xe00052a9, 0x13361: 0xe0006d50, 0x13362: 0xe0007bfe, + 0x13369: 0xe0007d1a, 0x1336b: 0xe000a59c, + 0x13370: 0xe000789d, + 0x13374: 0xe000a31d, 0x13375: 0xe00076b7, 0x13376: 0xe0004cb0, + 0x13379: 0xe0004df3, 0x1337a: 0xe00049a6, + 0x1337d: 0xe0008bdd, 0x1337e: 0xe0007f13, 0x1337f: 0xe0009520, + // Block 0x4ce, offset 0x13380 + 0x13380: 0xe0005700, 0x13381: 0xe0005625, 0x13382: 0xe0005ad0, 0x13383: 0xe0008ad1, + 0x13384: 0xe0009293, 0x13385: 0xe0007f16, 0x13386: 0xe0009e08, + 0x13388: 0xe0007ece, 0x1338a: 0xe0007dd0, + 0x13392: 0xe00091d1, 0x13393: 0xe00093d3, + 0x13395: 0xe0008d3d, 0x13396: 0xe0004c35, 0x13397: 0xe0009413, + 0x13398: 0xe0004dab, 0x1339b: 0xe0004d43, + 0x1339f: 0xe0004dd7, + 0x133a0: 0xe0004a23, 0x133a3: 0xe0007140, + 0x133a9: 0xe0007dac, 0x133aa: 0xe0007daf, + 0x133ac: 0xe00082ba, 0x133ae: 0xe0004df7, 0x133af: 0xe0007ed1, + 0x133b3: 0xe00082bd, + 0x133b6: 0xe0004d46, + 0x133b9: 0xe0007cd3, 0x133ba: 0xe0004eb8, 0x133bb: 0xe0009417, + 0x133be: 0xe0004aad, 0x133bf: 0xe0005ca8, + // Block 0x4cf, offset 0x133c0 + 0x133c4: 0xe00092c3, 0x133c5: 0xe0004ebb, 0x133c7: 0xe00056c4, + 0x133c8: 0xe0008da0, 0x133ca: 0xe0008abd, 0x133cb: 0xe0005dcd, + 0x133d7: 0xe0006123, + 0x133d9: 0xe0009343, + 0x133dd: 0xe000664c, 0x133df: 0xe0004709, + 0x133e0: 0xe0008772, 0x133e2: 0xe0006ba5, 0x133e3: 0xe0008f85, + 0x133e5: 0xe0005665, 0x133e6: 0xe000716c, + 0x133ea: 0xe00071ef, + 0x133ed: 0xe00042c8, 0x133ef: 0xe000535e, + 0x133f6: 0xe000470d, + 0x133f8: 0xe0004775, 0x133f9: 0xe0008f49, 0x133fa: 0xe00098c2, + 0x133fd: 0xe0008047, 0x133ff: 0xe000426c, + // Block 0x4d0, offset 0x13400 + 0x13406: 0xe0009d12, + 0x13408: 0xe000502b, 0x1340a: 0xe0008da3, + 0x1340c: 0xe00075f3, 0x1340f: 0xe000a509, + 0x13411: 0xe000707e, 0x13412: 0xe0004ff7, + 0x13418: 0xe0008b05, 0x13419: 0xe0006d74, 0x1341b: 0xe0008911, + 0x1341e: 0xe0009c0c, + 0x13420: 0xe0005dd1, + 0x13425: 0xe0006ba8, 0x13426: 0xe00067c8, 0x13427: 0xe0009479, + 0x13428: 0xe00068d8, + 0x1342c: 0xe0008c92, 0x1342d: 0xe0005a20, 0x1342f: 0xe000528f, + 0x13433: 0xe00041d5, + 0x13435: 0xe000656c, + 0x13439: 0xe0007027, + // Block 0x4d1, offset 0x13440 + 0x13445: 0xe0006ef0, 0x13446: 0xe0009fa5, + 0x13448: 0xe0004aed, 0x13449: 0xe0005720, 0x1344b: 0xe0004f73, + 0x1344c: 0xe00089c9, 0x1344d: 0xe0007309, 0x1344f: 0xe0006534, + 0x13450: 0xe0004b25, 0x13451: 0xe00098c6, 0x13452: 0xe0009c6e, 0x13453: 0xe00047ed, + 0x13454: 0xe0005442, 0x13456: 0xe0009465, + 0x1345f: 0xe0006828, + 0x13460: 0xe0004f0f, + 0x13465: 0xe00044eb, 0x13466: 0xe0004ab1, 0x13467: 0xe000461d, + 0x13469: 0xe0009c82, + 0x1346c: 0xe0006ff8, 0x1346e: 0xe0006db3, + 0x13471: 0xe00070c9, 0x13473: 0xe0008c55, + 0x13475: 0xe0007a67, + 0x1347d: 0xe0007ca0, + // Block 0x4d2, offset 0x13480 + 0x13487: 0xe000446a, + 0x1348b: 0xe00089cd, + 0x1348d: 0xe00048a1, 0x1348e: 0xe000a4ba, 0x1348f: 0xe0008843, + 0x13492: 0xe0009883, + 0x13494: 0xe00062e8, 0x13495: 0xe00050d2, 0x13497: 0xe0006bf8, + 0x13499: 0xe0006715, 0x1349a: 0xe0009263, + 0x1349c: 0xe00049ca, 0x1349d: 0xe0004661, + 0x134a0: 0xe0009886, 0x134a1: 0xe0004a7d, + 0x134ad: 0xe00089d1, + 0x134b1: 0xe0006cfc, + 0x134b4: 0xe00086ee, + 0x134b8: 0xe000888c, + 0x134be: 0xe00070cc, + // Block 0x4d3, offset 0x134c0 + 0x134c0: 0xe0008ac1, 0x134c1: 0xe000a680, + 0x134c4: 0xe0006564, 0x134c6: 0xe00089d5, 0x134c7: 0xe0009dc4, + 0x134c9: 0xe00098ca, 0x134ca: 0xe000a541, 0x134cb: 0xe000a37d, + 0x134cc: 0xe000a7ab, + 0x134d2: 0xe0007499, + 0x134d4: 0xe00080c2, + 0x134d9: 0xe00048a4, 0x134db: 0xe0007845, + 0x134dd: 0xe0004d49, + 0x134e0: 0xe0007081, + 0x134e4: 0xe00055d9, 0x134e6: 0xe0006a05, + 0x134e9: 0xe0006b4e, 0x134ea: 0xe00090cd, + 0x134f3: 0xe0009fbd, + 0x134f7: 0xe0006779, + 0x134fe: 0xe0005fe8, + // Block 0x4d4, offset 0x13500 + 0x13500: 0xe000947d, + 0x13507: 0xe0008ddd, + 0x13509: 0xe0009889, 0x1350b: 0xe0004e85, + 0x1350f: 0xe0005b1a, + 0x13512: 0xe00092c7, + 0x1351e: 0xe0005362, 0x1351f: 0xe0008b09, + 0x13520: 0xe00066b2, 0x13521: 0xe0004270, + 0x13527: 0xe000a684, + 0x1352a: 0xe00086f2, 0x1352b: 0xe0007084, + 0x13537: 0xe0009620, + 0x13538: 0xe0009d15, + 0x1353d: 0xe00095f8, 0x1353e: 0xe00059e8, 0x1353f: 0xe00067cb, + // Block 0x4d5, offset 0x13540 + 0x13543: 0xe000580b, + 0x1354c: 0xe0008ed7, 0x1354d: 0xe0008915, + 0x13550: 0xe0005744, 0x13552: 0xe0008f1c, + 0x13554: 0xe000726a, + 0x1355b: 0xe0008a59, + 0x1355c: 0xe0009b48, 0x1355f: 0xe0005b83, + 0x13560: 0xe0005b3e, + 0x13564: 0xe00095fc, 0x13565: 0xe0007849, 0x13567: 0xe00044ee, + 0x13569: 0xe00065e4, + 0x1356c: 0xe0005d15, + 0x13572: 0xe00082c0, 0x13573: 0xe0006211, + 0x1357e: 0xe000854a, + // Block 0x4d6, offset 0x13580 + 0x13581: 0xe0009568, 0x13583: 0xe0006996, + 0x13589: 0xe0006890, + 0x1358d: 0xe0006093, + 0x13592: 0xe0005dd5, + 0x13595: 0xe00062ec, 0x13597: 0xe0008d40, + 0x13598: 0xe0008ae9, + 0x1359f: 0xe0007100, + 0x135a2: 0xe000863b, + 0x135a4: 0xe0008196, 0x135a5: 0xe0008f4d, 0x135a6: 0xe0005d91, 0x135a7: 0xe0008776, + 0x135a8: 0xe00064f4, + 0x135ae: 0xe00058a9, + 0x135b1: 0xe00058ad, 0x135b2: 0xe00092cf, 0x135b3: 0xe000449a, + 0x135b9: 0xe00071f2, + 0x135bc: 0xe0005d95, 0x135bd: 0xe0008e65, 0x135be: 0xe0008be1, + // Block 0x4d7, offset 0x135c0 + 0x135c5: 0xe00082c3, 0x135c6: 0xe0005fd4, + 0x135ca: 0xe000a469, + 0x135d5: 0xe00048a7, 0x135d6: 0xe000546e, 0x135d7: 0xe0004d4c, + 0x135d9: 0xe0008da6, 0x135da: 0xe00087d6, + 0x135dc: 0xe0006241, 0x135dd: 0xe0006c68, 0x135de: 0xe0006894, 0x135df: 0xe0008d43, + 0x135e0: 0xe00043cc, 0x135e2: 0xe0006096, + 0x135e5: 0xe00051b6, 0x135e7: 0xe00058b1, + 0x135ef: 0xe00051b9, + 0x135f2: 0xe0005922, + 0x135f4: 0xe0008951, 0x135f6: 0xe0008da9, + 0x135f8: 0xe0005f9c, 0x135fa: 0xe0004eeb, 0x135fb: 0xe00047c9, + 0x135fe: 0xe0004ebe, + // Block 0x4d8, offset 0x13600 + 0x13600: 0xe00050d5, 0x13602: 0xe0008eda, 0x13603: 0xe000734d, + 0x13604: 0xe0007825, 0x13605: 0xe000a529, 0x13606: 0xe0008002, 0x13607: 0xe000a8cf, + 0x13608: 0xe000a5e4, 0x1360a: 0xe00061ad, 0x1360b: 0xe00061b1, + 0x1360d: 0xe0005200, + 0x13610: 0xe00052e8, 0x13613: 0xe0006dec, + 0x13614: 0xe000730d, 0x13615: 0xe0006a08, 0x13617: 0xe0006b51, + 0x13618: 0xe0004baa, 0x13619: 0xe0009097, 0x1361a: 0xe0005013, 0x1361b: 0xe0006898, + 0x1361c: 0xe00080c6, + 0x13620: 0xe0007087, 0x13621: 0xe0006428, 0x13622: 0xe0006d54, + 0x1362b: 0xe0008605, + 0x1362c: 0xe0008edd, 0x1362e: 0xe000931b, 0x1362f: 0xe0005c00, + 0x13630: 0xe000702a, 0x13631: 0xe000690c, 0x13632: 0xe0006f60, 0x13633: 0xe00074ed, + 0x13635: 0xe000888f, + 0x13639: 0xe000708a, 0x1363a: 0xe0004330, + // Block 0x4d9, offset 0x13640 + 0x13642: 0xe0008e29, 0x13643: 0xe000a2c9, + 0x13644: 0xe0008d46, 0x13645: 0xe0004711, 0x13646: 0xe0006370, + 0x13649: 0xe0007371, + 0x1364d: 0xe00085a2, + 0x13650: 0xe0004641, + 0x13656: 0xe0004b49, + 0x13659: 0xe000a60c, 0x1365b: 0xe0008daf, + 0x1365c: 0xe000a329, 0x1365e: 0xe0004bf0, + 0x13661: 0xe0005793, 0x13662: 0xe000a2cd, 0x13663: 0xe0006664, + 0x13666: 0xe0005017, + 0x13668: 0xe000834a, 0x13669: 0xe0008dac, 0x1366a: 0xe0008512, + 0x1366e: 0xe0006db6, + 0x13670: 0xe00091ed, 0x13671: 0xe0009c72, 0x13672: 0xe0006b54, 0x13673: 0xe00043d0, + 0x13676: 0xe0008ac5, + 0x13679: 0xe00045f5, 0x1367a: 0xe0009a02, + 0x1367f: 0xe0004cb3, + // Block 0x4da, offset 0x13680 + 0x13683: 0xe000974b, + 0x13686: 0xe0004779, + 0x1368e: 0xe0008be5, 0x1368f: 0xe00071f5, + 0x13693: 0xe0004715, + 0x13698: 0xe000677d, + 0x1369c: 0xe0008e2d, + 0x136a0: 0xe0005af6, 0x136a2: 0xe0008ee0, 0x136a3: 0xe0004e3f, + 0x136a5: 0xe0005141, 0x136a6: 0xe0005144, 0x136a7: 0xe0008fb5, + 0x136a9: 0xe0008162, 0x136ab: 0xe0006ef4, + 0x136ac: 0xe00071f8, 0x136ad: 0xe000826c, 0x136ae: 0xe00047f0, + 0x136b0: 0xe0004ab5, 0x136b1: 0xe00043d4, 0x136b2: 0xe0005ecf, + 0x136b4: 0xe00095a8, 0x136b5: 0xe0009448, + 0x136b8: 0xe0005c80, 0x136ba: 0xe00050d8, 0x136bb: 0xe0009b78, + 0x136bd: 0xe000868e, 0x136be: 0xe0005cd4, 0x136bf: 0xe0005fbc, + // Block 0x4db, offset 0x136c0 + 0x136c4: 0xe0004936, 0x136c7: 0xe00099d5, + 0x136ca: 0xe0005177, 0x136cb: 0xe0006999, + 0x136cc: 0xe00082c6, 0x136cd: 0xe0006294, + 0x136d6: 0xe0006db9, 0x136d7: 0xe0006d30, + 0x136d8: 0xe000a0df, 0x136da: 0xe0006e94, + 0x136dc: 0xe0005fd8, 0x136dd: 0xe0009211, 0x136de: 0xe0005366, + 0x136e0: 0xe00096a0, 0x136e1: 0xe000627c, 0x136e3: 0xe0007a6b, + 0x136e6: 0xe000745d, + 0x136e8: 0xe0009dc8, 0x136e9: 0xe0007e01, + 0x136ec: 0xe0005fc0, 0x136ef: 0xe00081c1, + 0x136f4: 0xe0005980, 0x136f6: 0xe0009de8, + 0x136f9: 0xe0008cce, 0x136fb: 0xe00099d8, + // Block 0x4dc, offset 0x13700 + 0x13708: 0xe0007bcf, 0x13709: 0xe0009151, 0x1370a: 0xe00077c4, 0x1370b: 0xe000988c, + 0x13710: 0xe000988f, 0x13711: 0xe0004685, + 0x13715: 0xe0007d1e, 0x13717: 0xe0009817, + 0x13718: 0xe00047f3, 0x1371b: 0xe00062f0, + 0x1371d: 0xe0009155, 0x1371e: 0xe000a46c, 0x1371f: 0xe0007f2e, + 0x13720: 0xe00048f2, 0x13721: 0xe000881b, 0x13722: 0xe0005748, 0x13723: 0xe000a2d1, + 0x1372b: 0xe0006759, + 0x1372e: 0xe00098ce, 0x1372f: 0xe0007a6f, + 0x13731: 0xe0008e31, 0x13732: 0xe0005c54, 0x13733: 0xe0004621, + 0x13735: 0xe0005e7f, 0x13737: 0xe0005c03, + 0x13739: 0xe0009f2a, 0x1373b: 0xe0006244, + 0x1373d: 0xe00097d4, 0x1373e: 0xe0008919, + // Block 0x4dd, offset 0x13740 + 0x13741: 0xe000650c, 0x13743: 0xe0006934, + 0x13744: 0xe0007c37, 0x13745: 0xe00070cf, 0x13746: 0xe0006162, 0x13747: 0xe0007ed4, + 0x13748: 0xe0004424, + 0x13750: 0xe0007036, 0x13752: 0xe0009039, + 0x13754: 0xe00090f1, 0x13755: 0xe0006e98, 0x13756: 0xe0006c24, 0x13757: 0xe0005d99, + 0x13759: 0xe000651c, 0x1375a: 0xe0005bd1, + 0x1375e: 0xe0007ed7, + 0x13761: 0xe00071fb, 0x13762: 0xe0004e88, + 0x13769: 0xe00073da, 0x1376a: 0xe000a6e2, 0x1376b: 0xe00047cc, + 0x1376d: 0xe00045f9, 0x1376f: 0xe000a301, + 0x13770: 0xe0008d49, + 0x13776: 0xe0007923, + 0x13779: 0xe00079ef, + 0x1377c: 0xe00047cf, 0x1377d: 0xe0006a8b, 0x1377e: 0xe0004625, + // Block 0x4de, offset 0x13780 + 0x13781: 0xe000a7ee, 0x13782: 0xe00092cb, + 0x13787: 0xe0005b86, + 0x13788: 0xe000a984, 0x1378a: 0xe0004b4d, + 0x1378c: 0xe0007104, 0x1378d: 0xe0005c57, 0x1378f: 0xe00089d9, + 0x13793: 0xe0007b9b, + 0x13794: 0xe000883c, 0x13796: 0xe0006f70, + 0x13798: 0xe00092d3, 0x1379b: 0xe00055dd, + 0x1379c: 0xe000580f, + // Block 0x4df, offset 0x137c0 + 0x137f6: 0xe00067ce, 0x137f7: 0xe0006bab, + 0x137f8: 0xe000a16b, 0x137fa: 0xe0004645, + 0x137fe: 0xe0006668, 0x137ff: 0xe000a187, + // Block 0x4e0, offset 0x13800 + 0x13803: 0xe00077f8, + 0x13804: 0xe0004781, 0x13805: 0xe000a029, 0x13807: 0xe0008fb9, + 0x1380b: 0xe0007d96, + 0x1380c: 0xe00077e4, 0x1380d: 0xe0005b89, 0x1380e: 0xe0005426, + 0x13810: 0xe0004a81, + 0x13814: 0xe0005ed3, 0x13815: 0xe000a07b, + 0x13818: 0xe000682b, + 0x1381d: 0xe00088cb, 0x1381f: 0xe00048aa, + 0x13820: 0xe0006298, 0x13821: 0xe0004428, 0x13823: 0xe0004b6c, + 0x13826: 0xe000682e, + 0x13828: 0xe000798b, 0x1382a: 0xe0008e8c, 0x1382b: 0xe0004b63, + 0x1382e: 0xe00099db, + 0x13830: 0xe0006538, 0x13832: 0xe0006dbc, + 0x13835: 0xe0005f1e, 0x13837: 0xe0009cee, + 0x13838: 0xe0006544, 0x13839: 0xe0005d18, + 0x1383c: 0xe0009fc1, 0x1383d: 0xe00047f6, 0x1383e: 0xe0009051, + // Block 0x4e1, offset 0x13840 + 0x13842: 0xe0004629, + 0x13845: 0xe000575d, 0x13846: 0xe0006a0b, 0x13847: 0xe0005147, + 0x13848: 0xe00050db, 0x1384a: 0xe00078a1, + 0x1384c: 0xe00043d8, 0x1384e: 0xe0006214, + 0x13854: 0xe0004844, 0x13856: 0xe00048ad, 0x13857: 0xe000442c, + 0x13858: 0xe00087da, 0x1385a: 0xe0005a24, + 0x1385d: 0xe00088ce, 0x1385e: 0xe00071fe, + 0x13864: 0xe0004daf, + 0x13868: 0xe0006e9c, 0x13869: 0xe0008423, 0x1386b: 0xe0004430, + 0x1386f: 0xe00042e8, + 0x13872: 0xe000a958, + 0x13876: 0xe0008a5d, + 0x13878: 0xe0005d1b, 0x13879: 0xe000449e, + 0x1387d: 0xe0008005, + // Block 0x4e2, offset 0x13880 + 0x13881: 0xe0007d72, + 0x13885: 0xe0007427, + 0x1388a: 0xe00084ca, + 0x1388c: 0xe00084ce, 0x1388e: 0xe0005a28, + 0x13892: 0xe00073a6, + 0x13894: 0xe0006d00, 0x13895: 0xe000a907, 0x13896: 0xe000a917, + 0x1389b: 0xe00070d2, + 0x1389f: 0xe000891d, + 0x138a0: 0xe0009967, 0x138a1: 0xe000699c, 0x138a3: 0xe0006c90, + 0x138a4: 0xe0007460, 0x138a6: 0xe0008a61, + 0x138a9: 0xe0009dcc, 0x138ab: 0xe0007e05, + 0x138ac: 0xe000a84e, 0x138ae: 0xe000a1ee, + 0x138b0: 0xe000a07f, 0x138b3: 0xe0007c3a, + 0x138b9: 0xe0004bf3, 0x138ba: 0xe00048b0, 0x138bb: 0xe0006520, + 0x138bc: 0xe00084d2, 0x138be: 0xe000a305, + // Block 0x4e3, offset 0x138c0 + 0x138c0: 0xe0007eda, 0x138c1: 0xe0005aa9, 0x138c3: 0xe0004847, + 0x138c4: 0xe0006099, 0x138c5: 0xe0008608, 0x138c6: 0xe00050de, + 0x138c9: 0xe0004cb6, + 0x138cc: 0xe0008483, + 0x138d0: 0xe0005220, 0x138d1: 0xe000538e, 0x138d2: 0xe0005b8c, + 0x138d4: 0xe000863e, 0x138d5: 0xe0004719, 0x138d6: 0xe000974e, 0x138d7: 0xe0006069, + 0x138d8: 0xe000809e, 0x138d9: 0xe0009d18, + 0x138de: 0xe00041d8, + 0x138e1: 0xe0006def, + 0x138e6: 0xe000804a, + 0x138e8: 0xe00052d2, + 0x138ec: 0xe0005c1e, 0x138ed: 0xe00050e1, + 0x138f0: 0xe000804d, 0x138f3: 0xe0008486, + 0x138f6: 0xe0007818, + 0x138fd: 0xe0009ba8, 0x138ff: 0xe000471d, + // Block 0x4e4, offset 0x13900 + 0x13903: 0xe00053ee, + 0x13906: 0xe0005a2c, + 0x1390a: 0xe0005bb3, + 0x13912: 0xe0004af1, + 0x13915: 0xe000a4bd, 0x13916: 0xe0006ffc, + 0x13918: 0xe0006abb, 0x1391a: 0xe000996a, + 0x1391e: 0xe00061b5, + 0x1392f: 0xe0005984, + 0x13930: 0xe00097d8, 0x13931: 0xe0007cd6, 0x13932: 0xe0007000, 0x13933: 0xe0007f86, + 0x13935: 0xe0007e98, 0x13936: 0xe0006fb8, 0x13937: 0xe00090f5, + 0x1393d: 0xe0009670, 0x1393e: 0xe0005b42, 0x1393f: 0xe0008336, + // Block 0x4e5, offset 0x13940 + 0x13944: 0xe0008489, 0x13945: 0xe00072ad, 0x13946: 0xe0006b57, 0x13947: 0xe0008d4c, + 0x13949: 0xe00082fe, 0x1394b: 0xe0005cb0, + 0x1394c: 0xe00050e4, + 0x13953: 0xe000a6ac, + 0x13956: 0xe0009703, + 0x13958: 0xe0008f1f, 0x1395a: 0xe00056d9, 0x1395b: 0xe000a16f, + 0x1395d: 0xe0004274, + 0x13961: 0xe000484a, 0x13962: 0xe000909a, + 0x13965: 0xe000699f, 0x13966: 0xe00068dc, + 0x13969: 0xe00045fd, 0x1396a: 0xe000642c, 0x1396b: 0xe0007351, + 0x1396d: 0xe00052e1, 0x1396f: 0xe000503f, + 0x13971: 0xe0004bae, 0x13972: 0xe0008302, + 0x13974: 0xe000a751, 0x13975: 0xe000514a, + 0x1397a: 0xe0009e4a, + // Block 0x4e6, offset 0x13980 + 0x13983: 0xe00081c4, + 0x13984: 0xe0008e9e, 0x13986: 0xe0005392, + 0x1398a: 0xe0004d4f, + 0x1398c: 0xe00064aa, 0x1398e: 0xe0009c0f, + 0x13995: 0xe0006831, 0x13996: 0xe000639c, + 0x13999: 0xe0008db2, 0x1399a: 0xe00064ad, 0x1399b: 0xe000438c, + 0x1399e: 0xe0009e92, + 0x139a0: 0xe00044f1, 0x139a1: 0xe000a46f, + 0x139a4: 0xe000831e, 0x139a5: 0xe0006dbf, + 0x139af: 0xe00048b3, + 0x139b1: 0xe0004b29, + 0x139b4: 0xe0005669, 0x139b7: 0xe000a897, + 0x139b8: 0xe000a88f, + 0x139bd: 0xe00052f5, 0x139be: 0xe0008641, + // Block 0x4e7, offset 0x139c0 + 0x139c2: 0xe000909d, + 0x139c5: 0xe000a351, 0x139c6: 0xe000996d, 0x139c7: 0xe000a355, + 0x139c8: 0xe0005f48, 0x139c9: 0xe0005f5c, 0x139ca: 0xe00094c8, + 0x139d6: 0xe00063dc, + 0x139d8: 0xe0007e09, 0x139da: 0xe0004200, 0x139db: 0xe0004721, + 0x139e3: 0xe0007311, + 0x139e4: 0xe0007531, 0x139e7: 0xe000981a, + 0x139e9: 0xe0007201, 0x139eb: 0xe0009b98, + 0x139ef: 0xe0009e95, + 0x139f0: 0xe00056dc, + 0x139f9: 0xe00093d7, 0x139fa: 0xe000726d, + 0x139fe: 0xe00069a2, + // Block 0x4e8, offset 0x13a00 + 0x13a01: 0xe00065ec, + 0x13a06: 0xe0008a65, + 0x13a0a: 0xe0006e3c, 0x13a0b: 0xe00077c8, + 0x13a0e: 0xe00074f1, + 0x13a10: 0xe00067d1, 0x13a11: 0xe00067d4, 0x13a12: 0xe00044f4, 0x13a13: 0xe0006a0e, + 0x13a14: 0xe00043dc, 0x13a15: 0xe0007e0d, + 0x13a20: 0xe0008f22, + 0x13a24: 0xe00076fb, 0x13a25: 0xe0007004, 0x13a26: 0xe00052b4, + 0x13a2b: 0xe0008e35, + 0x13a2d: 0xe000764b, + 0x13a30: 0xe0007edd, 0x13a31: 0xe0004528, + 0x13a34: 0xe00082c9, 0x13a36: 0xe0005396, 0x13a37: 0xe0009f85, + 0x13a38: 0xe000877a, 0x13a39: 0xe00066e1, 0x13a3a: 0xe0006ea0, + 0x13a3f: 0xe0009c8c, + // Block 0x4e9, offset 0x13a40 + 0x13a40: 0xe0006430, 0x13a42: 0xe0005925, 0x13a43: 0xe0007d5a, + 0x13a44: 0xe0007270, 0x13a46: 0xe00070d5, + 0x13a48: 0xe00045c1, 0x13a4a: 0xe00062f4, 0x13a4b: 0xe0005bd4, + 0x13a4f: 0xe000484d, + 0x13a5a: 0xe00067d7, + 0x13a5c: 0xe0005e13, 0x13a5d: 0xe0007392, 0x13a5e: 0xe0008a69, + 0x13a60: 0xe0004bf6, 0x13a63: 0xe00091d5, + 0x13a68: 0xe0009d9c, 0x13a69: 0xe000530e, + 0x13a70: 0xe0006524, 0x13a73: 0xe0006ea4, + 0x13a74: 0xe0006183, 0x13a75: 0xe000993d, + 0x13a78: 0xe0007273, 0x13a79: 0xe00068e0, 0x13a7a: 0xe00083fa, + 0x13a7d: 0xe00053f2, 0x13a7e: 0xe000a6e5, 0x13a7f: 0xe0005299, + // Block 0x4ea, offset 0x13a80 + 0x13a80: 0xe00056ec, 0x13a82: 0xe00069a5, + 0x13a86: 0xe000791f, + 0x13a8a: 0xe0008db5, + 0x13a8d: 0xe0008c95, 0x13a8f: 0xe0006a8f, + 0x13a91: 0xe0005292, + 0x13a98: 0xe000582b, 0x13a99: 0xe0007aa7, 0x13a9a: 0xe0005928, + 0x13a9d: 0xe000577b, 0x13a9f: 0xe000877e, + 0x13aa0: 0xe00059a4, 0x13aa3: 0xe00074f5, + 0x13aa5: 0xe0007db2, 0x13aa7: 0xe0008782, + 0x13aa8: 0xe0005dbd, 0x13aaa: 0xe000860b, + 0x13aac: 0xe0007963, 0x13aad: 0xe0009970, + 0x13ab3: 0xe00090a0, + 0x13ab4: 0xe00099de, 0x13ab6: 0xe000956c, + 0x13aba: 0xe00054df, 0x13abb: 0xe0009159, + 0x13abc: 0xe0004cb9, 0x13abe: 0xe000826f, + // Block 0x4eb, offset 0x13ac0 + 0x13ac1: 0xe00079d8, 0x13ac2: 0xe0007fba, 0x13ac3: 0xe0006e40, + 0x13ac5: 0xe0004cbc, 0x13ac7: 0xe00079c6, + 0x13ac8: 0xe000a91b, 0x13aca: 0xe0004cbf, + 0x13acc: 0xe0006f28, 0x13acd: 0xe0006b5a, + 0x13ad0: 0xe00090d0, 0x13ad2: 0xe0006dc2, + 0x13ad6: 0xe0009ec5, + 0x13adb: 0xe0009524, + 0x13adc: 0xe0007315, 0x13ade: 0xe0006165, 0x13adf: 0xe0008ee3, + 0x13ae1: 0xe00043e0, + 0x13aea: 0xe000a173, 0x13aeb: 0xe0006434, + 0x13aec: 0xe0006374, + 0x13af3: 0xe00098ea, + 0x13af5: 0xe0009ac9, 0x13af6: 0xe00062f8, 0x13af7: 0xe000a2d5, + 0x13af8: 0xe00041db, 0x13af9: 0xe0006ea8, + 0x13afd: 0xe0006478, + // Block 0x4ec, offset 0x13b00 + 0x13b00: 0xe00067da, + 0x13b05: 0xe00079c9, 0x13b07: 0xe0008be9, + 0x13b11: 0xe0009dec, + 0x13b18: 0xe00070d8, 0x13b19: 0xe00093db, 0x13b1a: 0xe0008db8, + 0x13b1f: 0xe0005699, + 0x13b24: 0xe0008426, 0x13b26: 0xe000a0e3, + 0x13b28: 0xe00060fc, 0x13b2a: 0xe0005ad3, 0x13b2b: 0xe0005ad6, + 0x13b2e: 0xe0004278, 0x13b2f: 0xe00058b5, + 0x13b31: 0xe000427c, 0x13b32: 0xe0006d58, + 0x13b34: 0xe0006910, 0x13b36: 0xe0007ae7, + 0x13b38: 0xe0009706, + 0x13b3e: 0xe000776f, + // Block 0x4ed, offset 0x13b40 + 0x13b4a: 0xe0009570, 0x13b4b: 0xe0008008, + 0x13b4d: 0xe0008692, 0x13b4e: 0xe0004dfb, + 0x13b52: 0xe0005ed7, + 0x13b54: 0xe000a82a, + 0x13b58: 0xe0006a11, 0x13b59: 0xe00067dd, 0x13b5a: 0xe00056f0, + 0x13b5d: 0xe00090a3, 0x13b5f: 0xe0006c5c, + 0x13b61: 0xe0004590, 0x13b62: 0xe000854e, 0x13b63: 0xe0006834, + 0x13b65: 0xe000446d, 0x13b66: 0xe000a472, 0x13b67: 0xe0006df2, + 0x13b68: 0xe000502f, 0x13b69: 0xe0004fd7, 0x13b6a: 0xe000514d, 0x13b6b: 0xe0008166, + 0x13b6c: 0xe000689c, 0x13b6d: 0xe0009cf1, 0x13b6e: 0xe0007c01, 0x13b6f: 0xe0007575, + 0x13b70: 0xe0005150, 0x13b71: 0xe000a565, 0x13b73: 0xe0006438, + 0x13b77: 0xe00090a6, + 0x13b78: 0xe00080a2, 0x13b79: 0xe0004f77, 0x13b7b: 0xe0009838, + 0x13b7c: 0xe000606c, 0x13b7d: 0xe00075c0, 0x13b7e: 0xe0006a14, 0x13b7f: 0xe00085ca, + // Block 0x4ee, offset 0x13b80 + 0x13b85: 0xe0007c3d, + 0x13b91: 0xe0008132, 0x13b92: 0xe0007aeb, 0x13b93: 0xe0005a68, + 0x13b94: 0xe0009c12, 0x13b95: 0xe0009709, 0x13b97: 0xe0006126, + 0x13b9b: 0xe0004199, + 0x13b9c: 0xe00060c8, 0x13b9e: 0xe0009e98, 0x13b9f: 0xe0004cc2, + 0x13ba0: 0xe000629c, 0x13ba1: 0xe000848c, 0x13ba3: 0xe00044f7, + 0x13ba5: 0xe0007829, 0x13ba6: 0xe0004850, 0x13ba7: 0xe0008892, + 0x13bab: 0xe0008b0d, + 0x13bb1: 0xe0007b9f, 0x13bb3: 0xe000569d, + 0x13bb4: 0xe00088d1, + 0x13bb9: 0xe0009e2c, 0x13bba: 0xe0005f3c, 0x13bbb: 0xe0006837, + 0x13bbd: 0xe0004853, 0x13bbe: 0xe0009fa9, 0x13bbf: 0xe0006247, + // Block 0x4ef, offset 0x13bc0 + 0x13bc0: 0xe0006914, 0x13bc1: 0xe0008fd9, 0x13bc2: 0xe0006168, 0x13bc3: 0xe0006568, + 0x13bc4: 0xe000419c, 0x13bc5: 0xe000606f, + 0x13bc8: 0xe0008644, 0x13bc9: 0xe0005ea7, + 0x13bd7: 0xe0006014, + 0x13bdb: 0xe00042a0, + 0x13bdc: 0xe0009574, 0x13bdd: 0xe000945a, + 0x13be3: 0xe0007cd9, + 0x13be8: 0xe000860e, 0x13bea: 0xe0004b51, 0x13beb: 0xe0005edb, + 0x13bef: 0xe00066e5, + 0x13bf1: 0xe0007204, 0x13bf2: 0xe0008647, 0x13bf3: 0xe0004434, + 0x13bf4: 0xe000a6e8, 0x13bf5: 0xe0008516, 0x13bf6: 0xe0005324, + 0x13bf8: 0xe0007f8a, 0x13bf9: 0xe00079cc, + 0x13bfc: 0xe00056a1, + // Block 0x4f0, offset 0x13c00 + 0x13c00: 0xe0007319, 0x13c03: 0xe0008a6d, + 0x13c07: 0xe000a202, + 0x13c09: 0xe000970c, 0x13c0a: 0xe000a3b5, + 0x13c0f: 0xe000859a, + 0x13c10: 0xe0009578, 0x13c11: 0xe000848f, 0x13c12: 0xe000a688, + 0x13c33: 0xe00056c7, + 0x13c37: 0xe000a005, + 0x13c3b: 0xe0008921, + // Block 0x4f1, offset 0x13c40 + 0x13c45: 0xe0005d48, + 0x13c49: 0xe0005d1e, 0x13c4a: 0xe0008786, + 0x13c4e: 0xe0006b5d, + 0x13c52: 0xe00044fa, 0x13c53: 0xe0005f3f, + 0x13c56: 0xe0004725, + 0x13c58: 0xe00074f9, 0x13c5a: 0xe0007aab, 0x13c5b: 0xe0008c59, + 0x13c5d: 0xe0008e86, 0x13c5e: 0xe0007e11, 0x13c5f: 0xe000a0f3, + 0x13c60: 0xe00082cc, 0x13c62: 0xe000a359, + 0x13c68: 0xe0005863, 0x13c69: 0xe00067e0, 0x13c6a: 0xe00075c3, 0x13c6b: 0xe0005e17, + 0x13c7d: 0xe0005edf, 0x13c7e: 0xe0005ef7, 0x13c7f: 0xe000864a, + // Block 0x4f2, offset 0x13c80 + 0x13c81: 0xe0009674, 0x13c82: 0xe0008955, + 0x13c85: 0xe0004a85, + 0x13c89: 0xe0005afa, 0x13c8a: 0xe0004d87, + 0x13c8c: 0xe0004f13, + 0x13c91: 0xe0009a05, 0x13c93: 0xe00049f9, + 0x13c94: 0xe0006719, 0x13c96: 0xe00093df, + 0x13c98: 0xe0007381, + 0x13c9c: 0xe000944b, 0x13c9f: 0xe00055a8, + 0x13ca0: 0xe0009d1b, 0x13ca1: 0xe000a0f7, + 0x13ca9: 0xe000669d, 0x13cab: 0xe0004f7b, + 0x13caf: 0xe000a568, + 0x13cb0: 0xe0004856, 0x13cb1: 0xe0005cd8, 0x13cb2: 0xe00069a8, + 0x13cb4: 0xe00076e3, 0x13cb6: 0xe0006781, + 0x13cb9: 0xe0008895, + 0x13cbd: 0xe00072b1, + // Block 0x4f3, offset 0x13cc0 + 0x13cc3: 0xe0009940, + 0x13cc4: 0xe0005560, 0x13cc6: 0xe0006a17, 0x13cc7: 0xe00087de, + 0x13cca: 0xe0005878, 0x13ccb: 0xe0009494, + 0x13ccc: 0xe0005f7c, 0x13ccd: 0xe0009e18, 0x13cce: 0xe00081c7, + 0x13ce9: 0xe000983b, + 0x13cec: 0xe0005e5b, + 0x13cf1: 0xe000a80e, + 0x13cf5: 0xe0007dd3, + 0x13cf8: 0xe0008272, 0x13cf9: 0xe0009df0, + 0x13cfc: 0xe000764f, 0x13cfd: 0xe0005797, + // Block 0x4f4, offset 0x13d00 + 0x13d06: 0xe00066b5, + 0x13d09: 0xe0007b33, 0x13d0a: 0xe00076ff, + 0x13d11: 0xe0009f60, + 0x13d17: 0xe0008898, + 0x13d1a: 0xe0007589, 0x13d1b: 0xe00042cc, + 0x13d21: 0xe0009e9b, 0x13d23: 0xe000566d, + 0x13d26: 0xe00081ca, + 0x13d29: 0xe0009d1e, 0x13d2a: 0xe00047f9, 0x13d2b: 0xe000a475, + 0x13d2c: 0xe000878a, 0x13d2d: 0xe00041de, 0x13d2f: 0xe000782d, + 0x13d31: 0xe00097e4, 0x13d33: 0xe00081f4, + 0x13d35: 0xe0004ec1, 0x13d37: 0xe000a7f2, + 0x13d3a: 0xe0009011, + // Block 0x4f5, offset 0x13d40 + 0x13d42: 0xe00096be, + 0x13d50: 0xe0007207, + 0x13d54: 0xe000742a, + 0x13d59: 0xe00060dc, + 0x13d5c: 0xe0006bfc, 0x13d5f: 0xe0004d52, + 0x13d61: 0xe000643c, + 0x13d68: 0xe000957c, + 0x13d6d: 0xe0009892, 0x13d6f: 0xe0004b9c, + 0x13d72: 0xe0009e9e, + 0x13d74: 0xe0006bd0, + 0x13d78: 0xe000903d, 0x13d79: 0xe0004689, 0x13d7a: 0xe00091f1, 0x13d7b: 0xe0007831, + 0x13d7c: 0xe00093e3, 0x13d7f: 0xe000a478, + // Block 0x4f6, offset 0x13d80 + 0x13d80: 0xe0007128, 0x13d81: 0xe0009199, 0x13d82: 0xe0006018, + 0x13d84: 0xe00098d2, 0x13d86: 0xe0006e28, + 0x13d89: 0xe0007f8e, 0x13d8a: 0xe0007d9a, 0x13d8b: 0xe0004470, + 0x13d8d: 0xe000742d, + 0x13d90: 0xe0007f3e, 0x13d91: 0xe0006b60, 0x13d93: 0xe00064d1, + 0x13d96: 0xe0006a1a, + 0x13d9a: 0xe000720a, + 0x13dac: 0xe000675d, 0x13dad: 0xe0007703, 0x13dae: 0xe0005988, 0x13daf: 0xe00097e8, + 0x13db1: 0xe0009e30, + 0x13db4: 0xe000731d, + 0x13dbc: 0xe0005bb6, 0x13dbd: 0xe0009fc5, + // Block 0x4f7, offset 0x13dc0 + 0x13dc0: 0xe000683a, + 0x13dc6: 0xe0005ce4, + 0x13dd1: 0xe0005fe4, 0x13dd3: 0xe0005e5f, + 0x13dd4: 0xe00066e9, 0x13dd5: 0xe00096c1, 0x13dd7: 0xe0008611, + 0x13dd8: 0xe0006c60, 0x13dda: 0xe00080d2, + 0x13dde: 0xe0005c06, 0x13ddf: 0xe0008f25, + 0x13de1: 0xe000944e, 0x13de3: 0xe000878e, + 0x13de5: 0xe00097dc, 0x13de6: 0xe0008dbb, + 0x13dea: 0xe0008b11, + 0x13dec: 0xe000708d, 0x13ded: 0xe00083b6, 0x13def: 0xe000915d, + 0x13dfd: 0xe0009e4d, 0x13dff: 0xe00081cd, + // Block 0x4f8, offset 0x13e00 + 0x13e01: 0xe00053f6, 0x13e03: 0xe0006510, + 0x13e06: 0xe0009580, + 0x13e09: 0xe000970f, 0x13e0a: 0xe0007c40, 0x13e0b: 0xe0007c43, + 0x13e0e: 0xe0004bf9, + 0x13e13: 0xe00080a6, + 0x13e15: 0xe00082cf, 0x13e16: 0xe00044fd, + 0x13e18: 0xe0007f19, 0x13e19: 0xe000a3f4, + 0x13e1e: 0xe00096c4, + 0x13e21: 0xe00068e4, 0x13e23: 0xe0007321, + 0x13e24: 0xe00082d2, + 0x13e28: 0xe0004e4f, 0x13e29: 0xe0009be0, 0x13e2a: 0xe000616b, 0x13e2b: 0xe00056a5, + 0x13e2d: 0xe0007090, + 0x13e3a: 0xe0009019, + 0x13e3e: 0xe0005b8f, + // Block 0x4f9, offset 0x13e40 + 0x13e40: 0xe0007d3a, + 0x13e44: 0xe00062fc, 0x13e46: 0xe00077a8, 0x13e47: 0xe0006217, + 0x13e49: 0xe0007c46, 0x13e4a: 0xe00047fc, + 0x13e4c: 0xe000a232, 0x13e4f: 0xe0008429, + 0x13e51: 0xe00043e4, + 0x13e54: 0xe0008792, 0x13e57: 0xe000816a, + 0x13e59: 0xe0009a08, 0x13e5b: 0xe0006f2c, + 0x13e5d: 0xe000542a, + 0x13e64: 0xe000a1da, 0x13e65: 0xe000979c, 0x13e66: 0xe0009528, + 0x13e68: 0xe000a7fe, 0x13e69: 0xe0006c48, 0x13e6a: 0xe00074fd, + 0x13e6f: 0xe0006dc5, + 0x13e70: 0xe000a7d6, + 0x13e7a: 0xe0008c98, + // Block 0x4fa, offset 0x13e80 + 0x13e81: 0xe0004859, + 0x13e89: 0xe0008614, + 0x13e8d: 0xe0005813, 0x13e8e: 0xe0007501, 0x13e8f: 0xe0008796, + 0x13e90: 0xe0006132, + 0x13e95: 0xe000800b, + 0x13e9c: 0xe00058fe, 0x13e9d: 0xe0007c04, + 0x13ea4: 0xe0005724, 0x13ea5: 0xe0007835, + 0x13ea9: 0xe0006514, 0x13eaa: 0xe000720d, + 0x13eb7: 0xe000889b, + 0x13eb9: 0xe00077ab, 0x13eba: 0xe0005d6d, 0x13ebb: 0xe0008d4f, + 0x13ebd: 0xe0009a3e, 0x13ebf: 0xe0004a3d, + // Block 0x4fb, offset 0x13ec0 + 0x13ec0: 0xe0009b4c, 0x13ec2: 0xe0007c07, + 0x13ec4: 0xe0005153, 0x13ec6: 0xe0005aac, 0x13ec7: 0xe0007093, + 0x13eca: 0xe0007d22, 0x13ecb: 0xe0006a93, + 0x13ed6: 0xe000795f, 0x13ed7: 0xe00065a0, + 0x13ed8: 0xe00078d1, 0x13eda: 0xe0006eac, + 0x13ee2: 0xe0005b56, + 0x13ee7: 0xe0004500, + 0x13ee9: 0xe0006528, + 0x13eed: 0xe00057c3, 0x13eef: 0xe0009bf0, + 0x13efc: 0xe000624a, 0x13eff: 0xe0005760, + // Block 0x4fc, offset 0x13f00 + 0x13f01: 0xe0005156, + 0x13f0e: 0xe000a47b, + 0x13f10: 0xe000a037, 0x13f13: 0xe000a76c, + 0x13f14: 0xe000452c, 0x13f15: 0xe000948e, + 0x13f1b: 0xe000a23c, + 0x13f1c: 0xe0005aaf, 0x13f1e: 0xe000800e, 0x13f1f: 0xe000a47e, + 0x13f27: 0xe000a85d, + 0x13f2b: 0xe000a82d, + 0x13f2c: 0xe0004eee, 0x13f2f: 0xe0004ef1, + 0x13f31: 0xe000739a, + 0x13f38: 0xe000864d, 0x13f39: 0xe000a52d, 0x13f3a: 0xe000a830, 0x13f3b: 0xe0005f8c, + // Block 0x4fd, offset 0x13f40 + 0x13f4a: 0xe00061b9, 0x13f4b: 0xe0007c49, + 0x13f4c: 0xe0006440, 0x13f4d: 0xe0006a1d, + 0x13f53: 0xe000851a, + 0x13f55: 0xe0009584, + 0x13f63: 0xe00049aa, + 0x13f64: 0xe0008d52, + 0x13f68: 0xe000683d, 0x13f69: 0xe00099e1, 0x13f6a: 0xe00056df, + 0x13f6f: 0xe0004d55, + 0x13f70: 0xe00082d5, 0x13f71: 0xe0009481, + 0x13f74: 0xe00082d8, + // Block 0x4fe, offset 0x13f80 + 0x13f80: 0xe0008f28, + 0x13f85: 0xe0008b15, 0x13f86: 0xe00088d4, 0x13f87: 0xe0006b63, + 0x13f89: 0xe0005a6c, 0x13f8b: 0xe000536a, + 0x13f94: 0xe000a6eb, + 0x13f99: 0xe0007db5, 0x13f9b: 0xe0008ee6, + 0x13f9e: 0xe000a638, 0x13f9f: 0xe0004bfc, + 0x13fa3: 0xe000518f, + 0x13fa4: 0xe000a113, + 0x13fa9: 0xe00049ce, + 0x13fac: 0xe00049d2, 0x13fad: 0xe00091d9, + 0x13fb8: 0xe00070db, 0x13fb9: 0xe0007fbe, 0x13fbb: 0xe0007039, + 0x13fbe: 0xe00075c6, + // Block 0x4ff, offset 0x13fc0 + 0x13fc0: 0xe0009788, 0x13fc2: 0xe0006761, 0x13fc3: 0xe0007505, + 0x13fc6: 0xe000a309, + 0x13fc8: 0xe0007ca3, 0x13fc9: 0xe0006840, 0x13fca: 0xe0005d4b, 0x13fcb: 0xe0005867, + 0x13fd1: 0xe000539a, + 0x13fd8: 0xe00090a9, 0x13fda: 0xe00069ab, + 0x13fdc: 0xe00062b0, 0x13fdd: 0xe0005159, + 0x13fe1: 0xe0006bae, + 0x13fe5: 0xe0006e44, + 0x13fe8: 0xe0008b39, 0x13fe9: 0xe0008dbe, + 0x13ff4: 0xe00094f0, 0x13ff5: 0xe0007aaf, 0x13ff7: 0xe0004e43, + 0x13ffa: 0xe0007c4c, 0x13ffb: 0xe000968c, + 0x13fff: 0xe000816e, + // Block 0x500, offset 0x14000 + 0x14000: 0xe00056a9, + 0x1400c: 0xe0004a26, 0x1400e: 0xe00042d4, + 0x14015: 0xe000749d, 0x14017: 0xe000a68c, + 0x14019: 0xe0009df4, + 0x1401f: 0xe00081d0, + 0x14020: 0xe000671d, + 0x14024: 0xe00082db, 0x14025: 0xe000609c, 0x14026: 0xe000a008, + 0x14028: 0xe0007396, + 0x1402e: 0xe0006721, + 0x14034: 0xe000a481, 0x14036: 0xe0008b2d, + 0x14038: 0xe0007db8, + // Block 0x501, offset 0x14040 + 0x14042: 0xe000584f, 0x14043: 0xe000647c, + 0x1404c: 0xe00063a0, 0x1404d: 0xe000834e, + 0x14058: 0xe0008453, + 0x1405e: 0xe0005dfb, 0x1405f: 0xe000601c, + 0x14062: 0xe000a3b9, 0x14063: 0xe000574c, + 0x1406d: 0xe0005d4e, + 0x14073: 0xe0005472, + 0x14074: 0xe000919d, + 0x1407a: 0xe0005763, 0x1407b: 0xe0005c21, + 0x1407d: 0xe0008e69, + // Block 0x502, offset 0x14080 + 0x14080: 0xe0007144, + 0x14084: 0xe0009a96, 0x14087: 0xe0005dfe, + 0x1408a: 0xe000609f, 0x1408b: 0xe0007551, + 0x14092: 0xe0005efb, + 0x1409a: 0xe0009da8, 0x1409b: 0xe0009dac, + 0x140a0: 0xe0006378, 0x140a3: 0xe000515c, + 0x140ac: 0xe0006eb0, 0x140af: 0xe0007ee0, + 0x140b2: 0xe0009922, + 0x140b7: 0xe00054a2, + 0x140b9: 0xe000a1b0, 0x140bb: 0xe000842c, + 0x140be: 0xe0006f74, + // Block 0x503, offset 0x140c0 + 0x140c5: 0xe00073de, + 0x140cd: 0xe00042ec, + 0x140d1: 0xe0007bd3, + 0x140d5: 0xe0007ab3, + 0x140df: 0xe000582f, + 0x140e1: 0xe000592b, 0x140e2: 0xe0008f89, 0x140e3: 0xe0005901, + 0x140f1: 0xe000485c, 0x140f2: 0xe000462d, + 0x140f6: 0xe00086f6, + 0x140f9: 0xe00056e2, 0x140fb: 0xe0005e63, + // Block 0x504, offset 0x14100 + 0x14100: 0xe000a321, + 0x14104: 0xe00052f1, 0x14106: 0xe0008fe9, + 0x1410a: 0xe0005fec, + 0x1410c: 0xe000a206, 0x1410d: 0xe0007a73, 0x1410e: 0xe00042a4, + 0x14112: 0xe000a2d9, 0x14113: 0xe0007365, + 0x14117: 0xe000419f, + 0x14119: 0xe00075c9, 0x1411b: 0xe00081d3, + 0x1411d: 0xe0009926, 0x1411e: 0xe00081f7, + 0x14121: 0xe000a3bd, 0x14122: 0xe0004cc5, 0x14123: 0xe000842f, + 0x14128: 0xe0009f06, 0x1412b: 0xe0006c64, + 0x1412e: 0xe000493a, + 0x14130: 0xe0007189, 0x14132: 0xe0005204, + 0x14137: 0xe000992a, + 0x1413d: 0xe00085a6, 0x1413e: 0xe0004fdb, 0x1413f: 0xe0004fdf, + // Block 0x505, offset 0x14140 + 0x14141: 0xe0008136, 0x14142: 0xe0006030, + 0x14148: 0xe00041a2, 0x1414b: 0xe00054e2, + 0x1414d: 0xe0009ea1, + 0x14152: 0xe000536e, + 0x14156: 0xe0007210, 0x14157: 0xe0009161, + 0x1415b: 0xe00088d7, + 0x1415d: 0xe0006843, 0x1415e: 0xe000491e, + 0x14162: 0xe000652c, + 0x1416a: 0xe0004503, 0x1416b: 0xe0009f70, + 0x14174: 0xe000485f, + // Block 0x506, offset 0x14180 + 0x14180: 0xe0008552, 0x14181: 0xe000881e, 0x14182: 0xe00059c8, + 0x14185: 0xe00087e2, + 0x1418a: 0xe00052c9, + 0x1418d: 0xe000493e, 0x1418f: 0xe0005d21, + 0x14192: 0xe0006846, + 0x14194: 0xe0007c0a, 0x14195: 0xe0008275, + 0x14198: 0xe0004d58, 0x14199: 0xe0004db3, + 0x1419c: 0xe00066a0, 0x1419d: 0xe000879a, 0x1419f: 0xe0006b66, + 0x141a1: 0xe0005d24, + 0x141a8: 0xe00069ae, + 0x141af: 0xe0008f2b, + 0x141b1: 0xe0009f2d, 0x141b3: 0xe0006d04, + 0x141b4: 0xe00064b0, 0x141b5: 0xe00064b3, + 0x141b8: 0xe0005766, 0x141b9: 0xe0004a29, + 0x141bd: 0xe0008c9b, 0x141be: 0xe0004506, + // Block 0x507, offset 0x141c0 + 0x141c4: 0xe0009497, 0x141c7: 0xe00066ed, + 0x141ca: 0xe0009df8, + 0x141cc: 0xe0004942, + 0x141d0: 0xe00042d0, 0x141d2: 0xe0009ea4, 0x141d3: 0xe00066a3, + 0x141d5: 0xe00082de, + 0x141d8: 0xe00081d6, 0x141d9: 0xe00064b6, 0x141da: 0xe00088da, + 0x141e5: 0xe0007f32, 0x141e7: 0xe0004785, + 0x141ea: 0xe0009c8f, 0x141eb: 0xe0009a0b, + 0x141f0: 0xe0004548, + 0x141f6: 0xe00073aa, + 0x141f8: 0xe0005c09, 0x141fa: 0xe0009660, 0x141fb: 0xe0006f30, + // Block 0x508, offset 0x14200 + 0x14201: 0xe00043e8, + 0x14204: 0xe00078a5, + 0x1420d: 0xe000871a, + 0x14216: 0xe0007cdc, + 0x14218: 0xe0004b9f, + 0x1421c: 0xe0009624, 0x1421e: 0xe00065b8, 0x1421f: 0xe0004fe3, + 0x14220: 0xe00054a6, + 0x14224: 0xe0005817, + 0x1422a: 0xe0005eab, + 0x1422d: 0xe000a988, 0x1422f: 0xe0009a42, + 0x14232: 0xe00073ae, + 0x14234: 0xe00057db, + 0x1423f: 0xe0006dc8, + // Block 0x509, offset 0x14240 + 0x14241: 0xe0007ee3, 0x14243: 0xe00053fa, + 0x14246: 0xe00066f1, 0x14247: 0xe0009d7b, + 0x14248: 0xe000a1f2, 0x14249: 0xe000515f, 0x1424b: 0xe0004601, + 0x1424f: 0xe0004ec4, + 0x14253: 0xe0005f94, + 0x14256: 0xe0007430, 0x14257: 0xe0006bb1, + 0x14258: 0xe0008b19, + 0x14261: 0xe00045c5, + 0x14268: 0xe0007653, 0x14269: 0xe0005563, 0x1426a: 0xe0009a36, + 0x1426c: 0xe0005162, 0x1426f: 0xe0004d5b, + 0x14272: 0xe0004f7f, + 0x14277: 0xe000949a, + 0x1427a: 0xe0004204, + 0x1427d: 0xe000581b, 0x1427f: 0xe0008959, + // Block 0x50a, offset 0x14280 + 0x14280: 0xe0004a89, + 0x14292: 0xe0004208, + 0x14294: 0xe0004fa7, 0x14296: 0xe0004651, + 0x1429a: 0xe00048b6, + 0x1429c: 0xe0008650, 0x1429d: 0xe00088dd, + 0x142a3: 0xe000a1b3, + 0x142a5: 0xe0004bba, + 0x142b1: 0xe0009fc9, 0x142b3: 0xe00048f6, + 0x142b4: 0xe0006d08, + 0x142b8: 0xe000978c, + // Block 0x50b, offset 0x142c0 + 0x142c0: 0xe0007937, 0x142c2: 0xe0008bed, 0x142c3: 0xe00067e3, + 0x142c7: 0xe0004bbe, + 0x142c8: 0xe00047d2, 0x142c9: 0xe0006570, 0x142ca: 0xe0007509, + 0x142cc: 0xe000a531, 0x142ce: 0xe0009c53, + 0x142d0: 0xe00076bb, 0x142d1: 0xe00084b6, 0x142d3: 0xe000a7da, + 0x142d4: 0xe000839a, 0x142d5: 0xe0006c28, 0x142d6: 0xe000a8d3, 0x142d7: 0xe0009b2c, + 0x142d8: 0xe00050e7, 0x142db: 0xe0007dbb, + 0x142dd: 0xe00075cc, 0x142df: 0xe0007158, + 0x142e2: 0xe000a8bf, 0x142e3: 0xe0004649, + 0x142e5: 0xe00052d9, + 0x142ea: 0xe0006444, + 0x142ed: 0xe0006f34, + 0x142f1: 0xe000a23f, + 0x142f4: 0xe0007096, 0x142f6: 0xe00041a5, + 0x142fa: 0xe0009165, 0x142fb: 0xe0008ee9, + 0x142fc: 0xe0008c5d, 0x142fe: 0xe0008653, + // Block 0x50c, offset 0x14300 + 0x14301: 0xe00048b9, + 0x14306: 0xe00088e0, + 0x1430b: 0xe0008f2e, + 0x14310: 0xe0006b69, 0x14311: 0xe00084b9, + 0x14314: 0xe0008d55, 0x14315: 0xe0009e1c, 0x14316: 0xe0009f79, 0x14317: 0xe000a3d9, + 0x14318: 0xe0004de7, 0x1431b: 0xe000889e, + 0x1431e: 0xe0006b6c, + 0x14320: 0xe0007ba3, 0x14321: 0xe000a7ae, 0x14322: 0xe0007325, 0x14323: 0xe0007c0d, + 0x14326: 0xe0007433, + 0x14329: 0xe0007436, 0x1432b: 0xe0009ae7, + 0x1432c: 0xe0004d5e, 0x1432d: 0xe0004e64, 0x1432e: 0xe00089dd, + 0x14330: 0xe000a97c, 0x14331: 0xe000a56b, 0x14332: 0xe000a1b6, 0x14333: 0xe0006d0c, + 0x14335: 0xe0006eb4, + 0x14339: 0xe0009600, + 0x1433c: 0xe000a703, 0x1433f: 0xe0004b6f, + // Block 0x50d, offset 0x14340 + 0x14342: 0xe0008dc1, + 0x14344: 0xe0005b92, 0x14345: 0xe0008eec, 0x14346: 0xe0004b55, 0x14347: 0xe00049fc, + 0x1434c: 0xe00090ac, 0x1434d: 0xe000851e, + 0x14351: 0xe0004b59, 0x14353: 0xe0006dcb, + 0x14355: 0xe0009b7c, + 0x14358: 0xe0008278, 0x1435a: 0xe0009751, + 0x1435e: 0xe00078f7, + 0x14360: 0xe0007008, 0x14361: 0xe00047d5, 0x14362: 0xe000a30d, 0x14363: 0xe000616e, + 0x14364: 0xe0007ca6, 0x14365: 0xe0004862, 0x14366: 0xe000715c, 0x14367: 0xe0009ec8, + 0x14368: 0xe000a6ee, 0x1436a: 0xe0006f38, + 0x14370: 0xe0007213, 0x14372: 0xe00049ff, + 0x14379: 0xe00069b1, + 0x1437c: 0xe0008432, 0x1437e: 0xe0008366, 0x1437f: 0xe0008d58, + // Block 0x50e, offset 0x14380 + 0x14382: 0xe0009604, + 0x14384: 0xe0007329, 0x14387: 0xe00053fe, + 0x14389: 0xe00081fa, 0x1438b: 0xe0009678, + 0x1438d: 0xe0008847, 0x1438f: 0xe000983e, + 0x14392: 0xe00058b9, + 0x14396: 0xe0005b26, + 0x1439b: 0xe000827b, + 0x1439c: 0xe0009644, 0x1439e: 0xe0009dfc, 0x1439f: 0xe0007463, + 0x143a0: 0xe000a816, 0x143a1: 0xe0007439, + 0x143a4: 0xe0007657, 0x143a6: 0xe00096a3, 0x143a7: 0xe000a1b9, + 0x143aa: 0xe0008bf1, 0x143ab: 0xe0004280, + 0x143ad: 0xe000827e, 0x143ae: 0xe0008617, + 0x143b0: 0xe0007466, 0x143b1: 0xe000a842, 0x143b3: 0xe0007707, + 0x143b4: 0xe000a0fb, 0x143b6: 0xe0007579, 0x143b7: 0xe0009f4c, + 0x143b8: 0xe0008c9e, 0x143ba: 0xe000793b, + 0x143bc: 0xe000a81a, 0x143be: 0xe00051bc, + // Block 0x50f, offset 0x143c0 + 0x143c0: 0xe0006072, 0x143c1: 0xe000769f, 0x143c2: 0xe00081d9, + 0x143c4: 0xe0005728, 0x143c7: 0xe000454c, + 0x143cc: 0xe00041e1, 0x143ce: 0xe000621a, + 0x143d0: 0xe00062b4, 0x143d1: 0xe000a412, + 0x143d4: 0xe000a03b, 0x143d6: 0xe0007108, 0x143d7: 0xe0006448, + 0x143d9: 0xe0004665, 0x143da: 0xe00084d6, 0x143db: 0xe00043ec, + 0x143dc: 0xe0008172, 0x143dd: 0xe0006b6f, + 0x143e0: 0xe0007ee6, 0x143e3: 0xe0008050, + 0x143e6: 0xe0004789, + 0x143e8: 0xe0006075, 0x143eb: 0xe0008925, + 0x143ec: 0xe0005c4b, + 0x143f3: 0xe0004cc8, + 0x143f7: 0xe0007cdf, + 0x143f9: 0xe0004f83, + 0x143fe: 0xe0005e83, + // Block 0x510, offset 0x14400 + 0x14401: 0xe000a56e, 0x14403: 0xe000a7b1, + 0x14409: 0xe0009041, + 0x1440c: 0xe0007dd6, 0x1440e: 0xe000a873, 0x1440f: 0xe00050ea, + 0x14414: 0xe0006ef8, 0x14416: 0xe0009377, + 0x14418: 0xe00074a1, 0x14419: 0xe0009754, 0x1441a: 0xe0005402, + 0x1441c: 0xe00066a6, 0x1441f: 0xe0008dc4, + 0x14426: 0xe0004729, + 0x1442b: 0xe0006f94, + 0x1442c: 0xe00069b4, 0x1442f: 0xe00079f3, + 0x14430: 0xe0008435, 0x14431: 0xe0006efc, + 0x14434: 0xe0004605, 0x14437: 0xe000a484, + 0x1443d: 0xe0007c10, 0x1443f: 0xe000a415, + // Block 0x511, offset 0x14440 + 0x14440: 0xe00055e1, + 0x14449: 0xe00082e1, 0x1444a: 0xe00065cc, + 0x1444c: 0xe0007ab7, 0x1444e: 0xe0007276, + 0x14450: 0xe0007216, 0x14452: 0xe0009347, 0x14453: 0xe00078a9, + 0x14456: 0xe000934b, + 0x1445a: 0xe00092d7, + 0x1445c: 0xe00054aa, 0x1445e: 0xe000794b, + // Block 0x512, offset 0x14480 + 0x144b7: 0xe00048e2, + 0x144bf: 0xe00047d8, + // Block 0x513, offset 0x144c0 + 0x144c1: 0xe000a630, + 0x144c6: 0xe00056ca, 0x144c7: 0xe0004438, + 0x144c8: 0xe00050ed, 0x144c9: 0xe0007469, 0x144ca: 0xe0009f50, + 0x144cc: 0xe0007e15, 0x144ce: 0xe0007279, + 0x144d5: 0xe000743c, 0x144d6: 0xe00098ee, + 0x144da: 0xe000560d, + 0x144e1: 0xe0006d10, 0x144e2: 0xe000a610, + 0x144e8: 0xe000a976, 0x144ea: 0xe000a487, 0x144eb: 0xe0007c13, + 0x144ec: 0xe00088e3, + 0x144f3: 0xe0006a97, + 0x144f8: 0xe0009a0e, 0x144f9: 0xe0009f09, 0x144fa: 0xe000743f, + // Block 0x514, offset 0x14500 + 0x14502: 0xe0009712, 0x14503: 0xe0005f60, + 0x1450a: 0xe0005f4c, + 0x1450c: 0xe0006078, 0x1450d: 0xe0005d51, + 0x14513: 0xe0006135, + 0x14514: 0xe0006a20, + 0x14518: 0xe0005f64, + 0x1451d: 0xe0009d7e, 0x1451e: 0xe0008bf5, + 0x14520: 0xe00067e6, 0x14521: 0xe0008821, 0x14522: 0xe00049ae, + 0x14527: 0xe0006a73, + 0x14528: 0xe000a571, 0x14529: 0xe0009d38, 0x1452a: 0xe0009bac, 0x1452b: 0xe0004a8d, + 0x1452c: 0xe0009469, 0x1452f: 0xe00088a1, + 0x14530: 0xe000702d, 0x14532: 0xe0008656, 0x14533: 0xe0008495, + 0x14534: 0xe0004e9d, 0x14536: 0xe0009e00, 0x14537: 0xe0005f21, + 0x14538: 0xe00054e5, 0x1453a: 0xe000a6b0, 0x1453b: 0xe00069b7, + 0x1453c: 0xe0009648, 0x1453d: 0xe0008492, 0x1453f: 0xe0006171, + // Block 0x515, offset 0x14540 + 0x14540: 0xe000a00b, 0x14541: 0xe00068a0, 0x14542: 0xe0005b6e, 0x14543: 0xe000859e, + 0x14544: 0xe000a6f1, 0x14546: 0xe00065f0, 0x14547: 0xe000861a, + 0x14548: 0xe00041a8, 0x1454a: 0xe0008929, + 0x14551: 0xe0009169, 0x14553: 0xe0006a77, + 0x14559: 0xe0008f31, 0x1455a: 0xe0005b71, + 0x1455c: 0xe0006b72, 0x1455e: 0xe0006d14, + 0x14560: 0xe00064b9, 0x14561: 0xe00044a6, 0x14562: 0xe000a2dd, 0x14563: 0xe0005f24, + 0x14564: 0xe000952c, 0x14566: 0xe00067e9, + 0x1456a: 0xe00091dd, + 0x1456c: 0xe00087e6, 0x1456d: 0xe0005566, + 0x14574: 0xe0005b74, + 0x1457b: 0xe00067ec, + 0x1457c: 0xe0004ccb, 0x1457d: 0xe0006d46, + // Block 0x516, offset 0x14580 + 0x14584: 0xe00090af, 0x14585: 0xe0009943, 0x14587: 0xe0008322, + 0x14588: 0xe0009045, 0x1458a: 0xe00092db, 0x1458b: 0xe0007693, + 0x1458d: 0xe0006f78, 0x1458f: 0xe0007bd7, + 0x14590: 0xe0007535, 0x14593: 0xe000879e, + 0x14594: 0xe0006a23, 0x14596: 0xe000710c, + 0x1459b: 0xe00049d6, + // Block 0x517, offset 0x145c0 + 0x145e4: 0xe000892d, 0x145e6: 0xe0006b75, 0x145e7: 0xe00051d4, + 0x145eb: 0xe000a281, + 0x145ed: 0xe0008659, + 0x145f0: 0xe0008eef, 0x145f3: 0xe0004ec7, + 0x145f4: 0xe00067ef, 0x145f6: 0xe00042a8, 0x145f7: 0xe00050f0, + // Block 0x518, offset 0x14600 + 0x14601: 0xe00091a1, + 0x14605: 0xe0009715, + 0x1460a: 0xe000818a, + 0x1460e: 0xe0008f34, + 0x14610: 0xe000a32d, + 0x14619: 0xe0008d5b, + 0x14620: 0xe0009757, 0x14623: 0xe0009973, + 0x14628: 0xe0009841, 0x1462b: 0xe0004c38, + 0x14632: 0xe0009307, 0x14633: 0xe0008de1, + 0x1463a: 0xe00067f2, + 0x1463e: 0xe00090b2, + // Block 0x519, offset 0x14640 + 0x14642: 0xe0005165, + 0x14646: 0xe0009c15, + 0x1464b: 0xe00063c0, + 0x1464c: 0xe00091e1, 0x1464e: 0xe0009aea, 0x1464f: 0xe00041ab, + 0x14655: 0xe0008b3d, 0x14656: 0xe00094f4, 0x14657: 0xe0006849, + 0x1465b: 0xe0009cf4, + 0x1465d: 0xe00044d3, 0x1465f: 0xe0004fab, + 0x14661: 0xe0008931, 0x14663: 0xe0006eb8, + 0x14668: 0xe0004a02, 0x1466a: 0xe0004e8b, 0x1466b: 0xe00049da, + 0x1466c: 0xe0004ef4, 0x1466f: 0xe0005ab2, + 0x14671: 0xe0009a11, 0x14673: 0xe0005569, + 0x1467c: 0xe0004d9f, + // Block 0x51a, offset 0x14680 + 0x14686: 0xe0008fbd, + 0x14688: 0xe00070de, 0x14689: 0xe00058d5, 0x1468a: 0xe0007f92, + 0x1468f: 0xe0005446, + 0x14690: 0xe0009530, + 0x14694: 0xe0009b50, + 0x1469d: 0xe0004a2c, 0x1469e: 0xe00044d6, 0x1469f: 0xe00090d3, + 0x146aa: 0xe0008e39, + 0x146b0: 0xe0008281, + 0x146b4: 0xe0007fc2, 0x146b5: 0xe0008e3d, 0x146b6: 0xe0008cd1, + 0x146bd: 0xe0008053, + // Block 0x51b, offset 0x146c0 + 0x146c0: 0xe0008b41, 0x146c2: 0xe0008284, + 0x146c4: 0xe0008ca1, 0x146c7: 0xe0004530, + 0x146c8: 0xe000556c, 0x146c9: 0xe0009266, 0x146ca: 0xe000a3f7, + 0x146cc: 0xe000941b, 0x146cf: 0xe0008cd4, + 0x146d5: 0xe0009fcd, + 0x146d9: 0xe00098d6, + 0x146dc: 0xe00098f2, 0x146df: 0xe0008935, + 0x146e0: 0xe00094cc, 0x146e3: 0xe0005e87, + 0x146e4: 0xe0008e6d, + 0x146f2: 0xe0008fc1, + 0x146f4: 0xe00098da, 0x146f6: 0xe0004e53, + 0x146fb: 0xe0004c3b, + // Block 0x51c, offset 0x14700 + 0x14701: 0xe0008d5e, + 0x14705: 0xe00097a0, 0x14707: 0xe00088a4, + 0x14709: 0xe000561d, 0x1470a: 0xe0008ef2, 0x1470b: 0xe0008cd7, + 0x1470d: 0xe0007839, + 0x14710: 0xe00059fc, 0x14711: 0xe00094f8, 0x14713: 0xe00090d6, + 0x14714: 0xe0008a71, + 0x14719: 0xe0005d9d, + 0x14721: 0xe0006fbc, + 0x14729: 0xe0004a4d, 0x1472a: 0xe0005d71, 0x1472b: 0xe000750d, + 0x1472c: 0xe0004dff, + 0x14731: 0xe0009aed, 0x14733: 0xe0004e03, + // Block 0x51d, offset 0x14740 + 0x14740: 0xe0004cce, + 0x14746: 0xe00096c7, + 0x1474a: 0xe0009269, 0x1474b: 0xe00076a3, + 0x1474c: 0xe0004e67, 0x1474d: 0xe0004db7, + 0x14752: 0xe000a251, + 0x1475f: 0xe0007a77, + 0x14768: 0xe0005a70, 0x1476b: 0xe000916d, + 0x14778: 0xe00098de, 0x14779: 0xe00090d9, 0x1477a: 0xe000975a, 0x1477b: 0xe00041ae, + 0x1477c: 0xe000857e, 0x1477e: 0xe00074a5, + // Block 0x51e, offset 0x14780 + 0x14783: 0xe0004bff, + 0x14785: 0xe0005ab5, 0x14787: 0xe0008a75, + 0x14788: 0xe0008f37, 0x14789: 0xe0008824, + 0x14792: 0xe000964c, 0x14793: 0xe0005e67, + 0x14794: 0xe00066a9, 0x14795: 0xe000472d, + 0x1479b: 0xe00058bd, + 0x1479c: 0xe00099e4, 0x1479d: 0xe000a845, 0x1479e: 0xe0005ee3, 0x1479f: 0xe00095ac, + 0x147a6: 0xe000598c, 0x147a7: 0xe0006650, + 0x147a8: 0xe0004ab9, 0x147a9: 0xe00064bc, 0x147aa: 0xe0005c84, + 0x147af: 0xe0009215, + 0x147b0: 0xe00078d5, 0x147b3: 0xe0008ef5, + 0x147b8: 0xe0007219, 0x147b9: 0xe00066f5, 0x147bb: 0xe00066f9, + 0x147be: 0xe00089e1, 0x147bf: 0xe00079cf, + // Block 0x51f, offset 0x147c0 + 0x147c0: 0xe0007d3e, 0x147c2: 0xe00048fa, + 0x147c4: 0xe000a0bb, 0x147c5: 0xe000813a, 0x147c6: 0xe0005b1e, + 0x147c9: 0xe00089e5, + 0x147cd: 0xe00095b0, 0x147ce: 0xe0004c02, + 0x147d2: 0xe00068e8, + 0x147d4: 0xe0005da1, 0x147d7: 0xe0004374, + 0x147d8: 0xe000a614, + 0x147dd: 0xe00079d2, 0x147de: 0xe000a0ff, 0x147df: 0xe0004bb2, + 0x147e1: 0xe0006a26, 0x147e2: 0xe0005948, 0x147e3: 0xe0005960, + 0x147e4: 0xe0005ad9, + // Block 0x520, offset 0x14800 + 0x1481b: 0xe0007511, + 0x1481c: 0xe0004865, 0x1481f: 0xe0009f7c, + 0x14822: 0xe00057f3, 0x14823: 0xe00057eb, + 0x14826: 0xe0009d3c, + 0x14828: 0xe00065d0, + 0x1482d: 0xe0006b78, 0x1482e: 0xe00065e8, 0x1482f: 0xe00065d4, + 0x14830: 0xe0009171, 0x14831: 0xe0007f36, 0x14832: 0xe000529d, + 0x1483b: 0xe000759d, + 0x1483f: 0xe0009588, + // Block 0x521, offset 0x14840 + 0x14840: 0xe00042ac, 0x14842: 0xe0008011, 0x14843: 0xe0007ce2, + 0x14844: 0xe000a8e3, 0x14845: 0xe0007515, + 0x1484d: 0xe0005704, 0x1484e: 0xe0007ba7, + 0x14851: 0xe0004f87, 0x14853: 0xe00075f6, + 0x14854: 0xe000637c, 0x14855: 0xe0007ce5, + 0x14862: 0xe000975d, + 0x14864: 0xe00084bc, 0x14865: 0xe000a3dd, 0x14866: 0xe00041b1, + 0x14868: 0xe0009c2a, 0x1486a: 0xe0008939, 0x1486b: 0xe0006300, + 0x1486c: 0xe0007e61, 0x1486d: 0xe00091e5, + 0x14870: 0xe0007369, 0x14872: 0xe000459c, + 0x14874: 0xe000a706, 0x14877: 0xe000621d, + 0x14878: 0xe000666c, 0x14879: 0xe000893d, 0x1487a: 0xe000522c, + 0x1487d: 0xe0009844, + // Block 0x522, offset 0x14880 + 0x14880: 0xe0009c92, 0x14881: 0xe0007160, 0x14882: 0xe0004ae1, 0x14883: 0xe000556f, + 0x14885: 0xe000a796, 0x14886: 0xe00079f7, + 0x14888: 0xe000a3c1, 0x1488b: 0xe0009ea7, + 0x1488c: 0xe00082e4, 0x1488d: 0xe0007099, 0x1488f: 0xe0009ca7, + 0x14890: 0xe00098e2, 0x14891: 0xe0004cd1, + 0x14894: 0xe0005572, 0x14895: 0xe0004731, 0x14896: 0xe000895d, 0x14897: 0xe00056cd, + 0x14899: 0xe00088a7, 0x1489a: 0xe0009c76, + 0x1489d: 0xe0006dce, 0x1489e: 0xe0005a30, 0x1489f: 0xe0007110, + 0x148a0: 0xe0008d61, 0x148a1: 0xe0008f8d, 0x148a2: 0xe0006765, 0x148a3: 0xe0005990, + 0x148ae: 0xe00096a6, + 0x148b1: 0xe0008ef8, 0x148b2: 0xe0009175, + 0x148b4: 0xe0009b54, 0x148b5: 0xe0004eca, 0x148b6: 0xe00081fd, + 0x148b8: 0xe000856e, + 0x148bc: 0xe0009fe5, 0x148be: 0xe000828a, + // Block 0x523, offset 0x148c0 + 0x148c1: 0xe00056f4, 0x148c2: 0xe000721c, + 0x148c7: 0xe0008014, + 0x148c9: 0xe0008c61, 0x148ca: 0xe0008287, 0x148cb: 0xe00080aa, + 0x148cd: 0xe0009dd0, 0x148ce: 0xe0004a05, 0x148cf: 0xe00076bf, + 0x148d0: 0xe000a00e, 0x148d1: 0xe000a690, 0x148d2: 0xe0008f3a, 0x148d3: 0xe0005575, + 0x148d4: 0xe00053ae, 0x148d5: 0xe00081dc, + 0x148d8: 0xe0004d61, 0x148d9: 0xe0007ee9, 0x148db: 0xe0005c5a, + 0x148dc: 0xe000712c, 0x148dd: 0xe000544a, 0x148de: 0xe00096a9, + 0x148e0: 0xe000813e, 0x148e1: 0xe000709c, 0x148e3: 0xe0004609, + 0x148e8: 0xe0007ce8, 0x148e9: 0xe0008941, + 0x148ec: 0xe0007118, 0x148ed: 0xe0008d64, 0x148ee: 0xe000926c, 0x148ef: 0xe00056f8, + 0x148f2: 0xe00090b5, + 0x148f5: 0xe0008f91, 0x148f6: 0xe0007f1c, 0x148f7: 0xe0009534, + 0x148f8: 0xe0006ebc, 0x148fa: 0xe000828d, + 0x148fc: 0xe0005bb9, 0x148fd: 0xe00044d9, 0x148ff: 0xe0009f73, + // Block 0x524, offset 0x14900 + 0x14900: 0xe0007eec, 0x14901: 0xe0005f27, 0x14902: 0xe000a1bc, 0x14903: 0xe000721f, + 0x14904: 0xe000a5e8, 0x14905: 0xe0008a79, 0x14907: 0xe0008498, + 0x14908: 0xe0005e1b, 0x1490a: 0xe00065d8, + 0x1490c: 0xe000592e, 0x1490f: 0xe0005769, + 0x14910: 0xe0005d54, 0x14911: 0xe00083e2, + 0x14915: 0xe0007d76, + 0x14919: 0xe0005ee7, + 0x14920: 0xe0006a9b, 0x14922: 0xe000a3c5, 0x14923: 0xe00051aa, + 0x14926: 0xe000644c, + 0x14928: 0xe00097b4, 0x1492a: 0xe0006b7b, + 0x1492f: 0xe0004334, + 0x14930: 0xe0009c18, 0x14931: 0xe0004cd4, 0x14933: 0xe0006a29, + 0x14935: 0xe000709f, + 0x14938: 0xe00088aa, + 0x1493d: 0xe0004ef7, + // Block 0x525, offset 0x14940 + 0x14941: 0xe000807e, 0x14943: 0xe000a13b, + 0x14944: 0xe0004f4f, 0x14945: 0xe00091f5, + 0x1494a: 0xe0004c05, + 0x1495c: 0xe00048bc, 0x1495d: 0xe000a053, 0x1495e: 0xe0005853, + 0x14961: 0xe0004dbb, 0x14962: 0xe0007bdb, + 0x14968: 0xe00067f5, 0x1496a: 0xe000949d, 0x1496b: 0xe0006a2c, + 0x1496d: 0xe0004a41, 0x1496f: 0xe000542e, + 0x14974: 0xe0009a8a, 0x14975: 0xe0008017, + 0x1497d: 0xe0005578, + // Block 0x526, offset 0x14980 + 0x14982: 0xe0007623, + 0x14992: 0xe0009847, + 0x14995: 0xe000a21e, + 0x14999: 0xe00069ba, + 0x1499e: 0xe000839e, + 0x149a2: 0xe000794f, 0x149a3: 0xe00087ea, + 0x149a7: 0xe000572c, + 0x149ad: 0xe0008bf9, + 0x149b0: 0xe0005da5, 0x149b1: 0xe0009d21, 0x149b2: 0xe0005372, + 0x149b4: 0xe00079a3, + 0x149bd: 0xe0008a7d, + // Block 0x527, offset 0x149c0 + 0x149c8: 0xe0005964, 0x149c9: 0xe0008290, 0x149ca: 0xe0008bfd, 0x149cb: 0xe000984a, + 0x149cc: 0xe0008696, 0x149cd: 0xe00064bf, 0x149ce: 0xe0008efb, + 0x149d2: 0xe0008efe, + 0x149d6: 0xe0009bb8, 0x149d7: 0xe000a7b4, + 0x149e2: 0xe0009718, 0x149e3: 0xe0004378, + 0x149e4: 0xe00048bf, 0x149e5: 0xe00070e1, + 0x149e9: 0xe0006020, 0x149ea: 0xe000579b, + 0x149ec: 0xe0007222, + 0x149f2: 0xe0008c65, + 0x149f4: 0xe00055ab, 0x149f5: 0xe000a754, 0x149f6: 0xe0005f42, 0x149f7: 0xe000a4d1, + 0x149f8: 0xe0006c00, 0x149f9: 0xe0005b95, + // Block 0x528, offset 0x14a00 + 0x14a03: 0xe000798f, + 0x14a07: 0xe000732d, + 0x14a09: 0xe0009976, 0x14a0b: 0xe000971b, + 0x14a0d: 0xe0008ca4, + 0x14a10: 0xe000a4c0, 0x14a12: 0xe000700c, + 0x14a1c: 0xe000984d, 0x14a1e: 0xe0007d42, + 0x14a22: 0xe000a1dd, + 0x14a2a: 0xe0005bd7, 0x14a2b: 0xe0008438, + 0x14a2c: 0xe00087a2, 0x14a2e: 0xe000971e, 0x14a2f: 0xe000a3fa, + 0x14a31: 0xe00063c4, 0x14a32: 0xe00052ad, + 0x14a34: 0xe0005a85, 0x14a35: 0xe00044ae, + // Block 0x529, offset 0x14a40 + 0x14a40: 0xe00078ad, 0x14a41: 0xe000a8c3, 0x14a43: 0xe000746c, + 0x14a45: 0xe0007b1b, 0x14a47: 0xe0009451, + 0x14a49: 0xe0008293, 0x14a4b: 0xe0006e2c, + 0x14a4c: 0xe0005d27, 0x14a4d: 0xe0008fed, 0x14a4e: 0xe000781b, 0x14a4f: 0xe00058c1, + 0x14a50: 0xe0005d2a, 0x14a51: 0xe0005193, + 0x14a57: 0xe000718c, + 0x14a58: 0xe0008c01, + 0x14a5c: 0xe00067f8, 0x14a5d: 0xe0009a72, + 0x14a63: 0xe0008d67, + 0x14a64: 0xe0006c6c, 0x14a66: 0xe0004d64, 0x14a67: 0xe0009538, + 0x14a6a: 0xe000801a, + 0x14a6d: 0xe00049de, + 0x14a75: 0xe0009454, + 0x14a7f: 0xe0004faf, + // Block 0x52a, offset 0x14a80 + 0x14a87: 0xe000684c, + 0x14a8d: 0xe00056fc, + 0x14a90: 0xe0004584, 0x14a91: 0xe0009d40, 0x14a92: 0xe0006c7c, + 0x14a94: 0xe0009760, 0x14a97: 0xe0008326, + 0x14a9c: 0xe000a72b, 0x14a9e: 0xe0004f17, 0x14a9f: 0xe0008dc7, + 0x14ab4: 0xe0005a34, 0x14ab5: 0xe0006670, 0x14ab7: 0xe00048c2, + 0x14ab8: 0xe00063e0, 0x14aba: 0xe0007d0a, + 0x14abf: 0xe00089e9, + // Block 0x52b, offset 0x14ac0 + 0x14ac0: 0xe0004390, 0x14ac1: 0xe00091a5, + 0x14ac5: 0xe00044dc, + 0x14ac9: 0xe000a2e1, 0x14acb: 0xe0009ecb, + 0x14ace: 0xe0006d7c, 0x14acf: 0xe0006df5, + 0x14ad0: 0xe0006e48, 0x14ad2: 0xe0008f3d, + 0x14ad7: 0xe0004669, + 0x14adb: 0xe0007a7b, + 0x14ade: 0xe000818e, + 0x14ae2: 0xe00063c8, + 0x14ae4: 0xe0004cd7, 0x14ae5: 0xe000736d, 0x14ae6: 0xe0008c05, + 0x14af7: 0xe000a545, + 0x14af8: 0xe0004c3e, + 0x14afc: 0xe0006678, 0x14afe: 0xe00060a2, + // Block 0x52c, offset 0x14b00 + 0x14b00: 0xe000836a, 0x14b03: 0xe00097e0, + 0x14b05: 0xe0005671, + 0x14b0b: 0xe00085aa, + 0x14b11: 0xe0006ec0, 0x14b13: 0xe00089ed, + 0x14b15: 0xe00095d0, 0x14b16: 0xe0007225, + 0x14b18: 0xe0006024, 0x14b19: 0xe0004a2f, 0x14b1a: 0xe0008dca, 0x14b1b: 0xe0006f98, + 0x14b1c: 0xe000a0e7, + 0x14b33: 0xe0007c16, + 0x14b36: 0xe0004cda, 0x14b37: 0xe00070a2, + 0x14b39: 0xe0007228, + // Block 0x52d, offset 0x14b40 + 0x14b46: 0xe0008332, + 0x14b4c: 0xe0008c09, 0x14b4f: 0xe000a35d, + 0x14b51: 0xe0008a81, 0x14b52: 0xe0006769, + 0x14b57: 0xe000a311, + 0x14b5f: 0xe0009a8e, + 0x14b64: 0xe0006dd1, 0x14b65: 0xe0008c69, + 0x14b6a: 0xe0009eaa, + 0x14b72: 0xe0006674, + 0x14b78: 0xe00044df, 0x14b79: 0xe000941f, 0x14b7a: 0xe0008176, + 0x14b7c: 0xe00043f0, 0x14b7d: 0xe0008dcd, + // Block 0x52e, offset 0x14b80 + 0x14b84: 0xe0005afe, 0x14b86: 0xe0009423, + 0x14b8f: 0xe00075f9, + 0x14b90: 0xe0009850, + 0x14b95: 0xe0004946, + 0x14b98: 0xe0009853, 0x14b99: 0xe0009a14, 0x14b9a: 0xe000884b, + 0x14b9e: 0xe0007331, 0x14b9f: 0xe0005406, + 0x14ba0: 0xe0008c0d, 0x14ba1: 0xe00050f3, 0x14ba2: 0xe00089f1, 0x14ba3: 0xe00095d4, + 0x14ba4: 0xe00050f6, 0x14ba6: 0xe0004fe7, 0x14ba7: 0xe0004abd, + 0x14ba8: 0xe0006129, 0x14baa: 0xe0008a85, 0x14bab: 0xe0006e30, + 0x14bac: 0xe00056ad, 0x14bae: 0xe0004868, 0x14baf: 0xe0009297, + // Block 0x52f, offset 0x14bc0 + 0x14bc8: 0xe0007bab, 0x14bc9: 0xe000746f, 0x14bca: 0xe0005994, 0x14bcb: 0xe0004a08, + 0x14bcd: 0xe000557b, + 0x14bd4: 0xe0007627, 0x14bd7: 0xe0008cda, + 0x14bdb: 0xe0005376, + 0x14bdc: 0xe000a02c, 0x14bdd: 0xe0008056, + 0x14be4: 0xe0006c94, + 0x14beb: 0xe0009763, + 0x14bec: 0xe0009766, 0x14bee: 0xe0008296, + 0x14bf0: 0xe000a618, + 0x14bf5: 0xe0004534, + 0x14bfc: 0xe0009a76, 0x14bfe: 0xe0008e41, + // Block 0x530, offset 0x14c00 + 0x14c0a: 0xe0006480, + 0x14c0c: 0xe000466d, + 0x14c14: 0xe0007f96, 0x14c16: 0xe000717d, 0x14c17: 0xe000885b, + 0x14c1a: 0xe0009856, 0x14c1b: 0xe0006318, + 0x14c1f: 0xe0006d34, + 0x14c21: 0xe000865c, 0x14c23: 0xe000a3c9, + 0x14c24: 0xe000a6b4, 0x14c27: 0xe0004473, + 0x14c2c: 0xe000a48a, 0x14c2d: 0xe0009179, + 0x14c30: 0xe0008572, + // Block 0x531, offset 0x14c40 + 0x14c43: 0xe0008de5, + 0x14c47: 0xe0006f00, + 0x14c48: 0xe00059a8, 0x14c4a: 0xe0007ceb, 0x14c4b: 0xe0005e8b, + 0x14c4c: 0xe0005e23, + 0x14c51: 0xe0008945, + 0x14c56: 0xe0007cee, 0x14c57: 0xe00044aa, + 0x14c58: 0xe00087ee, + 0x14c5c: 0xe00054ae, 0x14c5d: 0xe0005e8f, 0x14c5e: 0xe0007f9a, 0x14c5f: 0xe0006c2c, + 0x14c61: 0xe0004735, 0x14c62: 0xe0009f30, + 0x14c64: 0xe0005c0c, 0x14c66: 0xe00097ec, + 0x14c68: 0xe000937b, + 0x14c76: 0xe0009219, + 0x14c7b: 0xe0005da9, + // Block 0x532, offset 0x14c80 + 0x14c83: 0xe00052cc, + 0x14c84: 0xe000a723, + 0x14c8f: 0xe0008fc5, + 0x14c90: 0xe0005bda, 0x14c93: 0xe00054fd, + 0x14c94: 0xe000758d, + 0x14c98: 0xe0008e45, 0x14c99: 0xe0005750, + 0x14ca5: 0xe0006ec4, + 0x14caa: 0xe0005adc, 0x14cab: 0xe00089f5, + 0x14cb5: 0xe00095b4, 0x14cb6: 0xe000a61c, + 0x14cb8: 0xe0009b30, 0x14cba: 0xe00054b2, + // Block 0x533, offset 0x14cc0 + 0x14cc2: 0xe000a7f6, + 0x14cc4: 0xe0008f01, + 0x14cca: 0xe000a5ac, + 0x14ccc: 0xe0006a9f, + 0x14cd1: 0xe0004338, 0x14cd2: 0xe000433c, + 0x14cd5: 0xe00091f9, + 0x14cdb: 0xe0004b2d, + 0x14cde: 0xe0005833, + 0x14ce0: 0xe0006bd4, 0x14ce2: 0xe0005931, 0x14ce3: 0xe0009f33, + 0x14cea: 0xe0005adf, + 0x14cf0: 0xe000784d, 0x14cf1: 0xe000937f, 0x14cf2: 0xe00078d9, + 0x14cf5: 0xe0004ac1, 0x14cf7: 0xe0006fc0, + 0x14cfc: 0xe000577e, 0x14cfd: 0xe00092df, 0x14cfe: 0xe00057df, 0x14cff: 0xe000929b, + // Block 0x534, offset 0x14d00 + 0x14d37: 0xe00087a6, + // Block 0x535, offset 0x14d40 + 0x14d40: 0xe00061bd, 0x14d43: 0xe0006f7c, + 0x14d48: 0xe000a0a7, 0x14d49: 0xe0009e50, 0x14d4a: 0xe0006c30, 0x14d4b: 0xe0004476, + 0x14d4e: 0xe0004bc2, 0x14d4f: 0xe000832a, + 0x14d51: 0xe000a083, 0x14d52: 0xe000a087, 0x14d53: 0xe0004284, + 0x14d54: 0xe0006280, + 0x14d58: 0xe0004394, + 0x14d5f: 0xe0006a2f, + 0x14d63: 0xe000420c, + 0x14d64: 0xe000a117, 0x14d65: 0xe000653c, + 0x14d68: 0xe0004ecd, 0x14d69: 0xe00062a0, 0x14d6b: 0xe000494a, + 0x14d6c: 0xe000586b, 0x14d6d: 0xe0005904, + 0x14d71: 0xe0007acb, + 0x14d76: 0xe0009427, + 0x14d79: 0xe0007993, 0x14d7b: 0xe0007aef, + 0x14d7c: 0xe00076a7, 0x14d7d: 0xe000a4fd, 0x14d7e: 0xe0007a0b, + // Block 0x536, offset 0x14d80 + 0x14d83: 0xe00045d5, + 0x14d87: 0xe00076e7, + 0x14d88: 0xe0008200, 0x14d8a: 0xe000a634, 0x14d8b: 0xe0004655, + 0x14d8c: 0xe00057e3, 0x14d8d: 0xe00055ae, + 0x14d93: 0xe000448b, + 0x14d94: 0xe000a11b, 0x14d95: 0xe0004e57, 0x14d96: 0xe0009cc6, + 0x14d9a: 0xe0004efa, + 0x14d9c: 0xe0004a91, 0x14d9e: 0xe000a103, + 0x14da0: 0xe0004e8e, 0x14da1: 0xe000953c, 0x14da2: 0xe00065a4, + 0x14da5: 0xe00053ba, + // Block 0x537, offset 0x14dc0 + 0x14ddc: 0xe00067fb, + 0x14de1: 0xe0009540, + 0x14de4: 0xe0009a17, + 0x14de8: 0xe00077dc, 0x14dea: 0xe0009d44, + 0x14dee: 0xe0007e19, 0x14def: 0xe00090dc, + 0x14df2: 0xe0006450, + 0x14dfb: 0xe0008d6a, + 0x14dff: 0xe00075cf, + // Block 0x538, offset 0x14e00 + 0x14e00: 0xe0009acc, 0x14e02: 0xe0009f76, + 0x14e04: 0xe00067fe, + 0x14e0b: 0xe0005c0f, + 0x14e0c: 0xe0005f50, 0x14e0d: 0xe00043f4, + 0x14e10: 0xe000a08b, + 0x14e18: 0xe000a3e1, 0x14e1b: 0xe0009e53, + 0x14e1c: 0xe000a11f, 0x14e1d: 0xe0006f80, 0x14e1e: 0xe00073e2, 0x14e1f: 0xe00094d0, + 0x14e21: 0xe00056e5, 0x14e22: 0xe0008142, 0x14e23: 0xe000917d, + 0x14e24: 0xe0008ca7, + 0x14e2a: 0xe00064c2, + 0x14e2c: 0xe0009895, + 0x14e30: 0xe00083ba, 0x14e32: 0xe000727c, 0x14e33: 0xe0009181, + 0x14e34: 0xe0006a32, 0x14e35: 0xe0005cdc, 0x14e36: 0xe000557e, 0x14e37: 0xe000a0eb, + 0x14e38: 0xe0005c68, + 0x14e3c: 0xe00088e6, 0x14e3d: 0xe00078b1, + // Block 0x539, offset 0x14e40 + 0x14e44: 0xe0008cdd, 0x14e45: 0xe000801d, 0x14e46: 0xe0005ca0, + 0x14e4a: 0xe00054e8, 0x14e4b: 0xe000722b, + 0x14e4d: 0xe000a694, 0x14e4e: 0xe00047db, + 0x14e51: 0xe0005168, + 0x14e54: 0xe00045c9, 0x14e55: 0xe00080ae, 0x14e57: 0xe0007e9b, + 0x14e58: 0xe0007772, 0x14e59: 0xe0004f3f, 0x14e5b: 0xe0008caa, + 0x14e5c: 0xe00087aa, + 0x14e63: 0xe0005d75, + 0x14e64: 0xe0009c98, 0x14e67: 0xe000722e, + 0x14e68: 0xe0007231, 0x14e69: 0xe0007cf1, 0x14e6a: 0xe000a265, + 0x14e70: 0xe00073ba, 0x14e71: 0xe000836e, 0x14e73: 0xe000a866, + 0x14e74: 0xe0005b5a, 0x14e76: 0xe00084bf, 0x14e77: 0xe0005a88, + 0x14e78: 0xe0005a8b, 0x14e79: 0xe0009898, 0x14e7b: 0xe00094d4, + 0x14e7c: 0xe0008fc9, + // Block 0x53a, offset 0x14e80 + 0x14e80: 0xe000869a, 0x14e81: 0xe000767b, + 0x14e84: 0xe00080e2, 0x14e85: 0xe00075d2, 0x14e86: 0xe000921d, 0x14e87: 0xe000486b, + 0x14e89: 0xe00099e7, 0x14e8b: 0xe0008f95, + 0x14e8c: 0xe000861d, 0x14e8d: 0xe0007d7a, 0x14e8e: 0xe00088ad, + 0x14e95: 0xe0008d6d, 0x14e96: 0xe0007234, + 0x14e99: 0xe00075a1, 0x14e9a: 0xe0004ac5, 0x14e9b: 0xe0009859, + 0x14e9c: 0xe0008706, 0x14e9d: 0xe0007d9e, 0x14e9e: 0xe00047ff, + 0x14ea2: 0xe0005d2d, 0x14ea3: 0xe00051c8, + 0x14ea8: 0xe0008020, 0x14ea9: 0xe0008023, 0x14eaa: 0xe0006f3c, + 0x14eaf: 0xe00061c1, + 0x14eb0: 0xe00068a4, 0x14eb2: 0xe00080b2, + 0x14eb6: 0xe0005a38, 0x14eb7: 0xe0005b77, + 0x14eb9: 0xe0006304, 0x14eba: 0xe0006100, 0x14ebb: 0xe00089f9, + // Block 0x53b, offset 0x14ec0 + 0x14ec0: 0xe0007237, + 0x14ec4: 0xe00070e4, 0x14ec5: 0xe0006c98, 0x14ec6: 0xe0008c11, 0x14ec7: 0xe0009185, + 0x14ec8: 0xe0009d8a, 0x14ec9: 0xe0005f45, + 0x14ecc: 0xe0008f40, 0x14ecd: 0xe0004a51, 0x14ece: 0xe0006c9c, 0x14ecf: 0xe0006a35, + 0x14ed1: 0xe0008aed, 0x14ed3: 0xe0007c19, + 0x14ed4: 0xe0008f43, 0x14ed6: 0xe0005dc1, + 0x14ed9: 0xe0007baf, + 0x14edc: 0xe0006d18, 0x14ede: 0xe000a011, + 0x14ee3: 0xe00080ca, + 0x14ee6: 0xe0006aa3, 0x14ee7: 0xe0006174, + 0x14eea: 0xe00083d6, + 0x14ef0: 0xe0006c04, 0x14ef2: 0xe0005ab8, + 0x14ef8: 0xe0009d8d, 0x14ef9: 0xe00065a8, + 0x14efd: 0xe0008cad, + // Block 0x53c, offset 0x14f00 + 0x14f02: 0xe000594c, + 0x14f04: 0xe0007775, 0x14f06: 0xe00096ca, + 0x14f08: 0xe0005a3c, 0x14f09: 0xe00077ae, + 0x14f0c: 0xe00066b8, + 0x14f11: 0xe000967c, + 0x14f16: 0xe0008c15, + 0x14f1a: 0xe0008c6d, 0x14f1b: 0xe0008a89, + 0x14f1c: 0xe0008c19, 0x14f1d: 0xe000958c, 0x14f1e: 0xe00069bd, + 0x14f20: 0xe00048c5, 0x14f21: 0xe0006220, 0x14f22: 0xe0005fc4, + 0x14f26: 0xe0008a8d, + 0x14f28: 0xe0007b43, 0x14f29: 0xe000a285, + 0x14f2d: 0xe0008522, + 0x14f33: 0xe0004fb3, + 0x14f34: 0xe000a574, 0x14f35: 0xe00052ee, 0x14f37: 0xe0008526, + 0x14f3a: 0xe0005eaf, + 0x14f3c: 0xe00053be, + // Block 0x53d, offset 0x14f40 + 0x14f40: 0xe00055b1, 0x14f41: 0xe0009f7f, + 0x14f44: 0xe0009ece, 0x14f45: 0xe0007753, + 0x14f4b: 0xe000a3fd, + 0x14f4d: 0xe000767f, 0x14f4f: 0xe00049b2, + 0x14f58: 0xe0009769, + 0x14f60: 0xe0004d8b, 0x14f63: 0xe00082e7, + 0x14f66: 0xe000989b, + 0x14f68: 0xe00042d8, 0x14f6b: 0xe0004d8f, + 0x14f6c: 0xe0004550, 0x14f6d: 0xe0009dd4, + 0x14f71: 0xe00055b4, + 0x14f74: 0xe0006a38, + 0x14f78: 0xe0009fd1, 0x14f79: 0xe0004a55, + // Block 0x53e, offset 0x14f80 + 0x14f81: 0xe000443c, 0x14f83: 0xe00053c2, + 0x14f86: 0xe0009544, + 0x14f8b: 0xe00081df, + 0x14f8d: 0xe0006918, + 0x14f90: 0xe0004398, 0x14f93: 0xe000a08f, + 0x14f99: 0xe0008203, + 0x14f9c: 0xe0005581, 0x14f9d: 0xe0004d67, 0x14f9e: 0xe0007d46, + 0x14fa0: 0xe0009fd5, 0x14fa1: 0xe0008206, + 0x14fad: 0xe0004d6a, 0x14fae: 0xe0004d6d, + 0x14fb1: 0xe0006f9c, 0x14fb2: 0xe0008ce0, 0x14fb3: 0xe00083be, + 0x14fb5: 0xe00080ce, 0x14fb6: 0xe00070a5, + 0x14fba: 0xe0007bdf, 0x14fbb: 0xe00080b6, + 0x14fbf: 0xe000a222, + // Block 0x53f, offset 0x14fc0 + 0x14fc0: 0xe000a48d, 0x14fc1: 0xe000a325, 0x14fc2: 0xe0008c1d, 0x14fc3: 0xe0004739, + 0x14fc5: 0xe000a177, 0x14fc6: 0xe0007335, + 0x14fc8: 0xe000723a, 0x14fca: 0xe0008082, + 0x14fcc: 0xe0007164, 0x14fcd: 0xe0004efd, 0x14fce: 0xe000516b, 0x14fcf: 0xe000a18b, + 0x14fd0: 0xe0007c1c, 0x14fd1: 0xe0007e1d, 0x14fd2: 0xe0006380, 0x14fd3: 0xe0005611, + 0x14fd6: 0xe00063a4, 0x14fd7: 0xe0009cf7, + 0x14fd8: 0xe0005a40, + 0x14fde: 0xe00076c3, + 0x14fe1: 0xe000a98c, 0x14fe3: 0xe0007539, + 0x14fe6: 0xe000a1e0, + 0x14feb: 0xe000684f, + 0x14fed: 0xe00056d0, 0x14fee: 0xe000a709, + 0x14ff0: 0xe000a361, + 0x14ff7: 0xe000770b, + 0x14ff8: 0xe000473d, 0x14ff9: 0xe0009c95, 0x14ffb: 0xe0006a7b, + 0x14fff: 0xe000865f, + // Block 0x540, offset 0x15000 + 0x15002: 0xe0005b98, + 0x15006: 0xe0004a0b, 0x15007: 0xe0009952, + 0x15008: 0xe000477d, 0x1500b: 0xe0007472, + 0x1500c: 0xe0008cb0, 0x1500d: 0xe00077cc, 0x1500e: 0xe000762b, + 0x15012: 0xe0007da2, 0x15013: 0xe0008a91, + 0x15014: 0xe0007683, + 0x15018: 0xe0008146, 0x15019: 0xe0006d38, 0x1501a: 0xe00089fd, + 0x1501e: 0xe0005c4e, + 0x15025: 0xe000a490, 0x15026: 0xe000976c, 0x15027: 0xe000486e, + 0x1502b: 0xe0008a01, + 0x1502f: 0xe000a2e5, + 0x15030: 0xe0006aa7, 0x15031: 0xe0005ae2, 0x15033: 0xe0006fc4, + 0x15034: 0xe0004ac9, + // Block 0x541, offset 0x15040 + 0x15068: 0xe0009f54, + 0x1506d: 0xe0008b1d, 0x1506f: 0xe0006c80, + 0x15071: 0xe0009c1b, 0x15072: 0xe00059d4, + 0x15076: 0xe0004d70, + 0x1507a: 0xe00078dd, + 0x1507c: 0xe000727f, 0x1507f: 0xe0006574, + // Block 0x542, offset 0x15080 + 0x15082: 0xe0005bdd, + 0x15084: 0xe0009f0f, 0x15087: 0xe0009f0c, + 0x15089: 0xe0005be0, 0x1508b: 0xe0007555, + 0x1509b: 0xe00069c0, + 0x1509c: 0xe0006518, 0x1509f: 0xe00074a9, + 0x150a1: 0xe0007130, 0x150a2: 0xe00050f9, + 0x150a6: 0xe0008a95, 0x150a7: 0xe0007134, + 0x150aa: 0xe00085ae, 0x150ab: 0xe000790c, + 0x150ad: 0xe0009a2e, 0x150ae: 0xe00083c2, 0x150af: 0xe0006384, + 0x150b1: 0xe0007138, + 0x150b4: 0xe000849b, + 0x150bb: 0xe00095d8, + 0x150bc: 0xe0006b7e, 0x150bd: 0xe0009ead, 0x150be: 0xe00074ad, + // Block 0x543, offset 0x150c0 + 0x150c3: 0xe0004c08, + 0x150c9: 0xe000a226, 0x150ca: 0xe00078b5, + 0x150cc: 0xe000849e, + 0x150d0: 0xe00092e3, 0x150d2: 0xe00052b7, 0x150d3: 0xe00075d5, + 0x150d4: 0xe0009ed1, 0x150d5: 0xe0008fcd, + 0x150d8: 0xe00079d5, 0x150da: 0xe000a76f, + 0x150de: 0xe0008a05, + 0x150e0: 0xe0006654, + 0x150e6: 0xe00087f2, 0x150e7: 0xe0008209, + 0x150e8: 0xe0004a95, 0x150ea: 0xe00051d8, + 0x150ec: 0xe000a4c3, 0x150ee: 0xe00095dc, + 0x150f0: 0xe0008a99, 0x150f1: 0xe000a7b7, 0x150f3: 0xe00054b6, + 0x150f9: 0xe00054ba, + 0x150fc: 0xe000a979, 0x150fd: 0xe0004e91, + // Block 0x544, offset 0x15100 + 0x15102: 0xe0007d4a, + 0x15105: 0xe0005e6b, + 0x15108: 0xe0007282, 0x15109: 0xe0004f8b, 0x1510b: 0xe0004e6a, + 0x1510c: 0xe00092e7, 0x1510d: 0xe0006ec8, + 0x15110: 0xe0008456, 0x15111: 0xe00050fc, 0x15112: 0xe0007eef, + 0x15114: 0xe0007d7e, 0x15115: 0xe00055b7, 0x15117: 0xe000a22a, + 0x1511c: 0xe0007b1f, 0x1511e: 0xe0009383, + // Block 0x545, offset 0x15140 + 0x15156: 0xe000723d, 0x15157: 0xe0004f00, + 0x15158: 0xe0004ba2, 0x15159: 0xe000a22e, + 0x1515d: 0xe0009fad, + 0x15163: 0xe000770f, + 0x15165: 0xe00066fd, + 0x15168: 0xe000a3cd, + 0x1516c: 0xe0005dec, 0x1516d: 0xe00078fa, 0x1516e: 0xe0009f58, + 0x15170: 0xe0008961, 0x15171: 0xe0009acf, 0x15173: 0xe00099ea, + 0x15174: 0xe0007339, + 0x15179: 0xe0008576, + // Block 0x546, offset 0x15180 + 0x15181: 0xe0006308, + 0x15184: 0xe0009c2d, + 0x15188: 0xe0004d73, 0x15189: 0xe000478d, + 0x1518f: 0xe0004509, + 0x15190: 0xe0008f04, 0x15191: 0xe0005280, 0x15192: 0xe0004cdd, + 0x15195: 0xe00041b4, + 0x15198: 0xe0009c30, 0x15199: 0xe0006801, 0x1519b: 0xe0006bb4, + 0x1519c: 0xe0009fd9, 0x1519d: 0xe0009ad2, 0x1519e: 0xe0009af0, 0x1519f: 0xe0006b81, + 0x151a2: 0xe00065f4, + 0x151a8: 0xe0007355, 0x151aa: 0xe000753d, + 0x151ad: 0xe000a1bf, 0x151ae: 0xe000631c, + 0x151b1: 0xe000579f, + 0x151b8: 0xe0009a92, 0x151bb: 0xe000a0ab, + 0x151bd: 0xe000a315, 0x151bf: 0xe0008f99, + // Block 0x547, offset 0x151c0 + 0x151c1: 0xe0006abf, 0x151c2: 0xe0007014, 0x151c3: 0xe00077b1, + 0x151c4: 0xe0005b22, 0x151c5: 0xe000989e, + 0x151c8: 0xe0006658, 0x151cb: 0xe000587e, + 0x151cd: 0xe0004a32, 0x151ce: 0xe00050ff, 0x151cf: 0xe0005102, + 0x151d1: 0xe0006a3b, + 0x151d6: 0xe0006186, + 0x151d8: 0xe00097f0, 0x151d9: 0xe0009dd8, 0x151db: 0xe0006a3e, + 0x151eb: 0xe0004538, + 0x151ed: 0xe0009005, + 0x151f0: 0xe0005730, + 0x151f5: 0xe000817a, 0x151f6: 0xe000985c, 0x151f7: 0xe00070a8, + 0x151f8: 0xe0006f04, + 0x151fe: 0xe0005781, + // Block 0x548, offset 0x15200 + 0x15200: 0xe0005f54, 0x15201: 0xe0007cf4, 0x15202: 0xe0009387, 0x15203: 0xe0009f12, + 0x15204: 0xe00097f4, 0x15205: 0xe0004ce0, + 0x1520a: 0xe000a586, + 0x1520c: 0xe00072c9, 0x1520d: 0xe000a757, 0x1520e: 0xe0005dad, 0x1520f: 0xe00086de, + 0x15212: 0xe0009b90, + 0x15215: 0xe0004c0b, 0x15217: 0xe000a269, + 0x15218: 0xe0005784, 0x1521a: 0xe0004741, 0x1521b: 0xe00079fb, + 0x1521f: 0xe0009979, + 0x15222: 0xe0005907, + 0x15224: 0xe00078e1, 0x15225: 0xe0005105, + 0x15229: 0xe000a5ec, 0x1522a: 0xe000590a, + // Block 0x549, offset 0x15240 + 0x15268: 0xe0004962, 0x1526a: 0xe000820c, + 0x15270: 0xe0009cb3, + 0x15278: 0xe000a1c2, 0x15279: 0xe0004c41, + 0x1527c: 0xe00045d9, 0x1527f: 0xe00065f8, + // Block 0x54a, offset 0x15280 + 0x15280: 0xe0006a41, + 0x15286: 0xe0006320, + 0x1528f: 0xe0005c24, + 0x15291: 0xe00097a4, 0x15293: 0xe0007240, + 0x15294: 0xe00096ac, 0x15296: 0xe0004acd, 0x15297: 0xe0005ae5, + 0x15298: 0xe0004871, + 0x1529f: 0xe0009f36, + 0x152a1: 0xe000494e, 0x152a3: 0xe0006484, + 0x152a5: 0xe0007af3, 0x152a6: 0xe00060a5, + 0x152ab: 0xe000976f, + 0x152ad: 0xe0008662, 0x152ae: 0xe00063cc, + 0x152b0: 0xe00096cd, 0x152b2: 0xe0009f82, + 0x152b4: 0xe000691c, + 0x152b9: 0xe000a869, 0x152ba: 0xe0004af5, 0x152bb: 0xe0004802, + 0x152bd: 0xe0008e89, + // Block 0x54b, offset 0x152c0 + 0x152c2: 0xe0006aab, + 0x152c5: 0xe0006944, 0x152c6: 0xe0007170, + 0x152ca: 0xe0007359, 0x152cb: 0xe0008a9d, + 0x152cd: 0xe000a4c6, + 0x152d0: 0xe000516e, 0x152d2: 0xe00091a9, + 0x152d6: 0xe0006c70, + 0x152d8: 0xe0005e93, 0x152d9: 0xe00073ea, 0x152da: 0xe0007243, + 0x152df: 0xe000a620, + 0x152e2: 0xe0006aaf, 0x152e3: 0xe0005a00, + 0x152e7: 0xe0005bbc, + 0x152e8: 0xe000a549, 0x152e9: 0xe000a295, 0x152ea: 0xe0009caa, + 0x152ee: 0xe0004d76, 0x152ef: 0xe000942b, + 0x152f1: 0xe00080d6, 0x152f2: 0xe00045dd, + 0x152fa: 0xe0006d3c, + 0x152fc: 0xe0004ea0, + // Block 0x54c, offset 0x15300 + 0x15301: 0xe0004b8a, 0x15302: 0xe000a4e9, 0x15303: 0xe00063d0, + 0x15304: 0xe00064f0, 0x15305: 0xe0005f2a, + 0x15308: 0xe00070e7, 0x1530b: 0xe00098a1, + 0x1530d: 0xe0005eff, 0x1530e: 0xe00058d9, 0x1530f: 0xe00081e2, + 0x15311: 0xe0005d57, + 0x15314: 0xe0005def, + 0x15318: 0xe0007b23, 0x1531a: 0xe00078fd, + 0x15326: 0xe0006bb7, + 0x1532f: 0xe0005abb, + 0x15334: 0xe0006488, + // Block 0x54d, offset 0x15340 + 0x15340: 0xe0009af3, 0x15343: 0xe0009e34, + 0x1534e: 0xe0008af1, + 0x15351: 0xe0009eb0, 0x15352: 0xe0006852, 0x15353: 0xe0008665, + 0x15357: 0xe00056b1, + 0x1535f: 0xe0007687, + 0x15367: 0xe0008ce3, + 0x15368: 0xe00090df, 0x1536a: 0xe00082ea, 0x1536b: 0xe0004c0e, + 0x1536d: 0xe000a1e3, 0x1536e: 0xe0006ecc, + 0x15379: 0xe00070ea, + // Block 0x54e, offset 0x15380 + 0x15381: 0xe0004791, + 0x15386: 0xe0009ed4, + 0x15389: 0xe0005d30, 0x1538a: 0xe0006bba, + 0x15394: 0xe0009a1a, 0x15396: 0xe0009680, + 0x1539b: 0xe0008dd0, + 0x153a2: 0xe0007c4f, + 0x153a4: 0xe0004922, + 0x153a8: 0xe0004745, + 0x153b7: 0xe0008ce6, + // Block 0x54f, offset 0x153c0 + 0x153c8: 0xe0008b45, 0x153ca: 0xe00059ac, + 0x153cc: 0xe00098a4, 0x153cd: 0xe000985f, + 0x153d0: 0xe000762f, 0x153d2: 0xe0006701, 0x153d3: 0xe0006d49, + 0x153d5: 0xe000a014, + 0x153e4: 0xe0006bbd, 0x153e5: 0xe000a5f0, + 0x153ed: 0xe0005171, 0x153ee: 0xe0007d4e, 0x153ef: 0xe0007851, + 0x153f1: 0xe00059b0, 0x153f2: 0xe0007ca9, + 0x153f5: 0xe00062a4, + 0x153f9: 0xe0004631, 0x153fa: 0xe00070ed, 0x153fb: 0xe0005e6f, + 0x153fe: 0xe0009f39, + // Block 0x550, offset 0x15400 + 0x15407: 0xe00043f8, + 0x15409: 0xe0006608, + 0x1540f: 0xe0007591, + 0x15412: 0xe0008fd1, 0x15413: 0xe0006f08, + 0x15417: 0xe0005d79, + 0x15420: 0xe000a70c, 0x15423: 0xe0008aa1, + 0x15427: 0xe0005a8e, + 0x15438: 0xe0005ae8, 0x1543b: 0xe0006f0c, + // Block 0x551, offset 0x15440 + 0x15465: 0xe0008d70, 0x15466: 0xe00083aa, 0x15467: 0xe0006804, + 0x15469: 0xe0004ce3, + 0x15473: 0xe000676d, + 0x15474: 0xe0006028, 0x15476: 0xe0007a7f, + // Block 0x552, offset 0x15480 + 0x15483: 0xe00045e1, + 0x15486: 0xe0009205, 0x15487: 0xe00066bb, + 0x15488: 0xe0007697, 0x15489: 0xe00075d8, + 0x1548c: 0xe0006785, + 0x15492: 0xe0005a74, + 0x15495: 0xe0009af6, + 0x15498: 0xe00065fc, 0x15499: 0xe0009a1d, 0x1549b: 0xe000814a, + 0x1549f: 0xe0009a20, + 0x154a3: 0xe00048c8, + 0x154a6: 0xe000773f, + 0x154a8: 0xe0007723, + 0x154b0: 0xe0004af9, + 0x154b6: 0xe00076c7, + 0x154bb: 0xe000a535, + // Block 0x553, offset 0x154c0 + 0x154c1: 0xe0004c44, 0x154c2: 0xe000a86c, + 0x154c4: 0xe0009a23, + 0x154d1: 0xe000460d, 0x154d3: 0xe00063e4, + 0x154d4: 0xe0008fd5, + 0x154dd: 0xe00075db, 0x154de: 0xe00075fc, + 0x154e0: 0xe00048e6, 0x154e1: 0xe0006177, + 0x154e9: 0xe0006725, + 0x154ec: 0xe0006938, 0x154ef: 0xe0009fdd, + 0x154f0: 0xe0008dd3, 0x154f2: 0xe000869e, + 0x154f7: 0xe000817e, + 0x154fb: 0xe00098a7, + 0x154fe: 0xe0004952, + // Block 0x554, offset 0x15500 + 0x15504: 0xe0009690, + 0x15509: 0xe000735d, + 0x15516: 0xe00098aa, + 0x1551a: 0xe000765b, + 0x15521: 0xe00042f0, + 0x15524: 0xe0004956, + 0x15529: 0xe00060c0, + 0x1552c: 0xe000942f, 0x1552f: 0xe00077e8, + 0x15534: 0xe000a03f, 0x15535: 0xe00098ad, + 0x15538: 0xe0007855, 0x15539: 0xe0005c5d, 0x1553b: 0xe0004972, + 0x1553f: 0xe0008668, + // Block 0x555, offset 0x15540 + 0x15541: 0xe00084e2, 0x15542: 0xe0007f1f, + 0x15544: 0xe00047de, 0x15547: 0xe0004d79, + 0x15553: 0xe000866b, + 0x15556: 0xe0007c52, 0x15557: 0xe0004ce6, + 0x15559: 0xe00090e2, + 0x15566: 0xe0009772, + 0x15569: 0xe0006614, 0x1556a: 0xe00077fc, 0x1556b: 0xe00072cd, + 0x15570: 0xe0007abb, 0x15571: 0xe00048cb, 0x15572: 0xe000997c, 0x15573: 0xe000a0af, + 0x15578: 0xe000a877, 0x15579: 0xe00083fe, 0x1557a: 0xe0005abe, + 0x1557d: 0xe000a057, 0x1557f: 0xe00065bc, + // Block 0x556, offset 0x15580 + 0x15587: 0xe0008aa5, + 0x1558f: 0xe0006104, + 0x15595: 0xe0005aeb, + 0x1559a: 0xe00077ec, 0x1559b: 0xe0004ad1, + 0x1559c: 0xe0004d7c, 0x1559e: 0xe00057c7, + // Block 0x557, offset 0x155c0 + 0x155f5: 0xe0005ac1, 0x155f7: 0xe0005a78, + 0x155f9: 0xe000a0ef, 0x155fb: 0xe000437c, + 0x155fd: 0xe0007af7, 0x155ff: 0xe0005b02, + // Block 0x558, offset 0x15600 + 0x15600: 0xe0008059, 0x15602: 0xe0004e94, + 0x15604: 0xe00098b0, + 0x1560b: 0xe000624d, + 0x1560c: 0xe000805c, 0x1560f: 0xe0004f1f, + 0x15611: 0xe0007c55, 0x15612: 0xe0005108, 0x15613: 0xe0005b06, + 0x15617: 0xe000590d, + 0x1561d: 0xe0006b84, 0x1561e: 0xe00087f6, 0x1561f: 0xe0005d7d, + 0x15624: 0xe00098b3, 0x15625: 0xe0005f58, + 0x15629: 0xe0006855, 0x1562a: 0xe0005fdc, + 0x1562f: 0xe0004da3, + 0x15634: 0xe0004d93, 0x15635: 0xe0005fc8, + 0x1563b: 0xe0005df2, + 0x1563d: 0xe0005e01, 0x1563e: 0xe000a848, 0x1563f: 0xe0005e04, + // Block 0x559, offset 0x15640 + 0x15643: 0xe000a698, + 0x15645: 0xe0004ffb, + 0x1564c: 0xe000a72f, 0x1564d: 0xe0006dd4, 0x1564e: 0xe0005910, 0x1564f: 0xe0008b21, + 0x15650: 0xe0005d5a, 0x15651: 0xe000a89b, + 0x15654: 0xe0004588, 0x15656: 0xe0005174, + 0x15658: 0xe000618d, 0x1565a: 0xe000468d, 0x1565b: 0xe00054eb, + 0x1565c: 0xe000990e, 0x1565d: 0xe00082ed, 0x1565e: 0xe0008af5, + 0x15660: 0xe000a990, + 0x15665: 0xe0004795, + 0x15668: 0xe0005476, + 0x1566e: 0xe0005432, 0x1566f: 0xe0007713, + 0x15672: 0xe000938b, + 0x15674: 0xe0006223, 0x15675: 0xe0005436, 0x15676: 0xe0007b27, 0x15677: 0xe00055e9, + 0x1567a: 0xe00068ec, 0x1567b: 0xe0006920, + 0x1567c: 0xe00066be, 0x1567d: 0xe00062a8, 0x1567f: 0xe0008182, + // Block 0x55a, offset 0x15680 + 0x15680: 0xe00098f6, 0x15682: 0xe0008dd6, + 0x15684: 0xe0008f46, 0x15687: 0xe0007cac, + 0x15688: 0xe000660c, 0x15689: 0xe0009af9, 0x1568a: 0xe00065c0, + 0x1568e: 0xe0008c21, + 0x15690: 0xe000522f, 0x15693: 0xe0004874, + 0x15697: 0xe00055ba, + 0x15699: 0xe0006a44, + 0x156a0: 0xe0006dd7, 0x156a2: 0xe00068f0, + 0x156ab: 0xe0006e4c, + 0x156ac: 0xe00082f0, 0x156af: 0xe0007cf7, + 0x156b4: 0xe0007953, + 0x156b8: 0xe0004691, 0x156b9: 0xe0007957, 0x156bb: 0xe00069c3, + 0x156be: 0xe000a0b3, + // Block 0x55b, offset 0x156c0 + 0x156ca: 0xe0008cb3, 0x156cb: 0xe0008827, + 0x156ce: 0xe000882a, + 0x156d2: 0xe00099ed, + 0x156d4: 0xe0009a46, 0x156d5: 0xe000a8e7, 0x156d7: 0xe00083a2, + 0x156df: 0xe00088b0, + 0x156e0: 0xe0009775, 0x156e1: 0xe0005a44, + 0x156e6: 0xe00042b0, 0x156e7: 0xe0006f40, + 0x156e9: 0xe0004c47, 0x156ea: 0xe000929f, 0x156eb: 0xe000495a, + 0x156ec: 0xe0007900, + 0x156f2: 0xe000805f, + 0x156f6: 0xe000765f, 0x156f7: 0xe0007633, + // Block 0x55c, offset 0x15700 + 0x1570d: 0xe0005be3, 0x1570e: 0xe0005b5e, + 0x15710: 0xe0006454, 0x15712: 0xe0005be7, + 0x15714: 0xe00049e2, 0x15715: 0xe0004340, + 0x1571c: 0xe0004ce9, 0x1571d: 0xe0009880, + 0x15720: 0xe0007859, 0x15722: 0xe000a589, + 0x15725: 0xe00082f3, + // Block 0x55d, offset 0x15740 + 0x15740: 0xe00050ed, 0x15741: 0xe00046dd, 0x15742: 0xe0009269, 0x15743: 0xe00041a8, + 0x15744: 0xe000a628, 0x15745: 0xe00049e6, 0x15746: 0xe0004c65, 0x15747: 0xe0004ce9, + 0x15748: 0xe0004ce9, 0x15749: 0xe00047a2, 0x1574a: 0xe0005193, 0x1574b: 0xe0005754, + 0x1574c: 0xe000521a, 0x1574d: 0xe0005757, 0x1574e: 0xe000575a, 0x1574f: 0xe000575d, + 0x15750: 0xe0005760, 0x15751: 0xe0005763, 0x15752: 0xe0005766, 0x15753: 0xe0005769, + 0x15754: 0xe000761b, 0x15755: 0xe0005787, 0x15756: 0xe000578b, 0x15757: 0xe000578f, + 0x15758: 0xe0005797, 0x15759: 0xe000579b, 0x1575a: 0xe000579f, 0x1575b: 0xe00057ab, + 0x1575c: 0xe00057af, 0x1575d: 0xe00057b3, 0x1575e: 0xe00057bf, 0x1575f: 0xe00057c3, + 0x15760: 0xe00057c7, 0x15761: 0xe00057f7, 0x15762: 0xe0005807, 0x15763: 0xe0005813, + 0x15764: 0xe0005817, 0x15765: 0xe0005827, 0x15766: 0xe000582b, 0x15767: 0xe000582f, + 0x15768: 0xe0005837, 0x15769: 0xe000583b, 0x1576a: 0xe000583f, 0x1576b: 0xe0005843, + 0x1576c: 0x43219c20, 0x1576d: 0xe000586f, 0x1576e: 0xe0005881, 0x1576f: 0xe0005a91, + 0x15770: 0xe0005a97, 0x15771: 0xe0005a9a, 0x15772: 0xe0005aa3, 0x15773: 0xe0005aa6, + 0x15774: 0xe0005aa9, 0x15775: 0xe0005aac, 0x15776: 0xe0005aaf, 0x15777: 0xe0005ab2, + 0x15778: 0xe0005ab8, 0x15779: 0xe0005abb, 0x1577a: 0xe0005abe, 0x1577b: 0xe0005aee, + 0x1577c: 0xe0005af2, 0x1577d: 0xe0005af6, 0x1577e: 0xe0005afa, 0x1577f: 0xe0005afe, + // Block 0x55e, offset 0x15780 + 0x15780: 0xe0005b02, 0x15781: 0xe0005b26, 0x15782: 0xe0005b2a, 0x15783: 0xe0005b2e, + 0x15784: 0xe0005b3e, 0x15785: 0xe0005b42, 0x15786: 0xe0005b68, 0x15787: 0xe0005b6b, + 0x15788: 0xe0005b6e, 0x15789: 0xe0005b77, 0x1578a: 0xe0005beb, 0x1578b: 0xe0005bf1, + 0x1578c: 0xe0005bf4, 0x1578d: 0xe0005bf7, 0x1578e: 0xe0005bfa, 0x1578f: 0xe0005c00, + 0x15790: 0xe0005c03, 0x15791: 0xe0005c0f, 0x15792: 0xe0005cac, 0x15793: 0xe0005cb0, + 0x15794: 0xe0005cb8, 0x15795: 0xe0005cc8, 0x15796: 0xe0005cd0, 0x15797: 0xe0005cd4, + 0x15798: 0xe0005cd8, 0x15799: 0xe0005cdc, 0x1579a: 0xe00055e1, 0x1579b: 0xe00051a4, + 0x1579c: 0xe000761b, 0x1579d: 0xe00051bc, 0x1579e: 0xe000532a, 0x1579f: 0xe0005259, + 0x157a0: 0xe000527a, 0x157a1: 0xe000713c, 0x157a2: 0xe000847a, 0x157a3: 0xe0006858, + 0x157a4: 0xe0006368, 0x157a5: 0xe0009db4, 0x157a6: 0xe00066d5, 0x157a7: 0xe0006789, + 0x157a8: 0xe0009f95, 0x157a9: 0xe00071c2, 0x157aa: 0xe0006d54, 0x157ab: 0xe000932b, + 0x157ac: 0xe0006d40, 0x157ad: 0xe0006ff4, 0x157ae: 0xe0007b33, 0x157af: 0xe0006f38, + 0x157b0: 0xe0006c40, 0x157b1: 0xe0009171, 0x157b2: 0xe0009a62, 0x157b3: 0xe00073a2, + 0x157b4: 0xe0007829, 0x157b5: 0xe0005885, 0x157b6: 0xe0005889, 0x157b7: 0xe0005891, + 0x157b8: 0xe0005899, 0x157b9: 0xe000589d, 0x157ba: 0xe00058a1, 0x157bb: 0xe00058b1, + 0x157bc: 0xe00058b5, 0x157bd: 0xe00058b9, 0x157be: 0xe00058c1, 0x157bf: 0xe00058e3, + // Block 0x55f, offset 0x157c0 + 0x157c0: 0xe00058e6, 0x157c1: 0xe0005232, 0x157c2: 0xe00058e9, 0x157c3: 0xe00058f2, + 0x157c4: 0xe00058f8, 0x157c5: 0xe00058fb, 0x157c6: 0xe0005904, 0x157c7: 0xe000590a, + 0x157c8: 0xe000590d, 0x157c9: 0xe0005910, 0x157ca: 0xe0005934, 0x157cb: 0xe0005938, + 0x157cc: 0xe000593c, 0x157cd: 0xe0005948, 0x157ce: 0xe0005239, 0x157cf: 0xe0005968, + 0x157d0: 0xe000596c, 0x157d1: 0xe000523d, 0x157d2: 0xe0005974, 0x157d3: 0xe0005978, + 0x157d4: 0xe000597c, 0x157d5: 0xe0005241, 0x157d6: 0xe0005980, 0x157d7: 0xe0005984, + 0x157d8: 0xe000598c, 0x157d9: 0xe0005988, 0x157da: 0xe0005990, 0x157db: 0xe0005994, + 0x157dc: 0xe00059b8, 0x157dd: 0xe00059bc, 0x157de: 0xe00084f6, 0x157df: 0xe00059c4, + 0x157e0: 0xe00059c8, 0x157e1: 0xe0006f38, 0x157e2: 0xe00059d8, 0x157e3: 0xe0005249, + 0x157e4: 0xe0005255, 0x157e5: 0xe00059e0, 0x157e6: 0xe00059e8, 0x157e7: 0xe00059f8, + 0x157e8: 0xe0005a04, 0x157e9: 0xe0005a0c, 0x157ea: 0xe0005259, 0x157eb: 0xe0005a14, + 0x157ec: 0xe0005a18, 0x157ed: 0xe0005a1c, 0x157ee: 0xe000a3b1, 0x157ef: 0xe0005a24, + 0x157f0: 0xe0005a2c, 0x157f1: 0xe0005a34, 0x157f2: 0xe0005a38, 0x157f3: 0xe0005a3c, + 0x157f4: 0xe0005a40, 0x157f5: 0xe0005a7c, 0x157f6: 0xe0005a82, 0x157f7: 0xe0005a85, + 0x157f8: 0xe0005a8b, 0x157f9: 0xe000760f, 0x157fa: 0xe0005b9b, 0x157fb: 0xe0005b9e, + 0x157fc: 0xe0005ba1, 0x157fd: 0xe00052ba, 0x157fe: 0xe0005ba7, 0x157ff: 0xe000761b, + // Block 0x560, offset 0x15800 + 0x15800: 0xe0005baa, 0x15801: 0xe0005bad, 0x15802: 0xe0005bb6, 0x15803: 0xe0005bb9, + 0x15804: 0xe0005be3, 0x15805: 0xe000a7de, 0x15806: 0xe0007e19, 0x15807: 0xe0005c27, + 0x15808: 0xe00052e5, 0x15809: 0xe0005c2d, 0x1580a: 0xe0005c33, 0x1580b: 0xe0005c36, + 0x1580c: 0xe0005c3c, 0x1580d: 0xe0005c42, 0x1580e: 0xe0005c48, 0x1580f: 0xe00052e8, + 0x15810: 0xe0005c4e, 0x15811: 0xe0005c60, 0x15812: 0xe0005c64, 0x15813: 0xe0005c68, + 0x15814: 0xe0005c74, 0x15815: 0xe0005c78, 0x15816: 0xe0005c7c, 0x15817: 0xe0005c84, + 0x15818: 0xe0005c8c, 0x15819: 0xe0005c90, 0x1581a: 0xe0005c94, 0x1581b: 0xe000713c, + 0x1581c: 0xe0005ca0, 0x1581d: 0xe0005ceb, 0x1581e: 0xe0005cf1, 0x1581f: 0xe0005cf7, + 0x15820: 0xe00079e7, 0x15821: 0xe0005cfd, 0x15822: 0xe0005d00, 0x15823: 0xe00052fc, + 0x15824: 0xe0005d0c, 0x15825: 0xe0005d12, 0x15826: 0xe0005d18, 0x15827: 0xe0005d21, + 0x15828: 0xe0005d24, 0x15829: 0xe0005d27, 0x1582a: 0xe0005d2d, 0x1582b: 0xe0005311, + 0x1582c: 0xe0005315, 0x1582d: 0xe0005d5d, 0x1582e: 0xe0005d65, 0x1582f: 0xe0005d69, + 0x15830: 0xe0005d6d, 0x15831: 0xe0005d75, 0x15832: 0xe0005d79, 0x15833: 0xe0005d7d, + 0x15834: 0xe0005db1, 0x15835: 0xe0005db5, 0x15836: 0xe0005dbd, 0x15837: 0xe0005dcd, + 0x15838: 0xe0005dd1, 0x15839: 0xe0005dd5, 0x1583a: 0xe0006cf0, 0x1583b: 0xe00085f3, + 0x1583c: 0xe00074a1, 0x1583d: 0xe0007595, 0x1583e: 0xe0005324, 0x1583f: 0xe00085d5, + // Block 0x561, offset 0x15840 + 0x15840: 0xe0008aa9, 0x15841: 0xe000552a, 0x15842: 0xe00094b4, 0x15843: 0xe000546e, + 0x15844: 0xe0005500, 0x15845: 0xe0005655, 0x15846: 0xe0009edb, 0x15847: 0xe00066f9, + 0x15848: 0xe000a206, 0x15849: 0xe00043f4, 0x1584a: 0xe0004601, 0x1584b: 0xe0004a35, + 0x1584c: 0xe0007d52, 0x1584d: 0x42ab8020, 0x1584e: 0x43f41c20, 0x1584f: 0x43f41e20, + 0x15850: 0xe00097c0, 0x15851: 0x43f42220, 0x15852: 0xe0009668, 0x15853: 0x43f42620, + 0x15854: 0x43f42820, 0x15855: 0xe000a922, 0x15856: 0xe0008886, 0x15857: 0xe00084c6, + 0x15858: 0x42f27820, 0x15859: 0xe00074e9, 0x1585a: 0xe0006cf8, 0x1585b: 0xe00066dd, + 0x1585c: 0xe0008c15, 0x1585d: 0xe0008be1, 0x1585e: 0xe0008005, 0x1585f: 0x43f43e20, + 0x15860: 0x430c2420, 0x15861: 0x43f44220, 0x15862: 0xe0008c9e, 0x15863: 0x43f44620, + 0x15864: 0x43f44820, 0x15865: 0xe000856e, 0x15866: 0xe0005578, 0x15867: 0x43f44e20, + 0x15868: 0x43f45020, 0x15869: 0x43f45220, 0x1586a: 0xe0006384, 0x1586b: 0xe0006b7e, + 0x1586c: 0xe0004a95, 0x1586d: 0xe000a03f, 0x1586e: 0xe0005853, 0x1586f: 0xe0005a88, + 0x15870: 0xe0006033, 0x15871: 0xe00073c6, 0x15872: 0xe0005fa0, 0x15873: 0xe0005fa8, + 0x15874: 0xe0004f5b, 0x15875: 0xe0006954, 0x15876: 0xe00042b8, 0x15877: 0xe0009b5c, + 0x15878: 0xe000505a, 0x15879: 0xe0006660, 0x1587a: 0xe0006189, 0x1587b: 0xe00099a4, + 0x1587c: 0x42b8dc20, 0x1587d: 0xe000a6c7, 0x1587e: 0xe0004455, 0x1587f: 0xe0009021, + // Block 0x562, offset 0x15880 + 0x15880: 0xe000922d, 0x15881: 0xe0006260, 0x15882: 0x42cbc420, 0x15883: 0xe0006d9e, + 0x15884: 0xe0005f15, 0x15885: 0xe000a1aa, 0x15886: 0xe0008880, 0x15887: 0xe000a06f, + 0x15888: 0xe00085f6, 0x15889: 0x42e45620, 0x1588a: 0xe0009b24, 0x1588b: 0xe000698d, + 0x1588c: 0xe0006b42, 0x1588d: 0xe0009091, 0x1588e: 0xe00050cc, 0x1588f: 0xe0007ff9, + 0x15890: 0xe0008d31, 0x15891: 0xe00098be, 0x15892: 0xe000a55f, 0x15893: 0xe0008bd5, + 0x15894: 0xe00048de, 0x15895: 0xe0005625, 0x15896: 0xe0008ac1, 0x15897: 0xe0005980, + 0x15898: 0xe0009151, 0x15899: 0xe000650c, 0x1589a: 0xe0006dbc, 0x1589b: 0xe0008608, + 0x1589c: 0xe0009970, 0x1589d: 0x4304f220, 0x1589e: 0x4304f220, 0x1589f: 0xe0008898, + 0x158a0: 0xe00042d0, 0x158a1: 0xe0007430, 0x158a2: 0xe000769f, 0x158a3: 0xe0004f83, + 0x158a4: 0xe0006a77, 0x158a5: 0xe0009045, 0x158a6: 0x431f6c20, 0x158a7: 0xe000856e, + 0x158a8: 0xe00051c8, 0x158a9: 0xe000a222, 0x158aa: 0xe0006a7b, 0x158ab: 0x42c0ea20, + 0x158ac: 0x4885dc20, 0x158ad: 0x43043020, + 0x158b0: 0xe000665c, 0x158b1: 0x42a36a20, 0x158b2: 0xe0008971, 0x158b3: 0x429f0020, + 0x158b4: 0xe0009916, 0x158b5: 0xe0005054, 0x158b6: 0xe0007f4e, 0x158b7: 0xe0008672, + 0x158b8: 0xe00042b8, 0x158b9: 0x42aaaa20, 0x158ba: 0xe000a821, 0x158bb: 0xe0007d56, + 0x158bc: 0xe00097c0, 0x158bd: 0xe0006868, 0x158be: 0xe0007973, 0x158bf: 0xe000686c, + // Block 0x563, offset 0x158c0 + 0x158c0: 0xe000695a, 0x158c1: 0xe0008623, 0x158c2: 0x42bda420, 0x158c3: 0x42bdb220, + 0x158c4: 0xe000943f, 0x158c5: 0xe0007f04, 0x158c6: 0xe0005eeb, 0x158c7: 0x42c29c20, + 0x158c8: 0xe0008236, 0x158c9: 0xe0009021, 0x158ca: 0xe0007cca, 0x158cb: 0xe000922d, + 0x158cc: 0xe00054d6, 0x158cd: 0xe000823c, 0x158ce: 0xe00071bc, 0x158cf: 0x42c8a420, + 0x158d0: 0xe0007c85, 0x158d1: 0xe0009668, 0x158d2: 0xe000583b, 0x158d3: 0xe0005ecb, + 0x158d4: 0xe0008752, 0x158d5: 0x42d6f220, 0x158d6: 0xe0006c40, 0x158d7: 0xe0005c33, + 0x158d8: 0x42ddb620, 0x158d9: 0xe00085f0, 0x158da: 0xe000a06f, 0x158db: 0xe0008bb9, + 0x158dc: 0xe00085f6, 0x158dd: 0x42ef4e20, 0x158de: 0xe000868a, 0x158df: 0xe0006560, + 0x158e0: 0xe0008886, 0x158e1: 0xe0008a3d, 0x158e2: 0x42ea0c20, 0x158e3: 0x42ea7620, + 0x158e4: 0x42ec3a20, 0x158e5: 0xe0007d16, 0x158e6: 0xe00084c6, 0x158e7: 0xe0006ff0, + 0x158e8: 0xe00090e5, 0x158e9: 0x42ee9420, 0x158ea: 0xe000928f, 0x158eb: 0x42f19820, + 0x158ec: 0x42f56220, 0x158ed: 0xe0008ac1, 0x158ee: 0x42f8f620, 0x158ef: 0xe0008daf, + 0x158f0: 0xe0005980, 0x158f1: 0xe0006668, 0x158f2: 0xe0008608, 0x158f3: 0xe000a688, + 0x158f4: 0xe000a568, 0x158f5: 0x430ef220, 0x158f6: 0xe00043e8, 0x158f7: 0xe00066f1, + 0x158f8: 0xe0007430, 0x158f9: 0xe0008d58, 0x158fa: 0xe0008c9e, 0x158fb: 0xe0009678, + 0x158fc: 0xe000769f, 0x158fd: 0xe00051bc, 0x158fe: 0xe000827e, 0x158ff: 0xe0004f83, + // Block 0x564, offset 0x15900 + 0x15900: 0xe00065cc, 0x15901: 0xe0009045, 0x15902: 0xe0007219, 0x15903: 0xe00090b5, + 0x15904: 0x43233220, 0x15905: 0x4324ec20, 0x15906: 0xe00088e6, 0x15907: 0xe00051c8, + 0x15908: 0xe0008c15, 0x15909: 0x432fb620, 0x1590a: 0xe000a222, 0x1590b: 0x43301620, + 0x1590c: 0xe0006a7b, 0x1590d: 0xe00091a9, 0x1590e: 0xe0004ce9, 0x1590f: 0x48509420, + 0x15910: 0x48508820, 0x15911: 0x4867aa20, 0x15912: 0x44773a20, 0x15913: 0x44803020, + 0x15914: 0x44807220, 0x15915: 0x48a49220, 0x15916: 0x48b9a020, 0x15917: 0x48fda620, + 0x15918: 0x433e8620, 0x15919: 0xe0005b5e, + // Block 0x565, offset 0x15940 + 0x15940: 0xe0003d0b, 0x15941: 0xe0003cf3, 0x15942: 0xe0003cf7, 0x15943: 0xe0003cff, + 0x15944: 0xe0003d0f, 0x15945: 0xe0003d03, 0x15946: 0xf0000404, 0x15947: 0xe0003cfb, + 0x15948: 0xe0003d07, + 0x15950: 0x02bf2e86, 0x15951: 0x02a7de86, + // Block 0x566, offset 0x15980 + 0x15980: 0x429c7a20, 0x15981: 0xe000a5b0, 0x15982: 0x429c8220, 0x15983: 0x48024420, + 0x15984: 0x429ec020, 0x15985: 0xe0006033, 0x15986: 0xe0009b9c, 0x15987: 0xe000661c, + 0x15988: 0x42a0f420, 0x15989: 0xe000694b, 0x1598a: 0xe00073c6, 0x1598b: 0xe0006ca8, + 0x1598c: 0x44693c20, 0x1598d: 0x480c7420, 0x1598e: 0xe0005fa0, 0x1598f: 0x42a2a820, + 0x15990: 0x42a2c820, 0x15991: 0xe0004c59, 0x15992: 0x480a3820, 0x15993: 0x44697220, + 0x15994: 0xe0005217, 0x15995: 0xe00087fa, 0x15996: 0x480a9620, 0x15997: 0xe0007f4a, + 0x15998: 0xe000814e, 0x15999: 0x429d9820, 0x1599a: 0xe0005635, 0x1599b: 0x42a36a20, + 0x1599c: 0x4923be20, 0x1599d: 0x42a3ea20, 0x1599e: 0xe00084ee, 0x1599f: 0x4469be20, + 0x159a0: 0xe00041e4, 0x159a1: 0x42a48c20, 0x159a2: 0xe000a0b7, 0x159a3: 0xe0006c08, + 0x159a4: 0x446a2a20, 0x159a5: 0xe0007f4e, 0x159a6: 0xe0005fa8, 0x159a7: 0xe0004f5b, + 0x159a8: 0xe0008672, 0x159a9: 0xe0009e65, 0x159aa: 0x42a60c20, 0x159ab: 0xe0006858, + 0x159ac: 0xe000a81e, 0x159ad: 0xe0006954, 0x159ae: 0xe00062c4, 0x159af: 0xe0008ff9, + 0x159b0: 0xe0008ff5, 0x159b1: 0xe00046b1, 0x159b2: 0xe00046b1, 0x159b3: 0xe00046b1, + 0x159b4: 0x48145820, 0x159b5: 0xe000a6dc, 0x159b6: 0xe0005003, 0x159b7: 0xe0007246, + 0x159b8: 0x4816c620, 0x159b9: 0xe0004ea3, 0x159ba: 0xe00091b1, 0x159bb: 0x42a80c20, + 0x159bc: 0x42a93c20, 0x159bd: 0xe000a8fb, 0x159be: 0xe0008b5d, 0x159bf: 0xe0008ea4, + // Block 0x567, offset 0x159c0 + 0x159c0: 0xe000763f, 0x159c1: 0x42a9ec20, 0x159c2: 0xe000544e, 0x159c3: 0xe000479c, + 0x159c4: 0xe000a0cf, 0x159c5: 0xe0006e5c, 0x159c6: 0xe0006e5c, 0x159c7: 0xe000a821, + 0x159c8: 0xe0005197, 0x159c9: 0x42ab6620, 0x159ca: 0x42ab8420, 0x159cb: 0xe0005515, + 0x159cc: 0xe0009b5c, 0x159cd: 0x42ae2e20, 0x159ce: 0x42aca220, 0x159cf: 0xe0006864, + 0x159d0: 0xe0008aa9, 0x159d1: 0x42b1dc20, 0x159d2: 0xe0006fc8, 0x159d3: 0xe0007475, + 0x159d4: 0x42b01a20, 0x159d5: 0xe000a38d, 0x159d6: 0x42b06420, 0x159d7: 0xe0006682, + 0x159d8: 0x42b15820, 0x159d9: 0x4829c820, 0x159da: 0x42b1e420, 0x159db: 0x42b1ee20, + 0x159dc: 0xe0006775, 0x159dd: 0xe0005321, 0x159de: 0xe00060d4, 0x159df: 0xe0006b00, + 0x159e0: 0x482d5020, 0x159e1: 0x482dd420, 0x159e2: 0xe000a92e, 0x159e3: 0xe0007c79, + 0x159e4: 0xe0009c21, 0x159e5: 0x42b3b020, 0x159e6: 0xe00067a7, 0x159e7: 0x446ddc20, + 0x159e8: 0x446df820, 0x159e9: 0xe0007efe, 0x159ea: 0xe00057cb, 0x159eb: 0xe00057cb, + 0x159ec: 0x48339020, 0x159ed: 0xe0008106, 0x159ee: 0xe00099f6, 0x159ef: 0xe0005259, + 0x159f0: 0x42b7e620, 0x159f1: 0x48363020, 0x159f2: 0x42b7fe20, 0x159f3: 0x42b80c20, + 0x159f4: 0x42bea620, 0x159f5: 0x42b84420, 0x159f6: 0x446f0220, 0x159f7: 0xe0005521, + 0x159f8: 0x42b8dc20, 0x159f9: 0xe00071aa, 0x159fa: 0x42b91a20, 0x159fb: 0x483bc820, + 0x159fc: 0x42ba8620, 0x159fd: 0x483bcc20, 0x159fe: 0x42badc20, 0x159ff: 0x42bad620, + // Block 0x568, offset 0x15a00 + 0x15a00: 0x42baf820, 0x15a01: 0xe00072d1, 0x15a02: 0xe000704e, 0x15a03: 0x44705e20, + 0x15a04: 0xe0007120, 0x15a05: 0xe0007030, 0x15a06: 0xe000603f, 0x15a07: 0x42bcd220, + 0x15a08: 0x4470c420, 0x15a09: 0x48430620, 0x15a0a: 0x4470f820, 0x15a0b: 0x42bd6020, + 0x15a0c: 0xe00069db, 0x15a0d: 0xe0006d8c, 0x15a0e: 0xe0005837, 0x15a0f: 0x49472420, + 0x15a10: 0x42bdfc20, 0x15a11: 0x48466220, 0x15a12: 0x48466220, 0x15a13: 0xe00079d8, + 0x15a14: 0xe000558a, 0x15a15: 0xe000558a, 0x15a16: 0x44718e20, 0x15a17: 0x48657020, + 0x15a18: 0x48c3b420, 0x15a19: 0xe000a391, 0x15a1a: 0xe0008cfb, 0x15a1b: 0x4471c620, + 0x15a1c: 0x42bf3420, 0x15a1d: 0xe000850a, 0x15a1e: 0xe0009064, 0x15a1f: 0x42bff220, + 0x15a20: 0xe0007a93, 0x15a21: 0x44727420, 0x15a22: 0x44723820, 0x15a23: 0xe000a6c7, + 0x15a24: 0x484da820, 0x15a25: 0xe00055f1, 0x15a26: 0xe00085ed, 0x15a27: 0xe000a654, + 0x15a28: 0x42c29c20, 0x15a29: 0xe000a654, 0x15a2a: 0xe0005c1b, 0x15a2b: 0xe0009021, + 0x15a2c: 0xe000a245, 0x15a2d: 0xe0006878, 0x15a2e: 0xe0009363, 0x15a2f: 0xe00060e4, + 0x15a30: 0xe000922d, 0x15a31: 0xe0005757, 0x15a32: 0xe0006fdc, 0x15a33: 0x42c43620, + 0x15a34: 0x42c4ba20, 0x15a35: 0xe0009e80, 0x15a36: 0xe00063ac, 0x15a37: 0xe0007a27, + 0x15a38: 0x48561820, 0x15a39: 0xe0005e3f, 0x15a3a: 0x42c5f820, 0x15a3b: 0xe0006b1b, + 0x15a3c: 0xe0007054, 0x15a3d: 0x42c7c820, 0x15a3e: 0x4857e220, 0x15a3f: 0xe000910d, + // Block 0x569, offset 0x15a40 + 0x15a40: 0x42c78a20, 0x15a41: 0xe0007977, 0x15a42: 0x44745c20, 0x15a43: 0xe0005ddd, + 0x15a44: 0x42c8fc20, 0x15a45: 0xe000a84b, 0x15a46: 0x42c8ee20, 0x15a47: 0x4474d820, + 0x15a48: 0xe0006260, 0x15a49: 0xe00046d1, 0x15a4a: 0x48601420, 0x15a4b: 0xe0005087, + 0x15a4c: 0xe0006da4, 0x15a4d: 0xe0009111, 0x15a4e: 0x44763220, 0x15a4f: 0xe0006d9e, + 0x15a50: 0x44761020, 0x15a51: 0x4475c820, 0x15a52: 0xe0006036, 0x15a53: 0xe0005fa4, + 0x15a54: 0xe0009802, 0x15a55: 0x42cd3820, 0x15a56: 0xe00052e1, 0x15a57: 0x4487b220, + 0x15a58: 0xe000583b, 0x15a59: 0xe0005ecb, 0x15a5a: 0x42ce4220, 0x15a5b: 0xe0005090, + 0x15a5c: 0xe0009ef7, 0x15a5d: 0x48678620, 0x15a5e: 0x44769220, 0x15a5f: 0x42cff420, + 0x15a60: 0x42cf0a20, 0x15a61: 0x42d0a420, 0x15a62: 0xe0005f15, 0x15a63: 0x4868da20, + 0x15a64: 0x42d11c20, 0x15a65: 0x42d03e20, 0x15a66: 0x42d22820, 0x15a67: 0x44773a20, + 0x15a68: 0xe0006b96, 0x15a69: 0x42d34620, 0x15a6a: 0xe000445b, 0x15a6b: 0x42d55020, + 0x15a6c: 0x486d4620, 0x15a6d: 0xe0009001, 0x15a6e: 0x44783020, 0x15a6f: 0xe000925a, + 0x15a70: 0x48714e20, 0x15a71: 0xe000a242, 0x15a72: 0x44789c20, 0x15a73: 0xe000701e, + 0x15a74: 0x42d73e20, 0x15a75: 0xe0006c40, 0x15a76: 0x42d77620, 0x15a77: 0x48751a20, + 0x15a78: 0x483a1620, 0x15a79: 0x4875f420, 0x15a7a: 0xe0006558, 0x15a7b: 0x48797820, + 0x15a7c: 0xe0007a37, 0x15a7d: 0x42d99a20, 0x15a7e: 0x42d8ce20, 0x15a7f: 0x42da2c20, + // Block 0x56a, offset 0x15a80 + 0x15a80: 0xe0009ce2, 0x15a81: 0xe000a1aa, 0x15a82: 0xe0005c33, 0x15a83: 0xe000a43f, + 0x15a84: 0xe0009a66, 0x15a85: 0xe0007ac3, 0x15a86: 0x487a3c20, 0x15a87: 0x42da6820, + 0x15a88: 0xe000a167, 0x15a89: 0xe000850e, 0x15a8a: 0x447a6620, 0x15a8b: 0xe00085f0, + 0x15a8c: 0x42dd8e20, 0x15a8d: 0x487da220, 0x15a8e: 0xe000797b, 0x15a8f: 0xe0008d1f, + 0x15a90: 0x487ebc20, 0x15a91: 0x487f1c20, 0x15a92: 0xe00068c8, 0x15a93: 0x42e07220, + 0x15a94: 0xe0008bb9, 0x15a95: 0xe0007b77, 0x15a96: 0x447b2c20, 0x15a97: 0x42e09420, + 0x15a98: 0xe0008818, 0x15a99: 0x42e0ee20, 0x15a9a: 0xe0009b74, 0x15a9b: 0x480a4a20, + 0x15a9c: 0x42e28a20, 0x15a9d: 0x4884c620, 0x15a9e: 0x42e33820, 0x15a9f: 0x48875620, + 0x15aa0: 0xe0009303, 0x15aa1: 0xe000868a, 0x15aa2: 0x42e4a020, 0x15aa3: 0x488c1020, + 0x15aa4: 0xe0006dad, 0x15aa5: 0x42e52a20, 0x15aa6: 0x488e6a20, 0x15aa7: 0x48902820, + 0x15aa8: 0xe00053a6, 0x15aa9: 0xe0007e55, 0x15aaa: 0x447d5820, 0x15aab: 0x42e74a20, + 0x15aac: 0x447d7020, 0x15aad: 0x447d7020, 0x15aae: 0x42e88e20, 0x15aaf: 0xe0008263, + 0x15ab0: 0xe0008a3d, 0x15ab1: 0x42e90a20, 0x15ab2: 0xe00046f9, 0x15ab3: 0x447e3620, + 0x15ab4: 0x42ea4820, 0x15ab5: 0x48986c20, 0x15ab6: 0x42ea7c20, 0x15ab7: 0x48992420, + 0x15ab8: 0xe000847a, 0x15ab9: 0x48433e20, 0x15aba: 0xe00082b7, 0x15abb: 0x489f4220, + 0x15abc: 0x489f7020, 0x15abd: 0x48a08820, 0x15abe: 0x447ff820, 0x15abf: 0x44801020, + // Block 0x56b, offset 0x15ac0 + 0x15ac0: 0xe00090e5, 0x15ac1: 0x48a1e620, 0x15ac2: 0x48a1e420, 0x15ac3: 0x48a23220, + 0x15ac4: 0x48a26620, 0x15ac5: 0xe0009145, 0x15ac6: 0x42ee3e20, 0x15ac7: 0x42ee3e20, + 0x15ac8: 0x42ee9420, 0x15ac9: 0x44807220, 0x15aca: 0xe0009149, 0x15acb: 0x44808c20, + 0x15acc: 0x44812c20, 0x15acd: 0x48a83a20, 0x15ace: 0x42f09c20, 0x15acf: 0xe0005aee, + 0x15ad0: 0x42f19820, 0x15ad1: 0x4481c620, 0x15ad2: 0x48ac4c20, 0x15ad3: 0xe0008d31, + 0x15ad4: 0x48ad3420, 0x15ad5: 0x48ad8a20, 0x15ad6: 0xe00066dd, 0x15ad7: 0xe0009912, + 0x15ad8: 0x44825e20, 0x15ad9: 0xe00048de, 0x15ada: 0x42f49420, 0x15adb: 0x42f49e20, + 0x15adc: 0x48b2f820, 0x15add: 0x48b54e20, 0x15ade: 0x48b54e20, 0x15adf: 0x42f5dc20, + 0x15ae0: 0x44840420, 0x15ae1: 0x48b75620, 0x15ae2: 0xe00089d5, 0x15ae3: 0xe00098ca, + 0x15ae4: 0x44844e20, 0x15ae5: 0x48b90020, 0x15ae6: 0x42f9a420, 0x15ae7: 0x44854020, + 0x15ae8: 0x42f9d020, 0x15ae9: 0x42f9c620, 0x15aea: 0xe00050d5, 0x15aeb: 0x48bf0c20, + 0x15aec: 0xe0006664, 0x15aed: 0x44860220, 0x15aee: 0xe00099d5, 0x15aef: 0x42fc0420, + 0x15af0: 0xe00070cf, 0x15af1: 0x44866820, 0x15af2: 0x48c45020, 0x15af3: 0x48c48e20, + 0x15af4: 0x4486b220, 0x15af5: 0x48c5b220, 0x15af6: 0x42fef420, 0x15af7: 0x48c67c20, + 0x15af8: 0x42ff2a20, 0x15af9: 0xe00048b0, 0x15afa: 0xe0008608, 0x15afb: 0x48c9b420, + 0x15afc: 0x48ca4620, 0x15afd: 0x4300c020, 0x15afe: 0x48cb5020, 0x15aff: 0xe00097d8, + // Block 0x56c, offset 0x15b00 + 0x15b00: 0x4866be20, 0x15b01: 0x4487aa20, 0x15b02: 0xe0008302, 0x15b03: 0x43020620, + 0x15b04: 0x44881620, 0x15b05: 0xe00069a2, 0x15b06: 0xe00085ce, 0x15b07: 0x48cf4e20, + 0x15b08: 0x48cf6a20, 0x15b09: 0x48672620, 0x15b0a: 0x48673820, 0x15b0b: 0xe00079d8, + 0x15b0c: 0x43040820, 0x15b0d: 0x431f3c20, 0x15b0e: 0x4488d620, 0x15b0f: 0x43052220, + 0x15b10: 0xe0008008, 0x15b11: 0xe00090a3, 0x15b12: 0x42a56620, 0x15b13: 0xe000a565, + 0x15b14: 0xe0006438, 0x15b15: 0xe00075c0, 0x15b16: 0xe0004850, 0x15b17: 0x48d67820, + 0x15b18: 0xe0007829, 0x15b19: 0xe000945a, 0x15b1a: 0x4306c620, 0x15b1b: 0x43075a20, + 0x15b1c: 0xe0007cd9, 0x15b1d: 0xe0005edf, 0x15b1e: 0x4307ce20, 0x15b1f: 0xe0008898, + 0x15b20: 0x4306a620, 0x15b21: 0xe0004d87, 0x15b22: 0xe0004f13, 0x15b23: 0xe000944b, + 0x15b24: 0x48d86c20, 0x15b25: 0x48dad620, 0x15b26: 0x48d9aa20, 0x15b27: 0x448a5620, + 0x15b28: 0xe0009e30, 0x15b29: 0x4309e620, 0x15b2a: 0x430a2c20, 0x15b2b: 0x48e79420, + 0x15b2c: 0xe00082d2, 0x15b2d: 0x48de5820, 0x15b2e: 0x448aba20, 0x15b2f: 0x448ac220, + 0x15b30: 0x48df6220, 0x15b31: 0x48e1a420, 0x15b32: 0x448ad620, 0x15b33: 0xe000a037, + 0x15b34: 0xe0005aaf, 0x15b35: 0xe000a85d, 0x15b36: 0x430cd220, 0x15b37: 0xe00099e1, + 0x15b38: 0x430d1020, 0x15b39: 0x430e1c20, 0x15b3a: 0x430dc420, 0x15b3b: 0x430ef220, + 0x15b3c: 0xe0008b39, 0x15b3d: 0x430ed620, 0x15b3e: 0x430f0c20, 0x15b3f: 0x448bae20, + // Block 0x56d, offset 0x15b40 + 0x15b40: 0x430fc220, 0x15b41: 0x43100220, 0x15b42: 0x448bf220, 0x15b43: 0x4310c020, + 0x15b44: 0xe000842f, 0x15b45: 0x48ecce20, 0x15b46: 0x4311ae20, 0x15b47: 0x4311bc20, + 0x15b48: 0x448c6a20, 0x15b49: 0x4311f420, 0x15b4a: 0x44697620, 0x15b4b: 0x48f15c20, + 0x15b4c: 0x48f2cc20, 0x15b4d: 0x448d7c20, 0x15b4e: 0x448d8e20, 0x15b4f: 0xe0007008, + 0x15b50: 0xe000827e, 0x15b51: 0xe00065cc, 0x15b52: 0xe000743c, 0x15b53: 0x48f95020, + 0x15b54: 0xe0004a8d, 0x15b55: 0xe00068a0, 0x15b56: 0xe00049d6, 0x15b57: 0xe00050f0, + 0x15b58: 0x48fe5e20, 0x15b59: 0x48100820, 0x15b5a: 0xe00063c0, 0x15b5b: 0x431b7820, + 0x15b5c: 0x431be020, 0x15b5d: 0x4811bc20, 0x15b5e: 0x431da820, 0x15b5f: 0xe0007219, + 0x15b60: 0x490ba420, 0x15b61: 0x490bda20, 0x15b62: 0x43212820, 0x15b63: 0x4321e220, + 0x15b64: 0x43222220, 0x15b65: 0x490e5c20, 0x15b66: 0x43223620, 0x15b67: 0xe00063e0, + 0x15b68: 0xe000a311, 0x15b69: 0x4325b020, 0x15b6a: 0xe0006678, 0x15b6b: 0x4327f220, + 0x15b6c: 0x43282a20, 0x15b6d: 0x4917f420, 0x15b6e: 0xe0004476, 0x15b6f: 0x44932a20, + 0x15b70: 0x432b6e20, 0x15b71: 0x491aee20, 0x15b72: 0x4493cc20, 0x15b73: 0x432d8620, + 0x15b74: 0x42bb6420, 0x15b75: 0xe00080ca, 0x15b76: 0x49228a20, 0x15b77: 0x49243420, + 0x15b78: 0x4494dc20, 0x15b79: 0x4494ec20, 0x15b7a: 0xe0009fd5, 0x15b7b: 0x49281420, + 0x15b7c: 0x44956420, 0x15b7d: 0x49292c20, 0x15b7e: 0x43301620, 0x15b7f: 0x43301620, + // Block 0x56e, offset 0x15b80 + 0x15b80: 0x43305220, 0x15b81: 0x492b6c20, 0x15b82: 0xe00050f9, 0x15b83: 0x44966620, + 0x15b84: 0x43325220, 0x15b85: 0x43334e20, 0x15b86: 0x43338420, 0x15b87: 0x4333fc20, + 0x15b88: 0x44979c20, 0x15b89: 0x49366020, 0x15b8a: 0xe00091a9, 0x15b8b: 0x43388020, + 0x15b8c: 0x4339fa20, 0x15b8d: 0x44999c20, 0x15b8e: 0x4499da20, 0x15b8f: 0x433ace20, + 0x15b90: 0x49419c20, 0x15b91: 0x4499f020, 0x15b92: 0x49420a20, 0x15b93: 0x49441c20, + 0x15b94: 0x49452220, 0x15b95: 0xe0005df2, 0x15b96: 0x449aac20, 0x15b97: 0x433df220, + 0x15b98: 0x433dfc20, 0x15b99: 0x433e0a20, 0x15b9a: 0x433e1e20, 0x15b9b: 0x433e2c20, + 0x15b9c: 0xe00069c3, 0x15b9d: 0x494c0020, + // Block 0x56f, offset 0x15bc0 + 0x15bc0: 0xa000f202, 0x15bc1: 0x403fba21, 0x15bc2: 0x403fba20, 0x15bc3: 0x403fbc20, + 0x15bc4: 0x403fbc20, 0x15bc5: 0x403fbe20, 0x15bc6: 0x403fc020, 0x15bc7: 0x403fcc20, + 0x15bc8: 0x403fce20, 0x15bc9: 0x403fd020, 0x15bca: 0x403fd220, 0x15bcb: 0x403fd420, + 0x15bcc: 0x403fd820, 0x15bcd: 0x403fdc20, 0x15bce: 0x403fde20, 0x15bcf: 0x403fe020, + 0x15bd0: 0x403fe220, 0x15bd1: 0x403fe420, 0x15bd2: 0x403fe620, 0x15bd3: 0x403fe820, + 0x15bd4: 0x403fea20, 0x15bd5: 0xcaac3be1, 0x15bd6: 0x403fee20, 0x15bd7: 0x403ff020, + 0x15bd8: 0x403ff420, 0x15bd9: 0x403ff620, 0x15bda: 0x403ff820, 0x15bdb: 0x403ffa20, + 0x15bdc: 0x403ffc20, 0x15bdd: 0x40400220, 0x15bde: 0x40400420, 0x15bdf: 0x40400620, + 0x15be0: 0x40400820, 0x15be1: 0x40400a20, 0x15be2: 0x40400e20, 0x15be3: 0x40401020, + 0x15be4: 0x40401220, 0x15be5: 0x40401420, 0x15be6: 0x40401620, 0x15be7: 0x40401820, + 0x15be8: 0x40401a20, 0x15be9: 0xe0001830, 0x15bea: 0x40401c20, 0x15beb: 0x40401e20, + 0x15bec: 0x40402020, 0x15bed: 0x40402420, 0x15bee: 0x40402620, 0x15bef: 0x40402820, + 0x15bf0: 0x40402c20, 0x15bf1: 0xe0001839, 0x15bf2: 0x40402e20, 0x15bf3: 0x40403c20, + 0x15bf4: 0xe000a994, 0x15bf5: 0x40403220, 0x15bf6: 0x40403420, 0x15bf7: 0x40403620, + 0x15bf8: 0x40403820, 0x15bf9: 0x40403a20, 0x15bfa: 0x40404c20, 0x15bfb: 0x40404e20, + 0x15bfc: 0xa070f102, 0x15bfd: 0x40403c20, 0x15bfe: 0x40404a20, 0x15bff: 0x40405620, + // Block 0x570, offset 0x15c00 + 0x15c00: 0xa0000000, 0x15c01: 0xa0000000, 0x15c02: 0xa0000000, 0x15c03: 0xa0000000, + 0x15c04: 0xa0000000, 0x15c05: 0xa0000000, 0x15c06: 0xa0000000, 0x15c07: 0xa0000000, + 0x15c08: 0xa0000000, 0x15c09: 0x40020020, 0x15c0a: 0x40020220, 0x15c0b: 0x40020420, + 0x15c0c: 0x40020620, 0x15c0d: 0x40020820, 0x15c0e: 0xa0000000, 0x15c0f: 0xa0000000, + 0x15c10: 0xa0000000, 0x15c11: 0xa0000000, 0x15c12: 0xa0000000, 0x15c13: 0xa0000000, + 0x15c14: 0xa0000000, 0x15c15: 0xa0000000, 0x15c16: 0xa0000000, 0x15c17: 0xa0000000, + 0x15c18: 0xa0000000, 0x15c19: 0xa0000000, 0x15c1a: 0xa0000000, 0x15c1b: 0xa0000000, + 0x15c1c: 0xa0000000, 0x15c1d: 0xa0000000, 0x15c1e: 0xa0000000, 0x15c1f: 0xa0000000, + 0x15c20: 0x40021220, 0x15c21: 0x4002ba20, 0x15c22: 0x4003e020, 0x15c23: 0x4004ea20, + 0x15c24: 0x4027de20, 0x15c25: 0x4004ec20, 0x15c26: 0x4004e620, 0x15c27: 0x4003d220, + 0x15c28: 0x4003f420, 0x15c29: 0x4003f620, 0x15c2a: 0x4004d820, 0x15c2b: 0x40093820, + 0x15c2c: 0x40024020, 0x15c2d: 0x40021a20, 0x15c2e: 0x4002e420, 0x15c2f: 0x4004e220, + 0x15c30: 0x4029cc20, 0x15c31: 0x4029ce20, 0x15c32: 0x4029d020, 0x15c33: 0x4029d220, + 0x15c34: 0x4029d420, 0x15c35: 0x4029d620, 0x15c36: 0x4029d820, 0x15c37: 0x4029da20, + 0x15c38: 0x4029dc20, 0x15c39: 0x4029de20, 0x15c3a: 0x40026c20, 0x15c3b: 0x40026220, + 0x15c3c: 0x40094020, 0x15c3d: 0x40094220, 0x15c3e: 0x40094420, 0x15c3f: 0x4002c420, + // Block 0x571, offset 0x15c40 + 0x15c40: 0x4004d620, 0x15c41: 0x002bde88, 0x15c42: 0x002c0a88, 0x15c43: 0x002c3a88, + 0x15c44: 0x002c6288, 0x15c45: 0x002c9888, 0x15c46: 0x002d0888, 0x15c47: 0xcab12692, + 0x15c48: 0x002d6888, 0x15c49: 0x002d9a88, 0x15c4a: 0x002dcc88, 0x15c4b: 0xcab726c2, + 0x15c4c: 0xc0030002, 0x15c4d: 0xcac33c48, 0x15c4e: 0xcadf3daa, 0x15c4f: 0x002ee288, + 0x15c50: 0x002f2c88, 0x15c51: 0x002f5688, 0x15c52: 0x002f7a88, 0x15c53: 0xcaf409c2, + 0x15c54: 0xcafa2722, 0x15c55: 0x00306c88, 0x15c56: 0x0030be88, 0x15c57: 0x0030e288, + 0x15c58: 0x0030f688, 0x15c59: 0x00310088, 0x15c5a: 0x00312a88, 0x15c5b: 0x4003f820, + 0x15c5c: 0x4004e420, 0x15c5d: 0x4003fa20, 0x15c5e: 0x40062420, 0x15c5f: 0x40021620, + 0x15c60: 0x40061e20, 0x15c61: 0x402bde20, 0x15c62: 0x402c0a20, 0x15c63: 0x402c3a20, + 0x15c64: 0x402c6220, 0x15c65: 0x402c9820, 0x15c66: 0x402d0820, 0x15c67: 0xcaae2692, + 0x15c68: 0x402d6820, 0x15c69: 0x402d9a20, 0x15c6a: 0x402dcc20, 0x15c6b: 0xcab426c2, + 0x15c6c: 0xc0000002, 0x15c6d: 0xcaba3c48, 0x15c6e: 0xcacc3cca, 0x15c6f: 0x402ee220, + 0x15c70: 0x402f2c20, 0x15c71: 0x402f5620, 0x15c72: 0x402f7a20, 0x15c73: 0xcaf109c2, + 0x15c74: 0xcaf72722, 0x15c75: 0x40306c20, 0x15c76: 0x4030be20, 0x15c77: 0x4030e220, + 0x15c78: 0x4030f620, 0x15c79: 0x40310020, 0x15c7a: 0x40312a20, 0x15c7b: 0x4003fc20, + 0x15c7c: 0x40094820, 0x15c7d: 0x4003fe20, 0x15c7e: 0x40094c20, 0x15c7f: 0xa0000000, + // Block 0x572, offset 0x15c80 + 0x15c80: 0x402c1a20, 0x15c81: 0x002c2a88, 0x15c82: 0x002c3288, 0x15c83: 0x402c3220, + 0x15c84: 0x0031c488, 0x15c85: 0x4031c420, 0x15c86: 0x002ee2a3, 0x15c87: 0x002c4e88, + 0x15c88: 0x402c4e20, 0x15c89: 0x002c7288, 0x15c8a: 0x002c7a88, 0x15c8b: 0x002c8488, + 0x15c8c: 0x402c8420, 0x15c8d: 0xe000115c, 0x15c8e: 0x002cae88, 0x15c8f: 0x002cb888, + 0x15c90: 0x002c9a83, 0x15c91: 0x002d1688, 0x15c92: 0x402d1620, 0x15c93: 0x002d4488, + 0x15c94: 0x002d5888, 0x15c95: 0x402d7820, 0x15c96: 0x002dc288, 0x15c97: 0x002db688, + 0x15c98: 0x002e0a88, 0x15c99: 0x402e0a20, 0x15c9a: 0x402e3820, 0x15c9b: 0x402e7220, + 0x15c9c: 0x0030a088, 0x15c9d: 0x002eb488, 0x15c9e: 0x402ebc20, 0x15c9f: 0x002f1088, + 0x15ca0: 0xe0000e56, 0x15ca1: 0xe0000e53, 0x15ca2: 0x002d6088, 0x15ca3: 0x402d6020, + 0x15ca4: 0x002f3e88, 0x15ca5: 0x402f3e20, 0x15ca6: 0x002f8288, 0x15ca7: 0x0031b488, + 0x15ca8: 0x4031b420, 0x15ca9: 0x00300888, 0x15caa: 0x40301220, 0x15cab: 0x40304220, + 0x15cac: 0x00304a88, 0x15cad: 0x40304a20, 0x15cae: 0x00305288, 0x15caf: 0xe000105f, + 0x15cb0: 0xe000105c, 0x15cb1: 0x0030b488, 0x15cb2: 0x0030cc88, 0x15cb3: 0x00311888, + 0x15cb4: 0x40311820, 0x15cb5: 0x00313488, 0x15cb6: 0x40313420, 0x15cb7: 0x00316488, + 0x15cb8: 0x00316e88, 0x15cb9: 0x40316e20, 0x15cba: 0x40317820, 0x15cbb: 0x4031a620, + 0x15cbc: 0x0031bc88, 0x15cbd: 0x4031bc20, 0x15cbe: 0xe0000fc9, 0x15cbf: 0x40319420, + // Block 0x573, offset 0x15cc0 + 0x15cc0: 0x40315820, 0x15cc1: 0x0031d488, 0x15cc2: 0x4031d420, 0x15cc3: 0x002c1a88, + 0x15cc4: 0x00307c88, 0x15cc5: 0x0030da88, 0x15cc6: 0x002ca288, 0x15cc7: 0x402ca220, + 0x15cc8: 0x002dde88, 0x15cc9: 0x402dde20, 0x15cca: 0x002f6a88, 0x15ccb: 0x402f6a20, + 0x15ccc: 0x002f8e88, 0x15ccd: 0x402f8e20, 0x15cce: 0x00311088, 0x15ccf: 0x40311020, + 0x15cd0: 0x402bf020, 0x15cd1: 0x402bf820, 0x15cd2: 0x402c0220, 0x15cd3: 0x402c2a20, + 0x15cd4: 0x402ee221, 0x15cd5: 0x402c5620, 0x15cd6: 0x402c7220, 0x15cd7: 0x402c7a20, + 0x15cd8: 0x402ccc20, 0x15cd9: 0x402cb820, 0x15cda: 0x402cd420, 0x15cdb: 0x402c9a20, + 0x15cdc: 0x402cdc20, 0x15cdd: 0x402ce820, 0x15cde: 0x402cf020, 0x15cdf: 0x402dee20, + 0x15ce0: 0x402d4420, 0x15ce1: 0x402d2a20, 0x15ce2: 0x402d3220, 0x15ce3: 0x402d5820, + 0x15ce4: 0x402d0020, 0x15ce5: 0x40308820, 0x15ce6: 0x402d8020, 0x15ce7: 0x402d8e20, + 0x15ce8: 0x402db620, 0x15ce9: 0x402dc220, 0x15cea: 0x402daa20, 0x15ceb: 0x402e4220, + 0x15cec: 0x402e4a20, 0x15ced: 0x402e5420, 0x15cee: 0x402e6820, 0x15cef: 0x4030a020, + 0x15cf0: 0x4030ac20, 0x15cf1: 0x402e9020, 0x15cf2: 0x402eb420, 0x15cf3: 0x402ec820, + 0x15cf4: 0x402ea620, 0x15cf5: 0x402f1020, 0x15cf6: 0x402eee20, 0x15cf7: 0x402f1a20, + 0x15cf8: 0x402f4c20, 0x15cf9: 0x402f9820, 0x15cfa: 0x402fa220, 0x15cfb: 0x402fac20, + 0x15cfc: 0x402fb620, 0x15cfd: 0x402fbe20, 0x15cfe: 0x402fc620, 0x15cff: 0x402fd020, + // Block 0x574, offset 0x15d00 + 0x15d00: 0xa0000000, 0x15d01: 0xa0000000, 0x15d02: 0xa0000000, 0x15d03: 0xa0000000, + 0x15d04: 0xa0000000, 0x15d05: 0xa0000000, 0x15d06: 0xa0000000, 0x15d07: 0xa0000000, + 0x15d08: 0xa0000000, 0x15d09: 0x40020020, 0x15d0a: 0x40020220, 0x15d0b: 0x40020420, + 0x15d0c: 0x40020620, 0x15d0d: 0x40020820, 0x15d0e: 0xa0000000, 0x15d0f: 0xa0000000, + 0x15d10: 0xa0000000, 0x15d11: 0xa0000000, 0x15d12: 0xa0000000, 0x15d13: 0xa0000000, + 0x15d14: 0xa0000000, 0x15d15: 0xa0000000, 0x15d16: 0xa0000000, 0x15d17: 0xa0000000, + 0x15d18: 0xa0000000, 0x15d19: 0xa0000000, 0x15d1a: 0xa0000000, 0x15d1b: 0xa0000000, + 0x15d1c: 0xa0000000, 0x15d1d: 0xa0000000, 0x15d1e: 0xa0000000, 0x15d1f: 0xa0000000, + 0x15d20: 0x40021220, 0x15d21: 0x4002ba20, 0x15d22: 0x4003e020, 0x15d23: 0x4004ea20, + 0x15d24: 0x4027de20, 0x15d25: 0x4004ec20, 0x15d26: 0x4004e620, 0x15d27: 0x4003d220, + 0x15d28: 0x4003f420, 0x15d29: 0x4003f620, 0x15d2a: 0x4004d820, 0x15d2b: 0x40093820, + 0x15d2c: 0x40024020, 0x15d2d: 0x40021a20, 0x15d2e: 0x4002e420, 0x15d2f: 0x4004e220, + 0x15d30: 0x4029cc20, 0x15d31: 0x4029ce20, 0x15d32: 0x4029d020, 0x15d33: 0x4029d220, + 0x15d34: 0x4029d420, 0x15d35: 0x4029d620, 0x15d36: 0x4029d820, 0x15d37: 0x4029da20, + 0x15d38: 0x4029dc20, 0x15d39: 0x4029de20, 0x15d3a: 0x40026c20, 0x15d3b: 0x40026220, + 0x15d3c: 0x40094020, 0x15d3d: 0x40094220, 0x15d3e: 0x40094420, 0x15d3f: 0x4002c420, + // Block 0x575, offset 0x15d40 + 0x15d40: 0x4004d620, 0x15d41: 0xcb030be1, 0x15d42: 0x002c0a88, 0x15d43: 0xc3350991, + 0x15d44: 0x002c6288, 0x15d45: 0xcb083ea1, 0x15d46: 0x002d0888, 0x15d47: 0x002d2288, + 0x15d48: 0x002d6888, 0x15d49: 0xcb0d0be1, 0x15d4a: 0x002dcc88, 0x15d4b: 0x002dfe88, + 0x15d4c: 0xc0030002, 0x15d4d: 0x002e8288, 0x15d4e: 0x002e9e88, 0x15d4f: 0x002ee288, + 0x15d50: 0x002f2c88, 0x15d51: 0x002f5688, 0x15d52: 0x002f7a88, 0x15d53: 0xc3430991, + 0x15d54: 0x00302c88, 0x15d55: 0xcb123ed1, 0x15d56: 0x0030be88, 0x15d57: 0x0030e288, + 0x15d58: 0x0030f688, 0x15d59: 0x002d9ac3, 0x15d5a: 0xc3630991, 0x15d5b: 0x4003f820, + 0x15d5c: 0x4004e420, 0x15d5d: 0x4003fa20, 0x15d5e: 0x40062420, 0x15d5f: 0x40021620, + 0x15d60: 0x40061e20, 0x15d61: 0xcb010be1, 0x15d62: 0x402c0a20, 0x15d63: 0xc3330991, + 0x15d64: 0x402c6220, 0x15d65: 0xcb053ea1, 0x15d66: 0x402d0820, 0x15d67: 0x402d2220, + 0x15d68: 0x402d6820, 0x15d69: 0xcb0b0be1, 0x15d6a: 0x402dcc20, 0x15d6b: 0x402dfe20, + 0x15d6c: 0xc0000002, 0x15d6d: 0x402e8220, 0x15d6e: 0x402e9e20, 0x15d6f: 0x402ee220, + 0x15d70: 0x402f2c20, 0x15d71: 0x402f5620, 0x15d72: 0x402f7a20, 0x15d73: 0xc3410991, + 0x15d74: 0x40302c20, 0x15d75: 0xcb0f3ed1, 0x15d76: 0x4030be20, 0x15d77: 0x4030e220, + 0x15d78: 0x4030f620, 0x15d79: 0x402d9a22, 0x15d7a: 0xc3610991, 0x15d7b: 0x4003fc20, + 0x15d7c: 0x40094820, 0x15d7d: 0x4003fe20, 0x15d7e: 0x40094c20, 0x15d7f: 0xa0000000, + // Block 0x576, offset 0x15d80 + 0x15d80: 0xe00008f5, 0x15d81: 0xe00008ef, 0x15d82: 0xe0000921, 0x15d83: 0xe0000969, + 0x15d84: 0xe000095b, 0x15d85: 0xe000094d, 0x15d86: 0xe00009dd, 0x15d87: 0xe0000a53, + 0x15d88: 0xe0000ae8, 0x15d89: 0xe0000ae2, 0x15d8a: 0xe0000af4, 0x15d8b: 0xe0000b20, + 0x15d8c: 0xe0000c2b, 0x15d8d: 0xe0000c25, 0x15d8e: 0xe0000c37, 0x15d8f: 0xe0000c43, + 0x15d90: 0xe0000ab3, 0x15d91: 0xe0000d63, 0x15d92: 0xe0000d9a, 0x15d93: 0xe0000d94, + 0x15d94: 0xe0000da6, 0x15d95: 0xe0000de6, 0x15d96: 0xe0000dd2, 0x15d97: 0x40093e20, + 0x15d98: 0xe0000e12, 0x15d99: 0xe0000fe1, 0x15d9a: 0xe0000fdb, 0x15d9b: 0xe0000fed, + 0x15d9c: 0xe0000fff, 0x15d9d: 0xe000a99a, 0x15d9e: 0x00318888, 0x15d9f: 0xe0000f7b, + 0x15da0: 0xe00008f2, 0x15da1: 0xe00008ec, 0x15da2: 0xe000091e, 0x15da3: 0xe0000966, + 0x15da4: 0xe0000958, 0x15da5: 0xe000094a, 0x15da6: 0xe00009d5, 0x15da7: 0xe0000a4d, + 0x15da8: 0xe0000ae5, 0x15da9: 0xe0000adf, 0x15daa: 0xe0000af1, 0x15dab: 0xe0000b1d, + 0x15dac: 0xe0000c28, 0x15dad: 0xe0000c22, 0x15dae: 0xe0000c34, 0x15daf: 0xe0000c40, + 0x15db0: 0xe0000aad, 0x15db1: 0xe0000d60, 0x15db2: 0xe0000d97, 0x15db3: 0xe0000d91, + 0x15db4: 0xe0000da3, 0x15db5: 0xe0000de3, 0x15db6: 0xe0000dcf, 0x15db7: 0x40093c20, + 0x15db8: 0xe0000e0f, 0x15db9: 0xe0000fde, 0x15dba: 0xe0000fd8, 0x15dbb: 0xe0000fea, + 0x15dbc: 0xe0000ffc, 0x15dbd: 0xe000a997, 0x15dbe: 0x40318820, 0x15dbf: 0xe000a9ac, + // Block 0x577, offset 0x15dc0 + 0x15dc0: 0xe0000983, 0x15dc1: 0xe0000980, 0x15dc2: 0xe00008fb, 0x15dc3: 0xe00008f8, + 0x15dc4: 0x002bdea3, 0x15dc5: 0x402bde21, 0x15dc6: 0xe0000a38, 0x15dc7: 0xe0000a35, + 0x15dc8: 0xe0000a3e, 0x15dc9: 0xe0000a3b, 0x15dca: 0xe0000a4a, 0x15dcb: 0xe0000a47, + 0x15dcc: 0x002c3c83, 0x15dcd: 0x402c3c20, 0x15dce: 0xe0000a86, 0x15dcf: 0xe0000a83, + 0x15dd0: 0xe0000aaa, 0x15dd1: 0xe0000aa7, 0x15dd2: 0xe0000b46, 0x15dd3: 0xe0000b43, + 0x15dd4: 0xe0000aee, 0x15dd5: 0xe0000aeb, 0x15dd6: 0x002c98c3, 0x15dd7: 0x402c9822, + 0x15dd8: 0x002c98a3, 0x15dd9: 0x402c9821, 0x15dda: 0xe0000b1a, 0x15ddb: 0xe0000b17, + 0x15ddc: 0xe0000bb8, 0x15ddd: 0xe0000bb5, 0x15dde: 0xe0000bb2, 0x15ddf: 0xe0000baf, + 0x15de0: 0xe0000bc4, 0x15de1: 0xe0000bc1, 0x15de2: 0xe0000bca, 0x15de3: 0xe0000bc7, + 0x15de4: 0xe0000bee, 0x15de5: 0xe0000beb, 0x15de6: 0xe0000c1b, 0x15de7: 0xe0000c18, + 0x15de8: 0xe0000c51, 0x15de9: 0xe0000c4e, 0x15dea: 0xe0000c60, 0x15deb: 0xe0000c5d, + 0x15dec: 0xe0000c31, 0x15ded: 0xe0000c2e, 0x15dee: 0x002d9aa3, 0x15def: 0x402d9a21, + 0x15df0: 0xe0000c54, 0x15df1: 0x402da220, 0x15df2: 0xf0000a0a, 0x15df3: 0xf0000404, + 0x15df4: 0xe0000c8a, 0x15df5: 0xe0000c87, 0x15df6: 0xe0000c9f, 0x15df7: 0xe0000c9c, + 0x15df8: 0x402f7220, 0x15df9: 0xe0000ccc, 0x15dfa: 0xe0000cc9, 0x15dfb: 0xe0000cd8, + 0x15dfc: 0xe0000cd5, 0x15dfd: 0xe0000cd2, 0x15dfe: 0xe0000ccf, 0x15dff: 0xe0000d04, + // Block 0x578, offset 0x15e00 + 0x15e00: 0xe0000cfe, 0x15e01: 0xe0000cf8, 0x15e02: 0xe0000cf5, 0x15e03: 0xe0000d51, + 0x15e04: 0xe0000d4e, 0x15e05: 0xe0000d6f, 0x15e06: 0xe0000d6c, 0x15e07: 0xe0000d5d, + 0x15e08: 0xe0000d5a, 0x15e09: 0xf0000404, 0x15e0a: 0x002eda88, 0x15e0b: 0x402eda20, + 0x15e0c: 0xe0000e2e, 0x15e0d: 0xe0000e2b, 0x15e0e: 0xe0000da0, 0x15e0f: 0xe0000d9d, + 0x15e10: 0xe0000de0, 0x15e11: 0xe0000ddd, 0x15e12: 0xe0000e93, 0x15e13: 0xe0000e8f, + 0x15e14: 0xe0000eca, 0x15e15: 0xe0000ec7, 0x15e16: 0xe0000edc, 0x15e17: 0xe0000ed9, + 0x15e18: 0xe0000ed0, 0x15e19: 0xe0000ecd, 0x15e1a: 0xe0000f1f, 0x15e1b: 0xe0000f1c, + 0x15e1c: 0xe0000f2d, 0x15e1d: 0xe0000f2a, 0x15e1e: 0xe0000f47, 0x15e1f: 0xe0000f44, + 0x15e20: 0x002fe883, 0x15e21: 0x402fe820, 0x15e22: 0xe0000f99, 0x15e23: 0xe0000f96, + 0x15e24: 0xe0000f8a, 0x15e25: 0xe0000f87, 0x15e26: 0x00303688, 0x15e27: 0x40303620, + 0x15e28: 0xe000102b, 0x15e29: 0xe0001028, 0x15e2a: 0x00306cc3, 0x15e2b: 0x40306c22, + 0x15e2c: 0xe0000fe7, 0x15e2d: 0xe0000fe4, 0x15e2e: 0xe0000ff9, 0x15e2f: 0xe0000ff6, + 0x15e30: 0xe0001025, 0x15e31: 0xe0001022, 0x15e32: 0x00306ca3, 0x15e33: 0x40306c21, + 0x15e34: 0xe00010d8, 0x15e35: 0xe00010d5, 0x15e36: 0xe000a9a6, 0x15e37: 0xe000a9a3, + 0x15e38: 0xe000a9af, 0x15e39: 0xe000113b, 0x15e3a: 0xe0001138, 0x15e3b: 0xe000114d, + 0x15e3c: 0xe000114a, 0x15e3d: 0x00312c83, 0x15e3e: 0x40312c20, 0x15e3f: 0xe0000f64, + // Block 0x579, offset 0x15e40 + 0x15e40: 0x40321220, 0x15e41: 0x40321a20, 0x15e42: 0x40322220, 0x15e43: 0x40322a20, + 0x15e44: 0xe0000ad5, 0x15e45: 0xe0000ad1, 0x15e46: 0xe0000acd, 0x15e47: 0xf0000a0a, + 0x15e48: 0xf000040a, 0x15e49: 0xf0000404, 0x15e4a: 0xf0000a0a, 0x15e4b: 0xf000040a, + 0x15e4c: 0xf0000404, 0x15e4d: 0xe0000947, 0x15e4e: 0xe0000944, 0x15e4f: 0xe0000c3d, + 0x15e50: 0xe0000c3a, 0x15e51: 0xe0000dcc, 0x15e52: 0xe0000dc9, 0x15e53: 0xe0000ff3, + 0x15e54: 0xe0000ff0, 0x15e55: 0xe000a9d3, 0x15e56: 0xe000a9d0, 0x15e57: 0xe0001006, + 0x15e58: 0xe0001002, 0x15e59: 0xe0001016, 0x15e5a: 0xe0001012, 0x15e5b: 0xe000100e, + 0x15e5c: 0xe000100a, 0x15e5d: 0x402cae20, 0x15e5e: 0xe0000962, 0x15e5f: 0xe000095e, + 0x15e60: 0xe0000976, 0x15e61: 0xe0000972, 0x15e62: 0xe00009f4, 0x15e63: 0xe00009ef, + 0x15e64: 0x002d3a88, 0x15e65: 0x402d3a20, 0x15e66: 0xe0000bbe, 0x15e67: 0xe0000bbb, + 0x15e68: 0xe0000c99, 0x15e69: 0xe0000c96, 0x15e6a: 0xe0000e20, 0x15e6b: 0xe0000e1d, + 0x15e6c: 0xe0000e27, 0x15e6d: 0xe0000e23, 0x15e6e: 0xe0001162, 0x15e6f: 0xe000115f, + 0x15e70: 0xe0000c8d, 0x15e71: 0xf0000a0a, 0x15e72: 0xf000040a, 0x15e73: 0xf0000404, + 0x15e74: 0xe0000bac, 0x15e75: 0xe0000ba9, 0x15e76: 0x002d7888, 0x15e77: 0x00319488, + 0x15e78: 0xe0000d57, 0x15e79: 0xe0000d54, 0x15e7a: 0xe0000954, 0x15e7b: 0xe0000950, + 0x15e7c: 0xe00009ea, 0x15e7d: 0xe00009e5, 0x15e7e: 0xe0000e19, 0x15e7f: 0xe0000e15, + // Block 0x57a, offset 0x15e80 + 0x15e80: 0xe000098f, 0x15e81: 0xe000098c, 0x15e82: 0xe0000995, 0x15e83: 0xe0000992, + 0x15e84: 0xe0000b62, 0x15e85: 0xe0000b5f, 0x15e86: 0xe0000b68, 0x15e87: 0xe0000b65, + 0x15e88: 0xe0000c6c, 0x15e89: 0xe0000c69, 0x15e8a: 0xe0000c72, 0x15e8b: 0xe0000c6f, + 0x15e8c: 0xe0000e4a, 0x15e8d: 0xe0000e47, 0x15e8e: 0xe0000e50, 0x15e8f: 0xe0000e4d, + 0x15e90: 0xe0000ee8, 0x15e91: 0xe0000ee5, 0x15e92: 0xe0000eee, 0x15e93: 0xe0000eeb, + 0x15e94: 0xe0001053, 0x15e95: 0xe0001050, 0x15e96: 0xe0001059, 0x15e97: 0xe0001056, + 0x15e98: 0xe0000f61, 0x15e99: 0xe0000f5e, 0x15e9a: 0xe0000fa5, 0x15e9b: 0xe0000fa2, + 0x15e9c: 0x00312288, 0x15e9d: 0x40312220, 0x15e9e: 0xe0000bf4, 0x15e9f: 0xe0000bf1, + 0x15ea0: 0x002ebc88, 0x15ea1: 0x402c8c20, 0x15ea2: 0x002f2288, 0x15ea3: 0x402f2220, + 0x15ea4: 0x00314088, 0x15ea5: 0x40314020, 0x15ea6: 0xe000096f, 0x15ea7: 0xe000096c, + 0x15ea8: 0xe0000b32, 0x15ea9: 0xe0000b2f, 0x15eaa: 0xe0000dd9, 0x15eab: 0xe0000dd5, + 0x15eac: 0xe0000dfd, 0x15ead: 0xe0000df9, 0x15eae: 0xe0000e04, 0x15eaf: 0xe0000e01, + 0x15eb0: 0xe0000e0b, 0x15eb1: 0xe0000e07, 0x15eb2: 0xe000a9c1, 0x15eb3: 0xe000a9be, + 0x15eb4: 0x402e5e20, 0x15eb5: 0x402ed020, 0x15eb6: 0x40305a20, 0x15eb7: 0x402dd420, + 0x15eb8: 0xe0000abf, 0x15eb9: 0xe0000ec4, 0x15eba: 0x002be888, 0x15ebb: 0x002c4488, + 0x15ebc: 0x402c4420, 0x15ebd: 0x002e3888, 0x15ebe: 0x00303e88, 0x15ebf: 0x402ffc20, + // Block 0x57b, offset 0x15ec0 + 0x15ec0: 0xae603502, 0x15ec1: 0xae603202, 0x15ec2: 0xae603c02, 0x15ec3: 0xae604e02, + 0x15ec4: 0xae605b02, 0x15ec5: 0xae606302, 0x15ec6: 0xae603702, 0x15ec7: 0xcafd3e71, + 0x15ec8: 0xae604702, 0x15ec9: 0xae606402, 0x15eca: 0xae604302, 0x15ecb: 0xae604d02, + 0x15ecc: 0xae604102, 0x15ecd: 0xae605f02, 0x15ece: 0xae605f02, 0x15ecf: 0xae606502, + 0x15ed0: 0xae606602, 0x15ed1: 0xae606702, 0x15ed2: 0xae605f02, 0x15ed3: 0xae602202, + 0x15ed4: 0xae602a02, 0x15ed5: 0xae805f02, 0x15ed6: 0xadc06002, 0x15ed7: 0xadc06002, + 0x15ed8: 0xadc06002, 0x15ed9: 0xadc06002, 0x15eda: 0xae805f02, 0x15edb: 0xad806802, + 0x15edc: 0xadc06002, 0x15edd: 0xadc06002, 0x15ede: 0xadc06002, 0x15edf: 0xadc06002, + 0x15ee0: 0xadc06002, 0x15ee1: 0xaca06e02, 0x15ee2: 0xaca06f02, 0x15ee3: 0xadc07002, + 0x15ee4: 0xadc07502, 0x15ee5: 0xadc07602, 0x15ee6: 0xadc07702, 0x15ee7: 0xaca05602, + 0x15ee8: 0xaca05902, 0x15ee9: 0xadc06002, 0x15eea: 0xadc06002, 0x15eeb: 0xadc06002, + 0x15eec: 0xadc06002, 0x15eed: 0xadc07802, 0x15eee: 0xadc07902, 0x15eef: 0xadc06002, + 0x15ef0: 0xadc07a02, 0x15ef1: 0xadc07b02, 0x15ef2: 0xadc02102, 0x15ef3: 0xadc06002, + 0x15ef4: 0xa0107c02, 0x15ef5: 0xa0107d02, 0x15ef6: 0xa0106102, 0x15ef7: 0xa0106102, + 0x15ef8: 0xa0105402, 0x15ef9: 0xadc07e02, 0x15efa: 0xadc06002, 0x15efb: 0xadc06002, + 0x15efc: 0xadc06002, 0x15efd: 0xae605f02, 0x15efe: 0xae605f02, 0x15eff: 0xae605f02, + // Block 0x57c, offset 0x15f00 + 0x15f00: 0xe0000d24, 0x15f01: 0xe0000d21, 0x15f02: 0xe0000d2a, 0x15f03: 0xe0000d27, + 0x15f04: 0xe0000d69, 0x15f05: 0xe0000d66, 0x15f06: 0xe0000d7b, 0x15f07: 0xe0000d78, + 0x15f08: 0xe0000d87, 0x15f09: 0xe0000d84, 0x15f0a: 0xe0000d81, 0x15f0b: 0xe0000d7e, + 0x15f0c: 0xe0000ded, 0x15f0d: 0xe0000de9, 0x15f0e: 0xe0000df5, 0x15f0f: 0xe0000df1, + 0x15f10: 0xe0000e3d, 0x15f11: 0xe0000e39, 0x15f12: 0xe0000e35, 0x15f13: 0xe0000e31, + 0x15f14: 0xe0000ea7, 0x15f15: 0xe0000ea4, 0x15f16: 0xe0000ead, 0x15f17: 0xe0000eaa, + 0x15f18: 0xe0000ed6, 0x15f19: 0xe0000ed3, 0x15f1a: 0xe0000ef4, 0x15f1b: 0xe0000ef1, + 0x15f1c: 0xe0000efb, 0x15f1d: 0xe0000ef7, 0x15f1e: 0xe0000f02, 0x15f1f: 0xe0000eff, + 0x15f20: 0xe0000f41, 0x15f21: 0xe0000f3e, 0x15f22: 0xe0000f53, 0x15f23: 0xe0000f50, + 0x15f24: 0xe0000f26, 0x15f25: 0xe0000f22, 0x15f26: 0xe000296a, 0x15f27: 0xe0002967, + 0x15f28: 0xe0000f5a, 0x15f29: 0xe0000f56, 0x15f2a: 0xe0000f93, 0x15f2b: 0xe0000f90, + 0x15f2c: 0xe0000f9f, 0x15f2d: 0xe0000f9c, 0x15f2e: 0xe0000fb1, 0x15f2f: 0xe0000fae, + 0x15f30: 0xe0000fab, 0x15f31: 0xe0000fa8, 0x15f32: 0xe0001093, 0x15f33: 0xe0001090, + 0x15f34: 0xe000109f, 0x15f35: 0xe000109c, 0x15f36: 0xe0001099, 0x15f37: 0xe0001096, + 0x15f38: 0xe0001032, 0x15f39: 0xe000102e, 0x15f3a: 0xe000a9d3, 0x15f3b: 0xe000a9d0, + 0x15f3c: 0xe00010a9, 0x15f3d: 0xe00010a6, 0x15f3e: 0xe00010af, 0x15f3f: 0xe00010ac, + // Block 0x57d, offset 0x15f40 + 0x15f40: 0xe00010d2, 0x15f41: 0xe00010cf, 0x15f42: 0xe00010cc, 0x15f43: 0xe00010c9, + 0x15f44: 0xe00010e1, 0x15f45: 0xe00010de, 0x15f46: 0xe00010e7, 0x15f47: 0xe00010e4, + 0x15f48: 0xe00010ed, 0x15f49: 0xe00010ea, 0x15f4a: 0xe00010fc, 0x15f4b: 0xe00010f9, + 0x15f4c: 0xe00010f6, 0x15f4d: 0xe00010f3, 0x15f4e: 0xe000a9bb, 0x15f4f: 0xe000a9b8, + 0x15f50: 0xe0001141, 0x15f51: 0xe000113e, 0x15f52: 0xe0001153, 0x15f53: 0xe0001150, + 0x15f54: 0xe0001159, 0x15f55: 0xe0001156, 0x15f56: 0xe0000c15, 0x15f57: 0xe0000f8d, + 0x15f58: 0xe00010db, 0x15f59: 0xe000a9a9, 0x15f5a: 0xf0000404, 0x15f5b: 0xe0000f70, + 0x15f5c: 0x40300420, 0x15f5d: 0x40300620, 0x15f5e: 0xe0000f7f, 0x15f5f: 0x402c9620, + 0x15f60: 0xe000099b, 0x15f61: 0xe0000998, 0x15f62: 0xe0000989, 0x15f63: 0xe0000986, + 0x15f64: 0xe0000928, 0x15f65: 0xe0000924, 0x15f66: 0xe0000930, 0x15f67: 0xe000092c, + 0x15f68: 0xe0000940, 0x15f69: 0xe000093c, 0x15f6a: 0xe0000938, 0x15f6b: 0xe0000934, + 0x15f6c: 0xe00009aa, 0x15f6d: 0xe00009a6, 0x15f6e: 0xe0000902, 0x15f6f: 0xe00008fe, + 0x15f70: 0xe000090a, 0x15f71: 0xe0000906, 0x15f72: 0xe000091a, 0x15f73: 0xe0000916, + 0x15f74: 0xe0000912, 0x15f75: 0xe000090e, 0x15f76: 0xe00009a2, 0x15f77: 0xe000099e, + 0x15f78: 0xe0000b6e, 0x15f79: 0xe0000b6b, 0x15f7a: 0xe0000b5c, 0x15f7b: 0xe0000b59, + 0x15f7c: 0xe0000b26, 0x15f7d: 0xe0000b23, 0x15f7e: 0xe0000afb, 0x15f7f: 0xe0000af7, + // Block 0x57e, offset 0x15f80 + 0x15f80: 0xe0000b03, 0x15f81: 0xe0000aff, 0x15f82: 0xe0000b13, 0x15f83: 0xe0000b0f, + 0x15f84: 0xe0000b0b, 0x15f85: 0xe0000b07, 0x15f86: 0xe0000b75, 0x15f87: 0xe0000b71, + 0x15f88: 0xe0000c66, 0x15f89: 0xe0000c63, 0x15f8a: 0xe0000c78, 0x15f8b: 0xe0000c75, + 0x15f8c: 0xe0000e84, 0x15f8d: 0xe0000e81, 0x15f8e: 0xe0000e44, 0x15f8f: 0xe0000e41, + 0x15f90: 0xe0000dad, 0x15f91: 0xe0000da9, 0x15f92: 0xe0000db5, 0x15f93: 0xe0000db1, + 0x15f94: 0xe0000dc5, 0x15f95: 0xe0000dc1, 0x15f96: 0xe0000dbd, 0x15f97: 0xe0000db9, + 0x15f98: 0xe0000e8b, 0x15f99: 0xe0000e87, 0x15f9a: 0xe0000e5d, 0x15f9b: 0xe0000e59, + 0x15f9c: 0xe0000e65, 0x15f9d: 0xe0000e61, 0x15f9e: 0xe0000e75, 0x15f9f: 0xe0000e71, + 0x15fa0: 0xe0000e6d, 0x15fa1: 0xe0000e69, 0x15fa2: 0xe0000e7d, 0x15fa3: 0xe0000e79, + 0x15fa4: 0xe000108d, 0x15fa5: 0xe000108a, 0x15fa6: 0xe000104d, 0x15fa7: 0xe000104a, + 0x15fa8: 0xe0001066, 0x15fa9: 0xe0001062, 0x15faa: 0xe000106e, 0x15fab: 0xe000106a, + 0x15fac: 0xe000107e, 0x15fad: 0xe000107a, 0x15fae: 0xe0001076, 0x15faf: 0xe0001072, + 0x15fb0: 0xe0001086, 0x15fb1: 0xe0001082, 0x15fb2: 0xe000a9a0, 0x15fb3: 0xe000a99d, + 0x15fb4: 0xe000a9cd, 0x15fb5: 0xe000a9ca, 0x15fb6: 0xe000a9c7, 0x15fb7: 0xe000a9c4, + 0x15fb8: 0xe000a9b5, 0x15fb9: 0xe000a9b2, 0x15fba: 0xe0000d0a, 0x15fbb: 0xe0000d07, + 0x15fbc: 0x0030d888, 0x15fbd: 0x4030d820, 0x15fbe: 0x00312088, 0x15fbf: 0x40312020, + // Block 0x57f, offset 0x15fc0 + 0x15fc0: 0xe0000024, 0x15fc1: 0xe0000029, 0x15fc2: 0xe000002e, 0x15fc3: 0xe0000033, + 0x15fc4: 0xe0000038, 0x15fc5: 0xe000003d, 0x15fc6: 0xe0000042, 0x15fc7: 0xe0000047, + 0x15fc8: 0xf0001f04, 0x15fc9: 0xf0001f04, 0x15fca: 0xf0001f04, 0x15fcb: 0xf0001f04, + 0x15fcc: 0xf0001f04, 0x15fcd: 0xf0001f04, 0x15fce: 0xf0001f04, 0x15fcf: 0xf0001f04, + 0x15fd0: 0xf0001f04, 0x15fd1: 0xf0000404, 0x15fd2: 0xf0000404, 0x15fd3: 0xf0000404, + 0x15fd4: 0xf0000404, 0x15fd5: 0xf0000404, 0x15fd6: 0xf0000404, 0x15fd7: 0xf0000404, + 0x15fd8: 0xf0000404, 0x15fd9: 0xf0000404, 0x15fda: 0xf0000404, 0x15fdb: 0xf0000404, + 0x15fdc: 0xf0000404, 0x15fdd: 0xf0000404, 0x15fde: 0xf0000404, 0x15fdf: 0xf0000404, + 0x15fe0: 0xf0000404, 0x15fe1: 0xf0000404, 0x15fe2: 0xf0000404, 0x15fe3: 0xf0000404, + 0x15fe4: 0xf0000404, 0x15fe5: 0xf0000404, 0x15fe6: 0xf0000404, 0x15fe7: 0xf0000404, + 0x15fe8: 0xf0000404, 0x15fe9: 0xf0000404, 0x15fea: 0xf0000404, 0x15feb: 0xf0000404, + 0x15fec: 0xf0000404, 0x15fed: 0xf0000404, 0x15fee: 0xf0000404, 0x15fef: 0xf0000404, + 0x15ff0: 0xf0000404, 0x15ff1: 0xf0000404, 0x15ff2: 0xf0000404, 0x15ff3: 0xf0000404, + 0x15ff4: 0xe0002c4e, 0x15ff5: 0xf0000404, 0x15ff6: 0x002bde8c, 0x15ff7: 0x002c0a8c, + 0x15ff8: 0x002c3a8c, 0x15ff9: 0x002c628c, 0x15ffa: 0x002c988c, 0x15ffb: 0x002d088c, + 0x15ffc: 0x002d228c, 0x15ffd: 0x002d688c, 0x15ffe: 0x002d9a8c, 0x15fff: 0x002dcc8c, + // Block 0x580, offset 0x16000 + 0x16000: 0xf0001d1c, 0x16001: 0xf0001d1d, 0x16002: 0xe00009b7, 0x16003: 0xf0001c1d, + 0x16004: 0xf0001c1c, 0x16005: 0xf0001c1c, 0x16006: 0xe0000a66, 0x16007: 0xe0000a7a, + 0x16008: 0xf0001d1c, 0x16009: 0xe0003576, 0x1600a: 0xf0001c1c, 0x1600b: 0xf0001d1d, + 0x1600c: 0xf0001c1c, 0x1600d: 0xf0001d1d, 0x1600e: 0xf0001d1d, 0x1600f: 0xf0001c1c, + 0x16010: 0xf0001c1c, 0x16011: 0xf0001c1c, 0x16012: 0xe0000d0d, 0x16013: 0xf0001c1c, + 0x16014: 0xf0001c1c, 0x16015: 0xe0000d3a, 0x16016: 0xe0000d46, 0x16017: 0xf0001d1d, + 0x16018: 0xe0000eb0, 0x16019: 0xe0000eb8, 0x1601a: 0xf0001d1d, 0x1601b: 0xf0001c1c, + 0x1601c: 0xf0001c1d, 0x1601d: 0xf0001c1d, 0x1601e: 0xe00010b2, 0x1601f: 0xe00009c8, + 0x16020: 0xf0001f04, 0x16021: 0xf0001f04, 0x16022: 0xf0001f04, 0x16023: 0xf0001f04, + 0x16024: 0xf0001f04, 0x16025: 0xf0001f04, 0x16026: 0xf0001f04, 0x16027: 0xf0001f04, + 0x16028: 0xf0001f04, 0x16029: 0xf0000404, 0x1602a: 0xf0000404, 0x1602b: 0xf0000404, + 0x1602c: 0xf0000404, 0x1602d: 0xf0000404, 0x1602e: 0xf0000404, 0x1602f: 0xf0000404, + 0x16030: 0xf0000404, 0x16031: 0xf0000404, 0x16032: 0xf0000404, 0x16033: 0xf0000404, + 0x16034: 0xf0000404, 0x16035: 0xf0000404, 0x16036: 0xf0000404, 0x16037: 0xf0000404, + 0x16038: 0xf0000404, 0x16039: 0xf0000404, 0x1603a: 0xf0000404, 0x1603b: 0xf0000404, + 0x1603c: 0xf0000404, 0x1603d: 0xf0000404, 0x1603e: 0xf0000404, 0x1603f: 0xe0000bdf, + // Block 0x581, offset 0x16040 + 0x16040: 0xf0001f04, 0x16041: 0xf0001f04, 0x16042: 0xf0001f04, 0x16043: 0xf0001f04, + 0x16044: 0xf0001f04, 0x16045: 0xf0001f04, 0x16046: 0xf0001f04, 0x16047: 0xf0001f04, + 0x16048: 0xf0001f04, 0x16049: 0xf0001f04, 0x1604a: 0xf0001f04, + 0x16050: 0xf0000a04, 0x16051: 0xf0000a04, 0x16052: 0xf0000a04, 0x16053: 0xf0000a04, + 0x16054: 0xf0000a04, 0x16055: 0xf0000a04, 0x16056: 0xf0000a04, 0x16057: 0xf0000a04, + 0x16058: 0xf0000a04, 0x16059: 0xf0000a04, 0x1605a: 0xf0000a04, 0x1605b: 0xf0000a04, + 0x1605c: 0xf0000a04, 0x1605d: 0xf0000a04, 0x1605e: 0xf0000a04, 0x1605f: 0xf0000a04, + 0x16060: 0xf0000a04, 0x16061: 0xf0000a04, 0x16062: 0xf0000a04, 0x16063: 0xf0000a04, + 0x16064: 0xf0000a04, 0x16065: 0xf0000a04, 0x16066: 0xf0000a04, 0x16067: 0xf0000a04, + 0x16068: 0xe0002c52, 0x16069: 0xf0000a04, 0x1606a: 0xf0000a04, 0x1606b: 0x002c3a8c, + 0x1606c: 0x002f7a8c, 0x1606d: 0xf0000c0c, 0x1606e: 0xf0000c0c, + 0x16070: 0x002bde9d, 0x16071: 0x002c0a9d, 0x16072: 0x002c3a9d, 0x16073: 0x002c629d, + 0x16074: 0x002c989d, 0x16075: 0x002d089d, 0x16076: 0x002d229d, 0x16077: 0x002d689d, + 0x16078: 0x002d9a9d, 0x16079: 0x002dcc9d, 0x1607a: 0x002dfe9d, 0x1607b: 0x002e229d, + 0x1607c: 0x002e829d, 0x1607d: 0x002e9e9d, 0x1607e: 0x002ee29d, 0x1607f: 0x002f2c9d, + // Block 0x582, offset 0x16080 + 0x16080: 0xa0000000, 0x16081: 0xa0000000, 0x16082: 0xa0000000, 0x16083: 0xa0000000, + 0x16084: 0xa0000000, 0x16085: 0xa0000000, 0x16086: 0xa0000000, 0x16087: 0xa0000000, + 0x16088: 0xa0000000, 0x16089: 0x40020020, 0x1608a: 0x40020220, 0x1608b: 0x40020420, + 0x1608c: 0x40020620, 0x1608d: 0x40020820, 0x1608e: 0xa0000000, 0x1608f: 0xa0000000, + 0x16090: 0xa0000000, 0x16091: 0xa0000000, 0x16092: 0xa0000000, 0x16093: 0xa0000000, + 0x16094: 0xa0000000, 0x16095: 0xa0000000, 0x16096: 0xa0000000, 0x16097: 0xa0000000, + 0x16098: 0xa0000000, 0x16099: 0xa0000000, 0x1609a: 0xa0000000, 0x1609b: 0xa0000000, + 0x1609c: 0xa0000000, 0x1609d: 0xa0000000, 0x1609e: 0xa0000000, 0x1609f: 0xa0000000, + 0x160a0: 0x40021220, 0x160a1: 0x4002ba20, 0x160a2: 0x4003e020, 0x160a3: 0x4004ea20, + 0x160a4: 0x4027de20, 0x160a5: 0x4004ec20, 0x160a6: 0x4004e620, 0x160a7: 0x4003d220, + 0x160a8: 0x4003f420, 0x160a9: 0x4003f620, 0x160aa: 0x4004d820, 0x160ab: 0x40093820, + 0x160ac: 0x40024020, 0x160ad: 0x40021a20, 0x160ae: 0x4002e420, 0x160af: 0x4004e220, + 0x160b0: 0x4029cc20, 0x160b1: 0x4029ce20, 0x160b2: 0x4029d020, 0x160b3: 0x4029d220, + 0x160b4: 0x4029d420, 0x160b5: 0x4029d620, 0x160b6: 0x4029d820, 0x160b7: 0x4029da20, + 0x160b8: 0x4029dc20, 0x160b9: 0x4029de20, 0x160ba: 0x40026c20, 0x160bb: 0x40026220, + 0x160bc: 0x40094020, 0x160bd: 0x40094220, 0x160be: 0x40094420, 0x160bf: 0x4002c420, + // Block 0x583, offset 0x160c0 + 0x160c0: 0x4004d620, 0x160c1: 0x002bde88, 0x160c2: 0x002c0a88, 0x160c3: 0xcb170991, + 0x160c4: 0x002c6288, 0x160c5: 0x002c9888, 0x160c6: 0x002d0888, 0x160c7: 0xcb1b0911, + 0x160c8: 0x002d6888, 0x160c9: 0x002d9a88, 0x160ca: 0x002dcc88, 0x160cb: 0xcb1f0911, + 0x160cc: 0xcb253f03, 0x160cd: 0x002e8288, 0x160ce: 0xcb2b0911, 0x160cf: 0x002ee288, + 0x160d0: 0x002f2c88, 0x160d1: 0x002f5688, 0x160d2: 0xcb2f0911, 0x160d3: 0xcb330991, + 0x160d4: 0x00302c88, 0x160d5: 0x00306c88, 0x160d6: 0x0030be88, 0x160d7: 0x0030e288, + 0x160d8: 0x0030f688, 0x160d9: 0x00310088, 0x160da: 0xcb370991, 0x160db: 0x4003f820, + 0x160dc: 0x4004e420, 0x160dd: 0x4003fa20, 0x160de: 0x40062420, 0x160df: 0x40021620, + 0x160e0: 0x40061e20, 0x160e1: 0x402bde20, 0x160e2: 0x402c0a20, 0x160e3: 0xcb150991, + 0x160e4: 0x402c6220, 0x160e5: 0x402c9820, 0x160e6: 0x402d0820, 0x160e7: 0xcb190911, + 0x160e8: 0x402d6820, 0x160e9: 0x402d9a20, 0x160ea: 0x402dcc20, 0x160eb: 0xcb1d0911, + 0x160ec: 0xcb213f03, 0x160ed: 0x402e8220, 0x160ee: 0xcb290911, 0x160ef: 0x402ee220, + 0x160f0: 0x402f2c20, 0x160f1: 0x402f5620, 0x160f2: 0xcb2d0911, 0x160f3: 0xcb310991, + 0x160f4: 0x40302c20, 0x160f5: 0x40306c20, 0x160f6: 0x4030be20, 0x160f7: 0x4030e220, + 0x160f8: 0x4030f620, 0x160f9: 0x40310020, 0x160fa: 0xcb350991, 0x160fb: 0x4003fc20, + 0x160fc: 0x40094820, 0x160fd: 0x4003fe20, 0x160fe: 0x40094c20, 0x160ff: 0xa0000000, + // Block 0x584, offset 0x16100 + 0x16100: 0xe0000983, 0x16101: 0xe0000980, 0x16102: 0xe00008fb, 0x16103: 0xe00008f8, + 0x16104: 0xe000097d, 0x16105: 0xe000097a, 0x16106: 0xe0000a38, 0x16107: 0xe0000a35, + 0x16108: 0xe0000a3e, 0x16109: 0xe0000a3b, 0x1610a: 0xe0000a4a, 0x1610b: 0xe0000a47, + 0x1610c: 0x002c6083, 0x1610d: 0x402c6020, 0x1610e: 0xe0000a86, 0x1610f: 0xe0000a83, + 0x16110: 0xe0000aaa, 0x16111: 0xe0000aa7, 0x16112: 0xe0000b46, 0x16113: 0xe0000b43, + 0x16114: 0xe0000aee, 0x16115: 0xe0000aeb, 0x16116: 0xe0000b2c, 0x16117: 0xe0000b29, + 0x16118: 0xe0000b40, 0x16119: 0xe0000b3d, 0x1611a: 0xe0000b1a, 0x1611b: 0xe0000b17, + 0x1611c: 0xe0000bb8, 0x1611d: 0xe0000bb5, 0x1611e: 0xe0000bb2, 0x1611f: 0xe0000baf, + 0x16120: 0xe0000bc4, 0x16121: 0xe0000bc1, 0x16122: 0x002d6683, 0x16123: 0x402d6620, + 0x16124: 0xe0000bee, 0x16125: 0xe0000beb, 0x16126: 0xe0000c1b, 0x16127: 0xe0000c18, + 0x16128: 0xe0000c51, 0x16129: 0xe0000c4e, 0x1612a: 0xe0000c60, 0x1612b: 0xe0000c5d, + 0x1612c: 0xe0000c31, 0x1612d: 0xe0000c2e, 0x1612e: 0xe0000c5a, 0x1612f: 0xe0000c57, + 0x16130: 0xe0000c54, 0x16131: 0x402da220, 0x16132: 0xf0000a0a, 0x16133: 0xf0000404, + 0x16134: 0xe0000c8a, 0x16135: 0xe0000c87, 0x16136: 0x002e2083, 0x16137: 0x402e2020, + 0x16138: 0x402f7220, 0x16139: 0xe0000ccc, 0x1613a: 0xe0000cc9, 0x1613b: 0x002e8083, + 0x1613c: 0x402e8020, 0x1613d: 0xe0000cd2, 0x1613e: 0xe0000ccf, 0x1613f: 0xe0000d04, + // Block 0x585, offset 0x16140 + 0x16140: 0xe0000cfe, 0x16141: 0xe0000cf8, 0x16142: 0xe0000cf5, 0x16143: 0xe0000d51, + 0x16144: 0xe0000d4e, 0x16145: 0x002ee083, 0x16146: 0x402ee020, 0x16147: 0xe0000d5d, + 0x16148: 0xe0000d5a, 0x16149: 0xf0000404, 0x1614a: 0x002eda88, 0x1614b: 0x402eda20, + 0x1614c: 0xe0000e2e, 0x1614d: 0xe0000e2b, 0x1614e: 0xe0000da0, 0x1614f: 0xe0000d9d, + 0x16150: 0xe0000de0, 0x16151: 0xe0000ddd, 0x16152: 0xe0000e93, 0x16153: 0xe0000e8f, + 0x16154: 0xe0000eca, 0x16155: 0xe0000ec7, 0x16156: 0x002fe483, 0x16157: 0x402fe420, + 0x16158: 0xe0000ed0, 0x16159: 0xe0000ecd, 0x1615a: 0xe0000f1f, 0x1615b: 0xe0000f1c, + 0x1615c: 0xe0000f2d, 0x1615d: 0xe0000f2a, 0x1615e: 0xe0000f47, 0x1615f: 0xe0000f44, + 0x16160: 0x00302a83, 0x16161: 0x40302a20, 0x16162: 0xe0000f99, 0x16163: 0xe0000f96, + 0x16164: 0xe0000f8a, 0x16165: 0xe0000f87, 0x16166: 0x00303688, 0x16167: 0x40303620, + 0x16168: 0xe000102b, 0x16169: 0xe0001028, 0x1616a: 0xe000103f, 0x1616b: 0xe000103c, + 0x1616c: 0xe0000fe7, 0x1616d: 0xe0000fe4, 0x1616e: 0xe0000ff9, 0x1616f: 0xe0000ff6, + 0x16170: 0xe0001025, 0x16171: 0xe0001022, 0x16172: 0xe0001039, 0x16173: 0xe0001036, + 0x16174: 0xe00010d8, 0x16175: 0xe00010d5, 0x16176: 0xe000110e, 0x16177: 0xe000110b, + 0x16178: 0xe0001117, 0x16179: 0xe000113b, 0x1617a: 0xe0001138, 0x1617b: 0xe000114d, + 0x1617c: 0xe000114a, 0x1617d: 0x00316283, 0x1617e: 0x40316220, 0x1617f: 0xe0000f64, + // Block 0x586, offset 0x16180 + 0x16180: 0xe0000d24, 0x16181: 0xe0000d21, 0x16182: 0xe0000d2a, 0x16183: 0xe0000d27, + 0x16184: 0xe0000d69, 0x16185: 0xe0000d66, 0x16186: 0xe0000d7b, 0x16187: 0xe0000d78, + 0x16188: 0xe0000d87, 0x16189: 0xe0000d84, 0x1618a: 0xe0000d81, 0x1618b: 0xe0000d7e, + 0x1618c: 0xe0000ded, 0x1618d: 0xe0000de9, 0x1618e: 0xe0000df5, 0x1618f: 0xe0000df1, + 0x16190: 0xe0000e3d, 0x16191: 0xe0000e39, 0x16192: 0xe0000e35, 0x16193: 0xe0000e31, + 0x16194: 0xe0000ea7, 0x16195: 0xe0000ea4, 0x16196: 0xe0000ead, 0x16197: 0xe0000eaa, + 0x16198: 0xe0000ed6, 0x16199: 0xe0000ed3, 0x1619a: 0xe0000ef4, 0x1619b: 0xe0000ef1, + 0x1619c: 0xe0000efb, 0x1619d: 0xe0000ef7, 0x1619e: 0xe0000f02, 0x1619f: 0xe0000eff, + 0x161a0: 0xe0000f41, 0x161a1: 0xe0000f3e, 0x161a2: 0xe0000f53, 0x161a3: 0xe0000f50, + 0x161a4: 0xe0000f26, 0x161a5: 0xe0000f22, 0x161a6: 0xe000a9d9, 0x161a7: 0xe000a9d6, + 0x161a8: 0xe0000f5a, 0x161a9: 0xe0000f56, 0x161aa: 0xe0000f93, 0x161ab: 0xe0000f90, + 0x161ac: 0xe0000f9f, 0x161ad: 0xe0000f9c, 0x161ae: 0xe0000fb1, 0x161af: 0xe0000fae, + 0x161b0: 0xe0000fab, 0x161b1: 0xe0000fa8, 0x161b2: 0xe0001093, 0x161b3: 0xe0001090, + 0x161b4: 0xe000109f, 0x161b5: 0xe000109c, 0x161b6: 0xe0001099, 0x161b7: 0xe0001096, + 0x161b8: 0xe0001032, 0x161b9: 0xe000102e, 0x161ba: 0xe0001046, 0x161bb: 0xe0001042, + 0x161bc: 0xe00010a9, 0x161bd: 0xe00010a6, 0x161be: 0xe00010af, 0x161bf: 0xe00010ac, + // Block 0x587, offset 0x161c0 + 0x161c2: 0xe000a9f1, 0x161c3: 0xa000f402, + 0x161c5: 0x40440220, 0x161c6: 0x40440420, 0x161c7: 0x40440620, + 0x161c8: 0x40440820, 0x161c9: 0x40440a20, 0x161ca: 0x40440c20, 0x161cb: 0x40440e20, + 0x161cc: 0x40441220, 0x161ce: 0x40441620, 0x161cf: 0x40441820, + 0x161d0: 0x40441a20, 0x161d2: 0x40441c20, 0x161d3: 0x40441e20, + 0x161d4: 0x40442020, 0x161d5: 0xcb393f61, 0x161d6: 0x40442420, 0x161d7: 0x40442620, + 0x161d8: 0x40442820, 0x161d9: 0x40442a20, 0x161da: 0x40442c20, 0x161db: 0x40442e20, + 0x161dc: 0x40443020, 0x161dd: 0x40443220, 0x161de: 0x40443420, 0x161df: 0x40443620, + 0x161e0: 0x40443820, 0x161e1: 0x40443a20, 0x161e2: 0x40443c20, 0x161e3: 0xcb3b3fc1, + 0x161e4: 0x40444020, 0x161e5: 0x40444220, 0x161e6: 0x40444420, 0x161e7: 0x40444620, + 0x161e8: 0xcb3f3f61, 0x161e9: 0x40444a20, 0x161ea: 0x40444c20, 0x161eb: 0x40444e20, + 0x161ec: 0x40445020, 0x161ed: 0x40445220, 0x161ee: 0x40445420, 0x161ef: 0x40445620, + 0x161f0: 0xcb413f61, 0x161f1: 0x40446a20, 0x161f2: 0xcb433f61, 0x161f3: 0xcb453f61, + 0x161f4: 0x40446820, 0x161f5: 0x40445c20, 0x161f6: 0x40445e20, 0x161f7: 0x40446020, + 0x161f8: 0x40446220, 0x161f9: 0x40446420, 0x161fa: 0x40446c20, + 0x161fd: 0xa000f502, 0x161fe: 0x40447020, 0x161ff: 0x40447220, + // Block 0x588, offset 0x16200 + 0x16200: 0x40447420, 0x16201: 0x40447620, 0x16202: 0x40447820, 0x16203: 0x40447a20, + 0x16204: 0x40447c20, 0x16206: 0xcb4703b1, 0x16207: 0xc0760401, + 0x16208: 0x40448620, 0x1620a: 0x40448820, 0x1620b: 0x40448a20, + 0x1620c: 0x00448c83, 0x1620d: 0x82092248, 0x1620e: 0xe000186c, + 0x16217: 0x40448c20, + 0x16220: 0x40441020, 0x16221: 0x40441420, 0x16222: 0x40447e20, 0x16223: 0x40448020, + 0x16226: 0xe0000185, 0x16227: 0xe0000216, + 0x16228: 0xe0000331, 0x16229: 0xe000040b, 0x1622a: 0xe00004e0, 0x1622b: 0xe00005aa, + 0x1622c: 0xe0000675, 0x1622d: 0xe000071d, 0x1622e: 0xe00007c9, 0x1622f: 0xe000086e, + 0x16230: 0x40285a20, 0x16231: 0x40285c20, 0x16232: 0x40285e20, 0x16233: 0x40286020, + 0x16234: 0x40286220, 0x16235: 0x40286420, + 0x16239: 0x40074e20, 0x1623a: 0xe000a9e5, 0x1623b: 0xcb3d4031, + 0x1623c: 0xe000a9f7, 0x1623d: 0xe000a9fd, 0x1623e: 0xe000aa03, 0x1623f: 0xe000a9df, + // Block 0x589, offset 0x16240 + 0x16240: 0xa000f202, 0x16241: 0x403fba21, 0x16242: 0x403fba20, 0x16243: 0x403fbc20, + 0x16244: 0x403fbc20, 0x16245: 0x403fbe20, 0x16246: 0x403fc020, 0x16247: 0x403fcc20, + 0x16248: 0x403fce20, 0x16249: 0x403fd020, 0x1624a: 0x403fd220, 0x1624b: 0x403fd420, + 0x1624c: 0x403fd820, 0x1624d: 0x403fdc20, 0x1624e: 0x403fde20, 0x1624f: 0x403fe020, + 0x16250: 0x403fe220, 0x16251: 0x403fe420, 0x16252: 0x403fe620, 0x16253: 0x403fe820, + 0x16254: 0x403fea20, 0x16255: 0xcaac3be1, 0x16256: 0x403fee20, 0x16257: 0x403ff020, + 0x16258: 0x403ff420, 0x16259: 0x403ff620, 0x1625a: 0x403ff820, 0x1625b: 0x403ffa20, + 0x1625c: 0xcb4a4061, 0x1625d: 0x40400220, 0x1625e: 0x40400420, 0x1625f: 0x40400620, + 0x16260: 0x40400820, 0x16261: 0x40400a20, 0x16262: 0x40400e20, 0x16263: 0x40401020, + 0x16264: 0x40401220, 0x16265: 0x40401420, 0x16266: 0x40401620, 0x16267: 0x40401820, + 0x16268: 0x40401a20, 0x16269: 0xe0001830, 0x1626a: 0x40401c20, 0x1626b: 0x40401e20, + 0x1626c: 0x40402020, 0x1626d: 0x40402420, 0x1626e: 0x40402620, 0x1626f: 0x40402820, + 0x16270: 0x40402c20, 0x16271: 0xe0001839, 0x16272: 0x40402e20, 0x16273: 0x40403c20, + 0x16274: 0xe000a994, 0x16275: 0x40403220, 0x16276: 0x40403420, 0x16277: 0x40403620, + 0x16278: 0x40403820, 0x16279: 0x40403a20, 0x1627a: 0x40404c20, 0x1627b: 0x40404e20, + 0x1627c: 0xa070f102, 0x1627d: 0x40403c20, 0x1627e: 0x40404a20, 0x1627f: 0x40405620, + // Block 0x58a, offset 0x16280 + 0x16280: 0xa0000000, 0x16281: 0xa0000000, 0x16282: 0xa0000000, 0x16283: 0xa0000000, + 0x16284: 0xa0000000, 0x16285: 0xa0000000, 0x16286: 0xa0000000, 0x16287: 0xa0000000, + 0x16288: 0xa0000000, 0x16289: 0x40020020, 0x1628a: 0x40020220, 0x1628b: 0x40020420, + 0x1628c: 0x40020620, 0x1628d: 0x40020820, 0x1628e: 0xa0000000, 0x1628f: 0xa0000000, + 0x16290: 0xa0000000, 0x16291: 0xa0000000, 0x16292: 0xa0000000, 0x16293: 0xa0000000, + 0x16294: 0xa0000000, 0x16295: 0xa0000000, 0x16296: 0xa0000000, 0x16297: 0xa0000000, + 0x16298: 0xa0000000, 0x16299: 0xa0000000, 0x1629a: 0xa0000000, 0x1629b: 0xa0000000, + 0x1629c: 0xa0000000, 0x1629d: 0xa0000000, 0x1629e: 0xa0000000, 0x1629f: 0xa0000000, + 0x162a0: 0x40021220, 0x162a1: 0x4002ba20, 0x162a2: 0x4003e020, 0x162a3: 0x4004ea20, + 0x162a4: 0x4027de20, 0x162a5: 0x4004ec20, 0x162a6: 0x4004e620, 0x162a7: 0x4003d220, + 0x162a8: 0x4003f420, 0x162a9: 0x4003f620, 0x162aa: 0x4004d820, 0x162ab: 0x40093820, + 0x162ac: 0x40024020, 0x162ad: 0x40021a20, 0x162ae: 0x4002e420, 0x162af: 0x4004e220, + 0x162b0: 0x4029cc20, 0x162b1: 0x4029ce20, 0x162b2: 0x4029d020, 0x162b3: 0x4029d220, + 0x162b4: 0x4029d420, 0x162b5: 0x4029d620, 0x162b6: 0x4029d820, 0x162b7: 0x4029da20, + 0x162b8: 0x4029dc20, 0x162b9: 0x4029de20, 0x162ba: 0x40026c20, 0x162bb: 0x40026220, + 0x162bc: 0x40094020, 0x162bd: 0x40094220, 0x162be: 0x40094420, 0x162bf: 0x4002c420, + // Block 0x58b, offset 0x162c0 + 0x162c0: 0x4004d620, 0x162c1: 0x002bde88, 0x162c2: 0x002c0a88, 0x162c3: 0xcb4c0931, + 0x162c4: 0x002c6288, 0x162c5: 0x002c9888, 0x162c6: 0x002d0888, 0x162c7: 0xcb5040c2, + 0x162c8: 0x002d6888, 0x162c9: 0x002d9a88, 0x162ca: 0x002dcc88, 0x162cb: 0x002dfe88, + 0x162cc: 0xc0030002, 0x162cd: 0x002e8288, 0x162ce: 0x002e9e88, 0x162cf: 0x002ee288, + 0x162d0: 0x002f2c88, 0x162d1: 0x002f5688, 0x162d2: 0x002f7a88, 0x162d3: 0x002fe688, + 0x162d4: 0x00302c88, 0x162d5: 0x00306c88, 0x162d6: 0x0030be88, 0x162d7: 0x0030e288, + 0x162d8: 0x0030f688, 0x162d9: 0x00310088, 0x162da: 0xcb580931, 0x162db: 0x4003f820, + 0x162dc: 0x4004e420, 0x162dd: 0x4003fa20, 0x162de: 0x40062420, 0x162df: 0x40021620, + 0x162e0: 0x40061e20, 0x162e1: 0x402bde20, 0x162e2: 0x402c0a20, 0x162e3: 0xcb4e0931, + 0x162e4: 0x402c6220, 0x162e5: 0x402c9820, 0x162e6: 0x402d0820, 0x162e7: 0xcb5440c2, + 0x162e8: 0x402d6820, 0x162e9: 0x402d9a20, 0x162ea: 0x402dcc20, 0x162eb: 0x402dfe20, + 0x162ec: 0xc0000002, 0x162ed: 0x402e8220, 0x162ee: 0x402e9e20, 0x162ef: 0x402ee220, + 0x162f0: 0x402f2c20, 0x162f1: 0x402f5620, 0x162f2: 0x402f7a20, 0x162f3: 0x402fe620, + 0x162f4: 0x40302c20, 0x162f5: 0x40306c20, 0x162f6: 0x4030be20, 0x162f7: 0x4030e220, + 0x162f8: 0x4030f620, 0x162f9: 0x40310020, 0x162fa: 0xcb5a0931, 0x162fb: 0x4003fc20, + 0x162fc: 0x40094820, 0x162fd: 0x4003fe20, 0x162fe: 0x40094c20, 0x162ff: 0xa0000000, + // Block 0x58c, offset 0x16300 + 0x16300: 0xe0000983, 0x16301: 0xe0000980, 0x16302: 0xe00008fb, 0x16303: 0xe00008f8, + 0x16304: 0xe000097d, 0x16305: 0xe000097a, 0x16306: 0xe0000a38, 0x16307: 0xe0000a35, + 0x16308: 0xe0000a3e, 0x16309: 0xe0000a3b, 0x1630a: 0x402c3820, 0x1630b: 0x002c3883, + 0x1630c: 0xe0000a44, 0x1630d: 0xe0000a41, 0x1630e: 0xe0000a86, 0x1630f: 0xe0000a83, + 0x16310: 0xe0000aaa, 0x16311: 0xe0000aa7, 0x16312: 0xe0000b46, 0x16313: 0xe0000b43, + 0x16314: 0xe0000aee, 0x16315: 0xe0000aeb, 0x16316: 0xe0000b2c, 0x16317: 0xe0000b29, + 0x16318: 0xe0000b40, 0x16319: 0xe0000b3d, 0x1631a: 0xe0000b1a, 0x1631b: 0xe0000b17, + 0x1631c: 0xe0000bb8, 0x1631d: 0xe0000bb5, 0x1631e: 0xe0000bb2, 0x1631f: 0xe0000baf, + 0x16320: 0x402d2020, 0x16321: 0x002d2083, 0x16322: 0xe0000bca, 0x16323: 0xe0000bc7, + 0x16324: 0xe0000bee, 0x16325: 0xe0000beb, 0x16326: 0x402d9820, 0x16327: 0x002d9883, + 0x16328: 0xe0000c51, 0x16329: 0xe0000c4e, 0x1632a: 0xe0000c60, 0x1632b: 0xe0000c5d, + 0x1632c: 0xe0000c31, 0x1632d: 0xe0000c2e, 0x1632e: 0xe0000c5a, 0x1632f: 0xe0000c57, + 0x16330: 0xe0000c54, 0x16331: 0x402da220, 0x16332: 0xf0000a0a, 0x16333: 0xf0000404, + 0x16334: 0xe0000c8a, 0x16335: 0xe0000c87, 0x16336: 0xe0000c9f, 0x16337: 0xe0000c9c, + 0x16338: 0x402f7220, 0x16339: 0xe0000ccc, 0x1633a: 0xe0000cc9, 0x1633b: 0xe0000cd8, + 0x1633c: 0xe0000cd5, 0x1633d: 0xe0000cd2, 0x1633e: 0xe0000ccf, 0x1633f: 0xe0000d04, + // Block 0x58d, offset 0x16340 + 0x16340: 0xe0000cfe, 0x16341: 0xe0000cf8, 0x16342: 0xe0000cf5, 0x16343: 0xe0000d51, + 0x16344: 0xe0000d4e, 0x16345: 0xe0000d6f, 0x16346: 0xe0000d6c, 0x16347: 0xe0000d5d, + 0x16348: 0xe0000d5a, 0x16349: 0xf0000404, 0x1634a: 0x002eda88, 0x1634b: 0x402eda20, + 0x1634c: 0xe0000e2e, 0x1634d: 0xe0000e2b, 0x1634e: 0xe0000da0, 0x1634f: 0xe0000d9d, + 0x16350: 0xe0000de0, 0x16351: 0xe0000ddd, 0x16352: 0xe0000e93, 0x16353: 0xe0000e8f, + 0x16354: 0xe0000eca, 0x16355: 0xe0000ec7, 0x16356: 0xe0000edc, 0x16357: 0xe0000ed9, + 0x16358: 0xe0000ed0, 0x16359: 0xe0000ecd, 0x1635a: 0xe0000f1f, 0x1635b: 0xe0000f1c, + 0x1635c: 0xe0000f2d, 0x1635d: 0xe0000f2a, 0x1635e: 0xe0000f47, 0x1635f: 0xe0000f44, + 0x16360: 0xe0000f33, 0x16361: 0xe0000f30, 0x16362: 0xe0000f99, 0x16363: 0xe0000f96, + 0x16364: 0xe0000f8a, 0x16365: 0xe0000f87, 0x16366: 0x00303688, 0x16367: 0x40303620, + 0x16368: 0xe000102b, 0x16369: 0xe0001028, 0x1636a: 0xe000103f, 0x1636b: 0xe000103c, + 0x1636c: 0xe0000fe7, 0x1636d: 0xe0000fe4, 0x1636e: 0xe0000ff9, 0x1636f: 0xe0000ff6, + 0x16370: 0xe0001025, 0x16371: 0xe0001022, 0x16372: 0xe0001039, 0x16373: 0xe0001036, + 0x16374: 0xe00010d8, 0x16375: 0xe00010d5, 0x16376: 0xe000110e, 0x16377: 0xe000110b, + 0x16378: 0xe0001117, 0x16379: 0xe000113b, 0x1637a: 0xe0001138, 0x1637b: 0x40312820, + 0x1637c: 0x00312883, 0x1637d: 0xe0001147, 0x1637e: 0xe0001144, 0x1637f: 0xe0000f64, + // Block 0x58e, offset 0x16380 + 0x16380: 0xe00009bc, 0x16381: 0xe00009c0, 0x16382: 0x002c3a8b, 0x16383: 0xf0000a04, + 0x16384: 0x40081c20, 0x16385: 0xe0000a5e, 0x16386: 0xe0000a62, 0x16387: 0x002cc28a, + 0x16388: 0x40081e20, 0x16389: 0xf0000a04, 0x1638a: 0x002d2285, 0x1638b: 0x002d688b, + 0x1638c: 0x002d688b, 0x1638d: 0x002d688b, 0x1638e: 0x002d6885, 0x1638f: 0xe000aa06, + 0x16390: 0x002d9a8b, 0x16391: 0x002d9a8b, 0x16392: 0x002e228b, 0x16393: 0x002e2285, + 0x16394: 0x40082020, 0x16395: 0x002e9e8b, 0x16396: 0xf000040a, 0x16397: 0x40082220, + 0x16398: 0x40082420, 0x16399: 0x002f2c8b, 0x1639a: 0x002f568b, 0x1639b: 0x002f7a8b, + 0x1639c: 0x002f7a8b, 0x1639d: 0x002f7a8b, 0x1639e: 0x40082620, 0x1639f: 0x40082820, + 0x163a0: 0xf0001414, 0x163a1: 0xe0000fbd, 0x163a2: 0xf0001414, 0x163a3: 0x40082a20, + 0x163a4: 0x00312a8b, 0x163a5: 0x40082c20, 0x163a6: 0x0032a288, 0x163a7: 0x40082e20, + 0x163a8: 0x00312a8b, 0x163a9: 0x40083020, 0x163aa: 0x002dfe88, 0x163ab: 0xe000094d, + 0x163ac: 0x002c0a8b, 0x163ad: 0x002c3a8b, 0x163ae: 0x40083220, 0x163af: 0x002c9885, + 0x163b0: 0x002c988b, 0x163b1: 0x002d088b, 0x163b2: 0x002d1e88, 0x163b3: 0x002e828b, + 0x163b4: 0x002ee285, 0x163b5: 0x00389084, 0x163b6: 0x00389284, 0x163b7: 0x00389484, + 0x163b8: 0x00389684, 0x163b9: 0x002d9a85, 0x163ba: 0x40083420, 0x163bb: 0xe0000b95, + 0x163bc: 0x00327e85, 0x163bd: 0x00325685, 0x163be: 0x0032568b, 0x163bf: 0x00327e8b, + // Block 0x58f, offset 0x163c0 + 0x163f8: 0xe000aa09, 0x163f9: 0xe0000e97, 0x163fa: 0x4030a820, 0x163fb: 0x402d2020, + 0x163fc: 0x402f4a20, 0x163fd: 0x402e9820, 0x163fe: 0x402db220, 0x163ff: 0x402e9a20, + // Block 0x590, offset 0x16400 + 0x16400: 0xcd3882c1, 0x16401: 0xce0382c1, 0x16402: 0xce0682c1, 0x16403: 0xce0b82c1, + 0x16404: 0xce0e9581, 0x16405: 0xce1182c1, 0x16406: 0xce1482c1, 0x16407: 0xce1782c1, + 0x16408: 0xce1a95e1, 0x16409: 0xce1c82c1, 0x1640a: 0xce1f82c1, 0x1640b: 0xce2282c1, + 0x1640c: 0xce2582c1, 0x1640d: 0xce2882c1, 0x1640e: 0xce2b82c1, 0x1640f: 0xce2e82c1, + 0x16410: 0xce3182c1, 0x16411: 0xcb5c4101, 0x16412: 0xce3482c1, 0x16413: 0xce3782c1, + 0x16414: 0xcb604201, 0x16415: 0xce3a82c1, 0x16416: 0xce3d82c1, 0x16417: 0xce4082c1, + 0x16418: 0xce4382c1, 0x16419: 0xce4682c1, 0x1641a: 0xce4982c1, 0x1641b: 0xce4c82c1, + 0x1641c: 0xcb6442d1, 0x1641d: 0xce4f95e1, 0x1641e: 0xcb6b44d1, 0x1641f: 0xce5182c1, + 0x16420: 0xce5495e1, 0x16421: 0xce5695e1, 0x16422: 0x404ec420, 0x16423: 0xe000aa45, + 0x16424: 0xe000aa4b, 0x16425: 0xcb6f4571, 0x16426: 0xe000aa55, 0x16427: 0xe000aa58, + 0x16428: 0xe000aa5b, 0x16429: 0xcb7245e1, 0x1642a: 0xe000ad32, 0x1642b: 0xcd7c82f1, + 0x1642c: 0xcd3b82f1, 0x1642d: 0xccb17051, 0x1642e: 0x404eea20, 0x1642f: 0xcdbd8bc1, + 0x16430: 0x404ef420, 0x16431: 0xcbeb5561, 0x16432: 0x404f0620, 0x16433: 0x404eec20, + 0x16434: 0x404f0a20, 0x16435: 0x404f0220, 0x16436: 0x404f0c20, 0x16437: 0xce099551, + 0x16438: 0x404f3020, 0x16439: 0x8209278a, 0x1643a: 0x8209278b, 0x1643b: 0xce589611, + 0x1643c: 0xce5c9611, 0x1643d: 0xce609681, 0x1643e: 0x40510e20, 0x1643f: 0xe000aa41, + // Block 0x591, offset 0x16440 + 0x16440: 0xe00001ac, 0x16441: 0xe0000240, 0x16442: 0xe0000358, 0x16443: 0xe0000432, + 0x16444: 0xe0000507, 0x16445: 0xe00005d1, 0x16446: 0xe000069c, 0x16447: 0xe0000744, + 0x16448: 0xe00007f0, 0x16449: 0xe0000895, 0x1644a: 0x40032220, 0x1644b: 0x40032420, + 0x1644c: 0xe000aa19, 0x1644d: 0xe000aa20, 0x1644e: 0xcb694441, 0x1644f: 0xe000aa48, + 0x16450: 0x404ea020, 0x16451: 0x404ea220, 0x16452: 0x404ece20, 0x16453: 0x404ed020, + 0x16454: 0x404ed220, 0x16455: 0x404ed420, 0x16456: 0x404ef620, 0x16457: 0x404ef820, + 0x16458: 0x404efa20, 0x16459: 0x404efc20, 0x1645a: 0x404e2620, 0x1645b: 0x404e3c20, + 0x1645c: 0x404eb820, 0x1645d: 0x404eba20, 0x1645e: 0x40510020, 0x1645f: 0x40510220, + 0x16460: 0x40510820, 0x16461: 0x404e4020, 0x16462: 0x404f0c20, 0x16463: 0x404f1820, + 0x16464: 0x404f1a20, 0x16465: 0x404ea420, 0x16466: 0x404ec020, 0x16467: 0x404f0e20, + 0x16468: 0x404f1020, 0x16469: 0x404f1c20, 0x1646a: 0x404f1e20, 0x1646b: 0x404f2020, + 0x1646c: 0x404f2220, 0x1646d: 0x404f2420, 0x1646e: 0x404e5c20, 0x1646f: 0x404ebc20, + 0x16470: 0x404ebe20, 0x16471: 0x404ee820, 0x16472: 0x404ee220, 0x16473: 0x404ef020, + 0x16474: 0x404ef220, 0x16475: 0x404e1620, 0x16476: 0x404e1a20, 0x16477: 0x404e1e20, + 0x16478: 0x404e2a20, 0x16479: 0x404e3620, 0x1647a: 0x404e4420, 0x1647b: 0x404e6420, + 0x1647c: 0x404e6c20, 0x1647d: 0x404e7620, 0x1647e: 0x404e7820, 0x1647f: 0x404e8020, + // Block 0x592, offset 0x16480 + 0x16480: 0x404e9e20, 0x16481: 0x404eac20, 0x16482: 0x40510c20, 0x16483: 0x404ee020, + 0x16484: 0x404f0020, 0x16485: 0x404f0420, 0x16486: 0x404f1220, 0x16487: 0x404f2620, + 0x16488: 0x404f2a20, 0x16489: 0x404f2e20, 0x1648a: 0x404f3020, 0x1648b: 0x404f2820, + 0x1648c: 0x404f2c20, 0x1648d: 0xadc11302, 0x1648e: 0x404e7c20, 0x1648f: 0x404f3220, + 0x16490: 0xe00001af, 0x16491: 0xe0000243, 0x16492: 0xe000035b, 0x16493: 0xe0000435, + 0x16494: 0xe000050a, 0x16495: 0xe00005d4, 0x16496: 0xe000069f, 0x16497: 0xe0000747, + 0x16498: 0xe00007f3, 0x16499: 0xe0000898, 0x1649a: 0x404f3420, 0x1649b: 0x404f3620, + 0x1649c: 0x404ee420, 0x1649d: 0x404f0820, 0x1649e: 0x4007a820, 0x1649f: 0x4007aa20, + 0x164a0: 0x00379888, 0x164a1: 0x00379c88, 0x164a2: 0x0037a088, 0x164a3: 0x0037a488, + 0x164a4: 0x0037a888, 0x164a5: 0x0037ac88, 0x164a6: 0x0037b088, 0x164a7: 0x0037b888, + 0x164a8: 0x0037bc88, 0x164a9: 0x0037c088, 0x164aa: 0x0037c488, 0x164ab: 0x0037c888, + 0x164ac: 0x0037cc88, 0x164ad: 0x0037d488, 0x164ae: 0x0037d888, 0x164af: 0x0037dc88, + 0x164b0: 0x0037e088, 0x164b1: 0x0037e488, 0x164b2: 0x0037e888, 0x164b3: 0x0037f088, + 0x164b4: 0x0037f488, 0x164b5: 0x0037f888, 0x164b6: 0x0037fc88, 0x164b7: 0x00380088, + 0x164b8: 0x00380488, 0x164b9: 0x00380888, 0x164ba: 0x00380c88, 0x164bb: 0x00381088, + 0x164bc: 0x00381488, 0x164bd: 0x00381888, 0x164be: 0x00381c88, 0x164bf: 0x00382488, + // Block 0x593, offset 0x164c0 + 0x164c0: 0xa0000000, 0x164c1: 0xa0000000, 0x164c2: 0xa0000000, 0x164c3: 0xa0000000, + 0x164c4: 0xa0000000, 0x164c5: 0xa0000000, 0x164c6: 0xa0000000, 0x164c7: 0xa0000000, + 0x164c8: 0xa0000000, 0x164c9: 0x40020020, 0x164ca: 0x40020220, 0x164cb: 0x40020420, + 0x164cc: 0x40020620, 0x164cd: 0x40020820, 0x164ce: 0xa0000000, 0x164cf: 0xa0000000, + 0x164d0: 0xa0000000, 0x164d1: 0xa0000000, 0x164d2: 0xa0000000, 0x164d3: 0xa0000000, + 0x164d4: 0xa0000000, 0x164d5: 0xa0000000, 0x164d6: 0xa0000000, 0x164d7: 0xa0000000, + 0x164d8: 0xa0000000, 0x164d9: 0xa0000000, 0x164da: 0xa0000000, 0x164db: 0xa0000000, + 0x164dc: 0xa0000000, 0x164dd: 0xa0000000, 0x164de: 0xa0000000, 0x164df: 0xa0000000, + 0x164e0: 0x40021220, 0x164e1: 0x4002ba20, 0x164e2: 0x4003e020, 0x164e3: 0x4004ea20, + 0x164e4: 0x4027de20, 0x164e5: 0x4004ec20, 0x164e6: 0x4004e620, 0x164e7: 0x4003d220, + 0x164e8: 0x4003f420, 0x164e9: 0x4003f620, 0x164ea: 0x4004d820, 0x164eb: 0x40093820, + 0x164ec: 0x40024020, 0x164ed: 0x40021a20, 0x164ee: 0x4002e420, 0x164ef: 0x4004e220, + 0x164f0: 0x4029cc20, 0x164f1: 0x4029ce20, 0x164f2: 0x4029d020, 0x164f3: 0x4029d220, + 0x164f4: 0x4029d420, 0x164f5: 0x4029d620, 0x164f6: 0x4029d820, 0x164f7: 0x4029da20, + 0x164f8: 0x4029dc20, 0x164f9: 0x4029de20, 0x164fa: 0x40026c20, 0x164fb: 0x40026220, + 0x164fc: 0x40094020, 0x164fd: 0x40094220, 0x164fe: 0x40094420, 0x164ff: 0x4002c420, + // Block 0x594, offset 0x16500 + 0x16500: 0x4004d620, 0x16501: 0xce660b93, 0x16502: 0x002c0a88, 0x16503: 0x002c3a88, + 0x16504: 0x002c6288, 0x16505: 0xc39e0be1, 0x16506: 0x002d0888, 0x16507: 0x002d2288, + 0x16508: 0x002d6888, 0x16509: 0x002d9a88, 0x1650a: 0x002dcc88, 0x1650b: 0x002dfe88, + 0x1650c: 0xc0030002, 0x1650d: 0x002e8288, 0x1650e: 0x002e9e88, 0x1650f: 0xc3a30b21, + 0x16510: 0x002f2c88, 0x16511: 0x002f5688, 0x16512: 0x002f7a88, 0x16513: 0x002fe688, + 0x16514: 0x00302c88, 0x16515: 0xc3900b21, 0x16516: 0x0030be88, 0x16517: 0x0030e288, + 0x16518: 0x0030f688, 0x16519: 0x00310088, 0x1651a: 0x00312a88, 0x1651b: 0x4003f820, + 0x1651c: 0x4004e420, 0x1651d: 0x4003fa20, 0x1651e: 0x40062420, 0x1651f: 0x40021620, + 0x16520: 0x40061e20, 0x16521: 0xce620b52, 0x16522: 0x402c0a20, 0x16523: 0x402c3a20, + 0x16524: 0x402c6220, 0x16525: 0xc39c0be1, 0x16526: 0x402d0820, 0x16527: 0x402d2220, + 0x16528: 0x402d6820, 0x16529: 0x402d9a20, 0x1652a: 0x402dcc20, 0x1652b: 0x402dfe20, + 0x1652c: 0xc0000002, 0x1652d: 0x402e8220, 0x1652e: 0x402e9e20, 0x1652f: 0xc3a00b21, + 0x16530: 0x402f2c20, 0x16531: 0x402f5620, 0x16532: 0x402f7a20, 0x16533: 0x402fe620, + 0x16534: 0x40302c20, 0x16535: 0xc38d0b21, 0x16536: 0x4030be20, 0x16537: 0x4030e220, + 0x16538: 0x4030f620, 0x16539: 0x40310020, 0x1653a: 0x40312a20, 0x1653b: 0x4003fc20, + 0x1653c: 0x40094820, 0x1653d: 0x4003fe20, 0x1653e: 0x40094c20, 0x1653f: 0xa0000000, + // Block 0x595, offset 0x16540 + 0x16540: 0xa0000000, 0x16541: 0xa0000000, 0x16542: 0xa0000000, 0x16543: 0xa0000000, + 0x16544: 0xa0000000, 0x16545: 0xa0000000, 0x16546: 0xa0000000, 0x16547: 0xa0000000, + 0x16548: 0xa0000000, 0x16549: 0x40020020, 0x1654a: 0x40020220, 0x1654b: 0x40020420, + 0x1654c: 0x40020620, 0x1654d: 0x40020820, 0x1654e: 0xa0000000, 0x1654f: 0xa0000000, + 0x16550: 0xa0000000, 0x16551: 0xa0000000, 0x16552: 0xa0000000, 0x16553: 0xa0000000, + 0x16554: 0xa0000000, 0x16555: 0xa0000000, 0x16556: 0xa0000000, 0x16557: 0xa0000000, + 0x16558: 0xa0000000, 0x16559: 0xa0000000, 0x1655a: 0xa0000000, 0x1655b: 0xa0000000, + 0x1655c: 0xa0000000, 0x1655d: 0xa0000000, 0x1655e: 0xa0000000, 0x1655f: 0xa0000000, + 0x16560: 0x40021220, 0x16561: 0x4002ba20, 0x16562: 0x4003e020, 0x16563: 0x4004ea20, + 0x16564: 0x4027de20, 0x16565: 0x4004ec20, 0x16566: 0x4004e620, 0x16567: 0x4003d220, + 0x16568: 0x4003f420, 0x16569: 0x4003f620, 0x1656a: 0x4004d820, 0x1656b: 0x40093820, + 0x1656c: 0x40024020, 0x1656d: 0x40021a20, 0x1656e: 0x4002e420, 0x1656f: 0x4004e220, + 0x16570: 0x4029cc20, 0x16571: 0x4029ce20, 0x16572: 0x4029d020, 0x16573: 0x4029d220, + 0x16574: 0x4029d420, 0x16575: 0x4029d620, 0x16576: 0x4029d820, 0x16577: 0x4029da20, + 0x16578: 0x4029dc20, 0x16579: 0x4029de20, 0x1657a: 0x40026c20, 0x1657b: 0x40026220, + 0x1657c: 0x40094020, 0x1657d: 0x40094220, 0x1657e: 0x40094420, 0x1657f: 0x4002c420, + // Block 0x596, offset 0x16580 + 0x16580: 0x4004d620, 0x16581: 0x002bde88, 0x16582: 0x002c0a88, 0x16583: 0x002c3a88, + 0x16584: 0x002c6288, 0x16585: 0xce6d2741, 0x16586: 0x002d0888, 0x16587: 0x002d2288, + 0x16588: 0x002d6888, 0x16589: 0x002d9a88, 0x1658a: 0x002dcc88, 0x1658b: 0x002dfe88, + 0x1658c: 0xc0030002, 0x1658d: 0x002e8288, 0x1658e: 0x002e9e88, 0x1658f: 0xc33f2741, + 0x16590: 0x002f2c88, 0x16591: 0x002f5688, 0x16592: 0x002f7a88, 0x16593: 0xc3430991, + 0x16594: 0x00302c88, 0x16595: 0x00306c88, 0x16596: 0x0030be88, 0x16597: 0x0030e288, + 0x16598: 0x0030f688, 0x16599: 0x00310088, 0x1659a: 0x00312a88, 0x1659b: 0x4003f820, + 0x1659c: 0x4004e420, 0x1659d: 0x4003fa20, 0x1659e: 0x40062420, 0x1659f: 0x40021620, + 0x165a0: 0x40061e20, 0x165a1: 0x402bde20, 0x165a2: 0x402c0a20, 0x165a3: 0x402c3a20, + 0x165a4: 0x402c6220, 0x165a5: 0xce6b2741, 0x165a6: 0x402d0820, 0x165a7: 0x402d2220, + 0x165a8: 0x402d6820, 0x165a9: 0x402d9a20, 0x165aa: 0x402dcc20, 0x165ab: 0x402dfe20, + 0x165ac: 0xc0000002, 0x165ad: 0x402e8220, 0x165ae: 0x402e9e20, 0x165af: 0xc33d2741, + 0x165b0: 0x402f2c20, 0x165b1: 0x402f5620, 0x165b2: 0x402f7a20, 0x165b3: 0xc3410991, + 0x165b4: 0x40302c20, 0x165b5: 0x40306c20, 0x165b6: 0x4030be20, 0x165b7: 0x4030e220, + 0x165b8: 0x4030f620, 0x165b9: 0x40310020, 0x165ba: 0x40312a20, 0x165bb: 0x4003fc20, + 0x165bc: 0x40094820, 0x165bd: 0x4003fe20, 0x165be: 0x40094c20, 0x165bf: 0xa0000000, + // Block 0x597, offset 0x165c0 + 0x165c0: 0xe00008f5, 0x165c1: 0xe00008ef, 0x165c2: 0xe0000921, 0x165c3: 0xe0000969, + 0x165c4: 0xe000095b, 0x165c5: 0xe000094d, 0x165c6: 0xe00009dd, 0x165c7: 0xe0000a53, + 0x165c8: 0xe0000ae8, 0x165c9: 0xe0000ae2, 0x165ca: 0x002c9a83, 0x165cb: 0xe0000b20, + 0x165cc: 0xe0000c2b, 0x165cd: 0xe0000c25, 0x165ce: 0xe0000c37, 0x165cf: 0xe0000c43, + 0x165d0: 0xe0000ab3, 0x165d1: 0xe0000d63, 0x165d2: 0xe0000d9a, 0x165d3: 0xe0000d94, + 0x165d4: 0x002ee483, 0x165d5: 0xe0000de6, 0x165d6: 0xe0000dd2, 0x165d7: 0x40093e20, + 0x165d8: 0xe0000e12, 0x165d9: 0xe0000fe1, 0x165da: 0xe0000fdb, 0x165db: 0xe0000fed, + 0x165dc: 0xe0000fff, 0x165dd: 0xe0001102, 0x165de: 0x00318888, 0x165df: 0xe0000f7b, + 0x165e0: 0xe00008f2, 0x165e1: 0xe00008ec, 0x165e2: 0xe000091e, 0x165e3: 0xe0000966, + 0x165e4: 0xe0000958, 0x165e5: 0xe000094a, 0x165e6: 0xe00009d5, 0x165e7: 0xe0000a4d, + 0x165e8: 0xe0000ae5, 0x165e9: 0xe0000adf, 0x165ea: 0x402c9a20, 0x165eb: 0xe0000b1d, + 0x165ec: 0xe0000c28, 0x165ed: 0xe0000c22, 0x165ee: 0xe0000c34, 0x165ef: 0xe0000c40, + 0x165f0: 0xe0000aad, 0x165f1: 0xe0000d60, 0x165f2: 0xe0000d97, 0x165f3: 0xe0000d91, + 0x165f4: 0x402ee420, 0x165f5: 0xe0000de3, 0x165f6: 0xe0000dcf, 0x165f7: 0x40093c20, + 0x165f8: 0xe0000e0f, 0x165f9: 0xe0000fde, 0x165fa: 0xe0000fd8, 0x165fb: 0xe0000fea, + 0x165fc: 0xe0000ffc, 0x165fd: 0xe00010ff, 0x165fe: 0x40318820, 0x165ff: 0xe0001114, + // Block 0x598, offset 0x16600 + 0x16600: 0xe0000cfe, 0x16601: 0xe0000cf8, 0x16602: 0xe0000cf5, 0x16603: 0xe0000d51, + 0x16604: 0xe0000d4e, 0x16605: 0xe0000d6f, 0x16606: 0xe0000d6c, 0x16607: 0xe0000d5d, + 0x16608: 0xe0000d5a, 0x16609: 0xf0000404, 0x1660a: 0x002eda88, 0x1660b: 0x402eda20, + 0x1660c: 0xe0000e2e, 0x1660d: 0xe0000e2b, 0x1660e: 0xe0000da0, 0x1660f: 0xe0000d9d, + 0x16610: 0xe0000de0, 0x16611: 0xe0000ddd, 0x16612: 0xe0000e93, 0x16613: 0xe0000e8f, + 0x16614: 0xe0000eca, 0x16615: 0xe0000ec7, 0x16616: 0xe0000edc, 0x16617: 0xe0000ed9, + 0x16618: 0xe0000ed0, 0x16619: 0xe0000ecd, 0x1661a: 0xe0000f1f, 0x1661b: 0xe0000f1c, + 0x1661c: 0xe0000f2d, 0x1661d: 0xe0000f2a, 0x1661e: 0xe0000f47, 0x1661f: 0xe0000f44, + 0x16620: 0x002fe883, 0x16621: 0x402fe820, 0x16622: 0xe0000f99, 0x16623: 0xe0000f96, + 0x16624: 0xe0000f8a, 0x16625: 0xe0000f87, 0x16626: 0x00303688, 0x16627: 0x40303620, + 0x16628: 0xe000102b, 0x16629: 0xe0001028, 0x1662a: 0xe000103f, 0x1662b: 0xe000103c, + 0x1662c: 0xe0000fe7, 0x1662d: 0xe0000fe4, 0x1662e: 0xe0000ff9, 0x1662f: 0xe0000ff6, + 0x16630: 0xe0001025, 0x16631: 0xe0001022, 0x16632: 0xe0001039, 0x16633: 0xe0001036, + 0x16634: 0xe00010d8, 0x16635: 0xe00010d5, 0x16636: 0xe000110e, 0x16637: 0xe000110b, + 0x16638: 0xe0001117, 0x16639: 0xe000113b, 0x1663a: 0xe0001138, 0x1663b: 0xe000114d, + 0x1663c: 0xe000114a, 0x1663d: 0xe0001147, 0x1663e: 0xe0001144, 0x1663f: 0xe0000f64, + // Block 0x599, offset 0x16640 + 0x16640: 0xe00010d2, 0x16641: 0xe00010cf, 0x16642: 0xe00010cc, 0x16643: 0xe00010c9, + 0x16644: 0xe00010e1, 0x16645: 0xe00010de, 0x16646: 0xe00010e7, 0x16647: 0xe00010e4, + 0x16648: 0xe00010ed, 0x16649: 0xe00010ea, 0x1664a: 0xe00010fc, 0x1664b: 0xe00010f9, + 0x1664c: 0xe00010f6, 0x1664d: 0xe00010f3, 0x1664e: 0xe0001123, 0x1664f: 0xe0001120, + 0x16650: 0xe0001141, 0x16651: 0xe000113e, 0x16652: 0xe0001153, 0x16653: 0xe0001150, + 0x16654: 0xe0001159, 0x16655: 0xe0001156, 0x16656: 0xe0000c15, 0x16657: 0xe0000f8d, + 0x16658: 0xe00010db, 0x16659: 0xe0001111, 0x1665a: 0xf0000404, 0x1665b: 0xe0000f70, + 0x1665c: 0x40300420, 0x1665d: 0x40300620, 0x1665e: 0xe0000f7f, 0x1665f: 0x402c9620, + 0x16660: 0xe000099b, 0x16661: 0xe0000998, 0x16662: 0xe0000989, 0x16663: 0xe0000986, + 0x16664: 0xe0000928, 0x16665: 0xe0000924, 0x16666: 0xe0000930, 0x16667: 0xe000092c, + 0x16668: 0xe0000940, 0x16669: 0xe000093c, 0x1666a: 0xe0000938, 0x1666b: 0xe0000934, + 0x1666c: 0xe00009aa, 0x1666d: 0xe00009a6, 0x1666e: 0xe0000902, 0x1666f: 0xe00008fe, + 0x16670: 0xe000090a, 0x16671: 0xe0000906, 0x16672: 0xe000091a, 0x16673: 0xe0000916, + 0x16674: 0xe0000912, 0x16675: 0xe000090e, 0x16676: 0xe00009a2, 0x16677: 0xe000099e, + 0x16678: 0xe0000b6e, 0x16679: 0xe0000b6b, 0x1667a: 0xe0000b5c, 0x1667b: 0xe0000b59, + 0x1667c: 0xe0000b26, 0x1667d: 0xe0000b23, 0x1667e: 0xe000ad41, 0x1667f: 0xe000ad3e, + // Block 0x59a, offset 0x16680 + 0x16680: 0xe000ad47, 0x16681: 0xe000ad44, 0x16682: 0xe000ad53, 0x16683: 0xe000ad50, + 0x16684: 0xe000ad4d, 0x16685: 0xe000ad4a, 0x16686: 0xe000ad59, 0x16687: 0xe000ad56, + 0x16688: 0xe0000c66, 0x16689: 0xe0000c63, 0x1668a: 0xe0000c78, 0x1668b: 0xe0000c75, + 0x1668c: 0xe0000e84, 0x1668d: 0xe0000e81, 0x1668e: 0xe0000e44, 0x1668f: 0xe0000e41, + 0x16690: 0xe000ad5f, 0x16691: 0xe000ad5c, 0x16692: 0xe000ad65, 0x16693: 0xe000ad62, + 0x16694: 0xe000ad6b, 0x16695: 0xe000ad68, 0x16696: 0xe0002946, 0x16697: 0xe0002943, + 0x16698: 0xe000ad71, 0x16699: 0xe000ad6e, 0x1669a: 0xe0000e5d, 0x1669b: 0xe0000e59, + 0x1669c: 0xe0000e65, 0x1669d: 0xe0000e61, 0x1669e: 0xe0000e75, 0x1669f: 0xe0000e71, + 0x166a0: 0xe0000e6d, 0x166a1: 0xe0000e69, 0x166a2: 0xe0000e7d, 0x166a3: 0xe0000e79, + 0x166a4: 0xe000108d, 0x166a5: 0xe000108a, 0x166a6: 0xe000104d, 0x166a7: 0xe000104a, + 0x166a8: 0xe0001066, 0x166a9: 0xe0001062, 0x166aa: 0xe000106e, 0x166ab: 0xe000106a, + 0x166ac: 0xe000107e, 0x166ad: 0xe000107a, 0x166ae: 0xe0001076, 0x166af: 0xe0001072, + 0x166b0: 0xe0001086, 0x166b1: 0xe0001082, 0x166b2: 0xe0001108, 0x166b3: 0xe0001105, + 0x166b4: 0xe0001135, 0x166b5: 0xe0001132, 0x166b6: 0xe000112f, 0x166b7: 0xe000112c, + 0x166b8: 0xe000111d, 0x166b9: 0xe000111a, 0x166ba: 0xe0000d0a, 0x166bb: 0xe0000d07, + 0x166bc: 0x0030d888, 0x166bd: 0x4030d820, 0x166be: 0x00312088, 0x166bf: 0x40312020, + // Block 0x59b, offset 0x166c0 + 0x166c0: 0xa0000000, 0x166c1: 0xa0000000, 0x166c2: 0xa0000000, 0x166c3: 0xa0000000, + 0x166c4: 0xa0000000, 0x166c5: 0xa0000000, 0x166c6: 0xa0000000, 0x166c7: 0xa0000000, + 0x166c8: 0xa0000000, 0x166c9: 0x40020020, 0x166ca: 0x40020220, 0x166cb: 0x40020420, + 0x166cc: 0x40020620, 0x166cd: 0x40020820, 0x166ce: 0xa0000000, 0x166cf: 0xa0000000, + 0x166d0: 0xa0000000, 0x166d1: 0xa0000000, 0x166d2: 0xa0000000, 0x166d3: 0xa0000000, + 0x166d4: 0xa0000000, 0x166d5: 0xa0000000, 0x166d6: 0xa0000000, 0x166d7: 0xa0000000, + 0x166d8: 0xa0000000, 0x166d9: 0xa0000000, 0x166da: 0xa0000000, 0x166db: 0xa0000000, + 0x166dc: 0xa0000000, 0x166dd: 0xa0000000, 0x166de: 0xa0000000, 0x166df: 0xa0000000, + 0x166e0: 0x40021220, 0x166e1: 0x4002ba20, 0x166e2: 0x4003e020, 0x166e3: 0x4004ea20, + 0x166e4: 0x4027de20, 0x166e5: 0x4004ec20, 0x166e6: 0x4004e620, 0x166e7: 0x4003d220, + 0x166e8: 0x4003f420, 0x166e9: 0x4003f620, 0x166ea: 0x4004d820, 0x166eb: 0x40093820, + 0x166ec: 0x40024020, 0x166ed: 0x40021a20, 0x166ee: 0x4002e420, 0x166ef: 0x4004e220, + 0x166f0: 0x4029cc20, 0x166f1: 0x4029ce20, 0x166f2: 0x4029d020, 0x166f3: 0x4029d220, + 0x166f4: 0x4029d420, 0x166f5: 0x4029d620, 0x166f6: 0x4029d820, 0x166f7: 0x4029da20, + 0x166f8: 0x4029dc20, 0x166f9: 0x4029de20, 0x166fa: 0x40026c20, 0x166fb: 0x40026220, + 0x166fc: 0x40094020, 0x166fd: 0x40094220, 0x166fe: 0x40094420, 0x166ff: 0x4002c420, + // Block 0x59c, offset 0x16700 + 0x16700: 0x4004d620, 0x16701: 0x002bde88, 0x16702: 0x002c0a88, 0x16703: 0xce7109c2, + 0x16704: 0xce7609c2, 0x16705: 0x002c9888, 0x16706: 0x002d0888, 0x16707: 0x002d2288, + 0x16708: 0x002d6888, 0x16709: 0x002d9a88, 0x1670a: 0x002dcc88, 0x1670b: 0xce7b09c2, + 0x1670c: 0xc0030002, 0x1670d: 0x002e8288, 0x1670e: 0xce8026f2, 0x1670f: 0x002ee288, + 0x16710: 0xce8509c2, 0x16711: 0x002f5688, 0x16712: 0x002f7a88, 0x16713: 0xce8a09b1, + 0x16714: 0x00302c88, 0x16715: 0x00306c88, 0x16716: 0x0030be88, 0x16717: 0x0030e288, + 0x16718: 0x0030f688, 0x16719: 0x00310088, 0x1671a: 0x00312a88, 0x1671b: 0x4003f820, + 0x1671c: 0x4004e420, 0x1671d: 0x4003fa20, 0x1671e: 0x40062420, 0x1671f: 0x40021620, + 0x16720: 0x40061e20, 0x16721: 0x402bde20, 0x16722: 0x402c0a20, 0x16723: 0xce6f09b1, + 0x16724: 0xce7409b1, 0x16725: 0x402c9820, 0x16726: 0x402d0820, 0x16727: 0x402d2220, + 0x16728: 0x402d6820, 0x16729: 0x402d9a20, 0x1672a: 0x402dcc20, 0x1672b: 0xce7909b1, + 0x1672c: 0xc0000002, 0x1672d: 0x402e8220, 0x1672e: 0xce7e26e1, 0x1672f: 0x402ee220, + 0x16730: 0xce8309b1, 0x16731: 0x402f5620, 0x16732: 0x402f7a20, 0x16733: 0xce8809b1, + 0x16734: 0x40302c20, 0x16735: 0x40306c20, 0x16736: 0x4030be20, 0x16737: 0x4030e220, + 0x16738: 0x4030f620, 0x16739: 0x40310020, 0x1673a: 0x40312a20, 0x1673b: 0x4003fc20, + 0x1673c: 0x40094820, 0x1673d: 0x4003fe20, 0x1673e: 0x40094c20, 0x1673f: 0xa0000000, + // Block 0x59d, offset 0x16740 + 0x16741: 0x40421220, 0x16742: 0x40421420, 0x16743: 0x40421620, + 0x16745: 0x4041f620, 0x16746: 0x4041f820, 0x16747: 0x4041fa20, + 0x16748: 0x4041fc20, 0x16749: 0x4041fe20, 0x1674a: 0x40420020, 0x1674b: 0x40420220, + 0x1674c: 0x40420620, 0x1674f: 0x40420a20, + 0x16750: 0x40420c20, 0x16753: 0x40420e20, + 0x16754: 0x40421020, 0x16755: 0xce8c96b1, 0x16756: 0x40421420, 0x16757: 0x40421620, + 0x16758: 0x40421820, 0x16759: 0x40421a20, 0x1675a: 0x40421c20, 0x1675b: 0x40421e20, + 0x1675c: 0x40422020, 0x1675d: 0x40422220, 0x1675e: 0x40422420, 0x1675f: 0x40422620, + 0x16760: 0x40422820, 0x16761: 0x40422a20, 0x16762: 0x40422c20, 0x16763: 0x40422e20, + 0x16764: 0x40423020, 0x16765: 0x40423220, 0x16766: 0x40423420, 0x16767: 0x40423620, + 0x16768: 0x40423820, 0x1676a: 0x40423a20, 0x1676b: 0x40423c20, + 0x1676c: 0x40423e20, 0x1676d: 0x40424020, 0x1676e: 0x40424220, 0x1676f: 0x40424420, + 0x16770: 0x40424820, 0x16772: 0x40424a20, 0x16773: 0x40424c20, + 0x16775: 0x40424e20, 0x16776: 0x40425220, 0x16777: 0x40425420, + 0x16778: 0x40425620, 0x16779: 0x40425820, + 0x1677c: 0xa070f102, 0x1677d: 0x40425a20, 0x1677e: 0x40425c20, 0x1677f: 0x40425e20, + // Block 0x59e, offset 0x16780 + 0x16780: 0x40426020, 0x16781: 0x40426220, 0x16782: 0x40426420, 0x16783: 0x40426620, + 0x16784: 0x40426820, 0x16787: 0xc05d01e1, + 0x16788: 0x40427020, 0x1678b: 0x40427220, + 0x1678c: 0x40427420, 0x1678d: 0x8209213b, + 0x16796: 0x40427820, 0x16797: 0x40427a20, + 0x1679c: 0xe000185d, 0x1679d: 0xe0001860, 0x1679f: 0x40424421, + 0x167a0: 0x40420420, 0x167a1: 0x40420820, 0x167a2: 0x40426a20, 0x167a3: 0x40426c20, + 0x167a6: 0xe0000176, 0x167a7: 0xe0000204, + 0x167a8: 0xe000031f, 0x167a9: 0xe00003f9, 0x167aa: 0xe00004d4, 0x167ab: 0xe000059e, + 0x167ac: 0xe0000669, 0x167ad: 0xe0000711, 0x167ae: 0xe00007bd, 0x167af: 0xe0000862, + 0x167b0: 0x40073c20, 0x167b1: 0x40425020, 0x167b2: 0x40283c20, 0x167b3: 0x40283e20, + 0x167b4: 0x40284020, 0x167b5: 0x40284220, 0x167b6: 0x40284420, 0x167b7: 0x40284620, + // Block 0x59f, offset 0x167c0 + 0x167c1: 0xa000f902, 0x167c2: 0xa000f802, 0x167c3: 0xa000f402, + 0x167c5: 0x40410620, 0x167c6: 0x40410820, 0x167c7: 0x40411020, + 0x167c8: 0x40411220, 0x167c9: 0x40410020, 0x167ca: 0x40410220, + 0x167cf: 0x40411420, + 0x167d0: 0x40410a20, 0x167d3: 0x40410420, + 0x167d4: 0x40410c20, 0x167d5: 0x40411c20, 0x167d6: 0x40411e20, 0x167d7: 0x40412020, + 0x167d8: 0x40412220, 0x167d9: 0x40412420, 0x167da: 0x40412620, 0x167db: 0x40412820, + 0x167dc: 0x40412a20, 0x167dd: 0x40412c20, 0x167de: 0x40412e20, 0x167df: 0x40413020, + 0x167e0: 0x40413220, 0x167e1: 0x40413420, 0x167e2: 0x40413620, 0x167e3: 0x40413820, + 0x167e4: 0x40413a20, 0x167e5: 0x40413c20, 0x167e6: 0x40413e20, 0x167e7: 0x40414020, + 0x167e8: 0x40414220, 0x167ea: 0x40414420, 0x167eb: 0x40414620, + 0x167ec: 0x40414820, 0x167ed: 0x40414a20, 0x167ee: 0x40414c20, 0x167ef: 0x40414e20, + 0x167f0: 0x40415220, 0x167f2: 0x40415420, 0x167f3: 0xe000ad83, + 0x167f5: 0x40415620, 0x167f6: 0xe000ad74, + 0x167f8: 0x40411620, 0x167f9: 0x40411820, + 0x167fc: 0xa000fa02, 0x167fe: 0x40415a20, 0x167ff: 0x40415c20, + // Block 0x5a0, offset 0x16800 + 0x16800: 0x40415e20, 0x16801: 0x40416020, 0x16802: 0x40416220, + 0x16807: 0x40416420, + 0x16808: 0x40416620, 0x1680b: 0x40416820, + 0x1680c: 0x40416a20, 0x1680d: 0x40415a20, + 0x16811: 0x40411a20, + 0x16819: 0xe000ad77, 0x1681a: 0xe000ad7a, 0x1681b: 0xe000ad7d, + 0x1681c: 0x40415820, 0x1681e: 0xe000ad80, + 0x16826: 0xe0000170, 0x16827: 0xe00001fe, + 0x16828: 0xe0000319, 0x16829: 0xe00003f3, 0x1682a: 0xe00004ce, 0x1682b: 0xe0000598, + 0x1682c: 0xe0000663, 0x1682d: 0xe000070b, 0x1682e: 0xe00007b7, 0x1682f: 0xe000085c, + 0x16830: 0xa000f702, 0x16831: 0xa000f602, 0x16832: 0x40410e20, 0x16833: 0x4040fe20, + 0x16834: 0x4040fc20, 0x16835: 0x40415020, + // Block 0x5a1, offset 0x16840 + 0x16840: 0xa0000000, 0x16841: 0xa0000000, 0x16842: 0xa0000000, 0x16843: 0xa0000000, + 0x16844: 0xa0000000, 0x16845: 0xa0000000, 0x16846: 0xa0000000, 0x16847: 0xa0000000, + 0x16848: 0xa0000000, 0x16849: 0x40020020, 0x1684a: 0x40020220, 0x1684b: 0x40020420, + 0x1684c: 0x40020620, 0x1684d: 0x40020820, 0x1684e: 0xa0000000, 0x1684f: 0xa0000000, + 0x16850: 0xa0000000, 0x16851: 0xa0000000, 0x16852: 0xa0000000, 0x16853: 0xa0000000, + 0x16854: 0xa0000000, 0x16855: 0xa0000000, 0x16856: 0xa0000000, 0x16857: 0xa0000000, + 0x16858: 0xa0000000, 0x16859: 0xa0000000, 0x1685a: 0xa0000000, 0x1685b: 0xa0000000, + 0x1685c: 0xa0000000, 0x1685d: 0xa0000000, 0x1685e: 0xa0000000, 0x1685f: 0xa0000000, + 0x16860: 0x40021220, 0x16861: 0x4002ba20, 0x16862: 0x4003e020, 0x16863: 0x4004ea20, + 0x16864: 0x4027de20, 0x16865: 0x4004ec20, 0x16866: 0x4004e620, 0x16867: 0x4003d220, + 0x16868: 0x4003f420, 0x16869: 0x4003f620, 0x1686a: 0x4004d820, 0x1686b: 0x40093820, + 0x1686c: 0x40024020, 0x1686d: 0x40021a20, 0x1686e: 0x4002e420, 0x1686f: 0x4004e220, + 0x16870: 0x4029cc20, 0x16871: 0x4029ce20, 0x16872: 0x4029d020, 0x16873: 0x4029d220, + 0x16874: 0x4029d420, 0x16875: 0x4029d620, 0x16876: 0x4029d820, 0x16877: 0x4029da20, + 0x16878: 0x4029dc20, 0x16879: 0x4029de20, 0x1687a: 0x40026c20, 0x1687b: 0x40026220, + 0x1687c: 0x40094020, 0x1687d: 0x40094220, 0x1687e: 0x40094420, 0x1687f: 0x4002c420, + // Block 0x5a2, offset 0x16880 + 0x16880: 0x4004d620, 0x16881: 0xce900be1, 0x16882: 0x002c0a88, 0x16883: 0xc33531e1, + 0x16884: 0x002c6288, 0x16885: 0xce6d0be1, 0x16886: 0x002d0888, 0x16887: 0x002d2288, + 0x16888: 0x002d6888, 0x16889: 0x002d9a88, 0x1688a: 0x002dcc88, 0x1688b: 0x002dfe88, + 0x1688c: 0xc0030002, 0x1688d: 0x002e8288, 0x1688e: 0xc54631e1, 0x1688f: 0xc33f31e1, + 0x16890: 0x002f2c88, 0x16891: 0x002f5688, 0x16892: 0x002f7a88, 0x16893: 0xc34331e1, + 0x16894: 0x00302c88, 0x16895: 0x00306c88, 0x16896: 0x0030be88, 0x16897: 0x0030e288, + 0x16898: 0x0030f688, 0x16899: 0x00310088, 0x1689a: 0xce959711, 0x1689b: 0x4003f820, + 0x1689c: 0x4004e420, 0x1689d: 0x4003fa20, 0x1689e: 0x40062420, 0x1689f: 0x40021620, + 0x168a0: 0x40061e20, 0x168a1: 0xce8e0be1, 0x168a2: 0x402c0a20, 0x168a3: 0xc33331e1, + 0x168a4: 0x402c6220, 0x168a5: 0xce6b0be1, 0x168a6: 0x402d0820, 0x168a7: 0x402d2220, + 0x168a8: 0x402d6820, 0x168a9: 0x402d9a20, 0x168aa: 0x402dcc20, 0x168ab: 0x402dfe20, + 0x168ac: 0xc0000002, 0x168ad: 0x402e8220, 0x168ae: 0xc53331e1, 0x168af: 0xc33d31e1, + 0x168b0: 0x402f2c20, 0x168b1: 0x402f5620, 0x168b2: 0x402f7a20, 0x168b3: 0xc34131e1, + 0x168b4: 0x40302c20, 0x168b5: 0x40306c20, 0x168b6: 0x4030be20, 0x168b7: 0x4030e220, + 0x168b8: 0x4030f620, 0x168b9: 0x40310020, 0x168ba: 0xce929711, 0x168bb: 0x4003fc20, + 0x168bc: 0x40094820, 0x168bd: 0x4003fe20, 0x168be: 0x40094c20, 0x168bf: 0xa0000000, + // Block 0x5a3, offset 0x168c0 + 0x168c0: 0xe00008f5, 0x168c1: 0xe00008ef, 0x168c2: 0xe0000921, 0x168c3: 0xe0000969, + 0x168c4: 0xe000095b, 0x168c5: 0xe000094d, 0x168c6: 0xe00009dd, 0x168c7: 0xe0000a53, + 0x168c8: 0xe0000ae8, 0x168c9: 0xe0000ae2, 0x168ca: 0xe0000af4, 0x168cb: 0xe0000b20, + 0x168cc: 0xe0000c2b, 0x168cd: 0xe0000c25, 0x168ce: 0xe0000c37, 0x168cf: 0xe0000c43, + 0x168d0: 0xe0000ab3, 0x168d1: 0xe0000d63, 0x168d2: 0xe0000d9a, 0x168d3: 0x002ee483, + 0x168d4: 0xe0000da6, 0x168d5: 0xe0000de6, 0x168d6: 0xe0000dd2, 0x168d7: 0x40093e20, + 0x168d8: 0xe0000e12, 0x168d9: 0xe0000fe1, 0x168da: 0xe0000fdb, 0x168db: 0xe0000fed, + 0x168dc: 0xe0000fff, 0x168dd: 0xe0001102, 0x168de: 0x00318888, 0x168df: 0xe0000f7b, + 0x168e0: 0xe00008f2, 0x168e1: 0xe00008ec, 0x168e2: 0xe000091e, 0x168e3: 0xe0000966, + 0x168e4: 0xe0000958, 0x168e5: 0xe000094a, 0x168e6: 0xe00009d5, 0x168e7: 0xe0000a4d, + 0x168e8: 0xe0000ae5, 0x168e9: 0xe0000adf, 0x168ea: 0xe0000af1, 0x168eb: 0xe0000b1d, + 0x168ec: 0xe0000c28, 0x168ed: 0xe0000c22, 0x168ee: 0xe0000c34, 0x168ef: 0xe0000c40, + 0x168f0: 0xe0000aad, 0x168f1: 0xe0000d60, 0x168f2: 0xe0000d97, 0x168f3: 0x402ee420, + 0x168f4: 0xe0000da3, 0x168f5: 0xe0000de3, 0x168f6: 0xe0000dcf, 0x168f7: 0x40093c20, + 0x168f8: 0xe0000e0f, 0x168f9: 0xe0000fde, 0x168fa: 0xe0000fd8, 0x168fb: 0xe0000fea, + 0x168fc: 0xe0000ffc, 0x168fd: 0xe00010ff, 0x168fe: 0x40318820, 0x168ff: 0xe0001114, + // Block 0x5a4, offset 0x16900 + 0x16900: 0xe0000983, 0x16901: 0xe0000980, 0x16902: 0xe00008fb, 0x16903: 0xe00008f8, + 0x16904: 0x002be083, 0x16905: 0x402be020, 0x16906: 0x002c3c83, 0x16907: 0x402c3c20, + 0x16908: 0xe0000a3e, 0x16909: 0xe0000a3b, 0x1690a: 0xe0000a4a, 0x1690b: 0xe0000a47, + 0x1690c: 0xe0000a44, 0x1690d: 0xe0000a41, 0x1690e: 0xe0000a86, 0x1690f: 0xe0000a83, + 0x16910: 0xe0000aaa, 0x16911: 0xe0000aa7, 0x16912: 0xe0000b46, 0x16913: 0xe0000b43, + 0x16914: 0xe0000aee, 0x16915: 0xe0000aeb, 0x16916: 0xe0000b2c, 0x16917: 0xe0000b29, + 0x16918: 0x002c9a83, 0x16919: 0x402c9a20, 0x1691a: 0xe0000b1a, 0x1691b: 0xe0000b17, + 0x1691c: 0xe0000bb8, 0x1691d: 0xe0000bb5, 0x1691e: 0xe0000bb2, 0x1691f: 0xe0000baf, + 0x16920: 0xe0000bc4, 0x16921: 0xe0000bc1, 0x16922: 0xe0000bca, 0x16923: 0xe0000bc7, + 0x16924: 0xe0000bee, 0x16925: 0xe0000beb, 0x16926: 0xe0000c1b, 0x16927: 0xe0000c18, + 0x16928: 0xe0000c51, 0x16929: 0xe0000c4e, 0x1692a: 0xe0000c60, 0x1692b: 0xe0000c5d, + 0x1692c: 0xe0000c31, 0x1692d: 0xe0000c2e, 0x1692e: 0xe0000c5a, 0x1692f: 0xe0000c57, + 0x16930: 0xe0000c54, 0x16931: 0x402da220, 0x16932: 0xf0000a0a, 0x16933: 0xf0000404, + 0x16934: 0xe0000c8a, 0x16935: 0xe0000c87, 0x16936: 0xe0000c9f, 0x16937: 0xe0000c9c, + 0x16938: 0x402f7220, 0x16939: 0xe0000ccc, 0x1693a: 0xe0000cc9, 0x1693b: 0xe0000cd8, + 0x1693c: 0xe0000cd5, 0x1693d: 0xe0000cd2, 0x1693e: 0xe0000ccf, 0x1693f: 0xe0000d04, + // Block 0x5a5, offset 0x16940 + 0x16940: 0xe0000cfe, 0x16941: 0x002e2483, 0x16942: 0x402e2420, 0x16943: 0x002ea083, + 0x16944: 0x402ea020, 0x16945: 0xe0000d6f, 0x16946: 0xe0000d6c, 0x16947: 0xe0000d5d, + 0x16948: 0xe0000d5a, 0x16949: 0xf0000404, 0x1694a: 0x002eda88, 0x1694b: 0x402eda20, + 0x1694c: 0xe0000e2e, 0x1694d: 0xe0000e2b, 0x1694e: 0xe0000da0, 0x1694f: 0xe0000d9d, + 0x16950: 0xe0000de0, 0x16951: 0xe0000ddd, 0x16952: 0xe0000e93, 0x16953: 0xe0000e8f, + 0x16954: 0xe0000eca, 0x16955: 0xe0000ec7, 0x16956: 0xe0000edc, 0x16957: 0xe0000ed9, + 0x16958: 0xe0000ed0, 0x16959: 0xe0000ecd, 0x1695a: 0x002fe883, 0x1695b: 0x402fe820, + 0x1695c: 0xe0000f2d, 0x1695d: 0xe0000f2a, 0x1695e: 0xe0000f47, 0x1695f: 0xe0000f44, + 0x16960: 0xe0000f33, 0x16961: 0xe0000f30, 0x16962: 0xe0000f99, 0x16963: 0xe0000f96, + 0x16964: 0xe0000f8a, 0x16965: 0xe0000f87, 0x16966: 0x00303688, 0x16967: 0x40303620, + 0x16968: 0xe000102b, 0x16969: 0xe0001028, 0x1696a: 0xe000103f, 0x1696b: 0xe000103c, + 0x1696c: 0xe0000fe7, 0x1696d: 0xe0000fe4, 0x1696e: 0xe0000ff9, 0x1696f: 0xe0000ff6, + 0x16970: 0xe0001025, 0x16971: 0xe0001022, 0x16972: 0xe0001039, 0x16973: 0xe0001036, + 0x16974: 0xe00010d8, 0x16975: 0xe00010d5, 0x16976: 0xe000110e, 0x16977: 0xe000110b, + 0x16978: 0xe0001117, 0x16979: 0x00312c83, 0x1697a: 0x40312c20, 0x1697b: 0x00312e83, + 0x1697c: 0x40312e20, 0x1697d: 0xe0001147, 0x1697e: 0xe0001144, 0x1697f: 0xe0000f64, + // Block 0x5a6, offset 0x16980 + 0x16980: 0xe00009b1, 0x16981: 0xe00009ae, 0x16982: 0xe0000a22, 0x16983: 0xe0000a1f, + 0x16984: 0xe0000a28, 0x16985: 0xe0000a25, 0x16986: 0xe0000a2e, 0x16987: 0xe0000a2b, + 0x16988: 0xe000261a, 0x16989: 0xe0002617, 0x1698a: 0xe0000a8c, 0x1698b: 0xe0000a89, + 0x1698c: 0xe0000a98, 0x1698d: 0xe0000a95, 0x1698e: 0xe0000aa4, 0x1698f: 0xe0000aa1, + 0x16990: 0xe0000a92, 0x16991: 0xe0000a8f, 0x16992: 0xe0000a9e, 0x16993: 0xe0000a9b, + 0x16994: 0xe0000b55, 0x16995: 0xe0000b51, 0x16996: 0xe0000b4d, 0x16997: 0xe0000b49, + 0x16998: 0xe0000b7c, 0x16999: 0xe0000b79, 0x1699a: 0xe0000b82, 0x1699b: 0xe0000b7f, + 0x1699c: 0xe0000b39, 0x1699d: 0xe0000b35, 0x1699e: 0xe0000b8c, 0x1699f: 0xe0000b89, + 0x169a0: 0xe0000bd0, 0x169a1: 0xe0000bcd, 0x169a2: 0xe0000c00, 0x169a3: 0xe0000bfd, + 0x169a4: 0xe0000c0c, 0x169a5: 0xe0000c09, 0x169a6: 0xe0000bfa, 0x169a7: 0xe0000bf7, + 0x169a8: 0xe0000c06, 0x169a9: 0xe0000c03, 0x169aa: 0xe0000c12, 0x169ab: 0xe0000c0f, + 0x169ac: 0xe0000c7e, 0x169ad: 0xe0000c7b, 0x169ae: 0xe0000c4a, 0x169af: 0xe0000c46, + 0x169b0: 0xe0000c93, 0x169b1: 0xe0000c90, 0x169b2: 0xe0000cab, 0x169b3: 0xe0000ca8, + 0x169b4: 0xe0000cb1, 0x169b5: 0xe0000cae, 0x169b6: 0xe0000cde, 0x169b7: 0xe0000cdb, + 0x169b8: 0xe0000ce5, 0x169b9: 0xe0000ce1, 0x169ba: 0xe0000cf2, 0x169bb: 0xe0000cef, + 0x169bc: 0xe0000cec, 0x169bd: 0xe0000ce9, 0x169be: 0xe0000d1e, 0x169bf: 0xe0000d1b, + // Block 0x5a7, offset 0x169c0 + 0x169c0: 0xe0000d24, 0x169c1: 0xe0000d21, 0x169c2: 0xe0000d2a, 0x169c3: 0xe0000d27, + 0x169c4: 0xe0000d69, 0x169c5: 0xe0000d66, 0x169c6: 0xe0000d7b, 0x169c7: 0xe0000d78, + 0x169c8: 0xe0000d87, 0x169c9: 0xe0000d84, 0x169ca: 0xe0000d81, 0x169cb: 0xe0000d7e, + 0x169cc: 0xe0002946, 0x169cd: 0xe0002943, 0x169ce: 0xe0000df5, 0x169cf: 0xe0000df1, + 0x169d0: 0xe0000e3d, 0x169d1: 0xe0000e39, 0x169d2: 0xe000294c, 0x169d3: 0xe0002949, + 0x169d4: 0xe0000ea7, 0x169d5: 0xe0000ea4, 0x169d6: 0xe0000ead, 0x169d7: 0xe0000eaa, + 0x169d8: 0xe0000ed6, 0x169d9: 0xe0000ed3, 0x169da: 0xe0000ef4, 0x169db: 0xe0000ef1, + 0x169dc: 0xe0000efb, 0x169dd: 0xe0000ef7, 0x169de: 0xe0000f02, 0x169df: 0xe0000eff, + 0x169e0: 0xe0000f41, 0x169e1: 0xe0000f3e, 0x169e2: 0xe0000f53, 0x169e3: 0xe0000f50, + 0x169e4: 0xe000296a, 0x169e5: 0xe0002967, 0x169e6: 0xe0000f3a, 0x169e7: 0xe0000f36, + 0x169e8: 0xe0000f5a, 0x169e9: 0xe0000f56, 0x169ea: 0xe0000f93, 0x169eb: 0xe0000f90, + 0x169ec: 0xe0000f9f, 0x169ed: 0xe0000f9c, 0x169ee: 0xe0000fb1, 0x169ef: 0xe0000fae, + 0x169f0: 0xe0000fab, 0x169f1: 0xe0000fa8, 0x169f2: 0xe0001093, 0x169f3: 0xe0001090, + 0x169f4: 0xe000109f, 0x169f5: 0xe000109c, 0x169f6: 0xe0001099, 0x169f7: 0xe0001096, + 0x169f8: 0xe0001032, 0x169f9: 0xe000102e, 0x169fa: 0xe0001046, 0x169fb: 0xe0001042, + 0x169fc: 0xe00010a9, 0x169fd: 0xe00010a6, 0x169fe: 0xe00010af, 0x169ff: 0xe00010ac, + // Block 0x5a8, offset 0x16a00 + 0x16a00: 0xe0000b03, 0x16a01: 0xe0000aff, 0x16a02: 0xe0000b13, 0x16a03: 0xe0000b0f, + 0x16a04: 0xe0000b0b, 0x16a05: 0xe0000b07, 0x16a06: 0xe0000b75, 0x16a07: 0xe0000b71, + 0x16a08: 0xe0000c66, 0x16a09: 0xe0000c63, 0x16a0a: 0xe0000c78, 0x16a0b: 0xe0000c75, + 0x16a0c: 0xe0000e84, 0x16a0d: 0xe0000e81, 0x16a0e: 0xe0000e44, 0x16a0f: 0xe0000e41, + 0x16a10: 0xe0003c96, 0x16a11: 0xe0003c93, 0x16a12: 0xe0000db5, 0x16a13: 0xe0000db1, + 0x16a14: 0xe0000dc5, 0x16a15: 0xe0000dc1, 0x16a16: 0xe0000dbd, 0x16a17: 0xe0000db9, + 0x16a18: 0xe0000e8b, 0x16a19: 0xe0000e87, 0x16a1a: 0xe0003c9c, 0x16a1b: 0xe0003c99, + 0x16a1c: 0xe0000e65, 0x16a1d: 0xe0000e61, 0x16a1e: 0xe0000e75, 0x16a1f: 0xe0000e71, + 0x16a20: 0xe0000e6d, 0x16a21: 0xe0000e69, 0x16a22: 0xe0000e7d, 0x16a23: 0xe0000e79, + 0x16a24: 0xe000108d, 0x16a25: 0xe000108a, 0x16a26: 0xe000104d, 0x16a27: 0xe000104a, + 0x16a28: 0xe0001066, 0x16a29: 0xe0001062, 0x16a2a: 0xe000106e, 0x16a2b: 0xe000106a, + 0x16a2c: 0xe000107e, 0x16a2d: 0xe000107a, 0x16a2e: 0xe0001076, 0x16a2f: 0xe0001072, + 0x16a30: 0xe0001086, 0x16a31: 0xe0001082, 0x16a32: 0xe0001108, 0x16a33: 0xe0001105, + 0x16a34: 0xe0001135, 0x16a35: 0xe0001132, 0x16a36: 0xe000112f, 0x16a37: 0xe000112c, + 0x16a38: 0xe000111d, 0x16a39: 0xe000111a, 0x16a3a: 0xe0000d0a, 0x16a3b: 0xe0000d07, + 0x16a3c: 0x0030d888, 0x16a3d: 0x4030d820, 0x16a3e: 0x00312088, 0x16a3f: 0x40312020, + // Block 0x5a9, offset 0x16a40 + 0x16a40: 0xa0000000, 0x16a41: 0xa0000000, 0x16a42: 0xa0000000, 0x16a43: 0xa0000000, + 0x16a44: 0xa0000000, 0x16a46: 0x40096620, 0x16a47: 0x40096a20, + 0x16a48: 0x40070820, 0x16a49: 0x4004f220, 0x16a4a: 0x4004f620, 0x16a4b: 0x4027e620, + 0x16a4c: 0x40024820, 0x16a4d: 0x40024a20, 0x16a4e: 0x40070e20, 0x16a4f: 0x40071020, + 0x16a50: 0xae600000, 0x16a51: 0xae600000, 0x16a52: 0xae600000, 0x16a53: 0xae600000, + 0x16a54: 0xae600000, 0x16a55: 0xae600000, 0x16a56: 0xae600000, 0x16a57: 0xae600000, + 0x16a58: 0xa1e00000, 0x16a59: 0xa1f00000, 0x16a5a: 0xa2000000, 0x16a5b: 0x40026420, + 0x16a5e: 0x40027020, 0x16a5f: 0x4002cc20, + 0x16a60: 0x403aa220, 0x16a61: 0x40393a20, 0x16a62: 0x40393620, 0x16a63: 0x40393821, + 0x16a64: 0x403a7421, 0x16a65: 0x40393824, 0x16a66: 0x003a9344, 0x16a67: 0xce980151, + 0x16a68: 0x40393c20, 0x16a69: 0x403a6824, 0x16a6a: 0x40395620, 0x16a6b: 0x40395820, + 0x16a6c: 0x40396420, 0x16a6d: 0xce9c0171, 0x16a6e: 0x40397420, 0x16a6f: 0x40398820, + 0x16a70: 0x40398a20, 0x16a71: 0x4039a420, 0x16a72: 0x4039a620, 0x16a73: 0x4039c620, + 0x16a74: 0x4039c820, 0x16a75: 0x4039dc20, 0x16a76: 0x4039de20, 0x16a77: 0x4039e620, + 0x16a78: 0x4039e820, 0x16a79: 0x4039ee20, 0x16a7a: 0x4039f020, 0x16a7b: 0x403a3820, + 0x16a7c: 0x403a3a20, 0x16a7d: 0x403a9c20, 0x16a7e: 0x403a9e20, 0x16a7f: 0x403aa020, + // Block 0x5aa, offset 0x16a80 + 0x16a80: 0xa0000000, 0x16a81: 0x4039fc20, 0x16a82: 0x403a1220, 0x16a83: 0x403a1c22, + 0x16a84: 0x403a4020, 0x16a85: 0x403a4e20, 0x16a86: 0x403a5620, 0x16a87: 0xcea00171, + 0x16a88: 0xcea20171, 0x16a89: 0xcea60171, 0x16a8a: 0xcea80171, 0x16a8b: 0xa000b002, + 0x16a8c: 0xa000b202, 0x16a8d: 0xa000b102, 0x16a8e: 0xa1e0ad02, 0x16a8f: 0xa000af02, + 0x16a90: 0xa000ae02, 0x16a91: 0xa210ba02, 0x16a92: 0xa220bc02, 0x16a93: 0xae60bd02, + 0x16a94: 0xae60be02, 0x16a95: 0xadc0bf02, 0x16a96: 0xadc0c102, 0x16a97: 0xae60c202, + 0x16a98: 0xae60c302, 0x16a99: 0xae60c402, 0x16a9a: 0xae60c502, 0x16a9b: 0xae60c602, + 0x16a9c: 0xadc0c702, 0x16a9d: 0xae60c802, 0x16a9e: 0xae60c902, 0x16a9f: 0xadc0c002, + 0x16aa0: 0xe000015e, 0x16aa1: 0xe00001e6, 0x16aa2: 0xe0000301, 0x16aa3: 0xe00003db, + 0x16aa4: 0xe00004b6, 0x16aa5: 0xe0000580, 0x16aa6: 0xe000064b, 0x16aa7: 0xe00006f3, + 0x16aa8: 0xe000079f, 0x16aa9: 0xe0000844, 0x16aaa: 0x4004ee20, 0x16aab: 0x40024c20, + 0x16aac: 0x40024e20, 0x16aad: 0x4004de20, 0x16aae: 0x40393a20, 0x16aaf: 0x403a1020, + 0x16ab0: 0xa230d102, 0x16ab1: 0x40393823, 0x16ab2: 0x40393822, 0x16ab3: 0x40393825, + 0x16ab4: 0x00391c84, 0x16ab5: 0xf0000404, 0x16ab6: 0xf0000404, 0x16ab7: 0xe000ad89, + 0x16ab8: 0xe0003780, 0x16ab9: 0x40395821, 0x16aba: 0x40395c20, 0x16abb: 0x40393e20, + 0x16abc: 0x40395820, 0x16abd: 0x40396020, 0x16abe: 0x40394020, 0x16abf: 0x40396220, + // Block 0x5ab, offset 0x16ac0 + 0x16ac0: 0x40394220, 0x16ac1: 0x40396620, 0x16ac2: 0x40397820, 0x16ac3: 0x40396620, + 0x16ac4: 0x40396820, 0x16ac5: 0x40396c20, 0x16ac6: 0x40396a20, 0x16ac7: 0x40396e20, + 0x16ac8: 0x40398a21, 0x16ac9: 0x40398a20, 0x16aca: 0x40399020, 0x16acb: 0x40399220, + 0x16acc: 0x40399420, 0x16acd: 0x40399620, 0x16ace: 0x40399820, 0x16acf: 0x40399a20, + 0x16ad0: 0x40399c20, 0x16ad1: 0x4039a621, 0x16ad2: 0x4039aa20, 0x16ad3: 0x4039a620, + 0x16ad4: 0x4039ae20, 0x16ad5: 0x4039b020, 0x16ad6: 0x4039b820, 0x16ad7: 0x4039b420, + 0x16ad8: 0x4039b620, 0x16ad9: 0x4039b820, 0x16ada: 0x4039ca20, 0x16adb: 0x4039cc20, + 0x16adc: 0x4039ce20, 0x16add: 0x4039e020, 0x16ade: 0x4039e220, 0x16adf: 0x4039ea20, + 0x16ae0: 0x4039f220, 0x16ae1: 0x4039fe20, 0x16ae2: 0x403a0020, 0x16ae3: 0x403a0220, + 0x16ae4: 0x403a0420, 0x16ae5: 0x403a0820, 0x16ae6: 0x403a0a20, 0x16ae7: 0x403a1420, + 0x16ae8: 0x403a1620, 0x16ae9: 0x403a1c20, 0x16aea: 0x403a1c21, 0x16aeb: 0x403a2020, + 0x16aec: 0x403a2220, 0x16aed: 0x403a2620, 0x16aee: 0x403a2820, 0x16aef: 0x403a2021, + 0x16af0: 0x403a2c20, 0x16af1: 0x403a2e20, 0x16af2: 0x403a3020, 0x16af3: 0x403a3220, + 0x16af4: 0x403a3420, 0x16af5: 0x403a4220, 0x16af6: 0x403a4420, 0x16af7: 0x403a4620, + 0x16af8: 0x403a4820, 0x16af9: 0x403a6020, 0x16afa: 0x403a5820, 0x16afb: 0x403a5c21, + 0x16afc: 0x403a5c20, 0x16afd: 0x403a5e20, 0x16afe: 0x403a6823, 0x16aff: 0x40396c20, + // Block 0x5ac, offset 0x16b00 + 0x16b00: 0x003a6883, 0x16b01: 0x403a6822, 0x16b02: 0xe000ad86, 0x16b03: 0x403a6825, + 0x16b04: 0x403a7620, 0x16b05: 0x403a7820, 0x16b06: 0x403a7a20, 0x16b07: 0x403a7422, + 0x16b08: 0x403a7e20, 0x16b09: 0x403a7423, 0x16b0a: 0x403a8220, 0x16b0b: 0x403a8420, + 0x16b0c: 0xcea40171, 0x16b0d: 0x403a9225, 0x16b0e: 0x403a9620, 0x16b0f: 0x403a8620, + 0x16b10: 0x403a9224, 0x16b11: 0x403a9a20, 0x16b12: 0x403a9222, 0x16b13: 0xe00037b6, + 0x16b14: 0x4002e820, 0x16b15: 0xce9e0171, 0x16b16: 0xae600000, 0x16b17: 0xae600000, + 0x16b18: 0xae600000, 0x16b19: 0xae600000, 0x16b1a: 0xae600000, 0x16b1b: 0xae600000, + 0x16b1c: 0xae600000, 0x16b1d: 0xa0000000, 0x16b1e: 0x40071220, 0x16b1f: 0xae600000, + 0x16b20: 0xae600000, 0x16b21: 0xae600000, 0x16b22: 0xae600000, 0x16b23: 0xadc00000, + 0x16b24: 0xae600000, 0x16b25: 0x003a7484, 0x16b26: 0x003a9084, 0x16b27: 0xae600000, + 0x16b28: 0xae600000, 0x16b29: 0x40071420, 0x16b2a: 0xadc00000, 0x16b2b: 0xae600000, + 0x16b2c: 0xae600000, 0x16b2d: 0xadc00000, 0x16b2e: 0x40399e20, 0x16b2f: 0x4039ba20, + 0x16b30: 0xe0000161, 0x16b31: 0xe00001e9, 0x16b32: 0xe0000304, 0x16b33: 0xe00003de, + 0x16b34: 0xe00004b9, 0x16b35: 0xe0000583, 0x16b36: 0xe000064e, 0x16b37: 0xe00006f6, + 0x16b38: 0xe00007a2, 0x16b39: 0xe0000847, 0x16b3a: 0x4039d020, 0x16b3b: 0x4039e420, + 0x16b3c: 0x4039f420, 0x16b3d: 0xe0001553, 0x16b3e: 0xe0001779, 0x16b3f: 0x403a7020, + // Block 0x5ad, offset 0x16b40 + 0x16b40: 0x00021284, 0x16b41: 0x00021284, 0x16b42: 0x00021284, 0x16b43: 0x00021284, + 0x16b44: 0x00021284, 0x16b45: 0x00021284, 0x16b46: 0x00021284, 0x16b47: 0x0002129b, + 0x16b48: 0x00021284, 0x16b49: 0x00021284, 0x16b4a: 0x00021284, 0x16b4b: 0xa0000000, + 0x16b4c: 0x40021221, 0x16b4d: 0x40021222, 0x16b4e: 0xa0000000, 0x16b4f: 0xa0000000, + 0x16b50: 0x40022620, 0x16b51: 0x0002269b, 0x16b52: 0x40022820, 0x16b53: 0x40022a20, + 0x16b54: 0x40022c20, 0x16b55: 0x40022e20, 0x16b56: 0x4004c420, 0x16b57: 0x40021820, + 0x16b58: 0x4003d420, 0x16b59: 0x4003d620, 0x16b5a: 0x4003d820, 0x16b5b: 0x4003da20, + 0x16b5c: 0x4003e220, 0x16b5d: 0x4003e420, 0x16b5e: 0x4003e620, 0x16b5f: 0x4003e820, + 0x16b60: 0x4004f820, 0x16b61: 0x4004fa20, 0x16b62: 0x40050220, 0x16b63: 0x40050420, + 0x16b64: 0x0002e484, 0x16b65: 0xf0001f04, 0x16b66: 0xf0000404, 0x16b67: 0x40050620, + 0x16b68: 0x40020e20, 0x16b69: 0x40021020, 0x16b6a: 0xa0000000, 0x16b6b: 0xa0000000, + 0x16b6c: 0xa0000000, 0x16b6d: 0xa0000000, 0x16b6e: 0xa0000000, 0x16b6f: 0x0002129b, + 0x16b70: 0x4004f020, 0x16b71: 0x4004f420, 0x16b72: 0x40050e20, 0x16b73: 0xf0001f04, + 0x16b74: 0xf0000404, 0x16b75: 0x40051020, 0x16b76: 0xf0001f04, 0x16b77: 0xf0000404, + 0x16b78: 0x40051620, 0x16b79: 0x4003dc20, 0x16b7a: 0x4003de20, 0x16b7b: 0x40051820, + 0x16b7c: 0xf0001f04, 0x16b7d: 0x4002e020, 0x16b7e: 0x40021420, 0x16b7f: 0x40051a20, + // Block 0x5ae, offset 0x16b80 + 0x16b80: 0x40073420, 0x16b81: 0x40073620, + 0x16b93: 0x003a269a, + 0x16b94: 0x003a2699, 0x16b95: 0x003a2697, 0x16b96: 0x003a2698, 0x16b97: 0x003a7c9a, + 0x16b98: 0x003a7c99, 0x16b99: 0x003a7a9a, 0x16b9a: 0x003a7a99, 0x16b9b: 0x003a7e9a, + 0x16b9c: 0x003a7e99, 0x16b9d: 0xe000ad8c, 0x16b9e: 0x003a849a, 0x16b9f: 0x003a8499, + 0x16ba0: 0x003a789a, 0x16ba1: 0x003a7899, 0x16ba2: 0x003a809a, 0x16ba3: 0x003a8099, + 0x16ba4: 0x003a989a, 0x16ba5: 0x003a9899, 0x16ba6: 0x003a9897, 0x16ba7: 0x003a9898, + 0x16ba8: 0x003a8e97, 0x16ba9: 0x003a8e98, 0x16baa: 0xe0001559, 0x16bab: 0xe0001556, + 0x16bac: 0xe0001589, 0x16bad: 0xe0001586, 0x16bae: 0xe000158f, 0x16baf: 0xe000158c, + 0x16bb0: 0xe000159b, 0x16bb1: 0xe0001598, 0x16bb2: 0xe0001595, 0x16bb3: 0xe0001592, + 0x16bb4: 0xe00015a1, 0x16bb5: 0xe000159e, 0x16bb6: 0xe00015bf, 0x16bb7: 0xe00015bc, + 0x16bb8: 0xe00015b9, 0x16bb9: 0xe00015ad, 0x16bba: 0xe00015a7, 0x16bbb: 0xe00015a4, + 0x16bbc: 0x003a929a, 0x16bbd: 0x003a9299, 0x16bbe: 0x003a9297, 0x16bbf: 0x003a9298, + // Block 0x5af, offset 0x16bc0 + 0x16bc0: 0xf0001a1a, 0x16bc1: 0xf0001a1a, 0x16bc2: 0xf0001a1a, 0x16bc3: 0xe00028f4, + 0x16bc4: 0xe000374d, 0x16bc5: 0xf0001a1a, 0x16bc6: 0xf0001a1a, 0x16bc7: 0xf0001a1a, + 0x16bc8: 0xf0001a1a, 0x16bc9: 0xe00028f7, 0x16bca: 0xe0003750, 0x16bcb: 0xf0001a1a, + 0x16bcc: 0xf0001a1a, 0x16bcd: 0xf0001a1a, 0x16bce: 0xf0001a1a, 0x16bcf: 0xe00028fd, + 0x16bd0: 0xe000375c, 0x16bd1: 0xf0001a1a, 0x16bd2: 0xf0001a1a, 0x16bd3: 0xe0002900, + 0x16bd4: 0xe000376e, 0x16bd5: 0xe0003786, 0x16bd6: 0xe000378c, 0x16bd7: 0xe0003792, + 0x16bd8: 0xe00037a4, 0x16bd9: 0xe0002906, 0x16bda: 0xe00037b3, 0x16bdb: 0xf0001a1a, + 0x16bdc: 0xf0001a1a, 0x16bdd: 0xe000377d, 0x16bde: 0xe0000003, 0x16bdf: 0xe0000006, + 0x16be0: 0xe0000009, 0x16be1: 0xe000000c, 0x16be2: 0xe000000f, 0x16be3: 0xe0000012, + 0x16be4: 0xe000156b, 0x16be5: 0xe000156e, 0x16be6: 0xe0001577, 0x16be7: 0xe000157d, + 0x16be8: 0xe00015aa, 0x16be9: 0xe00015b3, 0x16bea: 0xf0001919, 0x16beb: 0xf0001919, + 0x16bec: 0xf0001919, 0x16bed: 0xf0001919, 0x16bee: 0xe0002891, 0x16bef: 0xe00036a2, + 0x16bf0: 0xf0001919, 0x16bf1: 0xf0001919, 0x16bf2: 0xf0001919, 0x16bf3: 0xf0001919, + 0x16bf4: 0xe0002897, 0x16bf5: 0xe00036ae, 0x16bf6: 0xf0001919, 0x16bf7: 0xf0001919, + 0x16bf8: 0xf0001919, 0x16bf9: 0xf0001919, 0x16bfa: 0xe000289d, 0x16bfb: 0xe00036b7, + 0x16bfc: 0xe00028df, 0x16bfd: 0xe0003705, 0x16bfe: 0xe00028e5, 0x16bff: 0xe000370b, + // Block 0x5b0, offset 0x16c00 + 0x16c00: 0xe0003711, 0x16c01: 0xe000372f, 0x16c02: 0xe000373b, 0x16c03: 0xe00028eb, + 0x16c04: 0xe0003741, 0x16c05: 0xf0001919, 0x16c06: 0xe00028f1, 0x16c07: 0xe000374a, + 0x16c08: 0xf0001919, 0x16c09: 0xf0001919, 0x16c0a: 0xf0001919, 0x16c0b: 0xf0001919, + 0x16c0c: 0xf0001919, 0x16c0d: 0xf0001919, 0x16c0e: 0xe00028fa, 0x16c0f: 0xe0003759, + 0x16c10: 0xe000377a, 0x16c11: 0xe0003795, 0x16c12: 0xe0003798, 0x16c13: 0xe00037a1, + 0x16c14: 0xe00037a7, 0x16c15: 0xe0002903, 0x16c16: 0xe00037b0, 0x16c17: 0xe000155c, + 0x16c18: 0xe0001562, 0x16c19: 0xe0001568, 0x16c1a: 0xe0001571, 0x16c1b: 0xe0001580, + 0x16c1c: 0xf0001717, 0x16c1d: 0xf0001717, 0x16c1e: 0xf0001717, 0x16c1f: 0xf0001717, + 0x16c20: 0xf0001717, 0x16c21: 0xf0001717, 0x16c22: 0xf0001717, 0x16c23: 0xf0001717, + 0x16c24: 0xf0001717, 0x16c25: 0xf0001717, 0x16c26: 0xf0001717, 0x16c27: 0xf0001717, + 0x16c28: 0xf0001717, 0x16c29: 0xf0001717, 0x16c2a: 0xf0001717, 0x16c2b: 0xf0001717, + 0x16c2c: 0xf0001717, 0x16c2d: 0xf0001717, 0x16c2e: 0xf0001717, 0x16c2f: 0xf0001717, + 0x16c30: 0xf0001717, 0x16c31: 0xf0001717, 0x16c32: 0xf0001717, 0x16c33: 0xf0001717, + 0x16c34: 0xf0001717, 0x16c35: 0xf0001717, 0x16c36: 0xf0001717, 0x16c37: 0xf0001717, + 0x16c38: 0xf0001717, 0x16c39: 0xf0001717, 0x16c3a: 0xf0001717, 0x16c3b: 0xf0001717, + 0x16c3c: 0xf0001717, 0x16c3d: 0xf0001717, 0x16c3e: 0xf0001717, 0x16c3f: 0xf0001717, + // Block 0x5b1, offset 0x16c40 + 0x16c40: 0xf0001717, 0x16c41: 0xf0001717, 0x16c42: 0xf0001717, 0x16c43: 0xf0001717, + 0x16c44: 0xe0003717, 0x16c45: 0xe000371d, 0x16c46: 0xe0003723, 0x16c47: 0xe0003729, + 0x16c48: 0xe0003735, 0x16c49: 0xf0001717, 0x16c4a: 0xf0001717, 0x16c4b: 0xf0001717, + 0x16c4c: 0xf0001717, 0x16c4d: 0xf0001717, 0x16c4e: 0xf0001717, 0x16c4f: 0xf0001717, + 0x16c50: 0xf0001717, 0x16c51: 0xf0001717, 0x16c52: 0xf0001717, 0x16c53: 0xf0001717, + 0x16c54: 0xf0001717, 0x16c55: 0xf0001717, 0x16c56: 0xf0001717, 0x16c57: 0xf0001717, + 0x16c58: 0xf0001717, 0x16c59: 0xf0001717, 0x16c5a: 0xe0003783, 0x16c5b: 0xe0003789, + 0x16c5c: 0xe000378f, 0x16c5d: 0xe000379b, 0x16c5e: 0xe00037aa, 0x16c5f: 0xe0001574, + 0x16c60: 0xe0001583, 0x16c61: 0xf0001818, 0x16c62: 0xf0001818, 0x16c63: 0xf0001818, + 0x16c64: 0xf0001818, 0x16c65: 0xf0001818, 0x16c66: 0xf0001818, 0x16c67: 0xf0001818, + 0x16c68: 0xf0001818, 0x16c69: 0xf0001818, 0x16c6a: 0xf0001818, 0x16c6b: 0xe000372c, + 0x16c6c: 0xe0003738, 0x16c6d: 0xf0001818, 0x16c6e: 0xf0001818, 0x16c6f: 0xf0001818, + 0x16c70: 0xe000379e, 0x16c71: 0xe00037ad, 0x16c72: 0xf0001818, 0x16c73: 0xe0003690, + 0x16c74: 0xe0003693, 0x16c75: 0xe00028d0, 0x16c76: 0xe00036f6, 0x16c77: 0xe00028d6, + 0x16c78: 0xe00036fc, 0x16c79: 0xe00028dc, 0x16c7a: 0xe0003702, 0x16c7b: 0xe00028b8, + 0x16c7c: 0xe00036d8, 0x16c7d: 0xe00028be, 0x16c7e: 0xe00036e4, 0x16c7f: 0xe00028ac, + // Block 0x5b2, offset 0x16c80 + 0x16c80: 0xe00036c6, 0x16c81: 0xe00028a6, 0x16c82: 0xe00036c0, 0x16c83: 0xe00028b2, + 0x16c84: 0xe00036cc, 0x16c85: 0xe00028c4, 0x16c86: 0xe00036ea, 0x16c87: 0xe00028ca, + 0x16c88: 0xe00036f0, 0x16c89: 0xf0001a1a, 0x16c8a: 0xf0001a1a, 0x16c8b: 0xf0001a1a, + 0x16c8c: 0xf0001a1a, 0x16c8d: 0xf0001a1a, 0x16c8e: 0xf0001a1a, 0x16c8f: 0xf0001a1a, + 0x16c90: 0xf0001a1a, 0x16c91: 0xe00028cd, 0x16c92: 0xe00036f3, 0x16c93: 0xe00028d3, + 0x16c94: 0xe00036f9, 0x16c95: 0xe00028d9, 0x16c96: 0xe00036ff, 0x16c97: 0xe00028b5, + 0x16c98: 0xe00036d5, 0x16c99: 0xe00028bb, 0x16c9a: 0xe00036e1, 0x16c9b: 0xe00028a9, + 0x16c9c: 0xe00036c3, 0x16c9d: 0xe00028a3, 0x16c9e: 0xe00036bd, 0x16c9f: 0xe00028af, + 0x16ca0: 0xe00036c9, 0x16ca1: 0xe00028c1, 0x16ca2: 0xe00036e7, 0x16ca3: 0xe00028c7, + 0x16ca4: 0xe00036ed, 0x16ca5: 0xf0001919, 0x16ca6: 0xf0001919, 0x16ca7: 0xf0001919, + 0x16ca8: 0xf0001919, 0x16ca9: 0xf0001919, 0x16caa: 0xf0001919, 0x16cab: 0xf0001919, + 0x16cac: 0xf0001919, 0x16cad: 0xf0001717, 0x16cae: 0xf0001717, 0x16caf: 0xf0001717, + 0x16cb0: 0xf0001717, 0x16cb1: 0xf0001717, 0x16cb2: 0xf0001717, 0x16cb3: 0xf0001717, + 0x16cb4: 0xf0001818, 0x16cb5: 0xf0001818, 0x16cb6: 0xf0001818, 0x16cb7: 0xf0001818, + 0x16cb8: 0xf0001818, 0x16cb9: 0xf0001818, 0x16cba: 0xf0001818, 0x16cbb: 0xf0001818, + 0x16cbc: 0xe0003696, 0x16cbd: 0xe0003699, 0x16cbe: 0x4004c020, 0x16cbf: 0x4004c220, + // Block 0x5b3, offset 0x16cc0 + 0x16cc0: 0xa0000000, 0x16cc1: 0xa0000000, 0x16cc2: 0xa0000000, 0x16cc3: 0xa0000000, + 0x16cc4: 0xa0000000, 0x16cc5: 0xa0000000, 0x16cc6: 0xa0000000, 0x16cc7: 0xa0000000, + 0x16cc8: 0xa0000000, 0x16cc9: 0x40020020, 0x16cca: 0x40020220, 0x16ccb: 0x40020420, + 0x16ccc: 0x40020620, 0x16ccd: 0x40020820, 0x16cce: 0xa0000000, 0x16ccf: 0xa0000000, + 0x16cd0: 0xa0000000, 0x16cd1: 0xa0000000, 0x16cd2: 0xa0000000, 0x16cd3: 0xa0000000, + 0x16cd4: 0xa0000000, 0x16cd5: 0xa0000000, 0x16cd6: 0xa0000000, 0x16cd7: 0xa0000000, + 0x16cd8: 0xa0000000, 0x16cd9: 0xa0000000, 0x16cda: 0xa0000000, 0x16cdb: 0xa0000000, + 0x16cdc: 0xa0000000, 0x16cdd: 0xa0000000, 0x16cde: 0xa0000000, 0x16cdf: 0xa0000000, + 0x16ce0: 0x40021220, 0x16ce1: 0x4002ba20, 0x16ce2: 0x4003e020, 0x16ce3: 0x4004ea20, + 0x16ce4: 0x4027de20, 0x16ce5: 0x4004ec20, 0x16ce6: 0x4004e620, 0x16ce7: 0x4003d220, + 0x16ce8: 0x4003f420, 0x16ce9: 0x4003f620, 0x16cea: 0x4004d820, 0x16ceb: 0x40093820, + 0x16cec: 0x40024020, 0x16ced: 0x40021a20, 0x16cee: 0x4002e420, 0x16cef: 0x4004e220, + 0x16cf0: 0x4029cc20, 0x16cf1: 0x4029ce20, 0x16cf2: 0x4029d020, 0x16cf3: 0x4029d220, + 0x16cf4: 0x4029d420, 0x16cf5: 0x4029d620, 0x16cf6: 0x4029d820, 0x16cf7: 0x4029da20, + 0x16cf8: 0x4029dc20, 0x16cf9: 0x4029de20, 0x16cfa: 0x40026c20, 0x16cfb: 0x40026220, + 0x16cfc: 0x40094020, 0x16cfd: 0x40094220, 0x16cfe: 0x40094420, 0x16cff: 0x4002c420, + // Block 0x5b4, offset 0x16d00 + 0x16d00: 0x4004d620, 0x16d01: 0xcead9741, 0x16d02: 0x002c0a88, 0x16d03: 0x002c3a88, + 0x16d04: 0x002c6288, 0x16d05: 0x002c9888, 0x16d06: 0x002d0888, 0x16d07: 0x002d2288, + 0x16d08: 0x002d6888, 0x16d09: 0xc6182741, 0x16d0a: 0x002dcc88, 0x16d0b: 0x002dfe88, + 0x16d0c: 0xc0030002, 0x16d0d: 0x002e8288, 0x16d0e: 0x002e9e88, 0x16d0f: 0x002ee288, + 0x16d10: 0x002f2c88, 0x16d11: 0x002f5688, 0x16d12: 0x002f7a88, 0x16d13: 0xceb39771, + 0x16d14: 0xceb99771, 0x16d15: 0x00306c88, 0x16d16: 0x0030be88, 0x16d17: 0x0030e288, + 0x16d18: 0x0030f688, 0x16d19: 0x00310088, 0x16d1a: 0x00312a88, 0x16d1b: 0x4003f820, + 0x16d1c: 0x4004e420, 0x16d1d: 0x4003fa20, 0x16d1e: 0x40062420, 0x16d1f: 0x40021620, + 0x16d20: 0x40061e20, 0x16d21: 0xceaa9741, 0x16d22: 0x402c0a20, 0x16d23: 0x402c3a20, + 0x16d24: 0x402c6220, 0x16d25: 0x402c9820, 0x16d26: 0x402d0820, 0x16d27: 0x402d2220, + 0x16d28: 0x402d6820, 0x16d29: 0xc6162741, 0x16d2a: 0x402dcc20, 0x16d2b: 0x402dfe20, + 0x16d2c: 0xc0000002, 0x16d2d: 0x402e8220, 0x16d2e: 0x402e9e20, 0x16d2f: 0x402ee220, + 0x16d30: 0x402f2c20, 0x16d31: 0x402f5620, 0x16d32: 0x402f7a20, 0x16d33: 0xceb09771, + 0x16d34: 0xceb69771, 0x16d35: 0x40306c20, 0x16d36: 0x4030be20, 0x16d37: 0x4030e220, + 0x16d38: 0x4030f620, 0x16d39: 0x40310020, 0x16d3a: 0x40312a20, 0x16d3b: 0x4003fc20, + 0x16d3c: 0x40094820, 0x16d3d: 0x4003fe20, 0x16d3e: 0x40094c20, 0x16d3f: 0xa0000000, + // Block 0x5b5, offset 0x16d40 + 0x16d40: 0xe00008f5, 0x16d41: 0xe00008ef, 0x16d42: 0x002be283, 0x16d43: 0xe0000969, + 0x16d44: 0xe000095b, 0x16d45: 0xe000094d, 0x16d46: 0xe00009dd, 0x16d47: 0xe0000a53, + 0x16d48: 0xe0000ae8, 0x16d49: 0xe0000ae2, 0x16d4a: 0xe0000af4, 0x16d4b: 0xe0000b20, + 0x16d4c: 0xe0000c2b, 0x16d4d: 0xe0000c25, 0x16d4e: 0x002d9c83, 0x16d4f: 0xe0000c43, + 0x16d50: 0xe0000ab3, 0x16d51: 0xe0000d63, 0x16d52: 0xe0000d9a, 0x16d53: 0xe0000d94, + 0x16d54: 0xe0000da6, 0x16d55: 0xe0000de6, 0x16d56: 0xe0000dd2, 0x16d57: 0x40093e20, + 0x16d58: 0xe0000e12, 0x16d59: 0xe0000fe1, 0x16d5a: 0xe0000fdb, 0x16d5b: 0xe0000fed, + 0x16d5c: 0xe0000fff, 0x16d5d: 0xe0001102, 0x16d5e: 0x00318888, 0x16d5f: 0xe0000f7b, + 0x16d60: 0xe00008f2, 0x16d61: 0xe00008ec, 0x16d62: 0x402be220, 0x16d63: 0xe0000966, + 0x16d64: 0xe0000958, 0x16d65: 0xe000094a, 0x16d66: 0xe00009d5, 0x16d67: 0xe0000a4d, + 0x16d68: 0xe0000ae5, 0x16d69: 0xe0000adf, 0x16d6a: 0xe0000af1, 0x16d6b: 0xe0000b1d, + 0x16d6c: 0xe0000c28, 0x16d6d: 0xe0000c22, 0x16d6e: 0x402d9c20, 0x16d6f: 0xe0000c40, + 0x16d70: 0xe0000aad, 0x16d71: 0xe0000d60, 0x16d72: 0xe0000d97, 0x16d73: 0xe0000d91, + 0x16d74: 0xe0000da3, 0x16d75: 0xe0000de3, 0x16d76: 0xe0000dcf, 0x16d77: 0x40093c20, + 0x16d78: 0xe0000e0f, 0x16d79: 0xe0000fde, 0x16d7a: 0xe0000fd8, 0x16d7b: 0xe0000fea, + 0x16d7c: 0xe0000ffc, 0x16d7d: 0xe00010ff, 0x16d7e: 0x40318820, 0x16d7f: 0xe0001114, + // Block 0x5b6, offset 0x16d80 + 0x16d80: 0xe0000983, 0x16d81: 0xe0000980, 0x16d82: 0x002be083, 0x16d83: 0x402be020, + 0x16d84: 0xe000097d, 0x16d85: 0xe000097a, 0x16d86: 0xe0000a38, 0x16d87: 0xe0000a35, + 0x16d88: 0xe0000a3e, 0x16d89: 0xe0000a3b, 0x16d8a: 0xe0000a4a, 0x16d8b: 0xe0000a47, + 0x16d8c: 0xe0000a44, 0x16d8d: 0xe0000a41, 0x16d8e: 0xe0000a86, 0x16d8f: 0xe0000a83, + 0x16d90: 0xe0000aaa, 0x16d91: 0xe0000aa7, 0x16d92: 0xe0000b46, 0x16d93: 0xe0000b43, + 0x16d94: 0xe0000aee, 0x16d95: 0xe0000aeb, 0x16d96: 0xe0000b2c, 0x16d97: 0xe0000b29, + 0x16d98: 0xe0000b40, 0x16d99: 0xe0000b3d, 0x16d9a: 0xe0000b1a, 0x16d9b: 0xe0000b17, + 0x16d9c: 0xe0000bb8, 0x16d9d: 0xe0000bb5, 0x16d9e: 0xe0000bb2, 0x16d9f: 0xe0000baf, + 0x16da0: 0xe0000bc4, 0x16da1: 0xe0000bc1, 0x16da2: 0xe0000bca, 0x16da3: 0xe0000bc7, + 0x16da4: 0xe0000bee, 0x16da5: 0xe0000beb, 0x16da6: 0xe0000c1b, 0x16da7: 0xe0000c18, + 0x16da8: 0xe0000c51, 0x16da9: 0xe0000c4e, 0x16daa: 0xe0000c60, 0x16dab: 0xe0000c5d, + 0x16dac: 0xe0000c31, 0x16dad: 0xe0000c2e, 0x16dae: 0xe0000c5a, 0x16daf: 0xe0000c57, + 0x16db0: 0xe0000c54, 0x16db1: 0x402da220, 0x16db2: 0xf0000a0a, 0x16db3: 0xf0000404, + 0x16db4: 0xe0000c8a, 0x16db5: 0xe0000c87, 0x16db6: 0xe0000c9f, 0x16db7: 0xe0000c9c, + 0x16db8: 0x402f7220, 0x16db9: 0xe0000ccc, 0x16dba: 0xe0000cc9, 0x16dbb: 0xe0000cd8, + 0x16dbc: 0xe0000cd5, 0x16dbd: 0xe0000cd2, 0x16dbe: 0xe0000ccf, 0x16dbf: 0xe0000d04, + // Block 0x5b7, offset 0x16dc0 + 0x16dc0: 0xe0000cfe, 0x16dc1: 0xe0000cf8, 0x16dc2: 0xe0000cf5, 0x16dc3: 0xe0000d51, + 0x16dc4: 0xe0000d4e, 0x16dc5: 0xe0000d6f, 0x16dc6: 0xe0000d6c, 0x16dc7: 0xe0000d5d, + 0x16dc8: 0xe0000d5a, 0x16dc9: 0xf0000404, 0x16dca: 0x002eda88, 0x16dcb: 0x402eda20, + 0x16dcc: 0xe0000e2e, 0x16dcd: 0xe0000e2b, 0x16dce: 0xe0000da0, 0x16dcf: 0xe0000d9d, + 0x16dd0: 0xe0000de0, 0x16dd1: 0xe0000ddd, 0x16dd2: 0xe0000e93, 0x16dd3: 0xe0000e8f, + 0x16dd4: 0xe0000eca, 0x16dd5: 0xe0000ec7, 0x16dd6: 0xe0000edc, 0x16dd7: 0xe0000ed9, + 0x16dd8: 0xe0000ed0, 0x16dd9: 0xe0000ecd, 0x16dda: 0xe0000f1f, 0x16ddb: 0xe0000f1c, + 0x16ddc: 0xe0000f2d, 0x16ddd: 0xe0000f2a, 0x16dde: 0x002fe883, 0x16ddf: 0x402fe820, + 0x16de0: 0xe0000f33, 0x16de1: 0xe0000f30, 0x16de2: 0x00302e83, 0x16de3: 0x40302e20, + 0x16de4: 0xe0000f8a, 0x16de5: 0xe0000f87, 0x16de6: 0x00303688, 0x16de7: 0x40303620, + 0x16de8: 0xe000102b, 0x16de9: 0xe0001028, 0x16dea: 0xe000103f, 0x16deb: 0xe000103c, + 0x16dec: 0xe0000fe7, 0x16ded: 0xe0000fe4, 0x16dee: 0xe0000ff9, 0x16def: 0xe0000ff6, + 0x16df0: 0xe0001025, 0x16df1: 0xe0001022, 0x16df2: 0xe0001039, 0x16df3: 0xe0001036, + 0x16df4: 0xe00010d8, 0x16df5: 0xe00010d5, 0x16df6: 0xe000110e, 0x16df7: 0xe000110b, + 0x16df8: 0xe0001117, 0x16df9: 0xe000113b, 0x16dfa: 0xe0001138, 0x16dfb: 0xe000114d, + 0x16dfc: 0xe000114a, 0x16dfd: 0xe0001147, 0x16dfe: 0xe0001144, 0x16dff: 0xe0000f64, + // Block 0x5b8, offset 0x16e00 + 0x16e00: 0xe000098f, 0x16e01: 0xe000098c, 0x16e02: 0xe0000995, 0x16e03: 0xe0000992, + 0x16e04: 0xe0000b62, 0x16e05: 0xe0000b5f, 0x16e06: 0xe0000b68, 0x16e07: 0xe0000b65, + 0x16e08: 0xe0000c6c, 0x16e09: 0xe0000c69, 0x16e0a: 0xe0000c72, 0x16e0b: 0xe0000c6f, + 0x16e0c: 0xe0000e4a, 0x16e0d: 0xe0000e47, 0x16e0e: 0xe0000e50, 0x16e0f: 0xe0000e4d, + 0x16e10: 0xe0000ee8, 0x16e11: 0xe0000ee5, 0x16e12: 0xe0000eee, 0x16e13: 0xe0000eeb, + 0x16e14: 0xe0001053, 0x16e15: 0xe0001050, 0x16e16: 0xe0001059, 0x16e17: 0xe0001056, + 0x16e18: 0x002fe883, 0x16e19: 0x402fe820, 0x16e1a: 0x00302e83, 0x16e1b: 0x40302e20, + 0x16e1c: 0x00312288, 0x16e1d: 0x40312220, 0x16e1e: 0xe0000bf4, 0x16e1f: 0xe0000bf1, + 0x16e20: 0x002ebc88, 0x16e21: 0x402c8c20, 0x16e22: 0x002f2288, 0x16e23: 0x402f2220, + 0x16e24: 0x00314088, 0x16e25: 0x40314020, 0x16e26: 0xe000096f, 0x16e27: 0xe000096c, + 0x16e28: 0xe0000b32, 0x16e29: 0xe0000b2f, 0x16e2a: 0xe0000dd9, 0x16e2b: 0xe0000dd5, + 0x16e2c: 0xe0000dfd, 0x16e2d: 0xe0000df9, 0x16e2e: 0xe0000e04, 0x16e2f: 0xe0000e01, + 0x16e30: 0xe0000e0b, 0x16e31: 0xe0000e07, 0x16e32: 0xe0001129, 0x16e33: 0xe0001126, + 0x16e34: 0x402e5e20, 0x16e35: 0x402ed020, 0x16e36: 0x40305a20, 0x16e37: 0x402dd420, + 0x16e38: 0xe0000abf, 0x16e39: 0xe0000ec4, 0x16e3a: 0x002be888, 0x16e3b: 0x002c4488, + 0x16e3c: 0x402c4420, 0x16e3d: 0x002e3888, 0x16e3e: 0x00303e88, 0x16e3f: 0x402ffc20, + // Block 0x5b9, offset 0x16e40 + 0x16e40: 0xe00010d2, 0x16e41: 0xe00010cf, 0x16e42: 0xe00010cc, 0x16e43: 0xe00010c9, + 0x16e44: 0xe00010e1, 0x16e45: 0xe00010de, 0x16e46: 0xe00010e7, 0x16e47: 0xe00010e4, + 0x16e48: 0xe00010ed, 0x16e49: 0xe00010ea, 0x16e4a: 0xe00010fc, 0x16e4b: 0xe00010f9, + 0x16e4c: 0xe00010f6, 0x16e4d: 0xe00010f3, 0x16e4e: 0xe0001123, 0x16e4f: 0xe0001120, + 0x16e50: 0xe0001141, 0x16e51: 0xe000113e, 0x16e52: 0xe0001153, 0x16e53: 0xe0001150, + 0x16e54: 0xe0001159, 0x16e55: 0xe0001156, 0x16e56: 0xe0000c15, 0x16e57: 0xe0000f8d, + 0x16e58: 0xe00010db, 0x16e59: 0xe0001111, 0x16e5a: 0xf0000404, 0x16e5b: 0xe0000f70, + 0x16e5c: 0x40300420, 0x16e5d: 0x40300620, 0x16e5e: 0xe0000f7f, 0x16e5f: 0x402c9620, + 0x16e60: 0xe000099b, 0x16e61: 0xe0000998, 0x16e62: 0xe0000989, 0x16e63: 0xe0000986, + 0x16e64: 0xe0003934, 0x16e65: 0xe0003931, 0x16e66: 0xe000393a, 0x16e67: 0xe0003937, + 0x16e68: 0xe0003975, 0x16e69: 0xe0003972, 0x16e6a: 0xe0003960, 0x16e6b: 0xe000395d, + 0x16e6c: 0xe0003987, 0x16e6d: 0xe0003984, 0x16e6e: 0xe000388e, 0x16e6f: 0xe000388b, + 0x16e70: 0xe0003894, 0x16e71: 0xe0003891, 0x16e72: 0xe0003908, 0x16e73: 0xe0003905, + 0x16e74: 0xe00038d2, 0x16e75: 0xe00038cf, 0x16e76: 0xe000391a, 0x16e77: 0xe0003917, + 0x16e78: 0xe0000b6e, 0x16e79: 0xe0000b6b, 0x16e7a: 0xe0000b5c, 0x16e7b: 0xe0000b59, + 0x16e7c: 0xe0000b26, 0x16e7d: 0xe0000b23, 0x16e7e: 0xe0000afb, 0x16e7f: 0xe0000af7, + // Block 0x5ba, offset 0x16e80 + 0x16e80: 0xa0000000, 0x16e81: 0xa0000000, 0x16e82: 0xa0000000, 0x16e83: 0xa0000000, + 0x16e84: 0xa0000000, 0x16e85: 0xa0000000, 0x16e86: 0xa0000000, 0x16e87: 0xa0000000, + 0x16e88: 0xa0000000, 0x16e89: 0x40020020, 0x16e8a: 0x40020220, 0x16e8b: 0x40020420, + 0x16e8c: 0x40020620, 0x16e8d: 0x40020820, 0x16e8e: 0xa0000000, 0x16e8f: 0xa0000000, + 0x16e90: 0xa0000000, 0x16e91: 0xa0000000, 0x16e92: 0xa0000000, 0x16e93: 0xa0000000, + 0x16e94: 0xa0000000, 0x16e95: 0xa0000000, 0x16e96: 0xa0000000, 0x16e97: 0xa0000000, + 0x16e98: 0xa0000000, 0x16e99: 0xa0000000, 0x16e9a: 0xa0000000, 0x16e9b: 0xa0000000, + 0x16e9c: 0xa0000000, 0x16e9d: 0xa0000000, 0x16e9e: 0xa0000000, 0x16e9f: 0xa0000000, + 0x16ea0: 0x40021220, 0x16ea1: 0x4002ba20, 0x16ea2: 0x4003e020, 0x16ea3: 0x4004ea20, + 0x16ea4: 0x4027de20, 0x16ea5: 0x4004ec20, 0x16ea6: 0x4004e620, 0x16ea7: 0x4003d220, + 0x16ea8: 0x4003f420, 0x16ea9: 0x4003f620, 0x16eaa: 0x4004d820, 0x16eab: 0x40093820, + 0x16eac: 0x40024020, 0x16ead: 0x40021a20, 0x16eae: 0x4002e420, 0x16eaf: 0x4004e220, + 0x16eb0: 0x4029cc20, 0x16eb1: 0x4029ce20, 0x16eb2: 0x4029d020, 0x16eb3: 0x4029d220, + 0x16eb4: 0x4029d420, 0x16eb5: 0x4029d620, 0x16eb6: 0x4029d820, 0x16eb7: 0x4029da20, + 0x16eb8: 0x4029dc20, 0x16eb9: 0x4029de20, 0x16eba: 0x40026c20, 0x16ebb: 0x40026220, + 0x16ebc: 0x40094020, 0x16ebd: 0x40094220, 0x16ebe: 0x40094420, 0x16ebf: 0x4002c420, + // Block 0x5bb, offset 0x16ec0 + 0x16ec0: 0x4004d620, 0x16ec1: 0xcec29791, 0x16ec2: 0x002c0a88, 0x16ec3: 0xceca0991, + 0x16ec4: 0x002c6288, 0x16ec5: 0x002c9888, 0x16ec6: 0x002d0888, 0x16ec7: 0xced20991, + 0x16ec8: 0x002d6888, 0x16ec9: 0x002d9a88, 0x16eca: 0x002dcc88, 0x16ecb: 0xcb1f0991, + 0x16ecc: 0xc0030002, 0x16ecd: 0x002e8288, 0x16ece: 0xced797e1, 0x16ecf: 0xcee49811, + 0x16ed0: 0x002f2c88, 0x16ed1: 0x002f5688, 0x16ed2: 0x002f7a88, 0x16ed3: 0xcb330991, + 0x16ed4: 0x00302c88, 0x16ed5: 0xc3900b21, 0x16ed6: 0x0030be88, 0x16ed7: 0x0030e288, + 0x16ed8: 0x0030f688, 0x16ed9: 0x00310088, 0x16eda: 0xcedc0991, 0x16edb: 0x4003f820, + 0x16edc: 0x4004e420, 0x16edd: 0x4003fa20, 0x16ede: 0x40062420, 0x16edf: 0x40021620, + 0x16ee0: 0x40061e20, 0x16ee1: 0xcebc9791, 0x16ee2: 0x402c0a20, 0x16ee3: 0xcec80991, + 0x16ee4: 0x402c6220, 0x16ee5: 0x402c9820, 0x16ee6: 0x402d0820, 0x16ee7: 0xced00991, + 0x16ee8: 0x402d6820, 0x16ee9: 0x402d9a20, 0x16eea: 0x402dcc20, 0x16eeb: 0xcb1d0991, + 0x16eec: 0xc0000002, 0x16eed: 0x402e8220, 0x16eee: 0xced497e1, 0x16eef: 0xcede9811, + 0x16ef0: 0x402f2c20, 0x16ef1: 0x402f5620, 0x16ef2: 0x402f7a20, 0x16ef3: 0xcb310991, + 0x16ef4: 0x40302c20, 0x16ef5: 0xc38d0b21, 0x16ef6: 0x4030be20, 0x16ef7: 0x4030e220, + 0x16ef8: 0x4030f620, 0x16ef9: 0x40310020, 0x16efa: 0xceda0991, 0x16efb: 0x4003fc20, + 0x16efc: 0x40094820, 0x16efd: 0x4003fe20, 0x16efe: 0x40094c20, 0x16eff: 0xa0000000, + // Block 0x5bc, offset 0x16f00 + 0x16f00: 0xe00008f5, 0x16f01: 0x002c0883, 0x16f02: 0xe0000921, 0x16f03: 0x00320ea3, + 0x16f04: 0x00320e83, 0x16f05: 0x00320c83, 0x16f06: 0x00320a83, 0x16f07: 0xe0000a53, + 0x16f08: 0xe0000ae8, 0x16f09: 0xe0000ae2, 0x16f0a: 0xe0000af4, 0x16f0b: 0xe0000b20, + 0x16f0c: 0xe0000c2b, 0x16f0d: 0xe0000c25, 0x16f0e: 0xe0000c37, 0x16f0f: 0xe0000c43, + 0x16f10: 0x002c96a3, 0x16f11: 0x002ee0c3, 0x16f12: 0xe0000d9a, 0x16f13: 0xe0000d94, + 0x16f14: 0x003210e3, 0x16f15: 0x003210c3, 0x16f16: 0x00321083, 0x16f17: 0x40093e20, + 0x16f18: 0x00320883, 0x16f19: 0xe0000fe1, 0x16f1a: 0xe0000fdb, 0x16f1b: 0xe0000fed, + 0x16f1c: 0x003100a3, 0x16f1d: 0xe0001102, 0x16f1e: 0x00306aa3, 0x16f1f: 0xe0000f7b, + 0x16f20: 0xe00008f2, 0x16f21: 0x402c0820, 0x16f22: 0xe000091e, 0x16f23: 0x40320e21, + 0x16f24: 0x40320e20, 0x16f25: 0x40320c20, 0x16f26: 0x40320a20, 0x16f27: 0xe0000a4d, + 0x16f28: 0xe0000ae5, 0x16f29: 0xe0000adf, 0x16f2a: 0xe0000af1, 0x16f2b: 0xe0000b1d, + 0x16f2c: 0xe0000c28, 0x16f2d: 0xe0000c22, 0x16f2e: 0xe0000c34, 0x16f2f: 0xe0000c40, + 0x16f30: 0x402c9621, 0x16f31: 0x402ee022, 0x16f32: 0xe0000d97, 0x16f33: 0xe0000d91, + 0x16f34: 0x40321023, 0x16f35: 0x40321022, 0x16f36: 0x40321020, 0x16f37: 0x40093c20, + 0x16f38: 0x40320820, 0x16f39: 0xe0000fde, 0x16f3a: 0xe0000fd8, 0x16f3b: 0xe0000fea, + 0x16f3c: 0x40310021, 0x16f3d: 0xe00010ff, 0x16f3e: 0x40306a21, 0x16f3f: 0xe0001114, + // Block 0x5bd, offset 0x16f40 + 0x16f40: 0xe0000983, 0x16f41: 0xe0000980, 0x16f42: 0xe00008fb, 0x16f43: 0xe00008f8, + 0x16f44: 0xe000097d, 0x16f45: 0xe000097a, 0x16f46: 0xe0000a38, 0x16f47: 0xe0000a35, + 0x16f48: 0xe0000a3e, 0x16f49: 0xe0000a3b, 0x16f4a: 0xe0000a4a, 0x16f4b: 0xe0000a47, + 0x16f4c: 0x002c5c83, 0x16f4d: 0x402c5c20, 0x16f4e: 0xe0000a86, 0x16f4f: 0xe0000a83, + 0x16f50: 0x002c9683, 0x16f51: 0x402c9620, 0x16f52: 0xe0000b46, 0x16f53: 0xe0000b43, + 0x16f54: 0xe0000aee, 0x16f55: 0xe0000aeb, 0x16f56: 0xe0000b2c, 0x16f57: 0xe0000b29, + 0x16f58: 0xe0000b40, 0x16f59: 0xe0000b3d, 0x16f5a: 0xe0000b1a, 0x16f5b: 0xe0000b17, + 0x16f5c: 0xe0000bb8, 0x16f5d: 0xe0000bb5, 0x16f5e: 0xe0000bb2, 0x16f5f: 0xe0000baf, + 0x16f60: 0xe0000bc4, 0x16f61: 0xe0000bc1, 0x16f62: 0xe0000bca, 0x16f63: 0xe0000bc7, + 0x16f64: 0xe0000bee, 0x16f65: 0xe0000beb, 0x16f66: 0xe0000c1b, 0x16f67: 0xe0000c18, + 0x16f68: 0xe0000c51, 0x16f69: 0xe0000c4e, 0x16f6a: 0xe0000c60, 0x16f6b: 0xe0000c5d, + 0x16f6c: 0xe0000c31, 0x16f6d: 0xe0000c2e, 0x16f6e: 0xe0000c5a, 0x16f6f: 0xe0000c57, + 0x16f70: 0xe0000c54, 0x16f71: 0x402da220, 0x16f72: 0xf0000a0a, 0x16f73: 0xf0000404, + 0x16f74: 0xe0000c8a, 0x16f75: 0xe0000c87, 0x16f76: 0xe0000c9f, 0x16f77: 0xe0000c9c, + 0x16f78: 0x402f7220, 0x16f79: 0xe0000ccc, 0x16f7a: 0xe0000cc9, 0x16f7b: 0xe0000cd8, + 0x16f7c: 0xe0000cd5, 0x16f7d: 0xe0000cd2, 0x16f7e: 0xe0000ccf, 0x16f7f: 0xe0000d04, + // Block 0x5be, offset 0x16f80 + 0x16f80: 0xe0000cfe, 0x16f81: 0xe0000cf8, 0x16f82: 0xe0000cf5, 0x16f83: 0x002ee0a3, + 0x16f84: 0x402ee021, 0x16f85: 0xe0000d6f, 0x16f86: 0xe0000d6c, 0x16f87: 0xe0000d5d, + 0x16f88: 0xe0000d5a, 0x16f89: 0xf0000404, 0x16f8a: 0x002ee083, 0x16f8b: 0x402ee020, + 0x16f8c: 0xe0000e2e, 0x16f8d: 0xe0000e2b, 0x16f8e: 0xe0000da0, 0x16f8f: 0xe0000d9d, + 0x16f90: 0x003210a3, 0x16f91: 0x40321021, 0x16f92: 0x003208a3, 0x16f93: 0x40320821, + 0x16f94: 0xe0000eca, 0x16f95: 0xe0000ec7, 0x16f96: 0xe0000edc, 0x16f97: 0xe0000ed9, + 0x16f98: 0xe0000ed0, 0x16f99: 0xe0000ecd, 0x16f9a: 0xe0000f1f, 0x16f9b: 0xe0000f1c, + 0x16f9c: 0xe0000f2d, 0x16f9d: 0xe0000f2a, 0x16f9e: 0xe0000f47, 0x16f9f: 0xe0000f44, + 0x16fa0: 0x00302a83, 0x16fa1: 0x40302a20, 0x16fa2: 0xe0000f99, 0x16fa3: 0xe0000f96, + 0x16fa4: 0xe0000f8a, 0x16fa5: 0xe0000f87, 0x16fa6: 0x00306a83, 0x16fa7: 0x40306a20, + 0x16fa8: 0xe000102b, 0x16fa9: 0xe0001028, 0x16faa: 0xe000103f, 0x16fab: 0xe000103c, + 0x16fac: 0xe0000fe7, 0x16fad: 0xe0000fe4, 0x16fae: 0xe0000ff9, 0x16faf: 0xe0000ff6, + 0x16fb0: 0x003100c3, 0x16fb1: 0x40310022, 0x16fb2: 0xe0001039, 0x16fb3: 0xe0001036, + 0x16fb4: 0xe00010d8, 0x16fb5: 0xe00010d5, 0x16fb6: 0xe000110e, 0x16fb7: 0xe000110b, + 0x16fb8: 0xe0001117, 0x16fb9: 0xe000113b, 0x16fba: 0xe0001138, 0x16fbb: 0xe000114d, + 0x16fbc: 0xe000114a, 0x16fbd: 0x00320683, 0x16fbe: 0x40320620, 0x16fbf: 0xe0000f64, + // Block 0x5bf, offset 0x16fc0 + 0x16fc0: 0x402c1a20, 0x16fc1: 0x002c2a88, 0x16fc2: 0x002c3288, 0x16fc3: 0x402c3220, + 0x16fc4: 0x0031c488, 0x16fc5: 0x4031c420, 0x16fc6: 0x002efa88, 0x16fc7: 0x002c4e88, + 0x16fc8: 0x402c4e20, 0x16fc9: 0x002c7288, 0x16fca: 0x002c7a88, 0x16fcb: 0x002c8488, + 0x16fcc: 0x402c8420, 0x16fcd: 0xe000115c, 0x16fce: 0x002cae88, 0x16fcf: 0x002cb888, + 0x16fd0: 0x002cc288, 0x16fd1: 0x002d1688, 0x16fd2: 0x402d1620, 0x16fd3: 0x002d4488, + 0x16fd4: 0x002d5888, 0x16fd5: 0x402d7820, 0x16fd6: 0x002dc288, 0x16fd7: 0x002db688, + 0x16fd8: 0x002e0a88, 0x16fd9: 0x402e0a20, 0x16fda: 0x402e3820, 0x16fdb: 0x402e7220, + 0x16fdc: 0x0030a088, 0x16fdd: 0x002eb488, 0x16fde: 0x402ebc20, 0x16fdf: 0x002f1088, + 0x16fe0: 0xe0000e56, 0x16fe1: 0xe0000e53, 0x16fe2: 0x002d6088, 0x16fe3: 0x402d6020, + 0x16fe4: 0x002f3e88, 0x16fe5: 0x402f3e20, 0x16fe6: 0x002f8288, 0x16fe7: 0x0031b488, + 0x16fe8: 0x4031b420, 0x16fe9: 0x00300888, 0x16fea: 0x40301220, 0x16feb: 0x40304220, + 0x16fec: 0x00304a88, 0x16fed: 0x40304a20, 0x16fee: 0x00305288, 0x16fef: 0xe000105f, + 0x16ff0: 0xe000105c, 0x16ff1: 0x0030b488, 0x16ff2: 0x0030cc88, 0x16ff3: 0x00311888, + 0x16ff4: 0x40311820, 0x16ff5: 0x00313488, 0x16ff6: 0x40313420, 0x16ff7: 0xcece0991, + 0x16ff8: 0x00316e88, 0x16ff9: 0x40316e20, 0x16ffa: 0x40317820, 0x16ffb: 0x4031a620, + 0x16ffc: 0x0031bc88, 0x16ffd: 0x4031bc20, 0x16ffe: 0xe0000fc9, 0x16fff: 0x40319420, + // Block 0x5c0, offset 0x17000 + 0x17000: 0x40321220, 0x17001: 0x40321a20, 0x17002: 0x40322220, 0x17003: 0x40322a20, + 0x17004: 0xe0000ad5, 0x17005: 0xe0000ad1, 0x17006: 0xe0000acd, 0x17007: 0xf0000a0a, + 0x17008: 0xf000040a, 0x17009: 0xf0000404, 0x1700a: 0xf0000a0a, 0x1700b: 0xf000040a, + 0x1700c: 0xf0000404, 0x1700d: 0xe0000947, 0x1700e: 0xe0000944, 0x1700f: 0xe0000c3d, + 0x17010: 0xe0000c3a, 0x17011: 0xe0000dcc, 0x17012: 0xe0000dc9, 0x17013: 0xe0000ff3, + 0x17014: 0xe0000ff0, 0x17015: 0xe000298b, 0x17016: 0xe0002988, 0x17017: 0xe0002979, + 0x17018: 0xe0002976, 0x17019: 0xe0002985, 0x1701a: 0xe0002982, 0x1701b: 0xe000297f, + 0x1701c: 0xe000297c, 0x1701d: 0x402cae20, 0x1701e: 0xe00037e8, 0x1701f: 0xe00037e5, + 0x17020: 0xe000299d, 0x17021: 0xe000299a, 0x17022: 0xe000ad9e, 0x17023: 0xe000ad9b, + 0x17024: 0x002d6683, 0x17025: 0x402d6620, 0x17026: 0x002d6483, 0x17027: 0x402d6420, + 0x17028: 0x002e2083, 0x17029: 0x402e2020, 0x1702a: 0x00321103, 0x1702b: 0x40321024, + 0x1702c: 0xe000ade0, 0x1702d: 0xe000addd, 0x1702e: 0x002c6083, 0x1702f: 0x402c6020, + 0x17030: 0xe0000c8d, 0x17031: 0xf0000a0a, 0x17032: 0xf000040a, 0x17033: 0xf0000404, + 0x17034: 0xe0000bac, 0x17035: 0xe0000ba9, 0x17036: 0x002d7888, 0x17037: 0x00319488, + 0x17038: 0xe0000d57, 0x17039: 0xe0000d54, 0x1703a: 0xe0002991, 0x1703b: 0xe000298e, + 0x1703c: 0xe000ad98, 0x1703d: 0xe000ad95, 0x1703e: 0xe000ad92, 0x1703f: 0xe000ad8f, + // Block 0x5c1, offset 0x17040 + 0x17040: 0xe000098f, 0x17041: 0xe000098c, 0x17042: 0xe0000995, 0x17043: 0xe0000992, + 0x17044: 0xe0000b62, 0x17045: 0xe0000b5f, 0x17046: 0xe0000b68, 0x17047: 0xe0000b65, + 0x17048: 0xe0000c6c, 0x17049: 0xe0000c69, 0x1704a: 0xe0000c72, 0x1704b: 0xe0000c6f, + 0x1704c: 0xe0000e4a, 0x1704d: 0xe0000e47, 0x1704e: 0xe0000e50, 0x1704f: 0xe0000e4d, + 0x17050: 0xe0000ee8, 0x17051: 0xe0000ee5, 0x17052: 0xe0000eee, 0x17053: 0xe0000eeb, + 0x17054: 0xe0001053, 0x17055: 0xe0001050, 0x17056: 0xe0001059, 0x17057: 0xe0001056, + 0x17058: 0xe0000f61, 0x17059: 0xe0000f5e, 0x1705a: 0xe0000fa5, 0x1705b: 0xe0000fa2, + 0x1705c: 0x00312288, 0x1705d: 0x40312220, 0x1705e: 0xe0000bf4, 0x1705f: 0xe0000bf1, + 0x17060: 0x002ebc88, 0x17061: 0x402c8c20, 0x17062: 0x002f2288, 0x17063: 0x402f2220, + 0x17064: 0x00314088, 0x17065: 0x40314020, 0x17066: 0x00320ca3, 0x17067: 0x40320c21, + 0x17068: 0xe0000b32, 0x17069: 0xe0000b2f, 0x1706a: 0xe00037fa, 0x1706b: 0xe00037f7, + 0x1706c: 0xe000adbc, 0x1706d: 0xe000adb9, 0x1706e: 0xe0000e04, 0x1706f: 0xe0000e01, + 0x17070: 0xe0000e0b, 0x17071: 0xe0000e07, 0x17072: 0xe0001129, 0x17073: 0xe0001126, + 0x17074: 0x402e5e20, 0x17075: 0x402ed020, 0x17076: 0x40305a20, 0x17077: 0x402dd420, + 0x17078: 0xe0000abf, 0x17079: 0xe0000ec4, 0x1707a: 0x002be888, 0x1707b: 0x002c4488, + 0x1707c: 0x402c4420, 0x1707d: 0x002e3888, 0x1707e: 0x00303e88, 0x1707f: 0x402ffc20, + // Block 0x5c2, offset 0x17080 + 0x17080: 0x402f8220, 0x17081: 0x402fd820, 0x17082: 0x402ff420, 0x17083: 0x40300820, + 0x17084: 0x402df620, 0x17085: 0x40301a20, 0x17086: 0x40302420, 0x17087: 0x40306420, + 0x17088: 0x40305220, 0x17089: 0x40307c20, 0x1708a: 0x4030b420, 0x1708b: 0x4030cc20, + 0x1708c: 0x4030da20, 0x1708d: 0x4030ee20, 0x1708e: 0x402e7a20, 0x1708f: 0x40310820, + 0x17090: 0x40314820, 0x17091: 0x40315020, 0x17092: 0xcecc0991, 0x17093: 0x40318020, + 0x17094: 0x4031cc20, 0x17095: 0x4031e820, 0x17096: 0x40320a20, 0x17097: 0x40323220, + 0x17098: 0x40323a20, 0x17099: 0x402c1220, 0x1709a: 0x402cf820, 0x1709b: 0x402d4c20, + 0x1709c: 0x402d7020, 0x1709d: 0x402de620, 0x1709e: 0x402e1a20, 0x1709f: 0x402e2a20, + 0x170a0: 0x402f6220, 0x170a1: 0x4031fa20, 0x170a2: 0x40320220, 0x170a3: 0xe0000aca, + 0x170a4: 0xe0000adc, 0x170a5: 0xe0000ad9, 0x170a6: 0xe0000fcc, 0x170a7: 0xe0000fcf, + 0x170a8: 0xe0000fba, 0x170a9: 0xe0000ba1, 0x170aa: 0xe0000d11, 0x170ab: 0xe0000d18, + 0x170ac: 0x40324220, 0x170ad: 0x40324a20, 0x170ae: 0x40309020, 0x170af: 0x40309820, + 0x170b0: 0x002d6894, 0x170b1: 0x002d8094, 0x170b2: 0x002dcc94, 0x170b3: 0x002f7a94, + 0x170b4: 0x002f9894, 0x170b5: 0x002fac94, 0x170b6: 0x002fd894, 0x170b7: 0x0030e294, + 0x170b8: 0x00310094, 0x170b9: 0x40064020, 0x170ba: 0x40064420, 0x170bb: 0x402d9620, + 0x170bc: 0x4031de20, 0x170bd: 0x402d9820, 0x170be: 0x4031e220, 0x170bf: 0x4031f020, + // Block 0x5c3, offset 0x170c0 + 0x170c0: 0xe0000d24, 0x170c1: 0xe0000d21, 0x170c2: 0xe0000d2a, 0x170c3: 0xe0000d27, + 0x170c4: 0xe0000d69, 0x170c5: 0xe0000d66, 0x170c6: 0xe0000d7b, 0x170c7: 0xe0000d78, + 0x170c8: 0xe0000d87, 0x170c9: 0xe0000d84, 0x170ca: 0xe0000d81, 0x170cb: 0xe0000d7e, + 0x170cc: 0xe000adb0, 0x170cd: 0xe000adad, 0x170ce: 0xe000adb6, 0x170cf: 0xe000adb3, + 0x170d0: 0xe0000e3d, 0x170d1: 0xe0000e39, 0x170d2: 0xe0000e35, 0x170d3: 0xe0000e31, + 0x170d4: 0xe0000ea7, 0x170d5: 0xe0000ea4, 0x170d6: 0xe0000ead, 0x170d7: 0xe0000eaa, + 0x170d8: 0xe0000ed6, 0x170d9: 0xe0000ed3, 0x170da: 0xe0000ef4, 0x170db: 0xe0000ef1, + 0x170dc: 0xe0000efb, 0x170dd: 0xe0000ef7, 0x170de: 0xe0000f02, 0x170df: 0xe0000eff, + 0x170e0: 0xe0000f41, 0x170e1: 0xe0000f3e, 0x170e2: 0xe0000f53, 0x170e3: 0xe0000f50, + 0x170e4: 0xe0000f26, 0x170e5: 0xe0000f22, 0x170e6: 0xe000a9d9, 0x170e7: 0xe000a9d6, + 0x170e8: 0xe0000f5a, 0x170e9: 0xe0000f56, 0x170ea: 0xe0000f93, 0x170eb: 0xe0000f90, + 0x170ec: 0xe0000f9f, 0x170ed: 0xe0000f9c, 0x170ee: 0xe0000fb1, 0x170ef: 0xe0000fae, + 0x170f0: 0xe0000fab, 0x170f1: 0xe0000fa8, 0x170f2: 0xe0001093, 0x170f3: 0xe0001090, + 0x170f4: 0xe000109f, 0x170f5: 0xe000109c, 0x170f6: 0xe0001099, 0x170f7: 0xe0001096, + 0x170f8: 0xe0001032, 0x170f9: 0xe000102e, 0x170fa: 0xe000298b, 0x170fb: 0xe0002988, + 0x170fc: 0xe00010a9, 0x170fd: 0xe00010a6, 0x170fe: 0xe00010af, 0x170ff: 0xe00010ac, + // Block 0x5c4, offset 0x17100 + 0x17100: 0xe00010d2, 0x17101: 0xe00010cf, 0x17102: 0xe00010cc, 0x17103: 0xe00010c9, + 0x17104: 0xe00010e1, 0x17105: 0xe00010de, 0x17106: 0xe00010e7, 0x17107: 0xe00010e4, + 0x17108: 0xe00010ed, 0x17109: 0xe00010ea, 0x1710a: 0xe00010fc, 0x1710b: 0xe00010f9, + 0x1710c: 0xe00010f6, 0x1710d: 0xe00010f3, 0x1710e: 0xe0001123, 0x1710f: 0xe0001120, + 0x17110: 0xe0001141, 0x17111: 0xe000113e, 0x17112: 0xe0001153, 0x17113: 0xe0001150, + 0x17114: 0xe0001159, 0x17115: 0xe0001156, 0x17116: 0xe0000c15, 0x17117: 0xe0000f8d, + 0x17118: 0xe00010db, 0x17119: 0xe0001111, 0x1711a: 0xf0000404, 0x1711b: 0xe0000f70, + 0x1711c: 0x40300420, 0x1711d: 0x40300620, 0x1711e: 0xe0000f7f, 0x1711f: 0x402c9620, + 0x17120: 0xe000099b, 0x17121: 0xe0000998, 0x17122: 0xe0000989, 0x17123: 0xe0000986, + 0x17124: 0xe0003cae, 0x17125: 0xe0003cab, 0x17126: 0xe0000930, 0x17127: 0xe000092c, + 0x17128: 0xe0000940, 0x17129: 0xe000093c, 0x1712a: 0xe000adaa, 0x1712b: 0xe000ada7, + 0x1712c: 0xe00009aa, 0x1712d: 0xe00009a6, 0x1712e: 0xe0003ca8, 0x1712f: 0xe0003ca5, + 0x17130: 0xe000090a, 0x17131: 0xe0000906, 0x17132: 0xe000091a, 0x17133: 0xe0000916, + 0x17134: 0xe000ada4, 0x17135: 0xe000ada1, 0x17136: 0xe00009a2, 0x17137: 0xe000099e, + 0x17138: 0xe0000b6e, 0x17139: 0xe0000b6b, 0x1713a: 0xe0000b5c, 0x1713b: 0xe0000b59, + 0x1713c: 0xe0000b26, 0x1713d: 0xe0000b23, 0x1713e: 0xe0000afb, 0x1713f: 0xe0000af7, + // Block 0x5c5, offset 0x17140 + 0x17140: 0xe0000b03, 0x17141: 0xe0000aff, 0x17142: 0xe0000b13, 0x17143: 0xe0000b0f, + 0x17144: 0xe0000b0b, 0x17145: 0xe0000b07, 0x17146: 0xe0000b75, 0x17147: 0xe0000b71, + 0x17148: 0xe0000c66, 0x17149: 0xe0000c63, 0x1714a: 0xe0000c78, 0x1714b: 0xe0000c75, + 0x1714c: 0xe0000e84, 0x1714d: 0xe0000e81, 0x1714e: 0xe0000e44, 0x1714f: 0xe0000e41, + 0x17150: 0xe000380c, 0x17151: 0xe0003809, 0x17152: 0xe000adc8, 0x17153: 0xe000adc5, + 0x17154: 0xe000add4, 0x17155: 0xe000add1, 0x17156: 0xe000adce, 0x17157: 0xe000adcb, + 0x17158: 0xe000adda, 0x17159: 0xe000add7, 0x1715a: 0xe0000e5d, 0x1715b: 0xe0000e59, + 0x1715c: 0xe0000e65, 0x1715d: 0xe0000e61, 0x1715e: 0xe0000e75, 0x1715f: 0xe0000e71, + 0x17160: 0xe000adc2, 0x17161: 0xe000adbf, 0x17162: 0xe0000e7d, 0x17163: 0xe0000e79, + 0x17164: 0xe000108d, 0x17165: 0xe000108a, 0x17166: 0xe000104d, 0x17167: 0xe000104a, + 0x17168: 0xe0001066, 0x17169: 0xe0001062, 0x1716a: 0xe000106e, 0x1716b: 0xe000106a, + 0x1716c: 0xe000107e, 0x1716d: 0xe000107a, 0x1716e: 0xe0001076, 0x1716f: 0xe0001072, + 0x17170: 0xe0001086, 0x17171: 0xe0001082, 0x17172: 0xe0001108, 0x17173: 0xe0001105, + 0x17174: 0xe0001135, 0x17175: 0xe0001132, 0x17176: 0xe000112f, 0x17177: 0xe000112c, + 0x17178: 0xe000111d, 0x17179: 0xe000111a, 0x1717a: 0xe0000d0a, 0x1717b: 0xe0000d07, + 0x1717c: 0x0030d888, 0x1717d: 0x4030d820, 0x1717e: 0x00312088, 0x1717f: 0x40312020, + // Block 0x5c6, offset 0x17180 + 0x17182: 0x4044b620, 0x17183: 0x4044b820, + 0x17185: 0x40449220, 0x17186: 0x40449420, 0x17187: 0x40449620, + 0x17188: 0x40449820, 0x17189: 0x40449a20, 0x1718a: 0x40449c20, 0x1718b: 0x40449e20, + 0x1718c: 0x4044a020, 0x1718d: 0x4044a220, 0x1718e: 0x4044a420, 0x1718f: 0x4044a620, + 0x17190: 0x4044a820, 0x17191: 0x4044aa20, 0x17192: 0x4044ac20, 0x17193: 0x4044ae20, + 0x17194: 0x4044b020, 0x17195: 0x4044b220, 0x17196: 0x4044b420, + 0x1719a: 0x4044b620, 0x1719b: 0x4044b820, + 0x1719c: 0x4044ba20, 0x1719d: 0x4044bc20, 0x1719e: 0x4044be20, 0x1719f: 0x4044c020, + 0x171a0: 0x4044c220, 0x171a1: 0x4044c420, 0x171a2: 0x4044c620, 0x171a3: 0x4044c820, + 0x171a4: 0x4044ce20, 0x171a5: 0x4044cc20, 0x171a6: 0x4044ce20, 0x171a7: 0x4044d020, + 0x171a8: 0x4044d220, 0x171a9: 0x4044d420, 0x171aa: 0x4044d620, 0x171ab: 0x4044d820, + 0x171ac: 0x4044da20, 0x171ad: 0x4044dc20, 0x171ae: 0x4044de20, 0x171af: 0x4044e020, + 0x171b0: 0x4044e220, 0x171b1: 0x4044e420, 0x171b3: 0x4044e620, + 0x171b4: 0x4044e820, 0x171b5: 0x4044ea20, 0x171b6: 0x4044ec20, 0x171b7: 0x4044ee20, + 0x171b8: 0x4044f020, 0x171b9: 0x4044f220, 0x171ba: 0x4044f420, 0x171bb: 0x4044f620, + 0x171bd: 0x4044f820, + // Block 0x5c7, offset 0x171c0 + 0x171c0: 0xa0000000, 0x171c1: 0xa0000000, 0x171c2: 0xa0000000, 0x171c3: 0xa0000000, + 0x171c4: 0xa0000000, 0x171c5: 0xa0000000, 0x171c6: 0xa0000000, 0x171c7: 0xa0000000, + 0x171c8: 0xa0000000, 0x171c9: 0x40020020, 0x171ca: 0x40020220, 0x171cb: 0x40020420, + 0x171cc: 0x40020620, 0x171cd: 0x40020820, 0x171ce: 0xa0000000, 0x171cf: 0xa0000000, + 0x171d0: 0xa0000000, 0x171d1: 0xa0000000, 0x171d2: 0xa0000000, 0x171d3: 0xa0000000, + 0x171d4: 0xa0000000, 0x171d5: 0xa0000000, 0x171d6: 0xa0000000, 0x171d7: 0xa0000000, + 0x171d8: 0xa0000000, 0x171d9: 0xa0000000, 0x171da: 0xa0000000, 0x171db: 0xa0000000, + 0x171dc: 0xa0000000, 0x171dd: 0xa0000000, 0x171de: 0xa0000000, 0x171df: 0xa0000000, + 0x171e0: 0x40021220, 0x171e1: 0x4002ba20, 0x171e2: 0x4003e020, 0x171e3: 0x4004ea20, + 0x171e4: 0x4027de20, 0x171e5: 0x4004ec20, 0x171e6: 0x4004e620, 0x171e7: 0x4003d220, + 0x171e8: 0x4003f420, 0x171e9: 0x4003f620, 0x171ea: 0x4004d820, 0x171eb: 0x40093820, + 0x171ec: 0x40024020, 0x171ed: 0x40021a20, 0x171ee: 0x4002e420, 0x171ef: 0x4004e220, + 0x171f0: 0x4029cc20, 0x171f1: 0x4029ce20, 0x171f2: 0x4029d020, 0x171f3: 0x4029d220, + 0x171f4: 0x4029d420, 0x171f5: 0x4029d620, 0x171f6: 0x4029d820, 0x171f7: 0x4029da20, + 0x171f8: 0x4029dc20, 0x171f9: 0x4029de20, 0x171fa: 0x40026c20, 0x171fb: 0x40026220, + 0x171fc: 0x40094020, 0x171fd: 0x40094220, 0x171fe: 0x40094420, 0x171ff: 0x4002c420, + // Block 0x5c8, offset 0x17200 + 0x17200: 0x4004d620, 0x17201: 0xce900071, 0x17202: 0x002c0a88, 0x17203: 0xc3590953, + 0x17204: 0x002c6288, 0x17205: 0x002c9888, 0x17206: 0x002d0888, 0x17207: 0x002d2288, + 0x17208: 0x002d6888, 0x17209: 0x002d9a88, 0x1720a: 0x002dcc88, 0x1720b: 0x002dfe88, + 0x1720c: 0xc0030002, 0x1720d: 0x002e8288, 0x1720e: 0x002e9e88, 0x1720f: 0xc33f2741, + 0x17210: 0x002f2c88, 0x17211: 0x002f5688, 0x17212: 0xc35f0991, 0x17213: 0xc3430991, + 0x17214: 0x00302c88, 0x17215: 0x00306c88, 0x17216: 0x0030be88, 0x17217: 0x0030e288, + 0x17218: 0x0030f688, 0x17219: 0x00310088, 0x1721a: 0xc3630991, 0x1721b: 0x4003f820, + 0x1721c: 0x4004e420, 0x1721d: 0x4003fa20, 0x1721e: 0x40062420, 0x1721f: 0x40021620, + 0x17220: 0x40061e20, 0x17221: 0xce8e0071, 0x17222: 0x402c0a20, 0x17223: 0xc3550953, + 0x17224: 0x402c6220, 0x17225: 0x402c9820, 0x17226: 0x402d0820, 0x17227: 0x402d2220, + 0x17228: 0x402d6820, 0x17229: 0x402d9a20, 0x1722a: 0x402dcc20, 0x1722b: 0x402dfe20, + 0x1722c: 0xc0000002, 0x1722d: 0x402e8220, 0x1722e: 0x402e9e20, 0x1722f: 0xc33d2741, + 0x17230: 0x402f2c20, 0x17231: 0x402f5620, 0x17232: 0xc35d0991, 0x17233: 0xc3410991, + 0x17234: 0x40302c20, 0x17235: 0x40306c20, 0x17236: 0x4030be20, 0x17237: 0x4030e220, + 0x17238: 0x4030f620, 0x17239: 0x40310020, 0x1723a: 0xc3610991, 0x1723b: 0x4003fc20, + 0x1723c: 0x40094820, 0x1723d: 0x4003fe20, 0x1723e: 0x40094c20, 0x1723f: 0xa0000000, + // Block 0x5c9, offset 0x17240 + 0x17240: 0xe00008f5, 0x17241: 0xe00008ef, 0x17242: 0xe0000921, 0x17243: 0xe0000969, + 0x17244: 0x002be083, 0x17245: 0xe000094d, 0x17246: 0xe00009dd, 0x17247: 0xe0000a53, + 0x17248: 0xe0000ae8, 0x17249: 0xe0000ae2, 0x1724a: 0xe0000af4, 0x1724b: 0xe0000b20, + 0x1724c: 0xe0000c2b, 0x1724d: 0xe0000c25, 0x1724e: 0xe0000c37, 0x1724f: 0xe0000c43, + 0x17250: 0xe0000ab3, 0x17251: 0xe0000d63, 0x17252: 0xe0000d9a, 0x17253: 0xe0000d94, + 0x17254: 0x002ee483, 0x17255: 0xe0000de6, 0x17256: 0xe0000dd2, 0x17257: 0x40093e20, + 0x17258: 0xe0000e12, 0x17259: 0xe0000fe1, 0x1725a: 0xe0000fdb, 0x1725b: 0xe0000fed, + 0x1725c: 0xe0000fff, 0x1725d: 0xe0001102, 0x1725e: 0x00318888, 0x1725f: 0xe0000f7b, + 0x17260: 0xe00008f2, 0x17261: 0xe00008ec, 0x17262: 0xe000091e, 0x17263: 0xe0000966, + 0x17264: 0x402be020, 0x17265: 0xe000094a, 0x17266: 0xe00009d5, 0x17267: 0xe0000a4d, + 0x17268: 0xe0000ae5, 0x17269: 0xe0000adf, 0x1726a: 0xe0000af1, 0x1726b: 0xe0000b1d, + 0x1726c: 0xe0000c28, 0x1726d: 0xe0000c22, 0x1726e: 0xe0000c34, 0x1726f: 0xe0000c40, + 0x17270: 0xe0000aad, 0x17271: 0xe0000d60, 0x17272: 0xe0000d97, 0x17273: 0xe0000d91, + 0x17274: 0x402ee420, 0x17275: 0xe0000de3, 0x17276: 0xe0000dcf, 0x17277: 0x40093c20, + 0x17278: 0xe0000e0f, 0x17279: 0xe0000fde, 0x1727a: 0xe0000fd8, 0x1727b: 0xe0000fea, + 0x1727c: 0xe0000ffc, 0x1727d: 0xe00010ff, 0x1727e: 0x40318820, 0x1727f: 0xe0001114, + // Block 0x5ca, offset 0x17280 + 0x17280: 0x40321220, 0x17281: 0x40321a20, 0x17282: 0x40322220, 0x17283: 0x40322a20, + 0x17284: 0xe0000ad5, 0x17285: 0xe0000ad1, 0x17286: 0xe0000acd, 0x17287: 0xf0000a0a, + 0x17288: 0xf000040a, 0x17289: 0xf0000404, 0x1728a: 0xf0000a0a, 0x1728b: 0xf000040a, + 0x1728c: 0xf0000404, 0x1728d: 0xe0000947, 0x1728e: 0xe0000944, 0x1728f: 0xe0000c3d, + 0x17290: 0xe0000c3a, 0x17291: 0xe0000dcc, 0x17292: 0xe0000dc9, 0x17293: 0xe0000ff3, + 0x17294: 0xe0000ff0, 0x17295: 0xe000101e, 0x17296: 0xe000101a, 0x17297: 0xe0001006, + 0x17298: 0xe0001002, 0x17299: 0xe0001016, 0x1729a: 0xe0001012, 0x1729b: 0xe000100e, + 0x1729c: 0xe000100a, 0x1729d: 0x402cae20, 0x1729e: 0xe00038f2, 0x1729f: 0xe00038ef, + 0x172a0: 0xe0000976, 0x172a1: 0xe0000972, 0x172a2: 0xe00009f4, 0x172a3: 0xe00009ef, + 0x172a4: 0x002d3a88, 0x172a5: 0x402d3a20, 0x172a6: 0xe0000bbe, 0x172a7: 0xe0000bbb, + 0x172a8: 0xe0000c99, 0x172a9: 0xe0000c96, 0x172aa: 0xe0000e20, 0x172ab: 0xe0000e1d, + 0x172ac: 0xe0000e27, 0x172ad: 0xe0000e23, 0x172ae: 0xe0001162, 0x172af: 0xe000115f, + 0x172b0: 0xe0000c8d, 0x172b1: 0xf0000a0a, 0x172b2: 0xf000040a, 0x172b3: 0xf0000404, + 0x172b4: 0xe0000bac, 0x172b5: 0xe0000ba9, 0x172b6: 0x002d7888, 0x172b7: 0x00319488, + 0x172b8: 0xe0000d57, 0x172b9: 0xe0000d54, 0x172ba: 0xe0000954, 0x172bb: 0xe0000950, + 0x172bc: 0xe00009ea, 0x172bd: 0xe00009e5, 0x172be: 0xe0000e19, 0x172bf: 0xe0000e15, + // Block 0x5cb, offset 0x172c0 + 0x172c0: 0xe0000b03, 0x172c1: 0xe0000aff, 0x172c2: 0xe0000b13, 0x172c3: 0xe0000b0f, + 0x172c4: 0xe0000b0b, 0x172c5: 0xe0000b07, 0x172c6: 0xe0000b75, 0x172c7: 0xe0000b71, + 0x172c8: 0xe0000c66, 0x172c9: 0xe0000c63, 0x172ca: 0xe0000c78, 0x172cb: 0xe0000c75, + 0x172cc: 0xe0000e84, 0x172cd: 0xe0000e81, 0x172ce: 0xe0000e44, 0x172cf: 0xe0000e41, + 0x172d0: 0xe000ad5f, 0x172d1: 0xe000ad5c, 0x172d2: 0xe000ad65, 0x172d3: 0xe000ad62, + 0x172d4: 0xe000ad6b, 0x172d5: 0xe000ad68, 0x172d6: 0xe0002946, 0x172d7: 0xe0002943, + 0x172d8: 0xe000ad71, 0x172d9: 0xe000ad6e, 0x172da: 0xe0000e5d, 0x172db: 0xe0000e59, + 0x172dc: 0xe0000e65, 0x172dd: 0xe0000e61, 0x172de: 0xe0000e75, 0x172df: 0xe0000e71, + 0x172e0: 0xe0000e6d, 0x172e1: 0xe0000e69, 0x172e2: 0xe0000e7d, 0x172e3: 0xe0000e79, + 0x172e4: 0xe000108d, 0x172e5: 0xe000108a, 0x172e6: 0xe000104d, 0x172e7: 0xe000104a, + 0x172e8: 0xe0001066, 0x172e9: 0xe0001062, 0x172ea: 0xe000106e, 0x172eb: 0xe000106a, + 0x172ec: 0xe000107e, 0x172ed: 0xe000107a, 0x172ee: 0xe0001076, 0x172ef: 0xe0001072, + 0x172f0: 0xe0001086, 0x172f1: 0xe0001082, 0x172f2: 0xe0001108, 0x172f3: 0xe0001105, + 0x172f4: 0xe0001135, 0x172f5: 0xe0001132, 0x172f6: 0xe000112f, 0x172f7: 0xe000112c, + 0x172f8: 0xe000111d, 0x172f9: 0xe000111a, 0x172fa: 0xe0000d0a, 0x172fb: 0xe0000d07, + 0x172fc: 0x0030d888, 0x172fd: 0x4030d820, 0x172fe: 0x00312088, 0x172ff: 0x40312020, + // Block 0x5cc, offset 0x17300 + 0x17300: 0xa0000000, 0x17301: 0xa0000000, 0x17302: 0xa0000000, 0x17303: 0xa0000000, + 0x17304: 0xa0000000, 0x17305: 0xa0000000, 0x17306: 0xa0000000, 0x17307: 0xa0000000, + 0x17308: 0xa0000000, 0x17309: 0x40020020, 0x1730a: 0x40020220, 0x1730b: 0x40020420, + 0x1730c: 0x40020620, 0x1730d: 0x40020820, 0x1730e: 0xa0000000, 0x1730f: 0xa0000000, + 0x17310: 0xa0000000, 0x17311: 0xa0000000, 0x17312: 0xa0000000, 0x17313: 0xa0000000, + 0x17314: 0xa0000000, 0x17315: 0xa0000000, 0x17316: 0xa0000000, 0x17317: 0xa0000000, + 0x17318: 0xa0000000, 0x17319: 0xa0000000, 0x1731a: 0xa0000000, 0x1731b: 0xa0000000, + 0x1731c: 0xa0000000, 0x1731d: 0xa0000000, 0x1731e: 0xa0000000, 0x1731f: 0xa0000000, + 0x17320: 0x40021220, 0x17321: 0x4002ba20, 0x17322: 0x4003e020, 0x17323: 0x4004ea20, + 0x17324: 0x4027de20, 0x17325: 0x4004ec20, 0x17326: 0x4004e620, 0x17327: 0x4003d220, + 0x17328: 0x4003f420, 0x17329: 0x4003f620, 0x1732a: 0x4004d820, 0x1732b: 0x40093820, + 0x1732c: 0x40024020, 0x1732d: 0x40021a20, 0x1732e: 0x4002e420, 0x1732f: 0x4004e220, + 0x17330: 0x4029cc20, 0x17331: 0x4029ce20, 0x17332: 0x4029d020, 0x17333: 0x4029d220, + 0x17334: 0x4029d420, 0x17335: 0x4029d620, 0x17336: 0x4029d820, 0x17337: 0x4029da20, + 0x17338: 0x4029dc20, 0x17339: 0x4029de20, 0x1733a: 0x40026c20, 0x1733b: 0x40026220, + 0x1733c: 0x40094020, 0x1733d: 0x40094220, 0x1733e: 0x40094420, 0x1733f: 0x4002c420, + // Block 0x5cd, offset 0x17340 + 0x17340: 0x4004d620, 0x17341: 0x002bde88, 0x17342: 0x002c0a88, 0x17343: 0xc59b2891, + 0x17344: 0x002c6288, 0x17345: 0x002c9888, 0x17346: 0x002d0888, 0x17347: 0x002d2288, + 0x17348: 0x002d6888, 0x17349: 0x002d9a88, 0x1734a: 0x002dcc88, 0x1734b: 0x002dfe88, + 0x1734c: 0xc0030002, 0x1734d: 0x002e8288, 0x1734e: 0x002e9e88, 0x1734f: 0x002ee288, + 0x17350: 0x002f2c88, 0x17351: 0x002f5688, 0x17352: 0x002f7a88, 0x17353: 0xc3430991, + 0x17354: 0x00302c88, 0x17355: 0x00306c88, 0x17356: 0x0030be88, 0x17357: 0x0030e288, + 0x17358: 0x0030f688, 0x17359: 0x00310088, 0x1735a: 0xc3630991, 0x1735b: 0x4003f820, + 0x1735c: 0x4004e420, 0x1735d: 0x4003fa20, 0x1735e: 0x40062420, 0x1735f: 0x40021620, + 0x17360: 0x40061e20, 0x17361: 0x402bde20, 0x17362: 0x402c0a20, 0x17363: 0xc5982891, + 0x17364: 0x402c6220, 0x17365: 0x402c9820, 0x17366: 0x402d0820, 0x17367: 0x402d2220, + 0x17368: 0x402d6820, 0x17369: 0x402d9a20, 0x1736a: 0x402dcc20, 0x1736b: 0x402dfe20, + 0x1736c: 0xc0000002, 0x1736d: 0x402e8220, 0x1736e: 0x402e9e20, 0x1736f: 0x402ee220, + 0x17370: 0x402f2c20, 0x17371: 0x402f5620, 0x17372: 0x402f7a20, 0x17373: 0xc3410991, + 0x17374: 0x40302c20, 0x17375: 0x40306c20, 0x17376: 0x4030be20, 0x17377: 0x4030e220, + 0x17378: 0x4030f620, 0x17379: 0x40310020, 0x1737a: 0xc3610991, 0x1737b: 0x4003fc20, + 0x1737c: 0x40094820, 0x1737d: 0x4003fe20, 0x1737e: 0x40094c20, 0x1737f: 0xa0000000, + // Block 0x5ce, offset 0x17380 + 0x17380: 0xe0000983, 0x17381: 0xe0000980, 0x17382: 0xe00008fb, 0x17383: 0xe00008f8, + 0x17384: 0xe000097d, 0x17385: 0xe000097a, 0x17386: 0x002c3e83, 0x17387: 0x402c3e20, + 0x17388: 0xe0000a3e, 0x17389: 0xe0000a3b, 0x1738a: 0xe0000a4a, 0x1738b: 0xe0000a47, + 0x1738c: 0x002c3c83, 0x1738d: 0x402c3c20, 0x1738e: 0xe0000a86, 0x1738f: 0xe0000a83, + 0x17390: 0x002c6483, 0x17391: 0x402c6420, 0x17392: 0xe0000b46, 0x17393: 0xe0000b43, + 0x17394: 0xe0000aee, 0x17395: 0xe0000aeb, 0x17396: 0xe0000b2c, 0x17397: 0xe0000b29, + 0x17398: 0xe0000b40, 0x17399: 0xe0000b3d, 0x1739a: 0xe0000b1a, 0x1739b: 0xe0000b17, + 0x1739c: 0xe0000bb8, 0x1739d: 0xe0000bb5, 0x1739e: 0xe0000bb2, 0x1739f: 0xe0000baf, + 0x173a0: 0xe0000bc4, 0x173a1: 0xe0000bc1, 0x173a2: 0xe0000bca, 0x173a3: 0xe0000bc7, + 0x173a4: 0xe0000bee, 0x173a5: 0xe0000beb, 0x173a6: 0xe0000c1b, 0x173a7: 0xe0000c18, + 0x173a8: 0xe0000c51, 0x173a9: 0xe0000c4e, 0x173aa: 0xe0000c60, 0x173ab: 0xe0000c5d, + 0x173ac: 0xe0000c31, 0x173ad: 0xe0000c2e, 0x173ae: 0xe0000c5a, 0x173af: 0xe0000c57, + 0x173b0: 0xe0000c54, 0x173b1: 0x402da220, 0x173b2: 0xf0000a0a, 0x173b3: 0xf0000404, + 0x173b4: 0xe0000c8a, 0x173b5: 0xe0000c87, 0x173b6: 0xe0000c9f, 0x173b7: 0xe0000c9c, + 0x173b8: 0x402f7220, 0x173b9: 0xe0000ccc, 0x173ba: 0xe0000cc9, 0x173bb: 0xe0000cd8, + 0x173bc: 0xe0000cd5, 0x173bd: 0xe0000cd2, 0x173be: 0xe0000ccf, 0x173bf: 0xe0000d04, + // Block 0x5cf, offset 0x173c0 + 0x173c0: 0xa0000000, 0x173c1: 0xa0000000, 0x173c2: 0xa0000000, 0x173c3: 0xa0000000, + 0x173c4: 0xa0000000, 0x173c5: 0xa0000000, 0x173c6: 0xa0000000, 0x173c7: 0xa0000000, + 0x173c8: 0xa0000000, 0x173c9: 0x40020020, 0x173ca: 0x40020220, 0x173cb: 0x40020420, + 0x173cc: 0x40020620, 0x173cd: 0x40020820, 0x173ce: 0xa0000000, 0x173cf: 0xa0000000, + 0x173d0: 0xa0000000, 0x173d1: 0xa0000000, 0x173d2: 0xa0000000, 0x173d3: 0xa0000000, + 0x173d4: 0xa0000000, 0x173d5: 0xa0000000, 0x173d6: 0xa0000000, 0x173d7: 0xa0000000, + 0x173d8: 0xa0000000, 0x173d9: 0xa0000000, 0x173da: 0xa0000000, 0x173db: 0xa0000000, + 0x173dc: 0xa0000000, 0x173dd: 0xa0000000, 0x173de: 0xa0000000, 0x173df: 0xa0000000, + 0x173e0: 0x40021220, 0x173e1: 0x4002ba20, 0x173e2: 0x4003e020, 0x173e3: 0x4004ea20, + 0x173e4: 0x4027de20, 0x173e5: 0x4004ec20, 0x173e6: 0x4004e620, 0x173e7: 0x4003d220, + 0x173e8: 0x4003f420, 0x173e9: 0x4003f620, 0x173ea: 0x4004d820, 0x173eb: 0x40093820, + 0x173ec: 0x40024020, 0x173ed: 0x40021a20, 0x173ee: 0x4002e420, 0x173ef: 0x4004e220, + 0x173f0: 0x4029cc20, 0x173f1: 0x4029ce20, 0x173f2: 0x4029d020, 0x173f3: 0x4029d220, + 0x173f4: 0x4029d420, 0x173f5: 0x4029d620, 0x173f6: 0x4029d820, 0x173f7: 0x4029da20, + 0x173f8: 0x4029dc20, 0x173f9: 0x4029de20, 0x173fa: 0x40026c20, 0x173fb: 0x40026220, + 0x173fc: 0x40094020, 0x173fd: 0x40094220, 0x173fe: 0x40094420, 0x173ff: 0x4002c420, + // Block 0x5d0, offset 0x17400 + 0x17400: 0x4004d620, 0x17401: 0x002bde88, 0x17402: 0x002c0a88, 0x17403: 0xcb170911, + 0x17404: 0xceec09c2, 0x17405: 0xc6360071, 0x17406: 0x002d0888, 0x17407: 0xceef2a52, + 0x17408: 0x002d6888, 0x17409: 0x002d9a88, 0x1740a: 0x002dcc88, 0x1740b: 0x002dfe88, + 0x1740c: 0xcef60ac4, 0x1740d: 0x002e8288, 0x1740e: 0xcefb2a52, 0x1740f: 0x002ee288, + 0x17410: 0x002f2c88, 0x17411: 0x002f5688, 0x17412: 0xcefe9872, 0x17413: 0xcf0109c2, + 0x17414: 0xcf0609c2, 0x17415: 0x00306c88, 0x17416: 0x0030be88, 0x17417: 0x0030e288, + 0x17418: 0xcf0b09c2, 0x17419: 0x00310088, 0x1741a: 0xcf0e09c2, 0x1741b: 0x4003f820, + 0x1741c: 0x4004e420, 0x1741d: 0x4003fa20, 0x1741e: 0x40062420, 0x1741f: 0x40021620, + 0x17420: 0x40061e20, 0x17421: 0x402bde20, 0x17422: 0x402c0a20, 0x17423: 0xcb150911, + 0x17424: 0xceea09b1, 0x17425: 0xc6340071, 0x17426: 0x402d0820, 0x17427: 0xcb192a41, + 0x17428: 0x402d6820, 0x17429: 0x402d9a20, 0x1742a: 0x402dcc20, 0x1742b: 0x402dfe20, + 0x1742c: 0xcef20a73, 0x1742d: 0x402e8220, 0x1742e: 0xcb292a41, 0x1742f: 0x402ee220, + 0x17430: 0x402f2c20, 0x17431: 0x402f5620, 0x17432: 0xcb2d9861, 0x17433: 0xcb3109b1, + 0x17434: 0xcf0409b1, 0x17435: 0x40306c20, 0x17436: 0x4030be20, 0x17437: 0x4030e220, + 0x17438: 0xcf0909b1, 0x17439: 0x40310020, 0x1743a: 0xcb3509b1, 0x1743b: 0x4003fc20, + 0x1743c: 0x40094820, 0x1743d: 0x4003fe20, 0x1743e: 0x40094c20, 0x1743f: 0xa0000000, + // Block 0x5d1, offset 0x17440 + 0x17440: 0xe00008f5, 0x17441: 0xe00008ef, 0x17442: 0xe0000921, 0x17443: 0xe0000969, + 0x17444: 0xe000095b, 0x17445: 0xe000094d, 0x17446: 0xe00009dd, 0x17447: 0x002c6083, + 0x17448: 0xe0000ae8, 0x17449: 0xe0000ae2, 0x1744a: 0xe0000af4, 0x1744b: 0x002d0683, + 0x1744c: 0xe0000c2b, 0x1744d: 0xe0000c25, 0x1744e: 0xe0000c37, 0x1744f: 0xe0000c43, + 0x17450: 0xe0000ab3, 0x17451: 0xe0000d63, 0x17452: 0xe0000d9a, 0x17453: 0xe0000d94, + 0x17454: 0xe0000da6, 0x17455: 0xe0000de6, 0x17456: 0xe0000dd2, 0x17457: 0x40093e20, + 0x17458: 0xe0000e12, 0x17459: 0xe0000fe1, 0x1745a: 0xe0000fdb, 0x1745b: 0xe0000fed, + 0x1745c: 0xe0000fff, 0x1745d: 0xe0001102, 0x1745e: 0x00318888, 0x1745f: 0xe0000f7b, + 0x17460: 0xe00008f2, 0x17461: 0xe00008ec, 0x17462: 0xe000091e, 0x17463: 0xe0000966, + 0x17464: 0xe0000958, 0x17465: 0xe000094a, 0x17466: 0xe00009d5, 0x17467: 0x402c6020, + 0x17468: 0xe0000ae5, 0x17469: 0xe0000adf, 0x1746a: 0xe0000af1, 0x1746b: 0x402d0620, + 0x1746c: 0xe0000c28, 0x1746d: 0xe0000c22, 0x1746e: 0xe0000c34, 0x1746f: 0xe0000c40, + 0x17470: 0xe0000aad, 0x17471: 0xe0000d60, 0x17472: 0xe0000d97, 0x17473: 0xe0000d91, + 0x17474: 0xe0000da3, 0x17475: 0xe0000de3, 0x17476: 0xe0000dcf, 0x17477: 0x40093c20, + 0x17478: 0xe0000e0f, 0x17479: 0xe0000fde, 0x1747a: 0xe0000fd8, 0x1747b: 0xe0000fea, + 0x1747c: 0xe0000ffc, 0x1747d: 0xe00010ff, 0x1747e: 0x40318820, 0x1747f: 0xe0001114, + // Block 0x5d2, offset 0x17480 + 0x17480: 0xe00009b1, 0x17481: 0xe00009ae, 0x17482: 0xe0000a22, 0x17483: 0xe0000a1f, + 0x17484: 0xe0000a28, 0x17485: 0xe0000a25, 0x17486: 0xe0000a2e, 0x17487: 0xe0000a2b, + 0x17488: 0xe000ade6, 0x17489: 0xe000ade3, 0x1748a: 0xe0000a8c, 0x1748b: 0xe0000a89, + 0x1748c: 0xe0000a98, 0x1748d: 0xe0000a95, 0x1748e: 0xe0000aa4, 0x1748f: 0xe0000aa1, + 0x17490: 0xe0000a92, 0x17491: 0xe0000a8f, 0x17492: 0xe0000a9e, 0x17493: 0xe0000a9b, + 0x17494: 0xe0000b55, 0x17495: 0xe0000b51, 0x17496: 0xe0000b4d, 0x17497: 0xe0000b49, + 0x17498: 0xe0000b7c, 0x17499: 0xe0000b79, 0x1749a: 0xe0000b82, 0x1749b: 0xe0000b7f, + 0x1749c: 0xe0000b39, 0x1749d: 0xe0000b35, 0x1749e: 0xe0000b8c, 0x1749f: 0xe0000b89, + 0x174a0: 0xe0000bd0, 0x174a1: 0xe0000bcd, 0x174a2: 0xe0000c00, 0x174a3: 0xe0000bfd, + 0x174a4: 0xe0000c0c, 0x174a5: 0xe0000c09, 0x174a6: 0xe0000bfa, 0x174a7: 0xe0000bf7, + 0x174a8: 0xe0000c06, 0x174a9: 0xe0000c03, 0x174aa: 0xe0000c12, 0x174ab: 0xe0000c0f, + 0x174ac: 0xe0000c7e, 0x174ad: 0xe0000c7b, 0x174ae: 0xe0000c4a, 0x174af: 0xe0000c46, + 0x174b0: 0xe0000c93, 0x174b1: 0xe0000c90, 0x174b2: 0xe0000cab, 0x174b3: 0xe0000ca8, + 0x174b4: 0xe0000cb1, 0x174b5: 0xe0000cae, 0x174b6: 0xe0000cde, 0x174b7: 0xe0000cdb, + 0x174b8: 0xe0000ce5, 0x174b9: 0xe0000ce1, 0x174ba: 0xe0000cf2, 0x174bb: 0xe0000cef, + 0x174bc: 0xe0000cec, 0x174bd: 0xe0000ce9, 0x174be: 0xe0000d1e, 0x174bf: 0xe0000d1b, + // Block 0x5d3, offset 0x174c0 + 0x174c0: 0xa0000000, 0x174c1: 0xa0000000, 0x174c2: 0xa0000000, 0x174c3: 0xa0000000, + 0x174c4: 0xa0000000, 0x174c5: 0xa0000000, 0x174c6: 0xa0000000, 0x174c7: 0xa0000000, + 0x174c8: 0xa0000000, 0x174c9: 0x40020020, 0x174ca: 0x40020220, 0x174cb: 0x40020420, + 0x174cc: 0x40020620, 0x174cd: 0x40020820, 0x174ce: 0xa0000000, 0x174cf: 0xa0000000, + 0x174d0: 0xa0000000, 0x174d1: 0xa0000000, 0x174d2: 0xa0000000, 0x174d3: 0xa0000000, + 0x174d4: 0xa0000000, 0x174d5: 0xa0000000, 0x174d6: 0xa0000000, 0x174d7: 0xa0000000, + 0x174d8: 0xa0000000, 0x174d9: 0xa0000000, 0x174da: 0xa0000000, 0x174db: 0xa0000000, + 0x174dc: 0xa0000000, 0x174dd: 0xa0000000, 0x174de: 0xa0000000, 0x174df: 0xa0000000, + 0x174e0: 0x40021220, 0x174e1: 0x4002ba20, 0x174e2: 0x4003e020, 0x174e3: 0x4004ea20, + 0x174e4: 0x4027de20, 0x174e5: 0x4004ec20, 0x174e6: 0x4004e620, 0x174e7: 0x4003d220, + 0x174e8: 0x4003f420, 0x174e9: 0x4003f620, 0x174ea: 0x4004d820, 0x174eb: 0x40093820, + 0x174ec: 0x40024020, 0x174ed: 0x40021a20, 0x174ee: 0x4002e420, 0x174ef: 0x4004e220, + 0x174f0: 0x4029cc20, 0x174f1: 0x4029ce20, 0x174f2: 0x4029d020, 0x174f3: 0x4029d220, + 0x174f4: 0x4029d420, 0x174f5: 0x4029d620, 0x174f6: 0x4029d820, 0x174f7: 0x4029da20, + 0x174f8: 0x4029dc20, 0x174f9: 0x4029de20, 0x174fa: 0x40026c20, 0x174fb: 0x40026220, + 0x174fc: 0x40094020, 0x174fd: 0x40094220, 0x174fe: 0x40094420, 0x174ff: 0x4002c420, + // Block 0x5d4, offset 0x17500 + 0x17500: 0x4004d620, 0x17501: 0xc57327b1, 0x17502: 0x002c0a88, 0x17503: 0x002c3a88, + 0x17504: 0x002c6288, 0x17505: 0xcf130be1, 0x17506: 0x002d0888, 0x17507: 0x002d2288, + 0x17508: 0x002d6888, 0x17509: 0x002d9a88, 0x1750a: 0x002dcc88, 0x1750b: 0x002dfe88, + 0x1750c: 0xc0030002, 0x1750d: 0x002e8288, 0x1750e: 0x002e9e88, 0x1750f: 0xcf199891, + 0x17510: 0x002f2c88, 0x17511: 0x002f5688, 0x17512: 0x002f7a88, 0x17513: 0x002fe688, + 0x17514: 0x00302c88, 0x17515: 0xc3900b21, 0x17516: 0x0030be88, 0x17517: 0x0030e288, + 0x17518: 0x0030f688, 0x17519: 0x00310088, 0x1751a: 0x00312a88, 0x1751b: 0x4003f820, + 0x1751c: 0x4004e420, 0x1751d: 0x4003fa20, 0x1751e: 0x40062420, 0x1751f: 0x40021620, + 0x17520: 0x40061e20, 0x17521: 0xc57027b1, 0x17522: 0x402c0a20, 0x17523: 0x402c3a20, + 0x17524: 0x402c6220, 0x17525: 0xcf110be1, 0x17526: 0x402d0820, 0x17527: 0x402d2220, + 0x17528: 0x402d6820, 0x17529: 0x402d9a20, 0x1752a: 0x402dcc20, 0x1752b: 0x402dfe20, + 0x1752c: 0xc0000002, 0x1752d: 0x402e8220, 0x1752e: 0x402e9e20, 0x1752f: 0xcf159891, + 0x17530: 0x402f2c20, 0x17531: 0x402f5620, 0x17532: 0x402f7a20, 0x17533: 0x402fe620, + 0x17534: 0x40302c20, 0x17535: 0xc38d0b21, 0x17536: 0x4030be20, 0x17537: 0x4030e220, + 0x17538: 0x4030f620, 0x17539: 0x40310020, 0x1753a: 0x40312a20, 0x1753b: 0x4003fc20, + 0x1753c: 0x40094820, 0x1753d: 0x4003fe20, 0x1753e: 0x40094c20, 0x1753f: 0xa0000000, + // Block 0x5d5, offset 0x17540 + 0x17540: 0xe00008f5, 0x17541: 0xe00008ef, 0x17542: 0xe0000921, 0x17543: 0xe0000969, + 0x17544: 0x00320e83, 0x17545: 0x00320c83, 0x17546: 0x00320ea3, 0x17547: 0xe0000a53, + 0x17548: 0xe0000ae8, 0x17549: 0xe0000ae2, 0x1754a: 0xe0000af4, 0x1754b: 0xe0000b20, + 0x1754c: 0xe0000c2b, 0x1754d: 0xe0000c25, 0x1754e: 0xe0000c37, 0x1754f: 0xe0000c43, + 0x17550: 0x002c62c3, 0x17551: 0xe0000d63, 0x17552: 0xe0000d9a, 0x17553: 0xe0000d94, + 0x17554: 0x00321103, 0x17555: 0xe0000de6, 0x17556: 0x00321083, 0x17557: 0x40093e20, + 0x17558: 0x003210a3, 0x17559: 0xe0000fe1, 0x1755a: 0xe0000fdb, 0x1755b: 0xe0000fed, + 0x1755c: 0x003100a3, 0x1755d: 0xe0001102, 0x1755e: 0xe0002973, 0x1755f: 0xe0000f7b, + 0x17560: 0xe00008f2, 0x17561: 0xe00008ec, 0x17562: 0xe000091e, 0x17563: 0xe0000966, + 0x17564: 0x40320e20, 0x17565: 0x40320c20, 0x17566: 0x40320e21, 0x17567: 0xe0000a4d, + 0x17568: 0xe0000ae5, 0x17569: 0xe0000adf, 0x1756a: 0xe0000af1, 0x1756b: 0xe0000b1d, + 0x1756c: 0xe0000c28, 0x1756d: 0xe0000c22, 0x1756e: 0xe0000c34, 0x1756f: 0xe0000c40, + 0x17570: 0x402c6222, 0x17571: 0xe0000d60, 0x17572: 0xe0000d97, 0x17573: 0xe0000d91, + 0x17574: 0x40321024, 0x17575: 0xe0000de3, 0x17576: 0x40321020, 0x17577: 0x40093c20, + 0x17578: 0x40321021, 0x17579: 0xe0000fde, 0x1757a: 0xe0000fd8, 0x1757b: 0xe0000fea, + 0x1757c: 0x40310021, 0x1757d: 0xe00010ff, 0x1757e: 0xe0002970, 0x1757f: 0xe0001114, + // Block 0x5d6, offset 0x17580 + 0x17580: 0xe0000983, 0x17581: 0xe0000980, 0x17582: 0xe00008fb, 0x17583: 0xe00008f8, + 0x17584: 0xe000097d, 0x17585: 0xe000097a, 0x17586: 0xe0000a38, 0x17587: 0xe0000a35, + 0x17588: 0xe0000a3e, 0x17589: 0xe0000a3b, 0x1758a: 0xe0000a4a, 0x1758b: 0xe0000a47, + 0x1758c: 0xe0000a44, 0x1758d: 0xe0000a41, 0x1758e: 0xe0000a86, 0x1758f: 0xe0000a83, + 0x17590: 0x002c62a3, 0x17591: 0x402c6221, 0x17592: 0xe0000b46, 0x17593: 0xe0000b43, + 0x17594: 0xe0000aee, 0x17595: 0xe0000aeb, 0x17596: 0xe0000b2c, 0x17597: 0xe0000b29, + 0x17598: 0x00320ec3, 0x17599: 0x40320e22, 0x1759a: 0xe0000b1a, 0x1759b: 0xe0000b17, + 0x1759c: 0xe0000bb8, 0x1759d: 0xe0000bb5, 0x1759e: 0xe0000bb2, 0x1759f: 0xe0000baf, + 0x175a0: 0xe0000bc4, 0x175a1: 0xe0000bc1, 0x175a2: 0xe0000bca, 0x175a3: 0xe0000bc7, + 0x175a4: 0xe0000bee, 0x175a5: 0xe0000beb, 0x175a6: 0xe0000c1b, 0x175a7: 0xe0000c18, + 0x175a8: 0xe0000c51, 0x175a9: 0xe0000c4e, 0x175aa: 0xe0000c60, 0x175ab: 0xe0000c5d, + 0x175ac: 0xe0000c31, 0x175ad: 0xe0000c2e, 0x175ae: 0xe0000c5a, 0x175af: 0xe0000c57, + 0x175b0: 0xe0000c54, 0x175b1: 0x402da220, 0x175b2: 0xf0000a0a, 0x175b3: 0xf0000404, + 0x175b4: 0xe0000c8a, 0x175b5: 0xe0000c87, 0x175b6: 0xe0000c9f, 0x175b7: 0xe0000c9c, + 0x175b8: 0x402f7220, 0x175b9: 0xe0000ccc, 0x175ba: 0xe0000cc9, 0x175bb: 0xe0000cd8, + 0x175bc: 0xe0000cd5, 0x175bd: 0xe0000cd2, 0x175be: 0xe0000ccf, 0x175bf: 0xe0000d04, + // Block 0x5d7, offset 0x175c0 + 0x175c0: 0xe0000cfe, 0x175c1: 0xe0000cf8, 0x175c2: 0xe0000cf5, 0x175c3: 0xe0000d51, + 0x175c4: 0xe0000d4e, 0x175c5: 0xe0000d6f, 0x175c6: 0xe0000d6c, 0x175c7: 0xe0000d5d, + 0x175c8: 0xe0000d5a, 0x175c9: 0xf0000404, 0x175ca: 0x002eda88, 0x175cb: 0x402eda20, + 0x175cc: 0xe0000e2e, 0x175cd: 0xe0000e2b, 0x175ce: 0xe0000da0, 0x175cf: 0xe0000d9d, + 0x175d0: 0x003210c3, 0x175d1: 0x40321022, 0x175d2: 0x003210e3, 0x175d3: 0x40321023, + 0x175d4: 0xe0000eca, 0x175d5: 0xe0000ec7, 0x175d6: 0xe0000edc, 0x175d7: 0xe0000ed9, + 0x175d8: 0xe0000ed0, 0x175d9: 0xe0000ecd, 0x175da: 0xe0000f1f, 0x175db: 0xe0000f1c, + 0x175dc: 0xe0000f2d, 0x175dd: 0xe0000f2a, 0x175de: 0xe0000f47, 0x175df: 0xe0000f44, + 0x175e0: 0xe0000f33, 0x175e1: 0xe0000f30, 0x175e2: 0xe0000f99, 0x175e3: 0xe0000f96, + 0x175e4: 0xe0000f8a, 0x175e5: 0xe0000f87, 0x175e6: 0x00303688, 0x175e7: 0x40303620, + 0x175e8: 0xe000102b, 0x175e9: 0xe0001028, 0x175ea: 0xe000103f, 0x175eb: 0xe000103c, + 0x175ec: 0xe0000fe7, 0x175ed: 0xe0000fe4, 0x175ee: 0xe0000ff9, 0x175ef: 0xe0000ff6, + 0x175f0: 0x003100c3, 0x175f1: 0x40310022, 0x175f2: 0xe0001039, 0x175f3: 0xe0001036, + 0x175f4: 0xe00010d8, 0x175f5: 0xe00010d5, 0x175f6: 0xe000110e, 0x175f7: 0xe000110b, + 0x175f8: 0xe0001117, 0x175f9: 0xe000113b, 0x175fa: 0xe0001138, 0x175fb: 0xe000114d, + 0x175fc: 0xe000114a, 0x175fd: 0xe0001147, 0x175fe: 0xe0001144, 0x175ff: 0xe0000f64, + // Block 0x5d8, offset 0x17600 + 0x17600: 0xe0000b03, 0x17601: 0xe0000aff, 0x17602: 0xe0000b13, 0x17603: 0xe0000b0f, + 0x17604: 0xe0000b0b, 0x17605: 0xe0000b07, 0x17606: 0xe0000b75, 0x17607: 0xe0000b71, + 0x17608: 0xe0000c66, 0x17609: 0xe0000c63, 0x1760a: 0xe0000c78, 0x1760b: 0xe0000c75, + 0x1760c: 0xe0000e84, 0x1760d: 0xe0000e81, 0x1760e: 0xe0000e44, 0x1760f: 0xe0000e41, + 0x17610: 0xe000adec, 0x17611: 0xe000ade9, 0x17612: 0xe000adf2, 0x17613: 0xe000adef, + 0x17614: 0xe000adfe, 0x17615: 0xe000adfb, 0x17616: 0xe000adf8, 0x17617: 0xe000adf5, + 0x17618: 0xe000ae04, 0x17619: 0xe000ae01, 0x1761a: 0xe0000e5d, 0x1761b: 0xe0000e59, + 0x1761c: 0xe0000e65, 0x1761d: 0xe0000e61, 0x1761e: 0xe0000e75, 0x1761f: 0xe0000e71, + 0x17620: 0xe0000e6d, 0x17621: 0xe0000e69, 0x17622: 0xe0000e7d, 0x17623: 0xe0000e79, + 0x17624: 0xe000108d, 0x17625: 0xe000108a, 0x17626: 0xe000104d, 0x17627: 0xe000104a, + 0x17628: 0xe0001066, 0x17629: 0xe0001062, 0x1762a: 0xe000106e, 0x1762b: 0xe000106a, + 0x1762c: 0xe000107e, 0x1762d: 0xe000107a, 0x1762e: 0xe0001076, 0x1762f: 0xe0001072, + 0x17630: 0xe0001086, 0x17631: 0xe0001082, 0x17632: 0xe0001108, 0x17633: 0xe0001105, + 0x17634: 0xe0001135, 0x17635: 0xe0001132, 0x17636: 0xe000112f, 0x17637: 0xe000112c, + 0x17638: 0xe000111d, 0x17639: 0xe000111a, 0x1763a: 0xe0000d0a, 0x1763b: 0xe0000d07, + 0x1763c: 0x0030d888, 0x1763d: 0x4030d820, 0x1763e: 0x00312088, 0x1763f: 0x40312020, + // Block 0x5d9, offset 0x17640 + 0x17640: 0xa0000000, 0x17641: 0xa0000000, 0x17642: 0xa0000000, 0x17643: 0xa0000000, + 0x17644: 0xa0000000, 0x17645: 0xa0000000, 0x17646: 0xa0000000, 0x17647: 0xa0000000, + 0x17648: 0xa0000000, 0x17649: 0x40020020, 0x1764a: 0x40020220, 0x1764b: 0x40020420, + 0x1764c: 0x40020620, 0x1764d: 0x40020820, 0x1764e: 0xa0000000, 0x1764f: 0xa0000000, + 0x17650: 0xa0000000, 0x17651: 0xa0000000, 0x17652: 0xa0000000, 0x17653: 0xa0000000, + 0x17654: 0xa0000000, 0x17655: 0xa0000000, 0x17656: 0xa0000000, 0x17657: 0xa0000000, + 0x17658: 0xa0000000, 0x17659: 0xa0000000, 0x1765a: 0xa0000000, 0x1765b: 0xa0000000, + 0x1765c: 0xa0000000, 0x1765d: 0xa0000000, 0x1765e: 0xa0000000, 0x1765f: 0xa0000000, + 0x17660: 0x40021220, 0x17661: 0x4002ba20, 0x17662: 0x4003e020, 0x17663: 0x4004ea20, + 0x17664: 0x4027de20, 0x17665: 0x4004ec20, 0x17666: 0x4004e620, 0x17667: 0x4003d220, + 0x17668: 0x4003f420, 0x17669: 0x4003f620, 0x1766a: 0x4004d820, 0x1766b: 0x40093820, + 0x1766c: 0x40024020, 0x1766d: 0x40021a20, 0x1766e: 0x4002e420, 0x1766f: 0x4004e220, + 0x17670: 0x4029cc20, 0x17671: 0x4029ce20, 0x17672: 0x4029d020, 0x17673: 0x4029d220, + 0x17674: 0x4029d420, 0x17675: 0x4029d620, 0x17676: 0x4029d820, 0x17677: 0x4029da20, + 0x17678: 0x4029dc20, 0x17679: 0x4029de20, 0x1767a: 0x40026c20, 0x1767b: 0x40026220, + 0x1767c: 0x40094020, 0x1767d: 0x40094220, 0x1767e: 0x40094420, 0x1767f: 0x4002c420, + // Block 0x5da, offset 0x17680 + 0x17680: 0x4004d620, 0x17681: 0xc57327b1, 0x17682: 0x002c0a88, 0x17683: 0x002c3a88, + 0x17684: 0x002c6288, 0x17685: 0xcf130be1, 0x17686: 0x002d0888, 0x17687: 0x002d2288, + 0x17688: 0x002d6888, 0x17689: 0x002d9a88, 0x1768a: 0x002dcc88, 0x1768b: 0x002dfe88, + 0x1768c: 0xc0030002, 0x1768d: 0x002e8288, 0x1768e: 0x002e9e88, 0x1768f: 0xcf199891, + 0x17690: 0x002f2c88, 0x17691: 0x002f5688, 0x17692: 0x002f7a88, 0x17693: 0x002fe688, + 0x17694: 0x00302c88, 0x17695: 0xc3900b21, 0x17696: 0x0030be83, 0x17697: 0x0030bea3, + 0x17698: 0x0030f688, 0x17699: 0x00310088, 0x1769a: 0x00312a88, 0x1769b: 0x4003f820, + 0x1769c: 0x4004e420, 0x1769d: 0x4003fa20, 0x1769e: 0x40062420, 0x1769f: 0x40021620, + 0x176a0: 0x40061e20, 0x176a1: 0xc57027b1, 0x176a2: 0x402c0a20, 0x176a3: 0x402c3a20, + 0x176a4: 0x402c6220, 0x176a5: 0xcf110be1, 0x176a6: 0x402d0820, 0x176a7: 0x402d2220, + 0x176a8: 0x402d6820, 0x176a9: 0x402d9a20, 0x176aa: 0x402dcc20, 0x176ab: 0x402dfe20, + 0x176ac: 0xc0000002, 0x176ad: 0x402e8220, 0x176ae: 0x402e9e20, 0x176af: 0xcf159891, + 0x176b0: 0x402f2c20, 0x176b1: 0x402f5620, 0x176b2: 0x402f7a20, 0x176b3: 0x402fe620, + 0x176b4: 0x40302c20, 0x176b5: 0xc38d0b21, 0x176b6: 0x4030be20, 0x176b7: 0x4030be21, + 0x176b8: 0x4030f620, 0x176b9: 0x40310020, 0x176ba: 0x40312a20, 0x176bb: 0x4003fc20, + 0x176bc: 0x40094820, 0x176bd: 0x4003fe20, 0x176be: 0x40094c20, 0x176bf: 0xa0000000, + // Block 0x5db, offset 0x176c0 + 0x176c0: 0xe0000cfe, 0x176c1: 0xe0000cf8, 0x176c2: 0xe0000cf5, 0x176c3: 0xe0000d51, + 0x176c4: 0xe0000d4e, 0x176c5: 0xe0000d6f, 0x176c6: 0xe0000d6c, 0x176c7: 0xe0000d5d, + 0x176c8: 0xe0000d5a, 0x176c9: 0xf0000404, 0x176ca: 0x002eda88, 0x176cb: 0x402eda20, + 0x176cc: 0xe0000e2e, 0x176cd: 0xe0000e2b, 0x176ce: 0xe0000da0, 0x176cf: 0xe0000d9d, + 0x176d0: 0x003210c3, 0x176d1: 0x40321022, 0x176d2: 0x003210e3, 0x176d3: 0x40321023, + 0x176d4: 0xe0000eca, 0x176d5: 0xe0000ec7, 0x176d6: 0xe0000edc, 0x176d7: 0xe0000ed9, + 0x176d8: 0xe0000ed0, 0x176d9: 0xe0000ecd, 0x176da: 0xe0000f1f, 0x176db: 0xe0000f1c, + 0x176dc: 0xe0000f2d, 0x176dd: 0xe0000f2a, 0x176de: 0xe0000f47, 0x176df: 0xe0000f44, + 0x176e0: 0xe0000f33, 0x176e1: 0xe0000f30, 0x176e2: 0xe0000f99, 0x176e3: 0xe0000f96, + 0x176e4: 0xe0000f8a, 0x176e5: 0xe0000f87, 0x176e6: 0x00303688, 0x176e7: 0x40303620, + 0x176e8: 0xe000102b, 0x176e9: 0xe0001028, 0x176ea: 0xe000103f, 0x176eb: 0xe000103c, + 0x176ec: 0xe0000fe7, 0x176ed: 0xe0000fe4, 0x176ee: 0xe0000ff9, 0x176ef: 0xe0000ff6, + 0x176f0: 0x003100c3, 0x176f1: 0x40310022, 0x176f2: 0xe0001039, 0x176f3: 0xe0001036, + 0x176f4: 0xe0003636, 0x176f5: 0xe0003633, 0x176f6: 0xe000110e, 0x176f7: 0xe000110b, + 0x176f8: 0xe0001117, 0x176f9: 0xe000113b, 0x176fa: 0xe0001138, 0x176fb: 0xe000114d, + 0x176fc: 0xe000114a, 0x176fd: 0xe0001147, 0x176fe: 0xe0001144, 0x176ff: 0xe0000f64, + // Block 0x5dc, offset 0x17700 + 0x17700: 0xe0000d24, 0x17701: 0xe0000d21, 0x17702: 0xe0000d2a, 0x17703: 0xe0000d27, + 0x17704: 0xe0000d69, 0x17705: 0xe0000d66, 0x17706: 0xe0000d7b, 0x17707: 0xe0000d78, + 0x17708: 0xe0000d87, 0x17709: 0xe0000d84, 0x1770a: 0xe0000d81, 0x1770b: 0xe0000d7e, + 0x1770c: 0xe0000ded, 0x1770d: 0xe0000de9, 0x1770e: 0xe00037f4, 0x1770f: 0xe00037f1, + 0x17710: 0xe0000e3d, 0x17711: 0xe0000e39, 0x17712: 0xe0000e35, 0x17713: 0xe0000e31, + 0x17714: 0xe0000ea7, 0x17715: 0xe0000ea4, 0x17716: 0xe0000ead, 0x17717: 0xe0000eaa, + 0x17718: 0xe0000ed6, 0x17719: 0xe0000ed3, 0x1771a: 0xe0000ef4, 0x1771b: 0xe0000ef1, + 0x1771c: 0xe0000efb, 0x1771d: 0xe0000ef7, 0x1771e: 0xe0000f02, 0x1771f: 0xe0000eff, + 0x17720: 0xe0000f41, 0x17721: 0xe0000f3e, 0x17722: 0xe0000f53, 0x17723: 0xe0000f50, + 0x17724: 0xe0000f26, 0x17725: 0xe0000f22, 0x17726: 0xe0000f3a, 0x17727: 0xe0000f36, + 0x17728: 0xe0000f5a, 0x17729: 0xe0000f56, 0x1772a: 0xe0000f93, 0x1772b: 0xe0000f90, + 0x1772c: 0xe0000f9f, 0x1772d: 0xe0000f9c, 0x1772e: 0xe0000fb1, 0x1772f: 0xe0000fae, + 0x17730: 0xe0000fab, 0x17731: 0xe0000fa8, 0x17732: 0xe0001093, 0x17733: 0xe0001090, + 0x17734: 0xe000109f, 0x17735: 0xe000109c, 0x17736: 0xe0001099, 0x17737: 0xe0001096, + 0x17738: 0xe0001032, 0x17739: 0xe000102e, 0x1773a: 0xe000298b, 0x1773b: 0xe0002988, + 0x1773c: 0xe000ae07, 0x1773d: 0xe00010a6, 0x1773e: 0xe000ae0a, 0x1773f: 0xe00010ac, + // Block 0x5dd, offset 0x17740 + 0x17742: 0x40429620, 0x17743: 0x40429820, + 0x17745: 0x40427e20, 0x17746: 0x40428020, 0x17747: 0x40428220, + 0x17748: 0x40428420, 0x17749: 0x40428620, 0x1774a: 0x40428820, + 0x1774e: 0x40428a20, 0x1774f: 0x40428c20, + 0x17750: 0x40428e20, 0x17752: 0xc0610231, 0x17753: 0x40429220, + 0x17754: 0x40429420, 0x17755: 0xcf1d98d1, + 0x17759: 0xcf219961, 0x1775a: 0xcf239961, + 0x1775c: 0xcf439961, 0x1775e: 0xcf259961, 0x1775f: 0xcf279961, + 0x17763: 0xcf299961, + 0x17764: 0xcf2b9961, + 0x17768: 0xcf2d9961, 0x17769: 0xcf419961, 0x1776a: 0xcf2f9961, + 0x1776e: 0xcf319961, 0x1776f: 0xcf339961, + 0x17770: 0xcf359961, 0x17771: 0xcf3f9961, 0x17772: 0xcf379961, 0x17773: 0xcf3d9961, + 0x17774: 0xcf3b9961, 0x17775: 0xcf399961, 0x17776: 0xcf459961, 0x17777: 0xcf479961, + 0x17778: 0xcf499961, 0x17779: 0xcf4b9961, + 0x1777e: 0x4042c620, 0x1777f: 0x4042c820, + // Block 0x5de, offset 0x17780 + 0x17781: 0x40430020, 0x17782: 0x40430220, 0x17783: 0x40430420, + 0x17785: 0x4042e020, 0x17786: 0x4042e220, 0x17787: 0x4042e420, + 0x17788: 0x4042e620, 0x17789: 0x4042e820, 0x1778a: 0x4042ea20, 0x1778b: 0x4042ec20, + 0x1778c: 0x4042f020, 0x1778e: 0x4042f420, 0x1778f: 0x4042f620, + 0x17790: 0x4042f820, 0x17792: 0x4042fa20, 0x17793: 0x4042fc20, + 0x17794: 0x4042fe20, 0x17795: 0x40430020, 0x17796: 0x40430220, 0x17797: 0x40430420, + 0x17798: 0x40430620, 0x17799: 0x40430820, 0x1779a: 0x40430a20, 0x1779b: 0x40430e20, + 0x1779c: 0x40431020, 0x1779d: 0x40431420, 0x1779e: 0x40431620, 0x1779f: 0x40431820, + 0x177a0: 0x40431a20, 0x177a1: 0x40431c20, 0x177a2: 0x40431e20, 0x177a3: 0x40432020, + 0x177a4: 0x40432220, 0x177a5: 0x40432420, 0x177a6: 0x40432620, 0x177a7: 0x40432820, + 0x177a8: 0x40432a20, 0x177aa: 0x40432c20, 0x177ab: 0x40432e20, + 0x177ac: 0x40433020, 0x177ad: 0x40433220, 0x177ae: 0x40433420, 0x177af: 0x40433620, + 0x177b0: 0x40433820, 0x177b1: 0x40433a20, 0x177b2: 0x40433c20, 0x177b3: 0x40434820, + 0x177b5: 0x40433e20, 0x177b6: 0x40434020, 0x177b7: 0x40434220, + 0x177b8: 0x40434420, 0x177b9: 0x40434620, + 0x177bd: 0x40434a20, 0x177be: 0x40434c20, 0x177bf: 0x40434e20, + // Block 0x5df, offset 0x177c0 + 0x177c1: 0x40491020, 0x177c2: 0x40491220, 0x177c3: 0x40491420, + 0x177c4: 0x40491620, 0x177c5: 0x40491820, 0x177c6: 0x40491a20, 0x177c7: 0x40491c20, + 0x177c8: 0x40491e20, 0x177c9: 0x40492020, 0x177ca: 0x40492220, 0x177cb: 0x40492420, + 0x177cc: 0x40492620, 0x177cd: 0x40492820, 0x177ce: 0x40492a20, 0x177cf: 0x40492c20, + 0x177d0: 0x40492e20, 0x177d1: 0x40493020, 0x177d2: 0x40493220, 0x177d3: 0x40493420, + 0x177d4: 0x40493620, 0x177d5: 0x40493820, 0x177d6: 0x40493a20, 0x177d7: 0x40493c20, + 0x177d8: 0x40493e20, 0x177d9: 0x40494020, 0x177da: 0x40494220, 0x177db: 0x40494420, + 0x177dc: 0x40494620, 0x177dd: 0x40494820, 0x177de: 0x40494a20, 0x177df: 0x40494c20, + 0x177e0: 0x40494e20, 0x177e1: 0x40495020, 0x177e2: 0x40495220, 0x177e3: 0x40495420, + 0x177e4: 0x40495620, 0x177e5: 0x40495820, 0x177e6: 0x40495a20, 0x177e7: 0x40495c20, + 0x177e8: 0x40495e20, 0x177e9: 0x40496020, 0x177ea: 0x40496220, 0x177eb: 0x40496420, + 0x177ec: 0x40496620, 0x177ed: 0x40496820, 0x177ee: 0x40496a20, 0x177ef: 0x40057820, + 0x177f0: 0x40496e20, 0x177f1: 0x40497020, 0x177f2: 0x40497220, 0x177f3: 0xe000ae10, + 0x177f4: 0x40497620, 0x177f5: 0x40497820, 0x177f6: 0x40497a20, 0x177f7: 0x40497c20, + 0x177f8: 0x826724bf, 0x177f9: 0x826724c0, 0x177fa: 0x40498e20, + 0x177ff: 0x4027f420, + // Block 0x5e0, offset 0x17800 + 0x17800: 0xc07f04e1, 0x17801: 0xc0ae04e1, 0x17802: 0xc0dd04e1, 0x17803: 0xc10c04e1, + 0x17804: 0xc13b04e1, 0x17805: 0x00497283, 0x17806: 0x40057e20, 0x17807: 0xa000ff02, + 0x17808: 0xa6b10002, 0x17809: 0xa6b10102, 0x1780a: 0xa6b10202, 0x1780b: 0xa6b10302, + 0x1780c: 0xa000ff02, 0x1780d: 0xcf4d9991, 0x1780e: 0xa000fe02, 0x1780f: 0x40057820, + 0x17810: 0xe000019a, 0x17811: 0xe000022e, 0x17812: 0xe0000346, 0x17813: 0xe0000420, + 0x17814: 0xe00004f5, 0x17815: 0xe00005bf, 0x17816: 0xe000068a, 0x17817: 0xe0000732, + 0x17818: 0xe00007de, 0x17819: 0xe0000883, 0x1781a: 0x40057a20, 0x1781b: 0x40057c20, + // Block 0x5e1, offset 0x17840 + 0x17840: 0xa0000000, 0x17841: 0xa0000000, 0x17842: 0xa0000000, 0x17843: 0xa0000000, + 0x17844: 0xa0000000, 0x17845: 0xa0000000, 0x17846: 0xa0000000, 0x17847: 0xa0000000, + 0x17848: 0xa0000000, 0x17849: 0x40020020, 0x1784a: 0x40020220, 0x1784b: 0x40020420, + 0x1784c: 0x40020620, 0x1784d: 0x40020820, 0x1784e: 0xa0000000, 0x1784f: 0xa0000000, + 0x17850: 0xa0000000, 0x17851: 0xa0000000, 0x17852: 0xa0000000, 0x17853: 0xa0000000, + 0x17854: 0xa0000000, 0x17855: 0xa0000000, 0x17856: 0xa0000000, 0x17857: 0xa0000000, + 0x17858: 0xa0000000, 0x17859: 0xa0000000, 0x1785a: 0xa0000000, 0x1785b: 0xa0000000, + 0x1785c: 0xa0000000, 0x1785d: 0xa0000000, 0x1785e: 0xa0000000, 0x1785f: 0xa0000000, + 0x17860: 0x40021220, 0x17861: 0x4002ba20, 0x17862: 0x4003e020, 0x17863: 0x4004ea20, + 0x17864: 0x4027de20, 0x17865: 0x4004ec20, 0x17866: 0x4004e620, 0x17867: 0x4003d220, + 0x17868: 0x4003f420, 0x17869: 0x4003f620, 0x1786a: 0x4004d820, 0x1786b: 0x40093820, + 0x1786c: 0x40024020, 0x1786d: 0x40021a20, 0x1786e: 0x4002e420, 0x1786f: 0x4004e220, + 0x17870: 0x4029cc20, 0x17871: 0x4029ce20, 0x17872: 0x4029d020, 0x17873: 0x4029d220, + 0x17874: 0x4029d420, 0x17875: 0x4029d620, 0x17876: 0x4029d820, 0x17877: 0x4029da20, + 0x17878: 0x4029dc20, 0x17879: 0x4029de20, 0x1787a: 0x40026c20, 0x1787b: 0x40026220, + 0x1787c: 0x40094020, 0x1787d: 0x40094220, 0x1787e: 0x40094420, 0x1787f: 0x4002c420, + // Block 0x5e2, offset 0x17880 + 0x17880: 0x4004d620, 0x17881: 0xcf5399e1, 0x17882: 0x002c0a88, 0x17883: 0x002c3a88, + 0x17884: 0x002c6288, 0x17885: 0xcf5999e1, 0x17886: 0x002d0888, 0x17887: 0x002d2288, + 0x17888: 0x002d6888, 0x17889: 0xcf5f99e1, 0x1788a: 0x002dcc88, 0x1788b: 0x002dfe88, + 0x1788c: 0xc0030002, 0x1788d: 0x002e8288, 0x1788e: 0xc5350a52, 0x1788f: 0xcf6599e1, + 0x17890: 0x002f2c88, 0x17891: 0x002f5688, 0x17892: 0x002f7a88, 0x17893: 0x002fe688, + 0x17894: 0x00302c88, 0x17895: 0xcf6b99e1, 0x17896: 0x0030be88, 0x17897: 0x0030e288, + 0x17898: 0x0030f688, 0x17899: 0x00310088, 0x1789a: 0x00312a88, 0x1789b: 0x4003f820, + 0x1789c: 0x4004e420, 0x1789d: 0x4003fa20, 0x1789e: 0x40062420, 0x1789f: 0x40021620, + 0x178a0: 0x40061e20, 0x178a1: 0xcf5099e1, 0x178a2: 0x402c0a20, 0x178a3: 0x402c3a20, + 0x178a4: 0x402c6220, 0x178a5: 0xcf5699e1, 0x178a6: 0x402d0820, 0x178a7: 0x402d2220, + 0x178a8: 0x402d6820, 0x178a9: 0xcf5c99e1, 0x178aa: 0x402dcc20, 0x178ab: 0x402dfe20, + 0x178ac: 0xc0000002, 0x178ad: 0x402e8220, 0x178ae: 0xc5330a41, 0x178af: 0xcf6299e1, + 0x178b0: 0x402f2c20, 0x178b1: 0x402f5620, 0x178b2: 0x402f7a20, 0x178b3: 0x402fe620, + 0x178b4: 0x40302c20, 0x178b5: 0xcf6899e1, 0x178b6: 0x4030be20, 0x178b7: 0x4030e220, + 0x178b8: 0x4030f620, 0x178b9: 0x40310020, 0x178ba: 0x40312a20, 0x178bb: 0x4003fc20, + 0x178bc: 0x40094820, 0x178bd: 0x4003fe20, 0x178be: 0x40094c20, 0x178bf: 0xa0000000, + // Block 0x5e3, offset 0x178c0 + 0x178c0: 0xe00008f5, 0x178c1: 0x002bdea3, 0x178c2: 0xe0000921, 0x178c3: 0xe0000969, + 0x178c4: 0xe000095b, 0x178c5: 0xe000094d, 0x178c6: 0xe00009dd, 0x178c7: 0xe0000a53, + 0x178c8: 0xe0000ae8, 0x178c9: 0x002c98a3, 0x178ca: 0xe0000af4, 0x178cb: 0xe0000b20, + 0x178cc: 0xe0000c2b, 0x178cd: 0x002d9aa3, 0x178ce: 0xe0000c37, 0x178cf: 0xe0000c43, + 0x178d0: 0xe0000ab3, 0x178d1: 0xe0000d63, 0x178d2: 0xe0000d9a, 0x178d3: 0x002ee2a3, + 0x178d4: 0xe0000da6, 0x178d5: 0xe0000de6, 0x178d6: 0xe0000dd2, 0x178d7: 0x40093e20, + 0x178d8: 0xe0000e12, 0x178d9: 0xe0000fe1, 0x178da: 0x00306ca3, 0x178db: 0xe0000fed, + 0x178dc: 0xe0000fff, 0x178dd: 0xe0001102, 0x178de: 0x00318888, 0x178df: 0xe0000f7b, + 0x178e0: 0xe00008f2, 0x178e1: 0x402bde21, 0x178e2: 0xe000091e, 0x178e3: 0xe0000966, + 0x178e4: 0xe0000958, 0x178e5: 0xe000094a, 0x178e6: 0xe00009d5, 0x178e7: 0xe0000a4d, + 0x178e8: 0xe0000ae5, 0x178e9: 0x402c9821, 0x178ea: 0xe0000af1, 0x178eb: 0xe0000b1d, + 0x178ec: 0xe0000c28, 0x178ed: 0x402d9a21, 0x178ee: 0xe0000c34, 0x178ef: 0xe0000c40, + 0x178f0: 0xe0000aad, 0x178f1: 0xe0000d60, 0x178f2: 0xe0000d97, 0x178f3: 0x402ee221, + 0x178f4: 0xe0000da3, 0x178f5: 0xe0000de3, 0x178f6: 0xe0000dcf, 0x178f7: 0x40093c20, + 0x178f8: 0xe0000e0f, 0x178f9: 0xe0000fde, 0x178fa: 0x40306c21, 0x178fb: 0xe0000fea, + 0x178fc: 0xe0000ffc, 0x178fd: 0xe00010ff, 0x178fe: 0x40318820, 0x178ff: 0xe0001114, + // Block 0x5e4, offset 0x17900 + 0x17900: 0x002bdec3, 0x17901: 0x402bde22, 0x17902: 0xe00008fb, 0x17903: 0xe00008f8, + 0x17904: 0xe000097d, 0x17905: 0xe000097a, 0x17906: 0xe0000a38, 0x17907: 0xe0000a35, + 0x17908: 0xe0000a3e, 0x17909: 0xe0000a3b, 0x1790a: 0xe0000a4a, 0x1790b: 0xe0000a47, + 0x1790c: 0xe0000a44, 0x1790d: 0xe0000a41, 0x1790e: 0xe0000a86, 0x1790f: 0xe0000a83, + 0x17910: 0xe0000aaa, 0x17911: 0xe0000aa7, 0x17912: 0x002c98c3, 0x17913: 0x402c9822, + 0x17914: 0xe0000aee, 0x17915: 0xe0000aeb, 0x17916: 0xe0000b2c, 0x17917: 0xe0000b29, + 0x17918: 0xe0000b40, 0x17919: 0xe0000b3d, 0x1791a: 0xe0000b1a, 0x1791b: 0xe0000b17, + 0x1791c: 0xe0000bb8, 0x1791d: 0xe0000bb5, 0x1791e: 0xe0000bb2, 0x1791f: 0xe0000baf, + 0x17920: 0xe0000bc4, 0x17921: 0xe0000bc1, 0x17922: 0xe0000bca, 0x17923: 0xe0000bc7, + 0x17924: 0xe0000bee, 0x17925: 0xe0000beb, 0x17926: 0xe0000c1b, 0x17927: 0xe0000c18, + 0x17928: 0xe0000c51, 0x17929: 0xe0000c4e, 0x1792a: 0x002d9ac3, 0x1792b: 0x402d9a22, + 0x1792c: 0xe0000c31, 0x1792d: 0xe0000c2e, 0x1792e: 0xe0000c5a, 0x1792f: 0xe0000c57, + 0x17930: 0xe0000c54, 0x17931: 0x402da220, 0x17932: 0xf0000a0a, 0x17933: 0xf0000404, + 0x17934: 0xe0000c8a, 0x17935: 0xe0000c87, 0x17936: 0xe0000c9f, 0x17937: 0xe0000c9c, + 0x17938: 0x402f7220, 0x17939: 0xe0000ccc, 0x1793a: 0xe0000cc9, 0x1793b: 0xe0000cd8, + 0x1793c: 0xe0000cd5, 0x1793d: 0xe0000cd2, 0x1793e: 0xe0000ccf, 0x1793f: 0xe0000d04, + // Block 0x5e5, offset 0x17940 + 0x17940: 0xe0000cfe, 0x17941: 0xe0000cf8, 0x17942: 0xe0000cf5, 0x17943: 0xe0000d51, + 0x17944: 0xe0000d4e, 0x17945: 0xe0000d6f, 0x17946: 0xe0000d6c, 0x17947: 0xe0000d5d, + 0x17948: 0xe0000d5a, 0x17949: 0xf0000404, 0x1794a: 0x002ea086, 0x1794b: 0x002ea085, + 0x1794c: 0x002ee2c3, 0x1794d: 0x402ee222, 0x1794e: 0xe0000da0, 0x1794f: 0xe0000d9d, + 0x17950: 0xe0000de0, 0x17951: 0xe0000ddd, 0x17952: 0xe0000e93, 0x17953: 0xe0000e8f, + 0x17954: 0xe0000eca, 0x17955: 0xe0000ec7, 0x17956: 0xe0000edc, 0x17957: 0xe0000ed9, + 0x17958: 0xe0000ed0, 0x17959: 0xe0000ecd, 0x1795a: 0xe0000f1f, 0x1795b: 0xe0000f1c, + 0x1795c: 0xe0000f2d, 0x1795d: 0xe0000f2a, 0x1795e: 0xe0000f47, 0x1795f: 0xe0000f44, + 0x17960: 0xe0000f33, 0x17961: 0xe0000f30, 0x17962: 0xe0000f99, 0x17963: 0xe0000f96, + 0x17964: 0xe0000f8a, 0x17965: 0xe0000f87, 0x17966: 0x00303688, 0x17967: 0x40303620, + 0x17968: 0xe000102b, 0x17969: 0xe0001028, 0x1796a: 0x00306cc3, 0x1796b: 0x40306c22, + 0x1796c: 0xe0000fe7, 0x1796d: 0xe0000fe4, 0x1796e: 0xe0000ff9, 0x1796f: 0xe0000ff6, + 0x17970: 0xe0001025, 0x17971: 0xe0001022, 0x17972: 0xe0001039, 0x17973: 0xe0001036, + 0x17974: 0xe00010d8, 0x17975: 0xe00010d5, 0x17976: 0xe000110e, 0x17977: 0xe000110b, + 0x17978: 0xe0001117, 0x17979: 0xe000113b, 0x1797a: 0xe0001138, 0x1797b: 0xe000114d, + 0x1797c: 0xe000114a, 0x1797d: 0xe0001147, 0x1797e: 0xe0001144, 0x1797f: 0xe0000f64, + // Block 0x5e6, offset 0x17980 + 0x17980: 0x40321220, 0x17981: 0x40321a20, 0x17982: 0x40322220, 0x17983: 0x40322a20, + 0x17984: 0xe0000ad5, 0x17985: 0xe0000ad1, 0x17986: 0xe0000acd, 0x17987: 0xf0000a0a, + 0x17988: 0xf000040a, 0x17989: 0xf0000404, 0x1798a: 0xf0000a0a, 0x1798b: 0xf000040a, + 0x1798c: 0xf0000404, 0x1798d: 0xe0000947, 0x1798e: 0xe0000944, 0x1798f: 0xe0000c3d, + 0x17990: 0xe0000c3a, 0x17991: 0xe0000dcc, 0x17992: 0xe0000dc9, 0x17993: 0xe0000ff3, + 0x17994: 0xe0000ff0, 0x17995: 0xe000a9d3, 0x17996: 0xe000a9d0, 0x17997: 0xe000ae82, + 0x17998: 0xe000ae7f, 0x17999: 0xe0001016, 0x1799a: 0xe0001012, 0x1799b: 0xe000100e, + 0x1799c: 0xe000100a, 0x1799d: 0x402cae20, 0x1799e: 0xe000ae28, 0x1799f: 0xe000ae25, + 0x179a0: 0xe000ae2e, 0x179a1: 0xe000ae2b, 0x179a2: 0xe00009f4, 0x179a3: 0xe00009ef, + 0x179a4: 0x002d3a88, 0x179a5: 0x402d3a20, 0x179a6: 0xe0000bbe, 0x179a7: 0xe0000bbb, + 0x179a8: 0xe0000c99, 0x179a9: 0xe0000c96, 0x179aa: 0xe0000e20, 0x179ab: 0xe0000e1d, + 0x179ac: 0xe000ae7c, 0x179ad: 0xe000ae79, 0x179ae: 0xe0001162, 0x179af: 0xe000115f, + 0x179b0: 0xe0000c8d, 0x179b1: 0xf0000a0a, 0x179b2: 0xf000040a, 0x179b3: 0xf0000404, + 0x179b4: 0xe0000bac, 0x179b5: 0xe0000ba9, 0x179b6: 0x002d7888, 0x179b7: 0x00319488, + 0x179b8: 0xe0000d57, 0x179b9: 0xe0000d54, 0x179ba: 0xe000ae22, 0x179bb: 0xe000ae1f, + 0x179bc: 0xe00009ea, 0x179bd: 0xe00009e5, 0x179be: 0xe0000e19, 0x179bf: 0xe0000e15, + // Block 0x5e7, offset 0x179c0 + 0x179c0: 0xe000098f, 0x179c1: 0xe000098c, 0x179c2: 0xe0000995, 0x179c3: 0xe0000992, + 0x179c4: 0xe0000b62, 0x179c5: 0xe0000b5f, 0x179c6: 0xe0000b68, 0x179c7: 0xe0000b65, + 0x179c8: 0xe0000c6c, 0x179c9: 0xe0000c69, 0x179ca: 0xe0000c72, 0x179cb: 0xe0000c6f, + 0x179cc: 0xe0000e4a, 0x179cd: 0xe0000e47, 0x179ce: 0xe0000e50, 0x179cf: 0xe0000e4d, + 0x179d0: 0xe0000ee8, 0x179d1: 0xe0000ee5, 0x179d2: 0xe0000eee, 0x179d3: 0xe0000eeb, + 0x179d4: 0xe0001053, 0x179d5: 0xe0001050, 0x179d6: 0xe0001059, 0x179d7: 0xe0001056, + 0x179d8: 0xe0000f61, 0x179d9: 0xe0000f5e, 0x179da: 0xe0000fa5, 0x179db: 0xe0000fa2, + 0x179dc: 0x00312288, 0x179dd: 0x40312220, 0x179de: 0xe0000bf4, 0x179df: 0xe0000bf1, + 0x179e0: 0x002ebc88, 0x179e1: 0x402c8c20, 0x179e2: 0x002f2288, 0x179e3: 0x402f2220, + 0x179e4: 0x00314088, 0x179e5: 0x40314020, 0x179e6: 0xe000096f, 0x179e7: 0xe000096c, + 0x179e8: 0xe0000b32, 0x179e9: 0xe0000b2f, 0x179ea: 0xe000ae6a, 0x179eb: 0xe000ae67, + 0x179ec: 0xe000ae70, 0x179ed: 0xe000ae6d, 0x179ee: 0xe0000e04, 0x179ef: 0xe0000e01, + 0x179f0: 0xe000ae76, 0x179f1: 0xe000ae73, 0x179f2: 0xe0001129, 0x179f3: 0xe0001126, + 0x179f4: 0x402e5e20, 0x179f5: 0x402ed020, 0x179f6: 0x40305a20, 0x179f7: 0x402dd420, + 0x179f8: 0xe0000abf, 0x179f9: 0xe0000ec4, 0x179fa: 0x002be888, 0x179fb: 0x002c4488, + 0x179fc: 0x402c4420, 0x179fd: 0x002e3888, 0x179fe: 0x00303e88, 0x179ff: 0x402ffc20, + // Block 0x5e8, offset 0x17a00 + 0x17a00: 0x402f8220, 0x17a01: 0x402fd820, 0x17a02: 0x402ff420, 0x17a03: 0x40300820, + 0x17a04: 0x402df620, 0x17a05: 0x40301a20, 0x17a06: 0x40302420, 0x17a07: 0x40306420, + 0x17a08: 0x40305220, 0x17a09: 0x40307c20, 0x17a0a: 0x4030b420, 0x17a0b: 0x4030cc20, + 0x17a0c: 0x4030da20, 0x17a0d: 0x4030ee20, 0x17a0e: 0x402e7a20, 0x17a0f: 0x40310820, + 0x17a10: 0x40314820, 0x17a11: 0x40315020, 0x17a12: 0x40316420, 0x17a13: 0x40318020, + 0x17a14: 0x4031cc20, 0x17a15: 0x4031e820, 0x17a16: 0x40320a20, 0x17a17: 0x40323220, + 0x17a18: 0x40323a20, 0x17a19: 0x402c1220, 0x17a1a: 0x402cf820, 0x17a1b: 0x402d4c20, + 0x17a1c: 0x402d7020, 0x17a1d: 0x402de620, 0x17a1e: 0x402e1a20, 0x17a1f: 0x402e2a20, + 0x17a20: 0x402f6220, 0x17a21: 0x4031fa20, 0x17a22: 0x40320220, 0x17a23: 0xe0000aca, + 0x17a24: 0xe0000adc, 0x17a25: 0xe0000ad9, 0x17a26: 0xe0000fcc, 0x17a27: 0xe0000fcf, + 0x17a28: 0xe0000fba, 0x17a29: 0xe0000ba1, 0x17a2a: 0xe0000d11, 0x17a2b: 0xe0000d18, + 0x17a2c: 0x40324220, 0x17a2d: 0x40324a20, 0x17a2e: 0x40309020, 0x17a2f: 0x40309820, + 0x17a30: 0x002d6894, 0x17a31: 0x002d8094, 0x17a32: 0x002dcc94, 0x17a33: 0x002f7a94, + 0x17a34: 0x002f9894, 0x17a35: 0x002fac94, 0x17a36: 0x002fd894, 0x17a37: 0x0030e294, + 0x17a38: 0x00310094, 0x17a39: 0x40064020, 0x17a3a: 0x40064420, 0x17a3b: 0x40312c20, + 0x17a3c: 0x4031de20, 0x17a3d: 0x00312c83, 0x17a3e: 0x4031e220, 0x17a3f: 0x4031f020, + // Block 0x5e9, offset 0x17a40 + 0x17a40: 0xe00009b1, 0x17a41: 0xe00009ae, 0x17a42: 0xe0000a22, 0x17a43: 0xe0000a1f, + 0x17a44: 0xe0000a28, 0x17a45: 0xe0000a25, 0x17a46: 0xe0000a2e, 0x17a47: 0xe0000a2b, + 0x17a48: 0xe0000a5a, 0x17a49: 0xe0000a56, 0x17a4a: 0xe0000a8c, 0x17a4b: 0xe0000a89, + 0x17a4c: 0xe0000a98, 0x17a4d: 0xe0000a95, 0x17a4e: 0xe0000aa4, 0x17a4f: 0xe0000aa1, + 0x17a50: 0xe0000a92, 0x17a51: 0xe0000a8f, 0x17a52: 0xe0000a9e, 0x17a53: 0xe0000a9b, + 0x17a54: 0xe000ae40, 0x17a55: 0xe000ae3d, 0x17a56: 0xe000ae3a, 0x17a57: 0xe000ae37, + 0x17a58: 0xe0000b7c, 0x17a59: 0xe0000b79, 0x17a5a: 0xe0000b82, 0x17a5b: 0xe0000b7f, + 0x17a5c: 0xe0000b39, 0x17a5d: 0xe0000b35, 0x17a5e: 0xe0000b8c, 0x17a5f: 0xe0000b89, + 0x17a60: 0xe0000bd0, 0x17a61: 0xe0000bcd, 0x17a62: 0xe0000c00, 0x17a63: 0xe0000bfd, + 0x17a64: 0xe0000c0c, 0x17a65: 0xe0000c09, 0x17a66: 0xe0000bfa, 0x17a67: 0xe0000bf7, + 0x17a68: 0xe0000c06, 0x17a69: 0xe0000c03, 0x17a6a: 0xe0000c12, 0x17a6b: 0xe0000c0f, + 0x17a6c: 0xe0000c7e, 0x17a6d: 0xe0000c7b, 0x17a6e: 0xe000ae46, 0x17a6f: 0xe000ae43, + 0x17a70: 0xe0000c93, 0x17a71: 0xe0000c90, 0x17a72: 0xe0000cab, 0x17a73: 0xe0000ca8, + 0x17a74: 0xe0000cb1, 0x17a75: 0xe0000cae, 0x17a76: 0xe0000cde, 0x17a77: 0xe0000cdb, + 0x17a78: 0xe0000ce5, 0x17a79: 0xe0000ce1, 0x17a7a: 0xe0000cf2, 0x17a7b: 0xe0000cef, + 0x17a7c: 0xe0000cec, 0x17a7d: 0xe0000ce9, 0x17a7e: 0xe0000d1e, 0x17a7f: 0xe0000d1b, + // Block 0x5ea, offset 0x17a80 + 0x17a80: 0xe0000d24, 0x17a81: 0xe0000d21, 0x17a82: 0xe0000d2a, 0x17a83: 0xe0000d27, + 0x17a84: 0xe0000d69, 0x17a85: 0xe0000d66, 0x17a86: 0xe0000d7b, 0x17a87: 0xe0000d78, + 0x17a88: 0xe0000d87, 0x17a89: 0xe0000d84, 0x17a8a: 0xe0000d81, 0x17a8b: 0xe0000d7e, + 0x17a8c: 0xe000ae52, 0x17a8d: 0xe000ae4f, 0x17a8e: 0xe0000df5, 0x17a8f: 0xe0000df1, + 0x17a90: 0xe000ae64, 0x17a91: 0xe000ae61, 0x17a92: 0xe000ae5e, 0x17a93: 0xe000ae5b, + 0x17a94: 0xe0000ea7, 0x17a95: 0xe0000ea4, 0x17a96: 0xe0000ead, 0x17a97: 0xe0000eaa, + 0x17a98: 0xe0000ed6, 0x17a99: 0xe0000ed3, 0x17a9a: 0xe0000ef4, 0x17a9b: 0xe0000ef1, + 0x17a9c: 0xe0000efb, 0x17a9d: 0xe0000ef7, 0x17a9e: 0xe0000f02, 0x17a9f: 0xe0000eff, + 0x17aa0: 0xe0000f41, 0x17aa1: 0xe0000f3e, 0x17aa2: 0xe0000f53, 0x17aa3: 0xe0000f50, + 0x17aa4: 0xe0000f26, 0x17aa5: 0xe0000f22, 0x17aa6: 0xe0000f3a, 0x17aa7: 0xe0000f36, + 0x17aa8: 0xe0000f5a, 0x17aa9: 0xe0000f56, 0x17aaa: 0xe0000f93, 0x17aab: 0xe0000f90, + 0x17aac: 0xe0000f9f, 0x17aad: 0xe0000f9c, 0x17aae: 0xe0000fb1, 0x17aaf: 0xe0000fae, + 0x17ab0: 0xe0000fab, 0x17ab1: 0xe0000fa8, 0x17ab2: 0xe0001093, 0x17ab3: 0xe0001090, + 0x17ab4: 0xe000109f, 0x17ab5: 0xe000109c, 0x17ab6: 0xe0001099, 0x17ab7: 0xe0001096, + 0x17ab8: 0xe000ae88, 0x17ab9: 0xe000ae85, 0x17aba: 0xe000a9d3, 0x17abb: 0xe000a9d0, + 0x17abc: 0xe00010a9, 0x17abd: 0xe00010a6, 0x17abe: 0xe00010af, 0x17abf: 0xe00010ac, + // Block 0x5eb, offset 0x17ac0 + 0x17ac0: 0xe00010d2, 0x17ac1: 0xe00010cf, 0x17ac2: 0xe00010cc, 0x17ac3: 0xe00010c9, + 0x17ac4: 0xe00010e1, 0x17ac5: 0xe00010de, 0x17ac6: 0xe00010e7, 0x17ac7: 0xe00010e4, + 0x17ac8: 0xe00010ed, 0x17ac9: 0xe00010ea, 0x17aca: 0xe00010fc, 0x17acb: 0xe00010f9, + 0x17acc: 0xe00010f6, 0x17acd: 0xe00010f3, 0x17ace: 0xe0001123, 0x17acf: 0xe0001120, + 0x17ad0: 0xe0001141, 0x17ad1: 0xe000113e, 0x17ad2: 0xe0001153, 0x17ad3: 0xe0001150, + 0x17ad4: 0xe0001159, 0x17ad5: 0xe0001156, 0x17ad6: 0xe0000c15, 0x17ad7: 0xe0000f8d, + 0x17ad8: 0xe00010db, 0x17ad9: 0xe0001111, 0x17ada: 0xf0000404, 0x17adb: 0xe0000f70, + 0x17adc: 0x40300420, 0x17add: 0x40300620, 0x17ade: 0xe0000f7f, 0x17adf: 0x402c9620, + 0x17ae0: 0xe000099b, 0x17ae1: 0xe0000998, 0x17ae2: 0xe0000989, 0x17ae3: 0xe0000986, + 0x17ae4: 0xe000ae1c, 0x17ae5: 0xe000ae19, 0x17ae6: 0xe0000930, 0x17ae7: 0xe000092c, + 0x17ae8: 0xe0000940, 0x17ae9: 0xe000093c, 0x17aea: 0xe0000938, 0x17aeb: 0xe0000934, + 0x17aec: 0xe00009aa, 0x17aed: 0xe00009a6, 0x17aee: 0xe000ae16, 0x17aef: 0xe000ae13, + 0x17af0: 0xe000090a, 0x17af1: 0xe0000906, 0x17af2: 0xe000091a, 0x17af3: 0xe0000916, + 0x17af4: 0xe0000912, 0x17af5: 0xe000090e, 0x17af6: 0xe00009a2, 0x17af7: 0xe000099e, + 0x17af8: 0xe0000b6e, 0x17af9: 0xe0000b6b, 0x17afa: 0xe0000b5c, 0x17afb: 0xe0000b59, + 0x17afc: 0xe0000b26, 0x17afd: 0xe0000b23, 0x17afe: 0xe000ae34, 0x17aff: 0xe000ae31, + // Block 0x5ec, offset 0x17b00 + 0x17b00: 0xe0000b03, 0x17b01: 0xe0000aff, 0x17b02: 0xe0000b13, 0x17b03: 0xe0000b0f, + 0x17b04: 0xe0000b0b, 0x17b05: 0xe0000b07, 0x17b06: 0xe0000b75, 0x17b07: 0xe0000b71, + 0x17b08: 0xe0000c66, 0x17b09: 0xe0000c63, 0x17b0a: 0xe0000c78, 0x17b0b: 0xe0000c75, + 0x17b0c: 0xe0000e84, 0x17b0d: 0xe0000e81, 0x17b0e: 0xe0000e44, 0x17b0f: 0xe0000e41, + 0x17b10: 0xe000ae4c, 0x17b11: 0xe000ae49, 0x17b12: 0xe0000db5, 0x17b13: 0xe0000db1, + 0x17b14: 0xe0000dc5, 0x17b15: 0xe0000dc1, 0x17b16: 0xe0000dbd, 0x17b17: 0xe0000db9, + 0x17b18: 0xe0000e8b, 0x17b19: 0xe0000e87, 0x17b1a: 0xe000ae58, 0x17b1b: 0xe000ae55, + 0x17b1c: 0xe0000e65, 0x17b1d: 0xe0000e61, 0x17b1e: 0xe0000e75, 0x17b1f: 0xe0000e71, + 0x17b20: 0xe0000e6d, 0x17b21: 0xe0000e69, 0x17b22: 0xe0000e7d, 0x17b23: 0xe0000e79, + 0x17b24: 0xe000108d, 0x17b25: 0xe000108a, 0x17b26: 0xe000104d, 0x17b27: 0xe000104a, + 0x17b28: 0xe000ae8e, 0x17b29: 0xe000ae8b, 0x17b2a: 0xe000106e, 0x17b2b: 0xe000106a, + 0x17b2c: 0xe000107e, 0x17b2d: 0xe000107a, 0x17b2e: 0xe0001076, 0x17b2f: 0xe0001072, + 0x17b30: 0xe0001086, 0x17b31: 0xe0001082, 0x17b32: 0xe0001108, 0x17b33: 0xe0001105, + 0x17b34: 0xe0001135, 0x17b35: 0xe0001132, 0x17b36: 0xe000112f, 0x17b37: 0xe000112c, + 0x17b38: 0xe000111d, 0x17b39: 0xe000111a, 0x17b3a: 0xe0000d0a, 0x17b3b: 0xe0000d07, + 0x17b3c: 0x0030d888, 0x17b3d: 0x4030d820, 0x17b3e: 0x00312088, 0x17b3f: 0x40312020, + // Block 0x5ed, offset 0x17b40 + 0x17b40: 0xa0000000, 0x17b41: 0xa0000000, 0x17b42: 0xa0000000, 0x17b43: 0xa0000000, + 0x17b44: 0xa0000000, 0x17b45: 0xa0000000, 0x17b46: 0xa0000000, 0x17b47: 0xa0000000, + 0x17b48: 0xa0000000, 0x17b49: 0x40020020, 0x17b4a: 0x40020220, 0x17b4b: 0x40020420, + 0x17b4c: 0x40020620, 0x17b4d: 0x40020820, 0x17b4e: 0xa0000000, 0x17b4f: 0xa0000000, + 0x17b50: 0xa0000000, 0x17b51: 0xa0000000, 0x17b52: 0xa0000000, 0x17b53: 0xa0000000, + 0x17b54: 0xa0000000, 0x17b55: 0xa0000000, 0x17b56: 0xa0000000, 0x17b57: 0xa0000000, + 0x17b58: 0xa0000000, 0x17b59: 0xa0000000, 0x17b5a: 0xa0000000, 0x17b5b: 0xa0000000, + 0x17b5c: 0xa0000000, 0x17b5d: 0xa0000000, 0x17b5e: 0xa0000000, 0x17b5f: 0xa0000000, + 0x17b60: 0x40021220, 0x17b61: 0x4002ba20, 0x17b62: 0x4003e020, 0x17b63: 0x4004ea20, + 0x17b64: 0x4027de20, 0x17b65: 0x4004ec20, 0x17b66: 0x4004e620, 0x17b67: 0x4003d220, + 0x17b68: 0x4003f420, 0x17b69: 0x4003f620, 0x17b6a: 0x4004d820, 0x17b6b: 0x40093820, + 0x17b6c: 0x40024020, 0x17b6d: 0x40021a20, 0x17b6e: 0x4002e420, 0x17b6f: 0x4004e220, + 0x17b70: 0x4029cc20, 0x17b71: 0x4029ce20, 0x17b72: 0x4029d020, 0x17b73: 0x4029d220, + 0x17b74: 0x4029d420, 0x17b75: 0x4029d620, 0x17b76: 0x4029d820, 0x17b77: 0x4029da20, + 0x17b78: 0x4029dc20, 0x17b79: 0x4029de20, 0x17b7a: 0x40026c20, 0x17b7b: 0x40026220, + 0x17b7c: 0x40094020, 0x17b7d: 0x40094220, 0x17b7e: 0x40094420, 0x17b7f: 0x4002c420, + // Block 0x5ee, offset 0x17b80 + 0x17b80: 0x4004d620, 0x17b81: 0x002bde88, 0x17b82: 0x002c0a88, 0x17b83: 0xc3350911, + 0x17b84: 0x002c6288, 0x17b85: 0x002c9888, 0x17b86: 0x002d0888, 0x17b87: 0xc33900d1, + 0x17b88: 0x002d6888, 0x17b89: 0xc33b0931, 0x17b8a: 0x002dcc88, 0x17b8b: 0x002dfe88, + 0x17b8c: 0xc0030002, 0x17b8d: 0x002e8288, 0x17b8e: 0x002e9e88, 0x17b8f: 0xc33f0071, + 0x17b90: 0x002f2c88, 0x17b91: 0x002f5688, 0x17b92: 0x002f7a88, 0x17b93: 0xc3430911, + 0x17b94: 0x00302c88, 0x17b95: 0xc3470071, 0x17b96: 0x0030be88, 0x17b97: 0x0030e288, + 0x17b98: 0x0030f688, 0x17b99: 0x00310088, 0x17b9a: 0x00312a88, 0x17b9b: 0x4003f820, + 0x17b9c: 0x4004e420, 0x17b9d: 0x4003fa20, 0x17b9e: 0x40062420, 0x17b9f: 0x40021620, + 0x17ba0: 0x40061e20, 0x17ba1: 0x402bde20, 0x17ba2: 0x402c0a20, 0x17ba3: 0xc3330911, + 0x17ba4: 0x402c6220, 0x17ba5: 0x402c9820, 0x17ba6: 0x402d0820, 0x17ba7: 0xc33700d1, + 0x17ba8: 0x402d6820, 0x17ba9: 0x402d9a20, 0x17baa: 0x402dcc20, 0x17bab: 0x402dfe20, + 0x17bac: 0xc0000002, 0x17bad: 0x402e8220, 0x17bae: 0x402e9e20, 0x17baf: 0xc33d0071, + 0x17bb0: 0x402f2c20, 0x17bb1: 0x402f5620, 0x17bb2: 0x402f7a20, 0x17bb3: 0xc3410911, + 0x17bb4: 0x40302c20, 0x17bb5: 0xc3450071, 0x17bb6: 0x4030be20, 0x17bb7: 0x4030e220, + 0x17bb8: 0x4030f620, 0x17bb9: 0x40310020, 0x17bba: 0x40312a20, 0x17bbb: 0x4003fc20, + 0x17bbc: 0x40094820, 0x17bbd: 0x4003fe20, 0x17bbe: 0x40094c20, 0x17bbf: 0xa0000000, + // Block 0x5ef, offset 0x17bc0 + 0x17bc0: 0x00093685, 0x17bc1: 0x40083620, 0x17bc2: 0x40083820, 0x17bc3: 0x40083a20, + 0x17bc4: 0x40083c20, 0x17bc5: 0x002c628b, 0x17bc6: 0x002c6285, 0x17bc7: 0x002c9885, + 0x17bc8: 0x002d9a85, 0x17bc9: 0x002dcc85, 0x17bca: 0x40083e20, 0x17bcb: 0x400a6e20, + 0x17bcc: 0x40084020, 0x17bcd: 0xe00009c4, 0x17bce: 0x402d1e20, 0x17bcf: 0x40084220, + 0x17bd0: 0xe00002cb, 0x17bd1: 0xe00002d3, 0x17bd2: 0xe00002b2, 0x17bd3: 0xe00002bb, + 0x17bd4: 0xe00003cd, 0x17bd5: 0xe00002c3, 0x17bd6: 0xe00003d1, 0x17bd7: 0xe00004ab, + 0x17bd8: 0xe0000579, 0x17bd9: 0xe00002c7, 0x17bda: 0xe0000640, 0x17bdb: 0xe00002cf, + 0x17bdc: 0xe00004af, 0x17bdd: 0xe0000644, 0x17bde: 0xe0000798, 0x17bdf: 0xf0001e1e, + 0x17be0: 0x002d9a8a, 0x17be1: 0xe00027d4, 0x17be2: 0xe00027db, 0x17be3: 0xe00027ee, + 0x17be4: 0x0030be8a, 0x17be5: 0xe0002848, 0x17be6: 0xe000284f, 0x17be7: 0xe00010bb, + 0x17be8: 0xe00027f4, 0x17be9: 0x0030f68a, 0x17bea: 0xe0002883, 0x17beb: 0xe000288a, + 0x17bec: 0x002e228a, 0x17bed: 0x002c3a8a, 0x17bee: 0x002c628a, 0x17bef: 0x002e828a, + 0x17bf0: 0x002d9a84, 0x17bf1: 0xf0001f04, 0x17bf2: 0xf0000404, 0x17bf3: 0xf0001f04, + 0x17bf4: 0x0030be84, 0x17bf5: 0xf0001f04, 0x17bf6: 0xf0000404, 0x17bf7: 0xe00010b6, + 0x17bf8: 0xf0001f04, 0x17bf9: 0x0030f684, 0x17bfa: 0xf0001f04, 0x17bfb: 0xf0000404, + 0x17bfc: 0x002e2284, 0x17bfd: 0x002c3a84, 0x17bfe: 0x002c6284, 0x17bff: 0x002e8284, + // Block 0x5f0, offset 0x17c00 + 0x17c00: 0xf0001f04, 0x17c01: 0xf0001f04, 0x17c02: 0xf0001f04, 0x17c03: 0xf0001f04, + 0x17c04: 0xf0001f04, 0x17c05: 0xf0001f04, 0x17c06: 0xf0001f04, 0x17c07: 0xf0001f04, + 0x17c08: 0xf0001f04, 0x17c09: 0xf0001f04, 0x17c0a: 0xf0001f04, + 0x17c10: 0xf0000a04, 0x17c11: 0xf0000a04, 0x17c12: 0xf0000a04, 0x17c13: 0xf0000a04, + 0x17c14: 0xf0000a04, 0x17c15: 0xf0000a04, 0x17c16: 0xf0000a04, 0x17c17: 0xf0000a04, + 0x17c18: 0xe00024b3, 0x17c19: 0xf0000a04, 0x17c1a: 0xf0000a04, 0x17c1b: 0xf0000a04, + 0x17c1c: 0xf0000a04, 0x17c1d: 0xf0000a04, 0x17c1e: 0xf0000a04, 0x17c1f: 0xf0000a04, + 0x17c20: 0xf0000a04, 0x17c21: 0xf0000a04, 0x17c22: 0xf0000a04, 0x17c23: 0xf0000a04, + 0x17c24: 0xf0000a04, 0x17c25: 0xf0000a04, 0x17c26: 0xf0000a04, 0x17c27: 0xf0000a04, + 0x17c28: 0xf0000a04, 0x17c29: 0xf0000a04, 0x17c2a: 0xf0000a04, 0x17c2b: 0x002c3a8c, + 0x17c2c: 0x002f7a8c, 0x17c2d: 0xf0000c0c, 0x17c2e: 0xf0000c0c, + 0x17c30: 0x002bde9d, 0x17c31: 0x002c0a9d, 0x17c32: 0x002c3a9d, 0x17c33: 0x002c629d, + 0x17c34: 0x002c989d, 0x17c35: 0x002d089d, 0x17c36: 0x002d229d, 0x17c37: 0x002d689d, + 0x17c38: 0x002d9a9d, 0x17c39: 0x002dcc9d, 0x17c3a: 0x002dfe9d, 0x17c3b: 0x002e229d, + 0x17c3c: 0x002e829d, 0x17c3d: 0x002e9e9d, 0x17c3e: 0x002ee29d, 0x17c3f: 0x002f2c9d, + // Block 0x5f1, offset 0x17c40 + 0x17c40: 0x00352088, 0x17c41: 0x40352020, 0x17c42: 0x40070620, 0x17c43: 0xae608302, + 0x17c44: 0xae605f02, 0x17c45: 0xae602a02, 0x17c46: 0xae602202, 0x17c47: 0xae605f02, + 0x17c48: 0xa0000000, 0x17c49: 0xa0000000, 0x17c4a: 0x00341c88, 0x17c4b: 0x40341c20, + 0x17c4c: 0x00369688, 0x17c4d: 0x40369620, 0x17c4e: 0x00353088, 0x17c4f: 0x40353020, + 0x17c50: 0x00336483, 0x17c51: 0x40336420, 0x17c52: 0x00336a88, 0x17c53: 0x40336a20, + 0x17c54: 0x00337a88, 0x17c55: 0x40337a20, 0x17c56: 0x0033dc88, 0x17c57: 0x4033dc20, + 0x17c58: 0x0033aa88, 0x17c59: 0x4033aa20, 0x17c5a: 0x00345888, 0x17c5b: 0x40345820, + 0x17c5c: 0x00347888, 0x17c5d: 0x40347820, 0x17c5e: 0x00347088, 0x17c5f: 0x40347020, + 0x17c60: 0x00346888, 0x17c61: 0x40346820, 0x17c62: 0x0034ca88, 0x17c63: 0x4034ca20, + 0x17c64: 0x0034dc88, 0x17c65: 0x4034dc20, 0x17c66: 0x00351888, 0x17c67: 0x40351820, + 0x17c68: 0x00372688, 0x17c69: 0x40372620, 0x17c6a: 0x00354488, 0x17c6b: 0x40354420, + 0x17c6c: 0x00355888, 0x17c6d: 0x40355820, 0x17c6e: 0x00359288, 0x17c6f: 0x40359220, + 0x17c70: 0x00359a88, 0x17c71: 0x40359a20, 0x17c72: 0x0035cc88, 0x17c73: 0x4035cc20, + 0x17c74: 0x00360e88, 0x17c75: 0x40360e20, 0x17c76: 0x00362a88, 0x17c77: 0x40362a20, + 0x17c78: 0x00363a88, 0x17c79: 0x40363a20, 0x17c7a: 0x0035d488, 0x17c7b: 0x4035d420, + 0x17c7c: 0x00364488, 0x17c7d: 0x40364420, 0x17c7e: 0x00364c88, 0x17c7f: 0x40364c20, + // Block 0x5f2, offset 0x17c80 + 0x17c80: 0xa0000000, 0x17c81: 0xa0000000, 0x17c82: 0xa0000000, 0x17c83: 0xa0000000, + 0x17c84: 0xa0000000, 0x17c86: 0x40096620, 0x17c87: 0x40096a20, + 0x17c88: 0x40070820, 0x17c89: 0x4004f220, 0x17c8a: 0x4004f620, 0x17c8b: 0x4027e620, + 0x17c8c: 0x40024820, 0x17c8d: 0x40024a20, 0x17c8e: 0x40070e20, 0x17c8f: 0x40071020, + 0x17c90: 0xa0000001, 0x17c91: 0xa0000002, 0x17c92: 0xa0000004, 0x17c93: 0xa0000003, + 0x17c94: 0xa0000005, 0x17c95: 0xae600000, 0x17c96: 0xae600000, 0x17c97: 0xae600000, + 0x17c98: 0xa1e00000, 0x17c99: 0xa1f00000, 0x17c9a: 0xa2000000, 0x17c9b: 0x40026420, + 0x17c9e: 0x40027020, 0x17c9f: 0x4002cc20, + 0x17ca0: 0x403aa220, 0x17ca1: 0x4039a620, 0x17ca2: 0x40393a20, 0x17ca3: 0x40393821, + 0x17ca4: 0x40399c21, 0x17ca5: 0x40392820, 0x17ca6: 0x4039a821, 0x17ca7: 0xcf6e0151, + 0x17ca8: 0xcf729a11, 0x17ca9: 0x40395420, 0x17caa: 0xcf769a11, 0x17cab: 0x40394c20, + 0x17cac: 0xcf7a9a11, 0x17cad: 0x40395620, 0x17cae: 0x40395820, 0x17caf: 0xcf7e9a11, + 0x17cb0: 0x40396220, 0x17cb1: 0xcf829a11, 0x17cb2: 0x40396c20, 0x17cb3: 0x40397020, + 0x17cb4: 0x40397220, 0x17cb5: 0x40397420, 0x17cb6: 0x40397620, 0x17cb7: 0x40397820, + 0x17cb8: 0x40397a20, 0x17cb9: 0x40397c20, 0x17cba: 0x40397e20, 0x17cbb: 0x403a3820, + 0x17cbc: 0x403a3a20, 0x17cbd: 0x403a9c20, 0x17cbe: 0x403a9e20, 0x17cbf: 0x403aa020, + // Block 0x5f3, offset 0x17cc0 + 0x17cc0: 0xa0000000, 0x17cc1: 0x40398020, 0x17cc2: 0x40398220, 0x17cc3: 0x403a1a20, + 0x17cc4: 0xcf8a9a11, 0x17cc5: 0xcf8c9a11, 0x17cc6: 0xcf8e9a11, 0x17cc7: 0x403a6820, + 0x17cc8: 0xcf929a32, 0x17cc9: 0x403a8e20, 0x17cca: 0xcf970171, 0x17ccb: 0xa000c302, + 0x17ccc: 0xa000c502, 0x17ccd: 0xa000c402, 0x17cce: 0xa000bd02, 0x17ccf: 0xa000bf02, + 0x17cd0: 0xa000be02, 0x17cd1: 0xa000c702, 0x17cd2: 0xa220bc02, 0x17cd3: 0xa000c902, + 0x17cd4: 0xa000c602, 0x17cd5: 0xadc0bf02, 0x17cd6: 0xa000c102, 0x17cd7: 0xa000c202, + 0x17cd8: 0xa000c802, 0x17cd9: 0xae60c402, 0x17cda: 0xae60c502, 0x17cdb: 0xae60c602, + 0x17cdc: 0xadc0c702, 0x17cdd: 0xae60c802, 0x17cde: 0xae60c902, 0x17cdf: 0xadc0c002, + 0x17ce0: 0xe000015e, 0x17ce1: 0xe00001e6, 0x17ce2: 0xe0000301, 0x17ce3: 0xe00003db, + 0x17ce4: 0xe00004b6, 0x17ce5: 0xe0000580, 0x17ce6: 0xe000064b, 0x17ce7: 0xe00006f3, + 0x17ce8: 0xe000079f, 0x17ce9: 0xe0000844, 0x17cea: 0x4004ee20, 0x17ceb: 0x40024c20, + 0x17cec: 0x40024e20, 0x17ced: 0x4004de20, 0x17cee: 0x40393a20, 0x17cef: 0x403a1020, + 0x17cf0: 0xa000c002, 0x17cf1: 0x40392420, 0x17cf2: 0x40392220, 0x17cf3: 0x40392a20, + 0x17cf4: 0x00391c84, 0x17cf5: 0xf0000404, 0x17cf6: 0xe000b07a, 0x17cf7: 0xf0000404, + 0x17cf8: 0xf0000404, 0x17cf9: 0xcf789a11, 0x17cfa: 0x40395c20, 0x17cfb: 0x40393e20, + 0x17cfc: 0x40395e20, 0x17cfd: 0x40396020, 0x17cfe: 0xcf749a11, 0x17cff: 0x40396220, + // Block 0x5f4, offset 0x17d00 + 0x17d00: 0x40394220, 0x17d01: 0x40397620, 0x17d02: 0x40397820, 0x17d03: 0x40396620, + 0x17d04: 0x40396820, 0x17d05: 0x40397a20, 0x17d06: 0xcf7c9a11, 0x17d07: 0x40396e20, + 0x17d08: 0xcf809a11, 0x17d09: 0x40398e20, 0x17d0a: 0x40399020, 0x17d0b: 0x40399220, + 0x17d0c: 0x40399420, 0x17d0d: 0x40399620, 0x17d0e: 0x40399820, 0x17d0f: 0x40399a20, + 0x17d10: 0x40399c20, 0x17d11: 0xcf849a11, 0x17d12: 0x4039aa20, 0x17d13: 0x4039ac20, + 0x17d14: 0x4039ae20, 0x17d15: 0x4039b020, 0x17d16: 0x4039b220, 0x17d17: 0x4039b420, + 0x17d18: 0x40396e20, 0x17d19: 0x4039b820, 0x17d1a: 0x4039ca20, 0x17d1b: 0x4039cc20, + 0x17d1c: 0x4039ce20, 0x17d1d: 0x4039e020, 0x17d1e: 0x4039e220, 0x17d1f: 0x4039ea20, + 0x17d20: 0x4039f220, 0x17d21: 0x4039fe20, 0x17d22: 0x403a0020, 0x17d23: 0x403a0220, + 0x17d24: 0x403a0420, 0x17d25: 0x403a0820, 0x17d26: 0x403a0a20, 0x17d27: 0x403a1420, + 0x17d28: 0x403a1620, 0x17d29: 0xcf869a11, 0x17d2a: 0x403a1e20, 0x17d2b: 0x403a2020, + 0x17d2c: 0x403a2220, 0x17d2d: 0x403a2620, 0x17d2e: 0x403a2820, 0x17d2f: 0xcf889a11, + 0x17d30: 0x403a2c20, 0x17d31: 0x403a2e20, 0x17d32: 0x403a3020, 0x17d33: 0x403a3220, + 0x17d34: 0x403a3420, 0x17d35: 0x403a4220, 0x17d36: 0x403a4420, 0x17d37: 0x403a4620, + 0x17d38: 0x403a4820, 0x17d39: 0x403a6020, 0x17d3a: 0xcf909a11, 0x17d3b: 0x403a5a20, + 0x17d3c: 0x403a5c20, 0x17d3d: 0x403a5e20, 0x17d3e: 0x4039a220, 0x17d3f: 0x40396c20, + // Block 0x5f5, offset 0x17d40 + 0x17d40: 0xe000b077, 0x17d41: 0xcf950171, 0x17d42: 0x4039a021, 0x17d43: 0x4039a420, + 0x17d44: 0x403a7620, 0x17d45: 0x403a7820, 0x17d46: 0x403a7a20, 0x17d47: 0x403a7c20, + 0x17d48: 0x403a7e20, 0x17d49: 0x403a8020, 0x17d4a: 0x403a8220, 0x17d4b: 0x403a8420, + 0x17d4c: 0xcf999a11, 0x17d4d: 0x403a9420, 0x17d4e: 0x403a9620, 0x17d4f: 0x403a8620, + 0x17d50: 0x403a9820, 0x17d51: 0x403a9a20, 0x17d52: 0xcf9b0171, 0x17d53: 0x4039ac21, + 0x17d54: 0x4002e820, 0x17d55: 0x403a7220, 0x17d56: 0xae600000, 0x17d57: 0xae600000, + 0x17d58: 0xae600000, 0x17d59: 0xae600000, 0x17d5a: 0xae600000, 0x17d5b: 0xae600000, + 0x17d5c: 0xae600000, 0x17d5d: 0xa0000000, 0x17d5e: 0x40071220, 0x17d5f: 0xae600000, + 0x17d60: 0xae600000, 0x17d61: 0xae600000, 0x17d62: 0xae600000, 0x17d63: 0xadc00000, + 0x17d64: 0xae600000, 0x17d65: 0x003a7484, 0x17d66: 0x003a9084, 0x17d67: 0xae600000, + 0x17d68: 0xae600000, 0x17d69: 0x40071420, 0x17d6a: 0xadc00000, 0x17d6b: 0xae600000, + 0x17d6c: 0xae600000, 0x17d6d: 0xadc00000, 0x17d6e: 0x40399e20, 0x17d6f: 0x4039ba20, + 0x17d70: 0xe0000161, 0x17d71: 0xe00001e9, 0x17d72: 0xe0000304, 0x17d73: 0xe00003de, + 0x17d74: 0xe00004b9, 0x17d75: 0xe0000583, 0x17d76: 0xe000064e, 0x17d77: 0xe00006f6, + 0x17d78: 0xe00007a2, 0x17d79: 0xe0000847, 0x17d7a: 0x4039d020, 0x17d7b: 0x4039e420, + 0x17d7c: 0x4039f420, 0x17d7d: 0xe0001553, 0x17d7e: 0xe0001779, 0x17d7f: 0x403a7020, + // Block 0x5f6, offset 0x17d80 + 0x17d80: 0xe000155f, 0x17d81: 0xe0001565, 0x17d82: 0xe000157a, 0x17d83: 0xe00015b0, + 0x17d84: 0xe00015b6, 0x17d85: 0xe000ae97, 0x17d86: 0xe000ae9d, 0x17d87: 0xe000aea3, + 0x17d88: 0xe000aeb5, 0x17d89: 0xf0001a1a, 0x17d8a: 0xf0001a1a, 0x17d8b: 0xe000aebe, + 0x17d8c: 0xe000aec4, 0x17d8d: 0xe000aeca, 0x17d8e: 0xe000aedc, 0x17d8f: 0xe000289a, + 0x17d90: 0xe00036b1, 0x17d91: 0xe000aee2, 0x17d92: 0xe000aef4, 0x17d93: 0xe00028a0, + 0x17d94: 0xe00036ba, 0x17d95: 0xe000aefd, 0x17d96: 0xe000af03, 0x17d97: 0xe000af09, + 0x17d98: 0xe000af0f, 0x17d99: 0xe000af15, 0x17d9a: 0xe000af18, 0x17d9b: 0xe000af1e, + 0x17d9c: 0xe000af2d, 0x17d9d: 0xe000af36, 0x17d9e: 0xe000af3f, 0x17d9f: 0xe000af4e, + 0x17da0: 0xe000af8a, 0x17da1: 0xe000af99, 0x17da2: 0xe000af9f, 0x17da3: 0xe000afa5, + 0x17da4: 0xe000afab, 0x17da5: 0xe000afb7, 0x17da6: 0xe000afbd, 0x17da7: 0xe000afc6, + 0x17da8: 0xe000afcf, 0x17da9: 0xe000afd5, 0x17daa: 0xe000afdb, 0x17dab: 0xe000afe1, + 0x17dac: 0xe000afe7, 0x17dad: 0xe000afed, 0x17dae: 0xe000aff3, 0x17daf: 0xe000aff9, + 0x17db0: 0xe000afff, 0x17db1: 0xe00028e2, 0x17db2: 0xe0003708, 0x17db3: 0xe000b005, + 0x17db4: 0xe000b00b, 0x17db5: 0xe00028e8, 0x17db6: 0xe000370e, 0x17db7: 0xf0001a1a, + 0x17db8: 0xe000371a, 0x17db9: 0xe0003720, 0x17dba: 0xe0003726, 0x17dbb: 0xe0003732, + 0x17dbc: 0xe000373e, 0x17dbd: 0xf0001a1a, 0x17dbe: 0xf0001a1a, 0x17dbf: 0xe000b017, + // Block 0x5f7, offset 0x17dc0 + 0x17dc0: 0xe000b01d, 0x17dc1: 0xe000b023, 0x17dc2: 0xe000b02f, 0x17dc3: 0xe00028f4, + 0x17dc4: 0xe000374d, 0x17dc5: 0xe000b038, 0x17dc6: 0xe000b03e, 0x17dc7: 0xe000b044, + 0x17dc8: 0xe000b04d, 0x17dc9: 0xe00028f7, 0x17dca: 0xe0003750, 0x17dcb: 0xe000b053, + 0x17dcc: 0xe000b059, 0x17dcd: 0xe000b05f, 0x17dce: 0xe000b071, 0x17dcf: 0xe00028fd, + 0x17dd0: 0xe000375c, 0x17dd1: 0xe0003765, 0x17dd2: 0xe000376b, 0x17dd3: 0xf0001a1a, + 0x17dd4: 0xf0001a1a, 0x17dd5: 0xe0003786, 0x17dd6: 0xe000378c, 0x17dd7: 0xe0003792, + 0x17dd8: 0xe00037a4, 0x17dd9: 0xf0001a1a, 0x17dda: 0xf0001a1a, 0x17ddb: 0xe000af21, + 0x17ddc: 0xe000af24, 0x17ddd: 0xe000377d, 0x17dde: 0xe0000003, 0x17ddf: 0xe0000006, + 0x17de0: 0xe0000009, 0x17de1: 0xe000000c, 0x17de2: 0xe000000f, 0x17de3: 0xe0000012, + 0x17de4: 0xe000156b, 0x17de5: 0xe000156e, 0x17de6: 0xe0001577, 0x17de7: 0xe000157d, + 0x17de8: 0xe00015aa, 0x17de9: 0xe00015b3, 0x17dea: 0xe000aea6, 0x17deb: 0xe000aea9, + 0x17dec: 0xe000aeb2, 0x17ded: 0xe000aeb8, 0x17dee: 0xf0001919, 0x17def: 0xf0001919, + 0x17df0: 0xe000aecd, 0x17df1: 0xe000aed0, 0x17df2: 0xe000aed9, 0x17df3: 0xe000aedf, + 0x17df4: 0xe0002897, 0x17df5: 0xe00036ae, 0x17df6: 0xe000aee5, 0x17df7: 0xe000aee8, + 0x17df8: 0xe000aef1, 0x17df9: 0xe000aef7, 0x17dfa: 0xe000289d, 0x17dfb: 0xe00036b7, + 0x17dfc: 0xe00028df, 0x17dfd: 0xe0003705, 0x17dfe: 0xe00028e5, 0x17dff: 0xe000370b, + // Block 0x5f8, offset 0x17e00 + 0x17e00: 0xf0001919, 0x17e01: 0xe000372f, 0x17e02: 0xe000373b, 0x17e03: 0xf0001919, + 0x17e04: 0xf0001919, 0x17e05: 0xe000b02c, 0x17e06: 0xe00028f1, 0x17e07: 0xe000374a, + 0x17e08: 0xe000b032, 0x17e09: 0xe000b04a, 0x17e0a: 0xe000b062, 0x17e0b: 0xe000b065, + 0x17e0c: 0xe000b06e, 0x17e0d: 0xe000b074, 0x17e0e: 0xe00028fa, 0x17e0f: 0xe0003759, + 0x17e10: 0xe000377a, 0x17e11: 0xe0003795, 0x17e12: 0xe0003798, 0x17e13: 0xe00037a1, + 0x17e14: 0xe00037a7, 0x17e15: 0xf0001919, 0x17e16: 0xf0001919, 0x17e17: 0xe000155c, + 0x17e18: 0xe0001562, 0x17e19: 0xe0001568, 0x17e1a: 0xe0001571, 0x17e1b: 0xe0001580, + 0x17e1c: 0xe000ae94, 0x17e1d: 0xe000ae9a, 0x17e1e: 0xe000aea0, 0x17e1f: 0xe000aeac, + 0x17e20: 0xf0001717, 0x17e21: 0xe000aebb, 0x17e22: 0xe000aec1, 0x17e23: 0xe000aec7, + 0x17e24: 0xe000aed3, 0x17e25: 0xe00036a8, 0x17e26: 0xe000aeeb, 0x17e27: 0xe000aefa, + 0x17e28: 0xe000af00, 0x17e29: 0xe000af06, 0x17e2a: 0xe000af0c, 0x17e2b: 0xe000af12, + 0x17e2c: 0xe000af1b, 0x17e2d: 0xe000af27, 0x17e2e: 0xe000af30, 0x17e2f: 0xe000af39, + 0x17e30: 0xe000af48, 0x17e31: 0xe000af87, 0x17e32: 0xe000af8d, 0x17e33: 0xe000af96, + 0x17e34: 0xe000af9c, 0x17e35: 0xe000afa2, 0x17e36: 0xe000afa8, 0x17e37: 0xe000afb4, + 0x17e38: 0xe000afba, 0x17e39: 0xe000afc9, 0x17e3a: 0xe000afd2, 0x17e3b: 0xe000afd8, + 0x17e3c: 0xe000afde, 0x17e3d: 0xe000afe4, 0x17e3e: 0xe000afea, 0x17e3f: 0xe000aff0, + // Block 0x5f9, offset 0x17e40 + 0x17e40: 0xe000aff6, 0x17e41: 0xe000affc, 0x17e42: 0xe000b002, 0x17e43: 0xe000b008, + 0x17e44: 0xe0003717, 0x17e45: 0xe000371d, 0x17e46: 0xe0003723, 0x17e47: 0xe0003729, + 0x17e48: 0xe0003735, 0x17e49: 0xe000b014, 0x17e4a: 0xe000b01a, 0x17e4b: 0xe000b020, + 0x17e4c: 0xe000b026, 0x17e4d: 0xe0003747, 0x17e4e: 0xe000b035, 0x17e4f: 0xe000b03b, + 0x17e50: 0xe000b041, 0x17e51: 0xe000b047, 0x17e52: 0xe000b050, 0x17e53: 0xe000b056, + 0x17e54: 0xe000b05c, 0x17e55: 0xe000b068, 0x17e56: 0xe0003753, 0x17e57: 0xe0003762, + 0x17e58: 0xe0003768, 0x17e59: 0xe000375f, 0x17e5a: 0xe0003783, 0x17e5b: 0xe0003789, + 0x17e5c: 0xe000378f, 0x17e5d: 0xe000379b, 0x17e5e: 0xf0001717, 0x17e5f: 0xe0001574, + 0x17e60: 0xe0001583, 0x17e61: 0xe000aeaf, 0x17e62: 0xf0001818, 0x17e63: 0xe000aed6, + 0x17e64: 0xe00036ab, 0x17e65: 0xe000aeee, 0x17e66: 0xe00036b4, 0x17e67: 0xe000af4b, + 0x17e68: 0xe00036d2, 0x17e69: 0xe000af7e, 0x17e6a: 0xe00036de, 0x17e6b: 0xe000372c, + 0x17e6c: 0xe0003738, 0x17e6d: 0xe000b029, 0x17e6e: 0xe000b06b, 0x17e6f: 0xe0003756, + 0x17e70: 0xe000379e, 0x17e71: 0xf0001818, 0x17e72: 0xe000ae91, 0x17e73: 0xe0003690, + 0x17e74: 0xe0003693, 0x17e75: 0xe00028d0, 0x17e76: 0xe00036f6, 0x17e77: 0xe00028d6, + 0x17e78: 0xe00036fc, 0x17e79: 0xe00028dc, 0x17e7a: 0xe0003702, 0x17e7b: 0xe00028b8, + 0x17e7c: 0xe00036d8, 0x17e7d: 0xe00028be, 0x17e7e: 0xe00036e4, 0x17e7f: 0xe00028ac, + // Block 0x5fa, offset 0x17e80 + 0x17e80: 0xe00036c6, 0x17e81: 0xe00028a6, 0x17e82: 0xe00036c0, 0x17e83: 0xe00028b2, + 0x17e84: 0xe00036cc, 0x17e85: 0xe00028c4, 0x17e86: 0xe00036ea, 0x17e87: 0xe00028ca, + 0x17e88: 0xe00036f0, 0x17e89: 0xe000af5a, 0x17e8a: 0xe000af66, 0x17e8b: 0xe000af72, + 0x17e8c: 0xe000af84, 0x17e8d: 0xe000af78, 0x17e8e: 0xe000af45, 0x17e8f: 0xe000af93, + 0x17e90: 0xe000afb1, 0x17e91: 0xe00028cd, 0x17e92: 0xe00036f3, 0x17e93: 0xe00028d3, + 0x17e94: 0xe00036f9, 0x17e95: 0xe00028d9, 0x17e96: 0xe00036ff, 0x17e97: 0xe00028b5, + 0x17e98: 0xe00036d5, 0x17e99: 0xe00028bb, 0x17e9a: 0xe00036e1, 0x17e9b: 0xe00028a9, + 0x17e9c: 0xe00036c3, 0x17e9d: 0xe00028a3, 0x17e9e: 0xe00036bd, 0x17e9f: 0xe00028af, + 0x17ea0: 0xe00036c9, 0x17ea1: 0xe00028c1, 0x17ea2: 0xe00036e7, 0x17ea3: 0xe00028c7, + 0x17ea4: 0xe00036ed, 0x17ea5: 0xe000af57, 0x17ea6: 0xe000af63, 0x17ea7: 0xe000af6f, + 0x17ea8: 0xe000af81, 0x17ea9: 0xe000af75, 0x17eaa: 0xe000af42, 0x17eab: 0xe000af90, + 0x17eac: 0xe000afae, 0x17ead: 0xe000af51, 0x17eae: 0xe000af5d, 0x17eaf: 0xe000af69, + 0x17eb0: 0xe000af7b, 0x17eb1: 0xe00036cf, 0x17eb2: 0xe00036db, 0x17eb3: 0xe000afc0, + 0x17eb4: 0xe000af2a, 0x17eb5: 0xe000af33, 0x17eb6: 0xe000af3c, 0x17eb7: 0xe000af54, + 0x17eb8: 0xe000af60, 0x17eb9: 0xe000af6c, 0x17eba: 0xe000afc3, 0x17ebb: 0xe000afcc, + 0x17ebc: 0xe0003696, 0x17ebd: 0xe0003699, 0x17ebe: 0x4004c020, 0x17ebf: 0x4004c220, + // Block 0x5fb, offset 0x17ec0 + 0x17ec0: 0x0039de98, 0x17ec1: 0x0039e69a, 0x17ec2: 0x0039e699, 0x17ec3: 0x0039e697, + 0x17ec4: 0x0039e698, 0x17ec5: 0x0039e89a, 0x17ec6: 0x0039e899, 0x17ec7: 0x0039e897, + 0x17ec8: 0x0039e898, 0x17ec9: 0x0039ee9a, 0x17eca: 0x0039ee99, 0x17ecb: 0x0039ee97, + 0x17ecc: 0x0039ee98, 0x17ecd: 0x0039f09a, 0x17ece: 0x0039f099, 0x17ecf: 0x0039f097, + 0x17ed0: 0x0039f098, 0x17ed1: 0x0039fc9a, 0x17ed2: 0x0039fc99, 0x17ed3: 0x0039fc97, + 0x17ed4: 0x0039fc98, 0x17ed5: 0x003a129a, 0x17ed6: 0x003a1299, 0x17ed7: 0x003a1297, + 0x17ed8: 0x003a1298, 0x17ed9: 0x003a1a9a, 0x17eda: 0x003a1a99, 0x17edb: 0x003a1a97, + 0x17edc: 0x003a1a98, 0x17edd: 0x003a409a, 0x17ede: 0x003a4099, 0x17edf: 0x003a4097, + 0x17ee0: 0x003a4098, 0x17ee1: 0x003a4e9a, 0x17ee2: 0x003a4e99, 0x17ee3: 0x003a4e97, + 0x17ee4: 0x003a4e98, 0x17ee5: 0x003a569a, 0x17ee6: 0x003a5699, 0x17ee7: 0x003a5697, + 0x17ee8: 0x003a5698, 0x17ee9: 0x003a689a, 0x17eea: 0x003a6899, 0x17eeb: 0x003a6897, + 0x17eec: 0x003a6898, 0x17eed: 0x003a749a, 0x17eee: 0x003a7499, 0x17eef: 0x003a8e9a, + 0x17ef0: 0x003a8e99, 0x17ef1: 0x003a909a, 0x17ef2: 0x003a9099, 0x17ef3: 0x003a9097, + 0x17ef4: 0x003a9098, 0x17ef5: 0xe0001732, 0x17ef6: 0xe000172f, 0x17ef7: 0xe0001738, + 0x17ef8: 0xe0001735, 0x17ef9: 0xe000173e, 0x17efa: 0xe000173b, 0x17efb: 0xe000b011, + 0x17efc: 0xe000b00e, 0x17eff: 0xa0000000, + // Block 0x5fc, offset 0x17f00 + 0x17f00: 0xa0000000, 0x17f01: 0xa0000000, 0x17f02: 0xa0000000, 0x17f03: 0xa0000000, + 0x17f04: 0xa0000000, 0x17f05: 0xa0000000, 0x17f06: 0xa0000000, 0x17f07: 0xa0000000, + 0x17f08: 0xa0000000, 0x17f09: 0x40020020, 0x17f0a: 0x40020220, 0x17f0b: 0x40020420, + 0x17f0c: 0x40020620, 0x17f0d: 0x40020820, 0x17f0e: 0xa0000000, 0x17f0f: 0xa0000000, + 0x17f10: 0xa0000000, 0x17f11: 0xa0000000, 0x17f12: 0xa0000000, 0x17f13: 0xa0000000, + 0x17f14: 0xa0000000, 0x17f15: 0xa0000000, 0x17f16: 0xa0000000, 0x17f17: 0xa0000000, + 0x17f18: 0xa0000000, 0x17f19: 0xa0000000, 0x17f1a: 0xa0000000, 0x17f1b: 0xa0000000, + 0x17f1c: 0xa0000000, 0x17f1d: 0xa0000000, 0x17f1e: 0xa0000000, 0x17f1f: 0xa0000000, + 0x17f20: 0x40021220, 0x17f21: 0x4002ba20, 0x17f22: 0x4003e020, 0x17f23: 0x4004ea20, + 0x17f24: 0x4027de20, 0x17f25: 0x4004ec20, 0x17f26: 0x4004e620, 0x17f27: 0x4003d220, + 0x17f28: 0x4003f420, 0x17f29: 0x4003f620, 0x17f2a: 0x4004d820, 0x17f2b: 0x40093820, + 0x17f2c: 0x40024020, 0x17f2d: 0x40021a20, 0x17f2e: 0x4002e420, 0x17f2f: 0x4004e220, + 0x17f30: 0x4029cc20, 0x17f31: 0x4029ce20, 0x17f32: 0x4029d020, 0x17f33: 0x4029d220, + 0x17f34: 0x4029d420, 0x17f35: 0x4029d620, 0x17f36: 0x4029d820, 0x17f37: 0x4029da20, + 0x17f38: 0x4029dc20, 0x17f39: 0x4029de20, 0x17f3a: 0x40026c20, 0x17f3b: 0x40026220, + 0x17f3c: 0x40094020, 0x17f3d: 0x40094220, 0x17f3e: 0x40094420, 0x17f3f: 0x4002c420, + // Block 0x5fd, offset 0x17f40 + 0x17f40: 0x4004d620, 0x17f41: 0xcead9741, 0x17f42: 0x002c0a88, 0x17f43: 0x002c3a88, + 0x17f44: 0x002c6288, 0x17f45: 0xce6d2741, 0x17f46: 0x002d0888, 0x17f47: 0x002d2288, + 0x17f48: 0x002d6888, 0x17f49: 0x002d9a88, 0x17f4a: 0x002dcc88, 0x17f4b: 0x002dfe88, + 0x17f4c: 0xc0030002, 0x17f4d: 0x002e8288, 0x17f4e: 0x002e9e88, 0x17f4f: 0xcfa09a71, + 0x17f50: 0x002f2c88, 0x17f51: 0x002f5688, 0x17f52: 0x002f7a88, 0x17f53: 0x002fe688, + 0x17f54: 0x00302c88, 0x17f55: 0xc3479aa1, 0x17f56: 0x0030be88, 0x17f57: 0x0030e288, + 0x17f58: 0x0030f688, 0x17f59: 0x00310088, 0x17f5a: 0x00312a88, 0x17f5b: 0x4003f820, + 0x17f5c: 0x4004e420, 0x17f5d: 0x4003fa20, 0x17f5e: 0x40062420, 0x17f5f: 0x40021620, + 0x17f60: 0x40061e20, 0x17f61: 0xceaa9741, 0x17f62: 0x402c0a20, 0x17f63: 0x402c3a20, + 0x17f64: 0x402c6220, 0x17f65: 0xce6b2741, 0x17f66: 0x402d0820, 0x17f67: 0x402d2220, + 0x17f68: 0x402d6820, 0x17f69: 0x402d9a20, 0x17f6a: 0x402dcc20, 0x17f6b: 0x402dfe20, + 0x17f6c: 0xc0000002, 0x17f6d: 0x402e8220, 0x17f6e: 0x402e9e20, 0x17f6f: 0xcf9d9a71, + 0x17f70: 0x402f2c20, 0x17f71: 0x402f5620, 0x17f72: 0x402f7a20, 0x17f73: 0x402fe620, + 0x17f74: 0x40302c20, 0x17f75: 0xc3459aa1, 0x17f76: 0x4030be20, 0x17f77: 0x4030e220, + 0x17f78: 0x4030f620, 0x17f79: 0x40310020, 0x17f7a: 0x40312a20, 0x17f7b: 0x4003fc20, + 0x17f7c: 0x40094820, 0x17f7d: 0x4003fe20, 0x17f7e: 0x40094c20, 0x17f7f: 0xa0000000, + // Block 0x5fe, offset 0x17f80 + 0x17f80: 0xe00008f5, 0x17f81: 0xe000b098, 0x17f82: 0x002be283, 0x17f83: 0xe000b092, + 0x17f84: 0xe000095b, 0x17f85: 0xe000094d, 0x17f86: 0xe00009dd, 0x17f87: 0xe0000a53, + 0x17f88: 0xe0000ae8, 0x17f89: 0xe000b10c, 0x17f8a: 0x002c9a83, 0x17f8b: 0xe0000b20, + 0x17f8c: 0xe0000c2b, 0x17f8d: 0xe000b150, 0x17f8e: 0xe0000c37, 0x17f8f: 0xe0000c43, + 0x17f90: 0xe0000ab3, 0x17f91: 0xe000b190, 0x17f92: 0xe0000d9a, 0x17f93: 0xe000b1c6, + 0x17f94: 0x002ee483, 0x17f95: 0xe000b1a8, 0x17f96: 0xe0000dd2, 0x17f97: 0x40093e20, + 0x17f98: 0xe0000e12, 0x17f99: 0xe0000fe1, 0x17f9a: 0xe000b268, 0x17f9b: 0xe0000fed, + 0x17f9c: 0xe0000fff, 0x17f9d: 0xe000b2b8, 0x17f9e: 0x00318888, 0x17f9f: 0xe0000f7b, + 0x17fa0: 0xe00008f2, 0x17fa1: 0xe000b095, 0x17fa2: 0x402be220, 0x17fa3: 0xe000b08f, + 0x17fa4: 0xe0000958, 0x17fa5: 0xe000094a, 0x17fa6: 0xe00009d5, 0x17fa7: 0xe0000a4d, + 0x17fa8: 0xe0000ae5, 0x17fa9: 0xe000b109, 0x17faa: 0x402c9a20, 0x17fab: 0xe0000b1d, + 0x17fac: 0xe0000c28, 0x17fad: 0xe000b14d, 0x17fae: 0xe0000c34, 0x17faf: 0xe0000c40, + 0x17fb0: 0xe0000aad, 0x17fb1: 0xe000b18d, 0x17fb2: 0xe0000d97, 0x17fb3: 0xe000b1c3, + 0x17fb4: 0x402ee420, 0x17fb5: 0xe000b1a5, 0x17fb6: 0xe0000dcf, 0x17fb7: 0x40093c20, + 0x17fb8: 0xe0000e0f, 0x17fb9: 0xe0000fde, 0x17fba: 0xe000b265, 0x17fbb: 0xe0000fea, + 0x17fbc: 0xe0000ffc, 0x17fbd: 0xe000b2b5, 0x17fbe: 0x40318820, 0x17fbf: 0xe0001114, + // Block 0x5ff, offset 0x17fc0 + 0x17fc0: 0xe0000983, 0x17fc1: 0xe0000980, 0x17fc2: 0x002be083, 0x17fc3: 0x402be020, + 0x17fc4: 0xe000097d, 0x17fc5: 0xe000097a, 0x17fc6: 0xe000b0ec, 0x17fc7: 0xe000b0e9, + 0x17fc8: 0xe0000a3e, 0x17fc9: 0xe0000a3b, 0x17fca: 0xe0000a4a, 0x17fcb: 0xe0000a47, + 0x17fcc: 0xe0000a44, 0x17fcd: 0xe0000a41, 0x17fce: 0xe0000a86, 0x17fcf: 0xe0000a83, + 0x17fd0: 0x002c6483, 0x17fd1: 0x402c6420, 0x17fd2: 0xe0000b46, 0x17fd3: 0xe0000b43, + 0x17fd4: 0xe0000aee, 0x17fd5: 0xe0000aeb, 0x17fd6: 0xe0000b2c, 0x17fd7: 0xe0000b29, + 0x17fd8: 0xe0000b40, 0x17fd9: 0xe0000b3d, 0x17fda: 0xe0000b1a, 0x17fdb: 0xe0000b17, + 0x17fdc: 0xe0000bb8, 0x17fdd: 0xe0000bb5, 0x17fde: 0xe0000bb2, 0x17fdf: 0xe0000baf, + 0x17fe0: 0xe0000bc4, 0x17fe1: 0xe0000bc1, 0x17fe2: 0xe0000bca, 0x17fe3: 0xe0000bc7, + 0x17fe4: 0xe0000bee, 0x17fe5: 0xe0000beb, 0x17fe6: 0xe0000c1b, 0x17fe7: 0xe0000c18, + 0x17fe8: 0xe000b14a, 0x17fe9: 0xe000b147, 0x17fea: 0xe0000c60, 0x17feb: 0xe0000c5d, + 0x17fec: 0xe0000c31, 0x17fed: 0xe0000c2e, 0x17fee: 0xe0000c5a, 0x17fef: 0xe0000c57, + 0x17ff0: 0xe0000c54, 0x17ff1: 0x402da220, 0x17ff2: 0xf0000a0a, 0x17ff3: 0xf0000404, + 0x17ff4: 0xe0000c8a, 0x17ff5: 0xe0000c87, 0x17ff6: 0xe0000c9f, 0x17ff7: 0xe0000c9c, + 0x17ff8: 0x402f7220, 0x17ff9: 0xe000b170, 0x17ffa: 0xe000b16d, 0x17ffb: 0xe0000cd8, + 0x17ffc: 0xe0000cd5, 0x17ffd: 0xe0000cd2, 0x17ffe: 0xe0000ccf, 0x17fff: 0xe0000d04, + // Block 0x600, offset 0x18000 + 0x18000: 0xe0000cfe, 0x18001: 0xe0000cf8, 0x18002: 0xe0000cf5, 0x18003: 0xe000b196, + 0x18004: 0xe000b193, 0x18005: 0xe0000d6f, 0x18006: 0xe0000d6c, 0x18007: 0xe0000d5d, + 0x18008: 0xe0000d5a, 0x18009: 0xf0000404, 0x1800a: 0x002eda88, 0x1800b: 0x402eda20, + 0x1800c: 0xe0000e2e, 0x1800d: 0xe0000e2b, 0x1800e: 0xe0000da0, 0x1800f: 0xe0000d9d, + 0x18010: 0xe0000de0, 0x18011: 0xe0000ddd, 0x18012: 0xe0000e93, 0x18013: 0xe0000e8f, + 0x18014: 0xe000b21e, 0x18015: 0xe000b21b, 0x18016: 0xe0000edc, 0x18017: 0xe0000ed9, + 0x18018: 0xe0000ed0, 0x18019: 0xe0000ecd, 0x1801a: 0xe000b232, 0x1801b: 0xe000b22f, + 0x1801c: 0xe0000f2d, 0x1801d: 0xe0000f2a, 0x1801e: 0xe0000f47, 0x1801f: 0xe0000f44, + 0x18020: 0xe0000f33, 0x18021: 0xe0000f30, 0x18022: 0xe0000f99, 0x18023: 0xe0000f96, + 0x18024: 0xe0000f8a, 0x18025: 0xe0000f87, 0x18026: 0x00303688, 0x18027: 0x40303620, + 0x18028: 0xe000b25a, 0x18029: 0xe000b257, 0x1802a: 0xe000103f, 0x1802b: 0xe000103c, + 0x1802c: 0xe0000fe7, 0x1802d: 0xe0000fe4, 0x1802e: 0xe0000ff9, 0x1802f: 0xe0000ff6, + 0x18030: 0xe0001025, 0x18031: 0xe0001022, 0x18032: 0xe0001039, 0x18033: 0xe0001036, + 0x18034: 0xe00010d8, 0x18035: 0xe00010d5, 0x18036: 0xe000110e, 0x18037: 0xe000110b, + 0x18038: 0xe0001117, 0x18039: 0xe000b2c4, 0x1803a: 0xe000b2c1, 0x1803b: 0xe000114d, + 0x1803c: 0xe000114a, 0x1803d: 0xe0001147, 0x1803e: 0xe0001144, 0x1803f: 0xe0000f64, + // Block 0x601, offset 0x18040 + 0x18040: 0x402c1a20, 0x18041: 0x002c2a88, 0x18042: 0x002c3288, 0x18043: 0x402c3220, + 0x18044: 0x0031c488, 0x18045: 0x4031c420, 0x18046: 0x002efa88, 0x18047: 0x002c4e88, + 0x18048: 0x402c4e20, 0x18049: 0x002c7288, 0x1804a: 0x002c7a88, 0x1804b: 0x002c8488, + 0x1804c: 0x402c8420, 0x1804d: 0xe000115c, 0x1804e: 0x002cae88, 0x1804f: 0x002cb888, + 0x18050: 0x002cc288, 0x18051: 0x002d1688, 0x18052: 0x402d1620, 0x18053: 0x002d4488, + 0x18054: 0x002d5888, 0x18055: 0x402d7820, 0x18056: 0x002dc288, 0x18057: 0x002db688, + 0x18058: 0x002e0a88, 0x18059: 0x402e0a20, 0x1805a: 0x402e3820, 0x1805b: 0x402e7220, + 0x1805c: 0x0030a088, 0x1805d: 0x002eb488, 0x1805e: 0x402ebc20, 0x1805f: 0x002f1088, + 0x18060: 0x002ee683, 0x18061: 0x402ee620, 0x18062: 0x002d6088, 0x18063: 0x402d6020, + 0x18064: 0x002f3e88, 0x18065: 0x402f3e20, 0x18066: 0x002f8288, 0x18067: 0x0031b488, + 0x18068: 0x4031b420, 0x18069: 0x00300888, 0x1806a: 0x40301220, 0x1806b: 0x40304220, + 0x1806c: 0x00304a88, 0x1806d: 0x40304a20, 0x1806e: 0x00305288, 0x1806f: 0x00306e83, + 0x18070: 0x40306e20, 0x18071: 0x0030b488, 0x18072: 0x0030cc88, 0x18073: 0x00311888, + 0x18074: 0x40311820, 0x18075: 0x00313488, 0x18076: 0x40313420, 0x18077: 0x00316488, + 0x18078: 0x00316e88, 0x18079: 0x40316e20, 0x1807a: 0x40317820, 0x1807b: 0x4031a620, + 0x1807c: 0x0031bc88, 0x1807d: 0x4031bc20, 0x1807e: 0xe0000fc9, 0x1807f: 0x40319420, + // Block 0x602, offset 0x18080 + 0x18080: 0x40321220, 0x18081: 0x40321a20, 0x18082: 0x40322220, 0x18083: 0x40322a20, + 0x18084: 0xe0000ad5, 0x18085: 0xe0000ad1, 0x18086: 0xe0000acd, 0x18087: 0xf0000a0a, + 0x18088: 0xf000040a, 0x18089: 0xf0000404, 0x1808a: 0xf0000a0a, 0x1808b: 0xf000040a, + 0x1808c: 0xf0000404, 0x1808d: 0xe0000947, 0x1808e: 0xe0000944, 0x1808f: 0xe0000c3d, + 0x18090: 0xe0000c3a, 0x18091: 0xe0000dcc, 0x18092: 0xe0000dc9, 0x18093: 0xe0000ff3, + 0x18094: 0xe0000ff0, 0x18095: 0xe000101e, 0x18096: 0xe000101a, 0x18097: 0xe000b275, + 0x18098: 0xe000b271, 0x18099: 0xe0001016, 0x1809a: 0xe0001012, 0x1809b: 0xe000100e, + 0x1809c: 0xe000100a, 0x1809d: 0x402cae20, 0x1809e: 0xe0000962, 0x1809f: 0xe000095e, + 0x180a0: 0xe0000976, 0x180a1: 0xe0000972, 0x180a2: 0xe00009f4, 0x180a3: 0xe00009ef, + 0x180a4: 0x002d3a88, 0x180a5: 0x402d3a20, 0x180a6: 0xe0000bbe, 0x180a7: 0xe0000bbb, + 0x180a8: 0xe0000c99, 0x180a9: 0xe0000c96, 0x180aa: 0xe0000e20, 0x180ab: 0xe0000e1d, + 0x180ac: 0xe0000e27, 0x180ad: 0xe0000e23, 0x180ae: 0xe0001162, 0x180af: 0xe000115f, + 0x180b0: 0xe0000c8d, 0x180b1: 0xf0000a0a, 0x180b2: 0xf000040a, 0x180b3: 0xf0000404, + 0x180b4: 0xe000b138, 0x180b5: 0xe000b135, 0x180b6: 0x002d7888, 0x180b7: 0x00319488, + 0x180b8: 0xe0000d57, 0x180b9: 0xe0000d54, 0x180ba: 0xe000b0a5, 0x180bb: 0xe000b0a1, + 0x180bc: 0xe000b0ae, 0x180bd: 0xe000b0a9, 0x180be: 0xe000b1d3, 0x180bf: 0xe000b1cf, + // Block 0x603, offset 0x180c0 + 0x180c0: 0xe000098f, 0x180c1: 0xe000098c, 0x180c2: 0xe0000995, 0x180c3: 0xe0000992, + 0x180c4: 0xe0000b62, 0x180c5: 0xe0000b5f, 0x180c6: 0xe0000b68, 0x180c7: 0xe0000b65, + 0x180c8: 0xe0000c6c, 0x180c9: 0xe0000c69, 0x180ca: 0xe0000c72, 0x180cb: 0xe0000c6f, + 0x180cc: 0xe0000e4a, 0x180cd: 0xe0000e47, 0x180ce: 0xe0000e50, 0x180cf: 0xe0000e4d, + 0x180d0: 0xe0000ee8, 0x180d1: 0xe0000ee5, 0x180d2: 0xe0000eee, 0x180d3: 0xe0000eeb, + 0x180d4: 0xe0001053, 0x180d5: 0xe0001050, 0x180d6: 0xe0001059, 0x180d7: 0xe0001056, + 0x180d8: 0xe0000f61, 0x180d9: 0xe0000f5e, 0x180da: 0xe0000fa5, 0x180db: 0xe0000fa2, + 0x180dc: 0x00312288, 0x180dd: 0x40312220, 0x180de: 0xe0000bf4, 0x180df: 0xe0000bf1, + 0x180e0: 0x002ebc88, 0x180e1: 0x402c8c20, 0x180e2: 0x002f2288, 0x180e3: 0x402f2220, + 0x180e4: 0x00314088, 0x180e5: 0x40314020, 0x180e6: 0xe000096f, 0x180e7: 0xe000096c, + 0x180e8: 0xe0000b32, 0x180e9: 0xe0000b2f, 0x180ea: 0xe0000dd9, 0x180eb: 0xe0000dd5, + 0x180ec: 0xe000b1bf, 0x180ed: 0xe000b1bb, 0x180ee: 0xe0000e04, 0x180ef: 0xe0000e01, + 0x180f0: 0xe0000e0b, 0x180f1: 0xe0000e07, 0x180f2: 0xe0001129, 0x180f3: 0xe0001126, + 0x180f4: 0x402e5e20, 0x180f5: 0x402ed020, 0x180f6: 0x40305a20, 0x180f7: 0x402dd420, + 0x180f8: 0xe0000abf, 0x180f9: 0xe0000ec4, 0x180fa: 0x002be888, 0x180fb: 0x002c4488, + 0x180fc: 0x402c4420, 0x180fd: 0x002e3888, 0x180fe: 0x00303e88, 0x180ff: 0x402ffc20, + // Block 0x604, offset 0x18100 + 0x18100: 0xae603502, 0x18101: 0xae603802, 0x18102: 0xae603c02, 0x18103: 0xae603702, + 0x18104: 0xae605b02, 0x18105: 0xae606302, 0x18106: 0xae603702, 0x18107: 0xae605202, + 0x18108: 0xae604702, 0x18109: 0xae603602, 0x1810a: 0xae604302, 0x1810b: 0xae604d02, + 0x1810c: 0xae604102, 0x1810d: 0xae605f02, 0x1810e: 0xae605f02, 0x1810f: 0xae606502, + 0x18110: 0xae606602, 0x18111: 0xae606702, 0x18112: 0xae605f02, 0x18113: 0xae602202, + 0x18114: 0xae602a02, 0x18115: 0xae805f02, 0x18116: 0xadc06002, 0x18117: 0xadc06002, + 0x18118: 0xadc06002, 0x18119: 0xadc06002, 0x1811a: 0xae805f02, 0x1811b: 0xad806802, + 0x1811c: 0xadc06002, 0x1811d: 0xadc06002, 0x1811e: 0xadc06002, 0x1811f: 0xadc06002, + 0x18120: 0xadc06002, 0x18121: 0xaca06e02, 0x18122: 0xaca06f02, 0x18123: 0xae603902, + 0x18124: 0xadc07502, 0x18125: 0xadc07602, 0x18126: 0xadc07702, 0x18127: 0xaca05602, + 0x18128: 0xaca05902, 0x18129: 0xadc06002, 0x1812a: 0xadc06002, 0x1812b: 0xadc06002, + 0x1812c: 0xadc06002, 0x1812d: 0xadc07802, 0x1812e: 0xadc07902, 0x1812f: 0xadc06002, + 0x18130: 0xadc07a02, 0x18131: 0xadc07b02, 0x18132: 0xadc02102, 0x18133: 0xadc06002, + 0x18134: 0xa0107c02, 0x18135: 0xa0107d02, 0x18136: 0xa0106102, 0x18137: 0xa0106102, + 0x18138: 0xa0105402, 0x18139: 0xadc07e02, 0x1813a: 0xadc06002, 0x1813b: 0xadc06002, + 0x1813c: 0xadc06002, 0x1813d: 0xae605f02, 0x1813e: 0xae605f02, 0x1813f: 0xae605f02, + // Block 0x605, offset 0x18140 + 0x18140: 0xae603502, 0x18141: 0xae603802, 0x18142: 0xae604502, 0x18143: 0xae602202, + 0x18144: 0xe000b07d, 0x18145: 0xaf007f02, 0x18146: 0xae605f02, 0x18147: 0xadc06002, + 0x18148: 0xadc06002, 0x18149: 0xadc06002, 0x1814a: 0xae605f02, 0x1814b: 0xae605f02, + 0x1814c: 0xae605f02, 0x1814d: 0xadc06002, 0x1814e: 0xadc06002, 0x1814f: 0xa0000000, + 0x18150: 0xae605f02, 0x18151: 0xae605f02, 0x18152: 0xae605f02, 0x18153: 0xadc06002, + 0x18154: 0xadc06002, 0x18155: 0xadc06002, 0x18156: 0xadc06002, 0x18157: 0xae605f02, + 0x18158: 0xae808002, 0x18159: 0xadc06002, 0x1815a: 0xadc06002, 0x1815b: 0xae605f02, + 0x1815c: 0xae906002, 0x1815d: 0xaea05f02, 0x1815e: 0xaea05f02, 0x1815f: 0xae906002, + 0x18160: 0xaea08102, 0x18161: 0xaea08202, 0x18162: 0xae906002, 0x18163: 0x84e615ef, + 0x18164: 0x84e6164c, 0x18165: 0x84e616cd, 0x18166: 0x84e61771, 0x18167: 0x84e61836, + 0x18168: 0x84e6161d, 0x18169: 0x84e61631, 0x1816a: 0x84e616b4, 0x1816b: 0x84e61741, + 0x1816c: 0x84e617bd, 0x1816d: 0x84e61816, 0x1816e: 0x84e6185f, 0x1816f: 0x84e6187b, + 0x18170: 0x00326688, 0x18171: 0x40326620, 0x18172: 0x0032a688, 0x18173: 0x4032a620, + 0x18174: 0x40064020, 0x18175: 0x40064220, 0x18176: 0x00326088, 0x18177: 0x40326020, + 0x1817a: 0x00326c84, 0x1817b: 0x40329220, + 0x1817c: 0x40329020, 0x1817d: 0x40329420, 0x1817e: 0x40026220, + // Block 0x606, offset 0x18180 + 0x18184: 0x40062020, 0x18185: 0xe000b080, 0x18186: 0xe000b2f4, 0x18187: 0x40030620, + 0x18188: 0xe000b30e, 0x18189: 0xe000b338, 0x1818a: 0xe000b352, + 0x1818c: 0xe000b36c, 0x1818e: 0xe000b37e, 0x1818f: 0xe000b3ac, + 0x18190: 0xe000b355, 0x18191: 0x00325288, 0x18192: 0x00325488, 0x18193: 0x00325688, + 0x18194: 0x00325a88, 0x18195: 0x00325c88, 0x18196: 0x00326488, 0x18197: 0x00326888, + 0x18198: 0x00326a88, 0x18199: 0x00326c88, 0x1819a: 0x00327088, 0x1819b: 0x00327288, + 0x1819c: 0x00327688, 0x1819d: 0x00327888, 0x1819e: 0x00327a88, 0x1819f: 0x00327c88, + 0x181a0: 0x00327e88, 0x181a1: 0x00328888, 0x181a3: 0x00328e88, + 0x181a4: 0x00329688, 0x181a5: 0x00329888, 0x181a6: 0x00329a88, 0x181a7: 0x00329c88, + 0x181a8: 0x00329e88, 0x181a9: 0x0032a288, 0x181aa: 0xe000134f, 0x181ab: 0xe00013f2, + 0x181ac: 0xe000b2f1, 0x181ad: 0xe000b30b, 0x181ae: 0xe000b335, 0x181af: 0xe000b34f, + 0x181b0: 0xe000b381, 0x181b1: 0x40325220, 0x181b2: 0x40325420, 0x181b3: 0x40325620, + 0x181b4: 0x40325a20, 0x181b5: 0x40325c20, 0x181b6: 0x40326420, 0x181b7: 0x40326820, + 0x181b8: 0x40326a20, 0x181b9: 0x40326c20, 0x181ba: 0x40327020, 0x181bb: 0x40327220, + 0x181bc: 0x40327620, 0x181bd: 0x40327820, 0x181be: 0x40327a20, 0x181bf: 0x40327c20, + // Block 0x607, offset 0x181c0 + 0x181c0: 0x40327e20, 0x181c1: 0x40328820, 0x181c2: 0x00328e99, 0x181c3: 0x40328e20, + 0x181c4: 0x40329620, 0x181c5: 0x40329820, 0x181c6: 0x40329a20, 0x181c7: 0x40329c20, + 0x181c8: 0x40329e20, 0x181c9: 0x4032a220, 0x181ca: 0xe000134c, 0x181cb: 0xe00013ef, + 0x181cc: 0xe000b369, 0x181cd: 0xe000b37b, 0x181ce: 0xe000b3a9, 0x181cf: 0xe0001368, + 0x181d0: 0x00325484, 0x181d1: 0x00326a84, 0x181d2: 0x0032988a, 0x181d3: 0xf000020a, + 0x181d4: 0xf000020a, 0x181d5: 0x00329a84, 0x181d6: 0x00327e84, 0x181d7: 0xe0001364, + 0x181d8: 0x00328688, 0x181d9: 0x40328620, 0x181da: 0x00326288, 0x181db: 0x40326220, + 0x181dc: 0x00325e88, 0x181dd: 0x40325e20, 0x181de: 0x00328488, 0x181df: 0x40328420, + 0x181e0: 0x0032a488, 0x181e1: 0x4032a420, 0x181e2: 0x0032e888, 0x181e3: 0x4032e820, + 0x181e4: 0x0032f288, 0x181e5: 0x4032f220, 0x181e6: 0x0032f488, 0x181e7: 0x4032f420, + 0x181e8: 0x0032fa88, 0x181e9: 0x4032fa20, 0x181ea: 0x00330888, 0x181eb: 0x40330820, + 0x181ec: 0x00330e88, 0x181ed: 0x40330e20, 0x181ee: 0x00331688, 0x181ef: 0x40331620, + 0x181f0: 0x00327084, 0x181f1: 0x00328884, 0x181f2: 0x00328e84, 0x181f3: 0x40326e20, + 0x181f4: 0x00326a8a, 0x181f5: 0x00325c84, 0x181f6: 0x40092e20, 0x181f7: 0x0032a888, + 0x181f8: 0x4032a820, 0x181f9: 0x00328e8a, 0x181fa: 0x00328288, 0x181fb: 0x40328220, + 0x181fc: 0x40328c20, 0x181fd: 0x00329288, 0x181fe: 0x00329088, 0x181ff: 0x00329488, + // Block 0x608, offset 0x18200 + 0x18200: 0xe00009b1, 0x18201: 0xe00009ae, 0x18202: 0xe0000a22, 0x18203: 0xe0000a1f, + 0x18204: 0xe000b0e6, 0x18205: 0xe000b0e3, 0x18206: 0xe0000a2e, 0x18207: 0xe0000a2b, + 0x18208: 0xe000b0f3, 0x18209: 0xe000b0ef, 0x1820a: 0xe0000a8c, 0x1820b: 0xe0000a89, + 0x1820c: 0xe000b0fa, 0x1820d: 0xe000b0f7, 0x1820e: 0xe0000aa4, 0x1820f: 0xe0000aa1, + 0x18210: 0xe0000a92, 0x18211: 0xe0000a8f, 0x18212: 0xe0000a9e, 0x18213: 0xe0000a9b, + 0x18214: 0xe0000b55, 0x18215: 0xe0000b51, 0x18216: 0xe000b119, 0x18217: 0xe000b115, + 0x18218: 0xe0000b7c, 0x18219: 0xe0000b79, 0x1821a: 0xe0000b82, 0x1821b: 0xe0000b7f, + 0x1821c: 0xe0000b39, 0x1821d: 0xe0000b35, 0x1821e: 0xe0000b8c, 0x1821f: 0xe0000b89, + 0x18220: 0xe0000bd0, 0x18221: 0xe0000bcd, 0x18222: 0xe0000c00, 0x18223: 0xe0000bfd, + 0x18224: 0xe000b13e, 0x18225: 0xe000b13b, 0x18226: 0xe0000bfa, 0x18227: 0xe0000bf7, + 0x18228: 0xe0000c06, 0x18229: 0xe0000c03, 0x1822a: 0xe0000c12, 0x1822b: 0xe0000c0f, + 0x1822c: 0xe0000c7e, 0x1822d: 0xe0000c7b, 0x1822e: 0xe000b15d, 0x1822f: 0xe000b159, + 0x18230: 0xe000b164, 0x18231: 0xe000b161, 0x18232: 0xe000b16a, 0x18233: 0xe000b167, + 0x18234: 0xe0000cb1, 0x18235: 0xe0000cae, 0x18236: 0xe000b176, 0x18237: 0xe000b173, + 0x18238: 0xe000b17d, 0x18239: 0xe000b179, 0x1823a: 0xe0000cf2, 0x1823b: 0xe0000cef, + 0x1823c: 0xe0000cec, 0x1823d: 0xe0000ce9, 0x1823e: 0xe000b184, 0x1823f: 0xe000b181, + // Block 0x609, offset 0x18240 + 0x18240: 0xe0000d24, 0x18241: 0xe0000d21, 0x18242: 0xe000b18a, 0x18243: 0xe000b187, + 0x18244: 0xe0000d69, 0x18245: 0xe0000d66, 0x18246: 0xe000b19c, 0x18247: 0xe000b199, + 0x18248: 0xe0000d87, 0x18249: 0xe0000d84, 0x1824a: 0xe0000d81, 0x1824b: 0xe0000d7e, + 0x1824c: 0xe000b1af, 0x1824d: 0xe000b1ab, 0x1824e: 0xe000b1b7, 0x1824f: 0xe000b1b3, + 0x18250: 0xe0000e3d, 0x18251: 0xe0000e39, 0x18252: 0xe000b1db, 0x18253: 0xe000b1d7, + 0x18254: 0xe000b218, 0x18255: 0xe000b215, 0x18256: 0xe0000ead, 0x18257: 0xe0000eaa, + 0x18258: 0xe0000ed6, 0x18259: 0xe0000ed3, 0x1825a: 0xe000b224, 0x1825b: 0xe000b221, + 0x1825c: 0xe000b22b, 0x1825d: 0xe000b227, 0x1825e: 0xe0000f02, 0x1825f: 0xe0000eff, + 0x18260: 0xe0000f41, 0x18261: 0xe0000f3e, 0x18262: 0xe000b240, 0x18263: 0xe000b23d, + 0x18264: 0xe000b239, 0x18265: 0xe000b235, 0x18266: 0xe0000f3a, 0x18267: 0xe0000f36, + 0x18268: 0xe000b247, 0x18269: 0xe000b243, 0x1826a: 0xe0000f93, 0x1826b: 0xe0000f90, + 0x1826c: 0xe000b24e, 0x1826d: 0xe000b24b, 0x1826e: 0xe0000fb1, 0x1826f: 0xe0000fae, + 0x18270: 0xe0000fab, 0x18271: 0xe0000fa8, 0x18272: 0xe0001093, 0x18273: 0xe0001090, + 0x18274: 0xe000109f, 0x18275: 0xe000109c, 0x18276: 0xe0001099, 0x18277: 0xe0001096, + 0x18278: 0xe000b261, 0x18279: 0xe000b25d, 0x1827a: 0xe0001046, 0x1827b: 0xe0001042, + 0x1827c: 0xe000b294, 0x1827d: 0xe000b291, 0x1827e: 0xe000b29a, 0x1827f: 0xe000b297, + // Block 0x60a, offset 0x18280 + 0x18280: 0xe00010d2, 0x18281: 0xe00010cf, 0x18282: 0xe000b2a0, 0x18283: 0xe000b29d, + 0x18284: 0xe00010e1, 0x18285: 0xe00010de, 0x18286: 0xe00010e7, 0x18287: 0xe00010e4, + 0x18288: 0xe000b2a6, 0x18289: 0xe000b2a3, 0x1828a: 0xe00010fc, 0x1828b: 0xe00010f9, + 0x1828c: 0xe00010f6, 0x1828d: 0xe00010f3, 0x1828e: 0xe0001123, 0x1828f: 0xe0001120, + 0x18290: 0xe0001141, 0x18291: 0xe000113e, 0x18292: 0xe000b2ca, 0x18293: 0xe000b2c7, + 0x18294: 0xe0001159, 0x18295: 0xe0001156, 0x18296: 0xe0000c15, 0x18297: 0xe0000f8d, + 0x18298: 0xe00010db, 0x18299: 0xe0001111, 0x1829a: 0xf0000404, 0x1829b: 0xe0000f70, + 0x1829c: 0x40300420, 0x1829d: 0x40300620, 0x1829e: 0xe0000f7f, 0x1829f: 0x402c9620, + 0x182a0: 0xe000b09e, 0x182a1: 0xe000b09b, 0x182a2: 0xe000b08c, 0x182a3: 0xe000b089, + 0x182a4: 0xe000b0da, 0x182a5: 0xe000b0d7, 0x182a6: 0xe000393a, 0x182a7: 0xe0003937, + 0x182a8: 0xe000b0ce, 0x182a9: 0xe000b0cb, 0x182aa: 0xe000b0d4, 0x182ab: 0xe000b0d1, + 0x182ac: 0xe000b0e0, 0x182ad: 0xe000b0dd, 0x182ae: 0xe000b0c2, 0x182af: 0xe000b0bf, + 0x182b0: 0xe0003894, 0x182b1: 0xe0003891, 0x182b2: 0xe000b0b6, 0x182b3: 0xe000b0b3, + 0x182b4: 0xe000b0bc, 0x182b5: 0xe000b0b9, 0x182b6: 0xe000b0c8, 0x182b7: 0xe000b0c5, + 0x182b8: 0xe000b112, 0x182b9: 0xe000b10f, 0x182ba: 0xe000b100, 0x182bb: 0xe000b0fd, + 0x182bc: 0xe000b106, 0x182bd: 0xe000b103, 0x182be: 0xe000b12c, 0x182bf: 0xe000b129, + // Block 0x60b, offset 0x182c0 + 0x182c0: 0xe000ad47, 0x182c1: 0xe000ad44, 0x182c2: 0xe000b120, 0x182c3: 0xe000b11d, + 0x182c4: 0xe000b126, 0x182c5: 0xe000b123, 0x182c6: 0xe000b132, 0x182c7: 0xe000b12f, + 0x182c8: 0xe000b144, 0x182c9: 0xe000b141, 0x182ca: 0xe000b156, 0x182cb: 0xe000b153, + 0x182cc: 0xe000b1cc, 0x182cd: 0xe000b1c9, 0x182ce: 0xe000b1a2, 0x182cf: 0xe000b19f, + 0x182d0: 0xe000b1ee, 0x182d1: 0xe000b1eb, 0x182d2: 0xe000ad65, 0x182d3: 0xe000ad62, + 0x182d4: 0xe000b1e2, 0x182d5: 0xe000b1df, 0x182d6: 0xe000b1e8, 0x182d7: 0xe000b1e5, + 0x182d8: 0xe000b1f4, 0x182d9: 0xe000b1f1, 0x182da: 0xe000b20c, 0x182db: 0xe000b209, + 0x182dc: 0xe000b1fa, 0x182dd: 0xe000b1f7, 0x182de: 0xe000b200, 0x182df: 0xe000b1fd, + 0x182e0: 0xe000b206, 0x182e1: 0xe000b203, 0x182e2: 0xe000b212, 0x182e3: 0xe000b20f, + 0x182e4: 0xe000b26e, 0x182e5: 0xe000b26b, 0x182e6: 0xe000b254, 0x182e7: 0xe000b251, + 0x182e8: 0xe000b288, 0x182e9: 0xe000b285, 0x182ea: 0xe0002958, 0x182eb: 0xe0002955, + 0x182ec: 0xe000b27c, 0x182ed: 0xe000b279, 0x182ee: 0xe000b282, 0x182ef: 0xe000b27f, + 0x182f0: 0xe000b28e, 0x182f1: 0xe000b28b, 0x182f2: 0xe0001108, 0x182f3: 0xe0001105, + 0x182f4: 0xe000b2be, 0x182f5: 0xe000b2bb, 0x182f6: 0xe000b2ac, 0x182f7: 0xe000b2a9, + 0x182f8: 0xe000b2b2, 0x182f9: 0xe000b2af, 0x182fa: 0xe0000d0a, 0x182fb: 0xe0000d07, + 0x182fc: 0x0030d888, 0x182fd: 0x4030d820, 0x182fe: 0x00312088, 0x182ff: 0x40312020, + // Block 0x60c, offset 0x18300 + 0x18300: 0xe0001165, 0x18301: 0xe00011a9, 0x18302: 0xe000117d, 0x18303: 0xe00011c1, + 0x18304: 0xe000b2cd, 0x18305: 0xe000b2df, 0x18306: 0xe000118f, 0x18307: 0xe00011d3, + 0x18308: 0xe0001168, 0x18309: 0xe00011ac, 0x1830a: 0xe0001181, 0x1830b: 0xe00011c5, + 0x1830c: 0xe000b2d1, 0x1830d: 0xe000b2e3, 0x1830e: 0xe0001193, 0x1830f: 0xe00011d7, + 0x18310: 0xe000121a, 0x18311: 0xe0001230, 0x18312: 0xe0001228, 0x18313: 0xe000123e, + 0x18314: 0xe000b2fb, 0x18315: 0xe000b303, + 0x18318: 0xe000121d, 0x18319: 0xe0001233, 0x1831a: 0xe000122c, 0x1831b: 0xe0001242, + 0x1831c: 0xe000b2ff, 0x1831d: 0xe000b307, + 0x18320: 0xe0001252, 0x18321: 0xe0001296, 0x18322: 0xe000126a, 0x18323: 0xe00012ae, + 0x18324: 0xe000b311, 0x18325: 0xe000b323, 0x18326: 0xe000127c, 0x18327: 0xe00012c0, + 0x18328: 0xe0001255, 0x18329: 0xe0001299, 0x1832a: 0xe000126e, 0x1832b: 0xe00012b2, + 0x1832c: 0xe000b315, 0x1832d: 0xe000b327, 0x1832e: 0xe0001280, 0x1832f: 0xe00012c4, + 0x18330: 0xe00012fb, 0x18331: 0xe0001319, 0x18332: 0xe0001309, 0x18333: 0xe0001327, + 0x18334: 0xe000b33f, 0x18335: 0xe000b347, 0x18336: 0xe0001311, 0x18337: 0xe000132f, + 0x18338: 0xe00012fe, 0x18339: 0xe000131c, 0x1833a: 0xe000130d, 0x1833b: 0xe000132b, + 0x1833c: 0xe000b343, 0x1833d: 0xe000b34b, 0x1833e: 0xe0001315, 0x1833f: 0xe0001333, + // Block 0x60d, offset 0x18340 + 0x18340: 0xe000136c, 0x18341: 0xe0001382, 0x18342: 0xe000137a, 0x18343: 0xe0001390, + 0x18344: 0xe000b359, 0x18345: 0xe000b361, + 0x18348: 0xe000136f, 0x18349: 0xe0001385, 0x1834a: 0xe000137e, 0x1834b: 0xe0001394, + 0x1834c: 0xe000b35d, 0x1834d: 0xe000b365, + 0x18350: 0xe00013ad, 0x18351: 0xe00013bc, 0x18352: 0xe00013b4, 0x18353: 0xe00013ca, + 0x18354: 0xe000b36f, 0x18355: 0xe000b373, 0x18356: 0xe00013b8, 0x18357: 0xe00013d2, + 0x18359: 0xe00013bf, 0x1835b: 0xe00013ce, + 0x1835d: 0xe000b377, 0x1835f: 0xe00013d6, + 0x18360: 0xe0001407, 0x18361: 0xe000144b, 0x18362: 0xe000141f, 0x18363: 0xe0001463, + 0x18364: 0xe000b385, 0x18365: 0xe000b397, 0x18366: 0xe0001431, 0x18367: 0xe0001475, + 0x18368: 0xe000140a, 0x18369: 0xe000144e, 0x1836a: 0xe0001423, 0x1836b: 0xe0001467, + 0x1836c: 0xe000b389, 0x1836d: 0xe000b39b, 0x1836e: 0xe0001435, 0x1836f: 0xe0001479, + 0x18370: 0xe00011f7, 0x18371: 0xe000b2f1, 0x18372: 0xe000124c, 0x18373: 0xe000b30b, + 0x18374: 0xe00012e4, 0x18375: 0xe000b335, 0x18376: 0xe000133d, 0x18377: 0xe000b34f, + 0x18378: 0xe000139e, 0x18379: 0xe000b369, 0x1837a: 0xe00013e0, 0x1837b: 0xe000b37b, + 0x1837c: 0xe0001499, 0x1837d: 0xe000b3a9, + // Block 0x60e, offset 0x18380 + 0x18380: 0xe00011a1, 0x18381: 0xe00011e5, 0x18382: 0xe0001185, 0x18383: 0xe00011c9, + 0x18384: 0xe000b2d5, 0x18385: 0xe000b2e7, 0x18386: 0xe0001197, 0x18387: 0xe00011db, + 0x18388: 0xe00011a5, 0x18389: 0xe00011e9, 0x1838a: 0xe000118a, 0x1838b: 0xe00011ce, + 0x1838c: 0xe000b2da, 0x1838d: 0xe000b2ec, 0x1838e: 0xe000119c, 0x1838f: 0xe00011e0, + 0x18390: 0xe000128e, 0x18391: 0xe00012d2, 0x18392: 0xe0001272, 0x18393: 0xe00012b6, + 0x18394: 0xe000b319, 0x18395: 0xe000b32b, 0x18396: 0xe0001284, 0x18397: 0xe00012c8, + 0x18398: 0xe0001292, 0x18399: 0xe00012d6, 0x1839a: 0xe0001277, 0x1839b: 0xe00012bb, + 0x1839c: 0xe000b31e, 0x1839d: 0xe000b330, 0x1839e: 0xe0001289, 0x1839f: 0xe00012cd, + 0x183a0: 0xe0001443, 0x183a1: 0xe0001487, 0x183a2: 0xe0001427, 0x183a3: 0xe000146b, + 0x183a4: 0xe000b38d, 0x183a5: 0xe000b39f, 0x183a6: 0xe0001439, 0x183a7: 0xe000147d, + 0x183a8: 0xe0001447, 0x183a9: 0xe000148b, 0x183aa: 0xe000142c, 0x183ab: 0xe0001470, + 0x183ac: 0xe000b392, 0x183ad: 0xe000b3a4, 0x183ae: 0xe000143e, 0x183af: 0xe0001482, + 0x183b0: 0xe0001201, 0x183b1: 0xe000120e, 0x183b2: 0xe00011fd, 0x183b3: 0xe0001214, + 0x183b4: 0xe000b2f7, 0x183b6: 0xe0001207, 0x183b7: 0xe000120a, + 0x183b8: 0xe0001204, 0x183b9: 0xe0001211, 0x183ba: 0xe00011fa, 0x183bb: 0xe000b2f4, + 0x183bc: 0xe0001217, 0x183bd: 0x40063620, 0x183be: 0x40326c20, 0x183bf: 0x40063620, + // Block 0x60f, offset 0x183c0 + 0x183c0: 0x40063a20, 0x183c1: 0xe00000b1, 0x183c2: 0xe00012ea, 0x183c3: 0xe00012f5, + 0x183c4: 0xe000b33b, 0x183c6: 0xe00012ee, 0x183c7: 0xe00012f1, + 0x183c8: 0xe000124f, 0x183c9: 0xe000b30e, 0x183ca: 0xe00012e7, 0x183cb: 0xe000b338, + 0x183cc: 0xe00012f8, 0x183cd: 0xe00000b7, 0x183ce: 0xe000b083, 0x183cf: 0xe00000ba, + 0x183d0: 0xe0001343, 0x183d1: 0xe000135e, 0x183d2: 0xe0001356, 0x183d3: 0xe000b355, + 0x183d6: 0xe0001349, 0x183d7: 0xe000135a, + 0x183d8: 0xe0001346, 0x183d9: 0xe0001361, 0x183da: 0xe0001340, 0x183db: 0xe000b352, + 0x183dd: 0xe00000c0, 0x183de: 0xe000b086, 0x183df: 0xe00000c3, + 0x183e0: 0xe00013e6, 0x183e1: 0xe0001401, 0x183e2: 0xe00013f9, 0x183e3: 0xe000b381, + 0x183e4: 0xe00013a4, 0x183e5: 0xe00013a7, 0x183e6: 0xe00013ec, 0x183e7: 0xe00013fd, + 0x183e8: 0xe00013e9, 0x183e9: 0xe0001404, 0x183ea: 0xe00013e3, 0x183eb: 0xe000b37e, + 0x183ec: 0xe00013aa, 0x183ed: 0xe00000ae, 0x183ee: 0xe000b080, 0x183ef: 0x40061e20, + 0x183f2: 0xe000149f, 0x183f3: 0xe00014aa, + 0x183f4: 0xe000b3af, 0x183f6: 0xe00014a3, 0x183f7: 0xe00014a6, + 0x183f8: 0xe00013a1, 0x183f9: 0xe000b36c, 0x183fa: 0xe000149c, 0x183fb: 0xe000b3ac, + 0x183fc: 0xe00014ad, 0x183fd: 0x40062020, 0x183fe: 0x40063820, + // Block 0x610, offset 0x18400 + 0x18400: 0xa0000000, 0x18401: 0xa0000000, 0x18402: 0xa0000000, 0x18403: 0xa0000000, + 0x18404: 0xa0000000, 0x18405: 0xa0000000, 0x18406: 0xa0000000, 0x18407: 0xa0000000, + 0x18408: 0xa0000000, 0x18409: 0x40020020, 0x1840a: 0x40020220, 0x1840b: 0x40020420, + 0x1840c: 0x40020620, 0x1840d: 0x40020820, 0x1840e: 0xa0000000, 0x1840f: 0xa0000000, + 0x18410: 0xa0000000, 0x18411: 0xa0000000, 0x18412: 0xa0000000, 0x18413: 0xa0000000, + 0x18414: 0xa0000000, 0x18415: 0xa0000000, 0x18416: 0xa0000000, 0x18417: 0xa0000000, + 0x18418: 0xa0000000, 0x18419: 0xa0000000, 0x1841a: 0xa0000000, 0x1841b: 0xa0000000, + 0x1841c: 0xa0000000, 0x1841d: 0xa0000000, 0x1841e: 0xa0000000, 0x1841f: 0xa0000000, + 0x18420: 0x40021220, 0x18421: 0x4002ba20, 0x18422: 0x4003e020, 0x18423: 0x4004ea20, + 0x18424: 0x4027de20, 0x18425: 0x4004ec20, 0x18426: 0x4004e620, 0x18427: 0x4003d220, + 0x18428: 0x4003f420, 0x18429: 0x4003f620, 0x1842a: 0x4004d820, 0x1842b: 0x40093820, + 0x1842c: 0x40024020, 0x1842d: 0x40021a20, 0x1842e: 0x4002e420, 0x1842f: 0x4004e220, + 0x18430: 0x4029cc20, 0x18431: 0x4029ce20, 0x18432: 0x4029d020, 0x18433: 0x4029d220, + 0x18434: 0x4029d420, 0x18435: 0x4029d620, 0x18436: 0x4029d820, 0x18437: 0x4029da20, + 0x18438: 0x4029dc20, 0x18439: 0x4029de20, 0x1843a: 0x40026c20, 0x1843b: 0x40026220, + 0x1843c: 0x40094020, 0x1843d: 0x40094220, 0x1843e: 0x40094420, 0x1843f: 0x4002c420, + // Block 0x611, offset 0x18440 + 0x18440: 0x4004d620, 0x18441: 0x002bde88, 0x18442: 0x002c0a88, 0x18443: 0x002c3a88, + 0x18444: 0x002c6288, 0x18445: 0x002c9888, 0x18446: 0x002d0888, 0x18447: 0x002d2288, + 0x18448: 0x002d6888, 0x18449: 0x002d9a88, 0x1844a: 0x002dcc88, 0x1844b: 0x002dfe88, + 0x1844c: 0xc0030002, 0x1844d: 0x002e8288, 0x1844e: 0x002e9e88, 0x1844f: 0x002ee288, + 0x18450: 0x002f2c88, 0x18451: 0x002f5688, 0x18452: 0x002f7a88, 0x18453: 0x002fe688, + 0x18454: 0x00302c88, 0x18455: 0x00306c88, 0x18456: 0x0030be88, 0x18457: 0x0030e288, + 0x18458: 0x0030f688, 0x18459: 0x00310088, 0x1845a: 0x00312a88, 0x1845b: 0x4003f820, + 0x1845c: 0x4004e420, 0x1845d: 0x4003fa20, 0x1845e: 0x40062420, 0x1845f: 0x40021620, + 0x18460: 0x40061e20, 0x18461: 0xcfa39ac2, 0x18462: 0x402c0a20, 0x18463: 0xcfa809b1, + 0x18464: 0x402c6220, 0x18465: 0xcfaa9b41, 0x18466: 0x402d0820, 0x18467: 0x402d2220, + 0x18468: 0x402d6820, 0x18469: 0xcfac9b51, 0x1846a: 0x402dcc20, 0x1846b: 0x402dfe20, + 0x1846c: 0xc0000002, 0x1846d: 0x402e8220, 0x1846e: 0x402e9e20, 0x1846f: 0xcfae9b62, + 0x18470: 0x402f2c20, 0x18471: 0x402f5620, 0x18472: 0x402f7a20, 0x18473: 0xcfb39be1, + 0x18474: 0x40302c20, 0x18475: 0xcfb59c02, 0x18476: 0x4030be20, 0x18477: 0x4030e220, + 0x18478: 0x4030f620, 0x18479: 0x40310020, 0x1847a: 0x40312a20, 0x1847b: 0x4003fc20, + 0x1847c: 0x40094820, 0x1847d: 0x4003fe20, 0x1847e: 0x40094c20, 0x1847f: 0xa0000000, + // Block 0x612, offset 0x18480 + 0x18480: 0xe00008f5, 0x18481: 0xe00008ef, 0x18482: 0xe0000921, 0x18483: 0xe0000969, + 0x18484: 0xe000095b, 0x18485: 0xe000094d, 0x18486: 0xe00009dd, 0x18487: 0xe0000a53, + 0x18488: 0xe0000ae8, 0x18489: 0xe0000ae2, 0x1848a: 0xe0000af4, 0x1848b: 0xe0000b20, + 0x1848c: 0xe0000c2b, 0x1848d: 0xe0000c25, 0x1848e: 0xe0000c37, 0x1848f: 0xe0000c43, + 0x18490: 0xe0000ab3, 0x18491: 0xe0000d63, 0x18492: 0xe0000d9a, 0x18493: 0xe0000d94, + 0x18494: 0xe0000da6, 0x18495: 0xe0000de6, 0x18496: 0xe0000dd2, 0x18497: 0x40093e20, + 0x18498: 0xe0000e12, 0x18499: 0xe0000fe1, 0x1849a: 0xe0000fdb, 0x1849b: 0xe0000fed, + 0x1849c: 0xe0000fff, 0x1849d: 0xe0001102, 0x1849e: 0x00318888, 0x1849f: 0xe0000f7b, + 0x184a0: 0xe00008f2, 0x184a1: 0xe00008ec, 0x184a2: 0xe000091e, 0x184a3: 0xe0000966, + 0x184a4: 0xcfa69b21, 0x184a5: 0xe000094a, 0x184a6: 0xe00009d5, 0x184a7: 0xe0000a4d, + 0x184a8: 0xe0000ae5, 0x184a9: 0xe0000adf, 0x184aa: 0xe0000af1, 0x184ab: 0xe0000b1d, + 0x184ac: 0xe0000c28, 0x184ad: 0xe0000c22, 0x184ae: 0xe0000c34, 0x184af: 0xe0000c40, + 0x184b0: 0xe0000aad, 0x184b1: 0xe0000d60, 0x184b2: 0xe0000d97, 0x184b3: 0xe0000d91, + 0x184b4: 0xe0000da3, 0x184b5: 0xe0000de3, 0x184b6: 0xcfb19bc1, 0x184b7: 0x40093c20, + 0x184b8: 0xe0000e0f, 0x184b9: 0xe0000fde, 0x184ba: 0xe0000fd8, 0x184bb: 0xe0000fea, + 0x184bc: 0xcfb89c61, 0x184bd: 0xe00010ff, 0x184be: 0x40318820, 0x184bf: 0xe0001114, + // Block 0x613, offset 0x184c0 + 0x184c0: 0xa0000000, 0x184c1: 0xa0000000, 0x184c2: 0xa0000000, 0x184c3: 0xa0000000, + 0x184c4: 0xa0000000, 0x184c5: 0xa0000000, 0x184c6: 0xa0000000, 0x184c7: 0xa0000000, + 0x184c8: 0xa0000000, 0x184c9: 0x40020020, 0x184ca: 0x40020220, 0x184cb: 0x40020420, + 0x184cc: 0x40020620, 0x184cd: 0x40020820, 0x184ce: 0xa0000000, 0x184cf: 0xa0000000, + 0x184d0: 0xa0000000, 0x184d1: 0xa0000000, 0x184d2: 0xa0000000, 0x184d3: 0xa0000000, + 0x184d4: 0xa0000000, 0x184d5: 0xa0000000, 0x184d6: 0xa0000000, 0x184d7: 0xa0000000, + 0x184d8: 0xa0000000, 0x184d9: 0xa0000000, 0x184da: 0xa0000000, 0x184db: 0xa0000000, + 0x184dc: 0xa0000000, 0x184dd: 0xa0000000, 0x184de: 0xa0000000, 0x184df: 0xa0000000, + 0x184e0: 0x40021220, 0x184e1: 0x4002ba20, 0x184e2: 0x4003e020, 0x184e3: 0x4004ea20, + 0x184e4: 0x4027de20, 0x184e5: 0x4004ec20, 0x184e6: 0x4004e620, 0x184e7: 0x4003d220, + 0x184e8: 0x4003f420, 0x184e9: 0x4003f620, 0x184ea: 0x4004d820, 0x184eb: 0x40093820, + 0x184ec: 0x40024020, 0x184ed: 0x40021a20, 0x184ee: 0x4002e420, 0x184ef: 0x4004e220, + 0x184f0: 0x4029cc20, 0x184f1: 0x4029ce20, 0x184f2: 0x4029d020, 0x184f3: 0x4029d220, + 0x184f4: 0x4029d420, 0x184f5: 0x4029d620, 0x184f6: 0x4029d820, 0x184f7: 0x4029da20, + 0x184f8: 0x4029dc20, 0x184f9: 0x4029de20, 0x184fa: 0x40026c20, 0x184fb: 0x40026220, + 0x184fc: 0x40094020, 0x184fd: 0x40094220, 0x184fe: 0x40094420, 0x184ff: 0x4002c420, + // Block 0x614, offset 0x18500 + 0x18500: 0x4004d620, 0x18501: 0x002bde88, 0x18502: 0x002c0a88, 0x18503: 0x002c3a88, + 0x18504: 0x002c6288, 0x18505: 0xce6d3081, 0x18506: 0x002d0888, 0x18507: 0xc52b2692, + 0x18508: 0x002d6888, 0x18509: 0x002d9a88, 0x1850a: 0x002dcc88, 0x1850b: 0x002dfe88, + 0x1850c: 0xc0030002, 0x1850d: 0x002e8288, 0x1850e: 0x002e9e88, 0x1850f: 0xc33f3081, + 0x18510: 0x002f2c88, 0x18511: 0x002f5688, 0x18512: 0x002f7a88, 0x18513: 0xc3433081, + 0x18514: 0x00302c88, 0x18515: 0x00306c88, 0x18516: 0x0030be88, 0x18517: 0x0030e288, + 0x18518: 0x0030f688, 0x18519: 0x00310088, 0x1851a: 0x00312a88, 0x1851b: 0x4003f820, + 0x1851c: 0x4004e420, 0x1851d: 0x4003fa20, 0x1851e: 0x40062420, 0x1851f: 0x40021620, + 0x18520: 0x40061e20, 0x18521: 0x402bde20, 0x18522: 0x402c0a20, 0x18523: 0x402c3a20, + 0x18524: 0x402c6220, 0x18525: 0xce6b3081, 0x18526: 0x402d0820, 0x18527: 0xc3372681, + 0x18528: 0x402d6820, 0x18529: 0x402d9a20, 0x1852a: 0x402dcc20, 0x1852b: 0x402dfe20, + 0x1852c: 0xc0000002, 0x1852d: 0x402e8220, 0x1852e: 0x402e9e20, 0x1852f: 0xc33d3081, + 0x18530: 0x402f2c20, 0x18531: 0x402f5620, 0x18532: 0x402f7a20, 0x18533: 0xc3413081, + 0x18534: 0x40302c20, 0x18535: 0x40306c20, 0x18536: 0x4030be20, 0x18537: 0x4030e220, + 0x18538: 0x4030f620, 0x18539: 0x40310020, 0x1853a: 0x40312a20, 0x1853b: 0x4003fc20, + 0x1853c: 0x40094820, 0x1853d: 0x4003fe20, 0x1853e: 0x40094c20, 0x1853f: 0xa0000000, + // Block 0x615, offset 0x18540 + 0x18540: 0xe0000d24, 0x18541: 0xe0000d21, 0x18542: 0xe0000d2a, 0x18543: 0xe0000d27, + 0x18544: 0xe0000d69, 0x18545: 0xe0000d66, 0x18546: 0xe0000d7b, 0x18547: 0xe0000d78, + 0x18548: 0xe0000d87, 0x18549: 0xe0000d84, 0x1854a: 0xe0000d81, 0x1854b: 0xe0000d7e, + 0x1854c: 0xe0000ded, 0x1854d: 0xe0000de9, 0x1854e: 0xe0000df5, 0x1854f: 0xe0000df1, + 0x18550: 0xe0000e3d, 0x18551: 0xe0000e39, 0x18552: 0xe0000e35, 0x18553: 0xe0000e31, + 0x18554: 0xe0000ea7, 0x18555: 0xe0000ea4, 0x18556: 0xe0000ead, 0x18557: 0xe0000eaa, + 0x18558: 0xe0000ed6, 0x18559: 0xe0000ed3, 0x1855a: 0xe0000ef4, 0x1855b: 0xe0000ef1, + 0x1855c: 0xe0000efb, 0x1855d: 0xe0000ef7, 0x1855e: 0xe0000f02, 0x1855f: 0xe0000eff, + 0x18560: 0xe0000f41, 0x18561: 0xe0000f3e, 0x18562: 0x002fe883, 0x18563: 0x402fe820, + 0x18564: 0xe0000f26, 0x18565: 0xe0000f22, 0x18566: 0xe0000f3a, 0x18567: 0xe0000f36, + 0x18568: 0xe000296a, 0x18569: 0xe0002967, 0x1856a: 0xe0000f93, 0x1856b: 0xe0000f90, + 0x1856c: 0xe0000f9f, 0x1856d: 0xe0000f9c, 0x1856e: 0xe0000fb1, 0x1856f: 0xe0000fae, + 0x18570: 0xe0000fab, 0x18571: 0xe0000fa8, 0x18572: 0xe0001093, 0x18573: 0xe0001090, + 0x18574: 0xe000109f, 0x18575: 0xe000109c, 0x18576: 0xe0001099, 0x18577: 0xe0001096, + 0x18578: 0xe0001032, 0x18579: 0xe000102e, 0x1857a: 0xe0001046, 0x1857b: 0xe0001042, + 0x1857c: 0xe00010a9, 0x1857d: 0xe00010a6, 0x1857e: 0xe00010af, 0x1857f: 0xe00010ac, + // Block 0x616, offset 0x18580 + 0x18580: 0xe00010d2, 0x18581: 0xe00010cf, 0x18582: 0xe00010cc, 0x18583: 0xe00010c9, + 0x18584: 0xe00010e1, 0x18585: 0xe00010de, 0x18586: 0xe00010e7, 0x18587: 0xe00010e4, + 0x18588: 0xe00010ed, 0x18589: 0xe00010ea, 0x1858a: 0xe00010fc, 0x1858b: 0xe00010f9, + 0x1858c: 0xe00010f6, 0x1858d: 0xe00010f3, 0x1858e: 0xe0001123, 0x1858f: 0xe0001120, + 0x18590: 0xe0001141, 0x18591: 0xe000113e, 0x18592: 0xe0001153, 0x18593: 0xe0001150, + 0x18594: 0xe0001159, 0x18595: 0xe0001156, 0x18596: 0xe0000c15, 0x18597: 0xe0000f8d, + 0x18598: 0xe00010db, 0x18599: 0xe0001111, 0x1859a: 0xf0000404, 0x1859b: 0xe0000f70, + 0x1859c: 0x40300420, 0x1859d: 0x40300620, 0x1859e: 0xe0000f7f, 0x1859f: 0x402c9620, + 0x185a0: 0xe000099b, 0x185a1: 0xe0000998, 0x185a2: 0xe0000989, 0x185a3: 0xe0000986, + 0x185a4: 0xe0000928, 0x185a5: 0xe0000924, 0x185a6: 0xe0000930, 0x185a7: 0xe000092c, + 0x185a8: 0xe0000940, 0x185a9: 0xe000093c, 0x185aa: 0xe0000938, 0x185ab: 0xe0000934, + 0x185ac: 0xe00009aa, 0x185ad: 0xe00009a6, 0x185ae: 0xe0000902, 0x185af: 0xe00008fe, + 0x185b0: 0xe000090a, 0x185b1: 0xe0000906, 0x185b2: 0xe000091a, 0x185b3: 0xe0000916, + 0x185b4: 0xe0000912, 0x185b5: 0xe000090e, 0x185b6: 0xe00009a2, 0x185b7: 0xe000099e, + 0x185b8: 0x002c9a83, 0x185b9: 0x402c9a20, 0x185ba: 0xe0000b5c, 0x185bb: 0xe0000b59, + 0x185bc: 0xe0000b26, 0x185bd: 0xe0000b23, 0x185be: 0xe0000afb, 0x185bf: 0xe0000af7, + // Block 0x617, offset 0x185c0 + 0x185c0: 0xe0000b03, 0x185c1: 0xe0000aff, 0x185c2: 0xe0000b13, 0x185c3: 0xe0000b0f, + 0x185c4: 0xe0000b0b, 0x185c5: 0xe0000b07, 0x185c6: 0xe000b3c5, 0x185c7: 0xe000b3c2, + 0x185c8: 0xe0000c66, 0x185c9: 0xe0000c63, 0x185ca: 0xe0000c78, 0x185cb: 0xe0000c75, + 0x185cc: 0x002ee483, 0x185cd: 0x402ee420, 0x185ce: 0xe0000e44, 0x185cf: 0xe0000e41, + 0x185d0: 0xe0000dad, 0x185d1: 0xe0000da9, 0x185d2: 0xe0000db5, 0x185d3: 0xe0000db1, + 0x185d4: 0xe0000dc5, 0x185d5: 0xe0000dc1, 0x185d6: 0xe0000dbd, 0x185d7: 0xe0000db9, + 0x185d8: 0xe0003c96, 0x185d9: 0xe0003c93, 0x185da: 0xe0000e5d, 0x185db: 0xe0000e59, + 0x185dc: 0xe0000e65, 0x185dd: 0xe0000e61, 0x185de: 0xe0000e75, 0x185df: 0xe0000e71, + 0x185e0: 0xe0000e6d, 0x185e1: 0xe0000e69, 0x185e2: 0xe0003c9c, 0x185e3: 0xe0003c99, + 0x185e4: 0xe000108d, 0x185e5: 0xe000108a, 0x185e6: 0xe000104d, 0x185e7: 0xe000104a, + 0x185e8: 0xe0001066, 0x185e9: 0xe0001062, 0x185ea: 0xe000106e, 0x185eb: 0xe000106a, + 0x185ec: 0xe000107e, 0x185ed: 0xe000107a, 0x185ee: 0xe0001076, 0x185ef: 0xe0001072, + 0x185f0: 0xe0001086, 0x185f1: 0xe0001082, 0x185f2: 0xe0001108, 0x185f3: 0xe0001105, + 0x185f4: 0xe0001135, 0x185f5: 0xe0001132, 0x185f6: 0xe000112f, 0x185f7: 0xe000112c, + 0x185f8: 0xe000111d, 0x185f9: 0xe000111a, 0x185fa: 0xe0000d0a, 0x185fb: 0xe0000d07, + 0x185fc: 0x0030d888, 0x185fd: 0x4030d820, 0x185fe: 0x00312088, 0x185ff: 0x40312020, + // Block 0x618, offset 0x18600 + 0x18600: 0xa0000000, 0x18601: 0xa0000000, 0x18602: 0xa0000000, 0x18603: 0xa0000000, + 0x18604: 0xa0000000, 0x18605: 0xa0000000, 0x18606: 0xa0000000, 0x18607: 0xa0000000, + 0x18608: 0xa0000000, 0x18609: 0x40020020, 0x1860a: 0x40020220, 0x1860b: 0x40020420, + 0x1860c: 0x40020620, 0x1860d: 0x40020820, 0x1860e: 0xa0000000, 0x1860f: 0xa0000000, + 0x18610: 0xa0000000, 0x18611: 0xa0000000, 0x18612: 0xa0000000, 0x18613: 0xa0000000, + 0x18614: 0xa0000000, 0x18615: 0xa0000000, 0x18616: 0xa0000000, 0x18617: 0xa0000000, + 0x18618: 0xa0000000, 0x18619: 0xa0000000, 0x1861a: 0xa0000000, 0x1861b: 0xa0000000, + 0x1861c: 0xa0000000, 0x1861d: 0xa0000000, 0x1861e: 0xa0000000, 0x1861f: 0xa0000000, + 0x18620: 0x40021220, 0x18621: 0x4002ba20, 0x18622: 0x4003e020, 0x18623: 0x4004ea20, + 0x18624: 0x4027de20, 0x18625: 0x4004ec20, 0x18626: 0x4004e620, 0x18627: 0x4003d220, + 0x18628: 0x4003f420, 0x18629: 0x4003f620, 0x1862a: 0x4004d820, 0x1862b: 0x40093820, + 0x1862c: 0x40024020, 0x1862d: 0x40021a20, 0x1862e: 0x4002e420, 0x1862f: 0x4004e220, + 0x18630: 0x4029cc20, 0x18631: 0x4029ce20, 0x18632: 0x4029d020, 0x18633: 0x4029d220, + 0x18634: 0x4029d420, 0x18635: 0x4029d620, 0x18636: 0x4029d820, 0x18637: 0x4029da20, + 0x18638: 0x4029dc20, 0x18639: 0x4029de20, 0x1863a: 0x40026c20, 0x1863b: 0x40026220, + 0x1863c: 0x40094020, 0x1863d: 0x40094220, 0x1863e: 0x40094420, 0x1863f: 0x4002c420, + // Block 0x619, offset 0x18640 + 0x18640: 0x4004d620, 0x18641: 0xcfbf9c81, 0x18642: 0x002c0a88, 0x18643: 0x002c3a88, + 0x18644: 0x002c6288, 0x18645: 0xcfcd9cc1, 0x18646: 0x002d0888, 0x18647: 0x002d2288, + 0x18648: 0x002d6888, 0x18649: 0xcfe19c81, 0x1864a: 0x002dcc88, 0x1864b: 0x002dfe88, + 0x1864c: 0xc0030002, 0x1864d: 0xcfeb9c81, 0x1864e: 0xcff59c81, 0x1864f: 0xcfff9c81, + 0x18650: 0x002f2c88, 0x18651: 0x002f5688, 0x18652: 0x002f7a88, 0x18653: 0x002fe688, + 0x18654: 0x00302c88, 0x18655: 0xd00e9d81, 0x18656: 0x0030be88, 0x18657: 0x0030e288, + 0x18658: 0x0030f688, 0x18659: 0x00310088, 0x1865a: 0x00312a88, 0x1865b: 0x4003f820, + 0x1865c: 0x4004e420, 0x1865d: 0x4003fa20, 0x1865e: 0x40062420, 0x1865f: 0x40021620, + 0x18660: 0x40061e20, 0x18661: 0xcfba9c81, 0x18662: 0x402c0a20, 0x18663: 0x402c3a20, + 0x18664: 0x402c6220, 0x18665: 0xcfc49cc1, 0x18666: 0x402d0820, 0x18667: 0x402d2220, + 0x18668: 0x402d6820, 0x18669: 0xcfdc9c81, 0x1866a: 0x402dcc20, 0x1866b: 0x402dfe20, + 0x1866c: 0xc0000002, 0x1866d: 0xcfe69c81, 0x1866e: 0xcff09c81, 0x1866f: 0xcffa9c81, + 0x18670: 0x402f2c20, 0x18671: 0x402f5620, 0x18672: 0x402f7a20, 0x18673: 0x402fe620, + 0x18674: 0x40302c20, 0x18675: 0xd0049d81, 0x18676: 0x4030be20, 0x18677: 0x4030e220, + 0x18678: 0x4030f620, 0x18679: 0x40310020, 0x1867a: 0x40312a20, 0x1867b: 0x4003fc20, + 0x1867c: 0x40094820, 0x1867d: 0x4003fe20, 0x1867e: 0x40094c20, 0x1867f: 0xa0000000, + // Block 0x61a, offset 0x18680 + 0x18680: 0x002bde63, 0x18681: 0x002bde23, 0x18682: 0xe0000921, 0x18683: 0xe0000969, + 0x18684: 0xe000095b, 0x18685: 0xe000094d, 0x18686: 0xe00009dd, 0x18687: 0xe0000a53, + 0x18688: 0x002c9863, 0x18689: 0x002c9823, 0x1868a: 0xcfd99d51, 0x1868b: 0xe0000b20, + 0x1868c: 0x002d9a63, 0x1868d: 0x002d9a23, 0x1868e: 0xe0000c37, 0x1868f: 0xe0000c43, + 0x18690: 0xe0000ab3, 0x18691: 0xe0000d63, 0x18692: 0x002ee263, 0x18693: 0x002ee223, + 0x18694: 0xe0000da6, 0x18695: 0xe0000de6, 0x18696: 0xe0000dd2, 0x18697: 0x40093e20, + 0x18698: 0xe0000e12, 0x18699: 0x00306c63, 0x1869a: 0x00306c23, 0x1869b: 0xe0000fed, + 0x1869c: 0x00306d23, 0x1869d: 0xe0001102, 0x1869e: 0x00318888, 0x1869f: 0xe0000f7b, + 0x186a0: 0x402bde1f, 0x186a1: 0x402bde1d, 0x186a2: 0xe000091e, 0x186a3: 0xe0000966, + 0x186a4: 0xe0000958, 0x186a5: 0xe000094a, 0x186a6: 0xe00009d5, 0x186a7: 0xe0000a4d, + 0x186a8: 0x402c981f, 0x186a9: 0x402c981d, 0x186aa: 0xcfd69d51, 0x186ab: 0xe0000b1d, + 0x186ac: 0x402d9a1f, 0x186ad: 0x402d9a1d, 0x186ae: 0xe0000c34, 0x186af: 0xe0000c40, + 0x186b0: 0xe0000aad, 0x186b1: 0xe0000d60, 0x186b2: 0x402ee21f, 0x186b3: 0x402ee21d, + 0x186b4: 0xe0000da3, 0x186b5: 0xe0000de3, 0x186b6: 0xe0000dcf, 0x186b7: 0x40093c20, + 0x186b8: 0xe0000e0f, 0x186b9: 0x40306c1f, 0x186ba: 0x40306c1d, 0x186bb: 0xe0000fea, + 0x186bc: 0x40306c25, 0x186bd: 0xe00010ff, 0x186be: 0x40318820, 0x186bf: 0xe0001114, + // Block 0x61b, offset 0x186c0 + 0x186c0: 0x002bde03, 0x186c1: 0x402bde1c, 0x186c2: 0xe00008fb, 0x186c3: 0xe00008f8, + 0x186c4: 0xe000097d, 0x186c5: 0xe000097a, 0x186c6: 0xe0000a38, 0x186c7: 0xe0000a35, + 0x186c8: 0xe0000a3e, 0x186c9: 0xe0000a3b, 0x186ca: 0xe0000a4a, 0x186cb: 0xe0000a47, + 0x186cc: 0xe0000a44, 0x186cd: 0xe0000a41, 0x186ce: 0xe0000a86, 0x186cf: 0xe0000a83, + 0x186d0: 0xe0000aaa, 0x186d1: 0xe0000aa7, 0x186d2: 0x002c9803, 0x186d3: 0x402c981c, + 0x186d4: 0xe0000aee, 0x186d5: 0xe0000aeb, 0x186d6: 0xe0000b2c, 0x186d7: 0xe0000b29, + 0x186d8: 0xe0000b40, 0x186d9: 0xe0000b3d, 0x186da: 0x002c9843, 0x186db: 0x402c981e, + 0x186dc: 0xe0000bb8, 0x186dd: 0xe0000bb5, 0x186de: 0xe0000bb2, 0x186df: 0xe0000baf, + 0x186e0: 0xe0000bc4, 0x186e1: 0xe0000bc1, 0x186e2: 0xe0000bca, 0x186e3: 0xe0000bc7, + 0x186e4: 0xe0000bee, 0x186e5: 0xe0000beb, 0x186e6: 0xe0000c1b, 0x186e7: 0xe0000c18, + 0x186e8: 0xe0000c51, 0x186e9: 0xe0000c4e, 0x186ea: 0x002d9a03, 0x186eb: 0x402d9a1c, + 0x186ec: 0xe0000c31, 0x186ed: 0xe0000c2e, 0x186ee: 0xe0000c5a, 0x186ef: 0xe0000c57, + 0x186f0: 0xe0000c54, 0x186f1: 0x402da220, 0x186f2: 0xf0000a0a, 0x186f3: 0xf0000404, + 0x186f4: 0xe0000c8a, 0x186f5: 0xe0000c87, 0x186f6: 0xe0000c9f, 0x186f7: 0xe0000c9c, + 0x186f8: 0x402f7220, 0x186f9: 0xe0000ccc, 0x186fa: 0xe0000cc9, 0x186fb: 0xe0000cd8, + 0x186fc: 0xe0000cd5, 0x186fd: 0xe0000cd2, 0x186fe: 0xe0000ccf, 0x186ff: 0xe0000d04, + // Block 0x61c, offset 0x18700 + 0x18700: 0xe0000cfe, 0x18701: 0xe0000cf8, 0x18702: 0xe0000cf5, 0x18703: 0x002e9e23, + 0x18704: 0x402e9e1d, 0x18705: 0xe0000d6f, 0x18706: 0xe0000d6c, 0x18707: 0x002e9e43, + 0x18708: 0x402e9e1e, 0x18709: 0xf0000404, 0x1870a: 0x002eda88, 0x1870b: 0x402eda20, + 0x1870c: 0x002ee203, 0x1870d: 0x402ee21c, 0x1870e: 0xe0000da0, 0x1870f: 0xe0000d9d, + 0x18710: 0xe0000de0, 0x18711: 0xe0000ddd, 0x18712: 0xe0000e93, 0x18713: 0xe0000e8f, + 0x18714: 0xe0000eca, 0x18715: 0xe0000ec7, 0x18716: 0xe0000edc, 0x18717: 0xe0000ed9, + 0x18718: 0xe0000ed0, 0x18719: 0xe0000ecd, 0x1871a: 0xe0000f1f, 0x1871b: 0xe0000f1c, + 0x1871c: 0xe0000f2d, 0x1871d: 0xe0000f2a, 0x1871e: 0xe0000f47, 0x1871f: 0xe0000f44, + 0x18720: 0xe0000f33, 0x18721: 0xe0000f30, 0x18722: 0xe0000f99, 0x18723: 0xe0000f96, + 0x18724: 0xe0000f8a, 0x18725: 0xe0000f87, 0x18726: 0x00303688, 0x18727: 0x40303620, + 0x18728: 0xe000102b, 0x18729: 0xe0001028, 0x1872a: 0x00306c03, 0x1872b: 0x40306c1c, + 0x1872c: 0xe0000fe7, 0x1872d: 0xe0000fe4, 0x1872e: 0xe0000ff9, 0x1872f: 0xe0000ff6, + 0x18730: 0xe0001025, 0x18731: 0xe0001022, 0x18732: 0xe0001039, 0x18733: 0xe0001036, + 0x18734: 0xe00010d8, 0x18735: 0xe00010d5, 0x18736: 0xe000110e, 0x18737: 0xe000110b, + 0x18738: 0xe0001117, 0x18739: 0xe000113b, 0x1873a: 0xe0001138, 0x1873b: 0xe000114d, + 0x1873c: 0xe000114a, 0x1873d: 0xe0001147, 0x1873e: 0xe0001144, 0x1873f: 0xe0000f64, + // Block 0x61d, offset 0x18740 + 0x18740: 0x40321220, 0x18741: 0x40321a20, 0x18742: 0x40322220, 0x18743: 0x40322a20, + 0x18744: 0xe0000ad5, 0x18745: 0xe0000ad1, 0x18746: 0xe0000acd, 0x18747: 0xf0000a0a, + 0x18748: 0xf000040a, 0x18749: 0xf0000404, 0x1874a: 0xf0000a0a, 0x1874b: 0xf000040a, + 0x1874c: 0xf0000404, 0x1874d: 0x002bde43, 0x1874e: 0x402bde1e, 0x1874f: 0x002d9a43, + 0x18750: 0x402d9a1e, 0x18751: 0x002ee243, 0x18752: 0x402ee21e, 0x18753: 0x00306c43, + 0x18754: 0x40306c1e, 0x18755: 0x00306ca3, 0x18756: 0x40306c21, 0x18757: 0x00306cc3, + 0x18758: 0x40306c22, 0x18759: 0x00306ce3, 0x1875a: 0x40306c23, 0x1875b: 0x00306d03, + 0x1875c: 0x40306c24, 0x1875d: 0x402cae20, 0x1875e: 0xe000b51f, 0x1875f: 0xe000b51c, + 0x18760: 0xe000b525, 0x18761: 0xe000b522, 0x18762: 0xe00009f4, 0x18763: 0xe00009ef, + 0x18764: 0x002d3a88, 0x18765: 0x402d3a20, 0x18766: 0xe0000bbe, 0x18767: 0xe0000bbb, + 0x18768: 0xe0000c99, 0x18769: 0xe0000c96, 0x1876a: 0xe0000e20, 0x1876b: 0xe0000e1d, + 0x1876c: 0xe000b579, 0x1876d: 0xe000b576, 0x1876e: 0xe0001162, 0x1876f: 0xe000115f, + 0x18770: 0xe0000c8d, 0x18771: 0xf0000a0a, 0x18772: 0xf000040a, 0x18773: 0xf0000404, + 0x18774: 0xe0000bac, 0x18775: 0xe0000ba9, 0x18776: 0x002d7888, 0x18777: 0x00319488, + 0x18778: 0x002e9e63, 0x18779: 0x402e9e1f, 0x1877a: 0xe000b537, 0x1877b: 0xe000b534, + 0x1877c: 0xe00009ea, 0x1877d: 0xe00009e5, 0x1877e: 0xe0000e19, 0x1877f: 0xe0000e15, + // Block 0x61e, offset 0x18780 + 0x18780: 0xe000098f, 0x18781: 0xe000098c, 0x18782: 0xe0000995, 0x18783: 0xe0000992, + 0x18784: 0xe0000b62, 0x18785: 0xe0000b5f, 0x18786: 0xe0000b68, 0x18787: 0xe0000b65, + 0x18788: 0xe0000c6c, 0x18789: 0xe0000c69, 0x1878a: 0xe0000c72, 0x1878b: 0xe0000c6f, + 0x1878c: 0xe0000e4a, 0x1878d: 0xe0000e47, 0x1878e: 0xe0000e50, 0x1878f: 0xe0000e4d, + 0x18790: 0xe0000ee8, 0x18791: 0xe0000ee5, 0x18792: 0xe0000eee, 0x18793: 0xe0000eeb, + 0x18794: 0xe0001053, 0x18795: 0xe0001050, 0x18796: 0xe0001059, 0x18797: 0xe0001056, + 0x18798: 0xe0000f61, 0x18799: 0xe0000f5e, 0x1879a: 0xe0000fa5, 0x1879b: 0xe0000fa2, + 0x1879c: 0x00312288, 0x1879d: 0x40312220, 0x1879e: 0xe0000bf4, 0x1879f: 0xe0000bf1, + 0x187a0: 0x002ebc88, 0x187a1: 0x402c8c20, 0x187a2: 0x002f2288, 0x187a3: 0x402f2220, + 0x187a4: 0x00314088, 0x187a5: 0x40314020, 0x187a6: 0xe000096f, 0x187a7: 0xe000096c, + 0x187a8: 0xe0000b32, 0x187a9: 0xe0000b2f, 0x187aa: 0xe000b567, 0x187ab: 0xe000b564, + 0x187ac: 0xe000b56d, 0x187ad: 0xe000b56a, 0x187ae: 0xe0000e04, 0x187af: 0xe0000e01, + 0x187b0: 0xe000b573, 0x187b1: 0xe000b570, 0x187b2: 0xe0001129, 0x187b3: 0xe0001126, + 0x187b4: 0x402e5e20, 0x187b5: 0x402ed020, 0x187b6: 0x40305a20, 0x187b7: 0x402dd420, + 0x187b8: 0xe0000abf, 0x187b9: 0xe0000ec4, 0x187ba: 0x002be888, 0x187bb: 0x002c4488, + 0x187bc: 0x402c4420, 0x187bd: 0x002e3888, 0x187be: 0x00303e88, 0x187bf: 0x402ffc20, + // Block 0x61f, offset 0x187c0 + 0x187c0: 0xe00009b1, 0x187c1: 0xe00009ae, 0x187c2: 0xe0000a22, 0x187c3: 0xe0000a1f, + 0x187c4: 0xe0000a28, 0x187c5: 0xe0000a25, 0x187c6: 0xe0000a2e, 0x187c7: 0xe0000a2b, + 0x187c8: 0xe0000a5a, 0x187c9: 0xe0000a56, 0x187ca: 0xe0000a8c, 0x187cb: 0xe0000a89, + 0x187cc: 0xe0000a98, 0x187cd: 0xe0000a95, 0x187ce: 0xe0000aa4, 0x187cf: 0xe0000aa1, + 0x187d0: 0xe0000a92, 0x187d1: 0xe0000a8f, 0x187d2: 0xe0000a9e, 0x187d3: 0xe0000a9b, + 0x187d4: 0xe000b54f, 0x187d5: 0xe000b54c, 0x187d6: 0xe000b549, 0x187d7: 0xe000b546, + 0x187d8: 0xe0000b7c, 0x187d9: 0xe0000b79, 0x187da: 0xe0000b82, 0x187db: 0xe0000b7f, + 0x187dc: 0xe0000b39, 0x187dd: 0xe0000b35, 0x187de: 0xe0000b8c, 0x187df: 0xe0000b89, + 0x187e0: 0xe0000bd0, 0x187e1: 0xe0000bcd, 0x187e2: 0xe0000c00, 0x187e3: 0xe0000bfd, + 0x187e4: 0xe0000c0c, 0x187e5: 0xe0000c09, 0x187e6: 0xe0000bfa, 0x187e7: 0xe0000bf7, + 0x187e8: 0xe0000c06, 0x187e9: 0xe0000c03, 0x187ea: 0xe0000c12, 0x187eb: 0xe0000c0f, + 0x187ec: 0xe0000c7e, 0x187ed: 0xe0000c7b, 0x187ee: 0xe000b555, 0x187ef: 0xe000b552, + 0x187f0: 0xe0000c93, 0x187f1: 0xe0000c90, 0x187f2: 0xe0000cab, 0x187f3: 0xe0000ca8, + 0x187f4: 0xe0000cb1, 0x187f5: 0xe0000cae, 0x187f6: 0xe0000cde, 0x187f7: 0xe0000cdb, + 0x187f8: 0xe0000ce5, 0x187f9: 0xe0000ce1, 0x187fa: 0xe0000cf2, 0x187fb: 0xe0000cef, + 0x187fc: 0xe0000cec, 0x187fd: 0xe0000ce9, 0x187fe: 0x002e8223, 0x187ff: 0x402e821d, + // Block 0x620, offset 0x18800 + 0x18800: 0xe0000d24, 0x18801: 0xe0000d21, 0x18802: 0xe0000d2a, 0x18803: 0xe0000d27, + 0x18804: 0xe0000d69, 0x18805: 0xe0000d66, 0x18806: 0xe0000d7b, 0x18807: 0xe0000d78, + 0x18808: 0xe0000d87, 0x18809: 0xe0000d84, 0x1880a: 0xe0000d81, 0x1880b: 0xe0000d7e, + 0x1880c: 0xe000b585, 0x1880d: 0xe000b582, 0x1880e: 0xe0000df5, 0x1880f: 0xe0000df1, + 0x18810: 0xe000b561, 0x18811: 0xe000b55e, 0x18812: 0xe000b55b, 0x18813: 0xe000b558, + 0x18814: 0xe0000ea7, 0x18815: 0xe0000ea4, 0x18816: 0xe0000ead, 0x18817: 0xe0000eaa, + 0x18818: 0xe0000ed6, 0x18819: 0xe0000ed3, 0x1881a: 0xe0000ef4, 0x1881b: 0xe0000ef1, + 0x1881c: 0xe0000efb, 0x1881d: 0xe0000ef7, 0x1881e: 0xe0000f02, 0x1881f: 0xe0000eff, + 0x18820: 0xe0000f41, 0x18821: 0xe0000f3e, 0x18822: 0xe0000f53, 0x18823: 0xe0000f50, + 0x18824: 0xe0000f26, 0x18825: 0xe0000f22, 0x18826: 0xe0000f3a, 0x18827: 0xe0000f36, + 0x18828: 0xe0000f5a, 0x18829: 0xe0000f56, 0x1882a: 0xe0000f93, 0x1882b: 0xe0000f90, + 0x1882c: 0xe0000f9f, 0x1882d: 0xe0000f9c, 0x1882e: 0xe0000fb1, 0x1882f: 0xe0000fae, + 0x18830: 0xe0000fab, 0x18831: 0xe0000fa8, 0x18832: 0xe0001093, 0x18833: 0xe0001090, + 0x18834: 0xe000109f, 0x18835: 0xe000109c, 0x18836: 0xe0001099, 0x18837: 0xe0001096, + 0x18838: 0xe000b5a3, 0x18839: 0xe000b5a0, 0x1883a: 0xe000b59d, 0x1883b: 0xe000b59a, + 0x1883c: 0xe00010a9, 0x1883d: 0xe00010a6, 0x1883e: 0xe00010af, 0x1883f: 0xe00010ac, + // Block 0x621, offset 0x18840 + 0x18840: 0xe00010d2, 0x18841: 0xe00010cf, 0x18842: 0xe00010cc, 0x18843: 0xe00010c9, + 0x18844: 0xe00010e1, 0x18845: 0xe00010de, 0x18846: 0xe00010e7, 0x18847: 0xe00010e4, + 0x18848: 0xe00010ed, 0x18849: 0xe00010ea, 0x1884a: 0xe00010fc, 0x1884b: 0xe00010f9, + 0x1884c: 0xe00010f6, 0x1884d: 0xe00010f3, 0x1884e: 0xe0001123, 0x1884f: 0xe0001120, + 0x18850: 0xe0001141, 0x18851: 0xe000113e, 0x18852: 0xe0001153, 0x18853: 0xe0001150, + 0x18854: 0xe0001159, 0x18855: 0xe0001156, 0x18856: 0xe0000c15, 0x18857: 0xe0000f8d, + 0x18858: 0xe00010db, 0x18859: 0xe0001111, 0x1885a: 0xf0000404, 0x1885b: 0xe0000f70, + 0x1885c: 0x40300420, 0x1885d: 0x40300620, 0x1885e: 0xe0000f7f, 0x1885f: 0x402c9620, + 0x18860: 0xe000099b, 0x18861: 0xe0000998, 0x18862: 0xe0000989, 0x18863: 0xe0000986, + 0x18864: 0xe000b531, 0x18865: 0xe000b52e, 0x18866: 0xe000b543, 0x18867: 0xe000b540, + 0x18868: 0xe0000940, 0x18869: 0xe000093c, 0x1886a: 0xe0000938, 0x1886b: 0xe0000934, + 0x1886c: 0xe00009aa, 0x1886d: 0xe00009a6, 0x1886e: 0xe000b52b, 0x1886f: 0xe000b528, + 0x18870: 0xe000b53d, 0x18871: 0xe000b53a, 0x18872: 0xe000091a, 0x18873: 0xe0000916, + 0x18874: 0xe0000912, 0x18875: 0xe000090e, 0x18876: 0xe00009a2, 0x18877: 0xe000099e, + 0x18878: 0xe0000b6e, 0x18879: 0xe0000b6b, 0x1887a: 0xe0000b5c, 0x1887b: 0xe0000b59, + 0x1887c: 0xe0000b26, 0x1887d: 0xe0000b23, 0x1887e: 0x002c98c3, 0x1887f: 0x402c9822, + // Block 0x622, offset 0x18880 + 0x18880: 0x002c9903, 0x18881: 0x402c9824, 0x18882: 0xe0000b13, 0x18883: 0xe0000b0f, + 0x18884: 0xe0000b0b, 0x18885: 0xe0000b07, 0x18886: 0xe0000b75, 0x18887: 0xe0000b71, + 0x18888: 0xe0000c66, 0x18889: 0xe0000c63, 0x1888a: 0xe0000c78, 0x1888b: 0xe0000c75, + 0x1888c: 0xe0000e84, 0x1888d: 0xe0000e81, 0x1888e: 0xe0000e44, 0x1888f: 0xe0000e41, + 0x18890: 0xe000b57f, 0x18891: 0xe000b57c, 0x18892: 0xe000b591, 0x18893: 0xe000b58e, + 0x18894: 0xe0000dc5, 0x18895: 0xe0000dc1, 0x18896: 0xe0000dbd, 0x18897: 0xe0000db9, + 0x18898: 0xe0000e8b, 0x18899: 0xe0000e87, 0x1889a: 0xe000b58b, 0x1889b: 0xe000b588, + 0x1889c: 0xe000b597, 0x1889d: 0xe000b594, 0x1889e: 0xe0000e75, 0x1889f: 0xe0000e71, + 0x188a0: 0xe0000e6d, 0x188a1: 0xe0000e69, 0x188a2: 0xe0000e7d, 0x188a3: 0xe0000e79, + 0x188a4: 0xe000108d, 0x188a5: 0xe000108a, 0x188a6: 0xe000104d, 0x188a7: 0xe000104a, + 0x188a8: 0xe000b5a9, 0x188a9: 0xe000b5a6, 0x188aa: 0xe000b5af, 0x188ab: 0xe000b5ac, + 0x188ac: 0xe000107e, 0x188ad: 0xe000107a, 0x188ae: 0xe0001076, 0x188af: 0xe0001072, + 0x188b0: 0xe0001086, 0x188b1: 0xe0001082, 0x188b2: 0xe0001108, 0x188b3: 0xe0001105, + 0x188b4: 0xe0001135, 0x188b5: 0xe0001132, 0x188b6: 0xe000112f, 0x188b7: 0xe000112c, + 0x188b8: 0xe000111d, 0x188b9: 0xe000111a, 0x188ba: 0xe0000d0a, 0x188bb: 0xe0000d07, + 0x188bc: 0x0030d888, 0x188bd: 0x4030d820, 0x188be: 0x00312088, 0x188bf: 0x40312020, + // Block 0x623, offset 0x188c0 + 0x188c0: 0x6d200220, 0x188c1: 0x6c16fe20, 0x188c2: 0x6d0bdc20, 0x188c3: 0x6d1b3420, + 0x188c4: 0x6d0bd620, 0x188c5: 0x6cc58020, 0x188c6: 0x6c6ece20, 0x188c7: 0xe000240a, + 0x188c8: 0x6c29ae20, 0x188c9: 0x6c29ca20, 0x188ca: 0x6c100220, 0x188cb: 0x6c6b9220, + 0x188cc: 0x6cff9e20, 0x188cd: 0x6cffa020, 0x188ce: 0x6cf39620, 0x188cf: 0x6cedd020, + 0x188d0: 0x6cedd220, 0x188d1: 0x6cf39820, 0x188d2: 0x6cd8fa20, 0x188d3: 0x6d10c420, + 0x188d4: 0x6c630820, 0x188d5: 0x6c616620, 0x188d6: 0x6d036620, 0x188d7: 0x6d036820, + 0x188d8: 0x6cd49220, 0x188d9: 0x6cdbee20, 0x188db: 0x6cc64c20, + 0x188dc: 0x6cc63420, 0x188dd: 0x6d266620, 0x188de: 0x6c271e20, 0x188df: 0x2ca22083, + 0x188e0: 0x6c9f8820, 0x188e1: 0x6cd74220, 0x188e2: 0x6cd74420, 0x188e3: 0x6c0c6c20, + 0x188e4: 0x6d2ff820, 0x188e5: 0x6d2ff220, 0x188e6: 0x6cbb3620, 0x188e7: 0x6ca96420, + 0x188e8: 0x6cc38820, 0x188e9: 0xe000243f, 0x188ea: 0xe0002442, 0x188eb: 0x6ca2c020, + 0x188ec: 0x6cd2f220, 0x188ed: 0x6cd40820, 0x188ee: 0x6cd30220, 0x188ef: 0x6cd86820, + 0x188f0: 0x6cd86a20, 0x188f1: 0x6c429620, 0x188f2: 0x6cee4220, 0x188f3: 0xe0002451, + 0x188f4: 0x6cee4020, 0x188f5: 0xe000244e, 0x188f6: 0x6cc5ba20, 0x188f7: 0x6cc60a20, + 0x188f8: 0x02ff1684, 0x188f9: 0x03000484, 0x188fa: 0x6d24ba20, 0x188fb: 0x6d24bc20, + 0x188fc: 0x6cc78020, 0x188fd: 0x6c719e20, 0x188fe: 0x6c12be20, 0x188ff: 0x6c12c220, + // Block 0x624, offset 0x18900 + 0x18900: 0x6c12c420, 0x18901: 0x6c562e20, 0x18902: 0x6d199a20, 0x18903: 0x6cf76620, + 0x18904: 0x6cf94e20, 0x18905: 0x6c673620, 0x18906: 0x0313a484, 0x18907: 0xe000246c, + 0x18908: 0x6d0d2e20, 0x18909: 0x6c077420, 0x1890a: 0xe000246f, 0x1890b: 0x6c17e220, + 0x1890c: 0x6c21a220, 0x1890d: 0x6c21a620, 0x1890e: 0x6c21f020, 0x1890f: 0x6c3f9a20, + 0x18910: 0x6c6c7c20, 0x18911: 0x6c16dc20, 0x18912: 0x6c16de20, 0x18913: 0x6d2f1620, + 0x18914: 0x6c9ae820, 0x18915: 0xe000247b, 0x18916: 0x6c3f9c20, 0x18917: 0x6d222020, + 0x18918: 0x6cbe6a20, 0x18919: 0x6cef7e20, 0x1891a: 0x6d13ae20, 0x1891b: 0x6c3c9820, + 0x1891c: 0x6c3a3020, 0x1891d: 0x6cd29c20, 0x1891e: 0xe0002481, 0x1891f: 0x6cd29e20, + 0x18920: 0x6cd2a020, 0x18921: 0xe0002484, 0x18922: 0x6c96ae20, 0x18923: 0x6c476c20, + 0x18924: 0x6c4b2420, 0x18925: 0x6d220e20, 0x18926: 0x6ca7ce20, 0x18927: 0x6c920a20, + 0x18928: 0x6c975620, 0x18929: 0x6c5a4020, 0x1892a: 0x6c9e4820, 0x1892b: 0x6cb6bc20, + 0x1892c: 0x6cb6be20, 0x1892d: 0x6c1bd020, 0x1892e: 0x6c1bd220, 0x1892f: 0x6c902820, + 0x18930: 0x6c902a20, 0x18931: 0x6c4ab620, 0x18932: 0x6c4ab420, 0x18933: 0x2c4a3883, + // Block 0x625, offset 0x18940 + 0x18940: 0x2d13b686, 0x18941: 0x2c4bb683, 0x18942: 0x2d3a5283, 0x18943: 0x2cb1dc83, + 0x18944: 0x2d15aa84, 0x18945: 0x2c73be83, 0x18946: 0x2c37b486, 0x18947: 0x2ce7e283, + 0x18948: 0x2cc55a84, 0x18949: 0x2c372e83, 0x1894a: 0x2cc80e83, 0x1894b: 0x2c030a84, + 0x1894c: 0x2c6ed083, 0x1894d: 0x2c9d1683, 0x1894e: 0x2c0d9e83, 0x1894f: 0x2c610c83, + 0x18950: 0x2cb9ec83, 0x18951: 0x2c29b083, 0x18952: 0x2c855c83, 0x18953: 0x2c059c83, + 0x18954: 0x2c08aa83, 0x18955: 0x2c397e83, 0x18956: 0x2cf83483, 0x18957: 0x2cd22485, + 0x18958: 0x2c100483, 0x18959: 0x2c6a4e83, 0x1895a: 0x2c16e083, 0x1895b: 0x2cd7b483, + 0x1895c: 0x2d200483, 0x1895d: 0x2c79c883, 0x1895e: 0x2ceed683, 0x1895f: 0x2ce91084, + 0x18960: 0x2cd2e283, 0x18961: 0x2d34ca83, 0x18962: 0x2cdba683, 0x18963: 0x2cf55a83, + 0x18964: 0x2c26e483, 0x18965: 0x2caa6e84, 0x18966: 0x2d3f6883, 0x18967: 0x2c9db683, + 0x18968: 0x2c25b083, 0x18969: 0x2cffa283, 0x1896a: 0x2d1edc83, 0x1896b: 0x2cd18a83, + 0x1896c: 0x2c17fa83, 0x1896d: 0x2cccb083, 0x1896e: 0x2c1fd683, 0x1896f: 0x2c454a83, + 0x18970: 0x2c610e83, 0x18971: 0x2c6c1a83, 0x18972: 0x2c420a83, 0x18973: 0x2d107e83, + 0x18974: 0x2c4a0283, 0x18975: 0x2d1ac083, 0x18976: 0x2c45cc83, 0x18977: 0x2d163c83, + 0x18978: 0x2c454c83, 0x18979: 0x2c616883, 0x1897a: 0x2cccb283, 0x1897b: 0x2c1bd483, + 0x1897c: 0x2d02a283, 0x1897d: 0x2c436083, 0x1897e: 0x2c563883, 0x1897f: 0x2cd43684, + // Block 0x626, offset 0x18980 + 0x18980: 0x2d337e83, 0x18981: 0x2cb3fc83, 0x18982: 0x2cf17a84, 0x18983: 0x2c30f883, + 0x18984: 0x2c6c1e83, 0x18985: 0x2c398083, 0x18986: 0x2cf39a83, 0x18987: 0x2cc63684, + 0x18988: 0x2d264283, 0x18989: 0x2d266885, 0x1898a: 0x2ca25c84, 0x1898b: 0x2cba3883, + 0x1898c: 0x2d34cc83, 0x1898d: 0x2c271283, 0x1898e: 0x2cd49883, 0x1898f: 0x2cf39c83, + 0x18990: 0x2c08ac83, 0x18991: 0x2c98c083, 0x18992: 0x2cd2e483, 0x18993: 0x2cb72683, + 0x18994: 0x2cd70284, 0x18995: 0x2c5d8484, 0x18996: 0x2d2f8083, 0x18997: 0x2c3fa083, + 0x18998: 0x2d10c683, 0x18999: 0x2cac5083, 0x1899a: 0x2cb14483, 0x1899b: 0x2d0b0883, + 0x1899c: 0x2ca96683, 0x1899d: 0x2cc34c83, 0x1899e: 0x2d07fa83, 0x1899f: 0x2d22b883, + 0x189a0: 0x2c483e83, 0x189a1: 0x2cec0c83, 0x189a2: 0x2c415c83, 0x189a3: 0x2cd0d284, + 0x189a4: 0x2d1e6c83, 0x189a5: 0x2ce47e83, 0x189a6: 0x2cb04483, 0x189a7: 0x2ca54083, + 0x189a8: 0x2c0e4683, 0x189a9: 0x2c040883, 0x189aa: 0x2cafa883, 0x189ab: 0x2c9f8a83, + 0x189ac: 0x2ca26483, 0x189ad: 0x2c98c283, 0x189ae: 0x2cd2a883, 0x189af: 0x2cd22c83, + 0x189b0: 0x2cd2f483, 0x189b1: 0x2cc74083, 0x189b2: 0x2c50b283, 0x189b3: 0x2d08f283, + 0x189b4: 0x2c856c83, 0x189b5: 0x2d39f083, 0x189b6: 0x2c9cd683, 0x189b7: 0x2c9d1a83, + 0x189b8: 0x2c3d1a83, 0x189b9: 0x2cedf483, 0x189ba: 0x2d0f7683, 0x189bb: 0x2d221c83, + 0x189bc: 0x2c819a83, 0x189bd: 0x2c373083, 0x189be: 0x2c82b283, 0x189bf: 0x2c378483, + // Block 0x627, offset 0x189c0 + 0x189c0: 0x2d22c683, 0x189c1: 0x2cc78283, 0x189c2: 0x2c189483, 0x189c3: 0x2d3f2a83, + 0x189c4: 0x2d357083, 0x189c5: 0x2c6fd083, 0x189c6: 0x2ccf0683, 0x189c7: 0x2c201683, + 0x189c8: 0x2d385283, 0x189c9: 0x2c449e83, 0x189ca: 0x2ccb1483, 0x189cb: 0x2c12aa83, + 0x189cc: 0x2c549483, 0x189cd: 0x2c1d0883, 0x189ce: 0x2d093883, 0x189cf: 0x2d03ba83, + 0x189d0: 0x2d13be83, 0x189d1: 0x2d0b7083, 0x189d2: 0x2c665283, 0x189d3: 0x2c68c683, + 0x189d4: 0x2d0c5c83, 0x189d5: 0x2c475c83, 0x189d6: 0x2c30fa83, 0x189d7: 0x2cd2b083, + 0x189d8: 0x2d357c83, 0x189d9: 0x2c06dc83, 0x189da: 0x2c1be883, 0x189db: 0x2d407e84, + 0x189dc: 0x2d40a683, 0x189dd: 0x2ccfa483, 0x189de: 0x2c17ce83, 0x189df: 0x2d02ae83, + 0x189e0: 0x2c18a083, 0x189e1: 0x2c21a883, 0x189e2: 0x2d169e83, 0x189e3: 0x2d1fa483, + 0x189e4: 0x2c0b7883, 0x189e5: 0x2c84fc83, 0x189e6: 0x2c6c2e84, 0x189e7: 0x2d2f0083, + 0x189e8: 0x2c9ac683, 0x189e9: 0x2c3fba83, 0x189ea: 0x2c859883, 0x189eb: 0x2d3c5683, + 0x189ec: 0x2d222283, 0x189ed: 0x2cbe3083, 0x189ee: 0x2c39f283, 0x189ef: 0x2c9e5683, + 0x189f0: 0x2c43d083, 0x189f1: 0x2ceeee83, 0x189f2: 0x2c6fb483, 0x189f3: 0x2d19ba83, + 0x189f4: 0x2d12dc83, 0x189f5: 0x2c3c2c83, 0x189f6: 0x2c39f483, 0x189f7: 0x2cd25883, + 0x189f8: 0x2cd44283, 0x189f9: 0x2cfd6683, 0x189fa: 0x2c969883, 0x189fb: 0x2c476e83, + 0x189fc: 0x2c42bc83, 0x189fd: 0x2c0bf483, 0x189fe: 0x2c310e83, 0x189ff: 0x2c170e83, + // Block 0x628, offset 0x18a00 + 0x18a00: 0x2c43e083, 0x18a01: 0x2c4ae283, 0x18a02: 0x2d211283, 0x18a03: 0x2ca79a83, + 0x18a04: 0x2c91bc83, 0x18a05: 0x2c924c83, 0x18a06: 0x2c973283, 0x18a07: 0x2c966883, + 0x18a08: 0x2c59ce83, 0x18a09: 0x2cd56083, 0x18a0a: 0x2c521c83, 0x18a0b: 0x2d353483, + 0x18a0c: 0x2c9e3283, 0x18a0d: 0x2c2f7483, 0x18a0e: 0x2c47a683, 0x18a0f: 0x2cd56683, + 0x18a10: 0x2c08a283, 0x18a11: 0x2cb63483, 0x18a12: 0x2c1bc283, 0x18a13: 0x2c8fb083, + 0x18a14: 0x2c4a9683, 0x18a15: 0x2d26f683, + 0x18a30: 0x40273a20, 0x18a31: 0x40273c20, 0x18a32: 0x40273e20, 0x18a33: 0x40274020, + 0x18a34: 0x40274220, 0x18a35: 0x40274420, 0x18a36: 0x40274620, 0x18a37: 0x40274820, + 0x18a38: 0x40274a20, 0x18a39: 0x40274c20, 0x18a3a: 0x40274e20, 0x18a3b: 0x40275020, + // Block 0x629, offset 0x18a40 + 0x18a40: 0x00021283, 0x18a41: 0x40025c20, 0x18a42: 0x40030420, 0x18a43: 0x40051220, + 0x18a44: 0x40279a20, 0x18a45: 0x4027ca20, 0x18a46: 0xe0002206, 0x18a47: 0x6c8c9620, + 0x18a48: 0x40049c20, 0x18a49: 0x40049e20, 0x18a4a: 0x4004a020, 0x18a4b: 0x4004a220, + 0x18a4c: 0x4004a420, 0x18a4d: 0x4004a620, 0x18a4e: 0x4004a820, 0x18a4f: 0x4004aa20, + 0x18a50: 0x4004ac20, 0x18a51: 0x4004ae20, 0x18a52: 0x40279c20, 0x18a53: 0x40279e20, + 0x18a54: 0x4004b020, 0x18a55: 0x4004b220, 0x18a56: 0x4004b420, 0x18a57: 0x4004b620, + 0x18a58: 0x4004b820, 0x18a59: 0x4004ba20, 0x18a5a: 0x4004bc20, 0x18a5b: 0x4004be20, + 0x18a5c: 0x40023820, 0x18a5d: 0x4003ea20, 0x18a5e: 0x4003ec20, 0x18a5f: 0x4003ee20, + 0x18a60: 0x4027a020, 0x18a61: 0xe0000267, 0x18a62: 0xe000037f, 0x18a63: 0xe0000459, + 0x18a64: 0xe000052e, 0x18a65: 0xe00005f8, 0x18a66: 0xe00006c3, 0x18a67: 0xe000076b, + 0x18a68: 0xe0000817, 0x18a69: 0xe00008bc, 0x18a6a: 0xada12202, 0x18a6b: 0xae412302, + 0x18a6c: 0xae812402, 0x18a6d: 0xade12502, 0x18a6e: 0xae012602, 0x18a6f: 0xae012702, + 0x18a70: 0x40023a20, 0x18a71: 0x4027ce20, 0x18a72: 0xe0000152, 0x18a73: 0x4027d020, + 0x18a74: 0xe0000155, 0x18a75: 0x4027d220, 0x18a76: 0x00279c84, 0x18a77: 0x4027a220, + 0x18a78: 0x2cd22484, 0x18a79: 0x2ca75483, 0x18a7a: 0x2cc96283, 0x18a7b: 0x4027cc20, + 0x18a7c: 0xe000231a, 0x18a7d: 0x40051420, 0x18a7e: 0x4027a420, 0x18a7f: 0x4027a620, + // Block 0x62a, offset 0x18a80 + 0x18a80: 0x00633a84, 0x18a81: 0x00634484, 0x18a82: 0x0064f684, 0x18a83: 0x0064f884, + 0x18a84: 0x00635a84, 0x18a85: 0x00635c84, 0x18a86: 0x00635e84, 0x18a87: 0x0063ee84, + 0x18a88: 0x0063f084, 0x18a89: 0x0063f684, 0x18a8a: 0x00640884, 0x18a8b: 0x00640a84, + 0x18a8c: 0x00640e84, 0x18a8d: 0x00642284, 0x18a8e: 0x00642884, + 0x18a90: 0x4027a820, 0x18a91: 0x4027aa20, 0x18a92: 0x2d13b685, 0x18a93: 0x2c37b485, + 0x18a94: 0x2cc9f285, 0x18a95: 0x2cd87484, 0x18a96: 0x2cce4884, 0x18a97: 0x2d378285, + 0x18a98: 0x2cfa2684, 0x18a99: 0x2c63fc83, 0x18a9a: 0x2d15aa83, 0x18a9b: 0x2c0dba83, + 0x18a9c: 0x2c2f4083, 0x18a9d: 0x2ce45484, 0x18a9e: 0x2c2a8a83, 0x18a9f: 0x2cc55a83, + 0x18aa0: 0xe000237a, 0x18aa1: 0xe0002383, 0x18aa2: 0xe0002380, 0x18aa3: 0xe000237d, + 0x18aa4: 0x40661c20, 0x18aa5: 0xe000238c, 0x18aa6: 0x40661620, 0x18aa7: 0xe0002389, + 0x18aa8: 0xe000239e, 0x18aa9: 0xe0002386, 0x18aaa: 0xe0002395, 0x18aab: 0xe000239b, + 0x18aac: 0x40663420, 0x18aad: 0x4065f220, 0x18aae: 0xe000238f, 0x18aaf: 0xe0002392, + 0x18ab0: 0x40663020, 0x18ab1: 0x40663220, 0x18ab2: 0x40662c20, 0x18ab3: 0xe0002398, + 0x18ab4: 0x0065dc99, 0x18ab5: 0x0065e699, 0x18ab6: 0x0065ee99, 0x18ab7: 0x0065f499, + 0x18ab8: 0x40660c20, 0x18ab9: 0x40660e20, 0x18aba: 0x40661020, + // Block 0x62b, offset 0x18ac0 + 0x18ac0: 0xf0000404, 0x18ac1: 0xf0000404, 0x18ac2: 0xf0000404, 0x18ac3: 0xf0000404, + 0x18ac4: 0xf0000404, 0x18ac5: 0xf0000404, 0x18ac6: 0xf0000404, 0x18ac7: 0xf0000404, + 0x18ac8: 0xf0000404, 0x18ac9: 0xf0000404, 0x18aca: 0xf0000404, 0x18acb: 0xf0000404, + 0x18acc: 0xf0000404, 0x18acd: 0xf0000404, 0x18ace: 0xe000004c, 0x18acf: 0xe0000051, + 0x18ad0: 0xe0000056, 0x18ad1: 0xe000005b, 0x18ad2: 0xe0000060, 0x18ad3: 0xe0000065, + 0x18ad4: 0xe000006a, 0x18ad5: 0xe000006f, 0x18ad6: 0xe0000083, 0x18ad7: 0xe000008d, + 0x18ad8: 0xe0000092, 0x18ad9: 0xe0000097, 0x18ada: 0xe000009c, 0x18adb: 0xe00000a1, + 0x18adc: 0xe0000088, 0x18add: 0xe0000074, 0x18ade: 0xe000007c, + 0x18ae0: 0xe000b438, 0x18ae1: 0xe000b3d4, 0x18ae2: 0xe000b40c, 0x18ae3: 0xe000b41c, + 0x18ae4: 0xe000b428, 0x18ae5: 0xe000b3f4, 0x18ae6: 0xe000b400, 0x18ae7: 0xe000b3c8, + 0x18ae8: 0xe000b3ec, 0x18ae9: 0xe000b414, 0x18aea: 0xe000b440, 0x18aeb: 0xe000b3dc, + 0x18aec: 0xe000b418, 0x18aed: 0xe000b3fc, 0x18aee: 0xe000b3e8, 0x18aef: 0xe000b424, + 0x18af0: 0xe000b408, 0x18af1: 0xe000b448, 0x18af2: 0xe000b43c, 0x18af3: 0xe000b410, + 0x18af4: 0xe000b3f8, 0x18af5: 0xe000b420, 0x18af6: 0xe000b3cc, 0x18af7: 0xe000b44c, + 0x18af8: 0xe000b3f0, 0x18af9: 0xe000b3d0, 0x18afa: 0xe000b3d8, 0x18afb: 0xe000b434, + 0x18afc: 0xe000b3e4, 0x18afd: 0xe000b404, 0x18afe: 0xe000b450, 0x18aff: 0xe000b42c, + // Block 0x62c, offset 0x18b00 + 0x18b00: 0xe000b3e0, 0x18b01: 0xe000b430, 0x18b02: 0xe000b454, 0x18b03: 0xe000b444, + 0x18b04: 0x2cf20683, 0x18b05: 0x2d200c83, 0x18b06: 0x2cf17a83, 0x18b07: 0x2d32e283, + 0x18b08: 0xe00002e3, 0x18b09: 0xe00003d8, 0x18b0a: 0xe00004b3, 0x18b0b: 0xe000057d, + 0x18b0c: 0xe0000648, 0x18b0d: 0xe00006f0, 0x18b0e: 0xe000079c, 0x18b0f: 0xe0000841, + 0x18b10: 0xe0000ec0, 0x18b11: 0xf0000606, 0x18b12: 0xf0000606, 0x18b13: 0xf0000606, + 0x18b14: 0xf0000606, 0x18b15: 0xf0000606, 0x18b16: 0xf0000606, 0x18b17: 0xf0000606, + 0x18b18: 0xf0000606, 0x18b19: 0xf0000606, 0x18b1a: 0xf0000606, 0x18b1b: 0xf0000606, + 0x18b1c: 0xf0000606, 0x18b1d: 0xf0000606, 0x18b1e: 0xf0000606, 0x18b1f: 0xf0000606, + 0x18b20: 0x0062ac86, 0x18b21: 0x0062b086, 0x18b22: 0x0062b286, 0x18b23: 0x0062b686, + 0x18b24: 0x0062b886, 0x18b25: 0x0062ba86, 0x18b26: 0x0062be86, 0x18b27: 0x0062c286, + 0x18b28: 0x0062c486, 0x18b29: 0x0062c886, 0x18b2a: 0x0062ca86, 0x18b2b: 0x0062cc86, + 0x18b2c: 0x0062ce86, 0x18b2d: 0x0062d086, 0x18b2e: 0xf0000606, 0x18b2f: 0xf0000606, + 0x18b30: 0xf0000606, 0x18b31: 0xf0000606, 0x18b32: 0xf0000606, 0x18b33: 0xf0000606, + 0x18b34: 0xf0000606, 0x18b35: 0xf0000606, 0x18b36: 0xf0000606, 0x18b37: 0xf0000606, + 0x18b38: 0xf0000606, 0x18b39: 0xf0000606, 0x18b3a: 0xf0000606, 0x18b3b: 0xf0000606, + 0x18b3c: 0xe0002127, 0x18b3d: 0xe0002122, 0x18b3e: 0xf0000606, 0x18b3f: 0x4027ac20, + // Block 0x62d, offset 0x18b40 + 0x18b40: 0x2d13b684, 0x18b41: 0x2c37b484, 0x18b42: 0x2cc9f284, 0x18b43: 0x2cd87483, + 0x18b44: 0x2cf41483, 0x18b45: 0x2c8f2483, 0x18b46: 0x2cb4c683, 0x18b47: 0x2c030a83, + 0x18b48: 0x2c6f9a83, 0x18b49: 0x2cd22483, 0x18b4a: 0x2d266884, 0x18b4b: 0x2c5d8483, + 0x18b4c: 0x2cd70283, 0x18b4d: 0x2ca25c83, 0x18b4e: 0x2c6c2e83, 0x18b4f: 0x2ce91083, + 0x18b50: 0x2cc63683, 0x18b51: 0x2d399283, 0x18b52: 0x2d1f9884, 0x18b53: 0x2ccf3683, + 0x18b54: 0x2c9fe683, 0x18b55: 0x2ce27083, 0x18b56: 0x2c110e83, 0x18b57: 0x2d3ac683, + 0x18b58: 0x2c814083, 0x18b59: 0x2c9d3483, 0x18b5a: 0x2ca3e283, 0x18b5b: 0x2caa6e83, + 0x18b5c: 0x2cd3bc83, 0x18b5d: 0x2d1eb483, 0x18b5e: 0x2d1b3683, 0x18b5f: 0x2d3ab083, + 0x18b60: 0x2cfe3a83, 0x18b61: 0x2d04b283, 0x18b62: 0x2d013e83, 0x18b63: 0x2d333683, + 0x18b64: 0x2cce4883, 0x18b65: 0x2d378284, 0x18b66: 0x2cfa2683, 0x18b67: 0x2d426084, + 0x18b68: 0x2d200884, 0x18b69: 0x2d13c083, 0x18b6a: 0x2d3f7083, 0x18b6b: 0x2d08f883, + 0x18b6c: 0x2c64ca83, 0x18b6d: 0x2cb6c883, 0x18b6e: 0x2d3e6083, 0x18b6f: 0x2d007083, + 0x18b70: 0x2d12ca83, 0x18b71: 0xf0000606, 0x18b72: 0xf0000606, 0x18b73: 0xf0000606, + 0x18b74: 0xf0000606, 0x18b75: 0xf0000606, 0x18b76: 0xf0000606, 0x18b77: 0xf0000606, + 0x18b78: 0xf0000606, 0x18b79: 0xf0000606, 0x18b7a: 0xf0000606, 0x18b7b: 0xf0000606, + 0x18b7c: 0xf0000606, 0x18b7d: 0xf0000606, 0x18b7e: 0xf0000606, 0x18b7f: 0xf0000606, + // Block 0x62e, offset 0x18b80 + 0x18b80: 0xf0000203, 0x18b81: 0xf0000203, 0x18b82: 0xf0000203, 0x18b83: 0xf0000203, + 0x18b84: 0xf0000203, 0x18b85: 0xf0000203, 0x18b86: 0xf0000203, 0x18b87: 0xf0000203, + 0x18b88: 0xf0000203, 0x18b89: 0xe000b484, 0x18b8a: 0xe000b490, 0x18b8b: 0xe000b49c, + 0x18b8c: 0xf0001c1d, 0x18b8d: 0xe0000b85, 0x18b8e: 0xf0001d1c, 0x18b8f: 0xe0000d14, + 0x18b90: 0x00657693, 0x18b91: 0x00657893, 0x18b92: 0x00657a93, 0x18b93: 0x00657e93, + 0x18b94: 0x00658093, 0x18b95: 0x00658293, 0x18b96: 0x00658493, 0x18b97: 0x00658693, + 0x18b98: 0x00658893, 0x18b99: 0x00658a93, 0x18b9a: 0x00658c93, 0x18b9b: 0x00658e93, + 0x18b9c: 0x00659093, 0x18b9d: 0x00659293, 0x18b9e: 0x00659493, 0x18b9f: 0x00659693, + 0x18ba0: 0x00659893, 0x18ba1: 0x00659a93, 0x18ba2: 0x00659c93, 0x18ba3: 0x00659e93, + 0x18ba4: 0x0065a093, 0x18ba5: 0x0065a293, 0x18ba6: 0x0065a493, 0x18ba7: 0x0065a693, + 0x18ba8: 0x0065a893, 0x18ba9: 0x0065aa93, 0x18baa: 0x0065ac93, 0x18bab: 0x0065ae93, + 0x18bac: 0x0065b093, 0x18bad: 0x0065b293, 0x18bae: 0x0065b493, 0x18baf: 0x0065b693, + 0x18bb0: 0x0065b893, 0x18bb1: 0x0065ba93, 0x18bb2: 0x0065bc93, 0x18bb3: 0x0065be93, + 0x18bb4: 0x0065c093, 0x18bb5: 0x0065c493, 0x18bb6: 0x0065c693, 0x18bb7: 0x0065c893, + 0x18bb8: 0x0065ca93, 0x18bb9: 0x0065cc93, 0x18bba: 0x0065ce93, 0x18bbb: 0x0065d093, + 0x18bbc: 0x0065d293, 0x18bbd: 0x0065d493, 0x18bbe: 0x0065d693, + // Block 0x62f, offset 0x18bc0 + 0x18bc0: 0xe000230b, 0x18bc1: 0xe00022f8, 0x18bc2: 0xe00022fc, 0x18bc3: 0xe0002311, + 0x18bc4: 0xe0002316, 0x18bc5: 0xe000231d, 0x18bc6: 0xe0002321, 0x18bc7: 0xe0002325, + 0x18bc8: 0xe000232b, 0x18bc9: 0xf0001c1c, 0x18bca: 0xe0002330, 0x18bcb: 0xe000233c, + 0x18bcc: 0xe0002340, 0x18bcd: 0xe0002337, 0x18bce: 0xe0002346, 0x18bcf: 0xe000234b, + 0x18bd0: 0xe000234f, 0x18bd1: 0xe0002353, 0x18bd2: 0xf0001c1c, 0x18bd3: 0xe000235e, + 0x18bd4: 0xe0002358, 0x18bd5: 0xf0001c1c, 0x18bd6: 0xe0002363, 0x18bd7: 0xe000236d, + 0x18bd8: 0xf0000203, 0x18bd9: 0xf0000203, 0x18bda: 0xf0000203, 0x18bdb: 0xf0000203, + 0x18bdc: 0xf0000203, 0x18bdd: 0xf0000203, 0x18bde: 0xf0000203, 0x18bdf: 0xf0000203, + 0x18be0: 0xf0000203, 0x18be1: 0xf0000203, 0x18be2: 0xe000b47c, 0x18be3: 0xe000b488, + 0x18be4: 0xe000b494, 0x18be5: 0xe000b4a0, 0x18be6: 0xe000b4a8, 0x18be7: 0xe000b4b0, + 0x18be8: 0xe000b4b8, 0x18be9: 0xe000b4c0, 0x18bea: 0xe000b4c8, 0x18beb: 0xe000b4d0, + 0x18bec: 0xe000b4d8, 0x18bed: 0xe000b4e0, 0x18bee: 0xe000b4e8, 0x18bef: 0xe000b4f0, + 0x18bf0: 0xe000b4f8, 0x18bf1: 0xe0000c1e, 0x18bf2: 0xf0001c1c, 0x18bf3: 0xf0001d1d, + 0x18bf4: 0xe0000a31, 0x18bf5: 0xf0001d1c, 0x18bf6: 0xf0001c1c, 0x18bf7: 0xf0001c1c, + 0x18bf8: 0xe0000ac2, 0x18bf9: 0xe0000ac6, 0x18bfa: 0xf0001d1d, 0x18bfb: 0xf0000203, + 0x18bfc: 0xf0000203, 0x18bfd: 0xf0000203, 0x18bfe: 0xf0000203, 0x18bff: 0xe000b5b2, + // Block 0x630, offset 0x18c00 + 0x18c00: 0xf0001d1c, 0x18c01: 0xf0001d1d, 0x18c02: 0xe00009b7, 0x18c03: 0xf0001c1d, + 0x18c04: 0xf0001c1c, 0x18c05: 0xf0001c1c, 0x18c06: 0xe0000a66, 0x18c07: 0xe0000a7a, + 0x18c08: 0xf0001d1c, 0x18c09: 0xf0001c1d, 0x18c0a: 0xf0001c1c, 0x18c0b: 0xf0001d1d, + 0x18c0c: 0xf0001c1c, 0x18c0d: 0xf0001d1d, 0x18c0e: 0xf0001d1d, 0x18c0f: 0xf0001c1c, + 0x18c10: 0xf0001c1c, 0x18c11: 0xf0001c1c, 0x18c12: 0xe0000d0d, 0x18c13: 0xf0001c1c, + 0x18c14: 0xf0001c1c, 0x18c15: 0xe0000d3a, 0x18c16: 0xe0000d46, 0x18c17: 0xf0001d1d, + 0x18c18: 0xe0000eb0, 0x18c19: 0xe0000eb8, 0x18c1a: 0xf0001d1d, 0x18c1b: 0xf0001c1c, + 0x18c1c: 0xf0001c1d, 0x18c1d: 0xf0001c1d, 0x18c1e: 0xe00010b2, 0x18c1f: 0xe00009c8, + 0x18c20: 0xf0000203, 0x18c21: 0xf0000203, 0x18c22: 0xf0000203, 0x18c23: 0xf0000203, + 0x18c24: 0xf0000203, 0x18c25: 0xf0000203, 0x18c26: 0xf0000203, 0x18c27: 0xf0000203, + 0x18c28: 0xf0000203, 0x18c29: 0xe000b480, 0x18c2a: 0xe000b48c, 0x18c2b: 0xe000b498, + 0x18c2c: 0xe000b4a4, 0x18c2d: 0xe000b4ac, 0x18c2e: 0xe000b4b4, 0x18c2f: 0xe000b4bc, + 0x18c30: 0xe000b4c4, 0x18c31: 0xe000b4cc, 0x18c32: 0xe000b4d4, 0x18c33: 0xe000b4dc, + 0x18c34: 0xe000b4e4, 0x18c35: 0xe000b4ec, 0x18c36: 0xe000b4f4, 0x18c37: 0xe000b4fc, + 0x18c38: 0xe000b500, 0x18c39: 0xe000b504, 0x18c3a: 0xe000b508, 0x18c3b: 0xe000b50c, + 0x18c3c: 0xe000b510, 0x18c3d: 0xe000b514, 0x18c3e: 0xe000b518, 0x18c3f: 0xe0000bdf, + // Block 0x631, offset 0x18c40 + 0x18c40: 0x6cbf9220, 0x18c41: 0x6ce52c20, + 0x18c44: 0x6c7ae020, 0x18c45: 0x6cf41220, 0x18c46: 0x6d1ac620, + 0x18c4c: 0x6d144820, + 0x18c56: 0x6d006c20, + 0x18c5c: 0x6c1d9020, + 0x18c61: 0x6caae820, + 0x18c64: 0x6c27da20, + 0x18c68: 0x6d067820, 0x18c69: 0x6d03c420, 0x18c6b: 0x6d044c20, + 0x18c6c: 0x6c8e4020, 0x18c6d: 0x6c8c1820, 0x18c6e: 0x6cfd7e20, 0x18c6f: 0x6d1dbe20, + 0x18c70: 0x6d030e20, 0x18c71: 0x6d31ac20, 0x18c72: 0x6c272020, 0x18c73: 0x6cf49420, + 0x18c74: 0x6cac3820, 0x18c77: 0x6c968e20, + 0x18c78: 0x6cba3c20, 0x18c79: 0x6d165420, 0x18c7a: 0x6d1a2020, 0x18c7b: 0x6ca58220, + 0x18c7c: 0x6c1a7e20, 0x18c7d: 0x6c3c1020, + // Block 0x632, offset 0x18c80 + 0x18c81: 0x6d3cec20, 0x18c82: 0x6c39ba20, 0x18c83: 0x6c029620, + 0x18c84: 0x6cf41c20, 0x18c85: 0x6d427220, 0x18c87: 0x6d38f620, + 0x18c88: 0x6c304e20, 0x18c89: 0x6cda7e20, 0x18c8a: 0x6d16a020, 0x18c8b: 0x6cbefc20, + 0x18c8c: 0x6c7b8220, 0x18c8d: 0x6c831e20, 0x18c8e: 0x6ca4da20, 0x18c8f: 0x6d3aa820, + 0x18c90: 0x6cd4a220, + 0x18c94: 0x6d062820, 0x18c97: 0x6ccfb620, + 0x18c98: 0x6c6bc820, 0x18c99: 0x6c2e6620, 0x18c9a: 0x6caab620, 0x18c9b: 0x6cda8420, + 0x18c9c: 0x6d16d820, 0x18c9d: 0x6c905020, 0x18c9e: 0x6d1d3220, 0x18c9f: 0x6c081020, + 0x18ca3: 0x6c7f9220, + 0x18ca4: 0x6c9e7220, 0x18ca5: 0x6d171820, 0x18ca6: 0x6c85be20, 0x18ca7: 0x6c61c020, + 0x18ca8: 0x6d223420, 0x18ca9: 0x6c953c20, 0x18caa: 0x6c147420, + 0x18cae: 0x6c5ce420, 0x18caf: 0x6d063820, + 0x18cb0: 0x6c5bb220, 0x18cb1: 0x6cc53820, 0x18cb3: 0x6d392620, + 0x18cb5: 0x6c4ebe20, 0x18cb6: 0x6cf88220, 0x18cb7: 0x6cdf7420, + 0x18cb8: 0x6d10f020, 0x18cb9: 0x6c5bba20, 0x18cba: 0x6c75b820, 0x18cbb: 0x6c96c020, + 0x18cbc: 0x6c94ac20, 0x18cbd: 0x6ce0fa20, 0x18cbe: 0x6d110220, 0x18cbf: 0x6d2fba20, + // Block 0x633, offset 0x18cc0 + 0x18cc0: 0x6d2cf420, 0x18cc1: 0x6d226420, 0x18cc2: 0x6d3d7620, 0x18cc3: 0x6c37d620, + 0x18cc4: 0x6cc4cc20, 0x18cc5: 0x6cb70820, 0x18cc6: 0x6c1c3e20, 0x18cc7: 0x6cf45620, + 0x18cc8: 0x6c4eda20, 0x18cc9: 0x6ce17820, 0x18cca: 0x6ccb3220, + 0x18ccc: 0x6cbf4820, 0x18ccd: 0x6c824020, 0x18cce: 0x6cc97c20, + 0x18cd1: 0x6c7cda20, 0x18cd2: 0x6cb44620, 0x18cd3: 0x6cde8a20, + 0x18cd4: 0x6cd53020, 0x18cd5: 0x6d0f6820, 0x18cd6: 0x6cab8a20, 0x18cd7: 0x6cdf3620, + 0x18cd9: 0x6c9dd220, 0x18cda: 0x6d1b7820, 0x18cdb: 0x6c2e3a20, + 0x18cdc: 0x6d228820, 0x18cdd: 0x6c9eec20, 0x18cde: 0x6c75ee20, 0x18cdf: 0x6ca7b820, + 0x18ce0: 0x6d023a20, 0x18ce1: 0x6d1f8820, + 0x18ce4: 0x6c185420, 0x18ce5: 0x6c3c7620, 0x18ce6: 0x6c82f820, 0x18ce7: 0x6c874020, + 0x18ce9: 0x6c95d420, 0x18ceb: 0x6c617420, + 0x18cf0: 0x6cc2b020, 0x18cf2: 0x6c110220, 0x18cf3: 0x6c898420, + 0x18cf4: 0x6c475620, 0x18cf5: 0x6c994020, 0x18cf7: 0x6c489020, + 0x18cf8: 0x6cdc2820, 0x18cfb: 0x6c996a20, + 0x18cfc: 0x6c976220, 0x18cfd: 0x6cc29820, 0x18cfe: 0x6cd39420, 0x18cff: 0x6c84b620, + // Block 0x634, offset 0x18d00 + 0x18d01: 0x6cedee20, 0x18d02: 0x6c79d820, 0x18d03: 0x6c325420, + 0x18d04: 0x6d325a20, 0x18d05: 0x6ce62020, + 0x18d08: 0x6c0e0620, 0x18d09: 0x6c5d9e20, 0x18d0a: 0x6c305420, 0x18d0b: 0x6c460e20, + 0x18d0c: 0x6c195220, 0x18d0e: 0x6cbd2020, 0x18d0f: 0x6c6f0020, + 0x18d10: 0x6c922620, 0x18d11: 0x6d042020, 0x18d13: 0x6ca3f820, + 0x18d14: 0x6d01a220, 0x18d16: 0x6c09be20, 0x18d17: 0x6c6b0420, + 0x18d18: 0x6cda9c20, 0x18d1a: 0x6c455220, + 0x18d1c: 0x6d200620, 0x18d1d: 0x6d03b620, 0x18d1e: 0x6cb83c20, 0x18d1f: 0x6cafae20, + 0x18d20: 0x6c2d3620, 0x18d21: 0x6c3f3c20, 0x18d22: 0x6c95de20, 0x18d23: 0x6cb84220, + 0x18d24: 0x6cb84420, 0x18d25: 0x6ce0ba20, 0x18d26: 0x6c03fa20, 0x18d27: 0x6c418420, + 0x18d28: 0x6c222420, 0x18d29: 0x6d077e20, 0x18d2a: 0x6c80f620, + 0x18d2d: 0x6ccf0c20, 0x18d2f: 0x6c83a820, + 0x18d30: 0x6c578820, 0x18d31: 0x6ce7ea20, 0x18d32: 0x6cb0f020, 0x18d33: 0x6c2b2420, + 0x18d34: 0x6cc85e20, 0x18d35: 0x6c360820, 0x18d36: 0x6cbcb020, 0x18d37: 0x6d178c20, + 0x18d38: 0x6d3d0020, 0x18d39: 0x6cc8cc20, 0x18d3a: 0x6c649420, + 0x18d3c: 0x6c1c2e20, 0x18d3d: 0x6c1d1820, 0x18d3e: 0x6cf66220, + // Block 0x635, offset 0x18d40 + 0x18d40: 0x6c94b420, 0x18d41: 0x6c2aa020, 0x18d42: 0x6c8bbe20, 0x18d43: 0x6c747020, + 0x18d44: 0x6cdae020, 0x18d45: 0x6cfffa20, 0x18d46: 0x6d299020, + 0x18d49: 0x6d3a7620, 0x18d4a: 0x6d2e0e20, 0x18d4b: 0x6c64f020, + 0x18d4c: 0x6d408c20, 0x18d4d: 0x6c1fa020, 0x18d4e: 0x6d022a20, 0x18d4f: 0x6c869820, + 0x18d51: 0x6c1c8e20, 0x18d52: 0x6cf7b820, 0x18d53: 0x6c656020, + 0x18d55: 0x6c5fc020, 0x18d57: 0x6c3a7c20, + 0x18d58: 0x6c1f0620, 0x18d59: 0x6c07d420, 0x18d5a: 0x6c6a7820, + 0x18d5c: 0x6c036c20, 0x18d5d: 0x6c898a20, 0x18d5e: 0x6c7b1e20, + 0x18d60: 0x6cf95e20, 0x18d61: 0x6c0ca420, 0x18d62: 0x6c747420, 0x18d63: 0x6c825c20, + 0x18d64: 0x6d035020, 0x18d65: 0x6c045820, 0x18d66: 0x6d103220, 0x18d67: 0x6c940a20, + 0x18d68: 0x6c070a20, 0x18d69: 0x6c362420, 0x18d6a: 0x6c91c220, + 0x18d6d: 0x6c181220, 0x18d6e: 0x6caad020, 0x18d6f: 0x6d07fe20, + 0x18d70: 0x6c525220, 0x18d71: 0x6d224420, 0x18d73: 0x6c4b0620, + 0x18d74: 0x6d17dc20, 0x18d75: 0x6d085020, 0x18d76: 0x6c462c20, 0x18d77: 0x6c910020, + 0x18d78: 0x6ce2f020, 0x18d79: 0x6c820420, 0x18d7a: 0x6cd2f820, + 0x18d7c: 0x6cdcee20, 0x18d7d: 0x6d11ec20, 0x18d7e: 0x6cfa6820, 0x18d7f: 0x6d408420, + // Block 0x636, offset 0x18d80 + 0x18d81: 0x6cc3a220, 0x18d82: 0x6d1a2220, 0x18d83: 0x6cf56420, + 0x18d84: 0x6d34d420, 0x18d85: 0x6c639620, 0x18d86: 0x6c564e20, 0x18d87: 0x6c7e3620, + 0x18d88: 0x6d15c620, 0x18d89: 0x6c788020, 0x18d8a: 0x6c3d4620, 0x18d8b: 0x6cbd6020, + 0x18d8c: 0x6c009220, 0x18d8e: 0x6c78ac20, 0x18d8f: 0x6c1e8820, + 0x18d90: 0x6d014620, 0x18d91: 0x6c1e9a20, 0x18d92: 0x6ceeac20, + 0x18d95: 0x6c58ea20, 0x18d96: 0x6cda8a20, 0x18d97: 0x6d203a20, + 0x18d99: 0x6c75e020, 0x18d9a: 0x6d2f7e20, 0x18d9b: 0x6d066620, + 0x18d9c: 0x6cd2ac20, 0x18d9e: 0x6cd64220, 0x18d9f: 0x6c7cea20, + 0x18da0: 0x6cd6a220, 0x18da1: 0x6c515420, 0x18da2: 0x6c414e20, 0x18da3: 0x6d0d3020, + 0x18da4: 0x6cbfec20, 0x18da5: 0x6ccf9820, 0x18da6: 0x6c577a20, 0x18da7: 0x6cf56820, + 0x18da8: 0x6c391820, 0x18da9: 0x6cad2420, 0x18daa: 0x6c281e20, 0x18dab: 0x6c39bc20, + 0x18dac: 0x6c455c20, 0x18dad: 0x6c022620, 0x18dae: 0x6c3f3020, 0x18daf: 0x6ca54420, + 0x18db0: 0x6d093a20, 0x18db1: 0x6d1ee420, 0x18db2: 0x6c572620, + 0x18db4: 0x6c189620, 0x18db5: 0x6c4c5420, 0x18db6: 0x6ca2c820, 0x18db7: 0x6c577e20, + 0x18db8: 0x6c858820, 0x18db9: 0x6c37fa20, 0x18dba: 0x6cfe8020, 0x18dbb: 0x6cb3ea20, + 0x18dbd: 0x6cd88820, + // Block 0x637, offset 0x18dc0 + 0x18dc0: 0x6c821c20, 0x18dc1: 0x6c8c4820, 0x18dc2: 0x6d16dc20, 0x18dc3: 0x6c544c20, + 0x18dc5: 0x6d068c20, 0x18dc6: 0x6cc17620, 0x18dc7: 0x6c373a20, + 0x18dca: 0x6d09e220, + 0x18dcf: 0x6ca80020, + 0x18dd0: 0x6cef9a20, 0x18dd1: 0x6d017820, 0x18dd2: 0x6ce31420, 0x18dd3: 0x6c532620, + 0x18dd4: 0x6cea7820, 0x18dd5: 0x6ca80220, 0x18dd6: 0x6ca80420, 0x18dd7: 0x6d1a4020, + 0x18dd8: 0x6d313420, + 0x18dde: 0x6cec5020, 0x18ddf: 0x6cd45a20, + 0x18de0: 0x6caaea20, 0x18de1: 0x6d12e420, 0x18de2: 0x6cb5b620, 0x18de3: 0x6ce82620, + 0x18de4: 0x6c4df820, 0x18de5: 0x6c75ac20, 0x18de6: 0x6c302c20, 0x18de7: 0x6c5cba20, + 0x18de8: 0x6c923220, 0x18de9: 0x6c707a20, 0x18dea: 0x6c5db820, 0x18deb: 0x6c8cdc20, + 0x18ded: 0x6ce4e420, 0x18dee: 0x6c94e820, + 0x18df5: 0x6c43e220, 0x18df6: 0x6d0c0620, 0x18df7: 0x6cd26420, + 0x18df8: 0x6d090c20, 0x18df9: 0x6cae3020, 0x18dfa: 0x6c217820, 0x18dfb: 0x6ca96c20, + 0x18dfc: 0x6c348a20, 0x18dfd: 0x6d2aca20, 0x18dfe: 0x6c362820, 0x18dff: 0x6d00a820, + // Block 0x638, offset 0x18e00 + 0x18e00: 0x6d1ea020, 0x18e01: 0x6c362a20, 0x18e02: 0x6cd13420, 0x18e03: 0x6cf1dc20, + 0x18e04: 0x6c7a3e20, 0x18e05: 0x6c555020, 0x18e06: 0x6c43e620, 0x18e07: 0x6cf9c020, + 0x18e08: 0x6c97dc20, 0x18e09: 0x6c94a820, 0x18e0a: 0x6c602a20, 0x18e0b: 0x6c53f620, + 0x18e0c: 0x6d361620, 0x18e0f: 0x6cec5420, + 0x18e11: 0x6c046820, 0x18e12: 0x6c00a020, 0x18e13: 0x6d3c6220, + 0x18e14: 0x6cb8ec20, 0x18e15: 0x6c46ac20, 0x18e16: 0x6c289220, 0x18e17: 0x6c06a820, + 0x18e18: 0x6c0f0e20, 0x18e19: 0x6c1e6020, 0x18e1a: 0x6c862820, 0x18e1b: 0x6cfff620, + 0x18e1c: 0x6d054020, + 0x18e22: 0x6c537020, 0x18e23: 0x6ce40620, + 0x18e24: 0x6c244220, 0x18e25: 0x6c7e0a20, 0x18e26: 0x6c816020, 0x18e27: 0x6d367820, + 0x18e28: 0x6d004e20, 0x18e29: 0x6cf66620, 0x18e2b: 0x6cbcce20, + 0x18e2c: 0x6d2be820, 0x18e2d: 0x6cf66820, + 0x18e30: 0x6c23a220, 0x18e31: 0x6c607a20, 0x18e32: 0x6c5dec20, 0x18e33: 0x6cde1220, + 0x18e34: 0x6d0cbe20, 0x18e35: 0x6d072420, 0x18e36: 0x6cb31c20, 0x18e37: 0x6cc9dc20, + 0x18e3b: 0x6c4c3a20, + 0x18e3c: 0x6d133620, 0x18e3d: 0x6cfdfe20, 0x18e3e: 0x6d08e620, 0x18e3f: 0x6c516c20, + // Block 0x639, offset 0x18e40 + 0x18e40: 0x6d42aa20, 0x18e41: 0x6d188020, 0x18e42: 0x6c226620, + 0x18e44: 0x6c837020, 0x18e45: 0x6cfba620, 0x18e46: 0x6cdf5620, 0x18e47: 0x6cc6bc20, + 0x18e48: 0x6d18be20, 0x18e49: 0x6d372220, 0x18e4a: 0x6cf6fe20, 0x18e4b: 0x6cfbb420, + 0x18e4c: 0x6c72aa20, 0x18e4d: 0x6c60d620, 0x18e4e: 0x6c4e6820, + 0x18e50: 0x6cad9e20, 0x18e51: 0x6c86e620, 0x18e53: 0x6c7fe020, + 0x18e54: 0x6cc9e020, 0x18e55: 0x6c4e7020, 0x18e56: 0x6d0cfe20, 0x18e57: 0x6cc16020, + 0x18e59: 0x6d0d1620, 0x18e5a: 0x6c4e7420, 0x18e5b: 0x6c76ba20, + 0x18e5c: 0x6c1bce20, 0x18e5d: 0x6ca7e820, 0x18e5e: 0x6c5d9620, + 0x18e60: 0x6c092820, 0x18e61: 0x6cf98a20, 0x18e62: 0x6cf24820, 0x18e63: 0x6d080420, + 0x18e64: 0x6cec9420, 0x18e65: 0x6d1f8a20, 0x18e66: 0x6cbd4c20, 0x18e67: 0x6d066c20, + 0x18e68: 0x6ca7f020, 0x18e69: 0x6c091620, 0x18e6a: 0x6c501020, 0x18e6b: 0x6c6e0820, + 0x18e6c: 0x6c02bc20, 0x18e6d: 0x6c02be20, + 0x18e70: 0x6d311e20, 0x18e71: 0x6cdf8a20, 0x18e72: 0x6c70f220, + 0x18e74: 0x6d427a20, 0x18e75: 0x6c106220, 0x18e76: 0x6c6a8a20, 0x18e77: 0x6c009020, + 0x18e78: 0x6d29fc20, 0x18e79: 0x6c222620, 0x18e7a: 0x6c37fc20, + 0x18e7f: 0x6ca80620, + // Block 0x63a, offset 0x18e80 + 0x18e80: 0x6c8f2a20, 0x18e81: 0x6c99e220, 0x18e82: 0x6c334420, 0x18e83: 0x6c052020, + 0x18e84: 0x6c095a20, 0x18e85: 0x6c05ee20, 0x18e87: 0x6c1f2c20, + 0x18e88: 0x6cfa3620, 0x18e89: 0x6ce4e820, 0x18e8a: 0x6c16a220, + 0x18e8d: 0x6c342420, 0x18e8e: 0x6cee7e20, 0x18e8f: 0x6c3fea20, + 0x18e90: 0x6c348c20, 0x18e91: 0x6d225420, 0x18e92: 0x6d12ac20, 0x18e93: 0x6c7c7620, + 0x18e94: 0x6cefb620, 0x18e95: 0x6c7b2220, 0x18e97: 0x6cee8020, + 0x18e98: 0x6d10a420, 0x18e99: 0x6c903420, 0x18e9a: 0x6d037a20, 0x18e9b: 0x6d3b7c20, + 0x18e9c: 0x6c1b3020, 0x18e9d: 0x6d00b420, 0x18e9e: 0x6ca83a20, 0x18e9f: 0x6c810020, + 0x18ea0: 0x6d13fe20, 0x18ea1: 0x6d3f9e20, 0x18ea2: 0x6c976a20, 0x18ea3: 0x6d2f3820, + 0x18ea4: 0x6cfa4220, 0x18ea5: 0x6c4bfe20, 0x18ea6: 0x6d00c820, + 0x18ea8: 0x6c625c20, 0x18ea9: 0x6c8a0220, 0x18eaa: 0x6d184820, 0x18eab: 0x6c607c20, + 0x18eac: 0x6d1a8e20, 0x18eae: 0x6c266020, 0x18eaf: 0x6d184a20, + 0x18eb0: 0x6d020a20, 0x18eb1: 0x6c506220, 0x18eb2: 0x6d1e5c20, 0x18eb3: 0x6c76ea20, + 0x18eb4: 0x6c163220, 0x18eb5: 0x6cdf3e20, 0x18eb6: 0x6ce13020, 0x18eb7: 0x6d34a220, + 0x18eb8: 0x6c066e20, 0x18eb9: 0x6c9b5220, 0x18eba: 0x6c7ca220, 0x18ebb: 0x6c153620, + 0x18ebc: 0x6c82e020, 0x18ebe: 0x6cf91220, + // Block 0x63b, offset 0x18ec0 + 0x18ec0: 0x6cf72820, 0x18ec1: 0x6cbc7220, 0x18ec2: 0x6ca47e20, 0x18ec3: 0x6d274e20, + 0x18ec5: 0x6c8f7220, 0x18ec6: 0x6c3fbe20, 0x18ec7: 0x6d3f7220, + 0x18ec9: 0x6c475e20, 0x18eca: 0x6c762820, 0x18ecb: 0x6c2dd420, + 0x18ecc: 0x6c57aa20, 0x18ecd: 0x6c7ce020, 0x18ecf: 0x6c42fc20, + 0x18ed0: 0x6ce26020, 0x18ed2: 0x6ccd2a20, 0x18ed3: 0x6c7f3a20, + 0x18ed4: 0x6ca7f420, 0x18ed5: 0x6c3de220, 0x18ed6: 0x6c42fe20, 0x18ed7: 0x6cbc8420, + 0x18ed8: 0x6c04e420, 0x18ed9: 0x6c632620, 0x18eda: 0x6c796a20, 0x18edb: 0x6cf85620, + 0x18edc: 0x6d230820, 0x18edd: 0x6d3c5a20, 0x18ede: 0x6cd05820, 0x18edf: 0x6c21ba20, + 0x18ee0: 0x6cfed420, 0x18ee1: 0x6c615220, 0x18ee2: 0x6caa3820, 0x18ee3: 0x6cff6a20, + 0x18ee4: 0x6d165a20, 0x18ee5: 0x6d20a820, 0x18ee6: 0x6d145420, 0x18ee7: 0x6d0d3620, + 0x18ee8: 0x6cd04020, 0x18ee9: 0x6cc4aa20, 0x18eea: 0x6c501220, 0x18eeb: 0x6cc96620, + 0x18eec: 0x6c755820, 0x18eed: 0x6d1ee820, 0x18eef: 0x6d02fc20, + 0x18ef0: 0x6cadae20, 0x18ef1: 0x6cbfa020, 0x18ef2: 0x6c14b820, + 0x18ef4: 0x6c106420, 0x18ef5: 0x6c2fdc20, 0x18ef6: 0x6cd88a20, 0x18ef7: 0x6c378620, + 0x18ef9: 0x6c992820, 0x18efa: 0x6d281820, 0x18efb: 0x6c5e8a20, + 0x18efd: 0x6cbc1e20, 0x18efe: 0x6d045820, 0x18eff: 0x6cad4a20, + // Block 0x63c, offset 0x18f00 + 0x18f00: 0x6c1e7420, 0x18f01: 0x6cae5220, 0x18f02: 0x6caad620, 0x18f03: 0x6c6a8c20, + 0x18f04: 0x6d13d420, 0x18f05: 0x6c37c220, 0x18f06: 0x6c34d420, + 0x18f0a: 0x6c347c20, + 0x18f0d: 0x6cbca420, 0x18f0e: 0x6c938220, 0x18f0f: 0x6cc02620, + 0x18f10: 0x6cda1020, 0x18f11: 0x6c11f020, 0x18f12: 0x6c310020, 0x18f13: 0x6cf5b820, + 0x18f14: 0x6c3c2e20, 0x18f15: 0x6d172220, 0x18f16: 0x6cdd0e20, 0x18f17: 0x6cbc7a20, + 0x18f18: 0x6cb37620, 0x18f19: 0x6d02c020, 0x18f1a: 0x6ce7b020, 0x18f1b: 0x6d032820, + 0x18f1c: 0x6d1f1220, 0x18f1d: 0x6c06fe20, 0x18f1e: 0x6c905820, + 0x18f23: 0x6d279820, + 0x18f24: 0x6c83ac20, 0x18f25: 0x6cde4420, 0x18f26: 0x6c802620, 0x18f27: 0x6c97b820, + 0x18f28: 0x6cbb3a20, 0x18f29: 0x6d38d220, 0x18f2a: 0x6d0e5c20, 0x18f2b: 0x6cf5de20, + 0x18f2c: 0x6c923620, 0x18f2d: 0x6cf5e020, 0x18f2e: 0x6ccae220, 0x18f2f: 0x6c395220, + 0x18f31: 0x6cefb820, 0x18f32: 0x6c383a20, 0x18f33: 0x6d179020, + 0x18f34: 0x6ca4f420, 0x18f35: 0x6c196c20, 0x18f36: 0x6ce09820, 0x18f37: 0x6c5ec620, + 0x18f38: 0x6cd5d020, 0x18f39: 0x6cb10e20, 0x18f3a: 0x6c012e20, 0x18f3b: 0x6c7ac420, + 0x18f3c: 0x6c139820, 0x18f3e: 0x6cfb5a20, 0x18f3f: 0x6d361c20, + // Block 0x63d, offset 0x18f40 + 0x18f42: 0x6c3c4820, 0x18f43: 0x6c88f420, + 0x18f44: 0x6d0a0a20, 0x18f45: 0x6d06ee20, 0x18f46: 0x6c9d5020, 0x18f47: 0x6c5bd620, + 0x18f48: 0x6ca29220, 0x18f49: 0x6d1d8c20, 0x18f4a: 0x6d2df420, 0x18f4b: 0x6d17de20, + 0x18f4c: 0x6caa1e20, 0x18f4d: 0x6ce10020, 0x18f4e: 0x6cf63e20, 0x18f4f: 0x6d27ac20, + 0x18f50: 0x6cd5e220, 0x18f51: 0x6c3e9420, 0x18f52: 0x6d17e020, 0x18f53: 0x6c26b020, + 0x18f55: 0x6c881e20, 0x18f56: 0x6c127a20, 0x18f57: 0x6c116e20, + 0x18f58: 0x6c725e20, 0x18f59: 0x6c927a20, 0x18f5a: 0x6cdae220, 0x18f5b: 0x6ca59a20, + 0x18f5c: 0x6c02dc20, 0x18f5d: 0x6c018c20, 0x18f5e: 0x6cba6420, + 0x18f60: 0x6c24d420, 0x18f61: 0x6c232420, 0x18f63: 0x6cc48220, + 0x18f64: 0x6ca73220, 0x18f65: 0x6c96fe20, 0x18f66: 0x6d030220, 0x18f67: 0x6d26e020, + 0x18f68: 0x6ca38220, 0x18f69: 0x6c02ee20, 0x18f6a: 0x6cd01620, 0x18f6b: 0x6c96dc20, + 0x18f6e: 0x6c807a20, 0x18f6f: 0x6cf6e620, + 0x18f70: 0x6d26f820, 0x18f71: 0x6d372620, 0x18f72: 0x6cf26420, 0x18f73: 0x6c57f620, + 0x18f74: 0x6c9c1820, 0x18f75: 0x6ca7bc20, 0x18f76: 0x6ced6620, 0x18f77: 0x6c9c9c20, + 0x18f78: 0x6ca89e20, 0x18f79: 0x6cc1f820, 0x18f7a: 0x6d29b820, 0x18f7b: 0x6c893e20, + 0x18f7c: 0x6d34c620, 0x18f7d: 0x6d3eda20, 0x18f7e: 0x6c4d1a20, 0x18f7f: 0x6d066e20, + // Block 0x63e, offset 0x18f80 + 0x18f80: 0x6c501820, 0x18f81: 0x6d078020, 0x18f82: 0x6d35b020, 0x18f83: 0x6c9e1220, + 0x18f84: 0x6c214820, 0x18f85: 0x6c46b020, 0x18f87: 0x6c216020, + 0x18f88: 0x6c946a20, 0x18f89: 0x6d3a9820, 0x18f8a: 0x6cd43820, 0x18f8b: 0x6c8a5e20, + 0x18f8c: 0x6c6fcc20, 0x18f8d: 0x6d014020, 0x18f8e: 0x6c2f9220, 0x18f8f: 0x6c6bae20, + 0x18f90: 0x6cc65220, 0x18f91: 0x6c982e20, 0x18f93: 0x6c788a20, + 0x18f94: 0x6d119620, 0x18f95: 0x6ca8fc20, 0x18f96: 0x6d148e20, 0x18f97: 0x6c80a620, + 0x18f98: 0x6d1df020, 0x18f99: 0x6d1a4420, 0x18f9a: 0x6d0c7e20, 0x18f9b: 0x6cda9e20, + 0x18f9d: 0x6c8baa20, 0x18f9e: 0x6d0aec20, 0x18f9f: 0x6c98d820, + 0x18fa0: 0x6c9ff420, 0x18fa1: 0x6d41aa20, 0x18fa2: 0x6d225620, 0x18fa3: 0x6d179220, + 0x18fa4: 0x6c46b220, 0x18fa5: 0x6c9cfa20, 0x18fa6: 0x6c75c820, 0x18fa7: 0x6cf1e420, + 0x18fa9: 0x6c773a20, 0x18faa: 0x6c2d7020, 0x18fab: 0x6c8f9820, + 0x18fad: 0x6d040620, 0x18fae: 0x6c255420, 0x18faf: 0x6cbbec20, + 0x18fb0: 0x6c9dde20, 0x18fb1: 0x6c9c1c20, 0x18fb2: 0x6cbdf420, + 0x18fb4: 0x6cecc220, 0x18fb5: 0x6c2a5e20, 0x18fb6: 0x6c009420, + 0x18fb8: 0x6c0b8c20, 0x18fb9: 0x6ca9fe20, 0x18fba: 0x6c882020, 0x18fbb: 0x6c6caa20, + 0x18fbc: 0x6d207020, 0x18fbd: 0x6c20bc20, 0x18fbe: 0x6d426420, 0x18fbf: 0x6c0fe020, + // Block 0x63f, offset 0x18fc0 + 0x18fc0: 0x6c5a9020, 0x18fc1: 0x6d11f020, 0x18fc2: 0x6ce9e020, 0x18fc3: 0x6c61e220, + 0x18fc4: 0x6c012420, 0x18fc5: 0x6c95fa20, 0x18fc6: 0x6c613220, 0x18fc7: 0x6cefba20, + 0x18fc8: 0x6c0e7420, 0x18fc9: 0x6d289020, 0x18fca: 0x6d06f020, 0x18fcb: 0x6ca71220, + 0x18fcc: 0x6d281420, 0x18fce: 0x6c039820, 0x18fcf: 0x6d301a20, + 0x18fd0: 0x6c705420, 0x18fd1: 0x6cef9020, 0x18fd2: 0x6d016e20, 0x18fd3: 0x6cb75420, + 0x18fd4: 0x6d149020, 0x18fd5: 0x6d017020, 0x18fd6: 0x6c222a20, 0x18fd7: 0x6cc02820, + 0x18fd8: 0x6c316a20, 0x18fd9: 0x6ca7d420, 0x18fda: 0x6cb78a20, 0x18fdb: 0x6c613c20, + 0x18fdc: 0x6ce99420, 0x18fde: 0x6cd94c20, 0x18fdf: 0x6c2d7420, + 0x18fe0: 0x6c816820, 0x18fe1: 0x6d2e2c20, + 0x18fe4: 0x6d1a1c20, 0x18fe5: 0x6c132620, 0x18fe6: 0x6c611220, 0x18fe7: 0x6c5b8620, + 0x18fe8: 0x6d3ede20, 0x18fe9: 0x6c7f8820, 0x18fea: 0x6ca49020, 0x18feb: 0x6c71f020, + 0x18fec: 0x6cbdfc20, 0x18fed: 0x6c272620, 0x18fef: 0x6c6a6020, + 0x18ff0: 0x6d062620, 0x18ff1: 0x6c22fa20, 0x18ff2: 0x6d1e6e20, 0x18ff3: 0x6c30d820, + 0x18ff4: 0x6c1afe20, 0x18ff6: 0x6c9f9020, 0x18ff7: 0x6c59a820, + 0x18ff8: 0x6cdc2020, 0x18ff9: 0x6c785620, 0x18ffa: 0x6d40aa20, 0x18ffb: 0x6c501a20, + 0x18ffc: 0x6c19ba20, 0x18ffd: 0x6d094220, 0x18ffe: 0x6ca5bc20, 0x18fff: 0x6c1bec20, + // Block 0x640, offset 0x19000 + 0x19000: 0x6c87f020, 0x19001: 0x6c01a020, 0x19002: 0x6ca22a20, 0x19003: 0x6cd7ca20, + 0x19004: 0x6cfdb220, 0x19005: 0x6d0f9020, 0x19006: 0x6c572c20, 0x19007: 0x6c261620, + 0x19008: 0x6cc02a20, 0x19009: 0x6c814c20, 0x1900a: 0x6c3e2e20, 0x1900b: 0x6c334620, + 0x1900c: 0x6c984c20, 0x1900d: 0x6c80a820, 0x1900e: 0x6ceb7220, 0x1900f: 0x6c4df220, + 0x19010: 0x6c988820, 0x19011: 0x6c0ed220, 0x19012: 0x6cc43220, 0x19013: 0x6cb59e20, + 0x19014: 0x6c4df420, 0x19016: 0x6c905c20, + 0x19018: 0x6ce57e20, 0x19019: 0x6d2aba20, 0x1901a: 0x6cb5ba20, 0x1901b: 0x6d298a20, + 0x1901c: 0x6c9c4620, 0x1901d: 0x6cadd220, 0x1901e: 0x6d2e5620, 0x1901f: 0x6cfe2c20, + 0x19020: 0x6c429c20, 0x19022: 0x6cb5bc20, + 0x19024: 0x6c923820, 0x19026: 0x6d283020, 0x19027: 0x6c362e20, + 0x19028: 0x6c329a20, 0x19029: 0x6c9f5020, 0x1902a: 0x6cee8420, 0x1902b: 0x6cc2ec20, + 0x1902c: 0x6cda1c20, 0x1902d: 0x6c9f5220, 0x1902e: 0x6ce85e20, + 0x19030: 0x6ca03620, 0x19031: 0x6d11b420, 0x19032: 0x6c746220, 0x19033: 0x6c862c20, + 0x19034: 0x6c7b2620, 0x19035: 0x6c42a420, 0x19036: 0x6d257e20, 0x19037: 0x6c26fa20, + 0x19039: 0x6c816220, 0x1903a: 0x6c909c20, 0x1903b: 0x6cba6620, + 0x1903c: 0x6c025c20, 0x1903d: 0x6c0c7620, 0x1903e: 0x6d1d9a20, 0x1903f: 0x6c989820, + // Block 0x641, offset 0x19040 + 0x19040: 0x6c29e020, 0x19042: 0x6c025e20, + 0x19044: 0x6cf78e20, 0x19045: 0x6c3ed420, 0x19046: 0x6c27f820, 0x19047: 0x6c701420, + 0x19048: 0x6cc90220, 0x19049: 0x6ce77a20, 0x1904a: 0x6cc13220, 0x1904b: 0x6c368220, + 0x1904c: 0x6cb51a20, 0x1904d: 0x6c607e20, 0x1904e: 0x6c608020, 0x1904f: 0x6c574c20, + 0x19050: 0x6c69b820, 0x19051: 0x6d41cc20, 0x19052: 0x6c0c7a20, 0x19053: 0x6c9b4620, + 0x19054: 0x6c045620, 0x19055: 0x6cf01420, 0x19056: 0x6d160e20, 0x19057: 0x6c02f020, + 0x19058: 0x6d229e20, 0x19059: 0x6c4ff020, 0x1905a: 0x6c336620, 0x1905b: 0x6cf31a20, + 0x1905c: 0x6ca6d620, 0x1905d: 0x6c249e20, 0x1905f: 0x6c846e20, + 0x19060: 0x6c916c20, 0x19061: 0x6ca7be20, 0x19062: 0x6c57f820, 0x19063: 0x6c86f020, + 0x19065: 0x6c941c20, 0x19066: 0x6c3c7e20, 0x19067: 0x6c9d0c20, + 0x19068: 0x6d249e20, 0x1906a: 0x6c71e620, + 0x1906d: 0x6d2dec20, 0x1906e: 0x6cae8220, 0x1906f: 0x6d15b220, + 0x19071: 0x6c61e420, 0x19072: 0x6c08ae20, + 0x19074: 0x6cc5b420, 0x19075: 0x6c597220, 0x19076: 0x6c388020, 0x19077: 0x6c43c220, + 0x19078: 0x6c7a8020, 0x19079: 0x6c6bb420, 0x1907a: 0x6ccbc220, + 0x1907c: 0x6cd7c220, 0x1907d: 0x6ce71620, 0x1907e: 0x6d24c820, 0x1907f: 0x6d3e0420, + // Block 0x642, offset 0x19080 + 0x19080: 0x6c092c20, 0x19081: 0x6c7ad820, 0x19082: 0x6c859e20, 0x19083: 0x6c598220, + 0x19084: 0x6d09e620, 0x19085: 0x6caad820, 0x19087: 0x6d303820, + 0x19088: 0x6cf20220, 0x19089: 0x6cfb4420, 0x1908a: 0x6cb85a20, 0x1908b: 0x6d127a20, + 0x1908c: 0x6c996c20, 0x1908f: 0x6cd5d420, + 0x19091: 0x6cbb7a20, 0x19092: 0x6d3cd220, 0x19093: 0x6c7d6020, + 0x19094: 0x6cf4ea20, 0x19095: 0x6d1bb820, 0x19096: 0x6c207220, 0x19097: 0x6ce33e20, + 0x19098: 0x6c880e20, 0x19099: 0x6c087820, 0x1909a: 0x6c464e20, 0x1909b: 0x6c986820, + 0x1909c: 0x6d01d020, 0x1909d: 0x6c3cec20, 0x1909e: 0x6c909e20, 0x1909f: 0x6d2a1820, + 0x190a0: 0x6d335e20, 0x190a1: 0x6c1ea220, 0x190a2: 0x6c980020, 0x190a3: 0x6c8faa20, + 0x190a5: 0x6d1b8620, 0x190a6: 0x6cb1f020, 0x190a7: 0x6d337020, + 0x190a8: 0x6c653020, 0x190a9: 0x6c945420, 0x190aa: 0x6ca7e420, 0x190ab: 0x6d179a20, + 0x190ad: 0x6c623420, 0x190ae: 0x6c60a420, 0x190af: 0x6d2d1a20, + 0x190b0: 0x6d221a20, 0x190b1: 0x6c6fa620, 0x190b2: 0x6c585620, 0x190b3: 0x6d34e220, + 0x190b4: 0x6c7e3c20, 0x190b5: 0x6c8ca820, 0x190b6: 0x6d34f020, 0x190b7: 0x6c079420, + 0x190b8: 0x6d2cae20, 0x190b9: 0x6c705820, 0x190ba: 0x6c286620, 0x190bb: 0x6c8a9020, + 0x190bc: 0x6d16e820, 0x190bd: 0x6d2fa020, 0x190be: 0x6cfc8e20, 0x190bf: 0x6c1bf820, + // Block 0x643, offset 0x190c0 + 0x190c0: 0x6c22ba20, 0x190c1: 0x6c1b8420, 0x190c2: 0x6d0d5420, 0x190c3: 0x6c80aa20, + 0x190c4: 0x6c310220, 0x190c5: 0x6c905e20, 0x190c6: 0x6c14ec20, + 0x190c8: 0x6ce9a020, 0x190c9: 0x6c13da20, 0x190ca: 0x6c006620, 0x190cb: 0x6c1b9c20, + 0x190cd: 0x6d1cec20, 0x190ce: 0x6d305a20, 0x190cf: 0x6ce7ee20, + 0x190d1: 0x6ce9a620, 0x190d2: 0x6c13f420, 0x190d3: 0x6d11be20, + 0x190d4: 0x6d3ffe20, 0x190d6: 0x6cac4020, 0x190d7: 0x6cbc5620, + 0x190d8: 0x6c883220, 0x190d9: 0x6cbd9c20, 0x190da: 0x6c91d820, 0x190db: 0x6d0eb820, + 0x190dc: 0x6c778e20, 0x190dd: 0x6cda5e20, 0x190de: 0x6d192820, 0x190df: 0x6c14b420, + 0x190e0: 0x6c6ef620, 0x190e1: 0x6c67b020, 0x190e3: 0x6c6ea820, + 0x190e5: 0x6c305c20, 0x190e7: 0x6c733620, + 0x190e8: 0x6c4e8420, 0x190e9: 0x6c2c1020, + 0x190ec: 0x6c52f620, 0x190ee: 0x6c1b0820, 0x190ef: 0x6c2dae20, + 0x190f0: 0x6c093020, 0x190f2: 0x6d0a6e20, 0x190f3: 0x6c913e20, + 0x190f5: 0x6d007e20, 0x190f6: 0x6c094420, + 0x190f8: 0x6c095c20, 0x190fa: 0x6cfb4620, 0x190fb: 0x6cc8c820, + 0x190fc: 0x6c0d1420, 0x190fd: 0x6c379620, 0x190fe: 0x6c736220, + // Block 0x644, offset 0x19100 + 0x19100: 0x6d324820, 0x19101: 0x6c072e20, 0x19102: 0x6c365620, 0x19103: 0x6d227a20, + 0x19104: 0x6cc1b220, 0x19105: 0x6d299420, 0x19106: 0x6c9ca820, 0x19107: 0x6d16b220, + 0x19108: 0x6cd8e620, + 0x1910c: 0x6ccd6e20, 0x1910d: 0x6cdf1620, 0x1910e: 0x6ca28220, 0x1910f: 0x6c6e8220, + 0x19110: 0x6c0b9620, 0x19111: 0x6cc68e20, 0x19112: 0x6c136e20, 0x19113: 0x6c120220, + 0x19114: 0x6c2f4820, + 0x19119: 0x6c2b5620, 0x1911a: 0x6ce7ac20, 0x1911b: 0x6cde3220, + 0x1911c: 0x6d03ce20, 0x1911d: 0x6cd90a20, 0x1911e: 0x6c343e20, 0x1911f: 0x6cf85e20, + 0x19120: 0x6ce1b220, 0x19122: 0x6ce31620, 0x19123: 0x6ccd7820, + 0x19124: 0x6c667620, 0x19125: 0x6d35da20, 0x19126: 0x6cee7220, 0x19127: 0x6d1b4620, + 0x1912a: 0x6c58d620, 0x1912b: 0x6d37f220, + 0x1912c: 0x6cb78c20, 0x1912d: 0x6d3f8820, 0x1912f: 0x6d01c220, + 0x19130: 0x6d01d220, 0x19131: 0x6d2ade20, 0x19132: 0x6cef1e20, + 0x19135: 0x6cde9820, 0x19136: 0x6d2d9820, 0x19137: 0x6ca95820, + 0x1913b: 0x6d166620, + 0x1913c: 0x6cc58420, 0x1913d: 0x6cd59620, 0x1913e: 0x6c142a20, 0x1913f: 0x6d3d1e20, + // Block 0x645, offset 0x19140 + 0x19141: 0x6c9e0620, 0x19142: 0x6c5fdc20, 0x19143: 0x6c39a420, + 0x19144: 0x6cadfe20, 0x19145: 0x6c008e20, 0x19146: 0x6c392020, 0x19147: 0x6c029a20, + 0x19148: 0x6cbe0220, 0x19149: 0x6cb82220, 0x1914a: 0x6cffd020, 0x1914b: 0x6c3b1020, + 0x1914c: 0x6c417420, 0x1914d: 0x6cbb6620, 0x1914e: 0x6c437a20, 0x1914f: 0x6ce71c20, + 0x19150: 0x6c14ba20, 0x19151: 0x6d201620, 0x19152: 0x6c42b420, 0x19153: 0x6c07a820, + 0x19154: 0x6c3fb420, 0x19155: 0x6c1f0c20, 0x19156: 0x6d3aac20, + 0x19158: 0x6d390020, 0x1915a: 0x6c4f6220, 0x1915b: 0x6ca8e420, + 0x1915c: 0x6c73f820, 0x1915d: 0x6c1cb020, 0x1915e: 0x6c143820, 0x1915f: 0x6c799c20, + 0x19160: 0x6c8ae820, 0x19161: 0x6c85a020, 0x19162: 0x6d22e020, + 0x19164: 0x6d20d620, 0x19165: 0x6c4d5820, 0x19166: 0x6c85a220, 0x19167: 0x6c53ee20, + 0x19168: 0x6c45d820, 0x19169: 0x6c789820, 0x1916a: 0x6d260c20, 0x1916b: 0x6c2a6220, + 0x1916c: 0x6c5b9a20, 0x1916e: 0x6c4a2220, 0x1916f: 0x6c6f0620, + 0x19170: 0x6d429a20, 0x19171: 0x6c3fce20, 0x19172: 0x6cbcb220, 0x19173: 0x6c06c820, + 0x19174: 0x6c180a20, 0x19175: 0x6c223e20, 0x19176: 0x6c985020, 0x19177: 0x6c4d9820, + 0x19178: 0x6cf86a20, 0x19179: 0x6cc02e20, 0x1917a: 0x6c5a4620, + 0x1917d: 0x6c1d9620, 0x1917e: 0x6cca4c20, 0x1917f: 0x6d0bf420, + // Block 0x646, offset 0x19180 + 0x19180: 0x6d345620, 0x19181: 0x6c2a6c20, 0x19182: 0x6ce27420, 0x19183: 0x6c9aec20, + 0x19184: 0x6c8ce220, 0x19185: 0x6cd45e20, 0x19186: 0x6ce9fa20, 0x19187: 0x6c119220, + 0x19188: 0x6c2ea020, 0x19189: 0x6c181420, 0x1918a: 0x6cae9c20, 0x1918b: 0x6d13f020, + 0x1918c: 0x6c711220, 0x1918d: 0x6c61e820, 0x1918e: 0x6c7f0620, 0x1918f: 0x6ce4ea20, + 0x19190: 0x6d261a20, 0x19192: 0x6c112820, 0x19193: 0x6cb4e420, + 0x19194: 0x6d230e20, 0x19195: 0x6c880220, 0x19196: 0x6c231420, + 0x1919a: 0x6d212020, 0x1919b: 0x6c603220, + 0x1919c: 0x6cf09420, 0x1919d: 0x6c9cf020, 0x1919e: 0x6cdc3e20, 0x1919f: 0x6d00aa20, + 0x191a0: 0x6d059620, 0x191a1: 0x6c1c1c20, 0x191a2: 0x6cc06020, 0x191a3: 0x6c5bde20, + 0x191a5: 0x6d212220, 0x191a6: 0x6cbcc620, 0x191a7: 0x6cd74e20, + 0x191a8: 0x6cd72620, 0x191a9: 0x6c349020, 0x191aa: 0x6c908820, + 0x191ac: 0x6cad0620, 0x191ad: 0x6cdf7820, 0x191ae: 0x6d393020, 0x191af: 0x6d1af420, + 0x191b0: 0x6ccab420, 0x191b1: 0x6c3a5a20, 0x191b2: 0x6c187620, 0x191b3: 0x6d258020, + 0x191b4: 0x6d151620, 0x191b5: 0x6c5d2a20, 0x191b6: 0x6ccb3420, 0x191b7: 0x6d131020, + 0x191b8: 0x6c9fbc20, 0x191b9: 0x6c3bbe20, 0x191ba: 0x6c513620, + 0x191bc: 0x6d1b6420, 0x191bd: 0x6c130220, 0x191be: 0x6ca6b620, 0x191bf: 0x6c02e820, + // Block 0x647, offset 0x191c0 + 0x191c0: 0x6c3cb420, 0x191c1: 0x6c883420, 0x191c2: 0x6c16be20, 0x191c3: 0x6c15c820, + 0x191c4: 0x6c967020, 0x191c5: 0x6c2e5a20, 0x191c6: 0x6c54e620, 0x191c7: 0x6c928020, + 0x191c9: 0x6d184c20, 0x191ca: 0x6c574e20, 0x191cb: 0x6d2bf220, + 0x191cc: 0x6c550020, 0x191cd: 0x6c368420, 0x191ce: 0x6c5dee20, 0x191cf: 0x6cdcf820, + 0x191d0: 0x6ca6bc20, 0x191d1: 0x6cfcf620, 0x191d2: 0x6c842620, 0x191d3: 0x6cfcf820, + 0x191d4: 0x6d0eba20, 0x191d5: 0x6c8fa420, 0x191d6: 0x6c9af620, 0x191d7: 0x6c6c5c20, + 0x191d8: 0x6c5f5020, 0x191da: 0x6c0b5a20, 0x191db: 0x6d22a420, + 0x191dc: 0x6c5e0620, 0x191dd: 0x6c9ea420, 0x191de: 0x6c1df220, 0x191df: 0x6c970620, + 0x191e1: 0x6c822c20, 0x191e2: 0x6c6b5620, 0x191e3: 0x6cf10a20, + 0x191e4: 0x6d192a20, 0x191e5: 0x6d07e020, 0x191e6: 0x6cf91420, 0x191e7: 0x6c11e220, + 0x191e8: 0x6c7fe420, 0x191e9: 0x6d1b2220, 0x191ea: 0x6d027220, 0x191eb: 0x6d28a620, + 0x191ec: 0x6c95d220, 0x191ed: 0x6c8dd220, 0x191ee: 0x6cb97020, 0x191ef: 0x6c5d9a20, + 0x191f0: 0x6c646a20, 0x191f1: 0x6cf2a820, + 0x191f4: 0x6c43d420, 0x191f5: 0x6d399020, 0x191f6: 0x6c2e8220, 0x191f7: 0x6d1e2c20, + 0x191f8: 0x6c614220, 0x191f9: 0x6d0fc020, 0x191fa: 0x6cc82220, 0x191fb: 0x6cf79a20, + 0x191fc: 0x6cd6f020, 0x191fd: 0x6d240820, 0x191fe: 0x6d146020, 0x191ff: 0x6cb9f220, + // Block 0x648, offset 0x19200 + 0x19200: 0x6c5fde20, 0x19201: 0x6cc26420, 0x19202: 0x6ce48a20, 0x19203: 0x6cd42820, + 0x19204: 0x6cb9ee20, 0x19205: 0x6ca26020, 0x19206: 0x6c6c2620, 0x19207: 0x6c992420, + 0x19208: 0x6d1ac820, 0x19209: 0x6c412a20, 0x1920a: 0x6cb2ee20, 0x1920b: 0x6d084020, + 0x1920c: 0x6c994220, 0x1920d: 0x6c39c020, 0x1920e: 0x6d0b1020, 0x1920f: 0x6c425420, + 0x19210: 0x6cd95020, 0x19211: 0x6c5a8a20, 0x19212: 0x6d22d620, 0x19213: 0x6c484820, + 0x19214: 0x6c48e820, 0x19215: 0x6c8ef820, 0x19216: 0x6c35de20, 0x19217: 0x6d3eec20, + 0x19218: 0x6d3f3220, 0x19219: 0x6c093820, 0x1921a: 0x6cec1620, + 0x1921c: 0x6c8acc20, 0x1921f: 0x6c7af620, + 0x19221: 0x6c4d5a20, 0x19222: 0x6d19b020, 0x19223: 0x6d398820, + 0x19224: 0x6c1d4820, 0x19225: 0x6cfbea20, 0x19226: 0x6d087420, + 0x19228: 0x6cc01420, 0x19229: 0x6cae0c20, 0x1922a: 0x6c4ad620, 0x1922b: 0x6c373e20, + 0x1922c: 0x6c45dc20, 0x1922d: 0x6cbf0820, 0x1922e: 0x6c54ac20, 0x1922f: 0x6c81a620, + 0x19230: 0x6c85a420, 0x19231: 0x6c192220, 0x19232: 0x6cca1620, 0x19233: 0x6d3df420, + 0x19234: 0x6cf2ae20, 0x19235: 0x6cb3d420, 0x19236: 0x6c793020, 0x19237: 0x6cea8820, + 0x19238: 0x6cae5c20, 0x19239: 0x6ce27620, 0x1923a: 0x6cde4a20, 0x1923b: 0x6d3d4c20, + 0x1923c: 0x6c0c8e20, 0x1923d: 0x6c480e20, 0x1923e: 0x6c54be20, + // Block 0x649, offset 0x19240 + 0x19240: 0x6c0de020, 0x19241: 0x6d35de20, 0x19242: 0x6c302e20, 0x19243: 0x6c332220, + 0x19244: 0x6d387220, 0x19245: 0x6ca58a20, 0x19246: 0x6c8c1c20, 0x19247: 0x6cb32a20, + 0x19248: 0x6c613420, 0x19249: 0x6c9f5420, 0x1924a: 0x6cefc220, 0x1924b: 0x6c17ea20, + 0x1924c: 0x6c46b620, 0x1924d: 0x6c053220, 0x1924e: 0x6cc7aa20, 0x1924f: 0x6cdfa820, + 0x19250: 0x6c103a20, 0x19251: 0x6d3f8c20, 0x19252: 0x6c7c3c20, 0x19253: 0x6c815820, + 0x19254: 0x6c4ec220, 0x19255: 0x6d1c7020, 0x19256: 0x6d362620, 0x19257: 0x6c6ac620, + 0x19258: 0x6d040220, 0x19259: 0x6d00b820, 0x1925a: 0x6d0a1620, 0x1925b: 0x6ccd4620, + 0x1925c: 0x6cb9a620, 0x1925d: 0x6d004620, 0x1925e: 0x6cdacc20, 0x1925f: 0x6c4d1820, + 0x19260: 0x6c9d5820, 0x19261: 0x6c5cee20, 0x19262: 0x6caf7220, + 0x19264: 0x6c5be020, 0x19265: 0x6ca34c20, 0x19266: 0x6cd96220, 0x19267: 0x6c07bc20, + 0x19268: 0x6c1d7220, 0x19269: 0x6c6ae220, 0x1926a: 0x6c5a6e20, 0x1926b: 0x6c802c20, + 0x1926d: 0x6c56b420, 0x1926e: 0x6c30b620, 0x1926f: 0x6c5de420, + 0x19270: 0x6c4bd420, 0x19271: 0x6d111c20, 0x19272: 0x6c130420, 0x19273: 0x6c4b1220, + 0x19274: 0x6c66a620, 0x19275: 0x6c65c020, 0x19276: 0x6c29e620, 0x19277: 0x6c6d2420, + 0x19278: 0x6c96cc20, 0x19279: 0x6c5bf820, 0x1927a: 0x6c9e3420, 0x1927b: 0x6c11a820, + 0x1927c: 0x6c94ba20, 0x1927d: 0x6cb0aa20, 0x1927e: 0x6d105a20, 0x1927f: 0x6c726420, + // Block 0x64a, offset 0x19280 + 0x19280: 0x6c726620, 0x19281: 0x6cc3dc20, 0x19283: 0x6cb91220, + 0x19284: 0x6ccc8e20, 0x19286: 0x6c701820, 0x19287: 0x6c5df020, + 0x19288: 0x6d27fa20, 0x19289: 0x6c26b820, 0x1928a: 0x6d07ba20, 0x1928b: 0x6cff0420, + 0x1928c: 0x6c3ac620, 0x1928d: 0x6c131020, 0x1928e: 0x6d132420, + 0x19290: 0x6c2a9820, 0x19292: 0x6cbda020, 0x19293: 0x6c5b6a20, + 0x19294: 0x6cea6c20, 0x19296: 0x6cbb2420, 0x19297: 0x6cf7a020, + 0x19298: 0x6ca64a20, 0x19299: 0x6cc9ce20, 0x1929a: 0x6c9b5620, 0x1929b: 0x6ce95e20, + 0x1929c: 0x6c804220, 0x1929d: 0x6c4ff220, 0x1929e: 0x6c22e620, 0x1929f: 0x6d2d4e20, + 0x192a0: 0x6c023220, 0x192a1: 0x6c95c420, 0x192a2: 0x6c9efa20, + 0x192a4: 0x6c3daa20, 0x192a6: 0x6d010c20, 0x192a7: 0x6c0f8c20, + 0x192a8: 0x6c5c6820, 0x192a9: 0x6cbeb820, 0x192aa: 0x6d010e20, + 0x192ad: 0x6c0fa220, 0x192ae: 0x6cb9dc20, 0x192af: 0x6cb34020, + 0x192b0: 0x6c696820, 0x192b1: 0x6c750a20, 0x192b2: 0x6c7dc620, 0x192b3: 0x6cd97a20, + 0x192b4: 0x6c718e20, 0x192b5: 0x6c36f020, 0x192b6: 0x6ca8c020, 0x192b7: 0x6cb95a20, + 0x192b8: 0x6c2f1a20, 0x192b9: 0x6c2f1c20, 0x192bb: 0x6cb4da20, + 0x192bc: 0x6d33c220, 0x192bd: 0x6cb5c620, 0x192be: 0x6d3c8620, 0x192bf: 0x6c7a1c20, + // Block 0x64b, offset 0x192c0 + 0x192c0: 0x6d20b420, 0x192c1: 0x6cbd5820, 0x192c2: 0x6c7a2620, 0x192c3: 0x6c50d420, + 0x192c4: 0x6c3e0a20, 0x192c6: 0x6c2be220, 0x192c7: 0x6cfca620, + 0x192c8: 0x6c4b3c20, 0x192c9: 0x6c50ee20, 0x192ca: 0x6cc44620, 0x192cb: 0x6c4eaa20, + 0x192cc: 0x6ce7b420, 0x192cd: 0x6c0ee620, 0x192ce: 0x6ccd3e20, 0x192cf: 0x6c08de20, + 0x192d0: 0x6c924e20, 0x192d1: 0x6d12f020, 0x192d2: 0x6ca5e220, 0x192d3: 0x6c1fba20, + 0x192d4: 0x6cca5020, 0x192d5: 0x6c2e2820, 0x192d6: 0x6c925020, 0x192d7: 0x6ce81220, + 0x192d8: 0x6c88bc20, 0x192d9: 0x6c786620, 0x192da: 0x6cca5220, 0x192db: 0x6d31e420, + 0x192dc: 0x6c1fc020, 0x192dd: 0x6c890220, 0x192de: 0x6c998c20, + 0x192e0: 0x6cb90620, 0x192e1: 0x6c769220, 0x192e2: 0x6cceb620, 0x192e3: 0x6cfeea20, + 0x192e4: 0x6c0a2020, 0x192e5: 0x6d2bf420, 0x192e6: 0x6d1b7220, 0x192e7: 0x6cf6bc20, + 0x192e8: 0x6ccdaa20, 0x192e9: 0x6cdb1220, 0x192ea: 0x6cc98e20, 0x192eb: 0x6cc8e820, + 0x192ec: 0x6c219c20, 0x192ed: 0x6c917c20, 0x192ee: 0x6c8d9820, 0x192ef: 0x6c13c620, + 0x192f1: 0x6c593020, + 0x192f4: 0x6c63a220, 0x192f5: 0x6c04ee20, 0x192f6: 0x6c553220, 0x192f7: 0x6c30ec20, + 0x192f9: 0x6c90f020, 0x192fa: 0x6c70d220, 0x192fb: 0x6c73a620, + 0x192fc: 0x6c785c20, 0x192fd: 0x6cdd5220, 0x192fe: 0x6c95f020, 0x192ff: 0x6d303c20, + // Block 0x64c, offset 0x19300 + 0x19300: 0x6c2f7220, 0x19301: 0x6c32d220, 0x19302: 0x6d3b1c20, 0x19303: 0x6d0d3a20, + 0x19304: 0x6cacf420, 0x19305: 0x6c13d820, + 0x1930a: 0x6d15e620, + 0x1930d: 0x6d1f3420, 0x1930e: 0x6c5ae620, 0x1930f: 0x6d11c820, + 0x19310: 0x6d118020, 0x19311: 0x6d34d620, 0x19312: 0x6c45d220, 0x19313: 0x6cb6d420, + 0x19314: 0x6c44ac20, 0x19317: 0x6c545c20, + 0x19318: 0x6c9d2420, 0x19319: 0x6c3df020, 0x1931a: 0x6c54a020, 0x1931b: 0x6c4a1a20, + 0x1931c: 0x6ce05620, 0x1931d: 0x6c2b1a20, 0x1931f: 0x6d0c7220, + 0x19322: 0x6cc26620, + 0x19324: 0x6c16e420, 0x19325: 0x6ca02e20, 0x19326: 0x6ce1bc20, 0x19327: 0x6c063c20, + 0x19328: 0x6c011e20, 0x1932b: 0x6cfbf620, + 0x1932f: 0x6c996e20, + 0x19330: 0x6c811c20, 0x19331: 0x6ca42220, 0x19332: 0x6c070c20, 0x19333: 0x6c18be20, + 0x19335: 0x6c3a0420, 0x19336: 0x6d38e620, 0x19337: 0x6c5ece20, + 0x19338: 0x6c6a1420, 0x19339: 0x6cd5d620, 0x1933b: 0x6c7dd220, + 0x1933c: 0x6c2ea620, 0x1933d: 0x6c925220, + // Block 0x64d, offset 0x19340 + 0x19342: 0x6d215020, 0x19343: 0x6cdf2620, + 0x19344: 0x6c162e20, 0x19345: 0x6c97de20, 0x19346: 0x6c9fb820, 0x19347: 0x6c593220, + 0x19348: 0x6cf15420, 0x19349: 0x6caa9220, 0x1934a: 0x6c593420, 0x1934b: 0x6c540a20, + 0x1934c: 0x6c6e8e20, 0x1934d: 0x6c0f2620, 0x1934e: 0x6cfc2020, 0x1934f: 0x6c864820, + 0x19350: 0x6c6d2620, 0x19352: 0x6c989c20, 0x19353: 0x6cb1ba20, + 0x19354: 0x6c4fde20, 0x19355: 0x6d0fd620, 0x19357: 0x6cfd0a20, + 0x19358: 0x6cdb1420, 0x19359: 0x6cf01620, 0x1935a: 0x6c183c20, 0x1935b: 0x6cf6be20, + 0x1935c: 0x6c6d4c20, 0x1935d: 0x6c135a20, 0x1935e: 0x6c51e420, 0x1935f: 0x6c3b4020, + 0x19360: 0x6ccca620, 0x19361: 0x6c8d6a20, 0x19363: 0x6c337220, + 0x19364: 0x6cb54220, 0x19365: 0x6cb4b820, 0x19366: 0x6d26fa20, 0x19367: 0x6c0f8e20, + 0x19369: 0x6c5c7820, 0x1936a: 0x6c2f0220, 0x1936b: 0x6d0ef620, + 0x1936c: 0x6c72d020, 0x1936d: 0x6c69e020, 0x1936e: 0x6ca44c20, 0x1936f: 0x6c8b8620, + 0x19370: 0x6d20aa20, 0x19371: 0x6ce41c20, 0x19372: 0x6ce47620, 0x19373: 0x6cf42a20, + 0x19374: 0x6c53a220, 0x19375: 0x6cff7220, 0x19376: 0x6c503620, + 0x19378: 0x6ce55c20, 0x19379: 0x6d32ca20, 0x1937b: 0x6c59a020, + 0x1937c: 0x6c403420, 0x1937f: 0x6cea2c20, + // Block 0x64e, offset 0x19380 + 0x19381: 0x6cc61a20, 0x19382: 0x6c68ba20, + 0x19384: 0x6d031c20, 0x19387: 0x6d260020, + 0x19388: 0x6c73ee20, 0x19389: 0x6c572820, 0x1938b: 0x6c056020, + 0x1938c: 0x6ca1c420, 0x1938e: 0x6c425e20, 0x1938f: 0x6cef9220, + 0x19391: 0x6c9a8020, 0x19392: 0x6cd89c20, 0x19393: 0x6c0b8820, + 0x19394: 0x6c914220, 0x19395: 0x6cc0e620, + 0x19398: 0x6c43da20, 0x19399: 0x6d303e20, 0x1939a: 0x6c938c20, 0x1939b: 0x6cac2020, + 0x1939c: 0x6cc66220, 0x1939d: 0x6cc03020, 0x1939e: 0x6c8aea20, 0x1939f: 0x6c45e020, + 0x193a0: 0x6cfbf820, 0x193a1: 0x6cf86e20, 0x193a2: 0x6d02c620, + 0x193a4: 0x6ca79620, + 0x193a8: 0x6d00a220, 0x193a9: 0x6c8afe20, 0x193aa: 0x6c3d6420, 0x193ab: 0x6c25d620, + 0x193ac: 0x6d3d4e20, 0x193ad: 0x6c034820, 0x193ae: 0x6d429c20, 0x193af: 0x6d305020, + 0x193b0: 0x6d416e20, 0x193b1: 0x6c510620, 0x193b2: 0x6c601a20, + 0x193b4: 0x6c648620, + 0x193b8: 0x6ce8b020, 0x193b9: 0x6cfb5c20, 0x193ba: 0x6d0d8620, 0x193bb: 0x6ce0f420, + 0x193bc: 0x6cde5620, 0x193bd: 0x6c2bf620, 0x193be: 0x6c744c20, 0x193bf: 0x6c01fc20, + // Block 0x64f, offset 0x193c0 + 0x193c0: 0x6c4e1020, 0x193c1: 0x6cff8820, 0x193c2: 0x6c712020, 0x193c3: 0x6cee8c20, + 0x193c4: 0x6c054c20, 0x193c5: 0x6d3c5e20, 0x193c6: 0x6ca82e20, 0x193c7: 0x6ce53820, + 0x193c8: 0x6ca3c020, 0x193cb: 0x6d1fd420, + 0x193cc: 0x6c9dc620, 0x193cf: 0x6ca3c820, + 0x193d0: 0x6cd13c20, 0x193d1: 0x6c13a220, 0x193d2: 0x6d0c1020, 0x193d3: 0x6c44b620, + 0x193d4: 0x6c1d5420, 0x193d5: 0x6cc86420, 0x193d6: 0x6c63ca20, 0x193d7: 0x6cbd8220, + 0x193d8: 0x6c98e620, 0x193d9: 0x6c365c20, 0x193da: 0x6c863220, 0x193db: 0x6c1b3420, + 0x193dc: 0x6d29da20, 0x193dd: 0x6c513820, 0x193de: 0x6c6ae420, 0x193df: 0x6ca72c20, + 0x193e1: 0x6c499020, 0x193e2: 0x6c540c20, 0x193e3: 0x6c414220, + 0x193e5: 0x6c07be20, 0x193e6: 0x6cdd8020, 0x193e7: 0x6cf37220, + 0x193e8: 0x6c623820, 0x193e9: 0x6cf66a20, 0x193ea: 0x6cbf4a20, 0x193eb: 0x6c515820, + 0x193ec: 0x6cf23020, 0x193ed: 0x6cfb7220, 0x193ee: 0x6c6b0820, 0x193ef: 0x6c5cf820, + 0x193f0: 0x6cb00420, 0x193f1: 0x6cd00620, 0x193f2: 0x6c1d7620, 0x193f3: 0x6d324e20, + 0x193f5: 0x6d2d8a20, 0x193f6: 0x6cd78a20, 0x193f7: 0x6c5f0420, + 0x193f8: 0x6cd99420, 0x193f9: 0x6d354220, 0x193fa: 0x6c07a220, + 0x193fe: 0x6c810e20, 0x193ff: 0x6c0a2220, + // Block 0x650, offset 0x19400 + 0x19400: 0x6d08ae20, 0x19401: 0x6cade820, 0x19402: 0x6c278a20, + 0x19404: 0x6d340e20, 0x19405: 0x6cb00e20, 0x19406: 0x6c15d420, 0x19407: 0x6c0a2420, + 0x19408: 0x6cdafa20, 0x19409: 0x6c5df220, 0x1940a: 0x6c523420, 0x1940b: 0x6c6f2a20, + 0x1940c: 0x6c200620, 0x1940d: 0x6c67b420, 0x1940e: 0x6ca5a020, 0x1940f: 0x6c47be20, + 0x19410: 0x6c39de20, 0x19413: 0x6cde9a20, + 0x19414: 0x6c256020, 0x19415: 0x6cf6c220, 0x19416: 0x6c2a8420, 0x19417: 0x6cfb9020, + 0x19418: 0x6c7b7220, 0x19419: 0x6d308a20, 0x1941a: 0x6cddfc20, 0x1941b: 0x6c55ae20, + 0x1941c: 0x6c256220, 0x1941d: 0x6c92c820, 0x1941e: 0x6c738c20, 0x1941f: 0x6c92ca20, + 0x19420: 0x6cba7220, 0x19421: 0x6cad9620, 0x19422: 0x6d326c20, + 0x19424: 0x6c867a20, 0x19425: 0x6c128e20, 0x19426: 0x6cb64a20, + 0x19429: 0x6ce41e20, 0x1942a: 0x6c8d6c20, 0x1942b: 0x6cc1d420, + 0x1942c: 0x6c88cc20, 0x1942d: 0x6c91e020, 0x1942e: 0x6cd54020, 0x1942f: 0x6c462620, + 0x19430: 0x6d309a20, 0x19431: 0x6cad3c20, 0x19432: 0x6c6d5a20, 0x19433: 0x6cbe9020, + 0x19436: 0x6d3fc420, 0x19437: 0x6cb46620, + 0x19438: 0x6c6cbc20, 0x19439: 0x6c0c8620, 0x1943a: 0x6c66ee20, 0x1943b: 0x6c4bf220, + 0x1943e: 0x6d2a3020, 0x1943f: 0x6c8b5a20, + // Block 0x651, offset 0x19440 + 0x19440: 0x6c848a20, 0x19441: 0x6c95c620, 0x19442: 0x6cd08620, 0x19443: 0x6c9de220, + 0x19444: 0x6c66fc20, 0x19445: 0x6c2bb020, 0x19446: 0x6c076a20, + 0x19448: 0x6c88d420, 0x1944a: 0x6cfbc620, 0x1944b: 0x6cb22220, + 0x1944c: 0x6cc41620, 0x1944d: 0x6c8fda20, 0x1944e: 0x6d41e020, + 0x19450: 0x6c74fe20, 0x19451: 0x6ccd2020, 0x19452: 0x6d092620, + 0x19454: 0x6d027820, 0x19456: 0x6c804e20, 0x19457: 0x6cb6aa20, + 0x19458: 0x6d159820, 0x19459: 0x6caad420, 0x1945a: 0x6c84ca20, 0x1945b: 0x6d271e20, + 0x1945d: 0x6d15be20, 0x1945e: 0x6c1a9220, 0x1945f: 0x6c619620, + 0x19460: 0x6c4f4a20, 0x19461: 0x6d015e20, 0x19462: 0x6c792a20, 0x19463: 0x6d3e1020, + 0x19464: 0x6c509220, 0x19465: 0x6cf86220, 0x19466: 0x6cc26820, 0x19467: 0x6c4d1020, + 0x19468: 0x6cf95220, 0x19469: 0x6c4d1220, 0x1946a: 0x6c4a4820, 0x1946b: 0x6c14c220, + 0x1946c: 0x6d09fa20, 0x1946d: 0x6d058220, 0x1946e: 0x6cd09c20, 0x1946f: 0x6c79e820, + 0x19470: 0x6cf96020, 0x19471: 0x6ccc4a20, 0x19472: 0x6d208a20, 0x19473: 0x6d0bae20, + 0x19474: 0x6cb3f220, 0x19475: 0x6d40bc20, 0x19476: 0x6d1fc820, 0x19477: 0x6d3f3e20, + 0x19478: 0x6c88be20, 0x19479: 0x6cfaaa20, 0x1947a: 0x6cfa3e20, 0x1947b: 0x6d15f620, + 0x1947c: 0x6ccc5820, 0x1947d: 0x6d0e8420, 0x1947e: 0x6c69a220, 0x1947f: 0x6cf66e20, + // Block 0x652, offset 0x19480 + 0x19480: 0x6c1bb620, 0x19481: 0x6cd3b220, 0x19482: 0x6c774620, 0x19483: 0x6d1afc20, + 0x19484: 0x6c522420, 0x19485: 0x6d189620, 0x19486: 0x6cf6e820, 0x19487: 0x6ccb6a20, + 0x19488: 0x6c6d5c20, 0x19489: 0x6d135e20, 0x1948a: 0x6d1ec420, 0x1948b: 0x6cc41820, + 0x1948c: 0x6d129a20, 0x1948d: 0x6c945e20, 0x1948e: 0x6c7d9c20, 0x1948f: 0x6d333820, + 0x19494: 0x6d003a20, 0x19496: 0x6c253a20, 0x19497: 0x6d04e420, + 0x19498: 0x6c01d820, 0x19499: 0x6d051e20, 0x1949a: 0x6c118820, 0x1949b: 0x6c201820, + 0x1949c: 0x6d2c1e20, 0x1949e: 0x6d16f420, 0x1949f: 0x6caf4420, + 0x194a0: 0x6c7a3020, 0x194a1: 0x6cd0fa20, 0x194a2: 0x6c80bc20, 0x194a3: 0x6ce9e420, + 0x194a4: 0x6cf61020, 0x194a5: 0x6c8d0620, 0x194a6: 0x6cb4f820, 0x194a7: 0x6cf2f020, + 0x194a8: 0x6c88fa20, 0x194a9: 0x6c319e20, 0x194aa: 0x6c9af420, 0x194ab: 0x6c807220, + 0x194ac: 0x6cefdc20, 0x194ad: 0x6c32ca20, 0x194ae: 0x6c7b2a20, 0x194af: 0x6c004c20, + 0x194b0: 0x6d291a20, 0x194b1: 0x6c5bfa20, 0x194b2: 0x6d182620, 0x194b3: 0x6ca14c20, + 0x194b4: 0x6d3f5e20, 0x194b5: 0x6c3be820, 0x194b6: 0x6caec420, + 0x194b8: 0x6c0a6c20, 0x194b9: 0x6c871e20, 0x194ba: 0x6c918220, 0x194bb: 0x6c964620, + 0x194bc: 0x6c4d0a20, 0x194bd: 0x6d31bc20, 0x194be: 0x6c40ee20, 0x194bf: 0x6cc3ac20, + // Block 0x653, offset 0x194c0 + 0x194c0: 0x6d315220, 0x194c1: 0x6c797a20, 0x194c2: 0x6c1a0420, 0x194c3: 0x6c6ffe20, + 0x194c4: 0x6c746420, 0x194c5: 0x6c623a20, 0x194c6: 0x6c8d5620, + 0x194c8: 0x6cceaa20, 0x194c9: 0x6cc40020, 0x194ca: 0x6cc8ea20, 0x194cb: 0x6c21ac20, + 0x194cc: 0x6ca5b220, 0x194cd: 0x6d339820, 0x194ce: 0x6c907a20, 0x194cf: 0x6cad3620, + 0x194d2: 0x6c063820, 0x194d3: 0x6cc66420, + 0x194d4: 0x6cfa9a20, 0x194d5: 0x6c832c20, 0x194d6: 0x6cfeb420, 0x194d7: 0x6c3d6620, + 0x194d8: 0x6cc18620, 0x194da: 0x6ccbe820, 0x194db: 0x6d352c20, + 0x194dc: 0x6cdfe020, 0x194dd: 0x6cc70e20, 0x194de: 0x6cda4a20, 0x194df: 0x6d1cf620, + 0x194e0: 0x6c98e820, 0x194e1: 0x6ca3ca20, 0x194e2: 0x6c0baa20, + 0x194e4: 0x6cd65820, 0x194e5: 0x6ce11020, 0x194e6: 0x6c4ee220, 0x194e7: 0x6ccaf620, + 0x194e8: 0x6cc69420, 0x194ea: 0x6c2aa820, 0x194eb: 0x6cb44e20, + 0x194ec: 0x6c687820, 0x194ed: 0x6ce07620, 0x194ef: 0x6cc48e20, + 0x194f0: 0x6ca92c20, 0x194f1: 0x6c8b5c20, 0x194f2: 0x6c2f2020, 0x194f3: 0x6c2e8620, + 0x194f4: 0x6d381620, 0x194f6: 0x6c93f420, 0x194f7: 0x6c28b020, + 0x194f8: 0x6cf56020, 0x194f9: 0x6c4aba20, 0x194fa: 0x6c5fbe20, 0x194fb: 0x6ca67620, + 0x194fc: 0x6d164a20, 0x194fd: 0x6ca75820, 0x194fe: 0x6d221e20, 0x194ff: 0x6cedf220, + // Block 0x654, offset 0x19500 + 0x19500: 0x6c4ce620, 0x19501: 0x6d2b3c20, 0x19502: 0x6d0c5820, 0x19503: 0x6c251a20, + 0x19504: 0x6cfb2620, 0x19505: 0x6c68be20, 0x19506: 0x6ce80620, 0x19507: 0x6c3fac20, + 0x19508: 0x6cae0020, 0x1950a: 0x6d1e9220, 0x1950b: 0x6cbfa220, + 0x1950c: 0x6d0ad620, 0x1950d: 0x6c107220, 0x1950e: 0x6c0b7c20, 0x1950f: 0x6cd31c20, + 0x19510: 0x6d2c2220, 0x19511: 0x6d16c020, 0x19512: 0x6c0b7e20, + 0x19514: 0x6c333820, 0x19515: 0x6c7f8e20, 0x19516: 0x6d13d820, 0x19517: 0x6c149220, + 0x19518: 0x6c1cb220, 0x19519: 0x6d087820, 0x1951a: 0x6d069220, 0x1951b: 0x6d20d820, + 0x1951c: 0x6d04c020, + 0x19520: 0x6cde3620, 0x19521: 0x6c4c1620, + 0x19525: 0x6c906420, 0x19526: 0x6d018220, 0x19527: 0x6c180c20, + 0x19528: 0x6c657e20, 0x19529: 0x6cdf9820, 0x1952a: 0x6cb08c20, 0x1952b: 0x6d296820, + 0x1952c: 0x6d080620, 0x1952d: 0x6cfb3c20, 0x1952e: 0x6ca7d220, + 0x19534: 0x6c9d3820, 0x19535: 0x6c61f020, 0x19536: 0x6caa1c20, 0x19537: 0x6c54c020, + 0x19538: 0x6c571020, 0x19539: 0x6cee1020, 0x1953a: 0x6d1f2a20, 0x1953b: 0x6d2ac020, + 0x1953c: 0x6c09a020, 0x1953d: 0x6c9cee20, 0x1953e: 0x6cbab020, 0x1953f: 0x6d019220, + // Block 0x655, offset 0x19540 + 0x19540: 0x6c394420, 0x19541: 0x6d176020, 0x19542: 0x6cdfa020, 0x19543: 0x6c832e20, + 0x19544: 0x6d1e2e20, 0x19546: 0x6c6d0220, 0x19547: 0x6ccf4a20, + 0x19548: 0x6d1b4820, 0x19549: 0x6c613820, 0x1954b: 0x6cdaa620, + 0x1954f: 0x6cee1c20, + 0x19550: 0x6c9e5820, 0x19551: 0x6cdab420, 0x19552: 0x6d17a620, 0x19553: 0x6ccc8820, + 0x19554: 0x6cf61420, 0x19555: 0x6c603e20, 0x19556: 0x6c960020, 0x19557: 0x6d1ea620, + 0x19558: 0x6c998220, 0x19559: 0x6d2c7c20, 0x1955a: 0x6cdc4020, 0x1955b: 0x6d362a20, + 0x1955c: 0x6c0b9c20, 0x1955d: 0x6c83d820, + 0x19565: 0x6cbc4820, 0x19566: 0x6c498e20, 0x19567: 0x6cf64a20, + 0x19568: 0x6d324a20, 0x19569: 0x6d1d9020, 0x1956a: 0x6ca84020, 0x1956b: 0x6c75ca20, + 0x1956c: 0x6d01c620, 0x1956d: 0x6d11b620, 0x1956e: 0x6d01c820, 0x1956f: 0x6d33f020, + 0x19570: 0x6ca5a820, 0x19572: 0x6cd7f420, 0x19573: 0x6c903620, + 0x19574: 0x6c18d220, 0x19575: 0x6c9d5c20, 0x19576: 0x6cc3cc20, 0x19577: 0x6c27e420, + 0x19578: 0x6ccd4820, + 0x1957c: 0x6cdae820, 0x1957d: 0x6d01da20, 0x1957e: 0x6c0f2820, 0x1957f: 0x6c2f7a20, + // Block 0x656, offset 0x19580 + 0x19580: 0x6d40ca20, 0x19582: 0x6cd5f220, 0x19583: 0x6ccf2220, + 0x19584: 0x6c4ee420, 0x19585: 0x6cdfb220, 0x19586: 0x6c431420, + 0x1958a: 0x6ca36420, 0x1958b: 0x6c9d7a20, + 0x1958c: 0x6d0a3020, 0x1958d: 0x6c9afa20, 0x1958e: 0x6c66b420, 0x1958f: 0x6c24fe20, + 0x19590: 0x6c749220, 0x19591: 0x6c51de20, 0x19592: 0x6c3ac820, 0x19593: 0x6cd28220, + 0x19594: 0x6c17f220, 0x19595: 0x6cd0c220, 0x19596: 0x6caa8a20, 0x19597: 0x6cb2c420, + 0x19598: 0x6c980220, + 0x1959d: 0x6d189a20, 0x1959e: 0x6c1dda20, + 0x195a0: 0x6c7a6220, 0x195a1: 0x6c05d420, 0x195a2: 0x6c825a20, 0x195a3: 0x6c787020, + 0x195a4: 0x6ccc7820, 0x195a5: 0x6c0a4e20, 0x195a6: 0x6cdbfc20, 0x195a7: 0x6c443420, + 0x195a8: 0x6cb0c020, 0x195a9: 0x6d189c20, 0x195aa: 0x6cfb9220, 0x195ab: 0x6ca6c820, + 0x195ac: 0x6d1c9820, 0x195ad: 0x6d3a8020, 0x195ae: 0x6c216220, 0x195af: 0x6c3cbc20, + 0x195b0: 0x6d074620, 0x195b1: 0x6cb19c20, 0x195b2: 0x6cf48020, 0x195b3: 0x6c8a2420, + 0x195b4: 0x6c124c20, 0x195b5: 0x6d409020, 0x195b6: 0x6d422a20, 0x195b7: 0x6c0bc620, + 0x195b8: 0x6d122a20, 0x195b9: 0x6c58a420, 0x195ba: 0x6cac3220, 0x195bb: 0x6d04fa20, + 0x195bd: 0x6c82ea20, 0x195be: 0x6cbee420, 0x195bf: 0x6d001220, + // Block 0x657, offset 0x195c0 + 0x195c0: 0x6c689620, 0x195c1: 0x6c4c9420, + 0x195c4: 0x6d0cf020, 0x195c5: 0x6d092420, 0x195c6: 0x6d39e220, 0x195c7: 0x6c527e20, + 0x195c8: 0x6d1cb820, 0x195c9: 0x6cf71620, + 0x195cc: 0x6c889220, 0x195cd: 0x6cfc4820, 0x195ce: 0x6c58bc20, 0x195cf: 0x6d1a1620, + 0x195d1: 0x6c892a20, 0x195d2: 0x6ccd6020, 0x195d3: 0x6c125220, + 0x195d4: 0x6c077020, 0x195d5: 0x6c662220, 0x195d6: 0x6cd63020, 0x195d7: 0x6c397a20, + 0x195d8: 0x6c2d9820, 0x195da: 0x6c03d820, 0x195db: 0x6d21fe20, + 0x195de: 0x6ca47420, 0x195df: 0x6c831420, + 0x195e0: 0x6d198220, 0x195e1: 0x6c272820, 0x195e3: 0x6c14ea20, + 0x195e4: 0x6c178e20, 0x195e5: 0x6c416a20, 0x195e6: 0x6c6cdc20, 0x195e7: 0x6ca59220, + 0x195eb: 0x6c8a6a20, + 0x195ec: 0x6ca0e620, 0x195ed: 0x6d1fb220, 0x195ef: 0x6c8f2820, + 0x195f0: 0x6c4de620, 0x195f2: 0x6d1e7420, 0x195f3: 0x6c6cf020, + 0x195f4: 0x6c1b8c20, 0x195f5: 0x6cc5dc20, 0x195f6: 0x6ca9b620, + 0x195f9: 0x6c53ba20, 0x195fa: 0x6ce53620, + 0x195fc: 0x6c002420, 0x195fd: 0x6c485620, 0x195fe: 0x6c0bf820, 0x195ff: 0x6c0eea20, + // Block 0x658, offset 0x19600 + 0x19600: 0x6cbf1420, 0x19602: 0x6cd5d820, 0x19603: 0x6c20ee20, + 0x19604: 0x6c5b5420, 0x19605: 0x6c179a20, 0x19606: 0x6c3ff220, 0x19607: 0x6c5ab620, + 0x19608: 0x6c363a20, 0x19609: 0x6cf09a20, 0x1960a: 0x6c3b7820, 0x1960b: 0x6cdfe220, + 0x1960d: 0x6c94fa20, 0x1960e: 0x6c51cc20, 0x1960f: 0x6d1e4a20, + 0x19610: 0x6c5b5a20, 0x19612: 0x6d215820, 0x19613: 0x6d3ff820, + 0x19614: 0x6d0e8a20, 0x19615: 0x6cc07420, 0x19616: 0x6d2fbc20, 0x19617: 0x6c6f1a20, + 0x19618: 0x6cdf2820, + 0x1961f: 0x6cea0820, + 0x19620: 0x6c8bc220, 0x19621: 0x6c6f2620, 0x19622: 0x6d2c8220, 0x19623: 0x6d038620, + 0x19624: 0x6c56ba20, 0x19626: 0x6d071020, + 0x1962a: 0x6c254c20, 0x1962b: 0x6cbeb020, + 0x1962c: 0x6ca14e20, 0x1962e: 0x6d2a2220, 0x1962f: 0x6c084c20, + 0x19630: 0x6c1ace20, 0x19633: 0x6d0ebc20, + 0x19634: 0x6c443620, 0x19635: 0x6ca16220, 0x19636: 0x6c075c20, 0x19637: 0x6c732820, + 0x19638: 0x6c2ee620, 0x19639: 0x6d2fe020, 0x1963b: 0x6cf3ea20, + 0x1963c: 0x6d0ebe20, 0x1963e: 0x6c74c620, 0x1963f: 0x6cfade20, + // Block 0x659, offset 0x19640 + 0x19640: 0x6cdf4a20, 0x19641: 0x6c4e6620, 0x19643: 0x6c2d2c20, + 0x19644: 0x6c62ac20, 0x19645: 0x6c6b6020, 0x19647: 0x6d414c20, + 0x19649: 0x6d025820, 0x1964a: 0x6c7f7620, 0x1964b: 0x6c38e220, + 0x1964c: 0x6c5e4020, 0x1964d: 0x6cf92820, 0x1964e: 0x6ca8b620, 0x1964f: 0x6c9cb820, + 0x19650: 0x6cc49c20, 0x19651: 0x6c24c220, 0x19652: 0x6d1a3220, 0x19653: 0x6c9d2820, + 0x19655: 0x6c747e20, 0x19656: 0x6cc0ea20, 0x19657: 0x6ce73820, + 0x19658: 0x6ced7a20, 0x19659: 0x6d2ffc20, 0x1965a: 0x6c84fe20, 0x1965b: 0x6cce9c20, + 0x1965c: 0x6c79a620, 0x1965d: 0x6cfa7e20, 0x1965e: 0x6d301e20, 0x1965f: 0x6d33c420, + 0x19660: 0x6ce5be20, 0x19661: 0x6cd4bc20, 0x19662: 0x6c073e20, 0x19663: 0x6d136220, + 0x19664: 0x6cb14c20, 0x19665: 0x6c164420, 0x19666: 0x6c563e20, 0x19667: 0x6c791620, + 0x19668: 0x6c6f4a20, 0x19669: 0x6c011620, 0x1966a: 0x6c213020, 0x1966b: 0x6cb97620, + 0x1966c: 0x6c06ea20, 0x1966d: 0x6c032620, 0x1966e: 0x6c3b6020, 0x1966f: 0x6c77d620, + 0x19670: 0x6ceafc20, 0x19671: 0x6ceafe20, 0x19672: 0x6d423020, 0x19673: 0x6c8cbc20, + 0x19675: 0x6c4aea20, 0x19676: 0x6d0be620, 0x19677: 0x6cd35420, + 0x19678: 0x6c545220, 0x19679: 0x6c8b0020, 0x1967a: 0x6ccbee20, 0x1967b: 0x6cd8b220, + 0x1967d: 0x6c071020, 0x1967e: 0x6cc5e820, 0x1967f: 0x6c319820, + // Block 0x65a, offset 0x19680 + 0x19680: 0x6c0eec20, 0x19681: 0x6c895620, 0x19682: 0x6cba0c20, 0x19683: 0x6c3aac20, + 0x19684: 0x6c624220, 0x19685: 0x6d3ffa20, 0x19686: 0x6c5ac820, 0x19687: 0x6c514020, + 0x19688: 0x6c83e420, 0x19689: 0x6d259620, 0x1968a: 0x6d26ce20, 0x1968b: 0x6d04e620, + 0x1968c: 0x6c15d620, 0x1968d: 0x6c2b8c20, 0x1968e: 0x6c825020, 0x1968f: 0x6c6cae20, + 0x19690: 0x6c1d1c20, 0x19691: 0x6cd8ec20, 0x19692: 0x6cb49a20, 0x19693: 0x6d11d420, + 0x19694: 0x6c678620, 0x19695: 0x6c583620, 0x19696: 0x6c595620, 0x19697: 0x6ce1f620, + 0x19698: 0x6cc82c20, 0x19699: 0x6cf26620, 0x1969a: 0x6d1ccc20, 0x1969b: 0x6cc53420, + 0x1969c: 0x6d1a3420, 0x1969d: 0x6cd30e20, 0x1969e: 0x6d1a2620, 0x1969f: 0x6c73e220, + 0x196a0: 0x6cea4020, 0x196a1: 0x6d080020, 0x196a2: 0x6c632e20, 0x196a3: 0x6d379e20, + 0x196a4: 0x6cbc9820, 0x196a5: 0x6d3ab220, 0x196a6: 0x6c2db020, + 0x196a8: 0x6d201820, 0x196ab: 0x6d14a420, + 0x196ac: 0x6cd2c220, 0x196ad: 0x6d16fa20, 0x196ae: 0x6ca0e820, + 0x196b1: 0x6cc3ae20, 0x196b2: 0x6cfea420, 0x196b3: 0x6cf3ba20, + 0x196b4: 0x6c44c020, 0x196b5: 0x6d1ce620, 0x196b6: 0x6ce66820, 0x196b7: 0x6cd2c620, + 0x196b8: 0x6ca5cc20, 0x196b9: 0x6c44c620, 0x196ba: 0x6cde5020, 0x196bb: 0x6cf28a20, + 0x196bc: 0x6c711820, 0x196bd: 0x6c15a820, 0x196be: 0x6cb19620, 0x196bf: 0x6d3d5420, + // Block 0x65b, offset 0x196c0 + 0x196c0: 0x6c54c420, 0x196c1: 0x6ca4fa20, 0x196c2: 0x6d0c9820, 0x196c3: 0x6c468620, + 0x196c4: 0x6d225c20, 0x196c5: 0x6c540420, 0x196c7: 0x6cd7f620, + 0x196c8: 0x6c1aba20, 0x196c9: 0x6c56a420, 0x196ca: 0x6d105220, 0x196cb: 0x6cf22e20, + 0x196cc: 0x6cfcd020, 0x196cd: 0x6cb21020, 0x196ce: 0x6cc69c20, 0x196cf: 0x6c90a820, + 0x196d0: 0x6c81b420, 0x196d1: 0x6cccfe20, 0x196d2: 0x6cfef020, 0x196d3: 0x6d2ae220, + 0x196d4: 0x6c4d7820, 0x196d5: 0x6c38b420, 0x196d6: 0x6c4e6220, 0x196d7: 0x6c14d420, + 0x196d8: 0x6d2e7620, 0x196da: 0x6cde1620, 0x196db: 0x6d3b2a20, + 0x196dc: 0x6ca9c820, 0x196dd: 0x6c4f1820, 0x196de: 0x6d21b620, 0x196df: 0x6d3db420, + 0x196e0: 0x6d205c20, 0x196e1: 0x6c86fc20, 0x196e2: 0x6c5e2a20, 0x196e3: 0x6cf73e20, + 0x196e4: 0x6cfb0020, 0x196e5: 0x6c155820, 0x196e6: 0x6c889420, + 0x196e8: 0x6cd7be20, 0x196e9: 0x6c6fce20, 0x196ea: 0x6cb42820, 0x196eb: 0x6cbffc20, + 0x196ec: 0x6c45d620, 0x196ed: 0x6d3ee820, 0x196ee: 0x6d20bc20, + 0x196f1: 0x6cc62820, 0x196f2: 0x6ca98420, 0x196f3: 0x6c99d820, + 0x196f4: 0x6c032820, 0x196f5: 0x6c6f9820, 0x196f7: 0x6d069620, + 0x196f8: 0x6cb29020, 0x196f9: 0x6c0b8a20, 0x196fa: 0x6c995420, + 0x196ff: 0x6d14ce20, + // Block 0x65c, offset 0x19700 + 0x19700: 0x6d20f620, 0x19702: 0x6cb29220, 0x19703: 0x6cc0f220, + 0x19704: 0x6c05f420, 0x19705: 0x6c5bae20, + 0x19709: 0x6c109420, 0x1970a: 0x6c985820, 0x1970b: 0x6c7e7020, + 0x1970c: 0x6ce8a820, 0x1970d: 0x6cf3c220, 0x1970e: 0x6c85ec20, 0x1970f: 0x6c8cea20, + 0x19711: 0x6c620220, 0x19712: 0x6c75bc20, 0x19713: 0x6d405620, + 0x19714: 0x6c349220, 0x19715: 0x6c745020, 0x19716: 0x6c277020, 0x19717: 0x6c073220, + 0x1971d: 0x6c7e8020, 0x1971e: 0x6c0d3e20, 0x1971f: 0x6cdbf820, + 0x19720: 0x6ce8c220, 0x19721: 0x6d08e220, + 0x19727: 0x6c350c20, + 0x1972a: 0x6cdc5420, 0x1972b: 0x6c0a2e20, + 0x1972c: 0x6ce87420, 0x1972d: 0x6ccb4a20, 0x1972e: 0x6c120020, 0x1972f: 0x6ce8e420, + 0x19730: 0x6c9e3620, 0x19731: 0x6c6c5220, 0x19732: 0x6c93b020, + 0x19735: 0x6d2e8020, 0x19736: 0x6c08f620, 0x19737: 0x6c60ac20, + 0x19738: 0x6d2b7420, 0x19739: 0x6d07d620, 0x1973a: 0x6c86a020, + 0x1973d: 0x6cdc8220, 0x1973e: 0x6d1dc220, 0x1973f: 0x6cd57620, + // Block 0x65d, offset 0x19740 + 0x19742: 0x6c358620, + 0x19747: 0x6cbf8620, + 0x19748: 0x6c958020, 0x19749: 0x6d322220, 0x1974a: 0x6cea4620, 0x1974b: 0x6c46fe20, + 0x1974c: 0x6d223c20, 0x1974d: 0x6c82be20, 0x1974e: 0x6c0eee20, 0x1974f: 0x6ca56e20, + 0x19750: 0x6cb12020, 0x19751: 0x6c890e20, 0x19752: 0x6ce17a20, 0x19753: 0x6c883820, + 0x19754: 0x6cf16220, 0x19755: 0x6c291020, 0x19756: 0x6c87be20, 0x19757: 0x6ce65e20, + 0x19758: 0x6cec1820, 0x19759: 0x6d390220, 0x1975a: 0x6c426620, 0x1975b: 0x6d03d220, + 0x1975c: 0x6c021420, 0x1975d: 0x6c393820, 0x1975e: 0x6caf0e20, 0x1975f: 0x6c0eda20, + 0x19760: 0x6ceb0620, 0x19761: 0x6cd4d020, 0x19762: 0x6d14e420, 0x19763: 0x6c0ef020, + 0x19764: 0x6cbcb820, 0x19765: 0x6ce80e20, 0x19766: 0x6c45e820, 0x19767: 0x6ce74820, + 0x19768: 0x6c4e1220, 0x19769: 0x6c1a0820, 0x1976a: 0x6c6ace20, 0x1976b: 0x6c593a20, + 0x1976c: 0x6d042c20, 0x1976d: 0x6c2d6220, 0x1976e: 0x6c146a20, 0x1976f: 0x6c308020, + 0x19770: 0x6caffc20, 0x19771: 0x6cc86a20, 0x19772: 0x6c8b2220, 0x19773: 0x6cd14020, + 0x19774: 0x6cab8420, 0x19775: 0x6c2c8020, 0x19776: 0x6d217020, 0x19777: 0x6c200220, + 0x19778: 0x6cc6a220, 0x19779: 0x6c774820, 0x1977a: 0x6ce12420, 0x1977b: 0x6c23b620, + 0x1977c: 0x6cb18220, 0x1977d: 0x6c209820, 0x1977e: 0x6c92ce20, 0x1977f: 0x6ce79020, + // Block 0x65e, offset 0x19780 + 0x19780: 0x6d336620, 0x19781: 0x6c86a420, 0x19782: 0x6cc9a020, 0x19783: 0x6cac4420, + 0x19784: 0x6cd82e20, 0x19786: 0x6c291220, 0x19787: 0x6c55de20, + 0x19788: 0x6d190c20, 0x19789: 0x6cfd3220, 0x1978a: 0x6d028020, 0x1978b: 0x6c958820, + 0x1978c: 0x6c8f5e20, 0x1978e: 0x6cdfea20, 0x1978f: 0x6c422e20, + 0x19791: 0x6ce01c20, + 0x19795: 0x6d1ef020, 0x19796: 0x6ca3e020, + 0x19798: 0x6c429a20, 0x19799: 0x6c759820, 0x1979a: 0x6c1bfe20, 0x1979b: 0x6c464020, + 0x1979c: 0x6cecfa20, 0x1979d: 0x6c85ee20, 0x1979e: 0x6c8e5420, 0x1979f: 0x6c8b0a20, + 0x197a0: 0x6cf9c420, 0x197a1: 0x6c06ac20, 0x197a2: 0x6c018a20, 0x197a3: 0x6d237220, + 0x197a4: 0x6c713220, 0x197a5: 0x6cc75820, 0x197a6: 0x6d0a3420, 0x197a7: 0x6d3e7a20, + 0x197a8: 0x6c25ee20, 0x197a9: 0x6c120620, 0x197aa: 0x6d2baa20, 0x197ab: 0x6d1dc420, + 0x197ac: 0x6c407420, 0x197ad: 0x6cc88a20, 0x197af: 0x6cf7cc20, + 0x197b0: 0x6cd5e620, 0x197b1: 0x6c68c020, 0x197b2: 0x6c68c220, 0x197b3: 0x6d057020, + 0x197b4: 0x6d2f2620, 0x197b7: 0x6cd71220, + 0x197b8: 0x6c18a820, 0x197b9: 0x6c390820, 0x197ba: 0x6c5ff820, 0x197bb: 0x6d33a820, + 0x197bd: 0x6c480420, 0x197be: 0x6cf4d620, + // Block 0x65f, offset 0x197c0 + 0x197c0: 0x6cbcae20, 0x197c1: 0x6cd5bc20, 0x197c2: 0x6c4d1420, 0x197c3: 0x6ceb0820, + 0x197c4: 0x6c319020, 0x197c5: 0x6d3f0220, 0x197c6: 0x6cc46e20, 0x197c7: 0x6ca27820, + 0x197c8: 0x6c3fd020, 0x197c9: 0x6c8cca20, 0x197ca: 0x6c601e20, 0x197cb: 0x6d04ce20, + 0x197cc: 0x6d084c20, 0x197cd: 0x6ca37820, 0x197ce: 0x6d0aee20, 0x197cf: 0x6c6be020, + 0x197d0: 0x6c85f020, 0x197d1: 0x6c269c20, 0x197d2: 0x6cc7a020, 0x197d3: 0x6d24ee20, + 0x197d4: 0x6c939c20, 0x197d5: 0x6cd06220, 0x197d6: 0x6c851820, 0x197d7: 0x6c89bc20, + 0x197d8: 0x6c450e20, 0x197d9: 0x6d033820, 0x197da: 0x6d004420, 0x197db: 0x6cbdd820, + 0x197dc: 0x6cbcc220, 0x197dd: 0x6c182020, 0x197de: 0x6d1f3c20, 0x197df: 0x6c109a20, + 0x197e0: 0x6c7bc220, 0x197e1: 0x6cc3be20, 0x197e2: 0x6c00aa20, 0x197e3: 0x6cbd3420, + 0x197e4: 0x6cbac020, 0x197e5: 0x6c1f5220, 0x197e6: 0x6cae1e20, 0x197e7: 0x6c7e0620, + 0x197e8: 0x6d13fa20, 0x197e9: 0x6c48ce20, 0x197ea: 0x6cd14220, 0x197eb: 0x6cb0fa20, + 0x197ed: 0x6d393820, 0x197ee: 0x6c59de20, 0x197ef: 0x6c5ad620, + 0x197f0: 0x6c557e20, 0x197f1: 0x6c074220, + 0x197f4: 0x6d2bec20, 0x197f5: 0x6c624620, 0x197f6: 0x6c47c220, 0x197f7: 0x6cf6a420, + 0x197f8: 0x6c431620, 0x197f9: 0x6c148620, 0x197fa: 0x6c96d620, 0x197fb: 0x6d3b2020, + 0x197fc: 0x6ce9ea20, 0x197fd: 0x6d3ca020, 0x197fe: 0x6cface20, 0x197ff: 0x6c80de20, + // Block 0x660, offset 0x19800 + 0x19803: 0x6d36e820, + 0x19804: 0x6c00cc20, 0x19805: 0x6cfc2e20, 0x19806: 0x6c4c3c20, 0x19807: 0x6cf7a220, + 0x19809: 0x6ce9f020, 0x1980a: 0x6c11de20, 0x1980b: 0x6ccb0420, + 0x1980c: 0x6cfaea20, 0x1980d: 0x6c6c0e20, 0x1980e: 0x6c3bfa20, 0x1980f: 0x6cc45a20, + 0x19811: 0x6d123a20, 0x19812: 0x6c29fa20, 0x19813: 0x6c63f420, + 0x19814: 0x6c82fc20, 0x19815: 0x6d0d0220, 0x19816: 0x6c918e20, 0x19817: 0x6ce9d620, + 0x19818: 0x6d1cd220, 0x19819: 0x6cb0de20, 0x1981a: 0x6c964a20, 0x1981b: 0x6c87a420, + 0x1981c: 0x6c0d1220, 0x1981e: 0x6c995620, 0x1981f: 0x6c040e20, + 0x19820: 0x6c5a6a20, 0x19822: 0x6d121220, 0x19823: 0x6c50a420, + 0x19824: 0x6c218420, 0x19825: 0x6c516420, 0x19826: 0x6ca95620, 0x19827: 0x6c1e0220, + 0x19828: 0x6c874620, 0x19829: 0x6ce19420, 0x1982a: 0x6c585a20, 0x1982b: 0x6c095420, + 0x1982c: 0x6c033420, 0x1982d: 0x6c181020, 0x1982e: 0x6d104620, 0x1982f: 0x6c269e20, + 0x19830: 0x6c024420, 0x19831: 0x6d091020, 0x19833: 0x6d3e5220, + 0x19834: 0x6c265a20, 0x19835: 0x6cc4ce20, 0x19836: 0x6c053820, 0x19837: 0x6c25f020, + 0x19838: 0x6ced4e20, 0x19839: 0x6cdebe20, 0x1983a: 0x6c05dc20, 0x1983b: 0x6c417a20, + 0x1983c: 0x6d0c7620, 0x1983d: 0x6cf5a620, 0x1983e: 0x6d3ad420, 0x1983f: 0x6d0b4e20, + // Block 0x661, offset 0x19840 + 0x19840: 0x6c393a20, 0x19841: 0x6d203c20, 0x19842: 0x6c012820, 0x19843: 0x6ce9a420, + 0x19844: 0x6c9b2020, 0x19845: 0x6ccf5c20, 0x19846: 0x6c6d2e20, 0x19847: 0x6c47ce20, + 0x19848: 0x6c627820, 0x19849: 0x6cbc0020, 0x1984a: 0x6c695820, 0x1984b: 0x6d0d0420, + 0x1984c: 0x6cf92e20, 0x1984d: 0x6c772020, 0x1984e: 0x6c9e0220, 0x1984f: 0x6d086a20, + 0x19850: 0x6cccc420, 0x19851: 0x6cf2d820, 0x19852: 0x6cb8b420, 0x19853: 0x6c58f620, + 0x19854: 0x6cc5d020, 0x19855: 0x6d322420, 0x19856: 0x6ce45c20, 0x19857: 0x6c740020, + 0x19858: 0x6d008620, 0x19859: 0x6cb75820, 0x1985a: 0x6c01f820, 0x1985b: 0x6c9a8220, + 0x1985c: 0x6c476820, 0x1985e: 0x6ce1b820, 0x1985f: 0x6c389220, + 0x19860: 0x6c722c20, 0x19861: 0x6c162820, 0x19862: 0x6cd74c20, 0x19863: 0x6c096820, + 0x19864: 0x6c996220, 0x19865: 0x6cd77820, 0x19866: 0x6c477220, 0x19867: 0x6c53a420, + 0x19868: 0x6c579620, 0x19869: 0x6c95fe20, 0x1986a: 0x6c4f7420, 0x1986b: 0x6c63b820, + 0x1986c: 0x6cc2e220, 0x1986d: 0x6c40f420, 0x1986e: 0x6c599020, 0x1986f: 0x6c103c20, + 0x19870: 0x6c478e20, 0x19871: 0x6c3c4e20, 0x19872: 0x6ca28820, 0x19873: 0x6c009c20, + 0x19874: 0x6d1cee20, 0x19875: 0x6cd75020, 0x19876: 0x6c89be20, 0x19877: 0x6c6ad020, + 0x19878: 0x6c1c2220, 0x19879: 0x6c6ad220, 0x1987a: 0x6c1d7020, 0x1987b: 0x6cb2e820, + 0x1987c: 0x6c186a20, 0x1987d: 0x6d0c9a20, 0x1987e: 0x6c321c20, 0x1987f: 0x6c2c5a20, + // Block 0x662, offset 0x19880 + 0x19881: 0x6c89c220, 0x19882: 0x6cfcd220, 0x19883: 0x6c0c0420, + 0x19884: 0x6d042e20, 0x19885: 0x6c9bda20, 0x19886: 0x6d130220, 0x19887: 0x6c9d5e20, + 0x19888: 0x6cb7a020, 0x19889: 0x6cb7a220, 0x1988a: 0x6cf30620, 0x1988b: 0x6d01dc20, + 0x1988c: 0x6d239820, 0x1988d: 0x6cb87020, 0x1988e: 0x6c1a2820, 0x1988f: 0x6d11c220, + 0x19890: 0x6d1bd420, 0x19891: 0x6d0fd420, 0x19892: 0x6c606820, 0x19893: 0x6d3fa220, + 0x19894: 0x6d07b220, 0x19895: 0x6c9f6e20, 0x19896: 0x6c907620, 0x19897: 0x6c766e20, + 0x19898: 0x6d11ca20, 0x19899: 0x6d0dcc20, 0x1989a: 0x6cdcfa20, 0x1989b: 0x6c4b6c20, + 0x1989c: 0x6c5a7a20, 0x1989d: 0x6d1c8e20, 0x1989e: 0x6cd14420, 0x1989f: 0x6c140220, + 0x198a0: 0x6c883c20, 0x198a2: 0x6d082420, 0x198a3: 0x6c200e20, + 0x198a4: 0x6c184220, 0x198a5: 0x6ca6ca20, 0x198a6: 0x6cc27820, 0x198a7: 0x6c9e7e20, + 0x198a8: 0x6c5dfe20, 0x198a9: 0x6d21a420, 0x198aa: 0x6d2e1620, 0x198ab: 0x6c55c820, + 0x198ac: 0x6c136020, 0x198ad: 0x6c0c2c20, 0x198ae: 0x6cb9d020, 0x198af: 0x6cf6ee20, + 0x198b0: 0x6c67c220, 0x198b1: 0x6c79c620, 0x198b2: 0x6c970220, 0x198b3: 0x6c98a220, + 0x198b4: 0x6d2e2220, 0x198b5: 0x6c0b5c20, 0x198b6: 0x6c5f6c20, 0x198b7: 0x6c74d820, + 0x198b8: 0x6ca45820, 0x198b9: 0x6c0a9020, 0x198ba: 0x6cd3f420, 0x198bb: 0x6cd7ac20, + 0x198bc: 0x6ca18820, 0x198bd: 0x6c8b6420, 0x198be: 0x6c9f0820, 0x198bf: 0x6ca19420, + // Block 0x663, offset 0x198c0 + 0x198c0: 0x6cf74820, 0x198c1: 0x6c156820, 0x198c2: 0x6cc21620, 0x198c3: 0x6c69e620, + 0x198c4: 0x6c5e5a20, 0x198c5: 0x6cfb1a20, 0x198c6: 0x6d068820, 0x198c7: 0x6ca98820, + 0x198c8: 0x6ce74020, 0x198c9: 0x6c542220, 0x198ca: 0x6d240e20, + 0x198cc: 0x6c1ce220, 0x198cd: 0x6c0fbc20, 0x198ce: 0x6d415820, 0x198cf: 0x6c2dba20, + 0x198d0: 0x6d3cfa20, 0x198d1: 0x6c5ea620, 0x198d2: 0x6cb86220, + 0x198d4: 0x6d043020, 0x198d5: 0x6c5c0020, 0x198d6: 0x6cd23420, 0x198d7: 0x6c7a1e20, + 0x198d9: 0x6c32f220, 0x198da: 0x6d10da20, 0x198db: 0x6d20da20, + 0x198dc: 0x6c056420, 0x198dd: 0x6c6a9220, 0x198de: 0x6d30e820, 0x198df: 0x6c634620, + 0x198e0: 0x6cd2c820, 0x198e1: 0x6c2bea20, 0x198e2: 0x6c302a20, 0x198e3: 0x6c223a20, + 0x198e4: 0x6c3fd220, 0x198e5: 0x6c9f4020, 0x198e6: 0x6d314020, 0x198e7: 0x6d31d020, + 0x198e9: 0x6d0e6420, 0x198ea: 0x6cbc2020, 0x198eb: 0x6c4f4e20, + 0x198ec: 0x6c45ea20, 0x198ed: 0x6cbb6e20, 0x198ee: 0x6c94a220, 0x198ef: 0x6c48f620, + 0x198f0: 0x6c7e7620, 0x198f1: 0x6cc8ce20, 0x198f2: 0x6c383420, 0x198f3: 0x6c260a20, + 0x198f4: 0x6d0c9c20, 0x198f5: 0x6c458a20, 0x198f6: 0x6c6ad420, 0x198f7: 0x6c48d020, + 0x198f8: 0x6c4c7020, 0x198f9: 0x6cdd7c20, 0x198fa: 0x6cf2ba20, 0x198fb: 0x6d335220, + 0x198fc: 0x6ca84220, 0x198fd: 0x6c2e2c20, 0x198fe: 0x6c7f3c20, 0x198ff: 0x6cde6420, + // Block 0x664, offset 0x19900 + 0x19900: 0x6c254620, 0x19901: 0x6d0af420, 0x19902: 0x6c4bd020, + 0x19905: 0x6c2b3420, 0x19907: 0x6c9dc820, + 0x19908: 0x6c6a2a20, 0x19909: 0x6c9f7020, 0x1990a: 0x6c71ca20, 0x1990b: 0x6d217420, + 0x1990c: 0x6d318020, 0x1990d: 0x6d2fc820, 0x1990e: 0x6d2cd220, 0x1990f: 0x6d038820, + 0x19911: 0x6c049420, 0x19912: 0x6c516620, 0x19913: 0x6c46d220, + 0x19914: 0x6c538220, 0x19915: 0x6c816e20, 0x19916: 0x6cf51620, 0x19917: 0x6c0e8c20, + 0x19918: 0x6c795420, 0x19919: 0x6c92d420, 0x1991a: 0x6c246420, 0x1991b: 0x6c885020, + 0x1991c: 0x6d141820, 0x1991d: 0x6cbc6020, 0x1991e: 0x6cd53820, + 0x19920: 0x6d08b220, 0x19921: 0x6c6c6220, 0x19922: 0x6cbd4220, 0x19923: 0x6c5b7020, + 0x19924: 0x6cdb3620, 0x19925: 0x6c207c20, 0x19926: 0x6c33b420, 0x19927: 0x6c8fb220, + 0x19929: 0x6ca4c820, 0x1992a: 0x6ce02220, 0x1992b: 0x6c285220, + 0x1992c: 0x6cf03e20, 0x1992d: 0x6c41f220, 0x1992e: 0x6c26c620, 0x1992f: 0x6c86d420, + 0x19930: 0x6c10de20, 0x19931: 0x6cfd3e20, 0x19932: 0x6cac8c20, 0x19933: 0x6c7eb620, + 0x19934: 0x6d39ec20, 0x19935: 0x6ca7c420, 0x19936: 0x6c580220, 0x19937: 0x6d1cce20, + 0x19938: 0x6cfd4620, 0x19939: 0x6c809020, 0x1993a: 0x6ca0a020, 0x1993b: 0x6c03e220, + 0x1993d: 0x6c4adc20, 0x1993e: 0x6c08c620, 0x1993f: 0x6c3d5020, + // Block 0x665, offset 0x19940 + 0x19940: 0x6c5da820, 0x19941: 0x6d173c20, 0x19942: 0x6c8f2c20, + 0x19944: 0x6d19cc20, 0x19945: 0x6c735c20, 0x19946: 0x6c5d7420, 0x19947: 0x6c1a0a20, + 0x19948: 0x6c311c20, 0x19949: 0x6c356a20, 0x1994b: 0x6d0da620, + 0x1994c: 0x6d3c9420, 0x1994d: 0x6d2cce20, 0x1994e: 0x6cb70420, 0x1994f: 0x6d216220, + 0x19950: 0x6cc37620, 0x19951: 0x6c5d7a20, 0x19952: 0x6ca84420, 0x19953: 0x6c59e220, + 0x19954: 0x6c71cc20, 0x19955: 0x6ccf6820, + 0x19958: 0x6caebe20, 0x19959: 0x6ca01820, 0x1995a: 0x6c129220, 0x1995b: 0x6c90ba20, + 0x1995c: 0x6c843e20, 0x1995d: 0x6c205e20, 0x1995f: 0x6c24f020, + 0x19960: 0x6ccdc820, 0x19961: 0x6c280a20, 0x19962: 0x6cb68220, + 0x19964: 0x6c7f7a20, 0x19965: 0x6c8de620, 0x19966: 0x6c8a6220, 0x19967: 0x6cc62220, + 0x19968: 0x6d20c820, 0x19969: 0x6d16ca20, 0x1996a: 0x6c2df820, 0x1996b: 0x6cb6dc20, + 0x1996c: 0x6d147820, 0x1996d: 0x6ca6f420, 0x1996e: 0x6c3d5220, 0x1996f: 0x6c657420, + 0x19970: 0x6d0b1c20, 0x19971: 0x6c398c20, 0x19972: 0x6cc8c420, 0x19973: 0x6cfa8c20, + 0x19976: 0x6c096a20, 0x19977: 0x6cd25e20, + 0x19978: 0x6cb38020, 0x19979: 0x6ca6fc20, 0x1997a: 0x6d35f620, 0x1997b: 0x6ce22020, + 0x1997c: 0x6ce4f020, 0x1997d: 0x6ce4f220, 0x1997e: 0x6cc81620, 0x1997f: 0x6d176a20, + // Block 0x666, offset 0x19980 + 0x19980: 0x6c8b0420, 0x19981: 0x6c01bc20, 0x19982: 0x6c511020, 0x19983: 0x6cbf1620, + 0x19984: 0x6c85f420, 0x19985: 0x6c4a5c20, 0x19986: 0x6d3f4a20, 0x19987: 0x6cdaaa20, + 0x19988: 0x6d261020, 0x19989: 0x6d0ba220, 0x1998a: 0x6c13dc20, 0x1998b: 0x6ced2420, + 0x1998c: 0x6c72f420, 0x1998d: 0x6ce6cc20, 0x1998e: 0x6d1fd020, 0x1998f: 0x6c5bc620, + 0x19990: 0x6c659c20, 0x19991: 0x6cc89e20, 0x19992: 0x6c986420, 0x19993: 0x6c71b820, + 0x19994: 0x6d3e5620, 0x19995: 0x6c70a820, 0x19996: 0x6c013a20, 0x19997: 0x6cdc5020, + 0x19998: 0x6c7f1620, 0x19999: 0x6c5d3020, 0x1999a: 0x6cc35e20, 0x1999b: 0x6c167220, + 0x1999c: 0x6c34fa20, 0x1999d: 0x6c798020, 0x1999e: 0x6ca55020, 0x1999f: 0x6c11d220, + 0x199a0: 0x6ce35620, 0x199a1: 0x6d064c20, 0x199a2: 0x6c701020, 0x199a3: 0x6c59e420, + 0x199a4: 0x6cb7b820, 0x199a5: 0x6c6b0e20, 0x199a6: 0x6c98f220, 0x199a7: 0x6d0c2020, + 0x199a9: 0x6d354820, 0x199aa: 0x6ce9b020, + 0x199ac: 0x6c00c220, 0x199ad: 0x6cad0a20, 0x199ae: 0x6c125a20, 0x199af: 0x6ce12820, + 0x199b0: 0x6c372220, 0x199b1: 0x6c5d3c20, 0x199b2: 0x6cb63e20, 0x199b3: 0x6c1ea620, + 0x199b4: 0x6cdd9020, 0x199b5: 0x6d3d8820, 0x199b6: 0x6caa2620, 0x199b7: 0x6ce8f220, + 0x199b8: 0x6cd01a20, 0x199b9: 0x6c90f820, 0x199ba: 0x6c0c2020, 0x199bb: 0x6c844020, + 0x199bc: 0x6c977c20, 0x199bd: 0x6d02f020, 0x199be: 0x6c133c20, 0x199bf: 0x6c5a0a20, + // Block 0x667, offset 0x199c0 + 0x199c0: 0x6c9a6c20, 0x199c1: 0x6c42e620, 0x199c2: 0x6c887620, 0x199c3: 0x6c2a3e20, + 0x199c4: 0x6d2e2420, 0x199c5: 0x6d3eaa20, + 0x199c8: 0x6d375620, 0x199c9: 0x6c03d020, 0x199ca: 0x6c258a20, 0x199cb: 0x6cbfe420, + 0x199cd: 0x6c8fea20, 0x199ce: 0x6cfb0a20, 0x199cf: 0x6c3afa20, + 0x199d0: 0x6c4cac20, 0x199d1: 0x6c19b820, 0x199d2: 0x6c6fda20, 0x199d3: 0x6c35f620, + 0x199d4: 0x6c1cb420, 0x199d5: 0x6d269220, 0x199d6: 0x6c531620, 0x199d7: 0x6d119e20, + 0x199d8: 0x6d0ae220, 0x199d9: 0x6d10e620, 0x199da: 0x6ce74420, 0x199db: 0x6d2cc020, + 0x199dc: 0x6d204020, 0x199dd: 0x6d095620, 0x199de: 0x6d11aa20, 0x199df: 0x6c78a820, + 0x199e0: 0x6c591620, 0x199e1: 0x6c80cc20, 0x199e2: 0x6d26ba20, 0x199e3: 0x6c18ca20, + 0x199e6: 0x6cd0b220, + 0x199e8: 0x6ca90e20, 0x199e9: 0x6ca00a20, 0x199ea: 0x6c52ba20, 0x199eb: 0x6c205820, + 0x199ec: 0x6d27fe20, 0x199ed: 0x6d07be20, 0x199ee: 0x6c6d4420, 0x199ef: 0x6d3d9c20, + 0x199f0: 0x6d209c20, 0x199f1: 0x6cdfbc20, 0x199f2: 0x6c775420, 0x199f3: 0x6cbf6420, + 0x199f5: 0x6c1a4c20, 0x199f6: 0x6c6f8820, 0x199f7: 0x6d097620, + 0x199f8: 0x6d32fa20, 0x199f9: 0x6c1ce420, 0x199fa: 0x6cac4a20, 0x199fb: 0x6cbc6620, + 0x199fd: 0x6cc1e620, 0x199fe: 0x6c7fd620, 0x199ff: 0x6d190e20, + // Block 0x668, offset 0x19a00 + 0x19a00: 0x6cc6de20, 0x19a01: 0x6cd84e20, 0x19a02: 0x6cb89c20, 0x19a03: 0x6cd89220, + 0x19a05: 0x6c380420, 0x19a07: 0x6c9b1020, + 0x19a08: 0x6c578e20, 0x19a0b: 0x6c4d6620, + 0x19a0c: 0x6cbc4420, 0x19a0d: 0x6c1f4620, 0x19a0e: 0x6cc3d420, 0x19a0f: 0x6c334e20, + 0x19a10: 0x6c863820, 0x19a11: 0x6c03b820, 0x19a12: 0x6c6c0420, 0x19a13: 0x6d05ee20, + 0x19a14: 0x6c963620, 0x19a16: 0x6d27de20, 0x19a17: 0x6d37ae20, + 0x19a18: 0x6c568220, 0x19a19: 0x6d1ad220, 0x19a1b: 0x6d351020, + 0x19a1c: 0x6cb9fa20, 0x19a1e: 0x6c419420, 0x19a1f: 0x6c667c20, + 0x19a20: 0x6d3ae220, 0x19a21: 0x6d3ae420, 0x19a22: 0x6c7a7820, 0x19a23: 0x6ca81a20, + 0x19a24: 0x6cc8ca20, 0x19a25: 0x6d2ac220, 0x19a26: 0x6c020820, 0x19a27: 0x6d363820, + 0x19a28: 0x6c461a20, 0x19a29: 0x6d17b220, 0x19a2a: 0x6c1ab020, 0x19a2b: 0x6c5ed620, + 0x19a2c: 0x6d39a620, 0x19a2d: 0x6c81b220, 0x19a2e: 0x6cc5ee20, 0x19a2f: 0x6cc67620, + 0x19a30: 0x6d32c620, 0x19a31: 0x6ca34220, 0x19a32: 0x6c12ec20, + 0x19a35: 0x6d151e20, 0x19a36: 0x6c746820, 0x19a37: 0x6c0cee20, + 0x19a38: 0x6c1a1e20, 0x19a39: 0x6c75ce20, 0x19a3a: 0x6c312620, 0x19a3b: 0x6cefe420, + 0x19a3c: 0x6d17fa20, 0x19a3d: 0x6d306020, 0x19a3e: 0x6d0cae20, + // Block 0x669, offset 0x19a40 + 0x19a40: 0x6cca0220, 0x19a41: 0x6c950220, 0x19a42: 0x6cb2be20, 0x19a43: 0x6d2f9020, + 0x19a44: 0x6c4e2020, 0x19a45: 0x6d239a20, 0x19a46: 0x6c278220, 0x19a47: 0x6d2fca20, + 0x19a48: 0x6c3a3e20, 0x19a49: 0x6ccc6620, 0x19a4a: 0x6c8d3820, 0x19a4b: 0x6cde7a20, + 0x19a4c: 0x6cc12220, 0x19a4d: 0x6c986e20, 0x19a4e: 0x6d132c20, 0x19a4f: 0x6c05d220, + 0x19a50: 0x6c4b6e20, 0x19a51: 0x6c489e20, 0x19a52: 0x6ca43620, 0x19a53: 0x6c442420, + 0x19a55: 0x6cd28420, 0x19a56: 0x6c782820, 0x19a57: 0x6cdd9220, + 0x19a58: 0x6c225c20, 0x19a59: 0x6d394620, 0x19a5a: 0x6cdf3820, 0x19a5b: 0x6c7b3420, + 0x19a5c: 0x6cbe2420, 0x19a5d: 0x6d05d820, 0x19a5e: 0x6c322820, 0x19a5f: 0x6c131220, + 0x19a60: 0x6c58da20, 0x19a61: 0x6c234420, 0x19a62: 0x6cc9de20, 0x19a63: 0x6d336020, + 0x19a64: 0x6cb9be20, 0x19a65: 0x6c6c5420, 0x19a66: 0x6d3fb420, 0x19a67: 0x6cf00020, + 0x19a6a: 0x6cf8de20, 0x19a6b: 0x6ca36c20, + 0x19a6c: 0x6cb45420, 0x19a6d: 0x6cd9e020, 0x19a6e: 0x6c729420, 0x19a6f: 0x6d319620, + 0x19a70: 0x6cce8620, 0x19a71: 0x6ce1e820, 0x19a72: 0x6c049c20, 0x19a73: 0x6cdea020, + 0x19a74: 0x6cba7c20, 0x19a75: 0x6cf23a20, 0x19a76: 0x6cc6ae20, 0x19a77: 0x6c962820, + 0x19a78: 0x6c55ca20, 0x19a79: 0x6cda2e20, 0x19a7a: 0x6d37cc20, 0x19a7b: 0x6cb46020, + 0x19a7c: 0x6c9ef620, 0x19a7d: 0x6c6c6420, 0x19a7e: 0x6cce8a20, 0x19a7f: 0x6c9d8e20, + // Block 0x66a, offset 0x19a80 + 0x19a80: 0x6cd61c20, 0x19a81: 0x6c8d7020, 0x19a82: 0x6c82de20, 0x19a83: 0x6c67c420, + 0x19a84: 0x6c838a20, 0x19a85: 0x6d370e20, 0x19a86: 0x6c2e0020, + 0x19a88: 0x6cca2e20, 0x19a89: 0x6c473e20, 0x19a8a: 0x6c397220, 0x19a8b: 0x6c9ab220, + 0x19a8c: 0x6cdc9e20, 0x19a8d: 0x6c65f620, 0x19a8e: 0x6ce15020, 0x19a8f: 0x6d025e20, + 0x19a90: 0x6c7a6a20, 0x19a91: 0x6cf3fe20, 0x19a92: 0x6c38d220, 0x19a93: 0x6c963820, + 0x19a94: 0x6c117820, 0x19a95: 0x6c136620, 0x19a96: 0x6c8d7a20, 0x19a97: 0x6d142620, + 0x19a98: 0x6c23be20, 0x19a99: 0x6d27ce20, 0x19a9a: 0x6c9b7420, 0x19a9b: 0x6d245020, + 0x19a9c: 0x6d374220, 0x19a9d: 0x6d162020, 0x19a9e: 0x6c285620, 0x19a9f: 0x6c5e2c20, + 0x19aa0: 0x6cef5a20, 0x19aa1: 0x6ce03220, 0x19aa2: 0x6ccb7e20, 0x19aa3: 0x6d024420, + 0x19aa4: 0x6cda3620, 0x19aa5: 0x6cd97620, 0x19aa6: 0x6cb94c20, 0x19aa7: 0x6c8eda20, + 0x19aa8: 0x6d194620, 0x19aaa: 0x6c835a20, 0x19aab: 0x6c84aa20, + 0x19aac: 0x6c3af420, 0x19aad: 0x6c8b6a20, 0x19aae: 0x6c8c8820, 0x19aaf: 0x6cfd4820, + 0x19ab0: 0x6d002c20, 0x19ab1: 0x6cab6420, 0x19ab2: 0x6c9cbc20, 0x19ab3: 0x6cfb1220, + 0x19ab4: 0x6cc4f820, 0x19ab5: 0x6d3c0220, 0x19ab6: 0x6cd6be20, 0x19ab7: 0x6d0d1e20, + 0x19ab8: 0x6c0be020, 0x19ab9: 0x6c8df020, 0x19aba: 0x6c531a20, 0x19abb: 0x6cb5a620, + 0x19abc: 0x6c8a9620, 0x19abd: 0x6c04ca20, 0x19abe: 0x6c097e20, 0x19abf: 0x6c554820, + // Block 0x66b, offset 0x19ac0 + 0x19ac0: 0x6c554a20, 0x19ac2: 0x6c12f220, 0x19ac3: 0x6cae1c20, + 0x19ac4: 0x6cbf2c20, 0x19ac5: 0x6c9ffe20, 0x19ac6: 0x6c700220, 0x19ac7: 0x6c10a220, + 0x19ac8: 0x6c9a1420, 0x19ac9: 0x6cca1e20, 0x19aca: 0x6cf0a820, + 0x19acd: 0x6c841e20, 0x19ace: 0x6cc36220, + 0x19ad0: 0x6c5cfa20, 0x19ad1: 0x6cfdf220, 0x19ad3: 0x6cd3c620, + 0x19ad4: 0x6d1c9020, 0x19ad6: 0x6ca43820, 0x19ad7: 0x6c59f220, + 0x19ad8: 0x6c701a20, 0x19ad9: 0x6d0c2620, 0x19adb: 0x6cc99020, + 0x19adc: 0x6ce96220, 0x19add: 0x6d022e20, 0x19ade: 0x6d309c20, 0x19adf: 0x6c9ada20, + 0x19ae0: 0x6cf8f420, 0x19ae1: 0x6c978a20, 0x19ae3: 0x6c5a1820, + 0x19ae4: 0x6ce02420, 0x19ae5: 0x6d001420, 0x19ae6: 0x6d137220, 0x19ae7: 0x6c0a9420, + 0x19ae8: 0x6c955a20, 0x19ae9: 0x6c38d420, 0x19aea: 0x6c870620, 0x19aeb: 0x6c251220, + 0x19aec: 0x6c1fa620, 0x19aed: 0x6c2a4620, 0x19aee: 0x6c2bb620, 0x19aef: 0x6c7c1c20, + 0x19af0: 0x6c1ecc20, 0x19af1: 0x6cfb1420, 0x19af2: 0x6c165220, 0x19af3: 0x6c9cce20, + 0x19af4: 0x6cba8e20, 0x19af5: 0x6cc00820, 0x19af6: 0x6d322620, + 0x19afa: 0x6c568620, 0x19afb: 0x6c418c20, + 0x19afc: 0x6c1b9220, 0x19afd: 0x6c48f220, 0x19afe: 0x6ca27a20, 0x19aff: 0x6c0ede20, + // Block 0x66c, offset 0x19b00 + 0x19b00: 0x6c579020, 0x19b01: 0x6c44fc20, 0x19b02: 0x6d10e820, 0x19b03: 0x6c996420, + 0x19b04: 0x6cee0820, + 0x19b08: 0x6cc7a420, 0x19b09: 0x6d090820, 0x19b0a: 0x6d32b820, 0x19b0b: 0x6c9f4a20, + 0x19b0c: 0x6c67a420, 0x19b0e: 0x6d2e5a20, 0x19b0f: 0x6d423820, + 0x19b10: 0x6d26a620, 0x19b11: 0x6c8b0620, 0x19b13: 0x6d392420, + 0x19b14: 0x6c098020, 0x19b15: 0x6cc5f020, 0x19b16: 0x6d234e20, + 0x19b18: 0x6c21c020, 0x19b19: 0x6c379820, 0x19b1a: 0x6d17b420, 0x19b1b: 0x6c9cf620, + 0x19b1c: 0x6cbeca20, 0x19b1e: 0x6cee1e20, 0x19b1f: 0x6c621e20, + 0x19b20: 0x6c104020, 0x19b22: 0x6c0cae20, 0x19b23: 0x6c38a820, + 0x19b24: 0x6d26c820, 0x19b25: 0x6c83ee20, 0x19b26: 0x6c38aa20, 0x19b27: 0x6cc1a820, + 0x19b28: 0x6c3f7620, 0x19b29: 0x6c376220, 0x19b2a: 0x6c354420, 0x19b2b: 0x6d32e420, + 0x19b2c: 0x6ce47020, 0x19b2d: 0x6d239c20, 0x19b2e: 0x6c6d3020, 0x19b2f: 0x6cb70c20, + 0x19b30: 0x6c714220, 0x19b31: 0x6c7f1e20, 0x19b32: 0x6c17f020, 0x19b33: 0x6c06d020, + 0x19b34: 0x6ca9a820, 0x19b35: 0x6d186020, 0x19b36: 0x6d065420, 0x19b37: 0x6ca1e020, + 0x19b38: 0x6d0a3620, 0x19b39: 0x6c3eda20, 0x19b3b: 0x6ca8ec20, + 0x19b3c: 0x6ce64820, 0x19b3d: 0x6c082c20, 0x19b3e: 0x6d2c8a20, 0x19b3f: 0x6ceeae20, + // Block 0x66d, offset 0x19b40 + 0x19b40: 0x6c782a20, 0x19b41: 0x6d10b020, 0x19b42: 0x6caba420, 0x19b43: 0x6cff0820, + 0x19b44: 0x6c451a20, 0x19b45: 0x6ce13820, 0x19b46: 0x6c4b7620, 0x19b47: 0x6c5c3a20, + 0x19b48: 0x6cddfe20, 0x19b4a: 0x6d114620, 0x19b4b: 0x6c266820, + 0x19b4c: 0x6cb7ea20, 0x19b4d: 0x6c6cba20, 0x19b4e: 0x6c94c220, 0x19b4f: 0x6c9d9020, + 0x19b50: 0x6c9d9220, 0x19b51: 0x6c64fe20, 0x19b52: 0x6c92ec20, 0x19b53: 0x6c38c820, + 0x19b54: 0x6cab5620, 0x19b55: 0x6c9c7e20, 0x19b56: 0x6c6b6420, 0x19b57: 0x6c3f9220, + 0x19b58: 0x6c0d1a20, 0x19b59: 0x6c5a7c20, 0x19b5a: 0x6cda5c20, 0x19b5b: 0x6d115e20, + 0x19b5c: 0x6ca89620, 0x19b5d: 0x6c6c6c20, 0x19b5e: 0x6c88d620, 0x19b5f: 0x6c0faa20, + 0x19b60: 0x6c652420, 0x19b61: 0x6ce3ca20, 0x19b62: 0x6c8d8220, 0x19b63: 0x6d415220, + 0x19b64: 0x6cd20e20, 0x19b65: 0x6d1b2620, 0x19b66: 0x6c2a4820, 0x19b67: 0x6c1e0620, + 0x19b68: 0x6c10e220, 0x19b69: 0x6c9f1220, 0x19b6a: 0x6d0e1620, 0x19b6b: 0x6c805620, + 0x19b6c: 0x6c1d3420, 0x19b6d: 0x6c68b020, 0x19b6e: 0x6cd6bc20, 0x19b6f: 0x6cc2ac20, + 0x19b70: 0x6ca8c820, 0x19b71: 0x6c964c20, 0x19b73: 0x6cd21e20, + 0x19b74: 0x6c965020, 0x19b75: 0x6d3a4c20, 0x19b77: 0x6c1d6e20, + 0x19b78: 0x6c734e20, 0x19b79: 0x6c6f0c20, 0x19b7a: 0x6c379a20, 0x19b7b: 0x6d17b820, + 0x19b7c: 0x6cc8d620, 0x19b7d: 0x6c113c20, 0x19b7e: 0x6cc57a20, 0x19b7f: 0x6c3edc20, + // Block 0x66e, offset 0x19b80 + 0x19b80: 0x6c7fb820, 0x19b81: 0x6cdcaa20, 0x19b82: 0x6d20e220, 0x19b83: 0x6d1f1c20, + 0x19b84: 0x6c2d1820, 0x19b85: 0x6c8cf420, 0x19b86: 0x6d3aec20, 0x19b87: 0x6cde5220, + 0x19b88: 0x6cb29e20, 0x19b89: 0x6d2d2a20, 0x19b8a: 0x6c684c20, 0x19b8b: 0x6c20de20, + 0x19b8c: 0x6c10ac20, 0x19b8d: 0x6c7a0620, 0x19b8e: 0x6c25b620, + 0x19b90: 0x6c4e5220, 0x19b91: 0x6c4e5420, 0x19b92: 0x6ca20020, 0x19b93: 0x6c567420, + 0x19b94: 0x6c457220, 0x19b95: 0x6c2b2020, 0x19b96: 0x6c3e3c20, 0x19b97: 0x6d088020, + 0x19b98: 0x6c9c4c20, 0x19b99: 0x6c9a0420, 0x19b9a: 0x6c811e20, 0x19b9b: 0x6c481e20, + 0x19b9c: 0x6d2fc020, 0x19b9d: 0x6cde6620, 0x19b9e: 0x6d23a220, 0x19b9f: 0x6d402820, + 0x19ba0: 0x6c844820, 0x19ba1: 0x6c92d820, 0x19ba2: 0x6cf3f620, 0x19ba3: 0x6c826c20, + 0x19ba4: 0x6c615e20, 0x19ba5: 0x6c875220, 0x19ba6: 0x6c84d820, + 0x19ba8: 0x6cb30420, 0x19ba9: 0x6d101020, 0x19baa: 0x6cec2e20, 0x19bab: 0x6ceb1a20, + 0x19bac: 0x6cae6e20, 0x19bae: 0x6d2fb420, 0x19baf: 0x6c4b0220, + 0x19bb1: 0x6d061e20, 0x19bb2: 0x6ca38020, 0x19bb3: 0x6cc3e420, + 0x19bb4: 0x6ceff620, 0x19bb5: 0x6d32e620, 0x19bb6: 0x6c300e20, 0x19bb7: 0x6cf00820, + 0x19bb8: 0x6c0f6020, 0x19bba: 0x6c595820, 0x19bbb: 0x6d08c020, + 0x19bbc: 0x6d295620, 0x19bbd: 0x6c877220, 0x19bbe: 0x6d0d6020, 0x19bbf: 0x6c59ae20, + // Block 0x66f, offset 0x19bc0 + 0x19bc0: 0x6d095820, 0x19bc1: 0x6c554c20, 0x19bc2: 0x6c05f820, 0x19bc3: 0x6cc4c220, + 0x19bc4: 0x6cfeba20, 0x19bc5: 0x6cb38620, 0x19bc6: 0x6c8a9820, 0x19bc7: 0x6d388a20, + 0x19bc8: 0x6d17ba20, 0x19bc9: 0x6d06e220, 0x19bca: 0x6c960820, 0x19bcb: 0x6c77be20, + 0x19bcc: 0x6c1f5620, 0x19bce: 0x6ca35620, 0x19bcf: 0x6c4e2220, + 0x19bd0: 0x6c17a220, 0x19bd1: 0x6c929220, 0x19bd2: 0x6d2e0620, 0x19bd3: 0x6cde7c20, + 0x19bd4: 0x6c3da220, 0x19bd5: 0x6c52c820, 0x19bd6: 0x6d2ba020, 0x19bd7: 0x6cbc0620, + 0x19bd8: 0x6cdb5020, 0x19bd9: 0x6cb1fa20, 0x19bda: 0x6c49ba20, + 0x19bdc: 0x6c5cd020, 0x19bdd: 0x6c1e8020, 0x19bdf: 0x6c374420, + 0x19be0: 0x6c374620, 0x19be1: 0x6cc85a20, 0x19be2: 0x6cb6e220, 0x19be3: 0x6cd8ba20, + 0x19be4: 0x6c713620, 0x19be6: 0x6d0dbe20, 0x19be7: 0x6c058220, + 0x19be8: 0x6d131e20, 0x19be9: 0x6d3e6c20, 0x19bea: 0x6ca55220, 0x19beb: 0x6c20b220, + 0x19bec: 0x6c03c220, 0x19bed: 0x6c126c20, 0x19bee: 0x6ce42c20, 0x19bef: 0x6c4f1c20, + 0x19bf0: 0x6d425220, 0x19bf1: 0x6c03d420, 0x19bf2: 0x6d301420, 0x19bf3: 0x6cec2820, + 0x19bf4: 0x6c44c420, 0x19bf5: 0x6c098220, 0x19bf6: 0x6c37ca20, 0x19bf7: 0x6d3af820, + 0x19bf8: 0x6cf50220, 0x19bf9: 0x6cf19a20, 0x19bfa: 0x6d369820, 0x19bfb: 0x6d393c20, + 0x19bfc: 0x6c929420, 0x19bfd: 0x6cf1a020, 0x19bfe: 0x6c4bdc20, 0x19bff: 0x6cc08e20, + // Block 0x670, offset 0x19c00 + 0x19c00: 0x6c7e9420, 0x19c01: 0x6d292020, 0x19c02: 0x6cda2820, 0x19c03: 0x6c9dd420, + 0x19c04: 0x6c2c0620, 0x19c05: 0x6cb7ec20, 0x19c06: 0x6c129a20, 0x19c07: 0x6cb1bc20, + 0x19c08: 0x6c887820, 0x19c09: 0x6cd21020, 0x19c0a: 0x6c8ff620, 0x19c0b: 0x6cdad620, + 0x19c0c: 0x6cb73220, 0x19c0d: 0x6d25fa20, 0x19c0e: 0x6c3c9e20, 0x19c0f: 0x6d056820, + 0x19c10: 0x6c73f620, 0x19c11: 0x6c2c3020, 0x19c12: 0x6cb14820, 0x19c13: 0x6c494a20, + 0x19c14: 0x6ca98620, 0x19c15: 0x6cc5d220, 0x19c16: 0x6d321c20, 0x19c17: 0x6c412e20, + 0x19c18: 0x6cb08a20, 0x19c19: 0x6ce05420, 0x19c1a: 0x6c179220, 0x19c1b: 0x6c217220, + 0x19c1c: 0x6c508e20, 0x19c1d: 0x6d3b7220, 0x19c1e: 0x6ca0ec20, 0x19c1f: 0x6c0ce020, + 0x19c20: 0x6cb75e20, 0x19c21: 0x6cd34620, 0x19c22: 0x6c08ca20, 0x19c23: 0x6c740620, + 0x19c24: 0x6cd8a420, 0x19c26: 0x6c485220, 0x19c27: 0x6ca32a20, + 0x19c28: 0x6c5b4e20, 0x19c29: 0x6cf5ca20, 0x19c2a: 0x6c37c820, 0x19c2b: 0x6d04ca20, + 0x19c2c: 0x6ca1ca20, 0x19c2e: 0x6cf77220, 0x19c2f: 0x6d360220, + 0x19c30: 0x6cc8fc20, 0x19c31: 0x6c711a20, 0x19c32: 0x6c2e9420, 0x19c33: 0x6d30f420, + 0x19c34: 0x6cced820, 0x19c35: 0x6c9bd220, 0x19c36: 0x6c098420, 0x19c37: 0x6c4eb420, + 0x19c38: 0x6d210420, 0x19c39: 0x6cfcb820, 0x19c3a: 0x6cacd420, 0x19c3b: 0x6ca5a620, + 0x19c3c: 0x6c119820, 0x19c3d: 0x6c109c20, 0x19c3f: 0x6cb70020, + // Block 0x671, offset 0x19c40 + 0x19c40: 0x6c620820, 0x19c41: 0x6d3d6420, 0x19c42: 0x6c925e20, 0x19c43: 0x6c75c220, + 0x19c44: 0x6cfccc20, 0x19c45: 0x6cf62620, 0x19c46: 0x6c113220, 0x19c47: 0x6cf1e220, + 0x19c48: 0x6d346a20, 0x19c49: 0x6d3f5820, 0x19c4a: 0x6c7d6820, 0x19c4b: 0x6c231a20, + 0x19c4c: 0x6ce4f820, 0x19c4d: 0x6c1f5820, 0x19c4e: 0x6c2b3620, 0x19c4f: 0x6c218220, + 0x19c50: 0x6cbfb620, 0x19c51: 0x6d306220, 0x19c52: 0x6d2be220, 0x19c53: 0x6cc75420, + 0x19c54: 0x6c0d7c20, 0x19c55: 0x6c605c20, 0x19c56: 0x6cf65420, 0x19c57: 0x6d39b220, + 0x19c58: 0x6c746a20, 0x19c59: 0x6c440a20, 0x19c5a: 0x6c5eee20, 0x19c5b: 0x6c265620, + 0x19c5c: 0x6c187c20, 0x19c5d: 0x6cddce20, 0x19c5e: 0x6cc92820, 0x19c5f: 0x6cfdf420, + 0x19c60: 0x6c5a5c20, 0x19c61: 0x6cb65020, 0x19c62: 0x6d3b1820, 0x19c63: 0x6cdcf620, + 0x19c64: 0x6c146c20, 0x19c65: 0x6cf25a20, 0x19c66: 0x6c781a20, 0x19c67: 0x6c77c420, + 0x19c68: 0x6c47b820, 0x19c69: 0x6c410220, 0x19c6a: 0x6c396620, 0x19c6b: 0x6c234c20, + 0x19c6c: 0x6c128c20, 0x19c6d: 0x6d36bc20, 0x19c6e: 0x6c15d820, 0x19c6f: 0x6c825420, + 0x19c70: 0x6d04ee20, 0x19c71: 0x6d2d4820, 0x19c72: 0x6d308220, 0x19c73: 0x6d218a20, + 0x19c74: 0x6c4b7020, 0x19c75: 0x6c45ae20, 0x19c76: 0x6d295020, 0x19c77: 0x6c27fe20, + 0x19c78: 0x6c5e0020, 0x19c79: 0x6cd9e220, 0x19c7a: 0x6ce0ac20, 0x19c7b: 0x6c473020, + 0x19c7c: 0x6cf8e620, 0x19c7d: 0x6c978020, 0x19c7e: 0x6c346620, 0x19c7f: 0x6c02f420, + // Block 0x672, offset 0x19c80 + 0x19c80: 0x6cb0c420, 0x19c81: 0x6cf52a20, 0x19c82: 0x6c007c20, 0x19c83: 0x6c9b7620, + 0x19c84: 0x6cb0d220, 0x19c85: 0x6c9b7820, 0x19c86: 0x6d103a20, 0x19c87: 0x6d374420, + 0x19c88: 0x6c0fac20, 0x19c89: 0x6d1cc820, 0x19c8a: 0x6cef6020, 0x19c8b: 0x6cc50e20, + 0x19c8c: 0x6c7ffa20, 0x19c8d: 0x6d0c4620, 0x19c8e: 0x6c161220, 0x19c8f: 0x6cc33620, + 0x19c90: 0x6d31d820, 0x19c91: 0x6cb46a20, 0x19c93: 0x6cdf2a20, + 0x19c94: 0x6c3a9e20, 0x19c95: 0x6cd55620, 0x19c97: 0x6c298820, + 0x19c98: 0x6c25f220, 0x19c99: 0x6cdf9c20, 0x19c9a: 0x6ce49820, 0x19c9b: 0x6c1ba020, + 0x19c9c: 0x6cde9020, 0x19c9d: 0x6c642a20, 0x19c9e: 0x6cd75e20, 0x19c9f: 0x6c5a3220, + 0x19ca0: 0x6c8a6820, 0x19ca3: 0x6c185e20, + 0x19ca4: 0x6c6cf820, 0x19ca5: 0x6c360020, 0x19ca6: 0x6c464620, 0x19ca7: 0x6c3e6420, + 0x19ca8: 0x6c34f020, 0x19caa: 0x6c363e20, 0x19cab: 0x6c07f020, + 0x19cac: 0x6ce1ca20, 0x19cad: 0x6c2c6020, 0x19caf: 0x6c2c7020, + 0x19cb0: 0x6c10a620, 0x19cb1: 0x6ced3820, 0x19cb2: 0x6d2fd020, 0x19cb3: 0x6c950620, + 0x19cb4: 0x6cb62620, 0x19cb5: 0x6ca2a420, 0x19cb6: 0x6cba6c20, + 0x19cb8: 0x6d3fae20, 0x19cb9: 0x6cd9d620, 0x19cbb: 0x6d1f6220, + 0x19cbc: 0x6d38ac20, 0x19cbd: 0x6cdea620, 0x19cbf: 0x6cdb3c20, + // Block 0x673, offset 0x19cc0 + 0x19cc0: 0x6c10c220, 0x19cc1: 0x6cf7aa20, 0x19cc2: 0x6c67c620, 0x19cc3: 0x6c12ba20, + 0x19cc4: 0x6c406620, 0x19cc5: 0x6ce2b820, 0x19cc6: 0x6c185220, 0x19cc7: 0x6c407820, + 0x19cc8: 0x6c3ae020, 0x19cc9: 0x6cf48c20, 0x19cca: 0x6cf5ac20, 0x19ccb: 0x6d101620, + 0x19ccc: 0x6ca04820, 0x19ccd: 0x6cad2020, 0x19cce: 0x6c98a620, 0x19ccf: 0x6ccbba20, + 0x19cd0: 0x6c9bb420, 0x19cd1: 0x6c12a820, 0x19cd2: 0x6ce57220, 0x19cd3: 0x6c764820, + 0x19cd4: 0x6c043620, 0x19cd5: 0x6cffa620, 0x19cd6: 0x6d032620, 0x19cd7: 0x6cb76220, + 0x19cda: 0x6cceb020, 0x19cdb: 0x6c590a20, + 0x19cdc: 0x6ca96a20, 0x19cdd: 0x6cff7820, 0x19cde: 0x6c18b220, 0x19cdf: 0x6c27ce20, + 0x19ce0: 0x6c3c3820, 0x19ce1: 0x6d1ad420, 0x19ce2: 0x6c01fa20, 0x19ce3: 0x6cc4be20, + 0x19ce4: 0x6cc64420, 0x19ce5: 0x6c976020, 0x19ce6: 0x6c394c20, 0x19ce7: 0x6cc10220, + 0x19ce8: 0x6cd2ce20, 0x19ce9: 0x6c511820, 0x19cea: 0x6c0b9220, 0x19ceb: 0x6c276220, + 0x19cec: 0x6ca11420, 0x19ced: 0x6c2aca20, + 0x19cf0: 0x6c7ba020, 0x19cf2: 0x6c144220, 0x19cf3: 0x6c349620, + 0x19cf4: 0x6d1fd220, 0x19cf5: 0x6c504020, 0x19cf7: 0x6c486020, + 0x19cf8: 0x6d095c20, 0x19cf9: 0x6c833620, 0x19cfa: 0x6c6c9220, 0x19cfb: 0x6cb70220, + 0x19cfc: 0x6cc11020, 0x19cfd: 0x6cee2220, 0x19cfe: 0x6d13f620, 0x19cff: 0x6c89e620, + // Block 0x674, offset 0x19d00 + 0x19d02: 0x6d0cb020, 0x19d03: 0x6d180220, + 0x19d04: 0x6d1a7620, 0x19d05: 0x6cb60020, 0x19d06: 0x6d306420, 0x19d07: 0x6cf8a620, + 0x19d08: 0x6d180420, 0x19d09: 0x6d128620, 0x19d0a: 0x6cf3d820, 0x19d0b: 0x6d33fa20, + 0x19d0c: 0x6d366a20, 0x19d0d: 0x6c4e5a20, 0x19d0e: 0x6c21c820, 0x19d0f: 0x6c3d8420, + 0x19d10: 0x6c215220, 0x19d11: 0x6cb2b620, 0x19d12: 0x6c7afa20, 0x19d13: 0x6c1dc220, + 0x19d15: 0x6ceb8a20, 0x19d16: 0x6cbf4220, 0x19d17: 0x6c233020, + 0x19d18: 0x6c42d220, 0x19d19: 0x6c7acc20, 0x19d1a: 0x6cc12620, 0x19d1b: 0x6cc12820, + 0x19d1c: 0x6d340020, 0x19d1d: 0x6c9c0a20, 0x19d1e: 0x6c865220, 0x19d1f: 0x6d389c20, + 0x19d20: 0x6cde8420, 0x19d21: 0x6d340220, 0x19d22: 0x6c482420, 0x19d23: 0x6c899c20, + 0x19d24: 0x6c54ee20, 0x19d25: 0x6c7e8820, 0x19d26: 0x6c2d2620, 0x19d27: 0x6c22d820, + 0x19d28: 0x6d1bde20, 0x19d2b: 0x6cb62a20, + 0x19d2d: 0x6c144620, 0x19d2e: 0x6c99b020, 0x19d2f: 0x6c31b020, + 0x19d30: 0x6d19fe20, 0x19d31: 0x6c148820, 0x19d32: 0x6cc8dc20, 0x19d33: 0x6c524020, + 0x19d34: 0x6cc87820, 0x19d35: 0x6c3d9420, 0x19d36: 0x6c7f4e20, 0x19d37: 0x6d043420, + 0x19d38: 0x6c64e020, 0x19d39: 0x6d186220, 0x19d3a: 0x6c9a6820, + 0x19d3c: 0x6c987620, 0x19d3d: 0x6c627e20, 0x19d3e: 0x6cdd3a20, 0x19d3f: 0x6c4f0c20, + // Block 0x675, offset 0x19d40 + 0x19d41: 0x6c868420, 0x19d42: 0x6d3f2220, 0x19d43: 0x6d412820, + 0x19d44: 0x6d114820, 0x19d45: 0x6c43a820, 0x19d46: 0x6c844c20, 0x19d47: 0x6cb71c20, + 0x19d48: 0x6c462420, 0x19d49: 0x6c868620, 0x19d4a: 0x6c0db220, 0x19d4b: 0x6cdd3c20, + 0x19d4e: 0x6cdb3e20, 0x19d4f: 0x6c1e4c20, + 0x19d50: 0x6c650220, 0x19d51: 0x6d010020, 0x19d52: 0x6c076420, 0x19d53: 0x6d066020, + 0x19d54: 0x6c6eb620, 0x19d55: 0x6cb46220, 0x19d56: 0x6c8d7220, 0x19d57: 0x6cfdd620, + 0x19d58: 0x6d42ac20, 0x19d59: 0x6c2e4420, 0x19d5a: 0x6c216a20, 0x19d5b: 0x6cbeb620, + 0x19d5c: 0x6ca41020, 0x19d5d: 0x6d2cfe20, 0x19d5e: 0x6c940820, 0x19d5f: 0x6d157420, + 0x19d60: 0x6cceba20, 0x19d61: 0x6d21ba20, 0x19d62: 0x6c575c20, 0x19d63: 0x6c845e20, + 0x19d64: 0x6cabce20, 0x19d67: 0x6c846020, + 0x19d6a: 0x6cd6e620, + 0x19d6c: 0x6d18d620, 0x19d6d: 0x6ca95c20, 0x19d6e: 0x6cd83820, 0x19d6f: 0x6c7ab020, + 0x19d70: 0x6c407a20, 0x19d71: 0x6d142820, 0x19d72: 0x6c2ab820, 0x19d73: 0x6cc49620, + 0x19d74: 0x6c131e20, 0x19d76: 0x6ce39820, 0x19d77: 0x6cbdb420, + 0x19d78: 0x6c0c8820, 0x19d79: 0x6cdca420, 0x19d7a: 0x6cef4c20, 0x19d7b: 0x6c33bc20, + 0x19d7c: 0x6ccb7a20, 0x19d7d: 0x6c00f620, 0x19d7e: 0x6cb7f420, 0x19d7f: 0x6d420e20, + // Block 0x676, offset 0x19d80 + 0x19d80: 0x6c7b7620, 0x19d81: 0x6c3a7420, 0x19d83: 0x6d1b9620, + 0x19d85: 0x6ccaea20, 0x19d86: 0x6c314820, 0x19d87: 0x6c5c8220, + 0x19d88: 0x6d026220, 0x19d89: 0x6d2b1c20, 0x19d8a: 0x6ce03420, 0x19d8b: 0x6ce15a20, + 0x19d8c: 0x6d374620, 0x19d8d: 0x6d191620, 0x19d8e: 0x6c3f1c20, 0x19d8f: 0x6c359420, + 0x19d91: 0x6c75fc20, 0x19d92: 0x6c638e20, 0x19d93: 0x6c141220, + 0x19d94: 0x6cfbca20, 0x19d95: 0x6c981420, 0x19d97: 0x6c0aba20, + 0x19d98: 0x6c8d9220, 0x19d99: 0x6c6b7620, 0x19d9a: 0x6c7d3620, 0x19d9b: 0x6c63f620, + 0x19d9d: 0x6c19a420, 0x19d9e: 0x6c813420, 0x19d9f: 0x6d03b420, + 0x19da0: 0x6c3af620, 0x19da1: 0x6c936e20, 0x19da2: 0x6d2c9e20, 0x19da3: 0x6c51a420, + 0x19da4: 0x6c5f9420, 0x19da5: 0x6ca66220, 0x19da6: 0x6d1cd620, 0x19da7: 0x6d002e20, + 0x19da8: 0x6ce2d820, 0x19da9: 0x6c81c820, 0x19daa: 0x6d2b2820, 0x19dab: 0x6c7cba20, + 0x19dad: 0x6cb9e620, 0x19dae: 0x6c719020, 0x19daf: 0x6cb18c20, + 0x19db0: 0x6c38f220, 0x19db1: 0x6ce80020, 0x19db2: 0x6c8c4020, 0x19db3: 0x6c9cc020, + 0x19db4: 0x6d3de820, 0x19db5: 0x6d013020, 0x19db6: 0x6c56ee20, 0x19db7: 0x6c9cc220, + 0x19db8: 0x6c6a4820, 0x19db9: 0x6d28e220, 0x19dba: 0x6c23d620, 0x19dbb: 0x6c87b220, + 0x19dbc: 0x6cc4a020, 0x19dbd: 0x6d3a4a20, 0x19dbe: 0x6d1ab820, 0x19dbf: 0x6c4f4020, + // Block 0x677, offset 0x19dc0 + 0x19dc1: 0x6d198620, 0x19dc2: 0x6c948020, 0x19dc3: 0x6d274420, + 0x19dc4: 0x6cc4a420, 0x19dc5: 0x6c8df620, 0x19dc6: 0x6ca78620, 0x19dc7: 0x6d24b620, + 0x19dc8: 0x6caaa020, 0x19dca: 0x6d174020, 0x19dcb: 0x6caaa420, + 0x19dcc: 0x6d174220, 0x19dcd: 0x6cb98020, 0x19dce: 0x6cf9b620, 0x19dcf: 0x6c1edc20, + 0x19dd0: 0x6d1a6820, 0x19dd1: 0x6c9d4820, 0x19dd2: 0x6cf65820, 0x19dd3: 0x6ca35a20, + 0x19dd4: 0x6c76de20, 0x19dd5: 0x6d412020, 0x19dd6: 0x6cf9da20, 0x19dd7: 0x6d0cc620, + 0x19dd8: 0x6ce8f420, 0x19dd9: 0x6ce30020, 0x19dda: 0x6cf38820, 0x19ddb: 0x6cdda820, + 0x19ddc: 0x6d1aaa20, 0x19ddd: 0x6c1d0a20, 0x19dde: 0x6d38de20, 0x19ddf: 0x6c988620, + 0x19de0: 0x6d254820, 0x19de1: 0x6caa8020, 0x19de2: 0x6c9e7020, 0x19de3: 0x6d2a4820, + 0x19de4: 0x6ced1420, 0x19de5: 0x6c83ca20, 0x19de6: 0x6cc10420, 0x19de7: 0x6ca33a20, + 0x19de8: 0x6cd26220, 0x19de9: 0x6c098c20, 0x19dea: 0x6d3e2a20, 0x19deb: 0x6c056c20, + 0x19ded: 0x6c736c20, 0x19dee: 0x6cfde620, 0x19def: 0x6c7c7c20, + 0x19df0: 0x6cac2c20, 0x19df1: 0x6c7ba220, 0x19df2: 0x6d0a1220, 0x19df3: 0x6d2cc620, + 0x19df4: 0x6d10fc20, 0x19df5: 0x6c7d6a20, 0x19df6: 0x6c5acc20, 0x19df7: 0x6cf65a20, + 0x19df8: 0x6c357420, 0x19df9: 0x6d0fcc20, 0x19dfa: 0x6ce59020, 0x19dfb: 0x6d1f4e20, + 0x19dfc: 0x6c746c20, 0x19dfd: 0x6c83f620, 0x19dff: 0x6c842020, + // Block 0x678, offset 0x19e00 + 0x19e00: 0x6c198020, 0x19e01: 0x6c624e20, 0x19e02: 0x6c562a20, 0x19e03: 0x6d2e7020, + 0x19e04: 0x6c3f7a20, 0x19e05: 0x6c16ba20, 0x19e06: 0x6c495c20, 0x19e07: 0x6c714420, + 0x19e08: 0x6c9b3220, 0x19e09: 0x6c167820, 0x19e0a: 0x6ce0a620, 0x19e0b: 0x6ca1e220, + 0x19e0c: 0x6d039e20, 0x19e0d: 0x6c852620, 0x19e0e: 0x6d0c2a20, 0x19e0f: 0x6cd9da20, + 0x19e10: 0x6cd1ee20, 0x19e11: 0x6d186420, 0x19e12: 0x6c0e2a20, 0x19e13: 0x6c234e20, + 0x19e14: 0x6c542c20, 0x19e15: 0x6ced3a20, 0x19e16: 0x6c2c9620, 0x19e17: 0x6c5f4420, + 0x19e18: 0x6c443820, 0x19e19: 0x6c4e3420, 0x19e1a: 0x6c0f6220, 0x19e1b: 0x6d04f420, + 0x19e1c: 0x6c8ea220, 0x19e1d: 0x6c11ae20, 0x19e1e: 0x6c11b020, 0x19e1f: 0x6d18d820, + 0x19e20: 0x6d082c20, 0x19e21: 0x6d0ce020, 0x19e22: 0x6d2a5c20, 0x19e23: 0x6c4f1e20, + 0x19e24: 0x6d1e0020, 0x19e25: 0x6d3fc820, 0x19e27: 0x6c775820, + 0x19e28: 0x6d21bc20, 0x19e29: 0x6cb53820, 0x19e2a: 0x6d310620, 0x19e2b: 0x6c967e20, + 0x19e2e: 0x6cd6e820, 0x19e2f: 0x6c6d6a20, + 0x19e30: 0x6c49b020, 0x19e31: 0x6cb46c20, 0x19e32: 0x6c8c7220, + 0x19e34: 0x6ce69c20, 0x19e35: 0x6c679420, 0x19e36: 0x6c7eac20, 0x19e37: 0x6d191820, + 0x19e38: 0x6d1dce20, 0x19e39: 0x6c22ec20, 0x19e3a: 0x6d0dfe20, 0x19e3b: 0x6c6b7020, + 0x19e3c: 0x6d09c820, 0x19e3d: 0x6cf11020, 0x19e3e: 0x6cfc4c20, 0x19e3f: 0x6ca93620, + // Block 0x679, offset 0x19e40 + 0x19e40: 0x6c408c20, 0x19e41: 0x6c445c20, 0x19e43: 0x6ca19c20, + 0x19e44: 0x6d3b4620, 0x19e45: 0x6ca38a20, 0x19e46: 0x6cfc5620, 0x19e47: 0x6cf1c420, + 0x19e48: 0x6c877820, 0x19e49: 0x6c11c220, 0x19e4a: 0x6c9f1c20, 0x19e4b: 0x6c655220, + 0x19e4c: 0x6ca6e220, 0x19e4d: 0x6c14b020, 0x19e4e: 0x6cecb020, 0x19e4f: 0x6d069c20, + 0x19e50: 0x6caa8220, 0x19e51: 0x6c973020, 0x19e52: 0x6d417020, 0x19e53: 0x6c770c20, + 0x19e54: 0x6c761620, 0x19e55: 0x6c4f7020, + 0x19e58: 0x6d23f420, 0x19e59: 0x6cf11220, 0x19e5a: 0x6d39fa20, + 0x19e5d: 0x6d170a20, 0x19e5f: 0x6c2dbc20, + 0x19e60: 0x6c3e4420, 0x19e61: 0x6c08d620, 0x19e62: 0x6d3a6820, 0x19e63: 0x6d3f0c20, + 0x19e64: 0x6cd5cc20, 0x19e65: 0x6cf9ba20, 0x19e66: 0x6ca5e020, + 0x19e68: 0x6c68fe20, 0x19e69: 0x6d0a1420, 0x19e6a: 0x6c1cc620, 0x19e6b: 0x6caa2220, + 0x19e6c: 0x6cc67e20, 0x19e6d: 0x6d364220, 0x19e6e: 0x6cca6e20, + 0x19e70: 0x6cccf020, 0x19e71: 0x6d237e20, 0x19e73: 0x6c6c4e20, + 0x19e75: 0x6c929c20, 0x19e76: 0x6c4db020, 0x19e77: 0x6c0cb220, + 0x19e78: 0x6d183a20, 0x19e79: 0x6d41c020, 0x19e7a: 0x6d2e7220, 0x19e7b: 0x6d23ac20, + 0x19e7c: 0x6ced3c20, 0x19e7d: 0x6ca5fe20, 0x19e7e: 0x6c495e20, 0x19e7f: 0x6c748420, + // Block 0x67a, offset 0x19e80 + 0x19e80: 0x6c082820, 0x19e81: 0x6c11a220, 0x19e83: 0x6c351220, + 0x19e84: 0x6cb7c620, 0x19e85: 0x6d10b420, 0x19e86: 0x6c7d1820, 0x19e87: 0x6cc84820, + 0x19e88: 0x6c542e20, 0x19e89: 0x6d0a3820, 0x19e8a: 0x6d020020, + 0x19e8c: 0x6c7d1a20, 0x19e8e: 0x6d00f020, 0x19e8f: 0x6c0f6420, + 0x19e90: 0x6c78d820, 0x19e91: 0x6c24ec20, 0x19e92: 0x6d074020, 0x19e93: 0x6c042820, + 0x19e94: 0x6cab5820, 0x19e95: 0x6d400c20, 0x19e97: 0x6ce42e20, + 0x19e98: 0x6c1ef220, 0x19e99: 0x6c1b5820, 0x19e9a: 0x6ca7b420, 0x19e9b: 0x6c49ac20, + 0x19e9c: 0x6c3cbe20, 0x19e9d: 0x6d023020, 0x19e9e: 0x6c2aba20, 0x19e9f: 0x6cef4e20, + 0x19ea0: 0x6c74e220, 0x19ea1: 0x6c7d2e20, 0x19ea2: 0x6d2bb420, 0x19ea3: 0x6cc9ac20, + 0x19ea4: 0x6c34bc20, 0x19ea5: 0x6c8d8420, 0x19ea6: 0x6c9b9a20, + 0x19ea8: 0x6c4cde20, 0x19ea9: 0x6c9b9c20, 0x19eaa: 0x6c8fec20, + 0x19eac: 0x6d1d5e20, 0x19eae: 0x6c49c620, 0x19eaf: 0x6c248820, + 0x19eb0: 0x6c84e620, 0x19eb1: 0x6c320c20, 0x19eb3: 0x6c0bf220, + 0x19eb5: 0x6cf62c20, 0x19eb7: 0x6c2a6620, + 0x19eb8: 0x6c2a6820, 0x19eb9: 0x6cfcba20, 0x19eba: 0x6c880020, + 0x19ebc: 0x6ccedc20, 0x19ebd: 0x6d00b020, 0x19ebe: 0x6cd1c420, 0x19ebf: 0x6cf09e20, + // Block 0x67b, offset 0x19ec0 + 0x19ec2: 0x6c51d820, 0x19ec3: 0x6d1f5a20, + 0x19ec4: 0x6c92b220, 0x19ec5: 0x6c7f5020, 0x19ec6: 0x6d1d0e20, 0x19ec7: 0x6cd14c20, + 0x19ec8: 0x6c739220, 0x19ec9: 0x6cb7e420, 0x19eca: 0x6c65ea20, 0x19ecb: 0x6d285c20, + 0x19ecd: 0x6cb7f620, 0x19ecf: 0x6c8c7c20, + 0x19ed0: 0x6c60ea20, 0x19ed1: 0x6c970a20, 0x19ed2: 0x6c208220, 0x19ed3: 0x6ca74620, + 0x19ed4: 0x6c0d6e20, 0x19ed5: 0x6c87c020, 0x19ed6: 0x6c8dfa20, 0x19ed7: 0x6c427a20, + 0x19ed8: 0x6c1a2020, 0x19ed9: 0x6d07b020, 0x19eda: 0x6cfc1a20, 0x19edb: 0x6c558620, + 0x19edc: 0x6c088620, 0x19edd: 0x6d40d020, 0x19ede: 0x6c271a20, 0x19edf: 0x6c271c20, + 0x19ee0: 0x6c5d3e20, 0x19ee1: 0x6cc9d020, 0x19ee2: 0x6c184420, 0x19ee3: 0x6ce37c20, + 0x19ee5: 0x6cab1a20, 0x19ee6: 0x6d371420, 0x19ee7: 0x6c8ebe20, + 0x19ee8: 0x6c3aea20, 0x19ee9: 0x6c695e20, 0x19eea: 0x6c493620, 0x19eeb: 0x6cf7ba20, + 0x19eec: 0x6c8bf820, 0x19eed: 0x6d07f820, 0x19eee: 0x6cc62a20, 0x19eef: 0x6ce25a20, + 0x19ef0: 0x6cb05820, 0x19ef1: 0x6d032a20, 0x19ef2: 0x6ccd7c20, 0x19ef3: 0x6d360e20, + 0x19ef4: 0x6cec3220, 0x19ef5: 0x6ce81020, 0x19ef6: 0x6ce46620, 0x19ef7: 0x6d13e820, + 0x19ef8: 0x6d019c20, 0x19ef9: 0x6cb05c20, 0x19efa: 0x6d10ec20, 0x19efb: 0x6d10ee20, + 0x19efc: 0x6caa8620, 0x19efd: 0x6c503a20, 0x19efe: 0x6ca8e820, 0x19eff: 0x6d1b4a20, + // Block 0x67c, offset 0x19f00 + 0x19f00: 0x6c390a20, 0x19f01: 0x6ca3fa20, 0x19f02: 0x6d109c20, 0x19f03: 0x6ced7e20, + 0x19f04: 0x6d25e820, 0x19f05: 0x6cf9c820, 0x19f06: 0x6d392c20, 0x19f07: 0x6d25ea20, + 0x19f08: 0x6cd38a20, 0x19f09: 0x6c9e5a20, 0x19f0a: 0x6cf62e20, 0x19f0b: 0x6c621220, + 0x19f0c: 0x6ce22a20, 0x19f0d: 0x6c3ab020, 0x19f0e: 0x6d096020, 0x19f0f: 0x6ca5e820, + 0x19f10: 0x6c224620, 0x19f11: 0x6c9d4a20, 0x19f12: 0x6c0ba220, + 0x19f14: 0x6ca2e620, 0x19f15: 0x6d238020, 0x19f16: 0x6c366220, 0x19f17: 0x6d353a20, + 0x19f18: 0x6cc57420, 0x19f19: 0x6d070020, 0x19f1a: 0x6c94b020, 0x19f1b: 0x6c5be820, + 0x19f1c: 0x6d0a9620, 0x19f1d: 0x6ca4b820, 0x19f1e: 0x6c4eee20, 0x19f1f: 0x6c63d620, + 0x19f20: 0x6c312e20, 0x19f21: 0x6c57b420, 0x19f22: 0x6ce86c20, 0x19f23: 0x6cb26220, + 0x19f24: 0x6c244c20, 0x19f25: 0x6cf68220, 0x19f26: 0x6cd99820, 0x19f27: 0x6c9c6c20, + 0x19f28: 0x6d034420, 0x19f29: 0x6cf51a20, 0x19f2a: 0x6cbf5420, 0x19f2b: 0x6d2edc20, + 0x19f2c: 0x6ce23620, 0x19f2d: 0x6d043620, 0x19f2e: 0x6c701e20, 0x19f2f: 0x6c728220, + 0x19f30: 0x6c5d4020, 0x19f31: 0x6ce36e20, 0x19f32: 0x6c977420, 0x19f33: 0x6d0ea420, + 0x19f34: 0x6c5f2020, 0x19f35: 0x6cd47a20, 0x19f36: 0x6c82d620, 0x19f37: 0x6ced4420, + 0x19f38: 0x6c183820, 0x19f39: 0x6c120a20, 0x19f3a: 0x6c6c0620, 0x19f3b: 0x6d205820, + 0x19f3c: 0x6c5b6620, 0x19f3d: 0x6d2c9420, 0x19f3e: 0x6cdb4820, 0x19f3f: 0x6c444220, + // Block 0x67d, offset 0x19f40 + 0x19f40: 0x6ca51a20, 0x19f41: 0x6cf8f820, 0x19f43: 0x6c331a20, + 0x19f44: 0x6c1b6420, 0x19f45: 0x6cef5020, 0x19f46: 0x6d30ae20, 0x19f47: 0x6c4bf420, + 0x19f48: 0x6c175620, 0x19f49: 0x6c1ae020, 0x19f4a: 0x6d2a2820, 0x19f4b: 0x6c5c8420, + 0x19f4c: 0x6c944820, 0x19f4d: 0x6c8a4620, 0x19f4e: 0x6c818a20, 0x19f4f: 0x6cead820, + 0x19f50: 0x6c5b0420, 0x19f51: 0x6cf54620, 0x19f52: 0x6c02fa20, 0x19f53: 0x6ccf8620, + 0x19f54: 0x6cdc0220, 0x19f55: 0x6c974c20, 0x19f56: 0x6ce0b620, 0x19f57: 0x6d035a20, + 0x19f58: 0x6c6e4020, 0x19f59: 0x6c017620, 0x19f5a: 0x6cdee220, 0x19f5b: 0x6c156420, + 0x19f5c: 0x6cf11a20, 0x19f5d: 0x6ce98420, 0x19f5e: 0x6c62dc20, 0x19f5f: 0x6c18fa20, + 0x19f60: 0x6c185820, 0x19f61: 0x6d247c20, 0x19f62: 0x6cfc6020, 0x19f63: 0x6d02d020, + 0x19f67: 0x6ca51c20, + 0x19f69: 0x6d0f1020, 0x19f6a: 0x6cc01e20, 0x19f6b: 0x6c675820, + 0x19f6c: 0x6cd95c20, 0x19f6d: 0x6c75c420, 0x19f6e: 0x6c89fc20, 0x19f6f: 0x6c714e20, + 0x19f71: 0x6c97d220, 0x19f72: 0x6c8b7220, + 0x19f74: 0x6c1f3820, 0x19f75: 0x6c1bae20, 0x19f76: 0x6cfdcc20, 0x19f77: 0x6cbd3a20, + 0x19f78: 0x6c9a6220, 0x19f79: 0x6cd5fa20, 0x19f7a: 0x6c149020, 0x19f7b: 0x6c1bc420, + 0x19f7c: 0x6c474620, 0x19f7d: 0x6d21a820, 0x19f7e: 0x6d1a0420, + // Block 0x67e, offset 0x19f80 + 0x19f80: 0x6c8eac20, 0x19f81: 0x6c818020, 0x19f82: 0x6cd61e20, 0x19f83: 0x6d30be20, + 0x19f84: 0x6cd6c420, 0x19f85: 0x6c5aac20, + 0x19f88: 0x6c364620, 0x19f8a: 0x6ccc7020, 0x19f8b: 0x6d402e20, + 0x19f8c: 0x6c74a620, 0x19f8d: 0x6c75ec20, 0x19f8e: 0x6ce93820, 0x19f8f: 0x6c90ca20, + 0x19f90: 0x6cef5c20, 0x19f91: 0x6c1cf420, 0x19f92: 0x6d3b4820, 0x19f93: 0x6c8b7420, + 0x19f95: 0x6d30cc20, 0x19f96: 0x6d2f8c20, + 0x19f98: 0x6d178020, 0x19f99: 0x6c1e5c20, 0x19f9a: 0x6ca5ea20, 0x19f9b: 0x6c0e7820, + 0x19f9c: 0x6cdb8620, 0x19f9d: 0x6d160620, 0x19f9e: 0x6c506020, 0x19f9f: 0x6d0bc820, + 0x19fa0: 0x6c58ac20, 0x19fa1: 0x6c980a20, 0x19fa2: 0x6c980c20, 0x19fa3: 0x6cc1f220, + 0x19fa4: 0x6c81c420, 0x19fa5: 0x6c4ffe20, 0x19fa6: 0x6d37d620, 0x19fa7: 0x6c9f4e20, + 0x19fa8: 0x6cfb5620, 0x19fa9: 0x6d324420, 0x19faa: 0x6cd55e20, 0x19fab: 0x6d423e20, + 0x19fac: 0x6d3afc20, 0x19fad: 0x6c46aa20, 0x19fae: 0x6d089820, 0x19faf: 0x6d17c620, + 0x19fb0: 0x6d366e20, 0x19fb1: 0x6d00c620, 0x19fb2: 0x6c6d1e20, 0x19fb3: 0x6c11a420, + 0x19fb5: 0x6c10ae20, 0x19fb6: 0x6c896a20, 0x19fb7: 0x6d341020, + 0x19fb8: 0x6c626c20, 0x19fb9: 0x6ced4620, 0x19fba: 0x6c49a420, 0x19fbb: 0x6c70bc20, + 0x19fbc: 0x6c6ea220, 0x19fbd: 0x6c00c420, 0x19fbe: 0x6c404220, 0x19fbf: 0x6c4b7220, + // Block 0x67f, offset 0x19fc0 + 0x19fc0: 0x6c548020, 0x19fc1: 0x6d0ec620, 0x19fc2: 0x6cc87e20, 0x19fc3: 0x6d36ee20, + 0x19fc4: 0x6c0c9420, 0x19fc5: 0x6d157620, 0x19fc6: 0x6cdd9e20, 0x19fc7: 0x6c2efa20, + 0x19fc8: 0x6c4b9620, 0x19fc9: 0x6cd18020, 0x19fca: 0x6d0ab820, 0x19fcb: 0x6c194620, + 0x19fcc: 0x6ccf2020, 0x19fcd: 0x6cbe8a20, + 0x19fd0: 0x6c218a20, 0x19fd1: 0x6c533820, 0x19fd2: 0x6c308220, 0x19fd3: 0x6c198220, + 0x19fd4: 0x6ceff820, 0x19fd5: 0x6cc7ea20, 0x19fd6: 0x6cd55420, 0x19fd7: 0x6c10f220, + 0x19fd8: 0x6c600e20, 0x19fd9: 0x6d28b620, 0x19fda: 0x6cb5d420, 0x19fdb: 0x6d0c0220, + 0x19fdc: 0x6c3fe820, 0x19fdd: 0x6d235820, 0x19fde: 0x6c3e9020, 0x19fdf: 0x6cb39220, + 0x19fe0: 0x6d33e620, 0x19fe1: 0x6ce06220, 0x19fe2: 0x6d424020, 0x19fe3: 0x6c17ec20, + 0x19fe4: 0x6cc19a20, 0x19fe5: 0x6d204e20, 0x19fe6: 0x6c514a20, 0x19fe7: 0x6c547420, + 0x19fe8: 0x6c4b0e20, 0x19fe9: 0x6c366620, 0x19fea: 0x6c67ea20, 0x19feb: 0x6d27f620, + 0x19fec: 0x6ce83020, 0x19fed: 0x6c259820, 0x19fee: 0x6ce87020, 0x19fef: 0x6c402a20, + 0x19ff0: 0x6d424c20, 0x19ff1: 0x6c558820, 0x19ff3: 0x6c0f4a20, + 0x19ff4: 0x6d2f6e20, 0x19ff5: 0x6c754a20, 0x19ff6: 0x6ce0d020, 0x19ff7: 0x6c74aa20, + 0x19ff8: 0x6c404620, 0x19ff9: 0x6c5a0220, 0x19ffa: 0x6c211820, 0x19ffb: 0x6d1e5e20, + 0x19ffc: 0x6c20f020, 0x19ffd: 0x6cdda020, 0x19ffe: 0x6c1b5c20, 0x19fff: 0x6cb92a20, + // Block 0x680, offset 0x1a000 + 0x1a000: 0x6c10fc20, 0x1a001: 0x6cff9c20, 0x1a002: 0x6c979220, 0x1a003: 0x6c117c20, + 0x1a004: 0x6cb7f820, 0x1a005: 0x6c66f620, 0x1a006: 0x6c0a9a20, 0x1a007: 0x6c5f8420, + 0x1a008: 0x6d34b820, 0x1a009: 0x6d3a3620, 0x1a00a: 0x6cc1f420, 0x1a00b: 0x6d2e3420, + 0x1a00c: 0x6c60fa20, 0x1a00d: 0x6c0b2420, 0x1a00f: 0x6c878020, + 0x1a010: 0x6c879420, 0x1a011: 0x6d272a20, 0x1a012: 0x6cc34020, 0x1a013: 0x6c195a20, + 0x1a014: 0x6c3fcc20, 0x1a015: 0x6c144020, 0x1a016: 0x6ce19c20, 0x1a017: 0x6cd37420, + 0x1a018: 0x6c4f9620, 0x1a019: 0x6cbcbe20, 0x1a01a: 0x6cb5d620, 0x1a01b: 0x6c0efc20, + 0x1a01c: 0x6ca33e20, 0x1a01d: 0x6ce82a20, 0x1a01e: 0x6c1e7a20, 0x1a01f: 0x6c243c20, + 0x1a020: 0x6d26c020, 0x1a021: 0x6d33e820, 0x1a022: 0x6c18cc20, 0x1a023: 0x6c1f4a20, + 0x1a024: 0x6c09b420, 0x1a025: 0x6c9b1c20, 0x1a026: 0x6c038020, 0x1a027: 0x6ce4a220, + 0x1a028: 0x6c9f5a20, 0x1a029: 0x6c8aba20, 0x1a02a: 0x6c3ccc20, 0x1a02b: 0x6c197420, + 0x1a02c: 0x6cc0b820, 0x1a02d: 0x6ce58820, 0x1a02e: 0x6c3eac20, 0x1a02f: 0x6c7e0820, + 0x1a030: 0x6c65b820, + 0x1a034: 0x6d325620, 0x1a035: 0x6cc08a20, 0x1a036: 0x6d42a820, 0x1a037: 0x6c1c4c20, + 0x1a038: 0x6c7c9420, 0x1a039: 0x6c8b2420, 0x1a03a: 0x6c074a20, 0x1a03b: 0x6c326e20, + 0x1a03c: 0x6cf46c20, 0x1a03e: 0x6d3d9220, 0x1a03f: 0x6c92ba20, + // Block 0x681, offset 0x1a040 + 0x1a040: 0x6ce0d220, 0x1a042: 0x6c1eaa20, 0x1a043: 0x6c89a020, + 0x1a044: 0x6ce51820, 0x1a045: 0x6c7dbe20, 0x1a046: 0x6c16c420, 0x1a047: 0x6c74ac20, + 0x1a048: 0x6ce8ec20, 0x1a049: 0x6c594e20, 0x1a04a: 0x6c3aca20, 0x1a04b: 0x6c0a3c20, + 0x1a04d: 0x6cf97c20, 0x1a04e: 0x6cf31820, 0x1a04f: 0x6c628a20, + 0x1a050: 0x6cc27a20, 0x1a051: 0x6c7cdc20, 0x1a052: 0x6c55c220, 0x1a053: 0x6cbfca20, + 0x1a054: 0x6cdc7c20, 0x1a055: 0x6c10fa20, 0x1a057: 0x6cc0bc20, + 0x1a058: 0x6cb0c820, 0x1a059: 0x6cad1020, 0x1a05a: 0x6cec4020, 0x1a05b: 0x6d115620, + 0x1a05c: 0x6cc6c220, 0x1a05d: 0x6d09b620, 0x1a05e: 0x6c246c20, 0x1a05f: 0x6c2efc20, + 0x1a060: 0x6c1c8a20, 0x1a061: 0x6c25f620, 0x1a062: 0x6c9c1220, 0x1a063: 0x6d086420, + 0x1a064: 0x6c34be20, 0x1a065: 0x6c0d0420, 0x1a066: 0x6d310a20, 0x1a067: 0x6c1ec620, + 0x1a068: 0x6c164220, 0x1a069: 0x6c4b9e20, 0x1a06a: 0x6c32e620, 0x1a06b: 0x6d409420, + 0x1a06c: 0x6c2afe20, 0x1a06d: 0x6c7f3820, 0x1a06e: 0x6ce2da20, 0x1a06f: 0x6d272c20, + 0x1a070: 0x6cc34220, 0x1a071: 0x6d3a5020, 0x1a072: 0x6c8d1020, 0x1a073: 0x6c186c20, + 0x1a074: 0x6d31e020, 0x1a075: 0x6c400220, 0x1a076: 0x6ccf4e20, 0x1a077: 0x6ce5c620, + 0x1a078: 0x6c7ac820, 0x1a079: 0x6c004420, 0x1a07b: 0x6cbf5620, + 0x1a07c: 0x6cd61220, 0x1a07d: 0x6c4d3420, 0x1a07e: 0x6ccd5e20, 0x1a07f: 0x6cec7620, + // Block 0x682, offset 0x1a080 + 0x1a080: 0x6d2e3620, 0x1a081: 0x6c904a20, 0x1a082: 0x6c6f6220, 0x1a083: 0x6c85b820, + 0x1a085: 0x6c210220, 0x1a086: 0x6cc66c20, 0x1a087: 0x6d26ac20, + 0x1a088: 0x6c743a20, 0x1a089: 0x6c776c20, 0x1a08a: 0x6c390c20, 0x1a08b: 0x6cb5da20, + 0x1a08c: 0x6c534220, 0x1a08d: 0x6c3e7220, 0x1a08e: 0x6c915220, 0x1a08f: 0x6c535820, + 0x1a090: 0x6ceb2a20, 0x1a091: 0x6c9f5c20, 0x1a092: 0x6ce4a420, 0x1a093: 0x6c737c20, + 0x1a094: 0x6cb70620, 0x1a095: 0x6d332620, 0x1a096: 0x6cbece20, 0x1a097: 0x6c45f220, + 0x1a098: 0x6ce4b620, 0x1a099: 0x6c80dc20, 0x1a09a: 0x6c99a620, 0x1a09b: 0x6d1b6a20, + 0x1a09c: 0x6c92c020, 0x1a09d: 0x6d250e20, 0x1a09e: 0x6c715420, 0x1a09f: 0x6cb0b820, + 0x1a0a1: 0x6d00f420, 0x1a0a2: 0x6c0bbe20, 0x1a0a3: 0x6c5cd820, + 0x1a0a4: 0x6d39cc20, 0x1a0a5: 0x6cc6c820, 0x1a0a6: 0x6cca8e20, 0x1a0a7: 0x6cf38420, + 0x1a0a8: 0x6c144e20, 0x1a0a9: 0x6c795820, 0x1a0aa: 0x6ccdc420, 0x1a0ab: 0x6caede20, + 0x1a0ac: 0x6c980e20, 0x1a0ad: 0x6d050620, 0x1a0af: 0x6c237020, + 0x1a0b0: 0x6c796020, 0x1a0b1: 0x6d3bb220, 0x1a0b2: 0x6c154620, 0x1a0b3: 0x6cd84220, + 0x1a0b4: 0x6c1cf620, 0x1a0b5: 0x6cdcae20, 0x1a0b6: 0x6c076e20, 0x1a0b7: 0x6c769e20, + 0x1a0b9: 0x6d376020, 0x1a0ba: 0x6cf12620, 0x1a0bb: 0x6c9f8420, + 0x1a0bc: 0x6c8db220, 0x1a0bd: 0x6d414220, 0x1a0be: 0x6ca8d420, 0x1a0bf: 0x6c8dfc20, + // Block 0x683, offset 0x1a0c0 + 0x1a0c0: 0x6cb77420, 0x1a0c1: 0x6d26b020, 0x1a0c3: 0x6d186820, + 0x1a0c4: 0x6cf82220, 0x1a0c5: 0x6c18d820, 0x1a0c7: 0x6cc71e20, + 0x1a0c8: 0x6c18f820, 0x1a0c9: 0x6ca9da20, 0x1a0ca: 0x6d1ef220, 0x1a0cb: 0x6c618c20, + 0x1a0cc: 0x6c0ebe20, 0x1a0cd: 0x6c39ca20, + 0x1a0d0: 0x6c242220, 0x1a0d1: 0x6c2be820, 0x1a0d2: 0x6c684020, 0x1a0d3: 0x6d20fc20, + 0x1a0d4: 0x6c50fe20, 0x1a0d5: 0x6d06b220, 0x1a0d6: 0x6d22f820, 0x1a0d7: 0x6cc0f620, + 0x1a0d9: 0x6c044420, 0x1a0da: 0x6c44cc20, 0x1a0db: 0x6c6f0e20, + 0x1a0dd: 0x6d0bb820, 0x1a0de: 0x6cd5de20, 0x1a0df: 0x6d1f3e20, + 0x1a0e0: 0x6cd98e20, 0x1a0e1: 0x6d130820, 0x1a0e2: 0x6c125820, 0x1a0e3: 0x6d112a20, + 0x1a0e4: 0x6cd5fc20, 0x1a0e5: 0x6d0cba20, 0x1a0e6: 0x6cd67220, 0x1a0e7: 0x6c8aa220, + 0x1a0e8: 0x6c235020, 0x1a0e9: 0x6d23d420, 0x1a0ea: 0x6c0f6620, 0x1a0eb: 0x6cdbfe20, + 0x1a0ed: 0x6d0eca20, 0x1a0ee: 0x6c834820, 0x1a0ef: 0x6c8bf420, + 0x1a0f0: 0x6ce30220, 0x1a0f1: 0x6c31de20, 0x1a0f2: 0x6d272e20, 0x1a0f3: 0x6c611620, + 0x1a0f5: 0x6d278620, + 0x1a0f8: 0x6c706220, 0x1a0f9: 0x6c71a820, 0x1a0fa: 0x6c1e5820, 0x1a0fb: 0x6c18ac20, + 0x1a0fc: 0x6c457820, 0x1a0fd: 0x6cfe4220, 0x1a0fe: 0x6cfbee20, 0x1a0ff: 0x6c011c20, + // Block 0x684, offset 0x1a100 + 0x1a100: 0x6c4ae020, 0x1a101: 0x6d223220, 0x1a102: 0x6c82bc20, + 0x1a104: 0x6ce89c20, 0x1a105: 0x6c18b820, 0x1a106: 0x6d03e020, 0x1a107: 0x6cc03e20, + 0x1a108: 0x6c4f9a20, 0x1a10a: 0x6c292c20, 0x1a10b: 0x6c112e20, + 0x1a10c: 0x6c2bf420, 0x1a10d: 0x6d0d7020, 0x1a10e: 0x6d3e3020, + 0x1a110: 0x6d1bc020, 0x1a111: 0x6c14fa20, 0x1a113: 0x6c840020, + 0x1a114: 0x6cdd7e20, 0x1a115: 0x6c969c20, 0x1a116: 0x6c96a620, + 0x1a118: 0x6ce11e20, 0x1a119: 0x6cade620, 0x1a11a: 0x6c90ae20, 0x1a11b: 0x6cb51820, + 0x1a11c: 0x6c25ec20, 0x1a11d: 0x6ce8ee20, 0x1a11e: 0x6c369a20, 0x1a11f: 0x6c11aa20, + 0x1a120: 0x6c6b2c20, 0x1a121: 0x6d156420, 0x1a122: 0x6c60d020, 0x1a123: 0x6c294220, + 0x1a124: 0x6c752220, 0x1a125: 0x6c08cc20, 0x1a126: 0x6c832620, 0x1a127: 0x6d174a20, + 0x1a128: 0x6c214020, 0x1a129: 0x6c214620, 0x1a12a: 0x6cb38820, 0x1a12b: 0x6c83cc20, + 0x1a12c: 0x6d291420, 0x1a12d: 0x6cdf7020, 0x1a12e: 0x6cb39420, 0x1a12f: 0x6c242620, + 0x1a130: 0x6c725020, 0x1a131: 0x6d070620, 0x1a132: 0x6c395820, + 0x1a134: 0x6d070820, 0x1a135: 0x6c37d420, 0x1a136: 0x6c5d7e20, 0x1a137: 0x6d39b820, + 0x1a138: 0x6cc4c820, 0x1a139: 0x6c381c20, 0x1a13a: 0x6c72fc20, 0x1a13b: 0x6c4db620, + 0x1a13c: 0x6c896e20, 0x1a13d: 0x6d341220, 0x1a13e: 0x6c9d8220, 0x1a13f: 0x6d209a20, + // Block 0x685, offset 0x1a140 + 0x1a141: 0x6c133a20, 0x1a142: 0x6c9a2c20, 0x1a143: 0x6d1a0620, + 0x1a144: 0x6c9e4220, 0x1a145: 0x6ce8f620, 0x1a146: 0x6c7c9e20, + 0x1a149: 0x6c9d9a20, 0x1a14a: 0x6cc6ca20, 0x1a14b: 0x6d241c20, + 0x1a14c: 0x6cbae620, 0x1a14d: 0x6c9c8c20, 0x1a14e: 0x6c718020, 0x1a14f: 0x6cb07e20, + 0x1a150: 0x6c6cc620, 0x1a151: 0x6cee5e20, 0x1a152: 0x6c62c020, 0x1a153: 0x6c9baa20, + 0x1a154: 0x6c672020, 0x1a155: 0x6d098020, 0x1a156: 0x6c068220, 0x1a157: 0x6c420220, + 0x1a158: 0x6c161e20, 0x1a159: 0x6c87cc20, 0x1a15a: 0x6c851620, 0x1a15b: 0x6cc04020, + 0x1a15c: 0x6c33ee20, 0x1a15d: 0x6d1d3e20, 0x1a15e: 0x6d27ea20, 0x1a15f: 0x6c18ce20, + 0x1a160: 0x6d353220, 0x1a161: 0x6cc4ca20, 0x1a163: 0x6c94b220, + 0x1a164: 0x6c763a20, 0x1a165: 0x6c4b1420, 0x1a166: 0x6d26d620, 0x1a167: 0x6c5c0820, + 0x1a168: 0x6cb0b220, 0x1a169: 0x6c13f820, 0x1a16a: 0x6c34a820, 0x1a16b: 0x6c152220, + 0x1a16c: 0x6ccc1020, 0x1a16d: 0x6cd3c820, 0x1a16e: 0x6ccf7620, 0x1a16f: 0x6d03fa20, + 0x1a170: 0x6d1c9420, 0x1a171: 0x6cd3ca20, 0x1a172: 0x6c1c6420, 0x1a173: 0x6d134820, + 0x1a174: 0x6c4e3620, 0x1a175: 0x6c3ad420, 0x1a176: 0x6d134a20, 0x1a177: 0x6d0de220, + 0x1a178: 0x6d416220, 0x1a179: 0x6cd9ee20, 0x1a17a: 0x6c6c6620, 0x1a17b: 0x6c351a20, + 0x1a17c: 0x6cfd2220, 0x1a17d: 0x6c492e20, 0x1a17e: 0x6ce1f820, 0x1a17f: 0x6cbcfa20, + // Block 0x686, offset 0x1a180 + 0x1a180: 0x6c15f420, 0x1a181: 0x6c4e4420, 0x1a182: 0x6c9c1420, 0x1a183: 0x6d26fc20, + 0x1a184: 0x6c247020, 0x1a185: 0x6cba8420, 0x1a186: 0x6c6cc420, 0x1a187: 0x6ccdd020, + 0x1a188: 0x6ca25820, 0x1a189: 0x6d251e20, 0x1a18b: 0x6cae8a20, + 0x1a18c: 0x6d336e20, 0x1a18d: 0x6d374a20, 0x1a18e: 0x6c216c20, 0x1a18f: 0x6d22aa20, + 0x1a190: 0x6ca1f820, 0x1a191: 0x6cedae20, 0x1a192: 0x6c681020, 0x1a193: 0x6cb54c20, + 0x1a194: 0x6cdb5e20, 0x1a195: 0x6cb1e220, 0x1a196: 0x6ce4d020, 0x1a197: 0x6c7b7820, + 0x1a198: 0x6c247a20, 0x1a199: 0x6cdcb820, 0x1a19b: 0x6c6a4220, + 0x1a19c: 0x6c671420, 0x1a19d: 0x6c028820, 0x1a19e: 0x6c696e20, 0x1a19f: 0x6d138e20, + 0x1a1a1: 0x6d139020, 0x1a1a2: 0x6c8ff020, 0x1a1a3: 0x6d2a3620, + 0x1a1a4: 0x6c05de20, 0x1a1a5: 0x6c889a20, 0x1a1a7: 0x6c58c620, + 0x1a1a8: 0x6c942620, 0x1a1a9: 0x6cef7820, 0x1a1aa: 0x6cfc5820, 0x1a1ab: 0x6ce60a20, + 0x1a1ac: 0x6c0fc820, 0x1a1ad: 0x6d337620, 0x1a1ae: 0x6d3a3e20, 0x1a1af: 0x6c06c420, + 0x1a1b0: 0x6c9bba20, 0x1a1b1: 0x6d015220, 0x1a1b2: 0x6cab6820, 0x1a1b3: 0x6d1ed820, + 0x1a1b5: 0x6cffc820, 0x1a1b6: 0x6c87aa20, 0x1a1b7: 0x6d2c6e20, + 0x1a1b8: 0x6c9cd020, 0x1a1ba: 0x6d128420, + 0x1a1bd: 0x6cb31620, 0x1a1be: 0x6d014220, + // Block 0x687, offset 0x1a1c0 + 0x1a1c2: 0x6ccdd220, 0x1a1c3: 0x6d3d1420, + 0x1a1c5: 0x6ccddc20, 0x1a1c6: 0x6c754020, 0x1a1c7: 0x6c61fc20, + 0x1a1c8: 0x6c6a2620, 0x1a1ca: 0x6ca7a420, 0x1a1cb: 0x6c028420, + 0x1a1cc: 0x6c1f3a20, 0x1a1cd: 0x6cf4e420, 0x1a1ce: 0x6c495420, 0x1a1cf: 0x6d01b820, + 0x1a1d0: 0x6ce6d020, 0x1a1d1: 0x6d096220, 0x1a1d2: 0x6c297220, 0x1a1d3: 0x6d2d8620, + 0x1a1d4: 0x6ce06620, 0x1a1d5: 0x6cae7c20, 0x1a1d6: 0x6d00d420, 0x1a1d7: 0x6d072020, + 0x1a1d8: 0x6cfcf220, 0x1a1d9: 0x6cd8d820, 0x1a1da: 0x6c7aee20, 0x1a1db: 0x6d335a20, + 0x1a1dc: 0x6cf3e620, 0x1a1dd: 0x6c5d5c20, 0x1a1de: 0x6cc90620, 0x1a1df: 0x6cf1ee20, + 0x1a1e0: 0x6c317a20, 0x1a1e1: 0x6c58a020, 0x1a1e2: 0x6c7e1420, 0x1a1e3: 0x6c405a20, + 0x1a1e4: 0x6c1fd020, 0x1a1e5: 0x6cfba420, 0x1a1e6: 0x6cbdae20, 0x1a1e7: 0x6cbc8820, + 0x1a1e8: 0x6c7fba20, 0x1a1ea: 0x6d0bca20, 0x1a1eb: 0x6d1c0220, + 0x1a1ec: 0x6cc40820, 0x1a1ed: 0x6c4f5620, 0x1a1ee: 0x6c218c20, 0x1a1ef: 0x6d371e20, + 0x1a1f1: 0x6cf05620, 0x1a1f2: 0x6d0d0620, 0x1a1f3: 0x6cfe6a20, + 0x1a1f4: 0x6d194c20, 0x1a1f5: 0x6ca66a20, 0x1a1f6: 0x6d335c20, 0x1a1f7: 0x6c1fca20, + 0x1a1f9: 0x6cd23020, 0x1a1fa: 0x6c2f4a20, 0x1a1fb: 0x6d3ee020, + 0x1a1fc: 0x6c73e820, 0x1a1fd: 0x6d067620, 0x1a1fe: 0x6d255a20, + // Block 0x688, offset 0x1a200 + 0x1a201: 0x6d063020, 0x1a202: 0x6c2a0220, 0x1a203: 0x6ce48620, + 0x1a204: 0x6c448020, 0x1a205: 0x6d14b420, 0x1a206: 0x6c532420, 0x1a207: 0x6d13dc20, + 0x1a209: 0x6c851220, 0x1a20a: 0x6c7a3820, 0x1a20b: 0x6cfc0820, + 0x1a20c: 0x6cdbbe20, 0x1a20d: 0x6cf87620, 0x1a20e: 0x6d088620, + 0x1a211: 0x6c2b2a20, 0x1a212: 0x6c7f0420, 0x1a213: 0x6d387e20, + 0x1a214: 0x6ca76420, 0x1a215: 0x6c19f820, 0x1a216: 0x6c668620, 0x1a217: 0x6c09ba20, + 0x1a218: 0x6d3bc820, 0x1a219: 0x6c8d1620, 0x1a21a: 0x6c504e20, 0x1a21b: 0x6c058020, + 0x1a21c: 0x6ce10a20, 0x1a21d: 0x6c1ac220, 0x1a21e: 0x6c96c820, 0x1a21f: 0x6cfce420, + 0x1a220: 0x6cd69420, 0x1a221: 0x6d1da020, 0x1a222: 0x6cc12c20, + 0x1a224: 0x6cb44c20, 0x1a225: 0x6c5c2020, 0x1a226: 0x6cef3620, 0x1a227: 0x6d161620, + 0x1a228: 0x6d134c20, 0x1a22a: 0x6c184820, 0x1a22b: 0x6c4ff820, + 0x1a22c: 0x6c0d5a20, 0x1a22e: 0x6cfd3620, 0x1a22f: 0x6c155e20, + 0x1a230: 0x6c5d4e20, 0x1a232: 0x6c4ebc20, 0x1a233: 0x6c224220, + 0x1a234: 0x6d33ec20, 0x1a235: 0x6cb5f220, 0x1a236: 0x6c7c7e20, 0x1a237: 0x6cc75620, + 0x1a239: 0x6d1bca20, 0x1a23a: 0x6d047e20, + 0x1a23c: 0x6c55a020, 0x1a23d: 0x6c250620, 0x1a23f: 0x6cc3fc20, + // Block 0x689, offset 0x1a240 + 0x1a240: 0x6c2b9220, 0x1a241: 0x6cf53020, 0x1a242: 0x6cbfd020, + 0x1a244: 0x6d0eee20, 0x1a245: 0x6c8a5020, 0x1a246: 0x6c08a620, + 0x1a248: 0x6c0d7220, 0x1a24a: 0x6d252c20, 0x1a24b: 0x6caaa620, + 0x1a24c: 0x6c05c620, 0x1a24d: 0x6d1cf220, 0x1a24e: 0x6c536c20, 0x1a24f: 0x6c225820, + 0x1a250: 0x6cb87220, 0x1a251: 0x6ce35a20, 0x1a252: 0x6d23b220, 0x1a253: 0x6c824c20, + 0x1a254: 0x6c05d020, 0x1a256: 0x6c625620, 0x1a257: 0x6c3ee820, + 0x1a258: 0x6cfd0420, 0x1a259: 0x6c133820, 0x1a25a: 0x6c550620, 0x1a25b: 0x6ccb6620, + 0x1a25c: 0x6c080a20, 0x1a25d: 0x6cbe5620, 0x1a25e: 0x6d22a020, 0x1a25f: 0x6cebf620, + 0x1a260: 0x6c007a20, 0x1a261: 0x6c4e3c20, 0x1a262: 0x6c28d020, 0x1a263: 0x6c444620, + 0x1a264: 0x6c2b9c20, 0x1a265: 0x6c5e2020, 0x1a266: 0x6cace420, + 0x1a268: 0x6d3c6a20, 0x1a269: 0x6c8d7c20, 0x1a26a: 0x6c970820, 0x1a26b: 0x6c974820, + 0x1a26c: 0x6c888c20, 0x1a26d: 0x6cff4220, 0x1a26e: 0x6d093220, 0x1a26f: 0x6d327820, + 0x1a270: 0x6cb3b820, 0x1a271: 0x6c408e20, 0x1a272: 0x6caa0e20, 0x1a273: 0x6cf93220, + 0x1a274: 0x6c338e20, 0x1a275: 0x6c28f020, 0x1a276: 0x6d280c20, 0x1a277: 0x6cfd5220, + 0x1a278: 0x6d1b3020, 0x1a279: 0x6cd52220, 0x1a27a: 0x6c339420, 0x1a27b: 0x6c086820, + 0x1a27c: 0x6c56e620, 0x1a27d: 0x6c3a5420, 0x1a27e: 0x6c3aa820, 0x1a27f: 0x6d28be20, + // Block 0x68a, offset 0x1a280 + 0x1a280: 0x6c075620, 0x1a281: 0x6c3a2820, 0x1a282: 0x6cfab820, 0x1a283: 0x6cd3ae20, + 0x1a284: 0x6c9e3020, 0x1a285: 0x6d2e0820, 0x1a286: 0x6d2e0a20, 0x1a287: 0x6d2d8c20, + 0x1a288: 0x6c5c4820, 0x1a289: 0x6c3f8820, 0x1a28a: 0x6ced5a20, 0x1a28b: 0x6ca0b420, + 0x1a28c: 0x6cbc1020, 0x1a28d: 0x6c8a8a20, 0x1a28f: 0x6c9f1e20, + 0x1a290: 0x6c54d820, 0x1a291: 0x6c535e20, 0x1a292: 0x6d213c20, 0x1a293: 0x6cb60820, + 0x1a294: 0x6c350420, 0x1a295: 0x6c020020, 0x1a297: 0x6c03ba20, + 0x1a298: 0x6c2c7820, 0x1a299: 0x6d08aa20, 0x1a29a: 0x6c2c8a20, 0x1a29b: 0x6c0a0e20, + 0x1a29c: 0x6d393e20, 0x1a29d: 0x6cad6020, 0x1a29e: 0x6ce5f620, 0x1a29f: 0x6d155020, + 0x1a2a1: 0x6c63ea20, 0x1a2a2: 0x6d36f220, 0x1a2a3: 0x6ce8f820, + 0x1a2a4: 0x6d00f820, 0x1a2a5: 0x6c28ba20, 0x1a2a6: 0x6ce5a620, 0x1a2a7: 0x6d022620, + 0x1a2a8: 0x6c172620, 0x1a2a9: 0x6d25f220, 0x1a2aa: 0x6c496a20, 0x1a2ab: 0x6c89a420, + 0x1a2ac: 0x6c083220, 0x1a2ae: 0x6c930020, 0x1a2af: 0x6c60e420, + 0x1a2b0: 0x6d08c220, 0x1a2b1: 0x6cd62420, 0x1a2b2: 0x6c318220, 0x1a2b3: 0x6cd9f420, + 0x1a2b4: 0x6c55e220, 0x1a2b5: 0x6d286420, 0x1a2b6: 0x6c160820, 0x1a2b7: 0x6c054620, + 0x1a2b8: 0x6cc6da20, 0x1a2b9: 0x6c359c20, 0x1a2ba: 0x6cf24020, 0x1a2bb: 0x6c03ca20, + 0x1a2bc: 0x6c3cc220, 0x1a2bd: 0x6d209e20, 0x1a2be: 0x6d310c20, 0x1a2bf: 0x6c3bae20, + // Block 0x68b, offset 0x1a2c0 + 0x1a2c0: 0x6c496c20, 0x1a2c1: 0x6c104c20, 0x1a2c2: 0x6c446220, 0x1a2c3: 0x6c33c420, + 0x1a2c4: 0x6c5a3420, 0x1a2c5: 0x6c31f820, 0x1a2c6: 0x6ce3ce20, 0x1a2c7: 0x6c0fcc20, + 0x1a2c8: 0x6cba8a20, 0x1a2c9: 0x6c8b8220, 0x1a2ca: 0x6c901620, 0x1a2cb: 0x6cf13420, + 0x1a2cc: 0x6d2eac20, 0x1a2cd: 0x6c801820, 0x1a2ce: 0x6cdbea20, 0x1a2cf: 0x6ca36020, + 0x1a2d0: 0x6c0a1020, 0x1a2d1: 0x6ceb3e20, 0x1a2d2: 0x6d3b1a20, 0x1a2d3: 0x6c2e5c20, + 0x1a2d4: 0x6c104620, 0x1a2d5: 0x6c716820, 0x1a2d6: 0x6cb3b020, 0x1a2d7: 0x6cfa0c20, + 0x1a2d8: 0x6cf04420, 0x1a2d9: 0x6cb3b420, 0x1a2da: 0x6c267420, 0x1a2db: 0x6c387220, + 0x1a2dc: 0x6c14e420, 0x1a2dd: 0x6c56f020, 0x1a2de: 0x6d28c020, + 0x1a2e4: 0x6c38f020, 0x1a2e5: 0x6d028a20, 0x1a2e6: 0x6c536020, 0x1a2e7: 0x6c1b2e20, + 0x1a2e8: 0x6c05c820, 0x1a2e9: 0x6d1a7a20, 0x1a2eb: 0x6c6dd220, + 0x1a2ec: 0x6c0f6820, 0x1a2ed: 0x6cc88820, 0x1a2ee: 0x6c1e3a20, 0x1a2ef: 0x6d1c1220, + 0x1a2f0: 0x6d143a20, 0x1a2f1: 0x6c411820, 0x1a2f2: 0x6c7d6c20, 0x1a2f3: 0x6d27f020, + 0x1a2f4: 0x6d31ec20, 0x1a2f5: 0x6d0b5a20, 0x1a2f6: 0x6c70b820, 0x1a2f7: 0x6c547a20, + 0x1a2f8: 0x6c9f7620, 0x1a2f9: 0x6c040220, 0x1a2fa: 0x6c441c20, 0x1a2fb: 0x6c0bb220, + 0x1a2fc: 0x6d3d0820, 0x1a2fd: 0x6c505420, 0x1a2fe: 0x6d31ee20, 0x1a2ff: 0x6cd14a20, + // Block 0x68c, offset 0x1a300 + 0x1a300: 0x6c44a020, 0x1a301: 0x6c0a3e20, 0x1a302: 0x6c34b220, 0x1a303: 0x6c216820, + 0x1a304: 0x6c1fb220, 0x1a305: 0x6cca5a20, 0x1a306: 0x6c1a4620, 0x1a307: 0x6cc48a20, + 0x1a308: 0x6c191220, 0x1a309: 0x6c99b820, 0x1a30a: 0x6cadf220, 0x1a30b: 0x6ceec220, + 0x1a30c: 0x6cb07420, 0x1a30d: 0x6c3f8c20, 0x1a30e: 0x6d3d0e20, 0x1a30f: 0x6cb53c20, + 0x1a310: 0x6c8bec20, 0x1a311: 0x6d142020, 0x1a312: 0x6c9adc20, 0x1a313: 0x6cf3f820, + 0x1a314: 0x6cb7fa20, 0x1a315: 0x6c2f0020, 0x1a316: 0x6c191a20, 0x1a317: 0x6cfa0e20, + 0x1a318: 0x6c518e20, 0x1a319: 0x6cca9220, 0x1a31a: 0x6c487e20, 0x1a31b: 0x6c543e20, + 0x1a31c: 0x6c023420, 0x1a31d: 0x6c3f9420, 0x1a31e: 0x6cbbc620, 0x1a31f: 0x6c5d4c20, + 0x1a320: 0x6cafa220, 0x1a321: 0x6d0cf820, 0x1a322: 0x6cd84420, 0x1a323: 0x6cf7b420, + 0x1a324: 0x6ca02420, 0x1a325: 0x6c7ce420, 0x1a326: 0x6c445620, + 0x1a328: 0x6c02fc20, 0x1a329: 0x6cca4220, 0x1a32a: 0x6cd6ee20, 0x1a32b: 0x6c90d820, + 0x1a32c: 0x6d320620, 0x1a32d: 0x6c5c9a20, 0x1a32e: 0x6c156620, + 0x1a330: 0x6c8c8420, 0x1a331: 0x6ca2ee20, 0x1a332: 0x6c4f3c20, 0x1a333: 0x6c31fc20, + 0x1a334: 0x6c6d7820, 0x1a335: 0x6c9df420, 0x1a336: 0x6c38fa20, 0x1a337: 0x6c370020, + 0x1a338: 0x6c174220, 0x1a339: 0x6c536220, 0x1a33a: 0x6c536e20, 0x1a33b: 0x6d238820, + 0x1a33c: 0x6d096a20, 0x1a33d: 0x6cad3a20, 0x1a33e: 0x6c088220, 0x1a33f: 0x6c175220, + // Block 0x68d, offset 0x1a340 + 0x1a340: 0x6d1fe220, 0x1a341: 0x6d153a20, 0x1a342: 0x6d096e20, 0x1a343: 0x6cc97e20, + 0x1a344: 0x6d073420, 0x1a345: 0x6c866820, 0x1a346: 0x6c868a20, 0x1a347: 0x6d263220, + 0x1a348: 0x6c336220, 0x1a349: 0x6c5e0420, 0x1a34a: 0x6ccc7e20, 0x1a34b: 0x6c838c20, + 0x1a34c: 0x6cb3ce20, 0x1a34d: 0x6c550e20, 0x1a34e: 0x6c4c8e20, 0x1a34f: 0x6c10c420, + 0x1a350: 0x6cc8a620, 0x1a351: 0x6cf0fa20, 0x1a352: 0x6cd9f620, 0x1a353: 0x6c01dc20, + 0x1a354: 0x6d21cc20, 0x1a355: 0x6cfd8e20, 0x1a356: 0x6c527c20, 0x1a357: 0x6d0fea20, + 0x1a358: 0x6cff4420, 0x1a359: 0x6d116820, 0x1a35b: 0x6c0ac020, + 0x1a35d: 0x6c528420, 0x1a35e: 0x6ce25620, 0x1a35f: 0x6c8eee20, + 0x1a361: 0x6d3b3420, 0x1a363: 0x6cf89a20, + 0x1a364: 0x6d298e20, 0x1a365: 0x6d17d420, 0x1a366: 0x6c312a20, 0x1a367: 0x6d259020, + 0x1a368: 0x6c700820, 0x1a36a: 0x6c0f2020, 0x1a36b: 0x6ce35c20, + 0x1a36c: 0x6d1d0220, 0x1a36e: 0x6d154020, 0x1a36f: 0x6ca70420, + 0x1a370: 0x6ccee220, 0x1a371: 0x6c07c020, 0x1a372: 0x6c465620, 0x1a373: 0x6c04d420, + 0x1a374: 0x6ca14820, 0x1a375: 0x6c410420, 0x1a376: 0x6c372620, 0x1a377: 0x6ccf2e20, + 0x1a379: 0x6d36d620, 0x1a37a: 0x6d106c20, 0x1a37b: 0x6c66ca20, + 0x1a37c: 0x6d263420, 0x1a37d: 0x6cd73020, 0x1a37e: 0x6ce38420, 0x1a37f: 0x6cf02020, + // Block 0x68e, offset 0x1a380 + 0x1a380: 0x6d0aaa20, 0x1a381: 0x6d36f620, 0x1a382: 0x6d18bc20, 0x1a383: 0x6cc59c20, + 0x1a384: 0x6cd3ee20, 0x1a385: 0x6c55d420, 0x1a386: 0x6ca55620, 0x1a387: 0x6d126a20, + 0x1a388: 0x6c66f820, 0x1a389: 0x6cdc1220, 0x1a38a: 0x6d1d1e20, 0x1a38b: 0x6c061a20, + 0x1a38c: 0x6c55e420, 0x1a38d: 0x6c55e620, 0x1a38e: 0x6d137a20, + 0x1a390: 0x6d107420, 0x1a391: 0x6c888e20, 0x1a392: 0x6cf72620, 0x1a393: 0x6c372820, + 0x1a394: 0x6c331c20, 0x1a395: 0x6d297e20, 0x1a396: 0x6d3b4420, 0x1a397: 0x6d1d2820, + 0x1a398: 0x6d1d2c20, 0x1a399: 0x6c6cca20, 0x1a39a: 0x6c208820, 0x1a39b: 0x6c28ec20, + 0x1a39d: 0x6c7b4a20, 0x1a39e: 0x6d196020, 0x1a39f: 0x6d139a20, + 0x1a3a0: 0x6c662e20, 0x1a3a1: 0x6c372a20, 0x1a3a2: 0x6ca93e20, 0x1a3a3: 0x6c228820, + 0x1a3a4: 0x6cba3420, 0x1a3a5: 0x6d098220, 0x1a3a6: 0x6c0ea420, 0x1a3a7: 0x6c9d1420, + 0x1a3a8: 0x6cd73a20, 0x1a3a9: 0x6ca0a620, 0x1a3aa: 0x6c897c20, 0x1a3ab: 0x6cb71820, + 0x1a3ac: 0x6cb71a20, 0x1a3ad: 0x6cd44c20, 0x1a3ae: 0x6c3f2020, 0x1a3af: 0x6c0f3a20, + 0x1a3b0: 0x6c085820, 0x1a3b1: 0x6c0d0020, 0x1a3b2: 0x6d161c20, 0x1a3b3: 0x6cf13a20, + 0x1a3b4: 0x6c587e20, 0x1a3b5: 0x6c38ac20, 0x1a3b6: 0x6cb60e20, 0x1a3b7: 0x6c98f620, + 0x1a3b8: 0x6c060820, 0x1a3b9: 0x6c020420, 0x1a3ba: 0x6c020a20, 0x1a3bb: 0x6c403020, + 0x1a3bc: 0x6cb63020, 0x1a3bd: 0x6cc45020, 0x1a3be: 0x6ceb4020, 0x1a3bf: 0x6d187420, + // Block 0x68f, offset 0x1a3c0 + 0x1a3c0: 0x6c0f5420, 0x1a3c1: 0x6cb12820, 0x1a3c2: 0x6c039220, + 0x1a3c4: 0x6d082220, 0x1a3c7: 0x6d23fe20, + 0x1a3c8: 0x6c1b5620, 0x1a3c9: 0x6c915e20, 0x1a3ca: 0x6d156820, 0x1a3cb: 0x6c868c20, + 0x1a3cd: 0x6ca7b020, 0x1a3ce: 0x6cf90220, 0x1a3cf: 0x6cf3fa20, + 0x1a3d1: 0x6c834a20, 0x1a3d2: 0x6cb41a20, 0x1a3d3: 0x6d3d1220, + 0x1a3d4: 0x6d417e20, 0x1a3d5: 0x6d3dc620, 0x1a3d6: 0x6c168220, 0x1a3d7: 0x6c01de20, + 0x1a3d8: 0x6c377220, 0x1a3d9: 0x6d244620, 0x1a3da: 0x6c839c20, 0x1a3db: 0x6c408220, + 0x1a3dc: 0x6d2c6420, 0x1a3dd: 0x6c5d0a20, 0x1a3de: 0x6c218e20, 0x1a3df: 0x6cd9fe20, + 0x1a3e0: 0x6c089a20, 0x1a3e1: 0x6c0ab420, 0x1a3e2: 0x6d2c6620, + 0x1a3e4: 0x6c519e20, 0x1a3e5: 0x6c873a20, 0x1a3e7: 0x6c4f3220, + 0x1a3e8: 0x6d292220, 0x1a3e9: 0x6c474a20, 0x1a3ea: 0x6c1a5e20, 0x1a3eb: 0x6c90dc20, + 0x1a3ec: 0x6ca19e20, 0x1a3ed: 0x6c9daa20, 0x1a3ee: 0x6c975020, 0x1a3ef: 0x6c030420, + 0x1a3f0: 0x6d30c020, 0x1a3f1: 0x6d3a3a20, 0x1a3f2: 0x6c5a3820, 0x1a3f3: 0x6c38f620, + 0x1a3f4: 0x6c2b0220, 0x1a3f5: 0x6ce7a420, 0x1a3f7: 0x6c320220, + 0x1a3f8: 0x6cf33620, 0x1a3f9: 0x6cf13020, 0x1a3fa: 0x6c62f620, 0x1a3fb: 0x6c1ca020, + 0x1a3fc: 0x6c8c1220, 0x1a3fd: 0x6c0c6420, 0x1a3fe: 0x6c901e20, 0x1a3ff: 0x6c664a20, + // Block 0x690, offset 0x1a400 + 0x1a400: 0x6ca8da20, 0x1a401: 0x6c959e20, 0x1a402: 0x6cd03420, + 0x1a404: 0x6c487a20, 0x1a405: 0x6ca8a820, 0x1a406: 0x6d178a20, 0x1a407: 0x6c7a4820, + 0x1a408: 0x6cece220, 0x1a409: 0x6cebee20, 0x1a40a: 0x6cb87620, 0x1a40b: 0x6c0f5620, + 0x1a40c: 0x6c779220, 0x1a40d: 0x6c8d5020, 0x1a40e: 0x6c423020, 0x1a40f: 0x6c487820, + 0x1a410: 0x6c4d2c20, 0x1a411: 0x6c7bb020, 0x1a412: 0x6c527420, 0x1a413: 0x6c7c4620, + 0x1a414: 0x6d2b0a20, 0x1a415: 0x6ce64e20, 0x1a416: 0x6c80ee20, 0x1a417: 0x6c0a8020, + 0x1a418: 0x6c595a20, 0x1a419: 0x6cb3aa20, 0x1a41a: 0x6d11de20, 0x1a41b: 0x6cedaa20, + 0x1a41c: 0x6ce43c20, 0x1a41d: 0x6cdc1620, 0x1a41e: 0x6c7ad020, 0x1a41f: 0x6c337e20, + 0x1a420: 0x6c02b620, 0x1a421: 0x6c671620, 0x1a422: 0x6ca09c20, 0x1a423: 0x6c7d4220, + 0x1a424: 0x6c7b4c20, 0x1a425: 0x6c01e620, 0x1a426: 0x6c96ea20, 0x1a427: 0x6cbeaa20, + 0x1a428: 0x6cbb8820, 0x1a42a: 0x6c77b820, 0x1a42b: 0x6c508220, + 0x1a42c: 0x6c34c820, 0x1a42d: 0x6cfaa820, 0x1a42e: 0x6ca37c20, 0x1a42f: 0x6cdd3420, + 0x1a430: 0x6c6bf820, 0x1a431: 0x6caf8220, 0x1a432: 0x6cabcc20, 0x1a433: 0x6cd93020, + 0x1a434: 0x6c16bc20, 0x1a435: 0x6ca86c20, 0x1a436: 0x6c977620, 0x1a437: 0x6cd93e20, + 0x1a438: 0x6c22e420, 0x1a439: 0x6cfae420, 0x1a43a: 0x6c7e2420, + 0x1a43c: 0x6c2b9e20, 0x1a43d: 0x6cb3e420, 0x1a43e: 0x6ce5ac20, 0x1a43f: 0x6d40f420, + // Block 0x691, offset 0x1a440 + 0x1a440: 0x6cf2c820, 0x1a441: 0x6c3ae420, 0x1a442: 0x6c115020, 0x1a443: 0x6caee220, + 0x1a444: 0x6cc9d620, 0x1a446: 0x6cc76e20, 0x1a447: 0x6cb68620, + 0x1a448: 0x6c25fc20, 0x1a449: 0x6cac8e20, 0x1a44a: 0x6c0fc020, 0x1a44b: 0x6c979c20, + 0x1a44c: 0x6d401420, 0x1a44d: 0x6c22f220, 0x1a44e: 0x6c7d4420, 0x1a44f: 0x6c62f820, + 0x1a450: 0x6c801420, 0x1a452: 0x6c9bc220, 0x1a453: 0x6c9df820, + 0x1a454: 0x6cac9620, 0x1a455: 0x6c91aa20, 0x1a456: 0x6d416020, + 0x1a458: 0x6c8ee220, 0x1a459: 0x6d160020, 0x1a45a: 0x6cf1a820, 0x1a45b: 0x6c866c20, + 0x1a45c: 0x6c868e20, 0x1a45d: 0x6d2bb820, 0x1a45e: 0x6d3a9220, 0x1a45f: 0x6c5cfc20, + 0x1a460: 0x6cd03c20, 0x1a461: 0x6c1c6620, 0x1a462: 0x6d043c20, 0x1a463: 0x6cee3a20, + 0x1a464: 0x6c302020, 0x1a465: 0x6c5e2220, 0x1a466: 0x6cb07a20, 0x1a467: 0x6c551420, + 0x1a468: 0x6c9ab420, 0x1a469: 0x6c17f420, 0x1a46a: 0x6c9ab820, 0x1a46b: 0x6c175820, + 0x1a46c: 0x6c719620, 0x1a46d: 0x6caa3420, 0x1a46f: 0x6d197620, + 0x1a470: 0x6cc7f020, 0x1a471: 0x6c8e0420, 0x1a472: 0x6d0bba20, + 0x1a474: 0x6cb7bc20, 0x1a475: 0x6d3e7620, 0x1a477: 0x6c058c20, + 0x1a478: 0x6c45aa20, 0x1a479: 0x6d2af620, 0x1a47a: 0x6c6bfe20, 0x1a47b: 0x6d219a20, + 0x1a47c: 0x6cbd9820, 0x1a47d: 0x6c075820, 0x1a47e: 0x6c035820, 0x1a47f: 0x6ceb5020, + // Block 0x692, offset 0x1a480 + 0x1a480: 0x6d0f6c20, 0x1a481: 0x6cbbfc20, 0x1a482: 0x6d1ff220, 0x1a483: 0x6d36fa20, + 0x1a484: 0x6c6c0a20, 0x1a485: 0x6ca16a20, 0x1a486: 0x6cd12420, 0x1a487: 0x6ccdb820, + 0x1a488: 0x6cb65620, 0x1a489: 0x6ccdba20, 0x1a48a: 0x6c9d0420, 0x1a48b: 0x6c460220, + 0x1a48c: 0x6d157c20, 0x1a48d: 0x6c453e20, 0x1a48e: 0x6c454020, 0x1a48f: 0x6ce82020, + 0x1a490: 0x6c3dac20, 0x1a491: 0x6d092220, 0x1a492: 0x6d137e20, 0x1a493: 0x6ce69a20, + 0x1a494: 0x6ce5ae20, 0x1a495: 0x6ca1f620, 0x1a496: 0x6c8ec620, 0x1a497: 0x6c117e20, + 0x1a498: 0x6c848020, 0x1a499: 0x6cd51820, 0x1a49a: 0x6c932420, 0x1a49b: 0x6c5e3a20, + 0x1a49c: 0x6c263c20, 0x1a49d: 0x6cac1220, 0x1a49e: 0x6c8ed420, 0x1a49f: 0x6c72b820, + 0x1a4a0: 0x6d2e9220, 0x1a4a1: 0x6c718220, 0x1a4a2: 0x6d330a20, 0x1a4a3: 0x6d40f820, + 0x1a4a4: 0x6cfd3820, 0x1a4a5: 0x6d375020, + 0x1a4a8: 0x6c7eb020, 0x1a4ab: 0x6c7ebe20, + 0x1a4ac: 0x6d060a20, 0x1a4ad: 0x6c454220, 0x1a4ae: 0x6c35a220, 0x1a4af: 0x6ca21e20, + 0x1a4b0: 0x6d384a20, 0x1a4b1: 0x6ce3aa20, 0x1a4b2: 0x6d25ce20, 0x1a4b3: 0x6d2dc020, + 0x1a4b4: 0x6c454420, 0x1a4b5: 0x6cf24420, 0x1a4b6: 0x6c80f420, 0x1a4b7: 0x6d21f620, + 0x1a4b8: 0x6cda0820, 0x1a4b9: 0x6d2ca020, 0x1a4ba: 0x6c4d3620, 0x1a4bb: 0x6c576e20, + 0x1a4bc: 0x6d2e3e20, 0x1a4be: 0x6c90de20, 0x1a4bf: 0x6c165020, + // Block 0x693, offset 0x1a4c0 + 0x1a4c0: 0x6d376c20, 0x1a4c1: 0x6cf12820, 0x1a4c2: 0x6d083c20, 0x1a4c3: 0x6d2a6420, + 0x1a4c4: 0x6c9f8620, 0x1a4c5: 0x6c4aac20, 0x1a4c6: 0x6cda7020, + 0x1a4c9: 0x6cd85420, 0x1a4ca: 0x6c352820, 0x1a4cb: 0x6c134220, + 0x1a4cc: 0x6c7b7a20, 0x1a4cd: 0x6ce2dc20, 0x1a4ce: 0x6ca57c20, 0x1a4cf: 0x6c819620, + 0x1a4d0: 0x6c920820, 0x1a4d1: 0x6d159e20, 0x1a4d2: 0x6d029220, 0x1a4d3: 0x6d0e2a20, + 0x1a4d4: 0x6cbe9820, 0x1a4d5: 0x6cb42420, 0x1a4d6: 0x6c1e1220, 0x1a4d7: 0x6cfbe020, + 0x1a4d8: 0x6c497020, 0x1a4d9: 0x6c6b8a20, 0x1a4da: 0x6c7f8220, 0x1a4db: 0x6c9bca20, + 0x1a4dc: 0x6d13ac20, 0x1a4de: 0x6c869420, 0x1a4df: 0x6d1b8420, + 0x1a4e0: 0x6c212620, 0x1a4e1: 0x6cbfde20, 0x1a4e2: 0x6ce2d220, 0x1a4e3: 0x6d21f820, + 0x1a4e6: 0x6c278420, 0x1a4e7: 0x6c327420, + 0x1a4e8: 0x6c537e20, 0x1a4ea: 0x6cf8c220, + 0x1a4ec: 0x6cb64820, 0x1a4ee: 0x6d25a620, 0x1a4ef: 0x6c609e20, + 0x1a4f0: 0x6d285020, 0x1a4f1: 0x6c39dc20, 0x1a4f2: 0x6c45ac20, 0x1a4f3: 0x6c4f8820, + 0x1a4f4: 0x6d326620, 0x1a4f5: 0x6cc3f620, + 0x1a4f8: 0x6c6c0220, 0x1a4f9: 0x6cb02020, 0x1a4fa: 0x6c423220, 0x1a4fb: 0x6d082820, + 0x1a4fc: 0x6cd11420, 0x1a4fd: 0x6cd28c20, 0x1a4fe: 0x6cbc2a20, 0x1a4ff: 0x6c227020, + // Block 0x694, offset 0x1a500 + 0x1a500: 0x6c2eee20, 0x1a501: 0x6c0f7220, 0x1a502: 0x6c2de620, 0x1a503: 0x6ced5020, + 0x1a504: 0x6c227220, 0x1a505: 0x6d355420, 0x1a506: 0x6c041220, 0x1a507: 0x6cf47e20, + 0x1a508: 0x6c061820, 0x1a509: 0x6c28be20, 0x1a50a: 0x6c039420, 0x1a50b: 0x6ce79620, + 0x1a50d: 0x6c45bc20, 0x1a50e: 0x6c702e20, 0x1a50f: 0x6c4b8620, + 0x1a510: 0x6c22e820, 0x1a511: 0x6d1ff420, 0x1a512: 0x6d25ba20, 0x1a513: 0x6c81be20, + 0x1a514: 0x6c716e20, 0x1a515: 0x6c3f1820, 0x1a516: 0x6ca88e20, 0x1a517: 0x6c358c20, + 0x1a518: 0x6c358e20, 0x1a519: 0x6d040e20, 0x1a51a: 0x6c771620, 0x1a51b: 0x6d0ee220, + 0x1a51c: 0x6ce90220, 0x1a51d: 0x6cb3f820, 0x1a51e: 0x6c083820, 0x1a51f: 0x6ca02620, + 0x1a520: 0x6cd73620, 0x1a521: 0x6d0ef220, 0x1a522: 0x6cb68c20, 0x1a523: 0x6d25ca20, + 0x1a524: 0x6c0cca20, 0x1a526: 0x6d07f220, 0x1a527: 0x6c544220, + 0x1a528: 0x6c5a3020, 0x1a529: 0x6d10c220, 0x1a52a: 0x6c73a220, 0x1a52b: 0x6c7cb220, + 0x1a52c: 0x6c36de20, 0x1a52d: 0x6c60f620, 0x1a52e: 0x6ca19220, 0x1a52f: 0x6c1d2e20, + 0x1a530: 0x6c062220, 0x1a531: 0x6cf54e20, 0x1a532: 0x6d327a20, 0x1a533: 0x6d076620, + 0x1a534: 0x6cdee820, 0x1a535: 0x6c1c9620, 0x1a536: 0x6cf74a20, 0x1a537: 0x6c23d220, + 0x1a538: 0x6c968620, 0x1a539: 0x6c7a1020, 0x1a53a: 0x6d0f0820, 0x1a53b: 0x6c11c420, + 0x1a53d: 0x6c520e20, 0x1a53e: 0x6c2ac620, 0x1a53f: 0x6cc49e20, + // Block 0x695, offset 0x1a540 + 0x1a540: 0x6ce7a820, 0x1a541: 0x6d248c20, 0x1a542: 0x6cfe7020, 0x1a543: 0x6ca4d820, + 0x1a544: 0x6cd76420, 0x1a545: 0x6c3bb220, 0x1a546: 0x6cb47820, 0x1a547: 0x6c8dba20, + 0x1a548: 0x6c02ba20, 0x1a549: 0x6c58d020, 0x1a54a: 0x6d15a020, 0x1a54b: 0x6c58d220, + 0x1a54c: 0x6c9bc620, 0x1a54d: 0x6d1c4e20, 0x1a54e: 0x6c831820, 0x1a54f: 0x6d0f2e20, + 0x1a550: 0x6c062820, 0x1a551: 0x6c2f2c20, 0x1a552: 0x6c8e0620, 0x1a553: 0x6cd1f820, + 0x1a554: 0x6c689020, 0x1a555: 0x6c8b4420, 0x1a556: 0x6c6dee20, 0x1a557: 0x6c718c20, + 0x1a558: 0x6ce30a20, 0x1a559: 0x6cb0e620, 0x1a55a: 0x6c42a620, 0x1a55b: 0x6cff3420, + 0x1a55c: 0x6cec5e20, 0x1a55d: 0x6c1fd420, 0x1a55e: 0x6c2bc420, 0x1a55f: 0x6c588e20, + 0x1a560: 0x6d11d220, 0x1a561: 0x6c866e20, 0x1a562: 0x6c9c7020, 0x1a563: 0x6c550a20, + 0x1a564: 0x6cd11620, 0x1a565: 0x6c638a20, 0x1a566: 0x6d1aa620, 0x1a567: 0x6ceec620, + 0x1a569: 0x6cb18e20, 0x1a56a: 0x6c934420, 0x1a56b: 0x6c8dbc20, + 0x1a56c: 0x6d184420, 0x1a56d: 0x6c111620, 0x1a56e: 0x6ccd9820, 0x1a56f: 0x6c54fe20, + 0x1a570: 0x6cd53620, 0x1a571: 0x6cead420, 0x1a572: 0x6ca16e20, 0x1a573: 0x6c575820, + 0x1a574: 0x6ce61a20, 0x1a575: 0x6c0dfe20, 0x1a576: 0x6caee620, 0x1a577: 0x6c5d0820, + 0x1a578: 0x6c3dae20, 0x1a579: 0x6c4cdc20, 0x1a57a: 0x6c10d020, 0x1a57b: 0x6c849820, + 0x1a57c: 0x6c163e20, 0x1a57d: 0x6cb03420, 0x1a57e: 0x6c260020, 0x1a57f: 0x6c9bb220, + // Block 0x696, offset 0x1a580 + 0x1a580: 0x6cddc020, 0x1a581: 0x6cbb6020, 0x1a582: 0x6d34c420, 0x1a583: 0x6c7c2420, + 0x1a584: 0x6c08a820, 0x1a585: 0x6c029220, 0x1a586: 0x6c9bc820, 0x1a587: 0x6cfd0620, + 0x1a588: 0x6c7ab420, 0x1a589: 0x6ce7fc20, 0x1a58a: 0x6ce93c20, 0x1a58b: 0x6cf04a20, + 0x1a58c: 0x6cfaf820, 0x1a58e: 0x6ce94220, 0x1a58f: 0x6c81cc20, + 0x1a590: 0x6c162220, 0x1a591: 0x6ca6c420, 0x1a592: 0x6ca6d020, 0x1a593: 0x6c845220, + 0x1a594: 0x6c304620, 0x1a595: 0x6c72c620, 0x1a596: 0x6cba8620, 0x1a597: 0x6c0fc620, + 0x1a598: 0x6cccac20, 0x1a599: 0x6d2c0e20, 0x1a59a: 0x6ce25e20, 0x1a59b: 0x6cba8c20, + 0x1a59c: 0x6ca9ee20, 0x1a59d: 0x6d181620, 0x1a59e: 0x6c6e9e20, 0x1a59f: 0x6c41e820, + 0x1a5a0: 0x6c2ba020, 0x1a5a1: 0x6c65de20, 0x1a5a2: 0x6c9ab020, 0x1a5a3: 0x6c26c420, + 0x1a5a4: 0x6c660620, 0x1a5a5: 0x6d244a20, 0x1a5a6: 0x6d024c20, 0x1a5a7: 0x6d294820, + 0x1a5a8: 0x6c988020, 0x1a5a9: 0x6c849a20, 0x1a5aa: 0x6c4c0a20, 0x1a5ab: 0x6d09ca20, + 0x1a5ac: 0x6cdedc20, 0x1a5ad: 0x6d310e20, 0x1a5ae: 0x6d107620, 0x1a5af: 0x6ce98620, + 0x1a5b0: 0x6cce2e20, 0x1a5b1: 0x6cf93e20, 0x1a5b2: 0x6cbbcc20, 0x1a5b3: 0x6cf13620, + 0x1a5b4: 0x6d1d6220, 0x1a5b5: 0x6c1fa820, 0x1a5b6: 0x6cc1ec20, 0x1a5b7: 0x6cebfa20, + 0x1a5b9: 0x6d343220, 0x1a5ba: 0x6ce6e420, 0x1a5bb: 0x6c47f820, + 0x1a5bc: 0x6cce3020, 0x1a5bd: 0x6c10ec20, 0x1a5be: 0x6c3f1a20, 0x1a5bf: 0x6ce61e20, + // Block 0x697, offset 0x1a5c0 + 0x1a5c0: 0x6cded220, 0x1a5c1: 0x6cdeea20, 0x1a5c2: 0x6d3da620, 0x1a5c3: 0x6c4e4020, + 0x1a5c4: 0x6cb2da20, 0x1a5c5: 0x6c519a20, 0x1a5c6: 0x6d3c7420, 0x1a5c7: 0x6d396e20, + 0x1a5c8: 0x6c0fd220, 0x1a5c9: 0x6c8eec20, 0x1a5ca: 0x6caa8c20, 0x1a5cb: 0x6cf71220, + 0x1a5cc: 0x6cada220, 0x1a5cd: 0x6c2cb420, 0x1a5ce: 0x6c50ac20, 0x1a5cf: 0x6ce44620, + 0x1a5d0: 0x6cec8020, 0x1a5d1: 0x6ce44a20, 0x1a5d2: 0x6cb66a20, 0x1a5d3: 0x6c62a820, + 0x1a5d4: 0x6c1b6620, 0x1a5d5: 0x6c03cc20, 0x1a5d6: 0x6c6d7020, 0x1a5d7: 0x6c78e820, + 0x1a5d8: 0x6c873e20, 0x1a5d9: 0x6c72c820, 0x1a5da: 0x6cc25620, 0x1a5db: 0x6c7ec820, + 0x1a5dc: 0x6c47f020, 0x1a5dd: 0x6cb88620, 0x1a5de: 0x6cb6b420, 0x1a5df: 0x6cfd5020, + 0x1a5e0: 0x6c664220, 0x1a5e1: 0x6cd29a20, 0x1a5e2: 0x6c655420, 0x1a5e3: 0x6c005e20, + 0x1a5e4: 0x6c577220, 0x1a5e5: 0x6d2c1420, 0x1a5e6: 0x6d2b2e20, 0x1a5e7: 0x6d11e820, + 0x1a5e8: 0x6d2dd820, 0x1a5e9: 0x6c630420, 0x1a5ea: 0x6c145c20, 0x1a5eb: 0x6d0f3420, + 0x1a5ec: 0x6c654c20, 0x1a5ee: 0x6d0e1020, + 0x1a5f0: 0x6c68a820, 0x1a5f1: 0x6ce7a220, 0x1a5f2: 0x6ca41820, 0x1a5f3: 0x6d271a20, + 0x1a5f5: 0x6c1b6e20, + // Block 0x698, offset 0x1a600 + 0x1a600: 0x6d13b620, 0x1a601: 0x6c2f4020, 0x1a602: 0x6c779820, 0x1a603: 0x6cb4c620, + 0x1a604: 0x6cce4620, 0x1a605: 0x6cfa2420, 0x1a606: 0x6c4e4c20, 0x1a607: 0x6ced6820, + 0x1a608: 0x6d2f1820, 0x1a609: 0x6cc9f220, 0x1a60a: 0x6cce4820, 0x1a60b: 0x6cfa2620, + 0x1a60c: 0x6c5e6220, 0x1a60d: 0x6c105620, 0x1a60e: 0x6d221020, 0x1a60f: 0x6c9dfa20, + 0x1a610: 0x6c411e20, 0x1a611: 0x6c1e1820, 0x1a612: 0x6c1e1a20, 0x1a613: 0x6d3b6c20, + 0x1a614: 0x6cbc8e20, 0x1a615: 0x6caf2220, 0x1a616: 0x6cd2ea20, 0x1a617: 0x6cd2e820, + 0x1a618: 0x6cbf9420, 0x1a619: 0x6c0dba20, 0x1a61a: 0x6d12b820, 0x1a61b: 0x6c237e20, + 0x1a61c: 0x6c2fd620, 0x1a61d: 0x6cd7b820, 0x1a61e: 0x6c19b020, 0x1a61f: 0x6c2fca20, + 0x1a620: 0x6cbf9620, 0x1a621: 0x6c898020, 0x1a622: 0x6c2fcc20, 0x1a623: 0x6d1f9a20, + 0x1a624: 0x6c898220, 0x1a625: 0x6d0c5420, 0x1a626: 0x6c0e0820, 0x1a627: 0x6cca9c20, + 0x1a628: 0x6c4bb620, 0x1a629: 0x6c6f3620, 0x1a62a: 0x6c447a20, 0x1a62b: 0x6d0ac420, + 0x1a62c: 0x6cbb0220, 0x1a62d: 0x6d378220, 0x1a62e: 0x6c611020, 0x1a62f: 0x6c6ba220, + 0x1a630: 0x6c3c0c20, 0x1a631: 0x6c497420, 0x1a632: 0x6c202c20, 0x1a633: 0x6c159620, + 0x1a634: 0x6c8ba220, 0x1a635: 0x6d3d3620, 0x1a636: 0x6d3a5220, 0x1a637: 0x6c4d0420, + 0x1a638: 0x6cecb420, 0x1a639: 0x6c27b220, 0x1a63a: 0x6cf06a20, 0x1a63b: 0x6d3a5420, + 0x1a63c: 0x6c6e0020, 0x1a63d: 0x6c857420, 0x1a63e: 0x6c71aa20, 0x1a63f: 0x6cb1dc20, + // Block 0x699, offset 0x1a640 + 0x1a640: 0x6c3dc220, 0x1a641: 0x6d144620, 0x1a642: 0x6d163420, 0x1a643: 0x6ca38c20, + 0x1a644: 0x6cf55020, 0x1a645: 0x6c6f9c20, 0x1a646: 0x6c6f9e20, 0x1a647: 0x6cea9020, + 0x1a648: 0x6c99c220, 0x1a649: 0x6d163820, 0x1a64a: 0x6d13b820, 0x1a64b: 0x6d337c20, + 0x1a64c: 0x6cf33c20, 0x1a64d: 0x6d2ca620, 0x1a64e: 0x6c56f820, 0x1a64f: 0x6c37f420, + 0x1a650: 0x6c820820, 0x1a651: 0x6d1a1e20, 0x1a652: 0x6cb24620, 0x1a653: 0x6caccc20, + 0x1a654: 0x6cbbce20, 0x1a655: 0x6c560e20, 0x1a656: 0x6c48c220, 0x1a657: 0x6c19c420, + 0x1a658: 0x6c19d420, 0x1a659: 0x6d15aa20, 0x1a65a: 0x6d1abc20, 0x1a65b: 0x6d0bd820, + 0x1a65c: 0x6c9ebc20, 0x1a65d: 0x6c6f9a20, 0x1a65e: 0x6cb6c020, 0x1a65f: 0x6d129c20, + 0x1a660: 0x6cf76820, 0x1a661: 0x6cfd5e20, 0x1a662: 0x6c412020, 0x1a663: 0x6c6fa020, + 0x1a664: 0x6cfa2820, 0x1a665: 0x6c563020, 0x1a666: 0x6cd49620, 0x1a667: 0x6c315a20, + 0x1a668: 0x6cd2aa20, 0x1a669: 0x6c5e7020, 0x1a66a: 0x6ca45420, 0x1a66b: 0x6c631a20, + 0x1a66c: 0x6c71ec20, 0x1a66d: 0x6cd23220, 0x1a66e: 0x6c992220, 0x1a66f: 0x6c549020, + 0x1a670: 0x6c971020, 0x1a671: 0x6c949020, 0x1a672: 0x6d3dfe20, 0x1a673: 0x6cc7f820, + 0x1a674: 0x6d08f620, 0x1a675: 0x6d0d4220, 0x1a676: 0x6c3f3a20, 0x1a677: 0x6ccbcc20, + 0x1a678: 0x6ca2f020, 0x1a679: 0x6c418220, 0x1a67a: 0x6cdd5020, 0x1a67b: 0x6d20d020, + 0x1a67c: 0x6c258c20, 0x1a67d: 0x6d30d420, 0x1a67e: 0x6c419020, 0x1a67f: 0x6d35d220, + // Block 0x69a, offset 0x1a680 + 0x1a680: 0x6c4a5020, 0x1a681: 0x6c419820, 0x1a682: 0x6c949a20, 0x1a683: 0x6c8c2220, + 0x1a684: 0x6d17d820, 0x1a685: 0x6c73be20, 0x1a686: 0x6c823620, 0x1a687: 0x6c96ec20, + 0x1a688: 0x6d221220, 0x1a689: 0x6d328020, 0x1a68a: 0x6cd30620, 0x1a68b: 0x6cd31020, + 0x1a68c: 0x6c37b420, 0x1a68d: 0x6c1f0020, 0x1a68e: 0x6d20a220, 0x1a68f: 0x6c7c3020, + 0x1a690: 0x6d20a020, 0x1a691: 0x6d277420, 0x1a692: 0x6c563220, 0x1a693: 0x6cb56020, + 0x1a694: 0x6cf41420, 0x1a695: 0x6c6dfe20, 0x1a696: 0x6cd87220, 0x1a697: 0x6cdc1c20, + 0x1a698: 0x6c44a620, 0x1a699: 0x6c44a820, 0x1a69a: 0x6d0b6c20, 0x1a69b: 0x6d003620, + 0x1a69c: 0x6d0b7420, 0x1a69d: 0x6cb57820, 0x1a69e: 0x6d0b7c20, 0x1a69f: 0x6c5fd820, + 0x1a6a0: 0x6ce7e220, 0x1a6a1: 0x6cedd420, 0x1a6a2: 0x6c777420, 0x1a6a3: 0x6cde2a20, + 0x1a6a4: 0x6c682220, 0x1a6a5: 0x6c4d4e20, 0x1a6a6: 0x6d165220, 0x1a6a7: 0x6c158c20, + 0x1a6a8: 0x6c524420, 0x1a6a9: 0x6ca22220, 0x1a6aa: 0x6d13b220, 0x1a6ab: 0x6cfdd820, + 0x1a6ac: 0x6c6d8e20, 0x1a6ad: 0x6ce66220, 0x1a6ae: 0x6c89aa20, 0x1a6af: 0x6cfdda20, + 0x1a6b0: 0x6c6d9620, 0x1a6b1: 0x6d12d420, 0x1a6b2: 0x6cbd1c20, 0x1a6b3: 0x6c0ece20, + 0x1a6b4: 0x6d204420, 0x1a6b5: 0x6d01a020, 0x1a6b6: 0x6c283820, 0x1a6b7: 0x6c880820, + 0x1a6b8: 0x6c34b420, 0x1a6b9: 0x6c9ae020, 0x1a6ba: 0x6cc55a20, 0x1a6bb: 0x6cc55c20, + 0x1a6bc: 0x6c5fb620, 0x1a6bd: 0x6c630a20, 0x1a6be: 0x6cedd620, 0x1a6bf: 0x6d163a20, + // Block 0x69b, offset 0x1a6c0 + 0x1a6c0: 0x6cd03620, 0x1a6c1: 0x6cc55e20, 0x1a6c2: 0x6c820220, 0x1a6c3: 0x6c2f4220, + 0x1a6c4: 0x6d2b3220, 0x1a6c5: 0x6c6c7e20, 0x1a6c6: 0x6cb3fa20, 0x1a6c7: 0x6c1d8c20, + 0x1a6c8: 0x6c030c20, 0x1a6c9: 0x6d2ef620, 0x1a6ca: 0x6c6c1c20, 0x1a6cb: 0x6c6ba420, + 0x1a6cc: 0x6c0da020, 0x1a6cd: 0x6cc61220, 0x1a6ce: 0x6c237c20, 0x1a6cf: 0x6c3d0820, + 0x1a6d0: 0x6cca1220, 0x1a6d1: 0x6c94d420, 0x1a6d2: 0x6c0da220, 0x1a6d3: 0x6c121c20, + 0x1a6d4: 0x6d3ed620, 0x1a6d5: 0x6cd2ee20, 0x1a6d6: 0x6cddda20, 0x1a6d7: 0x6d2f1a20, + 0x1a6d8: 0x6c3fa420, 0x1a6d9: 0x6cfd5620, 0x1a6da: 0x6cfa6a20, 0x1a6db: 0x6cea9220, + 0x1a6dc: 0x6c52e820, 0x1a6dd: 0x6ce70a20, 0x1a6de: 0x6cc5a620, 0x1a6df: 0x6cb88e20, + 0x1a6e0: 0x6c41c220, 0x1a6e1: 0x6c436220, 0x1a6e2: 0x6c0ea620, 0x1a6e3: 0x6c272220, + 0x1a6e4: 0x6c8e1820, 0x1a6e5: 0x6d15ae20, 0x1a6e6: 0x6c17b020, 0x1a6e7: 0x6c169020, + 0x1a6e8: 0x6cc93e20, 0x1a6e9: 0x6cce5a20, 0x1a6ea: 0x6d144a20, 0x1a6eb: 0x6ca25e20, + 0x1a6ec: 0x6c9b0220, 0x1a6ed: 0x6cc5a820, 0x1a6ee: 0x6c63fe20, 0x1a6ef: 0x6c17b220, + 0x1a6f0: 0x6d0ffc20, 0x1a6f1: 0x6cb96820, 0x1a6f2: 0x6d380e20, 0x1a6f3: 0x6cb04620, + 0x1a6f4: 0x6cf2cc20, 0x1a6f5: 0x6cf41820, 0x1a6f6: 0x6c665020, 0x1a6f7: 0x6c643620, + 0x1a6f8: 0x6d117e20, 0x1a6f9: 0x6c3c1220, 0x1a6fa: 0x6c121e20, 0x1a6fb: 0x6cc5ac20, + 0x1a6fc: 0x6ceddc20, 0x1a6fd: 0x6c3bc420, 0x1a6fe: 0x6c2b0c20, 0x1a6ff: 0x6c39b620, + // Block 0x69c, offset 0x1a700 + 0x1a700: 0x6d378420, 0x1a701: 0x6cb6c820, 0x1a702: 0x6cadf820, 0x1a703: 0x6d20a620, + 0x1a704: 0x6c2e0620, 0x1a705: 0x6c33d220, 0x1a706: 0x6cf49c20, 0x1a707: 0x6d165620, + 0x1a708: 0x6d030a20, 0x1a709: 0x6c777620, 0x1a70a: 0x6d13bc20, 0x1a70b: 0x6c5fbc20, + 0x1a70c: 0x6c008620, 0x1a70d: 0x6cf55420, 0x1a70e: 0x6c617220, 0x1a70f: 0x6c3dca20, + 0x1a710: 0x6c37f620, 0x1a711: 0x6d04b220, 0x1a712: 0x6c6ccc20, 0x1a713: 0x6caf2420, + 0x1a714: 0x6c281820, 0x1a715: 0x6c3d3420, 0x1a716: 0x6ce16c20, 0x1a717: 0x6d381020, + 0x1a718: 0x6d1e8820, 0x1a719: 0x6c5d8620, 0x1a71a: 0x6c5b8a20, 0x1a71b: 0x6d221420, + 0x1a71c: 0x6c251620, 0x1a71d: 0x6c1fee20, 0x1a71e: 0x6cca1420, 0x1a71f: 0x6cef8220, + 0x1a720: 0x6c1ff020, 0x1a721: 0x6c17cc20, 0x1a722: 0x6d0b0a20, 0x1a723: 0x6cfc7020, + 0x1a724: 0x6ccdfe20, 0x1a725: 0x6c165e20, 0x1a726: 0x6c94d620, 0x1a727: 0x6c122020, + 0x1a728: 0x6d0a6420, 0x1a729: 0x6d031220, 0x1a72a: 0x6cef8420, 0x1a72b: 0x6d3a9a20, + 0x1a72c: 0x6d2b5820, 0x1a72d: 0x6cfb2220, 0x1a72e: 0x6caa4820, 0x1a72f: 0x6c0eaa20, + 0x1a730: 0x6c46e620, 0x1a731: 0x6ca62020, 0x1a732: 0x6ca67a20, 0x1a733: 0x6d015420, + 0x1a734: 0x6c04de20, 0x1a735: 0x6d066a20, 0x1a736: 0x6c8e2c20, 0x1a737: 0x6d38f820, + 0x1a738: 0x6ccfa020, 0x1a739: 0x6cc0ca20, 0x1a73a: 0x6c22ac20, 0x1a73b: 0x6c07ce20, + 0x1a73c: 0x6cd2f620, 0x1a73d: 0x6c631e20, 0x1a73e: 0x6caf2620, 0x1a73f: 0x6d167220, + // Block 0x69d, offset 0x1a740 + 0x1a740: 0x6cd87c20, 0x1a741: 0x6d15b620, 0x1a742: 0x6d328220, 0x1a743: 0x6c2d3420, + 0x1a744: 0x6c4d9020, 0x1a745: 0x6c972220, 0x1a746: 0x6c286220, 0x1a747: 0x6d3a9c20, + 0x1a748: 0x6c105a20, 0x1a749: 0x6cc0cc20, 0x1a74a: 0x6c08b420, 0x1a74b: 0x6d2f5020, + 0x1a74c: 0x6c228c20, 0x1a74d: 0x6cf06e20, 0x1a74e: 0x6c2b0e20, 0x1a74f: 0x6d3a9e20, + 0x1a750: 0x6d426220, 0x1a751: 0x6d200e20, 0x1a752: 0x6d0ffe20, 0x1a753: 0x6ce3ba20, + 0x1a754: 0x6d2e4820, 0x1a755: 0x6c50b820, 0x1a756: 0x6c091020, 0x1a757: 0x6ceae420, + 0x1a758: 0x6ccf0820, 0x1a759: 0x6d20ac20, 0x1a75a: 0x6d167420, 0x1a75b: 0x6c3dd020, + 0x1a75c: 0x6d427420, 0x1a75d: 0x6c463420, 0x1a75e: 0x6ca95020, 0x1a75f: 0x6ce70e20, + 0x1a760: 0x6ca62220, 0x1a761: 0x6cfa7620, 0x1a762: 0x6cc17220, 0x1a763: 0x6d1d7c20, + 0x1a764: 0x6cec0e20, 0x1a765: 0x6cb8a220, 0x1a766: 0x6cd40a20, 0x1a767: 0x6c761a20, + 0x1a768: 0x6c068820, 0x1a769: 0x6cae0420, 0x1a76a: 0x6c5b1a20, 0x1a76b: 0x6c51b620, + 0x1a76c: 0x6c819c20, 0x1a76d: 0x6cfdac20, 0x1a76e: 0x6c43c420, 0x1a76f: 0x6d0f8420, + 0x1a770: 0x6c041820, 0x1a771: 0x6c382c20, 0x1a772: 0x6ca02a20, 0x1a773: 0x6c632420, + 0x1a774: 0x6c37bc20, 0x1a775: 0x6c0e0a20, 0x1a776: 0x6c5fda20, 0x1a777: 0x6c523820, + 0x1a778: 0x6c5d6c20, 0x1a779: 0x6c4ac420, 0x1a77a: 0x6cc2b620, 0x1a77b: 0x6ce54820, + 0x1a77c: 0x6c68c820, 0x1a77d: 0x6c22b020, 0x1a77e: 0x6d16a220, 0x1a77f: 0x6cd2b220, + // Block 0x69e, offset 0x1a780 + 0x1a780: 0x6d03c620, 0x1a781: 0x6ccfa620, 0x1a782: 0x6ceaa620, 0x1a783: 0x6c76c020, + 0x1a784: 0x6d343a20, 0x1a785: 0x6c40dc20, 0x1a786: 0x6c7ee220, 0x1a787: 0x6d146c20, + 0x1a788: 0x6c1b7a20, 0x1a789: 0x6c7ad220, 0x1a78a: 0x6c49d420, 0x1a78b: 0x6c858620, + 0x1a78c: 0x6d19a820, 0x1a78d: 0x6cd31220, 0x1a78e: 0x6c9cda20, 0x1a78f: 0x6d398220, + 0x1a790: 0x6d067a20, 0x1a791: 0x6d201420, 0x1a792: 0x6c011820, 0x1a793: 0x6c921620, + 0x1a794: 0x6ca1c020, 0x1a795: 0x6c373420, 0x1a796: 0x6c94de20, 0x1a797: 0x6c305220, + 0x1a798: 0x6c143020, 0x1a799: 0x6c1a9420, 0x1a79a: 0x6d0a6a20, 0x1a79b: 0x6c456220, + 0x1a79c: 0x6d385620, 0x1a79d: 0x6d13ca20, 0x1a79e: 0x6cc78c20, 0x1a79f: 0x6c25a220, + 0x1a7a0: 0x6cf98820, 0x1a7a1: 0x6cd88620, 0x1a7a2: 0x6d292c20, 0x1a7a3: 0x6c937820, + 0x1a7a4: 0x6cdefc20, 0x1a7a5: 0x6c68ca20, 0x1a7a6: 0x6d312220, 0x1a7a7: 0x6c12ca20, + 0x1a7a8: 0x6cbbd020, 0x1a7a9: 0x6c7b1220, 0x1a7aa: 0x6c147020, 0x1a7ab: 0x6ca95220, + 0x1a7ac: 0x6ca9b020, 0x1a7ad: 0x6c6c8420, 0x1a7ae: 0x6cf43220, 0x1a7af: 0x6c53ec20, + 0x1a7b0: 0x6c6efe20, 0x1a7b1: 0x6c1a6420, 0x1a7b2: 0x6d321e20, 0x1a7b3: 0x6d428220, + 0x1a7b4: 0x6c1e2620, 0x1a7b5: 0x6cbd1e20, 0x1a7b6: 0x6c937a20, 0x1a7b7: 0x6c70f820, + 0x1a7b8: 0x6cd5a420, 0x1a7b9: 0x6ce6b420, 0x1a7ba: 0x6cd09220, 0x1a7bb: 0x6ce9f420, + 0x1a7bc: 0x6c0ec020, 0x1a7bd: 0x6ca3e820, 0x1a7be: 0x6cfe8820, 0x1a7bf: 0x6c0b8220, + // Block 0x69f, offset 0x1a7c0 + 0x1a7c0: 0x6ce9de20, 0x1a7c1: 0x6d222420, 0x1a7c2: 0x6cf85220, 0x1a7c3: 0x6c242e20, + 0x1a7c4: 0x6c354e20, 0x1a7c5: 0x6cc01020, 0x1a7c6: 0x6d061620, 0x1a7c7: 0x6c4a1820, + 0x1a7c8: 0x6c7a8420, 0x1a7c9: 0x6cf43420, 0x1a7ca: 0x6c759620, 0x1a7cb: 0x6d16da20, + 0x1a7cc: 0x6c3f4620, 0x1a7cd: 0x6c894820, 0x1a7ce: 0x6d410e20, 0x1a7cf: 0x6cbc3020, + 0x1a7d0: 0x6c859a20, 0x1a7d1: 0x6d1e1620, 0x1a7d2: 0x6c5d1c20, 0x1a7d3: 0x6c6e5220, + 0x1a7d4: 0x6cba4220, 0x1a7d5: 0x6cca4820, 0x1a7d6: 0x6cadf420, 0x1a7d7: 0x6cda7220, + 0x1a7d8: 0x6c3e0620, 0x1a7d9: 0x6cf59820, 0x1a7da: 0x6c850020, 0x1a7db: 0x6c3f4820, + 0x1a7dc: 0x6cb24a20, 0x1a7dd: 0x6c05ea20, 0x1a7de: 0x6d20d220, 0x1a7df: 0x6cb59020, + 0x1a7e0: 0x6cf99020, 0x1a7e1: 0x6d032220, 0x1a7e2: 0x6d04b620, 0x1a7e3: 0x6d222620, + 0x1a7e4: 0x6c2c2420, 0x1a7e5: 0x6c17d020, 0x1a7e6: 0x6c1d9220, 0x1a7e7: 0x6d377c20, + 0x1a7e8: 0x6d0d4e20, 0x1a7e9: 0x6c87e820, 0x1a7ea: 0x6c859c20, 0x1a7eb: 0x6c7ee420, + 0x1a7ec: 0x6cd8fc20, 0x1a7ed: 0x6c656a20, 0x1a7ee: 0x6d04b820, 0x1a7ef: 0x6c3f5220, + 0x1a7f0: 0x6c5daa20, 0x1a7f1: 0x6c721e20, 0x1a7f2: 0x6cffd820, 0x1a7f3: 0x6cabf620, + 0x1a7f4: 0x6c666420, 0x1a7f5: 0x6c0c8c20, 0x1a7f6: 0x6c1f2020, 0x1a7f7: 0x6c3a9420, + 0x1a7f8: 0x6c3cde20, 0x1a7f9: 0x6d0b8a20, 0x1a7fa: 0x6c017a20, 0x1a7fb: 0x6c06f820, + 0x1a7fc: 0x6d22ea20, 0x1a7fd: 0x6d02bc20, 0x1a7fe: 0x6c08ce20, 0x1a7ff: 0x6c561620, + // Block 0x6a0, offset 0x1a800 + 0x1a800: 0x6c166220, 0x1a801: 0x6d33be20, 0x1a802: 0x6c0e1020, 0x1a803: 0x6c6fe420, + 0x1a804: 0x6d10de20, 0x1a805: 0x6c252020, 0x1a806: 0x6c87ea20, 0x1a807: 0x6cecf420, + 0x1a808: 0x6c7ee620, 0x1a809: 0x6c122820, 0x1a80a: 0x6d401c20, 0x1a80b: 0x6c448220, + 0x1a80c: 0x6c490a20, 0x1a80d: 0x6c06fa20, 0x1a80e: 0x6ce4dc20, 0x1a80f: 0x6cd4b420, + 0x1a810: 0x6cd4b620, 0x1a811: 0x6c9b0420, 0x1a812: 0x6c2a0620, 0x1a813: 0x6cdfd420, + 0x1a814: 0x6c740e20, 0x1a815: 0x6c20c220, 0x1a816: 0x6d041e20, 0x1a817: 0x6cae9420, + 0x1a818: 0x6ce17020, 0x1a819: 0x6c548e20, 0x1a81a: 0x6d15da20, 0x1a81b: 0x6cb4d620, + 0x1a81c: 0x6ce3de20, 0x1a81d: 0x6c421420, 0x1a81e: 0x6c6e5e20, 0x1a81f: 0x6c6bd620, + 0x1a820: 0x6cdbb220, 0x1a821: 0x6c170a20, 0x1a822: 0x6c6a9e20, 0x1a823: 0x6c39ce20, + 0x1a824: 0x6d344420, 0x1a825: 0x6c796c20, 0x1a826: 0x6c734220, 0x1a827: 0x6d3f7420, + 0x1a828: 0x6c722020, 0x1a829: 0x6cba4620, 0x1a82a: 0x6ca5c820, 0x1a82b: 0x6c94e420, + 0x1a82c: 0x6d3cf420, 0x1a82d: 0x6cf27e20, 0x1a82e: 0x6c95a820, 0x1a82f: 0x6cd91020, + 0x1a830: 0x6c839220, 0x1a831: 0x6c5d1e20, 0x1a832: 0x6c2fea20, 0x1a833: 0x6d3f3620, + 0x1a834: 0x6c07aa20, 0x1a835: 0x6cf43820, 0x1a836: 0x6c722220, 0x1a837: 0x6ca39e20, + 0x1a838: 0x6c112020, 0x1a839: 0x6c657820, 0x1a83a: 0x6d2d3820, 0x1a83b: 0x6d125a20, + 0x1a83c: 0x6d344620, 0x1a83d: 0x6ccc4020, 0x1a83e: 0x6cbe3820, 0x1a83f: 0x6cbd1220, + // Block 0x6a1, offset 0x1a840 + 0x1a840: 0x6d1ba420, 0x1a841: 0x6c196620, 0x1a842: 0x6c648020, 0x1a843: 0x6d0d6220, + 0x1a844: 0x6cc85c20, 0x1a845: 0x6d382420, 0x1a846: 0x6c217620, 0x1a847: 0x6c641220, + 0x1a848: 0x6c61da20, 0x1a849: 0x6cefa820, 0x1a84a: 0x6d224220, 0x1a84b: 0x6c0e1820, + 0x1a84c: 0x6cc91620, 0x1a84d: 0x6ce31a20, 0x1a84e: 0x6cee7020, 0x1a84f: 0x6cb0ee20, + 0x1a850: 0x6d0e5a20, 0x1a851: 0x6c3c3a20, 0x1a852: 0x6ce17220, 0x1a853: 0x6cf2e020, + 0x1a854: 0x6c360620, 0x1a855: 0x6d009a20, 0x1a856: 0x6c17e820, 0x1a857: 0x6cd13020, + 0x1a858: 0x6c76ca20, 0x1a859: 0x6c2c3820, 0x1a85a: 0x6d429620, 0x1a85b: 0x6c138e20, + 0x1a85c: 0x6ce66c20, 0x1a85d: 0x6c070620, 0x1a85e: 0x6d018820, 0x1a85f: 0x6c59b020, + 0x1a860: 0x6d11a820, 0x1a861: 0x6d2e5420, 0x1a862: 0x6c1e2a20, 0x1a863: 0x6d0bec20, + 0x1a864: 0x6d1f2820, 0x1a865: 0x6c666820, 0x1a866: 0x6d063a20, 0x1a867: 0x6d2bd220, + 0x1a868: 0x6c220220, 0x1a869: 0x6c3fdc20, 0x1a86a: 0x6c087020, 0x1a86b: 0x6d35d420, + 0x1a86c: 0x6d3fea20, 0x1a86d: 0x6c9e1620, 0x1a86e: 0x6c601020, 0x1a86f: 0x6d15e420, + 0x1a870: 0x6d018a20, 0x1a871: 0x6d0a0420, 0x1a872: 0x6c10f420, 0x1a873: 0x6c329420, + 0x1a874: 0x6c12da20, 0x1a875: 0x6d314c20, 0x1a876: 0x6cab7c20, 0x1a877: 0x6ce7d420, + 0x1a878: 0x6ce7d620, 0x1a879: 0x6c070820, 0x1a87a: 0x6d28b220, 0x1a87b: 0x6c908420, + 0x1a87c: 0x6c6aac20, 0x1a87d: 0x6cefaa20, 0x1a87e: 0x6c3bd620, 0x1a87f: 0x6c16a020, + // Block 0x6a2, offset 0x1a880 + 0x1a880: 0x6c4a5220, 0x1a881: 0x6cda1420, 0x1a882: 0x6d361420, 0x1a883: 0x6cdab020, + 0x1a884: 0x6cf96620, 0x1a885: 0x6c40b020, 0x1a886: 0x6d261420, 0x1a887: 0x6cc70420, + 0x1a888: 0x6c860420, 0x1a889: 0x6caa6420, 0x1a88a: 0x6d282c20, 0x1a88b: 0x6c67a620, + 0x1a88c: 0x6c96bc20, 0x1a88d: 0x6c056e20, 0x1a88e: 0x6c2cc820, 0x1a88f: 0x6ce0ee20, + 0x1a890: 0x6c503c20, 0x1a891: 0x6c6ac220, 0x1a892: 0x6cf60820, 0x1a893: 0x6ccd8820, + 0x1a894: 0x6cba5020, 0x1a895: 0x6c744020, 0x1a896: 0x6c122c20, 0x1a897: 0x6c1f3c20, + 0x1a898: 0x6cca1820, 0x1a899: 0x6c071c20, 0x1a89a: 0x6cffe820, 0x1a89b: 0x6d1e3420, + 0x1a89c: 0x6d10f220, 0x1a89d: 0x6ce09620, 0x1a89e: 0x6cdd1420, 0x1a89f: 0x6d101c20, + 0x1a8a0: 0x6c37ea20, 0x1a8a1: 0x6c0e1c20, 0x1a8a2: 0x6c635a20, 0x1a8a3: 0x6c271820, + 0x1a8a4: 0x6d293620, 0x1a8a5: 0x6ce17620, 0x1a8a6: 0x6c483820, 0x1a8a7: 0x6c0d3420, + 0x1a8a8: 0x6c1ede20, 0x1a8a9: 0x6caabc20, 0x1a8aa: 0x6c116c20, 0x1a8ab: 0x6c82c820, + 0x1a8ac: 0x6c24ca20, 0x1a8ad: 0x6d1d8820, 0x1a8ae: 0x6d2a1420, 0x1a8af: 0x6d3ff620, + 0x1a8b0: 0x6c07f420, 0x1a8b1: 0x6cd95e20, 0x1a8b2: 0x6c02ce20, 0x1a8b3: 0x6c1ffe20, + 0x1a8b4: 0x6d226620, 0x1a8b5: 0x6d2d4220, 0x1a8b6: 0x6d40c220, 0x1a8b7: 0x6cce0620, + 0x1a8b8: 0x6c208e20, 0x1a8b9: 0x6c6e8c20, 0x1a8ba: 0x6c1c2c20, 0x1a8bb: 0x6ccc3220, + 0x1a8bc: 0x6c4ecc20, 0x1a8bd: 0x6d2eb820, 0x1a8be: 0x6cbe4c20, 0x1a8bf: 0x6d0e8020, + // Block 0x6a3, offset 0x1a8c0 + 0x1a8c0: 0x6c2c6620, 0x1a8c1: 0x6d01bc20, 0x1a8c2: 0x6c909220, 0x1a8c3: 0x6c072020, + 0x1a8c4: 0x6cb1b020, 0x1a8c5: 0x6c6c9420, 0x1a8c6: 0x6c88f020, 0x1a8c7: 0x6c926020, + 0x1a8c8: 0x6c976620, 0x1a8c9: 0x6cb8ea20, 0x1a8ca: 0x6cfaba20, 0x1a8cb: 0x6ce09c20, + 0x1a8cc: 0x6d1c7a20, 0x1a8cd: 0x6c307e20, 0x1a8ce: 0x6d3bd220, 0x1a8cf: 0x6cfe3c20, + 0x1a8d0: 0x6ccd9220, 0x1a8d1: 0x6cbbe220, 0x1a8d2: 0x6c6f2220, 0x1a8d3: 0x6ce9e820, + 0x1a8d4: 0x6d420620, 0x1a8d5: 0x6cb44220, 0x1a8d6: 0x6cf66020, 0x1a8d7: 0x6c815e20, + 0x1a8d8: 0x6c16f020, 0x1a8d9: 0x6c49ec20, 0x1a8da: 0x6c89ec20, 0x1a8db: 0x6cb50420, + 0x1a8dc: 0x6c197820, 0x1a8dd: 0x6c150820, 0x1a8de: 0x6cefee20, 0x1a8df: 0x6c5efe20, + 0x1a8e0: 0x6c0e8220, 0x1a8e1: 0x6c5bf020, 0x1a8e2: 0x6c202420, 0x1a8e3: 0x6ce5fc20, + 0x1a8e4: 0x6c289a20, 0x1a8e5: 0x6c691220, 0x1a8e6: 0x6c700a20, 0x1a8e7: 0x6ccbb820, + 0x1a8e8: 0x6c3be020, 0x1a8e9: 0x6cfce620, 0x1a8ea: 0x6c713c20, 0x1a8eb: 0x6c366c20, + 0x1a8ec: 0x6c685820, 0x1a8ed: 0x6c66a420, 0x1a8ee: 0x6ce76420, 0x1a8ef: 0x6c8c5620, + 0x1a8f0: 0x6c0f2420, 0x1a8f1: 0x6c482220, 0x1a8f2: 0x6cfd5820, 0x1a8f3: 0x6cdade20, + 0x1a8f4: 0x6cfce820, 0x1a8f5: 0x6c676e20, 0x1a8f6: 0x6c9fc020, 0x1a8f7: 0x6d130e20, + 0x1a8f8: 0x6c6d3220, 0x1a8f9: 0x6c644e20, 0x1a8fa: 0x6cbc5220, 0x1a8fb: 0x6cb0b420, + 0x1a8fc: 0x6c3c6020, 0x1a8fd: 0x6d394220, 0x1a8fe: 0x6c00c020, 0x1a8ff: 0x6cc9e820, + // Block 0x6a4, offset 0x1a900 + 0x1a900: 0x6d154220, 0x1a901: 0x6c75d220, 0x1a902: 0x6ca9be20, 0x1a903: 0x6c151620, + 0x1a904: 0x6d184620, 0x1a905: 0x6c297c20, 0x1a906: 0x6c6e2420, 0x1a907: 0x6d07b620, + 0x1a908: 0x6c7b3020, 0x1a909: 0x6c65c820, 0x1a90a: 0x6c1f6820, 0x1a90b: 0x6c27f420, + 0x1a90c: 0x6c692020, 0x1a90d: 0x6ccc3420, 0x1a90e: 0x6d294020, 0x1a90f: 0x6c121820, + 0x1a910: 0x6c0d5020, 0x1a911: 0x6c017220, 0x1a912: 0x6cc7c420, 0x1a913: 0x6cdf3c20, + 0x1a914: 0x6c1dd820, 0x1a915: 0x6c148a20, 0x1a916: 0x6c7fb220, 0x1a917: 0x6ca64620, + 0x1a918: 0x6c6cb420, 0x1a919: 0x6cba7020, 0x1a91a: 0x6c9b3420, 0x1a91b: 0x6cf47620, + 0x1a91c: 0x6ca91820, 0x1a91d: 0x6cbf5a20, 0x1a91e: 0x6ca64820, 0x1a91f: 0x6c16c820, + 0x1a920: 0x6c8b2e20, 0x1a921: 0x6c82dc20, 0x1a922: 0x6c93b820, 0x1a923: 0x6c7bd020, + 0x1a924: 0x6c066c20, 0x1a925: 0x6d240420, 0x1a926: 0x6c0c2a20, 0x1a927: 0x6d297820, + 0x1a928: 0x6d349e20, 0x1a929: 0x6cd8f220, 0x1a92a: 0x6d1eb420, 0x1a92b: 0x6c4fe820, + 0x1a92c: 0x6c193220, 0x1a92d: 0x6c193620, 0x1a92e: 0x6c86bc20, 0x1a92f: 0x6ce2be20, + 0x1a930: 0x6cf02420, 0x1a931: 0x6c903a20, 0x1a932: 0x6c1eee20, 0x1a933: 0x6c154020, + 0x1a934: 0x6cc4e020, 0x1a935: 0x6cd51220, 0x1a936: 0x6c5c8820, 0x1a937: 0x6c874220, + 0x1a938: 0x6c956820, 0x1a939: 0x6d298020, 0x1a93a: 0x6caace20, 0x1a93b: 0x6ce18820, + 0x1a93c: 0x6d0e1220, 0x1a93d: 0x6c829420, 0x1a93e: 0x6ca47c20, 0x1a93f: 0x6c372e20, + // Block 0x6a5, offset 0x1a940 + 0x1a940: 0x6cf49020, 0x1a941: 0x6d27d220, 0x1a942: 0x6d294a20, 0x1a943: 0x6d252e20, + 0x1a944: 0x6d044a20, 0x1a945: 0x6c1ca820, 0x1a946: 0x6d2f9620, 0x1a947: 0x6d044e20, + 0x1a948: 0x6cfa6e20, 0x1a949: 0x6c49d020, 0x1a94a: 0x6c332e20, 0x1a94b: 0x6c787820, + 0x1a94c: 0x6c333020, 0x1a94d: 0x6c9dfe20, 0x1a94e: 0x6ce91c20, 0x1a94f: 0x6c169420, + 0x1a950: 0x6c373220, 0x1a951: 0x6c333220, 0x1a952: 0x6c373620, 0x1a953: 0x6c6c2c20, + 0x1a954: 0x6ce92020, 0x1a955: 0x6cd87e20, 0x1a956: 0x6d0d4420, 0x1a957: 0x6d0d5020, + 0x1a958: 0x6cd2bc20, 0x1a95a: 0x6c292a20, 0x1a95b: 0x6cb8c220, + 0x1a95c: 0x6c30a820, 0x1a95d: 0x6c3b2820, 0x1a95e: 0x6c98d620, 0x1a95f: 0x6ccfe220, + 0x1a960: 0x6c30aa20, 0x1a962: 0x6c6dc620, 0x1a963: 0x6c852e20, + 0x1a964: 0x6c5a2a20, 0x1a965: 0x6cc80e20, 0x1a966: 0x6cedd820, 0x1a967: 0x6ca57e20, + 0x1a968: 0x6cc2b220, 0x1a969: 0x6c898820, 0x1a96a: 0x6d20d420, 0x1a96b: 0x6c030a20, + 0x1a96c: 0x6c454e20, 0x1a96d: 0x6c8f2420, 0x1a96e: 0x6cf55c20, 0x1a96f: 0x6c4f4220, + 0x1a970: 0x6c7f8620, 0x1a971: 0x6c460a20, 0x1a972: 0x6ce45620, 0x1a973: 0x6c490020, + 0x1a974: 0x6d041020, 0x1a975: 0x6c0daa20, 0x1a976: 0x6cb57a20, 0x1a977: 0x6c720620, + 0x1a978: 0x6c2d0620, 0x1a979: 0x6d3e0820, 0x1a97a: 0x6c3b2020, 0x1a97b: 0x6d100620, + 0x1a97c: 0x6c647a20, 0x1a97d: 0x6cd45820, 0x1a97e: 0x6c621420, 0x1a97f: 0x6d17da20, + // Block 0x6a6, offset 0x1a980 + 0x1a980: 0x6c627020, 0x1a981: 0x6c15ec20, 0x1a982: 0x6c6ed020, 0x1a983: 0x6c993e20, + 0x1a984: 0x6cc4a620, 0x1a985: 0x6ca58020, 0x1a986: 0x6d253020, 0x1a987: 0x6c991c20, + 0x1a988: 0x6c424c20, 0x1a989: 0x6cc4a820, 0x1a98a: 0x6c12c620, 0x1a98b: 0x6c6ed220, + 0x1a98c: 0x6c12c820, 0x1a98d: 0x6d292620, 0x1a98e: 0x6c488820, 0x1a98f: 0x6c6ef020, + 0x1a990: 0x6c994820, 0x1a991: 0x6d390820, 0x1a992: 0x6c994e20, 0x1a993: 0x6c46a020, + 0x1a994: 0x6d063220, 0x1a995: 0x6c9e1820, 0x1a996: 0x6c9d1620, 0x1a997: 0x6cc6ec20, + 0x1a998: 0x6d1a1a20, 0x1a999: 0x6d013e20, 0x1a99a: 0x6c76bc20, 0x1a99b: 0x6c755020, + 0x1a99c: 0x6ca9ae20, 0x1a99d: 0x6d145a20, 0x1a99e: 0x6c9c3420, 0x1a99f: 0x6cd32820, + 0x1a9a0: 0x6c490620, 0x1a9a1: 0x6c9b0e20, 0x1a9a2: 0x6d37ec20, 0x1a9a3: 0x6c722620, + 0x1a9a4: 0x6d24d020, 0x1a9a5: 0x6c9ff220, 0x1a9a6: 0x6c79de20, 0x1a9a7: 0x6c8ba420, + 0x1a9a8: 0x6c3fe020, 0x1a9a9: 0x6d014420, 0x1a9aa: 0x6c9d7620, 0x1a9ab: 0x6c0d9e20, + 0x1a9ac: 0x6c2fd820, 0x1a9ad: 0x6cdf0c20, 0x1a9ae: 0x6c425020, 0x1a9af: 0x6c3c9a20, + 0x1a9b0: 0x6c0da620, 0x1a9b1: 0x6c564620, 0x1a9b2: 0x6c1caa20, 0x1a9b3: 0x6c73cc20, + 0x1a9b4: 0x6c564820, 0x1a9b5: 0x6c7bdc20, 0x1a9b6: 0x6d12a220, 0x1a9b7: 0x6c839020, + 0x1a9b8: 0x6cac9a20, 0x1a9b9: 0x6c3dd220, 0x1a9ba: 0x6c9f8c20, 0x1a9bb: 0x6c305020, + 0x1a9bc: 0x6cfbe620, 0x1a9bd: 0x6c8ac620, 0x1a9be: 0x6cb84020, 0x1a9bf: 0x6c646820, + // Block 0x6a7, offset 0x1a9c0 + 0x1a9c0: 0x6c6e4a20, 0x1a9c1: 0x6cd5a620, 0x1a9c2: 0x6c9a4c20, 0x1a9c3: 0x6ce88a20, + 0x1a9c4: 0x6cb4d820, 0x1a9c5: 0x6c480220, 0x1a9c6: 0x6d3cda20, 0x1a9c7: 0x6cd91220, + 0x1a9c8: 0x6c6e6020, 0x1a9c9: 0x6c894a20, 0x1a9ca: 0x6cbec420, 0x1a9cb: 0x6c2db820, + 0x1a9cc: 0x6c8cc420, 0x1a9cd: 0x6c306c20, 0x1a9ce: 0x6c421620, 0x1a9cf: 0x6c658220, + 0x1a9d0: 0x6d19c620, 0x1a9d1: 0x6c23ea20, 0x1a9d2: 0x6d14f220, 0x1a9d3: 0x6c860620, + 0x1a9d4: 0x6c20a820, 0x1a9d5: 0x6ca03420, 0x1a9d6: 0x6d3ce820, 0x1a9d7: 0x6c24cc20, + 0x1a9d8: 0x6cd7fe20, 0x1a9d9: 0x6c345c20, 0x1a9da: 0x6c6d3420, 0x1a9db: 0x6c8c2620, + 0x1a9dc: 0x6c8c2820, 0x1a9dd: 0x6ca91a20, 0x1a9de: 0x6cf6b620, 0x1a9df: 0x6c31be20, + 0x1a9e0: 0x6c610c20, 0x1a9e1: 0x6c387820, 0x1a9e2: 0x6c387a20, 0x1a9e3: 0x6c387c20, + 0x1a9e4: 0x6c3cd620, 0x1a9e5: 0x6c704a20, 0x1a9e6: 0x6c1ed220, 0x1a9e7: 0x6d337a20, + 0x1a9e8: 0x6c3c1420, 0x1a9e9: 0x6ca2c220, 0x1a9ea: 0x6d377a20, 0x1a9eb: 0x6c3dcc20, + 0x1a9ec: 0x6c3c1620, 0x1a9ed: 0x6cb27220, 0x1a9ee: 0x6c3c2020, 0x1a9ef: 0x6c764420, + 0x1a9f0: 0x6c59b220, 0x1a9f1: 0x6c765220, 0x1a9f2: 0x6c419a20, 0x1a9f3: 0x6c2ad820, + 0x1a9f4: 0x6cb2bc20, 0x1a9f5: 0x6cb9ec20, 0x1a9f6: 0x6d044820, 0x1a9f7: 0x6c7b0a20, + 0x1a9f8: 0x6ce83620, 0x1a9f9: 0x6c022420, 0x1a9fa: 0x6c1e5020, 0x1a9fb: 0x6c5e6820, + 0x1a9fc: 0x6c295020, 0x1a9fd: 0x6c4dd220, 0x1a9fe: 0x6c4dda20, 0x1a9ff: 0x6d2a3420, + // Block 0x6a8, offset 0x1aa00 + 0x1aa00: 0x6c29b020, 0x1aa01: 0x6c2da220, 0x1aa02: 0x6c29b220, 0x1aa03: 0x6cc5a020, + 0x1aa04: 0x6cc5a220, 0x1aa05: 0x6c204a20, 0x1aa06: 0x6c3b0820, 0x1aa07: 0x6cbc9020, + 0x1aa08: 0x6d163e20, 0x1aa09: 0x6c5e6a20, 0x1aa0a: 0x6c76a020, 0x1aa0b: 0x6cba3a20, + 0x1aa0c: 0x6c25ac20, 0x1aa0d: 0x6c1e7220, 0x1aa0e: 0x6cf1c620, 0x1aa0f: 0x6c5e7220, + 0x1aa10: 0x6c281c20, 0x1aa11: 0x6d03b820, 0x1aa12: 0x6c577820, 0x1aa13: 0x6cecb620, + 0x1aa14: 0x6c73ce20, 0x1aa15: 0x6c839e20, 0x1aa16: 0x6d267020, 0x1aa17: 0x6c8abc20, + 0x1aa18: 0x6c8e3e20, 0x1aa19: 0x6d2aa220, 0x1aa1a: 0x6c425220, 0x1aa1b: 0x6c209e20, + 0x1aa1c: 0x6c3dd420, 0x1aa1d: 0x6c1e5420, 0x1aa1e: 0x6cc26020, 0x1aa1f: 0x6c704c20, + 0x1aa20: 0x6cccb820, 0x1aa21: 0x6c9f8e20, 0x1aa22: 0x6c8c9a20, 0x1aa23: 0x6d378a20, + 0x1aa24: 0x6cac9c20, 0x1aa25: 0x6c0cd820, 0x1aa26: 0x6c6a6420, 0x1aa27: 0x6c6a6620, + 0x1aa28: 0x6cad4420, 0x1aa29: 0x6c857620, 0x1aa2a: 0x6cccba20, 0x1aa2b: 0x6c0cda20, + 0x1aa2c: 0x6c158e20, 0x1aa2d: 0x6c6e0620, 0x1aa2e: 0x6c484420, 0x1aa2f: 0x6c44b820, + 0x1aa30: 0x6c2a0020, 0x1aa31: 0x6c20a220, 0x1aa32: 0x6c7c3220, 0x1aa33: 0x6c7a2020, + 0x1aa34: 0x6c34ca20, 0x1aa35: 0x6c37be20, 0x1aa36: 0x6d358020, 0x1aa37: 0x6cd64020, + 0x1aa38: 0x6cc36e20, 0x1aa39: 0x6ccbce20, 0x1aa3a: 0x6c22b220, 0x1aa3b: 0x6c787a20, + 0x1aa3c: 0x6c6a7620, 0x1aa3d: 0x6c4b2a20, 0x1aa3e: 0x6c22b420, 0x1aa3f: 0x6c4b2c20, + // Block 0x6a9, offset 0x1aa40 + 0x1aa40: 0x6c764620, 0x1aa41: 0x6c34cc20, 0x1aa42: 0x6c619020, 0x1aa43: 0x6ce3d820, + 0x1aa44: 0x6c6e1420, 0x1aa45: 0x6c907c20, 0x1aa46: 0x6c95a620, 0x1aa47: 0x6d2ab220, + 0x1aa48: 0x6d24cc20, 0x1aa49: 0x6c260c20, 0x1aa4a: 0x6d08da20, 0x1aa4b: 0x6c788220, + 0x1aa4c: 0x6c7e5a20, 0x1aa4d: 0x6cb97820, 0x1aa4e: 0x6ccbd020, 0x1aa4f: 0x6c20a420, + 0x1aa50: 0x6c489420, 0x1aa51: 0x6c665820, 0x1aa52: 0x6c261020, 0x1aa53: 0x6c83aa20, + 0x1aa54: 0x6ce2e820, 0x1aa55: 0x6c3a9620, 0x1aa56: 0x6cb3c620, 0x1aa57: 0x6c15a020, + 0x1aa58: 0x6cb59c20, 0x1aa59: 0x6c20a620, 0x1aa5a: 0x6d3f3820, 0x1aa5b: 0x6c426c20, + 0x1aa5c: 0x6cec8420, 0x1aa5d: 0x6c0e5a20, 0x1aa5e: 0x6c5e9e20, 0x1aa5f: 0x6c342220, + 0x1aa60: 0x6cbe7220, 0x1aa61: 0x6ccd7420, 0x1aa62: 0x6c316620, 0x1aa63: 0x6c666a20, + 0x1aa64: 0x6c61c220, 0x1aa65: 0x6c0e5c20, 0x1aa66: 0x6d0be220, 0x1aa67: 0x6c722820, + 0x1aa68: 0x6c5d5420, 0x1aa69: 0x6cd16220, 0x1aa6a: 0x6c658420, 0x1aa6b: 0x6c344420, + 0x1aa6c: 0x6c329620, 0x1aa6d: 0x6cf36220, 0x1aa6e: 0x6c489820, 0x1aa6f: 0x6c3fe220, + 0x1aa70: 0x6cd15a20, 0x1aa71: 0x6c667420, 0x1aa72: 0x6c438c20, 0x1aa73: 0x6c269420, + 0x1aa74: 0x6c765420, 0x1aa75: 0x6c20aa20, 0x1aa76: 0x6c1fe220, 0x1aa77: 0x6c15bc20, + 0x1aa78: 0x6ce94e20, 0x1aa79: 0x6c926220, 0x1aa7a: 0x6c83de20, 0x1aa7b: 0x6caf0a20, + 0x1aa7c: 0x6ccce820, 0x1aa7d: 0x6cb15620, 0x1aa7e: 0x6c79bc20, 0x1aa7f: 0x6c690220, + // Block 0x6aa, offset 0x1aa80 + 0x1aa80: 0x6c486620, 0x1aa81: 0x6cbb8a20, 0x1aa82: 0x6c747220, 0x1aa83: 0x6c57a820, + 0x1aa84: 0x6d2be620, 0x1aa85: 0x6d3df620, 0x1aa86: 0x6c882a20, 0x1aa87: 0x6c727420, + 0x1aa88: 0x6caf8420, 0x1aa89: 0x6c8e8020, 0x1aa8a: 0x6c4b5e20, 0x1aa8b: 0x6c692220, + 0x1aa8c: 0x6c4b6020, 0x1aa8d: 0x6c66b020, 0x1aa8e: 0x6c66b220, 0x1aa8f: 0x6ce0c820, + 0x1aa90: 0x6c5d5a20, 0x1aa91: 0x6c627220, 0x1aa92: 0x6c66cc20, 0x1aa93: 0x6d187e20, + 0x1aa94: 0x6c66ce20, 0x1aa95: 0x6d370020, 0x1aa96: 0x6c154220, 0x1aa97: 0x6c662020, + 0x1aa98: 0x6ca09820, 0x1aa99: 0x6c84c820, 0x1aa9a: 0x6d3a8c20, 0x1aa9b: 0x6c855c20, + 0x1aa9c: 0x6d0b6220, 0x1aa9d: 0x6cc36c20, 0x1aa9e: 0x6c04da20, 0x1aa9f: 0x6c455420, + 0x1aaa0: 0x6c631620, 0x1aaa1: 0x6cf55220, 0x1aaa2: 0x6c971e20, 0x1aaa3: 0x6c8abe20, + 0x1aaa4: 0x6c6cce20, 0x1aaa5: 0x6c792020, 0x1aaa6: 0x6d006420, 0x1aaa7: 0x6d34d220, + 0x1aaa8: 0x6c304c20, 0x1aaa9: 0x6d3aa020, 0x1aaaa: 0x6caa4a20, 0x1aaab: 0x6c6a6820, + 0x1aaac: 0x6cc17420, 0x1aaad: 0x6ccec020, 0x1aaae: 0x6d167620, 0x1aaaf: 0x6d398020, + 0x1aab0: 0x6ca0c020, 0x1aab1: 0x6c857a20, 0x1aab2: 0x6c6cd020, 0x1aab3: 0x6c813e20, + 0x1aab4: 0x6c814020, 0x1aab5: 0x6c733e20, 0x1aab6: 0x6c79ce20, 0x1aab7: 0x6d0f8620, + 0x1aab8: 0x6cebc620, 0x1aab9: 0x6cffd420, 0x1aaba: 0x6ca1c220, 0x1aabb: 0x6c7b8420, + 0x1aabc: 0x6c6a7a20, 0x1aabd: 0x6c8aca20, 0x1aabe: 0x6c50ba20, 0x1aabf: 0x6cd31420, + // Block 0x6ab, offset 0x1aac0 + 0x1aac0: 0x6c788420, 0x1aac1: 0x6c6ce020, 0x1aac2: 0x6c433620, 0x1aac3: 0x6c0ec220, + 0x1aac4: 0x6c9f9820, 0x1aac5: 0x6c1bf420, 0x1aac6: 0x6c80a020, 0x1aac7: 0x6d1e1820, + 0x1aac8: 0x6d1e1a20, 0x1aac9: 0x6c9e0c20, 0x1aaca: 0x6c788620, 0x1aacb: 0x6d099220, + 0x1aacc: 0x6c734420, 0x1aacd: 0x6cbe7420, 0x1aace: 0x6c922820, 0x1aacf: 0x6c107c20, + 0x1aad0: 0x6c9bcc20, 0x1aad1: 0x6c1c0420, 0x1aad2: 0x6c823c20, 0x1aad3: 0x6c768620, + 0x1aad4: 0x6c9e1a20, 0x1aad5: 0x6c307220, 0x1aad6: 0x6d06b420, 0x1aad7: 0x6d06ba20, + 0x1aad8: 0x6c76a620, 0x1aad9: 0x6cf55620, 0x1aada: 0x6d175020, 0x1aadb: 0x6d099820, + 0x1aadc: 0x6cf24a20, 0x1aadd: 0x6cd16420, 0x1aade: 0x6c815620, 0x1aadf: 0x6ca28420, + 0x1aae0: 0x6c926420, 0x1aae1: 0x6cb1b220, 0x1aae2: 0x6cd39620, 0x1aae3: 0x6c5ee220, + 0x1aae4: 0x6cbd7c20, 0x1aae5: 0x6c67ee20, 0x1aae6: 0x6c174c20, 0x1aae7: 0x6cc37420, + 0x1aae8: 0x6cfe3e20, 0x1aae9: 0x6d181c20, 0x1aaea: 0x6c747620, 0x1aaeb: 0x6c385220, + 0x1aaec: 0x6c72fa20, 0x1aaed: 0x6ce76620, 0x1aaee: 0x6c727620, 0x1aaef: 0x6c27f620, + 0x1aaf0: 0x6d00d620, 0x1aaf1: 0x6c973820, 0x1aaf2: 0x6d09a420, 0x1aaf3: 0x6d09a820, + 0x1aaf4: 0x6c940220, 0x1aaf5: 0x6c867020, 0x1aaf6: 0x6c184e20, 0x1aaf7: 0x6cc4e220, + 0x1aaf8: 0x6cc37c20, 0x1aaf9: 0x6c059c20, 0x1aafa: 0x6cce9420, 0x1aafb: 0x6d277620, + 0x1aafc: 0x6c6f4220, 0x1aafd: 0x6c062c20, 0x1aafe: 0x6c463220, 0x1aaff: 0x6cf49220, + // Block 0x6ac, offset 0x1ab00 + 0x1ab00: 0x6d277820, 0x1ab01: 0x6cf17820, 0x1ab02: 0x6c0ade20, 0x1ab03: 0x6c412220, + 0x1ab04: 0x6c412420, 0x1ab05: 0x6c059e20, 0x1ab06: 0x6c22f420, 0x1ab07: 0x6d198a20, + 0x1ab08: 0x6d045020, 0x1ab09: 0x6cae5020, 0x1ab0a: 0x6c705020, 0x1ab0b: 0x6ce20420, + 0x1ab0c: 0x6c43c620, 0x1ab0d: 0x6cb42c20, 0x1ab0e: 0x6c35f820, 0x1ab0f: 0x6cad5a20, + 0x1ab10: 0x6c3e4820, 0x1ab11: 0x6c458820, 0x1ab12: 0x6c269620, 0x1ab13: 0x6c6fee20, + 0x1ab14: 0x6cbef220, 0x1ab15: 0x6c08aa20, 0x1ab16: 0x6c577620, 0x1ab17: 0x6c06c620, + 0x1ab18: 0x6ca4ea20, 0x1ab19: 0x6cd41420, 0x1ab1a: 0x6c397e20, 0x1ab1b: 0x6c6fc620, + 0x1ab1c: 0x6d144c20, 0x1ab1d: 0x6d288020, 0x1ab1e: 0x6c67d020, 0x1ab1f: 0x6c777820, + 0x1ab20: 0x6c681820, 0x1ab21: 0x6c7b8020, 0x1ab22: 0x6c549220, 0x1ab23: 0x6cf98420, + 0x1ab24: 0x6cc0ce20, 0x1ab25: 0x6c0b6820, 0x1ab26: 0x6c4ac620, 0x1ab27: 0x6cbc9c20, + 0x1ab28: 0x6d29d020, 0x1ab29: 0x6c7b8a20, 0x1ab2a: 0x6c3a4c20, 0x1ab2b: 0x6c54b420, + 0x1ab2c: 0x6d224620, 0x1ab2d: 0x6c4aee20, 0x1ab2e: 0x6c7cf020, 0x1ab2f: 0x6c5bd220, + 0x1ab30: 0x6c27ea20, 0x1ab31: 0x6c4b5c20, 0x1ab32: 0x6c881a20, 0x1ab33: 0x6c882c20, + 0x1ab34: 0x6cdb9420, 0x1ab35: 0x6c31c220, 0x1ab36: 0x6c703420, 0x1ab37: 0x6c74fa20, + 0x1ab38: 0x6cf83420, 0x1ab39: 0x6cb04020, 0x1ab3a: 0x6cc0c420, 0x1ab3b: 0x6d13c020, + 0x1ab3c: 0x6c77d420, 0x1ab3d: 0x6d0d5220, 0x1ab3e: 0x6c0b3220, 0x1ab3f: 0x6ca68c20, + // Block 0x6ad, offset 0x1ab40 + 0x1ab40: 0x6cc0f820, 0x1ab41: 0x6cd22420, 0x1ab42: 0x6d0a6020, 0x1ab43: 0x6cb88c20, + 0x1ab44: 0x6ca75420, 0x1ab45: 0x6cc96220, 0x1ab46: 0x6d40a220, 0x1ab47: 0x6cd0d020, + 0x1ab48: 0x6cf41620, 0x1ab49: 0x6c5b8420, 0x1ab4a: 0x6c04dc20, 0x1ab4b: 0x6cd2fa20, + 0x1ab4c: 0x6cf83620, 0x1ab4d: 0x6ced6a20, 0x1ab4e: 0x6c572420, 0x1ab4f: 0x6d006620, + 0x1ab50: 0x6ced6c20, 0x1ab51: 0x6c068e20, 0x1ab52: 0x6d40a820, 0x1ab53: 0x6d3cee20, + 0x1ab54: 0x6d007020, 0x1ab55: 0x6c27ba20, 0x1ab56: 0x6c972820, 0x1ab57: 0x6ca3ea20, + 0x1ab58: 0x6c27c020, 0x1ab59: 0x6c601220, 0x1ab5a: 0x6c0efe20, 0x1ab5b: 0x6cd67c20, + 0x1ab5c: 0x6c100420, 0x1ab5d: 0x6c7bd420, 0x1ab5e: 0x6c0b6420, 0x1ab5f: 0x6c102a20, + 0x1ab60: 0x6d2e4620, 0x1ab61: 0x6c761820, 0x1ab62: 0x6c913020, 0x1ab63: 0x6d1f9c20, + 0x1ab64: 0x6c91b420, 0x1ab65: 0x6cf58420, 0x1ab66: 0x6c48a620, 0x1ab67: 0x6cf2d420, + 0x1ab68: 0x6d017620, 0x1ab69: 0x6c6a4e20, 0x1ab6a: 0x6c6a5020, 0x1ab6b: 0x6cf06820, + 0x1ab6c: 0x6c01f020, 0x1ab6d: 0x6cbef420, 0x1ab6e: 0x6d338020, 0x1ab6f: 0x6c991e20, + 0x1ab70: 0x6d1b3620, 0x1ab71: 0x6cee6620, 0x1ab72: 0x6ccec420, 0x1ab73: 0x6c5fd220, + 0x1ab74: 0x6cc3a020, 0x1ab75: 0x6c948c20, 0x1ab76: 0x6c1b7c20, 0x1ab77: 0x6c731020, + 0x1ab78: 0x6d016a20, 0x1ab79: 0x6d067e20, 0x1ab7a: 0x6c6c8620, 0x1ab7b: 0x6cc3a620, + 0x1ab7c: 0x6cf4be20, 0x1ab7d: 0x6c5fec20, 0x1ab7e: 0x6c360a20, 0x1ab7f: 0x6cbe3a20, + // Block 0x6ae, offset 0x1ab80 + 0x1ab80: 0x6cf63820, 0x1ab81: 0x6cca6620, 0x1ab82: 0x6c16e020, 0x1ab83: 0x6cef8020, + 0x1ab84: 0x6c35c020, 0x1ab85: 0x6ce62220, 0x1ab86: 0x6c856020, 0x1ab87: 0x6d300c20, + 0x1ab88: 0x6c4e4e20, 0x1ab89: 0x6c856420, 0x1ab8a: 0x6d0b4620, 0x1ab8b: 0x6d0ac820, + 0x1ab8c: 0x6d0e3620, 0x1ab8d: 0x6ccf3020, 0x1ab8e: 0x6c2bca20, 0x1ab8f: 0x6d2c7020, + 0x1ab90: 0x6cacf020, 0x1ab91: 0x6d0b0c20, 0x1ab92: 0x6c50bc20, 0x1ab93: 0x6d0b1620, + 0x1ab94: 0x6d358220, 0x1ab95: 0x6c12cc20, 0x1ab96: 0x6cacf620, 0x1ab97: 0x6ce31020, + 0x1ab98: 0x6c83a420, 0x1ab99: 0x6ccf3820, 0x1ab9a: 0x6c546020, 0x1ab9b: 0x6ce63420, + 0x1ab9c: 0x6d416820, 0x1ab9d: 0x6c261220, 0x1ab9e: 0x6c3a9820, 0x1ab9f: 0x6d254c20, + 0x1aba0: 0x6c12dc20, 0x1aba1: 0x6d255e20, 0x1aba2: 0x6cfd6a20, 0x1aba3: 0x6d0d6420, + 0x1aba4: 0x6c860c20, 0x1aba5: 0x6c744220, 0x1aba6: 0x6ccc5020, 0x1aba7: 0x6c2cca20, + 0x1aba8: 0x6c1e7c20, 0x1aba9: 0x6c6ff020, 0x1abaa: 0x6c6c9620, 0x1abab: 0x6c024620, + 0x1abac: 0x6c4b1020, 0x1abad: 0x6d0e9020, 0x1abae: 0x6cd80020, 0x1abaf: 0x6c862620, + 0x1abb0: 0x6c16f220, 0x1abb1: 0x6c7faa20, 0x1abb2: 0x6c864620, 0x1abb3: 0x6d0cd020, + 0x1abb4: 0x6d0df620, 0x1abb5: 0x6d25dc20, 0x1abb6: 0x6cd7b420, 0x1abb7: 0x6c455020, + 0x1abb8: 0x6c8b9c20, 0x1abb9: 0x6cc73e20, 0x1abba: 0x6cc25a20, 0x1abbb: 0x6cc25c20, + 0x1abbc: 0x6c377c20, 0x1abbd: 0x6c82b020, 0x1abbe: 0x6c315e20, 0x1abbf: 0x6cfc7420, + // Block 0x6af, offset 0x1abc0 + 0x1abc0: 0x6d3b6e20, 0x1abc1: 0x6cc9fa20, 0x1abc2: 0x6c115a20, 0x1abc3: 0x6c115e20, + 0x1abc4: 0x6c116020, 0x1abc5: 0x6c116620, 0x1abc6: 0x6c00b420, 0x1abc7: 0x6c278620, + 0x1abc8: 0x6d200420, 0x1abc9: 0x6c137220, 0x1abca: 0x6c5fb820, 0x1abcb: 0x6d206820, + 0x1abcc: 0x6cd6a020, 0x1abcd: 0x6c390020, 0x1abce: 0x6cd42620, 0x1abcf: 0x6c48e420, + 0x1abd0: 0x6c035c20, 0x1abd1: 0x6c37e220, 0x1abd2: 0x6cc91020, 0x1abd3: 0x6cd30820, + 0x1abd4: 0x6cd4a620, 0x1abd5: 0x6d3d2a20, 0x1abd6: 0x6cc23c20, 0x1abd7: 0x6cd45220, + 0x1abd8: 0x6c0b7a20, 0x1abd9: 0x6d068a20, 0x1abda: 0x6c640420, 0x1abdb: 0x6cacaa20, + 0x1abdc: 0x6cda0c20, 0x1abdd: 0x6c433820, 0x1abde: 0x6cf08020, 0x1abdf: 0x6cda0e20, + 0x1abe0: 0x6c2ebc20, 0x1abe1: 0x6cc8e220, 0x1abe2: 0x6c23bc20, 0x1abe3: 0x6c79c820, + 0x1abe4: 0x6c475020, 0x1abe5: 0x6c71ea20, 0x1abe6: 0x6c8e1a20, 0x1abe7: 0x6c488a20, + 0x1abe8: 0x6c29b420, 0x1abe9: 0x6c79d420, 0x1abea: 0x6d34ce20, 0x1abeb: 0x6c697a20, + 0x1abec: 0x6d2f9420, 0x1abed: 0x6c03e820, 0x1abee: 0x6c2f4420, 0x1abef: 0x6c785220, + 0x1abf0: 0x6cdf0e20, 0x1abf1: 0x6c1bd620, 0x1abf2: 0x6cd2a420, 0x1abf3: 0x6d200820, + 0x1abf4: 0x6cbfee20, 0x1abf5: 0x6cb34620, 0x1abf6: 0x6d12ba20, 0x1abf7: 0x6c500e20, + 0x1abf8: 0x6cd7bc20, 0x1abf9: 0x6ce08a20, 0x1abfa: 0x6c1b7220, 0x1abfb: 0x6c820a20, + 0x1abfc: 0x6c2daa20, 0x1abfd: 0x6c5e6c20, 0x1abfe: 0x6c8a5c20, 0x1abff: 0x6c529020, + // Block 0x6b0, offset 0x1ac00 + 0x1ac00: 0x6c9ebe20, 0x1ac01: 0x6d056020, 0x1ac02: 0x6c982420, 0x1ac03: 0x6c1a9020, + 0x1ac04: 0x6c447c20, 0x1ac05: 0x6d077820, 0x1ac06: 0x6d108620, 0x1ac07: 0x6d3ed820, + 0x1ac08: 0x6c50b620, 0x1ac09: 0x6c5fc220, 0x1ac0a: 0x6c2e0820, 0x1ac0b: 0x6c25b220, + 0x1ac0c: 0x6ce70c20, 0x1ac0d: 0x6c9fe620, 0x1ac0e: 0x6c545a20, 0x1ac0f: 0x6c856e20, + 0x1ac10: 0x6ce91620, 0x1ac11: 0x6cfe1620, 0x1ac12: 0x6d2bc220, 0x1ac13: 0x6cfa2a20, + 0x1ac14: 0x6d12a020, 0x1ac15: 0x6c937420, 0x1ac16: 0x6d0aca20, 0x1ac17: 0x6c96ee20, + 0x1ac18: 0x6cab7420, 0x1ac19: 0x6c5d5220, 0x1ac1a: 0x6d13c220, 0x1ac1b: 0x6c755420, + 0x1ac1c: 0x6c1e1c20, 0x1ac1d: 0x6c8c4420, 0x1ac1e: 0x6cea1620, 0x1ac1f: 0x6d1a2420, + 0x1ac20: 0x6c3a7e20, 0x1ac21: 0x6c08b820, 0x1ac22: 0x6cbdfe20, 0x1ac23: 0x6cbe0020, + 0x1ac24: 0x6c6ba820, 0x1ac25: 0x6c105c20, 0x1ac26: 0x6c3d1c20, 0x1ac27: 0x6c03ea20, + 0x1ac28: 0x6c339620, 0x1ac29: 0x6c3b0c20, 0x1ac2a: 0x6c354820, 0x1ac2b: 0x6c4dce20, + 0x1ac2c: 0x6ce62c20, 0x1ac2d: 0x6c792420, 0x1ac2e: 0x6cd74620, 0x1ac2f: 0x6cb6d020, + 0x1ac30: 0x6c52f020, 0x1ac31: 0x6d338620, 0x1ac32: 0x6d1aca20, 0x1ac33: 0x6cf3a020, + 0x1ac34: 0x6cf3a220, 0x1ac35: 0x6c178c20, 0x1ac36: 0x6ca55820, 0x1ac37: 0x6d093c20, + 0x1ac38: 0x6cf56a20, 0x1ac39: 0x6c20b420, 0x1ac3a: 0x6c309e20, 0x1ac3b: 0x6cf1c820, + 0x1ac3c: 0x6c544820, 0x1ac3d: 0x6c529220, 0x1ac3e: 0x6cf3a420, 0x1ac3f: 0x6c433220, + // Block 0x6b1, offset 0x1ac40 + 0x1ac40: 0x6d0bda20, 0x1ac41: 0x6c759420, 0x1ac42: 0x6c937620, 0x1ac43: 0x6c35d020, + 0x1ac44: 0x6c43c020, 0x1ac45: 0x6c99ce20, 0x1ac46: 0x6c270420, 0x1ac47: 0x6cb6d220, + 0x1ac48: 0x6c19b620, 0x1ac49: 0x6cf3a620, 0x1ac4a: 0x6c433420, 0x1ac4b: 0x6c3d3820, + 0x1ac4c: 0x6c698020, 0x1ac4d: 0x6c529420, 0x1ac4e: 0x6c1b7820, 0x1ac4f: 0x6cd0da20, + 0x1ac50: 0x6ca55a20, 0x1ac51: 0x6cea1820, 0x1ac52: 0x6c3f3220, 0x1ac53: 0x6d167820, + 0x1ac54: 0x6c270620, 0x1ac55: 0x6cab7620, 0x1ac56: 0x6c857c20, 0x1ac57: 0x6c077620, + 0x1ac58: 0x6d253820, 0x1ac59: 0x6c4c0e20, 0x1ac5a: 0x6cf21a20, 0x1ac5b: 0x6cba9c20, + 0x1ac5c: 0x6cf35020, 0x1ac5d: 0x6c35da20, 0x1ac5e: 0x6cd19820, 0x1ac5f: 0x6c731220, + 0x1ac60: 0x6cae4620, 0x1ac61: 0x6cf1ce20, 0x1ac62: 0x6ca55c20, 0x1ac63: 0x6c965a20, + 0x1ac64: 0x6c8e1c20, 0x1ac65: 0x6cc46020, 0x1ac66: 0x6d1e9420, 0x1ac67: 0x6c2bd420, + 0x1ac68: 0x6d385a20, 0x1ac69: 0x6cd31620, 0x1ac6a: 0x6d38fa20, 0x1ac6b: 0x6ce60e20, + 0x1ac6c: 0x6cf84420, 0x1ac6d: 0x6d16a820, 0x1ac6e: 0x6cb74220, 0x1ac6f: 0x6cb27420, + 0x1ac70: 0x6d3ef420, 0x1ac71: 0x6c46ea20, 0x1ac72: 0x6c21f420, 0x1ac73: 0x6cf07220, + 0x1ac74: 0x6d062a20, 0x1ac75: 0x6c000420, 0x1ac76: 0x6ca49220, 0x1ac77: 0x6c40be20, + 0x1ac78: 0x6cadac20, 0x1ac79: 0x6d16aa20, 0x1ac7a: 0x6cfe8220, 0x1ac7b: 0x6ccfa820, + 0x1ac7c: 0x6c549820, 0x1ac7d: 0x6ca04020, 0x1ac7e: 0x6c267a20, 0x1ac7f: 0x6cc26220, + // Block 0x6b2, offset 0x1ac80 + 0x1ac80: 0x6c71a220, 0x1ac81: 0x6c4dd420, 0x1ac82: 0x6d288820, 0x1ac83: 0x6ceaa820, + 0x1ac84: 0x6c341a20, 0x1ac85: 0x6cb3ec20, 0x1ac86: 0x6cad4620, 0x1ac87: 0x6c0cdc20, + 0x1ac88: 0x6c3de020, 0x1ac89: 0x6d0f4420, 0x1ac8a: 0x6c50be20, 0x1ac8b: 0x6d28e820, + 0x1ac8c: 0x6c50c020, 0x1ac8d: 0x6c4d0c20, 0x1ac8e: 0x6c6fd420, 0x1ac8f: 0x6d1e1220, + 0x1ac90: 0x6c40aa20, 0x1ac91: 0x6c264020, 0x1ac92: 0x6d38fc20, 0x1ac93: 0x6cec1220, + 0x1ac94: 0x6c760c20, 0x1ac95: 0x6c483220, 0x1ac96: 0x6c760e20, 0x1ac97: 0x6d42b820, + 0x1ac98: 0x6c106020, 0x1ac99: 0x6c8f6a20, 0x1ac9a: 0x6c2fda20, 0x1ac9b: 0x6ca8f420, + 0x1ac9c: 0x6cdefe20, 0x1ac9d: 0x6cd7c820, 0x1ac9e: 0x6cfc7820, 0x1ac9f: 0x6c5da420, + 0x1aca0: 0x6cb75020, 0x1aca1: 0x6c37c020, 0x1aca2: 0x6c35e420, 0x1aca3: 0x6c49da20, + 0x1aca4: 0x6d2cb220, 0x1aca5: 0x6cf85420, 0x1aca6: 0x6d148a20, 0x1aca7: 0x6c8b9220, + 0x1aca8: 0x6d3e0a20, 0x1aca9: 0x6c9ec020, 0x1acaa: 0x6c9c2e20, 0x1acab: 0x6d34fa20, + 0x1acac: 0x6d119420, 0x1acad: 0x6c5e9220, 0x1acae: 0x6d390a20, 0x1acaf: 0x6c437820, + 0x1acb0: 0x6cd5a820, 0x1acb1: 0x6d295e20, 0x1acb2: 0x6cffd620, 0x1acb3: 0x6c4d0e20, + 0x1acb4: 0x6c5a8e20, 0x1acb5: 0x6c7ad420, 0x1acb6: 0x6c580c20, 0x1acb7: 0x6ce20820, + 0x1acb8: 0x6cfb3020, 0x1acb9: 0x6c35e620, 0x1acba: 0x6d084220, 0x1acbb: 0x6d04ba20, + 0x1acbc: 0x6c4c1020, 0x1acbd: 0x6d0e4220, 0x1acbe: 0x6c81a020, 0x1acbf: 0x6d13ce20, + // Block 0x6b3, offset 0x1acc0 + 0x1acc0: 0x6c001620, 0x1acc1: 0x6cb23820, 0x1acc2: 0x6cd04a20, 0x1acc3: 0x6ce72020, + 0x1acc4: 0x6c529a20, 0x1acc5: 0x6d045c20, 0x1acc6: 0x6c341c20, 0x1acc7: 0x6cec4c20, + 0x1acc8: 0x6c4cf820, 0x1acc9: 0x6d28f820, 0x1acca: 0x6d201e20, 0x1accb: 0x6c2f3020, + 0x1accc: 0x6cac1c20, 0x1accd: 0x6cfddc20, 0x1acce: 0x6c001420, 0x1accf: 0x6c449c20, + 0x1acd0: 0x6c7b8c20, 0x1acd1: 0x6d0b4a20, 0x1acd2: 0x6c264220, 0x1acd3: 0x6cfe8a20, + 0x1acd4: 0x6c094220, 0x1acd5: 0x6c5b9620, 0x1acd6: 0x6ca77420, 0x1acd7: 0x6c570a20, + 0x1acd8: 0x6d044220, 0x1acd9: 0x6c7b1820, 0x1acda: 0x6c347620, 0x1acdb: 0x6c3b1c20, + 0x1acdc: 0x6c619c20, 0x1acdd: 0x6ca9b220, 0x1acde: 0x6ca1ba20, 0x1acdf: 0x6d1d7620, + 0x1ace0: 0x6c502420, 0x1ace1: 0x6d254e20, 0x1ace2: 0x6c905620, 0x1ace3: 0x6cb3ee20, + 0x1ace4: 0x6c984820, 0x1ace5: 0x6c438020, 0x1ace6: 0x6cab2820, 0x1ace7: 0x6c1a9a20, + 0x1ace8: 0x6ccece20, 0x1ace9: 0x6c87dc20, 0x1acea: 0x6ca2f420, 0x1aceb: 0x6d40ae20, + 0x1acec: 0x6c50ea20, 0x1aced: 0x6c7a3420, 0x1acee: 0x6cfe9220, 0x1acef: 0x6cfc9a20, + 0x1acf0: 0x6c814820, 0x1acf1: 0x6c0e5e20, 0x1acf2: 0x6d302c20, 0x1acf3: 0x6d2bd020, + 0x1acf4: 0x6c89ac20, 0x1acf5: 0x6c033620, 0x1acf6: 0x6c9ec220, 0x1acf7: 0x6c8ae220, + 0x1acf8: 0x6cdbb420, 0x1acf9: 0x6c3e2a20, 0x1acfa: 0x6c103420, 0x1acfb: 0x6c4e9020, + 0x1acfc: 0x6c524620, 0x1acfd: 0x6c44f220, 0x1acfe: 0x6cd76820, 0x1acff: 0x6c447420, + // Block 0x6b4, offset 0x1ad00 + 0x1ad00: 0x6d203620, 0x1ad01: 0x6d0e4c20, 0x1ad02: 0x6c46fc20, 0x1ad03: 0x6c477020, + 0x1ad04: 0x6c077820, 0x1ad05: 0x6c4dec20, 0x1ad06: 0x6cdd0c20, 0x1ad07: 0x6c213820, + 0x1ad08: 0x6d171c20, 0x1ad09: 0x6c001820, 0x1ad0a: 0x6c63ae20, 0x1ad0b: 0x6ce84620, + 0x1ad0c: 0x6cfb3220, 0x1ad0d: 0x6cecf620, 0x1ad0e: 0x6c85c420, 0x1ad0f: 0x6cf5b220, + 0x1ad10: 0x6ce0e820, 0x1ad11: 0x6d428a20, 0x1ad12: 0x6cc02420, 0x1ad13: 0x6c17d420, + 0x1ad14: 0x6cf3ac20, 0x1ad15: 0x6d2a6e20, 0x1ad16: 0x6d0b4c20, 0x1ad17: 0x6c30a420, + 0x1ad18: 0x6cb6e420, 0x1ad19: 0x6c2b6020, 0x1ad1a: 0x6cbe0c20, 0x1ad1b: 0x6c96ba20, + 0x1ad1c: 0x6ca0ee20, 0x1ad1d: 0x6c461220, 0x1ad1e: 0x6c30e620, 0x1ad1f: 0x6cc26c20, + 0x1ad20: 0x6c814a20, 0x1ad21: 0x6c898c20, 0x1ad22: 0x6cdd5420, 0x1ad23: 0x6d2a7020, + 0x1ad24: 0x6c58fe20, 0x1ad25: 0x6c813620, 0x1ad26: 0x6ccbd620, 0x1ad27: 0x6c5ea020, + 0x1ad28: 0x6d426820, 0x1ad29: 0x6cf28420, 0x1ad2a: 0x6c3cca20, 0x1ad2b: 0x6c6cfc20, + 0x1ad2c: 0x6c56fc20, 0x1ad2d: 0x6cb77620, 0x1ad2e: 0x6cd45c20, 0x1ad2f: 0x6ceefa20, + 0x1ad30: 0x6cd64420, 0x1ad31: 0x6c171020, 0x1ad32: 0x6c374e20, 0x1ad33: 0x6c85e620, + 0x1ad34: 0x6cbb5620, 0x1ad35: 0x6c017e20, 0x1ad36: 0x6d2ab620, 0x1ad37: 0x6d1d7820, + 0x1ad38: 0x6ca75e20, 0x1ad39: 0x6d208420, 0x1ad3a: 0x6ce4e620, 0x1ad3b: 0x6c7f4420, + 0x1ad3c: 0x6ccc4220, 0x1ad3d: 0x6cf5d820, 0x1ad3e: 0x6ceba020, 0x1ad3f: 0x6c54b820, + // Block 0x6b5, offset 0x1ad40 + 0x1ad40: 0x6c003c20, 0x1ad41: 0x6d2f6420, 0x1ad42: 0x6caa1420, 0x1ad43: 0x6c790220, + 0x1ad44: 0x6d3d4420, 0x1ad45: 0x6d3d4620, 0x1ad46: 0x6cce0220, 0x1ad47: 0x6c2c3a20, + 0x1ad48: 0x6c524a20, 0x1ad49: 0x6c8ba820, 0x1ad4a: 0x6c001020, 0x1ad4b: 0x6c112220, + 0x1ad4c: 0x6cfd6c20, 0x1ad4d: 0x6cea1e20, 0x1ad4e: 0x6cf43e20, 0x1ad4f: 0x6cf20620, + 0x1ad50: 0x6c253020, 0x1ad51: 0x6ccc4420, 0x1ad52: 0x6c477a20, 0x1ad53: 0x6cb6ec20, + 0x1ad54: 0x6cb6ee20, 0x1ad55: 0x6ce21620, 0x1ad56: 0x6c287420, 0x1ad57: 0x6c287620, + 0x1ad58: 0x6d12e620, 0x1ad59: 0x6d3f1020, 0x1ad5a: 0x6c08d820, 0x1ad5b: 0x6c253220, + 0x1ad5c: 0x6c1fc220, 0x1ad5d: 0x6c510220, 0x1ad5e: 0x6d0b5020, 0x1ad5f: 0x6cb6f420, + 0x1ad60: 0x6d304820, 0x1ad61: 0x6c39f620, 0x1ad62: 0x6c898e20, 0x1ad63: 0x6cfb5820, + 0x1ad64: 0x6cafd820, 0x1ad65: 0x6ccc4620, 0x1ad66: 0x6c7ed420, 0x1ad67: 0x6d2ab820, + 0x1ad68: 0x6d1baa20, 0x1ad69: 0x6c48ae20, 0x1ad6a: 0x6cabc220, 0x1ad6b: 0x6d30d620, + 0x1ad6c: 0x6ccb2020, 0x1ad6d: 0x6d3bc220, 0x1ad6e: 0x6ca81020, 0x1ad6f: 0x6c4cf620, + 0x1ad70: 0x6c953020, 0x1ad71: 0x6d0bf020, 0x1ad72: 0x6c2c3c20, 0x1ad73: 0x6cc2d220, + 0x1ad74: 0x6c15a420, 0x1ad75: 0x6c100620, 0x1ad76: 0x6c2fa020, 0x1ad77: 0x6c809e20, + 0x1ad78: 0x6cffe420, 0x1ad79: 0x6c710c20, 0x1ad7a: 0x6ce0f220, 0x1ad7b: 0x6c1c1a20, + 0x1ad7c: 0x6ce31e20, 0x1ad7d: 0x6c016c20, 0x1ad7e: 0x6c6f7020, 0x1ad7f: 0x6c288620, + // Block 0x6b6, offset 0x1ad80 + 0x1ad80: 0x6c761020, 0x1ad81: 0x6d1df420, 0x1ad82: 0x6cf08a20, 0x1ad83: 0x6ca3fc20, + 0x1ad84: 0x6ccd8a20, 0x1ad85: 0x6d232a20, 0x1ad86: 0x6d305820, 0x1ad87: 0x6c7e6220, + 0x1ad88: 0x6c6a0820, 0x1ad89: 0x6c53f820, 0x1ad8a: 0x6c4e5820, 0x1ad8b: 0x6c2e9820, + 0x1ad8c: 0x6d388220, 0x1ad8d: 0x6c147e20, 0x1ad8e: 0x6cec5220, 0x1ad8f: 0x6caaec20, + 0x1ad90: 0x6d230020, 0x1ad91: 0x6d19d820, 0x1ad92: 0x6d28b820, 0x1ad93: 0x6d10a220, + 0x1ad94: 0x6cab2420, 0x1ad95: 0x6c9e2020, 0x1ad96: 0x6c555220, 0x1ad97: 0x6d27e820, + 0x1ad98: 0x6c201e20, 0x1ad99: 0x6c5bbc20, 0x1ad9a: 0x6c591a20, 0x1ad9b: 0x6c591c20, + 0x1ad9c: 0x6cf7e620, 0x1ad9d: 0x6c509c20, 0x1ad9e: 0x6c5ec220, 0x1ad9f: 0x6c7cf420, + 0x1ada0: 0x6d37ee20, 0x1ada1: 0x6cef0620, 0x1ada2: 0x6ccc5220, 0x1ada3: 0x6d06cc20, + 0x1ada4: 0x6c59ba20, 0x1ada5: 0x6c344a20, 0x1ada6: 0x6ca82620, 0x1ada7: 0x6d079020, + 0x1ada8: 0x6c89b420, 0x1ada9: 0x6d232c20, 0x1adaa: 0x6cca9e20, 0x1adab: 0x6c1aae20, + 0x1adac: 0x6cbbe020, 0x1adad: 0x6d0e6a20, 0x1adae: 0x6c27dc20, 0x1adaf: 0x6cae4a20, + 0x1adb0: 0x6c116820, 0x1adb1: 0x6c83d020, 0x1adb2: 0x6d1d7a20, 0x1adb3: 0x6d2bd620, + 0x1adb4: 0x6cee7c20, 0x1adb5: 0x6c9e6c20, 0x1adb6: 0x6d1c6220, 0x1adb7: 0x6cae3220, + 0x1adb8: 0x6c103820, 0x1adb9: 0x6c7c7420, 0x1adba: 0x6cf88420, 0x1adbb: 0x6d232e20, + 0x1adbc: 0x6c6ac420, 0x1adbd: 0x6c912820, 0x1adbe: 0x6c7a9620, 0x1adbf: 0x6d2a8220, + // Block 0x6b7, offset 0x1adc0 + 0x1adc0: 0x6c56a220, 0x1adc1: 0x6ce33c20, 0x1adc2: 0x6d110420, 0x1adc3: 0x6c51ca20, + 0x1adc4: 0x6c000e20, 0x1adc5: 0x6d054220, 0x1adc6: 0x6cbabe20, 0x1adc7: 0x6ccb2e20, + 0x1adc8: 0x6d1d8a20, 0x1adc9: 0x6cdabe20, 0x1adca: 0x6c53a620, 0x1adcb: 0x6d00b220, + 0x1adcc: 0x6c00a220, 0x1adcd: 0x6cdd2420, 0x1adce: 0x6c96f020, 0x1adcf: 0x6c139620, + 0x1add0: 0x6c4d6c20, 0x1add1: 0x6c780420, 0x1add2: 0x6c264c20, 0x1add3: 0x6cca7e20, + 0x1add4: 0x6c187220, 0x1add5: 0x6cc81820, 0x1add6: 0x6cd9aa20, 0x1add7: 0x6cebdc20, + 0x1add8: 0x6c5ee420, 0x1add9: 0x6cad1c20, 0x1adda: 0x6cf36e20, 0x1addb: 0x6cba1020, + 0x1addc: 0x6cd39820, 0x1addd: 0x6c440020, 0x1adde: 0x6d3e3220, 0x1addf: 0x6c6a0a20, + 0x1ade0: 0x6c960c20, 0x1ade1: 0x6cf22820, 0x1ade2: 0x6cec3420, 0x1ade3: 0x6cd8c820, + 0x1ade4: 0x6c1ab420, 0x1ade5: 0x6c4fca20, 0x1ade6: 0x6cddd820, + 0x1ade8: 0x6c4d1620, 0x1ade9: 0x6cdd7020, 0x1adea: 0x6cbd7e20, 0x1adeb: 0x6ca83820, + 0x1adec: 0x6c50a020, 0x1aded: 0x6d347020, 0x1adee: 0x6cc9e220, 0x1adef: 0x6ca2c620, + 0x1adf0: 0x6c448a20, 0x1adf1: 0x6ca2e420, 0x1adf2: 0x6c2cb820, 0x1adf3: 0x6c002c20, + 0x1adf4: 0x6cbb6220, 0x1adf5: 0x6ce6f620, 0x1adf6: 0x6c09c220, 0x1adf7: 0x6c024a20, + 0x1adf8: 0x6c024c20, 0x1adf9: 0x6c880c20, 0x1adfa: 0x6d417420, 0x1adfb: 0x6d300020, + 0x1adfc: 0x6ca12420, 0x1adfd: 0x6cda4620, 0x1adfe: 0x6cda2020, 0x1adff: 0x6ce06820, + // Block 0x6b8, offset 0x1ae00 + 0x1ae00: 0x6c2b7820, 0x1ae01: 0x6cb50820, 0x1ae02: 0x6c69aa20, 0x1ae03: 0x6c1cd020, + 0x1ae04: 0x6c685a20, 0x1ae05: 0x6c765620, 0x1ae06: 0x6ce0a020, 0x1ae07: 0x6cccf820, + 0x1ae08: 0x6c127820, 0x1ae09: 0x6c637620, 0x1ae0a: 0x6c004620, 0x1ae0b: 0x6cfee620, + 0x1ae0c: 0x6cb1b420, 0x1ae0d: 0x6c912a20, 0x1ae0e: 0x6c40c020, 0x1ae0f: 0x6c47aa20, + 0x1ae10: 0x6cfee820, 0x1ae11: 0x6c54e220, 0x1ae12: 0x6c5bf220, 0x1ae13: 0x6c4c2c20, + 0x1ae14: 0x6cab8220, 0x1ae15: 0x6cfabc20, 0x1ae16: 0x6d2ad820, 0x1ae17: 0x6c16b420, + 0x1ae18: 0x6d05b820, 0x1ae19: 0x6cb32e20, 0x1ae1a: 0x6c2a5c20, 0x1ae1b: 0x6c96f420, + 0x1ae1c: 0x6c96ca20, 0x1ae1d: 0x6c557820, 0x1ae1e: 0x6c836c20, 0x1ae1f: 0x6c317220, + 0x1ae20: 0x6c40c220, 0x1ae21: 0x6ce0c420, 0x1ae22: 0x6d12ae20, 0x1ae23: 0x6c07fe20, + 0x1ae24: 0x6d1bcc20, 0x1ae25: 0x6cc9f020, 0x1ae26: 0x6c69ac20, 0x1ae27: 0x6c9d6420, + 0x1ae28: 0x6cfffc20, 0x1ae29: 0x6c571220, 0x1ae2a: 0x6c971620, 0x1ae2b: 0x6cc48020, + 0x1ae2c: 0x6c1fc420, 0x1ae2d: 0x6cae7e20, 0x1ae2e: 0x6c816420, 0x1ae2f: 0x6d000420, + 0x1ae30: 0x6c5f1020, 0x1ae31: 0x6d3a7c20, 0x1ae32: 0x6c177020, 0x1ae33: 0x6c7d0820, + 0x1ae34: 0x6d419820, 0x1ae35: 0x6cfefe20, 0x1ae36: 0x6cd80c20, 0x1ae37: 0x6c4fdc20, + 0x1ae38: 0x6c3f7e20, 0x1ae39: 0x6c8a0020, 0x1ae3a: 0x6cbbe820, 0x1ae3b: 0x6cf68e20, + 0x1ae3c: 0x6c1f6a20, 0x1ae3d: 0x6c15d020, 0x1ae3e: 0x6c28a420, 0x1ae3f: 0x6c521e20, + // Block 0x6b9, offset 0x1ae40 + 0x1ae40: 0x6d0aa020, 0x1ae41: 0x6c35b620, 0x1ae42: 0x6d420a20, 0x1ae43: 0x6c385420, + 0x1ae44: 0x6c1acc20, 0x1ae45: 0x6c5ae220, 0x1ae46: 0x6d297220, 0x1ae47: 0x6c207420, + 0x1ae48: 0x6c245220, 0x1ae49: 0x6c289c20, 0x1ae4a: 0x6d23ba20, 0x1ae4b: 0x6cea2420, + 0x1ae4c: 0x6c134a20, 0x1ae4d: 0x6c69b620, 0x1ae4e: 0x6d126220, 0x1ae4f: 0x6cf69020, + 0x1ae50: 0x6cb7be20, 0x1ae51: 0x6c4fd020, 0x1ae52: 0x6c882e20, 0x1ae53: 0x6d05ca20, + 0x1ae54: 0x6c2aa420, 0x1ae55: 0x6c5ae820, 0x1ae56: 0x6d1a8c20, 0x1ae57: 0x6cb40c20, + 0x1ae58: 0x6c73b220, 0x1ae59: 0x6cbd9220, 0x1ae5a: 0x6d0a2e20, 0x1ae5b: 0x6ca85a20, + 0x1ae5c: 0x6c912c20, 0x1ae5d: 0x6cd80e20, 0x1ae5e: 0x6d0dd420, 0x1ae5f: 0x6d1d4820, + 0x1ae60: 0x6c265e20, 0x1ae61: 0x6d2d9420, 0x1ae62: 0x6cab2620, 0x1ae63: 0x6d394e20, + 0x1ae64: 0x6c6d4820, 0x1ae65: 0x6ca9c420, 0x1ae66: 0x6c5c2620, 0x1ae67: 0x6d01f420, + 0x1ae68: 0x6cb7ce20, 0x1ae69: 0x6c36a620, 0x1ae6a: 0x6d2a8e20, 0x1ae6b: 0x6d140e20, + 0x1ae6c: 0x6cd3d620, 0x1ae6d: 0x6c69c220, 0x1ae6e: 0x6d263020, 0x1ae6f: 0x6c003420, + 0x1ae70: 0x6d1dac20, 0x1ae71: 0x6c74b420, 0x1ae72: 0x6c7b3820, 0x1ae73: 0x6d228a20, + 0x1ae74: 0x6cae3420, 0x1ae75: 0x6c2a2820, 0x1ae76: 0x6c40c820, 0x1ae77: 0x6c528e20, + 0x1ae78: 0x6c33aa20, 0x1ae79: 0x6c290220, 0x1ae7a: 0x6d036420, 0x1ae7b: 0x6cc9cc20, + 0x1ae7c: 0x6caf8e20, 0x1ae7d: 0x6cb07220, 0x1ae7e: 0x6d1a0e20, 0x1ae7f: 0x6d41a020, + // Block 0x6ba, offset 0x1ae80 + 0x1ae80: 0x6ca92020, 0x1ae81: 0x6c2b9620, 0x1ae82: 0x6c807820, 0x1ae83: 0x6cddfa20, + 0x1ae84: 0x6c5d5e20, 0x1ae85: 0x6cc7cc20, 0x1ae86: 0x6c4fac20, 0x1ae87: 0x6cfa4820, + 0x1ae88: 0x6d135220, 0x1ae89: 0x6c343820, 0x1ae8a: 0x6cb0be20, 0x1ae8b: 0x6c1de020, + 0x1ae8c: 0x6c629020, 0x1ae8d: 0x6c6d5620, 0x1ae8e: 0x6c4fec20, 0x1ae8f: 0x6ce42820, + 0x1ae90: 0x6c16ca20, 0x1ae91: 0x6d0ac220, 0x1ae92: 0x6c99c620, 0x1ae93: 0x6c10d820, + 0x1ae94: 0x6ce43820, 0x1ae95: 0x6c91e420, 0x1ae96: 0x6c5c6420, 0x1ae97: 0x6c0f8820, + 0x1ae98: 0x6d1eba20, 0x1ae99: 0x6ca88620, 0x1ae9a: 0x6d1a9e20, 0x1ae9b: 0x6c56d620, + 0x1ae9c: 0x6c99ca20, 0x1ae9d: 0x6c52d220, 0x1ae9e: 0x6d30a820, 0x1ae9f: 0x6c846c20, + 0x1aea0: 0x6c8eb220, 0x1aea1: 0x6c4d8e20, 0x1aea2: 0x6ca45620, 0x1aea3: 0x6cff2e20, + 0x1aea4: 0x6ca08220, 0x1aea5: 0x6d0ee620, 0x1aea6: 0x6c86e820, 0x1aea7: 0x6c916820, + 0x1aea8: 0x6c8fba20, 0x1aea9: 0x6ca08c20, 0x1aeaa: 0x6c28dc20, 0x1aeab: 0x6c193a20, + 0x1aeac: 0x6cb21e20, 0x1aead: 0x6cb07c20, 0x1aeae: 0x6cfe5c20, 0x1aeaf: 0x6c5e2420, + 0x1aeb0: 0x6ca08e20, 0x1aeb1: 0x6cf91e20, 0x1aeb2: 0x6c34c220, 0x1aeb3: 0x6c7ab220, + 0x1aeb4: 0x6d0ce820, 0x1aeb5: 0x6c154e20, 0x1aeb6: 0x6d1c1820, 0x1aeb7: 0x6cc50420, + 0x1aeb8: 0x6c2d3020, 0x1aeb9: 0x6c7ede20, 0x1aeba: 0x6cded620, 0x1aebb: 0x6cff4c20, + 0x1aebc: 0x6c74fc20, 0x1aebd: 0x6c21e420, 0x1aebe: 0x6c583c20, 0x1aebf: 0x6c5e3c20, + // Block 0x6bb, offset 0x1aec0 + 0x1aec0: 0x6d3bfe20, 0x1aec1: 0x6ca8aa20, 0x1aec2: 0x6cff4e20, 0x1aec3: 0x6c10ee20, + 0x1aec4: 0x6c84a420, 0x1aec5: 0x6c161620, 0x1aec6: 0x6c14a820, 0x1aec7: 0x6c876020, + 0x1aec8: 0x6d194020, 0x1aec9: 0x6c953620, 0x1aeca: 0x6ca45e20, 0x1aecb: 0x6d28dc20, + 0x1aecc: 0x6cda6e20, 0x1aecd: 0x6cf82420, 0x1aece: 0x6d2b7e20, 0x1aecf: 0x6c654e20, + 0x1aed0: 0x6d28de20, 0x1aed1: 0x6d3a8e20, 0x1aed2: 0x6c800620, 0x1aed3: 0x6ca8c220, + 0x1aed4: 0x6ca45220, 0x1aed5: 0x6c806220, 0x1aed6: 0x6c8f6420, 0x1aed7: 0x6ceed620, + 0x1aed8: 0x6c5b1220, 0x1aed9: 0x6d199c20, 0x1aeda: 0x6cbff020, 0x1aedb: 0x6cd87420, + 0x1aedc: 0x6ca8e220, 0x1aedd: 0x6c656220, 0x1aede: 0x6c5b1420, 0x1aedf: 0x6d031420, + 0x1aee0: 0x6d199e20, 0x1aee1: 0x6ca3dc20, 0x1aee2: 0x6ce94420, 0x1aee3: 0x6ce94620, + 0x1aee4: 0x6c33d620, 0x1aee5: 0x6c777c20, 0x1aee6: 0x6d24c620, 0x1aee7: 0x6c6ef420, + 0x1aee8: 0x6cb0ec20, 0x1aee9: 0x6d277c20, 0x1aeea: 0x6c22f620, 0x1aeeb: 0x6c551c20, + 0x1aeec: 0x6c5b1820, 0x1aeed: 0x6d253a20, 0x1aeee: 0x6c354a20, 0x1aeef: 0x6c4c5620, + 0x1aef0: 0x6c7dca20, 0x1aef1: 0x6c22f820, 0x1aef2: 0x6ce6ee20, 0x1aef3: 0x6ce88420, + 0x1aef4: 0x6ceedc20, 0x1aef5: 0x6c94d820, 0x1aef6: 0x6c4c5a20, 0x1aef7: 0x6cc43020, + 0x1aef8: 0x6cc64020, 0x1aef9: 0x6c8c9e20, 0x1aefa: 0x6c47fe20, 0x1aefb: 0x6c4c5c20, + 0x1aefc: 0x6cdf0020, 0x1aefd: 0x6c4c5e20, 0x1aefe: 0x6ce88820, 0x1aeff: 0x6d202020, + // Block 0x6bc, offset 0x1af00 + 0x1af00: 0x6c4c6220, 0x1af01: 0x6d1a4220, 0x1af02: 0x6c5d2020, 0x1af03: 0x6cb48620, + 0x1af04: 0x6d223820, 0x1af05: 0x6c4dee20, 0x1af06: 0x6d255020, 0x1af07: 0x6c94ea20, + 0x1af08: 0x6cc29620, 0x1af09: 0x6d224820, 0x1af0a: 0x6cbe3e20, 0x1af0b: 0x6c4c6620, + 0x1af0c: 0x6c1ffa20, 0x1af0d: 0x6cef0820, 0x1af0e: 0x6d256020, 0x1af0f: 0x6cc29a20, + 0x1af10: 0x6c7a4020, 0x1af11: 0x6c400a20, 0x1af12: 0x6d257420, 0x1af13: 0x6d257620, + 0x1af14: 0x6d0bbc20, 0x1af15: 0x6ce8b620, 0x1af16: 0x6ce8d420, 0x1af17: 0x6ce8d620, + 0x1af18: 0x6ce95020, 0x1af19: 0x6c94b820, 0x1af1a: 0x6c5c0c20, 0x1af1b: 0x6d188220, + 0x1af1c: 0x6c589220, 0x1af1d: 0x6c944a20, 0x1af1e: 0x6c946e20, 0x1af1f: 0x6ce91020, + 0x1af20: 0x6d0b6620, 0x1af21: 0x6ce91220, 0x1af22: 0x6ce6aa20, 0x1af23: 0x6cd15220, + 0x1af24: 0x6cb48020, 0x1af25: 0x6c920c20, 0x1af26: 0x6c7b5020, 0x1af27: 0x6d0ac620, + 0x1af28: 0x6d292820, 0x1af29: 0x6ceeda20, 0x1af2a: 0x6c436620, 0x1af2b: 0x6d22be20, + 0x1af2c: 0x6cf34020, 0x1af2d: 0x6c4a3420, 0x1af2e: 0x6cb04820, 0x1af2f: 0x6d145020, + 0x1af30: 0x6c2a8a20, 0x1af31: 0x6cb89220, 0x1af32: 0x6cb89420, 0x1af33: 0x6d320e20, + 0x1af34: 0x6d3d1a20, 0x1af35: 0x6c295220, 0x1af36: 0x6cb83e20, 0x1af37: 0x6cfa6220, + 0x1af38: 0x6ccdf620, 0x1af39: 0x6c7bd820, 0x1af3a: 0x6c16e220, 0x1af3b: 0x6cb56e20, + 0x1af3c: 0x6ca7f220, 0x1af3d: 0x6ca0c220, 0x1af3e: 0x6c5e7620, 0x1af3f: 0x6c639820, + // Block 0x6bd, offset 0x1af40 + 0x1af40: 0x6d34dc20, 0x1af41: 0x6d34de20, 0x1af42: 0x6c04b420, 0x1af43: 0x6d098e20, + 0x1af44: 0x6d167a20, 0x1af45: 0x6cbdc620, 0x1af46: 0x6c99d020, 0x1af47: 0x6c755620, + 0x1af48: 0x6cc6f220, 0x1af49: 0x6cea3c20, 0x1af4a: 0x6c39e820, 0x1af4b: 0x6c07a420, + 0x1af4c: 0x6c07a620, 0x1af4d: 0x6cdf8820, 0x1af4e: 0x6c76be20, 0x1af4f: 0x6c580a20, + 0x1af50: 0x6d427620, 0x1af51: 0x6c792620, 0x1af52: 0x6c091820, 0x1af53: 0x6c6e0a20, + 0x1af54: 0x6c2c1220, 0x1af55: 0x6c6d8620, 0x1af56: 0x6c617c20, 0x1af57: 0x6c7b0c20, + 0x1af58: 0x6c2bcc20, 0x1af59: 0x6c6d8820, 0x1af5a: 0x6c646220, 0x1af5b: 0x6cdfca20, + 0x1af5c: 0x6c857e20, 0x1af5d: 0x6c03a620, 0x1af5e: 0x6cf4a420, 0x1af5f: 0x6c3b5020, + 0x1af60: 0x6d3c7a20, 0x1af61: 0x6cb2f620, 0x1af62: 0x6c04e220, 0x1af63: 0x6ce0bc20, + 0x1af64: 0x6c7d4a20, 0x1af65: 0x6cc0da20, 0x1af66: 0x6ce05220, 0x1af67: 0x6d339420, + 0x1af68: 0x6ceaea20, 0x1af69: 0x6c417020, 0x1af6a: 0x6cb27620, 0x1af6b: 0x6c2d3a20, + 0x1af6c: 0x6c48a820, 0x1af6d: 0x6ca5ba20, 0x1af6e: 0x6cdf1420, 0x1af6f: 0x6caf3020, + 0x1af70: 0x6c6ed620, 0x1af71: 0x6d100020, 0x1af72: 0x6c3d0a20, 0x1af73: 0x6c02c420, + 0x1af74: 0x6c921820, 0x1af75: 0x6cbf9c20, 0x1af76: 0x6ca22620, 0x1af77: 0x6c785420, + 0x1af78: 0x6c469220, 0x1af79: 0x6d094020, 0x1af7a: 0x6c036220, 0x1af7b: 0x6c1b0420, + 0x1af7c: 0x6c180020, 0x1af7d: 0x6c8ca020, 0x1af7e: 0x6d3aaa20, 0x1af7f: 0x6c3fb020, + // Block 0x6be, offset 0x1af80 + 0x1af80: 0x6c549a20, 0x1af81: 0x6d358420, 0x1af82: 0x6c20be20, 0x1af83: 0x6c7e3a20, + 0x1af84: 0x6c902e20, 0x1af85: 0x6c903020, 0x1af86: 0x6c913820, 0x1af87: 0x6c02c620, + 0x1af88: 0x6c272e20, 0x1af89: 0x6cad4820, 0x1af8a: 0x6c9fe220, 0x1af8b: 0x6d03ca20, + 0x1af8c: 0x6c305620, 0x1af8d: 0x6c619e20, 0x1af8e: 0x6c51ba20, 0x1af8f: 0x6c93ce20, + 0x1af90: 0x6c222820, 0x1af91: 0x6c1b8220, 0x1af92: 0x6c82ba20, 0x1af93: 0x6c40e420, + 0x1af94: 0x6d19aa20, 0x1af95: 0x6c546220, 0x1af96: 0x6c32f420, 0x1af97: 0x6d2f9c20, + 0x1af98: 0x6c3e0820, 0x1af99: 0x6c49dc20, 0x1af9a: 0x6d10d420, 0x1af9b: 0x6c347820, + 0x1af9c: 0x6c347a20, 0x1af9d: 0x6c4ad020, 0x1af9e: 0x6c13ca20, 0x1af9f: 0x6d0f8e20, + 0x1afa0: 0x6d1a3820, 0x1afa1: 0x6c37fe20, 0x1afa2: 0x6c469a20, 0x1afa3: 0x6d254420, + 0x1afa4: 0x6c2e6a20, 0x1afa5: 0x6d007620, 0x1afa6: 0x6c78fa20, 0x1afa7: 0x6cce3220, + 0x1afa8: 0x6cd43e20, 0x1afa9: 0x6c35ec20, 0x1afaa: 0x6c0e4020, 0x1afab: 0x6c2d4020, + 0x1afac: 0x6c530c20, 0x1afad: 0x6d0ad820, 0x1afae: 0x6c7ad620, 0x1afaf: 0x6c26f820, + 0x1afb0: 0x6c762020, 0x1afb1: 0x6c295a20, 0x1afb2: 0x6c764a20, 0x1afb3: 0x6c4f9e20, + 0x1afb4: 0x6ca4dc20, 0x1afb5: 0x6c017820, 0x1afb6: 0x6d036c20, 0x1afb7: 0x6cfc9c20, + 0x1afb8: 0x6d260820, 0x1afb9: 0x6c051a20, 0x1afba: 0x6c3d5a20, 0x1afbb: 0x6c03ae20, + 0x1afbc: 0x6d172020, 0x1afbd: 0x6d1b4220, 0x1afbe: 0x6c4e9220, 0x1afbf: 0x6d06a020, + // Block 0x6bf, offset 0x1afc0 + 0x1afc0: 0x6c20c420, 0x1afc1: 0x6cbd6220, 0x1afc2: 0x6c44f420, 0x1afc3: 0x6c001c20, + 0x1afc4: 0x6c081620, 0x1afc5: 0x6c39aa20, 0x1afc6: 0x6cc3a820, 0x1afc7: 0x6d1e2020, + 0x1afc8: 0x6c75a020, 0x1afc9: 0x6c633e20, 0x1afca: 0x6c2c2a20, 0x1afcb: 0x6c96fa20, + 0x1afcc: 0x6c811420, 0x1afcd: 0x6c731820, 0x1afce: 0x6c19c620, 0x1afcf: 0x6ccccc20, + 0x1afd0: 0x6c6c3c20, 0x1afd1: 0x6d303020, 0x1afd2: 0x6c8ae420, 0x1afd3: 0x6c8ae620, + 0x1afd4: 0x6c107e20, 0x1afd5: 0x6c19d820, 0x1afd6: 0x6c57d820, 0x1afd7: 0x6c108020, + 0x1afd8: 0x6cd25a20, 0x1afd9: 0x6d099420, 0x1afda: 0x6c4c1820, 0x1afdb: 0x6c6eda20, + 0x1afdc: 0x6d12a820, 0x1afdd: 0x6ca76020, 0x1afde: 0x6c2bee20, 0x1afdf: 0x6d230420, + 0x1afe0: 0x6c109220, 0x1afe1: 0x6d0ae820, 0x1afe2: 0x6cc2d420, 0x1afe3: 0x6cdc3420, + 0x1afe4: 0x6cafdc20, 0x1afe5: 0x6cbe4020, 0x1afe6: 0x6cecfe20, 0x1afe7: 0x6c723820, + 0x1afe8: 0x6c951420, 0x1afe9: 0x6d329220, 0x1afea: 0x6c796e20, 0x1afeb: 0x6c1d3820, + 0x1afec: 0x6c2fee20, 0x1afed: 0x6c275a20, 0x1afee: 0x6ce09220, 0x1afef: 0x6c018020, + 0x1aff0: 0x6c114220, 0x1aff1: 0x6c1f2e20, 0x1aff2: 0x6c081820, 0x1aff3: 0x6c76ce20, + 0x1aff4: 0x6d344c20, 0x1aff5: 0x6c348420, 0x1aff6: 0x6d175220, 0x1aff7: 0x6d344e20, + 0x1aff8: 0x6d175420, 0x1aff9: 0x6cadd020, 0x1affa: 0x6c5eb420, 0x1affb: 0x6d3cdc20, + 0x1affc: 0x6cb5b820, 0x1affd: 0x6ccaee20, 0x1affe: 0x6c723a20, 0x1afff: 0x6ca5d420, + // Block 0x6c0, offset 0x1b000 + 0x1b000: 0x6c7a3a20, 0x1b001: 0x6c78a020, 0x1b002: 0x6ce0ec20, 0x1b003: 0x6c7d5020, + 0x1b004: 0x6ca69620, 0x1b005: 0x6c648220, 0x1b006: 0x6c32fa20, 0x1b007: 0x6c6c8e20, + 0x1b008: 0x6c427620, 0x1b009: 0x6d230620, 0x1b00a: 0x6c360c20, 0x1b00b: 0x6cae9820, + 0x1b00c: 0x6c480820, 0x1b00d: 0x6ce92220, 0x1b00e: 0x6c839420, 0x1b00f: 0x6c39ea20, + 0x1b010: 0x6d0b2420, 0x1b011: 0x6cba4c20, 0x1b012: 0x6c7ddc20, 0x1b013: 0x6c01b620, + 0x1b014: 0x6cd0ca20, 0x1b015: 0x6c34e620, 0x1b016: 0x6ca4f220, 0x1b017: 0x6ce85c20, + 0x1b018: 0x6c19fa20, 0x1b019: 0x6d19da20, 0x1b01a: 0x6c5cea20, 0x1b01b: 0x6c099420, + 0x1b01c: 0x6c88f220, 0x1b01d: 0x6c4c1c20, 0x1b01e: 0x6c2e9a20, 0x1b01f: 0x6d3bc420, + 0x1b020: 0x6c547020, 0x1b021: 0x6c05fa20, 0x1b022: 0x6c05fc20, 0x1b023: 0x6d211420, + 0x1b024: 0x6c2b2e20, 0x1b025: 0x6c98e220, 0x1b026: 0x6c6a0c20, 0x1b027: 0x6cc83c20, + 0x1b028: 0x6d12ec20, 0x1b029: 0x6c452e20, 0x1b02a: 0x6c76aa20, 0x1b02b: 0x6d3f8020, + 0x1b02c: 0x6d211620, 0x1b02d: 0x6c59bc20, 0x1b02e: 0x6c362c20, 0x1b02f: 0x6d10f620, + 0x1b030: 0x6d0e6c20, 0x1b031: 0x6c064c20, 0x1b032: 0x6c223620, 0x1b033: 0x6c99f620, + 0x1b034: 0x6c16ec20, 0x1b035: 0x6c321420, 0x1b036: 0x6ceb1c20, 0x1b037: 0x6d1b5020, + 0x1b038: 0x6c3ca620, 0x1b039: 0x6d382820, 0x1b03a: 0x6c6be820, 0x1b03b: 0x6c6c4420, + 0x1b03c: 0x6c528820, 0x1b03d: 0x6c428620, 0x1b03e: 0x6c210620, 0x1b03f: 0x6c658e20, + // Block 0x6c1, offset 0x1b040 + 0x1b040: 0x6cb2ec20, 0x1b041: 0x6c836a20, 0x1b042: 0x6cfe3220, 0x1b043: 0x6c599220, + 0x1b044: 0x6c837620, 0x1b045: 0x6c32c020, 0x1b046: 0x6cec8e20, 0x1b047: 0x6d079220, + 0x1b048: 0x6c61fe20, 0x1b049: 0x6c604a20, 0x1b04a: 0x6c7b2420, 0x1b04b: 0x6d1c7c20, + 0x1b04c: 0x6cddee20, 0x1b04d: 0x6c1a1620, 0x1b04e: 0x6d1e4220, 0x1b04f: 0x6c765c20, + 0x1b050: 0x6cdac020, 0x1b051: 0x6cdac220, 0x1b052: 0x6cd26e20, 0x1b053: 0x6c9d4e20, + 0x1b054: 0x6cde0820, 0x1b055: 0x6cf24e20, 0x1b056: 0x6c1a1820, 0x1b057: 0x6ce8b820, + 0x1b058: 0x6ce0fe20, 0x1b059: 0x6cc3c820, 0x1b05a: 0x6d37f420, 0x1b05b: 0x6c862a20, + 0x1b05c: 0x6d37f620, 0x1b05d: 0x6c057620, 0x1b05e: 0x6cc9c620, 0x1b05f: 0x6d2a0620, + 0x1b060: 0x6c330020, 0x1b061: 0x6ce4a820, 0x1b062: 0x6cf4f820, 0x1b063: 0x6d335020, + 0x1b064: 0x6d099c20, 0x1b065: 0x6c440420, 0x1b066: 0x6d324020, 0x1b067: 0x6c00a420, + 0x1b068: 0x6c459020, 0x1b069: 0x6d0ca620, 0x1b06a: 0x6c76da20, 0x1b06b: 0x6ce4aa20, + 0x1b06c: 0x6d257820, 0x1b06d: 0x6cf14e20, 0x1b06e: 0x6d01be20, 0x1b06f: 0x6c8f3220, + 0x1b070: 0x6c4d8c20, 0x1b071: 0x6c810220, 0x1b072: 0x6c16b620, 0x1b073: 0x6caea820, + 0x1b074: 0x6c084820, 0x1b075: 0x6c18da20, 0x1b076: 0x6c927820, 0x1b077: 0x6c91c620, + 0x1b078: 0x6cab3c20, 0x1b079: 0x6cba6220, 0x1b07a: 0x6c9a1620, 0x1b07b: 0x6ca12620, + 0x1b07c: 0x6d3b8220, 0x1b07d: 0x6cd6d420, 0x1b07e: 0x6cd52e20, 0x1b07f: 0x6c90e820, + // Block 0x6c2, offset 0x1b080 + 0x1b080: 0x6c1b4620, 0x1b081: 0x6c97e220, 0x1b082: 0x6c0c0620, 0x1b083: 0x6c6e9420, + 0x1b084: 0x6c130020, 0x1b085: 0x6cd5ee20, 0x1b086: 0x6d367a20, 0x1b087: 0x6d2ec020, + 0x1b088: 0x6c770a20, 0x1b089: 0x6d1d9620, 0x1b08a: 0x6c2d6e20, 0x1b08b: 0x6c190820, + 0x1b08c: 0x6d347c20, 0x1b08d: 0x6cf8ac20, 0x1b08e: 0x6c4c2420, 0x1b08f: 0x6cbb4620, + 0x1b090: 0x6c6d2220, 0x1b091: 0x6c2c7a20, 0x1b092: 0x6cce0a20, 0x1b093: 0x6ca29020, + 0x1b094: 0x6c24d220, 0x1b095: 0x6d0e9220, 0x1b096: 0x6cde1020, 0x1b097: 0x6d2b8220, + 0x1b098: 0x6cb9ac20, 0x1b099: 0x6cbb1020, 0x1b09a: 0x6c895e20, 0x1b09b: 0x6cf14220, + 0x1b09c: 0x6d3c9a20, 0x1b09d: 0x6cbb9820, 0x1b09e: 0x6d2b8620, 0x1b09f: 0x6d05ba20, + 0x1b0a0: 0x6ccd9a20, 0x1b0a1: 0x6ccd9c20, 0x1b0a2: 0x6c038e20, 0x1b0a3: 0x6cb44820, + 0x1b0a4: 0x6c7b3220, 0x1b0a5: 0x6c303220, 0x1b0a6: 0x6c38b020, 0x1b0a7: 0x6cc3e820, + 0x1b0a8: 0x6ca16020, 0x1b0a9: 0x6c33a020, 0x1b0aa: 0x6c33a220, 0x1b0ab: 0x6d41ea20, + 0x1b0ac: 0x6c2c7c20, 0x1b0ad: 0x6cd17220, 0x1b0ae: 0x6c350820, 0x1b0af: 0x6c350e20, + 0x1b0b0: 0x6cdffc20, 0x1b0b1: 0x6c2ae020, 0x1b0b2: 0x6ca21820, 0x1b0b3: 0x6c3b8420, + 0x1b0b4: 0x6c59d820, 0x1b0b5: 0x6cdffe20, 0x1b0b6: 0x6c26fe20, 0x1b0b7: 0x6d12fa20, + 0x1b0b8: 0x6d3b5220, 0x1b0b9: 0x6c673a20, 0x1b0ba: 0x6c02e420, 0x1b0bb: 0x6cbb1e20, + 0x1b0bc: 0x6c5f2c20, 0x1b0bd: 0x6cbba220, 0x1b0be: 0x6c790a20, 0x1b0bf: 0x6d188420, + // Block 0x6c3, offset 0x1b0c0 + 0x1b0c0: 0x6cb01a20, 0x1b0c1: 0x6c0a4420, 0x1b0c2: 0x6c2d7c20, 0x1b0c3: 0x6c677820, + 0x1b0c4: 0x6d12b420, 0x1b0c5: 0x6d1dae20, 0x1b0c6: 0x6d091620, 0x1b0c7: 0x6ce00c20, + 0x1b0c8: 0x6c803820, 0x1b0c9: 0x6c728820, 0x1b0ca: 0x6c581420, 0x1b0cb: 0x6c298e20, + 0x1b0cc: 0x6cc50220, 0x1b0cd: 0x6cba8020, 0x1b0ce: 0x6d09ae20, 0x1b0cf: 0x6cfd1820, + 0x1b0d0: 0x6cf81620, 0x1b0d1: 0x6c51ee20, 0x1b0d2: 0x6c00c620, 0x1b0d3: 0x6d0b0020, + 0x1b0d4: 0x6c29ee20, 0x1b0d5: 0x6c4fee20, 0x1b0d6: 0x6cc84a20, 0x1b0d7: 0x6c6d8220, + 0x1b0d8: 0x6c82e220, 0x1b0d9: 0x6c7c0620, 0x1b0da: 0x6c916a20, 0x1b0db: 0x6d0cea20, + 0x1b0dc: 0x6ce03020, 0x1b0dd: 0x6cf03820, 0x1b0de: 0x6c581820, 0x1b0df: 0x6c903e20, + 0x1b0e0: 0x6c904020, 0x1b0e1: 0x6cc8ec20, 0x1b0e2: 0x6c86ea20, 0x1b0e3: 0x6c8bfe20, + 0x1b0e4: 0x6cc50620, 0x1b0e5: 0x6c165c20, 0x1b0e6: 0x6d09c420, 0x1b0e7: 0x6d0d0c20, + 0x1b0e8: 0x6c829620, 0x1b0e9: 0x6c03da20, 0x1b0ea: 0x6ceca620, 0x1b0eb: 0x6cd2e220, + 0x1b0ec: 0x6cc56020, 0x1b0ed: 0x6cca6220, 0x1b0ee: 0x6d3c2c20, 0x1b0ef: 0x6d3c2e20, + 0x1b0f0: 0x6cd0dc20, 0x1b0f1: 0x6d13c620, 0x1b0f2: 0x6c972420, 0x1b0f3: 0x6c784a20, + 0x1b0f4: 0x6d3aba20, 0x1b0f5: 0x6d3c3620, 0x1b0f6: 0x6c553020, 0x1b0f7: 0x6c554020, + 0x1b0f8: 0x6c7da620, 0x1b0f9: 0x6d13ee20, 0x1b0fa: 0x6c555420, 0x1b0fb: 0x6d06d020, + 0x1b0fc: 0x6c7db220, 0x1b0fd: 0x6cd46e20, 0x1b0fe: 0x6c989420, 0x1b0ff: 0x6d41ec20, + // Block 0x6c4, offset 0x1b100 + 0x1b100: 0x6cd47020, 0x1b101: 0x6d141220, 0x1b102: 0x6d34ca20, 0x1b103: 0x6c474e20, + 0x1b104: 0x6c1f0220, 0x1b105: 0x6c67d220, 0x1b106: 0x6c3c9c20, 0x1b107: 0x6c06e020, + 0x1b108: 0x6d2d5820, 0x1b109: 0x6c0b8420, 0x1b10a: 0x6cdba620, 0x1b10b: 0x6cc42e20, + 0x1b10c: 0x6c8ca220, 0x1b10d: 0x6c3fc020, 0x1b10e: 0x6c261420, 0x1b10f: 0x6cfa3220, + 0x1b110: 0x6d049a20, 0x1b111: 0x6d02a020, 0x1b112: 0x6ca4cc20, 0x1b113: 0x6cfa5a20, + 0x1b114: 0x6c7cb420, 0x1b115: 0x6cf55a20, 0x1b116: 0x6cec6820, 0x1b117: 0x6d25f820, + 0x1b118: 0x6c992020, 0x1b119: 0x6cda7c20, 0x1b11a: 0x6c341620, 0x1b11b: 0x6c341820, + 0x1b11c: 0x6d12ca20, 0x1b11d: 0x6cbe6c20, 0x1b11e: 0x6cec6e20, 0x1b11f: 0x6c46a220, + 0x1b120: 0x6c46a420, 0x1b121: 0x6cb78820, 0x1b122: 0x6c9c0420, 0x1b123: 0x6c9c0820, + 0x1b124: 0x6d1a8020, 0x1b125: 0x6c5d9420, 0x1b126: 0x6c190c20, 0x1b127: 0x6c26e420, + 0x1b128: 0x6d2b3020, 0x1b129: 0x6ce45420, 0x1b12a: 0x6cdf5a20, 0x1b12b: 0x6c40a620, + 0x1b12c: 0x6c48e220, 0x1b12d: 0x6d108020, 0x1b12e: 0x6d0f4020, 0x1b12f: 0x6c4f4620, + 0x1b130: 0x6c42fa20, 0x1b131: 0x6cd18e20, 0x1b132: 0x6ce1aa20, 0x1b133: 0x6cdf5c20, + 0x1b134: 0x6ce7e420, 0x1b135: 0x6d0d3420, 0x1b136: 0x6c08b020, 0x1b137: 0x6d145220, + 0x1b138: 0x6c7ab820, 0x1b139: 0x6c631c20, 0x1b13a: 0x6c343a20, 0x1b13b: 0x6c577c20, + 0x1b13c: 0x6c7bce20, 0x1b13d: 0x6d27d620, 0x1b13e: 0x6c632020, 0x1b13f: 0x6c031820, + // Block 0x6c5, offset 0x1b140 + 0x1b140: 0x6c370e20, 0x1b141: 0x6c87ec20, 0x1b142: 0x6c58ee20, 0x1b143: 0x6c2b1220, + 0x1b144: 0x6d0d4620, 0x1b145: 0x6cad7e20, 0x1b146: 0x6c733c20, 0x1b147: 0x6cb57c20, + 0x1b148: 0x6ca3ac20, 0x1b149: 0x6c3cd820, 0x1b14a: 0x6d007820, 0x1b14b: 0x6c3bcc20, + 0x1b14c: 0x6c2d0820, 0x1b14d: 0x6d107820, 0x1b14e: 0x6c7c5e20, 0x1b14f: 0x6d408620, + 0x1b150: 0x6c58f820, 0x1b151: 0x6cb75220, 0x1b152: 0x6c762620, 0x1b153: 0x6d2bc820, + 0x1b154: 0x6c077c20, 0x1b155: 0x6d16e020, 0x1b156: 0x6c679e20, 0x1b157: 0x6ce26220, + 0x1b158: 0x6d29fe20, 0x1b159: 0x6c079820, 0x1b15a: 0x6cf5b420, 0x1b15b: 0x6c5a5020, + 0x1b15c: 0x6c3a5020, 0x1b15d: 0x6c2dc020, 0x1b15e: 0x6d0a8620, 0x1b15f: 0x6c07e020, + 0x1b160: 0x6c2d5620, 0x1b161: 0x6c02d020, 0x1b162: 0x6cceea20, 0x1b163: 0x6cf24c20, + 0x1b164: 0x6c4d0220, 0x1b165: 0x6c02d220, 0x1b166: 0x6cf4fa20, 0x1b167: 0x6c02d420, + 0x1b168: 0x6c67ac20, 0x1b169: 0x6c881c20, 0x1b16a: 0x6c345a20, 0x1b16b: 0x6d275e20, + 0x1b16c: 0x6c67ae20, 0x1b16d: 0x6cd3c420, 0x1b16e: 0x6c3be620, 0x1b16f: 0x6c5df620, + 0x1b170: 0x6c0a8620, 0x1b171: 0x6c944c20, 0x1b172: 0x6c34c620, 0x1b173: 0x6caa6e20, + 0x1b174: 0x6caa3a20, 0x1b175: 0x6c2f6820, 0x1b176: 0x6ca38e20, 0x1b177: 0x6cb89620, + 0x1b178: 0x6c645c20, 0x1b179: 0x6cddde20, 0x1b17a: 0x6c6fa220, 0x1b17b: 0x6caa8e20, + 0x1b17c: 0x6c142820, 0x1b17d: 0x6c500620, 0x1b17e: 0x6cfa7020, 0x1b17f: 0x6c391a20, + // Block 0x6c6, offset 0x1b180 + 0x1b180: 0x6c611a20, 0x1b181: 0x6cd76e20, 0x1b182: 0x6cc78a20, 0x1b183: 0x6c39f020, + 0x1b184: 0x6cee4420, 0x1b185: 0x6c52ec20, 0x1b186: 0x6d3c0620, 0x1b187: 0x6c3fa620, + 0x1b188: 0x6c965c20, 0x1b189: 0x6c27b420, 0x1b18a: 0x6cc5be20, 0x1b18b: 0x6c3d3a20, + 0x1b18c: 0x6c6e4820, 0x1b18d: 0x6d0c5620, 0x1b18e: 0x6c4d5420, 0x1b18f: 0x6cf1fc20, + 0x1b190: 0x6d378e20, 0x1b191: 0x6cabb020, 0x1b192: 0x6c323220, 0x1b193: 0x6c617e20, + 0x1b194: 0x6c792820, 0x1b195: 0x6d381220, 0x1b196: 0x6d108a20, 0x1b197: 0x6c6cd420, + 0x1b198: 0x6d277e20, 0x1b199: 0x6c9eaa20, 0x1b19a: 0x6c3d1e20, 0x1b19b: 0x6c1ca420, + 0x1b19c: 0x6d267a20, 0x1b19d: 0x6d3c0a20, 0x1b19e: 0x6ca96220, 0x1b19f: 0x6d0e3a20, + 0x1b1a0: 0x6ca30620, 0x1b1a1: 0x6d02a820, 0x1b1a2: 0x6c3b5220, 0x1b1a3: 0x6c08ba20, + 0x1b1a4: 0x6d20ae20, 0x1b1a5: 0x6ceb6e20, 0x1b1a6: 0x6c3c1820, 0x1b1a7: 0x6ced7220, + 0x1b1a8: 0x6c39a220, 0x1b1a9: 0x6cf41e20, 0x1b1aa: 0x6d22cc20, 0x1b1ab: 0x6c4a3620, + 0x1b1ac: 0x6c323a20, 0x1b1ad: 0x6c036420, 0x1b1ae: 0x6ca5b420, 0x1b1af: 0x6d38cc20, + 0x1b1b0: 0x6d3d2c20, 0x1b1b1: 0x6d2f5620, 0x1b1b2: 0x6c267c20, 0x1b1b3: 0x6ca39820, + 0x1b1b4: 0x6d25fe20, 0x1b1b5: 0x6ce80820, 0x1b1b6: 0x6cfb2a20, 0x1b1b7: 0x6d343c20, + 0x1b1b8: 0x6c353020, 0x1b1b9: 0x6c9a7420, 0x1b1ba: 0x6ca0c620, 0x1b1bb: 0x6cb4d020, + 0x1b1bc: 0x6c092a20, 0x1b1bd: 0x6ccfaa20, 0x1b1be: 0x6cbc9420, 0x1b1bf: 0x6c353220, + // Block 0x6c7, offset 0x1b1c0 + 0x1b1c0: 0x6c50c420, 0x1b1c1: 0x6d062c20, 0x1b1c2: 0x6c37f820, 0x1b1c3: 0x6d328420, + 0x1b1c4: 0x6c9f2820, 0x1b1c5: 0x6c04e620, 0x1b1c6: 0x6ca22820, 0x1b1c7: 0x6c3d3e20, + 0x1b1c8: 0x6c8ca420, 0x1b1c9: 0x6d3ee220, 0x1b1ca: 0x6d3ee420, 0x1b1cb: 0x6cd2b420, + 0x1b1cc: 0x6cc4ac20, 0x1b1cd: 0x6cccc020, 0x1b1ce: 0x6d0f4620, 0x1b1cf: 0x6c975c20, + 0x1b1d0: 0x6c6c1620, 0x1b1d1: 0x6c46ee20, 0x1b1d2: 0x6cd88020, 0x1b1d3: 0x6d041420, + 0x1b1d4: 0x6cef8e20, 0x1b1d5: 0x6d3e0c20, 0x1b1d6: 0x6c71f620, 0x1b1d7: 0x6cccc220, + 0x1b1d8: 0x6cb1e820, 0x1b1d9: 0x6cc5d420, 0x1b1da: 0x6d10d620, 0x1b1db: 0x6c305820, + 0x1b1dc: 0x6c674c20, 0x1b1dd: 0x6cd4b020, 0x1b1de: 0x6c5ff020, 0x1b1df: 0x6c40e620, + 0x1b1e0: 0x6cfe1c20, 0x1b1e1: 0x6c572a20, 0x1b1e2: 0x6c72da20, 0x1b1e3: 0x6c682c20, + 0x1b1e4: 0x6c469c20, 0x1b1e5: 0x6c81a220, 0x1b1e6: 0x6c647420, 0x1b1e7: 0x6c647620, + 0x1b1e8: 0x6d148c20, 0x1b1e9: 0x6ca75c20, 0x1b1ea: 0x6d344220, 0x1b1eb: 0x6c5e9820, + 0x1b1ec: 0x6c5ea220, 0x1b1ed: 0x6cfc8a20, 0x1b1ee: 0x6c525620, 0x1b1ef: 0x6c49de20, + 0x1b1f0: 0x6c756020, 0x1b1f1: 0x6c7ac020, 0x1b1f2: 0x6d0e4420, 0x1b1f3: 0x6ca02c20, + 0x1b1f4: 0x6c8ad020, 0x1b1f5: 0x6cae0a20, 0x1b1f6: 0x6c35ee20, 0x1b1f7: 0x6d202220, + 0x1b1f8: 0x6d0c6e20, 0x1b1f9: 0x6c143420, 0x1b1fa: 0x6ccfb820, 0x1b1fb: 0x6d19ae20, + 0x1b1fc: 0x6cd24e20, 0x1b1fd: 0x6c4ad220, 0x1b1fe: 0x6cc2be20, 0x1b1ff: 0x6d3e0e20, + // Block 0x6c8, offset 0x1b200 + 0x1b200: 0x6cd90820, 0x1b201: 0x6cee6820, 0x1b202: 0x6c530e20, 0x1b203: 0x6cec0420, + 0x1b204: 0x6c907e20, 0x1b205: 0x6d0b8420, 0x1b206: 0x6cc52020, 0x1b207: 0x6c682e20, + 0x1b208: 0x6c942e20, 0x1b209: 0x6cb24e20, 0x1b20a: 0x6cfc9e20, 0x1b20b: 0x6cced020, + 0x1b20c: 0x6c850820, 0x1b20d: 0x6c19c820, 0x1b20e: 0x6d017a20, 0x1b20f: 0x6c984a20, + 0x1b210: 0x6c3d5c20, 0x1b211: 0x6cdd1020, 0x1b212: 0x6c99e420, 0x1b213: 0x6cef9c20, + 0x1b214: 0x6c789420, 0x1b215: 0x6c21ae20, 0x1b216: 0x6c21b020, 0x1b217: 0x6ce6b820, + 0x1b218: 0x6ca78820, 0x1b219: 0x6d03da20, 0x1b21a: 0x6ca3ee20, 0x1b21b: 0x6d20ec20, + 0x1b21c: 0x6ca31a20, 0x1b21d: 0x6cb3c820, 0x1b21e: 0x6ca56820, 0x1b21f: 0x6c72e220, + 0x1b220: 0x6ccfc620, 0x1b221: 0x6d35ae20, 0x1b222: 0x6c4df020, 0x1b223: 0x6c2c2c20, + 0x1b224: 0x6d3c1020, 0x1b225: 0x6c355220, 0x1b226: 0x6cb20820, 0x1b227: 0x6ce9f820, + 0x1b228: 0x6cfca020, 0x1b229: 0x6c9e1020, 0x1b22a: 0x6cf3ae20, 0x1b22b: 0x6d0c7020, + 0x1b22c: 0x6cf44220, 0x1b22d: 0x6c001e20, 0x1b22e: 0x6d0c7c20, 0x1b22f: 0x6d20ee20, + 0x1b230: 0x6cd89a20, 0x1b231: 0x6d20f020, 0x1b232: 0x6cebd020, 0x1b233: 0x6c87de20, + 0x1b234: 0x6cfb3a20, 0x1b235: 0x6c707c20, 0x1b236: 0x6cc24220, 0x1b237: 0x6d3c8020, + 0x1b238: 0x6cb4e220, 0x1b239: 0x6cfb4020, 0x1b23a: 0x6d3d4820, 0x1b23b: 0x6c2ff020, + 0x1b23c: 0x6c166420, 0x1b23d: 0x6c923420, 0x1b23e: 0x6c006420, 0x1b23f: 0x6c353620, + // Block 0x6c9, offset 0x1b240 + 0x1b240: 0x6c353820, 0x1b241: 0x6c908620, 0x1b242: 0x6c9dbe20, 0x1b243: 0x6c239020, + 0x1b244: 0x6cb3f020, 0x1b245: 0x6c710e20, 0x1b246: 0x6cb32820, 0x1b247: 0x6c10f620, + 0x1b248: 0x6c8cde20, 0x1b249: 0x6ced0020, 0x1b24a: 0x6c0c7220, 0x1b24b: 0x6cfeb020, + 0x1b24c: 0x6cd52620, 0x1b24d: 0x6cb6f020, 0x1b24e: 0x6c5ab020, 0x1b24f: 0x6c394020, + 0x1b250: 0x6cf2b220, 0x1b251: 0x6cc89820, 0x1b252: 0x6cdfda20, 0x1b253: 0x6c39f820, + 0x1b254: 0x6c3b0420, 0x1b255: 0x6c6aae20, 0x1b256: 0x6ce46020, 0x1b257: 0x6ca5d620, + 0x1b258: 0x6cc2d820, 0x1b259: 0x6c6e5820, 0x1b25a: 0x6c5cbc20, 0x1b25b: 0x6c6da420, + 0x1b25c: 0x6cb8d220, 0x1b25d: 0x6c2d4c20, 0x1b25e: 0x6d042620, 0x1b25f: 0x6c568a20, + 0x1b260: 0x6cec8820, 0x1b261: 0x6c7ef220, 0x1b262: 0x6c097420, 0x1b263: 0x6d19dc20, + 0x1b264: 0x6c1d6820, 0x1b265: 0x6ca52e20, 0x1b266: 0x6c3fe420, 0x1b267: 0x6c6e6e20, + 0x1b268: 0x6c94ec20, 0x1b269: 0x6c01b820, 0x1b26a: 0x6c7f9420, 0x1b26b: 0x6c7d5220, + 0x1b26c: 0x6d1a5220, 0x1b26d: 0x6d0b9220, 0x1b26e: 0x6c707e20, 0x1b26f: 0x6c85e820, + 0x1b270: 0x6c2d1220, 0x1b271: 0x6cfb4220, 0x1b272: 0x6c57da20, 0x1b273: 0x6c579220, + 0x1b274: 0x6d1bac20, 0x1b275: 0x6c14ee20, 0x1b276: 0x6cd05a20, 0x1b277: 0x6ce66e20, + 0x1b278: 0x6c296420, 0x1b279: 0x6d11ac20, 0x1b27a: 0x6cf4e620, 0x1b27b: 0x6ca44820, + 0x1b27c: 0x6c21b220, 0x1b27d: 0x6c641420, 0x1b27e: 0x6ce7d820, 0x1b27f: 0x6d06d220, + // Block 0x6ca, offset 0x1b280 + 0x1b280: 0x6d233020, 0x1b281: 0x6cef0a20, 0x1b282: 0x6c2c5420, 0x1b283: 0x6cc74820, + 0x1b284: 0x6c9a5620, 0x1b285: 0x6c27de20, 0x1b286: 0x6cc86220, 0x1b287: 0x6cbd2c20, + 0x1b288: 0x6c5ab220, 0x1b289: 0x6cf2ea20, 0x1b28a: 0x6cb99420, 0x1b28b: 0x6c210820, + 0x1b28c: 0x6c9e7420, 0x1b28d: 0x6c3fec20, 0x1b28e: 0x6c6b9620, 0x1b28f: 0x6c329820, + 0x1b290: 0x6d151420, 0x1b291: 0x6d382a20, 0x1b292: 0x6c99f820, 0x1b293: 0x6c59be20, + 0x1b294: 0x6c9dc220, 0x1b295: 0x6c013020, 0x1b296: 0x6d1bae20, 0x1b297: 0x6d079420, + 0x1b298: 0x6c6a0e20, 0x1b299: 0x6cee8220, 0x1b29a: 0x6c9a8e20, 0x1b29b: 0x6d261620, + 0x1b29c: 0x6d32c220, 0x1b29d: 0x6cbfae20, 0x1b29e: 0x6cd37a20, 0x1b29f: 0x6d01a820, + 0x1b2a0: 0x6ceb7c20, 0x1b2a1: 0x6c88f620, 0x1b2a2: 0x6c997820, 0x1b2a3: 0x6cc4c420, + 0x1b2a4: 0x6cd7e620, 0x1b2a5: 0x6cb0f220, 0x1b2a6: 0x6cf08e20, 0x1b2a7: 0x6cebd820, + 0x1b2a8: 0x6c6ff420, 0x1b2a9: 0x6c555620, 0x1b2aa: 0x6c02a620, 0x1b2ab: 0x6cbd1420, + 0x1b2ac: 0x6c05fe20, 0x1b2ad: 0x6d059220, 0x1b2ae: 0x6ce7da20, 0x1b2af: 0x6c4a6420, + 0x1b2b0: 0x6c1e8a20, 0x1b2b1: 0x6d110620, 0x1b2b2: 0x6cb09e20, 0x1b2b3: 0x6cf78420, + 0x1b2b4: 0x6d257a20, 0x1b2b5: 0x6d1d4020, 0x1b2b6: 0x6cc67020, 0x1b2b7: 0x6cc81a20, + 0x1b2b8: 0x6c1ab620, 0x1b2b9: 0x6c8e6620, 0x1b2ba: 0x6c9a5e20, 0x1b2bb: 0x6cac5c20, + 0x1b2bc: 0x6c02a820, 0x1b2bd: 0x6c966020, 0x1b2be: 0x6c46ae20, 0x1b2bf: 0x6c7cf620, + // Block 0x6cb, offset 0x1b2c0 + 0x1b2c0: 0x6cbd8020, 0x1b2c1: 0x6c644820, 0x1b2c2: 0x6ccae420, 0x1b2c3: 0x6d315e20, + 0x1b2c4: 0x6d257c20, 0x1b2c5: 0x6c6a1020, 0x1b2c6: 0x6cc68020, 0x1b2c7: 0x6ca00420, + 0x1b2c8: 0x6d1bc220, 0x1b2c9: 0x6c604c20, 0x1b2ca: 0x6cdac820, 0x1b2cb: 0x6ca79c20, + 0x1b2cc: 0x6cfb6c20, 0x1b2cd: 0x6ce1ce20, 0x1b2ce: 0x6cad0020, 0x1b2cf: 0x6c80b220, + 0x1b2d0: 0x6ca4fc20, 0x1b2d1: 0x6c05ca20, 0x1b2d2: 0x6c00a620, 0x1b2d3: 0x6cb0a020, + 0x1b2d4: 0x6cb20e20, 0x1b2d5: 0x6d182020, 0x1b2d6: 0x6cb17e20, 0x1b2d7: 0x6d238a20, + 0x1b2d8: 0x6c824220, 0x1b2d9: 0x6d081820, 0x1b2da: 0x6c975820, 0x1b2db: 0x6d140020, + 0x1b2dc: 0x6d2ec220, 0x1b2dd: 0x6c773820, 0x1b2de: 0x6d1d9820, 0x1b2df: 0x6ca6a820, + 0x1b2e0: 0x6c840e20, 0x1b2e1: 0x6c2b7a20, 0x1b2e2: 0x6c4a7820, 0x1b2e3: 0x6d0c1a20, + 0x1b2e4: 0x6c6c9c20, 0x1b2e5: 0x6d3b8420, 0x1b2e6: 0x6c16b820, 0x1b2e7: 0x6d2ada20, + 0x1b2e8: 0x6c4dac20, 0x1b2e9: 0x6ca59c20, 0x1b2ea: 0x6c81d820, 0x1b2eb: 0x6ca05c20, + 0x1b2ec: 0x6d300220, 0x1b2ed: 0x6c56ae20, 0x1b2ee: 0x6c56b020, 0x1b2ef: 0x6c02d620, + 0x1b2f0: 0x6ca59e20, 0x1b2f1: 0x6cbb1220, 0x1b2f2: 0x6c96f620, 0x1b2f3: 0x6cb1e420, + 0x1b2f4: 0x6c472a20, 0x1b2f5: 0x6cf46020, 0x1b2f6: 0x6cbbea20, 0x1b2f7: 0x6ceb8820, + 0x1b2f8: 0x6d2e1020, 0x1b2f9: 0x6c98f020, 0x1b2fa: 0x6cfb7820, 0x1b2fb: 0x6cfb7a20, + 0x1b2fc: 0x6ca14a20, 0x1b2fd: 0x6c8a0420, 0x1b2fe: 0x6c883020, 0x1b2ff: 0x6c57b820, + // Block 0x6cc, offset 0x1b300 + 0x1b300: 0x6c4a8420, 0x1b301: 0x6c2aa620, 0x1b302: 0x6d348c20, 0x1b303: 0x6d05ce20, + 0x1b304: 0x6d140a20, 0x1b305: 0x6c579c20, 0x1b306: 0x6cf69220, 0x1b307: 0x6c7d0a20, + 0x1b308: 0x6cc52820, 0x1b309: 0x6cf69420, 0x1b30a: 0x6d0ea020, 0x1b30b: 0x6c151820, + 0x1b30c: 0x6c686420, 0x1b30d: 0x6c9a6620, 0x1b30e: 0x6c396820, 0x1b30f: 0x6c385620, + 0x1b310: 0x6cfad420, 0x1b311: 0x6d188620, 0x1b312: 0x6c5c2a20, 0x1b313: 0x6c69c420, + 0x1b314: 0x6c405220, 0x1b315: 0x6cd3d820, 0x1b316: 0x6c0a4620, 0x1b317: 0x6ccda420, + 0x1b318: 0x6cdc5a20, 0x1b319: 0x6cbb2020, 0x1b31a: 0x6c88c820, 0x1b31b: 0x6c589420, + 0x1b31c: 0x6d02ec20, 0x1b31d: 0x6ca7aa20, 0x1b31e: 0x6c303420, 0x1b31f: 0x6d188820, + 0x1b320: 0x6c117020, 0x1b321: 0x6c00c820, 0x1b322: 0x6ca77820, 0x1b323: 0x6ca92220, + 0x1b324: 0x6c966420, 0x1b325: 0x6ce5ce20, 0x1b326: 0x6c1de220, 0x1b327: 0x6c6d5820, + 0x1b328: 0x6c226820, 0x1b329: 0x6d219e20, 0x1b32a: 0x6cb21620, 0x1b32b: 0x6cc6be20, + 0x1b32c: 0x6cc7ce20, 0x1b32d: 0x6ca3a820, 0x1b32e: 0x6d0c3220, 0x1b32f: 0x6cdf4620, + 0x1b330: 0x6d1bfc20, 0x1b331: 0x6c11b620, 0x1b332: 0x6ca7b220, 0x1b333: 0x6d26ea20, + 0x1b334: 0x6d1c9620, 0x1b335: 0x6c9dd620, 0x1b336: 0x6c0ae620, 0x1b337: 0x6c966620, + 0x1b338: 0x6cd08020, 0x1b339: 0x6d043e20, 0x1b33a: 0x6ca6d420, 0x1b33b: 0x6c31c820, + 0x1b33c: 0x6c8f2020, 0x1b33d: 0x6d251c20, 0x1b33e: 0x6c804820, 0x1b33f: 0x6d0ee820, + // Block 0x6cd, offset 0x1b340 + 0x1b340: 0x6cd6a820, 0x1b341: 0x6c8d8c20, 0x1b342: 0x6c696620, 0x1b343: 0x6ca77a20, + 0x1b344: 0x6c804c20, 0x1b345: 0x6cb94420, 0x1b346: 0x6d1c1a20, 0x1b347: 0x6cd6ae20, + 0x1b348: 0x6c5c9020, 0x1b349: 0x6cc32620, 0x1b34a: 0x6c9d0a20, 0x1b34b: 0x6c84b820, + 0x1b34c: 0x6c944e20, 0x1b34d: 0x6d0d0e20, 0x1b34e: 0x6d3a4020, 0x1b34f: 0x6c805820, + 0x1b350: 0x6d3f6820, 0x1b351: 0x6c6a5220, 0x1b352: 0x6c73c420, 0x1b353: 0x6c73c620, + 0x1b354: 0x6c799220, 0x1b355: 0x6d281220, 0x1b356: 0x6c965e20, 0x1b357: 0x6d3f2820, + 0x1b358: 0x6c25a020, 0x1b359: 0x6cdcca20, 0x1b35a: 0x6c3dd620, 0x1b35b: 0x6c06d620, + 0x1b35c: 0x6d3e0020, 0x1b35d: 0x6cffcc20, 0x1b35e: 0x6d031a20, 0x1b35f: 0x6c9bfe20, + 0x1b360: 0x6cd88c20, 0x1b361: 0x6cdf0220, 0x1b362: 0x6c05a420, 0x1b363: 0x6c619220, + 0x1b364: 0x6c46f020, 0x1b365: 0x6caa3c20, 0x1b366: 0x6d08f820, 0x1b367: 0x6d206a20, + 0x1b368: 0x6d3ba220, 0x1b369: 0x6c4d1e20, 0x1b36a: 0x6c943020, 0x1b36b: 0x6cdcd020, + 0x1b36c: 0x6ca48e20, 0x1b36d: 0x6c9ec420, 0x1b36e: 0x6c239220, 0x1b36f: 0x6cb8d420, + 0x1b370: 0x6cd52820, 0x1b371: 0x6c11f620, 0x1b372: 0x6d0aea20, 0x1b373: 0x6d3e3420, + 0x1b374: 0x6ca63e20, 0x1b375: 0x6c3d8820, 0x1b376: 0x6d3e4e20, 0x1b377: 0x6c841020, + 0x1b378: 0x6d091820, 0x1b379: 0x6c0ff620, 0x1b37a: 0x6cc7d020, 0x1b37b: 0x6ca38820, + 0x1b37c: 0x6ca89020, 0x1b37d: 0x6ca89220, 0x1b37e: 0x6d1c1c20, 0x1b37f: 0x6c945020, + // Block 0x6ce, offset 0x1b380 + 0x1b380: 0x6c9db620, 0x1b381: 0x6ca8f220, 0x1b382: 0x6cc6ee20, 0x1b383: 0x6cdddc20, + 0x1b384: 0x6c4ab820, 0x1b385: 0x6d2d1820, 0x1b386: 0x6cbef820, 0x1b387: 0x6d221620, + 0x1b388: 0x6cd43a20, 0x1b389: 0x6c011220, 0x1b38a: 0x6ce83820, 0x1b38b: 0x6cd97e20, + 0x1b38c: 0x6cecc020, 0x1b38d: 0x6cc78420, 0x1b38e: 0x6d118220, 0x1b38f: 0x6c52f220, + 0x1b390: 0x6d145e20, 0x1b391: 0x6c6e0c20, 0x1b392: 0x6d3cc820, 0x1b393: 0x6c9d2220, + 0x1b394: 0x6d3a5820, 0x1b395: 0x6c295620, 0x1b396: 0x6c530020, 0x1b397: 0x6d3f7020, + 0x1b398: 0x6c490420, 0x1b399: 0x6d38fe20, 0x1b39a: 0x6c2f9620, 0x1b39b: 0x6cecee20, + 0x1b39c: 0x6d198e20, 0x1b39d: 0x6c05e220, 0x1b39e: 0x6cd24220, 0x1b39f: 0x6cd24420, + 0x1b3a0: 0x6c1d3620, 0x1b3a1: 0x6cd04620, 0x1b3a2: 0x6c788c20, 0x1b3a3: 0x6d078220, + 0x1b3a4: 0x6cd32c20, 0x1b3a5: 0x6d202420, 0x1b3a6: 0x6c58fa20, 0x1b3a7: 0x6d14b820, + 0x1b3a8: 0x6ce5b820, 0x1b3a9: 0x6cd2be20, 0x1b3aa: 0x6cfc8c20, 0x1b3ab: 0x6c456e20, + 0x1b3ac: 0x6c19ca20, 0x1b3ad: 0x6cc44220, 0x1b3ae: 0x6c457a20, 0x1b3af: 0x6cfe9420, + 0x1b3b0: 0x6d291220, 0x1b3b1: 0x6d2cba20, 0x1b3b2: 0x6c05f020, 0x1b3b3: 0x6c4d5e20, + 0x1b3b4: 0x6d0e4e20, 0x1b3b5: 0x6cfe9620, 0x1b3b6: 0x6c634020, 0x1b3b7: 0x6cd05020, + 0x1b3b8: 0x6c18ae20, 0x1b3b9: 0x6cc66020, 0x1b3ba: 0x6c5a4c20, 0x1b3bb: 0x6c9d3020, + 0x1b3bc: 0x6c79e020, 0x1b3bd: 0x6c7b5220, 0x1b3be: 0x6c0d2e20, 0x1b3bf: 0x6cdaa020, + // Block 0x6cf, offset 0x1b3c0 + 0x1b3c0: 0x6c112420, 0x1b3c1: 0x6d296620, 0x1b3c2: 0x6c61de20, 0x1b3c3: 0x6d24da20, + 0x1b3c4: 0x6c61e020, 0x1b3c5: 0x6d1a5420, 0x1b3c6: 0x6c9d3620, 0x1b3c7: 0x6c79e620, + 0x1b3c8: 0x6cbe4220, 0x1b3c9: 0x6cc3b420, 0x1b3ca: 0x6d315620, 0x1b3cb: 0x6c668820, + 0x1b3cc: 0x6c3fee20, 0x1b3cd: 0x6ca90420, 0x1b3ce: 0x6c0e1e20, 0x1b3cf: 0x6c587420, + 0x1b3d0: 0x6c9a9020, 0x1b3d1: 0x6cbdd620, 0x1b3d2: 0x6c4e0c20, 0x1b3d3: 0x6d233220, + 0x1b3d4: 0x6cd26620, 0x1b3d5: 0x6ca90620, 0x1b3d6: 0x6c6d1020, 0x1b3d7: 0x6ca90a20, + 0x1b3d8: 0x6d365020, 0x1b3d9: 0x6d226820, 0x1b3da: 0x6c060220, 0x1b3db: 0x6c7b5620, + 0x1b3dc: 0x6ca90c20, 0x1b3dd: 0x6cbddc20, 0x1b3de: 0x6ca12820, 0x1b3df: 0x6c13f220, + 0x1b3e0: 0x6c726020, 0x1b3e1: 0x6c489c20, 0x1b3e2: 0x6cbde220, 0x1b3e3: 0x6c54e420, + 0x1b3e4: 0x6cf50a20, 0x1b3e5: 0x6c89f020, 0x1b3e6: 0x6cd27a20, 0x1b3e7: 0x6ca91020, + 0x1b3e8: 0x6d2d4620, 0x1b3e9: 0x6cd06820, 0x1b3ea: 0x6ceffc20, 0x1b3eb: 0x6d014820, + 0x1b3ec: 0x6c7b5820, 0x1b3ed: 0x6c5c0e20, 0x1b3ee: 0x6c8a0620, 0x1b3ef: 0x6c75e220, + 0x1b3f0: 0x6c589620, 0x1b3f1: 0x6d18c020, 0x1b3f2: 0x6d156a20, 0x1b3f3: 0x6c061c20, + 0x1b3f4: 0x6cbd4a20, 0x1b3f5: 0x6c1d4620, 0x1b3f6: 0x6c062020, 0x1b3f7: 0x6c3c7c20, + 0x1b3f8: 0x6c25b020, 0x1b3f9: 0x6c332c20, 0x1b3fa: 0x6cd87820, 0x1b3fb: 0x6d09d420, + 0x1b3fc: 0x6c29ce20, 0x1b3fd: 0x6c93ca20, 0x1b3fe: 0x6c333620, 0x1b3ff: 0x6cd45020, + // Block 0x6d0, offset 0x1b400 + 0x1b400: 0x6cb34a20, 0x1b401: 0x6c3c2420, 0x1b402: 0x6d3b7420, 0x1b403: 0x6c3d5e20, + 0x1b404: 0x6ccf3a20, 0x1b405: 0x6c789620, 0x1b406: 0x6c674e20, 0x1b407: 0x6c675c20, + 0x1b408: 0x6d3b7a20, 0x1b409: 0x6cf08420, 0x1b40a: 0x6d41e820, 0x1b40b: 0x6d0a0c20, + 0x1b40c: 0x6cd5d220, 0x1b40d: 0x6c335420, 0x1b40e: 0x6c29e820, 0x1b40f: 0x6cffa220, + 0x1b410: 0x6c6a5420, 0x1b411: 0x6cceac20, 0x1b412: 0x6c377e20, 0x1b413: 0x6c378020, + 0x1b414: 0x6c378220, 0x1b415: 0x6c40d020, 0x1b416: 0x6c645e20, 0x1b417: 0x6cd49a20, + 0x1b418: 0x6c189220, 0x1b419: 0x6cce4a20, 0x1b41a: 0x6cce4c20, 0x1b41b: 0x6ca1b420, + 0x1b41c: 0x6c40c620, 0x1b41d: 0x6c169e20, 0x1b41e: 0x6c8a9a20, 0x1b41f: 0x6cfc1020, + 0x1b420: 0x6cfc1220, 0x1b421: 0x6c7dde20, 0x1b422: 0x6d1edc20, 0x1b423: 0x6cedbc20, + 0x1b424: 0x6d1ede20, 0x1b425: 0x6c8a8c20, 0x1b426: 0x6c8a8e20, 0x1b427: 0x6d10ca20, + 0x1b428: 0x6c983020, 0x1b429: 0x6cedc620, 0x1b42a: 0x6cedc020, 0x1b42b: 0x6cedc220, + 0x1b42c: 0x6c40d420, 0x1b42d: 0x6d10cc20, 0x1b42e: 0x6c34d620, 0x1b42f: 0x6c7cec20, + 0x1b430: 0x6d37f020, 0x1b431: 0x6c6ff620, 0x1b432: 0x6c419c20, 0x1b433: 0x6c478820, + 0x1b434: 0x6c419e20, 0x1b435: 0x6ce9b420, 0x1b436: 0x6c41b620, 0x1b437: 0x6c41b820, + 0x1b438: 0x6cd18a20, 0x1b439: 0x6d1ac220, 0x1b43a: 0x6c1b7020, 0x1b43b: 0x6c779020, + 0x1b43c: 0x6ca5b620, 0x1b43d: 0x6c6c8020, 0x1b43e: 0x6cef8620, 0x1b43f: 0x6ca7d020, + // Block 0x6d1, offset 0x1b440 + 0x1b440: 0x6c70f020, 0x1b441: 0x6cb08620, 0x1b442: 0x6c134e20, 0x1b443: 0x6cf83c20, + 0x1b444: 0x6c086c20, 0x1b445: 0x6c705620, 0x1b446: 0x6c6bbe20, 0x1b447: 0x6ce48020, + 0x1b448: 0x6cc0dc20, 0x1b449: 0x6ce44c20, 0x1b44a: 0x6c6bc020, 0x1b44b: 0x6cf35620, + 0x1b44c: 0x6c2dfa20, 0x1b44d: 0x6cd1a220, 0x1b44e: 0x6cd2c020, 0x1b44f: 0x6cb28020, + 0x1b450: 0x6c5ea420, 0x1b451: 0x6d017c20, 0x1b452: 0x6d31c620, 0x1b453: 0x6d017e20, + 0x1b454: 0x6ca5ca20, 0x1b455: 0x6d2de020, 0x1b456: 0x6cf5ba20, 0x1b457: 0x6cef9e20, + 0x1b458: 0x6c97b420, 0x1b459: 0x6c353a20, 0x1b45a: 0x6c910620, 0x1b45b: 0x6cb29820, + 0x1b45c: 0x6ce44e20, 0x1b45d: 0x6c3aa420, 0x1b45e: 0x6cd55820, 0x1b45f: 0x6d01aa20, + 0x1b460: 0x6ce8a020, 0x1b461: 0x6c939a20, 0x1b462: 0x6c93a620, 0x1b463: 0x6cf7f820, + 0x1b464: 0x6c135420, 0x1b465: 0x6c93ae20, 0x1b466: 0x6c727820, 0x1b467: 0x6d01f620, + 0x1b468: 0x6c72a420, 0x1b469: 0x6c73ba20, 0x1b46a: 0x6c8a3020, 0x1b46b: 0x6c74e620, + 0x1b46c: 0x6cd58820, 0x1b46d: 0x6cf93a20, 0x1b46e: 0x6c17fa20, 0x1b46f: 0x6cea3620, + 0x1b470: 0x6ca67420, 0x1b471: 0x6cccb020, 0x1b472: 0x6cec4820, 0x1b473: 0x6cfa6c20, + 0x1b474: 0x6c856820, 0x1b475: 0x6c35c620, 0x1b476: 0x6c2a5420, 0x1b477: 0x6c5ca820, + 0x1b478: 0x6c8f6820, 0x1b479: 0x6d165c20, 0x1b47a: 0x6cb6ca20, 0x1b47b: 0x6cc5b020, + 0x1b47c: 0x6cf49e20, 0x1b47d: 0x6c4e8020, 0x1b47e: 0x6ccf9c20, 0x1b47f: 0x6d221820, + // Block 0x6d2, offset 0x1b480 + 0x1b480: 0x6c1e5220, 0x1b481: 0x6cdc1e20, 0x1b482: 0x6cb6cc20, 0x1b483: 0x6cc5b220, + 0x1b484: 0x6d267c20, 0x1b485: 0x6c04b820, 0x1b486: 0x6d118420, 0x1b487: 0x6c01f220, + 0x1b488: 0x6d0b0e20, 0x1b489: 0x6cf4a620, 0x1b48a: 0x6c6a6e20, 0x1b48b: 0x6c35cc20, + 0x1b48c: 0x6c5fc620, 0x1b48d: 0x6cb8a420, 0x1b48e: 0x6c3b5420, 0x1b48f: 0x6cecc420, + 0x1b490: 0x6cb57020, 0x1b491: 0x6c132820, 0x1b492: 0x6cb96a20, 0x1b493: 0x6cb57220, + 0x1b494: 0x6c142e20, 0x1b495: 0x6c6bb020, 0x1b496: 0x6cc0d020, 0x1b497: 0x6c429820, + 0x1b498: 0x6cfc7a20, 0x1b499: 0x6c02c020, 0x1b49a: 0x6c7f8a20, 0x1b49b: 0x6c29d020, + 0x1b49c: 0x6c031a20, 0x1b49d: 0x6d427c20, 0x1b49e: 0x6d427e20, 0x1b49f: 0x6d100220, + 0x1b4a0: 0x6c71f820, 0x1b4a1: 0x6c425c20, 0x1b4a2: 0x6c785820, 0x1b4a3: 0x6c466e20, + 0x1b4a4: 0x6d08fa20, 0x1b4a5: 0x6cb2fa20, 0x1b4a6: 0x6c858a20, 0x1b4a7: 0x6ce56e20, + 0x1b4a8: 0x6cc0e020, 0x1b4a9: 0x6d0c6220, 0x1b4aa: 0x6c3de420, 0x1b4ab: 0x6d052e20, + 0x1b4ac: 0x6c640020, 0x1b4ad: 0x6c8e0a20, 0x1b4ae: 0x6ceaec20, 0x1b4af: 0x6cafb220, + 0x1b4b0: 0x6c02c820, 0x1b4b1: 0x6c273020, 0x1b4b2: 0x6c7be020, 0x1b4b3: 0x6d268620, + 0x1b4b4: 0x6cc0e220, 0x1b4b5: 0x6c566220, 0x1b4b6: 0x6cb36620, 0x1b4b7: 0x6c9f2a20, + 0x1b4b8: 0x6c01a220, 0x1b4b9: 0x6ce57020, 0x1b4ba: 0x6c8ca620, 0x1b4bb: 0x6c1b0620, + 0x1b4bc: 0x6cb2ea20, 0x1b4bd: 0x6c2fde20, 0x1b4be: 0x6c4e8c20, 0x1b4bf: 0x6c7c3420, + // Block 0x6d3, offset 0x1b4c0 + 0x1b4c0: 0x6d053020, 0x1b4c1: 0x6c992a20, 0x1b4c2: 0x6ce71420, 0x1b4c3: 0x6d08fc20, + 0x1b4c4: 0x6d16ae20, 0x1b4c5: 0x6c0be220, 0x1b4c6: 0x6c50d220, 0x1b4c7: 0x6c032c20, + 0x1b4c8: 0x6c95e620, 0x1b4c9: 0x6c35f020, 0x1b4ca: 0x6c3fc220, 0x1b4cb: 0x6d09e420, + 0x1b4cc: 0x6c2e6c20, 0x1b4cd: 0x6c921e20, 0x1b4ce: 0x6c371e20, 0x1b4cf: 0x6c373c20, + 0x1b4d0: 0x6c40e820, 0x1b4d1: 0x6cc28c20, 0x1b4d2: 0x6c305a20, 0x1b4d3: 0x6d149420, + 0x1b4d4: 0x6ca22e20, 0x1b4d5: 0x6cd25020, 0x1b4d6: 0x6c011a20, 0x1b4d7: 0x6ceee820, + 0x1b4d8: 0x6c586220, 0x1b4d9: 0x6d359620, 0x1b4da: 0x6c9d2c20, 0x1b4db: 0x6c850220, + 0x1b4dc: 0x6c61a420, 0x1b4dd: 0x6ce72220, 0x1b4de: 0x6ceeea20, 0x1b4df: 0x6d202620, + 0x1b4e0: 0x6c483420, 0x1b4e1: 0x6cf99420, 0x1b4e2: 0x6c850420, 0x1b4e3: 0x6d10d820, + 0x1b4e4: 0x6c698620, 0x1b4e5: 0x6d329420, 0x1b4e6: 0x6c943220, 0x1b4e7: 0x6c683020, + 0x1b4e8: 0x6c355420, 0x1b4e9: 0x6c355620, 0x1b4ea: 0x6d22ee20, 0x1b4eb: 0x6d007a20, + 0x1b4ec: 0x6c100e20, 0x1b4ed: 0x6cbc3620, 0x1b4ee: 0x6cc43420, 0x1b4ef: 0x6c3c3220, + 0x1b4f0: 0x6c3c3420, 0x1b4f1: 0x6ca4a220, 0x1b4f2: 0x6c850a20, 0x1b4f3: 0x6d1f1420, + 0x1b4f4: 0x6cfca220, 0x1b4f5: 0x6c532820, 0x1b4f6: 0x6c29d220, 0x1b4f7: 0x6ccfc820, + 0x1b4f8: 0x6c19cc20, 0x1b4f9: 0x6ce88e20, 0x1b4fa: 0x6c44f620, 0x1b4fb: 0x6c75a220, + 0x1b4fc: 0x6c502620, 0x1b4fd: 0x6cf9a020, 0x1b4fe: 0x6d1a4620, 0x1b4ff: 0x6d223a20, + // Block 0x6d4, offset 0x1b500 + 0x1b500: 0x6c811620, 0x1b501: 0x6c770820, 0x1b502: 0x6c814e20, 0x1b503: 0x6c7ee820, + 0x1b504: 0x6cfbf220, 0x1b505: 0x6cc3aa20, 0x1b506: 0x6c797020, 0x1b507: 0x6c1d1020, + 0x1b508: 0x6c1d1220, 0x1b509: 0x6cde4620, 0x1b50a: 0x6c8bac20, 0x1b50b: 0x6c578a20, + 0x1b50c: 0x6c708420, 0x1b50d: 0x6c7ef420, 0x1b50e: 0x6cb5be20, 0x1b50f: 0x6c9f4420, + 0x1b510: 0x6c7d5420, 0x1b511: 0x6c7d5620, 0x1b512: 0x6d40b420, 0x1b513: 0x6c480a20, + 0x1b514: 0x6c24c820, 0x1b515: 0x6d0b2620, 0x1b516: 0x6d0b2820, 0x1b517: 0x6c429e20, + 0x1b518: 0x6c94ee20, 0x1b519: 0x6c94f020, 0x1b51a: 0x6c837420, 0x1b51b: 0x6c742020, + 0x1b51c: 0x6c342820, 0x1b51d: 0x6d32ac20, 0x1b51e: 0x6c4c1e20, 0x1b51f: 0x6d1a5620, + 0x1b520: 0x6c2ff220, 0x1b521: 0x6c4dfa20, 0x1b522: 0x6d32ae20, 0x1b523: 0x6cefac20, + 0x1b524: 0x6cff7e20, 0x1b525: 0x6cafde20, 0x1b526: 0x6d0bf220, 0x1b527: 0x6cd91420, + 0x1b528: 0x6c6ab220, 0x1b529: 0x6c07e220, 0x1b52a: 0x6d40b620, 0x1b52b: 0x6c7a3c20, + 0x1b52c: 0x6c2ff420, 0x1b52d: 0x6d2de420, 0x1b52e: 0x6c480c20, 0x1b52f: 0x6d1a5820, + 0x1b530: 0x6d3f6a20, 0x1b531: 0x6d2b4e20, 0x1b532: 0x6c59c020, 0x1b533: 0x6d211820, + 0x1b534: 0x6cec6220, 0x1b535: 0x6d0fb220, 0x1b536: 0x6c3c4a20, 0x1b537: 0x6cc05c20, + 0x1b538: 0x6d0fb420, 0x1b539: 0x6ce32020, 0x1b53a: 0x6d15ec20, 0x1b53b: 0x6d361e20, + 0x1b53c: 0x6cd37c20, 0x1b53d: 0x6d291620, 0x1b53e: 0x6d11ae20, 0x1b53f: 0x6c363020, + // Block 0x6d5, offset 0x1b540 + 0x1b540: 0x6d3af220, 0x1b541: 0x6c76ac20, 0x1b542: 0x6c93dc20, 0x1b543: 0x6d0d7a20, + 0x1b544: 0x6c9a5820, 0x1b545: 0x6c4e0e20, 0x1b546: 0x6c5ec820, 0x1b547: 0x6c5eca20, + 0x1b548: 0x6c591e20, 0x1b549: 0x6ce67020, 0x1b54a: 0x6cd16a20, 0x1b54b: 0x6c99fa20, + 0x1b54c: 0x6cba5220, 0x1b54d: 0x6cf4e820, 0x1b54e: 0x6d211a20, 0x1b54f: 0x6d3f8420, + 0x1b550: 0x6c7f9a20, 0x1b551: 0x6c786420, 0x1b552: 0x6d0c9220, 0x1b553: 0x6d0c9420, + 0x1b554: 0x6cefbc20, 0x1b555: 0x6d3f8620, 0x1b556: 0x6c13e020, 0x1b557: 0x6cdc3c20, + 0x1b558: 0x6cc67220, 0x1b559: 0x6c78ee20, 0x1b55a: 0x6cbd2e20, 0x1b55b: 0x6d211c20, + 0x1b55c: 0x6ce45220, 0x1b55d: 0x6c90e220, 0x1b55e: 0x6ce8ba20, 0x1b55f: 0x6c330420, + 0x1b560: 0x6cf64220, 0x1b561: 0x6cf25220, 0x1b562: 0x6c123020, 0x1b563: 0x6c296c20, + 0x1b564: 0x6cc68220, 0x1b565: 0x6c6ae020, 0x1b566: 0x6c765e20, 0x1b567: 0x6c8e6820, + 0x1b568: 0x6cf4fc20, 0x1b569: 0x6cd92420, 0x1b56a: 0x6cbb7c20, 0x1b56b: 0x6d3e3620, + 0x1b56c: 0x6cef0c20, 0x1b56d: 0x6c07f620, 0x1b56e: 0x6c2ccc20, 0x1b56f: 0x6c25da20, + 0x1b570: 0x6cba1220, 0x1b571: 0x6d1e4420, 0x1b572: 0x6ca83e20, 0x1b573: 0x6c25dc20, + 0x1b574: 0x6c614820, 0x1b575: 0x6cd41620, 0x1b576: 0x6cc93c20, 0x1b577: 0x6cd96820, + 0x1b578: 0x6d3fa020, 0x1b579: 0x6c67f420, 0x1b57a: 0x6c89f220, 0x1b57b: 0x6c773c20, + 0x1b57c: 0x6c15c620, 0x1b57d: 0x6c2ec820, 0x1b57e: 0x6c132420, 0x1b57f: 0x6c2f7820, + // Block 0x6d6, offset 0x1b580 + 0x1b580: 0x6ce86820, 0x1b581: 0x6c90ec20, 0x1b582: 0x6d2f3a20, 0x1b583: 0x6d2dfe20, + 0x1b584: 0x6d2e0020, 0x1b585: 0x6c024e20, 0x1b586: 0x6c127c20, 0x1b587: 0x6cc11e20, + 0x1b588: 0x6cbac820, 0x1b589: 0x6c24d620, 0x1b58a: 0x6d418e20, 0x1b58b: 0x6c29e220, + 0x1b58c: 0x6c29e420, 0x1b58d: 0x6cf79020, 0x1b58e: 0x6d238c20, 0x1b58f: 0x6cae2620, + 0x1b590: 0x6c8f9a20, 0x1b591: 0x6cfe4420, 0x1b592: 0x6c135620, 0x1b593: 0x6c0e8620, + 0x1b594: 0x6cbd3c20, 0x1b595: 0x6c686620, 0x1b596: 0x6d0dc620, 0x1b597: 0x6c816a20, + 0x1b598: 0x6d2e7420, 0x1b599: 0x6c8bcc20, 0x1b59a: 0x6c8a0820, 0x1b59b: 0x6c8a0a20, + 0x1b59c: 0x6c6c5020, 0x1b59d: 0x6c2ae220, 0x1b59e: 0x6c350a20, 0x1b59f: 0x6d41ee20, + 0x1b5a0: 0x6c69ba20, 0x1b5a1: 0x6c4b6220, 0x1b5a2: 0x6d113420, 0x1b5a3: 0x6c686820, + 0x1b5a4: 0x6d113620, 0x1b5a5: 0x6c748e20, 0x1b5a6: 0x6d2d9620, 0x1b5a7: 0x6d188a20, + 0x1b5a8: 0x6d091a20, 0x1b5a9: 0x6ca4be20, 0x1b5aa: 0x6d133820, 0x1b5ab: 0x6d133a20, + 0x1b5ac: 0x6d155a20, 0x1b5ad: 0x6ca87020, 0x1b5ae: 0x6cfc2a20, 0x1b5af: 0x6c608220, + 0x1b5b0: 0x6d020c20, 0x1b5b1: 0x6c786e20, 0x1b5b2: 0x6cf69820, 0x1b5b3: 0x6c2c9a20, + 0x1b5b4: 0x6c02e620, 0x1b5b5: 0x6d419c20, 0x1b5b6: 0x6cf14820, 0x1b5b7: 0x6d156c20, + 0x1b5b8: 0x6cc6c020, 0x1b5b9: 0x6c29f020, 0x1b5ba: 0x6c8e1420, 0x1b5bb: 0x6d28cc20, + 0x1b5bc: 0x6d228c20, 0x1b5bd: 0x6d26f220, 0x1b5be: 0x6d1b0c20, 0x1b5bf: 0x6cc83820, + // Block 0x6d7, offset 0x1b5c0 + 0x1b5c0: 0x6c6b5420, 0x1b5c1: 0x6c869c20, 0x1b5c2: 0x6c4a9820, 0x1b5c3: 0x6c8fbe20, + 0x1b5c4: 0x6c8fc020, 0x1b5c5: 0x6c2ce420, 0x1b5c6: 0x6cc6d620, 0x1b5c7: 0x6cf72a20, + 0x1b5c8: 0x6c718620, 0x1b5c9: 0x6c155020, 0x1b5ca: 0x6d1d2220, 0x1b5cb: 0x6c7c5420, + 0x1b5cc: 0x6d0cee20, 0x1b5cd: 0x6ceec820, 0x1b5ce: 0x6ca4d420, 0x1b5cf: 0x6cc32820, + 0x1b5d0: 0x6c17ac20, 0x1b5d1: 0x6c24a420, 0x1b5d2: 0x6c945220, 0x1b5d3: 0x6c2cf420, + 0x1b5d4: 0x6c2cf620, 0x1b5d5: 0x6ca8e020, 0x1b5d6: 0x6d0d1220, 0x1b5d7: 0x6d0d1020, + 0x1b5d8: 0x6d0e2020, 0x1b5d9: 0x6c7cbc20, 0x1b5da: 0x6d0e2220, 0x1b5db: 0x6c1fd620, + 0x1b5dc: 0x6c7b0820, 0x1b5dd: 0x6c1fd820, 0x1b5de: 0x6d385020, 0x1b5df: 0x6c597020, + 0x1b5e0: 0x6c6d8a20, 0x1b5e1: 0x6d09d820, 0x1b5e2: 0x6c175e20, 0x1b5e3: 0x6c176020, + 0x1b5e4: 0x6c8b2620, 0x1b5e5: 0x6c454a20, 0x1b5e6: 0x6d426020, 0x1b5e7: 0x6cbc1a20, + 0x1b5e8: 0x6c71e820, 0x1b5e9: 0x6c45ce20, 0x1b5ea: 0x6c71f220, 0x1b5eb: 0x6cf35220, + 0x1b5ec: 0x6cb4be20, 0x1b5ed: 0x6cb4c020, 0x1b5ee: 0x6c143620, 0x1b5ef: 0x6cc05e20, + 0x1b5f0: 0x6cc08220, 0x1b5f1: 0x6c610e20, 0x1b5f2: 0x6d15ac20, 0x1b5f3: 0x6cd87020, + 0x1b5f4: 0x6c03e620, 0x1b5f5: 0x6d338a20, 0x1b5f6: 0x6d2f5820, 0x1b5f7: 0x6cfe1e20, + 0x1b5f8: 0x6d14bc20, 0x1b5f9: 0x6c6c8820, 0x1b5fa: 0x6d0a6c20, 0x1b5fb: 0x6c734020, + 0x1b5fc: 0x6c033820, 0x1b5fd: 0x6d0a8c20, 0x1b5fe: 0x6c6c1a20, 0x1b5ff: 0x6c3dc620, + // Block 0x6d8, offset 0x1b600 + 0x1b600: 0x6d287e20, 0x1b601: 0x6c090220, 0x1b602: 0x6cd2f020, 0x1b603: 0x6c105820, + 0x1b604: 0x6c2f4620, 0x1b605: 0x6cd66220, 0x1b606: 0x6c384a20, 0x1b607: 0x6ca7ec20, + 0x1b608: 0x6cd19020, 0x1b609: 0x6c3b0e20, 0x1b60a: 0x6cabe420, 0x1b60b: 0x6d34e020, + 0x1b60c: 0x6cf57a20, 0x1b60d: 0x6c565420, 0x1b60e: 0x6c286420, 0x1b60f: 0x6ceede20, + 0x1b610: 0x6d2f2020, 0x1b611: 0x6ce16e20, 0x1b612: 0x6c273220, 0x1b613: 0x6ca0c820, + 0x1b614: 0x6cae0620, 0x1b615: 0x6cabe620, 0x1b616: 0x6ce5e820, 0x1b617: 0x6c0e4c20, + 0x1b618: 0x6c87f220, 0x1b619: 0x6d358620, 0x1b61a: 0x6d397620, 0x1b61b: 0x6c0eb420, + 0x1b61c: 0x6d358820, 0x1b61d: 0x6c2c2620, 0x1b61e: 0x6ca0de20, 0x1b61f: 0x6d16e220, + 0x1b620: 0x6d16e420, 0x1b621: 0x6cb28220, 0x1b622: 0x6cb84820, 0x1b623: 0x6c731420, + 0x1b624: 0x6cc79220, 0x1b625: 0x6cd66420, 0x1b626: 0x6c274020, 0x1b627: 0x6d334020, + 0x1b628: 0x6cd71420, 0x1b629: 0x6cbc3820, 0x1b62a: 0x6d313620, 0x1b62b: 0x6cd1b020, + 0x1b62c: 0x6cc44420, 0x1b62d: 0x6cf77020, 0x1b62e: 0x6c051c20, 0x1b62f: 0x6c275020, + 0x1b630: 0x6c4a4420, 0x1b631: 0x6c1d9420, 0x1b632: 0x6cb29a20, 0x1b633: 0x6d2f2c20, + 0x1b634: 0x6cca4a20, 0x1b635: 0x6cec8a20, 0x1b636: 0x6c275c20, 0x1b637: 0x6ceefc20, + 0x1b638: 0x6c16a420, 0x1b639: 0x6ccc4820, 0x1b63a: 0x6cb5c220, 0x1b63b: 0x6d2abe20, + 0x1b63c: 0x6c4c6820, 0x1b63d: 0x6c997a20, 0x1b63e: 0x6c321620, 0x1b63f: 0x6c540020, + // Block 0x6d9, offset 0x1b640 + 0x1b640: 0x6d334c20, 0x1b641: 0x6d059420, 0x1b642: 0x6c9d4420, 0x1b643: 0x6cef0e20, + 0x1b644: 0x6cf2ec20, 0x1b645: 0x6c3e7620, 0x1b646: 0x6d179620, 0x1b647: 0x6c052e20, + 0x1b648: 0x6cb2a420, 0x1b649: 0x6c2f3a20, 0x1b64a: 0x6c459220, 0x1b64b: 0x6cac5e20, + 0x1b64c: 0x6c5a5420, 0x1b64d: 0x6ce1d220, 0x1b64e: 0x6c9d5420, 0x1b64f: 0x6c644a20, + 0x1b650: 0x6ce2a020, 0x1b651: 0x6c5ad020, 0x1b652: 0x6d37c020, 0x1b653: 0x6cccfa20, + 0x1b654: 0x6c97e620, 0x1b655: 0x6ca29420, 0x1b656: 0x6c0c0820, 0x1b657: 0x6c4c7220, + 0x1b658: 0x6d2adc20, 0x1b659: 0x6ca29620, 0x1b65a: 0x6c053420, 0x1b65b: 0x6d2f3c20, + 0x1b65c: 0x6c6e2820, 0x1b65d: 0x6c15d220, 0x1b65e: 0x6c3ed620, 0x1b65f: 0x6d36a620, + 0x1b660: 0x6c54f420, 0x1b661: 0x6c385820, 0x1b662: 0x6c207620, 0x1b663: 0x6c09f220, + 0x1b664: 0x6c0ae220, 0x1b665: 0x6d2f4820, 0x1b666: 0x6c9d8420, 0x1b667: 0x6cbba420, + 0x1b668: 0x6c14d820, 0x1b669: 0x6c3b8620, 0x1b66a: 0x6c9b4820, 0x1b66b: 0x6c053e20, + 0x1b66c: 0x6c1de420, 0x1b66d: 0x6c9eee20, 0x1b66e: 0x6c1eb820, 0x1b66f: 0x6c6b3220, + 0x1b670: 0x6cfc3e20, 0x1b671: 0x6c7fe220, 0x1b672: 0x6c420a20, 0x1b673: 0x6cb26e20, + 0x1b674: 0x6ca6f220, 0x1b675: 0x6c646020, 0x1b676: 0x6c0e0420, 0x1b677: 0x6c0e0c20, + 0x1b678: 0x6d041620, 0x1b679: 0x6c422620, 0x1b67a: 0x6d107e20, 0x1b67b: 0x6c58ec20, + 0x1b67c: 0x6d200c20, 0x1b67d: 0x6d1e9a20, 0x1b67e: 0x6c613e20, 0x1b67f: 0x6c4a0220, + // Block 0x6da, offset 0x1b680 + 0x1b680: 0x6cb04220, 0x1b681: 0x6ce62420, 0x1b682: 0x6d2b3420, 0x1b683: 0x6c4a0420, + 0x1b684: 0x6d3c0820, 0x1b685: 0x6ca1b020, 0x1b686: 0x6cbec220, 0x1b687: 0x6c091c20, + 0x1b688: 0x6cbd5220, 0x1b689: 0x6c33d820, 0x1b68a: 0x6c206c20, 0x1b68b: 0x6c4ac220, + 0x1b68c: 0x6d0b4820, 0x1b68d: 0x6c043020, 0x1b68e: 0x6c6bb620, 0x1b68f: 0x6d067020, + 0x1b690: 0x6c913420, 0x1b691: 0x6cf42020, 0x1b692: 0x6d3c5420, 0x1b693: 0x6c7a8220, + 0x1b694: 0x6d1b9e20, 0x1b695: 0x6c2bd620, 0x1b696: 0x6cad4c20, 0x1b697: 0x6c2d3c20, + 0x1b698: 0x6d0ad020, 0x1b699: 0x6c9eac20, 0x1b69a: 0x6c44ba20, 0x1b69b: 0x6c22b820, + 0x1b69c: 0x6c3f3e20, 0x1b69d: 0x6ce71820, 0x1b69e: 0x6cacf220, 0x1b69f: 0x6c3a8220, + 0x1b6a0: 0x6cfdb420, 0x1b6a1: 0x6d15ce20, 0x1b6a2: 0x6d359820, 0x1b6a3: 0x6ce54e20, + 0x1b6a4: 0x6d359a20, 0x1b6a5: 0x6d04be20, 0x1b6a6: 0x6c324420, 0x1b6a7: 0x6d428e20, + 0x1b6a8: 0x6cfe9c20, 0x1b6a9: 0x6ce89020, 0x1b6aa: 0x6c4ae620, 0x1b6ab: 0x6c7a8820, + 0x1b6ac: 0x6c984e20, 0x1b6ad: 0x6ce66420, 0x1b6ae: 0x6d1fb620, 0x1b6af: 0x6c101020, + 0x1b6b0: 0x6c0e0e20, 0x1b6b1: 0x6c1a6e20, 0x1b6b2: 0x6c7ef620, 0x1b6b3: 0x6c097620, + 0x1b6b4: 0x6c601620, 0x1b6b5: 0x6c012620, 0x1b6b6: 0x6cd5c220, 0x1b6b7: 0x6c772c20, + 0x1b6b8: 0x6d1d8420, 0x1b6b9: 0x6ceb7820, 0x1b6ba: 0x6cd91620, 0x1b6bb: 0x6cd5c420, + 0x1b6bc: 0x6cbea620, 0x1b6bd: 0x6d233620, 0x1b6be: 0x6d224a20, 0x1b6bf: 0x6c9eb420, + // Block 0x6db, offset 0x1b6c0 + 0x1b6c0: 0x6cd9ac20, 0x1b6c1: 0x6c12e620, 0x1b6c2: 0x6cfd7220, 0x1b6c3: 0x6c3aaa20, + 0x1b6c4: 0x6c6ff820, 0x1b6c5: 0x6c365420, 0x1b6c6: 0x6c4a6620, 0x1b6c7: 0x6c8f3420, + 0x1b6c8: 0x6ccc5620, 0x1b6c9: 0x6c881020, 0x1b6ca: 0x6c80b420, 0x1b6cb: 0x6cd9ae20, + 0x1b6cc: 0x6d365220, 0x1b6cd: 0x6cb3f620, 0x1b6ce: 0x6cbeac20, 0x1b6cf: 0x6c700e20, + 0x1b6d0: 0x6c6ffa20, 0x1b6d1: 0x6c6c9e20, 0x1b6d2: 0x6c025020, 0x1b6d3: 0x6c7e0420, + 0x1b6d4: 0x6c90a020, 0x1b6d5: 0x6d1b5e20, 0x1b6d6: 0x6c8a9e20, 0x1b6d7: 0x6c277e20, + 0x1b6d8: 0x6c927c20, 0x1b6d9: 0x6d182220, 0x1b6da: 0x6c1ea420, 0x1b6db: 0x6c151a20, + 0x1b6dc: 0x6ce8d820, 0x1b6dd: 0x6cd81220, 0x1b6de: 0x6d02e420, 0x1b6df: 0x6c9eb820, + 0x1b6e0: 0x6c16f420, 0x1b6e1: 0x6cf46220, 0x1b6e2: 0x6c3ac420, 0x1b6e3: 0x6c4a0820, + 0x1b6e4: 0x6c7aa620, 0x1b6e5: 0x6c7b3c20, 0x1b6e6: 0x6c0a4820, 0x1b6e7: 0x6cbb2220, + 0x1b6e8: 0x6d021020, 0x1b6e9: 0x6c8c2c20, 0x1b6ea: 0x6c8c2e20, 0x1b6eb: 0x6c8a3220, + 0x1b6ec: 0x6c916e20, 0x1b6ed: 0x6c631220, 0x1b6ee: 0x6d1d2420, 0x1b6ef: 0x6cfafa20, + 0x1b6f0: 0x6ce65420, 0x1b6f1: 0x6d1dd820, 0x1b6f2: 0x6c84bc20, 0x1b6f3: 0x6ce65820, + 0x1b6f4: 0x6d1ac020, 0x1b6f5: 0x6d09d220, 0x1b6f6: 0x6d0c5220, 0x1b6f7: 0x6ce65c20, + 0x1b6f8: 0x6c2b5220, 0x1b6f9: 0x6cac1420, 0x1b6fa: 0x6c665420, 0x1b6fb: 0x6c5b1c20, + 0x1b6fc: 0x6ca39a20, 0x1b6fd: 0x6c5b2220, 0x1b6fe: 0x6c45cc20, 0x1b6ff: 0x6ca75620, + // Block 0x6dc, offset 0x1b700 + 0x1b700: 0x6c762420, 0x1b701: 0x6c0b6620, 0x1b702: 0x6d166220, 0x1b703: 0x6cb73620, + 0x1b704: 0x6ca9f020, 0x1b705: 0x6c3bc620, 0x1b706: 0x6c71a420, 0x1b707: 0x6d0d5620, + 0x1b708: 0x6d16ea20, 0x1b709: 0x6d2a0020, 0x1b70a: 0x6c09f420, 0x1b70b: 0x6d163c20, + 0x1b70c: 0x6d13ba20, 0x1b70d: 0x6c37b820, 0x1b70e: 0x6cc9f820, 0x1b70f: 0x6cd2fc20, + 0x1b710: 0x6c37ba20, 0x1b711: 0x6cd38020, 0x1b712: 0x6cd39a20, 0x1b713: 0x6c454c20, + 0x1b714: 0x6c2e0420, 0x1b715: 0x6d1ac420, 0x1b716: 0x6c563620, 0x1b717: 0x6c3dc820, + 0x1b718: 0x6c52ea20, 0x1b719: 0x6cf34420, 0x1b71a: 0x6ce99c20, 0x1b71b: 0x6c1af420, + 0x1b71c: 0x6c67d420, 0x1b71d: 0x6c03a820, 0x1b71e: 0x6cd04420, 0x1b71f: 0x6c2c1420, + 0x1b720: 0x6d2eb020, 0x1b721: 0x6c73dc20, 0x1b722: 0x6ce1b020, 0x1b723: 0x6c3f4020, + 0x1b724: 0x6c2bd820, 0x1b725: 0x6c9c3820, 0x1b726: 0x6cfb2c20, 0x1b727: 0x6c552220, + 0x1b728: 0x6c173820, 0x1b729: 0x6caa4e20, 0x1b72a: 0x6c6e4c20, 0x1b72b: 0x6d31be20, + 0x1b72c: 0x6d14be20, 0x1b72d: 0x6c9ce020, 0x1b72e: 0x6cc28e20, 0x1b72f: 0x6cec8220, + 0x1b730: 0x6cce5e20, 0x1b731: 0x6cc91820, 0x1b732: 0x6d078620, 0x1b733: 0x6c6e6420, + 0x1b734: 0x6c2dc220, 0x1b735: 0x6d2eb420, 0x1b736: 0x6c67de20, 0x1b737: 0x6cbb0820, + 0x1b738: 0x6cae9a20, 0x1b739: 0x6c287820, 0x1b73a: 0x6cbb0e20, 0x1b73b: 0x6c099620, + 0x1b73c: 0x6c099820, 0x1b73d: 0x6ccf4820, 0x1b73e: 0x6c288820, 0x1b73f: 0x6c65aa20, + // Block 0x6dd, offset 0x1b740 + 0x1b740: 0x6c46b420, 0x1b741: 0x6c448e20, 0x1b742: 0x6c37f020, 0x1b743: 0x6c09c420, + 0x1b744: 0x6c79c020, 0x1b745: 0x6c673820, 0x1b746: 0x6c0d1820, 0x1b747: 0x6cff1420, + 0x1b748: 0x6c28a620, 0x1b749: 0x6c4c2e20, 0x1b74a: 0x6c67f820, 0x1b74b: 0x6c538620, + 0x1b74c: 0x6c9c7820, 0x1b74d: 0x6c4c4420, 0x1b74e: 0x6ceca420, 0x1b74f: 0x6c751620, + 0x1b750: 0x6c616820, 0x1b751: 0x6c616a20, 0x1b752: 0x6c4a3220, 0x1b753: 0x6c28f820, + 0x1b754: 0x6c921a20, 0x1b755: 0x6c921c20, 0x1b756: 0x6ce98820, 0x1b757: 0x6c5bb420, + 0x1b758: 0x6d362220, 0x1b759: 0x6c5bda20, 0x1b75a: 0x6c5bdc20, 0x1b75b: 0x6d155c20, + 0x1b75c: 0x6d155e20, 0x1b75d: 0x6d158020, 0x1b75e: 0x6d158220, 0x1b75f: 0x6d265e20, + 0x1b760: 0x6d266220, 0x1b761: 0x6cccb220, 0x1b762: 0x6d03c020, 0x1b763: 0x6cf17c20, + 0x1b764: 0x6ce71020, 0x1b765: 0x6d0e4620, 0x1b766: 0x6d0e4820, 0x1b767: 0x6d22f020, + 0x1b768: 0x6c1a9c20, 0x1b769: 0x6c112620, 0x1b76a: 0x6c0bfa20, 0x1b76b: 0x6c2dc420, + 0x1b76c: 0x6c0d3020, 0x1b76d: 0x6cae9e20, 0x1b76e: 0x6d1e4620, 0x1b76f: 0x6cb19820, + 0x1b770: 0x6d2ec420, 0x1b771: 0x6d1d0420, 0x1b772: 0x6c1af020, 0x1b773: 0x6c1bd420, + 0x1b774: 0x6d3d1c20, 0x1b775: 0x6ceb6c20, 0x1b776: 0x6c5fc820, 0x1b777: 0x6c39be20, + 0x1b778: 0x6d379220, 0x1b779: 0x6d168420, 0x1b77a: 0x6cedde20, 0x1b77b: 0x6c17fe20, + 0x1b77c: 0x6c08c020, 0x1b77d: 0x6c2b1620, 0x1b77e: 0x6c8caa20, 0x1b77f: 0x6c3dea20, + // Block 0x6de, offset 0x1b780 + 0x1b780: 0x6cedfa20, 0x1b781: 0x6d328820, 0x1b782: 0x6c241e20, 0x1b783: 0x6cedfc20, + 0x1b784: 0x6c6e4e20, 0x1b785: 0x6c274220, 0x1b786: 0x6cf59e20, 0x1b787: 0x6d0a7020, + 0x1b788: 0x6c523a20, 0x1b789: 0x6d0f9420, 0x1b78a: 0x6c57e820, 0x1b78b: 0x6c93d020, + 0x1b78c: 0x6c546420, 0x1b78d: 0x6cee0220, 0x1b78e: 0x6c1a6620, 0x1b78f: 0x6d35b220, + 0x1b790: 0x6d061820, 0x1b791: 0x6c6e6620, 0x1b792: 0x6ce89220, 0x1b793: 0x6c238e20, + 0x1b794: 0x6d377e20, 0x1b795: 0x6c7eea20, 0x1b796: 0x6c239620, 0x1b797: 0x6c2a9020, + 0x1b798: 0x6cabf820, 0x1b799: 0x6cf7dc20, 0x1b79a: 0x6c300020, 0x1b79b: 0x6c61e620, + 0x1b79c: 0x6c16a620, 0x1b79d: 0x6d35dc20, 0x1b79e: 0x6c239820, 0x1b79f: 0x6d387020, + 0x1b7a0: 0x6c7ef820, 0x1b7a1: 0x6d233820, 0x1b7a2: 0x6d018e20, 0x1b7a3: 0x6c6bdc20, + 0x1b7a4: 0x6c667820, 0x1b7a5: 0x6cd38220, 0x1b7a6: 0x6c641620, 0x1b7a7: 0x6c0b9820, + 0x1b7a8: 0x6c59c220, 0x1b7a9: 0x6c3ff020, 0x1b7aa: 0x6d0a0e20, 0x1b7ab: 0x6cefbe20, + 0x1b7ac: 0x6cad0420, 0x1b7ad: 0x6d110c20, 0x1b7ae: 0x6cee9820, 0x1b7af: 0x6cf64820, + 0x1b7b0: 0x6d32d020, 0x1b7b1: 0x6cb1b620, 0x1b7b2: 0x6ce36220, 0x1b7b3: 0x6c2a7c20, + 0x1b7b4: 0x6d32de20, 0x1b7b5: 0x6d32f020, 0x1b7b6: 0x6c0cf420, 0x1b7b7: 0x6c2a7e20, + 0x1b7b8: 0x6c1cd420, 0x1b7b9: 0x6c183020, 0x1b7ba: 0x6c692620, 0x1b7bb: 0x6c5c2c20, + 0x1b7bc: 0x6c693c20, 0x1b7bd: 0x6c5af220, 0x1b7be: 0x6c9a2e20, 0x1b7bf: 0x6c906c20, + // Block 0x6df, offset 0x1b7c0 + 0x1b7c0: 0x6cfd9220, 0x1b7c1: 0x6c067a20, 0x1b7c2: 0x6cc1fe20, 0x1b7c3: 0x6d02a220, + 0x1b7c4: 0x6d036220, 0x1b7c5: 0x6c090420, 0x1b7c6: 0x6d164020, 0x1b7c7: 0x6c820c20, + 0x1b7c8: 0x6cc56420, 0x1b7c9: 0x6c29b620, 0x1b7ca: 0x6c2f8e20, 0x1b7cb: 0x6c410820, + 0x1b7cc: 0x6c618020, 0x1b7cd: 0x6cc58620, 0x1b7ce: 0x6cc56a20, 0x1b7cf: 0x6c162620, + 0x1b7d0: 0x6ce05020, 0x1b7d1: 0x6ce26820, 0x1b7d2: 0x6ce26a20, 0x1b7d3: 0x6c416020, + 0x1b7d4: 0x6cb72a20, 0x1b7d5: 0x6cd2fe20, 0x1b7d6: 0x6c25ae20, 0x1b7d7: 0x6d357420, + 0x1b7d8: 0x6cee4620, 0x1b7d9: 0x6c982820, 0x1b7da: 0x6cf56e20, 0x1b7db: 0x6c388220, + 0x1b7dc: 0x6d1ba020, 0x1b7dd: 0x6ce4d820, 0x1b7de: 0x6c9f2c20, 0x1b7df: 0x6cf1ca20, + 0x1b7e0: 0x6d379620, 0x1b7e1: 0x6c1cac20, 0x1b7e2: 0x6cf4b620, 0x1b7e3: 0x6c5fca20, + 0x1b7e4: 0x6cf42220, 0x1b7e5: 0x6cf84620, 0x1b7e6: 0x6c639a20, 0x1b7e7: 0x6d1e8e20, + 0x1b7e8: 0x6ced7420, 0x1b7e9: 0x6c230220, 0x1b7ea: 0x6cd90220, 0x1b7eb: 0x6c7b0e20, + 0x1b7ec: 0x6d22d020, 0x1b7ed: 0x6c0b6c20, 0x1b7ee: 0x6d357620, 0x1b7ef: 0x6cb57420, + 0x1b7f0: 0x6c251820, 0x1b7f1: 0x6c189a20, 0x1b7f2: 0x6cdf5e20, 0x1b7f3: 0x6cea3e20, + 0x1b7f4: 0x6cb96e20, 0x1b7f5: 0x6ca75a20, 0x1b7f6: 0x6c5cde20, 0x1b7f7: 0x6d045420, + 0x1b7f8: 0x6ca97620, 0x1b7f9: 0x6c7bb620, 0x1b7fa: 0x6cfa7820, 0x1b7fb: 0x6d02aa20, + 0x1b7fc: 0x6c772420, 0x1b7fd: 0x6c549e20, 0x1b7fe: 0x6c767c20, 0x1b7ff: 0x6c3bce20, + // Block 0x6e0, offset 0x1b800 + 0x1b800: 0x6c57e620, 0x1b801: 0x6cdf6220, 0x1b802: 0x6cd95220, 0x1b803: 0x6cf42420, + 0x1b804: 0x6cab9a20, 0x1b805: 0x6c170220, 0x1b806: 0x6c20a020, 0x1b807: 0x6c71fa20, + 0x1b808: 0x6d16b420, 0x1b809: 0x6c05e620, 0x1b80a: 0x6c173a20, 0x1b80b: 0x6c9f2e20, + 0x1b80c: 0x6cadb020, 0x1b80d: 0x6d428020, 0x1b80e: 0x6d2b7620, 0x1b80f: 0x6d104020, + 0x1b810: 0x6c720a20, 0x1b811: 0x6c04e820, 0x1b812: 0x6caa5e20, 0x1b813: 0x6ca49420, + 0x1b814: 0x6d328a20, 0x1b815: 0x6cabe820, 0x1b816: 0x6c106a20, 0x1b817: 0x6ce5ea20, + 0x1b818: 0x6c567020, 0x1b819: 0x6c566420, 0x1b81a: 0x6c720c20, 0x1b81b: 0x6c267e20, + 0x1b81c: 0x6c87f420, 0x1b81d: 0x6cd7d420, 0x1b81e: 0x6c1d8e20, 0x1b81f: 0x6c2c2020, + 0x1b820: 0x6c274420, 0x1b821: 0x6d147020, 0x1b822: 0x6ce84020, 0x1b823: 0x6d1f0620, + 0x1b824: 0x6c3d4820, 0x1b825: 0x6c5ff420, 0x1b826: 0x6cae5420, 0x1b827: 0x6d041820, + 0x1b828: 0x6d260420, 0x1b829: 0x6ca5be20, 0x1b82a: 0x6c48e620, 0x1b82b: 0x6c3dec20, + 0x1b82c: 0x6cf84820, 0x1b82d: 0x6c093220, 0x1b82e: 0x6d1e9620, 0x1b82f: 0x6cbc9620, + 0x1b830: 0x6d086e20, 0x1b831: 0x6c230820, 0x1b832: 0x6c0dc220, 0x1b833: 0x6c5a4220, + 0x1b834: 0x6d068020, 0x1b835: 0x6c1f0e20, 0x1b836: 0x6c093420, 0x1b837: 0x6cd5ac20, + 0x1b838: 0x6cf5a020, 0x1b839: 0x6cdf9620, 0x1b83a: 0x6d1e8220, 0x1b83b: 0x6d3fe820, + 0x1b83c: 0x6c334220, 0x1b83d: 0x6ca1b220, 0x1b83e: 0x6d34f220, 0x1b83f: 0x6d16b620, + // Block 0x6e1, offset 0x1b840 + 0x1b840: 0x6cd33220, 0x1b841: 0x6ca59420, 0x1b842: 0x6d09e820, 0x1b843: 0x6cd33420, + 0x1b844: 0x6cf86020, 0x1b845: 0x6c81a420, 0x1b846: 0x6c525820, 0x1b847: 0x6c7b8e20, + 0x1b848: 0x6ca1c620, 0x1b849: 0x6d34fe20, 0x1b84a: 0x6d008020, 0x1b84b: 0x6c88e820, + 0x1b84c: 0x6ce55220, 0x1b84d: 0x6c5a4820, 0x1b84e: 0x6c2e7020, 0x1b84f: 0x6c502820, + 0x1b850: 0x6c799e20, 0x1b851: 0x6c4ad420, 0x1b852: 0x6c525a20, 0x1b853: 0x6cf5a220, + 0x1b854: 0x6c68ce20, 0x1b855: 0x6cd5b820, 0x1b856: 0x6cd8fe20, 0x1b857: 0x6c54aa20, + 0x1b858: 0x6cbfa420, 0x1b859: 0x6d104220, 0x1b85a: 0x6c5ba820, 0x1b85b: 0x6c5b2420, + 0x1b85c: 0x6c1bfa20, 0x1b85d: 0x6c63b020, 0x1b85e: 0x6d149a20, 0x1b85f: 0x6d045e20, + 0x1b860: 0x6c48ec20, 0x1b861: 0x6c8c4c20, 0x1b862: 0x6c5a9220, 0x1b863: 0x6d3f3a20, + 0x1b864: 0x6d068e20, 0x1b865: 0x6c1b8a20, 0x1b866: 0x6cce4e20, 0x1b867: 0x6caa7c20, + 0x1b868: 0x6c524220, 0x1b869: 0x6c371020, 0x1b86a: 0x6c788e20, 0x1b86b: 0x6c305e20, + 0x1b86c: 0x6ce48820, 0x1b86d: 0x6c457c20, 0x1b86e: 0x6cc29020, 0x1b86f: 0x6cf94220, + 0x1b870: 0x6cb84a20, 0x1b871: 0x6d268c20, 0x1b872: 0x6cae5820, 0x1b873: 0x6c790020, + 0x1b874: 0x6c2a6420, 0x1b875: 0x6c5baa20, 0x1b876: 0x6c35fa20, 0x1b877: 0x6d003220, + 0x1b878: 0x6ce7c620, 0x1b879: 0x6d0be020, 0x1b87a: 0x6c764c20, 0x1b87b: 0x6c12ce20, + 0x1b87c: 0x6ca4e020, 0x1b87d: 0x6d282020, 0x1b87e: 0x6c984020, 0x1b87f: 0x6d1e2a20, + // Block 0x6e2, offset 0x1b880 + 0x1b880: 0x6d1e2220, 0x1b881: 0x6d24d420, 0x1b882: 0x6caf5220, 0x1b883: 0x6c7da020, + 0x1b884: 0x6cbb6a20, 0x1b885: 0x6d269420, 0x1b886: 0x6d230c20, 0x1b887: 0x6ce89420, + 0x1b888: 0x6c6bd820, 0x1b889: 0x6cf5e220, 0x1b88a: 0x6d304a20, 0x1b88b: 0x6c8c4e20, + 0x1b88c: 0x6ce3e020, 0x1b88d: 0x6c4e9620, 0x1b88e: 0x6c502a20, 0x1b88f: 0x6cbca820, + 0x1b890: 0x6ce3ea20, 0x1b891: 0x6c108220, 0x1b892: 0x6d172620, 0x1b893: 0x6cba4a20, + 0x1b894: 0x6c5b4c20, 0x1b895: 0x6cf5bc20, 0x1b896: 0x6c070020, 0x1b897: 0x6c975e20, + 0x1b898: 0x6d13e420, 0x1b899: 0x6c524820, 0x1b89a: 0x6cd95620, 0x1b89b: 0x6cc29420, + 0x1b89c: 0x6c1a6820, 0x1b89d: 0x6c7c3820, 0x1b89e: 0x6cf4d020, 0x1b89f: 0x6cf4d220, + 0x1b8a0: 0x6d1e9e20, 0x1b8a1: 0x6c83b620, 0x1b8a2: 0x6c89ae20, 0x1b8a3: 0x6c590e20, + 0x1b8a4: 0x6c230c20, 0x1b8a5: 0x6d175a20, 0x1b8a6: 0x6d269620, 0x1b8a7: 0x6c85c820, + 0x1b8a8: 0x6ca8e620, 0x1b8a9: 0x6ca4e620, 0x1b8aa: 0x6c360e20, 0x1b8ab: 0x6cc3b620, + 0x1b8ac: 0x6d080e20, 0x1b8ad: 0x6cb8c420, 0x1b8ae: 0x6cf4d420, 0x1b8af: 0x6c9fa420, + 0x1b8b0: 0x6c239a20, 0x1b8b1: 0x6c3a5220, 0x1b8b2: 0x6c069c20, 0x1b8b3: 0x6c344c20, + 0x1b8b4: 0x6c253420, 0x1b8b5: 0x6c171220, 0x1b8b6: 0x6c9af220, 0x1b8b7: 0x6cca4e20, + 0x1b8b8: 0x6c61ea20, 0x1b8b9: 0x6c498820, 0x1b8ba: 0x6c497e20, 0x1b8bb: 0x6d042820, + 0x1b8bc: 0x6c2a0e20, 0x1b8bd: 0x6cb4e620, 0x1b8be: 0x6c797420, 0x1b8bf: 0x6ce4ec20, + // Block 0x6e3, offset 0x1b8c0 + 0x1b8c0: 0x6c94f220, 0x1b8c1: 0x6cf60a20, 0x1b8c2: 0x6c76d220, 0x1b8c3: 0x6c4bc020, + 0x1b8c4: 0x6ca6a020, 0x1b8c5: 0x6cbe7620, 0x1b8c6: 0x6c1da020, 0x1b8c7: 0x6c339820, + 0x1b8c8: 0x6c4cb620, 0x1b8c9: 0x6d2d7420, 0x1b8ca: 0x6c6da820, 0x1b8cb: 0x6ced0420, + 0x1b8cc: 0x6d24ea20, 0x1b8cd: 0x6c6c4220, 0x1b8ce: 0x6c620020, 0x1b8cf: 0x6c7f9620, + 0x1b8d0: 0x6d231020, 0x1b8d1: 0x6c5dca20, 0x1b8d2: 0x6c512620, 0x1b8d3: 0x6cc2da20, + 0x1b8d4: 0x6cdfdc20, 0x1b8d5: 0x6ce3ec20, 0x1b8d6: 0x6ce3f420, 0x1b8d7: 0x6ca81620, + 0x1b8d8: 0x6cee0e20, 0x1b8d9: 0x6c21b420, 0x1b8da: 0x6c54bc20, 0x1b8db: 0x6c5cc020, + 0x1b8dc: 0x6cf5e420, 0x1b8dd: 0x6c16ea20, 0x1b8de: 0x6d02ca20, 0x1b8df: 0x6ceefe20, + 0x1b8e0: 0x6c5bc020, 0x1b8e1: 0x6c363420, 0x1b8e2: 0x6cdd6620, 0x1b8e3: 0x6d3fee20, + 0x1b8e4: 0x6c648420, 0x1b8e5: 0x6d1e3620, 0x1b8e6: 0x6c2d4e20, 0x1b8e7: 0x6c723c20, + 0x1b8e8: 0x6c11ce20, 0x1b8e9: 0x6c19fc20, 0x1b8ea: 0x6c2a6e20, 0x1b8eb: 0x6c072220, + 0x1b8ec: 0x6cbcb420, 0x1b8ed: 0x6c119420, 0x1b8ee: 0x6c287a20, 0x1b8ef: 0x6c498020, + 0x1b8f0: 0x6c34f420, 0x1b8f1: 0x6ca4f820, 0x1b8f2: 0x6d283220, 0x1b8f3: 0x6cfdea20, + 0x1b8f4: 0x6d3c8420, 0x1b8f5: 0x6c2ea220, 0x1b8f6: 0x6c59c420, 0x1b8f7: 0x6c217e20, + 0x1b8f8: 0x6cbf2220, 0x1b8f9: 0x6cc54c20, 0x1b8fa: 0x6d037220, 0x1b8fb: 0x6c12e820, + 0x1b8fc: 0x6c0b3e20, 0x1b8fd: 0x6c9fac20, 0x1b8fe: 0x6d3f8a20, 0x1b8ff: 0x6ce32220, + // Block 0x6e4, offset 0x1b900 + 0x1b900: 0x6cbc2620, 0x1b901: 0x6c1db820, 0x1b902: 0x6c073020, 0x1b903: 0x6d079820, + 0x1b904: 0x6cee8620, 0x1b905: 0x6c43ea20, 0x1b906: 0x6cb8ee20, 0x1b907: 0x6cefc020, + 0x1b908: 0x6d236a20, 0x1b909: 0x6d212420, 0x1b90a: 0x6c099a20, 0x1b90b: 0x6d079a20, + 0x1b90c: 0x6c592020, 0x1b90d: 0x6c9fb620, 0x1b90e: 0x6c099c20, 0x1b90f: 0x6d17e220, + 0x1b910: 0x6c9e2420, 0x1b911: 0x6d1e3820, 0x1b912: 0x6c768820, 0x1b913: 0x6c296620, + 0x1b914: 0x6d19e020, 0x1b915: 0x6c363620, 0x1b916: 0x6c18c620, 0x1b917: 0x6c998a20, + 0x1b918: 0x6cb86820, 0x1b919: 0x6c78b820, 0x1b91a: 0x6d214820, 0x1b91b: 0x6c00a820, + 0x1b91c: 0x6cbcc020, 0x1b91d: 0x6d0d7e20, 0x1b91e: 0x6caaf620, 0x1b91f: 0x6c41dc20, + 0x1b920: 0x6d283420, 0x1b921: 0x6d3ff020, 0x1b922: 0x6cc9c220, 0x1b923: 0x6c839620, + 0x1b924: 0x6c3bd820, 0x1b925: 0x6d1d6620, 0x1b926: 0x6c7cf820, 0x1b927: 0x6c7cfa20, + 0x1b928: 0x6cc3d820, 0x1b929: 0x6c459420, 0x1b92a: 0x6d27ae20, 0x1b92b: 0x6cdaca20, + 0x1b92c: 0x6cdae420, 0x1b92d: 0x6cb5f820, 0x1b92e: 0x6d110e20, 0x1b92f: 0x6cd96020, + 0x1b930: 0x6c5a6c20, 0x1b931: 0x6c604e20, 0x1b932: 0x6c478c20, 0x1b933: 0x6c726220, + 0x1b934: 0x6c20ae20, 0x1b935: 0x6ca6aa20, 0x1b936: 0x6d00b620, 0x1b937: 0x6c766020, + 0x1b938: 0x6d332a20, 0x1b939: 0x6d1e4820, 0x1b93a: 0x6c12ae20, 0x1b93b: 0x6d0a9a20, + 0x1b93c: 0x6cd0aa20, 0x1b93d: 0x6c0f1020, 0x1b93e: 0x6c768e20, 0x1b93f: 0x6d262820, + // Block 0x6e5, offset 0x1b940 + 0x1b940: 0x6cf89e20, 0x1b941: 0x6c5d3420, 0x1b942: 0x6d1e5020, 0x1b943: 0x6d102420, + 0x1b944: 0x6c862e20, 0x1b945: 0x6ccaaa20, 0x1b946: 0x6ce1d420, 0x1b947: 0x6d19f220, + 0x1b948: 0x6c224e20, 0x1b949: 0x6d06f220, 0x1b94a: 0x6cba5820, 0x1b94b: 0x6cdf7c20, + 0x1b94c: 0x6c599420, 0x1b94d: 0x6d283a20, 0x1b94e: 0x6cd0ac20, 0x1b94f: 0x6ca03820, + 0x1b950: 0x6c463020, 0x1b951: 0x6ccf5020, 0x1b952: 0x6c23a420, 0x1b953: 0x6cb15820, + 0x1b954: 0x6ca29820, 0x1b955: 0x6ca2a020, 0x1b956: 0x6c4c7620, 0x1b957: 0x6c1c5620, + 0x1b958: 0x6c11d420, 0x1b959: 0x6c11a620, 0x1b95a: 0x6c119c20, 0x1b95b: 0x6c24da20, + 0x1b95c: 0x6c9fc220, 0x1b95d: 0x6ce27e20, 0x1b95e: 0x6d2ec820, 0x1b95f: 0x6ce7ce20, + 0x1b960: 0x6c02d820, 0x1b961: 0x6cd6d620, 0x1b962: 0x6c97e820, 0x1b963: 0x6c499620, + 0x1b964: 0x6cc3ea20, 0x1b965: 0x6d2a8420, 0x1b966: 0x6c701620, 0x1b967: 0x6c5c1020, + 0x1b968: 0x6c765820, 0x1b969: 0x6c881220, 0x1b96a: 0x6cab9e20, 0x1b96b: 0x6cd96c20, + 0x1b96c: 0x6cbd8e20, 0x1b96d: 0x6d1b7020, 0x1b96e: 0x6c93f220, 0x1b96f: 0x6cce0c20, + 0x1b970: 0x6cf0b820, 0x1b971: 0x6ce95220, 0x1b972: 0x6c976c20, 0x1b973: 0x6cb8fe20, + 0x1b974: 0x6ccf6220, 0x1b975: 0x6d1d9c20, 0x1b976: 0x6cbed620, 0x1b977: 0x6c773e20, + 0x1b978: 0x6c2c8e20, 0x1b979: 0x6d348e20, 0x1b97a: 0x6c90a220, 0x1b97b: 0x6c738220, + 0x1b97c: 0x6cb51c20, 0x1b97d: 0x6cb50c20, 0x1b97e: 0x6d23c020, 0x1b97f: 0x6cb2c220, + // Block 0x6e6, offset 0x1b980 + 0x1b980: 0x6c89f620, 0x1b981: 0x6c23da20, 0x1b982: 0x6d1eae20, 0x1b983: 0x6c1cd620, + 0x1b984: 0x6d36aa20, 0x1b985: 0x6ce7d020, 0x1b986: 0x6c197a20, 0x1b987: 0x6cb7c020, + 0x1b988: 0x6cc12020, 0x1b989: 0x6caebc20, 0x1b98a: 0x6c075a20, 0x1b98b: 0x6c0cb820, + 0x1b98c: 0x6cbf5c20, 0x1b98d: 0x6c686a20, 0x1b98e: 0x6d2b8a20, 0x1b98f: 0x6c1c4220, + 0x1b990: 0x6c883620, 0x1b991: 0x6cb2cc20, 0x1b992: 0x6c7d0c20, 0x1b993: 0x6c5c1220, + 0x1b994: 0x6cbbf020, 0x1b995: 0x6c1a3620, 0x1b996: 0x6d1b7a20, 0x1b997: 0x6d1b7c20, + 0x1b998: 0x6cf80620, 0x1b999: 0x6cf6ba20, 0x1b99a: 0x6c28a820, 0x1b99b: 0x6ce00220, + 0x1b99c: 0x6c34a220, 0x1b99d: 0x6c335e20, 0x1b99e: 0x6c335a20, 0x1b99f: 0x6cdaf820, + 0x1b9a0: 0x6c74b620, 0x1b9a1: 0x6c130e20, 0x1b9a2: 0x6cff0220, 0x1b9a3: 0x6c385a20, + 0x1b9a4: 0x6c3be420, 0x1b9a5: 0x6c817220, 0x1b9a6: 0x6c81da20, 0x1b9a7: 0x6c1cd820, + 0x1b9a8: 0x6c4db820, 0x1b9a9: 0x6cb7d220, 0x1b9aa: 0x6cfb7c20, 0x1b9ab: 0x6c9fc420, + 0x1b9ac: 0x6c6e2a20, 0x1b9ad: 0x6c8a7420, 0x1b9ae: 0x6cf46420, 0x1b9af: 0x6c11da20, + 0x1b9b0: 0x6c749020, 0x1b9b1: 0x6c245420, 0x1b9b2: 0x6cfd0820, 0x1b9b3: 0x6ce06e20, + 0x1b9b4: 0x6cd12220, 0x1b9b5: 0x6caf9820, 0x1b9b6: 0x6d188e20, 0x1b9b7: 0x6c1f7420, + 0x1b9b8: 0x6cfad620, 0x1b9b9: 0x6ca4c020, 0x1b9ba: 0x6c28ac20, 0x1b9bb: 0x6ce07420, + 0x1b9bc: 0x6c6e2c20, 0x1b9bd: 0x6cd93220, 0x1b9be: 0x6c4f0220, 0x1b9bf: 0x6c693e20, + // Block 0x6e7, offset 0x1b9c0 + 0x1b9c0: 0x6cf0cc20, 0x1b9c1: 0x6d07cc20, 0x1b9c2: 0x6c303620, 0x1b9c3: 0x6cbdb020, + 0x1b9c4: 0x6cbd9e20, 0x1b9c5: 0x6c728a20, 0x1b9c6: 0x6c12b220, 0x1b9c7: 0x6c791020, + 0x1b9c8: 0x6d021420, 0x1b9c9: 0x6d1bfe20, 0x1b9ca: 0x6c02ea20, 0x1b9cb: 0x6c99ba20, + 0x1b9cc: 0x6d189020, 0x1b9cd: 0x6c8c3020, 0x1b9ce: 0x6ccb5420, 0x1b9cf: 0x6c75e420, + 0x1b9d0: 0x6c57f220, 0x1b9d1: 0x6c9afe20, 0x1b9d2: 0x6c803c20, 0x1b9d3: 0x6c00ca20, + 0x1b9d4: 0x6c8c3220, 0x1b9d5: 0x6d0c3c20, 0x1b9d6: 0x6c7e2620, 0x1b9d7: 0x6cfa4a20, + 0x1b9d8: 0x6c1c8420, 0x1b9d9: 0x6d228e20, 0x1b9da: 0x6d1b8820, 0x1b9db: 0x6c270e20, + 0x1b9dc: 0x6c9be420, 0x1b9dd: 0x6c00d820, 0x1b9de: 0x6c9b4a20, 0x1b9df: 0x6c337020, + 0x1b9e0: 0x6cb65c20, 0x1b9e1: 0x6ca0ac20, 0x1b9e2: 0x6c7fbe20, 0x1b9e3: 0x6c9b0020, + 0x1b9e4: 0x6c1de620, 0x1b9e5: 0x6d370220, 0x1b9e6: 0x6cab1620, 0x1b9e7: 0x6cab1820, + 0x1b9e8: 0x6d0c3420, 0x1b9e9: 0x6d103420, 0x1b9ea: 0x6c0f8a20, 0x1b9eb: 0x6d372820, + 0x1b9ec: 0x6c7c0c20, 0x1b9ed: 0x6c7bd220, 0x1b9ee: 0x6d1ff820, 0x1b9ef: 0x6c3db220, + 0x1b9f0: 0x6c8eb420, 0x1b9f1: 0x6c9ef020, 0x1b9f2: 0x6c1a5420, 0x1b9f3: 0x6c5cb020, + 0x1b9f4: 0x6c163820, 0x1b9f5: 0x6c9bea20, 0x1b9f6: 0x6c804a20, 0x1b9f7: 0x6c57fa20, + 0x1b9f8: 0x6d083620, 0x1b9f9: 0x6cc51a20, 0x1b9fa: 0x6c164020, 0x1b9fb: 0x6c62b820, + 0x1b9fc: 0x6c72ca20, 0x1b9fd: 0x6c583e20, 0x1b9fe: 0x6ccf8820, 0x1b9ff: 0x6d195a20, + // Block 0x6e8, offset 0x1ba00 + 0x1ba00: 0x6c893820, 0x1ba01: 0x6ca44020, 0x1ba02: 0x6c9cb020, 0x1ba03: 0x6ce18c20, + 0x1ba04: 0x6c751a20, 0x1ba05: 0x6c42b020, 0x1ba06: 0x6c42b220, 0x1ba07: 0x6d3c5220, + 0x1ba08: 0x6c436020, 0x1ba09: 0x6d266e20, 0x1ba0a: 0x6cf49820, 0x1ba0b: 0x6c645a20, + 0x1ba0c: 0x6d056420, 0x1ba0d: 0x6cd59420, 0x1ba0e: 0x6cc65020, 0x1ba0f: 0x6cf83820, + 0x1ba10: 0x6c19b220, 0x1ba11: 0x6cf2a620, 0x1ba12: 0x6c6bb820, 0x1ba13: 0x6c436e20, + 0x1ba14: 0x6c646c20, 0x1ba15: 0x6cbaa020, 0x1ba16: 0x6c5da020, 0x1ba17: 0x6cbaa220, + 0x1ba18: 0x6d2e4a20, 0x1ba19: 0x6c306e20, 0x1ba1a: 0x6cb81220, 0x1ba1b: 0x6c63b620, + 0x1ba1c: 0x6c2e9220, 0x1ba1d: 0x6d2b5e20, 0x1ba1e: 0x6c63be20, 0x1ba1f: 0x6c614420, + 0x1ba20: 0x6d33de20, 0x1ba21: 0x6c76b020, 0x1ba22: 0x6c603420, 0x1ba23: 0x6c7c8620, + 0x1ba24: 0x6c414020, 0x1ba25: 0x6c2ace20, 0x1ba26: 0x6d2e6820, 0x1ba27: 0x6cbaca20, + 0x1ba28: 0x6c439e20, 0x1ba29: 0x6c65bc20, 0x1ba2a: 0x6c6b0620, 0x1ba2b: 0x6d238e20, + 0x1ba2c: 0x6c65be20, 0x1ba2d: 0x6d0dc820, 0x1ba2e: 0x6c92a020, 0x1ba2f: 0x6c54f620, + 0x1ba30: 0x6d2e7e20, 0x1ba31: 0x6cf8da20, 0x1ba32: 0x6cf8ec20, 0x1ba33: 0x6c219a20, + 0x1ba34: 0x6c279420, 0x1ba35: 0x6cc20420, 0x1ba36: 0x6c563820, 0x1ba37: 0x6c563a20, + 0x1ba38: 0x6c563c20, 0x1ba39: 0x6c35c820, 0x1ba3a: 0x6cd30c20, 0x1ba3b: 0x6ce3d220, + 0x1ba3c: 0x6c992620, 0x1ba3d: 0x6c566620, 0x1ba3e: 0x6c858c20, 0x1ba3f: 0x6c39a620, + // Block 0x6e9, offset 0x1ba40 + 0x1ba40: 0x6cdd4e20, 0x1ba41: 0x6c0b2e20, 0x1ba42: 0x6c2d4220, 0x1ba43: 0x6c6ed820, + 0x1ba44: 0x6cce3420, 0x1ba45: 0x6d14c020, 0x1ba46: 0x6d15dc20, 0x1ba47: 0x6ccd7a20, + 0x1ba48: 0x6c568c20, 0x1ba49: 0x6c3a0220, 0x1ba4a: 0x6d0d8020, 0x1ba4b: 0x6cd43620, + 0x1ba4c: 0x6cd48e20, 0x1ba4d: 0x6c10fe20, 0x1ba4e: 0x6d2bc020, 0x1ba4f: 0x6cbff220, + 0x1ba50: 0x6c820e20, 0x1ba51: 0x6cb3fe20, 0x1ba52: 0x6c031020, 0x1ba53: 0x6c26e020, + 0x1ba54: 0x6cc61020, 0x1ba55: 0x6c390220, 0x1ba56: 0x6cc83020, 0x1ba57: 0x6d292a20, + 0x1ba58: 0x6cea9620, 0x1ba59: 0x6d2f1e20, 0x1ba5a: 0x6c2df620, 0x1ba5b: 0x6c776620, + 0x1ba5c: 0x6d207220, 0x1ba5d: 0x6c7a1820, 0x1ba5e: 0x6c41c420, 0x1ba5f: 0x6ccf9e20, + 0x1ba60: 0x6c137820, 0x1ba61: 0x6cea9820, 0x1ba62: 0x6c475420, 0x1ba63: 0x6c79d620, + 0x1ba64: 0x6cf4a220, 0x1ba65: 0x6c2a9420, 0x1ba66: 0x6cb89820, 0x1ba67: 0x6d343620, + 0x1ba68: 0x6cc5b620, 0x1ba69: 0x6c7de620, 0x1ba6a: 0x6c9ac020, 0x1ba6b: 0x6ccade20, + 0x1ba6c: 0x6d0f7420, 0x1ba6d: 0x6ca97820, 0x1ba6e: 0x6c051220, 0x1ba6f: 0x6c17e620, + 0x1ba70: 0x6cc53620, 0x1ba71: 0x6cf57020, 0x1ba72: 0x6cb97220, 0x1ba73: 0x6c047020, + 0x1ba74: 0x6c639c20, 0x1ba75: 0x6d20b220, 0x1ba76: 0x6c3dda20, 0x1ba77: 0x6c02c220, + 0x1ba78: 0x6cf57e20, 0x1ba79: 0x6caf2a20, 0x1ba7a: 0x6d34e620, 0x1ba7b: 0x6d357820, + 0x1ba7c: 0x6c35d220, 0x1ba7d: 0x6c2a9620, 0x1ba7e: 0x6d2f8420, 0x1ba7f: 0x6c19bc20, + // Block 0x6ea, offset 0x1ba80 + 0x1ba80: 0x6c618420, 0x1ba81: 0x6d0d3c20, 0x1ba82: 0x6c7bb820, 0x1ba83: 0x6c0b6e20, + 0x1ba84: 0x6c173220, 0x1ba85: 0x6c704e20, 0x1ba86: 0x6cf1cc20, 0x1ba87: 0x6c551e20, + 0x1ba88: 0x6d267e20, 0x1ba89: 0x6c73de20, 0x1ba8a: 0x6c039a20, 0x1ba8b: 0x6cbe0420, + 0x1ba8c: 0x6c282020, 0x1ba8d: 0x6d331820, 0x1ba8e: 0x6d27d820, 0x1ba8f: 0x6cecc820, + 0x1ba90: 0x6ca54820, 0x1ba91: 0x6d168820, 0x1ba92: 0x6cd49e20, 0x1ba93: 0x6d3b5420, + 0x1ba94: 0x6cb3d020, 0x1ba95: 0x6ce7e620, 0x1ba96: 0x6c30da20, 0x1ba97: 0x6c777e20, + 0x1ba98: 0x6d301220, 0x1ba99: 0x6cb3d220, 0x1ba9a: 0x6c3f3620, 0x1ba9b: 0x6cad3220, + 0x1ba9c: 0x6c036020, 0x1ba9d: 0x6c029c20, 0x1ba9e: 0x6d2aa420, 0x1ba9f: 0x6ce94820, + 0x1baa0: 0x6c79b220, 0x1baa1: 0x6c94d020, 0x1baa2: 0x6cbb3820, 0x1baa3: 0x6d287a20, + 0x1baa4: 0x6c565620, 0x1baa5: 0x6c063020, 0x1baa6: 0x6c0dc420, 0x1baa7: 0x6d34f420, + 0x1baa8: 0x6cae5620, 0x1baa9: 0x6cdf8c20, 0x1baaa: 0x6c106c20, 0x1baab: 0x6caf3620, + 0x1baac: 0x6cdf1820, 0x1baad: 0x6d118c20, 0x1baae: 0x6d31b820, 0x1baaf: 0x6d2bc620, + 0x1bab0: 0x6d0f4820, 0x1bab1: 0x6c063220, 0x1bab2: 0x6c508c20, 0x1bab3: 0x6ca62820, + 0x1bab4: 0x6d12ce20, 0x1bab5: 0x6c2bda20, 0x1bab6: 0x6c1bee20, 0x1bab7: 0x6caf3820, + 0x1bab8: 0x6c632220, 0x1bab9: 0x6ca0a820, 0x1baba: 0x6c9a7620, 0x1babb: 0x6c185a20, + 0x1babc: 0x6d0ad220, 0x1babd: 0x6c1d6420, 0x1babe: 0x6cc0e420, 0x1babf: 0x6c9f9420, + // Block 0x6eb, offset 0x1bac0 + 0x1bac0: 0x6c1f1020, 0x1bac1: 0x6c632a20, 0x1bac2: 0x6c3dee20, 0x1bac3: 0x6d2c7220, + 0x1bac4: 0x6d3a5c20, 0x1bac5: 0x6c27bc20, 0x1bac6: 0x6c146020, 0x1bac7: 0x6ca2c420, + 0x1bac8: 0x6ca6ec20, 0x1bac9: 0x6c7e3e20, 0x1baca: 0x6c3f4220, 0x1bacb: 0x6cad3420, + 0x1bacc: 0x6c04ea20, 0x1bacd: 0x6cabee20, 0x1bace: 0x6c8b9a20, 0x1bacf: 0x6ca2d020, + 0x1bad0: 0x6c48d820, 0x1bad1: 0x6cb97420, 0x1bad2: 0x6c71fc20, 0x1bad3: 0x6cde2e20, + 0x1bad4: 0x6c036820, 0x1bad5: 0x6ceaac20, 0x1bad6: 0x6ceaae20, 0x1bad7: 0x6c02a020, + 0x1bad8: 0x6c705a20, 0x1bad9: 0x6d3cf020, 0x1bada: 0x6caca020, 0x1badb: 0x6d2f5a20, + 0x1badc: 0x6c043c20, 0x1badd: 0x6c043220, 0x1bade: 0x6c2bdc20, 0x1badf: 0x6ca62420, + 0x1bae0: 0x6c720e20, 0x1bae1: 0x6c7de820, 0x1bae2: 0x6c903220, 0x1bae3: 0x6c656420, + 0x1bae4: 0x6cb83420, 0x1bae5: 0x6d1d7e20, 0x1bae6: 0x6c7f8c20, 0x1bae7: 0x6ca8f620, + 0x1bae8: 0x6c0e5020, 0x1bae9: 0x6d2aa820, 0x1baea: 0x6cb8bc20, 0x1baeb: 0x6c522e20, + 0x1baec: 0x6c7dea20, 0x1baed: 0x6cd33620, 0x1baee: 0x6c6a8e20, 0x1baef: 0x6d331e20, + 0x1baf0: 0x6ca8ee20, 0x1baf1: 0x6c45da20, 0x1baf2: 0x6c45de20, 0x1baf3: 0x6cc2ca20, + 0x1baf4: 0x6cd68020, 0x1baf5: 0x6c25a620, 0x1baf6: 0x6d288a20, 0x1baf7: 0x6c77a020, + 0x1baf8: 0x6d149c20, 0x1baf9: 0x6d008220, 0x1bafa: 0x6c12d020, 0x1bafb: 0x6c5a9420, + 0x1bafc: 0x6cb1ea20, 0x1bafd: 0x6d3b6620, 0x1bafe: 0x6cd41020, 0x1baff: 0x6ca2d620, + // Block 0x6ec, offset 0x1bb00 + 0x1bb00: 0x6c03fc20, 0x1bb01: 0x6c1b0c20, 0x1bb02: 0x6c48ac20, 0x1bb03: 0x6d359c20, + 0x1bb04: 0x6c7dec20, 0x1bb05: 0x6c348020, 0x1bb06: 0x6c348220, 0x1bb07: 0x6d350020, + 0x1bb08: 0x6cbcaa20, 0x1bb09: 0x6c01a420, 0x1bb0a: 0x6ca9f220, 0x1bb0b: 0x6d322020, + 0x1bb0c: 0x6c43ca20, 0x1bb0d: 0x6c698820, 0x1bb0e: 0x6c7ae620, 0x1bb0f: 0x6c306020, + 0x1bb10: 0x6ca2d820, 0x1bb11: 0x6ce55420, 0x1bb12: 0x6c8ad220, 0x1bb13: 0x6d2bca20, + 0x1bb14: 0x6c937c20, 0x1bb15: 0x6c2e7220, 0x1bb16: 0x6cebca20, 0x1bb17: 0x6c73fa20, + 0x1bb18: 0x6c8b9420, 0x1bb19: 0x6c71b020, 0x1bb1a: 0x6d35b820, 0x1bb1b: 0x6c943420, + 0x1bb1c: 0x6d0b8620, 0x1bb1d: 0x6cf27c20, 0x1bb1e: 0x6cde3420, 0x1bb1f: 0x6d008420, + 0x1bb20: 0x6ca49c20, 0x1bb21: 0x6c292820, 0x1bb22: 0x6c68d020, 0x1bb23: 0x6d329820, + 0x1bb24: 0x6c612a20, 0x1bb25: 0x6c5a9620, 0x1bb26: 0x6cfb3420, 0x1bb27: 0x6d24be20, + 0x1bb28: 0x6c002020, 0x1bb29: 0x6ceab420, 0x1bb2a: 0x6caab820, 0x1bb2b: 0x6c261c20, + 0x1bb2c: 0x6c0ed420, 0x1bb2d: 0x6c44fa20, 0x1bb2e: 0x6ce3be20, 0x1bb2f: 0x6d322c20, + 0x1bb30: 0x6c19dc20, 0x1bb31: 0x6cc94220, 0x1bb32: 0x6cc94420, 0x1bb33: 0x6c793220, + 0x1bb34: 0x6c9a5020, 0x1bb35: 0x6c906220, 0x1bb36: 0x6c706820, 0x1bb37: 0x6cae9020, + 0x1bb38: 0x6c657a20, 0x1bb39: 0x6d172820, 0x1bb3a: 0x6ce6ba20, 0x1bb3b: 0x6cccce20, + 0x1bb3c: 0x6cc83a20, 0x1bb3d: 0x6cecf820, 0x1bb3e: 0x6d008a20, 0x1bb3f: 0x6c138820, + // Block 0x6ed, offset 0x1bb40 + 0x1bb40: 0x6c3ca020, 0x1bb41: 0x6c68da20, 0x1bb42: 0x6cf43c20, 0x1bb43: 0x6c75a420, + 0x1bb44: 0x6c6fe820, 0x1bb45: 0x6ce7b220, 0x1bb46: 0x6c7da220, 0x1bb47: 0x6c5dac20, + 0x1bb48: 0x6ce89620, 0x1bb49: 0x6d3cf620, 0x1bb4a: 0x6cb3d620, 0x1bb4b: 0x6c938820, + 0x1bb4c: 0x6c033a20, 0x1bb4d: 0x6c4e9820, 0x1bb4e: 0x6cce6020, 0x1bb4f: 0x6ca7da20, + 0x1bb50: 0x6c72e420, 0x1bb51: 0x6d2b4620, 0x1bb52: 0x6cd5ba20, 0x1bb53: 0x6d127620, + 0x1bb54: 0x6c741220, 0x1bb55: 0x6c103620, 0x1bb56: 0x6cecd020, 0x1bb57: 0x6c108420, + 0x1bb58: 0x6d421620, 0x1bb59: 0x6d172a20, 0x1bb5a: 0x6d2ce820, 0x1bb5b: 0x6c937e20, + 0x1bb5c: 0x6cd9a420, 0x1bb5d: 0x6ceab620, 0x1bb5e: 0x6c813a20, 0x1bb5f: 0x6cdce620, + 0x1bb60: 0x6c052220, 0x1bb61: 0x6c657c20, 0x1bb62: 0x6c590220, 0x1bb63: 0x6c29d420, + 0x1bb64: 0x6cf13c20, 0x1bb65: 0x6ced7820, 0x1bb66: 0x6cbd6e20, 0x1bb67: 0x6caf0220, + 0x1bb68: 0x6ccf2c20, 0x1bb69: 0x6c8af820, 0x1bb6a: 0x6c9f4620, 0x1bb6b: 0x6c9aca20, + 0x1bb6c: 0x6c3f5a20, 0x1bb6d: 0x6c041e20, 0x1bb6e: 0x6c723e20, 0x1bb6f: 0x6c29cc20, + 0x1bb70: 0x6cf2b420, 0x1bb71: 0x6c003e20, 0x1bb72: 0x6c731c20, 0x1bb73: 0x6d26a420, + 0x1bb74: 0x6d3fec20, 0x1bb75: 0x6c186420, 0x1bb76: 0x6c20c820, 0x1bb77: 0x6c6ab620, + 0x1bb78: 0x6ce85420, 0x1bb79: 0x6c07ae20, 0x1bb7a: 0x6ca33220, 0x1bb7b: 0x6ca72020, + 0x1bb7c: 0x6cc90e20, 0x1bb7d: 0x6d423620, 0x1bb7e: 0x6cf2e220, 0x1bb7f: 0x6cf5e820, + // Block 0x6ee, offset 0x1bb80 + 0x1bb80: 0x6cfa9820, 0x1bb81: 0x6c19e620, 0x1bb82: 0x6c2cc420, 0x1bb83: 0x6ccae020, + 0x1bb84: 0x6c94d220, 0x1bb85: 0x6cbec620, 0x1bb86: 0x6c427820, 0x1bb87: 0x6c342a20, + 0x1bb88: 0x6cd46020, 0x1bb89: 0x6c2e1820, 0x1bb8a: 0x6cb3d820, 0x1bb8b: 0x6c2bf020, + 0x1bb8c: 0x6d2f0420, 0x1bb8d: 0x6c5d2420, 0x1bb8e: 0x6c613620, 0x1bb8f: 0x6ce1c220, + 0x1bb90: 0x6cb82820, 0x1bb91: 0x6cb5c420, 0x1bb92: 0x6cabfa20, 0x1bb93: 0x6cd4c820, + 0x1bb94: 0x6cb8e220, 0x1bb95: 0x6c8ce420, 0x1bb96: 0x6d125c20, 0x1bb97: 0x6d0b9c20, + 0x1bb98: 0x6c742420, 0x1bb99: 0x6d32b020, 0x1bb9a: 0x6c899020, 0x1bb9b: 0x6c48b020, + 0x1bb9c: 0x6d175c20, 0x1bb9d: 0x6c5dc220, 0x1bb9e: 0x6ccd8220, 0x1bb9f: 0x6d332020, + 0x1bba0: 0x6c361020, 0x1bba1: 0x6c112a20, 0x1bba2: 0x6ce09420, 0x1bba3: 0x6c181e20, + 0x1bba4: 0x6c0db020, 0x1bba5: 0x6c69fa20, 0x1bba6: 0x6ce3ee20, 0x1bba7: 0x6c79a420, + 0x1bba8: 0x6ce99020, 0x1bba9: 0x6d0d6620, 0x1bbaa: 0x6c262220, 0x1bbab: 0x6d387420, + 0x1bbac: 0x6c708a20, 0x1bbad: 0x6ce53420, 0x1bbae: 0x6cb98820, 0x1bbaf: 0x6c791820, + 0x1bbb0: 0x6c040020, 0x1bbb1: 0x6cabd420, 0x1bbb2: 0x6c69fc20, 0x1bbb3: 0x6c91ba20, + 0x1bbb4: 0x6c48cc20, 0x1bbb5: 0x6ca04e20, 0x1bbb6: 0x6c454620, 0x1bbb7: 0x6d35e020, + 0x1bbb8: 0x6c283420, 0x1bbb9: 0x6c9c2a20, 0x1bbba: 0x6c11f220, 0x1bbbb: 0x6ccaa620, + 0x1bbbc: 0x6c498220, 0x1bbbd: 0x6caf1020, 0x1bbbe: 0x6d261c20, 0x1bbbf: 0x6caaee20, + // Block 0x6ef, offset 0x1bbc0 + 0x1bbc0: 0x6c659020, 0x1bbc1: 0x6d32c420, 0x1bbc2: 0x6c6f7220, 0x1bbc3: 0x6c659220, + 0x1bbc4: 0x6d212620, 0x1bbc5: 0x6d0ca820, 0x1bbc6: 0x6c7c7820, 0x1bbc7: 0x6ca42620, + 0x1bbc8: 0x6c52a420, 0x1bbc9: 0x6cc74a20, 0x1bbca: 0x6cb09620, 0x1bbcb: 0x6cee8820, + 0x1bbcc: 0x6cc9c420, 0x1bbcd: 0x6d408820, 0x1bbce: 0x6d079c20, 0x1bbcf: 0x6c9e7620, + 0x1bbd0: 0x6ce32420, 0x1bbd1: 0x6ca7dc20, 0x1bbd2: 0x6c139c20, 0x1bbd3: 0x6cd38620, + 0x1bbd4: 0x6d3ff220, 0x1bbd5: 0x6d324220, 0x1bbd6: 0x6d13f220, 0x1bbd7: 0x6d0a1020, + 0x1bbd8: 0x6d1df620, 0x1bbd9: 0x6c0af220, 0x1bbda: 0x6d0fb620, 0x1bbdb: 0x6c592220, + 0x1bbdc: 0x6d0d8220, 0x1bbdd: 0x6d296a20, 0x1bbde: 0x6c018620, 0x1bbdf: 0x6d059a20, + 0x1bbe0: 0x6d0bac20, 0x1bbe1: 0x6cf2ee20, 0x1bbe2: 0x6c784c20, 0x1bbe3: 0x6c1fb420, + 0x1bbe4: 0x6c600020, 0x1bbe5: 0x6ce3fa20, 0x1bbe6: 0x6c7e5e20, 0x1bbe7: 0x6c7e7a20, + 0x1bbe8: 0x6c18c820, 0x1bbe9: 0x6c762e20, 0x1bbea: 0x6c6f7420, 0x1bbeb: 0x6c6f7c20, + 0x1bbec: 0x6ce8ae20, 0x1bbed: 0x6c6a1220, 0x1bbee: 0x6c5ab420, 0x1bbef: 0x6c44b420, + 0x1bbf0: 0x6c1d5020, 0x1bbf1: 0x6cfed620, 0x1bbf2: 0x6c2ea420, 0x1bbf3: 0x6d004020, + 0x1bbf4: 0x6d256220, 0x1bbf5: 0x6cb98a20, 0x1bbf6: 0x6d127c20, 0x1bbf7: 0x6c139e20, + 0x1bbf8: 0x6d2bda20, 0x1bbf9: 0x6c069e20, 0x1bbfa: 0x6d10f820, 0x1bbfb: 0x6cee8a20, + 0x1bbfc: 0x6c086a20, 0x1bbfd: 0x6c802820, 0x1bbfe: 0x6cf20c20, 0x1bbff: 0x6cbe1420, + // Block 0x6f0, offset 0x1bc00 + 0x1bc00: 0x6c14ca20, 0x1bc01: 0x6c439220, 0x1bc02: 0x6c90e420, 0x1bc03: 0x6d3ff420, + 0x1bc04: 0x6c44ce20, 0x1bc05: 0x6c68f220, 0x1bc06: 0x6c46b820, 0x1bc07: 0x6cbe1a20, + 0x1bc08: 0x6cc68420, 0x1bc09: 0x6cc3ca20, 0x1bc0a: 0x6c1d7420, 0x1bc0b: 0x6c1fb620, + 0x1bc0c: 0x6d2df620, 0x1bc0d: 0x6cdcf020, 0x1bc0e: 0x6cdcd420, 0x1bc0f: 0x6c0f1220, + 0x1bc10: 0x6c1f4e20, 0x1bc11: 0x6cc67420, 0x1bc12: 0x6c057a20, 0x1bc13: 0x6c25ba20, + 0x1bc14: 0x6ccaac20, 0x1bc15: 0x6c780620, 0x1bc16: 0x6d111020, 0x1bc17: 0x6c29dc20, + 0x1bc18: 0x6d33ee20, 0x1bc19: 0x6caa6620, 0x1bc1a: 0x6c7e4820, 0x1bc1b: 0x6c64b020, + 0x1bc1c: 0x6cd9b020, 0x1bc1d: 0x6cc0ae20, 0x1bc1e: 0x6c430820, 0x1bc1f: 0x6cfc1420, + 0x1bc20: 0x6cd78620, 0x1bc21: 0x6cca8020, 0x1bc22: 0x6c6d1420, 0x1bc23: 0x6c9edc20, + 0x1bc24: 0x6c365820, 0x1bc25: 0x6c20ce20, 0x1bc26: 0x6caafc20, 0x1bc27: 0x6cccea20, + 0x1bc28: 0x6cde5c20, 0x1bc29: 0x6d2c7e20, 0x1bc2a: 0x6ce10220, 0x1bc2b: 0x6cac6420, + 0x1bc2c: 0x6c048620, 0x1bc2d: 0x6c265020, 0x1bc2e: 0x6c863020, 0x1bc2f: 0x6ce1d620, + 0x1bc30: 0x6c555c20, 0x1bc31: 0x6d365620, 0x1bc32: 0x6cebe220, 0x1bc33: 0x6c574220, + 0x1bc34: 0x6cb90220, 0x1bc35: 0x6cf20e20, 0x1bc36: 0x6cbb3e20, 0x1bc37: 0x6ce4ac20, + 0x1bc38: 0x6d316220, 0x1bc39: 0x6c365a20, 0x1bc3a: 0x6d00ba20, 0x1bc3b: 0x6cab0220, + 0x1bc3c: 0x6cc2fc20, 0x1bc3d: 0x6c13e220, 0x1bc3e: 0x6d2ccc20, 0x1bc3f: 0x6c441020, + // Block 0x6f1, offset 0x1bc40 + 0x1bc40: 0x6cf44e20, 0x1bc41: 0x6c372420, 0x1bc42: 0x6ccf5220, 0x1bc43: 0x6c776820, + 0x1bc44: 0x6ccf5420, 0x1bc45: 0x6cd4e820, 0x1bc46: 0x6c042620, 0x1bc47: 0x6d111220, + 0x1bc48: 0x6c0d8020, 0x1bc49: 0x6cd9be20, 0x1bc4a: 0x6cdfae20, 0x1bc4b: 0x6cc97820, + 0x1bc4c: 0x6c15ca20, 0x1bc4d: 0x6cdd2a20, 0x1bc4e: 0x6c6f8020, 0x1bc4f: 0x6c1cd220, + 0x1bc50: 0x6c205620, 0x1bc51: 0x6c48d220, 0x1bc52: 0x6c0de620, 0x1bc53: 0x6c3cac20, + 0x1bc54: 0x6cd65620, 0x1bc55: 0x6c2c7e20, 0x1bc56: 0x6cb7ae20, 0x1bc57: 0x6cd9cc20, + 0x1bc58: 0x6d2cf820, 0x1bc59: 0x6c88c220, 0x1bc5a: 0x6c197c20, 0x1bc5b: 0x6c1ab820, + 0x1bc5c: 0x6c499820, 0x1bc5d: 0x6c928220, 0x1bc5e: 0x6c961420, 0x1bc5f: 0x6c90ee20, + 0x1bc60: 0x6d400020, 0x1bc61: 0x6c413420, 0x1bc62: 0x6c56b620, 0x1bc63: 0x6d2bea20, + 0x1bc64: 0x6c209420, 0x1bc65: 0x6ce19e20, 0x1bc66: 0x6c57ac20, 0x1bc67: 0x6c24dc20, + 0x1bc68: 0x6ca38420, 0x1bc69: 0x6ca07220, 0x1bc6a: 0x6c676820, 0x1bc6b: 0x6c4a7a20, + 0x1bc6c: 0x6d1cfc20, 0x1bc6d: 0x6d348020, 0x1bc6e: 0x6c026020, 0x1bc6f: 0x6d36ae20, + 0x1bc70: 0x6ca85c20, 0x1bc71: 0x6c97ea20, 0x1bc72: 0x6c163020, 0x1bc73: 0x6c79c220, + 0x1bc74: 0x6c1e6220, 0x1bc75: 0x6ccf6420, 0x1bc76: 0x6ce95420, 0x1bc77: 0x6c691420, + 0x1bc78: 0x6ca05620, 0x1bc79: 0x6ca06820, 0x1bc7a: 0x6d306c20, 0x1bc7b: 0x6c11fc20, + 0x1bc7c: 0x6c794820, 0x1bc7d: 0x6c0c0a20, 0x1bc7e: 0x6c67f620, 0x1bc7f: 0x6d19f420, + // Block 0x6f2, offset 0x1bc80 + 0x1bc80: 0x6c46ce20, 0x1bc81: 0x6cb90420, 0x1bc82: 0x6c8aa020, 0x1bc83: 0x6c608420, + 0x1bc84: 0x6d1bce20, 0x1bc85: 0x6c73b420, 0x1bc86: 0x6cb1d020, 0x1bc87: 0x6cb1ca20, + 0x1bc88: 0x6c813c20, 0x1bc89: 0x6c33ac20, 0x1bc8a: 0x6cfcfa20, 0x1bc8b: 0x6cc84420, + 0x1bc8c: 0x6c4b6620, 0x1bc8d: 0x6d297420, 0x1bc8e: 0x6d185020, 0x1bc8f: 0x6cfb7e20, + 0x1bc90: 0x6c198820, 0x1bc91: 0x6c198a20, 0x1bc92: 0x6cc94620, 0x1bc93: 0x6ca4ba20, + 0x1bc94: 0x6c53ca20, 0x1bc95: 0x6cd81620, 0x1bc96: 0x6c4ee020, 0x1bc97: 0x6c4a2620, + 0x1bc98: 0x6c266420, 0x1bc99: 0x6d420c20, 0x1bc9a: 0x6ca73420, 0x1bc9b: 0x6c8c2a20, + 0x1bc9c: 0x6d332c20, 0x1bc9d: 0x6c5ae420, 0x1bc9e: 0x6d3c4820, 0x1bc9f: 0x6c692820, + 0x1bca0: 0x6c615020, 0x1bca1: 0x6c126620, 0x1bca2: 0x6c283c20, 0x1bca3: 0x6c283e20, + 0x1bca4: 0x6c183220, 0x1bca5: 0x6c0e8820, 0x1bca6: 0x6c17ee20, 0x1bca7: 0x6c73b620, + 0x1bca8: 0x6c3f8020, 0x1bca9: 0x6c89d220, 0x1bcaa: 0x6c07c220, 0x1bcab: 0x6c3f8220, + 0x1bcac: 0x6cbc5820, 0x1bcad: 0x6c0e8a20, 0x1bcae: 0x6c25c620, 0x1bcaf: 0x6d3d7a20, + 0x1bcb0: 0x6d3bda20, 0x1bcb1: 0x6ceff020, 0x1bcb2: 0x6cb40e20, 0x1bcb3: 0x6cbe2220, + 0x1bcb4: 0x6c33a620, 0x1bcb5: 0x6ca73620, 0x1bcb6: 0x6c574420, 0x1bcb7: 0x6d00d820, + 0x1bcb8: 0x6c912e20, 0x1bcb9: 0x6c692a20, 0x1bcba: 0x6c249020, 0x1bcbb: 0x6cde8c20, + 0x1bcbc: 0x6c4f0420, 0x1bcbd: 0x6cbc5c20, 0x1bcbe: 0x6cf29a20, 0x1bcbf: 0x6c65d620, + // Block 0x6f3, offset 0x1bcc0 + 0x1bcc0: 0x6c41ea20, 0x1bcc1: 0x6d1db220, 0x1bcc2: 0x6c825620, 0x1bcc3: 0x6ca46e20, + 0x1bcc4: 0x6c91da20, 0x1bcc5: 0x6ccda820, 0x1bcc6: 0x6d3d7c20, 0x1bcc7: 0x6d2afa20, + 0x1bcc8: 0x6cb41420, 0x1bcc9: 0x6c21d620, 0x1bcca: 0x6c5f5220, 0x1bccb: 0x6c293420, + 0x1bccc: 0x6ccb5620, 0x1bccd: 0x6c126820, 0x1bcce: 0x6cbe8c20, 0x1bccf: 0x6cbe8420, + 0x1bcd0: 0x6c595220, 0x1bcd1: 0x6c6a3020, 0x1bcd2: 0x6cbd9420, 0x1bcd3: 0x6c7b0220, + 0x1bcd4: 0x6c27fa20, 0x1bcd5: 0x6d00dc20, 0x1bcd6: 0x6c761420, 0x1bcd7: 0x6cb06e20, + 0x1bcd8: 0x6c040620, 0x1bcd9: 0x6c02f220, 0x1bcda: 0x6c728c20, 0x1bcdb: 0x6d132620, + 0x1bcdc: 0x6c370620, 0x1bcdd: 0x6c9c2c20, 0x1bcde: 0x6cda2620, 0x1bcdf: 0x6c9c7a20, + 0x1bce0: 0x6c615420, 0x1bce1: 0x6cdf4820, 0x1bce2: 0x6d3da820, 0x1bce3: 0x6c29f220, + 0x1bce4: 0x6d040a20, 0x1bce5: 0x6c804420, 0x1bce6: 0x6c10da20, 0x1bce7: 0x6c71d820, + 0x1bce8: 0x6d129220, 0x1bce9: 0x6cc80620, 0x1bcea: 0x6d136820, 0x1bceb: 0x6d135a20, + 0x1bcec: 0x6ca65220, 0x1bced: 0x6cf31420, 0x1bcee: 0x6c60bc20, 0x1bcef: 0x6c0d8820, + 0x1bcf0: 0x6ca92420, 0x1bcf1: 0x6c43b420, 0x1bcf2: 0x6d370420, 0x1bcf3: 0x6d36de20, + 0x1bcf4: 0x6c7e1a20, 0x1bcf5: 0x6ca08620, 0x1bcf6: 0x6c66ec20, 0x1bcf7: 0x6d011020, + 0x1bcf8: 0x6c8b4c20, 0x1bcf9: 0x6cdfc020, 0x1bcfa: 0x6c042a20, 0x1bcfb: 0x6cda3020, + 0x1bcfc: 0x6c91e820, 0x1bcfd: 0x6c94ca20, 0x1bcfe: 0x6cc54220, 0x1bcff: 0x6ce2fe20, + // Block 0x6f4, offset 0x1bd00 + 0x1bd00: 0x6cac4c20, 0x1bd01: 0x6d103620, 0x1bd02: 0x6c834c20, 0x1bd03: 0x6c10dc20, + 0x1bd04: 0x6cd51420, 0x1bd05: 0x6d297a20, 0x1bd06: 0x6ca74220, 0x1bd07: 0x6cfc4020, + 0x1bd08: 0x6c75fa20, 0x1bd09: 0x6c5d6620, 0x1bd0a: 0x6c86f420, 0x1bd0b: 0x6c7ea420, + 0x1bd0c: 0x6c58e420, 0x1bd0d: 0x6d1cb620, 0x1bd0e: 0x6c917020, 0x1bd0f: 0x6c904420, + 0x1bd10: 0x6cb93a20, 0x1bd11: 0x6cb93c20, 0x1bd12: 0x6d297c20, 0x1bd13: 0x6cb94620, + 0x1bd14: 0x6c7fe620, 0x1bd15: 0x6cfafc20, 0x1bd16: 0x6d1c1e20, 0x1bd17: 0x6c9a3a20, + 0x1bd18: 0x6cc50820, 0x1bd19: 0x6c14e020, 0x1bd1a: 0x6d1d6c20, 0x1bd1b: 0x6c249820, + 0x1bd1c: 0x6d012420, 0x1bd1d: 0x6ccf8a20, 0x1bd1e: 0x6c957420, 0x1bd1f: 0x6c760820, + 0x1bd20: 0x6c9cb220, 0x1bd21: 0x6c84a620, 0x1bd22: 0x6d298220, 0x1bd23: 0x6c945820, + 0x1bd24: 0x6cdfc420, 0x1bd25: 0x6d416420, 0x1bd26: 0x6c876620, 0x1bd27: 0x6c2cf820, + 0x1bd28: 0x6cec0020, 0x1bd29: 0x6c293c20, 0x1bd2a: 0x6c697420, 0x1bd2b: 0x6c751c20, + 0x1bd2c: 0x6c805c20, 0x1bd2d: 0x6c879e20, 0x1bd2e: 0x6ca47620, 0x1bd2f: 0x6d337e20, + 0x1bd30: 0x6c4b2820, 0x1bd31: 0x6c4ad820, 0x1bd32: 0x6cb4f020, 0x1bd33: 0x6d0a3a20, + 0x1bd34: 0x6cb3fc20, 0x1bd35: 0x6cdba820, 0x1bd36: 0x6cd42a20, 0x1bd37: 0x6c779a20, + 0x1bd38: 0x6d1e9020, 0x1bd39: 0x6c410c20, 0x1bd3a: 0x6d15bc20, 0x1bd3b: 0x6c455e20, + 0x1bd3c: 0x6c416620, 0x1bd3d: 0x6c047220, 0x1bd3e: 0x6c39e220, 0x1bd3f: 0x6d334220, + // Block 0x6f5, offset 0x1bd40 + 0x1bd40: 0x6cb36c20, 0x1bd41: 0x6c2cc020, 0x1bd42: 0x6c79da20, 0x1bd43: 0x6c9f9a20, + 0x1bd44: 0x6cf4c420, 0x1bd45: 0x6c480020, 0x1bd46: 0x6c50f020, 0x1bd47: 0x6c12d620, + 0x1bd48: 0x6cffdc20, 0x1bd49: 0x6c9ce620, 0x1bd4a: 0x6c1f2420, 0x1bd4b: 0x6c43d620, + 0x1bd4c: 0x6c2b6220, 0x1bd4d: 0x6d06b620, 0x1bd4e: 0x6c699a20, 0x1bd4f: 0x6c9fa820, + 0x1bd50: 0x6c18bc20, 0x1bd51: 0x6c6ff220, 0x1bd52: 0x6ccfda20, 0x1bd53: 0x6c344620, + 0x1bd54: 0x6d224e20, 0x1bd55: 0x6c1c0e20, 0x1bd56: 0x6c024020, 0x1bd57: 0x6c044020, + 0x1bd58: 0x6d06b820, 0x1bd59: 0x6c699c20, 0x1bd5a: 0x6c344820, 0x1bd5b: 0x6c88b420, + 0x1bd5c: 0x6ca82c20, 0x1bd5d: 0x6c097820, 0x1bd5e: 0x6c172c20, 0x1bd5f: 0x6c2d1a20, + 0x1bd60: 0x6c342e20, 0x1bd61: 0x6d179c20, 0x1bd62: 0x6c41d420, 0x1bd63: 0x6cca5420, + 0x1bd64: 0x6c786820, 0x1bd65: 0x6d0e7020, 0x1bd66: 0x6c339a20, 0x1bd67: 0x6c5ecc20, + 0x1bd68: 0x6ce81420, 0x1bd69: 0x6cffea20, 0x1bd6a: 0x6c345020, 0x1bd6b: 0x6c690620, + 0x1bd6c: 0x6c6e8420, 0x1bd6d: 0x6d0fc220, 0x1bd6e: 0x6cf9ce20, 0x1bd6f: 0x6c9f5e20, + 0x1bd70: 0x6cd5e420, 0x1bd71: 0x6c004820, 0x1bd72: 0x6cbb8c20, 0x1bd73: 0x6c004a20, + 0x1bd74: 0x6d333220, 0x1bd75: 0x6c2b8820, 0x1bd76: 0x6d324c20, 0x1bd77: 0x6c3d8e20, + 0x1bd78: 0x6cd60020, 0x1bd79: 0x6c8a1020, 0x1bd7a: 0x6cc13620, 0x1bd7b: 0x6d049e20, + 0x1bd7c: 0x6d161020, 0x1bd7d: 0x6c694020, 0x1bd7e: 0x6ccdfc20, 0x1bd7f: 0x6c694220, + // Block 0x6f6, offset 0x1bd80 + 0x1bd80: 0x6d3daa20, 0x1bd81: 0x6d18c220, 0x1bd82: 0x6c88ca20, 0x1bd83: 0x6c0a6820, + 0x1bd84: 0x6c848820, 0x1bd85: 0x6d002220, 0x1bd86: 0x6d002420, 0x1bd87: 0x6cf17a20, + 0x1bd88: 0x6d08f420, 0x1bd89: 0x6cb58220, 0x1bd8a: 0x6cb5a220, 0x1bd8b: 0x6d2cea20, + 0x1bd8c: 0x6c0d3620, 0x1bd8d: 0x6c742620, 0x1bd8e: 0x6d2cf020, 0x1bd8f: 0x6c80b820, + 0x1bd90: 0x6c3a5620, 0x1bd91: 0x6c048020, 0x1bd92: 0x6c048820, 0x1bd93: 0x6c7fb420, + 0x1bd94: 0x6d22a620, 0x1bd95: 0x6c7ff620, 0x1bd96: 0x6cf06420, 0x1bd97: 0x6c30f820, + 0x1bd98: 0x6cd0de20, 0x1bd99: 0x6c8a9420, 0x1bd9a: 0x6c640a20, 0x1bd9b: 0x6c554420, + 0x1bd9c: 0x6d00a020, 0x1bd9d: 0x6c641820, 0x1bd9e: 0x6d225820, 0x1bd9f: 0x6d316420, + 0x1bda0: 0x6c69ae20, 0x1bda1: 0x6cf30220, 0x1bda2: 0x6ce5ca20, 0x1bda3: 0x6c313a20, + 0x1bda4: 0x6c6c1e20, 0x1bda5: 0x6c1bdc20, 0x1bda6: 0x6d1a2e20, 0x1bda7: 0x6c3f4420, + 0x1bda8: 0x6cbaa420, 0x1bda9: 0x6d2ddc20, 0x1bdaa: 0x6cc17820, 0x1bdab: 0x6d3d3220, + 0x1bdac: 0x6d2de620, 0x1bdad: 0x6c32ba20, 0x1bdae: 0x6c262820, 0x1bdaf: 0x6cd7e820, + 0x1bdb0: 0x6d02dc20, 0x1bdb1: 0x6d3d5c20, 0x1bdb2: 0x6d3d7e20, 0x1bdb3: 0x6cbd9620, + 0x1bdb4: 0x6c8bda20, 0x1bdb5: 0x6d3dac20, 0x1bdb6: 0x6c1f7c20, 0x1bdb7: 0x6c32e020, + 0x1bdb8: 0x6d3a9020, 0x1bdb9: 0x6c398020, 0x1bdba: 0x6c159820, 0x1bdbb: 0x6c4f5e20, + 0x1bdbc: 0x6d20c220, 0x1bdbd: 0x6cd1aa20, 0x1bdbe: 0x6cae0e20, 0x1bdbf: 0x6d1f0820, + // Block 0x6f7, offset 0x1bdc0 + 0x1bdc0: 0x6c9a7c20, 0x1bdc1: 0x6cacfa20, 0x1bdc2: 0x6cb5a420, 0x1bdc3: 0x6d2d6820, + 0x1bdc4: 0x6c98d020, 0x1bdc5: 0x6c938a20, 0x1bdc6: 0x6cae1220, 0x1bdc7: 0x6caf6020, + 0x1bdc8: 0x6c8e4e20, 0x1bdc9: 0x6c3d6220, 0x1bdca: 0x6c39d020, 0x1bdcb: 0x6d081020, + 0x1bdcc: 0x6c6daa20, 0x1bdcd: 0x6c6dac20, 0x1bdce: 0x6ca63620, 0x1bdcf: 0x6d40b820, + 0x1bdd0: 0x6d2fb020, 0x1bdd1: 0x6d15ee20, 0x1bdd2: 0x6c8e6a20, 0x1bdd3: 0x6cce7420, + 0x1bdd4: 0x6c668a20, 0x1bdd5: 0x6d214c20, 0x1bdd6: 0x6d15fe20, 0x1bdd7: 0x6cb61a20, + 0x1bdd8: 0x6d36e020, 0x1bdd9: 0x6c385e20, 0x1bdda: 0x6cb16620, 0x1bddb: 0x6c386020, + 0x1bddc: 0x6d2db220, 0x1bddd: 0x6c7b4420, 0x1bdde: 0x6cdc9a20, 0x1bddf: 0x6d21d420, + 0x1bde0: 0x6cf39a20, 0x1bde1: 0x6c616c20, 0x1bde2: 0x6c61a820, 0x1bde3: 0x6c61ec20, + 0x1bde4: 0x6c5dce20, 0x1bde5: 0x6cc63620, 0x1bde6: 0x6c285e20, 0x1bde7: 0x6c6fca20, + 0x1bde8: 0x6d34d820, 0x1bde9: 0x6d2a3a20, 0x1bdea: 0x6d006820, 0x1bdeb: 0x6ce54620, + 0x1bdec: 0x6d09d620, 0x1bded: 0x6d066820, 0x1bdee: 0x6c40bc20, 0x1bdef: 0x6c7e5820, + 0x1bdf0: 0x6c420c20, 0x1bdf1: 0x6c4e8a20, 0x1bdf2: 0x6cdf1020, 0x1bdf3: 0x6c2c1620, + 0x1bdf4: 0x6d056620, 0x1bdf5: 0x6c159420, 0x1bdf6: 0x6cd23a20, 0x1bdf7: 0x6c7bde20, + 0x1bdf8: 0x6d0f7c20, 0x1bdf9: 0x6cd24620, 0x1bdfa: 0x6cee4c20, 0x1bdfb: 0x6c9f3020, + 0x1bdfc: 0x6c9f3220, 0x1bdfd: 0x6cea8620, 0x1bdfe: 0x6c20fc20, 0x1bdff: 0x6cf42820, + // Block 0x6f8, offset 0x1be00 + 0x1be00: 0x6d278820, 0x1be01: 0x6c06e620, 0x1be02: 0x6c01f420, 0x1be03: 0x6d2b3e20, + 0x1be04: 0x6c04ba20, 0x1be05: 0x6c6a7420, 0x1be06: 0x6c7d4c20, 0x1be07: 0x6cd0e020, + 0x1be08: 0x6c566820, 0x1be09: 0x6c39c420, 0x1be0a: 0x6c501c20, 0x1be0b: 0x6c4b2e20, + 0x1be0c: 0x6c166020, 0x1be0d: 0x6d077c20, 0x1be0e: 0x6c9fe820, 0x1be0f: 0x6c5cb220, + 0x1be10: 0x6c3b1620, 0x1be11: 0x6cbdc820, 0x1be12: 0x6c54a220, 0x1be13: 0x6d16ba20, + 0x1be14: 0x6cf58620, 0x1be15: 0x6d02b220, 0x1be16: 0x6d0c6420, 0x1be17: 0x6d2b4020, + 0x1be18: 0x6c39c620, 0x1be19: 0x6cdfd220, 0x1be1a: 0x6cd09420, 0x1be1b: 0x6c721020, + 0x1be1c: 0x6d0f9620, 0x1be1d: 0x6d296020, 0x1be1e: 0x6c0dcc20, 0x1be1f: 0x6d036a20, + 0x1be20: 0x6d1d3420, 0x1be21: 0x6d087620, 0x1be22: 0x6cb36e20, 0x1be23: 0x6d31c020, + 0x1be24: 0x6c8cb420, 0x1be25: 0x6c210020, 0x1be26: 0x6c502020, 0x1be27: 0x6c9a7e20, + 0x1be28: 0x6d422e20, 0x1be29: 0x6ca0e020, 0x1be2a: 0x6c0b8620, 0x1be2b: 0x6d069020, + 0x1be2c: 0x6c5cb420, 0x1be2d: 0x6d2f5c20, 0x1be2e: 0x6d401820, 0x1be2f: 0x6cd33820, + 0x1be30: 0x6cd33a20, 0x1be31: 0x6d22e220, 0x1be32: 0x6c3a8e20, 0x1be33: 0x6c2e7420, + 0x1be34: 0x6c993220, 0x1be35: 0x6ca68620, 0x1be36: 0x6c16e620, 0x1be37: 0x6cf14a20, + 0x1be38: 0x6c2fe420, 0x1be39: 0x6c006220, 0x1be3a: 0x6c0dce20, 0x1be3b: 0x6c01f620, + 0x1be3c: 0x6d390e20, 0x1be3d: 0x6c8f7420, 0x1be3e: 0x6cfbec20, 0x1be3f: 0x6c7be820, + // Block 0x6f9, offset 0x1be40 + 0x1be40: 0x6ce5ba20, 0x1be41: 0x6c175c20, 0x1be42: 0x6cd25c20, 0x1be43: 0x6c5a8220, + 0x1be44: 0x6c5a4e20, 0x1be45: 0x6d084820, 0x1be46: 0x6c7c6220, 0x1be47: 0x6d058020, + 0x1be48: 0x6c68dc20, 0x1be49: 0x6c6cea20, 0x1be4a: 0x6d35ba20, 0x1be4b: 0x6c6cec20, + 0x1be4c: 0x6cce3620, 0x1be4d: 0x6ce72e20, 0x1be4e: 0x6c53a020, 0x1be4f: 0x6d0e5020, + 0x1be50: 0x6c40ec20, 0x1be51: 0x6cfde020, 0x1be52: 0x6ccc9c20, 0x1be53: 0x6cffa820, + 0x1be54: 0x6d12de20, 0x1be55: 0x6d274c20, 0x1be56: 0x6c5aa220, 0x1be57: 0x6c4dfe20, + 0x1be58: 0x6c4eac20, 0x1be59: 0x6c75ae20, 0x1be5a: 0x6ced0820, 0x1be5b: 0x6cfcb020, + 0x1be5c: 0x6c7d5820, 0x1be5d: 0x6d392020, 0x1be5e: 0x6cf5ea20, 0x1be5f: 0x6c19de20, + 0x1be60: 0x6cd15820, 0x1be61: 0x6c101420, 0x1be62: 0x6d304c20, 0x1be63: 0x6d304e20, + 0x1be64: 0x6cf4dc20, 0x1be65: 0x6c4eae20, 0x1be66: 0x6c5bb620, 0x1be67: 0x6c503420, + 0x1be68: 0x6c194e20, 0x1be69: 0x6ced1820, 0x1be6a: 0x6ce4f420, 0x1be6b: 0x6d3d5e20, + 0x1be6c: 0x6d41b220, 0x1be6d: 0x6d38e820, 0x1be6e: 0x6cb48c20, 0x1be6f: 0x6c6e2020, + 0x1be70: 0x6cf60c20, 0x1be71: 0x6ccd4020, 0x1be72: 0x6ca63820, 0x1be73: 0x6cf60e20, + 0x1be74: 0x6cbe7a20, 0x1be75: 0x6cb6fc20, 0x1be76: 0x6c6db420, 0x1be77: 0x6c4afc20, + 0x1be78: 0x6d332220, 0x1be79: 0x6d179e20, 0x1be7a: 0x6d362820, 0x1be7b: 0x6c01c220, + 0x1be7c: 0x6ced1a20, 0x1be7d: 0x6c8bb220, 0x1be7e: 0x6c89b820, 0x1be7f: 0x6c166e20, + // Block 0x6fa, offset 0x1be80 + 0x1be80: 0x6cee1820, 0x1be81: 0x6cffac20, 0x1be82: 0x6d298c20, 0x1be83: 0x6c3b0620, + 0x1be84: 0x6d07a620, 0x1be85: 0x6c453420, 0x1be86: 0x6d151820, 0x1be87: 0x6cf9d020, + 0x1be88: 0x6d275420, 0x1be89: 0x6c5ac220, 0x1be8a: 0x6d064220, 0x1be8b: 0x6c9fba20, + 0x1be8c: 0x6c7c8820, 0x1be8d: 0x6d126020, 0x1be8e: 0x6d1d3a20, 0x1be8f: 0x6cd55c20, + 0x1be90: 0x6cefd820, 0x1be91: 0x6cd55a20, 0x1be92: 0x6cbe8220, 0x1be93: 0x6c998e20, + 0x1be94: 0x6ca40020, 0x1be95: 0x6c65ac20, 0x1be96: 0x6caa9420, 0x1be97: 0x6c01c620, + 0x1be98: 0x6d0fc420, 0x1be99: 0x6c210a20, 0x1be9a: 0x6d111e20, 0x1be9b: 0x6cdd7820, + 0x1be9c: 0x6c6d2820, 0x1be9d: 0x6ca00e20, 0x1be9e: 0x6c691620, 0x1be9f: 0x6c766620, + 0x1bea0: 0x6c430e20, 0x1bea1: 0x6cf25620, 0x1bea2: 0x6c171c20, 0x1bea3: 0x6cb7b020, + 0x1bea4: 0x6c505220, 0x1bea5: 0x6d0e9420, 0x1bea6: 0x6c864a20, 0x1bea7: 0x6c00ba20, + 0x1bea8: 0x6c623620, 0x1bea9: 0x6c626020, 0x1beaa: 0x6c9af820, 0x1beab: 0x6d299620, + 0x1beac: 0x6d01f820, 0x1bead: 0x6c505820, 0x1beae: 0x6ca2a220, 0x1beaf: 0x6ca14020, + 0x1beb0: 0x6c233820, 0x1beb1: 0x6ca6b820, 0x1beb2: 0x6d2ed420, 0x1beb3: 0x6c5c1420, + 0x1beb4: 0x6c066220, 0x1beb5: 0x6c4ef820, 0x1beb6: 0x6d081e20, 0x1beb7: 0x6c200420, + 0x1beb8: 0x6c8a1820, 0x1beb9: 0x6cfacc20, 0x1beba: 0x6c28ae20, 0x1bebb: 0x6c6e2e20, + 0x1bebc: 0x6cb1d220, 0x1bebd: 0x6c8bdc20, 0x1bebe: 0x6cea2820, 0x1bebf: 0x6cf80e20, + // Block 0x6fb, offset 0x1bec0 + 0x1bec0: 0x6d189220, 0x1bec1: 0x6c627620, 0x1bec2: 0x6c5a7620, 0x1bec3: 0x6c278820, + 0x1bec4: 0x6d131220, 0x1bec5: 0x6d131420, 0x1bec6: 0x6c867820, 0x1bec7: 0x6ce00e20, + 0x1bec8: 0x6ce78220, 0x1bec9: 0x6cffba20, 0x1beca: 0x6c3ace20, 0x1becb: 0x6cd07420, + 0x1becc: 0x6d2fde20, 0x1becd: 0x6c506620, 0x1bece: 0x6d18c420, 0x1becf: 0x6cfdfc20, + 0x1bed0: 0x6d03a220, 0x1bed1: 0x6cd02620, 0x1bed2: 0x6c694a20, 0x1bed3: 0x6c067020, + 0x1bed4: 0x6c6eaa20, 0x1bed5: 0x6d0ed020, 0x1bed6: 0x6c00de20, 0x1bed7: 0x6d135c20, + 0x1bed8: 0x6cc7dc20, 0x1bed9: 0x6cd57420, 0x1beda: 0x6c9b5820, 0x1bedb: 0x6d09b820, + 0x1bedc: 0x6d122e20, 0x1bedd: 0x6cb4bc20, 0x1bede: 0x6c86ca20, 0x1bedf: 0x6c18f620, + 0x1bee0: 0x6c7c0e20, 0x1bee1: 0x6c2f0420, 0x1bee2: 0x6c8a7e20, 0x1bee3: 0x6d0ef820, + 0x1bee4: 0x6c5e3e20, 0x1bee5: 0x6c917e20, 0x1bee6: 0x6cf73220, 0x1bee7: 0x6cc6dc20, + 0x1bee8: 0x6c8fd620, 0x1bee9: 0x6ca47220, 0x1beea: 0x6c95d620, 0x1beeb: 0x6c945a20, + 0x1beec: 0x6cccae20, 0x1beed: 0x6ce18e20, 0x1beee: 0x6d0e2420, 0x1beef: 0x6d3a4420, + 0x1bef0: 0x6d264220, 0x1bef1: 0x6d264420, 0x1bef2: 0x6cc0c620, 0x1bef3: 0x6d12bc20, + 0x1bef4: 0x6c452620, 0x1bef5: 0x6d12c420, 0x1bef6: 0x6c54a420, 0x1bef7: 0x6c50d620, + 0x1bef8: 0x6cd4b820, 0x1bef9: 0x6c127420, 0x1befa: 0x6c127020, 0x1befb: 0x6cd18620, + 0x1befc: 0x6c97da20, 0x1befd: 0x6c134820, 0x1befe: 0x6c135020, 0x1beff: 0x6ce3fc20, + // Block 0x6fc, offset 0x1bf00 + 0x1bf00: 0x6d41b020, 0x1bf01: 0x6c11d020, 0x1bf02: 0x6d06d620, 0x1bf03: 0x6c5be220, + 0x1bf04: 0x6d1af620, 0x1bf05: 0x6cbcd220, 0x1bf06: 0x6c3b4220, 0x1bf07: 0x6cb03820, + 0x1bf08: 0x6d266820, 0x1bf09: 0x6d1f9820, 0x1bf0a: 0x6cc85020, 0x1bf0b: 0x6cae8e20, + 0x1bf0c: 0x6c3b5a20, 0x1bf0d: 0x6c3df220, 0x1bf0e: 0x6c8cb620, 0x1bf0f: 0x6c3a4820, + 0x1bf10: 0x6cc17a20, 0x1bf11: 0x6ce3da20, 0x1bf12: 0x6caa7e20, 0x1bf13: 0x6ce5bc20, + 0x1bf14: 0x6cd77620, 0x1bf15: 0x6d322e20, 0x1bf16: 0x6c80fa20, 0x1bf17: 0x6c80f820, + 0x1bf18: 0x6d416c20, 0x1bf19: 0x6c9ff620, 0x1bf1a: 0x6c598c20, 0x1bf1b: 0x6cee5220, + 0x1bf1c: 0x6cea2020, 0x1bf1d: 0x6c176220, 0x1bf1e: 0x6c5ed220, 0x1bf1f: 0x6cb4f220, + 0x1bf20: 0x6d1bba20, 0x1bf21: 0x6d3f9820, 0x1bf22: 0x6cee5820, 0x1bf23: 0x6ce78420, + 0x1bf24: 0x6c811220, 0x1bf25: 0x6c81fa20, 0x1bf26: 0x6c9b5a20, 0x1bf27: 0x6c8fd820, + 0x1bf28: 0x6ca25c20, 0x1bf29: 0x6c2ac820, 0x1bf2a: 0x6cf06c20, 0x1bf2b: 0x6ca0bc20, + 0x1bf2c: 0x6c079220, 0x1bf2d: 0x6d2c1620, 0x1bf2e: 0x6cd59020, 0x1bf2f: 0x6cd59220, + 0x1bf30: 0x6ca26220, 0x1bf31: 0x6d397e20, 0x1bf32: 0x6cc56620, 0x1bf33: 0x6c031420, + 0x1bf34: 0x6cb48220, 0x1bf35: 0x6c352a20, 0x1bf36: 0x6c347020, 0x1bf37: 0x6c29ba20, + 0x1bf38: 0x6c857220, 0x1bf39: 0x6c4abe20, 0x1bf3a: 0x6c5e7820, 0x1bf3b: 0x6c6f4820, + 0x1bf3c: 0x6c08b220, 0x1bf3d: 0x6d051c20, 0x1bf3e: 0x6c19b420, 0x1bf3f: 0x6c22a820, + // Block 0x6fd, offset 0x1bf40 + 0x1bf40: 0x6ccbc020, 0x1bf41: 0x6cc83420, 0x1bf42: 0x6d28ac20, 0x1bf43: 0x6cc2b420, + 0x1bf44: 0x6cb8a620, 0x1bf45: 0x6d20b620, 0x1bf46: 0x6c416820, 0x1bf47: 0x6cf35420, + 0x1bf48: 0x6c137c20, 0x1bf49: 0x6cccbc20, 0x1bf4a: 0x6d09dc20, 0x1bf4b: 0x6c388420, + 0x1bf4c: 0x6cf4aa20, 0x1bf4d: 0x6d3ee620, 0x1bf4e: 0x6c87d820, 0x1bf4f: 0x6d041220, + 0x1bf50: 0x6c110820, 0x1bf51: 0x6c259220, 0x1bf52: 0x6cc5c220, 0x1bf53: 0x6c0bea20, + 0x1bf54: 0x6ceaa220, 0x1bf55: 0x6c2c1820, 0x1bf56: 0x6d2f2220, 0x1bf57: 0x6c983220, + 0x1bf58: 0x6c1be220, 0x1bf59: 0x6d168a20, 0x1bf5a: 0x6c412c20, 0x1bf5b: 0x6c456020, + 0x1bf5c: 0x6c323420, 0x1bf5d: 0x6c83a220, 0x1bf5e: 0x6cb6d620, 0x1bf5f: 0x6cd59820, + 0x1bf60: 0x6c425620, 0x1bf61: 0x6ce56a20, 0x1bf62: 0x6c681a20, 0x1bf63: 0x6ccdf820, + 0x1bf64: 0x6cedb620, 0x1bf65: 0x6c7ee020, 0x1bf66: 0x6c704420, 0x1bf67: 0x6c983420, + 0x1bf68: 0x6d0f7e20, 0x1bf69: 0x6c96b220, 0x1bf6a: 0x6c9e8820, 0x1bf6b: 0x6cd88e20, + 0x1bf6c: 0x6d254020, 0x1bf6d: 0x6c4f6020, 0x1bf6e: 0x6c3a8620, 0x1bf6f: 0x6c069020, + 0x1bf70: 0x6c6a7e20, 0x1bf71: 0x6c2fe020, 0x1bf72: 0x6c430020, 0x1bf73: 0x6d118e20, + 0x1bf74: 0x6cfa7c20, 0x1bf75: 0x6c1ed620, 0x1bf76: 0x6c20fe20, 0x1bf77: 0x6cabd020, + 0x1bf78: 0x6cd4a820, 0x1bf79: 0x6c578220, 0x1bf7a: 0x6d02b420, 0x1bf7b: 0x6c1e2020, + 0x1bf7c: 0x6d3aae20, 0x1bf7d: 0x6c1e2220, 0x1bf7e: 0x6cd90420, 0x1bf7f: 0x6c04bc20, + // Block 0x6fe, offset 0x1bf80 + 0x1bf80: 0x6cd90620, 0x1bf81: 0x6c5fd420, 0x1bf82: 0x6cf2d620, 0x1bf83: 0x6c6cda20, + 0x1bf84: 0x6c469420, 0x1bf85: 0x6c5e8e20, 0x1bf86: 0x6c98c620, 0x1bf87: 0x6cafb820, + 0x1bf88: 0x6c093a20, 0x1bf89: 0x6cee6220, 0x1bf8a: 0x6c021220, 0x1bf8b: 0x6c398820, + 0x1bf8c: 0x6c3b5c20, 0x1bf8d: 0x6d16bc20, 0x1bf8e: 0x6c3df420, 0x1bf8f: 0x6ca3e420, + 0x1bf90: 0x6cf58820, 0x1bf91: 0x6c566a20, 0x1bf92: 0x6d0ad420, 0x1bf93: 0x6c30dc20, + 0x1bf94: 0x6d02fe20, 0x1bf95: 0x6d31ba20, 0x1bf96: 0x6d109020, 0x1bf97: 0x6c8ba020, + 0x1bf98: 0x6cc8c220, 0x1bf99: 0x6c35ac20, 0x1bf9a: 0x6c99d620, 0x1bf9b: 0x6d2f9a20, + 0x1bf9c: 0x6c4cae20, 0x1bf9d: 0x6d339620, 0x1bf9e: 0x6c230420, 0x1bf9f: 0x6d281c20, + 0x1bfa0: 0x6d41e420, 0x1bfa1: 0x6c30de20, 0x1bfa2: 0x6cd4aa20, 0x1bfa3: 0x6d2a3c20, + 0x1bfa4: 0x6c352c20, 0x1bfa5: 0x6c858e20, 0x1bfa6: 0x6c934620, 0x1bfa7: 0x6c656620, + 0x1bfa8: 0x6c19be20, 0x1bfa9: 0x6cd9a020, 0x1bfaa: 0x6cbaa620, 0x1bfab: 0x6c3c2220, + 0x1bfac: 0x6ca3e620, 0x1bfad: 0x6cfe8620, 0x1bfae: 0x6cfa8a20, 0x1bfaf: 0x6c7a2e20, + 0x1bfb0: 0x6cb28420, 0x1bfb1: 0x6cdf1c20, 0x1bfb2: 0x6cf7d420, 0x1bfb3: 0x6d350220, + 0x1bfb4: 0x6c48da20, 0x1bfb5: 0x6cfe8c20, 0x1bfb6: 0x6c643a20, 0x1bfb7: 0x6c633420, + 0x1bfb8: 0x6c467620, 0x1bfb9: 0x6c05aa20, 0x1bfba: 0x6ca0e220, 0x1bfbb: 0x6d16f220, + 0x1bfbc: 0x6d12d820, 0x1bfbd: 0x6d12e020, 0x1bfbe: 0x6cd33c20, 0x1bfbf: 0x6ca7fa20, + // Block 0x6ff, offset 0x1bfc0 + 0x1bfc0: 0x6c08c220, 0x1bfc1: 0x6c34d820, 0x1bfc2: 0x6d149e20, 0x1bfc3: 0x6c8cb820, + 0x1bfc4: 0x6c0dd020, 0x1bfc5: 0x6ca63020, 0x1bfc6: 0x6c7e4020, 0x1bfc7: 0x6c50d820, + 0x1bfc8: 0x6c04f020, 0x1bfc9: 0x6c388620, 0x1bfca: 0x6d37a420, 0x1bfcb: 0x6c274620, + 0x1bfcc: 0x6c222c20, 0x1bfcd: 0x6d100a20, 0x1bfce: 0x6c3d4a20, 0x1bfcf: 0x6c041a20, + 0x1bfd0: 0x6ca1fe20, 0x1bfd1: 0x6c418620, 0x1bfd2: 0x6cb4d420, 0x1bfd3: 0x6cc4ba20, + 0x1bfd4: 0x6cc74220, 0x1bfd5: 0x6c995220, 0x1bfd6: 0x6cce9a20, 0x1bfd7: 0x6cd90e20, + 0x1bfd8: 0x6d30e620, 0x1bfd9: 0x6cf99620, 0x1bfda: 0x6d202a20, 0x1bfdb: 0x6ccfba20, + 0x1bfdc: 0x6c4b3020, 0x1bfdd: 0x6ceb9a20, 0x1bfde: 0x6d2cb420, 0x1bfdf: 0x6ca3ec20, + 0x1bfe0: 0x6ca8fe20, 0x1bfe1: 0x6d1e2420, 0x1bfe2: 0x6c2be420, 0x1bfe3: 0x6d359e20, + 0x1bfe4: 0x6d2bcc20, 0x1bfe5: 0x6c13cc20, 0x1bfe6: 0x6c287020, 0x1bfe7: 0x6c46f820, + 0x1bfe8: 0x6c107620, 0x1bfe9: 0x6c6fdc20, 0x1bfea: 0x6c022820, 0x1bfeb: 0x6c3e0c20, + 0x1bfec: 0x6c657020, 0x1bfed: 0x6c032e20, 0x1bfee: 0x6c34da20, 0x1bfef: 0x6c77de20, + 0x1bff0: 0x6ca3b020, 0x1bff1: 0x6d3abe20, 0x1bff2: 0x6c094820, 0x1bff3: 0x6c8efa20, + 0x1bff4: 0x6c147620, 0x1bff5: 0x6cccd020, 0x1bff6: 0x6cd89e20, 0x1bff7: 0x6c1f1820, + 0x1bff8: 0x6cadb620, 0x1bff9: 0x6cd31a20, 0x1bffa: 0x6c48dc20, 0x1bffb: 0x6d2bce20, + 0x1bffc: 0x6d119820, 0x1bffd: 0x6c195620, 0x1bffe: 0x6c6fde20, 0x1bfff: 0x6cd33e20, + // Block 0x700, offset 0x1c000 + 0x1c000: 0x6d33a620, 0x1c001: 0x6c8efc20, 0x1c002: 0x6c99de20, 0x1c003: 0x6c87da20, + 0x1c004: 0x6cc65620, 0x1c005: 0x6d2cb620, 0x1c006: 0x6d2aa020, 0x1c007: 0x6c0bec20, + 0x1c008: 0x6d2e4c20, 0x1c009: 0x6d35a020, 0x1c00a: 0x6c8f7620, 0x1c00b: 0x6c306220, + 0x1c00c: 0x6c914420, 0x1c00d: 0x6cd0ea20, 0x1c00e: 0x6c85a620, 0x1c00f: 0x6c7f9020, + 0x1c010: 0x6d1e1c20, 0x1c011: 0x6cd5ae20, 0x1c012: 0x6d09f620, 0x1c013: 0x6cd68420, + 0x1c014: 0x6cb76820, 0x1c015: 0x6d313820, 0x1c016: 0x6cb4dc20, 0x1c017: 0x6c85ca20, + 0x1c018: 0x6d14c220, 0x1c019: 0x6cfdba20, 0x1c01a: 0x6d323020, 0x1c01b: 0x6c85cc20, + 0x1c01c: 0x6ccb1a20, 0x1c01d: 0x6c484e20, 0x1c01e: 0x6c76a420, 0x1c01f: 0x6c078420, + 0x1c020: 0x6cc58e20, 0x1c021: 0x6cffde20, 0x1c022: 0x6c041c20, 0x1c023: 0x6cc59020, + 0x1c024: 0x6c0e1220, 0x1c025: 0x6d3e1620, 0x1c026: 0x6c1d9820, 0x1c027: 0x6d172c20, + 0x1c028: 0x6c22be20, 0x1c029: 0x6d063420, 0x1c02a: 0x6d399220, 0x1c02b: 0x6c666c20, + 0x1c02c: 0x6d41a820, 0x1c02d: 0x6c374a20, 0x1c02e: 0x6c378e20, 0x1c02f: 0x6d1fb820, + 0x1c030: 0x6c380c20, 0x1c031: 0x6c45e220, 0x1c032: 0x6c77a620, 0x1c033: 0x6c81ac20, + 0x1c034: 0x6d2d6a20, 0x1c035: 0x6c8aec20, 0x1c036: 0x6d19be20, 0x1c037: 0x6d104420, + 0x1c038: 0x6c50f220, 0x1c039: 0x6c449820, 0x1c03a: 0x6d172e20, 0x1c03b: 0x6cd34e20, + 0x1c03c: 0x6c43dc20, 0x1c03d: 0x6d28fc20, 0x1c03e: 0x6c943620, 0x1c03f: 0x6c3e3420, + // Block 0x701, offset 0x1c040 + 0x1c040: 0x6c6aa620, 0x1c041: 0x6c525c20, 0x1c042: 0x6c4b3e20, 0x1c043: 0x6ce21020, + 0x1c044: 0x6c49e420, 0x1c045: 0x6ceef420, 0x1c046: 0x6c7b9820, 0x1c047: 0x6cc79620, + 0x1c048: 0x6c01ac20, 0x1c049: 0x6c012020, 0x1c04a: 0x6c734a20, 0x1c04b: 0x6d14c420, + 0x1c04c: 0x6d3cf820, 0x1c04d: 0x6c7a3620, 0x1c04e: 0x6d35bc20, 0x1c04f: 0x6cbf0420, + 0x1c050: 0x6ce73020, 0x1c051: 0x6cca6c20, 0x1c052: 0x6cca6a20, 0x1c053: 0x6c586a20, + 0x1c054: 0x6c710420, 0x1c055: 0x6c6fea20, 0x1c056: 0x6d094c20, 0x1c057: 0x6c34e020, + 0x1c058: 0x6d3c7c20, 0x1c059: 0x6d20f220, 0x1c05a: 0x6d296420, + 0x1c05c: 0x6d1ba620, 0x1c05d: 0x6c6c1820, 0x1c05e: 0x6c8f6220, 0x1c05f: 0x6d2e5020, + 0x1c060: 0x6d0ade20, 0x1c061: 0x6cc52620, 0x1c062: 0x6d313a20, 0x1c063: 0x6c295e20, + 0x1c064: 0x6cb4de20, 0x1c065: 0x6cbbd820, 0x1c066: 0x6c578c20, 0x1c067: 0x6c4b4020, + 0x1c068: 0x6c67a220, 0x1c069: 0x6d3c1220, 0x1c06a: 0x6d09f820, 0x1c06b: 0x6cdd1620, + 0x1c06c: 0x6ccbe620, 0x1c06d: 0x6d314e20, 0x1c06e: 0x6c069a20, 0x1c06f: 0x6ce64020, + 0x1c070: 0x6c7df220, 0x1c071: 0x6c6e7020, 0x1c072: 0x6cb3c220, 0x1c073: 0x6c07b020, + 0x1c074: 0x6c3e4e20, 0x1c075: 0x6cc89a20, 0x1c076: 0x6ce7b620, 0x1c077: 0x6c742820, + 0x1c078: 0x6cf5ec20, 0x1c079: 0x6c80ba20, 0x1c07a: 0x6c8f0420, 0x1c07b: 0x6c3c3c20, + 0x1c07c: 0x6cb4e820, 0x1c07d: 0x6cf1d420, 0x1c07e: 0x6c756c20, 0x1c07f: 0x6c41d620, + // Block 0x702, offset 0x1c080 + 0x1c080: 0x6cdaa220, 0x1c081: 0x6c894c20, 0x1c082: 0x6cc04620, 0x1c083: 0x6ce6be20, + 0x1c084: 0x6d1fc020, 0x1c085: 0x6c99ec20, 0x1c086: 0x6c052420, 0x1c087: 0x6c906620, + 0x1c088: 0x6cae6820, 0x1c089: 0x6d3c1620, 0x1c08a: 0x6c2c4020, 0x1c08b: 0x6d078c20, + 0x1c08c: 0x6ce8a220, 0x1c08d: 0x6d2a7e20, 0x1c08e: 0x6c022a20, 0x1c08f: 0x6c481020, + 0x1c090: 0x6c097a20, 0x1c091: 0x6c2b6820, 0x1c092: 0x6c4e0020, 0x1c093: 0x6d3f0820, + 0x1c094: 0x6d33d420, 0x1c095: 0x6cc5e620, 0x1c096: 0x6c070e20, 0x1c097: 0x6c450820, + 0x1c098: 0x6c658620, 0x1c099: 0x6c591020, 0x1c09a: 0x6ced0a20, 0x1c09b: 0x6caaba20, + 0x1c09c: 0x6c634a20, 0x1c09d: 0x6ce57c20, 0x1c09e: 0x6c61ee20, 0x1c09f: 0x6cfeb220, + 0x1c0a0: 0x6c938e20, 0x1c0a1: 0x6c5ce620, 0x1c0a2: 0x6cce6820, 0x1c0a3: 0x6c133020, + 0x1c0a4: 0x6c3b6c20, 0x1c0a5: 0x6cd91a20, 0x1c0a6: 0x6c9c0220, 0x1c0a7: 0x6cf3c020, + 0x1c0a8: 0x6c83bc20, 0x1c0a9: 0x6c83be20, 0x1c0aa: 0x6c311020, 0x1c0ab: 0x6cbdd020, + 0x1c0ac: 0x6d1cea20, 0x1c0ad: 0x6cdd1820, 0x1c0ae: 0x6c708c20, 0x1c0af: 0x6ce2ea20, + 0x1c0b0: 0x6d019020, 0x1c0b1: 0x6c7da820, 0x1c0b2: 0x6d3d5020, 0x1c0b3: 0x6cd4ca20, + 0x1c0b4: 0x6c14c020, 0x1c0b5: 0x6c394220, 0x1c0b6: 0x6cefae20, 0x1c0b7: 0x6c6e7220, + 0x1c0b8: 0x6c83c020, 0x1c0b9: 0x6c0d3220, 0x1c0ba: 0x6cfa6420, 0x1c0bb: 0x6c3d1020, + 0x1c0bc: 0x6ce21c20, 0x1c0bd: 0x6d35e220, 0x1c0be: 0x6c7efa20, 0x1c0bf: 0x6c87fc20, + // Block 0x703, offset 0x1c0c0 + 0x1c0c0: 0x6c658820, 0x1c0c1: 0x6d3cfc20, 0x1c0c2: 0x6c8ce620, 0x1c0c3: 0x6c83d420, + 0x1c0c4: 0x6cb79220, 0x1c0c5: 0x6c0e2220, 0x1c0c6: 0x6c94f820, 0x1c0c7: 0x6c231620, + 0x1c0c8: 0x6cba5420, 0x1c0c9: 0x6c9dc420, 0x1c0ca: 0x6cb5e620, 0x1c0cb: 0x6cb5e820, + 0x1c0cc: 0x6c114620, 0x1c0cd: 0x6c4bf820, 0x1c0ce: 0x6c14f420, 0x1c0cf: 0x6c2a7020, + 0x1c0d0: 0x6c3a5820, 0x1c0d1: 0x6cabfe20, 0x1c0d2: 0x6c057020, 0x1c0d3: 0x6c057220, + 0x1c0d4: 0x6c5cca20, 0x1c0d5: 0x6d3f8e20, 0x1c0d6: 0x6c1a0020, 0x1c0d7: 0x6d2a4c20, + 0x1c0d8: 0x6c603820, 0x1c0d9: 0x6c861020, 0x1c0da: 0x6caea020, 0x1c0db: 0x6d233e20, + 0x1c0dc: 0x6d234020, 0x1c0dd: 0x6c481420, 0x1c0de: 0x6c75ba20, 0x1c0df: 0x6c307620, + 0x1c0e0: 0x6ce0f620, 0x1c0e1: 0x6c428020, 0x1c0e2: 0x6cee1a20, 0x1c0e3: 0x6c2c5620, + 0x1c0e4: 0x6c262a20, 0x1c0e5: 0x6c389c20, 0x1c0e6: 0x6c195c20, 0x1c0e7: 0x6d2e6220, + 0x1c0e8: 0x6cb6fe20, 0x1c0e9: 0x6d24f620, 0x1c0ea: 0x6d0d8820, 0x1c0eb: 0x6d234220, + 0x1c0ec: 0x6cc29e20, 0x1c0ed: 0x6d17a020, 0x1c0ee: 0x6ccbaa20, 0x1c0ef: 0x6cc59820, + 0x1c0f0: 0x6c20d220, 0x1c0f1: 0x6c837820, 0x1c0f2: 0x6cb4f420, 0x1c0f3: 0x6d3d0220, + 0x1c0f4: 0x6c3e7a20, 0x1c0f5: 0x6c77f820, 0x1c0f6: 0x6c7f0820, 0x1c0f7: 0x6d405220, + 0x1c0f8: 0x6d405420, 0x1c0f9: 0x6d2fb220, 0x1c0fa: 0x6c491620, 0x1c0fb: 0x6c3b2a20, + 0x1c0fc: 0x6c3b7420, 0x1c0fd: 0x6ccfe620, 0x1c0fe: 0x6cbe7c20, 0x1c0ff: 0x6ca5e420, + // Block 0x704, offset 0x1c100 + 0x1c100: 0x6ced1c20, 0x1c101: 0x6c4cc020, 0x1c102: 0x6c925420, 0x1c103: 0x6c4fc620, + 0x1c104: 0x6c6a1620, 0x1c105: 0x6d15f020, 0x1c106: 0x6c1dae20, 0x1c107: 0x6c71b620, + 0x1c108: 0x6c712220, 0x1c109: 0x6c1a0220, 0x1c10a: 0x6d423a20, 0x1c10b: 0x6c895420, + 0x1c10c: 0x6cbab820, 0x1c10d: 0x6d346020, 0x1c10e: 0x6c20d420, 0x1c10f: 0x6d0af020, + 0x1c110: 0x6c709220, 0x1c111: 0x6c06a020, 0x1c112: 0x6c684620, 0x1c113: 0x6d3d6020, + 0x1c114: 0x6d3e3a20, 0x1c115: 0x6c0d3820, 0x1c116: 0x6caea220, 0x1c117: 0x6c2fa620, + 0x1c118: 0x6c1eda20, 0x1c119: 0x6c172e20, 0x1c11a: 0x6c9b0620, 0x1c11b: 0x6c57dc20, + 0x1c11c: 0x6c659420, 0x1c11d: 0x6c4a6820, 0x1c11e: 0x6cf88820, 0x1c11f: 0x6c319c20, + 0x1c120: 0x6cba5620, 0x1c121: 0x6c2a5820, 0x1c122: 0x6c4bb420, 0x1c123: 0x6c2da020, + 0x1c124: 0x6c954620, 0x1c125: 0x6d33e020, 0x1c126: 0x6cc38220, 0x1c127: 0x6ca04420, + 0x1c128: 0x6c40b220, 0x1c129: 0x6c454820, 0x1c12a: 0x6caf1220, 0x1c12b: 0x6d2dee20, + 0x1c12c: 0x6d199420, 0x1c12d: 0x6ceb7e20, 0x1c12e: 0x6ccbac20, 0x1c12f: 0x6c349a20, + 0x1c130: 0x6d125e20, 0x1c131: 0x6c400c20, 0x1c132: 0x6cefda20, 0x1c133: 0x6cee9a20, + 0x1c134: 0x6c32c820, 0x1c135: 0x6c641a20, 0x1c136: 0x6d3f9a20, 0x1c137: 0x6c64b220, + 0x1c138: 0x6d151a20, 0x1c139: 0x6cd0ae20, 0x1c13a: 0x6cf78620, 0x1c13b: 0x6d0e8220, + 0x1c13c: 0x6d0da220, 0x1c13d: 0x6c200020, 0x1c13e: 0x6c64b420, 0x1c13f: 0x6c210c20, + // Block 0x705, offset 0x1c140 + 0x1c140: 0x6d226a20, 0x1c141: 0x6c513a20, 0x1c142: 0x6d2be020, 0x1c143: 0x6cf2fa20, + 0x1c144: 0x6cb11420, 0x1c145: 0x6c087a20, 0x1c146: 0x6d10ac20, 0x1c147: 0x6c5dd020, + 0x1c148: 0x6d05b220, 0x1c149: 0x6cc92020, 0x1c14a: 0x6d0fc620, 0x1c14b: 0x6c7e7c20, + 0x1c14c: 0x6d0caa20, 0x1c14d: 0x6c079e20, 0x1c14e: 0x6c5ac420, 0x1c14f: 0x6c7c8a20, + 0x1c150: 0x6c6bea20, 0x1c151: 0x6c7c8c20, 0x1c152: 0x6cd7f220, 0x1c153: 0x6c3c5420, + 0x1c154: 0x6d004820, 0x1c155: 0x6ceb8220, 0x1c156: 0x6d35e420, 0x1c157: 0x6c668c20, + 0x1c158: 0x6ca29a20, 0x1c159: 0x6c999020, 0x1c15a: 0x6c1f9420, 0x1c15b: 0x6c569e20, + 0x1c15c: 0x6c556c20, 0x1c15d: 0x6c890420, 0x1c15e: 0x6c837a20, 0x1c15f: 0x6ce67e20, + 0x1c160: 0x6ca40220, 0x1c161: 0x6d215220, 0x1c162: 0x6d1f4620, 0x1c163: 0x6c9a0820, + 0x1c164: 0x6cd96620, 0x1c165: 0x6d089a20, 0x1c166: 0x6d089c20, 0x1c167: 0x6d101e20, + 0x1c168: 0x6d316620, 0x1c169: 0x6cb11620, 0x1c16a: 0x6d12fe20, 0x1c16b: 0x6c605220, + 0x1c16c: 0x6c6ae620, 0x1c16d: 0x6d130020, 0x1c16e: 0x6c1ee020, 0x1c16f: 0x6c33fa20, + 0x1c170: 0x6d212820, 0x1c171: 0x6d408a20, 0x1c172: 0x6cee9c20, 0x1c173: 0x6c9a0a20, + 0x1c174: 0x6ce40220, 0x1c175: 0x6c603a20, 0x1c176: 0x6c6ae820, 0x1c177: 0x6c766220, + 0x1c178: 0x6cbfb420, 0x1c179: 0x6d1c7e20, 0x1c17a: 0x6cc77a20, 0x1c17b: 0x6c59d020, + 0x1c17c: 0x6c909620, 0x1c17d: 0x6c822220, 0x1c17e: 0x6cc38420, 0x1c17f: 0x6cfe7620, + // Block 0x706, offset 0x1c180 + 0x1c180: 0x6cb23c20, 0x1c181: 0x6cd41820, 0x1c182: 0x6c414420, 0x1c183: 0x6cdfe820, + 0x1c184: 0x6c802e20, 0x1c185: 0x6cf15620, 0x1c186: 0x6d215420, 0x1c187: 0x6c192c20, + 0x1c188: 0x6c935620, 0x1c189: 0x6c71be20, 0x1c18a: 0x6cd0cc20, 0x1c18b: 0x6c1f9620, + 0x1c18c: 0x6cb0ea20, 0x1c18d: 0x6d01d420, 0x1c18e: 0x6c642420, 0x1c18f: 0x6d182420, + 0x1c190: 0x6d2e0220, 0x1c191: 0x6c3ec020, 0x1c192: 0x6cab0620, 0x1c193: 0x6c9d6620, + 0x1c194: 0x6c80c220, 0x1c195: 0x6cc69020, 0x1c196: 0x6c47ae20, 0x1c197: 0x6c66a820, + 0x1c198: 0x6c71c020, 0x1c199: 0x6cddf220, 0x1c19a: 0x6d11c020, 0x1c19b: 0x6d317a20, + 0x1c19c: 0x6c055220, 0x1c19d: 0x6ccc0820, 0x1c19e: 0x6d259220, 0x1c19f: 0x6d3f2020, + 0x1c1a0: 0x6ca01020, 0x1c1a1: 0x6cdae620, 0x1c1a2: 0x6c644c20, 0x1c1a3: 0x6d112020, + 0x1c1a4: 0x6c6b0a20, 0x1c1a5: 0x6c5a7420, 0x1c1a6: 0x6c422a20, 0x1c1a7: 0x6c3a6220, + 0x1c1a8: 0x6d2cd020, 0x1c1a9: 0x6cb9ae20, 0x1c1aa: 0x6c96ce20, 0x1c1ab: 0x6cdcf420, + 0x1c1ac: 0x6d259420, 0x1c1ad: 0x6d01d620, 0x1c1ae: 0x6cc69220, 0x1c1af: 0x6cd27c20, + 0x1c1b0: 0x6d33fe20, 0x1c1b1: 0x6c24de20, 0x1c1b2: 0x6d27ba20, 0x1c1b3: 0x6ce68020, + 0x1c1b4: 0x6c8e7a20, 0x1c1b5: 0x6cc68620, 0x1c1b6: 0x6ce10e20, 0x1c1b7: 0x6cc3de20, + 0x1c1b8: 0x6d2cfa20, 0x1c1b9: 0x6cd80220, 0x1c1ba: 0x6cd17420, 0x1c1bb: 0x6cde7020, + 0x1c1bc: 0x6c781420, 0x1c1bd: 0x6cf66c20, 0x1c1be: 0x6c479c20, 0x1c1bf: 0x6cb51020, + // Block 0x707, offset 0x1c1c0 + 0x1c1c0: 0x6c431020, 0x1c1c1: 0x6c431220, 0x1c1c2: 0x6cdcdc20, 0x1c1c3: 0x6cac6620, + 0x1c1c4: 0x6ce1da20, 0x1c1c5: 0x6c441220, 0x1c1c6: 0x6d0a1a20, 0x1c1c7: 0x6c2cd420, + 0x1c1c8: 0x6caa2420, 0x1c1c9: 0x6c606420, 0x1c1ca: 0x6cd78c20, 0x1c1cb: 0x6c46c220, + 0x1c1cc: 0x6c20d820, 0x1c1cd: 0x6cbacc20, 0x1c1ce: 0x6c13ec20, 0x1c1cf: 0x6cba1620, + 0x1c1d0: 0x6c57ec20, 0x1c1d1: 0x6c9a1820, 0x1c1d2: 0x6d070a20, 0x1c1d3: 0x6c42ac20, + 0x1c1d4: 0x6c42cc20, 0x1c1d5: 0x6d3d8020, 0x1c1d6: 0x6ceb3620, 0x1c1d7: 0x6cbc7420, + 0x1c1d8: 0x6d105c20, 0x1c1d9: 0x6c2cd620, 0x1c1da: 0x6c642620, 0x1c1db: 0x6c76e220, + 0x1c1dc: 0x6d41be20, 0x1c1dd: 0x6c2a5a20, 0x1c1de: 0x6c907220, 0x1c1df: 0x6c0d4420, + 0x1c1e0: 0x6d39ba20, 0x1c1e1: 0x6ccaa420, 0x1c1e2: 0x6cf79c20, 0x1c1e3: 0x6c5f1420, + 0x1c1e4: 0x6c882220, 0x1c1e5: 0x6c5c1620, 0x1c1e6: 0x6d1da420, 0x1c1e7: 0x6cba7420, + 0x1c1e8: 0x6c4cc220, 0x1c1e9: 0x6c414620, 0x1c1ea: 0x6c415020, 0x1c1eb: 0x6ce95820, + 0x1c1ec: 0x6c57bc20, 0x1c1ed: 0x6cb52020, 0x1c1ee: 0x6ccbae20, 0x1c1ef: 0x6c24e220, + 0x1c1f0: 0x6caeb220, 0x1c1f1: 0x6d1fe420, 0x1c1f2: 0x6c559020, 0x1c1f3: 0x6c67b620, + 0x1c1f4: 0x6c56be20, 0x1c1f5: 0x6c594a20, 0x1c1f6: 0x6c4b6820, 0x1c1f7: 0x6ca85e20, + 0x1c1f8: 0x6d185220, 0x1c1f9: 0x6c42d820, 0x1c1fa: 0x6c774420, 0x1c1fb: 0x6c4a8620, + 0x1c1fc: 0x6c4a8820, 0x1c1fd: 0x6c128a20, 0x1c1fe: 0x6c97fa20, 0x1c1ff: 0x6c6cac20, + // Block 0x708, offset 0x1c200 + 0x1c200: 0x6c2b4020, 0x1c201: 0x6d3c2220, 0x1c202: 0x6c822620, 0x1c203: 0x6c810a20, + 0x1c204: 0x6c18dc20, 0x1c205: 0x6c233a20, 0x1c206: 0x6c841820, 0x1c207: 0x6d04e220, + 0x1c208: 0x6cbe8620, 0x1c209: 0x6cd6da20, 0x1c20a: 0x6c38b220, 0x1c20b: 0x6ce7c220, + 0x1c20c: 0x6c499e20, 0x1c20d: 0x6d2ae820, 0x1c20e: 0x6cdafc20, 0x1c20f: 0x6c82d020, + 0x1c210: 0x6c91d220, 0x1c211: 0x6c896620, 0x1c212: 0x6c9d7820, 0x1c213: 0x6c90b020, + 0x1c214: 0x6c177420, 0x1c215: 0x6cdafe20, 0x1c216: 0x6c782220, 0x1c217: 0x6c1e6620, + 0x1c218: 0x6ce12020, 0x1c219: 0x6c0c1620, 0x1c21a: 0x6c92a220, 0x1c21b: 0x6c6f8420, + 0x1c21c: 0x6d30fc20, 0x1c21d: 0x6d2bf620, 0x1c21e: 0x6cd50020, 0x1c21f: 0x6d2ed620, + 0x1c220: 0x6c977020, 0x1c221: 0x6ca06a20, 0x1c222: 0x6ca7a820, 0x1c223: 0x6d106a20, + 0x1c224: 0x6ce59820, 0x1c225: 0x6caeb420, 0x1c226: 0x6d3b1e20, 0x1c227: 0x6ccc0e20, + 0x1c228: 0x6cf6c020, 0x1c229: 0x6cc31020, 0x1c22a: 0x6c526c20, 0x1c22b: 0x6c64ce20, + 0x1c22c: 0x6c233c20, 0x1c22d: 0x6c630e20, 0x1c22e: 0x6d0f3a20, 0x1c22f: 0x6cbb1820, + 0x1c230: 0x6d098820, 0x1c231: 0x6d1be420, 0x1c232: 0x6c37de20, 0x1c233: 0x6d0a3c20, + 0x1c234: 0x6d349820, 0x1c235: 0x6cbbf620, 0x1c236: 0x6d417c20, 0x1c237: 0x6c23b420, + 0x1c238: 0x6cb49620, 0x1c239: 0x6cd60a20, 0x1c23a: 0x6c57ae20, 0x1c23b: 0x6c7d1e20, + 0x1c23c: 0x6d319020, 0x1c23d: 0x6d41f220, 0x1c23e: 0x6d26ec20, 0x1c23f: 0x6ccdac20, + // Block 0x709, offset 0x1c240 + 0x1c240: 0x6cf6c420, 0x1c241: 0x6c211420, 0x1c242: 0x6c2d8020, 0x1c243: 0x6c382620, + 0x1c244: 0x6c41e620, 0x1c245: 0x6ca07620, 0x1c246: 0x6cf47a20, 0x1c247: 0x6cbbaa20, + 0x1c248: 0x6cc52c20, 0x1c249: 0x6c8c6020, 0x1c24a: 0x6c8e9620, 0x1c24b: 0x6cbbf820, + 0x1c24c: 0x6cfd0c20, 0x1c24d: 0x6cc90820, 0x1c24e: 0x6c38ba20, 0x1c24f: 0x6d2e1420, + 0x1c250: 0x6ceb4820, 0x1c251: 0x6c81bc20, 0x1c252: 0x6d27c620, 0x1c253: 0x6cd75a20, + 0x1c254: 0x6c33ae20, 0x1c255: 0x6c199220, 0x1c256: 0x6ce13220, 0x1c257: 0x6c9b3820, + 0x1c258: 0x6c715a20, 0x1c259: 0x6c1a4220, 0x1c25a: 0x6cdb3020, 0x1c25b: 0x6c74ba20, + 0x1c25c: 0x6c74bc20, 0x1c25d: 0x6c2d8220, 0x1c25e: 0x6c5c3020, 0x1c25f: 0x6c5f3020, + 0x1c260: 0x6caae020, 0x1c261: 0x6cfe4e20, 0x1c262: 0x6ceb8e20, 0x1c263: 0x6ca94620, + 0x1c264: 0x6cc8b020, 0x1c265: 0x6d39c420, 0x1c266: 0x6ce78620, 0x1c267: 0x6d2b8e20, + 0x1c268: 0x6c3b9420, 0x1c269: 0x6cbf6020, 0x1c26a: 0x6cc4d220, 0x1c26b: 0x6c526e20, + 0x1c26c: 0x6cb9c820, 0x1c26d: 0x6c472e20, 0x1c26e: 0x6c8f1a20, 0x1c26f: 0x6c81e020, + 0x1c270: 0x6c42dc20, 0x1c271: 0x6c1eae20, 0x1c272: 0x6cf94620, 0x1c273: 0x6cd18820, + 0x1c274: 0x6d3f6c20, 0x1c275: 0x6cca6820, 0x1c276: 0x6c60a620, 0x1c277: 0x6c30c620, + 0x1c278: 0x6c6eca20, 0x1c279: 0x6c91dc20, 0x1c27a: 0x6c673c20, 0x1c27b: 0x6c1f9820, + 0x1c27c: 0x6d25aa20, 0x1c27d: 0x6cde9c20, 0x1c27e: 0x6cd50c20, 0x1c27f: 0x6c678220, + // Block 0x70a, offset 0x1c280 + 0x1c280: 0x6ce01820, 0x1c281: 0x6c8c3820, 0x1c282: 0x6ca9cc20, 0x1c283: 0x6d1b0620, + 0x1c284: 0x6cf7a820, 0x1c285: 0x6cdc8020, 0x1c286: 0x6ccd1020, 0x1c287: 0x6d41d020, + 0x1c288: 0x6d082a20, 0x1c289: 0x6c199a20, 0x1c28a: 0x6c423420, 0x1c28b: 0x6c716220, + 0x1c28c: 0x6d41d820, 0x1c28d: 0x6d18c620, 0x1c28e: 0x6cbda220, 0x1c28f: 0x6cb49c20, + 0x1c290: 0x6d0cd620, 0x1c291: 0x6c826020, 0x1c292: 0x6c3c6a20, 0x1c293: 0x6c5b6c20, + 0x1c294: 0x6c299220, 0x1c295: 0x6c629620, 0x1c296: 0x6cdc7020, 0x1c297: 0x6c0ff820, + 0x1c298: 0x6cb2d420, 0x1c299: 0x6c1a4420, 0x1c29a: 0x6c1ef020, 0x1c29b: 0x6d3b5a20, + 0x1c29c: 0x6c4b7c20, 0x1c29d: 0x6c60aa20, 0x1c29e: 0x6c6ba020, 0x1c29f: 0x6c643020, + 0x1c2a0: 0x6cbe8e20, 0x1c2a1: 0x6d2d2020, 0x1c2a2: 0x6c65e020, 0x1c2a3: 0x6cbb2820, + 0x1c2a4: 0x6c2a3420, 0x1c2a5: 0x6d161a20, 0x1c2a6: 0x6c0c8220, 0x1c2a7: 0x6cd93a20, + 0x1c2a8: 0x6ccefe20, 0x1c2a9: 0x6c8c3a20, 0x1c2aa: 0x6c87e420, 0x1c2ab: 0x6c140e20, + 0x1c2ac: 0x6c9b5c20, 0x1c2ad: 0x6d1aa020, 0x1c2ae: 0x6ce24820, 0x1c2af: 0x6cdf4e20, + 0x1c2b0: 0x6c9de020, 0x1c2b1: 0x6cb67020, 0x1c2b2: 0x6ce96820, 0x1c2b3: 0x6c0d5c20, + 0x1c2b4: 0x6c5e0820, 0x1c2b5: 0x6c62aa20, 0x1c2b6: 0x6cb93420, 0x1c2b7: 0x6ca65820, + 0x1c2b8: 0x6ca92a20, 0x1c2b9: 0x6d142220, 0x1c2ba: 0x6c432a20, 0x1c2bb: 0x6c76f620, + 0x1c2bc: 0x6d1b9220, 0x1c2bd: 0x6caa2c20, 0x1c2be: 0x6cbeba20, 0x1c2bf: 0x6d0de620, + // Block 0x70b, offset 0x1c2c0 + 0x1c2c0: 0x6cb67220, 0x1c2c1: 0x6c9d9e20, 0x1c2c2: 0x6d2fe820, 0x1c2c3: 0x6c4b8820, + 0x1c2c4: 0x6c212220, 0x1c2c5: 0x6c5f6a20, 0x1c2c6: 0x6c7ca420, 0x1c2c7: 0x6cb33c20, + 0x1c2c8: 0x6c2af020, 0x1c2c9: 0x6c1eba20, 0x1c2ca: 0x6c449020, 0x1c2cb: 0x6c9de420, + 0x1c2cc: 0x6d1ec220, 0x1c2cd: 0x6d373e20, 0x1c2ce: 0x6c5a6620, 0x1c2cf: 0x6cb93e20, + 0x1c2d0: 0x6c82f420, 0x1c2d1: 0x6c827020, 0x1c2d2: 0x6cc9a820, 0x1c2d3: 0x6c91f220, + 0x1c2d4: 0x6c86cc20, 0x1c2d5: 0x6c24a220, 0x1c2d6: 0x6c941220, 0x1c2d7: 0x6c9efc20, + 0x1c2d8: 0x6c5c7a20, 0x1c2d9: 0x6cab5c20, 0x1c2da: 0x6c916220, 0x1c2db: 0x6d370620, + 0x1c2dc: 0x6c42ea20, 0x1c2dd: 0x6c31d020, 0x1c2de: 0x6d25c620, 0x1c2df: 0x6c86f620, + 0x1c2e0: 0x6c3ae820, 0x1c2e1: 0x6d3dba20, 0x1c2e2: 0x6cda3420, 0x1c2e3: 0x6c886020, + 0x1c2e4: 0x6c681c20, 0x1c2e5: 0x6c1ec420, 0x1c2e6: 0x6cbeec20, 0x1c2e7: 0x6d39e020, + 0x1c2e8: 0x6c918020, 0x1c2e9: 0x6d0cfc20, 0x1c2ea: 0x6c871a20, 0x1c2eb: 0x6d39de20, + 0x1c2ec: 0x6c193e20, 0x1c2ed: 0x6c6b5a20, 0x1c2ee: 0x6c36d820, 0x1c2ef: 0x6cda6820, + 0x1c2f0: 0x6c580020, 0x1c2f1: 0x6ca8a220, 0x1c2f2: 0x6d244e20, 0x1c2f3: 0x6c8fdc20, + 0x1c2f4: 0x6c7f7420, 0x1c2f5: 0x6c69f020, 0x1c2f6: 0x6cfc4620, 0x1c2f7: 0x6c4aa820, + 0x1c2f8: 0x6c71de20, 0x1c2f9: 0x6cff4820, 0x1c2fa: 0x6c8d9a20, 0x1c2fb: 0x6d1c2a20, + 0x1c2fc: 0x6c653c20, 0x1c2fd: 0x6d1b2420, 0x1c2fe: 0x6d1f9620, 0x1c2ff: 0x6d1cc420, + // Block 0x70c, offset 0x1c300 + 0x1c300: 0x6cfd9a20, 0x1c301: 0x6ca9e020, 0x1c302: 0x6c0fb620, 0x1c303: 0x6c156020, + 0x1c304: 0x6c7ff820, 0x1c305: 0x6c71e220, 0x1c306: 0x6cd6b220, 0x1c307: 0x6ccf9020, + 0x1c308: 0x6cef7420, 0x1c309: 0x6c23cc20, 0x1c30a: 0x6cc33020, 0x1c30b: 0x6cc20620, + 0x1c30c: 0x6c126220, 0x1c30d: 0x6c704820, 0x1c30e: 0x6d247a20, 0x1c30f: 0x6c957e20, + 0x1c310: 0x6c878a20, 0x1c311: 0x6c24a820, 0x1c312: 0x6c945c20, 0x1c313: 0x6c294420, + 0x1c314: 0x6c752820, 0x1c315: 0x6d0f3e20, 0x1c316: 0x6c806420, 0x1c317: 0x6c800e20, + 0x1c318: 0x6d3a4620, 0x1c319: 0x6c82a220, 0x1c31a: 0x6c855420, 0x1c31b: 0x6c03e020, + 0x1c31c: 0x6ca46620, 0x1c31d: 0x6d249220, 0x1c31e: 0x6c8dd820, 0x1c31f: 0x6c4a3020, + 0x1c320: 0x6cba3820, 0x1c321: 0x6c22aa20, 0x1c322: 0x6c596a20, 0x1c323: 0x6d02b620, + 0x1c324: 0x6d20b820, 0x1c325: 0x6d16be20, 0x1c326: 0x6cb8b220, 0x1c327: 0x6cab3020, + 0x1c328: 0x6d057820, 0x1c329: 0x6c173c20, 0x1c32a: 0x6c1f1a20, 0x1c32b: 0x6cb78020, + 0x1c32c: 0x6c768220, 0x1c32d: 0x6d173020, 0x1c32e: 0x6c741420, 0x1c32f: 0x6cf87020, + 0x1c330: 0x6d06a420, 0x1c331: 0x6c509820, 0x1c332: 0x6d231420, 0x1c333: 0x6c7cf220, + 0x1c334: 0x6c80ac20, 0x1c335: 0x6c7b6220, 0x1c336: 0x6cd77c20, 0x1c337: 0x6cf5ee20, + 0x1c338: 0x6c002220, 0x1c339: 0x6d13f420, 0x1c33a: 0x6cb4f620, 0x1c33b: 0x6c1f9e20, + 0x1c33c: 0x6c1ba620, 0x1c33d: 0x6cbd3020, 0x1c33e: 0x6c7b6620, 0x1c33f: 0x6c76d420, + // Block 0x70d, offset 0x1c340 + 0x1c340: 0x6c7b6820, 0x1c341: 0x6c76dc20, 0x1c342: 0x6c202220, 0x1c343: 0x6ccc5a20, + 0x1c344: 0x6c485a20, 0x1c345: 0x6d19ea20, 0x1c346: 0x6d02de20, 0x1c347: 0x6d004a20, + 0x1c348: 0x6d215620, 0x1c349: 0x6cba6820, 0x1c34a: 0x6cfeec20, 0x1c34b: 0x6d131620, + 0x1c34c: 0x6c43a020, 0x1c34d: 0x6cf37420, 0x1c34e: 0x6ce0a820, 0x1c34f: 0x6c6d3e20, + 0x1c350: 0x6cab4820, 0x1c351: 0x6c54f820, 0x1c352: 0x6ce40e20, 0x1c353: 0x6c582c20, + 0x1c354: 0x6d05d420, 0x1c355: 0x6cae3820, 0x1c356: 0x6cf81020, 0x1c357: 0x6d000820, + 0x1c358: 0x6c1fa220, 0x1c359: 0x6ccf7820, 0x1c35a: 0x6ccdae20, 0x1c35b: 0x6c4dbe20, + 0x1c35c: 0x6c1f7e20, 0x1c35d: 0x6d18c820, 0x1c35e: 0x6c36c420, 0x1c35f: 0x6d21b420, + 0x1c360: 0x6c21e220, 0x1c361: 0x6c596e20, 0x1c362: 0x6d34cc20, 0x1c363: 0x6d333620, + 0x1c364: 0x6c228a20, 0x1c365: 0x6c105e20, 0x1c366: 0x6cf42c20, 0x1c367: 0x6cb58420, + 0x1c368: 0x6c106e20, 0x1c369: 0x6c107020, 0x1c36a: 0x6cec4e20, 0x1c36b: 0x6c721220, + 0x1c36c: 0x6cb97e20, 0x1c36d: 0x6c1b1620, 0x1c36e: 0x6ccb2a20, 0x1c36f: 0x6c1ba820, + 0x1c370: 0x6ccb3620, 0x1c371: 0x6d37fa20, 0x1c372: 0x6cdc4620, 0x1c373: 0x6cdc4820, + 0x1c374: 0x6c864c20, 0x1c375: 0x6c263420, 0x1c376: 0x6d218220, 0x1c377: 0x6c867c20, + 0x1c378: 0x6c4a9a20, 0x1c379: 0x6c271220, 0x1c37a: 0x6c35ca20, 0x1c37b: 0x6cd86c20, + 0x1c37c: 0x6c646420, 0x1c37d: 0x6d301c20, 0x1c37e: 0x6ca0cc20, 0x1c37f: 0x6ca0ce20, + // Block 0x70e, offset 0x1c380 + 0x1c380: 0x6d109220, 0x1c381: 0x6ca0d020, 0x1c382: 0x6c242020, 0x1c383: 0x6d0f5020, + 0x1c384: 0x6ce4da20, 0x1c385: 0x6cd0ee20, 0x1c386: 0x6c274820, 0x1c387: 0x6cce0020, + 0x1c388: 0x6d06a620, 0x1c389: 0x6d0a7c20, 0x1c38a: 0x6cd4ba20, 0x1c38b: 0x6c118c20, + 0x1c38c: 0x6c742a20, 0x1c38d: 0x6cb19420, 0x1c38e: 0x6cb85c20, 0x1c38f: 0x6cc04820, + 0x1c390: 0x6cdaa420, 0x1c391: 0x6cbe7820, 0x1c392: 0x6d27e620, 0x1c393: 0x6c88ee20, + 0x1c394: 0x6d17a220, 0x1c395: 0x6c3d2a20, 0x1c396: 0x6d346220, 0x1c397: 0x6d12f220, + 0x1c398: 0x6c119620, 0x1c399: 0x6c5cce20, 0x1c39a: 0x6c27e020, 0x1c39b: 0x6c603c20, + 0x1c39c: 0x6c2ebe20, 0x1c39d: 0x6d317c20, 0x1c39e: 0x6d27f220, 0x1c39f: 0x6cf15820, + 0x1c3a0: 0x6c1e4820, 0x1c3a1: 0x6c0d8220, 0x1c3a2: 0x6ce41220, 0x1c3a3: 0x6c6d4020, + 0x1c3a4: 0x6cce1620, 0x1c3a5: 0x6d1a9220, 0x1c3a6: 0x6c2dda20, 0x1c3a7: 0x6c702220, + 0x1c3a8: 0x6c5c3220, 0x1c3a9: 0x6c24b020, 0x1c3aa: 0x6d189820, 0x1c3ab: 0x6c27fc20, + 0x1c3ac: 0x6c327e20, 0x1c3ad: 0x6c678420, 0x1c3ae: 0x6c892020, 0x1c3af: 0x6c0d8c20, + 0x1c3b0: 0x6c31d220, 0x1c3b1: 0x6c674020, 0x1c3b2: 0x6c653e20, 0x1c3b3: 0x6cd49820, + 0x1c3b4: 0x6cab3220, 0x1c3b5: 0x6c32b620, 0x1c3b6: 0x6d3ac020, 0x1c3b7: 0x6d19c020, + 0x1c3b8: 0x6cbec820, 0x1c3b9: 0x6d175e20, 0x1c3ba: 0x6ccbda20, 0x1c3bb: 0x6cbc4020, + 0x1c3bc: 0x6c784e20, 0x1c3bd: 0x6cff8a20, 0x1c3be: 0x6d0a8e20, 0x1c3bf: 0x6c2d5e20, + // Block 0x70f, offset 0x1c3c0 + 0x1c3c0: 0x6c5b5620, 0x1c3c1: 0x6c5b5820, 0x1c3c2: 0x6c47a020, 0x1c3c3: 0x6cbb9020, + 0x1c3c4: 0x6c5f0620, 0x1c3c5: 0x6d185420, 0x1c3c6: 0x6cab4a20, 0x1c3c7: 0x6c5b6220, + 0x1c3c8: 0x6c32da20, 0x1c3c9: 0x6d142420, 0x1c3ca: 0x6cff5c20, 0x1c3cb: 0x6cf39c20, + 0x1c3cc: 0x6c497220, 0x1c3cd: 0x6ca22020, 0x1c3ce: 0x6c9a4820, 0x1c3cf: 0x6c9a4a20, + 0x1c3d0: 0x6c006020, 0x1c3d1: 0x6c6b9420, 0x1c3d2: 0x6c318820, 0x1c3d3: 0x6d239020, + 0x1c3d4: 0x6c08ac20, 0x1c3d5: 0x6c090a20, 0x1c3d6: 0x6c094e20, 0x1c3d7: 0x6cafc220, + 0x1c3d8: 0x6cafc420, 0x1c3d9: 0x6c095e20, 0x1c3da: 0x6c152c20, 0x1c3db: 0x6c98c020, + 0x1c3dc: 0x6c4fbc20, 0x1c3dd: 0x6c111a20, 0x1c3de: 0x6cafba20, 0x1c3df: 0x6c8b9020, + 0x1c3e0: 0x6c633820, 0x1c3e1: 0x6d2d6420, 0x1c3e2: 0x6cc9c020, 0x1c3e3: 0x6ca27620, + 0x1c3e4: 0x6ceb9e20, 0x1c3e5: 0x6d09fc20, 0x1c3e6: 0x6c379020, 0x1c3e7: 0x6cc66620, + 0x1c3e8: 0x6cfbfa20, 0x1c3e9: 0x6c710620, 0x1c3ea: 0x6ca21020, 0x1c3eb: 0x6c4fc420, + 0x1c3ec: 0x6cc04a20, 0x1c3ed: 0x6c311220, 0x1c3ee: 0x6ccbea20, 0x1c3ef: 0x6ce06020, + 0x1c3f0: 0x6cadd620, 0x1c3f1: 0x6c712420, 0x1c3f2: 0x6c343020, 0x1c3f3: 0x6c253c20, + 0x1c3f4: 0x6c087220, 0x1c3f5: 0x6cca0020, 0x1c3f6: 0x6cca6420, 0x1c3f7: 0x6c999420, + 0x1c3f8: 0x6cc9c820, 0x1c3f9: 0x6cd4ea20, 0x1c3fa: 0x6d208e20, 0x1c3fb: 0x6cebac20, + 0x1c3fc: 0x6c513c20, 0x1c3fd: 0x6c668e20, 0x1c3fe: 0x6cde7420, 0x1c3ff: 0x6cca0620, + // Block 0x710, offset 0x1c400 + 0x1c400: 0x6c935e20, 0x1c401: 0x6ca21620, 0x1c402: 0x6c98fa20, 0x1c403: 0x6ce78820, + 0x1c404: 0x6cc72220, 0x1c405: 0x6c16f820, 0x1c406: 0x6cb49820, 0x1c407: 0x6c934e20, + 0x1c408: 0x6d2da820, 0x1c409: 0x6ccafc20, 0x1c40a: 0x6d2daa20, 0x1c40b: 0x6c9b5e20, + 0x1c40c: 0x6c91f420, 0x1c40d: 0x6cc20820, 0x1c40e: 0x6c2f2220, 0x1c40f: 0x6cd2e420, + 0x1c410: 0x6c2b0a20, 0x1c411: 0x6c9f2620, 0x1c412: 0x6c73d220, 0x1c413: 0x6c983620, + 0x1c414: 0x6cb72620, 0x1c415: 0x6cb1c420, 0x1c416: 0x6ca39220, 0x1c417: 0x6cb72e20, + 0x1c418: 0x6c29bc20, 0x1c419: 0x6cfa7a20, 0x1c41a: 0x6c1fde20, 0x1c41b: 0x6c3b1a20, + 0x1c41c: 0x6d0f8820, 0x1c41d: 0x6ca58620, 0x1c41e: 0x6c0d9a20, 0x1c41f: 0x6c3e1020, + 0x1c420: 0x6ccfbc20, 0x1c421: 0x6c2fe620, 0x1c422: 0x6cbe3420, 0x1c423: 0x6cb76a20, + 0x1c424: 0x6d19c220, 0x1c425: 0x6cf5c020, 0x1c426: 0x6c4d6020, 0x1c427: 0x6d100e20, + 0x1c428: 0x6c012220, 0x1c429: 0x6d0b8e20, 0x1c42a: 0x6c78a620, 0x1c42b: 0x6cbe4420, + 0x1c42c: 0x6d0bb020, 0x1c42d: 0x6c300220, 0x1c42e: 0x6c288a20, 0x1c42f: 0x6c93e020, + 0x1c430: 0x6cbe7e20, 0x1c431: 0x6d102620, 0x1c432: 0x6d275620, 0x1c433: 0x6d275c20, + 0x1c434: 0x6cd70220, 0x1c435: 0x6cd73c20, 0x1c436: 0x6d331620, 0x1c437: 0x6c0da420, + 0x1c438: 0x6d1e0c20, 0x1c439: 0x6c294e20, 0x1c43a: 0x6cd73e20, 0x1c43b: 0x6c821020, + 0x1c43c: 0x6ca67820, 0x1c43d: 0x6cea7620, 0x1c43e: 0x6c391420, 0x1c43f: 0x6c4abc20, + // Block 0x711, offset 0x1c440 + 0x1c440: 0x6ce62620, 0x1c441: 0x6d338220, 0x1c442: 0x6cc00020, 0x1c443: 0x6c0d1e20, + 0x1c444: 0x6d2b3620, 0x1c445: 0x6c9dfc20, 0x1c446: 0x6c248c20, 0x1c447: 0x6c5b8820, + 0x1c448: 0x6c2dac20, 0x1c449: 0x6c4e7c20, 0x1c44a: 0x6c142c20, 0x1c44b: 0x6d3d2020, + 0x1c44c: 0x6c202a20, 0x1c44d: 0x6cecba20, 0x1c44e: 0x6c391c20, 0x1c44f: 0x6c26e820, + 0x1c450: 0x6cf57220, 0x1c451: 0x6cea9c20, 0x1c452: 0x6c982a20, 0x1c453: 0x6cbffa20, + 0x1c454: 0x6cb73020, 0x1c455: 0x6ccd6a20, 0x1c456: 0x6cb24220, 0x1c457: 0x6c4e8620, + 0x1c458: 0x6cb89a20, 0x1c459: 0x6cf34620, 0x1c45a: 0x6cf34820, 0x1c45b: 0x6d0a6620, + 0x1c45c: 0x6cd87a20, 0x1c45d: 0x6cc7f420, 0x1c45e: 0x6c45d420, 0x1c45f: 0x6c674220, + 0x1c460: 0x6c1af620, 0x1c461: 0x6cf34a20, 0x1c462: 0x6ce92c20, 0x1c463: 0x6c704220, + 0x1c464: 0x6ce0b820, 0x1c465: 0x6d338c20, 0x1c466: 0x6d34e820, 0x1c467: 0x6cb8a820, + 0x1c468: 0x6c9d1c20, 0x1c469: 0x6c475820, 0x1c46a: 0x6cedc420, 0x1c46b: 0x6c6e0e20, + 0x1c46c: 0x6c6e1020, 0x1c46d: 0x6cc8be20, 0x1c46e: 0x6c755a20, 0x1c46f: 0x6c52f820, + 0x1c470: 0x6cdf6020, 0x1c471: 0x6cc34e20, 0x1c472: 0x6c5fcc20, 0x1c473: 0x6c0b7020, + 0x1c474: 0x6c0b7220, 0x1c475: 0x6c420e20, 0x1c476: 0x6cf1fe20, 0x1c477: 0x6d378820, + 0x1c478: 0x6c398420, 0x1c479: 0x6d045620, 0x1c47a: 0x6c73e020, 0x1c47b: 0x6c561020, + 0x1c47c: 0x6ca96820, 0x1c47d: 0x6cb73820, 0x1c47e: 0x6c3b5620, 0x1c47f: 0x6d067220, + // Block 0x712, offset 0x1c480 + 0x1c480: 0x6d068420, 0x1c481: 0x6cbe0620, 0x1c482: 0x6d146220, 0x1c483: 0x6cf2ce20, + 0x1c484: 0x6d278020, 0x1c485: 0x6d253e20, 0x1c486: 0x6c4f9020, 0x1c487: 0x6d0d3e20, + 0x1c488: 0x6c189c20, 0x1c489: 0x6c189e20, 0x1c48a: 0x6c286820, 0x1c48b: 0x6d1eec20, + 0x1c48c: 0x6c33da20, 0x1c48d: 0x6c565820, 0x1c48e: 0x6c5d9c20, 0x1c48f: 0x6cb4cc20, + 0x1c490: 0x6ca26820, 0x1c491: 0x6caa7620, 0x1c492: 0x6c99d220, 0x1c493: 0x6c268220, + 0x1c494: 0x6c9e0020, 0x1c495: 0x6c9d1e20, 0x1c496: 0x6c1cae20, 0x1c497: 0x6cacce20, + 0x1c498: 0x6c08bc20, 0x1c499: 0x6ccbc420, 0x1c49a: 0x6d34ea20, 0x1c49b: 0x6cae0220, + 0x1c49c: 0x6cac9e20, 0x1c49d: 0x6d3c7620, 0x1c49e: 0x6d288420, 0x1c49f: 0x6c463820, + 0x1c4a0: 0x6c8e4220, 0x1c4a1: 0x6c99d420, 0x1c4a2: 0x6d2aa620, 0x1c4a3: 0x6c3c1c20, + 0x1c4a4: 0x6cab2e20, 0x1c4a5: 0x6c858020, 0x1c4a6: 0x6c94da20, 0x1c4a7: 0x6c122220, + 0x1c4a8: 0x6c3c1e20, 0x1c4a9: 0x6ceee020, 0x1c4aa: 0x6c565a20, 0x1c4ab: 0x6ca0d220, + 0x1c4ac: 0x6c9a7820, 0x1c4ad: 0x6cd59e20, 0x1c4ae: 0x6c71a620, 0x1c4af: 0x6d296220, + 0x1c4b0: 0x6ceab020, 0x1c4b1: 0x6ceaee20, 0x1c4b2: 0x6ceaf020, 0x1c4b3: 0x6c50c820, + 0x1c4b4: 0x6c859020, 0x1c4b5: 0x6c9cdc20, 0x1c4b6: 0x6d147220, 0x1c4b7: 0x6c37e420, + 0x1c4b8: 0x6c3a8820, 0x1c4b9: 0x6d1efe20, 0x1c4ba: 0x6ce48420, 0x1c4bb: 0x6d358a20, + 0x1c4bc: 0x6d2f8820, 0x1c4bd: 0x6c46f220, 0x1c4be: 0x6d2d6020, 0x1c4bf: 0x6d0c6820, + // Block 0x713, offset 0x1c4c0 + 0x1c4c0: 0x6cd7ce20, 0x1c4c1: 0x6c7be420, 0x1c4c2: 0x6c6ef820, 0x1c4c3: 0x6c705c20, + 0x1c4c4: 0x6d016020, 0x1c4c5: 0x6cc00620, 0x1c4c6: 0x6d16c220, 0x1c4c7: 0x6c632c20, + 0x1c4c8: 0x6d379a20, 0x1c4c9: 0x6cc2c220, 0x1c4ca: 0x6cb2fc20, 0x1c4cb: 0x6c5b9020, + 0x1c4cc: 0x6c9d2620, 0x1c4cd: 0x6c077e20, 0x1c4ce: 0x6d2aaa20, 0x1c4cf: 0x6d39f420, + 0x1c4d0: 0x6c821820, 0x1c4d1: 0x6d1e9820, 0x1c4d2: 0x6c46f420, 0x1c4d3: 0x6c530420, + 0x1c4d4: 0x6c417620, 0x1c4d5: 0x6c382e20, 0x1c4d6: 0x6c992e20, 0x1c4d7: 0x6cd89020, + 0x1c4d8: 0x6c54a620, 0x1c4d9: 0x6cb27a20, 0x1c4da: 0x6c229220, 0x1c4db: 0x6c392220, + 0x1c4dc: 0x6d339a20, 0x1c4dd: 0x6cda8020, 0x1c4de: 0x6ca95420, 0x1c4df: 0x6c195420, + 0x1c4e0: 0x6c8cac20, 0x1c4e1: 0x6cad8220, 0x1c4e2: 0x6c0e5220, 0x1c4e3: 0x6cb74620, + 0x1c4e4: 0x6cd88220, 0x1c4e5: 0x6ca5c020, 0x1c4e6: 0x6c70f620, 0x1c4e7: 0x6cc96a20, + 0x1c4e8: 0x6d3ab020, 0x1c4e9: 0x6cd0e220, 0x1c4ea: 0x6c832020, 0x1c4eb: 0x6d087020, + 0x1c4ec: 0x6c73f020, 0x1c4ed: 0x6c3df620, 0x1c4ee: 0x6caca220, 0x1c4ef: 0x6c9f9620, + 0x1c4f0: 0x6cdf6820, 0x1c4f1: 0x6d0f4a20, 0x1c4f2: 0x6c612020, 0x1c4f3: 0x6d1e1420, + 0x1c4f4: 0x6c497c20, 0x1c4f5: 0x6c083a20, 0x1c4f6: 0x6d090020, 0x1c4f7: 0x6c8f6c20, + 0x1c4f8: 0x6c913a20, 0x1c4f9: 0x6c28f420, 0x1c4fa: 0x6c95e020, 0x1c4fb: 0x6d016220, + 0x1c4fc: 0x6cb3c020, 0x1c4fd: 0x6d2aac20, 0x1c4fe: 0x6c6d9020, 0x1c4ff: 0x6d1a3c20, + // Block 0x714, offset 0x1c500 + 0x1c500: 0x6cac5420, 0x1c501: 0x6c6a9020, 0x1c502: 0x6d16f620, 0x1c503: 0x6c5a9820, + 0x1c504: 0x6c5b2620, 0x1c505: 0x6d293020, 0x1c506: 0x6c19ce20, 0x1c507: 0x6d19b420, + 0x1c508: 0x6ceeec20, 0x1c509: 0x6c546620, 0x1c50a: 0x6c665a20, 0x1c50b: 0x6d0f9820, + 0x1c50c: 0x6c8ad420, 0x1c50d: 0x6cd8a820, 0x1c50e: 0x6c61aa20, 0x1c50f: 0x6c374020, + 0x1c510: 0x6d03d020, 0x1c511: 0x6c3e1220, 0x1c512: 0x6cc94c20, 0x1c513: 0x6ccb1820, + 0x1c514: 0x6d350420, 0x1c515: 0x6d1b3e20, 0x1c516: 0x6cf3b620, 0x1c517: 0x6cf7d620, + 0x1c518: 0x6c77a420, 0x1c519: 0x6d398a20, 0x1c51a: 0x6c67da20, 0x1c51b: 0x6c95e820, + 0x1c51c: 0x6c95f420, 0x1c51d: 0x6c01a620, 0x1c51e: 0x6c306420, 0x1c51f: 0x6ce3dc20, + 0x1c520: 0x6ca1c820, 0x1c521: 0x6c832220, 0x1c522: 0x6d13da20, 0x1c523: 0x6c9ce420, + 0x1c524: 0x6cc2c420, 0x1c525: 0x6c6c3020, 0x1c526: 0x6cb37020, 0x1c527: 0x6cef9820, + 0x1c528: 0x6cff7020, 0x1c529: 0x6d017220, 0x1c52a: 0x6c531420, 0x1c52b: 0x6d069420, + 0x1c52c: 0x6cda8620, 0x1c52d: 0x6c7b9220, 0x1c52e: 0x6ce20a20, 0x1c52f: 0x6cbcac20, + 0x1c530: 0x6c71fe20, 0x1c531: 0x6c378a20, 0x1c532: 0x6d386020, 0x1c533: 0x6cc81220, + 0x1c534: 0x6cb28620, 0x1c535: 0x6d09ec20, 0x1c536: 0x6d046020, 0x1c537: 0x6d35a220, + 0x1c538: 0x6c49e020, 0x1c539: 0x6c586420, 0x1c53a: 0x6c9fec20, 0x1c53b: 0x6c5d7020, + 0x1c53c: 0x6cebcc20, 0x1c53d: 0x6cb84c20, 0x1c53e: 0x6cac1e20, 0x1c53f: 0x6cf35820, + // Block 0x715, offset 0x1c540 + 0x1c540: 0x6cc0e820, 0x1c541: 0x6c8e4a20, 0x1c542: 0x6d16f820, 0x1c543: 0x6c633a20, + 0x1c544: 0x6c6e5a20, 0x1c545: 0x6cb9f420, 0x1c546: 0x6c675420, 0x1c547: 0x6c683220, + 0x1c548: 0x6d312a20, 0x1c549: 0x6cd1ac20, 0x1c54a: 0x6d3d3420, 0x1c54b: 0x6c12d420, + 0x1c54c: 0x6c380020, 0x1c54d: 0x6c5b9c20, 0x1c54e: 0x6c61ac20, 0x1c54f: 0x6c8e4620, + 0x1c550: 0x6c159c20, 0x1c551: 0x6c5ce020, 0x1c552: 0x6c561420, 0x1c553: 0x6ca9b420, + 0x1c554: 0x6d09ee20, 0x1c555: 0x6c6ce220, 0x1c556: 0x6c8aee20, 0x1c557: 0x6cc03220, + 0x1c558: 0x6cefa220, 0x1c559: 0x6d30ea20, 0x1c55a: 0x6c75a620, 0x1c55b: 0x6c4df620, + 0x1c55c: 0x6c052620, 0x1c55d: 0x6c985220, 0x1c55e: 0x6d3d3a20, 0x1c55f: 0x6d1f1820, + 0x1c560: 0x6cf5c220, 0x1c561: 0x6c0ed620, 0x1c562: 0x6c310420, 0x1c563: 0x6c590420, + 0x1c564: 0x6c532a20, 0x1c565: 0x6d173220, 0x1c566: 0x6cb48820, 0x1c567: 0x6d1ce420, + 0x1c568: 0x6c802420, 0x1c569: 0x6c502e20, 0x1c56a: 0x6c811820, 0x1c56b: 0x6c4e5620, + 0x1c56c: 0x6c850c20, 0x1c56d: 0x6c44be20, 0x1c56e: 0x6c3e3620, 0x1c56f: 0x6cf3b820, + 0x1c570: 0x6c88ea20, 0x1c571: 0x6c213a20, 0x1c572: 0x6c3ca220, 0x1c573: 0x6d173420, + 0x1c574: 0x6d22f220, 0x1c575: 0x6ce73420, 0x1c576: 0x6c815420, 0x1c577: 0x6c4d3a20, + 0x1c578: 0x6c6cee20, 0x1c579: 0x6c634220, 0x1c57a: 0x6c1cb820, 0x1c57b: 0x6c6f0820, + 0x1c57c: 0x6c9a5220, 0x1c57d: 0x6cdbb820, 0x1c57e: 0x6c195e20, 0x1c57f: 0x6cae1420, + // Block 0x716, offset 0x1c580 + 0x1c580: 0x6cfcaa20, 0x1c581: 0x6cd09820, 0x1c582: 0x6ce92e20, 0x1c583: 0x6c7dd020, + 0x1c584: 0x6cb25020, 0x1c585: 0x6ca80820, 0x1c586: 0x6c4e9c20, 0x1c587: 0x6c6da020, + 0x1c588: 0x6cfea220, 0x1c589: 0x6ccf3c20, 0x1c58a: 0x6ca71e20, 0x1c58b: 0x6ce84e20, + 0x1c58c: 0x6d1e2620, 0x1c58d: 0x6cffe020, 0x1c58e: 0x6cfb3620, 0x1c58f: 0x6ce6bc20, + 0x1c590: 0x6c355820, 0x1c591: 0x6cda8e20, 0x1c592: 0x6cea1c20, 0x1c593: 0x6c72e620, + 0x1c594: 0x6c132c20, 0x1c595: 0x6ce3e220, 0x1c596: 0x6c85d020, 0x1c597: 0x6cd71620, + 0x1c598: 0x6cd8aa20, 0x1c599: 0x6c832820, 0x1c59a: 0x6cd71820, 0x1c59b: 0x6ce1be20, + 0x1c59c: 0x6c318e20, 0x1c59d: 0x6c81ce20, 0x1c59e: 0x6c7eec20, 0x1c59f: 0x6c87f620, + 0x1c5a0: 0x6ceef620, 0x1c5a1: 0x6cf28020, 0x1c5a2: 0x6d279a20, 0x1c5a3: 0x6c590620, + 0x1c5a4: 0x6c2b6420, 0x1c5a5: 0x6c528a20, 0x1c5a6: 0x6cc8fa20, 0x1c5a7: 0x6c666e20, + 0x1c5a8: 0x6d2f0220, 0x1c5a9: 0x6ccb1c20, 0x1c5aa: 0x6c3e5220, 0x1c5ab: 0x6c498420, + 0x1c5ac: 0x6d042a20, 0x1c5ad: 0x6cd46420, 0x1c5ae: 0x6cd69020, 0x1c5af: 0x6d0b2a20, + 0x1c5b0: 0x6c21b620, 0x1c5b1: 0x6d2f2e20, 0x1c5b2: 0x6d12e820, 0x1c5b3: 0x6c797620, + 0x1c5b4: 0x6cf2e420, 0x1c5b5: 0x6c4e0220, 0x1c5b6: 0x6ceac020, 0x1c5b7: 0x6c2ffa20, + 0x1c5b8: 0x6c510820, 0x1c5b9: 0x6cf28620, 0x1c5ba: 0x6c708e20, 0x1c5bb: 0x6ccf4020, + 0x1c5bc: 0x6c894e20, 0x1c5bd: 0x6c5cc220, 0x1c5be: 0x6cde4e20, 0x1c5bf: 0x6d3cfe20, + // Block 0x717, offset 0x1c5c0 + 0x1c5c0: 0x6c2d5220, 0x1c5c1: 0x6cbcb620, 0x1c5c2: 0x6c2a6a20, 0x1c5c3: 0x6c735620, + 0x1c5c4: 0x6d3e2420, 0x1c5c5: 0x6cf5f020, 0x1c5c6: 0x6cff8220, 0x1c5c7: 0x6cb5ca20, + 0x1c5c8: 0x6c477e20, 0x1c5c9: 0x6c4cb820, 0x1c5ca: 0x6d0bf620, 0x1c5cb: 0x6c8bb020, + 0x1c5cc: 0x6ce17420, 0x1c5cd: 0x6d387620, 0x1c5ce: 0x6caf0420, 0x1c5cf: 0x6c503820, + 0x1c5d0: 0x6c166620, 0x1c5d1: 0x6cd4cc20, 0x1c5d2: 0x6cb4ea20, 0x1c5d3: 0x6c399020, + 0x1c5d4: 0x6d345820, 0x1c5d5: 0x6c923c20, 0x1c5d6: 0x6ca53020, 0x1c5d7: 0x6c711420, + 0x1c5d8: 0x6ce21e20, 0x1c5d9: 0x6c239c20, 0x1c5da: 0x6c833020, 0x1c5db: 0x6d30f020, + 0x1c5dc: 0x6cb29c20, 0x1c5dd: 0x6c3a3420, 0x1c5de: 0x6cd91c20, 0x1c5df: 0x6ce4ee20, + 0x1c5e0: 0x6cb09020, 0x1c5e1: 0x6c288020, 0x1c5e2: 0x6d231620, 0x1c5e3: 0x6ca5d820, + 0x1c5e4: 0x6d208620, 0x1c5e5: 0x6c923e20, 0x1c5e6: 0x6c421a20, 0x1c5e7: 0x6c9d3a20, + 0x1c5e8: 0x6c6e7420, 0x1c5e9: 0x6c8ce820, 0x1c5ea: 0x6c94f420, 0x1c5eb: 0x6d1a5c20, + 0x1c5ec: 0x6c253620, 0x1c5ed: 0x6cc18820, 0x1c5ee: 0x6c57ea20, 0x1c5ef: 0x6d231820, + 0x1c5f0: 0x6ca72220, 0x1c5f1: 0x6ccfde20, 0x1c5f2: 0x6c0bf620, 0x1c5f3: 0x6c214220, + 0x1c5f4: 0x6c54c220, 0x1c5f5: 0x6d24ec20, 0x1c5f6: 0x6c7efc20, 0x1c5f7: 0x6c5d2620, + 0x1c5f8: 0x6cbe4620, 0x1c5f9: 0x6d0bf820, 0x1c5fa: 0x6cba0220, 0x1c5fb: 0x6ce46220, + 0x1c5fc: 0x6c9e9020, 0x1c5fd: 0x6d350c20, 0x1c5fe: 0x6d1ae420, 0x1c5ff: 0x6c9d3c20, + // Block 0x718, offset 0x1c600 + 0x1c600: 0x6c07b220, 0x1c601: 0x6d24de20, 0x1c602: 0x6cf20820, 0x1c603: 0x6cc91c20, + 0x1c604: 0x6c39fa20, 0x1c605: 0x6cbe4820, 0x1c606: 0x6d24e020, 0x1c607: 0x6c786220, + 0x1c608: 0x6c61f220, 0x1c609: 0x6ccf4220, 0x1c60a: 0x6d24e220, 0x1c60b: 0x6ccba420, + 0x1c60c: 0x6c924020, 0x1c60d: 0x6d3f4420, 0x1c60e: 0x6c319620, 0x1c60f: 0x6cb81420, + 0x1c610: 0x6c667a20, 0x1c611: 0x6c9e1c20, 0x1c612: 0x6cb09220, 0x1c613: 0x6cf94420, + 0x1c614: 0x6d210220, 0x1c615: 0x6d24e420, 0x1c616: 0x6cd05c20, 0x1c617: 0x6cd09e20, + 0x1c618: 0x6cc74c20, 0x1c619: 0x6c592420, 0x1c61a: 0x6d3a6420, 0x1c61b: 0x6c659620, + 0x1c61c: 0x6caa9020, 0x1c61d: 0x6d212a20, 0x1c61e: 0x6cc06220, 0x1c61f: 0x6ce67220, + 0x1c620: 0x6cc18a20, 0x1c621: 0x6c325c20, 0x1c622: 0x6c389e20, 0x1c623: 0x6d2bdc20, + 0x1c624: 0x6c0f0420, 0x1c625: 0x6cf2f220, 0x1c626: 0x6cf28820, 0x1c627: 0x6c2c5820, + 0x1c628: 0x6cee8e20, 0x1c629: 0x6cf15020, 0x1c62a: 0x6cc7ac20, 0x1c62b: 0x6d01ae20, + 0x1c62c: 0x6c12ea20, 0x1c62d: 0x6cf09820, 0x1c62e: 0x6c510a20, 0x1c62f: 0x6c42a220, + 0x1c630: 0x6d0d8a20, 0x1c631: 0x6c534a20, 0x1c632: 0x6d089420, 0x1c633: 0x6c9cf220, + 0x1c634: 0x6c786a20, 0x1c635: 0x6c98da20, 0x1c636: 0x6d1bb020, 0x1c637: 0x6d0d8c20, + 0x1c638: 0x6d1f3820, 0x1c639: 0x6c52a620, 0x1c63a: 0x6c9e9220, 0x1c63b: 0x6cd13a20, + 0x1c63c: 0x6c9a5a20, 0x1c63d: 0x6d290420, 0x1c63e: 0x6c5cec20, 0x1c63f: 0x6ca3c420, + // Block 0x719, offset 0x1c640 + 0x1c640: 0x6c4afe20, 0x1c641: 0x6c1c2020, 0x1c642: 0x6c363820, 0x1c643: 0x6cac2620, + 0x1c644: 0x6c99fc20, 0x1c645: 0x6c88fc20, 0x1c646: 0x6cb79620, 0x1c647: 0x6cb79820, + 0x1c648: 0x6c99fe20, 0x1c649: 0x6ce4a020, 0x1c64a: 0x6c23ec20, 0x1c64b: 0x6cef1020, + 0x1c64c: 0x6c116a20, 0x1c64d: 0x6ce93220, 0x1c64e: 0x6c9e2620, 0x1c64f: 0x6c5bc420, + 0x1c650: 0x6ca11a20, 0x1c651: 0x6d059c20, 0x1c652: 0x6c604020, 0x1c653: 0x6cae4020, + 0x1c654: 0x6c649e20, 0x1c655: 0x6c658a20, 0x1c656: 0x6c555e20, 0x1c657: 0x6c3ce020, + 0x1c658: 0x6cfd7420, 0x1c659: 0x6d17a820, 0x1c65a: 0x6d1b5420, 0x1c65b: 0x6d2e6420, + 0x1c65c: 0x6cd26a20, 0x1c65d: 0x6c6a1820, 0x1c65e: 0x6c197020, 0x1c65f: 0x6c59c620, + 0x1c660: 0x6ce09a20, 0x1c661: 0x6d212c20, 0x1c662: 0x6c09a220, 0x1c663: 0x6c9fb020, + 0x1c664: 0x6cd1be20, 0x1c665: 0x6ce86020, 0x1c666: 0x6cd10220, 0x1c667: 0x6d1e3a20, + 0x1c668: 0x6c712620, 0x1c669: 0x6c307820, 0x1c66a: 0x6ce98a20, 0x1c66b: 0x6c68f620, + 0x1c66c: 0x6c690820, 0x1c66d: 0x6cc06420, 0x1c66e: 0x6d0c0820, 0x1c66f: 0x6ce0c020, + 0x1c670: 0x6c8f9420, 0x1c671: 0x6c5dd220, 0x1c672: 0x6d256420, 0x1c673: 0x6ca42820, + 0x1c674: 0x6c04f620, 0x1c675: 0x6d1fcc20, 0x1c676: 0x6cc2f020, 0x1c677: 0x6d3c1820, + 0x1c678: 0x6c89ba20, 0x1c679: 0x6c14f620, 0x1c67a: 0x6d0c9620, 0x1c67b: 0x6c214c20, + 0x1c67c: 0x6ca83020, 0x1c67d: 0x6d3e3e20, 0x1c67e: 0x6cec9020, 0x1c67f: 0x6cd1c020, + // Block 0x71a, offset 0x1c680 + 0x1c680: 0x6c97ba20, 0x1c681: 0x6d1c7220, 0x1c682: 0x6c7ed620, 0x1c683: 0x6c7cfc20, + 0x1c684: 0x6c3d0020, 0x1c685: 0x6c669020, 0x1c686: 0x6d06da20, 0x1c687: 0x6c908a20, + 0x1c688: 0x6cef1220, 0x1c689: 0x6c413620, 0x1c68a: 0x6cfa6620, 0x1c68b: 0x6d1c7420, + 0x1c68c: 0x6cb31020, 0x1c68d: 0x6c6d1820, 0x1c68e: 0x6d0e8620, 0x1c68f: 0x6ce10420, + 0x1c690: 0x6d258220, 0x1c691: 0x6cdd7a20, 0x1c692: 0x6d258420, 0x1c693: 0x6c881420, + 0x1c694: 0x6d11b820, 0x1c695: 0x6c9c0620, 0x1c696: 0x6d3cde20, 0x1c697: 0x6c1a1c20, + 0x1c698: 0x6c78ba20, 0x1c699: 0x6cdf7a20, 0x1c69a: 0x6cde0a20, 0x1c69b: 0x6cebe420, + 0x1c69c: 0x6c8e3620, 0x1c69d: 0x6c465220, 0x1c69e: 0x6ccaae20, 0x1c69f: 0x6ca00620, + 0x1c6a0: 0x6d2cc420, 0x1c6a1: 0x6cd27220, 0x1c6a2: 0x6d17e820, 0x1c6a3: 0x6c952220, + 0x1c6a4: 0x6c969a20, 0x1c6a5: 0x6cb48e20, 0x1c6a6: 0x6cee9e20, 0x1c6a7: 0x6c863420, + 0x1c6a8: 0x6c111220, 0x1c6a9: 0x6cf50020, 0x1c6aa: 0x6cf64c20, 0x1c6ab: 0x6cf15a20, + 0x1c6ac: 0x6cbaba20, 0x1c6ad: 0x6d2ace20, 0x1c6ae: 0x6cd1ce20, 0x1c6af: 0x6cdace20, + 0x1c6b0: 0x6c004220, 0x1c6b1: 0x6cbd8420, 0x1c6b2: 0x6cd9b220, 0x1c6b3: 0x6d27b220, + 0x1c6b4: 0x6d054420, 0x1c6b5: 0x6d19ec20, 0x1c6b6: 0x6cc68a20, 0x1c6b7: 0x6c5d2e20, + 0x1c6b8: 0x6cdad020, 0x1c6b9: 0x6cddcc20, 0x1c6ba: 0x6ca6ac20, 0x1c6bb: 0x6cddf420, + 0x1c6bc: 0x6cd1d020, 0x1c6bd: 0x6cc81c20, 0x1c6be: 0x6c002a20, 0x1c6bf: 0x6cacba20, + // Block 0x71b, offset 0x1c6c0 + 0x1c6c0: 0x6c1f5020, 0x1c6c1: 0x6c1e7e20, 0x1c6c2: 0x6cacdc20, 0x1c6c3: 0x6cf22c20, + 0x1c6c4: 0x6c123220, 0x1c6c5: 0x6c9ede20, 0x1c6c6: 0x6c440620, 0x1c6c7: 0x6c2cce20, + 0x1c6c8: 0x6c504420, 0x1c6c9: 0x6c5a7020, 0x1c6ca: 0x6cf8a020, 0x1c6cb: 0x6d3e4020, + 0x1c6cc: 0x6c2b7220, 0x1c6cd: 0x6d365a20, 0x1c6ce: 0x6d03f220, 0x1c6cf: 0x6c3f6c20, + 0x1c6d0: 0x6c6aea20, 0x1c6d1: 0x6c573e20, 0x1c6d2: 0x6c439a20, 0x1c6d3: 0x6d3f1a20, + 0x1c6d4: 0x6ce1d820, 0x1c6d5: 0x6ce2aa20, 0x1c6d6: 0x6cdbc820, 0x1c6d7: 0x6c09c820, + 0x1c6d8: 0x6c69a420, 0x1c6d9: 0x6c5be620, 0x1c6da: 0x6c4bce20, 0x1c6db: 0x6d1a7020, + 0x1c6dc: 0x6c42ca20, 0x1c6dd: 0x6c8f9620, 0x1c6de: 0x6d362c20, 0x1c6df: 0x6d0e8820, + 0x1c6e0: 0x6ccf5820, 0x1c6e1: 0x6c97be20, 0x1c6e2: 0x6d1c8020, 0x1c6e3: 0x6c215020, + 0x1c6e4: 0x6c93e620, 0x1c6e5: 0x6c807420, 0x1c6e6: 0x6c943e20, 0x1c6e7: 0x6d003420, + 0x1c6e8: 0x6c0d3c20, 0x1c6e9: 0x6cdfb020, 0x1c6ea: 0x6d236e20, 0x1c6eb: 0x6d052420, + 0x1c6ec: 0x6c56b820, 0x1c6ed: 0x6c09ca20, 0x1c6ee: 0x6c0c0c20, 0x1c6ef: 0x6d368e20, + 0x1c6f0: 0x6c67f220, 0x1c6f1: 0x6c79f620, 0x1c6f2: 0x6cd0be20, 0x1c6f3: 0x6cce0e20, + 0x1c6f4: 0x6c2b3a20, 0x1c6f5: 0x6c9d6820, 0x1c6f6: 0x6c025220, 0x1c6f7: 0x6c91cc20, + 0x1c6f8: 0x6c562820, 0x1c6f9: 0x6c54e820, 0x1c6fa: 0x6d1eac20, 0x1c6fb: 0x6c15cc20, + 0x1c6fc: 0x6c396420, 0x1c6fd: 0x6d1d9e20, 0x1c6fe: 0x6c4bd620, 0x1c6ff: 0x6c97c420, + // Block 0x71c, offset 0x1c700 + 0x1c700: 0x6cbeae20, 0x1c701: 0x6d216e20, 0x1c702: 0x6cb1b820, 0x1c703: 0x6c623e20, + 0x1c704: 0x6d0b3420, 0x1c705: 0x6c176e20, 0x1c706: 0x6cb51220, 0x1c707: 0x6cf7fe20, + 0x1c708: 0x6c624020, 0x1c709: 0x6c928620, 0x1c70a: 0x6c90a620, 0x1c70b: 0x6c8f9c20, + 0x1c70c: 0x6c6ca020, 0x1c70d: 0x6c4c7a20, 0x1c70e: 0x6c23a620, 0x1c70f: 0x6c910e20, + 0x1c710: 0x6d349020, 0x1c711: 0x6c414c20, 0x1c712: 0x6cbb1a20, 0x1c713: 0x6c83e220, + 0x1c714: 0x6d0db420, 0x1c715: 0x6c127e20, 0x1c716: 0x6c69b020, 0x1c717: 0x6c232a20, + 0x1c718: 0x6c215620, 0x1c719: 0x6ce95620, 0x1c71a: 0x6cab4020, 0x1c71b: 0x6ce2a820, + 0x1c71c: 0x6d12b020, 0x1c71d: 0x6cf79220, 0x1c71e: 0x6c9d6a20, 0x1c71f: 0x6ce11220, + 0x1c720: 0x6ca12c20, 0x1c721: 0x6cce1020, 0x1c722: 0x6c4ee620, 0x1c723: 0x6c881620, + 0x1c724: 0x6c803220, 0x1c725: 0x6cebe820, 0x1c726: 0x6c1b4820, 0x1c727: 0x6c41aa20, + 0x1c728: 0x6c3cae20, 0x1c729: 0x6d081a20, 0x1c72a: 0x6d140420, 0x1c72b: 0x6c97ec20, + 0x1c72c: 0x6d3f5c20, 0x1c72d: 0x6c989620, 0x1c72e: 0x6c774020, 0x1c72f: 0x6c961620, + 0x1c730: 0x6cae7a20, 0x1c731: 0x6cd5f420, 0x1c732: 0x6d2f0620, 0x1c733: 0x6d2eca20, + 0x1c734: 0x6d3c4620, 0x1c735: 0x6d070c20, 0x1c736: 0x6c594020, 0x1c737: 0x6c5d9020, + 0x1c738: 0x6c66aa20, 0x1c739: 0x6d0c1c20, 0x1c73a: 0x6cd6d820, 0x1c73b: 0x6c89f820, + 0x1c73c: 0x6c24fa20, 0x1c73d: 0x6ce36420, 0x1c73e: 0x6d106020, 0x1c73f: 0x6c677220, + // Block 0x71d, offset 0x1c740 + 0x1c740: 0x6c23a820, 0x1c741: 0x6d1d0620, 0x1c742: 0x6c537220, 0x1c743: 0x6d0a1c20, + 0x1c744: 0x6cd5f620, 0x1c745: 0x6c499a20, 0x1c746: 0x6d1c8620, 0x1c747: 0x6cfeee20, + 0x1c748: 0x6d404220, 0x1c749: 0x6c7de020, 0x1c74a: 0x6d070e20, 0x1c74b: 0x6c890c20, + 0x1c74c: 0x6d369020, 0x1c74d: 0x6cef2020, 0x1c74e: 0x6cb0ac20, 0x1c74f: 0x6d23c420, + 0x1c750: 0x6c69be20, 0x1c751: 0x6cb3c420, 0x1c752: 0x6c297820, 0x1c753: 0x6c5c1820, + 0x1c754: 0x6c6b1c20, 0x1c755: 0x6cf46820, 0x1c756: 0x6cabdc20, 0x1c757: 0x6c608620, + 0x1c758: 0x6cac4220, 0x1c759: 0x6cef2c20, 0x1c75a: 0x6cdb1820, 0x1c75b: 0x6cb9b820, + 0x1c75c: 0x6cb9ba20, 0x1c75d: 0x6cf69c20, 0x1c75e: 0x6c92cc20, 0x1c75f: 0x6cf8c620, + 0x1c760: 0x6d0aa220, 0x1c761: 0x6c340620, 0x1c762: 0x6c59da20, 0x1c763: 0x6c9fc620, + 0x1c764: 0x6cc90420, 0x1c765: 0x6cdb0020, 0x1c766: 0x6c81b820, 0x1c767: 0x6d318a20, + 0x1c768: 0x6c23aa20, 0x1c769: 0x6d182820, 0x1c76a: 0x6d30fe20, 0x1c76b: 0x6cec9820, + 0x1c76c: 0x6ccd9e20, 0x1c76d: 0x6ce00420, 0x1c76e: 0x6c177620, 0x1c76f: 0x6d0a3220, + 0x1c770: 0x6c7d0e20, 0x1c771: 0x6d126420, 0x1c772: 0x6ccee420, 0x1c773: 0x6ce8da20, + 0x1c774: 0x6d39bc20, 0x1c775: 0x6cc95820, 0x1c776: 0x6c522220, 0x1c777: 0x6c0a2a20, + 0x1c778: 0x6ccd0820, 0x1c779: 0x6c151c20, 0x1c77a: 0x6c151e20, 0x1c77b: 0x6cd56820, + 0x1c77c: 0x6ce77c20, 0x1c77d: 0x6cb41020, 0x1c77e: 0x6c8bce20, 0x1c77f: 0x6cef2e20, + // Block 0x71e, offset 0x1c780 + 0x1c780: 0x6ccb6c20, 0x1c781: 0x6ccb4620, 0x1c782: 0x6c1a3820, 0x1c783: 0x6c6f3020, + 0x1c784: 0x6c1a3a20, 0x1c785: 0x6c57be20, 0x1c786: 0x6c686c20, 0x1c787: 0x6c81dc20, + 0x1c788: 0x6c183420, 0x1c789: 0x6c41e020, 0x1c78a: 0x6c259c20, 0x1c78b: 0x6c53cc20, + 0x1c78c: 0x6cd81820, 0x1c78d: 0x6cd60220, 0x1c78e: 0x6cae8420, 0x1c78f: 0x6c4e2a20, + 0x1c790: 0x6d27c020, 0x1c791: 0x6c8f3c20, 0x1c792: 0x6c53ce20, 0x1c793: 0x6c3ed820, + 0x1c794: 0x6c505a20, 0x1c795: 0x6c513e20, 0x1c796: 0x6cfb8020, 0x1c797: 0x6c66b620, + 0x1c798: 0x6ccd0a20, 0x1c799: 0x6cf8c820, 0x1c79a: 0x6d24c220, 0x1c79b: 0x6c934c20, + 0x1c79c: 0x6c7fac20, 0x1c79d: 0x6ca96020, 0x1c79e: 0x6d21a220, 0x1c79f: 0x6c8c3420, + 0x1c7a0: 0x6c9e4020, 0x1c7a1: 0x6d2a5020, 0x1c7a2: 0x6c290420, 0x1c7a3: 0x6c595420, + 0x1c7a4: 0x6d2afc20, 0x1c7a5: 0x6d021620, 0x1c7a6: 0x6d23ea20, 0x1c7a7: 0x6c853020, + 0x1c7a8: 0x6cd3da20, 0x1c7a9: 0x6d091c20, 0x1c7aa: 0x6c8d5820, 0x1c7ab: 0x6ced9420, + 0x1c7ac: 0x6d3e8a20, 0x1c7ad: 0x6d1db420, 0x1c7ae: 0x6c5c3420, 0x1c7af: 0x6c120420, + 0x1c7b0: 0x6c891620, 0x1c7b1: 0x6c2d8420, 0x1c7b2: 0x6d134020, 0x1c7b3: 0x6c02ec20, + 0x1c7b4: 0x6c589820, 0x1c7b5: 0x6d319220, 0x1c7b6: 0x6c152420, 0x1c7b7: 0x6c980420, + 0x1c7b8: 0x6c284420, 0x1c7b9: 0x6c28b220, 0x1c7ba: 0x6d189e20, 0x1c7bb: 0x6cdc5c20, + 0x1c7bc: 0x6cb0ba20, 0x1c7bd: 0x6c728e20, 0x1c7be: 0x6cde8e20, 0x1c7bf: 0x6cbda420, + // Block 0x71f, offset 0x1c7c0 + 0x1c7c0: 0x6c5f3420, 0x1c7c1: 0x6d3d9a20, 0x1c7c2: 0x6c884c20, 0x1c7c3: 0x6ca9c620, + 0x1c7c4: 0x6c4c3020, 0x1c7c5: 0x6c6d4e20, 0x1c7c6: 0x6c3b8c20, 0x1c7c7: 0x6ccb5a20, + 0x1c7c8: 0x6c608820, 0x1c7c9: 0x6cdbda20, 0x1c7ca: 0x6c5c3620, 0x1c7cb: 0x6c1eea20, + 0x1c7cc: 0x6cdeac20, 0x1c7cd: 0x6cd93620, 0x1c7ce: 0x6c2f7e20, 0x1c7cf: 0x6ccba620, + 0x1c7d0: 0x6d3a7e20, 0x1c7d1: 0x6c7f5620, 0x1c7d2: 0x6c0d5220, 0x1c7d3: 0x6c884e20, + 0x1c7d4: 0x6c9d0220, 0x1c7d5: 0x6cd20220, 0x1c7d6: 0x6cd60c20, 0x1c7d7: 0x6c9d8620, + 0x1c7d8: 0x6ca95a20, 0x1c7d9: 0x6d1ca220, 0x1c7da: 0x6d1ca420, 0x1c7db: 0x6c9b4c20, + 0x1c7dc: 0x6c6d5e20, 0x1c7dd: 0x6cb65e20, 0x1c7de: 0x6c0a7020, 0x1c7df: 0x6c629820, + 0x1c7e0: 0x6c4ff420, 0x1c7e1: 0x6cc7d220, 0x1c7e2: 0x6c256a20, 0x1c7e3: 0x6cf31c20, + 0x1c7e4: 0x6ce1f020, 0x1c7e5: 0x6d1b0e20, 0x1c7e6: 0x6d1b1020, 0x1c7e7: 0x6c336820, + 0x1c7e8: 0x6c226c20, 0x1c7e9: 0x6c5df820, 0x1c7ea: 0x6c6eb220, 0x1c7eb: 0x6c807c20, + 0x1c7ec: 0x6c75f020, 0x1c7ed: 0x6c007820, 0x1c7ee: 0x6cb45820, 0x1c7ef: 0x6d3db020, + 0x1c7f0: 0x6cef4020, 0x1c7f1: 0x6c0d5420, 0x1c7f2: 0x6c47d620, 0x1c7f3: 0x6cb9d620, + 0x1c7f4: 0x6d1ca620, 0x1c7f5: 0x6c0d9c20, 0x1c7f6: 0x6c7e1c20, 0x1c7f7: 0x6c3ade20, + 0x1c7f8: 0x6c125e20, 0x1c7f9: 0x6c99c820, 0x1c7fa: 0x6c66f020, 0x1c7fb: 0x6cf02620, + 0x1c7fc: 0x6c963420, 0x1c7fd: 0x6d29a420, 0x1c7fe: 0x6c940e20, 0x1c7ff: 0x6c869e20, + // Block 0x720, offset 0x1c800 + 0x1c800: 0x6d1ebe20, 0x1c801: 0x6d106e20, 0x1c802: 0x6c91ea20, 0x1c803: 0x6cd8f420, + 0x1c804: 0x6d36e220, 0x1c805: 0x6d1cb220, 0x1c806: 0x6c31cc20, 0x1c807: 0x6cee3c20, + 0x1c808: 0x6c5afc20, 0x1c809: 0x6d024020, 0x1c80a: 0x6cac8020, 0x1c80b: 0x6cd08420, + 0x1c80c: 0x6c0c3820, 0x1c80d: 0x6c153820, 0x1c80e: 0x6ca17220, 0x1c80f: 0x6c8eba20, + 0x1c810: 0x6c651620, 0x1c811: 0x6cb4ba20, 0x1c812: 0x6ccb7420, 0x1c813: 0x6c1a4e20, + 0x1c814: 0x6c47e220, 0x1c815: 0x6c0d6820, 0x1c816: 0x6c5e2820, 0x1c817: 0x6cfd3020, + 0x1c818: 0x6c917220, 0x1c819: 0x6cbe2620, 0x1c81a: 0x6c4f2c20, 0x1c81b: 0x6d1cba20, + 0x1c81c: 0x6cc6d820, 0x1c81d: 0x6c86f820, 0x1c81e: 0x6c6eb420, 0x1c81f: 0x6cff3a20, + 0x1c820: 0x6d1cbc20, 0x1c821: 0x6cdc0e20, 0x1c822: 0x6cf03c20, 0x1c823: 0x6d025620, + 0x1c824: 0x6c57fc20, 0x1c825: 0x6d097820, 0x1c826: 0x6d39d420, 0x1c827: 0x6c8fc620, + 0x1c828: 0x6c7f6a20, 0x1c829: 0x6c337820, 0x1c82a: 0x6c38de20, 0x1c82b: 0x6c55ee20, + 0x1c82c: 0x6c7f6c20, 0x1c82d: 0x6cd63420, 0x1c82e: 0x6c8e3220, 0x1c82f: 0x6d1cbe20, + 0x1c830: 0x6c9ca020, 0x1c831: 0x6c62c820, 0x1c832: 0x6c892c20, 0x1c833: 0x6c66fe20, + 0x1c834: 0x6d1cc620, 0x1c835: 0x6c3c0220, 0x1c836: 0x6c8c0020, 0x1c837: 0x6d192c20, + 0x1c838: 0x6c653220, 0x1c839: 0x6d270a20, 0x1c83a: 0x6c155620, 0x1c83b: 0x6c27a620, + 0x1c83c: 0x6cc4e620, 0x1c83d: 0x6c661820, 0x1c83e: 0x6c7fe820, 0x1c83f: 0x6c38e020, + // Block 0x721, offset 0x1c840 + 0x1c840: 0x6cd6f420, 0x1c841: 0x6d252620, 0x1c842: 0x6d3dd420, 0x1c843: 0x6c3c8020, + 0x1c844: 0x6ccf8c20, 0x1c845: 0x6c830220, 0x1c846: 0x6c7fea20, 0x1c847: 0x6c23c620, + 0x1c848: 0x6cc20020, 0x1c849: 0x6d1dda20, 0x1c84a: 0x6cb9e020, 0x1c84b: 0x6c383620, + 0x1c84c: 0x6c49b420, 0x1c84d: 0x6cc41a20, 0x1c84e: 0x6d0f2220, 0x1c84f: 0x6c507c20, + 0x1c850: 0x6d1d7020, 0x1c851: 0x6cc95c20, 0x1c852: 0x6d29ba20, 0x1c853: 0x6c946020, + 0x1c854: 0x6d0f0420, 0x1c855: 0x6c84a820, 0x1c856: 0x6c9d0e20, 0x1c857: 0x6ccde820, + 0x1c858: 0x6cdfc620, 0x1c859: 0x6c293e20, 0x1c85a: 0x6c697620, 0x1c85b: 0x6c161820, + 0x1c85c: 0x6d1d7220, 0x1c85d: 0x6c508420, 0x1c85e: 0x6c03dc20, 0x1c85f: 0x6d3a4220, + 0x1c860: 0x6c805e20, 0x1c861: 0x6c800820, 0x1c862: 0x6ca47820, 0x1c863: 0x6cecac20, + 0x1c864: 0x6c947020, 0x1c865: 0x6d0a5e20, 0x1c866: 0x6cfc6a20, 0x1c867: 0x6d0f2820, + 0x1c868: 0x6c424820, 0x1c869: 0x6d0f3220, 0x1c86a: 0x6d24ac20, 0x1c86b: 0x6c5d8420, + 0x1c86c: 0x6c0be820, 0x1c86d: 0x6c9eca20, 0x1c86e: 0x6c49d220, 0x1c86f: 0x6c2a9a20, + 0x1c870: 0x6c5a8620, 0x1c871: 0x6cfe7a20, 0x1c872: 0x6cfe7c20, 0x1c873: 0x6c5caa20, + 0x1c874: 0x6c529620, 0x1c875: 0x6c8c9c20, 0x1c876: 0x6d2a6620, 0x1c877: 0x6d3bbe20, + 0x1c878: 0x6c6faa20, 0x1c879: 0x6d2ca820, 0x1c87a: 0x6d015820, 0x1c87b: 0x6c1be420, + 0x1c87c: 0x6d3d2420, 0x1c87d: 0x6d28f220, 0x1c87e: 0x6d28f420, 0x1c87f: 0x6c11ec20, + // Block 0x722, offset 0x1c880 + 0x1c880: 0x6d0f8020, 0x1c881: 0x6cb74820, 0x1c882: 0x6d379c20, 0x1c883: 0x6c3b5e20, + 0x1c884: 0x6ca98220, 0x1c885: 0x6c6efa20, 0x1c886: 0x6cf18220, 0x1c887: 0x6cb36820, + 0x1c888: 0x6d16c420, 0x1c889: 0x6c913c20, 0x1c88a: 0x6c20b620, 0x1c88b: 0x6caf4020, + 0x1c88c: 0x6c767e20, 0x1c88d: 0x6caca420, 0x1c88e: 0x6d0c6a20, 0x1c88f: 0x6c768020, + 0x1c890: 0x6cad2620, 0x1c891: 0x6ca26e20, 0x1c892: 0x6c179020, 0x1c893: 0x6c8a9220, + 0x1c894: 0x6c4b3420, 0x1c895: 0x6c778220, 0x1c896: 0x6c33dc20, 0x1c897: 0x6c49d620, + 0x1c898: 0x6d02b820, 0x1c899: 0x6d358c20, 0x1c89a: 0x6c4a2e20, 0x1c89b: 0x6c49d820, + 0x1c89c: 0x6cef9420, 0x1c89d: 0x6cbb5420, 0x1c89e: 0x6c0be420, 0x1c89f: 0x6c268420, + 0x1c8a0: 0x6cf99820, 0x1c8a1: 0x6d329a20, 0x1c8a2: 0x6d39fc20, 0x1c8a3: 0x6c785e20, + 0x1c8a4: 0x6d2fa220, 0x1c8a5: 0x6c3e1420, 0x1c8a6: 0x6c036e20, 0x1c8a7: 0x6d017420, + 0x1c8a8: 0x6c34dc20, 0x1c8a9: 0x6c8e1e20, 0x1c8aa: 0x6d3cf220, 0x1c8ab: 0x6d087a20, + 0x1c8ac: 0x6c721420, 0x1c8ad: 0x6ce08e20, 0x1c8ae: 0x6cad8420, 0x1c8af: 0x6c6f0220, + 0x1c8b0: 0x6cad5020, 0x1c8b1: 0x6cdf1e20, 0x1c8b2: 0x6cdf2020, 0x1c8b3: 0x6c0dd220, + 0x1c8b4: 0x6d100c20, 0x1c8b5: 0x6ce6f020, 0x1c8b6: 0x6c4d9420, 0x1c8b7: 0x6d3ac220, + 0x1c8b8: 0x6d2cb820, 0x1c8b9: 0x6c2d0a20, 0x1c8ba: 0x6cf07a20, 0x1c8bb: 0x6cd25220, + 0x1c8bc: 0x6c88e620, 0x1c8bd: 0x6c1bfc20, 0x1c8be: 0x6c5a4a20, 0x1c8bf: 0x6d397820, + // Block 0x723, offset 0x1c8c0 + 0x1c8c0: 0x6c54ae20, 0x1c8c1: 0x6cd77020, 0x1c8c2: 0x6c806e20, 0x1c8c3: 0x6ce63620, + 0x1c8c4: 0x6c68de20, 0x1c8c5: 0x6d06a820, 0x1c8c6: 0x6c525e20, 0x1c8c7: 0x6cc35420, + 0x1c8c8: 0x6c8af020, 0x1c8c9: 0x6c590820, 0x1c8ca: 0x6d0fa020, 0x1c8cb: 0x6d04c420, + 0x1c8cc: 0x6d04c620, 0x1c8cd: 0x6cfbfe20, 0x1c8ce: 0x6d1a3020, 0x1c8cf: 0x6cf36020, + 0x1c8d0: 0x6d386620, 0x1c8d1: 0x6d10e220, 0x1c8d2: 0x6cd35020, 0x1c8d3: 0x6cee6e20, + 0x1c8d4: 0x6ce73620, 0x1c8d5: 0x6c9ece20, 0x1c8d6: 0x6d28fe20, 0x1c8d7: 0x6c768420, + 0x1c8d8: 0x6c529e20, 0x1c8d9: 0x6c81d020, 0x1c8da: 0x6cf9a820, 0x1c8db: 0x6d3a0420, + 0x1c8dc: 0x6d084a20, 0x1c8dd: 0x6d32a020, 0x1c8de: 0x6cb37820, 0x1c8df: 0x6d0be420, + 0x1c8e0: 0x6c5b2e20, 0x1c8e1: 0x6c49e620, 0x1c8e2: 0x6c180e20, 0x1c8e3: 0x6c5aa420, + 0x1c8e4: 0x6c77a820, 0x1c8e5: 0x6c194c20, 0x1c8e6: 0x6c389020, 0x1c8e7: 0x6cce6220, + 0x1c8e8: 0x6d12e220, 0x1c8e9: 0x6c5bac20, 0x1c8eb: 0x6ce19a20, + 0x1c8ec: 0x6c6cf220, 0x1c8ed: 0x6cc55020, 0x1c8ee: 0x6c8b9620, 0x1c8ef: 0x6cf5f220, + 0x1c8f0: 0x6c3e5420, 0x1c8f1: 0x6c6f0a20, 0x1c8f2: 0x6d019420, 0x1c8f3: 0x6cb48a20, + 0x1c8f4: 0x6ce64220, 0x1c8f5: 0x6d3d3c20, 0x1c8f6: 0x6ce6c020, 0x1c8f7: 0x6cecd420, + 0x1c8f8: 0x6c4d4020, 0x1c8f9: 0x6cae6a20, 0x1c8fa: 0x6c80fc20, 0x1c8fb: 0x6d0e5220, + 0x1c8fc: 0x6d06bc20, 0x1c8fd: 0x6c3c3e20, 0x1c8fe: 0x6c1c1020, 0x1c8ff: 0x6cc66820, + // Block 0x724, offset 0x1c900 + 0x1c900: 0x6c554620, 0x1c901: 0x6cf5f420, 0x1c902: 0x6cd4ce20, 0x1c903: 0x6c51c420, + 0x1c904: 0x6d099620, 0x1c905: 0x6c7a9220, 0x1c906: 0x6c72e820, 0x1c907: 0x6cfeb620, + 0x1c908: 0x6cf5f620, 0x1c909: 0x6d0bfa20, 0x1c90a: 0x6c4eb220, 0x1c90b: 0x6d3c3c20, + 0x1c90c: 0x6c75b020, 0x1c90d: 0x6c2c4220, 0x1c90e: 0x6d019620, 0x1c90f: 0x6c601c20, + 0x1c910: 0x6cf4e020, 0x1c911: 0x6d0bfc20, 0x1c912: 0x6c942c20, 0x1c913: 0x6c4e0620, + 0x1c914: 0x6d0e6220, 0x1c915: 0x6c591220, 0x1c916: 0x6c9aee20, 0x1c917: 0x6c711620, + 0x1c918: 0x6c2a1020, 0x1c919: 0x6c072420, 0x1c91a: 0x6c3b7a20, 0x1c91b: 0x6c8c5220, + 0x1c91c: 0x6c7d6220, 0x1c91d: 0x6c5d2820, 0x1c91e: 0x6cea2220, 0x1c91f: 0x6cf61620, + 0x1c920: 0x6c253e20, 0x1c921: 0x6cf3c820, 0x1c922: 0x6c52a820, 0x1c923: 0x6c179c20, + 0x1c924: 0x6c3f6220, 0x1c925: 0x6cf2f420, 0x1c926: 0x6c684820, 0x1c927: 0x6c231820, + 0x1c928: 0x6c3ce220, 0x1c929: 0x6cb2a620, 0x1c92a: 0x6cbf2620, 0x1c92b: 0x6cc91e20, + 0x1c92c: 0x6cf61820, 0x1c92d: 0x6cbf2820, 0x1c92e: 0x6d033420, 0x1c92f: 0x6c174420, + 0x1c930: 0x6d0e7420, 0x1c931: 0x6d0e7620, 0x1c932: 0x6d17aa20, 0x1c933: 0x6c744e20, + 0x1c934: 0x6d234620, 0x1c935: 0x6c42a820, 0x1c936: 0x6cc47820, 0x1c937: 0x6caff020, + 0x1c938: 0x6d049420, 0x1c939: 0x6cee6420, 0x1c93a: 0x6cd10420, 0x1c93b: 0x6c171420, + 0x1c93c: 0x6cce6e20, 0x1c93d: 0x6d048420, 0x1c93e: 0x6ca72420, 0x1c93f: 0x6c44d020, + // Block 0x725, offset 0x1c940 + 0x1c940: 0x6cf13e20, 0x1c941: 0x6c18d420, 0x1c942: 0x6c51ce20, 0x1c943: 0x6c7cd220, + 0x1c944: 0x6d37fe20, 0x1c945: 0x6c32cc20, 0x1c946: 0x6cf96a20, 0x1c947: 0x6c5ac620, + 0x1c948: 0x6c3ce420, 0x1c949: 0x6c890620, 0x1c94a: 0x6d07a820, 0x1c94b: 0x6d037e20, + 0x1c94c: 0x6c59d220, 0x1c94d: 0x6c690a20, 0x1c94e: 0x6c64b620, 0x1c94f: 0x6c09cc20, + 0x1c950: 0x6d1bbc20, 0x1c951: 0x6d3a7020, 0x1c952: 0x6cefde20, 0x1c953: 0x6ce93620, + 0x1c954: 0x6ccd4a20, 0x1c955: 0x6cf67020, 0x1c956: 0x6caa9620, 0x1c957: 0x6caa9820, + 0x1c958: 0x6c150220, 0x1c959: 0x6d0c1220, 0x1c95a: 0x6c6f1020, 0x1c95b: 0x6c6f2420, + 0x1c95c: 0x6d237020, 0x1c95d: 0x6c9a9c20, 0x1c95e: 0x6ccbfc20, 0x1c95f: 0x6cf0a620, + 0x1c960: 0x6d2c3820, 0x1c961: 0x6d033620, 0x1c962: 0x6cbf3e20, 0x1c963: 0x6cc75020, + 0x1c964: 0x6c9a0c20, 0x1c965: 0x6c593620, 0x1c966: 0x6d06f420, 0x1c967: 0x6d2fbe20, + 0x1c968: 0x6ceea020, 0x1c969: 0x6c38a620, 0x1c96a: 0x6cc07620, 0x1c96b: 0x6cdc4a20, + 0x1c96c: 0x6d0fc820, 0x1c96d: 0x6c8b1620, 0x1c96e: 0x6d3a6e20, 0x1c96f: 0x6c6a2220, + 0x1c970: 0x6c434e20, 0x1c971: 0x6c485c20, 0x1c972: 0x6c05b420, 0x1c973: 0x6c557020, + 0x1c974: 0x6d275820, 0x1c975: 0x6cf96c20, 0x1c976: 0x6cd41a20, 0x1c977: 0x6c89ce20, + 0x1c978: 0x6c0afa20, 0x1c979: 0x6c46c420, 0x1c97a: 0x6cea0020, 0x1c97b: 0x6ce11420, + 0x1c97c: 0x6c17a020, 0x1c97d: 0x6cccfc20, 0x1c97e: 0x6c371a20, 0x1c97f: 0x6c0f2a20, + // Block 0x726, offset 0x1c980 + 0x1c980: 0x6c5a5a20, 0x1c981: 0x6d00ce20, 0x1c982: 0x6cf8ae20, 0x1c983: 0x6cf50e20, + 0x1c984: 0x6cf67220, 0x1c985: 0x6d284220, 0x1c986: 0x6c515a20, 0x1c987: 0x6c51d220, + 0x1c988: 0x6cf67420, 0x1c989: 0x6d27bc20, 0x1c98a: 0x6d048020, 0x1c98b: 0x6ca37e20, + 0x1c98c: 0x6ccd5020, 0x1c98d: 0x6cbf8e20, 0x1c98e: 0x6d121620, 0x1c98f: 0x6d099e20, + 0x1c990: 0x6c9d6c20, 0x1c991: 0x6c882420, 0x1c992: 0x6d1c8820, 0x1c993: 0x6cf45a20, + 0x1c994: 0x6cc69a20, 0x1c995: 0x6c459e20, 0x1c996: 0x6d0f3820, 0x1c997: 0x6cbb5820, + 0x1c998: 0x6c8e3820, 0x1c999: 0x6cf67620, 0x1c99a: 0x6c09f820, 0x1c99b: 0x6c0c1820, + 0x1c99c: 0x6c233e20, 0x1c99d: 0x6c92a620, 0x1c99e: 0x6c64d620, 0x1c99f: 0x6cd53420, + 0x1c9a0: 0x6d185620, 0x1c9a1: 0x6c90b220, 0x1c9a2: 0x6caeb620, 0x1c9a3: 0x6cdbd420, + 0x1c9a4: 0x6d185820, 0x1c9a5: 0x6ce28e20, 0x1c9a6: 0x6c749420, 0x1c9a7: 0x6d3fb220, + 0x1c9a8: 0x6d284620, 0x1c9a9: 0x6c56c020, 0x1c9aa: 0x6d154820, 0x1c9ab: 0x6d36b420, + 0x1c9ac: 0x6c026220, 0x1c9ad: 0x6cf0bc20, 0x1c9ae: 0x6c8f1420, 0x1c9af: 0x6c4efa20, + 0x1c9b0: 0x6cab4c20, 0x1c9b1: 0x6cc55420, 0x1c9b2: 0x6c6f2c20, 0x1c9b3: 0x6c97fc20, + 0x1c9b4: 0x6c7de220, 0x1c9b5: 0x6cce1820, 0x1c9b6: 0x6c24b220, 0x1c9b7: 0x6d2b9020, + 0x1c9b8: 0x6c64f620, 0x1c9b9: 0x6cf6c620, 0x1c9ba: 0x6cf6c820, 0x1c9bb: 0x6cf6ca20, + 0x1c9bc: 0x6d185a20, 0x1c9bd: 0x6d000c20, 0x1c9be: 0x6c1c6e20, 0x1c9bf: 0x6c59ea20, + // Block 0x727, offset 0x1c9c0 + 0x1c9c0: 0x6c15e420, 0x1c9c1: 0x6d131820, 0x1c9c2: 0x6ce01020, 0x1c9c3: 0x6cc48820, + 0x1c9c4: 0x6d0ec020, 0x1c9c5: 0x6cfb9420, 0x1c9c6: 0x6cbbae20, 0x1c9c7: 0x6c75e820, + 0x1c9c8: 0x6c2aaa20, 0x1c9c9: 0x6c340a20, 0x1c9ca: 0x6cd01820, 0x1c9cb: 0x6c687a20, + 0x1c9cc: 0x6c3b9620, 0x1c9cd: 0x6cd82a20, 0x1c9ce: 0x6c8a1a20, 0x1c9cf: 0x6d23ee20, + 0x1c9d0: 0x6c8bde20, 0x1c9d1: 0x6ce78a20, 0x1c9d2: 0x6cce8420, 0x1c9d3: 0x6c3b4620, + 0x1c9d4: 0x6c38bc20, 0x1c9d5: 0x6d0ec220, 0x1c9d6: 0x6d0a3e20, 0x1c9d7: 0x6c807620, + 0x1c9d8: 0x6c9a6a20, 0x1c9d9: 0x6ce1a220, 0x1c9da: 0x6d18a220, 0x1c9db: 0x6c6e3020, + 0x1c9dc: 0x6c9afc20, 0x1c9dd: 0x6c6ecc20, 0x1c9de: 0x6c694420, 0x1c9df: 0x6d1c9a20, + 0x1c9e0: 0x6d23f020, 0x1c9e1: 0x6d18ca20, 0x1c9e2: 0x6d091e20, 0x1c9e3: 0x6c7fc020, + 0x1c9e4: 0x6cdf8020, 0x1c9e5: 0x6d2a9220, 0x1c9e6: 0x6c120c20, 0x1c9e7: 0x6cdc7420, + 0x1c9e8: 0x6cf6ea20, 0x1c9e9: 0x6cc40220, 0x1c9ea: 0x6c235420, 0x1c9eb: 0x6c886220, + 0x1c9ec: 0x6c5b6e20, 0x1c9ed: 0x6d3a2c20, 0x1c9ee: 0x6d022c20, 0x1c9ef: 0x6c8d6e20, + 0x1c9f0: 0x6ceec020, 0x1c9f1: 0x6d18cc20, 0x1c9f2: 0x6d00fc20, 0x1c9f3: 0x6d2fe220, + 0x1c9f4: 0x6c5c5220, 0x1c9f5: 0x6c270020, 0x1c9f6: 0x6ca9ce20, 0x1c9f7: 0x6c7fc220, + 0x1c9f8: 0x6cc7de20, 0x1c9f9: 0x6cfc3a20, 0x1c9fa: 0x6c77b620, 0x1c9fb: 0x6d09ba20, + 0x1c9fc: 0x6c6d6620, 0x1c9fd: 0x6c1df820, 0x1c9fe: 0x6c2a3a20, 0x1c9ff: 0x6d123020, + // Block 0x728, offset 0x1ca00 + 0x1ca00: 0x6c51fc20, 0x1ca01: 0x6c807e20, 0x1ca02: 0x6c0c4220, 0x1ca03: 0x6cc6ce20, + 0x1ca04: 0x6c86d020, 0x1ca05: 0x6ca18220, 0x1ca06: 0x6c067820, 0x1ca07: 0x6cc93220, + 0x1ca08: 0x6c941420, 0x1ca09: 0x6c7ea620, 0x1ca0a: 0x6c023620, 0x1ca0b: 0x6d0ab020, + 0x1ca0c: 0x6c7c1020, 0x1ca0d: 0x6cd7aa20, 0x1ca0e: 0x6c8ab420, 0x1ca0f: 0x6c872020, + 0x1ca10: 0x6c918420, 0x1ca11: 0x6c74ea20, 0x1ca12: 0x6c8a8620, 0x1ca13: 0x6d0efa20, + 0x1ca14: 0x6cf73a20, 0x1ca15: 0x6d025a20, 0x1ca16: 0x6c8fde20, 0x1ca17: 0x6d136e20, + 0x1ca18: 0x6c121a20, 0x1ca19: 0x6cc50c20, 0x1ca1a: 0x6d271420, 0x1ca1b: 0x6c808820, + 0x1ca1c: 0x6c23ce20, 0x1ca1d: 0x6c750c20, 0x1ca1e: 0x6c1d3220, 0x1ca1f: 0x6c49b620, + 0x1ca20: 0x6c72d620, 0x1ca21: 0x6c185620, 0x1ca22: 0x6c9cba20, 0x1ca23: 0x6ce19220, + 0x1ca24: 0x6c809220, 0x1ca25: 0x6d3a4820, 0x1ca26: 0x6c809a20, 0x1ca27: 0x6c8dda20, + 0x1ca28: 0x6c24c420, 0x1ca29: 0x6d24b220, 0x1ca2a: 0x6d2f8020, 0x1ca2b: 0x6d2ff420, + 0x1ca2c: 0x6cabd220, 0x1ca2d: 0x6d328c20, 0x1ca2e: 0x6cad5220, 0x1ca2f: 0x6c195820, + 0x1ca30: 0x6d254620, 0x1ca31: 0x6c009620, 0x1ca32: 0x6cf09c20, 0x1ca33: 0x6c4f4420, + 0x1ca34: 0x6c749620, 0x1ca35: 0x6c74c820, 0x1ca36: 0x6c3fa020, 0x1ca37: 0x6d13b020, + 0x1ca38: 0x6c03aa20, 0x1ca39: 0x6c2e5620, 0x1ca3a: 0x6d13b420, 0x1ca3b: 0x6d10c620, + 0x1ca3c: 0x6d411020, 0x1ca3d: 0x6cd6d020, 0x1ca3e: 0x6c379e20, 0x1ca3f: 0x6cac5020, + // Block 0x729, offset 0x1ca40 + 0x1ca40: 0x6c206e20, 0x1ca41: 0x6c77e220, 0x1ca42: 0x6d29d420, 0x1ca43: 0x6c2ec020, + 0x1ca44: 0x6cbace20, 0x1ca45: 0x6d1dfc20, 0x1ca46: 0x6cbb2a20, 0x1ca47: 0x6cb14420, + 0x1ca48: 0x6c04be20, 0x1ca49: 0x6cacac20, 0x1ca4a: 0x6c175a20, 0x1ca4b: 0x6c64a020, + 0x1ca4c: 0x6cac0020, 0x1ca4d: 0x6c31a020, 0x1ca4e: 0x6c205420, 0x1ca4f: 0x6d215a20, + 0x1ca50: 0x6d2c3a20, 0x1ca51: 0x6c0afc20, 0x1ca52: 0x6c2ec220, 0x1ca53: 0x6c055420, + 0x1ca54: 0x6c0f2c20, 0x1ca55: 0x6c205a20, 0x1ca56: 0x6d1fea20, 0x1ca57: 0x6d206e20, + 0x1ca58: 0x6c31d620, 0x1ca59: 0x6d0b0820, 0x1ca5a: 0x6c197220, 0x1ca5b: 0x6ca96620, + 0x1ca5c: 0x6ca9ac20, 0x1ca5d: 0x6cb24020, 0x1ca5e: 0x6c6f4c20, 0x1ca5f: 0x6ca1be20, + 0x1ca60: 0x6cdde020, 0x1ca61: 0x6ca22420, 0x1ca62: 0x6c814220, 0x1ca63: 0x6cc5c420, + 0x1ca64: 0x6c981a20, 0x1ca65: 0x6c398a20, 0x1ca66: 0x6c98ca20, 0x1ca67: 0x6ca27020, + 0x1ca68: 0x6c426020, 0x1ca69: 0x6cf4b820, 0x1ca6a: 0x6d0e4020, 0x1ca6b: 0x6c437420, + 0x1ca6c: 0x6c06ec20, 0x1ca6d: 0x6cd8a020, 0x1ca6e: 0x6c665e20, 0x1ca6f: 0x6c476620, + 0x1ca70: 0x6d202c20, 0x1ca71: 0x6c437e20, 0x1ca72: 0x6cd0f220, 0x1ca73: 0x6ca23020, + 0x1ca74: 0x6c2be620, 0x1ca75: 0x6cb8be20, 0x1ca76: 0x6cc37020, 0x1ca77: 0x6cc2cc20, + 0x1ca78: 0x6d3f4020, 0x1ca79: 0x6ce27020, 0x1ca7a: 0x6cf5c420, 0x1ca7b: 0x6c985620, + 0x1ca7c: 0x6c793820, 0x1ca7d: 0x6cb8d820, 0x1ca7e: 0x6cf44620, 0x1ca7f: 0x6c481220, + // Block 0x72a, offset 0x1ca80 + 0x1ca80: 0x6cf61a20, 0x1ca81: 0x6c83c220, 0x1ca82: 0x6c83da20, 0x1ca83: 0x6cb3f420, + 0x1ca84: 0x6c5ed420, 0x1ca85: 0x6c428220, 0x1ca86: 0x6d346420, 0x1ca87: 0x6c078820, + 0x1ca88: 0x6cc2f220, 0x1ca89: 0x6c214e20, 0x1ca8a: 0x6c31a220, 0x1ca8b: 0x6c724a20, + 0x1ca8c: 0x6c636e20, 0x1ca8d: 0x6c64a220, 0x1ca8e: 0x6c3c5620, 0x1ca8f: 0x6cb0f820, + 0x1ca90: 0x6c780820, 0x1ca91: 0x6c713020, 0x1ca92: 0x6c77c220, 0x1ca93: 0x6c1e9c20, + 0x1ca94: 0x6cf8b220, 0x1ca95: 0x6c074020, 0x1ca96: 0x6c961820, 0x1ca97: 0x6c6bf220, + 0x1ca98: 0x6c967220, 0x1ca99: 0x6cca0820, 0x1ca9a: 0x6cf0be20, 0x1ca9b: 0x6c98fc20, + 0x1ca9c: 0x6c33b020, 0x1ca9d: 0x6ce78c20, 0x1ca9e: 0x6cbc7620, 0x1ca9f: 0x6c67fc20, + 0x1caa0: 0x6cf94820, 0x1caa1: 0x6c86d220, 0x1caa2: 0x6c31d820, 0x1caa3: 0x6c8b5e20, + 0x1caa4: 0x6cac1020, 0x1caa5: 0x6cb16e20, 0x1caa6: 0x6c0fa620, 0x1caa7: 0x6cf73c20, + 0x1caa8: 0x6c1d8620, 0x1caa9: 0x6cef6820, 0x1caaa: 0x6c7cc220, 0x1caab: 0x6c1d8a20, + 0x1caac: 0x6cc34c20, 0x1caad: 0x6cc38020, 0x1caae: 0x6c035e20, 0x1caaf: 0x6c391620, + 0x1cab0: 0x6cbff420, 0x1cab1: 0x6c611c20, 0x1cab2: 0x6c110420, 0x1cab3: 0x6d3d2220, + 0x1cab4: 0x6c019c20, 0x1cab5: 0x6c436820, 0x1cab6: 0x6d3c3020, 0x1cab7: 0x6c4a0620, + 0x1cab8: 0x6c96b020, 0x1cab9: 0x6d1eee20, 0x1caba: 0x6c778020, 0x1cabb: 0x6c0eae20, + 0x1cabc: 0x6c544a20, 0x1cabd: 0x6d0b7620, 0x1cabe: 0x6d1a2820, 0x1cabf: 0x6c582620, + // Block 0x72b, offset 0x1cac0 + 0x1cac0: 0x6d3c3420, 0x1cac1: 0x6d27da20, 0x1cac2: 0x6c7bba20, 0x1cac3: 0x6ca97a20, + 0x1cac4: 0x6c2b5420, 0x1cac5: 0x6cbe2e20, 0x1cac6: 0x6d381420, 0x1cac7: 0x6ca26a20, + 0x1cac8: 0x6c06d820, 0x1cac9: 0x6caf4220, 0x1caca: 0x6c70fc20, 0x1cacb: 0x6d147420, + 0x1cacc: 0x6cd0e420, 0x1cacd: 0x6cad4e20, 0x1cace: 0x6cf98e20, 0x1cacf: 0x6ceaf220, + 0x1cad0: 0x6c552620, 0x1cad1: 0x6c8cae20, 0x1cad2: 0x6c3a8a20, 0x1cad3: 0x6cafbe20, + 0x1cad4: 0x6ca62a20, 0x1cad5: 0x6d119020, 0x1cad6: 0x6d201a20, 0x1cad7: 0x6c467020, + 0x1cad8: 0x6d094620, 0x1cad9: 0x6c705e20, 0x1cada: 0x6c286a20, 0x1cadb: 0x6c0eb820, + 0x1cadc: 0x6c7a7420, 0x1cadd: 0x6cfbe820, 0x1cade: 0x6ca8f820, 0x1cadf: 0x6c586620, + 0x1cae0: 0x6c523c20, 0x1cae1: 0x6c68d420, 0x1cae2: 0x6c50dc20, 0x1cae3: 0x6d2fa420, + 0x1cae4: 0x6c5ff620, 0x1cae5: 0x6d0a7220, 0x1cae6: 0x6cccd220, 0x1cae7: 0x6cde3820, + 0x1cae8: 0x6cc65820, 0x1cae9: 0x6cd45620, 0x1caea: 0x6ce72820, 0x1caeb: 0x6c81a820, + 0x1caec: 0x6c318a20, 0x1caed: 0x6cf99c20, 0x1caee: 0x6cd1ae20, 0x1caef: 0x6c7b1a20, + 0x1caf0: 0x6d329c20, 0x1caf1: 0x6d22e420, 0x1caf2: 0x6cdccc20, 0x1caf3: 0x6d20f420, + 0x1caf4: 0x6c096220, 0x1caf5: 0x6c985420, 0x1caf6: 0x6cf5c620, 0x1caf7: 0x6c734c20, + 0x1caf8: 0x6c87e020, 0x1caf9: 0x6cf9aa20, 0x1cafa: 0x6d1a4820, 0x1cafb: 0x6cdb7e20, + 0x1cafc: 0x6c80ae20, 0x1cafd: 0x6c070220, 0x1cafe: 0x6d35c020, 0x1caff: 0x6d0c7420, + // Block 0x72c, offset 0x1cb00 + 0x1cb00: 0x6ccbdc20, 0x1cb01: 0x6c85d220, 0x1cb02: 0x6c4e9e20, 0x1cb03: 0x6cfc0020, + 0x1cb04: 0x6c6dae20, 0x1cb05: 0x6cabfc20, 0x1cb06: 0x6c3a0620, 0x1cb07: 0x6cfeb820, + 0x1cb08: 0x6c044220, 0x1cb09: 0x6cb5cc20, 0x1cb0a: 0x6ca5da20, 0x1cb0b: 0x6c0bfc20, + 0x1cb0c: 0x6d1b5620, 0x1cb0d: 0x6c7efe20, 0x1cb0e: 0x6c8b0220, 0x1cb0f: 0x6c648820, + 0x1cb10: 0x6cbaac20, 0x1cb11: 0x6c7d5a20, 0x1cb12: 0x6d0c0a20, 0x1cb13: 0x6c4cba20, + 0x1cb14: 0x6d402020, 0x1cb15: 0x6c9c4820, 0x1cb16: 0x6c166820, 0x1cb17: 0x6d13e620, + 0x1cb18: 0x6d35e820, 0x1cb19: 0x6d32b420, 0x1cb1a: 0x6d0b2c20, 0x1cb1b: 0x6c9bce20, + 0x1cb1c: 0x6c10f820, 0x1cb1d: 0x6c243620, 0x1cb1e: 0x6cceec20, 0x1cb1f: 0x6c8b9820, + 0x1cb20: 0x6c2d1620, 0x1cb21: 0x6c953e20, 0x1cb22: 0x6c556020, 0x1cb23: 0x6d3f9020, + 0x1cb24: 0x6c4b4620, 0x1cb25: 0x6cefc820, 0x1cb26: 0x6c3c4c20, 0x1cb27: 0x6cf28c20, + 0x1cb28: 0x6d256620, 0x1cb29: 0x6d037420, 0x1cb2a: 0x6d399820, 0x1cb2b: 0x6c98ba20, + 0x1cb2c: 0x6cf14020, 0x1cb2d: 0x6c1fe420, 0x1cb2e: 0x6cfcce20, 0x1cb2f: 0x6ce93420, + 0x1cb30: 0x6d0bb220, 0x1cb31: 0x6ca4ac20, 0x1cb32: 0x6d004220, 0x1cb33: 0x6c636020, + 0x1cb34: 0x6c540620, 0x1cb35: 0x6c0af420, 0x1cb36: 0x6d1f3a20, 0x1cb37: 0x6d1f4820, + 0x1cb38: 0x6c9a0020, 0x1cb39: 0x6c13e420, 0x1cb3a: 0x6d111420, 0x1cb3b: 0x6cdcd620, + 0x1cb3c: 0x6c0f1420, 0x1cb3d: 0x6ca00820, 0x1cb3e: 0x6c574020, 0x1cb3f: 0x6d258620, + // Block 0x72d, offset 0x1cb40 + 0x1cb40: 0x6cd9b420, 0x1cb41: 0x6c96c420, 0x1cb42: 0x6d258820, 0x1cb43: 0x6c270c20, + 0x1cb44: 0x6d239220, 0x1cb45: 0x6cd1d220, 0x1cb46: 0x6c4fcc20, 0x1cb47: 0x6cbb6420, + 0x1cb48: 0x6d17ea20, 0x1cb49: 0x6d316a20, 0x1cb4a: 0x6c123420, 0x1cb4b: 0x6c4fe220, + 0x1cb4c: 0x6c97ee20, 0x1cb4d: 0x6c6e9620, 0x1cb4e: 0x6c67b820, 0x1cb4f: 0x6ca12e20, + 0x1cb50: 0x6d2ecc20, 0x1cb51: 0x6c150a20, 0x1cb52: 0x6c026420, 0x1cb53: 0x6c025420, + 0x1cb54: 0x6c4fd420, 0x1cb55: 0x6c24e020, 0x1cb56: 0x6c07c420, 0x1cb57: 0x6c749820, + 0x1cb58: 0x6c0a2c20, 0x1cb59: 0x6c09fe20, 0x1cb5a: 0x6c59dc20, 0x1cb5b: 0x6cb44a20, + 0x1cb5c: 0x6c8bd020, 0x1cb5d: 0x6d072620, 0x1cb5e: 0x6ce77e20, 0x1cb5f: 0x6d121e20, + 0x1cb60: 0x6c8a1220, 0x1cb61: 0x6cd79020, 0x1cb62: 0x6cff0620, 0x1cb63: 0x6cd49020, + 0x1cb64: 0x6c33a820, 0x1cb65: 0x6c69c620, 0x1cb66: 0x6c442020, 0x1cb67: 0x6c739020, + 0x1cb68: 0x6c31b420, 0x1cb69: 0x6c5c3820, 0x1cb6a: 0x6c7b3e20, 0x1cb6b: 0x6cfc2c20, + 0x1cb6c: 0x6d021820, 0x1cb6d: 0x6cde1820, 0x1cb6e: 0x6cfc3220, 0x1cb6f: 0x6d09b020, + 0x1cb70: 0x6ca92620, 0x1cb71: 0x6cb21820, 0x1cb72: 0x6c5dfc20, 0x1cb73: 0x6caa2a20, + 0x1cb74: 0x6c9be620, 0x1cb75: 0x6c8b5420, 0x1cb76: 0x6ca51e20, 0x1cb77: 0x6c4a0c20, + 0x1cb78: 0x6cd48420, 0x1cb79: 0x6c917420, 0x1cb7a: 0x6cde2020, 0x1cb7b: 0x6cfd3c20, + 0x1cb7c: 0x6c9ca220, 0x1cb7d: 0x6cc4e820, 0x1cb7e: 0x6c584020, 0x1cb7f: 0x6ca52820, + // Block 0x72e, offset 0x1cb80 + 0x1cb80: 0x6c957820, 0x1cb81: 0x6cfc5420, 0x1cb82: 0x6cb6ac20, 0x1cb83: 0x6c751e20, + 0x1cb84: 0x6d07fa20, 0x1cb85: 0x6c9eae20, 0x1cb86: 0x6d3e1a20, 0x1cb87: 0x6c93d620, + 0x1cb88: 0x6c914c20, 0x1cb89: 0x6d22b820, 0x1cb8a: 0x6cda7a20, 0x1cb8b: 0x6cedda20, + 0x1cb8c: 0x6cbff620, 0x1cb8d: 0x6c40d220, 0x1cb8e: 0x6c2f4c20, 0x1cb8f: 0x6c821620, + 0x1cb90: 0x6c031620, 0x1cb91: 0x6c5e7c20, 0x1cb92: 0x6c52fa20, 0x1cb93: 0x6c2c1a20, + 0x1cb94: 0x6c202e20, 0x1cb95: 0x6c416c20, 0x1cb96: 0x6c6fac20, 0x1cb97: 0x6d20be20, + 0x1cb98: 0x6cb6d820, 0x1cb99: 0x6d20c020, 0x1cb9a: 0x6c170620, 0x1cb9b: 0x6c969020, + 0x1cb9c: 0x6c456420, 0x1cb9d: 0x6cf43020, 0x1cb9e: 0x6c3d4220, 0x1cb9f: 0x6cf18420, + 0x1cba0: 0x6c6bc620, 0x1cba1: 0x6d0b1a20, 0x1cba2: 0x6c0d2620, 0x1cba3: 0x6c0b8020, + 0x1cba4: 0x6c056220, 0x1cba5: 0x6d268820, 0x1cba6: 0x6c73f220, 0x1cba7: 0x6c9ac220, + 0x1cba8: 0x6c73f420, 0x1cba9: 0x6cecca20, 0x1cbaa: 0x6c646e20, 0x1cbab: 0x6c99da20, + 0x1cbac: 0x6c282420, 0x1cbad: 0x6cb20420, 0x1cbae: 0x6cef9620, 0x1cbaf: 0x6c585820, + 0x1cbb0: 0x6cfc8020, 0x1cbb1: 0x6cbaa820, 0x1cbb2: 0x6c8cbe20, 0x1cbb3: 0x6c274a20, + 0x1cbb4: 0x6d16fc20, 0x1cbb5: 0x6c016820, 0x1cbb6: 0x6cb28820, 0x1cbb7: 0x6c2d4620, + 0x1cbb8: 0x6c3e1620, 0x1cbb9: 0x6d080220, 0x1cbba: 0x6cf7da20, 0x1cbbb: 0x6c0e5820, + 0x1cbbc: 0x6c229420, 0x1cbbd: 0x6c467820, 0x1cbbe: 0x6c640620, 0x1cbbf: 0x6cce9e20, + // Block 0x72f, offset 0x1cbc0 + 0x1cbc0: 0x6cb37220, 0x1cbc1: 0x6c222220, 0x1cbc2: 0x6c77e420, 0x1cbc3: 0x6cc4bc20, + 0x1cbc4: 0x6cd0f420, 0x1cbc5: 0x6ccfbe20, 0x1cbc6: 0x6d14a820, 0x1cbc7: 0x6d411220, + 0x1cbc8: 0x6c633c20, 0x1cbc9: 0x6c9f3a20, 0x1cbca: 0x6cccd420, 0x1cbcb: 0x6c8efe20, + 0x1cbcc: 0x6c095020, 0x1cbcd: 0x6d312c20, 0x1cbce: 0x6d312e20, 0x1cbcf: 0x6c73fc20, + 0x1cbd0: 0x6c383820, 0x1cbd1: 0x6c8f7820, 0x1cbd2: 0x6c6c3e20, 0x1cbd3: 0x6c698e20, + 0x1cbd4: 0x6c667020, 0x1cbd5: 0x6c85d420, 0x1cbd6: 0x6c4a1e20, 0x1cbd7: 0x6cfa9220, + 0x1cbd8: 0x6d386820, 0x1cbd9: 0x6c45e420, 0x1cbda: 0x6d0be820, 0x1cbdb: 0x6d053420, + 0x1cbdc: 0x6d0fa420, 0x1cbdd: 0x6d063620, 0x1cbde: 0x6c95f620, 0x1cbdf: 0x6cda9020, + 0x1cbe0: 0x6d399420, 0x1cbe1: 0x6cbd6420, 0x1cbe2: 0x6d1a4a20, 0x1cbe3: 0x6d09fe20, + 0x1cbe4: 0x6c05f620, 0x1cbe5: 0x6c379220, 0x1cbe6: 0x6cfe2a20, 0x1cbe7: 0x6d10e420, + 0x1cbe8: 0x6cf9ac20, 0x1cbe9: 0x6c4f6620, 0x1cbea: 0x6c4a4a20, 0x1cbeb: 0x6c1cba20, + 0x1cbec: 0x6d06ac20, 0x1cbed: 0x6c047820, 0x1cbee: 0x6cae1620, 0x1cbef: 0x6c81f020, + 0x1cbf0: 0x6c28fa20, 0x1cbf1: 0x6d1d6420, 0x1cbf2: 0x6c5aa620, 0x1cbf3: 0x6cf19220, + 0x1cbf4: 0x6c355c20, 0x1cbf5: 0x6c19e820, 0x1cbf6: 0x6c2c4420, 0x1cbf7: 0x6cf44c20, + 0x1cbf8: 0x6cf3c420, 0x1cbf9: 0x6c19e020, 0x1cbfa: 0x6c75b220, 0x1cbfb: 0x6c99ee20, + 0x1cbfc: 0x6c071220, 0x1cbfd: 0x6ce6c220, 0x1cbfe: 0x6cfcb420, 0x1cbff: 0x6c1f3220, + // Block 0x730, offset 0x1cc00 + 0x1cc00: 0x6c4e0820, 0x1cc01: 0x6d081220, 0x1cc02: 0x6d0c8820, 0x1cc03: 0x6cc05020, + 0x1cc04: 0x6d088a20, 0x1cc05: 0x6c80be20, 0x1cc06: 0x6c851420, 0x1cc07: 0x6d053c20, + 0x1cc08: 0x6c3e5620, 0x1cc09: 0x6c8e5020, 0x1cc0a: 0x6d0b1e20, 0x1cc0b: 0x6cf5f820, + 0x1cc0c: 0x6c8cec20, 0x1cc0d: 0x6c83c420, 0x1cc0e: 0x6c6d0420, 0x1cc0f: 0x6c88b620, + 0x1cc10: 0x6cdd6020, 0x1cc11: 0x6cddd620, 0x1cc12: 0x6c3cfe20, 0x1cc13: 0x6cecd620, + 0x1cc14: 0x6c2d5a20, 0x1cc15: 0x6cb20c20, 0x1cc16: 0x6d2df020, 0x1cc17: 0x6ccb2c20, + 0x1cc18: 0x6c9f5620, 0x1cc19: 0x6d234820, 0x1cc1a: 0x6c709420, 0x1cc1b: 0x6c186820, + 0x1cc1c: 0x6c7f0a20, 0x1cc1d: 0x6cf19620, 0x1cc1e: 0x6cd16c20, 0x1cc1f: 0x6cef1420, + 0x1cc20: 0x6ce4f620, 0x1cc21: 0x6c1f4020, 0x1cc22: 0x6d423c20, 0x1cc23: 0x6c081e20, + 0x1cc24: 0x6c196020, 0x1cc25: 0x6c562220, 0x1cc26: 0x6cb5ea20, 0x1cc27: 0x6c365e20, + 0x1cc28: 0x6c7d6420, 0x1cc29: 0x6c167020, 0x1cc2a: 0x6cb5ec20, 0x1cc2b: 0x6c082020, + 0x1cc2c: 0x6ced2020, 0x1cc2d: 0x6c925620, 0x1cc2e: 0x6c239e20, 0x1cc2f: 0x6c495220, + 0x1cc30: 0x6d0d9020, 0x1cc31: 0x6c2dca20, 0x1cc32: 0x6c072620, 0x1cc33: 0x6c8bb620, + 0x1cc34: 0x6cbd7220, 0x1cc35: 0x6caff220, 0x1cc36: 0x6cabd620, 0x1cc37: 0x6cc3b820, + 0x1cc38: 0x6d3d6220, 0x1cc39: 0x6cbd7420, 0x1cc3a: 0x6c383c20, 0x1cc3b: 0x6c6d8020, + 0x1cc3c: 0x6cbf2a20, 0x1cc3d: 0x6c321a20, 0x1cc3e: 0x6c6bec20, 0x1cc3f: 0x6c5cf220, + // Block 0x731, offset 0x1cc40 + 0x1cc40: 0x6d226c20, 0x1cc41: 0x6c999820, 0x1cc42: 0x6c9a1020, 0x1cc43: 0x6c210e20, + 0x1cc44: 0x6d07aa20, 0x1cc45: 0x6ce34a20, 0x1cc46: 0x6d038020, 0x1cc47: 0x6c277a20, + 0x1cc48: 0x6cc75220, 0x1cc49: 0x6c9f6020, 0x1cc4a: 0x6c64b820, 0x1cc4b: 0x6cefe020, + 0x1cc4c: 0x6cc86620, 0x1cc4d: 0x6c593820, 0x1cc4e: 0x6d00be20, 0x1cc4f: 0x6c1fe820, + 0x1cc50: 0x6c65ae20, 0x1cc51: 0x6d3bce20, 0x1cc52: 0x6c171620, 0x1cc53: 0x6c890a20, + 0x1cc54: 0x6cc2fe20, 0x1cc55: 0x6cf9d420, 0x1cc56: 0x6c32ce20, 0x1cc57: 0x6d262220, + 0x1cc58: 0x6d0b2e20, 0x1cc59: 0x6ca50220, 0x1cc5a: 0x6c557220, 0x1cc5b: 0x6d1bbe20, + 0x1cc5c: 0x6d215e20, 0x1cc5d: 0x6c59d620, 0x1cc5e: 0x6cc8d420, 0x1cc5f: 0x6ccb3020, + 0x1cc60: 0x6c8e7c20, 0x1cc61: 0x6cd1de20, 0x1cc62: 0x6cc69e20, 0x1cc63: 0x6cdd8220, + 0x1cc64: 0x6d112620, 0x1cc65: 0x6cf15c20, 0x1cc66: 0x6cf45c20, 0x1cc67: 0x6d317e20, + 0x1cc68: 0x6c6d2a20, 0x1cc69: 0x6d1c8a20, 0x1cc6a: 0x6c969e20, 0x1cc6b: 0x6ce1dc20, + 0x1cc6c: 0x6c8e8220, 0x1cc6d: 0x6ce11820, 0x1cc6e: 0x6c864e20, 0x1cc6f: 0x6c80c420, + 0x1cc70: 0x6c4a7020, 0x1cc71: 0x6d325020, 0x1cc72: 0x6cbad020, 0x1cc73: 0x6c25be20, + 0x1cc74: 0x6c748020, 0x1cc75: 0x6d2f8e20, 0x1cc76: 0x6d112820, 0x1cc77: 0x6c00bc20, + 0x1cc78: 0x6c0d4620, 0x1cc79: 0x6cd4f620, 0x1cc7a: 0x6c16c020, 0x1cc7b: 0x6c7d8020, + 0x1cc7c: 0x6d3b8820, 0x1cc7d: 0x6c234020, 0x1cc7e: 0x6c6cb020, 0x1cc7f: 0x6d141620, + // Block 0x732, offset 0x1cc80 + 0x1cc80: 0x6c250020, 0x1cc81: 0x6c234220, 0x1cc82: 0x6cb63820, 0x1cc83: 0x6c841a20, + 0x1cc84: 0x6d1d0820, 0x1cc85: 0x6cdd8a20, 0x1cc86: 0x6cc08c20, 0x1cc87: 0x6d082020, + 0x1cc88: 0x6c026620, 0x1cc89: 0x6c88c420, 0x1cc8a: 0x6c9ad420, 0x1cc8b: 0x6d2eda20, + 0x1cc8c: 0x6d1a9620, 0x1cc8d: 0x6c57e220, 0x1cc8e: 0x6d1be620, 0x1cc8f: 0x6cf0ce20, + 0x1cc90: 0x6c92e620, 0x1cc91: 0x6cf3ec20, 0x1cc92: 0x6c2aac20, 0x1cc93: 0x6d054820, + 0x1cc94: 0x6d2b9420, 0x1cc95: 0x6d0a4220, 0x1cc96: 0x6cc1b420, 0x1cc97: 0x6c299420, + 0x1cc98: 0x6c8be020, 0x1cc99: 0x6c8a1c20, 0x1cc9a: 0x6cbf6220, 0x1cc9b: 0x6cdb3420, + 0x1cc9c: 0x6c59ec20, 0x1cc9d: 0x6c4a8c20, 0x1cc9e: 0x6cb45220, 0x1cc9f: 0x6c6e3220, + 0x1cca0: 0x6c38be20, 0x1cca1: 0x6c6d4220, 0x1cca2: 0x6c8e9820, 0x1cca3: 0x6c5f3620, + 0x1cca4: 0x6c5cae20, 0x1cca5: 0x6c6e3420, 0x1cca6: 0x6c00e220, 0x1cca7: 0x6c0a8e20, + 0x1cca8: 0x6c120e20, 0x1cca9: 0x6cc1d820, 0x1ccaa: 0x6d2a5820, 0x1ccab: 0x6c290c20, + 0x1ccac: 0x6c694c20, 0x1ccad: 0x6c4c0420, 0x1ccae: 0x6ce07e20, 0x1ccaf: 0x6c5c5420, + 0x1ccb0: 0x6c58a620, 0x1ccb1: 0x6ccb7020, 0x1ccb2: 0x6cdc7620, 0x1ccb3: 0x6ce4c620, + 0x1ccb4: 0x6c1f9a20, 0x1ccb5: 0x6d21b820, 0x1ccb6: 0x6c6d6820, 0x1ccb7: 0x6c917620, + 0x1ccb8: 0x6c0d6020, 0x1ccb9: 0x6cd54220, 0x1ccba: 0x6cf21820, 0x1ccbb: 0x6d41a220, + 0x1ccbc: 0x6c7fd020, 0x1ccbd: 0x6cf82020, 0x1ccbe: 0x6d3ea820, 0x1ccbf: 0x6d083020, + // Block 0x733, offset 0x1ccc0 + 0x1ccc0: 0x6cc88420, 0x1ccc1: 0x6cf31e20, 0x1ccc2: 0x6c415820, 0x1ccc3: 0x6c827220, + 0x1ccc4: 0x6c31da20, 0x1ccc5: 0x6c86fe20, 0x1ccc6: 0x6d374020, 0x1ccc7: 0x6cc76a20, + 0x1ccc8: 0x6c848e20, 0x1ccc9: 0x6d29ac20, 0x1ccca: 0x6cbf7620, 0x1cccb: 0x6ce43a20, + 0x1cccc: 0x6c4aa420, 0x1cccd: 0x6cdc0020, 0x1ccce: 0x6c7eb220, 0x1cccf: 0x6c8fe020, + 0x1ccd0: 0x6c918620, 0x1ccd1: 0x6c872620, 0x1ccd2: 0x6d29b220, 0x1ccd3: 0x6c808a20, + 0x1ccd4: 0x6d1c2e20, 0x1ccd5: 0x6c9cb420, 0x1ccd6: 0x6cfd9c20, 0x1ccd7: 0x6cbf8820, + 0x1ccd8: 0x6c49b820, 0x1ccd9: 0x6c2a5020, 0x1ccda: 0x6d29c020, 0x1ccdb: 0x6c58ce20, + 0x1ccdc: 0x6c483e20, 0x1ccdd: 0x6c0eba20, 0x1ccde: 0x6c2e8820, 0x1ccdf: 0x6c0ed820, + 0x1cce0: 0x6c568e20, 0x1cce1: 0x6d347620, 0x1cce2: 0x6cb18020, 0x1cce3: 0x6c050c20, + 0x1cce4: 0x6cc4f020, 0x1cce5: 0x6c87a220, 0x1cce6: 0x6cec0c20, + 0x1cce8: 0x6cfdaa20, 0x1cce9: 0x6cb8aa20, 0x1ccea: 0x6c04c020, 0x1cceb: 0x6cae3a20, + 0x1ccec: 0x6c39c820, 0x1cced: 0x6c282620, 0x1ccee: 0x6cf26c20, 0x1ccef: 0x6cab3420, + 0x1ccf2: 0x6cec4a20, 0x1ccf3: 0x6c552a20, + 0x1ccf4: 0x6c8cc020, 0x1ccf5: 0x6d14aa20, 0x1ccf6: 0x6cb29420, 0x1ccf7: 0x6c223820, + 0x1ccf8: 0x6c042020, 0x1ccf9: 0x6c72ea20, 0x1ccfa: 0x6c16a820, 0x1ccfb: 0x6c1aa820, + 0x1ccfd: 0x6c296820, 0x1ccfe: 0x6c9bd620, 0x1ccff: 0x6c109820, + // Block 0x734, offset 0x1cd00 + 0x1cd00: 0x6d3c8820, 0x1cd01: 0x6cb2aa20, 0x1cd02: 0x6c0afe20, 0x1cd03: 0x6d393220, + 0x1cd04: 0x6d316c20, 0x1cd06: 0x6c225020, 0x1cd07: 0x6d1bd220, + 0x1cd08: 0x6cb7b220, 0x1cd09: 0x6cfb7420, 0x1cd0a: 0x6c90f220, 0x1cd0b: 0x6c2c9220, + 0x1cd0c: 0x6cab5020, 0x1cd0d: 0x6c9b2e20, 0x1cd0e: 0x6d3b8a20, 0x1cd0f: 0x6c084e20, + 0x1cd10: 0x6c8c6420, 0x1cd11: 0x6d2bb020, 0x1cd12: 0x6cf47c20, 0x1cd13: 0x6cb0c220, + 0x1cd14: 0x6c280220, 0x1cd15: 0x6cf27420, 0x1cd16: 0x6d1c0820, 0x1cd17: 0x6d0e0420, + 0x1cd18: 0x6c415c20, 0x1cd19: 0x6c273420, 0x1cd1a: 0x6cd03820, 0x1cd1b: 0x6ce49a20, + 0x1cd1c: 0x6ce49c20, 0x1cd1d: 0x6c4e1c20, 0x1cd1e: 0x6c16b020, 0x1cd1f: 0x6cd0d220, + 0x1cd20: 0x6cbe6e20, 0x1cd21: 0x6ccfcc20, 0x1cd22: 0x6c15aa20, 0x1cd23: 0x6c15ac20, + 0x1cd24: 0x6cc89c20, 0x1cd25: 0x6cd10620, 0x1cd26: 0x6cda4c20, 0x1cd27: 0x6cd00820, + 0x1cd28: 0x6d1e6c20, 0x1cd29: 0x6cd66020, 0x1cd2a: 0x6c920e20, 0x1cd2b: 0x6c40a820, + 0x1cd2c: 0x6d1e1020, 0x1cd2d: 0x6c080e20, 0x1cd2e: 0x6c3cdc20, 0x1cd2f: 0x6ca90820, + 0x1cd30: 0x6ce47e20, 0x1cd31: 0x6d1ee020, 0x1cd32: 0x6c63fc20, 0x1cd33: 0x6ccf9a20, + 0x1cd34: 0x6d2c1820, 0x1cd35: 0x6c2d3220, 0x1cd36: 0x6c3dce20, 0x1cd37: 0x6ca3e220, + 0x1cd38: 0x6c2cbc20, 0x1cd39: 0x6cb24820, 0x1cd3a: 0x6ce62e20, 0x1cd3b: 0x6c578420, + 0x1cd3c: 0x6ce6b220, 0x1cd3d: 0x6d321a20, 0x1cd3e: 0x6d28f620, 0x1cd3f: 0x6c9b0820, + // Block 0x735, offset 0x1cd40 + 0x1cd40: 0x6c093c20, 0x1cd41: 0x6cb58620, 0x1cd42: 0x6c8f2620, 0x1cd43: 0x6d09de20, + 0x1cd44: 0x6c8e4420, 0x1cd45: 0x6c170820, 0x1cd46: 0x6ca23220, 0x1cd47: 0x6d278a20, + 0x1cd48: 0x6c393620, 0x1cd49: 0x6c3e1820, 0x1cd4a: 0x6c44bc20, 0x1cd4b: 0x6ce48e20, + 0x1cd4c: 0x6c6bca20, 0x1cd4d: 0x6c6bcc20, 0x1cd4e: 0x6cc35220, 0x1cd4f: 0x6cf07c20, + 0x1cd50: 0x6c3e1a20, 0x1cd51: 0x6ce49020, 0x1cd52: 0x6ca23420, 0x1cd53: 0x6c341e20, + 0x1cd54: 0x6cacb020, 0x1cd55: 0x6c675620, 0x1cd56: 0x6cebd220, 0x1cd57: 0x6c269020, + 0x1cd58: 0x6ca3f020, 0x1cd59: 0x6c8e4c20, 0x1cd5a: 0x6c079a20, 0x1cd5b: 0x6d31c820, + 0x1cd5c: 0x6c1f2820, 0x1cd5d: 0x6ca23820, 0x1cd5e: 0x6ca23a20, 0x1cd5f: 0x6c12d820, + 0x1cd60: 0x6ce49620, 0x1cd61: 0x6c40f220, 0x1cd62: 0x6c096420, 0x1cd63: 0x6c269a20, + 0x1cd64: 0x6d35ea20, 0x1cd65: 0x6c361220, 0x1cd66: 0x6cb5ce20, 0x1cd67: 0x6c94a020, + 0x1cd68: 0x6cac3e20, 0x1cd69: 0x6d199020, 0x1cd6a: 0x6c384e20, 0x1cd6b: 0x6c579820, + 0x1cd6c: 0x6ccef220, 0x1cd6d: 0x6d212e20, 0x1cd6e: 0x6ca24220, 0x1cd6f: 0x6c75be20, + 0x1cd70: 0x6d176620, 0x1cd71: 0x6c8e5820, 0x1cd72: 0x6ccef420, 0x1cd73: 0x6c2eac20, + 0x1cd74: 0x6c1db020, 0x1cd75: 0x6c579e20, 0x1cd76: 0x6c290020, 0x1cd77: 0x6d3c9020, + 0x1cd78: 0x6c5eea20, 0x1cd79: 0x6ced2a20, 0x1cd7a: 0x6c676620, 0x1cd7b: 0x6c1a2620, + 0x1cd7c: 0x6c171e20, 0x1cd7d: 0x6cea8020, 0x1cd7e: 0x6c825220, 0x1cd7f: 0x6c5f1620, + // Block 0x736, offset 0x1cd80 + 0x1cd80: 0x6c13b020, 0x1cd81: 0x6c8e9a20, 0x1cd82: 0x6c2f3c20, 0x1cd83: 0x6ce98220, + 0x1cd84: 0x6c8c6c20, 0x1cd85: 0x6c678c20, 0x1cd86: 0x6c679020, 0x1cd87: 0x6c1e0020, + 0x1cd88: 0x6cb0d620, 0x1cd89: 0x6c2f0620, 0x1cd8a: 0x6c2f1020, 0x1cd8b: 0x6cb04420, + 0x1cd8c: 0x6c6a8220, 0x1cd8d: 0x6c287220, 0x1cd8e: 0x6cd4da20, 0x1cd8f: 0x6cd4dc20, + 0x1cd90: 0x6d369220, 0x1cd91: 0x6d153420, 0x1cd92: 0x6ca54020, 0x1cd93: 0x6ca39420, + 0x1cd94: 0x6c2f4e20, 0x1cd95: 0x6c08be20, 0x1cd96: 0x6c69f620, 0x1cd97: 0x6c89da20, + 0x1cd98: 0x6c426220, 0x1cd99: 0x6c437620, 0x1cd9a: 0x6c6fd620, 0x1cd9b: 0x6d38da20, + 0x1cd9c: 0x6cfa3020, 0x1cd9d: 0x6ccd7220, 0x1cd9e: 0x6d057220, 0x1cd9f: 0x6caa9e20, + 0x1cda0: 0x6c859220, 0x1cda1: 0x6d0f8a20, 0x1cda2: 0x6c192020, 0x1cda3: 0x6d1f0c20, + 0x1cda4: 0x6c033220, 0x1cda5: 0x6c6bce20, 0x1cda6: 0x6c73fe20, 0x1cda7: 0x6cb59620, + 0x1cda8: 0x6cf95620, 0x1cda9: 0x6c251e20, 0x1cdaa: 0x6c095220, 0x1cdab: 0x6d16fe20, + 0x1cdac: 0x6c85aa20, 0x1cdad: 0x6d401a20, 0x1cdae: 0x6c204e20, 0x1cdaf: 0x6c3c2620, + 0x1cdb0: 0x6d3ad220, 0x1cdb1: 0x6cad8620, 0x1cdb2: 0x6cafd020, 0x1cdb3: 0x6c418a20, + 0x1cdb4: 0x6c77ee20, 0x1cdb5: 0x6c21fa20, 0x1cdb6: 0x6d08de20, 0x1cdb7: 0x6d33c620, + 0x1cdb8: 0x6c283020, 0x1cdb9: 0x6d31ca20, 0x1cdba: 0x6c380220, 0x1cdbb: 0x6d350e20, + 0x1cdbc: 0x6ce29c20, 0x1cdbd: 0x6c706a20, 0x1cdbe: 0x6c600220, 0x1cdbf: 0x6c3a9a20, + // Block 0x737, offset 0x1cdc0 + 0x1cdc0: 0x6c706c20, 0x1cdc1: 0x6cccda20, 0x1cdc2: 0x6c634420, 0x1cdc3: 0x6d080820, + 0x1cdc4: 0x6d2cbc20, 0x1cdc5: 0x6c0e1420, 0x1cdc6: 0x6ca80a20, 0x1cdc7: 0x6d334620, + 0x1cdc8: 0x6d1d8020, 0x1cdc9: 0x6c6e6820, 0x1cdca: 0x6cc2e020, 0x1cdcb: 0x6ce29e20, + 0x1cdcc: 0x6ce6f420, 0x1cdcd: 0x6d14e620, 0x1cdce: 0x6c6a0020, 0x1cdcf: 0x6cefb020, + 0x1cdd0: 0x6c5b3620, 0x1cdd1: 0x6cdfa220, 0x1cdd2: 0x6d101220, 0x1cdd3: 0x6c1c1220, + 0x1cdd4: 0x6d35ec20, 0x1cdd5: 0x6c523220, 0x1cdd6: 0x6d0b5220, 0x1cdd7: 0x6c9a9220, + 0x1cdd8: 0x6c311a20, 0x1cdd9: 0x6c6e8620, 0x1cdda: 0x6cfec020, 0x1cddb: 0x6ce7c820, + 0x1cddc: 0x6ce86220, 0x1cddd: 0x6c986020, 0x1cdde: 0x6cb05e20, 0x1cddf: 0x6cfec220, + 0x1cde0: 0x6cdb8020, 0x1cde1: 0x6c3d7020, 0x1cde2: 0x6c861220, 0x1cde3: 0x6d363420, + 0x1cde4: 0x6c25de20, 0x1cde5: 0x6c345220, 0x1cde6: 0x6cf4ee20, 0x1cde7: 0x6ccbf420, + 0x1cde8: 0x6c815a20, 0x1cde9: 0x6cd46a20, 0x1cdea: 0x6c592620, 0x1cdeb: 0x6cfb5e20, + 0x1cdec: 0x6d17ee20, 0x1cded: 0x6c07f820, 0x1cdee: 0x6d2f3420, 0x1cdef: 0x6c495620, + 0x1cdf0: 0x6cdfec20, 0x1cdf1: 0x6c3ab820, 0x1cdf2: 0x6c966a20, 0x1cdf3: 0x6c8bba20, + 0x1cdf4: 0x6c1abc20, 0x1cdf5: 0x6c621a20, 0x1cdf6: 0x6ce50220, 0x1cdf7: 0x6c013820, + 0x1cdf8: 0x6c1c3220, 0x1cdf9: 0x6c09d020, 0x1cdfa: 0x6c09d220, 0x1cdfb: 0x6c9f6220, + 0x1cdfc: 0x6c481a20, 0x1cdfd: 0x6c330820, 0x1cdfe: 0x6c354220, 0x1cdff: 0x6cefe220, + // Block 0x738, offset 0x1ce00 + 0x1ce00: 0x6d209220, 0x1ce01: 0x6c254420, 0x1ce02: 0x6d0b5620, 0x1ce03: 0x6d3a1620, + 0x1ce04: 0x6c244020, 0x1ce05: 0x6c27e620, 0x1ce06: 0x6cd0b020, 0x1ce07: 0x6d380220, + 0x1ce08: 0x6c1c4620, 0x1ce09: 0x6d239420, 0x1ce0a: 0x6c541c20, 0x1ce0b: 0x6c3c5c20, + 0x1ce0c: 0x6c7e8420, 0x1ce0d: 0x6d0fd220, 0x1ce0e: 0x6c18de20, 0x1ce0f: 0x6ce8c420, + 0x1ce10: 0x6d226e20, 0x1ce11: 0x6c4c2820, 0x1ce12: 0x6cf19e20, 0x1ce13: 0x6c594420, + 0x1ce14: 0x6c7aa220, 0x1ce15: 0x6c642820, 0x1ce16: 0x6d19f620, 0x1ce17: 0x6d182c20, + 0x1ce18: 0x6c911020, 0x1ce19: 0x6ccaf820, 0x1ce1a: 0x6c749a20, 0x1ce1b: 0x6c1c5a20, + 0x1ce1c: 0x6cf6a620, 0x1ce1d: 0x6c492220, 0x1ce1e: 0x6d185c20, 0x1ce1f: 0x6cf16020, + 0x1ce20: 0x6c608c20, 0x1ce21: 0x6c205c20, 0x1ce22: 0x6c049220, 0x1ce23: 0x6c5bfe20, + 0x1ce24: 0x6c8e8420, 0x1ce25: 0x6c149c20, 0x1ce26: 0x6cd47220, 0x1ce27: 0x6caaaa20, + 0x1ce28: 0x6c2cd820, 0x1ce29: 0x6c26fc20, 0x1ce2a: 0x6c0d0e20, 0x1ce2b: 0x6cdfb820, + 0x1ce2c: 0x6d2f4020, 0x1ce2d: 0x6c0c1c20, 0x1ce2e: 0x6cd0c620, 0x1ce2f: 0x6c246220, + 0x1ce30: 0x6c95c020, 0x1ce31: 0x6d18a420, 0x1ce32: 0x6d403220, 0x1ce33: 0x6c1d7c20, + 0x1ce34: 0x6d2f4220, 0x1ce35: 0x6d2d4a20, 0x1ce36: 0x6cda4220, 0x1ce37: 0x6ccb5e20, + 0x1ce38: 0x6cc39c20, 0x1ce39: 0x6c2e3c20, 0x1ce3a: 0x6c911a20, 0x1ce3b: 0x6c911c20, + 0x1ce3c: 0x6ca15220, 0x1ce3d: 0x6cbda620, 0x1ce3e: 0x6d1b0820, 0x1ce3f: 0x6d1d0a20, + // Block 0x739, offset 0x1ce40 + 0x1ce40: 0x6c59fa20, 0x1ce41: 0x6c3f0820, 0x1ce42: 0x6c8a2620, 0x1ce43: 0x6c8fac20, + 0x1ce44: 0x6cbbfe20, 0x1ce45: 0x6c8ea820, 0x1ce46: 0x6c817a20, 0x1ce47: 0x6cfba820, + 0x1ce48: 0x6c3ad620, 0x1ce49: 0x6c280420, 0x1ce4a: 0x6d1b7420, 0x1ce4b: 0x6c51f020, + 0x1ce4c: 0x6c005420, 0x1ce4d: 0x6c04a620, 0x1ce4e: 0x6cfbaa20, 0x1ce4f: 0x6c492a20, + 0x1ce50: 0x6c4b8c20, 0x1ce51: 0x6ca9f620, 0x1ce52: 0x6d242e20, 0x1ce53: 0x6cef4a20, + 0x1ce54: 0x6d18e820, 0x1ce55: 0x6d1dc620, 0x1ce56: 0x6cb07820, 0x1ce57: 0x6c82ee20, + 0x1ce58: 0x6c86a820, 0x1ce59: 0x6cd57820, 0x1ce5a: 0x6c28d820, 0x1ce5b: 0x6c8c3c20, + 0x1ce5c: 0x6c2d8c20, 0x1ce5d: 0x6c8c3e20, 0x1ce5e: 0x6c7f6420, 0x1ce5f: 0x6c0d1020, + 0x1ce60: 0x6c62ba20, 0x1ce61: 0x6c1ae820, 0x1ce62: 0x6d103820, 0x1ce63: 0x6d086220, + 0x1ce64: 0x6c6a3820, 0x1ce65: 0x6d330e20, 0x1ce66: 0x6c99cc20, 0x1ce67: 0x6c874420, + 0x1ce68: 0x6c5e4820, 0x1ce69: 0x6c7f7820, 0x1ce6a: 0x6c631420, 0x1ce6b: 0x6c2cf220, + 0x1ce6c: 0x6d086620, 0x1ce6d: 0x6d1d2e20, 0x1ce6e: 0x6d1b2820, 0x1ce6f: 0x6cc21420, + 0x1ce70: 0x6d1dea20, 0x1ce71: 0x6cdfc820, 0x1ce72: 0x6c2cfe20, 0x1ce73: 0x6c95da20, + 0x1ce74: 0x6c947c20, 0x1ce75: 0x6c948420, 0x1ce76: 0x6c0e4620, 0x1ce77: 0x6c0e5420, + 0x1ce78: 0x6c4ada20, 0x1ce79: 0x6c037020, 0x1ce7a: 0x6c37e620, 0x1ce7b: 0x6c2a9c20, + 0x1ce7c: 0x6c37ec20, 0x1ce7d: 0x6c040820, 0x1ce7e: 0x6c041620, 0x1ce7f: 0x6cbc8020, + // Block 0x73a, offset 0x1ce80 + 0x1ce80: 0x6c5fd620, 0x1ce81: 0x6d2a6820, 0x1ce82: 0x6d2a6a20, 0x1ce83: 0x6c994420, + 0x1ce84: 0x6c2a8c20, 0x1ce85: 0x6cabb820, 0x1ce86: 0x6c69f820, 0x1ce87: 0x6c59ac20, + 0x1ce88: 0x6c4a3e20, 0x1ce89: 0x6c229620, 0x1ce8a: 0x6c8ccc20, 0x1ce8b: 0x6c42b620, + 0x1ce8c: 0x6ca0f020, 0x1ce8d: 0x6c5ffa20, 0x1ce8e: 0x6c68e420, 0x1ce8f: 0x6caf0620, + 0x1ce90: 0x6c42be20, 0x1ce91: 0x6c004020, 0x1ce92: 0x6c356620, 0x1ce93: 0x6c503e20, + 0x1ce94: 0x6c4ec420, 0x1ce95: 0x6c09a420, 0x1ce96: 0x6ced2220, 0x1ce97: 0x6c1dbc20, + 0x1ce98: 0x6cba5c20, 0x1ce99: 0x6cf65220, 0x1ce9a: 0x6c005020, 0x1ce9b: 0x6cffb820, + 0x1ce9c: 0x6c505c20, 0x1ce9d: 0x6c5a7820, 0x1ce9e: 0x6c505e20, 0x1ce9f: 0x6d2b0220, + 0x1cea0: 0x6c251020, 0x1cea1: 0x6c506c20, 0x1cea2: 0x6cffc220, 0x1cea3: 0x6d132820, + 0x1cea4: 0x6cb33820, 0x1cea5: 0x6c507220, 0x1cea6: 0x6c695220, 0x1cea7: 0x6c00f220, + 0x1cea8: 0x6d03ae20, 0x1cea9: 0x6c5a8020, 0x1ceaa: 0x6c872820, 0x1ceab: 0x6cb1a620, + 0x1ceac: 0x6c51a220, 0x1cead: 0x6c69e220, 0x1ceae: 0x6cafa820, 0x1ceaf: 0x6c41ca20, + 0x1ceb0: 0x6cad8820, 0x1ceb1: 0x6d391c20, 0x1ceb2: 0x6c756e20, 0x1ceb3: 0x6cc06620, + 0x1ceb4: 0x6c259420, 0x1ceb5: 0x6cc3ce20, 0x1ceb6: 0x6d2bee20, 0x1ceb7: 0x6c47b420, + 0x1ceb8: 0x6c757620, 0x1ceb9: 0x6c757820, 0x1ceba: 0x6d394420, 0x1cebb: 0x6d2bfe20, + 0x1cebc: 0x6c47d820, 0x1cebd: 0x6d2f7c20, 0x1cebe: 0x6c31e020, 0x1cebf: 0x6c9f8a20, + // Block 0x73b, offset 0x1cec0 + 0x1cec0: 0x6cb6da20, 0x1cec1: 0x6d1c5620, 0x1cec2: 0x6d20c620, 0x1cec3: 0x6c069220, + 0x1cec4: 0x6d2f5e20, 0x1cec5: 0x6d37a820, 0x1cec6: 0x6cae3c20, 0x1cec7: 0x6c50de20, + 0x1cec8: 0x6d1c5c20, 0x1cec9: 0x6c50f420, 0x1ceca: 0x6d173820, 0x1cecb: 0x6c0e6020, + 0x1cecc: 0x6cecfc20, 0x1cecd: 0x6c50f620, 0x1cece: 0x6c021620, 0x1cecf: 0x6d2de220, + 0x1ced0: 0x6d0c8020, 0x1ced1: 0x6c647e20, 0x1ced2: 0x6c510e20, 0x1ced3: 0x6d208820, + 0x1ced4: 0x6c7c3a20, 0x1ced5: 0x6c394620, 0x1ced6: 0x6c413220, 0x1ced7: 0x6c2a1220, + 0x1ced8: 0x6cac5620, 0x1ced9: 0x6c3f6620, 0x1ceda: 0x6cc06820, 0x1cedb: 0x6cd15e20, + 0x1cedc: 0x6c2a1620, 0x1cedd: 0x6c926a20, 0x1cede: 0x6d2df820, 0x1cedf: 0x6c9b2220, + 0x1cee0: 0x6c841c20, 0x1cee1: 0x6c6ca220, 0x1cee2: 0x6d071220, 0x1cee3: 0x6c64ca20, + 0x1cee4: 0x6cac6a20, 0x1cee5: 0x6c49a620, 0x1cee6: 0x6c014e20, 0x1cee7: 0x6c915c20, + 0x1cee8: 0x6d065e20, 0x1cee9: 0x6d38b420, 0x1ceea: 0x6c299620, 0x1ceeb: 0x6c015620, + 0x1ceec: 0x6c47e420, 0x1ceed: 0x6c872a20, 0x1ceee: 0x6ca26420, 0x1ceef: 0x6c2f5020, + 0x1cef0: 0x6c421020, 0x1cef1: 0x6d057420, 0x1cef2: 0x6c983a20, 0x1cef3: 0x6cee4e20, + 0x1cef4: 0x6d344020, 0x1cef5: 0x6cb74a20, 0x1cef6: 0x6d25e020, 0x1cef7: 0x6ce49220, + 0x1cef8: 0x6cfd6420, 0x1cef9: 0x6c33ca20, 0x1cefa: 0x6d02ba20, 0x1cefb: 0x6cf86620, + 0x1cefc: 0x6cacae20, 0x1cefd: 0x6c3c2820, 0x1cefe: 0x6c33de20, 0x1ceff: 0x6c9f3c20, + // Block 0x73c, offset 0x1cf00 + 0x1cf00: 0x6c9fee20, 0x1cf01: 0x6cd12c20, 0x1cf02: 0x6cd34420, 0x1cf03: 0x6d278c20, + 0x1cf04: 0x6c9e0e20, 0x1cf05: 0x6cac3a20, 0x1cf06: 0x6c39cc20, 0x1cf07: 0x6c9e8a20, + 0x1cf08: 0x6c27c220, 0x1cf09: 0x6c99e020, 0x1cf0a: 0x6c995820, 0x1cf0b: 0x6c770420, + 0x1cf0c: 0x6cfc9020, 0x1cf0d: 0x6c79ba20, 0x1cf0e: 0x6cd35620, 0x1cf0f: 0x6d0f5420, + 0x1cf10: 0x6d32a220, 0x1cf11: 0x6d119c20, 0x1cf12: 0x6ccfce20, 0x1cf13: 0x6c5dae20, + 0x1cf14: 0x6c26ec20, 0x1cf15: 0x6d31cc20, 0x1cf16: 0x6c7bee20, 0x1cf17: 0x6c706e20, + 0x1cf18: 0x6cd09a20, 0x1cf19: 0x6d14d020, 0x1cf1a: 0x6cd12e20, 0x1cf1b: 0x6c9a8a20, + 0x1cf1c: 0x6ca0f420, 0x1cf1d: 0x6d3ad620, 0x1cf1e: 0x6d313c20, 0x1cf1f: 0x6d313e20, + 0x1cf20: 0x6c9dbc20, 0x1cf21: 0x6cd35820, 0x1cf22: 0x6d24d620, 0x1cf23: 0x6c2e8a20, + 0x1cf24: 0x6ca69020, 0x1cf25: 0x6d3f4620, 0x1cf26: 0x6d3f4820, 0x1cf27: 0x6c179620, + 0x1cf28: 0x6d2c7620, 0x1cf29: 0x6d087e20, 0x1cf2a: 0x6c0dda20, 0x1cf2b: 0x6c9cea20, + 0x1cf2c: 0x6c8f7e20, 0x1cf2d: 0x6cdbc220, 0x1cf2e: 0x6ce73e20, 0x1cf2f: 0x6c9c3020, + 0x1cf30: 0x6c2f3620, 0x1cf31: 0x6c2c4620, 0x1cf32: 0x6ca54c20, 0x1cf33: 0x6c9ff820, + 0x1cf34: 0x6d088c20, 0x1cf35: 0x6c1aaa20, 0x1cf36: 0x6c7bf420, 0x1cf37: 0x6c735a20, + 0x1cf38: 0x6ca1ce20, 0x1cf39: 0x6d323a20, 0x1cf3a: 0x6ce5d220, 0x1cf3b: 0x6d0fac20, + 0x1cf3c: 0x6d0d6c20, 0x1cf3d: 0x6ca10620, 0x1cf3e: 0x6d382620, 0x1cf3f: 0x6ca0f620, + // Block 0x73d, offset 0x1cf40 + 0x1cf40: 0x6d311220, 0x1cf41: 0x6d32b620, 0x1cf42: 0x6c9a0220, 0x1cf43: 0x6cdd1e20, + 0x1cf44: 0x6cceda20, 0x1cf45: 0x6c4ec820, 0x1cf46: 0x6c592820, 0x1cf47: 0x6c2c5c20, + 0x1cf48: 0x6c1a7620, 0x1cf49: 0x6c25e020, 0x1cf4a: 0x6c736420, 0x1cf4b: 0x6c356820, + 0x1cf4c: 0x6c97bc20, 0x1cf4d: 0x6cfcc420, 0x1cf4e: 0x6cf61e20, 0x1cf4f: 0x6c7dd420, + 0x1cf50: 0x6c7f4820, 0x1cf51: 0x6c659820, 0x1cf52: 0x6ccd4e20, 0x1cf53: 0x6ce50420, + 0x1cf54: 0x6c4bfc20, 0x1cf55: 0x6ced2c20, 0x1cf56: 0x6c839820, 0x1cf57: 0x6cd39c20, + 0x1cf58: 0x6cbf4020, 0x1cf59: 0x6c8b1820, 0x1cf5a: 0x6d0b3020, 0x1cf5b: 0x6c6ec820, + 0x1cf5c: 0x6d32d420, 0x1cf5d: 0x6c83ea20, 0x1cf5e: 0x6c7f4a20, 0x1cf5f: 0x6cdc4c20, + 0x1cf60: 0x6c737420, 0x1cf61: 0x6cd72820, 0x1cf62: 0x6cdbca20, 0x1cf63: 0x6c317420, + 0x1cf64: 0x6c09d420, 0x1cf65: 0x6cb0a620, 0x1cf66: 0x6ca29c20, 0x1cf67: 0x6c5cd420, + 0x1cf68: 0x6ca6ae20, 0x1cf69: 0x6c926c20, 0x1cf6a: 0x6d17f220, 0x1cf6b: 0x6c6aec20, + 0x1cf6c: 0x6c113620, 0x1cf6d: 0x6d38ea20, 0x1cf6e: 0x6d217220, 0x1cf6f: 0x6c5cd620, + 0x1cf70: 0x6c96c620, 0x1cf71: 0x6cfa4420, 0x1cf72: 0x6d040420, 0x1cf73: 0x6c5ada20, + 0x1cf74: 0x6c4c0220, 0x1cf75: 0x6d290a20, 0x1cf76: 0x6c218620, 0x1cf77: 0x6c64ba20, + 0x1cf78: 0x6c9a9e20, 0x1cf79: 0x6c322620, 0x1cf7a: 0x6c541e20, 0x1cf7b: 0x6d07b420, + 0x1cf7c: 0x6ce53c20, 0x1cf7d: 0x6c7c9220, 0x1cf7e: 0x6c42ce20, 0x1cf7f: 0x6cc8da20, + // Block 0x73e, offset 0x1cf80 + 0x1cf80: 0x6c99a020, 0x1cf81: 0x6d071420, 0x1cf82: 0x6c381e20, 0x1cf83: 0x6cf30820, + 0x1cf84: 0x6c9e7820, 0x1cf85: 0x6c1e2e20, 0x1cf86: 0x6c7d0620, 0x1cf87: 0x6c9c3220, + 0x1cf88: 0x6cf25e20, 0x1cf89: 0x6c7a0020, 0x1cf8a: 0x6c298420, 0x1cf8b: 0x6c188220, + 0x1cf8c: 0x6c782420, 0x1cf8d: 0x6cda2420, 0x1cf8e: 0x6cf97620, 0x1cf8f: 0x6cbf5020, + 0x1cf90: 0x6ca15420, 0x1cf91: 0x6ca01620, 0x1cf92: 0x6c977220, 0x1cf93: 0x6cd72c20, + 0x1cf94: 0x6d2b0420, 0x1cf95: 0x6d2f4420, 0x1cf96: 0x6d18a620, 0x1cf97: 0x6c2dde20, + 0x1cf98: 0x6c79c420, 0x1cf99: 0x6ca15620, 0x1cf9a: 0x6cd75c20, 0x1cf9b: 0x6c235620, + 0x1cf9c: 0x6c907820, 0x1cf9d: 0x6c1ad020, 0x1cf9e: 0x6c977820, 0x1cf9f: 0x6cb19a20, + 0x1cfa0: 0x6c199420, 0x1cfa1: 0x6c4b1a20, 0x1cfa2: 0x6c9b3a20, 0x1cfa3: 0x6c596c20, + 0x1cfa4: 0x6cc8f220, 0x1cfa5: 0x6cb1d420, 0x1cfa6: 0x6cf6f020, 0x1cfa7: 0x6cbc0220, + 0x1cfa8: 0x6cb45a20, 0x1cfa9: 0x6d3a8420, 0x1cfaa: 0x6c2aea20, 0x1cfab: 0x6cd07e20, + 0x1cfac: 0x6cd76020, 0x1cfad: 0x6c8a7c20, 0x1cfae: 0x6c185020, 0x1cfaf: 0x6cfbac20, + 0x1cfb0: 0x6c771220, 0x1cfb1: 0x6d132a20, 0x1cfb2: 0x6d074820, 0x1cfb3: 0x6ce79220, + 0x1cfb4: 0x6ca1ea20, 0x1cfb5: 0x6c8be620, 0x1cfb6: 0x6c4b7e20, 0x1cfb7: 0x6c66e020, + 0x1cfb8: 0x6d136420, 0x1cfb9: 0x6c00f420, 0x1cfba: 0x6c5c6a20, 0x1cfbb: 0x6d2dac20, + 0x1cfbc: 0x6c65f220, 0x1cfbd: 0x6c47e620, 0x1cfbe: 0x6d2fea20, 0x1cfbf: 0x6cc1e420, + // Block 0x73f, offset 0x1cfc0 + 0x1cfc0: 0x6c9a3420, 0x1cfc1: 0x6c1e3620, 0x1cfc2: 0x6ccb0620, 0x1cfc3: 0x6ca94c20, + 0x1cfc4: 0x6d09c020, 0x1cfc5: 0x6d123e20, 0x1cfc6: 0x6c5e1820, 0x1cfc7: 0x6c9b7020, + 0x1cfc8: 0x6c9de620, 0x1cfc9: 0x6cb22020, 0x1cfca: 0x6c9de820, 0x1cfcb: 0x6c870220, + 0x1cfcc: 0x6c7c1420, 0x1cfcd: 0x6c750020, 0x1cfce: 0x6d07e220, 0x1cfcf: 0x6c9dee20, + 0x1cfd0: 0x6c5e4a20, 0x1cfd1: 0x6c919220, 0x1cfd2: 0x6c9b8e20, 0x1cfd3: 0x6c8fe420, + 0x1cfd4: 0x6c49bc20, 0x1cfd5: 0x6c97d620, 0x1cfd6: 0x6cf82e20, 0x1cfd7: 0x6c1f9020, + 0x1cfd8: 0x6ce19620, 0x1cfd9: 0x6c771c20, 0x1cfda: 0x6d3a9620, 0x1cfdb: 0x6c98c220, + 0x1cfdc: 0x6c6c3220, 0x1cfdd: 0x6c8ba620, 0x1cfde: 0x6d234a20, 0x1cfdf: 0x6cd78420, + 0x1cfe0: 0x6d2ad220, 0x1cfe1: 0x6c752c20, 0x1cfe2: 0x6cd2a820, 0x1cfe3: 0x6d15c020, + 0x1cfe4: 0x6cd04820, 0x1cfe5: 0x6d339c20, 0x1cfe6: 0x6c53f020, 0x1cfe7: 0x6cd04e20, + 0x1cfe8: 0x6d1ce020, 0x1cfe9: 0x6c72d420, 0x1cfea: 0x6d387820, 0x1cfeb: 0x6c68e820, + 0x1cfec: 0x6c25e220, 0x1cfed: 0x6c32ae20, 0x1cfee: 0x6c006820, 0x1cfef: 0x6c695020, + 0x1cff0: 0x6d2b9820, 0x1cff1: 0x6d265c20, 0x1cff2: 0x6c03ce20, 0x1cff3: 0x6cd22c20, + 0x1cff4: 0x6c2f9420, 0x1cff5: 0x6cb73a20, 0x1cff6: 0x6c5e8620, 0x1cff7: 0x6d3eee20, + 0x1cff8: 0x6c417c20, 0x1cff9: 0x6cf4ba20, 0x1cffa: 0x6d302020, 0x1cffb: 0x6c7a2a20, + 0x1cffc: 0x6c426420, 0x1cffd: 0x6cf84c20, 0x1cffe: 0x6c388820, 0x1cfff: 0x6c7be620, + // Block 0x740, offset 0x1d000 + 0x1d000: 0x6c295820, 0x1d001: 0x6c969220, 0x1d002: 0x6ccbd220, 0x1d003: 0x6c27c420, + 0x1d004: 0x6c740220, 0x1d005: 0x6c85ac20, 0x1d006: 0x6c3d4e20, 0x1d007: 0x6c9f3e20, + 0x1d008: 0x6c35b020, 0x1d009: 0x6c5da620, 0x1d00a: 0x6c772820, 0x1d00b: 0x6d350620, + 0x1d00c: 0x6cb75c20, 0x1d00d: 0x6c76c420, 0x1d00e: 0x6c6bd020, 0x1d00f: 0x6c0d2a20, + 0x1d010: 0x6c35e020, 0x1d011: 0x6d0b8820, 0x1d012: 0x6caf4e20, 0x1d013: 0x6d302420, + 0x1d014: 0x6d0c7820, 0x1d015: 0x6cdc2a20, 0x1d016: 0x6d3b7820, 0x1d017: 0x6c17d220, + 0x1d018: 0x6c33e020, 0x1d019: 0x6cac3c20, 0x1d01a: 0x6d0e4a20, 0x1d01b: 0x6c6d7e20, + 0x1d01c: 0x6c3c2a20, 0x1d01d: 0x6c381020, 0x1d01e: 0x6ca0f820, 0x1d01f: 0x6d2c7820, + 0x1d020: 0x6c707020, 0x1d021: 0x6d22f620, 0x1d022: 0x6c77f020, 0x1d023: 0x6ceb0a20, + 0x1d024: 0x6ceb0c20, 0x1d025: 0x6c2bec20, 0x1d026: 0x6d2d3c20, 0x1d027: 0x6d314220, + 0x1d028: 0x6c35fc20, 0x1d029: 0x6c3e3820, 0x1d02a: 0x6ca23e20, 0x1d02b: 0x6d3ad820, + 0x1d02c: 0x6c7e5c20, 0x1d02d: 0x6c0aee20, 0x1d02e: 0x6caa5620, 0x1d02f: 0x6cb25220, + 0x1d030: 0x6cae6020, 0x1d031: 0x6c8cce20, 0x1d032: 0x6cad8a20, 0x1d033: 0x6c821e20, + 0x1d034: 0x6cb37c20, 0x1d035: 0x6c0e6220, 0x1d036: 0x6cb37e20, 0x1d037: 0x6ccfd020, + 0x1d038: 0x6d28b020, 0x1d039: 0x6c009820, 0x1d03a: 0x6c85d620, 0x1d03b: 0x6c8f8020, + 0x1d03c: 0x6ce73a20, 0x1d03d: 0x6d1e8420, 0x1d03e: 0x6c85d820, 0x1d03f: 0x6c7c2a20, + // Block 0x741, offset 0x1d040 + 0x1d040: 0x6c1ed820, 0x1d041: 0x6c793620, 0x1d042: 0x6cc2e420, 0x1d043: 0x6d399c20, + 0x1d044: 0x6c7b9c20, 0x1d045: 0x6c4a5a20, 0x1d046: 0x6c361420, 0x1d047: 0x6ca4a620, + 0x1d048: 0x6cb86420, 0x1d049: 0x6c924420, 0x1d04a: 0x6cefb220, 0x1d04b: 0x6c009a20, + 0x1d04c: 0x6c448420, 0x1d04d: 0x6cfcb620, 0x1d04e: 0x6d03e220, 0x1d04f: 0x6d0c8a20, + 0x1d050: 0x6c307420, 0x1d051: 0x6cae6c20, 0x1d052: 0x6cf5fc20, 0x1d053: 0x6c81f220, + 0x1d054: 0x6c533c20, 0x1d055: 0x6cd78020, 0x1d056: 0x6cf9b020, 0x1d057: 0x6cbb7020, + 0x1d058: 0x6cbeea20, 0x1d059: 0x6cef0220, 0x1d05a: 0x6cbbdc20, 0x1d05b: 0x6d176820, + 0x1d05c: 0x6c793e20, 0x1d05d: 0x6cfec620, 0x1d05e: 0x6cc3c220, 0x1d05f: 0x6c162a20, + 0x1d060: 0x6c80c820, 0x1d061: 0x6c52ac20, 0x1d062: 0x6d213020, 0x1d063: 0x6cfec820, + 0x1d064: 0x6cf9c620, 0x1d065: 0x6c988e20, 0x1d066: 0x6c960220, 0x1d067: 0x6d1e3c20, + 0x1d068: 0x6c17dc20, 0x1d069: 0x6c182220, 0x1d06a: 0x6cf2f620, 0x1d06b: 0x6c8e5c20, + 0x1d06c: 0x6d1d3c20, 0x1d06d: 0x6c985a20, 0x1d06e: 0x6cc3c420, 0x1d06f: 0x6d0e7820, + 0x1d070: 0x6ccbf620, 0x1d071: 0x6c7dac20, 0x1d072: 0x6d234c20, 0x1d073: 0x6c1c2420, + 0x1d074: 0x6c57de20, 0x1d075: 0x6c91be20, 0x1d076: 0x6c190420, 0x1d077: 0x6c659a20, + 0x1d078: 0x6caaa820, 0x1d079: 0x6cd92620, 0x1d07a: 0x6d3d6e20, 0x1d07b: 0x6c794620, + 0x1d07c: 0x6caeaa20, 0x1d07d: 0x6d0c1420, 0x1d07e: 0x6d3c9220, 0x1d07f: 0x6c797e20, + // Block 0x742, offset 0x1d080 + 0x1d080: 0x6c19ec20, 0x1d081: 0x6cb5fc20, 0x1d082: 0x6d402220, 0x1d083: 0x6cbecc20, + 0x1d084: 0x6c8bbc20, 0x1d085: 0x6c757420, 0x1d086: 0x6c0e7e20, 0x1d087: 0x6c2fac20, + 0x1d088: 0x6c9f6420, 0x1d089: 0x6c2dce20, 0x1d08a: 0x6c64bc20, 0x1d08b: 0x6c51d020, + 0x1d08c: 0x6c926e20, 0x1d08d: 0x6c00ac20, 0x1d08e: 0x6cdc4e20, 0x1d08f: 0x6cc3d220, + 0x1d090: 0x6c837c20, 0x1d091: 0x6c06b020, 0x1d092: 0x6d1a7420, 0x1d093: 0x6c334c20, + 0x1d094: 0x6cf45220, 0x1d095: 0x6cb5fe20, 0x1d096: 0x6c951820, 0x1d097: 0x6ced2e20, + 0x1d098: 0x6c2d2020, 0x1d099: 0x6ca4b220, 0x1d09a: 0x6c073420, 0x1d09b: 0x6cb7a420, + 0x1d09c: 0x6c190620, 0x1d09d: 0x6cc87020, 0x1d09e: 0x6d0cb620, 0x1d09f: 0x6c2ed220, + 0x1d0a0: 0x6c2fb020, 0x1d0a1: 0x6c31a820, 0x1d0a2: 0x6ceb2e20, 0x1d0a3: 0x6c6b0c20, + 0x1d0a4: 0x6d1bc620, 0x1d0a5: 0x6c0b4420, 0x1d0a6: 0x6c78c620, 0x1d0a7: 0x6c0a0220, + 0x1d0a8: 0x6cf0b020, 0x1d0a9: 0x6cd79220, 0x1d0aa: 0x6d318220, 0x1d0ab: 0x6c32d420, + 0x1d0ac: 0x6cf9de20, 0x1d0ad: 0x6c297a20, 0x1d0ae: 0x6ce35420, 0x1d0af: 0x6ca50c20, + 0x1d0b0: 0x6caf1420, 0x1d0b1: 0x6c65c420, 0x1d0b2: 0x6c2c8220, 0x1d0b3: 0x6ce0a220, + 0x1d0b4: 0x6c13f620, 0x1d0b5: 0x6ce54220, 0x1d0b6: 0x6cb7b420, 0x1d0b7: 0x6c341420, + 0x1d0b8: 0x6c3c5e20, 0x1d0b9: 0x6d08a420, 0x1d0ba: 0x6cc3f020, 0x1d0bb: 0x6cc3f220, + 0x1d0bc: 0x6c96a020, 0x1d0bd: 0x6c45a620, 0x1d0be: 0x6ca73820, 0x1d0bf: 0x6cdb0820, + // Block 0x743, offset 0x1d0c0 + 0x1d0c0: 0x6c357820, 0x1d0c1: 0x6c225420, 0x1d0c2: 0x6c8e8820, 0x1d0c3: 0x6cd81a20, + 0x1d0c4: 0x6ce12620, 0x1d0c5: 0x6c058820, 0x1d0c6: 0x6c574620, 0x1d0c7: 0x6caf8620, + 0x1d0c8: 0x6ceff420, 0x1d0c9: 0x6cca8820, 0x1d0ca: 0x6c82d220, 0x1d0cb: 0x6c25c420, + 0x1d0cc: 0x6ce4ba20, 0x1d0cd: 0x6cf9e620, 0x1d0ce: 0x6cf6aa20, 0x1d0cf: 0x6c883e20, + 0x1d0d0: 0x6cac7020, 0x1d0d1: 0x6cef3020, 0x1d0d2: 0x6d27fc20, 0x1d0d3: 0x6c330e20, + 0x1d0d4: 0x6d307e20, 0x1d0d5: 0x6c782620, 0x1d0d6: 0x6c7e6020, 0x1d0d7: 0x6d3b8c20, + 0x1d0d8: 0x6cbed820, 0x1d0d9: 0x6c4be420, 0x1d0da: 0x6d3b9220, 0x1d0db: 0x6c152620, + 0x1d0dc: 0x6cb7da20, 0x1d0dd: 0x6c026c20, 0x1d0de: 0x6cae8620, 0x1d0df: 0x6c8f4020, + 0x1d0e0: 0x6c91de20, 0x1d0e1: 0x6c771420, 0x1d0e2: 0x6c209a20, 0x1d0e3: 0x6c190e20, + 0x1d0e4: 0x6d1afe20, 0x1d0e5: 0x6c82d820, 0x1d0e6: 0x6c0c1e20, 0x1d0e7: 0x6cb7dc20, + 0x1d0e8: 0x6ca07c20, 0x1d0e9: 0x6cb7de20, 0x1d0ea: 0x6c24e820, 0x1d0eb: 0x6d3fc220, + 0x1d0ec: 0x6cbeda20, 0x1d0ed: 0x6c21da20, 0x1d0ee: 0x6c952a20, 0x1d0ef: 0x6c5f5420, + 0x1d0f0: 0x6ccdbe20, 0x1d0f1: 0x6c817c20, 0x1d0f2: 0x6cc1c020, 0x1d0f3: 0x6d2b9a20, + 0x1d0f4: 0x6c2aec20, 0x1d0f5: 0x6c66e220, 0x1d0f6: 0x6cf8f220, 0x1d0f7: 0x6c8be820, + 0x1d0f8: 0x6c2fbe20, 0x1d0f9: 0x6ce01e20, 0x1d0fa: 0x6c59fc20, 0x1d0fb: 0x6cac7620, + 0x1d0fc: 0x6d28ce20, 0x1d0fd: 0x6cbbb820, 0x1d0fe: 0x6c2b4820, 0x1d0ff: 0x6c86aa20, + // Block 0x744, offset 0x1d100 + 0x1d100: 0x6c673e20, 0x1d101: 0x6c688220, 0x1d102: 0x6cf94a20, 0x1d103: 0x6d2f0e20, + 0x1d104: 0x6cbc0420, 0x1d105: 0x6c33b620, 0x1d106: 0x6c65f420, 0x1d107: 0x6d241220, + 0x1d108: 0x6d3cb420, 0x1d109: 0x6c518420, 0x1d10a: 0x6c78e020, 0x1d10b: 0x6d2b1420, + 0x1d10c: 0x6c826a20, 0x1d10d: 0x6c787220, 0x1d10e: 0x6c1ef620, 0x1d10f: 0x6d137020, + 0x1d110: 0x6cc40c20, 0x1d111: 0x6c299a20, 0x1d112: 0x6d161e20, 0x1d113: 0x6c678e20, + 0x1d114: 0x6caf9e20, 0x1d115: 0x6cafa020, 0x1d116: 0x6d243020, 0x1d117: 0x6cb1f420, + 0x1d118: 0x6c36d020, 0x1d119: 0x6c00fe20, 0x1d11a: 0x6c783e20, 0x1d11b: 0x6c652220, + 0x1d11c: 0x6d243220, 0x1d11d: 0x6cc88e20, 0x1d11e: 0x6c9b7220, 0x1d11f: 0x6cada020, + 0x1d120: 0x6c227820, 0x1d121: 0x6c0f9020, 0x1d122: 0x6d107c20, 0x1d123: 0x6c96e420, + 0x1d124: 0x6c10e620, 0x1d125: 0x6cfbc820, 0x1d126: 0x6c7c1620, 0x1d127: 0x6c828020, + 0x1d128: 0x6c82fe20, 0x1d129: 0x6d375420, 0x1d12a: 0x6c870420, 0x1d12b: 0x6c872e20, + 0x1d12c: 0x6c38e420, 0x1d12d: 0x6cc41c20, 0x1d12e: 0x6cada620, 0x1d12f: 0x6d1c3020, + 0x1d130: 0x6c874a20, 0x1d131: 0x6c8fe620, 0x1d132: 0x6c8fe820, 0x1d133: 0x6ca19620, + 0x1d134: 0x6c0fc220, 0x1d135: 0x6cd6b420, 0x1d136: 0x6c49be20, 0x1d137: 0x6c800020, + 0x1d138: 0x6d298620, 0x1d139: 0x6d0d1820, 0x1d13a: 0x6cd2f420, 0x1d13b: 0x6cd2e620, + 0x1d13c: 0x6c84f420, 0x1d13d: 0x6cc61c20, 0x1d13e: 0x6ccf3620, 0x1d13f: 0x6d268020, + // Block 0x745, offset 0x1d140 + 0x1d140: 0x6cd88420, 0x1d141: 0x6cb56820, 0x1d142: 0x6cdde220, 0x1d143: 0x6c96b420, + 0x1d144: 0x6d016420, 0x1d145: 0x6d109420, 0x1d146: 0x6cfa8020, 0x1d147: 0x6cb58820, + 0x1d148: 0x6cb58a20, 0x1d149: 0x6d34f820, 0x1d14a: 0x6c07d820, 0x1d14b: 0x6c333a20, + 0x1d14c: 0x6d381820, 0x1d14d: 0x6cc5d620, 0x1d14e: 0x6d13cc20, 0x1d14f: 0x6cd25420, + 0x1d150: 0x6d203020, 0x1d151: 0x6d35a820, 0x1d152: 0x6ce57a20, 0x1d153: 0x6c3e1e20, + 0x1d154: 0x6c3fc420, 0x1d155: 0x6c9d2e20, 0x1d156: 0x6d411420, 0x1d157: 0x6d33ac20, + 0x1d158: 0x6cdb9620, 0x1d159: 0x6c9a8420, 0x1d15a: 0x6d428620, 0x1d15b: 0x6cc0ec20, + 0x1d15c: 0x6c567220, 0x1d15d: 0x6d3ac620, 0x1d15e: 0x6cd03a20, 0x1d15f: 0x6cdc3020, + 0x1d160: 0x6c223020, 0x1d161: 0x6c147a20, 0x1d162: 0x6c9c3e20, 0x1d163: 0x6c939020, + 0x1d164: 0x6d223e20, 0x1d165: 0x6cfdbc20, 0x1d166: 0x6cf3c620, 0x1d167: 0x6ce55620, + 0x1d168: 0x6cb1ae20, 0x1d169: 0x6d3ada20, 0x1d16a: 0x6c4aec20, 0x1d16b: 0x6cf9ae20, + 0x1d16c: 0x6d33c820, 0x1d16d: 0x6c61f420, 0x1d16e: 0x6c434620, 0x1d16f: 0x6d314420, + 0x1d170: 0x6c434820, 0x1d171: 0x6cd71e20, 0x1d172: 0x6c6d0620, 0x1d173: 0x6cd0a020, + 0x1d174: 0x6c40f620, 0x1d175: 0x6c7daa20, 0x1d176: 0x6c2c4820, 0x1d177: 0x6c29d820, + 0x1d178: 0x6c5dc620, 0x1d179: 0x6ce22820, 0x1d17a: 0x6cb5ee20, 0x1d17b: 0x6c481620, + 0x1d17c: 0x6c498a20, 0x1d17d: 0x6d41b420, 0x1d17e: 0x6c8d0820, 0x1d17f: 0x6c925a20, + // Block 0x746, offset 0x1d180 + 0x1d180: 0x6c0de820, 0x1d181: 0x6c6d1a20, 0x1d182: 0x6c29da20, 0x1d183: 0x6d346620, + 0x1d184: 0x6c925820, 0x1d185: 0x6c14f820, 0x1d186: 0x6c06a620, 0x1d187: 0x6d30d820, + 0x1d188: 0x6c5aca20, 0x1d189: 0x6d1fd620, 0x1d18a: 0x6cf8a220, 0x1d18b: 0x6d19ee20, + 0x1d18c: 0x6d3e5420, 0x1d18d: 0x6c5dd420, 0x1d18e: 0x6d316e20, 0x1d18f: 0x6c3e9c20, + 0x1d190: 0x6d262420, 0x1d191: 0x6cf3d020, 0x1d192: 0x6cfc1820, 0x1d193: 0x6d0fca20, + 0x1d194: 0x6d33f420, 0x1d195: 0x6d13fc20, 0x1d196: 0x6c9a1220, 0x1d197: 0x6cd7f820, + 0x1d198: 0x6c2c6c20, 0x1d199: 0x6c077a20, 0x1d19a: 0x6d3d8220, 0x1d19b: 0x6d318420, + 0x1d19c: 0x6d1e5620, 0x1d19d: 0x6c606c20, 0x1d19e: 0x6c435220, 0x1d19f: 0x6ce11a20, + 0x1d1a0: 0x6cd80420, 0x1d1a1: 0x6c96d020, 0x1d1a2: 0x6cde7820, 0x1d1a3: 0x6c40b620, + 0x1d1a4: 0x6d07bc20, 0x1d1a5: 0x6cb63c20, 0x1d1a6: 0x6d241420, 0x1d1a7: 0x6cf81220, + 0x1d1a8: 0x6c5f3a20, 0x1d1a9: 0x6cd8e020, 0x1d1aa: 0x6c152820, 0x1d1ab: 0x6c28b420, + 0x1d1ac: 0x6c4b8020, 0x1d1ad: 0x6cdc7820, 0x1d1ae: 0x6c853820, 0x1d1af: 0x6ca9d020, + 0x1d1b0: 0x6c9c8a20, 0x1d1b1: 0x6c29f820, 0x1d1b2: 0x6c86d620, 0x1d1b3: 0x6cc4ee20, + 0x1d1b4: 0x6d271620, 0x1d1b5: 0x6ce3b420, 0x1d1b6: 0x6d29c220, 0x1d1b7: 0x6c836420, + 0x1d1b8: 0x6cc74020, 0x1d1b9: 0x6d222e20, 0x1d1ba: 0x6d20dc20, 0x1d1bb: 0x6c83ae20, + 0x1d1bc: 0x6d019820, 0x1d1bd: 0x6cbd7620, 0x1d1be: 0x6c50b220, 0x1d1bf: 0x6ce83c20, + // Block 0x747, offset 0x1d1c0 + 0x1d1c0: 0x6d052c20, 0x1d1c1: 0x6cd7c620, 0x1d1c2: 0x6cc56c20, 0x1d1c3: 0x6ce83e20, + 0x1d1c4: 0x6d3ef020, 0x1d1c5: 0x6c13c820, 0x1d1c6: 0x6c41cc20, 0x1d1c7: 0x6d16cc20, + 0x1d1c8: 0x6cfa8220, 0x1d1c9: 0x6c0dc620, 0x1d1ca: 0x6ca6f620, 0x1d1cb: 0x6cbfa620, + 0x1d1cc: 0x6cbfa820, 0x1d1cd: 0x6d37e820, 0x1d1ce: 0x6c3bd420, 0x1d1cf: 0x6c502220, + 0x1d1d0: 0x6d279020, 0x1d1d1: 0x6c77e620, 0x1d1d2: 0x6c9e8c20, 0x1d1d3: 0x6d33ae20, + 0x1d1d4: 0x6c6d9820, 0x1d1d5: 0x6c08c820, 0x1d1d6: 0x6d33b020, 0x1d1d7: 0x6d22e620, + 0x1d1d8: 0x6c9d3420, 0x1d1d9: 0x6c7a8a20, 0x1d1da: 0x6c04f420, 0x1d1db: 0x6caf5620, + 0x1d1dc: 0x6ca5ce20, 0x1d1dd: 0x6c85da20, 0x1d1de: 0x6d1f1a20, 0x1d1df: 0x6d409a20, + 0x1d1e0: 0x6caf5820, 0x1d1e1: 0x6c0edc20, 0x1d1e2: 0x6c8cd020, 0x1d1e3: 0x6ca0fc20, + 0x1d1e4: 0x6c1a8020, 0x1d1e5: 0x6ca6fe20, 0x1d1e6: 0x6cbd6620, 0x1d1e7: 0x6d0f5620, + 0x1d1e8: 0x6d423220, 0x1d1e9: 0x6d35c420, 0x1d1ea: 0x6d33ca20, 0x1d1eb: 0x6cd52420, + 0x1d1ec: 0x6c721a20, 0x1d1ed: 0x6d3ef620, 0x1d1ee: 0x6c5d7220, 0x1d1ef: 0x6c5ea820, + 0x1d1f0: 0x6c196220, 0x1d1f1: 0x6ce74220, 0x1d1f2: 0x6d35f820, 0x1d1f3: 0x6c5d7620, + 0x1d1f4: 0x6c511220, 0x1d1f5: 0x6d19ce20, 0x1d1f6: 0x6d3e2620, 0x1d1f7: 0x6d35fa20, + 0x1d1f8: 0x6c6a0220, 0x1d1f9: 0x6cc59420, 0x1d1fa: 0x6c325020, 0x1d1fb: 0x6d14e820, + 0x1d1fc: 0x6d399e20, 0x1d1fd: 0x6c5bb820, 0x1d1fe: 0x6ca9ba20, 0x1d1ff: 0x6c3ff420, + // Block 0x748, offset 0x1d200 + 0x1d200: 0x6cf62020, 0x1d201: 0x6c77aa20, 0x1d202: 0x6c80ca20, 0x1d203: 0x6c3d7420, + 0x1d204: 0x6d0a9020, 0x1d205: 0x6cd72020, 0x1d206: 0x6c939420, 0x1d207: 0x6c7dae20, + 0x1d208: 0x6c41da20, 0x1d209: 0x6c6db820, 0x1d20a: 0x6ce32e20, 0x1d20b: 0x6c1a0c20, + 0x1d20c: 0x6ce8b420, 0x1d20d: 0x6cce7020, 0x1d20e: 0x6cd72220, 0x1d20f: 0x6d0bc020, + 0x1d210: 0x6c951a20, 0x1d211: 0x6c927020, 0x1d212: 0x6c481c20, 0x1d213: 0x6d424420, + 0x1d214: 0x6cc59a20, 0x1d215: 0x6d3ce620, 0x1d216: 0x6c057c20, 0x1d217: 0x6c044a20, + 0x1d218: 0x6c5eec20, 0x1d219: 0x6d33f620, 0x1d21a: 0x6d366020, 0x1d21b: 0x6c7db420, + 0x1d21c: 0x6c837e20, 0x1d21d: 0x6caeac20, 0x1d21e: 0x6c780a20, 0x1d21f: 0x6c0dea20, + 0x1d220: 0x6c1dbe20, 0x1d221: 0x6d41b620, 0x1d222: 0x6d237420, 0x1d223: 0x6cda5220, + 0x1d224: 0x6c94ae20, 0x1d225: 0x6cfd8020, 0x1d226: 0x6d140620, 0x1d227: 0x6cf8b620, + 0x1d228: 0x6c0b4620, 0x1d229: 0x6c624820, 0x1d22a: 0x6c3ec420, 0x1d22b: 0x6cb0b020, + 0x1d22c: 0x6cab0820, 0x1d22d: 0x6c6a2c20, 0x1d22e: 0x6d380420, 0x1d22f: 0x6d3fa820, + 0x1d230: 0x6d064e20, 0x1d231: 0x6c197e20, 0x1d232: 0x6c2a2220, 0x1d233: 0x6cf1e820, + 0x1d234: 0x6cfb8220, 0x1d235: 0x6d3e6820, 0x1d236: 0x6d23c820, 0x1d237: 0x6c626420, + 0x1d238: 0x6d072e20, 0x1d239: 0x6d31f420, 0x1d23a: 0x6d36b820, 0x1d23b: 0x6c2a2a20, + 0x1d23c: 0x6c645420, 0x1d23d: 0x6c5f1820, 0x1d23e: 0x6c431820, 0x1d23f: 0x6c431a20, + // Block 0x749, offset 0x1d240 + 0x1d240: 0x6c47c420, 0x1d241: 0x6cc6a020, 0x1d242: 0x6cdc6020, 0x1d243: 0x6cc73c20, + 0x1d244: 0x6c627a20, 0x1d245: 0x6c775220, 0x1d246: 0x6ca2ac20, 0x1d247: 0x6c11dc20, + 0x1d248: 0x6c9a2620, 0x1d249: 0x6d370c20, 0x1d24a: 0x6c624a20, 0x1d24b: 0x6c92d620, + 0x1d24c: 0x6cda5a20, 0x1d24d: 0x6c5f3c20, 0x1d24e: 0x6d1d0c20, 0x1d24f: 0x6cf1f020, + 0x1d250: 0x6cbfc420, 0x1d251: 0x6ccb6020, 0x1d252: 0x6c51e620, 0x1d253: 0x6d18aa20, + 0x1d254: 0x6c59fe20, 0x1d255: 0x6cbce620, 0x1d256: 0x6c615620, 0x1d257: 0x6cdc8820, + 0x1d258: 0x6cff2020, 0x1d259: 0x6cb45e20, 0x1d25a: 0x6c688420, 0x1d25b: 0x6d3d0c20, + 0x1d25c: 0x6d380c20, 0x1d25d: 0x6d41e620, 0x1d25e: 0x6c93ba20, 0x1d25f: 0x6cdc8c20, + 0x1d260: 0x6ca9d420, 0x1d261: 0x6ccb7820, 0x1d262: 0x6c5c6c20, 0x1d263: 0x6cc4de20, + 0x1d264: 0x6cab1e20, 0x1d265: 0x6d243420, 0x1d266: 0x6cb1f820, 0x1d267: 0x6c62bc20, + 0x1d268: 0x6ce9ce20, 0x1d269: 0x6cf1f420, 0x1d26a: 0x6c199e20, 0x1d26b: 0x6c5e1a20, + 0x1d26c: 0x6c7c1820, 0x1d26d: 0x6c93c020, 0x1d26e: 0x6c0c4c20, 0x1d26f: 0x6ccba820, + 0x1d270: 0x6cc4f420, 0x1d271: 0x6d3d1620, 0x1d272: 0x6c84d420, 0x1d273: 0x6c24aa20, + 0x1d274: 0x6d08f220, 0x1d275: 0x6cebc420, 0x1d276: 0x6c6f5620, 0x1d277: 0x6cbefa20, + 0x1d278: 0x6cf59020, 0x1d279: 0x6cbefe20, 0x1d27a: 0x6c796820, 0x1d27b: 0x6d207a20, + 0x1d27c: 0x6ccfc020, 0x1d27d: 0x6c6e1a20, 0x1d27e: 0x6d11f220, 0x1d27f: 0x6c1fe020, + // Block 0x74a, offset 0x1d280 + 0x1d280: 0x6d3cce20, 0x1d281: 0x6ce84420, 0x1d282: 0x6c814620, 0x1d283: 0x6cbca020, + 0x1d284: 0x6d2d2820, 0x1d285: 0x6d11a020, 0x1d286: 0x6c0b3020, 0x1d287: 0x6c05c420, + 0x1d288: 0x6d11a220, 0x1d289: 0x6c0ddc20, 0x1d28a: 0x6cebd420, 0x1d28b: 0x6d3a0820, + 0x1d28c: 0x6c699020, 0x1d28d: 0x6cbc3a20, 0x1d28e: 0x6c2e1020, 0x1d28f: 0x6cf36620, + 0x1d290: 0x6c4a5e20, 0x1d291: 0x6d10ea20, 0x1d292: 0x6d35fc20, 0x1d293: 0x6c205020, + 0x1d294: 0x6d120220, 0x1d295: 0x6ce5c220, 0x1d296: 0x6c69a020, 0x1d297: 0x6c205220, + 0x1d298: 0x6c6f1220, 0x1d299: 0x6cfeca20, 0x1d29a: 0x6c19f020, 0x1d29b: 0x6c79ec20, + 0x1d29c: 0x6c24ac20, 0x1d29d: 0x6cf29420, 0x1d29e: 0x6c289420, 0x1d29f: 0x6c7a4a20, + 0x1d2a0: 0x6c780c20, 0x1d2a1: 0x6d3d7020, 0x1d2a2: 0x6d05b420, 0x1d2a3: 0x6cda5420, + 0x1d2a4: 0x6c491c20, 0x1d2a5: 0x6c7c3e20, 0x1d2a6: 0x6c312420, 0x1d2a7: 0x6d3dfa20, + 0x1d2a8: 0x6d09a020, 0x1d2a9: 0x6cf29620, 0x1d2aa: 0x6cebea20, 0x1d2ab: 0x6d0bc620, + 0x1d2ac: 0x6d217820, 0x1d2ad: 0x6c726a20, 0x1d2ae: 0x6cbf5220, 0x1d2af: 0x6d113a20, + 0x1d2b0: 0x6d113c20, 0x1d2b1: 0x6ce5cc20, 0x1d2b2: 0x6c177820, 0x1d2b3: 0x6d228020, + 0x1d2b4: 0x6ce4bc20, 0x1d2b5: 0x6c2e3e20, 0x1d2b6: 0x6c729220, 0x1d2b7: 0x6c8aa820, + 0x1d2b8: 0x6cf6ce20, 0x1d2b9: 0x6cf52220, 0x1d2ba: 0x6c7c4420, 0x1d2bb: 0x6c206220, + 0x1d2bc: 0x6d2f7220, 0x1d2bd: 0x6c7b7c20, 0x1d2be: 0x6c7b7420, 0x1d2bf: 0x6c907420, + // Block 0x74b, offset 0x1d2c0 + 0x1d2c0: 0x6c199c20, 0x1d2c1: 0x6c256c20, 0x1d2c2: 0x6cb18420, 0x1d2c3: 0x6d2a9420, + 0x1d2c4: 0x6c24ba20, 0x1d2c5: 0x6cbc6820, 0x1d2c6: 0x6cbf7820, 0x1d2c7: 0x6c314c20, + 0x1d2c8: 0x6d2a9e20, 0x1d2c9: 0x6c904620, 0x1d2ca: 0x6cbd0a20, 0x1d2cb: 0x6c856c20, + 0x1d2cc: 0x6c1f0a20, 0x1d2cd: 0x6cd40c20, 0x1d2ce: 0x6c3fb820, 0x1d2cf: 0x6cba9220, + 0x1d2d0: 0x6c1f1c20, 0x1d2d1: 0x6c531820, 0x1d2d2: 0x6cb59820, 0x1d2d3: 0x6c508620, + 0x1d2d4: 0x6cd18420, 0x1d2d5: 0x6c3c0820, 0x1d2d6: 0x6cd5b220, 0x1d2d7: 0x6c9eb020, + 0x1d2d8: 0x6cc24020, 0x1d2d9: 0x6d2e5220, 0x1d2da: 0x6d3adc20, 0x1d2db: 0x6c8cd420, + 0x1d2dc: 0x6c8f8220, 0x1d2dd: 0x6c0e1620, 0x1d2de: 0x6c6e6a20, 0x1d2df: 0x6c6e7e20, + 0x1d2e0: 0x6d2eb620, 0x1d2e1: 0x6c046620, 0x1d2e2: 0x6cd8c220, 0x1d2e3: 0x6c75c020, + 0x1d2e4: 0x6c534e20, 0x1d2e5: 0x6ce74a20, 0x1d2e6: 0x6cd95a20, 0x1d2e7: 0x6c6e8820, + 0x1d2e8: 0x6c2e2e20, 0x1d2e9: 0x6d17f820, 0x1d2ea: 0x6cd5e820, 0x1d2eb: 0x6c6e7820, + 0x1d2ec: 0x6cc24c20, 0x1d2ed: 0x6c6b1020, 0x1d2ee: 0x6cb26020, 0x1d2ef: 0x6c329e20, + 0x1d2f0: 0x6ccea620, 0x1d2f1: 0x6d3bac20, 0x1d2f2: 0x6c136220, 0x1d2f3: 0x6c2ab020, + 0x1d2f4: 0x6c259e20, 0x1d2f5: 0x6cec5a20, 0x1d2f6: 0x6c6ec020, 0x1d2f7: 0x6c76fa20, + 0x1d2f8: 0x6c6ec420, 0x1d2f9: 0x6d39f020, 0x1d2fa: 0x6d39f620, 0x1d2fb: 0x6c821a20, + 0x1d2fc: 0x6cae9220, 0x1d2fd: 0x6d20e020, 0x1d2fe: 0x6c1b0e20, 0x1d2ff: 0x6c418820, + // Block 0x74c, offset 0x1d300 + 0x1d300: 0x6c984220, 0x1d301: 0x6d39fe20, 0x1d302: 0x6cedb820, 0x1d303: 0x6c321220, + 0x1d304: 0x6c5eac20, 0x1d305: 0x6cff7420, 0x1d306: 0x6c03f020, 0x1d307: 0x6cdb9820, + 0x1d308: 0x6c5ffc20, 0x1d309: 0x6cbdce20, 0x1d30a: 0x6d2faa20, 0x1d30b: 0x6cdce820, + 0x1d30c: 0x6d0b2020, 0x1d30d: 0x6d3c7e20, 0x1d30e: 0x6d255220, 0x1d30f: 0x6c568420, + 0x1d310: 0x6c4f6820, 0x1d311: 0x6cffe220, 0x1d312: 0x6c132e20, 0x1d313: 0x6c096c20, + 0x1d314: 0x6c08d020, 0x1d315: 0x6c658020, 0x1d316: 0x6d15de20, 0x1d317: 0x6c2ffc20, + 0x1d318: 0x6ccce220, 0x1d319: 0x6cd0fe20, 0x1d31a: 0x6c264820, 0x1d31b: 0x6c2b6c20, + 0x1d31c: 0x6d3a0e20, 0x1d31d: 0x6ca33420, 0x1d31e: 0x6c1aac20, 0x1d31f: 0x6c470620, + 0x1d320: 0x6c85f620, 0x1d321: 0x6cbcba20, 0x1d322: 0x6c9faa20, 0x1d323: 0x6c05ae20, + 0x1d324: 0x6ce58220, 0x1d325: 0x6cd8b620, 0x1d326: 0x6c3e5820, 0x1d327: 0x6c12de20, + 0x1d328: 0x6c07b420, 0x1d329: 0x6cae1a20, 0x1d32a: 0x6c26a020, 0x1d32b: 0x6d3f0620, + 0x1d32c: 0x6c2c4a20, 0x1d32d: 0x6c8cee20, 0x1d32e: 0x6d2ac420, 0x1d32f: 0x6caa4220, + 0x1d330: 0x6c3e5a20, 0x1d331: 0x6c467e20, 0x1d332: 0x6c389620, 0x1d333: 0x6c634e20, + 0x1d334: 0x6c41d820, 0x1d335: 0x6c394820, 0x1d336: 0x6cd2cc20, 0x1d337: 0x6c993820, + 0x1d338: 0x6cb35620, 0x1d339: 0x6ce45020, 0x1d33a: 0x6c648a20, 0x1d33b: 0x6cbf1820, + 0x1d33c: 0x6c8f8a20, 0x1d33d: 0x6c9fe420, 0x1d33e: 0x6c0af020, 0x1d33f: 0x6c960420, + // Block 0x74d, offset 0x1d340 + 0x1d340: 0x6c4b4c20, 0x1d341: 0x6cc10c20, 0x1d342: 0x6c1b2620, 0x1d343: 0x6d19e220, + 0x1d344: 0x6d120820, 0x1d345: 0x6cfc0e20, 0x1d346: 0x6c08e220, 0x1d347: 0x6cbf1a20, + 0x1d348: 0x6c7dfa20, 0x1d349: 0x6c2acc20, 0x1d34a: 0x6cff8c20, 0x1d34b: 0x6c6c4620, + 0x1d34c: 0x6cc2f420, 0x1d34d: 0x6cdcec20, 0x1d34e: 0x6cc7ae20, 0x1d34f: 0x6c381420, + 0x1d350: 0x6c7b9e20, 0x1d351: 0x6d3af620, 0x1d352: 0x6ce7b820, 0x1d353: 0x6c5ed820, + 0x1d354: 0x6c26a820, 0x1d355: 0x6c4f7a20, 0x1d356: 0x6c12ee20, 0x1d357: 0x6d383020, + 0x1d358: 0x6c79ee20, 0x1d359: 0x6c7f0e20, 0x1d35a: 0x6c09a820, 0x1d35b: 0x6ccc8a20, + 0x1d35c: 0x6c28fe20, 0x1d35d: 0x6d32c820, 0x1d35e: 0x6c12fa20, 0x1d35f: 0x6c3d7e20, + 0x1d360: 0x6d27b420, 0x1d361: 0x6ce8c620, 0x1d362: 0x6cabd820, 0x1d363: 0x6c83ec20, + 0x1d364: 0x6c80d020, 0x1d365: 0x6c71ba20, 0x1d366: 0x6c495820, 0x1d367: 0x6c65b020, + 0x1d368: 0x6c4e1e20, 0x1d369: 0x6ce75620, 0x1d36a: 0x6cf9d620, 0x1d36b: 0x6d366220, + 0x1d36c: 0x6c1a0e20, 0x1d36d: 0x6cdb9a20, 0x1d36e: 0x6cd39e20, 0x1d36f: 0x6d3b0c20, + 0x1d370: 0x6d424620, 0x1d371: 0x6cffb020, 0x1d372: 0x6cce7620, 0x1d373: 0x6ce67620, + 0x1d374: 0x6c12fc20, 0x1d375: 0x6d0c9e20, 0x1d376: 0x6c435020, 0x1d377: 0x6c7b2c20, + 0x1d378: 0x6c41a020, 0x1d379: 0x6c1dc020, 0x1d37a: 0x6c7c2e20, 0x1d37b: 0x6c42aa20, + 0x1d37c: 0x6d27b620, 0x1d37d: 0x6cab2a20, 0x1d37e: 0x6cb8f420, 0x1d37f: 0x6cffb220, + // Block 0x74e, offset 0x1d380 + 0x1d380: 0x6c65b220, 0x1d381: 0x6cb3de20, 0x1d382: 0x6c7f1c20, 0x1d383: 0x6d405c20, + 0x1d384: 0x6c08ec20, 0x1d385: 0x6c0a0420, 0x1d386: 0x6c0a0620, 0x1d387: 0x6c448c20, + 0x1d388: 0x6cdf3020, 0x1d389: 0x6c48e020, 0x1d38a: 0x6d209420, 0x1d38b: 0x6c64cc20, + 0x1d38c: 0x6c2a2420, 0x1d38d: 0x6c472420, 0x1d38e: 0x6c1b4420, 0x1d38f: 0x6d32e220, + 0x1d390: 0x6cbed220, 0x1d391: 0x6ccc6820, 0x1d392: 0x6d38ec20, 0x1d393: 0x6c928e20, + 0x1d394: 0x6c0f3020, 0x1d395: 0x6c5f0a20, 0x1d396: 0x6c8bc420, 0x1d397: 0x6cdb9e20, + 0x1d398: 0x6c75d420, 0x1d399: 0x6c3ec820, 0x1d39a: 0x6d2c4220, 0x1d39b: 0x6c472620, + 0x1d39c: 0x6c798620, 0x1d39d: 0x6cb9b220, 0x1d39e: 0x6cb90a20, 0x1d39f: 0x6c75d620, + 0x1d3a0: 0x6c20dc20, 0x1d3a1: 0x6c495a20, 0x1d3a2: 0x6d250420, 0x1d3a3: 0x6c130820, + 0x1d3a4: 0x6d40cc20, 0x1d3a5: 0x6c0fe620, 0x1d3a6: 0x6d2ae420, 0x1d3a7: 0x6cbcd620, + 0x1d3a8: 0x6cebb020, 0x1d3a9: 0x6c954e20, 0x1d3aa: 0x6c27ec20, 0x1d3ab: 0x6cfef420, + 0x1d3ac: 0x6cc92620, 0x1d3ad: 0x6c66ba20, 0x1d3ae: 0x6d07c020, 0x1d3af: 0x6c0b0020, + 0x1d3b0: 0x6cdcfc20, 0x1d3b1: 0x6cfd8620, 0x1d3b2: 0x6cfc2420, 0x1d3b3: 0x6cb2c620, + 0x1d3b4: 0x6d318c20, 0x1d3b5: 0x6d039420, 0x1d3b6: 0x6c559420, 0x1d3b7: 0x6d154a20, + 0x1d3b8: 0x6d3b1420, 0x1d3b9: 0x6d265820, 0x1d3ba: 0x6c211020, 0x1d3bb: 0x6c93f620, + 0x1d3bc: 0x6cf37e20, 0x1d3bd: 0x6c303820, 0x1d3be: 0x6cd79a20, 0x1d3bf: 0x6c609020, + // Block 0x74f, offset 0x1d3c0 + 0x1d3c0: 0x6c6af220, 0x1d3c1: 0x6c59ee20, 0x1d3c2: 0x6d039620, 0x1d3c3: 0x6c9aa820, + 0x1d3c4: 0x6c396a20, 0x1d3c5: 0x6c200a20, 0x1d3c6: 0x6d3bde20, 0x1d3c7: 0x6cb0fc20, + 0x1d3c8: 0x6c3c6220, 0x1d3c9: 0x6d3a2820, 0x1d3ca: 0x6c59f020, 0x1d3cb: 0x6cbce020, + 0x1d3cc: 0x6c542420, 0x1d3cd: 0x6cbfbe20, 0x1d3ce: 0x6c9e9a20, 0x1d3cf: 0x6cba7620, + 0x1d3d0: 0x6c483c20, 0x1d3d1: 0x6c7d1020, 0x1d3d2: 0x6cd41c20, 0x1d3d3: 0x6c90f420, + 0x1d3d4: 0x6d27c820, 0x1d3d5: 0x6c517020, 0x1d3d6: 0x6ce13420, 0x1d3d7: 0x6d26ee20, + 0x1d3d8: 0x6c1d7e20, 0x1d3d9: 0x6c42de20, 0x1d3da: 0x6c3a7020, 0x1d3db: 0x6cc92e20, + 0x1d3dc: 0x6d32f420, 0x1d3dd: 0x6c465e20, 0x1d3de: 0x6ca87220, 0x1d3df: 0x6cba7e20, + 0x1d3e0: 0x6cffbc20, 0x1d3e1: 0x6c24b420, 0x1d3e2: 0x6c903820, 0x1d3e3: 0x6caec620, + 0x1d3e4: 0x6c322e20, 0x1d3e5: 0x6c867e20, 0x1d3e6: 0x6c0a5420, 0x1d3e7: 0x6d3d9e20, + 0x1d3e8: 0x6c1ea820, 0x1d3e9: 0x6ccc9020, 0x1d3ea: 0x6c1b5220, 0x1d3eb: 0x6d3b2c20, + 0x1d3ec: 0x6cbada20, 0x1d3ed: 0x6c8fae20, 0x1d3ee: 0x6c7fb620, 0x1d3ef: 0x6c64fa20, + 0x1d3f0: 0x6c10ba20, 0x1d3f1: 0x6c844220, 0x1d3f2: 0x6c5c5820, 0x1d3f3: 0x6c0a5620, + 0x1d3f4: 0x6c2b9020, 0x1d3f5: 0x6c236420, 0x1d3f6: 0x6d0c3620, 0x1d3f7: 0x6caf2020, + 0x1d3f8: 0x6c11e020, 0x1d3f9: 0x6d3be620, 0x1d3fa: 0x6cb02220, 0x1d3fb: 0x6cb19e20, + 0x1d3fc: 0x6c30c820, 0x1d3fd: 0x6d243620, 0x1d3fe: 0x6c9ef820, 0x1d3ff: 0x6ce96020, + // Block 0x750, offset 0x1d400 + 0x1d400: 0x6d2b1020, 0x1d401: 0x6ccc9220, 0x1d402: 0x6c4b8420, 0x1d403: 0x6d156e20, + 0x1d404: 0x6c56cc20, 0x1d405: 0x6c15e620, 0x1d406: 0x6c7a0820, 0x1d407: 0x6c246820, + 0x1d408: 0x6cb2d620, 0x1d409: 0x6d2a9020, 0x1d40a: 0x6c5f5620, 0x1d40b: 0x6c4b1c20, + 0x1d40c: 0x6cdb3820, 0x1d40d: 0x6c90fc20, 0x1d40e: 0x6c131a20, 0x1d40f: 0x6c92e820, + 0x1d410: 0x6ca73e20, 0x1d411: 0x6cdd3820, 0x1d412: 0x6c24b620, 0x1d413: 0x6c2e5420, + 0x1d414: 0x6cdd4020, 0x1d415: 0x6c822a20, 0x1d416: 0x6c32dc20, 0x1d417: 0x6c89d020, + 0x1d418: 0x6cff2220, 0x1d419: 0x6c0f9420, 0x1d41a: 0x6c9da020, 0x1d41b: 0x6ccc9420, + 0x1d41c: 0x6c299c20, 0x1d41d: 0x6c8a3620, 0x1d41e: 0x6c280c20, 0x1d41f: 0x6c2d8e20, + 0x1d420: 0x6c3f9020, 0x1d421: 0x6c65f820, 0x1d422: 0x6c9fd020, 0x1d423: 0x6c7d2820, + 0x1d424: 0x6c27a020, 0x1d425: 0x6c689820, 0x1d426: 0x6c2ab620, 0x1d427: 0x6c5a0c20, + 0x1d428: 0x6cdd0020, 0x1d429: 0x6c818220, 0x1d42a: 0x6d295220, 0x1d42b: 0x6cff3c20, + 0x1d42c: 0x6c931e20, 0x1d42d: 0x6cd3f620, 0x1d42e: 0x6d295420, 0x1d42f: 0x6cb81c20, + 0x1d430: 0x6cac0a20, 0x1d431: 0x6cb81e20, 0x1d432: 0x6cac0c20, 0x1d433: 0x6c41f620, + 0x1d434: 0x6c72b220, 0x1d435: 0x6c328a20, 0x1d436: 0x6c930620, 0x1d437: 0x6d0cf220, + 0x1d438: 0x6c0fea20, 0x1d439: 0x6c291820, 0x1d43a: 0x6cc9ec20, 0x1d43b: 0x6d3b5e20, + 0x1d43c: 0x6c8fca20, 0x1d43d: 0x6cb94020, 0x1d43e: 0x6c888420, 0x1d43f: 0x6c10cc20, + // Block 0x751, offset 0x1d440 + 0x1d440: 0x6d396220, 0x1d441: 0x6c7f6e20, 0x1d442: 0x6cd42020, 0x1d443: 0x6c7fec20, + 0x1d444: 0x6c7d3420, 0x1d445: 0x6d21d620, 0x1d446: 0x6d270420, 0x1d447: 0x6c500020, + 0x1d448: 0x6d31a220, 0x1d449: 0x6cdf5020, 0x1d44a: 0x6ce43e20, 0x1d44b: 0x6ca8a420, + 0x1d44c: 0x6c1e0420, 0x1d44d: 0x6c60ec20, 0x1d44e: 0x6d199820, 0x1d44f: 0x6cb82020, + 0x1d450: 0x6ce2ca20, 0x1d451: 0x6d3c0020, 0x1d452: 0x6d396820, 0x1d453: 0x6c387020, + 0x1d454: 0x6cda3c20, 0x1d455: 0x6d396620, 0x1d456: 0x6cba9820, 0x1d457: 0x6d3de020, + 0x1d458: 0x6ce2d420, 0x1d459: 0x6c933a20, 0x1d45a: 0x6c919420, 0x1d45b: 0x6c662a20, + 0x1d45c: 0x6cebbe20, 0x1d45d: 0x6d1cd420, 0x1d45e: 0x6d248620, 0x1d45f: 0x6c7f7e20, + 0x1d460: 0x6c8ff420, 0x1d461: 0x6cbd1620, 0x1d462: 0x6c88a220, 0x1d463: 0x6c800a20, + 0x1d464: 0x6cb95c20, 0x1d465: 0x6d272020, 0x1d466: 0x6d37e420, 0x1d467: 0x6cc20e20, + 0x1d468: 0x6c88a420, 0x1d469: 0x6c0b2820, 0x1d46a: 0x6c32ea20, 0x1d46b: 0x6d415a20, + 0x1d46c: 0x6c84d620, 0x1d46d: 0x6cd86220, 0x1d46e: 0x6c958e20, 0x1d46f: 0x6d1cde20, + 0x1d470: 0x6d273820, 0x1d471: 0x6d3df220, 0x1d472: 0x6d24ae20, 0x1d473: 0x6c9cd620, + 0x1d474: 0x6c2b5820, 0x1d475: 0x6c388a20, 0x1d476: 0x6ccfb020, 0x1d477: 0x6d302820, + 0x1d478: 0x6ccfc220, 0x1d479: 0x6caa7220, 0x1d47a: 0x6c50e220, 0x1d47b: 0x6c832420, + 0x1d47c: 0x6cfa8e20, 0x1d47d: 0x6d3efa20, 0x1d47e: 0x6ca5c620, 0x1d47f: 0x6c25b420, + // Block 0x752, offset 0x1d480 + 0x1d480: 0x6d2f4620, 0x1d481: 0x6cb8c020, 0x1d482: 0x6d2d5a20, 0x1d483: 0x6c08d220, + 0x1d484: 0x6c04c620, 0x1d485: 0x6cf4d820, 0x1d486: 0x6ccbde20, 0x1d487: 0x6c772a20, + 0x1d488: 0x6cc77620, 0x1d489: 0x6c3bba20, 0x1d48a: 0x6c096e20, 0x1d48b: 0x6c252620, + 0x1d48c: 0x6d1b9a20, 0x1d48d: 0x6d304020, 0x1d48e: 0x6c1b9020, 0x1d48f: 0x6cdf8620, + 0x1d490: 0x6c56fa20, 0x1d491: 0x6c033c20, 0x1d492: 0x6c85f820, 0x1d493: 0x6c419620, + 0x1d494: 0x6c722e20, 0x1d495: 0x6cb38420, 0x1d496: 0x6ca10c20, 0x1d497: 0x6c241020, + 0x1d498: 0x6d2d6e20, 0x1d499: 0x6d392220, 0x1d49a: 0x6c83c620, 0x1d49b: 0x6cdaac20, + 0x1d49c: 0x6ce5d620, 0x1d49d: 0x6c85fa20, 0x1d49e: 0x6cf62220, 0x1d49f: 0x6cdab620, + 0x1d4a0: 0x6c535020, 0x1d4a1: 0x6ce74c20, 0x1d4a2: 0x6d3e4420, 0x1d4a3: 0x6c12e020, + 0x1d4a4: 0x6d26bc20, 0x1d4a5: 0x6d388620, 0x1d4a6: 0x6c8bb820, 0x1d4a7: 0x6d3c1a20, + 0x1d4a8: 0x6c042220, 0x1d4a9: 0x6c81f620, 0x1d4aa: 0x6c3bda20, 0x1d4ab: 0x6c375820, + 0x1d4ac: 0x6cc10e20, 0x1d4ad: 0x6c521620, 0x1d4ae: 0x6c895a20, 0x1d4af: 0x6cfcd820, + 0x1d4b0: 0x6c3ea020, 0x1d4b1: 0x6c895c20, 0x1d4b2: 0x6c11fa20, 0x1d4b3: 0x6c6dc220, + 0x1d4b4: 0x6c851c20, 0x1d4b5: 0x6d26c620, 0x1d4b6: 0x6c929020, 0x1d4b7: 0x6c714020, + 0x1d4b8: 0x6cb61e20, 0x1d4b9: 0x6c254e20, 0x1d4ba: 0x6c045220, 0x1d4bb: 0x6d2ece20, + 0x1d4bc: 0x6c8bc620, 0x1d4bd: 0x6d402620, 0x1d4be: 0x6c6dcc20, 0x1d4bf: 0x6c4cc420, + // Block 0x753, offset 0x1d4c0 + 0x1d4c0: 0x6c57e020, 0x1d4c1: 0x6cca2220, 0x1d4c2: 0x6cca2620, 0x1d4c3: 0x6ce12a20, + 0x1d4c4: 0x6c0b4c20, 0x1d4c5: 0x6cc75c20, 0x1d4c6: 0x6c9e5c20, 0x1d4c7: 0x6c542620, + 0x1d4c8: 0x6d065220, 0x1d4c9: 0x6d402a20, 0x1d4ca: 0x6c56fe20, 0x1d4cb: 0x6c66be20, + 0x1d4cc: 0x6d294e20, 0x1d4cd: 0x6c225e20, 0x1d4ce: 0x6c843020, 0x1d4cf: 0x6d021a20, + 0x1d4d0: 0x6c3da020, 0x1d4d1: 0x6cab1220, 0x1d4d2: 0x6c076020, 0x1d4d3: 0x6c47d020, + 0x1d4d4: 0x6d052820, 0x1d4d5: 0x6c42e020, 0x1d4d6: 0x6ce13620, 0x1d4d7: 0x6cc0b220, + 0x1d4d8: 0x6c645620, 0x1d4d9: 0x6c126a20, 0x1d4da: 0x6d3c2420, 0x1d4db: 0x6ce14020, + 0x1d4dc: 0x6c9c7c20, 0x1d4dd: 0x6cca2c20, 0x1d4de: 0x6c3bf420, 0x1d4df: 0x6d2a2620, + 0x1d4e0: 0x6c775620, 0x1d4e1: 0x6c67fe20, 0x1d4e2: 0x6ca07e20, 0x1d4e3: 0x6cca3020, + 0x1d4e4: 0x6cca3220, 0x1d4e5: 0x6cab1c20, 0x1d4e6: 0x6cf70820, 0x1d4e7: 0x6c897420, + 0x1d4e8: 0x6c680820, 0x1d4e9: 0x6c7b4620, 0x1d4ea: 0x6c0ffa20, 0x1d4eb: 0x6c58b620, + 0x1d4ec: 0x6cd63620, 0x1d4ed: 0x6d403e20, 0x1d4ee: 0x6cfd4020, 0x1d4ef: 0x6cab2020, + 0x1d4f0: 0x6ce97020, 0x1d4f1: 0x6ca8b820, 0x1d4f2: 0x6c873020, 0x1d4f3: 0x6d42b220, + 0x1d4f4: 0x6c2bb820, 0x1d4f5: 0x6ca8ba20, 0x1d4f6: 0x6ce5e420, 0x1d4f7: 0x6c809820, + 0x1d4f8: 0x6c9d1a20, 0x1d4f9: 0x6cd7c020, 0x1d4fa: 0x6c6f5820, 0x1d4fb: 0x6cf83e20, + 0x1d4fc: 0x6c456620, 0x1d4fd: 0x6d331c20, 0x1d4fe: 0x6c6f5e20, 0x1d4ff: 0x6d201c20, + // Block 0x754, offset 0x1d500 + 0x1d500: 0x6c61b020, 0x1d501: 0x6c143a20, 0x1d502: 0x6d391020, 0x1d503: 0x6d09f020, + 0x1d504: 0x6d264a20, 0x1d505: 0x6c531c20, 0x1d506: 0x6d207e20, 0x1d507: 0x6c50e420, + 0x1d508: 0x6cecce20, 0x1d509: 0x6cc5d820, 0x1d50a: 0x6cf1d220, 0x1d50b: 0x6cf18c20, + 0x1d50c: 0x6cc03620, 0x1d50d: 0x6ca32820, 0x1d50e: 0x6d3e1c20, 0x1d50f: 0x6ce80c20, + 0x1d510: 0x6ca99020, 0x1d511: 0x6c3d1420, 0x1d512: 0x6c61d020, 0x1d513: 0x6cd4c020, + 0x1d514: 0x6c213c20, 0x1d515: 0x6caf5a20, 0x1d516: 0x6d323220, 0x1d517: 0x6ccbe020, + 0x1d518: 0x6c532e20, 0x1d519: 0x6d351220, 0x1d51a: 0x6c5ffe20, 0x1d51b: 0x6c3b2220, + 0x1d51c: 0x6d279e20, 0x1d51d: 0x6cc5de20, 0x1d51e: 0x6c283220, 0x1d51f: 0x6c6c4020, + 0x1d520: 0x6cda9420, 0x1d521: 0x6c39d220, 0x1d522: 0x6cdd5a20, 0x1d523: 0x6c252820, + 0x1d524: 0x6c6fb820, 0x1d525: 0x6d288c20, 0x1d526: 0x6c03f220, 0x1d527: 0x6c6c8c20, + 0x1d528: 0x6c3d6a20, 0x1d529: 0x6d35fe20, 0x1d52a: 0x6c229820, 0x1d52b: 0x6d3f1620, + 0x1d52c: 0x6c1da620, 0x1d52d: 0x6c533e20, 0x1d52e: 0x6d288e20, 0x1d52f: 0x6c833420, + 0x1d530: 0x6cf87a20, 0x1d531: 0x6c3e5c20, 0x1d532: 0x6d019a20, 0x1d533: 0x6ccfe020, + 0x1d534: 0x6c0e6c20, 0x1d535: 0x6d3ae820, 0x1d536: 0x6cc0fc20, 0x1d537: 0x6c8cf020, + 0x1d538: 0x6d3aea20, 0x1d539: 0x6cced620, 0x1d53a: 0x6c421e20, 0x1d53b: 0x6d101420, + 0x1d53c: 0x6c3e5e20, 0x1d53d: 0x6ceb1820, 0x1d53e: 0x6d31d420, 0x1d53f: 0x6c275e20, + // Block 0x755, offset 0x1d540 + 0x1d540: 0x6c1f3420, 0x1d541: 0x6cd1b420, 0x1d542: 0x6d37b620, 0x1d543: 0x6cfb4e20, + 0x1d544: 0x6d411a20, 0x1d545: 0x6c6ede20, 0x1d546: 0x6c04f820, 0x1d547: 0x6cc18c20, + 0x1d548: 0x6ca10e20, 0x1d549: 0x6cd5c620, 0x1d54a: 0x6d41ac20, 0x1d54b: 0x6c7c2c20, + 0x1d54c: 0x6c6db020, 0x1d54d: 0x6cc5f220, 0x1d54e: 0x6c4f7c20, 0x1d54f: 0x6d01b220, + 0x1d550: 0x6c6ad620, 0x1d551: 0x6d39a820, 0x1d552: 0x6c1db420, 0x1d553: 0x6c48b620, + 0x1d554: 0x6c042420, 0x1d555: 0x6c745420, 0x1d556: 0x6c7bf620, 0x1d557: 0x6c556220, + 0x1d558: 0x6c22c620, 0x1d559: 0x6c587820, 0x1d55a: 0x6c44d220, 0x1d55b: 0x6ce1c820, + 0x1d55c: 0x6c6ad820, 0x1d55d: 0x6c7a9a20, 0x1d55e: 0x6c68fc20, 0x1d55f: 0x6cc2f620, + 0x1d560: 0x6c411620, 0x1d561: 0x6c960620, 0x1d562: 0x6d089620, 0x1d563: 0x6c07ee20, + 0x1d564: 0x6cfcc620, 0x1d565: 0x6c3e8620, 0x1d566: 0x6c449420, 0x1d567: 0x6c307a20, + 0x1d568: 0x6cc67a20, 0x1d569: 0x6ce5d820, 0x1d56a: 0x6d19e420, 0x1d56b: 0x6c82c220, + 0x1d56c: 0x6d01b420, 0x1d56d: 0x6c736820, 0x1d56e: 0x6d06e020, 0x1d56f: 0x6c40f820, + 0x1d570: 0x6c2eae20, 0x1d571: 0x6ce7ba20, 0x1d572: 0x6cd7ea20, 0x1d573: 0x6c67e820, + 0x1d574: 0x6cfdc420, 0x1d575: 0x6c5bc820, 0x1d576: 0x6c745620, 0x1d577: 0x6d346820, + 0x1d578: 0x6c65b420, 0x1d579: 0x6c737620, 0x1d57a: 0x6c1ac020, 0x1d57b: 0x6c9e2c20, + 0x1d57c: 0x6d31e820, 0x1d57d: 0x6c939e20, 0x1d57e: 0x6c1a1020, 0x1d57f: 0x6cc07a20, + // Block 0x756, offset 0x1d580 + 0x1d580: 0x6cd4ec20, 0x1d581: 0x6c055020, 0x1d582: 0x6ce7bc20, 0x1d583: 0x6cfedc20, + 0x1d584: 0x6c588020, 0x1d585: 0x6cbd3620, 0x1d586: 0x6c451220, 0x1d587: 0x6d052620, + 0x1d588: 0x6ce34c20, 0x1d589: 0x6ce82e20, 0x1d58a: 0x6d00c020, 0x1d58b: 0x6c536420, + 0x1d58c: 0x6cf8a420, 0x1d58d: 0x6c3ea220, 0x1d58e: 0x6ce64620, 0x1d58f: 0x6cdbcc20, + 0x1d590: 0x6c335220, 0x1d591: 0x6c7db620, 0x1d592: 0x6c3d8020, 0x1d593: 0x6c6dc420, + 0x1d594: 0x6c56a620, 0x1d595: 0x6d33f820, 0x1d596: 0x6d0ca020, 0x1d597: 0x6c6f1c20, + 0x1d598: 0x6c3cb020, 0x1d599: 0x6c622020, 0x1d59a: 0x6d077420, 0x1d59b: 0x6cc60c20, + 0x1d59c: 0x6d3faa20, 0x1d59d: 0x6c187820, 0x1d59e: 0x6c34a420, 0x1d59f: 0x6c865020, + 0x1d5a0: 0x6c93ec20, 0x1d5a1: 0x6c896020, 0x1d5a2: 0x6c1dcc20, 0x1d5a3: 0x6cc36420, + 0x1d5a4: 0x6ccede20, 0x1d5a5: 0x6cb62020, 0x1d5a6: 0x6cb62220, 0x1d5a7: 0x6d3ce020, + 0x1d5a8: 0x6cb62420, 0x1d5a9: 0x6ced3420, 0x1d5aa: 0x6cba6a20, 0x1d5ab: 0x6cfcec20, + 0x1d5ac: 0x6cd47420, 0x1d5ad: 0x6cef2220, 0x1d5ae: 0x6cb70e20, 0x1d5af: 0x6ce23020, + 0x1d5b0: 0x6ced3620, 0x1d5b1: 0x6c428c20, 0x1d5b2: 0x6cee3020, 0x1d5b3: 0x6c080420, + 0x1d5b4: 0x6d3cc620, 0x1d5b5: 0x6c113a20, 0x1d5b6: 0x6c4cc620, 0x1d5b7: 0x6c255020, + 0x1d5b8: 0x6c950420, 0x1d5b9: 0x6c8f1020, 0x1d5ba: 0x6cb71020, 0x1d5bb: 0x6d2e6e20, + 0x1d5bc: 0x6c0a0820, 0x1d5bd: 0x6c21cc20, 0x1d5be: 0x6c8d3c20, 0x1d5bf: 0x6c9dca20, + // Block 0x757, offset 0x1d5c0 + 0x1d5c0: 0x6cb51420, 0x1d5c1: 0x6cbcd820, 0x1d5c2: 0x6ce4b420, 0x1d5c3: 0x6d3fac20, + 0x1d5c4: 0x6c4bd820, 0x1d5c5: 0x6d405e20, 0x1d5c6: 0x6cf67c20, 0x1d5c7: 0x6d3e6a20, + 0x1d5c8: 0x6d043220, 0x1d5c9: 0x6c899a20, 0x1d5ca: 0x6c6ca420, 0x1d5cb: 0x6c3a1220, + 0x1d5cc: 0x6cc8a020, 0x1d5cd: 0x6c9f7220, 0x1d5ce: 0x6d239e20, 0x1d5cf: 0x6d400420, + 0x1d5d0: 0x6c38ae20, 0x1d5d1: 0x6c93ee20, 0x1d5d2: 0x6d071620, 0x1d5d3: 0x6d1bd820, + 0x1d5d4: 0x6cce5620, 0x1d5d5: 0x6cb81820, 0x1d5d6: 0x6d073020, 0x1d5d7: 0x6cfd8820, + 0x1d5d8: 0x6c64dc20, 0x1d5d9: 0x6c78ce20, 0x1d5da: 0x6cfcfe20, 0x1d5db: 0x6cc87620, + 0x1d5dc: 0x6c9dcc20, 0x1d5dd: 0x6c5f1c20, 0x1d5de: 0x6c32d820, 0x1d5df: 0x6c1d1e20, + 0x1d5e0: 0x6c2c9420, 0x1d5e1: 0x6c9f7820, 0x1d5e2: 0x6c9e7c20, 0x1d5e3: 0x6d259c20, + 0x1d5e4: 0x6d01fe20, 0x1d5e5: 0x6c060e20, 0x1d5e6: 0x6cd82020, 0x1d5e7: 0x6cbfc020, + 0x1d5e8: 0x6c0b0220, 0x1d5e9: 0x6c58dc20, 0x1d5ea: 0x6c44d820, 0x1d5eb: 0x6c234620, + 0x1d5ec: 0x6c9e3820, 0x1d5ed: 0x6cf0c420, 0x1d5ee: 0x6c403620, 0x1d5ef: 0x6cf00620, + 0x1d5f0: 0x6ce7f420, 0x1d5f1: 0x6c465a20, 0x1d5f2: 0x6c9e9c20, 0x1d5f3: 0x6d00de20, + 0x1d5f4: 0x6c891220, 0x1d5f5: 0x6d3fb620, 0x1d5f6: 0x6c0bb620, 0x1d5f7: 0x6d284a20, + 0x1d5f8: 0x6d19fc20, 0x1d5f9: 0x6ce36820, 0x1d5fa: 0x6c486c20, 0x1d5fb: 0x6d36ea20, + 0x1d5fc: 0x6d284c20, 0x1d5fd: 0x6c198c20, 0x1d5fe: 0x6c152020, 0x1d5ff: 0x6c278c20, + // Block 0x758, offset 0x1d600 + 0x1d600: 0x6cf9ea20, 0x1d601: 0x6d259e20, 0x1d602: 0x6d400620, 0x1d603: 0x6d05da20, + 0x1d604: 0x6d1d6a20, 0x1d605: 0x6cf14420, 0x1d606: 0x6c44da20, 0x1d607: 0x6d07c220, + 0x1d608: 0x6d1c9c20, 0x1d609: 0x6c6d5220, 0x1d60a: 0x6d18ae20, 0x1d60b: 0x6d3ca220, + 0x1d60c: 0x6ca6c020, 0x1d60d: 0x6c053c20, 0x1d60e: 0x6c47c820, 0x1d60f: 0x6cac7220, + 0x1d610: 0x6d395420, 0x1d611: 0x6c64fc20, 0x1d612: 0x6c220a20, 0x1d613: 0x6cc31620, + 0x1d614: 0x6cd6e020, 0x1d615: 0x6d276620, 0x1d616: 0x6cf9f220, 0x1d617: 0x6c24ea20, + 0x1d618: 0x6cf6d220, 0x1d619: 0x6cc6a620, 0x1d61a: 0x6ce1ea20, 0x1d61b: 0x6c405420, + 0x1d61c: 0x6d27ca20, 0x1d61d: 0x6c188820, 0x1d61e: 0x6c432020, 0x1d61f: 0x6cc82820, + 0x1d620: 0x6c55b820, 0x1d621: 0x6d294620, 0x1d622: 0x6ce2b420, 0x1d623: 0x6cfd1020, + 0x1d624: 0x6cdb1e20, 0x1d625: 0x6d31fc20, 0x1d626: 0x6d403420, 0x1d627: 0x6ce1ec20, + 0x1d628: 0x6c5a8420, 0x1d629: 0x6c114a20, 0x1d62a: 0x6c0a5820, 0x1d62b: 0x6c3cf620, + 0x1d62c: 0x6c246a20, 0x1d62d: 0x6c844620, 0x1d62e: 0x6cdd4220, 0x1d62f: 0x6d0ddc20, + 0x1d630: 0x6cf81820, 0x1d631: 0x6d403820, 0x1d632: 0x6c826420, 0x1d633: 0x6c739820, + 0x1d634: 0x6cba8220, 0x1d635: 0x6c980820, 0x1d636: 0x6d34a420, 0x1d637: 0x6c93bc20, + 0x1d638: 0x6ca2b220, 0x1d639: 0x6cb1a020, 0x1d63a: 0x6c885220, 0x1d63b: 0x6c9c8020, + 0x1d63c: 0x6d08bc20, 0x1d63d: 0x6d400a20, 0x1d63e: 0x6c5f5820, 0x1d63f: 0x6ccd1220, + // Block 0x759, offset 0x1d640 + 0x1d640: 0x6cdc8e20, 0x1d641: 0x6c38ca20, 0x1d642: 0x6c940620, 0x1d643: 0x6c083020, + 0x1d644: 0x6d141e20, 0x1d645: 0x6ccac220, 0x1d646: 0x6ca1ec20, 0x1d647: 0x6d114c20, + 0x1d648: 0x6cbb4a20, 0x1d649: 0x6c5d0220, 0x1d64a: 0x6cfd5a20, 0x1d64b: 0x6c629a20, + 0x1d64c: 0x6ccc8620, 0x1d64d: 0x6d055220, 0x1d64e: 0x6cc49420, 0x1d64f: 0x6d08be20, + 0x1d650: 0x6cdca020, 0x1d651: 0x6cbbc020, 0x1d652: 0x6d2b9e20, 0x1d653: 0x6d427020, + 0x1d654: 0x6d341e20, 0x1d655: 0x6ccdca20, 0x1d656: 0x6cca3420, 0x1d657: 0x6c8bf020, + 0x1d658: 0x6d243820, 0x1d659: 0x6c386220, 0x1d65a: 0x6c8a3820, 0x1d65b: 0x6c21e020, + 0x1d65c: 0x6d41f820, 0x1d65d: 0x6c66f220, 0x1d65e: 0x6cc54a20, 0x1d65f: 0x6c15f020, + 0x1d660: 0x6cc8b620, 0x1d661: 0x6d055620, 0x1d662: 0x6c5c6e20, 0x1d663: 0x6c57ca20, + 0x1d664: 0x6d414a20, 0x1d665: 0x6cf70a20, 0x1d666: 0x6cbb4e20, 0x1d667: 0x6d287c20, + 0x1d668: 0x6c270220, 0x1d669: 0x6cd12620, 0x1d66a: 0x6c5c7e20, 0x1d66b: 0x6cf91620, + 0x1d66c: 0x6ccb8020, 0x1d66d: 0x6c660020, 0x1d66e: 0x6c679220, 0x1d66f: 0x6c58b820, + 0x1d670: 0x6d2a5e20, 0x1d671: 0x6c236e20, 0x1d672: 0x6d026020, 0x1d673: 0x6c695a20, + 0x1d674: 0x6c0aa820, 0x1d675: 0x6c28de20, 0x1d676: 0x6d191020, 0x1d677: 0x6ca9ec20, + 0x1d678: 0x6cdca220, 0x1d679: 0x6d191220, 0x1d67a: 0x6ccc9a20, 0x1d67b: 0x6d060420, + 0x1d67c: 0x6c62cc20, 0x1d67d: 0x6c0d6c20, 0x1d67e: 0x6cba3020, 0x1d67f: 0x6c7fee20, + // Block 0x75a, offset 0x1d680 + 0x1d680: 0x6cb47020, 0x1d681: 0x6d09c620, 0x1d682: 0x6d415420, 0x1d683: 0x6cb69620, + 0x1d684: 0x6caee820, 0x1d685: 0x6d124620, 0x1d686: 0x6ca19a20, 0x1d687: 0x6c835c20, + 0x1d688: 0x6d012820, 0x1d689: 0x6d415620, 0x1d68a: 0x6c7c1a20, 0x1d68b: 0x6d1ed220, + 0x1d68c: 0x6d076220, 0x1d68d: 0x6c828420, 0x1d68e: 0x6cfb0420, 0x1d68f: 0x6c156220, + 0x1d690: 0x6c69f220, 0x1d691: 0x6c919620, 0x1d692: 0x6c156a20, 0x1d693: 0x6d1c4020, + 0x1d694: 0x6c111820, 0x1d695: 0x6cc51620, 0x1d696: 0x6cfb1620, 0x1d697: 0x6d418620, + 0x1d698: 0x6d415c20, 0x1d699: 0x6c965220, 0x1d69a: 0x6c84e020, 0x1d69b: 0x6c2a5220, + 0x1d69c: 0x6c806a20, 0x1d69d: 0x6c82ac20, 0x1d69e: 0x6c894020, 0x1d69f: 0x6cd7b620, + 0x1d6a0: 0x6c6f4620, 0x1d6a1: 0x6d207420, 0x1d6a2: 0x6c52ee20, 0x1d6a3: 0x6d38f420, + 0x1d6a4: 0x6cfa7420, 0x1d6a5: 0x6c436a20, 0x1d6a6: 0x6d264820, 0x1d6a7: 0x6c5fce20, + 0x1d6a8: 0x6cecbc20, 0x1d6a9: 0x6c7bda20, 0x1d6aa: 0x6c617a20, 0x1d6ab: 0x6cc5b820, + 0x1d6ac: 0x6cef8820, 0x1d6ad: 0x6d278220, 0x1d6ae: 0x6c52fc20, 0x1d6af: 0x6c213420, + 0x1d6b0: 0x6caf2c20, 0x1d6b1: 0x6ccbca20, 0x1d6b2: 0x6c425820, 0x1d6b3: 0x6ca30820, + 0x1d6b4: 0x6cc5c620, 0x1d6b5: 0x6d401620, 0x1d6b6: 0x6c94dc20, 0x1d6b7: 0x6c3b1220, + 0x1d6b8: 0x6d34ec20, 0x1d6b9: 0x6cf17e20, 0x1d6ba: 0x6c39c220, 0x1d6bb: 0x6d3aa420, + 0x1d6bc: 0x6d321420, 0x1d6bd: 0x6ca97c20, 0x1d6be: 0x6cd4a020, 0x1d6bf: 0x6cfc8220, + // Block 0x75b, offset 0x1d6c0 + 0x1d6c0: 0x6c421220, 0x1d6c1: 0x6d016620, 0x1d6c2: 0x6c3dfa20, 0x1d6c3: 0x6c88e420, + 0x1d6c4: 0x6d410c20, 0x1d6c5: 0x6ccfb220, 0x1d6c6: 0x6cf84e20, 0x1d6c7: 0x6d33a020, + 0x1d6c8: 0x6d37a020, 0x1d6c9: 0x6d390420, 0x1d6ca: 0x6c04ec20, 0x1d6cb: 0x6c3dfc20, + 0x1d6cc: 0x6c1f1420, 0x1d6cd: 0x6ccec820, 0x1d6ce: 0x6d16ce20, 0x1d6cf: 0x6c6d9220, + 0x1d6d0: 0x6c273820, 0x1d6d1: 0x6c054a20, 0x1d6d2: 0x6cc65a20, 0x1d6d3: 0x6c6a9820, + 0x1d6d4: 0x6c7a8620, 0x1d6d5: 0x6cc54620, 0x1d6d6: 0x6c2e7620, 0x1d6d7: 0x6c4f6420, + 0x1d6d8: 0x6c5b9e20, 0x1d6d9: 0x6c449220, 0x1d6da: 0x6d087c20, 0x1d6db: 0x6c67dc20, + 0x1d6dc: 0x6c95ea20, 0x1d6dd: 0x6c740420, 0x1d6de: 0x6c68d620, 0x1d6df: 0x6ce7ae20, + 0x1d6e0: 0x6c450020, 0x1d6e1: 0x6cfea820, 0x1d6e2: 0x6c735020, 0x1d6e3: 0x6d053620, + 0x1d6e4: 0x6cf87220, 0x1d6e5: 0x6cdbf020, 0x1d6e6: 0x6ce1c020, 0x1d6e7: 0x6c61d220, + 0x1d6e8: 0x6ce31820, 0x1d6e9: 0x6c5eb820, 0x1d6ea: 0x6d06be20, 0x1d6eb: 0x6c8cf220, + 0x1d6ec: 0x6d1bb220, 0x1d6ed: 0x6d06c020, 0x1d6ee: 0x6cb6f620, 0x1d6ef: 0x6c39fc20, + 0x1d6f0: 0x6c21b820, 0x1d6f1: 0x6cce5220, 0x1d6f2: 0x6c4bc220, 0x1d6f3: 0x6cd11e20, + 0x1d6f4: 0x6cef0420, 0x1d6f5: 0x6c9dc020, 0x1d6f6: 0x6cd46820, 0x1d6f7: 0x6c081a20, + 0x1d6f8: 0x6c1da820, 0x1d6f9: 0x6ce22220, 0x1d6fa: 0x6c8f0620, 0x1d6fb: 0x6cc35a20, + 0x1d6fc: 0x6d3f7820, 0x1d6fd: 0x6d2e5c20, 0x1d6fe: 0x6ced0c20, 0x1d6ff: 0x6c93d820, + // Block 0x75c, offset 0x1d700 + 0x1d700: 0x6d3cc420, 0x1d701: 0x6d3e2820, 0x1d702: 0x6c78b420, 0x1d703: 0x6cfd7820, + 0x1d704: 0x6c64a420, 0x1d705: 0x6c9e2820, 0x1d706: 0x6c802a20, 0x1d707: 0x6ce33020, + 0x1d708: 0x6c9e9420, 0x1d709: 0x6c5eda20, 0x1d70a: 0x6d275020, 0x1d70b: 0x6c5bca20, + 0x1d70c: 0x6cd7ec20, 0x1d70d: 0x6c348620, 0x1d70e: 0x6c32c420, 0x1d70f: 0x6c0ba020, + 0x1d710: 0x6cfcc820, 0x1d711: 0x6c464a20, 0x1d712: 0x6d3c8a20, 0x1d713: 0x6c58d820, + 0x1d714: 0x6c2c5e20, 0x1d715: 0x6c93a020, 0x1d716: 0x6c0af620, 0x1d717: 0x6c9f5820, + 0x1d718: 0x6d256820, 0x1d719: 0x6c6d1c20, 0x1d71a: 0x6c401020, 0x1d71b: 0x6cc81e20, + 0x1d71c: 0x6d31ea20, 0x1d71d: 0x6c3ce620, 0x1d71e: 0x6c24ce20, 0x1d71f: 0x6c430c20, + 0x1d720: 0x6c150420, 0x1d721: 0x6c83f020, 0x1d722: 0x6d17fc20, 0x1d723: 0x6c64be20, + 0x1d724: 0x6c0d4020, 0x1d725: 0x6cb15a20, 0x1d726: 0x6c97f020, 0x1d727: 0x6c824820, + 0x1d728: 0x6d1bda20, 0x1d729: 0x6cdd2e20, 0x1d72a: 0x6ca1d820, 0x1d72b: 0x6ccaba20, + 0x1d72c: 0x6d00e020, 0x1d72d: 0x6c8a1420, 0x1d72e: 0x6ccda220, 0x1d72f: 0x6d2b8c20, + 0x1d730: 0x6c677a20, 0x1d731: 0x6cba2420, 0x1d732: 0x6cbbb220, 0x1d733: 0x6c589a20, + 0x1d734: 0x6c694620, 0x1d735: 0x6d415020, 0x1d736: 0x6c3d1a20, 0x1d737: 0x6d016820, + 0x1d738: 0x6c426820, 0x1d739: 0x6c3d2420, 0x1d73a: 0x6cc38a20, 0x1d73b: 0x6c3d2620, + 0x1d73c: 0x6cb81020, 0x1d73d: 0x6c0e6e20, 0x1d73e: 0x6cb2ac20, 0x1d73f: 0x6cfe3420, + // Block 0x75d, offset 0x1d740 + 0x1d740: 0x6d2ff620, 0x1d741: 0x6c428e20, 0x1d742: 0x6d1bdc20, 0x1d743: 0x6d1bea20, + 0x1d744: 0x6cbee020, 0x1d745: 0x6cfa4c20, 0x1d746: 0x6c49aa20, 0x1d747: 0x6d41fa20, + 0x1d748: 0x6ce02a20, 0x1d749: 0x6c126020, 0x1d74a: 0x6cb7fe20, 0x1d74b: 0x6cf27620, + 0x1d74c: 0x6d1c2220, 0x1d74d: 0x6c828620, 0x1d74e: 0x6ce04820, 0x1d74f: 0x6c919820, + 0x1d750: 0x6c49c420, 0x1d751: 0x6cedf420, 0x1d752: 0x6cedf020, 0x1d753: 0x6c424e20, + 0x1d754: 0x6cedfe20, 0x1d755: 0x6c4e5020, 0x1d756: 0x6c953820, 0x1d757: 0x6c952c20, + 0x1d758: 0x6c3e2220, 0x1d759: 0x6c9c3a20, 0x1d75a: 0x6c380620, 0x1d75b: 0x6c470020, + 0x1d75c: 0x6d3a6020, 0x1d75d: 0x6c707220, 0x1d75e: 0x6c98d420, 0x1d75f: 0x6c477420, + 0x1d760: 0x6c9f4220, 0x1d761: 0x6c427220, 0x1d762: 0x6c03f420, 0x1d763: 0x6c48b220, + 0x1d764: 0x6ce33220, 0x1d765: 0x6c736a20, 0x1d766: 0x6c3e8820, 0x1d767: 0x6cd0b420, + 0x1d768: 0x6d0da820, 0x1d769: 0x6d2fc220, 0x1d76a: 0x6d41b820, 0x1d76b: 0x6c48b820, + 0x1d76c: 0x6d3d7220, 0x1d76d: 0x6d237620, 0x1d76e: 0x6d366620, 0x1d76f: 0x6c018e20, + 0x1d770: 0x6c382020, 0x1d771: 0x6c803420, 0x1d772: 0x6cd56220, 0x1d773: 0x6cd80620, + 0x1d774: 0x6cb00820, 0x1d775: 0x6c96da20, 0x1d776: 0x6c8f1620, 0x1d777: 0x6c03f820, + 0x1d778: 0x6c382420, 0x1d779: 0x6c844a20, 0x1d77a: 0x6c177e20, 0x1d77b: 0x6cf0d020, + 0x1d77c: 0x6c0a3420, 0x1d77d: 0x6c629c20, 0x1d77e: 0x6d2b9c20, 0x1d77f: 0x6c1ce620, + // Block 0x75e, offset 0x1d780 + 0x1d780: 0x6c8f2220, 0x1d781: 0x6c5f5a20, 0x1d782: 0x6c739e20, 0x1d783: 0x6c9da220, + 0x1d784: 0x6d2fec20, 0x1d785: 0x6c956220, 0x1d786: 0x6cb03220, 0x1d787: 0x6c5f9e20, + 0x1d788: 0x6c5fb020, 0x1d789: 0x6c946820, 0x1d78a: 0x6d0f7620, 0x1d78b: 0x6c9cde20, + 0x1d78c: 0x6cba9e20, 0x1d78d: 0x6c268820, 0x1d78e: 0x6c9a4e20, 0x1d78f: 0x6d0f9a20, + 0x1d790: 0x6d1fbc20, 0x1d791: 0x6d1fb420, 0x1d792: 0x6c3b6620, 0x1d793: 0x6c033e20, + 0x1d794: 0x6c42b820, 0x1d795: 0x6d104a20, 0x1d796: 0x6c477620, 0x1d797: 0x6cbaaa20, + 0x1d798: 0x6d29d620, 0x1d799: 0x6c42ba20, 0x1d79a: 0x6c8cf620, 0x1d79b: 0x6d176e20, + 0x1d79c: 0x6d3aee20, 0x1d79d: 0x6c2b2820, 0x1d79e: 0x6d04c820, 0x1d79f: 0x6cbb3c20, + 0x1d7a0: 0x6d14fa20, 0x1d7a1: 0x6cfcca20, 0x1d7a2: 0x6cc67c20, 0x1d7a3: 0x6cc44a20, + 0x1d7a4: 0x6cc44c20, 0x1d7a5: 0x6cbb4420, 0x1d7a6: 0x6c588220, 0x1d7a7: 0x6cdd2620, + 0x1d7a8: 0x6cfcdc20, 0x1d7a9: 0x6d17fe20, 0x1d7aa: 0x6d107a20, 0x1d7ab: 0x6cbad220, + 0x1d7ac: 0x6cb9c220, 0x1d7ad: 0x6d218820, 0x1d7ae: 0x6c44dc20, 0x1d7af: 0x6c6b2220, + 0x1d7b0: 0x6ce0cc20, 0x1d7b1: 0x6d25ac20, 0x1d7b2: 0x6cf6d420, 0x1d7b3: 0x6c38d820, + 0x1d7b4: 0x6ccd1a20, 0x1d7b5: 0x6c3ba220, 0x1d7b6: 0x6ccd1e20, 0x1d7b7: 0x6c88d820, + 0x1d7b8: 0x6c827420, 0x1d7b9: 0x6c44e420, 0x1d7ba: 0x6caa0820, 0x1d7bb: 0x6cbb5e20, + 0x1d7bc: 0x6c164620, 0x1d7bd: 0x6d221c20, 0x1d7be: 0x6c461020, 0x1d7bf: 0x6d170420, + // Block 0x75f, offset 0x1d7c0 + 0x1d7c0: 0x6c1cbe20, 0x1d7c1: 0x6cf22220, 0x1d7c2: 0x6c3b2420, 0x1d7c3: 0x6c533020, + 0x1d7c4: 0x6c1c0820, 0x1d7c5: 0x6c1c0a20, 0x1d7c6: 0x6c252a20, 0x1d7c7: 0x6c3e6020, + 0x1d7c8: 0x6cf9b220, 0x1d7c9: 0x6c079c20, 0x1d7ca: 0x6d177020, 0x1d7cb: 0x6c7e4220, + 0x1d7cc: 0x6d177220, 0x1d7cd: 0x6caf6220, 0x1d7ce: 0x6c8cf820, 0x1d7cf: 0x6c8f2e20, + 0x1d7d0: 0x6d360020, 0x1d7d1: 0x6cc18e20, 0x1d7d2: 0x6cf77a20, 0x1d7d3: 0x6d00ae20, + 0x1d7d4: 0x6cfdc620, 0x1d7d5: 0x6cf62420, 0x1d7d6: 0x6cf88e20, 0x1d7d7: 0x6c785020, + 0x1d7d8: 0x6cbc4620, 0x1d7d9: 0x6c5bcc20, 0x1d7da: 0x6c5aba20, 0x1d7db: 0x6cfecc20, + 0x1d7dc: 0x6ccc5e20, 0x1d7dd: 0x6c536620, 0x1d7de: 0x6c676c20, 0x1d7df: 0x6c2b7e20, + 0x1d7e0: 0x6c255220, 0x1d7e1: 0x6c3a6420, 0x1d7e2: 0x6c2a2620, 0x1d7e3: 0x6ccc6a20, + 0x1d7e4: 0x6c1c4a20, 0x1d7e5: 0x6d3b1620, 0x1d7e6: 0x6c65d220, 0x1d7e7: 0x6d07c420, + 0x1d7e8: 0x6c1c6220, 0x1d7e9: 0x6cb0fe20, 0x1d7ea: 0x6d3fb820, 0x1d7eb: 0x6cece620, + 0x1d7ec: 0x6c5aea20, 0x1d7ed: 0x6c542820, 0x1d7ee: 0x6c517420, 0x1d7ef: 0x6c51e820, + 0x1d7f0: 0x6c4f0a20, 0x1d7f1: 0x6c027220, 0x1d7f2: 0x6cb16820, 0x1d7f3: 0x6d18d020, + 0x1d7f4: 0x6c885420, 0x1d7f5: 0x6c543420, 0x1d7f6: 0x6c030820, 0x1d7f7: 0x6c8bf220, + 0x1d7f8: 0x6cae4820, 0x1d7f9: 0x6cbc6a20, 0x1d7fa: 0x6c027e20, 0x1d7fb: 0x6c386420, + 0x1d7fc: 0x6d18d220, 0x1d7fd: 0x6c5c8020, 0x1d7fe: 0x6d07e420, 0x1d7ff: 0x6c2a4a20, + // Block 0x760, offset 0x1d800 + 0x1d800: 0x6d124420, 0x1d801: 0x6c819a20, 0x1d802: 0x6c819820, 0x1d803: 0x6c779c20, + 0x1d804: 0x6c996620, 0x1d805: 0x6d30d220, 0x1d806: 0x6cb5a820, 0x1d807: 0x6c467a20, + 0x1d808: 0x6c468020, 0x1d809: 0x6c467c20, 0x1d80a: 0x6c2f3420, 0x1d80b: 0x6c2eb020, + 0x1d80c: 0x6c373020, 0x1d80d: 0x6cd64620, 0x1d80e: 0x6cc85620, 0x1d80f: 0x6ca3b220, + 0x1d810: 0x6ca3b420, 0x1d811: 0x6c329220, 0x1d812: 0x6c82b220, 0x1d813: 0x6ce63220, + 0x1d814: 0x6d3efc20, 0x1d815: 0x6c44c220, 0x1d816: 0x6c17b620, 0x1d817: 0x6c503220, + 0x1d818: 0x6d27a020, 0x1d819: 0x6c03b020, 0x1d81a: 0x6caf6420, 0x1d81b: 0x6d14ec20, + 0x1d81c: 0x6cd8bc20, 0x1d81d: 0x6cc26e20, 0x1d81e: 0x6c635220, 0x1d81f: 0x6c723220, + 0x1d820: 0x6c5d5620, 0x1d821: 0x6c1e8e20, 0x1d822: 0x6c81d420, 0x1d823: 0x6c951c20, + 0x1d824: 0x6c607020, 0x1d825: 0x6ce0c620, 0x1d826: 0x6cab8e20, 0x1d827: 0x6c90b420, + 0x1d828: 0x6caa2820, 0x1d829: 0x6c67be20, 0x1d82a: 0x6cad1e20, 0x1d82b: 0x6d2c5620, + 0x1d82c: 0x6c90be20, 0x1d82d: 0x6c5f7020, 0x1d82e: 0x6c81e420, 0x1d82f: 0x6c5e2e20, + 0x1d830: 0x6d1ed420, 0x1d831: 0x6ca1a020, 0x1d832: 0x6c580420, 0x1d833: 0x6c378420, + 0x1d834: 0x6d169620, 0x1d835: 0x6c2f5420, 0x1d836: 0x6d127420, 0x1d837: 0x6c264420, + 0x1d838: 0x6cd95820, 0x1d839: 0x6cbd6820, 0x1d83a: 0x6d27a220, 0x1d83b: 0x6c1b9420, + 0x1d83c: 0x6c27ca20, 0x1d83d: 0x6c27cc20, 0x1d83e: 0x6c533420, 0x1d83f: 0x6c450220, + // Block 0x761, offset 0x1d840 + 0x1d840: 0x6d344820, 0x1d841: 0x6cacb220, 0x1d842: 0x6ca80c20, 0x1d843: 0x6c27d420, + 0x1d844: 0x6d31d620, 0x1d845: 0x6c181a20, 0x1d846: 0x6c8cfa20, 0x1d847: 0x6d32ba20, + 0x1d848: 0x6d1fc220, 0x1d849: 0x6cec3020, 0x1d84a: 0x6c89e420, 0x1d84b: 0x6c8f8c20, + 0x1d84c: 0x6d345c20, 0x1d84d: 0x6ca90220, 0x1d84e: 0x6ce55e20, 0x1d84f: 0x6c375c20, + 0x1d850: 0x6d0bb420, 0x1d851: 0x6ce5f020, 0x1d852: 0x6c485e20, 0x1d853: 0x6d077220, + 0x1d854: 0x6c880420, 0x1d855: 0x6c504620, 0x1d856: 0x6cd16e20, 0x1d857: 0x6c8b1a20, + 0x1d858: 0x6cb24420, 0x1d859: 0x6c6dce20, 0x1d85a: 0x6c726c20, 0x1d85b: 0x6c08ee20, + 0x1d85c: 0x6c2bfe20, 0x1d85d: 0x6c4c7c20, 0x1d85e: 0x6cf1a220, 0x1d85f: 0x6d071a20, + 0x1d860: 0x6cb25820, 0x1d861: 0x6c232e20, 0x1d862: 0x6c2fc820, 0x1d863: 0x6ca5f820, + 0x1d864: 0x6ce68c20, 0x1d865: 0x6c71d020, 0x1d866: 0x6c234820, 0x1d867: 0x6c7c4220, + 0x1d868: 0x6c894420, 0x1d869: 0x6c7d1220, 0x1d86a: 0x6c234a20, 0x1d86b: 0x6c884020, + 0x1d86c: 0x6cf26020, 0x1d86d: 0x6c7d1420, 0x1d86e: 0x6c885820, 0x1d86f: 0x6c886820, + 0x1d870: 0x6c236620, 0x1d871: 0x6c027420, 0x1d872: 0x6cd11820, 0x1d873: 0x6cd96e20, + 0x1d874: 0x6ce64c20, 0x1d875: 0x6c7d2a20, 0x1d876: 0x6ca88820, 0x1d877: 0x6d34aa20, + 0x1d878: 0x6c281020, 0x1d879: 0x6ca93420, 0x1d87a: 0x6cbc8a20, 0x1d87b: 0x6ca65e20, + 0x1d87c: 0x6ce65220, 0x1d87d: 0x6ce65620, 0x1d87e: 0x6c8ff820, 0x1d87f: 0x6d22c620, + // Block 0x762, offset 0x1d880 + 0x1d880: 0x6d22b620, 0x1d881: 0x6d2fac20, 0x1d882: 0x6cd8ac20, 0x1d883: 0x6cda8220, + 0x1d884: 0x6d180020, 0x1d885: 0x6cdad820, 0x1d886: 0x6cd8ca20, 0x1d887: 0x6d2fcc20, + 0x1d888: 0x6d2fce20, 0x1d889: 0x6cc78220, 0x1d88a: 0x6d164c20, 0x1d88b: 0x6c81fe20, + 0x1d88c: 0x6c5e8020, 0x1d88d: 0x6cbffe20, 0x1d88e: 0x6c78f220, 0x1d88f: 0x6c12b620, + 0x1d890: 0x6c437020, 0x1d891: 0x6c0eb020, 0x1d892: 0x6c58f020, 0x1d893: 0x6c597a20, + 0x1d894: 0x6d15c220, 0x1d895: 0x6cc5c820, 0x1d896: 0x6cffd220, 0x1d897: 0x6cc7f620, + 0x1d898: 0x6d38d820, 0x1d899: 0x6d25fc20, 0x1d89a: 0x6c323820, 0x1d89b: 0x6c425a20, + 0x1d89c: 0x6cc65420, 0x1d89d: 0x6c416e20, 0x1d89e: 0x6c138020, 0x1d89f: 0x6cf2d220, + 0x1d8a0: 0x6c169820, 0x1d8a1: 0x6c476020, 0x1d8a2: 0x6d33a220, 0x1d8a3: 0x6c4dd620, + 0x1d8a4: 0x6c3d4420, 0x1d8a5: 0x6c3a3220, 0x1d8a6: 0x6c3b6420, 0x1d8a7: 0x6cadb220, + 0x1d8a8: 0x6cad2820, 0x1d8a9: 0x6c647020, 0x1d8aa: 0x6c39a820, 0x1d8ab: 0x6d3ccc20, + 0x1d8ac: 0x6d1f0220, 0x1d8ad: 0x6ca31420, 0x1d8ae: 0x6c01e820, 0x1d8af: 0x6c78f620, + 0x1d8b0: 0x6cc46420, 0x1d8b1: 0x6c456820, 0x1d8b2: 0x6d22da20, 0x1d8b3: 0x6cf1d020, + 0x1d8b4: 0x6d10d020, 0x1d8b5: 0x6cb58c20, 0x1d8b6: 0x6cafc020, 0x1d8b7: 0x6cb9f620, + 0x1d8b8: 0x6cf59220, 0x1d8b9: 0x6cf59420, 0x1d8ba: 0x6c3a8c20, 0x1d8bb: 0x6c78f820, + 0x1d8bc: 0x6c6e1220, 0x1d8bd: 0x6cdf6420, 0x1d8be: 0x6cd09020, 0x1d8bf: 0x6d37e620, + // Block 0x763, offset 0x1d8c0 + 0x1d8c0: 0x6d2f2820, 0x1d8c1: 0x6d007220, 0x1d8c2: 0x6cd09620, 0x1d8c3: 0x6cf07e20, + 0x1d8c4: 0x6d391220, 0x1d8c5: 0x6c2e7820, 0x1d8c6: 0x6c282c20, 0x1d8c7: 0x6c3a9020, + 0x1d8c8: 0x6c037220, 0x1d8c9: 0x6c0ec820, 0x1d8ca: 0x6cc17c20, 0x1d8cb: 0x6ce49420, + 0x1d8cc: 0x6c06f220, 0x1d8cd: 0x6c484a20, 0x1d8ce: 0x6cdf0420, 0x1d8cf: 0x6d3ef220, + 0x1d8d0: 0x6c7a3220, 0x1d8d1: 0x6d33b420, 0x1d8d2: 0x6ca68820, 0x1d8d3: 0x6cb28a20, + 0x1d8d4: 0x6d3f5420, 0x1d8d5: 0x6c3f4c20, 0x1d8d6: 0x6cad2a20, 0x1d8d7: 0x6d313020, + 0x1d8d8: 0x6cfb3820, 0x1d8d9: 0x6d428820, 0x1d8da: 0x6cadb820, 0x1d8db: 0x6c640820, + 0x1d8dc: 0x6cd15620, 0x1d8dd: 0x6d33b620, 0x1d8de: 0x6c05ac20, 0x1d8df: 0x6ca23620, + 0x1d8e0: 0x6cc0ee20, 0x1d8e1: 0x6c552e20, 0x1d8e2: 0x6c77ea20, 0x1d8e3: 0x6c1b8620, + 0x1d8e4: 0x6d1b4020, 0x1d8e5: 0x6d057a20, 0x1d8e6: 0x6d0f5220, 0x1d8e7: 0x6c8f7a20, + 0x1d8e8: 0x6c306620, 0x1d8e9: 0x6c761c20, 0x1d8ea: 0x6c914620, 0x1d8eb: 0x6c6e5c20, + 0x1d8ec: 0x6caa5820, 0x1d8ed: 0x6d0bea20, 0x1d8ee: 0x6cacd020, 0x1d8ef: 0x6c7ae820, + 0x1d8f0: 0x6d14d620, 0x1d8f1: 0x6c49e820, 0x1d8f2: 0x6c4d3e20, 0x1d8f3: 0x6c438220, + 0x1d8f4: 0x6c307020, 0x1d8f5: 0x6c1aa220, 0x1d8f6: 0x6c683e20, 0x1d8f7: 0x6d046420, + 0x1d8f8: 0x6d046620, 0x1d8f9: 0x6c374c20, 0x1d8fa: 0x6c01b020, 0x1d8fb: 0x6c526020, + 0x1d8fc: 0x6cb10a20, 0x1d8fd: 0x6ca5a420, 0x1d8fe: 0x6d3f5620, 0x1d8ff: 0x6c4a4c20, + // Block 0x764, offset 0x1d900 + 0x1d900: 0x6c19e220, 0x1d901: 0x6ce5c020, 0x1d902: 0x6d33ce20, 0x1d903: 0x6c252c20, + 0x1d904: 0x6c99e620, 0x1d905: 0x6d009220, 0x1d906: 0x6c252e20, 0x1d907: 0x6d009420, + 0x1d908: 0x6c972e20, 0x1d909: 0x6c972a20, 0x1d90a: 0x6c600420, 0x1d90b: 0x6d029e20, + 0x1d90c: 0x6ca8f020, 0x1d90d: 0x6c7b2020, 0x1d90e: 0x6cc97220, 0x1d90f: 0x6d2a0420, + 0x1d910: 0x6cb5aa20, 0x1d911: 0x6ca4e820, 0x1d912: 0x6c9cec20, 0x1d913: 0x6ca9b820, + 0x1d914: 0x6c943a20, 0x1d915: 0x6ced7c20, 0x1d916: 0x6c0ef420, 0x1d917: 0x6cf1d820, + 0x1d918: 0x6ced0e20, 0x1d919: 0x6d04d020, 0x1d91a: 0x6c68ea20, 0x1d91b: 0x6c6e7a20, + 0x1d91c: 0x6d1fc420, 0x1d91d: 0x6c524e20, 0x1d91e: 0x6c260820, 0x1d91f: 0x6c8b0820, + 0x1d920: 0x6cccdc20, 0x1d921: 0x6ce6c420, 0x1d922: 0x6c99f020, 0x1d923: 0x6c214420, + 0x1d924: 0x6cd0a220, 0x1d925: 0x6cba0420, 0x1d926: 0x6c2a9220, 0x1d927: 0x6c72ee20, + 0x1d928: 0x6c243820, 0x1d929: 0x6d04cc20, 0x1d92a: 0x6d032e20, 0x1d92b: 0x6ceac220, + 0x1d92c: 0x6cad3820, 0x1d92d: 0x6c19f220, 0x1d92e: 0x6ca56c20, 0x1d92f: 0x6cb43620, + 0x1d930: 0x6c311420, 0x1d931: 0x6ceac420, 0x1d932: 0x6ca7d620, 0x1d933: 0x6ca53e20, + 0x1d934: 0x6cb05a20, 0x1d935: 0x6c478220, 0x1d936: 0x6c954020, 0x1d937: 0x6c85fc20, + 0x1d938: 0x6c88b820, 0x1d939: 0x6d2f3020, 0x1d93a: 0x6c254020, 0x1d93b: 0x6c6a1c20, + 0x1d93c: 0x6c899420, 0x1d93d: 0x6cd6fc20, 0x1d93e: 0x6caff420, 0x1d93f: 0x6c0bfe20, + // Block 0x765, offset 0x1d940 + 0x1d940: 0x6c94fc20, 0x1d941: 0x6cb11020, 0x1d942: 0x6c82c420, 0x1d943: 0x6c7cfe20, + 0x1d944: 0x6c20d620, 0x1d945: 0x6c288c20, 0x1d946: 0x6ce4fa20, 0x1d947: 0x6ca57020, + 0x1d948: 0x6c6dbc20, 0x1d949: 0x6ca37a20, 0x1d94a: 0x6c7e7820, 0x1d94b: 0x6d12f420, + 0x1d94c: 0x6d0c0e20, 0x1d94d: 0x6cc5f420, 0x1d94e: 0x6cd0a420, 0x1d94f: 0x6c21c220, + 0x1d950: 0x6c3f7820, 0x1d951: 0x6c3f6a20, 0x1d952: 0x6c709620, 0x1d953: 0x6c3a3620, + 0x1d954: 0x6cbabc20, 0x1d955: 0x6ced8820, 0x1d956: 0x6c307c20, 0x1d957: 0x6caff620, + 0x1d958: 0x6c4c6e20, 0x1d959: 0x6d3f9220, 0x1d95a: 0x6c2fa820, 0x1d95b: 0x6cf2fe20, + 0x1d95c: 0x6c9a6020, 0x1d95d: 0x6ca5f420, 0x1d95e: 0x6d3bd020, 0x1d95f: 0x6c1c3420, + 0x1d960: 0x6c23f020, 0x1d961: 0x6c954820, 0x1d962: 0x6cab8020, 0x1d963: 0x6c2c6e20, + 0x1d964: 0x6c013c20, 0x1d965: 0x6d038220, 0x1d966: 0x6ca50420, 0x1d967: 0x6cd5ea20, + 0x1d968: 0x6cd69220, 0x1d969: 0x6ca42e20, 0x1d96a: 0x6d283c20, 0x1d96b: 0x6d380020, + 0x1d96c: 0x6cc78620, 0x1d96d: 0x6c366020, 0x1d96e: 0x6cc9ca20, 0x1d96f: 0x6ce8c820, + 0x1d970: 0x6d10ae20, 0x1d971: 0x6c669220, 0x1d972: 0x6cefe620, 0x1d973: 0x6c690e20, + 0x1d974: 0x6d213220, 0x1d975: 0x6c637220, 0x1d976: 0x6c32d020, 0x1d977: 0x6c09d820, + 0x1d978: 0x6c16b220, 0x1d979: 0x6c401220, 0x1d97a: 0x6cfcde20, 0x1d97b: 0x6ca6b020, + 0x1d97c: 0x6c9e2e20, 0x1d97d: 0x6cec3820, 0x1d97e: 0x6ce2a220, 0x1d97f: 0x6ce9e620, + // Block 0x766, offset 0x1d980 + 0x1d980: 0x6c055620, 0x1d981: 0x6cba1820, 0x1d982: 0x6c93a820, 0x1d983: 0x6cec3a20, + 0x1d984: 0x6cda3e20, 0x1d985: 0x6ce11c20, 0x1d986: 0x6cdaee20, 0x1d987: 0x6d3c9820, + 0x1d988: 0x6c441420, 0x1d989: 0x6d183220, 0x1d98a: 0x6c100a20, 0x1d98b: 0x6c89fa20, + 0x1d98c: 0x6c607220, 0x1d98d: 0x6cb00a20, 0x1d98e: 0x6d00d020, 0x1d98f: 0x6c42d020, + 0x1d990: 0x6c93b420, 0x1d991: 0x6c0d8420, 0x1d992: 0x6cab6c20, 0x1d993: 0x6c16c220, + 0x1d994: 0x6c92ae20, 0x1d995: 0x6c4c8220, 0x1d996: 0x6cace020, 0x1d997: 0x6c1fbc20, + 0x1d998: 0x6c0c1a20, 0x1d999: 0x6c67c020, 0x1d99a: 0x6c3d9220, 0x1d99b: 0x6ce12c20, + 0x1d99c: 0x6ca06e20, 0x1d99d: 0x6cf6ac20, 0x1d99e: 0x6d3b8e20, 0x1d99f: 0x6c93f820, + 0x1d9a0: 0x6c686e20, 0x1d9a1: 0x6d1d4420, 0x1d9a2: 0x6c936220, 0x1d9a3: 0x6d36be20, + 0x1d9a4: 0x6d098620, 0x1d9a5: 0x6c211e20, 0x1d9a6: 0x6c8c6620, 0x1d9a7: 0x6ce78e20, + 0x1d9a8: 0x6caec820, 0x1d9a9: 0x6ca6cc20, 0x1d9aa: 0x6c1fcc20, 0x1d9ab: 0x6c8a1e20, + 0x1d9ac: 0x6c256620, 0x1d9ad: 0x6c4a8e20, 0x1d9ae: 0x6cff1620, 0x1d9af: 0x6ce29020, + 0x1d9b0: 0x6c38c220, 0x1d9b1: 0x6d349a20, 0x1d9b2: 0x6c688020, 0x1d9b3: 0x6ccdb420, + 0x1d9b4: 0x6c550420, 0x1d9b5: 0x6c255c20, 0x1d9b6: 0x6cc90a20, 0x1d9b7: 0x6cfd8a20, + 0x1d9b8: 0x6cdc1020, 0x1d9b9: 0x6c3bf020, 0x1d9ba: 0x6d1c0020, 0x1d9bb: 0x6ccd1620, + 0x1d9bc: 0x6d3b5c20, 0x1d9bd: 0x6c284c20, 0x1d9be: 0x6c7b4020, 0x1d9bf: 0x6ca9d220, + // Block 0x767, offset 0x1d9c0 + 0x1d9c0: 0x6cea7020, 0x1d9c1: 0x6c886a20, 0x1d9c2: 0x6c0a7620, 0x1d9c3: 0x6d1dc020, + 0x1d9c4: 0x6c74cc20, 0x1d9c5: 0x6c1f8020, 0x1d9c6: 0x6d18d420, 0x1d9c7: 0x6c732c20, + 0x1d9c8: 0x6c7e9820, 0x1d9c9: 0x6c88ce20, 0x1d9ca: 0x6ccac420, 0x1d9cb: 0x6cea7420, + 0x1d9cc: 0x6c47da20, 0x1d9cd: 0x6cb67820, 0x1d9ce: 0x6c257c20, 0x1d9cf: 0x6c0d8e20, + 0x1d9d0: 0x6d09bc20, 0x1d9d1: 0x6ca53a20, 0x1d9d2: 0x6cf32020, 0x1d9d3: 0x6d2a0e20, + 0x1d9d4: 0x6cfd3420, 0x1d9d5: 0x6c0c4420, 0x1d9d6: 0x6d044020, 0x1d9d7: 0x6c7b5c20, + 0x1d9d8: 0x6c7eaa20, 0x1d9d9: 0x6d0c4220, 0x1d9da: 0x6c918820, 0x1d9db: 0x6c5e4220, + 0x1d9dc: 0x6d28a020, 0x1d9dd: 0x6c95cc20, 0x1d9de: 0x6cc21020, 0x1d9df: 0x6d2a1020, + 0x1d9e0: 0x6c946c20, 0x1d9e1: 0x6ca61e20, 0x1d9e2: 0x6d28aa20, 0x1d9e3: 0x6c189420, + 0x1d9e4: 0x6cb8b620, 0x1d9e5: 0x6cf2da20, 0x1d9e6: 0x6c4a2420, 0x1d9e7: 0x6d29e220, + 0x1d9e8: 0x6c8bea20, 0x1d9e9: 0x6c4a0e20, 0x1d9ea: 0x6d3f2a20, 0x1d9eb: 0x6c68c420, + 0x1d9ec: 0x6ca80e20, 0x1d9ed: 0x6c1e4020, 0x1d9ee: 0x6c620c20, 0x1d9ef: 0x6c42c820, + 0x1d9f0: 0x6c1e4420, 0x1d9f1: 0x6c9dce20, 0x1d9f2: 0x6ca87420, 0x1d9f3: 0x6d357020, + 0x1d9f4: 0x6d35c620, 0x1d9f5: 0x6c43f220, 0x1d9f6: 0x6c669420, 0x1d9f7: 0x6c2eb220, + 0x1d9f8: 0x6d33e420, 0x1d9f9: 0x6d04d820, 0x1d9fa: 0x6cdf3220, 0x1d9fb: 0x6d319820, + 0x1d9fc: 0x6c6fd020, 0x1d9fd: 0x6cfc8420, 0x1d9fe: 0x6d20ca20, 0x1d9ff: 0x6c138620, + // Block 0x768, offset 0x1da00 + 0x1da00: 0x6d11a420, 0x1da01: 0x6d20e820, 0x1da02: 0x6c1cc220, 0x1da03: 0x6cf89020, + 0x1da04: 0x6cf89220, 0x1da05: 0x6c700620, 0x1da06: 0x6d217a20, 0x1da07: 0x6d227220, + 0x1da08: 0x6d043820, 0x1da09: 0x6c71d420, 0x1da0a: 0x6c702a20, 0x1da0b: 0x6d035820, + 0x1da0c: 0x6ccf0620, 0x1da0d: 0x6ccf2820, 0x1da0e: 0x6ccf9620, 0x1da0f: 0x6c6fb220, + 0x1da10: 0x6cd36020, 0x1da11: 0x6cdfa420, 0x1da12: 0x6cd4e220, 0x1da13: 0x6cd3b620, + 0x1da14: 0x6ce50820, 0x1da15: 0x6ce0a420, 0x1da16: 0x6cb4b020, 0x1da17: 0x6cb4b220, + 0x1da18: 0x6c496420, 0x1da19: 0x6c57cc20, 0x1da1a: 0x6ce54020, 0x1da1b: 0x6c201620, + 0x1da1c: 0x6cd75220, 0x1da1d: 0x6cf9d820, 0x1da1e: 0x6cf45e20, 0x1da1f: 0x6d385220, + 0x1da20: 0x6c29be20, 0x1da21: 0x6c1ff420, 0x1da22: 0x6cccd620, 0x1da23: 0x6d15d420, + 0x1da24: 0x6c397c20, 0x1da25: 0x6cabc020, 0x1da26: 0x6cdf6a20, 0x1da27: 0x6c389420, + 0x1da28: 0x6c04c820, 0x1da29: 0x6c1ff620, 0x1da2a: 0x6c4f6c20, 0x1da2b: 0x6c39d420, + 0x1da2c: 0x6c047a20, 0x1da2d: 0x6c08d420, 0x1da2e: 0x6c934820, 0x1da2f: 0x6d37b020, + 0x1da30: 0x6c667220, 0x1da31: 0x6c122a20, 0x1da32: 0x6c8cfc20, 0x1da33: 0x6d3a1020, + 0x1da34: 0x6d2ac620, 0x1da35: 0x6c34f220, 0x1da36: 0x6c0ef620, 0x1da37: 0x6cfb5020, + 0x1da38: 0x6c447620, 0x1da39: 0x6c1ff820, 0x1da3a: 0x6cf9b420, 0x1da3b: 0x6c914e20, + 0x1da3c: 0x6cbf2e20, 0x1da3d: 0x6cacfc20, 0x1da3e: 0x6cf62a20, 0x1da3f: 0x6c7af420, + // Block 0x769, offset 0x1da40 + 0x1da40: 0x6c3ea420, 0x1da41: 0x6d2a8620, 0x1da42: 0x6c3cb220, 0x1da43: 0x6c83f220, + 0x1da44: 0x6cce7820, 0x1da45: 0x6d216420, 0x1da46: 0x6c80d220, 0x1da47: 0x6ce6ce20, + 0x1da48: 0x6d237820, 0x1da49: 0x6cefe820, 0x1da4a: 0x6c0f3220, 0x1da4b: 0x6c9be020, + 0x1da4c: 0x6ca76c20, 0x1da4d: 0x6c70b420, 0x1da4e: 0x6c59f420, 0x1da4f: 0x6cd44a20, + 0x1da50: 0x6c78d020, 0x1da51: 0x6c0bb820, 0x1da52: 0x6ca2a620, 0x1da53: 0x6c2ede20, + 0x1da54: 0x6c315c20, 0x1da55: 0x6c059020, 0x1da56: 0x6c13ae20, 0x1da57: 0x6d18b220, + 0x1da58: 0x6cd9d820, 0x1da59: 0x6c123a20, 0x1da5a: 0x6c129c20, 0x1da5b: 0x6c90c020, + 0x1da5c: 0x6c279820, 0x1da5d: 0x6d098a20, 0x1da5e: 0x6d123420, 0x1da5f: 0x6c1cee20, + 0x1da60: 0x6c2b0820, 0x1da61: 0x6c291c20, 0x1da62: 0x6cbb2c20, 0x1da63: 0x6c91f620, + 0x1da64: 0x6d162220, 0x1da65: 0x6c60e020, 0x1da66: 0x6c670e20, 0x1da67: 0x6c5e3020, + 0x1da68: 0x6c9b8620, 0x1da69: 0x6cb69820, 0x1da6a: 0x6c91fe20, 0x1da6b: 0x6c919a20, + 0x1da6c: 0x6c157220, 0x1da6d: 0x6cd6c020, 0x1da6e: 0x6c449e20, 0x1da6f: 0x6c894620, + 0x1da70: 0x6c647220, 0x1da71: 0x6c650020, 0x1da72: 0x6ccb1420, 0x1da73: 0x6d0e5420, + 0x1da74: 0x6c3e6820, 0x1da75: 0x6cb25a20, 0x1da76: 0x6d0eea20, 0x1da77: 0x6d0f1c20, + 0x1da78: 0x6c12aa20, 0x1da79: 0x6c12c020, 0x1da7a: 0x6d164220, 0x1da7b: 0x6c821220, + 0x1da7c: 0x6ce62820, 0x1da7d: 0x6c681e20, 0x1da7e: 0x6c008420, 0x1da7f: 0x6ca39020, + // Block 0x76a, offset 0x1da80 + 0x1da80: 0x6ce56820, 0x1da81: 0x6c682020, 0x1da82: 0x6c6a5a20, 0x1da83: 0x6cae8c20, + 0x1da84: 0x6cecbe20, 0x1da85: 0x6d167020, 0x1da86: 0x6c145e20, 0x1da87: 0x6c9db820, + 0x1da88: 0x6c9cd820, 0x1da89: 0x6c416220, 0x1da8a: 0x6cb89e20, 0x1da8b: 0x6d22c820, + 0x1da8c: 0x6d22ca20, 0x1da8d: 0x6cce9620, 0x1da8e: 0x6cbeee20, 0x1da8f: 0x6c323020, + 0x1da90: 0x6c564c20, 0x1da91: 0x6cb6ce20, 0x1da92: 0x6c982c20, 0x1da93: 0x6d3f2e20, + 0x1da94: 0x6c5ba020, 0x1da95: 0x6cdbaa20, 0x1da96: 0x6d357220, 0x1da97: 0x6cfd6020, + 0x1da98: 0x6cafb020, 0x1da99: 0x6c3ddc20, 0x1da9a: 0x6cea4220, 0x1da9b: 0x6cef8a20, + 0x1da9c: 0x6cf3a820, 0x1da9d: 0x6d338420, 0x1da9e: 0x6cb73e20, 0x1da9f: 0x6cccbe20, + 0x1daa0: 0x6cf18020, 0x1daa1: 0x6cba3e20, 0x1daa2: 0x6cc56e20, 0x1daa3: 0x6c3dde20, + 0x1daa4: 0x6c79b620, 0x1daa5: 0x6c6bba20, 0x1daa6: 0x6c913620, 0x1daa7: 0x6d067420, + 0x1daa8: 0x6c5e8220, 0x1daa9: 0x6cbd5420, 0x1daaa: 0x6cb57620, 0x1daab: 0x6d0c5a20, + 0x1daac: 0x6c3b1420, 0x1daad: 0x6c032020, 0x1daae: 0x6cc8c020, 0x1daaf: 0x6d02ac20, + 0x1dab0: 0x6c618a20, 0x1dab1: 0x6c570620, 0x1dab2: 0x6c570820, 0x1dab3: 0x6c398620, + 0x1dab4: 0x6cf4ae20, 0x1dab5: 0x6c73e420, 0x1dab6: 0x6c466c20, 0x1dab7: 0x6d34ee20, + 0x1dab8: 0x6d278420, 0x1dab9: 0x6cbd5620, 0x1daba: 0x6c029e20, 0x1dabb: 0x6c1e7820, + 0x1dabc: 0x6c994620, 0x1dabd: 0x6d0b1420, 0x1dabe: 0x6c3a8020, 0x1dabf: 0x6cc63220, + // Block 0x76b, offset 0x1dac0 + 0x1dac0: 0x6c4f5a20, 0x1dac1: 0x6c22fc20, 0x1dac2: 0x6d1a2a20, 0x1dac3: 0x6d1fa220, + 0x1dac4: 0x6c0b7420, 0x1dac5: 0x6d169a20, 0x1dac6: 0x6cbd1020, 0x1dac7: 0x6cef8c20, + 0x1dac8: 0x6c858420, 0x1dac9: 0x6cb05420, 0x1daca: 0x6c35d420, 0x1dacb: 0x6cfc7c20, + 0x1dacc: 0x6c169a20, 0x1dacd: 0x6c122420, 0x1dace: 0x6d3aa620, 0x1dacf: 0x6cda4820, + 0x1dad0: 0x6ce30e20, 0x1dad1: 0x6d260220, 0x1dad2: 0x6cc4ae20, 0x1dad3: 0x6c8cb020, + 0x1dad4: 0x6cdf1a20, 0x1dad5: 0x6cce9820, 0x1dad6: 0x6c2b5c20, 0x1dad7: 0x6c9e6e20, + 0x1dad8: 0x6cbe9c20, 0x1dad9: 0x6c859620, 0x1dada: 0x6d1e7220, 0x1dadb: 0x6c77d820, + 0x1dadc: 0x6ca27220, 0x1dadd: 0x6c06ee20, 0x1dade: 0x6c05a820, 0x1dadf: 0x6c467220, + 0x1dae0: 0x6c9f3420, 0x1dae1: 0x6d15c420, 0x1dae2: 0x6d15ca20, 0x1dae3: 0x6c720020, + 0x1dae4: 0x6cb1de20, 0x1dae5: 0x6cc91420, 0x1dae6: 0x6c7a7620, 0x1dae7: 0x6ca8fa20, + 0x1dae8: 0x6ca62c20, 0x1dae9: 0x6c0ebc20, 0x1daea: 0x6c0dc820, 0x1daeb: 0x6cccc620, + 0x1daec: 0x6d051a20, 0x1daed: 0x6d119220, 0x1daee: 0x6cfa8420, 0x1daef: 0x6c079620, + 0x1daf0: 0x6c530620, 0x1daf1: 0x6d1ba220, 0x1daf2: 0x6d2c7420, 0x1daf3: 0x6c2fe220, + 0x1daf4: 0x6c706020, 0x1daf5: 0x6c2e6220, 0x1daf6: 0x6ca7de20, 0x1daf7: 0x6c417e20, + 0x1daf8: 0x6c54a820, 0x1daf9: 0x6cb27c20, 0x1dafa: 0x6c99dc20, 0x1dafb: 0x6c3e0220, + 0x1dafc: 0x6cd0e820, 0x1dafd: 0x6c46f620, 0x1dafe: 0x6c093e20, 0x1daff: 0x6cf07620, + // Block 0x76c, offset 0x1db00 + 0x1db00: 0x6c3e0420, 0x1db01: 0x6d3d2e20, 0x1db02: 0x6c994c20, 0x1db03: 0x6c393220, + 0x1db04: 0x6c633020, 0x1db05: 0x6c98cc20, 0x1db06: 0x6c98ce20, 0x1db07: 0x6c036a20, + 0x1db08: 0x6c223220, 0x1db09: 0x6ca0d620, 0x1db0a: 0x6d3e0620, 0x1db0b: 0x6c2be020, + 0x1db0c: 0x6c1b0a20, 0x1db0d: 0x6c61b220, 0x1db0e: 0x6c6d9420, 0x1db0f: 0x6c8f6e20, + 0x1db10: 0x6c23e220, 0x1db11: 0x6ca78e20, 0x1db12: 0x6d256c20, 0x1db13: 0x6d08fe20, + 0x1db14: 0x6d1c5a20, 0x1db15: 0x6cbf0020, 0x1db16: 0x6c43cc20, 0x1db17: 0x6c9ff020, + 0x1db18: 0x6c85ae20, 0x1db19: 0x6cc65c20, 0x1db1a: 0x6d1b3c20, 0x1db1b: 0x6c44b020, + 0x1db1c: 0x6cba4420, 0x1db1d: 0x6c148e20, 0x1db1e: 0x6c18aa20, 0x1db1f: 0x6d22e820, + 0x1db20: 0x6c4fa220, 0x1db21: 0x6d3f3420, 0x1db22: 0x6c8adc20, 0x1db23: 0x6cf3bc20, + 0x1db24: 0x6c61b420, 0x1db25: 0x6c4a4020, 0x1db26: 0x6c22bc20, 0x1db27: 0x6c657620, + 0x1db28: 0x6c223420, 0x1db29: 0x6c469e20, 0x1db2a: 0x6c49e220, 0x1db2b: 0x6c984420, + 0x1db2c: 0x6c13ce20, 0x1db2d: 0x6c683620, 0x1db2e: 0x6c683820, 0x1db2f: 0x6c3e2420, + 0x1db30: 0x6d20ea20, 0x1db31: 0x6d398e20, 0x1db32: 0x6d3e1420, 0x1db33: 0x6c675220, + 0x1db34: 0x6c5b2820, 0x1db35: 0x6d19b620, 0x1db36: 0x6c13d020, 0x1db37: 0x6c380820, + 0x1db38: 0x6cc64e20, 0x1db39: 0x6cc79420, 0x1db3a: 0x6c1cb620, 0x1db3b: 0x6c989220, + 0x1db3c: 0x6ce72c20, 0x1db3d: 0x6d381c20, 0x1db3e: 0x6cb8ac20, 0x1db3f: 0x6d3a0220, + // Block 0x76d, offset 0x1db40 + 0x1db40: 0x6d09f220, 0x1db41: 0x6c586820, 0x1db42: 0x6c3d5420, 0x1db43: 0x6cc2c620, + 0x1db44: 0x6c40ea20, 0x1db45: 0x6c264620, 0x1db46: 0x6c6d9a20, 0x1db47: 0x6d041c20, + 0x1db48: 0x6c201c20, 0x1db49: 0x6c12ac20, 0x1db4a: 0x6c6d9c20, 0x1db4b: 0x6c374820, + 0x1db4c: 0x6c01a820, 0x1db4d: 0x6cbbd420, 0x1db4e: 0x6c1b1220, 0x1db4f: 0x6cc58c20, + 0x1db50: 0x6c666020, 0x1db51: 0x6ce31220, 0x1db52: 0x6c598420, 0x1db53: 0x6cb28e20, + 0x1db54: 0x6c85b020, 0x1db55: 0x6c6c3620, 0x1db56: 0x6c81aa20, 0x1db57: 0x6cd5b620, + 0x1db58: 0x6d3c0e20, 0x1db59: 0x6c268c20, 0x1db5a: 0x6c63a820, 0x1db5b: 0x6cc52220, + 0x1db5c: 0x6c095620, 0x1db5d: 0x6d2ab420, 0x1db5e: 0x6cbbd620, 0x1db5f: 0x6c5ba220, + 0x1db60: 0x6c61b620, 0x1db61: 0x6c295c20, 0x1db62: 0x6d24c020, 0x1db63: 0x6cc65e20, + 0x1db64: 0x6c5cb620, 0x1db65: 0x6d03d420, 0x1db66: 0x6c95ec20, 0x1db67: 0x6d1c5e20, + 0x1db68: 0x6d09f420, 0x1db69: 0x6c6ce420, 0x1db6a: 0x6cdcce20, 0x1db6b: 0x6d19b820, + 0x1db6c: 0x6c971220, 0x1db6d: 0x6c532020, 0x1db6e: 0x6d391420, 0x1db6f: 0x6d11f620, + 0x1db70: 0x6c324c20, 0x1db71: 0x6cefa420, 0x1db72: 0x6c83b020, 0x1db73: 0x6c310820, + 0x1db74: 0x6c3d6020, 0x1db75: 0x6cc59220, 0x1db76: 0x6d1a4c20, 0x1db77: 0x6c50fc20, + 0x1db78: 0x6c08a020, 0x1db79: 0x6c108820, 0x1db7a: 0x6d27e220, 0x1db7b: 0x6c2b6620, + 0x1db7c: 0x6ce89820, 0x1db7d: 0x6cdbba20, 0x1db7e: 0x6cdbbc20, 0x1db7f: 0x6c19d020, + // Block 0x76e, offset 0x1db80 + 0x1db80: 0x6c18b420, 0x1db81: 0x6cf3be20, 0x1db82: 0x6c0ce420, 0x1db83: 0x6cf5d020, + 0x1db84: 0x6c450420, 0x1db85: 0x6c85de20, 0x1db86: 0x6cb43420, 0x1db87: 0x6d3ae020, + 0x1db88: 0x6ca10020, 0x1db89: 0x6c85e020, 0x1db8a: 0x6d3c1420, 0x1db8b: 0x6d423420, + 0x1db8c: 0x6ceab820, 0x1db8d: 0x6cc03820, 0x1db8e: 0x6ccbe420, 0x1db8f: 0x6cdd1220, + 0x1db90: 0x6c18b620, 0x1db91: 0x6cae9620, 0x1db92: 0x6c71ae20, 0x1db93: 0x6c99e820, + 0x1db94: 0x6c9b1220, 0x1db95: 0x6d042420, 0x1db96: 0x6c6da220, 0x1db97: 0x6c17d820, + 0x1db98: 0x6ccfd420, 0x1db99: 0x6c756820, 0x1db9a: 0x6d0c7a20, 0x1db9b: 0x6ce66620, + 0x1db9c: 0x6d1f2020, 0x1db9d: 0x6c261e20, 0x1db9e: 0x6c494c20, 0x1db9f: 0x6c4ea020, + 0x1dba0: 0x6d1fbe20, 0x1dba1: 0x6c262020, 0x1dba2: 0x6c63b420, 0x1dba3: 0x6cede220, + 0x1dba4: 0x6cda9620, 0x1dba5: 0x6ca99220, 0x1dba6: 0x6cce6420, 0x1dba7: 0x6cfcac20, + 0x1dba8: 0x6c811a20, 0x1dba9: 0x6c3e4020, 0x1dbaa: 0x6c355a20, 0x1dbab: 0x6ca10220, + 0x1dbac: 0x6cf20420, 0x1dbad: 0x6c6aa820, 0x1dbae: 0x6ca3f420, 0x1dbaf: 0x6ca27c20, + 0x1dbb0: 0x6c76c820, 0x1dbb1: 0x6c7eee20, 0x1dbb2: 0x6c87f820, 0x1dbb3: 0x6cd26020, + 0x1dbb4: 0x6cf28220, 0x1dbb5: 0x6ce93020, 0x1dbb6: 0x6cfa9620, 0x1dbb7: 0x6c5db220, + 0x1dbb8: 0x6d1f2220, 0x1dbb9: 0x6d1c6020, 0x1dbba: 0x6d1ba820, 0x1dbbb: 0x6c461e20, + 0x1dbbc: 0x6c213e20, 0x1dbbd: 0x6c988a20, 0x1dbbe: 0x6c988c20, 0x1dbbf: 0x6c22c220, + // Block 0x76f, offset 0x1dbc0 + 0x1dbc0: 0x6ced1020, 0x1dbc1: 0x6c6db220, 0x1dbc2: 0x6c2c4e20, 0x1dbc3: 0x6cc18020, + 0x1dbc4: 0x6c2ffe20, 0x1dbc5: 0x6c648c20, 0x1dbc6: 0x6d405020, 0x1dbc7: 0x6c483a20, + 0x1dbc8: 0x6c7e4420, 0x1dbc9: 0x6c924820, 0x1dbca: 0x6c711c20, 0x1dbcb: 0x6cf08620, + 0x1dbcc: 0x6c757020, 0x1dbcd: 0x6ca82220, 0x1dbce: 0x6c7d5c20, 0x1dbcf: 0x6c511a20, + 0x1dbd0: 0x6cb43a20, 0x1dbd1: 0x6d290020, 0x1dbd2: 0x6c430420, 0x1dbd3: 0x6c4cbc20, + 0x1dbd4: 0x6c3e6c20, 0x1dbd5: 0x6c94f620, 0x1dbd6: 0x6c166a20, 0x1dbd7: 0x6c1daa20, + 0x1dbd8: 0x6cd91e20, 0x1dbd9: 0x6c20ca20, 0x1dbda: 0x6d2e5e20, 0x1dbdb: 0x6c9acc20, + 0x1dbdc: 0x6c114420, 0x1dbdd: 0x6c037820, 0x1dbde: 0x6c83c820, 0x1dbdf: 0x6ce8aa20, + 0x1dbe0: 0x6c0e7020, 0x1dbe1: 0x6c4eb620, 0x1dbe2: 0x6c064620, 0x1dbe3: 0x6cbe1220, + 0x1dbe4: 0x6c731e20, 0x1dbe5: 0x6cf60020, 0x1dbe6: 0x6cbd6a20, 0x1dbe7: 0x6c2bf220, + 0x1dbe8: 0x6c6a0420, 0x1dbe9: 0x6cb43820, 0x1dbea: 0x6c296220, 0x1dbeb: 0x6c6c9020, + 0x1dbec: 0x6cbbde20, 0x1dbed: 0x6cdf2220, 0x1dbee: 0x6c44c820, 0x1dbef: 0x6c573420, + 0x1dbf0: 0x6c470c20, 0x1dbf1: 0x6c8cfe20, 0x1dbf2: 0x6c39fe20, 0x1dbf3: 0x6cbd7020, + 0x1dbf4: 0x6c012a20, 0x1dbf5: 0x6cee1620, 0x1dbf6: 0x6c081c20, 0x1dbf7: 0x6d38e220, + 0x1dbf8: 0x6d0c0020, 0x1dbf9: 0x6c709020, 0x1dbfa: 0x6c648e20, 0x1dbfb: 0x6c8c1e20, + 0x1dbfc: 0x6ce05c20, 0x1dbfd: 0x6cd4d420, 0x1dbfe: 0x6ce49e20, 0x1dbff: 0x6c2a1420, + // Block 0x770, offset 0x1dc00 + 0x1dc00: 0x6c561c20, 0x1dc01: 0x6cb5d020, 0x1dc02: 0x6c511c20, 0x1dc03: 0x6c253820, + 0x1dc04: 0x6ce22420, 0x1dc05: 0x6c210420, 0x1dc06: 0x6c098a20, 0x1dc07: 0x6c16aa20, + 0x1dc08: 0x6c586e20, 0x1dc09: 0x6c3aa620, 0x1dc0a: 0x6c7f0020, 0x1dc0b: 0x6cb4ee20, + 0x1dc0c: 0x6c9b1420, 0x1dc0d: 0x6cb2a020, 0x1dc0e: 0x6cee7420, 0x1dc0f: 0x6c288220, + 0x1dc10: 0x6ccc4e20, 0x1dc11: 0x6c587020, 0x1dc12: 0x6d0d6e20, 0x1dc13: 0x6d14ee20, + 0x1dc14: 0x6ce58420, 0x1dc15: 0x6cb5d220, 0x1dc16: 0x6ced1220, 0x1dc17: 0x6c12e220, + 0x1dc18: 0x6ca3bc20, 0x1dc19: 0x6d327c20, 0x1dc1a: 0x6ceba420, 0x1dc1b: 0x6c6f6c20, + 0x1dc1c: 0x6ce5ee20, 0x1dc1d: 0x6c954220, 0x1dc1e: 0x6c0ae020, 0x1dc1f: 0x6d199220, + 0x1dc20: 0x6c9b1620, 0x1dc21: 0x6c100820, 0x1dc22: 0x6cada820, 0x1dc23: 0x6c2fc620, + 0x1dc24: 0x6d1c6420, 0x1dc25: 0x6d1c6620, 0x1dc26: 0x6d1c6820, 0x1dc27: 0x6cfebc20, + 0x1dc28: 0x6cc97420, 0x1dc29: 0x6cbfb020, 0x1dc2a: 0x6c77fc20, 0x1dc2b: 0x6cfe3620, + 0x1dc2c: 0x6ced8620, 0x1dc2d: 0x6d226020, 0x1dc2e: 0x6d213620, 0x1dc2f: 0x6c3ffa20, + 0x1dc30: 0x6c88fe20, 0x1dc31: 0x6d07a220, 0x1dc32: 0x6d07a420, 0x1dc33: 0x6ca42a20, + 0x1dc34: 0x6c12f620, 0x1dc35: 0x6cf28e20, 0x1dc36: 0x6c217a20, 0x1dc37: 0x6cfece20, + 0x1dc38: 0x6d210620, 0x1dc39: 0x6c0b4020, 0x1dc3a: 0x6c998420, 0x1dc3b: 0x6c013420, + 0x1dc3c: 0x6c364020, 0x1dc3d: 0x6c960a20, 0x1dc3e: 0x6d1c7820, 0x1dc3f: 0x6c7dfc20, + // Block 0x771, offset 0x1dc40 + 0x1dc40: 0x6c7dfe20, 0x1dc41: 0x6c676420, 0x1dc42: 0x6c9e2a20, 0x1dc43: 0x6d42a020, + 0x1dc44: 0x6d42a220, 0x1dc45: 0x6d409c20, 0x1dc46: 0x6c060020, 0x1dc47: 0x6cc74e20, + 0x1dc48: 0x6cf7ec20, 0x1dc49: 0x6d12f620, 0x1dc4a: 0x6c013620, 0x1dc4b: 0x6cc19420, + 0x1dc4c: 0x6c64a820, 0x1dc4d: 0x6c3e8e20, 0x1dc4e: 0x6c93e420, 0x1dc4f: 0x6c6dbe20, + 0x1dc50: 0x6cae4220, 0x1dc51: 0x6c3c5020, 0x1dc52: 0x6c535220, 0x1dc53: 0x6c535420, + 0x1dc54: 0x6c540820, 0x1dc55: 0x6d0e7a20, 0x1dc56: 0x6ce86420, 0x1dc57: 0x6d311420, + 0x1dc58: 0x6d3e4620, 0x1dc59: 0x6cfd7a20, 0x1dc5a: 0x6cc5f620, 0x1dc5b: 0x6c43f420, + 0x1dc5c: 0x6cb82c20, 0x1dc5d: 0x6cbe8020, 0x1dc5e: 0x6c9cf820, 0x1dc5f: 0x6c59c820, + 0x1dc60: 0x6ccff220, 0x1dc61: 0x6cb43c20, 0x1dc62: 0x6c413820, 0x1dc63: 0x6c303020, + 0x1dc64: 0x6d392a20, 0x1dc65: 0x6c669620, 0x1dc66: 0x6cefcc20, 0x1dc67: 0x6c0f0820, + 0x1dc68: 0x6cee9220, 0x1dc69: 0x6cabc620, 0x1dc6a: 0x6c620e20, 0x1dc6b: 0x6c556620, + 0x1dc6c: 0x6d2a0820, 0x1dc6d: 0x6c636220, 0x1dc6e: 0x6c32c620, 0x1dc6f: 0x6d120a20, + 0x1dc70: 0x6cdbc420, 0x1dc71: 0x6c231c20, 0x1dc72: 0x6cc2fa20, 0x1dc73: 0x6cee9420, + 0x1dc74: 0x6d315820, 0x1dc75: 0x6c7c7a20, 0x1dc76: 0x6ce67820, 0x1dc77: 0x6c5cd220, + 0x1dc78: 0x6cf7ee20, 0x1dc79: 0x6cd1c220, 0x1dc7a: 0x6cb79a20, 0x1dc7b: 0x6c7f9e20, + 0x1dc7c: 0x6d3f9420, 0x1dc7d: 0x6d10a820, 0x1dc7e: 0x6d24f020, 0x1dc7f: 0x6c9a0620, + // Block 0x772, offset 0x1dc80 + 0x1dc80: 0x6d275220, 0x1dc81: 0x6cd5c820, 0x1dc82: 0x6c2c6220, 0x1dc83: 0x6d3bc620, + 0x1dc84: 0x6c491820, 0x1dc85: 0x6cc4dc20, 0x1dc86: 0x6d08e020, 0x1dc87: 0x6c15b820, + 0x1dc88: 0x6c765a20, 0x1dc89: 0x6c7d0020, 0x1dc8a: 0x6c571620, 0x1dc8b: 0x6c67a820, + 0x1dc8c: 0x6c908e20, 0x1dc8d: 0x6cefce20, 0x1dc8e: 0x6cac2a20, 0x1dc8f: 0x6d206c20, + 0x1dc90: 0x6cd9b620, 0x1dc91: 0x6d1b6220, 0x1dc92: 0x6cd1d420, 0x1dc93: 0x6c215420, + 0x1dc94: 0x6cd27620, 0x1dc95: 0x6d275a20, 0x1dc96: 0x6d317220, 0x1dc97: 0x6c812220, + 0x1dc98: 0x6cc7b420, 0x1dc99: 0x6c9b2a20, 0x1dc9a: 0x6c863a20, 0x1dc9b: 0x6cc38e20, + 0x1dc9c: 0x6cdb9c20, 0x1dc9d: 0x6d258a20, 0x1dc9e: 0x6c863c20, 0x1dc9f: 0x6c71c420, + 0x1dca0: 0x6cf65620, 0x1dca1: 0x6c057e20, 0x1dca2: 0x6c1e8220, 0x1dca3: 0x6d062020, + 0x1dca4: 0x6ce8cc20, 0x1dca5: 0x6c8e7020, 0x1dca6: 0x6c5de020, 0x1dca7: 0x6c2d2220, + 0x1dca8: 0x6cba5e20, 0x1dca9: 0x6d409e20, 0x1dcaa: 0x6cb39820, 0x1dcab: 0x6c25e420, + 0x1dcac: 0x6d24fa20, 0x1dcad: 0x6c1e9020, 0x1dcae: 0x6d237a20, 0x1dcaf: 0x6c7afe20, + 0x1dcb0: 0x6cac6220, 0x1dcb1: 0x6cb43e20, 0x1dcb2: 0x6cb44020, 0x1dcb3: 0x6ca35820, + 0x1dcb4: 0x6cd78820, 0x1dcb5: 0x6cf78820, 0x1dcb6: 0x6c3b7c20, 0x1dcb7: 0x6d27b820, + 0x1dcb8: 0x6d32d220, 0x1dcb9: 0x6c64c020, 0x1dcba: 0x6c605e20, 0x1dcbb: 0x6cc92220, + 0x1dcbc: 0x6c123620, 0x1dcbd: 0x6c371820, 0x1dcbe: 0x6c9c5820, 0x1dcbf: 0x6c4fa820, + // Block 0x773, offset 0x1dcc0 + 0x1dcc0: 0x6cdcd820, 0x1dcc1: 0x6d317420, 0x1dcc2: 0x6ca00c20, 0x1dcc3: 0x6cd9b820, + 0x1dcc4: 0x6d06fe20, 0x1dcc5: 0x6c8e7220, 0x1dcc6: 0x6cf78a20, 0x1dcc7: 0x6c479220, + 0x1dcc8: 0x6c80c020, 0x1dcc9: 0x6cc68c20, 0x1dcca: 0x6cf25420, 0x1dccb: 0x6c414820, + 0x1dccc: 0x6c263020, 0x1dccd: 0x6cd1d620, 0x1dcce: 0x6ce10820, 0x1dccf: 0x6c95b620, + 0x1dcd0: 0x6cc82020, 0x1dcd1: 0x6cdd2820, 0x1dcd2: 0x6d07ae20, 0x1dcd3: 0x6c073620, + 0x1dcd4: 0x6d11ba20, 0x1dcd5: 0x6c4b5620, 0x1dcd6: 0x6c09da20, 0x1dcd7: 0x6d3ffc20, + 0x1dcd8: 0x6c4bd220, 0x1dcd9: 0x6d42ba20, 0x1dcda: 0x6ce58620, 0x1dcdb: 0x6c12fe20, + 0x1dcdc: 0x6cae2e20, 0x1dcdd: 0x6c7fa420, 0x1dcde: 0x6c28b620, 0x1dcdf: 0x6c622420, + 0x1dce0: 0x6c83f420, 0x1dce1: 0x6ccffa20, 0x1dce2: 0x6c810620, 0x1dce3: 0x6d237c20, + 0x1dce4: 0x6c8e2e20, 0x1dce5: 0x6d1c8420, 0x1dce6: 0x6ca13020, 0x1dce7: 0x6c2e3020, + 0x1dce8: 0x6ce58e20, 0x1dce9: 0x6c993c20, 0x1dcea: 0x6ce6fa20, 0x1dceb: 0x6c1f5a20, + 0x1dcec: 0x6caeae20, 0x1dced: 0x6c014020, 0x1dcee: 0x6c881820, 0x1dcef: 0x6c233220, + 0x1dcf0: 0x6cf80220, 0x1dcf1: 0x6cb2ae20, 0x1dcf2: 0x6cbfb820, 0x1dcf3: 0x6c6ca620, + 0x1dcf4: 0x6c215820, 0x1dcf5: 0x6c6b1420, 0x1dcf6: 0x6cef2420, 0x1dcf7: 0x6ce99620, + 0x1dcf8: 0x6c128220, 0x1dcf9: 0x6d23ca20, 0x1dcfa: 0x6d183620, 0x1dcfb: 0x6d3ed220, + 0x1dcfc: 0x6c8a7220, 0x1dcfd: 0x6c09dc20, 0x1dcfe: 0x6c91ce20, 0x1dcff: 0x6d077620, + // Block 0x774, offset 0x1dd00 + 0x1dd00: 0x6c10a820, 0x1dd01: 0x6d2ed020, 0x1dd02: 0x6c824a20, 0x1dd03: 0x6cbb1c20, + 0x1dd04: 0x6c97f220, 0x1dd05: 0x6d0cb820, 0x1dd06: 0x6c8d3e20, 0x1dd07: 0x6c621020, + 0x1dd08: 0x6c0c0e20, 0x1dd09: 0x6c4bde20, 0x1dd0a: 0x6c4e5c20, 0x1dd0b: 0x6c2b8220, + 0x1dd0c: 0x6cdaf020, 0x1dd0d: 0x6c929620, 0x1dd0e: 0x6ccf6c20, 0x1dd0f: 0x6cce1420, + 0x1dd10: 0x6c2b8420, 0x1dd11: 0x6c9ee420, 0x1dd12: 0x6d09a220, 0x1dd13: 0x6c97f420, + 0x1dd14: 0x6c0f3420, 0x1dd15: 0x6c2c8420, 0x1dd16: 0x6c25ea20, 0x1dd17: 0x6d311620, + 0x1dd18: 0x6cd00a20, 0x1dd19: 0x6d08a620, 0x1dd1a: 0x6cf0b220, 0x1dd1b: 0x6c558220, + 0x1dd1c: 0x6c025620, 0x1dd1d: 0x6c9cfc20, 0x1dd1e: 0x6c90aa20, 0x1dd1f: 0x6c244a20, + 0x1dd20: 0x6d37c220, 0x1dd21: 0x6c114820, 0x1dd22: 0x6cb33220, 0x1dd23: 0x6c67b220, + 0x1dd24: 0x6c9d6e20, 0x1dd25: 0x6c233420, 0x1dd26: 0x6ca7a220, 0x1dd27: 0x6c5c0220, + 0x1dd28: 0x6c738620, 0x1dd29: 0x6d1a8420, 0x1dd2a: 0x6c66ac20, 0x1dd2b: 0x6ca6f020, + 0x1dd2c: 0x6cd50220, 0x1dd2d: 0x6d19f020, 0x1dd2e: 0x6c4c7e20, 0x1dd2f: 0x6c18d620, + 0x1dd30: 0x6c56bc20, 0x1dd31: 0x6ccc0020, 0x1dd32: 0x6c79fc20, 0x1dd33: 0x6cba6e20, + 0x1dd34: 0x6c966e20, 0x1dd35: 0x6d29e420, 0x1dd36: 0x6d2b5a20, 0x1dd37: 0x6cbb1620, + 0x1dd38: 0x6c30ba20, 0x1dd39: 0x6c88c620, 0x1dd3a: 0x6c8c5a20, 0x1dd3b: 0x6c79fe20, + 0x1dd3c: 0x6c007020, 0x1dd3d: 0x6c0a0a20, 0x1dd3e: 0x6c843220, 0x1dd3f: 0x6cf00a20, + // Block 0x775, offset 0x1dd40 + 0x1dd40: 0x6c609620, 0x1dd41: 0x6cb9c420, 0x1dd42: 0x6cd17620, 0x1dd43: 0x6c385c20, + 0x1dd44: 0x6c9b3c20, 0x1dd45: 0x6cab9020, 0x1dd46: 0x6c15dc20, 0x1dd47: 0x6c2d2820, + 0x1dd48: 0x6d0aa420, 0x1dd49: 0x6c687020, 0x1dd4a: 0x6cc8ac20, 0x1dd4b: 0x6cc8ae20, + 0x1dd4c: 0x6c82d420, 0x1dd4d: 0x6d218e20, 0x1dd4e: 0x6cbbf220, 0x1dd4f: 0x6c1ea020, + 0x1dd50: 0x6c575220, 0x1dd51: 0x6c64e220, 0x1dd52: 0x6c971a20, 0x1dd53: 0x6d27c220, + 0x1dd54: 0x6c05b820, 0x1dd55: 0x6d1f6820, 0x1dd56: 0x6cc1aa20, 0x1dd57: 0x6c92da20, + 0x1dd58: 0x6cc52a20, 0x1dd59: 0x6c5c1e20, 0x1dd5a: 0x6c369020, 0x1dd5b: 0x6ce36a20, + 0x1dd5c: 0x6c3a6a20, 0x1dd5d: 0x6c749e20, 0x1dd5e: 0x6d41c820, 0x1dd5f: 0x6c384020, + 0x1dd60: 0x6cc7c020, 0x1dd61: 0x6c3b8e20, 0x1dd62: 0x6c7d1620, 0x1dd63: 0x6cd75820, + 0x1dd64: 0x6cc8a220, 0x1dd65: 0x6d0b5e20, 0x1dd66: 0x6d05dc20, 0x1dd67: 0x6c403c20, + 0x1dd68: 0x6c74a020, 0x1dd69: 0x6c298a20, 0x1dd6a: 0x6cf3e420, 0x1dd6b: 0x6c303a20, + 0x1dd6c: 0x6cd82420, 0x1dd6d: 0x6cff1820, 0x1dd6e: 0x6cf8d020, 0x1dd6f: 0x6c8fa020, + 0x1dd70: 0x6cf16420, 0x1dd71: 0x6ccee820, 0x1dd72: 0x6cb64220, 0x1dd73: 0x6c64e420, + 0x1dd74: 0x6d284e20, 0x1dd75: 0x6cdcde20, 0x1dd76: 0x6c8d5a20, 0x1dd77: 0x6d23f220, + 0x1dd78: 0x6cf9ec20, 0x1dd79: 0x6cf27220, 0x1dd7a: 0x6c609820, 0x1dd7b: 0x6c538820, + 0x1dd7c: 0x6cd8ee20, 0x1dd7d: 0x6ca9ca20, 0x1dd7e: 0x6c82da20, 0x1dd7f: 0x6d07ce20, + // Block 0x776, offset 0x1dd80 + 0x1dd80: 0x6d285620, 0x1dd81: 0x6d23cc20, 0x1dd82: 0x6cf7a420, 0x1dd83: 0x6c506e20, + 0x1dd84: 0x6c05d620, 0x1dd85: 0x6c4fae20, 0x1dd86: 0x6c00d220, 0x1dd87: 0x6ceeba20, + 0x1dd88: 0x6c5c3c20, 0x1dd89: 0x6c5c3e20, 0x1dd8a: 0x6c628220, 0x1dd8b: 0x6c226e20, + 0x1dd8c: 0x6cfd8420, 0x1dd8d: 0x6ced9a20, 0x1dd8e: 0x6c9ee820, 0x1dd8f: 0x6d18b420, + 0x1dd90: 0x6c838820, 0x1dd91: 0x6c677e20, 0x1dd92: 0x6c120820, 0x1dd93: 0x6cd01e20, + 0x1dd94: 0x6cbb2620, 0x1dd95: 0x6c885a20, 0x1dd96: 0x6c781c20, 0x1dd97: 0x6d25ae20, + 0x1dd98: 0x6c26c020, 0x1dd99: 0x6ce42220, 0x1dd9a: 0x6ce0d420, 0x1dd9b: 0x6d08e820, + 0x1dd9c: 0x6c0a5c20, 0x1dd9d: 0x6d2d9a20, 0x1dd9e: 0x6cdce020, 0x1dd9f: 0x6cfad820, + 0x1dda0: 0x6c38c420, 0x1dda1: 0x6c2f8220, 0x1dda2: 0x6d021c20, 0x1dda3: 0x6c47d220, + 0x1dda4: 0x6d021e20, 0x1dda5: 0x6cd56e20, 0x1dda6: 0x6c66d420, 0x1dda7: 0x6c4fb020, + 0x1dda8: 0x6c52ca20, 0x1dda9: 0x6cc99820, 0x1ddaa: 0x6d02f220, 0x1ddab: 0x6d09aa20, + 0x1ddac: 0x6d122420, 0x1ddad: 0x6c046a20, 0x1ddae: 0x6cda2c20, 0x1ddaf: 0x6cd57020, + 0x1ddb0: 0x6d09b420, 0x1ddb1: 0x6c336a20, 0x1ddb2: 0x6cb21a20, 0x1ddb3: 0x6cf01820, + 0x1ddb4: 0x6ca92820, 0x1ddb5: 0x6c1df020, 0x1ddb6: 0x6c970420, 0x1ddb7: 0x6cc7d420, + 0x1ddb8: 0x6cb18620, 0x1ddb9: 0x6cdf4c20, 0x1ddba: 0x6c62a020, 0x1ddbb: 0x6d2a5a20, + 0x1ddbc: 0x6c18f020, 0x1ddbd: 0x6d319a20, 0x1ddbe: 0x6c37a820, 0x1ddbf: 0x6ca65420, + // Block 0x777, offset 0x1ddc0 + 0x1ddc0: 0x6d1ca820, 0x1ddc1: 0x6c432620, 0x1ddc2: 0x6c23b820, 0x1ddc3: 0x6cff2420, + 0x1ddc4: 0x6cb66020, 0x1ddc5: 0x6c382820, 0x1ddc6: 0x6c65e420, 0x1ddc7: 0x6d073e20, + 0x1ddc8: 0x6c7ca620, 0x1ddc9: 0x6c60c620, 0x1ddca: 0x6c0b5820, 0x1ddcb: 0x6c2e4620, + 0x1ddcc: 0x6c9d9420, 0x1ddcd: 0x6c7fc420, 0x1ddce: 0x6c6d6420, 0x1ddcf: 0x6c124e20, + 0x1ddd0: 0x6c9ea020, 0x1ddd1: 0x6cbf6e20, 0x1ddd2: 0x6cbcec20, 0x1ddd3: 0x6cfc3420, + 0x1ddd4: 0x6c8a5420, 0x1ddd5: 0x6cab9820, 0x1ddd6: 0x6cfbb620, 0x1ddd7: 0x6cdb4020, + 0x1ddd8: 0x6c936a20, 0x1ddd9: 0x6d18f020, 0x1ddda: 0x6d075220, 0x1dddb: 0x6d014c20, + 0x1dddc: 0x6c847220, 0x1dddd: 0x6d18f220, 0x1ddde: 0x6c7e6620, 0x1dddf: 0x6c82f020, + 0x1dde0: 0x6c69ca20, 0x1dde1: 0x6c2b9a20, 0x1dde2: 0x6d355a20, 0x1dde3: 0x6c06bc20, + 0x1dde4: 0x6ce2c220, 0x1dde5: 0x6d123620, 0x1dde6: 0x6ca17c20, 0x1dde7: 0x6c595e20, + 0x1dde8: 0x6c0c3e20, 0x1dde9: 0x6c386820, 0x1ddea: 0x6cda3220, 0x1ddeb: 0x6ce02e20, + 0x1ddec: 0x6ce99a20, 0x1dded: 0x6cbf8020, 0x1ddee: 0x6cbc0820, 0x1ddef: 0x6cf0f620, + 0x1ddf0: 0x6c8ebc20, 0x1ddf1: 0x6c5c5c20, 0x1ddf2: 0x6cabac20, 0x1ddf3: 0x6c432c20, + 0x1ddf4: 0x6d286220, 0x1ddf5: 0x6c068a20, 0x1ddf6: 0x6c870a20, 0x1ddf7: 0x6cd57e20, + 0x1ddf8: 0x6c1ebe20, 0x1ddf9: 0x6c007e20, 0x1ddfa: 0x6c8c7a20, 0x1ddfb: 0x6d2a6020, + 0x1ddfc: 0x6d07e620, 0x1ddfd: 0x6cbe2820, 0x1ddfe: 0x6c7f7220, 0x1ddff: 0x6c5e3220, + // Block 0x778, offset 0x1de00 + 0x1de00: 0x6cebb620, 0x1de01: 0x6cf54420, 0x1de02: 0x6cc8b820, 0x1de03: 0x6cc8ba20, + 0x1de04: 0x6cb68420, 0x1de05: 0x6c528020, 0x1de06: 0x6c917820, 0x1de07: 0x6cda6420, + 0x1de08: 0x6ce9d020, 0x1de09: 0x6c9b8a20, 0x1de0a: 0x6d287020, 0x1de0b: 0x6cb2dc20, + 0x1de0c: 0x6d22b020, 0x1de0d: 0x6d09c220, 0x1de0e: 0x6c62be20, 0x1de0f: 0x6c6eec20, + 0x1de10: 0x6d07e820, 0x1de11: 0x6ca09020, 0x1de12: 0x6cc0c220, 0x1de13: 0x6cda6620, + 0x1de14: 0x6c6eee20, 0x1de15: 0x6c3d0420, 0x1de16: 0x6ca8a620, 0x1de17: 0x6c0ffe20, + 0x1de18: 0x6cc4ea20, 0x1de19: 0x6d193020, 0x1de1a: 0x6cfc4a20, 0x1de1b: 0x6d21e420, + 0x1de1c: 0x6c718820, 0x1de1d: 0x6c892e20, 0x1de1e: 0x6c88dc20, 0x1de1f: 0x6d1b1e20, + 0x1de20: 0x6cbb2e20, 0x1de21: 0x6d1c2420, 0x1de22: 0x6c8fcc20, 0x1de23: 0x6ce82220, + 0x1de24: 0x6cf05420, 0x1de25: 0x6d270c20, 0x1de26: 0x6c8d9420, 0x1de27: 0x6cc1f020, + 0x1de28: 0x6d117020, 0x1de29: 0x6c38e620, 0x1de2a: 0x6c9a3c20, 0x1de2b: 0x6c4f3020, + 0x1de2c: 0x6c7c5620, 0x1de2d: 0x6c7ff020, 0x1de2e: 0x6c62d220, 0x1de2f: 0x6c29a220, + 0x1de30: 0x6c981820, 0x1de31: 0x6c836220, 0x1de32: 0x6c828820, 0x1de33: 0x6c5b0a20, + 0x1de34: 0x6c3c8220, 0x1de35: 0x6d342820, 0x1de36: 0x6cf10e20, 0x1de37: 0x6c7cb620, + 0x1de38: 0x6d2ea220, 0x1de39: 0x6c580620, 0x1de3a: 0x6c84ac20, 0x1de3b: 0x6c62e220, + 0x1de3c: 0x6c9cb620, 0x1de3d: 0x6c830a20, 0x1de3e: 0x6c582220, 0x1de3f: 0x6c957a20, + // Block 0x779, offset 0x1de40 + 0x1de40: 0x6c5fa020, 0x1de41: 0x6c7cbe20, 0x1de42: 0x6c934020, 0x1de43: 0x6c655020, + 0x1de44: 0x6cc9ba20, 0x1de45: 0x6ce2e620, 0x1de46: 0x6c829e20, 0x1de47: 0x6cc36820, + 0x1de48: 0x6cff6020, 0x1de49: 0x6d197420, 0x1de4a: 0x6c947220, 0x1de4b: 0x6c9ae620, + 0x1de4c: 0x6c0cd420, 0x1de4d: 0x6c549420, 0x1de4e: 0x6c561220, 0x1de4f: 0x6c91b820, + 0x1de50: 0x6caaa220, 0x1de51: 0x6c93d420, 0x1de52: 0x6cd7da20, 0x1de53: 0x6cfeaa20, + 0x1de54: 0x6cb98220, 0x1de55: 0x6c1f3620, 0x1de56: 0x6c54c620, 0x1de57: 0x6d058a20, + 0x1de58: 0x6c25d820, 0x1de59: 0x6c3e6e20, 0x1de5a: 0x6d058c20, 0x1de5b: 0x6d05a820, + 0x1de5c: 0x6c91c420, 0x1de5d: 0x6c562420, 0x1de5e: 0x6d216620, 0x1de5f: 0x6c504a20, + 0x1de60: 0x6c686020, 0x1de61: 0x6c725820, 0x1de62: 0x6c4c8620, 0x1de63: 0x6c066820, + 0x1de64: 0x6d0cd220, 0x1de65: 0x6d2e8220, 0x1de66: 0x6d2e8420, 0x1de67: 0x6c7c4820, + 0x1de68: 0x6c0d5620, 0x1de69: 0x6cf90620, 0x1de6a: 0x6cd63220, 0x1de6b: 0x6c1d0820, + 0x1de6c: 0x6cc00220, 0x1de6d: 0x6c2db220, 0x1de6e: 0x6c612620, 0x1de6f: 0x6cc00c20, + 0x1de70: 0x6c2f5820, 0x1de71: 0x6cd19a20, 0x1de72: 0x6cf95020, 0x1de73: 0x6c740820, + 0x1de74: 0x6d302a20, 0x1de75: 0x6ccf0a20, 0x1de76: 0x6d208020, 0x1de77: 0x6c4dea20, + 0x1de78: 0x6d3efe20, 0x1de79: 0x6c532220, 0x1de7a: 0x6c5a9a20, 0x1de7b: 0x6c9b0c20, + 0x1de7c: 0x6c447e20, 0x1de7d: 0x6cdbb020, 0x1de7e: 0x6cf95a20, 0x1de7f: 0x6c149420, + // Block 0x77a, offset 0x1de80 + 0x1de80: 0x6cd25620, 0x1de81: 0x6d15d620, 0x1de82: 0x6c969620, 0x1de83: 0x6cfe2020, + 0x1de84: 0x6c399420, 0x1de85: 0x6c360220, 0x1de86: 0x6c034020, 0x1de87: 0x6c1b9620, + 0x1de88: 0x6cb8ca20, 0x1de89: 0x6cf18e20, 0x1de8a: 0x6cf19020, 0x1de8b: 0x6cc8c620, + 0x1de8c: 0x6c056620, 0x1de8d: 0x6cafd220, 0x1de8e: 0x6d269a20, 0x1de8f: 0x6d269c20, + 0x1de90: 0x6c756a20, 0x1de91: 0x6cb5ae20, 0x1de92: 0x6ce73c20, 0x1de93: 0x6d1ad620, + 0x1de94: 0x6cb5b020, 0x1de95: 0x6c119020, 0x1de96: 0x6d255420, 0x1de97: 0x6c741a20, + 0x1de98: 0x6c5b3020, 0x1de99: 0x6cbd6c20, 0x1de9a: 0x6cb5b220, 0x1de9b: 0x6d382220, + 0x1de9c: 0x6d0b2220, 0x1de9d: 0x6c4fc220, 0x1de9e: 0x6ca27e20, 0x1de9f: 0x6cede420, + 0x1dea0: 0x6c3b6820, 0x1dea1: 0x6c3b6a20, 0x1dea2: 0x6c4f6e20, 0x1dea3: 0x6c462e20, + 0x1dea4: 0x6d2a4620, 0x1dea5: 0x6c3fd420, 0x1dea6: 0x6cc47020, 0x1dea7: 0x6c6bda20, + 0x1dea8: 0x6c3e4220, 0x1dea9: 0x6c1aa420, 0x1deaa: 0x6c30ea20, 0x1deab: 0x6c064820, + 0x1deac: 0x6cfc0620, 0x1dead: 0x6ca5de20, 0x1deae: 0x6ce27820, 0x1deaf: 0x6cbfac20, + 0x1deb0: 0x6d1f2c20, 0x1deb1: 0x6d2cc220, 0x1deb2: 0x6cb2a220, 0x1deb3: 0x6c1b1e20, + 0x1deb4: 0x6d204220, 0x1deb5: 0x6c511e20, 0x1deb6: 0x6c4da020, 0x1deb7: 0x6c723420, + 0x1deb8: 0x6c85fe20, 0x1deb9: 0x6c3fe620, 0x1deba: 0x6cc47620, 0x1debb: 0x6d2c2a20, + 0x1debc: 0x6c468220, 0x1debd: 0x6cafe220, 0x1debe: 0x6cafe420, 0x1debf: 0x6cfb5220, + // Block 0x77b, offset 0x1dec0 + 0x1dec0: 0x6d3af020, 0x1dec1: 0x6c2dc820, 0x1dec2: 0x6c0ce820, 0x1dec3: 0x6c0de220, + 0x1dec4: 0x6c470e20, 0x1dec5: 0x6d2d7020, 0x1dec6: 0x6cc10620, 0x1dec7: 0x6ccf1220, + 0x1dec8: 0x6ce5fa20, 0x1dec9: 0x6c8d0020, 0x1deca: 0x6c478420, 0x1decb: 0x6c288420, + 0x1decc: 0x6c478620, 0x1decd: 0x6d1c6a20, 0x1dece: 0x6c860020, 0x1decf: 0x6c196a20, + 0x1ded0: 0x6cc11220, 0x1ded1: 0x6ca1d620, 0x1ded2: 0x6c43f620, 0x1ded3: 0x6c22ca20, + 0x1ded4: 0x6c5b3820, 0x1ded5: 0x6c5b3a20, 0x1ded6: 0x6c986a20, 0x1ded7: 0x6c3ffc20, + 0x1ded8: 0x6d0fbc20, 0x1ded9: 0x6cebde20, 0x1deda: 0x6c8b0e20, 0x1dedb: 0x6d39ac20, + 0x1dedc: 0x6d13f820, 0x1dedd: 0x6cfb6220, 0x1dede: 0x6c7e0020, 0x1dedf: 0x6c684e20, + 0x1dee0: 0x6c861a20, 0x1dee1: 0x6d17be20, 0x1dee2: 0x6cb2b020, 0x1dee3: 0x6cb4fc20, + 0x1dee4: 0x6c4cfe20, 0x1dee5: 0x6ccf1a20, 0x1dee6: 0x6d14fc20, 0x1dee7: 0x6cee2420, + 0x1dee8: 0x6ca11c20, 0x1dee9: 0x6cbf3220, 0x1deea: 0x6cbcc420, 0x1deeb: 0x6c4b0420, + 0x1deec: 0x6cbf3420, 0x1deed: 0x6d364020, 0x1deee: 0x6c976420, 0x1deef: 0x6c81f820, + 0x1def0: 0x6d305c20, 0x1def1: 0x6c63c220, 0x1def2: 0x6ca4ae20, 0x1def3: 0x6cd7ee20, + 0x1def4: 0x6cb5f020, 0x1def5: 0x6d038420, 0x1def6: 0x6c6bee20, 0x1def7: 0x6cc07c20, + 0x1def8: 0x6cce7a20, 0x1def9: 0x6d1e4c20, 0x1defa: 0x6c63ce20, 0x1defb: 0x6cea0220, + 0x1defc: 0x6c17de20, 0x1defd: 0x6c044e20, 0x1defe: 0x6c357620, 0x1deff: 0x6c4ed420, + // Block 0x77c, offset 0x1df00 + 0x1df00: 0x6cd56420, 0x1df01: 0x6d081620, 0x1df02: 0x6c3c5820, 0x1df03: 0x6cd0b820, + 0x1df04: 0x6cd0ba20, 0x1df05: 0x6c3f7020, 0x1df06: 0x6cfce020, 0x1df07: 0x6d2ffe20, + 0x1df08: 0x6cf3da20, 0x1df09: 0x6c3ea820, 0x1df0a: 0x6c83f820, 0x1df0b: 0x6c80d420, + 0x1df0c: 0x6c09de20, 0x1df0d: 0x6c1e9220, 0x1df0e: 0x6d24fc20, 0x1df0f: 0x6d1fd820, + 0x1df10: 0x6c6af820, 0x1df11: 0x6c288e20, 0x1df12: 0x6d0ca220, 0x1df13: 0x6ce67a20, + 0x1df14: 0x6c2d6820, 0x1df15: 0x6cea0420, 0x1df16: 0x6c5b3c20, 0x1df17: 0x6cf29820, + 0x1df18: 0x6d340420, 0x1df19: 0x6cd92c20, 0x1df1a: 0x6c3a1420, 0x1df1b: 0x6c70b620, + 0x1df1c: 0x6c9d7020, 0x1df1d: 0x6cb62c20, 0x1df1e: 0x6cb62e20, 0x1df1f: 0x6d23a820, + 0x1df20: 0x6c75da20, 0x1df21: 0x6c7e8a20, 0x1df22: 0x6c9be220, 0x1df23: 0x6cbac420, + 0x1df24: 0x6cd80820, 0x1df25: 0x6cf68020, 0x1df26: 0x6c950820, 0x1df27: 0x6c865420, + 0x1df28: 0x6c2ed620, 0x1df29: 0x6ce59a20, 0x1df2a: 0x6ce23220, 0x1df2b: 0x6c7d7a20, + 0x1df2c: 0x6c4e2620, 0x1df2d: 0x6c4eec20, 0x1df2e: 0x6d23aa20, 0x1df2f: 0x6c058420, + 0x1df30: 0x6c3a4020, 0x1df31: 0x6cb00c20, 0x1df32: 0x6ceea820, 0x1df33: 0x6c339e20, + 0x1df34: 0x6d183820, 0x1df35: 0x6d250c20, 0x1df36: 0x6cddd020, 0x1df37: 0x6cc30c20, + 0x1df38: 0x6cba1a20, 0x1df39: 0x6cc8d820, 0x1df3a: 0x6ca5fc20, 0x1df3b: 0x6cbe5220, + 0x1df3c: 0x6cf0b420, 0x1df3d: 0x6c899e20, 0x1df3e: 0x6c4cc820, 0x1df3f: 0x6cec9620, + // Block 0x77d, offset 0x1df40 + 0x1df40: 0x6c301020, 0x1df41: 0x6c367220, 0x1df42: 0x6c04d020, 0x1df43: 0x6c2c8620, + 0x1df44: 0x6cee3420, 0x1df45: 0x6c11a020, 0x1df46: 0x6d102820, 0x1df47: 0x6d1d6820, + 0x1df48: 0x6c4c3220, 0x1df49: 0x6c150e20, 0x1df4a: 0x6c2fb420, 0x1df4b: 0x6c7e8c20, + 0x1df4c: 0x6c782c20, 0x1df4d: 0x6c6afa20, 0x1df4e: 0x6d005020, 0x1df4f: 0x6ce68e20, + 0x1df50: 0x6c99b220, 0x1df51: 0x6d05de20, 0x1df52: 0x6c9dd020, 0x1df53: 0x6d219020, + 0x1df54: 0x6c6a3220, 0x1df55: 0x6cd28020, 0x1df56: 0x6d07c820, 0x1df57: 0x6c59f620, + 0x1df58: 0x6d0dce20, 0x1df59: 0x6c0b0420, 0x1df5a: 0x6cc75e20, 0x1df5b: 0x6ceeb220, + 0x1df5c: 0x6c403e20, 0x1df5d: 0x6d25a020, 0x1df5e: 0x6c9aaa20, 0x1df5f: 0x6cf14620, + 0x1df60: 0x6c3ee220, 0x1df61: 0x6cc7c220, 0x1df62: 0x6d00e220, 0x1df63: 0x6d1f6a20, + 0x1df64: 0x6cc09020, 0x1df65: 0x6c990020, 0x1df66: 0x6cf97820, 0x1df67: 0x6d1be020, + 0x1df68: 0x6cd1f020, 0x1df69: 0x6c1d2020, 0x1df6a: 0x6ce0ce20, 0x1df6b: 0x6d39be20, + 0x1df6c: 0x6d3fba20, 0x1df6d: 0x6ce36c20, 0x1df6e: 0x6c404020, 0x1df6f: 0x6d25a220, + 0x1df70: 0x6c7c9820, 0x1df71: 0x6c9b3e20, 0x1df72: 0x6c7e9620, 0x1df73: 0x6c31b220, + 0x1df74: 0x6c559620, 0x1df75: 0x6cbfc220, 0x1df76: 0x6c2ee020, 0x1df77: 0x6c866420, + 0x1df78: 0x6cf29c20, 0x1df79: 0x6d276220, 0x1df7a: 0x6cc24e20, 0x1df7b: 0x6ca43a20, + 0x1df7c: 0x6c90b620, 0x1df7d: 0x6c211220, 0x1df7e: 0x6cc6a820, 0x1df7f: 0x6d1c9220, + // Block 0x77e, offset 0x1df80 + 0x1df80: 0x6c677620, 0x1df81: 0x6c051420, 0x1df82: 0x6c80d820, 0x1df83: 0x6cad0e20, + 0x1df84: 0x6cd82c20, 0x1df85: 0x6cf6da20, 0x1df86: 0x6c22de20, 0x1df87: 0x6cf6dc20, + 0x1df88: 0x6d25b020, 0x1df89: 0x6cf23c20, 0x1df8a: 0x6c885c20, 0x1df8b: 0x6cd9dc20, + 0x1df8c: 0x6c04a020, 0x1df8d: 0x6cc6b220, 0x1df8e: 0x6cc6b420, 0x1df8f: 0x6c60b220, + 0x1df90: 0x6cf38220, 0x1df91: 0x6d055020, 0x1df92: 0x6c4f0e20, 0x1df93: 0x6cbdac20, + 0x1df94: 0x6d156020, 0x1df95: 0x6c089020, 0x1df96: 0x6c575420, 0x1df97: 0x6ce13c20, + 0x1df98: 0x6d161420, 0x1df99: 0x6c327c20, 0x1df9a: 0x6ca3d620, 0x1df9b: 0x6c517820, + 0x1df9c: 0x6c55c020, 0x1df9d: 0x6c4a8a20, 0x1df9e: 0x6c96a420, 0x1df9f: 0x6ca01a20, + 0x1dfa0: 0x6d18b620, 0x1dfa1: 0x6cf1b020, 0x1dfa2: 0x6d1ca020, 0x1dfa3: 0x6ce28420, + 0x1dfa4: 0x6d37ca20, 0x1dfa5: 0x6c123c20, 0x1dfa6: 0x6ccb1020, 0x1dfa7: 0x6cb81a20, + 0x1dfa8: 0x6c97c820, 0x1dfa9: 0x6ce5e620, 0x1dfaa: 0x6cce2020, 0x1dfab: 0x6cd3e620, + 0x1dfac: 0x6c129e20, 0x1dfad: 0x6c1ad620, 0x1dfae: 0x6c2ca620, 0x1dfaf: 0x6c027620, + 0x1dfb0: 0x6c92fa20, 0x1dfb1: 0x6cf0e820, 0x1dfb2: 0x6d371220, 0x1dfb3: 0x6ce14220, + 0x1dfb4: 0x6c18ea20, 0x1dfb5: 0x6cb16a20, 0x1dfb6: 0x6cc1c420, 0x1dfb7: 0x6cb02420, + 0x1dfb8: 0x6d21be20, 0x1dfb9: 0x6c66e420, 0x1dfba: 0x6c955820, 0x1dfbb: 0x6c90c220, + 0x1dfbc: 0x6cbdea20, 0x1dfbd: 0x6d37ce20, 0x1dfbe: 0x6d1b1420, 0x1dfbf: 0x6c678820, + // Block 0x77f, offset 0x1dfc0 + 0x1dfc0: 0x6cd67620, 0x1dfc1: 0x6cf1b820, 0x1dfc2: 0x6cff2620, 0x1dfc3: 0x6ceda020, + 0x1dfc4: 0x6d30a220, 0x1dfc5: 0x6d310820, 0x1dfc6: 0x6c96f820, 0x1dfc7: 0x6c967a20, + 0x1dfc8: 0x6c4c4820, 0x1dfc9: 0x6c8eaa20, 0x1dfca: 0x6c990a20, 0x1dfcb: 0x6cf6f220, + 0x1dfcc: 0x6c236a20, 0x1dfcd: 0x6c846220, 0x1dfce: 0x6c97d020, 0x1dfcf: 0x6cff2820, + 0x1dfd0: 0x6c173020, 0x1dfd1: 0x6d2ee220, 0x1dfd2: 0x6c98a020, 0x1dfd3: 0x6cfe5e20, + 0x1dfd4: 0x6ca17e20, 0x1dfd5: 0x6d418220, 0x1dfd6: 0x6cd83c20, 0x1dfd7: 0x6cbfd420, + 0x1dfd8: 0x6ce28820, 0x1dfd9: 0x6d34ac20, 0x1dfda: 0x6caed820, 0x1dfdb: 0x6caeda20, + 0x1dfdc: 0x6c695620, 0x1dfdd: 0x6cc1dc20, 0x1dfde: 0x6c0cc220, 0x1dfdf: 0x6c8a3c20, + 0x1dfe0: 0x6cac8220, 0x1dfe1: 0x6c4b2220, 0x1dfe2: 0x6cf81c20, 0x1dfe3: 0x6c615a20, + 0x1dfe4: 0x6d3b9620, 0x1dfe5: 0x6c5a0e20, 0x1dfe6: 0x6c3a4220, 0x1dfe7: 0x6c818420, + 0x1dfe8: 0x6c74de20, 0x1dfe9: 0x6c74e020, 0x1dfea: 0x6c5c7220, 0x1dfeb: 0x6d1aa220, + 0x1dfec: 0x6c153a20, 0x1dfed: 0x6c689c20, 0x1dfee: 0x6ccdcc20, 0x1dfef: 0x6ca4ca20, + 0x1dff0: 0x6cff3e20, 0x1dff1: 0x6cf40020, 0x1dff2: 0x6c1d2620, 0x1dff3: 0x6d0a5020, + 0x1dff4: 0x6cd83e20, 0x1dff5: 0x6c1f9c20, 0x1dff6: 0x6c19a020, 0x1dff7: 0x6c291e20, + 0x1dff8: 0x6c854420, 0x1dff9: 0x6d026620, 0x1dffa: 0x6ccdd420, 0x1dffb: 0x6d162420, + 0x1dffc: 0x6c6e3a20, 0x1dffd: 0x6c26c820, 0x1dffe: 0x6c154420, 0x1dfff: 0x6cb80020, + // Block 0x780, offset 0x1e000 + 0x1e000: 0x6c221820, 0x1e001: 0x6cfe0220, 0x1e002: 0x6ccf7e20, 0x1e003: 0x6c95c820, + 0x1e004: 0x6cbdb620, 0x1e005: 0x6d1d6e20, 0x1e006: 0x6c14a220, 0x1e007: 0x6c86da20, + 0x1e008: 0x6d2b6a20, 0x1e009: 0x6d07ea20, 0x1e00a: 0x6c888820, 0x1e00b: 0x6d3a3220, + 0x1e00c: 0x6d2b1e20, 0x1e00d: 0x6d005a20, 0x1e00e: 0x6c98a420, 0x1e00f: 0x6d026820, + 0x1e010: 0x6cb69a20, 0x1e011: 0x6cc6e220, 0x1e012: 0x6c661a20, 0x1e013: 0x6c9bf220, + 0x1e014: 0x6c500220, 0x1e015: 0x6cc7e420, 0x1e016: 0x6c5e3420, 0x1e017: 0x6d3dda20, + 0x1e018: 0x6c6b7820, 0x1e019: 0x6cb22420, 0x1e01a: 0x6c50aa20, 0x1e01b: 0x6c9f0e20, + 0x1e01c: 0x6c38ee20, 0x1e01d: 0x6c828a20, 0x1e01e: 0x6c6b7220, 0x1e01f: 0x6c7ec420, + 0x1e020: 0x6c9fda20, 0x1e021: 0x6c84ae20, 0x1e022: 0x6c219020, 0x1e023: 0x6c873220, + 0x1e024: 0x6cbfe620, 0x1e025: 0x6ca8bc20, 0x1e026: 0x6c919c20, 0x1e027: 0x6c328c20, + 0x1e028: 0x6cff5620, 0x1e029: 0x6d39ee20, 0x1e02a: 0x6c8ffc20, 0x1e02b: 0x6c875620, + 0x1e02c: 0x6c8ffe20, 0x1e02d: 0x6c3c8620, 0x1e02e: 0x6d127220, 0x1e02f: 0x6c086620, + 0x1e030: 0x6ca46020, 0x1e031: 0x6c47f220, 0x1e032: 0x6c730e20, 0x1e033: 0x6d1c4220, + 0x1e034: 0x6cd63820, 0x1e035: 0x6cf75820, 0x1e036: 0x6c11c820, 0x1e037: 0x6cc22420, + 0x1e038: 0x6cc33c20, 0x1e039: 0x6c329020, 0x1e03a: 0x6c11ca20, 0x1e03b: 0x6c97ae20, + 0x1e03c: 0x6cc22e20, 0x1e03d: 0x6c6b8e20, 0x1e03e: 0x6d3a4e20, 0x1e03f: 0x6d3d1820, + // Block 0x781, offset 0x1e040 + 0x1e040: 0x6d093820, 0x1e041: 0x6c598620, 0x1e042: 0x6ca9a420, 0x1e043: 0x6cadba20, + 0x1e044: 0x6caa8420, 0x1e045: 0x6d033020, 0x1e046: 0x6d383220, 0x1e047: 0x6c973420, + 0x1e048: 0x6c37ce20, 0x1e049: 0x6c761220, 0x1e04a: 0x6c9f1020, 0x1e04b: 0x6cf93c20, + 0x1e04c: 0x6d03ba20, 0x1e04d: 0x6d0d5c20, 0x1e04e: 0x6c770620, 0x1e04f: 0x6d260e20, + 0x1e050: 0x6cc28820, 0x1e051: 0x6c8d0220, 0x1e052: 0x6d089020, 0x1e053: 0x6cd5ca20, + 0x1e054: 0x6cfb5420, 0x1e055: 0x6ce7cc20, 0x1e056: 0x6cfe3820, 0x1e057: 0x6c6a1e20, + 0x1e058: 0x6cfb7020, 0x1e059: 0x6d0b3220, 0x1e05a: 0x6c559a20, 0x1e05b: 0x6cf0ca20, + 0x1e05c: 0x6c2a2c20, 0x1e05d: 0x6c1cdc20, 0x1e05e: 0x6cf0d420, 0x1e05f: 0x6c2a3620, + 0x1e060: 0x6d3cd820, 0x1e061: 0x6c527020, 0x1e062: 0x6cc22620, 0x1e063: 0x6d13be20, + 0x1e064: 0x6d198c20, 0x1e065: 0x6c103220, 0x1e066: 0x6c41ce20, 0x1e067: 0x6d20cc20, + 0x1e068: 0x6c0c7020, 0x1e069: 0x6c141820, 0x1e06a: 0x6d147a20, 0x1e06b: 0x6cccc820, + 0x1e06c: 0x6c191e20, 0x1e06d: 0x6c3d5620, 0x1e06e: 0x6c4bbc20, 0x1e06f: 0x6c3b1e20, + 0x1e070: 0x6cd65220, 0x1e071: 0x6c6a8820, 0x1e072: 0x6ca32020, 0x1e073: 0x6d37aa20, + 0x1e074: 0x6c282e20, 0x1e075: 0x6d170c20, 0x1e076: 0x6d381e20, 0x1e077: 0x6d37b220, + 0x1e078: 0x6c6bd220, 0x1e079: 0x6d350820, 0x1e07a: 0x6d009820, 0x1e07b: 0x6cc46820, + 0x1e07c: 0x6d33ba20, 0x1e07d: 0x6cc5da20, 0x1e07e: 0x6cbd2620, 0x1e07f: 0x6c6c3820, + // Block 0x782, offset 0x1e080 + 0x1e080: 0x6c756220, 0x1e081: 0x6d255820, 0x1e082: 0x6c9a8620, 0x1e083: 0x6c149620, + 0x1e084: 0x6c02a220, 0x1e085: 0x6ca79820, 0x1e086: 0x6c5a9e20, 0x1e087: 0x6cc46a20, + 0x1e088: 0x6c635620, 0x1e089: 0x6ceb1020, 0x1e08a: 0x6c8e0e20, 0x1e08b: 0x6c276620, + 0x1e08c: 0x6c064a20, 0x1e08d: 0x6cad5620, 0x1e08e: 0x6d120020, 0x1e08f: 0x6d429420, + 0x1e090: 0x6c097020, 0x1e091: 0x6cced220, 0x1e092: 0x6ce05820, 0x1e093: 0x6c723620, + 0x1e094: 0x6c51c220, 0x1e095: 0x6d090220, 0x1e096: 0x6d053820, 0x1e097: 0x6d31d220, + 0x1e098: 0x6d14da20, 0x1e099: 0x6cabea20, 0x1e09a: 0x6c0e6420, 0x1e09b: 0x6c2b2220, + 0x1e09c: 0x6cec2a20, 0x1e09d: 0x6c3fd620, 0x1e09e: 0x6c4bc420, 0x1e09f: 0x6d35ca20, + 0x1e0a0: 0x6d360a20, 0x1e0a1: 0x6cc47220, 0x1e0a2: 0x6cacb420, 0x1e0a3: 0x6d174620, + 0x1e0a4: 0x6c997420, 0x1e0a5: 0x6ceaba20, 0x1e0a6: 0x6ca32e20, 0x1e0a7: 0x6c464420, + 0x1e0a8: 0x6d088220, 0x1e0a9: 0x6d304220, 0x1e0aa: 0x6cc0f420, 0x1e0ab: 0x6c070420, + 0x1e0ac: 0x6c4bc620, 0x1e0ad: 0x6cf77c20, 0x1e0ae: 0x6ca6ea20, 0x1e0af: 0x6c0ee020, + 0x1e0b0: 0x6c0e7220, 0x1e0b1: 0x6c40ac20, 0x1e0b2: 0x6c1bac20, 0x1e0b3: 0x6c1ba220, + 0x1e0b4: 0x6c7a9420, 0x1e0b5: 0x6cc5ea20, 0x1e0b6: 0x6c67e220, 0x1e0b7: 0x6c63ba20, + 0x1e0b8: 0x6c667e20, 0x1e0b9: 0x6c0efa20, 0x1e0ba: 0x6c6aba20, 0x1e0bb: 0x6c375420, + 0x1e0bc: 0x6c438620, 0x1e0bd: 0x6cc7a620, 0x1e0be: 0x6d39a020, 0x1e0bf: 0x6c4a6020, + // Block 0x783, offset 0x1e0c0 + 0x1e0c0: 0x6d19d020, 0x1e0c1: 0x6c111020, 0x1e0c2: 0x6c8b1020, 0x1e0c3: 0x6c762220, + 0x1e0c4: 0x6d044420, 0x1e0c5: 0x6d3c1c20, 0x1e0c6: 0x6c28fc20, 0x1e0c7: 0x6d05aa20, + 0x1e0c8: 0x6c7d5e20, 0x1e0c9: 0x6c791a20, 0x1e0ca: 0x6ca79e20, 0x1e0cb: 0x6cd5dc20, + 0x1e0cc: 0x6c63c420, 0x1e0cd: 0x6c7db020, 0x1e0ce: 0x6c1a1220, 0x1e0cf: 0x6c852220, + 0x1e0d0: 0x6c72f620, 0x1e0d1: 0x6ccff420, 0x1e0d2: 0x6cb3da20, 0x1e0d3: 0x6c43fa20, + 0x1e0d4: 0x6d180820, 0x1e0d5: 0x6d235620, 0x1e0d6: 0x6d31da20, 0x1e0d7: 0x6c8e6020, + 0x1e0d8: 0x6cc07e20, 0x1e0d9: 0x6cc44820, 0x1e0da: 0x6c622620, 0x1e0db: 0x6d180a20, + 0x1e0dc: 0x6c103e20, 0x1e0dd: 0x6d3c1e20, 0x1e0de: 0x6cd72420, 0x1e0df: 0x6ccc0420, + 0x1e0e0: 0x6cc44e20, 0x1e0e1: 0x6c87e220, 0x1e0e2: 0x6c880620, 0x1e0e3: 0x6c88c020, + 0x1e0e4: 0x6c7a9e20, 0x1e0e5: 0x6c659e20, 0x1e0e6: 0x6c3d1820, 0x1e0e7: 0x6c14d020, + 0x1e0e8: 0x6c09e020, 0x1e0e9: 0x6c7d7020, 0x1e0ea: 0x6ce22e20, 0x1e0eb: 0x6d262a20, + 0x1e0ec: 0x6c8d2220, 0x1e0ed: 0x6c1bb420, 0x1e0ee: 0x6c167420, 0x1e0ef: 0x6c1dc420, + 0x1e0f0: 0x6c343220, 0x1e0f1: 0x6c0c7420, 0x1e0f2: 0x6c899620, 0x1e0f3: 0x6cce5c20, + 0x1e0f4: 0x6cade020, 0x1e0f5: 0x6cade220, 0x1e0f6: 0x6c3a0e20, 0x1e0f7: 0x6d24fe20, + 0x1e0f8: 0x6c95b820, 0x1e0f9: 0x6c4cca20, 0x1e0fa: 0x6d0daa20, 0x1e0fb: 0x6c31aa20, + 0x1e0fc: 0x6ce40420, 0x1e0fd: 0x6d369a20, 0x1e0fe: 0x6c70ae20, 0x1e0ff: 0x6d15fa20, + // Block 0x784, offset 0x1e100 + 0x1e100: 0x6c622820, 0x1e101: 0x6d346c20, 0x1e102: 0x6c48ba20, 0x1e103: 0x6c791c20, + 0x1e104: 0x6cb81620, 0x1e105: 0x6ce40a20, 0x1e106: 0x6ce35820, 0x1e107: 0x6c402420, + 0x1e108: 0x6c1d1a20, 0x1e109: 0x6d01f020, 0x1e10a: 0x6c0b4820, 0x1e10b: 0x6c2ed820, + 0x1e10c: 0x6c7d7c20, 0x1e10d: 0x6c32a020, 0x1e10e: 0x6d054a20, 0x1e10f: 0x6d054c20, + 0x1e110: 0x6c51d620, 0x1e111: 0x6d262c20, 0x1e112: 0x6c05ba20, 0x1e113: 0x6c060620, + 0x1e114: 0x6c402620, 0x1e115: 0x6d217c20, 0x1e116: 0x6ce98c20, 0x1e117: 0x6d0dc420, + 0x1e118: 0x6c5adc20, 0x1e119: 0x6c074420, 0x1e11a: 0x6c1ee220, 0x1e11b: 0x6c93aa20, + 0x1e11c: 0x6cadaa20, 0x1e11d: 0x6c27ee20, 0x1e11e: 0x6d27f420, 0x1e11f: 0x6cddf820, + 0x1e120: 0x6c465c20, 0x1e121: 0x6c265c20, 0x1e122: 0x6c57ee20, 0x1e123: 0x6cc6aa20, + 0x1e124: 0x6d262e20, 0x1e125: 0x6cc82620, 0x1e126: 0x6ca3d420, 0x1e127: 0x6c6f3220, + 0x1e128: 0x6cdd8620, 0x1e129: 0x6c04a220, 0x1e12a: 0x6cea0a20, 0x1e12b: 0x6c1bbe20, + 0x1e12c: 0x6cca8a20, 0x1e12d: 0x6ca7ae20, 0x1e12e: 0x6d1bec20, 0x1e12f: 0x6c6bfa20, + 0x1e130: 0x6cb91e20, 0x1e131: 0x6c57f420, 0x1e132: 0x6c7aa820, 0x1e133: 0x6c884220, + 0x1e134: 0x6c7fae20, 0x1e135: 0x6c843420, 0x1e136: 0x6d30de20, 0x1e137: 0x6cd1fc20, + 0x1e138: 0x6c93b620, 0x1e139: 0x6d18b820, 0x1e13a: 0x6c2e5e20, 0x1e13b: 0x6d023220, + 0x1e13c: 0x6cfae020, 0x1e13d: 0x6cf0ea20, 0x1e13e: 0x6c0c7e20, 0x1e13f: 0x6c129620, + // Block 0x785, offset 0x1e140 + 0x1e140: 0x6c5f4620, 0x1e141: 0x6cbb4c20, 0x1e142: 0x6ccbb020, 0x1e143: 0x6c05bc20, + 0x1e144: 0x6cfd8c20, 0x1e145: 0x6c0ae420, 0x1e146: 0x6c3f0c20, 0x1e147: 0x6c65e620, + 0x1e148: 0x6d3bea20, 0x1e149: 0x6c65e820, 0x1e14a: 0x6c257020, 0x1e14b: 0x6c60c820, + 0x1e14c: 0x6c280620, 0x1e14d: 0x6d28d020, 0x1e14e: 0x6c38cc20, 0x1e14f: 0x6c0f7e20, + 0x1e150: 0x6cfe5a20, 0x1e151: 0x6d030420, 0x1e152: 0x6c0cf820, 0x1e153: 0x6cc52e20, + 0x1e154: 0x6c97ca20, 0x1e155: 0x6c7fc620, 0x1e156: 0x6c02b220, 0x1e157: 0x6d2b1620, + 0x1e158: 0x6c4b8e20, 0x1e159: 0x6c12bc20, 0x1e15a: 0x6cdc9220, 0x1e15b: 0x6ca9d620, + 0x1e15c: 0x6c14dc20, 0x1e15d: 0x6c88d220, 0x1e15e: 0x6c0aac20, 0x1e15f: 0x6c6c6a20, + 0x1e160: 0x6c291620, 0x1e161: 0x6cd58220, 0x1e162: 0x6ce08020, 0x1e163: 0x6c0aae20, + 0x1e164: 0x6c7fd820, 0x1e165: 0x6cb46e20, 0x1e166: 0x6cc7e020, 0x1e167: 0x6d355e20, + 0x1e168: 0x6c32ec20, 0x1e169: 0x6cd58620, 0x1e16a: 0x6cec4220, 0x1e16b: 0x6cd40020, + 0x1e16c: 0x6c042c20, 0x1e16d: 0x6d012020, 0x1e16e: 0x6c0fbe20, 0x1e16f: 0x6c194220, + 0x1e170: 0x6c7f7c20, 0x1e171: 0x6c8fee20, 0x1e172: 0x6cf7c420, 0x1e173: 0x6cfb0c20, + 0x1e174: 0x6c800220, 0x1e175: 0x6d30e220, 0x1e176: 0x6c27aa20, 0x1e177: 0x6c72d820, + 0x1e178: 0x6d29c620, 0x1e179: 0x6cd21c20, 0x1e17a: 0x6c663820, 0x1e17b: 0x6cacc620, + 0x1e17c: 0x6d196820, 0x1e17d: 0x6c809c20, 0x1e17e: 0x6d0b7020, 0x1e17f: 0x6cf94020, + // Block 0x786, offset 0x1e180 + 0x1e180: 0x6cf57420, 0x1e181: 0x6d11f820, 0x1e182: 0x6c3cc820, 0x1e183: 0x6cdfe620, + 0x1e184: 0x6c40b420, 0x1e185: 0x6c3d0620, 0x1e186: 0x6c407e20, 0x1e187: 0x6c03c820, + 0x1e188: 0x6c519620, 0x1e189: 0x6c5fa420, 0x1e18a: 0x6c5fb420, 0x1e18b: 0x6c665220, + 0x1e18c: 0x6c490820, 0x1e18d: 0x6c0b9020, 0x1e18e: 0x6d0e5620, 0x1e18f: 0x6c4a6220, + 0x1e190: 0x6c743020, 0x1e191: 0x6cb13a20, 0x1e192: 0x6c997620, 0x1e193: 0x6c9d4020, + 0x1e194: 0x6c9d4220, 0x1e195: 0x6c9ed620, 0x1e196: 0x6cd36c20, 0x1e197: 0x6cd8c420, + 0x1e198: 0x6c14cc20, 0x1e199: 0x6c954a20, 0x1e19a: 0x6c745a20, 0x1e19b: 0x6c9d6020, + 0x1e19c: 0x6ce5da20, 0x1e19d: 0x6c882620, 0x1e19e: 0x6d121820, 0x1e19f: 0x6d369c20, + 0x1e1a0: 0x6c757a20, 0x1e1a1: 0x6cf79620, 0x1e1a2: 0x6ccd5a20, 0x1e1a3: 0x6ceeb620, + 0x1e1a4: 0x6cf8d220, 0x1e1a5: 0x6ce51220, 0x1e1a6: 0x6d21a620, 0x1e1a7: 0x6c803e20, + 0x1e1a8: 0x6c36aa20, 0x1e1a9: 0x6c322a20, 0x1e1aa: 0x6cbd3e20, 0x1e1ab: 0x6cad2220, + 0x1e1ac: 0x6c62a220, 0x1e1ad: 0x6ca01e20, 0x1e1ae: 0x6d1caa20, 0x1e1af: 0x6c46dc20, + 0x1e1b0: 0x6cc15020, 0x1e1b1: 0x6d2e8c20, 0x1e1b2: 0x6c6d6c20, 0x1e1b3: 0x6c492c20, + 0x1e1b4: 0x6c2abc20, 0x1e1b5: 0x6c670420, 0x1e1b6: 0x6c956420, 0x1e1b7: 0x6cc28220, + 0x1e1b8: 0x6c652620, 0x1e1b9: 0x6cef6220, 0x1e1ba: 0x6c750220, 0x1e1bb: 0x6cc15c20, + 0x1e1bc: 0x6c956a20, 0x1e1bd: 0x6c805420, 0x1e1be: 0x6cd08a20, 0x1e1bf: 0x6c2bba20, + // Block 0x787, offset 0x1e1c0 + 0x1e1c0: 0x6c494420, 0x1e1c1: 0x6c664e20, 0x1e1c2: 0x6c490220, 0x1e1c3: 0x6d0e3e20, + 0x1e1c4: 0x6c4a3a20, 0x1e1c5: 0x6c9d2a20, 0x1e1c6: 0x6cd32020, 0x1e1c7: 0x6c14be20, + 0x1e1c8: 0x6c802020, 0x1e1c9: 0x6c740a20, 0x1e1ca: 0x6c61d620, 0x1e1cb: 0x6cf77e20, + 0x1e1cc: 0x6c2b6e20, 0x1e1cd: 0x6ce4fc20, 0x1e1ce: 0x6d216820, 0x1e1cf: 0x6c46cc20, + 0x1e1d0: 0x6c6d4620, 0x1e1d1: 0x6cc27220, 0x1e1d2: 0x6c68c620, 0x1e1d3: 0x6cc01820, + 0x1e1d4: 0x6c6c3a20, 0x1e1d5: 0x6c241220, 0x1e1d6: 0x6c743220, 0x1e1d7: 0x6d360c20, + 0x1e1d8: 0x6c17bc20, 0x1e1d9: 0x6c600a20, 0x1e1da: 0x6c471220, 0x1e1db: 0x6c289020, + 0x1e1dc: 0x6d3e5820, 0x1e1dd: 0x6c2bf820, 0x1e1de: 0x6cce0420, 0x1e1df: 0x6c57a020, + 0x1e1e0: 0x6cc30220, 0x1e1e1: 0x6c440c20, 0x1e1e2: 0x6cd3a020, 0x1e1e3: 0x6c6b9820, + 0x1e1e4: 0x6c4b0a20, 0x1e1e5: 0x6c459820, 0x1e1e6: 0x6c1f5c20, 0x1e1e7: 0x6c6b9a20, + 0x1e1e8: 0x6c5d3a20, 0x1e1e9: 0x6cc08420, 0x1e1ea: 0x6d039020, 0x1e1eb: 0x6cdaf220, + 0x1e1ec: 0x6ca60220, 0x1e1ed: 0x6c5f1e20, 0x1e1ee: 0x6c92b420, 0x1e1ef: 0x6d36c020, + 0x1e1f0: 0x6d2bfa20, 0x1e1f1: 0x6c0a5e20, 0x1e1f2: 0x6d03a620, 0x1e1f3: 0x6c55cc20, + 0x1e1f4: 0x6cce2220, 0x1e1f5: 0x6c45be20, 0x1e1f6: 0x6d374820, 0x1e1f7: 0x6d092820, + 0x1e1f8: 0x6c1f8a20, 0x1e1f9: 0x6cf71a20, 0x1e1fa: 0x6d159420, 0x1e1fb: 0x6c877e20, + 0x1e1fc: 0x6c750e20, 0x1e1fd: 0x6cf75020, 0x1e1fe: 0x6d0f0c20, 0x1e1ff: 0x6cf75e20, + // Block 0x788, offset 0x1e200 + 0x1e200: 0x6d0c5c20, 0x1e201: 0x6d0f3620, 0x1e202: 0x6c2f9a20, 0x1e203: 0x6c3fc620, + 0x1e204: 0x6cc01a20, 0x1e205: 0x6cc01c20, 0x1e206: 0x6c698a20, 0x1e207: 0x6c529c20, + 0x1e208: 0x6c61b820, 0x1e209: 0x6c384c20, 0x1e20a: 0x6d0a7e20, 0x1e20b: 0x6c2e1420, + 0x1e20c: 0x6c53b820, 0x1e20d: 0x6c149820, 0x1e20e: 0x6ce25c20, 0x1e20f: 0x6d058620, + 0x1e210: 0x6c6aaa20, 0x1e211: 0x6d14dc20, 0x1e212: 0x6cc5e020, 0x1e213: 0x6d0ac020, + 0x1e214: 0x6d1a4e20, 0x1e215: 0x6ccd7e20, 0x1e216: 0x6cb77020, 0x1e217: 0x6ceabc20, + 0x1e218: 0x6c61d820, 0x1e219: 0x6d0a8020, 0x1e21a: 0x6d1a5020, 0x1e21b: 0x6c356020, + 0x1e21c: 0x6c3b2c20, 0x1e21d: 0x6d0ba420, 0x1e21e: 0x6d109e20, 0x1e21f: 0x6cd98c20, + 0x1e220: 0x6cd06020, 0x1e221: 0x6d1a5e20, 0x1e222: 0x6d02ce20, 0x1e223: 0x6c743420, + 0x1e224: 0x6cff8620, 0x1e225: 0x6ca54e20, 0x1e226: 0x6c18c020, 0x1e227: 0x6d1f2e20, + 0x1e228: 0x6d352220, 0x1e229: 0x6d046820, 0x1e22a: 0x6c39d620, 0x1e22b: 0x6d033220, + 0x1e22c: 0x6c174020, 0x1e22d: 0x6ccf4420, 0x1e22e: 0x6cfaa220, 0x1e22f: 0x6cc94e20, + 0x1e230: 0x6d3ce220, 0x1e231: 0x6d063c20, 0x1e232: 0x6d177820, 0x1e233: 0x6d177a20, + 0x1e234: 0x6cdb7a20, 0x1e235: 0x6c1ab220, 0x1e236: 0x6c509e20, 0x1e237: 0x6ccff620, + 0x1e238: 0x6c512c20, 0x1e239: 0x6d06e620, 0x1e23a: 0x6d31de20, 0x1e23b: 0x6d3afa20, + 0x1e23c: 0x6d334e20, 0x1e23d: 0x6c46a820, 0x1e23e: 0x6d3e5c20, 0x1e23f: 0x6d3f1c20, + // Block 0x789, offset 0x1e240 + 0x1e240: 0x6d2d7820, 0x1e241: 0x6c479420, 0x1e242: 0x6c3ffe20, 0x1e243: 0x6c65a020, + 0x1e244: 0x6c2eb420, 0x1e245: 0x6c8d0a20, 0x1e246: 0x6c2bfa20, 0x1e247: 0x6d104e20, + 0x1e248: 0x6c861c20, 0x1e249: 0x6ca4b020, 0x1e24a: 0x6cacb820, 0x1e24b: 0x6d392e20, + 0x1e24c: 0x6c422220, 0x1e24d: 0x6d17c420, 0x1e24e: 0x6c724420, 0x1e24f: 0x6d120c20, + 0x1e250: 0x6d2cc820, 0x1e251: 0x6d150020, 0x1e252: 0x6d150220, 0x1e253: 0x6cc24a20, + 0x1e254: 0x6d2fb620, 0x1e255: 0x6cb2b220, 0x1e256: 0x6c09ac20, 0x1e257: 0x6d049620, + 0x1e258: 0x6cc11620, 0x1e259: 0x6c037c20, 0x1e25a: 0x6c26aa20, 0x1e25b: 0x6d411e20, + 0x1e25c: 0x6ce1cc20, 0x1e25d: 0x6d3a7220, 0x1e25e: 0x6c224820, 0x1e25f: 0x6d305e20, + 0x1e260: 0x6d1e3e20, 0x1e261: 0x6d064620, 0x1e262: 0x6d0a2020, 0x1e263: 0x6d180c20, + 0x1e264: 0x6c5a5620, 0x1e265: 0x6c514420, 0x1e266: 0x6cd3a220, 0x1e267: 0x6c13f020, + 0x1e268: 0x6cfff820, 0x1e269: 0x6cd1d820, 0x1e26a: 0x6c523e20, 0x1e26b: 0x6c144420, + 0x1e26c: 0x6c46ba20, 0x1e26d: 0x6c4b0c20, 0x1e26e: 0x6cc30420, 0x1e26f: 0x6c5bea20, + 0x1e270: 0x6c6afc20, 0x1e271: 0x6c57a220, 0x1e272: 0x6c40fc20, 0x1e273: 0x6cfdca20, + 0x1e274: 0x6ceea420, 0x1e275: 0x6ccffc20, 0x1e276: 0x6d393420, 0x1e277: 0x6ce75c20, + 0x1e278: 0x6c9c6220, 0x1e279: 0x6d2d8420, 0x1e27a: 0x6ca04620, 0x1e27b: 0x6c366420, + 0x1e27c: 0x6c5ace20, 0x1e27d: 0x6d0cb220, 0x1e27e: 0x6d046e20, 0x1e27f: 0x6c48bc20, + // Block 0x78a, offset 0x1e280 + 0x1e280: 0x6c37d220, 0x1e281: 0x6c0e2420, 0x1e282: 0x6ce5c420, 0x1e283: 0x6d152020, + 0x1e284: 0x6c82ca20, 0x1e285: 0x6d39b420, 0x1e286: 0x6c7ba420, 0x1e287: 0x6c7ac620, + 0x1e288: 0x6cf3dc20, 0x1e289: 0x6d238220, 0x1e28a: 0x6ce2a420, 0x1e28b: 0x6c625220, + 0x1e28c: 0x6d36a020, 0x1e28d: 0x6cc60220, 0x1e28e: 0x6c244e20, 0x1e28f: 0x6c810c20, + 0x1e290: 0x6c357a20, 0x1e291: 0x6c7bc620, 0x1e292: 0x6c370c20, 0x1e293: 0x6cd3b820, + 0x1e294: 0x6ce6d820, 0x1e295: 0x6c289620, 0x1e296: 0x6c074620, 0x1e297: 0x6c151020, + 0x1e298: 0x6d205620, 0x1e299: 0x6c794a20, 0x1e29a: 0x6cbc4e20, 0x1e29b: 0x6cbd3820, + 0x1e29c: 0x6cd65020, 0x1e29d: 0x6c014220, 0x1e29e: 0x6d227c20, 0x1e29f: 0x6cfffe20, + 0x1e2a0: 0x6c1a2220, 0x1e2a1: 0x6c6bf420, 0x1e2a2: 0x6cfcee20, 0x1e2a3: 0x6cf37a20, + 0x1e2a4: 0x6cf51020, 0x1e2a5: 0x6c435620, 0x1e2a6: 0x6cd99a20, 0x1e2a7: 0x6c101a20, + 0x1e2a8: 0x6c5c0420, 0x1e2a9: 0x6c6e9820, 0x1e2aa: 0x6cd76a20, 0x1e2ab: 0x6d325220, + 0x1e2ac: 0x6cd76c20, 0x1e2ad: 0x6c31ae20, 0x1e2ae: 0x6c57e420, 0x1e2af: 0x6c172420, + 0x1e2b0: 0x6cd6fe20, 0x1e2b1: 0x6c6b2820, 0x1e2b2: 0x6c78d420, 0x1e2b3: 0x6cc13a20, + 0x1e2b4: 0x6c23ac20, 0x1e2b5: 0x6cff9820, 0x1e2b6: 0x6cdc6420, 0x1e2b7: 0x6cee3620, + 0x1e2b8: 0x6cfb8620, 0x1e2b9: 0x6c3a6c20, 0x1e2ba: 0x6c1ad220, 0x1e2bb: 0x6cde9220, + 0x1e2bc: 0x6d186620, 0x1e2bd: 0x6ca6c220, 0x1e2be: 0x6d1a9a20, 0x1e2bf: 0x6c2e3820, + // Block 0x78b, offset 0x1e2c0 + 0x1e2c0: 0x6cb06820, 0x1e2c1: 0x6d3d8c20, 0x1e2c2: 0x6c15de20, 0x1e2c3: 0x6c188420, + 0x1e2c4: 0x6d3cd620, 0x1e2c5: 0x6c626a20, 0x1e2c6: 0x6cb52820, 0x1e2c7: 0x6ce00820, + 0x1e2c8: 0x6d3ca420, 0x1e2c9: 0x6cf00c20, 0x1e2ca: 0x6c714c20, 0x1e2cb: 0x6cbeb220, + 0x1e2cc: 0x6c303c20, 0x1e2cd: 0x6d335420, 0x1e2ce: 0x6d2af220, 0x1e2cf: 0x6d406020, + 0x1e2d0: 0x6cb91620, 0x1e2d1: 0x6d3d8e20, 0x1e2d2: 0x6c89c820, 0x1e2d3: 0x6c66c020, + 0x1e2d4: 0x6c1f6e20, 0x1e2d5: 0x6c4fe420, 0x1e2d6: 0x6c952620, 0x1e2d7: 0x6cd06e20, + 0x1e2d8: 0x6c0c7820, 0x1e2d9: 0x6c581220, 0x1e2da: 0x6cb12620, 0x1e2db: 0x6d219420, + 0x1e2dc: 0x6c2eea20, 0x1e2dd: 0x6d05e820, 0x1e2de: 0x6cb14220, 0x1e2df: 0x6cd3de20, + 0x1e2e0: 0x6d07d220, 0x1e2e1: 0x6cd3e020, 0x1e2e2: 0x6c5d4220, 0x1e2e3: 0x6c57c020, + 0x1e2e4: 0x6c36ac20, 0x1e2e5: 0x6d384020, 0x1e2e6: 0x6c2c9c20, 0x1e2e7: 0x6d00f220, + 0x1e2e8: 0x6c3ef620, 0x1e2e9: 0x6cb49420, 0x1e2ea: 0x6ce69020, 0x1e2eb: 0x6c66d620, + 0x1e2ec: 0x6cb71e20, 0x1e2ed: 0x6d23f620, 0x1e2ee: 0x6d3e9020, 0x1e2ef: 0x6d3b9420, + 0x1e2f0: 0x6cf81420, 0x1e2f1: 0x6c5c4220, 0x1e2f2: 0x6d1a0220, 0x1e2f3: 0x6c015020, + 0x1e2f4: 0x6cfb9e20, 0x1e2f5: 0x6ca40e20, 0x1e2f6: 0x6c18ec20, 0x1e2f7: 0x6c3cce20, + 0x1e2f8: 0x6d39c620, 0x1e2f9: 0x6d0fd820, 0x1e2fa: 0x6d0ec420, 0x1e2fb: 0x6c5a0020, + 0x1e2fc: 0x6d07d420, 0x1e2fd: 0x6c443a20, 0x1e2fe: 0x6cab0e20, 0x1e2ff: 0x6cb53220, + // Block 0x78c, offset 0x1e300 + 0x1e300: 0x6ca1e820, 0x1e301: 0x6d134620, 0x1e302: 0x6cf0d620, 0x1e303: 0x6d044620, + 0x1e304: 0x6ce2ba20, 0x1e305: 0x6d38b620, 0x1e306: 0x6ccdc020, 0x1e307: 0x6c65ec20, + 0x1e308: 0x6cb33a20, 0x1e309: 0x6c7d2220, 0x1e30a: 0x6c5a6420, 0x1e30b: 0x6c5e0c20, + 0x1e30c: 0x6c43b620, 0x1e30d: 0x6d1cac20, 0x1e30e: 0x6c9c7420, 0x1e30f: 0x6cffc020, + 0x1e310: 0x6c9d9820, 0x1e311: 0x6cf81a20, 0x1e312: 0x6cbae220, 0x1e313: 0x6c188c20, + 0x1e314: 0x6d097220, 0x1e315: 0x6ce38820, 0x1e316: 0x6cdb4a20, 0x1e317: 0x6c059420, + 0x1e318: 0x6c1b5a20, 0x1e319: 0x6cb92820, 0x1e31a: 0x6cd3ea20, 0x1e31b: 0x6c67c820, + 0x1e31c: 0x6d25b620, 0x1e31d: 0x6d023620, 0x1e31e: 0x6c51f620, 0x1e31f: 0x6ce1f220, + 0x1e320: 0x6d115020, 0x1e321: 0x6d115220, 0x1e322: 0x6d378020, 0x1e323: 0x6d21c820, + 0x1e324: 0x6c0c4020, 0x1e325: 0x6c23e020, 0x1e326: 0x6cbee620, 0x1e327: 0x6c846420, + 0x1e328: 0x6ca08020, 0x1e329: 0x6ca17620, 0x1e32a: 0x6cce2420, 0x1e32b: 0x6d30b020, + 0x1e32c: 0x6ca05420, 0x1e32d: 0x6c660420, 0x1e32e: 0x6d2b1820, 0x1e32f: 0x6c6a3a20, + 0x1e330: 0x6c886e20, 0x1e331: 0x6c90c620, 0x1e332: 0x6c121020, 0x1e333: 0x6cab5e20, + 0x1e334: 0x6c4c0620, 0x1e335: 0x6cf7ae20, 0x1e336: 0x6d3dc020, 0x1e337: 0x6c027a20, + 0x1e338: 0x6c027c20, 0x1e339: 0x6c6cc220, 0x1e33a: 0x6d30b220, 0x1e33b: 0x6d158620, + 0x1e33c: 0x6c551220, 0x1e33d: 0x6c680e20, 0x1e33e: 0x6c978e20, 0x1e33f: 0x6c178a20, + // Block 0x78d, offset 0x1e340 + 0x1e340: 0x6c4f2620, 0x1e341: 0x6c576020, 0x1e342: 0x6c160020, 0x1e343: 0x6d060020, + 0x1e344: 0x6d2ba420, 0x1e345: 0x6ccb9220, 0x1e346: 0x6cf71c20, 0x1e347: 0x6d2c0420, + 0x1e348: 0x6c337a20, 0x1e349: 0x6d336c20, 0x1e34a: 0x6ca4ce20, 0x1e34b: 0x6c7fda20, + 0x1e34c: 0x6c359820, 0x1e34d: 0x6d1c2620, 0x1e34e: 0x6c74ee20, 0x1e34f: 0x6c5f8220, + 0x1e350: 0x6d421220, 0x1e351: 0x6c696020, 0x1e352: 0x6c0ffc20, 0x1e353: 0x6c5c8620, + 0x1e354: 0x6d3bf420, 0x1e355: 0x6cf40820, 0x1e356: 0x6d2b7a20, 0x1e357: 0x6d2c6220, + 0x1e358: 0x6cd42220, 0x1e359: 0x6cbc6c20, 0x1e35a: 0x6ce03620, 0x1e35b: 0x6d2b7c20, + 0x1e35c: 0x6cb4a020, 0x1e35d: 0x6cd12820, 0x1e35e: 0x6d07ee20, 0x1e35f: 0x6d2a9820, + 0x1e360: 0x6ce04020, 0x1e361: 0x6c293620, 0x1e362: 0x6cdcac20, 0x1e363: 0x6cfc4e20, + 0x1e364: 0x6c5f8c20, 0x1e365: 0x6c69d820, 0x1e366: 0x6c6e3c20, 0x1e367: 0x6d2e9820, + 0x1e368: 0x6ca45c20, 0x1e369: 0x6d143220, 0x1e36a: 0x6c010420, 0x1e36b: 0x6d2dbc20, + 0x1e36c: 0x6cb0d820, 0x1e36d: 0x6c5b7e20, 0x1e36e: 0x6c57d420, 0x1e36f: 0x6d193220, + 0x1e370: 0x6d193420, 0x1e371: 0x6ccdd620, 0x1e372: 0x6cc51c20, 0x1e373: 0x6caa3220, + 0x1e374: 0x6cba3220, 0x1e375: 0x6d3cbe20, 0x1e376: 0x6cdee420, 0x1e377: 0x6c56e020, + 0x1e378: 0x6d38c420, 0x1e379: 0x6c500420, 0x1e37a: 0x6c010620, 0x1e37b: 0x6d1c3420, + 0x1e37c: 0x6c671a20, 0x1e37d: 0x6d246620, 0x1e37e: 0x6c662c20, 0x1e37f: 0x6c5c9c20, + // Block 0x78e, offset 0x1e380 + 0x1e380: 0x6c31f020, 0x1e381: 0x6d30bc20, 0x1e382: 0x6d08d020, 0x1e383: 0x6d29bc20, + 0x1e384: 0x6c830c20, 0x1e385: 0x6cd08c20, 0x1e386: 0x6cf12220, 0x1e387: 0x6c161a20, + 0x1e388: 0x6c879020, 0x1e389: 0x6d159a20, 0x1e38a: 0x6c0bdc20, 0x1e38b: 0x6d30c820, + 0x1e38c: 0x6d0f0e20, 0x1e38d: 0x6c36f220, 0x1e38e: 0x6c1e0e20, 0x1e38f: 0x6cf12a20, + 0x1e390: 0x6c1e1020, 0x1e391: 0x6d125620, 0x1e392: 0x6c157c20, 0x1e393: 0x6cc51e20, + 0x1e394: 0x6d1b2c20, 0x1e395: 0x6c801020, 0x1e396: 0x6c194820, 0x1e397: 0x6d013820, + 0x1e398: 0x6ca8cc20, 0x1e399: 0x6c584c20, 0x1e39a: 0x6d29ca20, 0x1e39b: 0x6d197c20, + 0x1e39c: 0x6c294a20, 0x1e39d: 0x6d2dda20, 0x1e39e: 0x6d0f2a20, 0x1e39f: 0x6c321020, + 0x1e3a0: 0x6d0c5020, 0x1e3a1: 0x6c616e20, 0x1e3a2: 0x6c2f8c20, 0x1e3a3: 0x6c3fa220, + 0x1e3a4: 0x6cc5a420, 0x1e3a5: 0x6c5e6620, 0x1e3a6: 0x6c6a5c20, 0x1e3a7: 0x6c53b420, + 0x1e3a8: 0x6ce25820, 0x1e3a9: 0x6cc51820, 0x1e3aa: 0x6ccd6620, 0x1e3ab: 0x6cb72820, + 0x1e3ac: 0x6cea9420, 0x1e3ad: 0x6d0abe20, 0x1e3ae: 0x6d164e20, 0x1e3af: 0x6d0a6220, + 0x1e3b0: 0x6c617020, 0x1e3b1: 0x6cc5aa20, 0x1e3b2: 0x6c679c20, 0x1e3b3: 0x6c5b8c20, + 0x1e3b4: 0x6cab2c20, 0x1e3b5: 0x6c71f420, 0x1e3b6: 0x6d0b7220, 0x1e3b7: 0x6ca54220, + 0x1e3b8: 0x6d062420, 0x1e3b9: 0x6c354620, 0x1e3ba: 0x6c952020, 0x1e3bb: 0x6d045220, + 0x1e3bc: 0x6cd97c20, 0x1e3bd: 0x6c3cc420, 0x1e3be: 0x6ccf3220, 0x1e3bf: 0x6c39b820, + // Block 0x78f, offset 0x1e3c0 + 0x1e3c0: 0x6c73d620, 0x1e3c1: 0x6d333a20, 0x1e3c2: 0x6c475a20, 0x1e3c3: 0x6c508a20, + 0x1e3c4: 0x6cb27020, 0x1e3c5: 0x6d410820, 0x1e3c6: 0x6cd40e20, 0x1e3c7: 0x6d048620, + 0x1e3c8: 0x6d2caa20, 0x1e3c9: 0x6cdb7820, 0x1e3ca: 0x6d31b420, 0x1e3cb: 0x6c2bce20, + 0x1e3cc: 0x6d385420, 0x1e3cd: 0x6c221e20, 0x1e3ce: 0x6cc0d420, 0x1e3cf: 0x6d2f9820, + 0x1e3d0: 0x6c092020, 0x1e3d1: 0x6d169c20, 0x1e3d2: 0x6d146620, 0x1e3d3: 0x6c7b8620, + 0x1e3d4: 0x6c82b620, 0x1e3d5: 0x6cd32220, 0x1e3d6: 0x6c48aa20, 0x1e3d7: 0x6cd19c20, + 0x1e3d8: 0x6c5fe420, 0x1e3d9: 0x6c5a8c20, 0x1e3da: 0x6c19c020, 0x1e3db: 0x6d398420, + 0x1e3dc: 0x6ccfb420, 0x1e3dd: 0x6c578620, 0x1e3de: 0x6c286c20, 0x1e3df: 0x6c469620, + 0x1e3e0: 0x6cc2ba20, 0x1e3e1: 0x6c4aca20, 0x1e3e2: 0x6d09e020, 0x1e3e3: 0x6d16d220, + 0x1e3e4: 0x6d328e20, 0x1e3e5: 0x6c40de20, 0x1e3e6: 0x6cfdb020, 0x1e3e7: 0x6c143220, + 0x1e3e8: 0x6c5d1a20, 0x1e3e9: 0x6d062e20, 0x1e3ea: 0x6d386220, 0x1e3eb: 0x6c6bd420, + 0x1e3ec: 0x6cf35c20, 0x1e3ed: 0x6d223020, 0x1e3ee: 0x6cbc3220, 0x1e3ef: 0x6cf4ce20, + 0x1e3f0: 0x6c433c20, 0x1e3f1: 0x6d203220, 0x1e3f2: 0x6c5ba420, 0x1e3f3: 0x6c7bbc20, + 0x1e3f4: 0x6cd76620, 0x1e3f5: 0x6cd98220, 0x1e3f6: 0x6c370a20, 0x1e3f7: 0x6cbea220, + 0x1e3f8: 0x6d399620, 0x1e3f9: 0x6d404a20, 0x1e3fa: 0x6caae620, 0x1e3fb: 0x6c319420, + 0x1e3fc: 0x6d3d3e20, 0x1e3fd: 0x6c3a4e20, 0x1e3fe: 0x6c789c20, 0x1e3ff: 0x6cefa620, + // Block 0x790, offset 0x1e400 + 0x1e400: 0x6d20f820, 0x1e401: 0x6cd6fa20, 0x1e402: 0x6cd05420, 0x1e403: 0x6c2e1620, + 0x1e404: 0x6c15a220, 0x1e405: 0x6c89b020, 0x1e406: 0x6d3cd020, 0x1e407: 0x6cdc3220, + 0x1e408: 0x6cdfd620, 0x1e409: 0x6cd05620, 0x1e40a: 0x6d174820, 0x1e40b: 0x6ca1d020, + 0x1e40c: 0x6c18c220, 0x1e40d: 0x6c2e9620, 0x1e40e: 0x6c5a5220, 0x1e40f: 0x6c668220, + 0x1e410: 0x6d00a620, 0x1e411: 0x6d095a20, 0x1e412: 0x6d12ea20, 0x1e413: 0x6cf08820, + 0x1e414: 0x6c361a20, 0x1e415: 0x6d232420, 0x1e416: 0x6d078e20, 0x1e417: 0x6c14f020, + 0x1e418: 0x6d3e2c20, 0x1e419: 0x6c012c20, 0x1e41a: 0x6d0e6620, 0x1e41b: 0x6c2c5020, + 0x1e41c: 0x6c9c4e20, 0x1e41d: 0x6cb13c20, 0x1e41e: 0x6d059020, 0x1e41f: 0x6ca05820, + 0x1e420: 0x6c292e20, 0x1e421: 0x6cdab820, 0x1e422: 0x6d01b620, 0x1e423: 0x6d10fe20, + 0x1e424: 0x6c057420, 0x1e425: 0x6cd38c20, 0x1e426: 0x6cb8e420, 0x1e427: 0x6c9d4c20, + 0x1e428: 0x6c6c9820, 0x1e429: 0x6c976820, 0x1e42a: 0x6d306620, 0x1e42b: 0x6c65b620, + 0x1e42c: 0x6ca05220, 0x1e42d: 0x6cdff420, 0x1e42e: 0x6d2b7820, 0x1e42f: 0x6cbbe420, + 0x1e430: 0x6c7fa820, 0x1e431: 0x6cb49020, 0x1e432: 0x6c748620, 0x1e433: 0x6d0ea820, + 0x1e434: 0x6cba1e20, 0x1e435: 0x6d2d9020, 0x1e436: 0x6c193c20, 0x1e437: 0x6c475c20, + 0x1e438: 0x6cb8cc20, 0x1e439: 0x6c534020, 0x1e43a: 0x6cf96420, 0x1e43b: 0x6c602420, + 0x1e43c: 0x6c536820, 0x1e43d: 0x6c4db220, 0x1e43e: 0x6c52c020, 0x1e43f: 0x6cf6f420, + // Block 0x791, offset 0x1e440 + 0x1e440: 0x6cf6f620, 0x1e441: 0x6c5d6220, 0x1e442: 0x6c8a3e20, 0x1e443: 0x6c4e6a20, + 0x1e444: 0x6c31f220, 0x1e445: 0x6c900420, 0x1e446: 0x6c30fa20, 0x1e447: 0x6c675a20, + 0x1e448: 0x6cb6e820, 0x1e449: 0x6cd37220, 0x1e44a: 0x6c852420, 0x1e44b: 0x6c2a9e20, + 0x1e44c: 0x6cec9a20, 0x1e44d: 0x6c088a20, 0x1e44e: 0x6cd60820, 0x1e44f: 0x6cfd1c20, + 0x1e450: 0x6c3c7020, 0x1e451: 0x6d375a20, 0x1e452: 0x6d377620, 0x1e453: 0x6d0f2c20, + 0x1e454: 0x6d0f3020, 0x1e455: 0x6cd2b020, 0x1e456: 0x6c1f1620, 0x1e457: 0x6c5aae20, + 0x1e458: 0x6cea4e20, 0x1e459: 0x6d177c20, 0x1e45a: 0x6cea5020, 0x1e45b: 0x6d177e20, + 0x1e45c: 0x6c649020, 0x1e45d: 0x6c034a20, 0x1e45e: 0x6c547220, 0x1e45f: 0x6c364820, + 0x1e460: 0x6c1e8420, 0x1e461: 0x6cfe3020, 0x1e462: 0x6c593e20, 0x1e463: 0x6c64c220, + 0x1e464: 0x6c790420, 0x1e465: 0x6c40fe20, 0x1e466: 0x6c725a20, 0x1e467: 0x6c3d8a20, + 0x1e468: 0x6cf68420, 0x1e469: 0x6c0d4820, 0x1e46a: 0x6c4fd620, 0x1e46b: 0x6d23ce20, + 0x1e46c: 0x6d39c820, 0x1e46d: 0x6c638420, 0x1e46e: 0x6c3b9a20, 0x1e46f: 0x6cf6f820, + 0x1e470: 0x6c0f8020, 0x1e471: 0x6cf16620, 0x1e472: 0x6c58aa20, 0x1e473: 0x6c0d5820, + 0x1e474: 0x6c2ba620, 0x1e475: 0x6d3fce20, 0x1e476: 0x6c3ba620, 0x1e477: 0x6d191c20, + 0x1e478: 0x6d357c20, 0x1e479: 0x6c064020, 0x1e47a: 0x6c147820, 0x1e47b: 0x6c01b420, + 0x1e47c: 0x6cafe620, 0x1e47d: 0x6ca33c20, 0x1e47e: 0x6caf6620, 0x1e47f: 0x6c468a20, + // Block 0x792, offset 0x1e480 + 0x1e480: 0x6ca34620, 0x1e481: 0x6d204820, 0x1e482: 0x6c2dcc20, 0x1e483: 0x6ca11e20, + 0x1e484: 0x6cd8ce20, 0x1e485: 0x6d04dc20, 0x1e486: 0x6c588420, 0x1e487: 0x6c7d7220, + 0x1e488: 0x6c514820, 0x1e489: 0x6c4fce20, 0x1e48a: 0x6ca13220, 0x1e48b: 0x6c4ef020, + 0x1e48c: 0x6c99a420, 0x1e48d: 0x6c842220, 0x1e48e: 0x6ca60420, 0x1e48f: 0x6c08f420, + 0x1e490: 0x6d229620, 0x1e491: 0x6c638620, 0x1e492: 0x6ce93a20, 0x1e493: 0x6c98be20, + 0x1e494: 0x6cb02620, 0x1e495: 0x6cf6fa20, 0x1e496: 0x6c36b820, 0x1e497: 0x6c72ae20, + 0x1e498: 0x6ca17820, 0x1e499: 0x6c1e6a20, 0x1e49a: 0x6ce03820, 0x1e49b: 0x6c584e20, + 0x1e49c: 0x6c753620, 0x1e49d: 0x6c06dc20, 0x1e49e: 0x6d313220, 0x1e49f: 0x6d254a20, + 0x1e4a0: 0x6c3fc820, 0x1e4a1: 0x6c110e20, 0x1e4a2: 0x6c461420, 0x1e4a3: 0x6ce27220, + 0x1e4a4: 0x6d14de20, 0x1e4a5: 0x6c4f7820, 0x1e4a6: 0x6ced8020, 0x1e4a7: 0x6cb20a20, + 0x1e4a8: 0x6c5dc820, 0x1e4a9: 0x6c395020, 0x1e4aa: 0x6cdfa620, 0x1e4ab: 0x6c498620, + 0x1e4ac: 0x6d2ac820, 0x1e4ad: 0x6d345e20, 0x1e4ae: 0x6c37cc20, 0x1e4af: 0x6d3afe20, + 0x1e4b0: 0x6cd38e20, 0x1e4b1: 0x6c09ae20, 0x1e4b2: 0x6d3e5e20, 0x1e4b3: 0x6c37d020, + 0x1e4b4: 0x6c4b4e20, 0x1e4b5: 0x6cb14020, 0x1e4b6: 0x6c0b3a20, 0x1e4b7: 0x6c971420, + 0x1e4b8: 0x6c277220, 0x1e4b9: 0x6cd16820, 0x1e4ba: 0x6c7bf820, 0x1e4bb: 0x6c3ab220, + 0x1e4bc: 0x6ce5f420, 0x1e4bd: 0x6d150620, 0x1e4be: 0x6c1b2a20, 0x1e4bf: 0x6c998620, + // Block 0x793, offset 0x1e4c0 + 0x1e4c0: 0x6c51c820, 0x1e4c1: 0x6c09b020, 0x1e4c2: 0x6c927420, 0x1e4c3: 0x6c8c5420, + 0x1e4c4: 0x6c5bec20, 0x1e4c5: 0x6c410020, 0x1e4c6: 0x6cb11a20, 0x1e4c7: 0x6d3e6020, + 0x1e4c8: 0x6c642020, 0x1e4c9: 0x6d070420, 0x1e4ca: 0x6d2b6020, 0x1e4cb: 0x6c691020, + 0x1e4cc: 0x6c414a20, 0x1e4cd: 0x6d29dc20, 0x1e4ce: 0x6c669e20, 0x1e4cf: 0x6d1be220, + 0x1e4d0: 0x6d0a9c20, 0x1e4d1: 0x6d325420, 0x1e4d2: 0x6ccef820, 0x1e4d3: 0x6c0d4a20, + 0x1e4d4: 0x6c0d4c20, 0x1e4d5: 0x6cc08620, 0x1e4d6: 0x6ccefa20, 0x1e4d7: 0x6c203c20, + 0x1e4d8: 0x6d29e620, 0x1e4d9: 0x6d38a220, 0x1e4da: 0x6c7f5220, 0x1e4db: 0x6d299820, + 0x1e4dc: 0x6c22e020, 0x1e4dd: 0x6c188620, 0x1e4de: 0x6cce3a20, 0x1e4df: 0x6ce51620, + 0x1e4e0: 0x6cadee20, 0x1e4e1: 0x6c44de20, 0x1e4e2: 0x6cfb8820, 0x1e4e3: 0x6c974020, + 0x1e4e4: 0x6c66c220, 0x1e4e5: 0x6cdc6820, 0x1e4e6: 0x6c404420, 0x1e4e7: 0x6ce0aa20, + 0x1e4e8: 0x6c23ae20, 0x1e4e9: 0x6c23b020, 0x1e4ea: 0x6d36c620, 0x1e4eb: 0x6c5f2220, + 0x1e4ec: 0x6d2f3e20, 0x1e4ed: 0x6c322c20, 0x1e4ee: 0x6c6d5420, 0x1e4ef: 0x6d047420, + 0x1e4f0: 0x6c218820, 0x1e4f1: 0x6d280420, 0x1e4f2: 0x6c061420, 0x1e4f3: 0x6d290c20, + 0x1e4f4: 0x6c7f5820, 0x1e4f5: 0x6c3cf820, 0x1e4f6: 0x6c125c20, 0x1e4f7: 0x6c5f6020, + 0x1e4f8: 0x6cd17e20, 0x1e4f9: 0x6d18da20, 0x1e4fa: 0x6d3bec20, 0x1e4fb: 0x6c406820, + 0x1e4fc: 0x6c46de20, 0x1e4fd: 0x6cc9ea20, 0x1e4fe: 0x6d2b1a20, 0x1e4ff: 0x6c8a4020, + // Block 0x794, offset 0x1e500 + 0x1e500: 0x6d18f820, 0x1e501: 0x6c045e20, 0x1e502: 0x6c191620, 0x1e503: 0x6ceda620, + 0x1e504: 0x6d373220, 0x1e505: 0x6d3cb620, 0x1e506: 0x6c0c4620, 0x1e507: 0x6d276e20, + 0x1e508: 0x6d2bb620, 0x1e509: 0x6c28e020, 0x1e50a: 0x6d29ae20, 0x1e50b: 0x6d0eec20, + 0x1e50c: 0x6cb4c420, 0x1e50d: 0x6ccdd820, 0x1e50e: 0x6cedac20, 0x1e50f: 0x6d1cca20, + 0x1e510: 0x6c6d7220, 0x1e511: 0x6c423c20, 0x1e512: 0x6cfbd420, 0x1e513: 0x6d29f020, + 0x1e514: 0x6c0ac620, 0x1e515: 0x6c31f420, 0x1e516: 0x6cd54820, 0x1e517: 0x6d0f0620, + 0x1e518: 0x6cce4220, 0x1e519: 0x6d08d420, 0x1e51a: 0x6c907020, 0x1e51b: 0x6c424420, + 0x1e51c: 0x6d29f420, 0x1e51d: 0x6c06d220, 0x1e51e: 0x6d311c20, 0x1e51f: 0x6c3fa820, + 0x1e520: 0x6d253420, 0x1e521: 0x6c460c20, 0x1e522: 0x6c110c20, 0x1e523: 0x6d2aae20, + 0x1e524: 0x6cfb2e20, 0x1e525: 0x6c043820, 0x1e526: 0x6d2f2a20, 0x1e527: 0x6c5da220, + 0x1e528: 0x6d358e20, 0x1e529: 0x6c393420, 0x1e52a: 0x6cdf9220, 0x1e52b: 0x6cb20620, + 0x1e52c: 0x6c0b2a20, 0x1e52d: 0x6c469820, 0x1e52e: 0x6d3ab420, 0x1e52f: 0x6c497a20, + 0x1e530: 0x6c37c420, 0x1e531: 0x6c666220, 0x1e532: 0x6c078220, 0x1e533: 0x6cd34820, + 0x1e534: 0x6ce5ec20, 0x1e535: 0x6c4b3a20, 0x1e536: 0x6c7bec20, 0x1e537: 0x6c274e20, + 0x1e538: 0x6c995a20, 0x1e539: 0x6c3a9220, 0x1e53a: 0x6c51be20, 0x1e53b: 0x6d14b020, + 0x1e53c: 0x6d2b5c20, 0x1e53d: 0x6d35ce20, 0x1e53e: 0x6c640e20, 0x1e53f: 0x6c5bb020, + // Block 0x795, offset 0x1e540 + 0x1e540: 0x6d3e1e20, 0x1e541: 0x6c8c5020, 0x1e542: 0x6c922c20, 0x1e543: 0x6d29d820, + 0x1e544: 0x6d3e2020, 0x1e545: 0x6c40f020, 0x1e546: 0x6c6cfa20, 0x1e547: 0x6cc05220, + 0x1e548: 0x6d323c20, 0x1e549: 0x6c7f4620, 0x1e54a: 0x6ccef020, 0x1e54b: 0x6c400020, + 0x1e54c: 0x6c322020, 0x1e54d: 0x6c5edc20, 0x1e54e: 0x6cd52c20, 0x1e54f: 0x6cce3820, + 0x1e550: 0x6c22ce20, 0x1e551: 0x6c09b220, 0x1e552: 0x6d388c20, 0x1e553: 0x6c44d420, + 0x1e554: 0x6cadda20, 0x1e555: 0x6c283620, 0x1e556: 0x6c7f4c20, 0x1e557: 0x6c3ce820, + 0x1e558: 0x6d3c9e20, 0x1e559: 0x6c402820, 0x1e55a: 0x6d3bd620, 0x1e55b: 0x6cc9e620, + 0x1e55c: 0x6d2af420, 0x1e55d: 0x6d0ec820, 0x1e55e: 0x6d299a20, 0x1e55f: 0x6d276820, + 0x1e560: 0x6d2bb220, 0x1e561: 0x6ccdc220, 0x1e562: 0x6d1cae20, 0x1e563: 0x6c423e20, + 0x1e564: 0x6c1be820, 0x1e565: 0x6cf60220, 0x1e566: 0x6ccf4620, 0x1e567: 0x6ca42420, + 0x1e568: 0x6ce75e20, 0x1e569: 0x6cf8a820, 0x1e56a: 0x6c197620, 0x1e56b: 0x6c51dc20, + 0x1e56c: 0x6c199620, 0x1e56d: 0x6d30dc20, 0x1e56e: 0x6cf9f620, 0x1e56f: 0x6ce14620, + 0x1e570: 0x6d407e20, 0x1e571: 0x6d407c20, 0x1e572: 0x6c85b620, 0x1e573: 0x6c6f6020, + 0x1e574: 0x6c3fca20, 0x1e575: 0x6d2fa620, 0x1e576: 0x6c41d220, 0x1e577: 0x6cb6ea20, + 0x1e578: 0x6ccd8020, 0x1e579: 0x6cbf1c20, 0x1e57a: 0x6d1adc20, 0x1e57b: 0x6cfc0c20, + 0x1e57c: 0x6c21fe20, 0x1e57d: 0x6c743620, 0x1e57e: 0x6cbdd420, 0x1e57f: 0x6c1b2020, + // Block 0x796, offset 0x1e580 + 0x1e580: 0x6c220020, 0x1e581: 0x6c192820, 0x1e582: 0x6c192a20, 0x1e583: 0x6c2eb620, + 0x1e584: 0x6c70a020, 0x1e585: 0x6c174820, 0x1e586: 0x6c2b3020, 0x1e587: 0x6cf89620, + 0x1e588: 0x6d2d7a20, 0x1e589: 0x6c745c20, 0x1e58a: 0x6d26be20, 0x1e58b: 0x6cc11820, + 0x1e58c: 0x6c606220, 0x1e58d: 0x6c1b3e20, 0x1e58e: 0x6c1e9420, 0x1e58f: 0x6c486420, + 0x1e590: 0x6d096820, 0x1e591: 0x6d3e6220, 0x1e592: 0x6ce59420, 0x1e593: 0x6c349c20, + 0x1e594: 0x6c8b1c20, 0x1e595: 0x6c41e220, 0x1e596: 0x6cdd3220, 0x1e597: 0x6c245020, + 0x1e598: 0x6cf79820, 0x1e599: 0x6d2fd220, 0x1e59a: 0x6cdaf420, 0x1e59b: 0x6d1b0020, + 0x1e59c: 0x6c715020, 0x1e59d: 0x6c66c420, 0x1e59e: 0x6cc3f420, 0x1e59f: 0x6ce1a020, + 0x1e5a0: 0x6c21d020, 0x1e5a1: 0x6c250420, 0x1e5a2: 0x6c92b820, 0x1e5a3: 0x6cc27420, + 0x1e5a4: 0x6c298c20, 0x1e5a5: 0x6cbfc820, 0x1e5a6: 0x6d3e9220, 0x1e5a7: 0x6ce37e20, + 0x1e5a8: 0x6cc14a20, 0x1e5a9: 0x6c1c8820, 0x1e5aa: 0x6c5a1e20, 0x1e5ab: 0x6cbc0a20, + 0x1e5ac: 0x6cbbc220, 0x1e5ad: 0x6c69ce20, 0x1e5ae: 0x6d2a9a20, 0x1e5af: 0x6ce44220, + 0x1e5b0: 0x6c37b020, 0x1e5b1: 0x6d298420, 0x1e5b2: 0x6d298820, 0x1e5b3: 0x6d40a620, + 0x1e5b4: 0x6cabbc20, 0x1e5b5: 0x6c064220, 0x1e5b6: 0x6c7a8c20, 0x1e5b7: 0x6c77f220, + 0x1e5b8: 0x6c33cc20, 0x1e5b9: 0x6c743820, 0x1e5ba: 0x6c3d6c20, 0x1e5bb: 0x6c190020, + 0x1e5bc: 0x6c658c20, 0x1e5bd: 0x6c39e420, 0x1e5be: 0x6d352420, 0x1e5bf: 0x6cdde620, + // Block 0x797, offset 0x1e5c0 + 0x1e5c0: 0x6d26a820, 0x1e5c1: 0x6c03b620, 0x1e5c2: 0x6cb5d820, 0x1e5c3: 0x6d26aa20, + 0x1e5c4: 0x6cbab420, 0x1e5c5: 0x6ceba820, 0x1e5c6: 0x6cdf2420, 0x1e5c7: 0x6d17c820, + 0x1e5c8: 0x6ca72620, 0x1e5c9: 0x6c8d0e20, 0x1e5ca: 0x6c9a9420, 0x1e5cb: 0x6c038220, + 0x1e5cc: 0x6c2e5820, 0x1e5cd: 0x6c7a4420, 0x1e5ce: 0x6ceb2420, 0x1e5cf: 0x6c636620, + 0x1e5d0: 0x6c220620, 0x1e5d1: 0x6cad7820, 0x1e5d2: 0x6cb83820, 0x1e5d3: 0x6d3b0020, + 0x1e5d4: 0x6c70a220, 0x1e5d5: 0x6c2d1c20, 0x1e5d6: 0x6d346e20, 0x1e5d7: 0x6c3d7620, + 0x1e5d8: 0x6cac5a20, 0x1e5d9: 0x6c724e20, 0x1e5da: 0x6ccce620, 0x1e5db: 0x6c0fe420, + 0x1e5dc: 0x6ca5ec20, 0x1e5dd: 0x6c724620, 0x1e5de: 0x6c861e20, 0x1e5df: 0x6c449a20, + 0x1e5e0: 0x6d152420, 0x1e5e1: 0x6c5ef420, 0x1e5e2: 0x6c34fe20, 0x1e5e3: 0x6cfc1c20, + 0x1e5e4: 0x6c685420, 0x1e5e5: 0x6c350020, 0x1e5e6: 0x6d39b620, 0x1e5e7: 0x6cc30620, + 0x1e5e8: 0x6c7aec20, 0x1e5e9: 0x6d3b6820, 0x1e5ea: 0x6c4b5a20, 0x1e5eb: 0x6cbf4420, + 0x1e5ec: 0x6c7cd620, 0x1e5ed: 0x6cfdce20, 0x1e5ee: 0x6c1c3620, 0x1e5ef: 0x6c927620, + 0x1e5f0: 0x6cb11c20, 0x1e5f1: 0x6d367020, 0x1e5f2: 0x6c63d020, 0x1e5f3: 0x6ce5dc20, + 0x1e5f4: 0x6c113820, 0x1e5f5: 0x6c669820, 0x1e5f6: 0x6cde6a20, 0x1e5f7: 0x6cbb8020, + 0x1e5f8: 0x6c09e220, 0x1e5f9: 0x6cfab220, 0x1e5fa: 0x6c350220, 0x1e5fb: 0x6c5ef620, + 0x1e5fc: 0x6c714620, 0x1e5fd: 0x6c625420, 0x1e5fe: 0x6cd4fa20, 0x1e5ff: 0x6ce8e020, + // Block 0x798, offset 0x1e600 + 0x1e600: 0x6c1f6420, 0x1e601: 0x6c6e9a20, 0x1e602: 0x6ca85620, 0x1e603: 0x6cfef820, + 0x1e604: 0x6c10b020, 0x1e605: 0x6d091420, 0x1e606: 0x6c259a20, 0x1e607: 0x6ca25020, + 0x1e608: 0x6cd4fc20, 0x1e609: 0x6c896220, 0x1e60a: 0x6d1e5420, 0x1e60b: 0x6c691820, + 0x1e60c: 0x6c1dce20, 0x1e60d: 0x6cbb9220, 0x1e60e: 0x6ca1da20, 0x1e60f: 0x6cde9420, + 0x1e610: 0x6c66c620, 0x1e611: 0x6cb64620, 0x1e612: 0x6cf29e20, 0x1e613: 0x6cf00e20, + 0x1e614: 0x6c219820, 0x1e615: 0x6c6b2a20, 0x1e616: 0x6c609a20, 0x1e617: 0x6ca86420, + 0x1e618: 0x6c70be20, 0x1e619: 0x6c70c020, 0x1e61a: 0x6c950c20, 0x1e61b: 0x6c92bc20, + 0x1e61c: 0x6c839a20, 0x1e61d: 0x6c57f020, 0x1e61e: 0x6c728420, 0x1e61f: 0x6c1b4e20, + 0x1e620: 0x6ced4820, 0x1e621: 0x6cc31420, 0x1e622: 0x6ce2fa20, 0x1e623: 0x6c0f4c20, + 0x1e624: 0x6d40d220, 0x1e625: 0x6cbce220, 0x1e626: 0x6d160820, 0x1e627: 0x6c245e20, + 0x1e628: 0x6d3fbc20, 0x1e629: 0x6c113e20, 0x1e62a: 0x6d3fbe20, 0x1e62b: 0x6caf1620, + 0x1e62c: 0x6d36c820, 0x1e62d: 0x6d32d820, 0x1e62e: 0x6c2d2a20, 0x1e62f: 0x6d349420, + 0x1e630: 0x6d21aa20, 0x1e631: 0x6c346220, 0x1e632: 0x6c340c20, 0x1e633: 0x6c202820, + 0x1e634: 0x6d1e6020, 0x1e635: 0x6d380820, 0x1e636: 0x6c2c9e20, 0x1e637: 0x6d2c9220, + 0x1e638: 0x6c191020, 0x1e639: 0x6c1fce20, 0x1e63a: 0x6c66c820, 0x1e63b: 0x6c486e20, + 0x1e63c: 0x6ce13e20, 0x1e63d: 0x6c71d620, 0x1e63e: 0x6c3efa20, 0x1e63f: 0x6d40d820, + // Block 0x799, offset 0x1e640 + 0x1e640: 0x6c2eec20, 0x1e641: 0x6cb12e20, 0x1e642: 0x6cc76020, 0x1e643: 0x6cab1020, + 0x1e644: 0x6ce38020, 0x1e645: 0x6c142020, 0x1e646: 0x6ce9ec20, 0x1e647: 0x6c65ee20, + 0x1e648: 0x6c29f420, 0x1e649: 0x6c25ca20, 0x1e64a: 0x6cb53a20, 0x1e64b: 0x6cdeb020, + 0x1e64c: 0x6cbae420, 0x1e64d: 0x6ca74020, 0x1e64e: 0x6c2ce020, 0x1e64f: 0x6ce38a20, + 0x1e650: 0x6c60ce20, 0x1e651: 0x6ca87e20, 0x1e652: 0x6cac7820, 0x1e653: 0x6c8e3a20, + 0x1e654: 0x6d29aa20, 0x1e655: 0x6c0a7a20, 0x1e656: 0x6c1cf220, 0x1e657: 0x6c931020, + 0x1e658: 0x6c8a4220, 0x1e659: 0x6c246e20, 0x1e65a: 0x6ce0da20, 0x1e65b: 0x6c27a420, + 0x1e65c: 0x6cdb5420, 0x1e65d: 0x6cf81e20, 0x1e65e: 0x6c7ce220, 0x1e65f: 0x6c5f7820, + 0x1e660: 0x6d34ae20, 0x1e661: 0x6cbaee20, 0x1e662: 0x6c2ba820, 0x1e663: 0x6cac8420, + 0x1e664: 0x6d3fd020, 0x1e665: 0x6c887020, 0x1e666: 0x6c085c20, 0x1e667: 0x6d2a2a20, + 0x1e668: 0x6ca74820, 0x1e669: 0x6c0d0220, 0x1e66a: 0x6ce9d220, 0x1e66b: 0x6c717e20, + 0x1e66c: 0x6c2ac020, 0x1e66d: 0x6c137020, 0x1e66e: 0x6cfaf420, 0x1e66f: 0x6c38dc20, + 0x1e670: 0x6c1ec820, 0x1e671: 0x6d37d820, 0x1e672: 0x6c33be20, 0x1e673: 0x6c0e9a20, + 0x1e674: 0x6c247420, 0x1e675: 0x6c247620, 0x1e676: 0x6c74f220, 0x1e677: 0x6c74f420, + 0x1e678: 0x6c8c7e20, 0x1e679: 0x6cde0620, 0x1e67a: 0x6cbbc420, 0x1e67b: 0x6c73bc20, + 0x1e67c: 0x6cb4a220, 0x1e67d: 0x6c89d420, 0x1e67e: 0x6c33c020, 0x1e67f: 0x6c249620, + // Block 0x79a, offset 0x1e680 + 0x1e680: 0x6c7c1220, 0x1e681: 0x6d2a9c20, 0x1e682: 0x6c26d220, 0x1e683: 0x6c0abc20, + 0x1e684: 0x6c0abe20, 0x1e685: 0x6d3a3820, 0x1e686: 0x6c72be20, 0x1e687: 0x6c1ec020, + 0x1e688: 0x6cbc7020, 0x1e689: 0x6c33d020, 0x1e68a: 0x6c1e0820, 0x1e68b: 0x6c5f9620, + 0x1e68c: 0x6cf48e20, 0x1e68d: 0x6d271820, 0x1e68e: 0x6ca74c20, 0x1e68f: 0x6c8c8220, + 0x1e690: 0x6c8b7620, 0x1e691: 0x6d34c020, 0x1e692: 0x6c878220, 0x1e693: 0x6d376a20, + 0x1e694: 0x6c156e20, 0x1e695: 0x6c1ece20, 0x1e696: 0x6c32e820, 0x1e697: 0x6cf12420, + 0x1e698: 0x6c900620, 0x1e699: 0x6c8c8c20, 0x1e69a: 0x6cfb0e20, 0x1e69b: 0x6cf12e20, + 0x1e69c: 0x6d414020, 0x1e69d: 0x6c801220, 0x1e69e: 0x6d028e20, 0x1e69f: 0x6cc4fa20, + 0x1e6a0: 0x6cc95e20, 0x1e6a1: 0x6ca8ce20, 0x1e6a2: 0x6cdef620, 0x1e6a3: 0x6cc22c20, + 0x1e6a4: 0x6c6c1220, 0x1e6a5: 0x6c249a20, 0x1e6a6: 0x6c260620, 0x1e6a7: 0x6cf83020, + 0x1e6a8: 0x6c7cc620, 0x1e6a9: 0x6c753a20, 0x1e6aa: 0x6c8c9020, 0x1e6ab: 0x6ccfa420, + 0x1e6ac: 0x6c457e20, 0x1e6ad: 0x6c27d820, 0x1e6ae: 0x6c3c0a20, 0x1e6af: 0x6cc10820, + 0x1e6b0: 0x6ce3c220, 0x1e6b1: 0x6c349e20, 0x1e6b2: 0x6c34a020, 0x1e6b3: 0x6c459a20, + 0x1e6b4: 0x6c80da20, 0x1e6b5: 0x6cc60e20, 0x1e6b6: 0x6c95be20, 0x1e6b7: 0x6c007620, + 0x1e6b8: 0x6c5f2420, 0x1e6b9: 0x6c715220, 0x1e6ba: 0x6ce18020, 0x1e6bb: 0x6c79ae20, + 0x1e6bc: 0x6c81de20, 0x1e6bd: 0x6d0dd820, 0x1e6be: 0x6c9abc20, 0x1e6bf: 0x6c775c20, + // Block 0x79b, offset 0x1e6c0 + 0x1e6c0: 0x6cc15420, 0x1e6c1: 0x6c90ce20, 0x1e6c2: 0x6c81ea20, 0x1e6c3: 0x6c34c020, + 0x1e6c4: 0x6d34b420, 0x1e6c5: 0x6d0f3c20, 0x1e6c6: 0x6ce3cc20, 0x1e6c7: 0x6c2a4e20, + 0x1e6c8: 0x6d1d7420, 0x1e6c9: 0x6d249a20, 0x1e6ca: 0x6c17ce20, 0x1e6cb: 0x6d0b8220, + 0x1e6cc: 0x6c4ade20, 0x1e6cd: 0x6c756420, 0x1e6ce: 0x6cf08220, 0x1e6cf: 0x6d269e20, + 0x1e6d0: 0x6d032c20, 0x1e6d1: 0x6c275420, 0x1e6d2: 0x6d078a20, 0x1e6d3: 0x6c393e20, + 0x1e6d4: 0x6cc5e420, 0x1e6d5: 0x6cccde20, 0x1e6d6: 0x6c7bc020, 0x1e6d7: 0x6cd4d620, + 0x1e6d8: 0x6cea5220, 0x1e6d9: 0x6c18c420, 0x1e6da: 0x6c276820, 0x1e6db: 0x6c361c20, + 0x1e6dc: 0x6ca34020, 0x1e6dd: 0x6cb5dc20, 0x1e6de: 0x6c98de20, 0x1e6df: 0x6cc86020, + 0x1e6e0: 0x6cc5ec20, 0x1e6e1: 0x6cb98c20, 0x1e6e2: 0x6d3ba620, 0x1e6e3: 0x6c52a020, + 0x1e6e4: 0x6c54d220, 0x1e6e5: 0x6cc19c20, 0x1e6e6: 0x6c7bfa20, 0x1e6e7: 0x6c2bfc20, + 0x1e6e8: 0x6c8d1220, 0x1e6e9: 0x6c277420, 0x1e6ea: 0x6c022c20, 0x1e6eb: 0x6d31e220, + 0x1e6ec: 0x6c395620, 0x1e6ed: 0x6c7baa20, 0x1e6ee: 0x6d102220, 0x1e6ef: 0x6cae7420, + 0x1e6f0: 0x6c072820, 0x1e6f1: 0x6c471420, 0x1e6f2: 0x6c471620, 0x1e6f3: 0x6cad5e20, + 0x1e6f4: 0x6d3b0420, 0x1e6f5: 0x6cc71020, 0x1e6f6: 0x6c364a20, 0x1e6f7: 0x6c038420, + 0x1e6f8: 0x6d38d420, 0x1e6f9: 0x6d353020, 0x1e6fa: 0x6d110020, 0x1e6fb: 0x6c780020, + 0x1e6fc: 0x6d17ca20, 0x1e6fd: 0x6d364420, 0x1e6fe: 0x6cd3a820, 0x1e6ff: 0x6cb2b820, + // Block 0x79c, offset 0x1e700 + 0x1e700: 0x6c375e20, 0x1e701: 0x6c45f420, 0x1e702: 0x6c713a20, 0x1e703: 0x6c69a820, + 0x1e704: 0x6c49ee20, 0x1e705: 0x6c514c20, 0x1e706: 0x6c766420, 0x1e707: 0x6cc30820, + 0x1e708: 0x6d389420, 0x1e709: 0x6d293c20, 0x1e70a: 0x6d367220, 0x1e70b: 0x6ccef620, + 0x1e70c: 0x6c89c420, 0x1e70d: 0x6d23ae20, 0x1e70e: 0x6cce7c20, 0x1e70f: 0x6d1f5c20, + 0x1e710: 0x6ced9020, 0x1e711: 0x6d1af820, 0x1e712: 0x6d307420, 0x1e713: 0x6ced3e20, + 0x1e714: 0x6c3f7c20, 0x1e715: 0x6cbe5420, 0x1e716: 0x6d38a620, 0x1e717: 0x6ca60620, + 0x1e718: 0x6c838420, 0x1e719: 0x6d308420, 0x1e71a: 0x6d2e7a20, 0x1e71b: 0x6c89ca20, + 0x1e71c: 0x6d3e8220, 0x1e71d: 0x6c5aee20, 0x1e71e: 0x6cee3820, 0x1e71f: 0x6c21d220, + 0x1e720: 0x6c4ccc20, 0x1e721: 0x6c76e820, 0x1e722: 0x6d160a20, 0x1e723: 0x6caec220, + 0x1e724: 0x6cba7a20, 0x1e725: 0x6c4be620, 0x1e726: 0x6ca73a20, 0x1e727: 0x6cb2c820, + 0x1e728: 0x6c496020, 0x1e729: 0x6c075220, 0x1e72a: 0x6c950e20, 0x1e72b: 0x6cac0420, + 0x1e72c: 0x6c896c20, 0x1e72d: 0x6cc88020, 0x1e72e: 0x6cc76220, 0x1e72f: 0x6c631020, + 0x1e730: 0x6d0fda20, 0x1e731: 0x6cfba020, 0x1e732: 0x6c201020, 0x1e733: 0x6c23fe20, + 0x1e734: 0x6c211c20, 0x1e735: 0x6c443c20, 0x1e736: 0x6d1f7220, 0x1e737: 0x6c52cc20, + 0x1e738: 0x6cd50820, 0x1e739: 0x6c405820, 0x1e73a: 0x6d3e9420, 0x1e73b: 0x6c3efc20, + 0x1e73c: 0x6cf16820, 0x1e73d: 0x6c07cc20, 0x1e73e: 0x6d2e2020, 0x1e73f: 0x6d21c020, + // Block 0x79d, offset 0x1e740 + 0x1e740: 0x6cf16a20, 0x1e741: 0x6ce1f420, 0x1e742: 0x6c47dc20, 0x1e743: 0x6d319e20, + 0x1e744: 0x6cfa0220, 0x1e745: 0x6d25b820, 0x1e746: 0x6c931220, 0x1e747: 0x6c689e20, + 0x1e748: 0x6c178620, 0x1e749: 0x6d3bb420, 0x1e74a: 0x6cf0f820, 0x1e74b: 0x6c5d0420, + 0x1e74c: 0x6d098c20, 0x1e74d: 0x6d30b820, 0x1e74e: 0x6c69d020, 0x1e74f: 0x6d2e9020, + 0x1e750: 0x6c102620, 0x1e751: 0x6c81c620, 0x1e752: 0x6c3ba820, 0x1e753: 0x6c386a20, + 0x1e754: 0x6c8bfc20, 0x1e755: 0x6c445220, 0x1e756: 0x6ccb8e20, 0x1e757: 0x6c76fc20, + 0x1e758: 0x6c58be20, 0x1e759: 0x6d162820, 0x1e75a: 0x6c60f020, 0x1e75b: 0x6d3cc020, + 0x1e75c: 0x6c377820, 0x1e75d: 0x6d246820, 0x1e75e: 0x6c671c20, 0x1e75f: 0x6c52e020, + 0x1e760: 0x6c829220, 0x1e761: 0x6cae2c20, 0x1e762: 0x6c878420, 0x1e763: 0x6c879a20, + 0x1e764: 0x6c91a020, 0x1e765: 0x6c8c9220, 0x1e766: 0x6c17ca20, 0x1e767: 0x6d0b6a20, + 0x1e768: 0x6c4ac020, 0x1e769: 0x6d077a20, 0x1e76a: 0x6c272a20, 0x1e76b: 0x6cc5ca20, + 0x1e76c: 0x6d3ba020, 0x1e76d: 0x6c35e220, 0x1e76e: 0x6c94e020, 0x1e76f: 0x6cc85420, + 0x1e770: 0x6c529820, 0x1e771: 0x6c46fa20, 0x1e772: 0x6c77ec20, 0x1e773: 0x6c914820, + 0x1e774: 0x6d38d020, 0x1e775: 0x6d350a20, 0x1e776: 0x6d171020, 0x1e777: 0x6c54b220, + 0x1e778: 0x6d31c420, 0x1e779: 0x6c85ba20, 0x1e77a: 0x6d10dc20, 0x1e77b: 0x6cbe3620, + 0x1e77c: 0x6cd36220, 0x1e77d: 0x6d293420, 0x1e77e: 0x6d35d020, 0x1e77f: 0x6c699620, + // Block 0x79e, offset 0x1e780 + 0x1e780: 0x6d386c20, 0x1e781: 0x6cc2d020, 0x1e782: 0x6c922e20, 0x1e783: 0x6c699820, + 0x1e784: 0x6d305420, 0x1e785: 0x6c3f6020, 0x1e786: 0x6c89b220, 0x1e787: 0x6ca72a20, + 0x1e788: 0x6c072a20, 0x1e789: 0x6c5abc20, 0x1e78a: 0x6c4bcc20, 0x1e78b: 0x6cee2620, + 0x1e78c: 0x6c895820, 0x1e78d: 0x6c21c420, 0x1e78e: 0x6d3e4820, 0x1e78f: 0x6c23f420, + 0x1e790: 0x6c3eae20, 0x1e791: 0x6c630c20, 0x1e792: 0x6cf15e20, 0x1e793: 0x6cd4f020, + 0x1e794: 0x6cae2020, 0x1e795: 0x6d259a20, 0x1e796: 0x6cf9e220, 0x1e797: 0x6ca72e20, + 0x1e798: 0x6c92c420, 0x1e799: 0x6d309420, 0x1e79a: 0x6c8be220, 0x1e79b: 0x6d02ae20, + 0x1e79c: 0x6c471820, 0x1e79d: 0x6c224a20, 0x1e79e: 0x6c225220, 0x1e79f: 0x6cb0a820, + 0x1e7a0: 0x6d41ba20, 0x1e7a1: 0x6c0bb020, 0x1e7a2: 0x6c7e8e20, 0x1e7a3: 0x6c7e9020, + 0x1e7a4: 0x6c226020, 0x1e7a5: 0x6d08ea20, 0x1e7a6: 0x6c050620, 0x1e7a7: 0x6c0bc020, + 0x1e7a8: 0x6c0bc220, 0x1e7a9: 0x6c0bc420, 0x1e7aa: 0x6d08ec20, 0x1e7ab: 0x6c0bcc20, + 0x1e7ac: 0x6c04a820, 0x1e7ad: 0x6c227e20, 0x1e7ae: 0x6c0bd620, 0x1e7af: 0x6c0bda20, + 0x1e7b0: 0x6c18a020, 0x1e7b1: 0x6cc7fc20, 0x1e7b2: 0x6ca9bc20, 0x1e7b3: 0x6ca9c220, + 0x1e7b4: 0x6c160420, 0x1e7b5: 0x6c21a820, 0x1e7b6: 0x6c21a420, 0x1e7b7: 0x6d198820, + 0x1e7b8: 0x6cc61820, 0x1e7b9: 0x6c0ae820, 0x1e7ba: 0x6c0aea20, 0x1e7bb: 0x6cd22e20, + 0x1e7bc: 0x6cc83220, 0x1e7bd: 0x6c89d620, 0x1e7be: 0x6c267620, 0x1e7bf: 0x6c14b620, + // Block 0x79f, offset 0x1e7c0 + 0x1e7c0: 0x6c416420, 0x1e7c1: 0x6cb8a020, 0x1e7c2: 0x6d207620, 0x1e7c3: 0x6d207820, + 0x1e7c4: 0x6cb73420, 0x1e7c5: 0x6d0a6820, 0x1e7c6: 0x6d145820, 0x1e7c7: 0x6c4ce420, + 0x1e7c8: 0x6c972020, 0x1e7c9: 0x6cb4ca20, 0x1e7ca: 0x6d288620, 0x1e7cb: 0x6cee4a20, + 0x1e7cc: 0x6ce91e20, 0x1e7cd: 0x6d3cca20, 0x1e7ce: 0x6d1c5820, 0x1e7cf: 0x6ce3d620, + 0x1e7d0: 0x6d281620, 0x1e7d1: 0x6c6cd620, 0x1e7d2: 0x6c4f5c20, 0x1e7d3: 0x6d0b7a20, + 0x1e7d4: 0x6c390620, 0x1e7d5: 0x6cf4b020, 0x1e7d6: 0x6c267820, 0x1e7d7: 0x6c354c20, + 0x1e7d8: 0x6c4d1c20, 0x1e7d9: 0x6d30e420, 0x1e7da: 0x6d384c20, 0x1e7db: 0x6c6cd820, + 0x1e7dc: 0x6d25de20, 0x1e7dd: 0x6ceee420, 0x1e7de: 0x6c87ee20, 0x1e7df: 0x6c1b0220, + 0x1e7e0: 0x6c180420, 0x1e7e1: 0x6ca68020, 0x1e7e2: 0x6ce57420, 0x1e7e3: 0x6d359020, + 0x1e7e4: 0x6d147c20, 0x1e7e5: 0x6c6efc20, 0x1e7e6: 0x6c633220, 0x1e7e7: 0x6c18a620, + 0x1e7e8: 0x6c273a20, 0x1e7e9: 0x6c378820, 0x1e7ea: 0x6c2b5e20, 0x1e7eb: 0x6cb36a20, + 0x1e7ec: 0x6d3ab620, 0x1e7ed: 0x6c2e6420, 0x1e7ee: 0x6d2ab020, 0x1e7ef: 0x6ce20620, + 0x1e7f0: 0x6cd5a220, 0x1e7f1: 0x6ceaf620, 0x1e7f2: 0x6cc28620, 0x1e7f3: 0x6c6e5020, + 0x1e7f4: 0x6c5b2a20, 0x1e7f5: 0x6c306820, 0x1e7f6: 0x6d203420, 0x1e7f7: 0x6c9c4020, + 0x1e7f8: 0x6c083c20, 0x1e7f9: 0x6c5e9c20, 0x1e7fa: 0x6ca39c20, 0x1e7fb: 0x6d14b220, + 0x1e7fc: 0x6c6a9a20, 0x1e7fd: 0x6d3c5820, 0x1e7fe: 0x6c8ade20, 0x1e7ff: 0x6d0a7420, + // Block 0x7a0, offset 0x1e800 + 0x1e800: 0x6ce9f620, 0x1e801: 0x6cd98420, 0x1e802: 0x6cd34a20, 0x1e803: 0x6ce20e20, + 0x1e804: 0x6cacf820, 0x1e805: 0x6c546820, 0x1e806: 0x6ca68a20, 0x1e807: 0x6c33e420, + 0x1e808: 0x6c6f0420, 0x1e809: 0x6d084620, 0x1e80a: 0x6d0a7620, 0x1e80b: 0x6c101220, + 0x1e80c: 0x6d1e9c20, 0x1e80d: 0x6cfeac20, 0x1e80e: 0x6cc03a20, 0x1e80f: 0x6ce82420, + 0x1e810: 0x6d3a0a20, 0x1e811: 0x6cc03c20, 0x1e812: 0x6c2c3420, 0x1e813: 0x6c2c3620, + 0x1e814: 0x6ce89a20, 0x1e815: 0x6c6e6c20, 0x1e816: 0x6ce3e620, 0x1e817: 0x6c310a20, + 0x1e818: 0x6d15e020, 0x1e819: 0x6d30ee20, 0x1e81a: 0x6ce6f220, 0x1e81b: 0x6c4a2020, + 0x1e81c: 0x6cf4da20, 0x1e81d: 0x6cd36420, 0x1e81e: 0x6c1a6a20, 0x1e81f: 0x6cda9820, + 0x1e820: 0x6d2a7a20, 0x1e821: 0x6cc43620, 0x1e822: 0x6c3ca420, 0x1e823: 0x6c87fa20, + 0x1e824: 0x6cddc820, 0x1e825: 0x6c5b3220, 0x1e826: 0x6c850e20, 0x1e827: 0x6c483620, + 0x1e828: 0x6c7f0220, 0x1e829: 0x6c07b820, 0x1e82a: 0x6c262420, 0x1e82b: 0x6c743e20, + 0x1e82c: 0x6c083e20, 0x1e82d: 0x6c591820, 0x1e82e: 0x6c271620, 0x1e82f: 0x6c924a20, + 0x1e830: 0x6d1f3220, 0x1e831: 0x6d387c20, 0x1e832: 0x6c6d0820, 0x1e833: 0x6d232620, + 0x1e834: 0x6c219620, 0x1e835: 0x6c7c6820, 0x1e836: 0x6cee7620, 0x1e837: 0x6ce3f020, + 0x1e838: 0x6d178420, 0x1e839: 0x6c26a220, 0x1e83a: 0x6d25e620, 0x1e83b: 0x6c954420, + 0x1e83c: 0x6c087420, 0x1e83d: 0x6caaf220, 0x1e83e: 0x6d213a20, 0x1e83f: 0x6c296a20, + // Block 0x7a1, offset 0x1e840 + 0x1e840: 0x6cdbf620, 0x1e841: 0x6c33f420, 0x1e842: 0x6cdc4220, 0x1e843: 0x6d0d9820, + 0x1e844: 0x6c1ffc20, 0x1e845: 0x6c1b2c20, 0x1e846: 0x6ce33420, 0x1e847: 0x6d235c20, + 0x1e848: 0x6cd26c20, 0x1e849: 0x6d315a20, 0x1e84a: 0x6d1f4020, 0x1e84b: 0x6d283820, + 0x1e84c: 0x6c364c20, 0x1e84d: 0x6c0ba420, 0x1e84e: 0x6c4cec20, 0x1e84f: 0x6c364e20, + 0x1e850: 0x6cf9ca20, 0x1e851: 0x6c59ca20, 0x1e852: 0x6cc07020, 0x1e853: 0x6c2a1820, + 0x1e854: 0x6c26ac20, 0x1e855: 0x6cef1620, 0x1e856: 0x6ca45020, 0x1e857: 0x6d150820, + 0x1e858: 0x6c46be20, 0x1e859: 0x6d111620, 0x1e85a: 0x6c1e4620, 0x1e85b: 0x6c8e7420, + 0x1e85c: 0x6d0a9820, 0x1e85d: 0x6cde6c20, 0x1e85e: 0x6c2c7420, 0x1e85f: 0x6c1b4020, + 0x1e860: 0x6d25ec20, 0x1e861: 0x6cdada20, 0x1e862: 0x6cde6e20, 0x1e863: 0x6cba1420, + 0x1e864: 0x6c96f220, 0x1e865: 0x6d111820, 0x1e866: 0x6c499c20, 0x1e867: 0x6d2ed220, + 0x1e868: 0x6c025820, 0x1e869: 0x6cd3bc20, 0x1e86a: 0x6c10ea20, 0x1e86b: 0x6c1c4e20, + 0x1e86c: 0x6cdaf620, 0x1e86d: 0x6d2a1c20, 0x1e86e: 0x6d300420, 0x1e86f: 0x6c340220, + 0x1e870: 0x6c2c8820, 0x1e871: 0x6c90ac20, 0x1e872: 0x6c1b5020, 0x1e873: 0x6c25c220, + 0x1e874: 0x6c8bd620, 0x1e875: 0x6d41f020, 0x1e876: 0x6cc54820, 0x1e877: 0x6cb91820, + 0x1e878: 0x6d085820, 0x1e879: 0x6d23d620, 0x1e87a: 0x6d154e20, 0x1e87b: 0x6cf51c20, + 0x1e87c: 0x6c8a1620, 0x1e87d: 0x6c729820, 0x1e87e: 0x6cd3e220, 0x1e87f: 0x6c0a6020, + // Block 0x7a2, offset 0x1e880 + 0x1e880: 0x6d10bc20, 0x1e881: 0x6c974220, 0x1e882: 0x6d022220, 0x1e883: 0x6cdc9420, + 0x1e884: 0x6c4d2a20, 0x1e885: 0x6d2d9e20, 0x1e886: 0x6ce2b020, 0x1e887: 0x6c37aa20, + 0x1e888: 0x6c9ea220, 0x1e889: 0x6c0b0c20, 0x1e88a: 0x6c0b1420, 0x1e88b: 0x6c7e5220, + 0x1e88c: 0x6c847a20, 0x1e88d: 0x6d25c820, 0x1e88e: 0x6d117620, 0x1e88f: 0x6c957c20, + 0x1e890: 0x6c854c20, 0x1e891: 0x6d169e20, 0x1e892: 0x6ce65a20, 0x1e893: 0x6c2ad420, + 0x1e894: 0x6cb6c420, 0x1e895: 0x6d1d8220, 0x1e896: 0x6cccb420, 0x1e897: 0x6c4dc820, + 0x1e898: 0x6d20a420, 0x1e899: 0x6c982220, 0x1e89a: 0x6cc78820, 0x1e89b: 0x6cbef620, + 0x1e89c: 0x6cedb420, 0x1e89d: 0x6c7bd620, 0x1e89e: 0x6c3d3620, 0x1e89f: 0x6c777a20, + 0x1e8a0: 0x6c0d2020, 0x1e8a1: 0x6c398220, 0x1e8a2: 0x6d03bc20, 0x1e8a3: 0x6ca30220, + 0x1e8a4: 0x6d02a620, 0x1e8a5: 0x6cd04220, 0x1e8a6: 0x6c051620, 0x1e8a7: 0x6d253620, + 0x1e8a8: 0x6c259020, 0x1e8a9: 0x6c5d8a20, 0x1e8aa: 0x6d006a20, 0x1e8ab: 0x6c052c20, + 0x1e8ac: 0x6cf34e20, 0x1e8ad: 0x6c720220, 0x1e8ae: 0x6d1ef620, 0x1e8af: 0x6c4dd020, + 0x1e8b0: 0x6cdf1220, 0x1e8b1: 0x6cbf9820, 0x1e8b2: 0x6c092220, 0x1e8b3: 0x6caf2e20, + 0x1e8b4: 0x6c0dbe20, 0x1e8b5: 0x6ccec620, 0x1e8b6: 0x6c06de20, 0x1e8b7: 0x6cec1020, + 0x1e8b8: 0x6c2bd020, 0x1e8b9: 0x6d404620, 0x1e8ba: 0x6d12c820, 0x1e8bb: 0x6c8b9e20, + 0x1e8bc: 0x6c7b8820, 0x1e8bd: 0x6c4a3c20, 0x1e8be: 0x6d398620, 0x1e8bf: 0x6cd19e20, + // Block 0x7a3, offset 0x1e8c0 + 0x1e8c0: 0x6c7a2c20, 0x1e8c1: 0x6d22dc20, 0x1e8c2: 0x6c40e020, 0x1e8c3: 0x6c50ce20, + 0x1e8c4: 0x6cbc9a20, 0x1e8c5: 0x6d359420, 0x1e8c6: 0x6c5fe620, 0x1e8c7: 0x6c585c20, + 0x1e8c8: 0x6c545e20, 0x1e8c9: 0x6d03c820, 0x1e8ca: 0x6c682a20, 0x1e8cb: 0x6cf76a20, + 0x1e8cc: 0x6c4a7620, 0x1e8cd: 0x6caab420, 0x1e8ce: 0x6c80a220, 0x1e8cf: 0x6c63a620, + 0x1e8d0: 0x6c7b1420, 0x1e8d1: 0x6d333e20, 0x1e8d2: 0x6c813820, 0x1e8d3: 0x6d281e20, + 0x1e8d4: 0x6d0c6c20, 0x1e8d5: 0x6c19c220, 0x1e8d6: 0x6c30fc20, 0x1e8d7: 0x6cf5ae20, + 0x1e8d8: 0x6c935220, 0x1e8d9: 0x6c3f4e20, 0x1e8da: 0x6cf3aa20, 0x1e8db: 0x6c3e2620, + 0x1e8dc: 0x6c433e20, 0x1e8dd: 0x6c500a20, 0x1e8de: 0x6c80a420, 0x1e8df: 0x6c63aa20, + 0x1e8e0: 0x6c44f020, 0x1e8e1: 0x6c759a20, 0x1e8e2: 0x6d1ce220, 0x1e8e3: 0x6c0eca20, + 0x1e8e4: 0x6cf86820, 0x1e8e5: 0x6c06f420, 0x1e8e6: 0x6c85bc20, 0x1e8e7: 0x6d279220, + 0x1e8e8: 0x6c108c20, 0x1e8e9: 0x6cff7a20, 0x1e8ea: 0x6cb4e020, 0x1e8eb: 0x6cafd420, + 0x1e8ec: 0x6cbe3c20, 0x1e8ed: 0x6c4c1a20, 0x1e8ee: 0x6d386e20, 0x1e8ef: 0x6cdfd820, + 0x1e8f0: 0x6d404c20, 0x1e8f1: 0x6cb27e20, 0x1e8f2: 0x6c7ef020, 0x1e8f3: 0x6ca5d020, + 0x1e8f4: 0x6c186220, 0x1e8f5: 0x6d1f2420, 0x1e8f6: 0x6c10b420, 0x1e8f7: 0x6cfd6820, + 0x1e8f8: 0x6c27d020, 0x1e8f9: 0x6c711e20, 0x1e8fa: 0x6d1dba20, 0x1e8fb: 0x6cbb7420, + 0x1e8fc: 0x6d13ea20, 0x1e8fd: 0x6c30a620, 0x1e8fe: 0x6d0d7220, 0x1e8ff: 0x6c99f220, + // Block 0x7a4, offset 0x1e900 + 0x1e900: 0x6cc91a20, 0x1e901: 0x6c071820, 0x1e902: 0x6c361e20, 0x1e903: 0x6cd4d820, + 0x1e904: 0x6c735e20, 0x1e905: 0x6d225220, 0x1e906: 0x6d282820, 0x1e907: 0x6c53f420, + 0x1e908: 0x6c7c6a20, 0x1e909: 0x6cfd6e20, 0x1e90a: 0x6cfd7020, 0x1e90b: 0x6cd9a820, + 0x1e90c: 0x6ce0f820, 0x1e90d: 0x6ca00220, 0x1e90e: 0x6cf63220, 0x1e90f: 0x6cc7fe20, + 0x1e910: 0x6c1f4c20, 0x1e911: 0x6d3e4a20, 0x1e912: 0x6d405820, 0x1e913: 0x6d12f820, + 0x1e914: 0x6cf36c20, 0x1e915: 0x6cfd7c20, 0x1e916: 0x6d27a820, 0x1e917: 0x6c504220, + 0x1e918: 0x6d1d9220, 0x1e919: 0x6c08e620, 0x1e91a: 0x6c998820, 0x1e91b: 0x6c176420, + 0x1e91c: 0x6c3d8620, 0x1e91d: 0x6c8a6e20, 0x1e91e: 0x6d1a7820, 0x1e91f: 0x6d3b8020, + 0x1e920: 0x6c56a820, 0x1e921: 0x6cbb8220, 0x1e922: 0x6d0c1820, 0x1e923: 0x6d2ebc20, + 0x1e924: 0x6c97e020, 0x1e925: 0x6cbb8420, 0x1e926: 0x6d065020, 0x1e927: 0x6c2adc20, + 0x1e928: 0x6c0a9c20, 0x1e929: 0x6d0a2820, 0x1e92a: 0x6c0a0c20, 0x1e92b: 0x6d2b8420, + 0x1e92c: 0x6cef2620, 0x1e92d: 0x6d335820, 0x1e92e: 0x6c99a820, 0x1e92f: 0x6ccd9620, + 0x1e930: 0x6c8bc820, 0x1e931: 0x6cb33420, 0x1e932: 0x6c27f020, 0x1e933: 0x6c9b4020, + 0x1e934: 0x6d133220, 0x1e935: 0x6c12b820, 0x1e936: 0x6c7b3620, 0x1e937: 0x6c3c6420, + 0x1e938: 0x6c9b4220, 0x1e939: 0x6d406420, 0x1e93a: 0x6c7c0220, 0x1e93b: 0x6c88d020, + 0x1e93c: 0x6d29a220, 0x1e93d: 0x6c153020, 0x1e93e: 0x6d1eb820, 0x1e93f: 0x6c5f6420, + // Block 0x7a5, offset 0x1e940 + 0x1e940: 0x6d0ed820, 0x1e941: 0x6c154820, 0x1e942: 0x6c25f820, 0x1e943: 0x6c8d8820, + 0x1e944: 0x6c583a20, 0x1e945: 0x6cf74020, 0x1e946: 0x6c3c7820, 0x1e947: 0x6d29b620, + 0x1e948: 0x6c875820, 0x1e949: 0x6d1fa420, 0x1e94a: 0x6c2f5a20, 0x1e94b: 0x6cc02020, + 0x1e94c: 0x6d3d4020, 0x1e94d: 0x6cae1820, 0x1e94e: 0x6d391e20, 0x1e94f: 0x6d15e220, + 0x1e950: 0x6c418e20, 0x1e951: 0x6d20fe20, 0x1e952: 0x6c6fba20, 0x1e953: 0x6d0d7420, + 0x1e954: 0x6d41ae20, 0x1e955: 0x6c98e020, 0x1e956: 0x6d323e20, 0x1e957: 0x6d06c820, + 0x1e958: 0x6c311820, 0x1e959: 0x6d315420, 0x1e95a: 0x6c3b3020, 0x1e95b: 0x6d263e20, + 0x1e95c: 0x6c40ae20, 0x1e95d: 0x6d282a20, 0x1e95e: 0x6cdf7220, 0x1e95f: 0x6ce46a20, + 0x1e960: 0x6cb83a20, 0x1e961: 0x6ceb2c20, 0x1e962: 0x6c243e20, 0x1e963: 0x6c4da820, + 0x1e964: 0x6c471a20, 0x1e965: 0x6cda5020, 0x1e966: 0x6c37ee20, 0x1e967: 0x6c1dc620, + 0x1e968: 0x6d293e20, 0x1e969: 0x6ca03a20, 0x1e96a: 0x6c81d620, 0x1e96b: 0x6c21ca20, + 0x1e96c: 0x6c1e4e20, 0x1e96d: 0x6d205020, 0x1e96e: 0x6ce76020, 0x1e96f: 0x6d353c20, + 0x1e970: 0x6cfab420, 0x1e971: 0x6c67ec20, 0x1e972: 0x6c1a3020, 0x1e973: 0x6d1b6c20, + 0x1e974: 0x6ce8e220, 0x1e975: 0x6c69b220, 0x1e976: 0x6c9a1a20, 0x1e977: 0x6c7aa420, + 0x1e978: 0x6cdb8820, 0x1e979: 0x6c833c20, 0x1e97a: 0x6cb44420, 0x1e97b: 0x6d41c220, + 0x1e97c: 0x6c4d4420, 0x1e97d: 0x6d0e9c20, 0x1e97e: 0x6ccc8c20, 0x1e97f: 0x6ca77e20, + // Block 0x7a6, offset 0x1e980 + 0x1e980: 0x6cef3420, 0x1e981: 0x6c92c620, 0x1e982: 0x6c803620, 0x1e983: 0x6d0c2c20, + 0x1e984: 0x6ce23820, 0x1e985: 0x6cadc220, 0x1e986: 0x6d2e1220, 0x1e987: 0x6c215e20, + 0x1e988: 0x6ce00a20, 0x1e989: 0x6d41ca20, 0x1e98a: 0x6d3ca620, 0x1e98b: 0x6c246020, + 0x1e98c: 0x6c7d8220, 0x1e98d: 0x6ce38220, 0x1e98e: 0x6cfba220, 0x1e98f: 0x6c317620, + 0x1e990: 0x6c55c420, 0x1e991: 0x6d065c20, 0x1e992: 0x6d040820, 0x1e993: 0x6ce07c20, + 0x1e994: 0x6cc09a20, 0x1e995: 0x6c216420, 0x1e996: 0x6d285a20, 0x1e997: 0x6cb3a620, + 0x1e998: 0x6c783620, 0x1e999: 0x6cd9e620, 0x1e99a: 0x6c9c7620, 0x1e99b: 0x6cc31820, + 0x1e99c: 0x6c1e3220, 0x1e99d: 0x6c25cc20, 0x1e99e: 0x6d285e20, 0x1e99f: 0x6d1e7e20, + 0x1e9a0: 0x6c022220, 0x1e9a1: 0x6d2ce420, 0x1e9a2: 0x6c4d4a20, 0x1e9a3: 0x6ce14a20, + 0x1e9a4: 0x6c680020, 0x1e9a5: 0x6cb1a220, 0x1e9a6: 0x6c191820, 0x1e9a7: 0x6d244020, + 0x1e9a8: 0x6c846620, 0x1e9a9: 0x6d2a2c20, 0x1e9aa: 0x6c818620, 0x1e9ab: 0x6d142c20, + 0x1e9ac: 0x6c680a20, 0x1e9ad: 0x6c102820, 0x1e9ae: 0x6c69d420, 0x1e9af: 0x6cf71e20, + 0x1e9b0: 0x6ce03c20, 0x1e9b1: 0x6c37f220, 0x1e9b2: 0x6ca9dc20, 0x1e9b3: 0x6d193620, + 0x1e9b4: 0x6c854620, 0x1e9b5: 0x6c72c020, 0x1e9b6: 0x6d0efc20, 0x1e9b7: 0x6d193820, + 0x1e9b8: 0x6ca78020, 0x1e9b9: 0x6cc7ec20, 0x1e9ba: 0x6d09cc20, 0x1e9bb: 0x6c1e0a20, + 0x1e9bc: 0x6d0f1220, 0x1e9bd: 0x6c8db420, 0x1e9be: 0x6c9cc820, 0x1e9bf: 0x6c9cca20, + // Block 0x7a7, offset 0x1e9c0 + 0x1e9c0: 0x6ca78420, 0x1e9c1: 0x6d036020, 0x1e9c2: 0x6c69ea20, 0x1e9c3: 0x6ccc9620, + 0x1e9c4: 0x6c9cd420, 0x1e9c5: 0x6d0f2420, 0x1e9c6: 0x6c0b7820, 0x1e9c7: 0x6c111e20, + 0x1e9c8: 0x6cd37620, 0x1e9c9: 0x6d204a20, 0x1e9ca: 0x6cd39220, 0x1e9cb: 0x6cd40220, + 0x1e9cc: 0x6c84fc20, 0x1e9cd: 0x6d382020, 0x1e9ce: 0x6d12aa20, 0x1e9cf: 0x6c89c020, + 0x1e9d0: 0x6c847c20, 0x1e9d1: 0x6c6c2e20, 0x1e9d2: 0x6c6d7c20, 0x1e9d3: 0x6cc02220, + 0x1e9d4: 0x6d15d820, 0x1e9d5: 0x6c8a6c20, 0x1e9d6: 0x6c29c020, 0x1e9d7: 0x6d2f6220, + 0x1e9d8: 0x6c2f5c20, 0x1e9d9: 0x6cb38220, 0x1e9da: 0x6cc04220, 0x1e9db: 0x6c034220, + 0x1e9dc: 0x6c3f5620, 0x1e9dd: 0x6d314820, 0x1e9de: 0x6d344a20, 0x1e9df: 0x6c034420, + 0x1e9e0: 0x6c949820, 0x1e9e1: 0x6c3f5820, 0x1e9e2: 0x6ca3a020, 0x1e9e3: 0x6c2e2020, + 0x1e9e4: 0x6ccd8620, 0x1e9e5: 0x6cbc2220, 0x1e9e6: 0x6c79ea20, 0x1e9e7: 0x6c203420, + 0x1e9e8: 0x6d3f0e20, 0x1e9e9: 0x6c390e20, 0x1e9ea: 0x6c573620, 0x1e9eb: 0x6c573820, + 0x1e9ec: 0x6c4eb820, 0x1e9ed: 0x6c427c20, 0x1e9ee: 0x6cb5de20, 0x1e9ef: 0x6c985c20, + 0x1e9f0: 0x6cc64620, 0x1e9f1: 0x6c2c5220, 0x1e9f2: 0x6cd8be20, 0x1e9f3: 0x6cf87e20, + 0x1e9f4: 0x6d178620, 0x1e9f5: 0x6c146620, 0x1e9f6: 0x6cd1b620, 0x1e9f7: 0x6ce91a20, + 0x1e9f8: 0x6cf60620, 0x1e9f9: 0x6caa7420, 0x1e9fa: 0x6cb8dc20, 0x1e9fb: 0x6cc0c020, + 0x1e9fc: 0x6c668420, 0x1e9fd: 0x6cb09a20, 0x1e9fe: 0x6d128220, 0x1e9ff: 0x6c6c4820, + // Block 0x7a8, offset 0x1ea00 + 0x1ea00: 0x6c03a020, 0x1ea01: 0x6c399620, 0x1ea02: 0x6c18d020, 0x1ea03: 0x6d03ee20, + 0x1ea04: 0x6c30ee20, 0x1ea05: 0x6d26c220, 0x1ea06: 0x6cb8e620, 0x1ea07: 0x6c3d7820, + 0x1ea08: 0x6caf6820, 0x1ea09: 0x6ca34820, 0x1ea0a: 0x6d02d820, 0x1ea0b: 0x6c356e20, + 0x1ea0c: 0x6c746020, 0x1ea0d: 0x6c33f820, 0x1ea0e: 0x6c464c20, 0x1ea0f: 0x6d1ae620, + 0x1ea10: 0x6cb99a20, 0x1ea11: 0x6c04ce20, 0x1ea12: 0x6cc97620, 0x1ea13: 0x6cc57220, + 0x1ea14: 0x6c174a20, 0x1ea15: 0x6ca99620, 0x1ea16: 0x6c3b3220, 0x1ea17: 0x6d27ec20, + 0x1ea18: 0x6c614620, 0x1ea19: 0x6cbd7820, 0x1ea1a: 0x6caf6a20, 0x1ea1b: 0x6c4c2020, + 0x1ea1c: 0x6c535a20, 0x1ea1d: 0x6d1a6c20, 0x1ea1e: 0x6c757220, 0x1ea1f: 0x6cd1ca20, + 0x1ea20: 0x6d17ce20, 0x1ea21: 0x6d37ba20, 0x1ea22: 0x6cf7f020, 0x1ea23: 0x6c413a20, + 0x1ea24: 0x6cc64820, 0x1ea25: 0x6c5d8e20, 0x1ea26: 0x6cdf7620, 0x1ea27: 0x6c778820, + 0x1ea28: 0x6d264020, 0x1ea29: 0x6c934a20, 0x1ea2a: 0x6c365020, 0x1ea2b: 0x6cf21c20, + 0x1ea2c: 0x6c345420, 0x1ea2d: 0x6d3e7220, 0x1ea2e: 0x6ca64020, 0x1ea2f: 0x6ce8d020, + 0x1ea30: 0x6cd3aa20, 0x1ea31: 0x6c9f6820, 0x1ea32: 0x6c472220, 0x1ea33: 0x6c780e20, + 0x1ea34: 0x6c8d2420, 0x1ea35: 0x6c0dec20, 0x1ea36: 0x6cd8d020, 0x1ea37: 0x6c47a420, + 0x1ea38: 0x6c0f1c20, 0x1ea39: 0x6caf7820, 0x1ea3a: 0x6d238420, 0x1ea3b: 0x6cd8d220, + 0x1ea3c: 0x6d424820, 0x1ea3d: 0x6c101820, 0x1ea3e: 0x6d1f5020, 0x1ea3f: 0x6ce4b020, + // Block 0x7a9, offset 0x1ea40 + 0x1ea40: 0x6c642220, 0x1ea41: 0x6d317620, 0x1ea42: 0x6cd2d420, 0x1ea43: 0x6cd3ac20, + 0x1ea44: 0x6d347a20, 0x1ea45: 0x6c725220, 0x1ea46: 0x6c14d220, 0x1ea47: 0x6cd1da20, + 0x1ea48: 0x6cd1dc20, 0x1ea49: 0x6d089e20, 0x1ea4a: 0x6d2f6820, 0x1ea4b: 0x6c065420, + 0x1ea4c: 0x6c514e20, 0x1ea4d: 0x6c09e620, 0x1ea4e: 0x6cd10e20, 0x1ea4f: 0x6c1e9620, + 0x1ea50: 0x6cd27820, 0x1ea51: 0x6c0f1e20, 0x1ea52: 0x6d3b0e20, 0x1ea53: 0x6c1c3820, + 0x1ea54: 0x6d289220, 0x1ea55: 0x6cb31420, 0x1ea56: 0x6ce76220, 0x1ea57: 0x6cb9aa20, + 0x1ea58: 0x6c3eb020, 0x1ea59: 0x6d2d3020, 0x1ea5a: 0x6c8f0c20, 0x1ea5b: 0x6cb8f820, + 0x1ea5c: 0x6c3eb220, 0x1ea5d: 0x6c864020, 0x1ea5e: 0x6d26ca20, 0x1ea5f: 0x6caf7a20, + 0x1ea60: 0x6d0f5e20, 0x1ea61: 0x6c04fe20, 0x1ea62: 0x6c0e8020, 0x1ea63: 0x6c6b0020, + 0x1ea64: 0x6c465420, 0x1ea65: 0x6cd5ec20, 0x1ea66: 0x6d32da20, 0x1ea67: 0x6ca24c20, + 0x1ea68: 0x6cf7f220, 0x1ea69: 0x6cf7f420, 0x1ea6a: 0x6c2c7620, 0x1ea6b: 0x6c637420, + 0x1ea6c: 0x6ca29e20, 0x1ea6d: 0x6ce06420, 0x1ea6e: 0x6c588820, 0x1ea6f: 0x6d15f220, + 0x1ea70: 0x6cd7fa20, 0x1ea71: 0x6c7bfe20, 0x1ea72: 0x6c761e20, 0x1ea73: 0x6c06ce20, + 0x1ea74: 0x6c66a020, 0x1ea75: 0x6ce77020, 0x1ea76: 0x6d03f420, 0x1ea77: 0x6c537820, + 0x1ea78: 0x6c691c20, 0x1ea79: 0x6c1bbc20, 0x1ea7a: 0x6c37d820, 0x1ea7b: 0x6c961a20, + 0x1ea7c: 0x6c0dee20, 0x1ea7d: 0x6cd3be20, 0x1ea7e: 0x6ca1dc20, 0x1ea7f: 0x6c637820, + // Block 0x7aa, offset 0x1ea80 + 0x1ea80: 0x6d1a8620, 0x1ea81: 0x6c757c20, 0x1ea82: 0x6d389e20, 0x1ea83: 0x6c1d5620, + 0x1ea84: 0x6cfdf620, 0x1ea85: 0x6ce77220, 0x1ea86: 0x6ca14220, 0x1ea87: 0x6c833e20, + 0x1ea88: 0x6c5f0e20, 0x1ea89: 0x6d23b020, 0x1ea8a: 0x6d071e20, 0x1ea8b: 0x6cc57820, + 0x1ea8c: 0x6d421a20, 0x1ea8d: 0x6d36a220, 0x1ea8e: 0x6cbf4c20, 0x1ea8f: 0x6ccd8e20, + 0x1ea90: 0x6c1c5020, 0x1ea91: 0x6cfc2220, 0x1ea92: 0x6d03f620, 0x1ea93: 0x6cc30e20, + 0x1ea94: 0x6caf8020, 0x1ea95: 0x6ce5fe20, 0x1ea96: 0x6d39c020, 0x1ea97: 0x6cfe4820, + 0x1ea98: 0x6ca01220, 0x1ea99: 0x6c7ada20, 0x1ea9a: 0x6d112c20, 0x1ea9b: 0x6cfac220, + 0x1ea9c: 0x6cfb7620, 0x1ea9d: 0x6d04ea20, 0x1ea9e: 0x6c757e20, 0x1ea9f: 0x6c13aa20, + 0x1eaa0: 0x6c81b620, 0x1eaa1: 0x6c607820, 0x1eaa2: 0x6cb06620, 0x1eaa3: 0x6cc7ba20, + 0x1eaa4: 0x6c9cfe20, 0x1eaa5: 0x6d140820, 0x1eaa6: 0x6d19fa20, 0x1eaa7: 0x6c49f220, + 0x1eaa8: 0x6c019020, 0x1eaa9: 0x6c2fd420, 0x1eaaa: 0x6d1fe020, 0x1eaab: 0x6ccb3820, + 0x1eaac: 0x6c77c620, 0x1eaad: 0x6cb9b620, 0x1eaae: 0x6c944220, 0x1eaaf: 0x6cd90020, + 0x1eab0: 0x6c003020, 0x1eab1: 0x6c2e3220, 0x1eab2: 0x6c4efe20, 0x1eab3: 0x6cc8de20, + 0x1eab4: 0x6cd3cc20, 0x1eab5: 0x6c795020, 0x1eab6: 0x6cc09220, 0x1eab7: 0x6cff0c20, + 0x1eab8: 0x6d308620, 0x1eab9: 0x6d054e20, 0x1eaba: 0x6d2a0c20, 0x1eabb: 0x6ce37020, + 0x1eabc: 0x6c263820, 0x1eabd: 0x6c487020, 0x1eabe: 0x6c53d220, 0x1eabf: 0x6d37c820, + // Block 0x7ab, offset 0x1eac0 + 0x1eac0: 0x6ce7de20, 0x1eac1: 0x6c93ac20, 0x1eac2: 0x6c9a2220, 0x1eac3: 0x6c80e220, + 0x1eac4: 0x6ced4a20, 0x1eac5: 0x6d02e620, 0x1eac6: 0x6d27c420, 0x1eac7: 0x6c075420, + 0x1eac8: 0x6cf51e20, 0x1eac9: 0x6cdb0c20, 0x1eaca: 0x6d23dc20, 0x1eacb: 0x6c151420, + 0x1eacc: 0x6c2fb620, 0x1eacd: 0x6c0f4e20, 0x1eace: 0x6c4f0020, 0x1eacf: 0x6c63de20, + 0x1ead0: 0x6c538420, 0x1ead1: 0x6c249220, 0x1ead2: 0x6c3c6620, 0x1ead3: 0x6c14d620, + 0x1ead4: 0x6ced4c20, 0x1ead5: 0x6d36d020, 0x1ead6: 0x6cd82620, 0x1ead7: 0x6d07ca20, + 0x1ead8: 0x6c575620, 0x1ead9: 0x6d228220, 0x1eada: 0x6ce59e20, 0x1eadb: 0x6c45fa20, + 0x1eadc: 0x6d3d9420, 0x1eadd: 0x6c94bc20, 0x1eade: 0x6d03fc20, 0x1eadf: 0x6cbde620, + 0x1eae0: 0x6cd0c420, 0x1eae1: 0x6c4e2e20, 0x1eae2: 0x6c94be20, 0x1eae3: 0x6d128a20, + 0x1eae4: 0x6c1eac20, 0x1eae5: 0x6d2bae20, 0x1eae6: 0x6c70c420, 0x1eae7: 0x6cfd0220, + 0x1eae8: 0x6ce60020, 0x1eae9: 0x6c987020, 0x1eaea: 0x6cb4b420, 0x1eaeb: 0x6c843620, + 0x1eaec: 0x6cacc020, 0x1eaed: 0x6cc8e020, 0x1eaee: 0x6c1a3220, 0x1eaef: 0x6c435820, + 0x1eaf0: 0x6c852820, 0x1eaf1: 0x6ce28220, 0x1eaf2: 0x6c0e4420, 0x1eaf3: 0x6d3b2420, + 0x1eaf4: 0x6d327e20, 0x1eaf5: 0x6ce87a20, 0x1eaf6: 0x6c8f1820, 0x1eaf7: 0x6d41d420, + 0x1eaf8: 0x6c729a20, 0x1eaf9: 0x6c16fa20, 0x1eafa: 0x6d25f020, 0x1eafb: 0x6c66d820, + 0x1eafc: 0x6c429220, 0x1eafd: 0x6c2e4020, 0x1eafe: 0x6ce24020, 0x1eaff: 0x6c16c620, + // Block 0x7ac, offset 0x1eb00 + 0x1eb00: 0x6c951020, 0x1eb01: 0x6c4cd020, 0x1eb02: 0x6c8d5c20, 0x1eb03: 0x6c06ba20, + 0x1eb04: 0x6c92de20, 0x1eb05: 0x6c845020, 0x1eb06: 0x6cbade20, 0x1eb07: 0x6cb3e220, + 0x1eb08: 0x6c732e20, 0x1eb09: 0x6c9f7a20, 0x1eb0a: 0x6d41d620, 0x1eb0b: 0x6caeca20, + 0x1eb0c: 0x6c01d020, 0x1eb0d: 0x6caf9020, 0x1eb0e: 0x6cfd1420, 0x1eb0f: 0x6d0afa20, + 0x1eb10: 0x6d3c6820, 0x1eb11: 0x6c834620, 0x1eb12: 0x6c783220, 0x1eb13: 0x6c798a20, + 0x1eb14: 0x6cdea820, 0x1eb15: 0x6c7d8420, 0x1eb16: 0x6c31bc20, 0x1eb17: 0x6ca59020, + 0x1eb18: 0x6c20e220, 0x1eb19: 0x6d3e9820, 0x1eb1a: 0x6d32ec20, 0x1eb1b: 0x6c078c20, + 0x1eb1c: 0x6ca87620, 0x1eb1d: 0x6d403620, 0x1eb1e: 0x6c216620, 0x1eb1f: 0x6ce01420, + 0x1eb20: 0x6c2fba20, 0x1eb21: 0x6cb65420, 0x1eb22: 0x6cb9cc20, 0x1eb23: 0x6d3cac20, + 0x1eb24: 0x6c5f4820, 0x1eb25: 0x6d23fa20, 0x1eb26: 0x6c6cb620, 0x1eb27: 0x6c496620, + 0x1eb28: 0x6c990820, 0x1eb29: 0x6c167c20, 0x1eb2a: 0x6ce51c20, 0x1eb2b: 0x6cf6de20, + 0x1eb2c: 0x6c891e20, 0x1eb2d: 0x6ce24220, 0x1eb2e: 0x6c482820, 0x1eb2f: 0x6c263a20, + 0x1eb30: 0x6cd61420, 0x1eb31: 0x6d319c20, 0x1eb32: 0x6c92e020, 0x1eb33: 0x6c9be820, + 0x1eb34: 0x6c92e220, 0x1eb35: 0x6c571820, 0x1eb36: 0x6c0c8020, 0x1eb37: 0x6c40cc20, + 0x1eb38: 0x6c7f2c20, 0x1eb39: 0x6c790e20, 0x1eb3a: 0x6c39ec20, 0x1eb3b: 0x6cf55820, + 0x1eb3c: 0x6ca3d820, 0x1eb3d: 0x6ced9c20, 0x1eb3e: 0x6d299c20, 0x1eb3f: 0x6c570020, + // Block 0x7ad, offset 0x1eb40 + 0x1eb40: 0x6c2a8620, 0x1eb41: 0x6cfada20, 0x1eb42: 0x6cb10220, 0x1eb43: 0x6c5d6020, + 0x1eb44: 0x6c89cc20, 0x1eb45: 0x6c384820, 0x1eb46: 0x6c9ad820, 0x1eb47: 0x6c767220, + 0x1eb48: 0x6d1bf220, 0x1eb49: 0x6c2b4a20, 0x1eb4a: 0x6c892220, 0x1eb4b: 0x6c4c4020, + 0x1eb4c: 0x6cfc3620, 0x1eb4d: 0x6c328220, 0x1eb4e: 0x6ce8fc20, 0x1eb4f: 0x6cef4420, + 0x1eb50: 0x6d3fca20, 0x1eb51: 0x6c406a20, 0x1eb52: 0x6cc76620, 0x1eb53: 0x6c60d220, + 0x1eb54: 0x6c36ba20, 0x1eb55: 0x6c758620, 0x1eb56: 0x6c191420, 0x1eb57: 0x6ce38c20, + 0x1eb58: 0x6d2c5820, 0x1eb59: 0x6c56d420, 0x1eb5a: 0x6d0fe020, 0x1eb5b: 0x6c32de20, + 0x1eb5c: 0x6cfa0420, 0x1eb5d: 0x6d21c220, 0x1eb5e: 0x6c795a20, 0x1eb5f: 0x6d03aa20, + 0x1eb60: 0x6c5a1020, 0x1eb61: 0x6cf03220, 0x1eb62: 0x6c406c20, 0x1eb63: 0x6d2f7620, + 0x1eb64: 0x6c13b620, 0x1eb65: 0x6cbcee20, 0x1eb66: 0x6cd20620, 0x1eb67: 0x6c52d620, + 0x1eb68: 0x6c7ca820, 0x1eb69: 0x6ce51e20, 0x1eb6a: 0x6ca1ee20, 0x1eb6b: 0x6cbbbc20, + 0x1eb6c: 0x6cbbbe20, 0x1eb6d: 0x6c543820, 0x1eb6e: 0x6ce7e020, 0x1eb6f: 0x6c236c20, + 0x1eb70: 0x6c58ae20, 0x1eb71: 0x6d136620, 0x1eb72: 0x6c9f7e20, 0x1eb73: 0x6c66e620, + 0x1eb74: 0x6c32a420, 0x1eb75: 0x6c66da20, 0x1eb76: 0x6cd94220, 0x1eb77: 0x6c7caa20, + 0x1eb78: 0x6c55d220, 0x1eb79: 0x6d07d820, 0x1eb7a: 0x6c34b620, 0x1eb7b: 0x6c6b4a20, + 0x1eb7c: 0x6d31a020, 0x1eb7d: 0x6c0b0e20, 0x1eb7e: 0x6d37d020, 0x1eb7f: 0x6d3ea220, + // Block 0x7ae, offset 0x1eb80 + 0x1eb80: 0x6d04fe20, 0x1eb81: 0x6d129020, 0x1eb82: 0x6c9a6e20, 0x1eb83: 0x6cac3420, + 0x1eb84: 0x6c003620, 0x1eb85: 0x6c6c0c20, 0x1eb86: 0x6cba9420, 0x1eb87: 0x6c9a3220, + 0x1eb88: 0x6cdda220, 0x1eb89: 0x6c26ca20, 0x1eb8a: 0x6c059620, 0x1eb8b: 0x6cfa0a20, + 0x1eb8c: 0x6c887a20, 0x1eb8d: 0x6cddaa20, 0x1eb8e: 0x6c769a20, 0x1eb8f: 0x6c8ec020, + 0x1eb90: 0x6d116420, 0x1eb91: 0x6d137420, 0x1eb92: 0x6caa2e20, 0x1eb93: 0x6cf23e20, + 0x1eb94: 0x6cc6d420, 0x1eb95: 0x6ce15420, 0x1eb96: 0x6cddac20, 0x1eb97: 0x6cbaf220, + 0x1eb98: 0x6c86e020, 0x1eb99: 0x6cd7a620, 0x1eb9a: 0x6c20e420, 0x1eb9b: 0x6c0f9620, + 0x1eb9c: 0x6cac8620, 0x1eb9d: 0x6c266e20, 0x1eb9e: 0x6c089620, 0x1eb9f: 0x6cca9020, + 0x1eba0: 0x6c429420, 0x1eba1: 0x6d3ea620, 0x1eba2: 0x6cf38c20, 0x1eba3: 0x6d1cb420, + 0x1eba4: 0x6c5a7e20, 0x1eba5: 0x6ce5aa20, 0x1eba6: 0x6c8ec220, 0x1eba7: 0x6c767420, + 0x1eba8: 0x6cdd0220, 0x1eba9: 0x6ccc2220, 0x1ebaa: 0x6cd9f020, 0x1ebab: 0x6ceda820, + 0x1ebac: 0x6c507620, 0x1ebad: 0x6d327020, 0x1ebae: 0x6d327220, 0x1ebaf: 0x6c80e820, + 0x1ebb0: 0x6d18fc20, 0x1ebb1: 0x6d25c420, 0x1ebb2: 0x6ce18620, 0x1ebb3: 0x6ca88a20, + 0x1ebb4: 0x6cf7b020, 0x1ebb5: 0x6c638c20, 0x1ebb6: 0x6c43ba20, 0x1ebb7: 0x6c96a820, + 0x1ebb8: 0x6c730620, 0x1ebb9: 0x6cd9a220, 0x1ebba: 0x6d413420, 0x1ebbb: 0x6cddae20, + 0x1ebbc: 0x6cfa5620, 0x1ebbd: 0x6c3d0220, 0x1ebbe: 0x6cf21e20, 0x1ebbf: 0x6ca2ec20, + // Block 0x7af, offset 0x1ebc0 + 0x1ebc0: 0x6c91fa20, 0x1ebc1: 0x6cddb020, 0x1ebc2: 0x6cab6020, 0x1ebc3: 0x6d40f620, + 0x1ebc4: 0x6ce96e20, 0x1ebc5: 0x6d050820, 0x1ebc6: 0x6c49b220, 0x1ebc7: 0x6d08cc20, + 0x1ebc8: 0x6c892620, 0x1ebc9: 0x6cd48620, 0x1ebca: 0x6c02f820, 0x1ebcb: 0x6c97d420, + 0x1ebcc: 0x6ca18020, 0x1ebcd: 0x6c956620, 0x1ebce: 0x6c0a9e20, 0x1ebcf: 0x6cf0fe20, + 0x1ebd0: 0x6c8ed020, 0x1ebd1: 0x6c2bb220, 0x1ebd2: 0x6cca3620, 0x1ebd3: 0x6d401220, + 0x1ebd4: 0x6d158a20, 0x1ebd5: 0x6c932020, 0x1ebd6: 0x6c028220, 0x1ebd7: 0x6c796220, + 0x1ebd8: 0x6cbafa20, 0x1ebd9: 0x6c24f820, 0x1ebda: 0x6cb54e20, 0x1ebdb: 0x6c16d220, + 0x1ebdc: 0x6ce0dc20, 0x1ebdd: 0x6c981020, 0x1ebde: 0x6d1dd020, 0x1ebdf: 0x6c160620, + 0x1ebe0: 0x6c3c7220, 0x1ebe1: 0x6c6ebe20, 0x1ebe2: 0x6c0c4820, 0x1ebe3: 0x6cd62a20, + 0x1ebe4: 0x6c912420, 0x1ebe5: 0x6d055820, 0x1ebe6: 0x6c237420, 0x1ebe7: 0x6c8fce20, + 0x1ebe8: 0x6d29b020, 0x1ebe9: 0x6c670820, 0x1ebea: 0x6c12a220, 0x1ebeb: 0x6c849220, + 0x1ebec: 0x6cfa5c20, 0x1ebed: 0x6cf72020, 0x1ebee: 0x6c776020, 0x1ebef: 0x6cd6f820, + 0x1ebf0: 0x6c086220, 0x1ebf1: 0x6d2f4a20, 0x1ebf2: 0x6cba9620, 0x1ebf3: 0x6c19a620, + 0x1ebf4: 0x6c933420, 0x1ebf5: 0x6c576820, 0x1ebf6: 0x6c60f220, 0x1ebf7: 0x6cb47220, + 0x1ebf8: 0x6c5c8c20, 0x1ebf9: 0x6cbb5020, 0x1ebfa: 0x6cb32420, 0x1ebfb: 0x6c8c0220, + 0x1ebfc: 0x6ccb9020, 0x1ebfd: 0x6d055a20, 0x1ebfe: 0x6cca3c20, 0x1ebff: 0x6c19a820, + // Block 0x7b0, offset 0x1ec00 + 0x1ec00: 0x6c7d3a20, 0x1ec01: 0x6cd84820, 0x1ec02: 0x6c8f5420, 0x1ec03: 0x6ca4d220, + 0x1ec04: 0x6c5a2220, 0x1ec05: 0x6cb1e020, 0x1ec06: 0x6cdcb020, 0x1ec07: 0x6c38ea20, + 0x1ec08: 0x6cbc0e20, 0x1ec09: 0x6cc2aa20, 0x1ec0a: 0x6d0fee20, 0x1ec0b: 0x6ce0de20, + 0x1ec0c: 0x6cfe6620, 0x1ec0d: 0x6c750420, 0x1ec0e: 0x6c68a420, 0x1ec0f: 0x6d41fc20, + 0x1ec10: 0x6c8a4e20, 0x1ec11: 0x6cbd0420, 0x1ec12: 0x6c819020, 0x1ec13: 0x6c338020, + 0x1ec14: 0x6d030620, 0x1ec15: 0x6d295820, 0x1ec16: 0x6c5f8e20, 0x1ec17: 0x6c661e20, + 0x1ec18: 0x6d37da20, 0x1ec19: 0x6c2af620, 0x1ec1a: 0x6d0b0620, 0x1ec1b: 0x6d1d5c20, + 0x1ec1c: 0x6c331e20, 0x1ec1d: 0x6c750620, 0x1ec1e: 0x6caa3020, 0x1ec1f: 0x6d295a20, + 0x1ec20: 0x6cb4a420, 0x1ec21: 0x6ce60620, 0x1ec22: 0x6c38ec20, 0x1ec23: 0x6d2f4c20, + 0x1ec24: 0x6c2f8a20, 0x1ec25: 0x6ccdda20, 0x1ec26: 0x6c764220, 0x1ec27: 0x6c653820, + 0x1ec28: 0x6c3af020, 0x1ec29: 0x6cdcba20, 0x1ec2a: 0x6c920020, 0x1ec2b: 0x6c730c20, + 0x1ec2c: 0x6c5c9420, 0x1ec2d: 0x6d246a20, 0x1ec2e: 0x6c889c20, 0x1ec2f: 0x6d3dcc20, + 0x1ec30: 0x6cbbc820, 0x1ec31: 0x6c672220, 0x1ec32: 0x6d3dde20, 0x1ec33: 0x6c828c20, + 0x1ec34: 0x6c0ac820, 0x1ec35: 0x6ce60820, 0x1ec36: 0x6c58c220, 0x1ec37: 0x6d138c20, + 0x1ec38: 0x6c346c20, 0x1ec39: 0x6c4cd620, 0x1ec3a: 0x6c29ac20, 0x1ec3b: 0x6c72ce20, + 0x1ec3c: 0x6c3bac20, 0x1ec3d: 0x6c26d620, 0x1ec3e: 0x6c077220, 0x1ec3f: 0x6d194a20, + // Block 0x7b1, offset 0x1ec40 + 0x1ec40: 0x6c010820, 0x1ec41: 0x6d3fe220, 0x1ec42: 0x6d0aba20, 0x1ec43: 0x6c2e4e20, + 0x1ec44: 0x6d3b4e20, 0x1ec45: 0x6c528620, 0x1ec46: 0x6d3cc220, 0x1ec47: 0x6c5fa220, + 0x1ec48: 0x6ca8be20, 0x1ec49: 0x6c51a620, 0x1ec4a: 0x6c5e4c20, 0x1ec4b: 0x6cbe6020, + 0x1ec4c: 0x6c0d7020, 0x1ec4d: 0x6d1c3e20, 0x1ec4e: 0x6c7d4020, 0x1ec4f: 0x6ca93c20, + 0x1ec50: 0x6d060e20, 0x1ec51: 0x6c672620, 0x1ec52: 0x6c672820, 0x1ec53: 0x6cba9a20, + 0x1ec54: 0x6c142620, 0x1ec55: 0x6d377220, 0x1ec56: 0x6c9f1620, 0x1ec57: 0x6c84ce20, + 0x1ec58: 0x6c829820, 0x1ec59: 0x6c5fa620, 0x1ec5a: 0x6d416620, 0x1ec5b: 0x6c7c2220, + 0x1ec5c: 0x6cce4420, 0x1ec5d: 0x6caefc20, 0x1ec5e: 0x6c7ece20, 0x1ec5f: 0x6c320020, + 0x1ec60: 0x6cd7b020, 0x1ec61: 0x6c21ec20, 0x1ec62: 0x6c942820, 0x1ec63: 0x6c0c6220, + 0x1ec64: 0x6c068420, 0x1ec65: 0x6c920420, 0x1ec66: 0x6cfd5c20, 0x1ec67: 0x6c7b7e20, + 0x1ec68: 0x6c901020, 0x1ec69: 0x6c36fa20, 0x1ec6a: 0x6c91a220, 0x1ec6b: 0x6d02f820, + 0x1ec6c: 0x6c672c20, 0x1ec6d: 0x6c809420, 0x1ec6e: 0x6c0fd620, 0x1ec6f: 0x6c655620, + 0x1ec70: 0x6d125820, 0x1ec71: 0x6c157e20, 0x1ec72: 0x6cfda620, 0x1ec73: 0x6c673020, + 0x1ec74: 0x6cf76220, 0x1ec75: 0x6c49c820, 0x1ec76: 0x6c125620, 0x1ec77: 0x6ca8d220, + 0x1ec78: 0x6c831620, 0x1ec79: 0x6c249c20, 0x1ec7a: 0x6cc23020, 0x1ec7b: 0x6cacc820, + 0x1ec7c: 0x6c959420, 0x1ec7d: 0x6d414420, 0x1ec7e: 0x6c947a20, 0x1ec7f: 0x6d2a3820, + // Block 0x7b2, offset 0x1ec80 + 0x1ec80: 0x6ca8d820, 0x1ec81: 0x6c753e20, 0x1ec82: 0x6ce19820, 0x1ec83: 0x6cd58e20, + 0x1ec84: 0x6c801c20, 0x1ec85: 0x6c6c2220, 0x1ec86: 0x6c40c420, 0x1ec87: 0x6d15b420, + 0x1ec88: 0x6d312020, 0x1ec89: 0x6c2f5220, 0x1ec8a: 0x6d2f5220, 0x1ec8b: 0x6cb2f020, + 0x1ec8c: 0x6c8a6620, 0x1ec8d: 0x6ce91820, 0x1ec8e: 0x6cb8ba20, 0x1ec8f: 0x6c203220, + 0x1ec90: 0x6cccca20, 0x1ec91: 0x6c5fe820, 0x1ec92: 0x6c388e20, 0x1ec93: 0x6c2e0a20, + 0x1ec94: 0x6c9ac420, 0x1ec95: 0x6caa7020, 0x1ec96: 0x6d0f8c20, 0x1ec97: 0x6c146420, + 0x1ec98: 0x6d03d620, 0x1ec99: 0x6c413020, 0x1ec9a: 0x6c107a20, 0x1ec9b: 0x6cdf6620, + 0x1ec9c: 0x6c721c20, 0x1ec9d: 0x6c33e620, 0x1ec9e: 0x6c173e20, 0x1ec9f: 0x6d37ac20, + 0x1eca0: 0x6ca32220, 0x1eca1: 0x6c06f620, 0x1eca2: 0x6c426a20, 0x1eca3: 0x6c04c420, + 0x1eca4: 0x6cb97a20, 0x1eca5: 0x6d11fa20, 0x1eca6: 0x6cbd2220, 0x1eca7: 0x6c756620, + 0x1eca8: 0x6cf35e20, 0x1eca9: 0x6c463c20, 0x1ecaa: 0x6c778420, 0x1ecab: 0x6c398e20, + 0x1ecac: 0x6c5d8c20, 0x1ecad: 0x6ce80a20, 0x1ecae: 0x6ca98e20, 0x1ecaf: 0x6c039c20, + 0x1ecb0: 0x6d22fa20, 0x1ecb1: 0x6cb98420, 0x1ecb2: 0x6d32aa20, 0x1ecb3: 0x6cb98620, + 0x1ecb4: 0x6c477820, 0x1ecb5: 0x6c0e6820, 0x1ecb6: 0x6c353c20, 0x1ecb7: 0x6cb35220, + 0x1ecb8: 0x6c108e20, 0x1ecb9: 0x6c0ee220, 0x1ecba: 0x6d26a020, 0x1ecbb: 0x6d413820, + 0x1ecbc: 0x6ca28020, 0x1ecbd: 0x6ce05a20, 0x1ecbe: 0x6c641020, 0x1ecbf: 0x6c2d4a20, + // Block 0x7b3, offset 0x1ecc0 + 0x1ecc0: 0x6d1f2620, 0x1ecc1: 0x6ce5f820, 0x1ecc2: 0x6c0ee420, 0x1ecc3: 0x6c8cd620, + 0x1ecc4: 0x6cd77a20, 0x1ecc5: 0x6cb8d020, 0x1ecc6: 0x6c993620, 0x1ecc7: 0x6c064420, + 0x1ecc8: 0x6cd36620, 0x1ecc9: 0x6d088420, 0x1ecca: 0x6cdde820, 0x1eccb: 0x6c097220, + 0x1eccc: 0x6ca5d220, 0x1eccd: 0x6caf5e20, 0x1ecce: 0x6c344220, 0x1eccf: 0x6d03e420, + 0x1ecd0: 0x6c77bc20, 0x1ecd1: 0x6c81b020, 0x1ecd2: 0x6c379420, 0x1ecd3: 0x6c985e20, + 0x1ecd4: 0x6d0ba820, 0x1ecd5: 0x6d1fc620, 0x1ecd6: 0x6c19f620, 0x1ecd7: 0x6c63bc20, + 0x1ecd8: 0x6d127e20, 0x1ecd9: 0x6ca4a820, 0x1ecda: 0x6d361020, 0x1ecdb: 0x6c29aa20, + 0x1ecdc: 0x6ce74620, 0x1ecdd: 0x6c939820, 0x1ecde: 0x6c2e2220, 0x1ecdf: 0x6d19d220, + 0x1ece0: 0x6c765020, 0x1ece1: 0x6d2c2e20, 0x1ece2: 0x6d39a220, 0x1ece3: 0x6cf7e420, + 0x1ece4: 0x6c2fa220, 0x1ece5: 0x6c2fd220, 0x1ece6: 0x6cfaa420, 0x1ece7: 0x6c573a20, + 0x1ece8: 0x6cc2e820, 0x1ece9: 0x6ccbf020, 0x1ecea: 0x6c4cfa20, 0x1eceb: 0x6c2e2420, + 0x1ecec: 0x6c448620, 0x1eced: 0x6c9ffc20, 0x1ecee: 0x6d32be20, 0x1ecef: 0x6ccb2620, + 0x1ecf0: 0x6c68ec20, 0x1ecf1: 0x6d13ec20, 0x1ecf2: 0x6c15b220, 0x1ecf3: 0x6c1d4e20, + 0x1ecf4: 0x6ce0be20, 0x1ecf5: 0x6c018220, 0x1ecf6: 0x6d1a6220, 0x1ecf7: 0x6cc7a820, + 0x1ecf8: 0x6d3b0620, 0x1ecf9: 0x6c815c20, 0x1ecfa: 0x6cb4ac20, 0x1ecfb: 0x6cf3cc20, + 0x1ecfc: 0x6c7f1020, 0x1ecfd: 0x6ce27c20, 0x1ecfe: 0x6c890020, 0x1ecff: 0x6c794420, + // Block 0x7b4, offset 0x1ed00 + 0x1ed00: 0x6cfed020, 0x1ed01: 0x6cdd6820, 0x1ed02: 0x6c851a20, 0x1ed03: 0x6d2bac20, + 0x1ed04: 0x6c1e8620, 0x1ed05: 0x6c4c2220, 0x1ed06: 0x6c434a20, 0x1ed07: 0x6c357020, + 0x1ed08: 0x6d053e20, 0x1ed09: 0x6c262e20, 0x1ed0a: 0x6c94aa20, 0x1ed0b: 0x6c3c5220, + 0x1ed0c: 0x6d02da20, 0x1ed0d: 0x6c8f0a20, 0x1ed0e: 0x6c763220, 0x1ed0f: 0x6c65a220, + 0x1ed10: 0x6cc8d020, 0x1ed11: 0x6ce2f220, 0x1ed12: 0x6c80ce20, 0x1ed13: 0x6cbdda20, + 0x1ed14: 0x6c70a420, 0x1ed15: 0x6c000820, 0x1ed16: 0x6cbac620, 0x1ed17: 0x6d30da20, + 0x1ed18: 0x6cab0020, 0x1ed19: 0x6c263220, 0x1ed1a: 0x6c98ee20, 0x1ed1b: 0x6c078a20, + 0x1ed1c: 0x6cb60620, 0x1ed1d: 0x6c2a7820, 0x1ed1e: 0x6c78be20, 0x1ed1f: 0x6c7d7420, + 0x1ed20: 0x6c167620, 0x1ed21: 0x6cf65e20, 0x1ed22: 0x6c482020, 0x1ed23: 0x6c954c20, + 0x1ed24: 0x6c20da20, 0x1ed25: 0x6d3c6420, 0x1ed26: 0x6c6c9a20, 0x1ed27: 0x6d367420, + 0x1ed28: 0x6cfab620, 0x1ed29: 0x6c732220, 0x1ed2a: 0x6c5d5820, 0x1ed2b: 0x6caddc20, + 0x1ed2c: 0x6cdfee20, 0x1ed2d: 0x6c2fae20, 0x1ed2e: 0x6c66a220, 0x1ed2f: 0x6c725c20, + 0x1ed30: 0x6c9bdc20, 0x1ed31: 0x6d3e6620, 0x1ed32: 0x6cbcdc20, 0x1ed33: 0x6d1bc820, + 0x1ed34: 0x6c766a20, 0x1ed35: 0x6cbad420, 0x1ed36: 0x6cd80a20, 0x1ed37: 0x6c367820, + 0x1ed38: 0x6c13ac20, 0x1ed39: 0x6cbb9420, 0x1ed3a: 0x6d37c420, 0x1ed3b: 0x6c32d620, + 0x1ed3c: 0x6cd9d220, 0x1ed3d: 0x6c59e820, 0x1ed3e: 0x6c588c20, 0x1ed3f: 0x6c003220, + // Block 0x7b5, offset 0x1ed40 + 0x1ed40: 0x6c327020, 0x1ed41: 0x6c9a6420, 0x1ed42: 0x6c911420, 0x1ed43: 0x6d3e7420, + 0x1ed44: 0x6c3ac020, 0x1ed45: 0x6c9a1c20, 0x1ed46: 0x6ca15820, 0x1ed47: 0x6d325c20, + 0x1ed48: 0x6c0f5020, 0x1ed49: 0x6c442a20, 0x1ed4a: 0x6ca86620, 0x1ed4b: 0x6ce18220, + 0x1ed4c: 0x6c730220, 0x1ed4d: 0x6ca86820, 0x1ed4e: 0x6ca2e820, 0x1ed4f: 0x6c8e8e20, + 0x1ed50: 0x6c431e20, 0x1ed51: 0x6c058a20, 0x1ed52: 0x6d186c20, 0x1ed53: 0x6c638020, + 0x1ed54: 0x6c0d4e20, 0x1ed55: 0x6cc6ac20, 0x1ed56: 0x6c0c2420, 0x1ed57: 0x6ce0d620, + 0x1ed58: 0x6c980620, 0x1ed59: 0x6c955420, 0x1ed5a: 0x6c085420, 0x1ed5b: 0x6d1dbc20, + 0x1ed5c: 0x6c6eae20, 0x1ed5d: 0x6c2b4620, 0x1ed5e: 0x6d40dc20, 0x1ed5f: 0x6d08b420, + 0x1ed60: 0x6c8ea620, 0x1ed61: 0x6c153220, 0x1ed62: 0x6c74d020, 0x1ed63: 0x6c8aac20, + 0x1ed64: 0x6cb46420, 0x1ed65: 0x6c91e220, 0x1ed66: 0x6c336e20, 0x1ed67: 0x6c7fc820, + 0x1ed68: 0x6cb49e20, 0x1ed69: 0x6c249420, 0x1ed6a: 0x6cbae820, 0x1ed6b: 0x6c2aee20, + 0x1ed6c: 0x6c5e1e20, 0x1ed6d: 0x6c826e20, 0x1ed6e: 0x6c58b220, 0x1ed6f: 0x6d3dc420, + 0x1ed70: 0x6c887c20, 0x1ed71: 0x6d18fe20, 0x1ed72: 0x6c142420, 0x1ed73: 0x6c0c4e20, + 0x1ed74: 0x6c7eba20, 0x1ed75: 0x6c157020, 0x1ed76: 0x6cfda020, 0x1ed77: 0x6d2f0020, + 0x1ed78: 0x6c169c20, 0x1ed79: 0x6c6fbc20, 0x1ed7a: 0x6c02a420, 0x1ed7b: 0x6c2eb820, + 0x1ed7c: 0x6cc13c20, 0x1ed7d: 0x6c8a8420, 0x1ed7e: 0x6c9caa20, 0x1ed7f: 0x6d2efa20, + // Block 0x7b6, offset 0x1ed80 + 0x1ed80: 0x6c9ac620, 0x1ed81: 0x6c96b620, 0x1ed82: 0x6cd68220, 0x1ed83: 0x6ccd3c20, + 0x1ed84: 0x6c5db420, 0x1ed85: 0x6c9ac820, 0x1ed86: 0x6d0c8e20, 0x1ed87: 0x6c098e20, + 0x1ed88: 0x6c4eba20, 0x1ed89: 0x6c099020, 0x1ed8a: 0x6ccdfa20, 0x1ed8b: 0x6c763420, + 0x1ed8c: 0x6c778a20, 0x1ed8d: 0x6c07f220, 0x1ed8e: 0x6c535c20, 0x1ed8f: 0x6cc8fe20, + 0x1ed90: 0x6cca5820, 0x1ed91: 0x6cfb6420, 0x1ed92: 0x6cfb6620, 0x1ed93: 0x6c64ac20, + 0x1ed94: 0x6c9fb420, 0x1ed95: 0x6cf96820, 0x1ed96: 0x6cd74020, 0x1ed97: 0x6c312020, + 0x1ed98: 0x6d2c3c20, 0x1ed99: 0x6ca53420, 0x1ed9a: 0x6d2d8820, 0x1ed9b: 0x6cae7820, + 0x1ed9c: 0x6cfa2220, 0x1ed9d: 0x6c8d2820, 0x1ed9e: 0x6c0bae20, 0x1ed9f: 0x6c09e820, + 0x1eda0: 0x6cc90020, 0x1eda1: 0x6c00be20, 0x1eda2: 0x6c492020, 0x1eda3: 0x6c441620, + 0x1eda4: 0x6c441820, 0x1eda5: 0x6c382220, 0x1eda6: 0x6c1f6620, 0x1eda7: 0x6c53c820, + 0x1eda8: 0x6c4a7e20, 0x1eda9: 0x6c9fbe20, 0x1edaa: 0x6ccb1220, 0x1edab: 0x6c7dc020, + 0x1edac: 0x6c812c20, 0x1edad: 0x6c935a20, 0x1edae: 0x6ce68820, 0x1edaf: 0x6ccc7620, + 0x1edb0: 0x6c714820, 0x1edb1: 0x6d26e420, 0x1edb2: 0x6d26e620, 0x1edb3: 0x6c15e020, + 0x1edb4: 0x6cc27620, 0x1edb5: 0x6c8c6a20, 0x1edb6: 0x6c167e20, 0x1edb7: 0x6ccca420, + 0x1edb8: 0x6c7dc220, 0x1edb9: 0x6d0c3020, 0x1edba: 0x6cf1b220, 0x1edbb: 0x6d0cd420, + 0x1edbc: 0x6c36b020, 0x1edbd: 0x6c5cda20, 0x1edbe: 0x6d23fc20, 0x1edbf: 0x6cf1b420, + // Block 0x7b7, offset 0x1edc0 + 0x1edc0: 0x6cfe6020, 0x1edc1: 0x6c05be20, 0x1edc2: 0x6c53d620, 0x1edc3: 0x6cc28020, + 0x1edc4: 0x6d11dc20, 0x1edc5: 0x6cf1ba20, 0x1edc6: 0x6c04d820, 0x1edc7: 0x6c01d220, + 0x1edc8: 0x6cef4620, 0x1edc9: 0x6d1a1020, 0x1edca: 0x6c7e2020, 0x1edcb: 0x6cc40a20, + 0x1edcc: 0x6c7fca20, 0x1edcd: 0x6c317c20, 0x1edce: 0x6cc38620, 0x1edcf: 0x6c3c6e20, + 0x1edd0: 0x6ce4cc20, 0x1edd1: 0x6ca88c20, 0x1edd2: 0x6cdec420, 0x1edd3: 0x6c767620, + 0x1edd4: 0x6c518a20, 0x1edd5: 0x6cc40e20, 0x1edd6: 0x6c209c20, 0x1edd7: 0x6c493020, + 0x1edd8: 0x6c314620, 0x1edd9: 0x6cb72420, 0x1edda: 0x6c7c4e20, 0x1eddb: 0x6ce15c20, + 0x1eddc: 0x6c493420, 0x1eddd: 0x6cb18a20, 0x1edde: 0x6c771820, 0x1eddf: 0x6cf92420, + 0x1ede0: 0x6c5c8e20, 0x1ede1: 0x6c160e20, 0x1ede2: 0x6cb0dc20, 0x1ede3: 0x6c29a420, + 0x1ede4: 0x6c58c420, 0x1ede5: 0x6cdeda20, 0x1ede6: 0x6cf1c220, 0x1ede7: 0x6cde0220, + 0x1ede8: 0x6c9abe20, 0x1ede9: 0x6cd67e20, 0x1edea: 0x6ccd2820, 0x1edeb: 0x6d0e3820, + 0x1edec: 0x6c4e8820, 0x1eded: 0x6c090e20, 0x1edee: 0x6cf1f820, 0x1edef: 0x6c208c20, + 0x1edf0: 0x6cc8f820, 0x1edf1: 0x6ceee620, 0x1edf2: 0x6cfb2820, 0x1edf3: 0x6c52fe20, + 0x1edf4: 0x6c646620, 0x1edf5: 0x6c9f9220, 0x1edf6: 0x6c772620, 0x1edf7: 0x6c9aea20, + 0x1edf8: 0x6d2c2420, 0x1edf9: 0x6ca52a20, 0x1edfa: 0x6c4a4220, 0x1edfb: 0x6cf18820, + 0x1edfc: 0x6cde3e20, 0x1edfd: 0x6c9fa020, 0x1edfe: 0x6c935420, 0x1edff: 0x6c764e20, + // Block 0x7b8, offset 0x1ee00 + 0x1ee00: 0x6c380a20, 0x1ee01: 0x6c43ce20, 0x1ee02: 0x6c50e620, 0x1ee03: 0x6c7da420, + 0x1ee04: 0x6c6f6820, 0x1ee05: 0x6d26a220, 0x1ee06: 0x6c80b020, 0x1ee07: 0x6c316c20, + 0x1ee08: 0x6d232820, 0x1ee09: 0x6d0c0420, 0x1ee0a: 0x6c166c20, 0x1ee0b: 0x6cf88020, + 0x1ee0c: 0x6cf19420, 0x1ee0d: 0x6c5cc620, 0x1ee0e: 0x6d0c9020, 0x1ee0f: 0x6c362020, + 0x1ee10: 0x6c15b420, 0x1ee11: 0x6c7fa020, 0x1ee12: 0x6cc27020, 0x1ee13: 0x6c5bce20, + 0x1ee14: 0x6c7e0220, 0x1ee15: 0x6cc3c620, 0x1ee16: 0x6c515020, 0x1ee17: 0x6ce4b220, + 0x1ee18: 0x6c26b220, 0x1ee19: 0x6cc39020, 0x1ee1a: 0x6c4e5e20, 0x1ee1b: 0x6c58a220, + 0x1ee1c: 0x6c3fba20, 0x1ee1d: 0x6c3f9e20, 0x1ee1e: 0x6c820620, 0x1ee1f: 0x6c332a20, + 0x1ee20: 0x6d031020, 0x1ee21: 0x6cb89020, 0x1ee22: 0x6cf49a20, 0x1ee23: 0x6c412620, + 0x1ee24: 0x6d356a20, 0x1ee25: 0x6d19a020, 0x1ee26: 0x6d0f7820, 0x1ee27: 0x6c30d620, + 0x1ee28: 0x6c35ce20, 0x1ee29: 0x6cd0d620, 0x1ee2a: 0x6c04b220, 0x1ee2b: 0x6cadc620, + 0x1ee2c: 0x6c792220, 0x1ee2d: 0x6d27d420, 0x1ee2e: 0x6cc84c20, 0x1ee2f: 0x6d34da20, + 0x1ee30: 0x6cafac20, 0x1ee31: 0x6c6e0420, 0x1ee32: 0x6c39a020, 0x1ee33: 0x6d0f7a20, + 0x1ee34: 0x6d19a220, 0x1ee35: 0x6d321020, 0x1ee36: 0x6c69f420, 0x1ee37: 0x6c195020, + 0x1ee38: 0x6c35d620, 0x1ee39: 0x6cc0d620, 0x1ee3a: 0x6c2bd220, 0x1ee3b: 0x6d410a20, + 0x1ee3c: 0x6d427820, 0x1ee3d: 0x6c2d3820, 0x1ee3e: 0x6c8e0820, 0x1ee3f: 0x6c000220, + // Block 0x7b9, offset 0x1ee40 + 0x1ee40: 0x6ceae620, 0x1ee41: 0x6ceae820, 0x1ee42: 0x6c068c20, 0x1ee43: 0x6c0dc020, + 0x1ee44: 0x6c3fae20, 0x1ee45: 0x6c618e20, 0x1ee46: 0x6c921420, 0x1ee47: 0x6c902c20, + 0x1ee48: 0x6c18a220, 0x1ee49: 0x6d03c220, 0x1ee4a: 0x6c34ce20, 0x1ee4b: 0x6c910220, + 0x1ee4c: 0x6ca0da20, 0x1ee4d: 0x6c67d620, 0x1ee4e: 0x6cd4ae20, 0x1ee4f: 0x6c34d020, + 0x1ee50: 0x6cfc8620, 0x1ee51: 0x6c373820, 0x1ee52: 0x6c4acc20, 0x1ee53: 0x6d207c20, + 0x1ee54: 0x6c40e220, 0x1ee55: 0x6ccd2e20, 0x1ee56: 0x6c759e20, 0x1ee57: 0x6cbc3420, + 0x1ee58: 0x6d03d820, 0x1ee59: 0x6c213620, 0x1ee5a: 0x6c3fd820, 0x1ee5b: 0x6c095820, + 0x1ee5c: 0x6cf99e20, 0x1ee5d: 0x6ccd3820, 0x1ee5e: 0x6cd0f620, 0x1ee5f: 0x6d35aa20, + 0x1ee60: 0x6cb40420, 0x1ee61: 0x6c30e420, 0x1ee62: 0x6d260620, 0x1ee63: 0x6d322820, + 0x1ee64: 0x6c1e7620, 0x1ee65: 0x6cfc9820, 0x1ee66: 0x6c2a5620, 0x1ee67: 0x6ca7fe20, + 0x1ee68: 0x6d27e020, 0x1ee69: 0x6cfbf020, 0x1ee6a: 0x6cadce20, 0x1ee6b: 0x6c3aa020, + 0x1ee6c: 0x6d404e20, 0x1ee6d: 0x6d174c20, 0x1ee6e: 0x6c334820, 0x1ee6f: 0x6c94e620, + 0x1ee70: 0x6d19c420, 0x1ee71: 0x6c707820, 0x1ee72: 0x6c20c620, 0x1ee73: 0x6c18ba20, + 0x1ee74: 0x6cafd620, 0x1ee75: 0x6c8cd820, 0x1ee76: 0x6ce21420, 0x1ee77: 0x6cfcae20, + 0x1ee78: 0x6c923020, 0x1ee79: 0x6cd0fc20, 0x1ee7a: 0x6cfc0a20, 0x1ee7b: 0x6d19d420, + 0x1ee7c: 0x6d3a6220, 0x1ee7d: 0x6d0fb020, 0x1ee7e: 0x6cc62c20, 0x1ee7f: 0x6cf9bc20, + // Block 0x7ba, offset 0x1ee80 + 0x1ee80: 0x6c1d1420, 0x1ee81: 0x6d0e6820, 0x1ee82: 0x6d19d620, 0x1ee83: 0x6cd5ce20, + 0x1ee84: 0x6c2b2c20, 0x1ee85: 0x6d210c20, 0x1ee86: 0x6c8f9220, 0x1ee87: 0x6cee7820, + 0x1ee88: 0x6cee7a20, 0x1ee89: 0x6ca82420, 0x1ee8a: 0x6c334a20, 0x1ee8b: 0x6cdbf220, + 0x1ee8c: 0x6c018420, 0x1ee8d: 0x6c59b620, 0x1ee8e: 0x6c6a0620, 0x1ee8f: 0x6cdbf420, + 0x1ee90: 0x6d1ae220, 0x1ee91: 0x6c413c20, 0x1ee92: 0x6d0d9a20, 0x1ee93: 0x6c5abe20, + 0x1ee94: 0x6c43fc20, 0x1ee95: 0x6d27ee20, 0x1ee96: 0x6cf4f220, 0x1ee97: 0x6c7c6c20, + 0x1ee98: 0x6c009e20, 0x1ee99: 0x6cf89820, 0x1ee9a: 0x6ce10c20, 0x1ee9b: 0x6c623020, + 0x1ee9c: 0x6d2f3620, 0x1ee9d: 0x6c29de20, 0x1ee9e: 0x6c024820, 0x1ee9f: 0x6cf8aa20, + 0x1eea0: 0x6d1aee20, 0x1eea1: 0x6cc9be20, 0x1eea2: 0x6cc53a20, 0x1eea3: 0x6c8bca20, + 0x1eea4: 0x6ce9b220, 0x1eea5: 0x6c2ade20, 0x1eea6: 0x6c693820, 0x1eea7: 0x6cdc5820, + 0x1eea8: 0x6cdbfa20, 0x1eea9: 0x6c02e220, 0x1eeaa: 0x6cfc2620, 0x1eeab: 0x6c3b8220, + 0x1eeac: 0x6ca64c20, 0x1eead: 0x6c376820, 0x1eeae: 0x6c5f4a20, 0x1eeaf: 0x6c29ec20, + 0x1eeb0: 0x6cf7a620, 0x1eeb1: 0x6d1b0a20, 0x1eeb2: 0x6c358220, 0x1eeb3: 0x6c5af420, + 0x1eeb4: 0x6c903c20, 0x1eeb5: 0x6cf72220, 0x1eeb6: 0x6c859820, 0x1eeb7: 0x6c868820, + 0x1eeb8: 0x6c86b420, 0x1eeb9: 0x6d3c5620, 0x1eeba: 0x6c553a20, 0x1eebb: 0x6d33d220, + 0x1eebc: 0x6cdcea20, 0x1eebd: 0x6c735220, 0x1eebe: 0x6ca3f620, 0x1eebf: 0x6d178820, + // Block 0x7bb, offset 0x1eec0 + 0x1eec0: 0x6cc3ba20, 0x1eec1: 0x6d0e7e20, 0x1eec2: 0x6cbd7a20, 0x1eec3: 0x6cb8e820, + 0x1eec4: 0x6d047c20, 0x1eec5: 0x6d0b5420, 0x1eec6: 0x6c604620, 0x1eec7: 0x6c481820, + 0x1eec8: 0x6c587a20, 0x1eec9: 0x6d367620, 0x1eeca: 0x6c46c020, 0x1eecb: 0x6c736e20, + 0x1eecc: 0x6c225620, 0x1eecd: 0x6d1d9420, 0x1eece: 0x6c70b020, 0x1eecf: 0x6c1e9820, + 0x1eed0: 0x6c54f020, 0x1eed1: 0x6d28c420, 0x1eed2: 0x6c961c20, 0x1eed3: 0x6d219620, + 0x1eed4: 0x6c1dde20, 0x1eed5: 0x6c2de020, 0x1eed6: 0x6cdbe020, 0x1eed7: 0x6c4f2820, + 0x1eed8: 0x6cf32220, 0x1eed9: 0x6cd6a620, 0x1eeda: 0x6c49ae20, 0x1eedb: 0x6c1ec220, + 0x1eedc: 0x6d28d220, 0x1eedd: 0x6d1dcc20, 0x1eede: 0x6c5f7c20, 0x1eedf: 0x6cf70c20, + 0x1eee0: 0x6c1dfe20, 0x1eee1: 0x6c8f5220, 0x1eee2: 0x6c847e20, 0x1eee3: 0x6ca41420, + 0x1eee4: 0x6d092c20, 0x1eee5: 0x6d28e420, 0x1eee6: 0x6c610820, 0x1eee7: 0x6c610a20, + 0x1eee8: 0x6d222220, 0x1eee9: 0x6d211020, 0x1eeea: 0x6d093020, 0x1eeeb: 0x6ca2f820, + 0x1eeec: 0x6c3d2e20, 0x1eeed: 0x6ccb2820, 0x1eeee: 0x6ca28e20, 0x1eeef: 0x6cf19820, + 0x1eef0: 0x6c3b3620, 0x1eef1: 0x6cacda20, 0x1eef2: 0x6d27aa20, 0x1eef3: 0x6c862220, + 0x1eef4: 0x6c1c3a20, 0x1eef5: 0x6d0f6020, 0x1eef6: 0x6c8d2a20, 0x1eef7: 0x6c823e20, + 0x1eef8: 0x6c016e20, 0x1eef9: 0x6c05ce20, 0x1eefa: 0x6cf50420, 0x1eefb: 0x6c2d6a20, + 0x1eefc: 0x6c297420, 0x1eefd: 0x6c56ac20, 0x1eefe: 0x6cf50620, 0x1eeff: 0x6c2e3420, + // Block 0x7bc, offset 0x1ef00 + 0x1ef00: 0x6d05c220, 0x1ef01: 0x6c625820, 0x1ef02: 0x6ca2a820, 0x1ef03: 0x6c18e820, + 0x1ef04: 0x6cff1020, 0x1ef05: 0x6d2cde20, 0x1ef06: 0x6ce68a20, 0x1ef07: 0x6d325e20, + 0x1ef08: 0x6cae2820, 0x1ef09: 0x6c9a2420, 0x1ef0a: 0x6c8d4c20, 0x1ef0b: 0x6cb53420, + 0x1ef0c: 0x6d38b020, 0x1ef0d: 0x6c5e0220, 0x1ef0e: 0x6ccc7c20, 0x1ef0f: 0x6c3a1a20, + 0x1ef10: 0x6c538a20, 0x1ef11: 0x6d2da020, 0x1ef12: 0x6d1a0820, 0x1ef13: 0x6ca60820, + 0x1ef14: 0x6d3b2e20, 0x1ef15: 0x6cea6e20, 0x1ef16: 0x6c8be420, 0x1ef17: 0x6c8e3020, + 0x1ef18: 0x6c308e20, 0x1ef19: 0x6d1bf620, 0x1ef1a: 0x6cf53220, 0x1ef1b: 0x6c8d7420, + 0x1ef1c: 0x6cd6a420, 0x1ef1d: 0x6c8d7620, 0x1ef1e: 0x6cfa0620, 0x1ef1f: 0x6c539020, + 0x1ef20: 0x6d1a1220, 0x1ef21: 0x6c974420, 0x1ef22: 0x6c974620, 0x1ef23: 0x6d280620, + 0x1ef24: 0x6c8f4c20, 0x1ef25: 0x6c9c1620, 0x1ef26: 0x6c0d6a20, 0x1ef27: 0x6cf54020, + 0x1ef28: 0x6cf10020, 0x1ef29: 0x6c7e2a20, 0x1ef2a: 0x6d1aac20, 0x1ef2b: 0x6cf7b220, + 0x1ef2c: 0x6d191e20, 0x1ef2d: 0x6c008020, 0x1ef2e: 0x6c28e420, 0x1ef2f: 0x6ce2e420, + 0x1ef30: 0x6cca4020, 0x1ef31: 0x6d246c20, 0x1ef32: 0x6c933620, 0x1ef33: 0x6c8fd020, + 0x1ef34: 0x6c27a820, 0x1ef35: 0x6c60f420, 0x1ef36: 0x6cacec20, 0x1ef37: 0x6d0ff420, + 0x1ef38: 0x6c03d620, 0x1ef39: 0x6cafa420, 0x1ef3a: 0x6cef7020, 0x1ef3b: 0x6c3c8420, + 0x1ef3c: 0x6cf93420, 0x1ef3d: 0x6c62e420, 0x1ef3e: 0x6c970e20, 0x1ef3f: 0x6c9bac20, + // Block 0x7bd, offset 0x1ef40 + 0x1ef40: 0x6c9bae20, 0x1ef41: 0x6c829a20, 0x1ef42: 0x6c87ae20, 0x1ef43: 0x6c5e5820, + 0x1ef44: 0x6c008220, 0x1ef45: 0x6c3b0220, 0x1ef46: 0x6c27ae20, 0x1ef47: 0x6c901220, + 0x1ef48: 0x6c8db620, 0x1ef49: 0x6c010e20, 0x1ef4a: 0x6c3c8e20, 0x1ef4b: 0x6c87c820, + 0x1ef4c: 0x6c062620, 0x1ef4d: 0x6c521820, 0x1ef4e: 0x6c521020, 0x1ef4f: 0x6c521420, + 0x1ef50: 0x6c0e3e20, 0x1ef51: 0x6cbe3020, 0x1ef52: 0x6cbe3220, 0x1ef53: 0x6c6e8a20, + 0x1ef54: 0x6ce46c20, 0x1ef55: 0x6d317820, 0x1ef56: 0x6c6e9220, 0x1ef57: 0x6c198420, + 0x1ef58: 0x6cbed420, 0x1ef59: 0x6c6e9c20, 0x1ef5a: 0x6c6ea620, 0x1ef5b: 0x6c2d8620, + 0x1ef5c: 0x6c6eb020, 0x1ef5d: 0x6ce47a20, 0x1ef5e: 0x6c39f220, 0x1ef5f: 0x6c3a0a20, + 0x1ef60: 0x6c77c820, 0x1ef61: 0x6c9c9220, 0x1ef62: 0x6c9e5620, 0x1ef63: 0x6c9e5020, + 0x1ef64: 0x6c065a20, 0x1ef65: 0x6d133420, 0x1ef66: 0x6ce52020, 0x1ef67: 0x6c5c9820, + 0x1ef68: 0x6d139c20, 0x1ef69: 0x6c43d020, 0x1ef6a: 0x6c2f5e20, 0x1ef6b: 0x6c13ea20, + 0x1ef6c: 0x6cb9a020, 0x1ef6d: 0x6cc5f820, 0x1ef6e: 0x6c2b7020, 0x1ef6f: 0x6c326020, + 0x1ef70: 0x6cf4f420, 0x1ef71: 0x6cc5fa20, 0x1ef72: 0x6cbd8820, 0x1ef73: 0x6c6d2020, + 0x1ef74: 0x6d08e420, 0x1ef75: 0x6ca99e20, 0x1ef76: 0x6c03a220, 0x1ef77: 0x6d1af020, + 0x1ef78: 0x6cc95020, 0x1ef79: 0x6ca35e20, 0x1ef7a: 0x6ca14420, 0x1ef7b: 0x6d412220, + 0x1ef7c: 0x6c26b620, 0x1ef7d: 0x6c050020, 0x1ef7e: 0x6d183e20, 0x1ef7f: 0x6d121a20, + // Block 0x7be, offset 0x1ef80 + 0x1ef80: 0x6ce23420, 0x1ef81: 0x6c074c20, 0x1ef82: 0x6c63d820, 0x1ef83: 0x6c537a20, + 0x1ef84: 0x6cad6220, 0x1ef85: 0x6d0f6420, 0x1ef86: 0x6c0e4220, 0x1ef87: 0x6d1a0020, + 0x1ef88: 0x6c442c20, 0x1ef89: 0x6ce23c20, 0x1ef8a: 0x6c6b2e20, 0x1ef8b: 0x6d00e420, + 0x1ef8c: 0x6c014820, 0x1ef8d: 0x6c014a20, 0x1ef8e: 0x6c523620, 0x1ef8f: 0x6c45fc20, + 0x1ef90: 0x6cb88a20, 0x1ef91: 0x6c26c220, 0x1ef92: 0x6cbbf420, 0x1ef93: 0x6ce64a20, + 0x1ef94: 0x6c978620, 0x1ef95: 0x6d1d4e20, 0x1ef96: 0x6cdbde20, 0x1ef97: 0x6ce5a020, + 0x1ef98: 0x6cbc6220, 0x1ef99: 0x6d08b820, 0x1ef9a: 0x6c79ac20, 0x1ef9b: 0x6c083420, + 0x1ef9c: 0x6cdeb420, 0x1ef9d: 0x6cce5820, 0x1ef9e: 0x6c0dfa20, 0x1ef9f: 0x6c7e2220, + 0x1efa0: 0x6c70d420, 0x1efa1: 0x6c7eda20, 0x1efa2: 0x6d024a20, 0x1efa3: 0x6cc76820, + 0x1efa4: 0x6c054420, 0x1efa5: 0x6c372c20, 0x1efa6: 0x6cbfd620, 0x1efa7: 0x6cbfd820, + 0x1efa8: 0x6c518c20, 0x1efa9: 0x6d001620, 0x1efaa: 0x6ca2ba20, 0x1efab: 0x6c70da20, + 0x1efac: 0x6c650a20, 0x1efad: 0x6c0b1620, 0x1efae: 0x6c2b4c20, 0x1efaf: 0x6c651c20, + 0x1efb0: 0x6cf16e20, 0x1efb1: 0x6ce1fa20, 0x1efb2: 0x6c466620, 0x1efb3: 0x6cdec620, + 0x1efb4: 0x6c076c20, 0x1efb5: 0x6d011c20, 0x1efb6: 0x6cac8820, 0x1efb7: 0x6c445420, + 0x1efb8: 0x6c0ab020, 0x1efb9: 0x6c7e2e20, 0x1efba: 0x6ce0e020, 0x1efbb: 0x6c90d420, + 0x1efbc: 0x6c4ba420, 0x1efbd: 0x6cbc1220, 0x1efbe: 0x6d08ee20, 0x1efbf: 0x6c5f9820, + // Block 0x7bf, offset 0x1efc0 + 0x1efc0: 0x6c654820, 0x1efc1: 0x6c679820, 0x1efc2: 0x6c164c20, 0x1efc3: 0x6c26d820, + 0x1efc4: 0x6c56e820, 0x1efc5: 0x6cfc6420, 0x1efc6: 0x6cb96020, 0x1efc7: 0x6c320420, + 0x1efc8: 0x6cec4420, 0x1efc9: 0x6c655a20, 0x1efca: 0x6c801e20, 0x1efcb: 0x6ceeee20, + 0x1efcc: 0x6cc5fc20, 0x1efcd: 0x6c3ecc20, 0x1efce: 0x6c9aa220, 0x1efcf: 0x6cc37820, + 0x1efd0: 0x6c442e20, 0x1efd1: 0x6cf01020, 0x1efd2: 0x6cbc6420, 0x1efd3: 0x6c4e3e20, + 0x1efd4: 0x6c172820, 0x1efd5: 0x6c7e3420, 0x1efd6: 0x6cc77c20, 0x1efd7: 0x6d286620, + 0x1efd8: 0x6ccf8020, 0x1efd9: 0x6cf04620, 0x1efda: 0x6c444e20, 0x1efdb: 0x6c046220, + 0x1efdc: 0x6ce1fc20, 0x1efdd: 0x6c466820, 0x1efde: 0x6d286c20, 0x1efdf: 0x6c435e20, + 0x1efe0: 0x6c0ab220, 0x1efe1: 0x6cf05220, 0x1efe2: 0x6cdcc220, 0x1efe3: 0x6c31fa20, + 0x1efe4: 0x6cec4620, 0x1efe5: 0x6c320620, 0x1efe6: 0x6ceed820, 0x1efe7: 0x6cc5cc20, + 0x1efe8: 0x6c3e2820, 0x1efe9: 0x6c4e1a20, 0x1efea: 0x6cefea20, 0x1efeb: 0x6d283e20, + 0x1efec: 0x6ce1e020, 0x1efed: 0x6c6fb420, 0x1efee: 0x6c6fc420, 0x1efef: 0x6cfad220, + 0x1eff0: 0x6d022820, 0x1eff1: 0x6cfae220, 0x1eff2: 0x6c5f8820, 0x1eff3: 0x6d19ba20, + 0x1eff4: 0x6d28c220, 0x1eff5: 0x6d284020, 0x1eff6: 0x6ccea820, 0x1eff7: 0x6c822420, + 0x1eff8: 0x6caecc20, 0x1eff9: 0x6c5a2020, 0x1effa: 0x6d1c0420, 0x1effb: 0x6d287220, + 0x1effc: 0x6caef020, 0x1effd: 0x6c016020, 0x1effe: 0x6d1a1820, 0x1efff: 0x6cfe0a20, + // Block 0x7c0, offset 0x1f000 + 0x1f000: 0x6c56ea20, 0x1f001: 0x6d12dc20, 0x1f002: 0x6c2f6e20, 0x1f003: 0x6cbea820, + 0x1f004: 0x6c7c7020, 0x1f005: 0x6cfe3a20, 0x1f006: 0x6cd75420, 0x1f007: 0x6c4daa20, + 0x1f008: 0x6d05ae20, 0x1f009: 0x6d152a20, 0x1f00a: 0x6d05b620, 0x1f00b: 0x6c35b420, + 0x1f00c: 0x6cd99020, 0x1f00d: 0x6c7cd820, 0x1f00e: 0x6cb60c20, 0x1f00f: 0x6c4f8220, + 0x1f010: 0x6d238620, 0x1f011: 0x6cece020, 0x1f012: 0x6c048c20, 0x1f013: 0x6c33fe20, + 0x1f014: 0x6c2b8620, 0x1f015: 0x6c27f220, 0x1f016: 0x6cacbe20, 0x1f017: 0x6cb31820, + 0x1f018: 0x6c8e1220, 0x1f019: 0x6c182e20, 0x1f01a: 0x6c6e2620, 0x1f01b: 0x6c834020, + 0x1f01c: 0x6c516a20, 0x1f01d: 0x6cbb9e20, 0x1f01e: 0x6c36a020, 0x1f01f: 0x6c357c20, + 0x1f020: 0x6cf01220, 0x1f021: 0x6d00e620, 0x1f022: 0x6c7e1020, 0x1f023: 0x6cd07020, + 0x1f024: 0x6d156620, 0x1f025: 0x6cd07a20, 0x1f026: 0x6c4d2420, 0x1f027: 0x6c332820, + 0x1f028: 0x6d228420, 0x1f029: 0x6cb26620, 0x1f02a: 0x6c834220, 0x1f02b: 0x6c3f8420, + 0x1f02c: 0x6c63e020, 0x1f02d: 0x6ce7f820, 0x1f02e: 0x6c5c4a20, 0x1f02f: 0x6c7ca020, + 0x1f030: 0x6c63ec20, 0x1f031: 0x6c953220, 0x1f032: 0x6ce6e220, 0x1f033: 0x6c199820, + 0x1f034: 0x6d1d1020, 0x1f035: 0x6d276a20, 0x1f036: 0x6c55c620, 0x1f037: 0x6c4f1020, + 0x1f038: 0x6c6e3620, 0x1f039: 0x6ce9be20, 0x1f03a: 0x6ce9c020, 0x1f03b: 0x6cb21420, + 0x1f03c: 0x6c7f5a20, 0x1f03d: 0x6ce9c220, 0x1f03e: 0x6d3eb420, 0x1f03f: 0x6d3eb220, + // Block 0x7c1, offset 0x1f040 + 0x1f040: 0x6c20e620, 0x1f041: 0x6c2fc020, 0x1f042: 0x6c7f5c20, 0x1f043: 0x6ce02020, + 0x1f044: 0x6c4f2220, 0x1f045: 0x6cb93220, 0x1f046: 0x6c783820, 0x1f047: 0x6c257220, + 0x1f048: 0x6d085e20, 0x1f049: 0x6cbd4420, 0x1f04a: 0x6d157820, 0x1f04b: 0x6cc9d420, + 0x1f04c: 0x6ce39e20, 0x1f04d: 0x6c358a20, 0x1f04e: 0x6c36ca20, 0x1f04f: 0x6d0ce220, + 0x1f050: 0x6cf21420, 0x1f051: 0x6c76f820, 0x1f052: 0x6d1e0220, 0x1f053: 0x6d3b9820, + 0x1f054: 0x6d0ce420, 0x1f055: 0x6cfc3c20, 0x1f056: 0x6d035220, 0x1f057: 0x6d162620, + 0x1f058: 0x6d263820, 0x1f059: 0x6cca9620, 0x1f05a: 0x6c2ce620, 0x1f05b: 0x6c2ce820, + 0x1f05c: 0x6c67ca20, 0x1f05d: 0x6c7c4a20, 0x1f05e: 0x6c835420, 0x1f05f: 0x6c819220, + 0x1f060: 0x6cb1a820, 0x1f061: 0x6cec7820, 0x1f062: 0x6c979a20, 0x1f063: 0x6c247c20, + 0x1f064: 0x6d117820, 0x1f065: 0x6c507e20, 0x1f066: 0x6cbc1420, 0x1f067: 0x6c482e20, + 0x1f068: 0x6d0ab620, 0x1f069: 0x6d0e1a20, 0x1f06a: 0x6c5c9e20, 0x1f06b: 0x6c164e20, + 0x1f06c: 0x6cc7ee20, 0x1f06d: 0x6c9bb620, 0x1f06e: 0x6c0d7420, 0x1f06f: 0x6cfc6620, + 0x1f070: 0x6cb23220, 0x1f071: 0x6c91a620, 0x1f072: 0x6c806620, 0x1f073: 0x6ca8d620, + 0x1f074: 0x6cc34620, 0x1f075: 0x6d12be20, 0x1f076: 0x6c2f6a20, 0x1f077: 0x6cbe9e20, + 0x1f078: 0x6c4d9620, 0x1f079: 0x6cfe2420, 0x1f07a: 0x6cd74a20, 0x1f07b: 0x6d057e20, + 0x1f07c: 0x6d058820, 0x1f07d: 0x6cecd220, 0x1f07e: 0x6c480620, 0x1f07f: 0x6c33ec20, + // Block 0x7c2, offset 0x1f080 + 0x1f080: 0x6cb5b420, 0x1f081: 0x6c047c20, 0x1f082: 0x6cd98820, 0x1f083: 0x6c4f7220, + 0x1f084: 0x6d22fc20, 0x1f085: 0x6c915420, 0x1f086: 0x6c8e1020, 0x1f087: 0x6cb30c20, + 0x1f088: 0x6c6e1e20, 0x1f089: 0x6c6ada20, 0x1f08a: 0x6c63c820, 0x1f08b: 0x6ce6d420, + 0x1f08c: 0x6c513220, 0x1f08d: 0x6d1cf420, 0x1f08e: 0x6c6f1420, 0x1f08f: 0x6c780220, + 0x1f090: 0x6d152c20, 0x1f091: 0x6cb21220, 0x1f092: 0x6c5bee20, 0x1f093: 0x6ce9a820, + 0x1f094: 0x6c4ed620, 0x1f095: 0x6d1cf820, 0x1f096: 0x6d1cfa20, 0x1f097: 0x6c781e20, + 0x1f098: 0x6ce37420, 0x1f099: 0x6d1dfe20, 0x1f09a: 0x6c36a220, 0x1f09b: 0x6d3b9020, + 0x1f09c: 0x6d0ccc20, 0x1f09d: 0x6c357e20, 0x1f09e: 0x6ca87820, 0x1f09f: 0x6c975a20, + 0x1f0a0: 0x6c2cdc20, 0x1f0a1: 0x6cca8c20, 0x1f0a2: 0x6c507820, 0x1f0a3: 0x6c835020, + 0x1f0a4: 0x6c163c20, 0x1f0a5: 0x6cc7e620, 0x1f0a6: 0x6cb22620, 0x1f0a7: 0x6cc33e20, + 0x1f0a8: 0x6c3c2c20, 0x1f0a9: 0x6c0c0020, 0x1f0aa: 0x6c48be20, 0x1f0ab: 0x6c3eb820, + 0x1f0ac: 0x6cf96e20, 0x1f0ad: 0x6d2e0c20, 0x1f0ae: 0x6c0c1020, 0x1f0af: 0x6cc98020, + 0x1f0b0: 0x6c038820, 0x1f0b1: 0x6cdf3420, 0x1f0b2: 0x6c8b2a20, 0x1f0b3: 0x6c487420, + 0x1f0b4: 0x6d08ba20, 0x1f0b5: 0x6cce8820, 0x1f0b6: 0x6c72a820, 0x1f0b7: 0x6c0c3420, + 0x1f0b8: 0x6cd84020, 0x1f0b9: 0x6cf04820, 0x1f0ba: 0x6d0fec20, 0x1f0bb: 0x6d116a20, + 0x1f0bc: 0x6cd9f820, 0x1f0bd: 0x6c767820, 0x1f0be: 0x6cd9fa20, 0x1f0bf: 0x6c386c20, + // Block 0x7c3, offset 0x1f0c0 + 0x1f0c0: 0x6c8ed220, 0x1f0c1: 0x6cf7bc20, 0x1f0c2: 0x6c8f5620, 0x1f0c3: 0x6cb17020, + 0x1f0c4: 0x6cb17220, 0x1f0c5: 0x6c8ede20, 0x1f0c6: 0x6c0c5620, 0x1f0c7: 0x6c0c5820, + 0x1f0c8: 0x6c0c5a20, 0x1f0c9: 0x6c8a5620, 0x1f0ca: 0x6c0c9e20, 0x1f0cb: 0x6ccb9c20, + 0x1f0cc: 0x6c3c9020, 0x1f0cd: 0x6d051820, 0x1f0ce: 0x6c3c0e20, 0x1f0cf: 0x6d0f8220, + 0x1f0d0: 0x6d2dde20, 0x1f0d1: 0x6c0bee20, 0x1f0d2: 0x6cc97020, 0x1f0d3: 0x6c725420, + 0x1f0d4: 0x6cd7fc20, 0x1f0d5: 0x6cd9c620, 0x1f0d6: 0x6d112e20, 0x1f0d7: 0x6c8e7e20, + 0x1f0d8: 0x6cb16020, 0x1f0d9: 0x6c0c2620, 0x1f0da: 0x6c0c2820, 0x1f0db: 0x6c39f420, + 0x1f0dc: 0x6c387420, 0x1f0dd: 0x6c3a2e20, 0x1f0de: 0x6c39ee20, 0x1f0df: 0x6cd25820, + 0x1f0e0: 0x6cd24c20, 0x1f0e1: 0x6c116220, 0x1f0e2: 0x6c5eb020, 0x1f0e3: 0x6c2f9e20, + 0x1f0e4: 0x6cd8ae20, 0x1f0e5: 0x6ceac620, 0x1f0e6: 0x6d2d7220, 0x1f0e7: 0x6cdcd220, + 0x1f0e8: 0x6cfde820, 0x1f0e9: 0x6cea5a20, 0x1f0ea: 0x6cc5fe20, 0x1f0eb: 0x6d235e20, + 0x1f0ec: 0x6c737e20, 0x1f0ed: 0x6c1c2a20, 0x1f0ee: 0x6d1af220, 0x1f0ef: 0x6c395c20, + 0x1f0f0: 0x6c395e20, 0x1f0f1: 0x6cdcda20, 0x1f0f2: 0x6d1ae820, 0x1f0f3: 0x6ce81620, + 0x1f0f4: 0x6d152e20, 0x1f0f5: 0x6d42a620, 0x1f0f6: 0x6c09ec20, 0x1f0f7: 0x6c6b9c20, + 0x1f0f8: 0x6ce1e220, 0x1f0f9: 0x6c8f0e20, 0x1f0fa: 0x6c226220, 0x1f0fb: 0x6ce61420, + 0x1f0fc: 0x6cd8d420, 0x1f0fd: 0x6c060420, 0x1f0fe: 0x6cd3b020, 0x1f0ff: 0x6c350620, + // Block 0x7c4, offset 0x1f100 + 0x1f100: 0x6c4d7220, 0x1f101: 0x6cc60420, 0x1f102: 0x6ce51020, 0x1f103: 0x6c691e20, + 0x1f104: 0x6c63da20, 0x1f105: 0x6c0df020, 0x1f106: 0x6d113020, 0x1f107: 0x6ce77420, + 0x1f108: 0x6c226420, 0x1f109: 0x6cfdf820, 0x1f10a: 0x6d102a20, 0x1f10b: 0x6c738a20, + 0x1f10c: 0x6c37a220, 0x1f10d: 0x6d0eb220, 0x1f10e: 0x6c823a20, 0x1f10f: 0x6cf68c20, + 0x1f110: 0x6c117220, 0x1f111: 0x6c0e8e20, 0x1f112: 0x6ca57220, 0x1f113: 0x6c36a420, + 0x1f114: 0x6c10b620, 0x1f115: 0x6c75e620, 0x1f116: 0x6c313620, 0x1f117: 0x6cdb0e20, + 0x1f118: 0x6d219820, 0x1f119: 0x6cd3d020, 0x1f11a: 0x6d114a20, 0x1f11b: 0x6c5d0020, + 0x1f11c: 0x6c4cd220, 0x1f11d: 0x6cd3d220, 0x1f11e: 0x6c66dc20, 0x1f11f: 0x6d3cae20, + 0x1f120: 0x6c0df420, 0x1f121: 0x6cfd1620, 0x1f122: 0x6c10c020, 0x1f123: 0x6d135020, + 0x1f124: 0x6ce01620, 0x1f125: 0x6c3a1e20, 0x1f126: 0x6d2ede20, 0x1f127: 0x6cf0de20, + 0x1f128: 0x6c496820, 0x1f129: 0x6c36b220, 0x1f12a: 0x6caa9a20, 0x1f12b: 0x6d286020, + 0x1f12c: 0x6c55d620, 0x1f12d: 0x6c5a1420, 0x1f12e: 0x6ce61c20, 0x1f12f: 0x6c5c6220, + 0x1f130: 0x6c650c20, 0x1f131: 0x6c543c20, 0x1f132: 0x6c00e820, 0x1f133: 0x6ce14c20, + 0x1f134: 0x6c3b4820, 0x1f135: 0x6cf0ee20, 0x1f136: 0x6c47de20, 0x1f137: 0x6c13b820, + 0x1f138: 0x6cd99e20, 0x1f139: 0x6ce15820, 0x1f13a: 0x6c0f9820, 0x1f13b: 0x6c42e820, + 0x1f13c: 0x6cf90c20, 0x1f13d: 0x6c7d2620, 0x1f13e: 0x6c8f4e20, 0x1f13f: 0x6cd9f220, + // Block 0x7c5, offset 0x1f140 + 0x1f140: 0x6ce24a20, 0x1f141: 0x6d137c20, 0x1f142: 0x6d27cc20, 0x1f143: 0x6ca08a20, + 0x1f144: 0x6ce16020, 0x1f145: 0x6c979420, 0x1f146: 0x6c0aa020, 0x1f147: 0x6d245620, + 0x1f148: 0x6d050a20, 0x1f149: 0x6c6cc820, 0x1f14a: 0x6cca4420, 0x1f14b: 0x6c7d3c20, + 0x1f14c: 0x6d3bfc20, 0x1f14d: 0x6ccdde20, 0x1f14e: 0x6c1c9020, 0x1f14f: 0x6c28e620, + 0x1f150: 0x6d193c20, 0x1f151: 0x6c5f9020, 0x1f152: 0x6cc53220, 0x1f153: 0x6c19ac20, + 0x1f154: 0x6d1de420, 0x1f155: 0x6ce20220, 0x1f156: 0x6cf11c20, 0x1f157: 0x6cfe0e20, + 0x1f158: 0x6d2dc620, 0x1f159: 0x6c3b4a20, 0x1f15a: 0x6c4d8a20, 0x1f15b: 0x6c9bb020, + 0x1f15c: 0x6d0f1420, 0x1f15d: 0x6ca0a220, 0x1f15e: 0x6c158020, 0x1f15f: 0x6cfe1020, + 0x1f160: 0x6c959820, 0x1f161: 0x6d29cc20, 0x1f162: 0x6ca46c20, 0x1f163: 0x6cd22620, + 0x1f164: 0x6c2f9020, 0x1f165: 0x6c5e6e20, 0x1f166: 0x6cea9e20, 0x1f167: 0x6ce0e420, + 0x1f168: 0x6cea4420, 0x1f169: 0x6cf84020, 0x1f16a: 0x6cc5ce20, 0x1f16b: 0x6d22d220, + 0x1f16c: 0x6c1bea20, 0x1f16d: 0x6c392420, 0x1f16e: 0x6d1acc20, 0x1f16f: 0x6c665620, + 0x1f170: 0x6cd32620, 0x1f171: 0x6c05e820, 0x1f172: 0x6cd89420, 0x1f173: 0x6c34d220, + 0x1f174: 0x6d147e20, 0x1f175: 0x6c378c20, 0x1f176: 0x6cc52420, 0x1f177: 0x6cfdde20, + 0x1f178: 0x6c50e820, 0x1f179: 0x6c823820, 0x1f17a: 0x6c68d820, 0x1f17b: 0x6cf5b020, + 0x1f17c: 0x6c0dd420, 0x1f17d: 0x6c0e6a20, 0x1f17e: 0x6c310c20, 0x1f17f: 0x6c360420, + // Block 0x7c6, offset 0x1f180 + 0x1f180: 0x6d210020, 0x1f181: 0x6ca56a20, 0x1f182: 0x6c75a820, 0x1f183: 0x6c4cbe20, + 0x1f184: 0x6c5ce820, 0x1f185: 0x6cfcbe20, 0x1f186: 0x6c495020, 0x1f187: 0x6c13a020, + 0x1f188: 0x6c7d0220, 0x1f189: 0x6c479820, 0x1f18a: 0x6cd9ba20, 0x1f18b: 0x6c14fc20, + 0x1f18c: 0x6d130a20, 0x1f18d: 0x6ca06020, 0x1f18e: 0x6c0f2220, 0x1f18f: 0x6c8e7620, + 0x1f190: 0x6d04de20, 0x1f191: 0x6c6ca820, 0x1f192: 0x6c976e20, 0x1f193: 0x6cca2820, + 0x1f194: 0x6d3be020, 0x1f195: 0x6ca46420, 0x1f196: 0x6cd44220, 0x1f197: 0x6c7c7220, + 0x1f198: 0x6c4c9020, 0x1f199: 0x6cfd6620, 0x1f19a: 0x6c3b8020, 0x1f19b: 0x6c0f3c20, + 0x1f19c: 0x6ca64420, 0x1f19d: 0x6c0a1420, 0x1f19e: 0x6c0f6e20, 0x1f19f: 0x6ce8fa20, + 0x1f1a0: 0x6c4dbc20, 0x1f1a1: 0x6c3a2020, 0x1f1a2: 0x6c650e20, 0x1f1a3: 0x6c015420, + 0x1f1a4: 0x6c00fa20, 0x1f1a5: 0x6c408020, 0x1f1a6: 0x6cfaf620, 0x1f1a7: 0x6d276c20, + 0x1f1a8: 0x6d02f420, 0x1f1a9: 0x6c3bb020, 0x1f1aa: 0x6cb1fe20, 0x1f1ab: 0x6d02fa20, + 0x1f1ac: 0x6c969820, 0x1f1ad: 0x6d236020, 0x1f1ae: 0x6c3caa20, 0x1f1af: 0x6c4ed820, + 0x1f1b0: 0x6c2b7420, 0x1f1b1: 0x6ceb3220, 0x1f1b2: 0x6d306820, 0x1f1b3: 0x6c1b4220, + 0x1f1b4: 0x6d0a2420, 0x1f1b5: 0x6d3b1020, 0x1f1b6: 0x6d340c20, 0x1f1b7: 0x6cae2420, + 0x1f1b8: 0x6d034620, 0x1f1b9: 0x6cc64a20, 0x1f1ba: 0x6cc97a20, 0x1f1bb: 0x6d27f820, + 0x1f1bc: 0x6cf1a420, 0x1f1bd: 0x6d348a20, 0x1f1be: 0x6c28a020, 0x1f1bf: 0x6c935c20, + // Block 0x7c7, offset 0x1f1c0 + 0x1f1c0: 0x6d1f5e20, 0x1f1c1: 0x6c0f3e20, 0x1f1c2: 0x6c060a20, 0x1f1c3: 0x6c748a20, + 0x1f1c4: 0x6ceb4220, 0x1f1c5: 0x6d184020, 0x1f1c6: 0x6cc13020, 0x1f1c7: 0x6cb4c220, + 0x1f1c8: 0x6cc13e20, 0x1f1c9: 0x6c6ee620, 0x1f1ca: 0x6cb35c20, 0x1f1cb: 0x6d2f7020, + 0x1f1cc: 0x6d251220, 0x1f1cd: 0x6cadf020, 0x1f1ce: 0x6d394c20, 0x1f1cf: 0x6c727220, + 0x1f1d0: 0x6d3b2620, 0x1f1d1: 0x6caa4420, 0x1f1d2: 0x6c70c820, 0x1f1d3: 0x6caf8820, + 0x1f1d4: 0x6d29fa20, 0x1f1d5: 0x6c645020, 0x1f1d6: 0x6c8d4e20, 0x1f1d7: 0x6d31f620, + 0x1f1d8: 0x6cdf3a20, 0x1f1d9: 0x6c404820, 0x1f1da: 0x6d103020, 0x1f1db: 0x6cd2d820, + 0x1f1dc: 0x6c0a4020, 0x1f1dd: 0x6cebc220, 0x1f1de: 0x6ceb4620, 0x1f1df: 0x6cd8e420, + 0x1f1e0: 0x6c8e9020, 0x1f1e1: 0x6c96de20, 0x1f1e2: 0x6cb13220, 0x1f1e3: 0x6ce24620, + 0x1f1e4: 0x6d36f820, 0x1f1e5: 0x6cc6b820, 0x1f1e6: 0x6ce2b620, 0x1f1e7: 0x6c308a20, + 0x1f1e8: 0x6d09ac20, 0x1f1e9: 0x6cc2a420, 0x1f1ea: 0x6cd02220, 0x1f1eb: 0x6c6ee820, + 0x1f1ec: 0x6c37a620, 0x1f1ed: 0x6c4d7a20, 0x1f1ee: 0x6c0f7020, 0x1f1ef: 0x6d39ce20, + 0x1f1f0: 0x6d1a0c20, 0x1f1f1: 0x6c962a20, 0x1f1f2: 0x6d397a20, 0x1f1f3: 0x6c28bc20, + 0x1f1f4: 0x6d023820, 0x1f1f5: 0x6c8eb020, 0x1f1f6: 0x6c716a20, 0x1f1f7: 0x6cd97020, + 0x1f1f8: 0x6cbd4620, 0x1f1f9: 0x6c987a20, 0x1f1fa: 0x6c80ec20, 0x1f1fb: 0x6c4f2420, + 0x1f1fc: 0x6ce90020, 0x1f1fd: 0x6d07da20, 0x1f1fe: 0x6cea1420, 0x1f1ff: 0x6c75f220, + // Block 0x7c8, offset 0x1f200 + 0x1f200: 0x6c35be20, 0x1f201: 0x6c1a7a20, 0x1f202: 0x6d03ac20, 0x1f203: 0x6c005820, + 0x1f204: 0x6c931420, 0x1f205: 0x6d3c6c20, 0x1f206: 0x6d38be20, 0x1f207: 0x6ccf8220, + 0x1f208: 0x6cb13620, 0x1f209: 0x6c7d8c20, 0x1f20a: 0x6ce24c20, 0x1f20b: 0x6c7f2e20, + 0x1f20c: 0x6d3fd220, 0x1f20d: 0x6c78e220, 0x1f20e: 0x6cb67c20, 0x1f20f: 0x6cb67e20, + 0x1f210: 0x6d0ede20, 0x1f211: 0x6c3a2220, 0x1f212: 0x6ccacc20, 0x1f213: 0x6d0df020, + 0x1f214: 0x6c445820, 0x1f215: 0x6d11e220, 0x1f216: 0x6cf54820, 0x1f217: 0x6cb14e20, + 0x1f218: 0x6c237620, 0x1f219: 0x6cb15020, 0x1f21a: 0x6cb9da20, 0x1f21b: 0x6c3a2420, + 0x1f21c: 0x6c5a2420, 0x1f21d: 0x6cb9d420, 0x1f21e: 0x6c5d6820, 0x1f21f: 0x6d21de20, + 0x1f220: 0x6ce3a820, 0x1f221: 0x6cc32420, 0x1f222: 0x6cfa1620, 0x1f223: 0x6d3fd620, + 0x1f224: 0x6c7cae20, 0x1f225: 0x6cc76c20, 0x1f226: 0x6cd84620, 0x1f227: 0x6c488020, + 0x1f228: 0x6ceb5c20, 0x1f229: 0x6c4aa220, 0x1f22a: 0x6cda0020, 0x1f22b: 0x6cb94a20, + 0x1f22c: 0x6c1a5a20, 0x1f22d: 0x6d374e20, 0x1f22e: 0x6c8ed620, 0x1f22f: 0x6caef820, + 0x1f230: 0x6ce2c820, 0x1f231: 0x6cf7be20, 0x1f232: 0x6c12b420, 0x1f233: 0x6c31ea20, + 0x1f234: 0x6d0efe20, 0x1f235: 0x6d25cc20, 0x1f236: 0x6d407220, 0x1f237: 0x6ccad020, + 0x1f238: 0x6ccde020, 0x1f239: 0x6c84b020, 0x1f23a: 0x6d376220, 0x1f23b: 0x6cd6b020, + 0x1f23c: 0x6c933820, 0x1f23d: 0x6cf7c020, 0x1f23e: 0x6c956c20, 0x1f23f: 0x6d2eec20, + // Block 0x7c9, offset 0x1f240 + 0x1f240: 0x6ca19020, 0x1f241: 0x6c030020, 0x1f242: 0x6c118420, 0x1f243: 0x6c0c5c20, + 0x1f244: 0x6c237a20, 0x1f245: 0x6cc16220, 0x1f246: 0x6c0ac220, 0x1f247: 0x6d376420, + 0x1f248: 0x6d248020, 0x1f249: 0x6d060c20, 0x1f24a: 0x6c576c20, 0x1f24b: 0x6c0e9e20, + 0x1f24c: 0x6cdb7020, 0x1f24d: 0x6cff5820, 0x1f24e: 0x6c8c0a20, 0x1f24f: 0x6d2ea420, + 0x1f250: 0x6c33c620, 0x1f251: 0x6c8eea20, 0x1f252: 0x6ceb6220, 0x1f253: 0x6c136a20, + 0x1f254: 0x6c2d9e20, 0x1f255: 0x6c68b220, 0x1f256: 0x6ce60c20, 0x1f257: 0x6d0f1620, + 0x1f258: 0x6c958620, 0x1f259: 0x6d2dca20, 0x1f25a: 0x6c6df820, 0x1f25b: 0x6d196a20, + 0x1f25c: 0x6d139e20, 0x1f25d: 0x6ceadc20, 0x1f25e: 0x6cb20020, 0x1f25f: 0x6d397220, + 0x1f260: 0x6d0f2620, 0x1f261: 0x6c902020, 0x1f262: 0x6c937220, 0x1f263: 0x6ce2e020, + 0x1f264: 0x6cfda820, 0x1f265: 0x6c630220, 0x1f266: 0x6cd6ca20, 0x1f267: 0x6c719c20, + 0x1f268: 0x6cf7d020, 0x1f269: 0x6c585020, 0x1f26a: 0x6c84ee20, 0x1f26b: 0x6c0c6820, + 0x1f26c: 0x6c968c20, 0x1f26d: 0x6d22ba20, 0x1f26e: 0x6ceae220, 0x1f26f: 0x6d09da20, + 0x1f270: 0x6c1afa20, 0x1f271: 0x6cc0d820, 0x1f272: 0x6cc63e20, 0x1f273: 0x6c0eb220, + 0x1f274: 0x6c935020, 0x1f275: 0x6d29f820, 0x1f276: 0x6cd2ba20, 0x1f277: 0x6cd89620, + 0x1f278: 0x6c3fbc20, 0x1f279: 0x6c706420, 0x1f27a: 0x6d404820, 0x1f27b: 0x6d3ab820, + 0x1f27c: 0x6cebc020, 0x1f27d: 0x6caa4020, 0x1f27e: 0x6c643820, 0x1f27f: 0x6d16d420, + // Block 0x7ca, offset 0x1f280 + 0x1f280: 0x6c273c20, 0x1f281: 0x6cfe9020, 0x1f282: 0x6c96b820, 0x1f283: 0x6d19bc20, + 0x1f284: 0x6c683a20, 0x1f285: 0x6c572e20, 0x1f286: 0x6c95ee20, 0x1f287: 0x6c4d5c20, + 0x1f288: 0x6cb10820, 0x1f289: 0x6c0bf020, 0x1f28a: 0x6c83b420, 0x1f28b: 0x6c1a6c20, + 0x1f28c: 0x6d0e5820, 0x1f28d: 0x6d036e20, 0x1f28e: 0x6cbd2820, 0x1f28f: 0x6c75aa20, + 0x1f290: 0x6cb5e220, 0x1f291: 0x6cb5e420, 0x1f292: 0x6c78aa20, 0x1f293: 0x6d3c5c20, + 0x1f294: 0x6d3f7e20, 0x1f295: 0x6cdaae20, 0x1f296: 0x6c116420, 0x1f297: 0x6cb14a20, + 0x1f298: 0x6d364820, 0x1f299: 0x6c7c8220, 0x1f29a: 0x6ccab020, 0x1f29b: 0x6cf4f620, + 0x1f29c: 0x6c02da20, 0x1f29d: 0x6c8e7820, 0x1f29e: 0x6cb8fa20, 0x1f29f: 0x6ccd9020, + 0x1f2a0: 0x6c0c1220, 0x1f2a1: 0x6c955020, 0x1f2a2: 0x6c233620, 0x1f2a3: 0x6c15e220, + 0x1f2a4: 0x6d395c20, 0x1f2a5: 0x6c62c420, 0x1f2a6: 0x6cd6ac20, 0x1f2a7: 0x6cfd9420, + 0x1f2a8: 0x6c476e20, 0x1f2a9: 0x6cefb420, 0x1f2aa: 0x6cefd220, 0x1f2ab: 0x6cefd420, + 0x1f2ac: 0x6d214020, 0x1f2ad: 0x6c422420, 0x1f2ae: 0x6d17d620, 0x1f2af: 0x6c01ec20, + 0x1f2b0: 0x6ce7f220, 0x1f2b1: 0x6c6bf020, 0x1f2b2: 0x6c065e20, 0x1f2b3: 0x6c074e20, + 0x1f2b4: 0x6c220c20, 0x1f2b5: 0x6ce3c620, 0x1f2b6: 0x6c2c0020, 0x1f2b7: 0x6c7a5620, + 0x1f2b8: 0x6c4d2820, 0x1f2b9: 0x6cbba020, 0x1f2ba: 0x6c543020, 0x1f2bb: 0x6c7af020, + 0x1f2bc: 0x6c443220, 0x1f2bd: 0x6ce9ee20, 0x1f2be: 0x6c452020, 0x1f2bf: 0x6cb12a20, + // Block 0x7cb, offset 0x1f2c0 + 0x1f2c0: 0x6c0a8220, 0x1f2c1: 0x6c783c20, 0x1f2c2: 0x6cb87a20, 0x1f2c3: 0x6d21ce20, + 0x1f2c4: 0x6cdc1420, 0x1f2c5: 0x6c90d020, 0x1f2c6: 0x6c0fb220, 0x1f2c7: 0x6cff4620, + 0x1f2c8: 0x6c055a20, 0x1f2c9: 0x6c0fb420, 0x1f2ca: 0x6c221420, 0x1f2cb: 0x6c7b5e20, + 0x1f2cc: 0x6c0d9220, 0x1f2cd: 0x6ca09420, 0x1f2ce: 0x6c8a5220, 0x1f2cf: 0x6c90da20, + 0x1f2d0: 0x6cff5220, 0x1f2d1: 0x6c31fe20, 0x1f2d2: 0x6d29f220, 0x1f2d3: 0x6cdc1a20, + 0x1f2d4: 0x6ce3d020, 0x1f2d5: 0x6c0d9620, 0x1f2d6: 0x6c7b6020, 0x1f2d7: 0x6c91a820, + 0x1f2d8: 0x6c42bc20, 0x1f2d9: 0x6c42c420, 0x1f2da: 0x6cbc5020, 0x1f2db: 0x6c779420, + 0x1f2dc: 0x6cbc2c20, 0x1f2dd: 0x6c819420, 0x1f2de: 0x6ccb0c20, 0x1f2df: 0x6c0bf420, + 0x1f2e0: 0x6c7d6e20, 0x1f2e1: 0x6c7d7620, 0x1f2e2: 0x6c2b7620, 0x1f2e3: 0x6c39da20, + 0x1f2e4: 0x6d04ec20, 0x1f2e5: 0x6cc47e20, 0x1f2e6: 0x6c98f820, 0x1f2e7: 0x6c28a220, + 0x1f2e8: 0x6c7d7e20, 0x1f2e9: 0x6c0d8620, 0x1f2ea: 0x6c383e20, 0x1f2eb: 0x6ce5a220, + 0x1f2ec: 0x6caf8a20, 0x1f2ed: 0x6d3e9c20, 0x1f2ee: 0x6c384220, 0x1f2ef: 0x6cc48620, + 0x1f2f0: 0x6ce41a20, 0x1f2f1: 0x6c066420, 0x1f2f2: 0x6c0a4220, 0x1f2f3: 0x6c990420, + 0x1f2f4: 0x6c3eea20, 0x1f2f5: 0x6c376a20, 0x1f2f6: 0x6cc6ba20, 0x1f2f7: 0x6cc14420, + 0x1f2f8: 0x6c45b620, 0x1f2f9: 0x6d04f820, 0x1f2fa: 0x6c7e1620, 0x1f2fb: 0x6c628e20, + 0x1f2fc: 0x6caed220, 0x1f2fd: 0x6d3b6020, 0x1f2fe: 0x6cce8e20, 0x1f2ff: 0x6cdd4420, + // Block 0x7cc, offset 0x1f300 + 0x1f300: 0x6ce43620, 0x1f301: 0x6c86ba20, 0x1f302: 0x6c0d8a20, 0x1f303: 0x6d3fd420, + 0x1f304: 0x6c2baa20, 0x1f305: 0x6caee420, 0x1f306: 0x6cd94820, 0x1f307: 0x6d32f820, + 0x1f308: 0x6cc32220, 0x1f309: 0x6d3fd820, 0x1f30a: 0x6cd76220, 0x1f30b: 0x6c660e20, + 0x1f30c: 0x6ceb9620, 0x1f30d: 0x6c55f420, 0x1f30e: 0x6c7eae20, 0x1f30f: 0x6c6f8e20, + 0x1f310: 0x6cb6a020, 0x1f311: 0x6c889820, 0x1f312: 0x6d320420, 0x1f313: 0x6c0d9420, + 0x1f314: 0x6caefa20, 0x1f315: 0x6c96e620, 0x1f316: 0x6cca0e20, 0x1f317: 0x6c979e20, + 0x1f318: 0x6c97a020, 0x1f319: 0x6ccbbc20, 0x1f31a: 0x6d061020, 0x1f31b: 0x6c8b7a20, + 0x1f31c: 0x6cb95420, 0x1f31d: 0x6cb95220, 0x1f31e: 0x6ca46220, 0x1f31f: 0x6c58cc20, + 0x1f320: 0x6c7e3220, 0x1f321: 0x6ca94220, 0x1f322: 0x6c0d9820, 0x1f323: 0x6c8b8a20, + 0x1f324: 0x6cc4fe20, 0x1f325: 0x6c310e20, 0x1f326: 0x6c313420, 0x1f327: 0x6ca53620, + 0x1f328: 0x6c53dc20, 0x1f329: 0x6cf90e20, 0x1f32a: 0x6c314e20, 0x1f32b: 0x6c4e7220, + 0x1f32c: 0x6c315420, 0x1f32d: 0x6c315220, 0x1f32e: 0x6c6f9620, 0x1f32f: 0x6c170e20, + 0x1f330: 0x6d249c20, 0x1f331: 0x6d24a420, 0x1f332: 0x6c43e020, 0x1f333: 0x6d0ecc20, + 0x1f334: 0x6c3f8e20, 0x1f335: 0x6cbdb820, 0x1f336: 0x6c4a9e20, 0x1f337: 0x6d3fdc20, + 0x1f338: 0x6c8f5820, 0x1f339: 0x6c4aa620, 0x1f33a: 0x6cce2a20, 0x1f33b: 0x6d248220, + 0x1f33c: 0x6c4ae220, 0x1f33d: 0x6c9a9620, 0x1f33e: 0x6c623220, 0x1f33f: 0x6cb61220, + // Block 0x7cd, offset 0x1f340 + 0x1f340: 0x6c40da20, 0x1f341: 0x6c7c9020, 0x1f342: 0x6c5cf620, 0x1f343: 0x6c038c20, + 0x1f344: 0x6cb39c20, 0x1f345: 0x6c9aa620, 0x1f346: 0x6d05c820, 0x1f347: 0x6d0dd220, + 0x1f348: 0x6cff1a20, 0x1f349: 0x6c89a220, 0x1f34a: 0x6d242620, 0x1f34b: 0x6ce9ca20, + 0x1f34c: 0x6cb53e20, 0x1f34d: 0x6cee3e20, 0x1f34e: 0x6c89a820, 0x1f34f: 0x6cf0f020, + 0x1f350: 0x6c41bc20, 0x1f351: 0x6c1aea20, 0x1f352: 0x6cb17420, 0x1f353: 0x6c0ab620, + 0x1f354: 0x6ca09620, 0x1f355: 0x6c616220, 0x1f356: 0x6d060820, 0x1f357: 0x6c1e3e20, + 0x1f358: 0x6d0e2620, 0x1f359: 0x6d2dcc20, 0x1f35a: 0x6d211220, 0x1f35b: 0x6c29c420, + 0x1f35c: 0x6cc57620, 0x1f35d: 0x6c6b0220, 0x1f35e: 0x6c03f620, 0x1f35f: 0x6c537c20, + 0x1f360: 0x6ceacc20, 0x1f361: 0x6c2e3620, 0x1f362: 0x6c614e20, 0x1f363: 0x6d073620, + 0x1f364: 0x6c358020, 0x1f365: 0x6c367c20, 0x1f366: 0x6ccc1220, 0x1f367: 0x6c4f8620, + 0x1f368: 0x6cea6620, 0x1f369: 0x6ca15e20, 0x1f36a: 0x6c6c0020, 0x1f36b: 0x6cd07220, + 0x1f36c: 0x6c04d620, 0x1f36d: 0x6d25a420, 0x1f36e: 0x6cb01420, 0x1f36f: 0x6c91d420, + 0x1f370: 0x6cf1aa20, 0x1f371: 0x6c55a620, 0x1f372: 0x6c915a20, 0x1f373: 0x6d289a20, + 0x1f374: 0x6c39ae20, 0x1f375: 0x6c3b9020, 0x1f376: 0x6ca36820, 0x1f377: 0x6d1f6c20, + 0x1f378: 0x6cb15220, 0x1f379: 0x6ca1b620, 0x1f37a: 0x6c517e20, 0x1f37b: 0x6cf9fa20, + 0x1f37c: 0x6cc14620, 0x1f37d: 0x6c4e3820, 0x1f37e: 0x6caf9420, 0x1f37f: 0x6c8d6220, + // Block 0x7ce, offset 0x1f380 + 0x1f380: 0x6ceb5220, 0x1f381: 0x6c0e9820, 0x1f382: 0x6cc0a020, 0x1f383: 0x6cb2d220, + 0x1f384: 0x6c3f0620, 0x1f385: 0x6c0a6420, 0x1f386: 0x6c22a420, 0x1f387: 0x6cf0e020, + 0x1f388: 0x6c70ce20, 0x1f389: 0x6c2de220, 0x1f38a: 0x6c03c620, 0x1f38b: 0x6d1f7a20, + 0x1f38c: 0x6c4bf020, 0x1f38d: 0x6caf9620, 0x1f38e: 0x6ca70620, 0x1f38f: 0x6d03a020, + 0x1f390: 0x6cdf4020, 0x1f391: 0x6c066a20, 0x1f392: 0x6c406020, 0x1f393: 0x6d2c9820, + 0x1f394: 0x6c728620, 0x1f395: 0x6c473620, 0x1f396: 0x6cd41e20, 0x1f397: 0x6c309a20, + 0x1f398: 0x6c27b020, 0x1f399: 0x6cdeba20, 0x1f39a: 0x6c6b4c20, 0x1f39b: 0x6cd50e20, + 0x1f39c: 0x6c548220, 0x1f39d: 0x6cfe0420, 0x1f39e: 0x6c376e20, 0x1f39f: 0x6c01d620, + 0x1f3a0: 0x6cef4820, 0x1f3a1: 0x6d2fe620, 0x1f3a2: 0x6d39d020, 0x1f3a3: 0x6d1b8220, + 0x1f3a4: 0x6c8b4020, 0x1f3a5: 0x6c962e20, 0x1f3a6: 0x6ce79420, 0x1f3a7: 0x6ce3c820, + 0x1f3a8: 0x6d18e220, 0x1f3a9: 0x6c0e3020, 0x1f3aa: 0x6cf03420, 0x1f3ab: 0x6c688a20, + 0x1f3ac: 0x6c7a6820, 0x1f3ad: 0x6c4a9220, 0x1f3ae: 0x6cfae620, 0x1f3af: 0x6c444820, + 0x1f3b0: 0x6c5b4420, 0x1f3b1: 0x6c81fc20, 0x1f3b2: 0x6c40b820, 0x1f3b3: 0x6c77ca20, + 0x1f3b4: 0x6d055e20, 0x1f3b5: 0x6c346820, 0x1f3b6: 0x6c758820, 0x1f3b7: 0x6ce3a020, + 0x1f3b8: 0x6c9e4620, 0x1f3b9: 0x6cce9220, 0x1f3ba: 0x6d2c9a20, 0x1f3bb: 0x6cdd4620, + 0x1f3bc: 0x6cbd4820, 0x1f3bd: 0x6d21d020, 0x1f3be: 0x6ca57820, 0x1f3bf: 0x6d30b420, + // Block 0x7cf, offset 0x1f3c0 + 0x1f3c0: 0x6c4bf620, 0x1f3c1: 0x6c452420, 0x1f3c2: 0x6cdb7c20, 0x1f3c3: 0x6cf40220, + 0x1f3c4: 0x6cc0a620, 0x1f3c5: 0x6ccd1820, 0x1f3c6: 0x6cb42020, 0x1f3c7: 0x6c596220, + 0x1f3c8: 0x6ce5a820, 0x1f3c9: 0x6c854020, 0x1f3ca: 0x6ccc2420, 0x1f3cb: 0x6ccc2620, + 0x1f3cc: 0x6c77d020, 0x1f3cd: 0x6c9b7e20, 0x1f3ce: 0x6c1a8e20, 0x1f3cf: 0x6c87e620, + 0x1f3d0: 0x6d409820, 0x1f3d1: 0x6cf94c20, 0x1f3d2: 0x6d1e6420, 0x1f3d3: 0x6ca61020, + 0x1f3d4: 0x6d3eba20, 0x1f3d5: 0x6cb68820, 0x1f3d6: 0x6d330c20, 0x1f3d7: 0x6cfe0620, + 0x1f3d8: 0x6ca57a20, 0x1f3d9: 0x6c216e20, 0x1f3da: 0x6c62c620, 0x1f3db: 0x6c2dec20, + 0x1f3dc: 0x6cbd0020, 0x1f3dd: 0x6c482c20, 0x1f3de: 0x6d38f220, 0x1f3df: 0x6c302420, + 0x1f3e0: 0x6c7f3020, 0x1f3e1: 0x6c3aec20, 0x1f3e2: 0x6ca61420, 0x1f3e3: 0x6d192220, + 0x1f3e4: 0x6c7d8e20, 0x1f3e5: 0x6c932620, 0x1f3e6: 0x6c703820, 0x1f3e7: 0x6c168620, + 0x1f3e8: 0x6c6de620, 0x1f3e9: 0x6c951220, 0x1f3ea: 0x6c8d8a20, 0x1f3eb: 0x6d406e20, + 0x1f3ec: 0x6c849420, 0x1f3ed: 0x6c9bf420, 0x1f3ee: 0x6d3fde20, 0x1f3ef: 0x6d375220, + 0x1f3f0: 0x6ca70c20, 0x1f3f1: 0x6c570420, 0x1f3f2: 0x6d24c420, 0x1f3f3: 0x6c2cb620, + 0x1f3f4: 0x6cd20c20, 0x1f3f5: 0x6cd02c20, 0x1f3f6: 0x6c5d1620, 0x1f3f7: 0x6ce3ac20, + 0x1f3f8: 0x6c544020, 0x1f3f9: 0x6d03b220, 0x1f3fa: 0x6d39e420, 0x1f3fb: 0x6c7ebc20, + 0x1f3fc: 0x6d3fe020, 0x1f3fd: 0x6d2b6820, 0x1f3fe: 0x6c0b1820, 0x1f3ff: 0x6c0b1a20, + // Block 0x7d0, offset 0x1f400 + 0x1f400: 0x6c596420, 0x1f401: 0x6cc32a20, 0x1f402: 0x6d2b7020, 0x1f403: 0x6ceeca20, + 0x1f404: 0x6ceecc20, 0x1f405: 0x6d21e620, 0x1f406: 0x6c212420, 0x1f407: 0x6cc77020, + 0x1f408: 0x6c2f0a20, 0x1f409: 0x6c5a2e20, 0x1f40a: 0x6c893220, 0x1f40b: 0x6d0e0620, + 0x1f40c: 0x6cbfda20, 0x1f40d: 0x6cbfdc20, 0x1f40e: 0x6c661020, 0x1f40f: 0x6c089c20, + 0x1f410: 0x6c36dc20, 0x1f411: 0x6d0ff220, 0x1f412: 0x6c409020, 0x1f413: 0x6cc9d820, + 0x1f414: 0x6c41fa20, 0x1f415: 0x6cf98220, 0x1f416: 0x6ceb9820, 0x1f417: 0x6c55fa20, + 0x1f418: 0x6cd42420, 0x1f419: 0x6cc93420, 0x1f41a: 0x6d08d620, 0x1f41b: 0x6cf17220, + 0x1f41c: 0x6cba8820, 0x1f41d: 0x6c508020, 0x1f41e: 0x6cf39020, 0x1f41f: 0x6c39b420, + 0x1f420: 0x6ccad620, 0x1f421: 0x6c8ee420, 0x1f422: 0x6c96aa20, 0x1f423: 0x6cd29620, + 0x1f424: 0x6cd21420, 0x1f425: 0x6c493a20, 0x1f426: 0x6d3ec220, 0x1f427: 0x6ce2d020, + 0x1f428: 0x6cde2620, 0x1f429: 0x6d117a20, 0x1f42a: 0x6c35a820, 0x1f42b: 0x6d1e0820, + 0x1f42c: 0x6cb9e420, 0x1f42d: 0x6cb6a420, 0x1f42e: 0x6cf17420, 0x1f42f: 0x6cc93820, + 0x1f430: 0x6cd0ce20, 0x1f431: 0x6c889e20, 0x1f432: 0x6c028e20, 0x1f433: 0x6c823420, + 0x1f434: 0x6c5b0c20, 0x1f435: 0x6c9fdc20, 0x1f436: 0x6c62e620, 0x1f437: 0x6ce5b620, + 0x1f438: 0x6cc16820, 0x1f439: 0x6c654a20, 0x1f43a: 0x6cd03020, 0x1f43b: 0x6c97a820, + 0x1f43c: 0x6cf7c620, 0x1f43d: 0x6cc0aa20, 0x1f43e: 0x6c0c9c20, 0x1f43f: 0x6c62e820, + // Block 0x7d1, offset 0x1f440 + 0x1f440: 0x6c62d820, 0x1f441: 0x6d3a3c20, 0x1f442: 0x6c679a20, 0x1f443: 0x6d051420, + 0x1f444: 0x6d3b9c20, 0x1f445: 0x6d1de620, 0x1f446: 0x6d2eee20, 0x1f447: 0x6c776420, + 0x1f448: 0x6d093620, 0x1f449: 0x6c0cce20, 0x1f44a: 0x6d248a20, 0x1f44b: 0x6cc16a20, + 0x1f44c: 0x6cfe6e20, 0x1f44d: 0x6c0ea220, 0x1f44e: 0x6c697820, 0x1f44f: 0x6d0a5a20, + 0x1f450: 0x6cdb7220, 0x1f451: 0x6c5a3a20, 0x1f452: 0x6d420020, 0x1f453: 0x6ccdee20, + 0x1f454: 0x6ccdf020, 0x1f455: 0x6c387620, 0x1f456: 0x6c4bae20, 0x1f457: 0x6c8c0c20, + 0x1f458: 0x6d0a5c20, 0x1f459: 0x6c9e8620, 0x1f45a: 0x6cf82c20, 0x1f45b: 0x6d2bbe20, + 0x1f45c: 0x6cfe7820, 0x1f45d: 0x6c3c0620, 0x1f45e: 0x6c494620, 0x1f45f: 0x6c548a20, + 0x1f460: 0x6c7b4e20, 0x1f461: 0x6d2b7220, 0x1f462: 0x6ccada20, 0x1f463: 0x6d2dd020, + 0x1f464: 0x6c420420, 0x1f465: 0x6c4bb220, 0x1f466: 0x6d1d6020, 0x1f467: 0x6c855220, + 0x1f468: 0x6c16da20, 0x1f469: 0x6c836e20, 0x1f46a: 0x6cd63a20, 0x1f46b: 0x6c011020, + 0x1f46c: 0x6cc7f220, 0x1f46d: 0x6c62fe20, 0x1f46e: 0x6d076e20, 0x1f46f: 0x6c56f220, + 0x1f470: 0x6cd63c20, 0x1f471: 0x6c87bc20, 0x1f472: 0x6c8b8e20, 0x1f473: 0x6c87c620, + 0x1f474: 0x6c9f2020, 0x1f475: 0x6d31a620, 0x1f476: 0x6cfe1220, 0x1f477: 0x6c370220, + 0x1f478: 0x6c91ac20, 0x1f479: 0x6c49ca20, 0x1f47a: 0x6c84f020, 0x1f47b: 0x6cfb1c20, + 0x1f47c: 0x6d20ce20, 0x1f47d: 0x6c29c220, 0x1f47e: 0x6c613a20, 0x1f47f: 0x6d1f4220, + // Block 0x7d2, offset 0x1f480 + 0x1f480: 0x6cea5c20, 0x1f481: 0x6c91c020, 0x1f482: 0x6c39ac20, 0x1f483: 0x6c035420, + 0x1f484: 0x6c515220, 0x1f485: 0x6c03be20, 0x1f486: 0x6cb2ba20, 0x1f487: 0x6ca70020, + 0x1f488: 0x6c915620, 0x1f489: 0x6d1f5220, 0x1f48a: 0x6d2c8020, 0x1f48b: 0x6c401420, + 0x1f48c: 0x6c03c020, 0x1f48d: 0x6c065620, 0x1f48e: 0x6c547620, 0x1f48f: 0x6cb00220, + 0x1f490: 0x6cdf2c20, 0x1f491: 0x6c4a8220, 0x1f492: 0x6c6b1620, 0x1f493: 0x6c77b420, + 0x1f494: 0x6ceffa20, 0x1f495: 0x6c376420, 0x1f496: 0x6ce77620, 0x1f497: 0x6d2b6220, + 0x1f498: 0x6c547c20, 0x1f499: 0x6c7b2e20, 0x1f49a: 0x6c625a20, 0x1f49b: 0x6c686220, + 0x1f49c: 0x6cfac620, 0x1f49d: 0x6d2c8820, 0x1f49e: 0x6cfdfa20, 0x1f49f: 0x6d0a2c20, + 0x1f4a0: 0x6c451e20, 0x1f4a1: 0x6c843820, 0x1f4a2: 0x6c884620, 0x1f4a3: 0x6c64ea20, + 0x1f4a4: 0x6c852c20, 0x1f4a5: 0x6cd28820, 0x1f4a6: 0x6ce5a420, 0x1f4a7: 0x6c4be820, + 0x1f4a8: 0x6ccc1620, 0x1f4a9: 0x6c595020, 0x1f4aa: 0x6c758020, 0x1f4ab: 0x6c626e20, + 0x1f4ac: 0x6d1e5a20, 0x1f4ad: 0x6cbe5820, 0x1f4ae: 0x6c8d6420, 0x1f4af: 0x6cb65820, + 0x1f4b0: 0x6d406820, 0x1f4b1: 0x6c3a1c20, 0x1f4b2: 0x6c7d8620, 0x1f4b3: 0x6c168020, + 0x1f4b4: 0x6c482a20, 0x1f4b5: 0x6ca60a20, 0x1f4b6: 0x6ca70820, 0x1f4b7: 0x6c2de420, + 0x1f4b8: 0x6c6dd420, 0x1f4b9: 0x6cd02420, 0x1f4ba: 0x6cd20020, 0x1f4bb: 0x6d3e9e20, + 0x1f4bc: 0x6c3bf820, 0x1f4bd: 0x6c2ef620, 0x1f4be: 0x6c089420, 0x1f4bf: 0x6c16ce20, + // Block 0x7d3, offset 0x1f4c0 + 0x1f4c0: 0x6ce39020, 0x1f4c1: 0x6cf16c20, 0x1f4c2: 0x6ceec420, 0x1f4c3: 0x6cc9d220, + 0x1f4c4: 0x6c36c020, 0x1f4c5: 0x6cbfd220, 0x1f4c6: 0x6c407020, 0x1f4c7: 0x6c5a1620, + 0x1f4c8: 0x6cc31e20, 0x1f4c9: 0x6c678a20, 0x1f4ca: 0x6c0b1220, 0x1f4cb: 0x6ccac820, + 0x1f4cc: 0x6c028020, 0x1f4cd: 0x6cb68020, 0x1f4ce: 0x6cde1e20, 0x1f4cf: 0x6c493220, + 0x1f4d0: 0x6d116620, 0x1f4d1: 0x6cad1220, 0x1f4d2: 0x6c651e20, 0x1f4d3: 0x6c823020, + 0x1f4d4: 0x6c0c9a20, 0x1f4d5: 0x6d093420, 0x1f4d6: 0x6c0cc820, 0x1f4d7: 0x6c979820, + 0x1f4d8: 0x6c9fd820, 0x1f4d9: 0x6d1dd220, 0x1f4da: 0x6cf10420, 0x1f4db: 0x6cf7b620, + 0x1f4dc: 0x6c4ba020, 0x1f4dd: 0x6ccde220, 0x1f4de: 0x6c8c0620, 0x1f4df: 0x6d41fe20, + 0x1f4e0: 0x6c56e420, 0x1f4e1: 0x6c41fe20, 0x1f4e2: 0x6c854a20, 0x1f4e3: 0x6d2dc820, + 0x1f4e4: 0x6c496e20, 0x1f4e5: 0x6ca79a20, 0x1f4e6: 0x6d15f420, 0x1f4e7: 0x6c3ebc20, + 0x1f4e8: 0x6c864220, 0x1f4e9: 0x6c6f7e20, 0x1f4ea: 0x6c102220, 0x1f4eb: 0x6d0e8e20, + 0x1f4ec: 0x6c3f5020, 0x1f4ed: 0x6c2dd020, 0x1f4ee: 0x6c5efc20, 0x1f4ef: 0x6c3cea20, + 0x1f4f0: 0x6cc83620, 0x1f4f1: 0x6c41ac20, 0x1f4f2: 0x6cd1e820, 0x1f4f3: 0x6c3cee20, + 0x1f4f4: 0x6ca01420, 0x1f4f5: 0x6c060c20, 0x1f4f6: 0x6d250820, 0x1f4f7: 0x6d341420, + 0x1f4f8: 0x6c56c420, 0x1f4f9: 0x6cbd9a20, 0x1f4fa: 0x6c3d9820, 0x1f4fb: 0x6c049620, + 0x1f4fc: 0x6cf1ac20, 0x1f4fd: 0x6c64ec20, 0x1f4fe: 0x6cd1f620, 0x1f4ff: 0x6d23e420, + // Block 0x7d4, offset 0x1f500 + 0x1f500: 0x6c3d3220, 0x1f501: 0x6d10b620, 0x1f502: 0x6c74b020, 0x1f503: 0x6c74b220, + 0x1f504: 0x6cb06c20, 0x1f505: 0x6c583020, 0x1f506: 0x6d326820, 0x1f507: 0x6c061220, + 0x1f508: 0x6d0eb420, 0x1f509: 0x6d0af620, 0x1f50a: 0x6d336420, 0x1f50b: 0x6c399c20, + 0x1f50c: 0x6c3cf020, 0x1f50d: 0x6cf1ae20, 0x1f50e: 0x6cab5220, 0x1f50f: 0x6c279220, + 0x1f510: 0x6c43ac20, 0x1f511: 0x6cc7ca20, 0x1f512: 0x6c8d6620, 0x1f513: 0x6c9eea20, + 0x1f514: 0x6c3eec20, 0x1f515: 0x6ceb5420, 0x1f516: 0x6c9f7c20, 0x1f517: 0x6c869620, + 0x1f518: 0x6c0b5020, 0x1f519: 0x6d36fc20, 0x1f51a: 0x6c43ae20, 0x1f51b: 0x6d251420, + 0x1f51c: 0x6c227620, 0x1f51d: 0x6cc1cc20, 0x1f51e: 0x6cff1c20, 0x1f51f: 0x6c1adc20, + 0x1f520: 0x6c28c020, 0x1f521: 0x6c70d020, 0x1f522: 0x6d11d620, 0x1f523: 0x6c473820, + 0x1f524: 0x6c301820, 0x1f525: 0x6d240020, 0x1f526: 0x6d0f6e20, 0x1f527: 0x6cc73a20, + 0x1f528: 0x6d0afe20, 0x1f529: 0x6ce60420, 0x1f52a: 0x6d240220, 0x1f52b: 0x6ce54420, + 0x1f52c: 0x6d1bf820, 0x1f52d: 0x6c331620, 0x1f52e: 0x6cf38620, 0x1f52f: 0x6c377020, + 0x1f530: 0x6c487c20, 0x1f531: 0x6c00d420, 0x1f532: 0x6d341a20, 0x1f533: 0x6d0ed620, + 0x1f534: 0x6c527a20, 0x1f535: 0x6cff2c20, 0x1f536: 0x6c63f020, 0x1f537: 0x6c8b4220, + 0x1f538: 0x6d39d220, 0x1f539: 0x6d0fe220, 0x1f53a: 0x6ce39220, 0x1f53b: 0x6c539220, + 0x1f53c: 0x6c963020, 0x1f53d: 0x6cc7da20, 0x1f53e: 0x6ca1f220, 0x1f53f: 0x6c43b820, + // Block 0x7d5, offset 0x1f540 + 0x1f540: 0x6cc57e20, 0x1f541: 0x6c688c20, 0x1f542: 0x6d050220, 0x1f543: 0x6d38ba20, + 0x1f544: 0x6d341c20, 0x1f545: 0x6c963220, 0x1f546: 0x6c528c20, 0x1f547: 0x6ca77620, + 0x1f548: 0x6c370820, 0x1f549: 0x6c944620, 0x1f54a: 0x6c63f220, 0x1f54b: 0x6c62b420, + 0x1f54c: 0x6ce90420, 0x1f54d: 0x6c583820, 0x1f54e: 0x6ceb9220, 0x1f54f: 0x6c104a20, + 0x1f550: 0x6cf40420, 0x1f551: 0x6c730820, 0x1f552: 0x6d244820, 0x1f553: 0x6c0f9c20, + 0x1f554: 0x6c75f620, 0x1f555: 0x6d0aae20, 0x1f556: 0x6c089220, 0x1f557: 0x6cf71020, + 0x1f558: 0x6c75f820, 0x1f559: 0x6c717620, 0x1f55a: 0x6ce87e20, 0x1f55b: 0x6c6de420, + 0x1f55c: 0x6ce3a220, 0x1f55d: 0x6c359020, 0x1f55e: 0x6c359220, 0x1f55f: 0x6c7bcc20, + 0x1f560: 0x6c55e820, 0x1f561: 0x6cf48a20, 0x1f562: 0x6cd02a20, 0x1f563: 0x6c7f6620, + 0x1f564: 0x6c69ee20, 0x1f565: 0x6cacca20, 0x1f566: 0x6c932820, 0x1f567: 0x6cb02c20, + 0x1f568: 0x6cd51a20, 0x1f569: 0x6c3f2220, 0x1f56a: 0x6c015e20, 0x1f56b: 0x6d3dd020, + 0x1f56c: 0x6caef420, 0x1f56d: 0x6cbdba20, 0x1f56e: 0x6cb94220, 0x1f56f: 0x6c06be20, + 0x1f570: 0x6c2dee20, 0x1f571: 0x6c932a20, 0x1f572: 0x6cc42c20, 0x1f573: 0x6c652a20, + 0x1f574: 0x6c718420, 0x1f575: 0x6ce92a20, 0x1f576: 0x6d0b0420, 0x1f577: 0x6d252020, + 0x1f578: 0x6cb68e20, 0x1f579: 0x6c849620, 0x1f57a: 0x6d138620, 0x1f57b: 0x6d3c7020, + 0x1f57c: 0x6c798e20, 0x1f57d: 0x6c352020, 0x1f57e: 0x6c7d9020, 0x1f57f: 0x6cd11c20, + // Block 0x7d6, offset 0x1f580 + 0x1f580: 0x6cb69020, 0x1f581: 0x6c6de820, 0x1f582: 0x6d192420, 0x1f583: 0x6d192620, + 0x1f584: 0x6c6dea20, 0x1f585: 0x6d3ebc20, 0x1f586: 0x6c7f3220, 0x1f587: 0x6c302620, + 0x1f588: 0x6cb55020, 0x1f589: 0x6c219420, 0x1f58a: 0x6c44e620, 0x1f58b: 0x6c70e020, + 0x1f58c: 0x6c74f620, 0x1f58d: 0x6d199620, 0x1f58e: 0x6d422420, 0x1f58f: 0x6c5f8a20, + 0x1f590: 0x6cd62c20, 0x1f591: 0x6d1c1420, 0x1f592: 0x6c1c9220, 0x1f593: 0x6c9e8220, + 0x1f594: 0x6cc77220, 0x1f595: 0x6c016220, 0x1f596: 0x6cbfe020, 0x1f597: 0x6ce3ae20, + 0x1f598: 0x6c55fc20, 0x1f599: 0x6ce3b020, 0x1f59a: 0x6c36e020, 0x1f59b: 0x6c6a4420, + 0x1f59c: 0x6c991220, 0x1f59d: 0x6c3f2620, 0x1f59e: 0x6c212820, 0x1f59f: 0x6ce90820, + 0x1f5a0: 0x6d0e0820, 0x1f5a1: 0x6c51a020, 0x1f5a2: 0x6d25d020, 0x1f5a3: 0x6cb10620, + 0x1f5a4: 0x6c7d9620, 0x1f5a5: 0x6c9a3e20, 0x1f5a6: 0x6c55fe20, 0x1f5a7: 0x6d1c1620, + 0x1f5a8: 0x6c204820, 0x1f5a9: 0x6cf54c20, 0x1f5aa: 0x6c718a20, 0x1f5ab: 0x6c309c20, + 0x1f5ac: 0x6c124420, 0x1f5ad: 0x6c39e020, 0x1f5ae: 0x6c520a20, 0x1f5af: 0x6d1c3620, + 0x1f5b0: 0x6d25d220, 0x1f5b1: 0x6cfb0620, 0x1f5b2: 0x6cf24620, 0x1f5b3: 0x6cd21620, + 0x1f5b4: 0x6c520c20, 0x1f5b5: 0x6c1eca20, 0x1f5b6: 0x6ce16820, 0x1f5b7: 0x6cfa1a20, + 0x1f5b8: 0x6cc93a20, 0x1f5b9: 0x6c8ee620, 0x1f5ba: 0x6c60fe20, 0x1f5bb: 0x6c474c20, + 0x1f5bc: 0x6c654620, 0x1f5bd: 0x6cdd0420, 0x1f5be: 0x6c4f3a20, 0x1f5bf: 0x6c228020, + // Block 0x7d7, offset 0x1f5c0 + 0x1f5c0: 0x6c228220, 0x1f5c1: 0x6d195420, 0x1f5c2: 0x6d124820, 0x1f5c3: 0x6d0f0220, + 0x1f5c4: 0x6c5f9a20, 0x1f5c5: 0x6c875c20, 0x1f5c6: 0x6ce4d220, 0x1f5c7: 0x6c7a0e20, + 0x1f5c8: 0x6ce30620, 0x1f5c9: 0x6ce30820, 0x1f5ca: 0x6d195620, 0x1f5cb: 0x6ce90c20, + 0x1f5cc: 0x6c96ac20, 0x1f5cd: 0x6c68ae20, 0x1f5ce: 0x6c42f420, 0x1f5cf: 0x6ce4d420, + 0x1f5d0: 0x6c18fe20, 0x1f5d1: 0x6c610020, 0x1f5d2: 0x6ce97620, 0x1f5d3: 0x6d311020, + 0x1f5d4: 0x6c029020, 0x1f5d5: 0x6d11e620, 0x1f5d6: 0x6d143c20, 0x1f5d7: 0x6cab6620, + 0x1f5d8: 0x6c1c9820, 0x1f5d9: 0x6d376e20, 0x1f5da: 0x6c8f5c20, 0x1f5db: 0x6d1de820, + 0x1f5dc: 0x6c937020, 0x1f5dd: 0x6c0aca20, 0x1f5de: 0x6cd6b820, 0x1f5df: 0x6d3de420, + 0x1f5e0: 0x6d21fa20, 0x1f5e1: 0x6cf41020, 0x1f5e2: 0x6c752620, 0x1f5e3: 0x6d1ab620, + 0x1f5e4: 0x6ce3b820, 0x1f5e5: 0x6cd85620, 0x1f5e6: 0x6c68b420, 0x1f5e7: 0x6d196c20, + 0x1f5e8: 0x6c577020, 0x1f5e9: 0x6c0ad020, 0x1f5ea: 0x6d1c4620, 0x1f5eb: 0x6cdb7420, + 0x1f5ec: 0x6c5a3c20, 0x1f5ed: 0x6c38f820, 0x1f5ee: 0x6c68b620, 0x1f5ef: 0x6c8a5a20, + 0x1f5f0: 0x6d0f1820, 0x1f5f1: 0x6c42f820, 0x1f5f2: 0x6c704020, 0x1f5f3: 0x6cfbda20, + 0x1f5f4: 0x6cfbdc20, 0x1f5f5: 0x6ce90e20, 0x1f5f6: 0x6c971c20, 0x1f5f7: 0x6d420220, + 0x1f5f8: 0x6d248e20, 0x1f5f9: 0x6d1c4a20, 0x1f5fa: 0x6c934220, 0x1f5fb: 0x6ce97820, + 0x1f5fc: 0x6cfbde20, 0x1f5fd: 0x6d092e20, 0x1f5fe: 0x6d197820, 0x1f5ff: 0x6cb0e020, + // Block 0x7d8, offset 0x1f600 + 0x1f600: 0x6c1efc20, 0x1f601: 0x6c958c20, 0x1f602: 0x6cf75c20, 0x1f603: 0x6d15a220, + 0x1f604: 0x6c5fb220, 0x1f605: 0x6d2b2c20, 0x1f606: 0x6d220820, 0x1f607: 0x6d2dd220, + 0x1f608: 0x6d13a420, 0x1f609: 0x6d0ffa20, 0x1f60a: 0x6cb0e220, 0x1f60b: 0x6ca94420, + 0x1f60c: 0x6c56f420, 0x1f60d: 0x6c9cd220, 0x1f60e: 0x6d1c5020, 0x1f60f: 0x6c9bc420, + 0x1f610: 0x6c2bc220, 0x1f611: 0x6d273620, 0x1f612: 0x6d249020, 0x1f613: 0x6c831a20, + 0x1f614: 0x6c068620, 0x1f615: 0x6c91ae20, 0x1f616: 0x6c521220, 0x1f617: 0x6c902220, + 0x1f618: 0x6cd6cc20, 0x1f619: 0x6d274020, 0x1f61a: 0x6d1c5220, 0x1f61b: 0x6c49cc20, + 0x1f61c: 0x6cc23820, 0x1f61d: 0x6c84f220, 0x1f61e: 0x6c948820, 0x1f61f: 0x6ca78a20, + 0x1f620: 0x6c6f5a20, 0x1f621: 0x6c5e8820, 0x1f622: 0x6d24ca20, 0x1f623: 0x6c9fea20, + 0x1f624: 0x6cd1a020, 0x1f625: 0x6cab3620, 0x1f626: 0x6d0ada20, 0x1f627: 0x6c122620, + 0x1f628: 0x6c05ec20, 0x1f629: 0x6d322a20, 0x1f62a: 0x6c470420, 0x1f62b: 0x6c2fec20, + 0x1f62c: 0x6c914a20, 0x1f62d: 0x6d0ae420, 0x1f62e: 0x6cfeae20, 0x1f62f: 0x6d0f5820, + 0x1f630: 0x6c8cda20, 0x1f631: 0x6c1aa620, 0x1f632: 0x6cc18220, 0x1f633: 0x6d24d820, + 0x1f634: 0x6d090420, 0x1f635: 0x6ceb1220, 0x1f636: 0x6cd7de20, 0x1f637: 0x6d361220, + 0x1f638: 0x6c375620, 0x1f639: 0x6c485820, 0x1f63a: 0x6d04d220, 0x1f63b: 0x6c526620, + 0x1f63c: 0x6d388020, 0x1f63d: 0x6c438a20, 0x1f63e: 0x6c943820, 0x1f63f: 0x6c534820, + // Block 0x7d9, offset 0x1f640 + 0x1f640: 0x6cf3ce20, 0x1f641: 0x6c0f0c20, 0x1f642: 0x6c83dc20, 0x1f643: 0x6c72f820, + 0x1f644: 0x6c479a20, 0x1f645: 0x6c357220, 0x1f646: 0x6d236220, 0x1f647: 0x6cfb6820, + 0x1f648: 0x6ce33a20, 0x1f649: 0x6cf45420, 0x1f64a: 0x6cc42a20, 0x1f64b: 0x6c9e7a20, + 0x1f64c: 0x6c013e20, 0x1f64d: 0x6c7d7820, 0x1f64e: 0x6c06b420, 0x1f64f: 0x6caeb020, + 0x1f650: 0x6cb8fc20, 0x1f651: 0x6c219220, 0x1f652: 0x6c44d620, 0x1f653: 0x6d250220, + 0x1f654: 0x6cdadc20, 0x1f655: 0x6c558e20, 0x1f656: 0x6c516020, 0x1f657: 0x6c367e20, + 0x1f658: 0x6c47bc20, 0x1f659: 0x6cbfba20, 0x1f65a: 0x6c225a20, 0x1f65b: 0x6c9a1e20, + 0x1f65c: 0x6cf51220, 0x1f65d: 0x6d187820, 0x1f65e: 0x6d122020, 0x1f65f: 0x6cf23820, + 0x1f660: 0x6c8e9420, 0x1f661: 0x6c60a020, 0x1f662: 0x6d187a20, 0x1f663: 0x6c64ee20, + 0x1f664: 0x6c51e220, 0x1f665: 0x6d141c20, 0x1f666: 0x6d1bfa20, 0x1f667: 0x6d310420, + 0x1f668: 0x6c8f4420, 0x1f669: 0x6c8a2e20, 0x1f66a: 0x6c689220, 0x1f66b: 0x6c703020, + 0x1f66c: 0x6d242a20, 0x1f66d: 0x6c931820, 0x1f66e: 0x6c58b420, 0x1f66f: 0x6d2db020, + 0x1f670: 0x6d1c0c20, 0x1f671: 0x6c56da20, 0x1f672: 0x6c9b8020, 0x1f673: 0x6c49c020, + 0x1f674: 0x6cd6ba20, 0x1f675: 0x6c91bc20, 0x1f676: 0x6c6c5820, 0x1f677: 0x6c8d6820, + 0x1f678: 0x6c661220, 0x1f679: 0x6cfbd020, 0x1f67a: 0x6c25fe20, 0x1f67b: 0x6c662620, + 0x1f67c: 0x6c664020, 0x1f67d: 0x6d0d1a20, 0x1f67e: 0x6c25f420, 0x1f67f: 0x6c924c20, + // Block 0x7da, offset 0x1f680 + 0x1f680: 0x6d1eaa20, 0x1f681: 0x6c241620, 0x1f682: 0x6c614c20, 0x1f683: 0x6cad6820, + 0x1f684: 0x6c241820, 0x1f685: 0x6cad6c20, 0x1f686: 0x6d3b3220, 0x1f687: 0x6c758220, + 0x1f688: 0x6d3a8220, 0x1f689: 0x6c651020, 0x1f68a: 0x6c9c8420, 0x1f68b: 0x6c9c8620, + 0x1f68c: 0x6d22a820, 0x1f68d: 0x6c8ec820, 0x1f68e: 0x6c18f420, 0x1f68f: 0x6c758a20, + 0x1f690: 0x6c8bf620, 0x1f691: 0x6ca61a20, 0x1f692: 0x6cb69420, 0x1f693: 0x6c932c20, + 0x1f694: 0x6c703a20, 0x1f695: 0x6c758c20, 0x1f696: 0x6c6df020, 0x1f697: 0x6c871420, + 0x1f698: 0x6cfd9820, 0x1f699: 0x6cfbd220, 0x1f69a: 0x6c639020, 0x1f69b: 0x6c9ca620, + 0x1f69c: 0x6c875e20, 0x1f69d: 0x6ccf8e20, 0x1f69e: 0x6d2ef220, 0x1f69f: 0x6c8c1020, + 0x1f6a0: 0x6c6dfa20, 0x1f6a1: 0x6cb6b620, 0x1f6a2: 0x6c8de220, 0x1f6a3: 0x6d0d2820, + 0x1f6a4: 0x6c241a20, 0x1f6a5: 0x6c973220, 0x1f6a6: 0x6c972620, 0x1f6a7: 0x6c516220, + 0x1f6a8: 0x6c17a620, 0x1f6a9: 0x6c3d9c20, 0x1f6aa: 0x6c9e5e20, 0x1f6ab: 0x6c9e3e20, + 0x1f6ac: 0x6c3da820, 0x1f6ad: 0x6cad9c20, 0x1f6ae: 0x6cc27e20, 0x1f6af: 0x6cc14c20, + 0x1f6b0: 0x6ca1f420, 0x1f6b1: 0x6c3db020, 0x1f6b2: 0x6cfd2c20, 0x1f6b3: 0x6c7f3420, + 0x1f6b4: 0x6cc15820, 0x1f6b5: 0x6c9e6a20, 0x1f6b6: 0x6c1ca620, 0x1f6b7: 0x6c3c9420, + 0x1f6b8: 0x6c3d6e20, 0x1f6b9: 0x6cc14020, 0x1f6ba: 0x6c9e6420, 0x1f6bb: 0x6c966820, + 0x1f6bc: 0x6c99c420, 0x1f6bd: 0x6ca07020, 0x1f6be: 0x6c5af020, 0x1f6bf: 0x6ca1b820, + // Block 0x7db, offset 0x1f6c0 + 0x1f6c0: 0x6d407020, 0x1f6c1: 0x6caaae20, 0x1f6c2: 0x6c3bb420, 0x1f6c3: 0x6c59ce20, + 0x1f6c4: 0x6c59b820, 0x1f6c5: 0x6c6c5a20, 0x1f6c6: 0x6c49f620, 0x1f6c7: 0x6ce47420, + 0x1f6c8: 0x6ce81c20, 0x1f6c9: 0x6c538c20, 0x1f6ca: 0x6c57c820, 0x1f6cb: 0x6c7c0820, + 0x1f6cc: 0x6c539a20, 0x1f6cd: 0x6cd56020, 0x1f6ce: 0x6c843a20, 0x1f6cf: 0x6ca70a20, + 0x1f6d0: 0x6c1af220, 0x1f6d1: 0x6c521c20, 0x1f6d2: 0x6c521a20, 0x1f6d3: 0x6d187c20, + 0x1f6d4: 0x6cb9ce20, 0x1f6d5: 0x6c284820, 0x1f6d6: 0x6cf8ea20, 0x1f6d7: 0x6cea2e20, + 0x1f6d8: 0x6ca17020, 0x1f6d9: 0x6ca15020, 0x1f6da: 0x6cb9d220, 0x1f6db: 0x6c279e20, + 0x1f6dc: 0x6c1f8420, 0x1f6dd: 0x6d1ff620, 0x1f6de: 0x6c2d2e20, 0x1f6df: 0x6d143020, + 0x1f6e0: 0x6cfa1220, 0x1f6e1: 0x6d0df220, 0x1f6e2: 0x6cc15a20, 0x1f6e3: 0x6c9a7220, + 0x1f6e4: 0x6d0e0a20, 0x1f6e5: 0x6cbe9420, 0x1f6e6: 0x6d271220, 0x1f6e7: 0x6c84a220, + 0x1f6e8: 0x6c293820, 0x1f6e9: 0x6c31ec20, 0x1f6ea: 0x6c11e820, 0x1f6eb: 0x6d0c4820, + 0x1f6ec: 0x6d0d0820, 0x1f6ed: 0x6d0e1420, 0x1f6ee: 0x6c285820, 0x1f6ef: 0x6c01e420, + 0x1f6f0: 0x6d320a20, 0x1f6f1: 0x6c27ac20, 0x1f6f2: 0x6c11ea20, 0x1f6f3: 0x6d144020, + 0x1f6f4: 0x6c9a4620, 0x1f6f5: 0x6d2e4220, 0x1f6f6: 0x6d0e3420, 0x1f6f7: 0x6c320e20, + 0x1f6f8: 0x6c91b020, 0x1f6f9: 0x6d353420, 0x1f6fa: 0x6c3bc220, 0x1f6fb: 0x6c3f1020, + 0x1f6fc: 0x6c3f9820, 0x1f6fd: 0x6c9e3220, 0x1f6fe: 0x6c9e0a20, 0x1f6ff: 0x6d25bc20, + // Block 0x7dc, offset 0x1f700 + 0x1f700: 0x6c247220, 0x1f701: 0x6cc28420, 0x1f702: 0x6c178820, 0x1f703: 0x6cebfc20, + 0x1f704: 0x6d39e620, 0x1f705: 0x6d342a20, 0x1f706: 0x6c9bbe20, 0x1f707: 0x6c029420, + 0x1f708: 0x6c0cd020, 0x1f709: 0x6ceb6a20, 0x1f70a: 0x6c0ada20, 0x1f70b: 0x6d257220, + 0x1f70c: 0x6c176620, 0x1f70d: 0x6ceb5e20, 0x1f70e: 0x6c2f7420, 0x1f70f: 0x6c9d7420, + 0x1f710: 0x6ca3d020, 0x1f711: 0x6c2f7c20, 0x1f712: 0x6d3e8420, 0x1f713: 0x6c47a620, + 0x1f714: 0x6c47a820, 0x1f715: 0x6c302220, 0x1f716: 0x6c3ba420, 0x1f717: 0x6ce25020, + 0x1f718: 0x6d252820, 0x1f719: 0x6cb03a20, 0x1f71a: 0x6c168e20, 0x1f71b: 0x6c42f620, + 0x1f71c: 0x6cb80820, 0x1f71d: 0x6d252a20, 0x1f71e: 0x6ce0e220, 0x1f71f: 0x6ce29820, + 0x1f720: 0x6cd56620, 0x1f721: 0x6cd55220, 0x1f722: 0x6c3b9e20, 0x1f723: 0x6c3adc20, + 0x1f724: 0x6cf1be20, 0x1f725: 0x6c039620, 0x1f726: 0x6c2dea20, 0x1f727: 0x6ceb5a20, + 0x1f728: 0x6d37d420, 0x1f729: 0x6cc1ee20, 0x1f72a: 0x6cd11a20, 0x1f72b: 0x6cd28e20, + 0x1f72c: 0x6d205e20, 0x1f72d: 0x6cd29420, 0x1f72e: 0x6ce69e20, 0x1f72f: 0x6cf40c20, + 0x1f730: 0x6ca77220, 0x1f731: 0x6c6df620, 0x1f732: 0x6c5d1020, 0x1f733: 0x6c719820, + 0x1f734: 0x6d0e1e20, 0x1f735: 0x6ce88020, 0x1f736: 0x6cd85c20, 0x1f737: 0x6cf75420, + 0x1f738: 0x6cfd4e20, 0x1f739: 0x6d0e2820, 0x1f73a: 0x6c82ae20, 0x1f73b: 0x6c08a220, + 0x1f73c: 0x6d11da20, 0x1f73d: 0x6cc0a220, 0x1f73e: 0x6c4dc020, 0x1f73f: 0x6cf53a20, + // Block 0x7dd, offset 0x1f740 + 0x1f740: 0x6cf54220, 0x1f741: 0x6c53e620, 0x1f742: 0x6d028620, 0x1f743: 0x6c36f820, + 0x1f744: 0x6d2c1020, 0x1f745: 0x6d055c20, 0x1f746: 0x6cf27820, 0x1f747: 0x6d2c1220, + 0x1f748: 0x6ca9f820, 0x1f749: 0x6ca48c20, 0x1f74a: 0x6cb63420, 0x1f74b: 0x6d2d0020, + 0x1f74c: 0x6c62b620, 0x1f74d: 0x6d3ebe20, 0x1f74e: 0x6c5f9c20, 0x1f74f: 0x6c5fac20, + 0x1f750: 0x6cb56c20, 0x1f751: 0x6c5f2820, 0x1f752: 0x6c1bc220, 0x1f753: 0x6c193020, + 0x1f754: 0x6c193420, 0x1f755: 0x6c519220, 0x1f756: 0x6d0b3a20, 0x1f757: 0x6d1aae20, + 0x1f758: 0x6d026c20, 0x1f759: 0x6c05c020, 0x1f75a: 0x6d2b2620, 0x1f75b: 0x6d027620, + 0x1f75c: 0x6c148c20, 0x1f75d: 0x6c1aec20, 0x1f75e: 0x6d0e0c20, 0x1f75f: 0x6c71e020, + 0x1f760: 0x6ce5b220, 0x1f761: 0x6c8d9620, 0x1f762: 0x6c8d7820, 0x1f763: 0x6c1e6e20, + 0x1f764: 0x6cc33220, 0x1f765: 0x6d027e20, 0x1f766: 0x6c791420, 0x1f767: 0x6ca8ae20, + 0x1f768: 0x6c703e20, 0x1f769: 0x6d11e420, 0x1f76a: 0x6c21e820, 0x1f76b: 0x6c7dc820, + 0x1f76c: 0x6d22b220, 0x1f76d: 0x6c1efa20, 0x1f76e: 0x6d163020, 0x1f76f: 0x6ca61c20, + 0x1f770: 0x6d2b2a20, 0x1f771: 0x6d407820, 0x1f772: 0x6cc25820, 0x1f773: 0x6d281020, + 0x1f774: 0x6d0e3020, 0x1f775: 0x6cab6e20, 0x1f776: 0x6c36fe20, 0x1f777: 0x6cf33820, + 0x1f778: 0x6d198020, 0x1f779: 0x6c221a20, 0x1f77a: 0x6d407a20, 0x1f77b: 0x6c2d0020, + 0x1f77c: 0x6c1efe20, 0x1f77d: 0x6c6d7a20, 0x1f77e: 0x6d0bd420, 0x1f77f: 0x6c1b8020, + // Block 0x7de, offset 0x1f780 + 0x1f780: 0x6c192420, 0x1f781: 0x6c512220, 0x1f782: 0x6d1a6e20, 0x1f783: 0x6c71c620, + 0x1f784: 0x6c8d3220, 0x1f785: 0x6c05b620, 0x1f786: 0x6ce59620, 0x1f787: 0x6d3e7820, + 0x1f788: 0x6c790620, 0x1f789: 0x6d228620, 0x1f78a: 0x6c21d420, 0x1f78b: 0x6cc25220, + 0x1f78c: 0x6cf32620, 0x1f78d: 0x6c8fb020, 0x1f78e: 0x6cad1420, 0x1f78f: 0x6c45c020, + 0x1f790: 0x6cad1620, 0x1f791: 0x6d0e0e20, 0x1f792: 0x6c8ff220, 0x1f793: 0x6c904820, + 0x1f794: 0x6c45c820, 0x1f795: 0x6c76b820, 0x1f796: 0x6c26dc20, 0x1f797: 0x6c8e0020, + 0x1f798: 0x6c26de20, 0x1f799: 0x6c8f6620, 0x1f79a: 0x6c458620, 0x1f79b: 0x6c76a820, + 0x1f79c: 0x6c4a9620, 0x1f79d: 0x6cbfea20, 0x1f79e: 0x6c0cd620, 0x1f79f: 0x6c4a3820, + 0x1f7a0: 0x6d26f620, 0x1f7a1: 0x6c20f820, 0x1f7a2: 0x6c51aa20, 0x1f7a3: 0x6c753020, + 0x1f7a4: 0x6d013c20, 0x1f7a5: 0x6d249820, + // Block 0x7df, offset 0x1f7c0 + 0x1f7c3: 0x6ccd4220, + // Block 0x7e0, offset 0x1f800 + 0x1f800: 0x6cb6e820, 0x1f801: 0x6c452620, 0x1f802: 0x6c17ce20, 0x1f803: 0x6c642020, + 0x1f804: 0x6c573e20, 0x1f805: 0x6c202c20, 0x1f806: 0x6c71ea20, 0x1f807: 0x6c4a9620, + 0x1f808: 0x6c4a9620, 0x1f809: 0x6cb75220, 0x1f80a: 0x6c6c2e20, 0x1f80b: 0x6c7e6220, + 0x1f80c: 0x6ca3ac20, 0x1f80d: 0x6c804a20, 0x1f80e: 0x6c7f7820, 0x1f80f: 0x6c956220, + 0x1f810: 0x6c957a20, 0x1f811: 0x6c955820, 0x1f812: 0x6c95b820, 0x1f813: 0x6c957c20, + 0x1f814: 0x6c822620, 0x1f815: 0x6c95e820, 0x1f816: 0x6c81d020, 0x1f817: 0x6c95f620, + 0x1f818: 0x6c960a20, 0x1f819: 0x6c81d620, 0x1f81a: 0x6c962a20, 0x1f81b: 0x6c949a20, + 0x1f81c: 0x6c948c20, 0x1f81d: 0x6c7ff820, 0x1f81e: 0x6c808820, 0x1f81f: 0x6c7ff020, + 0x1f820: 0x6c948820, 0x1f821: 0x6c7f9a20, 0x1f822: 0x6c807c20, 0x1f823: 0x6c7fc420, + 0x1f824: 0x6c7fd820, 0x1f825: 0x6c7e3e20, 0x1f826: 0x6c7eaa20, 0x1f827: 0x6c7ec420, + 0x1f828: 0x6c80b420, 0x1f829: 0x6c80f820, 0x1f82a: 0x6c811820, 0x1f82b: 0x6c80ae20, + 0x1f82c: 0x6c80a220, 0x1f82d: 0x6c7ee220, 0x1f82e: 0x6c839020, 0x1f82f: 0x6c815620, + 0x1f830: 0x6c91da20, 0x1f831: 0x6c91f220, 0x1f832: 0x6c918420, 0x1f833: 0x6c915c20, + 0x1f834: 0x6c819a20, 0x1f835: 0x6c917820, 0x1f836: 0x6c91c420, 0x1f837: 0x6c927620, + 0x1f838: 0x6c933620, 0x1f839: 0x6c91d420, 0x1f83a: 0x6c934220, 0x1f83b: 0x6c926e20, + 0x1f83c: 0x6c925a20, 0x1f83d: 0x6c93ec20, 0x1f83e: 0x6c924820, 0x1f83f: 0x6c92de20, + // Block 0x7e1, offset 0x1f840 + 0x1f840: 0x6c924c20, 0x1f841: 0x6c952620, 0x1f842: 0x6c903e20, 0x1f843: 0x6ca9f020, + 0x1f844: 0x6c8ff420, 0x1f845: 0x6c8ff820, 0x1f846: 0x6c814220, 0x1f847: 0x6c82d220, + 0x1f848: 0x6c927420, 0x1f849: 0x6c823e20, 0x1f84a: 0x6c82e220, 0x1f84b: 0x6c93a620, + 0x1f84c: 0x6c90b020, 0x1f84d: 0x6c833020, 0x1f84e: 0x6c910e20, 0x1f84f: 0x6c833420, + 0x1f850: 0x6c93bc20, 0x1f851: 0x6c910220, 0x1f852: 0x6c823c20, 0x1f853: 0x6c81fe20, + 0x1f854: 0x6c8c2820, 0x1f855: 0x6c8cc420, 0x1f856: 0x6c837e20, 0x1f857: 0x6c8d3c20, + 0x1f858: 0x6c8cfe20, 0x1f859: 0x6c8cd820, 0x1f85a: 0x6c31f020, 0x1f85b: 0x6ca2d020, + 0x1f85c: 0x6c822620, 0x1f85d: 0x6cab0e20, 0x1f85e: 0x6c27b220, 0x1f85f: 0x6ca91020, + 0x1f860: 0x6caa5e20, 0x1f861: 0x6c93d620, 0x1f862: 0x6d176620, 0x1f863: 0x6c06c620, + 0x1f864: 0x6cac7620, 0x1f865: 0x6c0b8220, 0x1f866: 0x6c3ff020, 0x1f867: 0x6c105620, + 0x1f868: 0x6c9d2620, 0x1f869: 0x6cd60020, 0x1f86a: 0x6cdd5a20, 0x1f86b: 0x6c115e20, + 0x1f86c: 0x6cc9c620, 0x1f86d: 0x6cd12c20, 0x1f86e: 0x6d12f620, 0x1f86f: 0x6cd76a20, + 0x1f870: 0x6ccbda20, 0x1f871: 0x6c18a020, 0x1f872: 0x6c189c20, 0x1f873: 0x6cd41020, + 0x1f874: 0x6cc91420, 0x1f875: 0x6c361020, 0x1f876: 0x6c361220, 0x1f877: 0x6c89aa20, + 0x1f878: 0x6c898820, 0x1f879: 0x6c894a20, 0x1f87a: 0x6c894c20, 0x1f87b: 0x6c897420, + 0x1f87c: 0x6c894620, 0x1f87d: 0x6c89c820, 0x1f87e: 0x6c89c020, 0x1f87f: 0x6c867020, + // Block 0x7e2, offset 0x1f880 + 0x1f880: 0x6c937620, 0x1f881: 0x6caa6e20, 0x1f882: 0x6c916e20, 0x1f883: 0x6c938a20, + 0x1f884: 0x6c940e20, 0x1f885: 0x6c870420, 0x1f886: 0x6c935a20, 0x1f887: 0x6c84ee20, + 0x1f888: 0x6c871420, 0x1f889: 0x6c843a20, 0x1f88a: 0x6c855c20, 0x1f88b: 0x6c867820, + 0x1f88c: 0x6c867c20, 0x1f88d: 0x6c878420, 0x1f88e: 0x6ca6f220, 0x1f88f: 0x6c883620, + 0x1f890: 0x6c893820, 0x1f891: 0x6ca73420, 0x1f892: 0x6c881620, 0x1f893: 0x6c890620, + 0x1f894: 0x6c88c420, 0x1f895: 0x6ca6f620, 0x1f896: 0x6c891220, 0x1f897: 0x6c886820, + 0x1f898: 0x6ca73a20, 0x1f899: 0x6c881820, 0x1f89a: 0x6c87fa20, 0x1f89b: 0x6c892220, + 0x1f89c: 0x6c8abc20, 0x1f89d: 0x6c8abe20, 0x1f89e: 0x6d0e4220, 0x1f89f: 0x6c8af020, + 0x1f8a0: 0x6c8b1020, 0x1f8a1: 0x6cd76a20, 0x1f8a2: 0x6c881020, 0x1f8a3: 0x6ca75a20, + 0x1f8a4: 0x6ca72020, 0x1f8a5: 0x6c892020, 0x1f8a6: 0x6c888420, 0x1f8a7: 0x6c8b5420, + 0x1f8a8: 0x6c8e1820, 0x1f8a9: 0x6c8c9e20, 0x1f8aa: 0x6ca91020, 0x1f8ab: 0x6c8e1420, + 0x1f8ac: 0x6c87f420, 0x1f8ad: 0x6c8cbe20, 0x1f8ae: 0x6d1c8a20, 0x1f8af: 0x6c8cf620, + 0x1f8b0: 0x6c8cfa20, 0x1f8b1: 0x6c8d2420, 0x1f8b2: 0x6c8d2a20, 0x1f8b3: 0x6c8db620, + 0x1f8b4: 0x6c8e1220, 0x1f8b5: 0x6c858620, 0x1f8b6: 0x6c853820, 0x1f8b7: 0x6c854620, + 0x1f8b8: 0x6c86b420, 0x1f8b9: 0x6c363420, 0x1f8ba: 0x6c823620, 0x1f8bb: 0x6c89ec20, + 0x1f8bc: 0x6c8a0620, 0x1f8bd: 0x6ca7d020, 0x1f8be: 0x6c8a9420, 0x1f8bf: 0x6c822620, + // Block 0x7e3, offset 0x1f8c0 + 0x1f8c0: 0x6c8a1a20, 0x1f8c1: 0x6c8a2620, 0x1f8c2: 0x6c8a7220, 0x1f8c3: 0x6c8a1620, + 0x1f8c4: 0x6c8fb020, 0x1f8c5: 0x6d275420, 0x1f8c6: 0x6cc84c20, 0x1f8c7: 0x6c8e8020, + 0x1f8c8: 0x6c1e2020, 0x1f8c9: 0x6c8efa20, 0x1f8ca: 0x6c8e4a20, 0x1f8cb: 0x6c8e3620, + 0x1f8cc: 0x6c8e5020, 0x1f8cd: 0x6c8e4c20, 0x1f8ce: 0x6c8e5c20, 0x1f8cf: 0x6ca99020, + 0x1f8d0: 0x6c835420, 0x1f8d1: 0x6c8f2420, 0x1f8d2: 0x6c92a020, 0x1f8d3: 0x6c923020, + 0x1f8d4: 0x6c94e420, 0x1f8d5: 0x6c94f020, 0x1f8d6: 0x6c94f420, 0x1f8d7: 0x6c950e20, + 0x1f8d8: 0x6c93d020, 0x1f8d9: 0x6c862e20, 0x1f8da: 0x6c85ca20, 0x1f8db: 0x6c93d620, + 0x1f8dc: 0x6c8f9220, 0x1f8dd: 0x6c857620, 0x1f8de: 0x6c856e20, 0x1f8df: 0x6c93ae20, + 0x1f8e0: 0x6d16ba20, 0x1f8e1: 0x6c87d820, 0x1f8e2: 0x6c83bc20, 0x1f8e3: 0x6ca5c020, + 0x1f8e4: 0x6c851420, 0x1f8e5: 0x6c861220, 0x1f8e6: 0x6c844a20, 0x1f8e7: 0x6c852220, + 0x1f8e8: 0x6c87e220, 0x1f8e9: 0x6c84fc20, 0x1f8ea: 0x6c847e20, 0x1f8eb: 0x6ca68c20, + 0x1f8ec: 0x6ca6ac20, 0x1f8ed: 0x6c8c4420, 0x1f8ee: 0x6c8bde20, 0x1f8ef: 0x6c8be020, + 0x1f8f0: 0x6c8c7a20, 0x1f8f1: 0x6c8bca20, 0x1f8f2: 0x6c8c0c20, 0x1f8f3: 0x6c8c1020, + 0x1f8f4: 0x6c8ba020, 0x1f8f5: 0x6c8bb020, 0x1f8f6: 0x6c8bea20, 0x1f8f7: 0x6c856c20, + 0x1f8f8: 0x6c85f620, 0x1f8f9: 0x6c85f820, 0x1f8fa: 0x6d3c3420, 0x1f8fb: 0x6d358c20, + 0x1f8fc: 0x6cd42220, 0x1f8fd: 0x6cd03620, 0x1f8fe: 0x6c13d020, 0x1f8ff: 0x6c22b220, + // Block 0x7e4, offset 0x1f900 + 0x1f900: 0x6cbc9020, 0x1f901: 0x6c324420, 0x1f902: 0x6cde2e20, 0x1f903: 0x6ce13620, + 0x1f904: 0x6d2d1820, 0x1f905: 0x6c306420, 0x1f906: 0x6c066220, 0x1f907: 0x6c3efc20, + 0x1f908: 0x6d03ba20, 0x1f909: 0x6c67d620, 0x1f90a: 0x6c665220, 0x1f90b: 0x6c7e0420, + 0x1f90c: 0x6cf49020, 0x1f90d: 0x6c56a220, 0x1f90e: 0x43f41c20, 0x1f90f: 0x43f41e20, + 0x1f910: 0x6d37f420, 0x1f911: 0x43f42220, 0x1f912: 0x6cbe7a20, 0x1f913: 0x43f42620, + 0x1f914: 0x43f42820, 0x1f915: 0x6cf6b620, 0x1f916: 0x6d399820, 0x1f917: 0x6d173820, + 0x1f918: 0x6c84f420, 0x1f919: 0x6cd03a20, 0x1f91a: 0x6cfdbc20, 0x1f91b: 0x6c3e9c20, + 0x1f91c: 0x6c6e9220, 0x1f91d: 0x6c6dcc20, 0x1f91e: 0x6d221c20, 0x1f91f: 0x43f43e20, + 0x1f920: 0x6cc0c220, 0x1f921: 0x43f44220, 0x1f922: 0x6d39c620, 0x1f923: 0x43f44620, + 0x1f924: 0x43f44820, 0x1f925: 0x6d178420, 0x1f926: 0x6c30a620, 0x1f927: 0x43f44e20, + 0x1f928: 0x43f45020, 0x1f929: 0x43f45220, 0x1f92a: 0x6c395c20, 0x1f92b: 0x6cd8d420, + 0x1f92c: 0x6c496820, 0x1f92d: 0x6c520c20, 0x1f92e: 0x6c80a420, 0x1f92f: 0x6c868820, + 0x1f930: 0x6cf43220, 0x1f931: 0x6ccbb820, 0x1f932: 0x6c9dfe20, 0x1f933: 0x6c9e0c20, + 0x1f934: 0x6cbd7c20, 0x1f935: 0x6c068e20, 0x1f936: 0x6c509c20, 0x1f937: 0x6ce0a020, + 0x1f938: 0x6cb7ce20, 0x1f939: 0x6cb2ec20, 0x1f93a: 0x6ca16020, 0x1f93b: 0x6c135420, + 0x1f93c: 0x6c17fa20, 0x1f93d: 0x6c5b4c20, 0x1f93e: 0x6c765820, 0x1f93f: 0x6d2b8a20, + // Block 0x7e5, offset 0x1f940 + 0x1f940: 0x6c1a5420, 0x1f941: 0x6c9fa820, 0x1f942: 0x6c61a820, 0x1f943: 0x6cd55a20, + 0x1f944: 0x6c99ec20, 0x1f945: 0x6c4d3a20, 0x1f946: 0x6d3a6420, 0x1f947: 0x6c4ee620, + 0x1f948: 0x6d3a6e20, 0x1f949: 0x6d2ff420, 0x1f94a: 0x6d423c20, 0x1f94b: 0x6c06b020, + 0x1f94c: 0x6ccf3620, 0x1f94d: 0x6d34f820, 0x1f94e: 0x6cb58a20, 0x1f94f: 0x6d203020, + 0x1f950: 0x6d411420, 0x1f951: 0x6d3ac620, 0x1f952: 0x6c5dd420, 0x1f953: 0x6d316e20, + 0x1f954: 0x6c47c420, 0x1f955: 0x6ce84420, 0x1f956: 0x6c6af220, 0x1f957: 0x6c891220, + 0x1f958: 0x6c6d5220, 0x1f959: 0x6c38ca20, 0x1f95a: 0x6cd56220, 0x1f95b: 0x6d30d220, + 0x1f95c: 0x6c1e4020, 0x1f95d: 0x6c12c020, 0x1f95e: 0x6c12c020, 0x1f95f: 0x6d311420, + 0x1f960: 0x6c51d620, 0x1f961: 0x6cd36c20, 0x1f962: 0x6d134620, 0x1f963: 0x6c6cc220, + 0x1f964: 0x6c0d4a20, 0x1f965: 0x6d2bb620, 0x1f966: 0x6c21a420, 0x1f967: 0x6d178420, + 0x1f968: 0x6ca41420, 0x1f969: 0x6cfe0a20, 0x1f96a: 0x6cb21420, 0x1f96b: 0x6c5baa20, + 0x1f96c: 0x4885dc20, 0x1f96d: 0x6c496420, + 0x1f970: 0x6c0e0820, 0x1f971: 0x6c7bdc20, 0x1f972: 0x6cc2b220, 0x1f973: 0x6d03c620, + 0x1f974: 0x6c1ca820, 0x1f975: 0x6c627020, 0x1f976: 0x6d1e1820, 0x1f977: 0x6cce9420, + 0x1f978: 0x6c509c20, 0x1f979: 0x6ce21620, 0x1f97a: 0x6c5bbc20, 0x1f97b: 0x6cec3420, + 0x1f97c: 0x6d37f420, 0x1f97d: 0x6c3b8420, 0x1f97e: 0x6d0d4620, 0x1f97f: 0x6c077c20, + // Block 0x7e6, offset 0x1f980 + 0x1f980: 0x6c097420, 0x1f981: 0x6c226820, 0x1f982: 0x6c025020, 0x1f983: 0x6d182220, + 0x1f984: 0x6c112620, 0x1f985: 0x6d110c20, 0x1f986: 0x6cee0e20, 0x1f987: 0x6cd0ac20, + 0x1f988: 0x6d236a20, 0x1f989: 0x6d2b8a20, 0x1f98a: 0x6c02d820, 0x1f98b: 0x6c1a5420, + 0x1f98c: 0x6c279420, 0x1f98d: 0x6d212620, 0x1f98e: 0x6cd9b020, 0x1f98f: 0x6c0de620, + 0x1f990: 0x6c024020, 0x1f991: 0x6cbe7a20, 0x1f992: 0x6c80f820, 0x1f993: 0x6cee5220, + 0x1f994: 0x6d2f2220, 0x1f995: 0x6c271220, 0x1f996: 0x6ccbda20, 0x1f997: 0x6c8e4a20, + 0x1f998: 0x6d1a7020, 0x1f999: 0x6d3e4020, 0x1f99a: 0x6c4ee620, 0x1f99b: 0x6c6eb420, + 0x1f99c: 0x6d3a6e20, 0x1f99d: 0x6cbc0220, 0x1f99e: 0x6c74c820, 0x1f99f: 0x6c391620, + 0x1f9a0: 0x6d399820, 0x1f9a1: 0x6d325020, 0x1f9a2: 0x6c225020, 0x1f9a3: 0x6c578420, + 0x1f9a4: 0x6c492220, 0x1f9a5: 0x6cf16020, 0x1f9a6: 0x6d173820, 0x1f9a7: 0x6cd15e20, + 0x1f9a8: 0x6d344020, 0x1f9a9: 0x6c736420, 0x1f9aa: 0x6d311220, 0x1f9ab: 0x6ce4ba20, + 0x1f9ac: 0x6ce5cc20, 0x1f9ad: 0x6c6af220, 0x1f9ae: 0x6c832420, 0x1f9af: 0x6ce1c820, + 0x1f9b0: 0x6c891220, 0x1f9b1: 0x6cb2ac20, 0x1f9b2: 0x6d30d220, 0x1f9b3: 0x6c598420, + 0x1f9b4: 0x6c573420, 0x1f9b5: 0x6d276220, 0x1f9b6: 0x6cbb4c20, 0x1f9b7: 0x6c407e20, + 0x1f9b8: 0x6cd36c20, 0x1f9b9: 0x6c2e3820, 0x1f9ba: 0x6d39c620, 0x1f9bb: 0x6cbeb220, + 0x1f9bc: 0x6d134620, 0x1f9bd: 0x6cab0e20, 0x1f9be: 0x6d23f620, 0x1f9bf: 0x6c6cc220, + // Block 0x7e7, offset 0x1f9c0 + 0x1f9c0: 0x6c0bdc20, 0x1f9c1: 0x6d2bb620, 0x1f9c2: 0x6cd50820, 0x1f9c3: 0x6c1b5020, + 0x1f9c4: 0x6cd9e620, 0x1f9c5: 0x6d03f420, 0x1f9c6: 0x6d3a6220, 0x1f9c7: 0x6ca41420, + 0x1f9c8: 0x6c6e9220, 0x1f9c9: 0x6c046220, 0x1f9ca: 0x6cfe0a20, 0x1f9cb: 0x6c35b420, + 0x1f9cc: 0x6cb21420, 0x1f9cd: 0x6d320420, 0x1f9ce: 0x6c4a9620, 0x1f9cf: 0x48509420, + 0x1f9d0: 0x48508820, 0x1f9d1: 0x4867aa20, 0x1f9d2: 0x6c513820, 0x1f9d3: 0x6d008620, + 0x1f9d4: 0x6c6ad220, 0x1f9d5: 0x48a49220, 0x1f9d6: 0x6cba2c20, 0x1f9d7: 0x6c084620, + 0x1f9d8: 0x6c36f820, 0x1f9d9: 0x6cad1420, + // Block 0x7e8, offset 0x1fa00 + 0x1fa00: 0xf0001c1c, 0x1fa01: 0xf0001c1c, 0x1fa02: 0x00658c9c, + 0x1fa10: 0x2cd43683, 0x1fa11: 0x2d3f2883, 0x1fa12: 0x2cd6a083, 0x1fa13: 0xf0001c1c, + 0x1fa14: 0x2c37b483, 0x1fa15: 0x2c341683, 0x1fa16: 0x2c6b9883, 0x1fa17: 0x2ce45483, + 0x1fa18: 0x2c682283, 0x1fa19: 0x2d1d3483, 0x1fa1a: 0x2cf3c883, 0x1fa1b: 0x2c8a9483, + 0x1fa1c: 0x2cb97883, 0x1fa1d: 0x2c546483, 0x1fa1e: 0x2d292683, 0x1fa1f: 0x2d02dc83, + 0x1fa20: 0x2c1e5483, 0x1fa21: 0x2d37b683, 0x1fa22: 0x2cd0d283, 0x1fa23: 0x2c395083, + 0x1fa24: 0x2cd0dc83, 0x1fa25: 0x2c20b483, 0x1fa26: 0x2d0db483, 0x1fa27: 0x2ce7e683, + 0x1fa28: 0x2c103683, 0x1fa29: 0x2d13b683, 0x1fa2a: 0x2cc9f283, 0x1fa2b: 0x2d1f4083, + 0x1fa2c: 0x2d426083, 0x1fa2d: 0x2d378283, 0x1fa2e: 0x2d200883, 0x1fa2f: 0x2d350083, + 0x1fa30: 0x2d407e83, 0x1fa31: 0x2c26e083, 0x1fa32: 0x2c6d1a83, 0x1fa33: 0x2c796883, + 0x1fa34: 0x2c50b683, 0x1fa35: 0x2c97ba83, 0x1fa36: 0x2d1f9883, 0x1fa37: 0x2d266883, + 0x1fa38: 0x2ccf9a83, 0x1fa39: 0x2c438c83, 0x1fa3a: 0x2d1c6283, + // Block 0x7e9, offset 0x1fa40 + 0x1fa40: 0xe000b460, 0x1fa41: 0xe000b474, 0x1fa42: 0xe000b470, 0x1fa43: 0xe000b458, + 0x1fa44: 0xe000b46c, 0x1fa45: 0xe000b464, 0x1fa46: 0xe000b468, 0x1fa47: 0xe000b478, + 0x1fa48: 0xe000b45c, + 0x1fa50: 0x2c2a9083, 0x1fa51: 0x2c785283, + // Block 0x7ea, offset 0x1fa80 + 0x1fa80: 0x6c508820, 0x1fa81: 0x6cb4c820, 0x1fa83: 0x6cbc8c20, + 0x1fa85: 0x6c4d4c20, + 0x1fa89: 0x6cbf9020, 0x1fa8a: 0x6c126420, + 0x1fa8d: 0x6cd2ec20, + 0x1fa93: 0x6cd7ba20, + 0x1fa94: 0x6c73ca20, + 0x1fa9b: 0x6d22c020, + 0x1fa9d: 0x6c796620, + 0x1faa2: 0x6d3dfc20, + 0x1faa6: 0x6d03be20, + 0x1fab1: 0x6ca1fc20, + 0x1fab7: 0x6c5e9420, + 0x1fab8: 0x6d12d220, 0x1fab9: 0x6c755e20, + 0x1fabc: 0x6cb97c20, 0x1fabd: 0x6c922420, + // Block 0x7eb, offset 0x1fac0 + 0x1fac9: 0x6c1e5e20, + 0x1fad7: 0x6cd3d420, + 0x1fae0: 0x6cbd0220, + 0x1fae5: 0x6c40ce20, + 0x1faed: 0x6cb58e20, + 0x1faf7: 0x6c15c420, + // Block 0x7ec, offset 0x1fb00 + 0x1fb04: 0x6c582a20, 0x1fb06: 0x6d163620, 0x1fb07: 0x6d425e20, + 0x1fb08: 0x6c6a4a20, + 0x1fb11: 0x6d404420, + 0x1fb14: 0x6d3ed420, + 0x1fb1f: 0x6c6c2020, + 0x1fb22: 0x6cac1620, + 0x1fb24: 0x6c32ee20, 0x1fb25: 0x6c238220, 0x1fb27: 0x6cd08e20, + 0x1fb38: 0x6c59aa20, + // Block 0x7ed, offset 0x1fb40 + 0x1fb4a: 0x6d1abe20, + 0x1fb4c: 0x6c4bb820, + 0x1fb56: 0x6c6f3a20, + 0x1fb6b: 0x6ccfa220, + 0x1fb7a: 0x6c6fe220, + // Block 0x7ee, offset 0x1fb80 + 0x1fb85: 0x6d130c20, + 0x1fb89: 0x6c308c20, + 0x1fb8c: 0x6c73c020, 0x1fb8d: 0x6c6a4c20, 0x1fb8f: 0x6c2df020, + 0x1fb91: 0x6c73c220, 0x1fb92: 0x6c20ba20, + 0x1fb96: 0x6c8c9820, + 0x1fb9a: 0x6ce63e20, + 0x1fba3: 0x6c44aa20, + 0x1fbae: 0x6d0b7e20, + 0x1fbb1: 0x6d148020, + 0x1fbbf: 0x6cef1c20, + // Block 0x7ef, offset 0x1fbc0 + 0x1fbc2: 0x6c6a5820, + 0x1fbcc: 0x6d146a20, + 0x1fbd7: 0x6c2f3220, + 0x1fbda: 0x6cb59a20, + 0x1fbec: 0x6c05b020, + 0x1fbf1: 0x6d01a620, + 0x1fbf9: 0x6d2f3220, + // Block 0x7f0, offset 0x1fc00 + 0x1fc0c: 0x6d1daa20, + 0x1fc10: 0x6d073820, + 0x1fc19: 0x6c2f3820, 0x1fc1b: 0x6c280820, + 0x1fc1f: 0x6cf06220, + 0x1fc23: 0x6c488620, + 0x1fc29: 0x6c391220, + 0x1fc2e: 0x6ca0ba20, + 0x1fc31: 0x6cf56220, 0x1fc32: 0x6d0d3220, + 0x1fc35: 0x6ca5b820, 0x1fc36: 0x6c286020, + // Block 0x7f1, offset 0x1fc40 + 0x1fc4b: 0x6c281a20, + 0x1fc4f: 0x6ce1ac20, + 0x1fc52: 0x6c455620, + 0x1fc57: 0x6c7abc20, + 0x1fc58: 0x6c1f0420, + 0x1fc6f: 0x6cc25e20, + 0x1fc71: 0x6ca0be20, 0x1fc73: 0x6cd19220, + 0x1fc75: 0x6c41c620, 0x1fc77: 0x6cd0d820, + // Block 0x7f2, offset 0x1fc80 + 0x1fc81: 0x6ceaa020, + 0x1fc85: 0x6cd42c20, + 0x1fc8a: 0x6ca7e620, + 0x1fca4: 0x6d281a20, 0x1fca5: 0x6c489220, + 0x1fcac: 0x6cfe7e20, 0x1fcad: 0x6c814420, + 0x1fcb0: 0x6c286e20, 0x1fcb1: 0x6cdd0620, + 0x1fcb5: 0x6c988420, 0x1fcb6: 0x6d148220, + 0x1fcb8: 0x6ce26e20, 0x1fcba: 0x6c094020, + // Block 0x7f3, offset 0x1fcc0 + 0x1fcc2: 0x6cde3020, + 0x1fcd7: 0x6c95e420, + 0x1fce2: 0x6cf7d220, 0x1fce3: 0x6c5cb820, + 0x1fce4: 0x6c268e20, 0x1fce7: 0x6c722420, + 0x1fce9: 0x6c318c20, + 0x1fcec: 0x6c017c20, + // Block 0x7f4, offset 0x1fd00 + 0x1fd09: 0x6c9a8820, + 0x1fd0c: 0x6cc46c20, 0x1fd0e: 0x6c003820, 0x1fd0f: 0x6d22ec20, + 0x1fd12: 0x6c666620, + 0x1fd14: 0x6cb76620, + 0x1fd1f: 0x6c9fa220, + 0x1fd23: 0x6d391620, + 0x1fd24: 0x6d35ac20, 0x1fd25: 0x6d37ea20, 0x1fd26: 0x6ca4e220, 0x1fd27: 0x6c0e1a20, + 0x1fd29: 0x6d3bc020, 0x1fd2a: 0x6cd5be20, 0x1fd2b: 0x6d0a8420, + 0x1fd2c: 0x6c741e20, 0x1fd2d: 0x6cb9fe20, + 0x1fd30: 0x6c489a20, 0x1fd32: 0x6ce85220, + 0x1fd36: 0x6d1d3820, 0x1fd37: 0x6d35d620, + 0x1fd3e: 0x6c7c6620, + // Block 0x7f5, offset 0x1fd40 + 0x1fd46: 0x6c192620, + 0x1fd56: 0x6c88ec20, 0x1fd57: 0x6d0ae620, + 0x1fd5c: 0x6c4ce820, 0x1fd5d: 0x6c9e8e20, 0x1fd5e: 0x6ccf0e20, 0x1fd5f: 0x6d223620, + 0x1fd61: 0x6cd8b020, 0x1fd62: 0x6cda1220, + 0x1fd64: 0x6d35d820, 0x1fd67: 0x6cbc7c20, + 0x1fd69: 0x6c3fde20, + 0x1fd6c: 0x6c710a20, 0x1fd6d: 0x6c071e20, 0x1fd6f: 0x6c099220, + 0x1fd72: 0x6cdd6220, + 0x1fd75: 0x6cba0820, 0x1fd76: 0x6ca03220, 0x1fd77: 0x6c15b620, + 0x1fd7a: 0x6ccaa820, 0x1fd7b: 0x6c5ec020, + // Block 0x7f6, offset 0x1fd80 + 0x1fd95: 0x6c461620, 0x1fd96: 0x6cbf1e20, + 0x1fd9a: 0x6cc73820, + 0x1fd9e: 0x6cda1a20, 0x1fd9f: 0x6cda1e20, + 0x1fda0: 0x6d10f420, + 0x1fdaa: 0x6c1d6a20, + 0x1fdad: 0x6cd66620, 0x1fdae: 0x6d2ffa20, 0x1fdaf: 0x6c862420, + 0x1fdb0: 0x6c413e20, 0x1fdb1: 0x6cdbc620, 0x1fdb2: 0x6d2d7c20, + 0x1fdb4: 0x6d3c4220, + 0x1fdbd: 0x6c400820, + // Block 0x7f7, offset 0x1fdc0 + 0x1fdc3: 0x6c5ee020, + 0x1fdc4: 0x6c30b220, + 0x1fdd7: 0x6c5bd020, + 0x1fdda: 0x6c65a420, 0x1fddb: 0x6d0d9c20, + 0x1fddc: 0x6d364a20, + 0x1fde8: 0x6c9a5c20, 0x1fde9: 0x6d120e20, 0x1fdea: 0x6c2b3220, 0x1fdeb: 0x6d150e20, + 0x1fdef: 0x6c0cf220, + 0x1fdf2: 0x6cc1a220, 0x1fdf3: 0x6d181a20, + 0x1fdf5: 0x6d105420, + 0x1fdf9: 0x6d2c3e20, + 0x1fdfd: 0x6ccc6020, + // Block 0x7f8, offset 0x1fe00 + 0x1fe19: 0x6c7f1820, + 0x1fe2e: 0x6c746e20, + 0x1fe30: 0x6cb50620, 0x1fe33: 0x6d216a20, + 0x1fe36: 0x6d291820, 0x1fe37: 0x6cc98220, + 0x1fe38: 0x6ccb3a20, 0x1fe3b: 0x6c340420, + 0x1fe3f: 0x6c6b9e20, + // Block 0x7f9, offset 0x1fe40 + 0x1fe40: 0x6c782020, 0x1fe43: 0x6d265420, + 0x1fe47: 0x6c65ca20, + 0x1fe48: 0x6d113220, + 0x1fe53: 0x6cfaca20, + 0x1fe55: 0x6d000220, 0x1fe56: 0x6cbb9620, + 0x1fe5a: 0x6d23b820, 0x1fe5b: 0x6cc1ae20, + 0x1fe61: 0x6cfac820, 0x1fe62: 0x6c962020, + 0x1fe64: 0x6c4a0a20, 0x1fe67: 0x6c198620, + 0x1fe68: 0x6c209620, 0x1fe69: 0x6d155620, 0x1fe6b: 0x6d333020, + 0x1fe6d: 0x6d403020, 0x1fe6e: 0x6c335c20, + 0x1fe70: 0x6d2d3420, + 0x1fe7f: 0x6c3a6e20, + // Block 0x7fa, offset 0x1fe80 + 0x1fe80: 0x6d155820, 0x1fe81: 0x6c9b4420, + 0x1fe88: 0x6c0b0a20, 0x1fe89: 0x6c6b4020, 0x1fe8a: 0x6cd61820, 0x1fe8b: 0x6c8a2220, + 0x1fe8c: 0x6c08fa20, 0x1fe8d: 0x6cda7620, + 0x1fe91: 0x6c2ca220, + 0x1fea1: 0x6c076220, 0x1fea2: 0x6cf21220, + 0x1fea7: 0x6c9b6a20, + 0x1fea9: 0x6c15ea20, + 0x1feb5: 0x6c29f620, + 0x1feba: 0x6cb21c20, 0x1febb: 0x6c660820, + 0x1febc: 0x6c8c7420, 0x1febd: 0x6c4b9220, 0x1febe: 0x6cb54620, 0x1febf: 0x6c52dc20, + // Block 0x7fb, offset 0x1fec0 + 0x1fec3: 0x6c60e820, + 0x1fec4: 0x6d024e20, 0x1fec5: 0x6d330820, 0x1fec6: 0x6c15fa20, + 0x1fed0: 0x6d116c20, 0x1fed1: 0x6c160a20, + 0x1fed8: 0x6c2cee20, 0x1fed9: 0x6c1d6020, 0x1feda: 0x6ca56220, 0x1fedb: 0x6ca56420, + 0x1fede: 0x6d2d5420, 0x1fedf: 0x6c0b1e20, + 0x1fee1: 0x6c161020, + 0x1feea: 0x6cff5a20, + 0x1feef: 0x6c248620, + 0x1fef0: 0x6d02f620, 0x1fef1: 0x6c6e4420, 0x1fef2: 0x6cb96620, + 0x1fef4: 0x6cbe6820, + 0x1fef9: 0x6c475220, + // Block 0x7fc, offset 0x1ff00 + 0x1ff04: 0x6cf4b420, + 0x1ff1c: 0x6d25e420, 0x1ff1d: 0x6c0dde20, + 0x1ff22: 0x6cecde20, + 0x1ff30: 0x6ca7a620, + 0x1ff35: 0x6c891020, + 0x1ff38: 0x6cc53e20, + 0x1ff3e: 0x6c396e20, 0x1ff3f: 0x6c2b9420, + // Block 0x7fd, offset 0x1ff40 + 0x1ff4a: 0x6c5af820, 0x1ff4b: 0x6d190620, + 0x1ff4c: 0x6cfbbc20, + 0x1ff56: 0x6c800420, 0x1ff57: 0x6c40a020, + 0x1ff59: 0x6d04ae20, + 0x1ff5c: 0x6c897e20, 0x1ff5d: 0x6ce1a620, 0x1ff5e: 0x6c5fba20, + 0x1ff62: 0x6c6ba620, 0x1ff63: 0x6d2c1a20, + 0x1ff64: 0x6cd19420, + 0x1ff6a: 0x6cb59220, 0x1ff6b: 0x6c0b2c20, + 0x1ff6d: 0x6c802220, 0x1ff6e: 0x6c8c1a20, + 0x1ff76: 0x6d364c20, 0x1ff77: 0x6c09bc20, + 0x1ff78: 0x6cd17020, + 0x1ff7d: 0x6cd17a20, 0x1ff7f: 0x6cbdbc20, + // Block 0x7fe, offset 0x1ff80 + 0x1ff82: 0x6c0be620, 0x1ff83: 0x6cf55e20, + 0x1ff89: 0x6c733a20, 0x1ff8b: 0x6c5e8420, + 0x1ff8d: 0x6cf57620, 0x1ff8e: 0x6cbdc420, + 0x1ff91: 0x6c4d5620, + 0x1ff95: 0x6c94e220, + 0x1ffa0: 0x6d26b420, + 0x1ffa8: 0x6c880a20, + 0x1ffaf: 0x6c048e20, + 0x1ffb2: 0x6c526820, + 0x1ffb6: 0x6cb54020, + 0x1ffba: 0x6cb93820, 0x1ffbb: 0x6d337820, + 0x1ffbc: 0x6c991a20, + // Block 0x7ff, offset 0x1ffc0 + 0x1ffc1: 0x6c238020, + 0x1ffc4: 0x6ca30020, + 0x1ffca: 0x6ce6a820, + 0x1ffcc: 0x6d3f6e20, + 0x1ffd5: 0x6c6ed420, 0x1ffd6: 0x6d2f8620, + 0x1ffdf: 0x6ca71c20, + 0x1ffe0: 0x6c19e420, 0x1ffe3: 0x6cb86620, + 0x1ffe6: 0x6d236420, 0x1ffe7: 0x6c690020, + 0x1ffed: 0x6d2fda20, + 0x1fff3: 0x6c2b5020, + 0x1fff4: 0x6c6f3c20, + 0x1fff8: 0x6cdc0a20, 0x1fffb: 0x6d108220, + 0x1ffff: 0x6cedbe20, + // Block 0x800, offset 0x20000 + 0x20002: 0x6c89d820, + 0x20004: 0x6ce71220, 0x20006: 0x6c9bfc20, + 0x2000b: 0x6d1faa20, + 0x20013: 0x6cd7e020, + 0x2001b: 0x6c910820, + 0x2001f: 0x6d19f820, + 0x20025: 0x6c1d4420, + 0x2002b: 0x6c420020, + 0x2002c: 0x6c6f3820, + 0x20036: 0x6cbdf820, 0x20037: 0x6c6ef220, + 0x20039: 0x6d006e20, + // Block 0x801, offset 0x20040 + 0x20042: 0x6c51b820, + 0x20046: 0x6ce1ae20, + 0x20048: 0x6cc01220, 0x20049: 0x6d007420, 0x2004a: 0x6c6e5420, 0x2004b: 0x6ca71620, + 0x2004c: 0x6c6e5620, 0x2004f: 0x6c5fea20, + 0x20058: 0x6ce4de20, 0x2005a: 0x6c252220, 0x2005b: 0x6c2e7c20, + 0x2005d: 0x6cbea020, + 0x20065: 0x6cb2e620, 0x20066: 0x6cb29620, + 0x20068: 0x6c2e9020, 0x20069: 0x6c910420, + 0x20073: 0x6c88ba20, + 0x20074: 0x6c4e0a20, 0x20075: 0x6cacd620, 0x20076: 0x6ce0f020, + 0x2007a: 0x6d151020, 0x2007b: 0x6d081420, + 0x2007c: 0x6cddca20, 0x2007d: 0x6c8e6420, 0x2007e: 0x6cd6d220, 0x2007f: 0x6cd0a820, + // Block 0x802, offset 0x20080 + 0x20081: 0x6c10a020, 0x20082: 0x6cd9bc20, + 0x20085: 0x6cbd8c20, 0x20086: 0x6cd06620, + 0x2008a: 0x6ca9f420, 0x2008b: 0x6ce6de20, + 0x2008c: 0x6c677020, + 0x20095: 0x6cf6b820, 0x20096: 0x6d36fe20, + 0x2009d: 0x6c7f5e20, 0x2009e: 0x6c86be20, 0x2009f: 0x6c86c020, + 0x200a2: 0x6c519420, 0x200a3: 0x6c69cc20, + 0x200a5: 0x6d0d0a20, 0x200a7: 0x6cd49420, + 0x200aa: 0x6cd2a220, + 0x200b1: 0x6d31ae20, 0x200b3: 0x6d1e8620, + 0x200ba: 0x6cddc620, 0x200bb: 0x6cf39e20, + // Block 0x803, offset 0x200c0 + 0x200c1: 0x6c169620, 0x200c2: 0x6c238820, + 0x200c6: 0x6c720820, + 0x200ce: 0x6cd4a420, + 0x200d4: 0x6c6fe620, 0x200d5: 0x6ceef020, + 0x200de: 0x6c5db620, + 0x200e4: 0x6c6a2020, + 0x200ec: 0x6d2a4e20, + 0x200f6: 0x6cab7220, + 0x200fc: 0x6c488c20, + // Block 0x804, offset 0x20100 + 0x20103: 0x6c4fba20, + 0x20104: 0x6c84f620, 0x20105: 0x6d356c20, 0x20106: 0x6cfc7220, + 0x20109: 0x6c100c20, 0x2010a: 0x6c170020, + 0x20113: 0x6d274a20, + 0x20114: 0x6c510020, + 0x2011c: 0x6ce1e420, + 0x20120: 0x6c0c4a20, + 0x20125: 0x6c2da420, 0x20127: 0x6c37b620, + 0x20128: 0x6c6f3e20, + 0x2012d: 0x6c2c0a20, 0x2012e: 0x6d164420, 0x2012f: 0x6c7d4620, + 0x20131: 0x6d300a20, 0x20133: 0x6c7de420, + 0x20134: 0x6d384e20, 0x20135: 0x6c71ee20, + 0x20139: 0x6ccd6820, 0x2013a: 0x6ccc3820, 0x2013b: 0x6c2da820, + 0x2013c: 0x6c046c20, 0x2013d: 0x6c5e7420, + // Block 0x805, offset 0x20140 + 0x20140: 0x6d378620, 0x20143: 0x6d144e20, + 0x20145: 0x6c79b020, 0x20146: 0x6cf33e20, + 0x2014a: 0x6c436420, 0x2014b: 0x6c031220, + 0x2014e: 0x6c463620, + 0x20151: 0x6cfb2420, 0x20152: 0x6c484020, 0x20153: 0x6c8ef620, + 0x20154: 0x6c1b7620, 0x20155: 0x6c48c020, 0x20156: 0x6c1fdc20, + 0x20158: 0x6c83a020, 0x20159: 0x6c242a20, 0x2015a: 0x6cd63e20, + 0x20161: 0x6c08b620, + 0x20165: 0x6c0dbc20, 0x20166: 0x6c857820, + 0x20169: 0x6c6fae20, 0x2016a: 0x6ce54a20, 0x2016b: 0x6c347220, + 0x2016d: 0x6d0bde20, 0x2016e: 0x6cc28a20, + 0x20171: 0x6c8ac820, 0x20173: 0x6c787c20, + 0x20175: 0x6c449620, 0x20176: 0x6d312420, + 0x20178: 0x6c3b5820, + // Block 0x806, offset 0x20180 + 0x20181: 0x6d146e20, 0x20183: 0x6c6fd220, + 0x20184: 0x6d067c20, 0x20185: 0x6c68cc20, + 0x20188: 0x6c93cc20, 0x20189: 0x6c6fb020, 0x2018b: 0x6c1e1e20, + 0x2018e: 0x6cfc7e20, + 0x20190: 0x6c7b1620, 0x20191: 0x6c333e20, + 0x20196: 0x6c952e20, 0x20197: 0x6cf59a20, + 0x20198: 0x6cbe0820, 0x20199: 0x6c107420, + 0x201a4: 0x6cb84620, + 0x201b1: 0x6caf5020, 0x201b2: 0x6d0adc20, 0x201b3: 0x6c07da20, + 0x201b4: 0x6c4cb220, 0x201b5: 0x6c484c20, + 0x201b9: 0x6c710020, + 0x201bc: 0x6cb82420, 0x201be: 0x6c741020, + // Block 0x807, offset 0x201c0 + 0x201c4: 0x6c85c020, + 0x201d0: 0x6c570c20, 0x201d1: 0x6c683c20, + 0x201d8: 0x6cb84e20, 0x201da: 0x6d2c2620, 0x201db: 0x6cb82620, + 0x201dd: 0x6d304620, 0x201de: 0x6c139020, 0x201df: 0x6d1ce820, + 0x201e2: 0x6d0bee20, + 0x201e4: 0x6c1cc020, + 0x201e8: 0x6c1b9a20, 0x201ea: 0x6cec8620, + 0x201ec: 0x6cd9a620, + 0x201f2: 0x6c76cc20, 0x201f3: 0x6d255c20, + 0x201fd: 0x6c1d9c20, 0x201ff: 0x6cdd6420, + // Block 0x808, offset 0x20200 + 0x20200: 0x6ce85820, 0x20203: 0x6d305620, + 0x20204: 0x6ce2ee20, 0x20206: 0x6cf36820, + 0x20208: 0x6c264a20, 0x20209: 0x6c860820, 0x2020a: 0x6c139420, + 0x20215: 0x6cc66e20, 0x20216: 0x6c461820, 0x20217: 0x6cc3bc20, + 0x20219: 0x6c83ce20, + 0x2021e: 0x6ce1c620, + 0x20224: 0x6c860a20, 0x20227: 0x6c9c5c20, + 0x20229: 0x6c1c3020, + 0x2022c: 0x6c4bfa20, 0x2022d: 0x6c909420, 0x2022e: 0x6c209020, 0x2022f: 0x6cdd6e20, + 0x20230: 0x6c690420, 0x20231: 0x6c6d0c20, + 0x20235: 0x6c381620, 0x20236: 0x6d2cf620, + 0x2023e: 0x6c6d0e20, 0x2023f: 0x6c254220, + // Block 0x809, offset 0x20240 + 0x20242: 0x6c136c20, 0x20243: 0x6d420820, + 0x20245: 0x6d2fc420, + 0x20248: 0x6cb1c620, 0x20249: 0x6d2dfc20, 0x2024a: 0x6cf66420, 0x2024b: 0x6d121420, + 0x2024c: 0x6c3f7420, 0x2024d: 0x6c1cce20, + 0x20253: 0x6c254a20, + 0x20257: 0x6c486820, + 0x20263: 0x6c5f0020, + 0x20266: 0x6ccb3c20, 0x20267: 0x6d2d8e20, + 0x20268: 0x6c8e2420, 0x20269: 0x6ccb3e20, 0x2026a: 0x6d132220, + 0x20270: 0x6c70ba20, + 0x20276: 0x6ce87220, + 0x2027a: 0x6cc7c620, 0x2027b: 0x6d2af820, + 0x2027c: 0x6c589020, + // Block 0x80a, offset 0x20280 + 0x20281: 0x6cfc2820, 0x20283: 0x6cb91a20, + 0x20284: 0x6d2fdc20, + 0x2028b: 0x6c11b220, + 0x2028e: 0x6c7e1820, 0x2028f: 0x6c869a20, + 0x20290: 0x6cc76420, + 0x20294: 0x6c31c020, 0x20297: 0x6c8b3020, + 0x2029c: 0x6d1c0620, 0x2029d: 0x6c86c220, + 0x202a0: 0x6c31c620, 0x202a2: 0x6c8d8020, + 0x202aa: 0x6ceca220, + 0x202af: 0x6c2f1820, + 0x202b3: 0x6c6f4020, + 0x202b5: 0x6c855e20, 0x202b6: 0x6c7a1620, 0x202b7: 0x6c791e20, + 0x202b9: 0x6d31b220, + // Block 0x80b, offset 0x202c0 + 0x202c0: 0x6c51b420, 0x202c2: 0x6c091220, + 0x202c4: 0x6caf2820, + 0x202ca: 0x6c4f4820, + 0x202d1: 0x6d3d2820, 0x202d2: 0x6c332020, + 0x202d4: 0x6d16a420, + 0x202dc: 0x6c787e20, 0x202dd: 0x6d16a620, 0x202de: 0x6ca0dc20, + 0x202e1: 0x6c118a20, 0x202e3: 0x6c44ee20, + 0x202e4: 0x6c788820, 0x202e5: 0x6cd32a20, + 0x202ed: 0x6c8cc620, 0x202ee: 0x6c07dc20, + 0x202f1: 0x6c32b820, + 0x202f6: 0x6c72e020, 0x202f7: 0x6ca4e420, + 0x202f8: 0x6d3f0020, 0x202fb: 0x6d401e20, + // Block 0x80c, offset 0x20300 + 0x20303: 0x6ce0ea20, + 0x20306: 0x6cf9be20, 0x20307: 0x6c4ec020, + 0x2030c: 0x6c94a620, 0x2030d: 0x6cb99020, + 0x20313: 0x6ca12220, + 0x20314: 0x6cab3a20, 0x20315: 0x6c4fc820, + 0x20319: 0x6d2c3420, 0x2031a: 0x6c737020, 0x2031b: 0x6c23a020, + 0x20320: 0x6c864420, 0x20321: 0x6d2c4020, 0x20322: 0x6d1fdc20, 0x20323: 0x6c2d6c20, + 0x20324: 0x6c747820, 0x20325: 0x6c073a20, + 0x20329: 0x6d11bc20, 0x2032a: 0x6cb1c820, + 0x20331: 0x6c6d3620, 0x20332: 0x6c766c20, 0x20333: 0x6ccb4020, + 0x20334: 0x6d102c20, 0x20335: 0x6c6d3820, + 0x20339: 0x6c78dc20, + // Block 0x80d, offset 0x20340 + 0x20344: 0x6c14de20, 0x20347: 0x6ca74a20, + 0x20349: 0x6cedb020, 0x2034a: 0x6c942a20, + 0x20350: 0x6d277a20, 0x20351: 0x6d108420, 0x20352: 0x6c05a020, + 0x20355: 0x6c755220, 0x20356: 0x6d07fc20, + 0x20358: 0x6d385820, + 0x20360: 0x6c7ce820, 0x20361: 0x6c3cda20, + 0x2036a: 0x6cc17e20, 0x2036b: 0x6ccecc20, + 0x2036c: 0x6cdce420, + 0x20370: 0x6c316820, 0x20372: 0x6c7af820, 0x20373: 0x6cad8c20, + 0x2037a: 0x6c065020, + 0x2037e: 0x6c401620, 0x2037f: 0x6c700c20, + // Block 0x80e, offset 0x20380 + 0x20380: 0x6cc47c20, + 0x20384: 0x6c70ca20, + 0x2038a: 0x6cbf6a20, + 0x2038d: 0x6d38c220, 0x2038e: 0x6c577420, 0x2038f: 0x6c05e020, + 0x20395: 0x6d145c20, 0x20397: 0x6d148420, + 0x20398: 0x6d148620, + 0x2039d: 0x6c995020, + 0x203a6: 0x6cc86c20, + 0x203ab: 0x6c227c20, + 0x203ae: 0x6c4dca20, + 0x203b0: 0x6c238420, + 0x203b4: 0x6cf83a20, + 0x203b9: 0x6cc2b820, 0x203ba: 0x6ce56c20, + 0x203bc: 0x6c2e0c20, 0x203be: 0x6c4ddc20, + // Block 0x80f, offset 0x203c0 + 0x203c7: 0x6d12a620, + 0x203cd: 0x6c353420, 0x203ce: 0x6ceef820, + 0x203d0: 0x6c122e20, 0x203d1: 0x6c2e2620, + 0x203d5: 0x6c362620, 0x203d6: 0x6c2c6820, + 0x203d8: 0x6cdb9220, 0x203d9: 0x6cc30a20, + 0x203dc: 0x6c368020, 0x203dd: 0x6cab4420, 0x203de: 0x6d081c20, + 0x203e2: 0x6cf47820, + 0x203e6: 0x6d190820, + 0x203e8: 0x6ca1fa20, + 0x203f0: 0x6c549620, + 0x203f4: 0x6c4dde20, + 0x203ff: 0x6cd22820, + // Block 0x810, offset 0x20400 + 0x20403: 0x6cc96420, + 0x20408: 0x6c090820, 0x2040a: 0x6c4dcc20, 0x2040b: 0x6c6e4620, + 0x2040e: 0x6cbdfa20, 0x2040f: 0x6c25d420, + 0x20410: 0x6c22a620, 0x20412: 0x6c046e20, + 0x20417: 0x6c32f020, + 0x2041c: 0x6cf84220, + 0x20427: 0x6d33c020, + 0x20428: 0x6c949220, 0x2042a: 0x6c54b620, 0x2042b: 0x6c601420, + 0x2042c: 0x6c48c820, + 0x20432: 0x6cacd820, + // Block 0x811, offset 0x20440 + 0x20440: 0x6d39c220, + 0x20445: 0x6c08fc20, 0x20447: 0x6d21ae20, + 0x20452: 0x6cb6c220, + 0x20455: 0x6c50b420, 0x20456: 0x6c1ed420, + 0x20459: 0x6ccec220, 0x2045a: 0x6c1be020, 0x2045b: 0x6c0eac20, + 0x2045f: 0x6cc62420, + 0x20460: 0x6d1ef820, + 0x20464: 0x6ca39620, + 0x20469: 0x6c5b9420, 0x2046a: 0x6ce57620, 0x2046b: 0x6c04c220, + 0x20470: 0x6d057620, + 0x20474: 0x6d1f1020, 0x20475: 0x6c1c0620, + 0x2047f: 0x6c526220, + // Block 0x812, offset 0x20480 + 0x20483: 0x6cec7020, + 0x20486: 0x6d01ce20, + 0x2048a: 0x6c748c20, + 0x2048c: 0x6cdbec20, 0x2048d: 0x6cbe2c20, 0x2048e: 0x6d3bbc20, + 0x20495: 0x6c617620, + 0x20498: 0x6c091420, 0x2049a: 0x6cf59c20, + 0x204a0: 0x6c602820, 0x204a2: 0x6c75c620, + 0x204a5: 0x6c89ee20, 0x204a6: 0x6d1eb620, + 0x204ad: 0x6c70ea20, + 0x204b2: 0x6d266a20, + 0x204b5: 0x6c055e20, + 0x204b8: 0x6cafaa20, 0x204bb: 0x6d2b3820, + 0x204be: 0x6d165820, 0x204bf: 0x6c2bc820, + // Block 0x813, offset 0x204c0 + 0x204c2: 0x6cbc9220, + 0x204c4: 0x6cdd4c20, 0x204c6: 0x6c22ae20, + 0x204c8: 0x6d3aa220, 0x204c9: 0x6d267420, + 0x204cf: 0x6c682820, + 0x204d4: 0x6cd23e20, 0x204d7: 0x6d148820, + 0x204d8: 0x6cf99220, + 0x204e0: 0x6d254220, + 0x204e5: 0x6c4c6020, 0x204e7: 0x6c789020, + 0x204ea: 0x6c252420, 0x204eb: 0x6d171a20, + 0x204f5: 0x6c85c220, 0x204f7: 0x6c2d0c20, + 0x204fa: 0x6cf5d620, + 0x204ff: 0x6c09c020, + // Block 0x814, offset 0x20500 + 0x20502: 0x6c0b3420, 0x20503: 0x6c99ea20, + 0x20504: 0x6c85e420, 0x20507: 0x6cda1820, + 0x20510: 0x6c8e5620, 0x20511: 0x6c4b5420, 0x20512: 0x6c78b620, + 0x20517: 0x6d151220, + 0x20519: 0x6cf7f620, 0x2051a: 0x6d1a7c20, + 0x2051f: 0x6c78c020, + 0x20523: 0x6ccf6020, + 0x20527: 0x6cf2bc20, + 0x2052e: 0x6cb0b620, + 0x20536: 0x6d26dc20, 0x20537: 0x6c538020, + 0x2053a: 0x6c867220, 0x2053b: 0x6c405020, + // Block 0x815, offset 0x20540 + 0x20543: 0x6c74d620, + 0x20544: 0x6cfae820, + 0x20549: 0x6c2cf020, + 0x2054c: 0x6c878820, + 0x20553: 0x6ce83420, + 0x20558: 0x6c645820, 0x2055b: 0x6c041420, + 0x2055c: 0x6c2c0c20, 0x2055d: 0x6d2efc20, + 0x20563: 0x6d22bc20, + 0x20568: 0x6c333420, + 0x2056d: 0x6c115c20, 0x2056e: 0x6ce88620, + 0x20576: 0x6cdf9420, 0x20577: 0x6c5fee20, + 0x20578: 0x6cb59420, 0x20579: 0x6ccd7620, 0x2057a: 0x6ca6fa20, + // Block 0x816, offset 0x20580 + 0x20586: 0x6c498c20, + 0x20588: 0x6c08e420, 0x2058b: 0x6d037820, + 0x20593: 0x6d31fa20, + 0x20599: 0x6cc94a20, 0x2059b: 0x6ca0b820, + 0x2059d: 0x6c3dc420, + 0x205a2: 0x6ce1a820, 0x205a3: 0x6c055c20, + 0x205aa: 0x6c0c8a20, + 0x205ac: 0x6cf56620, 0x205ae: 0x6c6a5e20, + 0x205b6: 0x6c6cd220, + 0x205be: 0x6cb8b020, + // Block 0x817, offset 0x205c0 + 0x205c8: 0x6cd89820, 0x205c9: 0x6c6e1620, 0x205cb: 0x6c1b8820, + 0x205d7: 0x6c6e1c20, + 0x205e5: 0x6cdc3a20, + 0x205ef: 0x6d2bde20, + 0x205f0: 0x6c83e020, + 0x205f4: 0x6d3d0620, + 0x205f9: 0x6c0ba820, + 0x205ff: 0x6cea6220, + // Block 0x818, offset 0x20600 + 0x20603: 0x6c0a1820, + 0x20606: 0x6c3ac220, + 0x2060a: 0x6c2a8220, + 0x2060c: 0x6d3a2620, + 0x20611: 0x6c70dc20, + 0x20619: 0x6d15b020, + 0x2061c: 0x6d0b6420, 0x2061f: 0x6c1bd820, + 0x20620: 0x6c488e20, 0x20621: 0x6d34d020, + 0x20628: 0x6cc61620, 0x2062b: 0x6d1e8a20, + 0x2062d: 0x6c0ea820, 0x2062f: 0x6c611820, + 0x20630: 0x6cb23620, 0x20633: 0x6d1b9c20, + 0x20634: 0x6d0f4220, 0x20635: 0x6c98b420, + 0x2063d: 0x6c904e20, 0x2063e: 0x6ca2ca20, 0x2063f: 0x6cc9bc20, + // Block 0x819, offset 0x20640 + 0x20640: 0x6c1fda20, 0x20642: 0x6c221c20, 0x20643: 0x6cf41a20, + 0x20644: 0x6cc5ae20, + 0x20648: 0x6c272420, 0x20649: 0x6c5fc420, 0x2064b: 0x6d15b820, + 0x2064d: 0x6cc45e20, + 0x20650: 0x6c5d9820, 0x20651: 0x6c484220, 0x20653: 0x6d301020, + 0x20654: 0x6cb08220, 0x20657: 0x6d288220, + 0x20658: 0x6c04e020, 0x20659: 0x6c6a6a20, + 0x2065c: 0x6c53e220, 0x2065f: 0x6cfc7620, + 0x20660: 0x6c5a8820, + 0x20669: 0x6d2bc420, 0x2066a: 0x6c270820, 0x2066b: 0x6c436c20, + 0x2066d: 0x6cb08420, 0x2066f: 0x6cb14620, + 0x20670: 0x6cd23620, 0x20671: 0x6c898620, 0x20672: 0x6d267620, 0x20673: 0x6c565020, + 0x20674: 0x6c0b6a20, 0x20677: 0x6cc61e20, + 0x20679: 0x6cc62020, + // Block 0x81a, offset 0x20680 + 0x20684: 0x6d13c420, 0x20685: 0x6d338820, 0x20687: 0x6c6c2820, + 0x20688: 0x6cf22020, 0x20689: 0x6c173420, 0x2068b: 0x6cbf9a20, + 0x2068d: 0x6d3a5620, 0x2068f: 0x6d2c1c20, + 0x20690: 0x6cb34820, 0x20691: 0x6c019e20, 0x20693: 0x6c50c220, + 0x20695: 0x6c1e5620, 0x20696: 0x6d0c6020, + 0x2069a: 0x6cd31820, 0x2069b: 0x6c566020, + 0x2069c: 0x6c35dc20, + 0x206b4: 0x6cd24020, + 0x206b9: 0x6ceaaa20, 0x206ba: 0x6c272c20, 0x206bb: 0x6cec6a20, + 0x206bc: 0x6cb2f420, 0x206bd: 0x6cc6f420, 0x206be: 0x6c705220, + // Block 0x81b, offset 0x206c0 + 0x206c0: 0x6c0e4a20, + 0x206d0: 0x6d222820, 0x206d1: 0x6c30a220, 0x206d3: 0x6c4ace20, + 0x206d4: 0x6cd45420, 0x206d7: 0x6cdd0820, + 0x206d8: 0x6ca68220, 0x206d9: 0x6d385c20, 0x206da: 0x6c905220, 0x206db: 0x6c0dca20, + 0x206dc: 0x6d421420, 0x206dd: 0x6d12d620, 0x206de: 0x6cc4b420, + 0x206e0: 0x6c8cb220, 0x206e1: 0x6cc96c20, + 0x206e4: 0x6c82b820, 0x206e5: 0x6c35e820, 0x206e7: 0x6d381a20, + 0x206e8: 0x6c612820, 0x206eb: 0x6c35ea20, + 0x206ef: 0x6d428420, + 0x206f2: 0x6ca31820, 0x206f3: 0x6d27dc20, + // Block 0x81c, offset 0x20700 + 0x2070a: 0x6d016c20, 0x2070b: 0x6d418a20, + 0x2070c: 0x6cd5aa20, 0x2070d: 0x6c2fce20, 0x2070e: 0x6c384620, 0x2070f: 0x6cc58a20, + 0x20711: 0x6c051820, 0x20712: 0x6c4de020, 0x20713: 0x6c530a20, + 0x20714: 0x6d13d020, 0x20716: 0x6d13d220, + 0x20719: 0x6c77da20, 0x2071a: 0x6d16de20, 0x2071b: 0x6c5b1e20, + 0x2071c: 0x6d329020, + 0x2072e: 0x6c6e6220, + 0x20731: 0x6c43d220, + 0x20734: 0x6ca9fa20, 0x20735: 0x6cbca220, 0x20737: 0x6c2e7e20, + 0x20739: 0x6c61c420, 0x2073a: 0x6d171e20, 0x2073b: 0x6d14b620, + 0x2073d: 0x6c3e2c20, 0x2073e: 0x6cd77220, 0x2073f: 0x6cd77420, + // Block 0x81d, offset 0x20740 + 0x20740: 0x6d1e1e20, 0x20741: 0x6c78fe20, 0x20742: 0x6c573020, 0x20743: 0x6c53b620, + 0x20747: 0x6c50ec20, + 0x2074a: 0x6c509620, 0x2074b: 0x6cb9f820, + 0x2074c: 0x6cb85020, 0x2074e: 0x6cd8a620, + 0x20750: 0x6c051e20, + 0x2076c: 0x6c6d9e20, 0x2076d: 0x6c789220, + 0x20773: 0x6c001a20, + 0x20774: 0x6c908020, 0x20776: 0x6ce84820, + 0x20779: 0x6c207020, + 0x2077c: 0x6cd98620, 0x2077d: 0x6c19d620, 0x2077f: 0x6cee6a20, + // Block 0x81e, offset 0x20780 + 0x20782: 0x6caa5220, + 0x20784: 0x6c6fb620, 0x20787: 0x6c0d2c20, + 0x207a1: 0x6cffda20, 0x207a2: 0x6cd0f820, 0x207a3: 0x6c545020, + 0x207a6: 0x6d3ad020, + 0x207a8: 0x6c490e20, 0x207a9: 0x6c5eb220, 0x207ab: 0x6c61dc20, + 0x207ad: 0x6cf5da20, 0x207af: 0x6ccf3e20, + 0x207b0: 0x6cab7e20, 0x207b1: 0x6c553c20, 0x207b2: 0x6cde4220, 0x207b3: 0x6cff7c20, + 0x207b5: 0x6d2a7c20, + 0x207b8: 0x6c0fee20, 0x207b9: 0x6cb77820, 0x207ba: 0x6cebd620, 0x207bb: 0x6ceabe20, + 0x207bc: 0x6c2a0c20, 0x207be: 0x6ca33020, + // Block 0x81f, offset 0x207c0 + 0x207e0: 0x6d2cee20, 0x207e3: 0x6d0b9020, + 0x207e6: 0x6cf44020, 0x207e7: 0x6d31aa20, + 0x207e8: 0x6c2a8e20, 0x207e9: 0x6c509a20, 0x207eb: 0x6c01ea20, + 0x207ec: 0x6cafda20, 0x207ed: 0x6ccb2220, 0x207ee: 0x6c3bbc20, 0x207ef: 0x6c485420, + 0x207f3: 0x6cb35420, + 0x207f7: 0x6d088820, + 0x207f8: 0x6c4d9c20, 0x207f9: 0x6c427420, 0x207fa: 0x6c034620, 0x207fb: 0x6d3f7620, + 0x207fc: 0x6c9c0020, 0x207fe: 0x6c5dba20, + // Block 0x820, offset 0x20800 + 0x20827: 0x6c2cc220, + 0x20828: 0x6cf5dc20, 0x2082b: 0x6c26ee20, + 0x2082c: 0x6ca47a20, + 0x20830: 0x6c2dbe20, 0x20831: 0x6c95f820, 0x20832: 0x6c789e20, + 0x20837: 0x6d178e20, + 0x20838: 0x6c744420, 0x20839: 0x6c512420, 0x2083b: 0x6c602c20, + 0x2083e: 0x6c51c620, 0x2083f: 0x6ca82820, + // Block 0x821, offset 0x20840 + 0x20840: 0x6cc8f620, 0x20841: 0x6cb99220, 0x20842: 0x6c276c20, 0x20843: 0x6cce6c20, + 0x20844: 0x6c78ae20, 0x20845: 0x6d3a1220, 0x20847: 0x6cd1b820, + 0x20848: 0x6c93da20, 0x20849: 0x6c635c20, 0x2084a: 0x6cb10c20, 0x2084b: 0x6c546e20, + 0x2084c: 0x6c5ec420, 0x2084d: 0x6cde5420, 0x2084e: 0x6c1dac20, 0x2084f: 0x6cf29020, + 0x20850: 0x6c6e8020, 0x20851: 0x6cb30e20, 0x20852: 0x6d2cf220, 0x20853: 0x6d02d420, + 0x20856: 0x6c0b9420, + 0x20859: 0x6d06ce20, + 0x2085e: 0x6c471020, 0x2085f: 0x6c6be620, + 0x20862: 0x6cfb6a20, + 0x20878: 0x6c356420, 0x2087a: 0x6c0f0020, 0x2087b: 0x6cb15420, + 0x2087f: 0x6d28ea20, + // Block 0x822, offset 0x20880 + 0x20881: 0x6cac2420, 0x20882: 0x6ce85a20, + 0x20884: 0x6d1bb420, + 0x208ae: 0x6cfde220, + 0x208b1: 0x6caaf420, 0x208b2: 0x6c438e20, 0x208b3: 0x6c0f0220, + 0x208b4: 0x6d01a420, + 0x208b8: 0x6d315c20, 0x208b9: 0x6d214620, 0x208ba: 0x6ca6a420, + // Block 0x823, offset 0x208c0 + 0x208c0: 0x6d0a9220, 0x208c1: 0x6cec3620, 0x208c3: 0x6c021820, + 0x208c4: 0x6c4ece20, 0x208c5: 0x6c52b220, 0x208c6: 0x6c27e220, + 0x208c8: 0x6caac220, 0x208ca: 0x6c12b020, 0x208cb: 0x6c604820, + 0x208cc: 0x6ca5ae20, 0x208cd: 0x6d1e4020, 0x208ce: 0x6cfed220, + 0x208d0: 0x6c1faa20, 0x208d1: 0x6d121020, 0x208d3: 0x6c440220, + 0x208d4: 0x6ce0fc20, 0x208d5: 0x6c065220, 0x208d6: 0x6c15be20, + 0x208d8: 0x6d06ec20, 0x208db: 0x6c4d2020, + 0x208dd: 0x6c1db620, 0x208df: 0x6c65a620, + 0x208e0: 0x6d422620, + 0x208e4: 0x6cf0a420, 0x208e5: 0x6c265220, 0x208e6: 0x6caf6c20, + // Block 0x824, offset 0x20900 + 0x20910: 0x6c592c20, 0x20912: 0x6cf63a20, + 0x20914: 0x6cae4c20, 0x20915: 0x6c8e3420, 0x20916: 0x6ca24a20, 0x20917: 0x6c9ec620, + 0x20918: 0x6c812020, 0x20919: 0x6ce9fe20, 0x2091a: 0x6c048420, + 0x2091d: 0x6c439820, 0x2091f: 0x6c7aa020, + 0x20922: 0x6c636a20, 0x20923: 0x6c0e7c20, + // Block 0x825, offset 0x20940 + 0x2094d: 0x6c592e20, 0x2094f: 0x6d40c420, + 0x20950: 0x6c960e20, + 0x20957: 0x6c840a20, + 0x20959: 0x6c515620, 0x2095a: 0x6ca06220, + 0x2095c: 0x6cd72a20, 0x2095d: 0x6cd00420, 0x2095e: 0x6c777020, 0x2095f: 0x6c1c4020, + 0x20960: 0x6c8d3420, 0x20961: 0x6c95ba20, + 0x20964: 0x6d0dae20, 0x20965: 0x6d2fc620, 0x20966: 0x6c1fae20, 0x20967: 0x6c47ac20, + 0x20968: 0x6cbde020, 0x2096a: 0x6cdff220, 0x2096b: 0x6c3be220, + 0x2096c: 0x6ce8d220, + 0x20971: 0x6c8d3620, + 0x20974: 0x6c810820, + // Block 0x826, offset 0x20980 + 0x20996: 0x6c7fa620, 0x20997: 0x6d299220, + 0x20998: 0x6cf50820, + 0x2099d: 0x6c840c20, 0x2099e: 0x6c000a20, 0x2099f: 0x6c94b620, + 0x209a0: 0x6d353e20, 0x209a1: 0x6c1dc820, 0x209a2: 0x6c67f020, + 0x209a4: 0x6c64c620, + 0x209a9: 0x6c950020, 0x209aa: 0x6d153020, + 0x209ac: 0x6cce0820, + 0x209bb: 0x6c5f0220, + // Block 0x827, offset 0x209c0 + 0x209dc: 0x6d181e20, 0x209dd: 0x6ca8ea20, + 0x209e1: 0x6c5c0a20, 0x209e3: 0x6d2bf020, + 0x209e6: 0x6c4e6020, + 0x209e8: 0x6d1afa20, 0x209e9: 0x6c0a1a20, 0x209ea: 0x6c014620, 0x209eb: 0x6cf97220, + 0x209ec: 0x6ca60020, + 0x209f0: 0x6c2b3e20, 0x209f1: 0x6c65cc20, 0x209f2: 0x6cac6820, + 0x209f5: 0x6d23bc20, 0x209f6: 0x6c1fc620, 0x209f7: 0x6d289820, + 0x209f9: 0x6c13fc20, 0x209fb: 0x6d307620, + 0x209fc: 0x6ccb4220, 0x209fe: 0x6cae3620, 0x209ff: 0x6c472820, + // Block 0x828, offset 0x20a00 + 0x20a00: 0x6d307820, + 0x20a06: 0x6c842420, 0x20a07: 0x6c30be20, + 0x20a09: 0x6c1dd020, 0x20a0b: 0x6d419620, + 0x20a0c: 0x6cb39e20, 0x20a0f: 0x6ccefc20, + 0x20a10: 0x6c8fa220, + 0x20a22: 0x6cd5fe20, + 0x20a24: 0x6c6d3a20, 0x20a25: 0x6c8d4820, + 0x20a28: 0x6c774220, 0x20a29: 0x6c7e9220, 0x20a2b: 0x6d05cc20, + 0x20a2c: 0x6c6d3c20, 0x20a2e: 0x6c1fea20, + 0x20a32: 0x6d26de20, + // Block 0x829, offset 0x20a40 + 0x20a46: 0x6c971820, 0x20a47: 0x6d020820, + 0x20a48: 0x6c6f8620, 0x20a49: 0x6c627420, 0x20a4b: 0x6d26e820, + 0x20a4f: 0x6c64f220, + 0x20a51: 0x6c4e3020, 0x20a53: 0x6cc98a20, + 0x20a54: 0x6c5c2820, 0x20a55: 0x6cbc5a20, 0x20a57: 0x6ccb5220, + 0x20a58: 0x6d419a20, 0x20a5b: 0x6c91d620, + 0x20a5c: 0x6c57c420, 0x20a5d: 0x6c1e6820, 0x20a5e: 0x6ccd5c20, 0x20a5f: 0x6cf31220, + 0x20a60: 0x6c60a220, 0x20a61: 0x6d3d9620, 0x20a62: 0x6cfb8c20, 0x20a63: 0x6d141020, + 0x20a64: 0x6c4c8820, 0x20a65: 0x6c7d1c20, + // Block 0x82a, offset 0x20a80 + 0x20a91: 0x6d38a820, + 0x20a94: 0x6c929e20, 0x20a96: 0x6c0e9020, 0x20a97: 0x6cd28a20, + 0x20a98: 0x6d1d4a20, 0x20a99: 0x6c7a5c20, + 0x20ab9: 0x6d36d820, 0x20aba: 0x6d00e820, + 0x20abd: 0x6d135420, 0x20abe: 0x6c36b420, 0x20abf: 0x6c940420, + // Block 0x82b, offset 0x20ac0 + 0x20ac0: 0x6c4f1420, 0x20ac1: 0x6d135620, + 0x20ac6: 0x6c962c20, 0x20ac7: 0x6c21dc20, + 0x20ac8: 0x6c397020, 0x20ac9: 0x6d34a020, 0x20aca: 0x6d1d5020, 0x20acb: 0x6cf1f220, + 0x20acc: 0x6cebf220, 0x20acd: 0x6c00d620, 0x20ace: 0x6d21b020, + 0x20ad1: 0x6c571a20, 0x20ad3: 0x6c8b3220, + 0x20ad4: 0x6c6dd620, 0x20ad5: 0x6d28ca20, + 0x20ae7: 0x6d29e820, + 0x20ae8: 0x6c336420, 0x20aea: 0x6c629220, + 0x20aee: 0x6cf2a220, + 0x20af0: 0x6c60ba20, 0x20af1: 0x6cf6e420, 0x20af3: 0x6d2e8620, + 0x20af4: 0x6ce95c20, + // Block 0x82c, offset 0x20b00 + 0x20b0a: 0x6d21b220, + 0x20b0f: 0x6c8b4620, + 0x20b12: 0x6d372420, 0x20b13: 0x6cd20a20, + 0x20b15: 0x6c81c220, 0x20b16: 0x6c7f6020, 0x20b17: 0x6cf03620, + 0x20b18: 0x6cad7220, 0x20b19: 0x6c1b6220, 0x20b1a: 0x6d1d1420, 0x20b1b: 0x6c314020, + 0x20b1d: 0x6c314220, 0x20b1f: 0x6c067620, + 0x20b20: 0x6cbcf020, 0x20b21: 0x6cd62020, 0x20b23: 0x6d34a820, + 0x20b29: 0x6c8b4820, 0x20b2b: 0x6caed620, + 0x20b2d: 0x6d300620, + 0x20b3f: 0x6cab5a20, + // Block 0x82d, offset 0x20b40 + 0x20b42: 0x6d023c20, 0x20b43: 0x6c60d820, + 0x20b44: 0x6c7f6220, 0x20b45: 0x6d1cb020, 0x20b46: 0x6c134c20, + 0x20b56: 0x6c820020, + 0x20b5d: 0x6c952820, + 0x20b61: 0x6c8fbc20, 0x20b62: 0x6cf91020, + 0x20b66: 0x6c8c7620, + 0x20b69: 0x6c4aa020, + 0x20b73: 0x6d03b020, + 0x20b77: 0x6c848620, + 0x20b78: 0x6c221620, + // Block 0x82e, offset 0x20b80 + 0x20b87: 0x6cbebc20, + 0x20b91: 0x6c652e20, 0x20b92: 0x6c2a4420, 0x20b93: 0x6c661420, + 0x20b94: 0x6cbee820, 0x20b95: 0x6d026e20, 0x20b96: 0x6d1d5a20, + 0x20b9f: 0x6c4d0020, + 0x20ba1: 0x6d311820, 0x20ba2: 0x6ccf0420, 0x20ba3: 0x6c9c9a20, + 0x20ba4: 0x6c58ba20, + 0x20bb1: 0x6c248220, 0x20bb2: 0x6cc7e820, 0x20bb3: 0x6cc95a20, + 0x20bb4: 0x6c5e4620, 0x20bb5: 0x6d143420, 0x20bb7: 0x6c2b4e20, + 0x20bb9: 0x6c949e20, 0x20bbb: 0x6d193e20, + // Block 0x82f, offset 0x20bc0 + 0x20bc2: 0x6c100020, 0x20bc3: 0x6cad1820, + 0x20bc4: 0x6ce04220, 0x20bc5: 0x6c35a420, 0x20bc6: 0x6d29ee20, 0x20bc7: 0x6c23c420, + 0x20bd3: 0x6d2d0a20, + 0x20bd5: 0x6cf82620, 0x20bd6: 0x6c98b020, + 0x20bd8: 0x6c7eca20, 0x20bd9: 0x6d287820, + 0x20be1: 0x6c36e620, + 0x20be5: 0x6c2f0e20, + 0x20bed: 0x6c493c20, + 0x20bf1: 0x6c596620, + 0x20bf5: 0x6cd40620, 0x20bf6: 0x6c663220, + 0x20bf9: 0x6d2dce20, 0x20bfa: 0x6c610620, 0x20bfb: 0x6c596820, + // Block 0x830, offset 0x20c00 + 0x20c05: 0x6cedb220, 0x20c06: 0x6c95d820, + 0x20c0f: 0x6c315620, + 0x20c15: 0x6c893c20, + 0x20c23: 0x6ca7ea20, + 0x20c24: 0x6ca41c20, 0x20c25: 0x6c6fc820, 0x20c26: 0x6d266c20, + 0x20c29: 0x6d108820, 0x20c2a: 0x6c204c20, + 0x20c2e: 0x6c11cc20, 0x20c2f: 0x6c84f820, + 0x20c30: 0x6c33d420, 0x20c31: 0x6ca41e20, 0x20c32: 0x6ca42020, + 0x20c38: 0x6cc63820, + 0x20c3d: 0x6d267820, + // Block 0x831, offset 0x20c40 + 0x20c40: 0x6d1ee620, 0x20c42: 0x6d19a420, + 0x20c44: 0x6c4c5820, + 0x20c48: 0x6c295420, + 0x20c51: 0x6d312620, 0x20c52: 0x6c9c3c20, 0x20c53: 0x6c2e6820, + 0x20c56: 0x6d312820, + 0x20c5a: 0x6c7abe20, + 0x20c5c: 0x6c4de220, 0x20c5d: 0x6cd98020, 0x20c5e: 0x6c50d020, 0x20c5f: 0x6c5e9620, + 0x20c60: 0x6d302e20, + 0x20c64: 0x6c0dd620, 0x20c66: 0x6ceef220, 0x20c67: 0x6ce7d220, + 0x20c69: 0x6ce88c20, + 0x20c6c: 0x6c426e20, 0x20c6d: 0x6c908220, 0x20c6e: 0x6cc2c820, 0x20c6f: 0x6c5d2220, + 0x20c70: 0x6d3ba420, 0x20c71: 0x6cc3b220, 0x20c73: 0x6c533a20, + 0x20c75: 0x6c296020, 0x20c76: 0x6c510420, 0x20c77: 0x6cdf6e20, + 0x20c78: 0x6c48ca20, 0x20c7a: 0x6d230220, + 0x20c7c: 0x6d0baa20, 0x20c7f: 0x6cec8c20, + // Block 0x832, offset 0x20c80 + 0x20c80: 0x6cc43820, + 0x20c85: 0x6c744620, 0x20c86: 0x6cab3820, + 0x20c89: 0x6cc29c20, 0x20c8a: 0x6d347220, + 0x20c8d: 0x6c8d1820, 0x20c8e: 0x6cf37020, 0x20c8f: 0x6d033c20, + 0x20c90: 0x6c26ae20, 0x20c92: 0x6d24f220, 0x20c93: 0x6d261e20, + 0x20c97: 0x6ca13820, + 0x20c99: 0x6d1f5420, + 0x20c9e: 0x6cf45820, + 0x20ca0: 0x6d2ebe20, 0x20ca3: 0x6d07b820, + 0x20ca6: 0x6cc53c20, 0x20ca7: 0x6c4be220, + 0x20ca8: 0x6d23be20, + 0x20cae: 0x6cf9fc20, 0x20caf: 0x6c0b5220, + 0x20cb0: 0x6d1f7e20, 0x20cb2: 0x6d1a1420, + 0x20cb4: 0x6d083220, 0x20cb5: 0x6d1f8c20, 0x20cb6: 0x6c827a20, + 0x20cbc: 0x6ce6a620, 0x20cbf: 0x6d311a20, + // Block 0x833, offset 0x20cc0 + 0x20cc4: 0x6d292420, 0x20cc5: 0x6c40ba20, 0x20cc6: 0x6c7e5620, + 0x20cc9: 0x6cc39e20, + 0x20cce: 0x6c70ec20, + 0x20cd0: 0x6c20fa20, 0x20cd1: 0x6c263e20, 0x20cd2: 0x6cea3a20, 0x20cd3: 0x6c001220, + 0x20cd7: 0x6d3edc20, + 0x20cda: 0x6c59a620, 0x20cdb: 0x6d167c20, + 0x20ce9: 0x6c062e20, 0x20cea: 0x6c1afc20, + 0x20ced: 0x6cc63a20, + 0x20cf4: 0x6c913220, 0x20cf7: 0x6c6a6c20, + 0x20cf8: 0x6cd30a20, 0x20cfa: 0x6d413620, + // Block 0x834, offset 0x20d00 + 0x20d01: 0x6d167e20, + 0x20d04: 0x6c3bc820, 0x20d05: 0x6c3bca20, + 0x20d09: 0x6ca0c420, + 0x20d0d: 0x6cd59a20, + 0x20d1b: 0x6c023e20, + 0x20d1d: 0x6cb05620, 0x20d1e: 0x6cb27820, 0x20d1f: 0x6cb2f820, + 0x20d20: 0x6c639e20, 0x20d21: 0x6d38ca20, 0x20d23: 0x6cbf9e20, + 0x20d27: 0x6d1fa620, + 0x20d28: 0x6cdfd020, 0x20d2b: 0x6cc6f620, + 0x20d2d: 0x6c9d2020, + 0x20d36: 0x6d16ac20, + 0x20d38: 0x6cc6fc20, 0x20d3b: 0x6c8ace20, + 0x20d3c: 0x6cbf0220, + // Block 0x835, offset 0x20d40 + 0x20d59: 0x6c5b2020, 0x20d5a: 0x6c61a020, + 0x20d5f: 0x6c433a20, + 0x20d67: 0x6d1f0420, + 0x20d68: 0x6c138220, 0x20d69: 0x6c2a6020, 0x20d6a: 0x6d19ac20, + 0x20d6c: 0x6d22de20, 0x20d6d: 0x6c06fc20, 0x20d6f: 0x6c0ed020, + // Block 0x836, offset 0x20d80 + 0x20d94: 0x6cbb6820, + 0x20d9a: 0x6c141c20, + 0x20d9c: 0x6d02be20, 0x20d9e: 0x6c1b1420, + 0x20da3: 0x6d2a7220, + 0x20da4: 0x6c7c6020, 0x20da6: 0x6c3aa220, + 0x20da9: 0x6cddea20, 0x20daa: 0x6c48f420, + 0x20dad: 0x6c342620, + 0x20db2: 0x6c4a5420, + 0x20db4: 0x6d345020, + // Block 0x837, offset 0x20dc0 + 0x20dcc: 0x6c15a620, 0x20dcd: 0x6ca4ec20, + 0x20dd0: 0x6c553e20, 0x20dd2: 0x6ce21820, + 0x20de1: 0x6d175620, + 0x20de4: 0x6ca82a20, 0x20de5: 0x6d2d3e20, 0x20de6: 0x6c587220, + 0x20de8: 0x6c325620, 0x20dea: 0x6cb78620, 0x20deb: 0x6c12e420, + 0x20dee: 0x6c20cc20, + 0x20df2: 0x6c264e20, + 0x20df6: 0x6d361820, 0x20df7: 0x6c453020, + 0x20dfb: 0x6cf26e20, + // Block 0x838, offset 0x20e00 + 0x20e09: 0x6c325820, + 0x20e0d: 0x6c1b2420, + 0x20e11: 0x6c01be20, 0x20e12: 0x6c7df820, + 0x20e14: 0x6cf2e820, + 0x20e18: 0x6d1bb620, 0x20e1a: 0x6cb13e20, + 0x20e2b: 0x6d2c3020, + 0x20e2c: 0x6d3b6420, 0x20e2e: 0x6cdac420, + 0x20e33: 0x6ca6a620, + 0x20e3a: 0x6d3a1420, 0x20e3b: 0x6c14fe20, + 0x20e3e: 0x6c084020, 0x20e3f: 0x6ca5f220, + // Block 0x839, offset 0x20e40 + 0x20e40: 0x6d347420, 0x20e41: 0x6c5bd420, + 0x20e58: 0x6cfa3a20, 0x20e5a: 0x6d364e20, 0x20e5b: 0x6cf63c20, + 0x20e5e: 0x6c67aa20, + 0x20e69: 0x6c330220, 0x20e6a: 0x6c3d7c20, + 0x20e6d: 0x6c685c20, 0x20e6e: 0x6c176820, 0x20e6f: 0x6c045020, + 0x20e75: 0x6c8b1e20, + 0x20e7c: 0x6c025a20, + // Block 0x83a, offset 0x20e80 + 0x20e8b: 0x6d2a1620, + 0x20e8c: 0x6c1f6020, 0x20e8f: 0x6ceb8620, + 0x20e92: 0x6c4fd220, 0x20e93: 0x6c773620, + 0x20e94: 0x6d1a7e20, 0x20e96: 0x6cfcea20, + 0x20e9d: 0x6c401820, 0x20e9e: 0x6c0cb620, + 0x20ea0: 0x6c7c4020, + 0x20ea4: 0x6cbcde20, 0x20ea5: 0x6cc98420, + 0x20ebf: 0x6c266220, + // Block 0x83b, offset 0x20ec0 + 0x20ec0: 0x6d12b220, + 0x20ec4: 0x6d2f0820, 0x20ec6: 0x6c896420, + 0x20ec8: 0x6c332620, + 0x20ecd: 0x6c816620, 0x20ece: 0x6d09a620, + 0x20ed8: 0x6d36a420, 0x20eda: 0x6c7a5a20, + 0x20ede: 0x6cdc6a20, 0x20edf: 0x6cf2a020, + 0x20ee3: 0x6c7a5e20, + 0x20eef: 0x6c65d420, + 0x20ef6: 0x6c67ba20, + 0x20efb: 0x6d3caa20, + 0x20efd: 0x6cd6dc20, 0x20efe: 0x6d219c20, + // Block 0x83c, offset 0x20f00 + 0x20f01: 0x6cc98c20, 0x20f03: 0x6d23e620, + 0x20f04: 0x6c803a20, + 0x20f0a: 0x6d240620, + 0x20f0c: 0x6cba2820, 0x20f0d: 0x6c72a220, 0x20f0f: 0x6c8b3420, + 0x20f12: 0x6cd53e20, 0x20f13: 0x6cfd1a20, + 0x20f16: 0x6c415420, + 0x20f22: 0x6cdf4420, + 0x20f27: 0x6ce52220, + 0x20f2f: 0x6c9c1020, + 0x20f31: 0x6c2ba220, 0x20f33: 0x6c9ddc20, + 0x20f3e: 0x6c5afa20, + // Block 0x83d, offset 0x20f40 + 0x20f49: 0x6c351c20, + 0x20f4d: 0x6c8b4a20, + 0x20f52: 0x6c7f6820, 0x20f53: 0x6d1aa820, + 0x20f54: 0x6c804620, 0x20f56: 0x6c68a020, + 0x20f58: 0x6c5e2620, + 0x20f63: 0x6c4c4c20, + 0x20f66: 0x6d2e9420, + 0x20f6d: 0x6c9d0820, + 0x20f70: 0x6c7c5020, + 0x20f77: 0x6c352620, + 0x20f7f: 0x6d1ab020, + // Block 0x83e, offset 0x20f80 + 0x20f87: 0x6c836020, + 0x20f95: 0x6c462a20, + 0x20f9b: 0x6ce6ac20, + 0x20f9c: 0x6d10c820, 0x20f9e: 0x6cedf620, + 0x20fa3: 0x6c6aa020, + 0x20fa8: 0x6d04c220, 0x20faa: 0x6cd5c020, + 0x20fb1: 0x6cf08c20, + 0x20fb4: 0x6d236620, + // Block 0x83f, offset 0x20fc0 + 0x20fc1: 0x6d2da620, + 0x20fc9: 0x6c01ee20, + 0x20fcf: 0x6cca9a20, + 0x20fd0: 0x6c1e0c20, 0x20fd2: 0x6c7ae220, + 0x20fd6: 0x6c71a020, 0x20fd7: 0x6c4d5220, + 0x20fe2: 0x6c9e0420, + 0x20fe7: 0x6c4f9420, + 0x20fea: 0x6c1d9e20, + 0x20fee: 0x6c8d1a20, + 0x20ff0: 0x6d3f9620, + // Block 0x840, offset 0x21000 + 0x21009: 0x6c7d4820, + 0x2100c: 0x6d378c20, 0x2100e: 0x6d2f5420, + 0x21010: 0x6c2f2e20, 0x21011: 0x6c467420, 0x21012: 0x6d279620, 0x21013: 0x6c27c620, + 0x21014: 0x6caada20, + 0x2101b: 0x6c0dd820, + 0x2101d: 0x6cc47420, 0x2101e: 0x6c14c420, + 0x21022: 0x6cc70620, 0x21023: 0x6d19c820, + 0x21024: 0x6c14c620, 0x21027: 0x6d361a20, + 0x2102a: 0x6c48f820, 0x2102b: 0x6caabe20, + 0x2102c: 0x6ccfe420, 0x2102f: 0x6cdac620, + 0x21032: 0x6cf2b820, 0x21033: 0x6c1bb220, + 0x2103a: 0x6c9ee220, 0x2103b: 0x6d347e20, + 0x2103e: 0x6cb50a20, + // Block 0x841, offset 0x21040 + 0x21041: 0x6c465820, + 0x21046: 0x6c90fa20, + 0x21048: 0x6d3ea020, + 0x2104d: 0x6c293a20, 0x2104f: 0x6cfc6820, + 0x21051: 0x6cc77e20, + 0x21057: 0x6caefe20, + 0x2105e: 0x6cf56c20, + 0x21062: 0x6c7aba20, + 0x21064: 0x6c4b2620, 0x21065: 0x6c212e20, 0x21066: 0x6c6baa20, + 0x21072: 0x6c6bac20, 0x21073: 0x6cf57820, + 0x21075: 0x6c7a1a20, 0x21077: 0x6c46ec20, + 0x21078: 0x6d2cac20, 0x21079: 0x6c392620, + 0x2107c: 0x6d015a20, + // Block 0x842, offset 0x21080 + 0x2108d: 0x6c585e20, 0x2108f: 0x6ca79020, + 0x21090: 0x6cf85820, + 0x2109b: 0x6c240820, + 0x2109d: 0x6c4bba20, + 0x210a1: 0x6cf5b620, + 0x210a7: 0x6cb83620, + 0x210aa: 0x6c981c20, + 0x210ad: 0x6d303220, + 0x210b0: 0x6c734620, + 0x210b4: 0x6c0ca020, + // Block 0x843, offset 0x210c0 + 0x210c0: 0x6c0ca220, + 0x210c5: 0x6cc2d620, + 0x210cb: 0x6cf88620, + 0x210ce: 0x6c68f020, + 0x210d0: 0x6cc2ea20, 0x210d1: 0x6d352620, 0x210d2: 0x6ce46820, 0x210d3: 0x6c762a20, + 0x210d8: 0x6cca1a20, 0x210db: 0x6d3e4c20, + 0x210e3: 0x6c6adc20, + 0x210ea: 0x6c0cec20, + 0x210ec: 0x6c312c20, 0x210ed: 0x6d417620, + 0x210f6: 0x6d0db020, + // Block 0x844, offset 0x21100 + 0x21101: 0x6c0a1c20, + 0x21105: 0x6c7b0020, 0x21107: 0x6d0eb620, + 0x21108: 0x6cef3820, 0x2110a: 0x6c583420, + 0x2110c: 0x6c506420, + 0x21111: 0x6c45b820, + 0x21114: 0x6c9b5420, 0x21117: 0x6c82e420, + 0x21119: 0x6c2cae20, 0x2111b: 0x6c0e0220, + 0x2111c: 0x6c584420, 0x2111f: 0x6cebfe20, + 0x21120: 0x6c751420, + 0x21128: 0x6c1bda20, + 0x2112d: 0x6c030e20, 0x2112e: 0x6c6fa420, + 0x21137: 0x6c2c0e20, + 0x21139: 0x6d2f1c20, 0x2113b: 0x6c26e620, + 0x2113c: 0x6cd23820, 0x2113d: 0x6c501420, + // Block 0x845, offset 0x21140 + 0x2114c: 0x6d12c020, + 0x21157: 0x6c091a20, + 0x21158: 0x6cb05020, 0x21159: 0x6d118820, + 0x2115c: 0x6c2b1420, 0x2115d: 0x6c11ee20, 0x2115e: 0x6cb20220, 0x2115f: 0x6d268420, + 0x21160: 0x6cbc7820, 0x21161: 0x6caf3220, + 0x21175: 0x6ceb7020, 0x21176: 0x6d015c20, + 0x2117d: 0x6d12cc20, + // Block 0x846, offset 0x21180 + 0x21180: 0x6c392820, 0x21181: 0x6c484620, 0x21182: 0x6c566e20, 0x21183: 0x6cc7fa20, + 0x21189: 0x6cc4b620, 0x2118a: 0x6c3d2020, 0x2118b: 0x6c598020, + 0x2119a: 0x6cc79020, + 0x211a2: 0x6c993020, + 0x211a5: 0x6c32f620, 0x211a6: 0x6c5b9820, 0x211a7: 0x6cf85a20, + 0x211a8: 0x6d04bc20, 0x211ab: 0x6cc4b820, + 0x211ac: 0x6d13d620, 0x211af: 0x6d303420, + 0x211b1: 0x6c61c620, 0x211b2: 0x6c434020, 0x211b3: 0x6d203820, + 0x211b5: 0x6cb40620, + // Block 0x847, offset 0x211c0 + 0x211c8: 0x6c1f2220, 0x211c9: 0x6c240a20, 0x211ca: 0x6d303620, 0x211cb: 0x6ca79220, + 0x211cd: 0x6cbca620, + 0x211d0: 0x6c13d220, 0x211d2: 0x6ca79420, 0x211d3: 0x6cdbb620, + 0x211d9: 0x6c13d420, 0x211da: 0x6c19da20, 0x211db: 0x6d10e020, + 0x211dc: 0x6c324820, 0x211dd: 0x6cedc820, 0x211df: 0x6ca76220, + 0x211e0: 0x6c9c4420, + 0x211e6: 0x6caa1620, 0x211e7: 0x6cf87820, + 0x211e9: 0x6d109820, 0x211eb: 0x6c14c820, + // Block 0x848, offset 0x21200 + 0x21218: 0x6d018c20, 0x21219: 0x6c9ed420, 0x2121a: 0x6c796420, + 0x2121c: 0x6c243a20, 0x2121e: 0x6cd13620, 0x2121f: 0x6cacb620, + 0x21220: 0x6c569c20, 0x21222: 0x6c78b020, 0x21223: 0x6cfcc220, + 0x21225: 0x6c53fa20, 0x21226: 0x6cbf2020, 0x21227: 0x6d3f8220, + 0x2122a: 0x6c3e7420, 0x2122b: 0x6ca3be20, + 0x2122d: 0x6ca69e20, 0x2122f: 0x6c7a7a20, + 0x2123e: 0x6ca59820, + // Block 0x849, offset 0x21240 + 0x2124d: 0x6c439020, + 0x21251: 0x6c53fc20, 0x21253: 0x6c002620, + 0x21255: 0x6cd1ba20, + 0x2125e: 0x6d04d420, 0x2125f: 0x6c230e20, + 0x21260: 0x6c684420, 0x21262: 0x6d2c3220, 0x21263: 0x6cfebe20, + 0x21264: 0x6c88f820, 0x21265: 0x6cc24820, + 0x21268: 0x6ccd4420, 0x21269: 0x6d01c020, 0x2126b: 0x6c461c20, + 0x2126c: 0x6c9ed820, 0x2126d: 0x6c148020, 0x2126f: 0x6c371620, + 0x21273: 0x6c312220, + // Block 0x84a, offset 0x21280 + 0x21286: 0x6c79f020, + 0x2128a: 0x6ce58a20, 0x2128b: 0x6cd1cc20, + 0x2128f: 0x6cca7020, + 0x21292: 0x6c491a20, + 0x21296: 0x6c505620, 0x21297: 0x6d367c20, + 0x21298: 0x6d106620, 0x21299: 0x6ce70020, 0x2129a: 0x6c09ee20, + 0x2129c: 0x6ca06420, 0x2129e: 0x6c3ebe20, + 0x212a5: 0x6cbb1420, + 0x212b9: 0x6d367e20, + 0x212bc: 0x6cd9ca20, 0x212bf: 0x6ca7a020, + // Block 0x84b, offset 0x212c0 + 0x212c0: 0x6c738020, 0x212c2: 0x6d105620, + 0x212c4: 0x6c599e20, + 0x212c8: 0x6c080020, 0x212c9: 0x6ca06620, 0x212ca: 0x6c176a20, + 0x212ce: 0x6c93a420, 0x212cf: 0x6cce8220, + 0x212d0: 0x6c104220, 0x212d1: 0x6d2b8820, 0x212d2: 0x6cd81020, + 0x212d4: 0x6d41c420, 0x212d5: 0x6d265620, 0x212d6: 0x6d294c20, 0x212d7: 0x6c948e20, + 0x212e5: 0x6cc1b020, + 0x212fa: 0x6c9e9820, + // Block 0x84c, offset 0x21300 + 0x21300: 0x6d3bd820, + 0x21308: 0x6c297e20, 0x2130a: 0x6d250a20, + 0x21312: 0x6c71d220, + 0x21315: 0x6c5b6020, 0x21316: 0x6cb7d020, + 0x21318: 0x6d285220, 0x2131a: 0x6c97fe20, + 0x2131c: 0x6ca0aa20, + 0x21331: 0x6cb16220, 0x21333: 0x6c6d4a20, + 0x21339: 0x6d10b820, + // Block 0x84d, offset 0x21340 + 0x21340: 0x6c1c6820, 0x21341: 0x6ca6c620, 0x21342: 0x6cd9de20, + 0x21348: 0x6cd61a20, 0x2134b: 0x6cb16420, + 0x21354: 0x6c4f1620, + 0x21360: 0x6d10be20, 0x21362: 0x6ca56020, + 0x2136a: 0x6cd3f020, + 0x2136c: 0x6d251820, 0x2136e: 0x6c114c20, 0x2136f: 0x6c6b5220, + 0x21379: 0x6d023e20, + 0x2137d: 0x6d0cec20, 0x2137e: 0x6cff3620, + // Block 0x84e, offset 0x21380 + 0x2138b: 0x6d025020, + 0x2138c: 0x6c86ec20, 0x2138e: 0x6c397620, + 0x21397: 0x6d3b3c20, + 0x21399: 0x6ca37220, 0x2139b: 0x6d3bb620, + 0x2139e: 0x6c7c4c20, + 0x213a2: 0x6c957020, + 0x213ab: 0x6cb83220, + 0x213b6: 0x6ceca820, + 0x213bd: 0x6cd54c20, 0x213bf: 0x6c1a7c20, + // Block 0x84f, offset 0x213c0 + 0x213c1: 0x6d164620, + 0x213c6: 0x6c500820, + 0x213c8: 0x6c698220, 0x213cb: 0x6c5b8e20, + 0x213cd: 0x6cffce20, 0x213ce: 0x6c222020, + 0x213de: 0x6c61a220, + 0x213e6: 0x6ca62e20, + 0x213e8: 0x6ca63420, 0x213e9: 0x6ce3bc20, + 0x213f6: 0x6c724820, + 0x213f8: 0x6ca04220, + 0x213fd: 0x6c83d220, 0x213ff: 0x6d382c20, + // Block 0x850, offset 0x21400 + 0x21401: 0x6d06d420, 0x21403: 0x6cbf3820, + 0x21404: 0x6c3e9620, 0x21406: 0x6c0d7e20, + 0x2140a: 0x6c621620, + 0x2140d: 0x6cb5f420, 0x2140e: 0x6cf89c20, + 0x21414: 0x6c2ada20, 0x21415: 0x6c376020, + 0x2141b: 0x6cd53220, + 0x2141c: 0x6ce77820, 0x2141d: 0x6cff9620, 0x2141f: 0x6cb01c20, + 0x21428: 0x6c284020, 0x2142a: 0x6c60da20, + 0x21433: 0x6d002020, + 0x21437: 0x6c23ca20, + 0x2143b: 0x6c0d1c20, + 0x2143c: 0x6cc6f020, + // Block 0x851, offset 0x21440 + 0x2144d: 0x6c9e4a20, + 0x21452: 0x6c9e4c20, + 0x21454: 0x6cd49c20, 0x21455: 0x6cff6c20, 0x21456: 0x6c05e420, 0x21457: 0x6cec2220, + 0x21459: 0x6cad8020, + 0x21463: 0x6c410e20, + 0x21465: 0x6c549c20, 0x21466: 0x6c525420, + 0x21468: 0x6d39f220, 0x21469: 0x6c48c420, + 0x2146d: 0x6c4b3820, + 0x21479: 0x6c273e20, + 0x2147c: 0x6c0d2820, 0x2147d: 0x6c5a4420, + // Block 0x852, offset 0x21480 + 0x21480: 0x6c13d620, + 0x21484: 0x6cfa3420, 0x21485: 0x6c710220, 0x21487: 0x6d119a20, + 0x21496: 0x6c3bb620, 0x21497: 0x6d2a7420, + 0x2149b: 0x6c3c3020, + 0x214a2: 0x6c708020, 0x214a3: 0x6d230a20, + 0x214a9: 0x6c5cbe20, + 0x214b2: 0x6c6ab020, 0x214b3: 0x6d049020, + 0x214b5: 0x6ca3ba20, + 0x214bb: 0x6caa1820, + 0x214bd: 0x6cd13820, 0x214bf: 0x6d233420, + // Block 0x853, offset 0x214c0 + 0x214c2: 0x6c587620, 0x214c3: 0x6c450c20, + 0x214c4: 0x6ced1620, 0x214c6: 0x6ceb1e20, 0x214c7: 0x6cbb7820, + 0x214d8: 0x6d1b5220, 0x214da: 0x6c635e20, + 0x214e1: 0x6cdd7220, 0x214e3: 0x6c6ade20, + 0x214e4: 0x6cf64020, 0x214e5: 0x6cf25020, + 0x214e9: 0x6c986620, + 0x214f6: 0x6d0fbe20, + 0x214f8: 0x6d110820, + 0x214fd: 0x6c986c20, 0x214fe: 0x6cab3e20, + // Block 0x854, offset 0x21500 + 0x21501: 0x6c017020, + 0x21505: 0x6c910c20, + 0x21511: 0x6c366e20, 0x21512: 0x6d3f1e20, + 0x21517: 0x6c367020, + 0x21519: 0x6c01c820, + 0x2151e: 0x6c5de220, + 0x21520: 0x6c135220, + 0x21530: 0x6d049c20, 0x21531: 0x6c625e20, 0x21533: 0x6d424e20, + 0x21535: 0x6cb63620, + 0x2153a: 0x6d32ee20, + // Block 0x855, offset 0x21540 + 0x21540: 0x6c5f2e20, 0x21541: 0x6cb52e20, 0x21542: 0x6c732420, 0x21543: 0x6ca91c20, + 0x2155f: 0x6ccb7220, + 0x21565: 0x6c51fa20, 0x21566: 0x6cc72c20, 0x21567: 0x6cbdec20, + 0x2156c: 0x6c70de20, 0x2156f: 0x6c86ee20, + 0x21575: 0x6cd29020, + 0x21578: 0x6ca6da20, 0x21579: 0x6cfbc420, 0x2157a: 0x6c3dbc20, + 0x2157d: 0x6cc80820, + // Block 0x856, offset 0x21580 + 0x21581: 0x6d04ac20, 0x21582: 0x6c4ba220, + 0x21584: 0x6c62e020, 0x21586: 0x6c9bf820, 0x21587: 0x6c3dc020, + 0x21589: 0x6cc9ee20, 0x2158a: 0x6d247820, 0x2158b: 0x6c69de20, + 0x2158c: 0x6c9c2220, 0x2158d: 0x6c900e20, 0x2158e: 0x6cbb0020, + 0x21590: 0x6c9cc620, 0x21593: 0x6d15a420, + 0x21596: 0x6c4dc620, 0x21597: 0x6ca6e620, + 0x21598: 0x6c81ee20, 0x21599: 0x6ccbbe20, + 0x2159c: 0x6c8c4220, 0x2159e: 0x6d22c220, + 0x215a5: 0x6caab020, + 0x215ab: 0x6cf4c020, + 0x215af: 0x6c0b3620, + 0x215b2: 0x6c0b3820, 0x215b3: 0x6d079620, + 0x215b5: 0x6c649620, + 0x215b8: 0x6c0b3c20, + // Block 0x857, offset 0x215c0 + 0x215c2: 0x6c2a7a20, + 0x215c7: 0x6d3b8620, + 0x215cb: 0x6cc72020, + 0x215d0: 0x6cd69820, + 0x215d8: 0x6c631820, 0x215db: 0x6c5b4a20, + 0x215de: 0x6d2d5c20, + 0x215e2: 0x6c042e20, 0x215e3: 0x6c8ac420, + 0x215e5: 0x6d003820, + 0x215ed: 0x6c656c20, 0x215ee: 0x6cd44020, + 0x215f3: 0x6c77ba20, + 0x215f7: 0x6c490c20, + 0x215f8: 0x6c949420, + 0x215fe: 0x6caa1a20, 0x215ff: 0x6c16e820, + // Block 0x858, offset 0x21600 + 0x2160e: 0x6c895220, + 0x21619: 0x6ca3c620, 0x2161a: 0x6cc80020, + 0x2161e: 0x6d368020, + 0x21626: 0x6c128620, + 0x21630: 0x6c867420, + 0x2163b: 0x6c7fcc20, + 0x2163f: 0x6c14e220, + // Block 0x859, offset 0x21640 + 0x21641: 0x6cedba20, + 0x21644: 0x6c856620, 0x21647: 0x6cf49620, + 0x21648: 0x6cad4220, 0x21649: 0x6d200a20, 0x2164b: 0x6c415e20, + 0x2164f: 0x6c011420, + 0x21650: 0x6d04b420, 0x21651: 0x6cd70420, 0x21652: 0x6cc8aa20, + 0x21658: 0x6c04b620, 0x21659: 0x6d1eea20, + 0x21662: 0x6c5d6e20, + 0x21665: 0x6c5a9c20, + 0x21668: 0x6d428c20, 0x21669: 0x6cfe9820, 0x2166b: 0x6c9dba20, + 0x21670: 0x6c40d620, 0x21671: 0x6d25e220, 0x21673: 0x6c0ff020, + 0x21674: 0x6c17ba20, 0x21675: 0x6ce9e220, 0x21677: 0x6c0ff220, + 0x2167d: 0x6c40d820, 0x2167f: 0x6ce55820, + // Block 0x85a, offset 0x21680 + 0x21680: 0x6ca2dc20, + 0x21685: 0x6c556a20, 0x21686: 0x6ca83c20, + 0x2168b: 0x6c5b3e20, + 0x2168c: 0x6c90ea20, 0x2168e: 0x6ce35020, + 0x21690: 0x6cbc5420, 0x21691: 0x6cbbee20, 0x21692: 0x6d380620, + 0x21696: 0x6c2b4220, + 0x2169a: 0x6c8bd820, + 0x2169d: 0x6cc32c20, 0x2169e: 0x6d3b9a20, + 0x216a0: 0x6c828e20, 0x216a2: 0x6d013620, + 0x216a5: 0x6cc56220, + 0x216a8: 0x6c28f620, 0x216aa: 0x6c316020, 0x216ab: 0x6ca71420, + 0x216af: 0x6cd2ae20, + 0x216b2: 0x6cfb2020, + 0x216b9: 0x6d343820, + 0x216bd: 0x6c008820, 0x216be: 0x6c21f220, 0x216bf: 0x6cb42a20, + // Block 0x85b, offset 0x216c0 + 0x216c1: 0x6cd2b620, + 0x216c5: 0x6cc0de20, 0x216c6: 0x6cd55020, 0x216c7: 0x6c2cbe20, + 0x216c9: 0x6cffa420, 0x216ca: 0x6cd70a20, + 0x216cc: 0x6c586020, + 0x216d0: 0x6d149220, 0x216d1: 0x6c72dc20, + 0x216d4: 0x6d34fc20, + 0x216dc: 0x6d2f9e20, + 0x216e3: 0x6d06a220, + 0x216ef: 0x6c905a20, + 0x216f1: 0x6d3aca20, 0x216f3: 0x6cdd5620, + 0x216f7: 0x6c2e8020, + 0x216fa: 0x6cc18420, + 0x216fc: 0x6c78a220, 0x216fd: 0x6c54ba20, 0x216fe: 0x6c708220, + // Block 0x85c, offset 0x21700 + 0x21700: 0x6cbea420, + 0x2170d: 0x6c0dae20, + 0x21715: 0x6ce3f220, 0x21717: 0x6c744820, + 0x2171a: 0x6cc05a20, + 0x21723: 0x6c67e420, + 0x2172a: 0x6d282e20, + 0x2172d: 0x6c9a9a20, 0x2172e: 0x6caf6e20, + 0x21730: 0x6cc1a020, + 0x2173c: 0x6c9d5220, 0x2173f: 0x6ce3fe20, + // Block 0x85d, offset 0x21740 + 0x21742: 0x6c768c20, + 0x21744: 0x6c08e820, 0x21746: 0x6cc11c20, + 0x2174f: 0x6ce56620, + 0x21751: 0x6c1f6c20, + 0x21758: 0x6c714a20, 0x2175a: 0x6cf69620, + 0x2175e: 0x6c8c5e20, + 0x2176d: 0x6c1bca20, 0x2176e: 0x6c5f7e20, + 0x21774: 0x6c917a20, + 0x21778: 0x6c876220, + 0x2177e: 0x6c73c820, + // Block 0x85e, offset 0x21780 + 0x21785: 0x6d397c20, 0x21786: 0x6c921020, + 0x2178e: 0x6ca7f620, + 0x21794: 0x6cc2c020, + 0x217ad: 0x6d0b6820, 0x217af: 0x6c35c220, + 0x217b1: 0x6c564020, + // Block 0x85f, offset 0x217c0 + 0x217c0: 0x6c982620, + 0x217c9: 0x6cf4a020, + 0x217cc: 0x6c137620, + 0x217d1: 0x6cbd1820, 0x217d2: 0x6c6a6220, 0x217d3: 0x6c52f420, + 0x217d5: 0x6c27b620, 0x217d6: 0x6c371c20, 0x217d7: 0x6d2b3a20, + 0x217d8: 0x6c565220, 0x217d9: 0x6c020e20, 0x217da: 0x6c6bb220, 0x217db: 0x6c3faa20, + 0x217dc: 0x6d1e7020, 0x217de: 0x6c3c1a20, + 0x217ec: 0x6ca26620, + 0x217f6: 0x6ccb1620, 0x217f7: 0x6c238a20, + 0x217fb: 0x6c772220, + // Block 0x860, offset 0x21800 + 0x21802: 0x6d11ea20, 0x21803: 0x6c008c20, + 0x21804: 0x6c05a620, 0x21806: 0x6cb34c20, + 0x21808: 0x6cd2b820, 0x21809: 0x6c392a20, 0x2180b: 0x6c70f420, + 0x2180c: 0x6cafb420, 0x2180e: 0x6cf07420, 0x2180f: 0x6c7a2220, + 0x21810: 0x6cbc8620, 0x21811: 0x6c417220, + 0x21822: 0x6c7be220, 0x21823: 0x6cdc2420, + 0x21824: 0x6c07d620, 0x21825: 0x6c632820, 0x21826: 0x6d0b8020, + 0x2182a: 0x6c76fe20, 0x2182b: 0x6ca7f820, + 0x2182d: 0x6d03cc20, 0x2182f: 0x6cf85c20, + 0x21831: 0x6c8c4a20, 0x21832: 0x6c347e20, + 0x21834: 0x6c159a20, + // Block 0x861, offset 0x21840 + 0x21848: 0x6cd32e20, 0x2184b: 0x6c334020, + 0x2184d: 0x6c675020, 0x2184e: 0x6d222a20, 0x2184f: 0x6c922020, + 0x21850: 0x6c372020, 0x21853: 0x6c476420, + 0x21855: 0x6cefa020, 0x21856: 0x6c17d620, 0x21857: 0x6c590020, + 0x21858: 0x6c0ce220, 0x2185b: 0x6c4e9420, + 0x2185c: 0x6ce99e20, 0x2185d: 0x6ca32420, 0x2185e: 0x6cb6e620, + 0x21860: 0x6ce7e820, 0x21861: 0x6d24d220, 0x21862: 0x6cede020, + 0x21864: 0x6cf3b020, 0x21865: 0x6c434220, + 0x21868: 0x6c792e20, 0x2186a: 0x6d14ba20, + 0x21878: 0x6cfe9a20, 0x2187a: 0x6c4ae420, 0x2187b: 0x6d0b8c20, + 0x2187c: 0x6cdc2e20, 0x2187d: 0x6cd95420, 0x2187f: 0x6d3d3820, + // Block 0x862, offset 0x21880 + 0x21882: 0x6ce84a20, 0x21883: 0x6cfbf420, + 0x21888: 0x6d2b4420, 0x21889: 0x6c85c620, + 0x2188c: 0x6d3acc20, 0x2188e: 0x6c6aa220, + 0x21891: 0x6ce3e820, + 0x21894: 0x6d009c20, 0x21895: 0x6cbf1220, 0x21897: 0x6d0b9420, + 0x21898: 0x6c708620, 0x2189b: 0x6d1a5a20, + 0x2189c: 0x6d345220, 0x2189e: 0x6c76d020, 0x2189f: 0x6d3e2220, + 0x218a1: 0x6c77f420, 0x218a3: 0x6ca81220, + 0x218a4: 0x6cbb0620, 0x218a5: 0x6ced0220, 0x218a6: 0x6d2abc20, + 0x218a8: 0x6c708820, 0x218aa: 0x6d3f4220, + // Block 0x863, offset 0x218c0 + 0x218c4: 0x6d0b9620, 0x218c7: 0x6c8bae20, + 0x218c9: 0x6cb5c020, + 0x218ce: 0x6c5b3420, + 0x218d3: 0x6cb77a20, + 0x218d5: 0x6d0fa820, 0x218d6: 0x6cdc3620, + 0x218d8: 0x6cb6f220, 0x218d9: 0x6c4a5620, + 0x218e2: 0x6cbe1020, 0x218e3: 0x6c353e20, + 0x218e5: 0x6d429820, + 0x218e8: 0x6d2b4820, 0x218e9: 0x6cb77c20, 0x218ea: 0x6c602e20, + 0x218ec: 0x6ceb2020, 0x218ed: 0x6c2e9c20, 0x218ef: 0x6c5bbe20, + 0x218f0: 0x6c98e420, 0x218f2: 0x6d063e20, + 0x218f5: 0x6c53fe20, 0x218f6: 0x6d0d7c20, 0x218f7: 0x6cfdc220, + 0x218f8: 0x6c231020, 0x218f9: 0x6c555820, + 0x218fc: 0x6c01c020, 0x218fe: 0x6c0de420, + // Block 0x864, offset 0x21900 + 0x21907: 0x6c348e20, + 0x21910: 0x6d3a6a20, 0x21911: 0x6c2e9e20, 0x21912: 0x6d1ea220, 0x21913: 0x6cb6fa20, + 0x21914: 0x6cd26820, 0x21915: 0x6d099a20, 0x21916: 0x6d1ea420, 0x21917: 0x6c76ae20, + 0x21918: 0x6cbc2420, 0x2191b: 0x6cbab620, + 0x2191c: 0x6cae3e20, 0x2191f: 0x6cc2ee20, + 0x21921: 0x6d1c6e20, + 0x21927: 0x6ccbf220, + 0x2192b: 0x6ce1d020, + 0x2192d: 0x6c53c020, 0x2192e: 0x6cb06220, 0x2192f: 0x6d110a20, + 0x21934: 0x6ce8bc20, 0x21935: 0x6c148220, 0x21937: 0x6cfa3c20, + 0x21938: 0x6cb5f620, 0x2193a: 0x6cbf3a20, + 0x2193d: 0x6c6d1220, + // Block 0x865, offset 0x21940 + 0x21948: 0x6d316020, + 0x2194c: 0x6d39ae20, 0x2194e: 0x6cf64420, + 0x21950: 0x6cf22a20, 0x21951: 0x6d37f820, + 0x21955: 0x6cdc4420, + 0x21958: 0x6c781020, 0x21959: 0x6c7e0c20, 0x2195a: 0x6c777220, + 0x2195d: 0x6c176c20, 0x2195e: 0x6c09f020, 0x2195f: 0x6ca13a20, + 0x21960: 0x6d3b1220, 0x21961: 0x6c4edc20, 0x21962: 0x6d227820, 0x21963: 0x6d153220, + 0x21964: 0x6c966c20, 0x21967: 0x6cb7aa20, + 0x21968: 0x6c4c0020, 0x21969: 0x6c97e420, 0x2196a: 0x6c89f420, 0x2196b: 0x6c8bc020, + 0x2196c: 0x6d40c620, 0x2196d: 0x6c82cc20, 0x2196e: 0x6c56b220, 0x2196f: 0x6c209220, + 0x21970: 0x6cb7ac20, 0x21971: 0x6c824420, + // Block 0x866, offset 0x21980 + 0x21981: 0x6c1ac420, 0x21983: 0x6cb33020, + 0x21984: 0x6c2eca20, + 0x2198a: 0x6c82ce20, + 0x2198e: 0x6d160420, + 0x21993: 0x6c2d7620, + 0x21996: 0x6c33a420, 0x21997: 0x6c42d620, + 0x21998: 0x6c54f220, 0x2199a: 0x6cff0020, 0x2199b: 0x6c40ca20, + 0x2199c: 0x6cae8020, + 0x219ac: 0x6cd06a20, + 0x219b1: 0x6cef2a20, + 0x219bb: 0x6c335820, + 0x219bc: 0x6c177220, 0x219bd: 0x6d1b0420, 0x219be: 0x6c7b3a20, 0x219bf: 0x6c7a6020, + // Block 0x867, offset 0x219c0 + 0x219c1: 0x6d41ce20, 0x219c2: 0x6c47ca20, + 0x219c5: 0x6d285420, 0x219c6: 0x6d36da20, + 0x219c9: 0x6c629420, 0x219ca: 0x6c199020, + 0x219d6: 0x6d020e20, + 0x219db: 0x6d419e20, + 0x219dc: 0x6c017420, 0x219dd: 0x6c4fb220, + 0x219e0: 0x6cb36020, 0x219e2: 0x6c2b9820, 0x219e3: 0x6d135820, + 0x219e7: 0x6ca4c420, + 0x219f1: 0x6c6b4220, 0x219f2: 0x6c059220, 0x219f3: 0x6c804020, + 0x219f4: 0x6c124820, 0x219f6: 0x6c0a6620, + 0x219fb: 0x6d2e1a20, + 0x219fc: 0x6cb7e620, + // Block 0x868, offset 0x21a00 + 0x21a02: 0x6ca4c620, + 0x21a05: 0x6c940c20, 0x21a07: 0x6c7c0a20, + 0x21a09: 0x6ca08420, 0x21a0b: 0x6c82e620, + 0x21a0c: 0x6cad7420, + 0x21a12: 0x6c86c420, 0x21a13: 0x6c136420, + 0x21a15: 0x6c299820, 0x21a16: 0x6c82e820, + 0x21a19: 0x6c36cc20, 0x21a1b: 0x6c086020, + 0x21a1c: 0x6c74e820, + 0x21a25: 0x6d083420, 0x21a26: 0x6ca89420, + 0x21a28: 0x6c4d7c20, + 0x21a2e: 0x6cfc4220, + 0x21a30: 0x6c661620, 0x21a31: 0x6c9c9e20, 0x21a32: 0x6ca8a020, + 0x21a3b: 0x6c124a20, + 0x21a3c: 0x6cd97820, 0x21a3d: 0x6d2ba820, 0x21a3e: 0x6d194220, + // Block 0x869, offset 0x21a40 + 0x21a42: 0x6c1d3020, + 0x21a44: 0x6c125020, + 0x21a49: 0x6c830620, 0x21a4a: 0x6caad220, 0x21a4b: 0x6c876420, + 0x21a4e: 0x6c84ba20, 0x21a4f: 0x6c957220, + 0x21a53: 0x6ce18a20, + 0x21a56: 0x6ca8c420, 0x21a57: 0x6ca8c620, + 0x21a59: 0x6c5fae20, 0x21a5b: 0x6c831220, + 0x21a5d: 0x6ca48020, + 0x21a60: 0x6c8c1420, 0x21a61: 0x6c8dce20, + 0x21a64: 0x6cfbe220, 0x21a65: 0x6d24a820, 0x21a67: 0x6d28ec20, + 0x21a68: 0x6cc34a20, 0x21a69: 0x6c8ac020, + 0x21a6f: 0x6d22ce20, + 0x21a70: 0x6c597620, + 0x21a7a: 0x6ca4de20, + 0x21a7c: 0x6d0a7820, 0x21a7e: 0x6c711020, 0x21a7f: 0x6c5dbc20, + // Block 0x86a, offset 0x21a80 + 0x21a81: 0x6d179420, + 0x21a8a: 0x6cf71420, 0x21a8b: 0x6ccb8a20, + 0x21a8c: 0x6c697020, 0x21a8d: 0x6d1de020, + 0x21a95: 0x6cd18c20, 0x21a96: 0x6c6d8420, 0x21a97: 0x6ced6e20, + 0x21a98: 0x6d129e20, 0x21a99: 0x6c6f4420, + 0x21a9c: 0x6c45d020, + 0x21aa1: 0x6c5aa020, + 0x21aaa: 0x6c37a420, + 0x21ab5: 0x6c4e7a20, + 0x21abc: 0x6c3e3020, + // Block 0x86b, offset 0x21ac0 + 0x21ac0: 0x6c3e4a20, 0x21ac1: 0x6d3d4a20, 0x21ac2: 0x6c5eb620, + 0x21acf: 0x6c053a20, + 0x21ad2: 0x6cb56620, 0x21ad3: 0x6cd2a620, + 0x21ad5: 0x6c2df420, 0x21ad6: 0x6cadfa20, 0x21ad7: 0x6cfbe420, + 0x21ad8: 0x6cc9f620, + 0x21add: 0x6c169220, 0x21ade: 0x6d264620, + 0x21ae0: 0x6c455820, 0x21ae2: 0x6cf34220, + 0x21ae4: 0x6c3b0a20, 0x21ae7: 0x6c159020, + 0x21ae9: 0x6ca58420, 0x21aea: 0x6c73d820, + 0x21aec: 0x6d2f8220, 0x21aee: 0x6cb96c20, + 0x21af1: 0x6c029820, + 0x21af6: 0x6cedf820, 0x21af7: 0x6d379020, + 0x21af9: 0x6c597820, 0x21afb: 0x6c106620, + 0x21afc: 0x6d3a5a20, 0x21afd: 0x6c092e20, 0x21afe: 0x6c173620, 0x21aff: 0x6d328620, + // Block 0x86c, offset 0x21b00 + 0x21b00: 0x6c3de620, 0x21b01: 0x6c79b820, 0x21b03: 0x6d422c20, + 0x21b04: 0x6d086c20, 0x21b06: 0x6c3fb220, + 0x21b0a: 0x6d118a20, + 0x21b0d: 0x6c0e4e20, 0x21b0f: 0x6c06e220, + 0x21b10: 0x6d007c20, 0x21b11: 0x6cd33020, 0x21b12: 0x6d149620, + 0x21b14: 0x6c531020, 0x21b15: 0x6c251c20, 0x21b17: 0x6d16e620, + 0x21b18: 0x6d3b7620, + 0x21b1d: 0x6c1bf620, + 0x21b24: 0x6cb2fe20, + 0x21b28: 0x6d1a3a20, + 0x21b31: 0x6d260a20, + 0x21b36: 0x6c6edc20, + 0x21b39: 0x6c995c20, 0x21b3a: 0x6cba4820, + 0x21b3c: 0x6d172420, + // Block 0x86d, offset 0x21b40 + 0x21b40: 0x6cf3b220, + 0x21b4d: 0x6c069820, 0x21b4e: 0x6c5dbe20, 0x21b4f: 0x6c239420, + 0x21b50: 0x6c797220, + 0x21b55: 0x6cde4820, 0x21b57: 0x6c4ea620, + 0x21b58: 0x6cba4e20, + 0x21b5c: 0x6d345420, + 0x21b62: 0x6ccb2420, + 0x21b65: 0x6cb8d620, 0x21b66: 0x6c4cb420, + 0x21b69: 0x6c4bbe20, + 0x21b6c: 0x6c649820, 0x21b6d: 0x6d37b820, 0x21b6e: 0x6c9e2220, 0x21b6f: 0x6c4afa20, + 0x21b70: 0x6cd37e20, 0x21b71: 0x6ca1d220, 0x21b72: 0x6c363220, 0x21b73: 0x6c039e20, + 0x21b74: 0x6c7e7220, + 0x21b78: 0x6d392820, 0x21b7a: 0x6c603020, + // Block 0x86e, offset 0x21b80 + 0x21b80: 0x6d2a4a20, + 0x21b84: 0x6d2bd820, 0x21b85: 0x6d179820, 0x21b87: 0x6c468420, + 0x21b8a: 0x6c4a6e20, 0x21b8b: 0x6d1bc420, + 0x21b8c: 0x6ccc9820, 0x21b8d: 0x6c513420, 0x21b8e: 0x6c057820, 0x21b8f: 0x6ca12a20, + 0x21b90: 0x6c9b1e20, 0x21b93: 0x6cf4fe20, + 0x21b94: 0x6c277620, 0x21b97: 0x6c6f1620, + 0x21b9c: 0x6c4ed020, 0x21b9f: 0x6ce70220, + 0x21ba0: 0x6c79be20, 0x21ba1: 0x6c841220, 0x21ba2: 0x6d368220, 0x21ba3: 0x6c5bf420, + 0x21ba4: 0x6d296e20, 0x21ba6: 0x6c2dfc20, 0x21ba7: 0x6c244420, + 0x21bb1: 0x6d368420, 0x21bb3: 0x6c7adc20, + 0x21bb5: 0x6cfe4a20, 0x21bb6: 0x6c57ba20, 0x21bb7: 0x6c8a0c20, + 0x21bb8: 0x6c255620, 0x21bb9: 0x6cbb9a20, 0x21bba: 0x6c692420, + 0x21bbc: 0x6d05d020, 0x21bbd: 0x6c37da20, 0x21bbf: 0x6cead020, + // Block 0x86f, offset 0x21bc0 + 0x21bc0: 0x6ce00020, 0x21bc1: 0x6d36a820, + 0x21bc8: 0x6ca51020, 0x21bc9: 0x6c99ac20, 0x21bca: 0x6c2c8c20, 0x21bcb: 0x6c135820, + 0x21bce: 0x6c693a20, 0x21bcf: 0x6c884820, + 0x21bd1: 0x6ccc1820, 0x21bd2: 0x6c28aa20, + 0x21bd5: 0x6cdc6c20, 0x21bd6: 0x6c884a20, 0x21bd7: 0x6c4cf020, + 0x21bda: 0x6c0c7c20, + 0x21bdc: 0x6c22e220, 0x21bdd: 0x6c2d7e20, 0x21bde: 0x6c93fc20, 0x21bdf: 0x6ca64e20, + 0x21be0: 0x6d0dda20, 0x21be1: 0x6c7fbc20, + 0x21be4: 0x6c415620, 0x21be5: 0x6c1eb420, + 0x21be9: 0x6c0a8820, 0x21bea: 0x6d40ea20, 0x21beb: 0x6c5c6620, + 0x21bed: 0x6c7f4220, 0x21bee: 0x6cfbba20, 0x21bef: 0x6c3bfc20, + 0x21bf0: 0x6c520220, + 0x21bf9: 0x6d124020, 0x21bfa: 0x6d2e3220, + 0x21bfc: 0x6ca56620, 0x21bfe: 0x6c95d020, + // Block 0x870, offset 0x21c00 + 0x21c00: 0x6d25d620, 0x21c02: 0x6ca5ac20, + 0x21c09: 0x6cc58220, + 0x21c1c: 0x6c43e820, 0x21c1e: 0x6c65a820, 0x21c1f: 0x6cb2b420, + 0x21c23: 0x6c0d1620, + 0x21c26: 0x6c66d020, + 0x21c29: 0x6c0e2e20, + 0x21c2f: 0x6c9d1820, + 0x21c30: 0x6c563420, + 0x21c34: 0x6c2df220, 0x21c36: 0x6d1e8c20, 0x21c37: 0x6d108c20, + 0x21c38: 0x6c07d020, 0x21c3a: 0x6c189820, 0x21c3b: 0x6c5e8c20, + 0x21c3d: 0x6d108e20, + // Block 0x871, offset 0x21c40 + 0x21c47: 0x6c491020, + 0x21c48: 0x6d0e5e20, + 0x21c55: 0x6c1bc820, 0x21c57: 0x6ccc3a20, + 0x21c58: 0x6d0d3820, 0x21c59: 0x6d165e20, 0x21c5a: 0x6d166020, 0x21c5b: 0x6c17fc20, + 0x21c5e: 0x6c4e8220, 0x21c5f: 0x6c597420, + 0x21c64: 0x6cd71020, 0x21c65: 0x6cdc2220, 0x21c66: 0x6cc56820, 0x21c67: 0x6cdfcc20, + 0x21c68: 0x6d34e420, 0x21c6a: 0x6c391e20, 0x21c6b: 0x6c3cc620, + 0x21c70: 0x6cdfce20, 0x21c72: 0x6c9c3620, 0x21c73: 0x6cafb620, + 0x21c74: 0x6c106820, 0x21c75: 0x6ca30e20, 0x21c76: 0x6ce48220, 0x21c77: 0x6c036620, + 0x21c78: 0x6d16b020, + // Block 0x872, offset 0x21c80 + 0x21c82: 0x6d0d4820, + 0x21c84: 0x6ce54c20, 0x21c86: 0x6d10ce20, 0x21c87: 0x6cd04c20, + 0x21c88: 0x6c77dc20, 0x21c89: 0x6ce72420, 0x21c8b: 0x6d084420, + 0x21c93: 0x6d202820, + 0x21c95: 0x6c043a20, + 0x21c99: 0x6cf9a220, 0x21c9a: 0x6c938420, 0x21c9b: 0x6c7dce20, + 0x21c9c: 0x6d29d220, 0x21c9d: 0x6cc02c20, + 0x21ca0: 0x6c243020, 0x21ca1: 0x6d416a20, 0x21ca2: 0x6c90e020, + 0x21ca4: 0x6cf9a420, + 0x21caf: 0x6ccfca20, + 0x21cb2: 0x6cb43020, + 0x21cb4: 0x6c6da620, 0x21cb5: 0x6cbaae20, 0x21cb6: 0x6d175820, + 0x21cb8: 0x6ca81420, 0x21cb9: 0x6c32fc20, 0x21cbb: 0x6c6ab420, + 0x21cbc: 0x6cdc3820, 0x21cbd: 0x6d2e5820, 0x21cbe: 0x6c23e420, + // Block 0x873, offset 0x21cc0 + 0x21cc1: 0x6c07e420, 0x21cc2: 0x6c491220, 0x21cc3: 0x6ccf2a20, + 0x21cc5: 0x6c6cfe20, 0x21cc6: 0x6c2c3e20, + 0x21cd1: 0x6c27d220, 0x21cd3: 0x6ca3a220, + 0x21cd5: 0x6ca9fc20, 0x21cd7: 0x6c601820, + 0x21cd8: 0x6d0c8220, 0x21cda: 0x6caa2020, + 0x21cdc: 0x6c325a20, 0x21cdd: 0x6cf09020, 0x21cde: 0x6cb0f420, + 0x21ce2: 0x6c555a20, + 0x21ce4: 0x6c644020, 0x21ce5: 0x6d12ee20, 0x21ce6: 0x6c759220, 0x21ce7: 0x6c7f9c20, + 0x21ce8: 0x6c7e7420, 0x21ce9: 0x6d19de20, + 0x21ced: 0x6ce9a220, + 0x21cf5: 0x6ca4f620, + 0x21cfa: 0x6d411c20, + 0x21cff: 0x6c96c220, + // Block 0x874, offset 0x21d00 + 0x21d00: 0x6cd7f020, 0x21d01: 0x6d365420, + 0x21d04: 0x6c5ac020, 0x21d05: 0x6d3c8e20, 0x21d07: 0x6c5bd820, + 0x21d0d: 0x6c1e8c20, 0x21d0f: 0x6c182420, + 0x21d12: 0x6d04da20, 0x21d13: 0x6c7fa220, + 0x21d15: 0x6c232620, 0x21d16: 0x6cd0bc20, 0x21d17: 0x6ca13c20, + 0x21d18: 0x6d140220, 0x21d19: 0x6d111a20, 0x21d1a: 0x6cf7fa20, 0x21d1b: 0x6d419020, + 0x21d1c: 0x6c0e2820, + 0x21d27: 0x6d216c20, + 0x21d29: 0x6c927e20, + 0x21d2e: 0x6ce9b620, 0x21d2f: 0x6ceffe20, + 0x21d31: 0x6c3b8820, 0x21d32: 0x6cd06c20, + 0x21d3b: 0x6c8a0e20, + // Block 0x875, offset 0x21d40 + 0x21d42: 0x6cd56a20, 0x21d43: 0x6c284220, + 0x21d44: 0x6c732620, 0x21d45: 0x6d21a020, 0x21d46: 0x6d034a20, 0x21d47: 0x6d114220, + 0x21d48: 0x6cda5820, + 0x21d52: 0x6c5d8020, + 0x21d54: 0x6cb92220, + 0x21d5a: 0x6c967c20, + 0x21d5d: 0x6c767020, + 0x21d61: 0x6c91e620, 0x21d63: 0x6d1ebc20, + 0x21d6e: 0x6cfd2e20, + 0x21d79: 0x6cf40620, 0x21d7b: 0x6d1b2020, + 0x21d7c: 0x6cf72c20, 0x21d7f: 0x6d2d0820, + // Block 0x876, offset 0x21d80 + 0x21d80: 0x6d027020, + 0x21d84: 0x6cc1fa20, + 0x21d88: 0x6c84be20, + 0x21d8d: 0x6cb95820, + 0x21d94: 0x6c8dd020, 0x21d95: 0x6c947820, + 0x21d9a: 0x6c14b220, + 0x21da6: 0x6d334420, + 0x21da8: 0x6d0c8420, + 0x21db2: 0x6d1b3820, 0x21db3: 0x6c7c5c20, + 0x21db7: 0x6cc0d220, + 0x21db9: 0x6c3dd820, 0x21dbb: 0x6d22d420, + // Block 0x877, offset 0x21dc0 + 0x21dc1: 0x6cb57e20, + 0x21dc6: 0x6cb75620, 0x21dc7: 0x6c61a620, + 0x21dc8: 0x6d24ce20, + 0x21dce: 0x6c434420, 0x21dcf: 0x6c734820, + 0x21dd1: 0x6cb5a020, 0x21dd3: 0x6c411020, + 0x21dd5: 0x6cc37220, + 0x21dda: 0x6cf09220, + 0x21de7: 0x6d368620, + 0x21deb: 0x6c65ba20, + 0x21ded: 0x6cd8d620, + 0x21df0: 0x6d188c20, 0x21df1: 0x6cb91c20, + 0x21dfc: 0x6c856220, 0x21dff: 0x6d29ce20, + // Block 0x878, offset 0x21e00 + 0x21e00: 0x6d168020, 0x21e02: 0x6c110620, 0x21e03: 0x6d168220, + 0x21e04: 0x6c437220, 0x21e06: 0x6c2e6e20, + 0x21e08: 0x6d33a420, 0x21e09: 0x6d16ec20, 0x21e0b: 0x6d28fa20, + 0x21e0c: 0x6c275220, 0x21e0e: 0x6cdab220, + 0x21e14: 0x6c6b4420, 0x21e15: 0x6c193820, 0x21e16: 0x6cc1fc20, + 0x21e18: 0x6c4e7820, 0x21e19: 0x6cfb1e20, + 0x21e20: 0x6cc2ae20, 0x21e21: 0x6c6a5620, + 0x21e25: 0x6c733820, + 0x21e2a: 0x6c285c20, + 0x21e2d: 0x6c6c2420, + 0x21e34: 0x6c0da820, 0x21e35: 0x6c551a20, + 0x21e39: 0x6c73da20, 0x21e3b: 0x6d20b020, + // Block 0x879, offset 0x21e40 + 0x21e43: 0x6c84fa20, + 0x21e44: 0x6cbb0420, 0x21e45: 0x6cd70620, 0x21e46: 0x6c7a2420, + 0x21e48: 0x6d31b620, + 0x21e4d: 0x6c3de820, 0x21e4e: 0x6ccfac20, + 0x21e52: 0x6c20c020, + 0x21e55: 0x6ce72620, 0x21e57: 0x6d16ee20, + 0x21e59: 0x6d0f9220, + 0x21e5c: 0x6ceafa20, 0x21e5d: 0x6d385e20, 0x21e5e: 0x6c5ff220, + 0x21e64: 0x6d0a7a20, 0x21e66: 0x6cd05220, 0x21e67: 0x6d078820, + 0x21e6d: 0x6c8e4820, 0x21e6e: 0x6d24dc20, 0x21e6f: 0x6c554220, + 0x21e70: 0x6d334820, 0x21e73: 0x6cae6620, + 0x21e77: 0x6c742220, + // Block 0x87a, offset 0x21e80 + 0x21e82: 0x6d362020, 0x21e83: 0x6cb0f620, + 0x21e84: 0x6d261820, 0x21e86: 0x6c649a20, + 0x21e8a: 0x6cad0220, + 0x21e8e: 0x6d3bca20, + 0x21e90: 0x6cfb6e20, 0x21e92: 0x6c080220, + 0x21e94: 0x6c232820, 0x21e96: 0x6ca13e20, + 0x21e9a: 0x6c4c7420, + 0x21e9e: 0x6c1a3420, 0x21e9f: 0x6cbb9c20, + 0x21ea6: 0x6c0a4a20, + 0x21ea9: 0x6cbb4820, 0x21eab: 0x6d38aa20, + 0x21eb2: 0x6c38d020, 0x21eb3: 0x6c0cc420, + 0x21ebe: 0x6c0fa020, 0x21ebf: 0x6cc73220, + // Block 0x87b, offset 0x21ec0 + 0x21ec5: 0x6c2f8820, 0x21ec6: 0x6cc32e20, 0x21ec7: 0x6c703c20, + 0x21ec8: 0x6d117420, + 0x21ed3: 0x6cf98620, + 0x21ed6: 0x6d2a3e20, + 0x21edd: 0x6c27c820, 0x21edf: 0x6cf44420, + 0x21ee0: 0x6ceb1420, 0x21ee2: 0x6c54c820, + 0x21ee7: 0x6cf64620, + 0x21eec: 0x6c7f1a20, 0x21eee: 0x6c3a1620, + 0x21ef9: 0x6c55ec20, + // Block 0x87c, offset 0x21f00 + 0x21f06: 0x6cfa7220, + 0x21f09: 0x6ccd2c20, + 0x21f0d: 0x6c3a8420, + 0x21f10: 0x6c261820, 0x21f12: 0x6c3e3220, + 0x21f14: 0x6c1f3020, + 0x21f1d: 0x6c2fd020, 0x21f1e: 0x6c807020, + 0x21f29: 0x6cf7fc20, + 0x21f2f: 0x6c0c1420, + 0x21f30: 0x6d23e820, 0x21f31: 0x6cdc6e20, 0x21f32: 0x6cf80c20, + 0x21f37: 0x6cb3e620, + 0x21f3e: 0x6c697c20, + // Block 0x87d, offset 0x21f40 + 0x21f40: 0x6d166420, 0x21f43: 0x6cecb820, + 0x21f44: 0x6c611e20, 0x21f46: 0x6cecc620, 0x21f47: 0x6ce9f220, + 0x21f4b: 0x6c021020, + 0x21f4d: 0x6ce45820, 0x21f4e: 0x6c1b0020, + 0x21f52: 0x6cc46220, + 0x21f54: 0x6cc96820, 0x21f55: 0x6d1a2c20, 0x21f56: 0x6caf3420, 0x21f57: 0x6c228e20, + 0x21f58: 0x6ce71a20, 0x21f59: 0x6d1ace20, + 0x21f5c: 0x6c43c820, 0x21f5d: 0x6ce55020, 0x21f5e: 0x6d329620, 0x21f5f: 0x6d390c20, + 0x21f61: 0x6d149820, 0x21f62: 0x6c7ae420, 0x21f63: 0x6cd90c20, + 0x21f67: 0x6c2c2820, + 0x21f6c: 0x6d008820, 0x21f6e: 0x6cfe9e20, 0x21f6f: 0x6c4a1c20, + 0x21f70: 0x6ceb7420, 0x21f71: 0x6c3c3620, 0x21f72: 0x6cf3b420, + 0x21f75: 0x6d053220, + 0x21f7f: 0x6d1f1620, + // Block 0x87e, offset 0x21f80 + 0x21f81: 0x6c8ce020, 0x21f82: 0x6d0e6020, + 0x21f85: 0x6c2ff620, 0x21f86: 0x6cb77e20, 0x21f87: 0x6ce21a20, + 0x21f88: 0x6c4dfc20, 0x21f8a: 0x6c1b1c20, 0x21f8b: 0x6cd91820, + 0x21f91: 0x6cc35820, + 0x21f94: 0x6c4ea820, + 0x21f9f: 0x6cc77820, + 0x21fa0: 0x6cb78e20, 0x21fa1: 0x6c762c20, 0x21fa2: 0x6d211e20, 0x21fa3: 0x6c139a20, + 0x21fa4: 0x6c1a8220, 0x21fa5: 0x6d233a20, 0x21fa7: 0x6c0e2020, + 0x21fa9: 0x6c231220, 0x21faa: 0x6d39a420, + 0x21fac: 0x6d235420, + 0x21fb1: 0x6c744a20, 0x21fb2: 0x6c8f3620, 0x21fb3: 0x6ccab220, + 0x21fb4: 0x6d236820, + // Block 0x87f, offset 0x21fc0 + 0x21fc5: 0x6cd66820, + 0x21fcb: 0x6d262020, + 0x21fce: 0x6d2eba20, + 0x21fd1: 0x6cd66a20, 0x21fd3: 0x6c1ee420, + 0x21fd4: 0x6d2ec620, 0x21fd5: 0x6cca2020, 0x21fd6: 0x6cfabe20, + 0x21fd8: 0x6c24d820, 0x21fd9: 0x6c9bde20, 0x21fda: 0x6c2b7c20, + 0x21fde: 0x6d368820, 0x21fdf: 0x6c02de20, + 0x21fe6: 0x6d04e020, + 0x21fe8: 0x6cb11e20, 0x21fea: 0x6c69bc20, 0x21feb: 0x6c7b6c20, + 0x21fec: 0x6cc98620, 0x21fed: 0x6cfcf420, 0x21fee: 0x6d2cda20, 0x21fef: 0x6c2d7820, + 0x21ff7: 0x6d154420, + 0x21ffa: 0x6c5c2e20, 0x21ffb: 0x6ccda620, + // Block 0x880, offset 0x22000 + 0x22004: 0x6c1d2220, 0x22005: 0x6d156220, 0x22006: 0x6d021220, 0x22007: 0x6d36dc20, + 0x22008: 0x6ce5e020, 0x2200a: 0x6cb26c20, 0x2200b: 0x6cfbb020, + 0x2200e: 0x6cfadc20, 0x2200f: 0x6cdb4c20, + 0x22011: 0x6c24a020, + 0x22017: 0x6cd97220, + 0x2201b: 0x6c522820, + 0x2201d: 0x6cfd3a20, 0x2201f: 0x6d1f8e20, + 0x22021: 0x6d246420, + 0x22024: 0x6cdf5220, 0x22026: 0x6c751820, 0x22027: 0x6ca48220, + 0x22029: 0x6c2cba20, 0x2202b: 0x6d164820, + 0x2202c: 0x6c090620, + 0x22033: 0x6d056220, + 0x22034: 0x6d166820, 0x22035: 0x6cc81020, 0x22037: 0x6c455a20, + 0x2203a: 0x6d166a20, + 0x2203f: 0x6d356e20, + // Block 0x881, offset 0x22040 + 0x22040: 0x6d02a420, 0x22042: 0x6c617820, + 0x22044: 0x6cfa2c20, + 0x22048: 0x6d2f4e20, 0x22049: 0x6ca54620, 0x2204a: 0x6d015620, + 0x2204e: 0x6d168620, + 0x2206b: 0x6c3f3420, + 0x2206d: 0x6ccf3420, 0x2206f: 0x6d253c20, + 0x22070: 0x6c390420, 0x22072: 0x6c3d3c20, 0x22073: 0x6cf4a820, + 0x22074: 0x6cf57c20, 0x22075: 0x6c539c20, + 0x22079: 0x6c618220, 0x2207a: 0x6c170420, + 0x2207f: 0x6ca0ca20, + // Block 0x882, offset 0x22080 + 0x22080: 0x6cae0820, 0x22083: 0x6ca20e20, + 0x22084: 0x6cc00420, 0x22085: 0x6c994a20, 0x22087: 0x6c268020, + 0x22089: 0x6cf98c20, 0x2208a: 0x6ccfae20, 0x2208b: 0x6ce26c20, + 0x2208c: 0x6c530220, 0x2208d: 0x6c093620, + 0x2209d: 0x6ca62620, 0x2209f: 0x6cbbd220, + 0x220a7: 0x6cc84e20, + 0x220b8: 0x6c67d820, 0x220b9: 0x6c138420, 0x220ba: 0x6c9ce220, + 0x220bd: 0x6d16f020, 0x220bf: 0x6cdd0a20, + // Block 0x883, offset 0x220c0 + 0x220c1: 0x6cf4c220, 0x220c2: 0x6d078420, + 0x220c5: 0x6cf76c20, 0x220c7: 0x6d15d020, + 0x220d0: 0x6ca49a20, 0x220d3: 0x6cf07820, + 0x220ee: 0x6c770220, + 0x220f1: 0x6c906020, 0x220f2: 0x6c938620, 0x220f3: 0x6d3c2a20, + 0x220fa: 0x6d35b420, + 0x220fc: 0x6d042220, 0x220fe: 0x6c44f820, 0x220ff: 0x6c6ce620, + // Block 0x884, offset 0x22100 + 0x22100: 0x6cfca420, 0x22101: 0x6c61c820, 0x22102: 0x6c261a20, + 0x22104: 0x6c815020, 0x22105: 0x6c3bb820, 0x22106: 0x6c722a20, + 0x2210b: 0x6c9eb220, + 0x2210c: 0x6cf9a620, + 0x22111: 0x6cda8c20, + 0x22128: 0x6d35b620, 0x2212a: 0x6c567e20, 0x2212b: 0x6c79e220, + 0x2212d: 0x6cdd5820, 0x2212e: 0x6ca68e20, + 0x2213a: 0x6ce28c20, 0x2213b: 0x6d3ace20, + // Block 0x885, offset 0x22140 + 0x22141: 0x6c269820, 0x22143: 0x6cc04420, + 0x22144: 0x6d0b9820, 0x22146: 0x6cfb4820, + 0x22149: 0x6ca58820, + 0x2214d: 0x6d351420, 0x2214e: 0x6c0ce620, + 0x22152: 0x6c1d3a20, 0x22153: 0x6c7f9820, + 0x22154: 0x6c2ff820, 0x22155: 0x6cc43a20, 0x22156: 0x6cfe2e20, + 0x22158: 0x6cff8020, 0x22159: 0x6ced0620, 0x2215a: 0x6cc81420, 0x2215b: 0x6cee5020, + 0x2215c: 0x6ca69820, 0x2215e: 0x6c03fe20, 0x2215f: 0x6d0b9a20, + 0x22165: 0x6cd7e220, 0x22166: 0x6d1ad820, + 0x22168: 0x6d231220, + 0x2216e: 0x6c83b820, 0x2216f: 0x6c5dc020, + // Block 0x886, offset 0x22180 + 0x22197: 0x6c056820, + 0x221a3: 0x6cf5e620, + 0x221a5: 0x6c6f6a20, + 0x221a8: 0x6d01ac20, 0x221a9: 0x6cb8e020, 0x221aa: 0x6caaf820, 0x221ab: 0x6d040020, + 0x221ac: 0x6c344e20, 0x221ad: 0x6c614020, 0x221ae: 0x6cf44a20, 0x221af: 0x6ca21220, + 0x221b0: 0x6d0e6e20, 0x221b1: 0x6cb79020, 0x221b2: 0x6ca2de20, 0x221b3: 0x6c1c1e20, + 0x221b4: 0x6c540220, 0x221b6: 0x6ccaf220, + 0x221b8: 0x6ca4aa20, 0x221bb: 0x6c1a7020, + 0x221bc: 0x6c1a7220, 0x221bd: 0x6c7cd020, 0x221bf: 0x6c644220, + // Block 0x887, offset 0x221c0 + 0x221c0: 0x6ce8ac20, 0x221c2: 0x6c319a20, + 0x221c5: 0x6cf9c220, 0x221c6: 0x6d382e20, 0x221c7: 0x6c5dcc20, + 0x221c8: 0x6c1d1620, 0x221c9: 0x6c26a420, + 0x221cc: 0x6c997c20, 0x221cd: 0x6d120620, + 0x221d3: 0x6c72f220, + 0x221ec: 0x6cd38420, 0x221ef: 0x6d1a6420, + 0x221f3: 0x6c478a20, + 0x221f4: 0x6cf4ec20, + 0x221f8: 0x6c4cee20, 0x221f9: 0x6ce3f620, 0x221fb: 0x6c52a220, + // Block 0x888, offset 0x22200 + 0x22207: 0x6cc54e20, + 0x22209: 0x6d14f420, 0x2220b: 0x6cea7c20, + 0x2220f: 0x6cbf3c20, + 0x22210: 0x6c4d6e20, 0x22212: 0x6cb79e20, + 0x22215: 0x6c5dd820, 0x22216: 0x6ce40020, 0x22217: 0x6caf7020, + 0x2221a: 0x6c451020, + 0x2221c: 0x6d01c420, 0x2221e: 0x6c9d5620, 0x2221f: 0x6c434c20, + 0x22220: 0x6cddf020, 0x22221: 0x6cfdec20, 0x22223: 0x6cd4e620, + 0x22226: 0x6c3e9820, + 0x2222c: 0x6d3b7e20, 0x2222d: 0x6c8f3820, + // Block 0x889, offset 0x22240 + 0x22245: 0x6d1f4420, + 0x2224a: 0x6c1a7820, 0x2224b: 0x6c330620, + 0x22262: 0x6c841420, 0x22263: 0x6d105820, + 0x22264: 0x6c841620, 0x22267: 0x6c91c820, + 0x22268: 0x6ca24e20, 0x22269: 0x6cdc5220, 0x2226a: 0x6c00b620, + 0x2226d: 0x6c79f420, 0x2226f: 0x6d306a20, + 0x22270: 0x6c00b820, 0x22271: 0x6ce2a620, 0x22273: 0x6c93ea20, + 0x22274: 0x6ce9ac20, 0x22275: 0x6c088020, + 0x2227e: 0x6c5bf620, 0x2227f: 0x6c588a20, + // Block 0x88a, offset 0x22280 + 0x2229b: 0x6c7e0e20, + 0x2229d: 0x6d02e020, + 0x222a1: 0x6ccaf420, + 0x222ab: 0x6cd5f020, + 0x222ac: 0x6cc3da20, 0x222ad: 0x6c035620, 0x222ae: 0x6cea0620, + 0x222b2: 0x6c403220, 0x222b3: 0x6c0cba20, + 0x222b5: 0x6ce17e20, 0x222b7: 0x6cfe4c20, + 0x222b9: 0x6cd81420, 0x222ba: 0x6c0f4020, + 0x222bc: 0x6c970020, 0x222bd: 0x6c298020, 0x222bf: 0x6c4b6420, + // Block 0x88b, offset 0x222c0 + 0x222c0: 0x6c522020, 0x222c1: 0x6cf69a20, 0x222c2: 0x6c298220, 0x222c3: 0x6d184e20, + 0x222c5: 0x6c088420, 0x222c7: 0x6c472c20, + 0x222c8: 0x6c255820, 0x222c9: 0x6ccb4420, + 0x222cd: 0x6c441e20, 0x222ce: 0x6d23c220, 0x222cf: 0x6ca2fa20, + 0x222d1: 0x6c865620, 0x222d2: 0x6d36ac20, + 0x222f0: 0x6d2fd420, + 0x222f4: 0x6c5f1220, 0x222f5: 0x6cc87220, + 0x222f9: 0x6c1d5820, + // Block 0x88c, offset 0x22300 + 0x22302: 0x6c6b1820, + 0x2230c: 0x6c172020, 0x2230d: 0x6d307a20, + 0x22312: 0x6cdb1020, 0x22313: 0x6d1db020, + 0x22316: 0x6cb7d420, 0x22317: 0x6d3d9820, + 0x2231a: 0x6c769620, + 0x2231c: 0x6d133c20, 0x2231e: 0x6cb7d620, + 0x22339: 0x6d04a420, + // Block 0x88d, offset 0x22340 + 0x22349: 0x6d141420, 0x2234a: 0x6c1e3020, + 0x2234e: 0x6ce98020, 0x2234f: 0x6c00da20, + 0x22350: 0x6cb1f220, 0x22353: 0x6c8b3620, + 0x22354: 0x6c9dd820, 0x22355: 0x6c00dc20, 0x22357: 0x6ca0ae20, + 0x22358: 0x6cf0e220, 0x22359: 0x6d1d5220, 0x2235a: 0x6ca65020, + 0x2235e: 0x6c0f7420, + 0x22360: 0x6c8f4620, + 0x22373: 0x6cc8e620, + 0x2237b: 0x6c936620, + 0x2237c: 0x6c140c20, 0x2237f: 0x6c1f8620, + // Block 0x88e, offset 0x22380 + 0x22381: 0x6ccb0220, 0x22382: 0x6c847020, + 0x22384: 0x6cd94620, 0x22386: 0x6c86c620, + 0x2238b: 0x6cf90420, + 0x2238d: 0x6d0c3e20, 0x2238e: 0x6c25ce20, + 0x22390: 0x6c8eb620, + 0x22398: 0x6c9b6c20, 0x2239a: 0x6d2e8a20, + 0x223a4: 0x6d3c4c20, 0x223a7: 0x6c9ea620, + 0x223a9: 0x6c86f220, 0x223ab: 0x6c71da20, + 0x223af: 0x6d025220, + 0x223b0: 0x6d025420, 0x223b1: 0x6c904220, 0x223b2: 0x6c8fc220, + // Block 0x88f, offset 0x223c0 + 0x223c2: 0x6ce2c620, 0x223c3: 0x6d3b3820, + 0x223cb: 0x6c155220, + 0x223cc: 0x6cfc4420, 0x223cf: 0x6d1cc220, + 0x223d0: 0x6cae2a20, + 0x223d8: 0x6d012220, 0x223da: 0x6c69dc20, + 0x223de: 0x6c1cf820, + 0x223f3: 0x6c50ae20, + 0x223fd: 0x6cea8420, + // Block 0x890, offset 0x22400 + 0x22405: 0x6c53b220, + 0x22408: 0x6c97b020, 0x2240a: 0x6c6c7a20, + 0x2240c: 0x6cc17020, 0x2240d: 0x6c30d420, 0x2240e: 0x6cbff820, 0x2240f: 0x6d28ee20, + 0x22411: 0x6cd0d420, 0x22412: 0x6d28f020, + 0x22415: 0x6d15ba20, + 0x2241a: 0x6c578020, + 0x2241f: 0x6c76a220, + 0x22430: 0x6d268e20, 0x22431: 0x6ca68420, 0x22432: 0x6cd7d620, + 0x22434: 0x6cf2aa20, + 0x22438: 0x6c118e20, 0x2243a: 0x6c647c20, + 0x2243c: 0x6c9ecc20, 0x2243d: 0x6ccea020, 0x2243f: 0x6cc70820, + // Block 0x891, offset 0x22440 + 0x22440: 0x6c419220, + 0x22445: 0x6cbb0a20, 0x22447: 0x6cd52a20, + 0x22448: 0x6d3d5820, + 0x2244f: 0x6cd1bc20, + 0x22451: 0x6ce3f820, + 0x22456: 0x6d2c3620, 0x22457: 0x6d2d7e20, + 0x2245d: 0x6c3bdc20, 0x2245e: 0x6c9eda20, + 0x22460: 0x6d2b5220, + 0x22464: 0x6d368a20, 0x22465: 0x6cb90020, 0x22466: 0x6c4ede20, 0x22467: 0x6c440e20, + 0x2246e: 0x6c119e20, + 0x22470: 0x6c4c7820, 0x22471: 0x6c685e20, 0x22473: 0x6d1da220, + 0x22474: 0x6c026820, + 0x2247b: 0x6d2c4620, + 0x2247d: 0x6cf8c420, + // Block 0x892, offset 0x22480 + 0x22481: 0x6d05d220, 0x22482: 0x6cf46620, + 0x2248f: 0x6c74b820, + 0x22490: 0x6c5f2a20, 0x22492: 0x6c1c6a20, + 0x22494: 0x6ced5420, 0x22496: 0x6c9ef220, 0x22497: 0x6d2b6420, + 0x2249c: 0x6c6b6e20, 0x2249d: 0x6cd29220, 0x2249f: 0x6cf72e20, + 0x224a1: 0x6c36e220, + 0x224a5: 0x6c564220, 0x224a6: 0x6c564a20, + 0x224a8: 0x6c857020, 0x224ab: 0x6c1f0820, + 0x224ae: 0x6d13c820, 0x224af: 0x6c992c20, + 0x224b0: 0x6d056c20, 0x224b1: 0x6d379820, 0x224b3: 0x6d16b820, + 0x224ba: 0x6c89de20, + 0x224bf: 0x6c647820, + // Block 0x893, offset 0x224c0 + 0x224c0: 0x6c656e20, 0x224c1: 0x6c70fa20, + 0x224c4: 0x6d3abc20, + 0x224c8: 0x6cf43a20, + 0x224cf: 0x6c78a420, + 0x224d0: 0x6c786020, 0x224d1: 0x6c860e20, 0x224d2: 0x6c08dc20, 0x224d3: 0x6c43ec20, + 0x224d5: 0x6d059820, 0x224d6: 0x6ccbfa20, 0x224d7: 0x6c8d1c20, + 0x224d8: 0x6c781220, + 0x224de: 0x6c0f4220, 0x224df: 0x6c0b0820, + 0x224e0: 0x6cd68820, 0x224e1: 0x6cb66e20, 0x224e2: 0x6ccde420, + 0x224e6: 0x6c5e6420, + 0x224e8: 0x6cbc1c20, + 0x224ee: 0x6d166c20, 0x224ef: 0x6c73d020, + 0x224f0: 0x6d2efe20, 0x224f2: 0x6d031620, + 0x224f7: 0x6cea9a20, + 0x224f8: 0x6c4d5020, 0x224f9: 0x6cfa2e20, 0x224fb: 0x6ceae020, + 0x224fc: 0x6d145620, + // Block 0x894, offset 0x22500 + 0x22503: 0x6c242c20, + 0x22507: 0x6c674620, + 0x22508: 0x6ca3de20, 0x2250b: 0x6caf0020, + 0x2250d: 0x6c6a7020, 0x2250e: 0x6d08d820, 0x2250f: 0x6c552020, + 0x22525: 0x6d1f9e20, 0x22526: 0x6caa4c20, 0x22527: 0x6d12c220, + 0x2252a: 0x6d1b3a20, + 0x2252c: 0x6c799420, + 0x22536: 0x6cfe8420, 0x22537: 0x6cfd6220, + 0x2253c: 0x6ca49620, 0x2253e: 0x6d2f2420, + // Block 0x895, offset 0x22540 + 0x22550: 0x6c6a7c20, 0x22553: 0x6caa5020, + 0x22554: 0x6ccd7020, + 0x22562: 0x6c63a020, + 0x22567: 0x6d38dc20, + 0x22568: 0x6cc6fe20, 0x2256b: 0x6c922220, + 0x2256c: 0x6cc96e20, 0x2256d: 0x6caa6020, 0x2256f: 0x6c0ec420, + 0x22570: 0x6d302220, 0x22572: 0x6cbdca20, + 0x22574: 0x6c21f620, 0x22575: 0x6d40ac20, 0x22577: 0x6cf2ac20, + 0x22578: 0x6cf43620, 0x2257b: 0x6ca7e020, + 0x2257f: 0x6cfa8820, + // Block 0x896, offset 0x22580 + 0x22580: 0x6c531220, + 0x225ab: 0x6ce6e820, + 0x225ac: 0x6c6c8a20, + 0x225b1: 0x6c6aa420, 0x225b2: 0x6c51c020, 0x225b3: 0x6ce84c20, + 0x225b4: 0x6d303a20, 0x225b5: 0x6cb1ec20, 0x225b6: 0x6c6ce820, 0x225b7: 0x6ca44420, + 0x225bc: 0x6c33e820, 0x225be: 0x6cf5be20, 0x225bf: 0x6d018020, + // Block 0x897, offset 0x225c0 + 0x225c1: 0x6cf86c20, 0x225c2: 0x6c815220, 0x225c3: 0x6c32ac20, + 0x225c4: 0x6c61ca20, 0x225c5: 0x6c138a20, 0x225c6: 0x6c1d6620, + 0x225c8: 0x6c427020, + 0x225ce: 0x6cfdb820, 0x225cf: 0x6c29d620, + 0x225e5: 0x6c0b8e20, 0x225e6: 0x6cfea020, 0x225e7: 0x6d02c220, + // Block 0x898, offset 0x22600 + 0x22601: 0x6d224c20, 0x22602: 0x6cfb4a20, 0x22603: 0x6c83ba20, + 0x22604: 0x6cba0020, 0x22607: 0x6c9a5420, + 0x22609: 0x6cbb6c20, 0x2260a: 0x6d0b9e20, + 0x2260c: 0x6cb82a20, 0x2260d: 0x6cbf8a20, 0x2260f: 0x6c056a20, + 0x22610: 0x6d32b220, + 0x2261a: 0x6d2b4a20, 0x2261b: 0x6cd68e20, + 0x2261e: 0x6ccaf020, + // Block 0x899, offset 0x22640 + 0x22645: 0x6c923a20, + 0x22649: 0x6d009e20, 0x2264b: 0x6c3f5c20, + 0x2264c: 0x6d2d3a20, + 0x22669: 0x6d2b5020, 0x2266b: 0x6c32c220, + 0x2266d: 0x6c2ad620, 0x2266e: 0x6d233c20, + 0x22670: 0x6c93de20, 0x22672: 0x6ced8220, 0x22673: 0x6d090e20, + 0x22674: 0x6c68f420, 0x22675: 0x6d266420, 0x22676: 0x6d362420, 0x22677: 0x6cefc420, + 0x22679: 0x6c43ee20, 0x2267a: 0x6c71b420, + 0x2267c: 0x6d0d8420, 0x2267d: 0x6c262620, 0x2267e: 0x6c997e20, + // Block 0x89a, offset 0x22680 + 0x22686: 0x6c3e7820, 0x22687: 0x6c002820, + 0x2268a: 0x6d079e20, + 0x2268c: 0x6c427e20, 0x2268d: 0x6c013220, + 0x22692: 0x6c603620, + 0x22698: 0x6cafea20, 0x22699: 0x6d352820, + 0x2269c: 0x6caac020, + 0x226bf: 0x6cacbc20, + // Block 0x89b, offset 0x226c0 + 0x226c1: 0x6d14f620, + 0x226c4: 0x6c6ac820, 0x226c6: 0x6d3e3820, + 0x226c8: 0x6c644420, 0x226c9: 0x6cec6420, + 0x226cc: 0x6c644620, + 0x226df: 0x6c15c020, + 0x226e1: 0x6cdd7420, 0x226e2: 0x6cdd7620, 0x226e3: 0x6c605020, + 0x226e4: 0x6cd96420, 0x226e6: 0x6ce2f420, 0x226e7: 0x6caf7420, + 0x226e8: 0x6cb32c20, + 0x226ee: 0x6c9d5a20, + 0x226f4: 0x6d12fc20, 0x226f6: 0x6cbe1c20, 0x226f7: 0x6c6d1620, + 0x226fa: 0x6c73ae20, + 0x226fd: 0x6d24f420, 0x226fe: 0x6cc83e20, + // Block 0x89c, offset 0x22700 + 0x22714: 0x6c04fa20, + 0x22730: 0x6c0d3a20, + 0x22734: 0x6cf0ae20, 0x22735: 0x6d2a8820, 0x22736: 0x6cbcd020, 0x22737: 0x6cd9ce20, + 0x22738: 0x6c91ca20, + 0x2273c: 0x6c2ecc20, 0x2273d: 0x6c1fb820, 0x2273e: 0x6c09f620, 0x2273f: 0x6d3a1a20, + // Block 0x89d, offset 0x22740 + 0x22740: 0x6c966220, 0x22741: 0x6c3aba20, 0x22742: 0x6cb1cc20, 0x22743: 0x6d1b6620, + 0x22744: 0x6d08a220, 0x22746: 0x6c02e020, 0x22747: 0x6d3d7820, + 0x22748: 0x6d40c820, 0x2274b: 0x6c08ea20, + 0x22751: 0x6c812620, 0x22753: 0x6ce40820, + 0x22759: 0x6ce5c820, 0x2275a: 0x6c64c820, + 0x2275f: 0x6ce7c020, + 0x2277d: 0x6c343420, 0x2277e: 0x6c308420, + // Block 0x89e, offset 0x22780 + 0x22782: 0x6c0b4220, + 0x227a0: 0x6d36b020, 0x227a2: 0x6c3b8a20, + 0x227a6: 0x6c776a20, 0x227a7: 0x6d36b220, + 0x227a8: 0x6d2cfc20, 0x227a9: 0x6c0a1e20, 0x227aa: 0x6c7b6e20, + 0x227ac: 0x6c050220, 0x227ad: 0x6c73b820, 0x227ae: 0x6cc13420, + 0x227b0: 0x6cb51e20, 0x227b1: 0x6c824e20, 0x227b2: 0x6d00da20, 0x227b3: 0x6ce0ca20, + 0x227bc: 0x6cd9d420, 0x227be: 0x6c075020, + // Block 0x89f, offset 0x227c0 + 0x227c7: 0x6d106820, + 0x227c8: 0x6c65ce20, + 0x227e5: 0x6d2a8a20, + // Block 0x8a0, offset 0x22800 + 0x22800: 0x6d3b6a20, 0x22803: 0x6c38b820, + 0x22805: 0x6ccf2420, 0x22807: 0x6cbf5e20, + 0x22809: 0x6cb3a020, 0x2280b: 0x6ce60220, + 0x2280c: 0x6ccc1a20, 0x2280d: 0x6d28c820, + 0x22811: 0x6ca7ac20, 0x22812: 0x6c48fa20, 0x22813: 0x6c250a20, + 0x22821: 0x6cbc5e20, 0x22823: 0x6c2ee420, + 0x22833: 0x6cb1ee20, + 0x22834: 0x6c226a20, 0x22836: 0x6c058e20, + // Block 0x8a1, offset 0x22840 + 0x2284d: 0x6d1b8a20, + 0x22851: 0x6cfc3020, + 0x22854: 0x6d161820, 0x22855: 0x6c9e9e20, 0x22856: 0x6c32b220, 0x22857: 0x6d395620, + 0x22859: 0x6c798c20, + 0x22862: 0x6d2ee020, + 0x22876: 0x6c8eb820, + 0x22878: 0x6d355820, 0x22879: 0x6c15ee20, 0x2287a: 0x6c31ca20, 0x2287b: 0x6d25c020, + 0x2287e: 0x6cddd220, 0x2287f: 0x6c6b5820, + // Block 0x8a2, offset 0x22880 + 0x22880: 0x6c86c820, 0x22881: 0x6c460420, + 0x2288c: 0x6c054220, + 0x22897: 0x6c4c9220, + 0x22898: 0x6c8a3420, 0x22899: 0x6cd08220, + 0x228a3: 0x6ca7c020, + 0x228a5: 0x6c24bc20, 0x228a6: 0x6cf04c20, + 0x228a8: 0x6cead620, 0x228ab: 0x6cda6020, + 0x228ad: 0x6c8fc420, + 0x228b3: 0x6cff3820, + 0x228b4: 0x6d0df820, + // Block 0x8a3, offset 0x228c0 + 0x228c3: 0x6cbebe20, + 0x228cd: 0x6cf73020, 0x228cf: 0x6d21e220, + 0x228d1: 0x6d337220, 0x228d2: 0x6d027420, 0x228d3: 0x6c146e20, + 0x228d4: 0x6c3c0020, 0x228d6: 0x6c4c9c20, + 0x228d8: 0x6c6e3e20, 0x228d9: 0x6c808220, 0x228da: 0x6cfafe20, + 0x228dd: 0x6c8d8e20, + 0x228ee: 0x6c830020, + 0x228f2: 0x6c760220, 0x228f3: 0x6d002a20, + 0x228fc: 0x6d28d820, + // Block 0x8a4, offset 0x22900 + 0x22904: 0x6c493e20, 0x22905: 0x6cbd0820, 0x22906: 0x6c963e20, 0x22907: 0x6d124a20, + 0x22908: 0x6c945620, 0x22909: 0x6cdeee20, + 0x22911: 0x6c964020, + 0x2291e: 0x6c03a420, 0x2291f: 0x6c165420, + 0x22921: 0x6d3dec20, + 0x2292b: 0x6ce5d020, + 0x2292f: 0x6cecaa20, + 0x22930: 0x6c8dd420, + 0x22934: 0x6d24aa20, 0x22935: 0x6cb72c20, 0x22937: 0x6cb58020, + 0x2293c: 0x6c619420, 0x2293d: 0x6c0eb620, 0x2293f: 0x6cd1a420, + // Block 0x8a5, offset 0x22940 + 0x22940: 0x6c3f4a20, 0x22942: 0x6c4a4620, + 0x22945: 0x6c2d0e20, 0x22947: 0x6c4fa420, + 0x22949: 0x6c411220, 0x2294b: 0x6cb5c820, + 0x22953: 0x6c19fe20, + 0x22954: 0x6c5bc220, 0x22957: 0x6cf9cc20, + 0x22958: 0x6cd27020, 0x22959: 0x6d365820, 0x2295a: 0x6cb61420, + 0x2295c: 0x6c4d7420, 0x2295f: 0x6c692c20, + 0x22960: 0x6c867620, 0x22962: 0x6c8a7820, + 0x22964: 0x6cbba620, + 0x22968: 0x6cc99c20, 0x2296a: 0x6cb55220, 0x2296b: 0x6cd19620, + 0x2296e: 0x6c6a7220, + 0x22975: 0x6c06e420, 0x22976: 0x6c0aec20, 0x22977: 0x6c032420, + 0x22978: 0x6c755c20, 0x22979: 0x6caf3a20, + 0x2297c: 0x6c282220, 0x2297f: 0x6ce0e620, + // Block 0x8a6, offset 0x22980 + 0x22980: 0x6c7cca20, 0x22981: 0x6c7a2820, 0x22983: 0x6c79d020, + 0x22989: 0x6cd1a620, 0x2298a: 0x6cd1a820, 0x2298b: 0x6c5e9a20, + 0x2298c: 0x6c063620, + 0x22990: 0x6c785a20, 0x22991: 0x6c7b9020, + 0x22996: 0x6c9f9c20, + 0x22999: 0x6c89e020, 0x2299a: 0x6c35f220, 0x2299b: 0x6c43d820, + 0x2299f: 0x6cee0420, + 0x229a0: 0x6c344020, 0x229a3: 0x6cb85220, + 0x229a4: 0x6c573220, 0x229a6: 0x6c539e20, + 0x229a9: 0x6cae5e20, 0x229ab: 0x6c698c20, + 0x229b0: 0x6cc0f020, 0x229b1: 0x6d3f3c20, 0x229b2: 0x6d391820, 0x229b3: 0x6c7b9620, + 0x229b5: 0x6ccbd820, 0x229b7: 0x6c61cc20, + 0x229b8: 0x6cee6c20, 0x229b9: 0x6cb40820, 0x229ba: 0x6d090620, + 0x229bc: 0x6cce6620, + // Block 0x8a7, offset 0x229c0 + 0x229c2: 0x6c80b620, 0x229c3: 0x6d351620, + 0x229c4: 0x6ce6c620, 0x229c7: 0x6c26f020, + 0x229d5: 0x6d0faa20, 0x229d6: 0x6c6d0020, 0x229d7: 0x6d351820, + 0x229da: 0x6d3d5a20, + 0x229dc: 0x6d28b420, 0x229dd: 0x6c14f220, + 0x229e2: 0x6c998020, + 0x229e6: 0x6c797820, 0x229e7: 0x6d388420, + 0x229e8: 0x6c54ca20, 0x229e9: 0x6cae7220, + 0x229ed: 0x6c6ffc20, + 0x229f8: 0x6c21bc20, 0x229f9: 0x6c9fae20, + 0x229fe: 0x6cffec20, + // Block 0x8a8, offset 0x22a00 + 0x22a00: 0x6c322220, 0x22a01: 0x6cef1820, 0x22a03: 0x6c119a20, + 0x22a04: 0x6d214a20, 0x22a05: 0x6c326220, 0x22a06: 0x6c763620, 0x22a07: 0x6cb0a220, + 0x22a0a: 0x6c1a1a20, + 0x22a0e: 0x6c218020, + 0x22a10: 0x6cceb420, 0x22a11: 0x6d0d9e20, 0x22a12: 0x6c7b2820, + 0x22a14: 0x6d265020, + 0x22a26: 0x6cb61620, 0x22a27: 0x6d32e020, + 0x22a29: 0x6c78c220, 0x22a2a: 0x6cb61820, 0x22a2b: 0x6d354020, + 0x22a2c: 0x6c928420, + 0x22a31: 0x6caf7c20, 0x22a32: 0x6cab0420, 0x22a33: 0x6cad7c20, + 0x22a3a: 0x6c3a6020, + 0x22a3f: 0x6cf19c20, + // Block 0x8a9, offset 0x22a40 + 0x22a42: 0x6c9b2c20, + 0x22a48: 0x6ccd5620, + 0x22a4c: 0x6d04a020, 0x22a4e: 0x6c351020, 0x22a4f: 0x6c0c9220, + 0x22a5a: 0x6d1eb020, + 0x22a5c: 0x6c97f620, 0x22a5e: 0x6c8a7a20, + 0x22a61: 0x6d00ea20, 0x22a62: 0x6c949c20, 0x22a63: 0x6cbba820, + 0x22a64: 0x6c2ae620, 0x22a66: 0x6c1a3e20, 0x22a67: 0x6c1a4020, + 0x22a6d: 0x6c21d820, + 0x22a78: 0x6c131420, + // Block 0x8aa, offset 0x22a80 + 0x22a80: 0x6c825e20, 0x22a81: 0x6d2e1c20, 0x22a82: 0x6c853620, 0x22a83: 0x6c885e20, + 0x22a84: 0x6cc45820, + 0x22a8d: 0x6c18ee20, 0x22a8f: 0x6c1a4820, + 0x22a90: 0x6c473c20, 0x22a92: 0x6d403a20, 0x22a93: 0x6c1df420, + 0x22a94: 0x6c204420, + 0x22a9c: 0x6c835220, 0x22a9d: 0x6cd7a820, 0x22a9e: 0x6c941020, + 0x22aa3: 0x6c3f2420, + 0x22aa5: 0x6c871620, 0x22aa7: 0x6cca6020, + 0x22aab: 0x6cca0c20, + 0x22aaf: 0x6cc9b220, + 0x22ab3: 0x6ca8b020, + 0x22ab6: 0x6d413c20, 0x22ab7: 0x6c855020, + 0x22abb: 0x6cd58c20, + 0x22abe: 0x6c3f2a20, + // Block 0x8ab, offset 0x22ac0 + 0x22ac9: 0x6c094620, + 0x22acd: 0x6c2a0820, + 0x22ad2: 0x6cd1b220, + 0x22ad6: 0x6c422020, 0x22ad7: 0x6ce09e20, + 0x22adc: 0x6c97f820, 0x22adf: 0x6c842820, + 0x22ae2: 0x6c0a4c20, + 0x22ae6: 0x6cac7e20, + 0x22ae8: 0x6d1eca20, + 0x22aed: 0x6c6f5020, 0x22aef: 0x6c4c1220, + 0x22af0: 0x6c89dc20, 0x22af3: 0x6cf2de20, + 0x22af4: 0x6cb85420, 0x22af5: 0x6c30e820, 0x22af7: 0x6c8afa20, + 0x22af9: 0x6c68e020, 0x22afb: 0x6c8afc20, + // Block 0x8ac, offset 0x22b00 + 0x22b01: 0x6ce56020, + 0x22b04: 0x6c4c2620, 0x22b06: 0x6cacde20, 0x22b07: 0x6cbb8e20, + 0x22b09: 0x6c2b8a20, 0x22b0a: 0x6d284420, + 0x22b12: 0x6c821420, + 0x22b16: 0x6cd7cc20, 0x22b17: 0x6d02b020, + 0x22b1c: 0x6d02c420, 0x22b1d: 0x6cfe2620, 0x22b1e: 0x6c95ac20, + 0x22b24: 0x6c07e820, 0x22b25: 0x6ce55a20, + 0x22b2c: 0x6cffee20, 0x22b2e: 0x6c30b420, + 0x22b33: 0x6c296e20, + 0x22b34: 0x6ce67c20, 0x22b35: 0x6d3bcc20, + 0x22b3b: 0x6cab4620, + 0x22b3d: 0x6cf30e20, + // Block 0x8ad, offset 0x22b40 + 0x22b44: 0x6d02ee20, 0x22b45: 0x6cc87a20, + 0x22b48: 0x6d3dae20, 0x22b49: 0x6c299020, + 0x22b4d: 0x6c257420, + 0x22b51: 0x6d3dc820, + 0x22b57: 0x6c238620, + 0x22b58: 0x6c159220, + 0x22b5d: 0x6d100820, + 0x22b67: 0x6d0d5e20, + 0x22b73: 0x6d0d6820, + 0x22b75: 0x6d323620, + 0x22b7d: 0x6caade20, 0x22b7e: 0x6d0e7220, + // Block 0x8ae, offset 0x22b80 + 0x22b85: 0x6c39d820, + 0x22b89: 0x6d0da020, 0x22b8a: 0x6d214e20, + 0x22b8d: 0x6ce34020, 0x22b8e: 0x6c401a20, 0x22b8f: 0x6c07a020, + 0x22b91: 0x6d0db220, 0x22b93: 0x6c5ad220, + 0x22b99: 0x6c5a6220, + 0x22b9c: 0x6c4b7420, 0x22b9d: 0x6d0ece20, 0x22b9f: 0x6c55da20, + 0x22ba0: 0x6c0c3620, + 0x22ba7: 0x6cdcc420, + 0x22bae: 0x6d3f3020, 0x22baf: 0x6c618620, + 0x22bb0: 0x6c35ae20, 0x22bb1: 0x6c61ce20, 0x22bb2: 0x6c7ccc20, + 0x22bb4: 0x6c89b620, + 0x22bb8: 0x6c5dda20, 0x22bba: 0x6cef3a20, 0x22bbb: 0x6d3cea20, + 0x22bbf: 0x6ce6ae20, + // Block 0x8af, offset 0x22bc0 + 0x22bc3: 0x6d290e20, + 0x22bc4: 0x6d201020, + 0x22bc9: 0x6cc5c020, + 0x22bcd: 0x6c9e4e20, + 0x22bda: 0x6ca31020, + 0x22bdd: 0x6ce84220, 0x22bdf: 0x6c27be20, + 0x22be1: 0x6c73ec20, + 0x22be4: 0x6d056e20, 0x22be5: 0x6c2b1820, + 0x22bf0: 0x6cfe1a20, + 0x22bf7: 0x6d048a20, + 0x22bfa: 0x6d1fac20, 0x22bfb: 0x6c489620, + 0x22bfe: 0x6cf5a420, + // Block 0x8b0, offset 0x22c00 + 0x22c08: 0x6c51bc20, + 0x22c0d: 0x6c2f6c20, + 0x22c10: 0x6c914020, 0x22c12: 0x6d061a20, + 0x22c14: 0x6d391a20, 0x22c15: 0x6cfca820, 0x22c16: 0x6c598820, 0x22c17: 0x6c138c20, + 0x22c18: 0x6cd2c420, 0x22c19: 0x6c421820, 0x22c1a: 0x6caadc20, 0x22c1b: 0x6c01aa20, + 0x22c1f: 0x6d003c20, + 0x22c27: 0x6c502c20, + 0x22c32: 0x6cbd2a20, 0x22c33: 0x6c450620, + 0x22c34: 0x6ccce020, 0x22c35: 0x6c3e4c20, + 0x22c3d: 0x6d2b4c20, + // Block 0x8b1, offset 0x22c40 + 0x22c47: 0x6c287c20, + 0x22c56: 0x6c2d1420, 0x22c57: 0x6ccfdc20, + 0x22c59: 0x6d411820, + 0x22c62: 0x6c0ca620, + 0x22c66: 0x6c20d020, 0x22c67: 0x6d30f820, + 0x22c68: 0x6c276e20, 0x22c6b: 0x6cf2b620, + 0x22c6c: 0x6cbf2420, + 0x22c70: 0x6c8bb420, 0x22c72: 0x6c5cc820, 0x22c73: 0x6c5ed020, + // Block 0x8b2, offset 0x22c80 + 0x22c85: 0x6c127620, + 0x22c8a: 0x6ca28620, + 0x22c8d: 0x6c2ea820, 0x22c8e: 0x6cf09620, + 0x22ca0: 0x6c0b9a20, 0x22ca1: 0x6ce3c020, + 0x22ca5: 0x6ce8be20, + 0x22cb6: 0x6c453620, + // Block 0x8b3, offset 0x22cc0 + 0x22cc4: 0x6c1b3220, 0x22cc5: 0x6c23ee20, 0x22cc6: 0x6ce3c420, + 0x22cd2: 0x6c5de620, 0x22cd3: 0x6cb50e20, + 0x22cd4: 0x6ccab820, 0x22cd5: 0x6ccaa020, 0x22cd6: 0x6d085220, 0x22cd7: 0x6c021c20, + 0x22cd8: 0x6ca3ce20, 0x22cda: 0x6d0fd020, 0x22cdb: 0x6cd4f420, + 0x22cdc: 0x6ccc0620, + 0x22ce1: 0x6ce6d620, + 0x22ce9: 0x6d0bc420, 0x22cea: 0x6c5a5820, + 0x22cee: 0x6c0d4220, + 0x22cfe: 0x6caba020, 0x22cff: 0x6c128820, + // Block 0x8b4, offset 0x22d00 + 0x22d01: 0x6c026a20, 0x22d03: 0x6c99ae20, + 0x22d14: 0x6c9b3620, 0x22d16: 0x6ce47220, + 0x22d1d: 0x6ccaa220, 0x22d1e: 0x6d073a20, 0x22d1f: 0x6c771020, + 0x22d27: 0x6c811020, + 0x22d36: 0x6c0cc020, 0x22d37: 0x6c23b220, + 0x22d3a: 0x6cfb8e20, + // Block 0x8b5, offset 0x22d40 + 0x22d44: 0x6cea2a20, + 0x22d49: 0x6d240a20, 0x22d4a: 0x6c28c220, 0x22d4b: 0x6d1d5420, + 0x22d4d: 0x6d2f7820, 0x22d4f: 0x6cb4b620, + 0x22d58: 0x6c5c4e20, + 0x22d5e: 0x6c00ea20, 0x22d5f: 0x6ca0b220, + 0x22d62: 0x6c6dde20, 0x22d63: 0x6c7fce20, + 0x22d72: 0x6c8b5820, 0x22d73: 0x6cb1a420, + 0x22d75: 0x6c0fa420, 0x22d76: 0x6cbf8220, + 0x22d79: 0x6c0aa220, + 0x22d7f: 0x6d1dd420, + // Block 0x8b6, offset 0x22d80 + 0x22d85: 0x6c871820, + 0x22d8d: 0x6ca8b220, 0x22d8f: 0x6c2a8820, + 0x22d93: 0x6c584620, + 0x22d97: 0x6d272420, + 0x22d9a: 0x6c212c20, + 0x22d9c: 0x6c87b020, 0x22d9e: 0x6d2ef420, 0x22d9f: 0x6c8dd620, + 0x22da0: 0x6c217020, + 0x22da7: 0x6c12d220, + 0x22da8: 0x6d09ea20, + 0x22dac: 0x6c71ac20, 0x22dad: 0x6c5cac20, + 0x22dbe: 0x6ce6f820, + // Block 0x8b7, offset 0x22dc0 + 0x22dc6: 0x6ca91220, 0x22dc7: 0x6c727a20, + 0x22dcf: 0x6c144c20, + 0x22dd6: 0x6d2a2e20, + 0x22ddb: 0x6d24a020, + 0x22ddf: 0x6c78f420, + 0x22de6: 0x6c7bea20, 0x22de7: 0x6c3a4a20, + 0x22def: 0x6d282620, + 0x22df0: 0x6cb9fc20, + 0x22df4: 0x6cc2dc20, + 0x22df8: 0x6cb38a20, 0x22dfa: 0x6cadf620, + // Block 0x8b8, offset 0x22e00 + 0x22e04: 0x6c453820, 0x22e05: 0x6d17e420, 0x22e06: 0x6c961020, + 0x22e11: 0x6c7b5a20, 0x22e13: 0x6d085420, + 0x22e14: 0x6ca76e20, + 0x22e1a: 0x6c55ac20, 0x22e1b: 0x6c715820, + 0x22e29: 0x6d136a20, + 0x22e2e: 0x6cf73420, + 0x22e31: 0x6d271c20, 0x22e32: 0x6ce19020, 0x22e33: 0x6cb23e20, + 0x22e34: 0x6c33c820, 0x22e35: 0x6c06d420, + 0x22e38: 0x6c8a6020, + // Block 0x8b9, offset 0x22e40 + 0x22e40: 0x6d1e0e20, + 0x22e4e: 0x6d0acc20, + 0x22e51: 0x6c68bc20, + 0x22e54: 0x6c7dcc20, 0x22e56: 0x6d321820, 0x22e57: 0x6cd59c20, + 0x22e5a: 0x6cd24820, + 0x22e5e: 0x6d1efa20, 0x22e5f: 0x6cac1a20, + 0x22e60: 0x6cff6e20, 0x22e61: 0x6c5fe020, + 0x22e76: 0x6cb4d220, 0x22e77: 0x6c50c620, + 0x22e7a: 0x6c799620, + // Block 0x8ba, offset 0x22e80 + 0x22e82: 0x6d12d020, 0x22e83: 0x6c1bf020, + 0x22e8a: 0x6c77a220, 0x22e8b: 0x6d269020, + 0x22e8e: 0x6cec1a20, 0x22e8f: 0x6ca71820, + 0x22e91: 0x6c222e20, 0x22e93: 0x6d14a020, + 0x22ea4: 0x6c704620, + 0x22eab: 0x6d0f4e20, + 0x22eac: 0x6c83a620, 0x22eae: 0x6c270a20, 0x22eaf: 0x6c1d0c20, + 0x22eb5: 0x6d14c620, + 0x22eba: 0x6c4e9a20, + 0x22ebf: 0x6d13de20, + // Block 0x8bb, offset 0x22ec0 + 0x22ec1: 0x6c1d4a20, 0x22ec2: 0x6c568020, 0x22ec3: 0x6d3b6220, + 0x22ee6: 0x6cbf0a20, 0x22ee7: 0x6c34de20, + 0x22ef8: 0x6ce73220, 0x22ef9: 0x6cfa9020, + 0x22eff: 0x6c3e5020, + // Block 0x8bc, offset 0x22f00 + 0x22f02: 0x6c2d5020, 0x22f03: 0x6cf77820, + 0x22f04: 0x6d003e20, 0x22f05: 0x6d323820, 0x22f06: 0x6cbc3e20, 0x22f07: 0x6ce85620, + 0x22f37: 0x6c4eb020, + 0x22f38: 0x6c7bf220, 0x22f39: 0x6cdd1a20, 0x22f3b: 0x6cd46220, + 0x22f3c: 0x6ce58020, + // Block 0x8bd, offset 0x22f40 + 0x22f40: 0x6d315020, 0x22f43: 0x6ca58c20, + 0x22f45: 0x6cba0a20, 0x22f46: 0x6d1a6620, + 0x22f48: 0x6c899220, 0x22f49: 0x6ccc5420, 0x22f4a: 0x6d3f4c20, 0x22f4b: 0x6cafec20, + 0x22f4c: 0x6c42c620, 0x22f4f: 0x6c6d0a20, + 0x22f50: 0x6d1f3620, 0x22f52: 0x6ccd8c20, + 0x22f54: 0x6c9d4620, 0x22f55: 0x6cab9c20, 0x22f57: 0x6c54cc20, + 0x22f5b: 0x6d204620, + 0x22f5d: 0x6c9bd420, + // Block 0x8be, offset 0x22f80 + 0x22f90: 0x6d352a20, 0x22f93: 0x6c08e020, + 0x22f97: 0x6ccfe820, + 0x22f98: 0x6cb79420, 0x22f99: 0x6cfaa620, 0x22f9a: 0x6cac5820, 0x22f9b: 0x6c776e20, + 0x22fab: 0x6cd68620, + 0x22fac: 0x6cafee20, 0x22fae: 0x6d290220, 0x22faf: 0x6d3a6c20, + 0x22fb1: 0x6cd9c020, 0x22fb2: 0x6c6f1820, + 0x22fb5: 0x6c150020, 0x22fb6: 0x6c38a420, 0x22fb7: 0x6cff8e20, + 0x22fb8: 0x6d1aec20, 0x22fb9: 0x6c540e20, 0x22fba: 0x6c999220, 0x22fbb: 0x6ce8c020, + 0x22fbd: 0x6c621820, + // Block 0x8bf, offset 0x22fc0 + 0x22fc1: 0x6d151c20, 0x22fc3: 0x6d236c20, + 0x22fc4: 0x6c6ee020, 0x22fc5: 0x6cad9220, 0x22fc7: 0x6cfed820, + 0x22fc9: 0x6c468c20, + 0x22fcc: 0x6c465020, 0x22fcd: 0x6cdcf220, 0x22fce: 0x6cfc1620, 0x22fcf: 0x6d3baa20, + 0x22ffe: 0x6c1dba20, + // Block 0x8c0, offset 0x23000 + 0x23004: 0x6cbb7e20, 0x23005: 0x6ce34220, 0x23006: 0x6d27b020, + 0x23009: 0x6cccec20, 0x2300a: 0x6c8b1420, + 0x2300c: 0x6d353620, + 0x23010: 0x6cabf220, + 0x23023: 0x6c712e20, + 0x23024: 0x6c7f1220, + 0x23028: 0x6d3f1820, 0x2302a: 0x6cc1a420, 0x2302b: 0x6c47b020, + 0x2302c: 0x6c747a20, 0x2302d: 0x6d348220, 0x2302e: 0x6c021e20, 0x2302f: 0x6cbe2020, + 0x23030: 0x6cb00620, 0x23031: 0x6d417820, 0x23033: 0x6cb9b020, + 0x23035: 0x6c25e620, 0x23037: 0x6c606620, + 0x23038: 0x6ce35220, 0x23039: 0x6cc7b620, 0x2303b: 0x6c4d4220, + 0x2303c: 0x6d0a2620, 0x2303e: 0x6c073c20, 0x2303f: 0x6d348420, + // Block 0x8c1, offset 0x23040 + 0x23041: 0x6c340020, + 0x2304b: 0x6c293220, + 0x23050: 0x6cc62e20, + 0x23072: 0x6c41a820, + 0x23075: 0x6c42ae20, 0x23076: 0x6cde7220, + 0x23078: 0x6cebae20, 0x23079: 0x6d105e20, 0x2307a: 0x6c7a4e20, 0x2307b: 0x6d368c20, + // Block 0x8c2, offset 0x23080 + 0x23096: 0x6c64d020, 0x23097: 0x6ca6be20, + 0x23098: 0x6cd00e20, 0x23099: 0x6c058620, 0x2309a: 0x6cd66e20, 0x2309b: 0x6c30c020, + 0x2309d: 0x6cb91420, 0x2309e: 0x6c4e2820, 0x2309f: 0x6cb83020, + 0x230a0: 0x6c41e420, 0x230a3: 0x6c215a20, + 0x230a4: 0x6c13fe20, 0x230a5: 0x6c0a2620, 0x230a6: 0x6d140c20, 0x230a7: 0x6c3d9020, + 0x230a8: 0x6c35b820, 0x230aa: 0x6c816c20, 0x230ab: 0x6c4fe020, + 0x230ac: 0x6c842a20, + 0x230b1: 0x6ce28020, 0x230b2: 0x6cd01020, + 0x230b4: 0x6d1a9020, 0x230b7: 0x6c64d220, + 0x230bb: 0x6c140020, + // Block 0x8c3, offset 0x230c0 + 0x230d7: 0x6ca86020, + 0x230d8: 0x6c23f620, 0x230db: 0x6d154620, + 0x230df: 0x6ce12220, + 0x230e2: 0x6c738820, + 0x230f0: 0x6c1c5820, 0x230f1: 0x6c468e20, + 0x230f4: 0x6c6b1a20, 0x230f5: 0x6d307c20, 0x230f6: 0x6c559220, 0x230f7: 0x6c987220, + 0x230fb: 0x6d406220, + 0x230fc: 0x6cd8e820, 0x230ff: 0x6c3ad020, + // Block 0x8c4, offset 0x23100 + 0x23100: 0x6d3e8620, 0x23101: 0x6d3e8820, 0x23103: 0x6c6b3420, + 0x23104: 0x6cd82820, 0x23106: 0x6c211620, 0x23107: 0x6cad9820, + 0x2310b: 0x6d128e20, + 0x2310c: 0x6c2b4420, 0x2310e: 0x6c825820, 0x2310f: 0x6d05e420, + 0x23110: 0x6cc7c820, 0x23112: 0x6cabde20, 0x23113: 0x6c738e20, + 0x23114: 0x6cf8dc20, 0x23115: 0x6d133e20, 0x23116: 0x6c014c20, + 0x23118: 0x6d189420, 0x23119: 0x6c64f420, + 0x2311c: 0x6cd93820, 0x2311d: 0x6cf2c420, 0x2311f: 0x6ccb5820, + 0x23120: 0x6d355020, 0x23121: 0x6c088e20, 0x23122: 0x6d3be220, + 0x23126: 0x6c67fa20, 0x23127: 0x6c506820, + 0x23129: 0x6c1c6c20, 0x2312a: 0x6c340820, + // Block 0x8c5, offset 0x23140 + 0x23153: 0x6c0f5820, + 0x23154: 0x6c60a820, 0x23155: 0x6c1fb020, 0x23157: 0x6c962620, + 0x2315a: 0x6cc8b220, + 0x2316b: 0x6c55b020, + 0x23171: 0x6c28c420, + 0x23174: 0x6c4e6420, 0x23175: 0x6cc3fe20, 0x23176: 0x6ccc1e20, 0x23177: 0x6d2e1e20, + 0x23178: 0x6d2b0e20, 0x23179: 0x6c201220, 0x2317a: 0x6cb53620, 0x2317b: 0x6c2ef020, + 0x2317d: 0x6d2ce220, 0x2317e: 0x6ce83220, + // Block 0x8c6, offset 0x23180 + 0x23181: 0x6c221220, 0x23182: 0x6cc99e20, + 0x23184: 0x6c955620, 0x23187: 0x6c60be20, + 0x231a2: 0x6c95c220, 0x231a3: 0x6cbdb220, + 0x231a7: 0x6cbf6c20, + 0x231a8: 0x6c739420, + 0x231ac: 0x6c00e020, 0x231ad: 0x6c65e220, + 0x231b9: 0x6ce42a20, 0x231ba: 0x6cf1b620, + 0x231bd: 0x6cbbb620, + // Block 0x8c7, offset 0x231c0 + 0x231c1: 0x6cac0820, 0x231c2: 0x6c5d0620, + 0x231c5: 0x6c00ec20, 0x231c7: 0x6cd7a220, + 0x231c8: 0x6c887220, 0x231c9: 0x6c337420, 0x231cb: 0x6cdebc20, + 0x231cc: 0x6c6cbe20, 0x231cd: 0x6c0a8a20, 0x231ce: 0x6d0de820, 0x231cf: 0x6c435a20, + 0x231d0: 0x6cb18820, 0x231d1: 0x6d242c20, 0x231d2: 0x6ccf7c20, + 0x231d5: 0x6c651420, 0x231d7: 0x6c55dc20, + 0x231da: 0x6c8b4e20, + 0x231dc: 0x6c0bce20, 0x231dd: 0x6cdb4e20, 0x231de: 0x6c689420, + 0x231f8: 0x6d3cb820, + 0x231fd: 0x6c4dc220, + // Block 0x8c8, offset 0x23200 + 0x23207: 0x6c340e20, + 0x23210: 0x6d014e20, 0x23211: 0x6c9b8220, 0x23212: 0x6c3db420, 0x23213: 0x6c931a20, + 0x23214: 0x6ce0b220, 0x23217: 0x6c8ecc20, + 0x23218: 0x6cfaee20, 0x23219: 0x6cca9420, + 0x2321c: 0x6c240220, 0x2321d: 0x6d3c2620, 0x2321f: 0x6c188e20, + 0x23230: 0x6c892820, + 0x23234: 0x6c848c20, + // Block 0x8c9, offset 0x23240 + 0x23240: 0x6caf1a20, 0x23241: 0x6ceb9420, + 0x23244: 0x6cebb820, 0x23246: 0x6c8a4a20, 0x23247: 0x6d002620, + 0x23248: 0x6c20f620, 0x23249: 0x6c581a20, 0x2324a: 0x6ca7c220, 0x2324b: 0x6cb94820, + 0x2324c: 0x6c871c20, 0x2324f: 0x6cad3e20, + 0x23250: 0x6ce5b020, 0x23251: 0x6c8ece20, 0x23252: 0x6cf40a20, + 0x23264: 0x6d1d2620, 0x23266: 0x6d2c6820, + 0x23270: 0x6d21ee20, 0x23272: 0x6cfc5020, 0x23273: 0x6d083820, + 0x23274: 0x6cd68a20, 0x23275: 0x6cf74220, + 0x23278: 0x6c9a4220, 0x23279: 0x6ccbb420, 0x2327a: 0x6c893420, + 0x2327c: 0x6c6f9020, 0x2327d: 0x6c81ec20, + // Block 0x8ca, offset 0x23280 + 0x2328e: 0x6cff5020, 0x2328f: 0x6d407420, + 0x2329a: 0x6c8ee820, + 0x2329c: 0x6d2ff020, 0x2329e: 0x6d30c220, + 0x232a0: 0x6c830820, + 0x232ad: 0x6c32b420, + 0x232b7: 0x6c663420, + 0x232b8: 0x6cd68c20, 0x232b9: 0x6d425620, 0x232ba: 0x6cbd0c20, + 0x232bc: 0x6c81ca20, + // Block 0x8cb, offset 0x232c0 + 0x232c9: 0x6d248420, 0x232ca: 0x6d196620, 0x232cb: 0x6ca66e20, + 0x232ce: 0x6c134620, + 0x232d5: 0x6d0f1a20, 0x232d7: 0x6cc89020, + 0x232de: 0x6d0d1c20, 0x232df: 0x6c2f1e20, + 0x232e0: 0x6c9df620, + 0x232e7: 0x6c82a420, + 0x232e9: 0x6cecae20, + 0x232f0: 0x6ca2fe20, + 0x232f6: 0x6d0d2420, + 0x232fa: 0x6c831c20, + 0x232fd: 0x6ccc3020, 0x232fe: 0x6c551620, + // Block 0x8cc, offset 0x23300 + 0x23301: 0x6cf58020, 0x23302: 0x6cf58220, + 0x23304: 0x6d1fa020, 0x23305: 0x6c4d9220, 0x23307: 0x6c4d0820, + 0x23309: 0x6cebc820, 0x2330a: 0x6d068220, 0x2330b: 0x6caf3c20, + 0x2330c: 0x6cdf8e20, 0x2330d: 0x6cf58a20, 0x2330e: 0x6cf58c20, 0x2330f: 0x6c0d2420, + 0x23310: 0x6cbd1a20, 0x23311: 0x6cf58e20, 0x23312: 0x6d20c420, 0x23313: 0x6cf84a20, + 0x23315: 0x6c22b620, 0x23316: 0x6cba4020, 0x23317: 0x6cf95420, + 0x2331a: 0x6cec0620, 0x2331b: 0x6c35f420, + 0x2331c: 0x6d1fae20, 0x2331d: 0x6d041a20, 0x2331e: 0x6ca5c220, 0x2331f: 0x6c4de420, + 0x23320: 0x6c094a20, 0x23321: 0x6cd0ec20, + 0x23324: 0x6d2d6220, 0x23325: 0x6c2d4420, 0x23326: 0x6d222c20, + 0x23328: 0x6cab7a20, 0x2332a: 0x6c4ae820, 0x2332b: 0x6cee0620, + 0x2332c: 0x6cb8c620, 0x2332d: 0x6d14c820, + 0x23330: 0x6d40b020, 0x23332: 0x6cb8c820, 0x23333: 0x6c2f9c20, + 0x23334: 0x6c793420, 0x23336: 0x6c1f2620, 0x23337: 0x6d13e020, + 0x2333a: 0x6c4d9e20, 0x2333b: 0x6c7b6420, + // Block 0x8cd, offset 0x23340 + 0x23348: 0x6c2d5820, 0x23349: 0x6cf88a20, 0x2334a: 0x6d3e3c20, 0x2334b: 0x6c8d0420, + 0x2334c: 0x6d3f4e20, 0x2334e: 0x6d234420, 0x2334f: 0x6c5ccc20, + 0x23351: 0x6cd86e20, 0x23352: 0x6c76d620, + 0x2335a: 0x6c01c420, + 0x2335c: 0x6d1fca20, 0x2335d: 0x6c605420, 0x2335e: 0x6c5d2c20, 0x2335f: 0x6cb82e20, + 0x23360: 0x6c541020, 0x23361: 0x6c541220, 0x23363: 0x6c2d5c20, + 0x23369: 0x6d004c20, + 0x2336d: 0x6ccf5620, 0x2336e: 0x6ccc5c20, + 0x23372: 0x6d00ca20, 0x23373: 0x6d112220, + 0x23374: 0x6c26f420, 0x23376: 0x6d01d820, 0x23377: 0x6c1ac620, + 0x23378: 0x6d1fde20, 0x23379: 0x6c50a220, 0x2337a: 0x6ccc6220, + 0x2337f: 0x6cdf2e20, + // Block 0x8ce, offset 0x23380 + 0x23381: 0x6d3a1c20, 0x23383: 0x6c006c20, + 0x23387: 0x6cc3e020, + 0x23388: 0x6d2aea20, 0x2338a: 0x6c7e4a20, 0x2338b: 0x6c911620, + 0x2338c: 0x6c1fc820, 0x2338e: 0x6d1fe620, + 0x23396: 0x6ce41020, + 0x23398: 0x6cd1fa20, + 0x233a1: 0x6d000a20, 0x233a2: 0x6cf8ee20, + 0x233a8: 0x6c5e1220, 0x233a9: 0x6c1c8620, 0x233aa: 0x6d18e620, + 0x233af: 0x6cd54420, + 0x233b0: 0x6d270020, 0x233b1: 0x6c155420, 0x233b2: 0x6c36da20, 0x233b3: 0x6cf73620, + 0x233b4: 0x6cf74420, 0x233b5: 0x6d1d2a20, 0x233b6: 0x6d410020, 0x233b7: 0x6d28a220, + 0x233ba: 0x6d28a820, + // Block 0x8cf, offset 0x233c0 + 0x233c2: 0x6cde2c20, 0x233c3: 0x6ced7020, + 0x233c7: 0x6d031e20, + 0x233ca: 0x6cee4820, 0x233cb: 0x6c3f3820, + 0x233d0: 0x6c91b620, + 0x233de: 0x6c656820, + 0x233e1: 0x6d0c6620, 0x233e3: 0x6c094c20, + 0x233e4: 0x6c78fc20, 0x233e5: 0x6c497820, + 0x233e8: 0x6d3e1820, + 0x233ee: 0x6c7cce20, 0x233ef: 0x6d38e020, + 0x233f0: 0x6d35be20, 0x233f3: 0x6ce8a420, + 0x233f7: 0x6cde4c20, + 0x233f9: 0x6c1f3e20, 0x233fa: 0x6c196e20, 0x233fb: 0x6c1a7420, + 0x233fc: 0x6d3af420, 0x233fe: 0x6c26f220, + // Block 0x8d0, offset 0x23400 + 0x23407: 0x6c09c620, + 0x23409: 0x6c641c20, + 0x2340c: 0x6d17e620, 0x2340f: 0x6d26c420, + 0x23410: 0x6c428a20, + 0x23416: 0x6c41ae20, + 0x2341c: 0x6cbbac20, + 0x23420: 0x6c1eb020, 0x23421: 0x6c1eb620, 0x23422: 0x6c0a6a20, + 0x23426: 0x6c4b8a20, + 0x23429: 0x6c47e020, 0x2342a: 0x6c0e0020, 0x2342b: 0x6d1b9420, + 0x2342c: 0x6d3cbc20, 0x2342d: 0x6c47ec20, 0x2342f: 0x6c876820, + 0x23435: 0x6c35c420, 0x23436: 0x6c271420, + 0x2343c: 0x6c118620, + // Block 0x8d1, offset 0x23440 + 0x23442: 0x6ce3d420, 0x23443: 0x6c323620, + 0x23444: 0x6d168c20, + 0x23448: 0x6c2e6020, 0x2344a: 0x6ca97e20, + 0x2344c: 0x6d094420, 0x2344d: 0x6ca54a20, 0x2344e: 0x6c4b3220, 0x2344f: 0x6c779e20, + 0x23452: 0x6c201a20, + 0x23456: 0x6d2c2020, 0x23457: 0x6d1efc20, + 0x23459: 0x6c043420, 0x2345a: 0x6cd24a20, 0x2345b: 0x6c2d3e20, + 0x2345c: 0x6cabb420, 0x2345d: 0x6cc01620, + 0x23461: 0x6d094820, 0x23463: 0x6ca0e420, + 0x23464: 0x6c77e020, 0x23465: 0x6d1fb020, 0x23466: 0x6c68d220, 0x23467: 0x6c0ec620, + 0x2346c: 0x6d052020, + 0x23472: 0x6c9ce820, 0x23473: 0x6c95f220, + 0x23475: 0x6d094e20, 0x23477: 0x6c34e220, + 0x23479: 0x6c37c620, 0x2347a: 0x6cccd820, + 0x2347c: 0x6c7cee20, 0x2347d: 0x6ca52c20, 0x2347e: 0x6c9e1420, 0x2347f: 0x6c85ce20, + // Block 0x8d2, offset 0x23480 + 0x23480: 0x6c949620, 0x23482: 0x6c2e8420, + 0x23484: 0x6cb85620, 0x23485: 0x6c832a20, 0x23487: 0x6c997020, + 0x23489: 0x6c524c20, 0x2348a: 0x6c181620, 0x2348b: 0x6d35e620, + 0x2348d: 0x6c477c20, 0x2348e: 0x6c25b820, + 0x23493: 0x6cf4de20, + 0x23494: 0x6ce26420, 0x23497: 0x6cf61220, + 0x23498: 0x6d10a620, 0x23499: 0x6cefc620, 0x2349b: 0x6d40be20, + 0x2349c: 0x6c96be20, 0x2349d: 0x6d225a20, 0x2349e: 0x6caf0820, 0x2349f: 0x6d17a420, + 0x234a0: 0x6cbe1620, 0x234a1: 0x6d26b620, 0x234a2: 0x6c754c20, 0x234a3: 0x6c67e620, + 0x234a4: 0x6d06d820, 0x234a5: 0x6c07ea20, + 0x234aa: 0x6c95b020, 0x234ab: 0x6d3c6020, + 0x234b2: 0x6c326420, 0x234b3: 0x6cfe4020, + 0x234b6: 0x6c5be420, + 0x234ba: 0x6c479e20, 0x234bb: 0x6c77b020, + 0x234be: 0x6d037c20, 0x234bf: 0x6c5cf020, + // Block 0x8d3, offset 0x234c0 + 0x234c0: 0x6c0af820, + 0x234c4: 0x6c78c420, 0x234c5: 0x6c77b220, + 0x234c8: 0x6c25e820, + 0x234cf: 0x6c92a420, + 0x234d1: 0x6d41c620, 0x234d2: 0x6d2a2020, 0x234d3: 0x6c692e20, + 0x234d4: 0x6c49a020, + 0x234d9: 0x6d0c2220, 0x234da: 0x6c376620, + 0x234dc: 0x6cbe8820, 0x234df: 0x6c2ae820, + 0x234e0: 0x6cd8ea20, 0x234e1: 0x6cdc7220, 0x234e2: 0x6c8aa420, + 0x234e7: 0x6ccdb020, + 0x234e9: 0x6c0a6e20, 0x234ea: 0x6cf0e420, 0x234eb: 0x6d136020, + 0x234ed: 0x6d2d5020, 0x234ef: 0x6d129420, + 0x234f0: 0x6c2e4c20, 0x234f1: 0x6c00ee20, + 0x234f4: 0x6c680620, 0x234f7: 0x6cda6220, + 0x234f9: 0x6c581c20, 0x234fa: 0x6d246020, + 0x234fd: 0x6cc50a20, + // Block 0x8d4, offset 0x23500 + 0x23500: 0x6c2cfa20, 0x23501: 0x6d413e20, 0x23502: 0x6c047420, + 0x23504: 0x6cbd5a20, 0x23507: 0x6c633620, + 0x23509: 0x6cafcc20, + 0x2350c: 0x6ce7ec20, + 0x23510: 0x6c1da220, + 0x23515: 0x6c4af020, + 0x23520: 0x6c5ee620, + 0x23528: 0x6d096420, 0x2352a: 0x6c2d6020, + 0x2352d: 0x6c0bac20, 0x2352e: 0x6d291c20, 0x2352f: 0x6ce76820, + 0x23536: 0x6ccd5820, + 0x23538: 0x6c482620, 0x23539: 0x6cc3ec20, + // Block 0x8d5, offset 0x23540 + 0x23540: 0x6c47cc20, + 0x23548: 0x6c55b220, 0x23549: 0x6c7b0420, + 0x2354c: 0x6c46d820, 0x2354e: 0x6cdb3220, + 0x23550: 0x6c1df620, 0x23552: 0x6c795c20, + 0x23554: 0x6c317e20, + 0x23559: 0x6d190a20, + 0x2355c: 0x6c2a4220, 0x2355d: 0x6cbaf820, + 0x23563: 0x6c900220, + 0x23565: 0x6c84cc20, 0x23567: 0x6c87a020, + 0x23568: 0x6cbe6420, 0x2356a: 0x6ceed420, + 0x2356c: 0x6ca1bc20, + 0x23571: 0x6cb74420, 0x23573: 0x6c67a020, + 0x23574: 0x6d008c20, + 0x23579: 0x6c277820, 0x2357b: 0x6c90a420, + // Block 0x8d6, offset 0x23580 + 0x23582: 0x6c497620, + 0x23586: 0x6cadc820, + 0x23589: 0x6cafce20, 0x2358b: 0x6c735420, + 0x2358d: 0x6c06aa20, 0x2358e: 0x6c747c20, 0x2358f: 0x6c738420, + 0x23590: 0x6cd3b420, + 0x23595: 0x6d014a20, + 0x23598: 0x6cc8a820, 0x23599: 0x6c6ec220, 0x2359a: 0x6cb3be20, 0x2359b: 0x6cc9f420, + 0x235a0: 0x6c5e7a20, + 0x235a9: 0x6c3b1820, 0x235aa: 0x6c06e820, 0x235ab: 0x6c6bc220, + 0x235ac: 0x6cc94020, 0x235ae: 0x6caf3e20, + 0x235b4: 0x6c2c2220, 0x235b5: 0x6c98c820, 0x235b6: 0x6c03ec20, 0x235b7: 0x6c03ee20, + 0x235b8: 0x6ce57820, 0x235b9: 0x6c8cba20, 0x235ba: 0x6cd0f020, 0x235bb: 0x6d31c220, + 0x235bc: 0x6caf4620, 0x235bd: 0x6cf4c620, 0x235bf: 0x6d2b4220, + // Block 0x8d7, offset 0x235c0 + 0x235c0: 0x6c063a20, + 0x235c7: 0x6c938020, + 0x235d6: 0x6c4fa020, 0x235d7: 0x6c30e020, + 0x235d8: 0x6c3e0e20, 0x235d9: 0x6ca5c420, + 0x235dd: 0x6c43de20, + 0x235e0: 0x6cc79820, 0x235e1: 0x6cfbfc20, + 0x235e4: 0x6c096020, + 0x235ee: 0x6c98d220, + 0x235f2: 0x6cc70a20, 0x235f3: 0x6cc04c20, + 0x235f7: 0x6c0ee820, + 0x235f9: 0x6c4fa620, 0x235fa: 0x6ca4ee20, 0x235fb: 0x6d0c8620, + // Block 0x8d8, offset 0x23600 + 0x23603: 0x6cad5c20, + 0x23604: 0x6cdbc020, 0x23606: 0x6ceba220, + 0x23608: 0x6cc10a20, 0x23609: 0x6c83d620, 0x2360a: 0x6c2a7220, + 0x2360c: 0x6c6aca20, 0x2360d: 0x6c6acc20, 0x2360e: 0x6c4bc820, 0x2360f: 0x6c649c20, + 0x23610: 0x6c099e20, + 0x23620: 0x6cca5620, 0x23621: 0x6c053020, 0x23622: 0x6c214a20, + 0x23626: 0x6ca3c220, 0x23627: 0x6c054e20, + 0x2362a: 0x6cc68820, 0x2362b: 0x6c636c20, + 0x2362c: 0x6cd9c220, + 0x23630: 0x6c2a7420, + 0x2363e: 0x6cfaac20, 0x2363f: 0x6d2d8020, + // Block 0x8d9, offset 0x23640 + 0x23640: 0x6c999620, 0x23643: 0x6d3e5020, + 0x23645: 0x6c623c20, 0x23646: 0x6cb61c20, + 0x2364b: 0x6cc82420, + 0x2364c: 0x6cdd2c20, 0x2364d: 0x6cc71620, 0x2364e: 0x6cf50c20, 0x2364f: 0x6cc69620, + 0x23650: 0x6cc69820, + 0x2365a: 0x6cde7620, + 0x2365c: 0x6cd9d020, + 0x23664: 0x6c842c20, 0x23667: 0x6c24fc20, + 0x23668: 0x6d3fb020, 0x23669: 0x6c9ad220, 0x2366a: 0x6cf80820, + 0x2366c: 0x6c989e20, 0x2366d: 0x6ca86220, 0x2366f: 0x6cdbd220, + 0x23671: 0x6cadea20, + 0x23674: 0x6c0a2820, 0x23675: 0x6c2c9020, + 0x23678: 0x6cc1be20, 0x23679: 0x6cbbfa20, 0x2367b: 0x6c3b4420, + 0x2367c: 0x6cdb1620, + // Block 0x8da, offset 0x23680 + 0x23683: 0x6d05e620, + 0x23687: 0x6cc72420, + 0x23688: 0x6c5f3220, 0x2368b: 0x6cc1d620, + 0x2368c: 0x6c8b3820, + 0x23695: 0x6ccafe20, + 0x23698: 0x6c7dd620, 0x2369a: 0x6c257620, 0x2369b: 0x6d136c20, + 0x2369c: 0x6c0e3220, 0x2369e: 0x6c6b5c20, + 0x236a0: 0x6cc1e020, 0x236a1: 0x6cc1e220, + 0x236a5: 0x6c9b6e20, 0x236a6: 0x6cc49020, + 0x236a8: 0x6c0d5e20, 0x236a9: 0x6c178220, + 0x236ac: 0x6c31d420, + 0x236b6: 0x6cc4ec20, 0x236b7: 0x6cfb0220, + 0x236ba: 0x6ce25220, 0x236bb: 0x6cc20a20, + 0x236bc: 0x6ca8b420, 0x236bf: 0x6cd51c20, + // Block 0x8db, offset 0x236c0 + 0x236c0: 0x6c920220, 0x236c2: 0x6c7dda20, + 0x236c8: 0x6c9f3620, 0x236c9: 0x6c9f9e20, + 0x236cd: 0x6c287e20, + 0x236d0: 0x6d1b6820, 0x236d3: 0x6d001020, + 0x236d7: 0x6c618820, + 0x236dc: 0x6d19b220, + 0x236e6: 0x6c3b3820, 0x236e7: 0x6d383420, + 0x236eb: 0x6c47c020, + 0x236f1: 0x6c13c420, 0x236f3: 0x6c8e3c20, + 0x236f6: 0x6c102c20, + 0x236fa: 0x6cabae20, 0x236fb: 0x6cd87620, + 0x236fc: 0x6c29b820, 0x236fd: 0x6d31b020, + // Block 0x8dc, offset 0x23700 + 0x23700: 0x6cccb620, 0x23702: 0x6c1fbe20, + 0x23704: 0x6c6fa820, + 0x2370a: 0x6c787620, 0x2370b: 0x6c1af820, + 0x23711: 0x6c565c20, 0x23712: 0x6c858220, 0x23713: 0x6ccbc620, + 0x23716: 0x6cac1820, 0x23717: 0x6ceee220, + 0x23718: 0x6cf42620, + 0x2371c: 0x6d1c5420, + 0x23721: 0x6ccbc820, 0x23722: 0x6c2b1020, + 0x23725: 0x6c27b820, + 0x23731: 0x6ce83a20, 0x23732: 0x6c50ca20, 0x23733: 0x6cb34e20, + 0x23735: 0x6d34f620, 0x23736: 0x6ca98020, 0x23737: 0x6ca67e20, + 0x2373d: 0x6cc6f820, 0x2373e: 0x6c48ea20, + // Block 0x8dd, offset 0x23740 + 0x23740: 0x6d343e20, 0x23743: 0x6c5fe220, + 0x2375c: 0x6c392c20, 0x2375f: 0x6c6a8020, + 0x23760: 0x6c4d3820, + 0x23764: 0x6d2e4e20, 0x23766: 0x6cf86420, + 0x23769: 0x6d3e1220, + 0x2376c: 0x6cf76e20, 0x2376d: 0x6cb1ac20, + 0x23770: 0x6c078020, 0x23772: 0x6c657220, + // Block 0x8de, offset 0x23780 + 0x23793: 0x6c665c20, + 0x23796: 0x6d28ae20, + 0x2379e: 0x6c07ac20, 0x2379f: 0x6c995e20, + 0x237a2: 0x6d2a7620, 0x237a3: 0x6d3c3820, + 0x237a5: 0x6c7bbe20, + 0x237a8: 0x6c089e20, 0x237aa: 0x6cac2220, + 0x237bc: 0x6c996020, 0x237bd: 0x6ce09020, + // Block 0x8df, offset 0x237c0 + 0x237de: 0x6cea7a20, 0x237df: 0x6c95aa20, + 0x237e2: 0x6cdf9a20, + 0x237f1: 0x6c016a20, + 0x237f7: 0x6c4e0420, + 0x237f8: 0x6d3a0c20, 0x237fa: 0x6c34e820, 0x237fb: 0x6c34ea20, + 0x237fc: 0x6c421c20, + // Block 0x8e0, offset 0x23800 + 0x23806: 0x6cbf8c20, + 0x23808: 0x6cee1220, 0x2380a: 0x6ca10420, 0x2380b: 0x6d30f220, + 0x2380c: 0x6cf1d620, 0x2380d: 0x6d3c3a20, 0x2380f: 0x6c69fe20, + 0x23810: 0x6cad8e20, + 0x23818: 0x6cdaa820, + 0x2381d: 0x6c724020, + 0x23820: 0x6cb4ec20, 0x23821: 0x6c11f420, 0x23823: 0x6ce94a20, + 0x23824: 0x6ccbec20, 0x23826: 0x6ceb1620, + 0x23829: 0x6c579420, 0x2382b: 0x6d176220, + // Block 0x8e1, offset 0x23840 + 0x23860: 0x6c9f4820, 0x23861: 0x6d37b420, + 0x23865: 0x6cd77e20, + 0x23869: 0x6d176420, 0x2386a: 0x6cee1420, 0x2386b: 0x6c024220, + 0x23876: 0x6cda7820, + 0x2387e: 0x6c4b0020, 0x2387f: 0x6ceb8020, + // Block 0x8e2, offset 0x23880 + 0x23880: 0x6c5b5220, 0x23883: 0x6d06dc20, + 0x23884: 0x6d296c20, 0x23886: 0x6d3f1220, 0x23887: 0x6c0b9e20, + 0x23889: 0x6c26a620, 0x2388a: 0x6d19ca20, 0x2388b: 0x6cc35c20, + 0x2388e: 0x6c580e20, 0x2388f: 0x6ca2e020, + 0x23890: 0x6d28ba20, 0x23892: 0x6ce32620, + 0x23898: 0x6d14f820, 0x23899: 0x6cdfaa20, 0x2389a: 0x6ccf1820, 0x2389b: 0x6cd78220, + 0x2389d: 0x6d03e620, + 0x238a0: 0x6d1fce20, 0x238a3: 0x6c3b7620, + // Block 0x8e3, offset 0x238c0 + 0x238c7: 0x6c78b220, + 0x238cb: 0x6c3e7c20, + 0x238d2: 0x6c9fb220, + 0x238da: 0x6cb09820, + 0x238dc: 0x6c604220, 0x238dd: 0x6cbc4a20, 0x238de: 0x6d37fc20, 0x238df: 0x6c422820, + 0x238e0: 0x6d24f820, 0x238e1: 0x6c1b3620, + 0x238e5: 0x6cba5a20, 0x238e7: 0x6d424220, + 0x238e9: 0x6d00bc20, 0x238ea: 0x6c98ea20, + 0x238ec: 0x6c556e20, 0x238ee: 0x6cb0a420, 0x238ef: 0x6d0a9420, + 0x238f1: 0x6cf9d220, 0x238f2: 0x6ce34420, + 0x238f5: 0x6ca34e20, 0x238f6: 0x6c1fac20, + // Block 0x8e4, offset 0x23900 + 0x23900: 0x6cf45020, + 0x2392c: 0x6c599820, 0x2392d: 0x6d096620, 0x2392e: 0x6ce26620, + 0x23930: 0x6cbc4c20, 0x23933: 0x6c685020, + 0x2393c: 0x6c293020, 0x2393d: 0x6c044620, + // Block 0x8e5, offset 0x23940 + 0x2394d: 0x6c297620, 0x2394e: 0x6c79f820, + 0x23950: 0x6c70b220, 0x23951: 0x6ccc0a20, 0x23952: 0x6c6dc820, + 0x23955: 0x6ca06c20, 0x23956: 0x6caa0220, + 0x23958: 0x6cd78e20, 0x2395a: 0x6cd5f820, 0x2395b: 0x6d3c2020, + 0x2395c: 0x6c3ec220, 0x2395f: 0x6d29de20, + 0x23960: 0x6d00cc20, 0x23961: 0x6c812820, 0x23962: 0x6ce70420, + 0x23969: 0x6d306e20, + 0x2396c: 0x6c11fe20, 0x2396e: 0x6d26cc20, + 0x23971: 0x6d393620, + // Block 0x8e6, offset 0x23980 + 0x2399a: 0x6cdfb420, + 0x2399e: 0x6d0cb420, 0x2399f: 0x6c928820, + 0x239a0: 0x6d0db620, + 0x239a6: 0x6d2ae020, 0x239a7: 0x6cd66c20, + // Block 0x8e7, offset 0x239c0 + 0x239c5: 0x6c4c3620, 0x239c6: 0x6d3a2020, + 0x239c8: 0x6cc7bc20, 0x239c9: 0x6cc7be20, + 0x239cc: 0x6c76e620, 0x239cd: 0x6c626220, 0x239ce: 0x6c42da20, + 0x239d2: 0x6d01fa20, + 0x239d5: 0x6caba220, 0x239d6: 0x6c64d420, + 0x239da: 0x6d349220, 0x239db: 0x6d2c4820, + 0x239dd: 0x6c53a820, 0x239df: 0x6c7b7020, + 0x239e1: 0x6c0f4420, + 0x239e4: 0x6ccb4820, 0x239e5: 0x6c01cc20, 0x239e6: 0x6c66b820, + 0x239e8: 0x6ce2ac20, 0x239eb: 0x6cd93420, + 0x239ed: 0x6c9c0c20, 0x239ee: 0x6d1a9420, 0x239ef: 0x6cdfb620, + 0x239f0: 0x6c4c3820, 0x239f3: 0x6cc84620, + 0x239f4: 0x6cf0ba20, 0x239f7: 0x6cd8de20, + // Block 0x8e8, offset 0x23a00 + 0x23a24: 0x6cb7c220, 0x23a26: 0x6d2f0a20, + // Block 0x8e9, offset 0x23a40 + 0x23a45: 0x6c304020, 0x23a46: 0x6c3eee20, 0x23a47: 0x6cd07620, + 0x23a48: 0x6cdb1a20, 0x23a49: 0x6d18a020, 0x23a4a: 0x6c891820, + 0x23a4c: 0x6c516e20, 0x23a4e: 0x6d319420, + 0x23a50: 0x6d2afe20, 0x23a52: 0x6c250c20, 0x23a53: 0x6c250e20, + 0x23a5d: 0x6c3cf220, 0x23a5e: 0x6c853220, 0x23a5f: 0x6c7a0220, + 0x23a63: 0x6d000620, + 0x23a64: 0x6d1fee20, + // Block 0x8ea, offset 0x23a80 + 0x23a83: 0x6c4fea20, + 0x23a89: 0x6c4f0620, 0x23a8a: 0x6c790c20, + 0x23a9d: 0x6d23ec20, + 0x23aa3: 0x6c58e220, + 0x23aa4: 0x6cdd3e20, 0x23aa6: 0x6c7e9c20, + 0x23aa8: 0x6c313c20, 0x23aa9: 0x6c66de20, 0x23aaa: 0x6cb32020, 0x23aab: 0x6c0b5420, + 0x23ab0: 0x6d097420, 0x23ab2: 0x6c0bc820, + 0x23ab7: 0x6cf0e620, + // Block 0x8eb, offset 0x23ac0 + 0x23ae1: 0x6c28d620, 0x23ae2: 0x6c6b5e20, 0x23ae3: 0x6c046020, + 0x23ae5: 0x6ca74420, 0x23ae6: 0x6cfd2620, 0x23ae7: 0x6ccb7620, + 0x23aea: 0x6c576420, 0x23aeb: 0x6c1fa420, + 0x23aee: 0x6caba620, 0x23aef: 0x6c8b5020, + 0x23af0: 0x6c2ba420, 0x23af1: 0x6c114e20, 0x23af3: 0x6d2c5e20, + 0x23af5: 0x6c936820, + 0x23af9: 0x6c5e1420, + 0x23afc: 0x6c86ce20, 0x23afd: 0x6d1d1620, 0x23aff: 0x6cf03a20, + // Block 0x8ec, offset 0x23b00 + 0x23b00: 0x6c0a8c20, 0x23b01: 0x6c4c9620, 0x23b03: 0x6cb0ce20, + 0x23b06: 0x6c0c3a20, + 0x23b20: 0x6d0dea20, + 0x23b24: 0x6d3bee20, + 0x23b32: 0x6c539420, + 0x23b36: 0x6c8c7820, 0x23b37: 0x6c36ce20, + 0x23b39: 0x6d1b1820, 0x23b3a: 0x6c808020, + 0x23b3c: 0x6d123820, 0x23b3f: 0x6d08c820, + // Block 0x8ed, offset 0x23b40 + 0x23b40: 0x6c86fa20, + 0x23b68: 0x6c808420, 0x23b69: 0x6c8d9020, 0x23b6a: 0x6cf73820, 0x23b6b: 0x6c52de20, + 0x23b6d: 0x6c696a20, 0x23b6e: 0x6d3dd220, + 0x23b72: 0x6d34b620, + 0x23b75: 0x6c0fb820, 0x23b76: 0x6ce29620, 0x23b77: 0x6c019820, + 0x23b7a: 0x6d0a5220, 0x23b7b: 0x6c82fa20, + 0x23b7c: 0x6d29ec20, 0x23b7d: 0x6c5b7c20, + // Block 0x8ee, offset 0x23b80 + 0x23b8e: 0x6cf92620, 0x23b8f: 0x6c539820, + 0x23b91: 0x6c397820, 0x23b92: 0x6c662420, 0x23b93: 0x6c23c820, + 0x23b94: 0x6d28da20, 0x23b96: 0x6c10e020, + 0x23b98: 0x6d1ece20, 0x23b9b: 0x6c338820, + 0x23b9c: 0x6cac4e20, + 0x23ba5: 0x6cdede20, 0x23ba7: 0x6cacc420, + 0x23bab: 0x6c386e20, + 0x23bac: 0x6cf74620, + 0x23bb6: 0x6d124c20, 0x23bb7: 0x6c957620, + 0x23bba: 0x6c0b2220, + 0x23bbc: 0x6c6d7420, 0x23bbd: 0x6c876a20, + // Block 0x8ef, offset 0x23bc0 + 0x23bca: 0x6d0f0a20, 0x23bcb: 0x6c315020, + 0x23bce: 0x6c981620, + 0x23bd0: 0x6c45ca20, 0x23bd1: 0x6cc51420, 0x23bd2: 0x6c121220, + 0x23be3: 0x6c9ae420, + 0x23bf1: 0x6c47fc20, 0x23bf2: 0x6cd69e20, + 0x23bf8: 0x6d0d2020, 0x23bf9: 0x6c0adc20, + // Block 0x8f0, offset 0x23c00 + 0x23c00: 0x6c0c6a20, 0x23c01: 0x6c1a6220, 0x23c02: 0x6c7ce620, + 0x23c04: 0x6c5d8820, + 0x23c0d: 0x6c1be620, 0x23c0f: 0x6cf2d020, + 0x23c11: 0x6c23e820, 0x23c12: 0x6d357a20, + 0x23c19: 0x6cd70820, + 0x23c1c: 0x6c48a220, 0x23c1d: 0x6cb40020, 0x23c1e: 0x6d068620, 0x23c1f: 0x6cd7d020, + 0x23c21: 0x6cf42e20, + 0x23c2e: 0x6c3d4020, + 0x23c30: 0x6cd31e20, 0x23c33: 0x6c5b9220, + 0x23c34: 0x6c597c20, 0x23c35: 0x6cabb620, + 0x23c3c: 0x6d3a5e20, 0x23c3e: 0x6d14a220, + // Block 0x8f1, offset 0x23c40 + 0x23c43: 0x6c85a820, + 0x23c44: 0x6ccd3420, + 0x23c5c: 0x6c9f3820, 0x23c5e: 0x6c437c20, + 0x23c60: 0x6c54b020, + 0x23c6f: 0x6c371220, + 0x23c70: 0x6c380e20, 0x23c73: 0x6d06aa20, + 0x23c74: 0x6d14ca20, + 0x23c7e: 0x6d1d3620, + // Block 0x8f2, offset 0x23c80 + 0x23c94: 0x6c1b1820, + 0x23c99: 0x6d14cc20, + 0x23ca5: 0x6c2b6a20, 0x23ca6: 0x6c5b5020, 0x23ca7: 0x6c510c20, + 0x23ca9: 0x6d2c7a20, + 0x23cb6: 0x6d27a420, 0x23cb7: 0x6cfa9c20, + // Block 0x8f3, offset 0x23cc0 + 0x23ccc: 0x6cfb4c20, 0x23ccd: 0x6c81d220, 0x23cce: 0x6cced420, 0x23ccf: 0x6cd36820, + 0x23cd0: 0x6d3d5220, + 0x23ce4: 0x6c0ca820, 0x23ce5: 0x6c6fc020, 0x23ce6: 0x6cf29220, 0x23ce7: 0x6c68f820, + 0x23ce8: 0x6c3e7e20, 0x23cea: 0x6cfd7620, 0x23ceb: 0x6c768a20, + // Block 0x8f4, offset 0x23d00 + 0x23d32: 0x6ca4fe20, + 0x23d34: 0x6c5ddc20, 0x23d35: 0x6c605620, 0x23d36: 0x6c7e7e20, + 0x23d3b: 0x6c3d1220, + 0x23d3c: 0x6ccd4c20, 0x23d3d: 0x6c8a9c20, 0x23d3e: 0x6c9ee020, 0x23d3f: 0x6c182620, + // Block 0x8f5, offset 0x23d40 + 0x23d42: 0x6ca05e20, + 0x23d4f: 0x6c909820, + 0x23d68: 0x6c34f620, 0x23d6b: 0x6ca50020, + 0x23d6d: 0x6c5ee820, + 0x23d70: 0x6d3b0820, + // Block 0x8f6, offset 0x23d80 + 0x23d82: 0x6cdad220, 0x23d83: 0x6c34f820, + 0x23d87: 0x6c6f2820, + 0x23d8a: 0x6d291e20, 0x23d8b: 0x6c5b5c20, + 0x23d8c: 0x6d1cfe20, 0x23d8d: 0x6c557a20, 0x23d8e: 0x6c8c5820, 0x23d8f: 0x6cf25820, + 0x23d90: 0x6c4ee820, + 0x23d94: 0x6ca40620, + 0x23db7: 0x6cf8b020, + 0x23db9: 0x6c422c20, + 0x23dbe: 0x6c51d420, 0x23dbf: 0x6c5f0820, + // Block 0x8f7, offset 0x23dc0 + 0x23dc0: 0x6cfdf020, 0x23dc1: 0x6ccc0c20, + 0x23dd0: 0x6cea0c20, 0x23dd2: 0x6d2f6c20, 0x23dd3: 0x6cd60420, + 0x23dd5: 0x6d1fe820, 0x23dd6: 0x6c64d820, + 0x23ddc: 0x6d2a8c20, + 0x23de4: 0x6d2ed820, + 0x23dfd: 0x6cc92c20, + // Block 0x8f8, offset 0x23e00 + 0x23e04: 0x6d0c2420, + 0x23e0b: 0x6c255a20, + 0x23e17: 0x6c608a20, + 0x23e18: 0x6cce1a20, + 0x23e23: 0x6c36a820, + 0x23e24: 0x6c817420, 0x23e25: 0x6ce07820, 0x23e27: 0x6d3b2820, + 0x23e2d: 0x6c8c3620, 0x23e2f: 0x6d2b9220, + 0x23e31: 0x6c732a20, 0x23e32: 0x6c550220, + // Block 0x8f9, offset 0x23e40 + 0x23e57: 0x6cd07820, + 0x23e58: 0x6c5dfa20, + 0x23e5c: 0x6c7d2020, + 0x23e71: 0x6c1f7620, 0x23e72: 0x6d395020, + 0x23e76: 0x6c023020, + 0x23e78: 0x6d3db220, + 0x23e7d: 0x6d03a420, 0x23e7f: 0x6c9ef420, + // Block 0x8fa, offset 0x23e80 + 0x23e80: 0x6c550c20, + 0x23e94: 0x6ce01a20, + 0x23e99: 0x6c0a7220, + 0x23ea3: 0x6c2f8420, + 0x23ea9: 0x6c769820, 0x23eab: 0x6c0c3c20, + 0x23eb0: 0x6c5e1620, 0x23eb1: 0x6c8b5220, 0x23eb2: 0x6c24b820, + // Block 0x8fb, offset 0x23ec0 + 0x23ec3: 0x6cfd2820, + 0x23ec4: 0x6cc55620, + 0x23ed3: 0x6d270220, + 0x23ed5: 0x6d09be20, 0x23ed7: 0x6c8a8020, + 0x23ee3: 0x6ccc2a20, + 0x23ee6: 0x6cd3fc20, + 0x23eea: 0x6d025c20, + 0x23ef3: 0x6cff4a20, + 0x23ef7: 0x6d129620, + 0x23ef8: 0x6c805020, 0x23ef9: 0x6d192e20, + 0x23eff: 0x6c88da20, + // Block 0x8fc, offset 0x23f00 + 0x23f14: 0x6c0fba20, 0x23f15: 0x6c126e20, + 0x23f1d: 0x6d124220, + 0x23f26: 0x6c893620, + 0x23f3b: 0x6cdef020, + // Block 0x8fd, offset 0x23f40 + 0x23f51: 0x6c62ec20, + 0x23f54: 0x6cf75220, 0x23f55: 0x6d377020, + 0x23f5a: 0x6cf75620, + 0x23f5d: 0x6d273220, + 0x23f64: 0x6cfc6c20, 0x23f66: 0x6d3df820, + 0x23f6f: 0x6d2ef820, + 0x23f75: 0x6d410620, 0x23f77: 0x6ca2ce20, + 0x23f7e: 0x6c2a0420, 0x23f7f: 0x6c8ad620, + // Block 0x8fe, offset 0x23f80 + 0x23f80: 0x6ca2d220, + 0x23f89: 0x6cad5420, 0x23f8b: 0x6c721620, + 0x23f96: 0x6c95b220, + 0x23f99: 0x6cd64820, 0x23f9a: 0x6cce5420, + 0x23f9d: 0x6c95b420, 0x23f9f: 0x6c3b3a20, + 0x23fa3: 0x6c065820, + 0x23fa8: 0x6c865820, 0x23fab: 0x6d04a220, + 0x23fb6: 0x6c290820, + // Block 0x8ff, offset 0x23fc0 + 0x23fc0: 0x6c1a8c20, + 0x23fc4: 0x6d2f1420, 0x23fc7: 0x6cda3a20, + 0x23fca: 0x6cd03e20, + 0x23fd2: 0x6c447220, + 0x23fd8: 0x6d209020, 0x23fda: 0x6c5ad420, 0x23fdb: 0x6c183e20, + 0x23fdd: 0x6c698420, 0x23fde: 0x6d3ac420, 0x23fdf: 0x6cd4b220, + 0x23fe2: 0x6cff8420, + 0x23fe6: 0x6ca91420, + 0x23fed: 0x6c674420, 0x23fef: 0x6c674820, + 0x23ff7: 0x6c2e0e20, + 0x23ffd: 0x6cbb0c20, 0x23ffe: 0x6cc04e20, + // Block 0x900, offset 0x24000 + 0x24000: 0x6c3c4020, + 0x24006: 0x6d2e6620, 0x24007: 0x6c77fa20, + 0x24012: 0x6c2ece20, 0x24013: 0x6d2aec20, + 0x24016: 0x6c49f820, 0x24017: 0x6ccb5c20, + 0x24018: 0x6c3bea20, 0x2401b: 0x6c67bc20, + 0x2401d: 0x6d0cd820, 0x2401e: 0x6d370820, + 0x24022: 0x6c872220, + 0x24026: 0x6c8ddc20, + 0x2402a: 0x6d146420, + 0x2402c: 0x6cc23e20, 0x2402d: 0x6cac5220, 0x2402e: 0x6c463a20, + 0x24030: 0x6c640220, 0x24031: 0x6c50da20, 0x24033: 0x6caf0c20, + 0x24035: 0x6c721820, 0x24037: 0x6c180620, + 0x2403a: 0x6c8af220, 0x2403b: 0x6cd35220, + 0x2403c: 0x6cb37a20, 0x2403d: 0x6cfe2820, 0x2403f: 0x6cb08e20, + // Block 0x901, offset 0x24040 + 0x24040: 0x6c95ae20, 0x24041: 0x6c243420, 0x24043: 0x6d225020, + 0x24047: 0x6c79a820, + 0x24048: 0x6d01b020, + 0x2404d: 0x6ced1e20, 0x2404e: 0x6d0d8e20, 0x2404f: 0x6cadd820, + 0x24053: 0x6c1a0620, + 0x24058: 0x6ce34620, 0x24059: 0x6c182820, 0x2405a: 0x6c09ce20, 0x2405b: 0x6c890820, + 0x2405c: 0x6c641e20, 0x2405e: 0x6ce68220, + 0x24062: 0x6ce2f620, + 0x24068: 0x6c2edc20, 0x2406a: 0x6cd60620, 0x2406b: 0x6c842e20, + 0x2406c: 0x6c936020, 0x2406d: 0x6cf97420, 0x2406f: 0x6c24e420, + 0x24073: 0x6c0e9220, + 0x24074: 0x6ce9ba20, 0x24075: 0x6cb45020, 0x24077: 0x6c8c6220, + 0x24078: 0x6c3bec20, 0x2407a: 0x6c0f7620, 0x2407b: 0x6c163620, + 0x2407e: 0x6c290a20, 0x2407f: 0x6cdf5820, + // Block 0x902, offset 0x24080 + 0x24080: 0x6c2a3c20, 0x24083: 0x6c872420, + 0x24085: 0x6d0b1220, 0x24086: 0x6d0b1820, 0x24087: 0x6d2d6620, + 0x2408a: 0x6d14e220, + 0x2408c: 0x6cb4fa20, + 0x24094: 0x6c564420, 0x24096: 0x6ce62a20, + 0x24098: 0x6c79cc20, 0x2409b: 0x6c213220, + 0x2409c: 0x6d1f0020, 0x2409d: 0x6c3bd020, 0x2409f: 0x6caab220, + 0x240a0: 0x6ce53020, 0x240a1: 0x6c6cde20, 0x240a2: 0x6cafbc20, 0x240a3: 0x6c18a420, + 0x240a4: 0x6cb08820, 0x240a6: 0x6c6bc420, 0x240a7: 0x6c4ac820, + 0x240b2: 0x6d3c3220, + 0x240b5: 0x6c552420, 0x240b6: 0x6c1e2420, 0x240b7: 0x6cd5a020, + 0x240b8: 0x6ce1b420, 0x240b9: 0x6cafc620, 0x240ba: 0x6cc70020, 0x240bb: 0x6cc70220, + 0x240bd: 0x6c544e20, 0x240be: 0x6cae5a20, + // Block 0x903, offset 0x240c0 + 0x240c5: 0x6c043e20, 0x240c7: 0x6cf99a20, + 0x240cb: 0x6cbdcc20, + 0x240cc: 0x6ca63220, 0x240ce: 0x6ce1b620, 0x240cf: 0x6cc26a20, + 0x240d2: 0x6d008e20, + 0x240d4: 0x6d2fa820, 0x240d5: 0x6c570e20, 0x240d6: 0x6d02c820, + 0x240d8: 0x6cd42e20, 0x240db: 0x6ce8a620, + 0x240dd: 0x6c895020, 0x240de: 0x6c097c20, 0x240df: 0x6c1e5a20, + 0x240e1: 0x6d037020, 0x240e3: 0x6d02cc20, + 0x240e4: 0x6c3d6820, + 0x240e9: 0x6c6bde20, + 0x240ed: 0x6c3f5e20, + 0x240f0: 0x6ce27a20, 0x240f1: 0x6ccf4c20, + 0x240f4: 0x6c174620, 0x240f5: 0x6c20b820, + 0x240fc: 0x6cc47a20, 0x240fd: 0x6c545620, 0x240fe: 0x6c07ec20, + // Block 0x904, offset 0x24100 + 0x24100: 0x6c113020, + 0x24105: 0x6ca21420, + 0x24109: 0x6d059e20, 0x2410a: 0x6c2eaa20, + 0x2410d: 0x6c15c220, 0x2410e: 0x6d215c20, 0x2410f: 0x6d383620, + 0x24113: 0x6c83e620, + 0x24114: 0x6cd43420, + 0x2411a: 0x6c31a420, + 0x2411c: 0x6c98bc20, 0x2411d: 0x6c59d420, 0x2411f: 0x6ce22c20, + 0x24121: 0x6c326620, 0x24122: 0x6ce34820, 0x24123: 0x6cd10820, + 0x24124: 0x6c9a0e20, + 0x24128: 0x6d316820, 0x24129: 0x6cbd9020, 0x2412a: 0x6cb0ae20, 0x2412b: 0x6ce11620, + 0x2412c: 0x6c123820, 0x2412d: 0x6d112420, 0x2412f: 0x6d054620, + 0x24130: 0x6c053620, 0x24131: 0x6c47b220, + 0x24135: 0x6c10aa20, + 0x2413c: 0x6c46c620, 0x2413d: 0x6c0f2e20, + // Block 0x905, offset 0x24140 + 0x24141: 0x6cf21020, + 0x24144: 0x6c624420, + 0x2414a: 0x6c7e4c20, + 0x2414d: 0x6c24e620, 0x2414e: 0x6c9fc820, 0x2414f: 0x6c242820, + 0x24150: 0x6cab4e20, 0x24151: 0x6d1da620, + 0x24156: 0x6c98fe20, 0x24157: 0x6c78c820, + 0x24158: 0x6c981e20, 0x24159: 0x6c2f8020, 0x2415a: 0x6c582e20, 0x2415b: 0x6c34ac20, + 0x2415c: 0x6c677420, 0x2415d: 0x6cdb0220, + 0x24162: 0x6c135c20, 0x24163: 0x6cde9e20, + 0x24165: 0x6c59f820, 0x24166: 0x6c74be20, 0x24167: 0x6d0a4020, + 0x2416a: 0x6d04a620, + 0x2416c: 0x6c9d8820, 0x2416d: 0x6cc45620, 0x2416e: 0x6c817620, + 0x24171: 0x6d370a20, 0x24172: 0x6cf02820, + 0x24177: 0x6ccb6e20, + 0x2417b: 0x6d29ea20, + // Block 0x906, offset 0x24180 + 0x24181: 0x6c019620, 0x24182: 0x6cf10c20, + 0x24184: 0x6c581e20, 0x24187: 0x6d2e9e20, + 0x24189: 0x6d1c2c20, 0x2418a: 0x6c43bc20, 0x2418b: 0x6c5c9220, + 0x2418d: 0x6cc33420, + 0x24193: 0x6c8b7c20, + 0x24194: 0x6c719a20, 0x24195: 0x6c03de20, 0x24196: 0x6c82a620, + 0x24198: 0x6c97ac20, 0x24199: 0x6c8dde20, + 0x2419c: 0x6c856a20, 0x2419d: 0x6c611420, + 0x241a1: 0x6c5b1620, 0x241a2: 0x6d031820, 0x241a3: 0x6cd30020, + 0x241a4: 0x6d300e20, 0x241a7: 0x6c0e4820, + 0x241ab: 0x6c137a20, + 0x241af: 0x6c137e20, + 0x241b0: 0x6c6d8c20, 0x241b1: 0x6c031c20, 0x241b2: 0x6c06da20, + 0x241b5: 0x6d0e3c20, 0x241b7: 0x6c565e20, + 0x241b9: 0x6d20ba20, 0x241bb: 0x6c091e20, + 0x241bc: 0x6c1ff220, 0x241be: 0x6c612220, + // Block 0x907, offset 0x241c0 + 0x241c2: 0x6ca26c20, + 0x241c4: 0x6c98c420, 0x241c5: 0x6d379420, 0x241c7: 0x6d12c620, + 0x241c8: 0x6c30a020, 0x241c9: 0x6d12a420, + 0x241cd: 0x6cc63c20, 0x241ce: 0x6d19a620, + 0x241d0: 0x6c501e20, 0x241d2: 0x6ca31220, 0x241d3: 0x6ce61020, + 0x241d4: 0x6c3fb620, 0x241d5: 0x6ca22c20, 0x241d6: 0x6d291020, + 0x241d8: 0x6c552820, 0x241da: 0x6c185c20, 0x241db: 0x6ceaf420, + 0x241de: 0x6c1f1220, 0x241df: 0x6c3df820, + 0x241e7: 0x6c063420, + 0x241ec: 0x6c2bde20, 0x241ed: 0x6c111c20, 0x241ee: 0x6c921220, 0x241ef: 0x6cb35020, + 0x241f0: 0x6c268620, 0x241f1: 0x6d12da20, 0x241f3: 0x6d15d220, + 0x241f7: 0x6cfdb620, + 0x241f8: 0x6c086e20, 0x241f9: 0x6d398c20, 0x241fb: 0x6d14a620, + 0x241fd: 0x6c93d220, 0x241ff: 0x6c7b9420, + // Block 0x908, offset 0x24200 + 0x24202: 0x6d35a420, + 0x24207: 0x6cec0820, + 0x24208: 0x6c2b1c20, 0x24209: 0x6cd5b020, 0x2420a: 0x6c8ad820, 0x2420b: 0x6d2a4220, + 0x2420c: 0x6d35a620, 0x2420d: 0x6ca49e20, + 0x24217: 0x6c147220, + 0x2421a: 0x6cfea620, 0x2421b: 0x6d2a0220, + 0x2421e: 0x6d22f420, 0x2421f: 0x6c310620, + 0x24220: 0x6c143e20, 0x24221: 0x6d009020, 0x24222: 0x6d0fa220, + 0x24224: 0x6cfc0220, 0x24225: 0x6c05f220, + 0x2422e: 0x6d2cec20, + 0x24230: 0x6cc03420, 0x24232: 0x6c553420, 0x24233: 0x6d293220, + 0x24234: 0x6c741620, 0x24236: 0x6c4d9a20, + 0x2423f: 0x6c01ae20, + // Block 0x909, offset 0x24240 + 0x24240: 0x6d2a7820, 0x24243: 0x6ccc4c20, + 0x24245: 0x6cfcb220, 0x24246: 0x6c1b9e20, 0x24247: 0x6d0d6a20, + 0x24249: 0x6c01ba20, + 0x2424d: 0x6d305220, 0x2424e: 0x6c742c20, + 0x24251: 0x6c85ea20, 0x24253: 0x6c822020, + 0x24256: 0x6c112c20, + 0x24258: 0x6c924220, 0x2425a: 0x6c634c20, + 0x2425d: 0x6cfa3820, 0x2425e: 0x6cfff020, 0x2425f: 0x6d0c0c20, + 0x24260: 0x6d05a020, 0x24262: 0x6c33f020, 0x24263: 0x6d1c7620, + 0x24264: 0x6c5ab820, 0x24265: 0x6ce32820, 0x24266: 0x6caa0020, 0x24267: 0x6cf7e820, + 0x2426a: 0x6ce8b220, + 0x24277: 0x6cec5620, + 0x24278: 0x6c186620, + 0x2427c: 0x6c52aa20, 0x2427e: 0x6ce32a20, 0x2427f: 0x6d07a020, + // Block 0x90a, offset 0x24280 + 0x24280: 0x6d28bc20, + 0x24287: 0x6c43f020, + 0x2428b: 0x6c908c20, + 0x2428c: 0x6c147c20, 0x2428d: 0x6cac6020, 0x2428e: 0x6c605820, + 0x24290: 0x6cde5e20, 0x24293: 0x6cf64e20, + 0x24296: 0x6cfeda20, + 0x24298: 0x6ccab620, 0x24299: 0x6c637020, 0x2429a: 0x6cdad420, 0x2429b: 0x6c599a20, + 0x2429d: 0x6c25bc20, 0x2429f: 0x6cde6020, + 0x242a0: 0x6cd65420, + 0x242aa: 0x6c3e9a20, 0x242ab: 0x6c863620, + 0x242ad: 0x6ccf5a20, 0x242af: 0x6ce10620, + 0x242b6: 0x6c2cd020, + 0x242ba: 0x6c09fa20, + 0x242bc: 0x6c46c820, 0x242bd: 0x6c244620, 0x242bf: 0x6cb90820, + // Block 0x90b, offset 0x242c0 + 0x242c2: 0x6c824620, 0x242c3: 0x6cdaea20, + 0x242c6: 0x6d402420, 0x242c7: 0x6c4faa20, + 0x242cf: 0x6c1c4420, + 0x242d0: 0x6c128020, 0x242d3: 0x6cf30420, + 0x242d4: 0x6cfef220, 0x242d5: 0x6c8b2020, 0x242d6: 0x6d0c1e20, + 0x242dd: 0x6c09fc20, 0x242df: 0x6c594220, + 0x242e1: 0x6cf67820, 0x242e2: 0x6c1ac820, 0x242e3: 0x6d05d620, + 0x242e4: 0x6ca4bc20, 0x242e5: 0x6d0cc020, 0x242e7: 0x6d01fc20, + 0x242e8: 0x6d2c4a20, 0x242ea: 0x6cdc5e20, + 0x242ec: 0x6cf8ca20, 0x242ed: 0x6c080620, 0x242ee: 0x6cc48420, 0x242ef: 0x6cd79820, + 0x242f0: 0x6c049020, 0x242f1: 0x6c4b6a20, 0x242f2: 0x6c763c20, 0x242f3: 0x6c188020, + 0x242f6: 0x6d072820, + 0x242fe: 0x6c368620, 0x242ff: 0x6c865a20, + // Block 0x90c, offset 0x24300 + 0x24300: 0x6cf69e20, 0x24301: 0x6c594c20, 0x24302: 0x6cdb0420, + 0x24304: 0x6c16f620, + 0x2430a: 0x6c92a820, 0x2430b: 0x6d0cc220, + 0x2430e: 0x6c290620, 0x2430f: 0x6c284620, + 0x24310: 0x6d0f6a20, 0x24312: 0x6d2d3620, 0x24313: 0x6c729020, + 0x24315: 0x6c345e20, 0x24316: 0x6ccabe20, 0x24317: 0x6c7f2a20, + 0x24318: 0x6cdb1c20, + 0x2431f: 0x6d2b0020, + 0x24323: 0x6c0a5020, + 0x24326: 0x6d1b8c20, + 0x24328: 0x6c4fb420, 0x2432a: 0x6c8b3a20, + 0x2432d: 0x6c4ff620, 0x2432e: 0x6d0fdc20, + 0x24334: 0x6cd7a420, 0x24335: 0x6c00f020, 0x24336: 0x6cbf7420, + 0x24339: 0x6c82ec20, 0x2433a: 0x6d011220, + 0x2433c: 0x6cd3f220, + // Block 0x90d, offset 0x24340 + 0x24343: 0x6c91ec20, + 0x24345: 0x6cc41220, 0x24346: 0x6c888020, + 0x2434c: 0x6d001a20, 0x2434e: 0x6d1c2020, + 0x24351: 0x6d012620, + 0x24358: 0x6c8d9e20, 0x24359: 0x6d1ed620, + 0x2435e: 0x6c294020, 0x2435f: 0x6c806020, + 0x24360: 0x6cff5e20, + 0x24368: 0x6d182a20, + 0x2436c: 0x6cf34c20, 0x2436e: 0x6d168e20, 0x2436f: 0x6ceaa420, + 0x24370: 0x6c102e20, 0x24372: 0x6d032020, + 0x24375: 0x6cd7c420, 0x24376: 0x6c6c2a20, + 0x24378: 0x6c031e20, 0x24379: 0x6c383020, 0x2437b: 0x6ca0d420, + 0x2437c: 0x6cc91220, + // Block 0x90e, offset 0x24380 + 0x2438a: 0x6c26ea20, 0x2438b: 0x6c619820, + 0x24390: 0x6cda8820, 0x24391: 0x6cbf0620, 0x24392: 0x6c033020, + 0x243a6: 0x6ce48c20, 0x243a7: 0x6d1f0a20, + 0x243a9: 0x6ceb0020, 0x243ab: 0x6cec6c20, + 0x243ac: 0x6d202e20, 0x243ae: 0x6c2fe820, + 0x243b1: 0x6cf7d820, 0x243b2: 0x6c799820, + 0x243b6: 0x6cbf0c20, 0x243b7: 0x6c32f820, + 0x243b8: 0x6c34e420, 0x243ba: 0x6d173620, + // Block 0x90f, offset 0x243c0 + 0x243d2: 0x6cf5c820, 0x243d3: 0x6cbd2420, + 0x243d4: 0x6cda9220, 0x243d7: 0x6c8e5220, + 0x243d9: 0x6cecd820, + 0x243ed: 0x6c17da20, 0x243ee: 0x6d399a20, + 0x243f0: 0x6c997220, + 0x243f7: 0x6cc2de20, + 0x243fd: 0x6d208c20, 0x243ff: 0x6d17ac20, + // Block 0x910, offset 0x24400 + 0x24400: 0x6c9c5020, 0x24403: 0x6c7f0c20, + 0x24404: 0x6d362e20, + 0x24424: 0x6ca5e620, 0x24426: 0x6c048220, + 0x2442a: 0x6c300420, + 0x2442e: 0x6d363020, + // Block 0x911, offset 0x24440 + 0x24455: 0x6d17ec20, + 0x24458: 0x6c8d1e20, 0x24459: 0x6d216020, 0x2445a: 0x6c231e20, 0x2445b: 0x6c2c6a20, + 0x2445c: 0x6d365c20, + 0x24460: 0x6cc86820, 0x24463: 0x6c669a20, + 0x24469: 0x6ced8c20, 0x2446b: 0x6c6d2c20, + 0x2446d: 0x6cad0820, + // Block 0x912, offset 0x24480 + 0x2448d: 0x6c928a20, 0x2448e: 0x6cc1a620, + 0x24490: 0x6cf80020, 0x24491: 0x6c26b420, + 0x24496: 0x6c56c220, 0x24497: 0x6c95bc20, + 0x24499: 0x6c822820, + 0x244b6: 0x6c45f820, + 0x244bb: 0x6c8e2620, + // Block 0x913, offset 0x244c0 + 0x244c2: 0x6c817820, + 0x244c4: 0x6d3be420, + 0x244e8: 0x6d2a5220, 0x244e9: 0x6c506a20, 0x244ea: 0x6cfe5420, + 0x244ed: 0x6c507020, 0x244ee: 0x6c86a220, + 0x244f1: 0x6c2d8820, 0x244f2: 0x6c444020, + 0x244fd: 0x6c58a820, + // Block 0x914, offset 0x24500 + 0x24504: 0x6c36b620, 0x24506: 0x6cf9fe20, + 0x2450b: 0x6c651820, + 0x2450c: 0x6cb67420, 0x2450d: 0x6cfa0820, 0x2450e: 0x6d1ffa20, + 0x24521: 0x6d330420, + 0x2452a: 0x6d3bf220, + 0x2452e: 0x6c163a20, + // Block 0x915, offset 0x24540 + 0x24549: 0x6d027a20, + 0x24555: 0x6ca4d620, + 0x2455d: 0x6c62ee20, 0x2455e: 0x6ce4d620, + 0x24563: 0x6d0e3220, + 0x24567: 0x6c500c20, + 0x24568: 0x6d030820, 0x24569: 0x6c8de020, 0x2456b: 0x6c047620, + 0x2456c: 0x6c081220, + 0x24571: 0x6c463e20, 0x24572: 0x6c8cc820, + 0x24575: 0x6c7df420, 0x24576: 0x6cb85e20, 0x24577: 0x6c699e20, + 0x24579: 0x6c371420, 0x2457a: 0x6d10fa20, 0x2457b: 0x6c316e20, + // Block 0x916, offset 0x24580 + 0x24581: 0x6c5d9220, 0x24582: 0x6c322420, 0x24583: 0x6cadbe20, + 0x2458c: 0x6d259820, 0x2458f: 0x6c90b820, + 0x24590: 0x6d03f820, 0x24593: 0x6c883a20, + 0x24594: 0x6d113820, 0x24595: 0x6cf6a020, 0x24596: 0x6d114420, + 0x24598: 0x6cf70020, 0x2459b: 0x6c918a20, + 0x2459d: 0x6d0f0020, + 0x245a0: 0x6cc33820, + 0x245a5: 0x6cc50020, 0x245a6: 0x6cec2020, 0x245a7: 0x6d40a420, + 0x245a8: 0x6c392e20, 0x245a9: 0x6d16c620, 0x245aa: 0x6c323c20, 0x245ab: 0x6cdc2620, + 0x245ad: 0x6caf4820, 0x245af: 0x6c4de820, + 0x245b1: 0x6d069820, 0x245b3: 0x6c45e620, + 0x245b5: 0x6c2c2e20, 0x245b7: 0x6ca32620, + 0x245be: 0x6c34ec20, 0x245bf: 0x6cebda20, + // Block 0x917, offset 0x245c0 + 0x245c2: 0x6ca81820, + 0x245c8: 0x6c2e1a20, 0x245c9: 0x6c598e20, + 0x245cc: 0x6ce32c20, 0x245cd: 0x6c395420, + 0x245d1: 0x6cf3ca20, 0x245d2: 0x6c01fe20, + 0x245d4: 0x6cb2a820, + 0x245d9: 0x6c4e1420, 0x245db: 0x6c428820, + 0x245dc: 0x6c83e820, 0x245de: 0x6c339c20, 0x245df: 0x6c400e20, + 0x245e0: 0x6ca35020, 0x245e2: 0x6c132220, + 0x245e7: 0x6c6a2820, + 0x245e9: 0x6cbed020, 0x245eb: 0x6d1bd020, + 0x245ec: 0x6cfdd220, + 0x245f1: 0x6c557c20, + 0x245f4: 0x6cdaec20, + 0x245fb: 0x6c43a420, + 0x245fc: 0x6c368820, 0x245fd: 0x6d072a20, + // Block 0x918, offset 0x24600 + 0x24606: 0x6cf6cc20, + 0x2460a: 0x6c774c20, 0x2460b: 0x6c4c8a20, + 0x2460c: 0x6c6a3620, 0x2460d: 0x6c200c20, 0x2460e: 0x6c826220, 0x2460f: 0x6c527620, + 0x24610: 0x6d41f420, + 0x24615: 0x6cb1e620, + 0x24618: 0x6c2ab420, 0x24619: 0x6cf70220, 0x2461a: 0x6c826820, + 0x2461c: 0x6ccdc620, + 0x24627: 0x6c918c20, + 0x24629: 0x6c338a20, 0x2462a: 0x6c760420, + 0x2462d: 0x6c164820, 0x2462f: 0x6d012c20, + 0x24630: 0x6cec0220, 0x24631: 0x6d30c420, 0x24633: 0x6d3b9e20, + 0x24637: 0x6c8f6020, + 0x24638: 0x6c82aa20, + 0x2463c: 0x6c273620, 0x2463d: 0x6c417820, + // Block 0x919, offset 0x24640 + 0x24644: 0x6cd34020, 0x24647: 0x6d0da420, + 0x2464c: 0x6c41b420, + 0x24650: 0x6d0d0020, + 0x24656: 0x6cdbac20, + 0x2465a: 0x6d37a620, + 0x2465c: 0x6cd34220, + 0x24661: 0x6cd15c20, + 0x24665: 0x6c15ae20, + 0x24677: 0x6c5a0820, + 0x24678: 0x6d1b8e20, 0x2467b: 0x6c9bee20, + // Block 0x91a, offset 0x24680 + 0x24682: 0x6cc4f220, + 0x24685: 0x6cfdae20, + 0x24688: 0x6c071420, + 0x2468c: 0x6c200820, + 0x24691: 0x6cb47620, + 0x24699: 0x6c77d220, 0x2469a: 0x6c7e3820, + 0x2469d: 0x6cc35020, 0x2469f: 0x6c4f9220, + 0x246a0: 0x6c1bf220, 0x246a1: 0x6c983820, + 0x246a6: 0x6d2cb020, + 0x246aa: 0x6c3bd220, + 0x246ac: 0x6c17b420, + 0x246b3: 0x6c6e1820, + // Block 0x91b, offset 0x246c0 + 0x246c3: 0x6c8ada20, + 0x246c5: 0x6ca31c20, 0x246c6: 0x6ca31e20, 0x246c7: 0x6ce72a20, + 0x246cb: 0x6cc46620, + 0x246cc: 0x6d411620, 0x246cd: 0x6caf5420, 0x246ce: 0x6d1fba20, + 0x246d0: 0x6cd4be20, + 0x246db: 0x6c8af420, + 0x246dc: 0x6cd43020, 0x246dd: 0x6ce97e20, 0x246df: 0x6c430220, + 0x246e0: 0x6ccea220, 0x246e1: 0x6ceb0420, 0x246e3: 0x6ca3f220, + 0x246e7: 0x6ceb7a20, + 0x246e8: 0x6c458220, 0x246e9: 0x6c2e1c20, + 0x246f4: 0x6c9bd020, 0x246f5: 0x6c052820, 0x246f7: 0x6d00a420, + 0x246f8: 0x6cd8b420, 0x246f9: 0x6ce6c820, 0x246fa: 0x6c4b4220, + 0x246fd: 0x6c3e8020, 0x246fe: 0x6c4b4820, + // Block 0x91c, offset 0x24700 + 0x24709: 0x6c4b4a20, + 0x24711: 0x6d3a7420, 0x24713: 0x6c7f1420, + 0x24715: 0x6c951620, 0x24716: 0x6ce50020, 0x24717: 0x6cc4c620, + 0x2471a: 0x6c300820, + 0x24728: 0x6c737220, 0x24729: 0x6d0cac20, + 0x2472c: 0x6cc84020, 0x2472d: 0x6c283a20, + 0x24730: 0x6c999e20, + 0x24736: 0x6c944020, + 0x24738: 0x6d072c20, 0x2473a: 0x6cf6a220, + // Block 0x91d, offset 0x24740 + 0x24742: 0x6c967420, 0x24743: 0x6cb52220, + 0x24745: 0x6c144820, + 0x24748: 0x6cce1e20, 0x24749: 0x6c4f0820, 0x2474a: 0x6cb2ce20, + 0x2474e: 0x6c5f3820, + 0x24753: 0x6c86a620, + 0x24755: 0x6d240c20, 0x24756: 0x6c04a420, + 0x24758: 0x6ce29220, + 0x2475d: 0x6c1de820, + 0x24760: 0x6c1dea20, + 0x24764: 0x6cb54420, 0x24765: 0x6cf70420, 0x24766: 0x6c076820, + 0x2476a: 0x6d138020, + 0x2476d: 0x6c4a1020, 0x2476f: 0x6d3b3a20, + 0x24773: 0x6c827c20, + 0x24774: 0x6c827e20, 0x24775: 0x6c13be20, + // Block 0x91e, offset 0x24780 + 0x24780: 0x6c4a1420, + 0x2478d: 0x6c2f2420, + 0x24793: 0x6d0b4420, + 0x24798: 0x6ca7fc20, 0x24799: 0x6cd4de20, 0x2479b: 0x6d363220, + 0x2479f: 0x6d36e420, + 0x247a2: 0x6d36e620, 0x247a3: 0x6cb07620, + 0x247a5: 0x6c6f4e20, 0x247a6: 0x6c6f5220, 0x247a7: 0x6d169020, + 0x247a8: 0x6d201220, 0x247aa: 0x6c6f5420, + 0x247af: 0x6c58f220, + 0x247b1: 0x6c323e20, + 0x247bb: 0x6ce20c20, + 0x247bc: 0x6cbc9e20, 0x247bd: 0x6cbd5c20, 0x247be: 0x6d032420, 0x247bf: 0x6c14bc20, + // Block 0x91f, offset 0x247c0 + 0x247c0: 0x6c61ae20, 0x247c2: 0x6cbe0a20, + 0x247ca: 0x6c324620, 0x247cb: 0x6d33aa20, + 0x247ce: 0x6cab7820, + 0x247d0: 0x6cf4c820, 0x247d2: 0x6cf18620, + 0x247d8: 0x6c096620, 0x247db: 0x6c069420, + 0x247dd: 0x6ca23c20, 0x247de: 0x6c6cf420, 0x247df: 0x6ce21220, + 0x247e0: 0x6c89e220, + 0x247e5: 0x6c127220, 0x247e6: 0x6d2c2820, + 0x247ec: 0x6c1b8e20, 0x247ed: 0x6d0ae020, 0x247ee: 0x6c7c6420, 0x247ef: 0x6d1b4420, + 0x247f8: 0x6c8f8820, 0x247f9: 0x6cb86020, 0x247fb: 0x6c4f4c20, + 0x247fc: 0x6cce5020, 0x247fd: 0x6c4d6420, 0x247fe: 0x6c139220, + // Block 0x920, offset 0x24800 + 0x24800: 0x6c68e220, 0x24801: 0x6c81ae20, + 0x24808: 0x6cf5fa20, 0x2480b: 0x6c0ef220, + 0x24813: 0x6d351a20, + 0x24815: 0x6cea8a20, 0x24816: 0x6c3e8220, + 0x24818: 0x6c54ce20, 0x2481a: 0x6ca83220, 0x2481b: 0x6d17ae20, + 0x2481c: 0x6d3c4020, + 0x24820: 0x6c13e620, + 0x24824: 0x6cdb8220, 0x24827: 0x6d283620, + 0x2482e: 0x6c325e20, + 0x24830: 0x6cf61c20, 0x24831: 0x6c203620, 0x24832: 0x6d03e820, 0x24833: 0x6c68fa20, + 0x24834: 0x6ccfea20, + // Block 0x921, offset 0x24840 + 0x24840: 0x6cedca20, 0x24841: 0x6c06a220, 0x24842: 0x6c3a3a20, 0x24843: 0x6c669c20, + 0x24844: 0x6cc30020, 0x24845: 0x6d17f020, 0x24846: 0x6c300a20, 0x24847: 0x6d06f620, + 0x24848: 0x6ca35220, 0x24849: 0x6c605a20, + 0x2484c: 0x6d31e620, 0x2484d: 0x6cb5fa20, 0x2484e: 0x6c330a20, 0x2484f: 0x6d1a7220, + 0x24851: 0x6c700420, 0x24852: 0x6caffe20, 0x24853: 0x6d033e20, + 0x24854: 0x6c94fe20, 0x24855: 0x6c113420, 0x24856: 0x6c8e2020, 0x24857: 0x6c0cac20, + 0x24858: 0x6c2a1c20, 0x24859: 0x6c2a7620, + 0x2485f: 0x6c7ed820, + 0x24861: 0x6cf65020, 0x24862: 0x6c725620, + 0x24864: 0x6cff9020, 0x24866: 0x6c6dc020, + 0x24879: 0x6cec7220, 0x2487b: 0x6ca50a20, + 0x2487c: 0x6cfd8220, 0x2487d: 0x6cc3e220, 0x2487e: 0x6cbcd420, 0x2487f: 0x6ce86a20, + // Block 0x922, offset 0x24880 + 0x24880: 0x6d064a20, 0x24881: 0x6c5bfc20, + 0x24885: 0x6c9f6c20, 0x24886: 0x6ceff220, + 0x24888: 0x6d1f5620, 0x24889: 0x6ce9ae20, 0x2488a: 0x6c278020, + 0x2488e: 0x6c786c20, 0x2488f: 0x6ca36220, + 0x24891: 0x6c401c20, 0x24892: 0x6d239620, 0x24893: 0x6d354420, + 0x24895: 0x6c4dae20, 0x24896: 0x6c002e20, 0x24897: 0x6c401e20, + 0x248a1: 0x6d0f6220, + 0x248a4: 0x6cd27e20, 0x248a6: 0x6c150c20, + 0x248aa: 0x6c1c5c20, 0x248ab: 0x6d284820, + 0x248ac: 0x6cd65a20, 0x248ae: 0x6cdb0620, 0x248af: 0x6cca8620, + 0x248b1: 0x6c368a20, 0x248b2: 0x6d332e20, 0x248b3: 0x6c004e20, + 0x248b4: 0x6cdd8c20, 0x248b5: 0x6c10b220, 0x248b7: 0x6cc45220, + 0x248b8: 0x6d185e20, 0x248b9: 0x6d0dca20, 0x248bb: 0x6ca36620, + 0x248bc: 0x6cf46a20, + // Block 0x923, offset 0x248c0 + 0x248c7: 0x6c865c20, + 0x248c8: 0x6c865e20, 0x248ca: 0x6cf6a820, 0x248cb: 0x6c749c20, + 0x248cc: 0x6cd1ea20, 0x248ce: 0x6d0b5c20, + 0x248db: 0x6c18e420, + 0x248dc: 0x6d1c8c20, 0x248dd: 0x6c0a5220, 0x248de: 0x6c184020, + 0x248e1: 0x6d2bfc20, 0x248e2: 0x6ceb9020, 0x248e3: 0x6c56c620, + 0x248e4: 0x6ce2b220, 0x248e5: 0x6d1d4c20, 0x248e6: 0x6c08f820, 0x248e7: 0x6ca91e20, + 0x248e8: 0x6c891a20, 0x248e9: 0x6d034c20, 0x248ea: 0x6d229020, + 0x248f2: 0x6c075e20, + 0x248f4: 0x6ca07820, 0x248f5: 0x6c331420, 0x248f7: 0x6c29ea20, + 0x248f8: 0x6cb64c20, + // Block 0x924, offset 0x24900 + 0x24900: 0x6cd65c20, 0x24903: 0x6cff1e20, + 0x24904: 0x6d380a20, 0x24905: 0x6d3cb220, 0x24907: 0x6c0bca20, + 0x24909: 0x6cf02a20, 0x2490a: 0x6cf6ec20, + 0x2490c: 0x6c2aae20, 0x2490e: 0x6d005620, 0x2490f: 0x6cac4620, + 0x24910: 0x6ca87a20, 0x24913: 0x6c0cfa20, + 0x24914: 0x6ccf7a20, 0x24915: 0x6c3ad820, 0x24916: 0x6c9fcc20, 0x24917: 0x6cb7e820, + 0x2492a: 0x6ccdbc20, 0x2492b: 0x6cdd9c20, + 0x24937: 0x6c60c020, + 0x2493a: 0x6c285020, 0x2493b: 0x6c739c20, + 0x2493c: 0x6c930420, 0x2493e: 0x6c02f620, + // Block 0x925, offset 0x24940 + 0x24942: 0x6d18ea20, 0x24943: 0x6cd57a20, + 0x24944: 0x6cdc9c20, 0x24945: 0x6cf0f220, 0x24946: 0x6cecec20, 0x24947: 0x6c1ef420, + 0x2494c: 0x6cf32820, + 0x24956: 0x6c0aa420, + 0x24958: 0x6d1b1a20, 0x24959: 0x6c5d8220, + 0x2495c: 0x6c769c20, 0x2495d: 0x6ca93020, + 0x24962: 0x6c00fc20, + 0x24964: 0x6c870020, 0x24966: 0x6d2d0220, + 0x24971: 0x6c933020, + 0x24976: 0x6c0bd420, 0x24977: 0x6cac8a20, + 0x2497f: 0x6c4b9c20, + // Block 0x926, offset 0x24980 + 0x24980: 0x6cda6a20, 0x24981: 0x6c9ba020, 0x24982: 0x6cfc5220, 0x24983: 0x6c906e20, + 0x24985: 0x6cb80220, + 0x2498b: 0x6c164a20, + 0x2498c: 0x6d195c20, 0x2498d: 0x6c4f8e20, 0x2498f: 0x6c88e020, + 0x24990: 0x6c49c220, 0x24992: 0x6cf06020, + 0x24997: 0x6c752020, + 0x24998: 0x6c829c20, 0x24999: 0x6c946620, 0x2499a: 0x6c87a620, + 0x2499c: 0x6cb03e20, + 0x249a2: 0x6c58e820, + 0x249ae: 0x6c4a5820, + 0x249b3: 0x6c713420, + 0x249b6: 0x6c2aa220, + 0x249ba: 0x6c3ad220, + // Block 0x927, offset 0x249c0 + 0x249c1: 0x6d338e20, 0x249c3: 0x6c9a7a20, + 0x249c5: 0x6c58f420, + 0x249c9: 0x6cabba20, 0x249ca: 0x6c08c420, + 0x249cc: 0x6cb30020, + 0x249d3: 0x6c374220, + 0x249d5: 0x6c58fc20, + 0x249e3: 0x6c170c20, + 0x249e5: 0x6c95fc20, 0x249e6: 0x6c3d2820, + 0x249ef: 0x6c1db220, + 0x249f1: 0x6d40c020, 0x249f2: 0x6ca3fe20, 0x249f3: 0x6cffae20, + 0x249f9: 0x6c044820, 0x249fa: 0x6c926620, + 0x249fc: 0x6c961220, 0x249ff: 0x6ca76620, + // Block 0x928, offset 0x24a00 + 0x24a00: 0x6d2ad020, + 0x24a04: 0x6d3b0a20, 0x24a05: 0x6c557420, + 0x24a08: 0x6c5ad820, 0x24a09: 0x6ce17c20, 0x24a0a: 0x6c1dca20, + 0x24a11: 0x6c59e020, 0x24a12: 0x6c30b820, + 0x24a1b: 0x6c9eba20, + 0x24a1d: 0x6c0f5a20, + 0x24a20: 0x6c2ca420, 0x24a22: 0x6c2ad020, 0x24a23: 0x6cb41620, + 0x24a25: 0x6cd94020, 0x24a26: 0x6c1dec20, + 0x24a2b: 0x6d123c20, + 0x24a2c: 0x6c9bf020, 0x24a2d: 0x6c8fc820, + 0x24a32: 0x6c888220, + 0x24a35: 0x6c0d0620, + 0x24a3a: 0x6c93c220, + 0x24a3f: 0x6ccba020, + // Block 0x929, offset 0x24a40 + 0x24a40: 0x6d425820, + 0x24a44: 0x6c25aa20, 0x24a45: 0x6c8de420, 0x24a46: 0x6d331a20, 0x24a47: 0x6cb05220, + 0x24a48: 0x6c05c220, 0x24a4b: 0x6cc3a420, + 0x24a4e: 0x6caf4a20, 0x24a4f: 0x6ca44220, + 0x24a50: 0x6caf4c20, 0x24a51: 0x6c0fe220, 0x24a52: 0x6c06f020, 0x24a53: 0x6c37e820, + 0x24a55: 0x6c9fa620, 0x24a56: 0x6ca0f220, 0x24a57: 0x6cec2420, + 0x24a58: 0x6d2f6020, 0x24a59: 0x6d35c220, 0x24a5a: 0x6c240c20, + 0x24a5f: 0x6d0a0620, + 0x24a60: 0x6c602020, 0x24a61: 0x6c4b4420, 0x24a63: 0x6c19ea20, + 0x24a67: 0x6c4ec620, + 0x24a68: 0x6cfff220, 0x24a69: 0x6cc3c020, 0x24a6b: 0x6c21be20, + 0x24a6d: 0x6c3f6420, + 0x24a73: 0x6cbdde20, + 0x24a74: 0x6c926820, 0x24a75: 0x6cc3d020, 0x24a76: 0x6c2d1e20, 0x24a77: 0x6cb8f020, + 0x24a7c: 0x6c16ee20, 0x24a7d: 0x6cde6220, 0x24a7e: 0x6c06ae20, + // Block 0x92a, offset 0x24a80 + 0x24a81: 0x6c326c20, 0x24a82: 0x6c082620, 0x24a83: 0x6c547820, + 0x24a88: 0x6d2c8420, 0x24a89: 0x6d2c8620, + 0x24a8e: 0x6cc3ee20, 0x24a8f: 0x6c967620, + 0x24a90: 0x6c4e2c20, 0x24a93: 0x6c8e8620, + 0x24a94: 0x6c92d020, 0x24a96: 0x6d3e8c20, + 0x24a98: 0x6cb07020, 0x24a99: 0x6d395220, 0x24a9b: 0x6d2a2420, + 0x24a9d: 0x6ca9a020, + 0x24aa0: 0x6c5c5620, 0x24aa3: 0x6d092020, + 0x24aa5: 0x6c7ea020, + 0x24aab: 0x6caa0620, + 0x24aac: 0x6d0dfa20, 0x24aad: 0x6cc4d820, 0x24aae: 0x6ca52220, + 0x24ab0: 0x6c7eb420, 0x24ab1: 0x6c4a1220, 0x24ab2: 0x6c31e220, + 0x24ab5: 0x6c919020, + 0x24ab9: 0x6c663c20, 0x24aba: 0x6d028c20, 0x24abb: 0x6cb80e20, + 0x24abe: 0x6cfe7420, + // Block 0x92b, offset 0x24ac0 + 0x24ac1: 0x6c4cb020, 0x24ac2: 0x6c6a8420, 0x24ac3: 0x6c98b620, + 0x24ac6: 0x6cf95820, 0x24ac7: 0x6c7c3620, + 0x24ace: 0x6d1e7620, + 0x24ad0: 0x6c4d3c20, 0x24ad1: 0x6c9d3220, 0x24ad2: 0x6d11fc20, + 0x24ad5: 0x6cf14c20, + 0x24adf: 0x6c85f220, + 0x24ae0: 0x6c735820, 0x24ae1: 0x6cf36420, 0x24ae2: 0x6cbbda20, + 0x24aee: 0x6c2e2a20, 0x24aef: 0x6c1f4220, + 0x24af2: 0x6cdd1c20, + 0x24af5: 0x6c1cc420, + 0x24af8: 0x6cc2a020, 0x24af9: 0x6ccf5e20, + // Block 0x92c, offset 0x24b00 + 0x24b02: 0x6c9bd820, 0x24b03: 0x6c726820, + 0x24b0b: 0x6ce8e620, + 0x24b12: 0x6ca9c020, 0x24b13: 0x6ca07a20, + 0x24b19: 0x6c3bee20, + 0x24b22: 0x6c027020, 0x24b23: 0x6c4c3e20, + 0x24b24: 0x6c55b420, 0x24b25: 0x6c11b820, 0x24b26: 0x6c33b220, 0x24b27: 0x6c4d4820, + 0x24b28: 0x6c694e20, + 0x24b30: 0x6c473a20, + 0x24b35: 0x6c6c6020, + 0x24b38: 0x6d0fe420, + // Block 0x92d, offset 0x24b40 + 0x24b40: 0x6c145020, + 0x24b4c: 0x6c5b0820, + 0x24b54: 0x6cc20c20, 0x24b55: 0x6c784420, + 0x24b5f: 0x6cbe6620, + 0x24b60: 0x6d197a20, 0x24b63: 0x6c767a20, + 0x24b64: 0x6c68b820, 0x24b67: 0x6c1d6220, + 0x24b68: 0x6c103020, 0x24b69: 0x6c44ae20, 0x24b6a: 0x6c682620, 0x24b6b: 0x6d339020, + 0x24b6e: 0x6cf20020, + 0x24b70: 0x6c0d2220, + 0x24b74: 0x6d048820, 0x24b75: 0x6c393020, + 0x24b78: 0x6d147620, 0x24b79: 0x6c203020, 0x24b7a: 0x6d11ee20, + 0x24b7d: 0x6d0f4c20, 0x24b7e: 0x6c324020, 0x24b7f: 0x6d0d4a20, + // Block 0x92e, offset 0x24b80 + 0x24b81: 0x6c9b0a20, + 0x24b87: 0x6c1a9620, + 0x24b88: 0x6ca27420, 0x24b89: 0x6c683420, 0x24b8b: 0x6caa7a20, + 0x24b8d: 0x6c4c6420, 0x24b8e: 0x6d094a20, + 0x24b91: 0x6c3e1c20, 0x24b92: 0x6d08dc20, 0x24b93: 0x6c3d4c20, + 0x24b94: 0x6cae1020, 0x24b95: 0x6ca0ea20, 0x24b96: 0x6cf5a820, 0x24b97: 0x6cf2dc20, + 0x24b98: 0x6ccd3620, 0x24b9b: 0x6cf5aa20, + 0x24b9c: 0x6cb75a20, 0x24b9d: 0x6c9e5220, + 0x24ba6: 0x6c282820, + 0x24ba8: 0x6c1e2820, + 0x24bb1: 0x6c3a9c20, 0x24bb2: 0x6c9ec820, + 0x24bb4: 0x6d095020, 0x24bb5: 0x6d06ae20, 0x24bb6: 0x6cd7dc20, 0x24bb7: 0x6c71b220, + 0x24bb8: 0x6c993420, 0x24bb9: 0x6c063e20, 0x24bbb: 0x6d14d220, + 0x24bbc: 0x6c485020, 0x24bbd: 0x6ca69220, 0x24bbf: 0x6d14d420, + // Block 0x92f, offset 0x24bc0 + 0x24bc1: 0x6d429020, + 0x24bc4: 0x6caa5420, + 0x24bd1: 0x6c2d4820, 0x24bd2: 0x6c393c20, 0x24bd3: 0x6d173a20, + 0x24bd4: 0x6cd35a20, 0x24bd7: 0x6c240e20, + 0x24bd8: 0x6d31ce20, + 0x24bde: 0x6cd36a20, 0x24bdf: 0x6c68e620, + 0x24be0: 0x6c546a20, 0x24be1: 0x6c375020, + 0x24be6: 0x6c833220, 0x24be7: 0x6d095420, + 0x24be8: 0x6c452c20, 0x24bea: 0x6cd43220, + 0x24bec: 0x6c72ec20, + 0x24bf4: 0x6c6ab820, 0x24bf5: 0x6cef0020, 0x24bf7: 0x6cd44620, + 0x24bf8: 0x6c6e7620, 0x24bfa: 0x6d061c20, 0x24bfb: 0x6c1d4c20, + // Block 0x930, offset 0x24c00 + 0x24c05: 0x6c675e20, 0x24c06: 0x6ca20a20, + 0x24c09: 0x6d231a20, + 0x24c0c: 0x6c745220, + 0x24c11: 0x6ce6ea20, + 0x24c14: 0x6cfec420, 0x24c16: 0x6c30ac20, + 0x24c18: 0x6c4c6c20, 0x24c19: 0x6c986220, 0x24c1a: 0x6cedcc20, 0x24c1b: 0x6d06de20, + 0x24c1c: 0x6cee5420, 0x24c1d: 0x6cdd2020, 0x24c1e: 0x6c736620, 0x24c1f: 0x6d26b820, + 0x24c21: 0x6c4e1620, 0x24c23: 0x6ccfec20, + 0x24c25: 0x6d00ac20, 0x24c26: 0x6c8e5a20, 0x24c27: 0x6cc8f020, + 0x24c2f: 0x6c09a620, + 0x24c32: 0x6ca53220, + 0x24c36: 0x6ced8420, 0x24c37: 0x6c700020, + 0x24c38: 0x6cc38c20, + // Block 0x931, offset 0x24c40 + 0x24c44: 0x6ca6a220, 0x24c46: 0x6c9c5220, 0x24c47: 0x6cdd2220, + 0x24c49: 0x6cbb4020, + 0x24c4c: 0x6c4ed220, 0x24c4d: 0x6d3d6c20, 0x24c4e: 0x6c9c5e20, 0x24c4f: 0x6d06f820, + 0x24c51: 0x6c810420, 0x24c52: 0x6c6aee20, 0x24c53: 0x6c2faa20, + 0x24c54: 0x6c171820, 0x24c55: 0x6d365e20, 0x24c56: 0x6c3a0c20, 0x24c57: 0x6c63cc20, + 0x24c58: 0x6c75cc20, 0x24c59: 0x6c5dde20, 0x24c5a: 0x6cb4fe20, 0x24c5b: 0x6c70a620, + 0x24c5c: 0x6d3cd420, 0x24c5e: 0x6c2d6420, 0x24c5f: 0x6c690c20, + 0x24c60: 0x6d0af220, 0x24c62: 0x6d2dfa20, + 0x24c6d: 0x6d33f220, 0x24c6f: 0x6c973620, + 0x24c70: 0x6c54da20, 0x24c71: 0x6d01ca20, 0x24c72: 0x6cd27420, 0x24c73: 0x6c4a7220, + 0x24c7f: 0x6d06fa20, + // Block 0x932, offset 0x24c80 + 0x24c82: 0x6c606a20, + 0x24c84: 0x6c20b020, 0x24c86: 0x6c99a220, 0x24c87: 0x6cc84220, + 0x24c88: 0x6d05bc20, 0x24c89: 0x6c594620, 0x24c8a: 0x6ccc6420, 0x24c8b: 0x6c71c820, + 0x24c8f: 0x6c7c0020, + 0x24c91: 0x6c542020, 0x24c92: 0x6c491e20, 0x24c93: 0x6c486a20, + 0x24c95: 0x6c9c6420, 0x24c96: 0x6c2ed020, 0x24c97: 0x6c0a0020, + 0x24c98: 0x6c899820, 0x24c99: 0x6c7e8620, 0x24c9a: 0x6ccd5220, 0x24c9b: 0x6c928c20, + 0x24c9c: 0x6cf8b420, 0x24c9f: 0x6cda2220, + 0x24cac: 0x6cab4220, 0x24cae: 0x6c838020, + 0x24cb7: 0x6c7a5020, + 0x24cb8: 0x6c4a7c20, 0x24cbb: 0x6cf67a20, + 0x24cbc: 0x6cac6c20, 0x24cbd: 0x6ccb4c20, 0x24cbe: 0x6c754e20, 0x24cbf: 0x6c53d020, + // Block 0x933, offset 0x24cc0 + 0x24cc0: 0x6c49a220, 0x24cc1: 0x6c727c20, 0x24cc3: 0x6ca3d220, + 0x24cc4: 0x6c575020, 0x24cc5: 0x6c442220, 0x24cc6: 0x6c866020, 0x24cc7: 0x6c46d020, + 0x24cc8: 0x6ce41420, 0x24cca: 0x6c96d820, 0x24ccb: 0x6ce2ae20, + 0x24ccc: 0x6c26ba20, + 0x24cd0: 0x6cb52420, 0x24cd1: 0x6d23c620, 0x24cd2: 0x6c693020, 0x24cd3: 0x6c9ee620, + 0x24cd4: 0x6c451820, 0x24cd5: 0x6c9c0e20, 0x24cd6: 0x6cf0c020, + 0x24cd8: 0x6ce36620, 0x24cd9: 0x6cb63a20, + 0x24cdc: 0x6c18e620, 0x24cdd: 0x6c30c220, 0x24cdf: 0x6cac6e20, + 0x24cf0: 0x6c4efc20, + 0x24cf4: 0x6c9d8a20, 0x24cf5: 0x6c967820, 0x24cf6: 0x6c92d220, 0x24cf7: 0x6cb53020, + 0x24cf8: 0x6c795220, 0x24cfa: 0x6c2ee820, 0x24cfb: 0x6cb7d820, + 0x24cfc: 0x6c687c20, 0x24cfd: 0x6c774e20, 0x24cfe: 0x6cbbb020, 0x24cff: 0x6c9d8c20, + // Block 0x934, offset 0x24d00 + 0x24d00: 0x6ccd0c20, + 0x24d07: 0x6c64da20, + 0x24d08: 0x6c843c20, 0x24d09: 0x6c78d620, 0x24d0a: 0x6d073c20, + 0x24d11: 0x6c977a20, 0x24d12: 0x6c3cf420, 0x24d13: 0x6c163420, + 0x24d14: 0x6c5b6420, + 0x24d27: 0x6c7a0420, + 0x24d2a: 0x6cf02c20, 0x24d2b: 0x6c49a820, + 0x24d2c: 0x6c60c220, 0x24d2d: 0x6d421c20, 0x24d2e: 0x6c5e0a20, 0x24d2f: 0x6d00fe20, + 0x24d34: 0x6cdc8420, 0x24d36: 0x6cc88220, + 0x24d38: 0x6ce28620, + 0x24d3c: 0x6d336820, 0x24d3d: 0x6c7d8820, 0x24d3e: 0x6cfe0020, 0x24d3f: 0x6c9dda20, + // Block 0x935, offset 0x24d40 + 0x24d41: 0x6cf8f020, + 0x24d4c: 0x6cc94820, + 0x24d59: 0x6c36c620, 0x24d5a: 0x6c9efe20, 0x24d5b: 0x6d3a8820, + 0x24d5c: 0x6d406c20, 0x24d5d: 0x6c9bec20, 0x24d5f: 0x6cf70620, + 0x24d61: 0x6ce14e20, 0x24d63: 0x6c645220, + 0x24d64: 0x6c16d020, 0x24d65: 0x6c60dc20, + 0x24d6e: 0x6d3dbc20, + 0x24d7f: 0x6c520420, + // Block 0x936, offset 0x24d80 + 0x24d80: 0x6c141020, 0x24d81: 0x6cb7fc20, 0x24d82: 0x6c9dea20, 0x24d83: 0x6d320220, + 0x24d84: 0x6c7a6c20, 0x24d85: 0x6d138220, 0x24d86: 0x6d38c020, + 0x24d88: 0x6c652020, 0x24d8a: 0x6cacc220, + 0x24d8d: 0x6c5b0220, 0x24d8f: 0x6ca02220, + 0x24d90: 0x6c8f5020, + 0x24d98: 0x6cd73420, 0x24d9a: 0x6c974a20, 0x24d9b: 0x6c849c20, + 0x24d9e: 0x6cd7ae20, 0x24d9f: 0x6d159020, + 0x24da4: 0x6c872c20, + 0x24da8: 0x6d005e20, 0x24da9: 0x6ce28a20, 0x24daa: 0x6d051020, + 0x24dad: 0x6d08ce20, 0x24dae: 0x6c874820, 0x24daf: 0x6c9ba220, + 0x24db0: 0x6cef6a20, 0x24db1: 0x6c9ba420, + 0x24dba: 0x6d124e20, 0x24dbb: 0x6c7ffe20, + 0x24dbc: 0x6c8da020, 0x24dbd: 0x6d1c3820, 0x24dbe: 0x6d1c3a20, 0x24dbf: 0x6c876c20, + // Block 0x937, offset 0x24dc0 + 0x24dc0: 0x6c662820, 0x24dc1: 0x6c4aaa20, + 0x24dc5: 0x6c494020, 0x24dc6: 0x6d028220, + 0x24dc9: 0x6ccf9220, 0x24dcb: 0x6d418420, + 0x24dd3: 0x6c771e20, + 0x24dd4: 0x6c82a820, + 0x24dda: 0x6c0bde20, + 0x24ddd: 0x6cd54e20, 0x24dde: 0x6caa7820, 0x24ddf: 0x6d069a20, + 0x24de3: 0x6c503020, + 0x24de8: 0x6c4af220, 0x24dea: 0x6d2d4020, 0x24deb: 0x6c80c620, + 0x24dec: 0x6c248e20, 0x24ded: 0x6d363620, 0x24dee: 0x6c3ca820, 0x24def: 0x6cbd3220, + 0x24df1: 0x6d2acc20, 0x24df2: 0x6ca35420, 0x24df3: 0x6ca99a20, + 0x24df4: 0x6d17f420, 0x24df7: 0x6c232c20, + 0x24df8: 0x6cd1e020, 0x24df9: 0x6c65c220, 0x24dfa: 0x6d3fa420, 0x24dfb: 0x6d0db820, + 0x24dfc: 0x6d1bd620, + // Block 0x938, offset 0x24e00 + 0x24e00: 0x6cc86e20, 0x24e02: 0x6cc6a420, 0x24e03: 0x6cf8cc20, + 0x24e05: 0x6c492420, 0x24e06: 0x6c769420, + 0x24e08: 0x6cf51420, 0x24e0a: 0x6cbda820, 0x24e0b: 0x6c235820, + 0x24e0d: 0x6d2b0620, 0x24e0e: 0x6d024220, + 0x24e10: 0x6d241020, 0x24e11: 0x6d29a020, 0x24e12: 0x6c206620, 0x24e13: 0x6c853c20, + 0x24e14: 0x6c853e20, 0x24e15: 0x6d075020, 0x24e16: 0x6c9c9020, 0x24e17: 0x6d075420, + 0x24e18: 0x6cc88c20, 0x24e1b: 0x6c4b9420, + 0x24e1c: 0x6cc73020, 0x24e1f: 0x6c991420, + 0x24e21: 0x6cbdbe20, 0x24e22: 0x6c24be20, 0x24e23: 0x6c24c020, + 0x24e24: 0x6c24c620, + 0x24e2e: 0x6cf35a20, + 0x24e30: 0x6c383220, 0x24e31: 0x6c037620, + 0x24e38: 0x6cb85820, 0x24e39: 0x6d35ee20, 0x24e3a: 0x6ce5d420, + // Block 0x939, offset 0x24e40 + 0x24e44: 0x6d35f020, 0x24e45: 0x6d345a20, 0x24e47: 0x6c591420, + 0x24e48: 0x6c1da420, 0x24e4a: 0x6d35f220, + 0x24e4e: 0x6d1cf020, + 0x24e52: 0x6cf4f020, 0x24e53: 0x6c06a420, + 0x24e55: 0x6c534c20, 0x24e56: 0x6cd06420, + 0x24e58: 0x6c746620, 0x24e59: 0x6c7d0420, + 0x24e5c: 0x6d15f820, 0x24e5d: 0x6d0bbe20, + 0x24e60: 0x6c087c20, + 0x24e64: 0x6c7aea20, 0x24e65: 0x6cb8f220, + 0x24e68: 0x6d2f6620, 0x24e6a: 0x6c766820, 0x24e6b: 0x6cce1220, + 0x24e6e: 0x6c01ca20, 0x24e6f: 0x6d307020, + 0x24e70: 0x6d369420, + 0x24e77: 0x6d36b620, + 0x24e79: 0x6c693220, + // Block 0x93a, offset 0x24e80 + 0x24e80: 0x6cd83020, 0x24e81: 0x6cb45c20, 0x24e82: 0x6cab9420, + 0x24e8a: 0x6d3dbe20, + 0x24e91: 0x6d1c3c20, 0x24e93: 0x6c584a20, + 0x24e95: 0x6d0b6e20, + 0x24e98: 0x6cd23c20, 0x24e99: 0x6cabb220, 0x24e9a: 0x6cb48420, + 0x24e9e: 0x6c983c20, 0x24e9f: 0x6c146220, + 0x24ea9: 0x6d278e20, + 0x24eac: 0x6c476a20, + 0x24eb9: 0x6c282a20, 0x24ebb: 0x6ca4a020, + 0x24ebd: 0x6d302620, 0x24ebf: 0x6c552c20, + // Block 0x93b, offset 0x24ec0 + 0x24ec5: 0x6c792c20, 0x24ec7: 0x6c2e8c20, + 0x24ec8: 0x6ce63c20, 0x24ecb: 0x6c48ee20, + 0x24ece: 0x6cbef020, 0x24ecf: 0x6cd2ca20, + 0x24ed0: 0x6c640c20, 0x24ed1: 0x6c02ca20, 0x24ed2: 0x6ca2f620, 0x24ed3: 0x6cb23a20, + 0x24ed4: 0x6c63b220, + 0x24ee1: 0x6d30ec20, 0x24ee2: 0x6c108620, 0x24ee3: 0x6cf2b020, + 0x24ee5: 0x6c141e20, + 0x24eea: 0x6ca4a420, 0x24eeb: 0x6c76c620, + 0x24eef: 0x6c319220, + 0x24ef0: 0x6c48f020, 0x24ef1: 0x6cbf0e20, 0x24ef3: 0x6cc66a20, + 0x24ef4: 0x6d15e820, 0x24ef5: 0x6c32fe20, 0x24ef6: 0x6c82c020, + 0x24ef8: 0x6d387a20, 0x24ef9: 0x6c7ac220, 0x24efa: 0x6c354020, 0x24efb: 0x6cfa9e20, + 0x24efc: 0x6c2d5420, 0x24efd: 0x6caaf020, 0x24efe: 0x6c361620, 0x24eff: 0x6d1d8620, + // Block 0x93c, offset 0x24f00 + 0x24f00: 0x6cf4e220, 0x24f01: 0x6c793a20, + 0x24f13: 0x6d35f420, + 0x24f17: 0x6d351c20, + 0x24f18: 0x6d0a0820, 0x24f1b: 0x6d334a20, + 0x24f1e: 0x6d0fae20, + 0x24f20: 0x6c5dc420, 0x24f21: 0x6c602220, 0x24f22: 0x6ca4f020, + 0x24f27: 0x6d0ba020, + 0x24f28: 0x6c924620, 0x24f2b: 0x6c3d7220, + 0x24f2c: 0x6cca1c20, 0x24f2d: 0x6c1f4420, 0x24f2e: 0x6cefca20, + 0x24f30: 0x6c3f6820, 0x24f31: 0x6c794020, 0x24f32: 0x6cd8c020, 0x24f33: 0x6c778620, + 0x24f35: 0x6d17b020, 0x24f36: 0x6c579a20, + 0x24f3e: 0x6d225e20, + // Block 0x93d, offset 0x24f40 + 0x24f43: 0x6c861420, + 0x24f46: 0x6c8c2020, 0x24f47: 0x6c321e20, + 0x24f48: 0x6c363c20, + 0x24f4c: 0x6cbb4220, 0x24f4d: 0x6c31a620, + 0x24f50: 0x6c6af020, 0x24f51: 0x6c21c620, 0x24f52: 0x6cfcd420, + 0x24f56: 0x6c430a20, + 0x24f6c: 0x6c2a1e20, + 0x24f70: 0x6c52b420, + 0x24f7b: 0x6d3fa620, + 0x24f7e: 0x6cb7b620, 0x24f7f: 0x6ceb3820, + // Block 0x93e, offset 0x24f80 + 0x24f80: 0x6c52b820, 0x24f81: 0x6cb06420, 0x24f82: 0x6c453c20, + 0x24f84: 0x6ca85020, 0x24f87: 0x6c798420, + 0x24f8a: 0x6d354620, + 0x24f91: 0x6cffb420, + 0x24fa1: 0x6ccf6620, 0x24fa2: 0x6d217620, 0x24fa3: 0x6c676a20, + 0x24fa9: 0x6cb70a20, 0x24faa: 0x6c190a20, 0x24fab: 0x6cca8220, + 0x24fad: 0x6cdd8e20, 0x24fae: 0x6cb9bc20, 0x24faf: 0x6c5c1a20, + 0x24fb1: 0x6ccda020, 0x24fb2: 0x6c368c20, + 0x24fbb: 0x6cbfbc20, + 0x24fbd: 0x6c78ca20, + // Block 0x93f, offset 0x24fc0 + 0x24fc0: 0x6cf23420, 0x24fc1: 0x6d3e7c20, 0x24fc2: 0x6c608e20, + 0x24fc7: 0x6c26e220, + 0x24fc9: 0x6c263620, + 0x24fcd: 0x6c90f620, 0x24fce: 0x6c775020, 0x24fcf: 0x6c7e1220, + 0x24fd0: 0x6c2b8e20, 0x24fd1: 0x6cbc7e20, 0x24fd3: 0x6ca16420, + 0x24fd6: 0x6c4cce20, 0x24fd7: 0x6c52c620, + 0x24fd8: 0x6c177c20, 0x24fd9: 0x6c522620, + 0x24fe2: 0x6c129020, 0x24fe3: 0x6d308c20, + 0x24fe6: 0x6c4bea20, + 0x24ff0: 0x6d05ec20, 0x24ff1: 0x6caece20, 0x24ff2: 0x6c74ca20, + 0x24ff5: 0x6c41ee20, 0x24ff6: 0x6cd83220, + 0x24ff8: 0x6cdc8620, 0x24ff9: 0x6cc40420, 0x24ffb: 0x6cf3f220, + 0x24ffc: 0x6d0cda20, 0x24ffd: 0x6caf1820, 0x24ffe: 0x6cffc420, 0x24fff: 0x6cac4820, + // Block 0x940, offset 0x25000 + 0x2500d: 0x6c7e9e20, + 0x25017: 0x6c085a20, + 0x25018: 0x6d320020, 0x25019: 0x6c60de20, + 0x2501c: 0x6c6cc020, 0x2501d: 0x6c887420, 0x2501e: 0x6c791220, + 0x25020: 0x6d38d620, + 0x25028: 0x6d2a9620, 0x2502a: 0x6c822e20, 0x2502b: 0x6cb54820, + 0x2502c: 0x6c0e3820, + 0x25035: 0x6d1b1c20, 0x25036: 0x6cb1f620, + 0x2503b: 0x6cda3820, + 0x2503c: 0x6c941620, 0x2503e: 0x6c2bb420, 0x2503f: 0x6c31e420, + // Block 0x941, offset 0x25040 + 0x25040: 0x6c8a8820, 0x25041: 0x6d3dd620, + 0x2504a: 0x6c16fc20, + 0x25052: 0x6c194020, 0x25053: 0x6cdee020, + 0x25059: 0x6cc41e20, 0x2505a: 0x6c2a4c20, + 0x2505d: 0x6cc51020, 0x2505f: 0x6cb3ba20, + 0x25066: 0x6d37e020, 0x25067: 0x6d006020, + 0x2506a: 0x6c679620, 0x2506b: 0x6cc21820, + 0x2506c: 0x6c831020, 0x2506d: 0x6c10f020, 0x2506e: 0x6cc39a20, + 0x25075: 0x6cfe7220, 0x25076: 0x6c836820, + 0x2507a: 0x6c809620, + 0x2507f: 0x6c7e6820, + // Block 0x942, offset 0x25080 + 0x25081: 0x6c7e6a20, + 0x25084: 0x6d24b420, + 0x2508a: 0x6c697e20, 0x2508b: 0x6cbd4e20, + 0x2508c: 0x6c5e7e20, 0x2508f: 0x6c41c820, + 0x25092: 0x6d169220, + 0x250a0: 0x6d16c820, 0x250a1: 0x6d339e20, + 0x250a4: 0x6c0c6e20, 0x250a5: 0x6cd0e620, 0x250a6: 0x6c6fd820, + 0x250ab: 0x6c509420, + 0x250ac: 0x6c3e2020, 0x250ae: 0x6c706620, + // Block 0x943, offset 0x250c0 + 0x250c0: 0x6d426620, 0x250c1: 0x6d14ac20, + 0x250c6: 0x6cfc9420, 0x250c7: 0x6d14ae20, + 0x250c9: 0x6cd8a220, 0x250cb: 0x6c20f220, + 0x250ce: 0x6ca0fa20, + 0x250e1: 0x6d2d6c20, 0x250e3: 0x6d0a0020, + 0x250e6: 0x6cc79a20, + 0x250e8: 0x6c5db020, + 0x250ec: 0x6cce6a20, + 0x250f0: 0x6cd46620, + 0x250fe: 0x6d203e20, 0x250ff: 0x6d231c20, + // Block 0x944, offset 0x25100 + 0x25102: 0x6c75b420, + 0x25109: 0x6d3e4220, 0x2510a: 0x6c925c20, + 0x2511a: 0x6c1baa20, 0x2511b: 0x6c7d6620, + 0x25120: 0x6d3ce420, + 0x25126: 0x6c541420, + 0x25129: 0x6d064420, + 0x2513e: 0x6d3f9c20, 0x2513f: 0x6d1d4220, + // Block 0x945, offset 0x25140 + 0x25142: 0x6d39b020, + 0x25145: 0x6c8f3a20, + 0x25151: 0x6caa6820, + 0x25158: 0x6c0a3020, 0x2515a: 0x6c1c5e20, + 0x2515c: 0x6d412420, 0x2515d: 0x6c3cb820, 0x2515e: 0x6c92aa20, 0x2515f: 0x6cb49220, + 0x25165: 0x6d3bdc20, 0x25167: 0x6d308020, + 0x25168: 0x6cd1ec20, 0x25169: 0x6d227e20, 0x2516a: 0x6c92ac20, 0x2516b: 0x6c896820, + 0x2516f: 0x6c74c020, + 0x25170: 0x6c8aa620, 0x25171: 0x6c080820, + // Block 0x946, offset 0x25180 + 0x25183: 0x6d18ce20, + 0x25184: 0x6c492820, + 0x2518c: 0x6c02ae20, 0x2518f: 0x6c4b8220, + 0x25190: 0x6c9fce20, 0x25192: 0x6d0dec20, 0x25193: 0x6c7fd220, + 0x25196: 0x6c0f9220, + 0x25199: 0x6d29a620, 0x2519a: 0x6d1ffe20, + 0x251a5: 0x6d194420, 0x251a6: 0x6ca66020, + 0x251ac: 0x6ca66620, 0x251ad: 0x6c4ce020, 0x251ae: 0x6c760a20, + 0x251b0: 0x6cd21820, 0x251b2: 0x6cfc5c20, + 0x251b4: 0x6cb95e20, 0x251b5: 0x6cc42020, 0x251b6: 0x6c7cc420, + // Block 0x947, offset 0x251c0 + 0x251c0: 0x6ccf1620, 0x251c2: 0x6c5dd620, + 0x251c4: 0x6ced8e20, + 0x251ca: 0x6c3af220, 0x251cb: 0x6c3b0020, + 0x251cd: 0x6d22c420, + 0x251d1: 0x6d339220, 0x251d2: 0x6c48a420, + 0x251d4: 0x6c6a8620, 0x251d5: 0x6c983e20, 0x251d6: 0x6c50cc20, + 0x251d8: 0x6d1fa820, + 0x251df: 0x6c324220, + 0x251e0: 0x6cd7d220, 0x251e2: 0x6c859420, + 0x251e5: 0x6c6a9420, 0x251e6: 0x6ca98a20, 0x251e7: 0x6c03ac20, + 0x251e8: 0x6d20de20, + 0x251ee: 0x6d33b220, + 0x251f8: 0x6c50e020, 0x251f9: 0x6c77e820, + 0x251fe: 0x6c324a20, 0x251ff: 0x6c634820, + // Block 0x948, offset 0x25200 + 0x25201: 0x6c186020, 0x25203: 0x6c20f420, + 0x25204: 0x6c50f820, 0x25205: 0x6d2d2620, + 0x2520a: 0x6c9a8c20, + 0x2520d: 0x6c50fa20, 0x2520e: 0x6d3f0420, 0x2520f: 0x6d3a0620, + 0x25212: 0x6ceb0e20, + 0x25218: 0x6d421820, 0x2521a: 0x6cc7a220, 0x2521b: 0x6c34ee20, + 0x2521c: 0x6c67e020, + 0x25227: 0x6c526420, + 0x25229: 0x6c07e620, 0x2522a: 0x6ca10820, + 0x2522f: 0x6d40ba20, + 0x25232: 0x6c0caa20, + 0x25234: 0x6c7a9820, 0x25235: 0x6c63c020, + 0x2523a: 0x6d3d0420, + 0x2523c: 0x6d04d620, + // Block 0x949, offset 0x25240 + 0x25243: 0x6c512820, + 0x25245: 0x6cbb7220, + 0x2524d: 0x6c3a5c20, 0x2524e: 0x6cd10a20, + 0x25252: 0x6d3c9620, 0x25253: 0x6c7b6a20, + 0x25254: 0x6d2b5420, 0x25255: 0x6cfaae20, 0x25257: 0x6c09d620, + 0x25258: 0x6d17f620, 0x2525a: 0x6c171a20, + 0x2526a: 0x6c999a20, + 0x25276: 0x6ced3020, + 0x2527d: 0x6cf37620, 0x2527e: 0x6c7a5220, 0x2527f: 0x6cf2be20, + // Block 0x94a, offset 0x25280 + 0x25280: 0x6d038a20, 0x25281: 0x6c781620, 0x25283: 0x6c6f8220, + 0x25284: 0x6c329c20, 0x25285: 0x6c594820, + 0x25288: 0x6d369620, 0x25289: 0x6c130620, 0x2528a: 0x6cc75a20, 0x2528b: 0x6c606e20, + 0x2528d: 0x6d131a20, + 0x2529b: 0x6c6dca20, + 0x2529c: 0x6d106220, + 0x252a1: 0x6d400220, + 0x252a9: 0x6c11d620, + 0x252b1: 0x6cd81c20, 0x252b2: 0x6c866220, 0x252b3: 0x6c47c620, + 0x252b4: 0x6c172220, 0x252b6: 0x6c3a6820, 0x252b7: 0x6c8e8a20, + 0x252b9: 0x6c6b1e20, 0x252ba: 0x6d276020, + 0x252bd: 0x6d36ba20, + // Block 0x94b, offset 0x252c0 + 0x252c0: 0x6c1dd220, 0x252c1: 0x6c0cbc20, + 0x252d2: 0x6c5f1a20, + 0x252dc: 0x6c955220, 0x252dd: 0x6c64f820, 0x252df: 0x6c206020, + 0x252e0: 0x6cd6de20, 0x252e2: 0x6c93fe20, 0x252e3: 0x6c75ea20, + 0x252e4: 0x6c69c820, 0x252e6: 0x6ce42020, 0x252e7: 0x6d2c0020, + 0x252ea: 0x6d18a820, + 0x252ec: 0x6c235a20, 0x252ed: 0x6ca57420, 0x252ee: 0x6c638220, + 0x252f4: 0x6c627c20, + 0x252fd: 0x6c00ce20, + // Block 0x94c, offset 0x25300 + 0x25307: 0x6c65d820, + 0x2530a: 0x6c07ca20, + 0x2530c: 0x6c38c620, 0x2530d: 0x6cdc8a20, 0x2530e: 0x6d421e20, + 0x25310: 0x6c42e420, 0x25311: 0x6c432420, 0x25312: 0x6c817e20, + 0x25314: 0x6d3db620, + 0x2531f: 0x6c56ca20, + 0x25322: 0x6ce9c420, + 0x25326: 0x6c0a7420, 0x25327: 0x6c716420, + 0x2532e: 0x6c575a20, + 0x25332: 0x6c1a4a20, + 0x25336: 0x6c7b4220, 0x25337: 0x6c291420, + 0x25338: 0x6c444c20, 0x25339: 0x6d011420, 0x2533b: 0x6c6b6220, + 0x2533d: 0x6c117620, + // Block 0x94d, offset 0x25340 + 0x25346: 0x6d40ec20, + 0x25348: 0x6cb46820, 0x2534b: 0x6cd57c20, + 0x2534c: 0x6c104820, + 0x25357: 0x6ca93220, + 0x25358: 0x6d0dfc20, 0x25359: 0x6d396020, 0x2535b: 0x6c9b8420, + 0x2535d: 0x6c0b5e20, 0x2535f: 0x6cfe6420, + 0x25364: 0x6c931c20, 0x25365: 0x6c849020, + 0x25369: 0x6c62ca20, 0x2536b: 0x6c9f0a20, + 0x2536c: 0x6c835620, 0x2536e: 0x6d375820, 0x2536f: 0x6d1ecc20, + 0x25370: 0x6c0b6020, + 0x25378: 0x6ca2bc20, 0x25379: 0x6cc4da20, + // Block 0x94e, offset 0x25380 + 0x25382: 0x6ca7c620, + 0x2538a: 0x6cc33a20, 0x2538b: 0x6d30c620, + 0x25390: 0x6c836620, + 0x25397: 0x6c294820, + 0x25398: 0x6c752e20, + 0x2539c: 0x6c8dc420, 0x2539e: 0x6c8de820, 0x2539f: 0x6d0d2620, + 0x253a3: 0x6d118620, + 0x253a4: 0x6d321220, 0x253a5: 0x6cb4ce20, 0x253a6: 0x6c008a20, + 0x253a8: 0x6caa3e20, 0x253a9: 0x6c988220, + 0x253b1: 0x6c76c220, 0x253b3: 0x6c6f5c20, + 0x253b4: 0x6d0d5820, 0x253b5: 0x6c9e5420, 0x253b7: 0x6d1a3e20, + 0x253b8: 0x6ceccc20, 0x253b9: 0x6d11f420, 0x253ba: 0x6cebce20, 0x253bb: 0x6cafc820, + 0x253bc: 0x6cdc2c20, + // Block 0x94f, offset 0x253c0 + 0x253c5: 0x6c799a20, + 0x253c8: 0x6c532c20, 0x253ca: 0x6ca03020, 0x253cb: 0x6c8cd220, + 0x253cc: 0x6d173e20, 0x253cd: 0x6ccfd220, 0x253cf: 0x6d429220, + 0x253db: 0x6ce85020, + 0x253dd: 0x6d1e7820, 0x253df: 0x6cec2620, + 0x253e0: 0x6c4af420, 0x253e1: 0x6c53bc20, + 0x253e5: 0x6cd36e20, 0x253e7: 0x6d049220, + 0x253e9: 0x6c000620, + 0x253f1: 0x6c19ee20, 0x253f3: 0x6c793c20, + 0x253f4: 0x6d176c20, 0x253f5: 0x6d104820, 0x253f6: 0x6ce67420, 0x253f7: 0x6c311e20, + 0x253f8: 0x6c13e820, 0x253f9: 0x6c8f3020, + 0x253fd: 0x6cc06a20, 0x253fe: 0x6d084e20, 0x253ff: 0x6ccfee20, + // Block 0x950, offset 0x25400 + 0x25400: 0x6c7b5420, 0x25401: 0x6ce7ca20, 0x25403: 0x6cba0e20, + 0x25405: 0x6c1e4220, + 0x2540a: 0x6cf1de20, + 0x2540c: 0x6c906820, 0x2540d: 0x6c018820, + 0x25414: 0x6c76d820, 0x25416: 0x6d11b020, + 0x25418: 0x6c3e8420, + 0x2541c: 0x6c084220, 0x2541d: 0x6c803020, 0x2541e: 0x6cb86c20, 0x2541f: 0x6c2d6620, + 0x25422: 0x6c69a620, 0x25423: 0x6c4a7420, + 0x25425: 0x6d049820, + 0x25428: 0x6c78bc20, + 0x25436: 0x6cfcd620, 0x25437: 0x6cf33a20, + // Block 0x951, offset 0x25440 + 0x25442: 0x6c45f620, + 0x25446: 0x6cab8620, 0x25447: 0x6c781820, + 0x2544b: 0x6c7a5420, + 0x25451: 0x6ce4be20, 0x25452: 0x6c46d420, 0x25453: 0x6c96a220, + 0x25455: 0x6c8f3e20, + 0x25459: 0x6cf0c220, 0x2545a: 0x6cf1ec20, + 0x25461: 0x6c462020, 0x25463: 0x6ce8e820, + 0x25464: 0x6ca91620, 0x25467: 0x6c9d7c20, + 0x2546b: 0x6c80e020, + 0x2546c: 0x6cba2220, 0x2546d: 0x6c977e20, 0x2546e: 0x6d308e20, + 0x25470: 0x6c57c620, 0x25471: 0x6d1db620, 0x25472: 0x6c6d5020, + 0x25474: 0x6c9aae20, 0x25477: 0x6c3ef020, + 0x2547b: 0x6cc1c220, + // Block 0x952, offset 0x25480 + 0x2548c: 0x6c8f4820, 0x2548d: 0x6c406220, 0x2548e: 0x6c28c620, + 0x25490: 0x6c460020, 0x25492: 0x6c256e20, + 0x25495: 0x6d040c20, + 0x2549c: 0x6ce87c20, 0x2549d: 0x6cd48020, + 0x254aa: 0x6cbf8420, + 0x254b3: 0x6cc6e020, + 0x254bb: 0x6c874c20, + 0x254bf: 0x6c5f9220, + // Block 0x953, offset 0x254c0 + 0x254c0: 0x6cebbc20, + 0x254cc: 0x6ce7aa20, + 0x254d2: 0x6ce04c20, + 0x254d4: 0x6c8dea20, 0x254d6: 0x6d169420, 0x254d7: 0x6cc85220, + 0x254d9: 0x6cabe220, + 0x254dd: 0x6c10e820, + 0x254e1: 0x6d269820, 0x254e2: 0x6cc3b020, 0x254e3: 0x6d3ade20, + 0x254e4: 0x6c4d6220, + 0x254f1: 0x6c381220, 0x254f2: 0x6c4d6820, + // Block 0x954, offset 0x25500 + 0x25500: 0x6c101620, 0x25501: 0x6cb25620, 0x25502: 0x6c8b0c20, + 0x2550a: 0x6c7cd420, 0x2550b: 0x6c3e9e20, + 0x2550c: 0x6ce50620, 0x2550d: 0x6cf2fc20, 0x2550f: 0x6c70aa20, + 0x25518: 0x6d318620, 0x2551a: 0x6c3ec620, + 0x25522: 0x6c8f9e20, + 0x25526: 0x6cf8ce20, 0x25527: 0x6ce4c020, + 0x2552b: 0x6c626620, + 0x2552f: 0x6d122c20, + 0x25531: 0x6c246620, + 0x25534: 0x6cad3020, 0x25535: 0x6cbce820, + 0x2553b: 0x6c8fb420, + 0x2553c: 0x6c615820, + // Block 0x955, offset 0x25540 + 0x25542: 0x6ce79a20, 0x25543: 0x6d158420, + 0x25545: 0x6c168420, + 0x2554b: 0x6c45c220, + 0x2554e: 0x6c309620, + 0x25556: 0x6cfda420, + 0x25559: 0x6ce6b620, 0x2555b: 0x6d3b7020, + 0x2555c: 0x6d15c820, 0x2555d: 0x6d170020, 0x2555e: 0x6d3ef820, 0x2555f: 0x6cb6e020, + 0x25562: 0x6c141a20, + 0x2556c: 0x6c33e220, 0x2556f: 0x6c1cbc20, + 0x25570: 0x6c922a20, 0x25571: 0x6c33ea20, 0x25573: 0x6c399220, + 0x25574: 0x6cd35c20, 0x25575: 0x6ce3e420, 0x25576: 0x6c5eaa20, 0x25577: 0x6cbfaa20, + 0x25578: 0x6cd70e20, 0x25579: 0x6c18b020, + 0x2557c: 0x6c5a6820, 0x2557d: 0x6cd41220, + // Block 0x956, offset 0x25580 + 0x25580: 0x6d279c20, + 0x25586: 0x6c8f8420, + 0x25588: 0x6c97b620, 0x25589: 0x6c464220, + 0x2558d: 0x6cfaa020, 0x2558e: 0x6ca10a20, + 0x25590: 0x6cd05e20, 0x25592: 0x6cb30820, 0x25593: 0x6d120420, + 0x25594: 0x6cc0fa20, 0x25595: 0x6cc4c020, + 0x25599: 0x6c724220, + 0x2559c: 0x6d1ada20, 0x2559d: 0x6c041020, 0x2559e: 0x6ca81c20, + 0x255a0: 0x6c1d6c20, + 0x255aa: 0x6cc67820, 0x255ab: 0x6c202020, + 0x255ac: 0x6ca83420, 0x255ad: 0x6c861620, 0x255ae: 0x6c676220, 0x255af: 0x6c77ac20, + 0x255b0: 0x6c12f020, 0x255b1: 0x6c1d5220, 0x255b2: 0x6d3b5620, 0x255b3: 0x6d3f1420, + 0x255b4: 0x6d0fb820, + 0x255bc: 0x6cf1e020, + // Block 0x957, offset 0x255c0 + 0x255cb: 0x6c620420, + 0x255cc: 0x6c620620, + 0x255d0: 0x6c93e820, 0x255d1: 0x6cc07820, 0x255d2: 0x6c33fc20, 0x255d3: 0x6c05cc20, + 0x255d4: 0x6c14ce20, 0x255d6: 0x6c0f1620, + 0x255d8: 0x6c1abe20, 0x255d9: 0x6d30fa20, 0x255da: 0x6c98b820, + 0x255dc: 0x6c621c20, 0x255dd: 0x6c9eb620, 0x255de: 0x6d262620, + 0x255e0: 0x6cf3d220, 0x255e1: 0x6d366420, 0x255e2: 0x6cb25c20, + 0x255e5: 0x6c1ccc20, + 0x255eb: 0x6c9c6020, + 0x255ec: 0x6c3a3c20, 0x255ed: 0x6c25c020, 0x255ee: 0x6c9b2420, + // Block 0x958, offset 0x25600 + 0x2560d: 0x6d1a8220, 0x2560e: 0x6c989a20, 0x2560f: 0x6c2d2420, + 0x25610: 0x6c2dd620, 0x25612: 0x6cb9b420, + 0x25615: 0x6c4f9820, 0x25616: 0x6d348620, 0x25617: 0x6c713e20, + 0x25618: 0x6ca76820, + 0x2561c: 0x6c9c6620, 0x2561d: 0x6c47b620, + 0x25623: 0x6d3b5820, + 0x25624: 0x6ca85220, 0x25625: 0x6d3d8420, 0x25627: 0x6d131c20, + 0x25628: 0x6c23dc20, 0x2562a: 0x6d05be20, + 0x2562c: 0x6cf8b820, 0x2562f: 0x6c0e8420, + 0x2563e: 0x6c11d820, + // Block 0x959, offset 0x25640 + 0x25643: 0x6d0dba20, + 0x25651: 0x6c6cb220, + 0x25654: 0x6c71ce20, 0x25655: 0x6c298620, 0x25656: 0x6c327620, + 0x25658: 0x6d128c20, 0x25659: 0x6c6ea020, 0x2565a: 0x6c78cc20, 0x2565b: 0x6c962220, + 0x2565c: 0x6cf00220, 0x2565d: 0x6ce87620, 0x2565e: 0x6d1f6020, 0x2565f: 0x6cac3020, + 0x25661: 0x6cb01020, 0x25662: 0x6c2fb820, + 0x25664: 0x6cf00420, 0x25665: 0x6c183620, 0x25666: 0x6c66bc20, + 0x25668: 0x6cd81e20, 0x25669: 0x6d3d8a20, 0x2566a: 0x6cda4020, + 0x2566c: 0x6cc87420, 0x2566e: 0x6d218420, + 0x25673: 0x6c368e20, + 0x25676: 0x6c7a7e20, + 0x25678: 0x6d3b2220, + 0x2567e: 0x6cf9e820, + // Block 0x95a, offset 0x25680 + 0x2569b: 0x6c3ef220, + 0x2569c: 0x6ce23e20, 0x2569d: 0x6cf6d020, 0x2569e: 0x6c1d8020, 0x2569f: 0x6c41ec20, + 0x256a0: 0x6c936420, 0x256a1: 0x6c131620, 0x256a2: 0x6ccdb220, 0x256a3: 0x6c8e9c20, + 0x256a5: 0x6cf8e020, 0x256a6: 0x6c5f3e20, 0x256a7: 0x6d161220, + 0x256a8: 0x6ce01220, 0x256aa: 0x6c55b620, + 0x256ad: 0x6c25c820, 0x256ae: 0x6c447820, + 0x256b0: 0x6cd3dc20, 0x256b1: 0x6ccac020, 0x256b2: 0x6c53d420, 0x256b3: 0x6cfd0e20, + 0x256b6: 0x6cf9f020, + 0x256bb: 0x6ca2ae20, + 0x256bc: 0x6cdd9620, 0x256be: 0x6d2d4c20, + // Block 0x95b, offset 0x256c0 + 0x256c0: 0x6c3d9e20, 0x256c1: 0x6ccb6220, 0x256c2: 0x6caa4620, 0x256c3: 0x6d18ac20, + 0x256e7: 0x6cbdaa20, + 0x256e8: 0x6cbedc20, + 0x256f5: 0x6c5c5a20, 0x256f6: 0x6cd6e220, 0x256f7: 0x6c284a20, + 0x256f8: 0x6cab5420, 0x256f9: 0x6ca17420, 0x256fa: 0x6cb92420, 0x256fb: 0x6c1c8020, + 0x256fc: 0x6cac0620, 0x256fd: 0x6c739620, + // Block 0x95c, offset 0x25700 + 0x25700: 0x6c178020, 0x25701: 0x6c8b3c20, 0x25702: 0x6c0db420, 0x25703: 0x6c7a0a20, + 0x25704: 0x6c28c820, 0x25705: 0x6c1dee20, 0x25706: 0x6ce70620, 0x25707: 0x6c28ca20, + 0x25708: 0x6c97ce20, 0x25709: 0x6c56ce20, 0x2570a: 0x6c8a2820, 0x2570b: 0x6cfbae20, + 0x2570d: 0x6c129820, 0x2570e: 0x6c92ea20, 0x2570f: 0x6c204220, + 0x25710: 0x6cf3f420, 0x25711: 0x6c978820, + 0x25715: 0x6d3f2420, 0x25717: 0x6c328020, + 0x2571a: 0x6cd6f220, 0x2571b: 0x6c406420, + 0x2571c: 0x6c72a620, 0x2571d: 0x6d395820, 0x2571f: 0x6c2e4220, + 0x25720: 0x6cee5a20, 0x25721: 0x6c206820, 0x25722: 0x6cb92620, 0x25723: 0x6cea1220, + 0x25725: 0x6c886420, 0x25726: 0x6c0c2e20, 0x25727: 0x6c845420, + 0x2572a: 0x6c845620, + // Block 0x95d, offset 0x25740 + 0x25746: 0x6c0a9220, 0x25747: 0x6c407620, + 0x25748: 0x6c257820, 0x25749: 0x6c318020, 0x2574b: 0x6d29a820, + 0x2574c: 0x6c8fb620, 0x2574d: 0x6d0a4a20, 0x2574e: 0x6cbf7a20, 0x2574f: 0x6c5f6e20, + 0x25750: 0x6cba2c20, 0x25752: 0x6c65fa20, 0x25753: 0x6cce9020, + 0x25754: 0x6c351e20, 0x25755: 0x6cd51620, 0x25756: 0x6c10c820, 0x25757: 0x6d05f820, + 0x25758: 0x6c304420, 0x2575a: 0x6cc49220, + 0x2575c: 0x6d0fe620, 0x2575d: 0x6cc8b420, 0x2575e: 0x6c8c7020, 0x2575f: 0x6c65fc20, + 0x25760: 0x6c2ca820, 0x25761: 0x6c3ba020, 0x25762: 0x6c2d9020, 0x25763: 0x6d41dc20, + 0x25765: 0x6ca94820, + 0x2576a: 0x6cdba020, 0x2576b: 0x6ce52420, + 0x2576c: 0x6c01da20, 0x2576f: 0x6c131c20, + 0x25770: 0x6c2fc220, 0x25771: 0x6cd02820, 0x25772: 0x6c328420, 0x25773: 0x6ce39420, + 0x25774: 0x6c695420, 0x25775: 0x6d41de20, 0x25776: 0x6d2f1020, 0x25777: 0x6c65fe20, + 0x25778: 0x6c28da20, 0x25779: 0x6c285420, 0x2577a: 0x6cd97420, + // Block 0x95e, offset 0x25780 + 0x25790: 0x6d2e2620, 0x25791: 0x6ce69620, 0x25792: 0x6d372a20, + 0x25795: 0x6d1f8220, 0x25796: 0x6cac0e20, + 0x257a1: 0x6c854220, + 0x257a4: 0x6cb9d820, 0x257a6: 0x6cdca620, 0x257a7: 0x6c71dc20, + 0x257a8: 0x6c010020, 0x257a9: 0x6c445020, 0x257aa: 0x6c72b420, 0x257ab: 0x6cea7220, + 0x257ac: 0x6c0aa620, 0x257ad: 0x6cb87e20, 0x257ae: 0x6c0fa820, 0x257af: 0x6c5c7c20, + 0x257b1: 0x6c670020, + 0x257b4: 0x6c466420, 0x257b5: 0x6cdba420, + 0x257ba: 0x6c227a20, 0x257bb: 0x6cbb5c20, + 0x257bf: 0x6d0cf420, + // Block 0x95f, offset 0x257c0 + 0x257cf: 0x6c2d9420, + 0x257d2: 0x6c9f0420, + 0x257dc: 0x6cb3b620, 0x257dd: 0x6c8e1620, 0x257de: 0x6c6b7420, 0x257df: 0x6d3b3e20, + 0x257e0: 0x6c47ee20, 0x257e3: 0x6c32aa20, + 0x257e4: 0x6d2fee20, 0x257e6: 0x6ccebe20, 0x257e7: 0x6cbdf020, + 0x257e8: 0x6c9ca420, 0x257ea: 0x6cb2e220, 0x257eb: 0x6c23c020, + 0x257ec: 0x6c1d8820, 0x257ef: 0x6cc9ae20, + 0x257f6: 0x6ce52620, + // Block 0x960, offset 0x25800 + 0x25805: 0x6c8edc20, 0x25806: 0x6c936c20, 0x25807: 0x6c91fc20, + 0x25808: 0x6d407620, + 0x2580c: 0x6c941e20, 0x2580d: 0x6c58e620, 0x2580f: 0x6ce5b420, + 0x25810: 0x6ce9d820, 0x25811: 0x6cbb5220, 0x25812: 0x6c8c8020, 0x25813: 0x6c06c220, + 0x25814: 0x6cad7620, 0x25815: 0x6d2dc420, 0x25817: 0x6c874e20, + 0x2581b: 0x6ce3b220, + 0x2581c: 0x6c560020, + 0x25822: 0x6c8b6c20, + 0x25835: 0x6c5b8020, 0x25836: 0x6cc16420, 0x25837: 0x6d086820, + 0x25839: 0x6c6ec620, 0x2583a: 0x6c2f1220, 0x2583b: 0x6cdc0820, + 0x2583d: 0x6cf11e20, 0x2583f: 0x6d0d1420, + // Block 0x961, offset 0x25840 + 0x25840: 0x6d0c4a20, 0x25841: 0x6c050e20, 0x25843: 0x6c67ce20, + 0x25844: 0x6ca66820, 0x25845: 0x6c876e20, 0x25846: 0x6c560620, 0x25847: 0x6cb80420, + 0x25848: 0x6d37e220, + 0x25851: 0x6c0acc20, + 0x25854: 0x6d220020, 0x25855: 0x6c2f1420, 0x25856: 0x6c8c8a20, 0x25857: 0x6c878c20, + 0x25858: 0x6d3de620, 0x25859: 0x6c62f020, 0x2585a: 0x6c70e620, + 0x2585c: 0x6c3c8820, 0x2585e: 0x6d248820, + 0x25868: 0x6c8b7e20, 0x25869: 0x6d28e020, 0x2586a: 0x6cb9e820, 0x2586b: 0x6c6a4620, + 0x2586c: 0x6c494220, 0x2586e: 0x6d3dee20, + 0x25871: 0x6c40a220, + 0x25879: 0x6ccba220, + 0x2587c: 0x6c248a20, + // Block 0x962, offset 0x25880 + 0x25883: 0x6c5b8220, + 0x25888: 0x6c29a620, 0x25889: 0x6c901c20, 0x2588a: 0x6d198420, + 0x25897: 0x6cc96020, + 0x25898: 0x6d274220, 0x2589a: 0x6c2bc620, + 0x258a1: 0x6c420820, 0x258a2: 0x6d295c20, 0x258a3: 0x6ccdf420, + 0x258a4: 0x6d24b020, 0x258a5: 0x6c0fde20, 0x258a7: 0x6c2f9820, + 0x258a8: 0x6c388c20, 0x258aa: 0x6d22d820, + 0x258ac: 0x6ccfc420, + 0x258b2: 0x6c457020, + 0x258b4: 0x6c9ed020, 0x258b5: 0x6cea4a20, + 0x258b8: 0x6c8af620, + // Block 0x963, offset 0x258c0 + 0x258c1: 0x6d2bd420, 0x258c2: 0x6cadbc20, + 0x258c4: 0x6c9c4a20, 0x258c6: 0x6c9ffa20, 0x258c7: 0x6c394a20, + 0x258c9: 0x6ca33620, 0x258ca: 0x6cd8b820, 0x258cb: 0x6d14ea20, + 0x258cc: 0x6c635020, 0x258cd: 0x6d3ae620, + 0x258d3: 0x6c047e20, + 0x258d4: 0x6d231e20, 0x258d6: 0x6cb35820, + 0x258da: 0x6c582820, 0x258db: 0x6c11f820, + 0x258dc: 0x6c684a20, + 0x258e0: 0x6cdfe420, + 0x258e9: 0x6d363a20, 0x258eb: 0x6c9cf420, + 0x258ec: 0x6c77ae20, + 0x258f1: 0x6d109a20, 0x258f2: 0x6c335020, 0x258f3: 0x6cc36020, + 0x258f4: 0x6c10a420, 0x258f5: 0x6c1f5420, 0x258f6: 0x6cbc2820, 0x258f7: 0x6c8e6c20, + 0x258f8: 0x6c0f1820, 0x258fa: 0x6c772e20, 0x258fb: 0x6c3bde20, + // Block 0x964, offset 0x25900 + 0x25905: 0x6c2a2020, + 0x25909: 0x6c312820, 0x2590a: 0x6c440820, + 0x25919: 0x6c8d3a20, 0x2591a: 0x6cf79420, + 0x2591c: 0x6ca6ba20, 0x2591d: 0x6d389620, 0x2591e: 0x6d389820, + 0x25923: 0x6c1d7820, + 0x25934: 0x6ca6ee20, 0x25935: 0x6c5f0c20, 0x25937: 0x6cc12420, + // Block 0x965, offset 0x25940 + 0x25944: 0x6c763e20, 0x25947: 0x6cfcfc20, + 0x25949: 0x6c516820, 0x2594b: 0x6c8bd220, + 0x2594d: 0x6d3e7e20, + 0x25951: 0x6cab8c20, 0x25952: 0x6c245620, + 0x25957: 0x6c140420, + 0x2595d: 0x6d383820, 0x2595e: 0x6c102420, + 0x25964: 0x6c1d8220, 0x25965: 0x6cf8e220, 0x25966: 0x6cc99220, 0x25967: 0x6cfb9620, + 0x25968: 0x6ccb6420, 0x25969: 0x6c9e6020, 0x2596b: 0x6c38c020, + 0x2596c: 0x6d341620, 0x2596e: 0x6c256420, + 0x25974: 0x6cfa4620, + 0x2597e: 0x6cab1420, 0x2597f: 0x6c845820, + // Block 0x966, offset 0x25980 + 0x25980: 0x6d40de20, 0x25982: 0x6c24f220, 0x25983: 0x6d2b1220, + 0x25985: 0x6c845a20, + 0x25998: 0x6cb67620, 0x2599a: 0x6d3d1020, 0x2599b: 0x6c257a20, + 0x2599c: 0x6cb41e20, 0x2599e: 0x6c38d620, 0x2599f: 0x6ce02620, + 0x259a9: 0x6d3eac20, 0x259aa: 0x6d412a20, 0x259ab: 0x6d38bc20, + 0x259ac: 0x6cc6d020, 0x259ad: 0x6c8bee20, 0x259ae: 0x6ce02820, + 0x259b6: 0x6cd3fe20, + 0x259ba: 0x6c251420, 0x259bb: 0x6d3eb820, + 0x259bc: 0x6c3db620, + // Block 0x967, offset 0x259c0 + 0x259c1: 0x6d001c20, + 0x259c8: 0x6c3c7420, + 0x259cf: 0x6cfd4220, + 0x259d0: 0x6c670c20, 0x259d2: 0x6c3c0420, + 0x259d7: 0x6c875020, + 0x259d8: 0x6ca19820, + 0x259df: 0x6d1ed020, + 0x259e5: 0x6c5e5020, 0x259e7: 0x6cc16620, + 0x259ec: 0x6ca78220, + 0x259f0: 0x6c9cbe20, 0x259f3: 0x6cb80a20, + 0x259f6: 0x6c51ae20, + 0x259f8: 0x6c893a20, + 0x259ff: 0x6d42b420, + // Block 0x968, offset 0x25a00 + 0x25a02: 0x6c8df220, + 0x25a05: 0x6d39f820, 0x25a07: 0x6ca78c20, + 0x25a0a: 0x6c612420, 0x25a0b: 0x6cc62620, + 0x25a0c: 0x6c6a9620, 0x25a0d: 0x6c41d020, + 0x25a10: 0x6d170220, 0x25a13: 0x6d38ce20, + 0x25a15: 0x6cf4ca20, + 0x25a1a: 0x6c44fe20, 0x25a1b: 0x6c243220, + 0x25a1d: 0x6c9ed220, + 0x25a21: 0x6d0a0220, 0x25a23: 0x6d33cc20, + 0x25a24: 0x6cff7620, 0x25a27: 0x6c3e3a20, + 0x25a28: 0x6c553620, + 0x25a2c: 0x6c2b1e20, 0x25a2e: 0x6c741820, 0x25a2f: 0x6c2e1220, + 0x25a39: 0x6cd44420, + 0x25a3c: 0x6cee0a20, + // Block 0x969, offset 0x25a40 + 0x25a43: 0x6ca33820, + 0x25a44: 0x6c2b2620, 0x25a45: 0x6cd37020, 0x25a46: 0x6c224020, 0x25a47: 0x6cd4d220, + 0x25a49: 0x6cec2c20, 0x25a4a: 0x6c181820, 0x25a4b: 0x6c389820, + 0x25a4d: 0x6c470820, 0x25a4e: 0x6d24e620, + 0x25a51: 0x6c491420, + 0x25a5a: 0x6cbcbc20, + 0x25a5c: 0x6d2de820, 0x25a5d: 0x6c276020, 0x25a5e: 0x6cceee20, + 0x25a66: 0x6d388820, 0x25a67: 0x6cfde420, + 0x25a68: 0x6ca00020, 0x25a69: 0x6d3f5020, 0x25a6a: 0x6c599620, 0x25a6b: 0x6c9c5420, + 0x25a6d: 0x6cf88c20, 0x25a6e: 0x6d363c20, 0x25a6f: 0x6cac2820, + 0x25a70: 0x6c349420, + 0x25a74: 0x6c22c820, 0x25a75: 0x6ca1d420, 0x25a77: 0x6c17be20, + 0x25a79: 0x6d17b620, 0x25a7a: 0x6c464820, + // Block 0x96a, offset 0x25a80 + 0x25a87: 0x6c6dba20, + 0x25a93: 0x6d2b8020, + 0x25a94: 0x6cb25e20, 0x25a95: 0x6d130420, 0x25a96: 0x6c6af420, + 0x25a98: 0x6caf7620, 0x25a9b: 0x6ccbfe20, + 0x25a9c: 0x6d3c4420, 0x25a9d: 0x6c6f1e20, + 0x25aa0: 0x6c8e6e20, 0x25aa1: 0x6d227020, 0x25aa3: 0x6c70ac20, + 0x25aa8: 0x6caafe20, + 0x25ab8: 0x6c999c20, + // Block 0x96b, offset 0x25ac0 + 0x25ac4: 0x6c187420, 0x25ac6: 0x6d3bd420, 0x25ac7: 0x6ca76a20, + 0x25ac8: 0x6c79aa20, 0x25ac9: 0x6c6a2e20, 0x25aca: 0x6c57b020, + 0x25acd: 0x6d02e220, 0x25ace: 0x6d424a20, 0x25acf: 0x6d0e9620, + 0x25ad0: 0x6c748220, + 0x25ad5: 0x6c54ea20, 0x25ad6: 0x6d393a20, 0x25ad7: 0x6ccf6a20, + 0x25ad9: 0x6d0dbc20, 0x25adb: 0x6d01de20, + 0x25adc: 0x6c2ed420, 0x25adf: 0x6c187a20, + 0x25af2: 0x6c65c620, 0x25af3: 0x6c624c20, + 0x25af6: 0x6c21ce20, 0x25af7: 0x6c537420, + // Block 0x96c, offset 0x25b00 + 0x25b00: 0x6c26bc20, + 0x25b04: 0x6c764020, 0x25b05: 0x6d039820, 0x25b06: 0x6c5c1c20, 0x25b07: 0x6c65d020, + 0x25b08: 0x6d394820, 0x25b09: 0x6d2c8c20, 0x25b0a: 0x6c403820, 0x25b0b: 0x6c1c6020, + 0x25b0c: 0x6c082e20, 0x25b0d: 0x6cab0a20, + 0x25b11: 0x6c626820, 0x25b12: 0x6cb9c020, + 0x25b14: 0x6ced9620, 0x25b15: 0x6cab6a20, 0x25b16: 0x6c0a3220, 0x25b17: 0x6cd79c20, + 0x25b20: 0x6c6dd020, 0x25b21: 0x6d132e20, + // Block 0x96d, offset 0x25b40 + 0x25b44: 0x6c3a7220, 0x25b47: 0x6c844420, + 0x25b4a: 0x6c868020, 0x25b4b: 0x6cb01e20, + 0x25b52: 0x6cdc7a20, 0x25b53: 0x6c8e9e20, + 0x25b54: 0x6c517220, 0x25b55: 0x6c5d1420, 0x25b56: 0x6ce07a20, 0x25b57: 0x6cd79e20, + 0x25b58: 0x6d36ec20, 0x25b59: 0x6c0f5c20, + 0x25b5d: 0x6cf8e420, + 0x25b61: 0x6cb33620, 0x25b62: 0x6cc45c20, + 0x25b64: 0x6ca2b020, + 0x25b7d: 0x6d1db820, + // Block 0x96e, offset 0x25b80 + 0x25b82: 0x6c279620, + 0x25b8a: 0x6cb72220, 0x25b8b: 0x6c2e0220, + 0x25b8c: 0x6ca87c20, 0x25b8d: 0x6cd6e420, 0x25b8f: 0x6cce8c20, + 0x25b90: 0x6c7dc420, 0x25b91: 0x6cdc9020, 0x25b93: 0x6c30ca20, + 0x25b94: 0x6c2ef220, + 0x25b9c: 0x6c45ba20, + 0x25baf: 0x6d3bb020, + 0x25bb0: 0x6c4c8c20, + 0x25bbc: 0x6d05fa20, 0x25bbd: 0x6cc1e820, + // Block 0x96f, offset 0x25bc0 + 0x25bc0: 0x6d0a4c20, 0x25bc3: 0x6c689a20, + 0x25bc4: 0x6d30aa20, 0x25bc6: 0x6c2d9220, 0x25bc7: 0x6cca7620, + 0x25bc8: 0x6c080c20, 0x25bca: 0x6cdda620, 0x25bcb: 0x6cba2e20, + 0x25bcf: 0x6d05fc20, + 0x25bd1: 0x6d0a4e20, + 0x25bd4: 0x6ca17a20, + 0x25bf5: 0x6cdca820, 0x25bf6: 0x6c7ea820, 0x25bf7: 0x6d3a8a20, + 0x25bf8: 0x6d396420, 0x25bfa: 0x6c870820, + 0x25bfc: 0x6c280e20, 0x25bfd: 0x6c717820, 0x25bff: 0x6d286e20, + // Block 0x970, offset 0x25c00 + 0x25c00: 0x6c15fc20, 0x25c01: 0x6c956020, + 0x25c04: 0x6ccb8220, 0x25c06: 0x6c888620, + 0x25c08: 0x6d414e20, 0x25c0b: 0x6c7f7020, + 0x25c0c: 0x6cd6ec20, 0x25c0d: 0x6cbcfe20, + 0x25c18: 0x6c30ce20, + 0x25c1e: 0x6cf54a20, 0x25c1f: 0x6c9b9020, + 0x25c21: 0x6c62ce20, + 0x25c24: 0x6c1aee20, 0x25c26: 0x6ca65c20, + 0x25c38: 0x6d116e20, 0x25c3b: 0x6c7ec020, + 0x25c3e: 0x6c942020, + // Block 0x971, offset 0x25c40 + 0x25c40: 0x6cdcbe20, 0x25c41: 0x6c3dbe20, + 0x25c44: 0x6c830420, 0x25c45: 0x6cf05820, + 0x25c4e: 0x6c237820, + 0x25c54: 0x6c877020, 0x25c56: 0x6cb22820, + 0x25c58: 0x6c759020, 0x25c59: 0x6c71e420, 0x25c5b: 0x6c7ecc20, + 0x25c67: 0x6c62f220, + 0x25c6a: 0x6c9f1a20, + 0x25c6c: 0x6d125020, 0x25c6d: 0x6c0b2620, + 0x25c71: 0x6c23d420, 0x25c72: 0x6cd85e20, + 0x25c75: 0x6cd86020, + 0x25c78: 0x6c51b020, + // Block 0x972, offset 0x25c80 + 0x25c83: 0x6ca48820, + 0x25c85: 0x6c2f2620, + 0x25c88: 0x6c180220, 0x25c89: 0x6d282220, 0x25c8b: 0x6d052220, + 0x25c8c: 0x6cd4c220, 0x25c8e: 0x6c15b020, 0x25c8f: 0x6c9f4c20, + 0x25c90: 0x6c87fe20, 0x25c91: 0x6d19e620, 0x25c92: 0x6d037620, 0x25c93: 0x6cee9020, + 0x25c94: 0x6c479020, 0x25c95: 0x6ce7f020, 0x25c96: 0x6cddf620, 0x25c97: 0x6c3a5e20, + 0x25c98: 0x6c265420, 0x25c99: 0x6ca84620, 0x25c9a: 0x6c244820, 0x25c9b: 0x6d426e20, + 0x25c9c: 0x6c6b2020, 0x25c9d: 0x6d08b020, 0x25c9e: 0x6c0f5e20, 0x25c9f: 0x6c6c5e20, + 0x25ca0: 0x6d1b1220, 0x25ca1: 0x6d05f020, 0x25ca3: 0x6d20e420, + 0x25ca4: 0x6d048c20, 0x25ca6: 0x6cb76c20, 0x25ca7: 0x6c069620, + 0x25ca8: 0x6d03dc20, 0x25ca9: 0x6c45ec20, + 0x25cac: 0x6d418c20, + 0x25cb0: 0x6c6a1a20, 0x25cb2: 0x6c763020, + 0x25cb5: 0x6d03f020, 0x25cb6: 0x6c06b220, 0x25cb7: 0x6cd4ee20, + 0x25cb8: 0x6d23a020, 0x25cba: 0x6d38ee20, 0x25cbb: 0x6d2e0420, + // Block 0x973, offset 0x25cc0 + 0x25cc2: 0x6d37c620, + 0x25cc6: 0x6c140620, + 0x25cc8: 0x6c20e020, 0x25cc9: 0x6c8f4220, + 0x25cce: 0x6cdbdc20, + 0x25cd0: 0x6d3a8620, + 0x25cd9: 0x6c0bd220, + 0x25cdd: 0x6d035420, 0x25cdf: 0x6d0bce20, + 0x25ce2: 0x6c8daa20, + 0x25ce7: 0x6d0bd220, + 0x25cec: 0x6ce63020, + 0x25cf9: 0x6c2b5a20, + // Block 0x974, offset 0x25d00 + 0x25d01: 0x6cafca20, 0x25d02: 0x6c567620, 0x25d03: 0x6c132a20, + 0x25d0a: 0x6ce45e20, 0x25d0b: 0x6ca20220, + 0x25d0c: 0x6c731620, 0x25d0e: 0x6ca20420, + 0x25d10: 0x6c723020, 0x25d11: 0x6c8f0020, 0x25d13: 0x6c8e0c20, + 0x25d17: 0x6c8f0220, + 0x25d18: 0x6c568820, + 0x25d26: 0x6c3e3e20, 0x25d27: 0x6c553820, + 0x25d2a: 0x6c361820, 0x25d2b: 0x6c458420, + 0x25d2c: 0x6c470a20, + 0x25d31: 0x6c48b420, + 0x25d39: 0x6c94a420, 0x25d3b: 0x6c389a20, + 0x25d3c: 0x6c93e220, 0x25d3d: 0x6c9b1820, 0x25d3e: 0x6c3e8a20, 0x25d3f: 0x6c8e5e20, + // Block 0x975, offset 0x25d40 + 0x25d45: 0x6d00c220, 0x25d46: 0x6c471e20, + 0x25d48: 0x6cfcda20, 0x25d49: 0x6c0f1a20, 0x25d4b: 0x6c622220, + 0x25d53: 0x6cc2a220, + 0x25d54: 0x6c927220, + 0x25d5e: 0x6cd79420, + 0x25d61: 0x6ca20820, 0x25d62: 0x6d23a420, 0x25d63: 0x6c4eea20, + 0x25d69: 0x6d26d020, 0x25d6a: 0x6c289e20, + 0x25d6f: 0x6d218620, + 0x25d70: 0x6c64de20, 0x25d73: 0x6c429020, + 0x25d7f: 0x6c129420, + // Block 0x976, offset 0x25d80 + 0x25d80: 0x6cd0c820, 0x25d81: 0x6c8f1c20, + 0x25d86: 0x6c687e20, + 0x25d89: 0x6cdb2020, 0x25d8a: 0x6cdb2220, 0x25d8b: 0x6d383e20, + 0x25d92: 0x6c8aaa20, + 0x25d94: 0x6d085c20, 0x25d95: 0x6c92ee20, 0x25d97: 0x6c629e20, + 0x25d9a: 0x6d0cdc20, + 0x25d9f: 0x6c930820, + 0x25da1: 0x6c9fd220, 0x25da2: 0x6ce39620, + 0x25da6: 0x6c595c20, + 0x25da9: 0x6d18ec20, 0x25daa: 0x6ce08220, + 0x25dac: 0x6cf48820, + 0x25db0: 0x6c5f8020, + 0x25db7: 0x6c31e620, + 0x25db8: 0x6c7d9420, 0x25dba: 0x6c758e20, + 0x25dbf: 0x6cd21a20, + // Block 0x977, offset 0x25dc0 + 0x25dc0: 0x6ca44e20, 0x25dc1: 0x6cb3bc20, + 0x25dc4: 0x6cd52020, 0x25dc5: 0x6cc37e20, + 0x25dcc: 0x6cc5bc20, 0x25dcf: 0x6c3b6220, + 0x25dd2: 0x6cde3a20, 0x25dd3: 0x6cea4820, + 0x25dd5: 0x6d0f9c20, + 0x25de6: 0x6c342c20, 0x25de7: 0x6c21fc20, + 0x25de9: 0x6c478020, 0x25dea: 0x6c3b6e20, + 0x25ded: 0x6cc74620, + 0x25df1: 0x6c42c020, 0x25df2: 0x6cfdbe20, + 0x25df4: 0x6cfdc020, 0x25df5: 0x6c545420, 0x25df7: 0x6ce1c420, + 0x25df8: 0x6ccd8420, 0x25df9: 0x6d0fba20, 0x25dfa: 0x6d3f5220, + 0x25dfc: 0x6d256a20, + // Block 0x978, offset 0x25e00 + 0x25e04: 0x6cda7420, 0x25e07: 0x6c203820, + 0x25e08: 0x6cfdc820, 0x25e0a: 0x6c048a20, + 0x25e0c: 0x6c97c020, 0x25e0e: 0x6c3f6e20, 0x25e0f: 0x6c7e6420, + 0x25e10: 0x6c851e20, 0x25e12: 0x6c6af620, 0x25e13: 0x6d1ea820, + 0x25e18: 0x6d23a620, 0x25e1a: 0x6c1c4820, + 0x25e1c: 0x6c203a20, 0x25e1d: 0x6d182e20, 0x25e1e: 0x6ccd0020, + 0x25e22: 0x6c609220, 0x25e23: 0x6d0c2820, + 0x25e26: 0x6cf51820, 0x25e27: 0x6c215c20, + 0x25e28: 0x6c987420, + 0x25e2d: 0x6c3ede20, 0x25e2e: 0x6c637c20, 0x25e2f: 0x6c46d620, + 0x25e30: 0x6c474420, 0x25e31: 0x6c63e420, + 0x25e35: 0x6cfb9820, 0x25e37: 0x6c6d6020, + 0x25e38: 0x6d3f6420, 0x25e39: 0x6c90bc20, + 0x25e3c: 0x6c46da20, + // Block 0x979, offset 0x25e40 + 0x25e40: 0x6cc57c20, 0x25e42: 0x6ccd1420, + 0x25e45: 0x6c74da20, 0x25e46: 0x6ce79c20, 0x25e47: 0x6d1ffc20, + 0x25e54: 0x6c651a20, 0x25e55: 0x6c31dc20, 0x25e57: 0x6c55f020, + 0x25e5b: 0x6ccace20, + 0x25e5c: 0x6d246220, + 0x25e62: 0x6c974e20, + 0x25e64: 0x6d342620, 0x25e65: 0x6d0c4420, 0x25e66: 0x6c42f020, + 0x25e68: 0x6c582020, + 0x25e6e: 0x6cc34420, + 0x25e71: 0x6d103e20, 0x25e73: 0x6d418820, + 0x25e77: 0x6cfe8e20, + 0x25e78: 0x6d170620, 0x25e79: 0x6d0d5a20, 0x25e7a: 0x6c531e20, 0x25e7b: 0x6d20e620, + 0x25e7f: 0x6c1c0020, + // Block 0x97a, offset 0x25e80 + 0x25e81: 0x6c1b1020, + 0x25e84: 0x6c4f6a20, 0x25e85: 0x6ccb1e20, 0x25e86: 0x6cabbe20, 0x25e87: 0x6cde4020, + 0x25e88: 0x6c3b2620, 0x25e89: 0x6c1aa020, + 0x25e8c: 0x6c533220, 0x25e8d: 0x6d095220, + 0x25e96: 0x6d351e20, + 0x25e9b: 0x6cc19020, + 0x25ea0: 0x6cf5fe20, 0x25ea1: 0x6c3e6220, 0x25ea3: 0x6cd4e020, + 0x25ea4: 0x6c4d6a20, 0x25ea6: 0x6cb38c20, + 0x25ea8: 0x6c229a20, + 0x25eb0: 0x6c149a20, 0x25eb3: 0x6c52ae20, + 0x25eb8: 0x6cad7a20, 0x25eb9: 0x6ccff820, 0x25eba: 0x6cfede20, + 0x25ebd: 0x6d07ac20, 0x25ebe: 0x6c229e20, 0x25ebf: 0x6ce68420, + // Block 0x97b, offset 0x25ec0 + 0x25ec0: 0x6cb39620, + 0x25ec7: 0x6cde7e20, + 0x25ec8: 0x6c13a820, 0x25ecb: 0x6d40ce20, + 0x25ecc: 0x6c5de820, 0x25ecd: 0x6d071820, 0x25ece: 0x6d0e9820, 0x25ecf: 0x6c149e20, + 0x25ed1: 0x6ceb3420, + 0x25ed8: 0x6cfb8420, 0x25ed9: 0x6d07c620, 0x25eda: 0x6c542a20, 0x25edb: 0x6c58de20, + 0x25edc: 0x6c442620, 0x25edd: 0x6c1d3c20, 0x25ede: 0x6c0a3620, 0x25edf: 0x6c52bc20, + 0x25ee0: 0x6c52be20, 0x25ee1: 0x6c1b4a20, 0x25ee3: 0x6c140820, + 0x25eef: 0x6d2c8e20, + 0x25ef1: 0x6d2d1e20, 0x25ef2: 0x6cdea220, + 0x25ef5: 0x6cb3a220, 0x25ef6: 0x6cdea420, + 0x25ef8: 0x6d1f6e20, 0x25ef9: 0x6c3ef420, 0x25efa: 0x6c220e20, 0x25efb: 0x6c26be20, + 0x25efc: 0x6cde1a20, 0x25efe: 0x6c8ea020, + // Block 0x97c, offset 0x25f00 + 0x25f01: 0x6c221020, 0x25f03: 0x6c52d420, + 0x25f05: 0x6c4f1a20, 0x25f06: 0x6c7e5020, + 0x25f08: 0x6cd20420, + 0x25f0d: 0x6ce79e20, 0x25f0e: 0x6c5c7020, 0x25f0f: 0x6c518620, + 0x25f10: 0x6cb1d820, 0x25f11: 0x6d243a20, + 0x25f1c: 0x6cfaf020, 0x25f1d: 0x6c4e6c20, 0x25f1f: 0x6cb3ac20, + 0x25f26: 0x6c7ec220, 0x25f27: 0x6c5e5220, + 0x25f30: 0x6cdf8420, + 0x25f34: 0x6c819e20, 0x25f36: 0x6cd5b420, + 0x25f3a: 0x6c2a0a20, 0x25f3b: 0x6c2d1020, + // Block 0x97d, offset 0x25f40 + 0x25f48: 0x6d04a820, 0x25f4b: 0x6cee6020, + 0x25f4d: 0x6c17f820, 0x25f4e: 0x6ca3ae20, + 0x25f50: 0x6c73d420, 0x25f53: 0x6c375220, + 0x25f54: 0x6c375a20, 0x25f55: 0x6caa6c20, 0x25f56: 0x6caa8820, + 0x25f5d: 0x6d3bae20, + 0x25f62: 0x6cab2220, + 0x25f64: 0x6c8ac220, 0x25f65: 0x6c82b420, 0x25f67: 0x6c032a20, + 0x25f6c: 0x6c196820, 0x25f6f: 0x6c4a6a20, + 0x25f70: 0x6cc2f820, 0x25f71: 0x6c448820, 0x25f73: 0x6c45ee20, + 0x25f74: 0x6ccee020, + 0x25f79: 0x6c7f2020, 0x25f7a: 0x6d32e820, 0x25f7b: 0x6d183020, + 0x25f7c: 0x6c4bda20, 0x25f7d: 0x6ceea620, 0x25f7e: 0x6c951e20, + // Block 0x97e, offset 0x25f80 + 0x25f82: 0x6cd28620, 0x25f83: 0x6d1be820, + 0x25f84: 0x6cd14620, 0x25f85: 0x6ce8ea20, 0x25f86: 0x6c0a3820, + 0x25f88: 0x6d2aee20, 0x25f89: 0x6d383a20, 0x25f8b: 0x6cc72620, + 0x25f8c: 0x6cb64e20, 0x25f8d: 0x6c405620, 0x25f8e: 0x6c131820, + 0x25f93: 0x6c845c20, + 0x25f94: 0x6c978c20, 0x25f96: 0x6c886620, 0x25f97: 0x6c0c3020, + 0x25f9b: 0x6c207e20, + 0x25f9c: 0x6d18ee20, + 0x25fa0: 0x6cac3620, + 0x25fa5: 0x6d191420, 0x25fa6: 0x6c7b4820, + 0x25fa9: 0x6c0c5220, 0x25fab: 0x6c1c9e20, + 0x25fac: 0x6cc22020, 0x25fad: 0x6ca1ae20, 0x25fae: 0x6d301620, 0x25faf: 0x6ccc3c20, + 0x25fb0: 0x6ccc3e20, + 0x25fb7: 0x6d109620, + 0x25fb8: 0x6c457420, 0x25fb9: 0x6ca3b620, + 0x25fbc: 0x6d018420, 0x25fbf: 0x6ce53220, + // Block 0x97f, offset 0x25fc0 + 0x25fc6: 0x6d127820, + 0x25fc9: 0x6ccbe220, + 0x25fcf: 0x6ccaec20, + 0x25fd2: 0x6c2cc620, 0x25fd3: 0x6d06c220, + 0x25fd9: 0x6cc19220, + 0x25fe0: 0x6c52b020, 0x25fe1: 0x6cd16620, 0x25fe2: 0x6ce6ec20, + 0x25ff0: 0x6c352e20, + 0x25ff5: 0x6c89ea20, 0x25ff7: 0x6c53c220, + 0x25ff8: 0x6c852020, 0x25ffa: 0x6cfdee20, + 0x25ffd: 0x6cd0b620, + // Block 0x980, offset 0x26000 + 0x26000: 0x6c3d8220, + 0x26008: 0x6d0dc020, 0x26009: 0x6cee3220, 0x2600a: 0x6cb51620, 0x2600b: 0x6c34a620, + 0x2600d: 0x6c57b220, 0x2600e: 0x6cb90c20, + 0x26010: 0x6d01e020, + 0x2601d: 0x6c22d620, 0x2601e: 0x6cd11020, + 0x26022: 0x6c37dc20, + 0x26024: 0x6d039a20, 0x26026: 0x6cea0e20, 0x26027: 0x6d0ea220, + 0x26029: 0x6c8b2820, + 0x2602c: 0x6c9c6e20, + 0x26038: 0x6d402c20, 0x2603a: 0x6d3e8020, + 0x2603c: 0x6c55ba20, 0x2603d: 0x6d1c9e20, 0x2603e: 0x6c885620, 0x2603f: 0x6c266a20, + // Block 0x981, offset 0x26040 + 0x26040: 0x6ce4c420, 0x26041: 0x6ce53e20, + 0x2604b: 0x6cc6b020, + 0x2604d: 0x6c00d020, + 0x26050: 0x6c00e420, 0x26051: 0x6d309e20, 0x26052: 0x6c4c4620, 0x26053: 0x6c92f020, + 0x26054: 0x6d2f7a20, 0x26055: 0x6c9c8220, 0x26056: 0x6c8a2a20, 0x26057: 0x6d30a020, + 0x2605b: 0x6cc25020, + 0x2605c: 0x6c236820, 0x2605f: 0x6ce65020, + 0x26061: 0x6ce02c20, 0x26062: 0x6d2e2820, 0x26063: 0x6c55e020, + 0x26065: 0x6cb1da20, 0x26067: 0x6c267020, + 0x26068: 0x6cc6d220, + 0x2606e: 0x6ca52020, + 0x26073: 0x6ca45a20, + 0x26074: 0x6c291a20, 0x26075: 0x6c695c20, + 0x2607b: 0x6c72b620, + 0x2607c: 0x6c37ac20, + // Block 0x982, offset 0x26080 + 0x2608a: 0x6c877420, + 0x2608c: 0x6c4c4e20, 0x2608d: 0x6cec7e20, + 0x26092: 0x6ca7ee20, + 0x26094: 0x6c6c3420, + 0x260a9: 0x6cb04a20, 0x260aa: 0x6c1bde20, + 0x260b2: 0x6cb04c20, 0x260b3: 0x6d166e20, + 0x260b4: 0x6c316220, 0x260b5: 0x6cec1420, 0x260b6: 0x6d099020, + 0x260b8: 0x6cb73c20, 0x260b9: 0x6ccd6c20, + 0x260bc: 0x6d056a20, 0x260bf: 0x6c509020, + // Block 0x983, offset 0x260c0 + 0x260c0: 0x6caca620, 0x260c2: 0x6cadb420, + 0x260c4: 0x6d045a20, 0x260c6: 0x6c1b7e20, 0x260c7: 0x6cdf9020, + 0x260c8: 0x6d41a620, 0x260c9: 0x6d414820, 0x260ca: 0x6cb74c20, 0x260cb: 0x6c316420, + 0x260d9: 0x6cd70c20, + 0x260dc: 0x6ca2f220, 0x260dd: 0x6cf59620, + 0x260e7: 0x6c179420, + 0x260e8: 0x6d16d020, 0x260eb: 0x6d329e20, + 0x260ee: 0x6c70fe20, 0x260ef: 0x6c274c20, + 0x260f1: 0x6cc9fc20, + 0x260f4: 0x6d3ac820, 0x260f5: 0x6ced7620, + 0x260f8: 0x6cc9fe20, 0x260f9: 0x6c04f220, 0x260fa: 0x6c643c20, 0x260fb: 0x6c972c20, + // Block 0x984, offset 0x26100 + 0x26108: 0x6ceb9c20, 0x2610a: 0x6cb76020, + 0x2610f: 0x6d3c0c20, + 0x26110: 0x6ceb0220, 0x26113: 0x6cb28c20, + 0x2611d: 0x6cae6220, 0x2611e: 0x6c7b9a20, 0x2611f: 0x6d14d820, + 0x26121: 0x6d018620, 0x26122: 0x6d264c20, 0x26123: 0x6c523020, + 0x26125: 0x6c53f220, 0x26126: 0x6d32a420, 0x26127: 0x6c217420, + 0x26128: 0x6cd35e20, 0x26129: 0x6cec1c20, 0x2612b: 0x6d009620, + 0x26138: 0x6c452a20, + // Block 0x985, offset 0x26140 + 0x26145: 0x6c35fe20, + 0x2614f: 0x6c7a7220, + 0x26150: 0x6ca32c20, 0x26153: 0x6c707420, + 0x26154: 0x6d088e20, 0x26155: 0x6cc0fe20, 0x26156: 0x6c181c20, 0x26157: 0x6c939620, + 0x26158: 0x6c511420, 0x26159: 0x6cd16020, 0x2615a: 0x6ca44620, + 0x2615c: 0x6c511620, 0x2615d: 0x6c13de20, 0x2615e: 0x6d0bfe20, 0x2615f: 0x6c450a20, + 0x26160: 0x6ca81e20, 0x26162: 0x6c4c6a20, 0x26163: 0x6d0c8c20, + 0x26164: 0x6c494e20, 0x26167: 0x6d360420, + 0x26168: 0x6c81f420, + 0x2616f: 0x6c321820, + 0x26170: 0x6cb78220, 0x26171: 0x6cc10020, 0x26172: 0x6c742e20, + // Block 0x986, offset 0x26180 + 0x26181: 0x6c3c4220, 0x26183: 0x6d06c420, + 0x26184: 0x6ce9fc20, 0x26186: 0x6c4e1820, 0x26187: 0x6c7a4220, + 0x2618a: 0x6ccff020, 0x2618b: 0x6d363e20, + 0x2618d: 0x6cad2c20, 0x2618e: 0x6d32cc20, 0x2618f: 0x6c861820, + 0x26190: 0x6ced2620, 0x26192: 0x6c391020, 0x26193: 0x6d033a20, + 0x26196: 0x6d0bb620, + 0x2619b: 0x6c709820, + 0x2619c: 0x6cd0a620, + 0x261ad: 0x6c989020, 0x261af: 0x6cea7e20, + 0x261b0: 0x6d3d6620, 0x261b1: 0x6cf62820, 0x261b2: 0x6d1b5820, 0x261b3: 0x6c6db620, + 0x261b4: 0x6cea5420, 0x261b7: 0x6c453220, + 0x261b8: 0x6c620a20, + // Block 0x987, offset 0x261c0 + 0x261cf: 0x6d3ba820, + 0x261d2: 0x6ce5f220, + 0x261d4: 0x6d33e220, 0x261d6: 0x6c604420, + 0x261da: 0x6d1c8220, 0x261db: 0x6cf0aa20, + 0x261dd: 0x6c593c20, 0x261de: 0x6ce68620, 0x261df: 0x6c150620, + 0x261e2: 0x6c7c8e20, 0x261e3: 0x6cb86e20, + 0x261e4: 0x6c04fc20, 0x261e5: 0x6c13a420, 0x261e6: 0x6ceb8420, 0x261e7: 0x6ca43020, + 0x261e8: 0x6c6a2420, 0x261ea: 0x6d0c1620, + 0x261ec: 0x6ce8ca20, 0x261ee: 0x6cf1e620, + 0x261f0: 0x6c232020, 0x261f3: 0x6d06fc20, + 0x261f4: 0x6d1b6020, 0x261f7: 0x6c084420, + 0x261fc: 0x6c935820, + // Block 0x988, offset 0x26200 + 0x26201: 0x6d290620, 0x26202: 0x6c265820, + 0x26206: 0x6ca84820, 0x26207: 0x6c71c220, + 0x26208: 0x6c541620, + 0x2620c: 0x6c453a20, + 0x26215: 0x6c541820, 0x26216: 0x6c76b220, 0x26217: 0x6c459620, + 0x26219: 0x6c5b5e20, 0x2621a: 0x6d01e220, + 0x2621d: 0x6cf8ba20, 0x2621e: 0x6c4e2420, 0x2621f: 0x6c9c6820, + 0x26221: 0x6cf25c20, 0x26222: 0x6c5d3620, 0x26223: 0x6ccabc20, + 0x26224: 0x6d034220, 0x26225: 0x6d307220, 0x26226: 0x6c5dea20, + 0x26228: 0x6c45a020, 0x2622b: 0x6cc9e420, + 0x2622c: 0x6c6c4a20, 0x2622d: 0x6cebec20, + 0x26231: 0x6c332420, 0x26232: 0x6c1aca20, + 0x2623d: 0x6cf67e20, + // Block 0x989, offset 0x26240 + 0x26242: 0x6c9c6a20, 0x26243: 0x6d29e020, + 0x26244: 0x6cca8420, + 0x26253: 0x6cea5e20, + 0x26254: 0x6d366820, 0x26255: 0x6cf1ea20, + 0x26258: 0x6d1a9820, 0x26259: 0x6cea8220, 0x2625b: 0x6c1cda20, + 0x2625c: 0x6d2af020, 0x2625e: 0x6cff0a20, 0x2625f: 0x6ca07420, + 0x26260: 0x6c245820, 0x26263: 0x6c0b4e20, + 0x26264: 0x6d04f020, 0x26267: 0x6d154c20, + 0x2626e: 0x6c5a6020, + 0x26270: 0x6d2bf820, 0x26271: 0x6cdd3620, 0x26272: 0x6c5cfe20, 0x26273: 0x6c727e20, + // Block 0x98a, offset 0x26280 + 0x26281: 0x6c245a20, + 0x26284: 0x6c5f4020, 0x26285: 0x6d0a4420, 0x26286: 0x6cdcfe20, 0x26287: 0x6c135e20, + 0x26289: 0x6d18b020, + 0x2628e: 0x6c0c2220, + 0x26292: 0x6c74c220, 0x26293: 0x6c868220, + 0x26296: 0x6cad9a20, + 0x2629b: 0x6d289c20, + 0x2629c: 0x6d134220, 0x2629e: 0x6c0a5a20, 0x2629f: 0x6d310020, + 0x262a0: 0x6d310220, 0x262a2: 0x6c702420, 0x262a3: 0x6d309020, + 0x262a6: 0x6cd60e20, + 0x262aa: 0x6cf6d620, + 0x262b7: 0x6d065820, + 0x262b8: 0x6ca3a620, 0x262b9: 0x6cfb9a20, 0x262ba: 0x6c4bec20, 0x262bb: 0x6cf0d220, + 0x262be: 0x6c60c420, 0x262bf: 0x6cc9a220, + // Block 0x98b, offset 0x262c0 + 0x262c2: 0x6c304220, 0x262c3: 0x6caac820, + 0x262c4: 0x6c327a20, 0x262c5: 0x6d32fc20, 0x262c6: 0x6c7a6420, + 0x262c9: 0x6ca01c20, + 0x262d5: 0x6c05d820, 0x262d6: 0x6c5c5020, + 0x262d9: 0x6d3fc620, + 0x262e8: 0x6cca5c20, 0x262ea: 0x6ce29420, 0x262eb: 0x6d157220, + 0x262ed: 0x6d241620, + 0x262f1: 0x6d123220, 0x262f2: 0x6ca94a20, + 0x262f4: 0x6c1dfa20, 0x262f5: 0x6c5d4820, 0x262f7: 0x6c337620, + 0x262f9: 0x6cb7f220, 0x262fa: 0x6d1d1820, 0x262fb: 0x6c0e3420, + 0x262fc: 0x6ca92e20, 0x262fd: 0x6c5a1a20, + // Block 0x98c, offset 0x26300 + 0x26306: 0x6d1d1a20, + 0x2630a: 0x6c05da20, + 0x2630e: 0x6c4a2820, 0x2630f: 0x6c82f620, + 0x26310: 0x6d421020, + 0x26319: 0x6c15fe20, + 0x26323: 0x6c660a20, + 0x26327: 0x6c9b9220, + 0x26329: 0x6d002820, + 0x2632f: 0x6d035620, + 0x26331: 0x6c849e20, + 0x2633a: 0x6cbc2e20, + 0x2633f: 0x6cf05c20, + // Block 0x98d, offset 0x26340 + 0x26340: 0x6ca37620, 0x26342: 0x6cacee20, + 0x26344: 0x6c829020, 0x26347: 0x6c958220, + 0x2634b: 0x6c946220, + 0x2634d: 0x6c44ea20, 0x2634f: 0x6c946420, + 0x26352: 0x6cc22220, + 0x26356: 0x6c959020, + 0x26358: 0x6ca46820, 0x2635b: 0x6c959220, + 0x2635c: 0x6d273e20, + 0x26362: 0x6cd71a20, + 0x26365: 0x6c9d3e20, 0x26366: 0x6cede820, 0x26367: 0x6c12f420, + 0x26368: 0x6c64a620, 0x26369: 0x6cee2020, + 0x2636f: 0x6c637e20, + 0x26374: 0x6c58c020, + 0x26378: 0x6c894220, 0x26379: 0x6d3f2c20, 0x2637a: 0x6c040a20, 0x2637b: 0x6cd43c20, + 0x2637e: 0x6cecf220, + // Block 0x98e, offset 0x26380 + 0x26382: 0x6cd4c420, + 0x26387: 0x6c4a4e20, + 0x26388: 0x6cf5cc20, 0x2638a: 0x6cc79c20, 0x2638b: 0x6d11fe20, + 0x2638e: 0x6c42c220, + 0x26395: 0x6d26d220, + 0x26398: 0x6d1da820, 0x26399: 0x6cec3c20, 0x2639a: 0x6c0f4620, + 0x2639f: 0x6d034e20, + 0x263a2: 0x6cb0c620, 0x263a3: 0x6c0f7820, + 0x263a6: 0x6c4d7e20, 0x263a7: 0x6d2d5220, + 0x263a8: 0x6cf33020, 0x263aa: 0x6d138420, 0x263ab: 0x6c0ab820, + 0x263ac: 0x6c4d8620, + 0x263b8: 0x6c1c0220, 0x263bb: 0x6d360620, + 0x263bd: 0x6ca5dc20, + // Block 0x98f, offset 0x263c0 + 0x263c1: 0x6cf3d420, 0x263c2: 0x6c006e20, + 0x263c8: 0x6c006a20, 0x263c9: 0x6d229220, 0x263ca: 0x6c1c7020, + 0x263cd: 0x6c6eac20, 0x263ce: 0x6d371020, 0x263cf: 0x6d372c20, + 0x263d0: 0x6d372e20, 0x263d1: 0x6c70ee20, + 0x263d6: 0x6c4dd820, + 0x263da: 0x6cb24c20, + 0x263dd: 0x6d11a620, + 0x263e3: 0x6d1f1e20, + 0x263e4: 0x6cb25420, 0x263e6: 0x6ca11020, + 0x263ec: 0x6d429e20, 0x263ed: 0x6cb38e20, 0x263ef: 0x6d091220, + 0x263f0: 0x6c7bc420, 0x263f1: 0x6d17bc20, 0x263f2: 0x6cb39020, + 0x263fb: 0x6d3c9c20, + // Block 0x990, offset 0x26400 + 0x26403: 0x6ca5fa20, + 0x26404: 0x6cc0b020, 0x26405: 0x6c23f820, + 0x2640c: 0x6d11cc20, + 0x26411: 0x6c3b9820, + 0x26415: 0x6cf9f420, 0x26417: 0x6c677c20, + 0x26418: 0x6c13b220, 0x2641b: 0x6d000e20, + 0x2641c: 0x6c13b420, + 0x26422: 0x6c1a5020, 0x26423: 0x6c257e20, + 0x26427: 0x6cbf7c20, + 0x26429: 0x6d245220, 0x2642b: 0x6d21d820, + 0x2642f: 0x6cf21620, + 0x26431: 0x6c13c020, 0x26432: 0x6d22ae20, + 0x26439: 0x6d425420, 0x2643a: 0x6c29fc20, + 0x2643d: 0x6c73a820, 0x2643e: 0x6c29fe20, 0x2643f: 0x6d1c4c20, + // Block 0x991, offset 0x26440 + 0x26441: 0x6c3cd420, + 0x26445: 0x6cf27a20, + 0x26448: 0x6c6cf620, 0x26449: 0x6cb76e20, 0x2644b: 0x6cbe0e20, + 0x2644d: 0x6c7dee20, 0x2644f: 0x6cdf9e20, + 0x26450: 0x6cfa9420, 0x26452: 0x6ce46420, + 0x26454: 0x6c7df620, 0x26456: 0x6ce53a20, + 0x26458: 0x6c556420, 0x26459: 0x6d39aa20, 0x2645a: 0x6d2d7620, 0x2645b: 0x6cde5820, + 0x2645d: 0x6ce46e20, 0x2645e: 0x6cde6820, 0x2645f: 0x6cde8020, + 0x26460: 0x6c574820, 0x26461: 0x6d0dc220, 0x26462: 0x6ce61620, + 0x26464: 0x6ce61820, 0x26465: 0x6cde8220, + 0x2646c: 0x6c581020, 0x2646e: 0x6c63e620, 0x2646f: 0x6cb7e020, + 0x26471: 0x6cdeae20, + 0x26474: 0x6cdfc220, 0x26475: 0x6c57ce20, + 0x26478: 0x6d3bf620, 0x26479: 0x6c572220, + 0x2647c: 0x6c800c20, + // Block 0x992, offset 0x26480 + 0x26486: 0x6d420420, 0x26487: 0x6d169820, + 0x26488: 0x6c3dfe20, 0x26489: 0x6cf4bc20, 0x2648b: 0x6c3e0020, + 0x2648d: 0x6c2f5620, 0x2648e: 0x6cde3c20, + 0x26496: 0x6c17b820, + 0x26499: 0x6cc64220, 0x2649a: 0x6cc35620, + 0x2649c: 0x6c438420, + 0x264a1: 0x6c3e6620, 0x264a2: 0x6c2c4c20, 0x264a3: 0x6c2dc620, + 0x264a4: 0x6d1e3020, 0x264a6: 0x6c643e20, + 0x264a9: 0x6c8f8e20, + 0x264ac: 0x6d1e3220, 0x264ad: 0x6cafe020, 0x264af: 0x6c5d7820, + 0x264b0: 0x6cbf3020, 0x264b2: 0x6c38a020, 0x264b3: 0x6cf3d620, + 0x264b4: 0x6ce74e20, 0x264b5: 0x6c4f7e20, + 0x264b8: 0x6cdfac20, + 0x264be: 0x6c525020, + // Block 0x993, offset 0x264c0 + 0x264c4: 0x6ce56220, + 0x264c8: 0x6d388e20, 0x264cb: 0x6c045420, + 0x264cc: 0x6d01e420, 0x264cd: 0x6c29c620, 0x264cf: 0x6c6c4c20, + 0x264d5: 0x6c54ec20, 0x264d6: 0x6c06b620, + 0x264d8: 0x6c2fb220, + 0x264dc: 0x6caac420, 0x264dd: 0x6cf0c620, 0x264de: 0x6d218c20, + 0x264e0: 0x6d039c20, 0x264e1: 0x6c3ee020, 0x264e2: 0x6cfd0020, 0x264e3: 0x6cb7c420, + 0x264e4: 0x6ce87820, 0x264e7: 0x6c609420, + 0x264e9: 0x6d1d4620, 0x264eb: 0x6c2ae420, + 0x264ec: 0x6ceeb020, 0x264ed: 0x6cf6ae20, 0x264ef: 0x6cac0220, + 0x264f1: 0x6cd12020, 0x264f2: 0x6d1fec20, + 0x264f4: 0x6c005220, 0x264f5: 0x6c66d220, 0x264f7: 0x6c466020, + 0x264f8: 0x6cc93020, + 0x264fc: 0x6c462220, 0x264ff: 0x6ccc6e20, + // Block 0x994, offset 0x26500 + 0x26500: 0x6ce13a20, + 0x26507: 0x6c92f220, + 0x26508: 0x6c027820, 0x2650a: 0x6cb7ee20, 0x2650b: 0x6d04fc20, + 0x2650d: 0x6c271020, + 0x26511: 0x6c382a20, 0x26512: 0x6cf0f420, + 0x26514: 0x6c341020, 0x26515: 0x6c8a3a20, 0x26516: 0x6c386620, 0x26517: 0x6c5a1c20, + 0x26518: 0x6c74dc20, 0x26519: 0x6cdec020, 0x2651a: 0x6d422020, 0x2651b: 0x6cc53020, + 0x2651c: 0x6c117a20, 0x2651d: 0x6ce2c020, + 0x26520: 0x6c57d020, 0x26521: 0x6d05fe20, 0x26523: 0x6d2dae20, + 0x26527: 0x6c41f420, + 0x2652a: 0x6caeea20, 0x2652b: 0x6c118020, + 0x2652c: 0x6d005820, 0x2652d: 0x6c26d020, + 0x26531: 0x6c62d020, + 0x26536: 0x6c854820, + 0x26539: 0x6cac9020, + 0x2653d: 0x6c8ffa20, 0x2653e: 0x6c877620, 0x2653f: 0x6cf7c220, + // Block 0x995, offset 0x26540 + 0x26540: 0x6ce2d620, 0x26543: 0x6c8dac20, + 0x26548: 0x6c855820, 0x26549: 0x6cc4a220, 0x2654a: 0x6c8df420, + 0x2654e: 0x6c4bca20, + 0x26554: 0x6cb30a20, 0x26555: 0x6ca11220, 0x26556: 0x6cabf020, + 0x26559: 0x6c03b420, + 0x26561: 0x6cb62820, + 0x26564: 0x6d0cc420, + 0x2656a: 0x6cec3e20, 0x2656b: 0x6c020c20, + 0x2656d: 0x6ca04a20, 0x2656e: 0x6c9fca20, 0x2656f: 0x6d0ab220, + 0x26570: 0x6c9b9420, 0x26573: 0x6c48d620, + 0x26576: 0x6c682420, + 0x2657b: 0x6c410a20, + // Block 0x996, offset 0x26580 + 0x26581: 0x6c110a20, 0x26582: 0x6cf4ac20, 0x26583: 0x6d301820, + 0x26584: 0x6cc58820, 0x26585: 0x6c79b420, + 0x26594: 0x6d2f8a20, 0x26595: 0x6d37a220, 0x26596: 0x6cc00a20, 0x26597: 0x6c4c1420, + 0x26598: 0x6c456a20, 0x26599: 0x6cb40220, 0x2659a: 0x6c566c20, 0x2659b: 0x6c9e0820, + 0x2659e: 0x6ce45a20, + 0x265a3: 0x6cee0020, + 0x265b8: 0x6d3a0020, 0x265b9: 0x6c268a20, 0x265ba: 0x6d048e20, 0x265bb: 0x6ca2d420, + 0x265be: 0x6c72de20, + // Block 0x997, offset 0x265c0 + 0x265c1: 0x6ca71a20, + 0x265c8: 0x6c567820, 0x265c9: 0x6ccbd420, + 0x265dc: 0x6d33b820, 0x265df: 0x6cdde420, + 0x265e1: 0x6cd7d820, + 0x265e5: 0x6d170820, + 0x265ed: 0x6cbf1020, 0x265ee: 0x6d35c820, 0x265ef: 0x6c939220, + 0x265f0: 0x6cc79e20, 0x265f2: 0x6cb5ac20, 0x265f3: 0x6d224020, + 0x265f4: 0x6d386a20, 0x265f5: 0x6d0fa620, 0x265f6: 0x6cfc0420, 0x265f7: 0x6ca1cc20, + 0x265f8: 0x6c1d9a20, 0x265f9: 0x6c5aa820, 0x265fa: 0x6c6f6420, 0x265fb: 0x6c6fec20, + 0x265fc: 0x6cb19220, + // Block 0x998, offset 0x26600 + 0x26601: 0x6c699220, 0x26603: 0x6c48c620, + 0x26605: 0x6ca0fe20, + 0x26610: 0x6cf5ce20, 0x26611: 0x6cb43220, + 0x2662f: 0x6c61d420, + 0x26636: 0x6cf1da20, 0x26637: 0x6c071620, + 0x26638: 0x6d15ea20, 0x26639: 0x6c3e6a20, 0x2663a: 0x6cd7e420, 0x2663b: 0x6c72f020, + 0x2663c: 0x6c61f620, 0x2663e: 0x6ca69a20, + // Block 0x999, offset 0x26640 + 0x26640: 0x6c07b620, + 0x26645: 0x6d06c620, + 0x26648: 0x6cbdd220, 0x26649: 0x6c0ef820, + 0x2664c: 0x6cede620, 0x2664d: 0x6d30f620, 0x2664f: 0x6cf2e620, + 0x26650: 0x6ccea420, 0x26651: 0x6d2a8020, 0x26652: 0x6d101820, + 0x26655: 0x6cd98a20, 0x26656: 0x6ca82020, + 0x2665b: 0x6c098620, + 0x26663: 0x6c242420, + 0x26664: 0x6cbab220, + 0x2666a: 0x6cffe620, 0x2666b: 0x6d33d620, + 0x2666c: 0x6ccf1020, 0x2666f: 0x6d360820, + 0x26670: 0x6cae7020, + // Block 0x99a, offset 0x26680 + 0x2668f: 0x6c2e1e20, + 0x26696: 0x6cf2f820, + 0x26698: 0x6d352020, 0x26699: 0x6c098820, 0x2669b: 0x6c3b7020, + 0x266a5: 0x6c052a20, + 0x266aa: 0x6cc06c20, 0x266ab: 0x6ca63a20, + 0x266ac: 0x6c0f0620, 0x266ad: 0x6c33f220, 0x266af: 0x6cd2d020, + 0x266b0: 0x6d05a220, 0x266b1: 0x6c16ac20, 0x266b2: 0x6d05a420, 0x266b3: 0x6d128020, + 0x266b4: 0x6c9c5620, + 0x266b8: 0x6d02d620, 0x266b9: 0x6d3d6820, 0x266ba: 0x6c3ff620, + 0x266bd: 0x6cb06020, 0x266be: 0x6d095e20, + // Block 0x99b, offset 0x266c0 + 0x266c0: 0x6d235020, 0x266c1: 0x6cfb6020, 0x266c2: 0x6d235220, 0x266c3: 0x6d213420, + 0x266c5: 0x6c709a20, 0x266c6: 0x6cddec20, 0x266c7: 0x6c797c20, + 0x266ca: 0x6d32ce20, 0x266cb: 0x6c9b1a20, + 0x266cc: 0x6c428420, + 0x266d2: 0x6ca28a20, 0x266d3: 0x6cf7ea20, + 0x266d4: 0x6c09aa20, 0x266d6: 0x6c3ff820, + 0x266dc: 0x6cfff420, + 0x266e0: 0x6c6f7620, 0x266e3: 0x6c468820, + 0x266f0: 0x6c1b2820, 0x266f1: 0x6c6f7820, 0x266f2: 0x6c6f7a20, + 0x266f5: 0x6ccbf820, 0x266f7: 0x6c3a0820, + // Block 0x99c, offset 0x26700 + 0x2672b: 0x6c3e8c20, + 0x2672f: 0x6ced8a20, + 0x26730: 0x6d05a620, 0x26731: 0x6c0e7620, + // Block 0x99d, offset 0x26740 + 0x26741: 0x6c504820, 0x26743: 0x6d00c420, + 0x26744: 0x6cb11820, 0x26745: 0x6d227420, 0x26747: 0x6ce4ae20, + 0x26748: 0x6cb00020, 0x2674a: 0x6cd2d220, 0x2674b: 0x6c7afc20, + 0x2674c: 0x6c5ef020, 0x2674f: 0x6d2be420, + 0x26750: 0x6ca3cc20, 0x26751: 0x6ca20620, 0x26753: 0x6c3ea620, + 0x26754: 0x6c326820, 0x26757: 0x6cd13e20, + 0x26758: 0x6c13ee20, 0x2675a: 0x6c1b3820, 0x2675b: 0x6c4b0820, + 0x2675c: 0x6c9f6620, 0x2675d: 0x6ce0c220, 0x2675e: 0x6c044c20, 0x2675f: 0x6cbac220, + 0x26761: 0x6d3d7420, 0x26762: 0x6cf0ac20, 0x26763: 0x6d0a1e20, + 0x26765: 0x6c9e9620, 0x26766: 0x6d290820, 0x26767: 0x6d1f4a20, + 0x26769: 0x6d204c20, 0x2676b: 0x6cccee20, + 0x2676c: 0x6c514220, 0x2676d: 0x6c93a220, 0x2676e: 0x6d347820, + 0x26772: 0x6c6e9020, 0x26773: 0x6d317020, + 0x26776: 0x6c9b2620, 0x26777: 0x6d1f4c20, + 0x26779: 0x6cf30020, 0x2677a: 0x6c038620, + 0x2677d: 0x6c737820, 0x2677e: 0x6cc7b220, 0x2677f: 0x6c23f220, + // Block 0x99e, offset 0x26780 + 0x26780: 0x6d33fc20, + 0x26789: 0x6c557620, 0x2678a: 0x6d0f5c20, + 0x2678c: 0x6c75d020, 0x2678d: 0x6ccf1c20, 0x2678e: 0x6c79f220, + 0x26791: 0x6cb9a820, + 0x26794: 0x6c9b2820, + 0x2679a: 0x6ce58c20, + // Block 0x99f, offset 0x267c0 + 0x267d0: 0x6ca84a20, + 0x267df: 0x6c1b3a20, + 0x267e1: 0x6d047220, 0x267e3: 0x6c5d3820, + 0x267e6: 0x6c2b8020, 0x267e7: 0x6c80d620, + 0x267e9: 0x6d2a1a20, 0x267ea: 0x6c130a20, 0x267eb: 0x6cdd8420, + 0x267ec: 0x6d412c20, 0x267ed: 0x6cdbd020, 0x267ef: 0x6cf9e020, + 0x267f1: 0x6d01e620, + 0x267f4: 0x6c6b1220, 0x267f5: 0x6d1f5820, 0x267f7: 0x6c46ca20, + 0x267f8: 0x6c451620, + 0x267fc: 0x6c75d820, 0x267fd: 0x6c5a5e20, 0x267fe: 0x6c607420, 0x267ff: 0x6cb3ca20, + // Block 0x9a0, offset 0x26800 + 0x26800: 0x6cf37820, 0x26802: 0x6d183420, + 0x26805: 0x6ca3a420, 0x26807: 0x6cc71820, + 0x26808: 0x6ca40820, 0x2680a: 0x6cb2c020, 0x2680b: 0x6ccd9420, + 0x2680c: 0x6c2dd820, 0x2680d: 0x6c607620, 0x2680e: 0x6c571420, 0x2680f: 0x6c335620, + 0x26810: 0x6c79a020, 0x26811: 0x6cde8620, 0x26813: 0x6c53c620, + 0x26815: 0x6cd4f820, + 0x26819: 0x6c526a20, 0x2681a: 0x6c3bc020, + 0x26832: 0x6c79fa20, + // Block 0x9a1, offset 0x26840 + 0x26859: 0x6ca70220, + 0x2685d: 0x6c1e9e20, + 0x26866: 0x6cbb5a20, + 0x26872: 0x6cf8bc20, 0x26873: 0x6c558020, + 0x26874: 0x6cd99620, 0x26875: 0x6cf30a20, 0x26877: 0x6c4d7620, + 0x26878: 0x6cc7b820, 0x26879: 0x6c9b3020, 0x2687b: 0x6cca2420, + 0x2687d: 0x6cf3de20, 0x2687f: 0x6d1f6420, + // Block 0x9a2, offset 0x26880 + 0x26881: 0x6cdfba20, 0x26882: 0x6cd01220, + 0x26886: 0x6cb71220, + 0x26888: 0x6c4c8420, 0x26889: 0x6cb87420, 0x2688a: 0x6cfad020, + 0x2688f: 0x6cdbd620, + 0x26890: 0x6c92b020, 0x26893: 0x6cb52620, + 0x26894: 0x6c2ddc20, 0x26897: 0x6cb64020, + 0x26898: 0x6c63dc20, 0x26899: 0x6d1f6620, 0x2689a: 0x6cf79e20, 0x2689b: 0x6c177a20, + 0x268a1: 0x6c9d7e20, 0x268a2: 0x6c911820, 0x268a3: 0x6c08f220, + 0x268aa: 0x6cadec20, + 0x268ae: 0x6d318e20, 0x268af: 0x6cd01420, + 0x268b0: 0x6c15da20, 0x268b1: 0x6c403a20, + 0x268b6: 0x6cc13820, 0x268b7: 0x6cd82220, + 0x268ba: 0x6d417a20, + // Block 0x9a3, offset 0x268c0 + 0x268eb: 0x6d2fd620, + 0x268fd: 0x6cb01220, + // Block 0x9a4, offset 0x26900 + 0x26900: 0x6c23fa20, + 0x26906: 0x6c42e220, 0x26907: 0x6c31b620, + 0x26909: 0x6c3da420, 0x2690a: 0x6c492620, 0x2690b: 0x6ccae620, + 0x2690c: 0x6cda2a20, 0x2690d: 0x6c65da20, 0x2690e: 0x6cb3e020, + 0x26910: 0x6c11ac20, 0x26911: 0x6c085020, 0x26912: 0x6ca20c20, 0x26913: 0x6d2f7420, + 0x26914: 0x6cff9a20, 0x26916: 0x6c715c20, 0x26917: 0x6cd50620, + 0x26918: 0x6c65dc20, 0x26919: 0x6c844e20, 0x2691b: 0x6c203e20, + 0x2691c: 0x6c81e220, 0x2691e: 0x6c51ea20, 0x2691f: 0x6c55bc20, + 0x26920: 0x6c473220, 0x26921: 0x6d2f0c20, 0x26922: 0x6c6b3620, 0x26923: 0x6cfe5620, + 0x26925: 0x6c317820, 0x26926: 0x6c4e3220, 0x26927: 0x6c63e820, + 0x26928: 0x6cfe5820, 0x26929: 0x6c60ae20, 0x2692a: 0x6cd56c20, 0x2692b: 0x6c812e20, + 0x2692c: 0x6c5f4220, 0x2692d: 0x6ccd0e20, + 0x26930: 0x6ce1ee20, 0x26931: 0x6d3e8e20, 0x26932: 0x6cd69620, + 0x26934: 0x6c60b020, 0x26935: 0x6c1f7820, 0x26936: 0x6c628020, 0x26937: 0x6cd01c20, + 0x26938: 0x6c8c6820, 0x26939: 0x6c8a2020, 0x2693b: 0x6cca2a20, + 0x2693d: 0x6c019220, 0x2693e: 0x6cc87c20, + // Block 0x9a5, offset 0x26940 + 0x26940: 0x6ce37820, 0x26941: 0x6c28b820, 0x26943: 0x6c589c20, + 0x26945: 0x6cc99420, + // Block 0x9a6, offset 0x26980 + 0x26986: 0x6cc8a420, 0x26987: 0x6cf38020, + 0x26988: 0x6c729620, 0x26989: 0x6c589e20, 0x2698a: 0x6c838620, 0x2698b: 0x6c92dc20, + 0x2698e: 0x6cdfbe20, 0x2698f: 0x6d2b9620, + 0x26993: 0x6cb9ca20, + 0x26997: 0x6cf6d820, + 0x269a1: 0x6c22a220, 0x269a2: 0x6ccf2620, + 0x269a7: 0x6cc99620, + 0x269aa: 0x6c99bc20, 0x269ab: 0x6cc1da20, + 0x269ad: 0x6c0f7a20, 0x269ae: 0x6c41f020, + 0x269b0: 0x6cbcea20, 0x269b1: 0x6c739a20, 0x269b2: 0x6c290e20, 0x269b3: 0x6c16cc20, + 0x269b4: 0x6d0fde20, 0x269b5: 0x6c518020, 0x269b7: 0x6c5f5c20, + 0x269b9: 0x6c0df820, 0x269bb: 0x6c9a3020, + 0x269bf: 0x6c33b820, + // Block 0x9a7, offset 0x269c0 + 0x269c0: 0x6c02b020, 0x269c1: 0x6c6dd820, 0x269c2: 0x6c92f420, 0x269c3: 0x6c9e6620, + 0x269c4: 0x6c2d8a20, 0x269c5: 0x6c51f220, 0x269c7: 0x6c650420, + 0x269ca: 0x6c575e20, 0x269cb: 0x6c466220, + 0x269ce: 0x6c92f620, 0x269cf: 0x6c3f0a20, + 0x269d0: 0x6c5b7220, 0x269d2: 0x6d2b6620, + 0x269d4: 0x6c6d6220, 0x269d5: 0x6cd83420, 0x269d6: 0x6cc43e20, + 0x269dc: 0x6c28cc20, 0x269de: 0x6ced9e20, 0x269df: 0x6c0b5620, + 0x269e4: 0x6c63ee20, + 0x269eb: 0x6c284e20, + 0x269ec: 0x6c6f8a20, 0x269ed: 0x6cfb9c20, 0x269ee: 0x6c0f7c20, + // Block 0x9a8, offset 0x26a00 + 0x26a0f: 0x6cfa0020, + 0x26a11: 0x6c0c3220, + 0x26a15: 0x6cb3a820, + 0x26a18: 0x6ccae820, 0x26a19: 0x6c076620, 0x26a1a: 0x6ccc8020, 0x26a1b: 0x6cf02e20, + 0x26a1d: 0x6c123e20, 0x26a1e: 0x6c92f820, + 0x26a29: 0x6c28ce20, 0x26a2b: 0x6c47e820, + 0x26a2c: 0x6d289e20, 0x26a2d: 0x6c055820, 0x26a2e: 0x6c423820, + 0x26a31: 0x6c175420, 0x26a32: 0x6c62ae20, 0x26a33: 0x6c8ab620, + 0x26a35: 0x6cbf7e20, 0x26a36: 0x6c66f420, 0x26a37: 0x6c930a20, + 0x26a38: 0x6c32a620, 0x26a39: 0x6cdb8a20, 0x26a3a: 0x6d116020, 0x26a3b: 0x6d1b1620, + 0x26a3d: 0x6cdec220, 0x26a3e: 0x6d116220, 0x26a3f: 0x6c6de020, + // Block 0x9a9, offset 0x26a40 + 0x26a40: 0x6c1ebc20, 0x26a41: 0x6c3f1220, 0x26a42: 0x6d25c220, 0x26a43: 0x6ccebc20, + 0x26a45: 0x6c0e3620, 0x26a46: 0x6c299e20, 0x26a47: 0x6cd3f820, + 0x26a4a: 0x6c916420, 0x26a4b: 0x6cbcf220, + 0x26a4c: 0x6c955c20, 0x26a4d: 0x6cb3ae20, 0x26a4f: 0x6c9b7a20, + 0x26a50: 0x6c6b6620, 0x26a53: 0x6c5f7220, + 0x26a56: 0x6c930c20, + // Block 0x9aa, offset 0x26a80 + 0x26a84: 0x6c172a20, 0x26a85: 0x6c9f0020, 0x26a86: 0x6c9b7c20, 0x26a87: 0x6c660220, + 0x26a8a: 0x6c114020, + 0x26a8c: 0x6cdb5220, + 0x26a94: 0x6c51fe20, 0x26a95: 0x6cc9aa20, 0x26a97: 0x6d3eae20, + 0x26a98: 0x6c795e20, 0x26a99: 0x6c452220, 0x26a9a: 0x6cd83a20, + 0x26aa0: 0x6ce3a420, 0x26aa1: 0x6d2e8e20, 0x26aa2: 0x6d026420, 0x26aa3: 0x6cd70020, + 0x26aa4: 0x6c1bcc20, 0x26aa5: 0x6d1ec620, 0x26aa6: 0x6c91f820, 0x26aa7: 0x6c9c1a20, + 0x26aa8: 0x6c8b6020, 0x26aa9: 0x6cd8f620, + 0x26aac: 0x6cf71820, 0x26aad: 0x6c38da20, 0x26aae: 0x6c3db820, 0x26aaf: 0x6cd08820, + 0x26ab0: 0x6ce3a620, 0x26ab1: 0x6c14a420, 0x26ab2: 0x6d270620, + 0x26ab4: 0x6c3dba20, 0x26ab5: 0x6c670220, 0x26ab6: 0x6c2cb020, + 0x26aba: 0x6d011a20, 0x26abb: 0x6c281220, + 0x26abf: 0x6d34b020, + // Block 0x9ab, offset 0x26ac0 + 0x26ac3: 0x6d075620, + 0x26ac8: 0x6ca89820, 0x26ac9: 0x6c397420, 0x26aca: 0x6c9b8820, 0x26acb: 0x6c9fd420, + 0x26afe: 0x6c90d220, 0x26aff: 0x6c31e820, + // Block 0x9ac, offset 0x26b00 + 0x26b01: 0x6d2e9620, 0x26b02: 0x6c671020, 0x26b03: 0x6c4f2e20, + 0x26b04: 0x6c28e220, 0x26b05: 0x6ccbb220, 0x26b06: 0x6c671220, 0x26b07: 0x6ce03e20, + 0x26b08: 0x6c696c20, 0x26b09: 0x6cb34220, 0x26b0b: 0x6cb2e420, + 0x26b0d: 0x6d3bf820, 0x26b0f: 0x6c8a4c20, + 0x26b10: 0x6d3f6620, 0x26b12: 0x6d3dd820, + 0x26b14: 0x6c56de20, + 0x26b19: 0x6cf92020, 0x26b1b: 0x6c9b9620, + 0x26b1c: 0x6c72ba20, 0x26b1d: 0x6c9f0c20, 0x26b1e: 0x6cfbcc20, + 0x26b20: 0x6c7d3820, 0x26b21: 0x6c9b9820, 0x26b22: 0x6c653420, + 0x26b26: 0x6caa0a20, + 0x26b28: 0x6c2cb220, 0x26b29: 0x6ccad220, + // Block 0x9ad, offset 0x26b40 + 0x26b4f: 0x6c1f8c20, + 0x26b50: 0x6d34bc20, 0x26b51: 0x6cb9e220, 0x26b52: 0x6c93c420, + 0x26b54: 0x6d3ddc20, + 0x26b58: 0x6d42b020, 0x26b59: 0x6c4e4820, 0x26b5a: 0x6cdc1820, 0x26b5b: 0x6c46e220, + 0x26b5d: 0x6c1e3c20, 0x26b5e: 0x6c62da20, 0x26b5f: 0x6d194820, + 0x26b60: 0x6d21f020, + 0x26b68: 0x6caa0c20, 0x26b69: 0x6ca66420, 0x26b6a: 0x6cc93620, + 0x26b6e: 0x6c8c0820, + 0x26b71: 0x6ca93820, + // Block 0x9ae, offset 0x26b80 + 0x26b8d: 0x6cbc1620, 0x26b8e: 0x6d117c20, 0x26b8f: 0x6c409c20, + 0x26b90: 0x6cd6b620, 0x26b91: 0x6c7d3e20, 0x26b92: 0x6cc21220, 0x26b93: 0x6c304a20, + 0x26b94: 0x6cd58a20, + 0x26b9a: 0x6c84c020, 0x26b9b: 0x6c719220, + 0x26b9c: 0x6cc8bc20, + 0x26ba0: 0x6d2c6c20, + 0x26ba4: 0x6cff5420, + 0x26bb8: 0x6c9ae220, 0x26bb9: 0x6cd29820, 0x26bba: 0x6c2cfc20, 0x26bbb: 0x6c878e20, + 0x26bbc: 0x6c2b0420, 0x26bbd: 0x6d29c420, 0x26bbf: 0x6c958420, + // Block 0x9af, offset 0x26bc0 + 0x26bc0: 0x6c11c620, 0x26bc3: 0x6c023c20, + 0x26bc6: 0x6c663620, + 0x26bc8: 0x6c2e5020, 0x26bcb: 0x6d1cd820, + 0x26bd6: 0x6d197220, 0x26bd7: 0x6c294620, + 0x26bd8: 0x6caa1220, 0x26bda: 0x6d272620, + 0x26bee: 0x6c855620, 0x26bef: 0x6c84e220, + 0x26bf0: 0x6c56f620, 0x26bf2: 0x6d206420, + 0x26bfa: 0x6ca48420, + // Block 0x9b0, offset 0x26c00 + 0x26c02: 0x6c194a20, + 0x26c09: 0x6c3c9220, 0x26c0a: 0x6c0cd220, + 0x26c0f: 0x6c97d820, + 0x26c10: 0x6c424a20, 0x26c11: 0x6c5e6020, 0x26c13: 0x6c241c20, + 0x26c15: 0x6d200020, + 0x26c18: 0x6d206620, + 0x26c1c: 0x6d057c20, + 0x26c21: 0x6d06b020, 0x26c22: 0x6c561820, 0x26c23: 0x6c915020, + 0x26c25: 0x6cf9b820, 0x26c26: 0x6d177420, + 0x26c2e: 0x6c561e20, 0x26c2f: 0x6c569020, + 0x26c30: 0x6d3f0a20, + 0x26c37: 0x6c458c20, + 0x26c38: 0x6ce99220, 0x26c39: 0x6cf36a20, 0x26c3a: 0x6c8d2020, 0x26c3b: 0x6c472020, + 0x26c3c: 0x6d37be20, + // Block 0x9b1, offset 0x26c40 + 0x26c44: 0x6c915820, + 0x26c48: 0x6d412e20, + 0x26c4c: 0x6ce76a20, 0x26c4d: 0x6cf97020, 0x26c4e: 0x6c515c20, + 0x26c53: 0x6d26e220, + 0x26c59: 0x6ca40c20, 0x26c5a: 0x6c0f4820, 0x26c5b: 0x6c54fa20, + 0x26c5c: 0x6cb7e220, 0x26c5d: 0x6cd53a20, 0x26c5e: 0x6cbadc20, 0x26c5f: 0x6d38ae20, + 0x26c60: 0x6d122620, 0x26c61: 0x6c473420, + 0x26c65: 0x6c049e20, 0x26c66: 0x6c76ec20, + 0x26c6e: 0x6c517620, 0x26c6f: 0x6c628420, + 0x26c70: 0x6c55be20, 0x26c71: 0x6d0cde20, + 0x26c76: 0x6c212020, 0x26c77: 0x6c2f8620, + 0x26c78: 0x6cbfce20, 0x26c79: 0x6c543620, + 0x26c7c: 0x6c507420, 0x26c7f: 0x6d413220, + // Block 0x9b2, offset 0x26c80 + 0x26c81: 0x6cfbb820, + 0x26c84: 0x6cfa5220, 0x26c85: 0x6cf91820, + 0x26c88: 0x6ccb8420, + 0x26c8c: 0x6c445a20, 0x26c8d: 0x6cf92220, + 0x26c91: 0x6c445e20, + 0x26c94: 0x6c93c620, 0x26c96: 0x6c446020, 0x26c97: 0x6c78ea20, + 0x26c99: 0x6cd48a20, 0x26c9a: 0x6d3b5020, + 0x26c9c: 0x6ce2de20, 0x26c9d: 0x6d0b7820, 0x26c9e: 0x6ca67c20, + 0x26ca6: 0x6c95e220, 0x26ca7: 0x6cdbae20, + 0x26caa: 0x6c159e20, + 0x26cad: 0x6cf4cc20, 0x26caf: 0x6d208220, + 0x26cb9: 0x6d2a4420, 0x26cbb: 0x6d174420, + 0x26cbc: 0x6cf5d220, 0x26cbd: 0x6c533620, 0x26cbe: 0x6cc2ce20, 0x26cbf: 0x6cee0c20, + // Block 0x9b3, offset 0x26cc0 + 0x26cc0: 0x6c1b9820, 0x26cc1: 0x6cf87420, 0x26cc2: 0x6ce4e020, 0x26cc3: 0x6d27e420, + 0x26cc5: 0x6d13e220, 0x26cc6: 0x6c600620, 0x26cc7: 0x6c5aaa20, + 0x26cc8: 0x6c3d1620, 0x26cca: 0x6c3f5420, + 0x26ccd: 0x6c600820, 0x26cce: 0x6d080a20, + 0x26cd1: 0x6cdf6c20, 0x26cd3: 0x6c324e20, + 0x26cd7: 0x6d255620, + 0x26cdb: 0x6c2c3220, + 0x26cde: 0x6d3a6620, 0x26cdf: 0x6cdf0620, + 0x26ce1: 0x6cc70c20, 0x26ce2: 0x6d090a20, 0x26ce3: 0x6d232020, + 0x26ce4: 0x6c394e20, 0x26ce5: 0x6c06ca20, 0x26ce7: 0x6cc24420, + 0x26ce9: 0x6c109620, 0x26cea: 0x6c635420, 0x26ceb: 0x6d2c2c20, + 0x26ced: 0x6caa5a20, 0x26cee: 0x6ccf1420, + 0x26cf2: 0x6c860220, + // Block 0x9b4, offset 0x26d00 + 0x26d04: 0x6c4af620, 0x26d05: 0x6c48de20, 0x26d07: 0x6c276420, + 0x26d0f: 0x6c40fa20, + 0x26d12: 0x6c22cc20, + 0x26d14: 0x6d0d9220, 0x26d15: 0x6cd92220, 0x26d16: 0x6cd38820, + 0x26d18: 0x6c7a9c20, 0x26d19: 0x6d352e20, 0x26d1a: 0x6ce75020, 0x26d1b: 0x6cc19620, + 0x26d1c: 0x6c364220, 0x26d1e: 0x6d03ea20, 0x26d1f: 0x6cc7b020, + 0x26d20: 0x6d213820, 0x26d23: 0x6d17c020, + 0x26d24: 0x6d17c220, 0x26d25: 0x6d06e420, 0x26d26: 0x6c3d2c20, 0x26d27: 0x6c43f820, + 0x26d2c: 0x6c512a20, 0x26d2d: 0x6d19e820, 0x26d2f: 0x6c53be20, + 0x26d31: 0x6c349820, + 0x26d3d: 0x6d03ec20, 0x26d3e: 0x6c38a220, + // Block 0x9b5, offset 0x26d40 + 0x26d49: 0x6cb50020, 0x26d4a: 0x6ccc0220, + 0x26d4c: 0x6c326a20, 0x26d4d: 0x6c2c7220, 0x26d4e: 0x6c83fa20, 0x26d4f: 0x6d180620, + 0x26d50: 0x6cf78c20, 0x26d51: 0x6c451420, 0x26d52: 0x6ce75820, 0x26d53: 0x6c77c020, + 0x26d54: 0x6c53c420, 0x26d55: 0x6c7db820, 0x26d56: 0x6ca84c20, 0x26d57: 0x6c1b3c20, + 0x26d58: 0x6ce34e20, 0x26d5a: 0x6ce75a20, + 0x26d60: 0x6c83fc20, 0x26d61: 0x6ca35c20, + 0x26d71: 0x6d2d8220, 0x26d72: 0x6c06cc20, + // Block 0x9b6, offset 0x26d80 + 0x26d81: 0x6ce59220, 0x26d83: 0x6d289420, + 0x26d84: 0x6c367420, 0x26d85: 0x6cd47620, 0x26d86: 0x6c798820, 0x26d87: 0x6caeb820, + 0x26d88: 0x6c402020, 0x26d89: 0x6c929820, 0x26d8a: 0x6d01e820, 0x26d8b: 0x6d01ea20, + 0x26d8c: 0x6d04e820, 0x26d8d: 0x6c929a20, 0x26d8e: 0x6ce50a20, 0x26d8f: 0x6cde8820, + 0x26d90: 0x6c22da20, 0x26d91: 0x6cc12a20, 0x26d93: 0x6c402220, + 0x26d94: 0x6d340620, 0x26d96: 0x6d01ec20, 0x26d97: 0x6d408220, + 0x26d98: 0x6c3abe20, 0x26d99: 0x6c9f7420, 0x26d9a: 0x6d038c20, + 0x26d9d: 0x6ce76c20, 0x26d9e: 0x6cb60220, + 0x26da0: 0x6cb15c20, 0x26da2: 0x6cdc5620, 0x26da3: 0x6c37a020, + 0x26da7: 0x6c562c20, + 0x26dbb: 0x6cd92e20, + 0x26dbd: 0x6c0cb020, 0x26dbe: 0x6c2f6620, 0x26dbf: 0x6c04d220, + // Block 0x9b7, offset 0x26dc0 + 0x26dc0: 0x6cd1e220, 0x26dc1: 0x6d01ee20, 0x26dc2: 0x6cff9420, 0x26dc3: 0x6c3a6620, + 0x26dd2: 0x6c202620, 0x26dd3: 0x6cd67020, + 0x26dd4: 0x6d10b220, 0x26dd5: 0x6c74a220, 0x26dd6: 0x6cd14820, + 0x26dd8: 0x6d1eb220, 0x26dd9: 0x6c396c20, + 0x26ddc: 0x6c7c9a20, 0x26ddd: 0x6c2c9820, 0x26ddf: 0x6c990220, + 0x26de0: 0x6c6b2420, 0x26de2: 0x6d0cc820, + 0x26de5: 0x6ceeb420, + 0x26de8: 0x6cca7220, 0x26de9: 0x6c6b2620, 0x26dea: 0x6d219220, 0x26deb: 0x6cf0c820, + 0x26dec: 0x6c369220, 0x26ded: 0x6cc31220, 0x26dee: 0x6c6f2e20, 0x26def: 0x6c3cba20, + 0x26df0: 0x6c8fa620, 0x26df1: 0x6c2ee220, 0x26df2: 0x6cb12420, + 0x26df4: 0x6c891420, 0x26df5: 0x6c559820, 0x26df6: 0x6c93fa20, + 0x26dff: 0x6c2d7a20, + // Block 0x9b8, offset 0x26e00 + 0x26e03: 0x6c255e20, + 0x26e04: 0x6ca1e420, + 0x26e15: 0x6cedea20, 0x26e16: 0x6c72fe20, 0x26e17: 0x6c782e20, + 0x26e18: 0x6d0cca20, 0x26e19: 0x6c693420, + 0x26e21: 0x6c45b020, 0x26e23: 0x6cc6b620, + 0x26e24: 0x6cdce220, 0x26e25: 0x6ccdb620, + 0x26e28: 0x6c1b5420, 0x26e2a: 0x6cb65220, 0x26e2b: 0x6cdd9820, + 0x26e2d: 0x6d134420, 0x26e2e: 0x6d2a5420, 0x26e2f: 0x6cc39620, + 0x26e30: 0x6d2e1820, 0x26e31: 0x6c035a20, 0x26e32: 0x6d40d620, 0x26e33: 0x6cdd9a20, + 0x26e34: 0x6d309220, 0x26e35: 0x6cf8e820, 0x26e37: 0x6c1eec20, + 0x26e38: 0x6c694820, 0x26e39: 0x6d41d220, 0x26e3a: 0x6c43aa20, 0x26e3b: 0x6cf52420, + 0x26e3e: 0x6c94c020, 0x26e3f: 0x6c60b420, + // Block 0x9b9, offset 0x26e40 + 0x26e42: 0x6d00ec20, 0x26e43: 0x6d00ee20, + 0x26e46: 0x6c30f620, + 0x26e4b: 0x6cbfc620, + 0x26e51: 0x6cb2d020, 0x26e53: 0x6c8ea420, + 0x26e65: 0x6c6b3820, 0x26e67: 0x6c5c4020, + 0x26e6b: 0x6ccc7a20, + 0x26e78: 0x6d34a620, 0x26e79: 0x6c00e620, 0x26e7a: 0x6d074a20, 0x26e7b: 0x6c0a7820, + 0x26e7d: 0x6d126820, 0x26e7e: 0x6ca6d820, 0x26e7f: 0x6d3a2e20, + // Block 0x9ba, offset 0x26e80 + 0x26e81: 0x6cdb4220, 0x26e83: 0x6d010220, + 0x26e84: 0x6d241820, 0x26e85: 0x6cc14820, + 0x26e88: 0x6d40e020, 0x26e89: 0x6d341820, 0x26e8a: 0x6d2ee420, 0x26e8b: 0x6c94c420, + 0x26e8c: 0x6cf03020, 0x26e8d: 0x6c1ce820, 0x26e8e: 0x6c9d9620, + 0x26e90: 0x6c5f5e20, 0x26e92: 0x6cdb4420, 0x26e93: 0x6d12b620, + 0x26e94: 0x6cf7ac20, 0x26e95: 0x6ce96420, 0x26e96: 0x6c886c20, 0x26e97: 0x6d082e20, + 0x26e99: 0x6cf52c20, + 0x26e9f: 0x6c990c20, + 0x26eac: 0x6c538e20, 0x26eaf: 0x6c94c620, + 0x26eb0: 0x6c31ce20, 0x26eb1: 0x6c23ba20, 0x26eb2: 0x6c152e20, 0x26eb3: 0x6c92fc20, + 0x26eb4: 0x6cdb4620, + // Block 0x9bb, offset 0x26ec0 + 0x26ec0: 0x6c94c820, + 0x26ec6: 0x6d37d220, 0x26ec7: 0x6c847420, + 0x26ec8: 0x6c3ae220, 0x26eca: 0x6c6e3820, 0x26ecb: 0x6c7d2c20, + 0x26ecc: 0x6d18f420, 0x26ecd: 0x6c576620, 0x26ece: 0x6c258020, + 0x26ed0: 0x6d243c20, 0x26ed1: 0x6c083620, 0x26ed2: 0x6cea3020, 0x26ed3: 0x6cd58020, + 0x26ed4: 0x6c27a220, 0x26ed5: 0x6cf38a20, 0x26ed6: 0x6c22ea20, 0x26ed7: 0x6ca95e20, + 0x26ed8: 0x6c29a020, 0x26ed9: 0x6d40ee20, 0x26eda: 0x6c4e4220, + 0x26edc: 0x6cb02e20, 0x26edd: 0x6c204620, + 0x26ee0: 0x6c328620, 0x26ee1: 0x6cabe020, + 0x26ee4: 0x6d39d620, 0x26ee6: 0x6d011620, 0x26ee7: 0x6d30ac20, + 0x26ee8: 0x6cbcf420, 0x26ee9: 0x6d07dc20, 0x26eeb: 0x6ccb0820, + // Block 0x9bc, offset 0x26f00 + 0x26f00: 0x6c0a9620, 0x26f02: 0x6c407c20, + 0x26f08: 0x6c86d820, + 0x26f0e: 0x6c359620, + 0x26f10: 0x6d126e20, 0x26f11: 0x6cd58420, 0x26f13: 0x6ccb8620, + 0x26f15: 0x6cb54a20, 0x26f16: 0x6c4cf220, 0x26f17: 0x6ccb8820, + 0x26f19: 0x6c408620, 0x26f1a: 0x6c990e20, + 0x26f1c: 0x6c827620, 0x26f1d: 0x6d2db420, + 0x26f28: 0x6c14a620, + 0x26f2d: 0x6cf0fc20, + 0x26f3d: 0x6c827820, 0x26f3f: 0x6d2b6c20, + // Block 0x9bd, offset 0x26f40 + 0x26f40: 0x6d1c0e20, 0x26f41: 0x6c010220, 0x26f42: 0x6d005c20, + 0x26f44: 0x6c0aaa20, + 0x26f4b: 0x6c155a20, + 0x26f4e: 0x6cb03620, 0x26f4f: 0x6c23c220, + 0x26f50: 0x6c8b6620, 0x26f51: 0x6cb69c20, 0x26f53: 0x6c62d420, + 0x26f54: 0x6c6df220, 0x26f55: 0x6c302820, 0x26f56: 0x6c3a4620, 0x26f57: 0x6d159220, + 0x26f58: 0x6ce97220, + 0x26f68: 0x6c9bf620, 0x26f69: 0x6c11be20, 0x26f6a: 0x6d0b3c20, + 0x26f72: 0x6d103c20, + 0x26f74: 0x6ce6a220, + 0x26f78: 0x6d34be20, 0x26f7a: 0x6d027c20, 0x26f7b: 0x6c942220, + 0x26f7d: 0x6c875420, 0x26f7f: 0x6c991620, + // Block 0x9be, offset 0x26f80 + 0x26f82: 0x6cfa1820, + 0x26f85: 0x6cda4420, + 0x26f96: 0x6cda6c20, 0x26f97: 0x6d097e20, + 0x26f9d: 0x6c877a20, 0x26f9e: 0x6d25d820, + 0x26fa1: 0x6d2e4020, 0x26fa3: 0x6cdef220, + 0x26fa4: 0x6d083a20, 0x26fa5: 0x6cf12020, 0x26fa6: 0x6d139620, 0x26fa7: 0x6cad1a20, + 0x26fa8: 0x6c991820, 0x26fa9: 0x6ce3b620, 0x26faa: 0x6cb22a20, + 0x26fac: 0x6c328e20, 0x26fad: 0x6cc0a820, 0x26fae: 0x6d162c20, + 0x26fb3: 0x6ceb6020, + 0x26fb4: 0x6c14aa20, 0x26fb7: 0x6c6d7620, + 0x26fbc: 0x6c35aa20, + // Block 0x9bf, offset 0x26fc0 + 0x26fc3: 0x6c157420, + 0x26fc4: 0x6d1c4420, 0x26fc5: 0x6c8dae20, 0x26fc7: 0x6cfc5e20, + 0x26fc9: 0x6cb55a20, 0x26fcb: 0x6d272220, + 0x26fcc: 0x6c94ce20, 0x26fcd: 0x6d1cda20, 0x26fce: 0x6cc21a20, + 0x26fd2: 0x6c3a7820, 0x26fd3: 0x6d3eca20, + 0x26fd9: 0x6cbe6220, + 0x26fdd: 0x6ca94020, 0x26fde: 0x6cf13220, 0x26fdf: 0x6cd6c220, + 0x26fe1: 0x6c40a420, + 0x26fe4: 0x6ca1aa20, 0x26fe5: 0x6ca1ac20, 0x26fe6: 0x6ceb6820, 0x26fe7: 0x6c14ae20, + 0x26fe8: 0x6d2a1220, + 0x26fee: 0x6c84da20, 0x26fef: 0x6c84e420, + 0x26ff1: 0x6cfa2020, 0x26ff2: 0x6c733420, + 0x26ff4: 0x6ca41a20, 0x26ff5: 0x6c9db420, + 0x26ff8: 0x6c5a3e20, 0x26ffa: 0x6cd6f620, + 0x26ffc: 0x6d066420, 0x26fff: 0x6c3a7a20, + // Block 0x9c0, offset 0x27000 + 0x27001: 0x6d029420, + 0x27006: 0x6cdefa20, 0x27007: 0x6d1e6a20, + 0x27009: 0x6d2e4420, + 0x27011: 0x6cbb3420, 0x27012: 0x6ca46a20, + 0x27014: 0x6c8c9420, + 0x27018: 0x6c948220, 0x27019: 0x6cfc6e20, 0x2701a: 0x6c3f2c20, + 0x2701c: 0x6c8df820, + 0x27020: 0x6ccadc20, 0x27022: 0x6c5ca620, + 0x27028: 0x6ce66020, 0x2702a: 0x6cbe7020, + 0x2702c: 0x6c598a20, 0x2702e: 0x6c01b220, + 0x27035: 0x6c97c220, 0x27037: 0x6ca6b220, + 0x2703b: 0x6c4c8020, + 0x2703c: 0x6cab8820, 0x2703f: 0x6cfe4620, + // Block 0x9c1, offset 0x27040 + 0x27041: 0x6c6c5620, + 0x27046: 0x6d32f620, + 0x27048: 0x6ca2cc20, 0x2704b: 0x6cca5e20, + 0x2704c: 0x6c56d020, 0x2704e: 0x6d40f020, 0x2704f: 0x6c5b7620, + 0x27052: 0x6c5f7420, + 0x27056: 0x6d138a20, + 0x27066: 0x6d03de20, + 0x27069: 0x6c7e6c20, 0x2706a: 0x6d232220, 0x2706b: 0x6c745820, + 0x27071: 0x6cd5da20, 0x27072: 0x6d32d620, + 0x27074: 0x6d1e4e20, 0x27076: 0x6c439c20, + 0x27078: 0x6c66ae20, 0x27079: 0x6d034820, + 0x2707c: 0x6c5aec20, 0x2707f: 0x6cd67820, + // Block 0x9c2, offset 0x27080 + 0x27082: 0x6c1cf020, 0x27083: 0x6c4f8a20, + 0x27088: 0x6c8a6420, + 0x2708d: 0x6c674a20, 0x2708f: 0x6c456c20, + 0x27091: 0x6d3d3020, + 0x27097: 0x6cb6de20, + 0x2709c: 0x6cb8b820, 0x2709e: 0x6c30e220, 0x2709f: 0x6cb30220, + 0x270a2: 0x6c567a20, + 0x270a5: 0x6ca98c20, 0x270a7: 0x6cb76420, + 0x270a8: 0x6c2db420, 0x270a9: 0x6c2db620, 0x270ab: 0x6c85b220, + 0x270ae: 0x6d046220, + 0x270bd: 0x6ca2da20, 0x270bf: 0x6d32a620, + // Block 0x9c3, offset 0x270c0 + 0x270c0: 0x6c7e6e20, 0x270c1: 0x6d35cc20, 0x270c3: 0x6c35b220, + 0x270c4: 0x6c0e6620, 0x270c5: 0x6cb30620, 0x270c6: 0x6d058420, 0x270c7: 0x6d1e7a20, + 0x270c8: 0x6c223c20, 0x270c9: 0x6c85e220, + 0x270cc: 0x6cad5820, 0x270cf: 0x6d053a20, + 0x270db: 0x6cb4a820, + 0x270dd: 0x6c17e420, 0x270de: 0x6cb78420, + 0x270e1: 0x6d177620, 0x270e3: 0x6ce31c20, + 0x270e4: 0x6c348820, 0x270e5: 0x6c8f9020, 0x270e7: 0x6c668020, + 0x270ed: 0x6d2e6020, 0x270ee: 0x6d261220, + 0x270f6: 0x6d210820, + 0x270f8: 0x6c44ca20, 0x270fa: 0x6c546c20, + 0x270fe: 0x6cb6f820, + // Block 0x9c4, offset 0x27100 + 0x27100: 0x6ca28c20, 0x27101: 0x6c592a20, 0x27102: 0x6c906a20, 0x27103: 0x6cf89420, + 0x27104: 0x6c356c20, 0x27105: 0x6c80fe20, 0x27106: 0x6c3aae20, 0x27107: 0x6ced2820, + 0x27109: 0x6c259620, 0x2710b: 0x6caea420, + 0x2710f: 0x6c262c20, + 0x27110: 0x6cf22420, + 0x27121: 0x6c430620, + 0x27125: 0x6c254820, + 0x27128: 0x6cb7a620, 0x27129: 0x6c83fe20, 0x2712a: 0x6cbcc820, 0x2712b: 0x6cba6020, + 0x2712c: 0x6c798220, 0x2712d: 0x6c082220, 0x2712f: 0x6cd46c20, + 0x27137: 0x6ceea220, + // Block 0x9c5, offset 0x27140 + 0x27144: 0x6cccf220, + 0x2714f: 0x6d3e6e20, + 0x27152: 0x6ce40c20, 0x27153: 0x6cb90e20, + 0x27154: 0x6c31ac20, 0x27157: 0x6ce8dc20, + 0x2715a: 0x6ceeaa20, + 0x2715e: 0x6c558420, 0x2715f: 0x6d038e20, + 0x27161: 0x6ccd0220, 0x27162: 0x6d354a20, + 0x27167: 0x6c1bb820, + 0x27178: 0x6d394a20, 0x27179: 0x6cf23620, 0x2717a: 0x6c1b4c20, 0x2717b: 0x6cdd9420, + 0x2717c: 0x6d020220, 0x2717e: 0x6c78d220, + // Block 0x9c6, offset 0x27180 + 0x27181: 0x6ccca220, 0x27182: 0x6cd1f220, 0x27183: 0x6cd47820, + 0x27185: 0x6c6bfc20, + 0x27189: 0x6c431c20, 0x2718a: 0x6c93b220, + 0x27194: 0x6d020420, + 0x2719a: 0x6d354c20, + 0x2719e: 0x6c978220, + 0x271a0: 0x6cd67420, 0x271a1: 0x6c78da20, 0x271a3: 0x6c2dfe20, + 0x271a4: 0x6d141a20, 0x271a6: 0x6cdb2420, 0x271a7: 0x6c206420, + 0x271b1: 0x6c256820, 0x271b2: 0x6cebb220, + 0x271b5: 0x6d022020, + 0x271bd: 0x6d082620, + // Block 0x9c7, offset 0x271c0 + 0x271c2: 0x6c51f420, 0x271c3: 0x6c74ce20, + 0x271c6: 0x6ce43020, 0x271c7: 0x6c3ada20, + 0x271c9: 0x6d355620, 0x271ca: 0x6cd3e820, 0x271cb: 0x6ce9c620, + 0x271ce: 0x6c1cea20, + 0x271d0: 0x6ce43220, 0x271d1: 0x6d2e8820, 0x271d2: 0x6c527820, + 0x271d4: 0x6cc1de20, 0x271d5: 0x6cef4220, 0x271d7: 0x6c33ba20, + 0x271d8: 0x6c067220, + 0x271dc: 0x6c8a2c20, + 0x271e4: 0x6cd83620, + 0x271ea: 0x6c0c8420, 0x271eb: 0x6d023420, + 0x271ec: 0x6c0cfc20, 0x271ee: 0x6c23d820, + 0x271f2: 0x6c72ac20, 0x271f3: 0x6c518820, + 0x271f7: 0x6c7d3020, + 0x271f8: 0x6d1dc820, + // Block 0x9c8, offset 0x27200 + 0x27200: 0x6cd62220, + 0x2720d: 0x6ca89a20, 0x2720f: 0x6d21da20, + 0x27210: 0x6d3dca20, 0x27211: 0x6c9b8c20, 0x27212: 0x6c55f220, + 0x27215: 0x6c8b6220, + 0x2721d: 0x6c6a4020, 0x2721e: 0x6d048220, + 0x27223: 0x6d0e0020, + 0x27229: 0x6c6b7a20, 0x2722a: 0x6c7eb820, 0x2722b: 0x6cd62e20, + 0x2722c: 0x6c6b7c20, 0x2722d: 0x6c828220, + 0x27230: 0x6d40fc20, 0x27232: 0x6cd40420, + 0x27238: 0x6cef6c20, 0x27239: 0x6c318620, 0x2723a: 0x6cdb6420, + // Block 0x9c9, offset 0x27240 + 0x27243: 0x6d012e20, + 0x27244: 0x6cc4f620, + 0x2724c: 0x6c964e20, + 0x27251: 0x6cb96420, + 0x27258: 0x6ca48620, 0x27259: 0x6c8dec20, + 0x2725c: 0x6c630620, + 0x27260: 0x6ca03e20, 0x27263: 0x6c476220, + 0x27268: 0x6d080c20, + 0x2726c: 0x6d058e20, + 0x27271: 0x6c0f3620, + 0x2727c: 0x6ceebc20, + // Block 0x9ca, offset 0x27280 + 0x27282: 0x6c7a6e20, + 0x27286: 0x6cecf020, + 0x27288: 0x6c143c20, 0x2728a: 0x6c996820, 0x2728b: 0x6c789a20, + 0x2728e: 0x6c22c420, + 0x27292: 0x6cfcbc20, 0x27293: 0x6ca11620, + 0x2729a: 0x6c5cc420, 0x2729b: 0x6c162c20, + 0x2729c: 0x6cd1c620, 0x2729d: 0x6d31dc20, 0x2729e: 0x6c364420, 0x2729f: 0x6c9c5a20, + 0x272a1: 0x6cd1c820, 0x272a2: 0x6cc11420, 0x272a3: 0x6cd4e420, + 0x272a5: 0x6c220420, 0x272a6: 0x6d0d9420, + 0x272a9: 0x6c54dc20, 0x272aa: 0x6cb50220, 0x272ab: 0x6d366c20, + 0x272ac: 0x6c599c20, + 0x272b4: 0x6d353820, 0x272b6: 0x6d1fda20, + 0x272bc: 0x6c435420, 0x272bd: 0x6d11c420, 0x272be: 0x6cb3cc20, + // Block 0x9cb, offset 0x272c0 + 0x272c7: 0x6d153620, + 0x272c8: 0x6c1a8420, 0x272c9: 0x6c625020, 0x272cb: 0x6c007420, + 0x272cd: 0x6c308620, 0x272cf: 0x6cdc6220, + 0x272d1: 0x6c701c20, + 0x272d8: 0x6cb7c820, 0x272d9: 0x6c884420, 0x272da: 0x6d085620, + 0x272dc: 0x6c8a7620, + 0x272e1: 0x6d285820, 0x272e2: 0x6d085a20, 0x272e3: 0x6c23e620, + 0x272e4: 0x6cb10020, 0x272e6: 0x6c7c9c20, + 0x272e8: 0x6ce37a20, 0x272e9: 0x6c58e020, 0x272ea: 0x6c280020, 0x272eb: 0x6c4b7820, + 0x272ec: 0x6c188a20, 0x272ee: 0x6cce3c20, 0x272ef: 0x6c628620, + 0x272f4: 0x6c891c20, 0x272f5: 0x6c76b620, 0x272f6: 0x6cd17820, + 0x272f8: 0x6c30cc20, 0x272f9: 0x6d1f8020, 0x272fa: 0x6cb66220, + 0x272fc: 0x6cffc620, + // Block 0x9cc, offset 0x27300 + 0x27302: 0x6d18f620, 0x27303: 0x6c90c420, + 0x27306: 0x6c206a20, + 0x2730b: 0x6c81e620, + 0x2730c: 0x6c42ec20, + 0x27310: 0x6d2ba220, 0x27312: 0x6cef6420, + 0x27316: 0x6c653620, + 0x2731b: 0x6d1c3220, + 0x2731c: 0x6c38f420, 0x2731d: 0x6c877c20, 0x2731e: 0x6cb94e20, + 0x27322: 0x6d125420, + 0x27326: 0x6c7c5a20, 0x27327: 0x6cef7a20, + 0x27329: 0x6cc42620, + 0x2732c: 0x6cffca20, 0x2732d: 0x6cc42820, + 0x27330: 0x6c551820, + 0x27335: 0x6c342020, 0x27336: 0x6c1f1e20, + 0x27339: 0x6ccfd620, + 0x2733c: 0x6d3d5620, 0x2733d: 0x6c355e20, 0x2733e: 0x6c61f820, + // Block 0x9cd, offset 0x27340 + 0x27341: 0x6cdfde20, 0x27343: 0x6cabc420, + 0x2734b: 0x6c6be220, + 0x2734c: 0x6cbc4220, + 0x27351: 0x6cb99620, 0x27352: 0x6c724c20, + 0x27355: 0x6cc06e20, 0x27356: 0x6ceb2220, + 0x2735a: 0x6caafa20, 0x2735b: 0x6cd8c620, + 0x2735f: 0x6d14fe20, + 0x27361: 0x6c47a220, 0x27362: 0x6c5d3220, 0x27363: 0x6cabda20, + 0x27364: 0x6d3e5a20, 0x27366: 0x6c685220, + 0x27369: 0x6cf80420, 0x2736a: 0x6cceb820, + 0x2736c: 0x6d153820, 0x2736d: 0x6d369e20, + 0x27375: 0x6c952420, 0x27377: 0x6d38a020, + 0x27378: 0x6c74a420, 0x27379: 0x6ce00620, 0x2737a: 0x6cab0c20, 0x2737b: 0x6c728020, + 0x2737c: 0x6c559c20, 0x2737e: 0x6d36c220, + // Block 0x9ce, offset 0x27380 + 0x27383: 0x6c088820, + 0x2738d: 0x6c1c7220, 0x2738e: 0x6d07d020, 0x2738f: 0x6c60b620, + 0x27390: 0x6c48a020, 0x27391: 0x6c715e20, 0x27392: 0x6cf31620, 0x27393: 0x6ceb4a20, + 0x27395: 0x6cc09820, 0x27396: 0x6ceebe20, 0x27397: 0x6c32a220, + 0x27399: 0x6cd47c20, 0x2739b: 0x6d31fe20, + 0x2739c: 0x6ca55420, 0x2739f: 0x6cf8f620, + 0x273a0: 0x6d30a420, 0x273a1: 0x6d371620, 0x273a3: 0x6ca2ea20, + 0x273a8: 0x6c650620, + 0x273ae: 0x6d114e20, 0x273af: 0x6c4c9820, + 0x273b2: 0x6c2c0820, + 0x273b4: 0x6c5e1c20, 0x273b5: 0x6c6de220, + 0x273bc: 0x6c74ec20, 0x273bd: 0x6d270820, + // Block 0x9cf, offset 0x273c0 + 0x273c4: 0x6c60ee20, 0x273c6: 0x6cdb5c20, + 0x273c8: 0x6c654020, 0x273ca: 0x6c7d9820, 0x273cb: 0x6cf33220, + 0x273cc: 0x6c7c1e20, 0x273cd: 0x6c0c6020, 0x273ce: 0x6c751220, + 0x273d1: 0x6c0ad620, 0x273d3: 0x6c157a20, + 0x273d5: 0x6d3ecc20, 0x273d6: 0x6c87c220, + 0x273da: 0x6c3d0e20, 0x273db: 0x6cb9f020, + 0x273dc: 0x6d0d4020, 0x273de: 0x6ce08c20, 0x273df: 0x6ca0d820, + 0x273e3: 0x6c79e420, + 0x273e4: 0x6cf5d420, + 0x273ee: 0x6c569220, 0x273ef: 0x6c569420, + 0x273f1: 0x6c3e7020, + 0x273f4: 0x6d104c20, 0x273f5: 0x6c4cea20, 0x273f7: 0x6cc57020, + 0x273f8: 0x6d1b4c20, 0x273f9: 0x6c3c4420, 0x273fa: 0x6c75b620, + 0x273fc: 0x6d27a620, 0x273ff: 0x6d0a8820, + // Block 0x9d0, offset 0x27400 + 0x27401: 0x6cf87c20, + 0x2740e: 0x6cf96220, + 0x27411: 0x6c4f7620, + 0x2741a: 0x6c569620, + 0x2741d: 0x6c54d020, 0x2741e: 0x6cb4aa20, 0x2741f: 0x6c385020, + 0x27424: 0x6c636420, 0x27427: 0x6d150420, + 0x2742d: 0x6ceac820, 0x2742e: 0x6ca2e220, + 0x27438: 0x6d1a6a20, 0x27439: 0x6d1b5a20, + // Block 0x9d1, offset 0x27440 + 0x27443: 0x6c622a20, + 0x27444: 0x6cee5620, 0x27445: 0x6cd3a420, 0x27446: 0x6c330c20, 0x27447: 0x6c34fc20, + 0x27449: 0x6ceb3020, 0x2744a: 0x6cebe620, 0x2744b: 0x6c863e20, + 0x2744f: 0x6cc55220, + 0x27452: 0x6c22d020, 0x27453: 0x6d070220, + 0x27454: 0x6d389020, 0x27455: 0x6d3f5a20, + 0x2745c: 0x6cee2a20, 0x2745d: 0x6d0b5820, 0x2745f: 0x6c622c20, + 0x27460: 0x6c179e20, + 0x27469: 0x6c606020, + 0x27475: 0x6ccd5420, 0x27476: 0x6ce8de20, + 0x27478: 0x6c0cf620, 0x27479: 0x6cf8be20, 0x2747a: 0x6caf7e20, 0x2747b: 0x6d2cd420, + 0x2747e: 0x6c5c0620, + // Block 0x9d2, offset 0x27480 + 0x27480: 0x6cdd3020, 0x27482: 0x6c51da20, + 0x27484: 0x6d265220, 0x27486: 0x6cf37c20, + 0x27488: 0x6c8d4020, 0x2748a: 0x6d2cd620, 0x2748b: 0x6c574a20, + 0x27497: 0x6c151220, + 0x2749f: 0x6c367620, + 0x274a1: 0x6c18e020, + 0x274a7: 0x6cdc6620, + 0x274a9: 0x6ce51420, + 0x274b0: 0x6d36c420, 0x274b1: 0x6ce41620, 0x274b2: 0x6c022e20, 0x274b3: 0x6d3d9020, + 0x274b4: 0x6d3f6020, 0x274b5: 0x6c783020, 0x274b7: 0x6ccb4e20, + 0x274b8: 0x6ce4c220, 0x274b9: 0x6c92b620, + 0x274be: 0x6ccd2620, 0x274bf: 0x6d2c9020, + // Block 0x9d3, offset 0x274c0 + 0x274c3: 0x6c1cde20, + 0x274c5: 0x6d0ea620, + 0x274d2: 0x6ca25420, 0x274d3: 0x6c54fc20, + 0x274da: 0x6c1ad420, + 0x274dd: 0x6cdb0a20, + 0x274e3: 0x6ca51420, + 0x274e6: 0x6c60b820, 0x274e7: 0x6c346020, + 0x274e8: 0x6c547e20, 0x274ea: 0x6c23de20, 0x274eb: 0x6d2c0220, + 0x274ec: 0x6d1a9c20, 0x274ee: 0x6cffbe20, + 0x274f0: 0x6c0bbc20, 0x274f1: 0x6c085220, 0x274f2: 0x6c7e9a20, + 0x274f4: 0x6c1ad820, 0x274f6: 0x6cb87820, + 0x274f8: 0x6c015220, 0x274f9: 0x6cd1fe20, + 0x274fc: 0x6c1c7420, + // Block 0x9d4, offset 0x27500 + 0x27505: 0x6caa6a20, 0x27507: 0x6c628820, + 0x27513: 0x6cab9220, + 0x27515: 0x6cf97a20, + 0x27518: 0x6c14a020, 0x2751a: 0x6c005620, + 0x2751d: 0x6cd17c20, 0x2751e: 0x6c518220, + 0x27520: 0x6c60ca20, 0x27521: 0x6c1ade20, 0x27522: 0x6cf8fa20, 0x27523: 0x6d32fe20, + 0x27526: 0x6cde0020, + 0x27528: 0x6c96e220, 0x2752b: 0x6caf9a20, + 0x2752e: 0x6d05f220, 0x2752f: 0x6cba2a20, + 0x27539: 0x6cfa4e20, + // Block 0x9d5, offset 0x27540 + 0x2754a: 0x6d241a20, + 0x27551: 0x6c6b4620, 0x27552: 0x6cfa5420, 0x27553: 0x6c91ee20, + 0x27555: 0x6cbcf620, 0x27557: 0x6c145220, + 0x2755b: 0x6d107020, + 0x2755c: 0x6c62b020, 0x2755d: 0x6ccc3620, 0x2755e: 0x6c912020, + 0x27560: 0x6c5f7620, 0x27561: 0x6d373020, 0x27562: 0x6cee5c20, + 0x27564: 0x6c0a9820, 0x27565: 0x6c015820, 0x27566: 0x6d142a20, 0x27567: 0x6c015a20, + 0x2756c: 0x6c847620, + 0x27579: 0x6cfaec20, + 0x2757e: 0x6c703620, 0x2757f: 0x6ce08420, + // Block 0x9d6, offset 0x27580 + 0x27581: 0x6c507a20, 0x27582: 0x6c520620, + 0x27585: 0x6d2c0620, 0x27586: 0x6d2e2e20, 0x27587: 0x6d191a20, + 0x27588: 0x6cf91a20, 0x2758a: 0x6cf91c20, 0x2758b: 0x6c384420, + 0x2758c: 0x6d0cf620, 0x2758f: 0x6ca25620, + 0x27595: 0x6c474020, + 0x2759e: 0x6d27d020, + 0x275a4: 0x6d384820, 0x275a6: 0x6c160220, 0x275a7: 0x6c208620, + 0x275a8: 0x6c5c8a20, 0x275a9: 0x6d28d620, 0x275aa: 0x6c4c0820, 0x275ab: 0x6c661c20, + 0x275ac: 0x6d0b3e20, + 0x275b0: 0x6cfe6820, 0x275b1: 0x6c520820, + // Block 0x9d7, offset 0x275c0 + 0x275c3: 0x6c28e820, + 0x275c7: 0x6c9df020, + 0x275c8: 0x6ca93a20, 0x275ca: 0x6c9ba620, + 0x275cc: 0x6c8b6e20, 0x275cd: 0x6d396a20, 0x275ce: 0x6cb42220, 0x275cf: 0x6cdf0a20, + 0x275d3: 0x6d1cd020, + 0x275d4: 0x6ce2cc20, 0x275d5: 0x6c4ca220, + 0x275da: 0x6cbb3020, + 0x275dc: 0x6c942420, 0x275dd: 0x6cc9b820, 0x275de: 0x6c8b7020, 0x275df: 0x6c1b6c20, + 0x275e0: 0x6d015020, 0x275e3: 0x6c4ca820, + 0x275e4: 0x6c067e20, 0x275e5: 0x6c964220, 0x275e6: 0x6c73a420, + 0x275ea: 0x6c36e820, + 0x275f3: 0x6c51a820, + 0x275f5: 0x6c9aba20, + 0x275f8: 0x6d028820, 0x275f9: 0x6cb22c20, 0x275fb: 0x6c4dc420, + 0x275fc: 0x6c194420, 0x275fd: 0x6ccdec20, 0x275fe: 0x6c5ca020, + // Block 0x9d8, offset 0x27600 + 0x27606: 0x6d1c4820, + 0x27608: 0x6c663e20, + 0x2760d: 0x6c016620, + 0x27611: 0x6cdef420, 0x27612: 0x6d144220, 0x27613: 0x6ce9dc20, + 0x27617: 0x6c8ef220, + 0x27619: 0x6d425a20, 0x2761b: 0x6c84ec20, + 0x2761d: 0x6cb23420, 0x2761e: 0x6d098420, + 0x27620: 0x6ca5a220, 0x27621: 0x6c315820, + 0x27624: 0x6c806c20, + 0x2762a: 0x6d2d5e20, 0x2762b: 0x6c73e620, + 0x2762c: 0x6d314620, 0x2762d: 0x6c600c20, 0x2762e: 0x6cb8ce20, + 0x27630: 0x6c4da220, 0x27631: 0x6c3b7220, 0x27633: 0x6c4da420, + 0x27634: 0x6c535620, 0x27635: 0x6c514620, 0x27636: 0x6c541a20, + 0x2763a: 0x6d2e7820, 0x2763b: 0x6c1dd420, + 0x2763c: 0x6cdf7e20, 0x2763d: 0x6cba7820, 0x2763f: 0x6ccf7420, + // Block 0x9d9, offset 0x27640 + 0x27640: 0x6d1bee20, 0x27643: 0x6cbd4020, + 0x27646: 0x6c5e0e20, + 0x27648: 0x6cf8fc20, 0x27649: 0x6c51f820, 0x2764a: 0x6cf90820, 0x2764b: 0x6cf97e20, + 0x2764c: 0x6c4fb620, 0x2764d: 0x6c81e820, 0x2764f: 0x6c870c20, + 0x27652: 0x6c19a220, + 0x27656: 0x6c760620, 0x27657: 0x6cf76020, + 0x27658: 0x6c4e7620, + 0x2765e: 0x6c311620, + 0x27660: 0x6c30ae20, 0x27661: 0x6cec9220, + 0x27664: 0x6c30b020, 0x27665: 0x6d293820, 0x27666: 0x6c737a20, + 0x27668: 0x6c90e620, 0x27669: 0x6c1f6220, 0x2766b: 0x6d32ea20, + 0x2766f: 0x6cb64420, + 0x27670: 0x6c770e20, 0x27671: 0x6c5df420, 0x27672: 0x6c7f2420, + 0x2767a: 0x6c410620, + 0x2767c: 0x6cd48220, 0x2767e: 0x6c301a20, + // Block 0x9da, offset 0x27680 + 0x27683: 0x6c90c820, + 0x27684: 0x6ce93e20, 0x27687: 0x6d21ca20, + 0x27688: 0x6cf52e20, 0x2768a: 0x6ce4ce20, + 0x27692: 0x6c4c9e20, + 0x27698: 0x6ce04420, 0x27699: 0x6cb6ae20, + 0x276a0: 0x6c8b8020, 0x276a1: 0x6c87b420, 0x276a3: 0x6d09d020, + 0x276a8: 0x6c452820, 0x276a9: 0x6ce63820, 0x276aa: 0x6c4ea220, 0x276ab: 0x6c1f2a20, + 0x276ad: 0x6cea4c20, 0x276af: 0x6d047a20, + 0x276b0: 0x6d1f3020, 0x276b1: 0x6ca11820, 0x276b2: 0x6c1ba420, + 0x276b4: 0x6c562020, 0x276b5: 0x6c317020, 0x276b7: 0x6ca24420, + 0x276b9: 0x6ca34420, 0x276bb: 0x6c8d0c20, + 0x276bf: 0x6c00ae20, + // Block 0x9db, offset 0x276c0 + 0x276c0: 0x6cfab020, + 0x276c4: 0x6c76e020, 0x276c5: 0x6cd8cc20, 0x276c6: 0x6cca0420, + 0x276ca: 0x6d180e20, + 0x276cf: 0x6d183c20, + 0x276d0: 0x6d000020, 0x276d2: 0x6d340820, 0x276d3: 0x6c313020, + 0x276d8: 0x6c973e20, + 0x276dc: 0x6c950a20, 0x276dd: 0x6c74a820, + 0x276e1: 0x6cbad620, 0x276e2: 0x6c8d4a20, + 0x276e9: 0x6cb12c20, 0x276ea: 0x6c23fc20, 0x276eb: 0x6c351820, + 0x276ec: 0x6d229420, + 0x276f0: 0x6d3d0a20, 0x276f2: 0x6cf8fe20, 0x276f3: 0x6c581620, + 0x276f4: 0x6ca02020, 0x276f5: 0x6ce14420, + 0x276f9: 0x6cb41820, 0x276fb: 0x6c9da420, + 0x276fc: 0x6c979020, 0x276fe: 0x6c48d420, + // Block 0x9dc, offset 0x27700 + 0x27700: 0x6cb93620, 0x27702: 0x6c8bfa20, 0x27703: 0x6c9fd620, + 0x27704: 0x6cf04e20, 0x27705: 0x6c136820, 0x27707: 0x6c56e220, + 0x27708: 0x6cdc0420, 0x2770b: 0x6c72bc20, + 0x2770c: 0x6ccc8420, 0x2770d: 0x6c9ba820, + 0x27717: 0x6cef7620, + 0x27718: 0x6cf75a20, 0x27719: 0x6c8e2a20, + 0x2771c: 0x6c0ad820, 0x2771d: 0x6cf13820, + 0x27721: 0x6c85b420, 0x27722: 0x6d304420, + 0x27724: 0x6d1df220, 0x27725: 0x6c554e20, 0x27726: 0x6cecda20, 0x27727: 0x6c034c20, + 0x27728: 0x6c649220, + 0x2772d: 0x6d426a20, 0x2772e: 0x6d2df220, 0x2772f: 0x6c0e7a20, + 0x27730: 0x6cbfb220, 0x27731: 0x6d0f5a20, + 0x27734: 0x6c300620, 0x27735: 0x6cc19820, + 0x2773a: 0x6caff820, 0x2773b: 0x6d2d2c20, + 0x2773e: 0x6cccf420, 0x2773f: 0x6c46bc20, + // Block 0x9dd, offset 0x27740 + 0x27740: 0x6c0c9020, 0x27741: 0x6d152220, 0x27742: 0x6c3eaa20, + 0x27744: 0x6d034020, 0x27745: 0x6cd3a620, 0x27746: 0x6ce6fc20, + 0x27749: 0x6c2f6220, + 0x2774c: 0x6ce86e20, 0x2774d: 0x6cfef620, 0x2774e: 0x6cf3e020, 0x2774f: 0x6cade420, + 0x27750: 0x6c5ade20, + 0x27755: 0x6c7f2220, + 0x27759: 0x6cd8e220, 0x2775a: 0x6c250220, 0x2775b: 0x6ccc7220, + 0x2775c: 0x6d38f020, 0x2775d: 0x6d2fd820, 0x2775e: 0x6cef3220, 0x2775f: 0x6c7f2620, + 0x27760: 0x6c0a3a20, 0x27763: 0x6c303e20, + 0x27766: 0x6ca51620, 0x27767: 0x6d005420, + 0x27768: 0x6cc54020, 0x27769: 0x6ce98e20, 0x2776a: 0x6cf0d820, 0x2776b: 0x6d1f7020, + 0x2776c: 0x6c9a2820, 0x2776d: 0x6d25b220, 0x2776e: 0x6d384220, + 0x27776: 0x6cd9ea20, + 0x27778: 0x6c474820, 0x27779: 0x6ccee620, 0x2777b: 0x6d2f9220, + 0x2777c: 0x6cb02820, 0x2777f: 0x6ce70820, + // Block 0x9de, offset 0x27780 + 0x27781: 0x6c1ae220, 0x27782: 0x6caedc20, 0x27783: 0x6c153c20, + 0x27784: 0x6d1dca20, 0x27785: 0x6cd6ea20, 0x27787: 0x6cf48420, + 0x27789: 0x6cb03020, 0x2778a: 0x6c596020, + 0x2778c: 0x6c3f1e20, 0x2778e: 0x6c0c9620, + 0x27793: 0x6ca4d020, + 0x27795: 0x6c0c9820, 0x27796: 0x6cf11420, 0x27797: 0x6d1dd620, + 0x27799: 0x6ca52620, 0x2779a: 0x6c48fe20, + 0x277a0: 0x6c879220, 0x277a2: 0x6d035e20, 0x277a3: 0x6d0d2220, + 0x277a4: 0x6cb37420, 0x277a5: 0x6cadca20, + 0x277aa: 0x6cdd5c20, + 0x277ac: 0x6cc5e220, 0x277ad: 0x6ccd3a20, + 0x277b2: 0x6cdd5e20, + 0x277b8: 0x6c27d620, 0x277ba: 0x6c9af020, + // Block 0x9df, offset 0x277c0 + 0x277c3: 0x6cd44820, + 0x277c8: 0x6c46a620, 0x277ca: 0x6c4da620, 0x277cb: 0x6cd39020, + 0x277cc: 0x6d102020, 0x277ce: 0x6c479620, + 0x277db: 0x6c77fe20, + 0x277de: 0x6c709c20, + 0x277e0: 0x6cac2e20, 0x277e1: 0x6c12f820, 0x277e2: 0x6c05b220, 0x277e3: 0x6d047020, + 0x277e4: 0x6c111420, 0x277e7: 0x6c8c2420, + 0x277e8: 0x6c00b020, + 0x277ec: 0x6c9d6220, 0x277ed: 0x6c7f3e20, + 0x277f1: 0x6cfee020, 0x277f3: 0x6ccf1e20, + 0x277fb: 0x6c5d7c20, + 0x277fc: 0x6ca6b420, + // Block 0x9e0, offset 0x27800 + 0x27804: 0x6d335620, 0x27806: 0x6c8c5c20, 0x27807: 0x6d2c4420, + 0x2780a: 0x6d27be20, + 0x2780d: 0x6d071c20, + 0x27814: 0x6c1a2a20, 0x27815: 0x6cf2c020, 0x27816: 0x6cf68620, + 0x27819: 0x6c074820, + 0x2781c: 0x6cce1c20, + 0x27820: 0x6d23d020, 0x27821: 0x6c9d8020, + 0x27832: 0x6c32b020, + 0x27835: 0x6c144a20, 0x27837: 0x6d2b0820, + 0x27838: 0x6c1a8820, 0x2783a: 0x6ce69220, + // Block 0x9e1, offset 0x27840 + 0x27845: 0x6d157020, + 0x2784b: 0x6d10ba20, + 0x2784e: 0x6c7a6620, + 0x27850: 0x6c3b9c20, 0x27851: 0x6d010420, 0x27852: 0x6c1a8a20, + 0x2785b: 0x6c7d2420, + 0x2785f: 0x6c0d6220, + 0x27861: 0x6c90cc20, + 0x27865: 0x6d18fa20, 0x27866: 0x6c9da620, 0x27867: 0x6d024620, + 0x27871: 0x6c4a9c20, 0x27873: 0x6c955e20, + 0x27876: 0x6ccdce20, + 0x2787e: 0x6c717a20, 0x2787f: 0x6c318420, + // Block 0x9e2, offset 0x27880 + 0x27882: 0x6cfaf220, + 0x27885: 0x6d356020, + 0x27888: 0x6c0d9020, + 0x27895: 0x6d356220, 0x27896: 0x6d3bfa20, 0x27897: 0x6d092a20, + 0x27898: 0x6c893020, 0x27899: 0x6cdcb220, + 0x278a6: 0x6c808c20, 0x278a7: 0x6c72cc20, + 0x278a8: 0x6c9df220, 0x278a9: 0x6d0ab420, 0x278aa: 0x6d2ea020, 0x278ab: 0x6c4c0c20, + 0x278b2: 0x6d376820, + 0x278bd: 0x6cf12c20, 0x278be: 0x6cc36a20, 0x278bf: 0x6c14ac20, + // Block 0x9e3, offset 0x278c0 + 0x278c8: 0x6cc63020, 0x278ca: 0x6d272820, + 0x278cc: 0x6d3ece20, + 0x278d0: 0x6c965420, 0x278d1: 0x6c4b3620, 0x278d3: 0x6c19f420, + 0x278d5: 0x6c709e20, 0x278d6: 0x6ce4fe20, 0x278d7: 0x6ced9820, + 0x278db: 0x6d33d820, + 0x278de: 0x6ca42c20, + 0x278e3: 0x6c4db420, + 0x278e8: 0x6cf6b020, 0x278e9: 0x6c8bd420, + 0x278ec: 0x6d0c2e20, 0x278ed: 0x6d074220, + 0x278f2: 0x6c56d220, 0x278f3: 0x6c423620, + 0x278f4: 0x6d074c20, 0x278f6: 0x6cf90a20, + 0x278fa: 0x6c258420, + 0x278fd: 0x6cf92a20, 0x278fe: 0x6c560220, + // Block 0x9e4, offset 0x27900 + 0x27905: 0x6d0c4c20, + 0x2790e: 0x6d170e20, 0x2790f: 0x6c1b1a20, + 0x27910: 0x6c741c20, 0x27912: 0x6d40b220, + 0x2791c: 0x6c699420, 0x2791d: 0x6d178220, 0x2791f: 0x6ce05e20, + 0x27920: 0x6c1c1420, 0x27921: 0x6c037a20, 0x27922: 0x6ce82820, 0x27923: 0x6d3f7a20, + 0x27924: 0x6cc05420, 0x27927: 0x6c1c1620, + 0x27928: 0x6cf7e020, + 0x27930: 0x6ca69c20, 0x27932: 0x6c241420, + 0x27934: 0x6cf44820, 0x27936: 0x6c1f4820, 0x27937: 0x6cda4e20, + 0x27938: 0x6d1df820, 0x27939: 0x6c71bc20, 0x2793a: 0x6c037e20, + 0x2793c: 0x6c229c20, 0x2793d: 0x6c2c6420, 0x2793e: 0x6cac9820, 0x2793f: 0x6c1c2620, + // Block 0x9e5, offset 0x27940 + 0x27941: 0x6cc0ac20, 0x27943: 0x6d0ca420, + 0x2794d: 0x6d2d2e20, + 0x27952: 0x6cfce220, 0x27953: 0x6c084620, + 0x27954: 0x6c7ba620, 0x27955: 0x6cb7a820, 0x27956: 0x6d389220, 0x27957: 0x6c713820, + 0x27958: 0x6cbcca20, 0x27959: 0x6ca13420, 0x2795a: 0x6d258c20, + 0x2795c: 0x6c4b5820, 0x2795d: 0x6d417220, + 0x27967: 0x6cbccc20, + 0x27970: 0x6c558a20, 0x27971: 0x6cc08820, 0x27972: 0x6c4d2220, 0x27973: 0x6c402c20, + 0x27974: 0x6c812a20, 0x27975: 0x6ccc6c20, 0x27976: 0x6cf68820, 0x27977: 0x6c101c20, + 0x27978: 0x6cd3ba20, 0x27979: 0x6d1e5220, 0x2797a: 0x6c49f020, + 0x2797c: 0x6ca85420, 0x2797f: 0x6c545820, + // Block 0x9e6, offset 0x27980 + 0x2798a: 0x6c9d7220, + 0x2798e: 0x6c369420, 0x2798f: 0x6cfb8a20, + 0x27990: 0x6d280020, 0x27991: 0x6d073220, 0x27992: 0x6cbde420, 0x27993: 0x6c301220, + 0x27994: 0x6c838220, 0x27995: 0x6cb7ca20, 0x27996: 0x6c7fb020, 0x27997: 0x6c3ee420, + 0x27998: 0x6cb71420, 0x27999: 0x6c1d3e20, + 0x2799c: 0x6c245c20, 0x2799f: 0x6ca16620, + 0x279a0: 0x6c06b820, + 0x279a4: 0x6c2a2e20, + 0x279a8: 0x6c6b3a20, 0x279a9: 0x6c1d5c20, 0x279aa: 0x6c1c7620, 0x279ab: 0x6d23f820, + 0x279ac: 0x6c24ee20, 0x279ad: 0x6cdb2620, 0x279ae: 0x6ce42420, 0x279af: 0x6cd61020, + 0x279b0: 0x6d2c4c20, 0x279b1: 0x6c3ef820, 0x279b3: 0x6c184620, + 0x279b4: 0x6c3d0c20, 0x279b5: 0x6c543220, 0x279b6: 0x6d2c4e20, + // Block 0x9e7, offset 0x279c0 + 0x279c4: 0x6c6b3c20, 0x279c5: 0x6d2c5020, 0x279c6: 0x6d2d9c20, + 0x279c9: 0x6d0dde20, 0x279ca: 0x6c4d3020, 0x279cb: 0x6cf48220, + 0x279cc: 0x6c576220, 0x279cd: 0x6c2cde20, 0x279ce: 0x6d115420, 0x279cf: 0x6cd9ec20, + 0x279d0: 0x6cb92c20, 0x279d1: 0x6c60cc20, 0x279d2: 0x6d04aa20, 0x279d3: 0x6cb7f020, + 0x279d4: 0x6c758420, 0x279d6: 0x6c4d3220, + 0x279de: 0x6d0dee20, 0x279df: 0x6c6b6820, + 0x279e0: 0x6c24f420, 0x279e2: 0x6ce96a20, 0x279e3: 0x6d2ee620, + 0x279e4: 0x6cb16c20, 0x279e5: 0x6c930e20, 0x279e6: 0x6d342020, 0x279e7: 0x6c1f8820, + 0x279e8: 0x6c9da820, 0x279e9: 0x6cbaec20, 0x279eb: 0x6c892420, + 0x279f2: 0x6c86dc20, + 0x279f6: 0x6c359a20, 0x279f7: 0x6cdb5820, + 0x279f8: 0x6c74f020, 0x279fb: 0x6c717c20, + 0x279fc: 0x6ce03a20, 0x279fd: 0x6c8a4820, 0x279fe: 0x6cca0a20, 0x279ff: 0x6c309220, + // Block 0x9e8, offset 0x27a00 + 0x27a01: 0x6d28d420, 0x27a02: 0x6d34b220, + 0x27a06: 0x6d08ca20, 0x27a07: 0x6c8d8620, + 0x27a0a: 0x6c2abe20, + 0x27a0d: 0x6d2dbe20, 0x27a0e: 0x6d07f020, 0x27a0f: 0x6cbdf220, + 0x27a10: 0x6c69da20, 0x27a11: 0x6cb0da20, + 0x27a14: 0x6c4e6e20, + 0x27a1a: 0x6d21f220, 0x27a1b: 0x6c4ca420, + 0x27a1d: 0x6d0a5420, + 0x27a20: 0x6d0a5620, 0x27a21: 0x6c156c20, 0x27a22: 0x6c6b8020, 0x27a23: 0x6c719420, + 0x27a24: 0x6d0e1820, 0x27a25: 0x6c31f620, 0x27a27: 0x6c53e020, + 0x27a28: 0x6cfd4a20, 0x27a29: 0x6d0a5820, + 0x27a2e: 0x6c8db020, 0x27a2f: 0x6c6b8620, + 0x27a30: 0x6d197e20, 0x27a31: 0x6cc22a20, 0x27a32: 0x6c41c020, 0x27a33: 0x6c3c8c20, + 0x27a35: 0x6c753820, 0x27a36: 0x6cc16e20, + 0x27a3b: 0x6c6fe020, + 0x27a3d: 0x6c61ba20, 0x27a3e: 0x6c612c20, + // Block 0x9e9, offset 0x27a40 + 0x27a45: 0x6cf77420, 0x27a46: 0x6cacd220, + 0x27a48: 0x6c7bf020, 0x27a49: 0x6c7a8e20, 0x27a4b: 0x6c7a9020, + 0x27a4c: 0x6d2cbe20, 0x27a4f: 0x6c03b220, + 0x27a52: 0x6c190220, 0x27a53: 0x6c569820, + 0x27a54: 0x6caa6220, 0x27a55: 0x6c356220, 0x27a56: 0x6d046a20, 0x27a57: 0x6c33ce20, + 0x27a58: 0x6cd10020, 0x27a59: 0x6cecdc20, 0x27a5a: 0x6c3b2e20, + 0x27a5d: 0x6cf60420, 0x27a5e: 0x6d3e2e20, + 0x27a60: 0x6c569a20, + 0x27a65: 0x6c0cea20, 0x27a67: 0x6ceba620, + 0x27a68: 0x6c04cc20, 0x27a69: 0x6c43e420, 0x27a6b: 0x6c77f620, + 0x27a72: 0x6d3c8c20, 0x27a73: 0x6c3e9220, + 0x27a74: 0x6ca12020, 0x27a75: 0x6c63c620, 0x27a76: 0x6ceb2620, 0x27a77: 0x6d235a20, + 0x27a79: 0x6ca24620, 0x27a7a: 0x6c745e20, 0x27a7b: 0x6c712820, + 0x27a7c: 0x6c486220, 0x27a7d: 0x6cb35a20, + // Block 0x9ea, offset 0x27a80 + 0x27a80: 0x6ca63c20, + 0x27a84: 0x6cec1e20, 0x27a85: 0x6d0d9620, + 0x27a94: 0x6c1e2c20, 0x27a95: 0x6c7ba820, 0x27a96: 0x6c4d7020, + 0x27a98: 0x6cfdd020, 0x27a99: 0x6cf65c20, 0x27a9b: 0x6c25a820, + 0x27a9c: 0x6ce6fe20, 0x27a9d: 0x6cc92420, 0x27a9f: 0x6c345820, + 0x27aa0: 0x6c182a20, + 0x27aa4: 0x6c833820, 0x27aa5: 0x6d3e6420, 0x27aa7: 0x6d332420, + 0x27aa8: 0x6d426c20, 0x27aab: 0x6c773020, + 0x27aac: 0x6d293a20, 0x27aae: 0x6d250020, 0x27aaf: 0x6cbf4620, + 0x27ab3: 0x6c381820, + 0x27ab4: 0x6d0a2220, 0x27ab6: 0x6c622e20, + 0x27ab8: 0x6c13a620, + // Block 0x9eb, offset 0x27ac0 + 0x27ac0: 0x6cd4fe20, 0x27ac1: 0x6d08a820, 0x27ac2: 0x6d00d220, 0x27ac3: 0x6ce2f820, + 0x27ac4: 0x6c4ef220, 0x27ac5: 0x6cfac020, 0x27ac6: 0x6ccd0420, 0x27ac7: 0x6cea8c20, + 0x27ac8: 0x6c4f8420, 0x27ac9: 0x6c7dbc20, 0x27aca: 0x6c133620, 0x27acb: 0x6c30bc20, + 0x27acc: 0x6caac620, 0x27acd: 0x6d0e9a20, 0x27ace: 0x6c1a2c20, 0x27acf: 0x6cb40a20, + 0x27ad0: 0x6cb7ba20, 0x27ad1: 0x6d26d420, 0x27ad2: 0x6c3d8c20, + 0x27ad7: 0x6ce6dc20, + 0x27adf: 0x6cf2c220, + 0x27ae0: 0x6cd11220, 0x27ae1: 0x6ceb8c20, + 0x27af4: 0x6ce06a20, 0x27af6: 0x6d0b6020, 0x27af7: 0x6d36ca20, + 0x27af8: 0x6c92be20, 0x27af9: 0x6d0dd020, 0x27afa: 0x6c70c220, + 0x27afd: 0x6c2a8020, 0x27aff: 0x6c1f7020, + // Block 0x9ec, offset 0x27b00 + 0x27b00: 0x6d412620, 0x27b01: 0x6c369620, 0x27b02: 0x6d349620, 0x27b03: 0x6caec020, + 0x27b05: 0x6c0cbe20, 0x27b07: 0x6c2c0220, + 0x27b10: 0x6c7f2820, 0x27b12: 0x6d133020, + 0x27b1c: 0x6c4fe620, 0x27b1d: 0x6cac7420, 0x27b1e: 0x6ce0ae20, 0x27b1f: 0x6c774a20, + 0x27b20: 0x6d05ea20, 0x27b21: 0x6d408e20, 0x27b22: 0x6c628c20, 0x27b23: 0x6cf52620, + 0x27b26: 0x6c204020, + 0x27b29: 0x6cb3a420, 0x27b2a: 0x6d0dd620, 0x27b2b: 0x6cebb420, + 0x27b2d: 0x6c31b820, 0x27b2f: 0x6cb13020, + 0x27b30: 0x6c1c7820, 0x27b31: 0x6c5d4420, 0x27b32: 0x6cb26820, + 0x27b34: 0x6c235c20, 0x27b35: 0x6d2c9620, + 0x27b3a: 0x6cec9e20, + 0x27b3f: 0x6cec6620, + // Block 0x9ed, offset 0x27b40 + 0x27b43: 0x6c36ae20, + 0x27b44: 0x6cf0da20, 0x27b45: 0x6c040420, 0x27b47: 0x6c678020, + 0x27b53: 0x6c140a20, + 0x27b55: 0x6c1f8220, 0x27b56: 0x6c7af220, 0x27b57: 0x6ce2bc20, + 0x27b58: 0x6d406a20, 0x27b59: 0x6c86ac20, 0x27b5a: 0x6cdeb220, 0x27b5b: 0x6cc9a420, + 0x27b5e: 0x6cac7a20, 0x27b5f: 0x6cac7c20, + 0x27b63: 0x6ccb0020, + 0x27b64: 0x6cbbba20, + 0x27b6d: 0x6d40e220, 0x27b6f: 0x6d371820, + 0x27b70: 0x6d0de020, 0x27b72: 0x6c6b4820, 0x27b73: 0x6ca5aa20, + // Block 0x9ee, offset 0x27b80 + 0x27b84: 0x6c944420, 0x27b85: 0x6cc15220, 0x27b87: 0x6c2af220, + 0x27b88: 0x6c897620, 0x27b89: 0x6c15f220, 0x27b8a: 0x6cbcf820, 0x27b8b: 0x6c912220, + 0x27b8c: 0x6c2efe20, 0x27b8d: 0x6c24f620, + 0x27b90: 0x6c615c20, 0x27b93: 0x6c178420, + 0x27b94: 0x6cd69a20, 0x27b95: 0x6d40f220, 0x27b97: 0x6c775a20, + 0x27b9a: 0x6cbaf020, 0x27b9b: 0x6c847820, + 0x27bae: 0x6cd65e20, 0x27baf: 0x6d243e20, + 0x27bb0: 0x6d2ee820, 0x27bb1: 0x6c82f220, + // Block 0x9ef, offset 0x27bc0 + 0x27bc5: 0x6cb33e20, + 0x27bca: 0x6d30b620, 0x27bcb: 0x6d001e20, + 0x27bcd: 0x6ce08620, 0x27bce: 0x6c258620, 0x27bcf: 0x6c7fdc20, + 0x27bd1: 0x6d060220, 0x27bd2: 0x6cd62820, 0x27bd3: 0x6d2c9c20, + 0x27bd4: 0x6c11ba20, 0x27bd7: 0x6c08fe20, + 0x27bd8: 0x6caf1c20, + 0x27bdd: 0x6c1a5620, + 0x27be3: 0x6cbc0c20, + 0x27be4: 0x6c5f8620, + 0x27bea: 0x6d2d0420, + 0x27bec: 0x6c7fde20, + // Block 0x9f0, offset 0x27c00 + 0x27c01: 0x6ce52820, 0x27c02: 0x6cc9b020, 0x27c03: 0x6c6c6e20, + 0x27c04: 0x6d3b4020, 0x27c05: 0x6c352220, 0x27c07: 0x6c145620, + 0x27c08: 0x6c73a020, 0x27c09: 0x6ce16220, 0x27c0a: 0x6c086420, + 0x27c0c: 0x6c38e820, 0x27c0d: 0x6c8b6820, 0x27c0e: 0x6d2b6e20, 0x27c0f: 0x6cdcb420, + 0x27c19: 0x6ccb8c20, + 0x27c27: 0x6d375c20, + 0x27c28: 0x6ce9d420, 0x27c2a: 0x6cbe5e20, + 0x27c2c: 0x6c21e620, + 0x27c30: 0x6cdee620, 0x27c31: 0x6c0e3c20, 0x27c32: 0x6cf1f620, + 0x27c35: 0x6cb36220, + 0x27c3d: 0x6ca09a20, 0x27c3e: 0x6c10e420, + // Block 0x9f1, offset 0x27c40 + 0x27c41: 0x6c7c2020, 0x27c43: 0x6c260220, + 0x27c44: 0x6cc54420, 0x27c45: 0x6c068020, 0x27c46: 0x6c7f8020, + 0x27c4d: 0x6ca75220, 0x27c4e: 0x6c84c220, + 0x27c55: 0x6c697220, 0x27c56: 0x6c919e20, 0x27c57: 0x6c879620, + 0x27c58: 0x6c900820, 0x27c59: 0x6c4baa20, + 0x27c5d: 0x6c161c20, + 0x27c64: 0x6cfb1820, 0x27c66: 0x6c165620, + 0x27c68: 0x6d029020, 0x27c69: 0x6d2ea820, + 0x27c6f: 0x6cd6c620, + 0x27c7b: 0x6c9d1220, + 0x27c7c: 0x6c947420, 0x27c7d: 0x6c965620, + // Block 0x9f2, offset 0x27c80 + 0x27c80: 0x6c2d0220, + 0x27c88: 0x6c2f2820, 0x27c8a: 0x6cecb220, 0x27c8b: 0x6d274620, + 0x27c8c: 0x6c948620, 0x27c8e: 0x6c948a20, + 0x27c93: 0x6c837220, + 0x27c95: 0x6cec6020, 0x27c96: 0x6c2f3e20, 0x27c97: 0x6ca59620, + 0x27c98: 0x6cceb220, 0x27c99: 0x6d019e20, 0x27c9a: 0x6cafe820, + 0x27ca5: 0x6c98dc20, 0x27ca7: 0x6d1ade20, + 0x27ca9: 0x6c0f0a20, 0x27cab: 0x6d3b0220, + 0x27cae: 0x6c1cc820, + 0x27cb6: 0x6ca24820, 0x27cb7: 0x6ceb2820, + 0x27cb9: 0x6ce7be20, 0x27cba: 0x6d128820, + // Block 0x9f3, offset 0x27cc0 + 0x27cc1: 0x6c5a7220, 0x27cc3: 0x6cc60020, + 0x27cc5: 0x6d130620, + 0x27ccb: 0x6ceb3a20, + 0x27cd6: 0x6d413a20, 0x27cd7: 0x6d23d220, + 0x27cda: 0x6c000c20, + 0x27cdc: 0x6d38a420, 0x27cdd: 0x6cec9c20, + 0x27ce1: 0x6c34ae20, 0x27ce2: 0x6d384420, 0x27ce3: 0x6c4cfc20, + 0x27ce4: 0x6c5a0420, 0x27ce5: 0x6c9e6220, + 0x27ce9: 0x6c211a20, 0x27cea: 0x6cbce420, 0x27ceb: 0x6c45b220, + 0x27cec: 0x6ce69420, 0x27ced: 0x6c9a2a20, + 0x27cf1: 0x6ce1a420, + 0x27cf4: 0x6cc6c420, 0x27cf7: 0x6cc6c620, + 0x27cf8: 0x6cb66420, 0x27cf9: 0x6c4c9a20, + 0x27cfd: 0x6cfe6220, 0x27cfe: 0x6ce4ca20, + // Block 0x9f4, offset 0x27d00 + 0x27d05: 0x6cff4020, + 0x27d08: 0x6d2db620, 0x27d09: 0x6c258820, + 0x27d14: 0x6c7ffc20, + 0x27d18: 0x6cd02e20, 0x27d1a: 0x6c830e20, 0x27d1b: 0x6c879820, + 0x27d1d: 0x6c14e620, 0x27d1e: 0x6ca8d020, 0x27d1f: 0x6c947620, + 0x27d21: 0x6ce63a20, 0x27d22: 0x6c5ba620, + 0x27d27: 0x6c458020, + 0x27d30: 0x6cb77220, 0x27d31: 0x6d20fa20, 0x27d33: 0x6d02d220, + 0x27d38: 0x6d26ae20, 0x27d39: 0x6c034e20, 0x27d3a: 0x6c276a20, 0x27d3b: 0x6c5eba20, + 0x27d3c: 0x6d089220, 0x27d3f: 0x6c743c20, + // Block 0x9f5, offset 0x27d40 + 0x27d40: 0x6ca99420, + 0x27d48: 0x6c325220, 0x27d49: 0x6c602620, + 0x27d50: 0x6cabc820, 0x27d51: 0x6c45f020, 0x27d52: 0x6c07ba20, + 0x27d54: 0x6c794220, 0x27d55: 0x6d105020, 0x27d56: 0x6c8f0820, 0x27d57: 0x6ca5ee20, + 0x27d58: 0x6d2cca20, 0x27d59: 0x6d1b5c20, 0x27d5a: 0x6ca72820, 0x27d5b: 0x6cad9020, + 0x27d5d: 0x6c458e20, 0x27d5e: 0x6c109e20, 0x27d5f: 0x6c512e20, + 0x27d60: 0x6cc71220, 0x27d61: 0x6c4b5020, + 0x27d65: 0x6c09b620, 0x27d66: 0x6cf63020, 0x27d67: 0x6c712a20, + 0x27d68: 0x6c5cf420, 0x27d69: 0x6c09e420, 0x27d6b: 0x6ce56420, + 0x27d6c: 0x6d332820, 0x27d6f: 0x6d181020, + 0x27d70: 0x6c22d220, 0x27d72: 0x6c0e2620, + 0x27d77: 0x6c459c20, + 0x27d7a: 0x6c381a20, + 0x27d7d: 0x6d0fce20, 0x27d7e: 0x6d064820, + // Block 0x9f6, offset 0x27d80 + 0x27d81: 0x6c52b620, + 0x27d84: 0x6d2a0a20, 0x27d85: 0x6c148420, 0x27d86: 0x6c537620, + 0x27d88: 0x6ce4b820, + 0x27d8c: 0x6d340a20, 0x27d8d: 0x6d039220, 0x27d8e: 0x6d062220, + 0x27d91: 0x6d325820, + 0x27d94: 0x6ced4020, + 0x27d98: 0x6c75dc20, + 0x27d9d: 0x6cf30c20, + 0x27da0: 0x6c92c220, 0x27da2: 0x6d32f220, 0x27da3: 0x6cc71a20, + 0x27da4: 0x6c1a3c20, 0x27da5: 0x6c3ee620, 0x27da7: 0x6c369820, + 0x27da8: 0x6ce1e620, 0x27da9: 0x6ce12e20, 0x27dab: 0x6c730020, + 0x27dac: 0x6c17c020, 0x27dad: 0x6cde9620, 0x27dae: 0x6c2c0420, + 0x27db0: 0x6d3fc020, 0x27db3: 0x6c794c20, + 0x27db4: 0x6ce99820, 0x27db6: 0x6c794e20, + // Block 0x9f7, offset 0x27dc0 + 0x27dc5: 0x6cc71c20, 0x27dc6: 0x6d276420, 0x27dc7: 0x6c517a20, + 0x27dc8: 0x6d400820, 0x27dc9: 0x6c235e20, 0x27dca: 0x6cbfcc20, + 0x27dce: 0x6ca2b420, 0x27dcf: 0x6c346420, + 0x27dd0: 0x6d065a20, 0x27dd1: 0x6c795620, 0x27dd2: 0x6cfd1220, + 0x27ddb: 0x6c31ba20, + 0x27ddc: 0x6c76ee20, 0x27dde: 0x6d1bf020, + 0x27de2: 0x6d3e9620, + 0x27de7: 0x6c5a0620, + 0x27de9: 0x6caed020, 0x27deb: 0x6c86ae20, + 0x27ded: 0x6c0f8220, 0x27dee: 0x6c444420, 0x27def: 0x6c716620, + 0x27df0: 0x6c783420, 0x27df2: 0x6c55ce20, 0x27df3: 0x6d115820, + 0x27df4: 0x6ce14820, 0x27df6: 0x6cbf7020, 0x27df7: 0x6cc72820, + 0x27df8: 0x6c8f1e20, 0x27df9: 0x6c5c5e20, 0x27dfa: 0x6c5f6220, + // Block 0x9f8, offset 0x27e00 + 0x27e09: 0x6d371a20, 0x27e0b: 0x6ce15220, + 0x27e0c: 0x6d355c20, 0x27e0d: 0x6c775e20, + 0x27e14: 0x6d107220, 0x27e16: 0x6ce18420, 0x27e17: 0x6c52d820, + 0x27e1b: 0x6c897820, + 0x27e1d: 0x6c12a020, + 0x27e21: 0x6ca3aa20, 0x27e22: 0x6d400e20, + 0x27e24: 0x6c2af420, 0x27e26: 0x6c68a220, 0x27e27: 0x6caeec20, + 0x27e29: 0x6c49fa20, 0x27e2a: 0x6c377420, 0x27e2b: 0x6c670620, + 0x27e2c: 0x6c69d220, 0x27e2d: 0x6caaca20, 0x27e2e: 0x6d2a6220, + 0x27e33: 0x6caef620, + 0x27e34: 0x6c292020, 0x27e36: 0x6cc1f620, 0x27e37: 0x6c889620, + 0x27e38: 0x6ca2be20, 0x27e39: 0x6c805220, + 0x27e3e: 0x6c3baa20, + // Block 0x9f9, offset 0x27e40 + 0x27e42: 0x6c5d0e20, + 0x27e46: 0x6c7bb420, + 0x27e48: 0x6d1b2a20, 0x27e49: 0x6cd69c20, 0x27e4a: 0x6c671e20, + 0x27e52: 0x6c964420, + 0x27e54: 0x6c933c20, + 0x27e5a: 0x6c446a20, 0x27e5b: 0x6cc51220, + 0x27e5e: 0x6cb22e20, + 0x27e60: 0x6c900a20, + 0x27e64: 0x6d320c20, 0x27e65: 0x6cfd4c20, + 0x27e68: 0x6c8c8e20, 0x27e69: 0x6c88aa20, 0x27e6a: 0x6ccd2420, 0x27e6b: 0x6c0fd420, + 0x27e6c: 0x6c87a820, + 0x27e73: 0x6d013a20, + 0x27e74: 0x6c446e20, 0x27e75: 0x6c9fe020, 0x27e76: 0x6c88ae20, + 0x27e79: 0x6c753c20, 0x27e7a: 0x6d38c820, + 0x27e7f: 0x6c784820, + // Block 0x9fa, offset 0x27e80 + 0x27e81: 0x6c2f2a20, 0x27e83: 0x6d30ce20, + 0x27e85: 0x6cd4ac20, 0x27e86: 0x6c5e9020, 0x27e87: 0x6c8f7c20, + 0x27e88: 0x6c49ea20, 0x27e89: 0x6d2a5620, 0x27e8a: 0x6cfd4420, 0x27e8b: 0x6cb8ae20, + 0x27e8d: 0x6ccfd820, + 0x27e90: 0x6d1ae020, 0x27e91: 0x6c6be420, + 0x27e94: 0x6ccffe20, 0x27e95: 0x6cd00020, 0x27e96: 0x6cc95220, + 0x27e9b: 0x6cf8c020, + 0x27ea1: 0x6c7aac20, 0x27ea3: 0x6cc1c620, + 0x27ea5: 0x6c443e20, 0x27ea6: 0x6c050820, + 0x27ea8: 0x6c0a7c20, 0x27ea9: 0x6cb92e20, + 0x27eb0: 0x6c0d6420, 0x27eb1: 0x6c050a20, 0x27eb3: 0x6d42ae20, + 0x27eb4: 0x6cb0d020, 0x27eb6: 0x6c5e3620, + 0x27ebe: 0x6c051020, + // Block 0x9fb, offset 0x27ec0 + 0x27eca: 0x6ca9d820, + 0x27ecc: 0x6c18fc20, 0x27ece: 0x6cae4e20, + 0x27ed1: 0x6c3f2e20, 0x27ed2: 0x6ce88220, + 0x27edc: 0x6cb04e20, 0x27edd: 0x6cb36420, + 0x27ee0: 0x6c1b7420, 0x27ee3: 0x6d093e20, + 0x27ee4: 0x6cb74020, 0x27ee5: 0x6cf4b220, + 0x27ee8: 0x6d357e20, 0x27ee9: 0x6c2c1c20, 0x27eea: 0x6c22fe20, 0x27eeb: 0x6d1ef420, + 0x27ef9: 0x6c230020, + 0x27efc: 0x6c2c1e20, 0x27efd: 0x6d3d2620, 0x27eff: 0x6d408020, + // Block 0x9fc, offset 0x27f00 + 0x27f00: 0x6c238c20, 0x27f03: 0x6caca820, + 0x27f04: 0x6d0d4c20, 0x27f05: 0x6cb74e20, 0x27f06: 0x6cc6fa20, 0x27f07: 0x6c63a420, + 0x27f09: 0x6d359220, 0x27f0a: 0x6cc00e20, 0x27f0b: 0x6d268a20, + 0x27f0d: 0x6cd32420, + 0x27f11: 0x6c4fc020, + 0x27f19: 0x6ceab220, + 0x27f1c: 0x6c0cde20, 0x27f1e: 0x6c770020, + 0x27f22: 0x6c21aa20, + 0x27f24: 0x6c229020, 0x27f26: 0x6d1ad020, 0x27f27: 0x6cd34c20, + 0x27f28: 0x6ca3b820, 0x27f29: 0x6cc85820, 0x27f2b: 0x6d0f9e20, + 0x27f2c: 0x6c1a9820, 0x27f2e: 0x6c21f820, + 0x27f31: 0x6c457620, 0x27f32: 0x6c9c4220, + 0x27f34: 0x6c612e20, + 0x27f3c: 0x6c44b220, 0x27f3d: 0x6d2a6c20, + // Block 0x9fd, offset 0x27f40 + 0x27f41: 0x6c081420, + 0x27f47: 0x6d030c20, + 0x27f48: 0x6c7df020, 0x27f4a: 0x6c2e8e20, + 0x27f4d: 0x6ce66a20, + 0x27f5a: 0x6cd71c20, + 0x27f5e: 0x6c275620, + 0x27f66: 0x6c851020, + 0x27f68: 0x6d1e2820, 0x27f69: 0x6c684220, + 0x27f6c: 0x6cde0420, 0x27f6d: 0x6cc24620, 0x27f6e: 0x6d1a6020, 0x27f6f: 0x6d24e820, + 0x27f70: 0x6c6abc20, 0x27f72: 0x6cb8da20, 0x27f73: 0x6d10a020, + 0x27f74: 0x6d0ba620, 0x27f77: 0x6cbe4a20, + 0x27f7f: 0x6cadd420, + // Block 0x9fe, offset 0x27f80 + 0x27f97: 0x6c635820, + 0x27f99: 0x6ce82c20, 0x27f9b: 0x6ce2ec20, + 0x27fa1: 0x6c33f620, 0x27fa2: 0x6c15ba20, 0x27fa3: 0x6c636820, + 0x27fa4: 0x6c1c2820, 0x27fa5: 0x6c64aa20, 0x27fa6: 0x6cd5e020, + 0x27faf: 0x6cde5a20, + // Block 0x9ff, offset 0x27fc0 + 0x27fd5: 0x6d33ea20, 0x27fd7: 0x6d256e20, + 0x27fda: 0x6c54d420, + 0x27fdc: 0x6c8b1220, + 0x27fe0: 0x6d2ad420, 0x27fe2: 0x6c1f5e20, + 0x27fe6: 0x6cc0ba20, 0x27fe7: 0x6c07fa20, + 0x27ff9: 0x6c588620, 0x27ffa: 0x6c7aca20, 0x27ffb: 0x6cd10c20, + 0x27ffd: 0x6c6afe20, 0x27fff: 0x6cee2c20, + // Block 0xa00, offset 0x28000 + 0x28003: 0x6c54de20, + 0x2800a: 0x6d2ae620, 0x2800b: 0x6d297020, + 0x2800c: 0x6d106420, 0x2800e: 0x6c1bba20, 0x2800f: 0x6c701220, + 0x2801a: 0x6c89fe20, 0x2801b: 0x6d209620, + 0x28020: 0x6c0b4a20, 0x28022: 0x6c7bc820, + 0x2802c: 0x6c1e4a20, 0x2802d: 0x6d0b3620, 0x2802e: 0x6d3d8620, + 0x28030: 0x6cbcda20, 0x28031: 0x6cfcf020, 0x28033: 0x6d250620, + 0x28034: 0x6cf46e20, 0x28035: 0x6c693620, 0x28036: 0x6cfe5020, 0x28037: 0x6ccc7420, + 0x28039: 0x6d36cc20, + 0x2803c: 0x6c1d5a20, 0x2803e: 0x6c0b0620, 0x2803f: 0x6ceeb820, + // Block 0xa01, offset 0x28040 + 0x28053: 0x6c2a3220, + 0x2805d: 0x6d23d820, 0x2805e: 0x6ce9b820, + 0x28061: 0x6c17c220, + 0x28065: 0x6c5c4420, 0x28066: 0x6cba2620, + 0x28068: 0x6cf01a20, + 0x28070: 0x6d1f7420, + 0x2807c: 0x6c2ca020, 0x2807e: 0x6c26f620, + // Block 0xa02, offset 0x28080 + 0x28081: 0x6d1f7620, 0x28082: 0x6c702620, 0x28083: 0x6ce9bc20, + 0x28084: 0x6d297620, 0x28087: 0x6c5c6020, + 0x28089: 0x6ccc8220, + 0x2808c: 0x6c5e1020, + 0x28094: 0x6d115a20, + 0x28099: 0x6cfd1e20, + 0x2809e: 0x6cfd2020, + 0x280ac: 0x6c2caa20, 0x280ae: 0x6c703220, + 0x280b2: 0x6c5c7420, + 0x280b4: 0x6c77cc20, 0x280b5: 0x6d1f8420, + 0x280b8: 0x6c870e20, + 0x280bc: 0x6c201420, 0x280be: 0x6c1b6820, + // Block 0xa03, offset 0x280c0 + 0x280c0: 0x6c5e3820, 0x280c2: 0x6d1f9020, + 0x280c4: 0x6d270e20, + 0x280ce: 0x6cded820, 0x280cf: 0x6d29b420, + 0x280d3: 0x6ca8ac20, + 0x280d4: 0x6d3b4a20, + 0x280e1: 0x6cfc6220, + 0x280e9: 0x6cd22a20, 0x280eb: 0x6c79ca20, + 0x280ec: 0x6cb6c620, 0x280ed: 0x6ce91420, 0x280ee: 0x6c387e20, 0x280ef: 0x6c258e20, + 0x280f2: 0x6cea3820, 0x280f3: 0x6c137420, + 0x280f4: 0x6c110020, 0x280f5: 0x6cfe1420, 0x280f6: 0x6cadfc20, 0x280f7: 0x6c6e0220, + 0x280f8: 0x6cb56a20, 0x280f9: 0x6cceae20, 0x280fa: 0x6ca97420, 0x280fb: 0x6ca30420, + 0x280fd: 0x6cbd5020, + // Block 0xa04, offset 0x28100 + 0x2810d: 0x6c090c20, + 0x28113: 0x6c092420, + 0x28114: 0x6c05a220, 0x28115: 0x6c0b7620, 0x28116: 0x6d3e0220, 0x28117: 0x6ca30a20, + 0x28118: 0x6cf07020, 0x28119: 0x6c4fbe20, + 0x28121: 0x6c6c8220, 0x28123: 0x6d333c20, + 0x28127: 0x6cbc8220, + 0x2812e: 0x6c501620, 0x2812f: 0x6ce71e20, + 0x28130: 0x6d2a4020, 0x28131: 0x6cd15420, 0x28132: 0x6c25a420, 0x28133: 0x6c597e20, + 0x28134: 0x6cc78e20, 0x28135: 0x6d292e20, 0x28136: 0x6ca6f820, + 0x2813e: 0x6cfa8620, + // Block 0xa05, offset 0x28140 + 0x28148: 0x6cc2bc20, 0x28149: 0x6c619a20, 0x2814a: 0x6d1a3620, 0x2814b: 0x6c850620, + 0x2814c: 0x6c984620, 0x2814d: 0x6cceca20, 0x2814e: 0x6c4e8e20, 0x2814f: 0x6c260e20, + 0x28150: 0x6c759c20, 0x28151: 0x6c61bc20, 0x28152: 0x6c107820, 0x28153: 0x6c905420, + 0x28154: 0x6c3d2220, 0x28155: 0x6d1f0e20, 0x28156: 0x6c7b1c20, + 0x2815c: 0x6cfe2220, + 0x28161: 0x6d279420, 0x28163: 0x6cbd5e20, + 0x28164: 0x6c5b2c20, 0x28165: 0x6cb42e20, + 0x2816b: 0x6c83b220, + 0x2816c: 0x6cadcc20, 0x2816d: 0x6cd4c620, 0x2816e: 0x6c707620, 0x2816f: 0x6d14e020, + 0x28170: 0x6d32a820, 0x28171: 0x6c1d0e20, 0x28173: 0x6cf77620, + 0x28175: 0x6c561a20, 0x28176: 0x6cc74420, + // Block 0xa06, offset 0x28180 + 0x2818c: 0x6c590c20, 0x2818d: 0x6cbc3c20, 0x2818e: 0x6d33d020, 0x2818f: 0x6d1c6c20, + 0x28190: 0x6cf7e220, 0x28191: 0x6cbb7620, 0x28192: 0x6c61fa20, 0x28193: 0x6d32bc20, + 0x28194: 0x6c59b420, 0x28196: 0x6d210a20, 0x28197: 0x6d405a20, + 0x28198: 0x6c99f420, + 0x2819c: 0x6cd13220, + 0x281a9: 0x6cc2e620, + 0x281b0: 0x6c676020, 0x281b1: 0x6c512020, 0x281b3: 0x6ce75220, + 0x281b4: 0x6c513020, 0x281b5: 0x6cf15220, 0x281b6: 0x6d17cc20, 0x281b7: 0x6cacfe20, + 0x281ba: 0x6cf22620, 0x281bb: 0x6cb99820, + 0x281bc: 0x6c862020, 0x281bd: 0x6d150a20, 0x281be: 0x6c20ac20, 0x281bf: 0x6d06e820, + // Block 0xa07, offset 0x281c0 + 0x281c0: 0x6cefd020, + 0x281c6: 0x6c439420, + 0x281c8: 0x6d226220, 0x281cb: 0x6d2d4420, + 0x281cc: 0x6c41a220, 0x281cd: 0x6cb8f620, 0x281ce: 0x6c773220, 0x281cf: 0x6c840220, + 0x281d0: 0x6cd00220, 0x281d1: 0x6c499220, 0x281d3: 0x6cb17c20, + 0x281d6: 0x6c840420, + 0x281d8: 0x6c562620, 0x281db: 0x6ce8ce20, + 0x281dc: 0x6cd75620, 0x281de: 0x6c56aa20, 0x281df: 0x6c840620, + 0x281e2: 0x6c910a20, + 0x281e6: 0x6c297020, + 0x281e8: 0x6d42a420, 0x281e9: 0x6cccf620, 0x281eb: 0x6ccf6e20, + 0x281ed: 0x6c3cb620, 0x281ee: 0x6c726e20, 0x281ef: 0x6ce76e20, + 0x281f0: 0x6c691a20, 0x281f1: 0x6cbbe620, 0x281f2: 0x6c42d420, 0x281f3: 0x6d3e7020, + 0x281f4: 0x6c59e620, 0x281f5: 0x6ccd0620, + 0x281f8: 0x6cdff620, + // Block 0xa08, offset 0x28200 + 0x2820c: 0x6ceaca20, 0x2820e: 0x6c8e2220, + 0x28210: 0x6c1a2e20, 0x28211: 0x6cf27020, 0x28212: 0x6d425020, 0x28213: 0x6d23da20, + 0x28215: 0x6d3a2220, 0x28217: 0x6cc45420, + 0x28218: 0x6cf80a20, 0x28219: 0x6cc1b620, 0x2821b: 0x6c442820, + 0x28222: 0x6cb52a20, 0x28223: 0x6d05e020, + 0x28228: 0x6c415220, 0x28229: 0x6cc3f820, 0x2822a: 0x6c1ddc20, 0x2822b: 0x6c9b4e20, + 0x28232: 0x6cd02020, 0x28233: 0x6cc1c820, + 0x28236: 0x6cbbb420, 0x28237: 0x6c11b420, + 0x2823a: 0x6c86b020, + 0x2823c: 0x6ceda220, 0x2823d: 0x6c826620, 0x2823e: 0x6d03a820, 0x2823f: 0x6c80ea20, + // Block 0xa09, offset 0x28240 + 0x28242: 0x6cd3ec20, 0x28243: 0x6d330020, + 0x28244: 0x6c38ce20, + 0x2824a: 0x6d371c20, + 0x2824f: 0x6d1aa420, + 0x28251: 0x6c86de20, + 0x28256: 0x6ca08820, 0x28257: 0x6cf04020, + 0x28259: 0x6d1c1020, 0x2825a: 0x6cc4e420, + 0x28260: 0x6cc2a820, + 0x28265: 0x6c95ce20, + 0x28272: 0x6c275820, + 0x28274: 0x6d1b4e20, 0x28275: 0x6c08da20, 0x28276: 0x6c438820, + 0x28278: 0x6cf20a20, 0x28279: 0x6d0d7620, 0x2827a: 0x6c9e1e20, + 0x2827c: 0x6c42a020, 0x2827d: 0x6cc05620, 0x2827e: 0x6d33da20, + // Block 0xa0a, offset 0x28280 + 0x2828b: 0x6c471c20, + 0x2828c: 0x6ce75420, 0x2828e: 0x6c8d1420, 0x2828f: 0x6ce33620, + 0x28290: 0x6c224c20, 0x28291: 0x6d150c20, 0x28292: 0x6c395a20, 0x28293: 0x6cb31220, + 0x28294: 0x6c09b820, 0x28296: 0x6c064e20, + 0x2829f: 0x6cae7620, + 0x282a1: 0x6cdb8420, + 0x282a4: 0x6cd92820, 0x282a5: 0x6cef1a20, 0x282a6: 0x6cff9220, + 0x282ac: 0x6c504c20, 0x282ad: 0x6d0dac20, + 0x282b6: 0x6d152620, 0x282b7: 0x6d2a1e20, + 0x282b8: 0x6d1d0020, 0x282b9: 0x6ca43220, + 0x282bf: 0x6d289620, + // Block 0xa0b, offset 0x282c0 + 0x282c1: 0x6ce50c20, 0x282c2: 0x6cf68a20, 0x282c3: 0x6c69b420, + 0x282c4: 0x6d0cbc20, + 0x282cc: 0x6ca55e20, 0x282cd: 0x6ce07020, 0x282ce: 0x6d0eaa20, 0x282cf: 0x6ce51a20, + 0x282d0: 0x6d36ce20, 0x282d1: 0x6c1d7a20, 0x282d2: 0x6ce23a20, + 0x282d7: 0x6d2cdc20, + 0x282de: 0x6c9e3a20, + 0x282e1: 0x6cf47020, 0x282e2: 0x6d1b0220, 0x282e3: 0x6d0eac20, + 0x282e4: 0x6c81ba20, + 0x282e9: 0x6cb31e20, 0x282eb: 0x6c5d4620, + 0x282ec: 0x6c4d4620, 0x282ed: 0x6ca21a20, 0x282ee: 0x6c236020, + 0x282f1: 0x6c7aae20, 0x282f2: 0x6c1d8420, + 0x282f4: 0x6d1ff020, + 0x282f8: 0x6d3da020, 0x282fb: 0x6cd9e420, + // Block 0xa0c, offset 0x28300 + 0x28302: 0x6d1b7e20, + 0x28305: 0x6d41da20, 0x28306: 0x6cca7420, 0x28307: 0x6c8f4a20, + 0x28308: 0x6c4f2020, 0x28309: 0x6cf0ec20, 0x2830a: 0x6c9b6020, 0x2830b: 0x6c55d020, + 0x2830c: 0x6c86b220, 0x2830e: 0x6c9d9c20, + 0x28310: 0x6c054020, 0x28311: 0x6c65f020, + 0x2831c: 0x6cc40620, + 0x28320: 0x6c9b6220, 0x28322: 0x6ca21c20, 0x28323: 0x6c53ac20, + 0x28324: 0x6c56d820, 0x28325: 0x6c9c8e20, 0x28326: 0x6ccca820, + 0x28329: 0x6cce2620, 0x2832a: 0x6c17c620, + 0x2832c: 0x6d3dc220, 0x2832e: 0x6d342220, 0x2832f: 0x6ca77020, + 0x28335: 0x6c62b220, + 0x28338: 0x6c784020, 0x28339: 0x6d330620, + 0x2833f: 0x6c281420, + // Block 0xa0d, offset 0x28340 + 0x28340: 0x6c8a8220, 0x28341: 0x6d2e3020, 0x28342: 0x6c460620, 0x28343: 0x6c818c20, + 0x28344: 0x6c571e20, 0x28345: 0x6c1fd220, 0x28347: 0x6c660c20, + 0x28348: 0x6c7d3220, + 0x2834d: 0x6ccf0220, + 0x28354: 0x6c191c20, 0x28355: 0x6ce08820, 0x28357: 0x6c55f820, + 0x28358: 0x6c9b9e20, 0x28359: 0x6cada420, 0x2835a: 0x6d2e3820, 0x2835b: 0x6c16d620, + 0x2835d: 0x6c41f820, + 0x28360: 0x6d193a20, 0x28362: 0x6cdcb620, + 0x28366: 0x6d076420, 0x28367: 0x6c62de20, + 0x28368: 0x6c808e20, + 0x2836c: 0x6d159620, 0x2836f: 0x6c9dae20, + 0x28371: 0x6c9f1420, + 0x28375: 0x6c24a620, + 0x28378: 0x6c805a20, 0x2837b: 0x6d0c4e20, + 0x2837e: 0x6c9ccc20, + // Block 0xa0e, offset 0x28380 + 0x28382: 0x6d1e6820, 0x28383: 0x6c125420, + 0x28384: 0x6c664420, 0x28387: 0x6cda0a20, + 0x2838e: 0x6d0d2a20, + 0x28391: 0x6c736020, + 0x28395: 0x6c369c20, + 0x28398: 0x6c3bf220, 0x2839a: 0x6c3bf620, + 0x283a1: 0x6c4a2a20, 0x283a2: 0x6c96fc20, + 0x283a4: 0x6c8ab820, + 0x283a9: 0x6c1cca20, 0x283ab: 0x6c840820, + 0x283b1: 0x6d349c20, + 0x283b4: 0x6d024820, 0x283b7: 0x6c1dfc20, + 0x283b9: 0x6c60fc20, + 0x283bd: 0x6caf5c20, + // Block 0xa0f, offset 0x283c0 + 0x283c2: 0x6c6abe20, + 0x283c7: 0x6d38e420, + 0x283cd: 0x6d046c20, + 0x283d1: 0x6c7bfc20, + 0x283d9: 0x6c6e2220, 0x283db: 0x6c56a020, + 0x283de: 0x6cb99c20, + 0x283e3: 0x6c133220, + 0x283e6: 0x6cb60420, 0x283e7: 0x6ced3220, + 0x283e8: 0x6c98ec20, 0x283ea: 0x6c30f020, + 0x283f4: 0x6c79d220, 0x283f6: 0x6c277c20, + 0x283f8: 0x6ca4b420, 0x283fa: 0x6c536a20, + // Block 0xa10, offset 0x28400 + 0x28402: 0x6c7f4020, 0x28403: 0x6c34aa20, + 0x28404: 0x6cb91020, 0x28406: 0x6d1a8820, + 0x28416: 0x6c911220, 0x28417: 0x6c5ae020, + 0x2841b: 0x6c402e20, + 0x2841c: 0x6c98f420, 0x2841e: 0x6d389a20, + 0x28421: 0x6d1dfa20, + 0x2842d: 0x6c817020, 0x2842e: 0x6c609c20, 0x2842f: 0x6d186a20, + 0x28430: 0x6c8e8c20, 0x28431: 0x6c235220, 0x28433: 0x6ca43c20, + // Block 0xa11, offset 0x28440 + 0x28450: 0x6cea2620, 0x28451: 0x6cfe5220, + 0x28455: 0x6c0bba20, 0x28456: 0x6c207820, 0x28457: 0x6cf52020, + 0x28459: 0x6c70c620, + 0x28465: 0x6d005220, 0x28466: 0x6caf9220, 0x28467: 0x6d3da220, + 0x28468: 0x6cc8e420, 0x2846a: 0x6ccafa20, 0x2846b: 0x6d3f6220, + 0x2846d: 0x6d336220, + 0x28470: 0x6d40da20, 0x28471: 0x6cc14220, 0x28473: 0x6c1c7a20, + 0x28475: 0x6d36f020, + // Block 0xa12, offset 0x28480 + 0x28497: 0x6cc37a20, + 0x28498: 0x6cb92020, 0x28499: 0x6d0afc20, 0x2849a: 0x6c17c420, 0x2849b: 0x6c517c20, + 0x2849c: 0x6cc80420, + 0x284a0: 0x6c70cc20, 0x284a1: 0x6cf52820, + 0x284ac: 0x6c1c7c20, 0x284ad: 0x6c7c0420, 0x284af: 0x6c240020, + 0x284b0: 0x6cc89220, 0x284b1: 0x6c7e1e20, 0x284b2: 0x6c1b5e20, 0x284b3: 0x6d40e420, + 0x284b4: 0x6c688620, 0x284b6: 0x6d21c420, 0x284b7: 0x6ce8fe20, + 0x284b8: 0x6c9b6420, 0x284b9: 0x6c266c20, 0x284ba: 0x6cd7a020, + // Block 0xa13, offset 0x284c0 + 0x284e5: 0x6c3c6c20, 0x284e6: 0x6c469020, 0x284e7: 0x6c301c20, + 0x284e8: 0x6c142220, 0x284e9: 0x6c99be20, 0x284ea: 0x6c15e820, 0x284eb: 0x6c0b1020, + 0x284ec: 0x6d241e20, 0x284ef: 0x6cecea20, + 0x284f0: 0x6d40e620, 0x284f2: 0x6d3ea420, + 0x284f4: 0x6c1fec20, 0x284f5: 0x6ced5620, 0x284f6: 0x6cebf420, + 0x284f8: 0x6cc2a620, 0x284fb: 0x6ced5820, + 0x284fd: 0x6cfa5020, + // Block 0xa14, offset 0x28500 + 0x28504: 0x6d1d5620, 0x28505: 0x6c66e820, + 0x28508: 0x6cf04220, 0x28509: 0x6ce39a20, 0x2850a: 0x6ccaca20, + 0x2850c: 0x6cb67a20, 0x2850d: 0x6ccc2020, 0x2850e: 0x6d244220, 0x2850f: 0x6c60e220, + 0x28510: 0x6c314420, 0x28511: 0x6c15f620, 0x28512: 0x6ce96c20, + 0x28515: 0x6c8ec420, 0x28517: 0x6d3cba20, + 0x28533: 0x6cc89420, + 0x28536: 0x6d0eda20, 0x28537: 0x6c47ea20, + 0x28539: 0x6c86e220, 0x2853a: 0x6c13ba20, + 0x2853e: 0x6c2cac20, + // Block 0xa15, offset 0x28540 + 0x28540: 0x6d2e2a20, 0x28541: 0x6cb32220, + 0x28552: 0x6c912620, + 0x28554: 0x6d374c20, + // Block 0xa16, offset 0x28580 + 0x28581: 0x6c888a20, + 0x28585: 0x6c95ca20, + 0x2858d: 0x6c352420, + 0x28590: 0x6c750820, 0x28591: 0x6c873420, 0x28592: 0x6c7ff220, + 0x28594: 0x6cc89620, 0x28595: 0x6c474220, 0x28596: 0x6c155c20, 0x28597: 0x6d060620, + 0x2859a: 0x6d356420, + // Block 0xa17, offset 0x285c0 + 0x285c1: 0x6d097c20, 0x285c2: 0x6c0e9c20, 0x285c3: 0x6c19aa20, + 0x285c5: 0x6d3b4220, 0x285c6: 0x6c522a20, + 0x285c9: 0x6c04ac20, + 0x285d3: 0x6c2f0820, + 0x285d6: 0x6d2e3a20, 0x285d7: 0x6c4ca620, + 0x285da: 0x6c0c5420, 0x285db: 0x6c7ec620, + 0x285fa: 0x6c6c7620, + // Block 0xa18, offset 0x28600 + 0x28602: 0x6c411c20, + 0x28612: 0x6c9c1e20, + 0x28614: 0x6d247e20, + 0x2862a: 0x6cf82a20, + 0x2862c: 0x6cb17820, 0x2862d: 0x6cd85020, + 0x28634: 0x6c2b0020, + 0x28638: 0x6c219e20, 0x28639: 0x6c2bbe20, 0x2863a: 0x6c5fa820, 0x2863b: 0x6c157620, + 0x2863f: 0x6d3dea20, + // Block 0xa19, offset 0x28640 + 0x28653: 0x6c115220, + 0x2865e: 0x6c681620, + 0x28672: 0x6ce80220, + 0x2867d: 0x6c84e820, + // Block 0xa1a, offset 0x28680 + 0x28682: 0x6cba9020, + 0x28686: 0x6c21a020, + 0x2868f: 0x6cdef820, + 0x28691: 0x6c2e5220, 0x28693: 0x6c664820, + 0x2869b: 0x6d356820, + 0x2869c: 0x6c753220, 0x2869e: 0x6ca0a420, + 0x286a0: 0x6c959620, + 0x286a6: 0x6c062420, + 0x286ad: 0x6d415e20, + 0x286b5: 0x6d300820, + 0x286b8: 0x6d220c20, 0x286bb: 0x6c062a20, + 0x286be: 0x6c969420, 0x286bf: 0x6cf85020, + // Block 0xa1b, offset 0x286c0 + 0x286c0: 0x6c567c20, 0x286c1: 0x6d171220, 0x286c2: 0x6c355020, 0x286c3: 0x6c470220, + 0x286c4: 0x6ce89e20, 0x286c5: 0x6d314a20, 0x286c7: 0x6cc07220, + 0x286c8: 0x6cdaba20, 0x286c9: 0x6c89c620, 0x286ca: 0x6cc11a20, 0x286cb: 0x6c8d2620, + 0x286cc: 0x6c499420, 0x286cd: 0x6c80e420, 0x286ce: 0x6ce7dc20, 0x286cf: 0x6c266620, + 0x286d0: 0x6c911e20, 0x286d1: 0x6c5a1220, 0x286d2: 0x6cd47e20, 0x286d3: 0x6c688820, + 0x286d4: 0x6d41f620, 0x286d5: 0x6c411a20, 0x286d6: 0x6cef5220, + 0x286d9: 0x6c7d4e20, 0x286da: 0x6c32bc20, 0x286db: 0x6cd92020, + 0x286dc: 0x6cb5e020, 0x286dd: 0x6d101a20, + 0x286e1: 0x6cd37820, 0x286e3: 0x6c411420, + 0x286e6: 0x6c2a1a20, 0x286e7: 0x6d11b220, + 0x286eb: 0x6cb99e20, + 0x286ed: 0x6cce7220, 0x286ee: 0x6c16ae20, 0x286ef: 0x6ca05020, + 0x286f1: 0x6ca05a20, + 0x286f5: 0x6ca50620, + 0x286f8: 0x6c232220, 0x286fa: 0x6ca84e20, 0x286fb: 0x6d2f6a20, + 0x286fc: 0x6c133420, 0x286ff: 0x6cd92a20, + // Block 0xa1c, offset 0x28700 + 0x28700: 0x6ca85820, 0x28701: 0x6c22dc20, + 0x28704: 0x6c75de20, 0x28706: 0x6cce7e20, + 0x28708: 0x6d3a2420, 0x28709: 0x6c34b020, 0x2870a: 0x6c01ce20, 0x2870b: 0x6c088c20, + 0x2870e: 0x6ce41820, + 0x28710: 0x6cb06a20, 0x28711: 0x6cf9ee20, 0x28712: 0x6cc09420, 0x28713: 0x6cd14e20, + 0x28717: 0x6ce0d820, + 0x2871b: 0x6c978420, + 0x2871c: 0x6cb10420, 0x2871e: 0x6ce43420, 0x2871f: 0x6cc6cc20, + 0x28727: 0x6c237220, + 0x2872a: 0x6c5f7a20, 0x2872b: 0x6c3cc020, + 0x2872c: 0x6cf53c20, 0x2872d: 0x6c69d620, 0x2872e: 0x6c818e20, 0x2872f: 0x6d2ba620, + 0x28730: 0x6caeee20, 0x28731: 0x6c11e420, 0x28733: 0x6ca9de20, + 0x28735: 0x6c160c20, + 0x2873e: 0x6c97a420, 0x2873f: 0x6c4ba820, + // Block 0xa1d, offset 0x28740 + 0x28740: 0x6ca7d820, 0x28741: 0x6c1d0220, 0x28742: 0x6c165820, + 0x28746: 0x6ca48a20, + 0x28749: 0x6cf95c20, 0x2874a: 0x6c6f6620, 0x2874b: 0x6c613020, + 0x2874c: 0x6d323420, + 0x28751: 0x6ce6ca20, + 0x28754: 0x6c9ace20, 0x28755: 0x6d26b220, 0x28757: 0x6d37bc20, + 0x28758: 0x6cea5620, 0x28759: 0x6cc8d220, 0x2875a: 0x6d01ba20, 0x2875b: 0x6cf63420, + 0x2875d: 0x6ce6d220, 0x2875e: 0x6ca99820, + 0x28760: 0x6cee2820, 0x28761: 0x6c64ae20, 0x28763: 0x6c3b3420, + 0x28772: 0x6c0ba620, + 0x28777: 0x6d152820, + 0x2877a: 0x6c2ec420, 0x2877b: 0x6c5ef820, + 0x2877c: 0x6c41de20, 0x2877f: 0x6c64c420, + // Block 0xa1e, offset 0x28780 + 0x28780: 0x6c6ee220, + 0x28786: 0x6c763820, + 0x2878a: 0x6cc3d620, + 0x2878c: 0x6ca40420, 0x2878d: 0x6ca1de20, 0x2878e: 0x6d072220, 0x2878f: 0x6cd96a20, + 0x28790: 0x6cd0c020, 0x28791: 0x6c7bac20, 0x28792: 0x6cc3e620, 0x28793: 0x6cef2820, + 0x28797: 0x6c2eda20, + 0x28798: 0x6ca40a20, 0x2879a: 0x6cc92a20, 0x2879b: 0x6c45a220, + 0x2879c: 0x6c313220, 0x2879e: 0x6ca73020, + 0x287a1: 0x6c175020, 0x287a2: 0x6c515e20, 0x287a3: 0x6d0e9e20, + 0x287a9: 0x6ce8f020, 0x287aa: 0x6c104420, + 0x287ac: 0x6c559e20, 0x287ad: 0x6d1e5820, 0x287af: 0x6cd2d620, + 0x287b0: 0x6c1f7220, + 0x287b9: 0x6cff0e20, 0x287ba: 0x6c9ad620, 0x287bb: 0x6c852a20, + 0x287bc: 0x6ce37220, 0x287be: 0x6c64e620, + // Block 0xa1f, offset 0x287c0 + 0x287c2: 0x6d354e20, 0x287c3: 0x6c487220, + 0x287c4: 0x6c496220, 0x287c6: 0x6cb7cc20, + 0x287c8: 0x6c3a1820, 0x287c9: 0x6d229820, 0x287ca: 0x6d309620, 0x287cb: 0x6cf01c20, + 0x287cc: 0x6c35ba20, 0x287cd: 0x6c14da20, 0x287ce: 0x6cf6e020, + 0x287d0: 0x6c47d420, + 0x287d7: 0x6cc3fa20, + 0x287d8: 0x6c5c4620, 0x287da: 0x6d00f620, 0x287db: 0x6d1bf420, + 0x287dd: 0x6cdeaa20, 0x287de: 0x6cec5820, 0x287df: 0x6c3efe20, + 0x287e0: 0x6c6c0820, 0x287e1: 0x6cb0bc20, + 0x287e5: 0x6cd15020, 0x287e6: 0x6d21c620, 0x287e7: 0x6c7ace20, + 0x287e9: 0x6cb0ca20, 0x287ea: 0x6d010620, 0x287eb: 0x6caaac20, + 0x287ec: 0x6cfd2420, 0x287ed: 0x6c66ea20, 0x287ee: 0x6d074e20, + 0x287f0: 0x6c0a7e20, + 0x287f4: 0x6ca41220, 0x287f6: 0x6c897020, + 0x287f8: 0x6cb13420, + 0x287fc: 0x6c6eb820, + // Block 0xa20, offset 0x28800 + 0x28800: 0x6cde1c20, 0x28801: 0x6d0edc20, 0x28802: 0x6c00f820, + 0x28805: 0x6cff3020, 0x28806: 0x6cbaf420, 0x28807: 0x6cf48620, + 0x28808: 0x6ce15620, 0x2880a: 0x6c75f420, + 0x28810: 0x6c7e2820, + 0x28817: 0x6c813220, + 0x28819: 0x6ca5b020, + 0x2881c: 0x6c314a20, 0x2881d: 0x6cd54620, 0x2881f: 0x6c696220, + 0x28820: 0x6ca89c20, 0x28822: 0x6d21dc20, + 0x28828: 0x6c132020, 0x2882a: 0x6c696420, + 0x2882c: 0x6c57d620, 0x2882d: 0x6cf1c020, 0x2882e: 0x6d127020, 0x2882f: 0x6c35a020, + 0x28830: 0x6c49fe20, 0x28831: 0x6c572020, 0x28832: 0x6c68a620, + 0x2883a: 0x6c835820, + 0x2883c: 0x6cce2820, 0x2883d: 0x6d1e8020, 0x2883f: 0x6c2ac220, + // Block 0xa21, offset 0x28840 + 0x28840: 0x6c493820, 0x28841: 0x6ca97220, 0x28843: 0x6cdcc020, + 0x28844: 0x6cfe6c20, 0x28846: 0x6cc9b420, 0x28847: 0x6c168c20, + 0x2884e: 0x6cc90c20, + 0x28850: 0x6d277020, 0x28852: 0x6c3b4c20, 0x28853: 0x6c672420, + 0x28854: 0x6d076a20, + 0x28858: 0x6cf93020, 0x28859: 0x6cd54a20, + 0x28865: 0x6d013220, 0x28866: 0x6c87ac20, + 0x28869: 0x6ce80420, + 0x2886c: 0x6c9d1020, 0x2886d: 0x6c162020, 0x2886e: 0x6c5d6a20, + 0x28871: 0x6d3bb820, 0x28872: 0x6d273420, + 0x2887b: 0x6c801a20, + 0x2887d: 0x6d0d2c20, 0x2887e: 0x6c29a820, 0x2887f: 0x6cfe1820, + // Block 0xa22, offset 0x28880 + 0x28880: 0x6d267220, 0x28881: 0x6ce6b020, 0x28882: 0x6c07d220, 0x28883: 0x6cca4620, + 0x28884: 0x6cfc9620, 0x28885: 0x6c2e7a20, 0x28886: 0x6cb09c20, 0x28887: 0x6cb11220, + 0x28889: 0x6cde0c20, 0x2888b: 0x6c687220, + 0x2888c: 0x6d126620, 0x2888e: 0x6d271020, + 0x28890: 0x6cc61420, 0x28891: 0x6cbc1820, 0x28892: 0x6cb56220, 0x28893: 0x6c2da620, + 0x28894: 0x6cb56420, 0x28897: 0x6c4e7e20, + 0x28898: 0x6d253220, 0x28899: 0x6d1ee220, 0x2889a: 0x6c5fd020, 0x2889b: 0x6c412820, + 0x2889c: 0x6c4d0620, 0x2889d: 0x6cd30420, 0x2889f: 0x6cc0c820, + 0x288a9: 0x6cf1fa20, + 0x288ac: 0x6d321620, 0x288ad: 0x6cb2f220, 0x288ae: 0x6d0c5e20, 0x288af: 0x6c46e820, + 0x288b0: 0x6c720420, 0x288b1: 0x6ce52e20, + 0x288b7: 0x6c35d820, + 0x288ba: 0x6d0ace20, 0x288bb: 0x6c8c4620, + 0x288bc: 0x6c092620, + // Block 0xa23, offset 0x288c0 + 0x288c0: 0x6d3eea20, 0x288c1: 0x6c530820, 0x288c3: 0x6c347420, + 0x288c5: 0x6c333c20, 0x288c6: 0x6d087220, + 0x288c8: 0x6ccd3020, 0x288ca: 0x6ccd3220, 0x288cb: 0x6d10d220, + 0x288cc: 0x6cc4b020, + 0x288d4: 0x6ceaf820, 0x288d7: 0x6c0dac20, + 0x288d8: 0x6d069e20, 0x288d9: 0x6cea1a20, 0x288da: 0x6c19d220, + 0x288dc: 0x6c30fe20, 0x288dd: 0x6d171420, + 0x288e1: 0x6c180820, + 0x288f5: 0x6c731a20, 0x288f6: 0x6c5eae20, + 0x288f8: 0x6d2fae20, 0x288f9: 0x6c07de20, 0x288fb: 0x6ce4e220, + // Block 0xa24, offset 0x28900 + 0x28900: 0x6cae6420, + 0x28905: 0x6c3fda20, + 0x28916: 0x6ceb7620, + 0x28918: 0x6cfb3e20, 0x28919: 0x6ca69420, 0x2891a: 0x6c8f8620, + 0x2891d: 0x6d3d4220, 0x2891f: 0x6d32c020, + 0x28920: 0x6cd74820, 0x28921: 0x6d3f7c20, 0x28922: 0x6c3c4620, 0x28923: 0x6c32be20, + 0x28924: 0x6cb09420, 0x28925: 0x6d0d7820, 0x28926: 0x6cda1620, 0x28927: 0x6cc05820, + 0x28928: 0x6c362220, 0x28929: 0x6cb98e20, 0x2892b: 0x6cba0620, + 0x2892d: 0x6c10d420, 0x2892e: 0x6d0a8a20, + 0x28935: 0x6d3c8220, + 0x28938: 0x6c993a20, 0x28939: 0x6c68ee20, + 0x2893f: 0x6d2dea20, + // Block 0xa25, offset 0x28940 + 0x28940: 0x6caffa20, 0x28941: 0x6cf63620, 0x28942: 0x6d0e7c20, 0x28943: 0x6c3ab420, + 0x28944: 0x6ca83620, 0x28946: 0x6d364620, + 0x28948: 0x6cdd6a20, 0x2894a: 0x6d17d020, + 0x2894c: 0x6c82c620, 0x2894d: 0x6d06ea20, 0x2894f: 0x6d17d220, + 0x28952: 0x6cee9620, + 0x28955: 0x6c5ede20, 0x28956: 0x6c186e20, 0x28957: 0x6c2eba20, + 0x28963: 0x6d257020, + 0x28965: 0x6cf78020, 0x28967: 0x6c8e6220, + 0x28968: 0x6cdd6c20, + 0x28971: 0x6c07fc20, 0x28972: 0x6cfa4020, 0x28973: 0x6d0e8c20, + 0x28975: 0x6c24d020, 0x28977: 0x6c773420, + 0x2897a: 0x6cbe4e20, 0x2897b: 0x6c909a20, + 0x2897c: 0x6c087e20, + // Block 0xa26, offset 0x28980 + 0x28988: 0x6d2e6a20, 0x28989: 0x6c24ae20, 0x2898a: 0x6cf3e220, 0x2898b: 0x6d05c020, + 0x2898c: 0x6c187e20, 0x2898d: 0x6c4fd820, 0x2898e: 0x6c748820, + 0x28990: 0x6c192e20, 0x28991: 0x6c13fa20, 0x28992: 0x6c15ce20, 0x28993: 0x6d348820, + 0x28994: 0x6d0a2a20, + 0x289a3: 0x6c441a20, + 0x289a4: 0x6c18e220, 0x289a5: 0x6d132020, + 0x289aa: 0x6c1ee820, 0x289ab: 0x6cc1b820, + 0x289ac: 0x6d020620, 0x289ae: 0x6d2e7c20, 0x289af: 0x6c790820, + 0x289b1: 0x6c74ae20, + 0x289bd: 0x6cc1ba20, 0x289bf: 0x6c9b5020, + // Block 0xa27, offset 0x289c0 + 0x289c0: 0x6d134e20, 0x289c1: 0x6d406620, 0x289c2: 0x6cb45620, + 0x289c4: 0x6cd3e420, + 0x289c9: 0x6cd57220, 0x289ca: 0x6c152a20, + 0x289cd: 0x6c31c420, 0x289cf: 0x6c4c4a20, + 0x289d0: 0x6c92fe20, 0x289d1: 0x6d0c3820, + 0x289d6: 0x6ca7ba20, 0x289d7: 0x6c0d6620, + 0x289df: 0x6ce9cc20, + 0x289e6: 0x6ca6dc20, 0x289e7: 0x6c584220, + 0x289e8: 0x6cb9de20, + 0x289ef: 0x6cfa6020, + 0x289f2: 0x6c8dc620, + 0x289f7: 0x6c882820, + 0x289f9: 0x6d186e20, 0x289fb: 0x6c866620, + 0x289fc: 0x6cd8f020, 0x289ff: 0x6c279a20, + // Block 0xa28, offset 0x28a00 + 0x28a02: 0x6cf11620, + 0x28a05: 0x6c22c020, + 0x28a09: 0x6c6fbe20, 0x28a0a: 0x6c534420, + 0x28a0c: 0x6d210e20, 0x28a0e: 0x6c7c6e20, + 0x28a12: 0x6c4f8020, 0x28a13: 0x6c439620, + 0x28a14: 0x6c39e620, 0x28a17: 0x6c7c8020, + 0x28a1a: 0x6c4a6c20, 0x28a1b: 0x6c1bb020, + 0x28a1e: 0x6c6fc220, + 0x28a21: 0x6cdbce20, + 0x28a24: 0x6c2ec620, + 0x28a2c: 0x6cdc0c20, + 0x28a30: 0x6cbd8620, + 0x28a34: 0x6c4a8020, + 0x28a3b: 0x6d3c6620, + 0x28a3e: 0x6ce5de20, + // Block 0xa29, offset 0x28a40 + 0x28a41: 0x6d26d820, + 0x28a47: 0x6d419220, + 0x28a4f: 0x6cf3e820, + 0x28a50: 0x6c250820, + 0x28a5b: 0x6d36d220, + 0x28a60: 0x6cd72e20, 0x28a62: 0x6c301420, + 0x28a6d: 0x6cef3c20, + 0x28a7f: 0x6c1d4220, + // Block 0xa2a, offset 0x28a80 + 0x28a8b: 0x6cc8f420, + 0x28a96: 0x6c60d420, + 0x28a9c: 0x6c2de820, 0x28a9e: 0x6c124020, + 0x28aa0: 0x6c7a0c20, 0x28aa3: 0x6cef5420, + 0x28aa7: 0x6c11bc20, + 0x28aaa: 0x6c968020, 0x28aab: 0x6caba820, + 0x28ab2: 0x6cca3820, + 0x28ab6: 0x6cef6620, + 0x28abc: 0x6cca3e20, 0x28abf: 0x6c6c7020, + // Block 0xa2b, offset 0x28ac0 + 0x28acc: 0x6cef6e20, + 0x28ade: 0x6c115420, 0x28adf: 0x6c84d020, + 0x28aef: 0x6d273a20, + 0x28af4: 0x6d277220, 0x28af7: 0x6c196420, + 0x28afa: 0x6ccce420, + // Block 0xa2c, offset 0x28b00 + 0x28b02: 0x6c54d620, 0x28b03: 0x6ccc9e20, + 0x28b04: 0x6cea5820, 0x28b06: 0x6c3d3020, + 0x28b08: 0x6cbe1820, 0x28b09: 0x6d05ac20, + 0x28b0d: 0x6c1fe620, 0x28b0e: 0x6c400420, + 0x28b12: 0x6d181220, 0x28b13: 0x6c300c20, + 0x28b14: 0x6c3eb420, 0x28b15: 0x6c3eb620, 0x28b16: 0x6d2ad620, 0x28b17: 0x6cb4ae20, + 0x28b19: 0x6c8d2c20, + 0x28b1d: 0x6ccca020, 0x28b1e: 0x6cad9420, + 0x28b22: 0x6d1a8a20, 0x28b23: 0x6c961e20, + 0x28b24: 0x6c57b620, 0x28b25: 0x6d1b6e20, 0x28b26: 0x6c084a20, 0x28b27: 0x6d209820, + 0x28b28: 0x6ccf7020, 0x28b2a: 0x6d01f220, 0x28b2b: 0x6c1ee620, + 0x28b34: 0x6ccf7220, 0x28b35: 0x6c2d7220, + 0x28b39: 0x6d187020, 0x28b3b: 0x6c183a20, + 0x28b3c: 0x6c451c20, 0x28b3d: 0x6c8fa820, 0x28b3e: 0x6cb2ca20, 0x28b3f: 0x6d280220, + // Block 0xa2d, offset 0x28b40 + 0x28b40: 0x6d0eae20, 0x28b41: 0x6ca15a20, 0x28b43: 0x6cdbd820, + 0x28b4b: 0x6c6ea420, + 0x28b4d: 0x6cd99c20, 0x28b4e: 0x6cad0c20, + 0x28b50: 0x6d0b3820, 0x28b51: 0x6ccb5020, 0x28b52: 0x6c34b820, + 0x28b55: 0x6c207a20, 0x28b56: 0x6d022420, + 0x28b58: 0x6ce95a20, 0x28b59: 0x6c45b420, 0x28b5a: 0x6d08b620, + 0x28b5c: 0x6c7e4e20, 0x28b5e: 0x6c8d5e20, + 0x28b60: 0x6c279020, 0x28b61: 0x6d2c5220, + 0x28b6c: 0x6d1a0a20, 0x28b6d: 0x6cd93c20, 0x28b6f: 0x6d229a20, + 0x28b70: 0x6ceb4c20, 0x28b71: 0x6ceb4e20, + 0x28b74: 0x6c03c420, 0x28b75: 0x6cc4d620, 0x28b76: 0x6c0f8420, 0x28b77: 0x6c279c20, + 0x28b79: 0x6d2c5a20, 0x28b7a: 0x6c543a20, + 0x28b7e: 0x6c5b7820, + // Block 0xa2e, offset 0x28b80 + 0x28b85: 0x6c916020, + 0x28b8a: 0x6c8e2820, 0x28b8b: 0x6cc7d620, + 0x28b95: 0x6c28d220, 0x28b96: 0x6c9b6620, 0x28b97: 0x6cfa5820, + 0x28b98: 0x6cf26220, 0x28b99: 0x6c4e4620, 0x28b9a: 0x6d3eb020, 0x28b9b: 0x6d327420, + 0x28b9c: 0x6ccb7c20, 0x28b9d: 0x6c25fa20, 0x28b9e: 0x6c86e420, + 0x28ba0: 0x6c2ce220, 0x28ba1: 0x6c887e20, 0x28ba2: 0x6c46e020, + 0x28ba6: 0x6caee020, + 0x28baa: 0x6d1c0a20, + 0x28bac: 0x6c548420, 0x28bae: 0x6c336c20, 0x28baf: 0x6cf53e20, + 0x28bb7: 0x6cb1be20, + 0x28bb8: 0x6c520020, 0x28bba: 0x6c8fb820, 0x28bbb: 0x6ca18420, + 0x28bbc: 0x6c3a7620, 0x28bbd: 0x6c93be20, 0x28bbe: 0x6d2b2020, 0x28bbf: 0x6c0fae20, + // Block 0xa2f, offset 0x28bc0 + 0x28bc0: 0x6c2d9620, 0x28bc1: 0x6c98aa20, 0x28bc3: 0x6d3c4e20, + 0x28bc4: 0x6c932220, 0x28bc5: 0x6cace820, 0x28bc6: 0x6c337c20, 0x28bc7: 0x6c10ce20, + 0x28bcc: 0x6c189020, 0x28bcd: 0x6c981220, + 0x28bd6: 0x6cf72420, + 0x28bdd: 0x6c019a20, 0x28bde: 0x6d37dc20, + 0x28be0: 0x6ca44a20, 0x28be1: 0x6cebba20, 0x28be2: 0x6c519c20, + 0x28be5: 0x6c338220, 0x28be6: 0x6ceca020, 0x28be7: 0x6d37de20, + 0x28be8: 0x6c133e20, 0x28be9: 0x6c873620, 0x28bea: 0x6cd6aa20, + 0x28bee: 0x6c134020, + 0x28bf0: 0x6cd84a20, 0x28bf2: 0x6c338420, + 0x28bf4: 0x6c5cdc20, + 0x28bfc: 0x6c654220, 0x28bfd: 0x6ca9e220, 0x28bfe: 0x6c28ea20, 0x28bff: 0x6c409820, + // Block 0xa30, offset 0x28c00 + 0x28c00: 0x6c5e4e20, 0x28c01: 0x6c5c9620, 0x28c02: 0x6c228420, + 0x28c04: 0x6d1e6620, 0x28c05: 0x6cc9b620, 0x28c06: 0x6ce6a420, + 0x28c0e: 0x6c8f5a20, + 0x28c11: 0x6cdb8c20, 0x28c12: 0x6c8da220, 0x28c13: 0x6c97a620, + 0x28c14: 0x6c2d9c20, + 0x28c18: 0x6cad4020, 0x28c1a: 0x6c8da420, + 0x28c1d: 0x6c878620, 0x28c1f: 0x6caa1020, + 0x28c23: 0x6c8b7820, + 0x28c24: 0x6ccd6220, 0x28c26: 0x6c3afe20, + 0x28c2b: 0x6ccd6420, + 0x28c2e: 0x6c8db820, 0x28c2f: 0x6d2eaa20, + 0x28c31: 0x6c0d7820, 0x28c32: 0x6c84dc20, + 0x28c35: 0x6cd86420, 0x28c36: 0x6cc4fc20, 0x28c37: 0x6c655820, + 0x28c38: 0x6d3df020, 0x28c3b: 0x6c8dbe20, + 0x28c3c: 0x6c8dc020, 0x28c3d: 0x6c9c2420, 0x28c3f: 0x6cd6c820, + // Block 0xa31, offset 0x28c40 + 0x28c44: 0x6c8dc820, 0x28c47: 0x6c5d5020, + 0x28c4e: 0x6c8dee20, 0x28c4f: 0x6c655e20, + 0x28c50: 0x6cc23a20, + 0x28c54: 0x6ca9ea20, 0x28c55: 0x6c6e7c20, 0x28c56: 0x6c187020, + 0x28c5c: 0x6d318820, 0x28c5d: 0x6cbede20, 0x28c5f: 0x6cbee220, + 0x28c60: 0x6c36c820, 0x28c63: 0x6ccb9420, + 0x28c69: 0x6c071a20, 0x28c6b: 0x6c3a0020, + 0x28c6e: 0x6c3ab620, 0x28c6f: 0x6c3a3820, + 0x28c74: 0x6c399820, 0x28c75: 0x6c7a7c20, + 0x28c7a: 0x6d28c620, 0x28c7b: 0x6c5c2220, + 0x28c7d: 0x6c3a4420, + // Block 0xa32, offset 0x28c80 + 0x28c81: 0x6c338620, + 0x28c86: 0x6cabca20, 0x28c87: 0x6ca99c20, + 0x28c88: 0x6cad2e20, 0x28c89: 0x6c289820, 0x28c8a: 0x6c27e820, 0x28c8b: 0x6c00b220, + 0x28c8d: 0x6ce50e20, 0x28c8e: 0x6c17a420, 0x28c8f: 0x6c02ac20, + 0x28c90: 0x6c9aa020, 0x28c91: 0x6ca43420, + 0x28c94: 0x6c0ff420, 0x28c95: 0x6d23b420, 0x28c96: 0x6cfac420, 0x28c97: 0x6c973a20, + 0x28c9a: 0x6cb26420, + 0x28c9c: 0x6c331020, 0x28c9e: 0x6c2a3020, + 0x28ca1: 0x6d043a20, 0x28ca2: 0x6ca6ce20, 0x28ca3: 0x6c4dba20, + 0x28ca4: 0x6c1f7a20, 0x28ca5: 0x6cd64a20, 0x28ca6: 0x6c97cc20, + 0x28cac: 0x6ceda420, 0x28cad: 0x6d18dc20, 0x28cae: 0x6c2e4820, 0x28caf: 0x6d0c3a20, + 0x28cb1: 0x6cf32420, 0x28cb2: 0x6cdba220, + 0x28cb4: 0x6c019420, 0x28cb5: 0x6c7fd420, 0x28cb6: 0x6ca43e20, + 0x28cb8: 0x6cc0b620, 0x28cb9: 0x6c9e6820, 0x28cba: 0x6caae420, 0x28cbb: 0x6c11c020, + 0x28cbc: 0x6c11e620, + // Block 0xa33, offset 0x28cc0 + 0x28cc0: 0x6c808620, 0x28cc1: 0x6ce52a20, 0x28cc2: 0x6d139220, + 0x28cc4: 0x6ca74e20, 0x28cc6: 0x6cd64e20, + 0x28ccb: 0x6c228620, + 0x28ccd: 0x6c663a20, + 0x28cd0: 0x6c424020, + 0x28cd4: 0x6c673220, 0x28cd5: 0x6c4caa20, 0x28cd7: 0x6d2dd620, + 0x28cd9: 0x6c95dc20, + 0x28cdc: 0x6c5ebc20, 0x28cdd: 0x6c4b5220, + 0x28ce1: 0x6c63d220, 0x28ce2: 0x6c614a20, + 0x28ce5: 0x6d08a020, 0x28ce7: 0x6c3c5a20, + 0x28ceb: 0x6c09ea20, + 0x28cec: 0x6cb60a20, 0x28cef: 0x6d258e20, + 0x28cf0: 0x6c021a20, 0x28cf1: 0x6c2b3820, + 0x28cf4: 0x6c366820, 0x28cf5: 0x6c3b7e20, + 0x28cf8: 0x6c727020, 0x28cf9: 0x6ca64220, 0x28cfa: 0x6ceb3c20, + 0x28cfc: 0x6cd00c20, 0x28cfd: 0x6c3eca20, 0x28cfe: 0x6cf9e420, 0x28cff: 0x6cc1ac20, + // Block 0xa34, offset 0x28d00 + 0x28d00: 0x6cb39a20, 0x28d01: 0x6ced4220, 0x28d02: 0x6c8d4220, 0x28d03: 0x6c96d220, + 0x28d04: 0x6d394020, 0x28d05: 0x6c065c20, 0x28d07: 0x6d23b620, + 0x28d0c: 0x6c082a20, 0x28d0d: 0x6c973c20, 0x28d0f: 0x6c637a20, + 0x28d11: 0x6d102e20, 0x28d13: 0x6c7ade20, + 0x28d14: 0x6c69c020, 0x28d16: 0x6c0df220, + 0x28d1a: 0x6c962420, 0x28d1b: 0x6c4b1820, + 0x28d1c: 0x6c351420, 0x28d1d: 0x6d36d420, + 0x28d21: 0x6d326020, 0x28d22: 0x6c369e20, 0x28d23: 0x6d39ca20, + 0x28d24: 0x6c039020, + 0x28d28: 0x6d326220, 0x28d29: 0x6c3c6820, 0x28d2a: 0x6c313820, 0x28d2b: 0x6ca73c20, + 0x28d2c: 0x6c10bc20, 0x28d2d: 0x6c336020, 0x28d2e: 0x6ccc1c20, 0x28d2f: 0x6ccb6820, + 0x28d30: 0x6c0a6220, + 0x28d34: 0x6d36f420, 0x28d35: 0x6d309820, 0x28d36: 0x6c10be20, + 0x28d3a: 0x6c74c420, 0x28d3b: 0x6d0aa820, + 0x28d3f: 0x6cf90020, + // Block 0xa35, offset 0x28d40 + 0x28d41: 0x6d3db820, 0x28d42: 0x6c045a20, 0x28d43: 0x6d115c20, + 0x28d44: 0x6c1e3420, 0x28d45: 0x6cdeb620, 0x28d46: 0x6cb93020, + 0x28d48: 0x6ca53820, 0x28d49: 0x6d242020, 0x28d4a: 0x6c36bc20, 0x28d4b: 0x6c650820, + 0x28d4c: 0x6d18de20, 0x28d4d: 0x6cff2a20, 0x28d4f: 0x6ca88020, + 0x28d52: 0x6c0db620, + 0x28d57: 0x6c4cd420, + 0x28d58: 0x6d010820, 0x28d59: 0x6c2e4a20, + 0x28d5c: 0x6c70d620, 0x28d5d: 0x6cdda420, 0x28d5e: 0x6c2ef420, 0x28d5f: 0x6c3f1420, + 0x28d60: 0x6c9e4420, 0x28d61: 0x6cd3fa20, 0x28d62: 0x6d08c420, 0x28d63: 0x6ce39c20, + 0x28d64: 0x6d244420, 0x28d67: 0x6d011820, + 0x28d68: 0x6c3f1620, 0x28d69: 0x6d373420, 0x28d6a: 0x6ca65a20, 0x28d6b: 0x6d08c620, + 0x28d6c: 0x6d0fe820, 0x28d6e: 0x6c3cd020, 0x28d6f: 0x6d403c20, + 0x28d70: 0x6d395e20, 0x28d71: 0x6d07de20, + 0x28d75: 0x6d39d820, 0x28d77: 0x6c7edc20, + 0x28d79: 0x6d1d5820, 0x28d7a: 0x6c435c20, 0x28d7b: 0x6c7e2c20, + 0x28d7d: 0x6c358820, 0x28d7e: 0x6cef5620, 0x28d7f: 0x6c9a3620, + // Block 0xa36, offset 0x28d80 + 0x28d83: 0x6c57fe20, + 0x28d84: 0x6c1e3820, 0x28d86: 0x6cddb220, 0x28d87: 0x6cdec820, + 0x28d88: 0x6cddb420, 0x28d89: 0x6cdeca20, 0x28d8a: 0x6d097a20, + 0x28d8c: 0x6c460820, 0x28d8d: 0x6c643220, 0x28d8f: 0x6c0fb020, + 0x28d90: 0x6cdecc20, 0x28d91: 0x6d25f620, + 0x28d98: 0x6cdece20, + 0x28d9d: 0x6c20ec20, + 0x28da0: 0x6d047820, 0x28da1: 0x6c519820, 0x28da2: 0x6cdd4820, + 0x28da7: 0x6ca18a20, + 0x28da8: 0x6c1d2c20, 0x28da9: 0x6cdbe420, 0x28daa: 0x6d2b2220, 0x28dab: 0x6c933220, + 0x28dac: 0x6d2eea20, 0x28dad: 0x6c963c20, 0x28dae: 0x6d075820, 0x28daf: 0x6c653a20, + 0x28db0: 0x6ccd2220, 0x28db2: 0x6d075a20, + 0x28dbe: 0x6c67cc20, + // Block 0xa37, offset 0x28dc0 + 0x28dc2: 0x6c067c20, 0x28dc3: 0x6c970c20, + 0x28dc5: 0x6ce7a020, 0x28dc6: 0x6cf92c20, + 0x28dc9: 0x6cc6e620, 0x28dcb: 0x6cd12a20, + 0x28dcc: 0x6d396c20, 0x28dce: 0x6c654420, 0x28dcf: 0x6c409a20, + 0x28dd0: 0x6c2afa20, 0x28dd3: 0x6d1de220, + 0x28dd4: 0x6c70e420, 0x28dd6: 0x6d195e20, 0x28dd7: 0x6c054820, + 0x28dd9: 0x6ccb9620, 0x28dda: 0x6cdcc620, + 0x28ddc: 0x6c346e20, 0x28ddd: 0x6d028420, + 0x28de1: 0x6c58c820, + 0x28de5: 0x6cc80c20, 0x28de6: 0x6ca66c20, 0x28de7: 0x6d397020, + 0x28de8: 0x6c4bac20, 0x28dea: 0x6c964820, + 0x28df2: 0x6d342e20, 0x28df3: 0x6d076c20, + 0x28df5: 0x6d343020, 0x28df7: 0x6c752a20, + 0x28df8: 0x6c70e820, 0x28dfb: 0x6d25da20, + 0x28dfc: 0x6c91a420, 0x28dff: 0x6c0fda20, + // Block 0xa38, offset 0x28e00 + 0x28e02: 0x6cc6ea20, 0x28e03: 0x6d029620, + 0x28e09: 0x6cf83220, 0x28e0a: 0x6c959a20, + 0x28e0e: 0x6c447020, + 0x28e11: 0x6d414620, 0x28e12: 0x6c4eca20, + 0x28e14: 0x6c685620, 0x28e15: 0x6cc95420, 0x28e16: 0x6cbd8a20, 0x28e17: 0x6cc43c20, + 0x28e18: 0x6cad6420, 0x28e19: 0x6d26da20, 0x28e1a: 0x6c182c20, 0x28e1b: 0x6c3ece20, + 0x28e1c: 0x6cadc020, 0x28e1f: 0x6c9aa420, + 0x28e22: 0x6ce1de20, + 0x28e24: 0x6c78f020, 0x28e25: 0x6cf8d420, + 0x28e2b: 0x6c351620, + 0x28e2d: 0x6d187220, + 0x28e30: 0x6cdc7e20, 0x28e32: 0x6cf9f820, 0x28e33: 0x6c730420, + 0x28e35: 0x6cef3e20, 0x28e37: 0x6d18ba20, + 0x28e39: 0x6d242220, 0x28e3b: 0x6c045c20, + 0x28e3c: 0x6ceb5820, 0x28e3d: 0x6cdeb820, 0x28e3e: 0x6cad6e20, + // Block 0xa39, offset 0x28e40 + 0x28e42: 0x6c0dfc20, + 0x28e45: 0x6d286820, 0x28e46: 0x6d286a20, 0x28e47: 0x6c32e220, + 0x28e48: 0x6cc88620, 0x28e49: 0x6cef5820, + 0x28e4f: 0x6cf05020, + 0x28e50: 0x6c4b9820, 0x28e52: 0x6c26d420, 0x28e53: 0x6cfa1420, + 0x28e56: 0x6c5d4a20, 0x28e57: 0x6c733220, + 0x28e58: 0x6cdbe620, 0x28e5a: 0x6cdcbc20, + 0x28e5d: 0x6c90d620, 0x28e5e: 0x6c046420, 0x28e5f: 0x6d246e20, + 0x28e60: 0x6d337420, 0x28e61: 0x6c4ba620, 0x28e63: 0x6c7c5820, + 0x28e64: 0x6c42f220, 0x28e65: 0x6c281620, + 0x28e69: 0x6cfc5a20, 0x28e6a: 0x6d2d2420, 0x28e6b: 0x6ccb9820, + 0x28e6d: 0x6c784620, 0x28e6e: 0x6c105020, 0x28e6f: 0x6c0fce20, + 0x28e72: 0x6cdcc820, + 0x28e74: 0x6d249420, 0x28e75: 0x6c105220, 0x28e76: 0x6c6f9220, 0x28e77: 0x6c6f9420, + 0x28e79: 0x6c73aa20, 0x28e7a: 0x6c754220, + 0x28e7c: 0x6ca31620, 0x28e7d: 0x6d2d1c20, 0x28e7e: 0x6ce1ba20, 0x28e7f: 0x6cefec20, + // Block 0xa3a, offset 0x28e80 + 0x28e80: 0x6cf9dc20, 0x28e81: 0x6d01cc20, + 0x28e85: 0x6cc9a620, 0x28e86: 0x6c5f6620, + 0x28e89: 0x6d026a20, + 0x28e8c: 0x6c338c20, 0x28e8d: 0x6d3f2620, + 0x28e98: 0x6d25ee20, 0x28e99: 0x6cbe1e20, 0x28e9a: 0x6c3ed020, 0x28e9b: 0x6caeba20, + 0x28e9c: 0x6cad6620, 0x28e9e: 0x6d1b7620, + 0x28ea0: 0x6c52c220, 0x28ea1: 0x6d40d420, 0x28ea3: 0x6c45a820, + 0x28ea4: 0x6c308820, 0x28ea5: 0x6c50a820, 0x28ea6: 0x6cf31020, + 0x28ea8: 0x6cace220, 0x28eab: 0x6cdb2820, + 0x28eac: 0x6c76f020, 0x28ead: 0x6ca88220, 0x28eae: 0x6c4ffa20, 0x28eaf: 0x6c3cfa20, + 0x28eb0: 0x6c36be20, 0x28eb1: 0x6d137620, + 0x28eb4: 0x6ce69820, 0x28eb5: 0x6c309420, 0x28eb6: 0x6d30ba20, 0x28eb7: 0x6cca7820, + 0x28ebb: 0x6ca18c20, + 0x28ebc: 0x6cdb6020, 0x28ebe: 0x6c823220, + // Block 0xa3b, offset 0x28ec0 + 0x28ec0: 0x6cb4a620, 0x28ec1: 0x6c35a620, 0x28ec2: 0x6d3de220, 0x28ec3: 0x6d139820, + 0x28ec7: 0x6cfda220, + 0x28ec8: 0x6c4a2c20, 0x28ec9: 0x6cc59e20, 0x28eca: 0x6c8dfe20, + 0x28ecd: 0x6c02cc20, + 0x28ed0: 0x6c146820, 0x28ed2: 0x6c345620, 0x28ed3: 0x6cbf3620, + 0x28ed4: 0x6c7a4620, 0x28ed5: 0x6d05b020, 0x28ed6: 0x6c587c20, 0x28ed7: 0x6d10aa20, + 0x28ed8: 0x6d324620, 0x28ed9: 0x6ce6da20, 0x28eda: 0x6c082420, + 0x28edd: 0x6c020220, 0x28edf: 0x6c76b420, + 0x28ee1: 0x6c7a4c20, 0x28ee2: 0x6cadde20, 0x28ee3: 0x6d205220, + 0x28ee4: 0x6c02aa20, 0x28ee5: 0x6c9ad020, 0x28ee6: 0x6ca13620, + 0x28eec: 0x6c3f7220, 0x28eed: 0x6cbe5020, 0x28eee: 0x6c7e8220, 0x28eef: 0x6c30f220, + 0x28ef0: 0x6ce06c20, 0x28ef3: 0x6cba1c20, + 0x28ef4: 0x6d121c20, 0x28ef5: 0x6cf0b620, 0x28ef6: 0x6c558c20, 0x28ef7: 0x6ca14620, + 0x28ef8: 0x6c50a620, 0x28ef9: 0x6d08ac20, 0x28efb: 0x6c0a1220, + 0x28efc: 0x6cb31a20, 0x28efe: 0x6c2b3c20, + // Block 0xa3c, offset 0x28f00 + 0x28f00: 0x6d31f020, 0x28f02: 0x6cd1e420, 0x28f03: 0x6c76e420, + 0x28f04: 0x6c130c20, 0x28f07: 0x6d05c420, + 0x28f08: 0x6d31f220, 0x28f0a: 0x6d3a7820, + 0x28f0f: 0x6c5c2420, + 0x28f10: 0x6c1bc020, 0x28f13: 0x6c53aa20, + 0x28f14: 0x6caa0420, 0x28f15: 0x6ca86a20, 0x28f16: 0x6d0eb020, + 0x28f18: 0x6c1d4020, 0x28f19: 0x6c3f8620, 0x28f1a: 0x6c49f420, 0x28f1b: 0x6cb52c20, + 0x28f1d: 0x6c44a220, 0x28f1e: 0x6ce6e020, + 0x28f22: 0x6ce07220, 0x28f23: 0x6cba2020, + 0x28f26: 0x6c702020, 0x28f27: 0x6d05e220, + 0x28f28: 0x6cb71620, 0x28f2a: 0x6d326420, + 0x28f2e: 0x6cc09c20, + 0x28f30: 0x6c35bc20, 0x28f33: 0x6c5c4c20, + 0x28f34: 0x6c53d820, 0x28f35: 0x6cbeb420, 0x28f37: 0x6c17e020, + 0x28f3a: 0x6c405c20, + 0x28f3c: 0x6c52ce20, 0x28f3d: 0x6cf6e220, 0x28f3e: 0x6cf3ee20, 0x28f3f: 0x6c987820, + // Block 0xa3d, offset 0x28f40 + 0x28f42: 0x6ce2fc20, + 0x28f45: 0x6c52d020, + 0x28f50: 0x6c0f6a20, 0x28f52: 0x6cbde820, 0x28f53: 0x6c44a420, + 0x28f56: 0x6c3f0020, 0x28f57: 0x6c7cde20, + 0x28f5d: 0x6c0cfe20, 0x28f5e: 0x6c6eba20, 0x28f5f: 0x6c76f220, + 0x28f60: 0x6c4a9020, 0x28f62: 0x6c432820, 0x28f63: 0x6d05f420, + 0x28f64: 0x6c01d420, 0x28f65: 0x6d26f420, 0x28f66: 0x6cf53420, 0x28f67: 0x6d157a20, + 0x28f68: 0x6c6dda20, 0x28f6a: 0x6c930220, 0x28f6b: 0x6cc31c20, + 0x28f6c: 0x6ce9c820, 0x28f6e: 0x6c62a420, + 0x28f7a: 0x6c6f3420, 0x28f7b: 0x6c74d420, + 0x28f7c: 0x6cb1d620, 0x28f7d: 0x6c7d8a20, + // Block 0xa3e, offset 0x28f80 + 0x28f80: 0x6cec7420, 0x28f81: 0x6c5c7620, 0x28f82: 0x6c341220, 0x28f83: 0x6d25f420, + 0x28f84: 0x6c6b6a20, 0x28f86: 0x6c4b9020, 0x28f87: 0x6c432e20, + 0x28f88: 0x6cb3b220, 0x28f89: 0x6c9ade20, 0x28f8a: 0x6d3bf020, 0x28f8b: 0x6c4f9c20, + 0x28f94: 0x6d1e0420, 0x28f95: 0x6cc0a420, 0x28f97: 0x6c834e20, + 0x28f98: 0x6c020620, 0x28f99: 0x6cb08020, 0x28f9a: 0x6cf24220, + 0x28f9d: 0x6cbe2a20, 0x28f9f: 0x6cbdee20, + 0x28fa0: 0x6c9f0620, 0x28fa1: 0x6c30d020, 0x28fa2: 0x6c9c9420, 0x28fa3: 0x6d2db820, + 0x28fa5: 0x6cbec020, 0x28fa6: 0x6d158c20, + 0x28fae: 0x6c04aa20, + 0x28fb1: 0x6c730a20, 0x28fb3: 0x6d2b2420, + 0x28fb4: 0x6d075c20, 0x28fb5: 0x6c7ff420, 0x28fb6: 0x6c968220, 0x28fb7: 0x6c968420, + 0x28fb8: 0x6cab6220, 0x28fb9: 0x6c06c020, 0x28fbb: 0x6cb3e820, + 0x28fbc: 0x6d075e20, + // Block 0xa3f, offset 0x28fc0 + 0x28fc0: 0x6c02fe20, + 0x28fc6: 0x6c53ae20, + 0x28fc9: 0x6c53b020, 0x28fca: 0x6d2e3c20, + 0x28fcc: 0x6ccbb620, 0x28fcd: 0x6c433020, 0x28fcf: 0x6cb34420, + 0x28fd0: 0x6c8aae20, + 0x28fd5: 0x6cec7a20, 0x28fd6: 0x6d07f420, + 0x28fdc: 0x6c7cb820, 0x28fdf: 0x6c36ea20, + 0x28fe0: 0x6c4f3e20, 0x28fe1: 0x6ccb9a20, + 0x28fe4: 0x6c28ee20, + 0x28fea: 0x6d07f620, + 0x28fec: 0x6c36f420, 0x28fed: 0x6c415a20, 0x28fef: 0x6c29c820, + 0x28ff1: 0x6c9bfa20, 0x28ff2: 0x6d143e20, 0x28ff3: 0x6ca94e20, + 0x28ff5: 0x6cb23020, + 0x28ff9: 0x6c124620, + 0x28ffe: 0x6d263c20, + // Block 0xa40, offset 0x29000 + 0x29000: 0x6c36fc20, 0x29001: 0x6ca8ca20, + 0x29004: 0x6d1b2e20, 0x29007: 0x6cbbca20, + 0x29009: 0x6c52e220, 0x2900a: 0x6c8dca20, + 0x2900c: 0x6c14e820, 0x2900d: 0x6d1d3020, + 0x29012: 0x6c494820, + 0x29014: 0x6ca7ca20, 0x29015: 0x6d05c620, 0x29016: 0x6cdff820, 0x29017: 0x6c6d6e20, + 0x2901b: 0x6caea620, + 0x2901d: 0x6c89e820, + 0x29020: 0x6c072c20, 0x29023: 0x6d030020, + 0x29024: 0x6cea6020, 0x29025: 0x6c174e20, 0x29026: 0x6c41a420, + 0x29028: 0x6c54e020, 0x29029: 0x6cee2e20, + 0x2902c: 0x6c3eba20, 0x2902d: 0x6cae2220, 0x2902f: 0x6ca4b620, + 0x29030: 0x6d0a1820, 0x29031: 0x6d096c20, + 0x29034: 0x6c8f1220, 0x29035: 0x6c8d4420, 0x29036: 0x6d097020, 0x29037: 0x6cc12e20, + 0x29038: 0x6c4fda20, 0x29039: 0x6d153c20, 0x2903a: 0x6c4ef420, + 0x2903c: 0x6c3ed220, 0x2903d: 0x6c038a20, 0x2903e: 0x6d153e20, + // Block 0xa41, offset 0x29040 + 0x29040: 0x6c0f3820, + 0x29044: 0x6c52c420, 0x29045: 0x6c866a20, + 0x29049: 0x6cc98820, 0x2904a: 0x6cf6b220, + 0x2904e: 0x6cd3ce20, 0x2904f: 0x6cb15e20, + 0x29050: 0x6c57c220, 0x29051: 0x6d155220, 0x29052: 0x6c0f5220, 0x29053: 0x6c0f6c20, + 0x29054: 0x6ca57620, 0x29055: 0x6cc09e20, + 0x29058: 0x6cf01e20, 0x29059: 0x6c184a20, 0x2905a: 0x6d1f7820, + 0x2905c: 0x6cf0dc20, 0x2905d: 0x6c5b6820, 0x2905e: 0x6cc99a20, + 0x29062: 0x6c53da20, 0x29063: 0x6cd9e820, + 0x29064: 0x6c4f1220, 0x29065: 0x6cad6a20, 0x29067: 0x6c39b020, + 0x29069: 0x6c8eae20, 0x2906a: 0x6d395a20, 0x2906b: 0x6cb02a20, + 0x2906d: 0x6c86b620, + 0x29070: 0x6c20e820, 0x29071: 0x6cf6fc20, 0x29072: 0x6d330220, + 0x29074: 0x6c085620, 0x29075: 0x6d333420, 0x29076: 0x6cdc9620, 0x29077: 0x6d0de420, + 0x2907c: 0x6cbe5a20, 0x2907d: 0x6cf53620, 0x2907e: 0x6c89a620, + // Block 0xa42, offset 0x29080 + 0x29080: 0x6d2fe420, 0x29081: 0x6c897220, + 0x29085: 0x6c6a3c20, 0x29087: 0x6c52da20, + 0x29088: 0x6d1ec020, 0x2908a: 0x6c7ea220, 0x2908b: 0x6c548620, + 0x2908d: 0x6d263620, 0x2908e: 0x6c539620, 0x2908f: 0x6d137820, + 0x29091: 0x6d1d1c20, 0x29092: 0x6d086020, 0x29093: 0x6d1f8620, + 0x29098: 0x6cc32020, + 0x2909c: 0x6ce15e20, 0x2909d: 0x6cddb620, 0x2909f: 0x6c871020, + 0x290a0: 0x6cd9fc20, 0x290a1: 0x6c871220, + 0x290a4: 0x6d245420, 0x290a7: 0x6d192020, + 0x290ad: 0x6d051220, 0x290ae: 0x6c028620, 0x290af: 0x6ce97420, + 0x290b0: 0x6cdb6220, 0x290b1: 0x6cd67a20, 0x290b3: 0x6d247020, + 0x290b5: 0x6c3c7a20, + 0x290b9: 0x6cdb6620, 0x290ba: 0x6ce9da20, 0x290bb: 0x6d247220, + 0x290bc: 0x6d331020, 0x290bd: 0x6d331220, 0x290bf: 0x6ce25420, + // Block 0xa43, offset 0x290c0 + 0x290c4: 0x6c8ee020, 0x290c6: 0x6c1a5c20, 0x290c7: 0x6cdc0620, + 0x290c8: 0x6ccad820, + 0x290cf: 0x6c47f420, + 0x290d0: 0x6c3c8a20, 0x290d1: 0x6c8b8420, 0x290d2: 0x6cb17a20, + 0x290d6: 0x6c87b620, + 0x290d8: 0x6c901820, 0x290d9: 0x6c1e7020, 0x290da: 0x6cff6220, 0x290db: 0x6c52e420, + 0x290dc: 0x6d029820, 0x290dd: 0x6ccf9420, + 0x290e0: 0x6c902620, 0x290e1: 0x6c53ea20, 0x290e2: 0x6d083e20, 0x290e3: 0x6c3c9620, + 0x290e5: 0x6c037420, 0x290e6: 0x6c0ecc20, 0x290e7: 0x6ce22620, + 0x290e8: 0x6cdabc20, 0x290e9: 0x6d2fb820, 0x290ea: 0x6c0c0220, 0x290eb: 0x6cd9c420, + 0x290ec: 0x6ce9aa20, 0x290ed: 0x6cdd8820, 0x290ee: 0x6cfefa20, 0x290ef: 0x6c527220, + 0x290f0: 0x6ccac620, 0x290f2: 0x6c3a1020, + 0x290f7: 0x6ca9aa20, + 0x290f8: 0x6c98ac20, + 0x290fd: 0x6c58ca20, 0x290fe: 0x6d343420, + // Block 0xa44, offset 0x29100 + 0x29102: 0x6d171620, + 0x29104: 0x6d22fe20, 0x29107: 0x6d14f020, + 0x29108: 0x6d264e20, 0x29109: 0x6c1b2220, + 0x29115: 0x6d1aea20, 0x29116: 0x6ca9a620, 0x29117: 0x6cc71420, + 0x2911b: 0x6ca34a20, + 0x29123: 0x6ce4a620, + 0x29125: 0x6c035020, + 0x2912a: 0x6c379c20, 0x2912b: 0x6d32dc20, + 0x2912c: 0x6c366a20, 0x2912d: 0x6cb3dc20, 0x2912e: 0x6c5efa20, 0x2912f: 0x6ca5f620, + 0x29131: 0x6c6f2020, 0x29132: 0x6c63d420, + 0x29135: 0x6c41a620, + 0x29139: 0x6c8d2e20, 0x2913b: 0x6d41bc20, + 0x2913e: 0x6c073820, + // Block 0xa45, offset 0x29140 + 0x29145: 0x6cd4f220, 0x29146: 0x6d15fc20, 0x29147: 0x6cabf420, + 0x2914b: 0x6ca50e20, + 0x2914c: 0x6cd3c020, 0x2914e: 0x6c97c620, 0x2914f: 0x6cd3c220, + 0x29151: 0x6ce35e20, + 0x29158: 0x6c45a420, + 0x2915d: 0x6c834420, 0x2915e: 0x6c061020, 0x2915f: 0x6d251020, + 0x29160: 0x6d422820, 0x29161: 0x6c80e620, 0x29162: 0x6d04f220, + 0x29165: 0x6d294220, 0x29166: 0x6c1a8620, 0x29167: 0x6c64e820, + 0x29168: 0x6c99b420, 0x29169: 0x6c63e220, 0x2916a: 0x6d23de20, + 0x2916d: 0x6d23e020, 0x2916e: 0x6d155420, + 0x29172: 0x6c982020, 0x29173: 0x6d294420, + 0x29175: 0x6d3ca820, 0x29176: 0x6ce37620, + 0x29179: 0x6cf8d620, 0x2917a: 0x6c716020, 0x2917b: 0x6d299e20, + 0x2917c: 0x6c92e420, 0x2917d: 0x6ce24420, + // Block 0xa46, offset 0x29180 + 0x29180: 0x6d3cb020, 0x29181: 0x6c8d6020, 0x29183: 0x6c729c20, + 0x29186: 0x6c5f4c20, 0x29187: 0x6c733020, + 0x2918a: 0x6d3e9a20, + 0x2918c: 0x6d265a20, 0x2918d: 0x6c301620, + 0x29192: 0x6ca47020, + 0x29196: 0x6c1d2420, + 0x2919f: 0x6c022020, + 0x291a3: 0x6c44e020, + 0x291a5: 0x6c0e9420, 0x291a6: 0x6c2fbc20, 0x291a7: 0x6cf02220, + 0x291ac: 0x6cc31a20, 0x291ad: 0x6c783a20, + 0x291b0: 0x6cb0cc20, 0x291b1: 0x6c76f420, 0x291b2: 0x6c3f0e20, 0x291b3: 0x6d1e6220, + 0x291b5: 0x6ce96620, 0x291b6: 0x6ce81e20, 0x291b7: 0x6d205a20, + 0x291b8: 0x6d10c020, 0x291ba: 0x6d126c20, + 0x291bd: 0x6d0ed220, + // Block 0xa47, offset 0x291c0 + 0x291c8: 0x6cfbb220, 0x291ca: 0x6ce38e20, + 0x291cc: 0x6cdc9820, + 0x291d0: 0x6c227420, + 0x291d4: 0x6d066220, 0x291d5: 0x6cf53820, 0x291d6: 0x6c117420, 0x291d7: 0x6d242420, + 0x291da: 0x6c15f820, 0x291db: 0x6cfa1020, + 0x291dd: 0x6c77ce20, 0x291de: 0x6c124220, 0x291df: 0x6c13bc20, + 0x291e0: 0x6cc0b420, 0x291e3: 0x6c267220, + 0x291e5: 0x6cdb5620, + 0x291e8: 0x6c571c20, + 0x291f7: 0x6cf38e20, + 0x291f8: 0x6d251a20, + 0x291fd: 0x6c681220, 0x291fe: 0x6cfe0820, 0x291ff: 0x6d2d0620, + // Block 0xa48, offset 0x29200 + 0x29200: 0x6cca3a20, 0x29201: 0x6ca09220, 0x29203: 0x6cce3e20, + 0x29204: 0x6c12a420, 0x29205: 0x6cdbe220, 0x29206: 0x6c208420, 0x29207: 0x6c9c9620, + 0x29208: 0x6d3a3420, 0x29209: 0x6c1d2820, 0x2920a: 0x6c62c220, 0x2920b: 0x6c1d2a20, + 0x29219: 0x6c889020, + 0x2921e: 0x6c4d8020, + 0x29224: 0x6c33c220, 0x29225: 0x6cfe0c20, 0x29226: 0x6c19ae20, 0x29227: 0x6cce4020, + 0x29228: 0x6c873820, 0x29229: 0x6c5a2c20, + 0x2922c: 0x6c2af820, 0x2922f: 0x6c897a20, + 0x29236: 0x6d28a420, + 0x2923a: 0x6c5e4420, 0x2923b: 0x6c8c0420, + 0x2923e: 0x6c31ee20, 0x2923f: 0x6c4f3620, + // Block 0xa49, offset 0x29240 + 0x29240: 0x6d1ddc20, 0x29241: 0x6d263a20, 0x29242: 0x6c4cf420, 0x29243: 0x6c8d9c20, + 0x29245: 0x6c88de20, 0x29247: 0x6c030220, + 0x29248: 0x6c292220, 0x29249: 0x6d194e20, 0x2924a: 0x6ca9e420, 0x2924b: 0x6ccde620, + 0x2924d: 0x6d035c20, + 0x29250: 0x6c26da20, 0x29251: 0x6d247420, 0x29252: 0x6c118220, 0x29253: 0x6cf33420, + 0x29254: 0x6c141420, 0x29255: 0x6c0fca20, 0x29257: 0x6c663020, + 0x2925e: 0x6c9bb820, 0x2925f: 0x6cf05e20, + 0x29260: 0x6ca09e20, + 0x29265: 0x6cd73820, 0x29266: 0x6c6b8220, 0x29267: 0x6cd7b220, + 0x29268: 0x6c5e5420, 0x2926b: 0x6c21ee20, + 0x2926d: 0x6c901420, 0x2926e: 0x6c582420, + 0x29270: 0x6ceada20, 0x29273: 0x6d220620, + 0x29276: 0x6c165a20, 0x29277: 0x6d1dee20, + 0x29278: 0x6c5e5e20, 0x2927a: 0x6c806820, + 0x2927f: 0x6ca30c20, + // Block 0xa4a, offset 0x29280 + 0x29280: 0x6c032220, 0x29281: 0x6c418020, 0x29282: 0x6d15cc20, 0x29283: 0x6c63ac20, + 0x29285: 0x6c269220, 0x29286: 0x6c2fa420, 0x29287: 0x6d0a8220, + 0x29288: 0x6cc59620, 0x29289: 0x6c732020, 0x2928a: 0x6ce94c20, 0x2928b: 0x6d064020, + 0x2928c: 0x6cd99220, 0x2928e: 0x6c128420, 0x2928f: 0x6c198e20, + 0x29291: 0x6c2f7020, + 0x2929a: 0x6c4d2620, + 0x2929f: 0x6cf47220, + 0x292a6: 0x6cb72020, + 0x292a8: 0x6c5f6820, + 0x292ae: 0x6c7cac20, 0x292af: 0x6cef5e20, + 0x292b6: 0x6cd44e20, 0x292b7: 0x6c3f2820, + 0x292b9: 0x6ce97a20, 0x292bb: 0x6c0cf020, + 0x292bd: 0x6cdff020, 0x292be: 0x6c4f5220, 0x292bf: 0x6cb1ce20, + // Block 0xa4b, offset 0x292c0 + 0x292c3: 0x6d217e20, + 0x292c4: 0x6cdffa20, + 0x292cc: 0x6cfd9020, 0x292ce: 0x6d050c20, + 0x292d3: 0x6cf26820, + 0x292d4: 0x6c4d8220, 0x292d5: 0x6caef220, + 0x292dd: 0x6ce04620, 0x292df: 0x6c0d0a20, + 0x292e0: 0x6cfd9e20, 0x292e3: 0x6d162e20, + 0x292e6: 0x6cb19020, 0x292e7: 0x6c586c20, + 0x292e8: 0x6ca24020, 0x292e9: 0x6c035220, 0x292eb: 0x6c396020, + 0x292ef: 0x6c2f6020, + 0x292f7: 0x6c3b3c20, + 0x292fa: 0x6c6bf620, + 0x292fe: 0x6cdd4a20, + // Block 0xa4c, offset 0x29300 + 0x29304: 0x6ced9220, 0x29305: 0x6c43a220, + 0x29308: 0x6c3b3e20, 0x2930a: 0x6ceb4420, + 0x2930c: 0x6cf1a620, 0x2930d: 0x6c487620, 0x2930e: 0x6c343620, + 0x29310: 0x6d308820, 0x29311: 0x6c22a020, 0x29312: 0x6d11ce20, + 0x29314: 0x6c050420, 0x29315: 0x6c10b820, 0x29316: 0x6ca15c20, + 0x29318: 0x6cb35e20, 0x2931b: 0x6c443020, + 0x2931e: 0x6c8e9220, + 0x29321: 0x6cc4d020, + 0x29328: 0x6c41b020, 0x2932a: 0x6c55a220, 0x2932b: 0x6ca1e620, + 0x2932e: 0x6d04f620, 0x2932f: 0x6c59a220, + 0x29330: 0x6c3f0220, 0x29331: 0x6c5b4220, 0x29333: 0x6cc1ca20, + 0x29334: 0x6c6b3e20, 0x29335: 0x6cead220, 0x29336: 0x6d21ac20, 0x29337: 0x6ca16820, + 0x29338: 0x6d38b220, 0x29339: 0x6c702820, 0x2933b: 0x6cd53c20, + 0x2933c: 0x6c7bae20, 0x2933d: 0x6cbf6620, 0x2933e: 0x6c8b2c20, 0x2933f: 0x6c405e20, + // Block 0xa4d, offset 0x29340 + 0x2934a: 0x6d074420, + 0x29356: 0x6c8c6e20, + 0x29358: 0x6ca88420, 0x2935a: 0x6caf9c20, + 0x2935c: 0x6c406e20, 0x2935d: 0x6c10c620, 0x2935e: 0x6d18e020, + 0x29361: 0x6c0f8620, 0x29363: 0x6c358420, + 0x29369: 0x6d30a620, 0x2936b: 0x6c86b820, + 0x2936e: 0x6ce92620, 0x2936f: 0x6c26cc20, + 0x29371: 0x6c931620, 0x29372: 0x6d0c4020, 0x29373: 0x6c301e20, + 0x29374: 0x6cbcfc20, 0x29375: 0x6ced5c20, 0x29376: 0x6ca03c20, 0x29377: 0x6d418020, + 0x29378: 0x6c408420, 0x29379: 0x6cc15620, 0x2937a: 0x6c078e20, 0x2937b: 0x6c02b420, + 0x2937c: 0x6cbaf620, + // Block 0xa4e, offset 0x29380 + 0x29381: 0x6cc44020, + 0x29388: 0x6cc41020, 0x29389: 0x6c576a20, 0x2938a: 0x6cfd2a20, 0x2938b: 0x6c7dd820, + 0x2938f: 0x6c258220, + 0x29392: 0x6d158820, + 0x29396: 0x6c1ae420, 0x29397: 0x6d404020, + 0x29398: 0x6ca52420, 0x29399: 0x6c1a5820, 0x2939a: 0x6c32a820, 0x2939b: 0x6d1e0620, + 0x2939c: 0x6d30e020, 0x2939e: 0x6ce0b020, 0x2939f: 0x6d0ff020, + 0x293a0: 0x6d011e20, 0x293a1: 0x6d07ec20, 0x293a3: 0x6c32e420, + 0x293a4: 0x6cd64c20, 0x293a5: 0x6cfbbe20, 0x293a6: 0x6cfbc020, + 0x293a9: 0x6c359e20, + 0x293b2: 0x6c7e5420, + 0x293b8: 0x6cf10220, 0x293b9: 0x6d1ec820, 0x293ba: 0x6d21e020, + 0x293bd: 0x6ce30420, 0x293bf: 0x6c6c7220, + // Block 0xa4f, offset 0x293c0 + 0x293c1: 0x6ce16420, 0x293c2: 0x6cb69e20, + 0x293c4: 0x6c2cec20, 0x293c5: 0x6ce1fe20, 0x293c6: 0x6c941820, 0x293c7: 0x6d2e9a20, + 0x293c8: 0x6cf17020, 0x293c9: 0x6c62d620, 0x293ca: 0x6c023820, 0x293cb: 0x6cabaa20, + 0x293cc: 0x6cb88420, + 0x293d0: 0x6cd21220, 0x293d1: 0x6cde2420, + 0x293d4: 0x6ca18e20, + 0x293d8: 0x6d1f9220, + 0x293e0: 0x6d2c6a20, 0x293e3: 0x6d117220, + 0x293eb: 0x6c1cfa20, + 0x293ec: 0x6c84b220, 0x293ed: 0x6d21f420, 0x293ee: 0x6c161420, 0x293ef: 0x6d143620, + 0x293f2: 0x6c1c9420, + 0x293f4: 0x6c84b420, + 0x293fd: 0x6ce90a20, 0x293ff: 0x6d40fe20, + // Block 0xa50, offset 0x29400 + 0x29402: 0x6cfbd620, + 0x29407: 0x6cf93620, + 0x29409: 0x6c0d0c20, 0x2940a: 0x6c4e4a20, 0x2940b: 0x6cb6b020, + 0x2940c: 0x6cca7a20, 0x2940e: 0x6c3a2c20, + 0x29410: 0x6ccdea20, + 0x29418: 0x6c584820, + 0x29420: 0x6c059a20, 0x29421: 0x6d220220, 0x29422: 0x6d220420, + 0x29424: 0x6c610420, + 0x29431: 0x6c7b0620, 0x29432: 0x6d3fe420, + 0x29439: 0x6cfd5420, 0x2943a: 0x6c9bc020, + // Block 0xa51, offset 0x29440 + 0x29443: 0x6c87b820, + 0x29444: 0x6d377820, 0x29445: 0x6c38fc20, 0x29446: 0x6c8b8820, 0x29447: 0x6c115620, + 0x29448: 0x6c320a20, 0x29449: 0x6c4a0020, 0x2944a: 0x6d04b020, 0x2944b: 0x6c84ea20, + 0x2944c: 0x6cb80c20, 0x2944f: 0x6c753420, + 0x29450: 0x6ceade20, 0x29452: 0x6c72d220, 0x29453: 0x6cff6420, + 0x29458: 0x6cc23420, + 0x2945c: 0x6d3bba20, + 0x29461: 0x6c754420, + 0x29466: 0x6c6bbc20, + 0x29468: 0x6d390620, 0x29469: 0x6cfc8820, 0x2946a: 0x6c8f7020, 0x2946b: 0x6d100420, + 0x2946c: 0x6cc4b220, 0x2946d: 0x6d16d620, 0x2946e: 0x6c8ae020, 0x2946f: 0x6c0e5620, + 0x29470: 0x6c5ce220, 0x29471: 0x6c61be20, 0x29472: 0x6c306a20, 0x29473: 0x6d386420, + 0x29474: 0x6cc29220, 0x29475: 0x6c6a9c20, + 0x2947a: 0x6c710820, + 0x2947c: 0x6c078620, 0x2947f: 0x6c087620, + // Block 0xa52, offset 0x29480 + 0x29480: 0x6c43fe20, 0x29481: 0x6c217c20, 0x29483: 0x6cb9a220, + 0x29484: 0x6cd9c820, 0x29485: 0x6cf0a020, 0x29486: 0x6c1a1420, 0x29487: 0x6c909020, + 0x29488: 0x6d213e20, 0x29489: 0x6c7e4620, 0x2948a: 0x6cb9a420, 0x2948b: 0x6c2cd220, + 0x2948c: 0x6cde0e20, 0x2948d: 0x6d2e6c20, 0x2948f: 0x6c38b620, + 0x29490: 0x6c8b5620, 0x29491: 0x6ce64420, 0x29492: 0x6c5ebe20, 0x29493: 0x6cb8de20, + 0x29494: 0x6c556820, 0x29497: 0x6d214220, + 0x29498: 0x6cb79c20, 0x29499: 0x6d214420, 0x2949a: 0x6cebe020, + 0x2949c: 0x6c03bc20, 0x2949d: 0x6cb61020, 0x2949e: 0x6cc95620, 0x2949f: 0x6cbb8620, + 0x294a0: 0x6d0bc220, 0x294a1: 0x6cfc1e20, + 0x294a8: 0x6c220820, 0x294a9: 0x6c396220, 0x294ab: 0x6c7dba20, + 0x294ac: 0x6c4be020, 0x294ad: 0x6cc39220, 0x294ae: 0x6c367a20, 0x294af: 0x6cbf4e20, + 0x294b2: 0x6c96d420, 0x294b3: 0x6c7a5820, + 0x294b4: 0x6d11c620, 0x294b7: 0x6cc39420, + 0x294b8: 0x6c1e6420, 0x294b9: 0x6c642c20, 0x294bb: 0x6d3a7a20, + 0x294bd: 0x6c331220, 0x294be: 0x6cec0a20, + // Block 0xa53, offset 0x294c0 + 0x294c0: 0x6ca51220, + 0x294c4: 0x6d0cce20, 0x294c5: 0x6ce78020, + 0x294cb: 0x6d03fe20, + 0x294cc: 0x6c4bee20, 0x294cd: 0x6cb26a20, + 0x294d1: 0x6d229c20, 0x294d2: 0x6c51ec20, + 0x294d4: 0x6d3da420, 0x294d7: 0x6ccf0020, + 0x294d8: 0x6d22a220, 0x294db: 0x6c62a620, + 0x294dd: 0x6cbaea20, 0x294de: 0x6cd73220, 0x294df: 0x6c21de20, + 0x294e0: 0x6d40e820, 0x294e1: 0x6c838e20, 0x294e2: 0x6ca60e20, + 0x294e4: 0x6cebf820, 0x294e5: 0x6d2c5c20, 0x294e7: 0x6c28d420, + 0x294ee: 0x6c328820, 0x294ef: 0x6c0bd020, + 0x294f0: 0x6c6a3e20, 0x294f1: 0x6cb87c20, 0x294f2: 0x6c519020, 0x294f3: 0x6c1d5e20, + 0x294f4: 0x6d0ce620, 0x294f6: 0x6d0ee020, + 0x294fa: 0x6cd94e20, 0x294fb: 0x6ce2c420, + 0x294fc: 0x6d11e020, 0x294fe: 0x6c779620, + // Block 0xa54, offset 0x29500 + 0x29500: 0x6d3c6e20, 0x29501: 0x6c4b9a20, 0x29502: 0x6c005a20, 0x29503: 0x6c4d8420, + 0x29508: 0x6cddb820, 0x29509: 0x6d076020, 0x2950a: 0x6c0c5020, + 0x2950c: 0x6c3cfc20, 0x2950d: 0x6cc15e20, 0x2950e: 0x6c98ae20, + 0x29510: 0x6c4ca020, + 0x29516: 0x6c0ac420, 0x29517: 0x6c751020, + 0x29518: 0x6c208a20, 0x2951b: 0x6cb47420, + 0x2951f: 0x6d195020, + 0x29522: 0x6cb95020, 0x29523: 0x6d196220, + 0x29524: 0x6c36ec20, 0x29525: 0x6c8da620, 0x29527: 0x6c0ace20, + 0x2952d: 0x6c5e5620, 0x2952e: 0x6ca0b620, + 0x29531: 0x6d09ce20, + 0x29534: 0x6d0f1e20, + 0x29538: 0x6c87ba20, 0x2953a: 0x6ce04e20, + 0x2953e: 0x6c947e20, + // Block 0xa55, offset 0x29540 + 0x29540: 0x6c769020, 0x29541: 0x6c99aa20, 0x29542: 0x6cfefc20, + 0x29547: 0x6c007220, + 0x2954a: 0x6cde1420, + 0x2954d: 0x6c9aac20, 0x2954f: 0x6c4c4220, + 0x29553: 0x6c432220, + 0x29554: 0x6ca4c220, 0x29555: 0x6c4ffc20, + 0x29560: 0x6cc39820, + 0x29565: 0x6c12a620, 0x29566: 0x6ccb0a20, + 0x2956b: 0x6cb03c20, + 0x29572: 0x6d006220, 0x29573: 0x6cff6620, + 0x29574: 0x6c712c20, + 0x29579: 0x6c1a2420, 0x2957a: 0x6ca50820, + // Block 0xa56, offset 0x29580 + 0x29580: 0x6ca58e20, + 0x2958d: 0x6ca25220, 0x2958f: 0x6cce8020, + 0x29591: 0x6c2cda20, + 0x29594: 0x6c8d5220, 0x29596: 0x6d31f820, 0x29597: 0x6d11d020, + 0x29599: 0x6c404a20, 0x2959a: 0x6cb9c620, 0x2959b: 0x6cbf5820, + 0x2959c: 0x6c715620, 0x2959d: 0x6c0e2c20, 0x2959e: 0x6c990620, 0x2959f: 0x6d2ce020, + 0x295a0: 0x6cdf0820, + 0x295a4: 0x6c1ce020, + 0x295ab: 0x6d2d3220, + 0x295ad: 0x6cd1f420, 0x295ae: 0x6d1e7c20, + 0x295b0: 0x6cbf6820, 0x295b1: 0x6c2a3820, 0x295b2: 0x6ce42620, 0x295b3: 0x6d3c7820, + 0x295b5: 0x6d1b8020, 0x295b7: 0x6ca51820, + 0x295b8: 0x6c0e9620, 0x295b9: 0x6c7bb220, 0x295ba: 0x6d355220, 0x295bb: 0x6c34ba20, + 0x295bc: 0x6c236220, 0x295bd: 0x6c061620, + // Block 0xa57, offset 0x295c0 + 0x295c7: 0x6c846820, + 0x295ca: 0x6c716c20, 0x295cb: 0x6cf1bc20, + 0x295cc: 0x6c8b3e20, 0x295cf: 0x6cf2c620, + 0x295d0: 0x6cd2de20, 0x295d1: 0x6ca7b620, 0x295d2: 0x6c987c20, 0x295d3: 0x6c6f8c20, + 0x295d8: 0x6d050020, + 0x295dd: 0x6cf2a420, 0x295df: 0x6c2a4020, + 0x295e1: 0x6cf70e20, 0x295e2: 0x6c01e020, 0x295e3: 0x6c26ce20, + 0x295e4: 0x6d401020, 0x295e5: 0x6c4f2a20, 0x295e6: 0x6c20ea20, 0x295e7: 0x6c089820, + 0x295e9: 0x6c309020, 0x295eb: 0x6d2f1220, + 0x295ef: 0x6d0b0220, + 0x295f2: 0x6c2bac20, 0x295f3: 0x6c5d6420, + 0x295f7: 0x6c9f8020, + 0x295fa: 0x6c408820, + 0x295fc: 0x6c061e20, 0x295fd: 0x6c78e420, 0x295fe: 0x6c991020, 0x295ff: 0x6cc55820, + // Block 0xa58, offset 0x29600 + 0x29600: 0x6d3fda20, 0x29601: 0x6cb88020, 0x29602: 0x6cf98020, 0x29603: 0x6cda0220, + 0x29604: 0x6d050e20, 0x29605: 0x6ca36e20, + 0x29609: 0x6c979620, + 0x2960e: 0x6d2c0820, 0x2960f: 0x6c154a20, + 0x29610: 0x6ccf8420, 0x29611: 0x6cf2ca20, + 0x29616: 0x6c005c20, 0x29617: 0x6c059820, + 0x29618: 0x6c4fb820, 0x2961a: 0x6ccad420, 0x2961b: 0x6cddba20, + 0x2961c: 0x6ce44020, 0x2961d: 0x6d0bcc20, 0x2961f: 0x6c0e3a20, + 0x29620: 0x6cc6e420, + 0x2962b: 0x6ccc2c20, + 0x2962c: 0x6cf26a20, 0x2962f: 0x6c028a20, + 0x29631: 0x6d3c2820, 0x29633: 0x6cb1c020, + 0x29634: 0x6cdbe820, 0x29635: 0x6d143820, 0x29636: 0x6cda0420, 0x29637: 0x6c30d220, + 0x29638: 0x6cda0620, 0x29639: 0x6c956e20, + // Block 0xa59, offset 0x29640 + 0x29643: 0x6c3afc20, + 0x29644: 0x6d422220, 0x29646: 0x6ca53c20, 0x29647: 0x6c2ac420, + 0x29648: 0x6d34c220, 0x29649: 0x6c25d020, 0x2964a: 0x6c8a5820, 0x2964b: 0x6c616420, + 0x2964c: 0x6c0ea020, 0x2964d: 0x6c23d020, 0x2964e: 0x6c1a6020, 0x2964f: 0x6c104e20, + 0x29651: 0x6cca1020, 0x29652: 0x6d29be20, + 0x29658: 0x6c69e420, 0x2965b: 0x6d125220, + 0x2965c: 0x6c920620, 0x2965e: 0x6c121420, + 0x29668: 0x6ca67020, + 0x29670: 0x6c6b8820, 0x29671: 0x6cb47c20, 0x29672: 0x6d3c5020, 0x29673: 0x6d29c820, + 0x2967a: 0x6c87c420, + 0x2967d: 0x6c7ed020, + // Block 0xa5a, offset 0x29680 + 0x29680: 0x6c1d0620, 0x29683: 0x6d2eae20, + 0x2968d: 0x6c0bb420, 0x2968e: 0x6cf23220, + 0x29693: 0x6c53de20, + 0x29697: 0x6cb1fc20, + 0x29699: 0x6ccb9e20, + 0x2969e: 0x6ca67220, 0x2969f: 0x6c3b4e20, + 0x296a0: 0x6d065620, 0x296a2: 0x6cd2da20, + 0x296a4: 0x6c72c220, + 0x296a8: 0x6c752420, 0x296aa: 0x6d24a220, + 0x296ac: 0x6c4c2a20, 0x296ad: 0x6c4c3420, 0x296af: 0x6c55a420, + 0x296b2: 0x6c869020, 0x296b3: 0x6d00fa20, + 0x296b4: 0x6c376c20, 0x296b5: 0x6d25b420, 0x296b6: 0x6c4d2e20, + 0x296b9: 0x6c6ebc20, 0x296bb: 0x6c78de20, + 0x296bd: 0x6d3fcc20, 0x296be: 0x6c3ae620, + // Block 0xa5b, offset 0x296c0 + 0x296c0: 0x6cae8820, 0x296c1: 0x6c44e220, 0x296c3: 0x6c652820, + 0x296c4: 0x6ca61220, 0x296c6: 0x6cfbc220, 0x296c7: 0x6c873c20, + 0x296c8: 0x6c17a820, 0x296ca: 0x6c377620, 0x296cb: 0x6c44e820, + 0x296cc: 0x6d247620, 0x296cd: 0x6c560420, 0x296ce: 0x6c3af820, 0x296cf: 0x6c028c20, + 0x296d3: 0x6c37b220, + 0x296d8: 0x6c78ec20, 0x296d9: 0x6c7ab620, 0x296da: 0x6c0fd020, + 0x296dd: 0x6d13a020, 0x296de: 0x6c69e820, + 0x296e6: 0x6c17ae20, 0x296e7: 0x6c44ec20, + 0x296e8: 0x6cc82e20, 0x296ea: 0x6d273c20, + 0x296ec: 0x6c8c1620, + 0x296f1: 0x6d24a620, 0x296f2: 0x6d274820, 0x296f3: 0x6d2d1220, + 0x296f4: 0x6cff6820, 0x296f7: 0x6c9f2420, + 0x296fb: 0x6c4af820, + 0x296fc: 0x6c6f6e20, 0x296fe: 0x6cebaa20, + // Block 0xa5c, offset 0x29700 + 0x29701: 0x6cf78220, 0x29702: 0x6cefd620, 0x29703: 0x6d3d6a20, + 0x29704: 0x6cf0a220, 0x29705: 0x6c7c8420, + 0x29708: 0x6c9a9820, 0x2970a: 0x6c505020, 0x2970b: 0x6c4f5020, + 0x2970c: 0x6c399a20, 0x2970d: 0x6ca96e20, 0x2970e: 0x6d205420, 0x2970f: 0x6c57a420, + 0x29712: 0x6c812420, + 0x29720: 0x6d3a1820, 0x29721: 0x6c4b1620, 0x29722: 0x6c0a1620, 0x29723: 0x6c642e20, + 0x29724: 0x6ce59c20, 0x29726: 0x6c93f020, 0x29727: 0x6c79a220, + 0x29728: 0x6d419420, 0x29729: 0x6c8d4620, 0x2972a: 0x6cb63220, + 0x2972c: 0x6d3a1e20, + 0x29731: 0x6c47ba20, 0x29732: 0x6d413020, + 0x29734: 0x6d0f6620, 0x29735: 0x6cda5620, 0x29737: 0x6c7c9620, + 0x29739: 0x6c167a20, 0x2973b: 0x6d113e20, + 0x2973e: 0x6d23e220, + // Block 0xa5d, offset 0x29740 + 0x29745: 0x6cd50420, 0x29746: 0x6c7f5420, 0x29747: 0x6d187620, + 0x29748: 0x6c30c420, + 0x2974c: 0x6cf3f020, 0x2974d: 0x6d1d1220, 0x2974e: 0x6c3f0420, 0x2974f: 0x6d3be820, + 0x29750: 0x6c3f8a20, 0x29752: 0x6cdb2a20, 0x29753: 0x6c853420, + 0x29754: 0x6d122820, 0x29755: 0x6cea1020, + 0x2975d: 0x6c4b7a20, + 0x29761: 0x6c940020, 0x29762: 0x6d0ed420, 0x29763: 0x6cb66620, + 0x29764: 0x6c813020, 0x29765: 0x6d3a3020, 0x29767: 0x6c4b1e20, + 0x29768: 0x6c551020, + 0x2976f: 0x6c6ddc20, + 0x29772: 0x6c1bc620, + 0x29775: 0x6c717220, 0x29776: 0x6d2c6020, + 0x29778: 0x6c9e8020, + // Block 0xa5e, offset 0x29780 + 0x29780: 0x6d39da20, 0x29781: 0x6c41ba20, 0x29782: 0x6d047620, 0x29783: 0x6c60e620, + 0x29787: 0x6cccaa20, + 0x29788: 0x6c9ab620, 0x29789: 0x6d287420, + 0x2978d: 0x6cd48820, + 0x29790: 0x6c941a20, 0x29791: 0x6d206020, 0x29792: 0x6c681420, 0x29793: 0x6caacc20, + 0x29798: 0x6c72c420, 0x29799: 0x6d206220, + 0x2979c: 0x6d195220, 0x2979d: 0x6ce2ce20, 0x2979e: 0x6cef7220, 0x2979f: 0x6c17f620, + 0x297a0: 0x6c8c8620, 0x297a1: 0x6c483020, 0x297a3: 0x6c875a20, + 0x297a4: 0x6c8ab020, 0x297a7: 0x6c68ac20, + 0x297a8: 0x6d0ff620, 0x297a9: 0x6c0c5e20, 0x297aa: 0x6cb6a220, + 0x297ae: 0x6d196420, + 0x297b1: 0x6c0d7620, 0x297b2: 0x6c9bbc20, 0x297b3: 0x6c145a20, + 0x297b5: 0x6c41be20, + 0x297b9: 0x6cc21c20, 0x297ba: 0x6c2bc020, 0x297bb: 0x6c82a020, + // Block 0xa5f, offset 0x297c0 + 0x297c0: 0x6c8dcc20, + 0x297c4: 0x6c585220, 0x297c5: 0x6cc23220, 0x297c7: 0x6c959c20, + 0x297c9: 0x6c7cc820, + 0x297cd: 0x6cc08020, 0x297ce: 0x6d227620, 0x297cf: 0x6c57a620, + 0x297d3: 0x6c833a20, + 0x297d5: 0x6cc60620, 0x297d6: 0x6cffb620, 0x297d7: 0x6cd8da20, + 0x297da: 0x6c327220, 0x297db: 0x6c0cb420, + 0x297e0: 0x6ca97020, 0x297e2: 0x6c51e020, 0x297e3: 0x6cadc420, + 0x297e5: 0x6c3acc20, 0x297e6: 0x6ca2aa20, + 0x297e9: 0x6c3d9620, + 0x297ec: 0x6c55a820, 0x297ed: 0x6cedec20, 0x297ee: 0x6ccc1420, + 0x297f0: 0x6c687420, 0x297f1: 0x6cf47420, + 0x297f9: 0x6c404c20, + // Block 0xa60, offset 0x29800 + 0x29801: 0x6c0df620, 0x29802: 0x6d3b3020, + 0x29804: 0x6d3a2a20, 0x29805: 0x6c1ada20, 0x29807: 0x6cd07c20, + 0x29808: 0x6c550820, 0x29809: 0x6c101e20, + 0x2980e: 0x6cc4d420, + 0x29816: 0x6ca2b620, + 0x29818: 0x6c869220, 0x2981b: 0x6c638820, + 0x2981e: 0x6c96e020, + 0x29821: 0x6c9b6820, 0x29822: 0x6ca1f020, 0x29823: 0x6d38b820, + 0x29824: 0x6cfc3820, 0x29825: 0x6c5b7420, 0x29826: 0x6c48fc20, 0x29827: 0x6c702c20, + 0x29829: 0x6ca2b820, 0x2982b: 0x6cc82a20, + 0x2982d: 0x6cf3fc20, 0x2982f: 0x6cc7d820, + 0x29831: 0x6d2ce620, + // Block 0xa61, offset 0x29840 + 0x29841: 0x6caae220, 0x29842: 0x6d010a20, + 0x29844: 0x6c680220, + 0x2984b: 0x6c853a20, + 0x2984c: 0x6cd51020, 0x2984d: 0x6d190020, 0x2984e: 0x6c2bae20, 0x2984f: 0x6cbe9220, + 0x29850: 0x6c717420, 0x29853: 0x6d373620, + 0x29855: 0x6c80f020, 0x29856: 0x6c10ca20, 0x29857: 0x6c7bca20, + 0x29858: 0x6d190220, 0x2985a: 0x6c0f9a20, + 0x29867: 0x6c1c8c20, + 0x2986d: 0x6c680c20, 0x2986f: 0x6cf32a20, + 0x29870: 0x6d0aac20, + 0x29875: 0x6cea3220, 0x29876: 0x6c987e20, + 0x29878: 0x6c39b220, 0x29879: 0x6d3dce20, 0x2987b: 0x6cb88220, + 0x2987d: 0x6cde2220, 0x2987e: 0x6cb68a20, + // Block 0xa62, offset 0x29880 + 0x29880: 0x6caf1e20, 0x29881: 0x6c0cc620, 0x29882: 0x6c3bfe20, 0x29883: 0x6ce92820, + 0x29884: 0x6c57d220, 0x29887: 0x6c36d220, + 0x2988b: 0x6c36d420, + 0x2988e: 0x6c2fc420, + 0x29890: 0x6cc7e220, + 0x29896: 0x6c36d620, + 0x2989e: 0x6d0ef020, 0x2989f: 0x6cd8f820, + 0x298a5: 0x6d1cc020, 0x298a6: 0x6ca61620, 0x298a7: 0x6ca61820, + 0x298a8: 0x6d158e20, + 0x298b9: 0x6c9c9820, + 0x298be: 0x6d129820, 0x298bf: 0x6cb32620, + // Block 0xa63, offset 0x298c0 + 0x298c0: 0x6c240420, 0x298c2: 0x6cf11820, + 0x298c4: 0x6c4d8820, 0x298c5: 0x6d1c2820, 0x298c7: 0x6ce6a020, + 0x298c8: 0x6d375e20, 0x298c9: 0x6c3a2a20, 0x298ca: 0x6d1f9420, + 0x298cd: 0x6c7cb020, 0x298ce: 0x6c01e220, 0x298cf: 0x6c03d220, + 0x298d1: 0x6c4f3420, + 0x298de: 0x6ca41620, 0x298df: 0x6ca3da20, + 0x298e2: 0x6c6df420, + 0x298e5: 0x6ceece20, + 0x298f1: 0x6c1f8e20, 0x298f3: 0x6cddbe20, + 0x298f4: 0x6ce20020, 0x298f5: 0x6cb6a620, 0x298f6: 0x6ce16620, 0x298f7: 0x6cf05a20, + 0x298f8: 0x6c41fc20, 0x298fa: 0x6c446420, + 0x298fc: 0x6c4f3820, 0x298fe: 0x6ca37420, 0x298ff: 0x6c446620, + // Block 0xa64, offset 0x29900 + 0x29904: 0x6d331420, + 0x29917: 0x6cde2820, + 0x2991b: 0x6cd84c20, + 0x2991d: 0x6ca6de20, 0x2991e: 0x6cca9820, + 0x2992b: 0x6d012a20, + 0x2992f: 0x6d410220, + 0x29930: 0x6d21fc20, 0x29931: 0x6ca6e020, 0x29932: 0x6cb55420, + 0x29935: 0x6cd03220, + 0x2993c: 0x6c102020, + // Block 0xa65, offset 0x29940 + 0x2994b: 0x6c7d9a20, + 0x2994c: 0x6c84c420, 0x2994e: 0x6c488220, + 0x29956: 0x6d0e1c20, 0x29957: 0x6c10d220, + 0x29958: 0x6c672a20, 0x2995a: 0x6cf40e20, 0x2995b: 0x6c134420, + 0x2995c: 0x6c8c0e20, 0x2995d: 0x6d3c0420, 0x2995f: 0x6c5b0e20, + 0x29961: 0x6ce7a620, 0x29962: 0x6d2ca220, + 0x29964: 0x6c522c20, 0x29967: 0x6c4ce220, + 0x29971: 0x6c6e4220, + 0x29975: 0x6c2f1620, 0x29977: 0x6d1cdc20, + 0x2997c: 0x6d377420, + // Block 0xa66, offset 0x29980 + 0x29982: 0x6cf06620, + 0x29984: 0x6c62fa20, 0x29985: 0x6cc73620, + 0x29988: 0x6c030620, 0x29989: 0x6c292420, 0x2998a: 0x6c958a20, 0x2998b: 0x6d13a220, + 0x2998c: 0x6ceed220, + 0x29992: 0x6cbb3220, + 0x29999: 0x6c446c20, 0x2999a: 0x6c62fc20, + 0x299a6: 0x6d409620, + 0x299a8: 0x6d15a620, 0x299ab: 0x6d2ca420, + 0x299ad: 0x6c8b8c20, + 0x299b4: 0x6d13a820, + 0x299bc: 0x6d2dd420, + // Block 0xa67, offset 0x299c0 + 0x299c0: 0x6c1e1620, 0x299c1: 0x6c0c6620, + 0x299c6: 0x6d077020, 0x299c7: 0x6d1eda20, + 0x299cd: 0x6d029a20, 0x299ce: 0x6cef7c20, 0x299cf: 0x6c87ca20, + 0x299db: 0x6c0fdc20, + 0x299dc: 0x6c664c20, 0x299dd: 0x6c158220, 0x299de: 0x6c7d9e20, + 0x299e1: 0x6cbe9a20, + 0x299e7: 0x6cd6ce20, + 0x299e8: 0x6cf76420, 0x299e9: 0x6cc23620, + 0x299f0: 0x6c95a020, 0x299f3: 0x6c294c20, + 0x299f4: 0x6ca71020, 0x299f5: 0x6c855a20, 0x299f7: 0x6c03e420, + 0x299f9: 0x6c365220, 0x299fa: 0x6c3d7a20, 0x299fb: 0x6c400620, + 0x299fc: 0x6c5d1220, 0x299fd: 0x6d2cd820, 0x299fe: 0x6c014420, + // Block 0xa68, offset 0x29a00 + 0x29a01: 0x6cc09620, 0x29a02: 0x6c1dd620, 0x29a03: 0x6c9e3c20, + 0x29a04: 0x6d0aa620, 0x29a05: 0x6ce92420, 0x29a06: 0x6ca60c20, 0x29a07: 0x6c570220, + 0x29a08: 0x6cd50a20, 0x29a0a: 0x6d05f620, 0x29a0b: 0x6d384620, + 0x29a0c: 0x6c776220, + 0x29a12: 0x6cfee220, 0x29a13: 0x6cfee420, + 0x29a14: 0x6c22d420, 0x29a15: 0x6c1c3c20, 0x29a17: 0x6c2dd220, + 0x29a18: 0x6d181420, 0x29a1a: 0x6c2f6420, + 0x29a1d: 0x6c4ef620, 0x29a1e: 0x6cece420, + 0x29a20: 0x6d160220, 0x29a21: 0x6c066020, 0x29a22: 0x6d184220, + 0x29a27: 0x6d0a9e20, + 0x29a2c: 0x6cfdd420, + 0x29a33: 0x6c08a420, + 0x29a36: 0x6c6b3020, 0x29a37: 0x6c43a620, + 0x29a38: 0x6d2b5620, 0x29a3a: 0x6d326a20, 0x29a3b: 0x6c55aa20, + 0x29a3c: 0x6cf6b420, 0x29a3d: 0x6d02e820, 0x29a3e: 0x6cff1220, 0x29a3f: 0x6c404e20, + // Block 0xa69, offset 0x29a40 + 0x29a40: 0x6d383c20, 0x29a42: 0x6c99b620, 0x29a43: 0x6d02ea20, + 0x29a44: 0x6cbad820, + 0x29a48: 0x6c3b9220, 0x29a49: 0x6c049820, 0x29a4a: 0x6c583220, + 0x29a51: 0x6c687620, 0x29a53: 0x6c066620, + 0x29a54: 0x6d0af820, 0x29a55: 0x6d114020, + 0x29a5b: 0x6cf8d820, + 0x29a5d: 0x6c729e20, 0x29a5f: 0x6cc27c20, + 0x29a60: 0x6d26f020, 0x29a61: 0x6cdf4220, 0x29a62: 0x6ce81820, 0x29a63: 0x6ca16c20, + 0x29a64: 0x6d2c5420, 0x29a65: 0x6cc1ce20, 0x29a67: 0x6c3da620, + 0x29a69: 0x6cc1d020, 0x29a6a: 0x6c1c7e20, + 0x29a6c: 0x6d1f7c20, + 0x29a77: 0x6ce38620, + 0x29a7a: 0x6cebf020, + 0x29a7d: 0x6ceb5620, 0x29a7f: 0x6c1eb220, + // Block 0xa6a, offset 0x29a80 + 0x29a81: 0x6c43b020, + 0x29a88: 0x6d251620, 0x29a89: 0x6c43b220, 0x29a8a: 0x6cc1d220, + 0x29a8f: 0x6c72a020, + 0x29a92: 0x6c2ef820, 0x29a93: 0x6d157e20, + 0x29a94: 0x6cd20820, 0x29a95: 0x6d18e420, 0x29a97: 0x6c4b2020, + 0x29a98: 0x6c680420, 0x29a9a: 0x6cd94420, 0x29a9b: 0x6cbf7220, + 0x29a9d: 0x6c36c220, 0x29a9e: 0x6c59a420, 0x29a9f: 0x6c5b4620, + 0x29aa0: 0x6d0a4620, 0x29aa3: 0x6c717020, + 0x29aa5: 0x6d2d2220, 0x29aa6: 0x6c1c8220, 0x29aa7: 0x6c81c020, + 0x29aa9: 0x6cb66820, 0x29aaa: 0x6d050420, + 0x29aac: 0x6c5af620, 0x29aad: 0x6ce79820, + 0x29aba: 0x6c407220, + 0x29abd: 0x6d0a4820, 0x29abe: 0x6c6b4e20, 0x29abf: 0x6c9d0620, + // Block 0xa6b, offset 0x29ac0 + 0x29ac0: 0x6d242820, + 0x29ac8: 0x6d3c4a20, 0x29ac9: 0x6c688e20, 0x29aca: 0x6d373820, 0x29acb: 0x6c1a5220, + 0x29acd: 0x6c6b6c20, 0x29ace: 0x6cff3220, 0x29acf: 0x6c18f220, + 0x29ad0: 0x6c848220, 0x29ad1: 0x6d26fe20, 0x29ad3: 0x6d373a20, + 0x29ad4: 0x6c818820, 0x29ad5: 0x6cf32c20, 0x29ad6: 0x6cc1ea20, + 0x29ad8: 0x6cedce20, 0x29ada: 0x6d142e20, 0x29adb: 0x6d190420, + 0x29adc: 0x6c80f220, 0x29ade: 0x6ce7fa20, 0x29adf: 0x6c015c20, + 0x29ae0: 0x6c74e420, 0x29ae1: 0x6d0ee420, + 0x29ae5: 0x6c72b020, 0x29ae7: 0x6d327620, + 0x29ae9: 0x6d373c20, 0x29aea: 0x6c98a820, + 0x29aee: 0x6d055420, + 0x29af1: 0x6c208020, 0x29af2: 0x6c1e6c20, + 0x29af8: 0x6cbafc20, 0x29af9: 0x6c3a2620, 0x29afa: 0x6c16d420, + 0x29afc: 0x6c9dec20, 0x29afd: 0x6cdb5a20, 0x29afe: 0x6c02b820, + // Block 0xa6c, offset 0x29b00 + 0x29b00: 0x6c3f9620, + 0x29b04: 0x6cf10620, 0x29b05: 0x6d342420, 0x29b06: 0x6c9f8220, 0x29b07: 0x6c168820, + 0x29b08: 0x6d0cfa20, 0x29b09: 0x6d245820, 0x29b0b: 0x6c408a20, + 0x29b0c: 0x6cded020, 0x29b0d: 0x6c616020, 0x29b0f: 0x6c3aee20, + 0x29b12: 0x6c55f620, 0x29b13: 0x6c70e220, + 0x29b15: 0x6d22ac20, + 0x29b1b: 0x6cb69220, + 0x29b1c: 0x6c9a3820, 0x29b1f: 0x6c0ccc20, + 0x29b20: 0x6c4cd820, + 0x29b24: 0x6ca04c20, 0x29b26: 0x6ced5e20, 0x29b27: 0x6ced6020, + 0x29b34: 0x6c6dec20, 0x29b35: 0x6d245a20, 0x29b36: 0x6cfbce20, + 0x29b39: 0x6c212a20, 0x29b3a: 0x6c60f820, + 0x29b3c: 0x6cfd9620, 0x29b3d: 0x6cae4420, 0x29b3e: 0x6c409220, + // Block 0xa6d, offset 0x29b40 + 0x29b42: 0x6c8ed820, + 0x29b44: 0x6cc9da20, 0x29b45: 0x6d08f020, 0x29b46: 0x6d409220, + 0x29b48: 0x6c6b7e20, 0x29b4b: 0x6d2dc220, + 0x29b4d: 0x6d21e820, 0x29b4e: 0x6d21ea20, 0x29b4f: 0x6c9a4020, + 0x29b50: 0x6c9ea820, 0x29b51: 0x6c99c020, 0x29b52: 0x6c346a20, 0x29b53: 0x6c409420, + 0x29b5b: 0x6c671820, + 0x29b66: 0x6c9e8420, + 0x29b68: 0x6c023a20, + 0x29b6d: 0x6c78e620, + 0x29b76: 0x6c544420, + 0x29b7a: 0x6c46e420, + 0x29b7c: 0x6cf74c20, 0x29b7e: 0x6cc6e820, 0x29b7f: 0x6c43be20, + // Block 0xa6e, offset 0x29b80 + 0x29b80: 0x6cac9220, 0x29b81: 0x6d25d420, 0x29b82: 0x6cfa5e20, + 0x29b85: 0x6ccc2e20, 0x29b86: 0x6cafa620, + 0x29b88: 0x6cbe9620, 0x29b89: 0x6d1dde20, 0x29b8a: 0x6cc20220, + 0x29b8c: 0x6c462820, 0x29b8e: 0x6c446820, 0x29b8f: 0x6cfb0820, + 0x29b91: 0x6cdb6820, + 0x29b95: 0x6c04ae20, 0x29b96: 0x6cb6a820, 0x29b97: 0x6c548820, + 0x29b9b: 0x6cf74e20, + 0x29b9d: 0x6cf39220, + 0x29bad: 0x6cb55620, 0x29bae: 0x6c56ec20, 0x29baf: 0x6c4aae20, + 0x29bb1: 0x6c2bbc20, 0x29bb2: 0x6cce2c20, 0x29bb3: 0x6c975220, + 0x29bb4: 0x6c9fde20, 0x29bb5: 0x6c62ea20, 0x29bb6: 0x6cf7c820, 0x29bb7: 0x6cfb1020, + 0x29bb8: 0x6c610220, 0x29bb9: 0x6c16d820, 0x29bba: 0x6c7a1220, 0x29bbb: 0x6c1cfc20, + // Block 0xa6f, offset 0x29bc0 + 0x29bc2: 0x6d2ef020, 0x29bc3: 0x6cb1aa20, + 0x29bc4: 0x6cdb6c20, 0x29bc5: 0x6c94cc20, 0x29bc6: 0x6c84c620, 0x29bc7: 0x6c9c2020, + 0x29bc8: 0x6c1cfe20, 0x29bc9: 0x6ce47c20, 0x29bcb: 0x6c8da820, + 0x29bcd: 0x6c1c9a20, + 0x29bd6: 0x6c1d0020, + 0x29bd9: 0x6c1c9c20, + 0x29bdd: 0x6ca7c820, 0x29bdf: 0x6d1e0a20, + 0x29bee: 0x6c9db020, + 0x29bf0: 0x6cd51e20, 0x29bf2: 0x6cf93820, + 0x29bf4: 0x6c36f620, 0x29bf5: 0x6d3ec820, + 0x29bf8: 0x6c6b8420, 0x29bf9: 0x6c5faa20, 0x29bfa: 0x6c53e820, 0x29bfb: 0x6cd18220, + 0x29bfc: 0x6c879c20, 0x29bfe: 0x6cb55c20, + // Block 0xa70, offset 0x29c00 + 0x29c00: 0x6d38c620, 0x29c01: 0x6cd85820, 0x29c02: 0x6cc21e20, + 0x29c0b: 0x6d013420, + 0x29c17: 0x6cd85a20, + 0x29c1b: 0x6d061220, + 0x29c20: 0x6c409e20, + 0x29c2f: 0x6ca9e620, + 0x29c30: 0x6d0bd020, 0x29c31: 0x6c8ef020, 0x29c32: 0x6c643420, 0x29c33: 0x6c4ab020, + 0x29c34: 0x6c7cc020, 0x29c35: 0x6c1ca220, 0x29c36: 0x6c121620, 0x29c37: 0x6c1ed020, + 0x29c39: 0x6c4c5020, 0x29c3b: 0x6c285a20, + 0x29c3f: 0x6c672e20, + // Block 0xa71, offset 0x29c40 + 0x29c41: 0x6c292620, 0x29c42: 0x6c548c20, + 0x29c44: 0x6c7a1420, 0x29c46: 0x6c1f9220, 0x29c47: 0x6cb96220, + 0x29c48: 0x6c010c20, 0x29c4a: 0x6cb0e420, + 0x29c51: 0x6d0abc20, 0x29c52: 0x6c6dfc20, 0x29c53: 0x6c9c2620, + 0x29c55: 0x6c0d7a20, 0x29c56: 0x6c801620, 0x29c57: 0x6c47fa20, + 0x29c58: 0x6c1e1420, 0x29c5b: 0x6d1dec20, + 0x29c5c: 0x6c488420, 0x29c5d: 0x6d220a20, 0x29c5e: 0x6d397420, + 0x29c6d: 0x6c115820, 0x29c6f: 0x6c8ef420, + 0x29c70: 0x6c105420, 0x29c71: 0x6c965820, 0x29c72: 0x6c6b8c20, 0x29c73: 0x6d31a820, + 0x29c74: 0x6c9f2220, 0x29c75: 0x6c4a1620, 0x29c77: 0x6c63f820, + 0x29c79: 0x6c7ed220, + // Block 0xa72, offset 0x29c80 + 0x29c80: 0x6cd48c20, 0x29c83: 0x6c4c5220, + 0x29c86: 0x6c9c2820, 0x29c87: 0x6cb9ea20, + 0x29c88: 0x6c7f8420, 0x29c8a: 0x6c51b220, 0x29c8b: 0x6ce97c20, + 0x29c91: 0x6c5b1020, + 0x29c98: 0x6c52e620, + 0x29c9c: 0x6c93c820, 0x29c9f: 0x6c63fa20, + 0x29ca5: 0x6c4ab220, + 0x29ca8: 0x6d144420, 0x29ca9: 0x6c585420, + 0x29cb0: 0x6c95a220, + 0x29cb4: 0x6c754620, + 0x29cb8: 0x6c49ce20, 0x29cbb: 0x6cc34820, + 0x29cbc: 0x6ca7cc20, 0x29cbf: 0x6c97b220, + // Block 0xa73, offset 0x29cc0 + 0x29cc2: 0x6d282420, 0x29cc3: 0x6cf18a20, + 0x29cc4: 0x6c1c0c20, 0x29cc5: 0x6c1c1820, 0x29cc6: 0x6d33dc20, + 0x29cc8: 0x6c224420, 0x29cc9: 0x6d3c3e20, 0x29cca: 0x6c573c20, 0x29ccb: 0x6c6ac020, + 0x29ccc: 0x6cc19e20, 0x29ccd: 0x6ce86620, 0x29cce: 0x6c9f6a20, 0x29ccf: 0x6c9a2020, + 0x29cd0: 0x6d218020, 0x29cd1: 0x6c026e20, 0x29cd2: 0x6c049a20, + 0x29cd4: 0x6caf8c20, 0x29cd5: 0x6d31a420, 0x29cd6: 0x6c91d020, 0x29cd7: 0x6c1c5420, + 0x29cd8: 0x6ce7f620, 0x29cda: 0x6c6a3420, + 0x29cdc: 0x6d2da420, + 0x29ce2: 0x6c6c6820, 0x29ce3: 0x6c91f020, + 0x29ce6: 0x6c670a20, 0x29ce7: 0x6ce0b420, + 0x29ce8: 0x6c168a20, 0x29cea: 0x6c22ee20, + 0x29ced: 0x6cec5c20, 0x29cee: 0x6c240620, 0x29cef: 0x6c771a20, + 0x29cf1: 0x6c0bd820, + 0x29cf8: 0x6cf17620, 0x29cfb: 0x6cb95620, + 0x29cff: 0x6c424220, + // Block 0xa74, offset 0x29d00 + 0x29d02: 0x6c5ca220, + 0x29d04: 0x6c420620, 0x29d06: 0x6c630020, 0x29d07: 0x6c424620, + 0x29d09: 0x6c580820, + 0x29d0d: 0x6cd8dc20, + 0x29d10: 0x6c3d9a20, + 0x29d15: 0x6cb01620, 0x29d17: 0x6c10d620, + 0x29d1c: 0x6c07c620, + 0x29d22: 0x6cd2dc20, + 0x29d25: 0x6c58b020, 0x29d27: 0x6c4a9420, + 0x29d2a: 0x6cab9620, + 0x29d33: 0x6cad7020, + 0x29d35: 0x6d1d2020, 0x29d36: 0x6ce6e620, 0x29d37: 0x6d001820, + 0x29d39: 0x6d3b3620, 0x29d3b: 0x6d21d220, + // Block 0xa75, offset 0x29d40 + 0x29d41: 0x6c66fa20, + 0x29d44: 0x6cc25420, 0x29d45: 0x6ced6220, 0x29d46: 0x6c7d9220, 0x29d47: 0x6d3c7220, + 0x29d49: 0x6d245c20, 0x29d4a: 0x6c4cda20, 0x29d4b: 0x6cb2de20, + 0x29d4c: 0x6d41a420, 0x29d4d: 0x6d40fa20, 0x29d4f: 0x6d39e820, + 0x29d50: 0x6caa9c20, 0x29d51: 0x6d39ea20, + 0x29d56: 0x6cb17620, 0x29d57: 0x6c9cac20, + 0x29d5c: 0x6c0ad220, 0x29d5d: 0x6cdb6e20, + 0x29d61: 0x6cb47a20, 0x29d62: 0x6c9cc420, + 0x29d6b: 0x6d13a620, + 0x29d6c: 0x6d22b420, 0x29d6e: 0x6d249620, + 0x29d70: 0x6d3a9420, 0x29d73: 0x6c8dc220, + 0x29d7a: 0x6caa3620, + 0x29d7e: 0x6c8d3020, + // Block 0xa76, offset 0x29d80 + 0x29d80: 0x6c8a7020, 0x29d82: 0x6ceace20, + 0x29d84: 0x6c08f020, 0x29d85: 0x6ca36a20, 0x29d86: 0x6cc1bc20, + 0x29d88: 0x6cb01820, 0x29d89: 0x6c30f420, 0x29d8a: 0x6ca86e20, 0x29d8b: 0x6cea6820, + 0x29d8d: 0x6c5f2620, 0x29d8f: 0x6c8d5420, + 0x29d93: 0x6c7aaa20, + 0x29d94: 0x6cdb2c20, + 0x29d98: 0x6ce81a20, + 0x29d9e: 0x6ca38620, 0x29d9f: 0x6d2b0c20, + 0x29da2: 0x6ce7c420, 0x29da3: 0x6c444a20, + 0x29da4: 0x6c331820, 0x29da7: 0x6c6b5020, + 0x29da9: 0x6ce4c820, 0x29daa: 0x6ce5e220, 0x29dab: 0x6c1b6020, + 0x29dac: 0x6cc14e20, 0x29dae: 0x6ccc2820, + 0x29db0: 0x6c0f9e20, 0x29db1: 0x6c848420, 0x29db3: 0x6c963a20, + 0x29db5: 0x6c8a4420, 0x29db6: 0x6cd62620, 0x29db7: 0x6c2ad220, + 0x29db9: 0x6c1ae620, 0x29dba: 0x6c9f0220, + 0x29dbc: 0x6ce24e20, 0x29dbd: 0x6c5d0c20, 0x29dbf: 0x6ca7e220, + // Block 0xa77, offset 0x29dc0 + 0x29dc1: 0x6c75fe20, 0x29dc2: 0x6c56dc20, + 0x29dc4: 0x6c932e20, 0x29dc5: 0x6d138820, 0x29dc7: 0x6ca18620, + 0x29dc8: 0x6c17c820, + 0x29dcc: 0x6cddd420, 0x29dce: 0x6c784220, 0x29dcf: 0x6c409620, + 0x29dd1: 0x6c17aa20, + 0x29dd4: 0x6cddbc20, 0x29dd7: 0x6cbfe220, + 0x29ddb: 0x6cdb6a20, + 0x29ddd: 0x6d287620, 0x29ddf: 0x6cddc220, + 0x29de0: 0x6c7a7020, 0x29de1: 0x6c0fc420, 0x29de3: 0x6c90fe20, + 0x29de4: 0x6ca1a220, 0x29de6: 0x6c88e220, 0x29de7: 0x6d08d220, + 0x29de8: 0x6cddc420, 0x29de9: 0x6c97aa20, 0x29dea: 0x6c0ad420, + 0x29df2: 0x6ce44820, + 0x29df4: 0x6c88a620, 0x29df5: 0x6ce04a20, 0x29df6: 0x6ccdf220, + 0x29df8: 0x6cc22820, 0x29df9: 0x6c320820, 0x29dfa: 0x6c58d420, 0x29dfb: 0x6ccb0e20, + 0x29dff: 0x6c7c2620, + // Block 0xa78, offset 0x29e00 + 0x29e03: 0x6ca8dc20, + 0x29e05: 0x6ca8de20, 0x29e06: 0x6c95a420, 0x29e07: 0x6d425c20, + 0x29e08: 0x6d174e20, 0x29e09: 0x6cfcc020, 0x29e0a: 0x6c179820, 0x29e0b: 0x6ce61220, + 0x29e12: 0x6cd79620, + 0x29e14: 0x6c9d0020, 0x29e17: 0x6c9c7220, + 0x29e1b: 0x6ced5220, + 0x29e1d: 0x6c07c820, 0x29e1e: 0x6cbae020, + 0x29e20: 0x6ca0b020, 0x29e23: 0x6c8eca20, + 0x29e24: 0x6cf32e20, 0x29e26: 0x6c9a7020, + 0x29e28: 0x6ce7fe20, 0x29e2b: 0x6ca25a20, + 0x29e2d: 0x6c9a4420, + 0x29e32: 0x6d42b620, + 0x29e34: 0x6cea6420, 0x29e35: 0x6c778c20, 0x29e36: 0x6cea6a20, + 0x29e3a: 0x6c184c20, 0x29e3b: 0x6d336a20, + 0x29e3d: 0x6c1cec20, 0x29e3e: 0x6ce47820, + // Block 0xa79, offset 0x29e40 + 0x29e40: 0x6d372020, 0x29e41: 0x6c153420, 0x29e42: 0x6c153e20, + 0x29e45: 0x6cbe5c20, 0x29e46: 0x6cea3420, 0x29e47: 0x6c5b7a20, + 0x29e48: 0x6cc41420, 0x29e49: 0x6d2dba20, 0x29e4a: 0x6c652c20, 0x29e4b: 0x6c154c20, + 0x29e4d: 0x6c5a2620, 0x29e4f: 0x6c5b0620, + 0x29e50: 0x6c1b6a20, 0x29e52: 0x6c5a2820, 0x29e53: 0x6c528220, + 0x29e54: 0x6d280820, 0x29e56: 0x6ce94020, 0x29e57: 0x6c0b1c20, + 0x29e59: 0x6c5a3620, 0x29e5a: 0x6d280a20, + 0x29e5f: 0x6ca1a420, + 0x29e60: 0x6c45c420, 0x29e62: 0x6c45c620, + 0x29e64: 0x6c4bb020, 0x29e66: 0x6c157820, + 0x29e68: 0x6cc42220, 0x29e69: 0x6cc8ee20, 0x29e6a: 0x6c7c2820, 0x29e6b: 0x6cb1c220, + 0x29e6e: 0x6cc80220, + 0x29e72: 0x6ca9a220, 0x29e73: 0x6c56c820, + 0x29e74: 0x6c6cb820, 0x29e75: 0x6ca6d220, 0x29e76: 0x6c067420, + 0x29e78: 0x6ca65620, 0x29e7a: 0x6c0a8420, 0x29e7b: 0x6c55d820, + 0x29e7c: 0x6c846a20, 0x29e7f: 0x6d39dc20, + // Block 0xa7a, offset 0x29e80 + 0x29e80: 0x6ca2fc20, 0x29e82: 0x6cc36620, 0x29e83: 0x6c3cd220, + 0x29e84: 0x6c090020, 0x29e85: 0x6c84a020, 0x29e86: 0x6c0d0820, 0x29e87: 0x6ca70e20, + 0x29e88: 0x6c304820, 0x29e8b: 0x6c88a020, + 0x29e8c: 0x6ca6e420, 0x29e8d: 0x6c88a820, 0x29e8e: 0x6c968820, 0x29e8f: 0x6d30ca20, + 0x29e93: 0x6c639420, + 0x29e94: 0x6d15a820, 0x29e96: 0x6c904c20, + 0x29e98: 0x6d181820, + 0x29e9d: 0x6c278e20, 0x29e9e: 0x6c327820, + 0x29ea3: 0x6d160c20, + 0x29ea5: 0x6cdf8220, 0x29ea6: 0x6c4f5420, 0x29ea7: 0x6cd61620, + 0x29eac: 0x6cece820, 0x29eae: 0x6cdb2e20, 0x29eaf: 0x6d11d820, + 0x29eb0: 0x6c37e020, 0x29eb2: 0x6d326e20, + 0x29eba: 0x6c313e20, 0x29ebb: 0x6c651220, + 0x29ebf: 0x6cace620, + // Block 0xa7b, offset 0x29ec0 + 0x29ec0: 0x6c5afe20, 0x29ec2: 0x6c145420, 0x29ec3: 0x6ccd1c20, + 0x29ec4: 0x6c916620, 0x29ec6: 0x6d244c20, + 0x29ec8: 0x6d0ef420, 0x29ec9: 0x6ced6420, 0x29eca: 0x6cbc6e20, 0x29ecb: 0x6c953420, + 0x29ecc: 0x6d245e20, 0x29ecf: 0x6ce90620, + 0x29ed0: 0x6cf10820, 0x29ed2: 0x6cea8e20, + 0x29ed5: 0x6c5d1820, 0x29ed6: 0x6c079020, 0x29ed7: 0x6cbd0620, + 0x29ed9: 0x6c6c7420, 0x29eda: 0x6c7f3620, + 0x29edc: 0x6d356620, 0x29edd: 0x6d21ec20, 0x29edf: 0x6c22f020, + 0x29ee6: 0x6d139420, 0x29ee7: 0x6c2f0c20, + 0x29ee8: 0x6c145820, 0x29ee9: 0x6c2d9a20, 0x29eea: 0x6c97a220, + 0x29eec: 0x6c2afc20, 0x29eed: 0x6ceed020, 0x29eee: 0x6ca75020, 0x29eef: 0x6c835e20, + 0x29ef0: 0x6c0db820, 0x29ef1: 0x6cf39420, 0x29ef3: 0x6d320820, + 0x29ef6: 0x6cc77420, 0x29ef7: 0x6cec7c20, + 0x29ef8: 0x6c9dac20, 0x29ef9: 0x6c6c1020, 0x29efb: 0x6c544620, + 0x29efd: 0x6d2d5620, 0x29efe: 0x6cc80a20, 0x29eff: 0x6d3ec620, + // Block 0xa7c, offset 0x29f00 + 0x29f00: 0x6cac9420, 0x29f02: 0x6ca1a620, + 0x29f04: 0x6c9db220, 0x29f06: 0x6cb55820, 0x29f07: 0x6ca1a820, + 0x29f0a: 0x6d342c20, 0x29f0b: 0x6c04b020, + 0x29f0d: 0x6c9f1820, 0x29f0f: 0x6c933e20, + 0x29f11: 0x6cb55e20, 0x29f12: 0x6c1d0420, + 0x29f14: 0x6c84d220, 0x29f15: 0x6d196e20, + 0x29f18: 0x6c2b0620, 0x29f19: 0x6c25d220, 0x29f1b: 0x6c339020, + 0x29f1c: 0x6c96e820, 0x29f1d: 0x6d0e2c20, 0x29f1f: 0x6d2bba20, + 0x29f20: 0x6d0e2e20, 0x29f21: 0x6c339220, 0x29f22: 0x6cb42620, + 0x29f25: 0x6d273020, + 0x29f29: 0x6c5e5c20, 0x29f2a: 0x6c975420, 0x29f2b: 0x6c664620, + 0x29f2c: 0x6ca9e820, 0x29f2d: 0x6cbdc020, 0x29f2f: 0x6cbdc220, + 0x29f32: 0x6d13aa20, + 0x29f34: 0x6cdf5420, + 0x29f39: 0x6c655c20, + 0x29f3c: 0x6c141620, 0x29f3e: 0x6c28f220, 0x29f3f: 0x6ce2e220, + // Block 0xa7d, offset 0x29f40 + 0x29f40: 0x6c87ce20, 0x29f43: 0x6ca77c20, + 0x29f44: 0x6c158420, 0x29f45: 0x6d29f620, + 0x29f4a: 0x6d24b820, + 0x29f4c: 0x6d41e220, 0x29f4d: 0x6c0b2020, + 0x29f50: 0x6c1ef820, + 0x29f58: 0x6cc48c20, 0x29f5a: 0x6cc49820, 0x29f5b: 0x6d0f7020, + 0x29f5c: 0x6c0fe820, + 0x29f61: 0x6c247820, + 0x29f6c: 0x6c9cae20, 0x29f6e: 0x6c787420, + 0x29f70: 0x6c248420, + 0x29f77: 0x6cf7ce20, + 0x29f79: 0x6c968a20, 0x29f7b: 0x6cd22020, + 0x29f7c: 0x6c2d0420, 0x29f7f: 0x6cd22220, + // Block 0xa7e, offset 0x29f80 + 0x29f82: 0x6c2f7620, 0x29f83: 0x6c6ee420, + 0x29f85: 0x6d25a820, 0x29f86: 0x6c41b220, + 0x29f8a: 0x6c5ca420, 0x29f8b: 0x6c5f4e20, + 0x29f8d: 0x6caed420, 0x29f8f: 0x6c2ab220, + 0x29f91: 0x6c085e20, + 0x29f94: 0x6cacea20, 0x29f95: 0x6cded420, 0x29f97: 0x6d252220, + 0x29f98: 0x6c42ee20, 0x29f99: 0x6d252420, + 0x29f9f: 0x6c639220, + 0x29fa3: 0x6c799020, + 0x29fa6: 0x6c309820, + 0x29fa9: 0x6cfbd820, 0x29faa: 0x6cb80620, + 0x29fac: 0x6cca7c20, + 0x29fb0: 0x6d1b9820, 0x29fb3: 0x6c901a20, + 0x29fb6: 0x6ce29a20, 0x29fb7: 0x6c902420, + 0x29fba: 0x6cc60820, + 0x29fbd: 0x6d1b9020, 0x29fbe: 0x6cb2d820, 0x29fbf: 0x6cb41c20, + // Block 0xa7f, offset 0x29fc0 + 0x29fc0: 0x6d25be20, 0x29fc1: 0x6cc72a20, 0x29fc3: 0x6c399e20, + 0x29fc7: 0x6c4f5820, + 0x29fc8: 0x6c9c8820, 0x29fc9: 0x6c55ea20, 0x29fca: 0x6d3eb620, + 0x29fcc: 0x6c8d7e20, 0x29fcd: 0x6c6eea20, 0x29fce: 0x6cc72e20, + 0x29fd2: 0x6cb2e020, 0x29fd3: 0x6c49fc20, + 0x29fd4: 0x6c37ae20, + 0x29fdd: 0x6c247e20, 0x29fde: 0x6c760020, + 0x29fe6: 0x6d052a20, + 0x29fe8: 0x6c377a20, 0x29fe9: 0x6ce44420, 0x29feb: 0x6d0ff820, + 0x29fed: 0x6c010a20, 0x29fee: 0x6c560820, 0x29fef: 0x6cf7ca20, + 0x29ff1: 0x6c560a20, 0x29ff3: 0x6cd85220, + 0x29ff4: 0x6c854e20, 0x29ff6: 0x6d197020, 0x29ff7: 0x6c47f620, + 0x29ff9: 0x6ce16a20, + // Block 0xa80, offset 0x2a000 + 0x2a000: 0x6cc42420, 0x2a001: 0x6d3fe620, 0x2a002: 0x6c84de20, + 0x2a004: 0x6c69ec20, 0x2a007: 0x6c38fe20, + 0x2a008: 0x6cb47e20, 0x2a009: 0x6cd86620, 0x2a00b: 0x6c6b9020, + 0x2a00c: 0x6c91b220, 0x2a00d: 0x6c87d020, 0x2a00e: 0x6c158620, + 0x2a010: 0x6d122220, + 0x2a015: 0x6c5b0020, + 0x2a019: 0x6c53e420, 0x2a01a: 0x6c2cea20, 0x2a01b: 0x6cc0be20, + 0x2a01c: 0x6c74f820, 0x2a01e: 0x6cb0d420, + 0x2a022: 0x6c7c5220, + 0x2a025: 0x6cf82820, 0x2a026: 0x6ce30c20, + 0x2a029: 0x6d076820, + 0x2a02f: 0x6c0b6220, + 0x2a032: 0x6c50b020, 0x2a033: 0x6c88ac20, + 0x2a036: 0x6cdb7620, 0x2a037: 0x6c8ab220, + 0x2a03c: 0x6c6c7820, + // Block 0xa81, offset 0x2a040 + 0x2a041: 0x6c87d220, 0x2a042: 0x6c158820, + 0x2a045: 0x6cb65a20, 0x2a046: 0x6cb66c20, + 0x2a049: 0x6d3ec020, 0x2a04b: 0x6d3ec420, + 0x2a04d: 0x6cb6b220, 0x2a04f: 0x6cb6b820, + 0x2a050: 0x6d3ed020, 0x2a052: 0x6d2d1020, 0x2a053: 0x6d2d1420, + 0x2a054: 0x6cabec20, 0x2a056: 0x6c70d820, + 0x2a059: 0x6d0df420, + 0x2a05c: 0x6c4f8c20, 0x2a05d: 0x6ca37020, + 0x2a064: 0x6d0e0220, 0x2a066: 0x6d2e9c20, 0x2a067: 0x6cd2e020, + 0x2a068: 0x6d34ba20, + 0x2a06d: 0x6d2c0a20, + 0x2a074: 0x6cc73420, 0x2a075: 0x6d2c0c20, 0x2a077: 0x6d195820, + 0x2a078: 0x6ca02820, 0x2a079: 0x6d0b4020, 0x2a07b: 0x6d376620, + 0x2a07d: 0x6c7e3020, 0x2a07e: 0x6cfa1c20, + // Block 0xa82, offset 0x2a080 + 0x2a080: 0x6cb13820, 0x2a081: 0x6cdeec20, 0x2a083: 0x6d162a20, + 0x2a086: 0x6d051620, 0x2a087: 0x6d2d0c20, + 0x2a089: 0x6c34c420, 0x2a08a: 0x6c36e420, + 0x2a08e: 0x6d1ab420, + 0x2a090: 0x6c36ee20, 0x2a091: 0x6cdb8e20, 0x2a092: 0x6c016420, 0x2a093: 0x6c260420, + 0x2a095: 0x6ceb6420, 0x2a097: 0x6ceb6620, + 0x2a098: 0x6cfa1e20, 0x2a09b: 0x6c21ea20, + 0x2a09d: 0x6cdb9020, + 0x2a0a5: 0x6c62f420, 0x2a0a6: 0x6cba3620, 0x2a0a7: 0x6d410420, + 0x2a0a8: 0x6d2d0e20, 0x2a0a9: 0x6d280e20, 0x2a0aa: 0x6d2ea620, + 0x2a0ac: 0x6d159c20, + 0x2a0b2: 0x6d0b4220, 0x2a0b3: 0x6d266020, + 0x2a0b9: 0x6c51ac20, 0x2a0ba: 0x6cb88820, + 0x2a0be: 0x6c13c220, + // Block 0xa83, offset 0x2a0c0 + 0x2a0c3: 0x6cab7020, + 0x2a0c8: 0x6c560c20, 0x2a0ca: 0x6d0f2020, + 0x2a0cc: 0x6cbd0e20, 0x2a0cd: 0x6c0fd820, 0x2a0ce: 0x6cbafe20, 0x2a0cf: 0x6c6c1420, + 0x2a0db: 0x6ca6e820, + 0x2a0de: 0x6c162420, 0x2a0df: 0x6cbdf620, + 0x2a0e1: 0x6d2a3220, + 0x2a0e4: 0x6d1b3220, 0x2a0e5: 0x6d029c20, 0x2a0e7: 0x6cb6ba20, + 0x2a0e8: 0x6c673420, 0x2a0eb: 0x6d061420, + 0x2a0ed: 0x6d2bbc20, 0x2a0ef: 0x6c370420, + 0x2a0f3: 0x6d40a020, + 0x2a0f4: 0x6d163220, + 0x2a0f9: 0x6d34c820, 0x2a0fa: 0x6c87d420, + 0x2a0fd: 0x6c87d620, 0x2a0fe: 0x6d1aba20, + // Block 0xa84, offset 0x2a100 + 0x2a101: 0x6c88b220, 0x2a103: 0x6c158a20, + 0x2a105: 0x6c754820, 0x2a107: 0x6d28e620, + 0x2a10e: 0x6d2d1620, 0x2a10f: 0x6cb12220, + 0x2a111: 0x6c8fd220, 0x2a113: 0x6c8fd420, + 0x2a118: 0x6c8fe220, + 0x2a11d: 0x6c900020, + 0x2a120: 0x6c900c20, 0x2a122: 0x6c98b220, + 0x2a125: 0x6d30d020, + 0x2a12c: 0x6c423a20, 0x2a12d: 0x6c466a20, 0x2a12e: 0x6cc49a20, 0x2a12f: 0x6c248020, + 0x2a130: 0x6c68aa20, + 0x2a137: 0x6c0fec20, + 0x2a139: 0x6d3b4c20, 0x2a13a: 0x6cbfe820, 0x2a13b: 0x6d0f7220, + // Block 0xa85, offset 0x2a140 + 0x2a140: 0x6d003020, 0x2a142: 0x6c5b4820, 0x2a143: 0x6cc16c20, + 0x2a148: 0x6c8e0220, 0x2a14a: 0x6d1ab220, + 0x2a14e: 0x6cb0e820, + 0x2a152: 0x6c88b020, + // Block 0xa86, offset 0x2a180 + 0x2a19d: 0x6c343c20, + // Block 0xa87, offset 0x2a1c0 + 0x2a1c8: 0x6c040c20, + 0x2a1cf: 0x6d2d9220, + // Block 0xa88, offset 0x2a200 + 0x2a22e: 0x6c943c20, + // Block 0xa89, offset 0x2a240 + 0x2a24a: 0x6cd94a20, + 0x2a257: 0x6c73ac20, + // Block 0xa8a, offset 0x2a280 + 0x2a29d: 0x6d1d8e20, + // Block 0xa8b, offset 0x2a2c0 + 0x2a2f9: 0x6caa5c20, + // Block 0xa8c, offset 0x2a300 + 0x2a310: 0x6c230620, + // Block 0xa8d, offset 0x2a340 + 0x2a362: 0x6cfc9220, + // Block 0xa8e, offset 0x2a380 + 0x2a3a1: 0x6c85dc20, + // Block 0xa8f, offset 0x2a3c0 + 0x2a3c8: 0x6c3abc20, + 0x2a3d9: 0x6cdb3a20, + // Block 0xa90, offset 0x2a400 + 0x2a41c: 0x6c79dc20, + // Block 0xa91, offset 0x2a440 + 0x2a468: 0x6c1a9e20, + 0x2a478: 0x6d09b220, + // Block 0xa92, offset 0x2a480 + 0x2a4b0: 0x6cb86a20, + // Block 0xa93, offset 0x2a4c0 + 0x2a4d0: 0x6c45fe20, + // Block 0xa94, offset 0x2a500 + 0x2a500: 0x6c5ef220, + 0x2a528: 0x6c953a20, + // Block 0xa95, offset 0x2a540 + 0x2a559: 0x6d165020, + 0x2a55f: 0x6d146820, + 0x2a562: 0x6ca49820, + 0x2a570: 0x6cf7de20, 0x2a572: 0x6cffaa20, + // Block 0xa96, offset 0x2a580 + 0x2a58b: 0x6c73b020, + // Block 0xa97, offset 0x2a5c0 + 0x2a5c4: 0x6d268220, 0x2a5c6: 0x6c7b1020, + 0x2a5c9: 0x6c8cc220, + 0x2a5d0: 0x6ca5f020, 0x2a5d3: 0x6c108a20, + // Block 0xa98, offset 0x2a600 + 0x2a636: 0x6c4e3a20, + // Block 0xa99, offset 0x2a640 + 0x2a667: 0x6c3d5820, + 0x2a669: 0x6c230a20, + // Block 0xa9a, offset 0x2a680 + 0x2a68e: 0x6c74d220, + // Block 0xa9b, offset 0x2a6c0 + 0x2a6e0: 0x6d2eb220, + 0x2a6e6: 0x6c109020, 0x2a6e7: 0x6cda9a20, + 0x2a6ee: 0x6c59cc20, + 0x2a6f4: 0x6d2da220, + // Block 0xa9c, offset 0x2a700 + 0x2a71d: 0x6c73ea20, + 0x2a723: 0x6c4ea420, + 0x2a724: 0x6c003a20, + 0x2a728: 0x6ce33820, + // Block 0xa9d, offset 0x2a740 + 0x2a748: 0x6d06ca20, 0x2a749: 0x6c534620, + 0x2a752: 0x6c3e4620, + 0x2a754: 0x6c5b4020, 0x2a755: 0x6cd1e620, + 0x2a759: 0x6cb41220, + // Block 0xa9e, offset 0x2a780 + 0x2a79b: 0x6d33bc20, + 0x2a79e: 0x6c740c20, + 0x2a7a2: 0x6ca90020, + 0x2a7b6: 0x6c1c5220, + 0x2a7b8: 0x6ce36020, + // Block 0xa9f, offset 0x2a7c0 + 0x2a7c0: 0x6c857420, 0x2a7c1: 0x6cecb420, 0x2a7c2: 0x6d144620, 0x2a7c3: 0x48024420, + 0x2a7c4: 0x6ca62220, 0x2a7c5: 0x6cf43220, 0x2a7c6: 0x6ce9f420, 0x2a7c7: 0x6c0e1020, + 0x2a7c8: 0x6d28b220, 0x2a7c9: 0x6c071c20, 0x2a7ca: 0x6ccbb820, 0x2a7cb: 0x6cfe3c20, + 0x2a7cc: 0x6c75ee20, 0x2a7cd: 0x6cddc620, 0x2a7ce: 0x6c9dfe20, 0x2a7cf: 0x6ce92020, + 0x2a7d0: 0x6c5a2a20, 0x2a7d1: 0x6c720620, 0x2a7d2: 0x480a3820, 0x2a7d3: 0x44697220, + 0x2a7d4: 0x6ca57e20, 0x2a7d5: 0x6d292620, 0x2a7d6: 0x480a9620, 0x2a7d7: 0x6cc6ec20, + 0x2a7d8: 0x6d24d020, 0x2a7d9: 0x6c0da020, 0x2a7da: 0x6c2fd820, 0x2a7db: 0x6c7bdc20, + 0x2a7dc: 0x6cbee220, 0x2a7dd: 0x6cb9ec20, 0x2a7de: 0x6cc5a020, 0x2a7df: 0x6cafae20, + 0x2a7e0: 0x6c787a20, 0x2a7e1: 0x6c95a620, 0x2a7e2: 0x6c438c20, 0x2a7e3: 0x6c15bc20, + 0x2a7e4: 0x6c5fc020, 0x2a7e5: 0x6d1e1820, 0x2a7e6: 0x6c9e0c20, 0x2a7e7: 0x6cbd7c20, + 0x2a7e8: 0x6cce9420, 0x2a7e9: 0x6c059e20, 0x2a7ea: 0x6c22f420, 0x2a7eb: 0x6c06c620, + 0x2a7ec: 0x6c5b8420, 0x2a7ed: 0x6c068e20, 0x2a7ee: 0x6c0efe20, 0x2a7ef: 0x6c5fd220, + 0x2a7f0: 0x6c5fec20, 0x2a7f1: 0x6cbe3a20, 0x2a7f2: 0x6cbe3a20, 0x2a7f3: 0x6cbe3a20, + 0x2a7f4: 0x48145820, 0x2a7f5: 0x6c5a8620, 0x2a7f6: 0x6c5fb820, 0x2a7f7: 0x6cda0e20, + 0x2a7f8: 0x4816c620, 0x2a7f9: 0x6c697a20, 0x2a7fa: 0x6c1bd620, 0x2a7fb: 0x6d108620, + 0x2a7fc: 0x6cfc7820, 0x2a7fd: 0x6cf56a20, 0x2a7fe: 0x6c19b620, 0x2a7ff: 0x6d385a20, + // Block 0xaa0, offset 0x2a800 + 0x2a800: 0x6c35e420, 0x2a801: 0x6c9ec220, 0x2a802: 0x6ce0e820, 0x2a803: 0x6cb6ec20, + 0x2a804: 0x6cfb5820, 0x2a805: 0x6ccd8a20, 0x2a806: 0x6ccd8a20, 0x2a807: 0x6c5bbc20, + 0x2a808: 0x6c1aae20, 0x2a809: 0x6d2bd620, 0x2a80a: 0x6d110420, 0x2a80b: 0x6ce8d420, + 0x2a80c: 0x6ce0a020, 0x2a80d: 0x6ce8d620, 0x2a80e: 0x6c4fd020, 0x2a80f: 0x6cae3420, + 0x2a810: 0x6cbc9020, 0x2a811: 0x6d3c2c20, 0x2a812: 0x6c19c620, 0x2a813: 0x6d344c20, + 0x2a814: 0x6ce92220, 0x2a815: 0x6d03ca20, 0x2a816: 0x6c223620, 0x2a817: 0x6c064c20, + 0x2a818: 0x6c2c7c20, 0x2a819: 0x4829c820, 0x2a81a: 0x6c972420, 0x2a81b: 0x6c554020, + 0x2a81c: 0x6c3c9c20, 0x2a81d: 0x6c341620, 0x2a81e: 0x6c9c0420, 0x2a81f: 0x6cceea20, + 0x2a820: 0x6c1bda20, 0x2a821: 0x482dd420, 0x2a822: 0x6c5ea220, 0x2a823: 0x6d20ec20, + 0x2a824: 0x6ce9f820, 0x2a825: 0x6cb1e820, 0x2a826: 0x6c3fe420, 0x2a827: 0x6ccae220, + 0x2a828: 0x6c139820, 0x2a829: 0x6cc52820, 0x2a82a: 0x6c804820, 0x2a82b: 0x6c804820, + 0x2a82c: 0x48339020, 0x2a82d: 0x6d24da20, 0x2a82e: 0x6d365020, 0x2a82f: 0x6ca91020, + 0x2a830: 0x6c061c20, 0x2a831: 0x6c81ee20, 0x2a832: 0x6cd45020, 0x2a833: 0x6c674e20, + 0x2a834: 0x6c28f820, 0x2a835: 0x6d1edc20, 0x2a836: 0x6d11f020, 0x2a837: 0x6ce8a020, + 0x2a838: 0x6c17fa20, 0x2a839: 0x6d053020, 0x2a83a: 0x6cb8a420, 0x2a83b: 0x6cf3b020, + 0x2a83c: 0x6d0d7a20, 0x2a83d: 0x483bcc20, 0x2a83e: 0x6c2ccc20, 0x2a83f: 0x6d3e3620, + // Block 0xaa1, offset 0x2a840 + 0x2a840: 0x6c15c620, 0x2a841: 0x6d09d820, 0x2a842: 0x6c175e20, 0x2a843: 0x6d15b220, + 0x2a844: 0x6d0a8c20, 0x2a845: 0x6cd71420, 0x2a846: 0x6c997a20, 0x2a847: 0x6c3b8620, + 0x2a848: 0x6c980020, 0x2a849: 0x48430620, 0x2a84a: 0x6d16e820, 0x2a84b: 0x6c0e0e20, + 0x2a84c: 0x6c097620, 0x2a84d: 0x6cd5c220, 0x2a84e: 0x6c80b420, 0x2a84f: 0x6cd79620, + 0x2a850: 0x6c45cc20, 0x2a851: 0x48466220, 0x2a852: 0x48466220, 0x2a853: 0x6d20e820, + 0x2a854: 0x6ce1b020, 0x2a855: 0x6ce1b020, 0x2a856: 0x6d16b220, 0x2a857: 0x48657020, + 0x2a858: 0x48c3b420, 0x2a859: 0x6d03c020, 0x2a85a: 0x6c2dc420, 0x2a85b: 0x6ccd7820, + 0x2a85c: 0x6c300020, 0x2a85d: 0x6cc58620, 0x2a85e: 0x6d357420, 0x2a85f: 0x6c7bb620, + 0x2a860: 0x6d24d420, 0x2a861: 0x6c5a4620, 0x2a862: 0x6c73f820, 0x2a863: 0x6c5b4c20, + 0x2a864: 0x6c2ff820, 0x2a865: 0x6c339820, 0x2a866: 0x6c224e20, 0x2a867: 0x6c599420, + 0x2a868: 0x6cd0ac20, 0x2a869: 0x6c599420, 0x2a86a: 0x6c90a220, 0x2a86b: 0x6d2b8a20, + 0x2a86c: 0x6cfd0820, 0x2a86d: 0x6c3be420, 0x2a86e: 0x6c11da20, 0x2a86f: 0x6c9b4a20, + 0x2a870: 0x6c1a5420, 0x2a871: 0x6c804a20, 0x2a872: 0x6c19b220, 0x2a873: 0x6c63b620, + 0x2a874: 0x6c7a1820, 0x2a875: 0x6c063220, 0x2a876: 0x6c036820, 0x2a877: 0x6c72e420, + 0x2a878: 0x48561820, 0x2a879: 0x6cecf820, 0x2a87a: 0x6cb1ea20, 0x2a87b: 0x6ccf2c20, + 0x2a87c: 0x6ccae020, 0x2a87d: 0x6c600020, 0x2a87e: 0x4857e220, 0x2a87f: 0x6c6d1420, + // Block 0xaa2, offset 0x2a880 + 0x2a880: 0x6d0ca820, 0x2a881: 0x6d0d6620, 0x2a882: 0x6c30b620, 0x2a883: 0x6ca07220, + 0x2a884: 0x6c67f620, 0x2a885: 0x6c5ae420, 0x2a886: 0x6c691420, 0x2a887: 0x4474d820, + 0x2a888: 0x6c9fa820, 0x2a889: 0x6c6e8420, 0x2a88a: 0x48601420, 0x2a88b: 0x6c61ec20, + 0x2a88c: 0x6cd4b820, 0x2a88d: 0x6c6cea20, 0x2a88e: 0x6cf01620, 0x2a88f: 0x6cd55a20, + 0x2a890: 0x6cf15420, 0x2a891: 0x6c16e420, 0x2a892: 0x6c994e20, 0x2a893: 0x6c9e1820, + 0x2a894: 0x6d41b020, 0x2a895: 0x6c6d2820, 0x2a896: 0x6ca31420, 0x2a897: 0x6ce05420, + 0x2a898: 0x6c80f820, 0x2a899: 0x6cee5220, 0x2a89a: 0x6d3f9820, 0x2a89b: 0x6cb6d620, + 0x2a89c: 0x6c0bea20, 0x2a89d: 0x48678620, 0x2a89e: 0x6c572820, 0x2a89f: 0x6c48dc20, + 0x2a8a0: 0x6c5e8e20, 0x2a8a1: 0x6cca6a20, 0x2a8a2: 0x6c99ec20, 0x2a8a3: 0x4868da20, + 0x2a8a4: 0x6c022a20, 0x2a8a5: 0x6c078420, 0x2a8a6: 0x6d3e3a20, 0x2a8a7: 0x6c513820, + 0x2a8a8: 0x6d2be020, 0x2a8a9: 0x6d112020, 0x2a8aa: 0x6c415020, 0x2a8ab: 0x6ccefe20, + 0x2a8ac: 0x486d4620, 0x2a8ad: 0x6d370620, 0x2a8ae: 0x6d159820, 0x2a8af: 0x6c22aa20, + 0x2a8b0: 0x48714e20, 0x2a8b1: 0x6d05d420, 0x2a8b2: 0x6c7d9c20, 0x2a8b3: 0x6cdc4620, + 0x2a8b4: 0x6cf15820, 0x2a8b5: 0x6ccbda20, 0x2a8b6: 0x6cbc4020, 0x2a8b7: 0x48751a20, + 0x2a8b8: 0x483a1620, 0x2a8b9: 0x4875f420, 0x2a8ba: 0x6c391c20, 0x2a8bb: 0x48797820, + 0x2a8bc: 0x6d0c6820, 0x2a8bd: 0x6c077e20, 0x2a8be: 0x6cb8a820, 0x2a8bf: 0x6cf3b620, + // Block 0xaa3, offset 0x2a8c0 + 0x2a8c0: 0x6cac1e20, 0x2a8c1: 0x6c4d3a20, 0x2a8c2: 0x6c8e4a20, 0x2a8c3: 0x6c502e20, + 0x2a8c4: 0x6c6cee20, 0x2a8c5: 0x6ca80820, 0x2a8c6: 0x6c07ac20, 0x2a8c7: 0x6cb28620, + 0x2a8c8: 0x6c42a220, 0x2a8c9: 0x6d0c0820, 0x2a8ca: 0x6c903620, 0x2a8cb: 0x6d3e4020, + 0x2a8cc: 0x6c2cce20, 0x2a8cd: 0x6ccc0a20, 0x2a8ce: 0x6d0bf820, 0x2a8cf: 0x6c177620, + 0x2a8d0: 0x487ebc20, 0x2a8d1: 0x487f1c20, 0x2a8d2: 0x6c3b8c20, 0x2a8d3: 0x6d270a20, + 0x2a8d4: 0x6c6eb420, 0x2a8d5: 0x6d1cba20, 0x2a8d6: 0x6cd63020, 0x2a8d7: 0x6cb9e020, + 0x2a8d8: 0x6d28f220, 0x2a8d9: 0x6d3bbe20, 0x2a8da: 0x6ce08e20, 0x2a8db: 0x480a4a20, + 0x2a8dc: 0x6c32cc20, 0x2a8dd: 0x4884c620, 0x2a8de: 0x6c233e20, 0x2a8df: 0x48875620, + 0x2a8e0: 0x6c24c420, 0x2a8e1: 0x6c74c820, 0x2a8e2: 0x6d2c3a20, 0x2a8e3: 0x488c1020, + 0x2a8e4: 0x6cf61a20, 0x2a8e5: 0x6c074020, 0x2a8e6: 0x6d0e3c20, 0x2a8e7: 0x48902820, + 0x2a8e8: 0x6cde2020, 0x2a8e9: 0x6cedda20, 0x2a8ea: 0x6c45d620, 0x2a8eb: 0x6d268820, + 0x2a8ec: 0x6cb29020, 0x2a8ed: 0x6cb29020, 0x2a8ee: 0x6c277a20, 0x2a8ef: 0x6d215e20, + 0x2a8f0: 0x6d325020, 0x2a8f1: 0x6cdd8a20, 0x2a8f2: 0x6cbf7620, 0x2a8f3: 0x6d03d220, + 0x2a8f4: 0x6cc89c20, 0x2a8f5: 0x48986c20, 0x2a8f6: 0x6d28f620, 0x2a8f7: 0x48992420, + 0x2a8f8: 0x6d176620, 0x2a8f9: 0x6cb2b420, 0x2a8fa: 0x6d226e20, 0x2a8fb: 0x489f4220, + 0x2a8fc: 0x489f7020, 0x2a8fd: 0x48a08820, 0x2a8fe: 0x6d0c7620, 0x2a8ff: 0x6c627820, + // Block 0xaa4, offset 0x2a900 + 0x2a900: 0x6d344020, 0x2a901: 0x48a1e620, 0x2a902: 0x48a1e420, 0x2a903: 0x48a23220, + 0x2a904: 0x48a26620, 0x2a905: 0x6d313c20, 0x2a906: 0x6d313e20, 0x2a907: 0x6d313e20, + 0x2a908: 0x6c736420, 0x2a909: 0x6c6ad220, 0x2a90a: 0x6c188220, 0x2a90b: 0x6d130220, + 0x2a90c: 0x6cd23420, 0x2a90d: 0x48a83a20, 0x2a90e: 0x6d03e220, 0x2a90f: 0x6c926e20, + 0x2a910: 0x6ce4ba20, 0x2a911: 0x6c5b7020, 0x2a912: 0x6c6fd820, 0x2a913: 0x6d411420, + 0x2a914: 0x6c1baa20, 0x2a915: 0x6c8f3a20, 0x2a916: 0x6c3e9c20, 0x2a917: 0x6cd52420, + 0x2a918: 0x6c657420, 0x2a919: 0x6c47c420, 0x2a91a: 0x6c624a20, 0x2a91b: 0x6cf1f020, + 0x2a91c: 0x48b2f820, 0x2a91d: 0x6ce4c020, 0x2a91e: 0x6ce4c020, 0x2a91f: 0x6cb26020, + 0x2a920: 0x6cb2be20, 0x2a921: 0x48b75620, 0x2a922: 0x6d3bde20, 0x2a923: 0x6d3a2820, + 0x2a924: 0x6cf00020, 0x2a925: 0x6c178020, 0x2a926: 0x6c076020, 0x2a927: 0x6cf8f420, + 0x2a928: 0x6c680820, 0x2a929: 0x6cca3020, 0x2a92a: 0x6c61b020, 0x2a92b: 0x48bf0c20, + 0x2a92c: 0x6c07ee20, 0x2a92d: 0x6d10b020, 0x2a92e: 0x6d3e6a20, 0x2a92f: 0x6d400620, + 0x2a930: 0x6ccac220, 0x2a931: 0x6c965020, 0x2a932: 0x6d03dc20, 0x2a933: 0x48c48e20, + 0x2a934: 0x6c9a0420, 0x2a935: 0x48c5b220, 0x2a936: 0x6c177e20, 0x2a937: 0x48c67c20, + 0x2a938: 0x6d104a20, 0x2a939: 0x6c027e20, 0x2a93a: 0x6d30d220, 0x2a93b: 0x48c9b420, + 0x2a93c: 0x48ca4620, 0x2a93d: 0x6cb25820, 0x2a93e: 0x48cb5020, 0x2a93f: 0x6c236620, + // Block 0xaa5, offset 0x2a940 + 0x2a940: 0x6c78f420, 0x2a941: 0x6cc5d220, 0x2a942: 0x6d22da20, 0x2a943: 0x6c252c20, + 0x2a944: 0x6c231a20, 0x2a945: 0x6caff420, 0x2a946: 0x6d1d4020, 0x2a947: 0x48cf4e20, + 0x2a948: 0x48cf6a20, 0x2a949: 0x6d085420, 0x2a94a: 0x48673820, 0x2a94b: 0x6d20e820, + 0x2a94c: 0x6cf89220, 0x2a94d: 0x6c225220, 0x2a94e: 0x6c07f020, 0x2a94f: 0x6cb6ce20, + 0x2a950: 0x6d22c820, 0x2a951: 0x6d338420, 0x2a952: 0x6c813e20, 0x2a953: 0x6c570620, + 0x2a954: 0x6c398620, 0x2a955: 0x6d0b1420, 0x2a956: 0x6c7a7620, 0x2a957: 0x48d67820, + 0x2a958: 0x6cc91420, 0x2a959: 0x6c148e20, 0x2a95a: 0x6cc65e20, 0x2a95b: 0x6c6aa820, + 0x2a95c: 0x6cf3bc20, 0x2a95d: 0x6c988a20, 0x2a95e: 0x6c2bf220, 0x2a95f: 0x6d311420, + 0x2a960: 0x6cb28e20, 0x2a961: 0x6c711c20, 0x2a962: 0x6c757020, 0x2a963: 0x6c114420, + 0x2a964: 0x48d86c20, 0x2a965: 0x6cdd8420, 0x2a966: 0x48d9aa20, 0x2a967: 0x448a5620, + 0x2a968: 0x6cb2ae20, 0x2a969: 0x6c6ca620, 0x2a96a: 0x6c25ea20, 0x2a96b: 0x48e79420, + 0x2a96c: 0x6cc8a220, 0x2a96d: 0x48de5820, 0x2a96e: 0x6c19a420, 0x2a96f: 0x6c936e20, + 0x2a970: 0x6c175420, 0x2a971: 0x6c93c420, 0x2a972: 0x6c7cba20, 0x2a973: 0x6caaa220, + 0x2a974: 0x6c91c420, 0x2a975: 0x6c7c4820, 0x2a976: 0x6cf90620, 0x2a977: 0x6c1aa420, + 0x2a978: 0x6cb8ca20, 0x2a979: 0x6d24fc20, 0x2a97a: 0x6cb2b020, 0x2a97b: 0x6d276220, + 0x2a97c: 0x6c2ed620, 0x2a97d: 0x6d39be20, 0x2a97e: 0x6c22de20, 0x2a97f: 0x6c5f4420, + // Block 0xaa6, offset 0x2a980 + 0x2a980: 0x6c4b2220, 0x2a981: 0x6cfe0220, 0x2a982: 0x6c22ec20, 0x2a983: 0x6d3cd820, + 0x2a984: 0x6d13be20, 0x2a985: 0x6c668020, 0x2a986: 0x6c8e6020, 0x2a987: 0x6cd72420, + 0x2a988: 0x6c929c20, 0x2a989: 0x6d0daa20, 0x2a98a: 0x6c996a20, 0x2a98b: 0x48f15c20, + 0x2a98c: 0x48f2cc20, 0x2a98d: 0x6ca8e820, 0x2a98e: 0x6d25ea20, 0x2a98f: 0x6c1a2220, + 0x2a990: 0x6d23f620, 0x2a991: 0x6c0bdc20, 0x2a992: 0x6cd2b020, 0x2a993: 0x6c649220, + 0x2a994: 0x6c498620, 0x2a995: 0x6c09b020, 0x2a996: 0x6c424420, 0x2a997: 0x6cb6ea20, + 0x2a998: 0x6cd61020, 0x2a999: 0x6d2fdc20, 0x2a99a: 0x6c038220, 0x2a99b: 0x6c658c20, + 0x2a99c: 0x6cb11c20, 0x2a99d: 0x4811bc20, 0x2a99e: 0x6cc5e420, 0x2a99f: 0x6cd50820, + 0x2a9a0: 0x490ba420, 0x2a9a1: 0x490bda20, 0x2a9a2: 0x6cb6c420, 0x2a9a3: 0x6cb27e20, + 0x2a9a4: 0x6d3e4a20, 0x2a9a5: 0x490e5c20, 0x2a9a6: 0x6c176420, 0x2a9a7: 0x6c0f1c20, + 0x2a9a8: 0x6d07ca20, 0x2a9a9: 0x6c575620, 0x2a9aa: 0x6c0dee20, 0x2a9ab: 0x6cbb5020, + 0x2a9ac: 0x6d295820, 0x2a9ad: 0x4917f420, 0x2a9ae: 0x6c763420, 0x2a9af: 0x6cae7c20, + 0x2a9b0: 0x6ccca420, 0x2a9b1: 0x491aee20, 0x2a9b2: 0x6cef3620, 0x2a9b3: 0x6cb8e820, + 0x2a9b4: 0x6cf69820, 0x2a9b5: 0x6d280620, 0x2a9b6: 0x6cace820, 0x2a9b7: 0x6cb26420, + 0x2a9b8: 0x6c930020, 0x2a9b9: 0x6c160820, 0x2a9ba: 0x6c0ab220, 0x2a9bb: 0x49281420, + 0x2a9bc: 0x6c7d6c20, 0x2a9bd: 0x6d0eb020, 0x2a9be: 0x6c35b420, 0x2a9bf: 0x6c35b420, + // Block 0xaa7, offset 0x2a9c0 + 0x2a9c0: 0x6cb26620, 0x2a9c1: 0x6d097020, 0x2a9c2: 0x6c5eb020, 0x2a9c3: 0x6c04d420, + 0x2a9c4: 0x6c36b220, 0x2a9c5: 0x6d276c20, 0x2a9c6: 0x6c060a20, 0x2a9c7: 0x6cea1420, + 0x2a9c8: 0x6c423020, 0x2a9c9: 0x6cbf6820, 0x2a9ca: 0x6d320420, 0x2a9cb: 0x6c62d820, + 0x2a9cc: 0x6c64ec20, 0x2a9cd: 0x6c702e20, 0x2a9ce: 0x6c60f620, 0x2a9cf: 0x6cb02c20, + 0x2a9d0: 0x6d21ea20, 0x2a9d1: 0x6c968620, 0x2a9d2: 0x6ccc2e20, 0x2a9d3: 0x49441c20, + 0x2a9d4: 0x49452220, 0x2a9d5: 0x6c966820, 0x2a9d6: 0x6cba8620, 0x2a9d7: 0x6d353420, + 0x2a9d8: 0x6c9e0a20, 0x2a9d9: 0x6d342a20, 0x2a9da: 0x6c9d7420, 0x2a9db: 0x6c3ba420, + 0x2a9dc: 0x6c08a220, 0x2a9dd: 0x6cb13820, + // Block 0xaa8, offset 0x2aa00 + 0x2aa00: 0x6c00c220, 0x2aa01: 0xe0002416, 0x2aa02: 0x029cb684, 0x2aa03: 0x029cb484, + 0x2aa04: 0x6c000e20, 0x2aa05: 0x029d7684, 0x2aa06: 0x6c008a20, 0x2aa07: 0x6c009220, + 0x2aa08: 0x6c009e20, 0x2aa09: 0x02a40484, 0x2aa0a: 0x6c00b820, 0x2aa0b: 0xe0002413, + 0x2aa0c: 0x6c01a420, 0x2aa0d: 0x6c01a620, 0x2aa0e: 0xe000241f, 0x2aa0f: 0x02b84684, + 0x2aa10: 0x02b84484, 0x2aa11: 0xe0002422, 0x2aa12: 0x02bbe684, 0x2aa13: 0x02bcf484, + 0x2aa14: 0x02bea284, 0x2aa15: 0x6c01e620, 0x2aa16: 0x02bf8884, 0x2aa17: 0xe0002428, + 0x2aa18: 0x02c49884, 0x2aa19: 0x02ca6a84, 0x2aa1b: 0x02cbc284, + 0x2aa1c: 0x6c049420, 0x2aa1d: 0x6c049a20, 0x2aa1e: 0xe0002436, 0x2aa1f: 0x2c098083, + 0x2aa20: 0x02d82284, 0x2aa21: 0x02d86a84, 0x2aa22: 0x02d87484, 0x2aa23: 0x02e0d884, + 0x2aa24: 0x02e45684, 0x2aa25: 0x6c04d420, 0x2aa26: 0x029c5884, 0x2aa27: 0x6c04ee20, + 0x2aa28: 0x02e55a84, 0x2aa29: 0xe000243f, 0x2aa2a: 0x6c0a1820, 0x2aa2b: 0xe0002445, + 0x2aa2c: 0x6c0a3220, 0x2aa2d: 0x02f27684, 0x2aa2e: 0x6c13f420, 0x2aa2f: 0x02f9f284, + 0x2aa30: 0x02fd3e84, 0x2aa31: 0x02fea684, 0x2aa32: 0x02fea484, 0x2aa33: 0xe0002451, + 0x2aa34: 0xe0002454, 0x2aa35: 0xe000244e, 0x2aa36: 0x6c143820, 0x2aa37: 0xe000245a, + 0x2aa38: 0x02ff1684, 0x2aa39: 0x03000484, 0x2aa3a: 0x03010084, 0x2aa3b: 0xe000245d, + 0x2aa3c: 0x6c050a20, 0x2aa3d: 0xe0002463, 0x2aa3e: 0x6c020220, 0x2aa3f: 0xe0002466, + // Block 0xaa9, offset 0x2aa40 + 0x2aa40: 0xe0002469, 0x2aa41: 0x030c9c84, 0x2aa42: 0x0310c884, 0x2aa43: 0x03130084, + 0x2aa44: 0x0312fe84, 0x2aa45: 0x03138284, 0x2aa46: 0x6c26a420, 0x2aa47: 0xe000246c, + 0x2aa48: 0x03174084, 0x2aa49: 0x031a3a84, 0x2aa4a: 0x6c270020, 0x2aa4b: 0x031ecc84, + 0x2aa4c: 0x6c020620, 0x2aa4d: 0x6c051c20, 0x2aa4e: 0xe0002475, 0x2aa4f: 0x6c00cc20, + 0x2aa50: 0x03290a84, 0x2aa51: 0x032aee84, 0x2aa52: 0x032af084, 0x2aa53: 0x032afe84, + 0x2aa54: 0x032bd084, 0x2aa55: 0xe000247b, 0x2aa56: 0x6c00ce20, 0x2aa57: 0x6c427620, + 0x2aa58: 0x032ea484, 0x2aa59: 0x032fcc84, 0x2aa5a: 0x0330ea84, 0x2aa5b: 0x03319c84, + 0x2aa5c: 0x0331bc84, 0x2aa5d: 0x0331be84, 0x2aa5e: 0x6c636020, 0x2aa5f: 0x0331c084, + 0x2aa60: 0x0332c684, 0x2aa61: 0xe0002484, 0x2aa62: 0x0334d884, 0x2aa63: 0x6c63aa20, + 0x2aa64: 0xe000248a, 0x2aa65: 0x0338f884, 0x2aa66: 0x033c3e84, 0x2aa67: 0xe000248d, + 0x2aa68: 0x033d4c84, 0x2aa69: 0x033d8884, 0x2aa6a: 0x033dfc84, 0x2aa6b: 0xe0002490, + 0x2aa6c: 0x033ea084, 0x2aa6d: 0xe0002493, 0x2aa6e: 0x033efe84, 0x2aa6f: 0xe0002496, + 0x2aa70: 0x033f3284, 0x2aa71: 0xe0002499, 0x2aa72: 0xe000249c, 0x2aa73: 0x2c28ac83, + // Block 0xaaa, offset 0x2aa80 + 0x2aa80: 0x2c000286, 0x2aa81: 0x2c000483, 0x2aa82: 0x2c000683, 0x2aa83: 0x2c000883, + 0x2aa84: 0x2c001084, 0x2aa85: 0x2c002483, 0x2aa86: 0x2c007486, 0x2aa87: 0x2c007c83, + 0x2aa88: 0x2c007e84, 0x2aa89: 0x2c008483, 0x2aa8a: 0x2c008683, 0x2aa8b: 0x2c008884, + 0x2aa8c: 0x2c008c83, 0x2aa8d: 0x2c008e83, 0x2aa8e: 0x2c009083, 0x2aa8f: 0x2c009483, + 0x2aa90: 0x2c009a83, 0x2aa91: 0x2c00a083, 0x2aa92: 0x2c00a883, 0x2aa93: 0x2c00aa83, + 0x2aa94: 0x2c00ac83, 0x2aa95: 0x2c00b083, 0x2aa96: 0x2c00b483, 0x2aa97: 0x2c00b685, + 0x2aa98: 0x2c00ba83, 0x2aa99: 0x2c00bc83, 0x2aa9a: 0x2c00be83, 0x2aa9b: 0x2c00c083, + 0x2aa9c: 0x2c00c483, 0x2aa9d: 0x2c018083, 0x2aa9e: 0x2c018283, 0x2aa9f: 0x2c018484, + 0x2aaa0: 0x2c018683, 0x2aaa1: 0x2c018883, 0x2aaa2: 0x2c018c83, 0x2aaa3: 0x2c018e83, + 0x2aaa4: 0x2c019083, 0x2aaa5: 0x2c019484, 0x2aaa6: 0x2c019683, 0x2aaa7: 0x2c01a083, + 0x2aaa8: 0x2c01a283, 0x2aaa9: 0x2c01a883, 0x2aaaa: 0x2c01ac83, 0x2aaab: 0x2c01b283, + 0x2aaac: 0x2c01b683, 0x2aaad: 0x2c01ba83, 0x2aaae: 0x2c01bc83, 0x2aaaf: 0x2c01c483, + 0x2aab0: 0x2c01c683, 0x2aab1: 0x2c01cc83, 0x2aab2: 0x2c01ce83, 0x2aab3: 0x2c01d283, + 0x2aab4: 0x2c01d483, 0x2aab5: 0x2c01d683, 0x2aab6: 0x2c01d883, 0x2aab7: 0x2c01dc83, + 0x2aab8: 0x2c01e083, 0x2aab9: 0x2c01e883, 0x2aaba: 0x2c01ec83, 0x2aabb: 0x2c01ee83, + 0x2aabc: 0x2c046683, 0x2aabd: 0x2c046c83, 0x2aabe: 0x2c046e83, 0x2aabf: 0x2c047484, + // Block 0xaab, offset 0x2aac0 + 0x2aac0: 0x2c047e83, 0x2aac1: 0x2c048083, 0x2aac2: 0x2c048484, 0x2aac3: 0x2c048683, + 0x2aac4: 0x2c048a83, 0x2aac5: 0x2c048e83, 0x2aac6: 0x2c049083, 0x2aac7: 0x2c049684, + 0x2aac8: 0x2c049883, 0x2aac9: 0x2c049c85, 0x2aaca: 0x2c049e84, 0x2aacb: 0x2c04a683, + 0x2aacc: 0x2c04a883, 0x2aacd: 0x2c04ae83, 0x2aace: 0x2c04b483, 0x2aacf: 0x2c04b683, + 0x2aad0: 0x2c04bc83, 0x2aad1: 0x2c04be83, 0x2aad2: 0x2c04c283, 0x2aad3: 0x2c04c483, + 0x2aad4: 0x2c04c684, 0x2aad5: 0x2c04d084, 0x2aad6: 0x2c04d683, 0x2aad7: 0x2c04de83, + 0x2aad8: 0x2c04e083, 0x2aad9: 0x2c04e483, 0x2aada: 0x2c04e883, 0x2aadb: 0x2c04ec83, + 0x2aadc: 0x2c04f083, 0x2aadd: 0x2c04f483, 0x2aade: 0x2c09ee83, 0x2aadf: 0x2c09f283, + 0x2aae0: 0x2c09fa83, 0x2aae1: 0x2c09fc83, 0x2aae2: 0x2c09fe83, 0x2aae3: 0x2c0a0284, + 0x2aae4: 0x2c0a0683, 0x2aae5: 0x2c0a0a83, 0x2aae6: 0x2c0a1a83, 0x2aae7: 0x2c0a2083, + 0x2aae8: 0x2c0a2283, 0x2aae9: 0x2c0a2483, 0x2aaea: 0x2c0a2683, 0x2aaeb: 0x2c0a2883, + 0x2aaec: 0x2c0a2a83, 0x2aaed: 0x2c0a2c83, 0x2aaee: 0x2c0a2e83, 0x2aaef: 0x2c0a3083, + 0x2aaf0: 0x2c0a3483, 0x2aaf1: 0x2c0a3883, 0x2aaf2: 0x2c0a3c83, 0x2aaf3: 0x2c0a4083, + 0x2aaf4: 0x2c0a4483, 0x2aaf5: 0x2c141083, 0x2aaf6: 0x2c141483, 0x2aaf7: 0x2c141683, + 0x2aaf8: 0x2c143083, 0x2aaf9: 0x2c143483, 0x2aafa: 0x2c143a83, 0x2aafb: 0x2c144283, + 0x2aafc: 0x2c144483, 0x2aafd: 0x2c144883, 0x2aafe: 0x2c144c83, 0x2aaff: 0x2c145083, + // Block 0xaac, offset 0x2ab00 + 0x2ab00: 0x2c145283, 0x2ab01: 0x2c145683, 0x2ab02: 0x2c147a83, 0x2ab03: 0x2c147e83, + 0x2ab04: 0x2c148283, 0x2ab05: 0x2c148883, 0x2ab06: 0x2c149083, 0x2ab07: 0x2c149283, + 0x2ab08: 0x2c149483, 0x2ab09: 0x2c149883, 0x2ab0a: 0x2c149a83, 0x2ab0b: 0x2c149e83, + 0x2ab0c: 0x2c14ca83, 0x2ab0d: 0x2c14cc83, 0x2ab0e: 0x2c14ce83, 0x2ab0f: 0x2c14d083, + 0x2ab10: 0x2c14d283, 0x2ab11: 0x2c14d483, 0x2ab12: 0x2c26a083, 0x2ab13: 0x2c26a683, + 0x2ab14: 0x2c26aa83, 0x2ab15: 0x2c26e683, 0x2ab16: 0x2c26ea83, 0x2ab17: 0x2c26ec83, + 0x2ab18: 0x2c26f283, 0x2ab19: 0x2c26f483, 0x2ab1a: 0x2c26fa83, 0x2ab1b: 0x2c26fc84, + 0x2ab1c: 0x2c270283, 0x2ab1d: 0x2c270683, 0x2ab1e: 0x2c270e83, 0x2ab1f: 0x2c271c83, + 0x2ab20: 0x2c272083, 0x2ab21: 0x2c272683, 0x2ab22: 0x2c278a83, 0x2ab23: 0x2c27ec83, + 0x2ab24: 0x2c27ee83, 0x2ab25: 0x2c27f083, 0x2ab26: 0x2c41dc84, 0x2ab27: 0x2c41fe83, + 0x2ab28: 0x2c420283, 0x2ab29: 0x2c421083, 0x2ab2a: 0x2c427283, 0x2ab2b: 0x2c427483, + 0x2ab2c: 0x2c427883, 0x2ab2d: 0x2c427a83, 0x2ab2e: 0x2c427e83, 0x2ab2f: 0x2c632e83, + 0x2ab30: 0x2c633283, 0x2ab31: 0x2c633483, 0x2ab32: 0x2c633c83, 0x2ab33: 0x2c633e83, + 0x2ab34: 0x2c634083, 0x2ab35: 0x2c634e83, 0x2ab36: 0x2c635c83, 0x2ab37: 0x2c636283, + 0x2ab38: 0x2c637e83, 0x2ab39: 0x2c638283, 0x2ab3a: 0x2c8a8e83, 0x2ab3b: 0x2c8aae83, + 0x2ab3c: 0x2c8ab083, 0x2ab3d: 0x2c8ab283, 0x2ab3e: 0x2c8ab483, 0x2ab3f: 0x2c8aba83, + // Block 0xaad, offset 0x2ab40 + 0x2ab40: 0x2c8abc83, 0x2ab41: 0x2c8abe83, 0x2ab42: 0x2cb74483, 0x2ab43: 0x2cb75283, + 0x2ab44: 0x2cb78283, 0x2ab45: 0x2cb78683, 0x2ab46: 0x2cb78a83, 0x2ab47: 0x2cb79483, + 0x2ab48: 0x2ce8b483, 0x2ab49: 0x2ce8b883, 0x2ab4a: 0x2ce8ba83, 0x2ab4b: 0x2ce8be83, + 0x2ab4c: 0x2d187483, 0x2ab4d: 0x2d187883, 0x2ab4e: 0x2d187a83, 0x2ab4f: 0x2d188083, + 0x2ab50: 0x2d478083, 0x2ab51: 0x2d478283, 0x2ab52: 0x2d75b683, 0x2ab53: 0x2d9f9c83, + 0x2ab54: 0x2d9f9e83, 0x2ab55: 0x2dc24283, + 0x2ab70: 0x40273a20, 0x2ab71: 0x40273c20, 0x2ab72: 0x40273e20, 0x2ab73: 0x40274020, + 0x2ab74: 0x40274220, 0x2ab75: 0x40274420, 0x2ab76: 0x40274620, 0x2ab77: 0x40274820, + 0x2ab78: 0x40274a20, 0x2ab79: 0x40274c20, 0x2ab7a: 0x40274e20, 0x2ab7b: 0x40275020, + // Block 0xaae, offset 0x2ab80 + 0x2ab80: 0x00021283, 0x2ab81: 0x40025c20, 0x2ab82: 0x40030420, 0x2ab83: 0x40051220, + 0x2ab84: 0x40279a20, 0x2ab85: 0x6c021420, 0x2ab86: 0x6c002820, 0x2ab87: 0x6c002a20, + 0x2ab88: 0x40049c20, 0x2ab89: 0x40049e20, 0x2ab8a: 0x4004a020, 0x2ab8b: 0x4004a220, + 0x2ab8c: 0x4004a420, 0x2ab8d: 0x4004a620, 0x2ab8e: 0x4004a820, 0x2ab8f: 0x4004aa20, + 0x2ab90: 0x4004ac20, 0x2ab91: 0x4004ae20, 0x2ab92: 0x40279c20, 0x2ab93: 0x40279e20, + 0x2ab94: 0x4004b020, 0x2ab95: 0x4004b220, 0x2ab96: 0x4004b420, 0x2ab97: 0x4004b620, + 0x2ab98: 0x4004b820, 0x2ab99: 0x4004ba20, 0x2ab9a: 0x4004bc20, 0x2ab9b: 0x4004be20, + 0x2ab9c: 0x40023820, 0x2ab9d: 0x4003ea20, 0x2ab9e: 0x4003ec20, 0x2ab9f: 0x4003ee20, + 0x2aba0: 0x4027a020, 0x2aba1: 0x6c002c20, 0x2aba2: 0x6c00d220, 0x2aba3: 0x6c021620, + 0x2aba4: 0x6c00d420, 0x2aba5: 0x6c002e20, 0x2aba6: 0x6c00d620, 0x2aba7: 0x6c021820, + 0x2aba8: 0x6c053820, 0x2aba9: 0x6c053a20, 0x2abaa: 0xada12202, 0x2abab: 0xae412302, + 0x2abac: 0xae812402, 0x2abad: 0xade12502, 0x2abae: 0xae012602, 0x2abaf: 0xae012702, + 0x2abb0: 0x40023a20, 0x2abb1: 0x4027ce20, 0x2abb2: 0xe0000152, 0x2abb3: 0x4027d020, + 0x2abb4: 0xe0000155, 0x2abb5: 0x4027d220, 0x2abb6: 0x00279c84, 0x2abb7: 0x4027a220, + 0x2abb8: 0x2c00b684, 0x2abb9: 0x2c00e683, 0x2abba: 0x2c036883, 0x2abbb: 0x6c003020, + 0x2abbc: 0xe000231a, 0x2abbd: 0x40051420, 0x2abbe: 0x4027a420, 0x2abbf: 0x4027a620, + // Block 0xaaf, offset 0x2abc0 + 0x2abc0: 0x00633a84, 0x2abc1: 0x00634484, 0x2abc2: 0x0064f684, 0x2abc3: 0x0064f884, + 0x2abc4: 0x00635a84, 0x2abc5: 0x00635c84, 0x2abc6: 0x00635e84, 0x2abc7: 0x0063ee84, + 0x2abc8: 0x0063f084, 0x2abc9: 0x0063f684, 0x2abca: 0x00640884, 0x2abcb: 0x00640a84, + 0x2abcc: 0x00640e84, 0x2abcd: 0x00642284, 0x2abce: 0x00642884, + 0x2abd0: 0x4027a820, 0x2abd1: 0x4027aa20, 0x2abd2: 0x2c000285, 0x2abd3: 0x2c007485, + 0x2abd4: 0x2c00dc85, 0x2abd5: 0x2c079084, 0x2abd6: 0x2c00de84, 0x2abd7: 0x2c023685, + 0x2abd8: 0x2c00e084, 0x2abd9: 0x2c0a0e83, 0x2abda: 0x2c001083, 0x2abdb: 0x2c054883, + 0x2abdc: 0x2c003283, 0x2abdd: 0x2c03de84, 0x2abde: 0x2c0ed083, 0x2abdf: 0x2c007e83, + 0x2abe0: 0xe000237a, 0x2abe1: 0xe0002383, 0x2abe2: 0xe0002380, 0x2abe3: 0xe000237d, + 0x2abe4: 0x40661c20, 0x2abe5: 0xe000238c, 0x2abe6: 0x40661620, 0x2abe7: 0xe0002389, + 0x2abe8: 0xe000239e, 0x2abe9: 0xe0002386, 0x2abea: 0xe0002395, 0x2abeb: 0xe000239b, + 0x2abec: 0x40663420, 0x2abed: 0x4065f220, 0x2abee: 0xe000238f, 0x2abef: 0xe0002392, + 0x2abf0: 0x40663020, 0x2abf1: 0x40663220, 0x2abf2: 0x40662c20, 0x2abf3: 0xe0002398, + 0x2abf4: 0x0065dc99, 0x2abf5: 0x0065e699, 0x2abf6: 0x0065ee99, 0x2abf7: 0x0065f499, + 0x2abf8: 0x40660c20, 0x2abf9: 0x40660e20, 0x2abfa: 0x40661020, + // Block 0xab0, offset 0x2ac00 + 0x2ac00: 0xf0000404, 0x2ac01: 0xf0000404, 0x2ac02: 0xf0000404, 0x2ac03: 0xf0000404, + 0x2ac04: 0xf0000404, 0x2ac05: 0xf0000404, 0x2ac06: 0xf0000404, 0x2ac07: 0xf0000404, + 0x2ac08: 0xf0000404, 0x2ac09: 0xf0000404, 0x2ac0a: 0xf0000404, 0x2ac0b: 0xf0000404, + 0x2ac0c: 0xf0000404, 0x2ac0d: 0xf0000404, 0x2ac0e: 0xe000004c, 0x2ac0f: 0xe0000051, + 0x2ac10: 0xe0000056, 0x2ac11: 0xe000005b, 0x2ac12: 0xe0000060, 0x2ac13: 0xe0000065, + 0x2ac14: 0xe000006a, 0x2ac15: 0xe000006f, 0x2ac16: 0xe0000083, 0x2ac17: 0xe000008d, + 0x2ac18: 0xe0000092, 0x2ac19: 0xe0000097, 0x2ac1a: 0xe000009c, 0x2ac1b: 0xe00000a1, + 0x2ac1c: 0xe0000088, 0x2ac1d: 0xe0000074, 0x2ac1e: 0xe000007c, + 0x2ac20: 0xe000b5b7, 0x2ac21: 0xe000b5c3, 0x2ac22: 0xe000b5cf, 0x2ac23: 0xe000b5f7, + 0x2ac24: 0xe000b5d7, 0x2ac25: 0xe000b5db, 0x2ac26: 0xe000b5bb, 0x2ac27: 0xe000b5c7, + 0x2ac28: 0xe000b5bf, 0x2ac29: 0xe000b5cb, 0x2ac2a: 0xe000b5e3, 0x2ac2b: 0xe000b5ef, + 0x2ac2c: 0xe000b5eb, 0x2ac2d: 0xe000b5e7, 0x2ac2e: 0xe000b627, 0x2ac2f: 0xe000b5d3, + 0x2ac30: 0xe000b5df, 0x2ac31: 0xe000b62b, 0x2ac32: 0xe000b607, 0x2ac33: 0xe000b623, + 0x2ac34: 0xe000b603, 0x2ac35: 0xe000b62f, 0x2ac36: 0xe000b637, 0x2ac37: 0xe000b633, + 0x2ac38: 0xe000b613, 0x2ac39: 0xe000b5f3, 0x2ac3a: 0xe000b61b, 0x2ac3b: 0xe000b61f, + 0x2ac3c: 0xe000b643, 0x2ac3d: 0xe000b5fb, 0x2ac3e: 0xe000b63f, 0x2ac3f: 0xe000b617, + // Block 0xab1, offset 0x2ac40 + 0x2ac40: 0xe000b63b, 0x2ac41: 0xe000b5ff, 0x2ac42: 0xe000b60b, 0x2ac43: 0xe000b60f, + 0x2ac44: 0x2c8e8e83, 0x2ac45: 0x2c08be83, 0x2ac46: 0x2c048483, 0x2ac47: 0x2d326883, + 0x2ac48: 0xe00002e3, 0x2ac49: 0xe00003d8, 0x2ac4a: 0xe00004b3, 0x2ac4b: 0xe000057d, + 0x2ac4c: 0xe0000648, 0x2ac4d: 0xe00006f0, 0x2ac4e: 0xe000079c, 0x2ac4f: 0xe0000841, + 0x2ac50: 0xe0000ec0, 0x2ac51: 0xf0000606, 0x2ac52: 0xf0000606, 0x2ac53: 0xf0000606, + 0x2ac54: 0xf0000606, 0x2ac55: 0xf0000606, 0x2ac56: 0xf0000606, 0x2ac57: 0xf0000606, + 0x2ac58: 0xf0000606, 0x2ac59: 0xf0000606, 0x2ac5a: 0xf0000606, 0x2ac5b: 0xf0000606, + 0x2ac5c: 0xf0000606, 0x2ac5d: 0xf0000606, 0x2ac5e: 0xf0000606, 0x2ac5f: 0xf0000606, + 0x2ac60: 0x0062ac86, 0x2ac61: 0x0062b086, 0x2ac62: 0x0062b286, 0x2ac63: 0x0062b686, + 0x2ac64: 0x0062b886, 0x2ac65: 0x0062ba86, 0x2ac66: 0x0062be86, 0x2ac67: 0x0062c286, + 0x2ac68: 0x0062c486, 0x2ac69: 0x0062c886, 0x2ac6a: 0x0062ca86, 0x2ac6b: 0x0062cc86, + 0x2ac6c: 0x0062ce86, 0x2ac6d: 0x0062d086, 0x2ac6e: 0xf0000606, 0x2ac6f: 0xf0000606, + 0x2ac70: 0xf0000606, 0x2ac71: 0xf0000606, 0x2ac72: 0xf0000606, 0x2ac73: 0xf0000606, + 0x2ac74: 0xf0000606, 0x2ac75: 0xf0000606, 0x2ac76: 0xf0000606, 0x2ac77: 0xf0000606, + 0x2ac78: 0xf0000606, 0x2ac79: 0xf0000606, 0x2ac7a: 0xf0000606, 0x2ac7b: 0xf0000606, + 0x2ac7c: 0xe0002127, 0x2ac7d: 0xe0002122, 0x2ac7e: 0xf0000606, 0x2ac7f: 0x4027ac20, + // Block 0xab2, offset 0x2ac80 + 0x2ac80: 0x2c000284, 0x2ac81: 0x2c007484, 0x2ac82: 0x2c00dc84, 0x2ac83: 0x2c079083, + 0x2ac84: 0x2c028883, 0x2ac85: 0x2c02d883, 0x2ac86: 0x2c003683, 0x2ac87: 0x2c008883, + 0x2ac88: 0x2c006283, 0x2ac89: 0x2c00b683, 0x2ac8a: 0x2c049c84, 0x2ac8b: 0x2c04d083, + 0x2ac8c: 0x2c04c683, 0x2ac8d: 0x2c049e83, 0x2ac8e: 0x2c41dc83, 0x2ac8f: 0x2c018483, + 0x2ac90: 0x2c049683, 0x2ac91: 0x2c741683, 0x2ac92: 0x2c127484, 0x2ac93: 0x2c3cee83, + 0x2ac94: 0x2c0e3e83, 0x2ac95: 0x2c791683, 0x2ac96: 0x2c86f083, 0x2ac97: 0x2c7de083, + 0x2ac98: 0x2c185283, 0x2ac99: 0x2c7e3883, 0x2ac9a: 0x2c24b683, 0x2ac9b: 0x2c019483, + 0x2ac9c: 0x2d6c7483, 0x2ac9d: 0x2d9fc483, 0x2ac9e: 0x2c0db883, 0x2ac9f: 0x2c38fa83, + 0x2aca0: 0x2ce74883, 0x2aca1: 0x2c0bc083, 0x2aca2: 0x2c063e83, 0x2aca3: 0x2c097683, + 0x2aca4: 0x2c00de83, 0x2aca5: 0x2c023684, 0x2aca6: 0x2c00e083, 0x2aca7: 0x2c089284, + 0x2aca8: 0x2c075484, 0x2aca9: 0x2c18a683, 0x2acaa: 0x2c300483, 0x2acab: 0x2c2fd883, + 0x2acac: 0x2d2efa83, 0x2acad: 0x2c0ba083, 0x2acae: 0x2d0f3883, 0x2acaf: 0x2c2bb283, + 0x2acb0: 0x2c2e8e83, 0x2acb1: 0xf0000606, 0x2acb2: 0xf0000606, 0x2acb3: 0xf0000606, + 0x2acb4: 0xf0000606, 0x2acb5: 0xf0000606, 0x2acb6: 0xf0000606, 0x2acb7: 0xf0000606, + 0x2acb8: 0xf0000606, 0x2acb9: 0xf0000606, 0x2acba: 0xf0000606, 0x2acbb: 0xf0000606, + 0x2acbc: 0xf0000606, 0x2acbd: 0xf0000606, 0x2acbe: 0xf0000606, 0x2acbf: 0xf0000606, + // Block 0xab3, offset 0x2acc0 + 0x2acc0: 0xf0000203, 0x2acc1: 0xf0000203, 0x2acc2: 0xf0000203, 0x2acc3: 0xf0000203, + 0x2acc4: 0xf0000203, 0x2acc5: 0xf0000203, 0x2acc6: 0xf0000203, 0x2acc7: 0xf0000203, + 0x2acc8: 0xf0000203, 0x2acc9: 0xe000b66f, 0x2acca: 0xe000b67b, 0x2accb: 0xe000b687, + 0x2accc: 0xf0001c1d, 0x2accd: 0xe0000b85, 0x2acce: 0xf0001d1c, 0x2accf: 0xe0000d14, + 0x2acd0: 0x00657693, 0x2acd1: 0x00657893, 0x2acd2: 0x00657a93, 0x2acd3: 0x00657e93, + 0x2acd4: 0x00658093, 0x2acd5: 0x00658293, 0x2acd6: 0x00658493, 0x2acd7: 0x00658693, + 0x2acd8: 0x00658893, 0x2acd9: 0x00658a93, 0x2acda: 0x00658c93, 0x2acdb: 0x00658e93, + 0x2acdc: 0x00659093, 0x2acdd: 0x00659293, 0x2acde: 0x00659493, 0x2acdf: 0x00659693, + 0x2ace0: 0x00659893, 0x2ace1: 0x00659a93, 0x2ace2: 0x00659c93, 0x2ace3: 0x00659e93, + 0x2ace4: 0x0065a093, 0x2ace5: 0x0065a293, 0x2ace6: 0x0065a493, 0x2ace7: 0x0065a693, + 0x2ace8: 0x0065a893, 0x2ace9: 0x0065aa93, 0x2acea: 0x0065ac93, 0x2aceb: 0x0065ae93, + 0x2acec: 0x0065b093, 0x2aced: 0x0065b293, 0x2acee: 0x0065b493, 0x2acef: 0x0065b693, + 0x2acf0: 0x0065b893, 0x2acf1: 0x0065ba93, 0x2acf2: 0x0065bc93, 0x2acf3: 0x0065be93, + 0x2acf4: 0x0065c093, 0x2acf5: 0x0065c493, 0x2acf6: 0x0065c693, 0x2acf7: 0x0065c893, + 0x2acf8: 0x0065ca93, 0x2acf9: 0x0065cc93, 0x2acfa: 0x0065ce93, 0x2acfb: 0x0065d093, + 0x2acfc: 0x0065d293, 0x2acfd: 0x0065d493, 0x2acfe: 0x0065d693, + // Block 0xab4, offset 0x2ad00 + 0x2ad00: 0xe000230b, 0x2ad01: 0xe00022f8, 0x2ad02: 0xe00022fc, 0x2ad03: 0xe0002311, + 0x2ad04: 0xe0002316, 0x2ad05: 0xe000231d, 0x2ad06: 0xe0002321, 0x2ad07: 0xe0002325, + 0x2ad08: 0xe000232b, 0x2ad09: 0xf0001c1c, 0x2ad0a: 0xe0002330, 0x2ad0b: 0xe000233c, + 0x2ad0c: 0xe0002340, 0x2ad0d: 0xe0002337, 0x2ad0e: 0xe0002346, 0x2ad0f: 0xe000234b, + 0x2ad10: 0xe000234f, 0x2ad11: 0xe0002353, 0x2ad12: 0xf0001c1c, 0x2ad13: 0xe000235e, + 0x2ad14: 0xe0002358, 0x2ad15: 0xf0001c1c, 0x2ad16: 0xe0002363, 0x2ad17: 0xe000236d, + 0x2ad18: 0xf0000203, 0x2ad19: 0xf0000203, 0x2ad1a: 0xf0000203, 0x2ad1b: 0xf0000203, + 0x2ad1c: 0xf0000203, 0x2ad1d: 0xf0000203, 0x2ad1e: 0xf0000203, 0x2ad1f: 0xf0000203, + 0x2ad20: 0xf0000203, 0x2ad21: 0xf0000203, 0x2ad22: 0xe000b673, 0x2ad23: 0xe000b67f, + 0x2ad24: 0xe000b68b, 0x2ad25: 0xe000b693, 0x2ad26: 0xe000b69b, 0x2ad27: 0xe000b6a3, + 0x2ad28: 0xe000b6ab, 0x2ad29: 0xe000b6b3, 0x2ad2a: 0xe000b6bb, 0x2ad2b: 0xe000b6c3, + 0x2ad2c: 0xe000b6cb, 0x2ad2d: 0xe000b6d3, 0x2ad2e: 0xe000b6db, 0x2ad2f: 0xe000b6e3, + 0x2ad30: 0xe000b6eb, 0x2ad31: 0xe0000c1e, 0x2ad32: 0xf0001c1c, 0x2ad33: 0xf0001d1d, + 0x2ad34: 0xe0000a31, 0x2ad35: 0xf0001d1c, 0x2ad36: 0xf0001c1c, 0x2ad37: 0xf0001c1c, + 0x2ad38: 0xe0000ac2, 0x2ad39: 0xe0000ac6, 0x2ad3a: 0xf0001d1d, 0x2ad3b: 0xf0000203, + 0x2ad3c: 0xf0000203, 0x2ad3d: 0xf0000203, 0x2ad3e: 0xf0000203, 0x2ad3f: 0xe000b70b, + // Block 0xab5, offset 0x2ad40 + 0x2ad40: 0xf0001d1c, 0x2ad41: 0xf0001d1d, 0x2ad42: 0xe00009b7, 0x2ad43: 0xf0001c1d, + 0x2ad44: 0xf0001c1c, 0x2ad45: 0xf0001c1c, 0x2ad46: 0xe0000a66, 0x2ad47: 0xe0000a7a, + 0x2ad48: 0xf0001d1c, 0x2ad49: 0xf0001c1d, 0x2ad4a: 0xf0001c1c, 0x2ad4b: 0xf0001d1d, + 0x2ad4c: 0xf0001c1c, 0x2ad4d: 0xf0001d1d, 0x2ad4e: 0xf0001d1d, 0x2ad4f: 0xf0001c1c, + 0x2ad50: 0xf0001c1c, 0x2ad51: 0xf0001c1c, 0x2ad52: 0xe0000d0d, 0x2ad53: 0xf0001c1c, + 0x2ad54: 0xf0001c1c, 0x2ad55: 0xe0000d3a, 0x2ad56: 0xe0000d46, 0x2ad57: 0xf0001d1d, + 0x2ad58: 0xe0000eb0, 0x2ad59: 0xe0000eb8, 0x2ad5a: 0xf0001d1d, 0x2ad5b: 0xf0001c1c, + 0x2ad5c: 0xf0001c1d, 0x2ad5d: 0xf0001c1d, 0x2ad5e: 0xe00010b2, 0x2ad5f: 0xe00009c8, + 0x2ad60: 0xf0000203, 0x2ad61: 0xf0000203, 0x2ad62: 0xf0000203, 0x2ad63: 0xf0000203, + 0x2ad64: 0xf0000203, 0x2ad65: 0xf0000203, 0x2ad66: 0xf0000203, 0x2ad67: 0xf0000203, + 0x2ad68: 0xf0000203, 0x2ad69: 0xe000b66b, 0x2ad6a: 0xe000b677, 0x2ad6b: 0xe000b683, + 0x2ad6c: 0xe000b68f, 0x2ad6d: 0xe000b697, 0x2ad6e: 0xe000b69f, 0x2ad6f: 0xe000b6a7, + 0x2ad70: 0xe000b6af, 0x2ad71: 0xe000b6b7, 0x2ad72: 0xe000b6bf, 0x2ad73: 0xe000b6c7, + 0x2ad74: 0xe000b6cf, 0x2ad75: 0xe000b6d7, 0x2ad76: 0xe000b6df, 0x2ad77: 0xe000b6e7, + 0x2ad78: 0xe000b6ef, 0x2ad79: 0xe000b6f3, 0x2ad7a: 0xe000b6f7, 0x2ad7b: 0xe000b6fb, + 0x2ad7c: 0xe000b6ff, 0x2ad7d: 0xe000b703, 0x2ad7e: 0xe000b707, 0x2ad7f: 0xe0000bdf, + // Block 0xab6, offset 0x2ad80 + 0x2ad80: 0x6c053e20, 0x2ad81: 0x6c0acc20, 0x2ad82: 0x6c0ace20, 0x2ad83: 0x6c00f620, + 0x2ad84: 0x6c00f820, 0x2ad85: 0x6c004e20, 0x2ad86: 0x6c0aee20, 0x2ad87: 0x6c011a20, + 0x2ad88: 0x6c011c20, 0x2ad89: 0x6c011e20, 0x2ad8a: 0x6c025820, 0x2ad8b: 0x6c025a20, + 0x2ad8c: 0x6c059820, 0x2ad8d: 0x6c059a20, 0x2ad8e: 0x6c059c20, 0x2ad8f: 0x6c059e20, + 0x2ad90: 0x6c0b0e20, 0x2ad91: 0x6c0b1020, 0x2ad92: 0x6c0b1220, 0x2ad93: 0x6c0b1420, + 0x2ad94: 0x6c0b1620, 0x2ad95: 0x6c0b1820, 0x2ad96: 0x6c160a20, 0x2ad97: 0x6c160c20, + 0x2ad98: 0x6c160e20, 0x2ad99: 0x6c28d820, 0x2ad9a: 0x6c28da20, 0x2ad9b: 0x6c28dc20, + 0x2ad9c: 0x6c430a20, 0x2ad9d: 0x6c430c20, 0x2ad9e: 0x6c430e20, 0x2ad9f: 0x6c431020, + 0x2ada0: 0x6c431220, 0x2ada1: 0x6c8b0620, 0x2ada2: 0x6c8b0820, 0x2ada3: 0x6c8b0a20, + 0x2ada4: 0x6cb7b020, 0x2ada5: 0x6d75d620, 0x2ada6: 0x6de00620, 0x2ada7: 0x6c027820, + 0x2ada8: 0x6c28f220, 0x2ada9: 0x6c28fa20, 0x2adaa: 0x6c0b5020, 0x2adab: 0x6c0b5220, + 0x2adac: 0x6c163420, 0x2adad: 0x6c290c20, 0x2adae: 0x6ce8e420, 0x2adaf: 0x6d9fa820, + 0x2adb0: 0x6c05b820, 0x2adb1: 0x6c05ba20, 0x2adb2: 0x6c05bc20, 0x2adb3: 0x6c05be20, + 0x2adb4: 0x6c05c020, 0x2adb5: 0x6c05c220, 0x2adb6: 0x6c05c420, 0x2adb7: 0x6c05c620, + 0x2adb8: 0x6c0b6820, 0x2adb9: 0x6c0b6a20, 0x2adba: 0x6c0b6c20, 0x2adbb: 0x6c0b6e20, + 0x2adbc: 0x6c0b7020, 0x2adbd: 0x6c0b7220, 0x2adbe: 0x6c0b7420, 0x2adbf: 0x6c0b7620, + // Block 0xab7, offset 0x2adc0 + 0x2adc0: 0x6c0b7820, 0x2adc1: 0x6c164620, 0x2adc2: 0x6c164820, 0x2adc3: 0x6c164a20, + 0x2adc4: 0x6c164c20, 0x2adc5: 0x6c164e20, 0x2adc6: 0x6c165020, 0x2adc7: 0x6c165220, + 0x2adc8: 0x6c165420, 0x2adc9: 0x6c292220, 0x2adca: 0x6c292420, 0x2adcb: 0x6c292620, + 0x2adcc: 0x6c292820, 0x2adcd: 0x6c292a20, 0x2adce: 0x6c292c20, 0x2adcf: 0x6c292e20, + 0x2add0: 0x6c293020, 0x2add1: 0x6c293220, 0x2add2: 0x6c293420, 0x2add3: 0x6c293620, + 0x2add4: 0x6c293820, 0x2add5: 0x6c293a20, 0x2add6: 0x6c293c20, 0x2add7: 0x6c434620, + 0x2add8: 0x6c434820, 0x2add9: 0x6c434a20, 0x2adda: 0x6c434c20, 0x2addb: 0x6c434e20, + 0x2addc: 0x6c435020, 0x2addd: 0x6c435220, 0x2adde: 0x6c435420, 0x2addf: 0x6c435620, + 0x2ade0: 0x6c435820, 0x2ade1: 0x6c435a20, 0x2ade2: 0x6c435c20, 0x2ade3: 0x6c641a20, + 0x2ade4: 0x6c8b3e20, 0x2ade5: 0x6c641c20, 0x2ade6: 0x6c641e20, 0x2ade7: 0x6c642020, + 0x2ade8: 0x6c642220, 0x2ade9: 0x6c642420, 0x2adea: 0x6c642620, 0x2adeb: 0x6c642820, + 0x2adec: 0x6c642a20, 0x2aded: 0x6c642c20, 0x2adee: 0x6c8b4020, 0x2adef: 0x6c8b4220, + 0x2adf0: 0x6c8b4420, 0x2adf1: 0x6c8b4620, 0x2adf2: 0x6c8b4820, 0x2adf3: 0x6cb7da20, + 0x2adf4: 0x6cb7dc20, 0x2adf5: 0x6cb7de20, 0x2adf6: 0x6cb7e020, 0x2adf7: 0x6cb7e220, + 0x2adf8: 0x6cb7e420, 0x2adf9: 0x6cb7e620, 0x2adfa: 0x6cb7e820, 0x2adfb: 0x6ce8fe20, + 0x2adfc: 0x6ce90020, 0x2adfd: 0x6ce90220, 0x2adfe: 0x6ce90420, 0x2adff: 0x6ce90620, + // Block 0xab8, offset 0x2ae00 + 0x2ae00: 0x6ce90820, 0x2ae01: 0x6ce90a20, 0x2ae02: 0x6d18ae20, 0x2ae03: 0x6d18b020, + 0x2ae04: 0x6d18b220, 0x2ae05: 0x6d18b420, 0x2ae06: 0x6d18b620, 0x2ae07: 0x6d18b820, + 0x2ae08: 0x6d18ba20, 0x2ae09: 0x6d18bc20, 0x2ae0a: 0x6d18be20, 0x2ae0b: 0x6d18c020, + 0x2ae0c: 0x6d18c220, 0x2ae0d: 0x6d18c420, 0x2ae0e: 0x6d18c620, 0x2ae0f: 0x6d18c820, + 0x2ae10: 0x6d18ca20, 0x2ae11: 0x6d47b220, 0x2ae12: 0x6d47b420, 0x2ae13: 0x6d47b620, + 0x2ae14: 0x6d47b820, 0x2ae15: 0x6d47ba20, 0x2ae16: 0x6d47bc20, 0x2ae17: 0x6d47be20, + 0x2ae18: 0x6d47c020, 0x2ae19: 0x6d75f420, 0x2ae1a: 0x6d75f620, 0x2ae1b: 0x6d75f820, + 0x2ae1c: 0x6d75fa20, 0x2ae1d: 0x6d9faa20, 0x2ae1e: 0x6d9fac20, 0x2ae1f: 0x6dc24a20, + 0x2ae20: 0x6dc24c20, 0x2ae21: 0x6de00e20, 0x2ae22: 0x6de01020, 0x2ae23: 0x6de01220, + 0x2ae24: 0x6df86e20, 0x2ae25: 0x6df87020, 0x2ae26: 0x6df87220, 0x2ae27: 0x6e0c3e20, + 0x2ae28: 0x6e0c4020, 0x2ae29: 0x6e284a20, 0x2ae2a: 0x6e3ce220, 0x2ae2b: 0x6c0c4420, + 0x2ae2c: 0x6c2a2c20, 0x2ae2d: 0x6c657020, 0x2ae2e: 0x6c8c6620, 0x2ae2f: 0x6dc28c20, + 0x2ae30: 0x6c061620, 0x2ae31: 0x6c061820, 0x2ae32: 0x6c0c5820, 0x2ae33: 0x6c174e20, + 0x2ae34: 0x6c175020, 0x2ae35: 0x6c175c20, 0x2ae36: 0x6c175e20, 0x2ae37: 0x6c176020, + 0x2ae38: 0x6c447420, 0x2ae39: 0x6df89620, 0x2ae3a: 0x6c2a5c20, 0x2ae3b: 0x6c8c8420, + 0x2ae3c: 0x6c8c8620, 0x2ae3d: 0x6cb8f220, 0x2ae3e: 0x6cea0820, 0x2ae3f: 0x6e1c1c20, + // Block 0xab9, offset 0x2ae40 + 0x2ae40: 0x6c02fa20, 0x2ae41: 0x6c02fc20, 0x2ae42: 0x6c449020, 0x2ae43: 0x6cb8fc20, + 0x2ae44: 0x6d487620, 0x2ae45: 0x6c030620, 0x2ae46: 0x6c0c9820, 0x2ae47: 0x6c0c9a20, + 0x2ae48: 0x6c178e20, 0x2ae49: 0x6c2a7420, 0x2ae4a: 0x6c2a7620, 0x2ae4b: 0x6c2a7820, + 0x2ae4c: 0x6c2a7a20, 0x2ae4d: 0x6c2a7c20, 0x2ae4e: 0x6c44a020, 0x2ae4f: 0x6c44a220, + 0x2ae50: 0x6c65c220, 0x2ae51: 0x6c65c420, 0x2ae52: 0x6c65c620, 0x2ae53: 0x6c8c9620, + 0x2ae54: 0x6cb90c20, 0x2ae55: 0x6cb90e20, 0x2ae56: 0x6cea1220, 0x2ae57: 0x6d19ea20, + 0x2ae58: 0x6c8cbe20, 0x2ae59: 0x6c0cd220, 0x2ae5a: 0x6c067c20, 0x2ae5b: 0x6c067e20, + 0x2ae5c: 0x6c068020, 0x2ae5d: 0x6c0ce620, 0x2ae5e: 0x6c0ce820, 0x2ae5f: 0x6c17da20, + 0x2ae60: 0x6c17dc20, 0x2ae61: 0x6c2abc20, 0x2ae62: 0x6c2abe20, 0x2ae63: 0x6c2ac020, + 0x2ae64: 0x6c2ac220, 0x2ae65: 0x6c2ac420, 0x2ae66: 0x6c2ac620, 0x2ae67: 0x6c44e020, + 0x2ae68: 0x6c44e220, 0x2ae69: 0x6c44e420, 0x2ae6a: 0x6c44e620, 0x2ae6b: 0x6c44e820, + 0x2ae6c: 0x6c661220, 0x2ae6d: 0x6c661420, 0x2ae6e: 0x6c661620, 0x2ae6f: 0x6c661820, + 0x2ae70: 0x6c661a20, 0x2ae71: 0x6c8cd820, 0x2ae72: 0x6c8cda20, 0x2ae73: 0x6c8cdc20, + 0x2ae74: 0x6c8cde20, 0x2ae75: 0x6c8ce020, 0x2ae76: 0x6c8ce220, 0x2ae77: 0x6cb94620, + 0x2ae78: 0x6cb94820, 0x2ae79: 0x6cb94a20, 0x2ae7a: 0x6cb94c20, 0x2ae7b: 0x6cb94e20, + 0x2ae7c: 0x6cea3c20, 0x2ae7d: 0x6cea3e20, 0x2ae7e: 0x6d1a0e20, 0x2ae7f: 0x6d1a1020, + // Block 0xaba, offset 0x2ae80 + 0x2ae80: 0x6d1a1220, 0x2ae81: 0x6d1a1420, 0x2ae82: 0x6d1a1620, 0x2ae83: 0x6d1a1820, + 0x2ae84: 0x6d1a1a20, 0x2ae85: 0x6d1a1c20, 0x2ae86: 0x6d1a1e20, 0x2ae87: 0x6d1a2020, + 0x2ae88: 0x6d1a2220, 0x2ae89: 0x6d1a2420, 0x2ae8a: 0x6d489620, 0x2ae8b: 0x6d76a420, + 0x2ae8c: 0x6d76a620, 0x2ae8d: 0x6d76a820, 0x2ae8e: 0x6da03020, 0x2ae8f: 0x6da03220, + 0x2ae90: 0x6dc2b620, 0x2ae91: 0x6de05620, 0x2ae92: 0x6df8a620, 0x2ae93: 0x6c06a020, + 0x2ae94: 0x6c0d3a20, 0x2ae95: 0x6c0d3c20, 0x2ae96: 0x6c0d3e20, 0x2ae97: 0x6c183820, + 0x2ae98: 0x6c183a20, 0x2ae99: 0x6c2b4c20, 0x2ae9a: 0x6c2b4e20, 0x2ae9b: 0x6c2b5020, + 0x2ae9c: 0x6c454e20, 0x2ae9d: 0x6c66a620, 0x2ae9e: 0x6c66a820, 0x2ae9f: 0x6c66aa20, + 0x2aea0: 0x6c8d4220, 0x2aea1: 0x6cb9aa20, 0x2aea2: 0x6d1a7620, 0x2aea3: 0x6da05420, + 0x2aea4: 0x6da05620, 0x2aea5: 0x6da05820, 0x2aea6: 0x6da05a20, 0x2aea7: 0x6dc2c420, + 0x2aea8: 0x6c8d6a20, 0x2aea9: 0x6cb9d420, 0x2aeaa: 0x6ceac220, 0x2aeab: 0x6c035820, + 0x2aeac: 0x6c2b9a20, 0x2aead: 0x6c8d8020, 0x2aeae: 0x6e123e20, 0x2aeaf: 0x6c188c20, + 0x2aeb0: 0x6c188e20, 0x2aeb1: 0x6c8d8620, 0x2aeb2: 0x6cead220, 0x2aeb3: 0x6cead420, + 0x2aeb4: 0x6cead620, 0x2aeb5: 0x6d1aba20, 0x2aeb6: 0x6e3cf020, 0x2aeb7: 0x6c18a420, + 0x2aeb8: 0x6cb9f020, 0x2aeb9: 0x6c036620, 0x2aeba: 0x6c0d8020, 0x2aebb: 0x6c0d8220, + 0x2aebc: 0x6ceae020, 0x2aebd: 0x6c2bd420, 0x2aebe: 0x6c016e20, 0x2aebf: 0x6c017020, + // Block 0xabb, offset 0x2aec0 + 0x2aec0: 0x6c18d020, 0x2aec1: 0x6c2bf220, 0x2aec2: 0x6c0dc820, 0x2aec3: 0x6c0dca20, + 0x2aec4: 0x6c0dcc20, 0x2aec5: 0x6c18dc20, 0x2aec6: 0x6c18de20, 0x2aec7: 0x6c18e020, + 0x2aec8: 0x6c2c0020, 0x2aec9: 0x6c2c0220, 0x2aeca: 0x6c45f620, 0x2aecb: 0x6c673220, + 0x2aecc: 0x6c673420, 0x2aecd: 0x6c673620, 0x2aece: 0x6cba0a20, 0x2aecf: 0x6ceb0220, + 0x2aed0: 0x6d1adc20, 0x2aed1: 0x6d1ade20, 0x2aed2: 0x6d491820, 0x2aed3: 0x6da08620, + 0x2aed4: 0x6e319620, 0x2aed5: 0x6c039020, 0x2aed6: 0x6c677020, 0x2aed7: 0x6c8de220, + 0x2aed8: 0x6c8de420, 0x2aed9: 0x6d493a20, 0x2aeda: 0x6c039c20, 0x2aedb: 0x6c039e20, + 0x2aedc: 0x6c0e0620, 0x2aedd: 0x6c190c20, 0x2aede: 0x6c2c3a20, 0x2aedf: 0x6c463e20, + 0x2aee0: 0x6cba4220, 0x2aee1: 0x6d1b2020, 0x2aee2: 0x6d3d7420, 0x2aee3: 0x6c073020, + 0x2aee4: 0x6c073220, 0x2aee5: 0x6c073420, 0x2aee6: 0x6c0e1c20, 0x2aee7: 0x6c0e1e20, + 0x2aee8: 0x6c0e2020, 0x2aee9: 0x6c192220, 0x2aeea: 0x6c192420, 0x2aeeb: 0x6c192620, + 0x2aeec: 0x6c192820, 0x2aeed: 0x6c192a20, 0x2aeee: 0x6c192c20, 0x2aeef: 0x6c192e20, + 0x2aef0: 0x6c193020, 0x2aef1: 0x6c193220, 0x2aef2: 0x6c193420, 0x2aef3: 0x6c193620, + 0x2aef4: 0x6c193820, 0x2aef5: 0x6c193a20, 0x2aef6: 0x6c193c20, 0x2aef7: 0x6c2c5620, + 0x2aef8: 0x6c2c5820, 0x2aef9: 0x6c2c5a20, 0x2aefa: 0x6c2c5c20, 0x2aefb: 0x6c2c5e20, + 0x2aefc: 0x6c2c6020, 0x2aefd: 0x6c2c6220, 0x2aefe: 0x6c2c6420, 0x2aeff: 0x6c2c6620, + // Block 0xabc, offset 0x2af00 + 0x2af00: 0x6c466820, 0x2af01: 0x6c466a20, 0x2af02: 0x6c466c20, 0x2af03: 0x6c466e20, + 0x2af04: 0x6c467020, 0x2af05: 0x6c467220, 0x2af06: 0x6c467420, 0x2af07: 0x6c467620, + 0x2af08: 0x6c467820, 0x2af09: 0x6c467a20, 0x2af0a: 0x6c467c20, 0x2af0b: 0x6c467e20, + 0x2af0c: 0x6c468020, 0x2af0d: 0x6c468220, 0x2af0e: 0x6c468420, 0x2af0f: 0x6c679a20, + 0x2af10: 0x6c679c20, 0x2af11: 0x6c679e20, 0x2af12: 0x6c67a020, 0x2af13: 0x6c67a220, + 0x2af14: 0x6c67a420, 0x2af15: 0x6c67a620, 0x2af16: 0x6c67a820, 0x2af17: 0x6c67aa20, + 0x2af18: 0x6c67ac20, 0x2af19: 0x6c67ae20, 0x2af1a: 0x6c67b020, 0x2af1b: 0x6c67b220, + 0x2af1c: 0x6c67b420, 0x2af1d: 0x6c67b620, 0x2af1e: 0x6c67b820, 0x2af1f: 0x6c8e1220, + 0x2af20: 0x6c8e1420, 0x2af21: 0x6c8e1620, 0x2af22: 0x6c8e1820, 0x2af23: 0x6c8e1a20, + 0x2af24: 0x6c8e1c20, 0x2af25: 0x6c8e1e20, 0x2af26: 0x6c8e2020, 0x2af27: 0x6c8e2220, + 0x2af28: 0x6c8e2420, 0x2af29: 0x6c8e2620, 0x2af2a: 0x6c8e2820, 0x2af2b: 0x6c8e2a20, + 0x2af2c: 0x6c8e2c20, 0x2af2d: 0x6c8e2e20, 0x2af2e: 0x6c8e3020, 0x2af2f: 0x6c8e3220, + 0x2af30: 0x6c8e3420, 0x2af31: 0x6c8e3620, 0x2af32: 0x6c8e3820, 0x2af33: 0x6c8e3a20, + 0x2af34: 0x6c8e3c20, 0x2af35: 0x6c8e3e20, 0x2af36: 0x6cba5c20, 0x2af37: 0x6cba5e20, + 0x2af38: 0x6cba6020, 0x2af39: 0x6cba6220, 0x2af3a: 0x6cba6420, 0x2af3b: 0x6cba6620, + 0x2af3c: 0x6cba6820, 0x2af3d: 0x6cba6a20, 0x2af3e: 0x6cba6c20, 0x2af3f: 0x6cba6e20, + // Block 0xabd, offset 0x2af40 + 0x2af40: 0x6cba7020, 0x2af41: 0x6cba7220, 0x2af42: 0x6cba7420, 0x2af43: 0x6cba7620, + 0x2af44: 0x6cba7820, 0x2af45: 0x6cba7a20, 0x2af46: 0x6cba7c20, 0x2af47: 0x6cba7e20, + 0x2af48: 0x6cba8020, 0x2af49: 0x6cba8220, 0x2af4a: 0x6cba8420, 0x2af4b: 0x6cba8620, + 0x2af4c: 0x6cba8820, 0x2af4d: 0x6cba8a20, 0x2af4e: 0x6cba8c20, 0x2af4f: 0x6cba8e20, + 0x2af50: 0x6cba9020, 0x2af51: 0x6cba9220, 0x2af52: 0x6ceb4e20, 0x2af53: 0x6ceb5020, + 0x2af54: 0x6ceb5220, 0x2af55: 0x6ceb5420, 0x2af56: 0x6ceb5620, 0x2af57: 0x6ceb5820, + 0x2af58: 0x6ceb5a20, 0x2af59: 0x6ceb5c20, 0x2af5a: 0x6ceb5e20, 0x2af5b: 0x6ceb6020, + 0x2af5c: 0x6ceb6220, 0x2af5d: 0x6ceb6420, 0x2af5e: 0x6ceb6620, 0x2af5f: 0x6ceb6820, + 0x2af60: 0x6ceb6a20, 0x2af61: 0x6ceb6c20, 0x2af62: 0x6d1b3420, 0x2af63: 0x6d1b3620, + 0x2af64: 0x6d1b3820, 0x2af65: 0x6d1b3a20, 0x2af66: 0x6d1b3c20, 0x2af67: 0x6d1b3e20, + 0x2af68: 0x6d1b4020, 0x2af69: 0x6d1b4220, 0x2af6a: 0x6d1b4420, 0x2af6b: 0x6d1b4620, + 0x2af6c: 0x6d1b4820, 0x2af6d: 0x6d1b4a20, 0x2af6e: 0x6d1b4c20, 0x2af6f: 0x6d1b4e20, + 0x2af70: 0x6d1b5020, 0x2af71: 0x6d494e20, 0x2af72: 0x6d495020, 0x2af73: 0x6d495220, + 0x2af74: 0x6d495420, 0x2af75: 0x6d495620, 0x2af76: 0x6d495820, 0x2af77: 0x6d495a20, + 0x2af78: 0x6d495c20, 0x2af79: 0x6d495e20, 0x2af7a: 0x6d496020, 0x2af7b: 0x6d770e20, + 0x2af7c: 0x6d771020, 0x2af7d: 0x6d771220, 0x2af7e: 0x6d771420, 0x2af7f: 0x6d771620, + // Block 0xabe, offset 0x2af80 + 0x2af80: 0x6d771820, 0x2af81: 0x6d771a20, 0x2af82: 0x6d771c20, 0x2af83: 0x6d771e20, + 0x2af84: 0x6d772020, 0x2af85: 0x6da09a20, 0x2af86: 0x6da09c20, 0x2af87: 0x6da09e20, + 0x2af88: 0x6da0a020, 0x2af89: 0x6dc2fa20, 0x2af8a: 0x6dc2fc20, 0x2af8b: 0x6dc2fe20, + 0x2af8c: 0x6dc30020, 0x2af8d: 0x6dc30220, 0x2af8e: 0x6dc30420, 0x2af8f: 0x6dc30620, + 0x2af90: 0x6de07e20, 0x2af91: 0x6de08020, 0x2af92: 0x6de08220, 0x2af93: 0x6df8cc20, + 0x2af94: 0x6df8ce20, 0x2af95: 0x6e0c9220, 0x2af96: 0x6e0c9420, 0x2af97: 0x6e0c9620, + 0x2af98: 0x6e1c2e20, 0x2af99: 0x6e287220, 0x2af9a: 0x6e287420, 0x2af9b: 0x6e384620, + 0x2af9c: 0x6e3cf820, 0x2af9d: 0x6c078820, 0x2af9e: 0x6c06a220, 0x2af9f: 0x6c0e9620, + 0x2afa0: 0x6c2d7e20, 0x2afa1: 0x6c2d8020, 0x2afa2: 0x6c47dc20, 0x2afa3: 0x6c694e20, + 0x2afa4: 0x6d1cf020, 0x2afa5: 0x6df92a20, 0x2afa6: 0x6c07a020, 0x2afa7: 0x6c1a9820, + 0x2afa8: 0x6c1a9a20, 0x2afa9: 0x6c1a9c20, 0x2afaa: 0x6c1a9e20, 0x2afab: 0x6c1aa020, + 0x2afac: 0x6c1aa220, 0x2afad: 0x6c1aa420, 0x2afae: 0x6c1aa620, 0x2afaf: 0x6c1aa820, + 0x2afb0: 0x6c1aaa20, 0x2afb1: 0x6c2daa20, 0x2afb2: 0x6c2dac20, 0x2afb3: 0x6c2dae20, + 0x2afb4: 0x6c2db020, 0x2afb5: 0x6c2db220, 0x2afb6: 0x6c480020, 0x2afb7: 0x6c480220, + 0x2afb8: 0x6c480420, 0x2afb9: 0x6c480620, 0x2afba: 0x6c480820, 0x2afbb: 0x6c480a20, + 0x2afbc: 0x6c480c20, 0x2afbd: 0x6c480e20, 0x2afbe: 0x6c481020, 0x2afbf: 0x6c697e20, + // Block 0xabf, offset 0x2afc0 + 0x2afc0: 0x6c698020, 0x2afc1: 0x6c698220, 0x2afc2: 0x6c698420, 0x2afc3: 0x6c698620, + 0x2afc4: 0x6c698820, 0x2afc5: 0x6c698a20, 0x2afc6: 0x6c698c20, 0x2afc7: 0x6c904620, + 0x2afc8: 0x6c904820, 0x2afc9: 0x6c904a20, 0x2afca: 0x6c904c20, 0x2afcb: 0x6c904e20, + 0x2afcc: 0x6c905020, 0x2afcd: 0x6c905220, 0x2afce: 0x6cbc6420, 0x2afcf: 0x6cbc6620, + 0x2afd0: 0x6cbc6820, 0x2afd1: 0x6cbc6a20, 0x2afd2: 0x6cbc6c20, 0x2afd3: 0x6cbc6e20, + 0x2afd4: 0x6cbc7020, 0x2afd5: 0x6cbc7220, 0x2afd6: 0x6cbc7420, 0x2afd7: 0x6cbc7620, + 0x2afd8: 0x6cbc7820, 0x2afd9: 0x6ced4a20, 0x2afda: 0x6ced4c20, 0x2afdb: 0x6ced4e20, + 0x2afdc: 0x6ced5020, 0x2afdd: 0x6ced5220, 0x2afde: 0x6ced5420, 0x2afdf: 0x6ced5620, + 0x2afe0: 0x6d1d1620, 0x2afe1: 0x6d1d1820, 0x2afe2: 0x6d1d1a20, 0x2afe3: 0x6d1d1c20, + 0x2afe4: 0x6d1d1e20, 0x2afe5: 0x6d1d2020, 0x2afe6: 0x6d1d2220, 0x2afe7: 0x6d4ac820, + 0x2afe8: 0x6d4aca20, 0x2afe9: 0x6d4acc20, 0x2afea: 0x6d4ace20, 0x2afeb: 0x6d4ad020, + 0x2afec: 0x6d4ad220, 0x2afed: 0x6d4ad420, 0x2afee: 0x6d4ad620, 0x2afef: 0x6d4ad820, + 0x2aff0: 0x6d786620, 0x2aff1: 0x6d786820, 0x2aff2: 0x6d786a20, 0x2aff3: 0x6d786c20, + 0x2aff4: 0x6d786e20, 0x2aff5: 0x6d787020, 0x2aff6: 0x6d787220, 0x2aff7: 0x6da18820, + 0x2aff8: 0x6da18a20, 0x2aff9: 0x6da18c20, 0x2affa: 0x6da18e20, 0x2affb: 0x6dc3e020, + 0x2affc: 0x6dc3e220, 0x2affd: 0x6dc3e420, 0x2affe: 0x6de10220, 0x2afff: 0x6de10420, + // Block 0xac0, offset 0x2b000 + 0x2b000: 0x6df93220, 0x2b001: 0x6e31c220, 0x2b002: 0x6e385e20, 0x2b003: 0x6cbd8620, + 0x2b004: 0x6d4ba020, 0x2b005: 0x6c48f020, 0x2b006: 0x6c48f420, 0x2b007: 0x6c48f620, + 0x2b008: 0x6c07ce20, 0x2b009: 0x6c2e8c20, 0x2b00a: 0x6cbd9820, 0x2b00b: 0x6d1e0c20, + 0x2b00c: 0x6d1e0e20, 0x2b00d: 0x6dc44620, 0x2b00e: 0x6c07dc20, 0x2b00f: 0x6c0f2c20, + 0x2b010: 0x6c0f2e20, 0x2b011: 0x6c0f3020, 0x2b012: 0x6c1b8a20, 0x2b013: 0x6c1b8c20, + 0x2b014: 0x6c2e9a20, 0x2b015: 0x6c2e9c20, 0x2b016: 0x6c2e9e20, 0x2b017: 0x6c2ea020, + 0x2b018: 0x6c2ea220, 0x2b019: 0x6c2ea420, 0x2b01a: 0x6c490220, 0x2b01b: 0x6c490420, + 0x2b01c: 0x6c919820, 0x2b01d: 0x6c919a20, 0x2b01e: 0x6c919c20, 0x2b01f: 0x6cbdb620, + 0x2b020: 0x6cee7620, 0x2b021: 0x6d791c20, 0x2b022: 0x6c07fc20, 0x2b023: 0x6c0f5620, + 0x2b024: 0x6c0f5820, 0x2b025: 0x6c0f5a20, 0x2b026: 0x6c0f5c20, 0x2b027: 0x6c0f5e20, + 0x2b028: 0x6c0f6020, 0x2b029: 0x6c1bc420, 0x2b02a: 0x6c1bc620, 0x2b02b: 0x6c1bc820, + 0x2b02c: 0x6c1bca20, 0x2b02d: 0x6c1bcc20, 0x2b02e: 0x6c1bce20, 0x2b02f: 0x6c1bd020, + 0x2b030: 0x6c2ef420, 0x2b031: 0x6c2ef620, 0x2b032: 0x6c2ef820, 0x2b033: 0x6c2efa20, + 0x2b034: 0x6c2efc20, 0x2b035: 0x6c2efe20, 0x2b036: 0x6c2f0020, 0x2b037: 0x6c2f0220, + 0x2b038: 0x6c2f0420, 0x2b039: 0x6c2f0620, 0x2b03a: 0x6c2f0820, 0x2b03b: 0x6c2f0a20, + 0x2b03c: 0x6c2f0c20, 0x2b03d: 0x6c2f0e20, 0x2b03e: 0x6c2f1020, 0x2b03f: 0x6c2f1220, + // Block 0xac1, offset 0x2b040 + 0x2b040: 0x6c2f1420, 0x2b041: 0x6c2f1620, 0x2b042: 0x6c493e20, 0x2b043: 0x6c494020, + 0x2b044: 0x6c494220, 0x2b045: 0x6c494420, 0x2b046: 0x6c494620, 0x2b047: 0x6c494820, + 0x2b048: 0x6c494a20, 0x2b049: 0x6c494c20, 0x2b04a: 0x6c494e20, 0x2b04b: 0x6c495020, + 0x2b04c: 0x6c495220, 0x2b04d: 0x6c6aea20, 0x2b04e: 0x6c6aec20, 0x2b04f: 0x6c6aee20, + 0x2b050: 0x6c6af020, 0x2b051: 0x6c6af220, 0x2b052: 0x6c6af420, 0x2b053: 0x6c6af620, + 0x2b054: 0x6c6af820, 0x2b055: 0x6c6afa20, 0x2b056: 0x6c6afc20, 0x2b057: 0x6c6afe20, + 0x2b058: 0x6c6b0020, 0x2b059: 0x6c6b0220, 0x2b05a: 0x6c6b0420, 0x2b05b: 0x6c6b0620, + 0x2b05c: 0x6c6b0820, 0x2b05d: 0x6c6b0a20, 0x2b05e: 0x6c6b0c20, 0x2b05f: 0x6c6b0e20, + 0x2b060: 0x6c1bd220, 0x2b061: 0x6c6b1020, 0x2b062: 0x6c6b1220, 0x2b063: 0x6c6b1420, + 0x2b064: 0x6c6b1620, 0x2b065: 0x6c91da20, 0x2b066: 0x6c91dc20, 0x2b067: 0x6c91de20, + 0x2b068: 0x6c91e020, 0x2b069: 0x6c91e220, 0x2b06a: 0x6c91e420, 0x2b06b: 0x6c91e620, + 0x2b06c: 0x6c91e820, 0x2b06d: 0x6c91ea20, 0x2b06e: 0x6cbdf220, 0x2b06f: 0x6cbdf420, + 0x2b070: 0x6cbdf620, 0x2b071: 0x6cbdf820, 0x2b072: 0x6cbdfa20, 0x2b073: 0x6cbdfc20, + 0x2b074: 0x6cbdfe20, 0x2b075: 0x6cbe0020, 0x2b076: 0x6cbe0220, 0x2b077: 0x6cbe0420, + 0x2b078: 0x6cbe0620, 0x2b079: 0x6cbe0820, 0x2b07a: 0x6cbe0a20, 0x2b07b: 0x6cbe0c20, + 0x2b07c: 0x6cbe0e20, 0x2b07d: 0x6cbe1020, 0x2b07e: 0x6cbe1220, 0x2b07f: 0x6cbe1420, + // Block 0xac2, offset 0x2b080 + 0x2b080: 0x6cbe1620, 0x2b081: 0x6cbe1820, 0x2b082: 0x6cbe1a20, 0x2b083: 0x6cbe1c20, + 0x2b084: 0x6cbe1e20, 0x2b085: 0x6ceea620, 0x2b086: 0x6ceea820, 0x2b087: 0x6ceeaa20, + 0x2b088: 0x6ceeac20, 0x2b089: 0x6ceeae20, 0x2b08a: 0x6ceeb020, 0x2b08b: 0x6ceeb220, + 0x2b08c: 0x6ceeb420, 0x2b08d: 0x6ceeb620, 0x2b08e: 0x6ceeb820, 0x2b08f: 0x6ceeba20, + 0x2b090: 0x6ceebc20, 0x2b091: 0x6ceebe20, 0x2b092: 0x6ceec020, 0x2b093: 0x6ceec220, + 0x2b094: 0x6ceec420, 0x2b095: 0x6d1e5220, 0x2b096: 0x6d1e5420, 0x2b097: 0x6d1e5620, + 0x2b098: 0x6d1e5820, 0x2b099: 0x6d1e5a20, 0x2b09a: 0x6d1e5c20, 0x2b09b: 0x6d1e5e20, + 0x2b09c: 0x6d1e6020, 0x2b09d: 0x6d1e6220, 0x2b09e: 0x6d1e6420, 0x2b09f: 0x6d1e6620, + 0x2b0a0: 0x6d1e6820, 0x2b0a1: 0x6d1e6a20, 0x2b0a2: 0x6d1e6c20, 0x2b0a3: 0x6d4bde20, + 0x2b0a4: 0x6d4be020, 0x2b0a5: 0x6d4be220, 0x2b0a6: 0x6d4be420, 0x2b0a7: 0x6d4be620, + 0x2b0a8: 0x6d4be820, 0x2b0a9: 0x6d793820, 0x2b0aa: 0x6d793a20, 0x2b0ab: 0x6d793c20, + 0x2b0ac: 0x6d793e20, 0x2b0ad: 0x6d794020, 0x2b0ae: 0x6da22220, 0x2b0af: 0x6da22420, + 0x2b0b0: 0x6dc45420, 0x2b0b1: 0x6dc45620, 0x2b0b2: 0x6de15a20, 0x2b0b3: 0x6de15c20, + 0x2b0b4: 0x6de15e20, 0x2b0b5: 0x6de16020, 0x2b0b6: 0x6df95c20, 0x2b0b7: 0x6df95e20, + 0x2b0b8: 0x6df96020, 0x2b0b9: 0x6e0d2820, 0x2b0ba: 0x6e1c9820, 0x2b0bb: 0x6e3d1620, + 0x2b0bc: 0x6e3d1820, 0x2b0bd: 0x6c0fa620, 0x2b0be: 0x6c1c6220, 0x2b0bf: 0x6c1c6420, + // Block 0xac3, offset 0x2b0c0 + 0x2b0c0: 0x6c2fc820, 0x2b0c1: 0x6c4a1c20, 0x2b0c2: 0x6c6bdc20, 0x2b0c3: 0x6c6bde20, + 0x2b0c4: 0x6cbf4220, 0x2b0c5: 0x6cef7820, 0x2b0c6: 0x6d4cb620, 0x2b0c7: 0x6d79e020, + 0x2b0c8: 0x6e386820, 0x2b0c9: 0x6c03f620, 0x2b0ca: 0x6c081e20, 0x2b0cb: 0x6c082020, + 0x2b0cc: 0x6c0fb820, 0x2b0cd: 0x6c0fba20, 0x2b0ce: 0x6c1c8620, 0x2b0cf: 0x6c1c8820, + 0x2b0d0: 0x6c1c8a20, 0x2b0d1: 0x6c1c8c20, 0x2b0d2: 0x6c2ffa20, 0x2b0d3: 0x6c4a4020, + 0x2b0d4: 0x6c4a4220, 0x2b0d5: 0x6c4a4420, 0x2b0d6: 0x6c4a4620, 0x2b0d7: 0x6c6bf620, + 0x2b0d8: 0x6c6bf820, 0x2b0d9: 0x6c6bfa20, 0x2b0da: 0x6c6bfc20, 0x2b0db: 0x6c932220, + 0x2b0dc: 0x6c932420, 0x2b0dd: 0x6c932620, 0x2b0de: 0x6c932820, 0x2b0df: 0x6c932a20, + 0x2b0e0: 0x6c932c20, 0x2b0e1: 0x6c932e20, 0x2b0e2: 0x6cbf6420, 0x2b0e3: 0x6cbf6620, + 0x2b0e4: 0x6cef9a20, 0x2b0e5: 0x6cef9c20, 0x2b0e6: 0x6cef9e20, 0x2b0e7: 0x6cefa020, + 0x2b0e8: 0x6cefa220, 0x2b0e9: 0x6d1f3c20, 0x2b0ea: 0x6d1f3e20, 0x2b0eb: 0x6d1f4020, + 0x2b0ec: 0x6d1f4220, 0x2b0ed: 0x6d4cc820, 0x2b0ee: 0x6d4cca20, 0x2b0ef: 0x6d4ccc20, + 0x2b0f0: 0x6dc49420, 0x2b0f1: 0x6e0d4620, 0x2b0f2: 0x6e3d1a20, 0x2b0f3: 0x6c083020, + 0x2b0f4: 0x6c1cbc20, 0x2b0f5: 0x6c304420, 0x2b0f6: 0x6c6c7220, 0x2b0f7: 0x6cbfd420, + 0x2b0f8: 0x6c6c7c20, 0x2b0f9: 0x6cbfea20, 0x2b0fa: 0x6d1fba20, 0x2b0fb: 0x6d4d3820, + 0x2b0fc: 0x6c0ffa20, 0x2b0fd: 0x6c1cd620, 0x2b0fe: 0x6c306a20, 0x2b0ff: 0x6c306c20, + // Block 0xac4, offset 0x2b100 + 0x2b100: 0x6c4aba20, 0x2b101: 0x6c4abc20, 0x2b102: 0x6c6c9420, 0x2b103: 0x6c93b820, + 0x2b104: 0x6c93ba20, 0x2b105: 0x6c93bc20, 0x2b106: 0x6c93be20, 0x2b107: 0x6cc00220, + 0x2b108: 0x6cc00420, 0x2b109: 0x6cf01220, 0x2b10a: 0x6cf01420, 0x2b10b: 0x6c085020, + 0x2b10c: 0x6c100a20, 0x2b10d: 0x6c100c20, 0x2b10e: 0x6c1cf820, 0x2b10f: 0x6c308020, + 0x2b110: 0x6c308220, 0x2b111: 0x6c308420, 0x2b112: 0x6c4acc20, 0x2b113: 0x6c4ace20, + 0x2b114: 0x6c4ad020, 0x2b115: 0x6c4ad220, 0x2b116: 0x6c4ad420, 0x2b117: 0x6c6cac20, + 0x2b118: 0x6c93cc20, 0x2b119: 0x6c93ce20, 0x2b11a: 0x6cc02020, 0x2b11b: 0x6cc02220, + 0x2b11c: 0x6d1fda20, 0x2b11d: 0x6d1fdc20, 0x2b11e: 0x6d1fde20, 0x2b11f: 0x6d4d5e20, + 0x2b120: 0x6d4d6020, 0x2b121: 0x6de1be20, 0x2b122: 0x6c040c20, 0x2b123: 0x6c1d1e20, + 0x2b124: 0x6c086420, 0x2b125: 0x6c086620, 0x2b126: 0x6c086820, 0x2b127: 0x6c086a20, + 0x2b128: 0x6c103620, 0x2b129: 0x6c103820, 0x2b12a: 0x6c103a20, 0x2b12b: 0x6c103c20, + 0x2b12c: 0x6c103e20, 0x2b12d: 0x6c104020, 0x2b12e: 0x6c104220, 0x2b12f: 0x6c104420, + 0x2b130: 0x6c1d2c20, 0x2b131: 0x6c1d2e20, 0x2b132: 0x6c1d3020, 0x2b133: 0x6c1d3220, + 0x2b134: 0x6c1d3420, 0x2b135: 0x6c1d3620, 0x2b136: 0x6c1d3820, 0x2b137: 0x6c1d2020, + 0x2b138: 0x6c1d3a20, 0x2b139: 0x6c30b820, 0x2b13a: 0x6c30ba20, 0x2b13b: 0x6c30bc20, + 0x2b13c: 0x6c30be20, 0x2b13d: 0x6c30c020, 0x2b13e: 0x6c30c220, 0x2b13f: 0x6c30c420, + // Block 0xac5, offset 0x2b140 + 0x2b140: 0x6c30c620, 0x2b141: 0x6c30c820, 0x2b142: 0x6c30ca20, 0x2b143: 0x6c30cc20, + 0x2b144: 0x6c4b2020, 0x2b145: 0x6c4b2220, 0x2b146: 0x6c4b2420, 0x2b147: 0x6c6d0020, + 0x2b148: 0x6c6d0220, 0x2b149: 0x6c6d0420, 0x2b14a: 0x6c6d0620, 0x2b14b: 0x6c6d0820, + 0x2b14c: 0x6c6d0a20, 0x2b14d: 0x6c6d0c20, 0x2b14e: 0x6c6d0e20, 0x2b14f: 0x6c6d1020, + 0x2b150: 0x6c6d1220, 0x2b151: 0x6c6d1420, 0x2b152: 0x6c6d1620, 0x2b153: 0x6c6d1820, + 0x2b154: 0x6c6d1a20, 0x2b155: 0x6c6d1c20, 0x2b156: 0x6c6d1e20, 0x2b157: 0x6c941620, + 0x2b158: 0x6c941820, 0x2b159: 0x6c941a20, 0x2b15a: 0x6c941c20, 0x2b15b: 0x6c941e20, + 0x2b15c: 0x6c942020, 0x2b15d: 0x6c942220, 0x2b15e: 0x6c942420, 0x2b15f: 0x6c942620, + 0x2b160: 0x6c942820, 0x2b161: 0x6c942a20, 0x2b162: 0x6c942c20, 0x2b163: 0x6c942e20, + 0x2b164: 0x6c943020, 0x2b165: 0x6c943220, 0x2b166: 0x6cc07020, 0x2b167: 0x6cc07220, + 0x2b168: 0x6cc07420, 0x2b169: 0x6cc07620, 0x2b16a: 0x6cc07820, 0x2b16b: 0x6cc07a20, + 0x2b16c: 0x6cc07c20, 0x2b16d: 0x6cc07e20, 0x2b16e: 0x6cc08020, 0x2b16f: 0x6cc08220, + 0x2b170: 0x6cf06820, 0x2b171: 0x6cf06a20, 0x2b172: 0x6cf06c20, 0x2b173: 0x6cf06e20, + 0x2b174: 0x6cf07020, 0x2b175: 0x6cf07220, 0x2b176: 0x6cf07420, 0x2b177: 0x6cf07620, + 0x2b178: 0x6cf07820, 0x2b179: 0x6d200020, 0x2b17a: 0x6d200220, 0x2b17b: 0x6d200420, + 0x2b17c: 0x6d200620, 0x2b17d: 0x6d200820, 0x2b17e: 0x6d200a20, 0x2b17f: 0x6d200c20, + // Block 0xac6, offset 0x2b180 + 0x2b180: 0x6d200e20, 0x2b181: 0x6d201020, 0x2b182: 0x6d201220, 0x2b183: 0x6d201420, + 0x2b184: 0x6d201620, 0x2b185: 0x6d4d9420, 0x2b186: 0x6d4d9620, 0x2b187: 0x6d4d9820, + 0x2b188: 0x6d4d9a20, 0x2b189: 0x6d4d9c20, 0x2b18a: 0x6d4d9e20, 0x2b18b: 0x6d4da020, + 0x2b18c: 0x6d4da220, 0x2b18d: 0x6d4da420, 0x2b18e: 0x6d4da620, 0x2b18f: 0x6d4da820, + 0x2b190: 0x6d4daa20, 0x2b191: 0x6d7a6020, 0x2b192: 0x6d7a6220, 0x2b193: 0x6d7a6420, + 0x2b194: 0x6d7a6620, 0x2b195: 0x6d7a6820, 0x2b196: 0x6d7a6a20, 0x2b197: 0x6d7a6c20, + 0x2b198: 0x6da2e220, 0x2b199: 0x6da2e420, 0x2b19a: 0x6da2e620, 0x2b19b: 0x6da2e820, + 0x2b19c: 0x6da2ea20, 0x2b19d: 0x6dc4d020, 0x2b19e: 0x6dc4d220, 0x2b19f: 0x6dc4d420, + 0x2b1a0: 0x6de1d020, 0x2b1a1: 0x6de1d220, 0x2b1a2: 0x6de1d420, 0x2b1a3: 0x6de1d620, + 0x2b1a4: 0x6df9b020, 0x2b1a5: 0x6e0d7020, 0x2b1a6: 0x6e0d7220, 0x2b1a7: 0x6e1cd620, + 0x2b1a8: 0x6e429020, 0x2b1a9: 0x6c109220, 0x2b1aa: 0x6c041c20, 0x2b1ab: 0x6c6de820, + 0x2b1ac: 0x6c6dea20, 0x2b1ad: 0x6cc16e20, 0x2b1ae: 0x6d4e4c20, 0x2b1af: 0x6c08a020, + 0x2b1b0: 0x6c318820, 0x2b1b1: 0x6c955820, 0x2b1b2: 0x6c08a620, 0x2b1b3: 0x6c08a820, + 0x2b1b4: 0x6c10ae20, 0x2b1b5: 0x6c10b020, 0x2b1b6: 0x6c10b220, 0x2b1b7: 0x6c1dea20, + 0x2b1b8: 0x6c1dec20, 0x2b1b9: 0x6c1dee20, 0x2b1ba: 0x6c1df020, 0x2b1bb: 0x6c1df220, + 0x2b1bc: 0x6c1df420, 0x2b1bd: 0x6c319220, 0x2b1be: 0x6c319420, 0x2b1bf: 0x6c319620, + // Block 0xac7, offset 0x2b1c0 + 0x2b1c0: 0x6c319820, 0x2b1c1: 0x6c4bf020, 0x2b1c2: 0x6c4bf220, 0x2b1c3: 0x6c4bf420, + 0x2b1c4: 0x6c4bf620, 0x2b1c5: 0x6c4bf820, 0x2b1c6: 0x6c4bfa20, 0x2b1c7: 0x6c6dfc20, + 0x2b1c8: 0x6c6dfe20, 0x2b1c9: 0x6c956420, 0x2b1ca: 0x6c956620, 0x2b1cb: 0x6c956820, + 0x2b1cc: 0x6c956a20, 0x2b1cd: 0x6c956c20, 0x2b1ce: 0x6c956e20, 0x2b1cf: 0x6cc18820, + 0x2b1d0: 0x6cc18a20, 0x2b1d1: 0x6cc18c20, 0x2b1d2: 0x6cc18e20, 0x2b1d3: 0x6cc19020, + 0x2b1d4: 0x6cc19220, 0x2b1d5: 0x6cc19420, 0x2b1d6: 0x6cc19620, 0x2b1d7: 0x6cf11a20, + 0x2b1d8: 0x6cf11c20, 0x2b1d9: 0x6cf11e20, 0x2b1da: 0x6cf12020, 0x2b1db: 0x6cf12220, + 0x2b1dc: 0x6d20c020, 0x2b1dd: 0x6d20c220, 0x2b1de: 0x6d20c420, 0x2b1df: 0x6d20c620, + 0x2b1e0: 0x6d4e5a20, 0x2b1e1: 0x6d4e5c20, 0x2b1e2: 0x6d7ae820, 0x2b1e3: 0x6d7aea20, + 0x2b1e4: 0x6d7aec20, 0x2b1e5: 0x6da35c20, 0x2b1e6: 0x6da35e20, 0x2b1e7: 0x6df9dc20, + 0x2b1e8: 0x6df9de20, 0x2b1e9: 0x6e1d0420, 0x2b1ea: 0x6e1d0620, 0x2b1eb: 0x6cc1fc20, + 0x2b1ec: 0x6cc1fe20, 0x2b1ed: 0x6d210c20, 0x2b1ee: 0x6d7b2420, 0x2b1ef: 0x6c10e420, + 0x2b1f0: 0x6c10e620, 0x2b1f1: 0x6c10e820, 0x2b1f2: 0x6c1e4220, 0x2b1f3: 0x6c1e4420, + 0x2b1f4: 0x6c31f220, 0x2b1f5: 0x6c31f420, 0x2b1f6: 0x6c31f620, 0x2b1f7: 0x6c31f820, + 0x2b1f8: 0x6c31fa20, 0x2b1f9: 0x6c31fc20, 0x2b1fa: 0x6c31fe20, 0x2b1fb: 0x6c320020, + 0x2b1fc: 0x6c4c6820, 0x2b1fd: 0x6c4c6a20, 0x2b1fe: 0x6c4c6c20, 0x2b1ff: 0x6c4c6e20, + // Block 0xac8, offset 0x2b200 + 0x2b200: 0x6c4c7020, 0x2b201: 0x6c4c7220, 0x2b202: 0x6c4c7420, 0x2b203: 0x6c6e6020, + 0x2b204: 0x6c6e6220, 0x2b205: 0x6c6e6420, 0x2b206: 0x6c6e6620, 0x2b207: 0x6c6e6820, + 0x2b208: 0x6c95d820, 0x2b209: 0x6c95da20, 0x2b20a: 0x6c95dc20, 0x2b20b: 0x6c95de20, + 0x2b20c: 0x6c95e020, 0x2b20d: 0x6cc20420, 0x2b20e: 0x6cc20620, 0x2b20f: 0x6cc20820, + 0x2b210: 0x6cc20a20, 0x2b211: 0x6cf16a20, 0x2b212: 0x6d211620, 0x2b213: 0x6d211820, + 0x2b214: 0x6d211a20, 0x2b215: 0x6d211c20, 0x2b216: 0x6d4eb620, 0x2b217: 0x6d4eb820, + 0x2b218: 0x6d4eba20, 0x2b219: 0x6d7b2620, 0x2b21a: 0x6d7b2820, 0x2b21b: 0x6d7b2a20, + 0x2b21c: 0x6d7b2c20, 0x2b21d: 0x6de23020, 0x2b21e: 0x6df9ec20, 0x2b21f: 0x6c110820, + 0x2b220: 0x6c324420, 0x2b221: 0x6d217420, 0x2b222: 0x6d4f0020, 0x2b223: 0x6d7b5c20, + 0x2b224: 0x6c1ea620, 0x2b225: 0x6c4ce020, 0x2b226: 0x6cf1b820, 0x2b227: 0x6c044820, + 0x2b228: 0x6c112020, 0x2b229: 0x6c112220, 0x2b22a: 0x6c112420, 0x2b22b: 0x6c112620, + 0x2b22c: 0x6c1eb220, 0x2b22d: 0x6c1eb420, 0x2b22e: 0x6c326020, 0x2b22f: 0x6c326220, + 0x2b230: 0x6c326420, 0x2b231: 0x6c326620, 0x2b232: 0x6c4cec20, 0x2b233: 0x6c4cee20, + 0x2b234: 0x6c4cf020, 0x2b235: 0x6c4cf220, 0x2b236: 0x6c4cf420, 0x2b237: 0x6c4cf620, + 0x2b238: 0x6c6ed820, 0x2b239: 0x6c6eda20, 0x2b23a: 0x6c966820, 0x2b23b: 0x6c966a20, + 0x2b23c: 0x6c966c20, 0x2b23d: 0x6cc27e20, 0x2b23e: 0x6cc28020, 0x2b23f: 0x6cc28220, + // Block 0xac9, offset 0x2b240 + 0x2b240: 0x6cf1c220, 0x2b241: 0x6cf1c420, 0x2b242: 0x6cf1c620, 0x2b243: 0x6d218420, + 0x2b244: 0x6d4f0820, 0x2b245: 0x6d4f0a20, 0x2b246: 0x6e0dac20, 0x2b247: 0x6c329a20, + 0x2b248: 0x6d7b7820, 0x2b249: 0x6c115620, 0x2b24a: 0x6c1ede20, 0x2b24b: 0x6c32a420, + 0x2b24c: 0x6c32a620, 0x2b24d: 0x6c32a820, 0x2b24e: 0x6c96aa20, 0x2b24f: 0x6cc2ae20, + 0x2b250: 0x6cc2b020, 0x2b251: 0x6d21b220, 0x2b252: 0x6d4f2620, 0x2b253: 0x6d7b8220, + 0x2b254: 0x6c090020, 0x2b255: 0x6c116020, 0x2b256: 0x6c1eea20, 0x2b257: 0x6c1eec20, + 0x2b258: 0x6c32b420, 0x2b259: 0x6c32b620, 0x2b25a: 0x6c4d3c20, 0x2b25b: 0x6c4d3e20, + 0x2b25c: 0x6c4d4020, 0x2b25d: 0x6c4d4220, 0x2b25e: 0x6c4d4420, 0x2b25f: 0x6c4d4620, + 0x2b260: 0x6c4d4820, 0x2b261: 0x6c4d4a20, 0x2b262: 0x6c6f1220, 0x2b263: 0x6c6f1420, + 0x2b264: 0x6c96c620, 0x2b265: 0x6c96c820, 0x2b266: 0x6c96ca20, 0x2b267: 0x6c96cc20, + 0x2b268: 0x6c96ce20, 0x2b269: 0x6c96d020, 0x2b26a: 0x6cc2c020, 0x2b26b: 0x6cc2c220, + 0x2b26c: 0x6cc2c420, 0x2b26d: 0x6cc2c620, 0x2b26e: 0x6cc2c820, 0x2b26f: 0x6cf1f620, + 0x2b270: 0x6d21bc20, 0x2b271: 0x6d21be20, 0x2b272: 0x6d21c020, 0x2b273: 0x6d4f3620, + 0x2b274: 0x6d4f3820, 0x2b275: 0x6d7b8c20, 0x2b276: 0x6d7b8e20, 0x2b277: 0x6da3c020, + 0x2b278: 0x6de27220, 0x2b279: 0x6dfa1a20, 0x2b27a: 0x6c090620, 0x2b27b: 0x6c116e20, + 0x2b27c: 0x6c117220, 0x2b27d: 0x6c1f1c20, 0x2b27e: 0x6c117420, 0x2b27f: 0x6c117620, + // Block 0xaca, offset 0x2b280 + 0x2b280: 0x6c1f1e20, 0x2b281: 0x6c32e020, 0x2b282: 0x6c32e220, 0x2b283: 0x6c1f3220, + 0x2b284: 0x6c1f3420, 0x2b285: 0x6c32e420, 0x2b286: 0x6c1f3620, 0x2b287: 0x6c1f3820, + 0x2b288: 0x6c1f3a20, 0x2b289: 0x6c1f3c20, 0x2b28a: 0x6c1f3e20, 0x2b28b: 0x6c1f4020, + 0x2b28c: 0x6c32fc20, 0x2b28d: 0x6c4d7c20, 0x2b28e: 0x6c4d7e20, 0x2b28f: 0x6c32fe20, + 0x2b290: 0x6c330020, 0x2b291: 0x6c330220, 0x2b292: 0x6c330420, 0x2b293: 0x6c330620, + 0x2b294: 0x6c330820, 0x2b295: 0x6c330a20, 0x2b296: 0x6c330c20, 0x2b297: 0x6c4d8020, + 0x2b298: 0x6c330e20, 0x2b299: 0x6c4d8220, 0x2b29a: 0x6c4da220, 0x2b29b: 0x6c4da420, + 0x2b29c: 0x6c4da620, 0x2b29d: 0x6c4da820, 0x2b29e: 0x6c4daa20, 0x2b29f: 0x6c6f5620, + 0x2b2a0: 0x6c6f5820, 0x2b2a1: 0x6c4dac20, 0x2b2a2: 0x6c4dae20, 0x2b2a3: 0x6c6f5a20, + 0x2b2a4: 0x6c4db020, 0x2b2a5: 0x6c4db220, 0x2b2a6: 0x6c4db420, 0x2b2a7: 0x6c4db620, + 0x2b2a8: 0x6c4db820, 0x2b2a9: 0x6c6f5c20, 0x2b2aa: 0x6c6f5e20, 0x2b2ab: 0x6c6f6020, + 0x2b2ac: 0x6c4dba20, 0x2b2ad: 0x6c4dbc20, 0x2b2ae: 0x6c972e20, 0x2b2af: 0x6c6f8a20, + 0x2b2b0: 0x6c973020, 0x2b2b1: 0x6c6f8c20, 0x2b2b2: 0x6c973220, 0x2b2b3: 0x6c6f8e20, + 0x2b2b4: 0x6c6f9020, 0x2b2b5: 0x6c973420, 0x2b2b6: 0x6c6f9220, 0x2b2b7: 0x6c6f9420, + 0x2b2b8: 0x6c6f9620, 0x2b2b9: 0x6c6f9820, 0x2b2ba: 0x6c4dbe20, 0x2b2bb: 0x6c973620, + 0x2b2bc: 0x6c6f9a20, 0x2b2bd: 0x6c6f9c20, 0x2b2be: 0x6c975620, 0x2b2bf: 0x6c975820, + // Block 0xacb, offset 0x2b2c0 + 0x2b2c0: 0x6c975a20, 0x2b2c1: 0x6cc30420, 0x2b2c2: 0x6c975c20, 0x2b2c3: 0x6c975e20, + 0x2b2c4: 0x6c976020, 0x2b2c5: 0x6c976220, 0x2b2c6: 0x6c976420, 0x2b2c7: 0x6c976620, + 0x2b2c8: 0x6cc30620, 0x2b2c9: 0x6c976820, 0x2b2ca: 0x6c976a20, 0x2b2cb: 0x6cc30820, + 0x2b2cc: 0x6c976c20, 0x2b2cd: 0x6c976e20, 0x2b2ce: 0x6cc30a20, 0x2b2cf: 0x6c977020, + 0x2b2d0: 0x6cc30c20, 0x2b2d1: 0x6cc30e20, 0x2b2d2: 0x6c977220, 0x2b2d3: 0x6c977420, + 0x2b2d4: 0x6c977620, 0x2b2d5: 0x6cc31020, 0x2b2d6: 0x6cc31220, 0x2b2d7: 0x6c977820, + 0x2b2d8: 0x6c977a20, 0x2b2d9: 0x6c977c20, 0x2b2da: 0x6cc33c20, 0x2b2db: 0x6cc33e20, + 0x2b2dc: 0x6cc34020, 0x2b2dd: 0x6cc34220, 0x2b2de: 0x6cc34420, 0x2b2df: 0x6cc34620, + 0x2b2e0: 0x6cc34820, 0x2b2e1: 0x6cc34a20, 0x2b2e2: 0x6cc34c20, 0x2b2e3: 0x6cf24220, + 0x2b2e4: 0x6cf24420, 0x2b2e5: 0x6cc34e20, 0x2b2e6: 0x6cf24620, 0x2b2e7: 0x6cc35020, + 0x2b2e8: 0x6cf24820, 0x2b2e9: 0x6cc35220, 0x2b2ea: 0x6cc35420, 0x2b2eb: 0x6cc35620, + 0x2b2ec: 0x6cf26620, 0x2b2ed: 0x6cf26820, 0x2b2ee: 0x6cf26a20, 0x2b2ef: 0x6d220420, + 0x2b2f0: 0x6cf26c20, 0x2b2f1: 0x6cf26e20, 0x2b2f2: 0x6d220620, 0x2b2f3: 0x6cf27020, + 0x2b2f4: 0x6cf27220, 0x2b2f5: 0x6cf27420, 0x2b2f6: 0x6d220820, 0x2b2f7: 0x6d220a20, + 0x2b2f8: 0x6d220c20, 0x2b2f9: 0x6d220e20, 0x2b2fa: 0x6cf27620, 0x2b2fb: 0x6d221020, + 0x2b2fc: 0x6d222a20, 0x2b2fd: 0x6d222c20, 0x2b2fe: 0x6d222e20, 0x2b2ff: 0x6d4f6420, + // Block 0xacc, offset 0x2b300 + 0x2b300: 0x6d223020, 0x2b301: 0x6d4f6620, 0x2b302: 0x6d4f6820, 0x2b303: 0x6d223220, + 0x2b304: 0x6d4f6a20, 0x2b305: 0x6d223420, 0x2b306: 0x6d223620, 0x2b307: 0x6d223820, + 0x2b308: 0x6d223a20, 0x2b309: 0x6d4f9820, 0x2b30a: 0x6d4f9a20, 0x2b30b: 0x6d4f9c20, + 0x2b30c: 0x6d7bb220, 0x2b30d: 0x6d4f9e20, 0x2b30e: 0x6d4fa020, 0x2b30f: 0x6d4fa220, + 0x2b310: 0x6d4fa420, 0x2b311: 0x6d4fa620, 0x2b312: 0x6d4fa820, 0x2b313: 0x6d4faa20, + 0x2b314: 0x6d7bb420, 0x2b315: 0x6d4fac20, 0x2b316: 0x6d4fae20, 0x2b317: 0x6d7bce20, + 0x2b318: 0x6da3d420, 0x2b319: 0x6d7bd020, 0x2b31a: 0x6dc57420, 0x2b31b: 0x6dc57620, + 0x2b31c: 0x6da3e620, 0x2b31d: 0x6dc57820, 0x2b31e: 0x6dc57a20, 0x2b31f: 0x6dc57c20, + 0x2b320: 0x6da3e820, 0x2b321: 0x6dc58820, 0x2b322: 0x6dc58a20, 0x2b323: 0x6dfa2a20, + 0x2b324: 0x6dfa2c20, 0x2b325: 0x6de28420, 0x2b326: 0x6de28620, 0x2b327: 0x6de28820, + 0x2b328: 0x6dfa3020, 0x2b329: 0x6dfa3220, 0x2b32a: 0x6dfa3420, 0x2b32b: 0x6e1d3420, + 0x2b32c: 0x6e1d3620, 0x2b32d: 0x6e403c20, 0x2b32e: 0x6c1ffc20, 0x2b32f: 0x6c1ffe20, + 0x2b330: 0x6c33dc20, 0x2b331: 0x6c33de20, 0x2b332: 0x6c33e020, 0x2b333: 0x6c4e9e20, + 0x2b334: 0x6c709620, 0x2b335: 0x6c709820, 0x2b336: 0x6c709a20, 0x2b337: 0x6c98b620, + 0x2b338: 0x6cc48e20, 0x2b339: 0x6cf37620, 0x2b33a: 0x6d233220, 0x2b33b: 0x6d50be20, + 0x2b33c: 0x6d50c020, 0x2b33d: 0x6da46820, 0x2b33e: 0x6c201620, 0x2b33f: 0x6c340220, + // Block 0xacd, offset 0x2b340 + 0x2b340: 0x6c340420, 0x2b341: 0x6c4ec820, 0x2b342: 0x6c4eca20, 0x2b343: 0x6c093220, + 0x2b344: 0x6c093420, 0x2b345: 0x6c093620, 0x2b346: 0x6c11d620, 0x2b347: 0x6c11d820, + 0x2b348: 0x6c11da20, 0x2b349: 0x6c202820, 0x2b34a: 0x6c202a20, 0x2b34b: 0x6c202c20, + 0x2b34c: 0x6c202e20, 0x2b34d: 0x6c203020, 0x2b34e: 0x6c203220, 0x2b34f: 0x6c203420, + 0x2b350: 0x6c203620, 0x2b351: 0x6c203820, 0x2b352: 0x6c341e20, 0x2b353: 0x6c342020, + 0x2b354: 0x6c342220, 0x2b355: 0x6c342420, 0x2b356: 0x6c342620, 0x2b357: 0x6c342820, + 0x2b358: 0x6c4ef220, 0x2b359: 0x6c342a20, 0x2b35a: 0x6c342c20, 0x2b35b: 0x6c342e20, + 0x2b35c: 0x6c343020, 0x2b35d: 0x6c343220, 0x2b35e: 0x6c343420, 0x2b35f: 0x6c343620, + 0x2b360: 0x6c343820, 0x2b361: 0x6c4ef820, 0x2b362: 0x6c4efa20, 0x2b363: 0x6c4efc20, + 0x2b364: 0x6c4efe20, 0x2b365: 0x6c4f0020, 0x2b366: 0x6c4f0220, 0x2b367: 0x6c4f0420, + 0x2b368: 0x6c4f0620, 0x2b369: 0x6c4f0820, 0x2b36a: 0x6c4f0a20, 0x2b36b: 0x6c4f0c20, + 0x2b36c: 0x6c70ca20, 0x2b36d: 0x6c70cc20, 0x2b36e: 0x6c4f0e20, 0x2b36f: 0x6c4f1020, + 0x2b370: 0x6c4f1220, 0x2b371: 0x6c70ce20, 0x2b372: 0x6c70e020, 0x2b373: 0x6c98e220, + 0x2b374: 0x6c70e220, 0x2b375: 0x6c70e420, 0x2b376: 0x6c70e620, 0x2b377: 0x6c70e820, + 0x2b378: 0x6c70ea20, 0x2b379: 0x6c98e820, 0x2b37a: 0x6c98ea20, 0x2b37b: 0x6c98ec20, + 0x2b37c: 0x6c98ee20, 0x2b37d: 0x6c98f020, 0x2b37e: 0x6c98f220, 0x2b37f: 0x6c98f420, + // Block 0xace, offset 0x2b380 + 0x2b380: 0x6c98f620, 0x2b381: 0x6c98f820, 0x2b382: 0x6c98fa20, 0x2b383: 0x6c98fc20, + 0x2b384: 0x6c98fe20, 0x2b385: 0x6c990020, 0x2b386: 0x6c990220, 0x2b387: 0x6cc4bc20, + 0x2b388: 0x6c990420, 0x2b389: 0x6cc4c820, 0x2b38a: 0x6cc4ca20, 0x2b38b: 0x6cc4cc20, + 0x2b38c: 0x6cf3a820, 0x2b38d: 0x6cf3aa20, 0x2b38e: 0x6cc4ce20, 0x2b38f: 0x6cc4d020, + 0x2b390: 0x6cc4d220, 0x2b391: 0x6cc4d420, 0x2b392: 0x6cc4d620, 0x2b393: 0x6cc4d820, + 0x2b394: 0x6cc4da20, 0x2b395: 0x6cc4dc20, 0x2b396: 0x6cc66c20, 0x2b397: 0x6cc4de20, + 0x2b398: 0x6cc4e020, 0x2b399: 0x6cf3b220, 0x2b39a: 0x6cf3b420, 0x2b39b: 0x6cf3b620, + 0x2b39c: 0x6cf3b820, 0x2b39d: 0x6cf3ba20, 0x2b39e: 0x6cf3bc20, 0x2b39f: 0x6cf3be20, + 0x2b3a0: 0x6cf3c020, 0x2b3a1: 0x6cf3c220, 0x2b3a2: 0x6cf3c420, 0x2b3a3: 0x6cf3c620, + 0x2b3a4: 0x6cf3c820, 0x2b3a5: 0x6cf3ca20, 0x2b3a6: 0x6cf3cc20, 0x2b3a7: 0x6cf3ce20, + 0x2b3a8: 0x6cf3d020, 0x2b3a9: 0x6cf3d220, 0x2b3aa: 0x6cf3d420, 0x2b3ab: 0x6cf3d620, + 0x2b3ac: 0x6cf3d820, 0x2b3ad: 0x6d237220, 0x2b3ae: 0x6d237420, 0x2b3af: 0x6d237620, + 0x2b3b0: 0x6d237820, 0x2b3b1: 0x6d237a20, 0x2b3b2: 0x6d237c20, 0x2b3b3: 0x6d237e20, + 0x2b3b4: 0x6d238020, 0x2b3b5: 0x6d238220, 0x2b3b6: 0x6d238420, 0x2b3b7: 0x6d238620, + 0x2b3b8: 0x6d238820, 0x2b3b9: 0x6d238a20, 0x2b3ba: 0x6d238c20, 0x2b3bb: 0x6d50fc20, + 0x2b3bc: 0x6d50fe20, 0x2b3bd: 0x6d238e20, 0x2b3be: 0x6d239020, 0x2b3bf: 0x6d239220, + // Block 0xacf, offset 0x2b3c0 + 0x2b3c0: 0x6d239420, 0x2b3c1: 0x6d239620, 0x2b3c2: 0x6d239820, 0x2b3c3: 0x6d511020, + 0x2b3c4: 0x6d511220, 0x2b3c5: 0x6d511420, 0x2b3c6: 0x6d511620, 0x2b3c7: 0x6d511820, + 0x2b3c8: 0x6d511a20, 0x2b3c9: 0x6d511c20, 0x2b3ca: 0x6d511e20, 0x2b3cb: 0x6d512020, + 0x2b3cc: 0x6d512220, 0x2b3cd: 0x6d512420, 0x2b3ce: 0x6d512620, 0x2b3cf: 0x6d512820, + 0x2b3d0: 0x6d512a20, 0x2b3d1: 0x6d512c20, 0x2b3d2: 0x6d7cb420, 0x2b3d3: 0x6da47a20, + 0x2b3d4: 0x6d7cb620, 0x2b3d5: 0x6d7cb820, 0x2b3d6: 0x6d7cba20, 0x2b3d7: 0x6d7cbc20, + 0x2b3d8: 0x6d7cbe20, 0x2b3d9: 0x6d7cc020, 0x2b3da: 0x6da48220, 0x2b3db: 0x6da48420, + 0x2b3dc: 0x6da48620, 0x2b3dd: 0x6da48820, 0x2b3de: 0x6da48a20, 0x2b3df: 0x6da48c20, + 0x2b3e0: 0x6dc60e20, 0x2b3e1: 0x6dc61020, 0x2b3e2: 0x6dc61220, 0x2b3e3: 0x6dc61420, + 0x2b3e4: 0x6dc61620, 0x2b3e5: 0x6dc61820, 0x2b3e6: 0x6dc61a20, 0x2b3e7: 0x6dc61c20, + 0x2b3e8: 0x6dc61e20, 0x2b3e9: 0x6dc62020, 0x2b3ea: 0x6dc62220, 0x2b3eb: 0x6dc62420, + 0x2b3ec: 0x6de2ea20, 0x2b3ed: 0x6de2ec20, 0x2b3ee: 0x6dfa5c20, 0x2b3ef: 0x6dfa5e20, + 0x2b3f0: 0x6dfa6020, 0x2b3f1: 0x6e0df020, 0x2b3f2: 0x6e0df220, 0x2b3f3: 0x6e0df420, + 0x2b3f4: 0x6e0df620, 0x2b3f5: 0x6e28f820, 0x2b3f6: 0x6e28fa20, 0x2b3f7: 0x6e28fc20, + 0x2b3f8: 0x6e389020, 0x2b3f9: 0x6e389220, 0x2b3fa: 0x6c352e20, 0x2b3fb: 0x6c722220, + 0x2b3fc: 0x6c722420, 0x2b3fd: 0x6c9a9420, 0x2b3fe: 0x6cc67020, 0x2b3ff: 0x6c211c20, + // Block 0xad0, offset 0x2b400 + 0x2b400: 0x6c211e20, 0x2b401: 0x6c354020, 0x2b402: 0x6c354220, 0x2b403: 0x6c503420, + 0x2b404: 0x6c503620, 0x2b405: 0x6c503820, 0x2b406: 0x6c503a20, 0x2b407: 0x6c723620, + 0x2b408: 0x6c723820, 0x2b409: 0x6c723a20, 0x2b40a: 0x6c9aa020, 0x2b40b: 0x6c9aa220, + 0x2b40c: 0x6c9aa420, 0x2b40d: 0x6c9aa620, 0x2b40e: 0x6c9aa820, 0x2b40f: 0x6cc68220, + 0x2b410: 0x6cc68420, 0x2b411: 0x6cc68620, 0x2b412: 0x6cc68820, 0x2b413: 0x6cc68a20, + 0x2b414: 0x6cc68c20, 0x2b415: 0x6cc68e20, 0x2b416: 0x6cc69020, 0x2b417: 0x6cc69220, + 0x2b418: 0x6cc69420, 0x2b419: 0x6cc69620, 0x2b41a: 0x6cc69820, 0x2b41b: 0x6cf52c20, + 0x2b41c: 0x6cf52e20, 0x2b41d: 0x6cf53020, 0x2b41e: 0x6cf53220, 0x2b41f: 0x6cf53420, + 0x2b420: 0x6d24f020, 0x2b421: 0x6d24f220, 0x2b422: 0x6d24f420, 0x2b423: 0x6d24f620, + 0x2b424: 0x6d527220, 0x2b425: 0x6d527420, 0x2b426: 0x6d527620, 0x2b427: 0x6d7dae20, + 0x2b428: 0x6d7db020, 0x2b429: 0x6d7db220, 0x2b42a: 0x6d7db420, 0x2b42b: 0x6dc6b620, + 0x2b42c: 0x6dc6b820, 0x2b42d: 0x6dfab220, 0x2b42e: 0x6e0e2c20, 0x2b42f: 0x6c213a20, + 0x2b430: 0x6c728c20, 0x2b431: 0x6cf58c20, 0x2b432: 0x6c124020, 0x2b433: 0x6c124220, + 0x2b434: 0x6c358220, 0x2b435: 0x6c507a20, 0x2b436: 0x6c729a20, 0x2b437: 0x6c9b2820, + 0x2b438: 0x6cc71420, 0x2b439: 0x6d52cc20, 0x2b43a: 0x6da54220, 0x2b43b: 0x6e292a20, + 0x2b43c: 0x6c508220, 0x2b43d: 0x6c508420, 0x2b43e: 0x6c72aa20, 0x2b43f: 0x6c72ac20, + // Block 0xad1, offset 0x2b440 + 0x2b440: 0x6cc72420, 0x2b441: 0x6d255620, 0x2b442: 0x6d52d620, 0x2b443: 0x6c124620, + 0x2b444: 0x6c359e20, 0x2b445: 0x6c72b420, 0x2b446: 0x6c508e20, 0x2b447: 0x6c72b620, + 0x2b448: 0x6c72b820, 0x2b449: 0x6c72ba20, 0x2b44a: 0x6c9b4220, 0x2b44b: 0x6c9b4420, + 0x2b44c: 0x6c9b4620, 0x2b44d: 0x6cc74420, 0x2b44e: 0x6d52e420, 0x2b44f: 0x6d52e620, + 0x2b450: 0x6c124c20, 0x2b451: 0x6c124e20, 0x2b452: 0x6c215020, 0x2b453: 0x6c215220, + 0x2b454: 0x6c215420, 0x2b455: 0x6c215620, 0x2b456: 0x6c215820, 0x2b457: 0x6c215a20, + 0x2b458: 0x6c35b020, 0x2b459: 0x6c35b220, 0x2b45a: 0x6c35b420, 0x2b45b: 0x6c50b020, + 0x2b45c: 0x6c50b220, 0x2b45d: 0x6c50b420, 0x2b45e: 0x6c50b620, 0x2b45f: 0x6c50b820, + 0x2b460: 0x6c50ba20, 0x2b461: 0x6c50bc20, 0x2b462: 0x6c50be20, 0x2b463: 0x6c50c020, + 0x2b464: 0x6c50c220, 0x2b465: 0x6c72f020, 0x2b466: 0x6c72f220, 0x2b467: 0x6c72f420, + 0x2b468: 0x6c72f620, 0x2b469: 0x6c72f820, 0x2b46a: 0x6c72fa20, 0x2b46b: 0x6c72fc20, + 0x2b46c: 0x6c72fe20, 0x2b46d: 0x6c730020, 0x2b46e: 0x6c730220, 0x2b46f: 0x6c9b7020, + 0x2b470: 0x6c9b7220, 0x2b471: 0x6c9b7420, 0x2b472: 0x6c9b7620, 0x2b473: 0x6c9b7820, + 0x2b474: 0x6c9b7a20, 0x2b475: 0x6cc76e20, 0x2b476: 0x6cc77020, 0x2b477: 0x6cc77220, + 0x2b478: 0x6cc77420, 0x2b479: 0x6cc77620, 0x2b47a: 0x6cc77820, 0x2b47b: 0x6cc77a20, + 0x2b47c: 0x6cc77c20, 0x2b47d: 0x6cc77e20, 0x2b47e: 0x6cc78020, 0x2b47f: 0x6cc78220, + // Block 0xad2, offset 0x2b480 + 0x2b480: 0x6cc78420, 0x2b481: 0x6cf5d820, 0x2b482: 0x6cf5da20, 0x2b483: 0x6cf5dc20, + 0x2b484: 0x6cf5de20, 0x2b485: 0x6cf5e020, 0x2b486: 0x6cf5e220, 0x2b487: 0x6cf5e420, + 0x2b488: 0x6cf5e620, 0x2b489: 0x6cf5e820, 0x2b48a: 0x6cf5ea20, 0x2b48b: 0x6cf5ec20, + 0x2b48c: 0x6cf5ee20, 0x2b48d: 0x6d257620, 0x2b48e: 0x6d257820, 0x2b48f: 0x6d257a20, + 0x2b490: 0x6d257c20, 0x2b491: 0x6d52f420, 0x2b492: 0x6d52f620, 0x2b493: 0x6d52f820, + 0x2b494: 0x6d52fa20, 0x2b495: 0x6d52fc20, 0x2b496: 0x6d52fe20, 0x2b497: 0x6d7e3220, + 0x2b498: 0x6d7e3420, 0x2b499: 0x6d7e3620, 0x2b49a: 0x6d7e3820, 0x2b49b: 0x6d7e3a20, + 0x2b49c: 0x6d7e3c20, 0x2b49d: 0x6d7e3e20, 0x2b49e: 0x6d7e4020, 0x2b49f: 0x6d7e4220, + 0x2b4a0: 0x6da55e20, 0x2b4a1: 0x6da56020, 0x2b4a2: 0x6da56220, 0x2b4a3: 0x6dc6fa20, + 0x2b4a4: 0x6dc6fc20, 0x2b4a5: 0x6dc6fe20, 0x2b4a6: 0x6dc70020, 0x2b4a7: 0x6dc70220, + 0x2b4a8: 0x6dc70420, 0x2b4a9: 0x6de38420, 0x2b4aa: 0x6de38620, 0x2b4ab: 0x6dfade20, + 0x2b4ac: 0x6e1d9a20, 0x2b4ad: 0x6e1d9c20, 0x2b4ae: 0x6e292e20, 0x2b4af: 0x6e38a620, + 0x2b4b0: 0x6c126e20, 0x2b4b1: 0x6d7ed420, 0x2b4b2: 0x6da5aa20, 0x2b4b3: 0x6c364a20, + 0x2b4b4: 0x6c73aa20, 0x2b4b5: 0x6c73ac20, 0x2b4b6: 0x6c9c1620, 0x2b4b7: 0x6c9c1820, + 0x2b4b8: 0x6cc85820, 0x2b4b9: 0x6cd95a20, 0x2b4ba: 0x6d260220, 0x2b4bb: 0x6d260420, + 0x2b4bc: 0x6d538020, 0x2b4bd: 0x6d538220, 0x2b4be: 0x6d538420, 0x2b4bf: 0x6d7ee420, + // Block 0xad3, offset 0x2b4c0 + 0x2b4c0: 0x6da5b020, 0x2b4c1: 0x6c127a20, 0x2b4c2: 0x6c21b020, 0x2b4c3: 0x6c21b220, + 0x2b4c4: 0x6c21b420, 0x2b4c5: 0x6c21b620, 0x2b4c6: 0x6c21b820, 0x2b4c7: 0x6c365820, + 0x2b4c8: 0x6c365a20, 0x2b4c9: 0x6c365c20, 0x2b4ca: 0x6c365e20, 0x2b4cb: 0x6c366020, + 0x2b4cc: 0x6c366220, 0x2b4cd: 0x6c366420, 0x2b4ce: 0x6c366620, 0x2b4cf: 0x6c366820, + 0x2b4d0: 0x6c366a20, 0x2b4d1: 0x6c518620, 0x2b4d2: 0x6c518820, 0x2b4d3: 0x6c518a20, + 0x2b4d4: 0x6c518c20, 0x2b4d5: 0x6c518e20, 0x2b4d6: 0x6c519020, 0x2b4d7: 0x6c519220, + 0x2b4d8: 0x6c73c620, 0x2b4d9: 0x6c73c820, 0x2b4da: 0x6c73ca20, 0x2b4db: 0x6c73cc20, + 0x2b4dc: 0x6c73ce20, 0x2b4dd: 0x6c73d020, 0x2b4de: 0x6c73d220, 0x2b4df: 0x6c73d420, + 0x2b4e0: 0x6c73d620, 0x2b4e1: 0x6c73d820, 0x2b4e2: 0x6c73da20, 0x2b4e3: 0x6c73dc20, + 0x2b4e4: 0x6c73de20, 0x2b4e5: 0x6c73e020, 0x2b4e6: 0x6c73e220, 0x2b4e7: 0x6c73e420, + 0x2b4e8: 0x6c9c3620, 0x2b4e9: 0x6c9c3820, 0x2b4ea: 0x6c9c3a20, 0x2b4eb: 0x6c9c3c20, + 0x2b4ec: 0x6c9c3e20, 0x2b4ed: 0x6c9c4020, 0x2b4ee: 0x6c9c4220, 0x2b4ef: 0x6c9c4420, + 0x2b4f0: 0x6c9c4620, 0x2b4f1: 0x6c9c4820, 0x2b4f2: 0x6c9c4a20, 0x2b4f3: 0x6c9c4c20, + 0x2b4f4: 0x6c9c4e20, 0x2b4f5: 0x6c9c5020, 0x2b4f6: 0x6cc88620, 0x2b4f7: 0x6c9c5220, + 0x2b4f8: 0x6cc88820, 0x2b4f9: 0x6cc88a20, 0x2b4fa: 0x6cc88c20, 0x2b4fb: 0x6cc88e20, + 0x2b4fc: 0x6cc89020, 0x2b4fd: 0x6cc89220, 0x2b4fe: 0x6cc89420, 0x2b4ff: 0x6cc89620, + // Block 0xad4, offset 0x2b500 + 0x2b500: 0x6cc89820, 0x2b501: 0x6cc89a20, 0x2b502: 0x6cc89c20, 0x2b503: 0x6cc89e20, + 0x2b504: 0x6cc8a020, 0x2b505: 0x6cc8a220, 0x2b506: 0x6cc8a420, 0x2b507: 0x6cc8a620, + 0x2b508: 0x6cc8a820, 0x2b509: 0x6cc8aa20, 0x2b50a: 0x6cc8ac20, 0x2b50b: 0x6cf6b220, + 0x2b50c: 0x6cf6b420, 0x2b50d: 0x6cf6b620, 0x2b50e: 0x6cf6b820, 0x2b50f: 0x6cf6ba20, + 0x2b510: 0x6cf6bc20, 0x2b511: 0x6cf6be20, 0x2b512: 0x6cf6c020, 0x2b513: 0x6cf6c220, + 0x2b514: 0x6cf6c420, 0x2b515: 0x6cf6c620, 0x2b516: 0x6cf6c820, 0x2b517: 0x6cf6ca20, + 0x2b518: 0x6cf6cc20, 0x2b519: 0x6cf6ce20, 0x2b51a: 0x6cf6d020, 0x2b51b: 0x6cf6d220, + 0x2b51c: 0x6cf6d420, 0x2b51d: 0x6cf6d620, 0x2b51e: 0x6cf6d820, 0x2b51f: 0x6cf6da20, + 0x2b520: 0x6cf6dc20, 0x2b521: 0x6cfbd820, 0x2b522: 0x6cf6de20, 0x2b523: 0x6cf6e020, + 0x2b524: 0x6d261a20, 0x2b525: 0x6d261c20, 0x2b526: 0x6d261e20, 0x2b527: 0x6d262020, + 0x2b528: 0x6d262220, 0x2b529: 0x6d262420, 0x2b52a: 0x6d262620, 0x2b52b: 0x6d262820, + 0x2b52c: 0x6d262a20, 0x2b52d: 0x6d262c20, 0x2b52e: 0x6d262e20, 0x2b52f: 0x6d263020, + 0x2b530: 0x6d263220, 0x2b531: 0x6d263420, 0x2b532: 0x6d263620, 0x2b533: 0x6d263820, + 0x2b534: 0x6d263a20, 0x2b535: 0x6d263c20, 0x2b536: 0x6d263e20, 0x2b537: 0x6d264020, + 0x2b538: 0x6d264220, 0x2b539: 0x6d264420, 0x2b53a: 0x6d264620, 0x2b53b: 0x6d264820, + 0x2b53c: 0x6d264a20, 0x2b53d: 0x6d264c20, 0x2b53e: 0x6d539e20, 0x2b53f: 0x6d53a020, + // Block 0xad5, offset 0x2b540 + 0x2b540: 0x6d53a220, 0x2b541: 0x6d53a420, 0x2b542: 0x6d53a620, 0x2b543: 0x6d53a820, + 0x2b544: 0x6d53aa20, 0x2b545: 0x6d53ac20, 0x2b546: 0x6d53ae20, 0x2b547: 0x6d53b020, + 0x2b548: 0x6d53b220, 0x2b549: 0x6d53b420, 0x2b54a: 0x6d53b620, 0x2b54b: 0x6d53b820, + 0x2b54c: 0x6d53ba20, 0x2b54d: 0x6d53bc20, 0x2b54e: 0x6d53be20, 0x2b54f: 0x6d53c020, + 0x2b550: 0x6d7f0220, 0x2b551: 0x6d53c220, 0x2b552: 0x6d53c420, 0x2b553: 0x6d7f0420, + 0x2b554: 0x6d7f0620, 0x2b555: 0x6d7f0820, 0x2b556: 0x6d7f0a20, 0x2b557: 0x6d7f0c20, + 0x2b558: 0x6d7f0e20, 0x2b559: 0x6d7f1020, 0x2b55a: 0x6d7f1220, 0x2b55b: 0x6d7f1420, + 0x2b55c: 0x6d7f1620, 0x2b55d: 0x6d7f1820, 0x2b55e: 0x6d7f1a20, 0x2b55f: 0x6d7f1c20, + 0x2b560: 0x6d53c620, 0x2b561: 0x6d7f1e20, 0x2b562: 0x6d7f2020, 0x2b563: 0x6d7f2220, + 0x2b564: 0x6d7f2420, 0x2b565: 0x6d7f2620, 0x2b566: 0x6d7f2820, 0x2b567: 0x6d7f2a20, + 0x2b568: 0x6d7f2c20, 0x2b569: 0x6d7f2e20, 0x2b56a: 0x6da5c220, 0x2b56b: 0x6da5c420, + 0x2b56c: 0x6da5c620, 0x2b56d: 0x6da5c820, 0x2b56e: 0x6da5ca20, 0x2b56f: 0x6da5cc20, + 0x2b570: 0x6da5ce20, 0x2b571: 0x6da5d020, 0x2b572: 0x6da5d220, 0x2b573: 0x6da5d420, + 0x2b574: 0x6da5d620, 0x2b575: 0x6da5d820, 0x2b576: 0x6da5da20, 0x2b577: 0x6dc75420, + 0x2b578: 0x6dc75620, 0x2b579: 0x6dc75820, 0x2b57a: 0x6dc75a20, 0x2b57b: 0x6dc75c20, + 0x2b57c: 0x6dc75e20, 0x2b57d: 0x6dc76020, 0x2b57e: 0x6de3b420, 0x2b57f: 0x6de3b620, + // Block 0xad6, offset 0x2b580 + 0x2b580: 0x6de3b820, 0x2b581: 0x6de3ba20, 0x2b582: 0x6de3bc20, 0x2b583: 0x6de3be20, + 0x2b584: 0x6de3c020, 0x2b585: 0x6de3c220, 0x2b586: 0x6de3c420, 0x2b587: 0x6de3c620, + 0x2b588: 0x6de3c820, 0x2b589: 0x6dfb0820, 0x2b58a: 0x6dfb0a20, 0x2b58b: 0x6dfb0c20, + 0x2b58c: 0x6dfb0e20, 0x2b58d: 0x6dfb1020, 0x2b58e: 0x6dfb1220, 0x2b58f: 0x6dfb1420, + 0x2b590: 0x6dfb1620, 0x2b591: 0x6dfb1820, 0x2b592: 0x6dfb1a20, 0x2b593: 0x6dfb1c20, + 0x2b594: 0x6e0e5e20, 0x2b595: 0x6e0e6020, 0x2b596: 0x6dfb1e20, 0x2b597: 0x6e1db220, + 0x2b598: 0x6e1db420, 0x2b599: 0x6e293a20, 0x2b59a: 0x6e293c20, 0x2b59b: 0x6e293e20, + 0x2b59c: 0x6e294020, 0x2b59d: 0x6c223820, 0x2b59e: 0x6c223a20, 0x2b59f: 0x6c376620, + 0x2b5a0: 0x6c376820, 0x2b5a1: 0x6c376a20, 0x2b5a2: 0x6c376c20, 0x2b5a3: 0x6c52c220, + 0x2b5a4: 0x6c52c420, 0x2b5a5: 0x6c52c620, 0x2b5a6: 0x6c52c820, 0x2b5a7: 0x6c52ca20, + 0x2b5a8: 0x6c52cc20, 0x2b5a9: 0x6c754820, 0x2b5aa: 0x6c754a20, 0x2b5ab: 0x6c754c20, + 0x2b5ac: 0x6c754e20, 0x2b5ad: 0x6c755020, 0x2b5ae: 0x6c9da620, 0x2b5af: 0x6c9da820, + 0x2b5b0: 0x6c9daa20, 0x2b5b1: 0x6c9dac20, 0x2b5b2: 0x6cca8c20, 0x2b5b3: 0x6cca8e20, + 0x2b5b4: 0x6cca9020, 0x2b5b5: 0x6cca9220, 0x2b5b6: 0x6cca9420, 0x2b5b7: 0x6c75a620, + 0x2b5b8: 0x6cca9620, 0x2b5b9: 0x6cf8bc20, 0x2b5ba: 0x6cf8be20, 0x2b5bb: 0x6cf8c020, + 0x2b5bc: 0x6cf8c220, 0x2b5bd: 0x6cf8c420, 0x2b5be: 0x6cf8c620, 0x2b5bf: 0x6d280220, + // Block 0xad7, offset 0x2b5c0 + 0x2b5c0: 0x6d280420, 0x2b5c1: 0x6d280620, 0x2b5c2: 0x6d555220, 0x2b5c3: 0x6d555420, + 0x2b5c4: 0x6d80d020, 0x2b5c5: 0x6d80d220, 0x2b5c6: 0x6da6f420, 0x2b5c7: 0x6da6f620, + 0x2b5c8: 0x6da6f820, 0x2b5c9: 0x6da6fa20, 0x2b5ca: 0x6de47a20, 0x2b5cb: 0x6dfb9a20, + 0x2b5cc: 0x6e1e0c20, 0x2b5cd: 0x6e297620, 0x2b5ce: 0x6e38d620, 0x2b5cf: 0x6c12ba20, + 0x2b5d0: 0x6c224e20, 0x2b5d1: 0x6c225020, 0x2b5d2: 0x6c52f820, 0x2b5d3: 0x6c52fa20, + 0x2b5d4: 0x6c52fc20, 0x2b5d5: 0x6ccad220, 0x2b5d6: 0x6ccad420, 0x2b5d7: 0x6d284220, + 0x2b5d8: 0x6dc85c20, 0x2b5d9: 0x6c12c220, 0x2b5da: 0x6c37ca20, 0x2b5db: 0x6c37cc20, + 0x2b5dc: 0x6c37ce20, 0x2b5dd: 0x6c37d020, 0x2b5de: 0x6c530820, 0x2b5df: 0x6c530a20, + 0x2b5e0: 0x6c530c20, 0x2b5e1: 0x6c75a820, 0x2b5e2: 0x6c9de820, 0x2b5e3: 0x6c9dea20, + 0x2b5e4: 0x6ccaf820, 0x2b5e5: 0x6ccafa20, 0x2b5e6: 0x6ccafc20, 0x2b5e7: 0x6ccafe20, + 0x2b5e8: 0x6ccb0020, 0x2b5e9: 0x6ccb0220, 0x2b5ea: 0x6cf92220, 0x2b5eb: 0x6cf92420, + 0x2b5ec: 0x6cf92620, 0x2b5ed: 0x6cf92820, 0x2b5ee: 0x6cf92a20, 0x2b5ef: 0x6d285020, + 0x2b5f0: 0x6d285220, 0x2b5f1: 0x6d285420, 0x2b5f2: 0x6d285620, 0x2b5f3: 0x6d559a20, + 0x2b5f4: 0x6d559c20, 0x2b5f5: 0x6d810220, 0x2b5f6: 0x6d810420, 0x2b5f7: 0x6d810620, + 0x2b5f8: 0x6da71e20, 0x2b5f9: 0x6dfba420, 0x2b5fa: 0x6dfba620, 0x2b5fb: 0x6e297e20, + 0x2b5fc: 0x6c227420, 0x2b5fd: 0x6c380420, 0x2b5fe: 0x6c75dc20, 0x2b5ff: 0x6c75de20, + // Block 0xad8, offset 0x2b600 + 0x2b600: 0x6c9e2020, 0x2b601: 0x6ccb4a20, 0x2b602: 0x6ccb4c20, 0x2b603: 0x6ccb4e20, + 0x2b604: 0x6cf95620, 0x2b605: 0x6d287620, 0x2b606: 0x6d812820, 0x2b607: 0x6d812a20, + 0x2b608: 0x6d812c20, 0x2b609: 0x6da73620, 0x2b60a: 0x6dc87e20, 0x2b60b: 0x6c535620, + 0x2b60c: 0x6c12da20, 0x2b60d: 0x6c382020, 0x2b60e: 0x6c382220, 0x2b60f: 0x6c382420, + 0x2b610: 0x6c382620, 0x2b611: 0x6c382820, 0x2b612: 0x6c535e20, 0x2b613: 0x6c75f620, + 0x2b614: 0x6c9e5420, 0x2b615: 0x6c9e5620, 0x2b616: 0x6c9e5820, 0x2b617: 0x6c9e5a20, + 0x2b618: 0x6c9e5c20, 0x2b619: 0x6c9e5e20, 0x2b61a: 0x6c9e6020, 0x2b61b: 0x6ccb6a20, + 0x2b61c: 0x6ccb6c20, 0x2b61d: 0x6ccb6e20, 0x2b61e: 0x6ccb7020, 0x2b61f: 0x6cf98220, + 0x2b620: 0x6cf98420, 0x2b621: 0x6cf98620, 0x2b622: 0x6cf98820, 0x2b623: 0x6cf98a20, + 0x2b624: 0x6d289e20, 0x2b625: 0x6d28a020, 0x2b626: 0x6d28a220, 0x2b627: 0x6d28a420, + 0x2b628: 0x6d28a620, 0x2b629: 0x6d28a820, 0x2b62a: 0x6d815c20, 0x2b62b: 0x6d815e20, + 0x2b62c: 0x6d816020, 0x2b62d: 0x6d816220, 0x2b62e: 0x6d816420, 0x2b62f: 0x6dc89220, + 0x2b630: 0x6dc89420, 0x2b631: 0x6de4a220, 0x2b632: 0x6e3d4820, 0x2b633: 0x6c763820, + 0x2b634: 0x6c385620, 0x2b635: 0x6c9ea020, 0x2b636: 0x6d561220, 0x2b637: 0x6d819620, + 0x2b638: 0x6c04c820, 0x2b639: 0x6c099620, 0x2b63a: 0x6c099820, 0x2b63b: 0x6c12f420, + 0x2b63c: 0x6c099a20, 0x2b63d: 0x6c12fa20, 0x2b63e: 0x6c22a020, 0x2b63f: 0x6c12fc20, + // Block 0xad9, offset 0x2b640 + 0x2b640: 0x6c22a620, 0x2b641: 0x6c22a820, 0x2b642: 0x6c22aa20, 0x2b643: 0x6c22ac20, + 0x2b644: 0x6c22ae20, 0x2b645: 0x6c22b020, 0x2b646: 0x6c22b220, 0x2b647: 0x6c22b420, + 0x2b648: 0x6c22b620, 0x2b649: 0x6c22b820, 0x2b64a: 0x6c22ba20, 0x2b64b: 0x6c387020, + 0x2b64c: 0x6c387220, 0x2b64d: 0x6c387420, 0x2b64e: 0x6c387620, 0x2b64f: 0x6c387820, + 0x2b650: 0x6c387a20, 0x2b651: 0x6c387c20, 0x2b652: 0x6c387e20, 0x2b653: 0x6c388020, + 0x2b654: 0x6c388220, 0x2b655: 0x6c388420, 0x2b656: 0x6c53d820, 0x2b657: 0x6c53da20, + 0x2b658: 0x6c53dc20, 0x2b659: 0x6c53de20, 0x2b65a: 0x6c53e020, 0x2b65b: 0x6c53e220, + 0x2b65c: 0x6c53e420, 0x2b65d: 0x6c53e620, 0x2b65e: 0x6c53e820, 0x2b65f: 0x6c9eaa20, + 0x2b660: 0x6c53ea20, 0x2b661: 0x6c53ec20, 0x2b662: 0x6c53ee20, 0x2b663: 0x6c53f020, + 0x2b664: 0x6c765220, 0x2b665: 0x6c765420, 0x2b666: 0x6c765620, 0x2b667: 0x6c765820, + 0x2b668: 0x6c765a20, 0x2b669: 0x6c765c20, 0x2b66a: 0x6c765e20, 0x2b66b: 0x6c9eac20, + 0x2b66c: 0x6c766020, 0x2b66d: 0x6c766220, 0x2b66e: 0x6c766420, 0x2b66f: 0x6c766620, + 0x2b670: 0x6c766820, 0x2b671: 0x6c766a20, 0x2b672: 0x6c766c20, 0x2b673: 0x6c766e20, + 0x2b674: 0x6c9eb020, 0x2b675: 0x6c9eb220, 0x2b676: 0x6c9eb420, 0x2b677: 0x6c9eb620, + 0x2b678: 0x6c9eb820, 0x2b679: 0x6c9eba20, 0x2b67a: 0x6c9ebc20, 0x2b67b: 0x6c9ebe20, + 0x2b67c: 0x6ccbd620, 0x2b67d: 0x6c9ec020, 0x2b67e: 0x6c9ec220, 0x2b67f: 0x6c9ec420, + // Block 0xada, offset 0x2b680 + 0x2b680: 0x6c9ec620, 0x2b681: 0x6c9ec820, 0x2b682: 0x6c9eca20, 0x2b683: 0x6c9ecc20, + 0x2b684: 0x6c9ece20, 0x2b685: 0x6ccbd820, 0x2b686: 0x6c9ed020, 0x2b687: 0x6ccbda20, + 0x2b688: 0x6c9ed220, 0x2b689: 0x6c9ed420, 0x2b68a: 0x6c9ed620, 0x2b68b: 0x6c9ed820, + 0x2b68c: 0x6c9eda20, 0x2b68d: 0x6c9edc20, 0x2b68e: 0x6c9ede20, 0x2b68f: 0x6ccbe020, + 0x2b690: 0x6ccbe220, 0x2b691: 0x6ccbe420, 0x2b692: 0x6ccbe620, 0x2b693: 0x6ccbe820, + 0x2b694: 0x6ccbea20, 0x2b695: 0x6ccbec20, 0x2b696: 0x6ccbee20, 0x2b697: 0x6ccbf020, + 0x2b698: 0x6ccbf220, 0x2b699: 0x6ccbf420, 0x2b69a: 0x6ccbf620, 0x2b69b: 0x6ccbf820, + 0x2b69c: 0x6ccbfa20, 0x2b69d: 0x6ccbfc20, 0x2b69e: 0x6ccbfe20, 0x2b69f: 0x6ccc0020, + 0x2b6a0: 0x6ccc0220, 0x2b6a1: 0x6ccc0420, 0x2b6a2: 0x6ccc0620, 0x2b6a3: 0x6ccc0820, + 0x2b6a4: 0x6ccc0a20, 0x2b6a5: 0x6cf9e420, 0x2b6a6: 0x6cf9e620, 0x2b6a7: 0x6cf9e820, + 0x2b6a8: 0x6cf9ea20, 0x2b6a9: 0x6cf9ec20, 0x2b6aa: 0x6cf9ee20, 0x2b6ab: 0x6cf9f020, + 0x2b6ac: 0x6cf9f220, 0x2b6ad: 0x6cf9f420, 0x2b6ae: 0x6cf9f620, 0x2b6af: 0x6cf9f820, + 0x2b6b0: 0x6cf9fa20, 0x2b6b1: 0x6cf9fc20, 0x2b6b2: 0x6cf9fe20, 0x2b6b3: 0x6cfa0020, + 0x2b6b4: 0x6cfa0220, 0x2b6b5: 0x6cfa0420, 0x2b6b6: 0x6cfa0620, 0x2b6b7: 0x6cfa0820, + 0x2b6b8: 0x6cfa0a20, 0x2b6b9: 0x6cfa0c20, 0x2b6ba: 0x6cfa0e20, 0x2b6bb: 0x6cfa1020, + 0x2b6bc: 0x6d28f620, 0x2b6bd: 0x6d28f820, 0x2b6be: 0x6d28fa20, 0x2b6bf: 0x6d28fc20, + // Block 0xadb, offset 0x2b6c0 + 0x2b6c0: 0x6d28fe20, 0x2b6c1: 0x6d290020, 0x2b6c2: 0x6d290220, 0x2b6c3: 0x6d290420, + 0x2b6c4: 0x6d290620, 0x2b6c5: 0x6d290820, 0x2b6c6: 0x6d290a20, 0x2b6c7: 0x6d290c20, + 0x2b6c8: 0x6d290e20, 0x2b6c9: 0x6d291020, 0x2b6ca: 0x6d562420, 0x2b6cb: 0x6d562620, + 0x2b6cc: 0x6d562820, 0x2b6cd: 0x6d562a20, 0x2b6ce: 0x6d562c20, 0x2b6cf: 0x6d562e20, + 0x2b6d0: 0x6d563020, 0x2b6d1: 0x6d563220, 0x2b6d2: 0x6d563420, 0x2b6d3: 0x6d563620, + 0x2b6d4: 0x6d563820, 0x2b6d5: 0x6d563a20, 0x2b6d6: 0x6d563c20, 0x2b6d7: 0x6d563e20, + 0x2b6d8: 0x6d819820, 0x2b6d9: 0x6d564020, 0x2b6da: 0x6d564220, 0x2b6db: 0x6d564420, + 0x2b6dc: 0x6d564620, 0x2b6dd: 0x6d819e20, 0x2b6de: 0x6d81a020, 0x2b6df: 0x6d81a220, + 0x2b6e0: 0x6d81a420, 0x2b6e1: 0x6d81a620, 0x2b6e2: 0x6d81a820, 0x2b6e3: 0x6d81aa20, + 0x2b6e4: 0x6d81ac20, 0x2b6e5: 0x6d81ae20, 0x2b6e6: 0x6d81b020, 0x2b6e7: 0x6d81b220, + 0x2b6e8: 0x6da77620, 0x2b6e9: 0x6d81b420, 0x2b6ea: 0x6d81b620, 0x2b6eb: 0x6d81b820, + 0x2b6ec: 0x6d81ba20, 0x2b6ed: 0x6d81bc20, 0x2b6ee: 0x6d81be20, 0x2b6ef: 0x6da77c20, + 0x2b6f0: 0x6da77e20, 0x2b6f1: 0x6da78020, 0x2b6f2: 0x6da78220, 0x2b6f3: 0x6da78420, + 0x2b6f4: 0x6da78620, 0x2b6f5: 0x6da78820, 0x2b6f6: 0x6da78a20, 0x2b6f7: 0x6da78c20, + 0x2b6f8: 0x6da78e20, 0x2b6f9: 0x6da79020, 0x2b6fa: 0x6da79220, 0x2b6fb: 0x6da79420, + 0x2b6fc: 0x6da79620, 0x2b6fd: 0x6dc8c420, 0x2b6fe: 0x6dc8c620, 0x2b6ff: 0x6dc8c820, + // Block 0xadc, offset 0x2b700 + 0x2b700: 0x6dc8ca20, 0x2b701: 0x6dc8cc20, 0x2b702: 0x6dc8ce20, 0x2b703: 0x6dc8d020, + 0x2b704: 0x6de4b220, 0x2b705: 0x6de4b420, 0x2b706: 0x6de4b620, 0x2b707: 0x6de4b820, + 0x2b708: 0x6de4ba20, 0x2b709: 0x6de4bc20, 0x2b70a: 0x6de4be20, 0x2b70b: 0x6de4c020, + 0x2b70c: 0x6dfbc420, 0x2b70d: 0x6dfbc620, 0x2b70e: 0x6dfbc820, 0x2b70f: 0x6dfbca20, + 0x2b710: 0x6dfbcc20, 0x2b711: 0x6dfbce20, 0x2b712: 0x6e0efa20, 0x2b713: 0x6e0efc20, + 0x2b714: 0x6e0efe20, 0x2b715: 0x6e0f0020, 0x2b716: 0x6e0f0220, 0x2b717: 0x6e1e2e20, + 0x2b718: 0x6e0f0420, 0x2b719: 0x6e1e3020, 0x2b71a: 0x6e1e3220, 0x2b71b: 0x6e299820, + 0x2b71c: 0x6e299a20, 0x2b71d: 0x6e299c20, 0x2b71e: 0x6e329e20, 0x2b71f: 0x6e32a020, + 0x2b720: 0x6e3d5020, 0x2b721: 0x6c135620, 0x2b722: 0x6c135820, 0x2b723: 0x6c238a20, + 0x2b724: 0x6c238c20, 0x2b725: 0x6c238e20, 0x2b726: 0x6c399420, 0x2b727: 0x6c399620, + 0x2b728: 0x6c399820, 0x2b729: 0x6c399a20, 0x2b72a: 0x6c399c20, 0x2b72b: 0x6c551820, + 0x2b72c: 0x6c551a20, 0x2b72d: 0x6c551c20, 0x2b72e: 0x6c551e20, 0x2b72f: 0x6c552020, + 0x2b730: 0x6c552220, 0x2b731: 0x6c552420, 0x2b732: 0x6c552620, 0x2b733: 0x6c77ea20, + 0x2b734: 0x6c77ec20, 0x2b735: 0x6c77ee20, 0x2b736: 0x6c77f020, 0x2b737: 0x6c77f220, + 0x2b738: 0x6c77f420, 0x2b739: 0x6ca0de20, 0x2b73a: 0x6ca0e020, 0x2b73b: 0x6ca0e220, + 0x2b73c: 0x6ca0e420, 0x2b73d: 0x6ca0e620, 0x2b73e: 0x6ca0e820, 0x2b73f: 0x6ca0ea20, + // Block 0xadd, offset 0x2b740 + 0x2b740: 0x6ca0ec20, 0x2b741: 0x6ca0ee20, 0x2b742: 0x6ccdde20, 0x2b743: 0x6ccde020, + 0x2b744: 0x6ccde220, 0x2b745: 0x6ccde420, 0x2b746: 0x6ccde620, 0x2b747: 0x6ccde820, + 0x2b748: 0x6ccdea20, 0x2b749: 0x6ccdec20, 0x2b74a: 0x6ccdee20, 0x2b74b: 0x6ccdf020, + 0x2b74c: 0x6ccdf220, 0x2b74d: 0x6ccdf420, 0x2b74e: 0x6cfbda20, 0x2b74f: 0x6cfbdc20, + 0x2b750: 0x6cfbde20, 0x2b751: 0x6cfbe020, 0x2b752: 0x6cfbe220, 0x2b753: 0x6cfbe420, + 0x2b754: 0x6cfbe620, 0x2b755: 0x6cfbe820, 0x2b756: 0x6cfbea20, 0x2b757: 0x6cfbec20, + 0x2b758: 0x6cfbee20, 0x2b759: 0x6cfbf020, 0x2b75a: 0x6cfbf220, 0x2b75b: 0x6cfbf420, + 0x2b75c: 0x6cfbf620, 0x2b75d: 0x6cfbf820, 0x2b75e: 0x6cfbfa20, 0x2b75f: 0x6d2ad220, + 0x2b760: 0x6d2ad420, 0x2b761: 0x6d2ad620, 0x2b762: 0x6d2ad820, 0x2b763: 0x6d2ada20, + 0x2b764: 0x6d2adc20, 0x2b765: 0x6d2ade20, 0x2b766: 0x6d2ae020, 0x2b767: 0x6d2ae220, + 0x2b768: 0x6d2ae420, 0x2b769: 0x6d2ae620, 0x2b76a: 0x6d2ae820, 0x2b76b: 0x6d580e20, + 0x2b76c: 0x6d581020, 0x2b76d: 0x6d581220, 0x2b76e: 0x6d581420, 0x2b76f: 0x6d581620, + 0x2b770: 0x6d581820, 0x2b771: 0x6d581a20, 0x2b772: 0x6d581c20, 0x2b773: 0x6d82fe20, + 0x2b774: 0x6d830020, 0x2b775: 0x6d830220, 0x2b776: 0x6d830420, 0x2b777: 0x6d830620, + 0x2b778: 0x6d830820, 0x2b779: 0x6d830a20, 0x2b77a: 0x6d830c20, 0x2b77b: 0x6d830e20, + 0x2b77c: 0x6d831020, 0x2b77d: 0x6d831220, 0x2b77e: 0x6da87020, 0x2b77f: 0x6da87220, + // Block 0xade, offset 0x2b780 + 0x2b780: 0x6da87420, 0x2b781: 0x6da87620, 0x2b782: 0x6da87820, 0x2b783: 0x6da87a20, + 0x2b784: 0x6dc9ba20, 0x2b785: 0x6dc9bc20, 0x2b786: 0x6de57220, 0x2b787: 0x6de57420, + 0x2b788: 0x6dfc4a20, 0x2b789: 0x6de57620, 0x2b78a: 0x6dfc4c20, 0x2b78b: 0x6dfc4e20, + 0x2b78c: 0x6dfc5020, 0x2b78d: 0x6e0f7c20, 0x2b78e: 0x6e1e6e20, 0x2b78f: 0x6e29d620, + 0x2b790: 0x6e29d820, 0x2b791: 0x6e3d6620, 0x2b792: 0x6c3a2420, 0x2b793: 0x6c3a2620, + 0x2b794: 0x6ca1ce20, 0x2b795: 0x6d2bda20, 0x2b796: 0x6c561420, 0x2b797: 0x6c78d420, + 0x2b798: 0x6ca1da20, 0x2b799: 0x6cfd3e20, 0x2b79a: 0x6c3a4020, 0x2b79b: 0x6c561e20, + 0x2b79c: 0x6ccf2820, 0x2b79d: 0x6c3a4e20, 0x2b79e: 0x6c3a5020, 0x2b79f: 0x6c78ee20, + 0x2b7a0: 0x6c78f020, 0x2b7a1: 0x6c78f220, 0x2b7a2: 0x6d2bfa20, 0x2b7a3: 0x6da93c20, + 0x2b7a4: 0x6dca4420, 0x2b7a5: 0x6e0fb620, 0x2b7a6: 0x6c04ea20, 0x2b7a7: 0x6c790220, + 0x2b7a8: 0x6c137e20, 0x2b7a9: 0x6c23e820, 0x2b7aa: 0x6c23ea20, 0x2b7ab: 0x6c3a6220, + 0x2b7ac: 0x6c3a6420, 0x2b7ad: 0x6c3a6620, 0x2b7ae: 0x6c3a6820, 0x2b7af: 0x6c3a6a20, + 0x2b7b0: 0x6c564220, 0x2b7b1: 0x6c564420, 0x2b7b2: 0x6c564620, 0x2b7b3: 0x6c564820, + 0x2b7b4: 0x6c564a20, 0x2b7b5: 0x6c790820, 0x2b7b6: 0x6c790a20, 0x2b7b7: 0x6c790c20, + 0x2b7b8: 0x6c790e20, 0x2b7b9: 0x6ca20e20, 0x2b7ba: 0x6ca21020, 0x2b7bb: 0x6ca21220, + 0x2b7bc: 0x6ca21420, 0x2b7bd: 0x6ca21620, 0x2b7be: 0x6ca21820, 0x2b7bf: 0x6ca21a20, + // Block 0xadf, offset 0x2b7c0 + 0x2b7c0: 0x6ca21c20, 0x2b7c1: 0x6ccf7220, 0x2b7c2: 0x6ccf7420, 0x2b7c3: 0x6ccf7620, + 0x2b7c4: 0x6d2c0e20, 0x2b7c5: 0x6cfd7020, 0x2b7c6: 0x6cfd7220, 0x2b7c7: 0x6cfd7420, + 0x2b7c8: 0x6cfd7620, 0x2b7c9: 0x6d2c1020, 0x2b7ca: 0x6d2c1220, 0x2b7cb: 0x6d2c1420, + 0x2b7cc: 0x6d594620, 0x2b7cd: 0x6d594820, 0x2b7ce: 0x6d594a20, 0x2b7cf: 0x6d594c20, + 0x2b7d0: 0x6d594e20, 0x2b7d1: 0x6d845220, 0x2b7d2: 0x6d845420, 0x2b7d3: 0x6d845620, + 0x2b7d4: 0x6da94820, 0x2b7d5: 0x6da94a20, 0x2b7d6: 0x6da94c20, 0x2b7d7: 0x6dca5020, + 0x2b7d8: 0x6dca5220, 0x2b7d9: 0x6de5e420, 0x2b7da: 0x6e0fba20, 0x2b7db: 0x6e1e9a20, + 0x2b7dc: 0x6c3ab420, 0x2b7dd: 0x6c240220, 0x2b7de: 0x6c240420, 0x2b7df: 0x6c240620, + 0x2b7e0: 0x6c240820, 0x2b7e1: 0x6c3ab820, 0x2b7e2: 0x6c3aba20, 0x2b7e3: 0x6c3abc20, + 0x2b7e4: 0x6c3abe20, 0x2b7e5: 0x6c3ac020, 0x2b7e6: 0x6c3ac220, 0x2b7e7: 0x6c3ac420, + 0x2b7e8: 0x6c3ac620, 0x2b7e9: 0x6c3ac820, 0x2b7ea: 0x6c3aca20, 0x2b7eb: 0x6c569820, + 0x2b7ec: 0x6c569a20, 0x2b7ed: 0x6c569c20, 0x2b7ee: 0x6c569e20, 0x2b7ef: 0x6c56a020, + 0x2b7f0: 0x6c56a220, 0x2b7f1: 0x6c793420, 0x2b7f2: 0x6c793620, 0x2b7f3: 0x6c793820, + 0x2b7f4: 0x6c793a20, 0x2b7f5: 0x6c793c20, 0x2b7f6: 0x6c793e20, 0x2b7f7: 0x6c794020, + 0x2b7f8: 0x6c794220, 0x2b7f9: 0x6ca25420, 0x2b7fa: 0x6ca25620, 0x2b7fb: 0x6ca25820, + 0x2b7fc: 0x6ca25a20, 0x2b7fd: 0x6ca25c20, 0x2b7fe: 0x6ca25e20, 0x2b7ff: 0x6ca26020, + // Block 0xae0, offset 0x2b800 + 0x2b800: 0x6ca26220, 0x2b801: 0x6ccfd820, 0x2b802: 0x6ccfda20, 0x2b803: 0x6ccfdc20, + 0x2b804: 0x6ccfde20, 0x2b805: 0x6ccfe020, 0x2b806: 0x6ccfe220, 0x2b807: 0x6cfdc420, + 0x2b808: 0x6cfdc620, 0x2b809: 0x6cfdc820, 0x2b80a: 0x6cfdca20, 0x2b80b: 0x6cfdcc20, + 0x2b80c: 0x6cfdce20, 0x2b80d: 0x6cfdd020, 0x2b80e: 0x6d2c6c20, 0x2b80f: 0x6d2c6e20, + 0x2b810: 0x6d2c7020, 0x2b811: 0x6d2c7220, 0x2b812: 0x6d2c7420, 0x2b813: 0x6d2c7620, + 0x2b814: 0x6d598820, 0x2b815: 0x6d598a20, 0x2b816: 0x6d598c20, 0x2b817: 0x6d598e20, + 0x2b818: 0x6d599020, 0x2b819: 0x6d599220, 0x2b81a: 0x6d848020, 0x2b81b: 0x6d848220, + 0x2b81c: 0x6d848420, 0x2b81d: 0x6da96420, 0x2b81e: 0x6da96620, 0x2b81f: 0x6da96820, + 0x2b820: 0x6dca5820, 0x2b821: 0x6de60220, 0x2b822: 0x6de60420, 0x2b823: 0x6dfce820, + 0x2b824: 0x6dfcea20, 0x2b825: 0x6dfcec20, 0x2b826: 0x6dfcee20, 0x2b827: 0x6e32d420, + 0x2b828: 0x6c13b620, 0x2b829: 0x6c13b820, 0x2b82a: 0x6c13ba20, 0x2b82b: 0x6c13bc20, + 0x2b82c: 0x6c246c20, 0x2b82d: 0x6c246e20, 0x2b82e: 0x6c247020, 0x2b82f: 0x6c247220, + 0x2b830: 0x6c3b3820, 0x2b831: 0x6c572a20, 0x2b832: 0x6c3b3a20, 0x2b833: 0x6c3b3c20, + 0x2b834: 0x6c3b3e20, 0x2b835: 0x6c3b4020, 0x2b836: 0x6c3b4220, 0x2b837: 0x6c572c20, + 0x2b838: 0x6c79bc20, 0x2b839: 0x6c572e20, 0x2b83a: 0x6c573020, 0x2b83b: 0x6c573220, + 0x2b83c: 0x6c573420, 0x2b83d: 0x6c573620, 0x2b83e: 0x6c573820, 0x2b83f: 0x6c79c220, + // Block 0xae1, offset 0x2b840 + 0x2b840: 0x6c79c420, 0x2b841: 0x6c79c620, 0x2b842: 0x6c79c820, 0x2b843: 0x6c79ca20, + 0x2b844: 0x6c79cc20, 0x2b845: 0x6c79ce20, 0x2b846: 0x6c79d020, 0x2b847: 0x6c79d220, + 0x2b848: 0x6c79d420, 0x2b849: 0x6ca2da20, 0x2b84a: 0x6ca2dc20, 0x2b84b: 0x6ca2de20, + 0x2b84c: 0x6ca2e020, 0x2b84d: 0x6ca2e220, 0x2b84e: 0x6ca2e420, 0x2b84f: 0x6ca2e620, + 0x2b850: 0x6ca2e820, 0x2b851: 0x6cd07620, 0x2b852: 0x6cd07820, 0x2b853: 0x6cd07a20, + 0x2b854: 0x6cd07c20, 0x2b855: 0x6cd07e20, 0x2b856: 0x6cd08020, 0x2b857: 0x6cfe4a20, + 0x2b858: 0x6cd08220, 0x2b859: 0x6cd08420, 0x2b85a: 0x6cd08620, 0x2b85b: 0x6cd08820, + 0x2b85c: 0x6cd08a20, 0x2b85d: 0x6cfe4e20, 0x2b85e: 0x6cfe5020, 0x2b85f: 0x6cfe5220, + 0x2b860: 0x6cfe5420, 0x2b861: 0x6cfe5620, 0x2b862: 0x6cfe5820, 0x2b863: 0x6cfe5a20, + 0x2b864: 0x6cfe5c20, 0x2b865: 0x6cfe5e20, 0x2b866: 0x6cfe6020, 0x2b867: 0x6d2ce220, + 0x2b868: 0x6d2ce420, 0x2b869: 0x6d2ce620, 0x2b86a: 0x6d2ce820, 0x2b86b: 0x6d5a0a20, + 0x2b86c: 0x6d5a0c20, 0x2b86d: 0x6d5a0e20, 0x2b86e: 0x6d5a1020, 0x2b86f: 0x6d5a1220, + 0x2b870: 0x6d5a1420, 0x2b871: 0x6d5a1620, 0x2b872: 0x6d5a1820, 0x2b873: 0x6d5a1a20, + 0x2b874: 0x6d5a1c20, 0x2b875: 0x6d84ce20, 0x2b876: 0x6d84d020, 0x2b877: 0x6d84d220, + 0x2b878: 0x6d84d420, 0x2b879: 0x6da99620, 0x2b87a: 0x6da99820, 0x2b87b: 0x6d84d620, + 0x2b87c: 0x6d84d820, 0x2b87d: 0x6da99e20, 0x2b87e: 0x6dca8420, 0x2b87f: 0x6da9a020, + // Block 0xae2, offset 0x2b880 + 0x2b880: 0x6da9a220, 0x2b881: 0x6da9a420, 0x2b882: 0x6dca8620, 0x2b883: 0x6de62020, + 0x2b884: 0x6de62220, 0x2b885: 0x6de62420, 0x2b886: 0x6de62620, 0x2b887: 0x6dfcfe20, + 0x2b888: 0x6e2a1a20, 0x2b889: 0x6c57c620, 0x2b88a: 0x6c57c820, 0x2b88b: 0x6c7a7420, + 0x2b88c: 0x6c7a7620, 0x2b88d: 0x6ca37c20, 0x2b88e: 0x6ca37e20, 0x2b88f: 0x6cd16020, + 0x2b890: 0x6d2d8620, 0x2b891: 0x6d2d8820, 0x2b892: 0x6d2d8a20, 0x2b893: 0x6d5ab220, + 0x2b894: 0x6d5ab420, 0x2b895: 0x6dcae220, 0x2b896: 0x6e3d7020, 0x2b897: 0x6c24a020, + 0x2b898: 0x6c3bb220, 0x2b899: 0x6c3bb420, 0x2b89a: 0x6c57d620, 0x2b89b: 0x6c57d820, + 0x2b89c: 0x6c7a8620, 0x2b89d: 0x6c7a8820, 0x2b89e: 0x6c7a8a20, 0x2b89f: 0x6c7a8c20, + 0x2b8a0: 0x6c7a8e20, 0x2b8a1: 0x6ca38c20, 0x2b8a2: 0x6ca38e20, 0x2b8a3: 0x6ca39020, + 0x2b8a4: 0x6ca39220, 0x2b8a5: 0x6ca39420, 0x2b8a6: 0x6ca39620, 0x2b8a7: 0x6cd17020, + 0x2b8a8: 0x6cd17220, 0x2b8a9: 0x6cd17420, 0x2b8aa: 0x6cd17620, 0x2b8ab: 0x6cff5220, + 0x2b8ac: 0x6cff5420, 0x2b8ad: 0x6cff5620, 0x2b8ae: 0x6cff5820, 0x2b8af: 0x6cff5a20, + 0x2b8b0: 0x6cff5c20, 0x2b8b1: 0x6cff5e20, 0x2b8b2: 0x6d2d9820, 0x2b8b3: 0x6d2d9a20, + 0x2b8b4: 0x6d2d9c20, 0x2b8b5: 0x6d2d9e20, 0x2b8b6: 0x6d2da020, 0x2b8b7: 0x6d2da220, + 0x2b8b8: 0x6d5ac620, 0x2b8b9: 0x6d5ac820, 0x2b8ba: 0x6d5aca20, 0x2b8bb: 0x6d857220, + 0x2b8bc: 0x6d857420, 0x2b8bd: 0x6d857620, 0x2b8be: 0x6d857820, 0x2b8bf: 0x6daa1220, + // Block 0xae3, offset 0x2b8c0 + 0x2b8c0: 0x6daa1420, 0x2b8c1: 0x6daa1620, 0x2b8c2: 0x6daa1820, 0x2b8c3: 0x6daa1a20, + 0x2b8c4: 0x6daa1c20, 0x2b8c5: 0x6daa1e20, 0x2b8c6: 0x6dcaea20, 0x2b8c7: 0x6dcaec20, + 0x2b8c8: 0x6de66a20, 0x2b8c9: 0x6de66c20, 0x2b8ca: 0x6e1ecc20, 0x2b8cb: 0x6e32e820, + 0x2b8cc: 0x6e392220, 0x2b8cd: 0x6c7aae20, 0x2b8ce: 0x6cff8820, 0x2b8cf: 0x6d2dd220, + 0x2b8d0: 0x6d5af020, 0x2b8d1: 0x6daa3a20, 0x2b8d2: 0x6cd1a220, 0x2b8d3: 0x6d5af620, + 0x2b8d4: 0x6d859a20, 0x2b8d5: 0x6c24b020, 0x2b8d6: 0x6c24b220, 0x2b8d7: 0x6c24b420, + 0x2b8d8: 0x6c581e20, 0x2b8d9: 0x6c582020, 0x2b8da: 0x6c582220, 0x2b8db: 0x6c7aba20, + 0x2b8dc: 0x6c7abc20, 0x2b8dd: 0x6ca3d220, 0x2b8de: 0x6ca3d420, 0x2b8df: 0x6cd1ba20, + 0x2b8e0: 0x6cd1bc20, 0x2b8e1: 0x6cffa220, 0x2b8e2: 0x6cffa420, 0x2b8e3: 0x6cffa620, + 0x2b8e4: 0x6cffa820, 0x2b8e5: 0x6d2de020, 0x2b8e6: 0x6d5afe20, 0x2b8e7: 0x6d5b0020, + 0x2b8e8: 0x6d5b0220, 0x2b8e9: 0x6d859e20, 0x2b8ea: 0x6daa4420, 0x2b8eb: 0x6dcb0a20, + 0x2b8ec: 0x6dcb0c20, 0x2b8ed: 0x6de67e20, 0x2b8ee: 0x6dfd3420, 0x2b8ef: 0x6e2a4020, + 0x2b8f0: 0x6cfff020, 0x2b8f1: 0x6c24d420, 0x2b8f2: 0x6c24d620, 0x2b8f3: 0x6c3c1820, + 0x2b8f4: 0x6c3c1a20, 0x2b8f5: 0x6c3c1c20, 0x2b8f6: 0x6c3c1e20, 0x2b8f7: 0x6c589020, + 0x2b8f8: 0x6c589220, 0x2b8f9: 0x6c589420, 0x2b8fa: 0x6c589620, 0x2b8fb: 0x6c589820, + 0x2b8fc: 0x6c589a20, 0x2b8fd: 0x6c7b1220, 0x2b8fe: 0x6c7b1420, 0x2b8ff: 0x6c7b1620, + // Block 0xae4, offset 0x2b900 + 0x2b900: 0x6c7b1820, 0x2b901: 0x6c7b1a20, 0x2b902: 0x6c7b1c20, 0x2b903: 0x6c7b1e20, + 0x2b904: 0x6c7b2020, 0x2b905: 0x6c7b2220, 0x2b906: 0x6c7b2420, 0x2b907: 0x6c7b2620, + 0x2b908: 0x6c7b2820, 0x2b909: 0x6c7b2a20, 0x2b90a: 0x6ca41c20, 0x2b90b: 0x6ca41e20, + 0x2b90c: 0x6ca42020, 0x2b90d: 0x6ca42220, 0x2b90e: 0x6ca42420, 0x2b90f: 0x6ca42620, + 0x2b910: 0x6ca42820, 0x2b911: 0x6ca42a20, 0x2b912: 0x6ca42c20, 0x2b913: 0x6cd21220, + 0x2b914: 0x6cd21420, 0x2b915: 0x6cd21620, 0x2b916: 0x6cd21820, 0x2b917: 0x6cd21a20, + 0x2b918: 0x6cd21c20, 0x2b919: 0x6cd21e20, 0x2b91a: 0x6cd22020, 0x2b91b: 0x6cd22220, + 0x2b91c: 0x6cd22420, 0x2b91d: 0x6cd22620, 0x2b91e: 0x6cd22820, 0x2b91f: 0x6cd22a20, + 0x2b920: 0x6cd22c20, 0x2b921: 0x6cd22e20, 0x2b922: 0x6cfff620, 0x2b923: 0x6cfff820, + 0x2b924: 0x6cfffa20, 0x2b925: 0x6cfffc20, 0x2b926: 0x6cfffe20, 0x2b927: 0x6d000020, + 0x2b928: 0x6d000220, 0x2b929: 0x6d000420, 0x2b92a: 0x6d2e0820, 0x2b92b: 0x6d2e0a20, + 0x2b92c: 0x6d2e0c20, 0x2b92d: 0x6d2e0e20, 0x2b92e: 0x6d2e1020, 0x2b92f: 0x6d2e1220, + 0x2b930: 0x6d2e1420, 0x2b931: 0x6d2e1620, 0x2b932: 0x6d2e1820, 0x2b933: 0x6d2e1a20, + 0x2b934: 0x6d2e1c20, 0x2b935: 0x6d2e1e20, 0x2b936: 0x6d5b3220, 0x2b937: 0x6d5b3420, + 0x2b938: 0x6d5b3620, 0x2b939: 0x6d5b3820, 0x2b93a: 0x6d5b3a20, 0x2b93b: 0x6d5b3c20, + 0x2b93c: 0x6d5b3e20, 0x2b93d: 0x6d5b4020, 0x2b93e: 0x6d5b4220, 0x2b93f: 0x6d5b4420, + // Block 0xae5, offset 0x2b940 + 0x2b940: 0x6d5b4620, 0x2b941: 0x6d5b4820, 0x2b942: 0x6d85c620, 0x2b943: 0x6d85c820, + 0x2b944: 0x6d85ca20, 0x2b945: 0x6d85cc20, 0x2b946: 0x6d85ce20, 0x2b947: 0x6d85d020, + 0x2b948: 0x6d85d220, 0x2b949: 0x6daa7020, 0x2b94a: 0x6daa7220, 0x2b94b: 0x6dcb2020, + 0x2b94c: 0x6dcb2220, 0x2b94d: 0x6dcb2420, 0x2b94e: 0x6dcb2620, 0x2b94f: 0x6dcb2820, + 0x2b950: 0x6dcb2a20, 0x2b951: 0x6de69620, 0x2b952: 0x6de69820, 0x2b953: 0x6de69a20, + 0x2b954: 0x6dfd4a20, 0x2b955: 0x6e101e20, 0x2b956: 0x6e102020, 0x2b957: 0x6e102220, + 0x2b958: 0x6e1ee820, 0x2b959: 0x6e2a4820, 0x2b95a: 0x6e32ee20, 0x2b95b: 0x6e32f020, + 0x2b95c: 0x6e42c820, 0x2b95d: 0x6c24f820, 0x2b95e: 0x6c590c20, 0x2b95f: 0x6c7baa20, + 0x2b960: 0x6ca48e20, 0x2b961: 0x6ca49020, 0x2b962: 0x6d00ba20, 0x2b963: 0x6d2ea820, + 0x2b964: 0x6d2eaa20, 0x2b965: 0x6d5bdc20, 0x2b966: 0x6d865220, 0x2b967: 0x6de6dc20, + 0x2b968: 0x6e104420, 0x2b969: 0x6e393020, 0x2b96a: 0x6c3c5420, 0x2b96b: 0x6c593a20, + 0x2b96c: 0x6c593c20, 0x2b96d: 0x6c7bd420, 0x2b96e: 0x6c7bd620, 0x2b96f: 0x6ca4a820, + 0x2b970: 0x6ca4aa20, 0x2b971: 0x6cd2ee20, 0x2b972: 0x6d00e420, 0x2b973: 0x6d00e620, + 0x2b974: 0x6d2ec820, 0x2b975: 0x6d2eca20, 0x2b976: 0x6d5bf820, 0x2b977: 0x6d5bfa20, + 0x2b978: 0x6d866420, 0x2b979: 0x6dcb9220, 0x2b97a: 0x6dfd8020, 0x2b97b: 0x6c3c6620, + 0x2b97c: 0x6c594e20, 0x2b97d: 0x6c595020, 0x2b97e: 0x6c7bf020, 0x2b97f: 0x6c7bf220, + // Block 0xae6, offset 0x2b980 + 0x2b980: 0x6c7bf420, 0x2b981: 0x6ca4be20, 0x2b982: 0x6ca4c020, 0x2b983: 0x6cd30a20, + 0x2b984: 0x6d010820, 0x2b985: 0x6d010a20, 0x2b986: 0x6d2ef220, 0x2b987: 0x6d867e20, + 0x2b988: 0x6d868020, 0x2b989: 0x6dab1e20, 0x2b98a: 0x6de6fa20, 0x2b98b: 0x6e105420, + 0x2b98c: 0x6e1f0820, 0x2b98d: 0x6e443e20, 0x2b98e: 0x6c251420, 0x2b98f: 0x6c251620, + 0x2b990: 0x6c3c7620, 0x2b991: 0x6c3c7820, 0x2b992: 0x6c3c7a20, 0x2b993: 0x6c3c7c20, + 0x2b994: 0x6c3c7e20, 0x2b995: 0x6c597420, 0x2b996: 0x6c597620, 0x2b997: 0x6c597820, + 0x2b998: 0x6c597a20, 0x2b999: 0x6c597c20, 0x2b99a: 0x6c597e20, 0x2b99b: 0x6c598020, + 0x2b99c: 0x6c598220, 0x2b99d: 0x6c598420, 0x2b99e: 0x6c598620, 0x2b99f: 0x6c7c2e20, + 0x2b9a0: 0x6c7c3020, 0x2b9a1: 0x6c7c3220, 0x2b9a2: 0x6c7c3420, 0x2b9a3: 0x6c7c3620, + 0x2b9a4: 0x6c7c3820, 0x2b9a5: 0x6c7c3a20, 0x2b9a6: 0x6c7c3c20, 0x2b9a7: 0x6ca4f220, + 0x2b9a8: 0x6ca4f420, 0x2b9a9: 0x6ca4f620, 0x2b9aa: 0x6ca4f820, 0x2b9ab: 0x6ca4fa20, + 0x2b9ac: 0x6ca4fc20, 0x2b9ad: 0x6ca4fe20, 0x2b9ae: 0x6ca50020, 0x2b9af: 0x6cd32c20, + 0x2b9b0: 0x6cd32e20, 0x2b9b1: 0x6cd33020, 0x2b9b2: 0x6cd33220, 0x2b9b3: 0x6cd33420, + 0x2b9b4: 0x6cd33620, 0x2b9b5: 0x6cd33820, 0x2b9b6: 0x6cd33a20, 0x2b9b7: 0x6cd33c20, + 0x2b9b8: 0x6cd33e20, 0x2b9b9: 0x6cd34020, 0x2b9ba: 0x6cd34220, 0x2b9bb: 0x6cd34420, + 0x2b9bc: 0x6cd34620, 0x2b9bd: 0x6cd34820, 0x2b9be: 0x6cd34a20, 0x2b9bf: 0x6cd34c20, + // Block 0xae7, offset 0x2b9c0 + 0x2b9c0: 0x6cd34e20, 0x2b9c1: 0x6d013020, 0x2b9c2: 0x6d013220, 0x2b9c3: 0x6d013420, + 0x2b9c4: 0x6d013620, 0x2b9c5: 0x6d013820, 0x2b9c6: 0x6d013a20, 0x2b9c7: 0x6d013c20, + 0x2b9c8: 0x6d013e20, 0x2b9c9: 0x6d014020, 0x2b9ca: 0x6d2f0820, 0x2b9cb: 0x6d2f0a20, + 0x2b9cc: 0x6d2f0c20, 0x2b9cd: 0x6d2f0e20, 0x2b9ce: 0x6d2f1020, 0x2b9cf: 0x6d2f1220, + 0x2b9d0: 0x6d2f1420, 0x2b9d1: 0x6d2f1620, 0x2b9d2: 0x6d2f1820, 0x2b9d3: 0x6d2f1a20, + 0x2b9d4: 0x6d2f1c20, 0x2b9d5: 0x6d2f1e20, 0x2b9d6: 0x6d2f2020, 0x2b9d7: 0x6d5c2820, + 0x2b9d8: 0x6d5c2a20, 0x2b9d9: 0x6d5c2c20, 0x2b9da: 0x6d5c2e20, 0x2b9db: 0x6d5c3020, + 0x2b9dc: 0x6d5c3220, 0x2b9dd: 0x6d5c3420, 0x2b9de: 0x6d5c3620, 0x2b9df: 0x6d5c3820, + 0x2b9e0: 0x6d5c3a20, 0x2b9e1: 0x6d5c3c20, 0x2b9e2: 0x6d86ae20, 0x2b9e3: 0x6d86b020, + 0x2b9e4: 0x6d86b220, 0x2b9e5: 0x6d86b420, 0x2b9e6: 0x6d86b620, 0x2b9e7: 0x6d86b820, + 0x2b9e8: 0x6d86ba20, 0x2b9e9: 0x6d86bc20, 0x2b9ea: 0x6d86be20, 0x2b9eb: 0x6dab4e20, + 0x2b9ec: 0x6dab5020, 0x2b9ed: 0x6dab5220, 0x2b9ee: 0x6dab5420, 0x2b9ef: 0x6dab5620, + 0x2b9f0: 0x6dab5820, 0x2b9f1: 0x6dab5a20, 0x2b9f2: 0x6dab5c20, 0x2b9f3: 0x6dab5e20, + 0x2b9f4: 0x6dcbbe20, 0x2b9f5: 0x6dcbc020, 0x2b9f6: 0x6dcbc220, 0x2b9f7: 0x6dcbc420, + 0x2b9f8: 0x6dcbc620, 0x2b9f9: 0x6dcbc820, 0x2b9fa: 0x6dcbca20, 0x2b9fb: 0x6dfda620, + 0x2b9fc: 0x6dfda820, 0x2b9fd: 0x6dfdaa20, 0x2b9fe: 0x6dfdac20, 0x2b9ff: 0x6e105c20, + // Block 0xae8, offset 0x2ba00 + 0x2ba00: 0x6e105e20, 0x2ba01: 0x6e1f1620, 0x2ba02: 0x6e2a6820, 0x2ba03: 0x6e2a6a20, + 0x2ba04: 0x6e393820, 0x2ba05: 0x6e452e20, 0x2ba06: 0x6c3cb220, 0x2ba07: 0x6c5a1a20, + 0x2ba08: 0x6ca59420, 0x2ba09: 0x6d2fce20, 0x2ba0a: 0x6dabea20, 0x2ba0b: 0x6dabec20, + 0x2ba0c: 0x6dabee20, 0x2ba0d: 0x6dfde020, 0x2ba0e: 0x6e332220, 0x2ba0f: 0x6c7ce420, + 0x2ba10: 0x6c7ce620, 0x2ba11: 0x6c7cfc20, 0x2ba12: 0x6ca59c20, 0x2ba13: 0x6cd40a20, + 0x2ba14: 0x6d020620, 0x2ba15: 0x6d2fe820, 0x2ba16: 0x6c13ee20, 0x2ba17: 0x6c253820, + 0x2ba18: 0x6c3cbc20, 0x2ba19: 0x6c3cbe20, 0x2ba1a: 0x6c5a3c20, 0x2ba1b: 0x6c5a3e20, + 0x2ba1c: 0x6c5a4020, 0x2ba1d: 0x6c5a4220, 0x2ba1e: 0x6c5a4420, 0x2ba1f: 0x6c7cfe20, + 0x2ba20: 0x6c7d0020, 0x2ba21: 0x6c7d0220, 0x2ba22: 0x6c7d0420, 0x2ba23: 0x6c7d0620, + 0x2ba24: 0x6c7d0820, 0x2ba25: 0x6c7d0a20, 0x2ba26: 0x6c7d0c20, 0x2ba27: 0x6c7d0e20, + 0x2ba28: 0x6c7d1020, 0x2ba29: 0x6ca5d020, 0x2ba2a: 0x6ca5d220, 0x2ba2b: 0x6ca5d420, + 0x2ba2c: 0x6ca5d620, 0x2ba2d: 0x6ca5d820, 0x2ba2e: 0x6ca5da20, 0x2ba2f: 0x6ca5dc20, + 0x2ba30: 0x6cd42620, 0x2ba31: 0x6cd42820, 0x2ba32: 0x6cd42a20, 0x2ba33: 0x6cd42c20, + 0x2ba34: 0x6cd42e20, 0x2ba35: 0x6cd43020, 0x2ba36: 0x6cd43220, 0x2ba37: 0x6d023020, + 0x2ba38: 0x6d023220, 0x2ba39: 0x6d023420, 0x2ba3a: 0x6d023620, 0x2ba3b: 0x6d023820, + 0x2ba3c: 0x6d023a20, 0x2ba3d: 0x6d023c20, 0x2ba3e: 0x6d023e20, 0x2ba3f: 0x6d024020, + // Block 0xae9, offset 0x2ba40 + 0x2ba40: 0x6d024220, 0x2ba41: 0x6d024420, 0x2ba42: 0x6d024620, 0x2ba43: 0x6d024820, + 0x2ba44: 0x6d024a20, 0x2ba45: 0x6d024c20, 0x2ba46: 0x6d024e20, 0x2ba47: 0x6d025020, + 0x2ba48: 0x6d2ffc20, 0x2ba49: 0x6d2ffe20, 0x2ba4a: 0x6d300020, 0x2ba4b: 0x6d300220, + 0x2ba4c: 0x6d300420, 0x2ba4d: 0x6d300620, 0x2ba4e: 0x6d300820, 0x2ba4f: 0x6d300a20, + 0x2ba50: 0x6d300c20, 0x2ba51: 0x6d5cf820, 0x2ba52: 0x6d5cfa20, 0x2ba53: 0x6d5cfc20, + 0x2ba54: 0x6d5cfe20, 0x2ba55: 0x6d5d0020, 0x2ba56: 0x6d5d0220, 0x2ba57: 0x6d5d0420, + 0x2ba58: 0x6d876a20, 0x2ba59: 0x6d876c20, 0x2ba5a: 0x6d876e20, 0x2ba5b: 0x6d877020, + 0x2ba5c: 0x6d877220, 0x2ba5d: 0x6d877420, 0x2ba5e: 0x6d877620, 0x2ba5f: 0x6dac0a20, + 0x2ba60: 0x6d877820, 0x2ba61: 0x6dac0c20, 0x2ba62: 0x6dac0e20, 0x2ba63: 0x6dac1020, + 0x2ba64: 0x6dac1220, 0x2ba65: 0x6dac1420, 0x2ba66: 0x6dac1620, 0x2ba67: 0x6dac1820, + 0x2ba68: 0x6dac1a20, 0x2ba69: 0x6dcc4220, 0x2ba6a: 0x6dcc4420, 0x2ba6b: 0x6dcc4620, + 0x2ba6c: 0x6dcc4820, 0x2ba6d: 0x6dcc4a20, 0x2ba6e: 0x6dcc4c20, 0x2ba6f: 0x6dcc4e20, + 0x2ba70: 0x6de76a20, 0x2ba71: 0x6dfdec20, 0x2ba72: 0x6dfdee20, 0x2ba73: 0x6dfdf020, + 0x2ba74: 0x6e108c20, 0x2ba75: 0x6e108e20, 0x2ba76: 0x6e109020, 0x2ba77: 0x6e109220, + 0x2ba78: 0x6e1f3420, 0x2ba79: 0x6e1f3620, 0x2ba7a: 0x6e332420, 0x2ba7b: 0x6e3d9620, + 0x2ba7c: 0x6c254c20, 0x2ba7d: 0x6c5abe20, 0x2ba7e: 0x6c5ac020, 0x2ba7f: 0x6c5ac220, + // Block 0xaea, offset 0x2ba80 + 0x2ba80: 0x6c5ac420, 0x2ba81: 0x6c7dbe20, 0x2ba82: 0x6c7dc020, 0x2ba83: 0x6c7dc220, + 0x2ba84: 0x6ca68c20, 0x2ba85: 0x6ca68e20, 0x2ba86: 0x6ca69020, 0x2ba87: 0x6cd4b820, + 0x2ba88: 0x6cd4ba20, 0x2ba89: 0x6cd4bc20, 0x2ba8a: 0x6cd4be20, 0x2ba8b: 0x6d030820, + 0x2ba8c: 0x6d030a20, 0x2ba8d: 0x6d030c20, 0x2ba8e: 0x6d030e20, 0x2ba8f: 0x6d031020, + 0x2ba90: 0x6d031220, 0x2ba91: 0x6d031420, 0x2ba92: 0x6d031620, 0x2ba93: 0x6d30b420, + 0x2ba94: 0x6d30b620, 0x2ba95: 0x6d30b820, 0x2ba96: 0x6d30ba20, 0x2ba97: 0x6d30bc20, + 0x2ba98: 0x6d5d8820, 0x2ba99: 0x6d5d8a20, 0x2ba9a: 0x6d87f420, 0x2ba9b: 0x6d87f620, + 0x2ba9c: 0x6d87f820, 0x2ba9d: 0x6d87fa20, 0x2ba9e: 0x6d87fc20, 0x2ba9f: 0x6dac9e20, + 0x2baa0: 0x6dcca020, 0x2baa1: 0x6dcca220, 0x2baa2: 0x6de7aa20, 0x2baa3: 0x6dfe3820, + 0x2baa4: 0x6e10bc20, 0x2baa5: 0x6e444820, 0x2baa6: 0x6c256420, 0x2baa7: 0x6c256620, + 0x2baa8: 0x6c3d2e20, 0x2baa9: 0x6c3d3020, 0x2baaa: 0x6c3d3220, 0x2baab: 0x6c3d3420, + 0x2baac: 0x6c3d3620, 0x2baad: 0x6c3d3820, 0x2baae: 0x6c5b2e20, 0x2baaf: 0x6c5b3020, + 0x2bab0: 0x6c5b3220, 0x2bab1: 0x6c5b3420, 0x2bab2: 0x6c5b3620, 0x2bab3: 0x6c5b3820, + 0x2bab4: 0x6c5b3a20, 0x2bab5: 0x6c5b3c20, 0x2bab6: 0x6c7e3020, 0x2bab7: 0x6c7e3220, + 0x2bab8: 0x6c7e3420, 0x2bab9: 0x6c7e3620, 0x2baba: 0x6ca6f820, 0x2babb: 0x6ca6fa20, + 0x2babc: 0x6ca6fc20, 0x2babd: 0x6ca6fe20, 0x2babe: 0x6ca70020, 0x2babf: 0x6ca70220, + // Block 0xaeb, offset 0x2bac0 + 0x2bac0: 0x6ca70420, 0x2bac1: 0x6ca70620, 0x2bac2: 0x6ca70820, 0x2bac3: 0x6ca70a20, + 0x2bac4: 0x6ca70c20, 0x2bac5: 0x6ca70e20, 0x2bac6: 0x6ca71020, 0x2bac7: 0x6ca71220, + 0x2bac8: 0x6ca71420, 0x2bac9: 0x6ca71620, 0x2baca: 0x6ca71820, 0x2bacb: 0x6cd52e20, + 0x2bacc: 0x6cd53020, 0x2bacd: 0x6cd53220, 0x2bace: 0x6cd53420, 0x2bacf: 0x6cd53620, + 0x2bad0: 0x6cd53820, 0x2bad1: 0x6cd53a20, 0x2bad2: 0x6cd53c20, 0x2bad3: 0x6cd53e20, + 0x2bad4: 0x6d037c20, 0x2bad5: 0x6d037e20, 0x2bad6: 0x6d038020, 0x2bad7: 0x6d038220, + 0x2bad8: 0x6d038420, 0x2bad9: 0x6d038620, 0x2bada: 0x6d038820, 0x2badb: 0x6d038a20, + 0x2badc: 0x6d038c20, 0x2badd: 0x6d038e20, 0x2bade: 0x6d039020, 0x2badf: 0x6d039220, + 0x2bae0: 0x6d311a20, 0x2bae1: 0x6d311c20, 0x2bae2: 0x6d311e20, 0x2bae3: 0x6d312020, + 0x2bae4: 0x6d312220, 0x2bae5: 0x6d312420, 0x2bae6: 0x6d312620, 0x2bae7: 0x6d312820, + 0x2bae8: 0x6d312a20, 0x2bae9: 0x6d312c20, 0x2baea: 0x6d312e20, 0x2baeb: 0x6d313020, + 0x2baec: 0x6d5dd820, 0x2baed: 0x6d5dda20, 0x2baee: 0x6d5ddc20, 0x2baef: 0x6d5dde20, + 0x2baf0: 0x6d5de020, 0x2baf1: 0x6d5de220, 0x2baf2: 0x6d5de420, 0x2baf3: 0x6d5de620, + 0x2baf4: 0x6d5de820, 0x2baf5: 0x6d5dea20, 0x2baf6: 0x6d5dec20, 0x2baf7: 0x6d883420, + 0x2baf8: 0x6d883620, 0x2baf9: 0x6d883820, 0x2bafa: 0x6d883a20, 0x2bafb: 0x6d883c20, + 0x2bafc: 0x6d883e20, 0x2bafd: 0x6d884020, 0x2bafe: 0x6dacce20, 0x2baff: 0x6dacd020, + // Block 0xaec, offset 0x2bb00 + 0x2bb00: 0x6dacd220, 0x2bb01: 0x6dccc020, 0x2bb02: 0x6dccc220, 0x2bb03: 0x6dccc420, + 0x2bb04: 0x6dccc620, 0x2bb05: 0x6dccc820, 0x2bb06: 0x6dccca20, 0x2bb07: 0x6dcccc20, + 0x2bb08: 0x6dfe4620, 0x2bb09: 0x6dfe4820, 0x2bb0a: 0x6e10ca20, 0x2bb0b: 0x6e10cc20, + 0x2bb0c: 0x6e10ce20, 0x2bb0d: 0x6e10d020, 0x2bb0e: 0x6e1f6620, 0x2bb0f: 0x6e1f6820, + 0x2bb10: 0x6e453020, 0x2bb11: 0x6c257a20, 0x2bb12: 0x6c3d6820, 0x2bb13: 0x6c5b9220, + 0x2bb14: 0x6c5b9420, 0x2bb15: 0x6c5b9620, 0x2bb16: 0x6c5b9820, 0x2bb17: 0x6c7ea620, + 0x2bb18: 0x6c7ea820, 0x2bb19: 0x6c7eaa20, 0x2bb1a: 0x6ca77820, 0x2bb1b: 0x6ca77a20, + 0x2bb1c: 0x6ca77c20, 0x2bb1d: 0x6ca77e20, 0x2bb1e: 0x6ca78020, 0x2bb1f: 0x6ca78220, + 0x2bb20: 0x6ca78420, 0x2bb21: 0x6cd5a220, 0x2bb22: 0x6cd5a420, 0x2bb23: 0x6cd5a620, + 0x2bb24: 0x6cd5a820, 0x2bb25: 0x6cd5aa20, 0x2bb26: 0x6d042a20, 0x2bb27: 0x6d042c20, + 0x2bb28: 0x6d042e20, 0x2bb29: 0x6d043020, 0x2bb2a: 0x6d31c420, 0x2bb2b: 0x6d31c620, + 0x2bb2c: 0x6d5e6a20, 0x2bb2d: 0x6d5e6c20, 0x2bb2e: 0x6d5e6e20, 0x2bb2f: 0x6d88bc20, + 0x2bb30: 0x6d88be20, 0x2bb31: 0x6d88c020, 0x2bb32: 0x6d88c220, 0x2bb33: 0x6d88c420, + 0x2bb34: 0x6d88c620, 0x2bb35: 0x6dad4220, 0x2bb36: 0x6dad4420, 0x2bb37: 0x6dad4620, + 0x2bb38: 0x6dad4820, 0x2bb39: 0x6dad4a20, 0x2bb3a: 0x6dad4c20, 0x2bb3b: 0x6dad4e20, + 0x2bb3c: 0x6dcd1c20, 0x2bb3d: 0x6dcd1e20, 0x2bb3e: 0x6de7f220, 0x2bb3f: 0x6de7f420, + // Block 0xaed, offset 0x2bb40 + 0x2bb40: 0x6dfe8420, 0x2bb41: 0x6e1f7620, 0x2bb42: 0x6c140e20, 0x2bb43: 0x6c3d8c20, + 0x2bb44: 0x6c3d8e20, 0x2bb45: 0x6c5bd220, 0x2bb46: 0x6c5bd420, 0x2bb47: 0x6c7ef620, + 0x2bb48: 0x6c7ef820, 0x2bb49: 0x6c7efa20, 0x2bb4a: 0x6c7efc20, 0x2bb4b: 0x6ca7c620, + 0x2bb4c: 0x6cd60a20, 0x2bb4d: 0x6cd60c20, 0x2bb4e: 0x6d048620, 0x2bb4f: 0x6d048820, + 0x2bb50: 0x6d048a20, 0x2bb51: 0x6d048c20, 0x2bb52: 0x6d892020, 0x2bb53: 0x6dad8820, + 0x2bb54: 0x6dcd3820, 0x2bb55: 0x6de80620, 0x2bb56: 0x6c5bf620, 0x2bb57: 0x6c7f3220, + 0x2bb58: 0x6c7f3420, 0x2bb59: 0x6c7f3620, 0x2bb5a: 0x6c7f3820, 0x2bb5b: 0x6c7f3a20, + 0x2bb5c: 0x6c7f3c20, 0x2bb5d: 0x6c7f3e20, 0x2bb5e: 0x6ca7e820, 0x2bb5f: 0x6ca7ea20, + 0x2bb60: 0x6ca7ec20, 0x2bb61: 0x6ca7ee20, 0x2bb62: 0x6ca7f020, 0x2bb63: 0x6ca7f220, + 0x2bb64: 0x6ca7f420, 0x2bb65: 0x6ca7f620, 0x2bb66: 0x6ca7f820, 0x2bb67: 0x6cd63620, + 0x2bb68: 0x6cd63820, 0x2bb69: 0x6cd63a20, 0x2bb6a: 0x6cd63c20, 0x2bb6b: 0x6cd63e20, + 0x2bb6c: 0x6cd64020, 0x2bb6d: 0x6cd64220, 0x2bb6e: 0x6cd64420, 0x2bb6f: 0x6cd64620, + 0x2bb70: 0x6cd64820, 0x2bb71: 0x6cd64a20, 0x2bb72: 0x6cd64c20, 0x2bb73: 0x6cd64e20, + 0x2bb74: 0x6cd65020, 0x2bb75: 0x6d04b620, 0x2bb76: 0x6d04b820, 0x2bb77: 0x6d04ba20, + 0x2bb78: 0x6d04bc20, 0x2bb79: 0x6d04be20, 0x2bb7a: 0x6d04c020, 0x2bb7b: 0x6d04c220, + 0x2bb7c: 0x6d04c420, 0x2bb7d: 0x6d04c620, 0x2bb7e: 0x6d04c820, 0x2bb7f: 0x6d04ca20, + // Block 0xaee, offset 0x2bb80 + 0x2bb80: 0x6d04cc20, 0x2bb81: 0x6d323220, 0x2bb82: 0x6d323420, 0x2bb83: 0x6d323620, + 0x2bb84: 0x6d323820, 0x2bb85: 0x6d323a20, 0x2bb86: 0x6d323c20, 0x2bb87: 0x6d323e20, + 0x2bb88: 0x6d324020, 0x2bb89: 0x6d324220, 0x2bb8a: 0x6d324420, 0x2bb8b: 0x6d324620, + 0x2bb8c: 0x6d324820, 0x2bb8d: 0x6d324a20, 0x2bb8e: 0x6d5ecc20, 0x2bb8f: 0x6d5ece20, + 0x2bb90: 0x6d5ed020, 0x2bb91: 0x6d5ed220, 0x2bb92: 0x6d5ed420, 0x2bb93: 0x6d5ed620, + 0x2bb94: 0x6d5ed820, 0x2bb95: 0x6d5eda20, 0x2bb96: 0x6d5edc20, 0x2bb97: 0x6d5ede20, + 0x2bb98: 0x6d5ee020, 0x2bb99: 0x6d5ee220, 0x2bb9a: 0x6d5ee420, 0x2bb9b: 0x6d5ee620, + 0x2bb9c: 0x6d5ee820, 0x2bb9d: 0x6d5eea20, 0x2bb9e: 0x6d5eec20, 0x2bb9f: 0x6d5eee20, + 0x2bba0: 0x6d5ef020, 0x2bba1: 0x6d5ef220, 0x2bba2: 0x6d5ef420, 0x2bba3: 0x6d5ef620, + 0x2bba4: 0x6d5ef820, 0x2bba5: 0x6d5efa20, 0x2bba6: 0x6d5efc20, 0x2bba7: 0x6d5efe20, + 0x2bba8: 0x6d5f0020, 0x2bba9: 0x6d5f0220, 0x2bbaa: 0x6d892e20, 0x2bbab: 0x6d893020, + 0x2bbac: 0x6d893220, 0x2bbad: 0x6d893420, 0x2bbae: 0x6d893620, 0x2bbaf: 0x6d893820, + 0x2bbb0: 0x6d893a20, 0x2bbb1: 0x6d893c20, 0x2bbb2: 0x6d893e20, 0x2bbb3: 0x6d894020, + 0x2bbb4: 0x6d894220, 0x2bbb5: 0x6d894420, 0x2bbb6: 0x6d894620, 0x2bbb7: 0x6d894820, + 0x2bbb8: 0x6dada820, 0x2bbb9: 0x6dadaa20, 0x2bbba: 0x6dadac20, 0x2bbbb: 0x6dadae20, + 0x2bbbc: 0x6dadb020, 0x2bbbd: 0x6dadb220, 0x2bbbe: 0x6dadb420, 0x2bbbf: 0x6dadb620, + // Block 0xaef, offset 0x2bbc0 + 0x2bbc0: 0x6dadb820, 0x2bbc1: 0x6dadba20, 0x2bbc2: 0x6dadbc20, 0x2bbc3: 0x6dadbe20, + 0x2bbc4: 0x6dadc020, 0x2bbc5: 0x6dadc220, 0x2bbc6: 0x6dadc420, 0x2bbc7: 0x6dadc620, + 0x2bbc8: 0x6dcd4c20, 0x2bbc9: 0x6dcd4e20, 0x2bbca: 0x6dcd5020, 0x2bbcb: 0x6dcd5220, + 0x2bbcc: 0x6dcd5420, 0x2bbcd: 0x6dcd5620, 0x2bbce: 0x6dcd5820, 0x2bbcf: 0x6de81420, + 0x2bbd0: 0x6dcd5a20, 0x2bbd1: 0x6dcd5c20, 0x2bbd2: 0x6dcd5e20, 0x2bbd3: 0x6dcd6020, + 0x2bbd4: 0x6dcd6220, 0x2bbd5: 0x6dcd6420, 0x2bbd6: 0x6dcd6620, 0x2bbd7: 0x6dcd6820, + 0x2bbd8: 0x6dcd6a20, 0x2bbd9: 0x6dcd6c20, 0x2bbda: 0x6dcd6e20, 0x2bbdb: 0x6de81620, + 0x2bbdc: 0x6de81820, 0x2bbdd: 0x6de81a20, 0x2bbde: 0x6de81c20, 0x2bbdf: 0x6de81e20, + 0x2bbe0: 0x6de82020, 0x2bbe1: 0x6de82220, 0x2bbe2: 0x6de82420, 0x2bbe3: 0x6dcd7020, + 0x2bbe4: 0x6de82620, 0x2bbe5: 0x6dfeaa20, 0x2bbe6: 0x6e110820, 0x2bbe7: 0x6e110a20, + 0x2bbe8: 0x6e110c20, 0x2bbe9: 0x6e110e20, 0x2bbea: 0x6e111020, 0x2bbeb: 0x6e111220, + 0x2bbec: 0x6e111420, 0x2bbed: 0x6e111620, 0x2bbee: 0x6e1f8620, 0x2bbef: 0x6e1f8820, + 0x2bbf0: 0x6e1f8a20, 0x2bbf1: 0x6e1f8c20, 0x2bbf2: 0x6e2ac620, 0x2bbf3: 0x6e2ac820, + 0x2bbf4: 0x6e2aca20, 0x2bbf5: 0x6e2e7820, 0x2bbf6: 0x6e335220, 0x2bbf7: 0x6e3dac20, + 0x2bbf8: 0x6e408e20, 0x2bbf9: 0x6e453220, 0x2bbfa: 0x6c5c2e20, 0x2bbfb: 0x6c7faa20, + 0x2bbfc: 0x6c7fac20, 0x2bbfd: 0x6ca89220, 0x2bbfe: 0x6ca89420, 0x2bbff: 0x6ca89620, + // Block 0xaf0, offset 0x2bc00 + 0x2bc00: 0x6ca89820, 0x2bc01: 0x6cd6e020, 0x2bc02: 0x6cd6e220, 0x2bc03: 0x6cd6e420, + 0x2bc04: 0x6cd6e620, 0x2bc05: 0x6cd6e820, 0x2bc06: 0x6cd6ea20, 0x2bc07: 0x6d059820, + 0x2bc08: 0x6d059a20, 0x2bc09: 0x6d059c20, 0x2bc0a: 0x6d059e20, 0x2bc0b: 0x6d05a020, + 0x2bc0c: 0x6d05a220, 0x2bc0d: 0x6d333820, 0x2bc0e: 0x6d333a20, 0x2bc0f: 0x6d333c20, + 0x2bc10: 0x6d333e20, 0x2bc11: 0x6d334020, 0x2bc12: 0x6d334220, 0x2bc13: 0x6d5fee20, + 0x2bc14: 0x6d5ff020, 0x2bc15: 0x6d5ff220, 0x2bc16: 0x6d5ff420, 0x2bc17: 0x6d5ff620, + 0x2bc18: 0x6d5ff820, 0x2bc19: 0x6d5ffa20, 0x2bc1a: 0x6d8a5220, 0x2bc1b: 0x6d8a5420, + 0x2bc1c: 0x6daec620, 0x2bc1d: 0x6daec820, 0x2bc1e: 0x6daeca20, 0x2bc1f: 0x6daecc20, + 0x2bc20: 0x6daece20, 0x2bc21: 0x6daed020, 0x2bc22: 0x6daed220, 0x2bc23: 0x6dce6420, + 0x2bc24: 0x6dce6620, 0x2bc25: 0x6dce6820, 0x2bc26: 0x6dce6a20, 0x2bc27: 0x6dce6c20, + 0x2bc28: 0x6dce6e20, 0x2bc29: 0x6dce7020, 0x2bc2a: 0x6de8c220, 0x2bc2b: 0x6de8c420, + 0x2bc2c: 0x6de8c620, 0x2bc2d: 0x6dff1c20, 0x2bc2e: 0x6dff1e20, 0x2bc2f: 0x6e118a20, + 0x2bc30: 0x6e1fe220, 0x2bc31: 0x6e2b0420, 0x2bc32: 0x6e2b0620, 0x2bc33: 0x6e398420, + 0x2bc34: 0x6e398620, 0x2bc35: 0x6c3dba20, 0x2bc36: 0x6c5c5e20, 0x2bc37: 0x6c5c6020, + 0x2bc38: 0x6c5c6220, 0x2bc39: 0x6c5c6420, 0x2bc3a: 0x6c7fee20, 0x2bc3b: 0x6c7ff020, + 0x2bc3c: 0x6c7ff220, 0x2bc3d: 0x6c7ff420, 0x2bc3e: 0x6c7ff620, 0x2bc3f: 0x6c7ff820, + // Block 0xaf1, offset 0x2bc40 + 0x2bc40: 0x6c7ffa20, 0x2bc41: 0x6c7ffc20, 0x2bc42: 0x6c7ffe20, 0x2bc43: 0x6c800020, + 0x2bc44: 0x6c800220, 0x2bc45: 0x6c800420, 0x2bc46: 0x6c800620, 0x2bc47: 0x6c800820, + 0x2bc48: 0x6ca8f220, 0x2bc49: 0x6ca8f420, 0x2bc4a: 0x6ca8f620, 0x2bc4b: 0x6ca8f820, + 0x2bc4c: 0x6ca8fa20, 0x2bc4d: 0x6ca8fc20, 0x2bc4e: 0x6ca8fe20, 0x2bc4f: 0x6ca90020, + 0x2bc50: 0x6ca90220, 0x2bc51: 0x6ca90420, 0x2bc52: 0x6ca90620, 0x2bc53: 0x6ca90820, + 0x2bc54: 0x6ca90a20, 0x2bc55: 0x6cd74620, 0x2bc56: 0x6cd74820, 0x2bc57: 0x6cd74a20, + 0x2bc58: 0x6cd74c20, 0x2bc59: 0x6cd74e20, 0x2bc5a: 0x6cd75020, 0x2bc5b: 0x6cd75220, + 0x2bc5c: 0x6cd75420, 0x2bc5d: 0x6cd75620, 0x2bc5e: 0x6cd75820, 0x2bc5f: 0x6d060420, + 0x2bc60: 0x6d060620, 0x2bc61: 0x6d060820, 0x2bc62: 0x6d060a20, 0x2bc63: 0x6d060c20, + 0x2bc64: 0x6d060e20, 0x2bc65: 0x6d061020, 0x2bc66: 0x6d061220, 0x2bc67: 0x6d33b820, + 0x2bc68: 0x6d33ba20, 0x2bc69: 0x6d33bc20, 0x2bc6a: 0x6d33be20, 0x2bc6b: 0x6d33c020, + 0x2bc6c: 0x6d33c220, 0x2bc6d: 0x6d33c420, 0x2bc6e: 0x6d33c620, 0x2bc6f: 0x6d33c820, + 0x2bc70: 0x6d33ca20, 0x2bc71: 0x6d33cc20, 0x2bc72: 0x6d33ce20, 0x2bc73: 0x6d606420, + 0x2bc74: 0x6d606620, 0x2bc75: 0x6d606820, 0x2bc76: 0x6d606a20, 0x2bc77: 0x6d606c20, + 0x2bc78: 0x6d606e20, 0x2bc79: 0x6d607020, 0x2bc7a: 0x6d607220, 0x2bc7b: 0x6d607420, + 0x2bc7c: 0x6d607620, 0x2bc7d: 0x6d607820, 0x2bc7e: 0x6d607a20, 0x2bc7f: 0x6d607c20, + // Block 0xaf2, offset 0x2bc80 + 0x2bc80: 0x6d607e20, 0x2bc81: 0x6d608020, 0x2bc82: 0x6d608220, 0x2bc83: 0x6d608420, + 0x2bc84: 0x6d608620, 0x2bc85: 0x6d8aac20, 0x2bc86: 0x6d8aae20, 0x2bc87: 0x6d8ab020, + 0x2bc88: 0x6d8ab220, 0x2bc89: 0x6d8ab420, 0x2bc8a: 0x6d8ab620, 0x2bc8b: 0x6d8ab820, + 0x2bc8c: 0x6daf2020, 0x2bc8d: 0x6daf2220, 0x2bc8e: 0x6daf2420, 0x2bc8f: 0x6daf2620, + 0x2bc90: 0x6daf2820, 0x2bc91: 0x6daf2a20, 0x2bc92: 0x6daf2c20, 0x2bc93: 0x6daf2e20, + 0x2bc94: 0x6daf3020, 0x2bc95: 0x6daf3220, 0x2bc96: 0x6dcec020, 0x2bc97: 0x6dcec220, + 0x2bc98: 0x6dcec420, 0x2bc99: 0x6dcec620, 0x2bc9a: 0x6dcec820, 0x2bc9b: 0x6dceca20, + 0x2bc9c: 0x6de90c20, 0x2bc9d: 0x6de90e20, 0x2bc9e: 0x6de91020, 0x2bc9f: 0x6de91220, + 0x2bca0: 0x6de91420, 0x2bca1: 0x6de91620, 0x2bca2: 0x6de91820, 0x2bca3: 0x6dff3820, + 0x2bca4: 0x6dff3a20, 0x2bca5: 0x6dff3c20, 0x2bca6: 0x6dff3e20, 0x2bca7: 0x6dff4020, + 0x2bca8: 0x6e11a620, 0x2bca9: 0x6e11a820, 0x2bcaa: 0x6e200020, 0x2bcab: 0x6e200220, + 0x2bcac: 0x6e200420, 0x2bcad: 0x6e200620, 0x2bcae: 0x6e2b1420, 0x2bcaf: 0x6e338a20, + 0x2bcb0: 0x6e338c20, 0x2bcb1: 0x6e338e20, 0x2bcb2: 0x6e339020, 0x2bcb3: 0x6e399420, + 0x2bcb4: 0x6e399620, 0x2bcb5: 0x6e40a420, 0x2bcb6: 0x6c5c9820, 0x2bcb7: 0x6ca99e20, + 0x2bcb8: 0x6c809c20, 0x2bcb9: 0x6ca9a020, 0x2bcba: 0x6cd80e20, 0x2bcbb: 0x6cd81020, + 0x2bcbc: 0x6d06cc20, 0x2bcbd: 0x6d34c620, 0x2bcbe: 0x6d617c20, 0x2bcbf: 0x6d617e20, + // Block 0xaf3, offset 0x2bcc0 + 0x2bcc0: 0x6d8b9420, 0x2bcc1: 0x6de9a020, 0x2bcc2: 0x6c5cc420, 0x2bcc3: 0x6c80c420, + 0x2bcc4: 0x6ca9e220, 0x2bcc5: 0x6ca9e420, 0x2bcc6: 0x6ca9e620, 0x2bcc7: 0x6ca9e820, + 0x2bcc8: 0x6ca9ea20, 0x2bcc9: 0x6ca9ec20, 0x2bcca: 0x6cd85220, 0x2bccb: 0x6d34e020, + 0x2bccc: 0x6d34e220, 0x2bccd: 0x6d8ba620, 0x2bcce: 0x6e2b3220, 0x2bccf: 0x6c0a4820, + 0x2bcd0: 0x6c3e0220, 0x2bcd1: 0x6c5cce20, 0x2bcd2: 0x6c5cd020, 0x2bcd3: 0x6c5cd220, + 0x2bcd4: 0x6c5cd420, 0x2bcd5: 0x6c80d220, 0x2bcd6: 0x6c80d420, 0x2bcd7: 0x6c80d620, + 0x2bcd8: 0x6ca9fe20, 0x2bcd9: 0x6cd86420, 0x2bcda: 0x6cd86620, 0x2bcdb: 0x6d06fc20, + 0x2bcdc: 0x6d06fe20, 0x2bcdd: 0x6d070020, 0x2bcde: 0x6d34fc20, 0x2bcdf: 0x6d34fe20, + 0x2bce0: 0x6d8bba20, 0x2bce1: 0x6d8bbc20, 0x2bce2: 0x6db00620, 0x2bce3: 0x6dcf8c20, + 0x2bce4: 0x6de9b420, 0x2bce5: 0x6e120820, 0x2bce6: 0x6e33ae20, 0x2bce7: 0x6c812420, + 0x2bce8: 0x6c812620, 0x2bce9: 0x6c812820, 0x2bcea: 0x6caa2a20, 0x2bceb: 0x6caa2c20, + 0x2bcec: 0x6caa2e20, 0x2bced: 0x6caa3020, 0x2bcee: 0x6cd88220, 0x2bcef: 0x6cd88420, + 0x2bcf0: 0x6cd88620, 0x2bcf1: 0x6d074620, 0x2bcf2: 0x6d352e20, 0x2bcf3: 0x6d353020, + 0x2bcf4: 0x6d353220, 0x2bcf5: 0x6d353420, 0x2bcf6: 0x6d353620, 0x2bcf7: 0x6d61ca20, + 0x2bcf8: 0x6d8bf220, 0x2bcf9: 0x6d8bf420, 0x2bcfa: 0x6db02c20, 0x2bcfb: 0x6dcfa820, + 0x2bcfc: 0x6dcfaa20, 0x2bcfd: 0x6e204220, 0x2bcfe: 0x6c815620, 0x2bcff: 0x6c815820, + // Block 0xaf4, offset 0x2bd00 + 0x2bd00: 0x6caa6e20, 0x2bd01: 0x6caa7020, 0x2bd02: 0x6caa7220, 0x2bd03: 0x6caa7420, + 0x2bd04: 0x6caa7620, 0x2bd05: 0x6caa7820, 0x2bd06: 0x6caa7a20, 0x2bd07: 0x6cd8aa20, + 0x2bd08: 0x6cd8ac20, 0x2bd09: 0x6cd8ae20, 0x2bd0a: 0x6cd8b020, 0x2bd0b: 0x6d077c20, + 0x2bd0c: 0x6d077e20, 0x2bd0d: 0x6d078020, 0x2bd0e: 0x6d078220, 0x2bd0f: 0x6d355020, + 0x2bd10: 0x6d355220, 0x2bd11: 0x6d355420, 0x2bd12: 0x6d355620, 0x2bd13: 0x6d355820, + 0x2bd14: 0x6d8c0c20, 0x2bd15: 0x6d8c0e20, 0x2bd16: 0x6dcfd820, 0x2bd17: 0x6dcfda20, + 0x2bd18: 0x6dcfdc20, 0x2bd19: 0x6dffb220, 0x2bd1a: 0x6e122220, 0x2bd1b: 0x6c5d2e20, + 0x2bd1c: 0x6cd8f220, 0x2bd1d: 0x6cd8f420, 0x2bd1e: 0x6cd8f620, 0x2bd1f: 0x6c5d3a20, + 0x2bd20: 0x6c5d3c20, 0x2bd21: 0x6c81a620, 0x2bd22: 0x6c5d4820, 0x2bd23: 0x6caaba20, + 0x2bd24: 0x6d07b020, 0x2bd25: 0x6d07b220, 0x2bd26: 0x6d359420, 0x2bd27: 0x6d359620, + 0x2bd28: 0x6d359820, 0x2bd29: 0x6d359a20, 0x2bd2a: 0x6d359c20, 0x2bd2b: 0x6d624c20, + 0x2bd2c: 0x6d624e20, 0x2bd2d: 0x6db07e20, 0x2bd2e: 0x6db08020, 0x2bd2f: 0x6db08220, + 0x2bd30: 0x6dd01020, 0x2bd31: 0x6e122c20, 0x2bd32: 0x6c25e420, 0x2bd33: 0x6c81b620, + 0x2bd34: 0x6c81b820, 0x2bd35: 0x6caad020, 0x2bd36: 0x6caad220, 0x2bd37: 0x6cd90e20, + 0x2bd38: 0x6d07c020, 0x2bd39: 0x6d07c220, 0x2bd3a: 0x6d35ba20, 0x2bd3b: 0x6d35bc20, + 0x2bd3c: 0x6d35be20, 0x2bd3d: 0x6d35c020, 0x2bd3e: 0x6d35c220, 0x2bd3f: 0x6d626820, + // Block 0xaf5, offset 0x2bd40 + 0x2bd40: 0x6d626a20, 0x2bd41: 0x6d8c6220, 0x2bd42: 0x6d8c6420, 0x2bd43: 0x6d8c6620, + 0x2bd44: 0x6db09820, 0x2bd45: 0x6db09a20, 0x2bd46: 0x6db09c20, 0x2bd47: 0x6db09e20, + 0x2bd48: 0x6dd02a20, 0x2bd49: 0x6dffc620, 0x2bd4a: 0x6e205c20, 0x2bd4b: 0x6d07fc20, + 0x2bd4c: 0x6c145820, 0x2bd4d: 0x6c145a20, 0x2bd4e: 0x6c25ea20, 0x2bd4f: 0x6c25ec20, + 0x2bd50: 0x6c3e6220, 0x2bd51: 0x6c81fe20, 0x2bd52: 0x6c3e6420, 0x2bd53: 0x6c3e6620, + 0x2bd54: 0x6c3e6820, 0x2bd55: 0x6c3e6a20, 0x2bd56: 0x6c3e6c20, 0x2bd57: 0x6c3e6e20, + 0x2bd58: 0x6c3e7020, 0x2bd59: 0x6c3e7220, 0x2bd5a: 0x6c3e7420, 0x2bd5b: 0x6c3e7620, + 0x2bd5c: 0x6c3e7820, 0x2bd5d: 0x6c3e7a20, 0x2bd5e: 0x6c5d6220, 0x2bd5f: 0x6c5d6420, + 0x2bd60: 0x6c5d6620, 0x2bd61: 0x6c5d6820, 0x2bd62: 0x6c5d6a20, 0x2bd63: 0x6c5d6c20, + 0x2bd64: 0x6c5d6e20, 0x2bd65: 0x6c5d7020, 0x2bd66: 0x6c820020, 0x2bd67: 0x6c820220, + 0x2bd68: 0x6c820420, 0x2bd69: 0x6c820620, 0x2bd6a: 0x6c820820, 0x2bd6b: 0x6c820a20, + 0x2bd6c: 0x6c820c20, 0x2bd6d: 0x6c820e20, 0x2bd6e: 0x6c821020, 0x2bd6f: 0x6cab1220, + 0x2bd70: 0x6cab1420, 0x2bd71: 0x6cab1620, 0x2bd72: 0x6cab1820, 0x2bd73: 0x6cab1a20, + 0x2bd74: 0x6cab1c20, 0x2bd75: 0x6cab1e20, 0x2bd76: 0x6cab2020, 0x2bd77: 0x6cab2220, + 0x2bd78: 0x6cab2420, 0x2bd79: 0x6cab2620, 0x2bd7a: 0x6cab2820, 0x2bd7b: 0x6cab2a20, + 0x2bd7c: 0x6cd95c20, 0x2bd7d: 0x6cd95e20, 0x2bd7e: 0x6cd96020, 0x2bd7f: 0x6cd96220, + // Block 0xaf6, offset 0x2bd80 + 0x2bd80: 0x6cd96420, 0x2bd81: 0x6cd96620, 0x2bd82: 0x6cd96820, 0x2bd83: 0x6cd96a20, + 0x2bd84: 0x6cd96c20, 0x2bd85: 0x6cd96e20, 0x2bd86: 0x6cd97020, 0x2bd87: 0x6cd97220, + 0x2bd88: 0x6cd97420, 0x2bd89: 0x6cd97620, 0x2bd8a: 0x6cd97820, 0x2bd8b: 0x6cd97a20, + 0x2bd8c: 0x6cd97c20, 0x2bd8d: 0x6d080a20, 0x2bd8e: 0x6d080c20, 0x2bd8f: 0x6d080e20, + 0x2bd90: 0x6d081020, 0x2bd91: 0x6d081220, 0x2bd92: 0x6d081420, 0x2bd93: 0x6d081620, + 0x2bd94: 0x6d081820, 0x2bd95: 0x6d081a20, 0x2bd96: 0x6d081c20, 0x2bd97: 0x6d081e20, + 0x2bd98: 0x6d082020, 0x2bd99: 0x6d082220, 0x2bd9a: 0x6d082420, 0x2bd9b: 0x6d082620, + 0x2bd9c: 0x6d361c20, 0x2bd9d: 0x6d361e20, 0x2bd9e: 0x6d362020, 0x2bd9f: 0x6d362220, + 0x2bda0: 0x6d362420, 0x2bda1: 0x6d8c9e20, 0x2bda2: 0x6d362620, 0x2bda3: 0x6d362820, + 0x2bda4: 0x6d362a20, 0x2bda5: 0x6d362c20, 0x2bda6: 0x6d362e20, 0x2bda7: 0x6d363020, + 0x2bda8: 0x6d363220, 0x2bda9: 0x6d363420, 0x2bdaa: 0x6d363620, 0x2bdab: 0x6d62bc20, + 0x2bdac: 0x6d62be20, 0x2bdad: 0x6d62c020, 0x2bdae: 0x6d62c220, 0x2bdaf: 0x6d62c420, + 0x2bdb0: 0x6d62c620, 0x2bdb1: 0x6d62c820, 0x2bdb2: 0x6d62ca20, 0x2bdb3: 0x6d62cc20, + 0x2bdb4: 0x6d62ce20, 0x2bdb5: 0x6d8ca220, 0x2bdb6: 0x6d8ca420, 0x2bdb7: 0x6d8ca620, + 0x2bdb8: 0x6d8ca820, 0x2bdb9: 0x6d8caa20, 0x2bdba: 0x6d8cac20, 0x2bdbb: 0x6d8cae20, + 0x2bdbc: 0x6d8cb020, 0x2bdbd: 0x6d8cb220, 0x2bdbe: 0x6db0d620, 0x2bdbf: 0x6db0d820, + // Block 0xaf7, offset 0x2bdc0 + 0x2bdc0: 0x6db0da20, 0x2bdc1: 0x6db0dc20, 0x2bdc2: 0x6dd05e20, 0x2bdc3: 0x6dd06020, + 0x2bdc4: 0x6dd06220, 0x2bdc5: 0x6dd06420, 0x2bdc6: 0x6dea2020, 0x2bdc7: 0x6dea2220, + 0x2bdc8: 0x6dea2420, 0x2bdc9: 0x6dffe020, 0x2bdca: 0x6dffe220, 0x2bdcb: 0x6e124020, + 0x2bdcc: 0x6e124220, 0x2bdcd: 0x6e124420, 0x2bdce: 0x6e124620, 0x2bdcf: 0x6e206820, + 0x2bdd0: 0x6cabdc20, 0x2bdd1: 0x6dd0b020, 0x2bdd2: 0x6c5e4020, 0x2bdd3: 0x6d08fc20, + 0x2bdd4: 0x6c82fa20, 0x2bdd5: 0x6cabf220, 0x2bdd6: 0x6d370020, 0x2bdd7: 0x6d637020, + 0x2bdd8: 0x6d8d7420, 0x2bdd9: 0x6c831020, 0x2bdda: 0x6c831220, 0x2bddb: 0x6cac0420, + 0x2bddc: 0x6d638620, 0x2bddd: 0x6d372e20, 0x2bdde: 0x6d8d9620, 0x2bddf: 0x6e126a20, + 0x2bde0: 0x6c3f3420, 0x2bde1: 0x6c5e5a20, 0x2bde2: 0x6c5e5c20, 0x2bde3: 0x6c5e5e20, + 0x2bde4: 0x6c832820, 0x2bde5: 0x6c832a20, 0x2bde6: 0x6cac1020, 0x2bde7: 0x6cac1220, + 0x2bde8: 0x6cac1420, 0x2bde9: 0x6cac1620, 0x2bdea: 0x6cdac020, 0x2bdeb: 0x6cdac220, + 0x2bdec: 0x6cdac420, 0x2bded: 0x6cdac620, 0x2bdee: 0x6cdac820, 0x2bdef: 0x6d091e20, + 0x2bdf0: 0x6d092020, 0x2bdf1: 0x6d373220, 0x2bdf2: 0x6d373420, 0x2bdf3: 0x6d373620, + 0x2bdf4: 0x6d373820, 0x2bdf5: 0x6d373a20, 0x2bdf6: 0x6d373c20, 0x2bdf7: 0x6d373e20, + 0x2bdf8: 0x6d374020, 0x2bdf9: 0x6d639c20, 0x2bdfa: 0x6d639e20, 0x2bdfb: 0x6d63a020, + 0x2bdfc: 0x6d8d9820, 0x2bdfd: 0x6d8d9a20, 0x2bdfe: 0x6d8d9c20, 0x2bdff: 0x6db18e20, + // Block 0xaf8, offset 0x2be00 + 0x2be00: 0x6db19020, 0x2be01: 0x6db19220, 0x2be02: 0x6db19420, 0x2be03: 0x6db19620, + 0x2be04: 0x6db19820, 0x2be05: 0x6db19a20, 0x2be06: 0x6dd0dc20, 0x2be07: 0x6dd0de20, + 0x2be08: 0x6dd0e020, 0x2be09: 0x6e003420, 0x2be0a: 0x6c5e7a20, 0x2be0b: 0x6cac4c20, + 0x2be0c: 0x6d8dca20, 0x2be0d: 0x6d8dcc20, 0x2be0e: 0x6dd11820, 0x2be0f: 0x6dd11a20, + 0x2be10: 0x6e209c20, 0x2be11: 0x6c149c20, 0x2be12: 0x6c3f4620, 0x2be13: 0x6c3f4820, + 0x2be14: 0x6c3f4a20, 0x2be15: 0x6c5e7e20, 0x2be16: 0x6c5e8020, 0x2be17: 0x6c5e8220, + 0x2be18: 0x6c5e8420, 0x2be19: 0x6c5e8620, 0x2be1a: 0x6c836020, 0x2be1b: 0x6c836220, + 0x2be1c: 0x6c836420, 0x2be1d: 0x6c836620, 0x2be1e: 0x6c836820, 0x2be1f: 0x6c836a20, + 0x2be20: 0x6c836c20, 0x2be21: 0x6c836e20, 0x2be22: 0x6c837020, 0x2be23: 0x6c837220, + 0x2be24: 0x6c837420, 0x2be25: 0x6c837620, 0x2be26: 0x6cac5c20, 0x2be27: 0x6cac5e20, + 0x2be28: 0x6cac6020, 0x2be29: 0x6cac6220, 0x2be2a: 0x6cac6420, 0x2be2b: 0x6cac6620, + 0x2be2c: 0x6cac6820, 0x2be2d: 0x6cac6a20, 0x2be2e: 0x6cac6c20, 0x2be2f: 0x6cac6e20, + 0x2be30: 0x6cdaf220, 0x2be31: 0x6cdaf420, 0x2be32: 0x6cdaf620, 0x2be33: 0x6cdaf820, + 0x2be34: 0x6cdafa20, 0x2be35: 0x6cdafc20, 0x2be36: 0x6cdafe20, 0x2be37: 0x6cdb0020, + 0x2be38: 0x6cdb0220, 0x2be39: 0x6cdb0420, 0x2be3a: 0x6cdb0620, 0x2be3b: 0x6cdb0820, + 0x2be3c: 0x6cdb0a20, 0x2be3d: 0x6cdb0c20, 0x2be3e: 0x6cdb0e20, 0x2be3f: 0x6cdb1020, + // Block 0xaf9, offset 0x2be40 + 0x2be40: 0x6cdb1220, 0x2be41: 0x6cdb1420, 0x2be42: 0x6d095a20, 0x2be43: 0x6d095c20, + 0x2be44: 0x6d095e20, 0x2be45: 0x6d096020, 0x2be46: 0x6d096220, 0x2be47: 0x6d096420, + 0x2be48: 0x6d096620, 0x2be49: 0x6d096820, 0x2be4a: 0x6d096a20, 0x2be4b: 0x6d096c20, + 0x2be4c: 0x6d096e20, 0x2be4d: 0x6d097020, 0x2be4e: 0x6d097220, 0x2be4f: 0x6d097420, + 0x2be50: 0x6d097620, 0x2be51: 0x6d097820, 0x2be52: 0x6d097a20, 0x2be53: 0x6d097c20, + 0x2be54: 0x6d097e20, 0x2be55: 0x6d378020, 0x2be56: 0x6d098020, 0x2be57: 0x6d378220, + 0x2be58: 0x6d378420, 0x2be59: 0x6d378620, 0x2be5a: 0x6d378820, 0x2be5b: 0x6d378a20, + 0x2be5c: 0x6d378c20, 0x2be5d: 0x6d378e20, 0x2be5e: 0x6d379020, 0x2be5f: 0x6d379220, + 0x2be60: 0x6d379420, 0x2be61: 0x6d379620, 0x2be62: 0x6d379820, 0x2be63: 0x6d379a20, + 0x2be64: 0x6d379c20, 0x2be65: 0x6d379e20, 0x2be66: 0x6d37a020, 0x2be67: 0x6d37a220, + 0x2be68: 0x6d37a420, 0x2be69: 0x6d37a620, 0x2be6a: 0x6d37a820, 0x2be6b: 0x6d37aa20, + 0x2be6c: 0x6d37ac20, 0x2be6d: 0x6d37ae20, 0x2be6e: 0x6d63f220, 0x2be6f: 0x6d63f420, + 0x2be70: 0x6d63f620, 0x2be71: 0x6d63f820, 0x2be72: 0x6d63fa20, 0x2be73: 0x6d63fc20, + 0x2be74: 0x6d63fe20, 0x2be75: 0x6d640020, 0x2be76: 0x6d640220, 0x2be77: 0x6d640420, + 0x2be78: 0x6d640620, 0x2be79: 0x6d640820, 0x2be7a: 0x6d640a20, 0x2be7b: 0x6d640c20, + 0x2be7c: 0x6d8dda20, 0x2be7d: 0x6d8ddc20, 0x2be7e: 0x6d8dde20, 0x2be7f: 0x6d8de020, + // Block 0xafa, offset 0x2be80 + 0x2be80: 0x6d8de220, 0x2be81: 0x6d8de420, 0x2be82: 0x6d8de620, 0x2be83: 0x6d8de820, + 0x2be84: 0x6d8dea20, 0x2be85: 0x6d8dec20, 0x2be86: 0x6d8dee20, 0x2be87: 0x6d8df020, + 0x2be88: 0x6d8df220, 0x2be89: 0x6d8df420, 0x2be8a: 0x6d8df620, 0x2be8b: 0x6d8df820, + 0x2be8c: 0x6d8dfa20, 0x2be8d: 0x6d8dfc20, 0x2be8e: 0x6db1c020, 0x2be8f: 0x6db1c220, + 0x2be90: 0x6db1c420, 0x2be91: 0x6db1c620, 0x2be92: 0x6db1c820, 0x2be93: 0x6db1ca20, + 0x2be94: 0x6db1cc20, 0x2be95: 0x6db1ce20, 0x2be96: 0x6db1d020, 0x2be97: 0x6db1d220, + 0x2be98: 0x6db1d420, 0x2be99: 0x6db1d620, 0x2be9a: 0x6db1d820, 0x2be9b: 0x6db1da20, + 0x2be9c: 0x6db1dc20, 0x2be9d: 0x6db1de20, 0x2be9e: 0x6db1e020, 0x2be9f: 0x6db1e220, + 0x2bea0: 0x6db1e420, 0x2bea1: 0x6db1e620, 0x2bea2: 0x6db1e820, 0x2bea3: 0x6db1ea20, + 0x2bea4: 0x6db1ec20, 0x2bea5: 0x6db1ee20, 0x2bea6: 0x6db1f020, 0x2bea7: 0x6db1f220, + 0x2bea8: 0x6db1f420, 0x2bea9: 0x6db1f620, 0x2beaa: 0x6db1f820, 0x2beab: 0x6db1fa20, + 0x2beac: 0x6db1fc20, 0x2bead: 0x6dd11c20, 0x2beae: 0x6dd11e20, 0x2beaf: 0x6dd12020, + 0x2beb0: 0x6dd12220, 0x2beb1: 0x6dd12420, 0x2beb2: 0x6dd12620, 0x2beb3: 0x6dd12820, + 0x2beb4: 0x6dd12a20, 0x2beb5: 0x6dd12c20, 0x2beb6: 0x6dd12e20, 0x2beb7: 0x6dd13020, + 0x2beb8: 0x6dd13220, 0x2beb9: 0x6dd13420, 0x2beba: 0x6dd13620, 0x2bebb: 0x6dd13820, + 0x2bebc: 0x6dd13a20, 0x2bebd: 0x6dd13c20, 0x2bebe: 0x6dd13e20, 0x2bebf: 0x6dd14020, + // Block 0xafb, offset 0x2bec0 + 0x2bec0: 0x6dd14220, 0x2bec1: 0x6dd14420, 0x2bec2: 0x6dd14620, 0x2bec3: 0x6dd14820, + 0x2bec4: 0x6dd14a20, 0x2bec5: 0x6deaa420, 0x2bec6: 0x6deaa620, 0x2bec7: 0x6deaa820, + 0x2bec8: 0x6deaaa20, 0x2bec9: 0x6deaac20, 0x2beca: 0x6deaae20, 0x2becb: 0x6deab020, + 0x2becc: 0x6deab220, 0x2becd: 0x6deab420, 0x2bece: 0x6deab620, 0x2becf: 0x6deab820, + 0x2bed0: 0x6deaba20, 0x2bed1: 0x6deabc20, 0x2bed2: 0x6e005220, 0x2bed3: 0x6e005420, + 0x2bed4: 0x6e005620, 0x2bed5: 0x6e005820, 0x2bed6: 0x6e005a20, 0x2bed7: 0x6e005c20, + 0x2bed8: 0x6e005e20, 0x2bed9: 0x6e006020, 0x2beda: 0x6e006220, 0x2bedb: 0x6e006420, + 0x2bedc: 0x6e006620, 0x2bedd: 0x6e006820, 0x2bede: 0x6e127a20, 0x2bedf: 0x6e127c20, + 0x2bee0: 0x6e127e20, 0x2bee1: 0x6e128020, 0x2bee2: 0x6e128220, 0x2bee3: 0x6e128420, + 0x2bee4: 0x6e128620, 0x2bee5: 0x6e128820, 0x2bee6: 0x6e209e20, 0x2bee7: 0x6e20a020, + 0x2bee8: 0x6e20a220, 0x2bee9: 0x6e20a420, 0x2beea: 0x6e20a620, 0x2beeb: 0x6e20a820, + 0x2beec: 0x6e20aa20, 0x2beed: 0x6e20ac20, 0x2beee: 0x6e20ae20, 0x2beef: 0x6e20b020, + 0x2bef0: 0x6e20b220, 0x2bef1: 0x6e20b420, 0x2bef2: 0x6e20b620, 0x2bef3: 0x6e2b7420, + 0x2bef4: 0x6e2b7620, 0x2bef5: 0x6e2b7820, 0x2bef6: 0x6e2b7a20, 0x2bef7: 0x6e2b7c20, + 0x2bef8: 0x6e33e620, 0x2bef9: 0x6e33e820, 0x2befa: 0x6e33ea20, 0x2befb: 0x6e39c420, + 0x2befc: 0x6e39c620, 0x2befd: 0x6e39c820, 0x2befe: 0x6e3df220, 0x2beff: 0x6e40c820, + // Block 0xafc, offset 0x2bf00 + 0x2bf00: 0x6e40ca20, 0x2bf01: 0x6e42ee20, 0x2bf02: 0x6e446020, 0x2bf03: 0x6e446220, + 0x2bf04: 0x6e446420, 0x2bf05: 0x6e454820, 0x2bf06: 0x6e454a20, 0x2bf07: 0x6e46ce20, + 0x2bf08: 0x6c400e20, 0x2bf09: 0x6c5f9420, 0x2bf0a: 0x6c84c620, 0x2bf0b: 0x6c84c820, + 0x2bf0c: 0x6c84ca20, 0x2bf0d: 0x6c84cc20, 0x2bf0e: 0x6cae2220, 0x2bf0f: 0x6cae2420, + 0x2bf10: 0x6cdd4820, 0x2bf11: 0x6cdd4a20, 0x2bf12: 0x6d0bc220, 0x2bf13: 0x6d0bc420, + 0x2bf14: 0x6d0bc620, 0x2bf15: 0x6d0bc820, 0x2bf16: 0x6d0bca20, 0x2bf17: 0x6d65f420, + 0x2bf18: 0x6d8fc820, 0x2bf19: 0x6db39820, 0x2bf1a: 0x6dd29620, 0x2bf1b: 0x6dd29820, + 0x2bf1c: 0x6debd220, 0x2bf1d: 0x6c268820, 0x2bf1e: 0x6c5fa220, 0x2bf1f: 0x6c5fa420, + 0x2bf20: 0x6c5fa620, 0x2bf21: 0x6c84de20, 0x2bf22: 0x6c84e020, 0x2bf23: 0x6c84e220, + 0x2bf24: 0x6cae4e20, 0x2bf25: 0x6cae5020, 0x2bf26: 0x6cae5220, 0x2bf27: 0x6cae5420, + 0x2bf28: 0x6cae5620, 0x2bf29: 0x6cae5820, 0x2bf2a: 0x6cae5a20, 0x2bf2b: 0x6cae5c20, + 0x2bf2c: 0x6cae5e20, 0x2bf2d: 0x6cdd6620, 0x2bf2e: 0x6cdd6820, 0x2bf2f: 0x6cdd6a20, + 0x2bf30: 0x6cdd6c20, 0x2bf31: 0x6cdd6e20, 0x2bf32: 0x6cdd7020, 0x2bf33: 0x6cdd7220, + 0x2bf34: 0x6cdd7420, 0x2bf35: 0x6cdd7620, 0x2bf36: 0x6d0bde20, 0x2bf37: 0x6d0be020, + 0x2bf38: 0x6d0be220, 0x2bf39: 0x6d0be420, 0x2bf3a: 0x6d0be620, 0x2bf3b: 0x6d0be820, + 0x2bf3c: 0x6d0bea20, 0x2bf3d: 0x6d0bec20, 0x2bf3e: 0x6d0bee20, 0x2bf3f: 0x6d39e220, + // Block 0xafd, offset 0x2bf40 + 0x2bf40: 0x6d39e420, 0x2bf41: 0x6d39e620, 0x2bf42: 0x6d39e820, 0x2bf43: 0x6d39ea20, + 0x2bf44: 0x6d39ec20, 0x2bf45: 0x6d39ee20, 0x2bf46: 0x6d39f020, 0x2bf47: 0x6d39f220, + 0x2bf48: 0x6d39f420, 0x2bf49: 0x6d39f620, 0x2bf4a: 0x6d39f820, 0x2bf4b: 0x6d661220, + 0x2bf4c: 0x6d661420, 0x2bf4d: 0x6d661620, 0x2bf4e: 0x6d661820, 0x2bf4f: 0x6d661a20, + 0x2bf50: 0x6d661c20, 0x2bf51: 0x6d661e20, 0x2bf52: 0x6d662020, 0x2bf53: 0x6d662220, + 0x2bf54: 0x6d662420, 0x2bf55: 0x6d39fa20, 0x2bf56: 0x6d662620, 0x2bf57: 0x6d8ffa20, + 0x2bf58: 0x6d8ffc20, 0x2bf59: 0x6d8ffe20, 0x2bf5a: 0x6d900020, 0x2bf5b: 0x6d900220, + 0x2bf5c: 0x6d900420, 0x2bf5d: 0x6d900620, 0x2bf5e: 0x6d900820, 0x2bf5f: 0x6db3b420, + 0x2bf60: 0x6db3b620, 0x2bf61: 0x6db3b820, 0x2bf62: 0x6db3ba20, 0x2bf63: 0x6db3bc20, + 0x2bf64: 0x6db3be20, 0x2bf65: 0x6db3c020, 0x2bf66: 0x6db3c220, 0x2bf67: 0x6db3c420, + 0x2bf68: 0x6db3c620, 0x2bf69: 0x6db3c820, 0x2bf6a: 0x6db3ca20, 0x2bf6b: 0x6db3cc20, + 0x2bf6c: 0x6db3ce20, 0x2bf6d: 0x6db3d020, 0x2bf6e: 0x6db3d220, 0x2bf6f: 0x6dd2b020, + 0x2bf70: 0x6dd2b220, 0x2bf71: 0x6dd2b420, 0x2bf72: 0x6dd2b620, 0x2bf73: 0x6dd2b820, + 0x2bf74: 0x6debe620, 0x2bf75: 0x6debe820, 0x2bf76: 0x6debea20, 0x2bf77: 0x6debec20, + 0x2bf78: 0x6debee20, 0x2bf79: 0x6debf020, 0x2bf7a: 0x6debf220, 0x2bf7b: 0x6debf420, + 0x2bf7c: 0x6e016420, 0x2bf7d: 0x6e016620, 0x2bf7e: 0x6e016820, 0x2bf7f: 0x6e016a20, + // Block 0xafe, offset 0x2bf80 + 0x2bf80: 0x6e016c20, 0x2bf81: 0x6e016e20, 0x2bf82: 0x6e135020, 0x2bf83: 0x6e135220, + 0x2bf84: 0x6e135420, 0x2bf85: 0x6e212220, 0x2bf86: 0x6e212420, 0x2bf87: 0x6e212620, + 0x2bf88: 0x6e212820, 0x2bf89: 0x6e212a20, 0x2bf8a: 0x6e2bdc20, 0x2bf8b: 0x6e2bde20, + 0x2bf8c: 0x6e2be020, 0x2bf8d: 0x6e39ea20, 0x2bf8e: 0x6e42fc20, 0x2bf8f: 0x6c5ff620, + 0x2bf90: 0x6c858220, 0x2bf91: 0x6caf1a20, 0x2bf92: 0x6d0cbc20, 0x2bf93: 0x6d3b1020, + 0x2bf94: 0x6d673a20, 0x2bf95: 0x6c859420, 0x2bf96: 0x6cde5020, 0x2bf97: 0x6d912020, + 0x2bf98: 0x6d912220, 0x2bf99: 0x6e01e020, 0x2bf9a: 0x6c404420, 0x2bf9b: 0x6c404620, + 0x2bf9c: 0x6c600c20, 0x2bf9d: 0x6c600e20, 0x2bf9e: 0x6c601020, 0x2bf9f: 0x6c85a020, + 0x2bfa0: 0x6c85a220, 0x2bfa1: 0x6c85a420, 0x2bfa2: 0x6caf3420, 0x2bfa3: 0x6caf3620, + 0x2bfa4: 0x6caf3820, 0x2bfa5: 0x6caf3a20, 0x2bfa6: 0x6caf3c20, 0x2bfa7: 0x6caf3e20, + 0x2bfa8: 0x6cde6a20, 0x2bfa9: 0x6cde6c20, 0x2bfaa: 0x6cde6e20, 0x2bfab: 0x6cde7020, + 0x2bfac: 0x6cde7220, 0x2bfad: 0x6cde7420, 0x2bfae: 0x6cde7620, 0x2bfaf: 0x6d0cd820, + 0x2bfb0: 0x6d0cda20, 0x2bfb1: 0x6d0cdc20, 0x2bfb2: 0x6d0cde20, 0x2bfb3: 0x6d3b2820, + 0x2bfb4: 0x6d3b2a20, 0x2bfb5: 0x6d3b2c20, 0x2bfb6: 0x6d3b2e20, 0x2bfb7: 0x6d3b3020, + 0x2bfb8: 0x6d3b3220, 0x2bfb9: 0x6d3b3420, 0x2bfba: 0x6d3b3620, 0x2bfbb: 0x6d3b3820, + 0x2bfbc: 0x6d3b3a20, 0x2bfbd: 0x6d3b3c20, 0x2bfbe: 0x6d3b3e20, 0x2bfbf: 0x6d3b4020, + // Block 0xaff, offset 0x2bfc0 + 0x2bfc0: 0x6d3b4220, 0x2bfc1: 0x6d3b4420, 0x2bfc2: 0x6d3b4620, 0x2bfc3: 0x6d675820, + 0x2bfc4: 0x6d675a20, 0x2bfc5: 0x6d675c20, 0x2bfc6: 0x6d675e20, 0x2bfc7: 0x6d676020, + 0x2bfc8: 0x6d676220, 0x2bfc9: 0x6d676420, 0x2bfca: 0x6d676620, 0x2bfcb: 0x6d676820, + 0x2bfcc: 0x6d676a20, 0x2bfcd: 0x6d676c20, 0x2bfce: 0x6d913020, 0x2bfcf: 0x6d913220, + 0x2bfd0: 0x6d913420, 0x2bfd1: 0x6d913620, 0x2bfd2: 0x6d913820, 0x2bfd3: 0x6d913a20, + 0x2bfd4: 0x6db4da20, 0x2bfd5: 0x6db4dc20, 0x2bfd6: 0x6db4de20, 0x2bfd7: 0x6db4e020, + 0x2bfd8: 0x6db4e220, 0x2bfd9: 0x6db4e420, 0x2bfda: 0x6db4e620, 0x2bfdb: 0x6db4e820, + 0x2bfdc: 0x6db4ea20, 0x2bfdd: 0x6db4ec20, 0x2bfde: 0x6dd3aa20, 0x2bfdf: 0x6dd3ac20, + 0x2bfe0: 0x6dd3ae20, 0x2bfe1: 0x6dd3b020, 0x2bfe2: 0x6dd3b220, 0x2bfe3: 0x6dd3b420, + 0x2bfe4: 0x6decac20, 0x2bfe5: 0x6decae20, 0x2bfe6: 0x6e01e420, 0x2bfe7: 0x6e01e620, + 0x2bfe8: 0x6e01e820, 0x2bfe9: 0x6e01ea20, 0x2bfea: 0x6e13d020, 0x2bfeb: 0x6e218c20, + 0x2bfec: 0x6e2c2220, 0x2bfed: 0x6e2c2420, 0x2bfee: 0x6e346020, 0x2bfef: 0x6e346220, + 0x2bff0: 0x6e3a0a20, 0x2bff1: 0x6e40fe20, 0x2bff2: 0x6c606420, 0x2bff3: 0x6c862220, + 0x2bff4: 0x6cafe220, 0x2bff5: 0x6cdefa20, 0x2bff6: 0x6cdefc20, 0x2bff7: 0x6c862a20, + 0x2bff8: 0x6c862c20, 0x2bff9: 0x6cafee20, 0x2bffa: 0x6caff020, 0x2bffb: 0x6caff220, + 0x2bffc: 0x6cdf0a20, 0x2bffd: 0x6cdf0c20, 0x2bffe: 0x6cdf0e20, 0x2bfff: 0x6cdf1020, + // Block 0xb00, offset 0x2c000 + 0x2c000: 0x6d0d7c20, 0x2c001: 0x6d0d7e20, 0x2c002: 0x6d3bec20, 0x2c003: 0x6d3bee20, + 0x2c004: 0x6d67f820, 0x2c005: 0x6d67fa20, 0x2c006: 0x6d91c220, 0x2c007: 0x6d91c420, + 0x2c008: 0x6d91c620, 0x2c009: 0x6d91c820, 0x2c00a: 0x6db58020, 0x2c00b: 0x6db58220, + 0x2c00c: 0x6db58420, 0x2c00d: 0x6dd41420, 0x2c00e: 0x6dd41620, 0x2c00f: 0x6ded0420, + 0x2c010: 0x6ded0620, 0x2c011: 0x6ded0820, 0x2c012: 0x6ded0a20, 0x2c013: 0x6ded0c20, + 0x2c014: 0x6e13fc20, 0x2c015: 0x6e3e2e20, 0x2c016: 0x6e45d820, 0x2c017: 0x6cb01e20, + 0x2c018: 0x6d0db020, 0x2c019: 0x6d0db220, 0x2c01a: 0x6d0db420, 0x2c01b: 0x6d3c2020, + 0x2c01c: 0x6d683a20, 0x2c01d: 0x6d683c20, 0x2c01e: 0x6d683e20, 0x2c01f: 0x6d684020, + 0x2c020: 0x6d684220, 0x2c021: 0x6d920220, 0x2c022: 0x6d920420, 0x2c023: 0x6d920620, + 0x2c024: 0x6d920820, 0x2c025: 0x6db5a820, 0x2c026: 0x6db5aa20, 0x2c027: 0x6dd43620, + 0x2c028: 0x6ded2420, 0x2c029: 0x6ded2620, 0x2c02a: 0x6e022e20, 0x2c02b: 0x6e023020, + 0x2c02c: 0x6ded2820, 0x2c02d: 0x6e3a3620, 0x2c02e: 0x6c608620, 0x2c02f: 0x6c608820, + 0x2c030: 0x6c608a20, 0x2c031: 0x6c864a20, 0x2c032: 0x6c864c20, 0x2c033: 0x6cb05620, + 0x2c034: 0x6cb05820, 0x2c035: 0x6cb05a20, 0x2c036: 0x6cb05c20, 0x2c037: 0x6cb05e20, + 0x2c038: 0x6cb06020, 0x2c039: 0x6cb06220, 0x2c03a: 0x6cb06420, 0x2c03b: 0x6cb06620, + 0x2c03c: 0x6cb06820, 0x2c03d: 0x6cb06a20, 0x2c03e: 0x6cb06c20, 0x2c03f: 0x6cb06e20, + // Block 0xb01, offset 0x2c040 + 0x2c040: 0x6cb07020, 0x2c041: 0x6cb07220, 0x2c042: 0x6cb07420, 0x2c043: 0x6cb07620, + 0x2c044: 0x6cdf6020, 0x2c045: 0x6cdf6220, 0x2c046: 0x6cdf6420, 0x2c047: 0x6cdf6620, + 0x2c048: 0x6cdf6820, 0x2c049: 0x6cdf6a20, 0x2c04a: 0x6cdf6c20, 0x2c04b: 0x6cdf6e20, + 0x2c04c: 0x6cdf7020, 0x2c04d: 0x6cdf7220, 0x2c04e: 0x6cdf7420, 0x2c04f: 0x6cdf7620, + 0x2c050: 0x6cdf7820, 0x2c051: 0x6cdf7a20, 0x2c052: 0x6cdf7c20, 0x2c053: 0x6cdf7e20, + 0x2c054: 0x6d0de020, 0x2c055: 0x6d0de220, 0x2c056: 0x6d0de420, 0x2c057: 0x6d0de620, + 0x2c058: 0x6d0de820, 0x2c059: 0x6d0dea20, 0x2c05a: 0x6d0dec20, 0x2c05b: 0x6d0dee20, + 0x2c05c: 0x6d0df020, 0x2c05d: 0x6d3c4220, 0x2c05e: 0x6d3c4420, 0x2c05f: 0x6d3c4620, + 0x2c060: 0x6d3c4820, 0x2c061: 0x6d3c4a20, 0x2c062: 0x6d3c4c20, 0x2c063: 0x6d3c4e20, + 0x2c064: 0x6d3c5020, 0x2c065: 0x6d3c5220, 0x2c066: 0x6d3c5420, 0x2c067: 0x6d3c5620, + 0x2c068: 0x6d3c5820, 0x2c069: 0x6d687e20, 0x2c06a: 0x6d688020, 0x2c06b: 0x6d688220, + 0x2c06c: 0x6d688420, 0x2c06d: 0x6d688620, 0x2c06e: 0x6d688820, 0x2c06f: 0x6d688a20, + 0x2c070: 0x6d688c20, 0x2c071: 0x6d688e20, 0x2c072: 0x6d689020, 0x2c073: 0x6d689220, + 0x2c074: 0x6d689420, 0x2c075: 0x6d689620, 0x2c076: 0x6d689820, 0x2c077: 0x6d689a20, + 0x2c078: 0x6d689c20, 0x2c079: 0x6d923220, 0x2c07a: 0x6d923420, 0x2c07b: 0x6d923620, + 0x2c07c: 0x6d923820, 0x2c07d: 0x6d923a20, 0x2c07e: 0x6db5d620, 0x2c07f: 0x6db5d820, + // Block 0xb02, offset 0x2c080 + 0x2c080: 0x6db5da20, 0x2c081: 0x6db5dc20, 0x2c082: 0x6db5de20, 0x2c083: 0x6dd45220, + 0x2c084: 0x6dd45420, 0x2c085: 0x6dd45620, 0x2c086: 0x6dd45820, 0x2c087: 0x6dd45a20, + 0x2c088: 0x6dd45c20, 0x2c089: 0x6dd45e20, 0x2c08a: 0x6dd46020, 0x2c08b: 0x6ded4220, + 0x2c08c: 0x6ded4420, 0x2c08d: 0x6ded4620, 0x2c08e: 0x6ded4820, 0x2c08f: 0x6ded4a20, + 0x2c090: 0x6ded4c20, 0x2c091: 0x6ded4e20, 0x2c092: 0x6e024020, 0x2c093: 0x6e024220, + 0x2c094: 0x6e024420, 0x2c095: 0x6e024620, 0x2c096: 0x6e024820, 0x2c097: 0x6e024a20, + 0x2c098: 0x6e024c20, 0x2c099: 0x6e141620, 0x2c09a: 0x6e141820, 0x2c09b: 0x6e141a20, + 0x2c09c: 0x6e141c20, 0x2c09d: 0x6e141e20, 0x2c09e: 0x6e142020, 0x2c09f: 0x6e21c220, + 0x2c0a0: 0x6e21c420, 0x2c0a1: 0x6e21c620, 0x2c0a2: 0x6e2c4420, 0x2c0a3: 0x6cb10a20, + 0x2c0a4: 0x6d0eb220, 0x2c0a5: 0x6d697a20, 0x2c0a6: 0x6db69820, 0x2c0a7: 0x6db69a20, + 0x2c0a8: 0x6dd4fc20, 0x2c0a9: 0x6e2c7620, 0x2c0aa: 0x6c60be20, 0x2c0ab: 0x6c86c420, + 0x2c0ac: 0x6ce04820, 0x2c0ad: 0x6ce04a20, 0x2c0ae: 0x6d3d1620, 0x2c0af: 0x6d698420, + 0x2c0b0: 0x6db69e20, 0x2c0b1: 0x6dd4fe20, 0x2c0b2: 0x6e221620, 0x2c0b3: 0x6c40b620, + 0x2c0b4: 0x6cb15020, 0x2c0b5: 0x6ce05020, 0x2c0b6: 0x6d0eca20, 0x2c0b7: 0x6d3d1e20, + 0x2c0b8: 0x6d3d2020, 0x2c0b9: 0x6d3d2220, 0x2c0ba: 0x6d699620, 0x2c0bb: 0x6d930c20, + 0x2c0bc: 0x6d930e20, 0x2c0bd: 0x6d931020, 0x2c0be: 0x6d931220, 0x2c0bf: 0x6d931420, + // Block 0xb03, offset 0x2c0c0 + 0x2c0c0: 0x6db6ae20, 0x2c0c1: 0x6db6b020, 0x2c0c2: 0x6db6b220, 0x2c0c3: 0x6e147020, + 0x2c0c4: 0x6e3a5420, 0x2c0c5: 0x6c86d820, 0x2c0c6: 0x6cb15820, 0x2c0c7: 0x6cb15a20, + 0x2c0c8: 0x6ce05c20, 0x2c0c9: 0x6d0ed620, 0x2c0ca: 0x6d69b420, 0x2c0cb: 0x6d69b620, + 0x2c0cc: 0x6d69b820, 0x2c0cd: 0x6d932020, 0x2c0ce: 0x6d932220, 0x2c0cf: 0x6dd51420, + 0x2c0d0: 0x6dee0620, 0x2c0d1: 0x6dee0820, 0x2c0d2: 0x6e147620, 0x2c0d3: 0x6e222220, + 0x2c0d4: 0x6e3a5c20, 0x2c0d5: 0x6e3a5e20, 0x2c0d6: 0x6cb17820, 0x2c0d7: 0x6cb17a20, + 0x2c0d8: 0x6cb17c20, 0x2c0d9: 0x6cb17e20, 0x2c0da: 0x6ce07a20, 0x2c0db: 0x6ce07c20, + 0x2c0dc: 0x6d3d4e20, 0x2c0dd: 0x6d69dc20, 0x2c0de: 0x6d69de20, 0x2c0df: 0x6d934020, + 0x2c0e0: 0x6db6e220, 0x2c0e1: 0x6dd52820, 0x2c0e2: 0x6dd52a20, 0x2c0e3: 0x6dee1820, + 0x2c0e4: 0x6dee1a20, 0x2c0e5: 0x6dee1c20, 0x2c0e6: 0x6dee1e20, 0x2c0e7: 0x6cb19420, + 0x2c0e8: 0x6cb19620, 0x2c0e9: 0x6ce0ae20, 0x2c0ea: 0x6ce0b020, 0x2c0eb: 0x6ce0b220, + 0x2c0ec: 0x6ce0b420, 0x2c0ed: 0x6ce0b620, 0x2c0ee: 0x6ce0b820, 0x2c0ef: 0x6ce0ba20, + 0x2c0f0: 0x6d0f2820, 0x2c0f1: 0x6d0f2a20, 0x2c0f2: 0x6d0f2c20, 0x2c0f3: 0x6d3d7620, + 0x2c0f4: 0x6d3d7820, 0x2c0f5: 0x6d3d7a20, 0x2c0f6: 0x6d6a0020, 0x2c0f7: 0x6d6a0220, + 0x2c0f8: 0x6d6a0420, 0x2c0f9: 0x6d6a0620, 0x2c0fa: 0x6d6a0820, 0x2c0fb: 0x6d6a0a20, + 0x2c0fc: 0x6d6a0c20, 0x2c0fd: 0x6d6a0e20, 0x2c0fe: 0x6d6a1020, 0x2c0ff: 0x6d6a1220, + // Block 0xb04, offset 0x2c100 + 0x2c100: 0x6d936820, 0x2c101: 0x6d936a20, 0x2c102: 0x6d936c20, 0x2c103: 0x6d936e20, + 0x2c104: 0x6d937020, 0x2c105: 0x6db70420, 0x2c106: 0x6db70620, 0x2c107: 0x6dd54620, + 0x2c108: 0x6dee3620, 0x2c109: 0x6e02e220, 0x2c10a: 0x6e223020, 0x2c10b: 0x6e2c8a20, + 0x2c10c: 0x6d0f9020, 0x2c10d: 0x6d6a6e20, 0x2c10e: 0x6d6a7020, 0x2c10f: 0x6d93be20, + 0x2c110: 0x6d93c020, 0x2c111: 0x6c872620, 0x2c112: 0x6d0f9820, 0x2c113: 0x6d3dca20, + 0x2c114: 0x6d3dcc20, 0x2c115: 0x6e14a620, 0x2c116: 0x6c872820, 0x2c117: 0x6c872a20, + 0x2c118: 0x6c872c20, 0x2c119: 0x6cb1f220, 0x2c11a: 0x6cb1f420, 0x2c11b: 0x6cb1f620, + 0x2c11c: 0x6cb1f820, 0x2c11d: 0x6ce13e20, 0x2c11e: 0x6ce14020, 0x2c11f: 0x6ce14220, + 0x2c120: 0x6ce14420, 0x2c121: 0x6ce14620, 0x2c122: 0x6ce14820, 0x2c123: 0x6ce14a20, + 0x2c124: 0x6ce14c20, 0x2c125: 0x6d0fa820, 0x2c126: 0x6d0faa20, 0x2c127: 0x6d0fac20, + 0x2c128: 0x6d0fae20, 0x2c129: 0x6d0fb020, 0x2c12a: 0x6d0fb220, 0x2c12b: 0x6d3dd820, + 0x2c12c: 0x6d3dda20, 0x2c12d: 0x6d3ddc20, 0x2c12e: 0x6d3dde20, 0x2c12f: 0x6d3de020, + 0x2c130: 0x6d3de220, 0x2c131: 0x6d3de420, 0x2c132: 0x6d3de620, 0x2c133: 0x6d6a8420, + 0x2c134: 0x6d6a8620, 0x2c135: 0x6d6a8820, 0x2c136: 0x6d6a8a20, 0x2c137: 0x6d6a8c20, + 0x2c138: 0x6d6a8e20, 0x2c139: 0x6d93dc20, 0x2c13a: 0x6d93de20, 0x2c13b: 0x6d93e020, + 0x2c13c: 0x6d93e220, 0x2c13d: 0x6db74e20, 0x2c13e: 0x6db75020, 0x2c13f: 0x6db75220, + // Block 0xb05, offset 0x2c140 + 0x2c140: 0x6db75420, 0x2c141: 0x6dd59c20, 0x2c142: 0x6dd59e20, 0x2c143: 0x6dd5a020, + 0x2c144: 0x6dd5a220, 0x2c145: 0x6dd5a420, 0x2c146: 0x6dd5a620, 0x2c147: 0x6dee8620, + 0x2c148: 0x6e030a20, 0x2c149: 0x6e030c20, 0x2c14a: 0x6e030e20, 0x2c14b: 0x6e031020, + 0x2c14c: 0x6e14ae20, 0x2c14d: 0x6e225c20, 0x2c14e: 0x6e225e20, 0x2c14f: 0x6e226020, + 0x2c150: 0x6e2cae20, 0x2c151: 0x6e34ba20, 0x2c152: 0x6e3a6e20, 0x2c153: 0x6c611620, + 0x2c154: 0x6c611820, 0x2c155: 0x6c875020, 0x2c156: 0x6c875220, 0x2c157: 0x6cb23e20, + 0x2c158: 0x6cb24020, 0x2c159: 0x6cb24220, 0x2c15a: 0x6cb24420, 0x2c15b: 0x6cb24620, + 0x2c15c: 0x6cb24820, 0x2c15d: 0x6cb24a20, 0x2c15e: 0x6cb24c20, 0x2c15f: 0x6ce19c20, + 0x2c160: 0x6ce19e20, 0x2c161: 0x6ce1a020, 0x2c162: 0x6ce1a220, 0x2c163: 0x6ce1a420, + 0x2c164: 0x6ce1a620, 0x2c165: 0x6ce1a820, 0x2c166: 0x6ce1aa20, 0x2c167: 0x6ce1ac20, + 0x2c168: 0x6ce1ae20, 0x2c169: 0x6ce1b020, 0x2c16a: 0x6ce1b220, 0x2c16b: 0x6ce1b420, + 0x2c16c: 0x6ce1b620, 0x2c16d: 0x6ce1b820, 0x2c16e: 0x6d100a20, 0x2c16f: 0x6d100c20, + 0x2c170: 0x6d100e20, 0x2c171: 0x6d101020, 0x2c172: 0x6d101220, 0x2c173: 0x6d101420, + 0x2c174: 0x6d3e3a20, 0x2c175: 0x6d3e3c20, 0x2c176: 0x6d3e3e20, 0x2c177: 0x6d3e4020, + 0x2c178: 0x6d3e4220, 0x2c179: 0x6d3e4420, 0x2c17a: 0x6d3e4620, 0x2c17b: 0x6d3e4820, + 0x2c17c: 0x6d6ada20, 0x2c17d: 0x6d3e4a20, 0x2c17e: 0x6d6adc20, 0x2c17f: 0x6d6ade20, + // Block 0xb06, offset 0x2c180 + 0x2c180: 0x6d6ae020, 0x2c181: 0x6d6ae220, 0x2c182: 0x6d6ae420, 0x2c183: 0x6d6ae620, + 0x2c184: 0x6d6ae820, 0x2c185: 0x6d6aea20, 0x2c186: 0x6d6aec20, 0x2c187: 0x6d6aee20, + 0x2c188: 0x6d6af020, 0x2c189: 0x6d6af220, 0x2c18a: 0x6d6af420, 0x2c18b: 0x6d6af620, + 0x2c18c: 0x6d6af820, 0x2c18d: 0x6d943220, 0x2c18e: 0x6d943420, 0x2c18f: 0x6d943620, + 0x2c190: 0x6d943820, 0x2c191: 0x6d943a20, 0x2c192: 0x6d943c20, 0x2c193: 0x6d943e20, + 0x2c194: 0x6d944020, 0x2c195: 0x6d944220, 0x2c196: 0x6d944420, 0x2c197: 0x6db78420, + 0x2c198: 0x6db78620, 0x2c199: 0x6db78820, 0x2c19a: 0x6db78a20, 0x2c19b: 0x6db78c20, + 0x2c19c: 0x6db78e20, 0x2c19d: 0x6db79020, 0x2c19e: 0x6dd5de20, 0x2c19f: 0x6dd5e020, + 0x2c1a0: 0x6dd5e220, 0x2c1a1: 0x6dd5e420, 0x2c1a2: 0x6dd5e620, 0x2c1a3: 0x6deebe20, + 0x2c1a4: 0x6deec020, 0x2c1a5: 0x6deec220, 0x2c1a6: 0x6deec420, 0x2c1a7: 0x6deec620, + 0x2c1a8: 0x6e032c20, 0x2c1a9: 0x6e032e20, 0x2c1aa: 0x6e14c420, 0x2c1ab: 0x6e14c620, + 0x2c1ac: 0x6e227020, 0x2c1ad: 0x6e2cbe20, 0x2c1ae: 0x6e2cc020, 0x2c1af: 0x6e34c020, + 0x2c1b0: 0x6e3a7a20, 0x2c1b1: 0x6e432220, 0x2c1b2: 0x6ce23a20, 0x2c1b3: 0x6ce23c20, + 0x2c1b4: 0x6ce23e20, 0x2c1b5: 0x6ce24020, 0x2c1b6: 0x6ce24220, 0x2c1b7: 0x6d10b020, + 0x2c1b8: 0x6d10b220, 0x2c1b9: 0x6d10b420, 0x2c1ba: 0x6d10b620, 0x2c1bb: 0x6d6b9c20, + 0x2c1bc: 0x6d94e220, 0x2c1bd: 0x6db81620, 0x2c1be: 0x6db81820, 0x2c1bf: 0x6def6a20, + // Block 0xb07, offset 0x2c1c0 + 0x2c1c0: 0x6e039a20, 0x2c1c1: 0x6e2ce820, 0x2c1c2: 0x6c612c20, 0x2c1c3: 0x6c612e20, + 0x2c1c4: 0x6c613020, 0x2c1c5: 0x6c878c20, 0x2c1c6: 0x6cb2d220, 0x2c1c7: 0x6cb2d420, + 0x2c1c8: 0x6cb2d620, 0x2c1c9: 0x6cb2d820, 0x2c1ca: 0x6cb2da20, 0x2c1cb: 0x6cb2dc20, + 0x2c1cc: 0x6cb2de20, 0x2c1cd: 0x6cb2e020, 0x2c1ce: 0x6cb2e220, 0x2c1cf: 0x6ce26420, + 0x2c1d0: 0x6ce26620, 0x2c1d1: 0x6ce26820, 0x2c1d2: 0x6ce26a20, 0x2c1d3: 0x6d10e020, + 0x2c1d4: 0x6d10e220, 0x2c1d5: 0x6d10e420, 0x2c1d6: 0x6d10e620, 0x2c1d7: 0x6d10e820, + 0x2c1d8: 0x6d3f0220, 0x2c1d9: 0x6d3f0420, 0x2c1da: 0x6d3f0620, 0x2c1db: 0x6d3f0820, + 0x2c1dc: 0x6d6bc820, 0x2c1dd: 0x6d6bca20, 0x2c1de: 0x6d6bcc20, 0x2c1df: 0x6d6bce20, + 0x2c1e0: 0x6d94fe20, 0x2c1e1: 0x6d950020, 0x2c1e2: 0x6d950220, 0x2c1e3: 0x6d950420, + 0x2c1e4: 0x6d950620, 0x2c1e5: 0x6db83620, 0x2c1e6: 0x6db83820, 0x2c1e7: 0x6db83a20, + 0x2c1e8: 0x6db83c20, 0x2c1e9: 0x6db83e20, 0x2c1ea: 0x6db84020, 0x2c1eb: 0x6dd6c020, + 0x2c1ec: 0x6dd6c220, 0x2c1ed: 0x6dd6c420, 0x2c1ee: 0x6dd6c620, 0x2c1ef: 0x6dd6c820, + 0x2c1f0: 0x6dd6ca20, 0x2c1f1: 0x6dd6cc20, 0x2c1f2: 0x6def9220, 0x2c1f3: 0x6def9420, + 0x2c1f4: 0x6def9620, 0x2c1f5: 0x6def9820, 0x2c1f6: 0x6e03ac20, 0x2c1f7: 0x6e151220, + 0x2c1f8: 0x6e151420, 0x2c1f9: 0x6e151620, 0x2c1fa: 0x6e22b420, 0x2c1fb: 0x6e22b620, + 0x2c1fc: 0x6e34e020, 0x2c1fd: 0x6e3e5e20, 0x2c1fe: 0x6e412e20, 0x2c1ff: 0x6e45de20, + // Block 0xb08, offset 0x2c200 + 0x2c200: 0x6c87b820, 0x2c201: 0x6cb33820, 0x2c202: 0x6c614420, 0x2c203: 0x6d6c5420, + 0x2c204: 0x6e03ec20, 0x2c205: 0x6d115e20, 0x2c206: 0x6d3f7620, 0x2c207: 0x6d6c6020, + 0x2c208: 0x6e03f820, 0x2c209: 0x6e03fa20, 0x2c20a: 0x6c272820, 0x2c20b: 0x6c272a20, + 0x2c20c: 0x6c40f820, 0x2c20d: 0x6c40fa20, 0x2c20e: 0x6c40fc20, 0x2c20f: 0x6c40fe20, + 0x2c210: 0x6c616620, 0x2c211: 0x6c616820, 0x2c212: 0x6c87d820, 0x2c213: 0x6c87da20, + 0x2c214: 0x6c87dc20, 0x2c215: 0x6c87de20, 0x2c216: 0x6c87e020, 0x2c217: 0x6c87e220, + 0x2c218: 0x6c87e420, 0x2c219: 0x6cb34820, 0x2c21a: 0x6cb34a20, 0x2c21b: 0x6cb34c20, + 0x2c21c: 0x6ce2fa20, 0x2c21d: 0x6ce2fc20, 0x2c21e: 0x6ce2fe20, 0x2c21f: 0x6ce30020, + 0x2c220: 0x6ce30220, 0x2c221: 0x6d116820, 0x2c222: 0x6d3f7820, 0x2c223: 0x6d3f7a20, + 0x2c224: 0x6d3f7c20, 0x2c225: 0x6d3f7e20, 0x2c226: 0x6d6c6620, 0x2c227: 0x6d6c6820, + 0x2c228: 0x6d6c6a20, 0x2c229: 0x6d6c6c20, 0x2c22a: 0x6d959620, 0x2c22b: 0x6d959820, + 0x2c22c: 0x6d959a20, 0x2c22d: 0x6d959c20, 0x2c22e: 0x6db8b020, 0x2c22f: 0x6dd71e20, + 0x2c230: 0x6dd72020, 0x2c231: 0x6defda20, 0x2c232: 0x6e34f820, 0x2c233: 0x6c0a8c20, + 0x2c234: 0x6c153a20, 0x2c235: 0x6c278c20, 0x2c236: 0x6c278e20, 0x2c237: 0x6c279020, + 0x2c238: 0x6c417c20, 0x2c239: 0x6c417e20, 0x2c23a: 0x6c418020, 0x2c23b: 0x6c61d220, + 0x2c23c: 0x6c61d420, 0x2c23d: 0x6d11fc20, 0x2c23e: 0x6c61d620, 0x2c23f: 0x6c61d820, + // Block 0xb09, offset 0x2c240 + 0x2c240: 0x6c61da20, 0x2c241: 0x6c61dc20, 0x2c242: 0x6c61de20, 0x2c243: 0x6c886c20, + 0x2c244: 0x6c886e20, 0x2c245: 0x6c887020, 0x2c246: 0x6c887220, 0x2c247: 0x6c887420, + 0x2c248: 0x6d400420, 0x2c249: 0x6d400620, 0x2c24a: 0x6cb40020, 0x2c24b: 0x6cb40220, + 0x2c24c: 0x6cb40420, 0x2c24d: 0x6cb40620, 0x2c24e: 0x6cb40820, 0x2c24f: 0x6cb40a20, + 0x2c250: 0x6ce3c020, 0x2c251: 0x6ce3c220, 0x2c252: 0x6ce3c420, 0x2c253: 0x6d120020, + 0x2c254: 0x6d120220, 0x2c255: 0x6d120420, 0x2c256: 0x6db90420, 0x2c257: 0x6d120620, + 0x2c258: 0x6d400a20, 0x2c259: 0x6d400c20, 0x2c25a: 0x6d400e20, 0x2c25b: 0x6d401020, + 0x2c25c: 0x6d401220, 0x2c25d: 0x6d6cfa20, 0x2c25e: 0x6d6cfc20, 0x2c25f: 0x6d6cfe20, + 0x2c260: 0x6d6d0020, 0x2c261: 0x6d95fc20, 0x2c262: 0x6db90620, 0x2c263: 0x6e2d1620, + 0x2c264: 0x6e2d1820, 0x2c265: 0x6c625620, 0x2c266: 0x6c625820, 0x2c267: 0x6c88ea20, + 0x2c268: 0x6c88ec20, 0x2c269: 0x6cb47420, 0x2c26a: 0x6cb47620, 0x2c26b: 0x6cb47820, + 0x2c26c: 0x6cb47a20, 0x2c26d: 0x6cb47c20, 0x2c26e: 0x6ce42020, 0x2c26f: 0x6ce42220, + 0x2c270: 0x6ce42420, 0x2c271: 0x6d126a20, 0x2c272: 0x6ce42620, 0x2c273: 0x6ce42820, + 0x2c274: 0x6d126c20, 0x2c275: 0x6d126e20, 0x2c276: 0x6d127020, 0x2c277: 0x6d127220, + 0x2c278: 0x6d127420, 0x2c279: 0x6d127620, 0x2c27a: 0x6d407a20, 0x2c27b: 0x6d407c20, + 0x2c27c: 0x6d6d4820, 0x2c27d: 0x6d6d4a20, 0x2c27e: 0x6d6d4c20, 0x2c27f: 0x6d6d4e20, + // Block 0xb0a, offset 0x2c280 + 0x2c280: 0x6d963020, 0x2c281: 0x6d963220, 0x2c282: 0x6d963420, 0x2c283: 0x6d963620, + 0x2c284: 0x6d963820, 0x2c285: 0x6d963a20, 0x2c286: 0x6d963c20, 0x2c287: 0x6d963e20, + 0x2c288: 0x6d964020, 0x2c289: 0x6db93420, 0x2c28a: 0x6db93620, 0x2c28b: 0x6db93820, + 0x2c28c: 0x6db93a20, 0x2c28d: 0x6dd78020, 0x2c28e: 0x6df00a20, 0x2c28f: 0x6df00c20, + 0x2c290: 0x6df00e20, 0x2c291: 0x6df01020, 0x2c292: 0x6df01220, 0x2c293: 0x6e155c20, + 0x2c294: 0x6e155e20, 0x2c295: 0x6e22f020, 0x2c296: 0x6e22f220, 0x2c297: 0x6e34fe20, + 0x2c298: 0x6e350020, 0x2c299: 0x6e433820, 0x2c29a: 0x6cb4ca20, 0x2c29b: 0x6c890c20, + 0x2c29c: 0x6cb4d420, 0x2c29d: 0x6ce47c20, 0x2c29e: 0x6ce47e20, 0x2c29f: 0x6ce48020, + 0x2c2a0: 0x6ce48220, 0x2c2a1: 0x6d12c020, 0x2c2a2: 0x6d12c220, 0x2c2a3: 0x6d12c420, + 0x2c2a4: 0x6d40d620, 0x2c2a5: 0x6d40d820, 0x2c2a6: 0x6d40da20, 0x2c2a7: 0x6d40dc20, + 0x2c2a8: 0x6d40de20, 0x2c2a9: 0x6d40e020, 0x2c2aa: 0x6d40e220, 0x2c2ab: 0x6d6db220, + 0x2c2ac: 0x6d6db420, 0x2c2ad: 0x6d6db620, 0x2c2ae: 0x6d6db820, 0x2c2af: 0x6d6dba20, + 0x2c2b0: 0x6d6dbc20, 0x2c2b1: 0x6d6dbe20, 0x2c2b2: 0x6d6dc020, 0x2c2b3: 0x6d969a20, + 0x2c2b4: 0x6d969c20, 0x2c2b5: 0x6d969e20, 0x2c2b6: 0x6d96a020, 0x2c2b7: 0x6db9a020, + 0x2c2b8: 0x6db9a220, 0x2c2b9: 0x6db9a420, 0x2c2ba: 0x6db9a620, 0x2c2bb: 0x6db9a820, + 0x2c2bc: 0x6db9aa20, 0x2c2bd: 0x6dd7d820, 0x2c2be: 0x6dd7da20, 0x2c2bf: 0x6dd7dc20, + // Block 0xb0b, offset 0x2c2c0 + 0x2c2c0: 0x6dd7de20, 0x2c2c1: 0x6dd7e020, 0x2c2c2: 0x6dd7e220, 0x2c2c3: 0x6dd7e420, + 0x2c2c4: 0x6dd7e620, 0x2c2c5: 0x6dd7e820, 0x2c2c6: 0x6dd7ea20, 0x2c2c7: 0x6dd7ec20, + 0x2c2c8: 0x6df05620, 0x2c2c9: 0x6df05820, 0x2c2ca: 0x6df05a20, 0x2c2cb: 0x6df05c20, + 0x2c2cc: 0x6df05e20, 0x2c2cd: 0x6df06020, 0x2c2ce: 0x6df06220, 0x2c2cf: 0x6df06420, + 0x2c2d0: 0x6df06620, 0x2c2d1: 0x6df06820, 0x2c2d2: 0x6df06a20, 0x2c2d3: 0x6df06c20, + 0x2c2d4: 0x6e046a20, 0x2c2d5: 0x6e046c20, 0x2c2d6: 0x6e046e20, 0x2c2d7: 0x6e047020, + 0x2c2d8: 0x6e047220, 0x2c2d9: 0x6e047420, 0x2c2da: 0x6e047620, 0x2c2db: 0x6e047820, + 0x2c2dc: 0x6e047a20, 0x2c2dd: 0x6e158020, 0x2c2de: 0x6e158220, 0x2c2df: 0x6e158420, + 0x2c2e0: 0x6e158620, 0x2c2e1: 0x6e158820, 0x2c2e2: 0x6e158a20, 0x2c2e3: 0x6e158c20, + 0x2c2e4: 0x6e158e20, 0x2c2e5: 0x6e159020, 0x2c2e6: 0x6e159220, 0x2c2e7: 0x6e230620, + 0x2c2e8: 0x6e230820, 0x2c2e9: 0x6e230a20, 0x2c2ea: 0x6e230c20, 0x2c2eb: 0x6e230e20, + 0x2c2ec: 0x6e231020, 0x2c2ed: 0x6e231220, 0x2c2ee: 0x6e231420, 0x2c2ef: 0x6e2d3a20, + 0x2c2f0: 0x6e2d3c20, 0x2c2f1: 0x6e2d3e20, 0x2c2f2: 0x6e2d4020, 0x2c2f3: 0x6e2d4220, + 0x2c2f4: 0x6e2d4420, 0x2c2f5: 0x6e351620, 0x2c2f6: 0x6e351820, 0x2c2f7: 0x6e351a20, + 0x2c2f8: 0x6e3ab220, 0x2c2f9: 0x6e449220, 0x2c2fa: 0x6ce52420, 0x2c2fb: 0x6ce52620, + 0x2c2fc: 0x6ce52820, 0x2c2fd: 0x6d139e20, 0x2c2fe: 0x6d13a020, 0x2c2ff: 0x6d13a220, + // Block 0xb0c, offset 0x2c300 + 0x2c300: 0x6d41c220, 0x2c301: 0x6d6ed020, 0x2c302: 0x6dd8fa20, 0x2c303: 0x6e058c20, + 0x2c304: 0x6e058e20, 0x2c305: 0x6e059020, 0x2c306: 0x6e435820, 0x2c307: 0x6cb58820, + 0x2c308: 0x6d13f620, 0x2c309: 0x6d13f820, 0x2c30a: 0x6d41fc20, 0x2c30b: 0x6df16420, + 0x2c30c: 0x6cb5a620, 0x2c30d: 0x6cb5a820, 0x2c30e: 0x6ce58c20, 0x2c30f: 0x6ce58e20, + 0x2c310: 0x6ce59020, 0x2c311: 0x6ce59220, 0x2c312: 0x6d141820, 0x2c313: 0x6d141a20, + 0x2c314: 0x6d141c20, 0x2c315: 0x6d420c20, 0x2c316: 0x6d420e20, 0x2c317: 0x6d421020, + 0x2c318: 0x6d421220, 0x2c319: 0x6d421420, 0x2c31a: 0x6d421620, 0x2c31b: 0x6d421820, + 0x2c31c: 0x6d6f1c20, 0x2c31d: 0x6d6f1e20, 0x2c31e: 0x6d6f2020, 0x2c31f: 0x6d6f2220, + 0x2c320: 0x6d982420, 0x2c321: 0x6d982620, 0x2c322: 0x6d982820, 0x2c323: 0x6d982a20, + 0x2c324: 0x6d982c20, 0x2c325: 0x6d982e20, 0x2c326: 0x6d983020, 0x2c327: 0x6d983220, + 0x2c328: 0x6d983420, 0x2c329: 0x6dbb2620, 0x2c32a: 0x6dbb2820, 0x2c32b: 0x6dbb2a20, + 0x2c32c: 0x6dbb2c20, 0x2c32d: 0x6dbb2e20, 0x2c32e: 0x6dbb3020, 0x2c32f: 0x6dbb3220, + 0x2c330: 0x6df17420, 0x2c331: 0x6e05a020, 0x2c332: 0x6e165620, 0x2c333: 0x6e165820, + 0x2c334: 0x6e165a20, 0x2c335: 0x6e23a420, 0x2c336: 0x6d426220, 0x2c337: 0x6d6f8220, + 0x2c338: 0x6dbb8620, 0x2c339: 0x6c0ab020, 0x2c33a: 0x6c0ab220, 0x2c33b: 0x6c15a220, + 0x2c33c: 0x6c281e20, 0x2c33d: 0x6c282020, 0x2c33e: 0x6c89a220, 0x2c33f: 0x6c282220, + // Block 0xb0d, offset 0x2c340 + 0x2c340: 0x6c282420, 0x2c341: 0x6c421220, 0x2c342: 0x6c421420, 0x2c343: 0x6c421620, + 0x2c344: 0x6c62cc20, 0x2c345: 0x6c62ce20, 0x2c346: 0x6c62d020, 0x2c347: 0x6c62d220, + 0x2c348: 0x6c62d420, 0x2c349: 0x6c89a420, 0x2c34a: 0x6c89a620, 0x2c34b: 0x6c89a820, + 0x2c34c: 0x6c89aa20, 0x2c34d: 0x6c89ac20, 0x2c34e: 0x6c89ae20, 0x2c34f: 0x6c89b020, + 0x2c350: 0x6cb5da20, 0x2c351: 0x6cb5dc20, 0x2c352: 0x6cb5de20, 0x2c353: 0x6cb5e020, + 0x2c354: 0x6cb5e220, 0x2c355: 0x6cb5e420, 0x2c356: 0x6cb5e620, 0x2c357: 0x6ce5fc20, + 0x2c358: 0x6ce5fe20, 0x2c359: 0x6ce60020, 0x2c35a: 0x6d148020, 0x2c35b: 0x6d148220, + 0x2c35c: 0x6d148420, 0x2c35d: 0x6d148620, 0x2c35e: 0x6d148820, 0x2c35f: 0x6d148a20, + 0x2c360: 0x6d426c20, 0x2c361: 0x6d426e20, 0x2c362: 0x6d427020, 0x2c363: 0x6d427220, + 0x2c364: 0x6d6f8820, 0x2c365: 0x6d6f8a20, 0x2c366: 0x6d6f8c20, 0x2c367: 0x6d989220, + 0x2c368: 0x6d989420, 0x2c369: 0x6d6f8e20, 0x2c36a: 0x6d989620, 0x2c36b: 0x6dbb8c20, + 0x2c36c: 0x6dbb8e20, 0x2c36d: 0x6dbb9020, 0x2c36e: 0x6df1a220, 0x2c36f: 0x6e05da20, + 0x2c370: 0x6e169020, 0x2c371: 0x6c8a3020, 0x2c372: 0x6cb66020, 0x2c373: 0x6cb66220, + 0x2c374: 0x6ce68a20, 0x2c375: 0x6ce68c20, 0x2c376: 0x6ce68e20, 0x2c377: 0x6d14e020, + 0x2c378: 0x6d14e220, 0x2c379: 0x6d14e420, 0x2c37a: 0x6d14e620, 0x2c37b: 0x6d42d020, + 0x2c37c: 0x6d6fcc20, 0x2c37d: 0x6d6fce20, 0x2c37e: 0x6d98c820, 0x2c37f: 0x6d98ca20, + // Block 0xb0e, offset 0x2c380 + 0x2c380: 0x6d8a5620, 0x2c381: 0x6dbbb620, 0x2c382: 0x6dbbb820, 0x2c383: 0x6dd98a20, + 0x2c384: 0x6df1ae20, 0x2c385: 0x6e05ee20, 0x2c386: 0x6e05f020, 0x2c387: 0x6e05f220, + 0x2c388: 0x6e23be20, 0x2c389: 0x6e3afa20, 0x2c38a: 0x6e464620, 0x2c38b: 0x6cb67c20, + 0x2c38c: 0x6ce6be20, 0x2c38d: 0x6ce6c020, 0x2c38e: 0x6d151820, 0x2c38f: 0x6d430c20, + 0x2c390: 0x6d430e20, 0x2c391: 0x6d431020, 0x2c392: 0x6d431220, 0x2c393: 0x6d431420, + 0x2c394: 0x6d431620, 0x2c395: 0x6d431820, 0x2c396: 0x6d431a20, 0x2c397: 0x6d6ffc20, + 0x2c398: 0x6d6ffe20, 0x2c399: 0x6d700020, 0x2c39a: 0x6d990e20, 0x2c39b: 0x6d991020, + 0x2c39c: 0x6d991220, 0x2c39d: 0x6d991420, 0x2c39e: 0x6dbbec20, 0x2c39f: 0x6dbbee20, + 0x2c3a0: 0x6dbbf020, 0x2c3a1: 0x6dbbf220, 0x2c3a2: 0x6dbbf420, 0x2c3a3: 0x6dbbf620, + 0x2c3a4: 0x6dbbf820, 0x2c3a5: 0x6dd9be20, 0x2c3a6: 0x6dd9c020, 0x2c3a7: 0x6dd9c220, + 0x2c3a8: 0x6dd9c420, 0x2c3a9: 0x6dd9c620, 0x2c3aa: 0x6dd9c820, 0x2c3ab: 0x6df1d420, + 0x2c3ac: 0x6df1d620, 0x2c3ad: 0x6df1d820, 0x2c3ae: 0x6df1da20, 0x2c3af: 0x6df1dc20, + 0x2c3b0: 0x6e061a20, 0x2c3b1: 0x6e061c20, 0x2c3b2: 0x6e23d220, 0x2c3b3: 0x6e23d420, + 0x2c3b4: 0x6e23d620, 0x2c3b5: 0x6e2de620, 0x2c3b6: 0x6e2de820, 0x2c3b7: 0x6e358e20, + 0x2c3b8: 0x6e3b0220, 0x2c3b9: 0x6e416620, 0x2c3ba: 0x6e46f020, 0x2c3bb: 0x6e473e20, + 0x2c3bc: 0x6e240c20, 0x2c3bd: 0x6cb69c20, 0x2c3be: 0x6cb69e20, 0x2c3bf: 0x6ce6fe20, + // Block 0xb0f, offset 0x2c3c0 + 0x2c3c0: 0x6d705020, 0x2c3c1: 0x6e067220, 0x2c3c2: 0x6d156820, 0x2c3c3: 0x6d156a20, + 0x2c3c4: 0x6d156c20, 0x2c3c5: 0x6d435c20, 0x2c3c6: 0x6d435e20, 0x2c3c7: 0x6d436020, + 0x2c3c8: 0x6d998620, 0x2c3c9: 0x6d998820, 0x2c3ca: 0x6dbc5620, 0x2c3cb: 0x6e067c20, + 0x2c3cc: 0x6e16f020, 0x2c3cd: 0x6e16f220, 0x2c3ce: 0x6e240e20, 0x2c3cf: 0x6e35b420, + 0x2c3d0: 0x6ce71820, 0x2c3d1: 0x6ce71a20, 0x2c3d2: 0x6ce71c20, 0x2c3d3: 0x6d157c20, + 0x2c3d4: 0x6d157e20, 0x2c3d5: 0x6d158020, 0x2c3d6: 0x6d158220, 0x2c3d7: 0x6d158420, + 0x2c3d8: 0x6d158620, 0x2c3d9: 0x6d437e20, 0x2c3da: 0x6d438020, 0x2c3db: 0x6d438220, + 0x2c3dc: 0x6d438420, 0x2c3dd: 0x6d438620, 0x2c3de: 0x6d438820, 0x2c3df: 0x6d707220, + 0x2c3e0: 0x6d99a220, 0x2c3e1: 0x6d99a420, 0x2c3e2: 0x6d99a620, 0x2c3e3: 0x6d99a820, + 0x2c3e4: 0x6d99aa20, 0x2c3e5: 0x6d99ac20, 0x2c3e6: 0x6d99ae20, 0x2c3e7: 0x6d99b020, + 0x2c3e8: 0x6dbc6620, 0x2c3e9: 0x6dbc6820, 0x2c3ea: 0x6dbc6a20, 0x2c3eb: 0x6dbc6c20, + 0x2c3ec: 0x6dbc6e20, 0x2c3ed: 0x6dbc7020, 0x2c3ee: 0x6dbc7220, 0x2c3ef: 0x6dda3020, + 0x2c3f0: 0x6dda3220, 0x2c3f1: 0x6dda3420, 0x2c3f2: 0x6dda3620, 0x2c3f3: 0x6dda3820, + 0x2c3f4: 0x6dda3a20, 0x2c3f5: 0x6dda3c20, 0x2c3f6: 0x6df24220, 0x2c3f7: 0x6df24420, + 0x2c3f8: 0x6df24620, 0x2c3f9: 0x6df24820, 0x2c3fa: 0x6df24a20, 0x2c3fb: 0x6df24c20, + 0x2c3fc: 0x6e068a20, 0x2c3fd: 0x6e068c20, 0x2c3fe: 0x6e068e20, 0x2c3ff: 0x6e170a20, + // Block 0xb10, offset 0x2c400 + 0x2c400: 0x6e170c20, 0x2c401: 0x6e170e20, 0x2c402: 0x6e171020, 0x2c403: 0x6e171220, + 0x2c404: 0x6e171420, 0x2c405: 0x6e241420, 0x2c406: 0x6e241620, 0x2c407: 0x6e2e0a20, + 0x2c408: 0x6e2e0c20, 0x2c409: 0x6e35ba20, 0x2c40a: 0x6e3b2020, 0x2c40b: 0x6e3b2220, + 0x2c40c: 0x6e3edc20, 0x2c40d: 0x6e3ede20, 0x2c40e: 0x6e417620, 0x2c40f: 0x6d15c620, + 0x2c410: 0x6d43d820, 0x2c411: 0x6d43da20, 0x2c412: 0x6d43dc20, 0x2c413: 0x6d43de20, + 0x2c414: 0x6d99ec20, 0x2c415: 0x6dbcc420, 0x2c416: 0x6ddaa420, 0x2c417: 0x6ddaa620, + 0x2c418: 0x6ddaa820, 0x2c419: 0x6df2a420, 0x2c41a: 0x6df2a620, 0x2c41b: 0x6e174020, + 0x2c41c: 0x6e244620, 0x2c41d: 0x6e2e2c20, 0x2c41e: 0x6d15de20, 0x2c41f: 0x6d70e020, + 0x2c420: 0x6dbce820, 0x2c421: 0x6df2c220, 0x2c422: 0x6df2c420, 0x2c423: 0x6e06ea20, + 0x2c424: 0x6e175620, 0x2c425: 0x6e2e3620, 0x2c426: 0x6ce73c20, 0x2c427: 0x6ce73e20, + 0x2c428: 0x6ce74020, 0x2c429: 0x6d15e620, 0x2c42a: 0x6d440220, 0x2c42b: 0x6d9a0820, + 0x2c42c: 0x6d9a0a20, 0x2c42d: 0x6ddaca20, 0x2c42e: 0x6df2cc20, 0x2c42f: 0x6df2ce20, + 0x2c430: 0x6e245c20, 0x2c431: 0x6ce74420, 0x2c432: 0x6ce74620, 0x2c433: 0x6d15f420, + 0x2c434: 0x6d15f620, 0x2c435: 0x6d15f820, 0x2c436: 0x6d441420, 0x2c437: 0x6d441620, + 0x2c438: 0x6d441820, 0x2c439: 0x6d441a20, 0x2c43a: 0x6d441c20, 0x2c43b: 0x6d441e20, + 0x2c43c: 0x6d442020, 0x2c43d: 0x6d442220, 0x2c43e: 0x6d442420, 0x2c43f: 0x6d70f820, + // Block 0xb11, offset 0x2c440 + 0x2c440: 0x6d70fa20, 0x2c441: 0x6d70fc20, 0x2c442: 0x6d70fe20, 0x2c443: 0x6d9a1a20, + 0x2c444: 0x6d9a1c20, 0x2c445: 0x6d9a1e20, 0x2c446: 0x6d9a2020, 0x2c447: 0x6d9a2220, + 0x2c448: 0x6d9a2420, 0x2c449: 0x6d9a2620, 0x2c44a: 0x6d9a2820, 0x2c44b: 0x6dbcfa20, + 0x2c44c: 0x6dbcfc20, 0x2c44d: 0x6dbcfe20, 0x2c44e: 0x6dbd0020, 0x2c44f: 0x6dbd0220, + 0x2c450: 0x6dbd0420, 0x2c451: 0x6dbd0620, 0x2c452: 0x6dbd0820, 0x2c453: 0x6dbd0a20, + 0x2c454: 0x6ddadc20, 0x2c455: 0x6ddade20, 0x2c456: 0x6ddae020, 0x2c457: 0x6ddae220, + 0x2c458: 0x6ddae420, 0x2c459: 0x6ddae620, 0x2c45a: 0x6ddae820, 0x2c45b: 0x6ddaea20, + 0x2c45c: 0x6ddaec20, 0x2c45d: 0x6ddaee20, 0x2c45e: 0x6df2dc20, 0x2c45f: 0x6df2de20, + 0x2c460: 0x6df2e020, 0x2c461: 0x6df2e220, 0x2c462: 0x6df2e420, 0x2c463: 0x6df2e620, + 0x2c464: 0x6df2e820, 0x2c465: 0x6df2ea20, 0x2c466: 0x6df2ec20, 0x2c467: 0x6df2ee20, + 0x2c468: 0x6e070620, 0x2c469: 0x6e070820, 0x2c46a: 0x6e070a20, 0x2c46b: 0x6e070c20, + 0x2c46c: 0x6e176620, 0x2c46d: 0x6e176820, 0x2c46e: 0x6e176a20, 0x2c46f: 0x6e176c20, + 0x2c470: 0x6e176e20, 0x2c471: 0x6e177020, 0x2c472: 0x6e246820, 0x2c473: 0x6e246a20, + 0x2c474: 0x6e246c20, 0x2c475: 0x6e35da20, 0x2c476: 0x6e35dc20, 0x2c477: 0x6e3b3620, + 0x2c478: 0x6cb6cc20, 0x2c479: 0x6ce77820, 0x2c47a: 0x6d165020, 0x2c47b: 0x6d165220, + 0x2c47c: 0x6d165420, 0x2c47d: 0x6d165620, 0x2c47e: 0x6d447e20, 0x2c47f: 0x6d448020, + // Block 0xb12, offset 0x2c480 + 0x2c480: 0x6d448220, 0x2c481: 0x6d448420, 0x2c482: 0x6d448620, 0x2c483: 0x6d448820, + 0x2c484: 0x6d716c20, 0x2c485: 0x6d716e20, 0x2c486: 0x6d9abc20, 0x2c487: 0x6d9abe20, + 0x2c488: 0x6d9ac020, 0x2c489: 0x6d9ac220, 0x2c48a: 0x6d9ac420, 0x2c48b: 0x6dbd6c20, + 0x2c48c: 0x6dbd6e20, 0x2c48d: 0x6dbd7020, 0x2c48e: 0x6dbd7220, 0x2c48f: 0x6dbd7420, + 0x2c490: 0x6dbd7620, 0x2c491: 0x6ddb4220, 0x2c492: 0x6ddb4420, 0x2c493: 0x6ddb4620, + 0x2c494: 0x6ddb4820, 0x2c495: 0x6ddb4a20, 0x2c496: 0x6ddb4c20, 0x2c497: 0x6ddb4e20, + 0x2c498: 0x6df33c20, 0x2c499: 0x6df33e20, 0x2c49a: 0x6df34020, 0x2c49b: 0x6e074a20, + 0x2c49c: 0x6e074c20, 0x2c49d: 0x6e17ae20, 0x2c49e: 0x6e2e6e20, 0x2c49f: 0x6e35f220, + 0x2c4a0: 0x6dbdbc20, 0x2c4a1: 0x6ddb8620, 0x2c4a2: 0x6cb6d620, 0x2c4a3: 0x6ce79820, + 0x2c4a4: 0x6ce79a20, 0x2c4a5: 0x6ce79c20, 0x2c4a6: 0x6d168a20, 0x2c4a7: 0x6d168c20, + 0x2c4a8: 0x6d168e20, 0x2c4a9: 0x6d169020, 0x2c4aa: 0x6d169220, 0x2c4ab: 0x6d44c220, + 0x2c4ac: 0x6d44c420, 0x2c4ad: 0x6d44c620, 0x2c4ae: 0x6d44c820, 0x2c4af: 0x6d44ca20, + 0x2c4b0: 0x6d44cc20, 0x2c4b1: 0x6d44ce20, 0x2c4b2: 0x6d44d020, 0x2c4b3: 0x6d44d220, + 0x2c4b4: 0x6d44d420, 0x2c4b5: 0x6d719820, 0x2c4b6: 0x6d719a20, 0x2c4b7: 0x6d719c20, + 0x2c4b8: 0x6d719e20, 0x2c4b9: 0x6d71a020, 0x2c4ba: 0x6d71a220, 0x2c4bb: 0x6d71a420, + 0x2c4bc: 0x6d9afa20, 0x2c4bd: 0x6d9afc20, 0x2c4be: 0x6d9afe20, 0x2c4bf: 0x6d9b0020, + // Block 0xb13, offset 0x2c4c0 + 0x2c4c0: 0x6d9b0220, 0x2c4c1: 0x6d9b0420, 0x2c4c2: 0x6d9b0620, 0x2c4c3: 0x6dbdc020, + 0x2c4c4: 0x6dbdc220, 0x2c4c5: 0x6dbdc420, 0x2c4c6: 0x6dbdc620, 0x2c4c7: 0x6dbdc820, + 0x2c4c8: 0x6ddb8a20, 0x2c4c9: 0x6ddb8c20, 0x2c4ca: 0x6ddb8e20, 0x2c4cb: 0x6ddb9020, + 0x2c4cc: 0x6ddb9220, 0x2c4cd: 0x6ddb9420, 0x2c4ce: 0x6ddb9620, 0x2c4cf: 0x6ddb9820, + 0x2c4d0: 0x6df37e20, 0x2c4d1: 0x6df38020, 0x2c4d2: 0x6df38220, 0x2c4d3: 0x6df38420, + 0x2c4d4: 0x6df38620, 0x2c4d5: 0x6e076e20, 0x2c4d6: 0x6e077020, 0x2c4d7: 0x6e077220, + 0x2c4d8: 0x6e17e220, 0x2c4d9: 0x6e17e420, 0x2c4da: 0x6e17e620, 0x2c4db: 0x6e17e820, + 0x2c4dc: 0x6e17ea20, 0x2c4dd: 0x6e24a620, 0x2c4de: 0x6e24a820, 0x2c4df: 0x6e24aa20, + 0x2c4e0: 0x6e24ac20, 0x2c4e1: 0x6e2e7a20, 0x2c4e2: 0x6e2e7c20, 0x2c4e3: 0x6e2e7e20, + 0x2c4e4: 0x6e2e8020, 0x2c4e5: 0x6e360020, 0x2c4e6: 0x6e3f0420, 0x2c4e7: 0x6e3f0620, + 0x2c4e8: 0x6e419620, 0x2c4e9: 0x6e437420, 0x2c4ea: 0x6e182020, 0x2c4eb: 0x6d720820, + 0x2c4ec: 0x6d720a20, 0x2c4ed: 0x6ddbfa20, 0x2c4ee: 0x6df3e420, 0x2c4ef: 0x6d453420, + 0x2c4f0: 0x6dbe5020, 0x2c4f1: 0x6dbe5220, 0x2c4f2: 0x6dbe5420, 0x2c4f3: 0x6e419e20, + 0x2c4f4: 0x6ce7f020, 0x2c4f5: 0x6d171020, 0x2c4f6: 0x6d171220, 0x2c4f7: 0x6d454820, + 0x2c4f8: 0x6d454a20, 0x2c4f9: 0x6d454c20, 0x2c4fa: 0x6d454e20, 0x2c4fb: 0x6d455020, + 0x2c4fc: 0x6d455220, 0x2c4fd: 0x6d455420, 0x2c4fe: 0x6d455620, 0x2c4ff: 0x6d722420, + // Block 0xb14, offset 0x2c500 + 0x2c500: 0x6d722620, 0x2c501: 0x6d722820, 0x2c502: 0x6d722a20, 0x2c503: 0x6d722c20, + 0x2c504: 0x6d722e20, 0x2c505: 0x6d723020, 0x2c506: 0x6d9baa20, 0x2c507: 0x6d9bac20, + 0x2c508: 0x6d9bae20, 0x2c509: 0x6d9bb020, 0x2c50a: 0x6d9bb220, 0x2c50b: 0x6d9bb420, + 0x2c50c: 0x6d9bb620, 0x2c50d: 0x6d9bb820, 0x2c50e: 0x6dbe6620, 0x2c50f: 0x6dbe6820, + 0x2c510: 0x6dbe6a20, 0x2c511: 0x6dbe6c20, 0x2c512: 0x6dbe6e20, 0x2c513: 0x6ddc1620, + 0x2c514: 0x6ddc1820, 0x2c515: 0x6ddc1a20, 0x2c516: 0x6ddc1c20, 0x2c517: 0x6ddc1e20, + 0x2c518: 0x6ddc2020, 0x2c519: 0x6ddc2220, 0x2c51a: 0x6ddc2420, 0x2c51b: 0x6ddc2620, + 0x2c51c: 0x6df3fc20, 0x2c51d: 0x6df3fe20, 0x2c51e: 0x6df40020, 0x2c51f: 0x6df40220, + 0x2c520: 0x6df40420, 0x2c521: 0x6df40620, 0x2c522: 0x6df40820, 0x2c523: 0x6e07d820, + 0x2c524: 0x6e07da20, 0x2c525: 0x6e07dc20, 0x2c526: 0x6e07de20, 0x2c527: 0x6e07e020, + 0x2c528: 0x6e07e220, 0x2c529: 0x6e07e420, 0x2c52a: 0x6e183220, 0x2c52b: 0x6e183420, + 0x2c52c: 0x6e183620, 0x2c52d: 0x6e183820, 0x2c52e: 0x6e183a20, 0x2c52f: 0x6e183c20, + 0x2c530: 0x6e183e20, 0x2c531: 0x6e184020, 0x2c532: 0x6e24e420, 0x2c533: 0x6e24e620, + 0x2c534: 0x6e24e820, 0x2c535: 0x6e24ea20, 0x2c536: 0x6e24ec20, 0x2c537: 0x6e2e9e20, + 0x2c538: 0x6e2ea020, 0x2c539: 0x6e2ea220, 0x2c53a: 0x6e361c20, 0x2c53b: 0x6e361e20, + 0x2c53c: 0x6e362020, 0x2c53d: 0x6e3b5620, 0x2c53e: 0x6e3f1220, 0x2c53f: 0x6e41a220, + // Block 0xb15, offset 0x2c540 + 0x2c540: 0x6e437820, 0x2c541: 0x6e44c020, 0x2c542: 0x6e46b820, 0x2c543: 0x6d9c3020, + 0x2c544: 0x6dbec220, 0x2c545: 0x6e086c20, 0x2c546: 0x6cb72e20, 0x2c547: 0x6ce82a20, + 0x2c548: 0x6d45b820, 0x2c549: 0x6d45ba20, 0x2c54a: 0x6d72b220, 0x2c54b: 0x6d72b420, + 0x2c54c: 0x6d72b620, 0x2c54d: 0x6d72b820, 0x2c54e: 0x6d72ba20, 0x2c54f: 0x6d9c3620, + 0x2c550: 0x6d9c3820, 0x2c551: 0x6d9c3a20, 0x2c552: 0x6d9c3c20, 0x2c553: 0x6d9c3e20, + 0x2c554: 0x6d9c4020, 0x2c555: 0x6dbec620, 0x2c556: 0x6dbec820, 0x2c557: 0x6dbeca20, + 0x2c558: 0x6dbecc20, 0x2c559: 0x6dbece20, 0x2c55a: 0x6dbed020, 0x2c55b: 0x6ddca820, + 0x2c55c: 0x6ddcaa20, 0x2c55d: 0x6df48420, 0x2c55e: 0x6df48620, 0x2c55f: 0x6df48820, + 0x2c560: 0x6df48a20, 0x2c561: 0x6e087420, 0x2c562: 0x6e189220, 0x2c563: 0x6e254420, + 0x2c564: 0x6e2ee420, 0x2c565: 0x6e364220, 0x2c566: 0x6e3b7220, 0x2c567: 0x6ce83e20, + 0x2c568: 0x6d177220, 0x2c569: 0x6d45e420, 0x2c56a: 0x6df4a420, 0x2c56b: 0x6e256220, + 0x2c56c: 0x6e3b7e20, 0x2c56d: 0x6ce84220, 0x2c56e: 0x6ce84420, 0x2c56f: 0x6d45fa20, + 0x2c570: 0x6d45fc20, 0x2c571: 0x6d45fe20, 0x2c572: 0x6d460020, 0x2c573: 0x6d460220, + 0x2c574: 0x6d460420, 0x2c575: 0x6d72ee20, 0x2c576: 0x6d72f020, 0x2c577: 0x6d9c7c20, + 0x2c578: 0x6d9c7e20, 0x2c579: 0x6dbf0c20, 0x2c57a: 0x6dbf0e20, 0x2c57b: 0x6dbf1020, + 0x2c57c: 0x6dbf1220, 0x2c57d: 0x6ddce420, 0x2c57e: 0x6ddce620, 0x2c57f: 0x6ddce820, + // Block 0xb16, offset 0x2c580 + 0x2c580: 0x6ddcea20, 0x2c581: 0x6ddcec20, 0x2c582: 0x6ddcee20, 0x2c583: 0x6ddcf020, + 0x2c584: 0x6df4aa20, 0x2c585: 0x6df4ac20, 0x2c586: 0x6df4ae20, 0x2c587: 0x6df4b020, + 0x2c588: 0x6e08aa20, 0x2c589: 0x6e08ac20, 0x2c58a: 0x6e08ae20, 0x2c58b: 0x6e08b020, + 0x2c58c: 0x6e18b020, 0x2c58d: 0x6e18b220, 0x2c58e: 0x6e256a20, 0x2c58f: 0x6e365420, + 0x2c590: 0x6e365620, 0x2c591: 0x6e365820, 0x2c592: 0x6e365a20, 0x2c593: 0x6e3b8220, + 0x2c594: 0x6e3b8420, 0x2c595: 0x6e3f3020, 0x2c596: 0x6e44c820, 0x2c597: 0x6e08ec20, + 0x2c598: 0x6e18e820, 0x2c599: 0x6d464420, 0x2c59a: 0x6d464620, 0x2c59b: 0x6d734c20, + 0x2c59c: 0x6d9cc620, 0x2c59d: 0x6e25ac20, 0x2c59e: 0x6e3b9c20, 0x2c59f: 0x6d464e20, + 0x2c5a0: 0x6d735420, 0x2c5a1: 0x6d735620, 0x2c5a2: 0x6d9cda20, 0x2c5a3: 0x6d9cdc20, + 0x2c5a4: 0x6ddd4e20, 0x2c5a5: 0x6ddd5020, 0x2c5a6: 0x6ddd5220, 0x2c5a7: 0x6ddd5420, + 0x2c5a8: 0x6df50420, 0x2c5a9: 0x6df50620, 0x2c5aa: 0x6e090020, 0x2c5ab: 0x6e25b820, + 0x2c5ac: 0x6e25ba20, 0x2c5ad: 0x6e25bc20, 0x2c5ae: 0x6e2f3420, 0x2c5af: 0x6e368620, + 0x2c5b0: 0x6e368820, 0x2c5b1: 0x6e46ba20, 0x2c5b2: 0x6ce86c20, 0x2c5b3: 0x6d17c420, + 0x2c5b4: 0x6d468c20, 0x2c5b5: 0x6d468e20, 0x2c5b6: 0x6d469020, 0x2c5b7: 0x6d738620, + 0x2c5b8: 0x6d738820, 0x2c5b9: 0x6d738a20, 0x2c5ba: 0x6d738c20, 0x2c5bb: 0x6d738e20, + 0x2c5bc: 0x6d739020, 0x2c5bd: 0x6d739220, 0x2c5be: 0x6d739420, 0x2c5bf: 0x6d9d0e20, + // Block 0xb17, offset 0x2c5c0 + 0x2c5c0: 0x6d9d1020, 0x2c5c1: 0x6d9d1220, 0x2c5c2: 0x6d9d1420, 0x2c5c3: 0x6d9d1620, + 0x2c5c4: 0x6d9d1820, 0x2c5c5: 0x6d9d1a20, 0x2c5c6: 0x6d9d1c20, 0x2c5c7: 0x6d9d1e20, + 0x2c5c8: 0x6d9d2020, 0x2c5c9: 0x6d9d2220, 0x2c5ca: 0x6dbf9220, 0x2c5cb: 0x6dbf9420, + 0x2c5cc: 0x6dbf9620, 0x2c5cd: 0x6dbf9820, 0x2c5ce: 0x6dbf9a20, 0x2c5cf: 0x6ddd8420, + 0x2c5d0: 0x6ddd8620, 0x2c5d1: 0x6ddd8820, 0x2c5d2: 0x6ddd8a20, 0x2c5d3: 0x6ddd8c20, + 0x2c5d4: 0x6ddd8e20, 0x2c5d5: 0x6ddd9020, 0x2c5d6: 0x6ddd9220, 0x2c5d7: 0x6ddd9420, + 0x2c5d8: 0x6ddd9620, 0x2c5d9: 0x6df51e20, 0x2c5da: 0x6df52020, 0x2c5db: 0x6df52220, + 0x2c5dc: 0x6df52420, 0x2c5dd: 0x6df52620, 0x2c5de: 0x6df52820, 0x2c5df: 0x6df52a20, + 0x2c5e0: 0x6df52c20, 0x2c5e1: 0x6df52e20, 0x2c5e2: 0x6df53020, 0x2c5e3: 0x6df53220, + 0x2c5e4: 0x6df53420, 0x2c5e5: 0x6df53620, 0x2c5e6: 0x6df53820, 0x2c5e7: 0x6df53a20, + 0x2c5e8: 0x6df53c20, 0x2c5e9: 0x6df53e20, 0x2c5ea: 0x6df54020, 0x2c5eb: 0x6e091e20, + 0x2c5ec: 0x6e092020, 0x2c5ed: 0x6e092220, 0x2c5ee: 0x6e092420, 0x2c5ef: 0x6e092620, + 0x2c5f0: 0x6e092820, 0x2c5f1: 0x6e092a20, 0x2c5f2: 0x6e092c20, 0x2c5f3: 0x6e092e20, + 0x2c5f4: 0x6e093020, 0x2c5f5: 0x6e193420, 0x2c5f6: 0x6e193620, 0x2c5f7: 0x6e193820, + 0x2c5f8: 0x6e193a20, 0x2c5f9: 0x6e193c20, 0x2c5fa: 0x6e193e20, 0x2c5fb: 0x6e194020, + 0x2c5fc: 0x6e194220, 0x2c5fd: 0x6e194420, 0x2c5fe: 0x6e25c820, 0x2c5ff: 0x6e25ca20, + // Block 0xb18, offset 0x2c600 + 0x2c600: 0x6e25cc20, 0x2c601: 0x6e25ce20, 0x2c602: 0x6e25d020, 0x2c603: 0x6e25d220, + 0x2c604: 0x6e25d420, 0x2c605: 0x6e25d620, 0x2c606: 0x6e25d820, 0x2c607: 0x6e25da20, + 0x2c608: 0x6e25dc20, 0x2c609: 0x6e2f4820, 0x2c60a: 0x6e2f4a20, 0x2c60b: 0x6e2f4c20, + 0x2c60c: 0x6e2f4e20, 0x2c60d: 0x6e2f5020, 0x2c60e: 0x6e2f5220, 0x2c60f: 0x6e2f5420, + 0x2c610: 0x6e369a20, 0x2c611: 0x6e369c20, 0x2c612: 0x6e369e20, 0x2c613: 0x6e36a020, + 0x2c614: 0x6e36a220, 0x2c615: 0x6e36a420, 0x2c616: 0x6e3ba620, 0x2c617: 0x6e3ba820, + 0x2c618: 0x6e3baa20, 0x2c619: 0x6e3f5220, 0x2c61a: 0x6e41d620, 0x2c61b: 0x6e41d820, + 0x2c61c: 0x6e473220, 0x2c61d: 0x6d740a20, 0x2c61e: 0x6d9dac20, 0x2c61f: 0x6d9dae20, + 0x2c620: 0x6e09e820, 0x2c621: 0x6e09ea20, 0x2c622: 0x6e19f220, 0x2c623: 0x6e19f420, + 0x2c624: 0x6e19f620, 0x2c625: 0x6d180620, 0x2c626: 0x6d46e820, 0x2c627: 0x6d46ea20, + 0x2c628: 0x6d46ec20, 0x2c629: 0x6d46ee20, 0x2c62a: 0x6d46f020, 0x2c62b: 0x6d46f220, + 0x2c62c: 0x6d743620, 0x2c62d: 0x6d743820, 0x2c62e: 0x6d743a20, 0x2c62f: 0x6d743c20, + 0x2c630: 0x6d743e20, 0x2c631: 0x6d744020, 0x2c632: 0x6d744220, 0x2c633: 0x6d744420, + 0x2c634: 0x6d744620, 0x2c635: 0x6d744820, 0x2c636: 0x6d744a20, 0x2c637: 0x6d744c20, + 0x2c638: 0x6d744e20, 0x2c639: 0x6d9de220, 0x2c63a: 0x6d9de420, 0x2c63b: 0x6d9de620, + 0x2c63c: 0x6d9de820, 0x2c63d: 0x6d9dea20, 0x2c63e: 0x6d9dec20, 0x2c63f: 0x6d9dee20, + // Block 0xb19, offset 0x2c640 + 0x2c640: 0x6d9df020, 0x2c641: 0x6d9df220, 0x2c642: 0x6d9df420, 0x2c643: 0x6d9df620, + 0x2c644: 0x6d9df820, 0x2c645: 0x6d9dfa20, 0x2c646: 0x6d9dfc20, 0x2c647: 0x6d9dfe20, + 0x2c648: 0x6d9e0020, 0x2c649: 0x6d9e0220, 0x2c64a: 0x6d9e0420, 0x2c64b: 0x6dc06c20, + 0x2c64c: 0x6dc06e20, 0x2c64d: 0x6dc07020, 0x2c64e: 0x6dc07220, 0x2c64f: 0x6dc07420, + 0x2c650: 0x6dc07620, 0x2c651: 0x6dc07820, 0x2c652: 0x6dc07a20, 0x2c653: 0x6dc07c20, + 0x2c654: 0x6dc07e20, 0x2c655: 0x6dde3e20, 0x2c656: 0x6dde4020, 0x2c657: 0x6dde4220, + 0x2c658: 0x6dde4420, 0x2c659: 0x6dde4620, 0x2c65a: 0x6dde4820, 0x2c65b: 0x6dde4a20, + 0x2c65c: 0x6dde4c20, 0x2c65d: 0x6df63a20, 0x2c65e: 0x6df63c20, 0x2c65f: 0x6df63e20, + 0x2c660: 0x6df64020, 0x2c661: 0x6df64220, 0x2c662: 0x6df64420, 0x2c663: 0x6df64620, + 0x2c664: 0x6df64820, 0x2c665: 0x6df64a20, 0x2c666: 0x6e09f820, 0x2c667: 0x6e09fa20, + 0x2c668: 0x6e09fc20, 0x2c669: 0x6e09fe20, 0x2c66a: 0x6e0a0020, 0x2c66b: 0x6e0a0220, + 0x2c66c: 0x6e0a0420, 0x2c66d: 0x6e0a0620, 0x2c66e: 0x6e0a0820, 0x2c66f: 0x6e0a0a20, + 0x2c670: 0x6e0a0c20, 0x2c671: 0x6e1a0420, 0x2c672: 0x6e1a0620, 0x2c673: 0x6e1a0820, + 0x2c674: 0x6e1a0a20, 0x2c675: 0x6e1a0c20, 0x2c676: 0x6e1a0e20, 0x2c677: 0x6e267820, + 0x2c678: 0x6e267a20, 0x2c679: 0x6e267c20, 0x2c67a: 0x6e267e20, 0x2c67b: 0x6e268020, + 0x2c67c: 0x6e268220, 0x2c67d: 0x6e268420, 0x2c67e: 0x6e2fe020, 0x2c67f: 0x6e2fe220, + // Block 0xb1a, offset 0x2c680 + 0x2c680: 0x6e2fe420, 0x2c681: 0x6e2fe620, 0x2c682: 0x6e2fe820, 0x2c683: 0x6e2fea20, + 0x2c684: 0x6e2fec20, 0x2c685: 0x6e2fee20, 0x2c686: 0x6e2ff020, 0x2c687: 0x6e371820, + 0x2c688: 0x6e371a20, 0x2c689: 0x6e371c20, 0x2c68a: 0x6e371e20, 0x2c68b: 0x6e372020, + 0x2c68c: 0x6e3be620, 0x2c68d: 0x6e3be820, 0x2c68e: 0x6e3f8620, 0x2c68f: 0x6e41f820, + 0x2c690: 0x6e45fe20, 0x2c691: 0x6e46bc20, 0x2c692: 0x6e46d420, 0x2c693: 0x6d74de20, + 0x2c694: 0x6dc13420, 0x2c695: 0x6dc13620, 0x2c696: 0x6df72e20, 0x2c697: 0x6e0ad420, + 0x2c698: 0x6e1ac220, 0x2c699: 0x6e378a20, 0x2c69a: 0x6d74fe20, 0x2c69b: 0x6ddef020, + 0x2c69c: 0x6e1ac420, 0x2c69d: 0x6e30a820, 0x2c69e: 0x6e3c3220, 0x2c69f: 0x6d474a20, + 0x2c6a0: 0x6d750c20, 0x2c6a1: 0x6d750e20, 0x2c6a2: 0x6d751020, 0x2c6a3: 0x6d9edc20, + 0x2c6a4: 0x6d9ede20, 0x2c6a5: 0x6d9ee020, 0x2c6a6: 0x6ddefa20, 0x2c6a7: 0x6df74620, + 0x2c6a8: 0x6e1ad420, 0x2c6a9: 0x6e274220, 0x2c6aa: 0x6e379620, 0x2c6ab: 0x6e379820, + 0x2c6ac: 0x6d475020, 0x2c6ad: 0x6d475220, 0x2c6ae: 0x6d475420, 0x2c6af: 0x6d753020, + 0x2c6b0: 0x6d753220, 0x2c6b1: 0x6d9efe20, 0x2c6b2: 0x6d9f0020, 0x2c6b3: 0x6d9f0220, + 0x2c6b4: 0x6d9f0420, 0x2c6b5: 0x6dc16e20, 0x2c6b6: 0x6ddf2820, 0x2c6b7: 0x6ddf2a20, + 0x2c6b8: 0x6ddf2c20, 0x2c6b9: 0x6df76a20, 0x2c6ba: 0x6df76c20, 0x2c6bb: 0x6df76e20, + 0x2c6bc: 0x6df77020, 0x2c6bd: 0x6df77220, 0x2c6be: 0x6e1ae420, 0x2c6bf: 0x6e1ae620, + // Block 0xb1b, offset 0x2c6c0 + 0x2c6c0: 0x6e1ae820, 0x2c6c1: 0x6e275020, 0x2c6c2: 0x6e275220, 0x2c6c3: 0x6e30c820, + 0x2c6c4: 0x6e37a420, 0x2c6c5: 0x6e275420, 0x2c6c6: 0x6e3c4820, 0x2c6c7: 0x6d756220, + 0x2c6c8: 0x6e0b2620, 0x2c6c9: 0x6e0b2820, 0x2c6ca: 0x6d9f3220, 0x2c6cb: 0x6ddf5820, + 0x2c6cc: 0x6df7a420, 0x2c6cd: 0x6e0b3020, 0x2c6ce: 0x6e1afe20, 0x2c6cf: 0x6e30de20, + 0x2c6d0: 0x6e37b620, 0x2c6d1: 0x6d757e20, 0x2c6d2: 0x6d9f3a20, 0x2c6d3: 0x6d9f3c20, + 0x2c6d4: 0x6e0b3e20, 0x2c6d5: 0x6e0b4020, 0x2c6d6: 0x6e0b4220, 0x2c6d7: 0x6e1b0c20, + 0x2c6d8: 0x6e1b0e20, 0x2c6d9: 0x6e1b1020, 0x2c6da: 0x6e278220, 0x2c6db: 0x6e30e620, + 0x2c6dc: 0x6e3c4e20, 0x2c6dd: 0x6d187020, 0x2c6de: 0x6d477220, 0x2c6df: 0x6d758620, + 0x2c6e0: 0x6dc1bc20, 0x2c6e1: 0x6d9f4a20, 0x2c6e2: 0x6dc1be20, 0x2c6e3: 0x6dc1c020, + 0x2c6e4: 0x6ddf6a20, 0x2c6e5: 0x6ddf6c20, 0x2c6e6: 0x6ddf6e20, 0x2c6e7: 0x6ddf7020, + 0x2c6e8: 0x6df7c220, 0x2c6e9: 0x6df7c420, 0x2c6ea: 0x6e0b4e20, 0x2c6eb: 0x6e0b5020, + 0x2c6ec: 0x6e0b5220, 0x2c6ed: 0x6e1b1a20, 0x2c6ee: 0x6e1b1c20, 0x2c6ef: 0x6e1b1e20, + 0x2c6f0: 0x6e30f020, 0x2c6f1: 0x6e37c020, 0x2c6f2: 0x6e3c5220, 0x2c6f3: 0x6e3c5420, + 0x2c6f4: 0x6e3c5620, 0x2c6f5: 0x6e3fc620, 0x2c6f6: 0x6ddf8c20, 0x2c6f7: 0x6df7e220, + 0x2c6f8: 0x6e27ae20, 0x2c6f9: 0x6e37e420, 0x2c6fa: 0x6d9f7620, 0x2c6fb: 0x6e37e820, + 0x2c6fc: 0x6e37ea20, 0x2c6fd: 0x6ddfa420, 0x2c6fe: 0x6ddfa620, 0x2c6ff: 0x6ddfa820, + // Block 0xb1c, offset 0x2c700 + 0x2c700: 0x6df7f620, 0x2c701: 0x6e1b6c20, 0x2c702: 0x6d9f8020, 0x2c703: 0x6dc20020, + 0x2c704: 0x6ddfb620, 0x2c705: 0x6df80a20, 0x2c706: 0x6e1b7e20, 0x2c707: 0x6e27d620, + 0x2c708: 0x6e311820, 0x2c709: 0x6e311a20, 0x2c70a: 0x6ddfdc20, 0x2c70b: 0x6ddfde20, + 0x2c70c: 0x6df82020, 0x2c70d: 0x6e0bc420, 0x2c70e: 0x6e0bc620, 0x2c70f: 0x6e1b8820, + 0x2c710: 0x6e424c20, 0x2c711: 0x6e45a820, 0x2c712: 0x6dc22820, 0x2c713: 0x6dc22a20, + 0x2c714: 0x6ddff420, 0x2c715: 0x6df83a20, 0x2c716: 0x6df83c20, 0x2c717: 0x6e0bd420, + 0x2c718: 0x6e0bd620, 0x2c719: 0x6e0bd820, 0x2c71a: 0x6e1ba020, 0x2c71b: 0x6e1ba220, + 0x2c71c: 0x6e27fc20, 0x2c71d: 0x6e27fe20, 0x2c71e: 0x6e314620, 0x2c71f: 0x6e314820, + 0x2c720: 0x6e380c20, 0x2c721: 0x6e380e20, 0x2c722: 0x6e381020, 0x2c723: 0x6e3ca420, + 0x2c724: 0x6e3ca620, 0x2c725: 0x6e3fe620, 0x2c726: 0x6e3fe820, 0x2c727: 0x6e425620, + 0x2c728: 0x6e440420, 0x2c729: 0x6e450c20, 0x2c72a: 0x6e450e20, 0x2c72b: 0x6e46da20, + 0x2c72c: 0x6e283620, 0x2c72d: 0x6e0c2020, 0x2c72e: 0x6e0c2220, 0x2c72f: 0x6df86420, + 0x2c730: 0x6e0c2420, 0x2c731: 0x6e1be620, 0x2c732: 0x6e1be820, 0x2c733: 0x6e1bfe20, + 0x2c734: 0x6e3cd820, 0x2c735: 0x6e427e20, + // Block 0xb1d, offset 0x2c740 + 0x2c740: 0x6c000220, 0x2c741: 0x6c003220, 0x2c742: 0x6c003420, 0x2c743: 0x6c003620, + 0x2c744: 0x6c003820, 0x2c745: 0x6c003a20, 0x2c746: 0x6c003c20, 0x2c747: 0x6c00d820, + 0x2c748: 0x6c00da20, 0x2c749: 0x6c00dc20, 0x2c74a: 0x6c00de20, 0x2c74b: 0x6c00e020, + 0x2c74c: 0x6c00e220, 0x2c74d: 0x6c021a20, 0x2c74e: 0x6c021c20, 0x2c74f: 0x6c021e20, + 0x2c750: 0x6c022020, 0x2c751: 0x6c022220, 0x2c752: 0x6c022420, 0x2c753: 0x6c022620, + 0x2c754: 0x6c054020, 0x2c755: 0x6c054220, 0x2c756: 0x6c054420, 0x2c757: 0x6c053c20, + 0x2c758: 0x6c054620, 0x2c759: 0x6c054820, 0x2c75a: 0x6c054a20, 0x2c75b: 0x6c054c20, + 0x2c75c: 0x6c054e20, 0x2c75d: 0x6c055020, 0x2c75e: 0x6c0ad020, 0x2c75f: 0x6c0ad220, + 0x2c760: 0x6c0ad420, 0x2c761: 0x6c0ad620, 0x2c762: 0x6c0ad820, 0x2c763: 0x6c15e420, + 0x2c764: 0x6c15e620, 0x2c765: 0x6c15e820, 0x2c766: 0x6c28ae20, 0x2c767: 0x6c28b020, + 0x2c768: 0x6c000420, 0x2c769: 0x6c004420, 0x2c76a: 0x6c00fa20, 0x2c76b: 0x6c00fc20, + 0x2c76c: 0x6c04e220, 0x2c76d: 0x6c023620, 0x2c76e: 0x6c023820, 0x2c76f: 0x6c023a20, + 0x2c770: 0x6c023c20, 0x2c771: 0x6c056820, 0x2c772: 0x6c160020, 0x2c773: 0x6c28c420, + 0x2c774: 0x6c42f620, 0x2c775: 0x6c63d820, 0x2c776: 0x6c000620, 0x2c777: 0x6c004a20, + 0x2c778: 0x6c00fe20, 0x2c779: 0x6c024220, 0x2c77a: 0x6c024420, 0x2c77b: 0x6c056c20, + 0x2c77c: 0x6c056e20, 0x2c77d: 0x6c15ea20, 0x2c77e: 0x6c430020, 0x2c77f: 0x6c000820, + // Block 0xb1e, offset 0x2c780 + 0x2c780: 0x6c000a20, 0x2c781: 0x6c000c20, 0x2c782: 0x6c005020, 0x2c783: 0x6c005220, + 0x2c784: 0x6c005420, 0x2c785: 0x6c010620, 0x2c786: 0x6c010820, 0x2c787: 0x6c010a20, + 0x2c788: 0x6c010c20, 0x2c789: 0x6c010020, 0x2c78a: 0x6c010e20, 0x2c78b: 0x6c024820, + 0x2c78c: 0x6c024a20, 0x2c78d: 0x6c057420, 0x2c78e: 0x6c057620, 0x2c78f: 0x6c057820, + 0x2c790: 0x6c057a20, 0x2c791: 0x6c0af020, 0x2c792: 0x6c0af220, 0x2c793: 0x6c0af420, + 0x2c794: 0x6c0af620, 0x2c795: 0x6c160620, 0x2c796: 0x6c28d020, 0x2c797: 0x6c430220, + 0x2c798: 0x6c63e020, 0x2c799: 0x6c001020, 0x2c79a: 0x6c001220, 0x2c79b: 0x6c001420, + 0x2c79c: 0x6c006020, 0x2c79d: 0x6c006220, 0x2c79e: 0x6c012020, 0x2c79f: 0x6c012220, + 0x2c7a0: 0x6c012420, 0x2c7a1: 0x6c01d020, 0x2c7a2: 0x6c041020, 0x2c7a3: 0x6c025c20, + 0x2c7a4: 0x6c025e20, 0x2c7a5: 0x6c026020, 0x2c7a6: 0x6c026220, 0x2c7a7: 0x6c05a020, + 0x2c7a8: 0x6c0b1a20, 0x2c7a9: 0x6c0b1c20, 0x2c7aa: 0x6c0b1e20, 0x2c7ab: 0x6c0b2020, + 0x2c7ac: 0x6c0b2220, 0x2c7ad: 0x6c0b2420, 0x2c7ae: 0x6c0b2620, 0x2c7af: 0x6c0b2820, + 0x2c7b0: 0x6c0b2a20, 0x2c7b1: 0x6c161020, 0x2c7b2: 0x6c161220, 0x2c7b3: 0x6c28de20, + 0x2c7b4: 0x6c28e020, 0x2c7b5: 0x6c28e220, 0x2c7b6: 0x6c28e420, 0x2c7b7: 0x6c28e620, + 0x2c7b8: 0x6c28e820, 0x2c7b9: 0x6c431420, 0x2c7ba: 0x6c431620, 0x2c7bb: 0x6c431820, + 0x2c7bc: 0x6c431a20, 0x2c7bd: 0x6c63f220, 0x2c7be: 0x6c8b0c20, 0x2c7bf: 0x6c8b0e20, + // Block 0xb1f, offset 0x2c7c0 + 0x2c7c0: 0x6c8b1020, 0x2c7c1: 0x6cb7b220, 0x2c7c2: 0x6ce8d220, 0x2c7c3: 0x6ce8d420, + 0x2c7c4: 0x6ce8d620, 0x2c7c5: 0x6c002420, 0x2c7c6: 0x6c006a20, 0x2c7c7: 0x6c012c20, + 0x2c7c8: 0x6c027a20, 0x2c7c9: 0x6c0b3820, 0x2c7ca: 0x6c162020, 0x2c7cb: 0x6c28f420, + 0x2c7cc: 0x6c007420, 0x2c7cd: 0x6c013020, 0x2c7ce: 0x6c013220, 0x2c7cf: 0x6c013420, + 0x2c7d0: 0x6c00e420, 0x2c7d1: 0x6c028220, 0x2c7d2: 0x6c028420, 0x2c7d3: 0x6c028620, + 0x2c7d4: 0x6c028820, 0x2c7d5: 0x6c028a20, 0x2c7d6: 0x6c028c20, 0x2c7d7: 0x6c05b020, + 0x2c7d8: 0x6c0b3e20, 0x2c7d9: 0x6c0b4020, 0x2c7da: 0x6c0b4220, 0x2c7db: 0x6c28f820, + 0x2c7dc: 0x6c162a20, 0x2c7dd: 0x6c28fc20, 0x2c7de: 0x6c28fe20, 0x2c7df: 0x6c290020, + 0x2c7e0: 0x6c007c20, 0x2c7e1: 0x6c013620, 0x2c7e2: 0x6c029020, 0x2c7e3: 0x6c029220, + 0x2c7e4: 0x6c0b5420, 0x2c7e5: 0x6c0b5620, 0x2c7e6: 0x6c0b5820, 0x2c7e7: 0x6c0b5a20, + 0x2c7e8: 0x6c163620, 0x2c7e9: 0x6c163820, 0x2c7ea: 0x6c163a20, 0x2c7eb: 0x6c290e20, + 0x2c7ec: 0x6c291020, 0x2c7ed: 0x6c433420, 0x2c7ee: 0x6c433620, 0x2c7ef: 0x6c433820, + 0x2c7f0: 0x6c433a20, 0x2c7f1: 0x6c433c20, 0x2c7f2: 0x6c433e20, 0x2c7f3: 0x6c640a20, + 0x2c7f4: 0x6cb7c020, 0x2c7f5: 0x6cb7c220, 0x2c7f6: 0x6ce8e620, 0x2c7f7: 0x6ce8e820, + 0x2c7f8: 0x6d75da20, 0x2c7f9: 0x6e1c0620, 0x2c7fa: 0x6c007e20, 0x2c7fb: 0x6c008020, + 0x2c7fc: 0x6c013820, 0x2c7fd: 0x6c013a20, 0x2c7fe: 0x6c013c20, 0x2c7ff: 0x6c013e20, + // Block 0xb20, offset 0x2c800 + 0x2c800: 0x6c029620, 0x2c801: 0x6c029820, 0x2c802: 0x6c029a20, 0x2c803: 0x6c029c20, + 0x2c804: 0x6c029e20, 0x2c805: 0x6c02a020, 0x2c806: 0x6c02a220, 0x2c807: 0x6c02a420, + 0x2c808: 0x6c02a620, 0x2c809: 0x6c02a820, 0x2c80a: 0x6c02aa20, 0x2c80b: 0x6c02ac20, + 0x2c80c: 0x6c02ae20, 0x2c80d: 0x6c02b020, 0x2c80e: 0x6c02b220, 0x2c80f: 0x6c02b420, + 0x2c810: 0x6c02b620, 0x2c811: 0x6c02b820, 0x2c812: 0x6c02ba20, 0x2c813: 0x6c02bc20, + 0x2c814: 0x6c05c820, 0x2c815: 0x6c05ca20, 0x2c816: 0x6c05cc20, 0x2c817: 0x6c05ce20, + 0x2c818: 0x6c05d020, 0x2c819: 0x6c05d220, 0x2c81a: 0x6c05d420, 0x2c81b: 0x6c05d620, + 0x2c81c: 0x6c05d820, 0x2c81d: 0x6c05da20, 0x2c81e: 0x6c05dc20, 0x2c81f: 0x6c05de20, + 0x2c820: 0x6c05e020, 0x2c821: 0x6c05e220, 0x2c822: 0x6c05e420, 0x2c823: 0x6c05e620, + 0x2c824: 0x6c05e820, 0x2c825: 0x6c05ea20, 0x2c826: 0x6c05ec20, 0x2c827: 0x6c05ee20, + 0x2c828: 0x6c05f020, 0x2c829: 0x6c05f220, 0x2c82a: 0x6c05f420, 0x2c82b: 0x6c05f620, + 0x2c82c: 0x6c05f820, 0x2c82d: 0x6c05fa20, 0x2c82e: 0x6c0b7a20, 0x2c82f: 0x6c0b7c20, + 0x2c830: 0x6c0b7e20, 0x2c831: 0x6c0b8020, 0x2c832: 0x6c0b8220, 0x2c833: 0x6c0b8420, + 0x2c834: 0x6c0b8620, 0x2c835: 0x6c0b8820, 0x2c836: 0x6c0b8a20, 0x2c837: 0x6c0b8c20, + 0x2c838: 0x6c0b8e20, 0x2c839: 0x6c0b9020, 0x2c83a: 0x6c0b9220, 0x2c83b: 0x6c0b9420, + 0x2c83c: 0x6c0b9620, 0x2c83d: 0x6c0b9820, 0x2c83e: 0x6c0b9a20, 0x2c83f: 0x6c0b9c20, + // Block 0xb21, offset 0x2c840 + 0x2c840: 0x6c0b9e20, 0x2c841: 0x6c0ba020, 0x2c842: 0x6c0ba220, 0x2c843: 0x6c0ba420, + 0x2c844: 0x6c0ba620, 0x2c845: 0x6c0ba820, 0x2c846: 0x6c0baa20, 0x2c847: 0x6c0bac20, + 0x2c848: 0x6c0bae20, 0x2c849: 0x6c0bb020, 0x2c84a: 0x6c0bb220, 0x2c84b: 0x6c0bb420, + 0x2c84c: 0x6c0bb620, 0x2c84d: 0x6c0bb820, 0x2c84e: 0x6c0bba20, 0x2c84f: 0x6c0bbc20, + 0x2c850: 0x6c0bbe20, 0x2c851: 0x6c0bc020, 0x2c852: 0x6c0bc220, 0x2c853: 0x6c0bc420, + 0x2c854: 0x6c0bc620, 0x2c855: 0x6c0bc820, 0x2c856: 0x6c0bca20, 0x2c857: 0x6c0bcc20, + 0x2c858: 0x6c0bce20, 0x2c859: 0x6c0bd020, 0x2c85a: 0x6c0bd220, 0x2c85b: 0x6c0bd420, + 0x2c85c: 0x6c0bd620, 0x2c85d: 0x6c0bd820, 0x2c85e: 0x6c0bda20, 0x2c85f: 0x6c0bdc20, + 0x2c860: 0x6c0bde20, 0x2c861: 0x6c0be020, 0x2c862: 0x6c0be220, 0x2c863: 0x6c0be420, + 0x2c864: 0x6c0be620, 0x2c865: 0x6c0be820, 0x2c866: 0x6c0bea20, 0x2c867: 0x6c0bec20, + 0x2c868: 0x6c0bee20, 0x2c869: 0x6c0bf020, 0x2c86a: 0x6c0bf220, 0x2c86b: 0x6c0bf420, + 0x2c86c: 0x6c0bf620, 0x2c86d: 0x6c165620, 0x2c86e: 0x6c165820, 0x2c86f: 0x6c165a20, + 0x2c870: 0x6c165c20, 0x2c871: 0x6c165e20, 0x2c872: 0x6c166020, 0x2c873: 0x6c166220, + 0x2c874: 0x6c166420, 0x2c875: 0x6c166620, 0x2c876: 0x6c166820, 0x2c877: 0x6c166a20, + 0x2c878: 0x6c166c20, 0x2c879: 0x6c166e20, 0x2c87a: 0x6c167020, 0x2c87b: 0x6c167220, + 0x2c87c: 0x6c167420, 0x2c87d: 0x6c167620, 0x2c87e: 0x6c167820, 0x2c87f: 0x6c167a20, + // Block 0xb22, offset 0x2c880 + 0x2c880: 0x6c167c20, 0x2c881: 0x6c167e20, 0x2c882: 0x6c168020, 0x2c883: 0x6c168220, + 0x2c884: 0x6c168420, 0x2c885: 0x6c168620, 0x2c886: 0x6c168820, 0x2c887: 0x6c168a20, + 0x2c888: 0x6c168c20, 0x2c889: 0x6c168e20, 0x2c88a: 0x6c169020, 0x2c88b: 0x6c169220, + 0x2c88c: 0x6c292020, 0x2c88d: 0x6c169420, 0x2c88e: 0x6c169620, 0x2c88f: 0x6c169820, + 0x2c890: 0x6c169a20, 0x2c891: 0x6c169c20, 0x2c892: 0x6c169e20, 0x2c893: 0x6c16a020, + 0x2c894: 0x6c16a220, 0x2c895: 0x6c16a420, 0x2c896: 0x6c16a620, 0x2c897: 0x6c16a820, + 0x2c898: 0x6c16aa20, 0x2c899: 0x6c16ac20, 0x2c89a: 0x6c16ae20, 0x2c89b: 0x6c16b020, + 0x2c89c: 0x6c16b220, 0x2c89d: 0x6c16b420, 0x2c89e: 0x6c16b620, 0x2c89f: 0x6c16b820, + 0x2c8a0: 0x6c16ba20, 0x2c8a1: 0x6c16bc20, 0x2c8a2: 0x6c16be20, 0x2c8a3: 0x6c16c020, + 0x2c8a4: 0x6c0bf820, 0x2c8a5: 0x6c16c220, 0x2c8a6: 0x6c16c420, 0x2c8a7: 0x6c16c620, + 0x2c8a8: 0x6c16c820, 0x2c8a9: 0x6c293e20, 0x2c8aa: 0x6c294020, 0x2c8ab: 0x6c294220, + 0x2c8ac: 0x6c294420, 0x2c8ad: 0x6c294620, 0x2c8ae: 0x6c294820, 0x2c8af: 0x6c294a20, + 0x2c8b0: 0x6c294c20, 0x2c8b1: 0x6c294e20, 0x2c8b2: 0x6c295020, 0x2c8b3: 0x6c295220, + 0x2c8b4: 0x6c295420, 0x2c8b5: 0x6c295620, 0x2c8b6: 0x6c295820, 0x2c8b7: 0x6c295a20, + 0x2c8b8: 0x6c295c20, 0x2c8b9: 0x6c295e20, 0x2c8ba: 0x6c296020, 0x2c8bb: 0x6c296220, + 0x2c8bc: 0x6c296420, 0x2c8bd: 0x6c296620, 0x2c8be: 0x6c296820, 0x2c8bf: 0x6c296a20, + // Block 0xb23, offset 0x2c8c0 + 0x2c8c0: 0x6c296c20, 0x2c8c1: 0x6c296e20, 0x2c8c2: 0x6c297020, 0x2c8c3: 0x6c297220, + 0x2c8c4: 0x6c297420, 0x2c8c5: 0x6c297620, 0x2c8c6: 0x6c297820, 0x2c8c7: 0x6c297a20, + 0x2c8c8: 0x6c297c20, 0x2c8c9: 0x6c297e20, 0x2c8ca: 0x6c298020, 0x2c8cb: 0x6c298220, + 0x2c8cc: 0x6c298420, 0x2c8cd: 0x6c298620, 0x2c8ce: 0x6c298820, 0x2c8cf: 0x6c298a20, + 0x2c8d0: 0x6c298c20, 0x2c8d1: 0x6c298e20, 0x2c8d2: 0x6c299020, 0x2c8d3: 0x6c299220, + 0x2c8d4: 0x6c299420, 0x2c8d5: 0x6c299620, 0x2c8d6: 0x6c299820, 0x2c8d7: 0x6c299a20, + 0x2c8d8: 0x6c299c20, 0x2c8d9: 0x6c299e20, 0x2c8da: 0x6c29a020, 0x2c8db: 0x6c29a220, + 0x2c8dc: 0x6c29a420, 0x2c8dd: 0x6c29a620, 0x2c8de: 0x6c29a820, 0x2c8df: 0x6c29aa20, + 0x2c8e0: 0x6c29ac20, 0x2c8e1: 0x6c29ae20, 0x2c8e2: 0x6c29b020, 0x2c8e3: 0x6c29b220, + 0x2c8e4: 0x6c29b420, 0x2c8e5: 0x6c29b620, 0x2c8e6: 0x6c29b820, 0x2c8e7: 0x6c29ba20, + 0x2c8e8: 0x6c29bc20, 0x2c8e9: 0x6c29be20, 0x2c8ea: 0x6c29c020, 0x2c8eb: 0x6c29c220, + 0x2c8ec: 0x6c29c420, 0x2c8ed: 0x6c29c620, 0x2c8ee: 0x6c435e20, 0x2c8ef: 0x6c436020, + 0x2c8f0: 0x6c436220, 0x2c8f1: 0x6c436420, 0x2c8f2: 0x6c436620, 0x2c8f3: 0x6c436820, + 0x2c8f4: 0x6c436a20, 0x2c8f5: 0x6c436c20, 0x2c8f6: 0x6c436e20, 0x2c8f7: 0x6c437020, + 0x2c8f8: 0x6c437220, 0x2c8f9: 0x6c437420, 0x2c8fa: 0x6c437620, 0x2c8fb: 0x6c437820, + 0x2c8fc: 0x6c437a20, 0x2c8fd: 0x6c437c20, 0x2c8fe: 0x6c437e20, 0x2c8ff: 0x6c438020, + // Block 0xb24, offset 0x2c900 + 0x2c900: 0x6c438220, 0x2c901: 0x6c438420, 0x2c902: 0x6c438620, 0x2c903: 0x6c438820, + 0x2c904: 0x6c438a20, 0x2c905: 0x6c438c20, 0x2c906: 0x6c438e20, 0x2c907: 0x6c439020, + 0x2c908: 0x6c439220, 0x2c909: 0x6c439420, 0x2c90a: 0x6c439620, 0x2c90b: 0x6c439820, + 0x2c90c: 0x6c439a20, 0x2c90d: 0x6c439c20, 0x2c90e: 0x6c439e20, 0x2c90f: 0x6c43a020, + 0x2c910: 0x6c43a220, 0x2c911: 0x6c43a420, 0x2c912: 0x6c43a620, 0x2c913: 0x6c43a820, + 0x2c914: 0x6c43aa20, 0x2c915: 0x6c43ac20, 0x2c916: 0x6c43ae20, 0x2c917: 0x6c43b020, + 0x2c918: 0x6c43b220, 0x2c919: 0x6c43b420, 0x2c91a: 0x6c43b620, 0x2c91b: 0x6c43b820, + 0x2c91c: 0x6c43ba20, 0x2c91d: 0x6c43bc20, 0x2c91e: 0x6c43be20, 0x2c91f: 0x6c43c020, + 0x2c920: 0x6c43c220, 0x2c921: 0x6c43c420, 0x2c922: 0x6c43c620, 0x2c923: 0x6c43c820, + 0x2c924: 0x6c43ca20, 0x2c925: 0x6c43cc20, 0x2c926: 0x6c43ce20, 0x2c927: 0x6c43d020, + 0x2c928: 0x6c43d220, 0x2c929: 0x6c43d420, 0x2c92a: 0x6c43d620, 0x2c92b: 0x6c43d820, + 0x2c92c: 0x6c43da20, 0x2c92d: 0x6c43dc20, 0x2c92e: 0x6c642e20, 0x2c92f: 0x6c643020, + 0x2c930: 0x6c643220, 0x2c931: 0x6c643420, 0x2c932: 0x6c643620, 0x2c933: 0x6c643820, + 0x2c934: 0x6c643a20, 0x2c935: 0x6c643c20, 0x2c936: 0x6c643e20, 0x2c937: 0x6c644020, + 0x2c938: 0x6c644220, 0x2c939: 0x6c644420, 0x2c93a: 0x6c644620, 0x2c93b: 0x6c644820, + 0x2c93c: 0x6c644a20, 0x2c93d: 0x6c644c20, 0x2c93e: 0x6c644e20, 0x2c93f: 0x6c645020, + // Block 0xb25, offset 0x2c940 + 0x2c940: 0x6c645220, 0x2c941: 0x6c645420, 0x2c942: 0x6c645620, 0x2c943: 0x6c645820, + 0x2c944: 0x6c645a20, 0x2c945: 0x6c645c20, 0x2c946: 0x6c645e20, 0x2c947: 0x6c646020, + 0x2c948: 0x6c646220, 0x2c949: 0x6c646420, 0x2c94a: 0x6c646620, 0x2c94b: 0x6c646820, + 0x2c94c: 0x6c646a20, 0x2c94d: 0x6c646c20, 0x2c94e: 0x6c646e20, 0x2c94f: 0x6c647020, + 0x2c950: 0x6c647220, 0x2c951: 0x6c647420, 0x2c952: 0x6c647620, 0x2c953: 0x6c647820, + 0x2c954: 0x6c647a20, 0x2c955: 0x6c647c20, 0x2c956: 0x6c647e20, 0x2c957: 0x6c648020, + 0x2c958: 0x6c648220, 0x2c959: 0x6c648420, 0x2c95a: 0x6c648620, 0x2c95b: 0x6c648820, + 0x2c95c: 0x6c648a20, 0x2c95d: 0x6c648c20, 0x2c95e: 0x6c648e20, 0x2c95f: 0x6c649020, + 0x2c960: 0x6c649220, 0x2c961: 0x6c649420, 0x2c962: 0x6c649620, 0x2c963: 0x6c649820, + 0x2c964: 0x6c649a20, 0x2c965: 0x6c649c20, 0x2c966: 0x6c649e20, 0x2c967: 0x6c64a020, + 0x2c968: 0x6c64a220, 0x2c969: 0x6c64a420, 0x2c96a: 0x6c64a620, 0x2c96b: 0x6c64a820, + 0x2c96c: 0x6c64aa20, 0x2c96d: 0x6c64ac20, 0x2c96e: 0x6c64ae20, 0x2c96f: 0x6c64b020, + 0x2c970: 0x6c64b220, 0x2c971: 0x6c64b420, 0x2c972: 0x6c64b620, 0x2c973: 0x6c64b820, + 0x2c974: 0x6c64ba20, 0x2c975: 0x6c64bc20, 0x2c976: 0x6c64be20, 0x2c977: 0x6c64c020, + 0x2c978: 0x6c64c220, 0x2c979: 0x6c64c420, 0x2c97a: 0x6c64c620, 0x2c97b: 0x6c64c820, + 0x2c97c: 0x6c64ca20, 0x2c97d: 0x6c64cc20, 0x2c97e: 0x6c64ce20, 0x2c97f: 0x6c64d020, + // Block 0xb26, offset 0x2c980 + 0x2c980: 0x6c8b4a20, 0x2c981: 0x6c8b4c20, 0x2c982: 0x6c8b4e20, 0x2c983: 0x6c8b5020, + 0x2c984: 0x6c8b5220, 0x2c985: 0x6c8b5420, 0x2c986: 0x6c8b5620, 0x2c987: 0x6c8b5820, + 0x2c988: 0x6c8b5a20, 0x2c989: 0x6c8b5c20, 0x2c98a: 0x6c8b5e20, 0x2c98b: 0x6c8b6020, + 0x2c98c: 0x6c8b6220, 0x2c98d: 0x6c8b6420, 0x2c98e: 0x6c8b6620, 0x2c98f: 0x6c8b6820, + 0x2c990: 0x6c8b6a20, 0x2c991: 0x6c8b6c20, 0x2c992: 0x6c8b6e20, 0x2c993: 0x6c8b7020, + 0x2c994: 0x6c8b7220, 0x2c995: 0x6c8b7420, 0x2c996: 0x6c656e20, 0x2c997: 0x6c8b7620, + 0x2c998: 0x6c8b7820, 0x2c999: 0x6c8b7a20, 0x2c99a: 0x6c8b7c20, 0x2c99b: 0x6c8b7e20, + 0x2c99c: 0x6c8b8020, 0x2c99d: 0x6c8b8220, 0x2c99e: 0x6c8b8420, 0x2c99f: 0x6c8b8620, + 0x2c9a0: 0x6c8b8820, 0x2c9a1: 0x6c8b8a20, 0x2c9a2: 0x6c8b8c20, 0x2c9a3: 0x6c8b8e20, + 0x2c9a4: 0x6c8b9020, 0x2c9a5: 0x6c8b9220, 0x2c9a6: 0x6c8b9420, 0x2c9a7: 0x6c8b9620, + 0x2c9a8: 0x6cb7d820, 0x2c9a9: 0x6c8b9820, 0x2c9aa: 0x6c8b9a20, 0x2c9ab: 0x6c8b9c20, + 0x2c9ac: 0x6c8b9e20, 0x2c9ad: 0x6c8ba020, 0x2c9ae: 0x6c8ba220, 0x2c9af: 0x6c8ba420, + 0x2c9b0: 0x6c8ba620, 0x2c9b1: 0x6c8ba820, 0x2c9b2: 0x6c8baa20, 0x2c9b3: 0x6c8bac20, + 0x2c9b4: 0x6c8bae20, 0x2c9b5: 0x6c8bb020, 0x2c9b6: 0x6c8bb220, 0x2c9b7: 0x6c8bb420, + 0x2c9b8: 0x6c8bb620, 0x2c9b9: 0x6c8bb820, 0x2c9ba: 0x6c8bba20, 0x2c9bb: 0x6c8bbc20, + 0x2c9bc: 0x6c8bbe20, 0x2c9bd: 0x6c8bc020, 0x2c9be: 0x6c8bc220, 0x2c9bf: 0x6c8bc420, + // Block 0xb27, offset 0x2c9c0 + 0x2c9c0: 0x6cb7ea20, 0x2c9c1: 0x6cb7ec20, 0x2c9c2: 0x6cb7ee20, 0x2c9c3: 0x6cb7f020, + 0x2c9c4: 0x6cb7f220, 0x2c9c5: 0x6cb7f420, 0x2c9c6: 0x6cb7f620, 0x2c9c7: 0x6cb7f820, + 0x2c9c8: 0x6cb7fa20, 0x2c9c9: 0x6cb7fc20, 0x2c9ca: 0x6cb7fe20, 0x2c9cb: 0x6cb80020, + 0x2c9cc: 0x6cb80220, 0x2c9cd: 0x6cb80420, 0x2c9ce: 0x6cb80620, 0x2c9cf: 0x6cb80820, + 0x2c9d0: 0x6cb80a20, 0x2c9d1: 0x6cb80c20, 0x2c9d2: 0x6cb80e20, 0x2c9d3: 0x6cb81020, + 0x2c9d4: 0x6cb81220, 0x2c9d5: 0x6cb81420, 0x2c9d6: 0x6cb81620, 0x2c9d7: 0x6cb81820, + 0x2c9d8: 0x6cb81a20, 0x2c9d9: 0x6cb81c20, 0x2c9da: 0x6cb81e20, 0x2c9db: 0x6cb82020, + 0x2c9dc: 0x6cb82220, 0x2c9dd: 0x6cb82420, 0x2c9de: 0x6cb82620, 0x2c9df: 0x6cb82820, + 0x2c9e0: 0x6cb82a20, 0x2c9e1: 0x6cb82c20, 0x2c9e2: 0x6cb82e20, 0x2c9e3: 0x6cb83020, + 0x2c9e4: 0x6cb83220, 0x2c9e5: 0x6cb83420, 0x2c9e6: 0x6cb83620, 0x2c9e7: 0x6cb83820, + 0x2c9e8: 0x6cb83a20, 0x2c9e9: 0x6cb83c20, 0x2c9ea: 0x6ce90c20, 0x2c9eb: 0x6ce90e20, + 0x2c9ec: 0x6ce91020, 0x2c9ed: 0x6ce91220, 0x2c9ee: 0x6ce91420, 0x2c9ef: 0x6ce91620, + 0x2c9f0: 0x6ce91820, 0x2c9f1: 0x6ce91a20, 0x2c9f2: 0x6ce91c20, 0x2c9f3: 0x6ce91e20, + 0x2c9f4: 0x6ce92020, 0x2c9f5: 0x6ce92220, 0x2c9f6: 0x6ce92420, 0x2c9f7: 0x6ce92620, + 0x2c9f8: 0x6ce92820, 0x2c9f9: 0x6ce92a20, 0x2c9fa: 0x6ce92c20, 0x2c9fb: 0x6ce92e20, + 0x2c9fc: 0x6ce93020, 0x2c9fd: 0x6ce93220, 0x2c9fe: 0x6ce93420, 0x2c9ff: 0x6ce93620, + // Block 0xb28, offset 0x2ca00 + 0x2ca00: 0x6ce93820, 0x2ca01: 0x6ce93a20, 0x2ca02: 0x6ce93c20, 0x2ca03: 0x6ce93e20, + 0x2ca04: 0x6ce94020, 0x2ca05: 0x6ce94220, 0x2ca06: 0x6ce94420, 0x2ca07: 0x6ce94620, + 0x2ca08: 0x6ce94820, 0x2ca09: 0x6ce94a20, 0x2ca0a: 0x6ce94c20, 0x2ca0b: 0x6ce94e20, + 0x2ca0c: 0x6ce95020, 0x2ca0d: 0x6ce95220, 0x2ca0e: 0x6d18cc20, 0x2ca0f: 0x6d18ce20, + 0x2ca10: 0x6d18d020, 0x2ca11: 0x6d18d220, 0x2ca12: 0x6d18d420, 0x2ca13: 0x6d18d620, + 0x2ca14: 0x6d18d820, 0x2ca15: 0x6d18da20, 0x2ca16: 0x6d18dc20, 0x2ca17: 0x6d18de20, + 0x2ca18: 0x6d18e020, 0x2ca19: 0x6d18e220, 0x2ca1a: 0x6d18e420, 0x2ca1b: 0x6d18e620, + 0x2ca1c: 0x6d18e820, 0x2ca1d: 0x6d18ea20, 0x2ca1e: 0x6d18ec20, 0x2ca1f: 0x6d18ee20, + 0x2ca20: 0x6d18f020, 0x2ca21: 0x6d18f220, 0x2ca22: 0x6d18f420, 0x2ca23: 0x6d18f620, + 0x2ca24: 0x6d18f820, 0x2ca25: 0x6d18fa20, 0x2ca26: 0x6d18fc20, 0x2ca27: 0x6d18fe20, + 0x2ca28: 0x6d190020, 0x2ca29: 0x6d190220, 0x2ca2a: 0x6d190420, 0x2ca2b: 0x6d190620, + 0x2ca2c: 0x6d190820, 0x2ca2d: 0x6d190a20, 0x2ca2e: 0x6d190c20, 0x2ca2f: 0x6d190e20, + 0x2ca30: 0x6d191020, 0x2ca31: 0x6d191220, 0x2ca32: 0x6d19b420, 0x2ca33: 0x6d191420, + 0x2ca34: 0x6d191620, 0x2ca35: 0x6d47c220, 0x2ca36: 0x6d47c420, 0x2ca37: 0x6d191820, + 0x2ca38: 0x6d47c620, 0x2ca39: 0x6d47c820, 0x2ca3a: 0x6d47ca20, 0x2ca3b: 0x6d47cc20, + 0x2ca3c: 0x6d47ce20, 0x2ca3d: 0x6d47d020, 0x2ca3e: 0x6d47d220, 0x2ca3f: 0x6d47d420, + // Block 0xb29, offset 0x2ca40 + 0x2ca40: 0x6d47d620, 0x2ca41: 0x6d47d820, 0x2ca42: 0x6d47da20, 0x2ca43: 0x6d47dc20, + 0x2ca44: 0x6d47de20, 0x2ca45: 0x6d47e020, 0x2ca46: 0x6d47e220, 0x2ca47: 0x6d47e420, + 0x2ca48: 0x6d47e620, 0x2ca49: 0x6d47e820, 0x2ca4a: 0x6d47ea20, 0x2ca4b: 0x6d47ec20, + 0x2ca4c: 0x6d47ee20, 0x2ca4d: 0x6d47f020, 0x2ca4e: 0x6d47f220, 0x2ca4f: 0x6d47f420, + 0x2ca50: 0x6d75fc20, 0x2ca51: 0x6d75fe20, 0x2ca52: 0x6d760020, 0x2ca53: 0x6d760220, + 0x2ca54: 0x6d760420, 0x2ca55: 0x6d760620, 0x2ca56: 0x6d760820, 0x2ca57: 0x6d760a20, + 0x2ca58: 0x6d760c20, 0x2ca59: 0x6d760e20, 0x2ca5a: 0x6d761020, 0x2ca5b: 0x6d761220, + 0x2ca5c: 0x6d761420, 0x2ca5d: 0x6d761620, 0x2ca5e: 0x6d761820, 0x2ca5f: 0x6d9fae20, + 0x2ca60: 0x6d9fb020, 0x2ca61: 0x6d9fb220, 0x2ca62: 0x6d9fb420, 0x2ca63: 0x6d9fb620, + 0x2ca64: 0x6d9fb820, 0x2ca65: 0x6d9fba20, 0x2ca66: 0x6d9fbc20, 0x2ca67: 0x6d9fbe20, + 0x2ca68: 0x6d9fc020, 0x2ca69: 0x6d9fc220, 0x2ca6a: 0x6d9fc420, 0x2ca6b: 0x6d761a20, + 0x2ca6c: 0x6d9fc620, 0x2ca6d: 0x6dc24e20, 0x2ca6e: 0x6dc25020, 0x2ca6f: 0x6dc25220, + 0x2ca70: 0x6d485a20, 0x2ca71: 0x6dc25420, 0x2ca72: 0x6da00220, 0x2ca73: 0x6de01420, + 0x2ca74: 0x6de01620, 0x2ca75: 0x6de01820, 0x2ca76: 0x6df87420, 0x2ca77: 0x6e0c4220, + 0x2ca78: 0x6e0c4420, 0x2ca79: 0x6e0c4620, 0x2ca7a: 0x6e0c4820, 0x2ca7b: 0x6e1c0820, + 0x2ca7c: 0x6e1c0a20, 0x2ca7d: 0x6e284c20, 0x2ca7e: 0x6e318820, 0x2ca7f: 0x6c008420, + // Block 0xb2a, offset 0x2ca80 + 0x2ca80: 0x6c014620, 0x2ca81: 0x6c02c620, 0x2ca82: 0x6c02c820, 0x2ca83: 0x6c02ca20, + 0x2ca84: 0x6c060e20, 0x2ca85: 0x6c061420, 0x2ca86: 0x6c0c4620, 0x2ca87: 0x6c0c4820, + 0x2ca88: 0x6c0c4a20, 0x2ca89: 0x6c0c4c20, 0x2ca8a: 0x6c0c4e20, 0x2ca8b: 0x6c173420, + 0x2ca8c: 0x6c173620, 0x2ca8d: 0x6c173820, 0x2ca8e: 0x6c173a20, 0x2ca8f: 0x6c173c20, + 0x2ca90: 0x6c173e20, 0x2ca91: 0x6c174020, 0x2ca92: 0x6c2a2e20, 0x2ca93: 0x6c2a3020, + 0x2ca94: 0x6c2a3220, 0x2ca95: 0x6c2a3420, 0x2ca96: 0x6c2a3620, 0x2ca97: 0x6c445a20, + 0x2ca98: 0x6c445c20, 0x2ca99: 0x6c445e20, 0x2ca9a: 0x6c657220, 0x2ca9b: 0x6c657420, + 0x2ca9c: 0x6c8c6820, 0x2ca9d: 0x6c8c6a20, 0x2ca9e: 0x6c8c6c20, 0x2ca9f: 0x6cb8c620, + 0x2caa0: 0x6cb8c820, 0x2caa1: 0x6ce9e220, 0x2caa2: 0x6d19b620, 0x2caa3: 0x6d766620, + 0x2caa4: 0x6e0c6420, 0x2caa5: 0x6c008620, 0x2caa6: 0x6c014820, 0x2caa7: 0x6c02ce20, + 0x2caa8: 0x6c0c5a20, 0x2caa9: 0x6c2a4c20, 0x2caaa: 0x6c446c20, 0x2caab: 0x6c008820, + 0x2caac: 0x6c02d620, 0x2caad: 0x6c02d820, 0x2caae: 0x6c02da20, 0x2caaf: 0x6c02dc20, + 0x2cab0: 0x6c061c20, 0x2cab1: 0x6c0c6820, 0x2cab2: 0x6c0c6a20, 0x2cab3: 0x6c0c6c20, + 0x2cab4: 0x6c0c6e20, 0x2cab5: 0x6c176220, 0x2cab6: 0x6c2a5020, 0x2cab7: 0x6c2a5220, + 0x2cab8: 0x6c2a5420, 0x2cab9: 0x6c447620, 0x2caba: 0x6c659020, 0x2cabb: 0x6c447820, + 0x2cabc: 0x6c659220, 0x2cabd: 0x6c8c7e20, 0x2cabe: 0x6ce9f420, 0x2cabf: 0x6ce9f620, + // Block 0xb2b, offset 0x2cac0 + 0x2cac0: 0x6d767a20, 0x2cac1: 0x6dc29820, 0x2cac2: 0x6c008c20, 0x2cac3: 0x6c02e620, + 0x2cac4: 0x6c02e820, 0x2cac5: 0x6c02ea20, 0x2cac6: 0x6c02ec20, 0x2cac7: 0x6c02ee20, + 0x2cac8: 0x6c02f020, 0x2cac9: 0x6c062220, 0x2caca: 0x6c062420, 0x2cacb: 0x6c062620, + 0x2cacc: 0x6c062820, 0x2cacd: 0x6c0c7820, 0x2cace: 0x6c0c7a20, 0x2cacf: 0x6c177020, + 0x2cad0: 0x6c2a5e20, 0x2cad1: 0x6c448620, 0x2cad2: 0x6c448820, 0x2cad3: 0x6c659a20, + 0x2cad4: 0x6c659c20, 0x2cad5: 0x6c8c8820, 0x2cad6: 0x6c008e20, 0x2cad7: 0x6c02fe20, + 0x2cad8: 0x6c030020, 0x2cad9: 0x6c063e20, 0x2cada: 0x6c064020, 0x2cadb: 0x6c0c8620, + 0x2cadc: 0x6c0c8820, 0x2cadd: 0x6c178020, 0x2cade: 0x6c2a6a20, 0x2cadf: 0x6c449220, + 0x2cae0: 0x6c449420, 0x2cae1: 0x6c65a420, 0x2cae2: 0x6c65a620, 0x2cae3: 0x6c65a820, + 0x2cae4: 0x6c65aa20, 0x2cae5: 0x6c65ac20, 0x2cae6: 0x6c65ae20, 0x2cae7: 0x6c65b020, + 0x2cae8: 0x6c8c9020, 0x2cae9: 0x6d19e020, 0x2caea: 0x6d768820, 0x2caeb: 0x6c009020, + 0x2caec: 0x6c064a20, 0x2caed: 0x6c064c20, 0x2caee: 0x6c064e20, 0x2caef: 0x6c065020, + 0x2caf0: 0x6c0c9c20, 0x2caf1: 0x6c0c9e20, 0x2caf2: 0x6c0ca020, 0x2caf3: 0x6c0ca220, + 0x2caf4: 0x6c0ca420, 0x2caf5: 0x6c179020, 0x2caf6: 0x6c179220, 0x2caf7: 0x6c179420, + 0x2caf8: 0x6c179620, 0x2caf9: 0x6c179820, 0x2cafa: 0x6c179a20, 0x2cafb: 0x6c179c20, + 0x2cafc: 0x6c2a7e20, 0x2cafd: 0x6c2a8020, 0x2cafe: 0x6c2a8220, 0x2caff: 0x6c2a8420, + // Block 0xb2c, offset 0x2cb00 + 0x2cb00: 0x6c2a8620, 0x2cb01: 0x6c44a420, 0x2cb02: 0x6c44a620, 0x2cb03: 0x6c44a820, + 0x2cb04: 0x6c65c820, 0x2cb05: 0x6c65ca20, 0x2cb06: 0x6c65cc20, 0x2cb07: 0x6c65ce20, + 0x2cb08: 0x6c65d020, 0x2cb09: 0x6c65d220, 0x2cb0a: 0x6c65d420, 0x2cb0b: 0x6c65d620, + 0x2cb0c: 0x6c65d820, 0x2cb0d: 0x6c65da20, 0x2cb0e: 0x6c65dc20, 0x2cb0f: 0x6c8c9820, + 0x2cb10: 0x6c8c9a20, 0x2cb11: 0x6c8c9c20, 0x2cb12: 0x6cb91020, 0x2cb13: 0x6cb91220, + 0x2cb14: 0x6cb91420, 0x2cb15: 0x6cb91620, 0x2cb16: 0x6cb91820, 0x2cb17: 0x6cea1420, + 0x2cb18: 0x6d19ec20, 0x2cb19: 0x6d487820, 0x2cb1a: 0x6d487a20, 0x2cb1b: 0x6d487c20, + 0x2cb1c: 0x6d487e20, 0x2cb1d: 0x6d768e20, 0x2cb1e: 0x6d769020, 0x2cb1f: 0x6da01a20, + 0x2cb20: 0x6c009420, 0x2cb21: 0x6c015220, 0x2cb22: 0x6c015420, 0x2cb23: 0x6c015620, + 0x2cb24: 0x6c030a20, 0x2cb25: 0x6c065a20, 0x2cb26: 0x6c065c20, 0x2cb27: 0x6c065e20, + 0x2cb28: 0x6c0cba20, 0x2cb29: 0x6c0cbc20, 0x2cb2a: 0x6c0cbe20, 0x2cb2b: 0x6c0cc020, + 0x2cb2c: 0x6c17b820, 0x2cb2d: 0x6c2a9820, 0x2cb2e: 0x6c2a9a20, 0x2cb2f: 0x6c2a9c20, + 0x2cb30: 0x6c8cc020, 0x2cb31: 0x6cb93020, 0x2cb32: 0x6cb93220, 0x2cb33: 0x6d19fe20, + 0x2cb34: 0x6d1a0020, 0x2cb35: 0x6c009a20, 0x2cb36: 0x6c031c20, 0x2cb37: 0x6c066820, + 0x2cb38: 0x6c066a20, 0x2cb39: 0x6c066c20, 0x2cb3a: 0x6c066e20, 0x2cb3b: 0x6c067020, + 0x2cb3c: 0x6c0cd420, 0x2cb3d: 0x6c2ab220, 0x2cb3e: 0x6c44d820, 0x2cb3f: 0x6cb94020, + // Block 0xb2d, offset 0x2cb40 + 0x2cb40: 0x6c00a020, 0x2cb41: 0x6c00a220, 0x2cb42: 0x6c00a420, 0x2cb43: 0x6c015a20, + 0x2cb44: 0x6c015c20, 0x2cb45: 0x6c032420, 0x2cb46: 0x6c032620, 0x2cb47: 0x6c032820, + 0x2cb48: 0x6c032a20, 0x2cb49: 0x6c068220, 0x2cb4a: 0x6c068420, 0x2cb4b: 0x6c068620, + 0x2cb4c: 0x6c068820, 0x2cb4d: 0x6c068a20, 0x2cb4e: 0x6c0cea20, 0x2cb4f: 0x6c0cec20, + 0x2cb50: 0x6c0cee20, 0x2cb51: 0x6c0cf020, 0x2cb52: 0x6c0cf220, 0x2cb53: 0x6c0cf420, + 0x2cb54: 0x6c0cf620, 0x2cb55: 0x6c0cf820, 0x2cb56: 0x6c0cfa20, 0x2cb57: 0x6c0cfc20, + 0x2cb58: 0x6c0cfe20, 0x2cb59: 0x6c0d0020, 0x2cb5a: 0x6c0d0220, 0x2cb5b: 0x6c0d0420, + 0x2cb5c: 0x6c17de20, 0x2cb5d: 0x6c17e020, 0x2cb5e: 0x6c17e220, 0x2cb5f: 0x6c17e420, + 0x2cb60: 0x6c17e620, 0x2cb61: 0x6c17e820, 0x2cb62: 0x6c17ea20, 0x2cb63: 0x6c17ec20, + 0x2cb64: 0x6c17ee20, 0x2cb65: 0x6c17f020, 0x2cb66: 0x6c17f220, 0x2cb67: 0x6c17f420, + 0x2cb68: 0x6c17f620, 0x2cb69: 0x6c17f820, 0x2cb6a: 0x6c17fa20, 0x2cb6b: 0x6c17fc20, + 0x2cb6c: 0x6c17fe20, 0x2cb6d: 0x6c180020, 0x2cb6e: 0x6c2ac820, 0x2cb6f: 0x6c2aca20, + 0x2cb70: 0x6c2acc20, 0x2cb71: 0x6c2ace20, 0x2cb72: 0x6c2ad020, 0x2cb73: 0x6c2ad220, + 0x2cb74: 0x6c2ad420, 0x2cb75: 0x6c2ad620, 0x2cb76: 0x6c2ad820, 0x2cb77: 0x6c2ada20, + 0x2cb78: 0x6c2adc20, 0x2cb79: 0x6c2ade20, 0x2cb7a: 0x6c2ae020, 0x2cb7b: 0x6c2ae220, + 0x2cb7c: 0x6c2ae420, 0x2cb7d: 0x6c2ae620, 0x2cb7e: 0x6c2ae820, 0x2cb7f: 0x6c2aea20, + // Block 0xb2e, offset 0x2cb80 + 0x2cb80: 0x6c2aec20, 0x2cb81: 0x6c2aee20, 0x2cb82: 0x6c2af020, 0x2cb83: 0x6c44ea20, + 0x2cb84: 0x6c44ec20, 0x2cb85: 0x6c44ee20, 0x2cb86: 0x6c2b4a20, 0x2cb87: 0x6c44f020, + 0x2cb88: 0x6c44f220, 0x2cb89: 0x6c44f420, 0x2cb8a: 0x6c44f620, 0x2cb8b: 0x6c44f820, + 0x2cb8c: 0x6c44fa20, 0x2cb8d: 0x6c44fc20, 0x2cb8e: 0x6c44fe20, 0x2cb8f: 0x6c450020, + 0x2cb90: 0x6c450220, 0x2cb91: 0x6c450420, 0x2cb92: 0x6c661c20, 0x2cb93: 0x6c661e20, + 0x2cb94: 0x6c662020, 0x2cb95: 0x6c662220, 0x2cb96: 0x6c662420, 0x2cb97: 0x6c662620, + 0x2cb98: 0x6c662820, 0x2cb99: 0x6c662a20, 0x2cb9a: 0x6c662c20, 0x2cb9b: 0x6c662e20, + 0x2cb9c: 0x6c663020, 0x2cb9d: 0x6c663220, 0x2cb9e: 0x6c663420, 0x2cb9f: 0x6c663620, + 0x2cba0: 0x6c663820, 0x2cba1: 0x6c663a20, 0x2cba2: 0x6c663c20, 0x2cba3: 0x6c663e20, + 0x2cba4: 0x6c664020, 0x2cba5: 0x6c664220, 0x2cba6: 0x6c664420, 0x2cba7: 0x6c664620, + 0x2cba8: 0x6c8ce420, 0x2cba9: 0x6cb95020, 0x2cbaa: 0x6c8ce620, 0x2cbab: 0x6c8ce820, + 0x2cbac: 0x6c8cea20, 0x2cbad: 0x6c8cec20, 0x2cbae: 0x6c8cee20, 0x2cbaf: 0x6c8cf020, + 0x2cbb0: 0x6c8cf220, 0x2cbb1: 0x6c8cf420, 0x2cbb2: 0x6cb95220, 0x2cbb3: 0x6cb95420, + 0x2cbb4: 0x6cb95620, 0x2cbb5: 0x6cb95820, 0x2cbb6: 0x6c8cf620, 0x2cbb7: 0x6cea4020, + 0x2cbb8: 0x6cea4220, 0x2cbb9: 0x6cea4420, 0x2cbba: 0x6cea4620, 0x2cbbb: 0x6cea4820, + 0x2cbbc: 0x6cea4a20, 0x2cbbd: 0x6cea4c20, 0x2cbbe: 0x6cea4e20, 0x2cbbf: 0x6cea5020, + // Block 0xb2f, offset 0x2cbc0 + 0x2cbc0: 0x6d1a2620, 0x2cbc1: 0x6d1a2820, 0x2cbc2: 0x6d1a2a20, 0x2cbc3: 0x6d1a2c20, + 0x2cbc4: 0x6d1a2e20, 0x2cbc5: 0x6d489820, 0x2cbc6: 0x6d489a20, 0x2cbc7: 0x6d489c20, + 0x2cbc8: 0x6d489e20, 0x2cbc9: 0x6d48a020, 0x2cbca: 0x6d48a220, 0x2cbcb: 0x6d48a420, + 0x2cbcc: 0x6d48a620, 0x2cbcd: 0x6d48a820, 0x2cbce: 0x6d48aa20, 0x2cbcf: 0x6d48ac20, + 0x2cbd0: 0x6d76aa20, 0x2cbd1: 0x6d76ac20, 0x2cbd2: 0x6d76ae20, 0x2cbd3: 0x6d76b020, + 0x2cbd4: 0x6d76b220, 0x2cbd5: 0x6da03420, 0x2cbd6: 0x6de05820, 0x2cbd7: 0x6e0c7220, + 0x2cbd8: 0x6e0c7420, 0x2cbd9: 0x6e286020, 0x2cbda: 0x6e286220, 0x2cbdb: 0x6c00a820, + 0x2cbdc: 0x6c016020, 0x2cbdd: 0x6c033c20, 0x2cbde: 0x6c033e20, 0x2cbdf: 0x6c06a420, + 0x2cbe0: 0x6c06a620, 0x2cbe1: 0x6c06a820, 0x2cbe2: 0x6c06aa20, 0x2cbe3: 0x6c0d4020, + 0x2cbe4: 0x6c0d4220, 0x2cbe5: 0x6c0d4420, 0x2cbe6: 0x6c0d4620, 0x2cbe7: 0x6c0d4820, + 0x2cbe8: 0x6c0d4a20, 0x2cbe9: 0x6c183c20, 0x2cbea: 0x6c183e20, 0x2cbeb: 0x6c184020, + 0x2cbec: 0x6c184220, 0x2cbed: 0x6c184420, 0x2cbee: 0x6c184620, 0x2cbef: 0x6c184820, + 0x2cbf0: 0x6c184a20, 0x2cbf1: 0x6c184c20, 0x2cbf2: 0x6c184e20, 0x2cbf3: 0x6c185020, + 0x2cbf4: 0x6c185220, 0x2cbf5: 0x6c2b5220, 0x2cbf6: 0x6c2b5420, 0x2cbf7: 0x6c2b5620, + 0x2cbf8: 0x6c2b5820, 0x2cbf9: 0x6c2b5a20, 0x2cbfa: 0x6c2b5c20, 0x2cbfb: 0x6c2b5e20, + 0x2cbfc: 0x6c2b6020, 0x2cbfd: 0x6c2b6220, 0x2cbfe: 0x6c2b6420, 0x2cbff: 0x6c2b6620, + // Block 0xb30, offset 0x2cc00 + 0x2cc00: 0x6c455020, 0x2cc01: 0x6c455220, 0x2cc02: 0x6c455420, 0x2cc03: 0x6c455620, + 0x2cc04: 0x6c455820, 0x2cc05: 0x6c455a20, 0x2cc06: 0x6c2b8620, 0x2cc07: 0x6c455c20, + 0x2cc08: 0x6c455e20, 0x2cc09: 0x6c456020, 0x2cc0a: 0x6c456220, 0x2cc0b: 0x6c456420, + 0x2cc0c: 0x6c66ac20, 0x2cc0d: 0x6c66ae20, 0x2cc0e: 0x6c66b020, 0x2cc0f: 0x6c66b220, + 0x2cc10: 0x6c66b420, 0x2cc11: 0x6c66b620, 0x2cc12: 0x6c8d4420, 0x2cc13: 0x6c8d4620, + 0x2cc14: 0x6c8d4820, 0x2cc15: 0x6c8d4a20, 0x2cc16: 0x6c8d4c20, 0x2cc17: 0x6c9b7c20, + 0x2cc18: 0x6c8d4e20, 0x2cc19: 0x6c8d5020, 0x2cc1a: 0x6c8d5220, 0x2cc1b: 0x6cb9ac20, + 0x2cc1c: 0x6cb9ae20, 0x2cc1d: 0x6cb9b020, 0x2cc1e: 0x6cb9b220, 0x2cc1f: 0x6cea9220, + 0x2cc20: 0x6cea9420, 0x2cc21: 0x6cea9620, 0x2cc22: 0x6cea9820, 0x2cc23: 0x6cea9a20, + 0x2cc24: 0x6cea9c20, 0x2cc25: 0x6cea9e20, 0x2cc26: 0x6ceaa020, 0x2cc27: 0x6ceaa220, + 0x2cc28: 0x6d1a7820, 0x2cc29: 0x6d1a7a20, 0x2cc2a: 0x6d1a7c20, 0x2cc2b: 0x6d1a7e20, + 0x2cc2c: 0x6d1a8020, 0x2cc2d: 0x6d1a8220, 0x2cc2e: 0x6d48da20, 0x2cc2f: 0x6d48dc20, + 0x2cc30: 0x6d48de20, 0x2cc31: 0x6d48e020, 0x2cc32: 0x6d48e220, 0x2cc33: 0x6d76da20, + 0x2cc34: 0x6da05c20, 0x2cc35: 0x6da05e20, 0x2cc36: 0x6da06020, 0x2cc37: 0x6de06020, + 0x2cc38: 0x6de06620, 0x2cc39: 0x6c00aa20, 0x2cc3a: 0x6c016420, 0x2cc3b: 0x6c034620, + 0x2cc3c: 0x6c034820, 0x2cc3d: 0x6c034a20, 0x2cc3e: 0x6c034c20, 0x2cc3f: 0x6c034e20, + // Block 0xb31, offset 0x2cc40 + 0x2cc40: 0x6c035020, 0x2cc41: 0x6c035220, 0x2cc42: 0x6c035420, 0x2cc43: 0x6c06b420, + 0x2cc44: 0x6c06b620, 0x2cc45: 0x6c06b820, 0x2cc46: 0x6c06ba20, 0x2cc47: 0x6c06bc20, + 0x2cc48: 0x6c0d5e20, 0x2cc49: 0x6c187820, 0x2cc4a: 0x6c2b8820, 0x2cc4b: 0x6c2b8a20, + 0x2cc4c: 0x6c2b8c20, 0x2cc4d: 0x6c458220, 0x2cc4e: 0x6c66de20, 0x2cc4f: 0x6c8d6c20, + 0x2cc50: 0x6c8d6e20, 0x2cc51: 0x6cb9d620, 0x2cc52: 0x6cb9d820, 0x2cc53: 0x6c8d7e20, + 0x2cc54: 0x6d48f220, 0x2cc55: 0x6c00ac20, 0x2cc56: 0x6c035a20, 0x2cc57: 0x6c06c620, + 0x2cc58: 0x6c8d8220, 0x2cc59: 0x6c8d8420, 0x2cc5a: 0x6c00b020, 0x2cc5b: 0x6c06ca20, + 0x2cc5c: 0x6c06cc20, 0x2cc5d: 0x6c06ce20, 0x2cc5e: 0x6c06d020, 0x2cc5f: 0x6c0d6820, + 0x2cc60: 0x6c0d6a20, 0x2cc61: 0x6c0d6c20, 0x2cc62: 0x6c0d6e20, 0x2cc63: 0x6c189020, + 0x2cc64: 0x6c189220, 0x2cc65: 0x6c189420, 0x2cc66: 0x6c2b9e20, 0x2cc67: 0x6c45a020, + 0x2cc68: 0x6c45a220, 0x2cc69: 0x6c45a420, 0x2cc6a: 0x6c66fc20, 0x2cc6b: 0x6c66fe20, + 0x2cc6c: 0x6c8d8820, 0x2cc6d: 0x6c8d8a20, 0x2cc6e: 0x6c8d8c20, 0x2cc6f: 0x6cead820, + 0x2cc70: 0x6d1abc20, 0x2cc71: 0x6d1abe20, 0x2cc72: 0x6d1ac020, 0x2cc73: 0x6d48f620, + 0x2cc74: 0x6d76ea20, 0x2cc75: 0x6da07820, 0x2cc76: 0x6de06820, 0x2cc77: 0x6df8ba20, + 0x2cc78: 0x6c00b420, 0x2cc79: 0x6c036020, 0x2cc7a: 0x6c036220, 0x2cc7b: 0x6c18a620, + 0x2cc7c: 0x6c2ba820, 0x2cc7d: 0x6c45c020, 0x2cc7e: 0x6c8d9220, 0x2cc7f: 0x6c8d9420, + // Block 0xb32, offset 0x2cc80 + 0x2cc80: 0x6c8d9620, 0x2cc81: 0x6c00b620, 0x2cc82: 0x6c016820, 0x2cc83: 0x6c016a20, + 0x2cc84: 0x6c00e620, 0x2cc85: 0x6c036820, 0x2cc86: 0x6c036a20, 0x2cc87: 0x6c036c20, + 0x2cc88: 0x6c036e20, 0x2cc89: 0x6c06d220, 0x2cc8a: 0x6c06d420, 0x2cc8b: 0x6c0d8420, + 0x2cc8c: 0x6c06d620, 0x2cc8d: 0x6c0d8620, 0x2cc8e: 0x6c0d8820, 0x2cc8f: 0x6c0d8a20, + 0x2cc90: 0x6c0d8c20, 0x2cc91: 0x6c2bac20, 0x2cc92: 0x6c2bae20, 0x2cc93: 0x6c2bb020, + 0x2cc94: 0x6c2bb220, 0x2cc95: 0x6c2bb420, 0x2cc96: 0x6c2bb620, 0x2cc97: 0x6c45c820, + 0x2cc98: 0x6c45ca20, 0x2cc99: 0x6c8d9820, 0x2cc9a: 0x6cb9f220, 0x2cc9b: 0x6e0c8420, + 0x2cc9c: 0x6c00ba20, 0x2cc9d: 0x6c037620, 0x2cc9e: 0x6c037820, 0x2cc9f: 0x6c06e220, + 0x2cca0: 0x6c06e420, 0x2cca1: 0x6c06e620, 0x2cca2: 0x6c06e820, 0x2cca3: 0x6c18c020, + 0x2cca4: 0x6c18c220, 0x2cca5: 0x6c2bd620, 0x2cca6: 0x6c2bd820, 0x2cca7: 0x6c2bda20, + 0x2cca8: 0x6c8da820, 0x2cca9: 0x6c00bc20, 0x2ccaa: 0x6c017220, 0x2ccab: 0x6c017420, + 0x2ccac: 0x6c037c20, 0x2ccad: 0x6c06ec20, 0x2ccae: 0x6c06ee20, 0x2ccaf: 0x6c06f020, + 0x2ccb0: 0x6c0db820, 0x2ccb1: 0x6c0dba20, 0x2ccb2: 0x6c18d220, 0x2ccb3: 0x6c18d420, + 0x2ccb4: 0x6c18d620, 0x2ccb5: 0x6c18d820, 0x2ccb6: 0x6c2bf420, 0x2ccb7: 0x6c2bf620, + 0x2ccb8: 0x6c2bf820, 0x2ccb9: 0x6c2bfa20, 0x2ccba: 0x6c2bfc20, 0x2ccbb: 0x6c45e420, + 0x2ccbc: 0x6c45e620, 0x2ccbd: 0x6c45e820, 0x2ccbe: 0x6c8db620, 0x2ccbf: 0x6c673020, + // Block 0xb33, offset 0x2ccc0 + 0x2ccc0: 0x6ceaf820, 0x2ccc1: 0x6ceafa20, 0x2ccc2: 0x6c00be20, 0x2ccc3: 0x6c038620, + 0x2ccc4: 0x6c038820, 0x2ccc5: 0x6c038a20, 0x2ccc6: 0x6c038c20, 0x2ccc7: 0x6c06f420, + 0x2ccc8: 0x6c06f620, 0x2ccc9: 0x6c06f820, 0x2ccca: 0x6c0dce20, 0x2cccb: 0x6c0dd020, + 0x2cccc: 0x6c0dd220, 0x2cccd: 0x6c0dd420, 0x2ccce: 0x6c18e220, 0x2cccf: 0x6c18e420, + 0x2ccd0: 0x6c18e620, 0x2ccd1: 0x6c18e820, 0x2ccd2: 0x6c2c0420, 0x2ccd3: 0x6c2c0620, + 0x2ccd4: 0x6c2c0820, 0x2ccd5: 0x6c2c0a20, 0x2ccd6: 0x6c45f820, 0x2ccd7: 0x6c45fa20, + 0x2ccd8: 0x6c45fc20, 0x2ccd9: 0x6c45fe20, 0x2ccda: 0x6c460020, 0x2ccdb: 0x6c460220, + 0x2ccdc: 0x6c673820, 0x2ccdd: 0x6c673a20, 0x2ccde: 0x6c673c20, 0x2ccdf: 0x6c673e20, + 0x2cce0: 0x6c8db820, 0x2cce1: 0x6c8dba20, 0x2cce2: 0x6c8dbc20, 0x2cce3: 0x6c8dbe20, + 0x2cce4: 0x6cba0c20, 0x2cce5: 0x6cba0e20, 0x2cce6: 0x6cba1020, 0x2cce7: 0x6cba1220, + 0x2cce8: 0x6cba1420, 0x2cce9: 0x6c8dc020, 0x2ccea: 0x6ceb0420, 0x2cceb: 0x6ceb0620, + 0x2ccec: 0x6d1ae020, 0x2cced: 0x6d1ae220, 0x2ccee: 0x6d1ae420, 0x2ccef: 0x6ceb2020, + 0x2ccf0: 0x6d1ae620, 0x2ccf1: 0x6d491a20, 0x2ccf2: 0x6d491c20, 0x2ccf3: 0x6da08820, + 0x2ccf4: 0x6de07020, 0x2ccf5: 0x6e451620, 0x2ccf6: 0x6c00c020, 0x2ccf7: 0x6c039220, + 0x2ccf8: 0x6c039420, 0x2ccf9: 0x6c039620, 0x2ccfa: 0x6c070a20, 0x2ccfb: 0x6c070c20, + 0x2ccfc: 0x6c070e20, 0x2ccfd: 0x6c0df220, 0x2ccfe: 0x6c0df420, 0x2ccff: 0x6c190420, + // Block 0xb34, offset 0x2cd00 + 0x2cd00: 0x6c2c2820, 0x2cd01: 0x6c2c2a20, 0x2cd02: 0x6c2c2c20, 0x2cd03: 0x6c8de620, + 0x2cd04: 0x6c8de820, 0x2cd05: 0x6cba2e20, 0x2cd06: 0x6d1b1420, 0x2cd07: 0x6d493c20, + 0x2cd08: 0x6c00c420, 0x2cd09: 0x6c017e20, 0x2cd0a: 0x6c03a020, 0x2cd0b: 0x6c03a220, + 0x2cd0c: 0x6c03a420, 0x2cd0d: 0x6c03a620, 0x2cd0e: 0x6c03a820, 0x2cd0f: 0x6c071a20, + 0x2cd10: 0x6c071c20, 0x2cd11: 0x6c071e20, 0x2cd12: 0x6c0e0820, 0x2cd13: 0x6c190e20, + 0x2cd14: 0x6c2c3c20, 0x2cd15: 0x6c2c3e20, 0x2cd16: 0x6c2c4020, 0x2cd17: 0x6c2c4220, + 0x2cd18: 0x6c2c4420, 0x2cd19: 0x6c464020, 0x2cd1a: 0x6c464220, 0x2cd1b: 0x6c464420, + 0x2cd1c: 0x6c464620, 0x2cd1d: 0x6c464820, 0x2cd1e: 0x6c677c20, 0x2cd1f: 0x6c677e20, + 0x2cd20: 0x6ceb3220, 0x2cd21: 0x6d76fc20, 0x2cd22: 0x6dc2f620, 0x2cd23: 0x6c018020, + 0x2cd24: 0x6c073620, 0x2cd25: 0x6c073820, 0x2cd26: 0x6c073a20, 0x2cd27: 0x6c073c20, + 0x2cd28: 0x6c073e20, 0x2cd29: 0x6c074020, 0x2cd2a: 0x6c074220, 0x2cd2b: 0x6c074420, + 0x2cd2c: 0x6c074620, 0x2cd2d: 0x6c074820, 0x2cd2e: 0x6c074a20, 0x2cd2f: 0x6c074c20, + 0x2cd30: 0x6c074e20, 0x2cd31: 0x6c075020, 0x2cd32: 0x6c075220, 0x2cd33: 0x6c075420, + 0x2cd34: 0x6c075620, 0x2cd35: 0x6c075820, 0x2cd36: 0x6c075a20, 0x2cd37: 0x6c075c20, + 0x2cd38: 0x6c075e20, 0x2cd39: 0x6c076020, 0x2cd3a: 0x6c076220, 0x2cd3b: 0x6c076420, + 0x2cd3c: 0x6c076620, 0x2cd3d: 0x6c076820, 0x2cd3e: 0x6c076a20, 0x2cd3f: 0x6c0e2220, + // Block 0xb35, offset 0x2cd40 + 0x2cd40: 0x6c0e2420, 0x2cd41: 0x6c0e2620, 0x2cd42: 0x6c0e2820, 0x2cd43: 0x6c0e2a20, + 0x2cd44: 0x6c0e2c20, 0x2cd45: 0x6c0e2e20, 0x2cd46: 0x6c0e3020, 0x2cd47: 0x6c0e3220, + 0x2cd48: 0x6c0e3420, 0x2cd49: 0x6c0e3620, 0x2cd4a: 0x6c0e3820, 0x2cd4b: 0x6c0e3a20, + 0x2cd4c: 0x6c0e3c20, 0x2cd4d: 0x6c0e3e20, 0x2cd4e: 0x6c0e4020, 0x2cd4f: 0x6c0e4220, + 0x2cd50: 0x6c0e4420, 0x2cd51: 0x6c0e4620, 0x2cd52: 0x6c0e4820, 0x2cd53: 0x6c0e4a20, + 0x2cd54: 0x6c0e4c20, 0x2cd55: 0x6c0e4e20, 0x2cd56: 0x6c0e5020, 0x2cd57: 0x6c0e5220, + 0x2cd58: 0x6c193e20, 0x2cd59: 0x6c194020, 0x2cd5a: 0x6c194220, 0x2cd5b: 0x6c194420, + 0x2cd5c: 0x6c194620, 0x2cd5d: 0x6c194820, 0x2cd5e: 0x6c194a20, 0x2cd5f: 0x6c194c20, + 0x2cd60: 0x6c194e20, 0x2cd61: 0x6c195020, 0x2cd62: 0x6c195220, 0x2cd63: 0x6c195420, + 0x2cd64: 0x6c195620, 0x2cd65: 0x6c195820, 0x2cd66: 0x6c195a20, 0x2cd67: 0x6c195c20, + 0x2cd68: 0x6c195e20, 0x2cd69: 0x6c196020, 0x2cd6a: 0x6c196220, 0x2cd6b: 0x6c196420, + 0x2cd6c: 0x6c196620, 0x2cd6d: 0x6c196820, 0x2cd6e: 0x6c196a20, 0x2cd6f: 0x6c196c20, + 0x2cd70: 0x6c196e20, 0x2cd71: 0x6c197020, 0x2cd72: 0x6c197220, 0x2cd73: 0x6c197420, + 0x2cd74: 0x6c197620, 0x2cd75: 0x6c197820, 0x2cd76: 0x6c197a20, 0x2cd77: 0x6c197c20, + 0x2cd78: 0x6c197e20, 0x2cd79: 0x6c198020, 0x2cd7a: 0x6c198220, 0x2cd7b: 0x6c198420, + 0x2cd7c: 0x6c198620, 0x2cd7d: 0x6c198820, 0x2cd7e: 0x6c198a20, 0x2cd7f: 0x6c198c20, + // Block 0xb36, offset 0x2cd80 + 0x2cd80: 0x6c198e20, 0x2cd81: 0x6c199020, 0x2cd82: 0x6c199220, 0x2cd83: 0x6c199420, + 0x2cd84: 0x6c199620, 0x2cd85: 0x6c199820, 0x2cd86: 0x6c199a20, 0x2cd87: 0x6c199c20, + 0x2cd88: 0x6c199e20, 0x2cd89: 0x6c19a020, 0x2cd8a: 0x6c19a220, 0x2cd8b: 0x6c19a420, + 0x2cd8c: 0x6c19a620, 0x2cd8d: 0x6c19a820, 0x2cd8e: 0x6c19aa20, 0x2cd8f: 0x6c19ac20, + 0x2cd90: 0x6c19ae20, 0x2cd91: 0x6c19b020, 0x2cd92: 0x6c19b220, 0x2cd93: 0x6c19b420, + 0x2cd94: 0x6c19b620, 0x2cd95: 0x6c19b820, 0x2cd96: 0x6c19ba20, 0x2cd97: 0x6c19bc20, + 0x2cd98: 0x6c19be20, 0x2cd99: 0x6c19c020, 0x2cd9a: 0x6c19c220, 0x2cd9b: 0x6c19c420, + 0x2cd9c: 0x6c19c620, 0x2cd9d: 0x6c2c6820, 0x2cd9e: 0x6c2c6a20, 0x2cd9f: 0x6c2c6c20, + 0x2cda0: 0x6c2c6e20, 0x2cda1: 0x6c2c7020, 0x2cda2: 0x6c2c7220, 0x2cda3: 0x6c2c7420, + 0x2cda4: 0x6c2c7620, 0x2cda5: 0x6c2c7820, 0x2cda6: 0x6c2c7a20, 0x2cda7: 0x6c2c7c20, + 0x2cda8: 0x6c2c7e20, 0x2cda9: 0x6c2c8020, 0x2cdaa: 0x6c2c8220, 0x2cdab: 0x6c2c8420, + 0x2cdac: 0x6c2c8620, 0x2cdad: 0x6c2c8820, 0x2cdae: 0x6c2c8a20, 0x2cdaf: 0x6c2c8c20, + 0x2cdb0: 0x6c466420, 0x2cdb1: 0x6c2c8e20, 0x2cdb2: 0x6c466620, 0x2cdb3: 0x6c2c9020, + 0x2cdb4: 0x6c2c9220, 0x2cdb5: 0x6c2c9420, 0x2cdb6: 0x6c2c9620, 0x2cdb7: 0x6c2c9820, + 0x2cdb8: 0x6c2c9a20, 0x2cdb9: 0x6c2c9c20, 0x2cdba: 0x6c2c9e20, 0x2cdbb: 0x6c2ca020, + 0x2cdbc: 0x6c2ca220, 0x2cdbd: 0x6c2ca420, 0x2cdbe: 0x6c2ca620, 0x2cdbf: 0x6c2ca820, + // Block 0xb37, offset 0x2cdc0 + 0x2cdc0: 0x6c2caa20, 0x2cdc1: 0x6c2cac20, 0x2cdc2: 0x6c2cae20, 0x2cdc3: 0x6c2cb020, + 0x2cdc4: 0x6c2cb220, 0x2cdc5: 0x6c2cb420, 0x2cdc6: 0x6c2cb620, 0x2cdc7: 0x6c2cb820, + 0x2cdc8: 0x6c2cba20, 0x2cdc9: 0x6c2cbc20, 0x2cdca: 0x6c2cbe20, 0x2cdcb: 0x6c2cc020, + 0x2cdcc: 0x6c2cc220, 0x2cdcd: 0x6c2cc420, 0x2cdce: 0x6c2cc620, 0x2cdcf: 0x6c2cc820, + 0x2cdd0: 0x6c2cca20, 0x2cdd1: 0x6c2ccc20, 0x2cdd2: 0x6c2cce20, 0x2cdd3: 0x6c2cd020, + 0x2cdd4: 0x6c2cd220, 0x2cdd5: 0x6c2cd420, 0x2cdd6: 0x6c2cd620, 0x2cdd7: 0x6c2cd820, + 0x2cdd8: 0x6c2cda20, 0x2cdd9: 0x6c2cdc20, 0x2cdda: 0x6c2cde20, 0x2cddb: 0x6c2ce020, + 0x2cddc: 0x6c2ce220, 0x2cddd: 0x6c2ce420, 0x2cdde: 0x6c468620, 0x2cddf: 0x6c468820, + 0x2cde0: 0x6c468a20, 0x2cde1: 0x6c468c20, 0x2cde2: 0x6c468e20, 0x2cde3: 0x6c469020, + 0x2cde4: 0x6c469220, 0x2cde5: 0x6c469420, 0x2cde6: 0x6c469620, 0x2cde7: 0x6c469820, + 0x2cde8: 0x6c469a20, 0x2cde9: 0x6c469c20, 0x2cdea: 0x6c469e20, 0x2cdeb: 0x6c46a020, + 0x2cdec: 0x6c46a220, 0x2cded: 0x6c46a420, 0x2cdee: 0x6c46a620, 0x2cdef: 0x6c46a820, + 0x2cdf0: 0x6c46aa20, 0x2cdf1: 0x6c46ac20, 0x2cdf2: 0x6c46ae20, 0x2cdf3: 0x6c46b020, + 0x2cdf4: 0x6c46b220, 0x2cdf5: 0x6c46b420, 0x2cdf6: 0x6c46b620, 0x2cdf7: 0x6c46b820, + 0x2cdf8: 0x6c46ba20, 0x2cdf9: 0x6c46bc20, 0x2cdfa: 0x6c46be20, 0x2cdfb: 0x6c46c020, + 0x2cdfc: 0x6c46c220, 0x2cdfd: 0x6c46c420, 0x2cdfe: 0x6c46c620, 0x2cdff: 0x6c46c820, + // Block 0xb38, offset 0x2ce00 + 0x2ce00: 0x6c46ca20, 0x2ce01: 0x6c46cc20, 0x2ce02: 0x6c46ce20, 0x2ce03: 0x6c46d020, + 0x2ce04: 0x6c46d220, 0x2ce05: 0x6c46d420, 0x2ce06: 0x6c46d620, 0x2ce07: 0x6c46d820, + 0x2ce08: 0x6c46da20, 0x2ce09: 0x6c46dc20, 0x2ce0a: 0x6c46de20, 0x2ce0b: 0x6c46e020, + 0x2ce0c: 0x6c46e220, 0x2ce0d: 0x6c46e420, 0x2ce0e: 0x6c46e620, 0x2ce0f: 0x6c46e820, + 0x2ce10: 0x6c46ea20, 0x2ce11: 0x6c46ec20, 0x2ce12: 0x6c46ee20, 0x2ce13: 0x6c46f020, + 0x2ce14: 0x6c46f220, 0x2ce15: 0x6c46f420, 0x2ce16: 0x6c46f620, 0x2ce17: 0x6c46f820, + 0x2ce18: 0x6c46fa20, 0x2ce19: 0x6c46fc20, 0x2ce1a: 0x6c46fe20, 0x2ce1b: 0x6c470020, + 0x2ce1c: 0x6c470220, 0x2ce1d: 0x6c470420, 0x2ce1e: 0x6c470620, 0x2ce1f: 0x6c470820, + 0x2ce20: 0x6c67ba20, 0x2ce21: 0x6c67bc20, 0x2ce22: 0x6c67be20, 0x2ce23: 0x6c67c020, + 0x2ce24: 0x6c67c220, 0x2ce25: 0x6c67c420, 0x2ce26: 0x6c67c620, 0x2ce27: 0x6c67c820, + 0x2ce28: 0x6c67ca20, 0x2ce29: 0x6c67cc20, 0x2ce2a: 0x6c67ce20, 0x2ce2b: 0x6c67d020, + 0x2ce2c: 0x6c67d220, 0x2ce2d: 0x6c67d420, 0x2ce2e: 0x6c67d620, 0x2ce2f: 0x6c67d820, + 0x2ce30: 0x6c67da20, 0x2ce31: 0x6c67dc20, 0x2ce32: 0x6c67de20, 0x2ce33: 0x6c67e020, + 0x2ce34: 0x6c67e220, 0x2ce35: 0x6c67e420, 0x2ce36: 0x6c67e620, 0x2ce37: 0x6c67e820, + 0x2ce38: 0x6c67ea20, 0x2ce39: 0x6c67ec20, 0x2ce3a: 0x6c67ee20, 0x2ce3b: 0x6c67f020, + 0x2ce3c: 0x6c67f220, 0x2ce3d: 0x6c67f420, 0x2ce3e: 0x6c67f620, 0x2ce3f: 0x6c67f820, + // Block 0xb39, offset 0x2ce40 + 0x2ce40: 0x6c67fa20, 0x2ce41: 0x6c67fc20, 0x2ce42: 0x6c67fe20, 0x2ce43: 0x6c680020, + 0x2ce44: 0x6c680220, 0x2ce45: 0x6c680420, 0x2ce46: 0x6c680620, 0x2ce47: 0x6c680820, + 0x2ce48: 0x6c680a20, 0x2ce49: 0x6c680c20, 0x2ce4a: 0x6c680e20, 0x2ce4b: 0x6c681020, + 0x2ce4c: 0x6c8e1020, 0x2ce4d: 0x6c681220, 0x2ce4e: 0x6c681420, 0x2ce4f: 0x6c681620, + 0x2ce50: 0x6c681820, 0x2ce51: 0x6c681a20, 0x2ce52: 0x6c681c20, 0x2ce53: 0x6c681e20, + 0x2ce54: 0x6c682020, 0x2ce55: 0x6c682220, 0x2ce56: 0x6c682420, 0x2ce57: 0x6c682620, + 0x2ce58: 0x6c682820, 0x2ce59: 0x6c682a20, 0x2ce5a: 0x6c682c20, 0x2ce5b: 0x6c682e20, + 0x2ce5c: 0x6c683020, 0x2ce5d: 0x6c683220, 0x2ce5e: 0x6c683420, 0x2ce5f: 0x6c683620, + 0x2ce60: 0x6c683820, 0x2ce61: 0x6c683a20, 0x2ce62: 0x6c683c20, 0x2ce63: 0x6c683e20, + 0x2ce64: 0x6c684020, 0x2ce65: 0x6c684220, 0x2ce66: 0x6c684420, 0x2ce67: 0x6c684620, + 0x2ce68: 0x6c8e4020, 0x2ce69: 0x6c8e4220, 0x2ce6a: 0x6c8e4420, 0x2ce6b: 0x6c8e4620, + 0x2ce6c: 0x6c8e4820, 0x2ce6d: 0x6c8e4a20, 0x2ce6e: 0x6c8e4c20, 0x2ce6f: 0x6c8e4e20, + 0x2ce70: 0x6c8e5020, 0x2ce71: 0x6c8e5220, 0x2ce72: 0x6c8e5420, 0x2ce73: 0x6c8e5620, + 0x2ce74: 0x6c8e5820, 0x2ce75: 0x6c8e5a20, 0x2ce76: 0x6c8e5c20, 0x2ce77: 0x6c8e5e20, + 0x2ce78: 0x6c8e6020, 0x2ce79: 0x6c8e6220, 0x2ce7a: 0x6c8e6420, 0x2ce7b: 0x6c8e6620, + 0x2ce7c: 0x6c8e6820, 0x2ce7d: 0x6c8e6a20, 0x2ce7e: 0x6c8e6c20, 0x2ce7f: 0x6c8e6e20, + // Block 0xb3a, offset 0x2ce80 + 0x2ce80: 0x6c8e7020, 0x2ce81: 0x6c8e7220, 0x2ce82: 0x6c8e7420, 0x2ce83: 0x6c8e7620, + 0x2ce84: 0x6c8e7820, 0x2ce85: 0x6c8e7a20, 0x2ce86: 0x6c8e7c20, 0x2ce87: 0x6c8e7e20, + 0x2ce88: 0x6c8e8020, 0x2ce89: 0x6c8e8220, 0x2ce8a: 0x6c8e8420, 0x2ce8b: 0x6c8e8620, + 0x2ce8c: 0x6c8e8820, 0x2ce8d: 0x6c8e8a20, 0x2ce8e: 0x6c8e8c20, 0x2ce8f: 0x6c8e8e20, + 0x2ce90: 0x6c8e9020, 0x2ce91: 0x6c8e9220, 0x2ce92: 0x6c8e9420, 0x2ce93: 0x6c8e9620, + 0x2ce94: 0x6c8e9820, 0x2ce95: 0x6c8e9a20, 0x2ce96: 0x6c8e9c20, 0x2ce97: 0x6c8e9e20, + 0x2ce98: 0x6c8ea020, 0x2ce99: 0x6cba9420, 0x2ce9a: 0x6c8ea220, 0x2ce9b: 0x6c8ea420, + 0x2ce9c: 0x6c8ea620, 0x2ce9d: 0x6c8ea820, 0x2ce9e: 0x6c8eaa20, 0x2ce9f: 0x6c9aaa20, + 0x2cea0: 0x6c8eac20, 0x2cea1: 0x6c8eae20, 0x2cea2: 0x6c8eb020, 0x2cea3: 0x6c8eb220, + 0x2cea4: 0x6c8eb420, 0x2cea5: 0x6c8eb620, 0x2cea6: 0x6c8eb820, 0x2cea7: 0x6c8eba20, + 0x2cea8: 0x6c8ebc20, 0x2cea9: 0x6c8ebe20, 0x2ceaa: 0x6c8ec020, 0x2ceab: 0x6c901820, + 0x2ceac: 0x6c8ec220, 0x2cead: 0x6c8ec420, 0x2ceae: 0x6c8ec620, 0x2ceaf: 0x6c8ec820, + 0x2ceb0: 0x6c8eca20, 0x2ceb1: 0x6c8ecc20, 0x2ceb2: 0x6c8ece20, 0x2ceb3: 0x6c8ed020, + 0x2ceb4: 0x6c8ed220, 0x2ceb5: 0x6c8ed420, 0x2ceb6: 0x6c8ed620, 0x2ceb7: 0x6c8ed820, + 0x2ceb8: 0x6c8eda20, 0x2ceb9: 0x6c8edc20, 0x2ceba: 0x6cba9620, 0x2cebb: 0x6cba9820, + 0x2cebc: 0x6cba9a20, 0x2cebd: 0x6cba9c20, 0x2cebe: 0x6cba9e20, 0x2cebf: 0x6cbaa020, + // Block 0xb3b, offset 0x2cec0 + 0x2cec0: 0x6cbaa220, 0x2cec1: 0x6cbaa420, 0x2cec2: 0x6cbaa620, 0x2cec3: 0x6cbaa820, + 0x2cec4: 0x6cbaaa20, 0x2cec5: 0x6cbaac20, 0x2cec6: 0x6cbaae20, 0x2cec7: 0x6cbab020, + 0x2cec8: 0x6cbab220, 0x2cec9: 0x6cbab420, 0x2ceca: 0x6cbab620, 0x2cecb: 0x6cbab820, + 0x2cecc: 0x6cbaba20, 0x2cecd: 0x6ceb6e20, 0x2cece: 0x6cbabc20, 0x2cecf: 0x6cbabe20, + 0x2ced0: 0x6cbac020, 0x2ced1: 0x6cbac220, 0x2ced2: 0x6cbac420, 0x2ced3: 0x6cbac620, + 0x2ced4: 0x6cbac820, 0x2ced5: 0x6cbaca20, 0x2ced6: 0x6cbacc20, 0x2ced7: 0x6cbace20, + 0x2ced8: 0x6cbad020, 0x2ced9: 0x6cbad220, 0x2ceda: 0x6cbad420, 0x2cedb: 0x6cbad620, + 0x2cedc: 0x6cbad820, 0x2cedd: 0x6cbada20, 0x2cede: 0x6cbadc20, 0x2cedf: 0x6cbade20, + 0x2cee0: 0x6cbae020, 0x2cee1: 0x6cbae220, 0x2cee2: 0x6cbae420, 0x2cee3: 0x6cbae620, + 0x2cee4: 0x6cbae820, 0x2cee5: 0x6cbaea20, 0x2cee6: 0x6cbaec20, 0x2cee7: 0x6cbaee20, + 0x2cee8: 0x6cbaf020, 0x2cee9: 0x6cbaf220, 0x2ceea: 0x6cbaf420, 0x2ceeb: 0x6cbaf620, + 0x2ceec: 0x6cbaf820, 0x2ceed: 0x6cbafa20, 0x2ceee: 0x6cbafc20, 0x2ceef: 0x6cbafe20, + 0x2cef0: 0x6cbb0020, 0x2cef1: 0x6cbb0220, 0x2cef2: 0x6cbb0420, 0x2cef3: 0x6cbb0620, + 0x2cef4: 0x6cbb0820, 0x2cef5: 0x6cbb0a20, 0x2cef6: 0x6c901a20, 0x2cef7: 0x6cbb0c20, + 0x2cef8: 0x6cbb0e20, 0x2cef9: 0x6cbb1020, 0x2cefa: 0x6cbb1220, 0x2cefb: 0x6cbb1420, + 0x2cefc: 0x6cbb1620, 0x2cefd: 0x6cbb1820, 0x2cefe: 0x6cbb1a20, 0x2ceff: 0x6ceb7020, + // Block 0xb3c, offset 0x2cf00 + 0x2cf00: 0x6ceb7220, 0x2cf01: 0x6ceb7420, 0x2cf02: 0x6ceb7620, 0x2cf03: 0x6ceb7820, + 0x2cf04: 0x6ceb7a20, 0x2cf05: 0x6ceb7c20, 0x2cf06: 0x6ceb7e20, 0x2cf07: 0x6ceb8020, + 0x2cf08: 0x6ceb8220, 0x2cf09: 0x6ceb8420, 0x2cf0a: 0x6ceb8620, 0x2cf0b: 0x6ceb8820, + 0x2cf0c: 0x6ceb8a20, 0x2cf0d: 0x6ceb8c20, 0x2cf0e: 0x6ceb8e20, 0x2cf0f: 0x6ceb9020, + 0x2cf10: 0x6ceb9220, 0x2cf11: 0x6ceb9420, 0x2cf12: 0x6ceb9620, 0x2cf13: 0x6ceb9820, + 0x2cf14: 0x6ceb9a20, 0x2cf15: 0x6ceb9c20, 0x2cf16: 0x6ceb9e20, 0x2cf17: 0x6ceba020, + 0x2cf18: 0x6ceba220, 0x2cf19: 0x6ceba420, 0x2cf1a: 0x6ceba620, 0x2cf1b: 0x6ceba820, + 0x2cf1c: 0x6cebaa20, 0x2cf1d: 0x6cebac20, 0x2cf1e: 0x6cbc3e20, 0x2cf1f: 0x6cebae20, + 0x2cf20: 0x6cebb020, 0x2cf21: 0x6cebb220, 0x2cf22: 0x6cebb420, 0x2cf23: 0x6cebb620, + 0x2cf24: 0x6cebb820, 0x2cf25: 0x6cebba20, 0x2cf26: 0x6cebbc20, 0x2cf27: 0x6cebbe20, + 0x2cf28: 0x6cebc020, 0x2cf29: 0x6cebc220, 0x2cf2a: 0x6cebc420, 0x2cf2b: 0x6cebc620, + 0x2cf2c: 0x6cebc820, 0x2cf2d: 0x6cebca20, 0x2cf2e: 0x6cebcc20, 0x2cf2f: 0x6cebce20, + 0x2cf30: 0x6cebd020, 0x2cf31: 0x6cebd220, 0x2cf32: 0x6cebd420, 0x2cf33: 0x6cebd620, + 0x2cf34: 0x6cebd820, 0x2cf35: 0x6cebda20, 0x2cf36: 0x6d1b5220, 0x2cf37: 0x6d1b5420, + 0x2cf38: 0x6d1b5620, 0x2cf39: 0x6d1b5820, 0x2cf3a: 0x6d1b5a20, 0x2cf3b: 0x6d1b5c20, + 0x2cf3c: 0x6d1b5e20, 0x2cf3d: 0x6d1b6020, 0x2cf3e: 0x6d1b6220, 0x2cf3f: 0x6d1b6420, + // Block 0xb3d, offset 0x2cf40 + 0x2cf40: 0x6d1b6620, 0x2cf41: 0x6d1b6820, 0x2cf42: 0x6d1b6a20, 0x2cf43: 0x6d1b6c20, + 0x2cf44: 0x6d1b6e20, 0x2cf45: 0x6d1b7020, 0x2cf46: 0x6d1b7220, 0x2cf47: 0x6d1b7420, + 0x2cf48: 0x6d1b7620, 0x2cf49: 0x6d1b7820, 0x2cf4a: 0x6d1b7a20, 0x2cf4b: 0x6d1b7c20, + 0x2cf4c: 0x6d1b7e20, 0x2cf4d: 0x6d1b8020, 0x2cf4e: 0x6d1b8220, 0x2cf4f: 0x6d1b8420, + 0x2cf50: 0x6d1b8620, 0x2cf51: 0x6d1b8820, 0x2cf52: 0x6d1b8a20, 0x2cf53: 0x6d1b8c20, + 0x2cf54: 0x6d1b8e20, 0x2cf55: 0x6d1b9020, 0x2cf56: 0x6d1b9220, 0x2cf57: 0x6d1b9420, + 0x2cf58: 0x6d1b9620, 0x2cf59: 0x6d1b9820, 0x2cf5a: 0x6d1b9a20, 0x2cf5b: 0x6d1b9c20, + 0x2cf5c: 0x6d1b9e20, 0x2cf5d: 0x6d1ba020, 0x2cf5e: 0x6d1ba220, 0x2cf5f: 0x6d1cec20, + 0x2cf60: 0x6d496220, 0x2cf61: 0x6d1ba420, 0x2cf62: 0x6d1ba620, 0x2cf63: 0x6d1ba820, + 0x2cf64: 0x6d1baa20, 0x2cf65: 0x6d1bac20, 0x2cf66: 0x6d1bae20, 0x2cf67: 0x6d1bb020, + 0x2cf68: 0x6d1cee20, 0x2cf69: 0x6d496420, 0x2cf6a: 0x6d496620, 0x2cf6b: 0x6d496820, + 0x2cf6c: 0x6d496a20, 0x2cf6d: 0x6d496c20, 0x2cf6e: 0x6d496e20, 0x2cf6f: 0x6d497020, + 0x2cf70: 0x6d497220, 0x2cf71: 0x6d497420, 0x2cf72: 0x6d497620, 0x2cf73: 0x6d497820, + 0x2cf74: 0x6d497a20, 0x2cf75: 0x6d497c20, 0x2cf76: 0x6d497e20, 0x2cf77: 0x6d498020, + 0x2cf78: 0x6d498220, 0x2cf79: 0x6d498420, 0x2cf7a: 0x6d498620, 0x2cf7b: 0x6d498820, + 0x2cf7c: 0x6d498a20, 0x2cf7d: 0x6d498c20, 0x2cf7e: 0x6d498e20, 0x2cf7f: 0x6d499020, + // Block 0xb3e, offset 0x2cf80 + 0x2cf80: 0x6d499220, 0x2cf81: 0x6d499420, 0x2cf82: 0x6d499620, 0x2cf83: 0x6d499820, + 0x2cf84: 0x6d499a20, 0x2cf85: 0x6cbb1c20, 0x2cf86: 0x6d499c20, 0x2cf87: 0x6d499e20, + 0x2cf88: 0x6d49a020, 0x2cf89: 0x6d49a220, 0x2cf8a: 0x6d49a420, 0x2cf8b: 0x6d49a620, + 0x2cf8c: 0x6d49a820, 0x2cf8d: 0x6d49aa20, 0x2cf8e: 0x6d49ac20, 0x2cf8f: 0x6d49ae20, + 0x2cf90: 0x6d49b020, 0x2cf91: 0x6d1bb220, 0x2cf92: 0x6d49b220, 0x2cf93: 0x6d494c20, + 0x2cf94: 0x6d49b420, 0x2cf95: 0x6d590220, 0x2cf96: 0x6d49b620, 0x2cf97: 0x6d49b820, + 0x2cf98: 0x6d49ba20, 0x2cf99: 0x6d49bc20, 0x2cf9a: 0x6d49be20, 0x2cf9b: 0x6d49c020, + 0x2cf9c: 0x6d49c220, 0x2cf9d: 0x6d49c420, 0x2cf9e: 0x6d772220, 0x2cf9f: 0x6d772420, + 0x2cfa0: 0x6d772620, 0x2cfa1: 0x6d772820, 0x2cfa2: 0x6d772a20, 0x2cfa3: 0x6d772c20, + 0x2cfa4: 0x6d772e20, 0x2cfa5: 0x6d773020, 0x2cfa6: 0x6d773220, 0x2cfa7: 0x6d773420, + 0x2cfa8: 0x6d773620, 0x2cfa9: 0x6d773820, 0x2cfaa: 0x6d773a20, 0x2cfab: 0x6d773c20, + 0x2cfac: 0x6d773e20, 0x2cfad: 0x6d774020, 0x2cfae: 0x6d774220, 0x2cfaf: 0x6d774420, + 0x2cfb0: 0x6d774620, 0x2cfb1: 0x6d774820, 0x2cfb2: 0x6d774a20, 0x2cfb3: 0x6d774c20, + 0x2cfb4: 0x6d49c620, 0x2cfb5: 0x6d774e20, 0x2cfb6: 0x6d775020, 0x2cfb7: 0x6d775220, + 0x2cfb8: 0x6d775420, 0x2cfb9: 0x6d775620, 0x2cfba: 0x6d775820, 0x2cfbb: 0x6d775a20, + 0x2cfbc: 0x6d775c20, 0x2cfbd: 0x6da0a220, 0x2cfbe: 0x6da0a420, 0x2cfbf: 0x6da0a620, + // Block 0xb3f, offset 0x2cfc0 + 0x2cfc0: 0x6da0a820, 0x2cfc1: 0x6da0aa20, 0x2cfc2: 0x6da0ac20, 0x2cfc3: 0x6da0ae20, + 0x2cfc4: 0x6da0b020, 0x2cfc5: 0x6da0b220, 0x2cfc6: 0x6da0b420, 0x2cfc7: 0x6da0b620, + 0x2cfc8: 0x6da0b820, 0x2cfc9: 0x6da0ba20, 0x2cfca: 0x6da0bc20, 0x2cfcb: 0x6da0be20, + 0x2cfcc: 0x6da0c020, 0x2cfcd: 0x6da0c220, 0x2cfce: 0x6da0c420, 0x2cfcf: 0x6da0c620, + 0x2cfd0: 0x6da0c820, 0x2cfd1: 0x6da0ca20, 0x2cfd2: 0x6da0cc20, 0x2cfd3: 0x6da0ce20, + 0x2cfd4: 0x6dc30820, 0x2cfd5: 0x6dc30a20, 0x2cfd6: 0x6dc30c20, 0x2cfd7: 0x6dc30e20, + 0x2cfd8: 0x6dc31020, 0x2cfd9: 0x6dc31220, 0x2cfda: 0x6dc31420, 0x2cfdb: 0x6dc31620, + 0x2cfdc: 0x6dc31820, 0x2cfdd: 0x6dc31a20, 0x2cfde: 0x6dc31c20, 0x2cfdf: 0x6dc31e20, + 0x2cfe0: 0x6dc32020, 0x2cfe1: 0x6dc32220, 0x2cfe2: 0x6dc32420, 0x2cfe3: 0x6dc32620, + 0x2cfe4: 0x6dc32820, 0x2cfe5: 0x6de08420, 0x2cfe6: 0x6de08620, 0x2cfe7: 0x6de08820, + 0x2cfe8: 0x6de08a20, 0x2cfe9: 0x6de08c20, 0x2cfea: 0x6de08e20, 0x2cfeb: 0x6de09020, + 0x2cfec: 0x6de09220, 0x2cfed: 0x6de09420, 0x2cfee: 0x6dc3dc20, 0x2cfef: 0x6de09620, + 0x2cff0: 0x6de09820, 0x2cff1: 0x6df8d020, 0x2cff2: 0x6df8d220, 0x2cff3: 0x6df8d420, + 0x2cff4: 0x6df8d620, 0x2cff5: 0x6df8d820, 0x2cff6: 0x6df8da20, 0x2cff7: 0x6df8dc20, + 0x2cff8: 0x6df8de20, 0x2cff9: 0x6df8e020, 0x2cffa: 0x6e0c9020, 0x2cffb: 0x6e0c9820, + 0x2cffc: 0x6df92820, 0x2cffd: 0x6e0c9a20, 0x2cffe: 0x6e0c9c20, 0x2cfff: 0x6e0c9e20, + // Block 0xb40, offset 0x2d000 + 0x2d000: 0x6e0ca020, 0x2d001: 0x6e0ca220, 0x2d002: 0x6e0ca420, 0x2d003: 0x6e0ca620, + 0x2d004: 0x6e0ca820, 0x2d005: 0x6e1c3020, 0x2d006: 0x6e1c3220, 0x2d007: 0x6e1c3420, + 0x2d008: 0x6e1c3620, 0x2d009: 0x6e1c3820, 0x2d00a: 0x6e1c3a20, 0x2d00b: 0x6e1c3c20, + 0x2d00c: 0x6e287620, 0x2d00d: 0x6e0caa20, 0x2d00e: 0x6e1c3e20, 0x2d00f: 0x6e287820, + 0x2d010: 0x6e287a20, 0x2d011: 0x6e319e20, 0x2d012: 0x6e31a020, 0x2d013: 0x6e31a220, + 0x2d014: 0x6e384820, 0x2d015: 0x6e384a20, 0x2d016: 0x6e428420, 0x2d017: 0x6c018220, + 0x2d018: 0x6c078a20, 0x2d019: 0x6c078c20, 0x2d01a: 0x6c078e20, 0x2d01b: 0x6c079020, + 0x2d01c: 0x6c079220, 0x2d01d: 0x6c0e9820, 0x2d01e: 0x6c0e9a20, 0x2d01f: 0x6c0e9c20, + 0x2d020: 0x6c0e9e20, 0x2d021: 0x6c0ea020, 0x2d022: 0x6c0ea220, 0x2d023: 0x6c0ea420, + 0x2d024: 0x6c1a4a20, 0x2d025: 0x6c1a4c20, 0x2d026: 0x6c1a4e20, 0x2d027: 0x6c1a5020, + 0x2d028: 0x6c1a5220, 0x2d029: 0x6c1a5420, 0x2d02a: 0x6c1a5620, 0x2d02b: 0x6c1a5820, + 0x2d02c: 0x6c1a5a20, 0x2d02d: 0x6c1a5c20, 0x2d02e: 0x6c1a5e20, 0x2d02f: 0x6c1a6020, + 0x2d030: 0x6c1a6220, 0x2d031: 0x6c1a6420, 0x2d032: 0x6c1a6620, 0x2d033: 0x6c1a6820, + 0x2d034: 0x6c1a6a20, 0x2d035: 0x6c1a6c20, 0x2d036: 0x6c2d8220, 0x2d037: 0x6c2d8420, + 0x2d038: 0x6c2d8620, 0x2d039: 0x6c2d8820, 0x2d03a: 0x6c2d8a20, 0x2d03b: 0x6c2d8c20, + 0x2d03c: 0x6c2d8e20, 0x2d03d: 0x6c2d9020, 0x2d03e: 0x6c2d9220, 0x2d03f: 0x6c47de20, + // Block 0xb41, offset 0x2d040 + 0x2d040: 0x6c47e020, 0x2d041: 0x6c695020, 0x2d042: 0x6c695220, 0x2d043: 0x6c695420, + 0x2d044: 0x6c695620, 0x2d045: 0x6c695820, 0x2d046: 0x6c695a20, 0x2d047: 0x6c901c20, + 0x2d048: 0x6c901e20, 0x2d049: 0x6c902020, 0x2d04a: 0x6c902220, 0x2d04b: 0x6c902420, + 0x2d04c: 0x6cbc4020, 0x2d04d: 0x6cbc4220, 0x2d04e: 0x6cbc4420, 0x2d04f: 0x6c902620, + 0x2d050: 0x6cbc4620, 0x2d051: 0x6ced2820, 0x2d052: 0x6ced2a20, 0x2d053: 0x6ced2c20, + 0x2d054: 0x6ced2e20, 0x2d055: 0x6ced3020, 0x2d056: 0x6d1cf220, 0x2d057: 0x6d1cf420, + 0x2d058: 0x6d1cf620, 0x2d059: 0x6d1cf820, 0x2d05a: 0x6d4ab620, 0x2d05b: 0x6d785820, + 0x2d05c: 0x6d785a20, 0x2d05d: 0x6e1c7420, 0x2d05e: 0x6e3d0e20, 0x2d05f: 0x6c018420, + 0x2d060: 0x6c03ce20, 0x2d061: 0x6c03d020, 0x2d062: 0x6c07a220, 0x2d063: 0x6c07a420, + 0x2d064: 0x6c07a620, 0x2d065: 0x6c07a820, 0x2d066: 0x6c07aa20, 0x2d067: 0x6c07ac20, + 0x2d068: 0x6c0ec020, 0x2d069: 0x6c0ec220, 0x2d06a: 0x6c0ec420, 0x2d06b: 0x6c0ec620, + 0x2d06c: 0x6c0ec820, 0x2d06d: 0x6c0eca20, 0x2d06e: 0x6c0ecc20, 0x2d06f: 0x6c0ece20, + 0x2d070: 0x6c0ed020, 0x2d071: 0x6c0ed220, 0x2d072: 0x6c0ed420, 0x2d073: 0x6c0ed620, + 0x2d074: 0x6c0ed820, 0x2d075: 0x6c0eda20, 0x2d076: 0x6c0edc20, 0x2d077: 0x6c0ede20, + 0x2d078: 0x6c0ee020, 0x2d079: 0x6c0ee220, 0x2d07a: 0x6c0ee420, 0x2d07b: 0x6c1aac20, + 0x2d07c: 0x6c1aae20, 0x2d07d: 0x6c1ab020, 0x2d07e: 0x6c1ab220, 0x2d07f: 0x6c1ab420, + // Block 0xb42, offset 0x2d080 + 0x2d080: 0x6c1ab620, 0x2d081: 0x6c1ab820, 0x2d082: 0x6c1aba20, 0x2d083: 0x6c1abc20, + 0x2d084: 0x6c1abe20, 0x2d085: 0x6c1ac020, 0x2d086: 0x6c1ac220, 0x2d087: 0x6c1ac420, + 0x2d088: 0x6c1ac620, 0x2d089: 0x6c1ac820, 0x2d08a: 0x6c1aca20, 0x2d08b: 0x6c1acc20, + 0x2d08c: 0x6c1ace20, 0x2d08d: 0x6c1ad020, 0x2d08e: 0x6c1ad220, 0x2d08f: 0x6c1ad420, + 0x2d090: 0x6c1ad620, 0x2d091: 0x6c1ad820, 0x2d092: 0x6c1ada20, 0x2d093: 0x6c1adc20, + 0x2d094: 0x6c1ade20, 0x2d095: 0x6c1ae020, 0x2d096: 0x6c1ae220, 0x2d097: 0x6c1ae420, + 0x2d098: 0x6c1ae620, 0x2d099: 0x6c1ae820, 0x2d09a: 0x6c1aea20, 0x2d09b: 0x6c1aec20, + 0x2d09c: 0x6c1aee20, 0x2d09d: 0x6c1af020, 0x2d09e: 0x6c1af220, 0x2d09f: 0x6c1af420, + 0x2d0a0: 0x6c1af620, 0x2d0a1: 0x6c2db420, 0x2d0a2: 0x6c2db620, 0x2d0a3: 0x6c2db820, + 0x2d0a4: 0x6c2dba20, 0x2d0a5: 0x6c2dbc20, 0x2d0a6: 0x6c2dbe20, 0x2d0a7: 0x6c2dc020, + 0x2d0a8: 0x6c2dc220, 0x2d0a9: 0x6c2dc420, 0x2d0aa: 0x6c2dc620, 0x2d0ab: 0x6c2dc820, + 0x2d0ac: 0x6c2dca20, 0x2d0ad: 0x6c2dcc20, 0x2d0ae: 0x6c2dce20, 0x2d0af: 0x6c2dd020, + 0x2d0b0: 0x6c2dd220, 0x2d0b1: 0x6c2dd420, 0x2d0b2: 0x6c2dd620, 0x2d0b3: 0x6c2dd820, + 0x2d0b4: 0x6c2dda20, 0x2d0b5: 0x6c2ddc20, 0x2d0b6: 0x6c2dde20, 0x2d0b7: 0x6c2de020, + 0x2d0b8: 0x6c2de220, 0x2d0b9: 0x6c2de420, 0x2d0ba: 0x6c2de620, 0x2d0bb: 0x6c2de820, + 0x2d0bc: 0x6c2dea20, 0x2d0bd: 0x6c2dec20, 0x2d0be: 0x6c2dee20, 0x2d0bf: 0x6c2df020, + // Block 0xb43, offset 0x2d0c0 + 0x2d0c0: 0x6c2df220, 0x2d0c1: 0x6c2df420, 0x2d0c2: 0x6c2df620, 0x2d0c3: 0x6c2df820, + 0x2d0c4: 0x6c2dfa20, 0x2d0c5: 0x6c2dfc20, 0x2d0c6: 0x6c2dfe20, 0x2d0c7: 0x6c2e0020, + 0x2d0c8: 0x6c2e0220, 0x2d0c9: 0x6c2e0420, 0x2d0ca: 0x6c2e0620, 0x2d0cb: 0x6c481220, + 0x2d0cc: 0x6c481420, 0x2d0cd: 0x6c481620, 0x2d0ce: 0x6c481820, 0x2d0cf: 0x6c481a20, + 0x2d0d0: 0x6c481c20, 0x2d0d1: 0x6c481e20, 0x2d0d2: 0x6c482020, 0x2d0d3: 0x6c482220, + 0x2d0d4: 0x6c482420, 0x2d0d5: 0x6c482620, 0x2d0d6: 0x6c482820, 0x2d0d7: 0x6c482a20, + 0x2d0d8: 0x6c482c20, 0x2d0d9: 0x6c482e20, 0x2d0da: 0x6c483020, 0x2d0db: 0x6c483220, + 0x2d0dc: 0x6c483420, 0x2d0dd: 0x6c483620, 0x2d0de: 0x6c483820, 0x2d0df: 0x6c483a20, + 0x2d0e0: 0x6c483c20, 0x2d0e1: 0x6c483e20, 0x2d0e2: 0x6c484020, 0x2d0e3: 0x6c484220, + 0x2d0e4: 0x6c484420, 0x2d0e5: 0x6c484620, 0x2d0e6: 0x6c484820, 0x2d0e7: 0x6c484a20, + 0x2d0e8: 0x6c484c20, 0x2d0e9: 0x6c484e20, 0x2d0ea: 0x6c485020, 0x2d0eb: 0x6c485220, + 0x2d0ec: 0x6c485420, 0x2d0ed: 0x6c485620, 0x2d0ee: 0x6c485820, 0x2d0ef: 0x6c485a20, + 0x2d0f0: 0x6c485c20, 0x2d0f1: 0x6c485e20, 0x2d0f2: 0x6c486020, 0x2d0f3: 0x6c486220, + 0x2d0f4: 0x6c486420, 0x2d0f5: 0x6c486620, 0x2d0f6: 0x6c698e20, 0x2d0f7: 0x6c699020, + 0x2d0f8: 0x6c699220, 0x2d0f9: 0x6c699420, 0x2d0fa: 0x6c699620, 0x2d0fb: 0x6c699820, + 0x2d0fc: 0x6c699a20, 0x2d0fd: 0x6c699c20, 0x2d0fe: 0x6c699e20, 0x2d0ff: 0x6c69a020, + // Block 0xb44, offset 0x2d100 + 0x2d100: 0x6c69a220, 0x2d101: 0x6c69a420, 0x2d102: 0x6c69a620, 0x2d103: 0x6c69a820, + 0x2d104: 0x6c69aa20, 0x2d105: 0x6c69ac20, 0x2d106: 0x6c69ae20, 0x2d107: 0x6c69b020, + 0x2d108: 0x6c69b220, 0x2d109: 0x6c69b420, 0x2d10a: 0x6c69b620, 0x2d10b: 0x6c69b820, + 0x2d10c: 0x6c69ba20, 0x2d10d: 0x6c69bc20, 0x2d10e: 0x6c486820, 0x2d10f: 0x6c69be20, + 0x2d110: 0x6c69c020, 0x2d111: 0x6c69c220, 0x2d112: 0x6c69c420, 0x2d113: 0x6c69c620, + 0x2d114: 0x6c69c820, 0x2d115: 0x6c69ca20, 0x2d116: 0x6c69cc20, 0x2d117: 0x6c69ce20, + 0x2d118: 0x6c69d020, 0x2d119: 0x6c69d220, 0x2d11a: 0x6c69d420, 0x2d11b: 0x6c69d620, + 0x2d11c: 0x6c905420, 0x2d11d: 0x6c905620, 0x2d11e: 0x6c905820, 0x2d11f: 0x6c905a20, + 0x2d120: 0x6c905c20, 0x2d121: 0x6c905e20, 0x2d122: 0x6c906020, 0x2d123: 0x6c906220, + 0x2d124: 0x6c906420, 0x2d125: 0x6c906620, 0x2d126: 0x6c906820, 0x2d127: 0x6c906a20, + 0x2d128: 0x6c906c20, 0x2d129: 0x6c906e20, 0x2d12a: 0x6c915e20, 0x2d12b: 0x6c907020, + 0x2d12c: 0x6c907220, 0x2d12d: 0x6c907420, 0x2d12e: 0x6c907620, 0x2d12f: 0x6c907820, + 0x2d130: 0x6c907a20, 0x2d131: 0x6c907c20, 0x2d132: 0x6c907e20, 0x2d133: 0x6c908020, + 0x2d134: 0x6c908220, 0x2d135: 0x6c908420, 0x2d136: 0x6c908620, 0x2d137: 0x6c908820, + 0x2d138: 0x6c908a20, 0x2d139: 0x6c908c20, 0x2d13a: 0x6c908e20, 0x2d13b: 0x6c909020, + 0x2d13c: 0x6c909220, 0x2d13d: 0x6c909420, 0x2d13e: 0x6c909620, 0x2d13f: 0x6c909820, + // Block 0xb45, offset 0x2d140 + 0x2d140: 0x6c909a20, 0x2d141: 0x6c909c20, 0x2d142: 0x6c909e20, 0x2d143: 0x6c90a020, + 0x2d144: 0x6c90a220, 0x2d145: 0x6c90a420, 0x2d146: 0x6c90a620, 0x2d147: 0x6c90a820, + 0x2d148: 0x6c90aa20, 0x2d149: 0x6c90ac20, 0x2d14a: 0x6c90ae20, 0x2d14b: 0x6c90b020, + 0x2d14c: 0x6c90b220, 0x2d14d: 0x6c90b420, 0x2d14e: 0x6c90b620, 0x2d14f: 0x6c90b820, + 0x2d150: 0x6c90ba20, 0x2d151: 0x6c90bc20, 0x2d152: 0x6c90be20, 0x2d153: 0x6c90c020, + 0x2d154: 0x6c90c220, 0x2d155: 0x6c90c420, 0x2d156: 0x6cbc7a20, 0x2d157: 0x6cbc7c20, + 0x2d158: 0x6cbc7e20, 0x2d159: 0x6cbc8020, 0x2d15a: 0x6cbc8220, 0x2d15b: 0x6cbc8420, + 0x2d15c: 0x6cbc8620, 0x2d15d: 0x6cbc8820, 0x2d15e: 0x6cbc8a20, 0x2d15f: 0x6cbc8c20, + 0x2d160: 0x6cbc8e20, 0x2d161: 0x6cbc9020, 0x2d162: 0x6cbc9220, 0x2d163: 0x6cbc9420, + 0x2d164: 0x6cbc9620, 0x2d165: 0x6cbc9820, 0x2d166: 0x6cbc9a20, 0x2d167: 0x6cbc9c20, + 0x2d168: 0x6cbc9e20, 0x2d169: 0x6cbca020, 0x2d16a: 0x6cbca220, 0x2d16b: 0x6cbca420, + 0x2d16c: 0x6cbca620, 0x2d16d: 0x6cbca820, 0x2d16e: 0x6cbcaa20, 0x2d16f: 0x6cbcac20, + 0x2d170: 0x6cbcae20, 0x2d171: 0x6cbcb020, 0x2d172: 0x6c6a6e20, 0x2d173: 0x6cbcb220, + 0x2d174: 0x6cbcb420, 0x2d175: 0x6c916020, 0x2d176: 0x6cbcb620, 0x2d177: 0x6cbcb820, + 0x2d178: 0x6cbcba20, 0x2d179: 0x6cbcbc20, 0x2d17a: 0x6cbcbe20, 0x2d17b: 0x6cbcc020, + 0x2d17c: 0x6cbcc220, 0x2d17d: 0x6ced5820, 0x2d17e: 0x6cbcc420, 0x2d17f: 0x6cbcc620, + // Block 0xb46, offset 0x2d180 + 0x2d180: 0x6cbcc820, 0x2d181: 0x6cbcca20, 0x2d182: 0x6cbccc20, 0x2d183: 0x6ced5a20, + 0x2d184: 0x6cbcce20, 0x2d185: 0x6cbcd020, 0x2d186: 0x6cbcd220, 0x2d187: 0x6cbcd420, + 0x2d188: 0x6cbcd620, 0x2d189: 0x6ced5c20, 0x2d18a: 0x6ced5e20, 0x2d18b: 0x6ced6020, + 0x2d18c: 0x6ced6220, 0x2d18d: 0x6ced6420, 0x2d18e: 0x6ced6620, 0x2d18f: 0x6ced6820, + 0x2d190: 0x6ced6a20, 0x2d191: 0x6ced6c20, 0x2d192: 0x6ced6e20, 0x2d193: 0x6ced7020, + 0x2d194: 0x6ced7220, 0x2d195: 0x6ced7420, 0x2d196: 0x6ced7620, 0x2d197: 0x6ced7820, + 0x2d198: 0x6ced7a20, 0x2d199: 0x6ced7c20, 0x2d19a: 0x6ced7e20, 0x2d19b: 0x6ced8020, + 0x2d19c: 0x6ced8220, 0x2d19d: 0x6ced8420, 0x2d19e: 0x6ced8620, 0x2d19f: 0x6ced8820, + 0x2d1a0: 0x6ced8a20, 0x2d1a1: 0x6ced8c20, 0x2d1a2: 0x6ced8e20, 0x2d1a3: 0x6ced9020, + 0x2d1a4: 0x6ced9220, 0x2d1a5: 0x6ced9420, 0x2d1a6: 0x6ced9620, 0x2d1a7: 0x6ced9820, + 0x2d1a8: 0x6ced9a20, 0x2d1a9: 0x6ced9c20, 0x2d1aa: 0x6ced9e20, 0x2d1ab: 0x6ceda020, + 0x2d1ac: 0x6ceda220, 0x2d1ad: 0x6ceda420, 0x2d1ae: 0x6ceda620, 0x2d1af: 0x6ceda820, + 0x2d1b0: 0x6cedaa20, 0x2d1b1: 0x6cedac20, 0x2d1b2: 0x6d1d2420, 0x2d1b3: 0x6d1d2620, + 0x2d1b4: 0x6d1d2820, 0x2d1b5: 0x6d1d2a20, 0x2d1b6: 0x6d1d2c20, 0x2d1b7: 0x6d1d2e20, + 0x2d1b8: 0x6d1d3020, 0x2d1b9: 0x6d1d3220, 0x2d1ba: 0x6d1d3420, 0x2d1bb: 0x6d1d3620, + 0x2d1bc: 0x6d1d3820, 0x2d1bd: 0x6d1d3a20, 0x2d1be: 0x6d1d3c20, 0x2d1bf: 0x6d1d3e20, + // Block 0xb47, offset 0x2d1c0 + 0x2d1c0: 0x6d4ac620, 0x2d1c1: 0x6d1d4020, 0x2d1c2: 0x6d1d4220, 0x2d1c3: 0x6d1d4420, + 0x2d1c4: 0x6d1d4620, 0x2d1c5: 0x6d1d4820, 0x2d1c6: 0x6d1d4a20, 0x2d1c7: 0x6d1d4c20, + 0x2d1c8: 0x6d1d4e20, 0x2d1c9: 0x6d1d5020, 0x2d1ca: 0x6d1d5220, 0x2d1cb: 0x6d1d5420, + 0x2d1cc: 0x6d1d5620, 0x2d1cd: 0x6d1d5820, 0x2d1ce: 0x6d1d5a20, 0x2d1cf: 0x6d1d5c20, + 0x2d1d0: 0x6d1d5e20, 0x2d1d1: 0x6d1d6020, 0x2d1d2: 0x6d1d6220, 0x2d1d3: 0x6d1d6420, + 0x2d1d4: 0x6d1d6620, 0x2d1d5: 0x6d1d6820, 0x2d1d6: 0x6d1d6a20, 0x2d1d7: 0x6d1d6c20, + 0x2d1d8: 0x6d1d6e20, 0x2d1d9: 0x6d1d7020, 0x2d1da: 0x6d1d7220, 0x2d1db: 0x6d1d7420, + 0x2d1dc: 0x6d4ada20, 0x2d1dd: 0x6d4adc20, 0x2d1de: 0x6d4ade20, 0x2d1df: 0x6d4ae020, + 0x2d1e0: 0x6d4ae220, 0x2d1e1: 0x6d4ae420, 0x2d1e2: 0x6d4ae620, 0x2d1e3: 0x6d4ae820, + 0x2d1e4: 0x6d4aea20, 0x2d1e5: 0x6d4aec20, 0x2d1e6: 0x6d4aee20, 0x2d1e7: 0x6d4af020, + 0x2d1e8: 0x6d758820, 0x2d1e9: 0x6d4af220, 0x2d1ea: 0x6d4af420, 0x2d1eb: 0x6d4af620, + 0x2d1ec: 0x6d4af820, 0x2d1ed: 0x6d1df220, 0x2d1ee: 0x6d4afa20, 0x2d1ef: 0x6d4afc20, + 0x2d1f0: 0x6d4afe20, 0x2d1f1: 0x6d4b0020, 0x2d1f2: 0x6d4b0220, 0x2d1f3: 0x6d4b0420, + 0x2d1f4: 0x6d4b0620, 0x2d1f5: 0x6d4b0820, 0x2d1f6: 0x6d4b0a20, 0x2d1f7: 0x6d4b0c20, + 0x2d1f8: 0x6d4b0e20, 0x2d1f9: 0x6d4b1020, 0x2d1fa: 0x6d787420, 0x2d1fb: 0x6d787620, + 0x2d1fc: 0x6d787820, 0x2d1fd: 0x6d787a20, 0x2d1fe: 0x6d787c20, 0x2d1ff: 0x6d787e20, + // Block 0xb48, offset 0x2d200 + 0x2d200: 0x6d788020, 0x2d201: 0x6d788220, 0x2d202: 0x6d788420, 0x2d203: 0x6d788620, + 0x2d204: 0x6d788820, 0x2d205: 0x6d788a20, 0x2d206: 0x6d788c20, 0x2d207: 0x6d788e20, + 0x2d208: 0x6d789020, 0x2d209: 0x6d789220, 0x2d20a: 0x6d789420, 0x2d20b: 0x6d789620, + 0x2d20c: 0x6d789820, 0x2d20d: 0x6da19020, 0x2d20e: 0x6da19220, 0x2d20f: 0x6da19420, + 0x2d210: 0x6da19620, 0x2d211: 0x6da19820, 0x2d212: 0x6da19a20, 0x2d213: 0x6da19c20, + 0x2d214: 0x6da19e20, 0x2d215: 0x6da1a020, 0x2d216: 0x6da1a220, 0x2d217: 0x6da1a420, + 0x2d218: 0x6dc3e620, 0x2d219: 0x6dc3e820, 0x2d21a: 0x6de10620, 0x2d21b: 0x6de10820, + 0x2d21c: 0x6de10a20, 0x2d21d: 0x6de10c20, 0x2d21e: 0x6de10e20, 0x2d21f: 0x6de11020, + 0x2d220: 0x6de11220, 0x2d221: 0x6de07820, 0x2d222: 0x6de11420, 0x2d223: 0x6df93420, + 0x2d224: 0x6df93620, 0x2d225: 0x6df93820, 0x2d226: 0x6e0cfc20, 0x2d227: 0x6e288e20, + 0x2d228: 0x6e289020, 0x2d229: 0x6e31c420, 0x2d22a: 0x6e386020, 0x2d22b: 0x6c018620, + 0x2d22c: 0x6c03da20, 0x2d22d: 0x6c07c420, 0x2d22e: 0x6c0f0e20, 0x2d22f: 0x6c1b6620, + 0x2d230: 0x6c1b6820, 0x2d231: 0x6c1b6a20, 0x2d232: 0x6c1b6c20, 0x2d233: 0x6c1b6e20, + 0x2d234: 0x6c48e620, 0x2d235: 0x6c48e820, 0x2d236: 0x6c6a7020, 0x2d237: 0x6c916220, + 0x2d238: 0x6c916420, 0x2d239: 0x6cbd8820, 0x2d23a: 0x6cbd8a20, 0x2d23b: 0x6cbd8c20, + 0x2d23c: 0x6cee4e20, 0x2d23d: 0x6d1df420, 0x2d23e: 0x6d1df620, 0x2d23f: 0x6d4ba220, + // Block 0xb49, offset 0x2d240 + 0x2d240: 0x6d4ba420, 0x2d241: 0x6d790020, 0x2d242: 0x6c018820, 0x2d243: 0x6c03dc20, + 0x2d244: 0x6c07c820, 0x2d245: 0x6c0f1220, 0x2d246: 0x6c1b7420, 0x2d247: 0x6c2e8020, + 0x2d248: 0x6c48f220, 0x2d249: 0x6c48f820, 0x2d24a: 0x6c018c20, 0x2d24b: 0x6c1b7c20, + 0x2d24c: 0x6c2e8220, 0x2d24d: 0x6c48fa20, 0x2d24e: 0x6c6a8420, 0x2d24f: 0x6c6a8620, + 0x2d250: 0x6d1e0220, 0x2d251: 0x6dc43a20, 0x2d252: 0x6de14820, 0x2d253: 0x6dc43c20, + 0x2d254: 0x6e0d1e20, 0x2d255: 0x6c018e20, 0x2d256: 0x6c07d020, 0x2d257: 0x6c07d220, + 0x2d258: 0x6c07d420, 0x2d259: 0x6c0f1c20, 0x2d25a: 0x6c0f1e20, 0x2d25b: 0x6c0f2020, + 0x2d25c: 0x6c2e8e20, 0x2d25d: 0x6c2e9020, 0x2d25e: 0x6c6a8c20, 0x2d25f: 0x6c918020, + 0x2d260: 0x6c918220, 0x2d261: 0x6cbd9a20, 0x2d262: 0x6d1e1020, 0x2d263: 0x6d1e1220, + 0x2d264: 0x6d1e1420, 0x2d265: 0x6d1e1620, 0x2d266: 0x6d4bae20, 0x2d267: 0x6c019020, + 0x2d268: 0x6c019220, 0x2d269: 0x6c03de20, 0x2d26a: 0x6c03e020, 0x2d26b: 0x6c03e220, + 0x2d26c: 0x6c03e420, 0x2d26d: 0x6c03e620, 0x2d26e: 0x6c07de20, 0x2d26f: 0x6c07e020, + 0x2d270: 0x6c07e220, 0x2d271: 0x6c07e420, 0x2d272: 0x6c07e620, 0x2d273: 0x6c07e820, + 0x2d274: 0x6c07ea20, 0x2d275: 0x6c0f3220, 0x2d276: 0x6c0f3420, 0x2d277: 0x6c0f3620, + 0x2d278: 0x6c0f3820, 0x2d279: 0x6c0f3a20, 0x2d27a: 0x6c0f3c20, 0x2d27b: 0x6c0f3e20, + 0x2d27c: 0x6c0f4020, 0x2d27d: 0x6c1b8e20, 0x2d27e: 0x6c1b9020, 0x2d27f: 0x6c1b9220, + // Block 0xb4a, offset 0x2d280 + 0x2d280: 0x6c1b9420, 0x2d281: 0x6c1b9620, 0x2d282: 0x6c1b9820, 0x2d283: 0x6c2ea620, + 0x2d284: 0x6c2ea820, 0x2d285: 0x6c2eaa20, 0x2d286: 0x6c2eac20, 0x2d287: 0x6c2eae20, + 0x2d288: 0x6c2eb020, 0x2d289: 0x6c2eb220, 0x2d28a: 0x6c6aaa20, 0x2d28b: 0x6c2eb420, + 0x2d28c: 0x6c2eb620, 0x2d28d: 0x6c2eb820, 0x2d28e: 0x6c490620, 0x2d28f: 0x6c490820, + 0x2d290: 0x6c490a20, 0x2d291: 0x6c490c20, 0x2d292: 0x6c490e20, 0x2d293: 0x6c491020, + 0x2d294: 0x6c2ef220, 0x2d295: 0x6c491220, 0x2d296: 0x6c491420, 0x2d297: 0x6c6aac20, + 0x2d298: 0x6c6aae20, 0x2d299: 0x6c6ab020, 0x2d29a: 0x6c6ab220, 0x2d29b: 0x6c919e20, + 0x2d29c: 0x6c91a020, 0x2d29d: 0x6c91a220, 0x2d29e: 0x6c91a420, 0x2d29f: 0x6c91d220, + 0x2d2a0: 0x6cbdb820, 0x2d2a1: 0x6cbdba20, 0x2d2a2: 0x6c91d420, 0x2d2a3: 0x6cbdbc20, + 0x2d2a4: 0x6cbdbe20, 0x2d2a5: 0x6cbdc020, 0x2d2a6: 0x6cee7820, 0x2d2a7: 0x6cee7a20, + 0x2d2a8: 0x6cee7c20, 0x2d2a9: 0x6d1e2e20, 0x2d2aa: 0x6d1e3020, 0x2d2ab: 0x6d1e3220, + 0x2d2ac: 0x6d1e3420, 0x2d2ad: 0x6d4bb820, 0x2d2ae: 0x6d791e20, 0x2d2af: 0x6d792020, + 0x2d2b0: 0x6dc44c20, 0x2d2b1: 0x6e1c9220, 0x2d2b2: 0x6e28a420, 0x2d2b3: 0x6c019420, + 0x2d2b4: 0x6c07fe20, 0x2d2b5: 0x6c080020, 0x2d2b6: 0x6c080220, 0x2d2b7: 0x6c0f6220, + 0x2d2b8: 0x6c0f6420, 0x2d2b9: 0x6c0f6620, 0x2d2ba: 0x6c0f6820, 0x2d2bb: 0x6c0f6a20, + 0x2d2bc: 0x6c0f6c20, 0x2d2bd: 0x6c0f6e20, 0x2d2be: 0x6c0f7020, 0x2d2bf: 0x6c0f7220, + // Block 0xb4b, offset 0x2d2c0 + 0x2d2c0: 0x6c0f7420, 0x2d2c1: 0x6c0f7620, 0x2d2c2: 0x6c0f7820, 0x2d2c3: 0x6c0f7a20, + 0x2d2c4: 0x6c0f7c20, 0x2d2c5: 0x6c0f7e20, 0x2d2c6: 0x6c0f8020, 0x2d2c7: 0x6c0f8220, + 0x2d2c8: 0x6c0f8420, 0x2d2c9: 0x6c1bd420, 0x2d2ca: 0x6c1bd620, 0x2d2cb: 0x6c1bd820, + 0x2d2cc: 0x6c1bda20, 0x2d2cd: 0x6c495420, 0x2d2ce: 0x6c1bdc20, 0x2d2cf: 0x6c1bde20, + 0x2d2d0: 0x6c1be020, 0x2d2d1: 0x6c1be220, 0x2d2d2: 0x6c1be420, 0x2d2d3: 0x6c1be620, + 0x2d2d4: 0x6c1be820, 0x2d2d5: 0x6c1bea20, 0x2d2d6: 0x6c1bec20, 0x2d2d7: 0x6c1bee20, + 0x2d2d8: 0x6c1bf020, 0x2d2d9: 0x6c1bf220, 0x2d2da: 0x6c1bf420, 0x2d2db: 0x6c1bf620, + 0x2d2dc: 0x6c1bf820, 0x2d2dd: 0x6c1bfa20, 0x2d2de: 0x6c1bfc20, 0x2d2df: 0x6c1bfe20, + 0x2d2e0: 0x6c1c0020, 0x2d2e1: 0x6c1c0220, 0x2d2e2: 0x6c1c0420, 0x2d2e3: 0x6c1c0620, + 0x2d2e4: 0x6c1c0820, 0x2d2e5: 0x6c1c0a20, 0x2d2e6: 0x6c1c0c20, 0x2d2e7: 0x6c1c0e20, + 0x2d2e8: 0x6c1c1020, 0x2d2e9: 0x6c1c1220, 0x2d2ea: 0x6c1c1420, 0x2d2eb: 0x6c1c1620, + 0x2d2ec: 0x6c2f1820, 0x2d2ed: 0x6c2f1a20, 0x2d2ee: 0x6c2f1c20, 0x2d2ef: 0x6c2f1e20, + 0x2d2f0: 0x6c2f2020, 0x2d2f1: 0x6c2f2220, 0x2d2f2: 0x6c2f2420, 0x2d2f3: 0x6c2f2620, + 0x2d2f4: 0x6c2f2820, 0x2d2f5: 0x6c2f2a20, 0x2d2f6: 0x6c2f2c20, 0x2d2f7: 0x6c2f2e20, + 0x2d2f8: 0x6c2f3020, 0x2d2f9: 0x6c2f3220, 0x2d2fa: 0x6c2f3420, 0x2d2fb: 0x6c2f3620, + 0x2d2fc: 0x6c2f3820, 0x2d2fd: 0x6c2f3a20, 0x2d2fe: 0x6c2f3c20, 0x2d2ff: 0x6c2f3e20, + // Block 0xb4c, offset 0x2d300 + 0x2d300: 0x6c2f4020, 0x2d301: 0x6c2f4220, 0x2d302: 0x6c2f4420, 0x2d303: 0x6c2f4620, + 0x2d304: 0x6c2f4820, 0x2d305: 0x6c2f4a20, 0x2d306: 0x6c2f4c20, 0x2d307: 0x6c2f4e20, + 0x2d308: 0x6c2f5020, 0x2d309: 0x6c2f5220, 0x2d30a: 0x6c2f5420, 0x2d30b: 0x6c2f5620, + 0x2d30c: 0x6c2f5820, 0x2d30d: 0x6c2f5a20, 0x2d30e: 0x6c2f5c20, 0x2d30f: 0x6c2f5e20, + 0x2d310: 0x6c2f6020, 0x2d311: 0x6c2f6220, 0x2d312: 0x6c2f6420, 0x2d313: 0x6c2f6620, + 0x2d314: 0x6c2f6820, 0x2d315: 0x6c493c20, 0x2d316: 0x6c2f6a20, 0x2d317: 0x6c2f6c20, + 0x2d318: 0x6c495620, 0x2d319: 0x6c495820, 0x2d31a: 0x6c495a20, 0x2d31b: 0x6c495c20, + 0x2d31c: 0x6c495e20, 0x2d31d: 0x6c496020, 0x2d31e: 0x6c496220, 0x2d31f: 0x6c496420, + 0x2d320: 0x6c496620, 0x2d321: 0x6c496820, 0x2d322: 0x6c496a20, 0x2d323: 0x6c496c20, + 0x2d324: 0x6c496e20, 0x2d325: 0x6c497020, 0x2d326: 0x6c497220, 0x2d327: 0x6c497420, + 0x2d328: 0x6c497620, 0x2d329: 0x6c497820, 0x2d32a: 0x6c497a20, 0x2d32b: 0x6c497c20, + 0x2d32c: 0x6c6b1820, 0x2d32d: 0x6c497e20, 0x2d32e: 0x6c498020, 0x2d32f: 0x6c498220, + 0x2d330: 0x6c498420, 0x2d331: 0x6c498620, 0x2d332: 0x6c498820, 0x2d333: 0x6c498a20, + 0x2d334: 0x6c498c20, 0x2d335: 0x6c498e20, 0x2d336: 0x6c499020, 0x2d337: 0x6c499220, + 0x2d338: 0x6c499420, 0x2d339: 0x6c499620, 0x2d33a: 0x6c499820, 0x2d33b: 0x6c499a20, + 0x2d33c: 0x6c499c20, 0x2d33d: 0x6c499e20, 0x2d33e: 0x6c49a020, 0x2d33f: 0x6c49a220, + // Block 0xb4d, offset 0x2d340 + 0x2d340: 0x6c49a420, 0x2d341: 0x6c49a620, 0x2d342: 0x6c49a820, 0x2d343: 0x6c49aa20, + 0x2d344: 0x6c5c3020, 0x2d345: 0x6c49ac20, 0x2d346: 0x6c49ae20, 0x2d347: 0x6c49b020, + 0x2d348: 0x6c49b220, 0x2d349: 0x6c6b1a20, 0x2d34a: 0x6c6b1c20, 0x2d34b: 0x6c6b1e20, + 0x2d34c: 0x6c6b2020, 0x2d34d: 0x6c4a1a20, 0x2d34e: 0x6c6b2220, 0x2d34f: 0x6c6b2420, + 0x2d350: 0x6c6b2620, 0x2d351: 0x6c6b2820, 0x2d352: 0x6c6b2a20, 0x2d353: 0x6c6b2c20, + 0x2d354: 0x6c6b2e20, 0x2d355: 0x6c6b3020, 0x2d356: 0x6c6b3220, 0x2d357: 0x6c6b3420, + 0x2d358: 0x6c6b3620, 0x2d359: 0x6c6b3820, 0x2d35a: 0x6c6b3a20, 0x2d35b: 0x6c6b3c20, + 0x2d35c: 0x6c6b3e20, 0x2d35d: 0x6c6b4020, 0x2d35e: 0x6c6b4220, 0x2d35f: 0x6c6b4420, + 0x2d360: 0x6c6b4620, 0x2d361: 0x6c6b4820, 0x2d362: 0x6c6b4a20, 0x2d363: 0x6c6b4c20, + 0x2d364: 0x6c6b4e20, 0x2d365: 0x6c6b5020, 0x2d366: 0x6c6b5220, 0x2d367: 0x6c6b5420, + 0x2d368: 0x6c6b5620, 0x2d369: 0x6c6b5820, 0x2d36a: 0x6c6b5a20, 0x2d36b: 0x6c91d620, + 0x2d36c: 0x6c91ec20, 0x2d36d: 0x6c6b5c20, 0x2d36e: 0x6c6b5e20, 0x2d36f: 0x6c6b6020, + 0x2d370: 0x6c6b6220, 0x2d371: 0x6c6b6420, 0x2d372: 0x6c6b6620, 0x2d373: 0x6c6b6820, + 0x2d374: 0x6c6b6a20, 0x2d375: 0x6c91ee20, 0x2d376: 0x6c91f020, 0x2d377: 0x6c91f220, + 0x2d378: 0x6c91f420, 0x2d379: 0x6c91f620, 0x2d37a: 0x6c91f820, 0x2d37b: 0x6c91fa20, + 0x2d37c: 0x6c91fc20, 0x2d37d: 0x6c91d820, 0x2d37e: 0x6c91fe20, 0x2d37f: 0x6c920020, + // Block 0xb4e, offset 0x2d380 + 0x2d380: 0x6c920220, 0x2d381: 0x6c920420, 0x2d382: 0x6c920620, 0x2d383: 0x6c920820, + 0x2d384: 0x6c920a20, 0x2d385: 0x6c920c20, 0x2d386: 0x6c920e20, 0x2d387: 0x6c921020, + 0x2d388: 0x6c921220, 0x2d389: 0x6c921420, 0x2d38a: 0x6c921620, 0x2d38b: 0x6c921820, + 0x2d38c: 0x6c921a20, 0x2d38d: 0x6c921c20, 0x2d38e: 0x6c921e20, 0x2d38f: 0x6c922020, + 0x2d390: 0x6c922220, 0x2d391: 0x6c922420, 0x2d392: 0x6c922620, 0x2d393: 0x6c922820, + 0x2d394: 0x6c922a20, 0x2d395: 0x6c922c20, 0x2d396: 0x6c922e20, 0x2d397: 0x6c923020, + 0x2d398: 0x6c923220, 0x2d399: 0x6c923420, 0x2d39a: 0x6c923620, 0x2d39b: 0x6c923820, + 0x2d39c: 0x6c923a20, 0x2d39d: 0x6c923c20, 0x2d39e: 0x6c923e20, 0x2d39f: 0x6c924020, + 0x2d3a0: 0x6c924220, 0x2d3a1: 0x6c924420, 0x2d3a2: 0x6c924620, 0x2d3a3: 0x6c924820, + 0x2d3a4: 0x6c924a20, 0x2d3a5: 0x6c924c20, 0x2d3a6: 0x6c924e20, 0x2d3a7: 0x6c925020, + 0x2d3a8: 0x6c925220, 0x2d3a9: 0x6c925420, 0x2d3aa: 0x6c925620, 0x2d3ab: 0x6c925820, + 0x2d3ac: 0x6c925a20, 0x2d3ad: 0x6c925c20, 0x2d3ae: 0x6c925e20, 0x2d3af: 0x6c926020, + 0x2d3b0: 0x6c926220, 0x2d3b1: 0x6c926420, 0x2d3b2: 0x6c926620, 0x2d3b3: 0x6c926820, + 0x2d3b4: 0x6c926a20, 0x2d3b5: 0x6c926c20, 0x2d3b6: 0x6c926e20, 0x2d3b7: 0x6cbe2020, + 0x2d3b8: 0x6cbe2220, 0x2d3b9: 0x6cbe2420, 0x2d3ba: 0x6cbe2620, 0x2d3bb: 0x6cbe2820, + 0x2d3bc: 0x6cbe2a20, 0x2d3bd: 0x6cbe2c20, 0x2d3be: 0x6cbe2e20, 0x2d3bf: 0x6cbe3020, + // Block 0xb4f, offset 0x2d3c0 + 0x2d3c0: 0x6cbe3220, 0x2d3c1: 0x6cbe3420, 0x2d3c2: 0x6cbe3620, 0x2d3c3: 0x6cbe3820, + 0x2d3c4: 0x6cbe3a20, 0x2d3c5: 0x6cbe3c20, 0x2d3c6: 0x6cbe3e20, 0x2d3c7: 0x6cbe4020, + 0x2d3c8: 0x6cbe4220, 0x2d3c9: 0x6cbe4420, 0x2d3ca: 0x6cbe4620, 0x2d3cb: 0x6cbe4820, + 0x2d3cc: 0x6cbe4a20, 0x2d3cd: 0x6cbe4c20, 0x2d3ce: 0x6c930220, 0x2d3cf: 0x6cbe4e20, + 0x2d3d0: 0x6ceec620, 0x2d3d1: 0x6cbe5020, 0x2d3d2: 0x6cbe5220, 0x2d3d3: 0x6cbe5420, + 0x2d3d4: 0x6cbe5620, 0x2d3d5: 0x6cbe5820, 0x2d3d6: 0x6cbe5a20, 0x2d3d7: 0x6cbe5c20, + 0x2d3d8: 0x6cbe5e20, 0x2d3d9: 0x6cbe6020, 0x2d3da: 0x6cbe6220, 0x2d3db: 0x6cbe6420, + 0x2d3dc: 0x6cbe6620, 0x2d3dd: 0x6cbe6820, 0x2d3de: 0x6cbe6a20, 0x2d3df: 0x6cbe6c20, + 0x2d3e0: 0x6cbe6e20, 0x2d3e1: 0x6cbe7020, 0x2d3e2: 0x6cbe7220, 0x2d3e3: 0x6cbe7420, + 0x2d3e4: 0x6cbe7620, 0x2d3e5: 0x6cbe7820, 0x2d3e6: 0x6cbe7a20, 0x2d3e7: 0x6cbe7c20, + 0x2d3e8: 0x6cbe7e20, 0x2d3e9: 0x6cbe8020, 0x2d3ea: 0x6cbe8220, 0x2d3eb: 0x6cbe8420, + 0x2d3ec: 0x6cbe8620, 0x2d3ed: 0x6cbe8820, 0x2d3ee: 0x6cbe8a20, 0x2d3ef: 0x6cbe8c20, + 0x2d3f0: 0x6ceec820, 0x2d3f1: 0x6ceeca20, 0x2d3f2: 0x6ceecc20, 0x2d3f3: 0x6ceece20, + 0x2d3f4: 0x6ceed020, 0x2d3f5: 0x6ceed220, 0x2d3f6: 0x6ceed420, 0x2d3f7: 0x6ceed620, + 0x2d3f8: 0x6ceed820, 0x2d3f9: 0x6ceeda20, 0x2d3fa: 0x6ceedc20, 0x2d3fb: 0x6ceede20, + 0x2d3fc: 0x6ceee020, 0x2d3fd: 0x6ceee220, 0x2d3fe: 0x6ceee420, 0x2d3ff: 0x6ceee620, + // Block 0xb50, offset 0x2d400 + 0x2d400: 0x6ceee820, 0x2d401: 0x6ceeea20, 0x2d402: 0x6ceeec20, 0x2d403: 0x6ceeee20, + 0x2d404: 0x6ceef020, 0x2d405: 0x6ceef220, 0x2d406: 0x6ceef420, 0x2d407: 0x6ceef620, + 0x2d408: 0x6ceef820, 0x2d409: 0x6ceefa20, 0x2d40a: 0x6ceefc20, 0x2d40b: 0x6ceefe20, + 0x2d40c: 0x6cef0020, 0x2d40d: 0x6cef0220, 0x2d40e: 0x6cef0420, 0x2d40f: 0x6cbe8e20, + 0x2d410: 0x6cef0620, 0x2d411: 0x6cef0820, 0x2d412: 0x6cef0a20, 0x2d413: 0x6cef0c20, + 0x2d414: 0x6cef0e20, 0x2d415: 0x6d1e6e20, 0x2d416: 0x6d1e7020, 0x2d417: 0x6d1e7220, + 0x2d418: 0x6d1e7420, 0x2d419: 0x6d1e7620, 0x2d41a: 0x6d1e7820, 0x2d41b: 0x6d1e7a20, + 0x2d41c: 0x6d1e7c20, 0x2d41d: 0x6d1e7e20, 0x2d41e: 0x6d1e8020, 0x2d41f: 0x6d1e8220, + 0x2d420: 0x6d1e8420, 0x2d421: 0x6d1e8620, 0x2d422: 0x6d1e8820, 0x2d423: 0x6d1e8a20, + 0x2d424: 0x6d1e8c20, 0x2d425: 0x6d1e8e20, 0x2d426: 0x6d1e9020, 0x2d427: 0x6d1e9220, + 0x2d428: 0x6d1e9420, 0x2d429: 0x6d1e9620, 0x2d42a: 0x6d1e9820, 0x2d42b: 0x6d1e9a20, + 0x2d42c: 0x6d1e9c20, 0x2d42d: 0x6d1e9e20, 0x2d42e: 0x6d1ea020, 0x2d42f: 0x6d1ea220, + 0x2d430: 0x6d1ea420, 0x2d431: 0x6d1ea620, 0x2d432: 0x6d1ea820, 0x2d433: 0x6d1f2820, + 0x2d434: 0x6d4bea20, 0x2d435: 0x6d4bec20, 0x2d436: 0x6d4bee20, 0x2d437: 0x6d4bf020, + 0x2d438: 0x6d4bf220, 0x2d439: 0x6d4bf420, 0x2d43a: 0x6d4bf620, 0x2d43b: 0x6d4bf820, + 0x2d43c: 0x6d4bfa20, 0x2d43d: 0x6d4bfc20, 0x2d43e: 0x6d4bfe20, 0x2d43f: 0x6d4c0020, + // Block 0xb51, offset 0x2d440 + 0x2d440: 0x6d4c0220, 0x2d441: 0x6d4c0420, 0x2d442: 0x6d4c0620, 0x2d443: 0x6d4c0820, + 0x2d444: 0x6d4c0a20, 0x2d445: 0x6d4c0c20, 0x2d446: 0x6d4c0e20, 0x2d447: 0x6d4c1020, + 0x2d448: 0x6d4c1220, 0x2d449: 0x6d4c1420, 0x2d44a: 0x6d4c1620, 0x2d44b: 0x6d4c1820, + 0x2d44c: 0x6d4c1a20, 0x2d44d: 0x6d4c1c20, 0x2d44e: 0x6d4c1e20, 0x2d44f: 0x6d4c2020, + 0x2d450: 0x6d794220, 0x2d451: 0x6d794420, 0x2d452: 0x6d794620, 0x2d453: 0x6d794820, + 0x2d454: 0x6d794a20, 0x2d455: 0x6d794c20, 0x2d456: 0x6d794e20, 0x2d457: 0x6d795020, + 0x2d458: 0x6d795220, 0x2d459: 0x6d795420, 0x2d45a: 0x6d795620, 0x2d45b: 0x6d795820, + 0x2d45c: 0x6d795a20, 0x2d45d: 0x6d795c20, 0x2d45e: 0x6d795e20, 0x2d45f: 0x6d796020, + 0x2d460: 0x6d796220, 0x2d461: 0x6d796420, 0x2d462: 0x6d796620, 0x2d463: 0x6da22620, + 0x2d464: 0x6da22820, 0x2d465: 0x6da22a20, 0x2d466: 0x6da22c20, 0x2d467: 0x6da22e20, + 0x2d468: 0x6d79de20, 0x2d469: 0x6da23020, 0x2d46a: 0x6da23220, 0x2d46b: 0x6da23420, + 0x2d46c: 0x6da23620, 0x2d46d: 0x6da23820, 0x2d46e: 0x6da23a20, 0x2d46f: 0x6da23c20, + 0x2d470: 0x6da23e20, 0x2d471: 0x6da24020, 0x2d472: 0x6da24220, 0x2d473: 0x6da24420, + 0x2d474: 0x6d796820, 0x2d475: 0x6da24620, 0x2d476: 0x6da24820, 0x2d477: 0x6da24a20, + 0x2d478: 0x6dc45820, 0x2d479: 0x6de16220, 0x2d47a: 0x6dc45a20, 0x2d47b: 0x6dc45c20, + 0x2d47c: 0x6dc45e20, 0x2d47d: 0x6de15820, 0x2d47e: 0x6de16420, 0x2d47f: 0x6de16620, + // Block 0xb52, offset 0x2d480 + 0x2d480: 0x6df96220, 0x2d481: 0x6df96420, 0x2d482: 0x6df96620, 0x2d483: 0x6df96820, + 0x2d484: 0x6df96a20, 0x2d485: 0x6df96c20, 0x2d486: 0x6df96e20, 0x2d487: 0x6e0d2a20, + 0x2d488: 0x6e0d2c20, 0x2d489: 0x6e0d2e20, 0x2d48a: 0x6e1c9a20, 0x2d48b: 0x6e1c9c20, + 0x2d48c: 0x6e1c9e20, 0x2d48d: 0x6e28a620, 0x2d48e: 0x6e31d820, 0x2d48f: 0x6e31da20, + 0x2d490: 0x6c019620, 0x2d491: 0x6c019820, 0x2d492: 0x6c019a20, 0x2d493: 0x6c019c20, + 0x2d494: 0x6c03f220, 0x2d495: 0x6c081220, 0x2d496: 0x6c0fa820, 0x2d497: 0x6c0faa20, + 0x2d498: 0x6c0fac20, 0x2d499: 0x6c0fae20, 0x2d49a: 0x6c1c6620, 0x2d49b: 0x6c1c6820, + 0x2d49c: 0x6c1c6a20, 0x2d49d: 0x6c1c6c20, 0x2d49e: 0x6c1c6e20, 0x2d49f: 0x6c2fca20, + 0x2d4a0: 0x6c2fcc20, 0x2d4a1: 0x6c2fce20, 0x2d4a2: 0x6c2fd020, 0x2d4a3: 0x6c2fd220, + 0x2d4a4: 0x6c2fd420, 0x2d4a5: 0x6c2fd620, 0x2d4a6: 0x6c2fd820, 0x2d4a7: 0x6c2fda20, + 0x2d4a8: 0x6c4a1e20, 0x2d4a9: 0x6c4a2020, 0x2d4aa: 0x6c4a2220, 0x2d4ab: 0x6c6be020, + 0x2d4ac: 0x6c6be220, 0x2d4ad: 0x6c6be420, 0x2d4ae: 0x6c930420, 0x2d4af: 0x6c930620, + 0x2d4b0: 0x6c930820, 0x2d4b1: 0x6cbf4420, 0x2d4b2: 0x6c930a20, 0x2d4b3: 0x6cbf6220, + 0x2d4b4: 0x6cef7a20, 0x2d4b5: 0x6d1f2a20, 0x2d4b6: 0x6cef9820, 0x2d4b7: 0x6d1f2c20, + 0x2d4b8: 0x6d79e220, 0x2d4b9: 0x6d79e420, 0x2d4ba: 0x6da29620, 0x2d4bb: 0x6da29820, + 0x2d4bc: 0x6de19020, 0x2d4bd: 0x6df98620, 0x2d4be: 0x6df98820, 0x2d4bf: 0x6e1cb420, + // Block 0xb53, offset 0x2d4c0 + 0x2d4c0: 0x6c01a020, 0x2d4c1: 0x6c082220, 0x2d4c2: 0x6c082420, 0x2d4c3: 0x6c082620, + 0x2d4c4: 0x6c082820, 0x2d4c5: 0x6c0fbc20, 0x2d4c6: 0x6c0fbe20, 0x2d4c7: 0x6c0fc020, + 0x2d4c8: 0x6c0fc220, 0x2d4c9: 0x6c0fc420, 0x2d4ca: 0x6c1c8e20, 0x2d4cb: 0x6c1c9020, + 0x2d4cc: 0x6c1c9220, 0x2d4cd: 0x6c1c9420, 0x2d4ce: 0x6c1c9620, 0x2d4cf: 0x6c1c9820, + 0x2d4d0: 0x6c1c9a20, 0x2d4d1: 0x6c1c9c20, 0x2d4d2: 0x6c1c9e20, 0x2d4d3: 0x6c2ffc20, + 0x2d4d4: 0x6c2ffe20, 0x2d4d5: 0x6c300020, 0x2d4d6: 0x6c300220, 0x2d4d7: 0x6c300420, + 0x2d4d8: 0x6c300620, 0x2d4d9: 0x6c300820, 0x2d4da: 0x6c300a20, 0x2d4db: 0x6c300c20, + 0x2d4dc: 0x6c300e20, 0x2d4dd: 0x6c301020, 0x2d4de: 0x6c301220, 0x2d4df: 0x6c301420, + 0x2d4e0: 0x6c301620, 0x2d4e1: 0x6c301820, 0x2d4e2: 0x6c4a4820, 0x2d4e3: 0x6c4a4a20, + 0x2d4e4: 0x6c4a4c20, 0x2d4e5: 0x6c4a4e20, 0x2d4e6: 0x6c4a5020, 0x2d4e7: 0x6c6bfe20, + 0x2d4e8: 0x6c4a5220, 0x2d4e9: 0x6c4a5420, 0x2d4ea: 0x6c4a5620, 0x2d4eb: 0x6c4a5820, + 0x2d4ec: 0x6c6c0020, 0x2d4ed: 0x6c6c0220, 0x2d4ee: 0x6c6c0420, 0x2d4ef: 0x6c6c0620, + 0x2d4f0: 0x6c6c0820, 0x2d4f1: 0x6c6c0a20, 0x2d4f2: 0x6c6c0c20, 0x2d4f3: 0x6c6c0e20, + 0x2d4f4: 0x6c6c1020, 0x2d4f5: 0x6c6c1220, 0x2d4f6: 0x6c6c1420, 0x2d4f7: 0x6c6c1620, + 0x2d4f8: 0x6c6c1820, 0x2d4f9: 0x6c6c1a20, 0x2d4fa: 0x6c6c1c20, 0x2d4fb: 0x6c6c1e20, + 0x2d4fc: 0x6c6c2020, 0x2d4fd: 0x6c6c2220, 0x2d4fe: 0x6c6c2420, 0x2d4ff: 0x6c933020, + // Block 0xb54, offset 0x2d500 + 0x2d500: 0x6c933220, 0x2d501: 0x6c933420, 0x2d502: 0x6c933620, 0x2d503: 0x6c933820, + 0x2d504: 0x6c933a20, 0x2d505: 0x6c933c20, 0x2d506: 0x6c933e20, 0x2d507: 0x6c934020, + 0x2d508: 0x6c934220, 0x2d509: 0x6c934420, 0x2d50a: 0x6cbf6820, 0x2d50b: 0x6cbf6a20, + 0x2d50c: 0x6cbf6c20, 0x2d50d: 0x6cbf6e20, 0x2d50e: 0x6cbf7020, 0x2d50f: 0x6cbf7220, + 0x2d510: 0x6cbf7420, 0x2d511: 0x6cbf7620, 0x2d512: 0x6cbf7820, 0x2d513: 0x6cbf7a20, + 0x2d514: 0x6cbf7c20, 0x2d515: 0x6cbf7e20, 0x2d516: 0x6cefa420, 0x2d517: 0x6cefa620, + 0x2d518: 0x6cefa820, 0x2d519: 0x6cefaa20, 0x2d51a: 0x6cefac20, 0x2d51b: 0x6cefae20, + 0x2d51c: 0x6cefb020, 0x2d51d: 0x6cefb220, 0x2d51e: 0x6d1f4420, 0x2d51f: 0x6d1f4620, + 0x2d520: 0x6d1f4820, 0x2d521: 0x6d1f4a20, 0x2d522: 0x6d1f4c20, 0x2d523: 0x6d1f4e20, + 0x2d524: 0x6d1f5020, 0x2d525: 0x6d1f5220, 0x2d526: 0x6d1f5420, 0x2d527: 0x6d1f5620, + 0x2d528: 0x6d1f5820, 0x2d529: 0x6d4cce20, 0x2d52a: 0x6cbf8020, 0x2d52b: 0x6d4cd020, + 0x2d52c: 0x6d4cd220, 0x2d52d: 0x6d4cd420, 0x2d52e: 0x6d4cd620, 0x2d52f: 0x6d79fe20, + 0x2d530: 0x6d7a0020, 0x2d531: 0x6da2a020, 0x2d532: 0x6da2a220, 0x2d533: 0x6de19a20, + 0x2d534: 0x6de19c20, 0x2d535: 0x6de19e20, 0x2d536: 0x6df99620, 0x2d537: 0x6e0d4820, + 0x2d538: 0x6c01a220, 0x2d539: 0x6c083220, 0x2d53a: 0x6c0fe220, 0x2d53b: 0x6c0fe420, + 0x2d53c: 0x6c0fe620, 0x2d53d: 0x6c1cbe20, 0x2d53e: 0x6c1cc020, 0x2d53f: 0x6c1cc220, + // Block 0xb55, offset 0x2d540 + 0x2d540: 0x6c304620, 0x2d541: 0x6c4a8e20, 0x2d542: 0x6c4a9020, 0x2d543: 0x6c6c7420, + 0x2d544: 0x6c6c7620, 0x2d545: 0x6c6c7820, 0x2d546: 0x6c4a9220, 0x2d547: 0x6c938220, + 0x2d548: 0x6c938420, 0x2d549: 0x6c938620, 0x2d54a: 0x6cbfd620, 0x2d54b: 0x6cbfd820, + 0x2d54c: 0x6cbfda20, 0x2d54d: 0x6d1fac20, 0x2d54e: 0x6d4d2220, 0x2d54f: 0x6c01a820, + 0x2d550: 0x6c03fc20, 0x2d551: 0x6c03fe20, 0x2d552: 0x6c083420, 0x2d553: 0x6c083620, + 0x2d554: 0x6c083820, 0x2d555: 0x6c083a20, 0x2d556: 0x6c0fec20, 0x2d557: 0x6c0fee20, + 0x2d558: 0x6c0ff020, 0x2d559: 0x6c305820, 0x2d55a: 0x6c305a20, 0x2d55b: 0x6c4aa020, + 0x2d55c: 0x6c4aa220, 0x2d55d: 0x6c4aa420, 0x2d55e: 0x6cbfec20, 0x2d55f: 0x6cf00020, + 0x2d560: 0x6cf00220, 0x2d561: 0x6d1fbc20, 0x2d562: 0x6c01ac20, 0x2d563: 0x6c040420, + 0x2d564: 0x6c040620, 0x2d565: 0x6c0ffc20, 0x2d566: 0x6c0ffe20, 0x2d567: 0x6c100020, + 0x2d568: 0x6c1cd820, 0x2d569: 0x6c1cda20, 0x2d56a: 0x6c1cdc20, 0x2d56b: 0x6c1cde20, + 0x2d56c: 0x6c1ce020, 0x2d56d: 0x6c306e20, 0x2d56e: 0x6c4abe20, 0x2d56f: 0x6c4ac020, + 0x2d570: 0x6cc00620, 0x2d571: 0x6cc00820, 0x2d572: 0x6cf01620, 0x2d573: 0x6cf01820, + 0x2d574: 0x6cf01a20, 0x2d575: 0x6d4d5020, 0x2d576: 0x6da2d220, 0x2d577: 0x6da2d420, + 0x2d578: 0x6c01b220, 0x2d579: 0x6c024c20, 0x2d57a: 0x6c040a20, 0x2d57b: 0x6c085220, + 0x2d57c: 0x6c085420, 0x2d57d: 0x6c100e20, 0x2d57e: 0x6c1cfa20, 0x2d57f: 0x6c1cfc20, + // Block 0xb56, offset 0x2d580 + 0x2d580: 0x6c1cfe20, 0x2d581: 0x6c1d0020, 0x2d582: 0x6c1d0220, 0x2d583: 0x6c1d0420, + 0x2d584: 0x6c308620, 0x2d585: 0x6c308820, 0x2d586: 0x6c308a20, 0x2d587: 0x6c308c20, + 0x2d588: 0x6c308e20, 0x2d589: 0x6c309020, 0x2d58a: 0x6c309220, 0x2d58b: 0x6c4ad620, + 0x2d58c: 0x6c4ad820, 0x2d58d: 0x6c4ada20, 0x2d58e: 0x6c4adc20, 0x2d58f: 0x6c4ade20, + 0x2d590: 0x6c6cae20, 0x2d591: 0x6c6cb020, 0x2d592: 0x6c6cb220, 0x2d593: 0x6c6cb420, + 0x2d594: 0x6c6cb620, 0x2d595: 0x6c6cb820, 0x2d596: 0x6c6cba20, 0x2d597: 0x6c6cbc20, + 0x2d598: 0x6c6cbe20, 0x2d599: 0x6c93d020, 0x2d59a: 0x6c93d220, 0x2d59b: 0x6c93d420, + 0x2d59c: 0x6c93d620, 0x2d59d: 0x6c93d820, 0x2d59e: 0x6cc02420, 0x2d59f: 0x6cc02620, + 0x2d5a0: 0x6c941020, 0x2d5a1: 0x6cc02820, 0x2d5a2: 0x6d1fe020, 0x2d5a3: 0x6d1fe220, + 0x2d5a4: 0x6d4d6220, 0x2d5a5: 0x6d4d6420, 0x2d5a6: 0x6d4d6620, 0x2d5a7: 0x6d4d6820, + 0x2d5a8: 0x6da2da20, 0x2d5a9: 0x6dc4c620, 0x2d5aa: 0x6dc4c820, 0x2d5ab: 0x6de1c020, + 0x2d5ac: 0x6e0d6420, 0x2d5ad: 0x6e31f020, 0x2d5ae: 0x6c01b620, 0x2d5af: 0x6c040e20, + 0x2d5b0: 0x6c102820, 0x2d5b1: 0x6c01ba20, 0x2d5b2: 0x6c041220, 0x2d5b3: 0x6c086c20, + 0x2d5b4: 0x6c086e20, 0x2d5b5: 0x6c087020, 0x2d5b6: 0x6c087220, 0x2d5b7: 0x6c087420, + 0x2d5b8: 0x6c104620, 0x2d5b9: 0x6c104820, 0x2d5ba: 0x6c104a20, 0x2d5bb: 0x6c104c20, + 0x2d5bc: 0x6c104e20, 0x2d5bd: 0x6c105020, 0x2d5be: 0x6c105220, 0x2d5bf: 0x6c105420, + // Block 0xb57, offset 0x2d5c0 + 0x2d5c0: 0x6c105620, 0x2d5c1: 0x6c105820, 0x2d5c2: 0x6c105a20, 0x2d5c3: 0x6c105c20, + 0x2d5c4: 0x6c1d3c20, 0x2d5c5: 0x6c1d3e20, 0x2d5c6: 0x6c1d4020, 0x2d5c7: 0x6c1d4220, + 0x2d5c8: 0x6c1d4420, 0x2d5c9: 0x6c1d4620, 0x2d5ca: 0x6c1d4820, 0x2d5cb: 0x6c1d4a20, + 0x2d5cc: 0x6c1d4c20, 0x2d5cd: 0x6c1dd220, 0x2d5ce: 0x6c1d4e20, 0x2d5cf: 0x6c1d5020, + 0x2d5d0: 0x6c1d5220, 0x2d5d1: 0x6c1d5420, 0x2d5d2: 0x6c1d5620, 0x2d5d3: 0x6c1d5820, + 0x2d5d4: 0x6c1d5a20, 0x2d5d5: 0x6c1d5c20, 0x2d5d6: 0x6c1d5e20, 0x2d5d7: 0x6c1d6020, + 0x2d5d8: 0x6c1d6220, 0x2d5d9: 0x6c1d6420, 0x2d5da: 0x6c1d6620, 0x2d5db: 0x6c1d6820, + 0x2d5dc: 0x6c1d6a20, 0x2d5dd: 0x6c30ce20, 0x2d5de: 0x6c30d020, 0x2d5df: 0x6c30d220, + 0x2d5e0: 0x6c30d420, 0x2d5e1: 0x6c30d620, 0x2d5e2: 0x6c30d820, 0x2d5e3: 0x6c30da20, + 0x2d5e4: 0x6c30dc20, 0x2d5e5: 0x6c30de20, 0x2d5e6: 0x6c30e020, 0x2d5e7: 0x6c30e220, + 0x2d5e8: 0x6c30e420, 0x2d5e9: 0x6c30e620, 0x2d5ea: 0x6c30e820, 0x2d5eb: 0x6c30ea20, + 0x2d5ec: 0x6c30ec20, 0x2d5ed: 0x6c30ee20, 0x2d5ee: 0x6c30f020, 0x2d5ef: 0x6c30f220, + 0x2d5f0: 0x6c30f420, 0x2d5f1: 0x6c30f620, 0x2d5f2: 0x6c30f820, 0x2d5f3: 0x6c30fa20, + 0x2d5f4: 0x6c30fc20, 0x2d5f5: 0x6c30fe20, 0x2d5f6: 0x6c310020, 0x2d5f7: 0x6c310220, + 0x2d5f8: 0x6c310420, 0x2d5f9: 0x6c310620, 0x2d5fa: 0x6c310820, 0x2d5fb: 0x6c310a20, + 0x2d5fc: 0x6c310c20, 0x2d5fd: 0x6c310e20, 0x2d5fe: 0x6c311020, 0x2d5ff: 0x6c311220, + // Block 0xb58, offset 0x2d600 + 0x2d600: 0x6c311420, 0x2d601: 0x6c311620, 0x2d602: 0x6c311820, 0x2d603: 0x6c311a20, + 0x2d604: 0x6c311c20, 0x2d605: 0x6c311e20, 0x2d606: 0x6c4b2620, 0x2d607: 0x6c4b2820, + 0x2d608: 0x6c4b2a20, 0x2d609: 0x6c4b2c20, 0x2d60a: 0x6c4b2e20, 0x2d60b: 0x6c4b3020, + 0x2d60c: 0x6c4b3220, 0x2d60d: 0x6c4b3420, 0x2d60e: 0x6c4b3620, 0x2d60f: 0x6c4b3820, + 0x2d610: 0x6c4b3a20, 0x2d611: 0x6c4b3c20, 0x2d612: 0x6c4b3e20, 0x2d613: 0x6c4b4020, + 0x2d614: 0x6c4b4220, 0x2d615: 0x6c4b4420, 0x2d616: 0x6c4b4620, 0x2d617: 0x6c4b4820, + 0x2d618: 0x6c4b4a20, 0x2d619: 0x6c4b4c20, 0x2d61a: 0x6c4b4e20, 0x2d61b: 0x6c4b5020, + 0x2d61c: 0x6c4b5220, 0x2d61d: 0x6c4b5420, 0x2d61e: 0x6c4b5620, 0x2d61f: 0x6c4b5820, + 0x2d620: 0x6c4b5a20, 0x2d621: 0x6c4b5c20, 0x2d622: 0x6c4b5e20, 0x2d623: 0x6c4b6020, + 0x2d624: 0x6c4b6220, 0x2d625: 0x6c4b6420, 0x2d626: 0x6c4b6620, 0x2d627: 0x6c4b6820, + 0x2d628: 0x6c6d2020, 0x2d629: 0x6c6d2220, 0x2d62a: 0x6c6d2420, 0x2d62b: 0x6c6d2620, + 0x2d62c: 0x6c6d2820, 0x2d62d: 0x6c6d2a20, 0x2d62e: 0x6c6d2c20, 0x2d62f: 0x6c6d2e20, + 0x2d630: 0x6c6d3020, 0x2d631: 0x6c6d3220, 0x2d632: 0x6c6d3420, 0x2d633: 0x6c6d3620, + 0x2d634: 0x6c6d3820, 0x2d635: 0x6c6d3a20, 0x2d636: 0x6c6d3c20, 0x2d637: 0x6c6d3e20, + 0x2d638: 0x6c4bcc20, 0x2d639: 0x6c6d4020, 0x2d63a: 0x6c6d4220, 0x2d63b: 0x6c6d4420, + 0x2d63c: 0x6c6d4620, 0x2d63d: 0x6c6d4820, 0x2d63e: 0x6c6d4a20, 0x2d63f: 0x6c6d4c20, + // Block 0xb59, offset 0x2d640 + 0x2d640: 0x6c6d4e20, 0x2d641: 0x6c6d5020, 0x2d642: 0x6c6d5220, 0x2d643: 0x6c6d5420, + 0x2d644: 0x6c6d5620, 0x2d645: 0x6c6d5820, 0x2d646: 0x6c943420, 0x2d647: 0x6c943620, + 0x2d648: 0x6c943820, 0x2d649: 0x6c943a20, 0x2d64a: 0x6c943c20, 0x2d64b: 0x6c943e20, + 0x2d64c: 0x6c944020, 0x2d64d: 0x6c944220, 0x2d64e: 0x6c944420, 0x2d64f: 0x6c944620, + 0x2d650: 0x6c944820, 0x2d651: 0x6c944a20, 0x2d652: 0x6c944c20, 0x2d653: 0x6c944e20, + 0x2d654: 0x6c945020, 0x2d655: 0x6c945220, 0x2d656: 0x6c945420, 0x2d657: 0x6c945620, + 0x2d658: 0x6c945820, 0x2d659: 0x6c945a20, 0x2d65a: 0x6c945c20, 0x2d65b: 0x6c945e20, + 0x2d65c: 0x6c946020, 0x2d65d: 0x6c946220, 0x2d65e: 0x6c946420, 0x2d65f: 0x6c946620, + 0x2d660: 0x6c946820, 0x2d661: 0x6c946a20, 0x2d662: 0x6c946c20, 0x2d663: 0x6c946e20, + 0x2d664: 0x6c947020, 0x2d665: 0x6c947220, 0x2d666: 0x6c947420, 0x2d667: 0x6c947620, + 0x2d668: 0x6c947820, 0x2d669: 0x6c947a20, 0x2d66a: 0x6c947c20, 0x2d66b: 0x6c947e20, + 0x2d66c: 0x6c948020, 0x2d66d: 0x6c948220, 0x2d66e: 0x6c948420, 0x2d66f: 0x6c948620, + 0x2d670: 0x6c948820, 0x2d671: 0x6cc08420, 0x2d672: 0x6cc08620, 0x2d673: 0x6cc08820, + 0x2d674: 0x6cc08a20, 0x2d675: 0x6cc08c20, 0x2d676: 0x6cc08e20, 0x2d677: 0x6cc09020, + 0x2d678: 0x6cc09220, 0x2d679: 0x6cc09420, 0x2d67a: 0x6cc09620, 0x2d67b: 0x6cc09820, + 0x2d67c: 0x6cc09a20, 0x2d67d: 0x6cc09c20, 0x2d67e: 0x6cc09e20, 0x2d67f: 0x6cc0a020, + // Block 0xb5a, offset 0x2d680 + 0x2d680: 0x6cc0a220, 0x2d681: 0x6cc0a420, 0x2d682: 0x6cc0a620, 0x2d683: 0x6cc0a820, + 0x2d684: 0x6cc0aa20, 0x2d685: 0x6cc0ac20, 0x2d686: 0x6cc0ae20, 0x2d687: 0x6cc0b020, + 0x2d688: 0x6cc0b220, 0x2d689: 0x6cc0b420, 0x2d68a: 0x6cf07a20, 0x2d68b: 0x6cc0b620, + 0x2d68c: 0x6cc0b820, 0x2d68d: 0x6cc0ba20, 0x2d68e: 0x6cc0bc20, 0x2d68f: 0x6cc0be20, + 0x2d690: 0x6cc0c020, 0x2d691: 0x6cc0c220, 0x2d692: 0x6cc0c420, 0x2d693: 0x6cc0c620, + 0x2d694: 0x6cc0c820, 0x2d695: 0x6cc0ca20, 0x2d696: 0x6cc0cc20, 0x2d697: 0x6cc0ce20, + 0x2d698: 0x6cc0d020, 0x2d699: 0x6cc0d220, 0x2d69a: 0x6cc0d420, 0x2d69b: 0x6cc0d620, + 0x2d69c: 0x6cc0d820, 0x2d69d: 0x6cc0da20, 0x2d69e: 0x6cf07c20, 0x2d69f: 0x6cf07e20, + 0x2d6a0: 0x6cf08020, 0x2d6a1: 0x6cf08220, 0x2d6a2: 0x6cf08420, 0x2d6a3: 0x6cf08620, + 0x2d6a4: 0x6cf08820, 0x2d6a5: 0x6cf08a20, 0x2d6a6: 0x6cf08c20, 0x2d6a7: 0x6cf08e20, + 0x2d6a8: 0x6cf09020, 0x2d6a9: 0x6cf09220, 0x2d6aa: 0x6cf09420, 0x2d6ab: 0x6cc16a20, + 0x2d6ac: 0x6cf09620, 0x2d6ad: 0x6cf09820, 0x2d6ae: 0x6cf09a20, 0x2d6af: 0x6cf09c20, + 0x2d6b0: 0x6cf09e20, 0x2d6b1: 0x6cf0a020, 0x2d6b2: 0x6cf0a220, 0x2d6b3: 0x6cf0a420, + 0x2d6b4: 0x6cf0a620, 0x2d6b5: 0x6cf0a820, 0x2d6b6: 0x6cf0aa20, 0x2d6b7: 0x6d201820, + 0x2d6b8: 0x6d201a20, 0x2d6b9: 0x6d201c20, 0x2d6ba: 0x6d201e20, 0x2d6bb: 0x6d202020, + 0x2d6bc: 0x6d202220, 0x2d6bd: 0x6d202420, 0x2d6be: 0x6d202620, 0x2d6bf: 0x6d202820, + // Block 0xb5b, offset 0x2d6c0 + 0x2d6c0: 0x6d202a20, 0x2d6c1: 0x6d202c20, 0x2d6c2: 0x6d202e20, 0x2d6c3: 0x6d203020, + 0x2d6c4: 0x6d203220, 0x2d6c5: 0x6d203420, 0x2d6c6: 0x6d203620, 0x2d6c7: 0x6d203820, + 0x2d6c8: 0x6d203a20, 0x2d6c9: 0x6d203c20, 0x2d6ca: 0x6d203e20, 0x2d6cb: 0x6d204020, + 0x2d6cc: 0x6d204220, 0x2d6cd: 0x6d204420, 0x2d6ce: 0x6d204620, 0x2d6cf: 0x6d4dac20, + 0x2d6d0: 0x6d4dae20, 0x2d6d1: 0x6d4db020, 0x2d6d2: 0x6d4db220, 0x2d6d3: 0x6d4db420, + 0x2d6d4: 0x6d4db620, 0x2d6d5: 0x6d4db820, 0x2d6d6: 0x6d4dba20, 0x2d6d7: 0x6d4dbc20, + 0x2d6d8: 0x6d4dbe20, 0x2d6d9: 0x6d4dc020, 0x2d6da: 0x6d4dc220, 0x2d6db: 0x6d4dc420, + 0x2d6dc: 0x6d4dc620, 0x2d6dd: 0x6d4dc820, 0x2d6de: 0x6d4dca20, 0x2d6df: 0x6d4dcc20, + 0x2d6e0: 0x6d4dce20, 0x2d6e1: 0x6d4dd020, 0x2d6e2: 0x6d4dd220, 0x2d6e3: 0x6d4dd420, + 0x2d6e4: 0x6d4dd620, 0x2d6e5: 0x6d4dd820, 0x2d6e6: 0x6d7a6e20, 0x2d6e7: 0x6d7a7020, + 0x2d6e8: 0x6d7a7220, 0x2d6e9: 0x6d7a7420, 0x2d6ea: 0x6d7a7620, 0x2d6eb: 0x6d7a7820, + 0x2d6ec: 0x6d7a7a20, 0x2d6ed: 0x6d7a7c20, 0x2d6ee: 0x6d7a7e20, 0x2d6ef: 0x6d7a8020, + 0x2d6f0: 0x6d7a8220, 0x2d6f1: 0x6d7a8420, 0x2d6f2: 0x6d7a8620, 0x2d6f3: 0x6d7a8820, + 0x2d6f4: 0x6d7a8a20, 0x2d6f5: 0x6d7a8c20, 0x2d6f6: 0x6d7a8e20, 0x2d6f7: 0x6da2ec20, + 0x2d6f8: 0x6da2ee20, 0x2d6f9: 0x6da2f020, 0x2d6fa: 0x6da2f220, 0x2d6fb: 0x6da35220, + 0x2d6fc: 0x6da2f420, 0x2d6fd: 0x6da2f620, 0x2d6fe: 0x6da2f820, 0x2d6ff: 0x6da2fa20, + // Block 0xb5c, offset 0x2d700 + 0x2d700: 0x6dc4d620, 0x2d701: 0x6dc4d820, 0x2d702: 0x6dc4da20, 0x2d703: 0x6de1d820, + 0x2d704: 0x6de1da20, 0x2d705: 0x6de1dc20, 0x2d706: 0x6df9b220, 0x2d707: 0x6df9b420, + 0x2d708: 0x6df9b620, 0x2d709: 0x6df9b820, 0x2d70a: 0x6df9ba20, 0x2d70b: 0x6e0d6e20, + 0x2d70c: 0x6df9bc20, 0x2d70d: 0x6e0d7420, 0x2d70e: 0x6e1cd820, 0x2d70f: 0x6e0d7620, + 0x2d710: 0x6e0d7820, 0x2d711: 0x6e1cda20, 0x2d712: 0x6e1cdc20, 0x2d713: 0x6e1cde20, + 0x2d714: 0x6e1ce020, 0x2d715: 0x6e1ce220, 0x2d716: 0x6e28b220, 0x2d717: 0x6e1ce420, + 0x2d718: 0x6e28b420, 0x2d719: 0x6e31f420, 0x2d71a: 0x6e28b620, 0x2d71b: 0x6c01bc20, + 0x2d71c: 0x6c00c620, 0x2d71d: 0x6c01be20, 0x2d71e: 0x6c109420, 0x2d71f: 0x6c109620, + 0x2d720: 0x6c1dd420, 0x2d721: 0x6c272c20, 0x2d722: 0x6c954a20, 0x2d723: 0x6c954c20, + 0x2d724: 0x6d4e4820, 0x2d725: 0x6c01c420, 0x2d726: 0x6c089220, 0x2d727: 0x6c089420, + 0x2d728: 0x6c089620, 0x2d729: 0x6c10a220, 0x2d72a: 0x6c10a420, 0x2d72b: 0x6c1dde20, + 0x2d72c: 0x6c4bda20, 0x2d72d: 0x6c4bdc20, 0x2d72e: 0x6c6dec20, 0x2d72f: 0x6cc17020, + 0x2d730: 0x6cf11020, 0x2d731: 0x6c01c620, 0x2d732: 0x6c01c820, 0x2d733: 0x6c01ca20, + 0x2d734: 0x6c042820, 0x2d735: 0x6c1de620, 0x2d736: 0x6c318a20, 0x2d737: 0x6c4be020, + 0x2d738: 0x6c4be220, 0x2d739: 0x6c4be420, 0x2d73a: 0x6c4be620, 0x2d73b: 0x6c4be820, + 0x2d73c: 0x6c6df220, 0x2d73d: 0x6cc17820, 0x2d73e: 0x6c01cc20, 0x2d73f: 0x6c042c20, + // Block 0xb5d, offset 0x2d740 + 0x2d740: 0x6c042e20, 0x2d741: 0x6c043020, 0x2d742: 0x6c08aa20, 0x2d743: 0x6c08ac20, + 0x2d744: 0x6c08ae20, 0x2d745: 0x6c08b020, 0x2d746: 0x6c10b420, 0x2d747: 0x6c10b620, + 0x2d748: 0x6c10b820, 0x2d749: 0x6c1df620, 0x2d74a: 0x6c1df820, 0x2d74b: 0x6c1dfa20, + 0x2d74c: 0x6c1dfc20, 0x2d74d: 0x6c1dfe20, 0x2d74e: 0x6c1e0020, 0x2d74f: 0x6c1e0220, + 0x2d750: 0x6c1e0420, 0x2d751: 0x6c319a20, 0x2d752: 0x6c319c20, 0x2d753: 0x6c319e20, + 0x2d754: 0x6c31a020, 0x2d755: 0x6c31a220, 0x2d756: 0x6c31a420, 0x2d757: 0x6c31a620, + 0x2d758: 0x6c31a820, 0x2d759: 0x6c31aa20, 0x2d75a: 0x6c31ac20, 0x2d75b: 0x6c31ae20, + 0x2d75c: 0x6c31b020, 0x2d75d: 0x6c4bfc20, 0x2d75e: 0x6c4bfe20, 0x2d75f: 0x6c4c0020, + 0x2d760: 0x6c4c0220, 0x2d761: 0x6c4c0420, 0x2d762: 0x6c4c0620, 0x2d763: 0x6c4c0820, + 0x2d764: 0x6c4c0a20, 0x2d765: 0x6c4c0c20, 0x2d766: 0x6c4c0e20, 0x2d767: 0x6c4c1020, + 0x2d768: 0x6c6e0020, 0x2d769: 0x6c6e0220, 0x2d76a: 0x6c6e0420, 0x2d76b: 0x6c6e0620, + 0x2d76c: 0x6c6e0820, 0x2d76d: 0x6c6e0a20, 0x2d76e: 0x6c6e0c20, 0x2d76f: 0x6c6e0e20, + 0x2d770: 0x6c6e1020, 0x2d771: 0x6c6e1220, 0x2d772: 0x6c957020, 0x2d773: 0x6c957220, + 0x2d774: 0x6c957420, 0x2d775: 0x6c957620, 0x2d776: 0x6c957820, 0x2d777: 0x6c957a20, + 0x2d778: 0x6c957c20, 0x2d779: 0x6c957e20, 0x2d77a: 0x6c958020, 0x2d77b: 0x6c958220, + 0x2d77c: 0x6c958420, 0x2d77d: 0x6cc19820, 0x2d77e: 0x6c95ca20, 0x2d77f: 0x6cc19a20, + // Block 0xb5e, offset 0x2d780 + 0x2d780: 0x6cc19c20, 0x2d781: 0x6cc19e20, 0x2d782: 0x6cc1a020, 0x2d783: 0x6cc1a220, + 0x2d784: 0x6cc1a420, 0x2d785: 0x6cc1a620, 0x2d786: 0x6cc1a820, 0x2d787: 0x6cc1aa20, + 0x2d788: 0x6cc1f220, 0x2d789: 0x6cc1ac20, 0x2d78a: 0x6cf12420, 0x2d78b: 0x6cf12620, + 0x2d78c: 0x6cf12820, 0x2d78d: 0x6cf12a20, 0x2d78e: 0x6cf12c20, 0x2d78f: 0x6cf12e20, + 0x2d790: 0x6d082820, 0x2d791: 0x6d20c820, 0x2d792: 0x6d20ca20, 0x2d793: 0x6d20cc20, + 0x2d794: 0x6d20ce20, 0x2d795: 0x6d20d020, 0x2d796: 0x6d20d220, 0x2d797: 0x6d20d420, + 0x2d798: 0x6d20d620, 0x2d799: 0x6d20d820, 0x2d79a: 0x6d4e5e20, 0x2d79b: 0x6d20da20, + 0x2d79c: 0x6d4e6020, 0x2d79d: 0x6d4e6220, 0x2d79e: 0x6d4e6420, 0x2d79f: 0x6d4e6620, + 0x2d7a0: 0x6d4e6820, 0x2d7a1: 0x6d4e6a20, 0x2d7a2: 0x6d4e6c20, 0x2d7a3: 0x6d210620, + 0x2d7a4: 0x6d4e6e20, 0x2d7a5: 0x6d4e7020, 0x2d7a6: 0x6d7aee20, 0x2d7a7: 0x6d7af020, + 0x2d7a8: 0x6d7af220, 0x2d7a9: 0x6d4ea820, 0x2d7aa: 0x6da36020, 0x2d7ab: 0x6da36220, + 0x2d7ac: 0x6da36420, 0x2d7ad: 0x6dc51020, 0x2d7ae: 0x6dc51220, 0x2d7af: 0x6d7b1a20, + 0x2d7b0: 0x6de21220, 0x2d7b1: 0x6df9e020, 0x2d7b2: 0x6c01ce20, 0x2d7b3: 0x6c08ba20, + 0x2d7b4: 0x6c10da20, 0x2d7b5: 0x6c10dc20, 0x2d7b6: 0x6c10de20, 0x2d7b7: 0x6c31dc20, + 0x2d7b8: 0x6c31de20, 0x2d7b9: 0x6cf15a20, 0x2d7ba: 0x6c01d220, 0x2d7bb: 0x6c043220, + 0x2d7bc: 0x6c08be20, 0x2d7bd: 0x6c4c5e20, 0x2d7be: 0x6cc20020, 0x2d7bf: 0x6c01d420, + // Block 0xb5f, offset 0x2d7c0 + 0x2d7c0: 0x6c08c820, 0x2d7c1: 0x6c08ca20, 0x2d7c2: 0x6c08cc20, 0x2d7c3: 0x6c08ce20, + 0x2d7c4: 0x6c10ea20, 0x2d7c5: 0x6c10ec20, 0x2d7c6: 0x6c10ee20, 0x2d7c7: 0x6c1e4620, + 0x2d7c8: 0x6c1e4820, 0x2d7c9: 0x6c1e4a20, 0x2d7ca: 0x6c1e4c20, 0x2d7cb: 0x6c1e4e20, + 0x2d7cc: 0x6c1e5020, 0x2d7cd: 0x6c1e5220, 0x2d7ce: 0x6c1e5420, 0x2d7cf: 0x6c1e5620, + 0x2d7d0: 0x6c1e5820, 0x2d7d1: 0x6c1e5a20, 0x2d7d2: 0x6c1e5c20, 0x2d7d3: 0x6c1e5e20, + 0x2d7d4: 0x6c1e6020, 0x2d7d5: 0x6c320220, 0x2d7d6: 0x6c320420, 0x2d7d7: 0x6c320620, + 0x2d7d8: 0x6c31f020, 0x2d7d9: 0x6c320820, 0x2d7da: 0x6c320a20, 0x2d7db: 0x6c4c6620, + 0x2d7dc: 0x6c320c20, 0x2d7dd: 0x6c320e20, 0x2d7de: 0x6c321020, 0x2d7df: 0x6c321220, + 0x2d7e0: 0x6c4c7620, 0x2d7e1: 0x6c4c7820, 0x2d7e2: 0x6c4c7a20, 0x2d7e3: 0x6c4c7c20, + 0x2d7e4: 0x6c4c7e20, 0x2d7e5: 0x6c4c8020, 0x2d7e6: 0x6c4c8220, 0x2d7e7: 0x6c6e6a20, + 0x2d7e8: 0x6c6e6c20, 0x2d7e9: 0x6c6e6e20, 0x2d7ea: 0x6c6e7020, 0x2d7eb: 0x6c6e7220, + 0x2d7ec: 0x6c6e7420, 0x2d7ed: 0x6c6e7620, 0x2d7ee: 0x6c6e7820, 0x2d7ef: 0x6c6e7a20, + 0x2d7f0: 0x6c4cac20, 0x2d7f1: 0x6c95e220, 0x2d7f2: 0x6c95e420, 0x2d7f3: 0x6c95e620, + 0x2d7f4: 0x6c95e820, 0x2d7f5: 0x6c95ea20, 0x2d7f6: 0x6c95ec20, 0x2d7f7: 0x6c95ee20, + 0x2d7f8: 0x6c95f020, 0x2d7f9: 0x6c95f220, 0x2d7fa: 0x6c95f420, 0x2d7fb: 0x6c95f620, + 0x2d7fc: 0x6c95f820, 0x2d7fd: 0x6cc20c20, 0x2d7fe: 0x6c965020, 0x2d7ff: 0x6cc20e20, + // Block 0xb60, offset 0x2d800 + 0x2d800: 0x6cc21020, 0x2d801: 0x6cc21220, 0x2d802: 0x6cc21420, 0x2d803: 0x6cc21620, + 0x2d804: 0x6cc26420, 0x2d805: 0x6cf16c20, 0x2d806: 0x6cf16e20, 0x2d807: 0x6cf17020, + 0x2d808: 0x6cf17220, 0x2d809: 0x6cf17420, 0x2d80a: 0x6cc21820, 0x2d80b: 0x6cf17620, + 0x2d80c: 0x6cf17820, 0x2d80d: 0x6d211e20, 0x2d80e: 0x6d212020, 0x2d80f: 0x6d212220, + 0x2d810: 0x6d212420, 0x2d811: 0x6d212620, 0x2d812: 0x6d212820, 0x2d813: 0x6d212a20, + 0x2d814: 0x6d212c20, 0x2d815: 0x6d212e20, 0x2d816: 0x6d213020, 0x2d817: 0x6d213220, + 0x2d818: 0x6d213420, 0x2d819: 0x6d216c20, 0x2d81a: 0x6d4ebc20, 0x2d81b: 0x6d4ebe20, + 0x2d81c: 0x6d216e20, 0x2d81d: 0x6d4ec020, 0x2d81e: 0x6d4ec220, 0x2d81f: 0x6d4ec420, + 0x2d820: 0x6d4ec620, 0x2d821: 0x6d4ec820, 0x2d822: 0x6d4eca20, 0x2d823: 0x6d4ecc20, + 0x2d824: 0x6d4ece20, 0x2d825: 0x6d7b2e20, 0x2d826: 0x6d7b3020, 0x2d827: 0x6d7b3220, + 0x2d828: 0x6d7b3420, 0x2d829: 0x6d7b3620, 0x2d82a: 0x6d7b3820, 0x2d82b: 0x6dc52020, + 0x2d82c: 0x6de23220, 0x2d82d: 0x6de23420, 0x2d82e: 0x6df9ee20, 0x2d82f: 0x6df9f020, + 0x2d830: 0x6df9f220, 0x2d831: 0x6e0da020, 0x2d832: 0x6e1d1220, 0x2d833: 0x6e388020, + 0x2d834: 0x6c01d620, 0x2d835: 0x6c110a20, 0x2d836: 0x6c324220, 0x2d837: 0x6c1e8420, + 0x2d838: 0x6c324620, 0x2d839: 0x6c324820, 0x2d83a: 0x6c4cae20, 0x2d83b: 0x6c4cb020, + 0x2d83c: 0x6c4cb220, 0x2d83d: 0x6c6eba20, 0x2d83e: 0x6c01d820, 0x2d83f: 0x6c043c20, + // Block 0xb61, offset 0x2d840 + 0x2d840: 0x6c043e20, 0x2d841: 0x6c08da20, 0x2d842: 0x6c110e20, 0x2d843: 0x6c1e9020, + 0x2d844: 0x6c1e9220, 0x2d845: 0x6c1e9420, 0x2d846: 0x6c324c20, 0x2d847: 0x6c4cc220, + 0x2d848: 0x6c4cc420, 0x2d849: 0x6c6ec220, 0x2d84a: 0x6d218220, 0x2d84b: 0x6c01dc20, + 0x2d84c: 0x6c044220, 0x2d84d: 0x6c08e020, 0x2d84e: 0x6c111620, 0x2d84f: 0x6c111820, + 0x2d850: 0x6c111a20, 0x2d851: 0x6cc27a20, 0x2d852: 0x6cf1ba20, 0x2d853: 0x6c01e020, + 0x2d854: 0x6c044a20, 0x2d855: 0x6c044c20, 0x2d856: 0x6c044e20, 0x2d857: 0x6c08e220, + 0x2d858: 0x6c08e420, 0x2d859: 0x6c112820, 0x2d85a: 0x6c112a20, 0x2d85b: 0x6c112c20, + 0x2d85c: 0x6c112e20, 0x2d85d: 0x6c1eb620, 0x2d85e: 0x6c1eb820, 0x2d85f: 0x6c1eba20, + 0x2d860: 0x6c1ebc20, 0x2d861: 0x6c326820, 0x2d862: 0x6c326a20, 0x2d863: 0x6c326c20, + 0x2d864: 0x6c326e20, 0x2d865: 0x6c327020, 0x2d866: 0x6c327220, 0x2d867: 0x6c327420, + 0x2d868: 0x6c327620, 0x2d869: 0x6c327820, 0x2d86a: 0x6c327a20, 0x2d86b: 0x6c4cf820, + 0x2d86c: 0x6c4cfa20, 0x2d86d: 0x6c4cfc20, 0x2d86e: 0x6c4cfe20, 0x2d86f: 0x6c4d0020, + 0x2d870: 0x6c6edc20, 0x2d871: 0x6c6ede20, 0x2d872: 0x6c6ee020, 0x2d873: 0x6c6ee220, + 0x2d874: 0x6c966e20, 0x2d875: 0x6c967020, 0x2d876: 0x6c967220, 0x2d877: 0x6c967420, + 0x2d878: 0x6c967620, 0x2d879: 0x6c967820, 0x2d87a: 0x6cc28420, 0x2d87b: 0x6cc28620, + 0x2d87c: 0x6cc28820, 0x2d87d: 0x6cc28a20, 0x2d87e: 0x6cc28c20, 0x2d87f: 0x6cf1c820, + // Block 0xb62, offset 0x2d880 + 0x2d880: 0x6cf1ca20, 0x2d881: 0x6cf1cc20, 0x2d882: 0x6cf1ce20, 0x2d883: 0x6d218620, + 0x2d884: 0x6d218820, 0x2d885: 0x6d218a20, 0x2d886: 0x6d21a620, 0x2d887: 0x6d4f0c20, + 0x2d888: 0x6d4f0e20, 0x2d889: 0x6d4f1020, 0x2d88a: 0x6d7b6820, 0x2d88b: 0x6d7b6a20, + 0x2d88c: 0x6da3aa20, 0x2d88d: 0x6dc54020, 0x2d88e: 0x6e1d2220, 0x2d88f: 0x6e28ca20, + 0x2d890: 0x6c01e820, 0x2d891: 0x6c01ea20, 0x2d892: 0x6c08f820, 0x2d893: 0x6c114a20, + 0x2d894: 0x6c329c20, 0x2d895: 0x6c329e20, 0x2d896: 0x6c4d2a20, 0x2d897: 0x6c96a020, + 0x2d898: 0x6cc2a620, 0x2d899: 0x6cf1e020, 0x2d89a: 0x6cf1e220, 0x2d89b: 0x6d7b7a20, + 0x2d89c: 0x6d7b7c20, 0x2d89d: 0x6dc54e20, 0x2d89e: 0x6dc55020, 0x2d89f: 0x6de26820, + 0x2d8a0: 0x6e3d2420, 0x2d8a1: 0x6c01ec20, 0x2d8a2: 0x6c1ee020, 0x2d8a3: 0x6c1ee220, + 0x2d8a4: 0x6c1ee420, 0x2d8a5: 0x6c4d3420, 0x2d8a6: 0x6c4d3620, 0x2d8a7: 0x6c6f0020, + 0x2d8a8: 0x6c6f0220, 0x2d8a9: 0x6c96ac20, 0x2d8aa: 0x6cae2020, 0x2d8ab: 0x6c96ae20, + 0x2d8ac: 0x6c96b020, 0x2d8ad: 0x6cc2b220, 0x2d8ae: 0x6cf1ea20, 0x2d8af: 0x6d21b420, + 0x2d8b0: 0x6d21b620, 0x2d8b1: 0x6d4f2820, 0x2d8b2: 0x6e1d2820, 0x2d8b3: 0x6c01ee20, + 0x2d8b4: 0x6c116220, 0x2d8b5: 0x6c116420, 0x2d8b6: 0x6c1eee20, 0x2d8b7: 0x6c1ef020, + 0x2d8b8: 0x6c1ef220, 0x2d8b9: 0x6c1ef420, 0x2d8ba: 0x6c1ef620, 0x2d8bb: 0x6c1ef820, + 0x2d8bc: 0x6c32b820, 0x2d8bd: 0x6c32ba20, 0x2d8be: 0x6c32bc20, 0x2d8bf: 0x6c32be20, + // Block 0xb63, offset 0x2d8c0 + 0x2d8c0: 0x6c32c020, 0x2d8c1: 0x6c32c220, 0x2d8c2: 0x6c32c420, 0x2d8c3: 0x6c32c620, + 0x2d8c4: 0x6c32c820, 0x2d8c5: 0x6c4d4c20, 0x2d8c6: 0x6c4d4e20, 0x2d8c7: 0x6c4d5020, + 0x2d8c8: 0x6c4d5220, 0x2d8c9: 0x6c4d5420, 0x2d8ca: 0x6c4d5620, 0x2d8cb: 0x6c4d5820, + 0x2d8cc: 0x6c4d5a20, 0x2d8cd: 0x6c4d5c20, 0x2d8ce: 0x6c6f1620, 0x2d8cf: 0x6c6f1820, + 0x2d8d0: 0x6c6f1a20, 0x2d8d1: 0x6c6f1c20, 0x2d8d2: 0x6c6f1e20, 0x2d8d3: 0x6c6f2020, + 0x2d8d4: 0x6c4d5e20, 0x2d8d5: 0x6c6f2220, 0x2d8d6: 0x6c96d220, 0x2d8d7: 0x6c96d420, + 0x2d8d8: 0x6c96d620, 0x2d8d9: 0x6c96d820, 0x2d8da: 0x6cc2ca20, 0x2d8db: 0x6c96da20, + 0x2d8dc: 0x6c96dc20, 0x2d8dd: 0x6c96de20, 0x2d8de: 0x6c96e020, 0x2d8df: 0x6c96e220, + 0x2d8e0: 0x6c96e420, 0x2d8e1: 0x6c96e620, 0x2d8e2: 0x6c96e820, 0x2d8e3: 0x6c96ea20, + 0x2d8e4: 0x6c96ec20, 0x2d8e5: 0x6cc2cc20, 0x2d8e6: 0x6cc2ce20, 0x2d8e7: 0x6cc2d020, + 0x2d8e8: 0x6cc2d220, 0x2d8e9: 0x6cc2d420, 0x2d8ea: 0x6cc2d620, 0x2d8eb: 0x6cc2d820, + 0x2d8ec: 0x6cf1f820, 0x2d8ed: 0x6cf1fa20, 0x2d8ee: 0x6cf1fc20, 0x2d8ef: 0x6cf1fe20, + 0x2d8f0: 0x6cf20020, 0x2d8f1: 0x6d21c220, 0x2d8f2: 0x6d4f3a20, 0x2d8f3: 0x6d21c420, + 0x2d8f4: 0x6d21c620, 0x2d8f5: 0x6d4f3c20, 0x2d8f6: 0x6d220220, 0x2d8f7: 0x6d4f3e20, + 0x2d8f8: 0x6d4f4020, 0x2d8f9: 0x6d4f4220, 0x2d8fa: 0x6d4f4420, 0x2d8fb: 0x6d7b9020, + 0x2d8fc: 0x6d7b9220, 0x2d8fd: 0x6da3c220, 0x2d8fe: 0x6da3c420, 0x2d8ff: 0x6de27420, + // Block 0xb64, offset 0x2d900 + 0x2d900: 0x6dfa1c20, 0x2d901: 0x6dfa1e20, 0x2d902: 0x6e0dba20, 0x2d903: 0x6c046620, + 0x2d904: 0x6c01f020, 0x2d905: 0x6c090820, 0x2d906: 0x6c046820, 0x2d907: 0x6c090a20, + 0x2d908: 0x6c117020, 0x2d909: 0x6c090c20, 0x2d90a: 0x6c090e20, 0x2d90b: 0x6c117820, + 0x2d90c: 0x6c1f2020, 0x2d90d: 0x6c1f2220, 0x2d90e: 0x6c1f2420, 0x2d90f: 0x6c117a20, + 0x2d910: 0x6c1f2620, 0x2d911: 0x6c1f2820, 0x2d912: 0x6c1f2a20, 0x2d913: 0x6c117c20, + 0x2d914: 0x6c117e20, 0x2d915: 0x6c118020, 0x2d916: 0x6c118220, 0x2d917: 0x6c1f2c20, + 0x2d918: 0x6c1f2e20, 0x2d919: 0x6c118420, 0x2d91a: 0x6c118620, 0x2d91b: 0x6c118820, + 0x2d91c: 0x6c1f3020, 0x2d91d: 0x6c32e620, 0x2d91e: 0x6c32e820, 0x2d91f: 0x6c1f4220, + 0x2d920: 0x6c32ea20, 0x2d921: 0x6c1f4420, 0x2d922: 0x6c32ec20, 0x2d923: 0x6c1f4620, + 0x2d924: 0x6c1f4820, 0x2d925: 0x6c32ee20, 0x2d926: 0x6c1f4a20, 0x2d927: 0x6c1f4c20, + 0x2d928: 0x6c1f4e20, 0x2d929: 0x6c32f020, 0x2d92a: 0x6c1f5020, 0x2d92b: 0x6c1f5220, + 0x2d92c: 0x6c1f5420, 0x2d92d: 0x6c1f5620, 0x2d92e: 0x6c1f5820, 0x2d92f: 0x6c1f5a20, + 0x2d930: 0x6c1f5c20, 0x2d931: 0x6c1f5e20, 0x2d932: 0x6c1f6020, 0x2d933: 0x6c1f6220, + 0x2d934: 0x6c1f6420, 0x2d935: 0x6c32f220, 0x2d936: 0x6c1f6620, 0x2d937: 0x6c1f6820, + 0x2d938: 0x6c1f6a20, 0x2d939: 0x6c1f6c20, 0x2d93a: 0x6c1f6e20, 0x2d93b: 0x6c1f7020, + 0x2d93c: 0x6c1f7220, 0x2d93d: 0x6c32f420, 0x2d93e: 0x6c1f7420, 0x2d93f: 0x6c32f620, + // Block 0xb65, offset 0x2d940 + 0x2d940: 0x6c1f7620, 0x2d941: 0x6c32f820, 0x2d942: 0x6c32fa20, 0x2d943: 0x6c1f7820, + 0x2d944: 0x6c1f7a20, 0x2d945: 0x6c1f7c20, 0x2d946: 0x6c1f7e20, 0x2d947: 0x6c331020, + 0x2d948: 0x6c331220, 0x2d949: 0x6c331420, 0x2d94a: 0x6c331620, 0x2d94b: 0x6c331820, + 0x2d94c: 0x6c331a20, 0x2d94d: 0x6c331c20, 0x2d94e: 0x6c4d8420, 0x2d94f: 0x6c331e20, + 0x2d950: 0x6c332020, 0x2d951: 0x6c332220, 0x2d952: 0x6c4d8620, 0x2d953: 0x6c332420, + 0x2d954: 0x6c332620, 0x2d955: 0x6c332820, 0x2d956: 0x6c332a20, 0x2d957: 0x6c332c20, + 0x2d958: 0x6c4d8820, 0x2d959: 0x6c332e20, 0x2d95a: 0x6c333020, 0x2d95b: 0x6c333220, + 0x2d95c: 0x6c333420, 0x2d95d: 0x6c4d8a20, 0x2d95e: 0x6c333620, 0x2d95f: 0x6c333820, + 0x2d960: 0x6c4d8c20, 0x2d961: 0x6c333a20, 0x2d962: 0x6c333c20, 0x2d963: 0x6c4d8e20, + 0x2d964: 0x6c4d9020, 0x2d965: 0x6c4d9220, 0x2d966: 0x6c333e20, 0x2d967: 0x6c334020, + 0x2d968: 0x6c4d9420, 0x2d969: 0x6c334220, 0x2d96a: 0x6c334420, 0x2d96b: 0x6c334620, + 0x2d96c: 0x6c334820, 0x2d96d: 0x6c334a20, 0x2d96e: 0x6c334c20, 0x2d96f: 0x6c334e20, + 0x2d970: 0x6c335020, 0x2d971: 0x6c4d9620, 0x2d972: 0x6c335220, 0x2d973: 0x6c335420, + 0x2d974: 0x6c335620, 0x2d975: 0x6c335820, 0x2d976: 0x6c335a20, 0x2d977: 0x6c4d9820, + 0x2d978: 0x6c4d9a20, 0x2d979: 0x6c4d9c20, 0x2d97a: 0x6c335c20, 0x2d97b: 0x6c4d9e20, + 0x2d97c: 0x6c4da020, 0x2d97d: 0x6c335e20, 0x2d97e: 0x6c336020, 0x2d97f: 0x6c336220, + // Block 0xb66, offset 0x2d980 + 0x2d980: 0x6c4dc020, 0x2d981: 0x6c6f6220, 0x2d982: 0x6c4dc220, 0x2d983: 0x6c4dc420, + 0x2d984: 0x6c4dc620, 0x2d985: 0x6c4dc820, 0x2d986: 0x6c4dca20, 0x2d987: 0x6c4dcc20, + 0x2d988: 0x6c4dce20, 0x2d989: 0x6c4dd020, 0x2d98a: 0x6c4dd220, 0x2d98b: 0x6c6f6420, + 0x2d98c: 0x6c4dd420, 0x2d98d: 0x6c4dd620, 0x2d98e: 0x6c4dd820, 0x2d98f: 0x6c6f6620, + 0x2d990: 0x6c6f6820, 0x2d991: 0x6c4dda20, 0x2d992: 0x6c4ddc20, 0x2d993: 0x6c4dde20, + 0x2d994: 0x6c4de020, 0x2d995: 0x6c6f6a20, 0x2d996: 0x6c6f6c20, 0x2d997: 0x6c4de220, + 0x2d998: 0x6c4de420, 0x2d999: 0x6c6f6e20, 0x2d99a: 0x6c6f7020, 0x2d99b: 0x6c4de620, + 0x2d99c: 0x6c4de820, 0x2d99d: 0x6c6f7220, 0x2d99e: 0x6c4dea20, 0x2d99f: 0x6c4dec20, + 0x2d9a0: 0x6c4dee20, 0x2d9a1: 0x6c4df020, 0x2d9a2: 0x6c4df220, 0x2d9a3: 0x6c6f7420, + 0x2d9a4: 0x6c4df420, 0x2d9a5: 0x6c6f7620, 0x2d9a6: 0x6c4df620, 0x2d9a7: 0x6c6f7820, + 0x2d9a8: 0x6c4df820, 0x2d9a9: 0x6c6f7a20, 0x2d9aa: 0x6c4dfa20, 0x2d9ab: 0x6c4dfc20, + 0x2d9ac: 0x6c4dfe20, 0x2d9ad: 0x6c6f7c20, 0x2d9ae: 0x6c4e0020, 0x2d9af: 0x6c6f7e20, + 0x2d9b0: 0x6c4e0220, 0x2d9b1: 0x6c4e0420, 0x2d9b2: 0x6c4e0620, 0x2d9b3: 0x6c6f8020, + 0x2d9b4: 0x6c6f8220, 0x2d9b5: 0x6c6f8420, 0x2d9b6: 0x6c6f8620, 0x2d9b7: 0x6c6f8820, + 0x2d9b8: 0x6c4e0820, 0x2d9b9: 0x6c4e0a20, 0x2d9ba: 0x6c4e0c20, 0x2d9bb: 0x6c4e0e20, + 0x2d9bc: 0x6c4e1020, 0x2d9bd: 0x6c4e1220, 0x2d9be: 0x6c6f9e20, 0x2d9bf: 0x6c973820, + // Block 0xb67, offset 0x2d9c0 + 0x2d9c0: 0x6c6fa020, 0x2d9c1: 0x6c6fa220, 0x2d9c2: 0x6c6fa420, 0x2d9c3: 0x6c6fa620, + 0x2d9c4: 0x6c6fa820, 0x2d9c5: 0x6c6faa20, 0x2d9c6: 0x6c973a20, 0x2d9c7: 0x6c6fac20, + 0x2d9c8: 0x6c6fae20, 0x2d9c9: 0x6c973c20, 0x2d9ca: 0x6c973e20, 0x2d9cb: 0x6c6fb020, + 0x2d9cc: 0x6c6fb220, 0x2d9cd: 0x6c6fb420, 0x2d9ce: 0x6c6fb620, 0x2d9cf: 0x6c6fb820, + 0x2d9d0: 0x6c974020, 0x2d9d1: 0x6c6fba20, 0x2d9d2: 0x6c6fbc20, 0x2d9d3: 0x6c6fbe20, + 0x2d9d4: 0x6c6fc020, 0x2d9d5: 0x6c6fc220, 0x2d9d6: 0x6c6fc420, 0x2d9d7: 0x6c6fc620, + 0x2d9d8: 0x6c974220, 0x2d9d9: 0x6c6fc820, 0x2d9da: 0x6c6fca20, 0x2d9db: 0x6c6fcc20, + 0x2d9dc: 0x6c6fce20, 0x2d9dd: 0x6c6fd020, 0x2d9de: 0x6c6fd220, 0x2d9df: 0x6c6fd420, + 0x2d9e0: 0x6c974420, 0x2d9e1: 0x6c974620, 0x2d9e2: 0x6c6fd620, 0x2d9e3: 0x6c974820, + 0x2d9e4: 0x6c974a20, 0x2d9e5: 0x6c974c20, 0x2d9e6: 0x6c6fd820, 0x2d9e7: 0x6c6fda20, + 0x2d9e8: 0x6c974e20, 0x2d9e9: 0x6c6fdc20, 0x2d9ea: 0x6c975020, 0x2d9eb: 0x6c975220, + 0x2d9ec: 0x6c975420, 0x2d9ed: 0x6c6fde20, 0x2d9ee: 0x6c6fe020, 0x2d9ef: 0x6c6fe220, + 0x2d9f0: 0x6c977e20, 0x2d9f1: 0x6c978020, 0x2d9f2: 0x6cc31420, 0x2d9f3: 0x6cc31620, + 0x2d9f4: 0x6c978220, 0x2d9f5: 0x6c978420, 0x2d9f6: 0x6cc31820, 0x2d9f7: 0x6c978620, + 0x2d9f8: 0x6c978820, 0x2d9f9: 0x6cc31a20, 0x2d9fa: 0x6c978a20, 0x2d9fb: 0x6c978c20, + 0x2d9fc: 0x6c978e20, 0x2d9fd: 0x6c979020, 0x2d9fe: 0x6c979220, 0x2d9ff: 0x6c979420, + // Block 0xb68, offset 0x2da00 + 0x2da00: 0x6c979620, 0x2da01: 0x6cc31c20, 0x2da02: 0x6c979820, 0x2da03: 0x6c979a20, + 0x2da04: 0x6cc31e20, 0x2da05: 0x6c979c20, 0x2da06: 0x6c979e20, 0x2da07: 0x6c97a020, + 0x2da08: 0x6c97a220, 0x2da09: 0x6cc32020, 0x2da0a: 0x6c97a420, 0x2da0b: 0x6c97a620, + 0x2da0c: 0x6cc32220, 0x2da0d: 0x6c97a820, 0x2da0e: 0x6cc32420, 0x2da0f: 0x6c97aa20, + 0x2da10: 0x6c97ac20, 0x2da11: 0x6cc32620, 0x2da12: 0x6cc32820, 0x2da13: 0x6c97ae20, + 0x2da14: 0x6c97b020, 0x2da15: 0x6c97b220, 0x2da16: 0x6cc32a20, 0x2da17: 0x6c97b420, + 0x2da18: 0x6c97b620, 0x2da19: 0x6c97b820, 0x2da1a: 0x6c97ba20, 0x2da1b: 0x6c97bc20, + 0x2da1c: 0x6c97be20, 0x2da1d: 0x6c97c020, 0x2da1e: 0x6c97c220, 0x2da1f: 0x6c97c420, + 0x2da20: 0x6cc32c20, 0x2da21: 0x6cc32e20, 0x2da22: 0x6cc33020, 0x2da23: 0x6cc33220, + 0x2da24: 0x6c97c620, 0x2da25: 0x6cc33420, 0x2da26: 0x6c97c820, 0x2da27: 0x6c97ca20, + 0x2da28: 0x6c97cc20, 0x2da29: 0x6cc33620, 0x2da2a: 0x6cc33820, 0x2da2b: 0x6cc33a20, + 0x2da2c: 0x6c97ce20, 0x2da2d: 0x6c97d020, 0x2da2e: 0x6c97d220, 0x2da2f: 0x6c97d420, + 0x2da30: 0x6cc35820, 0x2da31: 0x6cc35a20, 0x2da32: 0x6cc35c20, 0x2da33: 0x6cf24a20, + 0x2da34: 0x6cc35e20, 0x2da35: 0x6cc36020, 0x2da36: 0x6cc36220, 0x2da37: 0x6cf24c20, + 0x2da38: 0x6cc36420, 0x2da39: 0x6cf24e20, 0x2da3a: 0x6cc36620, 0x2da3b: 0x6cc36820, + 0x2da3c: 0x6cc36a20, 0x2da3d: 0x6cc36c20, 0x2da3e: 0x6cc36e20, 0x2da3f: 0x6cc37020, + // Block 0xb69, offset 0x2da40 + 0x2da40: 0x6cc37220, 0x2da41: 0x6cf25020, 0x2da42: 0x6cf25220, 0x2da43: 0x6cc37420, + 0x2da44: 0x6cc37620, 0x2da45: 0x6cc37820, 0x2da46: 0x6cf25420, 0x2da47: 0x6cc37a20, + 0x2da48: 0x6cf25620, 0x2da49: 0x6cc37c20, 0x2da4a: 0x6cc37e20, 0x2da4b: 0x6cc38020, + 0x2da4c: 0x6cc38220, 0x2da4d: 0x6cf25820, 0x2da4e: 0x6cc38420, 0x2da4f: 0x6cf25a20, + 0x2da50: 0x6cc38620, 0x2da51: 0x6cc38820, 0x2da52: 0x6cc38a20, 0x2da53: 0x6cc38c20, + 0x2da54: 0x6cc38e20, 0x2da55: 0x6cc39020, 0x2da56: 0x6cc39220, 0x2da57: 0x6cf25c20, + 0x2da58: 0x6cc39420, 0x2da59: 0x6cf25e20, 0x2da5a: 0x6cf26020, 0x2da5b: 0x6cf26220, + 0x2da5c: 0x6cc39620, 0x2da5d: 0x6cc39820, 0x2da5e: 0x6cc39a20, 0x2da5f: 0x6cf26420, + 0x2da60: 0x6cc39c20, 0x2da61: 0x6cc39e20, 0x2da62: 0x6cc3a020, 0x2da63: 0x6cc3a220, + 0x2da64: 0x6cc3a420, 0x2da65: 0x6cc3a620, 0x2da66: 0x6cc3a820, 0x2da67: 0x6cf27820, + 0x2da68: 0x6d221220, 0x2da69: 0x6cf27a20, 0x2da6a: 0x6cf27c20, 0x2da6b: 0x6cf27e20, + 0x2da6c: 0x6d221420, 0x2da6d: 0x6cf28020, 0x2da6e: 0x6cf28220, 0x2da6f: 0x6cf28420, + 0x2da70: 0x6cf28620, 0x2da71: 0x6cf28820, 0x2da72: 0x6cf28a20, 0x2da73: 0x6d221620, + 0x2da74: 0x6cf28c20, 0x2da75: 0x6cf28e20, 0x2da76: 0x6cf29020, 0x2da77: 0x6cf29220, + 0x2da78: 0x6d221820, 0x2da79: 0x6cf29420, 0x2da7a: 0x6cf29620, 0x2da7b: 0x6d221a20, + 0x2da7c: 0x6cf29820, 0x2da7d: 0x6cf29a20, 0x2da7e: 0x6cf29c20, 0x2da7f: 0x6d221c20, + // Block 0xb6a, offset 0x2da80 + 0x2da80: 0x6cf29e20, 0x2da81: 0x6d221e20, 0x2da82: 0x6d222020, 0x2da83: 0x6cf2a020, + 0x2da84: 0x6cf2a220, 0x2da85: 0x6cf2a420, 0x2da86: 0x6cf2a620, 0x2da87: 0x6d222220, + 0x2da88: 0x6d222420, 0x2da89: 0x6cf2a820, 0x2da8a: 0x6cf2aa20, 0x2da8b: 0x6d222620, + 0x2da8c: 0x6cf2ac20, 0x2da8d: 0x6cf2ae20, 0x2da8e: 0x6cf2b020, 0x2da8f: 0x6cf2b220, + 0x2da90: 0x6d222820, 0x2da91: 0x6cf2b420, 0x2da92: 0x6d223c20, 0x2da93: 0x6d223e20, + 0x2da94: 0x6d224020, 0x2da95: 0x6d4f6c20, 0x2da96: 0x6d224220, 0x2da97: 0x6d4f6e20, + 0x2da98: 0x6d224420, 0x2da99: 0x6d4f7020, 0x2da9a: 0x6d224620, 0x2da9b: 0x6d224820, + 0x2da9c: 0x6d4f7220, 0x2da9d: 0x6d4f7420, 0x2da9e: 0x6d224a20, 0x2da9f: 0x6d224c20, + 0x2daa0: 0x6d224e20, 0x2daa1: 0x6d225020, 0x2daa2: 0x6d225220, 0x2daa3: 0x6d225420, + 0x2daa4: 0x6d4f7620, 0x2daa5: 0x6d225620, 0x2daa6: 0x6d4f7820, 0x2daa7: 0x6d4f7a20, + 0x2daa8: 0x6cc3aa20, 0x2daa9: 0x6d225820, 0x2daaa: 0x6d225a20, 0x2daab: 0x6d4f7c20, + 0x2daac: 0x6d225c20, 0x2daad: 0x6d4fb020, 0x2daae: 0x6d4f7e20, 0x2daaf: 0x6d225e20, + 0x2dab0: 0x6d4f8020, 0x2dab1: 0x6d226020, 0x2dab2: 0x6d226220, 0x2dab3: 0x6d226420, + 0x2dab4: 0x6d226620, 0x2dab5: 0x6d226820, 0x2dab6: 0x6d4f8220, 0x2dab7: 0x6d226a20, + 0x2dab8: 0x6d4f8420, 0x2dab9: 0x6d4f8620, 0x2daba: 0x6d226c20, 0x2dabb: 0x6d226e20, + 0x2dabc: 0x6d4f8820, 0x2dabd: 0x6d227020, 0x2dabe: 0x6d4f8a20, 0x2dabf: 0x6d4f8c20, + // Block 0xb6b, offset 0x2dac0 + 0x2dac0: 0x6d227220, 0x2dac1: 0x6d227420, 0x2dac2: 0x6d4f8e20, 0x2dac3: 0x6d4f9020, + 0x2dac4: 0x6d4f9220, 0x2dac5: 0x6d4f9420, 0x2dac6: 0x6d227620, 0x2dac7: 0x6d4f9620, + 0x2dac8: 0x6d227820, 0x2dac9: 0x6d4fb220, 0x2daca: 0x6d7bb620, 0x2dacb: 0x6d4fb420, + 0x2dacc: 0x6d7bb820, 0x2dacd: 0x6d4fb620, 0x2dace: 0x6d4fb820, 0x2dacf: 0x6d4fba20, + 0x2dad0: 0x6d4fbc20, 0x2dad1: 0x6d7bba20, 0x2dad2: 0x6d4fbe20, 0x2dad3: 0x6d4fc020, + 0x2dad4: 0x6d4fc220, 0x2dad5: 0x6d4fc420, 0x2dad6: 0x6d7bbc20, 0x2dad7: 0x6d7bbe20, + 0x2dad8: 0x6d4fc620, 0x2dad9: 0x6d7bc020, 0x2dada: 0x6d4fc820, 0x2dadb: 0x6d4fca20, + 0x2dadc: 0x6d4fcc20, 0x2dadd: 0x6d7bc220, 0x2dade: 0x6d4fce20, 0x2dadf: 0x6d4fd020, + 0x2dae0: 0x6d7bc420, 0x2dae1: 0x6d4fd220, 0x2dae2: 0x6d4fd420, 0x2dae3: 0x6d4fd620, + 0x2dae4: 0x6d4fd820, 0x2dae5: 0x6d7bc620, 0x2dae6: 0x6d4fda20, 0x2dae7: 0x6d4fdc20, + 0x2dae8: 0x6d7bc820, 0x2dae9: 0x6d7bca20, 0x2daea: 0x6d4fde20, 0x2daeb: 0x6d4fe020, + 0x2daec: 0x6d4fe220, 0x2daed: 0x6d4fe420, 0x2daee: 0x6d4fe620, 0x2daef: 0x6d4fe820, + 0x2daf0: 0x6d4fea20, 0x2daf1: 0x6d4fec20, 0x2daf2: 0x6d7bcc20, 0x2daf3: 0x6d4fee20, + 0x2daf4: 0x6d7bd220, 0x2daf5: 0x6da3d620, 0x2daf6: 0x6d7bd420, 0x2daf7: 0x6d7bd620, + 0x2daf8: 0x6d7bd820, 0x2daf9: 0x6d7bda20, 0x2dafa: 0x6d7bdc20, 0x2dafb: 0x6d7c8e20, + 0x2dafc: 0x6da3d820, 0x2dafd: 0x6d7bde20, 0x2dafe: 0x6d7be020, 0x2daff: 0x6d7be220, + // Block 0xb6c, offset 0x2db00 + 0x2db00: 0x6d7be420, 0x2db01: 0x6d7be620, 0x2db02: 0x6da3da20, 0x2db03: 0x6da3dc20, + 0x2db04: 0x6d7be820, 0x2db05: 0x6d7bea20, 0x2db06: 0x6d7bec20, 0x2db07: 0x6da3de20, + 0x2db08: 0x6d7bee20, 0x2db09: 0x6da3e020, 0x2db0a: 0x6d7bf020, 0x2db0b: 0x6da3e220, + 0x2db0c: 0x6d7bf220, 0x2db0d: 0x6d7bf420, 0x2db0e: 0x6d7bf620, 0x2db0f: 0x6d7bf820, + 0x2db10: 0x6d7bfa20, 0x2db11: 0x6da3e420, 0x2db12: 0x6d7bfc20, 0x2db13: 0x6d7bfe20, + 0x2db14: 0x6d7c0020, 0x2db15: 0x6dc57e20, 0x2db16: 0x6dc58020, 0x2db17: 0x6da3ea20, + 0x2db18: 0x6dc58220, 0x2db19: 0x6da3ec20, 0x2db1a: 0x6da3ee20, 0x2db1b: 0x6da3f020, + 0x2db1c: 0x6da3f220, 0x2db1d: 0x6da3f420, 0x2db1e: 0x6da3f620, 0x2db1f: 0x6dc58420, + 0x2db20: 0x6da3f820, 0x2db21: 0x6da3fa20, 0x2db22: 0x6da3fc20, 0x2db23: 0x6dc58620, + 0x2db24: 0x6da3fe20, 0x2db25: 0x6da40020, 0x2db26: 0x6da40220, 0x2db27: 0x6da40420, + 0x2db28: 0x6da40620, 0x2db29: 0x6dc58c20, 0x2db2a: 0x6dc58e20, 0x2db2b: 0x6dc59020, + 0x2db2c: 0x6de27e20, 0x2db2d: 0x6dc59220, 0x2db2e: 0x6dc59420, 0x2db2f: 0x6de28020, + 0x2db30: 0x6dc59620, 0x2db31: 0x6dc59820, 0x2db32: 0x6de28220, 0x2db33: 0x6dc59a20, + 0x2db34: 0x6dc59c20, 0x2db35: 0x6de28a20, 0x2db36: 0x6de28c20, 0x2db37: 0x6de28e20, + 0x2db38: 0x6dfa2e20, 0x2db39: 0x6dfa3620, 0x2db3a: 0x6dfa3820, 0x2db3b: 0x6de2de20, + 0x2db3c: 0x6e0dc020, 0x2db3d: 0x6e0dc220, 0x2db3e: 0x6e0dc420, 0x2db3f: 0x6e1d3220, + // Block 0xb6d, offset 0x2db40 + 0x2db40: 0x6e28d020, 0x2db41: 0x6e28d220, 0x2db42: 0x6e1d3820, 0x2db43: 0x6e28d420, + 0x2db44: 0x6e28d620, 0x2db45: 0x6e388a20, 0x2db46: 0x6e388c20, 0x2db47: 0x6e429820, + 0x2db48: 0x6c046c20, 0x2db49: 0x6c092020, 0x2db4a: 0x6c092220, 0x2db4b: 0x6c092420, + 0x2db4c: 0x6c11ba20, 0x2db4d: 0x6c11bc20, 0x2db4e: 0x6c11be20, 0x2db4f: 0x6c11c020, + 0x2db50: 0x6c11c220, 0x2db51: 0x6c200020, 0x2db52: 0x6c200220, 0x2db53: 0x6c200420, + 0x2db54: 0x6c33e220, 0x2db55: 0x6c33e420, 0x2db56: 0x6c33e620, 0x2db57: 0x6c33e820, + 0x2db58: 0x6c4ea020, 0x2db59: 0x6c709c20, 0x2db5a: 0x6c98b820, 0x2db5b: 0x6c98ba20, + 0x2db5c: 0x6c98bc20, 0x2db5d: 0x6c98be20, 0x2db5e: 0x6cc49020, 0x2db5f: 0x6cc49220, + 0x2db60: 0x6cf37820, 0x2db61: 0x6cf37a20, 0x2db62: 0x6cf37c20, 0x2db63: 0x6cf37e20, + 0x2db64: 0x6cf38020, 0x2db65: 0x6cf38220, 0x2db66: 0x6cf37420, 0x2db67: 0x6d233420, + 0x2db68: 0x6d233620, 0x2db69: 0x6d233820, 0x2db6a: 0x6d233a20, 0x2db6b: 0x6d233c20, + 0x2db6c: 0x6d233e20, 0x2db6d: 0x6d50c220, 0x2db6e: 0x6d50c420, 0x2db6f: 0x6d50c620, + 0x2db70: 0x6d7c9220, 0x2db71: 0x6d7c9020, 0x2db72: 0x6da46a20, 0x2db73: 0x6dc60020, + 0x2db74: 0x6da46c20, 0x2db75: 0x6e1d5220, 0x2db76: 0x6c046e20, 0x2db77: 0x6c047020, + 0x2db78: 0x6c047220, 0x2db79: 0x6c092c20, 0x2db7a: 0x6c201820, 0x2db7b: 0x6c201a20, + 0x2db7c: 0x6c201c20, 0x2db7d: 0x6c340620, 0x2db7e: 0x6c340820, 0x2db7f: 0x6c340a20, + // Block 0xb6e, offset 0x2db80 + 0x2db80: 0x6c340c20, 0x2db81: 0x6c4ecc20, 0x2db82: 0x6c4ece20, 0x2db83: 0x6c4ed020, + 0x2db84: 0x6c70b220, 0x2db85: 0x6c70b420, 0x2db86: 0x6c70b620, 0x2db87: 0x6c70b820, + 0x2db88: 0x6c98d620, 0x2db89: 0x6cc4ae20, 0x2db8a: 0x6cc4b020, 0x2db8b: 0x6c047420, + 0x2db8c: 0x6c01f420, 0x2db8d: 0x6c01f620, 0x2db8e: 0x6c047620, 0x2db8f: 0x6c095020, + 0x2db90: 0x6c093820, 0x2db91: 0x6c093a20, 0x2db92: 0x6c093c20, 0x2db93: 0x6c093e20, + 0x2db94: 0x6c094020, 0x2db95: 0x6c094220, 0x2db96: 0x6c094420, 0x2db97: 0x6c11dc20, + 0x2db98: 0x6c11de20, 0x2db99: 0x6c11e020, 0x2db9a: 0x6c11e220, 0x2db9b: 0x6c11e420, + 0x2db9c: 0x6c11e620, 0x2db9d: 0x6c11e820, 0x2db9e: 0x6c11ea20, 0x2db9f: 0x6c123420, + 0x2dba0: 0x6c11ec20, 0x2dba1: 0x6c11ee20, 0x2dba2: 0x6c11f020, 0x2dba3: 0x6c11f220, + 0x2dba4: 0x6c11f420, 0x2dba5: 0x6c11f620, 0x2dba6: 0x6c11f820, 0x2dba7: 0x6c11fa20, + 0x2dba8: 0x6c11fc20, 0x2dba9: 0x6c11fe20, 0x2dbaa: 0x6c120020, 0x2dbab: 0x6c120220, + 0x2dbac: 0x6c120420, 0x2dbad: 0x6c203a20, 0x2dbae: 0x6c203c20, 0x2dbaf: 0x6c203e20, + 0x2dbb0: 0x6c204020, 0x2dbb1: 0x6c204220, 0x2dbb2: 0x6c204420, 0x2dbb3: 0x6c204620, + 0x2dbb4: 0x6c204820, 0x2dbb5: 0x6c204a20, 0x2dbb6: 0x6c204c20, 0x2dbb7: 0x6c204e20, + 0x2dbb8: 0x6c211820, 0x2dbb9: 0x6c205020, 0x2dbba: 0x6c205220, 0x2dbbb: 0x6c205420, + 0x2dbbc: 0x6c205620, 0x2dbbd: 0x6c205820, 0x2dbbe: 0x6c205a20, 0x2dbbf: 0x6c341c20, + // Block 0xb6f, offset 0x2dbc0 + 0x2dbc0: 0x6c205c20, 0x2dbc1: 0x6c205e20, 0x2dbc2: 0x6c206020, 0x2dbc3: 0x6c206220, + 0x2dbc4: 0x6c206420, 0x2dbc5: 0x6c206620, 0x2dbc6: 0x6c206820, 0x2dbc7: 0x6c206a20, + 0x2dbc8: 0x6c206c20, 0x2dbc9: 0x6c206e20, 0x2dbca: 0x6c207020, 0x2dbcb: 0x6c207220, + 0x2dbcc: 0x6c207420, 0x2dbcd: 0x6c207620, 0x2dbce: 0x6c207820, 0x2dbcf: 0x6c207a20, + 0x2dbd0: 0x6c207c20, 0x2dbd1: 0x6c207e20, 0x2dbd2: 0x6c208020, 0x2dbd3: 0x6c208220, + 0x2dbd4: 0x6c208420, 0x2dbd5: 0x6c208620, 0x2dbd6: 0x6c208820, 0x2dbd7: 0x6c208a20, + 0x2dbd8: 0x6c208c20, 0x2dbd9: 0x6c208e20, 0x2dbda: 0x6c209020, 0x2dbdb: 0x6c209220, + 0x2dbdc: 0x6c209420, 0x2dbdd: 0x6c209620, 0x2dbde: 0x6c209820, 0x2dbdf: 0x6c209a20, + 0x2dbe0: 0x6c209c20, 0x2dbe1: 0x6c209e20, 0x2dbe2: 0x6c20a020, 0x2dbe3: 0x6c20a220, + 0x2dbe4: 0x6c20a420, 0x2dbe5: 0x6c20a620, 0x2dbe6: 0x6c343a20, 0x2dbe7: 0x6c343c20, + 0x2dbe8: 0x6c343e20, 0x2dbe9: 0x6c344020, 0x2dbea: 0x6c344220, 0x2dbeb: 0x6c344420, + 0x2dbec: 0x6c344620, 0x2dbed: 0x6c344820, 0x2dbee: 0x6c344a20, 0x2dbef: 0x6c344c20, + 0x2dbf0: 0x6c344e20, 0x2dbf1: 0x6c345020, 0x2dbf2: 0x6c345220, 0x2dbf3: 0x6c345420, + 0x2dbf4: 0x6c345620, 0x2dbf5: 0x6c345820, 0x2dbf6: 0x6c345a20, 0x2dbf7: 0x6c345c20, + 0x2dbf8: 0x6c345e20, 0x2dbf9: 0x6c346020, 0x2dbfa: 0x6c346220, 0x2dbfb: 0x6c346420, + 0x2dbfc: 0x6c346620, 0x2dbfd: 0x6c346820, 0x2dbfe: 0x6c346a20, 0x2dbff: 0x6c346c20, + // Block 0xb70, offset 0x2dc00 + 0x2dc00: 0x6c346e20, 0x2dc01: 0x6c347020, 0x2dc02: 0x6c347220, 0x2dc03: 0x6c347420, + 0x2dc04: 0x6c347620, 0x2dc05: 0x6c347820, 0x2dc06: 0x6c347a20, 0x2dc07: 0x6c347c20, + 0x2dc08: 0x6c347e20, 0x2dc09: 0x6c348020, 0x2dc0a: 0x6c348220, 0x2dc0b: 0x6c348420, + 0x2dc0c: 0x6c348620, 0x2dc0d: 0x6c348820, 0x2dc0e: 0x6c348a20, 0x2dc0f: 0x6c4ef420, + 0x2dc10: 0x6c348c20, 0x2dc11: 0x6c348e20, 0x2dc12: 0x6c349020, 0x2dc13: 0x6c349220, + 0x2dc14: 0x6c349420, 0x2dc15: 0x6c349620, 0x2dc16: 0x6c349820, 0x2dc17: 0x6c349a20, + 0x2dc18: 0x6c349c20, 0x2dc19: 0x6c349e20, 0x2dc1a: 0x6c34a020, 0x2dc1b: 0x6c34a220, + 0x2dc1c: 0x6c4ef620, 0x2dc1d: 0x6c34a420, 0x2dc1e: 0x6c34a620, 0x2dc1f: 0x6c34a820, + 0x2dc20: 0x6c34aa20, 0x2dc21: 0x6c34ac20, 0x2dc22: 0x6c34ae20, 0x2dc23: 0x6c34b020, + 0x2dc24: 0x6c34b220, 0x2dc25: 0x6c34b420, 0x2dc26: 0x6c34b620, 0x2dc27: 0x6c34b820, + 0x2dc28: 0x6c34ba20, 0x2dc29: 0x6c34bc20, 0x2dc2a: 0x6c4f1420, 0x2dc2b: 0x6c4f1620, + 0x2dc2c: 0x6c4f1820, 0x2dc2d: 0x6c4f1a20, 0x2dc2e: 0x6c4f1c20, 0x2dc2f: 0x6c4f1e20, + 0x2dc30: 0x6c4f2020, 0x2dc31: 0x6c4f2220, 0x2dc32: 0x6c70d020, 0x2dc33: 0x6c70d220, + 0x2dc34: 0x6c4f2420, 0x2dc35: 0x6c4f2620, 0x2dc36: 0x6c4f2820, 0x2dc37: 0x6c4f2a20, + 0x2dc38: 0x6c4f2c20, 0x2dc39: 0x6c4f2e20, 0x2dc3a: 0x6c4f3020, 0x2dc3b: 0x6c4f3220, + 0x2dc3c: 0x6c4f3420, 0x2dc3d: 0x6c4f3620, 0x2dc3e: 0x6c4f3820, 0x2dc3f: 0x6c70d420, + // Block 0xb71, offset 0x2dc40 + 0x2dc40: 0x6c4f3a20, 0x2dc41: 0x6c4f3c20, 0x2dc42: 0x6c4f3e20, 0x2dc43: 0x6c4f4020, + 0x2dc44: 0x6c4f4220, 0x2dc45: 0x6c4f4420, 0x2dc46: 0x6c4f4620, 0x2dc47: 0x6c4f4820, + 0x2dc48: 0x6c70d620, 0x2dc49: 0x6c4f4a20, 0x2dc4a: 0x6c4f4c20, 0x2dc4b: 0x6c4f4e20, + 0x2dc4c: 0x6c4f5020, 0x2dc4d: 0x6c4f5220, 0x2dc4e: 0x6c4f5420, 0x2dc4f: 0x6c4f5620, + 0x2dc50: 0x6c70d820, 0x2dc51: 0x6c4f5820, 0x2dc52: 0x6c4f5a20, 0x2dc53: 0x6c4f5c20, + 0x2dc54: 0x6c4f5e20, 0x2dc55: 0x6c4f6020, 0x2dc56: 0x6c4f6220, 0x2dc57: 0x6c4f6420, + 0x2dc58: 0x6c4f6620, 0x2dc59: 0x6c70da20, 0x2dc5a: 0x6c70dc20, 0x2dc5b: 0x6c70de20, + 0x2dc5c: 0x6c4f6820, 0x2dc5d: 0x6c4f6a20, 0x2dc5e: 0x6c4f6c20, 0x2dc5f: 0x6c4f6e20, + 0x2dc60: 0x6c4f7020, 0x2dc61: 0x6c4f7220, 0x2dc62: 0x6c4f7420, 0x2dc63: 0x6c4f7620, + 0x2dc64: 0x6c4f7820, 0x2dc65: 0x6c4f7a20, 0x2dc66: 0x6c4f7c20, 0x2dc67: 0x6c4f7e20, + 0x2dc68: 0x6c70ec20, 0x2dc69: 0x6c70ee20, 0x2dc6a: 0x6c70f020, 0x2dc6b: 0x6c70f220, + 0x2dc6c: 0x6c70f420, 0x2dc6d: 0x6c70f620, 0x2dc6e: 0x6c70f820, 0x2dc6f: 0x6c70fa20, + 0x2dc70: 0x6c70fc20, 0x2dc71: 0x6c70fe20, 0x2dc72: 0x6c98e420, 0x2dc73: 0x6c710020, + 0x2dc74: 0x6c710220, 0x2dc75: 0x6c710420, 0x2dc76: 0x6c710620, 0x2dc77: 0x6c710820, + 0x2dc78: 0x6c710a20, 0x2dc79: 0x6c710c20, 0x2dc7a: 0x6c710e20, 0x2dc7b: 0x6c98e620, + 0x2dc7c: 0x6c711020, 0x2dc7d: 0x6c711220, 0x2dc7e: 0x6c711420, 0x2dc7f: 0x6c711620, + // Block 0xb72, offset 0x2dc80 + 0x2dc80: 0x6c711820, 0x2dc81: 0x6c711a20, 0x2dc82: 0x6c711c20, 0x2dc83: 0x6c711e20, + 0x2dc84: 0x6c712020, 0x2dc85: 0x6c712220, 0x2dc86: 0x6c712420, 0x2dc87: 0x6c712620, + 0x2dc88: 0x6c712820, 0x2dc89: 0x6c712a20, 0x2dc8a: 0x6c712c20, 0x2dc8b: 0x6c712e20, + 0x2dc8c: 0x6c713020, 0x2dc8d: 0x6c713220, 0x2dc8e: 0x6c713420, 0x2dc8f: 0x6c713620, + 0x2dc90: 0x6c713820, 0x2dc91: 0x6c713a20, 0x2dc92: 0x6c713c20, 0x2dc93: 0x6c713e20, + 0x2dc94: 0x6c714020, 0x2dc95: 0x6c714220, 0x2dc96: 0x6c714420, 0x2dc97: 0x6c714620, + 0x2dc98: 0x6c714820, 0x2dc99: 0x6c714a20, 0x2dc9a: 0x6c714c20, 0x2dc9b: 0x6c714e20, + 0x2dc9c: 0x6c715020, 0x2dc9d: 0x6c715220, 0x2dc9e: 0x6c715420, 0x2dc9f: 0x6c715620, + 0x2dca0: 0x6c715820, 0x2dca1: 0x6c715a20, 0x2dca2: 0x6c715c20, 0x2dca3: 0x6c715e20, + 0x2dca4: 0x6c716020, 0x2dca5: 0x6c990620, 0x2dca6: 0x6c990820, 0x2dca7: 0x6c990a20, + 0x2dca8: 0x6c990c20, 0x2dca9: 0x6c990e20, 0x2dcaa: 0x6c991020, 0x2dcab: 0x6c991220, + 0x2dcac: 0x6c991420, 0x2dcad: 0x6c991620, 0x2dcae: 0x6c991820, 0x2dcaf: 0x6c991a20, + 0x2dcb0: 0x6c991c20, 0x2dcb1: 0x6c991e20, 0x2dcb2: 0x6c992020, 0x2dcb3: 0x6c992220, + 0x2dcb4: 0x6c992420, 0x2dcb5: 0x6c992620, 0x2dcb6: 0x6c992820, 0x2dcb7: 0x6c992a20, + 0x2dcb8: 0x6c992c20, 0x2dcb9: 0x6c992e20, 0x2dcba: 0x6c993020, 0x2dcbb: 0x6c993220, + 0x2dcbc: 0x6c993420, 0x2dcbd: 0x6c993620, 0x2dcbe: 0x6c993820, 0x2dcbf: 0x6c993a20, + // Block 0xb73, offset 0x2dcc0 + 0x2dcc0: 0x6c993c20, 0x2dcc1: 0x6c993e20, 0x2dcc2: 0x6c994020, 0x2dcc3: 0x6c994220, + 0x2dcc4: 0x6c994420, 0x2dcc5: 0x6c994620, 0x2dcc6: 0x6c994820, 0x2dcc7: 0x6c994a20, + 0x2dcc8: 0x6c994c20, 0x2dcc9: 0x6c994e20, 0x2dcca: 0x6c995020, 0x2dccb: 0x6c995220, + 0x2dccc: 0x6cc4be20, 0x2dccd: 0x6c995420, 0x2dcce: 0x6c995620, 0x2dccf: 0x6c995820, + 0x2dcd0: 0x6c995a20, 0x2dcd1: 0x6c995c20, 0x2dcd2: 0x6c995e20, 0x2dcd3: 0x6c996020, + 0x2dcd4: 0x6cc4c020, 0x2dcd5: 0x6c996220, 0x2dcd6: 0x6c996420, 0x2dcd7: 0x6c996620, + 0x2dcd8: 0x6c996820, 0x2dcd9: 0x6c996a20, 0x2dcda: 0x6c996c20, 0x2dcdb: 0x6c996e20, + 0x2dcdc: 0x6c997020, 0x2dcdd: 0x6c997220, 0x2dcde: 0x6c997420, 0x2dcdf: 0x6c997620, + 0x2dce0: 0x6c997820, 0x2dce1: 0x6c997a20, 0x2dce2: 0x6c997c20, 0x2dce3: 0x6cc4c220, + 0x2dce4: 0x6c997e20, 0x2dce5: 0x6c998020, 0x2dce6: 0x6c998220, 0x2dce7: 0x6c998420, + 0x2dce8: 0x6c998620, 0x2dce9: 0x6c998820, 0x2dcea: 0x6c998a20, 0x2dceb: 0x6c998c20, + 0x2dcec: 0x6c998e20, 0x2dced: 0x6c999020, 0x2dcee: 0x6c999220, 0x2dcef: 0x6c999420, + 0x2dcf0: 0x6cc4c420, 0x2dcf1: 0x6cc4c620, 0x2dcf2: 0x6c9a9220, 0x2dcf3: 0x6c999620, + 0x2dcf4: 0x6c999820, 0x2dcf5: 0x6c999a20, 0x2dcf6: 0x6c999c20, 0x2dcf7: 0x6c999e20, + 0x2dcf8: 0x6c99a020, 0x2dcf9: 0x6c99a220, 0x2dcfa: 0x6c99a420, 0x2dcfb: 0x6c99a620, + 0x2dcfc: 0x6c99a820, 0x2dcfd: 0x6c99aa20, 0x2dcfe: 0x6cc4e220, 0x2dcff: 0x6cc4e420, + // Block 0xb74, offset 0x2dd00 + 0x2dd00: 0x6cc4e620, 0x2dd01: 0x6cc4e820, 0x2dd02: 0x6cc4ea20, 0x2dd03: 0x6cc4ec20, + 0x2dd04: 0x6cc4ee20, 0x2dd05: 0x6cf51c20, 0x2dd06: 0x6cc4f020, 0x2dd07: 0x6cc4f220, + 0x2dd08: 0x6cc4f420, 0x2dd09: 0x6cc4f620, 0x2dd0a: 0x6cc4f820, 0x2dd0b: 0x6cc4fa20, + 0x2dd0c: 0x6cc4fc20, 0x2dd0d: 0x6cc4fe20, 0x2dd0e: 0x6cc50020, 0x2dd0f: 0x6cc50220, + 0x2dd10: 0x6cc50420, 0x2dd11: 0x6cc50620, 0x2dd12: 0x6cc50820, 0x2dd13: 0x6cc50a20, + 0x2dd14: 0x6cc50c20, 0x2dd15: 0x6cc50e20, 0x2dd16: 0x6cc51020, 0x2dd17: 0x6cc51220, + 0x2dd18: 0x6cc51420, 0x2dd19: 0x6cc51620, 0x2dd1a: 0x6cc51820, 0x2dd1b: 0x6cc51a20, + 0x2dd1c: 0x6cc51c20, 0x2dd1d: 0x6cc51e20, 0x2dd1e: 0x6cc52020, 0x2dd1f: 0x6cc52220, + 0x2dd20: 0x6cc52420, 0x2dd21: 0x6cc52620, 0x2dd22: 0x6cc52820, 0x2dd23: 0x6cc52a20, + 0x2dd24: 0x6c722020, 0x2dd25: 0x6cc52c20, 0x2dd26: 0x6cc52e20, 0x2dd27: 0x6cf3ac20, + 0x2dd28: 0x6cc53020, 0x2dd29: 0x6cc53220, 0x2dd2a: 0x6cc53420, 0x2dd2b: 0x6cf3ae20, + 0x2dd2c: 0x6cc53620, 0x2dd2d: 0x6cc53820, 0x2dd2e: 0x6cc53a20, 0x2dd2f: 0x6cc53c20, + 0x2dd30: 0x6cc53e20, 0x2dd31: 0x6cf3b020, 0x2dd32: 0x6cc54020, 0x2dd33: 0x6cc54220, + 0x2dd34: 0x6cc54420, 0x2dd35: 0x6cc54620, 0x2dd36: 0x6cc54820, 0x2dd37: 0x6cc54a20, + 0x2dd38: 0x6cc54c20, 0x2dd39: 0x6cc54e20, 0x2dd3a: 0x6cc55020, 0x2dd3b: 0x6cc55220, + 0x2dd3c: 0x6cc55420, 0x2dd3d: 0x6cc55620, 0x2dd3e: 0x6cc55820, 0x2dd3f: 0x6cc55a20, + // Block 0xb75, offset 0x2dd40 + 0x2dd40: 0x6cc55c20, 0x2dd41: 0x6cc55e20, 0x2dd42: 0x6cc56020, 0x2dd43: 0x6cc56220, + 0x2dd44: 0x6cc56420, 0x2dd45: 0x6cc56620, 0x2dd46: 0x6cf3da20, 0x2dd47: 0x6cf3dc20, + 0x2dd48: 0x6cf3de20, 0x2dd49: 0x6cf3e020, 0x2dd4a: 0x6cf3e220, 0x2dd4b: 0x6cf3e420, + 0x2dd4c: 0x6cf3e620, 0x2dd4d: 0x6cf3e820, 0x2dd4e: 0x6cf3ea20, 0x2dd4f: 0x6cf3ec20, + 0x2dd50: 0x6cf3ee20, 0x2dd51: 0x6cf3f020, 0x2dd52: 0x6cf3f220, 0x2dd53: 0x6cf3f420, + 0x2dd54: 0x6cf3f620, 0x2dd55: 0x6cf3f820, 0x2dd56: 0x6cf3fa20, 0x2dd57: 0x6cf3fc20, + 0x2dd58: 0x6cf3fe20, 0x2dd59: 0x6cf40020, 0x2dd5a: 0x6cf40220, 0x2dd5b: 0x6cf40420, + 0x2dd5c: 0x6cf40620, 0x2dd5d: 0x6cf40820, 0x2dd5e: 0x6cf40a20, 0x2dd5f: 0x6cf40c20, + 0x2dd60: 0x6cf40e20, 0x2dd61: 0x6cf41020, 0x2dd62: 0x6cf41220, 0x2dd63: 0x6cf41420, + 0x2dd64: 0x6cf41620, 0x2dd65: 0x6cf41820, 0x2dd66: 0x6cf41a20, 0x2dd67: 0x6cf41c20, + 0x2dd68: 0x6cf41e20, 0x2dd69: 0x6cf42020, 0x2dd6a: 0x6cf42220, 0x2dd6b: 0x6d236a20, + 0x2dd6c: 0x6cf42420, 0x2dd6d: 0x6cf42620, 0x2dd6e: 0x6cf42820, 0x2dd6f: 0x6cf42a20, + 0x2dd70: 0x6cf42c20, 0x2dd71: 0x6cf51e20, 0x2dd72: 0x6cf42e20, 0x2dd73: 0x6cf43020, + 0x2dd74: 0x6d236c20, 0x2dd75: 0x6cf43220, 0x2dd76: 0x6cf43420, 0x2dd77: 0x6cf43620, + 0x2dd78: 0x6cf43820, 0x2dd79: 0x6cf43a20, 0x2dd7a: 0x6cf43c20, 0x2dd7b: 0x6d236e20, + 0x2dd7c: 0x6cf43e20, 0x2dd7d: 0x6cf44020, 0x2dd7e: 0x6cf44220, 0x2dd7f: 0x6d237020, + // Block 0xb76, offset 0x2dd80 + 0x2dd80: 0x6cf44420, 0x2dd81: 0x6cf44620, 0x2dd82: 0x6cf44820, 0x2dd83: 0x6cf44a20, + 0x2dd84: 0x6cf44c20, 0x2dd85: 0x6cf44e20, 0x2dd86: 0x6cf45020, 0x2dd87: 0x6cf45220, + 0x2dd88: 0x6cf45420, 0x2dd89: 0x6cf45620, 0x2dd8a: 0x6cf45820, 0x2dd8b: 0x6d239a20, + 0x2dd8c: 0x6d239c20, 0x2dd8d: 0x6d239e20, 0x2dd8e: 0x6d23a020, 0x2dd8f: 0x6d23a220, + 0x2dd90: 0x6d23a420, 0x2dd91: 0x6d23a620, 0x2dd92: 0x6cc56820, 0x2dd93: 0x6d23a820, + 0x2dd94: 0x6d23aa20, 0x2dd95: 0x6d23ac20, 0x2dd96: 0x6d24e620, 0x2dd97: 0x6d23ae20, + 0x2dd98: 0x6d23b020, 0x2dd99: 0x6d23b220, 0x2dd9a: 0x6d23b420, 0x2dd9b: 0x6d23b620, + 0x2dd9c: 0x6d23b820, 0x2dd9d: 0x6d23ba20, 0x2dd9e: 0x6d23bc20, 0x2dd9f: 0x6d23be20, + 0x2dda0: 0x6d23c020, 0x2dda1: 0x6cc66e20, 0x2dda2: 0x6d23c220, 0x2dda3: 0x6d23c420, + 0x2dda4: 0x6d23c620, 0x2dda5: 0x6d23c820, 0x2dda6: 0x6d23ca20, 0x2dda7: 0x6d23cc20, + 0x2dda8: 0x6d510020, 0x2dda9: 0x6d510220, 0x2ddaa: 0x6d23ce20, 0x2ddab: 0x6d23d020, + 0x2ddac: 0x6d23d220, 0x2ddad: 0x6d23d420, 0x2ddae: 0x6d510420, 0x2ddaf: 0x6d510620, + 0x2ddb0: 0x6d510820, 0x2ddb1: 0x6d23d620, 0x2ddb2: 0x6d23d820, 0x2ddb3: 0x6d23da20, + 0x2ddb4: 0x6d23dc20, 0x2ddb5: 0x6d23de20, 0x2ddb6: 0x6d23e020, 0x2ddb7: 0x6d23e220, + 0x2ddb8: 0x6d23e420, 0x2ddb9: 0x6d510a20, 0x2ddba: 0x6d23e620, 0x2ddbb: 0x6d23e820, + 0x2ddbc: 0x6d23ea20, 0x2ddbd: 0x6d23ec20, 0x2ddbe: 0x6d23ee20, 0x2ddbf: 0x6d23f020, + // Block 0xb77, offset 0x2ddc0 + 0x2ddc0: 0x6d510c20, 0x2ddc1: 0x6d23f220, 0x2ddc2: 0x6d23f420, 0x2ddc3: 0x6d510e20, + 0x2ddc4: 0x6d23f620, 0x2ddc5: 0x6d512e20, 0x2ddc6: 0x6d513020, 0x2ddc7: 0x6d23f820, + 0x2ddc8: 0x6d513220, 0x2ddc9: 0x6d7cb220, 0x2ddca: 0x6d513420, 0x2ddcb: 0x6d513620, + 0x2ddcc: 0x6d513820, 0x2ddcd: 0x6d513a20, 0x2ddce: 0x6d513c20, 0x2ddcf: 0x6d513e20, + 0x2ddd0: 0x6d514020, 0x2ddd1: 0x6d514220, 0x2ddd2: 0x6d514420, 0x2ddd3: 0x6d514620, + 0x2ddd4: 0x6d514820, 0x2ddd5: 0x6d514a20, 0x2ddd6: 0x6d514c20, 0x2ddd7: 0x6d514e20, + 0x2ddd8: 0x6d515020, 0x2ddd9: 0x6d515220, 0x2ddda: 0x6d515420, 0x2dddb: 0x6d515620, + 0x2dddc: 0x6d515820, 0x2dddd: 0x6d515a20, 0x2ddde: 0x6d515c20, 0x2dddf: 0x6d515e20, + 0x2dde0: 0x6d516020, 0x2dde1: 0x6d516220, 0x2dde2: 0x6d516420, 0x2dde3: 0x6d516620, + 0x2dde4: 0x6d516820, 0x2dde5: 0x6d516a20, 0x2dde6: 0x6d24e820, 0x2dde7: 0x6d516c20, + 0x2dde8: 0x6d516e20, 0x2dde9: 0x6d517020, 0x2ddea: 0x6d517220, 0x2ddeb: 0x6d517420, + 0x2ddec: 0x6d517620, 0x2dded: 0x6d517820, 0x2ddee: 0x6d517a20, 0x2ddef: 0x6d517c20, + 0x2ddf0: 0x6d517e20, 0x2ddf1: 0x6d518020, 0x2ddf2: 0x6d518220, 0x2ddf3: 0x6d518420, + 0x2ddf4: 0x6d518620, 0x2ddf5: 0x6d518820, 0x2ddf6: 0x6d518a20, 0x2ddf7: 0x6d518c20, + 0x2ddf8: 0x6d518e20, 0x2ddf9: 0x6d519020, 0x2ddfa: 0x6d519220, 0x2ddfb: 0x6d7cc220, + 0x2ddfc: 0x6d7cc420, 0x2ddfd: 0x6d7cc620, 0x2ddfe: 0x6d7cc820, 0x2ddff: 0x6d7cca20, + // Block 0xb78, offset 0x2de00 + 0x2de00: 0x6d7ccc20, 0x2de01: 0x6d7cce20, 0x2de02: 0x6d7cd020, 0x2de03: 0x6d7cd220, + 0x2de04: 0x6d7cd420, 0x2de05: 0x6d7cd620, 0x2de06: 0x6d519420, 0x2de07: 0x6d7cd820, + 0x2de08: 0x6d7cda20, 0x2de09: 0x6d7cdc20, 0x2de0a: 0x6da47c20, 0x2de0b: 0x6d7cde20, + 0x2de0c: 0x6d7ce020, 0x2de0d: 0x6d7ce220, 0x2de0e: 0x6da47e20, 0x2de0f: 0x6d7ce420, + 0x2de10: 0x6d7ce620, 0x2de11: 0x6d7ce820, 0x2de12: 0x6d7cea20, 0x2de13: 0x6d7cec20, + 0x2de14: 0x6d7cee20, 0x2de15: 0x6d7cf020, 0x2de16: 0x6d7cf220, 0x2de17: 0x6d7cf420, + 0x2de18: 0x6da48020, 0x2de19: 0x6d7cf620, 0x2de1a: 0x6d7cf820, 0x2de1b: 0x6d7cfa20, + 0x2de1c: 0x6d7cfc20, 0x2de1d: 0x6d7cfe20, 0x2de1e: 0x6d7d0020, 0x2de1f: 0x6da48e20, + 0x2de20: 0x6da49020, 0x2de21: 0x6da49220, 0x2de22: 0x6da49420, 0x2de23: 0x6da49620, + 0x2de24: 0x6da49820, 0x2de25: 0x6dc62620, 0x2de26: 0x6da49a20, 0x2de27: 0x6dc60a20, + 0x2de28: 0x6da49c20, 0x2de29: 0x6da49e20, 0x2de2a: 0x6dc60c20, 0x2de2b: 0x6da4a020, + 0x2de2c: 0x6da4a220, 0x2de2d: 0x6da4a420, 0x2de2e: 0x6da4a620, 0x2de2f: 0x6da4a820, + 0x2de30: 0x6da4aa20, 0x2de31: 0x6da4ac20, 0x2de32: 0x6dc62820, 0x2de33: 0x6d7d9e20, + 0x2de34: 0x6dc62a20, 0x2de35: 0x6dc62c20, 0x2de36: 0x6dc62e20, 0x2de37: 0x6dc63020, + 0x2de38: 0x6dc63220, 0x2de39: 0x6dc63420, 0x2de3a: 0x6dc63620, 0x2de3b: 0x6dc63820, + 0x2de3c: 0x6dc63a20, 0x2de3d: 0x6dc63c20, 0x2de3e: 0x6dc63e20, 0x2de3f: 0x6dc64020, + // Block 0xb79, offset 0x2de40 + 0x2de40: 0x6de2e820, 0x2de41: 0x6dc64220, 0x2de42: 0x6dc64420, 0x2de43: 0x6dc64620, + 0x2de44: 0x6dc64820, 0x2de45: 0x6dc64a20, 0x2de46: 0x6dc64c20, 0x2de47: 0x6de2ee20, + 0x2de48: 0x6de2f020, 0x2de49: 0x6de2f220, 0x2de4a: 0x6de2f420, 0x2de4b: 0x6de2f620, + 0x2de4c: 0x6de2f820, 0x2de4d: 0x6de2fa20, 0x2de4e: 0x6de2fc20, 0x2de4f: 0x6de2fe20, + 0x2de50: 0x6de30020, 0x2de51: 0x6e0dee20, 0x2de52: 0x6de30220, 0x2de53: 0x6dfa6220, + 0x2de54: 0x6dfa6420, 0x2de55: 0x6dfa6620, 0x2de56: 0x6dfa6820, 0x2de57: 0x6dfa6a20, + 0x2de58: 0x6dfa6c20, 0x2de59: 0x6dfa6e20, 0x2de5a: 0x6dfa7020, 0x2de5b: 0x6e0df820, + 0x2de5c: 0x6e0dfa20, 0x2de5d: 0x6e0dfc20, 0x2de5e: 0x6e1d5620, 0x2de5f: 0x6e1d5820, + 0x2de60: 0x6e1d5a20, 0x2de61: 0x6e1d5c20, 0x2de62: 0x6e1d5e20, 0x2de63: 0x6e28f620, + 0x2de64: 0x6e1d6020, 0x2de65: 0x6e28fe20, 0x2de66: 0x6e1d6220, 0x2de67: 0x6e1d6420, + 0x2de68: 0x6e290020, 0x2de69: 0x6e290220, 0x2de6a: 0x6e290420, 0x2de6b: 0x6e290620, + 0x2de6c: 0x6e322620, 0x2de6d: 0x6e322820, 0x2de6e: 0x6e389420, 0x2de6f: 0x6c047e20, + 0x2de70: 0x6c123620, 0x2de71: 0x6c502a20, 0x2de72: 0x6cc67220, 0x2de73: 0x6d7da020, + 0x2de74: 0x6c048020, 0x2de75: 0x6c048220, 0x2de76: 0x6c123a20, 0x2de77: 0x6c123c20, + 0x2de78: 0x6c212020, 0x2de79: 0x6c212220, 0x2de7a: 0x6c212420, 0x2de7b: 0x6c212620, + 0x2de7c: 0x6c212820, 0x2de7d: 0x6c354420, 0x2de7e: 0x6c354620, 0x2de7f: 0x6c503220, + // Block 0xb7a, offset 0x2de80 + 0x2de80: 0x6c503c20, 0x2de81: 0x6c503e20, 0x2de82: 0x6c504020, 0x2de83: 0x6c504220, + 0x2de84: 0x6c504420, 0x2de85: 0x6c504620, 0x2de86: 0x6c723c20, 0x2de87: 0x6c723e20, + 0x2de88: 0x6c724020, 0x2de89: 0x6c724220, 0x2de8a: 0x6c724420, 0x2de8b: 0x6c724620, + 0x2de8c: 0x6c724820, 0x2de8d: 0x6c9aac20, 0x2de8e: 0x6c9aae20, 0x2de8f: 0x6c9ab020, + 0x2de90: 0x6c9ab220, 0x2de91: 0x6c9ab420, 0x2de92: 0x6c9ab620, 0x2de93: 0x6c9ab820, + 0x2de94: 0x6c9aba20, 0x2de95: 0x6c9abc20, 0x2de96: 0x6c9abe20, 0x2de97: 0x6c9ac020, + 0x2de98: 0x6c9ac220, 0x2de99: 0x6c9ac420, 0x2de9a: 0x6c9ac620, 0x2de9b: 0x6c9ac820, + 0x2de9c: 0x6cc69a20, 0x2de9d: 0x6c9b1420, 0x2de9e: 0x6cc69c20, 0x2de9f: 0x6cc69e20, + 0x2dea0: 0x6cc6a020, 0x2dea1: 0x6cc6a220, 0x2dea2: 0x6cc6a420, 0x2dea3: 0x6cc6a620, + 0x2dea4: 0x6cc6a820, 0x2dea5: 0x6cc6aa20, 0x2dea6: 0x6cc6ac20, 0x2dea7: 0x6cc6ae20, + 0x2dea8: 0x6cc6b020, 0x2dea9: 0x6cc6b220, 0x2deaa: 0x6cc6b420, 0x2deab: 0x6cf53620, + 0x2deac: 0x6cf53820, 0x2dead: 0x6cf52a20, 0x2deae: 0x6cf53a20, 0x2deaf: 0x6cf53c20, + 0x2deb0: 0x6cf53e20, 0x2deb1: 0x6d24f820, 0x2deb2: 0x6d24fa20, 0x2deb3: 0x6d24fc20, + 0x2deb4: 0x6d7dac20, 0x2deb5: 0x6d527820, 0x2deb6: 0x6d527a20, 0x2deb7: 0x6d527c20, + 0x2deb8: 0x6d527e20, 0x2deb9: 0x6d528020, 0x2deba: 0x6d528220, 0x2debb: 0x6d528420, + 0x2debc: 0x6d7db620, 0x2debd: 0x6d7db820, 0x2debe: 0x6d7dba20, 0x2debf: 0x6d7dbc20, + // Block 0xb7b, offset 0x2dec0 + 0x2dec0: 0x6da51420, 0x2dec1: 0x6da51620, 0x2dec2: 0x6da51820, 0x2dec3: 0x6da53e20, + 0x2dec4: 0x6de35a20, 0x2dec5: 0x6dfab420, 0x2dec6: 0x6dfab620, 0x2dec7: 0x6c048420, + 0x2dec8: 0x6c213c20, 0x2dec9: 0x6c357620, 0x2deca: 0x6c728e20, 0x2decb: 0x6c729020, + 0x2decc: 0x6cc70220, 0x2decd: 0x6c9b1620, 0x2dece: 0x6c9b1820, 0x2decf: 0x6c9b1a20, + 0x2ded0: 0x6cc70420, 0x2ded1: 0x6cc70620, 0x2ded2: 0x6cf58e20, 0x2ded3: 0x6d7e0420, + 0x2ded4: 0x6dc6dc20, 0x2ded5: 0x6e0e3c20, 0x2ded6: 0x6e292620, 0x2ded7: 0x6c048620, + 0x2ded8: 0x6c214220, 0x2ded9: 0x6c729c20, 0x2deda: 0x6c729e20, 0x2dedb: 0x6c9b2a20, + 0x2dedc: 0x6c9b2c20, 0x2dedd: 0x6cc71620, 0x2dede: 0x6cc72220, 0x2dedf: 0x6cf59820, + 0x2dee0: 0x6d254820, 0x2dee1: 0x6d254a20, 0x2dee2: 0x6d7e0a20, 0x2dee3: 0x6da54420, + 0x2dee4: 0x6c048a20, 0x2dee5: 0x6c095220, 0x2dee6: 0x6c358a20, 0x2dee7: 0x6c358c20, + 0x2dee8: 0x6c358e20, 0x2dee9: 0x6c359020, 0x2deea: 0x6c508620, 0x2deeb: 0x6c508820, + 0x2deec: 0x6c9b3820, 0x2deed: 0x6c9b3a20, 0x2deee: 0x6cc72620, 0x2deef: 0x6cc72820, + 0x2def0: 0x6cf5a220, 0x2def1: 0x6cc74220, 0x2def2: 0x6d255820, 0x2def3: 0x6d52d820, + 0x2def4: 0x6d7e0c20, 0x2def5: 0x6da54c20, 0x2def6: 0x6da54e20, 0x2def7: 0x6dc6e020, + 0x2def8: 0x6e38a220, 0x2def9: 0x6c048e20, 0x2defa: 0x6c35a020, 0x2defb: 0x6c35a220, + 0x2defc: 0x6c35a420, 0x2defd: 0x6c509020, 0x2defe: 0x6c509220, 0x2deff: 0x6c509420, + // Block 0xb7c, offset 0x2df00 + 0x2df00: 0x6c509620, 0x2df01: 0x6c72bc20, 0x2df02: 0x6c72be20, 0x2df03: 0x6c72c020, + 0x2df04: 0x6c72c220, 0x2df05: 0x6c72c420, 0x2df06: 0x6c72c620, 0x2df07: 0x6c9b4820, + 0x2df08: 0x6c9b4a20, 0x2df09: 0x6c9b4c20, 0x2df0a: 0x6c72c820, 0x2df0b: 0x6c9b4e20, + 0x2df0c: 0x6c9b5020, 0x2df0d: 0x6c9b5220, 0x2df0e: 0x6c9b5420, 0x2df0f: 0x6c9b5620, + 0x2df10: 0x6cc74620, 0x2df11: 0x6cc74820, 0x2df12: 0x6cf5b620, 0x2df13: 0x6cf5b820, + 0x2df14: 0x6cf5ba20, 0x2df15: 0x6cf5bc20, 0x2df16: 0x6d256420, 0x2df17: 0x6d256620, + 0x2df18: 0x6d7e1c20, 0x2df19: 0x6d7e1e20, 0x2df1a: 0x6da55a20, 0x2df1b: 0x6dc6ec20, + 0x2df1c: 0x6de37820, 0x2df1d: 0x6de37a20, 0x2df1e: 0x6de37c20, 0x2df1f: 0x6dfad820, + 0x2df20: 0x6c049020, 0x2df21: 0x6c049220, 0x2df22: 0x6c50ac20, 0x2df23: 0x6c9b6e20, + 0x2df24: 0x6cf5ce20, 0x2df25: 0x6c049620, 0x2df26: 0x6c095420, 0x2df27: 0x6c095620, + 0x2df28: 0x6c125020, 0x2df29: 0x6c125220, 0x2df2a: 0x6c125420, 0x2df2b: 0x6c125620, + 0x2df2c: 0x6c125820, 0x2df2d: 0x6c125a20, 0x2df2e: 0x6c125c20, 0x2df2f: 0x6c125e20, + 0x2df30: 0x6c215c20, 0x2df31: 0x6c215e20, 0x2df32: 0x6c216020, 0x2df33: 0x6c216220, + 0x2df34: 0x6c216420, 0x2df35: 0x6c216620, 0x2df36: 0x6c216820, 0x2df37: 0x6c216a20, + 0x2df38: 0x6c216c20, 0x2df39: 0x6c35b620, 0x2df3a: 0x6c35b820, 0x2df3b: 0x6c35ba20, + 0x2df3c: 0x6c35bc20, 0x2df3d: 0x6c35be20, 0x2df3e: 0x6c35c020, 0x2df3f: 0x6c35c220, + // Block 0xb7d, offset 0x2df40 + 0x2df40: 0x6c35c420, 0x2df41: 0x6c35c620, 0x2df42: 0x6c35c820, 0x2df43: 0x6c35ca20, + 0x2df44: 0x6c35cc20, 0x2df45: 0x6c35ce20, 0x2df46: 0x6c35d020, 0x2df47: 0x6c35d220, + 0x2df48: 0x6c35d420, 0x2df49: 0x6c35d620, 0x2df4a: 0x6c35d820, 0x2df4b: 0x6c35da20, + 0x2df4c: 0x6c35dc20, 0x2df4d: 0x6c35de20, 0x2df4e: 0x6c35e020, 0x2df4f: 0x6c35e220, + 0x2df50: 0x6c35e420, 0x2df51: 0x6c35e620, 0x2df52: 0x6c35e820, 0x2df53: 0x6c35ea20, + 0x2df54: 0x6c35ec20, 0x2df55: 0x6c35ee20, 0x2df56: 0x6c35f020, 0x2df57: 0x6c35f220, + 0x2df58: 0x6c35f420, 0x2df59: 0x6c35f620, 0x2df5a: 0x6c50c420, 0x2df5b: 0x6c50c620, + 0x2df5c: 0x6c50c820, 0x2df5d: 0x6c50ca20, 0x2df5e: 0x6c50cc20, 0x2df5f: 0x6c50ce20, + 0x2df60: 0x6c50d020, 0x2df61: 0x6c50d220, 0x2df62: 0x6c50d420, 0x2df63: 0x6c50d620, + 0x2df64: 0x6c50d820, 0x2df65: 0x6c50da20, 0x2df66: 0x6c50dc20, 0x2df67: 0x6c50de20, + 0x2df68: 0x6c50e020, 0x2df69: 0x6c50e220, 0x2df6a: 0x6c50e420, 0x2df6b: 0x6c50e620, + 0x2df6c: 0x6c50e820, 0x2df6d: 0x6c50ea20, 0x2df6e: 0x6c50ec20, 0x2df6f: 0x6c50ee20, + 0x2df70: 0x6c50f020, 0x2df71: 0x6c50f220, 0x2df72: 0x6c50f420, 0x2df73: 0x6c50f620, + 0x2df74: 0x6c50f820, 0x2df75: 0x6c50fa20, 0x2df76: 0x6c50fc20, 0x2df77: 0x6c50fe20, + 0x2df78: 0x6c510020, 0x2df79: 0x6c510220, 0x2df7a: 0x6c510420, 0x2df7b: 0x6c510620, + 0x2df7c: 0x6c510820, 0x2df7d: 0x6c510a20, 0x2df7e: 0x6c510c20, 0x2df7f: 0x6c510e20, + // Block 0xb7e, offset 0x2df80 + 0x2df80: 0x6c730420, 0x2df81: 0x6c730620, 0x2df82: 0x6c730820, 0x2df83: 0x6c730a20, + 0x2df84: 0x6c730c20, 0x2df85: 0x6c730e20, 0x2df86: 0x6c731020, 0x2df87: 0x6c731220, + 0x2df88: 0x6c731420, 0x2df89: 0x6c731620, 0x2df8a: 0x6c731820, 0x2df8b: 0x6c731a20, + 0x2df8c: 0x6c731c20, 0x2df8d: 0x6c731e20, 0x2df8e: 0x6c732020, 0x2df8f: 0x6c732220, + 0x2df90: 0x6c732420, 0x2df91: 0x6c732620, 0x2df92: 0x6c732820, 0x2df93: 0x6c732a20, + 0x2df94: 0x6c732c20, 0x2df95: 0x6c732e20, 0x2df96: 0x6c733020, 0x2df97: 0x6c9b7e20, + 0x2df98: 0x6c9b8020, 0x2df99: 0x6c9b8220, 0x2df9a: 0x6c9b8420, 0x2df9b: 0x6c9b8620, + 0x2df9c: 0x6c9b8820, 0x2df9d: 0x6c9b8a20, 0x2df9e: 0x6c9b8c20, 0x2df9f: 0x6c738c20, + 0x2dfa0: 0x6c738e20, 0x2dfa1: 0x6c9b8e20, 0x2dfa2: 0x6c9b9020, 0x2dfa3: 0x6c9b9220, + 0x2dfa4: 0x6c9b9420, 0x2dfa5: 0x6c9b9620, 0x2dfa6: 0x6c9b9820, 0x2dfa7: 0x6c9b9a20, + 0x2dfa8: 0x6c9b9c20, 0x2dfa9: 0x6c9b9e20, 0x2dfaa: 0x6cc78620, 0x2dfab: 0x6cc78820, + 0x2dfac: 0x6cc78a20, 0x2dfad: 0x6cc78c20, 0x2dfae: 0x6cc78e20, 0x2dfaf: 0x6cc79020, + 0x2dfb0: 0x6cc79220, 0x2dfb1: 0x6cc79420, 0x2dfb2: 0x6cc79620, 0x2dfb3: 0x6cc79820, + 0x2dfb4: 0x6cc79a20, 0x2dfb5: 0x6cc79c20, 0x2dfb6: 0x6cc79e20, 0x2dfb7: 0x6cc7a020, + 0x2dfb8: 0x6cf5d620, 0x2dfb9: 0x6cc7a220, 0x2dfba: 0x6cc7a420, 0x2dfbb: 0x6cc7a620, + 0x2dfbc: 0x6cc7a820, 0x2dfbd: 0x6cc7aa20, 0x2dfbe: 0x6cc7ac20, 0x2dfbf: 0x6cc7ae20, + // Block 0xb7f, offset 0x2dfc0 + 0x2dfc0: 0x6cc7b020, 0x2dfc1: 0x6cc7b220, 0x2dfc2: 0x6cc7b420, 0x2dfc3: 0x6cc7b620, + 0x2dfc4: 0x6cf5f020, 0x2dfc5: 0x6cf5f220, 0x2dfc6: 0x6cf5f420, 0x2dfc7: 0x6cf5f620, + 0x2dfc8: 0x6cf5f820, 0x2dfc9: 0x6cf5fa20, 0x2dfca: 0x6cf5fc20, 0x2dfcb: 0x6cf5fe20, + 0x2dfcc: 0x6cf60020, 0x2dfcd: 0x6cf60220, 0x2dfce: 0x6cf60420, 0x2dfcf: 0x6cf60620, + 0x2dfd0: 0x6cf60820, 0x2dfd1: 0x6cc7b820, 0x2dfd2: 0x6cf60a20, 0x2dfd3: 0x6cf60c20, + 0x2dfd4: 0x6cf60e20, 0x2dfd5: 0x6cf61020, 0x2dfd6: 0x6cf61220, 0x2dfd7: 0x6cf61420, + 0x2dfd8: 0x6cf61620, 0x2dfd9: 0x6cf61820, 0x2dfda: 0x6d257e20, 0x2dfdb: 0x6d258020, + 0x2dfdc: 0x6d258220, 0x2dfdd: 0x6d258420, 0x2dfde: 0x6d258620, 0x2dfdf: 0x6d258820, + 0x2dfe0: 0x6d258a20, 0x2dfe1: 0x6d258c20, 0x2dfe2: 0x6d258e20, 0x2dfe3: 0x6d259020, + 0x2dfe4: 0x6d259220, 0x2dfe5: 0x6d259420, 0x2dfe6: 0x6d259620, 0x2dfe7: 0x6d259820, + 0x2dfe8: 0x6d259a20, 0x2dfe9: 0x6d530020, 0x2dfea: 0x6d530220, 0x2dfeb: 0x6d530420, + 0x2dfec: 0x6d530620, 0x2dfed: 0x6d530820, 0x2dfee: 0x6d530a20, 0x2dfef: 0x6d530c20, + 0x2dff0: 0x6d530e20, 0x2dff1: 0x6d531020, 0x2dff2: 0x6d531220, 0x2dff3: 0x6d531420, + 0x2dff4: 0x6d531620, 0x2dff5: 0x6d531820, 0x2dff6: 0x6d531a20, 0x2dff7: 0x6d531c20, + 0x2dff8: 0x6d7e4420, 0x2dff9: 0x6d7e4620, 0x2dffa: 0x6d7e4820, 0x2dffb: 0x6d7e4a20, + 0x2dffc: 0x6d537220, 0x2dffd: 0x6d7e4c20, 0x2dffe: 0x6d7e4e20, 0x2dfff: 0x6d7e5020, + // Block 0xb80, offset 0x2e000 + 0x2e000: 0x6d7e5220, 0x2e001: 0x6d7e5420, 0x2e002: 0x6d7e5620, 0x2e003: 0x6d7e5820, + 0x2e004: 0x6d7e5a20, 0x2e005: 0x6d7e5c20, 0x2e006: 0x6d7e5e20, 0x2e007: 0x6d7e6020, + 0x2e008: 0x6d7e6220, 0x2e009: 0x6d7e6420, 0x2e00a: 0x6d7e6620, 0x2e00b: 0x6d7e6820, + 0x2e00c: 0x6d7e6a20, 0x2e00d: 0x6d7e6c20, 0x2e00e: 0x6da56420, 0x2e00f: 0x6d7ed220, + 0x2e010: 0x6da56620, 0x2e011: 0x6da56820, 0x2e012: 0x6da56a20, 0x2e013: 0x6da56c20, + 0x2e014: 0x6da56e20, 0x2e015: 0x6da57020, 0x2e016: 0x6da57220, 0x2e017: 0x6da57420, + 0x2e018: 0x6dc70620, 0x2e019: 0x6da5a820, 0x2e01a: 0x6da57620, 0x2e01b: 0x6dc70820, + 0x2e01c: 0x6dc70a20, 0x2e01d: 0x6de38820, 0x2e01e: 0x6de38a20, 0x2e01f: 0x6de38c20, + 0x2e020: 0x6de38e20, 0x2e021: 0x6de39020, 0x2e022: 0x6de39220, 0x2e023: 0x6dfae020, + 0x2e024: 0x6dfae220, 0x2e025: 0x6dfae420, 0x2e026: 0x6dfae620, 0x2e027: 0x6dfae820, + 0x2e028: 0x6dfaea20, 0x2e029: 0x6e0e4620, 0x2e02a: 0x6e293020, 0x2e02b: 0x6e293220, + 0x2e02c: 0x6e293420, 0x2e02d: 0x6e324a20, 0x2e02e: 0x6e324c20, 0x2e02f: 0x6e38a820, + 0x2e030: 0x6c049820, 0x2e031: 0x6c095e20, 0x2e032: 0x6c127020, 0x2e033: 0x6c127220, + 0x2e034: 0x6c219c20, 0x2e035: 0x6c219e20, 0x2e036: 0x6c364020, 0x2e037: 0x6c515c20, + 0x2e038: 0x6c739020, 0x2e039: 0x6c9c0a20, 0x2e03a: 0x6c739220, 0x2e03b: 0x6c73a820, + 0x2e03c: 0x6c9c0c20, 0x2e03d: 0x6c9ba020, 0x2e03e: 0x6cc84a20, 0x2e03f: 0x6cc84c20, + // Block 0xb81, offset 0x2e040 + 0x2e040: 0x6cb8f420, 0x2e041: 0x6cc84e20, 0x2e042: 0x6cc85020, 0x2e043: 0x6cf68820, + 0x2e044: 0x6d25f820, 0x2e045: 0x6d25fa20, 0x2e046: 0x6d7ed620, 0x2e047: 0x6e0e5820, + 0x2e048: 0x6c049c20, 0x2e049: 0x6c127420, 0x2e04a: 0x6c364c20, 0x2e04b: 0x6c364e20, + 0x2e04c: 0x6c365020, 0x2e04d: 0x6c365220, 0x2e04e: 0x6c516c20, 0x2e04f: 0x6c516e20, + 0x2e050: 0x6c517020, 0x2e051: 0x6c517220, 0x2e052: 0x6c73ae20, 0x2e053: 0x6c73b020, + 0x2e054: 0x6c73b220, 0x2e055: 0x6c73b420, 0x2e056: 0x6c9c1a20, 0x2e057: 0x6c73be20, + 0x2e058: 0x6c9c1c20, 0x2e059: 0x6c9c1e20, 0x2e05a: 0x6c9c2020, 0x2e05b: 0x6c9c2220, + 0x2e05c: 0x6cc85a20, 0x2e05d: 0x6cc85c20, 0x2e05e: 0x6cc85e20, 0x2e05f: 0x6cc86020, + 0x2e060: 0x6cf69420, 0x2e061: 0x6cf69620, 0x2e062: 0x6d260620, 0x2e063: 0x6d7ee620, + 0x2e064: 0x6d7ee820, 0x2e065: 0x6d7eea20, 0x2e066: 0x6dc74820, 0x2e067: 0x6dfb0220, + 0x2e068: 0x6c049e20, 0x2e069: 0x6c04a020, 0x2e06a: 0x6c096220, 0x2e06b: 0x6c096420, + 0x2e06c: 0x6c096620, 0x2e06d: 0x6c096820, 0x2e06e: 0x6c096a20, 0x2e06f: 0x6c096c20, + 0x2e070: 0x6c096e20, 0x2e071: 0x6c127c20, 0x2e072: 0x6c127e20, 0x2e073: 0x6c128020, + 0x2e074: 0x6c128220, 0x2e075: 0x6c128420, 0x2e076: 0x6c128620, 0x2e077: 0x6c128820, + 0x2e078: 0x6c128a20, 0x2e079: 0x6c128c20, 0x2e07a: 0x6c128e20, 0x2e07b: 0x6c129020, + 0x2e07c: 0x6c129220, 0x2e07d: 0x6c129420, 0x2e07e: 0x6c129620, 0x2e07f: 0x6c129820, + // Block 0xb82, offset 0x2e080 + 0x2e080: 0x6c129a20, 0x2e081: 0x6c129c20, 0x2e082: 0x6c129e20, 0x2e083: 0x6c12a020, + 0x2e084: 0x6c21ba20, 0x2e085: 0x6c21bc20, 0x2e086: 0x6c21be20, 0x2e087: 0x6c21c020, + 0x2e088: 0x6c21c220, 0x2e089: 0x6c21c420, 0x2e08a: 0x6c21c620, 0x2e08b: 0x6c21c820, + 0x2e08c: 0x6c21ca20, 0x2e08d: 0x6c21cc20, 0x2e08e: 0x6c21ce20, 0x2e08f: 0x6c21d020, + 0x2e090: 0x6c21d220, 0x2e091: 0x6c21d420, 0x2e092: 0x6c21d620, 0x2e093: 0x6c21d820, + 0x2e094: 0x6c21da20, 0x2e095: 0x6c21dc20, 0x2e096: 0x6c21de20, 0x2e097: 0x6c21e020, + 0x2e098: 0x6c21e220, 0x2e099: 0x6c21e420, 0x2e09a: 0x6c21e620, 0x2e09b: 0x6c21e820, + 0x2e09c: 0x6c21ea20, 0x2e09d: 0x6c21ec20, 0x2e09e: 0x6c21ee20, 0x2e09f: 0x6c21f020, + 0x2e0a0: 0x6c21f220, 0x2e0a1: 0x6c21f420, 0x2e0a2: 0x6c21f620, 0x2e0a3: 0x6c21f820, + 0x2e0a4: 0x6c21fa20, 0x2e0a5: 0x6c21fc20, 0x2e0a6: 0x6c21fe20, 0x2e0a7: 0x6c220020, + 0x2e0a8: 0x6c220220, 0x2e0a9: 0x6c220420, 0x2e0aa: 0x6c366c20, 0x2e0ab: 0x6c366e20, + 0x2e0ac: 0x6c367020, 0x2e0ad: 0x6c367220, 0x2e0ae: 0x6c367420, 0x2e0af: 0x6c367620, + 0x2e0b0: 0x6c367820, 0x2e0b1: 0x6c367a20, 0x2e0b2: 0x6c367c20, 0x2e0b3: 0x6c367e20, + 0x2e0b4: 0x6c368020, 0x2e0b5: 0x6c368220, 0x2e0b6: 0x6c368420, 0x2e0b7: 0x6c368620, + 0x2e0b8: 0x6c368820, 0x2e0b9: 0x6c368a20, 0x2e0ba: 0x6c368c20, 0x2e0bb: 0x6c368e20, + 0x2e0bc: 0x6c369020, 0x2e0bd: 0x6c369220, 0x2e0be: 0x6c369420, 0x2e0bf: 0x6c369620, + // Block 0xb83, offset 0x2e0c0 + 0x2e0c0: 0x6c369820, 0x2e0c1: 0x6c220620, 0x2e0c2: 0x6c369a20, 0x2e0c3: 0x6c369c20, + 0x2e0c4: 0x6c369e20, 0x2e0c5: 0x6c36a020, 0x2e0c6: 0x6c36a220, 0x2e0c7: 0x6c36a420, + 0x2e0c8: 0x6c36a620, 0x2e0c9: 0x6c36a820, 0x2e0ca: 0x6c36aa20, 0x2e0cb: 0x6c36ac20, + 0x2e0cc: 0x6c36ae20, 0x2e0cd: 0x6c36b020, 0x2e0ce: 0x6c36b220, 0x2e0cf: 0x6c36b420, + 0x2e0d0: 0x6c36b620, 0x2e0d1: 0x6c36b820, 0x2e0d2: 0x6c36ba20, 0x2e0d3: 0x6c36bc20, + 0x2e0d4: 0x6c36be20, 0x2e0d5: 0x6c36c020, 0x2e0d6: 0x6c36c220, 0x2e0d7: 0x6c36c420, + 0x2e0d8: 0x6c36c620, 0x2e0d9: 0x6c36c820, 0x2e0da: 0x6c36ca20, 0x2e0db: 0x6c36cc20, + 0x2e0dc: 0x6c36ce20, 0x2e0dd: 0x6c36d020, 0x2e0de: 0x6c36d220, 0x2e0df: 0x6c36d420, + 0x2e0e0: 0x6c36d620, 0x2e0e1: 0x6c36d820, 0x2e0e2: 0x6c36da20, 0x2e0e3: 0x6c36dc20, + 0x2e0e4: 0x6c36de20, 0x2e0e5: 0x6c36e020, 0x2e0e6: 0x6c36e220, 0x2e0e7: 0x6c36e420, + 0x2e0e8: 0x6c36e620, 0x2e0e9: 0x6c36e820, 0x2e0ea: 0x6c36ea20, 0x2e0eb: 0x6c36ec20, + 0x2e0ec: 0x6c36ee20, 0x2e0ed: 0x6c36f020, 0x2e0ee: 0x6c519420, 0x2e0ef: 0x6c519620, + 0x2e0f0: 0x6c519820, 0x2e0f1: 0x6c519a20, 0x2e0f2: 0x6c519c20, 0x2e0f3: 0x6c519e20, + 0x2e0f4: 0x6c51a020, 0x2e0f5: 0x6c51a220, 0x2e0f6: 0x6c51a420, 0x2e0f7: 0x6c51a620, + 0x2e0f8: 0x6c51a820, 0x2e0f9: 0x6c51aa20, 0x2e0fa: 0x6c51ac20, 0x2e0fb: 0x6c51ae20, + 0x2e0fc: 0x6c51b020, 0x2e0fd: 0x6c73c020, 0x2e0fe: 0x6c51b220, 0x2e0ff: 0x6c51b420, + // Block 0xb84, offset 0x2e100 + 0x2e100: 0x6c51b620, 0x2e101: 0x6c51b820, 0x2e102: 0x6c51ba20, 0x2e103: 0x6c51bc20, + 0x2e104: 0x6c51be20, 0x2e105: 0x6c51c020, 0x2e106: 0x6c51c220, 0x2e107: 0x6c51c420, + 0x2e108: 0x6c51c620, 0x2e109: 0x6c51c820, 0x2e10a: 0x6c51ca20, 0x2e10b: 0x6c51cc20, + 0x2e10c: 0x6c51ce20, 0x2e10d: 0x6c51d020, 0x2e10e: 0x6c51d220, 0x2e10f: 0x6c51d420, + 0x2e110: 0x6c51d620, 0x2e111: 0x6c51d820, 0x2e112: 0x6c51da20, 0x2e113: 0x6c51dc20, + 0x2e114: 0x6c51de20, 0x2e115: 0x6c51e020, 0x2e116: 0x6c51e220, 0x2e117: 0x6c51e420, + 0x2e118: 0x6c51e620, 0x2e119: 0x6c51e820, 0x2e11a: 0x6c51ea20, 0x2e11b: 0x6c51ec20, + 0x2e11c: 0x6c51ee20, 0x2e11d: 0x6c51f020, 0x2e11e: 0x6c51f220, 0x2e11f: 0x6c51f420, + 0x2e120: 0x6c51f620, 0x2e121: 0x6c73c220, 0x2e122: 0x6c51f820, 0x2e123: 0x6c51fa20, + 0x2e124: 0x6c51fc20, 0x2e125: 0x6c51fe20, 0x2e126: 0x6c520020, 0x2e127: 0x6c520220, + 0x2e128: 0x6c520420, 0x2e129: 0x6c520620, 0x2e12a: 0x6c520820, 0x2e12b: 0x6c520a20, + 0x2e12c: 0x6c520c20, 0x2e12d: 0x6c520e20, 0x2e12e: 0x6c521020, 0x2e12f: 0x6c521220, + 0x2e130: 0x6c521420, 0x2e131: 0x6c521620, 0x2e132: 0x6c521820, 0x2e133: 0x6c521a20, + 0x2e134: 0x6c73c420, 0x2e135: 0x6c521c20, 0x2e136: 0x6c521e20, 0x2e137: 0x6c522020, + 0x2e138: 0x6c522220, 0x2e139: 0x6c376420, 0x2e13a: 0x6c522420, 0x2e13b: 0x6c522620, + 0x2e13c: 0x6c522820, 0x2e13d: 0x6c522a20, 0x2e13e: 0x6c522c20, 0x2e13f: 0x6c522e20, + // Block 0xb85, offset 0x2e140 + 0x2e140: 0x6c523020, 0x2e141: 0x6c523220, 0x2e142: 0x6c523420, 0x2e143: 0x6c523620, + 0x2e144: 0x6c523820, 0x2e145: 0x6c523a20, 0x2e146: 0x6c523c20, 0x2e147: 0x6c523e20, + 0x2e148: 0x6c524020, 0x2e149: 0x6c524220, 0x2e14a: 0x6c524420, 0x2e14b: 0x6c524620, + 0x2e14c: 0x6c524820, 0x2e14d: 0x6c524a20, 0x2e14e: 0x6c524c20, 0x2e14f: 0x6c524e20, + 0x2e150: 0x6c525020, 0x2e151: 0x6c525220, 0x2e152: 0x6c73e620, 0x2e153: 0x6c73e820, + 0x2e154: 0x6c73ea20, 0x2e155: 0x6c73ec20, 0x2e156: 0x6c73ee20, 0x2e157: 0x6c73f020, + 0x2e158: 0x6c73f220, 0x2e159: 0x6c73f420, 0x2e15a: 0x6c73f620, 0x2e15b: 0x6c73f820, + 0x2e15c: 0x6c73fa20, 0x2e15d: 0x6c73fc20, 0x2e15e: 0x6c73fe20, 0x2e15f: 0x6c740020, + 0x2e160: 0x6c740220, 0x2e161: 0x6c740420, 0x2e162: 0x6c740620, 0x2e163: 0x6c740820, + 0x2e164: 0x6c740a20, 0x2e165: 0x6c740c20, 0x2e166: 0x6c740e20, 0x2e167: 0x6c741020, + 0x2e168: 0x6c741220, 0x2e169: 0x6c741420, 0x2e16a: 0x6c741620, 0x2e16b: 0x6c741820, + 0x2e16c: 0x6c741a20, 0x2e16d: 0x6c741c20, 0x2e16e: 0x6c741e20, 0x2e16f: 0x6c742020, + 0x2e170: 0x6c742220, 0x2e171: 0x6c742420, 0x2e172: 0x6c742620, 0x2e173: 0x6c742820, + 0x2e174: 0x6c742a20, 0x2e175: 0x6c742c20, 0x2e176: 0x6c742e20, 0x2e177: 0x6c743020, + 0x2e178: 0x6c743220, 0x2e179: 0x6c743420, 0x2e17a: 0x6c743620, 0x2e17b: 0x6c743820, + 0x2e17c: 0x6c743a20, 0x2e17d: 0x6c743c20, 0x2e17e: 0x6c743e20, 0x2e17f: 0x6c744020, + // Block 0xb86, offset 0x2e180 + 0x2e180: 0x6c744220, 0x2e181: 0x6c744420, 0x2e182: 0x6c744620, 0x2e183: 0x6c744820, + 0x2e184: 0x6c744a20, 0x2e185: 0x6c744c20, 0x2e186: 0x6c744e20, 0x2e187: 0x6c745020, + 0x2e188: 0x6c745220, 0x2e189: 0x6c745420, 0x2e18a: 0x6c745620, 0x2e18b: 0x6c745820, + 0x2e18c: 0x6c745a20, 0x2e18d: 0x6c745c20, 0x2e18e: 0x6c745e20, 0x2e18f: 0x6c746020, + 0x2e190: 0x6c746220, 0x2e191: 0x6c746420, 0x2e192: 0x6c52c020, 0x2e193: 0x6c746620, + 0x2e194: 0x6c746820, 0x2e195: 0x6c746a20, 0x2e196: 0x6c746c20, 0x2e197: 0x6c746e20, + 0x2e198: 0x6c747020, 0x2e199: 0x6c747220, 0x2e19a: 0x6c747420, 0x2e19b: 0x6c747620, + 0x2e19c: 0x6c747820, 0x2e19d: 0x6c747a20, 0x2e19e: 0x6c747c20, 0x2e19f: 0x6c747e20, + 0x2e1a0: 0x6c748020, 0x2e1a1: 0x6c748220, 0x2e1a2: 0x6c748420, 0x2e1a3: 0x6c748620, + 0x2e1a4: 0x6c748820, 0x2e1a5: 0x6c748a20, 0x2e1a6: 0x6c748c20, 0x2e1a7: 0x6c748e20, + 0x2e1a8: 0x6c749020, 0x2e1a9: 0x6c749220, 0x2e1aa: 0x6c749420, 0x2e1ab: 0x6c9c5420, + 0x2e1ac: 0x6c9c5620, 0x2e1ad: 0x6c9c5820, 0x2e1ae: 0x6c9c5a20, 0x2e1af: 0x6c9c5c20, + 0x2e1b0: 0x6c9c5e20, 0x2e1b1: 0x6c9c6020, 0x2e1b2: 0x6c9c6220, 0x2e1b3: 0x6c9c6420, + 0x2e1b4: 0x6c9c6620, 0x2e1b5: 0x6c9c6820, 0x2e1b6: 0x6c9c6a20, 0x2e1b7: 0x6c9c6c20, + 0x2e1b8: 0x6c9c6e20, 0x2e1b9: 0x6c9c7020, 0x2e1ba: 0x6c9c7220, 0x2e1bb: 0x6c9c7420, + 0x2e1bc: 0x6c9c7620, 0x2e1bd: 0x6c9c7820, 0x2e1be: 0x6c9c7a20, 0x2e1bf: 0x6c9c7c20, + // Block 0xb87, offset 0x2e1c0 + 0x2e1c0: 0x6c9c7e20, 0x2e1c1: 0x6c9c8020, 0x2e1c2: 0x6c9c8220, 0x2e1c3: 0x6c9c8420, + 0x2e1c4: 0x6c9c8620, 0x2e1c5: 0x6c9c8820, 0x2e1c6: 0x6c9c8a20, 0x2e1c7: 0x6c9c8c20, + 0x2e1c8: 0x6c9c8e20, 0x2e1c9: 0x6c9c9020, 0x2e1ca: 0x6c9c9220, 0x2e1cb: 0x6c9c9420, + 0x2e1cc: 0x6c9c9620, 0x2e1cd: 0x6c9c9820, 0x2e1ce: 0x6c9c9a20, 0x2e1cf: 0x6c9c9c20, + 0x2e1d0: 0x6c9c9e20, 0x2e1d1: 0x6c9ca020, 0x2e1d2: 0x6c9ca220, 0x2e1d3: 0x6c9ca420, + 0x2e1d4: 0x6c9ca620, 0x2e1d5: 0x6c9ca820, 0x2e1d6: 0x6c9caa20, 0x2e1d7: 0x6c9cac20, + 0x2e1d8: 0x6c9cae20, 0x2e1d9: 0x6c9cb020, 0x2e1da: 0x6c9cb220, 0x2e1db: 0x6c9cb420, + 0x2e1dc: 0x6c9cb620, 0x2e1dd: 0x6c9cb820, 0x2e1de: 0x6c9cba20, 0x2e1df: 0x6c9cbc20, + 0x2e1e0: 0x6c9cbe20, 0x2e1e1: 0x6c9cc020, 0x2e1e2: 0x6c9cc220, 0x2e1e3: 0x6c9cc420, + 0x2e1e4: 0x6c9cc620, 0x2e1e5: 0x6c9cc820, 0x2e1e6: 0x6c9cca20, 0x2e1e7: 0x6c9ccc20, + 0x2e1e8: 0x6c9cce20, 0x2e1e9: 0x6c9cd020, 0x2e1ea: 0x6c9cd220, 0x2e1eb: 0x6c9cd420, + 0x2e1ec: 0x6c9cd620, 0x2e1ed: 0x6c9cd820, 0x2e1ee: 0x6c9cda20, 0x2e1ef: 0x6c9cdc20, + 0x2e1f0: 0x6c9cde20, 0x2e1f1: 0x6c9ce020, 0x2e1f2: 0x6c9ce220, 0x2e1f3: 0x6c9ce420, + 0x2e1f4: 0x6cc88420, 0x2e1f5: 0x6c9ce620, 0x2e1f6: 0x6c9ce820, 0x2e1f7: 0x6c9cea20, + 0x2e1f8: 0x6c9cec20, 0x2e1f9: 0x6c9cee20, 0x2e1fa: 0x6c9cf020, 0x2e1fb: 0x6c9cf220, + 0x2e1fc: 0x6c9cf420, 0x2e1fd: 0x6c9cf620, 0x2e1fe: 0x6c9cf820, 0x2e1ff: 0x6c9cfa20, + // Block 0xb88, offset 0x2e200 + 0x2e200: 0x6c9cfc20, 0x2e201: 0x6c9cfe20, 0x2e202: 0x6c9d0020, 0x2e203: 0x6cc8ae20, + 0x2e204: 0x6cc8b020, 0x2e205: 0x6cc8b220, 0x2e206: 0x6cc8b420, 0x2e207: 0x6cc8b620, + 0x2e208: 0x6cc8b820, 0x2e209: 0x6cc8ba20, 0x2e20a: 0x6cc8bc20, 0x2e20b: 0x6cc8be20, + 0x2e20c: 0x6cc8c020, 0x2e20d: 0x6cc8c220, 0x2e20e: 0x6cc8c420, 0x2e20f: 0x6cc8c620, + 0x2e210: 0x6cc8c820, 0x2e211: 0x6cc8ca20, 0x2e212: 0x6cc8cc20, 0x2e213: 0x6cc8ce20, + 0x2e214: 0x6cc8d020, 0x2e215: 0x6cc8d220, 0x2e216: 0x6cc8d420, 0x2e217: 0x6cc8d620, + 0x2e218: 0x6cc8d820, 0x2e219: 0x6cc8da20, 0x2e21a: 0x6cc8dc20, 0x2e21b: 0x6cc8de20, + 0x2e21c: 0x6cc8e020, 0x2e21d: 0x6cc8e220, 0x2e21e: 0x6cc8e420, 0x2e21f: 0x6cc8e620, + 0x2e220: 0x6cc8e820, 0x2e221: 0x6cc8ea20, 0x2e222: 0x6cc8ec20, 0x2e223: 0x6cc8ee20, + 0x2e224: 0x6cc8f020, 0x2e225: 0x6cc8f220, 0x2e226: 0x6cc8f420, 0x2e227: 0x6cc8f620, + 0x2e228: 0x6cc8f820, 0x2e229: 0x6cc8fa20, 0x2e22a: 0x6cc8fc20, 0x2e22b: 0x6cc8fe20, + 0x2e22c: 0x6cc90020, 0x2e22d: 0x6cc90220, 0x2e22e: 0x6cc90420, 0x2e22f: 0x6cc90620, + 0x2e230: 0x6cc90820, 0x2e231: 0x6cc90a20, 0x2e232: 0x6cc90c20, 0x2e233: 0x6cc90e20, + 0x2e234: 0x6cc91020, 0x2e235: 0x6cc91220, 0x2e236: 0x6cc91420, 0x2e237: 0x6cc91620, + 0x2e238: 0x6cc91820, 0x2e239: 0x6cc91a20, 0x2e23a: 0x6cc91c20, 0x2e23b: 0x6cc91e20, + 0x2e23c: 0x6cc92020, 0x2e23d: 0x6cc92220, 0x2e23e: 0x6cc92420, 0x2e23f: 0x6cc92620, + // Block 0xb89, offset 0x2e240 + 0x2e240: 0x6cc92820, 0x2e241: 0x6cc92a20, 0x2e242: 0x6cc92c20, 0x2e243: 0x6cc92e20, + 0x2e244: 0x6cc93020, 0x2e245: 0x6cc93220, 0x2e246: 0x6cc93420, 0x2e247: 0x6cc93620, + 0x2e248: 0x6cc93820, 0x2e249: 0x6cc93a20, 0x2e24a: 0x6cc93c20, 0x2e24b: 0x6cc93e20, + 0x2e24c: 0x6cc94020, 0x2e24d: 0x6cc94220, 0x2e24e: 0x6cc94420, 0x2e24f: 0x6cc94620, + 0x2e250: 0x6cc94820, 0x2e251: 0x6cc94a20, 0x2e252: 0x6cc94c20, 0x2e253: 0x6cc94e20, + 0x2e254: 0x6cc95020, 0x2e255: 0x6cc95220, 0x2e256: 0x6cc95420, 0x2e257: 0x6cc95620, + 0x2e258: 0x6cc95820, 0x2e259: 0x6cc95a20, 0x2e25a: 0x6cc95c20, 0x2e25b: 0x6cc95e20, + 0x2e25c: 0x6cc96020, 0x2e25d: 0x6cc96220, 0x2e25e: 0x6cc96420, 0x2e25f: 0x6cc96620, + 0x2e260: 0x6cc96820, 0x2e261: 0x6cc96a20, 0x2e262: 0x6cc96c20, 0x2e263: 0x6cc96e20, + 0x2e264: 0x6cc97020, 0x2e265: 0x6cc97220, 0x2e266: 0x6cc97420, 0x2e267: 0x6cc97620, + 0x2e268: 0x6cc97820, 0x2e269: 0x6cc97a20, 0x2e26a: 0x6cc97c20, 0x2e26b: 0x6cc97e20, + 0x2e26c: 0x6cc98020, 0x2e26d: 0x6cc98220, 0x2e26e: 0x6cc98420, 0x2e26f: 0x6cf6e220, + 0x2e270: 0x6cf6e420, 0x2e271: 0x6cf6e620, 0x2e272: 0x6cf6e820, 0x2e273: 0x6cf6ea20, + 0x2e274: 0x6cf6ec20, 0x2e275: 0x6cf6ee20, 0x2e276: 0x6cf6f020, 0x2e277: 0x6cf6f220, + 0x2e278: 0x6cf6f420, 0x2e279: 0x6cf6f620, 0x2e27a: 0x6cf6f820, 0x2e27b: 0x6cf6fa20, + 0x2e27c: 0x6cf6fc20, 0x2e27d: 0x6cf6fe20, 0x2e27e: 0x6cf70020, 0x2e27f: 0x6cf70220, + // Block 0xb8a, offset 0x2e280 + 0x2e280: 0x6cf70420, 0x2e281: 0x6cf70620, 0x2e282: 0x6cf70820, 0x2e283: 0x6cf70a20, + 0x2e284: 0x6cf70c20, 0x2e285: 0x6cf70e20, 0x2e286: 0x6cf71020, 0x2e287: 0x6cf71220, + 0x2e288: 0x6cf71420, 0x2e289: 0x6cf71620, 0x2e28a: 0x6cf71820, 0x2e28b: 0x6cf71a20, + 0x2e28c: 0x6cf71c20, 0x2e28d: 0x6cf71e20, 0x2e28e: 0x6cf72020, 0x2e28f: 0x6cf72220, + 0x2e290: 0x6cf72420, 0x2e291: 0x6cf72620, 0x2e292: 0x6cf72820, 0x2e293: 0x6cf72a20, + 0x2e294: 0x6cf72c20, 0x2e295: 0x6cf72e20, 0x2e296: 0x6c9da420, 0x2e297: 0x6cf73020, + 0x2e298: 0x6cf73220, 0x2e299: 0x6cf73420, 0x2e29a: 0x6cf73620, 0x2e29b: 0x6cf73820, + 0x2e29c: 0x6cf73a20, 0x2e29d: 0x6cf73c20, 0x2e29e: 0x6cf73e20, 0x2e29f: 0x6cf74020, + 0x2e2a0: 0x6cf74220, 0x2e2a1: 0x6cf74420, 0x2e2a2: 0x6cf74620, 0x2e2a3: 0x6cf74820, + 0x2e2a4: 0x6cf74a20, 0x2e2a5: 0x6cf74c20, 0x2e2a6: 0x6cf74e20, 0x2e2a7: 0x6cf75020, + 0x2e2a8: 0x6cf75220, 0x2e2a9: 0x6cf75420, 0x2e2aa: 0x6cf75620, 0x2e2ab: 0x6cf75820, + 0x2e2ac: 0x6cf75a20, 0x2e2ad: 0x6cf75c20, 0x2e2ae: 0x6cca8820, 0x2e2af: 0x6cf75e20, + 0x2e2b0: 0x6cca8a20, 0x2e2b1: 0x6cf76020, 0x2e2b2: 0x6cf76220, 0x2e2b3: 0x6cf76420, + 0x2e2b4: 0x6cf76620, 0x2e2b5: 0x6cf76820, 0x2e2b6: 0x6cf76a20, 0x2e2b7: 0x6cf76c20, + 0x2e2b8: 0x6cf76e20, 0x2e2b9: 0x6cf77020, 0x2e2ba: 0x6cf77220, 0x2e2bb: 0x6cf77420, + 0x2e2bc: 0x6cf77620, 0x2e2bd: 0x6cf77820, 0x2e2be: 0x6cf77a20, 0x2e2bf: 0x6cf77c20, + // Block 0xb8b, offset 0x2e2c0 + 0x2e2c0: 0x6cf77e20, 0x2e2c1: 0x6cf78020, 0x2e2c2: 0x6cf78220, 0x2e2c3: 0x6cf78420, + 0x2e2c4: 0x6cf78620, 0x2e2c5: 0x6cf78820, 0x2e2c6: 0x6cf78a20, 0x2e2c7: 0x6cf78c20, + 0x2e2c8: 0x6cf78e20, 0x2e2c9: 0x6cf79020, 0x2e2ca: 0x6d264e20, 0x2e2cb: 0x6cf79220, + 0x2e2cc: 0x6cf79420, 0x2e2cd: 0x6d265020, 0x2e2ce: 0x6d265220, 0x2e2cf: 0x6d265420, + 0x2e2d0: 0x6d265620, 0x2e2d1: 0x6d265820, 0x2e2d2: 0x6d265a20, 0x2e2d3: 0x6d265c20, + 0x2e2d4: 0x6cf79620, 0x2e2d5: 0x6d265e20, 0x2e2d6: 0x6d266020, 0x2e2d7: 0x6d266220, + 0x2e2d8: 0x6cf79820, 0x2e2d9: 0x6d266420, 0x2e2da: 0x6d266620, 0x2e2db: 0x6d266820, + 0x2e2dc: 0x6d266a20, 0x2e2dd: 0x6d266c20, 0x2e2de: 0x6d266e20, 0x2e2df: 0x6d267020, + 0x2e2e0: 0x6d267220, 0x2e2e1: 0x6d267420, 0x2e2e2: 0x6d267620, 0x2e2e3: 0x6d267820, + 0x2e2e4: 0x6d267a20, 0x2e2e5: 0x6d267c20, 0x2e2e6: 0x6d267e20, 0x2e2e7: 0x6d268020, + 0x2e2e8: 0x6d268220, 0x2e2e9: 0x6d268420, 0x2e2ea: 0x6d268620, 0x2e2eb: 0x6d268820, + 0x2e2ec: 0x6d268a20, 0x2e2ed: 0x6d268c20, 0x2e2ee: 0x6d268e20, 0x2e2ef: 0x6d269020, + 0x2e2f0: 0x6d269220, 0x2e2f1: 0x6d269420, 0x2e2f2: 0x6d269620, 0x2e2f3: 0x6d269820, + 0x2e2f4: 0x6d269a20, 0x2e2f5: 0x6d269c20, 0x2e2f6: 0x6d269e20, 0x2e2f7: 0x6d26a020, + 0x2e2f8: 0x6d26a220, 0x2e2f9: 0x6d26a420, 0x2e2fa: 0x6d26a620, 0x2e2fb: 0x6d26a820, + 0x2e2fc: 0x6d26aa20, 0x2e2fd: 0x6d26ac20, 0x2e2fe: 0x6d26ae20, 0x2e2ff: 0x6d26b020, + // Block 0xb8c, offset 0x2e300 + 0x2e300: 0x6d26b220, 0x2e301: 0x6d26b420, 0x2e302: 0x6d26b620, 0x2e303: 0x6d26b820, + 0x2e304: 0x6d26ba20, 0x2e305: 0x6d26bc20, 0x2e306: 0x6d26be20, 0x2e307: 0x6d26c020, + 0x2e308: 0x6d26c220, 0x2e309: 0x6d26c420, 0x2e30a: 0x6d26c620, 0x2e30b: 0x6d26c820, + 0x2e30c: 0x6d26ca20, 0x2e30d: 0x6d26cc20, 0x2e30e: 0x6d26ce20, 0x2e30f: 0x6d26d020, + 0x2e310: 0x6d26d220, 0x2e311: 0x6d26d420, 0x2e312: 0x6d26d620, 0x2e313: 0x6d26d820, + 0x2e314: 0x6d26da20, 0x2e315: 0x6d26dc20, 0x2e316: 0x6d26de20, 0x2e317: 0x6d26e020, + 0x2e318: 0x6d26e220, 0x2e319: 0x6d26e420, 0x2e31a: 0x6d26e620, 0x2e31b: 0x6d26e820, + 0x2e31c: 0x6d26ea20, 0x2e31d: 0x6d26ec20, 0x2e31e: 0x6d26ee20, 0x2e31f: 0x6d26f020, + 0x2e320: 0x6d26f220, 0x2e321: 0x6d26f420, 0x2e322: 0x6d53c820, 0x2e323: 0x6d53ca20, + 0x2e324: 0x6d53cc20, 0x2e325: 0x6d53ce20, 0x2e326: 0x6d53d020, 0x2e327: 0x6d53d220, + 0x2e328: 0x6d53d420, 0x2e329: 0x6d539c20, 0x2e32a: 0x6d53d620, 0x2e32b: 0x6d53d820, + 0x2e32c: 0x6d53da20, 0x2e32d: 0x6d53dc20, 0x2e32e: 0x6d53de20, 0x2e32f: 0x6d53e020, + 0x2e330: 0x6d53e220, 0x2e331: 0x6d53e420, 0x2e332: 0x6d53e620, 0x2e333: 0x6d53e820, + 0x2e334: 0x6d53ea20, 0x2e335: 0x6d53ec20, 0x2e336: 0x6d53ee20, 0x2e337: 0x6d53f020, + 0x2e338: 0x6d53f220, 0x2e339: 0x6d53f420, 0x2e33a: 0x6d53f620, 0x2e33b: 0x6d53f820, + 0x2e33c: 0x6d53fa20, 0x2e33d: 0x6d53fc20, 0x2e33e: 0x6d53fe20, 0x2e33f: 0x6d540020, + // Block 0xb8d, offset 0x2e340 + 0x2e340: 0x6d540220, 0x2e341: 0x6d540420, 0x2e342: 0x6d540620, 0x2e343: 0x6d280020, + 0x2e344: 0x6d540820, 0x2e345: 0x6d540a20, 0x2e346: 0x6d540c20, 0x2e347: 0x6d540e20, + 0x2e348: 0x6d541020, 0x2e349: 0x6d541220, 0x2e34a: 0x6d541420, 0x2e34b: 0x6d541620, + 0x2e34c: 0x6d541820, 0x2e34d: 0x6d541a20, 0x2e34e: 0x6d541c20, 0x2e34f: 0x6d541e20, + 0x2e350: 0x6d542020, 0x2e351: 0x6d542220, 0x2e352: 0x6d542420, 0x2e353: 0x6d542620, + 0x2e354: 0x6d542820, 0x2e355: 0x6d542a20, 0x2e356: 0x6d542c20, 0x2e357: 0x6d542e20, + 0x2e358: 0x6d543020, 0x2e359: 0x6d543220, 0x2e35a: 0x6d543420, 0x2e35b: 0x6d543620, + 0x2e35c: 0x6d543820, 0x2e35d: 0x6d543a20, 0x2e35e: 0x6d543c20, 0x2e35f: 0x6d543e20, + 0x2e360: 0x6d544020, 0x2e361: 0x6d544220, 0x2e362: 0x6d544420, 0x2e363: 0x6d544620, + 0x2e364: 0x6d544820, 0x2e365: 0x6d544a20, 0x2e366: 0x6d544c20, 0x2e367: 0x6d544e20, + 0x2e368: 0x6d7efe20, 0x2e369: 0x6d545020, 0x2e36a: 0x6d545220, 0x2e36b: 0x6d545420, + 0x2e36c: 0x6d545620, 0x2e36d: 0x6d545820, 0x2e36e: 0x6d26f620, 0x2e36f: 0x6d545a20, + 0x2e370: 0x6d545c20, 0x2e371: 0x6d545e20, 0x2e372: 0x6d7f3020, 0x2e373: 0x6d7f3220, + 0x2e374: 0x6d7f3420, 0x2e375: 0x6d7f3620, 0x2e376: 0x6d7f3820, 0x2e377: 0x6d7f3a20, + 0x2e378: 0x6d7f3c20, 0x2e379: 0x6d7f3e20, 0x2e37a: 0x6d7f4020, 0x2e37b: 0x6d7f4220, + 0x2e37c: 0x6d7f4420, 0x2e37d: 0x6d7f4620, 0x2e37e: 0x6d7f4820, 0x2e37f: 0x6d7f4a20, + // Block 0xb8e, offset 0x2e380 + 0x2e380: 0x6d7f4c20, 0x2e381: 0x6d7f4e20, 0x2e382: 0x6d7f5020, 0x2e383: 0x6d7f5220, + 0x2e384: 0x6d7f5420, 0x2e385: 0x6d7f5620, 0x2e386: 0x6d7f5820, 0x2e387: 0x6d7f5a20, + 0x2e388: 0x6d7f5c20, 0x2e389: 0x6d7f5e20, 0x2e38a: 0x6d7f6020, 0x2e38b: 0x6d7f6220, + 0x2e38c: 0x6d7f6420, 0x2e38d: 0x6d7f6620, 0x2e38e: 0x6d7f6820, 0x2e38f: 0x6d7f6a20, + 0x2e390: 0x6d7f6c20, 0x2e391: 0x6d7f6e20, 0x2e392: 0x6d7f7020, 0x2e393: 0x6d7f7220, + 0x2e394: 0x6d7f7420, 0x2e395: 0x6d7f7620, 0x2e396: 0x6d7f7820, 0x2e397: 0x6d7f7a20, + 0x2e398: 0x6d7f7c20, 0x2e399: 0x6d7f7e20, 0x2e39a: 0x6d7f8020, 0x2e39b: 0x6d7f8220, + 0x2e39c: 0x6d7f8420, 0x2e39d: 0x6d7f8620, 0x2e39e: 0x6d7f8820, 0x2e39f: 0x6d7f8a20, + 0x2e3a0: 0x6d7f8c20, 0x2e3a1: 0x6d7f8e20, 0x2e3a2: 0x6d7f9020, 0x2e3a3: 0x6d7f9220, + 0x2e3a4: 0x6d7f9420, 0x2e3a5: 0x6d546020, 0x2e3a6: 0x6d7f9620, 0x2e3a7: 0x6d7f9820, + 0x2e3a8: 0x6d7f9a20, 0x2e3a9: 0x6d7f9c20, 0x2e3aa: 0x6d7f9e20, 0x2e3ab: 0x6d7fa020, + 0x2e3ac: 0x6d7fa220, 0x2e3ad: 0x6d7fa420, 0x2e3ae: 0x6d7fa620, 0x2e3af: 0x6d7fa820, + 0x2e3b0: 0x6d7faa20, 0x2e3b1: 0x6d7fac20, 0x2e3b2: 0x6d7fae20, 0x2e3b3: 0x6d7fb020, + 0x2e3b4: 0x6d7f0020, 0x2e3b5: 0x6d7fb220, 0x2e3b6: 0x6d7fb420, 0x2e3b7: 0x6d7fb620, + 0x2e3b8: 0x6d7fb820, 0x2e3b9: 0x6d7fba20, 0x2e3ba: 0x6d7fbc20, 0x2e3bb: 0x6d7fbe20, + 0x2e3bc: 0x6d7fc020, 0x2e3bd: 0x6da5dc20, 0x2e3be: 0x6da5de20, 0x2e3bf: 0x6da5e020, + // Block 0xb8f, offset 0x2e3c0 + 0x2e3c0: 0x6da5e220, 0x2e3c1: 0x6da5e420, 0x2e3c2: 0x6da5e620, 0x2e3c3: 0x6da5e820, + 0x2e3c4: 0x6da5ea20, 0x2e3c5: 0x6da5ec20, 0x2e3c6: 0x6da5ee20, 0x2e3c7: 0x6da5f020, + 0x2e3c8: 0x6da5f220, 0x2e3c9: 0x6da5f420, 0x2e3ca: 0x6da5f620, 0x2e3cb: 0x6da5f820, + 0x2e3cc: 0x6da5fa20, 0x2e3cd: 0x6da5fc20, 0x2e3ce: 0x6da5fe20, 0x2e3cf: 0x6da60020, + 0x2e3d0: 0x6da60220, 0x2e3d1: 0x6da60420, 0x2e3d2: 0x6da60620, 0x2e3d3: 0x6da60820, + 0x2e3d4: 0x6da60a20, 0x2e3d5: 0x6da60c20, 0x2e3d6: 0x6da60e20, 0x2e3d7: 0x6da61020, + 0x2e3d8: 0x6da61220, 0x2e3d9: 0x6da61420, 0x2e3da: 0x6da61620, 0x2e3db: 0x6da61820, + 0x2e3dc: 0x6da61a20, 0x2e3dd: 0x6da61c20, 0x2e3de: 0x6da61e20, 0x2e3df: 0x6da62020, + 0x2e3e0: 0x6da62220, 0x2e3e1: 0x6da62420, 0x2e3e2: 0x6da62620, 0x2e3e3: 0x6da62820, + 0x2e3e4: 0x6da62a20, 0x2e3e5: 0x6da62c20, 0x2e3e6: 0x6da62e20, 0x2e3e7: 0x6da63020, + 0x2e3e8: 0x6da63220, 0x2e3e9: 0x6da63420, 0x2e3ea: 0x6da63620, 0x2e3eb: 0x6dc76220, + 0x2e3ec: 0x6dc76420, 0x2e3ed: 0x6dc76620, 0x2e3ee: 0x6dc76820, 0x2e3ef: 0x6dc76a20, + 0x2e3f0: 0x6dc76c20, 0x2e3f1: 0x6dc76e20, 0x2e3f2: 0x6dc77020, 0x2e3f3: 0x6dc77220, + 0x2e3f4: 0x6dc77420, 0x2e3f5: 0x6dc77620, 0x2e3f6: 0x6dc77820, 0x2e3f7: 0x6dc77a20, + 0x2e3f8: 0x6dc77c20, 0x2e3f9: 0x6dc77e20, 0x2e3fa: 0x6dc78020, 0x2e3fb: 0x6dc78220, + 0x2e3fc: 0x6dc78420, 0x2e3fd: 0x6dc78620, 0x2e3fe: 0x6dc78820, 0x2e3ff: 0x6dc78a20, + // Block 0xb90, offset 0x2e400 + 0x2e400: 0x6dc78c20, 0x2e401: 0x6dc78e20, 0x2e402: 0x6dc79020, 0x2e403: 0x6dc79220, + 0x2e404: 0x6dc79420, 0x2e405: 0x6dc79620, 0x2e406: 0x6dc79820, 0x2e407: 0x6dc79a20, + 0x2e408: 0x6dc79c20, 0x2e409: 0x6dc79e20, 0x2e40a: 0x6dc7a020, 0x2e40b: 0x6de3ca20, + 0x2e40c: 0x6de3cc20, 0x2e40d: 0x6de3ce20, 0x2e40e: 0x6de3d020, 0x2e40f: 0x6de3d220, + 0x2e410: 0x6de3d420, 0x2e411: 0x6de3d620, 0x2e412: 0x6de3d820, 0x2e413: 0x6de3da20, + 0x2e414: 0x6de3dc20, 0x2e415: 0x6de3de20, 0x2e416: 0x6de3e020, 0x2e417: 0x6de3e220, + 0x2e418: 0x6de3e420, 0x2e419: 0x6de3e620, 0x2e41a: 0x6de3e820, 0x2e41b: 0x6da6f220, + 0x2e41c: 0x6de3ea20, 0x2e41d: 0x6de3ec20, 0x2e41e: 0x6de3ee20, 0x2e41f: 0x6de3f020, + 0x2e420: 0x6de3f220, 0x2e421: 0x6dc84c20, 0x2e422: 0x6de3f420, 0x2e423: 0x6de3f620, + 0x2e424: 0x6de3f820, 0x2e425: 0x6de3fa20, 0x2e426: 0x6de3fc20, 0x2e427: 0x6de47820, + 0x2e428: 0x6dfb2020, 0x2e429: 0x6dfb2220, 0x2e42a: 0x6dfb2420, 0x2e42b: 0x6de3fe20, + 0x2e42c: 0x6dfb2620, 0x2e42d: 0x6dc84e20, 0x2e42e: 0x6dfb2820, 0x2e42f: 0x6dfb2a20, + 0x2e430: 0x6dfb2c20, 0x2e431: 0x6dfb2e20, 0x2e432: 0x6dfb3020, 0x2e433: 0x6dfb3220, + 0x2e434: 0x6dfb3420, 0x2e435: 0x6dfb3620, 0x2e436: 0x6dfb3820, 0x2e437: 0x6e1db620, + 0x2e438: 0x6e0e6220, 0x2e439: 0x6dfb9820, 0x2e43a: 0x6e0e6420, 0x2e43b: 0x6e0e6620, + 0x2e43c: 0x6e0e6820, 0x2e43d: 0x6e0e6a20, 0x2e43e: 0x6e0e6c20, 0x2e43f: 0x6e0e6e20, + // Block 0xb91, offset 0x2e440 + 0x2e440: 0x6e0e7020, 0x2e441: 0x6e0e7220, 0x2e442: 0x6e0e7420, 0x2e443: 0x6e0e7620, + 0x2e444: 0x6e0e7820, 0x2e445: 0x6e0e7a20, 0x2e446: 0x6e1db820, 0x2e447: 0x6e1dba20, + 0x2e448: 0x6e1dbc20, 0x2e449: 0x6e1dbe20, 0x2e44a: 0x6e1dc020, 0x2e44b: 0x6e1dc220, + 0x2e44c: 0x6e0e7c20, 0x2e44d: 0x6e1dc420, 0x2e44e: 0x6e1dc620, 0x2e44f: 0x6e294220, + 0x2e450: 0x6e294420, 0x2e451: 0x6e294620, 0x2e452: 0x6e294820, 0x2e453: 0x6e325e20, + 0x2e454: 0x6e326020, 0x2e455: 0x6e326220, 0x2e456: 0x6e38b020, 0x2e457: 0x6e38b220, + 0x2e458: 0x6e38b420, 0x2e459: 0x6e38b620, 0x2e45a: 0x6e38b820, 0x2e45b: 0x6e38ba20, + 0x2e45c: 0x6e3d3020, 0x2e45d: 0x6e38d420, 0x2e45e: 0x6e42a620, 0x2e45f: 0x6e42a820, + 0x2e460: 0x6c04a620, 0x2e461: 0x6c12b420, 0x2e462: 0x6c12b620, 0x2e463: 0x6c376e20, + 0x2e464: 0x6c223c20, 0x2e465: 0x6c377020, 0x2e466: 0x6c377220, 0x2e467: 0x6c377420, + 0x2e468: 0x6c52ce20, 0x2e469: 0x6c52d020, 0x2e46a: 0x6c52d220, 0x2e46b: 0x6c755220, + 0x2e46c: 0x6c755420, 0x2e46d: 0x6c755620, 0x2e46e: 0x6c755820, 0x2e46f: 0x6c755a20, + 0x2e470: 0x6c755c20, 0x2e471: 0x6c755e20, 0x2e472: 0x6c9dae20, 0x2e473: 0x6c9db020, + 0x2e474: 0x6c758620, 0x2e475: 0x6c9db220, 0x2e476: 0x6c9db420, 0x2e477: 0x6c9db620, + 0x2e478: 0x6c9db820, 0x2e479: 0x6cca9820, 0x2e47a: 0x6cca9a20, 0x2e47b: 0x6cca9c20, + 0x2e47c: 0x6cca9e20, 0x2e47d: 0x6ccaa020, 0x2e47e: 0x6ccaa220, 0x2e47f: 0x6ccaa420, + // Block 0xb92, offset 0x2e480 + 0x2e480: 0x6cf8c820, 0x2e481: 0x6cf8ca20, 0x2e482: 0x6cf8cc20, 0x2e483: 0x6cf8ce20, + 0x2e484: 0x6cf8d020, 0x2e485: 0x6cf8d220, 0x2e486: 0x6cf8d420, 0x2e487: 0x6cf8d620, + 0x2e488: 0x6cf8d820, 0x2e489: 0x6d280820, 0x2e48a: 0x6d280a20, 0x2e48b: 0x6d280c20, + 0x2e48c: 0x6d280e20, 0x2e48d: 0x6d281020, 0x2e48e: 0x6d555620, 0x2e48f: 0x6d555820, + 0x2e490: 0x6d555a20, 0x2e491: 0x6d555c20, 0x2e492: 0x6d555e20, 0x2e493: 0x6d556020, + 0x2e494: 0x6d80d420, 0x2e495: 0x6d80d620, 0x2e496: 0x6d80d820, 0x2e497: 0x6d80da20, + 0x2e498: 0x6d80dc20, 0x2e499: 0x6d80de20, 0x2e49a: 0x6d80e020, 0x2e49b: 0x6da6fc20, + 0x2e49c: 0x6da6fe20, 0x2e49d: 0x6da70020, 0x2e49e: 0x6dc85020, 0x2e49f: 0x6dc85220, + 0x2e4a0: 0x6de47c20, 0x2e4a1: 0x6e1e0e20, 0x2e4a2: 0x6c04a820, 0x2e4a3: 0x6c097620, + 0x2e4a4: 0x6c12bc20, 0x2e4a5: 0x6c225220, 0x2e4a6: 0x6c379420, 0x2e4a7: 0x6c379620, + 0x2e4a8: 0x6c379820, 0x2e4a9: 0x6c379a20, 0x2e4aa: 0x6c52fe20, 0x2e4ab: 0x6c530020, + 0x2e4ac: 0x6c758820, 0x2e4ad: 0x6c758a20, 0x2e4ae: 0x6ccad620, 0x2e4af: 0x6ccad820, + 0x2e4b0: 0x6d284020, 0x2e4b1: 0x6cf90620, 0x2e4b2: 0x6cf90820, 0x2e4b3: 0x6cf90a20, + 0x2e4b4: 0x6d284420, 0x2e4b5: 0x6d558420, 0x2e4b6: 0x6d558620, 0x2e4b7: 0x6d80f220, + 0x2e4b8: 0x6dc85e20, 0x2e4b9: 0x6c04ae20, 0x2e4ba: 0x6c097c20, 0x2e4bb: 0x6c12c420, + 0x2e4bc: 0x6c225e20, 0x2e4bd: 0x6c37d220, 0x2e4be: 0x6c37d420, 0x2e4bf: 0x6c37d620, + // Block 0xb93, offset 0x2e4c0 + 0x2e4c0: 0x6c37d820, 0x2e4c1: 0x6c37da20, 0x2e4c2: 0x6c530e20, 0x2e4c3: 0x6c531020, + 0x2e4c4: 0x6c531220, 0x2e4c5: 0x6c531420, 0x2e4c6: 0x6c531620, 0x2e4c7: 0x6c531820, + 0x2e4c8: 0x6c75aa20, 0x2e4c9: 0x6c75ac20, 0x2e4ca: 0x6c75ae20, 0x2e4cb: 0x6c75b020, + 0x2e4cc: 0x6c9dec20, 0x2e4cd: 0x6c9dee20, 0x2e4ce: 0x6c9df020, 0x2e4cf: 0x6c9df220, + 0x2e4d0: 0x6c9df420, 0x2e4d1: 0x6c9df620, 0x2e4d2: 0x6c9df820, 0x2e4d3: 0x6c9dfa20, + 0x2e4d4: 0x6ccb0420, 0x2e4d5: 0x6ccb0620, 0x2e4d6: 0x6ccb0820, 0x2e4d7: 0x6ccb0a20, + 0x2e4d8: 0x6ccb0c20, 0x2e4d9: 0x6ccb0e20, 0x2e4da: 0x6ccb1020, 0x2e4db: 0x6cf92c20, + 0x2e4dc: 0x6cf92e20, 0x2e4dd: 0x6d285820, 0x2e4de: 0x6d285a20, 0x2e4df: 0x6d285c20, + 0x2e4e0: 0x6d285e20, 0x2e4e1: 0x6d286020, 0x2e4e2: 0x6d559e20, 0x2e4e3: 0x6d55a020, + 0x2e4e4: 0x6d55a220, 0x2e4e5: 0x6d55a420, 0x2e4e6: 0x6d55a620, 0x2e4e7: 0x6d810820, + 0x2e4e8: 0x6d810a20, 0x2e4e9: 0x6d810c20, 0x2e4ea: 0x6d810e20, 0x2e4eb: 0x6d811020, + 0x2e4ec: 0x6da72020, 0x2e4ed: 0x6da72220, 0x2e4ee: 0x6da72420, 0x2e4ef: 0x6dc86c20, + 0x2e4f0: 0x6de48a20, 0x2e4f1: 0x6de48c20, 0x2e4f2: 0x6e0ee220, 0x2e4f3: 0x6c04b420, + 0x2e4f4: 0x6c380620, 0x2e4f5: 0x6c534820, 0x2e4f6: 0x6c534a20, 0x2e4f7: 0x6c75e020, + 0x2e4f8: 0x6c9e2220, 0x2e4f9: 0x6c9e2420, 0x2e4fa: 0x6c9e2620, 0x2e4fb: 0x6c9e2820, + 0x2e4fc: 0x6ccb5020, 0x2e4fd: 0x6ccb5220, 0x2e4fe: 0x6ccb6820, 0x2e4ff: 0x6cf95820, + // Block 0xb94, offset 0x2e500 + 0x2e500: 0x6cf95a20, 0x2e501: 0x6cf95c20, 0x2e502: 0x6cf95e20, 0x2e503: 0x6d287820, + 0x2e504: 0x6d287a20, 0x2e505: 0x6d55ca20, 0x2e506: 0x6d55cc20, 0x2e507: 0x6d812e20, + 0x2e508: 0x6d813020, 0x2e509: 0x6dc89020, 0x2e50a: 0x6e298620, 0x2e50b: 0x6c04b620, + 0x2e50c: 0x6c04b820, 0x2e50d: 0x6c098020, 0x2e50e: 0x6c12d420, 0x2e50f: 0x6c227620, + 0x2e510: 0x6c227820, 0x2e511: 0x6c380e20, 0x2e512: 0x6c535220, 0x2e513: 0x6cf97c20, + 0x2e514: 0x6c04bc20, 0x2e515: 0x6c12d820, 0x2e516: 0x6c535820, 0x2e517: 0x6c535a20, + 0x2e518: 0x6c535c20, 0x2e519: 0x6c75ee20, 0x2e51a: 0x6da74620, 0x2e51b: 0x6c04be20, + 0x2e51c: 0x6c228220, 0x2e51d: 0x6c228420, 0x2e51e: 0x6c382a20, 0x2e51f: 0x6c382c20, + 0x2e520: 0x6c536020, 0x2e521: 0x6c536220, 0x2e522: 0x6c75f820, 0x2e523: 0x6c75fa20, + 0x2e524: 0x6c75fc20, 0x2e525: 0x6c75fe20, 0x2e526: 0x6c760020, 0x2e527: 0x6c760220, + 0x2e528: 0x6c760420, 0x2e529: 0x6c760620, 0x2e52a: 0x6c760820, 0x2e52b: 0x6c9e6220, + 0x2e52c: 0x6c9e6420, 0x2e52d: 0x6c9e6620, 0x2e52e: 0x6c9e6820, 0x2e52f: 0x6ccb7220, + 0x2e530: 0x6ccb7420, 0x2e531: 0x6ccb7620, 0x2e532: 0x6ccb7820, 0x2e533: 0x6ccb7a20, + 0x2e534: 0x6ccb7c20, 0x2e535: 0x6ccb7e20, 0x2e536: 0x6ccb8020, 0x2e537: 0x6cf98c20, + 0x2e538: 0x6cf98e20, 0x2e539: 0x6cf99020, 0x2e53a: 0x6cf99220, 0x2e53b: 0x6cf99420, + 0x2e53c: 0x6cf99620, 0x2e53d: 0x6cf99820, 0x2e53e: 0x6d28aa20, 0x2e53f: 0x6d55de20, + // Block 0xb95, offset 0x2e540 + 0x2e540: 0x6d55e020, 0x2e541: 0x6d55e220, 0x2e542: 0x6d55e420, 0x2e543: 0x6d816620, + 0x2e544: 0x6d816820, 0x2e545: 0x6d816a20, 0x2e546: 0x6d816c20, 0x2e547: 0x6d816e20, + 0x2e548: 0x6da74a20, 0x2e549: 0x6da74c20, 0x2e54a: 0x6da74e20, 0x2e54b: 0x6dc89620, + 0x2e54c: 0x6de4a420, 0x2e54d: 0x6e1e2420, 0x2e54e: 0x6e3d4a20, 0x2e54f: 0x6c04c220, + 0x2e550: 0x6c098420, 0x2e551: 0x6c098620, 0x2e552: 0x6c12e620, 0x2e553: 0x6c385020, + 0x2e554: 0x6c04c420, 0x2e555: 0x6c098a20, 0x2e556: 0x6c12ea20, 0x2e557: 0x6c12ec20, + 0x2e558: 0x6c12ee20, 0x2e559: 0x6c229620, 0x2e55a: 0x6c229820, 0x2e55b: 0x6c385820, + 0x2e55c: 0x6c385a20, 0x2e55d: 0x6c385c20, 0x2e55e: 0x6c53b820, 0x2e55f: 0x6c53ba20, + 0x2e560: 0x6c53bc20, 0x2e561: 0x6c53be20, 0x2e562: 0x6c53c020, 0x2e563: 0x6c763a20, + 0x2e564: 0x6c763c20, 0x2e565: 0x6c763e20, 0x2e566: 0x6c764020, 0x2e567: 0x6c764220, + 0x2e568: 0x6c764420, 0x2e569: 0x6c764620, 0x2e56a: 0x6c9ea220, 0x2e56b: 0x6c9ea420, + 0x2e56c: 0x6ccbc620, 0x2e56d: 0x6ccbc820, 0x2e56e: 0x6ccbca20, 0x2e56f: 0x6ccbcc20, + 0x2e570: 0x6ccbce20, 0x2e571: 0x6cf9d820, 0x2e572: 0x6d28ec20, 0x2e573: 0x6d28ee20, + 0x2e574: 0x6c04c620, 0x2e575: 0x6c01fa20, 0x2e576: 0x6c098e20, 0x2e577: 0x6c099020, + 0x2e578: 0x6c099220, 0x2e579: 0x6c099420, 0x2e57a: 0x6c098c20, 0x2e57b: 0x6c099c20, + 0x2e57c: 0x6c12f620, 0x2e57d: 0x6c0c5c20, 0x2e57e: 0x6c099e20, 0x2e57f: 0x6c09a020, + // Block 0xb96, offset 0x2e580 + 0x2e580: 0x6c09a220, 0x2e581: 0x6c09a420, 0x2e582: 0x6c229e20, 0x2e583: 0x6c09a620, + 0x2e584: 0x6c09a820, 0x2e585: 0x6c09aa20, 0x2e586: 0x6c12f820, 0x2e587: 0x6c09ac20, + 0x2e588: 0x6c09ae20, 0x2e589: 0x6c09b020, 0x2e58a: 0x6c12fe20, 0x2e58b: 0x6c130020, + 0x2e58c: 0x6c130220, 0x2e58d: 0x6c130420, 0x2e58e: 0x6c130620, 0x2e58f: 0x6c130820, + 0x2e590: 0x6c130a20, 0x2e591: 0x6c130c20, 0x2e592: 0x6c130e20, 0x2e593: 0x6c131020, + 0x2e594: 0x6c131220, 0x2e595: 0x6c131420, 0x2e596: 0x6c22a220, 0x2e597: 0x6c131620, + 0x2e598: 0x6c131820, 0x2e599: 0x6c131a20, 0x2e59a: 0x6c131c20, 0x2e59b: 0x6c131e20, + 0x2e59c: 0x6c132020, 0x2e59d: 0x6c132220, 0x2e59e: 0x6c22a420, 0x2e59f: 0x6c132420, + 0x2e5a0: 0x6c132620, 0x2e5a1: 0x6c132820, 0x2e5a2: 0x6c132a20, 0x2e5a3: 0x6c132c20, + 0x2e5a4: 0x6c132e20, 0x2e5a5: 0x6c22bc20, 0x2e5a6: 0x6c22be20, 0x2e5a7: 0x6c22c020, + 0x2e5a8: 0x6c22c220, 0x2e5a9: 0x6c22c420, 0x2e5aa: 0x6c22c620, 0x2e5ab: 0x6c22c820, + 0x2e5ac: 0x6c386620, 0x2e5ad: 0x6c22ca20, 0x2e5ae: 0x6c22cc20, 0x2e5af: 0x6c22ce20, + 0x2e5b0: 0x6c22d020, 0x2e5b1: 0x6c22d220, 0x2e5b2: 0x6c22d420, 0x2e5b3: 0x6c22d620, + 0x2e5b4: 0x6c22d820, 0x2e5b5: 0x6c22da20, 0x2e5b6: 0x6c22dc20, 0x2e5b7: 0x6c135420, + 0x2e5b8: 0x6c22de20, 0x2e5b9: 0x6c22e020, 0x2e5ba: 0x6c22e220, 0x2e5bb: 0x6c22e420, + 0x2e5bc: 0x6c22e620, 0x2e5bd: 0x6c22e820, 0x2e5be: 0x6c22ea20, 0x2e5bf: 0x6c22ec20, + // Block 0xb97, offset 0x2e5c0 + 0x2e5c0: 0x6c386820, 0x2e5c1: 0x6c22ee20, 0x2e5c2: 0x6c22f020, 0x2e5c3: 0x6c22f220, + 0x2e5c4: 0x6c22f420, 0x2e5c5: 0x6c22f620, 0x2e5c6: 0x6c22f820, 0x2e5c7: 0x6c22fa20, + 0x2e5c8: 0x6c22fc20, 0x2e5c9: 0x6c22fe20, 0x2e5ca: 0x6c386a20, 0x2e5cb: 0x6c230020, + 0x2e5cc: 0x6c230220, 0x2e5cd: 0x6c230420, 0x2e5ce: 0x6c230620, 0x2e5cf: 0x6c230820, + 0x2e5d0: 0x6c230a20, 0x2e5d1: 0x6c230c20, 0x2e5d2: 0x6c230e20, 0x2e5d3: 0x6c386c20, + 0x2e5d4: 0x6c231020, 0x2e5d5: 0x6c231220, 0x2e5d6: 0x6c231420, 0x2e5d7: 0x6c53ce20, + 0x2e5d8: 0x6c231620, 0x2e5d9: 0x6c231820, 0x2e5da: 0x6c231a20, 0x2e5db: 0x6c231c20, + 0x2e5dc: 0x6c231e20, 0x2e5dd: 0x6c386e20, 0x2e5de: 0x6c232020, 0x2e5df: 0x6c232220, + 0x2e5e0: 0x6c232420, 0x2e5e1: 0x6c232620, 0x2e5e2: 0x6c232820, 0x2e5e3: 0x6c232a20, + 0x2e5e4: 0x6c232c20, 0x2e5e5: 0x6c232e20, 0x2e5e6: 0x6c233020, 0x2e5e7: 0x6c233220, + 0x2e5e8: 0x6c233420, 0x2e5e9: 0x6c233620, 0x2e5ea: 0x6c233820, 0x2e5eb: 0x6c388620, + 0x2e5ec: 0x6c388820, 0x2e5ed: 0x6c388a20, 0x2e5ee: 0x6c388c20, 0x2e5ef: 0x6c53d020, + 0x2e5f0: 0x6c388e20, 0x2e5f1: 0x6c389020, 0x2e5f2: 0x6c389220, 0x2e5f3: 0x6c389420, + 0x2e5f4: 0x6c389620, 0x2e5f5: 0x6c389820, 0x2e5f6: 0x6c389a20, 0x2e5f7: 0x6c389c20, + 0x2e5f8: 0x6c389e20, 0x2e5f9: 0x6c38a020, 0x2e5fa: 0x6c38a220, 0x2e5fb: 0x6c38a420, + 0x2e5fc: 0x6c38a620, 0x2e5fd: 0x6c38a820, 0x2e5fe: 0x6c38aa20, 0x2e5ff: 0x6c38ac20, + // Block 0xb98, offset 0x2e600 + 0x2e600: 0x6c38ae20, 0x2e601: 0x6c38b020, 0x2e602: 0x6c38b220, 0x2e603: 0x6c38b420, + 0x2e604: 0x6c38b620, 0x2e605: 0x6c38b820, 0x2e606: 0x6c38ba20, 0x2e607: 0x6c38bc20, + 0x2e608: 0x6c38be20, 0x2e609: 0x6c53d220, 0x2e60a: 0x6c38c020, 0x2e60b: 0x6c38c220, + 0x2e60c: 0x6c38c420, 0x2e60d: 0x6c38c620, 0x2e60e: 0x6c38c820, 0x2e60f: 0x6c38ca20, + 0x2e610: 0x6c38cc20, 0x2e611: 0x6c38ce20, 0x2e612: 0x6c38d020, 0x2e613: 0x6c38d220, + 0x2e614: 0x6c38d420, 0x2e615: 0x6c38d620, 0x2e616: 0x6c38d820, 0x2e617: 0x6c38da20, + 0x2e618: 0x6c38dc20, 0x2e619: 0x6c38de20, 0x2e61a: 0x6c53f220, 0x2e61b: 0x6c38e020, + 0x2e61c: 0x6c38e220, 0x2e61d: 0x6c38e420, 0x2e61e: 0x6c38e620, 0x2e61f: 0x6c38e820, + 0x2e620: 0x6c38ea20, 0x2e621: 0x6c38ec20, 0x2e622: 0x6c38ee20, 0x2e623: 0x6c38f020, + 0x2e624: 0x6c38f220, 0x2e625: 0x6c38f420, 0x2e626: 0x6c38f620, 0x2e627: 0x6c38f820, + 0x2e628: 0x6c38fa20, 0x2e629: 0x6c38fc20, 0x2e62a: 0x6c38fe20, 0x2e62b: 0x6c390020, + 0x2e62c: 0x6c390220, 0x2e62d: 0x6c390420, 0x2e62e: 0x6c390620, 0x2e62f: 0x6c390820, + 0x2e630: 0x6c764a20, 0x2e631: 0x6c390a20, 0x2e632: 0x6c390c20, 0x2e633: 0x6c390e20, + 0x2e634: 0x6c53d420, 0x2e635: 0x6c5a4620, 0x2e636: 0x6c53d620, 0x2e637: 0x6c391020, + 0x2e638: 0x6c391220, 0x2e639: 0x6c391420, 0x2e63a: 0x6c391620, 0x2e63b: 0x6c391820, + 0x2e63c: 0x6c391a20, 0x2e63d: 0x6c391c20, 0x2e63e: 0x6c391e20, 0x2e63f: 0x6c53f420, + // Block 0xb99, offset 0x2e640 + 0x2e640: 0x6c53f620, 0x2e641: 0x6c53f820, 0x2e642: 0x6c53fa20, 0x2e643: 0x6c53fc20, + 0x2e644: 0x6c53fe20, 0x2e645: 0x6c540020, 0x2e646: 0x6c540220, 0x2e647: 0x6c540420, + 0x2e648: 0x6c540620, 0x2e649: 0x6c540820, 0x2e64a: 0x6c540a20, 0x2e64b: 0x6c540c20, + 0x2e64c: 0x6c540e20, 0x2e64d: 0x6c767020, 0x2e64e: 0x6c541020, 0x2e64f: 0x6c541220, + 0x2e650: 0x6c541420, 0x2e651: 0x6c541620, 0x2e652: 0x6c541820, 0x2e653: 0x6c541a20, + 0x2e654: 0x6c541c20, 0x2e655: 0x6c541e20, 0x2e656: 0x6c767220, 0x2e657: 0x6c542020, + 0x2e658: 0x6c542220, 0x2e659: 0x6c542420, 0x2e65a: 0x6c542620, 0x2e65b: 0x6c542820, + 0x2e65c: 0x6c764c20, 0x2e65d: 0x6c542a20, 0x2e65e: 0x6c542c20, 0x2e65f: 0x6c542e20, + 0x2e660: 0x6c543020, 0x2e661: 0x6c543220, 0x2e662: 0x6c543420, 0x2e663: 0x6c543620, + 0x2e664: 0x6c543820, 0x2e665: 0x6c543a20, 0x2e666: 0x6c543c20, 0x2e667: 0x6c543e20, + 0x2e668: 0x6c544020, 0x2e669: 0x6c544220, 0x2e66a: 0x6c544420, 0x2e66b: 0x6c544620, + 0x2e66c: 0x6c544820, 0x2e66d: 0x6c544a20, 0x2e66e: 0x6c544c20, 0x2e66f: 0x6c764e20, + 0x2e670: 0x6c399020, 0x2e671: 0x6c544e20, 0x2e672: 0x6c545020, 0x2e673: 0x6c545220, + 0x2e674: 0x6c545420, 0x2e675: 0x6c545620, 0x2e676: 0x6c545820, 0x2e677: 0x6c545a20, + 0x2e678: 0x6c545c20, 0x2e679: 0x6c545e20, 0x2e67a: 0x6c546020, 0x2e67b: 0x6c546220, + 0x2e67c: 0x6c546420, 0x2e67d: 0x6c546620, 0x2e67e: 0x6c546820, 0x2e67f: 0x6c546a20, + // Block 0xb9a, offset 0x2e680 + 0x2e680: 0x6c546c20, 0x2e681: 0x6c546e20, 0x2e682: 0x6c547020, 0x2e683: 0x6c547220, + 0x2e684: 0x6c547420, 0x2e685: 0x6c547620, 0x2e686: 0x6c765020, 0x2e687: 0x6c547820, + 0x2e688: 0x6c547a20, 0x2e689: 0x6c547c20, 0x2e68a: 0x6c547e20, 0x2e68b: 0x6c548020, + 0x2e68c: 0x6c548220, 0x2e68d: 0x6c548420, 0x2e68e: 0x6c548620, 0x2e68f: 0x6c548820, + 0x2e690: 0x6c548a20, 0x2e691: 0x6c548c20, 0x2e692: 0x6c548e20, 0x2e693: 0x6c549020, + 0x2e694: 0x6c549220, 0x2e695: 0x6c549420, 0x2e696: 0x6c767420, 0x2e697: 0x6c767620, + 0x2e698: 0x6c767820, 0x2e699: 0x6c767a20, 0x2e69a: 0x6c767c20, 0x2e69b: 0x6c767e20, + 0x2e69c: 0x6c768020, 0x2e69d: 0x6c768220, 0x2e69e: 0x6c768420, 0x2e69f: 0x6c768620, + 0x2e6a0: 0x6c768820, 0x2e6a1: 0x6c768a20, 0x2e6a2: 0x6c768c20, 0x2e6a3: 0x6c768e20, + 0x2e6a4: 0x6c769020, 0x2e6a5: 0x6c769220, 0x2e6a6: 0x6c769420, 0x2e6a7: 0x6c769620, + 0x2e6a8: 0x6c769820, 0x2e6a9: 0x6c769a20, 0x2e6aa: 0x6c769c20, 0x2e6ab: 0x6c769e20, + 0x2e6ac: 0x6c76a020, 0x2e6ad: 0x6c76a220, 0x2e6ae: 0x6c76a420, 0x2e6af: 0x6c76a620, + 0x2e6b0: 0x6c76a820, 0x2e6b1: 0x6c76aa20, 0x2e6b2: 0x6c76ac20, 0x2e6b3: 0x6c76ae20, + 0x2e6b4: 0x6c76b020, 0x2e6b5: 0x6c76b220, 0x2e6b6: 0x6c76b420, 0x2e6b7: 0x6c76b620, + 0x2e6b8: 0x6c76b820, 0x2e6b9: 0x6c76ba20, 0x2e6ba: 0x6c76bc20, 0x2e6bb: 0x6c76be20, + 0x2e6bc: 0x6c76c020, 0x2e6bd: 0x6c76c220, 0x2e6be: 0x6c76c420, 0x2e6bf: 0x6c76c620, + // Block 0xb9b, offset 0x2e6c0 + 0x2e6c0: 0x6c76c820, 0x2e6c1: 0x6c76ca20, 0x2e6c2: 0x6c76cc20, 0x2e6c3: 0x6c76ce20, + 0x2e6c4: 0x6c76d020, 0x2e6c5: 0x6c76d220, 0x2e6c6: 0x6c76d420, 0x2e6c7: 0x6c76d620, + 0x2e6c8: 0x6c76d820, 0x2e6c9: 0x6c76da20, 0x2e6ca: 0x6c76dc20, 0x2e6cb: 0x6c76de20, + 0x2e6cc: 0x6c76e020, 0x2e6cd: 0x6c76e220, 0x2e6ce: 0x6c9eae20, 0x2e6cf: 0x6c76e420, + 0x2e6d0: 0x6c76e620, 0x2e6d1: 0x6c76e820, 0x2e6d2: 0x6c76ea20, 0x2e6d3: 0x6c76ec20, + 0x2e6d4: 0x6c76ee20, 0x2e6d5: 0x6c76f020, 0x2e6d6: 0x6c76f220, 0x2e6d7: 0x6c76f420, + 0x2e6d8: 0x6c76f620, 0x2e6d9: 0x6c9ee020, 0x2e6da: 0x6c76f820, 0x2e6db: 0x6c76fa20, + 0x2e6dc: 0x6c76fc20, 0x2e6dd: 0x6c76fe20, 0x2e6de: 0x6c770020, 0x2e6df: 0x6c770220, + 0x2e6e0: 0x6c770420, 0x2e6e1: 0x6c770620, 0x2e6e2: 0x6c770820, 0x2e6e3: 0x6c770a20, + 0x2e6e4: 0x6c770c20, 0x2e6e5: 0x6c770e20, 0x2e6e6: 0x6c771020, 0x2e6e7: 0x6c771220, + 0x2e6e8: 0x6c771420, 0x2e6e9: 0x6c771620, 0x2e6ea: 0x6c9ee220, 0x2e6eb: 0x6c9ee420, + 0x2e6ec: 0x6c9ee620, 0x2e6ed: 0x6c9ee820, 0x2e6ee: 0x6c9eea20, 0x2e6ef: 0x6c9eec20, + 0x2e6f0: 0x6c9eee20, 0x2e6f1: 0x6c9ef020, 0x2e6f2: 0x6c9ef220, 0x2e6f3: 0x6c9ef420, + 0x2e6f4: 0x6c9ef620, 0x2e6f5: 0x6c9ef820, 0x2e6f6: 0x6c9efa20, 0x2e6f7: 0x6c9efc20, + 0x2e6f8: 0x6c9efe20, 0x2e6f9: 0x6c9f0020, 0x2e6fa: 0x6c9f0220, 0x2e6fb: 0x6c9f0420, + 0x2e6fc: 0x6c9f0620, 0x2e6fd: 0x6c9f0820, 0x2e6fe: 0x6c9f0a20, 0x2e6ff: 0x6c9f0c20, + // Block 0xb9c, offset 0x2e700 + 0x2e700: 0x6c9f0e20, 0x2e701: 0x6c9f1020, 0x2e702: 0x6c9f1220, 0x2e703: 0x6c9f1420, + 0x2e704: 0x6c9f1620, 0x2e705: 0x6c9f1820, 0x2e706: 0x6c9f1a20, 0x2e707: 0x6c9f1c20, + 0x2e708: 0x6c9f1e20, 0x2e709: 0x6c9f2020, 0x2e70a: 0x6c9f2220, 0x2e70b: 0x6c9f2420, + 0x2e70c: 0x6c9f2620, 0x2e70d: 0x6c9f2820, 0x2e70e: 0x6c9f2a20, 0x2e70f: 0x6c9f2c20, + 0x2e710: 0x6c9f2e20, 0x2e711: 0x6c9f3020, 0x2e712: 0x6c9f3220, 0x2e713: 0x6c9f3420, + 0x2e714: 0x6c9f3620, 0x2e715: 0x6c9f3820, 0x2e716: 0x6c9f3a20, 0x2e717: 0x6c9f3c20, + 0x2e718: 0x6c9f3e20, 0x2e719: 0x6c9f4020, 0x2e71a: 0x6c9f4220, 0x2e71b: 0x6c9f4420, + 0x2e71c: 0x6c9f4620, 0x2e71d: 0x6c9f4820, 0x2e71e: 0x6c9f4a20, 0x2e71f: 0x6c9f4c20, + 0x2e720: 0x6c9f4e20, 0x2e721: 0x6c9f5020, 0x2e722: 0x6c9f5220, 0x2e723: 0x6c9f5420, + 0x2e724: 0x6c9f5620, 0x2e725: 0x6c9f5820, 0x2e726: 0x6c9f5a20, 0x2e727: 0x6c9f5c20, + 0x2e728: 0x6c9f5e20, 0x2e729: 0x6c9f6020, 0x2e72a: 0x6c9f6220, 0x2e72b: 0x6c9f6420, + 0x2e72c: 0x6c9f6620, 0x2e72d: 0x6c9f6820, 0x2e72e: 0x6c9f6a20, 0x2e72f: 0x6c9f6c20, + 0x2e730: 0x6c9f6e20, 0x2e731: 0x6c9f7020, 0x2e732: 0x6c9f7220, 0x2e733: 0x6c9f7420, + 0x2e734: 0x6c9f7620, 0x2e735: 0x6c9f7820, 0x2e736: 0x6c9f7a20, 0x2e737: 0x6c9f7c20, + 0x2e738: 0x6c9f7e20, 0x2e739: 0x6c9f8020, 0x2e73a: 0x6c9f8220, 0x2e73b: 0x6c9f8420, + 0x2e73c: 0x6ccbdc20, 0x2e73d: 0x6c9f8620, 0x2e73e: 0x6ccbde20, 0x2e73f: 0x6c9f8820, + // Block 0xb9d, offset 0x2e740 + 0x2e740: 0x6c9f8a20, 0x2e741: 0x6c9f8c20, 0x2e742: 0x6c9f8e20, 0x2e743: 0x6ccc0c20, + 0x2e744: 0x6c9f9020, 0x2e745: 0x6c9f9220, 0x2e746: 0x6c9f9420, 0x2e747: 0x6c9f9620, + 0x2e748: 0x6c9f9820, 0x2e749: 0x6c9f9a20, 0x2e74a: 0x6c9f9c20, 0x2e74b: 0x6c9f9e20, + 0x2e74c: 0x6c9fa020, 0x2e74d: 0x6c9fa220, 0x2e74e: 0x6c9fa420, 0x2e74f: 0x6c9fa620, + 0x2e750: 0x6c9fa820, 0x2e751: 0x6c9faa20, 0x2e752: 0x6c9fac20, 0x2e753: 0x6c9fae20, + 0x2e754: 0x6c9fb020, 0x2e755: 0x6c9fb220, 0x2e756: 0x6c9fb420, 0x2e757: 0x6c9fb620, + 0x2e758: 0x6ccc0e20, 0x2e759: 0x6ccc1020, 0x2e75a: 0x6c9fb820, 0x2e75b: 0x6ccc1220, + 0x2e75c: 0x6ccc1420, 0x2e75d: 0x6ccc1620, 0x2e75e: 0x6ccc1820, 0x2e75f: 0x6ccc1a20, + 0x2e760: 0x6ccc1c20, 0x2e761: 0x6ccc1e20, 0x2e762: 0x6ccc2020, 0x2e763: 0x6ccc2220, + 0x2e764: 0x6ccc2420, 0x2e765: 0x6ccc2620, 0x2e766: 0x6ccc2820, 0x2e767: 0x6ccc2a20, + 0x2e768: 0x6ccc2c20, 0x2e769: 0x6ccc2e20, 0x2e76a: 0x6ccc3020, 0x2e76b: 0x6ccc3220, + 0x2e76c: 0x6ccc3420, 0x2e76d: 0x6ccc3620, 0x2e76e: 0x6ccc3820, 0x2e76f: 0x6ccc3a20, + 0x2e770: 0x6ccc3c20, 0x2e771: 0x6ccc3e20, 0x2e772: 0x6ccc4020, 0x2e773: 0x6ccc4220, + 0x2e774: 0x6ccc4420, 0x2e775: 0x6ccc4620, 0x2e776: 0x6ccc4820, 0x2e777: 0x6ccc4a20, + 0x2e778: 0x6ccc4c20, 0x2e779: 0x6ccc4e20, 0x2e77a: 0x6ccc5020, 0x2e77b: 0x6ccc5220, + 0x2e77c: 0x6ccc5420, 0x2e77d: 0x6ccc5620, 0x2e77e: 0x6ccc5820, 0x2e77f: 0x6ccc5a20, + // Block 0xb9e, offset 0x2e780 + 0x2e780: 0x6ccc5c20, 0x2e781: 0x6ccc5e20, 0x2e782: 0x6ccc6020, 0x2e783: 0x6ccc6220, + 0x2e784: 0x6ccc6420, 0x2e785: 0x6ccc6620, 0x2e786: 0x6ccc6820, 0x2e787: 0x6ccc6a20, + 0x2e788: 0x6ccc6c20, 0x2e789: 0x6ccc6e20, 0x2e78a: 0x6ccc7020, 0x2e78b: 0x6ccc7220, + 0x2e78c: 0x6ccc7420, 0x2e78d: 0x6ccc7620, 0x2e78e: 0x6ccc7820, 0x2e78f: 0x6ccc7a20, + 0x2e790: 0x6ccc7c20, 0x2e791: 0x6ccc7e20, 0x2e792: 0x6ccc8020, 0x2e793: 0x6ccc8220, + 0x2e794: 0x6ccc8420, 0x2e795: 0x6ccc8620, 0x2e796: 0x6ccc8820, 0x2e797: 0x6ccc8a20, + 0x2e798: 0x6ccc8c20, 0x2e799: 0x6ccc8e20, 0x2e79a: 0x6ccc9020, 0x2e79b: 0x6ccc9220, + 0x2e79c: 0x6ccc9420, 0x2e79d: 0x6ccc9620, 0x2e79e: 0x6ccc9820, 0x2e79f: 0x6ccc9a20, + 0x2e7a0: 0x6ccc9c20, 0x2e7a1: 0x6ccc9e20, 0x2e7a2: 0x6ccca020, 0x2e7a3: 0x6ccca220, + 0x2e7a4: 0x6ccca420, 0x2e7a5: 0x6ccca620, 0x2e7a6: 0x6ccca820, 0x2e7a7: 0x6cccaa20, + 0x2e7a8: 0x6cccac20, 0x2e7a9: 0x6cccae20, 0x2e7aa: 0x6cccb020, 0x2e7ab: 0x6cccb220, + 0x2e7ac: 0x6cf9e220, 0x2e7ad: 0x6cccb420, 0x2e7ae: 0x6cccb620, 0x2e7af: 0x6cccb820, + 0x2e7b0: 0x6cccba20, 0x2e7b1: 0x6cccbc20, 0x2e7b2: 0x6cccbe20, 0x2e7b3: 0x6cccc020, + 0x2e7b4: 0x6c9fba20, 0x2e7b5: 0x6cccc220, 0x2e7b6: 0x6cccc420, 0x2e7b7: 0x6cccc620, + 0x2e7b8: 0x6cccc820, 0x2e7b9: 0x6cccca20, 0x2e7ba: 0x6ccccc20, 0x2e7bb: 0x6cccce20, + 0x2e7bc: 0x6cccd020, 0x2e7bd: 0x6cccd220, 0x2e7be: 0x6cccd420, 0x2e7bf: 0x6cccd620, + // Block 0xb9f, offset 0x2e7c0 + 0x2e7c0: 0x6cccd820, 0x2e7c1: 0x6cccda20, 0x2e7c2: 0x6cccdc20, 0x2e7c3: 0x6cccde20, + 0x2e7c4: 0x6ccce020, 0x2e7c5: 0x6ccce220, 0x2e7c6: 0x6ccce420, 0x2e7c7: 0x6ccce620, + 0x2e7c8: 0x6ccce820, 0x2e7c9: 0x6cccea20, 0x2e7ca: 0x6cccec20, 0x2e7cb: 0x6cccee20, + 0x2e7cc: 0x6cccf020, 0x2e7cd: 0x6cfa1220, 0x2e7ce: 0x6cfa1420, 0x2e7cf: 0x6cfa1620, + 0x2e7d0: 0x6cfa1820, 0x2e7d1: 0x6cfa1a20, 0x2e7d2: 0x6cfa1c20, 0x2e7d3: 0x6cfa1e20, + 0x2e7d4: 0x6cfa2020, 0x2e7d5: 0x6cfa2220, 0x2e7d6: 0x6cfa2420, 0x2e7d7: 0x6cfa2620, + 0x2e7d8: 0x6cfa2820, 0x2e7d9: 0x6cfa2a20, 0x2e7da: 0x6cfa2c20, 0x2e7db: 0x6cfa2e20, + 0x2e7dc: 0x6cfa3020, 0x2e7dd: 0x6cfa3220, 0x2e7de: 0x6cfa3420, 0x2e7df: 0x6cfa3620, + 0x2e7e0: 0x6cfa3820, 0x2e7e1: 0x6cfa3a20, 0x2e7e2: 0x6cfa3c20, 0x2e7e3: 0x6cfa3e20, + 0x2e7e4: 0x6cfa4020, 0x2e7e5: 0x6cfa4220, 0x2e7e6: 0x6cfa4420, 0x2e7e7: 0x6cfa4620, + 0x2e7e8: 0x6cfa4820, 0x2e7e9: 0x6cfa4a20, 0x2e7ea: 0x6cfa4c20, 0x2e7eb: 0x6cfa4e20, + 0x2e7ec: 0x6cfa5020, 0x2e7ed: 0x6cfa5220, 0x2e7ee: 0x6cfa5420, 0x2e7ef: 0x6cfa5620, + 0x2e7f0: 0x6cfa5820, 0x2e7f1: 0x6cfa5a20, 0x2e7f2: 0x6cfa5c20, 0x2e7f3: 0x6cfa5e20, + 0x2e7f4: 0x6cfa6020, 0x2e7f5: 0x6cfa6220, 0x2e7f6: 0x6cfa6420, 0x2e7f7: 0x6cfa6620, + 0x2e7f8: 0x6cfa6820, 0x2e7f9: 0x6cfa6a20, 0x2e7fa: 0x6cfa6c20, 0x2e7fb: 0x6cfa6e20, + 0x2e7fc: 0x6cfa7020, 0x2e7fd: 0x6cfa7220, 0x2e7fe: 0x6cfa7420, 0x2e7ff: 0x6cfa7620, + // Block 0xba0, offset 0x2e800 + 0x2e800: 0x6cfa7820, 0x2e801: 0x6cfa7a20, 0x2e802: 0x6cfa7c20, 0x2e803: 0x6cfa7e20, + 0x2e804: 0x6cfa8020, 0x2e805: 0x6cfa8220, 0x2e806: 0x6cfa8420, 0x2e807: 0x6cfa8620, + 0x2e808: 0x6cfa8820, 0x2e809: 0x6cfa8a20, 0x2e80a: 0x6cfa8c20, 0x2e80b: 0x6cccf220, + 0x2e80c: 0x6d291220, 0x2e80d: 0x6cfa8e20, 0x2e80e: 0x6d28f420, 0x2e80f: 0x6cfa9020, + 0x2e810: 0x6cfa9220, 0x2e811: 0x6cfa9420, 0x2e812: 0x6cfa9620, 0x2e813: 0x6cfa9820, + 0x2e814: 0x6cfa9a20, 0x2e815: 0x6d561820, 0x2e816: 0x6cfa9c20, 0x2e817: 0x6cfa9e20, + 0x2e818: 0x6cfaa020, 0x2e819: 0x6cfaa220, 0x2e81a: 0x6cfbd620, 0x2e81b: 0x6cfaa420, + 0x2e81c: 0x6cfaa620, 0x2e81d: 0x6cfaa820, 0x2e81e: 0x6cccf420, 0x2e81f: 0x6cfaaa20, + 0x2e820: 0x6cfaac20, 0x2e821: 0x6cfaae20, 0x2e822: 0x6cfab020, 0x2e823: 0x6cfab220, + 0x2e824: 0x6cfab420, 0x2e825: 0x6cfab620, 0x2e826: 0x6cfab820, 0x2e827: 0x6cfaba20, + 0x2e828: 0x6cfabc20, 0x2e829: 0x6cfabe20, 0x2e82a: 0x6cfac020, 0x2e82b: 0x6d291420, + 0x2e82c: 0x6d291620, 0x2e82d: 0x6d291820, 0x2e82e: 0x6d291a20, 0x2e82f: 0x6d291c20, + 0x2e830: 0x6d291e20, 0x2e831: 0x6d292020, 0x2e832: 0x6d292220, 0x2e833: 0x6d292420, + 0x2e834: 0x6d292620, 0x2e835: 0x6d292820, 0x2e836: 0x6d292a20, 0x2e837: 0x6d292c20, + 0x2e838: 0x6d292e20, 0x2e839: 0x6d293020, 0x2e83a: 0x6d293220, 0x2e83b: 0x6d293420, + 0x2e83c: 0x6d293620, 0x2e83d: 0x6d293820, 0x2e83e: 0x6d293a20, 0x2e83f: 0x6d293c20, + // Block 0xba1, offset 0x2e840 + 0x2e840: 0x6d561a20, 0x2e841: 0x6d293e20, 0x2e842: 0x6d294020, 0x2e843: 0x6d294220, + 0x2e844: 0x6d294420, 0x2e845: 0x6d294620, 0x2e846: 0x6d294820, 0x2e847: 0x6d294a20, + 0x2e848: 0x6d294c20, 0x2e849: 0x6d294e20, 0x2e84a: 0x6d295020, 0x2e84b: 0x6d564820, + 0x2e84c: 0x6d295220, 0x2e84d: 0x6d295420, 0x2e84e: 0x6d295620, 0x2e84f: 0x6d295820, + 0x2e850: 0x6d561c20, 0x2e851: 0x6d295a20, 0x2e852: 0x6d295c20, 0x2e853: 0x6cfac220, + 0x2e854: 0x6d295e20, 0x2e855: 0x6d296020, 0x2e856: 0x6d296220, 0x2e857: 0x6d296420, + 0x2e858: 0x6d296620, 0x2e859: 0x6d296820, 0x2e85a: 0x6d296a20, 0x2e85b: 0x6d296c20, + 0x2e85c: 0x6d296e20, 0x2e85d: 0x6d297020, 0x2e85e: 0x6d297220, 0x2e85f: 0x6d297420, + 0x2e860: 0x6d297620, 0x2e861: 0x6d297820, 0x2e862: 0x6d297a20, 0x2e863: 0x6d297c20, + 0x2e864: 0x6d297e20, 0x2e865: 0x6d298020, 0x2e866: 0x6d561e20, 0x2e867: 0x6d298220, + 0x2e868: 0x6d298420, 0x2e869: 0x6d298620, 0x2e86a: 0x6d298820, 0x2e86b: 0x6d298a20, + 0x2e86c: 0x6d298c20, 0x2e86d: 0x6d298e20, 0x2e86e: 0x6d299020, 0x2e86f: 0x6d299220, + 0x2e870: 0x6d299420, 0x2e871: 0x6d299620, 0x2e872: 0x6d299820, 0x2e873: 0x6d299a20, + 0x2e874: 0x6d299c20, 0x2e875: 0x6d299e20, 0x2e876: 0x6d29a020, 0x2e877: 0x6d29a220, + 0x2e878: 0x6d29a420, 0x2e879: 0x6d29a620, 0x2e87a: 0x6d29a820, 0x2e87b: 0x6d29aa20, + 0x2e87c: 0x6d29ac20, 0x2e87d: 0x6d564a20, 0x2e87e: 0x6d29ae20, 0x2e87f: 0x6d562020, + // Block 0xba2, offset 0x2e880 + 0x2e880: 0x6d29b020, 0x2e881: 0x6d562220, 0x2e882: 0x6d29b220, 0x2e883: 0x6d29b420, + 0x2e884: 0x6d29b620, 0x2e885: 0x6d29b820, 0x2e886: 0x6d29ba20, 0x2e887: 0x6d29bc20, + 0x2e888: 0x6d29be20, 0x2e889: 0x6d29c020, 0x2e88a: 0x6d29c220, 0x2e88b: 0x6d29c420, + 0x2e88c: 0x6d29c620, 0x2e88d: 0x6d29c820, 0x2e88e: 0x6d2aca20, 0x2e88f: 0x6d564c20, + 0x2e890: 0x6d564e20, 0x2e891: 0x6d565020, 0x2e892: 0x6d565220, 0x2e893: 0x6d565420, + 0x2e894: 0x6d565620, 0x2e895: 0x6d565820, 0x2e896: 0x6d565a20, 0x2e897: 0x6d565c20, + 0x2e898: 0x6d565e20, 0x2e899: 0x6d566020, 0x2e89a: 0x6d566220, 0x2e89b: 0x6d566420, + 0x2e89c: 0x6d566620, 0x2e89d: 0x6d566820, 0x2e89e: 0x6d819a20, 0x2e89f: 0x6d566a20, + 0x2e8a0: 0x6d566c20, 0x2e8a1: 0x6d566e20, 0x2e8a2: 0x6d567020, 0x2e8a3: 0x6d567220, + 0x2e8a4: 0x6d567420, 0x2e8a5: 0x6d567620, 0x2e8a6: 0x6d567820, 0x2e8a7: 0x6d567a20, + 0x2e8a8: 0x6d567c20, 0x2e8a9: 0x6d567e20, 0x2e8aa: 0x6d568020, 0x2e8ab: 0x6d568220, + 0x2e8ac: 0x6d568420, 0x2e8ad: 0x6d568620, 0x2e8ae: 0x6d568820, 0x2e8af: 0x6d568a20, + 0x2e8b0: 0x6d568c20, 0x2e8b1: 0x6d568e20, 0x2e8b2: 0x6d569020, 0x2e8b3: 0x6d2acc20, + 0x2e8b4: 0x6d569220, 0x2e8b5: 0x6d569420, 0x2e8b6: 0x6d569620, 0x2e8b7: 0x6d569820, + 0x2e8b8: 0x6d569a20, 0x2e8b9: 0x6d569c20, 0x2e8ba: 0x6d569e20, 0x2e8bb: 0x6d56a020, + 0x2e8bc: 0x6d56a220, 0x2e8bd: 0x6d56a420, 0x2e8be: 0x6d56a620, 0x2e8bf: 0x6d56a820, + // Block 0xba3, offset 0x2e8c0 + 0x2e8c0: 0x6da79820, 0x2e8c1: 0x6d56aa20, 0x2e8c2: 0x6d56ac20, 0x2e8c3: 0x6d819c20, + 0x2e8c4: 0x6d56ae20, 0x2e8c5: 0x6d56b020, 0x2e8c6: 0x6d56b220, 0x2e8c7: 0x6d56b420, + 0x2e8c8: 0x6d56b620, 0x2e8c9: 0x6d56b820, 0x2e8ca: 0x6d56ba20, 0x2e8cb: 0x6d56bc20, + 0x2e8cc: 0x6d56be20, 0x2e8cd: 0x6d56c020, 0x2e8ce: 0x6d56c220, 0x2e8cf: 0x6d56c420, + 0x2e8d0: 0x6d56c620, 0x2e8d1: 0x6d56c820, 0x2e8d2: 0x6d56ca20, 0x2e8d3: 0x6d56cc20, + 0x2e8d4: 0x6d56ce20, 0x2e8d5: 0x6d56d020, 0x2e8d6: 0x6d56d220, 0x2e8d7: 0x6d56d420, + 0x2e8d8: 0x6d56d620, 0x2e8d9: 0x6d81c020, 0x2e8da: 0x6d56d820, 0x2e8db: 0x6d56da20, + 0x2e8dc: 0x6d56dc20, 0x2e8dd: 0x6d56de20, 0x2e8de: 0x6d81c220, 0x2e8df: 0x6d81c420, + 0x2e8e0: 0x6d81c620, 0x2e8e1: 0x6d81c820, 0x2e8e2: 0x6d81ca20, 0x2e8e3: 0x6d81cc20, + 0x2e8e4: 0x6d81ce20, 0x2e8e5: 0x6d81d020, 0x2e8e6: 0x6d81d220, 0x2e8e7: 0x6d81d420, + 0x2e8e8: 0x6d81d620, 0x2e8e9: 0x6da77820, 0x2e8ea: 0x6d81d820, 0x2e8eb: 0x6d81da20, + 0x2e8ec: 0x6d81dc20, 0x2e8ed: 0x6d81de20, 0x2e8ee: 0x6d81e020, 0x2e8ef: 0x6d81e220, + 0x2e8f0: 0x6d81e420, 0x2e8f1: 0x6d81e620, 0x2e8f2: 0x6d81e820, 0x2e8f3: 0x6d81ea20, + 0x2e8f4: 0x6d81ec20, 0x2e8f5: 0x6d81ee20, 0x2e8f6: 0x6d81f020, 0x2e8f7: 0x6d81f220, + 0x2e8f8: 0x6d81f420, 0x2e8f9: 0x6d81f620, 0x2e8fa: 0x6d81f820, 0x2e8fb: 0x6d81fa20, + 0x2e8fc: 0x6d81fc20, 0x2e8fd: 0x6d81fe20, 0x2e8fe: 0x6d820020, 0x2e8ff: 0x6d820220, + // Block 0xba4, offset 0x2e900 + 0x2e900: 0x6d820420, 0x2e901: 0x6d820620, 0x2e902: 0x6d820820, 0x2e903: 0x6d820a20, + 0x2e904: 0x6d820c20, 0x2e905: 0x6d820e20, 0x2e906: 0x6d580a20, 0x2e907: 0x6d821020, + 0x2e908: 0x6d821220, 0x2e909: 0x6d821420, 0x2e90a: 0x6d821620, 0x2e90b: 0x6d821820, + 0x2e90c: 0x6da77a20, 0x2e90d: 0x6d821a20, 0x2e90e: 0x6d821c20, 0x2e90f: 0x6d821e20, + 0x2e910: 0x6d56e020, 0x2e911: 0x6d822020, 0x2e912: 0x6d822220, 0x2e913: 0x6d822420, + 0x2e914: 0x6da79a20, 0x2e915: 0x6da79c20, 0x2e916: 0x6d822620, 0x2e917: 0x6da79e20, + 0x2e918: 0x6da7a020, 0x2e919: 0x6da7a220, 0x2e91a: 0x6da7a420, 0x2e91b: 0x6da7a620, + 0x2e91c: 0x6da7a820, 0x2e91d: 0x6da7aa20, 0x2e91e: 0x6da7ac20, 0x2e91f: 0x6da7ae20, + 0x2e920: 0x6da7b020, 0x2e921: 0x6da7b220, 0x2e922: 0x6da7b420, 0x2e923: 0x6da7b620, + 0x2e924: 0x6da7b820, 0x2e925: 0x6da7ba20, 0x2e926: 0x6da7bc20, 0x2e927: 0x6da7be20, + 0x2e928: 0x6da7c020, 0x2e929: 0x6da7c220, 0x2e92a: 0x6da7c420, 0x2e92b: 0x6da7c620, + 0x2e92c: 0x6da7c820, 0x2e92d: 0x6da7ca20, 0x2e92e: 0x6da7cc20, 0x2e92f: 0x6da7ce20, + 0x2e930: 0x6da7d020, 0x2e931: 0x6da7d220, 0x2e932: 0x6da7d420, 0x2e933: 0x6de4c220, + 0x2e934: 0x6da7d620, 0x2e935: 0x6da7d820, 0x2e936: 0x6da7da20, 0x2e937: 0x6dc8c220, + 0x2e938: 0x6da7dc20, 0x2e939: 0x6dc8d220, 0x2e93a: 0x6dc8d420, 0x2e93b: 0x6dc8d620, + 0x2e93c: 0x6dc8d820, 0x2e93d: 0x6dc8da20, 0x2e93e: 0x6dc8dc20, 0x2e93f: 0x6dc8de20, + // Block 0xba5, offset 0x2e940 + 0x2e940: 0x6dc8e020, 0x2e941: 0x6dc8e220, 0x2e942: 0x6dc8e420, 0x2e943: 0x6dc8e620, + 0x2e944: 0x6d82fc20, 0x2e945: 0x6dc8e820, 0x2e946: 0x6dc8ea20, 0x2e947: 0x6dc8ec20, + 0x2e948: 0x6dc8ee20, 0x2e949: 0x6dc8f020, 0x2e94a: 0x6dc8f220, 0x2e94b: 0x6dc8f420, + 0x2e94c: 0x6dc8f620, 0x2e94d: 0x6dc8f820, 0x2e94e: 0x6dc8fa20, 0x2e94f: 0x6dc8fc20, + 0x2e950: 0x6dc8fe20, 0x2e951: 0x6dc90020, 0x2e952: 0x6dc90220, 0x2e953: 0x6dc90420, + 0x2e954: 0x6dc90620, 0x2e955: 0x6de4c420, 0x2e956: 0x6de4c620, 0x2e957: 0x6de4c820, + 0x2e958: 0x6de4ca20, 0x2e959: 0x6de4cc20, 0x2e95a: 0x6de4ce20, 0x2e95b: 0x6de4d020, + 0x2e95c: 0x6de4d220, 0x2e95d: 0x6de4d420, 0x2e95e: 0x6de4d620, 0x2e95f: 0x6de4d820, + 0x2e960: 0x6de4da20, 0x2e961: 0x6de4dc20, 0x2e962: 0x6de4de20, 0x2e963: 0x6de4e020, + 0x2e964: 0x6de4e220, 0x2e965: 0x6de4e420, 0x2e966: 0x6dc9b820, 0x2e967: 0x6de4e620, + 0x2e968: 0x6de4e820, 0x2e969: 0x6de4ea20, 0x2e96a: 0x6dfbc220, 0x2e96b: 0x6de4ec20, + 0x2e96c: 0x6de4ee20, 0x2e96d: 0x6de4f020, 0x2e96e: 0x6de4f220, 0x2e96f: 0x6dfbd020, + 0x2e970: 0x6dfbd220, 0x2e971: 0x6dfbd420, 0x2e972: 0x6dfbd620, 0x2e973: 0x6dfbd820, + 0x2e974: 0x6dfbda20, 0x2e975: 0x6dfbdc20, 0x2e976: 0x6dfbde20, 0x2e977: 0x6dfbe020, + 0x2e978: 0x6dfbe220, 0x2e979: 0x6dfbe420, 0x2e97a: 0x6dfbe620, 0x2e97b: 0x6dfbe820, + 0x2e97c: 0x6dfbea20, 0x2e97d: 0x6dfbec20, 0x2e97e: 0x6dfbee20, 0x2e97f: 0x6dfbf020, + // Block 0xba6, offset 0x2e980 + 0x2e980: 0x6dfbf220, 0x2e981: 0x6dfbf420, 0x2e982: 0x6dfc4820, 0x2e983: 0x6e0f0620, + 0x2e984: 0x6e0f0820, 0x2e985: 0x6e0f0a20, 0x2e986: 0x6e0f0c20, 0x2e987: 0x6e0f0e20, + 0x2e988: 0x6e0f1020, 0x2e989: 0x6e0f1220, 0x2e98a: 0x6e0f1420, 0x2e98b: 0x6e0f1620, + 0x2e98c: 0x6e0f1820, 0x2e98d: 0x6e0f1a20, 0x2e98e: 0x6e3d5220, 0x2e98f: 0x6e0f1c20, + 0x2e990: 0x6e0f1e20, 0x2e991: 0x6e1e3420, 0x2e992: 0x6e1e3620, 0x2e993: 0x6e299620, + 0x2e994: 0x6e1e3820, 0x2e995: 0x6e1e3a20, 0x2e996: 0x6e1e3c20, 0x2e997: 0x6e1e3e20, + 0x2e998: 0x6e1e4020, 0x2e999: 0x6e299e20, 0x2e99a: 0x6e29a020, 0x2e99b: 0x6e29a220, + 0x2e99c: 0x6e29a420, 0x2e99d: 0x6e32a220, 0x2e99e: 0x6e32a420, 0x2e99f: 0x6e32a620, + 0x2e9a0: 0x6e32a820, 0x2e9a1: 0x6e32aa20, 0x2e9a2: 0x6e38e020, 0x2e9a3: 0x6e38e220, + 0x2e9a4: 0x6e3d5420, 0x2e9a5: 0x6e405c20, 0x2e9a6: 0x6e3d5620, 0x2e9a7: 0x6e405e20, + 0x2e9a8: 0x6e406020, 0x2e9a9: 0x6e45c420, 0x2e9aa: 0x6e463020, 0x2e9ab: 0x6c04d020, + 0x2e9ac: 0x6c04d220, 0x2e9ad: 0x6c09ca20, 0x2e9ae: 0x6c135a20, 0x2e9af: 0x6c135c20, + 0x2e9b0: 0x6c135e20, 0x2e9b1: 0x6c136020, 0x2e9b2: 0x6c136220, 0x2e9b3: 0x6c136420, + 0x2e9b4: 0x6c239020, 0x2e9b5: 0x6c239220, 0x2e9b6: 0x6c239420, 0x2e9b7: 0x6c239620, + 0x2e9b8: 0x6c239820, 0x2e9b9: 0x6c239a20, 0x2e9ba: 0x6c239c20, 0x2e9bb: 0x6c239e20, + 0x2e9bc: 0x6c23a020, 0x2e9bd: 0x6c23a220, 0x2e9be: 0x6c23a420, 0x2e9bf: 0x6c23a620, + // Block 0xba7, offset 0x2e9c0 + 0x2e9c0: 0x6c23a820, 0x2e9c1: 0x6c399e20, 0x2e9c2: 0x6c39a020, 0x2e9c3: 0x6c39a220, + 0x2e9c4: 0x6c39a420, 0x2e9c5: 0x6c39a620, 0x2e9c6: 0x6c39a820, 0x2e9c7: 0x6c399220, + 0x2e9c8: 0x6c39aa20, 0x2e9c9: 0x6c39ac20, 0x2e9ca: 0x6c39ae20, 0x2e9cb: 0x6c39b020, + 0x2e9cc: 0x6c39b220, 0x2e9cd: 0x6c39b420, 0x2e9ce: 0x6c39b620, 0x2e9cf: 0x6c39b820, + 0x2e9d0: 0x6c39ba20, 0x2e9d1: 0x6c39bc20, 0x2e9d2: 0x6c39be20, 0x2e9d3: 0x6c39c020, + 0x2e9d4: 0x6c39c220, 0x2e9d5: 0x6c39c420, 0x2e9d6: 0x6c39c620, 0x2e9d7: 0x6c39c820, + 0x2e9d8: 0x6c39ca20, 0x2e9d9: 0x6c39cc20, 0x2e9da: 0x6c39ce20, 0x2e9db: 0x6c39d020, + 0x2e9dc: 0x6c39d220, 0x2e9dd: 0x6c39d420, 0x2e9de: 0x6c39d620, 0x2e9df: 0x6c552820, + 0x2e9e0: 0x6c552a20, 0x2e9e1: 0x6c552c20, 0x2e9e2: 0x6c552e20, 0x2e9e3: 0x6c553020, + 0x2e9e4: 0x6c553220, 0x2e9e5: 0x6c553420, 0x2e9e6: 0x6c553620, 0x2e9e7: 0x6c553820, + 0x2e9e8: 0x6c553a20, 0x2e9e9: 0x6c553c20, 0x2e9ea: 0x6c553e20, 0x2e9eb: 0x6c554020, + 0x2e9ec: 0x6c554220, 0x2e9ed: 0x6c554420, 0x2e9ee: 0x6c554620, 0x2e9ef: 0x6c554820, + 0x2e9f0: 0x6c554a20, 0x2e9f1: 0x6c554c20, 0x2e9f2: 0x6c554e20, 0x2e9f3: 0x6c555020, + 0x2e9f4: 0x6c555220, 0x2e9f5: 0x6c555420, 0x2e9f6: 0x6c555620, 0x2e9f7: 0x6c555820, + 0x2e9f8: 0x6c555a20, 0x2e9f9: 0x6c555c20, 0x2e9fa: 0x6c555e20, 0x2e9fb: 0x6c556020, + 0x2e9fc: 0x6c556220, 0x2e9fd: 0x6c556420, 0x2e9fe: 0x6c556620, 0x2e9ff: 0x6c556820, + // Block 0xba8, offset 0x2ea00 + 0x2ea00: 0x6c556a20, 0x2ea01: 0x6c556c20, 0x2ea02: 0x6c556e20, 0x2ea03: 0x6c557020, + 0x2ea04: 0x6c77f620, 0x2ea05: 0x6c77f820, 0x2ea06: 0x6c77fa20, 0x2ea07: 0x6c77fc20, + 0x2ea08: 0x6c77fe20, 0x2ea09: 0x6c780020, 0x2ea0a: 0x6c780220, 0x2ea0b: 0x6c780420, + 0x2ea0c: 0x6c780620, 0x2ea0d: 0x6c780820, 0x2ea0e: 0x6c780a20, 0x2ea0f: 0x6c780c20, + 0x2ea10: 0x6c780e20, 0x2ea11: 0x6c781020, 0x2ea12: 0x6c781220, 0x2ea13: 0x6c781420, + 0x2ea14: 0x6c781620, 0x2ea15: 0x6c781820, 0x2ea16: 0x6c781a20, 0x2ea17: 0x6c781c20, + 0x2ea18: 0x6c781e20, 0x2ea19: 0x6c782020, 0x2ea1a: 0x6c782220, 0x2ea1b: 0x6c782420, + 0x2ea1c: 0x6c782620, 0x2ea1d: 0x6c782820, 0x2ea1e: 0x6c782a20, 0x2ea1f: 0x6c782c20, + 0x2ea20: 0x6c782e20, 0x2ea21: 0x6c783020, 0x2ea22: 0x6c783220, 0x2ea23: 0x6c783420, + 0x2ea24: 0x6c783620, 0x2ea25: 0x6c783820, 0x2ea26: 0x6c783a20, 0x2ea27: 0x6c783c20, + 0x2ea28: 0x6c783e20, 0x2ea29: 0x6c784020, 0x2ea2a: 0x6c784220, 0x2ea2b: 0x6c784420, + 0x2ea2c: 0x6c784620, 0x2ea2d: 0x6c784820, 0x2ea2e: 0x6c784a20, 0x2ea2f: 0x6ca0f020, + 0x2ea30: 0x6ca0f220, 0x2ea31: 0x6ca0f420, 0x2ea32: 0x6ca0f620, 0x2ea33: 0x6ca0f820, + 0x2ea34: 0x6ca0fa20, 0x2ea35: 0x6ca0fc20, 0x2ea36: 0x6ca0fe20, 0x2ea37: 0x6ca10020, + 0x2ea38: 0x6ca10220, 0x2ea39: 0x6ca10420, 0x2ea3a: 0x6ca10620, 0x2ea3b: 0x6ccddc20, + 0x2ea3c: 0x6ca10820, 0x2ea3d: 0x6ca10a20, 0x2ea3e: 0x6ca10c20, 0x2ea3f: 0x6ca10e20, + // Block 0xba9, offset 0x2ea40 + 0x2ea40: 0x6ca11020, 0x2ea41: 0x6ca11220, 0x2ea42: 0x6ca11420, 0x2ea43: 0x6ca11620, + 0x2ea44: 0x6ca11820, 0x2ea45: 0x6ca11a20, 0x2ea46: 0x6ca11c20, 0x2ea47: 0x6ca11e20, + 0x2ea48: 0x6ca12020, 0x2ea49: 0x6ca12220, 0x2ea4a: 0x6ca12420, 0x2ea4b: 0x6ca12620, + 0x2ea4c: 0x6ca12820, 0x2ea4d: 0x6ca12a20, 0x2ea4e: 0x6ca12c20, 0x2ea4f: 0x6ca12e20, + 0x2ea50: 0x6ca13020, 0x2ea51: 0x6ca13220, 0x2ea52: 0x6ca13420, 0x2ea53: 0x6ca13620, + 0x2ea54: 0x6ca1cc20, 0x2ea55: 0x6ca13820, 0x2ea56: 0x6ca13a20, 0x2ea57: 0x6ca13c20, + 0x2ea58: 0x6ca13e20, 0x2ea59: 0x6ccdf620, 0x2ea5a: 0x6ccdf820, 0x2ea5b: 0x6ccdfa20, + 0x2ea5c: 0x6ccdfc20, 0x2ea5d: 0x6ccdfe20, 0x2ea5e: 0x6cce0020, 0x2ea5f: 0x6cce0220, + 0x2ea60: 0x6cce0420, 0x2ea61: 0x6cce0620, 0x2ea62: 0x6cce0820, 0x2ea63: 0x6cce0a20, + 0x2ea64: 0x6cce0c20, 0x2ea65: 0x6cce0e20, 0x2ea66: 0x6cce1020, 0x2ea67: 0x6cce1220, + 0x2ea68: 0x6cce1420, 0x2ea69: 0x6cce1620, 0x2ea6a: 0x6cce1820, 0x2ea6b: 0x6cce1a20, + 0x2ea6c: 0x6cce1c20, 0x2ea6d: 0x6cce1e20, 0x2ea6e: 0x6cce2020, 0x2ea6f: 0x6cce2220, + 0x2ea70: 0x6cce2420, 0x2ea71: 0x6cce2620, 0x2ea72: 0x6cce2820, 0x2ea73: 0x6cce2a20, + 0x2ea74: 0x6cce2c20, 0x2ea75: 0x6cce2e20, 0x2ea76: 0x6cce3020, 0x2ea77: 0x6cce3220, + 0x2ea78: 0x6cce3420, 0x2ea79: 0x6cce3620, 0x2ea7a: 0x6cce3820, 0x2ea7b: 0x6cce3a20, + 0x2ea7c: 0x6cce3c20, 0x2ea7d: 0x6cce3e20, 0x2ea7e: 0x6cce4020, 0x2ea7f: 0x6cce4220, + // Block 0xbaa, offset 0x2ea80 + 0x2ea80: 0x6cce4420, 0x2ea81: 0x6cfbfc20, 0x2ea82: 0x6cfbfe20, 0x2ea83: 0x6cfc0020, + 0x2ea84: 0x6cfc0220, 0x2ea85: 0x6cfc0420, 0x2ea86: 0x6cfc0620, 0x2ea87: 0x6cfc0820, + 0x2ea88: 0x6cfc0a20, 0x2ea89: 0x6cfc0c20, 0x2ea8a: 0x6cfc0e20, 0x2ea8b: 0x6cfc1020, + 0x2ea8c: 0x6cfc1220, 0x2ea8d: 0x6cfc1420, 0x2ea8e: 0x6cfc1620, 0x2ea8f: 0x6cfc1820, + 0x2ea90: 0x6cfc1a20, 0x2ea91: 0x6cfc1c20, 0x2ea92: 0x6cfc1e20, 0x2ea93: 0x6cfc2020, + 0x2ea94: 0x6cfc2220, 0x2ea95: 0x6d2ace20, 0x2ea96: 0x6cfc2420, 0x2ea97: 0x6cfc2620, + 0x2ea98: 0x6cfc2820, 0x2ea99: 0x6cfc2a20, 0x2ea9a: 0x6cfc2c20, 0x2ea9b: 0x6d2ad020, + 0x2ea9c: 0x6cfc2e20, 0x2ea9d: 0x6cfc3020, 0x2ea9e: 0x6cfc3220, 0x2ea9f: 0x6cfc3420, + 0x2eaa0: 0x6cfc3620, 0x2eaa1: 0x6cfc3820, 0x2eaa2: 0x6cfc3a20, 0x2eaa3: 0x6cfc3c20, + 0x2eaa4: 0x6cfc3e20, 0x2eaa5: 0x6cfc4020, 0x2eaa6: 0x6cfc4220, 0x2eaa7: 0x6cfc4420, + 0x2eaa8: 0x6cfc4620, 0x2eaa9: 0x6cfc4820, 0x2eaaa: 0x6cfc4a20, 0x2eaab: 0x6cfc4c20, + 0x2eaac: 0x6cfc4e20, 0x2eaad: 0x6cfc5020, 0x2eaae: 0x6cce4620, 0x2eaaf: 0x6cfc5220, + 0x2eab0: 0x6cfc5420, 0x2eab1: 0x6cfc5620, 0x2eab2: 0x6cfc5820, 0x2eab3: 0x6cfc5a20, + 0x2eab4: 0x6cfc5c20, 0x2eab5: 0x6cfc5e20, 0x2eab6: 0x6cfc6020, 0x2eab7: 0x6cfc6220, + 0x2eab8: 0x6cfc6420, 0x2eab9: 0x6d2aea20, 0x2eaba: 0x6cfc6620, 0x2eabb: 0x6d2aec20, + 0x2eabc: 0x6d2aee20, 0x2eabd: 0x6d2af020, 0x2eabe: 0x6d2af220, 0x2eabf: 0x6d2af420, + // Block 0xbab, offset 0x2eac0 + 0x2eac0: 0x6d2af620, 0x2eac1: 0x6d2af820, 0x2eac2: 0x6d2afa20, 0x2eac3: 0x6d2afc20, + 0x2eac4: 0x6d2afe20, 0x2eac5: 0x6d2b0020, 0x2eac6: 0x6d2b0220, 0x2eac7: 0x6d2b0420, + 0x2eac8: 0x6d2b0620, 0x2eac9: 0x6d2b0820, 0x2eaca: 0x6d2b0a20, 0x2eacb: 0x6d2b0c20, + 0x2eacc: 0x6d2b0e20, 0x2eacd: 0x6d2b1020, 0x2eace: 0x6d2b1220, 0x2eacf: 0x6d2b1420, + 0x2ead0: 0x6d2b1620, 0x2ead1: 0x6d2b1820, 0x2ead2: 0x6d2b1a20, 0x2ead3: 0x6d2b1c20, + 0x2ead4: 0x6d2b1e20, 0x2ead5: 0x6d2b2020, 0x2ead6: 0x6d2b2220, 0x2ead7: 0x6d2b2420, + 0x2ead8: 0x6d2b2620, 0x2ead9: 0x6d2b2820, 0x2eada: 0x6d581e20, 0x2eadb: 0x6d582020, + 0x2eadc: 0x6d582220, 0x2eadd: 0x6d582420, 0x2eade: 0x6d582620, 0x2eadf: 0x6d582820, + 0x2eae0: 0x6d582a20, 0x2eae1: 0x6d582c20, 0x2eae2: 0x6d582e20, 0x2eae3: 0x6d583020, + 0x2eae4: 0x6d583220, 0x2eae5: 0x6d583420, 0x2eae6: 0x6d580c20, 0x2eae7: 0x6d583620, + 0x2eae8: 0x6d583820, 0x2eae9: 0x6d583a20, 0x2eaea: 0x6d583c20, 0x2eaeb: 0x6d583e20, + 0x2eaec: 0x6d584020, 0x2eaed: 0x6d584220, 0x2eaee: 0x6d584420, 0x2eaef: 0x6d584620, + 0x2eaf0: 0x6d584820, 0x2eaf1: 0x6d584a20, 0x2eaf2: 0x6d584c20, 0x2eaf3: 0x6d584e20, + 0x2eaf4: 0x6d585020, 0x2eaf5: 0x6d585220, 0x2eaf6: 0x6d831420, 0x2eaf7: 0x6d831620, + 0x2eaf8: 0x6d831820, 0x2eaf9: 0x6d831a20, 0x2eafa: 0x6d831c20, 0x2eafb: 0x6d831e20, + 0x2eafc: 0x6d832020, 0x2eafd: 0x6d832220, 0x2eafe: 0x6d832420, 0x2eaff: 0x6d832620, + // Block 0xbac, offset 0x2eb00 + 0x2eb00: 0x6d832820, 0x2eb01: 0x6d832a20, 0x2eb02: 0x6d832c20, 0x2eb03: 0x6d832e20, + 0x2eb04: 0x6d833020, 0x2eb05: 0x6d833220, 0x2eb06: 0x6d833420, 0x2eb07: 0x6d833620, + 0x2eb08: 0x6d833820, 0x2eb09: 0x6d833a20, 0x2eb0a: 0x6d833c20, 0x2eb0b: 0x6d833e20, + 0x2eb0c: 0x6d834020, 0x2eb0d: 0x6d834220, 0x2eb0e: 0x6d834420, 0x2eb0f: 0x6d834620, + 0x2eb10: 0x6d834820, 0x2eb11: 0x6d834a20, 0x2eb12: 0x6d834c20, 0x2eb13: 0x6d834e20, + 0x2eb14: 0x6d835020, 0x2eb15: 0x6d835220, 0x2eb16: 0x6d835420, 0x2eb17: 0x6d835620, + 0x2eb18: 0x6d835820, 0x2eb19: 0x6d835a20, 0x2eb1a: 0x6d835c20, 0x2eb1b: 0x6d835e20, + 0x2eb1c: 0x6d836020, 0x2eb1d: 0x6d836220, 0x2eb1e: 0x6d836420, 0x2eb1f: 0x6da87c20, + 0x2eb20: 0x6da87e20, 0x2eb21: 0x6da88020, 0x2eb22: 0x6da88220, 0x2eb23: 0x6da88420, + 0x2eb24: 0x6da88620, 0x2eb25: 0x6da88820, 0x2eb26: 0x6da88a20, 0x2eb27: 0x6da88c20, + 0x2eb28: 0x6da88e20, 0x2eb29: 0x6da89020, 0x2eb2a: 0x6da89220, 0x2eb2b: 0x6da89420, + 0x2eb2c: 0x6da89620, 0x2eb2d: 0x6da89820, 0x2eb2e: 0x6da89a20, 0x2eb2f: 0x6da89c20, + 0x2eb30: 0x6da89e20, 0x2eb31: 0x6da8a020, 0x2eb32: 0x6da8a220, 0x2eb33: 0x6da8a420, + 0x2eb34: 0x6da8a620, 0x2eb35: 0x6da8a820, 0x2eb36: 0x6da8aa20, 0x2eb37: 0x6da8ac20, + 0x2eb38: 0x6dc9be20, 0x2eb39: 0x6dc9c020, 0x2eb3a: 0x6dc9c220, 0x2eb3b: 0x6dc9c420, + 0x2eb3c: 0x6dc9c620, 0x2eb3d: 0x6dc9c820, 0x2eb3e: 0x6dc9ca20, 0x2eb3f: 0x6dc9cc20, + // Block 0xbad, offset 0x2eb40 + 0x2eb40: 0x6dc9ce20, 0x2eb41: 0x6dc9d020, 0x2eb42: 0x6de57020, 0x2eb43: 0x6dc9d220, + 0x2eb44: 0x6de57820, 0x2eb45: 0x6de57a20, 0x2eb46: 0x6de57c20, 0x2eb47: 0x6de57e20, + 0x2eb48: 0x6de58020, 0x2eb49: 0x6de58220, 0x2eb4a: 0x6de58420, 0x2eb4b: 0x6dfc5220, + 0x2eb4c: 0x6de58620, 0x2eb4d: 0x6de58820, 0x2eb4e: 0x6de58a20, 0x2eb4f: 0x6dfc5420, + 0x2eb50: 0x6dfc5620, 0x2eb51: 0x6dfc5820, 0x2eb52: 0x6dfc5a20, 0x2eb53: 0x6dfc5c20, + 0x2eb54: 0x6dfc5e20, 0x2eb55: 0x6de58c20, 0x2eb56: 0x6dfc6020, 0x2eb57: 0x6dfc6220, + 0x2eb58: 0x6dfc6420, 0x2eb59: 0x6e0f7e20, 0x2eb5a: 0x6e0f8020, 0x2eb5b: 0x6e0f8220, + 0x2eb5c: 0x6e1e7020, 0x2eb5d: 0x6e0fb220, 0x2eb5e: 0x6e1e7220, 0x2eb5f: 0x6e1e7420, + 0x2eb60: 0x6e1e7620, 0x2eb61: 0x6e29da20, 0x2eb62: 0x6e29dc20, 0x2eb63: 0x6e32c020, + 0x2eb64: 0x6e38f220, 0x2eb65: 0x6e38f420, 0x2eb66: 0x6e38f620, 0x2eb67: 0x6e42b620, + 0x2eb68: 0x6e443420, 0x2eb69: 0x6e468220, 0x2eb6a: 0x6c04d620, 0x2eb6b: 0x6c04d820, + 0x2eb6c: 0x6c3a2820, 0x2eb6d: 0x6c3a2a20, 0x2eb6e: 0x6c55ee20, 0x2eb6f: 0x6c55f020, + 0x2eb70: 0x6c55f220, 0x2eb71: 0x6c78ca20, 0x2eb72: 0x6ccf0a20, 0x2eb73: 0x6d2bdc20, + 0x2eb74: 0x6d590420, 0x2eb75: 0x6da93020, 0x2eb76: 0x6c04de20, 0x2eb77: 0x6c137a20, + 0x2eb78: 0x6c3a3a20, 0x2eb79: 0x6c78d620, 0x2eb7a: 0x6cfd4020, 0x2eb7b: 0x6c04e020, + 0x2eb7c: 0x6c561820, 0x2eb7d: 0x6ca1e020, 0x2eb7e: 0x6d2bec20, 0x2eb7f: 0x6c04e420, + // Block 0xbae, offset 0x2eb80 + 0x2eb80: 0x6c3a4620, 0x2eb81: 0x6c562020, 0x2eb82: 0x6c78e220, 0x2eb83: 0x6cfd4820, + 0x2eb84: 0x6d2bf020, 0x2eb85: 0x6d591e20, 0x2eb86: 0x6da93220, 0x2eb87: 0x6c04e820, + 0x2eb88: 0x6c3a5220, 0x2eb89: 0x6c562a20, 0x2eb8a: 0x6c562c20, 0x2eb8b: 0x6ccf3c20, + 0x2eb8c: 0x6ccf3e20, 0x2eb8d: 0x6ccf4020, 0x2eb8e: 0x6cfd5020, 0x2eb8f: 0x6cfd5220, + 0x2eb90: 0x6cfd5420, 0x2eb91: 0x6cfd5620, 0x2eb92: 0x6cfd5820, 0x2eb93: 0x6d2bfc20, + 0x2eb94: 0x6d2bfe20, 0x2eb95: 0x6d592820, 0x2eb96: 0x6d592a20, 0x2eb97: 0x6d592c20, + 0x2eb98: 0x6de5e220, 0x2eb99: 0x6c04ec20, 0x2eb9a: 0x6ccf6620, 0x2eb9b: 0x6c04f020, + 0x2eb9c: 0x6c04f220, 0x2eb9d: 0x6c138020, 0x2eb9e: 0x6c138220, 0x2eb9f: 0x6c138420, + 0x2eba0: 0x6c23ec20, 0x2eba1: 0x6c23ee20, 0x2eba2: 0x6c23f020, 0x2eba3: 0x6c23f220, + 0x2eba4: 0x6c23f420, 0x2eba5: 0x6c3a6c20, 0x2eba6: 0x6c3a6e20, 0x2eba7: 0x6c3a7020, + 0x2eba8: 0x6c3a7220, 0x2eba9: 0x6c3a7420, 0x2ebaa: 0x6c3a7620, 0x2ebab: 0x6c3a7820, + 0x2ebac: 0x6c3a7a20, 0x2ebad: 0x6c564c20, 0x2ebae: 0x6c564e20, 0x2ebaf: 0x6c565020, + 0x2ebb0: 0x6c565220, 0x2ebb1: 0x6c565420, 0x2ebb2: 0x6c565620, 0x2ebb3: 0x6c565820, + 0x2ebb4: 0x6c565a20, 0x2ebb5: 0x6c565c20, 0x2ebb6: 0x6c791020, 0x2ebb7: 0x6c791220, + 0x2ebb8: 0x6c791420, 0x2ebb9: 0x6c791620, 0x2ebba: 0x6c791820, 0x2ebbb: 0x6ca21e20, + 0x2ebbc: 0x6ca22020, 0x2ebbd: 0x6ca22220, 0x2ebbe: 0x6ca22420, 0x2ebbf: 0x6ca22620, + // Block 0xbaf, offset 0x2ebc0 + 0x2ebc0: 0x6ccf7820, 0x2ebc1: 0x6ca22820, 0x2ebc2: 0x6ccf7a20, 0x2ebc3: 0x6ccf7c20, + 0x2ebc4: 0x6ccf7e20, 0x2ebc5: 0x6ccf8020, 0x2ebc6: 0x6ccf8220, 0x2ebc7: 0x6ccf8420, + 0x2ebc8: 0x6ccf8620, 0x2ebc9: 0x6ccf8820, 0x2ebca: 0x6ccf8a20, 0x2ebcb: 0x6ccf8c20, + 0x2ebcc: 0x6cfd7820, 0x2ebcd: 0x6cfd7a20, 0x2ebce: 0x6cfd7c20, 0x2ebcf: 0x6cfd7e20, + 0x2ebd0: 0x6cfd8020, 0x2ebd1: 0x6cfd8220, 0x2ebd2: 0x6d2c1620, 0x2ebd3: 0x6d2c1820, + 0x2ebd4: 0x6d2c1a20, 0x2ebd5: 0x6d2c1c20, 0x2ebd6: 0x6d2c1e20, 0x2ebd7: 0x6d2c2020, + 0x2ebd8: 0x6d595020, 0x2ebd9: 0x6d595220, 0x2ebda: 0x6d595420, 0x2ebdb: 0x6d595620, + 0x2ebdc: 0x6d845820, 0x2ebdd: 0x6d845a20, 0x2ebde: 0x6d845c20, 0x2ebdf: 0x6d845e20, + 0x2ebe0: 0x6da94e20, 0x2ebe1: 0x6de5e620, 0x2ebe2: 0x6de5e820, 0x2ebe3: 0x6de5ea20, + 0x2ebe4: 0x6de5ec20, 0x2ebe5: 0x6de5ee20, 0x2ebe6: 0x6de5f020, 0x2ebe7: 0x6dfcd820, + 0x2ebe8: 0x6dfcda20, 0x2ebe9: 0x6e1e9c20, 0x2ebea: 0x6e390e20, 0x2ebeb: 0x6e407820, + 0x2ebec: 0x6c04f420, 0x2ebed: 0x6c01fe20, 0x2ebee: 0x6c09dc20, 0x2ebef: 0x6c09de20, + 0x2ebf0: 0x6c09e020, 0x2ebf1: 0x6c138c20, 0x2ebf2: 0x6c138e20, 0x2ebf3: 0x6c139020, + 0x2ebf4: 0x6c139220, 0x2ebf5: 0x6c139420, 0x2ebf6: 0x6c240020, 0x2ebf7: 0x6c139620, + 0x2ebf8: 0x6c139820, 0x2ebf9: 0x6c240a20, 0x2ebfa: 0x6c240c20, 0x2ebfb: 0x6c240e20, + 0x2ebfc: 0x6c241020, 0x2ebfd: 0x6c241220, 0x2ebfe: 0x6c241420, 0x2ebff: 0x6c241620, + // Block 0xbb0, offset 0x2ec00 + 0x2ec00: 0x6c3ab620, 0x2ec01: 0x6c241820, 0x2ec02: 0x6c241a20, 0x2ec03: 0x6c241c20, + 0x2ec04: 0x6c241e20, 0x2ec05: 0x6c242020, 0x2ec06: 0x6c242220, 0x2ec07: 0x6c242420, + 0x2ec08: 0x6c242620, 0x2ec09: 0x6c3acc20, 0x2ec0a: 0x6c569620, 0x2ec0b: 0x6c3ace20, + 0x2ec0c: 0x6c3ad020, 0x2ec0d: 0x6c3ad220, 0x2ec0e: 0x6c3ad420, 0x2ec0f: 0x6c3ad620, + 0x2ec10: 0x6c3ad820, 0x2ec11: 0x6c3ada20, 0x2ec12: 0x6c3adc20, 0x2ec13: 0x6c3ade20, + 0x2ec14: 0x6c3ae020, 0x2ec15: 0x6c3ae220, 0x2ec16: 0x6c3ae420, 0x2ec17: 0x6c3ae620, + 0x2ec18: 0x6c3ae820, 0x2ec19: 0x6c3aea20, 0x2ec1a: 0x6c3aec20, 0x2ec1b: 0x6c3aee20, + 0x2ec1c: 0x6c3af020, 0x2ec1d: 0x6c3af220, 0x2ec1e: 0x6c3af420, 0x2ec1f: 0x6c56a420, + 0x2ec20: 0x6c56a620, 0x2ec21: 0x6c56a820, 0x2ec22: 0x6c56aa20, 0x2ec23: 0x6c56ac20, + 0x2ec24: 0x6c56ae20, 0x2ec25: 0x6c56b020, 0x2ec26: 0x6c56b220, 0x2ec27: 0x6c56b420, + 0x2ec28: 0x6c56b620, 0x2ec29: 0x6c56b820, 0x2ec2a: 0x6c56ba20, 0x2ec2b: 0x6c56bc20, + 0x2ec2c: 0x6c56be20, 0x2ec2d: 0x6c56c020, 0x2ec2e: 0x6c56c220, 0x2ec2f: 0x6c56c420, + 0x2ec30: 0x6c56c620, 0x2ec31: 0x6c56c820, 0x2ec32: 0x6c56ca20, 0x2ec33: 0x6c794420, + 0x2ec34: 0x6c794620, 0x2ec35: 0x6c794820, 0x2ec36: 0x6c794a20, 0x2ec37: 0x6c794c20, + 0x2ec38: 0x6c794e20, 0x2ec39: 0x6c795020, 0x2ec3a: 0x6c795220, 0x2ec3b: 0x6c795420, + 0x2ec3c: 0x6c795620, 0x2ec3d: 0x6c795820, 0x2ec3e: 0x6c795a20, 0x2ec3f: 0x6ca25220, + // Block 0xbb1, offset 0x2ec40 + 0x2ec40: 0x6c795c20, 0x2ec41: 0x6c795e20, 0x2ec42: 0x6c796020, 0x2ec43: 0x6c796220, + 0x2ec44: 0x6ca26420, 0x2ec45: 0x6ca26620, 0x2ec46: 0x6ccfce20, 0x2ec47: 0x6ca26820, + 0x2ec48: 0x6ca26a20, 0x2ec49: 0x6ca26c20, 0x2ec4a: 0x6ca26e20, 0x2ec4b: 0x6ccfd020, + 0x2ec4c: 0x6ccfd220, 0x2ec4d: 0x6ca27020, 0x2ec4e: 0x6ca27220, 0x2ec4f: 0x6ca27420, + 0x2ec50: 0x6ca27620, 0x2ec51: 0x6ca27820, 0x2ec52: 0x6ccfd420, 0x2ec53: 0x6ca27a20, + 0x2ec54: 0x6ca27c20, 0x2ec55: 0x6ca27e20, 0x2ec56: 0x6ca28020, 0x2ec57: 0x6ca28220, + 0x2ec58: 0x6ca28420, 0x2ec59: 0x6ca28620, 0x2ec5a: 0x6ca28820, 0x2ec5b: 0x6ca28a20, + 0x2ec5c: 0x6ca28c20, 0x2ec5d: 0x6ca28e20, 0x2ec5e: 0x6ca29020, 0x2ec5f: 0x6ca29220, + 0x2ec60: 0x6ca29420, 0x2ec61: 0x6ca29620, 0x2ec62: 0x6ccfe420, 0x2ec63: 0x6ccfe620, + 0x2ec64: 0x6ccfe820, 0x2ec65: 0x6ccfea20, 0x2ec66: 0x6ccfec20, 0x2ec67: 0x6ccfee20, + 0x2ec68: 0x6ccff020, 0x2ec69: 0x6ccff220, 0x2ec6a: 0x6ca29820, 0x2ec6b: 0x6ccfd620, + 0x2ec6c: 0x6ccff420, 0x2ec6d: 0x6ccff620, 0x2ec6e: 0x6cfdbe20, 0x2ec6f: 0x6ccff820, + 0x2ec70: 0x6ccffa20, 0x2ec71: 0x6ccffc20, 0x2ec72: 0x6ccffe20, 0x2ec73: 0x6cd00020, + 0x2ec74: 0x6cd00220, 0x2ec75: 0x6cd00420, 0x2ec76: 0x6cd00620, 0x2ec77: 0x6cfdc020, + 0x2ec78: 0x6cd00820, 0x2ec79: 0x6cd00a20, 0x2ec7a: 0x6cfdd220, 0x2ec7b: 0x6cfdd420, + 0x2ec7c: 0x6cfdd620, 0x2ec7d: 0x6cfdd820, 0x2ec7e: 0x6cfdda20, 0x2ec7f: 0x6cfddc20, + // Block 0xbb2, offset 0x2ec80 + 0x2ec80: 0x6cfdde20, 0x2ec81: 0x6cfdc220, 0x2ec82: 0x6cfde020, 0x2ec83: 0x6d2c6a20, + 0x2ec84: 0x6d2c7820, 0x2ec85: 0x6cfde220, 0x2ec86: 0x6cfde420, 0x2ec87: 0x6cfde620, + 0x2ec88: 0x6cfde820, 0x2ec89: 0x6cfdea20, 0x2ec8a: 0x6cfdec20, 0x2ec8b: 0x6d599420, + 0x2ec8c: 0x6d2c7a20, 0x2ec8d: 0x6d2c7c20, 0x2ec8e: 0x6d598620, 0x2ec8f: 0x6d2c7e20, + 0x2ec90: 0x6d2c8020, 0x2ec91: 0x6d2c8220, 0x2ec92: 0x6d2c8420, 0x2ec93: 0x6d2c6820, + 0x2ec94: 0x6d2c8620, 0x2ec95: 0x6d2c8820, 0x2ec96: 0x6d599620, 0x2ec97: 0x6d599820, + 0x2ec98: 0x6d599a20, 0x2ec99: 0x6d599c20, 0x2ec9a: 0x6d599e20, 0x2ec9b: 0x6d59a020, + 0x2ec9c: 0x6d59a220, 0x2ec9d: 0x6d59a420, 0x2ec9e: 0x6d59a620, 0x2ec9f: 0x6d59a820, + 0x2eca0: 0x6d59aa20, 0x2eca1: 0x6d59ac20, 0x2eca2: 0x6d59ae20, 0x2eca3: 0x6d847e20, + 0x2eca4: 0x6d59b020, 0x2eca5: 0x6d848620, 0x2eca6: 0x6d848820, 0x2eca7: 0x6d848a20, + 0x2eca8: 0x6d848c20, 0x2eca9: 0x6d848e20, 0x2ecaa: 0x6d849020, 0x2ecab: 0x6d849220, + 0x2ecac: 0x6d849420, 0x2ecad: 0x6d849620, 0x2ecae: 0x6da96a20, 0x2ecaf: 0x6da96c20, + 0x2ecb0: 0x6da96e20, 0x2ecb1: 0x6da97020, 0x2ecb2: 0x6da97220, 0x2ecb3: 0x6da97420, + 0x2ecb4: 0x6da97620, 0x2ecb5: 0x6dca5a20, 0x2ecb6: 0x6dca5c20, 0x2ecb7: 0x6dca5e20, + 0x2ecb8: 0x6de60020, 0x2ecb9: 0x6de60620, 0x2ecba: 0x6de60820, 0x2ecbb: 0x6dfce620, + 0x2ecbc: 0x6dfcf020, 0x2ecbd: 0x6dfcf220, 0x2ecbe: 0x6e0fc820, 0x2ecbf: 0x6e1ea820, + // Block 0xbb3, offset 0x2ecc0 + 0x2ecc0: 0x6e1eaa20, 0x2ecc1: 0x6e2a0c20, 0x2ecc2: 0x6e2a0e20, 0x2ecc3: 0x6e2a1020, + 0x2ecc4: 0x6c09ee20, 0x2ecc5: 0x6c572620, 0x2ecc6: 0x6c79ba20, 0x2ecc7: 0x6ca2d620, + 0x2ecc8: 0x6ca2d820, 0x2ecc9: 0x6c09f220, 0x2ecca: 0x6c09f420, 0x2eccb: 0x6c04fa20, + 0x2eccc: 0x6c09f620, 0x2eccd: 0x6c09f820, 0x2ecce: 0x6c13be20, 0x2eccf: 0x6c13c020, + 0x2ecd0: 0x6c13c220, 0x2ecd1: 0x6c13c420, 0x2ecd2: 0x6c247420, 0x2ecd3: 0x6c247620, + 0x2ecd4: 0x6c247820, 0x2ecd5: 0x6c247a20, 0x2ecd6: 0x6c247c20, 0x2ecd7: 0x6c247e20, + 0x2ecd8: 0x6c248020, 0x2ecd9: 0x6c248220, 0x2ecda: 0x6c248420, 0x2ecdb: 0x6c248620, + 0x2ecdc: 0x6c3b4420, 0x2ecdd: 0x6c3b4620, 0x2ecde: 0x6c3b4820, 0x2ecdf: 0x6c3b4a20, + 0x2ece0: 0x6c3b4c20, 0x2ece1: 0x6c3b4e20, 0x2ece2: 0x6c3b5020, 0x2ece3: 0x6c3b5220, + 0x2ece4: 0x6c3b5420, 0x2ece5: 0x6c3b5620, 0x2ece6: 0x6c3b5820, 0x2ece7: 0x6c3b5a20, + 0x2ece8: 0x6c3b5c20, 0x2ece9: 0x6c3b5e20, 0x2ecea: 0x6c3b6020, 0x2eceb: 0x6c3b6220, + 0x2ecec: 0x6c3b6420, 0x2eced: 0x6c3b6620, 0x2ecee: 0x6c3b6820, 0x2ecef: 0x6c3b6a20, + 0x2ecf0: 0x6c3b6c20, 0x2ecf1: 0x6c3b6e20, 0x2ecf2: 0x6c573a20, 0x2ecf3: 0x6c573c20, + 0x2ecf4: 0x6c573e20, 0x2ecf5: 0x6c574020, 0x2ecf6: 0x6c574220, 0x2ecf7: 0x6c574420, + 0x2ecf8: 0x6c574620, 0x2ecf9: 0x6c574820, 0x2ecfa: 0x6c79be20, 0x2ecfb: 0x6c574a20, + 0x2ecfc: 0x6c79c020, 0x2ecfd: 0x6c574c20, 0x2ecfe: 0x6c574e20, 0x2ecff: 0x6c575020, + // Block 0xbb4, offset 0x2ed00 + 0x2ed00: 0x6c575220, 0x2ed01: 0x6c575420, 0x2ed02: 0x6c575620, 0x2ed03: 0x6c575820, + 0x2ed04: 0x6c575a20, 0x2ed05: 0x6c575c20, 0x2ed06: 0x6c575e20, 0x2ed07: 0x6c576020, + 0x2ed08: 0x6c576220, 0x2ed09: 0x6c576420, 0x2ed0a: 0x6c576620, 0x2ed0b: 0x6c576820, + 0x2ed0c: 0x6c576a20, 0x2ed0d: 0x6c576c20, 0x2ed0e: 0x6c576e20, 0x2ed0f: 0x6c577020, + 0x2ed10: 0x6c577220, 0x2ed11: 0x6c577420, 0x2ed12: 0x6c79d620, 0x2ed13: 0x6c79d820, + 0x2ed14: 0x6c79da20, 0x2ed15: 0x6c79dc20, 0x2ed16: 0x6c79de20, 0x2ed17: 0x6c79e020, + 0x2ed18: 0x6c79e220, 0x2ed19: 0x6c79e420, 0x2ed1a: 0x6c79e620, 0x2ed1b: 0x6c79e820, + 0x2ed1c: 0x6c79ea20, 0x2ed1d: 0x6c79ec20, 0x2ed1e: 0x6c79ee20, 0x2ed1f: 0x6c79f020, + 0x2ed20: 0x6c79f220, 0x2ed21: 0x6c79f420, 0x2ed22: 0x6c79f620, 0x2ed23: 0x6c79f820, + 0x2ed24: 0x6c79fa20, 0x2ed25: 0x6c79fc20, 0x2ed26: 0x6c79fe20, 0x2ed27: 0x6c7a0020, + 0x2ed28: 0x6c7a0220, 0x2ed29: 0x6c7a0420, 0x2ed2a: 0x6c7a0620, 0x2ed2b: 0x6c7a0820, + 0x2ed2c: 0x6c7a0a20, 0x2ed2d: 0x6c7a0c20, 0x2ed2e: 0x6c7a0e20, 0x2ed2f: 0x6c7a1020, + 0x2ed30: 0x6c7a1220, 0x2ed31: 0x6c7a1420, 0x2ed32: 0x6c7a1620, 0x2ed33: 0x6ca2ea20, + 0x2ed34: 0x6ca2ec20, 0x2ed35: 0x6ca2ee20, 0x2ed36: 0x6ca2f020, 0x2ed37: 0x6cd08c20, + 0x2ed38: 0x6ca2f220, 0x2ed39: 0x6c7a7220, 0x2ed3a: 0x6ca2f420, 0x2ed3b: 0x6ca2f620, + 0x2ed3c: 0x6ca2f820, 0x2ed3d: 0x6ca2fa20, 0x2ed3e: 0x6ca2fc20, 0x2ed3f: 0x6ca2fe20, + // Block 0xbb5, offset 0x2ed40 + 0x2ed40: 0x6ca30020, 0x2ed41: 0x6ca30220, 0x2ed42: 0x6ca30420, 0x2ed43: 0x6ca30620, + 0x2ed44: 0x6ca30820, 0x2ed45: 0x6ca30a20, 0x2ed46: 0x6ca30c20, 0x2ed47: 0x6ca30e20, + 0x2ed48: 0x6ca31020, 0x2ed49: 0x6c7a1820, 0x2ed4a: 0x6ca31220, 0x2ed4b: 0x6ca31420, + 0x2ed4c: 0x6ca31620, 0x2ed4d: 0x6ca31820, 0x2ed4e: 0x6ca31a20, 0x2ed4f: 0x6ca31c20, + 0x2ed50: 0x6ca31e20, 0x2ed51: 0x6ca32020, 0x2ed52: 0x6ca32220, 0x2ed53: 0x6ca32420, + 0x2ed54: 0x6cd08e20, 0x2ed55: 0x6cd09020, 0x2ed56: 0x6cd09220, 0x2ed57: 0x6cd09420, + 0x2ed58: 0x6cd09620, 0x2ed59: 0x6cd09820, 0x2ed5a: 0x6cd09a20, 0x2ed5b: 0x6cd09c20, + 0x2ed5c: 0x6cd09e20, 0x2ed5d: 0x6cd0a020, 0x2ed5e: 0x6cfe6220, 0x2ed5f: 0x6cd0a220, + 0x2ed60: 0x6cd0a420, 0x2ed61: 0x6cd0a620, 0x2ed62: 0x6cd0a820, 0x2ed63: 0x6cd0aa20, + 0x2ed64: 0x6cd0ac20, 0x2ed65: 0x6cd0ae20, 0x2ed66: 0x6cd0b020, 0x2ed67: 0x6cfe4c20, + 0x2ed68: 0x6cd0b220, 0x2ed69: 0x6cd0b420, 0x2ed6a: 0x6cd0b620, 0x2ed6b: 0x6cd0b820, + 0x2ed6c: 0x6cd0ba20, 0x2ed6d: 0x6cd0bc20, 0x2ed6e: 0x6cd0be20, 0x2ed6f: 0x6cd0c020, + 0x2ed70: 0x6cd0c220, 0x2ed71: 0x6cd0c420, 0x2ed72: 0x6cd0c620, 0x2ed73: 0x6cd0c820, + 0x2ed74: 0x6cd0ca20, 0x2ed75: 0x6cd0cc20, 0x2ed76: 0x6cd0ce20, 0x2ed77: 0x6cd0d020, + 0x2ed78: 0x6cd0d220, 0x2ed79: 0x6cd0d420, 0x2ed7a: 0x6cd0d620, 0x2ed7b: 0x6cd0d820, + 0x2ed7c: 0x6cd0da20, 0x2ed7d: 0x6cfe6420, 0x2ed7e: 0x6cfe6620, 0x2ed7f: 0x6cfe6820, + // Block 0xbb6, offset 0x2ed80 + 0x2ed80: 0x6cfe6a20, 0x2ed81: 0x6cfe6c20, 0x2ed82: 0x6cfe6e20, 0x2ed83: 0x6cfe7020, + 0x2ed84: 0x6cfe7220, 0x2ed85: 0x6cfe7420, 0x2ed86: 0x6cfe7620, 0x2ed87: 0x6cfe7820, + 0x2ed88: 0x6cfe7a20, 0x2ed89: 0x6cfe7c20, 0x2ed8a: 0x6cfe7e20, 0x2ed8b: 0x6cfe8020, + 0x2ed8c: 0x6cfe8220, 0x2ed8d: 0x6cfe8420, 0x2ed8e: 0x6cfe8620, 0x2ed8f: 0x6cfe8820, + 0x2ed90: 0x6cfe8a20, 0x2ed91: 0x6cfe8c20, 0x2ed92: 0x6cfe8e20, 0x2ed93: 0x6cfe9020, + 0x2ed94: 0x6cfe9220, 0x2ed95: 0x6cfe9420, 0x2ed96: 0x6cfe9620, 0x2ed97: 0x6cfe9820, + 0x2ed98: 0x6cfe9a20, 0x2ed99: 0x6cfe9c20, 0x2ed9a: 0x6cfe9e20, 0x2ed9b: 0x6cfea020, + 0x2ed9c: 0x6cfea220, 0x2ed9d: 0x6cfea420, 0x2ed9e: 0x6cfea620, 0x2ed9f: 0x6cfea820, + 0x2eda0: 0x6d2cea20, 0x2eda1: 0x6d2cec20, 0x2eda2: 0x6d2cee20, 0x2eda3: 0x6d2cf020, + 0x2eda4: 0x6d2cf220, 0x2eda5: 0x6d2cf420, 0x2eda6: 0x6d2cf620, 0x2eda7: 0x6d2cf820, + 0x2eda8: 0x6d2cfa20, 0x2eda9: 0x6d5a0620, 0x2edaa: 0x6d2cfc20, 0x2edab: 0x6d2cfe20, + 0x2edac: 0x6d5a0820, 0x2edad: 0x6d2d0020, 0x2edae: 0x6d2d0220, 0x2edaf: 0x6cff4020, + 0x2edb0: 0x6d2d0420, 0x2edb1: 0x6d2d0620, 0x2edb2: 0x6d2d0820, 0x2edb3: 0x6d2d0a20, + 0x2edb4: 0x6d2d0c20, 0x2edb5: 0x6d2d0e20, 0x2edb6: 0x6d2d1020, 0x2edb7: 0x6d2d1220, + 0x2edb8: 0x6d2d1420, 0x2edb9: 0x6d5a1e20, 0x2edba: 0x6d5a2020, 0x2edbb: 0x6d5a2220, + 0x2edbc: 0x6d5a2420, 0x2edbd: 0x6d5a2620, 0x2edbe: 0x6d5a2820, 0x2edbf: 0x6d84cc20, + // Block 0xbb7, offset 0x2edc0 + 0x2edc0: 0x6d5a2a20, 0x2edc1: 0x6d5a2c20, 0x2edc2: 0x6d5a2e20, 0x2edc3: 0x6d5a3020, + 0x2edc4: 0x6d5a3220, 0x2edc5: 0x6d5a3420, 0x2edc6: 0x6d5a3620, 0x2edc7: 0x6d5a3820, + 0x2edc8: 0x6d5a3a20, 0x2edc9: 0x6d5a3c20, 0x2edca: 0x6d5a3e20, 0x2edcb: 0x6d5a4020, + 0x2edcc: 0x6d5a4220, 0x2edcd: 0x6d84da20, 0x2edce: 0x6d5a4420, 0x2edcf: 0x6d84dc20, + 0x2edd0: 0x6da99a20, 0x2edd1: 0x6d84de20, 0x2edd2: 0x6d84e020, 0x2edd3: 0x6d5a4620, + 0x2edd4: 0x6d84e220, 0x2edd5: 0x6d84e420, 0x2edd6: 0x6d84e620, 0x2edd7: 0x6da99c20, + 0x2edd8: 0x6d84e820, 0x2edd9: 0x6d84ea20, 0x2edda: 0x6d84ec20, 0x2eddb: 0x6d84ee20, + 0x2eddc: 0x6d84f020, 0x2eddd: 0x6d84f220, 0x2edde: 0x6d84f420, 0x2eddf: 0x6d84f620, + 0x2ede0: 0x6d84f820, 0x2ede1: 0x6d84fa20, 0x2ede2: 0x6d856820, 0x2ede3: 0x6d84fc20, + 0x2ede4: 0x6d84fe20, 0x2ede5: 0x6da9a620, 0x2ede6: 0x6da9a820, 0x2ede7: 0x6dca8820, + 0x2ede8: 0x6da9aa20, 0x2ede9: 0x6da9ac20, 0x2edea: 0x6da9ae20, 0x2edeb: 0x6da9b020, + 0x2edec: 0x6da9b220, 0x2eded: 0x6da9b420, 0x2edee: 0x6da9b620, 0x2edef: 0x6da9b820, + 0x2edf0: 0x6da9ba20, 0x2edf1: 0x6da9bc20, 0x2edf2: 0x6da9be20, 0x2edf3: 0x6da9c020, + 0x2edf4: 0x6da9c220, 0x2edf5: 0x6dca8a20, 0x2edf6: 0x6dca8c20, 0x2edf7: 0x6de61c20, + 0x2edf8: 0x6dca8e20, 0x2edf9: 0x6dca9020, 0x2edfa: 0x6dfcfc20, 0x2edfb: 0x6dca9220, + 0x2edfc: 0x6dca9420, 0x2edfd: 0x6de61e20, 0x2edfe: 0x6dca9620, 0x2edff: 0x6dca9820, + // Block 0xbb8, offset 0x2ee00 + 0x2ee00: 0x6dca9a20, 0x2ee01: 0x6dca9c20, 0x2ee02: 0x6dca9e20, 0x2ee03: 0x6de62820, + 0x2ee04: 0x6de62a20, 0x2ee05: 0x6de62c20, 0x2ee06: 0x6de62e20, 0x2ee07: 0x6de63020, + 0x2ee08: 0x6de63220, 0x2ee09: 0x6de63420, 0x2ee0a: 0x6de63620, 0x2ee0b: 0x6de63820, + 0x2ee0c: 0x6dfd0020, 0x2ee0d: 0x6dfd0220, 0x2ee0e: 0x6dfd0420, 0x2ee0f: 0x6dfd0620, + 0x2ee10: 0x6dfd0820, 0x2ee11: 0x6dfd0a20, 0x2ee12: 0x6dfd0c20, 0x2ee13: 0x6e0fd620, + 0x2ee14: 0x6e0fd820, 0x2ee15: 0x6e1eb420, 0x2ee16: 0x6e0fda20, 0x2ee17: 0x6e1eb620, + 0x2ee18: 0x6e1eb820, 0x2ee19: 0x6e1eba20, 0x2ee1a: 0x6e2a1c20, 0x2ee1b: 0x6e32de20, + 0x2ee1c: 0x6c09fa20, 0x2ee1d: 0x6c3bac20, 0x2ee1e: 0x6c7a7820, 0x2ee1f: 0x6c7a7a20, + 0x2ee20: 0x6ca38020, 0x2ee21: 0x6cff4220, 0x2ee22: 0x6d856a20, 0x2ee23: 0x6de66820, + 0x2ee24: 0x6e1ec620, 0x2ee25: 0x6e32e420, 0x2ee26: 0x6c09fc20, 0x2ee27: 0x6c24a220, + 0x2ee28: 0x6c3bb620, 0x2ee29: 0x6c3bb820, 0x2ee2a: 0x6c57da20, 0x2ee2b: 0x6c57dc20, + 0x2ee2c: 0x6c57de20, 0x2ee2d: 0x6c57e020, 0x2ee2e: 0x6c57e220, 0x2ee2f: 0x6c57e420, + 0x2ee30: 0x6c57e620, 0x2ee31: 0x6c57e820, 0x2ee32: 0x6c57ea20, 0x2ee33: 0x6c7a9020, + 0x2ee34: 0x6c7a9220, 0x2ee35: 0x6c7a9420, 0x2ee36: 0x6ca39820, 0x2ee37: 0x6ca39a20, + 0x2ee38: 0x6ca39c20, 0x2ee39: 0x6cd17820, 0x2ee3a: 0x6cd17a20, 0x2ee3b: 0x6cd17c20, + 0x2ee3c: 0x6cd17e20, 0x2ee3d: 0x6cff6020, 0x2ee3e: 0x6cff6220, 0x2ee3f: 0x6cff6420, + // Block 0xbb9, offset 0x2ee40 + 0x2ee40: 0x6d2d9620, 0x2ee41: 0x6cff6620, 0x2ee42: 0x6d2da420, 0x2ee43: 0x6d2da620, + 0x2ee44: 0x6d2da820, 0x2ee45: 0x6d2daa20, 0x2ee46: 0x6d2dac20, 0x2ee47: 0x6d5acc20, + 0x2ee48: 0x6d5ace20, 0x2ee49: 0x6d5ad020, 0x2ee4a: 0x6d857a20, 0x2ee4b: 0x6d857c20, + 0x2ee4c: 0x6d857e20, 0x2ee4d: 0x6d858020, 0x2ee4e: 0x6d858220, 0x2ee4f: 0x6daa2020, + 0x2ee50: 0x6daa2220, 0x2ee51: 0x6daa2420, 0x2ee52: 0x6daa2620, 0x2ee53: 0x6dcaee20, + 0x2ee54: 0x6dcaf020, 0x2ee55: 0x6dcaf220, 0x2ee56: 0x6de66e20, 0x2ee57: 0x6e0ffa20, + 0x2ee58: 0x6c09fe20, 0x2ee59: 0x6c3bc420, 0x2ee5a: 0x6c57fe20, 0x2ee5b: 0x6ca3ba20, + 0x2ee5c: 0x6ca3bc20, 0x2ee5d: 0x6cff8a20, 0x2ee5e: 0x6cff8c20, 0x2ee5f: 0x6c0a0220, + 0x2ee60: 0x6c580a20, 0x2ee61: 0x6c7ab220, 0x2ee62: 0x6ca3be20, 0x2ee63: 0x6ca3c020, + 0x2ee64: 0x6cd1a420, 0x2ee65: 0x6cd1a620, 0x2ee66: 0x6cd1a820, 0x2ee67: 0x6d2dd620, + 0x2ee68: 0x6c0a0620, 0x2ee69: 0x6c0a0820, 0x2ee6a: 0x6c13d020, 0x2ee6b: 0x6c24aa20, + 0x2ee6c: 0x6c24ac20, 0x2ee6d: 0x6c581a20, 0x2ee6e: 0x6c581c20, 0x2ee6f: 0x6cd1b620, + 0x2ee70: 0x6c0a0a20, 0x2ee71: 0x6c0a0c20, 0x2ee72: 0x6c0a0e20, 0x2ee73: 0x6c0a1020, + 0x2ee74: 0x6c0a1220, 0x2ee75: 0x6c0a1420, 0x2ee76: 0x6c13d620, 0x2ee77: 0x6c24b620, + 0x2ee78: 0x6c24b820, 0x2ee79: 0x6c24ba20, 0x2ee7a: 0x6c24bc20, 0x2ee7b: 0x6c3be220, + 0x2ee7c: 0x6c24be20, 0x2ee7d: 0x6c3be420, 0x2ee7e: 0x6c3be620, 0x2ee7f: 0x6c3be820, + // Block 0xbba, offset 0x2ee80 + 0x2ee80: 0x6c3bea20, 0x2ee81: 0x6c3bec20, 0x2ee82: 0x6c3bee20, 0x2ee83: 0x6c3bf020, + 0x2ee84: 0x6c3bf220, 0x2ee85: 0x6c3bf420, 0x2ee86: 0x6c582420, 0x2ee87: 0x6c582620, + 0x2ee88: 0x6c582820, 0x2ee89: 0x6c582a20, 0x2ee8a: 0x6c582c20, 0x2ee8b: 0x6c582e20, + 0x2ee8c: 0x6c583020, 0x2ee8d: 0x6c583220, 0x2ee8e: 0x6c583420, 0x2ee8f: 0x6c583620, + 0x2ee90: 0x6c583820, 0x2ee91: 0x6c583a20, 0x2ee92: 0x6c583c20, 0x2ee93: 0x6c583e20, + 0x2ee94: 0x6c7abe20, 0x2ee95: 0x6c7ac020, 0x2ee96: 0x6c7ac220, 0x2ee97: 0x6c7ac420, + 0x2ee98: 0x6c7ac620, 0x2ee99: 0x6c7ac820, 0x2ee9a: 0x6c7aca20, 0x2ee9b: 0x6c7acc20, + 0x2ee9c: 0x6c7ace20, 0x2ee9d: 0x6c7ad020, 0x2ee9e: 0x6c7ad220, 0x2ee9f: 0x6c7ad420, + 0x2eea0: 0x6c7bac20, 0x2eea1: 0x6ca3d620, 0x2eea2: 0x6ca3d820, 0x2eea3: 0x6ca3da20, + 0x2eea4: 0x6ca3dc20, 0x2eea5: 0x6ca3de20, 0x2eea6: 0x6ca3e020, 0x2eea7: 0x6ca3e220, + 0x2eea8: 0x6ca89a20, 0x2eea9: 0x6ca3e420, 0x2eeaa: 0x6cd1be20, 0x2eeab: 0x6cd1c020, + 0x2eeac: 0x6cd1c220, 0x2eead: 0x6cd1c420, 0x2eeae: 0x6cd1c620, 0x2eeaf: 0x6cd1c820, + 0x2eeb0: 0x6ca3e620, 0x2eeb1: 0x6cd20620, 0x2eeb2: 0x6cd1ca20, 0x2eeb3: 0x6cd1cc20, + 0x2eeb4: 0x6cd1ce20, 0x2eeb5: 0x6cffaa20, 0x2eeb6: 0x6cffac20, 0x2eeb7: 0x6cffae20, + 0x2eeb8: 0x6cffb020, 0x2eeb9: 0x6cffb220, 0x2eeba: 0x6cffb420, 0x2eebb: 0x6d2de220, + 0x2eebc: 0x6d2de420, 0x2eebd: 0x6d2de620, 0x2eebe: 0x6d5b0420, 0x2eebf: 0x6d5b0620, + // Block 0xbbb, offset 0x2eec0 + 0x2eec0: 0x6d85a020, 0x2eec1: 0x6d85a220, 0x2eec2: 0x6d85a420, 0x2eec3: 0x6daa4620, + 0x2eec4: 0x6daa4820, 0x2eec5: 0x6dcb0e20, 0x2eec6: 0x6de68020, 0x2eec7: 0x6de68220, + 0x2eec8: 0x6dfd3620, 0x2eec9: 0x6dfd4820, 0x2eeca: 0x6e1ede20, 0x2eecb: 0x6c0a1a20, + 0x2eecc: 0x6c3c1420, 0x2eecd: 0x6c7b0e20, 0x2eece: 0x6cd20820, 0x2eecf: 0x6cd20a20, + 0x2eed0: 0x6d2e0420, 0x2eed1: 0x6d2e0620, 0x2eed2: 0x6c0a2020, 0x2eed3: 0x6c24d820, + 0x2eed4: 0x6c24da20, 0x2eed5: 0x6c24dc20, 0x2eed6: 0x6c24de20, 0x2eed7: 0x6c24e020, + 0x2eed8: 0x6c3c2020, 0x2eed9: 0x6c3c2220, 0x2eeda: 0x6c3c2420, 0x2eedb: 0x6c3c2620, + 0x2eedc: 0x6c3c2820, 0x2eedd: 0x6c3c2a20, 0x2eede: 0x6c3c2c20, 0x2eedf: 0x6c3c2e20, + 0x2eee0: 0x6c3c3020, 0x2eee1: 0x6c3c4220, 0x2eee2: 0x6c589c20, 0x2eee3: 0x6c589e20, + 0x2eee4: 0x6c58a020, 0x2eee5: 0x6c58a220, 0x2eee6: 0x6c58a420, 0x2eee7: 0x6c58a620, + 0x2eee8: 0x6c58a820, 0x2eee9: 0x6c58aa20, 0x2eeea: 0x6c58ac20, 0x2eeeb: 0x6c58ae20, + 0x2eeec: 0x6c58b020, 0x2eeed: 0x6c58b220, 0x2eeee: 0x6c58b420, 0x2eeef: 0x6c58b620, + 0x2eef0: 0x6c7b2c20, 0x2eef1: 0x6c7b2e20, 0x2eef2: 0x6c7b3020, 0x2eef3: 0x6c7b3220, + 0x2eef4: 0x6c7b3420, 0x2eef5: 0x6ca41a20, 0x2eef6: 0x6c7b3620, 0x2eef7: 0x6c7b3820, + 0x2eef8: 0x6c7b3a20, 0x2eef9: 0x6c7b3c20, 0x2eefa: 0x6c58b820, 0x2eefb: 0x6c7b3e20, + 0x2eefc: 0x6c7b4020, 0x2eefd: 0x6c7b4220, 0x2eefe: 0x6c7b4420, 0x2eeff: 0x6c7b4620, + // Block 0xbbc, offset 0x2ef00 + 0x2ef00: 0x6c7b4820, 0x2ef01: 0x6c7b4a20, 0x2ef02: 0x6c7b4c20, 0x2ef03: 0x6c7b4e20, + 0x2ef04: 0x6c7b5020, 0x2ef05: 0x6c7b5220, 0x2ef06: 0x6c7b5420, 0x2ef07: 0x6c7b5620, + 0x2ef08: 0x6c7b5820, 0x2ef09: 0x6c7b5a20, 0x2ef0a: 0x6ca42e20, 0x2ef0b: 0x6ca43020, + 0x2ef0c: 0x6ca43220, 0x2ef0d: 0x6ca43420, 0x2ef0e: 0x6ca43620, 0x2ef0f: 0x6ca43820, + 0x2ef10: 0x6ca43a20, 0x2ef11: 0x6ca43c20, 0x2ef12: 0x6ca43e20, 0x2ef13: 0x6ca44020, + 0x2ef14: 0x6ca44220, 0x2ef15: 0x6ca44420, 0x2ef16: 0x6ca44620, 0x2ef17: 0x6cd23020, + 0x2ef18: 0x6cd23220, 0x2ef19: 0x6cd23420, 0x2ef1a: 0x6cd23620, 0x2ef1b: 0x6cd23820, + 0x2ef1c: 0x6cd23a20, 0x2ef1d: 0x6cd23c20, 0x2ef1e: 0x6cd23e20, 0x2ef1f: 0x6cd24020, + 0x2ef20: 0x6cd24220, 0x2ef21: 0x6cd24420, 0x2ef22: 0x6cd24620, 0x2ef23: 0x6cd24820, + 0x2ef24: 0x6cd24a20, 0x2ef25: 0x6cd24c20, 0x2ef26: 0x6cd24e20, 0x2ef27: 0x6cd25020, + 0x2ef28: 0x6cd25220, 0x2ef29: 0x6cd25420, 0x2ef2a: 0x6cd25620, 0x2ef2b: 0x6cd25820, + 0x2ef2c: 0x6d000620, 0x2ef2d: 0x6d000820, 0x2ef2e: 0x6d000a20, 0x2ef2f: 0x6d000c20, + 0x2ef30: 0x6d000e20, 0x2ef31: 0x6d001020, 0x2ef32: 0x6d001220, 0x2ef33: 0x6d001420, + 0x2ef34: 0x6d001620, 0x2ef35: 0x6d001820, 0x2ef36: 0x6d001a20, 0x2ef37: 0x6d001c20, + 0x2ef38: 0x6d001e20, 0x2ef39: 0x6d002020, 0x2ef3a: 0x6d002220, 0x2ef3b: 0x6d002420, + 0x2ef3c: 0x6d002620, 0x2ef3d: 0x6d002820, 0x2ef3e: 0x6d002a20, 0x2ef3f: 0x6d002c20, + // Block 0xbbd, offset 0x2ef40 + 0x2ef40: 0x6d002e20, 0x2ef41: 0x6d003020, 0x2ef42: 0x6d003220, 0x2ef43: 0x6d003420, + 0x2ef44: 0x6d003620, 0x2ef45: 0x6d003820, 0x2ef46: 0x6d003a20, 0x2ef47: 0x6d2e2020, + 0x2ef48: 0x6d2e2220, 0x2ef49: 0x6d2e2420, 0x2ef4a: 0x6d2e2620, 0x2ef4b: 0x6d2e2820, + 0x2ef4c: 0x6d2e2a20, 0x2ef4d: 0x6d2e2c20, 0x2ef4e: 0x6d2e2e20, 0x2ef4f: 0x6d00b020, + 0x2ef50: 0x6d00b220, 0x2ef51: 0x6d2e3020, 0x2ef52: 0x6d2e3220, 0x2ef53: 0x6d2e3420, + 0x2ef54: 0x6d2e3620, 0x2ef55: 0x6d2e3820, 0x2ef56: 0x6d2e3a20, 0x2ef57: 0x6d2e3c20, + 0x2ef58: 0x6d2e3e20, 0x2ef59: 0x6d5b4a20, 0x2ef5a: 0x6d5b4c20, 0x2ef5b: 0x6d5b4e20, + 0x2ef5c: 0x6d5b5020, 0x2ef5d: 0x6d5b5220, 0x2ef5e: 0x6d5b5420, 0x2ef5f: 0x6d5b3020, + 0x2ef60: 0x6d5b5620, 0x2ef61: 0x6d5b5820, 0x2ef62: 0x6d5b5a20, 0x2ef63: 0x6d5b5c20, + 0x2ef64: 0x6d5b5e20, 0x2ef65: 0x6d5b6020, 0x2ef66: 0x6d5b6220, 0x2ef67: 0x6d2e4020, + 0x2ef68: 0x6d5b6420, 0x2ef69: 0x6d5b6620, 0x2ef6a: 0x6d5b6820, 0x2ef6b: 0x6d5b6a20, + 0x2ef6c: 0x6d85d420, 0x2ef6d: 0x6d85d620, 0x2ef6e: 0x6d85d820, 0x2ef6f: 0x6d85da20, + 0x2ef70: 0x6d85dc20, 0x2ef71: 0x6d85de20, 0x2ef72: 0x6d85e020, 0x2ef73: 0x6d85e220, + 0x2ef74: 0x6d85e420, 0x2ef75: 0x6d85e620, 0x2ef76: 0x6d85e820, 0x2ef77: 0x6d85ea20, + 0x2ef78: 0x6d85ec20, 0x2ef79: 0x6d85ee20, 0x2ef7a: 0x6d85f020, 0x2ef7b: 0x6d85f220, + 0x2ef7c: 0x6d85f420, 0x2ef7d: 0x6d85f620, 0x2ef7e: 0x6d85f820, 0x2ef7f: 0x6d85fa20, + // Block 0xbbe, offset 0x2ef80 + 0x2ef80: 0x6daa7420, 0x2ef81: 0x6daa7620, 0x2ef82: 0x6daa7820, 0x2ef83: 0x6daa7a20, + 0x2ef84: 0x6daa7c20, 0x2ef85: 0x6daa7e20, 0x2ef86: 0x6daa8020, 0x2ef87: 0x6daa8220, + 0x2ef88: 0x6daa8420, 0x2ef89: 0x6daa8620, 0x2ef8a: 0x6d85fc20, 0x2ef8b: 0x6daa8820, + 0x2ef8c: 0x6daa8a20, 0x2ef8d: 0x6daa8c20, 0x2ef8e: 0x6daa8e20, 0x2ef8f: 0x6dcb2c20, + 0x2ef90: 0x6dcb2e20, 0x2ef91: 0x6dcb3020, 0x2ef92: 0x6dcb3220, 0x2ef93: 0x6dcb3420, + 0x2ef94: 0x6dcb3620, 0x2ef95: 0x6dcb3820, 0x2ef96: 0x6dcb3a20, 0x2ef97: 0x6dcb3c20, + 0x2ef98: 0x6dcb3e20, 0x2ef99: 0x6dcb4020, 0x2ef9a: 0x6dcb4220, 0x2ef9b: 0x6dcb4420, + 0x2ef9c: 0x6dcb4620, 0x2ef9d: 0x6dcb4820, 0x2ef9e: 0x6dcb4a20, 0x2ef9f: 0x6de69c20, + 0x2efa0: 0x6de69e20, 0x2efa1: 0x6de6a020, 0x2efa2: 0x6dfd4c20, 0x2efa3: 0x6de6a220, + 0x2efa4: 0x6dcb8220, 0x2efa5: 0x6dfd4e20, 0x2efa6: 0x6dfd5020, 0x2efa7: 0x6e102420, + 0x2efa8: 0x6e102620, 0x2efa9: 0x6e102820, 0x2efaa: 0x6e102a20, 0x2efab: 0x6e102c20, + 0x2efac: 0x6e1eea20, 0x2efad: 0x6e1eec20, 0x2efae: 0x6e1eee20, 0x2efaf: 0x6e2a4a20, + 0x2efb0: 0x6e2a4c20, 0x2efb1: 0x6e32f220, 0x2efb2: 0x6e32f420, 0x2efb3: 0x6e3d8020, + 0x2efb4: 0x6e42ca20, 0x2efb5: 0x6e452a20, 0x2efb6: 0x6c0a2220, 0x2efb7: 0x6c3c4420, + 0x2efb8: 0x6c590220, 0x2efb9: 0x6c590420, 0x2efba: 0x6c590620, 0x2efbb: 0x6cd2b820, + 0x2efbc: 0x6cd2ba20, 0x2efbd: 0x6c0a2420, 0x2efbe: 0x6c13e020, 0x2efbf: 0x6c13e220, + // Block 0xbbf, offset 0x2efc0 + 0x2efc0: 0x6c24fa20, 0x2efc1: 0x6c24fc20, 0x2efc2: 0x6c24fe20, 0x2efc3: 0x6c250020, + 0x2efc4: 0x6c3c4620, 0x2efc5: 0x6c590e20, 0x2efc6: 0x6c591020, 0x2efc7: 0x6c591220, + 0x2efc8: 0x6c591420, 0x2efc9: 0x6ca48c20, 0x2efca: 0x6c7bae20, 0x2efcb: 0x6c7bb020, + 0x2efcc: 0x6c7bb220, 0x2efcd: 0x6c7bb420, 0x2efce: 0x6ca49220, 0x2efcf: 0x6ca49420, + 0x2efd0: 0x6ca49620, 0x2efd1: 0x6ca49820, 0x2efd2: 0x6cd2c420, 0x2efd3: 0x6cd2c620, + 0x2efd4: 0x6cd2c820, 0x2efd5: 0x6cd2ca20, 0x2efd6: 0x6cd2cc20, 0x2efd7: 0x6d00bc20, + 0x2efd8: 0x6d00be20, 0x2efd9: 0x6d00c020, 0x2efda: 0x6d5bde20, 0x2efdb: 0x6d5be020, + 0x2efdc: 0x6d5be220, 0x2efdd: 0x6d5be420, 0x2efde: 0x6d5be620, 0x2efdf: 0x6d865420, + 0x2efe0: 0x6d865620, 0x2efe1: 0x6d865820, 0x2efe2: 0x6dab0020, 0x2efe3: 0x6dab0220, + 0x2efe4: 0x6dab0420, 0x2efe5: 0x6dab0620, 0x2efe6: 0x6dcb8420, 0x2efe7: 0x6dcb8620, + 0x2efe8: 0x6dcb8820, 0x2efe9: 0x6de6de20, 0x2efea: 0x6dfd7420, 0x2efeb: 0x6dfd7620, + 0x2efec: 0x6e104620, 0x2efed: 0x6e1f0020, 0x2efee: 0x6c0a2620, 0x2efef: 0x6c3c5620, + 0x2eff0: 0x6c7bd820, 0x2eff1: 0x6c7bda20, 0x2eff2: 0x6ca4ac20, 0x2eff3: 0x6cd2f020, + 0x2eff4: 0x6cd2f220, 0x2eff5: 0x6d00e820, 0x2eff6: 0x6d2ecc20, 0x2eff7: 0x6d2ece20, + 0x2eff8: 0x6d2ed020, 0x2eff9: 0x6d2ed220, 0x2effa: 0x6d5bfc20, 0x2effb: 0x6d866620, + 0x2effc: 0x6dab1620, 0x2effd: 0x6dcb9420, 0x2effe: 0x6dfd8220, 0x2efff: 0x6c0a2820, + // Block 0xbc0, offset 0x2f000 + 0x2f000: 0x6c250c20, 0x2f001: 0x6c250e20, 0x2f002: 0x6c3c6820, 0x2f003: 0x6c595220, + 0x2f004: 0x6c595420, 0x2f005: 0x6c595620, 0x2f006: 0x6c595820, 0x2f007: 0x6c595a20, + 0x2f008: 0x6c595c20, 0x2f009: 0x6c7bf620, 0x2f00a: 0x6c7bf820, 0x2f00b: 0x6c7bfa20, + 0x2f00c: 0x6c7bfc20, 0x2f00d: 0x6c7bfe20, 0x2f00e: 0x6c7c0020, 0x2f00f: 0x6c7c0220, + 0x2f010: 0x6c7c0420, 0x2f011: 0x6c7c0620, 0x2f012: 0x6ca4c220, 0x2f013: 0x6ca4c420, + 0x2f014: 0x6ca4c620, 0x2f015: 0x6ca4c820, 0x2f016: 0x6ca4ca20, 0x2f017: 0x6ca4cc20, + 0x2f018: 0x6ca4ce20, 0x2f019: 0x6cd30c20, 0x2f01a: 0x6cd30e20, 0x2f01b: 0x6ca4d020, + 0x2f01c: 0x6cd31020, 0x2f01d: 0x6d010c20, 0x2f01e: 0x6d010e20, 0x2f01f: 0x6d011020, + 0x2f020: 0x6d2ef420, 0x2f021: 0x6d2ef620, 0x2f022: 0x6d2ef820, 0x2f023: 0x6d2efa20, + 0x2f024: 0x6d5c0c20, 0x2f025: 0x6d868220, 0x2f026: 0x6d868420, 0x2f027: 0x6d868620, + 0x2f028: 0x6dab2020, 0x2f029: 0x6dab2220, 0x2f02a: 0x6dab2420, 0x2f02b: 0x6dcba820, + 0x2f02c: 0x6dcbaa20, 0x2f02d: 0x6dfd8e20, 0x2f02e: 0x6c0a2a20, 0x2f02f: 0x6c251820, + 0x2f030: 0x6c3c8020, 0x2f031: 0x6c3c8220, 0x2f032: 0x6c3c8420, 0x2f033: 0x6c3c8620, + 0x2f034: 0x6c3c8820, 0x2f035: 0x6c3c8a20, 0x2f036: 0x6c598820, 0x2f037: 0x6c598a20, + 0x2f038: 0x6c598c20, 0x2f039: 0x6c598e20, 0x2f03a: 0x6c599020, 0x2f03b: 0x6c599220, + 0x2f03c: 0x6c599420, 0x2f03d: 0x6c599620, 0x2f03e: 0x6c599820, 0x2f03f: 0x6c599a20, + // Block 0xbc1, offset 0x2f040 + 0x2f040: 0x6c599c20, 0x2f041: 0x6c599e20, 0x2f042: 0x6c59a020, 0x2f043: 0x6c59a220, + 0x2f044: 0x6c59a420, 0x2f045: 0x6c59a620, 0x2f046: 0x6c59a820, 0x2f047: 0x6c59aa20, + 0x2f048: 0x6c59ac20, 0x2f049: 0x6c59ae20, 0x2f04a: 0x6c59b020, 0x2f04b: 0x6c59b220, + 0x2f04c: 0x6c59b420, 0x2f04d: 0x6c59b620, 0x2f04e: 0x6c7c3e20, 0x2f04f: 0x6c7c4020, + 0x2f050: 0x6c7c4220, 0x2f051: 0x6c7c4420, 0x2f052: 0x6c7c4620, 0x2f053: 0x6c7c4820, + 0x2f054: 0x6c7c4a20, 0x2f055: 0x6c7c4c20, 0x2f056: 0x6c7c4e20, 0x2f057: 0x6c7c5020, + 0x2f058: 0x6c7c5220, 0x2f059: 0x6c7c5420, 0x2f05a: 0x6c7c5620, 0x2f05b: 0x6c7c5820, + 0x2f05c: 0x6c7c5a20, 0x2f05d: 0x6c7c5c20, 0x2f05e: 0x6c7c5e20, 0x2f05f: 0x6c7c6020, + 0x2f060: 0x6c7c6220, 0x2f061: 0x6c7c6420, 0x2f062: 0x6c7c6620, 0x2f063: 0x6c7c6820, + 0x2f064: 0x6c7c6a20, 0x2f065: 0x6ca4ee20, 0x2f066: 0x6ca4f020, 0x2f067: 0x6c7c6c20, + 0x2f068: 0x6c7c6e20, 0x2f069: 0x6c7c7020, 0x2f06a: 0x6c7c7220, 0x2f06b: 0x6c7c7420, + 0x2f06c: 0x6c7c7620, 0x2f06d: 0x6ca50220, 0x2f06e: 0x6ca50420, 0x2f06f: 0x6ca50620, + 0x2f070: 0x6ca50820, 0x2f071: 0x6ca50a20, 0x2f072: 0x6ca50c20, 0x2f073: 0x6ca50e20, + 0x2f074: 0x6ca51020, 0x2f075: 0x6ca51220, 0x2f076: 0x6ca51420, 0x2f077: 0x6ca51620, + 0x2f078: 0x6ca51820, 0x2f079: 0x6ca51a20, 0x2f07a: 0x6ca51c20, 0x2f07b: 0x6ca51e20, + 0x2f07c: 0x6ca52020, 0x2f07d: 0x6ca52220, 0x2f07e: 0x6ca52420, 0x2f07f: 0x6c7c7820, + // Block 0xbc2, offset 0x2f080 + 0x2f080: 0x6ca59220, 0x2f081: 0x6ca52620, 0x2f082: 0x6cd35020, 0x2f083: 0x6cd35220, + 0x2f084: 0x6cd35420, 0x2f085: 0x6cd35620, 0x2f086: 0x6cd35820, 0x2f087: 0x6cd35a20, + 0x2f088: 0x6cd35c20, 0x2f089: 0x6cd35e20, 0x2f08a: 0x6cd36020, 0x2f08b: 0x6cd36220, + 0x2f08c: 0x6cd36420, 0x2f08d: 0x6cd36620, 0x2f08e: 0x6cd36820, 0x2f08f: 0x6cd36a20, + 0x2f090: 0x6cd36c20, 0x2f091: 0x6cd36e20, 0x2f092: 0x6d014220, 0x2f093: 0x6d014420, + 0x2f094: 0x6d014620, 0x2f095: 0x6d014820, 0x2f096: 0x6d014a20, 0x2f097: 0x6d014c20, + 0x2f098: 0x6d014e20, 0x2f099: 0x6d015020, 0x2f09a: 0x6d015220, 0x2f09b: 0x6d015420, + 0x2f09c: 0x6d015620, 0x2f09d: 0x6d015820, 0x2f09e: 0x6d015a20, 0x2f09f: 0x6d015c20, + 0x2f0a0: 0x6d015e20, 0x2f0a1: 0x6d01f620, 0x2f0a2: 0x6d016020, 0x2f0a3: 0x6d016220, + 0x2f0a4: 0x6d016420, 0x2f0a5: 0x6d016620, 0x2f0a6: 0x6d016820, 0x2f0a7: 0x6d016a20, + 0x2f0a8: 0x6d016c20, 0x2f0a9: 0x6d016e20, 0x2f0aa: 0x6d017020, 0x2f0ab: 0x6d017220, + 0x2f0ac: 0x6d017420, 0x2f0ad: 0x6d017620, 0x2f0ae: 0x6d2f2220, 0x2f0af: 0x6d2f2420, + 0x2f0b0: 0x6d2f2620, 0x2f0b1: 0x6d2f2820, 0x2f0b2: 0x6d2f2a20, 0x2f0b3: 0x6d2f2c20, + 0x2f0b4: 0x6d2f2e20, 0x2f0b5: 0x6d2f3020, 0x2f0b6: 0x6d2f3220, 0x2f0b7: 0x6d2f3420, + 0x2f0b8: 0x6d2f3620, 0x2f0b9: 0x6d01f820, 0x2f0ba: 0x6d2f3820, 0x2f0bb: 0x6d2f3a20, + 0x2f0bc: 0x6d2f3c20, 0x2f0bd: 0x6d2f3e20, 0x2f0be: 0x6d2f4020, 0x2f0bf: 0x6d2f4220, + // Block 0xbc3, offset 0x2f0c0 + 0x2f0c0: 0x6d2f4420, 0x2f0c1: 0x6d2f4620, 0x2f0c2: 0x6d2f4820, 0x2f0c3: 0x6d2f4a20, + 0x2f0c4: 0x6d2f4c20, 0x2f0c5: 0x6d2f4e20, 0x2f0c6: 0x6d2f5020, 0x2f0c7: 0x6d5c3e20, + 0x2f0c8: 0x6d5c4020, 0x2f0c9: 0x6d5c4220, 0x2f0ca: 0x6d5c4420, 0x2f0cb: 0x6d5c4620, + 0x2f0cc: 0x6d5c4820, 0x2f0cd: 0x6d5c4a20, 0x2f0ce: 0x6d5c4c20, 0x2f0cf: 0x6d5c4e20, + 0x2f0d0: 0x6d5c5020, 0x2f0d1: 0x6d5c5220, 0x2f0d2: 0x6d5c5420, 0x2f0d3: 0x6d5c5620, + 0x2f0d4: 0x6d86c020, 0x2f0d5: 0x6d86c220, 0x2f0d6: 0x6d86c420, 0x2f0d7: 0x6d86c620, + 0x2f0d8: 0x6d86c820, 0x2f0d9: 0x6d86ca20, 0x2f0da: 0x6d86cc20, 0x2f0db: 0x6d86ce20, + 0x2f0dc: 0x6d86d020, 0x2f0dd: 0x6d86d220, 0x2f0de: 0x6d86d420, 0x2f0df: 0x6d86d620, + 0x2f0e0: 0x6d86d820, 0x2f0e1: 0x6d86da20, 0x2f0e2: 0x6d86dc20, 0x2f0e3: 0x6d86de20, + 0x2f0e4: 0x6dab6020, 0x2f0e5: 0x6d875220, 0x2f0e6: 0x6dab6220, 0x2f0e7: 0x6dab6420, + 0x2f0e8: 0x6dab6620, 0x2f0e9: 0x6dab6820, 0x2f0ea: 0x6dab6a20, 0x2f0eb: 0x6dab6c20, + 0x2f0ec: 0x6dab6e20, 0x2f0ed: 0x6dab7020, 0x2f0ee: 0x6dab7220, 0x2f0ef: 0x6dab7420, + 0x2f0f0: 0x6dab7620, 0x2f0f1: 0x6dab7820, 0x2f0f2: 0x6dab7a20, 0x2f0f3: 0x6dab7c20, + 0x2f0f4: 0x6dab7e20, 0x2f0f5: 0x6dab8020, 0x2f0f6: 0x6dab8220, 0x2f0f7: 0x6dab8420, + 0x2f0f8: 0x6dcbcc20, 0x2f0f9: 0x6dcbce20, 0x2f0fa: 0x6dcbd020, 0x2f0fb: 0x6dcbd220, + 0x2f0fc: 0x6dcbd420, 0x2f0fd: 0x6dcbd620, 0x2f0fe: 0x6dcbd820, 0x2f0ff: 0x6dcbda20, + // Block 0xbc4, offset 0x2f100 + 0x2f100: 0x6dcbdc20, 0x2f101: 0x6dcbde20, 0x2f102: 0x6dcbe020, 0x2f103: 0x6de70c20, + 0x2f104: 0x6de70e20, 0x2f105: 0x6de71020, 0x2f106: 0x6de71220, 0x2f107: 0x6de71420, + 0x2f108: 0x6de71620, 0x2f109: 0x6de71820, 0x2f10a: 0x6de71a20, 0x2f10b: 0x6dfdae20, + 0x2f10c: 0x6dfdb020, 0x2f10d: 0x6dfdb220, 0x2f10e: 0x6dfdb420, 0x2f10f: 0x6dfdb620, + 0x2f110: 0x6e106020, 0x2f111: 0x6e106220, 0x2f112: 0x6e106420, 0x2f113: 0x6e106620, + 0x2f114: 0x6e2a6c20, 0x2f115: 0x6e331420, 0x2f116: 0x6e332020, 0x2f117: 0x6e331620, + 0x2f118: 0x6e393a20, 0x2f119: 0x6e393c20, 0x2f11a: 0x6e3d8a20, 0x2f11b: 0x6c0a2c20, + 0x2f11c: 0x6c5a1c20, 0x2f11d: 0x6c7cd620, 0x2f11e: 0x6cd3f420, 0x2f11f: 0x6cd3f620, + 0x2f120: 0x6d01fa20, 0x2f121: 0x6e394020, 0x2f122: 0x6c0a2e20, 0x2f123: 0x6c253220, + 0x2f124: 0x6c3cb620, 0x2f125: 0x6c3cb820, 0x2f126: 0x6c5a2420, 0x2f127: 0x6c5a2620, + 0x2f128: 0x6c5a2820, 0x2f129: 0x6c7ce820, 0x2f12a: 0x6ca59e20, 0x2f12b: 0x6ca5a020, + 0x2f12c: 0x6cd40c20, 0x2f12d: 0x6cd40e20, 0x2f12e: 0x6d020820, 0x2f12f: 0x6dabf820, + 0x2f130: 0x6dabfa20, 0x2f131: 0x6de76020, 0x2f132: 0x6dfde820, 0x2f133: 0x6c0a3020, + 0x2f134: 0x6c253a20, 0x2f135: 0x6c253c20, 0x2f136: 0x6c253e20, 0x2f137: 0x6c3cc020, + 0x2f138: 0x6c3cc220, 0x2f139: 0x6c3cc420, 0x2f13a: 0x6c3cc620, 0x2f13b: 0x6c3cc820, + 0x2f13c: 0x6c3cca20, 0x2f13d: 0x6c3ccc20, 0x2f13e: 0x6c3cce20, 0x2f13f: 0x6c3cd020, + // Block 0xbc5, offset 0x2f140 + 0x2f140: 0x6c3cd220, 0x2f141: 0x6c3cd420, 0x2f142: 0x6c5a4820, 0x2f143: 0x6c5a4a20, + 0x2f144: 0x6c5a4c20, 0x2f145: 0x6c5a4e20, 0x2f146: 0x6c5a5020, 0x2f147: 0x6c5a5220, + 0x2f148: 0x6c5a5420, 0x2f149: 0x6c5a5620, 0x2f14a: 0x6c5a5820, 0x2f14b: 0x6c5a5a20, + 0x2f14c: 0x6c5a5c20, 0x2f14d: 0x6c5a5e20, 0x2f14e: 0x6c5a6020, 0x2f14f: 0x6c5a6220, + 0x2f150: 0x6c5a6420, 0x2f151: 0x6c5a6620, 0x2f152: 0x6c5a6820, 0x2f153: 0x6c5a6a20, + 0x2f154: 0x6c5a6c20, 0x2f155: 0x6c5a6e20, 0x2f156: 0x6c5a7020, 0x2f157: 0x6c5a7220, + 0x2f158: 0x6c5a7420, 0x2f159: 0x6c5a7620, 0x2f15a: 0x6c5a7820, 0x2f15b: 0x6c5a7a20, + 0x2f15c: 0x6c5a7c20, 0x2f15d: 0x6c7d1220, 0x2f15e: 0x6c7d1420, 0x2f15f: 0x6c7d1620, + 0x2f160: 0x6c7d1820, 0x2f161: 0x6c7d1a20, 0x2f162: 0x6c7d1c20, 0x2f163: 0x6c7d1e20, + 0x2f164: 0x6c7d2020, 0x2f165: 0x6c7d2220, 0x2f166: 0x6ca5ce20, 0x2f167: 0x6c7d2420, + 0x2f168: 0x6c7d2620, 0x2f169: 0x6c7d2820, 0x2f16a: 0x6c7d2a20, 0x2f16b: 0x6c7d2c20, + 0x2f16c: 0x6c7d2e20, 0x2f16d: 0x6c7d3020, 0x2f16e: 0x6c7d3220, 0x2f16f: 0x6c7d3420, + 0x2f170: 0x6c7d3620, 0x2f171: 0x6c7d3820, 0x2f172: 0x6c7d3a20, 0x2f173: 0x6c7d3c20, + 0x2f174: 0x6c7d3e20, 0x2f175: 0x6c7d4020, 0x2f176: 0x6c7d4220, 0x2f177: 0x6c7d4420, + 0x2f178: 0x6c7d4620, 0x2f179: 0x6c7d4820, 0x2f17a: 0x6c7d4a20, 0x2f17b: 0x6c7d4c20, + 0x2f17c: 0x6c7d4e20, 0x2f17d: 0x6c7d5020, 0x2f17e: 0x6c7d5220, 0x2f17f: 0x6c7d5420, + // Block 0xbc6, offset 0x2f180 + 0x2f180: 0x6c7d5620, 0x2f181: 0x6c7d5820, 0x2f182: 0x6ca5de20, 0x2f183: 0x6ca5e020, + 0x2f184: 0x6ca5e220, 0x2f185: 0x6ca5e420, 0x2f186: 0x6ca5e620, 0x2f187: 0x6ca5e820, + 0x2f188: 0x6ca5ea20, 0x2f189: 0x6ca5ec20, 0x2f18a: 0x6ca5ee20, 0x2f18b: 0x6ca5f020, + 0x2f18c: 0x6ca5f220, 0x2f18d: 0x6ca5f420, 0x2f18e: 0x6ca5f620, 0x2f18f: 0x6ca5f820, + 0x2f190: 0x6ca5fa20, 0x2f191: 0x6ca5fc20, 0x2f192: 0x6ca5fe20, 0x2f193: 0x6ca60020, + 0x2f194: 0x6ca60220, 0x2f195: 0x6ca60420, 0x2f196: 0x6ca60620, 0x2f197: 0x6ca60820, + 0x2f198: 0x6ca60a20, 0x2f199: 0x6ca60c20, 0x2f19a: 0x6ca60e20, 0x2f19b: 0x6ca61020, + 0x2f19c: 0x6cd43420, 0x2f19d: 0x6cd43620, 0x2f19e: 0x6cd43820, 0x2f19f: 0x6cd43a20, + 0x2f1a0: 0x6cd43c20, 0x2f1a1: 0x6cd43e20, 0x2f1a2: 0x6cd44020, 0x2f1a3: 0x6cd44220, + 0x2f1a4: 0x6cd44420, 0x2f1a5: 0x6cd44620, 0x2f1a6: 0x6cd44820, 0x2f1a7: 0x6cd44a20, + 0x2f1a8: 0x6cd44c20, 0x2f1a9: 0x6cd44e20, 0x2f1aa: 0x6cd45020, 0x2f1ab: 0x6cd45220, + 0x2f1ac: 0x6cd45420, 0x2f1ad: 0x6cd45620, 0x2f1ae: 0x6cd45820, 0x2f1af: 0x6cd45a20, + 0x2f1b0: 0x6cd45c20, 0x2f1b1: 0x6cd45e20, 0x2f1b2: 0x6cd46020, 0x2f1b3: 0x6cd46220, + 0x2f1b4: 0x6cd46420, 0x2f1b5: 0x6cd46620, 0x2f1b6: 0x6cd46820, 0x2f1b7: 0x6cd46a20, + 0x2f1b8: 0x6d025220, 0x2f1b9: 0x6d025420, 0x2f1ba: 0x6d025620, 0x2f1bb: 0x6d025820, + 0x2f1bc: 0x6d025a20, 0x2f1bd: 0x6d025c20, 0x2f1be: 0x6d300e20, 0x2f1bf: 0x6d025e20, + // Block 0xbc7, offset 0x2f1c0 + 0x2f1c0: 0x6d026020, 0x2f1c1: 0x6d026220, 0x2f1c2: 0x6d026420, 0x2f1c3: 0x6d026620, + 0x2f1c4: 0x6d026820, 0x2f1c5: 0x6d026a20, 0x2f1c6: 0x6d026c20, 0x2f1c7: 0x6d026e20, + 0x2f1c8: 0x6d027020, 0x2f1c9: 0x6d027220, 0x2f1ca: 0x6d027420, 0x2f1cb: 0x6d027620, + 0x2f1cc: 0x6d027820, 0x2f1cd: 0x6d027a20, 0x2f1ce: 0x6d027c20, 0x2f1cf: 0x6d027e20, + 0x2f1d0: 0x6d028020, 0x2f1d1: 0x6d028220, 0x2f1d2: 0x6d028420, 0x2f1d3: 0x6d028620, + 0x2f1d4: 0x6d028820, 0x2f1d5: 0x6d028a20, 0x2f1d6: 0x6d028c20, 0x2f1d7: 0x6d028e20, + 0x2f1d8: 0x6d029020, 0x2f1d9: 0x6d029220, 0x2f1da: 0x6d029420, 0x2f1db: 0x6d029620, + 0x2f1dc: 0x6d029820, 0x2f1dd: 0x6d301020, 0x2f1de: 0x6d301220, 0x2f1df: 0x6d301420, + 0x2f1e0: 0x6d301620, 0x2f1e1: 0x6d301820, 0x2f1e2: 0x6d301a20, 0x2f1e3: 0x6d301c20, + 0x2f1e4: 0x6d301e20, 0x2f1e5: 0x6d302020, 0x2f1e6: 0x6d302220, 0x2f1e7: 0x6d302420, + 0x2f1e8: 0x6d302620, 0x2f1e9: 0x6d302820, 0x2f1ea: 0x6d302a20, 0x2f1eb: 0x6d302c20, + 0x2f1ec: 0x6d302e20, 0x2f1ed: 0x6d303020, 0x2f1ee: 0x6d303220, 0x2f1ef: 0x6d303420, + 0x2f1f0: 0x6d029a20, 0x2f1f1: 0x6d303620, 0x2f1f2: 0x6d303820, 0x2f1f3: 0x6d303a20, + 0x2f1f4: 0x6d303c20, 0x2f1f5: 0x6d303e20, 0x2f1f6: 0x6d304020, 0x2f1f7: 0x6d304220, + 0x2f1f8: 0x6d304420, 0x2f1f9: 0x6d304620, 0x2f1fa: 0x6d5d0620, 0x2f1fb: 0x6d5d0820, + 0x2f1fc: 0x6d5d0a20, 0x2f1fd: 0x6d5d0c20, 0x2f1fe: 0x6d5d0e20, 0x2f1ff: 0x6d5d1020, + // Block 0xbc8, offset 0x2f200 + 0x2f200: 0x6d5d1220, 0x2f201: 0x6d304820, 0x2f202: 0x6d5d1420, 0x2f203: 0x6d5d1620, + 0x2f204: 0x6d5d1820, 0x2f205: 0x6d5d1a20, 0x2f206: 0x6d5d1c20, 0x2f207: 0x6d5d1e20, + 0x2f208: 0x6d5d2020, 0x2f209: 0x6d5d2220, 0x2f20a: 0x6d5d2420, 0x2f20b: 0x6d5d2620, + 0x2f20c: 0x6d5d2820, 0x2f20d: 0x6d5d2a20, 0x2f20e: 0x6d5d2c20, 0x2f20f: 0x6d5d2e20, + 0x2f210: 0x6d5d3020, 0x2f211: 0x6d5d3220, 0x2f212: 0x6d5d3420, 0x2f213: 0x6d5d3620, + 0x2f214: 0x6d5d3820, 0x2f215: 0x6d5d3a20, 0x2f216: 0x6d876620, 0x2f217: 0x6d5d3c20, + 0x2f218: 0x6d5d3e20, 0x2f219: 0x6d5d4020, 0x2f21a: 0x6d877a20, 0x2f21b: 0x6d877c20, + 0x2f21c: 0x6d876820, 0x2f21d: 0x6d877e20, 0x2f21e: 0x6d878020, 0x2f21f: 0x6d878220, + 0x2f220: 0x6d878420, 0x2f221: 0x6d878620, 0x2f222: 0x6d878820, 0x2f223: 0x6d878a20, + 0x2f224: 0x6d5d4220, 0x2f225: 0x6d878c20, 0x2f226: 0x6d878e20, 0x2f227: 0x6d879020, + 0x2f228: 0x6d879220, 0x2f229: 0x6d879420, 0x2f22a: 0x6d879620, 0x2f22b: 0x6d879820, + 0x2f22c: 0x6d879a20, 0x2f22d: 0x6d879c20, 0x2f22e: 0x6d879e20, 0x2f22f: 0x6dac1c20, + 0x2f230: 0x6dac1e20, 0x2f231: 0x6dac2020, 0x2f232: 0x6dac2220, 0x2f233: 0x6dac2420, + 0x2f234: 0x6dac2620, 0x2f235: 0x6dac2820, 0x2f236: 0x6dac2a20, 0x2f237: 0x6dac2c20, + 0x2f238: 0x6dac2e20, 0x2f239: 0x6dac3020, 0x2f23a: 0x6dac3220, 0x2f23b: 0x6dac3420, + 0x2f23c: 0x6dac3620, 0x2f23d: 0x6dac3820, 0x2f23e: 0x6dac3a20, 0x2f23f: 0x6dac3c20, + // Block 0xbc9, offset 0x2f240 + 0x2f240: 0x6dac3e20, 0x2f241: 0x6dac4020, 0x2f242: 0x6dac4220, 0x2f243: 0x6dac4420, + 0x2f244: 0x6dac4620, 0x2f245: 0x6dac4820, 0x2f246: 0x6dcc5020, 0x2f247: 0x6dcc5220, + 0x2f248: 0x6dcc5420, 0x2f249: 0x6dcc5620, 0x2f24a: 0x6dcc5820, 0x2f24b: 0x6dcc5a20, + 0x2f24c: 0x6dcc5c20, 0x2f24d: 0x6dcc5e20, 0x2f24e: 0x6dcc6020, 0x2f24f: 0x6dcc6220, + 0x2f250: 0x6dcc6420, 0x2f251: 0x6dcc6620, 0x2f252: 0x6dcc6820, 0x2f253: 0x6dcc6a20, + 0x2f254: 0x6dcc6c20, 0x2f255: 0x6dcc6e20, 0x2f256: 0x6dcc7020, 0x2f257: 0x6de76c20, + 0x2f258: 0x6de76e20, 0x2f259: 0x6de77020, 0x2f25a: 0x6de77220, 0x2f25b: 0x6de77420, + 0x2f25c: 0x6de77620, 0x2f25d: 0x6de77820, 0x2f25e: 0x6de77a20, 0x2f25f: 0x6de77c20, + 0x2f260: 0x6de77e20, 0x2f261: 0x6de78020, 0x2f262: 0x6dfdf220, 0x2f263: 0x6dfdf420, + 0x2f264: 0x6dfdf620, 0x2f265: 0x6dfdf820, 0x2f266: 0x6dfdfa20, 0x2f267: 0x6dfdfc20, + 0x2f268: 0x6dfdfe20, 0x2f269: 0x6dfe0020, 0x2f26a: 0x6dfe0220, 0x2f26b: 0x6dfe0420, + 0x2f26c: 0x6dfe0620, 0x2f26d: 0x6e109420, 0x2f26e: 0x6e109620, 0x2f26f: 0x6e109820, + 0x2f270: 0x6e109a20, 0x2f271: 0x6e109c20, 0x2f272: 0x6e109e20, 0x2f273: 0x6e10a020, + 0x2f274: 0x6e10a220, 0x2f275: 0x6e1f3820, 0x2f276: 0x6e2a8820, 0x2f277: 0x6e2a8a20, + 0x2f278: 0x6e332620, 0x2f279: 0x6e394220, 0x2f27a: 0x6c0a3420, 0x2f27b: 0x6c04fe20, + 0x2f27c: 0x6c13f620, 0x2f27d: 0x6c254e20, 0x2f27e: 0x6c3cee20, 0x2f27f: 0x6c3cf020, + // Block 0xbca, offset 0x2f280 + 0x2f280: 0x6c3cf220, 0x2f281: 0x6c3cf420, 0x2f282: 0x6c3cf620, 0x2f283: 0x6c3cf820, + 0x2f284: 0x6c5ac620, 0x2f285: 0x6c5ac820, 0x2f286: 0x6c5aca20, 0x2f287: 0x6c5acc20, + 0x2f288: 0x6c5ace20, 0x2f289: 0x6c5ad020, 0x2f28a: 0x6c5ad220, 0x2f28b: 0x6c5ad420, + 0x2f28c: 0x6c5ad620, 0x2f28d: 0x6c5ad820, 0x2f28e: 0x6c5ada20, 0x2f28f: 0x6c7dc420, + 0x2f290: 0x6c7dc620, 0x2f291: 0x6c7dc820, 0x2f292: 0x6c7dca20, 0x2f293: 0x6c7dcc20, + 0x2f294: 0x6c7dce20, 0x2f295: 0x6c7dd020, 0x2f296: 0x6c7dd220, 0x2f297: 0x6c7dd420, + 0x2f298: 0x6c7dd620, 0x2f299: 0x6c7dd820, 0x2f29a: 0x6c7dda20, 0x2f29b: 0x6c7ddc20, + 0x2f29c: 0x6c7dde20, 0x2f29d: 0x6c7de020, 0x2f29e: 0x6c7de220, 0x2f29f: 0x6c7de420, + 0x2f2a0: 0x6c7de620, 0x2f2a1: 0x6ca68a20, 0x2f2a2: 0x6c7de820, 0x2f2a3: 0x6ca69220, + 0x2f2a4: 0x6ca69420, 0x2f2a5: 0x6ca69620, 0x2f2a6: 0x6cd4c020, 0x2f2a7: 0x6ca69820, + 0x2f2a8: 0x6ca69a20, 0x2f2a9: 0x6ca69c20, 0x2f2aa: 0x6ca69e20, 0x2f2ab: 0x6ca6a020, + 0x2f2ac: 0x6ca6a220, 0x2f2ad: 0x6ca6a420, 0x2f2ae: 0x6ca6a620, 0x2f2af: 0x6ca6a820, + 0x2f2b0: 0x6cd4c220, 0x2f2b1: 0x6cd4c420, 0x2f2b2: 0x6cd4c620, 0x2f2b3: 0x6cd4c820, + 0x2f2b4: 0x6cd4ca20, 0x2f2b5: 0x6cd4cc20, 0x2f2b6: 0x6cd4ce20, 0x2f2b7: 0x6cd4d020, + 0x2f2b8: 0x6cd4d220, 0x2f2b9: 0x6d031820, 0x2f2ba: 0x6d031a20, 0x2f2bb: 0x6d031c20, + 0x2f2bc: 0x6d031e20, 0x2f2bd: 0x6d032020, 0x2f2be: 0x6d032220, 0x2f2bf: 0x6d032420, + // Block 0xbcb, offset 0x2f2c0 + 0x2f2c0: 0x6d032620, 0x2f2c1: 0x6d032820, 0x2f2c2: 0x6d032a20, 0x2f2c3: 0x6d032c20, + 0x2f2c4: 0x6cd4d420, 0x2f2c5: 0x6d032e20, 0x2f2c6: 0x6d033020, 0x2f2c7: 0x6d30be20, + 0x2f2c8: 0x6d30c020, 0x2f2c9: 0x6d30c220, 0x2f2ca: 0x6d30c420, 0x2f2cb: 0x6d30c620, + 0x2f2cc: 0x6d30c820, 0x2f2cd: 0x6d30ca20, 0x2f2ce: 0x6d30cc20, 0x2f2cf: 0x6d30ce20, + 0x2f2d0: 0x6d30d020, 0x2f2d1: 0x6d30d220, 0x2f2d2: 0x6d30d420, 0x2f2d3: 0x6d30d620, + 0x2f2d4: 0x6d30d820, 0x2f2d5: 0x6d30da20, 0x2f2d6: 0x6d30dc20, 0x2f2d7: 0x6d30de20, + 0x2f2d8: 0x6d30e020, 0x2f2d9: 0x6d30e220, 0x2f2da: 0x6d5d8c20, 0x2f2db: 0x6d5d8e20, + 0x2f2dc: 0x6d5d9020, 0x2f2dd: 0x6d5d9220, 0x2f2de: 0x6d5d9420, 0x2f2df: 0x6d5d9620, + 0x2f2e0: 0x6d5d9820, 0x2f2e1: 0x6d5d9a20, 0x2f2e2: 0x6d5d9c20, 0x2f2e3: 0x6d5d9e20, + 0x2f2e4: 0x6d87fe20, 0x2f2e5: 0x6d880020, 0x2f2e6: 0x6d880220, 0x2f2e7: 0x6daca020, + 0x2f2e8: 0x6daca220, 0x2f2e9: 0x6d880420, 0x2f2ea: 0x6daca420, 0x2f2eb: 0x6daca620, + 0x2f2ec: 0x6dcca420, 0x2f2ed: 0x6dcca620, 0x2f2ee: 0x6dcca820, 0x2f2ef: 0x6dccaa20, + 0x2f2f0: 0x6de7ac20, 0x2f2f1: 0x6de7ae20, 0x2f2f2: 0x6dfe3a20, 0x2f2f3: 0x6e1f5620, + 0x2f2f4: 0x6e1f5820, 0x2f2f5: 0x6e2aa020, 0x2f2f6: 0x6e333020, 0x2f2f7: 0x6e333220, + 0x2f2f8: 0x6c0a3820, 0x2f2f9: 0x6c5b2a20, 0x2f2fa: 0x6c5b2c20, 0x2f2fb: 0x6ca6f420, + 0x2f2fc: 0x6cd52620, 0x2f2fd: 0x6d037620, 0x2f2fe: 0x6c0a3c20, 0x2f2ff: 0x6c256820, + // Block 0xbcc, offset 0x2f300 + 0x2f300: 0x6c256a20, 0x2f301: 0x6c256c20, 0x2f302: 0x6c256e20, 0x2f303: 0x6c257020, + 0x2f304: 0x6c3d3a20, 0x2f305: 0x6c3d3c20, 0x2f306: 0x6c3d3e20, 0x2f307: 0x6c3d4020, + 0x2f308: 0x6c3d4220, 0x2f309: 0x6c3d4420, 0x2f30a: 0x6c3d4620, 0x2f30b: 0x6c5b3e20, + 0x2f30c: 0x6c5b4020, 0x2f30d: 0x6c5b4220, 0x2f30e: 0x6c5b4420, 0x2f30f: 0x6c5b4620, + 0x2f310: 0x6c5b4820, 0x2f311: 0x6c5b4a20, 0x2f312: 0x6c5b4c20, 0x2f313: 0x6c5b4e20, + 0x2f314: 0x6c5b5020, 0x2f315: 0x6c5b5220, 0x2f316: 0x6c5b5420, 0x2f317: 0x6c5b5620, + 0x2f318: 0x6c7e3820, 0x2f319: 0x6c7e3a20, 0x2f31a: 0x6c7e3c20, 0x2f31b: 0x6c7e3e20, + 0x2f31c: 0x6c7e4020, 0x2f31d: 0x6c7e4220, 0x2f31e: 0x6c7e4420, 0x2f31f: 0x6c7e4620, + 0x2f320: 0x6c7e4820, 0x2f321: 0x6c7e4a20, 0x2f322: 0x6c7e4c20, 0x2f323: 0x6c7e4e20, + 0x2f324: 0x6c7e5020, 0x2f325: 0x6c7e5220, 0x2f326: 0x6c7e5420, 0x2f327: 0x6c7e5620, + 0x2f328: 0x6c7e5820, 0x2f329: 0x6c7e5a20, 0x2f32a: 0x6c7e5c20, 0x2f32b: 0x6c7e5e20, + 0x2f32c: 0x6c7e6020, 0x2f32d: 0x6c7e6220, 0x2f32e: 0x6c7e6420, 0x2f32f: 0x6c7e6620, + 0x2f330: 0x6c7e6820, 0x2f331: 0x6ca71a20, 0x2f332: 0x6ca71c20, 0x2f333: 0x6ca71e20, + 0x2f334: 0x6ca72020, 0x2f335: 0x6ca72220, 0x2f336: 0x6ca72420, 0x2f337: 0x6ca72620, + 0x2f338: 0x6ca72820, 0x2f339: 0x6ca72a20, 0x2f33a: 0x6ca72c20, 0x2f33b: 0x6ca72e20, + 0x2f33c: 0x6ca73020, 0x2f33d: 0x6ca73220, 0x2f33e: 0x6ca73420, 0x2f33f: 0x6cd54020, + // Block 0xbcd, offset 0x2f340 + 0x2f340: 0x6cd54220, 0x2f341: 0x6cd54420, 0x2f342: 0x6cd54620, 0x2f343: 0x6cd54820, + 0x2f344: 0x6cd54a20, 0x2f345: 0x6cd54c20, 0x2f346: 0x6ca73620, 0x2f347: 0x6cd54e20, + 0x2f348: 0x6cd55020, 0x2f349: 0x6cd55220, 0x2f34a: 0x6cd55420, 0x2f34b: 0x6cd55620, + 0x2f34c: 0x6cd55820, 0x2f34d: 0x6cd55a20, 0x2f34e: 0x6cd55c20, 0x2f34f: 0x6d039420, + 0x2f350: 0x6d039620, 0x2f351: 0x6d039820, 0x2f352: 0x6d039a20, 0x2f353: 0x6d039c20, + 0x2f354: 0x6d039e20, 0x2f355: 0x6d03a020, 0x2f356: 0x6d03a220, 0x2f357: 0x6d03a420, + 0x2f358: 0x6d03a620, 0x2f359: 0x6d03a820, 0x2f35a: 0x6d03aa20, 0x2f35b: 0x6d03ac20, + 0x2f35c: 0x6d03ae20, 0x2f35d: 0x6d03b020, 0x2f35e: 0x6d03b220, 0x2f35f: 0x6d03b420, + 0x2f360: 0x6d03b620, 0x2f361: 0x6d03b820, 0x2f362: 0x6d03ba20, 0x2f363: 0x6d03bc20, + 0x2f364: 0x6d03be20, 0x2f365: 0x6d03c020, 0x2f366: 0x6d313220, 0x2f367: 0x6d313420, + 0x2f368: 0x6d313620, 0x2f369: 0x6d313820, 0x2f36a: 0x6d313a20, 0x2f36b: 0x6d313c20, + 0x2f36c: 0x6d313e20, 0x2f36d: 0x6d314020, 0x2f36e: 0x6d314220, 0x2f36f: 0x6d314420, + 0x2f370: 0x6d314620, 0x2f371: 0x6d314820, 0x2f372: 0x6d314a20, 0x2f373: 0x6d314c20, + 0x2f374: 0x6d5dee20, 0x2f375: 0x6d31c220, 0x2f376: 0x6d5df020, 0x2f377: 0x6d5df220, + 0x2f378: 0x6d5df420, 0x2f379: 0x6d5df620, 0x2f37a: 0x6d5df820, 0x2f37b: 0x6d5dfa20, + 0x2f37c: 0x6d5dfc20, 0x2f37d: 0x6d5dfe20, 0x2f37e: 0x6d5e0020, 0x2f37f: 0x6d5e0220, + // Block 0xbce, offset 0x2f380 + 0x2f380: 0x6d5e0420, 0x2f381: 0x6d5e0620, 0x2f382: 0x6d5e0820, 0x2f383: 0x6d5e0a20, + 0x2f384: 0x6d884220, 0x2f385: 0x6d884420, 0x2f386: 0x6d884620, 0x2f387: 0x6d884820, + 0x2f388: 0x6d884a20, 0x2f389: 0x6dacd420, 0x2f38a: 0x6d314e20, 0x2f38b: 0x6d884c20, + 0x2f38c: 0x6d884e20, 0x2f38d: 0x6d885020, 0x2f38e: 0x6d885220, 0x2f38f: 0x6d885420, + 0x2f390: 0x6d885620, 0x2f391: 0x6d885820, 0x2f392: 0x6d885a20, 0x2f393: 0x6d88ba20, + 0x2f394: 0x6dacd620, 0x2f395: 0x6dacd820, 0x2f396: 0x6dacda20, 0x2f397: 0x6dacdc20, + 0x2f398: 0x6dacde20, 0x2f399: 0x6dace020, 0x2f39a: 0x6dace220, 0x2f39b: 0x6dace420, + 0x2f39c: 0x6dace620, 0x2f39d: 0x6dace820, 0x2f39e: 0x6dacea20, 0x2f39f: 0x6dccce20, + 0x2f3a0: 0x6dccd020, 0x2f3a1: 0x6dccd220, 0x2f3a2: 0x6dccd420, 0x2f3a3: 0x6dccd620, + 0x2f3a4: 0x6de7bc20, 0x2f3a5: 0x6de7be20, 0x2f3a6: 0x6de7c020, 0x2f3a7: 0x6de7c220, + 0x2f3a8: 0x6de7c420, 0x2f3a9: 0x6de7c620, 0x2f3aa: 0x6de7c820, 0x2f3ab: 0x6de7ca20, + 0x2f3ac: 0x6dfe4a20, 0x2f3ad: 0x6dfe4c20, 0x2f3ae: 0x6dfe4e20, 0x2f3af: 0x6dfe5020, + 0x2f3b0: 0x6e1f6a20, 0x2f3b1: 0x6e1f7420, 0x2f3b2: 0x6e333e20, 0x2f3b3: 0x6e333c20, + 0x2f3b4: 0x6c0a4020, 0x2f3b5: 0x6c140c20, 0x2f3b6: 0x6c257c20, 0x2f3b7: 0x6c257e20, + 0x2f3b8: 0x6c3d6a20, 0x2f3b9: 0x6c3d6c20, 0x2f3ba: 0x6c3d6e20, 0x2f3bb: 0x6c3d7020, + 0x2f3bc: 0x6c5b9a20, 0x2f3bd: 0x6c5b9c20, 0x2f3be: 0x6c5b9e20, 0x2f3bf: 0x6c5ba020, + // Block 0xbcf, offset 0x2f3c0 + 0x2f3c0: 0x6c5ba220, 0x2f3c1: 0x6c5ba420, 0x2f3c2: 0x6c5ba620, 0x2f3c3: 0x6c5ba820, + 0x2f3c4: 0x6c7eac20, 0x2f3c5: 0x6c7eae20, 0x2f3c6: 0x6c7eb020, 0x2f3c7: 0x6c7eb220, + 0x2f3c8: 0x6c7eb420, 0x2f3c9: 0x6c7eb620, 0x2f3ca: 0x6c7eb820, 0x2f3cb: 0x6c7eba20, + 0x2f3cc: 0x6c7ebc20, 0x2f3cd: 0x6c7ebe20, 0x2f3ce: 0x6c7ec020, 0x2f3cf: 0x6ca78620, + 0x2f3d0: 0x6ca78820, 0x2f3d1: 0x6ca78a20, 0x2f3d2: 0x6ca78c20, 0x2f3d3: 0x6ca78e20, + 0x2f3d4: 0x6ca79020, 0x2f3d5: 0x6ca79220, 0x2f3d6: 0x6cd5ac20, 0x2f3d7: 0x6cd5ae20, + 0x2f3d8: 0x6cd5b020, 0x2f3d9: 0x6cd5b220, 0x2f3da: 0x6ca7c420, 0x2f3db: 0x6cd5b420, + 0x2f3dc: 0x6cd5b620, 0x2f3dd: 0x6cd5b820, 0x2f3de: 0x6d043220, 0x2f3df: 0x6d043420, + 0x2f3e0: 0x6d043620, 0x2f3e1: 0x6d043820, 0x2f3e2: 0x6d043a20, 0x2f3e3: 0x6d043c20, + 0x2f3e4: 0x6d043e20, 0x2f3e5: 0x6d044020, 0x2f3e6: 0x6d044220, 0x2f3e7: 0x6d044420, + 0x2f3e8: 0x6d31c820, 0x2f3e9: 0x6d31ca20, 0x2f3ea: 0x6d31cc20, 0x2f3eb: 0x6d31ce20, + 0x2f3ec: 0x6d31d020, 0x2f3ed: 0x6d31d220, 0x2f3ee: 0x6d5e7020, 0x2f3ef: 0x6d5e7220, + 0x2f3f0: 0x6d5e7420, 0x2f3f1: 0x6d5e7620, 0x2f3f2: 0x6d5e7820, 0x2f3f3: 0x6d5e7a20, + 0x2f3f4: 0x6d5e7c20, 0x2f3f5: 0x6d88c820, 0x2f3f6: 0x6d88ca20, 0x2f3f7: 0x6d88cc20, + 0x2f3f8: 0x6d88ce20, 0x2f3f9: 0x6d88d020, 0x2f3fa: 0x6d88d220, 0x2f3fb: 0x6d88d420, + 0x2f3fc: 0x6d88d620, 0x2f3fd: 0x6d88d820, 0x2f3fe: 0x6dad5020, 0x2f3ff: 0x6dad5220, + // Block 0xbd0, offset 0x2f400 + 0x2f400: 0x6dad5420, 0x2f401: 0x6dad5620, 0x2f402: 0x6dad5820, 0x2f403: 0x6e10de20, + 0x2f404: 0x6dcd2020, 0x2f405: 0x6dcd2220, 0x2f406: 0x6de7f620, 0x2f407: 0x6dfe8620, + 0x2f408: 0x6e10e020, 0x2f409: 0x6e10e220, 0x2f40a: 0x6e1f7820, 0x2f40b: 0x6c0a4420, + 0x2f40c: 0x6c258a20, 0x2f40d: 0x6c258c20, 0x2f40e: 0x6c3d9020, 0x2f40f: 0x6c3d9220, + 0x2f410: 0x6c5bd620, 0x2f411: 0x6c5bd820, 0x2f412: 0x6c5bda20, 0x2f413: 0x6c5bdc20, + 0x2f414: 0x6c5bde20, 0x2f415: 0x6c5be020, 0x2f416: 0x6c5be220, 0x2f417: 0x6c5be420, + 0x2f418: 0x6c7efe20, 0x2f419: 0x6c7f0020, 0x2f41a: 0x6c7f0220, 0x2f41b: 0x6c7f0420, + 0x2f41c: 0x6c7f0620, 0x2f41d: 0x6c7f0820, 0x2f41e: 0x6c7f0a20, 0x2f41f: 0x6cb6ae20, + 0x2f420: 0x6cb6b020, 0x2f421: 0x6ca7c820, 0x2f422: 0x6cd60e20, 0x2f423: 0x6cd61020, + 0x2f424: 0x6cd61220, 0x2f425: 0x6cd61420, 0x2f426: 0x6cd61620, 0x2f427: 0x6cd61820, + 0x2f428: 0x6d048e20, 0x2f429: 0x6d049020, 0x2f42a: 0x6d049220, 0x2f42b: 0x6d049420, + 0x2f42c: 0x6d320820, 0x2f42d: 0x6d320a20, 0x2f42e: 0x6d322e20, 0x2f42f: 0x6d320c20, + 0x2f430: 0x6d320e20, 0x2f431: 0x6d892220, 0x2f432: 0x6dad8a20, 0x2f433: 0x6dad8c20, + 0x2f434: 0x6dad8e20, 0x2f435: 0x6dcd3a20, 0x2f436: 0x6dfe9a20, 0x2f437: 0x6dfe9c20, + 0x2f438: 0x6e1f7e20, 0x2f439: 0x6c141020, 0x2f43a: 0x6c3d9a20, 0x2f43b: 0x6c3d9c20, + 0x2f43c: 0x6c5bf820, 0x2f43d: 0x6c5bfa20, 0x2f43e: 0x6c5bfc20, 0x2f43f: 0x6c5bfe20, + // Block 0xbd1, offset 0x2f440 + 0x2f440: 0x6c5c0020, 0x2f441: 0x6c5c0220, 0x2f442: 0x6c5c0420, 0x2f443: 0x6c5c0620, + 0x2f444: 0x6c7fa820, 0x2f445: 0x6c7f4020, 0x2f446: 0x6c7f4220, 0x2f447: 0x6c7f4420, + 0x2f448: 0x6c7f4620, 0x2f449: 0x6c7f4820, 0x2f44a: 0x6c7f4a20, 0x2f44b: 0x6c7f4c20, + 0x2f44c: 0x6c7f4e20, 0x2f44d: 0x6c7f5020, 0x2f44e: 0x6c7f5220, 0x2f44f: 0x6c7f5420, + 0x2f450: 0x6c7f5620, 0x2f451: 0x6c7f5820, 0x2f452: 0x6c7f5a20, 0x2f453: 0x6c7f5c20, + 0x2f454: 0x6c7f5e20, 0x2f455: 0x6c7f6020, 0x2f456: 0x6ca7fa20, 0x2f457: 0x6ca7fc20, + 0x2f458: 0x6ca7fe20, 0x2f459: 0x6ca80020, 0x2f45a: 0x6ca80220, 0x2f45b: 0x6ca80420, + 0x2f45c: 0x6ca80620, 0x2f45d: 0x6ca80820, 0x2f45e: 0x6ca80a20, 0x2f45f: 0x6ca80c20, + 0x2f460: 0x6ca80e20, 0x2f461: 0x6ca81020, 0x2f462: 0x6ca81220, 0x2f463: 0x6ca81420, + 0x2f464: 0x6ca81620, 0x2f465: 0x6ca81820, 0x2f466: 0x6ca81a20, 0x2f467: 0x6ca81c20, + 0x2f468: 0x6ca81e20, 0x2f469: 0x6ca82020, 0x2f46a: 0x6ca82220, 0x2f46b: 0x6ca82420, + 0x2f46c: 0x6ca82620, 0x2f46d: 0x6ca82820, 0x2f46e: 0x6ca82a20, 0x2f46f: 0x6ca82c20, + 0x2f470: 0x6ca82e20, 0x2f471: 0x6ca83020, 0x2f472: 0x6ca83220, 0x2f473: 0x6ca83420, + 0x2f474: 0x6ca83620, 0x2f475: 0x6ca83820, 0x2f476: 0x6ca83a20, 0x2f477: 0x6ca83c20, + 0x2f478: 0x6ca83e20, 0x2f479: 0x6ca84020, 0x2f47a: 0x6ca84220, 0x2f47b: 0x6ca84420, + 0x2f47c: 0x6ca84620, 0x2f47d: 0x6ca84820, 0x2f47e: 0x6ca84a20, 0x2f47f: 0x6cd65220, + // Block 0xbd2, offset 0x2f480 + 0x2f480: 0x6cd65420, 0x2f481: 0x6cd65620, 0x2f482: 0x6cd65820, 0x2f483: 0x6cd65a20, + 0x2f484: 0x6cd65c20, 0x2f485: 0x6cd65e20, 0x2f486: 0x6cd66020, 0x2f487: 0x6cd66220, + 0x2f488: 0x6cd66420, 0x2f489: 0x6cd66620, 0x2f48a: 0x6cd66820, 0x2f48b: 0x6cd66a20, + 0x2f48c: 0x6cd66c20, 0x2f48d: 0x6cd66e20, 0x2f48e: 0x6cd67020, 0x2f48f: 0x6cd67220, + 0x2f490: 0x6cd67420, 0x2f491: 0x6cd67620, 0x2f492: 0x6cd67820, 0x2f493: 0x6cd67a20, + 0x2f494: 0x6cd67c20, 0x2f495: 0x6cd67e20, 0x2f496: 0x6cd68020, 0x2f497: 0x6cd68220, + 0x2f498: 0x6cd68420, 0x2f499: 0x6cd68620, 0x2f49a: 0x6cd68820, 0x2f49b: 0x6cd68a20, + 0x2f49c: 0x6cd68c20, 0x2f49d: 0x6cd68e20, 0x2f49e: 0x6d04ce20, 0x2f49f: 0x6d04d020, + 0x2f4a0: 0x6d04d220, 0x2f4a1: 0x6d04d420, 0x2f4a2: 0x6d04d620, 0x2f4a3: 0x6d04d820, + 0x2f4a4: 0x6d04da20, 0x2f4a5: 0x6d04dc20, 0x2f4a6: 0x6d04de20, 0x2f4a7: 0x6d04e020, + 0x2f4a8: 0x6d04e220, 0x2f4a9: 0x6d04e420, 0x2f4aa: 0x6d04e620, 0x2f4ab: 0x6d04e820, + 0x2f4ac: 0x6cd6de20, 0x2f4ad: 0x6d04ea20, 0x2f4ae: 0x6d04ec20, 0x2f4af: 0x6d04ee20, + 0x2f4b0: 0x6d04f020, 0x2f4b1: 0x6d04f220, 0x2f4b2: 0x6d04f420, 0x2f4b3: 0x6d04f620, + 0x2f4b4: 0x6d04f820, 0x2f4b5: 0x6d323020, 0x2f4b6: 0x6d04fa20, 0x2f4b7: 0x6d04fc20, + 0x2f4b8: 0x6d04fe20, 0x2f4b9: 0x6d050020, 0x2f4ba: 0x6d050220, 0x2f4bb: 0x6d050420, + 0x2f4bc: 0x6d050620, 0x2f4bd: 0x6d050820, 0x2f4be: 0x6d050a20, 0x2f4bf: 0x6d050c20, + // Block 0xbd3, offset 0x2f4c0 + 0x2f4c0: 0x6d050e20, 0x2f4c1: 0x6d324c20, 0x2f4c2: 0x6d324e20, 0x2f4c3: 0x6d325020, + 0x2f4c4: 0x6d325220, 0x2f4c5: 0x6d325420, 0x2f4c6: 0x6d325620, 0x2f4c7: 0x6d325820, + 0x2f4c8: 0x6d325a20, 0x2f4c9: 0x6d325c20, 0x2f4ca: 0x6d325e20, 0x2f4cb: 0x6d326020, + 0x2f4cc: 0x6d326220, 0x2f4cd: 0x6d326420, 0x2f4ce: 0x6d326620, 0x2f4cf: 0x6d326820, + 0x2f4d0: 0x6d326a20, 0x2f4d1: 0x6d326c20, 0x2f4d2: 0x6d326e20, 0x2f4d3: 0x6d327020, + 0x2f4d4: 0x6d327220, 0x2f4d5: 0x6d327420, 0x2f4d6: 0x6d327620, 0x2f4d7: 0x6d327820, + 0x2f4d8: 0x6d327a20, 0x2f4d9: 0x6d327c20, 0x2f4da: 0x6d327e20, 0x2f4db: 0x6d328020, + 0x2f4dc: 0x6d328220, 0x2f4dd: 0x6d328420, 0x2f4de: 0x6d328620, 0x2f4df: 0x6d328820, + 0x2f4e0: 0x6d328a20, 0x2f4e1: 0x6d328c20, 0x2f4e2: 0x6d328e20, 0x2f4e3: 0x6d329020, + 0x2f4e4: 0x6d329220, 0x2f4e5: 0x6d329420, 0x2f4e6: 0x6d329620, 0x2f4e7: 0x6d329820, + 0x2f4e8: 0x6d329a20, 0x2f4e9: 0x6d329c20, 0x2f4ea: 0x6d329e20, 0x2f4eb: 0x6d32a020, + 0x2f4ec: 0x6d5f0420, 0x2f4ed: 0x6d5f0620, 0x2f4ee: 0x6d5f0820, 0x2f4ef: 0x6d5f0a20, + 0x2f4f0: 0x6d5f0c20, 0x2f4f1: 0x6d5f0e20, 0x2f4f2: 0x6d5f1020, 0x2f4f3: 0x6d5f1220, + 0x2f4f4: 0x6d5f1420, 0x2f4f5: 0x6d5f1620, 0x2f4f6: 0x6d5f1820, 0x2f4f7: 0x6d5f1a20, + 0x2f4f8: 0x6d333620, 0x2f4f9: 0x6d5f1c20, 0x2f4fa: 0x6d5f1e20, 0x2f4fb: 0x6d5f2020, + 0x2f4fc: 0x6d5f2220, 0x2f4fd: 0x6d5f2420, 0x2f4fe: 0x6d5f2620, 0x2f4ff: 0x6d5f2820, + // Block 0xbd4, offset 0x2f500 + 0x2f500: 0x6d051020, 0x2f501: 0x6d5f2a20, 0x2f502: 0x6d5f2c20, 0x2f503: 0x6d5f2e20, + 0x2f504: 0x6d5f3020, 0x2f505: 0x6d5f3220, 0x2f506: 0x6d5f3420, 0x2f507: 0x6d5f3620, + 0x2f508: 0x6d5f3820, 0x2f509: 0x6d894a20, 0x2f50a: 0x6d5f3a20, 0x2f50b: 0x6d5f3c20, + 0x2f50c: 0x6d5f3e20, 0x2f50d: 0x6d5f4020, 0x2f50e: 0x6d5f4220, 0x2f50f: 0x6d5f4420, + 0x2f510: 0x6d5f4620, 0x2f511: 0x6d5f4820, 0x2f512: 0x6d5f4a20, 0x2f513: 0x6d5f4c20, + 0x2f514: 0x6d894c20, 0x2f515: 0x6d894e20, 0x2f516: 0x6d895020, 0x2f517: 0x6d895220, + 0x2f518: 0x6d895420, 0x2f519: 0x6d895620, 0x2f51a: 0x6d895820, 0x2f51b: 0x6d895a20, + 0x2f51c: 0x6d895c20, 0x2f51d: 0x6d895e20, 0x2f51e: 0x6d896020, 0x2f51f: 0x6d896220, + 0x2f520: 0x6d896420, 0x2f521: 0x6d896620, 0x2f522: 0x6d896820, 0x2f523: 0x6d896a20, + 0x2f524: 0x6d896c20, 0x2f525: 0x6d896e20, 0x2f526: 0x6d897020, 0x2f527: 0x6d897220, + 0x2f528: 0x6d897420, 0x2f529: 0x6d897620, 0x2f52a: 0x6d897820, 0x2f52b: 0x6d897a20, + 0x2f52c: 0x6d897c20, 0x2f52d: 0x6d897e20, 0x2f52e: 0x6d898020, 0x2f52f: 0x6d898220, + 0x2f530: 0x6dadc820, 0x2f531: 0x6dadca20, 0x2f532: 0x6dadcc20, 0x2f533: 0x6dadce20, + 0x2f534: 0x6dadd020, 0x2f535: 0x6dadd220, 0x2f536: 0x6dadd420, 0x2f537: 0x6dadd620, + 0x2f538: 0x6dadd820, 0x2f539: 0x6d8a5020, 0x2f53a: 0x6dadda20, 0x2f53b: 0x6daddc20, + 0x2f53c: 0x6dadde20, 0x2f53d: 0x6dade020, 0x2f53e: 0x6dade220, 0x2f53f: 0x6dade420, + // Block 0xbd5, offset 0x2f540 + 0x2f540: 0x6dade620, 0x2f541: 0x6dade820, 0x2f542: 0x6dadea20, 0x2f543: 0x6dadec20, + 0x2f544: 0x6dadee20, 0x2f545: 0x6dadf020, 0x2f546: 0x6dadf220, 0x2f547: 0x6dadf420, + 0x2f548: 0x6dadf620, 0x2f549: 0x6dadf820, 0x2f54a: 0x6dadfa20, 0x2f54b: 0x6dadfc20, + 0x2f54c: 0x6dadfe20, 0x2f54d: 0x6dae0020, 0x2f54e: 0x6dae0220, 0x2f54f: 0x6dae0420, + 0x2f550: 0x6dae0620, 0x2f551: 0x6d898420, 0x2f552: 0x6dae0820, 0x2f553: 0x6dae0a20, + 0x2f554: 0x6dae0c20, 0x2f555: 0x6dada620, 0x2f556: 0x6dae0e20, 0x2f557: 0x6dae1020, + 0x2f558: 0x6daec420, 0x2f559: 0x6dcd7220, 0x2f55a: 0x6dcd7420, 0x2f55b: 0x6dcd7620, + 0x2f55c: 0x6dcd7820, 0x2f55d: 0x6dcd7a20, 0x2f55e: 0x6dcd7c20, 0x2f55f: 0x6dcd7e20, + 0x2f560: 0x6dcd8020, 0x2f561: 0x6dcd8220, 0x2f562: 0x6dcd8420, 0x2f563: 0x6dcd8620, + 0x2f564: 0x6dcd8820, 0x2f565: 0x6dcd8a20, 0x2f566: 0x6dcd8c20, 0x2f567: 0x6dcd8e20, + 0x2f568: 0x6dcd9020, 0x2f569: 0x6dcd9220, 0x2f56a: 0x6dcd9420, 0x2f56b: 0x6dcd9620, + 0x2f56c: 0x6de81220, 0x2f56d: 0x6dcd9820, 0x2f56e: 0x6dcd9a20, 0x2f56f: 0x6dcd9c20, + 0x2f570: 0x6dcd9e20, 0x2f571: 0x6dcda020, 0x2f572: 0x6dcda220, 0x2f573: 0x6de82820, + 0x2f574: 0x6de82a20, 0x2f575: 0x6de82c20, 0x2f576: 0x6de82e20, 0x2f577: 0x6de83020, + 0x2f578: 0x6de83220, 0x2f579: 0x6de83420, 0x2f57a: 0x6de83620, 0x2f57b: 0x6de83820, + 0x2f57c: 0x6de83a20, 0x2f57d: 0x6de83c20, 0x2f57e: 0x6de83e20, 0x2f57f: 0x6de84020, + // Block 0xbd6, offset 0x2f580 + 0x2f580: 0x6de84220, 0x2f581: 0x6de84420, 0x2f582: 0x6de84620, 0x2f583: 0x6dfeac20, + 0x2f584: 0x6dfeae20, 0x2f585: 0x6dfeb020, 0x2f586: 0x6dfeb220, 0x2f587: 0x6dfeb420, + 0x2f588: 0x6dfeb620, 0x2f589: 0x6dfeb820, 0x2f58a: 0x6dfeba20, 0x2f58b: 0x6dfebc20, + 0x2f58c: 0x6dfebe20, 0x2f58d: 0x6dfec020, 0x2f58e: 0x6dfec220, 0x2f58f: 0x6dfec420, + 0x2f590: 0x6e111820, 0x2f591: 0x6e111a20, 0x2f592: 0x6e111c20, 0x2f593: 0x6e111e20, + 0x2f594: 0x6e112020, 0x2f595: 0x6dfec620, 0x2f596: 0x6e110620, 0x2f597: 0x6e1f8e20, + 0x2f598: 0x6e1f9020, 0x2f599: 0x6e1f9220, 0x2f59a: 0x6e1f9420, 0x2f59b: 0x6e1f9620, + 0x2f59c: 0x6e1f9820, 0x2f59d: 0x6e1f9a20, 0x2f59e: 0x6e2ac420, 0x2f59f: 0x6e1f9c20, + 0x2f5a0: 0x6e1f9e20, 0x2f5a1: 0x6e1fa020, 0x2f5a2: 0x6e2acc20, 0x2f5a3: 0x6e2ace20, + 0x2f5a4: 0x6e2ad020, 0x2f5a5: 0x6e2ad220, 0x2f5a6: 0x6e2ad420, 0x2f5a7: 0x6e2ad620, + 0x2f5a8: 0x6e2ad820, 0x2f5a9: 0x6e396020, 0x2f5aa: 0x6e335420, 0x2f5ab: 0x6e396220, + 0x2f5ac: 0x6e396420, 0x2f5ad: 0x6e396620, 0x2f5ae: 0x6e396820, 0x2f5af: 0x6e3dae20, + 0x2f5b0: 0x6e3db020, 0x2f5b1: 0x6e453420, 0x2f5b2: 0x6e463620, 0x2f5b3: 0x6c141420, + 0x2f5b4: 0x6c3da820, 0x2f5b5: 0x6c3daa20, 0x2f5b6: 0x6c3dac20, 0x2f5b7: 0x6c5c3220, + 0x2f5b8: 0x6c5c3420, 0x2f5b9: 0x6c5c3620, 0x2f5ba: 0x6c5c3820, 0x2f5bb: 0x6c5c3a20, + 0x2f5bc: 0x6c5c3c20, 0x2f5bd: 0x6c5c3e20, 0x2f5be: 0x6c5c4020, 0x2f5bf: 0x6c5c4220, + // Block 0xbd7, offset 0x2f5c0 + 0x2f5c0: 0x6c5c4420, 0x2f5c1: 0x6c5c4620, 0x2f5c2: 0x6c5c4820, 0x2f5c3: 0x6c7fae20, + 0x2f5c4: 0x6c7fb020, 0x2f5c5: 0x6c7fb220, 0x2f5c6: 0x6c7fb420, 0x2f5c7: 0x6c7fb620, + 0x2f5c8: 0x6c7fb820, 0x2f5c9: 0x6c7fba20, 0x2f5ca: 0x6c7fbc20, 0x2f5cb: 0x6c7fbe20, + 0x2f5cc: 0x6c7fc020, 0x2f5cd: 0x6c7fc220, 0x2f5ce: 0x6c7fc420, 0x2f5cf: 0x6c7fc620, + 0x2f5d0: 0x6c7fc820, 0x2f5d1: 0x6c7fca20, 0x2f5d2: 0x6ca89c20, 0x2f5d3: 0x6ca89e20, + 0x2f5d4: 0x6ca8a020, 0x2f5d5: 0x6ca8a220, 0x2f5d6: 0x6ca8a420, 0x2f5d7: 0x6ca8a620, + 0x2f5d8: 0x6ca8a820, 0x2f5d9: 0x6ca8aa20, 0x2f5da: 0x6ca8ac20, 0x2f5db: 0x6ca8ae20, + 0x2f5dc: 0x6ca8b020, 0x2f5dd: 0x6ca8b220, 0x2f5de: 0x6cd6ec20, 0x2f5df: 0x6cd6ee20, + 0x2f5e0: 0x6cd6f020, 0x2f5e1: 0x6cd6f220, 0x2f5e2: 0x6cd6f420, 0x2f5e3: 0x6ca8b420, + 0x2f5e4: 0x6cd6f620, 0x2f5e5: 0x6cd6f820, 0x2f5e6: 0x6cd6fa20, 0x2f5e7: 0x6cd6fc20, + 0x2f5e8: 0x6cd6fe20, 0x2f5e9: 0x6cd70020, 0x2f5ea: 0x6cd70220, 0x2f5eb: 0x6cd70420, + 0x2f5ec: 0x6cd70620, 0x2f5ed: 0x6cd70820, 0x2f5ee: 0x6d05a420, 0x2f5ef: 0x6d05a620, + 0x2f5f0: 0x6d05a820, 0x2f5f1: 0x6d05aa20, 0x2f5f2: 0x6d05ac20, 0x2f5f3: 0x6d05ae20, + 0x2f5f4: 0x6d05b020, 0x2f5f5: 0x6d05b220, 0x2f5f6: 0x6d334420, 0x2f5f7: 0x6d334620, + 0x2f5f8: 0x6d334820, 0x2f5f9: 0x6d334a20, 0x2f5fa: 0x6d334c20, 0x2f5fb: 0x6d334e20, + 0x2f5fc: 0x6d335020, 0x2f5fd: 0x6d335220, 0x2f5fe: 0x6d335420, 0x2f5ff: 0x6d335620, + // Block 0xbd8, offset 0x2f600 + 0x2f600: 0x6d05b420, 0x2f601: 0x6d335820, 0x2f602: 0x6d5ffc20, 0x2f603: 0x6d5ffe20, + 0x2f604: 0x6d600020, 0x2f605: 0x6d600220, 0x2f606: 0x6d600420, 0x2f607: 0x6d600620, + 0x2f608: 0x6d600820, 0x2f609: 0x6d600a20, 0x2f60a: 0x6d600c20, 0x2f60b: 0x6d600e20, + 0x2f60c: 0x6d601020, 0x2f60d: 0x6d601220, 0x2f60e: 0x6d601420, 0x2f60f: 0x6d8a5820, + 0x2f610: 0x6d8a5a20, 0x2f611: 0x6d8a5c20, 0x2f612: 0x6d8a5e20, 0x2f613: 0x6d8a6020, + 0x2f614: 0x6d8a6220, 0x2f615: 0x6d8a6420, 0x2f616: 0x6d8a6620, 0x2f617: 0x6d8a6820, + 0x2f618: 0x6d8a6a20, 0x2f619: 0x6daed420, 0x2f61a: 0x6daed620, 0x2f61b: 0x6daed820, + 0x2f61c: 0x6daeda20, 0x2f61d: 0x6daedc20, 0x2f61e: 0x6daede20, 0x2f61f: 0x6daee020, + 0x2f620: 0x6daee220, 0x2f621: 0x6daee420, 0x2f622: 0x6daee620, 0x2f623: 0x6dce7220, + 0x2f624: 0x6dce7420, 0x2f625: 0x6dce7620, 0x2f626: 0x6dce7820, 0x2f627: 0x6dce7a20, + 0x2f628: 0x6daee820, 0x2f629: 0x6de8c820, 0x2f62a: 0x6de8ca20, 0x2f62b: 0x6de8cc20, + 0x2f62c: 0x6de8ce20, 0x2f62d: 0x6de8d020, 0x2f62e: 0x6dff2020, 0x2f62f: 0x6dff2220, + 0x2f630: 0x6dff2420, 0x2f631: 0x6e1fe420, 0x2f632: 0x6e118c20, 0x2f633: 0x6e3dc220, + 0x2f634: 0x6e1fe620, 0x2f635: 0x6e2b0820, 0x2f636: 0x6e398820, 0x2f637: 0x6e409e20, + 0x2f638: 0x6c141620, 0x2f639: 0x6c141820, 0x2f63a: 0x6c259a20, 0x2f63b: 0x6c259c20, + 0x2f63c: 0x6c3dbc20, 0x2f63d: 0x6c3dbe20, 0x2f63e: 0x6c3dc020, 0x2f63f: 0x6c3dc220, + // Block 0xbd9, offset 0x2f640 + 0x2f640: 0x6c5c6620, 0x2f641: 0x6c5c6820, 0x2f642: 0x6c5c6a20, 0x2f643: 0x6c5c6c20, + 0x2f644: 0x6c5c6e20, 0x2f645: 0x6c5c7020, 0x2f646: 0x6c5c7220, 0x2f647: 0x6c5c7420, + 0x2f648: 0x6c5c7620, 0x2f649: 0x6c5c7820, 0x2f64a: 0x6c800a20, 0x2f64b: 0x6c800c20, + 0x2f64c: 0x6c800e20, 0x2f64d: 0x6c801020, 0x2f64e: 0x6c801220, 0x2f64f: 0x6c801420, + 0x2f650: 0x6c801620, 0x2f651: 0x6c801820, 0x2f652: 0x6c801a20, 0x2f653: 0x6c801c20, + 0x2f654: 0x6c801e20, 0x2f655: 0x6c802020, 0x2f656: 0x6c802220, 0x2f657: 0x6c802420, + 0x2f658: 0x6c802620, 0x2f659: 0x6c802820, 0x2f65a: 0x6c802a20, 0x2f65b: 0x6c802c20, + 0x2f65c: 0x6c802e20, 0x2f65d: 0x6c803020, 0x2f65e: 0x6c803220, 0x2f65f: 0x6c803420, + 0x2f660: 0x6c803620, 0x2f661: 0x6c803820, 0x2f662: 0x6c803a20, 0x2f663: 0x6c803c20, + 0x2f664: 0x6c803e20, 0x2f665: 0x6c804020, 0x2f666: 0x6c804220, 0x2f667: 0x6c804420, + 0x2f668: 0x6ca90c20, 0x2f669: 0x6ca90e20, 0x2f66a: 0x6cd74220, 0x2f66b: 0x6cd74420, + 0x2f66c: 0x6ca91020, 0x2f66d: 0x6ca91220, 0x2f66e: 0x6ca91420, 0x2f66f: 0x6ca91620, + 0x2f670: 0x6ca91820, 0x2f671: 0x6ca91a20, 0x2f672: 0x6ca91c20, 0x2f673: 0x6ca91e20, + 0x2f674: 0x6ca92020, 0x2f675: 0x6ca92220, 0x2f676: 0x6ca92420, 0x2f677: 0x6ca92620, + 0x2f678: 0x6ca92820, 0x2f679: 0x6ca92a20, 0x2f67a: 0x6ca92c20, 0x2f67b: 0x6ca92e20, + 0x2f67c: 0x6ca93020, 0x2f67d: 0x6ca93220, 0x2f67e: 0x6ca93420, 0x2f67f: 0x6ca93620, + // Block 0xbda, offset 0x2f680 + 0x2f680: 0x6ca93820, 0x2f681: 0x6ca93a20, 0x2f682: 0x6ca93c20, 0x2f683: 0x6ca93e20, + 0x2f684: 0x6ca94020, 0x2f685: 0x6ca94220, 0x2f686: 0x6ca94420, 0x2f687: 0x6ca94620, + 0x2f688: 0x6ca94820, 0x2f689: 0x6ca94a20, 0x2f68a: 0x6ca94c20, 0x2f68b: 0x6ca94e20, + 0x2f68c: 0x6ca95020, 0x2f68d: 0x6cd75a20, 0x2f68e: 0x6cd75c20, 0x2f68f: 0x6cd75e20, + 0x2f690: 0x6cd76020, 0x2f691: 0x6cd76220, 0x2f692: 0x6cd76420, 0x2f693: 0x6cd76620, + 0x2f694: 0x6cd76820, 0x2f695: 0x6cd76a20, 0x2f696: 0x6cd76c20, 0x2f697: 0x6cd76e20, + 0x2f698: 0x6cd77020, 0x2f699: 0x6cd77220, 0x2f69a: 0x6cd77420, 0x2f69b: 0x6d061420, + 0x2f69c: 0x6cd77620, 0x2f69d: 0x6cd77820, 0x2f69e: 0x6cd77a20, 0x2f69f: 0x6cd77c20, + 0x2f6a0: 0x6cd77e20, 0x2f6a1: 0x6cd78020, 0x2f6a2: 0x6cd78220, 0x2f6a3: 0x6cd78420, + 0x2f6a4: 0x6cd78620, 0x2f6a5: 0x6cd78820, 0x2f6a6: 0x6cd78a20, 0x2f6a7: 0x6cd78c20, + 0x2f6a8: 0x6cd78e20, 0x2f6a9: 0x6cd79020, 0x2f6aa: 0x6cd79220, 0x2f6ab: 0x6cd79420, + 0x2f6ac: 0x6cd79620, 0x2f6ad: 0x6cd79820, 0x2f6ae: 0x6cd79a20, 0x2f6af: 0x6cd79c20, + 0x2f6b0: 0x6cd79e20, 0x2f6b1: 0x6cd7a020, 0x2f6b2: 0x6cd7a220, 0x2f6b3: 0x6cd7a420, + 0x2f6b4: 0x6cd7a620, 0x2f6b5: 0x6cd7a820, 0x2f6b6: 0x6cd7aa20, 0x2f6b7: 0x6cd7ac20, + 0x2f6b8: 0x6d061620, 0x2f6b9: 0x6d061820, 0x2f6ba: 0x6d061a20, 0x2f6bb: 0x6d061c20, + 0x2f6bc: 0x6d061e20, 0x2f6bd: 0x6d062020, 0x2f6be: 0x6cd80c20, 0x2f6bf: 0x6d062220, + // Block 0xbdb, offset 0x2f6c0 + 0x2f6c0: 0x6d062420, 0x2f6c1: 0x6d062620, 0x2f6c2: 0x6d062820, 0x2f6c3: 0x6d062a20, + 0x2f6c4: 0x6d062c20, 0x2f6c5: 0x6d062e20, 0x2f6c6: 0x6d063020, 0x2f6c7: 0x6d063220, + 0x2f6c8: 0x6d063420, 0x2f6c9: 0x6d063620, 0x2f6ca: 0x6d063820, 0x2f6cb: 0x6d063a20, + 0x2f6cc: 0x6d063c20, 0x2f6cd: 0x6d063e20, 0x2f6ce: 0x6d064020, 0x2f6cf: 0x6d064220, + 0x2f6d0: 0x6d064420, 0x2f6d1: 0x6d064620, 0x2f6d2: 0x6d064820, 0x2f6d3: 0x6d064a20, + 0x2f6d4: 0x6d064c20, 0x2f6d5: 0x6d064e20, 0x2f6d6: 0x6d33b420, 0x2f6d7: 0x6d065020, + 0x2f6d8: 0x6d065220, 0x2f6d9: 0x6d065420, 0x2f6da: 0x6d065620, 0x2f6db: 0x6d065820, + 0x2f6dc: 0x6d33d020, 0x2f6dd: 0x6d33d220, 0x2f6de: 0x6d33d420, 0x2f6df: 0x6d33d620, + 0x2f6e0: 0x6d33d820, 0x2f6e1: 0x6d33da20, 0x2f6e2: 0x6d33dc20, 0x2f6e3: 0x6d33de20, + 0x2f6e4: 0x6d33e020, 0x2f6e5: 0x6d33e220, 0x2f6e6: 0x6d33e420, 0x2f6e7: 0x6d33e620, + 0x2f6e8: 0x6d33e820, 0x2f6e9: 0x6d33ea20, 0x2f6ea: 0x6d33ec20, 0x2f6eb: 0x6d33ee20, + 0x2f6ec: 0x6d33f020, 0x2f6ed: 0x6d33f220, 0x2f6ee: 0x6d33f420, 0x2f6ef: 0x6d33f620, + 0x2f6f0: 0x6d33f820, 0x2f6f1: 0x6d33fa20, 0x2f6f2: 0x6d33fc20, 0x2f6f3: 0x6d33fe20, + 0x2f6f4: 0x6d340020, 0x2f6f5: 0x6d340220, 0x2f6f6: 0x6d340420, 0x2f6f7: 0x6d340620, + 0x2f6f8: 0x6d340820, 0x2f6f9: 0x6d340a20, 0x2f6fa: 0x6d340c20, 0x2f6fb: 0x6d340e20, + 0x2f6fc: 0x6d341020, 0x2f6fd: 0x6d341220, 0x2f6fe: 0x6d341420, 0x2f6ff: 0x6d341620, + // Block 0xbdc, offset 0x2f700 + 0x2f700: 0x6d341820, 0x2f701: 0x6d341a20, 0x2f702: 0x6d341c20, 0x2f703: 0x6d341e20, + 0x2f704: 0x6d342020, 0x2f705: 0x6d342220, 0x2f706: 0x6d342420, 0x2f707: 0x6d342620, + 0x2f708: 0x6d342820, 0x2f709: 0x6d342a20, 0x2f70a: 0x6d342c20, 0x2f70b: 0x6d342e20, + 0x2f70c: 0x6d343020, 0x2f70d: 0x6d343220, 0x2f70e: 0x6d343420, 0x2f70f: 0x6d343620, + 0x2f710: 0x6d33b620, 0x2f711: 0x6d343820, 0x2f712: 0x6d343a20, 0x2f713: 0x6d608820, + 0x2f714: 0x6d343c20, 0x2f715: 0x6d343e20, 0x2f716: 0x6d608a20, 0x2f717: 0x6d608c20, + 0x2f718: 0x6d608e20, 0x2f719: 0x6d609020, 0x2f71a: 0x6d609220, 0x2f71b: 0x6d609420, + 0x2f71c: 0x6d609620, 0x2f71d: 0x6d609820, 0x2f71e: 0x6d609a20, 0x2f71f: 0x6d609c20, + 0x2f720: 0x6d609e20, 0x2f721: 0x6d60a020, 0x2f722: 0x6d60a220, 0x2f723: 0x6d60a420, + 0x2f724: 0x6d60a620, 0x2f725: 0x6d60a820, 0x2f726: 0x6d60aa20, 0x2f727: 0x6d60ac20, + 0x2f728: 0x6d60ae20, 0x2f729: 0x6d60b020, 0x2f72a: 0x6d60b220, 0x2f72b: 0x6d60b420, + 0x2f72c: 0x6d60b620, 0x2f72d: 0x6d60b820, 0x2f72e: 0x6d60ba20, 0x2f72f: 0x6d60bc20, + 0x2f730: 0x6d60be20, 0x2f731: 0x6d60c020, 0x2f732: 0x6d60c220, 0x2f733: 0x6d60c420, + 0x2f734: 0x6d60c620, 0x2f735: 0x6d60c820, 0x2f736: 0x6d60ca20, 0x2f737: 0x6d60cc20, + 0x2f738: 0x6d60ce20, 0x2f739: 0x6d60d020, 0x2f73a: 0x6d60d220, 0x2f73b: 0x6d60d420, + 0x2f73c: 0x6d60d620, 0x2f73d: 0x6d60d820, 0x2f73e: 0x6d60da20, 0x2f73f: 0x6d60dc20, + // Block 0xbdd, offset 0x2f740 + 0x2f740: 0x6d60de20, 0x2f741: 0x6d60e020, 0x2f742: 0x6d60e220, 0x2f743: 0x6d60e420, + 0x2f744: 0x6d60e620, 0x2f745: 0x6d60e820, 0x2f746: 0x6d60ea20, 0x2f747: 0x6d60ec20, + 0x2f748: 0x6d8aba20, 0x2f749: 0x6d8abc20, 0x2f74a: 0x6d8abe20, 0x2f74b: 0x6d8ac020, + 0x2f74c: 0x6d8ac220, 0x2f74d: 0x6d8ac420, 0x2f74e: 0x6d8ac620, 0x2f74f: 0x6d8ac820, + 0x2f750: 0x6d8aca20, 0x2f751: 0x6d8acc20, 0x2f752: 0x6d8ace20, 0x2f753: 0x6d8ad020, + 0x2f754: 0x6d8ad220, 0x2f755: 0x6d8ad420, 0x2f756: 0x6d8ad620, 0x2f757: 0x6d8ad820, + 0x2f758: 0x6d8ada20, 0x2f759: 0x6d8adc20, 0x2f75a: 0x6d8ade20, 0x2f75b: 0x6d8ae020, + 0x2f75c: 0x6d8ae220, 0x2f75d: 0x6d8ae420, 0x2f75e: 0x6d8ae620, 0x2f75f: 0x6d8ae820, + 0x2f760: 0x6d8aea20, 0x2f761: 0x6d8aec20, 0x2f762: 0x6d8aee20, 0x2f763: 0x6d8af020, + 0x2f764: 0x6d8af220, 0x2f765: 0x6d8af420, 0x2f766: 0x6d8af620, 0x2f767: 0x6d8af820, + 0x2f768: 0x6d8afa20, 0x2f769: 0x6daf3420, 0x2f76a: 0x6daf3620, 0x2f76b: 0x6daf3820, + 0x2f76c: 0x6daf3a20, 0x2f76d: 0x6daf3c20, 0x2f76e: 0x6daf3e20, 0x2f76f: 0x6daf4020, + 0x2f770: 0x6daf4220, 0x2f771: 0x6daf4420, 0x2f772: 0x6daf4620, 0x2f773: 0x6daf4820, + 0x2f774: 0x6daf4a20, 0x2f775: 0x6daf4c20, 0x2f776: 0x6daf4e20, 0x2f777: 0x6daf5020, + 0x2f778: 0x6daf5220, 0x2f779: 0x6daf5420, 0x2f77a: 0x6daf5620, 0x2f77b: 0x6daf5820, + 0x2f77c: 0x6daf5a20, 0x2f77d: 0x6daf5c20, 0x2f77e: 0x6daf5e20, 0x2f77f: 0x6daf6020, + // Block 0xbde, offset 0x2f780 + 0x2f780: 0x6daf6220, 0x2f781: 0x6daf6420, 0x2f782: 0x6daf6620, 0x2f783: 0x6daf6820, + 0x2f784: 0x6daf6a20, 0x2f785: 0x6daf6c20, 0x2f786: 0x6daf6e20, 0x2f787: 0x6daf7020, + 0x2f788: 0x6dafea20, 0x2f789: 0x6daf7220, 0x2f78a: 0x6daf7420, 0x2f78b: 0x6de91a20, + 0x2f78c: 0x6daf7620, 0x2f78d: 0x6daf7820, 0x2f78e: 0x6dcecc20, 0x2f78f: 0x6dcece20, + 0x2f790: 0x6dced020, 0x2f791: 0x6dced220, 0x2f792: 0x6dced420, 0x2f793: 0x6dced620, + 0x2f794: 0x6dced820, 0x2f795: 0x6dceda20, 0x2f796: 0x6dcedc20, 0x2f797: 0x6dcede20, + 0x2f798: 0x6dcee020, 0x2f799: 0x6dcee220, 0x2f79a: 0x6dcee420, 0x2f79b: 0x6dcee620, + 0x2f79c: 0x6dcee820, 0x2f79d: 0x6dceea20, 0x2f79e: 0x6dceec20, 0x2f79f: 0x6dceee20, + 0x2f7a0: 0x6dcef020, 0x2f7a1: 0x6dcef220, 0x2f7a2: 0x6dcef420, 0x2f7a3: 0x6dcef620, + 0x2f7a4: 0x6dcef820, 0x2f7a5: 0x6dcefa20, 0x2f7a6: 0x6de91c20, 0x2f7a7: 0x6dcefc20, + 0x2f7a8: 0x6de91e20, 0x2f7a9: 0x6de92020, 0x2f7aa: 0x6de92220, 0x2f7ab: 0x6de92420, + 0x2f7ac: 0x6de92620, 0x2f7ad: 0x6de92820, 0x2f7ae: 0x6de92a20, 0x2f7af: 0x6de92c20, + 0x2f7b0: 0x6de92e20, 0x2f7b1: 0x6dcefe20, 0x2f7b2: 0x6de93020, 0x2f7b3: 0x6de93220, + 0x2f7b4: 0x6de93420, 0x2f7b5: 0x6de93620, 0x2f7b6: 0x6de93820, 0x2f7b7: 0x6de93a20, + 0x2f7b8: 0x6de93c20, 0x2f7b9: 0x6de93e20, 0x2f7ba: 0x6de94020, 0x2f7bb: 0x6dff4220, + 0x2f7bc: 0x6dff4420, 0x2f7bd: 0x6dff4620, 0x2f7be: 0x6dff4820, 0x2f7bf: 0x6dff4a20, + // Block 0xbdf, offset 0x2f7c0 + 0x2f7c0: 0x6dff4c20, 0x2f7c1: 0x6dff4e20, 0x2f7c2: 0x6dff5020, 0x2f7c3: 0x6dff5220, + 0x2f7c4: 0x6e11aa20, 0x2f7c5: 0x6e11ac20, 0x2f7c6: 0x6e11ae20, 0x2f7c7: 0x6e11b020, + 0x2f7c8: 0x6e11b220, 0x2f7c9: 0x6e11b420, 0x2f7ca: 0x6e11b620, 0x2f7cb: 0x6e11b820, + 0x2f7cc: 0x6e11ba20, 0x2f7cd: 0x6e11bc20, 0x2f7ce: 0x6e11be20, 0x2f7cf: 0x6e11c020, + 0x2f7d0: 0x6e11c220, 0x2f7d1: 0x6e200820, 0x2f7d2: 0x6e200a20, 0x2f7d3: 0x6e2b1620, + 0x2f7d4: 0x6e2b1820, 0x2f7d5: 0x6e2b1a20, 0x2f7d6: 0x6e2b1c20, 0x2f7d7: 0x6e339220, + 0x2f7d8: 0x6e399820, 0x2f7d9: 0x6e399a20, 0x2f7da: 0x6e399c20, 0x2f7db: 0x6e399e20, + 0x2f7dc: 0x6e40a620, 0x2f7dd: 0x6e40a820, 0x2f7de: 0x6e445a20, 0x2f7df: 0x6c020020, + 0x2f7e0: 0x6c0a4620, 0x2f7e1: 0x6c141a20, 0x2f7e2: 0x6c141c20, 0x2f7e3: 0x6c141e20, + 0x2f7e4: 0x6c142020, 0x2f7e5: 0x6c142220, 0x2f7e6: 0x6c142420, 0x2f7e7: 0x6c142620, + 0x2f7e8: 0x6c142820, 0x2f7e9: 0x6c142a20, 0x2f7ea: 0x6c142c20, 0x2f7eb: 0x6c142e20, + 0x2f7ec: 0x6c25a020, 0x2f7ed: 0x6c25a220, 0x2f7ee: 0x6c25a420, 0x2f7ef: 0x6c25a620, + 0x2f7f0: 0x6c25a820, 0x2f7f1: 0x6c25aa20, 0x2f7f2: 0x6c25ac20, 0x2f7f3: 0x6c25ae20, + 0x2f7f4: 0x6c25b020, 0x2f7f5: 0x6c25b220, 0x2f7f6: 0x6c259e20, 0x2f7f7: 0x6c25b420, + 0x2f7f8: 0x6c25b620, 0x2f7f9: 0x6c25b820, 0x2f7fa: 0x6c25ba20, 0x2f7fb: 0x6c25bc20, + 0x2f7fc: 0x6c25be20, 0x2f7fd: 0x6c25c020, 0x2f7fe: 0x6c25c220, 0x2f7ff: 0x6c3dd620, + // Block 0xbe0, offset 0x2f800 + 0x2f800: 0x6c3dd820, 0x2f801: 0x6c3dda20, 0x2f802: 0x6c3ddc20, 0x2f803: 0x6c3dde20, + 0x2f804: 0x6c3de020, 0x2f805: 0x6c3de220, 0x2f806: 0x6c3de420, 0x2f807: 0x6c3de620, + 0x2f808: 0x6c3de820, 0x2f809: 0x6c3dea20, 0x2f80a: 0x6c3dec20, 0x2f80b: 0x6c3dee20, + 0x2f80c: 0x6c3df020, 0x2f80d: 0x6c3df220, 0x2f80e: 0x6c3df420, 0x2f80f: 0x6c3df620, + 0x2f810: 0x6c3df820, 0x2f811: 0x6c5c9a20, 0x2f812: 0x6c5c9c20, 0x2f813: 0x6c5c9e20, + 0x2f814: 0x6c5ca020, 0x2f815: 0x6c5ca220, 0x2f816: 0x6c5ca420, 0x2f817: 0x6c5ca620, + 0x2f818: 0x6c5ca820, 0x2f819: 0x6c5caa20, 0x2f81a: 0x6c5cac20, 0x2f81b: 0x6c5cae20, + 0x2f81c: 0x6c5cb020, 0x2f81d: 0x6c5cb220, 0x2f81e: 0x6c5cb420, 0x2f81f: 0x6c5cb620, + 0x2f820: 0x6c809e20, 0x2f821: 0x6c80a020, 0x2f822: 0x6c80a220, 0x2f823: 0x6c80a420, + 0x2f824: 0x6c80a620, 0x2f825: 0x6c80a820, 0x2f826: 0x6c80aa20, 0x2f827: 0x6c80ac20, + 0x2f828: 0x6c80ae20, 0x2f829: 0x6ca9a220, 0x2f82a: 0x6ca9a420, 0x2f82b: 0x6ca9a620, + 0x2f82c: 0x6ca9a820, 0x2f82d: 0x6ca9aa20, 0x2f82e: 0x6ca9ac20, 0x2f82f: 0x6ca9ae20, + 0x2f830: 0x6ca9b020, 0x2f831: 0x6ca9b220, 0x2f832: 0x6ca9b420, 0x2f833: 0x6ca9b620, + 0x2f834: 0x6ca9b820, 0x2f835: 0x6ca9ba20, 0x2f836: 0x6ca9bc20, 0x2f837: 0x6ca9be20, + 0x2f838: 0x6ca9c020, 0x2f839: 0x6ca9c220, 0x2f83a: 0x6ca9c420, 0x2f83b: 0x6ca9c620, + 0x2f83c: 0x6ca9c820, 0x2f83d: 0x6ca9ca20, 0x2f83e: 0x6ca9cc20, 0x2f83f: 0x6ca9ce20, + // Block 0xbe1, offset 0x2f840 + 0x2f840: 0x6ca9d020, 0x2f841: 0x6ca9d220, 0x2f842: 0x6cd81220, 0x2f843: 0x6cd81420, + 0x2f844: 0x6cd81620, 0x2f845: 0x6cd81820, 0x2f846: 0x6cd81a20, 0x2f847: 0x6cd81c20, + 0x2f848: 0x6cd81e20, 0x2f849: 0x6cd82020, 0x2f84a: 0x6cd82220, 0x2f84b: 0x6cd82420, + 0x2f84c: 0x6cd82620, 0x2f84d: 0x6cd82820, 0x2f84e: 0x6cd82a20, 0x2f84f: 0x6cd82c20, + 0x2f850: 0x6cd82e20, 0x2f851: 0x6cd83020, 0x2f852: 0x6cd83220, 0x2f853: 0x6cd83420, + 0x2f854: 0x6cd83620, 0x2f855: 0x6cd83820, 0x2f856: 0x6cd83a20, 0x2f857: 0x6cd83c20, + 0x2f858: 0x6cd83e20, 0x2f859: 0x6d06ce20, 0x2f85a: 0x6d06d020, 0x2f85b: 0x6d06d220, + 0x2f85c: 0x6d06d420, 0x2f85d: 0x6d06d620, 0x2f85e: 0x6d06d820, 0x2f85f: 0x6d06da20, + 0x2f860: 0x6d06dc20, 0x2f861: 0x6d06de20, 0x2f862: 0x6d06e020, 0x2f863: 0x6d06e220, + 0x2f864: 0x6d06e420, 0x2f865: 0x6d34c820, 0x2f866: 0x6d34ca20, 0x2f867: 0x6d34cc20, + 0x2f868: 0x6d34ce20, 0x2f869: 0x6d34d020, 0x2f86a: 0x6d34d220, 0x2f86b: 0x6d34d420, + 0x2f86c: 0x6d618020, 0x2f86d: 0x6d618220, 0x2f86e: 0x6d618420, 0x2f86f: 0x6d618620, + 0x2f870: 0x6d8b9620, 0x2f871: 0x6d8b9820, 0x2f872: 0x6d8b9a20, 0x2f873: 0x6d8b9c20, + 0x2f874: 0x6d8b9e20, 0x2f875: 0x6de9a220, 0x2f876: 0x6c143020, 0x2f877: 0x6c3e0020, + 0x2f878: 0x6c5cc620, 0x2f879: 0x6c80c620, 0x2f87a: 0x6c80c820, 0x2f87b: 0x6ca9ee20, + 0x2f87c: 0x6c80ca20, 0x2f87d: 0x6ca9f020, 0x2f87e: 0x6cd85420, 0x2f87f: 0x6cd85620, + // Block 0xbe2, offset 0x2f880 + 0x2f880: 0x6cd85820, 0x2f881: 0x6d34e420, 0x2f882: 0x6d34e620, 0x2f883: 0x6d8ba820, + 0x2f884: 0x6daff420, 0x2f885: 0x6daff620, 0x2f886: 0x6daff820, 0x2f887: 0x6dcf7c20, + 0x2f888: 0x6dcf7e20, 0x2f889: 0x6dcf8020, 0x2f88a: 0x6de9a420, 0x2f88b: 0x6de9a620, + 0x2f88c: 0x6dff9020, 0x2f88d: 0x6e120220, 0x2f88e: 0x6e203a20, 0x2f88f: 0x6e203c20, + 0x2f890: 0x6e33a620, 0x2f891: 0x6c143420, 0x2f892: 0x6c0a4a20, 0x2f893: 0x6c050420, + 0x2f894: 0x6c3e0420, 0x2f895: 0x6c25dc20, 0x2f896: 0x6c3e0620, 0x2f897: 0x6c3e0820, + 0x2f898: 0x6c5cd620, 0x2f899: 0x6c3e2020, 0x2f89a: 0x6c5cd820, 0x2f89b: 0x6c80d820, + 0x2f89c: 0x6c80da20, 0x2f89d: 0x6c80dc20, 0x2f89e: 0x6c80de20, 0x2f89f: 0x6c80e020, + 0x2f8a0: 0x6c80e220, 0x2f8a1: 0x6c80e420, 0x2f8a2: 0x6c80e620, 0x2f8a3: 0x6caa0020, + 0x2f8a4: 0x6cd86820, 0x2f8a5: 0x6cd86a20, 0x2f8a6: 0x6cd86c20, 0x2f8a7: 0x6d070220, + 0x2f8a8: 0x6d070420, 0x2f8a9: 0x6d070620, 0x2f8aa: 0x6d070820, 0x2f8ab: 0x6d070a20, + 0x2f8ac: 0x6d070c20, 0x2f8ad: 0x6d070e20, 0x2f8ae: 0x6d071020, 0x2f8af: 0x6d350020, + 0x2f8b0: 0x6d350220, 0x2f8b1: 0x6d350420, 0x2f8b2: 0x6d071220, 0x2f8b3: 0x6d350620, + 0x2f8b4: 0x6d350820, 0x2f8b5: 0x6d61a420, 0x2f8b6: 0x6d61a620, 0x2f8b7: 0x6d61a820, + 0x2f8b8: 0x6d61aa20, 0x2f8b9: 0x6d8bbe20, 0x2f8ba: 0x6d8bc020, 0x2f8bb: 0x6d8bc220, + 0x2f8bc: 0x6d8bc420, 0x2f8bd: 0x6db00820, 0x2f8be: 0x6db00a20, 0x2f8bf: 0x6db00c20, + // Block 0xbe3, offset 0x2f8c0 + 0x2f8c0: 0x6dcf8a20, 0x2f8c1: 0x6db00e20, 0x2f8c2: 0x6dcf8e20, 0x2f8c3: 0x6de9b620, + 0x2f8c4: 0x6de9b820, 0x2f8c5: 0x6de9ba20, 0x2f8c6: 0x6de9bc20, 0x2f8c7: 0x6e204020, + 0x2f8c8: 0x6e33b020, 0x2f8c9: 0x6e33b220, 0x2f8ca: 0x6c143a20, 0x2f8cb: 0x6c3e2220, + 0x2f8cc: 0x6c3e2420, 0x2f8cd: 0x6c5cf620, 0x2f8ce: 0x6c5cf820, 0x2f8cf: 0x6c5cfa20, + 0x2f8d0: 0x6c812220, 0x2f8d1: 0x6c5cfc20, 0x2f8d2: 0x6c812a20, 0x2f8d3: 0x6c812c20, + 0x2f8d4: 0x6c812e20, 0x2f8d5: 0x6caa3220, 0x2f8d6: 0x6c813020, 0x2f8d7: 0x6c813220, + 0x2f8d8: 0x6c813420, 0x2f8d9: 0x6c813620, 0x2f8da: 0x6caa3420, 0x2f8db: 0x6caa3620, + 0x2f8dc: 0x6caa3820, 0x2f8dd: 0x6caa3a20, 0x2f8de: 0x6caa3c20, 0x2f8df: 0x6caa3e20, + 0x2f8e0: 0x6cd88820, 0x2f8e1: 0x6cd88a20, 0x2f8e2: 0x6cd88c20, 0x2f8e3: 0x6d074820, + 0x2f8e4: 0x6d074a20, 0x2f8e5: 0x6d074c20, 0x2f8e6: 0x6d074e20, 0x2f8e7: 0x6d075020, + 0x2f8e8: 0x6d075220, 0x2f8e9: 0x6d075420, 0x2f8ea: 0x6d075620, 0x2f8eb: 0x6d353820, + 0x2f8ec: 0x6d61cc20, 0x2f8ed: 0x6d61ce20, 0x2f8ee: 0x6d61d020, 0x2f8ef: 0x6d61d220, + 0x2f8f0: 0x6d61d420, 0x2f8f1: 0x6d8bf620, 0x2f8f2: 0x6d8bf820, 0x2f8f3: 0x6dcfac20, + 0x2f8f4: 0x6dcfae20, 0x2f8f5: 0x6dcfb020, 0x2f8f6: 0x6de9d620, 0x2f8f7: 0x6de9d820, + 0x2f8f8: 0x6de9da20, 0x2f8f9: 0x6de9dc20, 0x2f8fa: 0x6dffa220, 0x2f8fb: 0x6e121020, + 0x2f8fc: 0x6e121220, 0x2f8fd: 0x6c144220, 0x2f8fe: 0x6c5d0c20, 0x2f8ff: 0x6c5d0e20, + // Block 0xbe4, offset 0x2f900 + 0x2f900: 0x6c815a20, 0x2f901: 0x6c815c20, 0x2f902: 0x6c815e20, 0x2f903: 0x6c816020, + 0x2f904: 0x6c816220, 0x2f905: 0x6c816420, 0x2f906: 0x6c816620, 0x2f907: 0x6caa7c20, + 0x2f908: 0x6caa7e20, 0x2f909: 0x6caa8020, 0x2f90a: 0x6caa8220, 0x2f90b: 0x6caa8420, + 0x2f90c: 0x6caa8620, 0x2f90d: 0x6caa8820, 0x2f90e: 0x6caa8a20, 0x2f90f: 0x6caa8c20, + 0x2f910: 0x6caa8e20, 0x2f911: 0x6caa9020, 0x2f912: 0x6caa9220, 0x2f913: 0x6cd8b220, + 0x2f914: 0x6cd8b420, 0x2f915: 0x6cd8b620, 0x2f916: 0x6cd8b820, 0x2f917: 0x6cd8ba20, + 0x2f918: 0x6cd8bc20, 0x2f919: 0x6cd8be20, 0x2f91a: 0x6cd8c020, 0x2f91b: 0x6d078420, + 0x2f91c: 0x6d078620, 0x2f91d: 0x6d078820, 0x2f91e: 0x6d355a20, 0x2f91f: 0x6d355c20, + 0x2f920: 0x6d355e20, 0x2f921: 0x6d356020, 0x2f922: 0x6d356220, 0x2f923: 0x6d356420, + 0x2f924: 0x6d356620, 0x2f925: 0x6d358c20, 0x2f926: 0x6d61f620, 0x2f927: 0x6d61f820, + 0x2f928: 0x6d61fa20, 0x2f929: 0x6d61fc20, 0x2f92a: 0x6d61fe20, 0x2f92b: 0x6d620020, + 0x2f92c: 0x6d620220, 0x2f92d: 0x6d620420, 0x2f92e: 0x6d8c1020, 0x2f92f: 0x6d8c1220, + 0x2f930: 0x6d8c1420, 0x2f931: 0x6d8c1620, 0x2f932: 0x6db05020, 0x2f933: 0x6db05220, + 0x2f934: 0x6db05420, 0x2f935: 0x6db05620, 0x2f936: 0x6db05820, 0x2f937: 0x6dcfde20, + 0x2f938: 0x6dcfe020, 0x2f939: 0x6dcfe220, 0x2f93a: 0x6dcfe420, 0x2f93b: 0x6dcfe620, + 0x2f93c: 0x6db05a20, 0x2f93d: 0x6de9ec20, 0x2f93e: 0x6de9ee20, 0x2f93f: 0x6dffb420, + // Block 0xbe5, offset 0x2f940 + 0x2f940: 0x6dffb620, 0x2f941: 0x6c144420, 0x2f942: 0x6c050620, 0x2f943: 0x6c144620, + 0x2f944: 0x6c819020, 0x2f945: 0x6c3e3620, 0x2f946: 0x6c819220, 0x2f947: 0x6c5d3820, + 0x2f948: 0x6caab220, 0x2f949: 0x6caab420, 0x2f94a: 0x6c81a420, 0x2f94b: 0x6cd8f820, + 0x2f94c: 0x6c144820, 0x2f94d: 0x6c5d3e20, 0x2f94e: 0x6c5d4020, 0x2f94f: 0x6c5d4220, + 0x2f950: 0x6c5d4420, 0x2f951: 0x6c5d4620, 0x2f952: 0x6c144c20, 0x2f953: 0x6c3e3e20, + 0x2f954: 0x6c5d4a20, 0x2f955: 0x6c81aa20, 0x2f956: 0x6c81ac20, 0x2f957: 0x6c81ae20, + 0x2f958: 0x6c81b020, 0x2f959: 0x6c81b220, 0x2f95a: 0x6caabc20, 0x2f95b: 0x6caabe20, + 0x2f95c: 0x6caac020, 0x2f95d: 0x6caac220, 0x2f95e: 0x6caac420, 0x2f95f: 0x6caac620, + 0x2f960: 0x6cd8fe20, 0x2f961: 0x6d07b420, 0x2f962: 0x6d07b620, 0x2f963: 0x6d359e20, + 0x2f964: 0x6d35a020, 0x2f965: 0x6d35a220, 0x2f966: 0x6d625020, 0x2f967: 0x6d625220, + 0x2f968: 0x6d8c4a20, 0x2f969: 0x6d8c4c20, 0x2f96a: 0x6d8c4e20, 0x2f96b: 0x6db08420, + 0x2f96c: 0x6db08620, 0x2f96d: 0x6dd01220, 0x2f96e: 0x6dd01420, 0x2f96f: 0x6dffc420, + 0x2f970: 0x6e122e20, 0x2f971: 0x6e205820, 0x2f972: 0x6e205a20, 0x2f973: 0x6c145020, + 0x2f974: 0x6c25e620, 0x2f975: 0x6c3e4620, 0x2f976: 0x6c5d5220, 0x2f977: 0x6c5d5420, + 0x2f978: 0x6c81ba20, 0x2f979: 0x6c81bc20, 0x2f97a: 0x6c81be20, 0x2f97b: 0x6c81c020, + 0x2f97c: 0x6c81c220, 0x2f97d: 0x6c81c420, 0x2f97e: 0x6c81c620, 0x2f97f: 0x6c81c820, + // Block 0xbe6, offset 0x2f980 + 0x2f980: 0x6c81ca20, 0x2f981: 0x6c81cc20, 0x2f982: 0x6c81ce20, 0x2f983: 0x6caad420, + 0x2f984: 0x6caad620, 0x2f985: 0x6caad820, 0x2f986: 0x6caada20, 0x2f987: 0x6caadc20, + 0x2f988: 0x6caade20, 0x2f989: 0x6caae020, 0x2f98a: 0x6caae220, 0x2f98b: 0x6caae420, + 0x2f98c: 0x6caae620, 0x2f98d: 0x6caae820, 0x2f98e: 0x6cd91020, 0x2f98f: 0x6cd91220, + 0x2f990: 0x6cd91420, 0x2f991: 0x6cd91620, 0x2f992: 0x6cd91820, 0x2f993: 0x6cd91a20, + 0x2f994: 0x6cd91c20, 0x2f995: 0x6d07c420, 0x2f996: 0x6d07c620, 0x2f997: 0x6d07c820, + 0x2f998: 0x6d07ca20, 0x2f999: 0x6d35c420, 0x2f99a: 0x6d35c620, 0x2f99b: 0x6d35c820, + 0x2f99c: 0x6d35ca20, 0x2f99d: 0x6d35cc20, 0x2f99e: 0x6d35ce20, 0x2f99f: 0x6d35d020, + 0x2f9a0: 0x6cd91e20, 0x2f9a1: 0x6d35d220, 0x2f9a2: 0x6d35d420, 0x2f9a3: 0x6d35d620, + 0x2f9a4: 0x6d626c20, 0x2f9a5: 0x6d626e20, 0x2f9a6: 0x6d627020, 0x2f9a7: 0x6d627220, + 0x2f9a8: 0x6d627420, 0x2f9a9: 0x6d627620, 0x2f9aa: 0x6d627820, 0x2f9ab: 0x6d627a20, + 0x2f9ac: 0x6d8c6820, 0x2f9ad: 0x6d8c6a20, 0x2f9ae: 0x6d8c9a20, 0x2f9af: 0x6db0a020, + 0x2f9b0: 0x6db0a220, 0x2f9b1: 0x6db0a420, 0x2f9b2: 0x6db0a620, 0x2f9b3: 0x6db0a820, + 0x2f9b4: 0x6db0cc20, 0x2f9b5: 0x6dd02c20, 0x2f9b6: 0x6dd02e20, 0x2f9b7: 0x6dd03020, + 0x2f9b8: 0x6dea0220, 0x2f9b9: 0x6dffc820, 0x2f9ba: 0x6dffca20, 0x2f9bb: 0x6dffcc20, + 0x2f9bc: 0x6dffce20, 0x2f9bd: 0x6e205e20, 0x2f9be: 0x6e206020, 0x2f9bf: 0x6c145220, + // Block 0xbe7, offset 0x2f9c0 + 0x2f9c0: 0x6c050820, 0x2f9c1: 0x6c81fa20, 0x2f9c2: 0x6c81fc20, 0x2f9c3: 0x6c3e5e20, + 0x2f9c4: 0x6d07fe20, 0x2f9c5: 0x6d080020, 0x2f9c6: 0x6d080220, 0x2f9c7: 0x6d360e20, + 0x2f9c8: 0x6d361020, 0x2f9c9: 0x6c145620, 0x2f9ca: 0x6c0a5420, 0x2f9cb: 0x6c145c20, + 0x2f9cc: 0x6c145e20, 0x2f9cd: 0x6c146020, 0x2f9ce: 0x6c146220, 0x2f9cf: 0x6c3e6020, + 0x2f9d0: 0x6c25ee20, 0x2f9d1: 0x6c25f020, 0x2f9d2: 0x6c25f220, 0x2f9d3: 0x6c25f420, + 0x2f9d4: 0x6c25f620, 0x2f9d5: 0x6c25f820, 0x2f9d6: 0x6c25fa20, 0x2f9d7: 0x6c25fc20, + 0x2f9d8: 0x6c25fe20, 0x2f9d9: 0x6c260020, 0x2f9da: 0x6c260220, 0x2f9db: 0x6c260420, + 0x2f9dc: 0x6c260620, 0x2f9dd: 0x6c260820, 0x2f9de: 0x6c260a20, 0x2f9df: 0x6c260c20, + 0x2f9e0: 0x6c260e20, 0x2f9e1: 0x6c3e7c20, 0x2f9e2: 0x6c3e7e20, 0x2f9e3: 0x6c3e8020, + 0x2f9e4: 0x6c3e8220, 0x2f9e5: 0x6c3e8420, 0x2f9e6: 0x6c3e8620, 0x2f9e7: 0x6c3e8820, + 0x2f9e8: 0x6c3e8a20, 0x2f9e9: 0x6c3e8c20, 0x2f9ea: 0x6c3e8e20, 0x2f9eb: 0x6c3e9020, + 0x2f9ec: 0x6c3e9220, 0x2f9ed: 0x6c3e9420, 0x2f9ee: 0x6c3e9620, 0x2f9ef: 0x6c3e9820, + 0x2f9f0: 0x6c3e9a20, 0x2f9f1: 0x6c3e9c20, 0x2f9f2: 0x6c3e9e20, 0x2f9f3: 0x6c3ea020, + 0x2f9f4: 0x6c3ea220, 0x2f9f5: 0x6c3ea420, 0x2f9f6: 0x6c3ea620, 0x2f9f7: 0x6c3ea820, + 0x2f9f8: 0x6c3eaa20, 0x2f9f9: 0x6c3eac20, 0x2f9fa: 0x6c3eae20, 0x2f9fb: 0x6c3eb020, + 0x2f9fc: 0x6c3eb220, 0x2f9fd: 0x6c3eb420, 0x2f9fe: 0x6c3eb620, 0x2f9ff: 0x6c3eb820, + // Block 0xbe8, offset 0x2fa00 + 0x2fa00: 0x6c3eba20, 0x2fa01: 0x6c3ebc20, 0x2fa02: 0x6c5d7220, 0x2fa03: 0x6c5d7420, + 0x2fa04: 0x6c5d7620, 0x2fa05: 0x6c5d7820, 0x2fa06: 0x6c5d7a20, 0x2fa07: 0x6c5d7c20, + 0x2fa08: 0x6c5d7e20, 0x2fa09: 0x6c5d8020, 0x2fa0a: 0x6c5d8220, 0x2fa0b: 0x6c5d8420, + 0x2fa0c: 0x6c5d8620, 0x2fa0d: 0x6c5d8820, 0x2fa0e: 0x6c5d8a20, 0x2fa0f: 0x6c5d8c20, + 0x2fa10: 0x6c5d8e20, 0x2fa11: 0x6c5d9020, 0x2fa12: 0x6c5d9220, 0x2fa13: 0x6c5d9420, + 0x2fa14: 0x6cd95220, 0x2fa15: 0x6c5d9620, 0x2fa16: 0x6c5d9820, 0x2fa17: 0x6c5d9a20, + 0x2fa18: 0x6c5d9c20, 0x2fa19: 0x6c5d9e20, 0x2fa1a: 0x6c5da020, 0x2fa1b: 0x6c5da220, + 0x2fa1c: 0x6c5da420, 0x2fa1d: 0x6c5da620, 0x2fa1e: 0x6c5da820, 0x2fa1f: 0x6c5daa20, + 0x2fa20: 0x6c5dac20, 0x2fa21: 0x6c5dae20, 0x2fa22: 0x6c5db020, 0x2fa23: 0x6c5db220, + 0x2fa24: 0x6c5db420, 0x2fa25: 0x6c5db620, 0x2fa26: 0x6c5db820, 0x2fa27: 0x6c5dba20, + 0x2fa28: 0x6c5dbc20, 0x2fa29: 0x6c5dbe20, 0x2fa2a: 0x6c5dc020, 0x2fa2b: 0x6c5dc220, + 0x2fa2c: 0x6cab1020, 0x2fa2d: 0x6c821220, 0x2fa2e: 0x6c821420, 0x2fa2f: 0x6c821620, + 0x2fa30: 0x6c821820, 0x2fa31: 0x6c821a20, 0x2fa32: 0x6c821c20, 0x2fa33: 0x6c821e20, + 0x2fa34: 0x6c822020, 0x2fa35: 0x6c822220, 0x2fa36: 0x6c822420, 0x2fa37: 0x6c822620, + 0x2fa38: 0x6c822820, 0x2fa39: 0x6c822a20, 0x2fa3a: 0x6c822c20, 0x2fa3b: 0x6c822e20, + 0x2fa3c: 0x6c823020, 0x2fa3d: 0x6c823220, 0x2fa3e: 0x6cd95420, 0x2fa3f: 0x6c823420, + // Block 0xbe9, offset 0x2fa40 + 0x2fa40: 0x6c823620, 0x2fa41: 0x6c823820, 0x2fa42: 0x6c823a20, 0x2fa43: 0x6c823c20, + 0x2fa44: 0x6c823e20, 0x2fa45: 0x6c824020, 0x2fa46: 0x6c824220, 0x2fa47: 0x6c824420, + 0x2fa48: 0x6c824620, 0x2fa49: 0x6c5dc420, 0x2fa4a: 0x6c824820, 0x2fa4b: 0x6c824a20, + 0x2fa4c: 0x6c824c20, 0x2fa4d: 0x6c824e20, 0x2fa4e: 0x6c825020, 0x2fa4f: 0x6c825220, + 0x2fa50: 0x6c825420, 0x2fa51: 0x6c825620, 0x2fa52: 0x6c825820, 0x2fa53: 0x6c825a20, + 0x2fa54: 0x6cd95620, 0x2fa55: 0x6cab2c20, 0x2fa56: 0x6cab2e20, 0x2fa57: 0x6cab3020, + 0x2fa58: 0x6cab3220, 0x2fa59: 0x6cab3420, 0x2fa5a: 0x6cab3620, 0x2fa5b: 0x6cab3820, + 0x2fa5c: 0x6cab3a20, 0x2fa5d: 0x6cab3c20, 0x2fa5e: 0x6cab3e20, 0x2fa5f: 0x6cab4020, + 0x2fa60: 0x6cd95820, 0x2fa61: 0x6cab4220, 0x2fa62: 0x6cab4420, 0x2fa63: 0x6cab4620, + 0x2fa64: 0x6cab4820, 0x2fa65: 0x6cab4a20, 0x2fa66: 0x6cab4c20, 0x2fa67: 0x6cab4e20, + 0x2fa68: 0x6cab5020, 0x2fa69: 0x6cab5220, 0x2fa6a: 0x6cab5420, 0x2fa6b: 0x6cab5620, + 0x2fa6c: 0x6cab5820, 0x2fa6d: 0x6cab5a20, 0x2fa6e: 0x6cab5c20, 0x2fa6f: 0x6cab5e20, + 0x2fa70: 0x6cab6020, 0x2fa71: 0x6cab6220, 0x2fa72: 0x6cab6420, 0x2fa73: 0x6cab6620, + 0x2fa74: 0x6cab6820, 0x2fa75: 0x6cab6a20, 0x2fa76: 0x6cab6c20, 0x2fa77: 0x6cab6e20, + 0x2fa78: 0x6cab7020, 0x2fa79: 0x6cd97e20, 0x2fa7a: 0x6cd98020, 0x2fa7b: 0x6cd98220, + 0x2fa7c: 0x6cd98420, 0x2fa7d: 0x6cd98620, 0x2fa7e: 0x6cd98820, 0x2fa7f: 0x6cd98a20, + // Block 0xbea, offset 0x2fa80 + 0x2fa80: 0x6cd98c20, 0x2fa81: 0x6cd98e20, 0x2fa82: 0x6cd99020, 0x2fa83: 0x6cd99220, + 0x2fa84: 0x6cd99420, 0x2fa85: 0x6cd99620, 0x2fa86: 0x6cd99820, 0x2fa87: 0x6cd99a20, + 0x2fa88: 0x6cd99c20, 0x2fa89: 0x6cd99e20, 0x2fa8a: 0x6cd9a020, 0x2fa8b: 0x6cd9a220, + 0x2fa8c: 0x6cd9a420, 0x2fa8d: 0x6cd9a620, 0x2fa8e: 0x6cd9a820, 0x2fa8f: 0x6cd9aa20, + 0x2fa90: 0x6d361a20, 0x2fa91: 0x6cd9ac20, 0x2fa92: 0x6cd9ae20, 0x2fa93: 0x6cd9b020, + 0x2fa94: 0x6cd9b220, 0x2fa95: 0x6cd9b420, 0x2fa96: 0x6cd9b620, 0x2fa97: 0x6cd9b820, + 0x2fa98: 0x6cd9ba20, 0x2fa99: 0x6cd9bc20, 0x2fa9a: 0x6cd9be20, 0x2fa9b: 0x6d082a20, + 0x2fa9c: 0x6d082c20, 0x2fa9d: 0x6d082e20, 0x2fa9e: 0x6d083020, 0x2fa9f: 0x6d083220, + 0x2faa0: 0x6d083420, 0x2faa1: 0x6d083620, 0x2faa2: 0x6d083820, 0x2faa3: 0x6d083a20, + 0x2faa4: 0x6d083c20, 0x2faa5: 0x6d083e20, 0x2faa6: 0x6d084020, 0x2faa7: 0x6d084220, + 0x2faa8: 0x6d084420, 0x2faa9: 0x6d084620, 0x2faaa: 0x6d084820, 0x2faab: 0x6d084a20, + 0x2faac: 0x6d084c20, 0x2faad: 0x6d084e20, 0x2faae: 0x6d085020, 0x2faaf: 0x6d085220, + 0x2fab0: 0x6d085420, 0x2fab1: 0x6d085620, 0x2fab2: 0x6d085820, 0x2fab3: 0x6d085a20, + 0x2fab4: 0x6cda6e20, 0x2fab5: 0x6d085c20, 0x2fab6: 0x6d085e20, 0x2fab7: 0x6d086020, + 0x2fab8: 0x6d086220, 0x2fab9: 0x6d086420, 0x2faba: 0x6d086620, 0x2fabb: 0x6d086820, + 0x2fabc: 0x6d086a20, 0x2fabd: 0x6d086c20, 0x2fabe: 0x6d086e20, 0x2fabf: 0x6d363820, + // Block 0xbeb, offset 0x2fac0 + 0x2fac0: 0x6d363a20, 0x2fac1: 0x6d363c20, 0x2fac2: 0x6d363e20, 0x2fac3: 0x6d364020, + 0x2fac4: 0x6d364220, 0x2fac5: 0x6d364420, 0x2fac6: 0x6d364620, 0x2fac7: 0x6d364820, + 0x2fac8: 0x6d364a20, 0x2fac9: 0x6d364c20, 0x2faca: 0x6d364e20, 0x2facb: 0x6d365020, + 0x2facc: 0x6d365220, 0x2facd: 0x6d365420, 0x2face: 0x6d365620, 0x2facf: 0x6d365820, + 0x2fad0: 0x6d8ca020, 0x2fad1: 0x6d365a20, 0x2fad2: 0x6d62d020, 0x2fad3: 0x6d62d220, + 0x2fad4: 0x6d62d420, 0x2fad5: 0x6d62d620, 0x2fad6: 0x6d62d820, 0x2fad7: 0x6d62da20, + 0x2fad8: 0x6d62dc20, 0x2fad9: 0x6d62de20, 0x2fada: 0x6d62e020, 0x2fadb: 0x6d62e220, + 0x2fadc: 0x6d62e420, 0x2fadd: 0x6d62e620, 0x2fade: 0x6d62e820, 0x2fadf: 0x6d62ea20, + 0x2fae0: 0x6d62ec20, 0x2fae1: 0x6d62ee20, 0x2fae2: 0x6d62f020, 0x2fae3: 0x6d62f220, + 0x2fae4: 0x6d538620, 0x2fae5: 0x6db0d420, 0x2fae6: 0x6d8cb420, 0x2fae7: 0x6d8cb620, + 0x2fae8: 0x6d8cb820, 0x2fae9: 0x6d8cba20, 0x2faea: 0x6d8cbc20, 0x2faeb: 0x6d8cbe20, + 0x2faec: 0x6d8cc020, 0x2faed: 0x6d8cc220, 0x2faee: 0x6d8cc420, 0x2faef: 0x6d8cc620, + 0x2faf0: 0x6d8cc820, 0x2faf1: 0x6d8cca20, 0x2faf2: 0x6d8ccc20, 0x2faf3: 0x6d8cce20, + 0x2faf4: 0x6d8cd020, 0x2faf5: 0x6d8cd220, 0x2faf6: 0x6d8cd420, 0x2faf7: 0x6d8d5820, + 0x2faf8: 0x6db0de20, 0x2faf9: 0x6d8d5a20, 0x2fafa: 0x6db0e020, 0x2fafb: 0x6db0e220, + 0x2fafc: 0x6db0e420, 0x2fafd: 0x6db0e620, 0x2fafe: 0x6db0e820, 0x2faff: 0x6db0ea20, + // Block 0xbec, offset 0x2fb00 + 0x2fb00: 0x6db0ec20, 0x2fb01: 0x6db0ee20, 0x2fb02: 0x6db0f020, 0x2fb03: 0x6db0f220, + 0x2fb04: 0x6db0f420, 0x2fb05: 0x6db0f620, 0x2fb06: 0x6db0f820, 0x2fb07: 0x6db0fa20, + 0x2fb08: 0x6db0fc20, 0x2fb09: 0x6db0fe20, 0x2fb0a: 0x6db10020, 0x2fb0b: 0x6dea1e20, + 0x2fb0c: 0x6db10220, 0x2fb0d: 0x6dd06620, 0x2fb0e: 0x6dd06820, 0x2fb0f: 0x6dd06a20, + 0x2fb10: 0x6dd06c20, 0x2fb11: 0x6dd06e20, 0x2fb12: 0x6dd07020, 0x2fb13: 0x6dd07220, + 0x2fb14: 0x6dea2620, 0x2fb15: 0x6dea2820, 0x2fb16: 0x6dffe420, 0x2fb17: 0x6dea2a20, + 0x2fb18: 0x6dea2c20, 0x2fb19: 0x6dffe620, 0x2fb1a: 0x6dffe820, 0x2fb1b: 0x6dffea20, + 0x2fb1c: 0x6dffec20, 0x2fb1d: 0x6e124820, 0x2fb1e: 0x6e206a20, 0x2fb1f: 0x6e206c20, + 0x2fb20: 0x6e39ae20, 0x2fb21: 0x6e39b020, 0x2fb22: 0x6e2b4820, 0x2fb23: 0x6c147a20, + 0x2fb24: 0x6c3f1a20, 0x2fb25: 0x6c3f1c20, 0x2fb26: 0x6cda7020, 0x2fb27: 0x6d36e420, + 0x2fb28: 0x6db16420, 0x2fb29: 0x6db16620, 0x2fb2a: 0x6c147e20, 0x2fb2b: 0x6c262820, + 0x2fb2c: 0x6c82dc20, 0x2fb2d: 0x6c82de20, 0x2fb2e: 0x6cda7c20, 0x2fb2f: 0x6cda7e20, + 0x2fb30: 0x6cda8020, 0x2fb31: 0x6d635a20, 0x2fb32: 0x6d8d5e20, 0x2fb33: 0x6c148220, + 0x2fb34: 0x6c5e4220, 0x2fb35: 0x6cda8c20, 0x2fb36: 0x6cda8e20, 0x2fb37: 0x6cda9020, + 0x2fb38: 0x6cda9220, 0x2fb39: 0x6cda9820, 0x2fb3a: 0x6d36f420, 0x2fb3b: 0x6d8d6620, + 0x2fb3c: 0x6c148820, 0x2fb3d: 0x6c3f2220, 0x2fb3e: 0x6c3f2420, 0x2fb3f: 0x6c5e4a20, + // Block 0xbed, offset 0x2fb40 + 0x2fb40: 0x6c82fc20, 0x2fb41: 0x6c82fe20, 0x2fb42: 0x6cabf420, 0x2fb43: 0x6cda9a20, + 0x2fb44: 0x6cda9c20, 0x2fb45: 0x6d090220, 0x2fb46: 0x6d8d7620, 0x2fb47: 0x6d370220, + 0x2fb48: 0x6d8d7220, 0x2fb49: 0x6d8d7820, 0x2fb4a: 0x6dd0c020, 0x2fb4b: 0x6dea7220, + 0x2fb4c: 0x6c149020, 0x2fb4d: 0x6c3f2c20, 0x2fb4e: 0x6c3f2e20, 0x2fb4f: 0x6c3f3020, + 0x2fb50: 0x6c831420, 0x2fb51: 0x6cac0620, 0x2fb52: 0x6cdaac20, 0x2fb53: 0x6d371820, + 0x2fb54: 0x6d371a20, 0x2fb55: 0x6d371c20, 0x2fb56: 0x6d638820, 0x2fb57: 0x6d638a20, + 0x2fb58: 0x6d8d8a20, 0x2fb59: 0x6dd0d220, 0x2fb5a: 0x6dea8020, 0x2fb5b: 0x6c149220, + 0x2fb5c: 0x6cdabe20, 0x2fb5d: 0x6d091c20, 0x2fb5e: 0x6d373020, 0x2fb5f: 0x6c149420, + 0x2fb60: 0x6c3f3620, 0x2fb61: 0x6c5e6020, 0x2fb62: 0x6c5e6220, 0x2fb63: 0x6c5e6420, + 0x2fb64: 0x6c5e6620, 0x2fb65: 0x6c832c20, 0x2fb66: 0x6c832e20, 0x2fb67: 0x6c833020, + 0x2fb68: 0x6c833220, 0x2fb69: 0x6c833420, 0x2fb6a: 0x6c833620, 0x2fb6b: 0x6c833820, + 0x2fb6c: 0x6c833a20, 0x2fb6d: 0x6c833c20, 0x2fb6e: 0x6c833e20, 0x2fb6f: 0x6c834020, + 0x2fb70: 0x6c834220, 0x2fb71: 0x6c834420, 0x2fb72: 0x6cac1820, 0x2fb73: 0x6cac1a20, + 0x2fb74: 0x6cac1c20, 0x2fb75: 0x6cac1e20, 0x2fb76: 0x6cac2020, 0x2fb77: 0x6cac2220, + 0x2fb78: 0x6cac2420, 0x2fb79: 0x6cac2620, 0x2fb7a: 0x6cac2820, 0x2fb7b: 0x6cac2a20, + 0x2fb7c: 0x6cdaca20, 0x2fb7d: 0x6cdacc20, 0x2fb7e: 0x6cdace20, 0x2fb7f: 0x6cdad020, + // Block 0xbee, offset 0x2fb80 + 0x2fb80: 0x6d092220, 0x2fb81: 0x6d092420, 0x2fb82: 0x6d092620, 0x2fb83: 0x6d092820, + 0x2fb84: 0x6d092a20, 0x2fb85: 0x6d092c20, 0x2fb86: 0x6d092e20, 0x2fb87: 0x6d093020, + 0x2fb88: 0x6d093220, 0x2fb89: 0x6d093420, 0x2fb8a: 0x6d374220, 0x2fb8b: 0x6d374420, + 0x2fb8c: 0x6d374620, 0x2fb8d: 0x6d374820, 0x2fb8e: 0x6d63a220, 0x2fb8f: 0x6d63a420, + 0x2fb90: 0x6d63a620, 0x2fb91: 0x6d63a820, 0x2fb92: 0x6d63aa20, 0x2fb93: 0x6d63ac20, + 0x2fb94: 0x6d63ae20, 0x2fb95: 0x6d8d9e20, 0x2fb96: 0x6d8da020, 0x2fb97: 0x6d8da220, + 0x2fb98: 0x6d8da420, 0x2fb99: 0x6d8da620, 0x2fb9a: 0x6db19c20, 0x2fb9b: 0x6db19e20, + 0x2fb9c: 0x6db1a020, 0x2fb9d: 0x6db1a220, 0x2fb9e: 0x6dd0e220, 0x2fb9f: 0x6dd0e420, + 0x2fba0: 0x6dd0e620, 0x2fba1: 0x6dea8620, 0x2fba2: 0x6dea8820, 0x2fba3: 0x6dea8a20, + 0x2fba4: 0x6dea8c20, 0x2fba5: 0x6dea8e20, 0x2fba6: 0x6e003620, 0x2fba7: 0x6e003820, + 0x2fba8: 0x6e003a20, 0x2fba9: 0x6e003c20, 0x2fbaa: 0x6e126c20, 0x2fbab: 0x6e208820, + 0x2fbac: 0x6e2b6e20, 0x2fbad: 0x6e33e220, 0x2fbae: 0x6c149820, 0x2fbaf: 0x6c263620, + 0x2fbb0: 0x6c3f4420, 0x2fbb1: 0x6db1bc20, 0x2fbb2: 0x6c149a20, 0x2fbb3: 0x6c835e20, + 0x2fbb4: 0x6cac4e20, 0x2fbb5: 0x6cdaf020, 0x2fbb6: 0x6deaa220, 0x2fbb7: 0x6e33e420, + 0x2fbb8: 0x6c149e20, 0x2fbb9: 0x6c020420, 0x2fbba: 0x6c0a5620, 0x2fbbb: 0x6c14a020, + 0x2fbbc: 0x6c14a220, 0x2fbbd: 0x6c14a420, 0x2fbbe: 0x6c14a620, 0x2fbbf: 0x6c14a820, + // Block 0xbef, offset 0x2fbc0 + 0x2fbc0: 0x6c14aa20, 0x2fbc1: 0x6c14ac20, 0x2fbc2: 0x6c14ae20, 0x2fbc3: 0x6c263820, + 0x2fbc4: 0x6c263a20, 0x2fbc5: 0x6c263c20, 0x2fbc6: 0x6c263e20, 0x2fbc7: 0x6c264020, + 0x2fbc8: 0x6c264220, 0x2fbc9: 0x6c264420, 0x2fbca: 0x6c264620, 0x2fbcb: 0x6c264820, + 0x2fbcc: 0x6c264a20, 0x2fbcd: 0x6c264c20, 0x2fbce: 0x6c264e20, 0x2fbcf: 0x6c265020, + 0x2fbd0: 0x6c265220, 0x2fbd1: 0x6c265420, 0x2fbd2: 0x6c265620, 0x2fbd3: 0x6c265820, + 0x2fbd4: 0x6c5e8820, 0x2fbd5: 0x6c265a20, 0x2fbd6: 0x6c265c20, 0x2fbd7: 0x6c265e20, + 0x2fbd8: 0x6c3f4c20, 0x2fbd9: 0x6c3f4e20, 0x2fbda: 0x6c3f5020, 0x2fbdb: 0x6c3f5220, + 0x2fbdc: 0x6c3f5420, 0x2fbdd: 0x6c3f5620, 0x2fbde: 0x6c3f5820, 0x2fbdf: 0x6c3f5a20, + 0x2fbe0: 0x6c3f5c20, 0x2fbe1: 0x6c3f5e20, 0x2fbe2: 0x6c3f6020, 0x2fbe3: 0x6c3f6220, + 0x2fbe4: 0x6c3f6420, 0x2fbe5: 0x6c3f6620, 0x2fbe6: 0x6c3f6820, 0x2fbe7: 0x6c3f6a20, + 0x2fbe8: 0x6c3f6c20, 0x2fbe9: 0x6c3f6e20, 0x2fbea: 0x6c3f7020, 0x2fbeb: 0x6c3f7220, + 0x2fbec: 0x6c3f7420, 0x2fbed: 0x6c3f7620, 0x2fbee: 0x6c3f7820, 0x2fbef: 0x6c3f7a20, + 0x2fbf0: 0x6c3f7c20, 0x2fbf1: 0x6c3f7e20, 0x2fbf2: 0x6c3f8020, 0x2fbf3: 0x6c3f8220, + 0x2fbf4: 0x6c3f8420, 0x2fbf5: 0x6c3f8620, 0x2fbf6: 0x6c3f8820, 0x2fbf7: 0x6c3f8a20, + 0x2fbf8: 0x6c3f8c20, 0x2fbf9: 0x6c3f8e20, 0x2fbfa: 0x6c3f9020, 0x2fbfb: 0x6c837820, + 0x2fbfc: 0x6c3f9220, 0x2fbfd: 0x6c3f9420, 0x2fbfe: 0x6c3f9620, 0x2fbff: 0x6c400c20, + // Block 0xbf0, offset 0x2fc00 + 0x2fc00: 0x6c3f9820, 0x2fc01: 0x6c3f9a20, 0x2fc02: 0x6c3f9c20, 0x2fc03: 0x6c3f9e20, + 0x2fc04: 0x6c3fa020, 0x2fc05: 0x6c3fa220, 0x2fc06: 0x6c3fa420, 0x2fc07: 0x6c3fa620, + 0x2fc08: 0x6c3fa820, 0x2fc09: 0x6c3faa20, 0x2fc0a: 0x6c3fac20, 0x2fc0b: 0x6c3fae20, + 0x2fc0c: 0x6c3fb020, 0x2fc0d: 0x6c3fb220, 0x2fc0e: 0x6c3fb420, 0x2fc0f: 0x6c3fb620, + 0x2fc10: 0x6c5e8a20, 0x2fc11: 0x6c5e8c20, 0x2fc12: 0x6c5e8e20, 0x2fc13: 0x6c5e9020, + 0x2fc14: 0x6c5e9220, 0x2fc15: 0x6c5e9420, 0x2fc16: 0x6c5e9620, 0x2fc17: 0x6c5e9820, + 0x2fc18: 0x6c5e9a20, 0x2fc19: 0x6c5e9c20, 0x2fc1a: 0x6c5e9e20, 0x2fc1b: 0x6c5ea020, + 0x2fc1c: 0x6c5ea220, 0x2fc1d: 0x6c5ea420, 0x2fc1e: 0x6c5ea620, 0x2fc1f: 0x6c5ea820, + 0x2fc20: 0x6c5eaa20, 0x2fc21: 0x6c5eac20, 0x2fc22: 0x6c5eae20, 0x2fc23: 0x6c5eb020, + 0x2fc24: 0x6c5eb220, 0x2fc25: 0x6c5eb420, 0x2fc26: 0x6c5eb620, 0x2fc27: 0x6c5eb820, + 0x2fc28: 0x6c5eba20, 0x2fc29: 0x6c5ebc20, 0x2fc2a: 0x6c5ebe20, 0x2fc2b: 0x6c5ec020, + 0x2fc2c: 0x6c5ec220, 0x2fc2d: 0x6c5ec420, 0x2fc2e: 0x6c5ec620, 0x2fc2f: 0x6c5ec820, + 0x2fc30: 0x6c5eca20, 0x2fc31: 0x6c5ecc20, 0x2fc32: 0x6c5ece20, 0x2fc33: 0x6c5ed020, + 0x2fc34: 0x6c5ed220, 0x2fc35: 0x6c5ed420, 0x2fc36: 0x6c5ed620, 0x2fc37: 0x6c5ed820, + 0x2fc38: 0x6c5eda20, 0x2fc39: 0x6c5edc20, 0x2fc3a: 0x6c5ede20, 0x2fc3b: 0x6c5ee020, + 0x2fc3c: 0x6c5ee220, 0x2fc3d: 0x6c5ee420, 0x2fc3e: 0x6c5ee620, 0x2fc3f: 0x6c5ee820, + // Block 0xbf1, offset 0x2fc40 + 0x2fc40: 0x6c5eea20, 0x2fc41: 0x6c5eec20, 0x2fc42: 0x6c5eee20, 0x2fc43: 0x6c5ef020, + 0x2fc44: 0x6c5ef220, 0x2fc45: 0x6c5ef420, 0x2fc46: 0x6c5ef620, 0x2fc47: 0x6c5ef820, + 0x2fc48: 0x6c837a20, 0x2fc49: 0x6c5efa20, 0x2fc4a: 0x6c5efc20, 0x2fc4b: 0x6c5efe20, + 0x2fc4c: 0x6c5f0020, 0x2fc4d: 0x6c5f0220, 0x2fc4e: 0x6c5f0420, 0x2fc4f: 0x6c5f0620, + 0x2fc50: 0x6c5f0820, 0x2fc51: 0x6c5f0a20, 0x2fc52: 0x6cdb1620, 0x2fc53: 0x6c5f0c20, + 0x2fc54: 0x6c5f0e20, 0x2fc55: 0x6c5f1020, 0x2fc56: 0x6c837c20, 0x2fc57: 0x6c837e20, + 0x2fc58: 0x6c838020, 0x2fc59: 0x6c838220, 0x2fc5a: 0x6c838420, 0x2fc5b: 0x6c838620, + 0x2fc5c: 0x6c838820, 0x2fc5d: 0x6cac7420, 0x2fc5e: 0x6c838a20, 0x2fc5f: 0x6c838c20, + 0x2fc60: 0x6c838e20, 0x2fc61: 0x6c839020, 0x2fc62: 0x6c839220, 0x2fc63: 0x6cac7620, + 0x2fc64: 0x6c839420, 0x2fc65: 0x6c839620, 0x2fc66: 0x6c839820, 0x2fc67: 0x6c839a20, + 0x2fc68: 0x6c839c20, 0x2fc69: 0x6c839e20, 0x2fc6a: 0x6c83a020, 0x2fc6b: 0x6c83a220, + 0x2fc6c: 0x6c83a420, 0x2fc6d: 0x6c83a620, 0x2fc6e: 0x6c83a820, 0x2fc6f: 0x6c83aa20, + 0x2fc70: 0x6c83ac20, 0x2fc71: 0x6c83ae20, 0x2fc72: 0x6c83b020, 0x2fc73: 0x6c83b220, + 0x2fc74: 0x6c83b420, 0x2fc75: 0x6c83b620, 0x2fc76: 0x6c83b820, 0x2fc77: 0x6c83ba20, + 0x2fc78: 0x6c83bc20, 0x2fc79: 0x6c83be20, 0x2fc7a: 0x6c5f9220, 0x2fc7b: 0x6cdb1820, + 0x2fc7c: 0x6c83c020, 0x2fc7d: 0x6c83c220, 0x2fc7e: 0x6c3fb820, 0x2fc7f: 0x6c83c420, + // Block 0xbf2, offset 0x2fc80 + 0x2fc80: 0x6c83c620, 0x2fc81: 0x6c83c820, 0x2fc82: 0x6c83ca20, 0x2fc83: 0x6c83cc20, + 0x2fc84: 0x6c83ce20, 0x2fc85: 0x6c83d020, 0x2fc86: 0x6cdb1a20, 0x2fc87: 0x6c83d220, + 0x2fc88: 0x6c83d420, 0x2fc89: 0x6c83d620, 0x2fc8a: 0x6c83d820, 0x2fc8b: 0x6c83da20, + 0x2fc8c: 0x6c83dc20, 0x2fc8d: 0x6c83de20, 0x2fc8e: 0x6c83e020, 0x2fc8f: 0x6c83e220, + 0x2fc90: 0x6c83e420, 0x2fc91: 0x6c83e620, 0x2fc92: 0x6c83e820, 0x2fc93: 0x6c84c420, + 0x2fc94: 0x6c83ea20, 0x2fc95: 0x6c83ec20, 0x2fc96: 0x6c83ee20, 0x2fc97: 0x6c83f020, + 0x2fc98: 0x6c83f220, 0x2fc99: 0x6cac7020, 0x2fc9a: 0x6c83f420, 0x2fc9b: 0x6c83f620, + 0x2fc9c: 0x6c83f820, 0x2fc9d: 0x6c83fa20, 0x2fc9e: 0x6c83fc20, 0x2fc9f: 0x6c83fe20, + 0x2fca0: 0x6c840020, 0x2fca1: 0x6c840220, 0x2fca2: 0x6c840420, 0x2fca3: 0x6c840620, + 0x2fca4: 0x6c840820, 0x2fca5: 0x6c840a20, 0x2fca6: 0x6c840c20, 0x2fca7: 0x6c840e20, + 0x2fca8: 0x6c841020, 0x2fca9: 0x6c841220, 0x2fcaa: 0x6c841420, 0x2fcab: 0x6cac7220, + 0x2fcac: 0x6c841620, 0x2fcad: 0x6c841820, 0x2fcae: 0x6c841a20, 0x2fcaf: 0x6c841c20, + 0x2fcb0: 0x6cac7820, 0x2fcb1: 0x6cac7a20, 0x2fcb2: 0x6cac7c20, 0x2fcb3: 0x6cac7e20, + 0x2fcb4: 0x6cac8020, 0x2fcb5: 0x6cac8220, 0x2fcb6: 0x6cac8420, 0x2fcb7: 0x6cac8620, + 0x2fcb8: 0x6cac8820, 0x2fcb9: 0x6cac8a20, 0x2fcba: 0x6cac8c20, 0x2fcbb: 0x6cac8e20, + 0x2fcbc: 0x6cac9020, 0x2fcbd: 0x6cac9220, 0x2fcbe: 0x6cac9420, 0x2fcbf: 0x6cac9620, + // Block 0xbf3, offset 0x2fcc0 + 0x2fcc0: 0x6cac9820, 0x2fcc1: 0x6cac9a20, 0x2fcc2: 0x6cac9c20, 0x2fcc3: 0x6cac9e20, + 0x2fcc4: 0x6caca020, 0x2fcc5: 0x6caca220, 0x2fcc6: 0x6caca420, 0x2fcc7: 0x6caca620, + 0x2fcc8: 0x6caca820, 0x2fcc9: 0x6cacaa20, 0x2fcca: 0x6cacac20, 0x2fccb: 0x6cacae20, + 0x2fccc: 0x6cacb020, 0x2fccd: 0x6cacb220, 0x2fcce: 0x6cacb420, 0x2fccf: 0x6cacb620, + 0x2fcd0: 0x6cacb820, 0x2fcd1: 0x6cacba20, 0x2fcd2: 0x6cacbc20, 0x2fcd3: 0x6cacbe20, + 0x2fcd4: 0x6cacc020, 0x2fcd5: 0x6cacc220, 0x2fcd6: 0x6cacc420, 0x2fcd7: 0x6cacc620, + 0x2fcd8: 0x6cacc820, 0x2fcd9: 0x6cacca20, 0x2fcda: 0x6cdb1c20, 0x2fcdb: 0x6caccc20, + 0x2fcdc: 0x6cacce20, 0x2fcdd: 0x6cacd020, 0x2fcde: 0x6cacd220, 0x2fcdf: 0x6cacd420, + 0x2fce0: 0x6cacd620, 0x2fce1: 0x6cacd820, 0x2fce2: 0x6cacda20, 0x2fce3: 0x6cacdc20, + 0x2fce4: 0x6cacde20, 0x2fce5: 0x6cace020, 0x2fce6: 0x6cace220, 0x2fce7: 0x6cace420, + 0x2fce8: 0x6cace620, 0x2fce9: 0x6cace820, 0x2fcea: 0x6cacea20, 0x2fceb: 0x6cacec20, + 0x2fcec: 0x6cacee20, 0x2fced: 0x6cae1e20, 0x2fcee: 0x6cacf020, 0x2fcef: 0x6cacf220, + 0x2fcf0: 0x6cacf420, 0x2fcf1: 0x6cacf620, 0x2fcf2: 0x6cacf820, 0x2fcf3: 0x6cacfa20, + 0x2fcf4: 0x6cacfc20, 0x2fcf5: 0x6cacfe20, 0x2fcf6: 0x6cad0020, 0x2fcf7: 0x6cad0220, + 0x2fcf8: 0x6cad0420, 0x2fcf9: 0x6cad0620, 0x2fcfa: 0x6cad0820, 0x2fcfb: 0x6d098220, + 0x2fcfc: 0x6cad0a20, 0x2fcfd: 0x6cad0c20, 0x2fcfe: 0x6cdb1e20, 0x2fcff: 0x6cdb2020, + // Block 0xbf4, offset 0x2fd00 + 0x2fd00: 0x6cdb2220, 0x2fd01: 0x6cdb2420, 0x2fd02: 0x6cdb2620, 0x2fd03: 0x6cdb2820, + 0x2fd04: 0x6cdb2a20, 0x2fd05: 0x6cdb2c20, 0x2fd06: 0x6cdb2e20, 0x2fd07: 0x6cdb3020, + 0x2fd08: 0x6cdb3220, 0x2fd09: 0x6cdb3420, 0x2fd0a: 0x6cdb3620, 0x2fd0b: 0x6cdb3820, + 0x2fd0c: 0x6cdb3a20, 0x2fd0d: 0x6cdb3c20, 0x2fd0e: 0x6cdb3e20, 0x2fd0f: 0x6cdb4020, + 0x2fd10: 0x6cdb4220, 0x2fd11: 0x6cdb4420, 0x2fd12: 0x6cdb4620, 0x2fd13: 0x6cdb4820, + 0x2fd14: 0x6cdb4a20, 0x2fd15: 0x6cdb4c20, 0x2fd16: 0x6cdb4e20, 0x2fd17: 0x6cdb5020, + 0x2fd18: 0x6cdb5220, 0x2fd19: 0x6d098420, 0x2fd1a: 0x6cdb5420, 0x2fd1b: 0x6cdb5620, + 0x2fd1c: 0x6cdb5820, 0x2fd1d: 0x6cdb5a20, 0x2fd1e: 0x6cdb5c20, 0x2fd1f: 0x6cdb5e20, + 0x2fd20: 0x6cdb6020, 0x2fd21: 0x6cdb6220, 0x2fd22: 0x6cdb6420, 0x2fd23: 0x6cdb6620, + 0x2fd24: 0x6cdb6820, 0x2fd25: 0x6cdb6a20, 0x2fd26: 0x6cdb6c20, 0x2fd27: 0x6cdb6e20, + 0x2fd28: 0x6cdb7020, 0x2fd29: 0x6cdb7220, 0x2fd2a: 0x6cdb7420, 0x2fd2b: 0x6cdb7620, + 0x2fd2c: 0x6cdb7820, 0x2fd2d: 0x6cdb7a20, 0x2fd2e: 0x6cdb7c20, 0x2fd2f: 0x6cdb7e20, + 0x2fd30: 0x6cdb8020, 0x2fd31: 0x6cdb8220, 0x2fd32: 0x6cdb8420, 0x2fd33: 0x6cdb8620, + 0x2fd34: 0x6cdb8820, 0x2fd35: 0x6cdb8a20, 0x2fd36: 0x6cdb8c20, 0x2fd37: 0x6cdb8e20, + 0x2fd38: 0x6cdb9020, 0x2fd39: 0x6cdb9220, 0x2fd3a: 0x6cdb9420, 0x2fd3b: 0x6cdb9620, + 0x2fd3c: 0x6cdb9820, 0x2fd3d: 0x6cdb9a20, 0x2fd3e: 0x6cdb9c20, 0x2fd3f: 0x6cdb9e20, + // Block 0xbf5, offset 0x2fd40 + 0x2fd40: 0x6cdba020, 0x2fd41: 0x6cdba220, 0x2fd42: 0x6cdba420, 0x2fd43: 0x6cdba620, + 0x2fd44: 0x6cdba820, 0x2fd45: 0x6cdbaa20, 0x2fd46: 0x6cdbac20, 0x2fd47: 0x6cdbae20, + 0x2fd48: 0x6cdbb020, 0x2fd49: 0x6cdbb220, 0x2fd4a: 0x6cdbb420, 0x2fd4b: 0x6cdbb620, + 0x2fd4c: 0x6cdbb820, 0x2fd4d: 0x6cdbba20, 0x2fd4e: 0x6cdbbc20, 0x2fd4f: 0x6cdbbe20, + 0x2fd50: 0x6cdbc020, 0x2fd51: 0x6cdbc220, 0x2fd52: 0x6cdbc420, 0x2fd53: 0x6cdbc620, + 0x2fd54: 0x6cdbc820, 0x2fd55: 0x6cdbca20, 0x2fd56: 0x6cdbcc20, 0x2fd57: 0x6cdbce20, + 0x2fd58: 0x6cdbd020, 0x2fd59: 0x6cdbd220, 0x2fd5a: 0x6cdbd420, 0x2fd5b: 0x6cdbd620, + 0x2fd5c: 0x6cdbd820, 0x2fd5d: 0x6cdbda20, 0x2fd5e: 0x6cdbdc20, 0x2fd5f: 0x6cdbde20, + 0x2fd60: 0x6cdbe020, 0x2fd61: 0x6cdbe220, 0x2fd62: 0x6cdbe420, 0x2fd63: 0x6cdbe620, + 0x2fd64: 0x6cdbe820, 0x2fd65: 0x6d098620, 0x2fd66: 0x6cdbea20, 0x2fd67: 0x6cdbec20, + 0x2fd68: 0x6d098820, 0x2fd69: 0x6d098a20, 0x2fd6a: 0x6d098c20, 0x2fd6b: 0x6d098e20, + 0x2fd6c: 0x6d037820, 0x2fd6d: 0x6d099020, 0x2fd6e: 0x6d099220, 0x2fd6f: 0x6d099420, + 0x2fd70: 0x6d099620, 0x2fd71: 0x6d099820, 0x2fd72: 0x6d099a20, 0x2fd73: 0x6d099c20, + 0x2fd74: 0x6d099e20, 0x2fd75: 0x6d09a020, 0x2fd76: 0x6d09a220, 0x2fd77: 0x6d09a420, + 0x2fd78: 0x6cdd4420, 0x2fd79: 0x6d09a620, 0x2fd7a: 0x6d09a820, 0x2fd7b: 0x6d09aa20, + 0x2fd7c: 0x6d09ac20, 0x2fd7d: 0x6d09ae20, 0x2fd7e: 0x6d09b020, 0x2fd7f: 0x6d09b220, + // Block 0xbf6, offset 0x2fd80 + 0x2fd80: 0x6d09b420, 0x2fd81: 0x6d09b620, 0x2fd82: 0x6d09b820, 0x2fd83: 0x6d09ba20, + 0x2fd84: 0x6d09bc20, 0x2fd85: 0x6d09be20, 0x2fd86: 0x6d09c020, 0x2fd87: 0x6d09c220, + 0x2fd88: 0x6d09c420, 0x2fd89: 0x6d09c620, 0x2fd8a: 0x6d09c820, 0x2fd8b: 0x6d09ca20, + 0x2fd8c: 0x6d09cc20, 0x2fd8d: 0x6d09ce20, 0x2fd8e: 0x6d09d020, 0x2fd8f: 0x6d09d220, + 0x2fd90: 0x6d09d420, 0x2fd91: 0x6d09d620, 0x2fd92: 0x6d09d820, 0x2fd93: 0x6d09da20, + 0x2fd94: 0x6d09dc20, 0x2fd95: 0x6d09de20, 0x2fd96: 0x6d09e020, 0x2fd97: 0x6cdbee20, + 0x2fd98: 0x6d09e220, 0x2fd99: 0x6d09e420, 0x2fd9a: 0x6d09e620, 0x2fd9b: 0x6d09e820, + 0x2fd9c: 0x6d09ea20, 0x2fd9d: 0x6d09ec20, 0x2fd9e: 0x6d09ee20, 0x2fd9f: 0x6d09f020, + 0x2fda0: 0x6d09f220, 0x2fda1: 0x6d09f420, 0x2fda2: 0x6d09f620, 0x2fda3: 0x6d09f820, + 0x2fda4: 0x6d09fa20, 0x2fda5: 0x6d09fc20, 0x2fda6: 0x6d09fe20, 0x2fda7: 0x6d0a0020, + 0x2fda8: 0x6d0a0220, 0x2fda9: 0x6d0a0420, 0x2fdaa: 0x6d0a0620, 0x2fdab: 0x6d0a0820, + 0x2fdac: 0x6d0a0a20, 0x2fdad: 0x6d0a0c20, 0x2fdae: 0x6d0a0e20, 0x2fdaf: 0x6d0a1020, + 0x2fdb0: 0x6d0a1220, 0x2fdb1: 0x6d0a1420, 0x2fdb2: 0x6d0a1620, 0x2fdb3: 0x6d0a1820, + 0x2fdb4: 0x6d0a1a20, 0x2fdb5: 0x6d0a1c20, 0x2fdb6: 0x6d0a1e20, 0x2fdb7: 0x6d0a2020, + 0x2fdb8: 0x6d0a2220, 0x2fdb9: 0x6d0a2420, 0x2fdba: 0x6d0a2620, 0x2fdbb: 0x6d0a2820, + 0x2fdbc: 0x6d0a2a20, 0x2fdbd: 0x6d0a2c20, 0x2fdbe: 0x6d0a2e20, 0x2fdbf: 0x6d0a3020, + // Block 0xbf7, offset 0x2fdc0 + 0x2fdc0: 0x6d0a3220, 0x2fdc1: 0x6d0a3420, 0x2fdc2: 0x6d0a3620, 0x2fdc3: 0x6d0a3820, + 0x2fdc4: 0x6d0a3a20, 0x2fdc5: 0x6d0a3c20, 0x2fdc6: 0x6d0a3e20, 0x2fdc7: 0x6d0a4020, + 0x2fdc8: 0x6d0a4220, 0x2fdc9: 0x6d0a4420, 0x2fdca: 0x6d640e20, 0x2fdcb: 0x6d0a4620, + 0x2fdcc: 0x6d0a4820, 0x2fdcd: 0x6d0a4a20, 0x2fdce: 0x6d0a4c20, 0x2fdcf: 0x6d0a4e20, + 0x2fdd0: 0x6d37b020, 0x2fdd1: 0x6d37b220, 0x2fdd2: 0x6d37b420, 0x2fdd3: 0x6d37b620, + 0x2fdd4: 0x6d37b820, 0x2fdd5: 0x6d37ba20, 0x2fdd6: 0x6d37bc20, 0x2fdd7: 0x6d37be20, + 0x2fdd8: 0x6d37c020, 0x2fdd9: 0x6d37c220, 0x2fdda: 0x6d37c420, 0x2fddb: 0x6d37c620, + 0x2fddc: 0x6d37c820, 0x2fddd: 0x6d37ca20, 0x2fdde: 0x6d37cc20, 0x2fddf: 0x6d37ce20, + 0x2fde0: 0x6d37d020, 0x2fde1: 0x6d37d220, 0x2fde2: 0x6d37d420, 0x2fde3: 0x6d37d620, + 0x2fde4: 0x6d37d820, 0x2fde5: 0x6d37da20, 0x2fde6: 0x6d37dc20, 0x2fde7: 0x6d37de20, + 0x2fde8: 0x6d37e020, 0x2fde9: 0x6d37e220, 0x2fdea: 0x6d37e420, 0x2fdeb: 0x6d37e620, + 0x2fdec: 0x6d37e820, 0x2fded: 0x6d37ea20, 0x2fdee: 0x6d37ec20, 0x2fdef: 0x6d37ee20, + 0x2fdf0: 0x6d37f020, 0x2fdf1: 0x6d37f220, 0x2fdf2: 0x6d37f420, 0x2fdf3: 0x6d37f620, + 0x2fdf4: 0x6d37f820, 0x2fdf5: 0x6d37fa20, 0x2fdf6: 0x6d37fc20, 0x2fdf7: 0x6d37fe20, + 0x2fdf8: 0x6d2b2a20, 0x2fdf9: 0x6d380020, 0x2fdfa: 0x6d380220, 0x2fdfb: 0x6d380420, + 0x2fdfc: 0x6d380620, 0x2fdfd: 0x6d380820, 0x2fdfe: 0x6d380a20, 0x2fdff: 0x6d380c20, + // Block 0xbf8, offset 0x2fe00 + 0x2fe00: 0x6d380e20, 0x2fe01: 0x6d381020, 0x2fe02: 0x6d381220, 0x2fe03: 0x6d381420, + 0x2fe04: 0x6d381620, 0x2fe05: 0x6d0bb820, 0x2fe06: 0x6d381820, 0x2fe07: 0x6d381a20, + 0x2fe08: 0x6d0bba20, 0x2fe09: 0x6d381c20, 0x2fe0a: 0x6d381e20, 0x2fe0b: 0x6d382020, + 0x2fe0c: 0x6d382220, 0x2fe0d: 0x6d382420, 0x2fe0e: 0x6d382620, 0x2fe0f: 0x6d382820, + 0x2fe10: 0x6d382a20, 0x2fe11: 0x6d382c20, 0x2fe12: 0x6d382e20, 0x2fe13: 0x6d383020, + 0x2fe14: 0x6d383220, 0x2fe15: 0x6d383420, 0x2fe16: 0x6d383620, 0x2fe17: 0x6d383820, + 0x2fe18: 0x6d383a20, 0x2fe19: 0x6d383c20, 0x2fe1a: 0x6d383e20, 0x2fe1b: 0x6d384020, + 0x2fe1c: 0x6d384220, 0x2fe1d: 0x6d384420, 0x2fe1e: 0x6d8dfe20, 0x2fe1f: 0x6d384620, + 0x2fe20: 0x6d641020, 0x2fe21: 0x6d384820, 0x2fe22: 0x6d384a20, 0x2fe23: 0x6d384c20, + 0x2fe24: 0x6d384e20, 0x2fe25: 0x6d39b820, 0x2fe26: 0x6d385020, 0x2fe27: 0x6d641220, + 0x2fe28: 0x6d641420, 0x2fe29: 0x6d641620, 0x2fe2a: 0x6d641820, 0x2fe2b: 0x6d641a20, + 0x2fe2c: 0x6d641c20, 0x2fe2d: 0x6d641e20, 0x2fe2e: 0x6d642020, 0x2fe2f: 0x6d642220, + 0x2fe30: 0x6d642420, 0x2fe31: 0x6d0bbc20, 0x2fe32: 0x6d642620, 0x2fe33: 0x6d642820, + 0x2fe34: 0x6d642a20, 0x2fe35: 0x6d642c20, 0x2fe36: 0x6d642e20, 0x2fe37: 0x6d643020, + 0x2fe38: 0x6d643220, 0x2fe39: 0x6d643420, 0x2fe3a: 0x6d643620, 0x2fe3b: 0x6d643820, + 0x2fe3c: 0x6d643a20, 0x2fe3d: 0x6d643c20, 0x2fe3e: 0x6d643e20, 0x2fe3f: 0x6d644020, + // Block 0xbf9, offset 0x2fe40 + 0x2fe40: 0x6d644220, 0x2fe41: 0x6d644420, 0x2fe42: 0x6d644620, 0x2fe43: 0x6d644820, + 0x2fe44: 0x6d644a20, 0x2fe45: 0x6d644c20, 0x2fe46: 0x6d644e20, 0x2fe47: 0x6d0bbe20, + 0x2fe48: 0x6d645020, 0x2fe49: 0x6d645220, 0x2fe4a: 0x6d645420, 0x2fe4b: 0x6d645620, + 0x2fe4c: 0x6d645820, 0x2fe4d: 0x6d645a20, 0x2fe4e: 0x6d645c20, 0x2fe4f: 0x6d645e20, + 0x2fe50: 0x6d646020, 0x2fe51: 0x6d646220, 0x2fe52: 0x6d646420, 0x2fe53: 0x6d646620, + 0x2fe54: 0x6d646820, 0x2fe55: 0x6d646a20, 0x2fe56: 0x6d646c20, 0x2fe57: 0x6d646e20, + 0x2fe58: 0x6d647020, 0x2fe59: 0x6d647220, 0x2fe5a: 0x6d647420, 0x2fe5b: 0x6d647620, + 0x2fe5c: 0x6d647820, 0x2fe5d: 0x6d647a20, 0x2fe5e: 0x6d647c20, 0x2fe5f: 0x6d647e20, + 0x2fe60: 0x6d648020, 0x2fe61: 0x6d648220, 0x2fe62: 0x6d648420, 0x2fe63: 0x6d648620, + 0x2fe64: 0x6d648820, 0x2fe65: 0x6d648a20, 0x2fe66: 0x6d648c20, 0x2fe67: 0x6d648e20, + 0x2fe68: 0x6d649020, 0x2fe69: 0x6d649220, 0x2fe6a: 0x6d649420, 0x2fe6b: 0x6d649620, + 0x2fe6c: 0x6d649820, 0x2fe6d: 0x6d649a20, 0x2fe6e: 0x6d649c20, 0x2fe6f: 0x6d649e20, + 0x2fe70: 0x6d64a020, 0x2fe71: 0x6d64a220, 0x2fe72: 0x6d64a420, 0x2fe73: 0x6d64a620, + 0x2fe74: 0x6d64a820, 0x2fe75: 0x6d64aa20, 0x2fe76: 0x6d64ac20, 0x2fe77: 0x6d64ae20, + 0x2fe78: 0x6d64b020, 0x2fe79: 0x6d64b220, 0x2fe7a: 0x6d64b420, 0x2fe7b: 0x6d64b620, + 0x2fe7c: 0x6d64b820, 0x2fe7d: 0x6d65f020, 0x2fe7e: 0x6d8e0020, 0x2fe7f: 0x6d8e0220, + // Block 0xbfa, offset 0x2fe80 + 0x2fe80: 0x6d8e0420, 0x2fe81: 0x6d8e0620, 0x2fe82: 0x6d8e0820, 0x2fe83: 0x6d8e0a20, + 0x2fe84: 0x6d8e0c20, 0x2fe85: 0x6d8e0e20, 0x2fe86: 0x6d8e1020, 0x2fe87: 0x6d8e1220, + 0x2fe88: 0x6d8e1420, 0x2fe89: 0x6d8e1620, 0x2fe8a: 0x6d8e1820, 0x2fe8b: 0x6d8e1a20, + 0x2fe8c: 0x6d8e1c20, 0x2fe8d: 0x6d8e1e20, 0x2fe8e: 0x6d8e2020, 0x2fe8f: 0x6d65f220, + 0x2fe90: 0x6d8e2220, 0x2fe91: 0x6d8e2420, 0x2fe92: 0x6d8e2620, 0x2fe93: 0x6d8e2820, + 0x2fe94: 0x6d8e2a20, 0x2fe95: 0x6d8e2c20, 0x2fe96: 0x6d8e2e20, 0x2fe97: 0x6db1fe20, + 0x2fe98: 0x6d8e3020, 0x2fe99: 0x6d8e3220, 0x2fe9a: 0x6d8e3420, 0x2fe9b: 0x6d8e3620, + 0x2fe9c: 0x6d8e3820, 0x2fe9d: 0x6d8e3a20, 0x2fe9e: 0x6d8e3c20, 0x2fe9f: 0x6d8e3e20, + 0x2fea0: 0x6d8e4020, 0x2fea1: 0x6d8e4220, 0x2fea2: 0x6d8e4420, 0x2fea3: 0x6d8e4620, + 0x2fea4: 0x6d8e4820, 0x2fea5: 0x6d8e4a20, 0x2fea6: 0x6d8e4c20, 0x2fea7: 0x6d8e4e20, + 0x2fea8: 0x6d8e5020, 0x2fea9: 0x6d8e5220, 0x2feaa: 0x6d8e5420, 0x2feab: 0x6d8e5620, + 0x2feac: 0x6d8e5820, 0x2fead: 0x6d8e5a20, 0x2feae: 0x6d8e5c20, 0x2feaf: 0x6d8e5e20, + 0x2feb0: 0x6d8e6020, 0x2feb1: 0x6d8e6220, 0x2feb2: 0x6d8e6420, 0x2feb3: 0x6d8e6620, + 0x2feb4: 0x6d8e6820, 0x2feb5: 0x6d8e6a20, 0x2feb6: 0x6db20020, 0x2feb7: 0x6db20220, + 0x2feb8: 0x6db20420, 0x2feb9: 0x6db20620, 0x2feba: 0x6db20820, 0x2febb: 0x6db20a20, + 0x2febc: 0x6db20c20, 0x2febd: 0x6db20e20, 0x2febe: 0x6db21020, 0x2febf: 0x6db21220, + // Block 0xbfb, offset 0x2fec0 + 0x2fec0: 0x6db21420, 0x2fec1: 0x6db21620, 0x2fec2: 0x6db21820, 0x2fec3: 0x6db21a20, + 0x2fec4: 0x6db21c20, 0x2fec5: 0x6db21e20, 0x2fec6: 0x6db22020, 0x2fec7: 0x6db22220, + 0x2fec8: 0x6db22420, 0x2fec9: 0x6db22620, 0x2feca: 0x6db22820, 0x2fecb: 0x6db22a20, + 0x2fecc: 0x6d8fc420, 0x2fecd: 0x6db22c20, 0x2fece: 0x6db22e20, 0x2fecf: 0x6db23020, + 0x2fed0: 0x6db23220, 0x2fed1: 0x6db23420, 0x2fed2: 0x6db23620, 0x2fed3: 0x6db23820, + 0x2fed4: 0x6db23a20, 0x2fed5: 0x6db23c20, 0x2fed6: 0x6db23e20, 0x2fed7: 0x6db24020, + 0x2fed8: 0x6db24220, 0x2fed9: 0x6db24420, 0x2feda: 0x6db24620, 0x2fedb: 0x6db24820, + 0x2fedc: 0x6db24a20, 0x2fedd: 0x6db24c20, 0x2fede: 0x6db24e20, 0x2fedf: 0x6db25020, + 0x2fee0: 0x6db25220, 0x2fee1: 0x6db25420, 0x2fee2: 0x6db25620, 0x2fee3: 0x6db25820, + 0x2fee4: 0x6db25a20, 0x2fee5: 0x6db25c20, 0x2fee6: 0x6db25e20, 0x2fee7: 0x6db26020, + 0x2fee8: 0x6db26220, 0x2fee9: 0x6dd14c20, 0x2feea: 0x6db26420, 0x2feeb: 0x6db26620, + 0x2feec: 0x6db26820, 0x2feed: 0x6db39420, 0x2feee: 0x6db26a20, 0x2feef: 0x6db39620, + 0x2fef0: 0x6dd14e20, 0x2fef1: 0x6dd15020, 0x2fef2: 0x6dd15220, 0x2fef3: 0x6dd15420, + 0x2fef4: 0x6dd15620, 0x2fef5: 0x6dd15820, 0x2fef6: 0x6dd15a20, 0x2fef7: 0x6dd15c20, + 0x2fef8: 0x6dd15e20, 0x2fef9: 0x6dd16020, 0x2fefa: 0x6dd16220, 0x2fefb: 0x6dd16420, + 0x2fefc: 0x6dd16620, 0x2fefd: 0x6dd16820, 0x2fefe: 0x6dd16a20, 0x2feff: 0x6dd16c20, + // Block 0xbfc, offset 0x2ff00 + 0x2ff00: 0x6dd16e20, 0x2ff01: 0x6dd17020, 0x2ff02: 0x6dd17220, 0x2ff03: 0x6dd17420, + 0x2ff04: 0x6dd17620, 0x2ff05: 0x6dd17820, 0x2ff06: 0x6dd17a20, 0x2ff07: 0x6dd17c20, + 0x2ff08: 0x6dd17e20, 0x2ff09: 0x6dd18020, 0x2ff0a: 0x6dd18220, 0x2ff0b: 0x6dd18420, + 0x2ff0c: 0x6dd18620, 0x2ff0d: 0x6dd18820, 0x2ff0e: 0x6dd18a20, 0x2ff0f: 0x6dd18c20, + 0x2ff10: 0x6dd18e20, 0x2ff11: 0x6deac020, 0x2ff12: 0x6dd19020, 0x2ff13: 0x6dd19220, + 0x2ff14: 0x6e128a20, 0x2ff15: 0x6deac220, 0x2ff16: 0x6deac420, 0x2ff17: 0x6deac620, + 0x2ff18: 0x6deac820, 0x2ff19: 0x6deaca20, 0x2ff1a: 0x6deacc20, 0x2ff1b: 0x6deace20, + 0x2ff1c: 0x6dead020, 0x2ff1d: 0x6dead220, 0x2ff1e: 0x6dead420, 0x2ff1f: 0x6dead620, + 0x2ff20: 0x6dead820, 0x2ff21: 0x6deada20, 0x2ff22: 0x6deadc20, 0x2ff23: 0x6deade20, + 0x2ff24: 0x6deae020, 0x2ff25: 0x6deae220, 0x2ff26: 0x6deae420, 0x2ff27: 0x6deae620, + 0x2ff28: 0x6deae820, 0x2ff29: 0x6deaea20, 0x2ff2a: 0x6deaec20, 0x2ff2b: 0x6deaee20, + 0x2ff2c: 0x6deaf020, 0x2ff2d: 0x6deaf220, 0x2ff2e: 0x6e006c20, 0x2ff2f: 0x6deaf420, + 0x2ff30: 0x6deaf620, 0x2ff31: 0x6deaf820, 0x2ff32: 0x6deafa20, 0x2ff33: 0x6deafc20, + 0x2ff34: 0x6deafe20, 0x2ff35: 0x6deb0020, 0x2ff36: 0x6e006e20, 0x2ff37: 0x6debce20, + 0x2ff38: 0x6debd020, 0x2ff39: 0x6e007020, 0x2ff3a: 0x6e007220, 0x2ff3b: 0x6e007420, + 0x2ff3c: 0x6e007620, 0x2ff3d: 0x6e007820, 0x2ff3e: 0x6e007a20, 0x2ff3f: 0x6e007c20, + // Block 0xbfd, offset 0x2ff40 + 0x2ff40: 0x6e007e20, 0x2ff41: 0x6e008020, 0x2ff42: 0x6e008220, 0x2ff43: 0x6e008420, + 0x2ff44: 0x6e008620, 0x2ff45: 0x6e008820, 0x2ff46: 0x6e008a20, 0x2ff47: 0x6e008c20, + 0x2ff48: 0x6e008e20, 0x2ff49: 0x6e009020, 0x2ff4a: 0x6e009220, 0x2ff4b: 0x6e009420, + 0x2ff4c: 0x6e009620, 0x2ff4d: 0x6e009820, 0x2ff4e: 0x6e009a20, 0x2ff4f: 0x6e009c20, + 0x2ff50: 0x6e009e20, 0x2ff51: 0x6e00a020, 0x2ff52: 0x6e015420, 0x2ff53: 0x6e00a220, + 0x2ff54: 0x6e00a420, 0x2ff55: 0x6e128c20, 0x2ff56: 0x6e128e20, 0x2ff57: 0x6e129020, + 0x2ff58: 0x6e129220, 0x2ff59: 0x6e129420, 0x2ff5a: 0x6e129620, 0x2ff5b: 0x6e015620, + 0x2ff5c: 0x6e129820, 0x2ff5d: 0x6e129a20, 0x2ff5e: 0x6e129c20, 0x2ff5f: 0x6e129e20, + 0x2ff60: 0x6e12a020, 0x2ff61: 0x6e12a220, 0x2ff62: 0x6e00a620, 0x2ff63: 0x6e12a420, + 0x2ff64: 0x6e006a20, 0x2ff65: 0x6e12a620, 0x2ff66: 0x6e12a820, 0x2ff67: 0x6e12aa20, + 0x2ff68: 0x6e12ac20, 0x2ff69: 0x6e12ae20, 0x2ff6a: 0x6e12b020, 0x2ff6b: 0x6e12b220, + 0x2ff6c: 0x6e20b820, 0x2ff6d: 0x6e12b420, 0x2ff6e: 0x6e12b620, 0x2ff6f: 0x6e12b820, + 0x2ff70: 0x6e015820, 0x2ff71: 0x6e2b7e20, 0x2ff72: 0x6e20ba20, 0x2ff73: 0x6e20bc20, + 0x2ff74: 0x6e20be20, 0x2ff75: 0x6e20c020, 0x2ff76: 0x6e20c220, 0x2ff77: 0x6e20c420, + 0x2ff78: 0x6e2b8020, 0x2ff79: 0x6e2b8220, 0x2ff7a: 0x6e2b8420, 0x2ff7b: 0x6e2b8620, + 0x2ff7c: 0x6e2b8820, 0x2ff7d: 0x6e2b8a20, 0x2ff7e: 0x6e2b8c20, 0x2ff7f: 0x6e2b8e20, + // Block 0xbfe, offset 0x2ff80 + 0x2ff80: 0x6e2b9020, 0x2ff81: 0x6e2b9220, 0x2ff82: 0x6e39ca20, 0x2ff83: 0x6e33ec20, + 0x2ff84: 0x6e3df420, 0x2ff85: 0x6e33ee20, 0x2ff86: 0x6e39cc20, 0x2ff87: 0x6e39ce20, + 0x2ff88: 0x6e39d020, 0x2ff89: 0x6e39d220, 0x2ff8a: 0x6e40cc20, 0x2ff8b: 0x6e446620, + 0x2ff8c: 0x6e42fa20, 0x2ff8d: 0x6c14ca20, 0x2ff8e: 0x6c401020, 0x2ff8f: 0x6c401220, + 0x2ff90: 0x6c5f9620, 0x2ff91: 0x6c84ce20, 0x2ff92: 0x6c674020, 0x2ff93: 0x6c84d020, + 0x2ff94: 0x6c84d220, 0x2ff95: 0x6cae2620, 0x2ff96: 0x6cae2820, 0x2ff97: 0x6cae2a20, + 0x2ff98: 0x6cae2c20, 0x2ff99: 0x6cae2e20, 0x2ff9a: 0x6cae3020, 0x2ff9b: 0x6cdd4c20, + 0x2ff9c: 0x6d0bc020, 0x2ff9d: 0x6cdd4e20, 0x2ff9e: 0x6d0bcc20, 0x2ff9f: 0x6d0bce20, + 0x2ffa0: 0x6d39ba20, 0x2ffa1: 0x6d39bc20, 0x2ffa2: 0x6d65f620, 0x2ffa3: 0x6d8fc620, + 0x2ffa4: 0x6d8fca20, 0x2ffa5: 0x6d8fcc20, 0x2ffa6: 0x6d8fce20, 0x2ffa7: 0x6db39a20, + 0x2ffa8: 0x6db39c20, 0x2ffa9: 0x6dd29a20, 0x2ffaa: 0x6e3e1220, 0x2ffab: 0x6c14cc20, + 0x2ffac: 0x6c268a20, 0x2ffad: 0x6c401620, 0x2ffae: 0x6c401820, 0x2ffaf: 0x6c401a20, + 0x2ffb0: 0x6c401c20, 0x2ffb1: 0x6c401e20, 0x2ffb2: 0x6c402020, 0x2ffb3: 0x6c5fa820, + 0x2ffb4: 0x6c5faa20, 0x2ffb5: 0x6c5fac20, 0x2ffb6: 0x6c5fae20, 0x2ffb7: 0x6c5fb020, + 0x2ffb8: 0x6c5fb220, 0x2ffb9: 0x6c5fb420, 0x2ffba: 0x6c5fb620, 0x2ffbb: 0x6c5fb820, + 0x2ffbc: 0x6c5fba20, 0x2ffbd: 0x6c5fbc20, 0x2ffbe: 0x6c5fbe20, 0x2ffbf: 0x6c5fc020, + // Block 0xbff, offset 0x2ffc0 + 0x2ffc0: 0x6c5fc220, 0x2ffc1: 0x6c5fc420, 0x2ffc2: 0x6c5fc620, 0x2ffc3: 0x6c5fc820, + 0x2ffc4: 0x6c84e420, 0x2ffc5: 0x6c84e620, 0x2ffc6: 0x6c84e820, 0x2ffc7: 0x6c84ea20, + 0x2ffc8: 0x6cdd7820, 0x2ffc9: 0x6c84ec20, 0x2ffca: 0x6c84ee20, 0x2ffcb: 0x6c84f020, + 0x2ffcc: 0x6c84f220, 0x2ffcd: 0x6c84f420, 0x2ffce: 0x6c84f620, 0x2ffcf: 0x6c84f820, + 0x2ffd0: 0x6c84fa20, 0x2ffd1: 0x6c84fc20, 0x2ffd2: 0x6c84fe20, 0x2ffd3: 0x6c850020, + 0x2ffd4: 0x6c850220, 0x2ffd5: 0x6c850420, 0x2ffd6: 0x6c850620, 0x2ffd7: 0x6c850820, + 0x2ffd8: 0x6c850a20, 0x2ffd9: 0x6c850c20, 0x2ffda: 0x6c850e20, 0x2ffdb: 0x6c851020, + 0x2ffdc: 0x6c851220, 0x2ffdd: 0x6c851420, 0x2ffde: 0x6c851620, 0x2ffdf: 0x6c851820, + 0x2ffe0: 0x6c851a20, 0x2ffe1: 0x6c851c20, 0x2ffe2: 0x6c851e20, 0x2ffe3: 0x6c852020, + 0x2ffe4: 0x6c852220, 0x2ffe5: 0x6c852420, 0x2ffe6: 0x6c852620, 0x2ffe7: 0x6c852820, + 0x2ffe8: 0x6c852a20, 0x2ffe9: 0x6c852c20, 0x2ffea: 0x6c852e20, 0x2ffeb: 0x6cae6020, + 0x2ffec: 0x6c853020, 0x2ffed: 0x6cae6220, 0x2ffee: 0x6cae6420, 0x2ffef: 0x6cae6620, + 0x2fff0: 0x6cae6820, 0x2fff1: 0x6cae6a20, 0x2fff2: 0x6cae6c20, 0x2fff3: 0x6cae6e20, + 0x2fff4: 0x6cae7020, 0x2fff5: 0x6cae7220, 0x2fff6: 0x6cae7420, 0x2fff7: 0x6cae7620, + 0x2fff8: 0x6cae7820, 0x2fff9: 0x6cae7a20, 0x2fffa: 0x6cae7c20, 0x2fffb: 0x6cae7e20, + 0x2fffc: 0x6cae8020, 0x2fffd: 0x6cae8220, 0x2fffe: 0x6cae8420, 0x2ffff: 0x6cae8620, + // Block 0xc00, offset 0x30000 + 0x30000: 0x6cae8820, 0x30001: 0x6cae8a20, 0x30002: 0x6cae8c20, 0x30003: 0x6cae8e20, + 0x30004: 0x6cae9020, 0x30005: 0x6cae9220, 0x30006: 0x6cae9420, 0x30007: 0x6cae9620, + 0x30008: 0x6cae9820, 0x30009: 0x6cae9a20, 0x3000a: 0x6cae9c20, 0x3000b: 0x6cae9e20, + 0x3000c: 0x6caea020, 0x3000d: 0x6caea220, 0x3000e: 0x6caea420, 0x3000f: 0x6caea620, + 0x30010: 0x6cdd7a20, 0x30011: 0x6cdd7c20, 0x30012: 0x6cdd7e20, 0x30013: 0x6cdd8020, + 0x30014: 0x6cdd8220, 0x30015: 0x6cdd8420, 0x30016: 0x6d0bf020, 0x30017: 0x6cdd8620, + 0x30018: 0x6cdd8820, 0x30019: 0x6cdd8a20, 0x3001a: 0x6cdd8c20, 0x3001b: 0x6cdd8e20, + 0x3001c: 0x6cdd9020, 0x3001d: 0x6cdd9220, 0x3001e: 0x6cdd9420, 0x3001f: 0x6cdd9620, + 0x30020: 0x6cdd9820, 0x30021: 0x6cdd9a20, 0x30022: 0x6cdd9c20, 0x30023: 0x6cdd9e20, + 0x30024: 0x6cdda020, 0x30025: 0x6cdda220, 0x30026: 0x6cdda420, 0x30027: 0x6cdda620, + 0x30028: 0x6cdda820, 0x30029: 0x6cddaa20, 0x3002a: 0x6cddac20, 0x3002b: 0x6cddae20, + 0x3002c: 0x6cddb020, 0x3002d: 0x6cddb220, 0x3002e: 0x6cddb420, 0x3002f: 0x6cddb620, + 0x30030: 0x6cddb820, 0x30031: 0x6cddba20, 0x30032: 0x6cddbc20, 0x30033: 0x6cddbe20, + 0x30034: 0x6cddc020, 0x30035: 0x6d0bf220, 0x30036: 0x6d0bf420, 0x30037: 0x6d0bf620, + 0x30038: 0x6d0bf820, 0x30039: 0x6d0bfa20, 0x3003a: 0x6d0bfc20, 0x3003b: 0x6d0bfe20, + 0x3003c: 0x6d0c0020, 0x3003d: 0x6d0c0220, 0x3003e: 0x6d0c0420, 0x3003f: 0x6d0c0620, + // Block 0xc01, offset 0x30040 + 0x30040: 0x6d0c0820, 0x30041: 0x6d0c0a20, 0x30042: 0x6d0c0c20, 0x30043: 0x6d0c0e20, + 0x30044: 0x6d0c1020, 0x30045: 0x6d0c1220, 0x30046: 0x6d0c1420, 0x30047: 0x6d0c1620, + 0x30048: 0x6d0c1820, 0x30049: 0x6d0c1a20, 0x3004a: 0x6d0c1c20, 0x3004b: 0x6d0c1e20, + 0x3004c: 0x6d0c2020, 0x3004d: 0x6d0c2220, 0x3004e: 0x6d0c2420, 0x3004f: 0x6d0c2620, + 0x30050: 0x6d0c2820, 0x30051: 0x6d39dc20, 0x30052: 0x6d39de20, 0x30053: 0x6d0c2a20, + 0x30054: 0x6d0c2c20, 0x30055: 0x6d0c2e20, 0x30056: 0x6d0c3020, 0x30057: 0x6d0c3220, + 0x30058: 0x6d39fc20, 0x30059: 0x6d39fe20, 0x3005a: 0x6d3a0020, 0x3005b: 0x6d3a0220, + 0x3005c: 0x6d3a0420, 0x3005d: 0x6d3a0620, 0x3005e: 0x6d3a0820, 0x3005f: 0x6d3a0a20, + 0x30060: 0x6d3a0c20, 0x30061: 0x6d3a0e20, 0x30062: 0x6d3a1020, 0x30063: 0x6d3a1220, + 0x30064: 0x6d3a1420, 0x30065: 0x6d3a1620, 0x30066: 0x6d3a1820, 0x30067: 0x6d3a1a20, + 0x30068: 0x6d3a1c20, 0x30069: 0x6d3a1e20, 0x3006a: 0x6d3a2020, 0x3006b: 0x6d39e020, + 0x3006c: 0x6d3a2220, 0x3006d: 0x6d3a2420, 0x3006e: 0x6d3a2620, 0x3006f: 0x6d3a2820, + 0x30070: 0x6d3a2a20, 0x30071: 0x6d3a2c20, 0x30072: 0x6d3a2e20, 0x30073: 0x6d3a3020, + 0x30074: 0x6d3a3220, 0x30075: 0x6d3a3420, 0x30076: 0x6d3a3620, 0x30077: 0x6d3a3820, + 0x30078: 0x6d3a3a20, 0x30079: 0x6d3a3c20, 0x3007a: 0x6d3a3e20, 0x3007b: 0x6d3a4020, + 0x3007c: 0x6d3a4220, 0x3007d: 0x6d3a4420, 0x3007e: 0x6d3a4620, 0x3007f: 0x6d3a4820, + // Block 0xc02, offset 0x30080 + 0x30080: 0x6d3a4a20, 0x30081: 0x6d3a4c20, 0x30082: 0x6d3a4e20, 0x30083: 0x6d3a5020, + 0x30084: 0x6d3a5220, 0x30085: 0x6d3a5420, 0x30086: 0x6d0c3420, 0x30087: 0x6d3a5620, + 0x30088: 0x6d3a5820, 0x30089: 0x6d3a5a20, 0x3008a: 0x6d3a5c20, 0x3008b: 0x6d3a5e20, + 0x3008c: 0x6d662820, 0x3008d: 0x6d0cba20, 0x3008e: 0x6d662a20, 0x3008f: 0x6d662c20, + 0x30090: 0x6d662e20, 0x30091: 0x6d663020, 0x30092: 0x6d663220, 0x30093: 0x6d663420, + 0x30094: 0x6d663620, 0x30095: 0x6d3b0c20, 0x30096: 0x6d663820, 0x30097: 0x6d663a20, + 0x30098: 0x6d663c20, 0x30099: 0x6d663e20, 0x3009a: 0x6d664020, 0x3009b: 0x6d664220, + 0x3009c: 0x6d664420, 0x3009d: 0x6d664620, 0x3009e: 0x6d664820, 0x3009f: 0x6d664a20, + 0x300a0: 0x6d664c20, 0x300a1: 0x6d664e20, 0x300a2: 0x6d665020, 0x300a3: 0x6d665220, + 0x300a4: 0x6d665420, 0x300a5: 0x6d665620, 0x300a6: 0x6d665820, 0x300a7: 0x6d665a20, + 0x300a8: 0x6d665c20, 0x300a9: 0x6d665e20, 0x300aa: 0x6d666020, 0x300ab: 0x6d3b0e20, + 0x300ac: 0x6d666220, 0x300ad: 0x6d666420, 0x300ae: 0x6d666620, 0x300af: 0x6d666820, + 0x300b0: 0x6d666a20, 0x300b1: 0x6d666c20, 0x300b2: 0x6d666e20, 0x300b3: 0x6d667020, + 0x300b4: 0x6d667220, 0x300b5: 0x6d667420, 0x300b6: 0x6d667620, 0x300b7: 0x6d667820, + 0x300b8: 0x6d667a20, 0x300b9: 0x6d900a20, 0x300ba: 0x6d667c20, 0x300bb: 0x6d667e20, + 0x300bc: 0x6d668020, 0x300bd: 0x6d668220, 0x300be: 0x6d668420, 0x300bf: 0x6d668620, + // Block 0xc03, offset 0x300c0 + 0x300c0: 0x6d668820, 0x300c1: 0x6d900c20, 0x300c2: 0x6d673820, 0x300c3: 0x6d900e20, + 0x300c4: 0x6d901020, 0x300c5: 0x6d901220, 0x300c6: 0x6d901420, 0x300c7: 0x6d901620, + 0x300c8: 0x6d901820, 0x300c9: 0x6d901a20, 0x300ca: 0x6d901c20, 0x300cb: 0x6d901e20, + 0x300cc: 0x6d902020, 0x300cd: 0x6d902220, 0x300ce: 0x6d902420, 0x300cf: 0x6d902620, + 0x300d0: 0x6d902820, 0x300d1: 0x6d902a20, 0x300d2: 0x6d902c20, 0x300d3: 0x6d902e20, + 0x300d4: 0x6d903020, 0x300d5: 0x6d903220, 0x300d6: 0x6d903420, 0x300d7: 0x6d903620, + 0x300d8: 0x6d903820, 0x300d9: 0x6d903a20, 0x300da: 0x6d903c20, 0x300db: 0x6d903e20, + 0x300dc: 0x6d904020, 0x300dd: 0x6d904220, 0x300de: 0x6d904420, 0x300df: 0x6d904620, + 0x300e0: 0x6d904820, 0x300e1: 0x6d904a20, 0x300e2: 0x6d904c20, 0x300e3: 0x6d904e20, + 0x300e4: 0x6d905020, 0x300e5: 0x6d905220, 0x300e6: 0x6d905420, 0x300e7: 0x6d905620, + 0x300e8: 0x6d905820, 0x300e9: 0x6d905a20, 0x300ea: 0x6db3d420, 0x300eb: 0x6db3d620, + 0x300ec: 0x6db3d820, 0x300ed: 0x6db3da20, 0x300ee: 0x6db3dc20, 0x300ef: 0x6db3de20, + 0x300f0: 0x6db3e020, 0x300f1: 0x6db3e220, 0x300f2: 0x6db3e420, 0x300f3: 0x6db3e620, + 0x300f4: 0x6db3e820, 0x300f5: 0x6db3ea20, 0x300f6: 0x6db3ec20, 0x300f7: 0x6db3ee20, + 0x300f8: 0x6db3f020, 0x300f9: 0x6db3f220, 0x300fa: 0x6db3f420, 0x300fb: 0x6db3f620, + 0x300fc: 0x6db3f820, 0x300fd: 0x6db3fa20, 0x300fe: 0x6db3fc20, 0x300ff: 0x6db3fe20, + // Block 0xc04, offset 0x30100 + 0x30100: 0x6db40020, 0x30101: 0x6db40220, 0x30102: 0x6db40420, 0x30103: 0x6db40620, + 0x30104: 0x6db40820, 0x30105: 0x6db40a20, 0x30106: 0x6db40c20, 0x30107: 0x6db40e20, + 0x30108: 0x6db41020, 0x30109: 0x6db41220, 0x3010a: 0x6db41420, 0x3010b: 0x6db41620, + 0x3010c: 0x6db41820, 0x3010d: 0x6db41a20, 0x3010e: 0x6db41c20, 0x3010f: 0x6db41e20, + 0x30110: 0x6db42020, 0x30111: 0x6db42220, 0x30112: 0x6db42420, 0x30113: 0x6dd2ba20, + 0x30114: 0x6dd2bc20, 0x30115: 0x6debe420, 0x30116: 0x6dd2be20, 0x30117: 0x6dd2ae20, + 0x30118: 0x6dd2c020, 0x30119: 0x6dd2c220, 0x3011a: 0x6dd2c420, 0x3011b: 0x6dd2c620, + 0x3011c: 0x6dd2c820, 0x3011d: 0x6dd2ca20, 0x3011e: 0x6db4c620, 0x3011f: 0x6dd2cc20, + 0x30120: 0x6dd2ce20, 0x30121: 0x6d668a20, 0x30122: 0x6dd2d020, 0x30123: 0x6dd2d220, + 0x30124: 0x6dd2d420, 0x30125: 0x6dd2d620, 0x30126: 0x6dd2d820, 0x30127: 0x6dd2da20, + 0x30128: 0x6dd2dc20, 0x30129: 0x6dd2de20, 0x3012a: 0x6dd2e020, 0x3012b: 0x6dd2e220, + 0x3012c: 0x6dd2e420, 0x3012d: 0x6dd2e620, 0x3012e: 0x6dd2e820, 0x3012f: 0x6dd2ea20, + 0x30130: 0x6dd2ec20, 0x30131: 0x6dd2ee20, 0x30132: 0x6dd2f020, 0x30133: 0x6dd2f220, + 0x30134: 0x6dd2f420, 0x30135: 0x6dd2f620, 0x30136: 0x6debf620, 0x30137: 0x6debf820, + 0x30138: 0x6debfa20, 0x30139: 0x6debfc20, 0x3013a: 0x6debfe20, 0x3013b: 0x6dec0020, + 0x3013c: 0x6dec0220, 0x3013d: 0x6dec0420, 0x3013e: 0x6dec0620, 0x3013f: 0x6dec0820, + // Block 0xc05, offset 0x30140 + 0x30140: 0x6dec0a20, 0x30141: 0x6debe220, 0x30142: 0x6dec0c20, 0x30143: 0x6dec0e20, + 0x30144: 0x6dec1020, 0x30145: 0x6dec1220, 0x30146: 0x6dec1420, 0x30147: 0x6dec1620, + 0x30148: 0x6dec1820, 0x30149: 0x6dec1a20, 0x3014a: 0x6dec1c20, 0x3014b: 0x6dec1e20, + 0x3014c: 0x6dec2020, 0x3014d: 0x6dec2220, 0x3014e: 0x6dd2f820, 0x3014f: 0x6dec2420, + 0x30150: 0x6e017020, 0x30151: 0x6e017220, 0x30152: 0x6e017420, 0x30153: 0x6e017620, + 0x30154: 0x6e017820, 0x30155: 0x6e017a20, 0x30156: 0x6e017c20, 0x30157: 0x6e017e20, + 0x30158: 0x6e018020, 0x30159: 0x6e018220, 0x3015a: 0x6e135620, 0x3015b: 0x6e135820, + 0x3015c: 0x6e135a20, 0x3015d: 0x6e135c20, 0x3015e: 0x6deca420, 0x3015f: 0x6e135e20, + 0x30160: 0x6e136020, 0x30161: 0x6e136220, 0x30162: 0x6e136420, 0x30163: 0x6e136620, + 0x30164: 0x6e136820, 0x30165: 0x6e212c20, 0x30166: 0x6e212e20, 0x30167: 0x6e213020, + 0x30168: 0x6e213220, 0x30169: 0x6e13c620, 0x3016a: 0x6e213420, 0x3016b: 0x6e13c820, + 0x3016c: 0x6e213620, 0x3016d: 0x6e2be220, 0x3016e: 0x6e2be420, 0x3016f: 0x6e2be620, + 0x30170: 0x6e2be820, 0x30171: 0x6e2bea20, 0x30172: 0x6e2bec20, 0x30173: 0x6e2bee20, + 0x30174: 0x6e2bda20, 0x30175: 0x6e342620, 0x30176: 0x6e342820, 0x30177: 0x6e342a20, + 0x30178: 0x6e342c20, 0x30179: 0x6e342e20, 0x3017a: 0x6e343020, 0x3017b: 0x6e39ec20, + 0x3017c: 0x6e3e1620, 0x3017d: 0x6e40de20, 0x3017e: 0x6e40e020, 0x3017f: 0x6e40fa20, + // Block 0xc06, offset 0x30180 + 0x30180: 0x6c14ce20, 0x30181: 0x6c5ff820, 0x30182: 0x6c5ffa20, 0x30183: 0x6c858420, + 0x30184: 0x6c858620, 0x30185: 0x6caf1c20, 0x30186: 0x6cde4420, 0x30187: 0x6cde4620, + 0x30188: 0x6cde4820, 0x30189: 0x6cde4a20, 0x3018a: 0x6e13ca20, 0x3018b: 0x6e345c20, + 0x3018c: 0x6c14d020, 0x3018d: 0x6c5ffe20, 0x3018e: 0x6c600020, 0x3018f: 0x6c859620, + 0x30190: 0x6caf2620, 0x30191: 0x6caf2820, 0x30192: 0x6caf2a20, 0x30193: 0x6caf2c20, + 0x30194: 0x6caf2e20, 0x30195: 0x6cde5220, 0x30196: 0x6cde5420, 0x30197: 0x6cde5620, + 0x30198: 0x6d0cc820, 0x30199: 0x6d0cca20, 0x3019a: 0x6d674620, 0x3019b: 0x6d674820, + 0x3019c: 0x6d674a20, 0x3019d: 0x6d674c20, 0x3019e: 0x6d912420, 0x3019f: 0x6d912620, + 0x301a0: 0x6d912820, 0x301a1: 0x6d912a20, 0x301a2: 0x6e345e20, 0x301a3: 0x6c14d220, + 0x301a4: 0x6c0a6020, 0x301a5: 0x6c404820, 0x301a6: 0x6c601220, 0x301a7: 0x6c601420, + 0x301a8: 0x6c404a20, 0x301a9: 0x6c601620, 0x301aa: 0x6c601820, 0x301ab: 0x6c601a20, + 0x301ac: 0x6c601c20, 0x301ad: 0x6c85a620, 0x301ae: 0x6c85a820, 0x301af: 0x6c85aa20, + 0x301b0: 0x6c85ac20, 0x301b1: 0x6c85ae20, 0x301b2: 0x6c85b020, 0x301b3: 0x6c85b220, + 0x301b4: 0x6c85b420, 0x301b5: 0x6c85b620, 0x301b6: 0x6c85b820, 0x301b7: 0x6c85ba20, + 0x301b8: 0x6c85bc20, 0x301b9: 0x6c85be20, 0x301ba: 0x6c85c020, 0x301bb: 0x6c85c220, + 0x301bc: 0x6c85c420, 0x301bd: 0x6c85c620, 0x301be: 0x6c85c820, 0x301bf: 0x6c85ca20, + // Block 0xc07, offset 0x301c0 + 0x301c0: 0x6c85cc20, 0x301c1: 0x6c85ce20, 0x301c2: 0x6c85d020, 0x301c3: 0x6c85d220, + 0x301c4: 0x6c85d420, 0x301c5: 0x6c85d620, 0x301c6: 0x6c85d820, 0x301c7: 0x6c85da20, + 0x301c8: 0x6caf4020, 0x301c9: 0x6caf4220, 0x301ca: 0x6caf4420, 0x301cb: 0x6caf4620, + 0x301cc: 0x6caf4820, 0x301cd: 0x6caf4a20, 0x301ce: 0x6caf4c20, 0x301cf: 0x6caf4e20, + 0x301d0: 0x6caf5020, 0x301d1: 0x6caf5220, 0x301d2: 0x6caf5420, 0x301d3: 0x6caf5620, + 0x301d4: 0x6caf5820, 0x301d5: 0x6caf5a20, 0x301d6: 0x6caf5c20, 0x301d7: 0x6caf5e20, + 0x301d8: 0x6caf6020, 0x301d9: 0x6caf6220, 0x301da: 0x6caf6420, 0x301db: 0x6caf6620, + 0x301dc: 0x6caf6820, 0x301dd: 0x6caf6a20, 0x301de: 0x6caf6c20, 0x301df: 0x6caf6e20, + 0x301e0: 0x6caf7020, 0x301e1: 0x6caf7220, 0x301e2: 0x6caf7420, 0x301e3: 0x6caf7620, + 0x301e4: 0x6caf7820, 0x301e5: 0x6caf7a20, 0x301e6: 0x6caf7c20, 0x301e7: 0x6caf7e20, + 0x301e8: 0x6caf8020, 0x301e9: 0x6caf8220, 0x301ea: 0x6caf8420, 0x301eb: 0x6caf8620, + 0x301ec: 0x6caf8820, 0x301ed: 0x6caf8a20, 0x301ee: 0x6caf8c20, 0x301ef: 0x6caf9020, + 0x301f0: 0x6caf8e20, 0x301f1: 0x6cde7820, 0x301f2: 0x6cde7a20, 0x301f3: 0x6cde7c20, + 0x301f4: 0x6cde7e20, 0x301f5: 0x6cde8020, 0x301f6: 0x6cde8220, 0x301f7: 0x6cde8420, + 0x301f8: 0x6cde8620, 0x301f9: 0x6cde8820, 0x301fa: 0x6cde8a20, 0x301fb: 0x6cde8c20, + 0x301fc: 0x6cde8e20, 0x301fd: 0x6cde9020, 0x301fe: 0x6cde9220, 0x301ff: 0x6cde9420, + // Block 0xc08, offset 0x30200 + 0x30200: 0x6cde9620, 0x30201: 0x6cde9820, 0x30202: 0x6cde9a20, 0x30203: 0x6cde9c20, + 0x30204: 0x6cde9e20, 0x30205: 0x6cdea020, 0x30206: 0x6cdea220, 0x30207: 0x6cdea420, + 0x30208: 0x6cdea620, 0x30209: 0x6cdea820, 0x3020a: 0x6d0ce020, 0x3020b: 0x6d0ce220, + 0x3020c: 0x6d0ce420, 0x3020d: 0x6d0ce620, 0x3020e: 0x6d0ce820, 0x3020f: 0x6d0cea20, + 0x30210: 0x6d0cec20, 0x30211: 0x6d0cee20, 0x30212: 0x6d0cf020, 0x30213: 0x6d0cf220, + 0x30214: 0x6d0cf420, 0x30215: 0x6d0cf620, 0x30216: 0x6d0cf820, 0x30217: 0x6cdeaa20, + 0x30218: 0x6d0cfa20, 0x30219: 0x6d0cfc20, 0x3021a: 0x6d0cfe20, 0x3021b: 0x6d0d0020, + 0x3021c: 0x6d0d0220, 0x3021d: 0x6d0d0420, 0x3021e: 0x6d0d0620, 0x3021f: 0x6d0d0820, + 0x30220: 0x6d0d0a20, 0x30221: 0x6d0d0c20, 0x30222: 0x6d3b2620, 0x30223: 0x6d0d0e20, + 0x30224: 0x6d0d1020, 0x30225: 0x6d0d1220, 0x30226: 0x6d676e20, 0x30227: 0x6d3b4820, + 0x30228: 0x6d3b4a20, 0x30229: 0x6d3b4c20, 0x3022a: 0x6d3b4e20, 0x3022b: 0x6d3b5020, + 0x3022c: 0x6d3b5220, 0x3022d: 0x6d3b5420, 0x3022e: 0x6d3b5620, 0x3022f: 0x6d3b5820, + 0x30230: 0x6d3b5a20, 0x30231: 0x6d3b5c20, 0x30232: 0x6d3b5e20, 0x30233: 0x6d3b6020, + 0x30234: 0x6d3b6220, 0x30235: 0x6d3b6420, 0x30236: 0x6d3b6620, 0x30237: 0x6d3b6820, + 0x30238: 0x6d3b6a20, 0x30239: 0x6d3b6c20, 0x3023a: 0x6d3b6e20, 0x3023b: 0x6d3b7020, + 0x3023c: 0x6d3b7220, 0x3023d: 0x6d3b7420, 0x3023e: 0x6d3b7620, 0x3023f: 0x6d3b7820, + // Block 0xc09, offset 0x30240 + 0x30240: 0x6d3b7a20, 0x30241: 0x6cdef820, 0x30242: 0x6d3b7c20, 0x30243: 0x6d3b7e20, + 0x30244: 0x6d3b8020, 0x30245: 0x6d677020, 0x30246: 0x6d677220, 0x30247: 0x6d677420, + 0x30248: 0x6d677620, 0x30249: 0x6d677820, 0x3024a: 0x6d677a20, 0x3024b: 0x6d677c20, + 0x3024c: 0x6d677e20, 0x3024d: 0x6d678020, 0x3024e: 0x6d678220, 0x3024f: 0x6d678420, + 0x30250: 0x6d678620, 0x30251: 0x6d678820, 0x30252: 0x6d678a20, 0x30253: 0x6d678c20, + 0x30254: 0x6d678e20, 0x30255: 0x6d679020, 0x30256: 0x6d679220, 0x30257: 0x6d679420, + 0x30258: 0x6d679620, 0x30259: 0x6d679820, 0x3025a: 0x6d3b8220, 0x3025b: 0x6d679a20, + 0x3025c: 0x6d679c20, 0x3025d: 0x6d679e20, 0x3025e: 0x6d913c20, 0x3025f: 0x6d913e20, + 0x30260: 0x6d914020, 0x30261: 0x6d914220, 0x30262: 0x6d914420, 0x30263: 0x6d914620, + 0x30264: 0x6d914820, 0x30265: 0x6d914a20, 0x30266: 0x6d914c20, 0x30267: 0x6d914e20, + 0x30268: 0x6d915020, 0x30269: 0x6d915220, 0x3026a: 0x6d915420, 0x3026b: 0x6d915620, + 0x3026c: 0x6d915820, 0x3026d: 0x6d915a20, 0x3026e: 0x6d915c20, 0x3026f: 0x6d915e20, + 0x30270: 0x6d916020, 0x30271: 0x6d916220, 0x30272: 0x6d916420, 0x30273: 0x6db4ee20, + 0x30274: 0x6d916620, 0x30275: 0x6db4f020, 0x30276: 0x6db4f220, 0x30277: 0x6db4f420, + 0x30278: 0x6db4f620, 0x30279: 0x6db4f820, 0x3027a: 0x6db4fa20, 0x3027b: 0x6db4fc20, + 0x3027c: 0x6db4fe20, 0x3027d: 0x6db50020, 0x3027e: 0x6db50220, 0x3027f: 0x6db50420, + // Block 0xc0a, offset 0x30280 + 0x30280: 0x6db50620, 0x30281: 0x6db50820, 0x30282: 0x6db50a20, 0x30283: 0x6db50c20, + 0x30284: 0x6db50e20, 0x30285: 0x6db51020, 0x30286: 0x6dd3b620, 0x30287: 0x6dd3b820, + 0x30288: 0x6dd3ba20, 0x30289: 0x6dd3bc20, 0x3028a: 0x6dd3be20, 0x3028b: 0x6dd3c020, + 0x3028c: 0x6dd3c220, 0x3028d: 0x6dd3c420, 0x3028e: 0x6dd3c620, 0x3028f: 0x6dd3c820, + 0x30290: 0x6dd3ca20, 0x30291: 0x6dd3cc20, 0x30292: 0x6db51420, 0x30293: 0x6dd3ce20, + 0x30294: 0x6db51220, 0x30295: 0x6dd3d020, 0x30296: 0x6decb020, 0x30297: 0x6decb220, + 0x30298: 0x6decb420, 0x30299: 0x6decb620, 0x3029a: 0x6decb820, 0x3029b: 0x6decba20, + 0x3029c: 0x6decbc20, 0x3029d: 0x6decbe20, 0x3029e: 0x6decc020, 0x3029f: 0x6decc220, + 0x302a0: 0x6decc420, 0x302a1: 0x6decc620, 0x302a2: 0x6decc820, 0x302a3: 0x6e01ec20, + 0x302a4: 0x6e01ee20, 0x302a5: 0x6e01f020, 0x302a6: 0x6e01f220, 0x302a7: 0x6e01f420, + 0x302a8: 0x6e01f620, 0x302a9: 0x6e13d220, 0x302aa: 0x6e13d420, 0x302ab: 0x6e13d620, + 0x302ac: 0x6e13d820, 0x302ad: 0x6e13da20, 0x302ae: 0x6e13dc20, 0x302af: 0x6e218e20, + 0x302b0: 0x6e219020, 0x302b1: 0x6e219220, 0x302b2: 0x6e219420, 0x302b3: 0x6e2c2620, + 0x302b4: 0x6e2c2820, 0x302b5: 0x6e346420, 0x302b6: 0x6e2c2a20, 0x302b7: 0x6e346620, + 0x302b8: 0x6e3a0c20, 0x302b9: 0x6e3a0e20, 0x302ba: 0x6e3a1020, 0x302bb: 0x6e3a1220, + 0x302bc: 0x6e3a1420, 0x302bd: 0x6e40fc20, 0x302be: 0x6c14d420, 0x302bf: 0x6c14d620, + // Block 0xc0b, offset 0x302c0 + 0x302c0: 0x6c14d820, 0x302c1: 0x6c606620, 0x302c2: 0x6cafe420, 0x302c3: 0x6cdefe20, + 0x302c4: 0x6cdf0020, 0x302c5: 0x6d0d7620, 0x302c6: 0x6dd40e20, 0x302c7: 0x6decfe20, + 0x302c8: 0x6ded0020, 0x302c9: 0x6e2c3820, 0x302ca: 0x6e3a2020, 0x302cb: 0x6c26a020, + 0x302cc: 0x6c606e20, 0x302cd: 0x6c862e20, 0x302ce: 0x6c863020, 0x302cf: 0x6caff420, + 0x302d0: 0x6caff620, 0x302d1: 0x6caff820, 0x302d2: 0x6caffa20, 0x302d3: 0x6caffc20, + 0x302d4: 0x6caffe20, 0x302d5: 0x6cdf1220, 0x302d6: 0x6ca6aa20, 0x302d7: 0x6cdf1420, + 0x302d8: 0x6cdf1620, 0x302d9: 0x6cdf0820, 0x302da: 0x6cdf1820, 0x302db: 0x6d0d8020, + 0x302dc: 0x6d0d8220, 0x302dd: 0x6d3bf020, 0x302de: 0x6d3bf220, 0x302df: 0x6d3bf420, + 0x302e0: 0x6d3bf620, 0x302e1: 0x6d3bf820, 0x302e2: 0x6d67fc20, 0x302e3: 0x6d67fe20, + 0x302e4: 0x6d680020, 0x302e5: 0x6d680220, 0x302e6: 0x6d91ca20, 0x302e7: 0x6d91cc20, + 0x302e8: 0x6d91ce20, 0x302e9: 0x6d683220, 0x302ea: 0x6d91d020, 0x302eb: 0x6db58620, + 0x302ec: 0x6db58820, 0x302ed: 0x6db58a20, 0x302ee: 0x6db58c20, 0x302ef: 0x6db58e20, + 0x302f0: 0x6dd41820, 0x302f1: 0x6dd41a20, 0x302f2: 0x6dd41c20, 0x302f3: 0x6dd41e20, + 0x302f4: 0x6ded0e20, 0x302f5: 0x6ded1020, 0x302f6: 0x6ded1220, 0x302f7: 0x6ded1420, + 0x302f8: 0x6ded1620, 0x302f9: 0x6e021a20, 0x302fa: 0x6e021c20, 0x302fb: 0x6e021e20, + 0x302fc: 0x6e13fe20, 0x302fd: 0x6e140020, 0x302fe: 0x6e21a220, 0x302ff: 0x6e21a420, + // Block 0xc0c, offset 0x30300 + 0x30300: 0x6e3a2420, 0x30301: 0x6c050c20, 0x30302: 0x6c14da20, 0x30303: 0x6c26a220, + 0x30304: 0x6c407220, 0x30305: 0x6c407420, 0x30306: 0x6c5adc20, 0x30307: 0x6c607220, + 0x30308: 0x6c607420, 0x30309: 0x6c607620, 0x3030a: 0x6c863e20, 0x3030b: 0x6cb01c20, + 0x3030c: 0x6cdf3420, 0x3030d: 0x6cdf3620, 0x3030e: 0x6d0dac20, 0x3030f: 0x6d3c1e20, + 0x30310: 0x6d683420, 0x30311: 0x6d683620, 0x30312: 0x6c26a620, 0x30313: 0x6c607c20, + 0x30314: 0x6c607e20, 0x30315: 0x6cb02020, 0x30316: 0x6cb02220, 0x30317: 0x6cb02420, + 0x30318: 0x6cb02620, 0x30319: 0x6cb02820, 0x3031a: 0x6cdf3820, 0x3031b: 0x6cdf3a20, + 0x3031c: 0x6d0db620, 0x3031d: 0x6cdf3c20, 0x3031e: 0x6cdf3e20, 0x3031f: 0x6d0db820, + 0x30320: 0x6d0dba20, 0x30321: 0x6d0dbc20, 0x30322: 0x6d0dbe20, 0x30323: 0x6d0dc020, + 0x30324: 0x6d0dc220, 0x30325: 0x6d0dc420, 0x30326: 0x6d0dc620, 0x30327: 0x6d0dc820, + 0x30328: 0x6d3c2220, 0x30329: 0x6d3c2420, 0x3032a: 0x6d3c2620, 0x3032b: 0x6d3c2820, + 0x3032c: 0x6d684420, 0x3032d: 0x6d684620, 0x3032e: 0x6d684820, 0x3032f: 0x6d684a20, + 0x30330: 0x6d687a20, 0x30331: 0x6d920a20, 0x30332: 0x6db5ac20, 0x30333: 0x6db5ae20, + 0x30334: 0x6dd43820, 0x30335: 0x6ded2a20, 0x30336: 0x6ded2c20, 0x30337: 0x6e023220, + 0x30338: 0x6e023420, 0x30339: 0x6e023620, 0x3033a: 0x6e140a20, 0x3033b: 0x6e21b420, + 0x3033c: 0x6e21b620, 0x3033d: 0x6e2c3c20, 0x3033e: 0x6e2c3e20, 0x3033f: 0x6e3a3820, + // Block 0xc0d, offset 0x30340 + 0x30340: 0x6c26aa20, 0x30341: 0x6c26ac20, 0x30342: 0x6c608c20, 0x30343: 0x6c608e20, + 0x30344: 0x6c609020, 0x30345: 0x6c609220, 0x30346: 0x6c609420, 0x30347: 0x6c609620, + 0x30348: 0x6c609820, 0x30349: 0x6c864e20, 0x3034a: 0x6c865020, 0x3034b: 0x6c865220, + 0x3034c: 0x6c865420, 0x3034d: 0x6c865620, 0x3034e: 0x6c865820, 0x3034f: 0x6c865a20, + 0x30350: 0x6c865c20, 0x30351: 0x6c865e20, 0x30352: 0x6c866020, 0x30353: 0x6c866220, + 0x30354: 0x6c866420, 0x30355: 0x6c866620, 0x30356: 0x6c866820, 0x30357: 0x6c866a20, + 0x30358: 0x6c866c20, 0x30359: 0x6c866e20, 0x3035a: 0x6c867020, 0x3035b: 0x6cb07820, + 0x3035c: 0x6cb07a20, 0x3035d: 0x6cb07c20, 0x3035e: 0x6cb07e20, 0x3035f: 0x6cb08020, + 0x30360: 0x6cb08220, 0x30361: 0x6cb08420, 0x30362: 0x6cb08620, 0x30363: 0x6cb08820, + 0x30364: 0x6cb08a20, 0x30365: 0x6cb08c20, 0x30366: 0x6cb08e20, 0x30367: 0x6cb09020, + 0x30368: 0x6cb09220, 0x30369: 0x6cb09420, 0x3036a: 0x6cb09620, 0x3036b: 0x6cb09820, + 0x3036c: 0x6cb09a20, 0x3036d: 0x6cb09c20, 0x3036e: 0x6cb09e20, 0x3036f: 0x6cb0a020, + 0x30370: 0x6cb0a220, 0x30371: 0x6cb0a420, 0x30372: 0x6cb0a620, 0x30373: 0x6cb0a820, + 0x30374: 0x6cdf8020, 0x30375: 0x6cdf8220, 0x30376: 0x6cdf8420, 0x30377: 0x6cdf8620, + 0x30378: 0x6cdf8820, 0x30379: 0x6cdf8a20, 0x3037a: 0x6cdf8c20, 0x3037b: 0x6cdf8e20, + 0x3037c: 0x6cdf9020, 0x3037d: 0x6cdf9220, 0x3037e: 0x6d0ddc20, 0x3037f: 0x6d0dde20, + // Block 0xc0e, offset 0x30380 + 0x30380: 0x6cdf9420, 0x30381: 0x6cdf9620, 0x30382: 0x6cdf9820, 0x30383: 0x6cdf9a20, + 0x30384: 0x6cdf9c20, 0x30385: 0x6cdf9e20, 0x30386: 0x6cdfa020, 0x30387: 0x6cdfa220, + 0x30388: 0x6cdfa420, 0x30389: 0x6cdfa620, 0x3038a: 0x6cdfa820, 0x3038b: 0x6cdfaa20, + 0x3038c: 0x6cdfac20, 0x3038d: 0x6cdfae20, 0x3038e: 0x6cdfb020, 0x3038f: 0x6cdfb220, + 0x30390: 0x6cdfb420, 0x30391: 0x6cdfb620, 0x30392: 0x6cdfb820, 0x30393: 0x6cdfba20, + 0x30394: 0x6cdfbc20, 0x30395: 0x6cdfbe20, 0x30396: 0x6cdfc020, 0x30397: 0x6cdfc220, + 0x30398: 0x6cdfc420, 0x30399: 0x6cdfc620, 0x3039a: 0x6cdfc820, 0x3039b: 0x6cdfca20, + 0x3039c: 0x6cdfcc20, 0x3039d: 0x6cdfce20, 0x3039e: 0x6cdfd020, 0x3039f: 0x6cdfd220, + 0x303a0: 0x6cdfd420, 0x303a1: 0x6d0df220, 0x303a2: 0x6d0df420, 0x303a3: 0x6d0df620, + 0x303a4: 0x6d0df820, 0x303a5: 0x6d0dfa20, 0x303a6: 0x6d0dfc20, 0x303a7: 0x6d0dfe20, + 0x303a8: 0x6d0e0020, 0x303a9: 0x6d0e0220, 0x303aa: 0x6d0e0420, 0x303ab: 0x6d0e0620, + 0x303ac: 0x6d0e0820, 0x303ad: 0x6d0e0a20, 0x303ae: 0x6d0e0c20, 0x303af: 0x6d0e0e20, + 0x303b0: 0x6d0e1020, 0x303b1: 0x6d0e1220, 0x303b2: 0x6d0e1420, 0x303b3: 0x6d0e1620, + 0x303b4: 0x6d0e1820, 0x303b5: 0x6d0e1a20, 0x303b6: 0x6d0e1c20, 0x303b7: 0x6d0e1e20, + 0x303b8: 0x6d0e2020, 0x303b9: 0x6d0e2220, 0x303ba: 0x6d0e2420, 0x303bb: 0x6d0e2620, + 0x303bc: 0x6d0e2820, 0x303bd: 0x6d0e2a20, 0x303be: 0x6d0e2c20, 0x303bf: 0x6d0e2e20, + // Block 0xc0f, offset 0x303c0 + 0x303c0: 0x6d0e3020, 0x303c1: 0x6d0e3220, 0x303c2: 0x6d0e3420, 0x303c3: 0x6d0e3620, + 0x303c4: 0x6d0e3820, 0x303c5: 0x6d0e3a20, 0x303c6: 0x6d0e3c20, 0x303c7: 0x6d0e3e20, + 0x303c8: 0x6d0e4020, 0x303c9: 0x6d0e4220, 0x303ca: 0x6d0e4420, 0x303cb: 0x6d3c5a20, + 0x303cc: 0x6d3c5c20, 0x303cd: 0x6d3c5e20, 0x303ce: 0x6d3c6020, 0x303cf: 0x6d3c6220, + 0x303d0: 0x6d3c6420, 0x303d1: 0x6d3c6620, 0x303d2: 0x6d3c6820, 0x303d3: 0x6d3c6a20, + 0x303d4: 0x6d3c6c20, 0x303d5: 0x6d687c20, 0x303d6: 0x6d3c6e20, 0x303d7: 0x6d3c7020, + 0x303d8: 0x6d3c7220, 0x303d9: 0x6d3c7420, 0x303da: 0x6d3c7620, 0x303db: 0x6d3c7820, + 0x303dc: 0x6d3c7a20, 0x303dd: 0x6d3c7c20, 0x303de: 0x6d3c7e20, 0x303df: 0x6d3c8020, + 0x303e0: 0x6d0e4620, 0x303e1: 0x6d3c8220, 0x303e2: 0x6d3c8420, 0x303e3: 0x6d3c8620, + 0x303e4: 0x6d3c8820, 0x303e5: 0x6d3c8a20, 0x303e6: 0x6d3c8c20, 0x303e7: 0x6d3c8e20, + 0x303e8: 0x6d3c9020, 0x303e9: 0x6d3c9220, 0x303ea: 0x6d3c9420, 0x303eb: 0x6d3c9620, + 0x303ec: 0x6d3c9820, 0x303ed: 0x6d3c9a20, 0x303ee: 0x6d3c9c20, 0x303ef: 0x6d689e20, + 0x303f0: 0x6d68a020, 0x303f1: 0x6d68a220, 0x303f2: 0x6d68a420, 0x303f3: 0x6d68a620, + 0x303f4: 0x6d68a820, 0x303f5: 0x6d68aa20, 0x303f6: 0x6d68ac20, 0x303f7: 0x6d68ae20, + 0x303f8: 0x6d68b020, 0x303f9: 0x6d68b220, 0x303fa: 0x6d68b420, 0x303fb: 0x6d68b620, + 0x303fc: 0x6d68b820, 0x303fd: 0x6d68ba20, 0x303fe: 0x6d68bc20, 0x303ff: 0x6d68be20, + // Block 0xc10, offset 0x30400 + 0x30400: 0x6d68c020, 0x30401: 0x6d68c220, 0x30402: 0x6d68c420, 0x30403: 0x6d68c620, + 0x30404: 0x6d68c820, 0x30405: 0x6d68ca20, 0x30406: 0x6d68cc20, 0x30407: 0x6d68ce20, + 0x30408: 0x6d68d020, 0x30409: 0x6d68d220, 0x3040a: 0x6d68d420, 0x3040b: 0x6d68d620, + 0x3040c: 0x6d68d820, 0x3040d: 0x6d68da20, 0x3040e: 0x6d68dc20, 0x3040f: 0x6d68de20, + 0x30410: 0x6d68e020, 0x30411: 0x6d68e220, 0x30412: 0x6d68e420, 0x30413: 0x6d68e620, + 0x30414: 0x6d68e820, 0x30415: 0x6d68ea20, 0x30416: 0x6d68ec20, 0x30417: 0x6d68ee20, + 0x30418: 0x6d68f020, 0x30419: 0x6d68f220, 0x3041a: 0x6d68f420, 0x3041b: 0x6d697620, + 0x3041c: 0x6d923c20, 0x3041d: 0x6d923e20, 0x3041e: 0x6d924020, 0x3041f: 0x6d924220, + 0x30420: 0x6d924420, 0x30421: 0x6d924620, 0x30422: 0x6d924820, 0x30423: 0x6d924a20, + 0x30424: 0x6d924c20, 0x30425: 0x6d924e20, 0x30426: 0x6d925020, 0x30427: 0x6d925220, + 0x30428: 0x6d925420, 0x30429: 0x6d68f620, 0x3042a: 0x6d925620, 0x3042b: 0x6d925820, + 0x3042c: 0x6d925a20, 0x3042d: 0x6d925c20, 0x3042e: 0x6d925e20, 0x3042f: 0x6d926020, + 0x30430: 0x6d926220, 0x30431: 0x6d926420, 0x30432: 0x6d926620, 0x30433: 0x6d926820, + 0x30434: 0x6d926a20, 0x30435: 0x6d926c20, 0x30436: 0x6d926e20, 0x30437: 0x6d927020, + 0x30438: 0x6d697820, 0x30439: 0x6d927220, 0x3043a: 0x6d927420, 0x3043b: 0x6d927620, + 0x3043c: 0x6d927820, 0x3043d: 0x6d927a20, 0x3043e: 0x6d927c20, 0x3043f: 0x6d927e20, + // Block 0xc11, offset 0x30440 + 0x30440: 0x6d928020, 0x30441: 0x6d928220, 0x30442: 0x6d928420, 0x30443: 0x6d928620, + 0x30444: 0x6db5e020, 0x30445: 0x6db5e220, 0x30446: 0x6db5e420, 0x30447: 0x6db5e620, + 0x30448: 0x6db5e820, 0x30449: 0x6db5ea20, 0x3044a: 0x6db5ec20, 0x3044b: 0x6db5ee20, + 0x3044c: 0x6db5f020, 0x3044d: 0x6db5f220, 0x3044e: 0x6db5f420, 0x3044f: 0x6db5f620, + 0x30450: 0x6db5f820, 0x30451: 0x6db5fa20, 0x30452: 0x6db5fc20, 0x30453: 0x6db5fe20, + 0x30454: 0x6d92fc20, 0x30455: 0x6db60020, 0x30456: 0x6db60220, 0x30457: 0x6db60420, + 0x30458: 0x6db60620, 0x30459: 0x6db60820, 0x3045a: 0x6db60a20, 0x3045b: 0x6db60c20, + 0x3045c: 0x6db60e20, 0x3045d: 0x6db61020, 0x3045e: 0x6db61220, 0x3045f: 0x6db61420, + 0x30460: 0x6db61620, 0x30461: 0x6db61820, 0x30462: 0x6db61a20, 0x30463: 0x6dd46220, + 0x30464: 0x6dd46420, 0x30465: 0x6dd46620, 0x30466: 0x6dd46820, 0x30467: 0x6dd46a20, + 0x30468: 0x6dd46c20, 0x30469: 0x6dd46e20, 0x3046a: 0x6dd47020, 0x3046b: 0x6dd47220, + 0x3046c: 0x6dd47420, 0x3046d: 0x6dd47620, 0x3046e: 0x6dd47820, 0x3046f: 0x6dd47a20, + 0x30470: 0x6dd47c20, 0x30471: 0x6dd47e20, 0x30472: 0x6dd48020, 0x30473: 0x6dd48220, + 0x30474: 0x6dd48420, 0x30475: 0x6dd48620, 0x30476: 0x6dd48820, 0x30477: 0x6dd48a20, + 0x30478: 0x6dd48c20, 0x30479: 0x6dd48e20, 0x3047a: 0x6dd49020, 0x3047b: 0x6dd49220, + 0x3047c: 0x6dd49420, 0x3047d: 0x6dd49620, 0x3047e: 0x6dd49820, 0x3047f: 0x6ded5020, + // Block 0xc12, offset 0x30480 + 0x30480: 0x6ded5220, 0x30481: 0x6ded5420, 0x30482: 0x6ded5620, 0x30483: 0x6ded5820, + 0x30484: 0x6ded5a20, 0x30485: 0x6e141420, 0x30486: 0x6ded5c20, 0x30487: 0x6dd4fa20, + 0x30488: 0x6ded5e20, 0x30489: 0x6ded6020, 0x3048a: 0x6ded6220, 0x3048b: 0x6ded6420, + 0x3048c: 0x6ded6620, 0x3048d: 0x6e024e20, 0x3048e: 0x6ded6820, 0x3048f: 0x6ded6a20, + 0x30490: 0x6ded6c20, 0x30491: 0x6ded6e20, 0x30492: 0x6ded7020, 0x30493: 0x6ded7220, + 0x30494: 0x6ded7420, 0x30495: 0x6ded7620, 0x30496: 0x6ded7820, 0x30497: 0x6ded7a20, + 0x30498: 0x6ded7c20, 0x30499: 0x6ded7e20, 0x3049a: 0x6ded8020, 0x3049b: 0x6ded8220, + 0x3049c: 0x6ded8420, 0x3049d: 0x6e025020, 0x3049e: 0x6e025220, 0x3049f: 0x6e025420, + 0x304a0: 0x6e025620, 0x304a1: 0x6e025820, 0x304a2: 0x6e025a20, 0x304a3: 0x6e025c20, + 0x304a4: 0x6e025e20, 0x304a5: 0x6e026020, 0x304a6: 0x6e026220, 0x304a7: 0x6e026420, + 0x304a8: 0x6e026620, 0x304a9: 0x6e026820, 0x304aa: 0x6e026a20, 0x304ab: 0x6e026c20, + 0x304ac: 0x6e026e20, 0x304ad: 0x6e027020, 0x304ae: 0x6e027220, 0x304af: 0x6e027420, + 0x304b0: 0x6e027620, 0x304b1: 0x6e027820, 0x304b2: 0x6e027a20, 0x304b3: 0x6e142220, + 0x304b4: 0x6e142420, 0x304b5: 0x6e142620, 0x304b6: 0x6e142820, 0x304b7: 0x6e142a20, + 0x304b8: 0x6e142c20, 0x304b9: 0x6e142e20, 0x304ba: 0x6e143020, 0x304bb: 0x6e143220, + 0x304bc: 0x6e143420, 0x304bd: 0x6e143620, 0x304be: 0x6e21c820, 0x304bf: 0x6e21ca20, + // Block 0xc13, offset 0x304c0 + 0x304c0: 0x6e21cc20, 0x304c1: 0x6e21ce20, 0x304c2: 0x6e21d020, 0x304c3: 0x6e21d220, + 0x304c4: 0x6e21d420, 0x304c5: 0x6e21d620, 0x304c6: 0x6e221420, 0x304c7: 0x6e2c4620, + 0x304c8: 0x6e2c4820, 0x304c9: 0x6e2c4a20, 0x304ca: 0x6e2c4c20, 0x304cb: 0x6e2c4e20, + 0x304cc: 0x6e2c5020, 0x304cd: 0x6e2c5220, 0x304ce: 0x6e2c5420, 0x304cf: 0x6e2c5620, + 0x304d0: 0x6e2c5820, 0x304d1: 0x6e347c20, 0x304d2: 0x6e347e20, 0x304d3: 0x6e348020, + 0x304d4: 0x6e348220, 0x304d5: 0x6e348420, 0x304d6: 0x6e348620, 0x304d7: 0x6e3a3c20, + 0x304d8: 0x6e3a3e20, 0x304d9: 0x6e3a4020, 0x304da: 0x6e3e3420, 0x304db: 0x6e3e3620, + 0x304dc: 0x6e410420, 0x304dd: 0x6e410620, 0x304de: 0x6e410820, 0x304df: 0x6e448020, + 0x304e0: 0x6c00c820, 0x304e1: 0x6c050e20, 0x304e2: 0x6c051020, 0x304e3: 0x6c051220, + 0x304e4: 0x6c051420, 0x304e5: 0x6c051620, 0x304e6: 0x6c0a6420, 0x304e7: 0x6c0a6620, + 0x304e8: 0x6c0a6820, 0x304e9: 0x6c0a6a20, 0x304ea: 0x6c0a6c20, 0x304eb: 0x6c0a6e20, + 0x304ec: 0x6c0a7020, 0x304ed: 0x6c0a7220, 0x304ee: 0x6c0a7420, 0x304ef: 0x6c0a7620, + 0x304f0: 0x6c0a7820, 0x304f1: 0x6c0a7a20, 0x304f2: 0x6c14dc20, 0x304f3: 0x6c14de20, + 0x304f4: 0x6c14e020, 0x304f5: 0x6c14e220, 0x304f6: 0x6c14e420, 0x304f7: 0x6c14e620, + 0x304f8: 0x6c14e820, 0x304f9: 0x6c14ea20, 0x304fa: 0x6c14ec20, 0x304fb: 0x6c14ee20, + 0x304fc: 0x6c14f020, 0x304fd: 0x6c14f220, 0x304fe: 0x6c14f420, 0x304ff: 0x6c14f620, + // Block 0xc14, offset 0x30500 + 0x30500: 0x6c14f820, 0x30501: 0x6c26b220, 0x30502: 0x6c26b420, 0x30503: 0x6c26b620, + 0x30504: 0x6c26b820, 0x30505: 0x6c26ba20, 0x30506: 0x6c26bc20, 0x30507: 0x6c26be20, + 0x30508: 0x6c26c020, 0x30509: 0x6c26c220, 0x3050a: 0x6c26c420, 0x3050b: 0x6c26c620, + 0x3050c: 0x6c26c820, 0x3050d: 0x6c26ca20, 0x3050e: 0x6c26cc20, 0x3050f: 0x6c26ce20, + 0x30510: 0x6c26d020, 0x30511: 0x6c26d220, 0x30512: 0x6c26d420, 0x30513: 0x6c407e20, + 0x30514: 0x6c408020, 0x30515: 0x6c408220, 0x30516: 0x6c408420, 0x30517: 0x6c408620, + 0x30518: 0x6c408820, 0x30519: 0x6c408a20, 0x3051a: 0x6c408c20, 0x3051b: 0x6c408e20, + 0x3051c: 0x6c409020, 0x3051d: 0x6c409220, 0x3051e: 0x6c409420, 0x3051f: 0x6c409620, + 0x30520: 0x6c409820, 0x30521: 0x6c409a20, 0x30522: 0x6c409c20, 0x30523: 0x6c409e20, + 0x30524: 0x6c40a020, 0x30525: 0x6c40a220, 0x30526: 0x6c40a420, 0x30527: 0x6c40a620, + 0x30528: 0x6c40a820, 0x30529: 0x6c40aa20, 0x3052a: 0x6c609c20, 0x3052b: 0x6c609e20, + 0x3052c: 0x6c60a020, 0x3052d: 0x6c60a220, 0x3052e: 0x6c60a420, 0x3052f: 0x6c60a620, + 0x30530: 0x6c60a820, 0x30531: 0x6c60aa20, 0x30532: 0x6c60ac20, 0x30533: 0x6c60ae20, + 0x30534: 0x6c60b020, 0x30535: 0x6c60b220, 0x30536: 0x6c60b420, 0x30537: 0x6c869020, + 0x30538: 0x6c869220, 0x30539: 0x6c869420, 0x3053a: 0x6c869620, 0x3053b: 0x6c869820, + 0x3053c: 0x6c869a20, 0x3053d: 0x6c869c20, 0x3053e: 0x6c869e20, 0x3053f: 0x6c86a020, + // Block 0xc15, offset 0x30540 + 0x30540: 0x6c86a220, 0x30541: 0x6c86a420, 0x30542: 0x6c86a620, 0x30543: 0x6c86a820, + 0x30544: 0x6c86aa20, 0x30545: 0x6c86ac20, 0x30546: 0x6c86ae20, 0x30547: 0x6c86b020, + 0x30548: 0x6c86b220, 0x30549: 0x6c86b420, 0x3054a: 0x6c86b620, 0x3054b: 0x6cb10c20, + 0x3054c: 0x6cb10e20, 0x3054d: 0x6cb11020, 0x3054e: 0x6cb11220, 0x3054f: 0x6cb11420, + 0x30550: 0x6cb11620, 0x30551: 0x6cb11820, 0x30552: 0x6cb11a20, 0x30553: 0x6cb11c20, + 0x30554: 0x6cb11e20, 0x30555: 0x6cb12020, 0x30556: 0x6cb12220, 0x30557: 0x6cb12420, + 0x30558: 0x6cb12620, 0x30559: 0x6cb12820, 0x3055a: 0x6cb12a20, 0x3055b: 0x6cb12c20, + 0x3055c: 0x6cb12e20, 0x3055d: 0x6cb13020, 0x3055e: 0x6cb13220, 0x3055f: 0x6ce02c20, + 0x30560: 0x6ce02e20, 0x30561: 0x6ce03020, 0x30562: 0x6ce03220, 0x30563: 0x6ce03420, + 0x30564: 0x6ce03620, 0x30565: 0x6ce03820, 0x30566: 0x6ce03a20, 0x30567: 0x6ce03c20, + 0x30568: 0x6d0eb420, 0x30569: 0x6d0eb620, 0x3056a: 0x6d0eb820, 0x3056b: 0x6d0eba20, + 0x3056c: 0x6d0ebc20, 0x3056d: 0x6d3d0620, 0x3056e: 0x6d3d0820, 0x3056f: 0x6d3d0a20, + 0x30570: 0x6d3d0c20, 0x30571: 0x6d3d0e20, 0x30572: 0x6d3d1020, 0x30573: 0x6d697c20, + 0x30574: 0x6d697e20, 0x30575: 0x6d698020, 0x30576: 0x6dede020, 0x30577: 0x6c26e620, + 0x30578: 0x6c86c620, 0x30579: 0x6cb14020, 0x3057a: 0x6cb14220, 0x3057b: 0x6cb14420, + 0x3057c: 0x6d0ec220, 0x3057d: 0x6d3d1820, 0x3057e: 0x6d698620, 0x3057f: 0x6db6a020, + // Block 0xc16, offset 0x30580 + 0x30580: 0x6db6a220, 0x30581: 0x6db6a420, 0x30582: 0x6dd50020, 0x30583: 0x6dede220, + 0x30584: 0x6e221820, 0x30585: 0x6e2c7820, 0x30586: 0x6c26ea20, 0x30587: 0x6c86ce20, + 0x30588: 0x6c86d020, 0x30589: 0x6cb15220, 0x3058a: 0x6d0ecc20, 0x3058b: 0x6d0ece20, + 0x3058c: 0x6d699820, 0x3058d: 0x6d699a20, 0x3058e: 0x6d699c20, 0x3058f: 0x6db6b420, + 0x30590: 0x6dd50420, 0x30591: 0x6e02ba20, 0x30592: 0x6e3a5620, 0x30593: 0x6e411420, + 0x30594: 0x6e431e20, 0x30595: 0x6c26ec20, 0x30596: 0x6c40b820, 0x30597: 0x6c86da20, + 0x30598: 0x6cb15c20, 0x30599: 0x6cb15e20, 0x3059a: 0x6cb16020, 0x3059b: 0x6cb16220, + 0x3059c: 0x6cb16420, 0x3059d: 0x6cb16620, 0x3059e: 0x6ce05e20, 0x3059f: 0x6ce06020, + 0x305a0: 0x6ce06220, 0x305a1: 0x6ce06420, 0x305a2: 0x6d0ed820, 0x305a3: 0x6d0eda20, + 0x305a4: 0x6d0edc20, 0x305a5: 0x6d0ede20, 0x305a6: 0x6d0ee020, 0x305a7: 0x6d3d2c20, + 0x305a8: 0x6d3d2e20, 0x305a9: 0x6d3d3020, 0x305aa: 0x6d3d3220, 0x305ab: 0x6d932420, + 0x305ac: 0x6d69da20, 0x305ad: 0x6d932620, 0x305ae: 0x6d932820, 0x305af: 0x6db6c620, + 0x305b0: 0x6db6c820, 0x305b1: 0x6db6ca20, 0x305b2: 0x6db6cc20, 0x305b3: 0x6db6ce20, + 0x305b4: 0x6dd51620, 0x305b5: 0x6dd51820, 0x305b6: 0x6dee1620, 0x305b7: 0x6dee0a20, + 0x305b8: 0x6c26f220, 0x305b9: 0x6c86e420, 0x305ba: 0x6c86e620, 0x305bb: 0x6c86e820, + 0x305bc: 0x6cb18020, 0x305bd: 0x6cb18220, 0x305be: 0x6ce07e20, 0x305bf: 0x6ce08020, + // Block 0xc17, offset 0x305c0 + 0x305c0: 0x6ce08220, 0x305c1: 0x6ce08420, 0x305c2: 0x6ce08620, 0x305c3: 0x6ce08820, + 0x305c4: 0x6d0efe20, 0x305c5: 0x6d0f0020, 0x305c6: 0x6d0f0220, 0x305c7: 0x6d0f0420, + 0x305c8: 0x6d0f0620, 0x305c9: 0x6d0f0820, 0x305ca: 0x6d0f0a20, 0x305cb: 0x6d3d5020, + 0x305cc: 0x6d3d5220, 0x305cd: 0x6d3d5420, 0x305ce: 0x6d69e020, 0x305cf: 0x6d69e220, + 0x305d0: 0x6d934220, 0x305d1: 0x6d934420, 0x305d2: 0x6d934620, 0x305d3: 0x6d934820, + 0x305d4: 0x6db6e420, 0x305d5: 0x6db6e620, 0x305d6: 0x6db6e820, 0x305d7: 0x6dd52c20, + 0x305d8: 0x6dd52e20, 0x305d9: 0x6dd53020, 0x305da: 0x6dee2020, 0x305db: 0x6e3a6620, + 0x305dc: 0x6e411c20, 0x305dd: 0x6c26f420, 0x305de: 0x6c60c820, 0x305df: 0x6c60ca20, + 0x305e0: 0x6c60cc20, 0x305e1: 0x6c86f020, 0x305e2: 0x6c86f220, 0x305e3: 0x6c86f420, + 0x305e4: 0x6c86f620, 0x305e5: 0x6cb19820, 0x305e6: 0x6cb19a20, 0x305e7: 0x6cb19c20, + 0x305e8: 0x6cb19e20, 0x305e9: 0x6cb1a020, 0x305ea: 0x6cb1a220, 0x305eb: 0x6cb1a420, + 0x305ec: 0x6cb1a620, 0x305ed: 0x6cb1a820, 0x305ee: 0x6cb1aa20, 0x305ef: 0x6ce0bc20, + 0x305f0: 0x6ce0be20, 0x305f1: 0x6ce0c020, 0x305f2: 0x6d0f2620, 0x305f3: 0x6ce0c220, + 0x305f4: 0x6ce0c420, 0x305f5: 0x6ce0c620, 0x305f6: 0x6ce0c820, 0x305f7: 0x6ce0ca20, + 0x305f8: 0x6ce0cc20, 0x305f9: 0x6ce0ce20, 0x305fa: 0x6ce0d020, 0x305fb: 0x6ce0d220, + 0x305fc: 0x6ce0d420, 0x305fd: 0x6ce0d620, 0x305fe: 0x6ce0d820, 0x305ff: 0x6ce0da20, + // Block 0xc18, offset 0x30600 + 0x30600: 0x6ce0dc20, 0x30601: 0x6ce0de20, 0x30602: 0x6d0f2e20, 0x30603: 0x6d0f3020, + 0x30604: 0x6d0f3220, 0x30605: 0x6d0f3420, 0x30606: 0x6d0f3620, 0x30607: 0x6d0f3820, + 0x30608: 0x6d0f3a20, 0x30609: 0x6d0f3c20, 0x3060a: 0x6d0f3e20, 0x3060b: 0x6d0f4020, + 0x3060c: 0x6d0f4220, 0x3060d: 0x6d0f4420, 0x3060e: 0x6d0f4620, 0x3060f: 0x6d3d7c20, + 0x30610: 0x6d3d7e20, 0x30611: 0x6d3d8020, 0x30612: 0x6d3d8220, 0x30613: 0x6d3d8420, + 0x30614: 0x6d3d8620, 0x30615: 0x6d3d8820, 0x30616: 0x6d3d8a20, 0x30617: 0x6d3d8c20, + 0x30618: 0x6d3d8e20, 0x30619: 0x6d6a1420, 0x3061a: 0x6d6a1620, 0x3061b: 0x6d6a1820, + 0x3061c: 0x6d6a1a20, 0x3061d: 0x6d6a1c20, 0x3061e: 0x6d6a1e20, 0x3061f: 0x6d6a2020, + 0x30620: 0x6d6a2220, 0x30621: 0x6d6a2420, 0x30622: 0x6d6a2620, 0x30623: 0x6d6a2820, + 0x30624: 0x6d6a2a20, 0x30625: 0x6d6a2c20, 0x30626: 0x6d6a2e20, 0x30627: 0x6d6a3020, + 0x30628: 0x6d6a3220, 0x30629: 0x6d6a3420, 0x3062a: 0x6d6a3620, 0x3062b: 0x6d6a3820, + 0x3062c: 0x6d6a3a20, 0x3062d: 0x6d6a6c20, 0x3062e: 0x6d937220, 0x3062f: 0x6d937420, + 0x30630: 0x6d937620, 0x30631: 0x6d937820, 0x30632: 0x6d937a20, 0x30633: 0x6d937c20, + 0x30634: 0x6d937e20, 0x30635: 0x6d938020, 0x30636: 0x6db70820, 0x30637: 0x6db70a20, + 0x30638: 0x6db70c20, 0x30639: 0x6db70e20, 0x3063a: 0x6db71020, 0x3063b: 0x6db71220, + 0x3063c: 0x6db71420, 0x3063d: 0x6db71620, 0x3063e: 0x6dd54820, 0x3063f: 0x6dd54a20, + // Block 0xc19, offset 0x30640 + 0x30640: 0x6dd54c20, 0x30641: 0x6dc6ba20, 0x30642: 0x6dd54e20, 0x30643: 0x6dd55020, + 0x30644: 0x6dd55220, 0x30645: 0x6dd55420, 0x30646: 0x6dee3820, 0x30647: 0x6dee3a20, + 0x30648: 0x6dee3c20, 0x30649: 0x6dee3e20, 0x3064a: 0x6dee4020, 0x3064b: 0x6dee4220, + 0x3064c: 0x6dee4420, 0x3064d: 0x6e02e420, 0x3064e: 0x6e02e620, 0x3064f: 0x6e02e820, + 0x30650: 0x6e148420, 0x30651: 0x6e148620, 0x30652: 0x6e148820, 0x30653: 0x6e148a20, + 0x30654: 0x6e148c20, 0x30655: 0x6e223220, 0x30656: 0x6e223420, 0x30657: 0x6e223620, + 0x30658: 0x6e223820, 0x30659: 0x6e2c8c20, 0x3065a: 0x6e2c8e20, 0x3065b: 0x6e34b020, + 0x3065c: 0x6e3a6820, 0x3065d: 0x6c051820, 0x3065e: 0x6c150020, 0x3065f: 0x6c150220, + 0x30660: 0x6c150420, 0x30661: 0x6c26f620, 0x30662: 0x6c26f820, 0x30663: 0x6c40c020, + 0x30664: 0x6c40c220, 0x30665: 0x6c40c420, 0x30666: 0x6c40c620, 0x30667: 0x6c40c820, + 0x30668: 0x6c40ca20, 0x30669: 0x6c40cc20, 0x3066a: 0x6c40ce20, 0x3066b: 0x6c40d020, + 0x3066c: 0x6c40d220, 0x3066d: 0x6c40d420, 0x3066e: 0x6c40d620, 0x3066f: 0x6c40d820, + 0x30670: 0x6c60dc20, 0x30671: 0x6c60de20, 0x30672: 0x6c60e020, 0x30673: 0x6c60e220, + 0x30674: 0x6c60e420, 0x30675: 0x6c60e620, 0x30676: 0x6c60e820, 0x30677: 0x6c60ea20, + 0x30678: 0x6c60ec20, 0x30679: 0x6c60ee20, 0x3067a: 0x6c60f020, 0x3067b: 0x6c60f220, + 0x3067c: 0x6c871020, 0x3067d: 0x6c871220, 0x3067e: 0x6c871420, 0x3067f: 0x6c871620, + // Block 0xc1a, offset 0x30680 + 0x30680: 0x6c871820, 0x30681: 0x6c871a20, 0x30682: 0x6c871c20, 0x30683: 0x6c871e20, + 0x30684: 0x6c872020, 0x30685: 0x6c872220, 0x30686: 0x6c872420, 0x30687: 0x6cb1dc20, + 0x30688: 0x6cb1de20, 0x30689: 0x6cb1e020, 0x3068a: 0x6cb1e220, 0x3068b: 0x6ce11820, + 0x3068c: 0x6ce11a20, 0x3068d: 0x6ce11c20, 0x3068e: 0x6ce11e20, 0x3068f: 0x6ce12020, + 0x30690: 0x6ce12220, 0x30691: 0x6ce12420, 0x30692: 0x6ce12620, 0x30693: 0x6ce12820, + 0x30694: 0x6ce12a20, 0x30695: 0x6ce12c20, 0x30696: 0x6d0f9220, 0x30697: 0x6d0f9420, + 0x30698: 0x6d3dc220, 0x30699: 0x6d3dc420, 0x3069a: 0x6d3dc620, 0x3069b: 0x6d3dc820, + 0x3069c: 0x6d6a7220, 0x3069d: 0x6d93c220, 0x3069e: 0x6d93c420, 0x3069f: 0x6d93c620, + 0x306a0: 0x6d93c820, 0x306a1: 0x6db74020, 0x306a2: 0x6db74220, 0x306a3: 0x6e14a420, + 0x306a4: 0x6c26fa20, 0x306a5: 0x6cb1e820, 0x306a6: 0x6cb1ea20, 0x306a7: 0x6cb1ec20, + 0x306a8: 0x6d0f9a20, 0x306a9: 0x6d0f9c20, 0x306aa: 0x6d0f9e20, 0x306ab: 0x6d3dce20, + 0x306ac: 0x6d93cc20, 0x306ad: 0x6d6a8220, 0x306ae: 0x6d93ce20, 0x306af: 0x6db74420, + 0x306b0: 0x6c26fc20, 0x306b1: 0x6c150620, 0x306b2: 0x6c60fe20, 0x306b3: 0x6c610020, + 0x306b4: 0x6c610220, 0x306b5: 0x6c610420, 0x306b6: 0x6c872e20, 0x306b7: 0x6c873020, + 0x306b8: 0x6c873220, 0x306b9: 0x6cb1fa20, 0x306ba: 0x6cb1fc20, 0x306bb: 0x6cb1fe20, + 0x306bc: 0x6cb20020, 0x306bd: 0x6cb20220, 0x306be: 0x6cb20420, 0x306bf: 0x6cb20620, + // Block 0xc1b, offset 0x306c0 + 0x306c0: 0x6ce14e20, 0x306c1: 0x6ce15020, 0x306c2: 0x6ce15220, 0x306c3: 0x6ce15420, + 0x306c4: 0x6ce15620, 0x306c5: 0x6ce15820, 0x306c6: 0x6ce15a20, 0x306c7: 0x6ce15c20, + 0x306c8: 0x6ce15e20, 0x306c9: 0x6ce16020, 0x306ca: 0x6ce16220, 0x306cb: 0x6ce16420, + 0x306cc: 0x6d0fb420, 0x306cd: 0x6d0fb620, 0x306ce: 0x6d0fb820, 0x306cf: 0x6d0fba20, + 0x306d0: 0x6d0fbc20, 0x306d1: 0x6d0fbe20, 0x306d2: 0x6d0fc020, 0x306d3: 0x6d0fc220, + 0x306d4: 0x6d0fc420, 0x306d5: 0x6d3de820, 0x306d6: 0x6d3dea20, 0x306d7: 0x6d3dec20, + 0x306d8: 0x6d3dee20, 0x306d9: 0x6d3df020, 0x306da: 0x6d3df220, 0x306db: 0x6d6a9020, + 0x306dc: 0x6d6a9220, 0x306dd: 0x6d6a9420, 0x306de: 0x6d6a9620, 0x306df: 0x6d6a9820, + 0x306e0: 0x6d6a9a20, 0x306e1: 0x6d6a9c20, 0x306e2: 0x6d6a9e20, 0x306e3: 0x6d6aa020, + 0x306e4: 0x6d6aa220, 0x306e5: 0x6d93e420, 0x306e6: 0x6d93e620, 0x306e7: 0x6d93e820, + 0x306e8: 0x6db75620, 0x306e9: 0x6dd5dc20, 0x306ea: 0x6dee8820, 0x306eb: 0x6dee8a20, + 0x306ec: 0x6dee8c20, 0x306ed: 0x6dee8e20, 0x306ee: 0x6e031220, 0x306ef: 0x6e14b020, + 0x306f0: 0x6e14b220, 0x306f1: 0x6e2cb020, 0x306f2: 0x6e3e4a20, 0x306f3: 0x6c270220, + 0x306f4: 0x6c611a20, 0x306f5: 0x6c875420, 0x306f6: 0x6c875620, 0x306f7: 0x6c875820, + 0x306f8: 0x6c875a20, 0x306f9: 0x6cb24e20, 0x306fa: 0x6cb25020, 0x306fb: 0x6cb25220, + 0x306fc: 0x6d101620, 0x306fd: 0x6cb25420, 0x306fe: 0x6cb25620, 0x306ff: 0x6cb25820, + // Block 0xc1c, offset 0x30700 + 0x30700: 0x6cb25a20, 0x30701: 0x6cb25c20, 0x30702: 0x6cb25e20, 0x30703: 0x6cb26020, + 0x30704: 0x6cb26220, 0x30705: 0x6ce1ba20, 0x30706: 0x6ce1bc20, 0x30707: 0x6ce1be20, + 0x30708: 0x6ce1c020, 0x30709: 0x6ce1c220, 0x3070a: 0x6ce1c420, 0x3070b: 0x6ce1c620, + 0x3070c: 0x6ce1c820, 0x3070d: 0x6ce1ca20, 0x3070e: 0x6ce1cc20, 0x3070f: 0x6ce1ce20, + 0x30710: 0x6d100820, 0x30711: 0x6ce1d020, 0x30712: 0x6ce1d220, 0x30713: 0x6ce1d420, + 0x30714: 0x6ce1d620, 0x30715: 0x6ce1d820, 0x30716: 0x6ce1da20, 0x30717: 0x6ce1dc20, + 0x30718: 0x6ce1de20, 0x30719: 0x6ce1e020, 0x3071a: 0x6ce1e220, 0x3071b: 0x6ce1e420, + 0x3071c: 0x6ce1e620, 0x3071d: 0x6ce1e820, 0x3071e: 0x6ce1ea20, 0x3071f: 0x6d101820, + 0x30720: 0x6d101a20, 0x30721: 0x6d101c20, 0x30722: 0x6d101e20, 0x30723: 0x6d102020, + 0x30724: 0x6d102220, 0x30725: 0x6d102420, 0x30726: 0x6d102620, 0x30727: 0x6d102820, + 0x30728: 0x6d102a20, 0x30729: 0x6d102c20, 0x3072a: 0x6d102e20, 0x3072b: 0x6d103020, + 0x3072c: 0x6d103220, 0x3072d: 0x6d103420, 0x3072e: 0x6d103620, 0x3072f: 0x6d103820, + 0x30730: 0x6d103a20, 0x30731: 0x6d103c20, 0x30732: 0x6d103e20, 0x30733: 0x6d104020, + 0x30734: 0x6d104220, 0x30735: 0x6ce1ec20, 0x30736: 0x6d104420, 0x30737: 0x6d104620, + 0x30738: 0x6d104820, 0x30739: 0x6d104a20, 0x3073a: 0x6d104c20, 0x3073b: 0x6d104e20, + 0x3073c: 0x6d3e4c20, 0x3073d: 0x6d3e4e20, 0x3073e: 0x6d3e5020, 0x3073f: 0x6d3e5220, + // Block 0xc1d, offset 0x30740 + 0x30740: 0x6d3e5420, 0x30741: 0x6d3e5620, 0x30742: 0x6d3e5820, 0x30743: 0x6d3e5a20, + 0x30744: 0x6d3e5c20, 0x30745: 0x6d3e5e20, 0x30746: 0x6d3e6020, 0x30747: 0x6d3e6220, + 0x30748: 0x6d3e6420, 0x30749: 0x6d3e6620, 0x3074a: 0x6d3e6820, 0x3074b: 0x6d3e6a20, + 0x3074c: 0x6d3e6c20, 0x3074d: 0x6d3e6e20, 0x3074e: 0x6d3e7020, 0x3074f: 0x6d6afa20, + 0x30750: 0x6d6afc20, 0x30751: 0x6d6afe20, 0x30752: 0x6d6b0020, 0x30753: 0x6d6b0220, + 0x30754: 0x6d6b0420, 0x30755: 0x6d6b0620, 0x30756: 0x6d6b0820, 0x30757: 0x6d6b0a20, + 0x30758: 0x6d6b0c20, 0x30759: 0x6d6b0e20, 0x3075a: 0x6d6b1020, 0x3075b: 0x6d6b1220, + 0x3075c: 0x6d6b1420, 0x3075d: 0x6d6b1620, 0x3075e: 0x6d6b1820, 0x3075f: 0x6d6b1a20, + 0x30760: 0x6d6b1c20, 0x30761: 0x6d6b1e20, 0x30762: 0x6d6b2020, 0x30763: 0x6d6b2220, + 0x30764: 0x6d6b2420, 0x30765: 0x6d6b2620, 0x30766: 0x6d6b2820, 0x30767: 0x6d6b2a20, + 0x30768: 0x6d6b2c20, 0x30769: 0x6d6b2e20, 0x3076a: 0x6d6b3020, 0x3076b: 0x6d6b9820, + 0x3076c: 0x6d6b3220, 0x3076d: 0x6d6b3420, 0x3076e: 0x6d6b3620, 0x3076f: 0x6d6b3820, + 0x30770: 0x6d944620, 0x30771: 0x6d944820, 0x30772: 0x6d944a20, 0x30773: 0x6d944c20, + 0x30774: 0x6d944e20, 0x30775: 0x6d945020, 0x30776: 0x6d945220, 0x30777: 0x6d6b9a20, + 0x30778: 0x6d945420, 0x30779: 0x6d945620, 0x3077a: 0x6d6b3a20, 0x3077b: 0x6d945820, + 0x3077c: 0x6d945a20, 0x3077d: 0x6d945c20, 0x3077e: 0x6d945e20, 0x3077f: 0x6d946020, + // Block 0xc1e, offset 0x30780 + 0x30780: 0x6d946220, 0x30781: 0x6d946420, 0x30782: 0x6d946620, 0x30783: 0x6d946820, + 0x30784: 0x6d946a20, 0x30785: 0x6d946c20, 0x30786: 0x6db79220, 0x30787: 0x6db79420, + 0x30788: 0x6db79620, 0x30789: 0x6db79820, 0x3078a: 0x6db79a20, 0x3078b: 0x6db79c20, + 0x3078c: 0x6db79e20, 0x3078d: 0x6db7a020, 0x3078e: 0x6db7a220, 0x3078f: 0x6db7a420, + 0x30790: 0x6db7a620, 0x30791: 0x6db7a820, 0x30792: 0x6db7aa20, 0x30793: 0x6db7ac20, + 0x30794: 0x6dd5e820, 0x30795: 0x6dd5ea20, 0x30796: 0x6dd5ec20, 0x30797: 0x6dd5ee20, + 0x30798: 0x6dd5f020, 0x30799: 0x6dd5f220, 0x3079a: 0x6dd5f420, 0x3079b: 0x6dd5f620, + 0x3079c: 0x6dd5f820, 0x3079d: 0x6dd5fa20, 0x3079e: 0x6dd5fc20, 0x3079f: 0x6dd5fe20, + 0x307a0: 0x6dd60020, 0x307a1: 0x6dd60220, 0x307a2: 0x6dd60420, 0x307a3: 0x6dd60620, + 0x307a4: 0x6dd60820, 0x307a5: 0x6dd60a20, 0x307a6: 0x6dd60c20, 0x307a7: 0x6dd60e20, + 0x307a8: 0x6deec820, 0x307a9: 0x6dd6aa20, 0x307aa: 0x6deeca20, 0x307ab: 0x6deecc20, + 0x307ac: 0x6deece20, 0x307ad: 0x6deed020, 0x307ae: 0x6dd61020, 0x307af: 0x6deed220, + 0x307b0: 0x6deed420, 0x307b1: 0x6deed620, 0x307b2: 0x6deed820, 0x307b3: 0x6deeda20, + 0x307b4: 0x6deedc20, 0x307b5: 0x6deede20, 0x307b6: 0x6deee020, 0x307b7: 0x6deee220, + 0x307b8: 0x6deee420, 0x307b9: 0x6deee620, 0x307ba: 0x6deee820, 0x307bb: 0x6deeea20, + 0x307bc: 0x6deeec20, 0x307bd: 0x6deeee20, 0x307be: 0x6deef020, 0x307bf: 0x6deef220, + // Block 0xc1f, offset 0x307c0 + 0x307c0: 0x6dd61220, 0x307c1: 0x6e033020, 0x307c2: 0x6e033220, 0x307c3: 0x6e033420, + 0x307c4: 0x6e033620, 0x307c5: 0x6e033820, 0x307c6: 0x6e033a20, 0x307c7: 0x6def6820, + 0x307c8: 0x6e033c20, 0x307c9: 0x6e033e20, 0x307ca: 0x6e14c820, 0x307cb: 0x6e14ca20, + 0x307cc: 0x6e14cc20, 0x307cd: 0x6e14ce20, 0x307ce: 0x6e14d020, 0x307cf: 0x6e14d220, + 0x307d0: 0x6e227220, 0x307d1: 0x6e227420, 0x307d2: 0x6e227620, 0x307d3: 0x6e227820, + 0x307d4: 0x6e227a20, 0x307d5: 0x6e227c20, 0x307d6: 0x6e227e20, 0x307d7: 0x6e22aa20, + 0x307d8: 0x6e2cc220, 0x307d9: 0x6e2cc420, 0x307da: 0x6e22ac20, 0x307db: 0x6e2cc620, + 0x307dc: 0x6e2cc820, 0x307dd: 0x6e34c220, 0x307de: 0x6e34c420, 0x307df: 0x6e34c620, + 0x307e0: 0x6e34c820, 0x307e1: 0x6e3a7c20, 0x307e2: 0x6e3a7e20, 0x307e3: 0x6e3a8020, + 0x307e4: 0x6e3a8220, 0x307e5: 0x6e3a8420, 0x307e6: 0x6e3e4c20, 0x307e7: 0x6e3e4e20, + 0x307e8: 0x6e432420, 0x307e9: 0x6e412220, 0x307ea: 0x6e412420, 0x307eb: 0x6c270620, + 0x307ec: 0x6c878020, 0x307ed: 0x6cb2aa20, 0x307ee: 0x6cb2ac20, 0x307ef: 0x6cb2ae20, + 0x307f0: 0x6ce24420, 0x307f1: 0x6d10b820, 0x307f2: 0x6d10ba20, 0x307f3: 0x6d3ee220, + 0x307f4: 0x6d3ee420, 0x307f5: 0x6d3ee620, 0x307f6: 0x6d6b9e20, 0x307f7: 0x6d6ba020, + 0x307f8: 0x6d6ba220, 0x307f9: 0x6d6ba420, 0x307fa: 0x6d6ba620, 0x307fb: 0x6d6ba820, + 0x307fc: 0x6d6baa20, 0x307fd: 0x6d94e420, 0x307fe: 0x6d94e620, 0x307ff: 0x6dd6ac20, + // Block 0xc20, offset 0x30800 + 0x30800: 0x6dd6ae20, 0x30801: 0x6dd6b020, 0x30802: 0x6def6c20, 0x30803: 0x6def6e20, + 0x30804: 0x6def7020, 0x30805: 0x6def7220, 0x30806: 0x6e039c20, 0x30807: 0x6e150620, + 0x30808: 0x6e34de20, 0x30809: 0x6e412c20, 0x3080a: 0x6c270e20, 0x3080b: 0x6c40e420, + 0x3080c: 0x6c613220, 0x3080d: 0x6c613420, 0x3080e: 0x6c878e20, 0x3080f: 0x6c879020, + 0x30810: 0x6c879220, 0x30811: 0x6c879420, 0x30812: 0x6c879620, 0x30813: 0x6c879820, + 0x30814: 0x6c879a20, 0x30815: 0x6c879c20, 0x30816: 0x6cb2e420, 0x30817: 0x6cb2e620, + 0x30818: 0x6cb2e820, 0x30819: 0x6cb2ea20, 0x3081a: 0x6cb2ec20, 0x3081b: 0x6cb2ee20, + 0x3081c: 0x6cb2f020, 0x3081d: 0x6cb2f220, 0x3081e: 0x6cb2f420, 0x3081f: 0x6cb2f620, + 0x30820: 0x6cb2f820, 0x30821: 0x6cb2fa20, 0x30822: 0x6cb2fc20, 0x30823: 0x6cb2fe20, + 0x30824: 0x6ce26c20, 0x30825: 0x6ce26e20, 0x30826: 0x6ce27020, 0x30827: 0x6ce27220, + 0x30828: 0x6ce27420, 0x30829: 0x6ce27620, 0x3082a: 0x6ce27820, 0x3082b: 0x6ce27a20, + 0x3082c: 0x6ce27c20, 0x3082d: 0x6d10ea20, 0x3082e: 0x6ce27e20, 0x3082f: 0x6ce28020, + 0x30830: 0x6ce28220, 0x30831: 0x6ce28420, 0x30832: 0x6ce28620, 0x30833: 0x6ce28820, + 0x30834: 0x6ce28a20, 0x30835: 0x6ce28c20, 0x30836: 0x6ce28e20, 0x30837: 0x6ce29020, + 0x30838: 0x6ce29220, 0x30839: 0x6ce29420, 0x3083a: 0x6ce29620, 0x3083b: 0x6ce29820, + 0x3083c: 0x6ce29a20, 0x3083d: 0x6ce29c20, 0x3083e: 0x6d10ec20, 0x3083f: 0x6d10ee20, + // Block 0xc21, offset 0x30840 + 0x30840: 0x6d10f020, 0x30841: 0x6d10f220, 0x30842: 0x6d10f420, 0x30843: 0x6d10f620, + 0x30844: 0x6d10f820, 0x30845: 0x6d10fa20, 0x30846: 0x6d10fc20, 0x30847: 0x6d10fe20, + 0x30848: 0x6d110020, 0x30849: 0x6d110220, 0x3084a: 0x6d110420, 0x3084b: 0x6d110620, + 0x3084c: 0x6d110820, 0x3084d: 0x6d3f0a20, 0x3084e: 0x6d3f0c20, 0x3084f: 0x6d3f0e20, + 0x30850: 0x6d3f1020, 0x30851: 0x6d3f1220, 0x30852: 0x6d3f1420, 0x30853: 0x6d3f1620, + 0x30854: 0x6d3f1820, 0x30855: 0x6d3f1a20, 0x30856: 0x6d6bd020, 0x30857: 0x6d6bd220, + 0x30858: 0x6d6bd420, 0x30859: 0x6d6bd620, 0x3085a: 0x6d6bd820, 0x3085b: 0x6d6bda20, + 0x3085c: 0x6d6bdc20, 0x3085d: 0x6d6bde20, 0x3085e: 0x6d6be020, 0x3085f: 0x6d6be220, + 0x30860: 0x6d6be420, 0x30861: 0x6d6be620, 0x30862: 0x6d6be820, 0x30863: 0x6d6bea20, + 0x30864: 0x6d6bec20, 0x30865: 0x6d6bee20, 0x30866: 0x6d6bf020, 0x30867: 0x6d6bf220, + 0x30868: 0x6d6bf420, 0x30869: 0x6d6bf620, 0x3086a: 0x6d6bf820, 0x3086b: 0x6d6bfa20, + 0x3086c: 0x6d6bfc20, 0x3086d: 0x6d950820, 0x3086e: 0x6d950a20, 0x3086f: 0x6d950c20, + 0x30870: 0x6d950e20, 0x30871: 0x6d951020, 0x30872: 0x6d951220, 0x30873: 0x6d951420, + 0x30874: 0x6d951620, 0x30875: 0x6d951820, 0x30876: 0x6d951a20, 0x30877: 0x6d951c20, + 0x30878: 0x6d951e20, 0x30879: 0x6d952020, 0x3087a: 0x6d952220, 0x3087b: 0x6d952420, + 0x3087c: 0x6d952620, 0x3087d: 0x6db84220, 0x3087e: 0x6db84420, 0x3087f: 0x6db84620, + // Block 0xc22, offset 0x30880 + 0x30880: 0x6db84820, 0x30881: 0x6db84a20, 0x30882: 0x6db84c20, 0x30883: 0x6db84e20, + 0x30884: 0x6db85020, 0x30885: 0x6db85220, 0x30886: 0x6dd6ce20, 0x30887: 0x6dd6d020, + 0x30888: 0x6dd6d220, 0x30889: 0x6dd6d420, 0x3088a: 0x6dd6d620, 0x3088b: 0x6dd6d820, + 0x3088c: 0x6dd6da20, 0x3088d: 0x6def9a20, 0x3088e: 0x6def9c20, 0x3088f: 0x6def9e20, + 0x30890: 0x6defa020, 0x30891: 0x6defa220, 0x30892: 0x6defa420, 0x30893: 0x6defa620, + 0x30894: 0x6defa820, 0x30895: 0x6e03ae20, 0x30896: 0x6e03b020, 0x30897: 0x6e03b220, + 0x30898: 0x6e03b420, 0x30899: 0x6e03b620, 0x3089a: 0x6e03b820, 0x3089b: 0x6e151820, + 0x3089c: 0x6e151a20, 0x3089d: 0x6e151c20, 0x3089e: 0x6e151e20, 0x3089f: 0x6e152020, + 0x308a0: 0x6e22b820, 0x308a1: 0x6e22ba20, 0x308a2: 0x6e22bc20, 0x308a3: 0x6e2cee20, + 0x308a4: 0x6e2cf020, 0x308a5: 0x6e413020, 0x308a6: 0x6c051a20, 0x308a7: 0x6c0a7e20, + 0x308a8: 0x6c150820, 0x308a9: 0x6c271020, 0x308aa: 0x6c271220, 0x308ab: 0x6c271420, + 0x308ac: 0x6c40e620, 0x308ad: 0x6c40e820, 0x308ae: 0x6c40ea20, 0x308af: 0x6c40ec20, + 0x308b0: 0x6c40ee20, 0x308b1: 0x6c614620, 0x308b2: 0x6c614820, 0x308b3: 0x6c614a20, + 0x308b4: 0x6c614c20, 0x308b5: 0x6c614e20, 0x308b6: 0x6c615020, 0x308b7: 0x6c615220, + 0x308b8: 0x6c615420, 0x308b9: 0x6c615620, 0x308ba: 0x6c615820, 0x308bb: 0x6c615a20, + 0x308bc: 0x6c87ba20, 0x308bd: 0x6c87bc20, 0x308be: 0x6c87be20, 0x308bf: 0x6c87c020, + // Block 0xc23, offset 0x308c0 + 0x308c0: 0x6c87c220, 0x308c1: 0x6c87c420, 0x308c2: 0x6c87c620, 0x308c3: 0x6c87c820, + 0x308c4: 0x6cb33a20, 0x308c5: 0x6cb33c20, 0x308c6: 0x6cb33e20, 0x308c7: 0x6ce2d820, + 0x308c8: 0x6ce2da20, 0x308c9: 0x6ce2dc20, 0x308ca: 0x6ce2de20, 0x308cb: 0x6ce2e020, + 0x308cc: 0x6ce2e220, 0x308cd: 0x6ce2e420, 0x308ce: 0x6ce2e620, 0x308cf: 0x6d113e20, + 0x308d0: 0x6d114020, 0x308d1: 0x6d114220, 0x308d2: 0x6d114420, 0x308d3: 0x6d114620, + 0x308d4: 0x6d114820, 0x308d5: 0x6d3f5e20, 0x308d6: 0x6d3f6020, 0x308d7: 0x6d3f6220, + 0x308d8: 0x6d6c4e20, 0x308d9: 0x6d957020, 0x308da: 0x6d957220, 0x308db: 0x6c271c20, + 0x308dc: 0x6ce2f020, 0x308dd: 0x6ce2f220, 0x308de: 0x6d114c20, 0x308df: 0x6d114e20, + 0x308e0: 0x6d115020, 0x308e1: 0x6d3f6820, 0x308e2: 0x6d3f6a20, 0x308e3: 0x6d3f6c20, + 0x308e4: 0x6d6c5620, 0x308e5: 0x6d957820, 0x308e6: 0x6d957a20, 0x308e7: 0x6d957c20, + 0x308e8: 0x6d957e20, 0x308e9: 0x6d958020, 0x308ea: 0x6d958220, 0x308eb: 0x6db89e20, + 0x308ec: 0x6dd71620, 0x308ed: 0x6defca20, 0x308ee: 0x6e03ee20, 0x308ef: 0x6e153620, + 0x308f0: 0x6c272020, 0x308f1: 0x6c87d620, 0x308f2: 0x6d116020, 0x308f3: 0x6d6c6220, + 0x308f4: 0x6defd620, 0x308f5: 0x6c272620, 0x308f6: 0x6c051e20, 0x308f7: 0x6c0a8020, + 0x308f8: 0x6c150a20, 0x308f9: 0x6c150c20, 0x308fa: 0x6c150e20, 0x308fb: 0x6c151020, + 0x308fc: 0x6c151220, 0x308fd: 0x6c151420, 0x308fe: 0x6c272e20, 0x308ff: 0x6c273020, + // Block 0xc24, offset 0x30900 + 0x30900: 0x6c273220, 0x30901: 0x6c273420, 0x30902: 0x6c273620, 0x30903: 0x6c273820, + 0x30904: 0x6c273a20, 0x30905: 0x6c273c20, 0x30906: 0x6c273e20, 0x30907: 0x6c274020, + 0x30908: 0x6c274220, 0x30909: 0x6c274420, 0x3090a: 0x6c410020, 0x3090b: 0x6c410220, + 0x3090c: 0x6c410420, 0x3090d: 0x6c410620, 0x3090e: 0x6c410820, 0x3090f: 0x6c410a20, + 0x30910: 0x6c410c20, 0x30911: 0x6c410e20, 0x30912: 0x6c411020, 0x30913: 0x6c411220, + 0x30914: 0x6c411420, 0x30915: 0x6c411620, 0x30916: 0x6c411820, 0x30917: 0x6c411a20, + 0x30918: 0x6c411c20, 0x30919: 0x6c411e20, 0x3091a: 0x6c412020, 0x3091b: 0x6c412220, + 0x3091c: 0x6c412420, 0x3091d: 0x6c412620, 0x3091e: 0x6c412820, 0x3091f: 0x6c412a20, + 0x30920: 0x6c616a20, 0x30921: 0x6c616c20, 0x30922: 0x6c616e20, 0x30923: 0x6c617020, + 0x30924: 0x6c617220, 0x30925: 0x6c617420, 0x30926: 0x6c617620, 0x30927: 0x6c617820, + 0x30928: 0x6c617a20, 0x30929: 0x6c617c20, 0x3092a: 0x6c617e20, 0x3092b: 0x6c618020, + 0x3092c: 0x6c412c20, 0x3092d: 0x6c618220, 0x3092e: 0x6c618420, 0x3092f: 0x6c618620, + 0x30930: 0x6c618820, 0x30931: 0x6c618a20, 0x30932: 0x6c618c20, 0x30933: 0x6c618e20, + 0x30934: 0x6c87e620, 0x30935: 0x6c87e820, 0x30936: 0x6c87ea20, 0x30937: 0x6c87ec20, + 0x30938: 0x6c87ee20, 0x30939: 0x6c87f020, 0x3093a: 0x6c87f220, 0x3093b: 0x6c87f420, + 0x3093c: 0x6c87f620, 0x3093d: 0x6c87f820, 0x3093e: 0x6c87fa20, 0x3093f: 0x6c87fc20, + // Block 0xc25, offset 0x30940 + 0x30940: 0x6c87fe20, 0x30941: 0x6c880020, 0x30942: 0x6c880220, 0x30943: 0x6c880420, + 0x30944: 0x6c880620, 0x30945: 0x6c880820, 0x30946: 0x6c880a20, 0x30947: 0x6c880c20, + 0x30948: 0x6c880e20, 0x30949: 0x6c881020, 0x3094a: 0x6c881220, 0x3094b: 0x6cb34e20, + 0x3094c: 0x6cb35020, 0x3094d: 0x6cb35220, 0x3094e: 0x6cb35420, 0x3094f: 0x6cb35620, + 0x30950: 0x6cb35820, 0x30951: 0x6cb35a20, 0x30952: 0x6cb35c20, 0x30953: 0x6cb35e20, + 0x30954: 0x6cb36020, 0x30955: 0x6cb36220, 0x30956: 0x6cb36420, 0x30957: 0x6cb36620, + 0x30958: 0x6cb36820, 0x30959: 0x6cb36a20, 0x3095a: 0x6cb36c20, 0x3095b: 0x6cb36e20, + 0x3095c: 0x6cb37020, 0x3095d: 0x6cb37220, 0x3095e: 0x6cb37420, 0x3095f: 0x6cb37620, + 0x30960: 0x6cb37820, 0x30961: 0x6cb37a20, 0x30962: 0x6cb37c20, 0x30963: 0x6cb37e20, + 0x30964: 0x6cb38020, 0x30965: 0x6cb38220, 0x30966: 0x6cb38420, 0x30967: 0x6cb38620, + 0x30968: 0x6ce30420, 0x30969: 0x6ce30620, 0x3096a: 0x6ce30820, 0x3096b: 0x6ce30a20, + 0x3096c: 0x6ce30c20, 0x3096d: 0x6ce30e20, 0x3096e: 0x6ce31020, 0x3096f: 0x6ce31220, + 0x30970: 0x6ce31420, 0x30971: 0x6ce31620, 0x30972: 0x6ce31820, 0x30973: 0x6ce31a20, + 0x30974: 0x6ce31c20, 0x30975: 0x6ce31e20, 0x30976: 0x6ce32020, 0x30977: 0x6ce32220, + 0x30978: 0x6ce32420, 0x30979: 0x6ce32620, 0x3097a: 0x6ce32820, 0x3097b: 0x6ce32a20, + 0x3097c: 0x6d116a20, 0x3097d: 0x6d116c20, 0x3097e: 0x6d116e20, 0x3097f: 0x6d117020, + // Block 0xc26, offset 0x30980 + 0x30980: 0x6d117220, 0x30981: 0x6d117420, 0x30982: 0x6d117620, 0x30983: 0x6d117820, + 0x30984: 0x6d117a20, 0x30985: 0x6d117c20, 0x30986: 0x6d117e20, 0x30987: 0x6d118020, + 0x30988: 0x6d118220, 0x30989: 0x6d118420, 0x3098a: 0x6d118620, 0x3098b: 0x6d118820, + 0x3098c: 0x6d118a20, 0x3098d: 0x6d118c20, 0x3098e: 0x6d118e20, 0x3098f: 0x6d119020, + 0x30990: 0x6d119220, 0x30991: 0x6d119420, 0x30992: 0x6d119620, 0x30993: 0x6d119820, + 0x30994: 0x6d119a20, 0x30995: 0x6d119c20, 0x30996: 0x6d119e20, 0x30997: 0x6d11a020, + 0x30998: 0x6d3f8020, 0x30999: 0x6d3f8220, 0x3099a: 0x6d3f8420, 0x3099b: 0x6d3f8620, + 0x3099c: 0x6d3f8820, 0x3099d: 0x6d3f8a20, 0x3099e: 0x6d3f8c20, 0x3099f: 0x6d3f8e20, + 0x309a0: 0x6d3f9020, 0x309a1: 0x6d3f9220, 0x309a2: 0x6d3f9420, 0x309a3: 0x6d3f9620, + 0x309a4: 0x6d3f9820, 0x309a5: 0x6d3f9a20, 0x309a6: 0x6d6c6e20, 0x309a7: 0x6d6c7020, + 0x309a8: 0x6d6c7220, 0x309a9: 0x6d6c7420, 0x309aa: 0x6d6c7620, 0x309ab: 0x6d6c7820, + 0x309ac: 0x6d6c7a20, 0x309ad: 0x6d6c7c20, 0x309ae: 0x6d6c7e20, 0x309af: 0x6d6c8020, + 0x309b0: 0x6d6c8220, 0x309b1: 0x6d6c8420, 0x309b2: 0x6d959e20, 0x309b3: 0x6d6c8620, + 0x309b4: 0x6d95a020, 0x309b5: 0x6d95a220, 0x309b6: 0x6d95a420, 0x309b7: 0x6d6c8820, + 0x309b8: 0x6d95a620, 0x309b9: 0x6d95a820, 0x309ba: 0x6d95aa20, 0x309bb: 0x6d95ac20, + 0x309bc: 0x6d95ae20, 0x309bd: 0x6db8b220, 0x309be: 0x6db8b420, 0x309bf: 0x6db8b620, + // Block 0xc27, offset 0x309c0 + 0x309c0: 0x6db8b820, 0x309c1: 0x6db8ba20, 0x309c2: 0x6db8bc20, 0x309c3: 0x6db8be20, + 0x309c4: 0x6db8c020, 0x309c5: 0x6db8c220, 0x309c6: 0x6d95b020, 0x309c7: 0x6dd72220, + 0x309c8: 0x6dd72420, 0x309c9: 0x6db8c420, 0x309ca: 0x6defdc20, 0x309cb: 0x6defde20, + 0x309cc: 0x6defe020, 0x309cd: 0x6e03fc20, 0x309ce: 0x6e153c20, 0x309cf: 0x6e2d0820, + 0x309d0: 0x6e2d0a20, 0x309d1: 0x6c278a20, 0x309d2: 0x6c0a8e20, 0x309d3: 0x6c0a9020, + 0x309d4: 0x6c153c20, 0x309d5: 0x6c886a20, 0x309d6: 0x6c153e20, 0x309d7: 0x6c154020, + 0x309d8: 0x6c154220, 0x309d9: 0x6c154420, 0x309da: 0x6c154620, 0x309db: 0x6c154820, + 0x309dc: 0x6c154a20, 0x309dd: 0x6c154c20, 0x309de: 0x6c279220, 0x309df: 0x6c279420, + 0x309e0: 0x6c279620, 0x309e1: 0x6c279820, 0x309e2: 0x6c279a20, 0x309e3: 0x6c279c20, + 0x309e4: 0x6c279e20, 0x309e5: 0x6c27a020, 0x309e6: 0x6c27a220, 0x309e7: 0x6c27a420, + 0x309e8: 0x6c27a620, 0x309e9: 0x6c27a820, 0x309ea: 0x6c27aa20, 0x309eb: 0x6cb3fc20, + 0x309ec: 0x6c27ac20, 0x309ed: 0x6c418220, 0x309ee: 0x6c418420, 0x309ef: 0x6c418620, + 0x309f0: 0x6c418820, 0x309f1: 0x6c418a20, 0x309f2: 0x6c418c20, 0x309f3: 0x6c418e20, + 0x309f4: 0x6c419020, 0x309f5: 0x6c419220, 0x309f6: 0x6c419420, 0x309f7: 0x6c419620, + 0x309f8: 0x6c419820, 0x309f9: 0x6c419a20, 0x309fa: 0x6c419c20, 0x309fb: 0x6c419e20, + 0x309fc: 0x6c61e020, 0x309fd: 0x6c61e220, 0x309fe: 0x6c61e420, 0x309ff: 0x6c61e620, + // Block 0xc28, offset 0x30a00 + 0x30a00: 0x6c61e820, 0x30a01: 0x6c61ea20, 0x30a02: 0x6c61ec20, 0x30a03: 0x6c61ee20, + 0x30a04: 0x6c61f020, 0x30a05: 0x6c61f220, 0x30a06: 0x6c61f420, 0x30a07: 0x6c61f620, + 0x30a08: 0x6c61f820, 0x30a09: 0x6c61fa20, 0x30a0a: 0x6c61fc20, 0x30a0b: 0x6c61fe20, + 0x30a0c: 0x6d11fe20, 0x30a0d: 0x6c620020, 0x30a0e: 0x6c620220, 0x30a0f: 0x6c620420, + 0x30a10: 0x6c620620, 0x30a11: 0x6c620820, 0x30a12: 0x6d400820, 0x30a13: 0x6c620a20, + 0x30a14: 0x6cb3fe20, 0x30a15: 0x6c620c20, 0x30a16: 0x6c887620, 0x30a17: 0x6c887820, + 0x30a18: 0x6c887a20, 0x30a19: 0x6c887c20, 0x30a1a: 0x6c887e20, 0x30a1b: 0x6c888020, + 0x30a1c: 0x6c888220, 0x30a1d: 0x6c888420, 0x30a1e: 0x6c888620, 0x30a1f: 0x6c888820, + 0x30a20: 0x6c888a20, 0x30a21: 0x6c888c20, 0x30a22: 0x6c888e20, 0x30a23: 0x6c889020, + 0x30a24: 0x6c889220, 0x30a25: 0x6c889420, 0x30a26: 0x6c889620, 0x30a27: 0x6c889820, + 0x30a28: 0x6cb40c20, 0x30a29: 0x6cb40e20, 0x30a2a: 0x6cb41020, 0x30a2b: 0x6cb41220, + 0x30a2c: 0x6cb41420, 0x30a2d: 0x6cb41620, 0x30a2e: 0x6cb41820, 0x30a2f: 0x6cb41a20, + 0x30a30: 0x6cb41c20, 0x30a31: 0x6c625420, 0x30a32: 0x6cb41e20, 0x30a33: 0x6cb42020, + 0x30a34: 0x6cb42220, 0x30a35: 0x6ce3be20, 0x30a36: 0x6d6cf820, 0x30a37: 0x6cb42420, + 0x30a38: 0x6cb42620, 0x30a39: 0x6ce3c620, 0x30a3a: 0x6d95fa20, 0x30a3b: 0x6ce3c820, + 0x30a3c: 0x6ce3ca20, 0x30a3d: 0x6cb42820, 0x30a3e: 0x6ce3cc20, 0x30a3f: 0x6ce3ce20, + // Block 0xc29, offset 0x30a40 + 0x30a40: 0x6ce3d020, 0x30a41: 0x6ce3d220, 0x30a42: 0x6ce3d420, 0x30a43: 0x6ce3d620, + 0x30a44: 0x6ce3d820, 0x30a45: 0x6ce3da20, 0x30a46: 0x6ce3dc20, 0x30a47: 0x6ce3de20, + 0x30a48: 0x6ce3e020, 0x30a49: 0x6ce3e220, 0x30a4a: 0x6ce3e420, 0x30a4b: 0x6d120820, + 0x30a4c: 0x6d120a20, 0x30a4d: 0x6d120c20, 0x30a4e: 0x6d120e20, 0x30a4f: 0x6d121020, + 0x30a50: 0x6d121220, 0x30a51: 0x6d121420, 0x30a52: 0x6d121620, 0x30a53: 0x6d121820, + 0x30a54: 0x6d121a20, 0x30a55: 0x6d121c20, 0x30a56: 0x6d121e20, 0x30a57: 0x6d122020, + 0x30a58: 0x6d401420, 0x30a59: 0x6d401620, 0x30a5a: 0x6d401820, 0x30a5b: 0x6d401a20, + 0x30a5c: 0x6d401c20, 0x30a5d: 0x6d401e20, 0x30a5e: 0x6d402020, 0x30a5f: 0x6d402220, + 0x30a60: 0x6d402420, 0x30a61: 0x6d402620, 0x30a62: 0x6d402820, 0x30a63: 0x6d402a20, + 0x30a64: 0x6d402c20, 0x30a65: 0x6d402e20, 0x30a66: 0x6d6d0220, 0x30a67: 0x6d6d0420, + 0x30a68: 0x6dd75620, 0x30a69: 0x6d6d0620, 0x30a6a: 0x6d6d0820, 0x30a6b: 0x6d6d0a20, + 0x30a6c: 0x6ce41e20, 0x30a6d: 0x6d6d0c20, 0x30a6e: 0x6d6d0e20, 0x30a6f: 0x6d6d1020, + 0x30a70: 0x6d6d1220, 0x30a71: 0x6d6d1420, 0x30a72: 0x6d6d1620, 0x30a73: 0x6d95fe20, + 0x30a74: 0x6d960020, 0x30a75: 0x6d960220, 0x30a76: 0x6d960420, 0x30a77: 0x6d960620, + 0x30a78: 0x6db90820, 0x30a79: 0x6db90a20, 0x30a7a: 0x6dd75820, 0x30a7b: 0x6dd75a20, + 0x30a7c: 0x6dd75c20, 0x30a7d: 0x6dd75e20, 0x30a7e: 0x6dd76020, 0x30a7f: 0x6deff620, + // Block 0xc2a, offset 0x30a80 + 0x30a80: 0x6deff820, 0x30a81: 0x6e042620, 0x30a82: 0x6deffa20, 0x30a83: 0x6e042820, + 0x30a84: 0x6e154e20, 0x30a85: 0x6e155020, 0x30a86: 0x6e155220, 0x30a87: 0x6e22ea20, + 0x30a88: 0x6e22ec20, 0x30a89: 0x6c27ec20, 0x30a8a: 0x6c625a20, 0x30a8b: 0x6c625c20, + 0x30a8c: 0x6c88ee20, 0x30a8d: 0x6c88f020, 0x30a8e: 0x6c88f220, 0x30a8f: 0x6c88f420, + 0x30a90: 0x6c88f620, 0x30a91: 0x6c88f820, 0x30a92: 0x6c88fa20, 0x30a93: 0x6cb47e20, + 0x30a94: 0x6cb48020, 0x30a95: 0x6cb48220, 0x30a96: 0x6cb48420, 0x30a97: 0x6cb48620, + 0x30a98: 0x6cb48820, 0x30a99: 0x6cb48a20, 0x30a9a: 0x6cb48c20, 0x30a9b: 0x6cb48e20, + 0x30a9c: 0x6cb49020, 0x30a9d: 0x6cb49220, 0x30a9e: 0x6cb49420, 0x30a9f: 0x6ce42a20, + 0x30aa0: 0x6ce42c20, 0x30aa1: 0x6ce42e20, 0x30aa2: 0x6ce43020, 0x30aa3: 0x6ce43220, + 0x30aa4: 0x6ce43420, 0x30aa5: 0x6ce43620, 0x30aa6: 0x6d127820, 0x30aa7: 0x6d127a20, + 0x30aa8: 0x6d127c20, 0x30aa9: 0x6d127e20, 0x30aaa: 0x6d128020, 0x30aab: 0x6d128220, + 0x30aac: 0x6d128420, 0x30aad: 0x6d128620, 0x30aae: 0x6d128820, 0x30aaf: 0x6d128a20, + 0x30ab0: 0x6d128c20, 0x30ab1: 0x6d128e20, 0x30ab2: 0x6d407e20, 0x30ab3: 0x6d408020, + 0x30ab4: 0x6d408220, 0x30ab5: 0x6d408420, 0x30ab6: 0x6d408620, 0x30ab7: 0x6d408820, + 0x30ab8: 0x6d408a20, 0x30ab9: 0x6d408c20, 0x30aba: 0x6d408e20, 0x30abb: 0x6d409020, + 0x30abc: 0x6d409220, 0x30abd: 0x6d409420, 0x30abe: 0x6d409620, 0x30abf: 0x6d409820, + // Block 0xc2b, offset 0x30ac0 + 0x30ac0: 0x6d6d5020, 0x30ac1: 0x6d6d5220, 0x30ac2: 0x6d6d5420, 0x30ac3: 0x6d6d5620, + 0x30ac4: 0x6d6d5820, 0x30ac5: 0x6d6d5a20, 0x30ac6: 0x6d6d5c20, 0x30ac7: 0x6d6d5e20, + 0x30ac8: 0x6d6d6020, 0x30ac9: 0x6d6d6220, 0x30aca: 0x6d6d6420, 0x30acb: 0x6d6d6620, + 0x30acc: 0x6d6d6820, 0x30acd: 0x6d964220, 0x30ace: 0x6d964420, 0x30acf: 0x6d964620, + 0x30ad0: 0x6d964820, 0x30ad1: 0x6d964a20, 0x30ad2: 0x6d964c20, 0x30ad3: 0x6d964e20, + 0x30ad4: 0x6d965020, 0x30ad5: 0x6d965220, 0x30ad6: 0x6d965420, 0x30ad7: 0x6d965620, + 0x30ad8: 0x6db93c20, 0x30ad9: 0x6db93e20, 0x30ada: 0x6db94020, 0x30adb: 0x6db94220, + 0x30adc: 0x6db94420, 0x30add: 0x6db94620, 0x30ade: 0x6db94820, 0x30adf: 0x6db94a20, + 0x30ae0: 0x6db94c20, 0x30ae1: 0x6db94e20, 0x30ae2: 0x6db95020, 0x30ae3: 0x6db95220, + 0x30ae4: 0x6db95420, 0x30ae5: 0x6dd78220, 0x30ae6: 0x6dd78420, 0x30ae7: 0x6dd78620, + 0x30ae8: 0x6dd78820, 0x30ae9: 0x6dd78a20, 0x30aea: 0x6dd78c20, 0x30aeb: 0x6dd78e20, + 0x30aec: 0x6dd79020, 0x30aed: 0x6df01420, 0x30aee: 0x6df01620, 0x30aef: 0x6df01820, + 0x30af0: 0x6df01a20, 0x30af1: 0x6df01c20, 0x30af2: 0x6e043420, 0x30af3: 0x6e043620, + 0x30af4: 0x6e043820, 0x30af5: 0x6e043a20, 0x30af6: 0x6e043c20, 0x30af7: 0x6e043e20, + 0x30af8: 0x6e044020, 0x30af9: 0x6e156020, 0x30afa: 0x6e156220, 0x30afb: 0x6e156420, + 0x30afc: 0x6e2d2620, 0x30afd: 0x6e350220, 0x30afe: 0x6e350420, 0x30aff: 0x6e350620, + // Block 0xc2c, offset 0x30b00 + 0x30b00: 0x6e350820, 0x30b01: 0x6e3aaa20, 0x30b02: 0x6e351420, 0x30b03: 0x6e3e6e20, + 0x30b04: 0x6e3e7020, 0x30b05: 0x6e413820, 0x30b06: 0x6c27ee20, 0x30b07: 0x6c41da20, + 0x30b08: 0x6cb4c420, 0x30b09: 0x6ce46a20, 0x30b0a: 0x6ce46c20, 0x30b0b: 0x6e046220, + 0x30b0c: 0x6c27f020, 0x30b0d: 0x6c625e20, 0x30b0e: 0x6cb4cc20, 0x30b0f: 0x6ce47020, + 0x30b10: 0x6dd7ce20, 0x30b11: 0x6c41dc20, 0x30b12: 0x6c41de20, 0x30b13: 0x6c626220, + 0x30b14: 0x6c626420, 0x30b15: 0x6c890e20, 0x30b16: 0x6c891020, 0x30b17: 0x6c891220, + 0x30b18: 0x6c891420, 0x30b19: 0x6c891620, 0x30b1a: 0x6c891820, 0x30b1b: 0x6c891a20, + 0x30b1c: 0x6c891c20, 0x30b1d: 0x6c891e20, 0x30b1e: 0x6c892020, 0x30b1f: 0x6c892220, + 0x30b20: 0x6c892420, 0x30b21: 0x6c892620, 0x30b22: 0x6c892820, 0x30b23: 0x6cb4d620, + 0x30b24: 0x6cb4d820, 0x30b25: 0x6cb4da20, 0x30b26: 0x6cb4dc20, 0x30b27: 0x6cb4de20, + 0x30b28: 0x6cb4e020, 0x30b29: 0x6cb4e220, 0x30b2a: 0x6cb4e420, 0x30b2b: 0x6cb4e620, + 0x30b2c: 0x6cb4e820, 0x30b2d: 0x6cb4ea20, 0x30b2e: 0x6cb4ec20, 0x30b2f: 0x6cb4ee20, + 0x30b30: 0x6cb4f020, 0x30b31: 0x6cb4f220, 0x30b32: 0x6cb4f420, 0x30b33: 0x6cb4f620, + 0x30b34: 0x6cb4f820, 0x30b35: 0x6cb4fa20, 0x30b36: 0x6cb4fc20, 0x30b37: 0x6cb4fe20, + 0x30b38: 0x6cb50020, 0x30b39: 0x6cb50220, 0x30b3a: 0x6cb50420, 0x30b3b: 0x6cb50620, + 0x30b3c: 0x6cb50820, 0x30b3d: 0x6ce48420, 0x30b3e: 0x6ce48620, 0x30b3f: 0x6ce48820, + // Block 0xc2d, offset 0x30b40 + 0x30b40: 0x6ce48a20, 0x30b41: 0x6ce48c20, 0x30b42: 0x6ce48e20, 0x30b43: 0x6ce49020, + 0x30b44: 0x6ce49220, 0x30b45: 0x6ce49420, 0x30b46: 0x6ce49620, 0x30b47: 0x6ce49820, + 0x30b48: 0x6ce49a20, 0x30b49: 0x6ce49c20, 0x30b4a: 0x6ce49e20, 0x30b4b: 0x6ce4a020, + 0x30b4c: 0x6ce4a220, 0x30b4d: 0x6ce4a420, 0x30b4e: 0x6ce4a620, 0x30b4f: 0x6ce4a820, + 0x30b50: 0x6ce4aa20, 0x30b51: 0x6ce4ac20, 0x30b52: 0x6ce4ae20, 0x30b53: 0x6ce4b020, + 0x30b54: 0x6ce4b220, 0x30b55: 0x6ce4b420, 0x30b56: 0x6ce4b620, 0x30b57: 0x6ce4b820, + 0x30b58: 0x6ce4ba20, 0x30b59: 0x6ce4bc20, 0x30b5a: 0x6ce4be20, 0x30b5b: 0x6ce4c020, + 0x30b5c: 0x6ce4c220, 0x30b5d: 0x6ce4c420, 0x30b5e: 0x6ce4c620, 0x30b5f: 0x6ce4c820, + 0x30b60: 0x6ce4ca20, 0x30b61: 0x6ce4cc20, 0x30b62: 0x6ce4ce20, 0x30b63: 0x6ce4d020, + 0x30b64: 0x6ce4d220, 0x30b65: 0x6ce4d420, 0x30b66: 0x6ce4d620, 0x30b67: 0x6ce4d820, + 0x30b68: 0x6ce4da20, 0x30b69: 0x6ce4dc20, 0x30b6a: 0x6ce4de20, 0x30b6b: 0x6ce4e020, + 0x30b6c: 0x6ce4e220, 0x30b6d: 0x6d40d420, 0x30b6e: 0x6d12c620, 0x30b6f: 0x6d12c820, + 0x30b70: 0x6d12ca20, 0x30b71: 0x6d12cc20, 0x30b72: 0x6d12ce20, 0x30b73: 0x6d12d020, + 0x30b74: 0x6d12d220, 0x30b75: 0x6d12d420, 0x30b76: 0x6d12d620, 0x30b77: 0x6d12d820, + 0x30b78: 0x6d12da20, 0x30b79: 0x6d12dc20, 0x30b7a: 0x6d12de20, 0x30b7b: 0x6d12e020, + 0x30b7c: 0x6d12e220, 0x30b7d: 0x6d12e420, 0x30b7e: 0x6d12e620, 0x30b7f: 0x6d12e820, + // Block 0xc2e, offset 0x30b80 + 0x30b80: 0x6d12ea20, 0x30b81: 0x6d12ec20, 0x30b82: 0x6d12ee20, 0x30b83: 0x6d12f020, + 0x30b84: 0x6d12f220, 0x30b85: 0x6d12f420, 0x30b86: 0x6d12f620, 0x30b87: 0x6d12f820, + 0x30b88: 0x6d12fa20, 0x30b89: 0x6d12fc20, 0x30b8a: 0x6d12fe20, 0x30b8b: 0x6d130020, + 0x30b8c: 0x6d130220, 0x30b8d: 0x6d130420, 0x30b8e: 0x6d130620, 0x30b8f: 0x6d130820, + 0x30b90: 0x6d130a20, 0x30b91: 0x6d130c20, 0x30b92: 0x6d130e20, 0x30b93: 0x6d131020, + 0x30b94: 0x6d131220, 0x30b95: 0x6d131420, 0x30b96: 0x6d131620, 0x30b97: 0x6d131820, + 0x30b98: 0x6d131a20, 0x30b99: 0x6d131c20, 0x30b9a: 0x6d131e20, 0x30b9b: 0x6d132020, + 0x30b9c: 0x6d132220, 0x30b9d: 0x6d132420, 0x30b9e: 0x6d132620, 0x30b9f: 0x6d132820, + 0x30ba0: 0x6d132a20, 0x30ba1: 0x6d132c20, 0x30ba2: 0x6d132e20, 0x30ba3: 0x6d133020, + 0x30ba4: 0x6d133220, 0x30ba5: 0x6d133420, 0x30ba6: 0x6d133620, 0x30ba7: 0x6d133820, + 0x30ba8: 0x6d133a20, 0x30ba9: 0x6d133c20, 0x30baa: 0x6d133e20, 0x30bab: 0x6d134020, + 0x30bac: 0x6d134220, 0x30bad: 0x6d134420, 0x30bae: 0x6d134620, 0x30baf: 0x6d134820, + 0x30bb0: 0x6d134a20, 0x30bb1: 0x6d134c20, 0x30bb2: 0x6d134e20, 0x30bb3: 0x6d135020, + 0x30bb4: 0x6d135220, 0x30bb5: 0x6d40e420, 0x30bb6: 0x6d40e620, 0x30bb7: 0x6d40e820, + 0x30bb8: 0x6d40ea20, 0x30bb9: 0x6d40ec20, 0x30bba: 0x6d40ee20, 0x30bbb: 0x6d40f020, + 0x30bbc: 0x6d41c020, 0x30bbd: 0x6d40f220, 0x30bbe: 0x6d40f420, 0x30bbf: 0x6d40f620, + // Block 0xc2f, offset 0x30bc0 + 0x30bc0: 0x6d40f820, 0x30bc1: 0x6d40fa20, 0x30bc2: 0x6d40fc20, 0x30bc3: 0x6d40fe20, + 0x30bc4: 0x6d410020, 0x30bc5: 0x6d410220, 0x30bc6: 0x6d410420, 0x30bc7: 0x6d410620, + 0x30bc8: 0x6d410820, 0x30bc9: 0x6d410a20, 0x30bca: 0x6d410c20, 0x30bcb: 0x6d410e20, + 0x30bcc: 0x6d411020, 0x30bcd: 0x6d411220, 0x30bce: 0x6d411420, 0x30bcf: 0x6d135420, + 0x30bd0: 0x6d411620, 0x30bd1: 0x6d411820, 0x30bd2: 0x6d411a20, 0x30bd3: 0x6d411c20, + 0x30bd4: 0x6d411e20, 0x30bd5: 0x6d412020, 0x30bd6: 0x6d412220, 0x30bd7: 0x6d412420, + 0x30bd8: 0x6d412620, 0x30bd9: 0x6d412820, 0x30bda: 0x6d412a20, 0x30bdb: 0x6d412c20, + 0x30bdc: 0x6d412e20, 0x30bdd: 0x6d413020, 0x30bde: 0x6d413220, 0x30bdf: 0x6d413420, + 0x30be0: 0x6d413620, 0x30be1: 0x6d413820, 0x30be2: 0x6d413a20, 0x30be3: 0x6d413c20, + 0x30be4: 0x6d413e20, 0x30be5: 0x6d414020, 0x30be6: 0x6d414220, 0x30be7: 0x6d414420, + 0x30be8: 0x6d414620, 0x30be9: 0x6d414820, 0x30bea: 0x6d414a20, 0x30beb: 0x6d414c20, + 0x30bec: 0x6d414e20, 0x30bed: 0x6d415020, 0x30bee: 0x6d415220, 0x30bef: 0x6d415420, + 0x30bf0: 0x6d415620, 0x30bf1: 0x6d415820, 0x30bf2: 0x6d6dc220, 0x30bf3: 0x6d6dc420, + 0x30bf4: 0x6d6dc620, 0x30bf5: 0x6d6dc820, 0x30bf6: 0x6d6dca20, 0x30bf7: 0x6d6dcc20, + 0x30bf8: 0x6d6dce20, 0x30bf9: 0x6d6dd020, 0x30bfa: 0x6d6dd220, 0x30bfb: 0x6d6dd420, + 0x30bfc: 0x6d6dd620, 0x30bfd: 0x6d6dd820, 0x30bfe: 0x6d6dda20, 0x30bff: 0x6d6ddc20, + // Block 0xc30, offset 0x30c00 + 0x30c00: 0x6d6dde20, 0x30c01: 0x6d6de020, 0x30c02: 0x6d6de220, 0x30c03: 0x6d6de420, + 0x30c04: 0x6d6de620, 0x30c05: 0x6d6de820, 0x30c06: 0x6d6dea20, 0x30c07: 0x6d6dec20, + 0x30c08: 0x6d6dee20, 0x30c09: 0x6d6df020, 0x30c0a: 0x6d6df220, 0x30c0b: 0x6d969820, + 0x30c0c: 0x6d6df420, 0x30c0d: 0x6d6df620, 0x30c0e: 0x6d6df820, 0x30c0f: 0x6d6dfa20, + 0x30c10: 0x6d6dfc20, 0x30c11: 0x6d6dfe20, 0x30c12: 0x6d6e0020, 0x30c13: 0x6d6e0220, + 0x30c14: 0x6d6e0420, 0x30c15: 0x6d6e0620, 0x30c16: 0x6d6e0820, 0x30c17: 0x6d6e0a20, + 0x30c18: 0x6d6e0c20, 0x30c19: 0x6d6e0e20, 0x30c1a: 0x6d6e1020, 0x30c1b: 0x6d6e1220, + 0x30c1c: 0x6d6e1420, 0x30c1d: 0x6d6e1620, 0x30c1e: 0x6d6e1820, 0x30c1f: 0x6d6e1a20, + 0x30c20: 0x6d6e1c20, 0x30c21: 0x6d6e1e20, 0x30c22: 0x6d6e2020, 0x30c23: 0x6d6e2220, + 0x30c24: 0x6d6e2420, 0x30c25: 0x6d6e2620, 0x30c26: 0x6d6e2820, 0x30c27: 0x6d6e2a20, + 0x30c28: 0x6d6e2c20, 0x30c29: 0x6d6e2e20, 0x30c2a: 0x6d6e3020, 0x30c2b: 0x6d6e3220, + 0x30c2c: 0x6d6e3420, 0x30c2d: 0x6d6e3620, 0x30c2e: 0x6d41be20, 0x30c2f: 0x6d6e3820, + 0x30c30: 0x6d6e3a20, 0x30c31: 0x6d6e3c20, 0x30c32: 0x6d6e3e20, 0x30c33: 0x6d6e4020, + 0x30c34: 0x6d6e4220, 0x30c35: 0x6d6e4420, 0x30c36: 0x6d6e4620, 0x30c37: 0x6d96a220, + 0x30c38: 0x6d96a420, 0x30c39: 0x6d96a620, 0x30c3a: 0x6d96a820, 0x30c3b: 0x6d96aa20, + 0x30c3c: 0x6d96ac20, 0x30c3d: 0x6d96ae20, 0x30c3e: 0x6d96b020, 0x30c3f: 0x6d96b220, + // Block 0xc31, offset 0x30c40 + 0x30c40: 0x6d96b420, 0x30c41: 0x6d96b620, 0x30c42: 0x6d96b820, 0x30c43: 0x6d96ba20, + 0x30c44: 0x6d96bc20, 0x30c45: 0x6d96be20, 0x30c46: 0x6d96c020, 0x30c47: 0x6d96c220, + 0x30c48: 0x6d96c420, 0x30c49: 0x6d96c620, 0x30c4a: 0x6d96c820, 0x30c4b: 0x6d96ca20, + 0x30c4c: 0x6d96cc20, 0x30c4d: 0x6d96ce20, 0x30c4e: 0x6d96d020, 0x30c4f: 0x6d96d220, + 0x30c50: 0x6d96d420, 0x30c51: 0x6d96d620, 0x30c52: 0x6d96d820, 0x30c53: 0x6d96da20, + 0x30c54: 0x6d96dc20, 0x30c55: 0x6d96de20, 0x30c56: 0x6d96e020, 0x30c57: 0x6d96e220, + 0x30c58: 0x6d96e420, 0x30c59: 0x6d96e620, 0x30c5a: 0x6d96e820, 0x30c5b: 0x6d96ea20, + 0x30c5c: 0x6d96ec20, 0x30c5d: 0x6d96ee20, 0x30c5e: 0x6d96f020, 0x30c5f: 0x6d96f220, + 0x30c60: 0x6d96f420, 0x30c61: 0x6d96f620, 0x30c62: 0x6d96f820, 0x30c63: 0x6d96fa20, + 0x30c64: 0x6d96fc20, 0x30c65: 0x6d96fe20, 0x30c66: 0x6d970020, 0x30c67: 0x6d970220, + 0x30c68: 0x6db9ac20, 0x30c69: 0x6d970420, 0x30c6a: 0x6d970620, 0x30c6b: 0x6d970820, + 0x30c6c: 0x6d970a20, 0x30c6d: 0x6d970c20, 0x30c6e: 0x6d970e20, 0x30c6f: 0x6d971020, + 0x30c70: 0x6d971220, 0x30c71: 0x6d971420, 0x30c72: 0x6d971620, 0x30c73: 0x6d971820, + 0x30c74: 0x6d971a20, 0x30c75: 0x6d971c20, 0x30c76: 0x6d971e20, 0x30c77: 0x6d972020, + 0x30c78: 0x6d972220, 0x30c79: 0x6d972420, 0x30c7a: 0x6d972620, 0x30c7b: 0x6d972820, + 0x30c7c: 0x6d972a20, 0x30c7d: 0x6d972c20, 0x30c7e: 0x6d972e20, 0x30c7f: 0x6d973020, + // Block 0xc32, offset 0x30c80 + 0x30c80: 0x6d973220, 0x30c81: 0x6d973420, 0x30c82: 0x6d973620, 0x30c83: 0x6d973820, + 0x30c84: 0x6d973a20, 0x30c85: 0x6d973c20, 0x30c86: 0x6d973e20, 0x30c87: 0x6db9ae20, + 0x30c88: 0x6d974020, 0x30c89: 0x6db9b020, 0x30c8a: 0x6db9b220, 0x30c8b: 0x6db9b420, + 0x30c8c: 0x6db9b620, 0x30c8d: 0x6db9b820, 0x30c8e: 0x6db9ba20, 0x30c8f: 0x6db9bc20, + 0x30c90: 0x6db9be20, 0x30c91: 0x6db9c020, 0x30c92: 0x6db9c220, 0x30c93: 0x6db9c420, + 0x30c94: 0x6db9c620, 0x30c95: 0x6db9c820, 0x30c96: 0x6db9ca20, 0x30c97: 0x6db9cc20, + 0x30c98: 0x6db9ce20, 0x30c99: 0x6db9d020, 0x30c9a: 0x6db9d220, 0x30c9b: 0x6db9d420, + 0x30c9c: 0x6db9d620, 0x30c9d: 0x6db9d820, 0x30c9e: 0x6db9da20, 0x30c9f: 0x6db9dc20, + 0x30ca0: 0x6db9de20, 0x30ca1: 0x6db9e020, 0x30ca2: 0x6db9e220, 0x30ca3: 0x6db9e420, + 0x30ca4: 0x6db9e620, 0x30ca5: 0x6db9e820, 0x30ca6: 0x6db9ea20, 0x30ca7: 0x6db9ec20, + 0x30ca8: 0x6db9ee20, 0x30ca9: 0x6db9f020, 0x30caa: 0x6db9f220, 0x30cab: 0x6db9f420, + 0x30cac: 0x6db9f620, 0x30cad: 0x6db9f820, 0x30cae: 0x6db9fa20, 0x30caf: 0x6db9fc20, + 0x30cb0: 0x6db9fe20, 0x30cb1: 0x6dba0020, 0x30cb2: 0x6dba0220, 0x30cb3: 0x6dba0420, + 0x30cb4: 0x6dba0620, 0x30cb5: 0x6dba0820, 0x30cb6: 0x6dba0a20, 0x30cb7: 0x6dba0c20, + 0x30cb8: 0x6dba0e20, 0x30cb9: 0x6dba1020, 0x30cba: 0x6d97ec20, 0x30cbb: 0x6dba1220, + 0x30cbc: 0x6dba1420, 0x30cbd: 0x6dba1620, 0x30cbe: 0x6dba1820, 0x30cbf: 0x6dba1a20, + // Block 0xc33, offset 0x30cc0 + 0x30cc0: 0x6dba1c20, 0x30cc1: 0x6dba1e20, 0x30cc2: 0x6dba2020, 0x30cc3: 0x6dba2220, + 0x30cc4: 0x6dba2420, 0x30cc5: 0x6dba2620, 0x30cc6: 0x6dba2820, 0x30cc7: 0x6dba2a20, + 0x30cc8: 0x6dd7ee20, 0x30cc9: 0x6dd7f020, 0x30cca: 0x6dd7f220, 0x30ccb: 0x6dd7f420, + 0x30ccc: 0x6dd7f620, 0x30ccd: 0x6dd7f820, 0x30cce: 0x6dd7fa20, 0x30ccf: 0x6dd7fc20, + 0x30cd0: 0x6dd7fe20, 0x30cd1: 0x6dd80020, 0x30cd2: 0x6dd80220, 0x30cd3: 0x6dd80420, + 0x30cd4: 0x6dd80620, 0x30cd5: 0x6dd80820, 0x30cd6: 0x6dd80a20, 0x30cd7: 0x6dd80c20, + 0x30cd8: 0x6dd80e20, 0x30cd9: 0x6dd81020, 0x30cda: 0x6dd81220, 0x30cdb: 0x6dd81420, + 0x30cdc: 0x6dd81620, 0x30cdd: 0x6dd81820, 0x30cde: 0x6dd81a20, 0x30cdf: 0x6dd81c20, + 0x30ce0: 0x6dd81e20, 0x30ce1: 0x6dbaec20, 0x30ce2: 0x6dd82020, 0x30ce3: 0x6dd82220, + 0x30ce4: 0x6dd82420, 0x30ce5: 0x6dd82620, 0x30ce6: 0x6dd82820, 0x30ce7: 0x6dd82a20, + 0x30ce8: 0x6dd82c20, 0x30ce9: 0x6df06e20, 0x30cea: 0x6dd82e20, 0x30ceb: 0x6dd83020, + 0x30cec: 0x6dd83220, 0x30ced: 0x6dd83420, 0x30cee: 0x6dd83620, 0x30cef: 0x6dbaee20, + 0x30cf0: 0x6dd83820, 0x30cf1: 0x6dd83a20, 0x30cf2: 0x6dd83c20, 0x30cf3: 0x6dd83e20, + 0x30cf4: 0x6dd84020, 0x30cf5: 0x6dd84220, 0x30cf6: 0x6dd84420, 0x30cf7: 0x6dd84620, + 0x30cf8: 0x6dd84820, 0x30cf9: 0x6dd84a20, 0x30cfa: 0x6dd84c20, 0x30cfb: 0x6dd84e20, + 0x30cfc: 0x6dd85020, 0x30cfd: 0x6dd85220, 0x30cfe: 0x6dd85420, 0x30cff: 0x6dd85620, + // Block 0xc34, offset 0x30d00 + 0x30d00: 0x6df07020, 0x30d01: 0x6df07220, 0x30d02: 0x6df07420, 0x30d03: 0x6df07620, + 0x30d04: 0x6df07820, 0x30d05: 0x6df07a20, 0x30d06: 0x6df07c20, 0x30d07: 0x6df07e20, + 0x30d08: 0x6df08020, 0x30d09: 0x6df08220, 0x30d0a: 0x6df08420, 0x30d0b: 0x6df08620, + 0x30d0c: 0x6df08820, 0x30d0d: 0x6df08a20, 0x30d0e: 0x6df08c20, 0x30d0f: 0x6df08e20, + 0x30d10: 0x6df09020, 0x30d11: 0x6df09220, 0x30d12: 0x6df09420, 0x30d13: 0x6df09620, + 0x30d14: 0x6df09820, 0x30d15: 0x6df09a20, 0x30d16: 0x6df09c20, 0x30d17: 0x6df09e20, + 0x30d18: 0x6df0a020, 0x30d19: 0x6df0a220, 0x30d1a: 0x6df0a420, 0x30d1b: 0x6df0a620, + 0x30d1c: 0x6df0a820, 0x30d1d: 0x6df0aa20, 0x30d1e: 0x6df0ac20, 0x30d1f: 0x6df0ae20, + 0x30d20: 0x6df0b020, 0x30d21: 0x6df0b220, 0x30d22: 0x6df0b420, 0x30d23: 0x6df0b620, + 0x30d24: 0x6df0b820, 0x30d25: 0x6df0ba20, 0x30d26: 0x6df0bc20, 0x30d27: 0x6df0be20, + 0x30d28: 0x6df0c020, 0x30d29: 0x6df0c220, 0x30d2a: 0x6df0c420, 0x30d2b: 0x6df0c620, + 0x30d2c: 0x6df0c820, 0x30d2d: 0x6df0ca20, 0x30d2e: 0x6df0cc20, 0x30d2f: 0x6df0ce20, + 0x30d30: 0x6df0d020, 0x30d31: 0x6df0d220, 0x30d32: 0x6df0d420, 0x30d33: 0x6e047c20, + 0x30d34: 0x6e159420, 0x30d35: 0x6e047e20, 0x30d36: 0x6e048020, 0x30d37: 0x6e048220, + 0x30d38: 0x6e048420, 0x30d39: 0x6df0d620, 0x30d3a: 0x6e048620, 0x30d3b: 0x6e048820, + 0x30d3c: 0x6e048a20, 0x30d3d: 0x6e048c20, 0x30d3e: 0x6e048e20, 0x30d3f: 0x6e049020, + // Block 0xc35, offset 0x30d40 + 0x30d40: 0x6e049220, 0x30d41: 0x6e049420, 0x30d42: 0x6e049620, 0x30d43: 0x6e049820, + 0x30d44: 0x6e049a20, 0x30d45: 0x6e049c20, 0x30d46: 0x6e049e20, 0x30d47: 0x6e04a020, + 0x30d48: 0x6e04a220, 0x30d49: 0x6e04a420, 0x30d4a: 0x6e04a620, 0x30d4b: 0x6e04a820, + 0x30d4c: 0x6e04aa20, 0x30d4d: 0x6e04ac20, 0x30d4e: 0x6e04ae20, 0x30d4f: 0x6e04b020, + 0x30d50: 0x6e04b220, 0x30d51: 0x6e04b420, 0x30d52: 0x6e04b620, 0x30d53: 0x6e04b820, + 0x30d54: 0x6e04ba20, 0x30d55: 0x6e04bc20, 0x30d56: 0x6e04be20, 0x30d57: 0x6e04c020, + 0x30d58: 0x6e04c220, 0x30d59: 0x6e04c420, 0x30d5a: 0x6e04c620, 0x30d5b: 0x6e04c820, + 0x30d5c: 0x6e04ca20, 0x30d5d: 0x6e04cc20, 0x30d5e: 0x6e04ce20, 0x30d5f: 0x6e04d020, + 0x30d60: 0x6e04d220, 0x30d61: 0x6e04d420, 0x30d62: 0x6e04d620, 0x30d63: 0x6e04d820, + 0x30d64: 0x6e04da20, 0x30d65: 0x6e04dc20, 0x30d66: 0x6e04de20, 0x30d67: 0x6e04e020, + 0x30d68: 0x6e04e220, 0x30d69: 0x6e159620, 0x30d6a: 0x6e159820, 0x30d6b: 0x6e159a20, + 0x30d6c: 0x6e159c20, 0x30d6d: 0x6e159e20, 0x30d6e: 0x6e15a020, 0x30d6f: 0x6e058820, + 0x30d70: 0x6e15a220, 0x30d71: 0x6e15a420, 0x30d72: 0x6e15a620, 0x30d73: 0x6e15a820, + 0x30d74: 0x6e15aa20, 0x30d75: 0x6e15ac20, 0x30d76: 0x6e15ae20, 0x30d77: 0x6e15b020, + 0x30d78: 0x6e15b220, 0x30d79: 0x6e15b420, 0x30d7a: 0x6e15b620, 0x30d7b: 0x6e15b820, + 0x30d7c: 0x6e058a20, 0x30d7d: 0x6e15ba20, 0x30d7e: 0x6e15bc20, 0x30d7f: 0x6e15be20, + // Block 0xc36, offset 0x30d80 + 0x30d80: 0x6e15c020, 0x30d81: 0x6e15c220, 0x30d82: 0x6e231620, 0x30d83: 0x6e231820, + 0x30d84: 0x6e231a20, 0x30d85: 0x6e231c20, 0x30d86: 0x6e231e20, 0x30d87: 0x6e232020, + 0x30d88: 0x6e232220, 0x30d89: 0x6e232420, 0x30d8a: 0x6e232620, 0x30d8b: 0x6e232820, + 0x30d8c: 0x6e232a20, 0x30d8d: 0x6e232c20, 0x30d8e: 0x6e232e20, 0x30d8f: 0x6e233020, + 0x30d90: 0x6e233220, 0x30d91: 0x6e233420, 0x30d92: 0x6e233620, 0x30d93: 0x6e233820, + 0x30d94: 0x6e233a20, 0x30d95: 0x6e2d4620, 0x30d96: 0x6e2d4820, 0x30d97: 0x6e2d4a20, + 0x30d98: 0x6e2d4c20, 0x30d99: 0x6e2d4e20, 0x30d9a: 0x6e2d5020, 0x30d9b: 0x6e2d5220, + 0x30d9c: 0x6e2d5420, 0x30d9d: 0x6e2d5620, 0x30d9e: 0x6e2d5820, 0x30d9f: 0x6e2d5a20, + 0x30da0: 0x6e2d5c20, 0x30da1: 0x6e2d5e20, 0x30da2: 0x6e2d6020, 0x30da3: 0x6e2d6220, + 0x30da4: 0x6e2d6420, 0x30da5: 0x6e2d6620, 0x30da6: 0x6e2d6820, 0x30da7: 0x6e233c20, + 0x30da8: 0x6e351c20, 0x30da9: 0x6e351e20, 0x30daa: 0x6e352020, 0x30dab: 0x6e352220, + 0x30dac: 0x6e352420, 0x30dad: 0x6e3ab420, 0x30dae: 0x6e3ab620, 0x30daf: 0x6e3ab820, + 0x30db0: 0x6e3aba20, 0x30db1: 0x6e3abc20, 0x30db2: 0x6e3abe20, 0x30db3: 0x6e3ac020, + 0x30db4: 0x6e3e7620, 0x30db5: 0x6e3e7820, 0x30db6: 0x6e3e7a20, 0x30db7: 0x6e3e7c20, + 0x30db8: 0x6e3e7e20, 0x30db9: 0x6e3e8020, 0x30dba: 0x6e3e8220, 0x30dbb: 0x6e414020, + 0x30dbc: 0x6e414220, 0x30dbd: 0x6e414420, 0x30dbe: 0x6e414620, 0x30dbf: 0x6e434020, + // Block 0xc37, offset 0x30dc0 + 0x30dc0: 0x6e434220, 0x30dc1: 0x6e434420, 0x30dc2: 0x6e434620, 0x30dc3: 0x6e449420, + 0x30dc4: 0x6e449620, 0x30dc5: 0x6c0aaa20, 0x30dc6: 0x6c158c20, 0x30dc7: 0x6c158e20, + 0x30dc8: 0x6c27f220, 0x30dc9: 0x6c27f420, 0x30dca: 0x6c27f620, 0x30dcb: 0x6c27f820, + 0x30dcc: 0x6c27fa20, 0x30dcd: 0x6c41e020, 0x30dce: 0x6c41e220, 0x30dcf: 0x6c41e420, + 0x30dd0: 0x6c41e620, 0x30dd1: 0x6c41e820, 0x30dd2: 0x6c41ea20, 0x30dd3: 0x6c41ec20, + 0x30dd4: 0x6c41ee20, 0x30dd5: 0x6c41f020, 0x30dd6: 0x6c41f220, 0x30dd7: 0x6c41f420, + 0x30dd8: 0x6c626620, 0x30dd9: 0x6c626820, 0x30dda: 0x6c626a20, 0x30ddb: 0x6c626c20, + 0x30ddc: 0x6c626e20, 0x30ddd: 0x6c627020, 0x30dde: 0x6c627220, 0x30ddf: 0x6c627420, + 0x30de0: 0x6c627620, 0x30de1: 0x6c627820, 0x30de2: 0x6c627a20, 0x30de3: 0x6c627c20, + 0x30de4: 0x6c627e20, 0x30de5: 0x6c628020, 0x30de6: 0x6c628220, 0x30de7: 0x6c628420, + 0x30de8: 0x6c628620, 0x30de9: 0x6c628820, 0x30dea: 0x6c628a20, 0x30deb: 0x6c628c20, + 0x30dec: 0x6c628e20, 0x30ded: 0x6c629020, 0x30dee: 0x6c629220, 0x30def: 0x6c629420, + 0x30df0: 0x6c893420, 0x30df1: 0x6c893620, 0x30df2: 0x6c893820, 0x30df3: 0x6c893a20, + 0x30df4: 0x6c893c20, 0x30df5: 0x6c893e20, 0x30df6: 0x6c894020, 0x30df7: 0x6c894220, + 0x30df8: 0x6c894420, 0x30df9: 0x6c894620, 0x30dfa: 0x6c894820, 0x30dfb: 0x6c894a20, + 0x30dfc: 0x6c894c20, 0x30dfd: 0x6c894e20, 0x30dfe: 0x6c895020, 0x30dff: 0x6c895220, + // Block 0xc38, offset 0x30e00 + 0x30e00: 0x6c895420, 0x30e01: 0x6c895620, 0x30e02: 0x6c895820, 0x30e03: 0x6c895a20, + 0x30e04: 0x6c895c20, 0x30e05: 0x6c895e20, 0x30e06: 0x6c896020, 0x30e07: 0x6c896220, + 0x30e08: 0x6c896420, 0x30e09: 0x6c896620, 0x30e0a: 0x6c896820, 0x30e0b: 0x6c896a20, + 0x30e0c: 0x6c896c20, 0x30e0d: 0x6c896e20, 0x30e0e: 0x6c897020, 0x30e0f: 0x6cb52220, + 0x30e10: 0x6cb52420, 0x30e11: 0x6cb52620, 0x30e12: 0x6cb52820, 0x30e13: 0x6cb52a20, + 0x30e14: 0x6cb52c20, 0x30e15: 0x6cb52e20, 0x30e16: 0x6cb53020, 0x30e17: 0x6cb53220, + 0x30e18: 0x6cb53420, 0x30e19: 0x6cb53620, 0x30e1a: 0x6cb53820, 0x30e1b: 0x6cb53a20, + 0x30e1c: 0x6cb53c20, 0x30e1d: 0x6cb53e20, 0x30e1e: 0x6cb54020, 0x30e1f: 0x6cb54220, + 0x30e20: 0x6cb54420, 0x30e21: 0x6cb54620, 0x30e22: 0x6cb54820, 0x30e23: 0x6cb54a20, + 0x30e24: 0x6cb54c20, 0x30e25: 0x6cb54e20, 0x30e26: 0x6cb55020, 0x30e27: 0x6cb55220, + 0x30e28: 0x6cb55420, 0x30e29: 0x6cb55620, 0x30e2a: 0x6cb55820, 0x30e2b: 0x6cb55a20, + 0x30e2c: 0x6cb55c20, 0x30e2d: 0x6cb55e20, 0x30e2e: 0x6cb56020, 0x30e2f: 0x6cb56220, + 0x30e30: 0x6cb56420, 0x30e31: 0x6cb56620, 0x30e32: 0x6cb56820, 0x30e33: 0x6cb56a20, + 0x30e34: 0x6cb56c20, 0x30e35: 0x6cb56e20, 0x30e36: 0x6cb57020, 0x30e37: 0x6cb57220, + 0x30e38: 0x6ce52a20, 0x30e39: 0x6ce52c20, 0x30e3a: 0x6ce52e20, 0x30e3b: 0x6ce53020, + 0x30e3c: 0x6ce53220, 0x30e3d: 0x6ce53420, 0x30e3e: 0x6ce53620, 0x30e3f: 0x6ce53820, + // Block 0xc39, offset 0x30e40 + 0x30e40: 0x6ce53a20, 0x30e41: 0x6ce53c20, 0x30e42: 0x6ce53e20, 0x30e43: 0x6ce54020, + 0x30e44: 0x6ce54220, 0x30e45: 0x6ce54420, 0x30e46: 0x6ce54620, 0x30e47: 0x6ce54820, + 0x30e48: 0x6ce54a20, 0x30e49: 0x6ce54c20, 0x30e4a: 0x6ce54e20, 0x30e4b: 0x6ce55020, + 0x30e4c: 0x6ce55220, 0x30e4d: 0x6ce55420, 0x30e4e: 0x6ce55620, 0x30e4f: 0x6ce55820, + 0x30e50: 0x6ce55a20, 0x30e51: 0x6ce55c20, 0x30e52: 0x6ce55e20, 0x30e53: 0x6ce56020, + 0x30e54: 0x6ce56220, 0x30e55: 0x6ce56420, 0x30e56: 0x6d13a420, 0x30e57: 0x6d13a620, + 0x30e58: 0x6d13a820, 0x30e59: 0x6d13aa20, 0x30e5a: 0x6d13ac20, 0x30e5b: 0x6d13ae20, + 0x30e5c: 0x6d13b020, 0x30e5d: 0x6d13b220, 0x30e5e: 0x6d13b420, 0x30e5f: 0x6d13b620, + 0x30e60: 0x6d13b820, 0x30e61: 0x6d13ba20, 0x30e62: 0x6d13bc20, 0x30e63: 0x6d13be20, + 0x30e64: 0x6d13c020, 0x30e65: 0x6d13c220, 0x30e66: 0x6d13c420, 0x30e67: 0x6d13c620, + 0x30e68: 0x6d13c820, 0x30e69: 0x6d13ca20, 0x30e6a: 0x6d13cc20, 0x30e6b: 0x6d13ce20, + 0x30e6c: 0x6d13d020, 0x30e6d: 0x6d13d220, 0x30e6e: 0x6d13d420, 0x30e6f: 0x6d13d620, + 0x30e70: 0x6d13d820, 0x30e71: 0x6d13da20, 0x30e72: 0x6d41c420, 0x30e73: 0x6d41c620, + 0x30e74: 0x6d41c820, 0x30e75: 0x6d41ca20, 0x30e76: 0x6d41cc20, 0x30e77: 0x6d41ce20, + 0x30e78: 0x6d41d020, 0x30e79: 0x6d41d220, 0x30e7a: 0x6d41d420, 0x30e7b: 0x6d41d620, + 0x30e7c: 0x6d41d820, 0x30e7d: 0x6d41da20, 0x30e7e: 0x6d41dc20, 0x30e7f: 0x6d41de20, + // Block 0xc3a, offset 0x30e80 + 0x30e80: 0x6d41e020, 0x30e81: 0x6d41e220, 0x30e82: 0x6d41e420, 0x30e83: 0x6d41e620, + 0x30e84: 0x6d41e820, 0x30e85: 0x6d41ea20, 0x30e86: 0x6d6ed220, 0x30e87: 0x6d6ed420, + 0x30e88: 0x6d6ed620, 0x30e89: 0x6d6ed820, 0x30e8a: 0x6d6eda20, 0x30e8b: 0x6d6edc20, + 0x30e8c: 0x6d6ede20, 0x30e8d: 0x6d6ee020, 0x30e8e: 0x6d6ee220, 0x30e8f: 0x6d6ee420, + 0x30e90: 0x6d6ee620, 0x30e91: 0x6d6ee820, 0x30e92: 0x6d6eea20, 0x30e93: 0x6d6eec20, + 0x30e94: 0x6d6eee20, 0x30e95: 0x6d6ef020, 0x30e96: 0x6d97ee20, 0x30e97: 0x6d97f020, + 0x30e98: 0x6d97f220, 0x30e99: 0x6d97f420, 0x30e9a: 0x6d97f620, 0x30e9b: 0x6d97f820, + 0x30e9c: 0x6d97fa20, 0x30e9d: 0x6d97fc20, 0x30e9e: 0x6d97fe20, 0x30e9f: 0x6d980020, + 0x30ea0: 0x6d980220, 0x30ea1: 0x6dbaf020, 0x30ea2: 0x6dbaf220, 0x30ea3: 0x6dbaf420, + 0x30ea4: 0x6dbaf620, 0x30ea5: 0x6dbaf820, 0x30ea6: 0x6dbafa20, 0x30ea7: 0x6dbafc20, + 0x30ea8: 0x6dbafe20, 0x30ea9: 0x6dbb0020, 0x30eaa: 0x6dbb0220, 0x30eab: 0x6dbb0420, + 0x30eac: 0x6dd8fc20, 0x30ead: 0x6dd8fe20, 0x30eae: 0x6dd90020, 0x30eaf: 0x6dd90220, + 0x30eb0: 0x6dd90420, 0x30eb1: 0x6dd90620, 0x30eb2: 0x6df15e20, 0x30eb3: 0x6e059220, + 0x30eb4: 0x6e059420, 0x30eb5: 0x6e239420, 0x30eb6: 0x6e239620, 0x30eb7: 0x6c41fe20, + 0x30eb8: 0x6c420020, 0x30eb9: 0x6cb58a20, 0x30eba: 0x6cb58c20, 0x30ebb: 0x6ce57220, + 0x30ebc: 0x6d6f0020, 0x30ebd: 0x6df16620, 0x30ebe: 0x6e239820, 0x30ebf: 0x6c0aac20, + // Block 0xc3b, offset 0x30ec0 + 0x30ec0: 0x6c420220, 0x30ec1: 0x6c62ac20, 0x30ec2: 0x6c62ae20, 0x30ec3: 0x6c898420, + 0x30ec4: 0x6c898620, 0x30ec5: 0x6c898820, 0x30ec6: 0x6cb5aa20, 0x30ec7: 0x6cb5ac20, + 0x30ec8: 0x6cb5ae20, 0x30ec9: 0x6cb5b020, 0x30eca: 0x6cb5b220, 0x30ecb: 0x6ce59420, + 0x30ecc: 0x6ce59620, 0x30ecd: 0x6ce59820, 0x30ece: 0x6ce59a20, 0x30ecf: 0x6ce59c20, + 0x30ed0: 0x6ce59e20, 0x30ed1: 0x6ce5a020, 0x30ed2: 0x6ce5a220, 0x30ed3: 0x6ce5a420, + 0x30ed4: 0x6ce5a620, 0x30ed5: 0x6ce5a820, 0x30ed6: 0x6ce5aa20, 0x30ed7: 0x6ce5ac20, + 0x30ed8: 0x6d141e20, 0x30ed9: 0x6d142020, 0x30eda: 0x6d142220, 0x30edb: 0x6d142420, + 0x30edc: 0x6d142620, 0x30edd: 0x6d142820, 0x30ede: 0x6d142a20, 0x30edf: 0x6d142c20, + 0x30ee0: 0x6d142e20, 0x30ee1: 0x6d421a20, 0x30ee2: 0x6d421c20, 0x30ee3: 0x6d421e20, + 0x30ee4: 0x6d422020, 0x30ee5: 0x6d422220, 0x30ee6: 0x6d422420, 0x30ee7: 0x6d422620, + 0x30ee8: 0x6d422820, 0x30ee9: 0x6d422a20, 0x30eea: 0x6d422c20, 0x30eeb: 0x6d6f2420, + 0x30eec: 0x6d6f2620, 0x30eed: 0x6d6f2820, 0x30eee: 0x6d6f2a20, 0x30eef: 0x6d6f2c20, + 0x30ef0: 0x6d6f2e20, 0x30ef1: 0x6d6f3020, 0x30ef2: 0x6d6f3220, 0x30ef3: 0x6d6f3420, + 0x30ef4: 0x6d6f3620, 0x30ef5: 0x6d983620, 0x30ef6: 0x6d983820, 0x30ef7: 0x6dbb3420, + 0x30ef8: 0x6d983a20, 0x30ef9: 0x6d983c20, 0x30efa: 0x6d983e20, 0x30efb: 0x6d984020, + 0x30efc: 0x6d984220, 0x30efd: 0x6d984420, 0x30efe: 0x6d984620, 0x30eff: 0x6d984820, + // Block 0xc3c, offset 0x30f00 + 0x30f00: 0x6dbb2420, 0x30f01: 0x6d984a20, 0x30f02: 0x6d984c20, 0x30f03: 0x6dbb3620, + 0x30f04: 0x6dbb3820, 0x30f05: 0x6dbb3a20, 0x30f06: 0x6dbb3c20, 0x30f07: 0x6dbb3e20, + 0x30f08: 0x6dbb4020, 0x30f09: 0x6dbb4220, 0x30f0a: 0x6dbb4420, 0x30f0b: 0x6dbb4620, + 0x30f0c: 0x6dbb4820, 0x30f0d: 0x6d988e20, 0x30f0e: 0x6dbb4a20, 0x30f0f: 0x6dbb4c20, + 0x30f10: 0x6dd92020, 0x30f11: 0x6dd92220, 0x30f12: 0x6dd92420, 0x30f13: 0x6dd92620, + 0x30f14: 0x6dd92820, 0x30f15: 0x6dd92a20, 0x30f16: 0x6dd92c20, 0x30f17: 0x6dd92e20, + 0x30f18: 0x6dd93020, 0x30f19: 0x6df17620, 0x30f1a: 0x6df17820, 0x30f1b: 0x6df17a20, + 0x30f1c: 0x6df17c20, 0x30f1d: 0x6df17e20, 0x30f1e: 0x6e05a220, 0x30f1f: 0x6e05a420, + 0x30f20: 0x6e05a620, 0x30f21: 0x6e05a820, 0x30f22: 0x6e165c20, 0x30f23: 0x6e165e20, + 0x30f24: 0x6e166020, 0x30f25: 0x6e166220, 0x30f26: 0x6e166420, 0x30f27: 0x6e23a620, + 0x30f28: 0x6c020a20, 0x30f29: 0x6c052620, 0x30f2a: 0x6c0aae20, 0x30f2b: 0x6c159020, + 0x30f2c: 0x6c159220, 0x30f2d: 0x6c159420, 0x30f2e: 0x6c159620, 0x30f2f: 0x6c159820, + 0x30f30: 0x6c280420, 0x30f31: 0x6c280620, 0x30f32: 0x6c280820, 0x30f33: 0x6c280a20, + 0x30f34: 0x6c280c20, 0x30f35: 0x6c280e20, 0x30f36: 0x6c281020, 0x30f37: 0x6c281220, + 0x30f38: 0x6c420820, 0x30f39: 0x6c420a20, 0x30f3a: 0x6c62b420, 0x30f3b: 0x6c62b620, + 0x30f3c: 0x6c62b820, 0x30f3d: 0x6c62ba20, 0x30f3e: 0x6c62bc20, 0x30f3f: 0x6c62be20, + // Block 0xc3d, offset 0x30f40 + 0x30f40: 0x6c62c020, 0x30f41: 0x6c62c220, 0x30f42: 0x6c62c420, 0x30f43: 0x6c899620, + 0x30f44: 0x6c899820, 0x30f45: 0x6c899a20, 0x30f46: 0x6c899c20, 0x30f47: 0x6cb5c420, + 0x30f48: 0x6cb5c620, 0x30f49: 0x6cb5c820, 0x30f4a: 0x6cb5ca20, 0x30f4b: 0x6cb5cc20, + 0x30f4c: 0x6cb5ce20, 0x30f4d: 0x6cb5d020, 0x30f4e: 0x6cb5d220, 0x30f4f: 0x6cb5d420, + 0x30f50: 0x6cb5d620, 0x30f51: 0x6ce5ea20, 0x30f52: 0x6ce5ec20, 0x30f53: 0x6ce5ee20, + 0x30f54: 0x6ce5f020, 0x30f55: 0x6ce5f220, 0x30f56: 0x6d146e20, 0x30f57: 0x6d147020, + 0x30f58: 0x6d147220, 0x30f59: 0x6d147420, 0x30f5a: 0x6d426420, 0x30f5b: 0x6d989020, + 0x30f5c: 0x6c421020, 0x30f5d: 0x6c020c20, 0x30f5e: 0x6c0ab420, 0x30f5f: 0x6c0ab620, + 0x30f60: 0x6c15a420, 0x30f61: 0x6c15a620, 0x30f62: 0x6c15a820, 0x30f63: 0x6c15aa20, + 0x30f64: 0x6c15ac20, 0x30f65: 0x6c282620, 0x30f66: 0x6c282820, 0x30f67: 0x6c282a20, + 0x30f68: 0x6c282c20, 0x30f69: 0x6c282e20, 0x30f6a: 0x6c283020, 0x30f6b: 0x6c283220, + 0x30f6c: 0x6c283420, 0x30f6d: 0x6c283620, 0x30f6e: 0x6c283820, 0x30f6f: 0x6c283a20, + 0x30f70: 0x6c283c20, 0x30f71: 0x6c283e20, 0x30f72: 0x6c284020, 0x30f73: 0x6c284220, + 0x30f74: 0x6c284420, 0x30f75: 0x6c284620, 0x30f76: 0x6c284820, 0x30f77: 0x6c421820, + 0x30f78: 0x6c421a20, 0x30f79: 0x6c421c20, 0x30f7a: 0x6c421e20, 0x30f7b: 0x6c422020, + 0x30f7c: 0x6c422220, 0x30f7d: 0x6c422420, 0x30f7e: 0x6c422620, 0x30f7f: 0x6c422820, + // Block 0xc3e, offset 0x30f80 + 0x30f80: 0x6c422a20, 0x30f81: 0x6c422c20, 0x30f82: 0x6c422e20, 0x30f83: 0x6c423020, + 0x30f84: 0x6c423220, 0x30f85: 0x6c423420, 0x30f86: 0x6c423620, 0x30f87: 0x6c423820, + 0x30f88: 0x6c423a20, 0x30f89: 0x6c423c20, 0x30f8a: 0x6c62d620, 0x30f8b: 0x6c62d820, + 0x30f8c: 0x6c62da20, 0x30f8d: 0x6c62dc20, 0x30f8e: 0x6c62de20, 0x30f8f: 0x6c62e020, + 0x30f90: 0x6c62e220, 0x30f91: 0x6c62e420, 0x30f92: 0x6c62e620, 0x30f93: 0x6c62e820, + 0x30f94: 0x6c62ea20, 0x30f95: 0x6c62ec20, 0x30f96: 0x6c89b220, 0x30f97: 0x6c89b420, + 0x30f98: 0x6c89b620, 0x30f99: 0x6c89b820, 0x30f9a: 0x6c89d820, 0x30f9b: 0x6c89ba20, + 0x30f9c: 0x6c89bc20, 0x30f9d: 0x6c89be20, 0x30f9e: 0x6c89c020, 0x30f9f: 0x6c89c220, + 0x30fa0: 0x6c89c420, 0x30fa1: 0x6c89c620, 0x30fa2: 0x6c89c820, 0x30fa3: 0x6c89ca20, + 0x30fa4: 0x6c89cc20, 0x30fa5: 0x6c89ce20, 0x30fa6: 0x6c89d020, 0x30fa7: 0x6c89d220, + 0x30fa8: 0x6c89d420, 0x30fa9: 0x6c89d620, 0x30faa: 0x6cb5e820, 0x30fab: 0x6cb5ea20, + 0x30fac: 0x6cb5ec20, 0x30fad: 0x6cb5ee20, 0x30fae: 0x6cb5f020, 0x30faf: 0x6cb5f220, + 0x30fb0: 0x6cb5f420, 0x30fb1: 0x6cb5f620, 0x30fb2: 0x6ce5fa20, 0x30fb3: 0x6cb5f820, + 0x30fb4: 0x6cb5fa20, 0x30fb5: 0x6cb5fc20, 0x30fb6: 0x6cb5fe20, 0x30fb7: 0x6cb60020, + 0x30fb8: 0x6cb60220, 0x30fb9: 0x6cb60420, 0x30fba: 0x6cb60620, 0x30fbb: 0x6ce60220, + 0x30fbc: 0x6cb60820, 0x30fbd: 0x6ce60420, 0x30fbe: 0x6ce60620, 0x30fbf: 0x6ce60820, + // Block 0xc3f, offset 0x30fc0 + 0x30fc0: 0x6ce60a20, 0x30fc1: 0x6ce60c20, 0x30fc2: 0x6ce60e20, 0x30fc3: 0x6ce61020, + 0x30fc4: 0x6ce61220, 0x30fc5: 0x6ce61420, 0x30fc6: 0x6ce61620, 0x30fc7: 0x6ce61820, + 0x30fc8: 0x6ce61a20, 0x30fc9: 0x6ce61c20, 0x30fca: 0x6ce61e20, 0x30fcb: 0x6ce62020, + 0x30fcc: 0x6ce62220, 0x30fcd: 0x6ce62420, 0x30fce: 0x6ce62620, 0x30fcf: 0x6d147e20, + 0x30fd0: 0x6ce62820, 0x30fd1: 0x6d148c20, 0x30fd2: 0x6d148e20, 0x30fd3: 0x6d149020, + 0x30fd4: 0x6d149220, 0x30fd5: 0x6d149420, 0x30fd6: 0x6d149620, 0x30fd7: 0x6d149820, + 0x30fd8: 0x6d149a20, 0x30fd9: 0x6d426a20, 0x30fda: 0x6d427420, 0x30fdb: 0x6d427620, + 0x30fdc: 0x6d427820, 0x30fdd: 0x6d427a20, 0x30fde: 0x6d427c20, 0x30fdf: 0x6d427e20, + 0x30fe0: 0x6d428020, 0x30fe1: 0x6d428220, 0x30fe2: 0x6d6f9020, 0x30fe3: 0x6d6f9220, + 0x30fe4: 0x6d6f9420, 0x30fe5: 0x6d6f9620, 0x30fe6: 0x6d989820, 0x30fe7: 0x6d989a20, + 0x30fe8: 0x6d989c20, 0x30fe9: 0x6d989e20, 0x30fea: 0x6d98a020, 0x30feb: 0x6d98a220, + 0x30fec: 0x6dbb9220, 0x30fed: 0x6dbb9420, 0x30fee: 0x6dbb9620, 0x30fef: 0x6dbb9820, + 0x30ff0: 0x6dbb9a20, 0x30ff1: 0x6dbb9c20, 0x30ff2: 0x6dbb9e20, 0x30ff3: 0x6dd96a20, + 0x30ff4: 0x6df1a420, 0x30ff5: 0x6e05dc20, 0x30ff6: 0x6c427220, 0x30ff7: 0x6d98c020, + 0x30ff8: 0x6dbbb220, 0x30ff9: 0x6c427420, 0x30ffa: 0x6c8a3220, 0x30ffb: 0x6c8a3420, + 0x30ffc: 0x6c8a3620, 0x30ffd: 0x6c8a3820, 0x30ffe: 0x6c8a3a20, 0x30fff: 0x6cb66420, + // Block 0xc40, offset 0x31000 + 0x31000: 0x6cb66620, 0x31001: 0x6ce69020, 0x31002: 0x6ce69220, 0x31003: 0x6ce69420, + 0x31004: 0x6ce69620, 0x31005: 0x6ce69820, 0x31006: 0x6ce69a20, 0x31007: 0x6ce69c20, + 0x31008: 0x6ce69e20, 0x31009: 0x6d14e820, 0x3100a: 0x6d14ea20, 0x3100b: 0x6d14ec20, + 0x3100c: 0x6d42ce20, 0x3100d: 0x6d14ee20, 0x3100e: 0x6d14f020, 0x3100f: 0x6d14f220, + 0x31010: 0x6d42d220, 0x31011: 0x6d42d420, 0x31012: 0x6d42d620, 0x31013: 0x6d6fd020, + 0x31014: 0x6d98cc20, 0x31015: 0x6d98ce20, 0x31016: 0x6dbbba20, 0x31017: 0x6dd98c20, + 0x31018: 0x6dd98e20, 0x31019: 0x6dd99020, 0x3101a: 0x6dd99220, 0x3101b: 0x6dd99420, + 0x3101c: 0x6dd99620, 0x3101d: 0x6dd99820, 0x3101e: 0x6dd99a20, 0x3101f: 0x6dd99c20, + 0x31020: 0x6dd99e20, 0x31021: 0x6df1b020, 0x31022: 0x6dd9bc20, 0x31023: 0x6df1b220, + 0x31024: 0x6e169620, 0x31025: 0x6e358020, 0x31026: 0x6e358220, 0x31027: 0x6e435c20, + 0x31028: 0x6c427820, 0x31029: 0x6cb67e20, 0x3102a: 0x6cb68020, 0x3102b: 0x6cb68220, + 0x3102c: 0x6ce6c220, 0x3102d: 0x6ce6c420, 0x3102e: 0x6ce6c620, 0x3102f: 0x6ce6c820, + 0x31030: 0x6ce6ca20, 0x31031: 0x6ce6cc20, 0x31032: 0x6ce6ce20, 0x31033: 0x6ce6d020, + 0x31034: 0x6d151a20, 0x31035: 0x6d151c20, 0x31036: 0x6d151e20, 0x31037: 0x6d152020, + 0x31038: 0x6d152220, 0x31039: 0x6d152420, 0x3103a: 0x6d152620, 0x3103b: 0x6d152820, + 0x3103c: 0x6d152a20, 0x3103d: 0x6d152c20, 0x3103e: 0x6d152e20, 0x3103f: 0x6d431c20, + // Block 0xc41, offset 0x31040 + 0x31040: 0x6d431e20, 0x31041: 0x6d432020, 0x31042: 0x6d700220, 0x31043: 0x6d700420, + 0x31044: 0x6d700620, 0x31045: 0x6d700820, 0x31046: 0x6d700a20, 0x31047: 0x6d700c20, + 0x31048: 0x6d700e20, 0x31049: 0x6d701020, 0x3104a: 0x6d701220, 0x3104b: 0x6d991620, + 0x3104c: 0x6d991820, 0x3104d: 0x6d991a20, 0x3104e: 0x6d991c20, 0x3104f: 0x6d991e20, + 0x31050: 0x6d992020, 0x31051: 0x6d992220, 0x31052: 0x6d992420, 0x31053: 0x6d992620, + 0x31054: 0x6d992820, 0x31055: 0x6d992a20, 0x31056: 0x6d992c20, 0x31057: 0x6d992e20, + 0x31058: 0x6dbbfa20, 0x31059: 0x6dbbfc20, 0x3105a: 0x6dbbfe20, 0x3105b: 0x6dbc0020, + 0x3105c: 0x6dbc0220, 0x3105d: 0x6dbc0420, 0x3105e: 0x6dbc0620, 0x3105f: 0x6dbc0820, + 0x31060: 0x6dbc0a20, 0x31061: 0x6dbc5220, 0x31062: 0x6dd9ca20, 0x31063: 0x6dd9cc20, + 0x31064: 0x6dd9ce20, 0x31065: 0x6dd9d020, 0x31066: 0x6df1de20, 0x31067: 0x6df1e020, + 0x31068: 0x6df1e220, 0x31069: 0x6df1e420, 0x3106a: 0x6df1e620, 0x3106b: 0x6df1e820, + 0x3106c: 0x6df1ea20, 0x3106d: 0x6df1ec20, 0x3106e: 0x6e061e20, 0x3106f: 0x6e062020, + 0x31070: 0x6e062220, 0x31071: 0x6e062420, 0x31072: 0x6e16b020, 0x31073: 0x6e062620, + 0x31074: 0x6e062820, 0x31075: 0x6e16b220, 0x31076: 0x6e16b420, 0x31077: 0x6e16b620, + 0x31078: 0x6e16b820, 0x31079: 0x6e16ba20, 0x3107a: 0x6e16bc20, 0x3107b: 0x6e16be20, + 0x3107c: 0x6e23d820, 0x3107d: 0x6e23da20, 0x3107e: 0x6e23dc20, 0x3107f: 0x6e23de20, + // Block 0xc42, offset 0x31080 + 0x31080: 0x6e23e020, 0x31081: 0x6e2dea20, 0x31082: 0x6e359020, 0x31083: 0x6e359220, + 0x31084: 0x6e359420, 0x31085: 0x6e359620, 0x31086: 0x6e359820, 0x31087: 0x6e359a20, + 0x31088: 0x6e359c20, 0x31089: 0x6e3b0420, 0x3108a: 0x6e3ec220, 0x3108b: 0x6e416820, + 0x3108c: 0x6e416a20, 0x3108d: 0x6e416c20, 0x3108e: 0x6e416e20, 0x3108f: 0x6e44a620, + 0x31090: 0x6e472220, 0x31091: 0x6c427a20, 0x31092: 0x6c427c20, 0x31093: 0x6ce6f620, + 0x31094: 0x6ce6f820, 0x31095: 0x6d155420, 0x31096: 0x6d155620, 0x31097: 0x6d435020, + 0x31098: 0x6d435220, 0x31099: 0x6d435420, 0x3109a: 0x6d704e20, 0x3109b: 0x6d997a20, + 0x3109c: 0x6d997c20, 0x3109d: 0x6dda1c20, 0x3109e: 0x6c427e20, 0x3109f: 0x6ce70020, + 0x310a0: 0x6d705220, 0x310a1: 0x6df23a20, 0x310a2: 0x6c632e20, 0x310a3: 0x6c428020, + 0x310a4: 0x6d436220, 0x310a5: 0x6d705c20, 0x310a6: 0x6d998a20, 0x310a7: 0x6e16f420, + 0x310a8: 0x6e2dfe20, 0x310a9: 0x6c633220, 0x310aa: 0x6cb6a820, 0x310ab: 0x6ce71e20, + 0x310ac: 0x6ce72020, 0x310ad: 0x6ce72220, 0x310ae: 0x6ce72420, 0x310af: 0x6ce72620, + 0x310b0: 0x6ce72820, 0x310b1: 0x6ce72a20, 0x310b2: 0x6d158820, 0x310b3: 0x6d158a20, + 0x310b4: 0x6d158c20, 0x310b5: 0x6d158e20, 0x310b6: 0x6d159020, 0x310b7: 0x6d159220, + 0x310b8: 0x6d159420, 0x310b9: 0x6d159620, 0x310ba: 0x6d438a20, 0x310bb: 0x6d438c20, + 0x310bc: 0x6d438e20, 0x310bd: 0x6d439020, 0x310be: 0x6d439220, 0x310bf: 0x6d439420, + // Block 0xc43, offset 0x310c0 + 0x310c0: 0x6d439620, 0x310c1: 0x6d439820, 0x310c2: 0x6d439a20, 0x310c3: 0x6d439c20, + 0x310c4: 0x6d439e20, 0x310c5: 0x6d43a020, 0x310c6: 0x6d43a220, 0x310c7: 0x6d707420, + 0x310c8: 0x6d707620, 0x310c9: 0x6d707820, 0x310ca: 0x6d707a20, 0x310cb: 0x6d707c20, + 0x310cc: 0x6d707e20, 0x310cd: 0x6d708020, 0x310ce: 0x6d708220, 0x310cf: 0x6d708420, + 0x310d0: 0x6d708620, 0x310d1: 0x6d708820, 0x310d2: 0x6d708a20, 0x310d3: 0x6d99b220, + 0x310d4: 0x6d99b420, 0x310d5: 0x6d99b620, 0x310d6: 0x6d99b820, 0x310d7: 0x6d99ba20, + 0x310d8: 0x6d99bc20, 0x310d9: 0x6d99be20, 0x310da: 0x6dbc7420, 0x310db: 0x6dbc7620, + 0x310dc: 0x6dbc7820, 0x310dd: 0x6dbc7a20, 0x310de: 0x6dbc7c20, 0x310df: 0x6dbc7e20, + 0x310e0: 0x6dbc8020, 0x310e1: 0x6dbc8220, 0x310e2: 0x6dda3e20, 0x310e3: 0x6dda4020, + 0x310e4: 0x6dda4220, 0x310e5: 0x6dda4420, 0x310e6: 0x6dda4620, 0x310e7: 0x6dda4820, + 0x310e8: 0x6dda4a20, 0x310e9: 0x6dda4c20, 0x310ea: 0x6dda4e20, 0x310eb: 0x6dda5020, + 0x310ec: 0x6dda5220, 0x310ed: 0x6dda5420, 0x310ee: 0x6dda5620, 0x310ef: 0x6dda5820, + 0x310f0: 0x6dda5a20, 0x310f1: 0x6df24e20, 0x310f2: 0x6df25020, 0x310f3: 0x6df25220, + 0x310f4: 0x6df25420, 0x310f5: 0x6df25620, 0x310f6: 0x6df25820, 0x310f7: 0x6df25a20, + 0x310f8: 0x6e069020, 0x310f9: 0x6e069220, 0x310fa: 0x6e069420, 0x310fb: 0x6e069620, + 0x310fc: 0x6e171620, 0x310fd: 0x6e171820, 0x310fe: 0x6e171a20, 0x310ff: 0x6e171c20, + // Block 0xc44, offset 0x31100 + 0x31100: 0x6e241820, 0x31101: 0x6e241a20, 0x31102: 0x6e241c20, 0x31103: 0x6e241e20, + 0x31104: 0x6e2e0e20, 0x31105: 0x6e2e1020, 0x31106: 0x6e35bc20, 0x31107: 0x6e35be20, + 0x31108: 0x6e35c020, 0x31109: 0x6e3ee020, 0x3110a: 0x6e456e20, 0x3110b: 0x6c633420, + 0x3110c: 0x6ce73420, 0x3110d: 0x6d43e020, 0x3110e: 0x6d43e220, 0x3110f: 0x6d70c220, + 0x31110: 0x6d70c420, 0x31111: 0x6d70c620, 0x31112: 0x6d99ee20, 0x31113: 0x6dbcc620, + 0x31114: 0x6dbcc820, 0x31115: 0x6dbcca20, 0x31116: 0x6ddaaa20, 0x31117: 0x6ddaac20, + 0x31118: 0x6ddaae20, 0x31119: 0x6ddab020, 0x3111a: 0x6ddab220, 0x3111b: 0x6e06d420, + 0x3111c: 0x6df2a820, 0x3111d: 0x6df2aa20, 0x3111e: 0x6df2ac20, 0x3111f: 0x6df2ae20, + 0x31120: 0x6e06d620, 0x31121: 0x6e174220, 0x31122: 0x6e174420, 0x31123: 0x6e244820, + 0x31124: 0x6e35ce20, 0x31125: 0x6e35d020, 0x31126: 0x6c053420, 0x31127: 0x6c287c20, + 0x31128: 0x6c633620, 0x31129: 0x6ce73820, 0x3112a: 0x6d15d420, 0x3112b: 0x6d15d620, + 0x3112c: 0x6d43fc20, 0x3112d: 0x6c633c20, 0x3112e: 0x6d15e020, 0x3112f: 0x6d70e220, + 0x31130: 0x6d9a0420, 0x31131: 0x6dbcea20, 0x31132: 0x6df2c620, 0x31133: 0x6c633e20, + 0x31134: 0x6d15e820, 0x31135: 0x6d15ea20, 0x31136: 0x6d440420, 0x31137: 0x6d440620, + 0x31138: 0x6d9a0c20, 0x31139: 0x6ddacc20, 0x3113a: 0x6ddace20, 0x3113b: 0x6df2d020, + 0x3113c: 0x6df2d220, 0x3113d: 0x6e06f220, 0x3113e: 0x6e06f420, 0x3113f: 0x6e06f620, + // Block 0xc45, offset 0x31140 + 0x31140: 0x6e2e3c20, 0x31141: 0x6c634020, 0x31142: 0x6cb6b220, 0x31143: 0x6cb6b420, + 0x31144: 0x6cb6b620, 0x31145: 0x6ce74820, 0x31146: 0x6ce74a20, 0x31147: 0x6ce74c20, + 0x31148: 0x6ce74e20, 0x31149: 0x6d15f220, 0x3114a: 0x6d15fa20, 0x3114b: 0x6d15fc20, + 0x3114c: 0x6d15fe20, 0x3114d: 0x6d160020, 0x3114e: 0x6d160220, 0x3114f: 0x6d160420, + 0x31150: 0x6d160620, 0x31151: 0x6d160820, 0x31152: 0x6d160a20, 0x31153: 0x6d160c20, + 0x31154: 0x6d442620, 0x31155: 0x6d442820, 0x31156: 0x6d442a20, 0x31157: 0x6d442c20, + 0x31158: 0x6d442e20, 0x31159: 0x6d441220, 0x3115a: 0x6d443020, 0x3115b: 0x6d710020, + 0x3115c: 0x6d710220, 0x3115d: 0x6d710420, 0x3115e: 0x6d710620, 0x3115f: 0x6d710820, + 0x31160: 0x6d710a20, 0x31161: 0x6d710c20, 0x31162: 0x6d710e20, 0x31163: 0x6d711020, + 0x31164: 0x6d9a2a20, 0x31165: 0x6d9a2c20, 0x31166: 0x6d711220, 0x31167: 0x6d711420, + 0x31168: 0x6d711620, 0x31169: 0x6d711820, 0x3116a: 0x6d711a20, 0x3116b: 0x6d711c20, + 0x3116c: 0x6d711e20, 0x3116d: 0x6d9a2e20, 0x3116e: 0x6d9a3020, 0x3116f: 0x6d9a3220, + 0x31170: 0x6d9a3420, 0x31171: 0x6d9a3620, 0x31172: 0x6d9a3820, 0x31173: 0x6d9a3a20, + 0x31174: 0x6d9a3c20, 0x31175: 0x6d9a3e20, 0x31176: 0x6d9a4020, 0x31177: 0x6d9a4220, + 0x31178: 0x6d9a4420, 0x31179: 0x6d9a4620, 0x3117a: 0x6d9a4820, 0x3117b: 0x6d9a4a20, + 0x3117c: 0x6d9a4c20, 0x3117d: 0x6d9a4e20, 0x3117e: 0x6ddaf020, 0x3117f: 0x6ddada20, + // Block 0xc46, offset 0x31180 + 0x31180: 0x6dbd0c20, 0x31181: 0x6dbd0e20, 0x31182: 0x6dbd1020, 0x31183: 0x6dbd1220, + 0x31184: 0x6dbd1420, 0x31185: 0x6dbd1620, 0x31186: 0x6dbd1820, 0x31187: 0x6dbd1a20, + 0x31188: 0x6dbd1c20, 0x31189: 0x6dbd1e20, 0x3118a: 0x6dbd2020, 0x3118b: 0x6ddaf220, + 0x3118c: 0x6ddaf420, 0x3118d: 0x6ddaf620, 0x3118e: 0x6ddaf820, 0x3118f: 0x6ddafa20, + 0x31190: 0x6ddafc20, 0x31191: 0x6ddafe20, 0x31192: 0x6ddb0020, 0x31193: 0x6ddb0220, + 0x31194: 0x6ddb0420, 0x31195: 0x6ddb0620, 0x31196: 0x6df2f020, 0x31197: 0x6df2f220, + 0x31198: 0x6df2f420, 0x31199: 0x6df2f620, 0x3119a: 0x6df2f820, 0x3119b: 0x6df2fa20, + 0x3119c: 0x6df2fc20, 0x3119d: 0x6df2fe20, 0x3119e: 0x6df30020, 0x3119f: 0x6e070e20, + 0x311a0: 0x6e071020, 0x311a1: 0x6e071220, 0x311a2: 0x6e071420, 0x311a3: 0x6e071620, + 0x311a4: 0x6e177220, 0x311a5: 0x6e177420, 0x311a6: 0x6e177620, 0x311a7: 0x6e177820, + 0x311a8: 0x6e177a20, 0x311a9: 0x6e246e20, 0x311aa: 0x6e247020, 0x311ab: 0x6e247220, + 0x311ac: 0x6e2e4020, 0x311ad: 0x6e2e4220, 0x311ae: 0x6e2e4420, 0x311af: 0x6e2e4620, + 0x311b0: 0x6e35de20, 0x311b1: 0x6e3b3820, 0x311b2: 0x6e3b3a20, 0x311b3: 0x6e418220, + 0x311b4: 0x6e418420, 0x311b5: 0x6c15d220, 0x311b6: 0x6c428620, 0x311b7: 0x6c428820, + 0x311b8: 0x6c634420, 0x311b9: 0x6c634620, 0x311ba: 0x6c634820, 0x311bb: 0x6c634a20, + 0x311bc: 0x6c8a5220, 0x311bd: 0x6c8a5420, 0x311be: 0x6c8a5620, 0x311bf: 0x6c8a5820, + // Block 0xc47, offset 0x311c0 + 0x311c0: 0x6c8a5a20, 0x311c1: 0x6c8a5c20, 0x311c2: 0x6c8a5e20, 0x311c3: 0x6c8a6020, + 0x311c4: 0x6c8a6220, 0x311c5: 0x6cb6c020, 0x311c6: 0x6cb6c220, 0x311c7: 0x6cb6c420, + 0x311c8: 0x6cb6c620, 0x311c9: 0x6ce76220, 0x311ca: 0x6ce76420, 0x311cb: 0x6ce76620, + 0x311cc: 0x6ce76820, 0x311cd: 0x6ce76a20, 0x311ce: 0x6ce76c20, 0x311cf: 0x6ce76e20, + 0x311d0: 0x6d163e20, 0x311d1: 0x6d164020, 0x311d2: 0x6d164220, 0x311d3: 0x6d164420, + 0x311d4: 0x6d164620, 0x311d5: 0x6d164820, 0x311d6: 0x6d164a20, 0x311d7: 0x6d447220, + 0x311d8: 0x6d715e20, 0x311d9: 0x6d716020, 0x311da: 0x6d716220, 0x311db: 0x6d716420, + 0x311dc: 0x6d716620, 0x311dd: 0x6d716820, 0x311de: 0x6d9ab220, 0x311df: 0x6d9ab420, + 0x311e0: 0x6d9ab620, 0x311e1: 0x6d9ab820, 0x311e2: 0x6ddb3e20, 0x311e3: 0x6ddb4020, + 0x311e4: 0x6df33820, 0x311e5: 0x6e074820, 0x311e6: 0x6e17aa20, 0x311e7: 0x6e2e6c20, + 0x311e8: 0x6c634e20, 0x311e9: 0x6ce77a20, 0x311ea: 0x6ce77c20, 0x311eb: 0x6d165820, + 0x311ec: 0x6d165a20, 0x311ed: 0x6d448a20, 0x311ee: 0x6d448c20, 0x311ef: 0x6d448e20, + 0x311f0: 0x6d449020, 0x311f1: 0x6d449220, 0x311f2: 0x6d717020, 0x311f3: 0x6d717220, + 0x311f4: 0x6d9ac620, 0x311f5: 0x6d9ac820, 0x311f6: 0x6dbd7820, 0x311f7: 0x6dbd7a20, + 0x311f8: 0x6ddb5020, 0x311f9: 0x6ddb5220, 0x311fa: 0x6ddb5420, 0x311fb: 0x6df34220, + 0x311fc: 0x6df34420, 0x311fd: 0x6df34620, 0x311fe: 0x6df34820, 0x311ff: 0x6df34a20, + // Block 0xc48, offset 0x31200 + 0x31200: 0x6df34c20, 0x31201: 0x6e074e20, 0x31202: 0x6e075020, 0x31203: 0x6e075220, + 0x31204: 0x6e075420, 0x31205: 0x6e17b020, 0x31206: 0x6e17b220, 0x31207: 0x6e17b420, + 0x31208: 0x6e17b620, 0x31209: 0x6e17b820, 0x3120a: 0x6e17ba20, 0x3120b: 0x6e249020, + 0x3120c: 0x6e418c20, 0x3120d: 0x6e418e20, 0x3120e: 0x6c053620, 0x3120f: 0x6c287e20, + 0x31210: 0x6c635020, 0x31211: 0x6c635220, 0x31212: 0x6c635420, 0x31213: 0x6ce78e20, + 0x31214: 0x6d168020, 0x31215: 0x6d44b820, 0x31216: 0x6d44b620, 0x31217: 0x6d44ba20, + 0x31218: 0x6d719420, 0x31219: 0x6d9af420, 0x3121a: 0x6d9af620, 0x3121b: 0x6c635c20, + 0x3121c: 0x6e17dc20, 0x3121d: 0x6e419420, 0x3121e: 0x6c020e20, 0x3121f: 0x6c636220, + 0x31220: 0x6c636420, 0x31221: 0x6cb6d820, 0x31222: 0x6c8a6820, 0x31223: 0x6c8a6a20, + 0x31224: 0x6c8a6c20, 0x31225: 0x6cb6da20, 0x31226: 0x6cb6dc20, 0x31227: 0x6ce79e20, + 0x31228: 0x6ce7a020, 0x31229: 0x6ce7a220, 0x3122a: 0x6ce7a420, 0x3122b: 0x6ce7a620, + 0x3122c: 0x6d169420, 0x3122d: 0x6ce7a820, 0x3122e: 0x6d169620, 0x3122f: 0x6ce7aa20, + 0x31230: 0x6ce7ac20, 0x31231: 0x6d169820, 0x31232: 0x6ce7ae20, 0x31233: 0x6d169a20, + 0x31234: 0x6d169c20, 0x31235: 0x6d169e20, 0x31236: 0x6d16a020, 0x31237: 0x6d16a220, + 0x31238: 0x6d44d620, 0x31239: 0x6d16a420, 0x3123a: 0x6d71a620, 0x3123b: 0x6d16a620, + 0x3123c: 0x6d16a820, 0x3123d: 0x6d16aa20, 0x3123e: 0x6d16ac20, 0x3123f: 0x6d16ae20, + // Block 0xc49, offset 0x31240 + 0x31240: 0x6d44d820, 0x31241: 0x6d44da20, 0x31242: 0x6d44dc20, 0x31243: 0x6d44de20, + 0x31244: 0x6d44e020, 0x31245: 0x6d44e220, 0x31246: 0x6d44e420, 0x31247: 0x6d44e620, + 0x31248: 0x6d71a820, 0x31249: 0x6d44e820, 0x3124a: 0x6d71aa20, 0x3124b: 0x6d71ac20, + 0x3124c: 0x6d44ea20, 0x3124d: 0x6d71ae20, 0x3124e: 0x6d44ec20, 0x3124f: 0x6d44ee20, + 0x31250: 0x6d9b0820, 0x31251: 0x6d71b020, 0x31252: 0x6d71b220, 0x31253: 0x6d71b420, + 0x31254: 0x6d71b620, 0x31255: 0x6d71b820, 0x31256: 0x6d71ba20, 0x31257: 0x6d71bc20, + 0x31258: 0x6d71be20, 0x31259: 0x6d71c020, 0x3125a: 0x6d9b0c20, 0x3125b: 0x6d9b0e20, + 0x3125c: 0x6d9b1020, 0x3125d: 0x6d9b0a20, 0x3125e: 0x6d9b1220, 0x3125f: 0x6d9b1420, + 0x31260: 0x6d9b1620, 0x31261: 0x6d9b1820, 0x31262: 0x6d9b1a20, 0x31263: 0x6d9b1c20, + 0x31264: 0x6d9b1e20, 0x31265: 0x6dbdca20, 0x31266: 0x6d9b2020, 0x31267: 0x6d9b2220, + 0x31268: 0x6d9b2420, 0x31269: 0x6d9b2620, 0x3126a: 0x6dbdcc20, 0x3126b: 0x6dbdce20, + 0x3126c: 0x6dbdd020, 0x3126d: 0x6dbdd220, 0x3126e: 0x6ddb9a20, 0x3126f: 0x6dbdd420, + 0x31270: 0x6dbdd620, 0x31271: 0x6dbdd820, 0x31272: 0x6dbdda20, 0x31273: 0x6dbddc20, + 0x31274: 0x6d9b8c20, 0x31275: 0x6dbdde20, 0x31276: 0x6ddb9c20, 0x31277: 0x6dbde020, + 0x31278: 0x6ddb9e20, 0x31279: 0x6ddba020, 0x3127a: 0x6ddba220, 0x3127b: 0x6ddba420, + 0x3127c: 0x6ddba620, 0x3127d: 0x6ddba820, 0x3127e: 0x6ddbaa20, 0x3127f: 0x6ddbac20, + // Block 0xc4a, offset 0x31280 + 0x31280: 0x6ddbae20, 0x31281: 0x6ddbb020, 0x31282: 0x6dbe4420, 0x31283: 0x6df38820, + 0x31284: 0x6df38a20, 0x31285: 0x6df38c20, 0x31286: 0x6dbe4620, 0x31287: 0x6df38e20, + 0x31288: 0x6df39020, 0x31289: 0x6df39220, 0x3128a: 0x6e077420, 0x3128b: 0x6e077620, + 0x3128c: 0x6e077820, 0x3128d: 0x6e077a20, 0x3128e: 0x6e077c20, 0x3128f: 0x6e17ec20, + 0x31290: 0x6e077e20, 0x31291: 0x6e078020, 0x31292: 0x6e078220, 0x31293: 0x6e078420, + 0x31294: 0x6e24ae20, 0x31295: 0x6e24b020, 0x31296: 0x6e17ee20, 0x31297: 0x6e17f020, + 0x31298: 0x6e17f220, 0x31299: 0x6e07c220, 0x3129a: 0x6e24b220, 0x3129b: 0x6e24b420, + 0x3129c: 0x6e2e8220, 0x3129d: 0x6e360220, 0x3129e: 0x6e3b4c20, 0x3129f: 0x6e3b4e20, + 0x312a0: 0x6e419820, 0x312a1: 0x6e419a20, 0x312a2: 0x6e457220, 0x312a3: 0x6c021020, + 0x312a4: 0x6c0ac220, 0x312a5: 0x6c0ac420, 0x312a6: 0x6c15d420, 0x312a7: 0x6c15d620, + 0x312a8: 0x6c288020, 0x312a9: 0x6c288220, 0x312aa: 0x6c288420, 0x312ab: 0x6c288620, + 0x312ac: 0x6c288820, 0x312ad: 0x6c288a20, 0x312ae: 0x6c288c20, 0x312af: 0x6c429820, + 0x312b0: 0x6c429a20, 0x312b1: 0x6c429c20, 0x312b2: 0x6c429e20, 0x312b3: 0x6c42a020, + 0x312b4: 0x6c42a220, 0x312b5: 0x6c636820, 0x312b6: 0x6c636a20, 0x312b7: 0x6c636c20, + 0x312b8: 0x6c636e20, 0x312b9: 0x6c637020, 0x312ba: 0x6c637220, 0x312bb: 0x6c637420, + 0x312bc: 0x6c637620, 0x312bd: 0x6c8a7420, 0x312be: 0x6c8a7620, 0x312bf: 0x6c8a7820, + // Block 0xc4b, offset 0x312c0 + 0x312c0: 0x6c8a7a20, 0x312c1: 0x6c8a7c20, 0x312c2: 0x6c8a7e20, 0x312c3: 0x6cb6fa20, + 0x312c4: 0x6cb6fc20, 0x312c5: 0x6cb6fe20, 0x312c6: 0x6cb70020, 0x312c7: 0x6ce7d820, + 0x312c8: 0x6ce7da20, 0x312c9: 0x6d16f420, 0x312ca: 0x6ce7dc20, 0x312cb: 0x6ce7de20, + 0x312cc: 0x6d16f620, 0x312cd: 0x6d16f820, 0x312ce: 0x6d16fa20, 0x312cf: 0x6d16fc20, + 0x312d0: 0x6d16fe20, 0x312d1: 0x6d452020, 0x312d2: 0x6d452220, 0x312d3: 0x6d71fe20, + 0x312d4: 0x6d720020, 0x312d5: 0x6e3b5220, 0x312d6: 0x6c637e20, 0x312d7: 0x6cb70c20, + 0x312d8: 0x6dbe4820, 0x312d9: 0x6c638220, 0x312da: 0x6d170820, 0x312db: 0x6d453620, + 0x312dc: 0x6d453820, 0x312dd: 0x6d453a20, 0x312de: 0x6d9ba020, 0x312df: 0x6d9ba220, + 0x312e0: 0x6d9ba420, 0x312e1: 0x6dbe5620, 0x312e2: 0x6dbe5820, 0x312e3: 0x6dbe5a20, + 0x312e4: 0x6ddc0420, 0x312e5: 0x6ddc0620, 0x312e6: 0x6df3ec20, 0x312e7: 0x6df3ee20, + 0x312e8: 0x6e07ca20, 0x312e9: 0x6e182420, 0x312ea: 0x6e2e9a20, 0x312eb: 0x6e41a020, + 0x312ec: 0x6c8a8e20, 0x312ed: 0x6ce7f220, 0x312ee: 0x6ce7f420, 0x312ef: 0x6d171420, + 0x312f0: 0x6d171620, 0x312f1: 0x6d171820, 0x312f2: 0x6d171a20, 0x312f3: 0x6d171c20, + 0x312f4: 0x6d171e20, 0x312f5: 0x6d172020, 0x312f6: 0x6d455820, 0x312f7: 0x6d455a20, + 0x312f8: 0x6d455c20, 0x312f9: 0x6d455e20, 0x312fa: 0x6d456020, 0x312fb: 0x6d456220, + 0x312fc: 0x6d456420, 0x312fd: 0x6d456620, 0x312fe: 0x6d456820, 0x312ff: 0x6d456a20, + // Block 0xc4c, offset 0x31300 + 0x31300: 0x6d456c20, 0x31301: 0x6d456e20, 0x31302: 0x6d457020, 0x31303: 0x6d457220, + 0x31304: 0x6d457420, 0x31305: 0x6d457620, 0x31306: 0x6d457820, 0x31307: 0x6d457a20, + 0x31308: 0x6d723220, 0x31309: 0x6d723420, 0x3130a: 0x6d723620, 0x3130b: 0x6d723820, + 0x3130c: 0x6d723a20, 0x3130d: 0x6d723c20, 0x3130e: 0x6d723e20, 0x3130f: 0x6d724020, + 0x31310: 0x6d724220, 0x31311: 0x6d724420, 0x31312: 0x6d724620, 0x31313: 0x6d724820, + 0x31314: 0x6d724a20, 0x31315: 0x6d724c20, 0x31316: 0x6d724e20, 0x31317: 0x6d725020, + 0x31318: 0x6d725220, 0x31319: 0x6d725420, 0x3131a: 0x6d725620, 0x3131b: 0x6d725820, + 0x3131c: 0x6d725a20, 0x3131d: 0x6d725c20, 0x3131e: 0x6d725e20, 0x3131f: 0x6d726020, + 0x31320: 0x6d726220, 0x31321: 0x6d9bba20, 0x31322: 0x6d9bbc20, 0x31323: 0x6d9bbe20, + 0x31324: 0x6d9bc020, 0x31325: 0x6d9bc220, 0x31326: 0x6d9bc420, 0x31327: 0x6d9bc620, + 0x31328: 0x6d9bc820, 0x31329: 0x6d9bca20, 0x3132a: 0x6d9bcc20, 0x3132b: 0x6d9bce20, + 0x3132c: 0x6d9bd020, 0x3132d: 0x6d9bd220, 0x3132e: 0x6d9bd420, 0x3132f: 0x6d9bd620, + 0x31330: 0x6d9bd820, 0x31331: 0x6d9bda20, 0x31332: 0x6d9bdc20, 0x31333: 0x6dbec020, + 0x31334: 0x6dbe7020, 0x31335: 0x6dbe7220, 0x31336: 0x6dbe7420, 0x31337: 0x6dbe7620, + 0x31338: 0x6dbe7820, 0x31339: 0x6dbe7a20, 0x3133a: 0x6dbe7c20, 0x3133b: 0x6dbe7e20, + 0x3133c: 0x6dbe8020, 0x3133d: 0x6dbe8220, 0x3133e: 0x6dbe8420, 0x3133f: 0x6dbe8620, + // Block 0xc4d, offset 0x31340 + 0x31340: 0x6dbe8820, 0x31341: 0x6dbe8a20, 0x31342: 0x6dbe8c20, 0x31343: 0x6dbe8e20, + 0x31344: 0x6ddc2820, 0x31345: 0x6ddc2a20, 0x31346: 0x6ddc2c20, 0x31347: 0x6ddc2e20, + 0x31348: 0x6ddc3020, 0x31349: 0x6ddc3220, 0x3134a: 0x6ddc3420, 0x3134b: 0x6ddc3620, + 0x3134c: 0x6ddc3820, 0x3134d: 0x6ddc3a20, 0x3134e: 0x6ddc3c20, 0x3134f: 0x6ddc3e20, + 0x31350: 0x6ddc4020, 0x31351: 0x6ddc4220, 0x31352: 0x6ddc4420, 0x31353: 0x6ddc4620, + 0x31354: 0x6df40a20, 0x31355: 0x6df40c20, 0x31356: 0x6df40e20, 0x31357: 0x6df41020, + 0x31358: 0x6df41220, 0x31359: 0x6df41420, 0x3135a: 0x6df41620, 0x3135b: 0x6df41820, + 0x3135c: 0x6df41a20, 0x3135d: 0x6df41c20, 0x3135e: 0x6df41e20, 0x3135f: 0x6df42020, + 0x31360: 0x6df42220, 0x31361: 0x6df42420, 0x31362: 0x6df42620, 0x31363: 0x6df42820, + 0x31364: 0x6df42a20, 0x31365: 0x6df42c20, 0x31366: 0x6df42e20, 0x31367: 0x6df43020, + 0x31368: 0x6df43220, 0x31369: 0x6e07e620, 0x3136a: 0x6e07e820, 0x3136b: 0x6e07ea20, + 0x3136c: 0x6e07ec20, 0x3136d: 0x6e07ee20, 0x3136e: 0x6e07f020, 0x3136f: 0x6e07f220, + 0x31370: 0x6e07f420, 0x31371: 0x6e07f620, 0x31372: 0x6e07f820, 0x31373: 0x6e07fa20, + 0x31374: 0x6e07fc20, 0x31375: 0x6e07fe20, 0x31376: 0x6e080020, 0x31377: 0x6e080220, + 0x31378: 0x6e080420, 0x31379: 0x6e184220, 0x3137a: 0x6e184420, 0x3137b: 0x6e184620, + 0x3137c: 0x6e184820, 0x3137d: 0x6e184a20, 0x3137e: 0x6e184c20, 0x3137f: 0x6e184e20, + // Block 0xc4e, offset 0x31380 + 0x31380: 0x6e185020, 0x31381: 0x6e185220, 0x31382: 0x6e185420, 0x31383: 0x6e185620, + 0x31384: 0x6e185820, 0x31385: 0x6e185a20, 0x31386: 0x6e185c20, 0x31387: 0x6e185e20, + 0x31388: 0x6e24ee20, 0x31389: 0x6e24f020, 0x3138a: 0x6e24f220, 0x3138b: 0x6e24f420, + 0x3138c: 0x6e24f620, 0x3138d: 0x6e24f820, 0x3138e: 0x6e24fa20, 0x3138f: 0x6e24fc20, + 0x31390: 0x6e24fe20, 0x31391: 0x6e250020, 0x31392: 0x6e250220, 0x31393: 0x6e250420, + 0x31394: 0x6e250620, 0x31395: 0x6e250820, 0x31396: 0x6e2ea420, 0x31397: 0x6e2ea620, + 0x31398: 0x6e2ea820, 0x31399: 0x6e2eaa20, 0x3139a: 0x6e2eac20, 0x3139b: 0x6e2eae20, + 0x3139c: 0x6e2eb020, 0x3139d: 0x6e362220, 0x3139e: 0x6e362420, 0x3139f: 0x6e362620, + 0x313a0: 0x6e3f1420, 0x313a1: 0x6e3f1620, 0x313a2: 0x6e3f1820, 0x313a3: 0x6e3f1a20, + 0x313a4: 0x6e41a420, 0x313a5: 0x6e3f2620, 0x313a6: 0x6e41a620, 0x313a7: 0x6e41a820, + 0x313a8: 0x6e437a20, 0x313a9: 0x6e437c20, 0x313aa: 0x6e44c220, 0x313ab: 0x6e457620, + 0x313ac: 0x6c021220, 0x313ad: 0x6c0ac620, 0x313ae: 0x6c15da20, 0x313af: 0x6c15dc20, + 0x313b0: 0x6c15de20, 0x313b1: 0x6c289820, 0x313b2: 0x6c289a20, 0x313b3: 0x6c289c20, + 0x313b4: 0x6c289e20, 0x313b5: 0x6c42ae20, 0x313b6: 0x6c42b020, 0x313b7: 0x6c42b220, + 0x313b8: 0x6c42b420, 0x313b9: 0x6c42b620, 0x313ba: 0x6c42b820, 0x313bb: 0x6c42ba20, + 0x313bc: 0x6c42bc20, 0x313bd: 0x6c42be20, 0x313be: 0x6c42c020, 0x313bf: 0x6c42c220, + // Block 0xc4f, offset 0x313c0 + 0x313c0: 0x6c42c420, 0x313c1: 0x6c638420, 0x313c2: 0x6c638620, 0x313c3: 0x6c638820, + 0x313c4: 0x6c638a20, 0x313c5: 0x6c638c20, 0x313c6: 0x6c638e20, 0x313c7: 0x6c639020, + 0x313c8: 0x6c639220, 0x313c9: 0x6c639420, 0x313ca: 0x6c8a9420, 0x313cb: 0x6c8a9620, + 0x313cc: 0x6c8a9820, 0x313cd: 0x6c8a9a20, 0x313ce: 0x6c8a9c20, 0x313cf: 0x6c8a9e20, + 0x313d0: 0x6cb71420, 0x313d1: 0x6cb71620, 0x313d2: 0x6cb71820, 0x313d3: 0x6cb71a20, + 0x313d4: 0x6cb71c20, 0x313d5: 0x6cb71e20, 0x313d6: 0x6cb72020, 0x313d7: 0x6ce80420, + 0x313d8: 0x6ce80620, 0x313d9: 0x6ce80820, 0x313da: 0x6ce80a20, 0x313db: 0x6ce80c20, + 0x313dc: 0x6d173220, 0x313dd: 0x6d173420, 0x313de: 0x6d173620, 0x313df: 0x6d173820, + 0x313e0: 0x6d45ac20, 0x313e1: 0x6d45ae20, 0x313e2: 0x6d45b020, 0x313e3: 0x6d72aa20, + 0x313e4: 0x6dbec420, 0x313e5: 0x6df48220, 0x313e6: 0x6e086e20, 0x313e7: 0x6e087020, + 0x313e8: 0x6c8aae20, 0x313e9: 0x6ce82c20, 0x313ea: 0x6d174820, 0x313eb: 0x6d174a20, + 0x313ec: 0x6d174c20, 0x313ed: 0x6d174e20, 0x313ee: 0x6d175020, 0x313ef: 0x6d45bc20, + 0x313f0: 0x6d45be20, 0x313f1: 0x6d45c020, 0x313f2: 0x6d72bc20, 0x313f3: 0x6d72be20, + 0x313f4: 0x6d72c020, 0x313f5: 0x6d72c220, 0x313f6: 0x6d72c420, 0x313f7: 0x6d72c620, + 0x313f8: 0x6d9c4220, 0x313f9: 0x6d9c4420, 0x313fa: 0x6d9c4620, 0x313fb: 0x6d9c4820, + 0x313fc: 0x6d9c4a20, 0x313fd: 0x6dbed220, 0x313fe: 0x6dbed420, 0x313ff: 0x6d9c6820, + // Block 0xc50, offset 0x31400 + 0x31400: 0x6ddcac20, 0x31401: 0x6ddcae20, 0x31402: 0x6df48c20, 0x31403: 0x6df48e20, + 0x31404: 0x6e087220, 0x31405: 0x6df49020, 0x31406: 0x6e087620, 0x31407: 0x6e087820, + 0x31408: 0x6e087a20, 0x31409: 0x6e087c20, 0x3140a: 0x6e087e20, 0x3140b: 0x6e088020, + 0x3140c: 0x6e088220, 0x3140d: 0x6e189420, 0x3140e: 0x6e189620, 0x3140f: 0x6e189820, + 0x31410: 0x6e254620, 0x31411: 0x6e2ee620, 0x31412: 0x6e254820, 0x31413: 0x6e2ee820, + 0x31414: 0x6e2eea20, 0x31415: 0x6e364420, 0x31416: 0x6e3b7420, 0x31417: 0x6e3f2820, + 0x31418: 0x6c8ab020, 0x31419: 0x6cb73620, 0x3141a: 0x6d45e620, 0x3141b: 0x6d72e220, + 0x3141c: 0x6ddcda20, 0x3141d: 0x6e256420, 0x3141e: 0x6e2ef820, 0x3141f: 0x6c8ab220, + 0x31420: 0x6ce84620, 0x31421: 0x6d177820, 0x31422: 0x6d177a20, 0x31423: 0x6d460620, + 0x31424: 0x6d460820, 0x31425: 0x6d460a20, 0x31426: 0x6d460c20, 0x31427: 0x6d460e20, + 0x31428: 0x6d461020, 0x31429: 0x6d461220, 0x3142a: 0x6d461420, 0x3142b: 0x6d72f220, + 0x3142c: 0x6d72f420, 0x3142d: 0x6d9c7a20, 0x3142e: 0x6d72f620, 0x3142f: 0x6d72f820, + 0x31430: 0x6d72fa20, 0x31431: 0x6d72fc20, 0x31432: 0x6d72fe20, 0x31433: 0x6d730020, + 0x31434: 0x6d730220, 0x31435: 0x6d9c8020, 0x31436: 0x6d9c8220, 0x31437: 0x6d9c8420, + 0x31438: 0x6d9c8620, 0x31439: 0x6d9c8820, 0x3143a: 0x6d9c8a20, 0x3143b: 0x6d9c8c20, + 0x3143c: 0x6dbf1420, 0x3143d: 0x6dbf1620, 0x3143e: 0x6dbf1820, 0x3143f: 0x6dbf1a20, + // Block 0xc51, offset 0x31440 + 0x31440: 0x6dbf1c20, 0x31441: 0x6dbf1e20, 0x31442: 0x6dbf2020, 0x31443: 0x6ddcf220, + 0x31444: 0x6ddcf420, 0x31445: 0x6ddcf620, 0x31446: 0x6ddcf820, 0x31447: 0x6d9c8e20, + 0x31448: 0x6ddcfa20, 0x31449: 0x6df4b220, 0x3144a: 0x6df4b420, 0x3144b: 0x6df4b620, + 0x3144c: 0x6df4b820, 0x3144d: 0x6df4ba20, 0x3144e: 0x6df4bc20, 0x3144f: 0x6df4be20, + 0x31450: 0x6e08b220, 0x31451: 0x6e08b420, 0x31452: 0x6e08b620, 0x31453: 0x6e08b820, + 0x31454: 0x6e18b420, 0x31455: 0x6e18b620, 0x31456: 0x6e18b820, 0x31457: 0x6e18ba20, + 0x31458: 0x6e18bc20, 0x31459: 0x6e256c20, 0x3145a: 0x6e256e20, 0x3145b: 0x6e257020, + 0x3145c: 0x6e257220, 0x3145d: 0x6e256820, 0x3145e: 0x6e2f0020, 0x3145f: 0x6e2f0220, + 0x31460: 0x6e2f0420, 0x31461: 0x6e365c20, 0x31462: 0x6e365e20, 0x31463: 0x6e3b8620, + 0x31464: 0x6e41be20, 0x31465: 0x6c8ab420, 0x31466: 0x6d463c20, 0x31467: 0x6d734420, + 0x31468: 0x6d9cc020, 0x31469: 0x6ddd3820, 0x3146a: 0x6e08ee20, 0x3146b: 0x6e25a420, + 0x3146c: 0x6e367420, 0x3146d: 0x6e367620, 0x3146e: 0x6e41c820, 0x3146f: 0x6c8aba20, + 0x31470: 0x6e41ca20, 0x31471: 0x6e44ca20, 0x31472: 0x6c8abc20, 0x31473: 0x6d9cc820, + 0x31474: 0x6dbf5620, 0x31475: 0x6ddd4020, 0x31476: 0x6ddd4220, 0x31477: 0x6df4fa20, + 0x31478: 0x6e08f420, 0x31479: 0x6e18f420, 0x3147a: 0x6e18f620, 0x3147b: 0x6e25ae20, + 0x3147c: 0x6c8abe20, 0x3147d: 0x6d179220, 0x3147e: 0x6d465020, 0x3147f: 0x6d465220, + // Block 0xc52, offset 0x31480 + 0x31480: 0x6d465420, 0x31481: 0x6d465620, 0x31482: 0x6d465820, 0x31483: 0x6d735820, + 0x31484: 0x6d735a20, 0x31485: 0x6d735c20, 0x31486: 0x6d735e20, 0x31487: 0x6d9cde20, + 0x31488: 0x6dbf6220, 0x31489: 0x6dbf6420, 0x3148a: 0x6ddd5620, 0x3148b: 0x6ddd5820, + 0x3148c: 0x6ddd5a20, 0x3148d: 0x6ddd5c20, 0x3148e: 0x6ddd5e20, 0x3148f: 0x6ddd6020, + 0x31490: 0x6e090220, 0x31491: 0x6e190620, 0x31492: 0x6e190820, 0x31493: 0x6e190a20, + 0x31494: 0x6e190c20, 0x31495: 0x6e25be20, 0x31496: 0x6e25c020, 0x31497: 0x6e368a20, + 0x31498: 0x6e368c20, 0x31499: 0x6e368e20, 0x3149a: 0x6cb74420, 0x3149b: 0x6d17c620, + 0x3149c: 0x6d17c820, 0x3149d: 0x6d17ca20, 0x3149e: 0x6d17cc20, 0x3149f: 0x6d469220, + 0x314a0: 0x6d469420, 0x314a1: 0x6d469620, 0x314a2: 0x6d469820, 0x314a3: 0x6d739620, + 0x314a4: 0x6d739820, 0x314a5: 0x6d739a20, 0x314a6: 0x6d739c20, 0x314a7: 0x6d739e20, + 0x314a8: 0x6d73a020, 0x314a9: 0x6d73a220, 0x314aa: 0x6d73a420, 0x314ab: 0x6d73a620, + 0x314ac: 0x6d73a820, 0x314ad: 0x6d73aa20, 0x314ae: 0x6d73ac20, 0x314af: 0x6d73ae20, + 0x314b0: 0x6d73b020, 0x314b1: 0x6d73b220, 0x314b2: 0x6d73b420, 0x314b3: 0x6d73b620, + 0x314b4: 0x6d73b820, 0x314b5: 0x6d73ba20, 0x314b6: 0x6d73bc20, 0x314b7: 0x6d73be20, + 0x314b8: 0x6d73c020, 0x314b9: 0x6d73c220, 0x314ba: 0x6d9d2420, 0x314bb: 0x6d9d2620, + 0x314bc: 0x6d9d2820, 0x314bd: 0x6d9d2a20, 0x314be: 0x6d9d2c20, 0x314bf: 0x6d9d2e20, + // Block 0xc53, offset 0x314c0 + 0x314c0: 0x6d9d3020, 0x314c1: 0x6d9d3220, 0x314c2: 0x6d9d3420, 0x314c3: 0x6d9d3620, + 0x314c4: 0x6d9d3820, 0x314c5: 0x6d9d3a20, 0x314c6: 0x6dbf9020, 0x314c7: 0x6d9d3c20, + 0x314c8: 0x6d9d3e20, 0x314c9: 0x6d9d4020, 0x314ca: 0x6d9d4220, 0x314cb: 0x6d9d4420, + 0x314cc: 0x6d9d4620, 0x314cd: 0x6d9d4820, 0x314ce: 0x6d9d4a20, 0x314cf: 0x6d9d4c20, + 0x314d0: 0x6d9d4e20, 0x314d1: 0x6d9d5020, 0x314d2: 0x6d9d5220, 0x314d3: 0x6d9d5420, + 0x314d4: 0x6d9d5620, 0x314d5: 0x6d9d5820, 0x314d6: 0x6d9d5a20, 0x314d7: 0x6d9d5c20, + 0x314d8: 0x6d9d5e20, 0x314d9: 0x6dbf9c20, 0x314da: 0x6dbf9e20, 0x314db: 0x6dbfa020, + 0x314dc: 0x6dbfa220, 0x314dd: 0x6dbfa420, 0x314de: 0x6dbfa620, 0x314df: 0x6dbfa820, + 0x314e0: 0x6dbfaa20, 0x314e1: 0x6dbfac20, 0x314e2: 0x6dbfae20, 0x314e3: 0x6d9d6020, + 0x314e4: 0x6dbfb020, 0x314e5: 0x6dbfb220, 0x314e6: 0x6dbfb420, 0x314e7: 0x6dbfb620, + 0x314e8: 0x6dbfb820, 0x314e9: 0x6dbfba20, 0x314ea: 0x6dbfbc20, 0x314eb: 0x6dbfbe20, + 0x314ec: 0x6dbfc020, 0x314ed: 0x6dbfc220, 0x314ee: 0x6dbfc420, 0x314ef: 0x6dbfc620, + 0x314f0: 0x6dbfc820, 0x314f1: 0x6dbfca20, 0x314f2: 0x6dbfcc20, 0x314f3: 0x6dbfce20, + 0x314f4: 0x6dbfd020, 0x314f5: 0x6ddd9820, 0x314f6: 0x6ddd9a20, 0x314f7: 0x6ddd9c20, + 0x314f8: 0x6ddd9e20, 0x314f9: 0x6ddda020, 0x314fa: 0x6dbfd220, 0x314fb: 0x6ddda220, + 0x314fc: 0x6ddda420, 0x314fd: 0x6ddda620, 0x314fe: 0x6ddda820, 0x314ff: 0x6dddaa20, + // Block 0xc54, offset 0x31500 + 0x31500: 0x6dddac20, 0x31501: 0x6dddae20, 0x31502: 0x6dddb020, 0x31503: 0x6dddb220, + 0x31504: 0x6dddb420, 0x31505: 0x6df51c20, 0x31506: 0x6dddb620, 0x31507: 0x6dddb820, + 0x31508: 0x6dddba20, 0x31509: 0x6dddbc20, 0x3150a: 0x6dddbe20, 0x3150b: 0x6dddc020, + 0x3150c: 0x6dddc220, 0x3150d: 0x6dddc420, 0x3150e: 0x6dc03a20, 0x3150f: 0x6dddc620, + 0x31510: 0x6dddc820, 0x31511: 0x6dddca20, 0x31512: 0x6dddcc20, 0x31513: 0x6dddce20, + 0x31514: 0x6df54220, 0x31515: 0x6df54420, 0x31516: 0x6df54620, 0x31517: 0x6df54820, + 0x31518: 0x6df54a20, 0x31519: 0x6df54c20, 0x3151a: 0x6df54e20, 0x3151b: 0x6df55020, + 0x3151c: 0x6df55220, 0x3151d: 0x6df55420, 0x3151e: 0x6df55620, 0x3151f: 0x6df55820, + 0x31520: 0x6df55a20, 0x31521: 0x6df55c20, 0x31522: 0x6df55e20, 0x31523: 0x6df56020, + 0x31524: 0x6df56220, 0x31525: 0x6df56420, 0x31526: 0x6df56620, 0x31527: 0x6df56820, + 0x31528: 0x6df56a20, 0x31529: 0x6df56c20, 0x3152a: 0x6df56e20, 0x3152b: 0x6df57020, + 0x3152c: 0x6df57220, 0x3152d: 0x6df57420, 0x3152e: 0x6df57620, 0x3152f: 0x6df57820, + 0x31530: 0x6df57a20, 0x31531: 0x6df57c20, 0x31532: 0x6df57e20, 0x31533: 0x6df58020, + 0x31534: 0x6df58220, 0x31535: 0x6df58420, 0x31536: 0x6e093220, 0x31537: 0x6e093420, + 0x31538: 0x6e093620, 0x31539: 0x6e093820, 0x3153a: 0x6df61c20, 0x3153b: 0x6e091c20, + 0x3153c: 0x6e093a20, 0x3153d: 0x6dddd020, 0x3153e: 0x6e093c20, 0x3153f: 0x6e093e20, + // Block 0xc55, offset 0x31540 + 0x31540: 0x6e094020, 0x31541: 0x6e094220, 0x31542: 0x6e094420, 0x31543: 0x6e094620, + 0x31544: 0x6e094820, 0x31545: 0x6e094a20, 0x31546: 0x6e094c20, 0x31547: 0x6e094e20, + 0x31548: 0x6e095020, 0x31549: 0x6e095220, 0x3154a: 0x6e095420, 0x3154b: 0x6e095620, + 0x3154c: 0x6e095820, 0x3154d: 0x6e095a20, 0x3154e: 0x6e095c20, 0x3154f: 0x6e095e20, + 0x31550: 0x6e096020, 0x31551: 0x6e096220, 0x31552: 0x6e096420, 0x31553: 0x6e096620, + 0x31554: 0x6e096820, 0x31555: 0x6e096a20, 0x31556: 0x6e096c20, 0x31557: 0x6e096e20, + 0x31558: 0x6e097020, 0x31559: 0x6e097220, 0x3155a: 0x6e097420, 0x3155b: 0x6e097620, + 0x3155c: 0x6e194620, 0x3155d: 0x6e194820, 0x3155e: 0x6e194a20, 0x3155f: 0x6e194c20, + 0x31560: 0x6e097820, 0x31561: 0x6e194e20, 0x31562: 0x6e195020, 0x31563: 0x6e195220, + 0x31564: 0x6e195420, 0x31565: 0x6e195620, 0x31566: 0x6e195820, 0x31567: 0x6e195a20, + 0x31568: 0x6e195c20, 0x31569: 0x6e195e20, 0x3156a: 0x6e196020, 0x3156b: 0x6e196220, + 0x3156c: 0x6e196420, 0x3156d: 0x6e196620, 0x3156e: 0x6e196820, 0x3156f: 0x6e196a20, + 0x31570: 0x6e196c20, 0x31571: 0x6e25de20, 0x31572: 0x6e25e020, 0x31573: 0x6e25e220, + 0x31574: 0x6e25e420, 0x31575: 0x6e25e620, 0x31576: 0x6e25e820, 0x31577: 0x6e25ea20, + 0x31578: 0x6e25ec20, 0x31579: 0x6e25ee20, 0x3157a: 0x6e25f020, 0x3157b: 0x6e25f220, + 0x3157c: 0x6e25f420, 0x3157d: 0x6e25f620, 0x3157e: 0x6e25f820, 0x3157f: 0x6e25fa20, + // Block 0xc56, offset 0x31580 + 0x31580: 0x6e09e620, 0x31581: 0x6e25fc20, 0x31582: 0x6e25fe20, 0x31583: 0x6e260020, + 0x31584: 0x6e260220, 0x31585: 0x6e260420, 0x31586: 0x6e260620, 0x31587: 0x6e260820, + 0x31588: 0x6e260a20, 0x31589: 0x6e267220, 0x3158a: 0x6e2f5620, 0x3158b: 0x6e2f5820, + 0x3158c: 0x6e2f5a20, 0x3158d: 0x6e2f5c20, 0x3158e: 0x6e2f5e20, 0x3158f: 0x6e2f6020, + 0x31590: 0x6e2f6220, 0x31591: 0x6e2f6420, 0x31592: 0x6e2f6620, 0x31593: 0x6e2f6820, + 0x31594: 0x6e2f6a20, 0x31595: 0x6e2f6c20, 0x31596: 0x6e2f6e20, 0x31597: 0x6e2f7020, + 0x31598: 0x6e2f7220, 0x31599: 0x6e2f7420, 0x3159a: 0x6e2f7620, 0x3159b: 0x6e2f7820, + 0x3159c: 0x6e36a620, 0x3159d: 0x6e36a820, 0x3159e: 0x6e36aa20, 0x3159f: 0x6e36ac20, + 0x315a0: 0x6e36ae20, 0x315a1: 0x6e36b020, 0x315a2: 0x6e36b220, 0x315a3: 0x6e36b420, + 0x315a4: 0x6e36b620, 0x315a5: 0x6e36b820, 0x315a6: 0x6e36ba20, 0x315a7: 0x6e36bc20, + 0x315a8: 0x6e3bac20, 0x315a9: 0x6e36be20, 0x315aa: 0x6e2fda20, 0x315ab: 0x6e36c020, + 0x315ac: 0x6e3bae20, 0x315ad: 0x6e3bb020, 0x315ae: 0x6e3bb220, 0x315af: 0x6e3bb420, + 0x315b0: 0x6e371420, 0x315b1: 0x6e3f5420, 0x315b2: 0x6e3f5620, 0x315b3: 0x6e3f5820, + 0x315b4: 0x6e3f5a20, 0x315b5: 0x6e3f5c20, 0x315b6: 0x6e3f5e20, 0x315b7: 0x6e41da20, + 0x315b8: 0x6e41dc20, 0x315b9: 0x6e44d220, 0x315ba: 0x6e458220, 0x315bb: 0x6e469a20, + 0x315bc: 0x6c42dc20, 0x315bd: 0x6c8ac020, 0x315be: 0x6cb74a20, 0x315bf: 0x6ce86e20, + // Block 0xc57, offset 0x315c0 + 0x315c0: 0x6ce87020, 0x315c1: 0x6ce87220, 0x315c2: 0x6ce87420, 0x315c3: 0x6ce87620, + 0x315c4: 0x6d17e020, 0x315c5: 0x6d17e220, 0x315c6: 0x6d17e420, 0x315c7: 0x6d17e620, + 0x315c8: 0x6d17e820, 0x315c9: 0x6d17ea20, 0x315ca: 0x6d17ec20, 0x315cb: 0x6d17ee20, + 0x315cc: 0x6d17f020, 0x315cd: 0x6d17f220, 0x315ce: 0x6d17f420, 0x315cf: 0x6d17f620, + 0x315d0: 0x6d17f820, 0x315d1: 0x6d46b620, 0x315d2: 0x6d46b820, 0x315d3: 0x6d46ba20, + 0x315d4: 0x6d46bc20, 0x315d5: 0x6d46be20, 0x315d6: 0x6d46c020, 0x315d7: 0x6d46c220, + 0x315d8: 0x6d46c420, 0x315d9: 0x6d46c620, 0x315da: 0x6d46c820, 0x315db: 0x6d46ca20, + 0x315dc: 0x6d46cc20, 0x315dd: 0x6d46ce20, 0x315de: 0x6d46d020, 0x315df: 0x6d46d220, + 0x315e0: 0x6d740c20, 0x315e1: 0x6d740e20, 0x315e2: 0x6d741020, 0x315e3: 0x6d741220, + 0x315e4: 0x6d741420, 0x315e5: 0x6d741620, 0x315e6: 0x6d741820, 0x315e7: 0x6d741a20, + 0x315e8: 0x6d741c20, 0x315e9: 0x6d741e20, 0x315ea: 0x6d742020, 0x315eb: 0x6d742220, + 0x315ec: 0x6d742420, 0x315ed: 0x6d9db020, 0x315ee: 0x6d9db220, 0x315ef: 0x6d9db420, + 0x315f0: 0x6d9db620, 0x315f1: 0x6d9db820, 0x315f2: 0x6d9dba20, 0x315f3: 0x6d9dbc20, + 0x315f4: 0x6d9dbe20, 0x315f5: 0x6d9dc020, 0x315f6: 0x6d9dc220, 0x315f7: 0x6d9dc420, + 0x315f8: 0x6d9dc620, 0x315f9: 0x6d9dc820, 0x315fa: 0x6d9dca20, 0x315fb: 0x6d9dcc20, + 0x315fc: 0x6dc03c20, 0x315fd: 0x6dc03e20, 0x315fe: 0x6dc06820, 0x315ff: 0x6dc04020, + // Block 0xc58, offset 0x31600 + 0x31600: 0x6dc04220, 0x31601: 0x6dc04420, 0x31602: 0x6dc04620, 0x31603: 0x6dc04820, + 0x31604: 0x6dc04a20, 0x31605: 0x6dc04c20, 0x31606: 0x6dc04e20, 0x31607: 0x6dc05020, + 0x31608: 0x6dc05220, 0x31609: 0x6dc05420, 0x3160a: 0x6dc05620, 0x3160b: 0x6dc05820, + 0x3160c: 0x6dde2e20, 0x3160d: 0x6dde3020, 0x3160e: 0x6dde3220, 0x3160f: 0x6dde3420, + 0x31610: 0x6dde3620, 0x31611: 0x6dde3820, 0x31612: 0x6dde3a20, 0x31613: 0x6df61e20, + 0x31614: 0x6df62020, 0x31615: 0x6df62220, 0x31616: 0x6df62420, 0x31617: 0x6df62620, + 0x31618: 0x6df62820, 0x31619: 0x6df62a20, 0x3161a: 0x6df62c20, 0x3161b: 0x6df62e20, + 0x3161c: 0x6e09ec20, 0x3161d: 0x6e09ee20, 0x3161e: 0x6e09f020, 0x3161f: 0x6e09f220, + 0x31620: 0x6e19f820, 0x31621: 0x6e19fa20, 0x31622: 0x6e19fc20, 0x31623: 0x6e19fe20, + 0x31624: 0x6e267420, 0x31625: 0x6cb75220, 0x31626: 0x6ce88620, 0x31627: 0x6d180820, + 0x31628: 0x6d180a20, 0x31629: 0x6d180c20, 0x3162a: 0x6d180e20, 0x3162b: 0x6d181020, + 0x3162c: 0x6c63ac20, 0x3162d: 0x6d181220, 0x3162e: 0x6d181420, 0x3162f: 0x6d181620, + 0x31630: 0x6d181820, 0x31631: 0x6d46f420, 0x31632: 0x6d46f620, 0x31633: 0x6d46f820, + 0x31634: 0x6d46fa20, 0x31635: 0x6d46fc20, 0x31636: 0x6d46fe20, 0x31637: 0x6d745020, + 0x31638: 0x6d745220, 0x31639: 0x6d745420, 0x3163a: 0x6d745620, 0x3163b: 0x6d745820, + 0x3163c: 0x6d745a20, 0x3163d: 0x6d745c20, 0x3163e: 0x6d745e20, 0x3163f: 0x6d746020, + // Block 0xc59, offset 0x31640 + 0x31640: 0x6d746220, 0x31641: 0x6d746420, 0x31642: 0x6d746620, 0x31643: 0x6d746820, + 0x31644: 0x6d746a20, 0x31645: 0x6d746c20, 0x31646: 0x6d746e20, 0x31647: 0x6d747020, + 0x31648: 0x6d747220, 0x31649: 0x6d747420, 0x3164a: 0x6d9e0620, 0x3164b: 0x6d747620, + 0x3164c: 0x6d747820, 0x3164d: 0x6d747a20, 0x3164e: 0x6d747c20, 0x3164f: 0x6d9e0820, + 0x31650: 0x6d9e0a20, 0x31651: 0x6d9e0c20, 0x31652: 0x6d9e0e20, 0x31653: 0x6d9e1020, + 0x31654: 0x6d9e1220, 0x31655: 0x6d9e1420, 0x31656: 0x6d9e1620, 0x31657: 0x6d9e1820, + 0x31658: 0x6d9e1a20, 0x31659: 0x6d9e1c20, 0x3165a: 0x6d9e1e20, 0x3165b: 0x6d9e2020, + 0x3165c: 0x6dc06a20, 0x3165d: 0x6d9e2220, 0x3165e: 0x6d9e2420, 0x3165f: 0x6d9e2620, + 0x31660: 0x6d9e2820, 0x31661: 0x6d9e2a20, 0x31662: 0x6d9e2c20, 0x31663: 0x6d9e2e20, + 0x31664: 0x6d9e3020, 0x31665: 0x6d9e3220, 0x31666: 0x6d9e3420, 0x31667: 0x6d9e3620, + 0x31668: 0x6d9e3820, 0x31669: 0x6d9e3a20, 0x3166a: 0x6d9e3c20, 0x3166b: 0x6d9e3e20, + 0x3166c: 0x6d9e4020, 0x3166d: 0x6dc08020, 0x3166e: 0x6dc08220, 0x3166f: 0x6dc08420, + 0x31670: 0x6dc08620, 0x31671: 0x6dc08820, 0x31672: 0x6dc08a20, 0x31673: 0x6dc08c20, + 0x31674: 0x6dc08e20, 0x31675: 0x6dc09020, 0x31676: 0x6dc09220, 0x31677: 0x6dc09420, + 0x31678: 0x6dc09620, 0x31679: 0x6dc09820, 0x3167a: 0x6dc09a20, 0x3167b: 0x6dc09c20, + 0x3167c: 0x6dc09e20, 0x3167d: 0x6dc0a020, 0x3167e: 0x6dc0a220, 0x3167f: 0x6dc0a420, + // Block 0xc5a, offset 0x31680 + 0x31680: 0x6dc0a620, 0x31681: 0x6dc0a820, 0x31682: 0x6dc0aa20, 0x31683: 0x6dc0ac20, + 0x31684: 0x6dc0ae20, 0x31685: 0x6dc0b020, 0x31686: 0x6dc0b220, 0x31687: 0x6dc0b420, + 0x31688: 0x6dc0b620, 0x31689: 0x6dc0b820, 0x3168a: 0x6dde4e20, 0x3168b: 0x6dde5020, + 0x3168c: 0x6dde5220, 0x3168d: 0x6dde5420, 0x3168e: 0x6dde5620, 0x3168f: 0x6dde5820, + 0x31690: 0x6dde5a20, 0x31691: 0x6dde5c20, 0x31692: 0x6dde5e20, 0x31693: 0x6dde6020, + 0x31694: 0x6dde6220, 0x31695: 0x6dde6420, 0x31696: 0x6dde6620, 0x31697: 0x6dde6820, + 0x31698: 0x6dde6a20, 0x31699: 0x6dde6c20, 0x3169a: 0x6dde6e20, 0x3169b: 0x6dde7020, + 0x3169c: 0x6dde7220, 0x3169d: 0x6dde7420, 0x3169e: 0x6dde7620, 0x3169f: 0x6dde7820, + 0x316a0: 0x6dde7a20, 0x316a1: 0x6df63820, 0x316a2: 0x6dde7c20, 0x316a3: 0x6dde7e20, + 0x316a4: 0x6dd43a20, 0x316a5: 0x6dde8020, 0x316a6: 0x6df64c20, 0x316a7: 0x6dc13220, + 0x316a8: 0x6df64e20, 0x316a9: 0x6df65020, 0x316aa: 0x6df65220, 0x316ab: 0x6df65420, + 0x316ac: 0x6df65620, 0x316ad: 0x6df65820, 0x316ae: 0x6df65a20, 0x316af: 0x6df65c20, + 0x316b0: 0x6df65e20, 0x316b1: 0x6df66020, 0x316b2: 0x6df66220, 0x316b3: 0x6df66420, + 0x316b4: 0x6df66620, 0x316b5: 0x6df66820, 0x316b6: 0x6df66a20, 0x316b7: 0x6df66c20, + 0x316b8: 0x6df66e20, 0x316b9: 0x6df67020, 0x316ba: 0x6df67220, 0x316bb: 0x6df67420, + 0x316bc: 0x6df67620, 0x316bd: 0x6df67820, 0x316be: 0x6df67a20, 0x316bf: 0x6df67c20, + // Block 0xc5b, offset 0x316c0 + 0x316c0: 0x6df67e20, 0x316c1: 0x6df68020, 0x316c2: 0x6df68220, 0x316c3: 0x6df68420, + 0x316c4: 0x6df68620, 0x316c5: 0x6df68820, 0x316c6: 0x6df68a20, 0x316c7: 0x6df68c20, + 0x316c8: 0x6df68e20, 0x316c9: 0x6df69020, 0x316ca: 0x6df69220, 0x316cb: 0x6df69420, + 0x316cc: 0x6df69620, 0x316cd: 0x6df69820, 0x316ce: 0x6df69a20, 0x316cf: 0x6df69c20, + 0x316d0: 0x6e0a0e20, 0x316d1: 0x6df69e20, 0x316d2: 0x6e0a1020, 0x316d3: 0x6e0a1220, + 0x316d4: 0x6e0a1420, 0x316d5: 0x6e0a1620, 0x316d6: 0x6e0a1820, 0x316d7: 0x6e0a1a20, + 0x316d8: 0x6e0a1c20, 0x316d9: 0x6e0a1e20, 0x316da: 0x6e0a2020, 0x316db: 0x6e0a2220, + 0x316dc: 0x6e0a2420, 0x316dd: 0x6e0a2620, 0x316de: 0x6e0a2820, 0x316df: 0x6e0a2a20, + 0x316e0: 0x6e0a2c20, 0x316e1: 0x6e0a2e20, 0x316e2: 0x6e0a3020, 0x316e3: 0x6e0a3220, + 0x316e4: 0x6e0a3420, 0x316e5: 0x6e0a3620, 0x316e6: 0x6e0a3820, 0x316e7: 0x6e0a3a20, + 0x316e8: 0x6e0a3c20, 0x316e9: 0x6e0a3e20, 0x316ea: 0x6e0a4020, 0x316eb: 0x6e0a4220, + 0x316ec: 0x6e1a1020, 0x316ed: 0x6e1a1220, 0x316ee: 0x6e1a1420, 0x316ef: 0x6e1a1620, + 0x316f0: 0x6e1a1820, 0x316f1: 0x6e1a1a20, 0x316f2: 0x6e1a1c20, 0x316f3: 0x6e1a1e20, + 0x316f4: 0x6e1a2020, 0x316f5: 0x6e1a2220, 0x316f6: 0x6e1a2420, 0x316f7: 0x6e1a2620, + 0x316f8: 0x6e1a2820, 0x316f9: 0x6e1a2a20, 0x316fa: 0x6e1a2c20, 0x316fb: 0x6e1a2e20, + 0x316fc: 0x6e1a3020, 0x316fd: 0x6e1a3220, 0x316fe: 0x6e1a3420, 0x316ff: 0x6e0ad220, + // Block 0xc5c, offset 0x31700 + 0x31700: 0x6e1a3620, 0x31701: 0x6e1a3820, 0x31702: 0x6e1a3a20, 0x31703: 0x6e1a3c20, + 0x31704: 0x6e1a3e20, 0x31705: 0x6e1a4020, 0x31706: 0x6e1a4220, 0x31707: 0x6e1a4420, + 0x31708: 0x6e1a4620, 0x31709: 0x6e1a4820, 0x3170a: 0x6e1a4a20, 0x3170b: 0x6e268620, + 0x3170c: 0x6e1a4c20, 0x3170d: 0x6e1a4e20, 0x3170e: 0x6e1a5020, 0x3170f: 0x6e1a5220, + 0x31710: 0x6e268820, 0x31711: 0x6e268a20, 0x31712: 0x6e268c20, 0x31713: 0x6e268e20, + 0x31714: 0x6e269020, 0x31715: 0x6e269220, 0x31716: 0x6e269420, 0x31717: 0x6e269620, + 0x31718: 0x6e269820, 0x31719: 0x6e269a20, 0x3171a: 0x6e269c20, 0x3171b: 0x6e269e20, + 0x3171c: 0x6e26a020, 0x3171d: 0x6e26a220, 0x3171e: 0x6e26a420, 0x3171f: 0x6e26a620, + 0x31720: 0x6e260c20, 0x31721: 0x6e2ff220, 0x31722: 0x6e2ff420, 0x31723: 0x6e2ff620, + 0x31724: 0x6e2ff820, 0x31725: 0x6e2ffa20, 0x31726: 0x6e2ffc20, 0x31727: 0x6e2ffe20, + 0x31728: 0x6e300020, 0x31729: 0x6e273020, 0x3172a: 0x6e300220, 0x3172b: 0x6e300420, + 0x3172c: 0x6e300620, 0x3172d: 0x6e300820, 0x3172e: 0x6e300a20, 0x3172f: 0x6e300c20, + 0x31730: 0x6e300e20, 0x31731: 0x6e301020, 0x31732: 0x6e301220, 0x31733: 0x6e301420, + 0x31734: 0x6e301620, 0x31735: 0x6e273220, 0x31736: 0x6e301820, 0x31737: 0x6e301a20, + 0x31738: 0x6e301c20, 0x31739: 0x6e372220, 0x3173a: 0x6e371620, 0x3173b: 0x6e301e20, + 0x3173c: 0x6e302020, 0x3173d: 0x6e372420, 0x3173e: 0x6e372620, 0x3173f: 0x6e372820, + // Block 0xc5d, offset 0x31740 + 0x31740: 0x6e372a20, 0x31741: 0x6e372c20, 0x31742: 0x6e372e20, 0x31743: 0x6e373020, + 0x31744: 0x6e373220, 0x31745: 0x6e373420, 0x31746: 0x6e373620, 0x31747: 0x6e373820, + 0x31748: 0x6e373a20, 0x31749: 0x6e373c20, 0x3174a: 0x6e373e20, 0x3174b: 0x6e3bea20, + 0x3174c: 0x6e3bec20, 0x3174d: 0x6e3bee20, 0x3174e: 0x6e3bf020, 0x3174f: 0x6e3bf220, + 0x31750: 0x6e3bf420, 0x31751: 0x6e3bf620, 0x31752: 0x6e3bf820, 0x31753: 0x6e3f8820, + 0x31754: 0x6e3f8a20, 0x31755: 0x6e41fa20, 0x31756: 0x6e41fc20, 0x31757: 0x6e41fe20, + 0x31758: 0x6e43c020, 0x31759: 0x6e43c220, 0x3175a: 0x6e43c420, 0x3175b: 0x6e44e620, + 0x3175c: 0x6e44e820, 0x3175d: 0x6e458c20, 0x3175e: 0x6e458e20, 0x3175f: 0x6c0ac820, + 0x31760: 0x6c28a620, 0x31761: 0x6c28a820, 0x31762: 0x6c42de20, 0x31763: 0x6c42e020, + 0x31764: 0x6c42e220, 0x31765: 0x6c63ae20, 0x31766: 0x6c63b020, 0x31767: 0x6c63b220, + 0x31768: 0x6c63b420, 0x31769: 0x6c63b620, 0x3176a: 0x6c8ac420, 0x3176b: 0x6c8ac620, + 0x3176c: 0x6c8ac820, 0x3176d: 0x6c8aca20, 0x3176e: 0x6c8acc20, 0x3176f: 0x6c8ace20, + 0x31770: 0x6c8ad020, 0x31771: 0x6c8ad220, 0x31772: 0x6c8ad420, 0x31773: 0x6c8ad620, + 0x31774: 0x6c8ad820, 0x31775: 0x6c8ada20, 0x31776: 0x6c8adc20, 0x31777: 0x6cb75620, + 0x31778: 0x6cb75820, 0x31779: 0x6cb75a20, 0x3177a: 0x6cb75c20, 0x3177b: 0x6cb75e20, + 0x3177c: 0x6cb76020, 0x3177d: 0x6cb76220, 0x3177e: 0x6cb76420, 0x3177f: 0x6cb76620, + // Block 0xc5e, offset 0x31780 + 0x31780: 0x6ce89020, 0x31781: 0x6ce89220, 0x31782: 0x6ce89420, 0x31783: 0x6ce89620, + 0x31784: 0x6ce89820, 0x31785: 0x6ce89a20, 0x31786: 0x6ce89c20, 0x31787: 0x6ce89e20, + 0x31788: 0x6ce8a020, 0x31789: 0x6d183020, 0x3178a: 0x6d183220, 0x3178b: 0x6d183420, + 0x3178c: 0x6d183620, 0x3178d: 0x6d183820, 0x3178e: 0x6d183a20, 0x3178f: 0x6d183c20, + 0x31790: 0x6d183e20, 0x31791: 0x6d184020, 0x31792: 0x6d184220, 0x31793: 0x6d184420, + 0x31794: 0x6d184620, 0x31795: 0x6d472620, 0x31796: 0x6d472820, 0x31797: 0x6d472a20, + 0x31798: 0x6d74e020, 0x31799: 0x6d472c20, 0x3179a: 0x6d472e20, 0x3179b: 0x6d473020, + 0x3179c: 0x6d473220, 0x3179d: 0x6d74e220, 0x3179e: 0x6d74e420, 0x3179f: 0x6d74e620, + 0x317a0: 0x6d74e820, 0x317a1: 0x6d74ea20, 0x317a2: 0x6d74ec20, 0x317a3: 0x6d74ee20, + 0x317a4: 0x6d74f020, 0x317a5: 0x6d9eba20, 0x317a6: 0x6d9ebc20, 0x317a7: 0x6d9ebe20, + 0x317a8: 0x6d9ec020, 0x317a9: 0x6dc13820, 0x317aa: 0x6dc13a20, 0x317ab: 0x6dc13c20, + 0x317ac: 0x6dc13e20, 0x317ad: 0x6ddee620, 0x317ae: 0x6ddee820, 0x317af: 0x6ddeea20, + 0x317b0: 0x6ddeec20, 0x317b1: 0x6df73020, 0x317b2: 0x6df73220, 0x317b3: 0x6e273420, + 0x317b4: 0x6e273620, 0x317b5: 0x6cb78220, 0x317b6: 0x6d750020, 0x317b7: 0x6d9eca20, + 0x317b8: 0x6df73620, 0x317b9: 0x6e0ad820, 0x317ba: 0x6e1ac620, 0x317bb: 0x6e1ac820, + 0x317bc: 0x6e378c20, 0x317bd: 0x6e378e20, 0x317be: 0x6d9ed820, 0x317bf: 0x6cb78620, + // Block 0xc5f, offset 0x317c0 + 0x317c0: 0x6d185620, 0x317c1: 0x6d185820, 0x317c2: 0x6d185a20, 0x317c3: 0x6d751220, + 0x317c4: 0x6d751420, 0x317c5: 0x6d9ee220, 0x317c6: 0x6d9ee420, 0x317c7: 0x6d9ee620, + 0x317c8: 0x6d9ee820, 0x317c9: 0x6dc14820, 0x317ca: 0x6dc14a20, 0x317cb: 0x6dc14c20, + 0x317cc: 0x6ddefc20, 0x317cd: 0x6ddefe20, 0x317ce: 0x6ddf0020, 0x317cf: 0x6ddf0220, + 0x317d0: 0x6ddf0420, 0x317d1: 0x6df74820, 0x317d2: 0x6df74a20, 0x317d3: 0x6df74c20, + 0x317d4: 0x6df74e20, 0x317d5: 0x6df75020, 0x317d6: 0x6df75220, 0x317d7: 0x6df75420, + 0x317d8: 0x6e0aec20, 0x317d9: 0x6e0aee20, 0x317da: 0x6e0af020, 0x317db: 0x6e0af220, + 0x317dc: 0x6e1ad620, 0x317dd: 0x6e1ad820, 0x317de: 0x6e274420, 0x317df: 0x6e30b220, + 0x317e0: 0x6e379a20, 0x317e1: 0x6e3c3820, 0x317e2: 0x6e43e220, 0x317e3: 0x6e460a20, + 0x317e4: 0x6e46a220, 0x317e5: 0x6cb78a20, 0x317e6: 0x6c28aa20, 0x317e7: 0x6d475620, + 0x317e8: 0x6d753420, 0x317e9: 0x6d753620, 0x317ea: 0x6d753820, 0x317eb: 0x6d753a20, + 0x317ec: 0x6d9f0620, 0x317ed: 0x6d9f0820, 0x317ee: 0x6d9f0a20, 0x317ef: 0x6dc17020, + 0x317f0: 0x6dc17220, 0x317f1: 0x6ddf2e20, 0x317f2: 0x6ddf3020, 0x317f3: 0x6df77420, + 0x317f4: 0x6df77620, 0x317f5: 0x6e0b0620, 0x317f6: 0x6e275620, 0x317f7: 0x6e44fe20, + 0x317f8: 0x6cb78c20, 0x317f9: 0x6d755a20, 0x317fa: 0x6d9f2620, 0x317fb: 0x6cb79420, + 0x317fc: 0x6d476420, 0x317fd: 0x6d476620, 0x317fe: 0x6d756420, 0x317ff: 0x6ddf5220, + // Block 0xc60, offset 0x31800 + 0x31800: 0x6df79a20, 0x31801: 0x6e0b2a20, 0x31802: 0x6e30dc20, 0x31803: 0x6ce8b420, + 0x31804: 0x6ce8b620, 0x31805: 0x6d9f3420, 0x31806: 0x6d9f3620, 0x31807: 0x6dc19420, + 0x31808: 0x6dc19620, 0x31809: 0x6dc19820, 0x3180a: 0x6ddf5a20, 0x3180b: 0x6ddf5c20, + 0x3180c: 0x6e3c4c20, 0x3180d: 0x6ce8b820, 0x3180e: 0x6d758020, 0x3180f: 0x6dc1a820, + 0x31810: 0x6e278420, 0x31811: 0x6ce8ba20, 0x31812: 0x6cb79620, 0x31813: 0x6d758a20, + 0x31814: 0x6d9f4c20, 0x31815: 0x6d9f4e20, 0x31816: 0x6d9f5020, 0x31817: 0x6d9f5220, + 0x31818: 0x6d9f5420, 0x31819: 0x6d585420, 0x3181a: 0x6dc1c220, 0x3181b: 0x6dc1c420, + 0x3181c: 0x6dc1c620, 0x3181d: 0x6dc1c820, 0x3181e: 0x6dc1ca20, 0x3181f: 0x6ddf7220, + 0x31820: 0x6ddf7420, 0x31821: 0x6ddf7620, 0x31822: 0x6df7c620, 0x31823: 0x6df7c820, + 0x31824: 0x6e0b5420, 0x31825: 0x6e0b5620, 0x31826: 0x6e0b5820, 0x31827: 0x6e0b5a20, + 0x31828: 0x6e0b5c20, 0x31829: 0x6e0b5e20, 0x3182a: 0x6e0b6020, 0x3182b: 0x6e1b2020, + 0x3182c: 0x6e1b2220, 0x3182d: 0x6e1b2420, 0x3182e: 0x6e1b2620, 0x3182f: 0x6e1b2820, + 0x31830: 0x6e278820, 0x31831: 0x6e278a20, 0x31832: 0x6e30f220, 0x31833: 0x6e30f420, + 0x31834: 0x6e30f620, 0x31835: 0x6e3c5820, 0x31836: 0x6e3fc820, 0x31837: 0x6e423420, + 0x31838: 0x6e43f420, 0x31839: 0x6ce8be20, 0x3183a: 0x6d9f7220, 0x3183b: 0x6dc1e620, + 0x3183c: 0x6df7e020, 0x3183d: 0x6d187420, 0x3183e: 0x6c42e420, 0x3183f: 0x6dc1e820, + // Block 0xc61, offset 0x31840 + 0x31840: 0x6ddf8e20, 0x31841: 0x6ddf9020, 0x31842: 0x6ddf9220, 0x31843: 0x6df7e420, + 0x31844: 0x6df7e620, 0x31845: 0x6e1b6620, 0x31846: 0x6e310c20, 0x31847: 0x6e310e20, + 0x31848: 0x6e3c7020, 0x31849: 0x6e3c7220, 0x3184a: 0x6e3fd420, 0x3184b: 0x6ce8c020, + 0x3184c: 0x6d187620, 0x3184d: 0x6e0b9620, 0x3184e: 0x6d187820, 0x3184f: 0x6d75a020, + 0x31850: 0x6d75a220, 0x31851: 0x6d75a420, 0x31852: 0x6d9f7820, 0x31853: 0x6d187a20, + 0x31854: 0x6d187c20, 0x31855: 0x6ddfaa20, 0x31856: 0x6ddfac20, 0x31857: 0x6df7f820, + 0x31858: 0x6e1b6e20, 0x31859: 0x6e1b7020, 0x3185a: 0x6e1b7220, 0x3185b: 0x6e1b7420, + 0x3185c: 0x6e311420, 0x3185d: 0x6e3c7a20, 0x3185e: 0x6e37ec20, 0x3185f: 0x6e3c7c20, + 0x31860: 0x6d188020, 0x31861: 0x6c42e620, 0x31862: 0x6dc20220, 0x31863: 0x6dc20420, + 0x31864: 0x6dc20620, 0x31865: 0x6ddfb820, 0x31866: 0x6ddfba20, 0x31867: 0x6ddfbc20, + 0x31868: 0x6ddfbe20, 0x31869: 0x6ddfc020, 0x3186a: 0x6ddfc220, 0x3186b: 0x6ddfc420, + 0x3186c: 0x6ddfc620, 0x3186d: 0x6df80c20, 0x3186e: 0x6e0ba420, 0x3186f: 0x6e0ba620, + 0x31870: 0x6e0ba820, 0x31871: 0x6e1b8020, 0x31872: 0x6e27d820, 0x31873: 0x6e27da20, + 0x31874: 0x6e27dc20, 0x31875: 0x6e27de20, 0x31876: 0x6e311c20, 0x31877: 0x6e311e20, + 0x31878: 0x6e312020, 0x31879: 0x6e312220, 0x3187a: 0x6e440020, 0x3187b: 0x6d478020, + 0x3187c: 0x6d9f8820, 0x3187d: 0x6d9f8a20, 0x3187e: 0x6dc22020, 0x3187f: 0x6dc22220, + // Block 0xc62, offset 0x31880 + 0x31880: 0x6df82220, 0x31881: 0x6df82420, 0x31882: 0x6e27f420, 0x31883: 0x6e313820, + 0x31884: 0x6e313a20, 0x31885: 0x6e380020, 0x31886: 0x6e380220, 0x31887: 0x6e3c9220, + 0x31888: 0x6e424e20, 0x31889: 0x6e46fc20, 0x3188a: 0x6d478220, 0x3188b: 0x6dc22c20, + 0x3188c: 0x6ddfec20, 0x3188d: 0x6df83420, 0x3188e: 0x6e1b9a20, 0x3188f: 0x6e314420, + 0x31890: 0x6c15e220, 0x31891: 0x6d75b420, 0x31892: 0x6d75b620, 0x31893: 0x6d9f9220, + 0x31894: 0x6dc23020, 0x31895: 0x6ddff620, 0x31896: 0x6df83e20, 0x31897: 0x6df84020, + 0x31898: 0x6df84220, 0x31899: 0x6e0bda20, 0x3189a: 0x6e0bdc20, 0x3189b: 0x6e0bde20, + 0x3189c: 0x6e1b9e20, 0x3189d: 0x6e0be020, 0x3189e: 0x6e0be220, 0x3189f: 0x6e0be420, + 0x318a0: 0x6e0be620, 0x318a1: 0x6e0be820, 0x318a2: 0x6dc23a20, 0x318a3: 0x6e0bea20, + 0x318a4: 0x6e1ba420, 0x318a5: 0x6e1ba620, 0x318a6: 0x6e1ba820, 0x318a7: 0x6e1baa20, + 0x318a8: 0x6e1bac20, 0x318a9: 0x6e1bae20, 0x318aa: 0x6e280020, 0x318ab: 0x6e280220, + 0x318ac: 0x6e280420, 0x318ad: 0x6e314a20, 0x318ae: 0x6e314c20, 0x318af: 0x6e314e20, + 0x318b0: 0x6e315020, 0x318b1: 0x6e315220, 0x318b2: 0x6e381220, 0x318b3: 0x6e381420, + 0x318b4: 0x6e381620, 0x318b5: 0x6e381820, 0x318b6: 0x6e381a20, 0x318b7: 0x6e381c20, + 0x318b8: 0x6e3ca820, 0x318b9: 0x6e3caa20, 0x318ba: 0x6e3cac20, 0x318bb: 0x6e3cae20, + 0x318bc: 0x6e440620, 0x318bd: 0x6e440820, 0x318be: 0x6e46dc20, 0x318bf: 0x6c42e820, + // Block 0xc63, offset 0x318c0 + 0x318c0: 0x6c8aee20, 0x318c1: 0x6cb79820, 0x318c2: 0x6ce8c420, 0x318c3: 0x6d188220, + 0x318c4: 0x6d188420, 0x318c5: 0x6d188620, 0x318c6: 0x6d188820, 0x318c7: 0x6d478620, + 0x318c8: 0x6d478820, 0x318c9: 0x6d75ba20, 0x318ca: 0x6d75bc20, 0x318cb: 0x6dc23c20, + 0x318cc: 0x6dc23e20, 0x318cd: 0x6d9f9c20, 0x318ce: 0x6de00020, 0x318cf: 0x6df85a20, + 0x318d0: 0x6de23620, 0x318d1: 0x6e0c1220, 0x318d2: 0x6e1be220, 0x318d3: 0x6e283820, + 0x318d4: 0x6e283a20, 0x318d5: 0x6e283c20, 0x318d6: 0x6e467820, 0x318d7: 0x6e46a820, + 0x318d8: 0x6e473c20, 0x318d9: 0x6c0aca20, 0x318da: 0x6cb79a20, 0x318db: 0x6cb79c20, + 0x318dc: 0x6d9f9e20, 0x318dd: 0x6e1bea20, 0x318de: 0x6e441620, 0x318df: 0x6c28ac20, + 0x318e0: 0x6dc24220, 0x318e1: 0x6e1c0020, 0x318e2: 0x6e284620, 0x318e3: 0x6e3cda20, + 0x318e4: 0x6e3ffc20, 0x318e5: 0x6e3ffe20, 0x318e6: 0x6d585620, 0x318e7: 0x6d7e6e20, + 0x318e8: 0x6c670020, 0x318e9: 0x6db26c20, 0x318ea: 0x6c610620, 0x318eb: 0x6ce29e20, + 0x318ec: 0x6d974220, 0x318ed: 0x6e186020, 0x318ee: 0x6e41aa20, 0x318ef: 0x6d135620, + 0x318f0: 0x6c04aa20, 0x318f1: 0x6c079420, 0x318f2: 0x6dd85820, 0x318f3: 0x6d789a20, + 0x318f4: 0x6c006420, 0x318f5: 0x6c01f820, 0x318f6: 0x6c03d220, 0x318f7: 0x6c0a5820, + 0x318f8: 0x6c083c20, 0x318f9: 0x6c0c7020, 0x318fa: 0x6c2bb820, 0x318fb: 0x6ded8620, + 0x318fc: 0x6da1a620, 0x318fd: 0x6d585820, 0x318fe: 0x6d00ea20, 0x318ff: 0x6cae1c20, + // Block 0xc64, offset 0x31900 + 0x31900: 0x6e134020, 0x31901: 0x6d0e4820, 0x31902: 0x6dd6dc20, 0x31903: 0x6cd37020, + 0x31904: 0x6c749620, 0x31905: 0x6daca820, 0x31906: 0x6c3cfa20, 0x31907: 0x6c29c820, + 0x31908: 0x6c1efa20, 0x31909: 0x6c1efc20, 0x3190a: 0x6cad0e20, 0x3190b: 0x6db51620, + // Block 0xc65, offset 0x31940 + 0x31940: 0x6c86d020, 0x31941: 0x6c219c20, 0x31942: 0x6c270e20, 0x31943: 0x6d0f3a20, + 0x31944: 0x6cfa9420, 0x31945: 0x6c160020, 0x31946: 0x6c073820, 0x31947: 0x6d9f9e20, + 0x31948: 0x6d9f9e20, 0x31949: 0x6c490c20, 0x3194a: 0x6c41dc20, 0x3194b: 0x6cbab020, + 0x3194c: 0x6c2eb020, 0x3194d: 0x6de28c20, 0x3194e: 0x6e102820, 0x3194f: 0x6de9ba20, + 0x31950: 0x6e2b8e20, 0x31951: 0x6db3f420, 0x31952: 0x6d3b6a20, 0x31953: 0x6e2d0820, + 0x31954: 0x6d540620, 0x31955: 0x6c542820, 0x31956: 0x6c782020, 0x31957: 0x6c79ee20, + 0x31958: 0x6d09ae20, 0x31959: 0x6d128020, 0x3195a: 0x6d9bda20, 0x3195b: 0x6ce8d220, + 0x3195c: 0x6c18d820, 0x3195d: 0x6e0e7820, 0x3195e: 0x6e0f8220, 0x3195f: 0x6e12b420, + 0x31960: 0x6e458e20, 0x31961: 0x6cc0c020, 0x31962: 0x6da7c620, 0x31963: 0x6dd18820, + 0x31964: 0x6e01ee20, 0x31965: 0x6c348020, 0x31966: 0x6dea2c20, 0x31967: 0x6e135e20, + 0x31968: 0x6cc21820, 0x31969: 0x6c73be20, 0x3196a: 0x6c769c20, 0x3196b: 0x6c795620, + 0x3196c: 0x6c620220, 0x3196d: 0x6c297820, 0x3196e: 0x6c179420, 0x3196f: 0x6cb9b220, + 0x31970: 0x6d7cd420, 0x31971: 0x6de3da20, 0x31972: 0x6dfc5620, 0x31973: 0x6d868620, + 0x31974: 0x6c144420, 0x31975: 0x6e008a20, 0x31976: 0x6d0bc020, 0x31977: 0x6d103820, + 0x31978: 0x6e16b020, 0x31979: 0x6d73ae20, 0x3197a: 0x6e371620, 0x3197b: 0x6d027820, + 0x3197c: 0x6d032420, 0x3197d: 0x6d33d820, 0x3197e: 0x6cdb3420, 0x3197f: 0x6d96bc20, + // Block 0xc66, offset 0x31980 + 0x31980: 0x6cb78620, 0x31981: 0x6d68ec20, 0x31982: 0x6de11020, 0x31983: 0x6c1e9220, + 0x31984: 0x6e1f9e20, 0x31985: 0x6e206020, 0x31986: 0x6c23f020, 0x31987: 0x6d5d2420, + 0x31988: 0x6d0f2e20, 0x31989: 0x6d152020, 0x3198a: 0x6dc3e620, 0x3198b: 0x6d1fe020, + 0x3198c: 0x6d542620, 0x3198d: 0x6c9f4220, 0x3198e: 0x6d295820, 0x3198f: 0x6ca91620, + 0x31990: 0x6daf5020, 0x31991: 0x6c62d820, 0x31992: 0x6c8d4420, 0x31993: 0x6c145c20, + 0x31994: 0x6d487e20, 0x31995: 0x6c65d820, 0x31996: 0x6d03ae20, 0x31997: 0x6d341420, + 0x31998: 0x6cdb8220, 0x31999: 0x6cb5fc20, 0x3199a: 0x6e21cc20, 0x3199b: 0x6c4ef420, + 0x3199c: 0x6d540620, 0x3199d: 0x6d927c20, 0x3199e: 0x6c024220, 0x3199f: 0x6d1f5620, + 0x319a0: 0x6c4d8620, 0x319a1: 0x6ca2d620, 0x319a2: 0x6ca3e620, 0x319a3: 0x6c06c620, + 0x319a4: 0x6dac3420, 0x319a5: 0x6c438020, 0x319a6: 0x6cc2d420, 0x319a7: 0x6c021a20, + 0x319a8: 0x6c38c420, 0x319a9: 0x6d527e20, 0x319aa: 0x6c803a20, 0x319ab: 0x6c8de620, + 0x319ac: 0x6ced8620, 0x319ad: 0x6c599e20, 0x319ae: 0x6d09c620, 0x319af: 0x6d3c9420, + 0x319b0: 0x6c9e2620, 0x319b1: 0x6c272020, 0x319b2: 0x6c22fc20, 0x319b3: 0x6c4f3820, + 0x319b4: 0x6c5eb420, 0x319b5: 0x6c997820, 0x319b6: 0x6ca3de20, 0x319b7: 0x6c433620, + 0x319b8: 0x6c2a4c20, 0x319b9: 0x6c65d220, 0x319ba: 0x6c9c8020, 0x319bb: 0x6dce7a20, + 0x319bc: 0x6c263620, 0x319bd: 0x6d68e420, 0x319be: 0x6ce47020, 0x319bf: 0x6da05e20, + // Block 0xc67, offset 0x319c0 + 0x319c0: 0x6c199220, 0x319c1: 0x6c019420, 0x319c2: 0x6de23220, 0x319c3: 0x6c72c420, + 0x319c4: 0x6dc8dc20, 0x319c5: 0x6dfe0220, 0x319c6: 0x6d6f2820, 0x319c7: 0x6e44c220, + 0x319c8: 0x6df75420, 0x319c9: 0x6d758020, 0x319ca: 0x6c00a820, 0x319cb: 0x6d7e5e20, + 0x319cc: 0x6d80f220, 0x319cd: 0x6e22bc20, 0x319ce: 0x6c10da20, 0x319cf: 0x6d4fbc20, + 0x319d0: 0x6e28d020, 0x319d1: 0x6d515420, 0x319d2: 0x6d297c20, 0x319d3: 0x6cfc0c20, + 0x319d4: 0x6d5a3c20, 0x319d5: 0x6c3d4620, 0x319d6: 0x6d60c620, 0x319d7: 0x6db0a020, + 0x319d8: 0x6d6bf020, 0x319d9: 0x6d642020, 0x319da: 0x6cb37e20, 0x319db: 0x6db9b220, + 0x319dc: 0x6c0cfc20, 0x319dd: 0x6c0d4020, 0x319de: 0x6c46c420, 0x319df: 0x6c77fe20, + 0x319e0: 0x6cde9a20, 0x319e1: 0x6d3c9420, 0x319e2: 0x6cf17420, 0x319e3: 0x6c32f220, + 0x319e4: 0x6c993220, 0x319e5: 0x6da72420, 0x319e6: 0x6de83e20, 0x319e7: 0x6dca5a20, + 0x319e8: 0x6c05e820, 0x319e9: 0x6c2d8820, 0x319ea: 0x6d1f5620, 0x319eb: 0x6da2f220, + 0x319ec: 0x6c333420, 0x319ed: 0x6c573a20, 0x319ee: 0x6d5a0620, 0x319ef: 0x6caa3420, + 0x319f0: 0x6caada20, 0x319f1: 0x6d12d220, 0x319f2: 0x6d151e20, 0x319f3: 0x6e359c20, + 0x319f4: 0x6d442e20, 0x319f5: 0x6c298220, 0x319f6: 0x6dcca820, 0x319f7: 0x6e043820, + 0x319f8: 0x6dbbb220, 0x319f9: 0x6cc32e20, 0x319fa: 0x6c006a20, 0x319fb: 0x6d18e420, + 0x319fc: 0x6d4cd620, 0x319fd: 0x6c1cfc20, 0x319fe: 0x6c729c20, 0x319ff: 0x6d540620, + // Block 0xc68, offset 0x31a00 + 0x31a00: 0x6d834420, 0x31a01: 0x6daa7820, 0x31a02: 0x6d643a20, 0x31a03: 0x6d95ae20, + 0x31a04: 0x6d9f9c20, 0x31a05: 0x6cf5f820, 0x31a06: 0x6c283820, 0x31a07: 0x6d48a020, + 0x31a08: 0x6c368e20, 0x31a09: 0x6c521a20, 0x31a0a: 0x6c546e20, 0x31a0b: 0x6cfa3020, + 0x31a0c: 0x6c7a1820, 0x31a0d: 0x6c7ac820, 0x31a0e: 0x6cd45220, 0x31a0f: 0x6c801620, + 0x31a10: 0x6df30020, 0x31a11: 0x6c02d820, 0x31a12: 0x6d50c420, 0x31a13: 0x6cb60220, + 0x31a14: 0x6c64a820, 0x31a15: 0x6c945a20, 0x31a16: 0x6c9f6220, 0x31a17: 0x6d6bf820, + 0x31a18: 0x6c4d5820, 0x31a19: 0x6cf2a220, 0x31a1a: 0x6c73f020, 0x31a1b: 0x6ca2d620, + 0x31a1c: 0x6ce61620, 0x31a1d: 0x6c17f820, 0x31a1e: 0x6c0e4220, 0x31a1f: 0x6d4d6420, + 0x31a20: 0x6c35ea20, 0x31a21: 0x6c21ce20, 0x31a22: 0x6c9cce20, 0x31a23: 0x6c38f420, + 0x31a24: 0x6ca30c20, 0x31a25: 0x6cd24620, 0x31a26: 0x6d8bbe20, 0x31a27: 0x6d0cea20, + 0x31a28: 0x6d0d0c20, 0x31a29: 0x6c27f020, 0x31a2a: 0x6dd9bc20, 0x31a2b: 0x6c8d9420, + 0x31a2c: 0x6cfa6c20, 0x31a2d: 0x6c194820, 0x31a2e: 0x6d834820, 0x31a2f: 0x6d84e820, + 0x31a30: 0x6e007220, 0x31a31: 0x6d6f9220, 0x31a32: 0x6e2f7020, 0x31a33: 0x6e30b220, + 0x31a34: 0x6c36c420, 0x31a35: 0x6c9f2420, 0x31a36: 0x6db16420, 0x31a37: 0x6c0a4420, + 0x31a38: 0x6ca80e20, 0x31a39: 0x6ca89c20, 0x31a3a: 0x6c3ab620, 0x31a3b: 0x6c39cc20, + 0x31a3c: 0x6ded7c20, 0x31a3d: 0x6c029620, 0x31a3e: 0x6c83b820, 0x31a3f: 0x6c2ae020, + // Block 0xc69, offset 0x31a40 + 0x31a40: 0x6c032820, 0x31a41: 0x6c4c8220, 0x31a42: 0x6c349220, 0x31a43: 0x6d8a6620, + 0x31a44: 0x6c0fbc20, 0x31a45: 0x6c542c20, 0x31a46: 0x6d531620, 0x31a47: 0x6d952420, + 0x31a48: 0x6c14d020, 0x31a49: 0x6c62dc20, 0x31a4a: 0x6c26a020, 0x31a4b: 0x6d212a20, + 0x31a4c: 0x6c014620, 0x31a4d: 0x6ceb7220, 0x31a4e: 0x6ceb3420, 0x31a4f: 0x6c69d820, + 0x31a50: 0x6ced7e20, 0x31a51: 0x6cc0dc20, 0x31a52: 0x6cc79a20, 0x31a53: 0x6cf79a20, + 0x31a54: 0x6d26f820, 0x31a55: 0x6d769020, 0x31a56: 0x6ca29820, 0x31a57: 0x6c7bf820, + 0x31a58: 0x6c13f620, 0x31a59: 0x6c7de220, 0x31a5a: 0x6ca69620, 0x31a5b: 0x6d30ce20, + 0x31a5c: 0x6d155620, 0x31a5d: 0x6d335420, 0x31a5e: 0x6c144220, 0x31a5f: 0x6deabe20, + 0x31a60: 0x6e015420, 0x31a61: 0x6caea820, 0x31a62: 0x6d697820, 0x31a63: 0x6cb20820, + 0x31a64: 0x6c412e20, 0x31a65: 0x6ce32420, 0x31a66: 0x6cb42820, 0x31a67: 0x6d6e4820, + 0x31a68: 0x6d974420, 0x31a69: 0x6d149c20, 0x31a6a: 0x6ce7aa20, 0x31a6b: 0x6d16a820, + 0x31a6c: 0x6d9b2420, 0x31a6d: 0x6e1a2020, 0x31a6e: 0x6c888620, 0x31a6f: 0x6d98c020, + 0x31a70: 0x6c435e20, 0x31a71: 0x6d18fe20, 0x31a72: 0x6c173820, 0x31a73: 0x6c456020, + 0x31a74: 0x6cea9c20, 0x31a75: 0x6c2bac20, 0x31a76: 0x6cbada20, 0x31a77: 0x6d1b7220, + 0x31a78: 0x6d773620, 0x31a79: 0x6cbcc820, 0x31a7a: 0x6d758820, 0x31a7b: 0x6d4d6220, + 0x31a7c: 0x6c01b620, 0x31a7d: 0x6c6fc020, 0x31a7e: 0x6cc3aa20, 0x31a7f: 0x6d4fb820, + // Block 0xc6a, offset 0x31a80 + 0x31a80: 0x6de28220, 0x31a81: 0x6c9ab020, 0x31a82: 0x6c50ac20, 0x31a83: 0x6cc7b820, + 0x31a84: 0x6c9c8820, 0x31a85: 0x6c76b620, 0x31a86: 0x6c9fb820, 0x31a87: 0x6d297a20, + 0x31a88: 0x6cce4620, 0x31a89: 0x6c04d820, 0x31a8a: 0x6cd0a820, 0x31a8b: 0x6d028220, + 0x31a8c: 0x6c3cee20, 0x31a8d: 0x6c5ad020, 0x31a8e: 0x6c5ace20, 0x31a8f: 0x6c7dc620, + 0x31a90: 0x6c7dd220, 0x31a91: 0x6c7de020, 0x31a92: 0x6d30ca20, 0x31a93: 0x6d30cc20, + 0x31a94: 0x6d5e0420, 0x31a95: 0x6c5ba420, 0x31a96: 0x6d051020, 0x31a97: 0x6d60c620, + 0x31a98: 0x6d8abc20, 0x31a99: 0x6daf6420, 0x31a9a: 0x6d071220, 0x31a9b: 0x6c3e3620, + 0x31a9c: 0x6c82de20, 0x31a9d: 0x6c020420, 0x31a9e: 0x6c020420, 0x31a9f: 0x6cdbee20, + 0x31aa0: 0x6d678620, 0x31aa1: 0x6ca6aa20, 0x31aa2: 0x6d928220, 0x31aa3: 0x6dd48e20, + 0x31aa4: 0x6d3d8420, 0x31aa5: 0x6dee3c20, 0x31aa6: 0x6c051e20, 0x31aa7: 0x6ce32420, + 0x31aa8: 0x6df1b220, 0x31aa9: 0x6e06f620, 0x31aaa: 0x6d9a4a20, 0x31aab: 0x6c6f8420, + 0x31aac: 0x6cfce020, 0x31aad: 0x6d8d8a20, + 0x31ab0: 0x6c28ae20, 0x31ab1: 0x6c179020, 0x31ab2: 0x6c0c5a20, 0x31ab3: 0x6c296c20, + 0x31ab4: 0x6c061420, 0x31ab5: 0x6d767a20, 0x31ab6: 0x6c455c20, 0x31ab7: 0x6c016420, + 0x31ab8: 0x6cbada20, 0x31ab9: 0x6c8e9a20, 0x31aba: 0x6cbad220, 0x31abb: 0x6cebb420, + 0x31abc: 0x6ced7e20, 0x31abd: 0x6d4b0420, 0x31abe: 0x6c2ea820, 0x31abf: 0x6c2ef220, + // Block 0xc6b, offset 0x31ac0 + 0x31ac0: 0x6c924620, 0x31ac1: 0x6d79de20, 0x31ac2: 0x6d212820, 0x31ac3: 0x6d216c20, + 0x31ac4: 0x6c96ac20, 0x31ac5: 0x6cf1fa20, 0x31ac6: 0x6c97b620, 0x31ac7: 0x6cf2b020, + 0x31ac8: 0x6cf25620, 0x31ac9: 0x6d4fb820, 0x31aca: 0x6d224e20, 0x31acb: 0x6de28220, + 0x31acc: 0x6da46c20, 0x31acd: 0x6cc4ee20, 0x31ace: 0x6cf40620, 0x31acf: 0x6cc56820, + 0x31ad0: 0x6c9abe20, 0x31ad1: 0x6cc79a20, 0x31ad2: 0x6c73be20, 0x31ad3: 0x6c9c2220, + 0x31ad4: 0x6c21de20, 0x31ad5: 0x6c04ae20, 0x31ad6: 0x6c9e2620, 0x31ad7: 0x6c546e20, + 0x31ad8: 0x6cfaa420, 0x31ad9: 0x6cccf220, 0x31ada: 0x6d297a20, 0x31adb: 0x6de4d620, + 0x31adc: 0x6cce4620, 0x31add: 0x6dab6420, 0x31ade: 0x6da93020, 0x31adf: 0x6c09de20, + 0x31ae0: 0x6ca29820, 0x31ae1: 0x6d2d0620, 0x31ae2: 0x6d2dac20, 0x31ae3: 0x6c3be220, + 0x31ae4: 0x6d5b5220, 0x31ae5: 0x6d5b3020, 0x31ae6: 0x6c7bf820, 0x31ae7: 0x6ca4d020, + 0x31ae8: 0x6c3c8820, 0x31ae9: 0x6cd36020, 0x31aea: 0x6ca59220, 0x31aeb: 0x6d5d2820, + 0x31aec: 0x6d5e7620, 0x31aed: 0x6d051020, 0x31aee: 0x6c5c3a20, 0x31aef: 0x6d061420, + 0x31af0: 0x6d60c620, 0x31af1: 0x6cd85420, 0x31af2: 0x6c3e3620, 0x31af3: 0x6c83e820, + 0x31af4: 0x6cdb7e20, 0x31af5: 0x6d900a20, 0x31af6: 0x6db50820, 0x31af7: 0x6dd40e20, + 0x31af8: 0x6ca6aa20, 0x31af9: 0x6d68be20, 0x31afa: 0x6d697820, 0x31afb: 0x6d68d620, + 0x31afc: 0x6d928220, 0x31afd: 0x6d927c20, 0x31afe: 0x6d925c20, 0x31aff: 0x6dd48e20, + // Block 0xc6c, offset 0x31b00 + 0x31b00: 0x6e2c4c20, 0x31b01: 0x6dee3c20, 0x31b02: 0x6d951e20, 0x31b03: 0x6d959e20, + 0x31b04: 0x6db93e20, 0x31b05: 0x6d40e620, 0x31b06: 0x6cb60820, 0x31b07: 0x6df1b220, + 0x31b08: 0x6d155620, 0x31b09: 0x6e06d420, 0x31b0a: 0x6e06f620, 0x31b0b: 0x6d15fc20, + 0x31b0c: 0x6d9a4a20, 0x31b0d: 0x6e08b620, 0x31b0e: 0x6d9f9e20, 0x31b0f: 0x6d502220, + 0x31b10: 0x6d501620, 0x31b11: 0x6c36f420, 0x31b12: 0x6cf6d620, 0x31b13: 0x6c597a20, + 0x31b14: 0x6cd34020, 0x31b15: 0x6d5c7220, 0x31b16: 0x6dcdba20, 0x31b17: 0x6d0fcc20, + 0x31b18: 0x6e313820, 0x31b19: 0x6de00020, + // Block 0xc6d, offset 0x31b40 + 0x31b40: 0xf0001c1c, 0x31b41: 0xf0001c1c, 0x31b42: 0x00658c9c, + 0x31b50: 0x2c047483, 0x31b51: 0x2c0faa83, 0x31b52: 0x2c03a483, 0x31b53: 0xf0001c1c, + 0x31b54: 0x2c007483, 0x31b55: 0x2c0f1e83, 0x31b56: 0x2d0dc083, 0x31b57: 0x2c03de83, + 0x31b58: 0x2c0b5483, 0x31b59: 0x2c50d083, 0x31b5a: 0x2cce0683, 0x31b5b: 0x2c729c83, + 0x31b5c: 0x2c44fc83, 0x31b5d: 0x2c4d5a83, 0x31b5e: 0x2c0c7883, 0x31b5f: 0x2cf5a283, + 0x31b60: 0x2c17e083, 0x31b61: 0x2ca93c83, 0x31b62: 0x2c0a0283, 0x31b63: 0x2cb1a083, + 0x31b64: 0x2c1b6883, 0x31b65: 0x2c198083, 0x31b66: 0x2d295e83, 0x31b67: 0x2c208683, + 0x31b68: 0x2c714283, 0x31b69: 0x2c000283, 0x31b6a: 0x2c00dc83, 0x31b6b: 0x2d118683, + 0x31b6c: 0x2c089283, 0x31b6d: 0x2c023683, 0x31b6e: 0x2c075483, 0x31b6f: 0x2c4f4883, + 0x31b70: 0x2c26fc83, 0x31b71: 0x2c093e83, 0x31b72: 0x2d032883, 0x31b73: 0x2c3d6e83, + 0x31b74: 0x2c0e3483, 0x31b75: 0x2cccd883, 0x31b76: 0x2c127483, 0x31b77: 0x2c049c83, + 0x31b78: 0x2c0a1083, 0x31b79: 0x2cb95283, 0x31b7a: 0x2c901a83, + // Block 0xc6e, offset 0x31b80 + 0x31b80: 0xe000b653, 0x31b81: 0xe000b64b, 0x31b82: 0xe000b647, 0x31b83: 0xe000b657, + 0x31b84: 0xe000b65b, 0x31b85: 0xe000b64f, 0x31b86: 0xe000b663, 0x31b87: 0xe000b667, + 0x31b88: 0xe000b65f, + 0x31b90: 0x2c96d483, 0x31b91: 0x2c074c83, + // Block 0xc6f, offset 0x31bc0 + 0x31bc0: 0x6c003e20, 0x31bc1: 0x6c004020, 0x31bc2: 0x6c004220, 0x31bc3: 0x6c00e820, + 0x31bc4: 0x6c00ea20, 0x31bc5: 0x6c00ec20, 0x31bc6: 0x6c00ee20, 0x31bc7: 0x6c022820, + 0x31bc8: 0x6c022a20, 0x31bc9: 0x6c022c20, 0x31bca: 0x6c022e20, 0x31bcb: 0x6c023020, + 0x31bcc: 0x6c023220, 0x31bcd: 0x6c055220, 0x31bce: 0x6c055420, 0x31bcf: 0x6c055620, + 0x31bd0: 0x6c055820, 0x31bd1: 0x6c055a20, 0x31bd2: 0x6c055c20, 0x31bd3: 0x6c055e20, + 0x31bd4: 0x6c056020, 0x31bd5: 0x6c056220, 0x31bd6: 0x6c056420, 0x31bd7: 0x6c056620, + 0x31bd8: 0x6c0ada20, 0x31bd9: 0x6c0adc20, 0x31bda: 0x6c0ade20, 0x31bdb: 0x6c0f4220, + 0x31bdc: 0x6c0ae020, 0x31bdd: 0x6c0dac20, 0x31bde: 0x6c0ae220, 0x31bdf: 0x6c0ae420, + 0x31be0: 0x6c0ae620, 0x31be1: 0x6c15ec20, 0x31be2: 0x6c15ee20, 0x31be3: 0x6c15f020, + 0x31be4: 0x6c15f220, 0x31be5: 0x6c162c20, 0x31be6: 0x6c15f420, 0x31be7: 0x6c15f620, + 0x31be8: 0x6c15f820, 0x31be9: 0x6c0b3a20, 0x31bea: 0x6c15fa20, 0x31beb: 0x6c15fc20, + 0x31bec: 0x6c28b220, 0x31bed: 0x6c28b420, 0x31bee: 0x6c28b620, 0x31bef: 0x6c2d9420, + 0x31bf0: 0x6c28b820, 0x31bf1: 0x6c28ba20, 0x31bf2: 0x6c28bc20, 0x31bf3: 0x6c28be20, + 0x31bf4: 0x6c28c020, 0x31bf5: 0x6c42ea20, 0x31bf6: 0x6c42ec20, 0x31bf7: 0x6c470a20, + 0x31bf8: 0x6c42ee20, 0x31bf9: 0x6c470c20, 0x31bfa: 0x6c42f020, 0x31bfb: 0x6c42f220, + 0x31bfc: 0x6c6a8820, 0x31bfd: 0x6c63cc20, 0x31bfe: 0x6c63ce20, 0x31bff: 0x6c63d020, + // Block 0xc70, offset 0x31c00 + 0x31c00: 0x6c63d220, 0x31c01: 0x6c8af020, 0x31c02: 0x6c8af220, 0x31c03: 0x6c8af420, + 0x31c04: 0x6c8af620, 0x31c05: 0x6c8af820, 0x31c06: 0x6cb79e20, 0x31c07: 0x6cb7a020, + 0x31c08: 0x6cb7a220, 0x31c09: 0x6cb93420, 0x31c0a: 0x6cb7a420, 0x31c0b: 0x6cb7a620, + 0x31c0c: 0x6ce8ca20, 0x31c0d: 0x6ce8cc20, 0x31c0e: 0x6d188c20, 0x31c0f: 0x6d188e20, + 0x31c10: 0x6d189020, 0x31c11: 0x6d189220, 0x31c12: 0x6d189420, 0x31c13: 0x6d479020, + 0x31c14: 0x6d479220, 0x31c15: 0x6d75c220, 0x31c16: 0x6d9fa420, 0x31c17: 0x6d75c420, + 0x31c18: 0x6d75c620, 0x31c19: 0x6d75c820, 0x31c1a: 0x6d75ca20, 0x31c1b: 0x6d75cc20, + 0x31c1c: 0x6da01620, 0x31c1d: 0x6d75ce20, 0x31c1e: 0x6da57820, 0x31c1f: 0x6dc24420, + 0x31c20: 0x6df86a20, 0x31c21: 0x6c004620, 0x31c22: 0x6c004820, 0x31c23: 0x6c023e20, + 0x31c24: 0x6c079620, 0x31c25: 0x6c056a20, 0x31c26: 0x6c0aea20, 0x31c27: 0x6c160220, + 0x31c28: 0x6c160420, 0x31c29: 0x6c28c620, 0x31c2a: 0x6c28c820, 0x31c2b: 0x6c28ca20, + 0x31c2c: 0x6c28cc20, 0x31c2d: 0x6c42f820, 0x31c2e: 0x6c42fa20, 0x31c2f: 0x6c42fc20, + 0x31c30: 0x6c63da20, 0x31c31: 0x6c63dc20, 0x31c32: 0x6c15ae20, 0x31c33: 0x6c8afc20, + 0x31c34: 0x6cb7a820, 0x31c35: 0x6cb7aa20, 0x31c36: 0x6d189820, 0x31c37: 0x6d1bb420, + 0x31c38: 0x6d479420, 0x31c39: 0x6dc24620, 0x31c3a: 0x6de00420, 0x31c3b: 0x6e1c0420, + 0x31c3c: 0x6c010220, 0x31c3d: 0x6c010420, 0x31c3e: 0x6c026420, 0x31c3f: 0x6c024620, + // Block 0xc71, offset 0x31c40 + 0x31c40: 0x6c057020, 0x31c41: 0x6c057220, 0x31c42: 0x6c0aec20, 0x31c43: 0x6c63de20, + 0x31c44: 0x6ce8ce20, 0x31c45: 0x6d75d420, 0x31c46: 0x6c005620, 0x31c47: 0x6c005820, + 0x31c48: 0x6c005a20, 0x31c49: 0x6c005c20, 0x31c4a: 0x6c005e20, 0x31c4b: 0x6c011020, + 0x31c4c: 0x6c011220, 0x31c4d: 0x6c011420, 0x31c4e: 0x6c011620, 0x31c4f: 0x6c024e20, + 0x31c50: 0x6c025020, 0x31c51: 0x6c025220, 0x31c52: 0x6c025420, 0x31c53: 0x6c025620, + 0x31c54: 0x6c057c20, 0x31c55: 0x6c057e20, 0x31c56: 0x6c058020, 0x31c57: 0x6c058220, + 0x31c58: 0x6c058420, 0x31c59: 0x6c058620, 0x31c5a: 0x6c058820, 0x31c5b: 0x6c058a20, + 0x31c5c: 0x6c058c20, 0x31c5d: 0x6c058e20, 0x31c5e: 0x6c059020, 0x31c5f: 0x6c059220, + 0x31c60: 0x6c059420, 0x31c61: 0x6c059620, 0x31c62: 0x6c0af820, 0x31c63: 0x6c0afa20, + 0x31c64: 0x6c0afc20, 0x31c65: 0x6c0afe20, 0x31c66: 0x6c0b0020, 0x31c67: 0x6c0b0220, + 0x31c68: 0x6c149620, 0x31c69: 0x6c0b0420, 0x31c6a: 0x6c0b0620, 0x31c6b: 0x6c0b0820, + 0x31c6c: 0x6c0dd620, 0x31c6d: 0x6c0b0a20, 0x31c6e: 0x6c0dd820, 0x31c6f: 0x6c160820, + 0x31c70: 0x6c18ea20, 0x31c71: 0x6c227c20, 0x31c72: 0x6c28d220, 0x31c73: 0x6c28d420, + 0x31c74: 0x6c430420, 0x31c75: 0x6c3bd820, 0x31c76: 0x6c28d620, 0x31c77: 0x6c430620, + 0x31c78: 0x6c431c20, 0x31c79: 0x6c63e220, 0x31c7a: 0x6c63e420, 0x31c7b: 0x6c63e620, + 0x31c7c: 0x6c63e820, 0x31c7d: 0x6c63ea20, 0x31c7e: 0x6c63ec20, 0x31c7f: 0x6c8afe20, + // Block 0xc72, offset 0x31c80 + 0x31c80: 0x6c8b0020, 0x31c81: 0x6c8b0220, 0x31c82: 0x6c8b0420, 0x31c83: 0x6cb7ac20, + 0x31c84: 0x6cb7ae20, 0x31c85: 0x6d189a20, 0x31c86: 0x6ce8d020, 0x31c87: 0x6d479620, + 0x31c88: 0x6e284820, 0x31c89: 0x6c001620, 0x31c8a: 0x6c001820, 0x31c8b: 0x6c001a20, + 0x31c8c: 0x6c001c20, 0x31c8d: 0x6c001e20, 0x31c8e: 0x6c002020, 0x31c8f: 0x6c006620, + 0x31c90: 0x6c006820, 0x31c91: 0x6c002220, 0x31c92: 0x6c012620, 0x31c93: 0x6c012820, + 0x31c94: 0x6c012a20, 0x31c95: 0x6c026620, 0x31c96: 0x6c026820, 0x31c97: 0x6c026a20, + 0x31c98: 0x6c026c20, 0x31c99: 0x6c026e20, 0x31c9a: 0x6c027020, 0x31c9b: 0x6c027220, + 0x31c9c: 0x6c027420, 0x31c9d: 0x6c027620, 0x31c9e: 0x6c05a220, 0x31c9f: 0x6c05a420, + 0x31ca0: 0x6c05a620, 0x31ca1: 0x6c05a820, 0x31ca2: 0x6c05aa20, 0x31ca3: 0x6c05ac20, + 0x31ca4: 0x6c0b2c20, 0x31ca5: 0x6c0b2e20, 0x31ca6: 0x6c0b3020, 0x31ca7: 0x6c0b3220, + 0x31ca8: 0x6c0b3420, 0x31ca9: 0x6c161420, 0x31caa: 0x6c161620, 0x31cab: 0x6c24c020, + 0x31cac: 0x6c161820, 0x31cad: 0x6c28ea20, 0x31cae: 0x6c28ec20, 0x31caf: 0x6c28ee20, + 0x31cb0: 0x6c3bda20, 0x31cb1: 0x6c2fdc20, 0x31cb2: 0x6c431e20, 0x31cb3: 0x6c432020, + 0x31cb4: 0x6c432220, 0x31cb5: 0x6c432420, 0x31cb6: 0x6c432620, 0x31cb7: 0x6c432820, + 0x31cb8: 0x6c63f420, 0x31cb9: 0x6c63f620, 0x31cba: 0x6c63f820, 0x31cbb: 0x6c63fa20, + 0x31cbc: 0x6c8b1220, 0x31cbd: 0x6c8b1420, 0x31cbe: 0x6c8b1620, 0x31cbf: 0x6c8b1820, + // Block 0xc73, offset 0x31cc0 + 0x31cc0: 0x6c8b1a20, 0x31cc1: 0x6c8b1c20, 0x31cc2: 0x6c8b1e20, 0x31cc3: 0x6ce8d820, + 0x31cc4: 0x6ce8da20, 0x31cc5: 0x6d189c20, 0x31cc6: 0x6d189e20, 0x31cc7: 0x6d18a020, + 0x31cc8: 0x6d18a220, 0x31cc9: 0x6d9fa620, 0x31cca: 0x6de00820, 0x31ccb: 0x6df86c20, + 0x31ccc: 0x6c002620, 0x31ccd: 0x6c006c20, 0x31cce: 0x6c006e20, 0x31ccf: 0x6c007020, + 0x31cd0: 0x6c007220, 0x31cd1: 0x6c012e20, 0x31cd2: 0x6c027c20, 0x31cd3: 0x6c027e20, + 0x31cd4: 0x6c028020, 0x31cd5: 0x6c0b3c20, 0x31cd6: 0x6c162220, 0x31cd7: 0x6c162420, + 0x31cd8: 0x6c162620, 0x31cd9: 0x6c28f620, 0x31cda: 0x6c8b2220, 0x31cdb: 0x6cb7ba20, + 0x31cdc: 0x6d479820, 0x31cdd: 0x6d75d820, 0x31cde: 0x6c007620, 0x31cdf: 0x6c007820, + 0x31ce0: 0x6c007a20, 0x31ce1: 0x6c028e20, 0x31ce2: 0x6c0b4420, 0x31ce3: 0x6c0b4620, + 0x31ce4: 0x6c0b4820, 0x31ce5: 0x6c0b4a20, 0x31ce6: 0x6c0b4c20, 0x31ce7: 0x6c0b4e20, + 0x31ce8: 0x6c162e20, 0x31ce9: 0x6c163020, 0x31cea: 0x6c163220, 0x31ceb: 0x6c290220, + 0x31cec: 0x6c290420, 0x31ced: 0x6c290620, 0x31cee: 0x6c290820, 0x31cef: 0x6c290a20, + 0x31cf0: 0x6c432c20, 0x31cf1: 0x6c432e20, 0x31cf2: 0x6c433020, 0x31cf3: 0x6c433220, + 0x31cf4: 0x6c4d0220, 0x31cf5: 0x6c640220, 0x31cf6: 0x6c640420, 0x31cf7: 0x6c640620, + 0x31cf8: 0x6c640820, 0x31cf9: 0x6c8b2420, 0x31cfa: 0x6c8b2620, 0x31cfb: 0x6cb7be20, + 0x31cfc: 0x6ce8de20, 0x31cfd: 0x6ce8e020, 0x31cfe: 0x6ce8e220, 0x31cff: 0x6d18a620, + // Block 0xc74, offset 0x31d00 + 0x31d00: 0x6d479a20, 0x31d01: 0x6c029420, 0x31d02: 0x6c05b220, 0x31d03: 0x6c0b5c20, + 0x31d04: 0x6c0b5e20, 0x31d05: 0x6c0b6020, 0x31d06: 0x6c0b6220, 0x31d07: 0x6c0b6420, + 0x31d08: 0x6c163c20, 0x31d09: 0x6c163e20, 0x31d0a: 0x6c164020, 0x31d0b: 0x6c164220, + 0x31d0c: 0x6c291220, 0x31d0d: 0x6c291420, 0x31d0e: 0x6c291620, 0x31d0f: 0x6c291820, + 0x31d10: 0x6c291a20, 0x31d11: 0x6c291c20, 0x31d12: 0x6c291e20, 0x31d13: 0x6c434020, + 0x31d14: 0x6c434220, 0x31d15: 0x6c434420, 0x31d16: 0x6c640c20, 0x31d17: 0x6c6a8e20, + 0x31d18: 0x6c640e20, 0x31d19: 0x6c641020, 0x31d1a: 0x6c641220, 0x31d1b: 0x6c641420, + 0x31d1c: 0x6c641620, 0x31d1d: 0x6c641820, 0x31d1e: 0x6c8b2820, 0x31d1f: 0x6c8b2a20, + 0x31d20: 0x6c8b2c20, 0x31d21: 0x6c8b2e20, 0x31d22: 0x6c8b3020, 0x31d23: 0x6c8b3220, + 0x31d24: 0x6c8b3420, 0x31d25: 0x6c8b3620, 0x31d26: 0x6c8b3820, 0x31d27: 0x6c8b3a20, + 0x31d28: 0x6cb7c420, 0x31d29: 0x6cb7c620, 0x31d2a: 0x6cb7c820, 0x31d2b: 0x6cb7ca20, + 0x31d2c: 0x6cb7cc20, 0x31d2d: 0x6cb7ce20, 0x31d2e: 0x6cb7d020, 0x31d2f: 0x6cb7d220, + 0x31d30: 0x6cd41020, 0x31d31: 0x6cbd9c20, 0x31d32: 0x6cb7d420, 0x31d33: 0x6ce8ea20, + 0x31d34: 0x6ce8ec20, 0x31d35: 0x6ce8ee20, 0x31d36: 0x6ce8f020, 0x31d37: 0x6ce8f220, + 0x31d38: 0x6ce8f420, 0x31d39: 0x6cf16620, 0x31d3a: 0x6ce8f620, 0x31d3b: 0x6ce8f820, + 0x31d3c: 0x6ce8fa20, 0x31d3d: 0x6cf00420, 0x31d3e: 0x6d18aa20, 0x31d3f: 0x6d18ac20, + // Block 0xc75, offset 0x31d40 + 0x31d40: 0x6ce8fc20, 0x31d41: 0x6d479e20, 0x31d42: 0x6d47a020, 0x31d43: 0x6d47a220, + 0x31d44: 0x6d47a420, 0x31d45: 0x6d47a620, 0x31d46: 0x6d47a820, 0x31d47: 0x6d47aa20, + 0x31d48: 0x6d47ac20, 0x31d49: 0x6d47ae20, 0x31d4a: 0x6d49c820, 0x31d4b: 0x6d75dc20, + 0x31d4c: 0x6d75de20, 0x31d4d: 0x6d75e020, 0x31d4e: 0x6d75e220, 0x31d4f: 0x6d75e420, + 0x31d50: 0x6d75e620, 0x31d51: 0x6d75e820, 0x31d52: 0x6d75ea20, 0x31d53: 0x6d790e20, + 0x31d54: 0x6d75ec20, 0x31d55: 0x6d791020, 0x31d56: 0x6d75ee20, 0x31d57: 0x6d75f020, + 0x31d58: 0x6d75f220, 0x31d59: 0x6da20a20, 0x31d5a: 0x6dc24820, 0x31d5b: 0x6dc70c20, + 0x31d5c: 0x6ddfee20, 0x31d5d: 0x6de00a20, 0x31d5e: 0x6e0c3c20, 0x31d5f: 0x6e318620, + 0x31d60: 0x6e428220, 0x31d61: 0x6e442020, 0x31d62: 0x6c008220, 0x31d63: 0x6c014020, + 0x31d64: 0x6c014220, 0x31d65: 0x6c014420, 0x31d66: 0x6c02be20, 0x31d67: 0x6c02c020, + 0x31d68: 0x6c02c220, 0x31d69: 0x6c05fc20, 0x31d6a: 0x6c05fe20, 0x31d6b: 0x6c060020, + 0x31d6c: 0x6c060220, 0x31d6d: 0x6c060420, 0x31d6e: 0x6c06ac20, 0x31d6f: 0x6c060620, + 0x31d70: 0x6c060820, 0x31d71: 0x6c06d820, 0x31d72: 0x6c08d020, 0x31d73: 0x6c060a20, + 0x31d74: 0x6c0bfa20, 0x31d75: 0x6c0bfc20, 0x31d76: 0x6c0bfe20, 0x31d77: 0x6c0c0020, + 0x31d78: 0x6c0c0220, 0x31d79: 0x6c0c0420, 0x31d7a: 0x6c0c0620, 0x31d7b: 0x6c0c0820, + 0x31d7c: 0x6c0c0a20, 0x31d7d: 0x6c0c0c20, 0x31d7e: 0x6c0c0e20, 0x31d7f: 0x6c0c1020, + // Block 0xc76, offset 0x31d80 + 0x31d80: 0x6c0c1220, 0x31d81: 0x6c0c1420, 0x31d82: 0x6c0c1620, 0x31d83: 0x6c0c1820, + 0x31d84: 0x6c0c1a20, 0x31d85: 0x6c0c1c20, 0x31d86: 0x6c0c1e20, 0x31d87: 0x6c0c2020, + 0x31d88: 0x6c0c2220, 0x31d89: 0x6c0c2420, 0x31d8a: 0x6c0c2620, 0x31d8b: 0x6c0c2820, + 0x31d8c: 0x6c0c2a20, 0x31d8d: 0x6c0c2c20, 0x31d8e: 0x6c0c2e20, 0x31d8f: 0x6c0c3020, + 0x31d90: 0x6c0c3220, 0x31d91: 0x6c0c3420, 0x31d92: 0x6c0c5e20, 0x31d93: 0x6c0c3620, + 0x31d94: 0x6c0c3820, 0x31d95: 0x6c0c3a20, 0x31d96: 0x6c16ca20, 0x31d97: 0x6c16cc20, + 0x31d98: 0x6c16ce20, 0x31d99: 0x6c16d020, 0x31d9a: 0x6c16d220, 0x31d9b: 0x6c16d420, + 0x31d9c: 0x6c16d620, 0x31d9d: 0x6c16d820, 0x31d9e: 0x6c16da20, 0x31d9f: 0x6c16dc20, + 0x31da0: 0x6c16de20, 0x31da1: 0x6c16e020, 0x31da2: 0x6c16e220, 0x31da3: 0x6c16e420, + 0x31da4: 0x6c16e620, 0x31da5: 0x6c16e820, 0x31da6: 0x6c16ea20, 0x31da7: 0x6c16ec20, + 0x31da8: 0x6c16ee20, 0x31da9: 0x6c16f020, 0x31daa: 0x6c16f220, 0x31dab: 0x6c16f420, + 0x31dac: 0x6c16f620, 0x31dad: 0x6c16f820, 0x31dae: 0x6c16fa20, 0x31daf: 0x6c16fc20, + 0x31db0: 0x6c16fe20, 0x31db1: 0x6c170020, 0x31db2: 0x6c170220, 0x31db3: 0x6c170420, + 0x31db4: 0x6c170620, 0x31db5: 0x6c170820, 0x31db6: 0x6c170a20, 0x31db7: 0x6c170c20, + 0x31db8: 0x6c170e20, 0x31db9: 0x6c171020, 0x31dba: 0x6c171220, 0x31dbb: 0x6c171420, + 0x31dbc: 0x6c171620, 0x31dbd: 0x6c171820, 0x31dbe: 0x6c171a20, 0x31dbf: 0x6c171c20, + // Block 0xc77, offset 0x31dc0 + 0x31dc0: 0x6c171e20, 0x31dc1: 0x6c172020, 0x31dc2: 0x6c19c820, 0x31dc3: 0x6c29ca20, + 0x31dc4: 0x6c29cc20, 0x31dc5: 0x6c29ce20, 0x31dc6: 0x6c29d020, 0x31dc7: 0x6c29d220, + 0x31dc8: 0x6c29d420, 0x31dc9: 0x6c29d620, 0x31dca: 0x6c29d820, 0x31dcb: 0x6c29da20, + 0x31dcc: 0x6c29dc20, 0x31dcd: 0x6c29de20, 0x31dce: 0x6c29e020, 0x31dcf: 0x6c29e220, + 0x31dd0: 0x6c29e420, 0x31dd1: 0x6c29e620, 0x31dd2: 0x6c29e820, 0x31dd3: 0x6c29ea20, + 0x31dd4: 0x6c29ec20, 0x31dd5: 0x6c29ee20, 0x31dd6: 0x6c29f020, 0x31dd7: 0x6c29f220, + 0x31dd8: 0x6c29f420, 0x31dd9: 0x6c29f620, 0x31dda: 0x6c29f820, 0x31ddb: 0x6c29fa20, + 0x31ddc: 0x6c29fc20, 0x31ddd: 0x6c29fe20, 0x31dde: 0x6c2a0020, 0x31ddf: 0x6c2a0220, + 0x31de0: 0x6c2a0420, 0x31de1: 0x6c2a0620, 0x31de2: 0x6c2a0820, 0x31de3: 0x6c2a0a20, + 0x31de4: 0x6c305c20, 0x31de5: 0x6c2a0c20, 0x31de6: 0x6c2a0e20, 0x31de7: 0x6c2a1020, + 0x31de8: 0x6c2a1220, 0x31de9: 0x6c2a1420, 0x31dea: 0x6c2a1620, 0x31deb: 0x6c2a1820, + 0x31dec: 0x6c2a1a20, 0x31ded: 0x6c43de20, 0x31dee: 0x6c43e020, 0x31def: 0x6c43e220, + 0x31df0: 0x6c43e420, 0x31df1: 0x6c43e620, 0x31df2: 0x6c43e820, 0x31df3: 0x6c43ea20, + 0x31df4: 0x6c43ec20, 0x31df5: 0x6c43ee20, 0x31df6: 0x6c43f020, 0x31df7: 0x6c43f220, + 0x31df8: 0x6c43f420, 0x31df9: 0x6c43f620, 0x31dfa: 0x6c43f820, 0x31dfb: 0x6c43fa20, + 0x31dfc: 0x6c43fc20, 0x31dfd: 0x6c43fe20, 0x31dfe: 0x6c440020, 0x31dff: 0x6c440220, + // Block 0xc78, offset 0x31e00 + 0x31e00: 0x6c440420, 0x31e01: 0x6c440620, 0x31e02: 0x6c440820, 0x31e03: 0x6c440a20, + 0x31e04: 0x6c440c20, 0x31e05: 0x6c440e20, 0x31e06: 0x6c441020, 0x31e07: 0x6c441220, + 0x31e08: 0x6c441420, 0x31e09: 0x6c441620, 0x31e0a: 0x6c441820, 0x31e0b: 0x6c441a20, + 0x31e0c: 0x6c441c20, 0x31e0d: 0x6c441e20, 0x31e0e: 0x6c442020, 0x31e0f: 0x6c442220, + 0x31e10: 0x6c442420, 0x31e11: 0x6c442620, 0x31e12: 0x6c442820, 0x31e13: 0x6c442a20, + 0x31e14: 0x6c442c20, 0x31e15: 0x6c442e20, 0x31e16: 0x6c443020, 0x31e17: 0x6c443220, + 0x31e18: 0x6c443420, 0x31e19: 0x6c443620, 0x31e1a: 0x6c443820, 0x31e1b: 0x6c443a20, + 0x31e1c: 0x6c443c20, 0x31e1d: 0x6c443e20, 0x31e1e: 0x6c444020, 0x31e1f: 0x6c444220, + 0x31e20: 0x6c444420, 0x31e21: 0x6c444620, 0x31e22: 0x6c444820, 0x31e23: 0x6c64d220, + 0x31e24: 0x6c64d420, 0x31e25: 0x6c64d620, 0x31e26: 0x6c64d820, 0x31e27: 0x6c64da20, + 0x31e28: 0x6c64dc20, 0x31e29: 0x6c64de20, 0x31e2a: 0x6c64e020, 0x31e2b: 0x6c64e220, + 0x31e2c: 0x6c64e420, 0x31e2d: 0x6c64e620, 0x31e2e: 0x6c64e820, 0x31e2f: 0x6c64ea20, + 0x31e30: 0x6c64ec20, 0x31e31: 0x6c64ee20, 0x31e32: 0x6c64f020, 0x31e33: 0x6c64f220, + 0x31e34: 0x6c64f420, 0x31e35: 0x6c64f620, 0x31e36: 0x6c64f820, 0x31e37: 0x6c64fa20, + 0x31e38: 0x6c64fc20, 0x31e39: 0x6c64fe20, 0x31e3a: 0x6c650020, 0x31e3b: 0x6c650220, + 0x31e3c: 0x6c650420, 0x31e3d: 0x6c650620, 0x31e3e: 0x6c650820, 0x31e3f: 0x6c650a20, + // Block 0xc79, offset 0x31e40 + 0x31e40: 0x6c650c20, 0x31e41: 0x6c650e20, 0x31e42: 0x6c651020, 0x31e43: 0x6c651220, + 0x31e44: 0x6c651420, 0x31e45: 0x6c651620, 0x31e46: 0x6c651820, 0x31e47: 0x6c651a20, + 0x31e48: 0x6c651c20, 0x31e49: 0x6c651e20, 0x31e4a: 0x6c652020, 0x31e4b: 0x6c652220, + 0x31e4c: 0x6c652420, 0x31e4d: 0x6c652620, 0x31e4e: 0x6c652820, 0x31e4f: 0x6c652a20, + 0x31e50: 0x6c652c20, 0x31e51: 0x6c652e20, 0x31e52: 0x6c653020, 0x31e53: 0x6c653220, + 0x31e54: 0x6c653420, 0x31e55: 0x6c653620, 0x31e56: 0x6c653820, 0x31e57: 0x6c653a20, + 0x31e58: 0x6c653c20, 0x31e59: 0x6c653e20, 0x31e5a: 0x6c654020, 0x31e5b: 0x6c654220, + 0x31e5c: 0x6c654420, 0x31e5d: 0x6c654620, 0x31e5e: 0x6c654820, 0x31e5f: 0x6c654a20, + 0x31e60: 0x6c654c20, 0x31e61: 0x6c654e20, 0x31e62: 0x6c655020, 0x31e63: 0x6c655220, + 0x31e64: 0x6c655420, 0x31e65: 0x6c655620, 0x31e66: 0x6c655820, 0x31e67: 0x6c8bc620, + 0x31e68: 0x6c8bc820, 0x31e69: 0x6c8bca20, 0x31e6a: 0x6c8bcc20, 0x31e6b: 0x6c8bce20, + 0x31e6c: 0x6c8bd020, 0x31e6d: 0x6c8bd220, 0x31e6e: 0x6c8bd420, 0x31e6f: 0x6c8bd620, + 0x31e70: 0x6c8bd820, 0x31e71: 0x6c8bda20, 0x31e72: 0x6c8bdc20, 0x31e73: 0x6c8bde20, + 0x31e74: 0x6c8be020, 0x31e75: 0x6c8be220, 0x31e76: 0x6c8be420, 0x31e77: 0x6c8be620, + 0x31e78: 0x6c8be820, 0x31e79: 0x6c8bea20, 0x31e7a: 0x6c8bec20, 0x31e7b: 0x6c8bee20, + 0x31e7c: 0x6c8bf020, 0x31e7d: 0x6c8bf220, 0x31e7e: 0x6c8bf420, 0x31e7f: 0x6c8bf620, + // Block 0xc7a, offset 0x31e80 + 0x31e80: 0x6c8bf820, 0x31e81: 0x6c8bfa20, 0x31e82: 0x6c8bfc20, 0x31e83: 0x6c8bfe20, + 0x31e84: 0x6c8c0020, 0x31e85: 0x6c8c0220, 0x31e86: 0x6c8c0420, 0x31e87: 0x6c8c0620, + 0x31e88: 0x6c8c0820, 0x31e89: 0x6c8c0a20, 0x31e8a: 0x6c8c0c20, 0x31e8b: 0x6c8c0e20, + 0x31e8c: 0x6c8c1020, 0x31e8d: 0x6c8c1220, 0x31e8e: 0x6c8c1420, 0x31e8f: 0x6c8c1620, + 0x31e90: 0x6c8c1820, 0x31e91: 0x6c428e20, 0x31e92: 0x6c8c1a20, 0x31e93: 0x6c8c1c20, + 0x31e94: 0x6c8c1e20, 0x31e95: 0x6c8c2020, 0x31e96: 0x6c8c2220, 0x31e97: 0x6c8c2420, + 0x31e98: 0x6c8c2620, 0x31e99: 0x6c8c2820, 0x31e9a: 0x6c8c2a20, 0x31e9b: 0x6c8c2c20, + 0x31e9c: 0x6c8c2e20, 0x31e9d: 0x6c8c3020, 0x31e9e: 0x6c8c3220, 0x31e9f: 0x6c655a20, + 0x31ea0: 0x6c8c3420, 0x31ea1: 0x6c8c3620, 0x31ea2: 0x6c8c3820, 0x31ea3: 0x6c8c3a20, + 0x31ea4: 0x6c8c3c20, 0x31ea5: 0x6c8c3e20, 0x31ea6: 0x6c8c4020, 0x31ea7: 0x6c8c4220, + 0x31ea8: 0x6c8c4420, 0x31ea9: 0x6c8c4620, 0x31eaa: 0x6c8c4820, 0x31eab: 0x6c8c4a20, + 0x31eac: 0x6c8c4c20, 0x31ead: 0x6cb83e20, 0x31eae: 0x6cb84020, 0x31eaf: 0x6cb84220, + 0x31eb0: 0x6cb84420, 0x31eb1: 0x6cb84620, 0x31eb2: 0x6cb84820, 0x31eb3: 0x6cb84a20, + 0x31eb4: 0x6cb84c20, 0x31eb5: 0x6cb84e20, 0x31eb6: 0x6cb85020, 0x31eb7: 0x6cb85220, + 0x31eb8: 0x6cb85420, 0x31eb9: 0x6cb85620, 0x31eba: 0x6cb85820, 0x31ebb: 0x6cb85a20, + 0x31ebc: 0x6cb85c20, 0x31ebd: 0x6cb85e20, 0x31ebe: 0x6cb86020, 0x31ebf: 0x6cb86220, + // Block 0xc7b, offset 0x31ec0 + 0x31ec0: 0x6cb86420, 0x31ec1: 0x6cb86620, 0x31ec2: 0x6cb86820, 0x31ec3: 0x6cb86a20, + 0x31ec4: 0x6cb86c20, 0x31ec5: 0x6cb86e20, 0x31ec6: 0x6cb8d620, 0x31ec7: 0x6cb87020, + 0x31ec8: 0x6cb87220, 0x31ec9: 0x6cb87420, 0x31eca: 0x6cb87620, 0x31ecb: 0x6cb87820, + 0x31ecc: 0x6cb87a20, 0x31ecd: 0x6cb87c20, 0x31ece: 0x6cb87e20, 0x31ecf: 0x6cb88020, + 0x31ed0: 0x6cb88220, 0x31ed1: 0x6cb88420, 0x31ed2: 0x6cb88620, 0x31ed3: 0x6cb88820, + 0x31ed4: 0x6cb88a20, 0x31ed5: 0x6cb88c20, 0x31ed6: 0x6cb88e20, 0x31ed7: 0x6cb89020, + 0x31ed8: 0x6cb89220, 0x31ed9: 0x6cb89420, 0x31eda: 0x6cb89620, 0x31edb: 0x6cb89820, + 0x31edc: 0x6cb89a20, 0x31edd: 0x6cb89c20, 0x31ede: 0x6cbd9420, 0x31edf: 0x6cd2ce20, + 0x31ee0: 0x6cb89e20, 0x31ee1: 0x6cb8a020, 0x31ee2: 0x6cb8a220, 0x31ee3: 0x6cb8a420, + 0x31ee4: 0x6cb8a620, 0x31ee5: 0x6cb8a820, 0x31ee6: 0x6cb8aa20, 0x31ee7: 0x6cb8ac20, + 0x31ee8: 0x6cb8ae20, 0x31ee9: 0x6cb8b020, 0x31eea: 0x6ca52820, 0x31eeb: 0x6ce95420, + 0x31eec: 0x6ce95620, 0x31eed: 0x6ce95820, 0x31eee: 0x6ce95a20, 0x31eef: 0x6ce95c20, + 0x31ef0: 0x6ce95e20, 0x31ef1: 0x6ce96020, 0x31ef2: 0x6ce96220, 0x31ef3: 0x6ce96420, + 0x31ef4: 0x6ce96620, 0x31ef5: 0x6ce96820, 0x31ef6: 0x6ce96a20, 0x31ef7: 0x6ce96c20, + 0x31ef8: 0x6ce96e20, 0x31ef9: 0x6ce97020, 0x31efa: 0x6ce97220, 0x31efb: 0x6ce97420, + 0x31efc: 0x6ce97620, 0x31efd: 0x6ce97820, 0x31efe: 0x6ce97a20, 0x31eff: 0x6ce97c20, + // Block 0xc7c, offset 0x31f00 + 0x31f00: 0x6ce97e20, 0x31f01: 0x6ce98020, 0x31f02: 0x6ce98220, 0x31f03: 0x6ce98420, + 0x31f04: 0x6ce98620, 0x31f05: 0x6ce98820, 0x31f06: 0x6ce98a20, 0x31f07: 0x6ce98c20, + 0x31f08: 0x6ce98e20, 0x31f09: 0x6ce99020, 0x31f0a: 0x6ce99220, 0x31f0b: 0x6ce99420, + 0x31f0c: 0x6ce99620, 0x31f0d: 0x6ce99820, 0x31f0e: 0x6ce99a20, 0x31f0f: 0x6ce99c20, + 0x31f10: 0x6ce99e20, 0x31f11: 0x6ce9a020, 0x31f12: 0x6ce9a220, 0x31f13: 0x6ce9a420, + 0x31f14: 0x6ce9a620, 0x31f15: 0x6ce9a820, 0x31f16: 0x6ce9aa20, 0x31f17: 0x6ce9ac20, + 0x31f18: 0x6ce9ae20, 0x31f19: 0x6ce9b020, 0x31f1a: 0x6ce9b220, 0x31f1b: 0x6ce9b420, + 0x31f1c: 0x6ce9b620, 0x31f1d: 0x6ce9b820, 0x31f1e: 0x6ce9ba20, 0x31f1f: 0x6ce9bc20, + 0x31f20: 0x6ce9be20, 0x31f21: 0x6ce9c020, 0x31f22: 0x6d01fc20, 0x31f23: 0x6ce9c220, + 0x31f24: 0x6ce9c420, 0x31f25: 0x6d191a20, 0x31f26: 0x6ce9c620, 0x31f27: 0x6ce9c820, + 0x31f28: 0x6ce9ca20, 0x31f29: 0x6ce9cc20, 0x31f2a: 0x6ce9ce20, 0x31f2b: 0x6ce9d020, + 0x31f2c: 0x6ce9d220, 0x31f2d: 0x6d191c20, 0x31f2e: 0x6d191e20, 0x31f2f: 0x6d192020, + 0x31f30: 0x6d192220, 0x31f31: 0x6d192420, 0x31f32: 0x6d192620, 0x31f33: 0x6d192820, + 0x31f34: 0x6d192a20, 0x31f35: 0x6d192c20, 0x31f36: 0x6d192e20, 0x31f37: 0x6d193020, + 0x31f38: 0x6d193220, 0x31f39: 0x6d193420, 0x31f3a: 0x6d193620, 0x31f3b: 0x6d193820, + 0x31f3c: 0x6d193a20, 0x31f3d: 0x6d193c20, 0x31f3e: 0x6d193e20, 0x31f3f: 0x6d194020, + // Block 0xc7d, offset 0x31f40 + 0x31f40: 0x6d194220, 0x31f41: 0x6d194420, 0x31f42: 0x6d194620, 0x31f43: 0x6d194820, + 0x31f44: 0x6d194a20, 0x31f45: 0x6d194c20, 0x31f46: 0x6d194e20, 0x31f47: 0x6d195020, + 0x31f48: 0x6d195220, 0x31f49: 0x6d195420, 0x31f4a: 0x6d195620, 0x31f4b: 0x6d195820, + 0x31f4c: 0x6d195a20, 0x31f4d: 0x6d195c20, 0x31f4e: 0x6d195e20, 0x31f4f: 0x6d196020, + 0x31f50: 0x6d196220, 0x31f51: 0x6d196420, 0x31f52: 0x6d196620, 0x31f53: 0x6d196820, + 0x31f54: 0x6d196a20, 0x31f55: 0x6d196c20, 0x31f56: 0x6d196e20, 0x31f57: 0x6d197020, + 0x31f58: 0x6d311420, 0x31f59: 0x6d197220, 0x31f5a: 0x6d197420, 0x31f5b: 0x6d2bee20, + 0x31f5c: 0x6e0bec20, 0x31f5d: 0x6d197620, 0x31f5e: 0x6d197820, 0x31f5f: 0x6d197a20, + 0x31f60: 0x6d197c20, 0x31f61: 0x6d197e20, 0x31f62: 0x6d198020, 0x31f63: 0x6d198220, + 0x31f64: 0x6d198420, 0x31f65: 0x6d198620, 0x31f66: 0x6d198820, 0x31f67: 0x6d198a20, + 0x31f68: 0x6d198c20, 0x31f69: 0x6d198e20, 0x31f6a: 0x6d199020, 0x31f6b: 0x6d199220, + 0x31f6c: 0x6d199420, 0x31f6d: 0x6d199620, 0x31f6e: 0x6d199820, 0x31f6f: 0x6d199a20, + 0x31f70: 0x6d199c20, 0x31f71: 0x6d199e20, 0x31f72: 0x6d19a020, 0x31f73: 0x6d19a220, + 0x31f74: 0x6d19a420, 0x31f75: 0x6ce9d420, 0x31f76: 0x6d234020, 0x31f77: 0x6d47f620, + 0x31f78: 0x6d47f820, 0x31f79: 0x6d47fa20, 0x31f7a: 0x6d47fc20, 0x31f7b: 0x6d47fe20, + 0x31f7c: 0x6d480020, 0x31f7d: 0x6d480220, 0x31f7e: 0x6d480420, 0x31f7f: 0x6d480620, + // Block 0xc7e, offset 0x31f80 + 0x31f80: 0x6d480820, 0x31f81: 0x6d480a20, 0x31f82: 0x6d480c20, 0x31f83: 0x6d480e20, + 0x31f84: 0x6d481020, 0x31f85: 0x6d481220, 0x31f86: 0x6d481420, 0x31f87: 0x6d481620, + 0x31f88: 0x6d481820, 0x31f89: 0x6d481a20, 0x31f8a: 0x6d481c20, 0x31f8b: 0x6d481e20, + 0x31f8c: 0x6d482020, 0x31f8d: 0x6d482220, 0x31f8e: 0x6d482420, 0x31f8f: 0x6d482620, + 0x31f90: 0x6d19a620, 0x31f91: 0x6d482820, 0x31f92: 0x6d761c20, 0x31f93: 0x6d49ca20, + 0x31f94: 0x6d482a20, 0x31f95: 0x6d482c20, 0x31f96: 0x6d482e20, 0x31f97: 0x6d483020, + 0x31f98: 0x6d483220, 0x31f99: 0x6d483420, 0x31f9a: 0x6d483620, 0x31f9b: 0x6d483820, + 0x31f9c: 0x6d483a20, 0x31f9d: 0x6d483c20, 0x31f9e: 0x6d483e20, 0x31f9f: 0x6d484020, + 0x31fa0: 0x6d484220, 0x31fa1: 0x6d484420, 0x31fa2: 0x6d484620, 0x31fa3: 0x6d484820, + 0x31fa4: 0x6d484a20, 0x31fa5: 0x6d484c20, 0x31fa6: 0x6d484e20, 0x31fa7: 0x6d49cc20, + 0x31fa8: 0x6d761e20, 0x31fa9: 0x6d762020, 0x31faa: 0x6d762220, 0x31fab: 0x6d762420, + 0x31fac: 0x6d762620, 0x31fad: 0x6d762820, 0x31fae: 0x6d762a20, 0x31faf: 0x6d762c20, + 0x31fb0: 0x6d762e20, 0x31fb1: 0x6d763020, 0x31fb2: 0x6d763220, 0x31fb3: 0x6d763420, + 0x31fb4: 0x6d763620, 0x31fb5: 0x6d763820, 0x31fb6: 0x6d763a20, 0x31fb7: 0x6d763c20, + 0x31fb8: 0x6d763e20, 0x31fb9: 0x6d764020, 0x31fba: 0x6d764220, 0x31fbb: 0x6d764420, + 0x31fbc: 0x6d764620, 0x31fbd: 0x6d764820, 0x31fbe: 0x6d764a20, 0x31fbf: 0x6d764c20, + // Block 0xc7f, offset 0x31fc0 + 0x31fc0: 0x6d764e20, 0x31fc1: 0x6d765020, 0x31fc2: 0x6d765220, 0x31fc3: 0x6d765420, + 0x31fc4: 0x6d765620, 0x31fc5: 0x6d765820, 0x31fc6: 0x6d765a20, 0x31fc7: 0x6d765c20, + 0x31fc8: 0x6d9fc820, 0x31fc9: 0x6d9fca20, 0x31fca: 0x6d9fcc20, 0x31fcb: 0x6d9fce20, + 0x31fcc: 0x6d9fd020, 0x31fcd: 0x6d9fd220, 0x31fce: 0x6d9fd420, 0x31fcf: 0x6d9fd620, + 0x31fd0: 0x6d9fd820, 0x31fd1: 0x6d9fda20, 0x31fd2: 0x6d9fdc20, 0x31fd3: 0x6d9fde20, + 0x31fd4: 0x6d9fe020, 0x31fd5: 0x6d9fe220, 0x31fd6: 0x6d9fe420, 0x31fd7: 0x6d9fe620, + 0x31fd8: 0x6d9fe820, 0x31fd9: 0x6d9fea20, 0x31fda: 0x6d9fec20, 0x31fdb: 0x6d9fee20, + 0x31fdc: 0x6db61c20, 0x31fdd: 0x6d9ff020, 0x31fde: 0x6d9ff220, 0x31fdf: 0x6d9ff420, + 0x31fe0: 0x6d9ff620, 0x31fe1: 0x6d9ff820, 0x31fe2: 0x6d9ffa20, 0x31fe3: 0x6dc25620, + 0x31fe4: 0x6dc25820, 0x31fe5: 0x6dc25a20, 0x31fe6: 0x6dc25c20, 0x31fe7: 0x6dc25e20, + 0x31fe8: 0x6dc26020, 0x31fe9: 0x6dc26220, 0x31fea: 0x6dc26420, 0x31feb: 0x6dc26620, + 0x31fec: 0x6dc26820, 0x31fed: 0x6dc26a20, 0x31fee: 0x6dc26c20, 0x31fef: 0x6dc26e20, + 0x31ff0: 0x6dc27020, 0x31ff1: 0x6dc27220, 0x31ff2: 0x6dc27420, 0x31ff3: 0x6dc27620, + 0x31ff4: 0x6dc27820, 0x31ff5: 0x6dc27a20, 0x31ff6: 0x6dc27c20, 0x31ff7: 0x6dc27e20, + 0x31ff8: 0x6dc28020, 0x31ff9: 0x6dc28220, 0x31ffa: 0x6dc28420, 0x31ffb: 0x6de01a20, + 0x31ffc: 0x6de01c20, 0x31ffd: 0x6de01e20, 0x31ffe: 0x6de02020, 0x31fff: 0x6de02220, + // Block 0xc80, offset 0x32000 + 0x32000: 0x6de02420, 0x32001: 0x6de02620, 0x32002: 0x6de5da20, 0x32003: 0x6de02820, + 0x32004: 0x6de02a20, 0x32005: 0x6de02c20, 0x32006: 0x6de02e20, 0x32007: 0x6de03020, + 0x32008: 0x6de03220, 0x32009: 0x6de03420, 0x3200a: 0x6de03620, 0x3200b: 0x6de03820, + 0x3200c: 0x6de03a20, 0x3200d: 0x6df87620, 0x3200e: 0x6df87820, 0x3200f: 0x6df87a20, + 0x32010: 0x6df87c20, 0x32011: 0x6df87e20, 0x32012: 0x6df88020, 0x32013: 0x6df88220, + 0x32014: 0x6df88420, 0x32015: 0x6df88620, 0x32016: 0x6df88820, 0x32017: 0x6e0c4a20, + 0x32018: 0x6e0c4c20, 0x32019: 0x6e0c4e20, 0x3201a: 0x6e0c5020, 0x3201b: 0x6e0c5220, + 0x3201c: 0x6e0c5420, 0x3201d: 0x6e0c5620, 0x3201e: 0x6df88a20, 0x3201f: 0x6e0c5820, + 0x32020: 0x6e0c5a20, 0x32021: 0x6e0c5c20, 0x32022: 0x6e0c5e20, 0x32023: 0x6e0c6020, + 0x32024: 0x6e1c0c20, 0x32025: 0x6e1c0e20, 0x32026: 0x6e1c1020, 0x32027: 0x6e1c1220, + 0x32028: 0x6e1c1420, 0x32029: 0x6e1c1620, 0x3202a: 0x6e284e20, 0x3202b: 0x6e285020, + 0x3202c: 0x6e285220, 0x3202d: 0x6e285420, 0x3202e: 0x6e285620, 0x3202f: 0x6e285820, + 0x32030: 0x6e318a20, 0x32031: 0x6e38ae20, 0x32032: 0x6e3ce420, 0x32033: 0x6e3ce620, + 0x32034: 0x6e446c20, 0x32035: 0x6e442220, 0x32036: 0x6c02cc20, 0x32037: 0x6c061020, + 0x32038: 0x6c061220, 0x32039: 0x6c0c5020, 0x3203a: 0x6c0c5220, 0x3203b: 0x6c0c5420, + 0x3203c: 0x6c0c5620, 0x3203d: 0x6c174220, 0x3203e: 0x6c174420, 0x3203f: 0x6c174620, + // Block 0xc81, offset 0x32040 + 0x32040: 0x6c174820, 0x32041: 0x6c174a20, 0x32042: 0x6c174c20, 0x32043: 0x6c2a3820, + 0x32044: 0x6c2a3a20, 0x32045: 0x6c2a3c20, 0x32046: 0x6c2a3e20, 0x32047: 0x6c2a4020, + 0x32048: 0x6c2a4220, 0x32049: 0x6c2a4420, 0x3204a: 0x6c2a4620, 0x3204b: 0x6c2a4820, + 0x3204c: 0x6c446020, 0x3204d: 0x6c446220, 0x3204e: 0x6c446420, 0x3204f: 0x6c446620, + 0x32050: 0x6c657620, 0x32051: 0x6c657820, 0x32052: 0x6c657a20, 0x32053: 0x6c657c20, + 0x32054: 0x6c657e20, 0x32055: 0x6c658020, 0x32056: 0x6c658220, 0x32057: 0x6c8c6e20, + 0x32058: 0x6c8c7020, 0x32059: 0x6c8c7220, 0x3205a: 0x6c8c7420, 0x3205b: 0x6c8c7620, + 0x3205c: 0x6c8c7820, 0x3205d: 0x6c8c7a20, 0x3205e: 0x6cb8ca20, 0x3205f: 0x6cb8cc20, + 0x32060: 0x6cb8ce20, 0x32061: 0x6cb8d020, 0x32062: 0x6cb8d220, 0x32063: 0x6cb8d420, + 0x32064: 0x6ce9e420, 0x32065: 0x6ce9e620, 0x32066: 0x6ce9e820, 0x32067: 0x6d19b820, + 0x32068: 0x6d19ba20, 0x32069: 0x6d19bc20, 0x3206a: 0x6d19be20, 0x3206b: 0x6d19c020, + 0x3206c: 0x6d19c220, 0x3206d: 0x6d19c420, 0x3206e: 0x6d19c620, 0x3206f: 0x6d19c820, + 0x32070: 0x6d485c20, 0x32071: 0x6d485e20, 0x32072: 0x6d486020, 0x32073: 0x6d766820, + 0x32074: 0x6d486220, 0x32075: 0x6d486420, 0x32076: 0x6d486620, 0x32077: 0x6d486820, + 0x32078: 0x6d766a20, 0x32079: 0x6d766c20, 0x3207a: 0x6d766e20, 0x3207b: 0x6d767020, + 0x3207c: 0x6d767220, 0x3207d: 0x6d767420, 0x3207e: 0x6d767620, 0x3207f: 0x6da00420, + // Block 0xc82, offset 0x32080 + 0x32080: 0x6da00620, 0x32081: 0x6da00820, 0x32082: 0x6da00a20, 0x32083: 0x6da00c20, + 0x32084: 0x6da00e20, 0x32085: 0x6da01020, 0x32086: 0x6dc28e20, 0x32087: 0x6da01220, + 0x32088: 0x6dc29020, 0x32089: 0x6dc29220, 0x3208a: 0x6dc29420, 0x3208b: 0x6de04220, + 0x3208c: 0x6de23820, 0x3208d: 0x6df88e20, 0x3208e: 0x6de04420, 0x3208f: 0x6df89020, + 0x32090: 0x6df89220, 0x32091: 0x6e0c6620, 0x32092: 0x6e0c6820, 0x32093: 0x6e1c1820, + 0x32094: 0x6e1c1a20, 0x32095: 0x6e285a20, 0x32096: 0x6e285c20, 0x32097: 0x6e318c20, + 0x32098: 0x6e318e20, 0x32099: 0x6e319020, 0x3209a: 0x6e3ce820, 0x3209b: 0x6c014a20, + 0x3209c: 0x6c02d020, 0x3209d: 0x6c02d220, 0x3209e: 0x6c02d420, 0x3209f: 0x6c061a20, + 0x320a0: 0x6c0c6020, 0x320a1: 0x6c0c6220, 0x320a2: 0x6c0c6420, 0x320a3: 0x6c0c6620, + 0x320a4: 0x6c175220, 0x320a5: 0x6c175420, 0x320a6: 0x6c175620, 0x320a7: 0x6c175820, + 0x320a8: 0x6c175a20, 0x320a9: 0x6c2a4e20, 0x320aa: 0x6c446e20, 0x320ab: 0x6c447020, + 0x320ac: 0x6c447220, 0x320ad: 0x6c658620, 0x320ae: 0x6c658820, 0x320af: 0x6c658a20, + 0x320b0: 0x6c658c20, 0x320b1: 0x6c8c7c20, 0x320b2: 0x6cb8d820, 0x320b3: 0x6cb8da20, + 0x320b4: 0x6ce9ec20, 0x320b5: 0x6ce9ee20, 0x320b6: 0x6ce9f020, 0x320b7: 0x6ce9f220, + 0x320b8: 0x6d19ca20, 0x320b9: 0x6d19cc20, 0x320ba: 0x6d19ce20, 0x320bb: 0x6d19d020, + 0x320bc: 0x6d767820, 0x320bd: 0x6da01420, 0x320be: 0x6dc29620, 0x320bf: 0x6df89420, + // Block 0xc83, offset 0x320c0 + 0x320c0: 0x6c014c20, 0x320c1: 0x6c02de20, 0x320c2: 0x6c02e020, 0x320c3: 0x6c02e220, + 0x320c4: 0x6c02e420, 0x320c5: 0x6c061e20, 0x320c6: 0x6c062020, 0x320c7: 0x6c020820, + 0x320c8: 0x6c0c7220, 0x320c9: 0x6c0c7420, 0x320ca: 0x6c176420, 0x320cb: 0x6c176620, + 0x320cc: 0x6c176820, 0x320cd: 0x6c176a20, 0x320ce: 0x6c176c20, 0x320cf: 0x6c176e20, + 0x320d0: 0x6c2a5620, 0x320d1: 0x6c2a5820, 0x320d2: 0x6c447a20, 0x320d3: 0x6c447c20, + 0x320d4: 0x6c447e20, 0x320d5: 0x6c448020, 0x320d6: 0x6c448220, 0x320d7: 0x6c448420, + 0x320d8: 0x6c4d0420, 0x320d9: 0x6c659420, 0x320da: 0x6c659620, 0x320db: 0x6c659820, + 0x320dc: 0x6c8c8020, 0x320dd: 0x6c8c8220, 0x320de: 0x6cb8dc20, 0x320df: 0x6cb8de20, + 0x320e0: 0x6cb8e020, 0x320e1: 0x6cb8e220, 0x320e2: 0x6cb8e420, 0x320e3: 0x6cb8e620, + 0x320e4: 0x6cb8e820, 0x320e5: 0x6cb8ea20, 0x320e6: 0x6cb8ec20, 0x320e7: 0x6cb8ee20, + 0x320e8: 0x6ce9f820, 0x320e9: 0x6ce9fa20, 0x320ea: 0x6ce9fc20, 0x320eb: 0x6ce9fe20, + 0x320ec: 0x6cea0020, 0x320ed: 0x6cea0220, 0x320ee: 0x6cea0420, 0x320ef: 0x6d19d220, + 0x320f0: 0x6d19d420, 0x320f1: 0x6d19d620, 0x320f2: 0x6d1b1620, 0x320f3: 0x6d767c20, + 0x320f4: 0x6d767e20, 0x320f5: 0x6d768020, 0x320f6: 0x6dc29a20, 0x320f7: 0x6dc29c20, + 0x320f8: 0x6de04820, 0x320f9: 0x6de04a20, 0x320fa: 0x6de04c20, 0x320fb: 0x6e474020, + 0x320fc: 0x6c014e20, 0x320fd: 0x6c02f220, 0x320fe: 0x6c02f420, 0x320ff: 0x6c02f620, + // Block 0xc84, offset 0x32100 + 0x32100: 0x6c02f820, 0x32101: 0x6c062a20, 0x32102: 0x6c062c20, 0x32103: 0x6c062e20, + 0x32104: 0x6c063020, 0x32105: 0x6c063220, 0x32106: 0x6c063420, 0x32107: 0x6c063620, + 0x32108: 0x6c063820, 0x32109: 0x6c063a20, 0x3210a: 0x6c063c20, 0x3210b: 0x6c0c7c20, + 0x3210c: 0x6c0c7e20, 0x3210d: 0x6c0c8020, 0x3210e: 0x6c0c8220, 0x3210f: 0x6c0c8420, + 0x32110: 0x6c177220, 0x32111: 0x6c177420, 0x32112: 0x6c177620, 0x32113: 0x6c177820, + 0x32114: 0x6c177a20, 0x32115: 0x6c177c20, 0x32116: 0x6c2a6020, 0x32117: 0x6c2a6220, + 0x32118: 0x6c2a6420, 0x32119: 0x6c2a6620, 0x3211a: 0x6c2a6820, 0x3211b: 0x6c448a20, + 0x3211c: 0x6c448c20, 0x3211d: 0x6c659e20, 0x3211e: 0x6c65a020, 0x3211f: 0x6c65a220, + 0x32120: 0x6c8c8a20, 0x32121: 0x6c8c8c20, 0x32122: 0x6c8c8e20, 0x32123: 0x6cb8f620, + 0x32124: 0x6cb8f820, 0x32125: 0x6cb8fa20, 0x32126: 0x6cea0a20, 0x32127: 0x6cea0c20, + 0x32128: 0x6d19dc20, 0x32129: 0x6d19de20, 0x3212a: 0x6d487220, 0x3212b: 0x6d227a20, + 0x3212c: 0x6d487420, 0x3212d: 0x6d768420, 0x3212e: 0x6d768620, 0x3212f: 0x6dc29e20, + 0x32130: 0x6dc2a020, 0x32131: 0x6df89820, 0x32132: 0x6e1c1e20, 0x32133: 0x6c030220, + 0x32134: 0x6c030420, 0x32135: 0x6c064220, 0x32136: 0x6c064420, 0x32137: 0x6c064620, + 0x32138: 0x6c064820, 0x32139: 0x6c0c8a20, 0x3213a: 0x6c0c8c20, 0x3213b: 0x6c0c8e20, + 0x3213c: 0x6c0c9020, 0x3213d: 0x6c0c9220, 0x3213e: 0x6c0c9420, 0x3213f: 0x6c0c9620, + // Block 0xc85, offset 0x32140 + 0x32140: 0x6c178220, 0x32141: 0x6c178420, 0x32142: 0x6c178620, 0x32143: 0x6c178820, + 0x32144: 0x6c2a6c20, 0x32145: 0x6c2a6e20, 0x32146: 0x6c2a7020, 0x32147: 0x6c449620, + 0x32148: 0x6c449820, 0x32149: 0x6c449a20, 0x3214a: 0x6c449c20, 0x3214b: 0x6c449e20, + 0x3214c: 0x6c65b220, 0x3214d: 0x6c65b420, 0x3214e: 0x6c65b620, 0x3214f: 0x6c65b820, + 0x32150: 0x6c65ba20, 0x32151: 0x6c65bc20, 0x32152: 0x6c65be20, 0x32153: 0x6c8c9220, + 0x32154: 0x6cb8fe20, 0x32155: 0x6cb90020, 0x32156: 0x6cb90220, 0x32157: 0x6cb90420, + 0x32158: 0x6cb90620, 0x32159: 0x6cb90820, 0x3215a: 0x6cea0e20, 0x3215b: 0x6cea1020, + 0x3215c: 0x6d19e220, 0x3215d: 0x6d19e420, 0x3215e: 0x6d19e620, 0x3215f: 0x6d30e420, + 0x32160: 0x6d768a20, 0x32161: 0x6d768c20, 0x32162: 0x6da01820, 0x32163: 0x6dc2a220, + 0x32164: 0x6dc2a420, 0x32165: 0x6dc2a620, 0x32166: 0x6df89a20, 0x32167: 0x6df89c20, + 0x32168: 0x6df89e20, 0x32169: 0x6e0c6a20, 0x3216a: 0x6e1c2020, 0x3216b: 0x6e285e20, + 0x3216c: 0x6c015020, 0x3216d: 0x6c030820, 0x3216e: 0x6c065220, 0x3216f: 0x6c065420, + 0x32170: 0x6c065620, 0x32171: 0x6c0ca620, 0x32172: 0x6c0ca820, 0x32173: 0x6c0caa20, + 0x32174: 0x6c0cac20, 0x32175: 0x6c0cae20, 0x32176: 0x6c0cb020, 0x32177: 0x6c179e20, + 0x32178: 0x6c17a020, 0x32179: 0x6c17a220, 0x3217a: 0x6c17a420, 0x3217b: 0x6c17a620, + 0x3217c: 0x6c17a820, 0x3217d: 0x6c17aa20, 0x3217e: 0x6c17ac20, 0x3217f: 0x6c17ae20, + // Block 0xc86, offset 0x32180 + 0x32180: 0x6c2a8820, 0x32181: 0x6c17b020, 0x32182: 0x6c2a8a20, 0x32183: 0x6c2a8c20, + 0x32184: 0x6c2a8e20, 0x32185: 0x6c2a9020, 0x32186: 0x6c2a9220, 0x32187: 0x6c2a9420, + 0x32188: 0x6c44aa20, 0x32189: 0x6c44ac20, 0x3218a: 0x6c44ae20, 0x3218b: 0x6c44b020, + 0x3218c: 0x6c44b220, 0x3218d: 0x6c44b420, 0x3218e: 0x6c44b620, 0x3218f: 0x6c44b820, + 0x32190: 0x6c44ba20, 0x32191: 0x6c44bc20, 0x32192: 0x6c44be20, 0x32193: 0x6c44c020, + 0x32194: 0x6c44c220, 0x32195: 0x6c44c420, 0x32196: 0x6c44c620, 0x32197: 0x6c44c820, + 0x32198: 0x6c65de20, 0x32199: 0x6c65e020, 0x3219a: 0x6c65e220, 0x3219b: 0x6c65e420, + 0x3219c: 0x6c65e620, 0x3219d: 0x6c65e820, 0x3219e: 0x6c65ea20, 0x3219f: 0x6c65ec20, + 0x321a0: 0x6c65ee20, 0x321a1: 0x6c65f020, 0x321a2: 0x6c65f220, 0x321a3: 0x6c65f420, + 0x321a4: 0x6c65f620, 0x321a5: 0x6c8c9e20, 0x321a6: 0x6c8ca020, 0x321a7: 0x6c8ca220, + 0x321a8: 0x6c8ca420, 0x321a9: 0x6c8ca620, 0x321aa: 0x6c8ca820, 0x321ab: 0x6c8caa20, + 0x321ac: 0x6c8cac20, 0x321ad: 0x6c8cae20, 0x321ae: 0x6c8cb020, 0x321af: 0x6c8cb220, + 0x321b0: 0x6c8cb420, 0x321b1: 0x6cb91a20, 0x321b2: 0x6cb91c20, 0x321b3: 0x6cb91e20, + 0x321b4: 0x6cb92020, 0x321b5: 0x6cb92220, 0x321b6: 0x6cb92420, 0x321b7: 0x6cb92620, + 0x321b8: 0x6cb92820, 0x321b9: 0x6cb92a20, 0x321ba: 0x6cea1620, 0x321bb: 0x6cea1820, + 0x321bc: 0x6cea1a20, 0x321bd: 0x6cea1c20, 0x321be: 0x6cea1e20, 0x321bf: 0x6cea2020, + // Block 0xc87, offset 0x321c0 + 0x321c0: 0x6cea2220, 0x321c1: 0x6cea2420, 0x321c2: 0x6cea2620, 0x321c3: 0x6cea2820, + 0x321c4: 0x6d19ee20, 0x321c5: 0x6d19f020, 0x321c6: 0x6d19f220, 0x321c7: 0x6d19f420, + 0x321c8: 0x6d19f620, 0x321c9: 0x6d19f820, 0x321ca: 0x6d488020, 0x321cb: 0x6d488220, + 0x321cc: 0x6d488420, 0x321cd: 0x6d488620, 0x321ce: 0x6d488820, 0x321cf: 0x6d488a20, + 0x321d0: 0x6d488c20, 0x321d1: 0x6d488e20, 0x321d2: 0x6d769220, 0x321d3: 0x6d19fa20, + 0x321d4: 0x6d769420, 0x321d5: 0x6d769620, 0x321d6: 0x6da01c20, 0x321d7: 0x6da01e20, + 0x321d8: 0x6da02020, 0x321d9: 0x6da02220, 0x321da: 0x6da02420, 0x321db: 0x6da02620, + 0x321dc: 0x6da02820, 0x321dd: 0x6dc2a820, 0x321de: 0x6dc2aa20, 0x321df: 0x6dc2ac20, + 0x321e0: 0x6dc2ae20, 0x321e1: 0x6dc2b020, 0x321e2: 0x6de04e20, 0x321e3: 0x6de05020, + 0x321e4: 0x6e0c6c20, 0x321e5: 0x6e1c2220, 0x321e6: 0x6e3cea20, 0x321e7: 0x6c009620, + 0x321e8: 0x6c009820, 0x321e9: 0x6c030c20, 0x321ea: 0x6c030e20, 0x321eb: 0x6c031020, + 0x321ec: 0x6c031220, 0x321ed: 0x6c031420, 0x321ee: 0x6c031620, 0x321ef: 0x6c031820, + 0x321f0: 0x6c031a20, 0x321f1: 0x6c066020, 0x321f2: 0x6c066220, 0x321f3: 0x6c066420, + 0x321f4: 0x6c066620, 0x321f5: 0x6c0cc220, 0x321f6: 0x6c0cc420, 0x321f7: 0x6c0cc620, + 0x321f8: 0x6c0cc820, 0x321f9: 0x6c0cca20, 0x321fa: 0x6c0ccc20, 0x321fb: 0x6c0cce20, + 0x321fc: 0x6c17ba20, 0x321fd: 0x6c17bc20, 0x321fe: 0x6c17be20, 0x321ff: 0x6c17c020, + // Block 0xc88, offset 0x32200 + 0x32200: 0x6c17c220, 0x32201: 0x6c17c420, 0x32202: 0x6c17c620, 0x32203: 0x6c17c820, + 0x32204: 0x6c17ca20, 0x32205: 0x6c17cc20, 0x32206: 0x6c2a9e20, 0x32207: 0x6c2aa020, + 0x32208: 0x6c2aa220, 0x32209: 0x6c2aa420, 0x3220a: 0x6c2aa620, 0x3220b: 0x6c2aa820, + 0x3220c: 0x6c2aaa20, 0x3220d: 0x6c2aac20, 0x3220e: 0x6c2aae20, 0x3220f: 0x6c44d220, + 0x32210: 0x6c44d420, 0x32211: 0x6c44d620, 0x32212: 0x6c660020, 0x32213: 0x6c660220, + 0x32214: 0x6c660420, 0x32215: 0x6c660620, 0x32216: 0x6c660820, 0x32217: 0x6c6de220, + 0x32218: 0x6c8cc220, 0x32219: 0x6c8cc420, 0x3221a: 0x6c916e20, 0x3221b: 0x6c8cc620, + 0x3221c: 0x6c8cc820, 0x3221d: 0x6c8cca20, 0x3221e: 0x6c8ccc20, 0x3221f: 0x6cb93620, + 0x32220: 0x6cb93820, 0x32221: 0x6cb93a20, 0x32222: 0x6cb93c20, 0x32223: 0x6cb93e20, + 0x32224: 0x6cea2e20, 0x32225: 0x6cea3020, 0x32226: 0x6cea3220, 0x32227: 0x6cea3420, + 0x32228: 0x6d1a0220, 0x32229: 0x6d1a0420, 0x3222a: 0x6d1a0620, 0x3222b: 0x6d489220, + 0x3222c: 0x6d717420, 0x3222d: 0x6d769a20, 0x3222e: 0x6d769c20, 0x3222f: 0x6d769e20, + 0x32230: 0x6d76a020, 0x32231: 0x6da02c20, 0x32232: 0x6df8a220, 0x32233: 0x6e0c6e20, + 0x32234: 0x6c009c20, 0x32235: 0x6c015820, 0x32236: 0x6c031e20, 0x32237: 0x6c032020, + 0x32238: 0x6c032220, 0x32239: 0x6c067220, 0x3223a: 0x6c067420, 0x3223b: 0x6c067620, + 0x3223c: 0x6c076c20, 0x3223d: 0x6c067820, 0x3223e: 0x6c0cd620, 0x3223f: 0x6c0cd820, + // Block 0xc89, offset 0x32240 + 0x32240: 0x6c0cda20, 0x32241: 0x6c0cdc20, 0x32242: 0x6c0cde20, 0x32243: 0x6c0ce020, + 0x32244: 0x6c0ce220, 0x32245: 0x6c0ce420, 0x32246: 0x6c17d020, 0x32247: 0x6c17d220, + 0x32248: 0x6c17d420, 0x32249: 0x6c17d620, 0x3224a: 0x6c17d820, 0x3224b: 0x6c2ab420, + 0x3224c: 0x6c2ab620, 0x3224d: 0x6c2ab820, 0x3224e: 0x6c44da20, 0x3224f: 0x6c44dc20, + 0x32250: 0x6c44de20, 0x32251: 0x6c633020, 0x32252: 0x6c660c20, 0x32253: 0x6c660e20, + 0x32254: 0x6c8cd020, 0x32255: 0x6c8cd220, 0x32256: 0x6c8cd420, 0x32257: 0x6c8cd620, + 0x32258: 0x6cb94220, 0x32259: 0x6d1a0820, 0x3225a: 0x6d1a0a20, 0x3225b: 0x6d4b1220, + 0x3225c: 0x6d489420, 0x3225d: 0x6d76a220, 0x3225e: 0x6da02e20, 0x3225f: 0x6de05220, + 0x32260: 0x6df8a420, 0x32261: 0x6e0c7020, 0x32262: 0x6e319220, 0x32263: 0x6c00a620, + 0x32264: 0x6c015e20, 0x32265: 0x6c032c20, 0x32266: 0x6c032e20, 0x32267: 0x6c033020, + 0x32268: 0x6c033220, 0x32269: 0x6c033420, 0x3226a: 0x6c033620, 0x3226b: 0x6c033820, + 0x3226c: 0x6c033a20, 0x3226d: 0x6c068c20, 0x3226e: 0x6c068e20, 0x3226f: 0x6c069020, + 0x32270: 0x6c069220, 0x32271: 0x6c069420, 0x32272: 0x6c069620, 0x32273: 0x6c069820, + 0x32274: 0x6c069a20, 0x32275: 0x6c0d0620, 0x32276: 0x6c069c20, 0x32277: 0x6c0d0820, + 0x32278: 0x6c0d0a20, 0x32279: 0x6c0d0c20, 0x3227a: 0x6c0d0e20, 0x3227b: 0x6c069e20, + 0x3227c: 0x6c0d1020, 0x3227d: 0x6c0d1220, 0x3227e: 0x6c0d1420, 0x3227f: 0x6c0d1620, + // Block 0xc8a, offset 0x32280 + 0x32280: 0x6c0d1820, 0x32281: 0x6c0d1a20, 0x32282: 0x6c0d1c20, 0x32283: 0x6c0d1e20, + 0x32284: 0x6c0d2020, 0x32285: 0x6c0d2220, 0x32286: 0x6c0d2420, 0x32287: 0x6c0d2620, + 0x32288: 0x6c0d2820, 0x32289: 0x6c0d2a20, 0x3228a: 0x6c0d2c20, 0x3228b: 0x6c0d2e20, + 0x3228c: 0x6c0d3020, 0x3228d: 0x6c0d3220, 0x3228e: 0x6c180220, 0x3228f: 0x6c180420, + 0x32290: 0x6c180620, 0x32291: 0x6c180820, 0x32292: 0x6c180a20, 0x32293: 0x6c180c20, + 0x32294: 0x6c180e20, 0x32295: 0x6c181020, 0x32296: 0x6c181220, 0x32297: 0x6c181420, + 0x32298: 0x6c181620, 0x32299: 0x6c181820, 0x3229a: 0x6c181a20, 0x3229b: 0x6c181c20, + 0x3229c: 0x6c181e20, 0x3229d: 0x6c182020, 0x3229e: 0x6c182220, 0x3229f: 0x6c182420, + 0x322a0: 0x6c182620, 0x322a1: 0x6c182820, 0x322a2: 0x6c182a20, 0x322a3: 0x6c182c20, + 0x322a4: 0x6c182e20, 0x322a5: 0x6c183020, 0x322a6: 0x6c183220, 0x322a7: 0x6c2af220, + 0x322a8: 0x6c2af420, 0x322a9: 0x6c2af620, 0x322aa: 0x6c2af820, 0x322ab: 0x6c2afa20, + 0x322ac: 0x6c2afc20, 0x322ad: 0x6c2afe20, 0x322ae: 0x6c2b0020, 0x322af: 0x6c2b0220, + 0x322b0: 0x6c2b0420, 0x322b1: 0x6c2b0620, 0x322b2: 0x6c2b0820, 0x322b3: 0x6c2b0a20, + 0x322b4: 0x6c2b0c20, 0x322b5: 0x6c2b0e20, 0x322b6: 0x6c2b1020, 0x322b7: 0x6c2b1220, + 0x322b8: 0x6c2b1420, 0x322b9: 0x6c2b1620, 0x322ba: 0x6c2b1820, 0x322bb: 0x6c2b1a20, + 0x322bc: 0x6c2b1c20, 0x322bd: 0x6c2b1e20, 0x322be: 0x6c2b2020, 0x322bf: 0x6c2b2220, + // Block 0xc8b, offset 0x322c0 + 0x322c0: 0x6c2b2420, 0x322c1: 0x6c2b2620, 0x322c2: 0x6c2b2820, 0x322c3: 0x6c2b2a20, + 0x322c4: 0x6c2b2c20, 0x322c5: 0x6c2b2e20, 0x322c6: 0x6c2b3020, 0x322c7: 0x6c2b3220, + 0x322c8: 0x6c2b3420, 0x322c9: 0x6c2b3620, 0x322ca: 0x6c2b3820, 0x322cb: 0x6c2b3a20, + 0x322cc: 0x6c2b3c20, 0x322cd: 0x6c2b3e20, 0x322ce: 0x6c2b4020, 0x322cf: 0x6c2b4220, + 0x322d0: 0x6c450620, 0x322d1: 0x6c450820, 0x322d2: 0x6c450a20, 0x322d3: 0x6c450c20, + 0x322d4: 0x6c450e20, 0x322d5: 0x6c451020, 0x322d6: 0x6c451220, 0x322d7: 0x6c451420, + 0x322d8: 0x6c451620, 0x322d9: 0x6c451820, 0x322da: 0x6c451a20, 0x322db: 0x6c451c20, + 0x322dc: 0x6c451e20, 0x322dd: 0x6c452020, 0x322de: 0x6c452220, 0x322df: 0x6c452420, + 0x322e0: 0x6c452620, 0x322e1: 0x6c452820, 0x322e2: 0x6c452a20, 0x322e3: 0x6c452c20, + 0x322e4: 0x6c452e20, 0x322e5: 0x6c453020, 0x322e6: 0x6c453220, 0x322e7: 0x6c453420, + 0x322e8: 0x6c453620, 0x322e9: 0x6c453820, 0x322ea: 0x6c453a20, 0x322eb: 0x6c453c20, + 0x322ec: 0x6c453e20, 0x322ed: 0x6c454020, 0x322ee: 0x6c454220, 0x322ef: 0x6c454420, + 0x322f0: 0x6c454620, 0x322f1: 0x6c664820, 0x322f2: 0x6c664a20, 0x322f3: 0x6c664c20, + 0x322f4: 0x6c664e20, 0x322f5: 0x6c665020, 0x322f6: 0x6c665220, 0x322f7: 0x6c665420, + 0x322f8: 0x6c665620, 0x322f9: 0x6c665820, 0x322fa: 0x6c665a20, 0x322fb: 0x6c665c20, + 0x322fc: 0x6c665e20, 0x322fd: 0x6c666020, 0x322fe: 0x6c666220, 0x322ff: 0x6c666420, + // Block 0xc8c, offset 0x32300 + 0x32300: 0x6c666620, 0x32301: 0x6c666820, 0x32302: 0x6c666a20, 0x32303: 0x6c666c20, + 0x32304: 0x6c666e20, 0x32305: 0x6c667020, 0x32306: 0x6c667220, 0x32307: 0x6c667420, + 0x32308: 0x6c667620, 0x32309: 0x6c667820, 0x3230a: 0x6c667a20, 0x3230b: 0x6c667c20, + 0x3230c: 0x6c667e20, 0x3230d: 0x6c668020, 0x3230e: 0x6c668220, 0x3230f: 0x6c668420, + 0x32310: 0x6c668620, 0x32311: 0x6c668820, 0x32312: 0x6c668a20, 0x32313: 0x6c668c20, + 0x32314: 0x6c668e20, 0x32315: 0x6c669020, 0x32316: 0x6c669220, 0x32317: 0x6c669420, + 0x32318: 0x6c669620, 0x32319: 0x6c669820, 0x3231a: 0x6c669a20, 0x3231b: 0x6c669c20, + 0x3231c: 0x6c669e20, 0x3231d: 0x6c8cf820, 0x3231e: 0x6c8cfa20, 0x3231f: 0x6c8cfc20, + 0x32320: 0x6c8cfe20, 0x32321: 0x6c8d0020, 0x32322: 0x6c8d0220, 0x32323: 0x6c8d0420, + 0x32324: 0x6c8d0620, 0x32325: 0x6c8d0820, 0x32326: 0x6c8d0a20, 0x32327: 0x6c8d0c20, + 0x32328: 0x6c8d0e20, 0x32329: 0x6c8d1020, 0x3232a: 0x6c8d1220, 0x3232b: 0x6c8d1420, + 0x3232c: 0x6c8d1620, 0x3232d: 0x6c8d1820, 0x3232e: 0x6c8d1a20, 0x3232f: 0x6c8d1c20, + 0x32330: 0x6c8d1e20, 0x32331: 0x6c8d2020, 0x32332: 0x6c8d2220, 0x32333: 0x6c8d2420, + 0x32334: 0x6c8d2620, 0x32335: 0x6c8d2820, 0x32336: 0x6c66a020, 0x32337: 0x6c8d2a20, + 0x32338: 0x6c8d2c20, 0x32339: 0x6c8d2e20, 0x3233a: 0x6c8d3020, 0x3233b: 0x6c8d3220, + 0x3233c: 0x6c8d3420, 0x3233d: 0x6c8d3620, 0x3233e: 0x6c8d3820, 0x3233f: 0x6cb95a20, + // Block 0xc8d, offset 0x32340 + 0x32340: 0x6cb95c20, 0x32341: 0x6cb95e20, 0x32342: 0x6cb96020, 0x32343: 0x6cb96220, + 0x32344: 0x6cb96420, 0x32345: 0x6cb96620, 0x32346: 0x6cb96820, 0x32347: 0x6cb96a20, + 0x32348: 0x6cb96c20, 0x32349: 0x6cb96e20, 0x3234a: 0x6cb97020, 0x3234b: 0x6cb97220, + 0x3234c: 0x6cb97420, 0x3234d: 0x6cb97620, 0x3234e: 0x6cb97820, 0x3234f: 0x6cb97a20, + 0x32350: 0x6cb97c20, 0x32351: 0x6cb97e20, 0x32352: 0x6cb98020, 0x32353: 0x6cb98220, + 0x32354: 0x6cb98420, 0x32355: 0x6cb98620, 0x32356: 0x6cb98820, 0x32357: 0x6cb98a20, + 0x32358: 0x6cb98c20, 0x32359: 0x6cb98e20, 0x3235a: 0x6cb99020, 0x3235b: 0x6cb99220, + 0x3235c: 0x6cd55e20, 0x3235d: 0x6cb99420, 0x3235e: 0x6cb99620, 0x3235f: 0x6cb99820, + 0x32360: 0x6cb99a20, 0x32361: 0x6cb99c20, 0x32362: 0x6cb99e20, 0x32363: 0x6cb9a020, + 0x32364: 0x6cb9a220, 0x32365: 0x6cea5220, 0x32366: 0x6cea5420, 0x32367: 0x6cea5620, + 0x32368: 0x6cea5820, 0x32369: 0x6cea5a20, 0x3236a: 0x6cea5c20, 0x3236b: 0x6cea5e20, + 0x3236c: 0x6cea6020, 0x3236d: 0x6cea6220, 0x3236e: 0x6cea6420, 0x3236f: 0x6cea6620, + 0x32370: 0x6cea6820, 0x32371: 0x6cea6a20, 0x32372: 0x6cea6c20, 0x32373: 0x6cea6e20, + 0x32374: 0x6cea7020, 0x32375: 0x6cea7220, 0x32376: 0x6cea7420, 0x32377: 0x6cea7620, + 0x32378: 0x6cea7820, 0x32379: 0x6cea7a20, 0x3237a: 0x6cea7c20, 0x3237b: 0x6cea7e20, + 0x3237c: 0x6cea8020, 0x3237d: 0x6cea8220, 0x3237e: 0x6cea8420, 0x3237f: 0x6cea8620, + // Block 0xc8e, offset 0x32380 + 0x32380: 0x6cea8820, 0x32381: 0x6cea8a20, 0x32382: 0x6d1a3020, 0x32383: 0x6d1a3220, + 0x32384: 0x6d1a3420, 0x32385: 0x6d1a3620, 0x32386: 0x6d1a3820, 0x32387: 0x6d1a3a20, + 0x32388: 0x6d1a3c20, 0x32389: 0x6d1a3e20, 0x3238a: 0x6d1a4020, 0x3238b: 0x6d1a4220, + 0x3238c: 0x6d1a4420, 0x3238d: 0x6d1a4620, 0x3238e: 0x6d1a4820, 0x3238f: 0x6d1a4a20, + 0x32390: 0x6d1a4c20, 0x32391: 0x6d1a4e20, 0x32392: 0x6d1a5020, 0x32393: 0x6d1a5220, + 0x32394: 0x6d1a5420, 0x32395: 0x6d1a5620, 0x32396: 0x6d1a5820, 0x32397: 0x6d1a5a20, + 0x32398: 0x6d1a5c20, 0x32399: 0x6d1a5e20, 0x3239a: 0x6d1a6020, 0x3239b: 0x6d1a6220, + 0x3239c: 0x6d1a6420, 0x3239d: 0x6d1a6620, 0x3239e: 0x6d1a6820, 0x3239f: 0x6d1a6a20, + 0x323a0: 0x6d48ae20, 0x323a1: 0x6d1a6c20, 0x323a2: 0x6d1a6e20, 0x323a3: 0x6d1a7020, + 0x323a4: 0x6d1a7220, 0x323a5: 0x6d1a7420, 0x323a6: 0x6d48b020, 0x323a7: 0x6d48b220, + 0x323a8: 0x6d48b420, 0x323a9: 0x6d48b620, 0x323aa: 0x6d48b820, 0x323ab: 0x6d48ba20, + 0x323ac: 0x6d48bc20, 0x323ad: 0x6d48be20, 0x323ae: 0x6d48c020, 0x323af: 0x6d48c220, + 0x323b0: 0x6d48c420, 0x323b1: 0x6d48c620, 0x323b2: 0x6d48c820, 0x323b3: 0x6d48ca20, + 0x323b4: 0x6d48cc20, 0x323b5: 0x6d48ce20, 0x323b6: 0x6d48d020, 0x323b7: 0x6d48d220, + 0x323b8: 0x6d48d420, 0x323b9: 0x6d48d620, 0x323ba: 0x6d76b420, 0x323bb: 0x6d76b620, + 0x323bc: 0x6d76b820, 0x323bd: 0x6d76ba20, 0x323be: 0x6d76bc20, 0x323bf: 0x6d76be20, + // Block 0xc8f, offset 0x323c0 + 0x323c0: 0x6d76c020, 0x323c1: 0x6d76c220, 0x323c2: 0x6d76c420, 0x323c3: 0x6d76c620, + 0x323c4: 0x6d76c820, 0x323c5: 0x6d76ca20, 0x323c6: 0x6d76cc20, 0x323c7: 0x6d76ce20, + 0x323c8: 0x6d76d020, 0x323c9: 0x6d76d220, 0x323ca: 0x6d76d420, 0x323cb: 0x6d938220, + 0x323cc: 0x6da03620, 0x323cd: 0x6da03820, 0x323ce: 0x6da03a20, 0x323cf: 0x6da03c20, + 0x323d0: 0x6da03e20, 0x323d1: 0x6da04020, 0x323d2: 0x6da04220, 0x323d3: 0x6da04420, + 0x323d4: 0x6da04620, 0x323d5: 0x6da04820, 0x323d6: 0x6da04a20, 0x323d7: 0x6da04c20, + 0x323d8: 0x6da04e20, 0x323d9: 0x6da05020, 0x323da: 0x6da05220, 0x323db: 0x6dc2b820, + 0x323dc: 0x6dc2ba20, 0x323dd: 0x6dc2bc20, 0x323de: 0x6dc2be20, 0x323df: 0x6dc2c020, + 0x323e0: 0x6dc2c220, 0x323e1: 0x6de05a20, 0x323e2: 0x6de05c20, 0x323e3: 0x6de05e20, + 0x323e4: 0x6df8a820, 0x323e5: 0x6e0c7620, 0x323e6: 0x6df8aa20, 0x323e7: 0x6df8ac20, + 0x323e8: 0x6df8ae20, 0x323e9: 0x6df8b020, 0x323ea: 0x6e0c7820, 0x323eb: 0x6e0c7a20, + 0x323ec: 0x6e0c7c20, 0x323ed: 0x6e0c7e20, 0x323ee: 0x6e286420, 0x323ef: 0x6e319420, + 0x323f0: 0x6e3cec20, 0x323f1: 0x6e3cee20, 0x323f2: 0x6c016220, 0x323f3: 0x6c034020, + 0x323f4: 0x6c034220, 0x323f5: 0x6c034420, 0x323f6: 0x6c06ae20, 0x323f7: 0x6c06b020, + 0x323f8: 0x6c06b220, 0x323f9: 0x6c0d4c20, 0x323fa: 0x6c0d4e20, 0x323fb: 0x6c0d5020, + 0x323fc: 0x6c0d5220, 0x323fd: 0x6c0d5420, 0x323fe: 0x6c0d5620, 0x323ff: 0x6c0d5820, + // Block 0xc90, offset 0x32400 + 0x32400: 0x6c0d5a20, 0x32401: 0x6c0d5c20, 0x32402: 0x6c185420, 0x32403: 0x6c185620, + 0x32404: 0x6c185820, 0x32405: 0x6c185a20, 0x32406: 0x6c185c20, 0x32407: 0x6c185e20, + 0x32408: 0x6c186020, 0x32409: 0x6c186220, 0x3240a: 0x6c186420, 0x3240b: 0x6c186620, + 0x3240c: 0x6c186820, 0x3240d: 0x6c186a20, 0x3240e: 0x6c186c20, 0x3240f: 0x6c186e20, + 0x32410: 0x6c187020, 0x32411: 0x6c2b6820, 0x32412: 0x6c2b6a20, 0x32413: 0x6c2b6c20, + 0x32414: 0x6c2b6e20, 0x32415: 0x6c2b7020, 0x32416: 0x6c2b7220, 0x32417: 0x6c2b7420, + 0x32418: 0x6c2b7620, 0x32419: 0x6c2b7820, 0x3241a: 0x6c2b7a20, 0x3241b: 0x6c2b7c20, + 0x3241c: 0x6c2b7e20, 0x3241d: 0x6c2b8020, 0x3241e: 0x6c456620, 0x3241f: 0x6c456820, + 0x32420: 0x6c456a20, 0x32421: 0x6c456c20, 0x32422: 0x6c456e20, 0x32423: 0x6c457020, + 0x32424: 0x6c457220, 0x32425: 0x6c457420, 0x32426: 0x6c457620, 0x32427: 0x6c457820, + 0x32428: 0x6c457a20, 0x32429: 0x6c457c20, 0x3242a: 0x6c457e20, 0x3242b: 0x6c66b820, + 0x3242c: 0x6c66ba20, 0x3242d: 0x6c66bc20, 0x3242e: 0x6c66be20, 0x3242f: 0x6c66c020, + 0x32430: 0x6c66c220, 0x32431: 0x6c66c420, 0x32432: 0x6c66c620, 0x32433: 0x6c66c820, + 0x32434: 0x6c66ca20, 0x32435: 0x6c66cc20, 0x32436: 0x6c66ce20, 0x32437: 0x6c66d020, + 0x32438: 0x6c66d220, 0x32439: 0x6c66d420, 0x3243a: 0x6c66d620, 0x3243b: 0x6c8d5420, + 0x3243c: 0x6c8d5620, 0x3243d: 0x6c8d5820, 0x3243e: 0x6c8d5a20, 0x3243f: 0x6c8d5c20, + // Block 0xc91, offset 0x32440 + 0x32440: 0x6c8d5e20, 0x32441: 0x6c8d6020, 0x32442: 0x6c8d6220, 0x32443: 0x6c8d6420, + 0x32444: 0x6c8d6620, 0x32445: 0x6cb9b420, 0x32446: 0x6cb9b620, 0x32447: 0x6cb9b820, + 0x32448: 0x6cb9ba20, 0x32449: 0x6cb9bc20, 0x3244a: 0x6cb9be20, 0x3244b: 0x6cb9c020, + 0x3244c: 0x6cb9c220, 0x3244d: 0x6cb9c420, 0x3244e: 0x6cb9c620, 0x3244f: 0x6cb9c820, + 0x32450: 0x6cb9ca20, 0x32451: 0x6cb9cc20, 0x32452: 0x6cb9ce20, 0x32453: 0x6ceaa420, + 0x32454: 0x6ceaa620, 0x32455: 0x6ceaa820, 0x32456: 0x6ceaaa20, 0x32457: 0x6ceaac20, + 0x32458: 0x6ceaae20, 0x32459: 0x6ceab020, 0x3245a: 0x6ceab220, 0x3245b: 0x6ceab420, + 0x3245c: 0x6ceab620, 0x3245d: 0x6ceab820, 0x3245e: 0x6ceaba20, 0x3245f: 0x6ceabc20, + 0x32460: 0x6d1a8420, 0x32461: 0x6d1a8620, 0x32462: 0x6d1a8820, 0x32463: 0x6d1a8a20, + 0x32464: 0x6d1a8c20, 0x32465: 0x6d1a8e20, 0x32466: 0x6d1a9020, 0x32467: 0x6d1a9220, + 0x32468: 0x6d1a9420, 0x32469: 0x6d1a9620, 0x3246a: 0x6d1a9820, 0x3246b: 0x6d1a9a20, + 0x3246c: 0x6d1a9c20, 0x3246d: 0x6d1a9e20, 0x3246e: 0x6d1aa020, 0x3246f: 0x6d1aa220, + 0x32470: 0x6d48e420, 0x32471: 0x6d48e620, 0x32472: 0x6d48e820, 0x32473: 0x6d48ea20, + 0x32474: 0x6d48ec20, 0x32475: 0x6d48ee20, 0x32476: 0x6d76dc20, 0x32477: 0x6d76de20, + 0x32478: 0x6d76e020, 0x32479: 0x6da06220, 0x3247a: 0x6da06420, 0x3247b: 0x6da06620, + 0x3247c: 0x6da06820, 0x3247d: 0x6da06a20, 0x3247e: 0x6da06c20, 0x3247f: 0x6da06e20, + // Block 0xc92, offset 0x32480 + 0x32480: 0x6dc2c620, 0x32481: 0x6dc2c820, 0x32482: 0x6dc2ca20, 0x32483: 0x6dc2cc20, + 0x32484: 0x6de06220, 0x32485: 0x6de06420, 0x32486: 0x6df8b220, 0x32487: 0x6e0c8020, + 0x32488: 0x6e286620, 0x32489: 0x6e286820, 0x3248a: 0x6e384220, 0x3248b: 0x6e46ae20, + 0x3248c: 0x6c035620, 0x3248d: 0x6c06be20, 0x3248e: 0x6c06c020, 0x3248f: 0x6c06c220, + 0x32490: 0x6c06c420, 0x32491: 0x6c0d6020, 0x32492: 0x6c0d6220, 0x32493: 0x6c0d6420, + 0x32494: 0x6c187a20, 0x32495: 0x6c187c20, 0x32496: 0x6c187e20, 0x32497: 0x6c188020, + 0x32498: 0x6c2b8e20, 0x32499: 0x6c2b9020, 0x3249a: 0x6c2b9220, 0x3249b: 0x6c2b9420, + 0x3249c: 0x6c2b9620, 0x3249d: 0x6c2b9820, 0x3249e: 0x6c458420, 0x3249f: 0x6c458620, + 0x324a0: 0x6c458820, 0x324a1: 0x6c458a20, 0x324a2: 0x6c458c20, 0x324a3: 0x6c458e20, + 0x324a4: 0x6c66e020, 0x324a5: 0x6c66e220, 0x324a6: 0x6c66e420, 0x324a7: 0x6c66e620, + 0x324a8: 0x6c66e820, 0x324a9: 0x6c66ea20, 0x324aa: 0x6c66ec20, 0x324ab: 0x6c66ee20, + 0x324ac: 0x6c66f020, 0x324ad: 0x6c66f220, 0x324ae: 0x6c8d7020, 0x324af: 0x6c8d7220, + 0x324b0: 0x6c8d7420, 0x324b1: 0x6c8d7620, 0x324b2: 0x6c8d7820, 0x324b3: 0x6c8d7a20, + 0x324b4: 0x6c8d7c20, 0x324b5: 0x6cb9da20, 0x324b6: 0x6cb9dc20, 0x324b7: 0x6cb9de20, + 0x324b8: 0x6ceac420, 0x324b9: 0x6ceac620, 0x324ba: 0x6ceac820, 0x324bb: 0x6ceaca20, + 0x324bc: 0x6ceacc20, 0x324bd: 0x6d1aa820, 0x324be: 0x6d1aaa20, 0x324bf: 0x6d1aac20, + // Block 0xc93, offset 0x324c0 + 0x324c0: 0x6d1aae20, 0x324c1: 0x6d1ab020, 0x324c2: 0x6d1ab220, 0x324c3: 0x6d48f420, + 0x324c4: 0x6d76e220, 0x324c5: 0x6d76e420, 0x324c6: 0x6d76e620, 0x324c7: 0x6d76e820, + 0x324c8: 0x6da07020, 0x324c9: 0x6da07220, 0x324ca: 0x6da07420, 0x324cb: 0x6df8b420, + 0x324cc: 0x6df8b620, 0x324cd: 0x6df8b820, 0x324ce: 0x6c00ae20, 0x324cf: 0x6c035c20, + 0x324d0: 0x6c06c820, 0x324d1: 0x6c188220, 0x324d2: 0x6c188420, 0x324d3: 0x6c188620, + 0x324d4: 0x6c188820, 0x324d5: 0x6c188a20, 0x324d6: 0x6c2b9c20, 0x324d7: 0x6c459020, + 0x324d8: 0x6c459220, 0x324d9: 0x6c459420, 0x324da: 0x6c459620, 0x324db: 0x6c459820, + 0x324dc: 0x6c459a20, 0x324dd: 0x6c459c20, 0x324de: 0x6c66f420, 0x324df: 0x6c66f620, + 0x324e0: 0x6c66f820, 0x324e1: 0x6c66fa20, 0x324e2: 0x6c63d420, 0x324e3: 0x6cb9e020, + 0x324e4: 0x6cb9e220, 0x324e5: 0x6ceace20, 0x324e6: 0x6d1ab420, 0x324e7: 0x6d1ab620, + 0x324e8: 0x6d1ab820, 0x324e9: 0x6da07620, 0x324ea: 0x6dc2ce20, 0x324eb: 0x6dea7420, + 0x324ec: 0x6c00b220, 0x324ed: 0x6c035e20, 0x324ee: 0x6c0d7020, 0x324ef: 0x6c0d7220, + 0x324f0: 0x6c0d7420, 0x324f1: 0x6c0d7620, 0x324f2: 0x6c0d7a20, 0x324f3: 0x6c189620, + 0x324f4: 0x6c189820, 0x324f5: 0x6c189a20, 0x324f6: 0x6c189c20, 0x324f7: 0x6c189e20, + 0x324f8: 0x6c2ba020, 0x324f9: 0x6c2ba220, 0x324fa: 0x6c2ba420, 0x324fb: 0x6c2ba620, + 0x324fc: 0x6c45a620, 0x324fd: 0x6c45a820, 0x324fe: 0x6c45aa20, 0x324ff: 0x6c45ac20, + // Block 0xc94, offset 0x32500 + 0x32500: 0x6c45ae20, 0x32501: 0x6c45b020, 0x32502: 0x6c45b220, 0x32503: 0x6c45c220, + 0x32504: 0x6c45b420, 0x32505: 0x6c45b620, 0x32506: 0x6c45b820, 0x32507: 0x6c45ba20, + 0x32508: 0x6c45bc20, 0x32509: 0x6c670220, 0x3250a: 0x6c670420, 0x3250b: 0x6c670620, + 0x3250c: 0x6c670820, 0x3250d: 0x6c670a20, 0x3250e: 0x6c8d8e20, 0x3250f: 0x6c8d9020, + 0x32510: 0x6cb9e420, 0x32511: 0x6cb9e620, 0x32512: 0x6cb9e820, 0x32513: 0x6cb9ea20, + 0x32514: 0x6cb9ec20, 0x32515: 0x6cb9ee20, 0x32516: 0x6ceada20, 0x32517: 0x6ceadc20, + 0x32518: 0x6ceade20, 0x32519: 0x6d1ac220, 0x3251a: 0x6d1ac420, 0x3251b: 0x6d1ac620, + 0x3251c: 0x6d48f820, 0x3251d: 0x6d48fa20, 0x3251e: 0x6d48fc20, 0x3251f: 0x6d48fe20, + 0x32520: 0x6d490020, 0x32521: 0x6d490220, 0x32522: 0x6d76ec20, 0x32523: 0x6d76ee20, + 0x32524: 0x6dc2d020, 0x32525: 0x6dc2d220, 0x32526: 0x6de06a20, 0x32527: 0x6de06c20, + 0x32528: 0x6df8bc20, 0x32529: 0x6df8be20, 0x3252a: 0x6e1c2420, 0x3252b: 0x6e3cf220, + 0x3252c: 0x6e451420, 0x3252d: 0x6c036420, 0x3252e: 0x6c0d7c20, 0x3252f: 0x6c0d7e20, + 0x32530: 0x6c18a820, 0x32531: 0x6c18aa20, 0x32532: 0x6c18ac20, 0x32533: 0x6c2baa20, + 0x32534: 0x6c45c420, 0x32535: 0x6c45c620, 0x32536: 0x6c670e20, 0x32537: 0x6d1aca20, + 0x32538: 0x6df8c220, 0x32539: 0x6e1c2620, 0x3253a: 0x6e1c2820, 0x3253b: 0x6c037020, + 0x3253c: 0x6c037220, 0x3253d: 0x6c06da20, 0x3253e: 0x6c06dc20, 0x3253f: 0x6c037420, + // Block 0xc95, offset 0x32540 + 0x32540: 0x6c06de20, 0x32541: 0x6c06e020, 0x32542: 0x6c0d8e20, 0x32543: 0x6c0d9020, + 0x32544: 0x6c0d9220, 0x32545: 0x6c0d9420, 0x32546: 0x6c0d9620, 0x32547: 0x6c0d9820, + 0x32548: 0x6c0d9a20, 0x32549: 0x6c0d9c20, 0x3254a: 0x6c0d9e20, 0x3254b: 0x6c0da020, + 0x3254c: 0x6c0da220, 0x3254d: 0x6c0da420, 0x3254e: 0x6c0da620, 0x3254f: 0x6c0da820, + 0x32550: 0x6c0daa20, 0x32551: 0x6c18ae20, 0x32552: 0x6c18b020, 0x32553: 0x6c18b220, + 0x32554: 0x6c18b420, 0x32555: 0x6c18b620, 0x32556: 0x6c18b820, 0x32557: 0x6c18ba20, + 0x32558: 0x6c2bba20, 0x32559: 0x6c2bbc20, 0x3255a: 0x6c2bbe20, 0x3255b: 0x6c2bc020, + 0x3255c: 0x6c2bc220, 0x3255d: 0x6c2bc420, 0x3255e: 0x6c2bc620, 0x3255f: 0x6c2bc820, + 0x32560: 0x6c2bca20, 0x32561: 0x6c2bcc20, 0x32562: 0x6c2bce20, 0x32563: 0x6c671020, + 0x32564: 0x6c671220, 0x32565: 0x6c671420, 0x32566: 0x6c671620, 0x32567: 0x6c671820, + 0x32568: 0x6c671a20, 0x32569: 0x6c671c20, 0x3256a: 0x6c8d9a20, 0x3256b: 0x6c8d9c20, + 0x3256c: 0x6c8d9e20, 0x3256d: 0x6c8da020, 0x3256e: 0x6c8da220, 0x3256f: 0x6c8da420, + 0x32570: 0x6cb9f420, 0x32571: 0x6cb9f620, 0x32572: 0x6cb9f820, 0x32573: 0x6cb9fa20, + 0x32574: 0x6ceae220, 0x32575: 0x6ceae420, 0x32576: 0x6ceae620, 0x32577: 0x6ceae820, + 0x32578: 0x6ceaea20, 0x32579: 0x6ceaec20, 0x3257a: 0x6ceaee20, 0x3257b: 0x6ceaf020, + 0x3257c: 0x6ceaf220, 0x3257d: 0x6d1acc20, 0x3257e: 0x6d1ace20, 0x3257f: 0x6d1ad020, + // Block 0xc96, offset 0x32580 + 0x32580: 0x6d490420, 0x32581: 0x6d490620, 0x32582: 0x6d490820, 0x32583: 0x6d490a20, + 0x32584: 0x6d490c20, 0x32585: 0x6da07a20, 0x32586: 0x6da07c20, 0x32587: 0x6da07e20, + 0x32588: 0x6da08020, 0x32589: 0x6dc2d420, 0x3258a: 0x6dc2d620, 0x3258b: 0x6dc2d820, + 0x3258c: 0x6dc2da20, 0x3258d: 0x6dc2dc20, 0x3258e: 0x6de06e20, 0x3258f: 0x6e0c8620, + 0x32590: 0x6e384420, 0x32591: 0x6e3cf420, 0x32592: 0x6c016c20, 0x32593: 0x6c06ea20, + 0x32594: 0x6c0dae20, 0x32595: 0x6c0db020, 0x32596: 0x6c0db220, 0x32597: 0x6c0db420, + 0x32598: 0x6c0db620, 0x32599: 0x6c18c420, 0x3259a: 0x6c18c620, 0x3259b: 0x6c18c820, + 0x3259c: 0x6c18ca20, 0x3259d: 0x6c161a20, 0x3259e: 0x6c2bdc20, 0x3259f: 0x6c2bde20, + 0x325a0: 0x6c2be020, 0x325a1: 0x6c2be220, 0x325a2: 0x6c2be420, 0x325a3: 0x6c2be620, + 0x325a4: 0x6c2be820, 0x325a5: 0x6c2bea20, 0x325a6: 0x6c2bec20, 0x325a7: 0x6c2bee20, + 0x325a8: 0x6c2bf020, 0x325a9: 0x6c45ce20, 0x325aa: 0x6c45d020, 0x325ab: 0x6c45d220, + 0x325ac: 0x6c45d420, 0x325ad: 0x6c45d620, 0x325ae: 0x6c45d820, 0x325af: 0x6c45da20, + 0x325b0: 0x6c45dc20, 0x325b1: 0x6c45de20, 0x325b2: 0x6c45e020, 0x325b3: 0x6c672020, + 0x325b4: 0x6c672220, 0x325b5: 0x6c672420, 0x325b6: 0x6c672620, 0x325b7: 0x6c672820, + 0x325b8: 0x6cb78420, 0x325b9: 0x6c672a20, 0x325ba: 0x6c8daa20, 0x325bb: 0x6c8dac20, + 0x325bc: 0x6c8dae20, 0x325bd: 0x6c8db020, 0x325be: 0x6c8db220, 0x325bf: 0x6c8db420, + // Block 0xc97, offset 0x325c0 + 0x325c0: 0x6cb9fc20, 0x325c1: 0x6cb9fe20, 0x325c2: 0x6cba0020, 0x325c3: 0x6cbd9e20, + 0x325c4: 0x6cba0220, 0x325c5: 0x6ceaf620, 0x325c6: 0x6d1ad420, 0x325c7: 0x6d1ad620, + 0x325c8: 0x6d491220, 0x325c9: 0x6d491420, 0x325ca: 0x6d491620, 0x325cb: 0x6e400820, + 0x325cc: 0x6e467a20, 0x325cd: 0x6c037e20, 0x325ce: 0x6c038020, 0x325cf: 0x6c038220, + 0x325d0: 0x6c038420, 0x325d1: 0x6c06f220, 0x325d2: 0x6c0dbc20, 0x325d3: 0x6c0dbe20, + 0x325d4: 0x6c0dc020, 0x325d5: 0x6c0dc220, 0x325d6: 0x6c0dc420, 0x325d7: 0x6c0dc620, + 0x325d8: 0x6c18da20, 0x325d9: 0x6c45ea20, 0x325da: 0x6c45ec20, 0x325db: 0x6c45ee20, + 0x325dc: 0x6c45f020, 0x325dd: 0x6c45f220, 0x325de: 0x6c672e20, 0x325df: 0x6cba0420, + 0x325e0: 0x6cba0620, 0x325e1: 0x6cba0820, 0x325e2: 0x6ceafc20, 0x325e3: 0x6ceafe20, + 0x325e4: 0x6ceb0020, 0x325e5: 0x6d1ada20, 0x325e6: 0x6da08420, 0x325e7: 0x6dc2e020, + 0x325e8: 0x6dc2e220, 0x325e9: 0x6dc2e420, 0x325ea: 0x6dc2e620, 0x325eb: 0x6e3cf620, + 0x325ec: 0x6c038e20, 0x325ed: 0x6c06fa20, 0x325ee: 0x6c06fc20, 0x325ef: 0x6c06fe20, + 0x325f0: 0x6c070020, 0x325f1: 0x6c070220, 0x325f2: 0x6c070420, 0x325f3: 0x6c070620, + 0x325f4: 0x6c0dda20, 0x325f5: 0x6c0ddc20, 0x325f6: 0x6c0dde20, 0x325f7: 0x6c0de020, + 0x325f8: 0x6c0de220, 0x325f9: 0x6c0de420, 0x325fa: 0x6c0de620, 0x325fb: 0x6c0de820, + 0x325fc: 0x6c0dea20, 0x325fd: 0x6c0dec20, 0x325fe: 0x6c0dee20, 0x325ff: 0x6c0df020, + // Block 0xc98, offset 0x32600 + 0x32600: 0x6c18ec20, 0x32601: 0x6c18ee20, 0x32602: 0x6c18f020, 0x32603: 0x6c18f220, + 0x32604: 0x6c18f420, 0x32605: 0x6c18f620, 0x32606: 0x6c18f820, 0x32607: 0x6c18fa20, + 0x32608: 0x6c18fc20, 0x32609: 0x6c18fe20, 0x3260a: 0x6c2c0c20, 0x3260b: 0x6c2c0e20, + 0x3260c: 0x6c2c1020, 0x3260d: 0x6c2c1220, 0x3260e: 0x6c2c1420, 0x3260f: 0x6c2c1620, + 0x32610: 0x6c2c1820, 0x32611: 0x6c2c1a20, 0x32612: 0x6c2c1c20, 0x32613: 0x6c2c1e20, + 0x32614: 0x6c2c2020, 0x32615: 0x6c2c2220, 0x32616: 0x6c2a5a20, 0x32617: 0x6c460420, + 0x32618: 0x6c460620, 0x32619: 0x6c460820, 0x3261a: 0x6c460a20, 0x3261b: 0x6c460c20, + 0x3261c: 0x6c460e20, 0x3261d: 0x6c461020, 0x3261e: 0x6c461220, 0x3261f: 0x6c461420, + 0x32620: 0x6c461620, 0x32621: 0x6c461820, 0x32622: 0x6c461a20, 0x32623: 0x6c461c20, + 0x32624: 0x6c461e20, 0x32625: 0x6c462020, 0x32626: 0x6c462220, 0x32627: 0x6c674220, + 0x32628: 0x6c674420, 0x32629: 0x6c674620, 0x3262a: 0x6c674820, 0x3262b: 0x6c674a20, + 0x3262c: 0x6c674c20, 0x3262d: 0x6c674e20, 0x3262e: 0x6c675020, 0x3262f: 0x6c675220, + 0x32630: 0x6c675420, 0x32631: 0x6c675620, 0x32632: 0x6c675820, 0x32633: 0x6c675a20, + 0x32634: 0x6c675c20, 0x32635: 0x6c675e20, 0x32636: 0x6c676020, 0x32637: 0x6c676220, + 0x32638: 0x6c8dc220, 0x32639: 0x6c8dc420, 0x3263a: 0x6c8dc620, 0x3263b: 0x6c8dc820, + 0x3263c: 0x6c8dca20, 0x3263d: 0x6c8dcc20, 0x3263e: 0x6c8dce20, 0x3263f: 0x6ceb0820, + // Block 0xc99, offset 0x32640 + 0x32640: 0x6c8dd020, 0x32641: 0x6c8dd220, 0x32642: 0x6c8dd420, 0x32643: 0x6c8dd620, + 0x32644: 0x6c8dd820, 0x32645: 0x6c8dda20, 0x32646: 0x6c8ddc20, 0x32647: 0x6cba1620, + 0x32648: 0x6cba1820, 0x32649: 0x6cba1a20, 0x3264a: 0x6cba1c20, 0x3264b: 0x6cba1e20, + 0x3264c: 0x6cba2020, 0x3264d: 0x6cba2220, 0x3264e: 0x6cba2420, 0x3264f: 0x6cba2620, + 0x32650: 0x6cba2820, 0x32651: 0x6ceb0a20, 0x32652: 0x6ceb0c20, 0x32653: 0x6ceb0e20, + 0x32654: 0x6ceb1020, 0x32655: 0x6ceb1220, 0x32656: 0x6ceb1420, 0x32657: 0x6ceb1620, + 0x32658: 0x6ceb1820, 0x32659: 0x6d1ae820, 0x3265a: 0x6d1aea20, 0x3265b: 0x6d1aec20, + 0x3265c: 0x6d1aee20, 0x3265d: 0x6d1af020, 0x3265e: 0x6d1af220, 0x3265f: 0x6d1af420, + 0x32660: 0x6d1af620, 0x32661: 0x6d1af820, 0x32662: 0x6d1afa20, 0x32663: 0x6d1afc20, + 0x32664: 0x6d1afe20, 0x32665: 0x6d1b0020, 0x32666: 0x6d1b0220, 0x32667: 0x6d1b0420, + 0x32668: 0x6d1b0620, 0x32669: 0x6d1b0820, 0x3266a: 0x6d1b0a20, 0x3266b: 0x6d1b0c20, + 0x3266c: 0x6d1b0e20, 0x3266d: 0x6d491e20, 0x3266e: 0x6d492020, 0x3266f: 0x6d492220, + 0x32670: 0x6d492420, 0x32671: 0x6d492620, 0x32672: 0x6d492820, 0x32673: 0x6d492a20, + 0x32674: 0x6d492c20, 0x32675: 0x6d492e20, 0x32676: 0x6d493020, 0x32677: 0x6d493220, + 0x32678: 0x6d493420, 0x32679: 0x6d5ad220, 0x3267a: 0x6d76f020, 0x3267b: 0x6d76f220, + 0x3267c: 0x6d76f420, 0x3267d: 0x6d76f620, 0x3267e: 0x6d76f820, 0x3267f: 0x6da08a20, + // Block 0xc9a, offset 0x32680 + 0x32680: 0x6dc2e820, 0x32681: 0x6dc2ea20, 0x32682: 0x6dc2ec20, 0x32683: 0x6dc2ee20, + 0x32684: 0x6dc2f020, 0x32685: 0x6dc2f220, 0x32686: 0x6dc2f420, 0x32687: 0x6df8c620, + 0x32688: 0x6dfbb620, 0x32689: 0x6e0c8820, 0x3268a: 0x6e0c8a20, 0x3268b: 0x6e1c2a20, + 0x3268c: 0x6e286a20, 0x3268d: 0x6e286c20, 0x3268e: 0x6e286e20, 0x3268f: 0x6e319820, + 0x32690: 0x6e442420, 0x32691: 0x6e462220, 0x32692: 0x6e467c20, 0x32693: 0x6c017620, + 0x32694: 0x6c017820, 0x32695: 0x6c017a20, 0x32696: 0x6c017c20, 0x32697: 0x6c039820, + 0x32698: 0x6c039a20, 0x32699: 0x6c071020, 0x3269a: 0x6c071220, 0x3269b: 0x6c071420, + 0x3269c: 0x6c071620, 0x3269d: 0x6c071820, 0x3269e: 0x6c0df620, 0x3269f: 0x6c0df820, + 0x326a0: 0x6c0dfa20, 0x326a1: 0x6c0dfc20, 0x326a2: 0x6c0dfe20, 0x326a3: 0x6c0e0020, + 0x326a4: 0x6c0e0220, 0x326a5: 0x6c0e0420, 0x326a6: 0x6c190620, 0x326a7: 0x6c190820, + 0x326a8: 0x6c190a20, 0x326a9: 0x6c2c2e20, 0x326aa: 0x6c2c3020, 0x326ab: 0x6c2c3220, + 0x326ac: 0x6c2c3420, 0x326ad: 0x6c2c3620, 0x326ae: 0x6c2ab020, 0x326af: 0x6c2c3820, + 0x326b0: 0x6c462c20, 0x326b1: 0x6c462e20, 0x326b2: 0x6c463020, 0x326b3: 0x6c464a20, + 0x326b4: 0x6c463220, 0x326b5: 0x6c463420, 0x326b6: 0x6c463620, 0x326b7: 0x6c463820, + 0x326b8: 0x6c463a20, 0x326b9: 0x6c677220, 0x326ba: 0x6c677420, 0x326bb: 0x6c677620, + 0x326bc: 0x6c677820, 0x326bd: 0x6c8dea20, 0x326be: 0x6c8dec20, 0x326bf: 0x6cba3020, + // Block 0xc9b, offset 0x326c0 + 0x326c0: 0x6cba3220, 0x326c1: 0x6cba3420, 0x326c2: 0x6cba3620, 0x326c3: 0x6cba3820, + 0x326c4: 0x6cba3a20, 0x326c5: 0x6cba3c20, 0x326c6: 0x6ceb2220, 0x326c7: 0x6ceb2420, + 0x326c8: 0x6ceb2620, 0x326c9: 0x6ceb2820, 0x326ca: 0x6ceb2a20, 0x326cb: 0x6ceb2c20, + 0x326cc: 0x6ceb2e20, 0x326cd: 0x6d1b1820, 0x326ce: 0x6d1b1a20, 0x326cf: 0x6d1b1c20, + 0x326d0: 0x6d1b1e20, 0x326d1: 0x6d493e20, 0x326d2: 0x6d494020, 0x326d3: 0x6d76fa20, + 0x326d4: 0x6de07220, 0x326d5: 0x6da08e20, 0x326d6: 0x6da09020, 0x326d7: 0x6da09220, + 0x326d8: 0x6de07420, 0x326d9: 0x6de07620, 0x326da: 0x6c03aa20, 0x326db: 0x6c03ac20, + 0x326dc: 0x6c03ae20, 0x326dd: 0x6c03b020, 0x326de: 0x6c03b220, 0x326df: 0x6c03b420, + 0x326e0: 0x6c03b620, 0x326e1: 0x6c072020, 0x326e2: 0x6c072220, 0x326e3: 0x6c072420, + 0x326e4: 0x6c072620, 0x326e5: 0x6c072820, 0x326e6: 0x6c072a20, 0x326e7: 0x6c072c20, + 0x326e8: 0x6c072e20, 0x326e9: 0x6c0e0a20, 0x326ea: 0x6c0e0c20, 0x326eb: 0x6c0e0e20, + 0x326ec: 0x6c0e1020, 0x326ed: 0x6c0e1220, 0x326ee: 0x6c0e1420, 0x326ef: 0x6c0e1620, + 0x326f0: 0x6c0e1820, 0x326f1: 0x6c191020, 0x326f2: 0x6c191220, 0x326f3: 0x6c191420, + 0x326f4: 0x6c191620, 0x326f5: 0x6c191820, 0x326f6: 0x6c191a20, 0x326f7: 0x6c191c20, + 0x326f8: 0x6c191e20, 0x326f9: 0x6c2c4620, 0x326fa: 0x6c2c4820, 0x326fb: 0x6c2c4a20, + 0x326fc: 0x6c2c4c20, 0x326fd: 0x6c2c4e20, 0x326fe: 0x6c2c5020, 0x326ff: 0x6c464c20, + // Block 0xc9c, offset 0x32700 + 0x32700: 0x6c464e20, 0x32701: 0x6c465020, 0x32702: 0x6c465220, 0x32703: 0x6c465420, + 0x32704: 0x6c465620, 0x32705: 0x6c465820, 0x32706: 0x6c465a20, 0x32707: 0x6c465c20, + 0x32708: 0x6c465e20, 0x32709: 0x6c45e220, 0x3270a: 0x6c678020, 0x3270b: 0x6c678220, + 0x3270c: 0x6c678420, 0x3270d: 0x6c678620, 0x3270e: 0x6c678820, 0x3270f: 0x6c678a20, + 0x32710: 0x6c678c20, 0x32711: 0x6c678e20, 0x32712: 0x6c679020, 0x32713: 0x6c679220, + 0x32714: 0x6c679420, 0x32715: 0x6c8df020, 0x32716: 0x6c8df220, 0x32717: 0x6c8df420, + 0x32718: 0x6c8df620, 0x32719: 0x6c8df820, 0x3271a: 0x6c8dfa20, 0x3271b: 0x6c8dfc20, + 0x3271c: 0x6c8dfe20, 0x3271d: 0x6c8e0020, 0x3271e: 0x6c8e0220, 0x3271f: 0x6c8e0420, + 0x32720: 0x6c8e0620, 0x32721: 0x6c8e0820, 0x32722: 0x6c8e0a20, 0x32723: 0x6c8e0c20, + 0x32724: 0x6c8e0e20, 0x32725: 0x6cba4420, 0x32726: 0x6cba4620, 0x32727: 0x6cba4820, + 0x32728: 0x6cba4a20, 0x32729: 0x6cba4c20, 0x3272a: 0x6cba4e20, 0x3272b: 0x6cba5020, + 0x3272c: 0x6cba5220, 0x3272d: 0x6cba5420, 0x3272e: 0x6cba5620, 0x3272f: 0x6ceb3620, + 0x32730: 0x6ceb3820, 0x32731: 0x6ceb3a20, 0x32732: 0x6ceb3c20, 0x32733: 0x6ceb3e20, + 0x32734: 0x6ceb4020, 0x32735: 0x6ceb4220, 0x32736: 0x6cee5e20, 0x32737: 0x6ceb4420, + 0x32738: 0x6ceb4620, 0x32739: 0x6ceb4820, 0x3273a: 0x6ceb4a20, 0x3273b: 0x6d19d820, + 0x3273c: 0x6d1b2220, 0x3273d: 0x6d1b2420, 0x3273e: 0x6d1b2620, 0x3273f: 0x6d1b2820, + // Block 0xc9d, offset 0x32740 + 0x32740: 0x6d1b2a20, 0x32741: 0x6d1b2c20, 0x32742: 0x6d1b2e20, 0x32743: 0x6d494420, + 0x32744: 0x6d494620, 0x32745: 0x6d494820, 0x32746: 0x6d494a20, 0x32747: 0x6d76fe20, + 0x32748: 0x6d770020, 0x32749: 0x6d770220, 0x3274a: 0x6d770420, 0x3274b: 0x6d770620, + 0x3274c: 0x6d770820, 0x3274d: 0x6da09420, 0x3274e: 0x6da09620, 0x3274f: 0x6da09820, + 0x32750: 0x6dc2f820, 0x32751: 0x6de07a20, 0x32752: 0x6de07c20, 0x32753: 0x6e0c8c20, + 0x32754: 0x6e0c8e20, 0x32755: 0x6e1c2c20, 0x32756: 0x6e287020, 0x32757: 0x6e319a20, + 0x32758: 0x6e319c20, 0x32759: 0x6c03bc20, 0x3275a: 0x6c03be20, 0x3275b: 0x6c03c020, + 0x3275c: 0x6c03c220, 0x3275d: 0x6c03c420, 0x3275e: 0x6c03c620, 0x3275f: 0x6c076e20, + 0x32760: 0x6c077020, 0x32761: 0x6c077220, 0x32762: 0x6c077420, 0x32763: 0x6c077620, + 0x32764: 0x6c077820, 0x32765: 0x6c077a20, 0x32766: 0x6c077c20, 0x32767: 0x6c077e20, + 0x32768: 0x6c078020, 0x32769: 0x6c078220, 0x3276a: 0x6c078420, 0x3276b: 0x6c0e5420, + 0x3276c: 0x6c0e5620, 0x3276d: 0x6c0e5820, 0x3276e: 0x6c0e5a20, 0x3276f: 0x6c0e5c20, + 0x32770: 0x6c0e5e20, 0x32771: 0x6c0e6020, 0x32772: 0x6c0e6220, 0x32773: 0x6c0e6420, + 0x32774: 0x6c0e6620, 0x32775: 0x6c0e6820, 0x32776: 0x6c0e6a20, 0x32777: 0x6c0e6c20, + 0x32778: 0x6c0e6e20, 0x32779: 0x6c0e7020, 0x3277a: 0x6c0e7220, 0x3277b: 0x6c0e7420, + 0x3277c: 0x6c0e7620, 0x3277d: 0x6c0e7820, 0x3277e: 0x6c0e7a20, 0x3277f: 0x6c0e7c20, + // Block 0xc9e, offset 0x32780 + 0x32780: 0x6c0e7e20, 0x32781: 0x6c0e8020, 0x32782: 0x6c0e8220, 0x32783: 0x6c0e8420, + 0x32784: 0x6c0e8620, 0x32785: 0x6c0e8820, 0x32786: 0x6c0e8a20, 0x32787: 0x6c0e8c20, + 0x32788: 0x6c0e8e20, 0x32789: 0x6c0e9020, 0x3278a: 0x6c0e9220, 0x3278b: 0x6c19ca20, + 0x3278c: 0x6c19cc20, 0x3278d: 0x6c19ce20, 0x3278e: 0x6c19d020, 0x3278f: 0x6c19d220, + 0x32790: 0x6c19d420, 0x32791: 0x6c19d620, 0x32792: 0x6c19d820, 0x32793: 0x6c19da20, + 0x32794: 0x6c19dc20, 0x32795: 0x6c19de20, 0x32796: 0x6c19e020, 0x32797: 0x6c19e220, + 0x32798: 0x6c19e420, 0x32799: 0x6c19e620, 0x3279a: 0x6c19e820, 0x3279b: 0x6c19ea20, + 0x3279c: 0x6c19ec20, 0x3279d: 0x6c19ee20, 0x3279e: 0x6c19f020, 0x3279f: 0x6c19f220, + 0x327a0: 0x6c19f420, 0x327a1: 0x6c19f620, 0x327a2: 0x6c19f820, 0x327a3: 0x6c19fa20, + 0x327a4: 0x6c19fc20, 0x327a5: 0x6c19fe20, 0x327a6: 0x6c1a0020, 0x327a7: 0x6c1a0220, + 0x327a8: 0x6c1a0420, 0x327a9: 0x6c1a0620, 0x327aa: 0x6c1a0820, 0x327ab: 0x6c1a0a20, + 0x327ac: 0x6c1a0c20, 0x327ad: 0x6c1a0e20, 0x327ae: 0x6c1a1020, 0x327af: 0x6c1a1220, + 0x327b0: 0x6c1a1420, 0x327b1: 0x6c1a1620, 0x327b2: 0x6c1a1820, 0x327b3: 0x6c1a1a20, + 0x327b4: 0x6c1a1c20, 0x327b5: 0x6c1a1e20, 0x327b6: 0x6c1a2020, 0x327b7: 0x6c1a2220, + 0x327b8: 0x6c1a2420, 0x327b9: 0x6c1a2620, 0x327ba: 0x6c1a2820, 0x327bb: 0x6c1a2a20, + 0x327bc: 0x6c1a2c20, 0x327bd: 0x6c1a2e20, 0x327be: 0x6c1a3020, 0x327bf: 0x6c1a3220, + // Block 0xc9f, offset 0x327c0 + 0x327c0: 0x6c1a3420, 0x327c1: 0x6c1a3620, 0x327c2: 0x6c1a3820, 0x327c3: 0x6c1a3a20, + 0x327c4: 0x6c1a3c20, 0x327c5: 0x6c1a3e20, 0x327c6: 0x6c1a4020, 0x327c7: 0x6c1a4220, + 0x327c8: 0x6c2ce620, 0x327c9: 0x6c2ce820, 0x327ca: 0x6c2cea20, 0x327cb: 0x6c2cec20, + 0x327cc: 0x6c2cee20, 0x327cd: 0x6c2cf020, 0x327ce: 0x6c2cf220, 0x327cf: 0x6c2cf420, + 0x327d0: 0x6c2cf620, 0x327d1: 0x6c2cf820, 0x327d2: 0x6c2cfa20, 0x327d3: 0x6c2cfc20, + 0x327d4: 0x6c2cfe20, 0x327d5: 0x6c2d0020, 0x327d6: 0x6c2d0220, 0x327d7: 0x6c2d0420, + 0x327d8: 0x6c2d0620, 0x327d9: 0x6c2d0820, 0x327da: 0x6c2d0a20, 0x327db: 0x6c2d0c20, + 0x327dc: 0x6c2d0e20, 0x327dd: 0x6c2d1020, 0x327de: 0x6c2d1220, 0x327df: 0x6c2d1420, + 0x327e0: 0x6c2d1620, 0x327e1: 0x6c2d1820, 0x327e2: 0x6c2d1a20, 0x327e3: 0x6c2d1c20, + 0x327e4: 0x6c2d1e20, 0x327e5: 0x6c2d2020, 0x327e6: 0x6c2d2220, 0x327e7: 0x6c2d2420, + 0x327e8: 0x6c2d2620, 0x327e9: 0x6c2d2820, 0x327ea: 0x6c2d2a20, 0x327eb: 0x6c2d2c20, + 0x327ec: 0x6c2d2e20, 0x327ed: 0x6c2d3020, 0x327ee: 0x6c2d3220, 0x327ef: 0x6c2d3420, + 0x327f0: 0x6c2d3620, 0x327f1: 0x6c2d3820, 0x327f2: 0x6c2d3a20, 0x327f3: 0x6c2d3c20, + 0x327f4: 0x6c2d3e20, 0x327f5: 0x6c2d4020, 0x327f6: 0x6c2d4220, 0x327f7: 0x6c2d4420, + 0x327f8: 0x6c2d4620, 0x327f9: 0x6c2d4820, 0x327fa: 0x6c2d4a20, 0x327fb: 0x6c2d4c20, + 0x327fc: 0x6c2d4e20, 0x327fd: 0x6c2d5020, 0x327fe: 0x6c2d5220, 0x327ff: 0x6c2d5420, + // Block 0xca0, offset 0x32800 + 0x32800: 0x6c2d5620, 0x32801: 0x6c2d5820, 0x32802: 0x6c2d5a20, 0x32803: 0x6c2d5c20, + 0x32804: 0x6c2d5e20, 0x32805: 0x6c2d6020, 0x32806: 0x6c2d6220, 0x32807: 0x6c2d6420, + 0x32808: 0x6c2d6620, 0x32809: 0x6c2d6820, 0x3280a: 0x6c2d6a20, 0x3280b: 0x6c2d6c20, + 0x3280c: 0x6c2d6e20, 0x3280d: 0x6c2d7020, 0x3280e: 0x6c2d7220, 0x3280f: 0x6c2d7420, + 0x32810: 0x6c470e20, 0x32811: 0x6c471020, 0x32812: 0x6c471220, 0x32813: 0x6c471420, + 0x32814: 0x6c471620, 0x32815: 0x6c471820, 0x32816: 0x6c471a20, 0x32817: 0x6c471c20, + 0x32818: 0x6c471e20, 0x32819: 0x6c472020, 0x3281a: 0x6c472220, 0x3281b: 0x6c472420, + 0x3281c: 0x6c472620, 0x3281d: 0x6c472820, 0x3281e: 0x6c472a20, 0x3281f: 0x6c472c20, + 0x32820: 0x6c472e20, 0x32821: 0x6c473020, 0x32822: 0x6c473220, 0x32823: 0x6c473420, + 0x32824: 0x6c473620, 0x32825: 0x6c473820, 0x32826: 0x6c473a20, 0x32827: 0x6c473c20, + 0x32828: 0x6c473e20, 0x32829: 0x6c474020, 0x3282a: 0x6c474220, 0x3282b: 0x6c474420, + 0x3282c: 0x6c474620, 0x3282d: 0x6c474820, 0x3282e: 0x6c474a20, 0x3282f: 0x6c474c20, + 0x32830: 0x6c474e20, 0x32831: 0x6c475020, 0x32832: 0x6c475220, 0x32833: 0x6c475420, + 0x32834: 0x6c475620, 0x32835: 0x6c475820, 0x32836: 0x6c475a20, 0x32837: 0x6c475c20, + 0x32838: 0x6c475e20, 0x32839: 0x6c476020, 0x3283a: 0x6c476220, 0x3283b: 0x6c476420, + 0x3283c: 0x6c476620, 0x3283d: 0x6c476820, 0x3283e: 0x6c476a20, 0x3283f: 0x6c476c20, + // Block 0xca1, offset 0x32840 + 0x32840: 0x6c476e20, 0x32841: 0x6c477020, 0x32842: 0x6c477220, 0x32843: 0x6c477420, + 0x32844: 0x6c477620, 0x32845: 0x6c477820, 0x32846: 0x6c477a20, 0x32847: 0x6c477c20, + 0x32848: 0x6c477e20, 0x32849: 0x6c478020, 0x3284a: 0x6c478220, 0x3284b: 0x6c478420, + 0x3284c: 0x6c478620, 0x3284d: 0x6c478820, 0x3284e: 0x6c478a20, 0x3284f: 0x6c478c20, + 0x32850: 0x6c478e20, 0x32851: 0x6c479020, 0x32852: 0x6c479220, 0x32853: 0x6c479420, + 0x32854: 0x6c479620, 0x32855: 0x6c479820, 0x32856: 0x6c479a20, 0x32857: 0x6c479c20, + 0x32858: 0x6c479e20, 0x32859: 0x6c47a020, 0x3285a: 0x6c47a220, 0x3285b: 0x6c47a420, + 0x3285c: 0x6c47a620, 0x3285d: 0x6c47a820, 0x3285e: 0x6c47aa20, 0x3285f: 0x6c47ac20, + 0x32860: 0x6c47ae20, 0x32861: 0x6c47b020, 0x32862: 0x6c47b220, 0x32863: 0x6c47b420, + 0x32864: 0x6c47b620, 0x32865: 0x6c47b820, 0x32866: 0x6c47ba20, 0x32867: 0x6c47bc20, + 0x32868: 0x6c47be20, 0x32869: 0x6c47c020, 0x3286a: 0x6c47c220, 0x3286b: 0x6c47c420, + 0x3286c: 0x6c684820, 0x3286d: 0x6c684a20, 0x3286e: 0x6c684c20, 0x3286f: 0x6c684e20, + 0x32870: 0x6c685020, 0x32871: 0x6c685220, 0x32872: 0x6c685420, 0x32873: 0x6c685620, + 0x32874: 0x6c685820, 0x32875: 0x6c685a20, 0x32876: 0x6c685c20, 0x32877: 0x6c685e20, + 0x32878: 0x6c686020, 0x32879: 0x6c686220, 0x3287a: 0x6c686420, 0x3287b: 0x6c686620, + 0x3287c: 0x6c686820, 0x3287d: 0x6c686a20, 0x3287e: 0x6c686c20, 0x3287f: 0x6c686e20, + // Block 0xca2, offset 0x32880 + 0x32880: 0x6c687020, 0x32881: 0x6c687220, 0x32882: 0x6c687420, 0x32883: 0x6c687620, + 0x32884: 0x6c687820, 0x32885: 0x6c687a20, 0x32886: 0x6c687c20, 0x32887: 0x6c687e20, + 0x32888: 0x6c688020, 0x32889: 0x6c688220, 0x3288a: 0x6c688420, 0x3288b: 0x6c688620, + 0x3288c: 0x6c688820, 0x3288d: 0x6c688a20, 0x3288e: 0x6c688c20, 0x3288f: 0x6c688e20, + 0x32890: 0x6c689020, 0x32891: 0x6c689220, 0x32892: 0x6c689420, 0x32893: 0x6c689620, + 0x32894: 0x6c689820, 0x32895: 0x6c689a20, 0x32896: 0x6c689c20, 0x32897: 0x6c689e20, + 0x32898: 0x6c68a020, 0x32899: 0x6c68a220, 0x3289a: 0x6c68a420, 0x3289b: 0x6c68a620, + 0x3289c: 0x6c68a820, 0x3289d: 0x6c68aa20, 0x3289e: 0x6c68ac20, 0x3289f: 0x6c68ae20, + 0x328a0: 0x6c68b020, 0x328a1: 0x6c68b220, 0x328a2: 0x6c68b420, 0x328a3: 0x6c68b620, + 0x328a4: 0x6c68b820, 0x328a5: 0x6c8ede20, 0x328a6: 0x6c68ba20, 0x328a7: 0x6c68bc20, + 0x328a8: 0x6c68be20, 0x328a9: 0x6c68c020, 0x328aa: 0x6c68c220, 0x328ab: 0x6c7ab620, + 0x328ac: 0x6c68c420, 0x328ad: 0x6c68c620, 0x328ae: 0x6c68c820, 0x328af: 0x6c68ca20, + 0x328b0: 0x6c68cc20, 0x328b1: 0x6c68ce20, 0x328b2: 0x6c68d020, 0x328b3: 0x6c68d220, + 0x328b4: 0x6c68d420, 0x328b5: 0x6c68d620, 0x328b6: 0x6c68d820, 0x328b7: 0x6c68da20, + 0x328b8: 0x6c68dc20, 0x328b9: 0x6c68de20, 0x328ba: 0x6c68e020, 0x328bb: 0x6c68e220, + 0x328bc: 0x6c68e420, 0x328bd: 0x6c68e620, 0x328be: 0x6c68e820, 0x328bf: 0x6c68ea20, + // Block 0xca3, offset 0x328c0 + 0x328c0: 0x6c68ec20, 0x328c1: 0x6c68ee20, 0x328c2: 0x6c68f020, 0x328c3: 0x6c68f220, + 0x328c4: 0x6c68f420, 0x328c5: 0x6c68f620, 0x328c6: 0x6c68f820, 0x328c7: 0x6c68fa20, + 0x328c8: 0x6c68fc20, 0x328c9: 0x6c68fe20, 0x328ca: 0x6c690020, 0x328cb: 0x6c690220, + 0x328cc: 0x6c690420, 0x328cd: 0x6c690620, 0x328ce: 0x6c690820, 0x328cf: 0x6c690a20, + 0x328d0: 0x6c690c20, 0x328d1: 0x6c690e20, 0x328d2: 0x6c691020, 0x328d3: 0x6c691220, + 0x328d4: 0x6c691420, 0x328d5: 0x6c691620, 0x328d6: 0x6c691820, 0x328d7: 0x6c691a20, + 0x328d8: 0x6c691c20, 0x328d9: 0x6c691e20, 0x328da: 0x6c692020, 0x328db: 0x6c692220, + 0x328dc: 0x6c692420, 0x328dd: 0x6c692620, 0x328de: 0x6c692820, 0x328df: 0x6c692a20, + 0x328e0: 0x6c692c20, 0x328e1: 0x6c692e20, 0x328e2: 0x6c693020, 0x328e3: 0x6c693220, + 0x328e4: 0x6c693420, 0x328e5: 0x6c693620, 0x328e6: 0x6c7a1a20, 0x328e7: 0x6c8ee020, + 0x328e8: 0x6c8ee220, 0x328e9: 0x6c8ee420, 0x328ea: 0x6c8ee620, 0x328eb: 0x6c8ee820, + 0x328ec: 0x6c8eea20, 0x328ed: 0x6c8eec20, 0x328ee: 0x6c8eee20, 0x328ef: 0x6c8ef020, + 0x328f0: 0x6c8ef220, 0x328f1: 0x6c8ef420, 0x328f2: 0x6c8ef620, 0x328f3: 0x6c8ef820, + 0x328f4: 0x6c8efa20, 0x328f5: 0x6c8efc20, 0x328f6: 0x6c8efe20, 0x328f7: 0x6c8f0020, + 0x328f8: 0x6c8f0220, 0x328f9: 0x6c8f0420, 0x328fa: 0x6c8f0620, 0x328fb: 0x6c8f0820, + 0x328fc: 0x6c8f0a20, 0x328fd: 0x6c8f0c20, 0x328fe: 0x6c8f0e20, 0x328ff: 0x6c8f1020, + // Block 0xca4, offset 0x32900 + 0x32900: 0x6c8f1220, 0x32901: 0x6c8f1420, 0x32902: 0x6c8f1620, 0x32903: 0x6c8f1820, + 0x32904: 0x6c8f1a20, 0x32905: 0x6c8f1c20, 0x32906: 0x6c8f1e20, 0x32907: 0x6c8f2020, + 0x32908: 0x6c8f2220, 0x32909: 0x6c8f2420, 0x3290a: 0x6c8f2620, 0x3290b: 0x6c8f2820, + 0x3290c: 0x6c8f2a20, 0x3290d: 0x6c8f2c20, 0x3290e: 0x6c8f2e20, 0x3290f: 0x6c8f3020, + 0x32910: 0x6c8f3220, 0x32911: 0x6c8f3420, 0x32912: 0x6c8f3620, 0x32913: 0x6c8f3820, + 0x32914: 0x6c8f3a20, 0x32915: 0x6c8f3c20, 0x32916: 0x6c8f3e20, 0x32917: 0x6c8f4020, + 0x32918: 0x6c8f4220, 0x32919: 0x6c8f4420, 0x3291a: 0x6c8f4620, 0x3291b: 0x6c8f4820, + 0x3291c: 0x6c8f4a20, 0x3291d: 0x6c8f4c20, 0x3291e: 0x6c8f4e20, 0x3291f: 0x6c8f5020, + 0x32920: 0x6c8f5220, 0x32921: 0x6c8f5420, 0x32922: 0x6c8f5620, 0x32923: 0x6c8f5820, + 0x32924: 0x6c8f5a20, 0x32925: 0x6c8f5c20, 0x32926: 0x6c8f5e20, 0x32927: 0x6c8f6020, + 0x32928: 0x6c8f6220, 0x32929: 0x6c8f6420, 0x3292a: 0x6c8f6620, 0x3292b: 0x6c8f6820, + 0x3292c: 0x6c8f6a20, 0x3292d: 0x6c8f6c20, 0x3292e: 0x6c8f6e20, 0x3292f: 0x6c8f7020, + 0x32930: 0x6c8f7220, 0x32931: 0x6c8f7420, 0x32932: 0x6c8f7620, 0x32933: 0x6c8f7820, + 0x32934: 0x6c8f7a20, 0x32935: 0x6c8f7c20, 0x32936: 0x6c8f7e20, 0x32937: 0x6c8f8020, + 0x32938: 0x6c8f8220, 0x32939: 0x6c8f8420, 0x3293a: 0x6c8f8620, 0x3293b: 0x6c8f8820, + 0x3293c: 0x6c8f8a20, 0x3293d: 0x6c8f8c20, 0x3293e: 0x6c8f8e20, 0x3293f: 0x6c8f9020, + // Block 0xca5, offset 0x32940 + 0x32940: 0x6c8f9220, 0x32941: 0x6c8f9420, 0x32942: 0x6c8f9620, 0x32943: 0x6c8f9820, + 0x32944: 0x6c8f9a20, 0x32945: 0x6c8f9c20, 0x32946: 0x6c8f9e20, 0x32947: 0x6c8fa020, + 0x32948: 0x6c8fa220, 0x32949: 0x6c8fa420, 0x3294a: 0x6c8fa620, 0x3294b: 0x6c8fa820, + 0x3294c: 0x6c8faa20, 0x3294d: 0x6c8fac20, 0x3294e: 0x6c8fae20, 0x3294f: 0x6c8fb020, + 0x32950: 0x6c8fb220, 0x32951: 0x6c8fb420, 0x32952: 0x6c8fb620, 0x32953: 0x6c8fb820, + 0x32954: 0x6c8fba20, 0x32955: 0x6c8fbc20, 0x32956: 0x6c8fbe20, 0x32957: 0x6c8fc020, + 0x32958: 0x6c8fc220, 0x32959: 0x6c8fc420, 0x3295a: 0x6c8fc620, 0x3295b: 0x6c8fc820, + 0x3295c: 0x6c8fca20, 0x3295d: 0x6c8fcc20, 0x3295e: 0x6c8fce20, 0x3295f: 0x6c8fd020, + 0x32960: 0x6c8fd220, 0x32961: 0x6c8fd420, 0x32962: 0x6c8fd620, 0x32963: 0x6c8fd820, + 0x32964: 0x6c8fda20, 0x32965: 0x6c8fdc20, 0x32966: 0x6c8fde20, 0x32967: 0x6c8fe020, + 0x32968: 0x6c8fe220, 0x32969: 0x6c8fe420, 0x3296a: 0x6c8fe620, 0x3296b: 0x6c8fe820, + 0x3296c: 0x6c8fea20, 0x3296d: 0x6c8fec20, 0x3296e: 0x6c8fee20, 0x3296f: 0x6c8ff020, + 0x32970: 0x6c8ff220, 0x32971: 0x6c8ff420, 0x32972: 0x6c8ff620, 0x32973: 0x6c8ff820, + 0x32974: 0x6c8ffa20, 0x32975: 0x6c8ffc20, 0x32976: 0x6c8ffe20, 0x32977: 0x6cbb1e20, + 0x32978: 0x6cbb2020, 0x32979: 0x6cbb2220, 0x3297a: 0x6cbb2420, 0x3297b: 0x6cbb2620, + 0x3297c: 0x6cbb2820, 0x3297d: 0x6cbb2a20, 0x3297e: 0x6cbb2c20, 0x3297f: 0x6cbb2e20, + // Block 0xca6, offset 0x32980 + 0x32980: 0x6cbb3020, 0x32981: 0x6cbb3220, 0x32982: 0x6cbb3420, 0x32983: 0x6cbb3620, + 0x32984: 0x6cbb3820, 0x32985: 0x6cbb3a20, 0x32986: 0x6cbb3c20, 0x32987: 0x6cbb3e20, + 0x32988: 0x6cbb4020, 0x32989: 0x6cbb4220, 0x3298a: 0x6cbb4420, 0x3298b: 0x6cbb4620, + 0x3298c: 0x6cbb4820, 0x3298d: 0x6cbb4a20, 0x3298e: 0x6cbb4c20, 0x3298f: 0x6cbb4e20, + 0x32990: 0x6cbb5020, 0x32991: 0x6cbb5220, 0x32992: 0x6cbb5420, 0x32993: 0x6cbb5620, + 0x32994: 0x6cbb5820, 0x32995: 0x6cbb5a20, 0x32996: 0x6cbb5c20, 0x32997: 0x6cbb5e20, + 0x32998: 0x6cbb6020, 0x32999: 0x6cbb6220, 0x3299a: 0x6cbb6420, 0x3299b: 0x6cbb6620, + 0x3299c: 0x6cbb6820, 0x3299d: 0x6cbb6a20, 0x3299e: 0x6cbb6c20, 0x3299f: 0x6cbb6e20, + 0x329a0: 0x6cbb7020, 0x329a1: 0x6cbb7220, 0x329a2: 0x6cebdc20, 0x329a3: 0x6cbb7420, + 0x329a4: 0x6cbb7620, 0x329a5: 0x6cbb7820, 0x329a6: 0x6cbb7a20, 0x329a7: 0x6cbb7c20, + 0x329a8: 0x6cbb7e20, 0x329a9: 0x6cbb8020, 0x329aa: 0x6cbb8220, 0x329ab: 0x6cbb8420, + 0x329ac: 0x6cbb8620, 0x329ad: 0x6cbb8820, 0x329ae: 0x6cbb8a20, 0x329af: 0x6cbb8c20, + 0x329b0: 0x6cbb8e20, 0x329b1: 0x6cbb9020, 0x329b2: 0x6cbb9220, 0x329b3: 0x6cbb9420, + 0x329b4: 0x6cbb9620, 0x329b5: 0x6cbb9820, 0x329b6: 0x6cbb9a20, 0x329b7: 0x6cbb9c20, + 0x329b8: 0x6cbb9e20, 0x329b9: 0x6cbba020, 0x329ba: 0x6cbba220, 0x329bb: 0x6cbba420, + 0x329bc: 0x6cbba620, 0x329bd: 0x6cbba820, 0x329be: 0x6cbbaa20, 0x329bf: 0x6cbbac20, + // Block 0xca7, offset 0x329c0 + 0x329c0: 0x6cbbae20, 0x329c1: 0x6cbbb020, 0x329c2: 0x6cbbb220, 0x329c3: 0x6cbbb420, + 0x329c4: 0x6cbbb620, 0x329c5: 0x6cbbb820, 0x329c6: 0x6cbbba20, 0x329c7: 0x6cbbbc20, + 0x329c8: 0x6cbbbe20, 0x329c9: 0x6cbbc020, 0x329ca: 0x6cbbc220, 0x329cb: 0x6cbbc420, + 0x329cc: 0x6cbbc620, 0x329cd: 0x6cbbc820, 0x329ce: 0x6cbbca20, 0x329cf: 0x6cbbcc20, + 0x329d0: 0x6cbbce20, 0x329d1: 0x6cbbd020, 0x329d2: 0x6cbbd220, 0x329d3: 0x6cbbd420, + 0x329d4: 0x6cbbd620, 0x329d5: 0x6cbbd820, 0x329d6: 0x6cbbda20, 0x329d7: 0x6cbbdc20, + 0x329d8: 0x6cbbde20, 0x329d9: 0x6cbbe020, 0x329da: 0x6cbbe220, 0x329db: 0x6cbbe420, + 0x329dc: 0x6cbbe620, 0x329dd: 0x6cbbe820, 0x329de: 0x6cbbea20, 0x329df: 0x6cbbec20, + 0x329e0: 0x6cbbee20, 0x329e1: 0x6cbbf020, 0x329e2: 0x6cbbf220, 0x329e3: 0x6cbbf420, + 0x329e4: 0x6cbbf620, 0x329e5: 0x6cbbf820, 0x329e6: 0x6cbbfa20, 0x329e7: 0x6cbbfc20, + 0x329e8: 0x6cbbfe20, 0x329e9: 0x6cbc0020, 0x329ea: 0x6cbc0220, 0x329eb: 0x6cbc0420, + 0x329ec: 0x6cbc0620, 0x329ed: 0x6cbc0820, 0x329ee: 0x6cbc0a20, 0x329ef: 0x6cbc0c20, + 0x329f0: 0x6cbc0e20, 0x329f1: 0x6cbc1020, 0x329f2: 0x6cbc1220, 0x329f3: 0x6cbc1420, + 0x329f4: 0x6cbc1620, 0x329f5: 0x6cbc1820, 0x329f6: 0x6cebde20, 0x329f7: 0x6cebe020, + 0x329f8: 0x6cebe220, 0x329f9: 0x6cebe420, 0x329fa: 0x6cebe620, 0x329fb: 0x6cbc1a20, + 0x329fc: 0x6cbc1c20, 0x329fd: 0x6cbc1e20, 0x329fe: 0x6cbc2020, 0x329ff: 0x6cebe820, + // Block 0xca8, offset 0x32a00 + 0x32a00: 0x6cebea20, 0x32a01: 0x6cebec20, 0x32a02: 0x6cebee20, 0x32a03: 0x6cebf020, + 0x32a04: 0x6cebf220, 0x32a05: 0x6cebf420, 0x32a06: 0x6cebf620, 0x32a07: 0x6cebf820, + 0x32a08: 0x6cebfa20, 0x32a09: 0x6cebfc20, 0x32a0a: 0x6cebfe20, 0x32a0b: 0x6cec0020, + 0x32a0c: 0x6cec0220, 0x32a0d: 0x6cec0420, 0x32a0e: 0x6cec0620, 0x32a0f: 0x6cec0820, + 0x32a10: 0x6cec0a20, 0x32a11: 0x6cec0c20, 0x32a12: 0x6cec0e20, 0x32a13: 0x6cec1020, + 0x32a14: 0x6cec1220, 0x32a15: 0x6cec1420, 0x32a16: 0x6cec1620, 0x32a17: 0x6cec1820, + 0x32a18: 0x6cec1a20, 0x32a19: 0x6cec1c20, 0x32a1a: 0x6cec1e20, 0x32a1b: 0x6cec2020, + 0x32a1c: 0x6cec2220, 0x32a1d: 0x6cec2420, 0x32a1e: 0x6cec2620, 0x32a1f: 0x6cec2820, + 0x32a20: 0x6cec2a20, 0x32a21: 0x6cec2c20, 0x32a22: 0x6cec2e20, 0x32a23: 0x6cec3020, + 0x32a24: 0x6cec3220, 0x32a25: 0x6cec3420, 0x32a26: 0x6cec3620, 0x32a27: 0x6cec3820, + 0x32a28: 0x6cec3a20, 0x32a29: 0x6cec3c20, 0x32a2a: 0x6cec3e20, 0x32a2b: 0x6cec4020, + 0x32a2c: 0x6cec4220, 0x32a2d: 0x6cec4420, 0x32a2e: 0x6cec4620, 0x32a2f: 0x6cec4820, + 0x32a30: 0x6d49ce20, 0x32a31: 0x6d49d020, 0x32a32: 0x6d49d220, 0x32a33: 0x6cec4a20, + 0x32a34: 0x6cec4c20, 0x32a35: 0x6cec4e20, 0x32a36: 0x6cec5020, 0x32a37: 0x6cec5220, + 0x32a38: 0x6cec5420, 0x32a39: 0x6cec5620, 0x32a3a: 0x6cec5820, 0x32a3b: 0x6cec5a20, + 0x32a3c: 0x6cec5c20, 0x32a3d: 0x6cec5e20, 0x32a3e: 0x6cec6020, 0x32a3f: 0x6cec6220, + // Block 0xca9, offset 0x32a40 + 0x32a40: 0x6cec6420, 0x32a41: 0x6cec6620, 0x32a42: 0x6cec6820, 0x32a43: 0x6cec6a20, + 0x32a44: 0x6cec6c20, 0x32a45: 0x6cec6e20, 0x32a46: 0x6cec7020, 0x32a47: 0x6cec7220, + 0x32a48: 0x6cec7420, 0x32a49: 0x6cec7620, 0x32a4a: 0x6cec7820, 0x32a4b: 0x6cec7a20, + 0x32a4c: 0x6cec7c20, 0x32a4d: 0x6cec7e20, 0x32a4e: 0x6cec8020, 0x32a4f: 0x6cec8220, + 0x32a50: 0x6cec8420, 0x32a51: 0x6cec8620, 0x32a52: 0x6cec8820, 0x32a53: 0x6cec8a20, + 0x32a54: 0x6cec8c20, 0x32a55: 0x6cec8e20, 0x32a56: 0x6cec9020, 0x32a57: 0x6cec9220, + 0x32a58: 0x6cec9420, 0x32a59: 0x6cec9620, 0x32a5a: 0x6cec9820, 0x32a5b: 0x6cec9a20, + 0x32a5c: 0x6cec9c20, 0x32a5d: 0x6cec9e20, 0x32a5e: 0x6ceca020, 0x32a5f: 0x6ceca220, + 0x32a60: 0x6ceca420, 0x32a61: 0x6ceca620, 0x32a62: 0x6ceca820, 0x32a63: 0x6cecaa20, + 0x32a64: 0x6cecac20, 0x32a65: 0x6cecae20, 0x32a66: 0x6cecb020, 0x32a67: 0x6cecb220, + 0x32a68: 0x6cecb420, 0x32a69: 0x6cecb620, 0x32a6a: 0x6cecb820, 0x32a6b: 0x6cecba20, + 0x32a6c: 0x6cecbc20, 0x32a6d: 0x6cecbe20, 0x32a6e: 0x6cecc020, 0x32a6f: 0x6cecc220, + 0x32a70: 0x6cecc420, 0x32a71: 0x6cecc620, 0x32a72: 0x6cecc820, 0x32a73: 0x6cecca20, + 0x32a74: 0x6ceccc20, 0x32a75: 0x6cecce20, 0x32a76: 0x6cecd020, 0x32a77: 0x6cecd220, + 0x32a78: 0x6cecd420, 0x32a79: 0x6cecd620, 0x32a7a: 0x6cecd820, 0x32a7b: 0x6cecda20, + 0x32a7c: 0x6cecdc20, 0x32a7d: 0x6cecde20, 0x32a7e: 0x6cece020, 0x32a7f: 0x6cece220, + // Block 0xcaa, offset 0x32a80 + 0x32a80: 0x6cece420, 0x32a81: 0x6cece620, 0x32a82: 0x6cece820, 0x32a83: 0x6cecea20, + 0x32a84: 0x6cecec20, 0x32a85: 0x6cecee20, 0x32a86: 0x6cecf020, 0x32a87: 0x6cecf220, + 0x32a88: 0x6cecf420, 0x32a89: 0x6cecf620, 0x32a8a: 0x6cecf820, 0x32a8b: 0x6cecfa20, + 0x32a8c: 0x6cecfc20, 0x32a8d: 0x6cecfe20, 0x32a8e: 0x6ced0020, 0x32a8f: 0x6ced0220, + 0x32a90: 0x6ced0420, 0x32a91: 0x6ced0620, 0x32a92: 0x6ced0820, 0x32a93: 0x6ced0a20, + 0x32a94: 0x6d1bb620, 0x32a95: 0x6d1bb820, 0x32a96: 0x6d1bba20, 0x32a97: 0x6d1bbc20, + 0x32a98: 0x6d1bbe20, 0x32a99: 0x6d1bc020, 0x32a9a: 0x6d1bc220, 0x32a9b: 0x6d1bc420, + 0x32a9c: 0x6d1bc620, 0x32a9d: 0x6d1bc820, 0x32a9e: 0x6d1bca20, 0x32a9f: 0x6d1bcc20, + 0x32aa0: 0x6d1bce20, 0x32aa1: 0x6d1bd020, 0x32aa2: 0x6d1bd220, 0x32aa3: 0x6d1bd420, + 0x32aa4: 0x6d1bd620, 0x32aa5: 0x6d1bd820, 0x32aa6: 0x6d1bda20, 0x32aa7: 0x6d1bdc20, + 0x32aa8: 0x6d1bde20, 0x32aa9: 0x6d1be020, 0x32aaa: 0x6d1be220, 0x32aab: 0x6d1be420, + 0x32aac: 0x6d1be620, 0x32aad: 0x6d1be820, 0x32aae: 0x6d1bea20, 0x32aaf: 0x6d1bec20, + 0x32ab0: 0x6d1bee20, 0x32ab1: 0x6d1bf020, 0x32ab2: 0x6d1bf220, 0x32ab3: 0x6d1bf420, + 0x32ab4: 0x6d1bf620, 0x32ab5: 0x6d1bf820, 0x32ab6: 0x6d1bfa20, 0x32ab7: 0x6d1bfc20, + 0x32ab8: 0x6d1bfe20, 0x32ab9: 0x6d1c0020, 0x32aba: 0x6d1c0220, 0x32abb: 0x6d1c0420, + 0x32abc: 0x6d1c0620, 0x32abd: 0x6d1c0820, 0x32abe: 0x6d1c0a20, 0x32abf: 0x6d1c0c20, + // Block 0xcab, offset 0x32ac0 + 0x32ac0: 0x6d1c0e20, 0x32ac1: 0x6d1c1020, 0x32ac2: 0x6d1c1220, 0x32ac3: 0x6d1c1420, + 0x32ac4: 0x6d1c1620, 0x32ac5: 0x6d1c1820, 0x32ac6: 0x6d1c1a20, 0x32ac7: 0x6d1c1c20, + 0x32ac8: 0x6d1c1e20, 0x32ac9: 0x6d1c2020, 0x32aca: 0x6d1c2220, 0x32acb: 0x6d1c2420, + 0x32acc: 0x6d1c2620, 0x32acd: 0x6d1c2820, 0x32ace: 0x6d1c2a20, 0x32acf: 0x6d1c2c20, + 0x32ad0: 0x6d1c2e20, 0x32ad1: 0x6d1c3020, 0x32ad2: 0x6d1c3220, 0x32ad3: 0x6d1c3420, + 0x32ad4: 0x6d1c3620, 0x32ad5: 0x6d1c3820, 0x32ad6: 0x6d1c3a20, 0x32ad7: 0x6d1c3c20, + 0x32ad8: 0x6d1c3e20, 0x32ad9: 0x6d1c4020, 0x32ada: 0x6d1c4220, 0x32adb: 0x6d1c4420, + 0x32adc: 0x6d1c4620, 0x32add: 0x6d1c4820, 0x32ade: 0x6d1c4a20, 0x32adf: 0x6d1c4c20, + 0x32ae0: 0x6d1c4e20, 0x32ae1: 0x6d1c5020, 0x32ae2: 0x6d1c5220, 0x32ae3: 0x6d1c5420, + 0x32ae4: 0x6d1c5620, 0x32ae5: 0x6d1c5820, 0x32ae6: 0x6d1c5a20, 0x32ae7: 0x6d1c5c20, + 0x32ae8: 0x6d1c5e20, 0x32ae9: 0x6d1c6020, 0x32aea: 0x6d1c6220, 0x32aeb: 0x6d1c6420, + 0x32aec: 0x6d1c6620, 0x32aed: 0x6d1c6820, 0x32aee: 0x6d1c6a20, 0x32aef: 0x6d1c6c20, + 0x32af0: 0x6d1c6e20, 0x32af1: 0x6d1c7020, 0x32af2: 0x6d1c7220, 0x32af3: 0x6d1c7420, + 0x32af4: 0x6d1c7620, 0x32af5: 0x6d1c7820, 0x32af6: 0x6d1c7a20, 0x32af7: 0x6d1c7c20, + 0x32af8: 0x6d1c7e20, 0x32af9: 0x6d1c8020, 0x32afa: 0x6d1c8220, 0x32afb: 0x6d1c8420, + 0x32afc: 0x6d1c8620, 0x32afd: 0x6d1c8820, 0x32afe: 0x6d1c8a20, 0x32aff: 0x6d1c8c20, + // Block 0xcac, offset 0x32b00 + 0x32b00: 0x6d1c8e20, 0x32b01: 0x6d1c9020, 0x32b02: 0x6d1c9220, 0x32b03: 0x6d1c9420, + 0x32b04: 0x6d1c9620, 0x32b05: 0x6d1c9820, 0x32b06: 0x6d1c9a20, 0x32b07: 0x6d1c9c20, + 0x32b08: 0x6d1c9e20, 0x32b09: 0x6d1ca020, 0x32b0a: 0x6d1ca220, 0x32b0b: 0x6d1ca420, + 0x32b0c: 0x6d1ca620, 0x32b0d: 0x6d1ca820, 0x32b0e: 0x6d1caa20, 0x32b0f: 0x6d1cac20, + 0x32b10: 0x6d1cae20, 0x32b11: 0x6d1cb020, 0x32b12: 0x6d1cb220, 0x32b13: 0x6d1cb420, + 0x32b14: 0x6d1cb620, 0x32b15: 0x6d1cb820, 0x32b16: 0x6d1cba20, 0x32b17: 0x6d1cbc20, + 0x32b18: 0x6d1cbe20, 0x32b19: 0x6d1cc020, 0x32b1a: 0x6d1cc220, 0x32b1b: 0x6d1cc420, + 0x32b1c: 0x6d1cc620, 0x32b1d: 0x6d1cc820, 0x32b1e: 0x6d1cca20, 0x32b1f: 0x6d1ccc20, + 0x32b20: 0x6d1cce20, 0x32b21: 0x6d49d420, 0x32b22: 0x6d49d620, 0x32b23: 0x6d49d820, + 0x32b24: 0x6d49da20, 0x32b25: 0x6d49dc20, 0x32b26: 0x6d49de20, 0x32b27: 0x6d49e020, + 0x32b28: 0x6d49e220, 0x32b29: 0x6d49e420, 0x32b2a: 0x6d49e620, 0x32b2b: 0x6d49e820, + 0x32b2c: 0x6d49ea20, 0x32b2d: 0x6d49ec20, 0x32b2e: 0x6d49ee20, 0x32b2f: 0x6d49f020, + 0x32b30: 0x6d49f220, 0x32b31: 0x6d49f420, 0x32b32: 0x6d49f620, 0x32b33: 0x6d49f820, + 0x32b34: 0x6d49fa20, 0x32b35: 0x6d49fc20, 0x32b36: 0x6d49fe20, 0x32b37: 0x6d4a0020, + 0x32b38: 0x6d4a0220, 0x32b39: 0x6d4a0420, 0x32b3a: 0x6d4a0620, 0x32b3b: 0x6d4a0820, + 0x32b3c: 0x6d4a0a20, 0x32b3d: 0x6d4a0c20, 0x32b3e: 0x6d4a0e20, 0x32b3f: 0x6d4a1020, + // Block 0xcad, offset 0x32b40 + 0x32b40: 0x6d4a1220, 0x32b41: 0x6d4a1420, 0x32b42: 0x6d4a1620, 0x32b43: 0x6d4a1820, + 0x32b44: 0x6d4a1a20, 0x32b45: 0x6d4a1c20, 0x32b46: 0x6d4a1e20, 0x32b47: 0x6d4a2020, + 0x32b48: 0x6d4a2220, 0x32b49: 0x6d4a2420, 0x32b4a: 0x6d4a2620, 0x32b4b: 0x6d4a2820, + 0x32b4c: 0x6d4a2a20, 0x32b4d: 0x6d4a2c20, 0x32b4e: 0x6d4a2e20, 0x32b4f: 0x6d4a3020, + 0x32b50: 0x6d4a3220, 0x32b51: 0x6d4a3420, 0x32b52: 0x6d4a3620, 0x32b53: 0x6d4a3820, + 0x32b54: 0x6d4a3a20, 0x32b55: 0x6d4a3c20, 0x32b56: 0x6d4a3e20, 0x32b57: 0x6d4a4020, + 0x32b58: 0x6d4a4220, 0x32b59: 0x6d4a4420, 0x32b5a: 0x6d4a4620, 0x32b5b: 0x6d4a4820, + 0x32b5c: 0x6d4a4a20, 0x32b5d: 0x6d4a4c20, 0x32b5e: 0x6d4a4e20, 0x32b5f: 0x6d4a5020, + 0x32b60: 0x6d4a5220, 0x32b61: 0x6d4a5420, 0x32b62: 0x6d4a5620, 0x32b63: 0x6d4a5820, + 0x32b64: 0x6d4a5a20, 0x32b65: 0x6d4a5c20, 0x32b66: 0x6d4a5e20, 0x32b67: 0x6d311620, + 0x32b68: 0x6d4a6020, 0x32b69: 0x6d4a6220, 0x32b6a: 0x6d4a6420, 0x32b6b: 0x6d4a6620, + 0x32b6c: 0x6d4a6820, 0x32b6d: 0x6d4a6a20, 0x32b6e: 0x6d4a6c20, 0x32b6f: 0x6d4a6e20, + 0x32b70: 0x6d4a7020, 0x32b71: 0x6d4a7220, 0x32b72: 0x6d4a7420, 0x32b73: 0x6d4a7620, + 0x32b74: 0x6d4a7820, 0x32b75: 0x6d4a7a20, 0x32b76: 0x6d4a7c20, 0x32b77: 0x6d4a7e20, + 0x32b78: 0x6d4a8020, 0x32b79: 0x6d4a8220, 0x32b7a: 0x6d4a8420, 0x32b7b: 0x6d4a8620, + 0x32b7c: 0x6d4a8820, 0x32b7d: 0x6d4a8a20, 0x32b7e: 0x6d4a8c20, 0x32b7f: 0x6d4a8e20, + // Block 0xcae, offset 0x32b80 + 0x32b80: 0x6d4a9020, 0x32b81: 0x6d4a9220, 0x32b82: 0x6d4a9420, 0x32b83: 0x6d4a9620, + 0x32b84: 0x6d4a9820, 0x32b85: 0x6d4a9a20, 0x32b86: 0x6d4a9c20, 0x32b87: 0x6d775e20, + 0x32b88: 0x6d776020, 0x32b89: 0x6d776220, 0x32b8a: 0x6d776420, 0x32b8b: 0x6d776620, + 0x32b8c: 0x6d776820, 0x32b8d: 0x6d776a20, 0x32b8e: 0x6d776c20, 0x32b8f: 0x6d776e20, + 0x32b90: 0x6d777020, 0x32b91: 0x6d777220, 0x32b92: 0x6d777420, 0x32b93: 0x6d777620, + 0x32b94: 0x6d777820, 0x32b95: 0x6d777a20, 0x32b96: 0x6d777c20, 0x32b97: 0x6d777e20, + 0x32b98: 0x6d778020, 0x32b99: 0x6d778220, 0x32b9a: 0x6d778420, 0x32b9b: 0x6d778620, + 0x32b9c: 0x6d778820, 0x32b9d: 0x6d778a20, 0x32b9e: 0x6d778c20, 0x32b9f: 0x6d778e20, + 0x32ba0: 0x6d779020, 0x32ba1: 0x6d779220, 0x32ba2: 0x6d779420, 0x32ba3: 0x6d779620, + 0x32ba4: 0x6d779820, 0x32ba5: 0x6d779a20, 0x32ba6: 0x6d779c20, 0x32ba7: 0x6d779e20, + 0x32ba8: 0x6d77a020, 0x32ba9: 0x6d77a220, 0x32baa: 0x6d77a420, 0x32bab: 0x6d77a620, + 0x32bac: 0x6d77a820, 0x32bad: 0x6d77aa20, 0x32bae: 0x6d77ac20, 0x32baf: 0x6d77ae20, + 0x32bb0: 0x6d77b020, 0x32bb1: 0x6d77b220, 0x32bb2: 0x6d77b420, 0x32bb3: 0x6d77b620, + 0x32bb4: 0x6d77b820, 0x32bb5: 0x6d77ba20, 0x32bb6: 0x6d77bc20, 0x32bb7: 0x6d77be20, + 0x32bb8: 0x6d77c020, 0x32bb9: 0x6d77c220, 0x32bba: 0x6d77c420, 0x32bbb: 0x6d77c620, + 0x32bbc: 0x6d77c820, 0x32bbd: 0x6d77ca20, 0x32bbe: 0x6d77cc20, 0x32bbf: 0x6d77ce20, + // Block 0xcaf, offset 0x32bc0 + 0x32bc0: 0x6d77d020, 0x32bc1: 0x6d77d220, 0x32bc2: 0x6d77d420, 0x32bc3: 0x6d77d620, + 0x32bc4: 0x6d77d820, 0x32bc5: 0x6d77da20, 0x32bc6: 0x6d77dc20, 0x32bc7: 0x6d77de20, + 0x32bc8: 0x6d77e020, 0x32bc9: 0x6d77e220, 0x32bca: 0x6d77e420, 0x32bcb: 0x6d77e620, + 0x32bcc: 0x6d77e820, 0x32bcd: 0x6d77ea20, 0x32bce: 0x6d77ec20, 0x32bcf: 0x6d77ee20, + 0x32bd0: 0x6d77f020, 0x32bd1: 0x6d77f220, 0x32bd2: 0x6d77f420, 0x32bd3: 0x6d77f620, + 0x32bd4: 0x6d4a9e20, 0x32bd5: 0x6d77f820, 0x32bd6: 0x6d77fa20, 0x32bd7: 0x6d77fc20, + 0x32bd8: 0x6d77fe20, 0x32bd9: 0x6d780020, 0x32bda: 0x6d780220, 0x32bdb: 0x6d780420, + 0x32bdc: 0x6d780620, 0x32bdd: 0x6d780820, 0x32bde: 0x6d780a20, 0x32bdf: 0x6d780c20, + 0x32be0: 0x6d780e20, 0x32be1: 0x6d781020, 0x32be2: 0x6d781220, 0x32be3: 0x6d781420, + 0x32be4: 0x6d781620, 0x32be5: 0x6d781820, 0x32be6: 0x6d4aa020, 0x32be7: 0x6d781a20, + 0x32be8: 0x6d781c20, 0x32be9: 0x6d781e20, 0x32bea: 0x6d782020, 0x32beb: 0x6d782220, + 0x32bec: 0x6d782420, 0x32bed: 0x6d782620, 0x32bee: 0x6d782820, 0x32bef: 0x6d782a20, + 0x32bf0: 0x6d782c20, 0x32bf1: 0x6d782e20, 0x32bf2: 0x6d783020, 0x32bf3: 0x6d783220, + 0x32bf4: 0x6d783420, 0x32bf5: 0x6d783620, 0x32bf6: 0x6d783820, 0x32bf7: 0x6d783a20, + 0x32bf8: 0x6d783c20, 0x32bf9: 0x6d783e20, 0x32bfa: 0x6d784020, 0x32bfb: 0x6d784220, + 0x32bfc: 0x6d784420, 0x32bfd: 0x6da0d020, 0x32bfe: 0x6da0d220, 0x32bff: 0x6da0d420, + // Block 0xcb0, offset 0x32c00 + 0x32c00: 0x6da0d620, 0x32c01: 0x6da0d820, 0x32c02: 0x6da0da20, 0x32c03: 0x6da0dc20, + 0x32c04: 0x6da0de20, 0x32c05: 0x6da0e020, 0x32c06: 0x6da0e220, 0x32c07: 0x6da0e420, + 0x32c08: 0x6da0e620, 0x32c09: 0x6da0e820, 0x32c0a: 0x6da0ea20, 0x32c0b: 0x6da0ec20, + 0x32c0c: 0x6da0ee20, 0x32c0d: 0x6da0f020, 0x32c0e: 0x6da0f220, 0x32c0f: 0x6da0f420, + 0x32c10: 0x6da0f620, 0x32c11: 0x6da0f820, 0x32c12: 0x6da0fa20, 0x32c13: 0x6da0fc20, + 0x32c14: 0x6da0fe20, 0x32c15: 0x6da10020, 0x32c16: 0x6da10220, 0x32c17: 0x6da10420, + 0x32c18: 0x6da10620, 0x32c19: 0x6da10820, 0x32c1a: 0x6da10a20, 0x32c1b: 0x6da10c20, + 0x32c1c: 0x6da10e20, 0x32c1d: 0x6da11020, 0x32c1e: 0x6da11220, 0x32c1f: 0x6da11420, + 0x32c20: 0x6da11620, 0x32c21: 0x6da11820, 0x32c22: 0x6da11a20, 0x32c23: 0x6da11c20, + 0x32c24: 0x6da11e20, 0x32c25: 0x6da12020, 0x32c26: 0x6da12220, 0x32c27: 0x6da12420, + 0x32c28: 0x6da12620, 0x32c29: 0x6da12820, 0x32c2a: 0x6da12a20, 0x32c2b: 0x6da12c20, + 0x32c2c: 0x6da12e20, 0x32c2d: 0x6da13020, 0x32c2e: 0x6da13220, 0x32c2f: 0x6da13420, + 0x32c30: 0x6da13620, 0x32c31: 0x6da13820, 0x32c32: 0x6da13a20, 0x32c33: 0x6da13c20, + 0x32c34: 0x6da13e20, 0x32c35: 0x6da14020, 0x32c36: 0x6da14220, 0x32c37: 0x6da14420, + 0x32c38: 0x6da14620, 0x32c39: 0x6da14820, 0x32c3a: 0x6da14a20, 0x32c3b: 0x6da14c20, + 0x32c3c: 0x6da14e20, 0x32c3d: 0x6da15020, 0x32c3e: 0x6da15220, 0x32c3f: 0x6da15420, + // Block 0xcb1, offset 0x32c40 + 0x32c40: 0x6da15620, 0x32c41: 0x6da15820, 0x32c42: 0x6da15a20, 0x32c43: 0x6da15c20, + 0x32c44: 0x6da15e20, 0x32c45: 0x6da16020, 0x32c46: 0x6da16220, 0x32c47: 0x6da16420, + 0x32c48: 0x6da16620, 0x32c49: 0x6da16820, 0x32c4a: 0x6da16a20, 0x32c4b: 0x6da16c20, + 0x32c4c: 0x6da16e20, 0x32c4d: 0x6da17020, 0x32c4e: 0x6da17220, 0x32c4f: 0x6dc32a20, + 0x32c50: 0x6dc32c20, 0x32c51: 0x6dc32e20, 0x32c52: 0x6dc33020, 0x32c53: 0x6dc33220, + 0x32c54: 0x6dc33420, 0x32c55: 0x6dc33620, 0x32c56: 0x6dc33820, 0x32c57: 0x6dc33a20, + 0x32c58: 0x6dc33c20, 0x32c59: 0x6dc33e20, 0x32c5a: 0x6dc34020, 0x32c5b: 0x6dc34220, + 0x32c5c: 0x6dc34420, 0x32c5d: 0x6dc34620, 0x32c5e: 0x6dc34820, 0x32c5f: 0x6dc34a20, + 0x32c60: 0x6dc34c20, 0x32c61: 0x6dc34e20, 0x32c62: 0x6dc35020, 0x32c63: 0x6dc35220, + 0x32c64: 0x6dc35420, 0x32c65: 0x6dc35620, 0x32c66: 0x6dc35820, 0x32c67: 0x6dc35a20, + 0x32c68: 0x6dc35c20, 0x32c69: 0x6dc35e20, 0x32c6a: 0x6dc36020, 0x32c6b: 0x6dc36220, + 0x32c6c: 0x6dc36420, 0x32c6d: 0x6dc36620, 0x32c6e: 0x6dc36820, 0x32c6f: 0x6dc36a20, + 0x32c70: 0x6dc36c20, 0x32c71: 0x6dc36e20, 0x32c72: 0x6dc37020, 0x32c73: 0x6dc37220, + 0x32c74: 0x6dc37420, 0x32c75: 0x6dc37620, 0x32c76: 0x6dc37820, 0x32c77: 0x6dc37a20, + 0x32c78: 0x6dc37c20, 0x32c79: 0x6dc37e20, 0x32c7a: 0x6dc38020, 0x32c7b: 0x6dc38220, + 0x32c7c: 0x6dc38420, 0x32c7d: 0x6dc38620, 0x32c7e: 0x6dc38820, 0x32c7f: 0x6dc38a20, + // Block 0xcb2, offset 0x32c80 + 0x32c80: 0x6dc38c20, 0x32c81: 0x6dc38e20, 0x32c82: 0x6dc39020, 0x32c83: 0x6dc39220, + 0x32c84: 0x6dc39420, 0x32c85: 0x6dc39620, 0x32c86: 0x6dc39820, 0x32c87: 0x6dc39a20, + 0x32c88: 0x6dc39c20, 0x32c89: 0x6dc39e20, 0x32c8a: 0x6dc3a020, 0x32c8b: 0x6dc3a220, + 0x32c8c: 0x6dc3a420, 0x32c8d: 0x6dc3a620, 0x32c8e: 0x6dc3a820, 0x32c8f: 0x6dc3aa20, + 0x32c90: 0x6dc3ac20, 0x32c91: 0x6dc3ae20, 0x32c92: 0x6dc3b020, 0x32c93: 0x6dc3b220, + 0x32c94: 0x6dc3b420, 0x32c95: 0x6dc3b620, 0x32c96: 0x6dc3b820, 0x32c97: 0x6dc3ba20, + 0x32c98: 0x6dc3bc20, 0x32c99: 0x6dc3be20, 0x32c9a: 0x6dc3c020, 0x32c9b: 0x6dc3c220, + 0x32c9c: 0x6dc3c420, 0x32c9d: 0x6dc3c620, 0x32c9e: 0x6dc3c820, 0x32c9f: 0x6dc3ca20, + 0x32ca0: 0x6de09a20, 0x32ca1: 0x6de09c20, 0x32ca2: 0x6de09e20, 0x32ca3: 0x6de0a020, + 0x32ca4: 0x6de0a220, 0x32ca5: 0x6de0a420, 0x32ca6: 0x6de0a620, 0x32ca7: 0x6de0a820, + 0x32ca8: 0x6de0aa20, 0x32ca9: 0x6de0ac20, 0x32caa: 0x6de0ae20, 0x32cab: 0x6de0b020, + 0x32cac: 0x6de0b220, 0x32cad: 0x6de0b420, 0x32cae: 0x6de0b620, 0x32caf: 0x6de0b820, + 0x32cb0: 0x6dc3cc20, 0x32cb1: 0x6de0ba20, 0x32cb2: 0x6de0bc20, 0x32cb3: 0x6de0be20, + 0x32cb4: 0x6de0c020, 0x32cb5: 0x6de0c220, 0x32cb6: 0x6de0c420, 0x32cb7: 0x6de0c620, + 0x32cb8: 0x6de0c820, 0x32cb9: 0x6de0ca20, 0x32cba: 0x6de0cc20, 0x32cbb: 0x6de0ce20, + 0x32cbc: 0x6de0d020, 0x32cbd: 0x6de0d220, 0x32cbe: 0x6de0d420, 0x32cbf: 0x6de0d620, + // Block 0xcb3, offset 0x32cc0 + 0x32cc0: 0x6de0d820, 0x32cc1: 0x6de0da20, 0x32cc2: 0x6de0dc20, 0x32cc3: 0x6de0de20, + 0x32cc4: 0x6de0e020, 0x32cc5: 0x6de0e220, 0x32cc6: 0x6de0e420, 0x32cc7: 0x6de0e620, + 0x32cc8: 0x6de0e820, 0x32cc9: 0x6de5dc20, 0x32cca: 0x6de0ea20, 0x32ccb: 0x6de0ec20, + 0x32ccc: 0x6de0ee20, 0x32ccd: 0x6de0f020, 0x32cce: 0x6de0f220, 0x32ccf: 0x6de0f420, + 0x32cd0: 0x6de0f620, 0x32cd1: 0x6df8e220, 0x32cd2: 0x6df8e420, 0x32cd3: 0x6df8e620, + 0x32cd4: 0x6df8e820, 0x32cd5: 0x6df8ea20, 0x32cd6: 0x6df8ec20, 0x32cd7: 0x6df8ee20, + 0x32cd8: 0x6df8f020, 0x32cd9: 0x6df8f220, 0x32cda: 0x6df8f420, 0x32cdb: 0x6df8f620, + 0x32cdc: 0x6df8f820, 0x32cdd: 0x6df8fa20, 0x32cde: 0x6df8fc20, 0x32cdf: 0x6df8fe20, + 0x32ce0: 0x6df90020, 0x32ce1: 0x6df90220, 0x32ce2: 0x6df90420, 0x32ce3: 0x6df90620, + 0x32ce4: 0x6df90820, 0x32ce5: 0x6df90a20, 0x32ce6: 0x6df90c20, 0x32ce7: 0x6df90e20, + 0x32ce8: 0x6df91020, 0x32ce9: 0x6df91220, 0x32cea: 0x6df91420, 0x32ceb: 0x6df91620, + 0x32cec: 0x6df91820, 0x32ced: 0x6df91a20, 0x32cee: 0x6df91c20, 0x32cef: 0x6df91e20, + 0x32cf0: 0x6df92020, 0x32cf1: 0x6e0cac20, 0x32cf2: 0x6e0cae20, 0x32cf3: 0x6e0cb020, + 0x32cf4: 0x6e0cb220, 0x32cf5: 0x6e0cb420, 0x32cf6: 0x6e0cb620, 0x32cf7: 0x6e0cb820, + 0x32cf8: 0x6e0cba20, 0x32cf9: 0x6e0cbc20, 0x32cfa: 0x6e0cbe20, 0x32cfb: 0x6e0cc020, + 0x32cfc: 0x6e0cc220, 0x32cfd: 0x6e0cc420, 0x32cfe: 0x6e0cc620, 0x32cff: 0x6e0cc820, + // Block 0xcb4, offset 0x32d00 + 0x32d00: 0x6e0cca20, 0x32d01: 0x6e0ccc20, 0x32d02: 0x6e0cce20, 0x32d03: 0x6e0cd020, + 0x32d04: 0x6e0cd220, 0x32d05: 0x6e0cd420, 0x32d06: 0x6e0cd620, 0x32d07: 0x6e0cd820, + 0x32d08: 0x6e0cda20, 0x32d09: 0x6e0cdc20, 0x32d0a: 0x6e0cde20, 0x32d0b: 0x6e0ce020, + 0x32d0c: 0x6e0ce220, 0x32d0d: 0x6e0ce420, 0x32d0e: 0x6e0ce620, 0x32d0f: 0x6e0ce820, + 0x32d10: 0x6e0cea20, 0x32d11: 0x6e0cec20, 0x32d12: 0x6e0cee20, 0x32d13: 0x6e0cf020, + 0x32d14: 0x6e0cf220, 0x32d15: 0x6e0d1c20, 0x32d16: 0x6e121420, 0x32d17: 0x6e1c4020, + 0x32d18: 0x6e1c4220, 0x32d19: 0x6e1c4420, 0x32d1a: 0x6e1c4620, 0x32d1b: 0x6e1c4820, + 0x32d1c: 0x6e1c4a20, 0x32d1d: 0x6e1c4c20, 0x32d1e: 0x6e1c4e20, 0x32d1f: 0x6e1c5020, + 0x32d20: 0x6e1c5220, 0x32d21: 0x6e1c5420, 0x32d22: 0x6e1c5620, 0x32d23: 0x6e0cf420, + 0x32d24: 0x6e1c5820, 0x32d25: 0x6e1c5a20, 0x32d26: 0x6e1c5c20, 0x32d27: 0x6e1c5e20, + 0x32d28: 0x6e1c6020, 0x32d29: 0x6e1c6220, 0x32d2a: 0x6e1c6420, 0x32d2b: 0x6e1c6620, + 0x32d2c: 0x6e1c6820, 0x32d2d: 0x6e1c6a20, 0x32d2e: 0x6e1c6c20, 0x32d2f: 0x6e1c6e20, + 0x32d30: 0x6e287c20, 0x32d31: 0x6e287e20, 0x32d32: 0x6e288020, 0x32d33: 0x6e288220, + 0x32d34: 0x6e288420, 0x32d35: 0x6e288620, 0x32d36: 0x6e288820, 0x32d37: 0x6e288a20, + 0x32d38: 0x6e288c20, 0x32d39: 0x6e31a420, 0x32d3a: 0x6e31a620, 0x32d3b: 0x6e31a820, + 0x32d3c: 0x6e31aa20, 0x32d3d: 0x6e31ac20, 0x32d3e: 0x6e31ae20, 0x32d3f: 0x6e31b020, + // Block 0xcb5, offset 0x32d40 + 0x32d40: 0x6e31b220, 0x32d41: 0x6e31b420, 0x32d42: 0x6e31b620, 0x32d43: 0x6e31b820, + 0x32d44: 0x6e31ba20, 0x32d45: 0x6e31bc20, 0x32d46: 0x6e384c20, 0x32d47: 0x6e384e20, + 0x32d48: 0x6e385020, 0x32d49: 0x6e385220, 0x32d4a: 0x6e385420, 0x32d4b: 0x6e385620, + 0x32d4c: 0x6e385820, 0x32d4d: 0x6e385a20, 0x32d4e: 0x6e385c20, 0x32d4f: 0x6e3cfa20, + 0x32d50: 0x6e3cfc20, 0x32d51: 0x6e3cfe20, 0x32d52: 0x6e3d0020, 0x32d53: 0x6e3d0220, + 0x32d54: 0x6e3d0420, 0x32d55: 0x6e3d0620, 0x32d56: 0x6e3d0820, 0x32d57: 0x6e3d0a20, + 0x32d58: 0x6e3d0c20, 0x32d59: 0x6e400a20, 0x32d5a: 0x6e400c20, 0x32d5b: 0x6e428620, + 0x32d5c: 0x6e428820, 0x32d5d: 0x6e428a20, 0x32d5e: 0x6e400e20, 0x32d5f: 0x6e45bc20, + 0x32d60: 0x6c03c820, 0x32d61: 0x6c03ca20, 0x32d62: 0x6c03cc20, 0x32d63: 0x6c079820, + 0x32d64: 0x6c079a20, 0x32d65: 0x6c079c20, 0x32d66: 0x6c079e20, 0x32d67: 0x6c0ea620, + 0x32d68: 0x6c0ea820, 0x32d69: 0x6c0eaa20, 0x32d6a: 0x6c0eac20, 0x32d6b: 0x6c0eae20, + 0x32d6c: 0x6c0eb020, 0x32d6d: 0x6c0eb220, 0x32d6e: 0x6c0eb420, 0x32d6f: 0x6c0eb620, + 0x32d70: 0x6c0eb820, 0x32d71: 0x6c0eba20, 0x32d72: 0x6c0ebc20, 0x32d73: 0x6c0ebe20, + 0x32d74: 0x6c1a6e20, 0x32d75: 0x6c1a7020, 0x32d76: 0x6c1a7220, 0x32d77: 0x6c1a7420, + 0x32d78: 0x6c1a7620, 0x32d79: 0x6c1a7820, 0x32d7a: 0x6c1a7a20, 0x32d7b: 0x6c1a7c20, + 0x32d7c: 0x6c1a7e20, 0x32d7d: 0x6c1a8020, 0x32d7e: 0x6c1a8220, 0x32d7f: 0x6c1a8420, + // Block 0xcb6, offset 0x32d80 + 0x32d80: 0x6c1a8620, 0x32d81: 0x6c1a8820, 0x32d82: 0x6c1a8a20, 0x32d83: 0x6c1a8c20, + 0x32d84: 0x6c1a8e20, 0x32d85: 0x6c1a9020, 0x32d86: 0x6c1a9220, 0x32d87: 0x6c1a9420, + 0x32d88: 0x6c2d9620, 0x32d89: 0x6c2d9820, 0x32d8a: 0x6c2d9a20, 0x32d8b: 0x6c2d9c20, + 0x32d8c: 0x6c2d9e20, 0x32d8d: 0x6c3bf620, 0x32d8e: 0x6c2da020, 0x32d8f: 0x6c2da220, + 0x32d90: 0x6c2da420, 0x32d91: 0x6c2da620, 0x32d92: 0x6c47e220, 0x32d93: 0x6c47e420, + 0x32d94: 0x6c47e620, 0x32d95: 0x6c47e820, 0x32d96: 0x6c47ea20, 0x32d97: 0x6c47ec20, + 0x32d98: 0x6c47ee20, 0x32d99: 0x6c47f020, 0x32d9a: 0x6c47f220, 0x32d9b: 0x6c47f420, + 0x32d9c: 0x6c47f620, 0x32d9d: 0x6c47f820, 0x32d9e: 0x6c47fa20, 0x32d9f: 0x6c47fc20, + 0x32da0: 0x6c695c20, 0x32da1: 0x6c695e20, 0x32da2: 0x6c696020, 0x32da3: 0x6c696220, + 0x32da4: 0x6c696420, 0x32da5: 0x6c696620, 0x32da6: 0x6c696820, 0x32da7: 0x6c696a20, + 0x32da8: 0x6c696c20, 0x32da9: 0x6c696e20, 0x32daa: 0x6c697020, 0x32dab: 0x6c697220, + 0x32dac: 0x6c697420, 0x32dad: 0x6c697620, 0x32dae: 0x6c697820, 0x32daf: 0x6c697a20, + 0x32db0: 0x6c902820, 0x32db1: 0x6c902a20, 0x32db2: 0x6c902c20, 0x32db3: 0x6c902e20, + 0x32db4: 0x6c903020, 0x32db5: 0x6c903220, 0x32db6: 0x6c903420, 0x32db7: 0x6c903620, + 0x32db8: 0x6c903820, 0x32db9: 0x6c903a20, 0x32dba: 0x6c903c20, 0x32dbb: 0x6c903e20, + 0x32dbc: 0x6cbc4820, 0x32dbd: 0x6cbc4a20, 0x32dbe: 0x6cbc4c20, 0x32dbf: 0x6cbc4e20, + // Block 0xcb7, offset 0x32dc0 + 0x32dc0: 0x6c904020, 0x32dc1: 0x6cbc5020, 0x32dc2: 0x6cbc5220, 0x32dc3: 0x6cbc5420, + 0x32dc4: 0x6cbc5620, 0x32dc5: 0x6cbc5820, 0x32dc6: 0x6cbc5a20, 0x32dc7: 0x6cbc5c20, + 0x32dc8: 0x6cbc5e20, 0x32dc9: 0x6cbc6020, 0x32dca: 0x6ced3220, 0x32dcb: 0x6ced3420, + 0x32dcc: 0x6ced3620, 0x32dcd: 0x6ced3820, 0x32dce: 0x6ced3a20, 0x32dcf: 0x6ced3c20, + 0x32dd0: 0x6ced3e20, 0x32dd1: 0x6ced4020, 0x32dd2: 0x6ced4220, 0x32dd3: 0x6ced4420, + 0x32dd4: 0x6ced4620, 0x32dd5: 0x6d1cfa20, 0x32dd6: 0x6d1cfc20, 0x32dd7: 0x6d1cfe20, + 0x32dd8: 0x6d1d0020, 0x32dd9: 0x6d1d0220, 0x32dda: 0x6d1d0420, 0x32ddb: 0x6d1d0620, + 0x32ddc: 0x6d1d0820, 0x32ddd: 0x6d1d0a20, 0x32dde: 0x6d1d0c20, 0x32ddf: 0x6d1d0e20, + 0x32de0: 0x6d1d1020, 0x32de1: 0x6d1d1220, 0x32de2: 0x6d4ab820, 0x32de3: 0x6d4aba20, + 0x32de4: 0x6d4abc20, 0x32de5: 0x6d785c20, 0x32de6: 0x6d4abe20, 0x32de7: 0x6d4ac020, + 0x32de8: 0x6d4ac220, 0x32de9: 0x6d4ac420, 0x32dea: 0x6d785e20, 0x32deb: 0x6d786020, + 0x32dec: 0x6d786220, 0x32ded: 0x6da17e20, 0x32dee: 0x6da18020, 0x32def: 0x6da18220, + 0x32df0: 0x6da18420, 0x32df1: 0x6da18620, 0x32df2: 0x6dc3de20, 0x32df3: 0x6de0fe20, + 0x32df4: 0x6de10020, 0x32df5: 0x6df92c20, 0x32df6: 0x6df92e20, 0x32df7: 0x6df93020, + 0x32df8: 0x6e0cf620, 0x32df9: 0x6e0cf820, 0x32dfa: 0x6e0cfa20, 0x32dfb: 0x6e3d1020, + 0x32dfc: 0x6c03d420, 0x32dfd: 0x6c03d620, 0x32dfe: 0x6c03d820, 0x32dff: 0x6c07ae20, + // Block 0xcb8, offset 0x32e00 + 0x32e00: 0x6c07b020, 0x32e01: 0x6c07b220, 0x32e02: 0x6c07b420, 0x32e03: 0x6c07b620, + 0x32e04: 0x6c07b820, 0x32e05: 0x6c07ba20, 0x32e06: 0x6c07bc20, 0x32e07: 0x6c07be20, + 0x32e08: 0x6c0ee620, 0x32e09: 0x6c0ee820, 0x32e0a: 0x6c0eea20, 0x32e0b: 0x6c0eec20, + 0x32e0c: 0x6c0eee20, 0x32e0d: 0x6c0ef020, 0x32e0e: 0x6c0ef220, 0x32e0f: 0x6c0ef420, + 0x32e10: 0x6c0ef620, 0x32e11: 0x6c0ef820, 0x32e12: 0x6c0efa20, 0x32e13: 0x6c0efc20, + 0x32e14: 0x6c0efe20, 0x32e15: 0x6c0f0020, 0x32e16: 0x6c0f0220, 0x32e17: 0x6c0fb020, + 0x32e18: 0x6c1af820, 0x32e19: 0x6c1afa20, 0x32e1a: 0x6c1afc20, 0x32e1b: 0x6c1afe20, + 0x32e1c: 0x6c1b0020, 0x32e1d: 0x6c1b0220, 0x32e1e: 0x6c1b0420, 0x32e1f: 0x6c1b0620, + 0x32e20: 0x6c1b0820, 0x32e21: 0x6c1b0a20, 0x32e22: 0x6c1b0c20, 0x32e23: 0x6c1b0e20, + 0x32e24: 0x6c1b1020, 0x32e25: 0x6c1b1220, 0x32e26: 0x6c1b1420, 0x32e27: 0x6c1b1620, + 0x32e28: 0x6c1b1820, 0x32e29: 0x6c1b1a20, 0x32e2a: 0x6c1b1c20, 0x32e2b: 0x6c1b1e20, + 0x32e2c: 0x6c1b2020, 0x32e2d: 0x6c1b2220, 0x32e2e: 0x6c1b2420, 0x32e2f: 0x6c1b2620, + 0x32e30: 0x6c1b2820, 0x32e31: 0x6c1b2a20, 0x32e32: 0x6c1b2c20, 0x32e33: 0x6c1b2e20, + 0x32e34: 0x6c1b3020, 0x32e35: 0x6c1b3220, 0x32e36: 0x6c1b3420, 0x32e37: 0x6c1b3620, + 0x32e38: 0x6c1b3820, 0x32e39: 0x6c1b3a20, 0x32e3a: 0x6c1b3c20, 0x32e3b: 0x6c1b3e20, + 0x32e3c: 0x6c1b4020, 0x32e3d: 0x6c1b4220, 0x32e3e: 0x6c1b4420, 0x32e3f: 0x6c1b4620, + // Block 0xcb9, offset 0x32e40 + 0x32e40: 0x6c1b4820, 0x32e41: 0x6c1b4a20, 0x32e42: 0x6c1b4c20, 0x32e43: 0x6c1b4e20, + 0x32e44: 0x6c2e0820, 0x32e45: 0x6c2e0a20, 0x32e46: 0x6c2e0c20, 0x32e47: 0x6c2e0e20, + 0x32e48: 0x6c2e1020, 0x32e49: 0x6c2e1220, 0x32e4a: 0x6c2e1420, 0x32e4b: 0x6c2e1620, + 0x32e4c: 0x6c2e1820, 0x32e4d: 0x6c2e1a20, 0x32e4e: 0x6c2e1c20, 0x32e4f: 0x6c2e1e20, + 0x32e50: 0x6c2e2020, 0x32e51: 0x6c2e2220, 0x32e52: 0x6c2e2420, 0x32e53: 0x6c2e2620, + 0x32e54: 0x6c2e2820, 0x32e55: 0x6c2e2a20, 0x32e56: 0x6c2e2c20, 0x32e57: 0x6c2e2e20, + 0x32e58: 0x6c2e3020, 0x32e59: 0x6c2e3220, 0x32e5a: 0x6c2e3420, 0x32e5b: 0x6c2e3620, + 0x32e5c: 0x6c2e3820, 0x32e5d: 0x6c2e3a20, 0x32e5e: 0x6c2e3c20, 0x32e5f: 0x6c2e3e20, + 0x32e60: 0x6c2e4020, 0x32e61: 0x6c2e4220, 0x32e62: 0x6c2e4420, 0x32e63: 0x6c2e4620, + 0x32e64: 0x6c2e4820, 0x32e65: 0x6c2e4a20, 0x32e66: 0x6c2e4c20, 0x32e67: 0x6c2e4e20, + 0x32e68: 0x6c2e5020, 0x32e69: 0x6c2e5220, 0x32e6a: 0x6c2e5420, 0x32e6b: 0x6c2e5620, + 0x32e6c: 0x6c2e5820, 0x32e6d: 0x6c2e5a20, 0x32e6e: 0x6c2e5c20, 0x32e6f: 0x6c2e5e20, + 0x32e70: 0x6c2e6020, 0x32e71: 0x6c2e6220, 0x32e72: 0x6c2e6420, 0x32e73: 0x6c2e6620, + 0x32e74: 0x6c2e6820, 0x32e75: 0x6c2e6a20, 0x32e76: 0x6c2e6c20, 0x32e77: 0x6c486a20, + 0x32e78: 0x6c486c20, 0x32e79: 0x6c486e20, 0x32e7a: 0x6c487020, 0x32e7b: 0x6c487220, + 0x32e7c: 0x6c487420, 0x32e7d: 0x6c487620, 0x32e7e: 0x6c487820, 0x32e7f: 0x6c487a20, + // Block 0xcba, offset 0x32e80 + 0x32e80: 0x6c487c20, 0x32e81: 0x6c487e20, 0x32e82: 0x6c488020, 0x32e83: 0x6c488220, + 0x32e84: 0x6c488420, 0x32e85: 0x6c488620, 0x32e86: 0x6c488820, 0x32e87: 0x6c488a20, + 0x32e88: 0x6c488c20, 0x32e89: 0x6c488e20, 0x32e8a: 0x6c489020, 0x32e8b: 0x6c489220, + 0x32e8c: 0x6c489420, 0x32e8d: 0x6c489620, 0x32e8e: 0x6c489820, 0x32e8f: 0x6c489a20, + 0x32e90: 0x6c489c20, 0x32e91: 0x6c489e20, 0x32e92: 0x6c48a020, 0x32e93: 0x6c48a220, + 0x32e94: 0x6c48a420, 0x32e95: 0x6c48a620, 0x32e96: 0x6c48a820, 0x32e97: 0x6c48aa20, + 0x32e98: 0x6c48ac20, 0x32e99: 0x6c48ae20, 0x32e9a: 0x6c48b020, 0x32e9b: 0x6c48b220, + 0x32e9c: 0x6c5dc620, 0x32e9d: 0x6c48b420, 0x32e9e: 0x6c48b620, 0x32e9f: 0x6c48b820, + 0x32ea0: 0x6c48ba20, 0x32ea1: 0x6c48bc20, 0x32ea2: 0x6c48be20, 0x32ea3: 0x6c48c020, + 0x32ea4: 0x6c48c220, 0x32ea5: 0x6c48c420, 0x32ea6: 0x6c48c620, 0x32ea7: 0x6c48c820, + 0x32ea8: 0x6c48ca20, 0x32ea9: 0x6c48cc20, 0x32eaa: 0x6c48ce20, 0x32eab: 0x6c48d020, + 0x32eac: 0x6c48d220, 0x32ead: 0x6c69da20, 0x32eae: 0x6c69dc20, 0x32eaf: 0x6c69de20, + 0x32eb0: 0x6c69e020, 0x32eb1: 0x6c69e220, 0x32eb2: 0x6c69e420, 0x32eb3: 0x6c69e620, + 0x32eb4: 0x6c69e820, 0x32eb5: 0x6c69ea20, 0x32eb6: 0x6c69ec20, 0x32eb7: 0x6c69ee20, + 0x32eb8: 0x6c69f020, 0x32eb9: 0x6c69f220, 0x32eba: 0x6c69f420, 0x32ebb: 0x6c69f620, + 0x32ebc: 0x6c69f820, 0x32ebd: 0x6c69fa20, 0x32ebe: 0x6c69fc20, 0x32ebf: 0x6c69fe20, + // Block 0xcbb, offset 0x32ec0 + 0x32ec0: 0x6c6a0020, 0x32ec1: 0x6c6a0220, 0x32ec2: 0x6c6a0420, 0x32ec3: 0x6c6a0620, + 0x32ec4: 0x6c6a0820, 0x32ec5: 0x6c6a0a20, 0x32ec6: 0x6c6a0c20, 0x32ec7: 0x6c6a0e20, + 0x32ec8: 0x6c6a1020, 0x32ec9: 0x6c6a1220, 0x32eca: 0x6c6a1420, 0x32ecb: 0x6c6a1620, + 0x32ecc: 0x6c6a1820, 0x32ecd: 0x6c6a1a20, 0x32ece: 0x6c6a1c20, 0x32ecf: 0x6c6a1e20, + 0x32ed0: 0x6c6a2020, 0x32ed1: 0x6c6a2220, 0x32ed2: 0x6c6a2420, 0x32ed3: 0x6c6a2620, + 0x32ed4: 0x6c6a2820, 0x32ed5: 0x6c6a2a20, 0x32ed6: 0x6c6a2c20, 0x32ed7: 0x6c6a2e20, + 0x32ed8: 0x6c6a3020, 0x32ed9: 0x6c6a3220, 0x32eda: 0x6c6a3420, 0x32edb: 0x6c6a3620, + 0x32edc: 0x6c6a3820, 0x32edd: 0x6c6a3a20, 0x32ede: 0x6c6a3c20, 0x32edf: 0x6c6a3e20, + 0x32ee0: 0x6c6a4020, 0x32ee1: 0x6c6a4220, 0x32ee2: 0x6c6a4420, 0x32ee3: 0x6c6a4620, + 0x32ee4: 0x6c6a4820, 0x32ee5: 0x6c6a4a20, 0x32ee6: 0x6c90c620, 0x32ee7: 0x6c90c820, + 0x32ee8: 0x6c90ca20, 0x32ee9: 0x6c90cc20, 0x32eea: 0x6c90ce20, 0x32eeb: 0x6c90d020, + 0x32eec: 0x6c90d220, 0x32eed: 0x6c90d420, 0x32eee: 0x6c90d620, 0x32eef: 0x6c90d820, + 0x32ef0: 0x6c90da20, 0x32ef1: 0x6c90dc20, 0x32ef2: 0x6c90de20, 0x32ef3: 0x6c90e020, + 0x32ef4: 0x6c90e220, 0x32ef5: 0x6c90e420, 0x32ef6: 0x6c90e620, 0x32ef7: 0x6c90e820, + 0x32ef8: 0x6c90ea20, 0x32ef9: 0x6c90ec20, 0x32efa: 0x6c90ee20, 0x32efb: 0x6c90f020, + 0x32efc: 0x6c90f220, 0x32efd: 0x6c90f420, 0x32efe: 0x6c90f620, 0x32eff: 0x6c90f820, + // Block 0xcbc, offset 0x32f00 + 0x32f00: 0x6c90fa20, 0x32f01: 0x6c90fc20, 0x32f02: 0x6c90fe20, 0x32f03: 0x6c910020, + 0x32f04: 0x6c910220, 0x32f05: 0x6c910420, 0x32f06: 0x6c910620, 0x32f07: 0x6c910820, + 0x32f08: 0x6c910a20, 0x32f09: 0x6c910c20, 0x32f0a: 0x6c910e20, 0x32f0b: 0x6c911020, + 0x32f0c: 0x6c911220, 0x32f0d: 0x6c911420, 0x32f0e: 0x6c911620, 0x32f0f: 0x6c911820, + 0x32f10: 0x6c911a20, 0x32f11: 0x6c911c20, 0x32f12: 0x6c911e20, 0x32f13: 0x6c912020, + 0x32f14: 0x6c912220, 0x32f15: 0x6c912420, 0x32f16: 0x6c912620, 0x32f17: 0x6c912820, + 0x32f18: 0x6c912a20, 0x32f19: 0x6c912c20, 0x32f1a: 0x6c912e20, 0x32f1b: 0x6c913020, + 0x32f1c: 0x6c913220, 0x32f1d: 0x6c913420, 0x32f1e: 0x6c913620, 0x32f1f: 0x6c913820, + 0x32f20: 0x6c913a20, 0x32f21: 0x6c913c20, 0x32f22: 0x6c913e20, 0x32f23: 0x6c914020, + 0x32f24: 0x6cbcd820, 0x32f25: 0x6cbcda20, 0x32f26: 0x6cbcdc20, 0x32f27: 0x6cbcde20, + 0x32f28: 0x6cbce020, 0x32f29: 0x6cbce220, 0x32f2a: 0x6cbce420, 0x32f2b: 0x6cbce620, + 0x32f2c: 0x6cbce820, 0x32f2d: 0x6cbcea20, 0x32f2e: 0x6cbcec20, 0x32f2f: 0x6cbcee20, + 0x32f30: 0x6cbcf020, 0x32f31: 0x6cbcf220, 0x32f32: 0x6cbcf420, 0x32f33: 0x6cbcf620, + 0x32f34: 0x6cbcf820, 0x32f35: 0x6cbcfa20, 0x32f36: 0x6cbcfc20, 0x32f37: 0x6cbcfe20, + 0x32f38: 0x6cbd0020, 0x32f39: 0x6cbd0220, 0x32f3a: 0x6cbd0420, 0x32f3b: 0x6cbd0620, + 0x32f3c: 0x6cbd0820, 0x32f3d: 0x6cbd0a20, 0x32f3e: 0x6cbd0c20, 0x32f3f: 0x6cbd0e20, + // Block 0xcbd, offset 0x32f40 + 0x32f40: 0x6cbd1020, 0x32f41: 0x6cbd1220, 0x32f42: 0x6cbd1420, 0x32f43: 0x6cbd1620, + 0x32f44: 0x6cbd1820, 0x32f45: 0x6cbd1a20, 0x32f46: 0x6cbd1c20, 0x32f47: 0x6cbd1e20, + 0x32f48: 0x6cbd2020, 0x32f49: 0x6cbd2220, 0x32f4a: 0x6cbd2420, 0x32f4b: 0x6cbd2620, + 0x32f4c: 0x6cbd2820, 0x32f4d: 0x6cbd2a20, 0x32f4e: 0x6cbd2c20, 0x32f4f: 0x6cbd2e20, + 0x32f50: 0x6cbd3020, 0x32f51: 0x6cbd3220, 0x32f52: 0x6cbd3420, 0x32f53: 0x6cbd3620, + 0x32f54: 0x6cbd3820, 0x32f55: 0x6cbd3a20, 0x32f56: 0x6cbd3c20, 0x32f57: 0x6cbd3e20, + 0x32f58: 0x6cbd4020, 0x32f59: 0x6cbd4220, 0x32f5a: 0x6cbd4420, 0x32f5b: 0x6cbd4620, + 0x32f5c: 0x6cbd4820, 0x32f5d: 0x6cbd4a20, 0x32f5e: 0x6cbd4c20, 0x32f5f: 0x6cbd4e20, + 0x32f60: 0x6cbd5020, 0x32f61: 0x6cbd5220, 0x32f62: 0x6cbd5420, 0x32f63: 0x6cbd5620, + 0x32f64: 0x6cbd5820, 0x32f65: 0x6cbd5a20, 0x32f66: 0x6cbd5c20, 0x32f67: 0x6cbd5e20, + 0x32f68: 0x6cbd6020, 0x32f69: 0x6cbd6220, 0x32f6a: 0x6cbd6420, 0x32f6b: 0x6cbd6620, + 0x32f6c: 0x6cbd6820, 0x32f6d: 0x6cbd6a20, 0x32f6e: 0x6cedae20, 0x32f6f: 0x6cedb020, + 0x32f70: 0x6cedb220, 0x32f71: 0x6cedb420, 0x32f72: 0x6cedb620, 0x32f73: 0x6cedb820, + 0x32f74: 0x6cedba20, 0x32f75: 0x6cedbc20, 0x32f76: 0x6cedbe20, 0x32f77: 0x6cedc020, + 0x32f78: 0x6cedc220, 0x32f79: 0x6cedc420, 0x32f7a: 0x6cedc620, 0x32f7b: 0x6cedc820, + 0x32f7c: 0x6cedca20, 0x32f7d: 0x6cedcc20, 0x32f7e: 0x6cedce20, 0x32f7f: 0x6cedd020, + // Block 0xcbe, offset 0x32f80 + 0x32f80: 0x6cedd220, 0x32f81: 0x6cedd420, 0x32f82: 0x6cedd620, 0x32f83: 0x6cedd820, + 0x32f84: 0x6cedda20, 0x32f85: 0x6ceddc20, 0x32f86: 0x6cedde20, 0x32f87: 0x6cede020, + 0x32f88: 0x6cede220, 0x32f89: 0x6cede420, 0x32f8a: 0x6cede620, 0x32f8b: 0x6cede820, + 0x32f8c: 0x6cedea20, 0x32f8d: 0x6cedec20, 0x32f8e: 0x6cedee20, 0x32f8f: 0x6cedf020, + 0x32f90: 0x6cedf220, 0x32f91: 0x6cedf420, 0x32f92: 0x6cedf620, 0x32f93: 0x6cedf820, + 0x32f94: 0x6cedfa20, 0x32f95: 0x6cedfc20, 0x32f96: 0x6cedfe20, 0x32f97: 0x6cee0020, + 0x32f98: 0x6cee0220, 0x32f99: 0x6cee0420, 0x32f9a: 0x6cee0620, 0x32f9b: 0x6cee0820, + 0x32f9c: 0x6cee0a20, 0x32f9d: 0x6cee0c20, 0x32f9e: 0x6cee0e20, 0x32f9f: 0x6cee1020, + 0x32fa0: 0x6cee1220, 0x32fa1: 0x6cee1420, 0x32fa2: 0x6cee1620, 0x32fa3: 0x6cee1820, + 0x32fa4: 0x6cee1a20, 0x32fa5: 0x6cee1c20, 0x32fa6: 0x6cee1e20, 0x32fa7: 0x6cee2020, + 0x32fa8: 0x6cee2220, 0x32fa9: 0x6cee2420, 0x32faa: 0x6cee2620, 0x32fab: 0x6cee2820, + 0x32fac: 0x6cee2a20, 0x32fad: 0x6d1d7620, 0x32fae: 0x6d1d7820, 0x32faf: 0x6d1d7a20, + 0x32fb0: 0x6d1d7c20, 0x32fb1: 0x6d1d7e20, 0x32fb2: 0x6d1d8020, 0x32fb3: 0x6d1d8220, + 0x32fb4: 0x6d1d8420, 0x32fb5: 0x6d1d8620, 0x32fb6: 0x6d1d8820, 0x32fb7: 0x6d1d8a20, + 0x32fb8: 0x6d1d8c20, 0x32fb9: 0x6d1d8e20, 0x32fba: 0x6d1d9020, 0x32fbb: 0x6d1d9220, + 0x32fbc: 0x6d1d9420, 0x32fbd: 0x6d1d9620, 0x32fbe: 0x6d1d9820, 0x32fbf: 0x6d1d9a20, + // Block 0xcbf, offset 0x32fc0 + 0x32fc0: 0x6d1d9c20, 0x32fc1: 0x6d1d9e20, 0x32fc2: 0x6d1da020, 0x32fc3: 0x6d1da220, + 0x32fc4: 0x6d1da420, 0x32fc5: 0x6d1da620, 0x32fc6: 0x6d1da820, 0x32fc7: 0x6d1daa20, + 0x32fc8: 0x6d1dac20, 0x32fc9: 0x6d1dae20, 0x32fca: 0x6d1db020, 0x32fcb: 0x6d1db220, + 0x32fcc: 0x6d1db420, 0x32fcd: 0x6d1db620, 0x32fce: 0x6d1db820, 0x32fcf: 0x6d1dba20, + 0x32fd0: 0x6d1dbc20, 0x32fd1: 0x6d1dbe20, 0x32fd2: 0x6d1dc020, 0x32fd3: 0x6d1dc220, + 0x32fd4: 0x6d1dc420, 0x32fd5: 0x6d1dc620, 0x32fd6: 0x6d1dc820, 0x32fd7: 0x6d1dca20, + 0x32fd8: 0x6d1dcc20, 0x32fd9: 0x6d1dce20, 0x32fda: 0x6d1dd020, 0x32fdb: 0x6d1dd220, + 0x32fdc: 0x6d1dd420, 0x32fdd: 0x6d1dd620, 0x32fde: 0x6d4b1420, 0x32fdf: 0x6d4b1620, + 0x32fe0: 0x6d4b1820, 0x32fe1: 0x6d4b1a20, 0x32fe2: 0x6d4b1c20, 0x32fe3: 0x6d4b1e20, + 0x32fe4: 0x6d4b2020, 0x32fe5: 0x6d4b2220, 0x32fe6: 0x6d4b2420, 0x32fe7: 0x6d4b2620, + 0x32fe8: 0x6d4b2820, 0x32fe9: 0x6d4b2a20, 0x32fea: 0x6d4b2c20, 0x32feb: 0x6d4b2e20, + 0x32fec: 0x6d4b3020, 0x32fed: 0x6d4b3220, 0x32fee: 0x6d4b3420, 0x32fef: 0x6d4b3620, + 0x32ff0: 0x6d4b3820, 0x32ff1: 0x6d4b3a20, 0x32ff2: 0x6d4b3c20, 0x32ff3: 0x6d4b3e20, + 0x32ff4: 0x6d4b4020, 0x32ff5: 0x6d4b4220, 0x32ff6: 0x6d4b4420, 0x32ff7: 0x6d4b4620, + 0x32ff8: 0x6d4b4820, 0x32ff9: 0x6d4b4a20, 0x32ffa: 0x6d4b4c20, 0x32ffb: 0x6d4b4e20, + 0x32ffc: 0x6d4b5020, 0x32ffd: 0x6d4b5220, 0x32ffe: 0x6d4b5420, 0x32fff: 0x6d4b5620, + // Block 0xcc0, offset 0x33000 + 0x33000: 0x6d4b5820, 0x33001: 0x6d4b5a20, 0x33002: 0x6d4b5c20, 0x33003: 0x6d4b5e20, + 0x33004: 0x6d4b6020, 0x33005: 0x6d4b6220, 0x33006: 0x6d4b6420, 0x33007: 0x6d4b6620, + 0x33008: 0x6d4b6820, 0x33009: 0x6d4b6a20, 0x3300a: 0x6d4b6c20, 0x3300b: 0x6d4b6e20, + 0x3300c: 0x6d4b7020, 0x3300d: 0x6d4b7220, 0x3300e: 0x6d4b7420, 0x3300f: 0x6d4b7620, + 0x33010: 0x6d4b7820, 0x33011: 0x6d4b7a20, 0x33012: 0x6d4b7c20, 0x33013: 0x6d4b7e20, + 0x33014: 0x6d4b8020, 0x33015: 0x6d4b8220, 0x33016: 0x6d4b8420, 0x33017: 0x6d4b8620, + 0x33018: 0x6d4b8820, 0x33019: 0x6d4b8a20, 0x3301a: 0x6d4b8c20, 0x3301b: 0x6d4b8e20, + 0x3301c: 0x6d4b9020, 0x3301d: 0x6d4b9220, 0x3301e: 0x6d789c20, 0x3301f: 0x6d789e20, + 0x33020: 0x6d78a020, 0x33021: 0x6d78a220, 0x33022: 0x6d78a420, 0x33023: 0x6d78a620, + 0x33024: 0x6d78a820, 0x33025: 0x6d78aa20, 0x33026: 0x6d78ac20, 0x33027: 0x6d78ae20, + 0x33028: 0x6d78b020, 0x33029: 0x6d78b220, 0x3302a: 0x6d78b420, 0x3302b: 0x6d78b620, + 0x3302c: 0x6d78b820, 0x3302d: 0x6d78ba20, 0x3302e: 0x6d78bc20, 0x3302f: 0x6d78be20, + 0x33030: 0x6d78c020, 0x33031: 0x6d78c220, 0x33032: 0x6d78c420, 0x33033: 0x6d78c620, + 0x33034: 0x6d78c820, 0x33035: 0x6d78ca20, 0x33036: 0x6d78cc20, 0x33037: 0x6d78ce20, + 0x33038: 0x6d78d020, 0x33039: 0x6d78d220, 0x3303a: 0x6d980c20, 0x3303b: 0x6d78d420, + 0x3303c: 0x6d78d620, 0x3303d: 0x6d78d820, 0x3303e: 0x6d78da20, 0x3303f: 0x6d78dc20, + // Block 0xcc1, offset 0x33040 + 0x33040: 0x6d78de20, 0x33041: 0x6d78e020, 0x33042: 0x6d78e220, 0x33043: 0x6d78e420, + 0x33044: 0x6d78e620, 0x33045: 0x6d78e820, 0x33046: 0x6d78ea20, 0x33047: 0x6d78ec20, + 0x33048: 0x6d78ee20, 0x33049: 0x6da1a820, 0x3304a: 0x6da1aa20, 0x3304b: 0x6da1ac20, + 0x3304c: 0x6da1ae20, 0x3304d: 0x6da1b020, 0x3304e: 0x6da1b220, 0x3304f: 0x6da1b420, + 0x33050: 0x6da1b620, 0x33051: 0x6da1b820, 0x33052: 0x6da1ba20, 0x33053: 0x6da1bc20, + 0x33054: 0x6da1be20, 0x33055: 0x6da1c020, 0x33056: 0x6da1c220, 0x33057: 0x6da1c420, + 0x33058: 0x6da1c620, 0x33059: 0x6da1c820, 0x3305a: 0x6da1ca20, 0x3305b: 0x6da1cc20, + 0x3305c: 0x6da1ce20, 0x3305d: 0x6da1d020, 0x3305e: 0x6da1d220, 0x3305f: 0x6da1d420, + 0x33060: 0x6da1d620, 0x33061: 0x6dc1f820, 0x33062: 0x6da1d820, 0x33063: 0x6da1da20, + 0x33064: 0x6da1dc20, 0x33065: 0x6da1de20, 0x33066: 0x6da1e020, 0x33067: 0x6da1e220, + 0x33068: 0x6da1e420, 0x33069: 0x6da1e620, 0x3306a: 0x6da1e820, 0x3306b: 0x6da1ea20, + 0x3306c: 0x6da1ec20, 0x3306d: 0x6da1ee20, 0x3306e: 0x6da1f020, 0x3306f: 0x6da1f220, + 0x33070: 0x6dc3ea20, 0x33071: 0x6dc3ec20, 0x33072: 0x6dc3ee20, 0x33073: 0x6dc3f020, + 0x33074: 0x6dc3f220, 0x33075: 0x6dc3f420, 0x33076: 0x6dc3f620, 0x33077: 0x6dc3f820, + 0x33078: 0x6dc3fa20, 0x33079: 0x6dc3fc20, 0x3307a: 0x6dc3fe20, 0x3307b: 0x6dc40020, + 0x3307c: 0x6dc40220, 0x3307d: 0x6dc40420, 0x3307e: 0x6dc40620, 0x3307f: 0x6dc40820, + // Block 0xcc2, offset 0x33080 + 0x33080: 0x6de11620, 0x33081: 0x6dc40a20, 0x33082: 0x6dc40c20, 0x33083: 0x6dc40e20, + 0x33084: 0x6dc41020, 0x33085: 0x6dc41220, 0x33086: 0x6dc41420, 0x33087: 0x6dc41620, + 0x33088: 0x6dc41820, 0x33089: 0x6dc41a20, 0x3308a: 0x6dc41c20, 0x3308b: 0x6dc41e20, + 0x3308c: 0x6dc42020, 0x3308d: 0x6dc42220, 0x3308e: 0x6dc42420, 0x3308f: 0x6dc42620, + 0x33090: 0x6de11820, 0x33091: 0x6de11a20, 0x33092: 0x6de11c20, 0x33093: 0x6de11e20, + 0x33094: 0x6de12020, 0x33095: 0x6de12220, 0x33096: 0x6de12420, 0x33097: 0x6de12620, + 0x33098: 0x6de12820, 0x33099: 0x6de12a20, 0x3309a: 0x6de12c20, 0x3309b: 0x6dede420, + 0x3309c: 0x6de12e20, 0x3309d: 0x6de13020, 0x3309e: 0x6de13220, 0x3309f: 0x6de13420, + 0x330a0: 0x6de13620, 0x330a1: 0x6de13820, 0x330a2: 0x6de13a20, 0x330a3: 0x6de13c20, + 0x330a4: 0x6de13e20, 0x330a5: 0x6de14020, 0x330a6: 0x6df93a20, 0x330a7: 0x6df93c20, + 0x330a8: 0x6df93e20, 0x330a9: 0x6df94020, 0x330aa: 0x6df94220, 0x330ab: 0x6df94420, + 0x330ac: 0x6df94620, 0x330ad: 0x6df94820, 0x330ae: 0x6df94a20, 0x330af: 0x6df94c20, + 0x330b0: 0x6df94e20, 0x330b1: 0x6e0cfe20, 0x330b2: 0x6e0d0020, 0x330b3: 0x6e0d0220, + 0x330b4: 0x6e0d0420, 0x330b5: 0x6e0d0620, 0x330b6: 0x6e0d0820, 0x330b7: 0x6e078620, + 0x330b8: 0x6e0d0a20, 0x330b9: 0x6e0d0c20, 0x330ba: 0x6e1c7620, 0x330bb: 0x6e0d0e20, + 0x330bc: 0x6e0d1020, 0x330bd: 0x6e0d1220, 0x330be: 0x6e0d1420, 0x330bf: 0x6e0d1620, + // Block 0xcc3, offset 0x330c0 + 0x330c0: 0x6e0d1820, 0x330c1: 0x6e0d1a20, 0x330c2: 0x6e1c7820, 0x330c3: 0x6e1c7a20, + 0x330c4: 0x6e1c7c20, 0x330c5: 0x6e1c7e20, 0x330c6: 0x6e1c8020, 0x330c7: 0x6e1c8220, + 0x330c8: 0x6e1c8420, 0x330c9: 0x6e1c8620, 0x330ca: 0x6e289220, 0x330cb: 0x6e289420, + 0x330cc: 0x6e289620, 0x330cd: 0x6e289820, 0x330ce: 0x6e289a20, 0x330cf: 0x6e31c620, + 0x330d0: 0x6e31c820, 0x330d1: 0x6e31ca20, 0x330d2: 0x6e31cc20, 0x330d3: 0x6e31ce20, + 0x330d4: 0x6e31d020, 0x330d5: 0x6e31d220, 0x330d6: 0x6e3d1220, 0x330d7: 0x6e442620, + 0x330d8: 0x6e451820, 0x330d9: 0x6e46e220, 0x330da: 0x6e471e20, 0x330db: 0x6c07c620, + 0x330dc: 0x6c0f1020, 0x330dd: 0x6c1b7020, 0x330de: 0x6c1b7220, 0x330df: 0x6c2e7e20, + 0x330e0: 0x6c48ea20, 0x330e1: 0x6c48ec20, 0x330e2: 0x6c48ee20, 0x330e3: 0x6c6a7220, + 0x330e4: 0x6c6a7420, 0x330e5: 0x6c6a7620, 0x330e6: 0x6c6a7820, 0x330e7: 0x6c6a7a20, + 0x330e8: 0x6c6a7c20, 0x330e9: 0x6c6a7e20, 0x330ea: 0x6c916620, 0x330eb: 0x6c916820, + 0x330ec: 0x6c916a20, 0x330ed: 0x6c916c20, 0x330ee: 0x6cbd8e20, 0x330ef: 0x6cbd9020, + 0x330f0: 0x6cee5020, 0x330f1: 0x6cbdc220, 0x330f2: 0x6cee5220, 0x330f3: 0x6cee5420, + 0x330f4: 0x6cee5620, 0x330f5: 0x6cee5820, 0x330f6: 0x6d1df820, 0x330f7: 0x6d187e20, + 0x330f8: 0x6d1dfa20, 0x330f9: 0x6d1dfc20, 0x330fa: 0x6d1dfe20, 0x330fb: 0x6d1e0020, + 0x330fc: 0x6d4ba620, 0x330fd: 0x6d4ba820, 0x330fe: 0x6d790220, 0x330ff: 0x6d790420, + // Block 0xcc4, offset 0x33100 + 0x33100: 0x6d790620, 0x33101: 0x6da20020, 0x33102: 0x6da20220, 0x33103: 0x6da20420, + 0x33104: 0x6da20620, 0x33105: 0x6dc43020, 0x33106: 0x6dd50620, 0x33107: 0x6dc43220, + 0x33108: 0x6dc43420, 0x33109: 0x6dc43620, 0x3310a: 0x6dc43820, 0x3310b: 0x6de14420, + 0x3310c: 0x6de14620, 0x3310d: 0x6df95220, 0x3310e: 0x6dfe0820, 0x3310f: 0x6e1c8820, + 0x33110: 0x6e1c8a20, 0x33111: 0x6e1c8c20, 0x33112: 0x6c018a20, 0x33113: 0x6c07ca20, + 0x33114: 0x6c07cc20, 0x33115: 0x6c0f1420, 0x33116: 0x6c0f1620, 0x33117: 0x6c1b7620, + 0x33118: 0x6c1b7820, 0x33119: 0x6c1b7a20, 0x3311a: 0x6c6a8220, 0x3311b: 0x6c917020, + 0x3311c: 0x6c917220, 0x3311d: 0x6cee5c20, 0x3311e: 0x6c0f1820, 0x3311f: 0x6c0f1a20, + 0x33120: 0x6c1b7e20, 0x33121: 0x6c1b8020, 0x33122: 0x6c2e8420, 0x33123: 0x6c2e8620, + 0x33124: 0x6c2e8820, 0x33125: 0x6c2e8a20, 0x33126: 0x6c6a8a20, 0x33127: 0x6c917420, + 0x33128: 0x6c917620, 0x33129: 0x6c917820, 0x3312a: 0x6c917a20, 0x3312b: 0x6c917c20, + 0x3312c: 0x6c917e20, 0x3312d: 0x6cbd9620, 0x3312e: 0x6cee6020, 0x3312f: 0x6cee6220, + 0x33130: 0x6cee6420, 0x33131: 0x6cee6620, 0x33132: 0x6d1e0420, 0x33133: 0x6d1e0620, + 0x33134: 0x6d1e0820, 0x33135: 0x6d1e0a20, 0x33136: 0x6d4baa20, 0x33137: 0x6d4bac20, + 0x33138: 0x6d790820, 0x33139: 0x6d790a20, 0x3313a: 0x6d790c20, 0x3313b: 0x6da20820, + 0x3313c: 0x6dc43e20, 0x3313d: 0x6dc44020, 0x3313e: 0x6dc44220, 0x3313f: 0x6dc44420, + // Block 0xcc5, offset 0x33140 + 0x33140: 0x6de14a20, 0x33141: 0x6df95620, 0x33142: 0x6e289c20, 0x33143: 0x6e451a20, + 0x33144: 0x6c07d620, 0x33145: 0x6c07d820, 0x33146: 0x6c07da20, 0x33147: 0x6c0f2220, + 0x33148: 0x6c0f2420, 0x33149: 0x6c0f2620, 0x3314a: 0x6c1b8220, 0x3314b: 0x6c1b8420, + 0x3314c: 0x6c1b8620, 0x3314d: 0x6c2e9220, 0x3314e: 0x6c2e9420, 0x3314f: 0x6c2e9620, + 0x33150: 0x6c48fc20, 0x33151: 0x6c48fe20, 0x33152: 0x6c6a9020, 0x33153: 0x6c6a9220, + 0x33154: 0x6c6a9420, 0x33155: 0x6c6a9620, 0x33156: 0x6c6a9820, 0x33157: 0x6c6a9a20, + 0x33158: 0x6c6a9c20, 0x33159: 0x6c6a9e20, 0x3315a: 0x6c6aa020, 0x3315b: 0x6c6aa220, + 0x3315c: 0x6c6aa420, 0x3315d: 0x6c918420, 0x3315e: 0x6c918620, 0x3315f: 0x6c918820, + 0x33160: 0x6c918a20, 0x33161: 0x6c918c20, 0x33162: 0x6c918e20, 0x33163: 0x6c919020, + 0x33164: 0x6c919220, 0x33165: 0x6c919420, 0x33166: 0x6cbda020, 0x33167: 0x6cbda220, + 0x33168: 0x6cbda420, 0x33169: 0x6cbda620, 0x3316a: 0x6cbda820, 0x3316b: 0x6cbdaa20, + 0x3316c: 0x6cbdac20, 0x3316d: 0x6cbdae20, 0x3316e: 0x6cbdb020, 0x3316f: 0x6cee6a20, + 0x33170: 0x6cbdb220, 0x33171: 0x6cee6c20, 0x33172: 0x6cee6e20, 0x33173: 0x6cee7020, + 0x33174: 0x6cee7220, 0x33175: 0x6cee7420, 0x33176: 0x6d1e1820, 0x33177: 0x6d1e1a20, + 0x33178: 0x6d1e1c20, 0x33179: 0x6d1e1e20, 0x3317a: 0x6d1e2020, 0x3317b: 0x6d1e2220, + 0x3317c: 0x6d1e2420, 0x3317d: 0x6d1e2620, 0x3317e: 0x6d1e2820, 0x3317f: 0x6d4bb020, + // Block 0xcc6, offset 0x33180 + 0x33180: 0x6d4bb220, 0x33181: 0x6d4bb420, 0x33182: 0x6d791220, 0x33183: 0x6d791420, + 0x33184: 0x6d791620, 0x33185: 0x6d791820, 0x33186: 0x6da20c20, 0x33187: 0x6da20e20, + 0x33188: 0x6da21020, 0x33189: 0x6dc44820, 0x3318a: 0x6dc44a20, 0x3318b: 0x6de14c20, + 0x3318c: 0x6de14e20, 0x3318d: 0x6e0d2020, 0x3318e: 0x6e0d2220, 0x3318f: 0x6e3d1420, + 0x33190: 0x6de15020, 0x33191: 0x6e45be20, 0x33192: 0x6c03e820, 0x33193: 0x6c03ea20, + 0x33194: 0x6c03ec20, 0x33195: 0x6c07ec20, 0x33196: 0x6c07ee20, 0x33197: 0x6c07f020, + 0x33198: 0x6c07f220, 0x33199: 0x6c07f420, 0x3319a: 0x6c07f620, 0x3319b: 0x6c07f820, + 0x3319c: 0x6c04f620, 0x3319d: 0x6c0f4420, 0x3319e: 0x6c0f4620, 0x3319f: 0x6c0f4820, + 0x331a0: 0x6c0f4a20, 0x331a1: 0x6c0f4c20, 0x331a2: 0x6c0f4e20, 0x331a3: 0x6c0f5020, + 0x331a4: 0x6c0f5220, 0x331a5: 0x6c1b9a20, 0x331a6: 0x6c1b9c20, 0x331a7: 0x6c1b9e20, + 0x331a8: 0x6c1ba020, 0x331a9: 0x6c1ba220, 0x331aa: 0x6c1ba420, 0x331ab: 0x6c1ba620, + 0x331ac: 0x6c1ba820, 0x331ad: 0x6c1baa20, 0x331ae: 0x6c1bac20, 0x331af: 0x6c1bae20, + 0x331b0: 0x6c1bb020, 0x331b1: 0x6c1bb220, 0x331b2: 0x6c1bb420, 0x331b3: 0x6c1bb620, + 0x331b4: 0x6c1bb820, 0x331b5: 0x6c1bba20, 0x331b6: 0x6c1bbc20, 0x331b7: 0x6c2eba20, + 0x331b8: 0x6c2ebc20, 0x331b9: 0x6c2ebe20, 0x331ba: 0x6c2ec020, 0x331bb: 0x6c2ec220, + 0x331bc: 0x6c2ec420, 0x331bd: 0x6c2ec620, 0x331be: 0x6c2ec820, 0x331bf: 0x6c2eca20, + // Block 0xcc7, offset 0x331c0 + 0x331c0: 0x6c2ecc20, 0x331c1: 0x6c2ece20, 0x331c2: 0x6c2ed020, 0x331c3: 0x6c2ed220, + 0x331c4: 0x6c2ed420, 0x331c5: 0x6c2ed620, 0x331c6: 0x6c2ed820, 0x331c7: 0x6c2eda20, + 0x331c8: 0x6c2edc20, 0x331c9: 0x6c2ede20, 0x331ca: 0x6c2ee020, 0x331cb: 0x6c2ee220, + 0x331cc: 0x6c2ee420, 0x331cd: 0x6c491620, 0x331ce: 0x6c491820, 0x331cf: 0x6c491a20, + 0x331d0: 0x6c491c20, 0x331d1: 0x6c491e20, 0x331d2: 0x6c492020, 0x331d3: 0x6c492220, + 0x331d4: 0x6c492420, 0x331d5: 0x6c492620, 0x331d6: 0x6c492820, 0x331d7: 0x6c492a20, + 0x331d8: 0x6c492c20, 0x331d9: 0x6c492e20, 0x331da: 0x6c493020, 0x331db: 0x6c493220, + 0x331dc: 0x6c493420, 0x331dd: 0x6c6ab420, 0x331de: 0x6c6ab620, 0x331df: 0x6c6ab820, + 0x331e0: 0x6c6aba20, 0x331e1: 0x6c6abc20, 0x331e2: 0x6c6abe20, 0x331e3: 0x6c6ac020, + 0x331e4: 0x6c6ac220, 0x331e5: 0x6c6ac420, 0x331e6: 0x6c6ac620, 0x331e7: 0x6c6ac820, + 0x331e8: 0x6c6aca20, 0x331e9: 0x6c6acc20, 0x331ea: 0x6c6ace20, 0x331eb: 0x6c6ad020, + 0x331ec: 0x6c6ad220, 0x331ed: 0x6c6ad420, 0x331ee: 0x6c6ad620, 0x331ef: 0x6c6ad820, + 0x331f0: 0x6c6ada20, 0x331f1: 0x6c6adc20, 0x331f2: 0x6c6ade20, 0x331f3: 0x6c6ae020, + 0x331f4: 0x6c91a620, 0x331f5: 0x6c91a820, 0x331f6: 0x6c91aa20, 0x331f7: 0x6c91ac20, + 0x331f8: 0x6c91ae20, 0x331f9: 0x6c91b020, 0x331fa: 0x6c91b220, 0x331fb: 0x6c91b420, + 0x331fc: 0x6c91b620, 0x331fd: 0x6c91b820, 0x331fe: 0x6c91ba20, 0x331ff: 0x6c91bc20, + // Block 0xcc8, offset 0x33200 + 0x33200: 0x6c91be20, 0x33201: 0x6c91c020, 0x33202: 0x6c91c220, 0x33203: 0x6c91c420, + 0x33204: 0x6c91c620, 0x33205: 0x6c91c820, 0x33206: 0x6c91ca20, 0x33207: 0x6cbdc420, + 0x33208: 0x6cbdc620, 0x33209: 0x6cbdc820, 0x3320a: 0x6cbdca20, 0x3320b: 0x6cbdcc20, + 0x3320c: 0x6cbdce20, 0x3320d: 0x6cbdd020, 0x3320e: 0x6cbdd220, 0x3320f: 0x6cbdd420, + 0x33210: 0x6cbdd620, 0x33211: 0x6cbdd820, 0x33212: 0x6cbdda20, 0x33213: 0x6cbddc20, + 0x33214: 0x6cbdde20, 0x33215: 0x6cbde020, 0x33216: 0x6cbde220, 0x33217: 0x6cbde420, + 0x33218: 0x6cbde620, 0x33219: 0x6cbde820, 0x3321a: 0x6cbdea20, 0x3321b: 0x6cee7e20, + 0x3321c: 0x6cee8020, 0x3321d: 0x6cee8220, 0x3321e: 0x6cee8420, 0x3321f: 0x6cee8620, + 0x33220: 0x6cee8820, 0x33221: 0x6cee8a20, 0x33222: 0x6cee8c20, 0x33223: 0x6cee8e20, + 0x33224: 0x6cee9020, 0x33225: 0x6cee9220, 0x33226: 0x6cee9420, 0x33227: 0x6cee9620, + 0x33228: 0x6cee9820, 0x33229: 0x6cee9a20, 0x3322a: 0x6cee9c20, 0x3322b: 0x6cee9e20, + 0x3322c: 0x6d1e3620, 0x3322d: 0x6d1e3820, 0x3322e: 0x6d1e3a20, 0x3322f: 0x6d1e3c20, + 0x33230: 0x6d1e3e20, 0x33231: 0x6d1e4020, 0x33232: 0x6d1e4220, 0x33233: 0x6d1e4420, + 0x33234: 0x6d1e4620, 0x33235: 0x6d1e4820, 0x33236: 0x6d1e4a20, 0x33237: 0x6d4bba20, + 0x33238: 0x6d4bbc20, 0x33239: 0x6d4bbe20, 0x3323a: 0x6d4bc020, 0x3323b: 0x6d4bc220, + 0x3323c: 0x6d4bc420, 0x3323d: 0x6d4bc620, 0x3323e: 0x6d4bc820, 0x3323f: 0x6d4bca20, + // Block 0xcc9, offset 0x33240 + 0x33240: 0x6d4bcc20, 0x33241: 0x6d4bce20, 0x33242: 0x6d4bd020, 0x33243: 0x6d4bd220, + 0x33244: 0x6d4bd420, 0x33245: 0x6d4bd620, 0x33246: 0x6d792220, 0x33247: 0x6d792420, + 0x33248: 0x6d792620, 0x33249: 0x6d792820, 0x3324a: 0x6d792a20, 0x3324b: 0x6d792c20, + 0x3324c: 0x6d792e20, 0x3324d: 0x6d793020, 0x3324e: 0x6d793220, 0x3324f: 0x6da21220, + 0x33250: 0x6da21420, 0x33251: 0x6da21620, 0x33252: 0x6da21820, 0x33253: 0x6da21a20, + 0x33254: 0x6da21c20, 0x33255: 0x6da21e20, 0x33256: 0x6da22020, 0x33257: 0x6dc44e20, + 0x33258: 0x6de15220, 0x33259: 0x6de15420, 0x3325a: 0x6de15620, 0x3325b: 0x6df95820, + 0x3325c: 0x6e0d2420, 0x3325d: 0x6e0d2620, 0x3325e: 0x6e1c9420, 0x3325f: 0x6e1c9620, + 0x33260: 0x6e289e20, 0x33261: 0x6e28a020, 0x33262: 0x6e28a220, 0x33263: 0x6e31d420, + 0x33264: 0x6e31d620, 0x33265: 0x6e401220, 0x33266: 0x6c03f020, 0x33267: 0x6c080420, + 0x33268: 0x6c080620, 0x33269: 0x6c080820, 0x3326a: 0x6c080a20, 0x3326b: 0x6c080c20, + 0x3326c: 0x6c080e20, 0x3326d: 0x6c081020, 0x3326e: 0x6c0f8620, 0x3326f: 0x6c0f8820, + 0x33270: 0x6c0f8a20, 0x33271: 0x6c0f8c20, 0x33272: 0x6c0f8e20, 0x33273: 0x6c0f9020, + 0x33274: 0x6c0f9220, 0x33275: 0x6c0f9420, 0x33276: 0x6c0f9620, 0x33277: 0x6c0f9820, + 0x33278: 0x6c0f9a20, 0x33279: 0x6c0f9c20, 0x3327a: 0x6c0f9e20, 0x3327b: 0x6c0fa020, + 0x3327c: 0x6c1c1820, 0x3327d: 0x6c1c1a20, 0x3327e: 0x6c1c1c20, 0x3327f: 0x6c1c1e20, + // Block 0xcca, offset 0x33280 + 0x33280: 0x6c1c2020, 0x33281: 0x6c1c2220, 0x33282: 0x6c1c2420, 0x33283: 0x6c1c2620, + 0x33284: 0x6c1c2820, 0x33285: 0x6c1c2a20, 0x33286: 0x6c1c2c20, 0x33287: 0x6c1c2e20, + 0x33288: 0x6c1c3020, 0x33289: 0x6c1c3220, 0x3328a: 0x6c1c3420, 0x3328b: 0x6c1c3620, + 0x3328c: 0x6c1c3820, 0x3328d: 0x6c1c3a20, 0x3328e: 0x6c1c3c20, 0x3328f: 0x6c1c3e20, + 0x33290: 0x6c1c4020, 0x33291: 0x6c1c4220, 0x33292: 0x6c1c4420, 0x33293: 0x6c1c4620, + 0x33294: 0x6c1c4820, 0x33295: 0x6c1c4a20, 0x33296: 0x6c1c4c20, 0x33297: 0x6c1c4e20, + 0x33298: 0x6c1c5020, 0x33299: 0x6c2f6e20, 0x3329a: 0x6c2f7020, 0x3329b: 0x6c2f7220, + 0x3329c: 0x6c2f7420, 0x3329d: 0x6c2f7620, 0x3329e: 0x6c2f7820, 0x3329f: 0x6c2f7a20, + 0x332a0: 0x6c2f7c20, 0x332a1: 0x6c2f7e20, 0x332a2: 0x6c2f8020, 0x332a3: 0x6c2f8220, + 0x332a4: 0x6c2f8420, 0x332a5: 0x6c2f8620, 0x332a6: 0x6c2f8820, 0x332a7: 0x6c2f8a20, + 0x332a8: 0x6c2f8c20, 0x332a9: 0x6c2f8e20, 0x332aa: 0x6c2f9020, 0x332ab: 0x6c2f9220, + 0x332ac: 0x6c2f9420, 0x332ad: 0x6c2f9620, 0x332ae: 0x6c2f9820, 0x332af: 0x6c2f9a20, + 0x332b0: 0x6c2f9c20, 0x332b1: 0x6c2f9e20, 0x332b2: 0x6c2fa020, 0x332b3: 0x6c2fa220, + 0x332b4: 0x6c2fa420, 0x332b5: 0x6c2fa620, 0x332b6: 0x6c2fa820, 0x332b7: 0x6c2faa20, + 0x332b8: 0x6c2fac20, 0x332b9: 0x6c2fae20, 0x332ba: 0x6c2fb020, 0x332bb: 0x6c2fb220, + 0x332bc: 0x6c2fb420, 0x332bd: 0x6c2fb620, 0x332be: 0x6c2fb820, 0x332bf: 0x6c2fba20, + // Block 0xccb, offset 0x332c0 + 0x332c0: 0x6c2fbc20, 0x332c1: 0x6c2fbe20, 0x332c2: 0x6c49b420, 0x332c3: 0x6c49b620, + 0x332c4: 0x6c49b820, 0x332c5: 0x6c49ba20, 0x332c6: 0x6c49bc20, 0x332c7: 0x6c49be20, + 0x332c8: 0x6c49c020, 0x332c9: 0x6c49c220, 0x332ca: 0x6c49c420, 0x332cb: 0x6c49c620, + 0x332cc: 0x6c49c820, 0x332cd: 0x6c49ca20, 0x332ce: 0x6c49cc20, 0x332cf: 0x6c49ce20, + 0x332d0: 0x6c49d020, 0x332d1: 0x6c49d220, 0x332d2: 0x6c49d420, 0x332d3: 0x6c49d620, + 0x332d4: 0x6c49d820, 0x332d5: 0x6c49da20, 0x332d6: 0x6c49dc20, 0x332d7: 0x6c49de20, + 0x332d8: 0x6c49e020, 0x332d9: 0x6c49e220, 0x332da: 0x6c49e420, 0x332db: 0x6c49e620, + 0x332dc: 0x6c49e820, 0x332dd: 0x6c49ea20, 0x332de: 0x6c49ec20, 0x332df: 0x6c49ee20, + 0x332e0: 0x6c49f020, 0x332e1: 0x6c49f220, 0x332e2: 0x6c49f420, 0x332e3: 0x6c49f620, + 0x332e4: 0x6c49f820, 0x332e5: 0x6c49fa20, 0x332e6: 0x6c49fc20, 0x332e7: 0x6c49fe20, + 0x332e8: 0x6c4a0020, 0x332e9: 0x6c4a0220, 0x332ea: 0x6c4a0420, 0x332eb: 0x6c4a0620, + 0x332ec: 0x6c4a0820, 0x332ed: 0x6c4a0a20, 0x332ee: 0x6c6b6c20, 0x332ef: 0x6c6b6e20, + 0x332f0: 0x6c6b7020, 0x332f1: 0x6c6b7220, 0x332f2: 0x6c6b7420, 0x332f3: 0x6c6b7620, + 0x332f4: 0x6c6b7820, 0x332f5: 0x6c6b7a20, 0x332f6: 0x6c6b7c20, 0x332f7: 0x6c6b7e20, + 0x332f8: 0x6c6b8020, 0x332f9: 0x6c6b8220, 0x332fa: 0x6c6b8420, 0x332fb: 0x6c6b8620, + 0x332fc: 0x6c6b8820, 0x332fd: 0x6c6b8a20, 0x332fe: 0x6c6b8c20, 0x332ff: 0x6c6b8e20, + // Block 0xccc, offset 0x33300 + 0x33300: 0x6c6b9020, 0x33301: 0x6c6b9220, 0x33302: 0x6c6b9420, 0x33303: 0x6c6b9620, + 0x33304: 0x6c6b9820, 0x33305: 0x6c6b9a20, 0x33306: 0x6c6b9c20, 0x33307: 0x6c6b9e20, + 0x33308: 0x6c6ba020, 0x33309: 0x6c6ba220, 0x3330a: 0x6c6ba420, 0x3330b: 0x6c6ba620, + 0x3330c: 0x6c6ba820, 0x3330d: 0x6c6baa20, 0x3330e: 0x6c6bac20, 0x3330f: 0x6c6bae20, + 0x33310: 0x6c6bb020, 0x33311: 0x6c6bb220, 0x33312: 0x6c6bb420, 0x33313: 0x6c6bb620, + 0x33314: 0x6c6bb820, 0x33315: 0x6c6bba20, 0x33316: 0x6c6bbc20, 0x33317: 0x6c6bbe20, + 0x33318: 0x6c6bc020, 0x33319: 0x6c6bc220, 0x3331a: 0x6c6bc420, 0x3331b: 0x6c6bc620, + 0x3331c: 0x6c6bc820, 0x3331d: 0x6c6bca20, 0x3331e: 0x6c927020, 0x3331f: 0x6c927220, + 0x33320: 0x6c927420, 0x33321: 0x6c927620, 0x33322: 0x6c927820, 0x33323: 0x6c927a20, + 0x33324: 0x6c927c20, 0x33325: 0x6c927e20, 0x33326: 0x6c928020, 0x33327: 0x6c928220, + 0x33328: 0x6c928420, 0x33329: 0x6c928620, 0x3332a: 0x6c928820, 0x3332b: 0x6c928a20, + 0x3332c: 0x6c928c20, 0x3332d: 0x6c928e20, 0x3332e: 0x6c929020, 0x3332f: 0x6c929220, + 0x33330: 0x6c929420, 0x33331: 0x6c929620, 0x33332: 0x6c929820, 0x33333: 0x6c929a20, + 0x33334: 0x6c929c20, 0x33335: 0x6c929e20, 0x33336: 0x6c92a020, 0x33337: 0x6c92a220, + 0x33338: 0x6c92a420, 0x33339: 0x6c92a620, 0x3333a: 0x6c92a820, 0x3333b: 0x6c92aa20, + 0x3333c: 0x6c92ac20, 0x3333d: 0x6c92ae20, 0x3333e: 0x6c92b020, 0x3333f: 0x6c92b220, + // Block 0xccd, offset 0x33340 + 0x33340: 0x6c92b420, 0x33341: 0x6c92b620, 0x33342: 0x6c92b820, 0x33343: 0x6c92ba20, + 0x33344: 0x6c92bc20, 0x33345: 0x6c92be20, 0x33346: 0x6c92c020, 0x33347: 0x6c92c220, + 0x33348: 0x6c92c420, 0x33349: 0x6c92c620, 0x3334a: 0x6c92c820, 0x3334b: 0x6c92ca20, + 0x3334c: 0x6c92cc20, 0x3334d: 0x6c92ce20, 0x3334e: 0x6c92d020, 0x3334f: 0x6c92d220, + 0x33350: 0x6c92d420, 0x33351: 0x6c92d620, 0x33352: 0x6c92d820, 0x33353: 0x6c92da20, + 0x33354: 0x6c92dc20, 0x33355: 0x6c92de20, 0x33356: 0x6c92e020, 0x33357: 0x6c92e220, + 0x33358: 0x6c92e420, 0x33359: 0x6c92e620, 0x3335a: 0x6c92e820, 0x3335b: 0x6c92ea20, + 0x3335c: 0x6cbe9020, 0x3335d: 0x6cbe9220, 0x3335e: 0x6cbe9420, 0x3335f: 0x6cbe9620, + 0x33360: 0x6cbe9820, 0x33361: 0x6cbe9a20, 0x33362: 0x6cbe9c20, 0x33363: 0x6cbe9e20, + 0x33364: 0x6cbea020, 0x33365: 0x6cbea220, 0x33366: 0x6cbea420, 0x33367: 0x6cbea620, + 0x33368: 0x6cbea820, 0x33369: 0x6cbeaa20, 0x3336a: 0x6cbeac20, 0x3336b: 0x6cbeae20, + 0x3336c: 0x6cbeb020, 0x3336d: 0x6cbeb220, 0x3336e: 0x6cbeb420, 0x3336f: 0x6cbeb620, + 0x33370: 0x6cbeb820, 0x33371: 0x6cbeba20, 0x33372: 0x6cbebc20, 0x33373: 0x6cbebe20, + 0x33374: 0x6cbec020, 0x33375: 0x6cbec220, 0x33376: 0x6cbec420, 0x33377: 0x6cbec620, + 0x33378: 0x6cbec820, 0x33379: 0x6cbeca20, 0x3337a: 0x6cbecc20, 0x3337b: 0x6cbece20, + 0x3337c: 0x6cbed020, 0x3337d: 0x6cbed220, 0x3337e: 0x6cbed420, 0x3337f: 0x6cbed620, + // Block 0xcce, offset 0x33380 + 0x33380: 0x6cbed820, 0x33381: 0x6cbeda20, 0x33382: 0x6cbedc20, 0x33383: 0x6cbede20, + 0x33384: 0x6cbee020, 0x33385: 0x6cbee220, 0x33386: 0x6cbee420, 0x33387: 0x6cbee620, + 0x33388: 0x6cbee820, 0x33389: 0x6cbeea20, 0x3338a: 0x6cbeec20, 0x3338b: 0x6cbeee20, + 0x3338c: 0x6cbef020, 0x3338d: 0x6cbef220, 0x3338e: 0x6cbef420, 0x3338f: 0x6cbef620, + 0x33390: 0x6cbef820, 0x33391: 0x6cbefa20, 0x33392: 0x6cbefc20, 0x33393: 0x6cbefe20, + 0x33394: 0x6cbf0020, 0x33395: 0x6cbf0220, 0x33396: 0x6cbf0420, 0x33397: 0x6cbf0620, + 0x33398: 0x6cbf0820, 0x33399: 0x6cbf0a20, 0x3339a: 0x6cbf0c20, 0x3339b: 0x6cbf0e20, + 0x3339c: 0x6cbf1020, 0x3339d: 0x6cbf1220, 0x3339e: 0x6cbf1420, 0x3339f: 0x6cbf1620, + 0x333a0: 0x6cbf1820, 0x333a1: 0x6cbf1a20, 0x333a2: 0x6cbf1c20, 0x333a3: 0x6cbf1e20, + 0x333a4: 0x6cbf2020, 0x333a5: 0x6cbf2220, 0x333a6: 0x6cbf2420, 0x333a7: 0x6cbf2620, + 0x333a8: 0x6cef1020, 0x333a9: 0x6cef1220, 0x333aa: 0x6cef1420, 0x333ab: 0x6cef1620, + 0x333ac: 0x6cef1820, 0x333ad: 0x6cef1a20, 0x333ae: 0x6cef1c20, 0x333af: 0x6cef1e20, + 0x333b0: 0x6cef2020, 0x333b1: 0x6cef2220, 0x333b2: 0x6cef2420, 0x333b3: 0x6cef2620, + 0x333b4: 0x6cef2820, 0x333b5: 0x6cef2a20, 0x333b6: 0x6cef2c20, 0x333b7: 0x6cef2e20, + 0x333b8: 0x6cef3020, 0x333b9: 0x6cef3220, 0x333ba: 0x6cef3420, 0x333bb: 0x6cef3620, + 0x333bc: 0x6cef3820, 0x333bd: 0x6cef3a20, 0x333be: 0x6cef3c20, 0x333bf: 0x6cef3e20, + // Block 0xccf, offset 0x333c0 + 0x333c0: 0x6cef4020, 0x333c1: 0x6cef4220, 0x333c2: 0x6cef4420, 0x333c3: 0x6cef4620, + 0x333c4: 0x6cef4820, 0x333c5: 0x6cef4a20, 0x333c6: 0x6cef4c20, 0x333c7: 0x6cef4e20, + 0x333c8: 0x6cef5020, 0x333c9: 0x6cef5220, 0x333ca: 0x6cef5420, 0x333cb: 0x6cef5620, + 0x333cc: 0x6cef5820, 0x333cd: 0x6cef5a20, 0x333ce: 0x6cef5c20, 0x333cf: 0x6cef5e20, + 0x333d0: 0x6cef6020, 0x333d1: 0x6cef6220, 0x333d2: 0x6cef6420, 0x333d3: 0x6cef6620, + 0x333d4: 0x6cef6820, 0x333d5: 0x6cef6a20, 0x333d6: 0x6d4c2220, 0x333d7: 0x6d1eaa20, + 0x333d8: 0x6d4c2420, 0x333d9: 0x6d1eac20, 0x333da: 0x6d1eae20, 0x333db: 0x6d1eb020, + 0x333dc: 0x6d1eb220, 0x333dd: 0x6d1eb420, 0x333de: 0x6d1eb620, 0x333df: 0x6d1eb820, + 0x333e0: 0x6d1eba20, 0x333e1: 0x6d1ebc20, 0x333e2: 0x6d1ebe20, 0x333e3: 0x6cbf2820, + 0x333e4: 0x6d1ec020, 0x333e5: 0x6d1ec220, 0x333e6: 0x6d1ec420, 0x333e7: 0x6d1ec620, + 0x333e8: 0x6d1ec820, 0x333e9: 0x6d1eca20, 0x333ea: 0x6d1ecc20, 0x333eb: 0x6d1ece20, + 0x333ec: 0x6d1ed020, 0x333ed: 0x6d1ed220, 0x333ee: 0x6d1ed420, 0x333ef: 0x6d1ed620, + 0x333f0: 0x6d1ed820, 0x333f1: 0x6d1eda20, 0x333f2: 0x6d4c2620, 0x333f3: 0x6d1edc20, + 0x333f4: 0x6d1ede20, 0x333f5: 0x6d1ee020, 0x333f6: 0x6d1ee220, 0x333f7: 0x6d1ee420, + 0x333f8: 0x6d1ee620, 0x333f9: 0x6d1ee820, 0x333fa: 0x6d1eea20, 0x333fb: 0x6d1eec20, + 0x333fc: 0x6d1eee20, 0x333fd: 0x6d1ef020, 0x333fe: 0x6d1ef220, 0x333ff: 0x6d1ef420, + // Block 0xcd0, offset 0x33400 + 0x33400: 0x6d1ef620, 0x33401: 0x6d1ef820, 0x33402: 0x6d1efa20, 0x33403: 0x6d1efc20, + 0x33404: 0x6d1efe20, 0x33405: 0x6d1f0020, 0x33406: 0x6d1f0220, 0x33407: 0x6d1f0420, + 0x33408: 0x6d1f0620, 0x33409: 0x6d1f0820, 0x3340a: 0x6d1f0a20, 0x3340b: 0x6d1f0c20, + 0x3340c: 0x6d1f0e20, 0x3340d: 0x6d1f1020, 0x3340e: 0x6d1f1220, 0x3340f: 0x6d4c2820, + 0x33410: 0x6d4c2a20, 0x33411: 0x6d4c2c20, 0x33412: 0x6d4c2e20, 0x33413: 0x6d4c3020, + 0x33414: 0x6d4c3220, 0x33415: 0x6d4c3420, 0x33416: 0x6d4c3620, 0x33417: 0x6d4c3820, + 0x33418: 0x6d4c3a20, 0x33419: 0x6d4c3c20, 0x3341a: 0x6d4c3e20, 0x3341b: 0x6d4c4020, + 0x3341c: 0x6d4c4220, 0x3341d: 0x6d4c4420, 0x3341e: 0x6d4c4620, 0x3341f: 0x6d4c4820, + 0x33420: 0x6d4c4a20, 0x33421: 0x6d4c4c20, 0x33422: 0x6d4c4e20, 0x33423: 0x6d4c5020, + 0x33424: 0x6d4c5220, 0x33425: 0x6d4c5420, 0x33426: 0x6d4c5620, 0x33427: 0x6d4c5820, + 0x33428: 0x6d4c5a20, 0x33429: 0x6d4c5c20, 0x3342a: 0x6d4c5e20, 0x3342b: 0x6d4c6020, + 0x3342c: 0x6d4c6220, 0x3342d: 0x6d4c6420, 0x3342e: 0x6d4c6620, 0x3342f: 0x6d4c6820, + 0x33430: 0x6d4c6a20, 0x33431: 0x6d4c6c20, 0x33432: 0x6d4c6e20, 0x33433: 0x6d4c7020, + 0x33434: 0x6d4c7220, 0x33435: 0x6d4c7420, 0x33436: 0x6d4c7620, 0x33437: 0x6d4c7820, + 0x33438: 0x6d4c7a20, 0x33439: 0x6d4c7c20, 0x3343a: 0x6d4c7e20, 0x3343b: 0x6d4c8020, + 0x3343c: 0x6d4c8220, 0x3343d: 0x6d4c8420, 0x3343e: 0x6d4c8620, 0x3343f: 0x6d4c8820, + // Block 0xcd1, offset 0x33440 + 0x33440: 0x6d4c8a20, 0x33441: 0x6d4c8c20, 0x33442: 0x6d4c8e20, 0x33443: 0x6d4c9020, + 0x33444: 0x6d4c9220, 0x33445: 0x6d4c9420, 0x33446: 0x6d4c9620, 0x33447: 0x6d4c9820, + 0x33448: 0x6d4c9a20, 0x33449: 0x6d4c9c20, 0x3344a: 0x6d4c9e20, 0x3344b: 0x6d4ca020, + 0x3344c: 0x6d4ca220, 0x3344d: 0x6d4ca420, 0x3344e: 0x6d796a20, 0x3344f: 0x6d601620, + 0x33450: 0x6d4ca620, 0x33451: 0x6d796c20, 0x33452: 0x6d796e20, 0x33453: 0x6d797020, + 0x33454: 0x6d797220, 0x33455: 0x6d797420, 0x33456: 0x6d797620, 0x33457: 0x6d797820, + 0x33458: 0x6d797a20, 0x33459: 0x6d797c20, 0x3345a: 0x6d797e20, 0x3345b: 0x6d798020, + 0x3345c: 0x6d798220, 0x3345d: 0x6d798420, 0x3345e: 0x6d798620, 0x3345f: 0x6d798820, + 0x33460: 0x6d798a20, 0x33461: 0x6d798c20, 0x33462: 0x6d798e20, 0x33463: 0x6d799020, + 0x33464: 0x6d799220, 0x33465: 0x6d799420, 0x33466: 0x6d799620, 0x33467: 0x6d799820, + 0x33468: 0x6d799a20, 0x33469: 0x6d799c20, 0x3346a: 0x6d799e20, 0x3346b: 0x6d79a020, + 0x3346c: 0x6d79a220, 0x3346d: 0x6d79a420, 0x3346e: 0x6d79a620, 0x3346f: 0x6d79a820, + 0x33470: 0x6d79aa20, 0x33471: 0x6d79ac20, 0x33472: 0x6d79ae20, 0x33473: 0x6d79b020, + 0x33474: 0x6d79b220, 0x33475: 0x6d79b420, 0x33476: 0x6d79b620, 0x33477: 0x6d79b820, + 0x33478: 0x6d79ba20, 0x33479: 0x6d79bc20, 0x3347a: 0x6d79be20, 0x3347b: 0x6d79c020, + 0x3347c: 0x6d79c220, 0x3347d: 0x6d79c420, 0x3347e: 0x6d79c620, 0x3347f: 0x6d79c820, + // Block 0xcd2, offset 0x33480 + 0x33480: 0x6d79ca20, 0x33481: 0x6d79cc20, 0x33482: 0x6d79ce20, 0x33483: 0x6d79d020, + 0x33484: 0x6d79d220, 0x33485: 0x6da24c20, 0x33486: 0x6da24e20, 0x33487: 0x6da25020, + 0x33488: 0x6da25220, 0x33489: 0x6da25420, 0x3348a: 0x6da25620, 0x3348b: 0x6da25820, + 0x3348c: 0x6da25a20, 0x3348d: 0x6da25c20, 0x3348e: 0x6da25e20, 0x3348f: 0x6da26020, + 0x33490: 0x6da26220, 0x33491: 0x6da26420, 0x33492: 0x6da26620, 0x33493: 0x6da26820, + 0x33494: 0x6da26a20, 0x33495: 0x6da26c20, 0x33496: 0x6da26e20, 0x33497: 0x6da27020, + 0x33498: 0x6da27220, 0x33499: 0x6da27420, 0x3349a: 0x6da27620, 0x3349b: 0x6da27820, + 0x3349c: 0x6da27a20, 0x3349d: 0x6da27c20, 0x3349e: 0x6da27e20, 0x3349f: 0x6da28020, + 0x334a0: 0x6da28220, 0x334a1: 0x6da28420, 0x334a2: 0x6db99820, 0x334a3: 0x6da28620, + 0x334a4: 0x6da28820, 0x334a5: 0x6da28a20, 0x334a6: 0x6da28c20, 0x334a7: 0x6da28e20, + 0x334a8: 0x6da29020, 0x334a9: 0x6da29220, 0x334aa: 0x6dc46020, 0x334ab: 0x6dc46220, + 0x334ac: 0x6dc46420, 0x334ad: 0x6dc46620, 0x334ae: 0x6dc46820, 0x334af: 0x6dc46a20, + 0x334b0: 0x6dc46c20, 0x334b1: 0x6dc46e20, 0x334b2: 0x6dc47020, 0x334b3: 0x6dc47220, + 0x334b4: 0x6dc47420, 0x334b5: 0x6dc47620, 0x334b6: 0x6dc47820, 0x334b7: 0x6dc47a20, + 0x334b8: 0x6dc47c20, 0x334b9: 0x6dc47e20, 0x334ba: 0x6dc48020, 0x334bb: 0x6dc48220, + 0x334bc: 0x6dc48420, 0x334bd: 0x6de16820, 0x334be: 0x6de16a20, 0x334bf: 0x6de16c20, + // Block 0xcd3, offset 0x334c0 + 0x334c0: 0x6de16e20, 0x334c1: 0x6de17020, 0x334c2: 0x6de17220, 0x334c3: 0x6de17420, + 0x334c4: 0x6de17620, 0x334c5: 0x6de17820, 0x334c6: 0x6de17a20, 0x334c7: 0x6de17c20, + 0x334c8: 0x6de17e20, 0x334c9: 0x6de18020, 0x334ca: 0x6de18220, 0x334cb: 0x6de18420, + 0x334cc: 0x6de18620, 0x334cd: 0x6de18820, 0x334ce: 0x6df97020, 0x334cf: 0x6df97220, + 0x334d0: 0x6df97420, 0x334d1: 0x6df97620, 0x334d2: 0x6df97820, 0x334d3: 0x6df97a20, + 0x334d4: 0x6df97c20, 0x334d5: 0x6df97e20, 0x334d6: 0x6df98020, 0x334d7: 0x6df98220, + 0x334d8: 0x6e0d3020, 0x334d9: 0x6e0d3220, 0x334da: 0x6e0d3420, 0x334db: 0x6e0d3620, + 0x334dc: 0x6e0d3820, 0x334dd: 0x6e0d3a20, 0x334de: 0x6de18a20, 0x334df: 0x6e0d3c20, + 0x334e0: 0x6e0d3e20, 0x334e1: 0x6e1ca020, 0x334e2: 0x6e1ca220, 0x334e3: 0x6e1ca420, + 0x334e4: 0x6e1ca620, 0x334e5: 0x6e1ca820, 0x334e6: 0x6e1caa20, 0x334e7: 0x6e1cac20, + 0x334e8: 0x6e1cae20, 0x334e9: 0x6e1cb020, 0x334ea: 0x6e1cb220, 0x334eb: 0x6e28a820, + 0x334ec: 0x6e28aa20, 0x334ed: 0x6e28ac20, 0x334ee: 0x6e31dc20, 0x334ef: 0x6e31de20, + 0x334f0: 0x6e31e020, 0x334f1: 0x6e31e220, 0x334f2: 0x6e31e420, 0x334f3: 0x6e31e620, + 0x334f4: 0x6e386220, 0x334f5: 0x6e386420, 0x334f6: 0x6e386620, 0x334f7: 0x6e401420, + 0x334f8: 0x6e401620, 0x334f9: 0x6e401820, 0x334fa: 0x6e401a20, 0x334fb: 0x6e467e20, + 0x334fc: 0x6c019e20, 0x334fd: 0x6c03f420, 0x334fe: 0x6c081420, 0x334ff: 0x6c081620, + // Block 0xcd4, offset 0x33500 + 0x33500: 0x6c081820, 0x33501: 0x6c081a20, 0x33502: 0x6c081c20, 0x33503: 0x6c0fb220, + 0x33504: 0x6c0fb420, 0x33505: 0x6c0fb620, 0x33506: 0x6c1c7020, 0x33507: 0x6c1c7220, + 0x33508: 0x6c1c7420, 0x33509: 0x6c1c7620, 0x3350a: 0x6c1c7820, 0x3350b: 0x6c18cc20, + 0x3350c: 0x6c1c7a20, 0x3350d: 0x6c1c7c20, 0x3350e: 0x6c2fde20, 0x3350f: 0x6c2fe020, + 0x33510: 0x6c2fe220, 0x33511: 0x6c2fe420, 0x33512: 0x6c2fe620, 0x33513: 0x6c2fe820, + 0x33514: 0x6c2fea20, 0x33515: 0x6c2fec20, 0x33516: 0x6c2fee20, 0x33517: 0x6c2ff020, + 0x33518: 0x6c2ff220, 0x33519: 0x6c2ff420, 0x3351a: 0x6c2ff620, 0x3351b: 0x6c4a2420, + 0x3351c: 0x6c4a2620, 0x3351d: 0x6c4a2820, 0x3351e: 0x6c4a2a20, 0x3351f: 0x6c4a2c20, + 0x33520: 0x6c4a2e20, 0x33521: 0x6c4a3020, 0x33522: 0x6c4a3220, 0x33523: 0x6c4a3420, + 0x33524: 0x6c4a3620, 0x33525: 0x6c4a3820, 0x33526: 0x6c4a3a20, 0x33527: 0x6c4a3c20, + 0x33528: 0x6c6be620, 0x33529: 0x6c6be820, 0x3352a: 0x6c6bea20, 0x3352b: 0x6c6bec20, + 0x3352c: 0x6c6bee20, 0x3352d: 0x6c6bf020, 0x3352e: 0x6c930c20, 0x3352f: 0x6c930e20, + 0x33530: 0x6c931020, 0x33531: 0x6c931220, 0x33532: 0x6c931420, 0x33533: 0x6c931620, + 0x33534: 0x6c931820, 0x33535: 0x6c931a20, 0x33536: 0x6cbf4620, 0x33537: 0x6cbf4820, + 0x33538: 0x6cbf4a20, 0x33539: 0x6cbf4c20, 0x3353a: 0x6cbf4e20, 0x3353b: 0x6cbf5020, + 0x3353c: 0x6cbf5220, 0x3353d: 0x6cbf5420, 0x3353e: 0x6cbf5620, 0x3353f: 0x6cbf5820, + // Block 0xcd5, offset 0x33540 + 0x33540: 0x6cbf5a20, 0x33541: 0x6cbf5c20, 0x33542: 0x6cbf5e20, 0x33543: 0x6cef7c20, + 0x33544: 0x6cef7e20, 0x33545: 0x6cef8020, 0x33546: 0x6cef8220, 0x33547: 0x6cef8420, + 0x33548: 0x6cef8620, 0x33549: 0x6cef8820, 0x3354a: 0x6cef8a20, 0x3354b: 0x6cef8c20, + 0x3354c: 0x6cef8e20, 0x3354d: 0x6cef9020, 0x3354e: 0x6cef9220, 0x3354f: 0x6cef9420, + 0x33550: 0x6cef9620, 0x33551: 0x6d1f2e20, 0x33552: 0x6d1f3020, 0x33553: 0x6d1f3220, + 0x33554: 0x6d1f3420, 0x33555: 0x6d1f3620, 0x33556: 0x6d1f3820, 0x33557: 0x6d4cb820, + 0x33558: 0x6d4cba20, 0x33559: 0x6d4cbc20, 0x3355a: 0x6d4cbe20, 0x3355b: 0x6d4cc020, + 0x3355c: 0x6d4cc220, 0x3355d: 0x6d4cc420, 0x3355e: 0x6d79e620, 0x3355f: 0x6d79e820, + 0x33560: 0x6d79ea20, 0x33561: 0x6d79ec20, 0x33562: 0x6d79ee20, 0x33563: 0x6d79f020, + 0x33564: 0x6d79f220, 0x33565: 0x6d79f420, 0x33566: 0x6d79f620, 0x33567: 0x6d79f820, + 0x33568: 0x6d79fa20, 0x33569: 0x6da29a20, 0x3356a: 0x6dc48e20, 0x3356b: 0x6dc49020, + 0x3356c: 0x6dc49220, 0x3356d: 0x6de19220, 0x3356e: 0x6de19420, 0x3356f: 0x6de19620, + 0x33570: 0x6de19820, 0x33571: 0x6df98a20, 0x33572: 0x6df98c20, 0x33573: 0x6df98e20, + 0x33574: 0x6df99020, 0x33575: 0x6df99220, 0x33576: 0x6df99420, 0x33577: 0x6e1cb620, + 0x33578: 0x6e401c20, 0x33579: 0x6c03f820, 0x3357a: 0x6c082a20, 0x3357b: 0x6c082c20, + 0x3357c: 0x6c082e20, 0x3357d: 0x6c0fc620, 0x3357e: 0x6c0fc820, 0x3357f: 0x6c0fca20, + // Block 0xcd6, offset 0x33580 + 0x33580: 0x6c0fcc20, 0x33581: 0x6c0fce20, 0x33582: 0x6c0fd020, 0x33583: 0x6c0fd220, + 0x33584: 0x6c0fd420, 0x33585: 0x6c0fd620, 0x33586: 0x6c0fd820, 0x33587: 0x6c0fda20, + 0x33588: 0x6c0fdc20, 0x33589: 0x6c0fde20, 0x3358a: 0x6c0fe020, 0x3358b: 0x6c1ca020, + 0x3358c: 0x6c1ca220, 0x3358d: 0x6c1ca420, 0x3358e: 0x6c1ca620, 0x3358f: 0x6c1ca820, + 0x33590: 0x6c1caa20, 0x33591: 0x6c1cac20, 0x33592: 0x6c1cae20, 0x33593: 0x6c1cb020, + 0x33594: 0x6c1cb220, 0x33595: 0x6c1cb420, 0x33596: 0x6c301a20, 0x33597: 0x6c301c20, + 0x33598: 0x6c301e20, 0x33599: 0x6c302020, 0x3359a: 0x6c302220, 0x3359b: 0x6c302420, + 0x3359c: 0x6c302620, 0x3359d: 0x6c302820, 0x3359e: 0x6c302a20, 0x3359f: 0x6c302c20, + 0x335a0: 0x6c302e20, 0x335a1: 0x6c303020, 0x335a2: 0x6c303220, 0x335a3: 0x6c303420, + 0x335a4: 0x6c303620, 0x335a5: 0x6c303820, 0x335a6: 0x6c303a20, 0x335a7: 0x6c303c20, + 0x335a8: 0x6c303e20, 0x335a9: 0x6c4a5a20, 0x335aa: 0x6c4a5c20, 0x335ab: 0x6c4a5e20, + 0x335ac: 0x6c4a6020, 0x335ad: 0x6c4a6220, 0x335ae: 0x6c4a6420, 0x335af: 0x6c4a6620, + 0x335b0: 0x6c4a6820, 0x335b1: 0x6c4a6a20, 0x335b2: 0x6c4a6c20, 0x335b3: 0x6c4a6e20, + 0x335b4: 0x6c4a7020, 0x335b5: 0x6c4a7220, 0x335b6: 0x6c4a7420, 0x335b7: 0x6c4a7620, + 0x335b8: 0x6c4a7820, 0x335b9: 0x6c4a7a20, 0x335ba: 0x6c4a7c20, 0x335bb: 0x6c4a7e20, + 0x335bc: 0x6c4a8020, 0x335bd: 0x6c4a8220, 0x335be: 0x6c4a8420, 0x335bf: 0x6c4a8620, + // Block 0xcd7, offset 0x335c0 + 0x335c0: 0x6c6c2620, 0x335c1: 0x6c6c2820, 0x335c2: 0x6c6c2a20, 0x335c3: 0x6c6c2c20, + 0x335c4: 0x6c6c2e20, 0x335c5: 0x6c6c3020, 0x335c6: 0x6c6c3220, 0x335c7: 0x6c6c3420, + 0x335c8: 0x6c6c3620, 0x335c9: 0x6c6c3820, 0x335ca: 0x6c6c3a20, 0x335cb: 0x6c6c3c20, + 0x335cc: 0x6c6c3e20, 0x335cd: 0x6c6c4020, 0x335ce: 0x6c6c4220, 0x335cf: 0x6c6c4420, + 0x335d0: 0x6c6c4620, 0x335d1: 0x6c6c4820, 0x335d2: 0x6c6c4a20, 0x335d3: 0x6c6c4c20, + 0x335d4: 0x6c6c4e20, 0x335d5: 0x6c6c5020, 0x335d6: 0x6c6c5220, 0x335d7: 0x6c6c5420, + 0x335d8: 0x6c6c5620, 0x335d9: 0x6c6c5820, 0x335da: 0x6c6c5a20, 0x335db: 0x6c6c5c20, + 0x335dc: 0x6c6c5e20, 0x335dd: 0x6c6c6020, 0x335de: 0x6c6c6220, 0x335df: 0x6c6c6420, + 0x335e0: 0x6c6c6620, 0x335e1: 0x6c6c6820, 0x335e2: 0x6c934620, 0x335e3: 0x6c934820, + 0x335e4: 0x6c934a20, 0x335e5: 0x6c934c20, 0x335e6: 0x6c934e20, 0x335e7: 0x6c935020, + 0x335e8: 0x6c935220, 0x335e9: 0x6c935420, 0x335ea: 0x6c935620, 0x335eb: 0x6c935820, + 0x335ec: 0x6c935a20, 0x335ed: 0x6c935c20, 0x335ee: 0x6c935e20, 0x335ef: 0x6c936020, + 0x335f0: 0x6c936220, 0x335f1: 0x6c936420, 0x335f2: 0x6c936620, 0x335f3: 0x6c936820, + 0x335f4: 0x6c936a20, 0x335f5: 0x6c936c20, 0x335f6: 0x6c936e20, 0x335f7: 0x6c937020, + 0x335f8: 0x6c937220, 0x335f9: 0x6c937420, 0x335fa: 0x6c937620, 0x335fb: 0x6c937820, + 0x335fc: 0x6c937a20, 0x335fd: 0x6cbf8220, 0x335fe: 0x6cbf8420, 0x335ff: 0x6cbf8620, + // Block 0xcd8, offset 0x33600 + 0x33600: 0x6cbf8820, 0x33601: 0x6cbf8a20, 0x33602: 0x6cbf8c20, 0x33603: 0x6cbf8e20, + 0x33604: 0x6cbf9020, 0x33605: 0x6cbf9220, 0x33606: 0x6cbf9420, 0x33607: 0x6cbf9620, + 0x33608: 0x6cbf9820, 0x33609: 0x6cbf9a20, 0x3360a: 0x6cbf9c20, 0x3360b: 0x6cbf9e20, + 0x3360c: 0x6cbfa020, 0x3360d: 0x6cbfa220, 0x3360e: 0x6cbfa420, 0x3360f: 0x6cbfa620, + 0x33610: 0x6cbfa820, 0x33611: 0x6cbfaa20, 0x33612: 0x6cbfac20, 0x33613: 0x6cbfae20, + 0x33614: 0x6cbfb020, 0x33615: 0x6cbfb220, 0x33616: 0x6cbfb420, 0x33617: 0x6cbfb620, + 0x33618: 0x6cbfb820, 0x33619: 0x6cbfba20, 0x3361a: 0x6cbfbc20, 0x3361b: 0x6cbfbe20, + 0x3361c: 0x6cbfc020, 0x3361d: 0x6cbfc220, 0x3361e: 0x6cbfc420, 0x3361f: 0x6cefb420, + 0x33620: 0x6cefb620, 0x33621: 0x6cefb820, 0x33622: 0x6cefba20, 0x33623: 0x6cefbc20, + 0x33624: 0x6cefbe20, 0x33625: 0x6cefc020, 0x33626: 0x6cefc220, 0x33627: 0x6cefc420, + 0x33628: 0x6cefc620, 0x33629: 0x6cefc820, 0x3362a: 0x6cefca20, 0x3362b: 0x6cefcc20, + 0x3362c: 0x6cefce20, 0x3362d: 0x6cefd020, 0x3362e: 0x6cefd220, 0x3362f: 0x6cefd420, + 0x33630: 0x6cefd620, 0x33631: 0x6cefd820, 0x33632: 0x6cefda20, 0x33633: 0x6cefdc20, + 0x33634: 0x6cefde20, 0x33635: 0x6cefe020, 0x33636: 0x6cefe220, 0x33637: 0x6cefe420, + 0x33638: 0x6cefe620, 0x33639: 0x6cefe820, 0x3363a: 0x6cefea20, 0x3363b: 0x6d1f5a20, + 0x3363c: 0x6d1f5c20, 0x3363d: 0x6d1f5e20, 0x3363e: 0x6d1f6020, 0x3363f: 0x6d1f6220, + // Block 0xcd9, offset 0x33640 + 0x33640: 0x6d1f6420, 0x33641: 0x6d1f6620, 0x33642: 0x6d1f6820, 0x33643: 0x6d1f6a20, + 0x33644: 0x6d1f6c20, 0x33645: 0x6d1f6e20, 0x33646: 0x6d1f7020, 0x33647: 0x6d1f7220, + 0x33648: 0x6d1f7420, 0x33649: 0x6d1f7620, 0x3364a: 0x6d1f7820, 0x3364b: 0x6d1f7a20, + 0x3364c: 0x6d1f7c20, 0x3364d: 0x6d1f7e20, 0x3364e: 0x6d1f8020, 0x3364f: 0x6d1f8220, + 0x33650: 0x6d1f8420, 0x33651: 0x6d1f8620, 0x33652: 0x6d1f8820, 0x33653: 0x6d1f8a20, + 0x33654: 0x6d1f8c20, 0x33655: 0x6d1f8e20, 0x33656: 0x6d1f9020, 0x33657: 0x6d1f9220, + 0x33658: 0x6d1f9420, 0x33659: 0x6d1f9620, 0x3365a: 0x6d1f9820, 0x3365b: 0x6d1f9a20, + 0x3365c: 0x6d1f9c20, 0x3365d: 0x6d1f9e20, 0x3365e: 0x6d1b3020, 0x3365f: 0x6d4cd820, + 0x33660: 0x6d4cda20, 0x33661: 0x6d4cdc20, 0x33662: 0x6d4cde20, 0x33663: 0x6d4ce020, + 0x33664: 0x6d4ce220, 0x33665: 0x6d4ce420, 0x33666: 0x6d4ce620, 0x33667: 0x6d4ce820, + 0x33668: 0x6d4cea20, 0x33669: 0x6d4cec20, 0x3366a: 0x6d4cee20, 0x3366b: 0x6d4cf020, + 0x3366c: 0x6d4cf220, 0x3366d: 0x6d4cf420, 0x3366e: 0x6d4cf620, 0x3366f: 0x6d4cf820, + 0x33670: 0x6d4cfa20, 0x33671: 0x6d4cfc20, 0x33672: 0x6d4cfe20, 0x33673: 0x6d4d0020, + 0x33674: 0x6d4d0220, 0x33675: 0x6d4d0420, 0x33676: 0x6d4d0620, 0x33677: 0x6d4d0820, + 0x33678: 0x6d4d0a20, 0x33679: 0x6d4d0c20, 0x3367a: 0x6d4d0e20, 0x3367b: 0x6d4d1020, + 0x3367c: 0x6d4d1220, 0x3367d: 0x6d4d1420, 0x3367e: 0x6d7a0220, 0x3367f: 0x6d7a0420, + // Block 0xcda, offset 0x33680 + 0x33680: 0x6d7a0620, 0x33681: 0x6d7a0820, 0x33682: 0x6d7a0a20, 0x33683: 0x6d7a0c20, + 0x33684: 0x6d7a0e20, 0x33685: 0x6d7a1020, 0x33686: 0x6d7a1220, 0x33687: 0x6d7a1420, + 0x33688: 0x6d7a1620, 0x33689: 0x6d7a1820, 0x3368a: 0x6d7a1a20, 0x3368b: 0x6d7a1c20, + 0x3368c: 0x6d7a1e20, 0x3368d: 0x6d7a2020, 0x3368e: 0x6d7a2220, 0x3368f: 0x6d7a2420, + 0x33690: 0x6d7a2620, 0x33691: 0x6da2a420, 0x33692: 0x6da2a620, 0x33693: 0x6da2a820, + 0x33694: 0x6da2aa20, 0x33695: 0x6da2ac20, 0x33696: 0x6da2ae20, 0x33697: 0x6da2b020, + 0x33698: 0x6da2b220, 0x33699: 0x6da2b420, 0x3369a: 0x6da2b620, 0x3369b: 0x6da2b820, + 0x3369c: 0x6da2ba20, 0x3369d: 0x6da2bc20, 0x3369e: 0x6dc49620, 0x3369f: 0x6dc49820, + 0x336a0: 0x6dc49a20, 0x336a1: 0x6dc49c20, 0x336a2: 0x6dc49e20, 0x336a3: 0x6dc4a020, + 0x336a4: 0x6dc4a220, 0x336a5: 0x6dc4a420, 0x336a6: 0x6dc4a620, 0x336a7: 0x6dc4a820, + 0x336a8: 0x6dc4aa20, 0x336a9: 0x6dc4ac20, 0x336aa: 0x6dc4ae20, 0x336ab: 0x6dc4b020, + 0x336ac: 0x6de1a020, 0x336ad: 0x6de1a220, 0x336ae: 0x6de1a420, 0x336af: 0x6de1a620, + 0x336b0: 0x6de1a820, 0x336b1: 0x6de1aa20, 0x336b2: 0x6de1ac20, 0x336b3: 0x6de1ae20, + 0x336b4: 0x6de1b020, 0x336b5: 0x6de1b220, 0x336b6: 0x6de1b420, 0x336b7: 0x6df99820, + 0x336b8: 0x6df99a20, 0x336b9: 0x6df99c20, 0x336ba: 0x6df99e20, 0x336bb: 0x6df9a020, + 0x336bc: 0x6e0d4a20, 0x336bd: 0x6e0d4c20, 0x336be: 0x6e0d4e20, 0x336bf: 0x6e0d5020, + // Block 0xcdb, offset 0x336c0 + 0x336c0: 0x6e0d5220, 0x336c1: 0x6e0d5420, 0x336c2: 0x6e0d5620, 0x336c3: 0x6e0d5820, + 0x336c4: 0x6e1cb820, 0x336c5: 0x6e1cba20, 0x336c6: 0x6e1cbc20, 0x336c7: 0x6e1cbe20, + 0x336c8: 0x6e1cc020, 0x336c9: 0x6e1cc220, 0x336ca: 0x6e1cc420, 0x336cb: 0x6e1cc620, + 0x336cc: 0x6e28b020, 0x336cd: 0x6e31e820, 0x336ce: 0x6e401e20, 0x336cf: 0x6e31ea20, + 0x336d0: 0x6e31ec20, 0x336d1: 0x6e386a20, 0x336d2: 0x6e428e20, 0x336d3: 0x6e386c20, + 0x336d4: 0x6e386e20, 0x336d5: 0x6e387020, 0x336d6: 0x6e3d1c20, 0x336d7: 0x6e3d1e20, + 0x336d8: 0x6e3d2020, 0x336d9: 0x6e402020, 0x336da: 0x6e402220, 0x336db: 0x6e442820, + 0x336dc: 0x6e46e420, 0x336dd: 0x6c03fa20, 0x336de: 0x6c0fe820, 0x336df: 0x6c304820, + 0x336e0: 0x6c304a20, 0x336e1: 0x6c304c20, 0x336e2: 0x6c304e20, 0x336e3: 0x6c305020, + 0x336e4: 0x6c305220, 0x336e5: 0x6c305420, 0x336e6: 0x6c305620, 0x336e7: 0x6c4a9420, + 0x336e8: 0x6c4a9620, 0x336e9: 0x6c4a9820, 0x336ea: 0x6c4a9a20, 0x336eb: 0x6c4a9c20, + 0x336ec: 0x6c4a9e20, 0x336ed: 0x6c6c7a20, 0x336ee: 0x6c938820, 0x336ef: 0x6c938a20, + 0x336f0: 0x6c938c20, 0x336f1: 0x6c938e20, 0x336f2: 0x6c939020, 0x336f3: 0x6cbfdc20, + 0x336f4: 0x6cbfde20, 0x336f5: 0x6cbfe020, 0x336f6: 0x6cbfe220, 0x336f7: 0x6cbfe420, + 0x336f8: 0x6cbfe620, 0x336f9: 0x6ceff820, 0x336fa: 0x6ceffa20, 0x336fb: 0x6ceffc20, + 0x336fc: 0x6ceffe20, 0x336fd: 0x6d1fae20, 0x336fe: 0x6d1fb020, 0x336ff: 0x6d1fb220, + // Block 0xcdc, offset 0x33700 + 0x33700: 0x6d1fb420, 0x33701: 0x6d1fb620, 0x33702: 0x6d1fb820, 0x33703: 0x6d4d2420, + 0x33704: 0x6d4d2620, 0x33705: 0x6d4d2820, 0x33706: 0x6d4d2a20, 0x33707: 0x6d4d2c20, + 0x33708: 0x6d4d2e20, 0x33709: 0x6d4d3020, 0x3370a: 0x6d7a3020, 0x3370b: 0x6d7a3220, + 0x3370c: 0x6d7a3420, 0x3370d: 0x6da2c020, 0x3370e: 0x6da2c220, 0x3370f: 0x6da2c420, + 0x33710: 0x6dc4b820, 0x33711: 0x6de1b620, 0x33712: 0x6df9a620, 0x33713: 0x6e0d5c20, + 0x33714: 0x6c01aa20, 0x33715: 0x6c040020, 0x33716: 0x6c040220, 0x33717: 0x6c083e20, + 0x33718: 0x6c084020, 0x33719: 0x6c0ff220, 0x3371a: 0x6c0ff420, 0x3371b: 0x6c0ff620, + 0x3371c: 0x6c0ff820, 0x3371d: 0x6c1cc420, 0x3371e: 0x6c1cc620, 0x3371f: 0x6c1cc820, + 0x33720: 0x6c1cca20, 0x33721: 0x6c1ccc20, 0x33722: 0x6c1cce20, 0x33723: 0x6c1cd020, + 0x33724: 0x6c1cd220, 0x33725: 0x6c305e20, 0x33726: 0x6c306020, 0x33727: 0x6c306220, + 0x33728: 0x6c306420, 0x33729: 0x6c306620, 0x3372a: 0x6c4aa620, 0x3372b: 0x6c4aa820, + 0x3372c: 0x6c4aaa20, 0x3372d: 0x6c4aac20, 0x3372e: 0x6c4aae20, 0x3372f: 0x6c4ab020, + 0x33730: 0x6c4ab220, 0x33731: 0x6c4ab420, 0x33732: 0x6c4ab620, 0x33733: 0x6c4ab820, + 0x33734: 0x6c6c7e20, 0x33735: 0x6c6c8020, 0x33736: 0x6c6c8220, 0x33737: 0x6c6c8420, + 0x33738: 0x6c6c8620, 0x33739: 0x6c6c8820, 0x3373a: 0x6c6c8a20, 0x3373b: 0x6c6c8c20, + 0x3373c: 0x6c6c8e20, 0x3373d: 0x6c939620, 0x3373e: 0x6c939820, 0x3373f: 0x6c939a20, + // Block 0xcdd, offset 0x33740 + 0x33740: 0x6c939c20, 0x33741: 0x6c939e20, 0x33742: 0x6c93a020, 0x33743: 0x6c93a220, + 0x33744: 0x6c93a420, 0x33745: 0x6c93a620, 0x33746: 0x6c93a820, 0x33747: 0x6c93aa20, + 0x33748: 0x6c93ac20, 0x33749: 0x6c93ae20, 0x3374a: 0x6c93b020, 0x3374b: 0x6c93b220, + 0x3374c: 0x6c93b420, 0x3374d: 0x6c93b620, 0x3374e: 0x6cbfee20, 0x3374f: 0x6cbff020, + 0x33750: 0x6cbff220, 0x33751: 0x6cbff420, 0x33752: 0x6cbff620, 0x33753: 0x6cbff820, + 0x33754: 0x6cbffa20, 0x33755: 0x6cbffc20, 0x33756: 0x6cbffe20, 0x33757: 0x6cc00020, + 0x33758: 0x6cf00620, 0x33759: 0x6cf00820, 0x3375a: 0x6cf00a20, 0x3375b: 0x6cf00c20, + 0x3375c: 0x6cf00e20, 0x3375d: 0x6cf01020, 0x3375e: 0x6d1fbe20, 0x3375f: 0x6d1fc020, + 0x33760: 0x6d1fc220, 0x33761: 0x6d1fc420, 0x33762: 0x6d1fc620, 0x33763: 0x6d1fc820, + 0x33764: 0x6d1fca20, 0x33765: 0x6d1fcc20, 0x33766: 0x6d4d3a20, 0x33767: 0x6d4d3c20, + 0x33768: 0x6d4d3e20, 0x33769: 0x6d4d4020, 0x3376a: 0x6d4d4220, 0x3376b: 0x6d4d4420, + 0x3376c: 0x6d4d4620, 0x3376d: 0x6d4d4820, 0x3376e: 0x6d4d4a20, 0x3376f: 0x6d4d4c20, + 0x33770: 0x6d7a3820, 0x33771: 0x6d7a3a20, 0x33772: 0x6d7a3c20, 0x33773: 0x6d7a3e20, + 0x33774: 0x6da2c820, 0x33775: 0x6da2ca20, 0x33776: 0x6da2cc20, 0x33777: 0x6dc4ba20, + 0x33778: 0x6dc4bc20, 0x33779: 0x6dc4be20, 0x3377a: 0x6dc4c020, 0x3377b: 0x6dc4c220, + 0x3377c: 0x6de1b820, 0x3377d: 0x6de1ba20, 0x3377e: 0x6de1bc20, 0x3377f: 0x6e0d5e20, + // Block 0xcde, offset 0x33780 + 0x33780: 0x6e462420, 0x33781: 0x6c01ae20, 0x33782: 0x6c01b020, 0x33783: 0x6c040820, + 0x33784: 0x6c084220, 0x33785: 0x6c084420, 0x33786: 0x6c084620, 0x33787: 0x6c084820, + 0x33788: 0x6c084a20, 0x33789: 0x6c084c20, 0x3378a: 0x6c084e20, 0x3378b: 0x6c100220, + 0x3378c: 0x6c100420, 0x3378d: 0x6c100620, 0x3378e: 0x6c100820, 0x3378f: 0x6c1ce220, + 0x33790: 0x6c1ce420, 0x33791: 0x6c1ce620, 0x33792: 0x6c1ce820, 0x33793: 0x6c1cea20, + 0x33794: 0x6c1cec20, 0x33795: 0x6c1cee20, 0x33796: 0x6c1cf020, 0x33797: 0x6c1cf220, + 0x33798: 0x6c1cf420, 0x33799: 0x6c1cf620, 0x3379a: 0x6c307020, 0x3379b: 0x6c307220, + 0x3379c: 0x6c307420, 0x3379d: 0x6c307620, 0x3379e: 0x6c307820, 0x3379f: 0x6c307a20, + 0x337a0: 0x6c307c20, 0x337a1: 0x6c307e20, 0x337a2: 0x6c4ac220, 0x337a3: 0x6c4ac420, + 0x337a4: 0x6c4ac620, 0x337a5: 0x6c5fca20, 0x337a6: 0x6c4ac820, 0x337a7: 0x6c4aca20, + 0x337a8: 0x6c6c9620, 0x337a9: 0x6c6c9820, 0x337aa: 0x6c6c9a20, 0x337ab: 0x6c6c9c20, + 0x337ac: 0x6c6c9e20, 0x337ad: 0x6c6ca020, 0x337ae: 0x6c6ca220, 0x337af: 0x6c6ca420, + 0x337b0: 0x6c6ca620, 0x337b1: 0x6c6ca820, 0x337b2: 0x6c6caa20, 0x337b3: 0x6c93c020, + 0x337b4: 0x6c93c220, 0x337b5: 0x6c93c420, 0x337b6: 0x6c93c620, 0x337b7: 0x6c93c820, + 0x337b8: 0x6c93ca20, 0x337b9: 0x6cc00a20, 0x337ba: 0x6cc00c20, 0x337bb: 0x6cc00e20, + 0x337bc: 0x6cc01020, 0x337bd: 0x6cc01220, 0x337be: 0x6cc01420, 0x337bf: 0x6cc01620, + // Block 0xcdf, offset 0x337c0 + 0x337c0: 0x6cc01820, 0x337c1: 0x6cc01a20, 0x337c2: 0x6cc01c20, 0x337c3: 0x6cf01c20, + 0x337c4: 0x6cf01e20, 0x337c5: 0x6cf02020, 0x337c6: 0x6cf02220, 0x337c7: 0x6cf02420, + 0x337c8: 0x6cf02620, 0x337c9: 0x6cf02820, 0x337ca: 0x6cf02a20, 0x337cb: 0x6d1fd020, + 0x337cc: 0x6d1fd220, 0x337cd: 0x6d1fd420, 0x337ce: 0x6d1fd620, 0x337cf: 0x6d1fd820, + 0x337d0: 0x6d4d5220, 0x337d1: 0x6d4d5420, 0x337d2: 0x6d4d5620, 0x337d3: 0x6d4d5820, + 0x337d4: 0x6d4d5a20, 0x337d5: 0x6d4d5c20, 0x337d6: 0x6d7a4220, 0x337d7: 0x6d7a4420, + 0x337d8: 0x6d7a4620, 0x337d9: 0x6d7a4820, 0x337da: 0x6d7a4a20, 0x337db: 0x6da2d620, + 0x337dc: 0x6da2d820, 0x337dd: 0x6e0d6020, 0x337de: 0x6e0d6220, 0x337df: 0x6e1cc820, + 0x337e0: 0x6e1cca20, 0x337e1: 0x6e387220, 0x337e2: 0x6e387420, 0x337e3: 0x6c01b420, + 0x337e4: 0x6c085620, 0x337e5: 0x6c085820, 0x337e6: 0x6c085a20, 0x337e7: 0x6c085c20, + 0x337e8: 0x6c085e20, 0x337e9: 0x6c101020, 0x337ea: 0x6c101220, 0x337eb: 0x6c101420, + 0x337ec: 0x6c101620, 0x337ed: 0x6c101820, 0x337ee: 0x6c101a20, 0x337ef: 0x6c101c20, + 0x337f0: 0x6c101e20, 0x337f1: 0x6c102020, 0x337f2: 0x6c102220, 0x337f3: 0x6c102420, + 0x337f4: 0x6c086020, 0x337f5: 0x6c1d0620, 0x337f6: 0x6c1d0820, 0x337f7: 0x6c1d0a20, + 0x337f8: 0x6c1d0c20, 0x337f9: 0x6c1d0e20, 0x337fa: 0x6c1d1020, 0x337fb: 0x6c1d1220, + 0x337fc: 0x6c1d1420, 0x337fd: 0x6c1d1620, 0x337fe: 0x6c309420, 0x337ff: 0x6c309620, + // Block 0xce0, offset 0x33800 + 0x33800: 0x6c309820, 0x33801: 0x6c309a20, 0x33802: 0x6c309c20, 0x33803: 0x6c309e20, + 0x33804: 0x6c30a020, 0x33805: 0x6c30a220, 0x33806: 0x6c30a420, 0x33807: 0x6c30a620, + 0x33808: 0x6c30a820, 0x33809: 0x6c30aa20, 0x3380a: 0x6c30ac20, 0x3380b: 0x6c30ae20, + 0x3380c: 0x6c4ae020, 0x3380d: 0x6c4ae220, 0x3380e: 0x6c4ae420, 0x3380f: 0x6c4ae620, + 0x33810: 0x6c4ae820, 0x33811: 0x6c4aea20, 0x33812: 0x6c4aec20, 0x33813: 0x6c4aee20, + 0x33814: 0x6c4af020, 0x33815: 0x6c4af220, 0x33816: 0x6c4af420, 0x33817: 0x6c4af620, + 0x33818: 0x6c4af820, 0x33819: 0x6c4afa20, 0x3381a: 0x6c4afc20, 0x3381b: 0x6c4afe20, + 0x3381c: 0x6c4b0020, 0x3381d: 0x6c4b0220, 0x3381e: 0x6c4b0420, 0x3381f: 0x6c4b0620, + 0x33820: 0x6c4b0820, 0x33821: 0x6c4b0a20, 0x33822: 0x6c6cc020, 0x33823: 0x6c6cc220, + 0x33824: 0x6c6cc420, 0x33825: 0x6c6cc620, 0x33826: 0x6c6cc820, 0x33827: 0x6c6cca20, + 0x33828: 0x6c6ccc20, 0x33829: 0x6c6cce20, 0x3382a: 0x6c6cd020, 0x3382b: 0x6c6cd220, + 0x3382c: 0x6c6cd420, 0x3382d: 0x6c6cd620, 0x3382e: 0x6c6cd820, 0x3382f: 0x6c6cda20, + 0x33830: 0x6c6cdc20, 0x33831: 0x6c6cde20, 0x33832: 0x6c6ce020, 0x33833: 0x6c6ce220, + 0x33834: 0x6c6ce420, 0x33835: 0x6c6ce620, 0x33836: 0x6c6ce820, 0x33837: 0x6c6cea20, + 0x33838: 0x6c6cec20, 0x33839: 0x6c6cee20, 0x3383a: 0x6c93da20, 0x3383b: 0x6c93dc20, + 0x3383c: 0x6c93de20, 0x3383d: 0x6c93e020, 0x3383e: 0x6c93e220, 0x3383f: 0x6c93e420, + // Block 0xce1, offset 0x33840 + 0x33840: 0x6c93e620, 0x33841: 0x6c93e820, 0x33842: 0x6c93ea20, 0x33843: 0x6c93ec20, + 0x33844: 0x6c93ee20, 0x33845: 0x6c93f020, 0x33846: 0x6c93f220, 0x33847: 0x6c93f420, + 0x33848: 0x6c93f620, 0x33849: 0x6c93f820, 0x3384a: 0x6c93fa20, 0x3384b: 0x6c93fc20, + 0x3384c: 0x6c93fe20, 0x3384d: 0x6c940020, 0x3384e: 0x6c940220, 0x3384f: 0x6c940420, + 0x33850: 0x6c940620, 0x33851: 0x6c940820, 0x33852: 0x6c940a20, 0x33853: 0x6c940c20, + 0x33854: 0x6cc02a20, 0x33855: 0x6cc02c20, 0x33856: 0x6cc02e20, 0x33857: 0x6cc03020, + 0x33858: 0x6cc03220, 0x33859: 0x6cc03420, 0x3385a: 0x6cc03620, 0x3385b: 0x6cc03820, + 0x3385c: 0x6cc03a20, 0x3385d: 0x6cc03c20, 0x3385e: 0x6cc03e20, 0x3385f: 0x6cc04020, + 0x33860: 0x6cc04220, 0x33861: 0x6cc04420, 0x33862: 0x6cc04620, 0x33863: 0x6cc04820, + 0x33864: 0x6cc04a20, 0x33865: 0x6cc04c20, 0x33866: 0x6cc04e20, 0x33867: 0x6cc05020, + 0x33868: 0x6cc05220, 0x33869: 0x6cc05420, 0x3386a: 0x6cc05620, 0x3386b: 0x6cc05820, + 0x3386c: 0x6cf02e20, 0x3386d: 0x6cf03020, 0x3386e: 0x6cf03220, 0x3386f: 0x6cf03420, + 0x33870: 0x6cf03620, 0x33871: 0x6cf03820, 0x33872: 0x6cf03a20, 0x33873: 0x6cf03c20, + 0x33874: 0x6cf03e20, 0x33875: 0x6cf04020, 0x33876: 0x6cf04220, 0x33877: 0x6cf04420, + 0x33878: 0x6cf04620, 0x33879: 0x6cf04820, 0x3387a: 0x6cf04a20, 0x3387b: 0x6cf04c20, + 0x3387c: 0x6cf04e20, 0x3387d: 0x6cf05020, 0x3387e: 0x6cf05220, 0x3387f: 0x6cf05420, + // Block 0xce2, offset 0x33880 + 0x33880: 0x6cf05620, 0x33881: 0x6cf05820, 0x33882: 0x6cf05a20, 0x33883: 0x6cf05c20, + 0x33884: 0x6d1fe420, 0x33885: 0x6d1fe620, 0x33886: 0x6d1fe820, 0x33887: 0x6d1fea20, + 0x33888: 0x6d1fec20, 0x33889: 0x6d1fee20, 0x3388a: 0x6d1ff020, 0x3388b: 0x6d1ff220, + 0x3388c: 0x6d1ff420, 0x3388d: 0x6d1ff620, 0x3388e: 0x6d1ff820, 0x3388f: 0x6d1ffa20, + 0x33890: 0x6d4d6a20, 0x33891: 0x6d4d6c20, 0x33892: 0x6d4d6e20, 0x33893: 0x6d4d7020, + 0x33894: 0x6d4d7220, 0x33895: 0x6d4d7420, 0x33896: 0x6d4d7620, 0x33897: 0x6d4d7820, + 0x33898: 0x6d4d7a20, 0x33899: 0x6d4d7c20, 0x3389a: 0x6d4d7e20, 0x3389b: 0x6d4d8020, + 0x3389c: 0x6d4d8220, 0x3389d: 0x6d4d8420, 0x3389e: 0x6d4d8620, 0x3389f: 0x6d7a4c20, + 0x338a0: 0x6d7a4e20, 0x338a1: 0x6d7a5020, 0x338a2: 0x6d7a5220, 0x338a3: 0x6d7a5420, + 0x338a4: 0x6d7a5620, 0x338a5: 0x6d7a5820, 0x338a6: 0x6d7a5a20, 0x338a7: 0x6d7a5c20, + 0x338a8: 0x6da2dc20, 0x338a9: 0x6da2de20, 0x338aa: 0x6dc4ca20, 0x338ab: 0x6dc4cc20, + 0x338ac: 0x6de1c220, 0x338ad: 0x6de1c420, 0x338ae: 0x6de1c620, 0x338af: 0x6de1c820, + 0x338b0: 0x6de1ca20, 0x338b1: 0x6df9a820, 0x338b2: 0x6df9aa20, 0x338b3: 0x6df9ac20, + 0x338b4: 0x6df9ae20, 0x338b5: 0x6e0d6620, 0x338b6: 0x6e0d6820, 0x338b7: 0x6e0d6a20, + 0x338b8: 0x6e1ccc20, 0x338b9: 0x6e1cce20, 0x338ba: 0x6e1cd020, 0x338bb: 0x6e31f220, + 0x338bc: 0x6e387620, 0x338bd: 0x6e387820, 0x338be: 0x6c01b820, 0x338bf: 0x6c086220, + // Block 0xce3, offset 0x338c0 + 0x338c0: 0x6c102a20, 0x338c1: 0x6c102c20, 0x338c2: 0x6c102e20, 0x338c3: 0x6c103020, + 0x338c4: 0x6c103220, 0x338c5: 0x6c103420, 0x338c6: 0x6c1d2220, 0x338c7: 0x6c1d2420, + 0x338c8: 0x6c1d2620, 0x338c9: 0x6c1d2820, 0x338ca: 0x6c1d2a20, 0x338cb: 0x6c30b220, + 0x338cc: 0x6c30b420, 0x338cd: 0x6c30b620, 0x338ce: 0x6c4b1220, 0x338cf: 0x6c4b1420, + 0x338d0: 0x6c4b1620, 0x338d1: 0x6c4b1820, 0x338d2: 0x6c4b1a20, 0x338d3: 0x6c4b1c20, + 0x338d4: 0x6c4b1e20, 0x338d5: 0x6c6cf420, 0x338d6: 0x6c6cf620, 0x338d7: 0x6c6cf820, + 0x338d8: 0x6c6cfa20, 0x338d9: 0x6c6cfc20, 0x338da: 0x6c6cfe20, 0x338db: 0x6c941220, + 0x338dc: 0x6c941420, 0x338dd: 0x6cc06220, 0x338de: 0x6cc06420, 0x338df: 0x6cc06620, + 0x338e0: 0x6cc06820, 0x338e1: 0x6cc06a20, 0x338e2: 0x6cc06c20, 0x338e3: 0x6cc06e20, + 0x338e4: 0x6cf06420, 0x338e5: 0x6cf06620, 0x338e6: 0x6d4d8c20, 0x338e7: 0x6d4d8e20, + 0x338e8: 0x6d4d9020, 0x338e9: 0x6d4d9220, 0x338ea: 0x6dc4ce20, 0x338eb: 0x6e0d6c20, + 0x338ec: 0x6e1cd420, 0x338ed: 0x6c041420, 0x338ee: 0x6c041620, 0x338ef: 0x6c041820, + 0x338f0: 0x6c087620, 0x338f1: 0x6c087820, 0x338f2: 0x6c087a20, 0x338f3: 0x6c087c20, + 0x338f4: 0x6c087e20, 0x338f5: 0x6c088020, 0x338f6: 0x6c088220, 0x338f7: 0x6c088420, + 0x338f8: 0x6c088620, 0x338f9: 0x6c088820, 0x338fa: 0x6c088a20, 0x338fb: 0x6c088c20, + 0x338fc: 0x6c088e20, 0x338fd: 0x6c089020, 0x338fe: 0x6c105e20, 0x338ff: 0x6c106020, + // Block 0xce4, offset 0x33900 + 0x33900: 0x6c106220, 0x33901: 0x6c106420, 0x33902: 0x6c106620, 0x33903: 0x6c106820, + 0x33904: 0x6c106a20, 0x33905: 0x6c106c20, 0x33906: 0x6c106e20, 0x33907: 0x6c107020, + 0x33908: 0x6c107220, 0x33909: 0x6c107420, 0x3390a: 0x6c107620, 0x3390b: 0x6c107820, + 0x3390c: 0x6c107a20, 0x3390d: 0x6c107c20, 0x3390e: 0x6c107e20, 0x3390f: 0x6c108020, + 0x33910: 0x6c108220, 0x33911: 0x6c108420, 0x33912: 0x6c108620, 0x33913: 0x6c1d6c20, + 0x33914: 0x6c1d6e20, 0x33915: 0x6c1d7020, 0x33916: 0x6c1d7220, 0x33917: 0x6c1d7420, + 0x33918: 0x6c1d7620, 0x33919: 0x6c1d7820, 0x3391a: 0x6c1d7a20, 0x3391b: 0x6c1d7c20, + 0x3391c: 0x6c1d7e20, 0x3391d: 0x6c1d8020, 0x3391e: 0x6c1d8220, 0x3391f: 0x6c1d8420, + 0x33920: 0x6c1d8620, 0x33921: 0x6c1d8820, 0x33922: 0x6c1d8a20, 0x33923: 0x6c1d8c20, + 0x33924: 0x6c1d8e20, 0x33925: 0x6c1d9020, 0x33926: 0x6c1d9220, 0x33927: 0x6c1d9420, + 0x33928: 0x6c1d9620, 0x33929: 0x6c1d9820, 0x3392a: 0x6c1d9a20, 0x3392b: 0x6c1d9c20, + 0x3392c: 0x6c1d9e20, 0x3392d: 0x6c1da020, 0x3392e: 0x6c1da220, 0x3392f: 0x6c1da420, + 0x33930: 0x6c1da620, 0x33931: 0x6c1da820, 0x33932: 0x6c1daa20, 0x33933: 0x6c1dac20, + 0x33934: 0x6c1dae20, 0x33935: 0x6c1db020, 0x33936: 0x6c1db220, 0x33937: 0x6c1db420, + 0x33938: 0x6c1db620, 0x33939: 0x6c1db820, 0x3393a: 0x6c1dba20, 0x3393b: 0x6c1dbc20, + 0x3393c: 0x6c1dbe20, 0x3393d: 0x6c1dc020, 0x3393e: 0x6c1dc220, 0x3393f: 0x6c1dc420, + // Block 0xce5, offset 0x33940 + 0x33940: 0x6c1dc620, 0x33941: 0x6c1dc820, 0x33942: 0x6c1dca20, 0x33943: 0x6c312020, + 0x33944: 0x6c312220, 0x33945: 0x6c312420, 0x33946: 0x6c312620, 0x33947: 0x6c312820, + 0x33948: 0x6c312a20, 0x33949: 0x6c312c20, 0x3394a: 0x6c312e20, 0x3394b: 0x6c313020, + 0x3394c: 0x6c313220, 0x3394d: 0x6c313420, 0x3394e: 0x6c313620, 0x3394f: 0x6c313820, + 0x33950: 0x6c313a20, 0x33951: 0x6c313c20, 0x33952: 0x6c313e20, 0x33953: 0x6c314020, + 0x33954: 0x6c314220, 0x33955: 0x6c314420, 0x33956: 0x6c314620, 0x33957: 0x6c314820, + 0x33958: 0x6c314a20, 0x33959: 0x6c314c20, 0x3395a: 0x6c314e20, 0x3395b: 0x6c315020, + 0x3395c: 0x6c315220, 0x3395d: 0x6c315420, 0x3395e: 0x6c315620, 0x3395f: 0x6c315820, + 0x33960: 0x6c315a20, 0x33961: 0x6c315c20, 0x33962: 0x6c315e20, 0x33963: 0x6c316020, + 0x33964: 0x6c3bdc20, 0x33965: 0x6c316220, 0x33966: 0x6c316420, 0x33967: 0x6c316620, + 0x33968: 0x6c316820, 0x33969: 0x6c316a20, 0x3396a: 0x6c316c20, 0x3396b: 0x6c4b6a20, + 0x3396c: 0x6c4b6c20, 0x3396d: 0x6c4b6e20, 0x3396e: 0x6c4b7020, 0x3396f: 0x6c4b7220, + 0x33970: 0x6c4b7420, 0x33971: 0x6c4b7620, 0x33972: 0x6c4b7820, 0x33973: 0x6c4b7a20, + 0x33974: 0x6c4b7c20, 0x33975: 0x6c4b7e20, 0x33976: 0x6c4b8020, 0x33977: 0x6c4b8220, + 0x33978: 0x6c4b8420, 0x33979: 0x6c4b8620, 0x3397a: 0x6c4b8820, 0x3397b: 0x6c4b8a20, + 0x3397c: 0x6c4b8c20, 0x3397d: 0x6c4b8e20, 0x3397e: 0x6c4b9020, 0x3397f: 0x6c4b9220, + // Block 0xce6, offset 0x33980 + 0x33980: 0x6c4b9420, 0x33981: 0x6c4b9620, 0x33982: 0x6c4b9820, 0x33983: 0x6c4b9a20, + 0x33984: 0x6c4b9c20, 0x33985: 0x6c4b9e20, 0x33986: 0x6c4ba020, 0x33987: 0x6c4ba220, + 0x33988: 0x6c4ba420, 0x33989: 0x6c4ba620, 0x3398a: 0x6c4ba820, 0x3398b: 0x6c4baa20, + 0x3398c: 0x6c4bac20, 0x3398d: 0x6c4bae20, 0x3398e: 0x6c4bb020, 0x3398f: 0x6c4bb220, + 0x33990: 0x6c4bb420, 0x33991: 0x6c4bb620, 0x33992: 0x6c4bb820, 0x33993: 0x6c4bba20, + 0x33994: 0x6c4bbc20, 0x33995: 0x6c6d5a20, 0x33996: 0x6c6d5c20, 0x33997: 0x6c6d5e20, + 0x33998: 0x6c6d6020, 0x33999: 0x6c6d6220, 0x3399a: 0x6c6d6420, 0x3399b: 0x6c6d6620, + 0x3399c: 0x6c6d6820, 0x3399d: 0x6c6d6a20, 0x3399e: 0x6c6d6c20, 0x3399f: 0x6c6d6e20, + 0x339a0: 0x6c6d7020, 0x339a1: 0x6c6d7220, 0x339a2: 0x6c6d7420, 0x339a3: 0x6c6d7620, + 0x339a4: 0x6c6d7820, 0x339a5: 0x6c6d7a20, 0x339a6: 0x6c6d7c20, 0x339a7: 0x6c6d7e20, + 0x339a8: 0x6c6d8020, 0x339a9: 0x6c6d8220, 0x339aa: 0x6c6d8420, 0x339ab: 0x6c6d8620, + 0x339ac: 0x6c6d8820, 0x339ad: 0x6c6d8a20, 0x339ae: 0x6c6d8c20, 0x339af: 0x6c6d8e20, + 0x339b0: 0x6c6d9020, 0x339b1: 0x6c6d9220, 0x339b2: 0x6c6d9420, 0x339b3: 0x6c6d9620, + 0x339b4: 0x6c6d9820, 0x339b5: 0x6c6d9a20, 0x339b6: 0x6c6d9c20, 0x339b7: 0x6c6d9e20, + 0x339b8: 0x6c6da020, 0x339b9: 0x6c6da220, 0x339ba: 0x6c6da420, 0x339bb: 0x6c6da620, + 0x339bc: 0x6c6da820, 0x339bd: 0x6c6daa20, 0x339be: 0x6c6dac20, 0x339bf: 0x6c6dae20, + // Block 0xce7, offset 0x339c0 + 0x339c0: 0x6c6db020, 0x339c1: 0x6c6db220, 0x339c2: 0x6c6db420, 0x339c3: 0x6c6db620, + 0x339c4: 0x6c6db820, 0x339c5: 0x6c6dba20, 0x339c6: 0x6c6dbc20, 0x339c7: 0x6c6dbe20, + 0x339c8: 0x6c6dc020, 0x339c9: 0x6c6dc220, 0x339ca: 0x6c6dc420, 0x339cb: 0x6c6dc620, + 0x339cc: 0x6c6dc820, 0x339cd: 0x6c6dca20, 0x339ce: 0x6c6dcc20, 0x339cf: 0x6c6dce20, + 0x339d0: 0x6c6dd020, 0x339d1: 0x6c948a20, 0x339d2: 0x6c948c20, 0x339d3: 0x6c948e20, + 0x339d4: 0x6c949020, 0x339d5: 0x6c949220, 0x339d6: 0x6c949420, 0x339d7: 0x6c949620, + 0x339d8: 0x6c949820, 0x339d9: 0x6c949a20, 0x339da: 0x6c949c20, 0x339db: 0x6c949e20, + 0x339dc: 0x6c94a020, 0x339dd: 0x6c94a220, 0x339de: 0x6c94a420, 0x339df: 0x6c94a620, + 0x339e0: 0x6c94a820, 0x339e1: 0x6c94aa20, 0x339e2: 0x6c94ac20, 0x339e3: 0x6c94ae20, + 0x339e4: 0x6c94b020, 0x339e5: 0x6c94b220, 0x339e6: 0x6c94b420, 0x339e7: 0x6c94b620, + 0x339e8: 0x6c94b820, 0x339e9: 0x6c94ba20, 0x339ea: 0x6c94bc20, 0x339eb: 0x6c94be20, + 0x339ec: 0x6c94c020, 0x339ed: 0x6c94c220, 0x339ee: 0x6c94c420, 0x339ef: 0x6c94c620, + 0x339f0: 0x6c94c820, 0x339f1: 0x6c94ca20, 0x339f2: 0x6c94cc20, 0x339f3: 0x6c94ce20, + 0x339f4: 0x6c94d020, 0x339f5: 0x6c94d220, 0x339f6: 0x6c94d420, 0x339f7: 0x6c94d620, + 0x339f8: 0x6c94d820, 0x339f9: 0x6c94da20, 0x339fa: 0x6c94dc20, 0x339fb: 0x6c94de20, + 0x339fc: 0x6c94e020, 0x339fd: 0x6c94e220, 0x339fe: 0x6c94e420, 0x339ff: 0x6c94e620, + // Block 0xce8, offset 0x33a00 + 0x33a00: 0x6c94e820, 0x33a01: 0x6c94ea20, 0x33a02: 0x6c94ec20, 0x33a03: 0x6c94ee20, + 0x33a04: 0x6c94f020, 0x33a05: 0x6c94f220, 0x33a06: 0x6c94f420, 0x33a07: 0x6c94f620, + 0x33a08: 0x6c94f820, 0x33a09: 0x6c94fa20, 0x33a0a: 0x6c94fc20, 0x33a0b: 0x6c94fe20, + 0x33a0c: 0x6c950020, 0x33a0d: 0x6c950220, 0x33a0e: 0x6c950420, 0x33a0f: 0x6c950620, + 0x33a10: 0x6c950820, 0x33a11: 0x6c950a20, 0x33a12: 0x6c950c20, 0x33a13: 0x6c950e20, + 0x33a14: 0x6c951020, 0x33a15: 0x6c951220, 0x33a16: 0x6c951420, 0x33a17: 0x6c951620, + 0x33a18: 0x6c951820, 0x33a19: 0x6c951a20, 0x33a1a: 0x6c951c20, 0x33a1b: 0x6c951e20, + 0x33a1c: 0x6c952020, 0x33a1d: 0x6c952220, 0x33a1e: 0x6c952420, 0x33a1f: 0x6c952620, + 0x33a20: 0x6c952820, 0x33a21: 0x6c952a20, 0x33a22: 0x6c952c20, 0x33a23: 0x6c952e20, + 0x33a24: 0x6c953020, 0x33a25: 0x6c953220, 0x33a26: 0x6c953420, 0x33a27: 0x6c953620, + 0x33a28: 0x6c953820, 0x33a29: 0x6c953a20, 0x33a2a: 0x6cc0de20, 0x33a2b: 0x6cc0e020, + 0x33a2c: 0x6cc0e220, 0x33a2d: 0x6cc0e420, 0x33a2e: 0x6cc0e620, 0x33a2f: 0x6cc0e820, + 0x33a30: 0x6cc0ea20, 0x33a31: 0x6cc0ec20, 0x33a32: 0x6cc0ee20, 0x33a33: 0x6cc0f020, + 0x33a34: 0x6cc0f220, 0x33a35: 0x6cc0f420, 0x33a36: 0x6cc0f620, 0x33a37: 0x6cc0f820, + 0x33a38: 0x6cc0fa20, 0x33a39: 0x6cc0fc20, 0x33a3a: 0x6cc0fe20, 0x33a3b: 0x6cc10020, + 0x33a3c: 0x6cc10220, 0x33a3d: 0x6cc10420, 0x33a3e: 0x6cc10620, 0x33a3f: 0x6cc10820, + // Block 0xce9, offset 0x33a40 + 0x33a40: 0x6cc10a20, 0x33a41: 0x6cc10c20, 0x33a42: 0x6cc10e20, 0x33a43: 0x6cc11020, + 0x33a44: 0x6cc11220, 0x33a45: 0x6cc11420, 0x33a46: 0x6cc11620, 0x33a47: 0x6cc11820, + 0x33a48: 0x6cc11a20, 0x33a49: 0x6cc11c20, 0x33a4a: 0x6cc11e20, 0x33a4b: 0x6cc12020, + 0x33a4c: 0x6cc12220, 0x33a4d: 0x6cc12420, 0x33a4e: 0x6cc12620, 0x33a4f: 0x6cc12820, + 0x33a50: 0x6cc12a20, 0x33a51: 0x6cc12c20, 0x33a52: 0x6cc12e20, 0x33a53: 0x6cc13020, + 0x33a54: 0x6cc13220, 0x33a55: 0x6cc13420, 0x33a56: 0x6cc13620, 0x33a57: 0x6cc13820, + 0x33a58: 0x6cc13a20, 0x33a59: 0x6cc13c20, 0x33a5a: 0x6cc13e20, 0x33a5b: 0x6cc14020, + 0x33a5c: 0x6cc14220, 0x33a5d: 0x6cc14420, 0x33a5e: 0x6cc14620, 0x33a5f: 0x6cc14820, + 0x33a60: 0x6cc14a20, 0x33a61: 0x6cc14c20, 0x33a62: 0x6cc14e20, 0x33a63: 0x6cc15020, + 0x33a64: 0x6cc15220, 0x33a65: 0x6cc15420, 0x33a66: 0x6cc15620, 0x33a67: 0x6cc15820, + 0x33a68: 0x6cc15a20, 0x33a69: 0x6cc15c20, 0x33a6a: 0x6cf0ac20, 0x33a6b: 0x6cf0ae20, + 0x33a6c: 0x6cf0b020, 0x33a6d: 0x6cf0b220, 0x33a6e: 0x6cf0b420, 0x33a6f: 0x6cf0b620, + 0x33a70: 0x6cf0b820, 0x33a71: 0x6cf0ba20, 0x33a72: 0x6cf0bc20, 0x33a73: 0x6cf0be20, + 0x33a74: 0x6cf0c020, 0x33a75: 0x6cf0c220, 0x33a76: 0x6cf0c420, 0x33a77: 0x6cf0c620, + 0x33a78: 0x6cf0c820, 0x33a79: 0x6cf0ca20, 0x33a7a: 0x6cf0cc20, 0x33a7b: 0x6cf0ce20, + 0x33a7c: 0x6cf0d020, 0x33a7d: 0x6cf0d220, 0x33a7e: 0x6cf0d420, 0x33a7f: 0x6cf0d620, + // Block 0xcea, offset 0x33a80 + 0x33a80: 0x6cf0d820, 0x33a81: 0x6cf0da20, 0x33a82: 0x6cf0dc20, 0x33a83: 0x6cf0de20, + 0x33a84: 0x6cf0e020, 0x33a85: 0x6cf0e220, 0x33a86: 0x6cf0e420, 0x33a87: 0x6cf0e620, + 0x33a88: 0x6cf0e820, 0x33a89: 0x6cf0ea20, 0x33a8a: 0x6cf0ec20, 0x33a8b: 0x6cf0ee20, + 0x33a8c: 0x6cf0f020, 0x33a8d: 0x6cf0f220, 0x33a8e: 0x6cf0f420, 0x33a8f: 0x6cf0f620, + 0x33a90: 0x6cf0f820, 0x33a91: 0x6cf0fa20, 0x33a92: 0x6cf0fc20, 0x33a93: 0x6cf0fe20, + 0x33a94: 0x6cf10020, 0x33a95: 0x6cf10220, 0x33a96: 0x6cf10420, 0x33a97: 0x6cf10620, + 0x33a98: 0x6d204820, 0x33a99: 0x6d204a20, 0x33a9a: 0x6d204c20, 0x33a9b: 0x6d204e20, + 0x33a9c: 0x6d205020, 0x33a9d: 0x6d205220, 0x33a9e: 0x6d205420, 0x33a9f: 0x6d205620, + 0x33aa0: 0x6d205820, 0x33aa1: 0x6d205a20, 0x33aa2: 0x6d205c20, 0x33aa3: 0x6d205e20, + 0x33aa4: 0x6d206020, 0x33aa5: 0x6d206220, 0x33aa6: 0x6d206420, 0x33aa7: 0x6d206620, + 0x33aa8: 0x6d206820, 0x33aa9: 0x6d206a20, 0x33aaa: 0x6d206c20, 0x33aab: 0x6d206e20, + 0x33aac: 0x6d207020, 0x33aad: 0x6d207220, 0x33aae: 0x6d207420, 0x33aaf: 0x6d207620, + 0x33ab0: 0x6d207820, 0x33ab1: 0x6d207a20, 0x33ab2: 0x6d207c20, 0x33ab3: 0x6d207e20, + 0x33ab4: 0x6d208020, 0x33ab5: 0x6d208220, 0x33ab6: 0x6d208420, 0x33ab7: 0x6d208620, + 0x33ab8: 0x6d208820, 0x33ab9: 0x6d208a20, 0x33aba: 0x6d208c20, 0x33abb: 0x6d208e20, + 0x33abc: 0x6d209020, 0x33abd: 0x6d209220, 0x33abe: 0x6d209420, 0x33abf: 0x6d209620, + // Block 0xceb, offset 0x33ac0 + 0x33ac0: 0x6d209820, 0x33ac1: 0x6d209a20, 0x33ac2: 0x6d209c20, 0x33ac3: 0x6d209e20, + 0x33ac4: 0x6d20a020, 0x33ac5: 0x6d20a220, 0x33ac6: 0x6d20a420, 0x33ac7: 0x6d20a620, + 0x33ac8: 0x6d20a820, 0x33ac9: 0x6d20aa20, 0x33aca: 0x6d4dda20, 0x33acb: 0x6d4ddc20, + 0x33acc: 0x6d4dde20, 0x33acd: 0x6d4de020, 0x33ace: 0x6d4de220, 0x33acf: 0x6d4de420, + 0x33ad0: 0x6d4de620, 0x33ad1: 0x6d4de820, 0x33ad2: 0x6d4dea20, 0x33ad3: 0x6d4dec20, + 0x33ad4: 0x6d4dee20, 0x33ad5: 0x6d4df020, 0x33ad6: 0x6d4df220, 0x33ad7: 0x6d4df420, + 0x33ad8: 0x6d4df620, 0x33ad9: 0x6d4df820, 0x33ada: 0x6d4dfa20, 0x33adb: 0x6d4dfc20, + 0x33adc: 0x6d4dfe20, 0x33add: 0x6d4e0020, 0x33ade: 0x6d4e0220, 0x33adf: 0x6d4e0420, + 0x33ae0: 0x6d4e0620, 0x33ae1: 0x6d4e0820, 0x33ae2: 0x6d4e0a20, 0x33ae3: 0x6d4e0c20, + 0x33ae4: 0x6d4e0e20, 0x33ae5: 0x6d4e1020, 0x33ae6: 0x6d4e1220, 0x33ae7: 0x6d4e1420, + 0x33ae8: 0x6d4e1620, 0x33ae9: 0x6d4e1820, 0x33aea: 0x6d4e1a20, 0x33aeb: 0x6d4e1c20, + 0x33aec: 0x6d4e1e20, 0x33aed: 0x6d4e2020, 0x33aee: 0x6d4e2220, 0x33aef: 0x6d4e2420, + 0x33af0: 0x6d4e2620, 0x33af1: 0x6d4e2820, 0x33af2: 0x6d4e2a20, 0x33af3: 0x6d4e2c20, + 0x33af4: 0x6d4e2e20, 0x33af5: 0x6d4e3020, 0x33af6: 0x6d4e3220, 0x33af7: 0x6d4e3420, + 0x33af8: 0x6d4e3620, 0x33af9: 0x6d4e3820, 0x33afa: 0x6d4e3a20, 0x33afb: 0x6d4e3c20, + 0x33afc: 0x6d4e3e20, 0x33afd: 0x6d7a9020, 0x33afe: 0x6d7a9220, 0x33aff: 0x6d7a9420, + // Block 0xcec, offset 0x33b00 + 0x33b00: 0x6d7a9620, 0x33b01: 0x6d7a9820, 0x33b02: 0x6d7a9a20, 0x33b03: 0x6d7a9c20, + 0x33b04: 0x6d7a9e20, 0x33b05: 0x6d7aa020, 0x33b06: 0x6d7aa220, 0x33b07: 0x6d7aa420, + 0x33b08: 0x6d7aa620, 0x33b09: 0x6da2fc20, 0x33b0a: 0x6d7aa820, 0x33b0b: 0x6d7aaa20, + 0x33b0c: 0x6d7aac20, 0x33b0d: 0x6d7aae20, 0x33b0e: 0x6d7ab020, 0x33b0f: 0x6d7ab220, + 0x33b10: 0x6d7ab420, 0x33b11: 0x6d7ab620, 0x33b12: 0x6d7ab820, 0x33b13: 0x6d7aba20, + 0x33b14: 0x6d7abc20, 0x33b15: 0x6d7abe20, 0x33b16: 0x6d7ac020, 0x33b17: 0x6d7ac220, + 0x33b18: 0x6d7ac420, 0x33b19: 0x6d7ac620, 0x33b1a: 0x6d7ac820, 0x33b1b: 0x6d7aca20, + 0x33b1c: 0x6da2fe20, 0x33b1d: 0x6da30020, 0x33b1e: 0x6da30220, 0x33b1f: 0x6da30420, + 0x33b20: 0x6da30620, 0x33b21: 0x6da30820, 0x33b22: 0x6da30a20, 0x33b23: 0x6da30c20, + 0x33b24: 0x6da30e20, 0x33b25: 0x6da31020, 0x33b26: 0x6da31220, 0x33b27: 0x6da31420, + 0x33b28: 0x6da31620, 0x33b29: 0x6da31820, 0x33b2a: 0x6da31a20, 0x33b2b: 0x6da31c20, + 0x33b2c: 0x6da31e20, 0x33b2d: 0x6da32020, 0x33b2e: 0x6da32220, 0x33b2f: 0x6da32420, + 0x33b30: 0x6da32620, 0x33b31: 0x6da32820, 0x33b32: 0x6da32a20, 0x33b33: 0x6da32c20, + 0x33b34: 0x6da32e20, 0x33b35: 0x6da33020, 0x33b36: 0x6da33220, 0x33b37: 0x6da33420, + 0x33b38: 0x6da33620, 0x33b39: 0x6da33820, 0x33b3a: 0x6da33a20, 0x33b3b: 0x6da33c20, + 0x33b3c: 0x6da33e20, 0x33b3d: 0x6da34020, 0x33b3e: 0x6da34220, 0x33b3f: 0x6da34420, + // Block 0xced, offset 0x33b40 + 0x33b40: 0x6da34620, 0x33b41: 0x6da34820, 0x33b42: 0x6dc4dc20, 0x33b43: 0x6dc4de20, + 0x33b44: 0x6dc4e020, 0x33b45: 0x6dc4e220, 0x33b46: 0x6dc4e420, 0x33b47: 0x6dc4e620, + 0x33b48: 0x6dc4e820, 0x33b49: 0x6dc4ea20, 0x33b4a: 0x6dc4ec20, 0x33b4b: 0x6dc4ee20, + 0x33b4c: 0x6dc4f020, 0x33b4d: 0x6dc4f220, 0x33b4e: 0x6dc4f420, 0x33b4f: 0x6dc4f620, + 0x33b50: 0x6dc4f820, 0x33b51: 0x6dc4fa20, 0x33b52: 0x6dc4fc20, 0x33b53: 0x6dc4fe20, + 0x33b54: 0x6dc50020, 0x33b55: 0x6dc50220, 0x33b56: 0x6dc50420, 0x33b57: 0x6dc45020, + 0x33b58: 0x6de1de20, 0x33b59: 0x6de1e020, 0x33b5a: 0x6de1e220, 0x33b5b: 0x6de1e420, + 0x33b5c: 0x6de1e620, 0x33b5d: 0x6de1e820, 0x33b5e: 0x6de1ea20, 0x33b5f: 0x6de1ec20, + 0x33b60: 0x6dc50620, 0x33b61: 0x6de1ee20, 0x33b62: 0x6de1f020, 0x33b63: 0x6de1f220, + 0x33b64: 0x6de1f420, 0x33b65: 0x6de1f620, 0x33b66: 0x6de1f820, 0x33b67: 0x6de1fa20, + 0x33b68: 0x6de1fc20, 0x33b69: 0x6de1fe20, 0x33b6a: 0x6de20020, 0x33b6b: 0x6de20220, + 0x33b6c: 0x6de20420, 0x33b6d: 0x6de20620, 0x33b6e: 0x6df9be20, 0x33b6f: 0x6df9c020, + 0x33b70: 0x6df9c220, 0x33b71: 0x6df9c420, 0x33b72: 0x6df9c620, 0x33b73: 0x6df9c820, + 0x33b74: 0x6df9ca20, 0x33b75: 0x6df9cc20, 0x33b76: 0x6df9ce20, 0x33b77: 0x6df9d020, + 0x33b78: 0x6df9d220, 0x33b79: 0x6df9d420, 0x33b7a: 0x6df9d620, 0x33b7b: 0x6da34a20, + 0x33b7c: 0x6e0d7a20, 0x33b7d: 0x6e0d7c20, 0x33b7e: 0x6e0d7e20, 0x33b7f: 0x6e0d8020, + // Block 0xcee, offset 0x33b80 + 0x33b80: 0x6e0d8220, 0x33b81: 0x6e0d8420, 0x33b82: 0x6e0d8620, 0x33b83: 0x6e0d8820, + 0x33b84: 0x6e0d8a20, 0x33b85: 0x6e0d8c20, 0x33b86: 0x6e0d8e20, 0x33b87: 0x6e1ce620, + 0x33b88: 0x6e1ce820, 0x33b89: 0x6e1cea20, 0x33b8a: 0x6e1cec20, 0x33b8b: 0x6e1cee20, + 0x33b8c: 0x6e1cf020, 0x33b8d: 0x6e1cf220, 0x33b8e: 0x6e1cf420, 0x33b8f: 0x6e1cf620, + 0x33b90: 0x6e1cf820, 0x33b91: 0x6e1cfa20, 0x33b92: 0x6e28b820, 0x33b93: 0x6e28ba20, + 0x33b94: 0x6e31f620, 0x33b95: 0x6e31f820, 0x33b96: 0x6e31fa20, 0x33b97: 0x6e31fc20, + 0x33b98: 0x6e31fe20, 0x33b99: 0x6e320020, 0x33b9a: 0x6e320220, 0x33b9b: 0x6e320420, + 0x33b9c: 0x6e320620, 0x33b9d: 0x6e387a20, 0x33b9e: 0x6e387c20, 0x33b9f: 0x6e387e20, + 0x33ba0: 0x6e402420, 0x33ba1: 0x6e402620, 0x33ba2: 0x6e429220, 0x33ba3: 0x6e402820, + 0x33ba4: 0x6e402a20, 0x33ba5: 0x6e462620, 0x33ba6: 0x6c01c020, 0x33ba7: 0x6c041a20, + 0x33ba8: 0x6c01c220, 0x33ba9: 0x6c109820, 0x33baa: 0x6c109a20, 0x33bab: 0x6c109c20, + 0x33bac: 0x6c109e20, 0x33bad: 0x6c10a020, 0x33bae: 0x6c1dd620, 0x33baf: 0x6c1dd820, + 0x33bb0: 0x6c1dda20, 0x33bb1: 0x6c317a20, 0x33bb2: 0x6c317c20, 0x33bb3: 0x6c317e20, + 0x33bb4: 0x6c318020, 0x33bb5: 0x6c318220, 0x33bb6: 0x6c318420, 0x33bb7: 0x6c4bce20, + 0x33bb8: 0x6c4bd020, 0x33bb9: 0x6c4bd220, 0x33bba: 0x6c4bd420, 0x33bbb: 0x6c4bd620, + 0x33bbc: 0x6c6de420, 0x33bbd: 0x6c6de620, 0x33bbe: 0x6c954e20, 0x33bbf: 0x6c955020, + // Block 0xcef, offset 0x33bc0 + 0x33bc0: 0x6c955220, 0x33bc1: 0x6cc16c20, 0x33bc2: 0x6d20ba20, 0x33bc3: 0x6d4e4a20, + 0x33bc4: 0x6d7ad420, 0x33bc5: 0x6d7ad620, 0x33bc6: 0x6d7ad820, 0x33bc7: 0x6da35420, + 0x33bc8: 0x6dc50820, 0x33bc9: 0x6de20c20, 0x33bca: 0x6de20e20, 0x33bcb: 0x6df9d820, + 0x33bcc: 0x6e1cfe20, 0x33bcd: 0x6e1d0020, 0x33bce: 0x6e320820, 0x33bcf: 0x6e402c20, + 0x33bd0: 0x6e442a20, 0x33bd1: 0x6c041e20, 0x33bd2: 0x6c042020, 0x33bd3: 0x6c042220, + 0x33bd4: 0x6c042420, 0x33bd5: 0x6c042620, 0x33bd6: 0x6c089820, 0x33bd7: 0x6c089a20, + 0x33bd8: 0x6c089c20, 0x33bd9: 0x6c089e20, 0x33bda: 0x6c10a620, 0x33bdb: 0x6c10a820, + 0x33bdc: 0x6c1de020, 0x33bdd: 0x6c1de220, 0x33bde: 0x6c1de420, 0x33bdf: 0x6c318620, + 0x33be0: 0x6c4bde20, 0x33be1: 0x6c6dee20, 0x33be2: 0x6c6df020, 0x33be3: 0x6c955420, + 0x33be4: 0x6cc17220, 0x33be5: 0x6cc17420, 0x33be6: 0x6cf11220, 0x33be7: 0x6cf11420, + 0x33be8: 0x6d4e4e20, 0x33be9: 0x6d4e5020, 0x33bea: 0x6d4e5220, 0x33beb: 0x6d4e5420, + 0x33bec: 0x6d7ada20, 0x33bed: 0x6da35620, 0x33bee: 0x6dc50a20, 0x33bef: 0x6de21020, + 0x33bf0: 0x6e0d9220, 0x33bf1: 0x6e0d9420, 0x33bf2: 0x6e0d9620, 0x33bf3: 0x6c042a20, + 0x33bf4: 0x6c08a220, 0x33bf5: 0x6c08a420, 0x33bf6: 0x6c10ac20, 0x33bf7: 0x6c318c20, + 0x33bf8: 0x6c318e20, 0x33bf9: 0x6c4bea20, 0x33bfa: 0x6c4bec20, 0x33bfb: 0x6c4bee20, + 0x33bfc: 0x6c6df420, 0x33bfd: 0x6c6df620, 0x33bfe: 0x6c6df820, 0x33bff: 0x6c6dfa20, + // Block 0xcf0, offset 0x33c00 + 0x33c00: 0x6c955a20, 0x33c01: 0x6c955c20, 0x33c02: 0x6c955e20, 0x33c03: 0x6c956020, + 0x33c04: 0x6c956220, 0x33c05: 0x6cc17a20, 0x33c06: 0x6cc17c20, 0x33c07: 0x6cc17e20, + 0x33c08: 0x6cc18020, 0x33c09: 0x6cc18220, 0x33c0a: 0x6cf11820, 0x33c0b: 0x6d4e5620, + 0x33c0c: 0x6d4e5820, 0x33c0d: 0x6d7ae020, 0x33c0e: 0x6da35a20, 0x33c0f: 0x6d7ae220, + 0x33c10: 0x6dc50e20, 0x33c11: 0x6df9da20, 0x33c12: 0x6c08b220, 0x33c13: 0x6c08b420, + 0x33c14: 0x6c08b620, 0x33c15: 0x6c10ba20, 0x33c16: 0x6c10bc20, 0x33c17: 0x6c10be20, + 0x33c18: 0x6c10c020, 0x33c19: 0x6c10c220, 0x33c1a: 0x6c10c420, 0x33c1b: 0x6c10c620, + 0x33c1c: 0x6c10c820, 0x33c1d: 0x6c10ca20, 0x33c1e: 0x6c10cc20, 0x33c1f: 0x6c10ce20, + 0x33c20: 0x6c10d020, 0x33c21: 0x6c10d220, 0x33c22: 0x6c10d420, 0x33c23: 0x6c10d620, + 0x33c24: 0x6c10d820, 0x33c25: 0x6c1e0620, 0x33c26: 0x6c1e0820, 0x33c27: 0x6c1e0a20, + 0x33c28: 0x6c1e0c20, 0x33c29: 0x6c1e0e20, 0x33c2a: 0x6c1e1020, 0x33c2b: 0x6c1e1220, + 0x33c2c: 0x6c1e1420, 0x33c2d: 0x6c1e1620, 0x33c2e: 0x6c1e1820, 0x33c2f: 0x6c1e1a20, + 0x33c30: 0x6c1e1c20, 0x33c31: 0x6c1e1e20, 0x33c32: 0x6c1e2020, 0x33c33: 0x6c1e2220, + 0x33c34: 0x6c1e2420, 0x33c35: 0x6c1e2620, 0x33c36: 0x6c1e2820, 0x33c37: 0x6c1e2a20, + 0x33c38: 0x6c1e2c20, 0x33c39: 0x6c1e2e20, 0x33c3a: 0x6c1e3020, 0x33c3b: 0x6c31b220, + 0x33c3c: 0x6c31b420, 0x33c3d: 0x6c31b620, 0x33c3e: 0x6c31b820, 0x33c3f: 0x6c31ba20, + // Block 0xcf1, offset 0x33c40 + 0x33c40: 0x6c31bc20, 0x33c41: 0x6c31be20, 0x33c42: 0x6c31c020, 0x33c43: 0x6c31c220, + 0x33c44: 0x6c31c420, 0x33c45: 0x6c31c620, 0x33c46: 0x6c31c820, 0x33c47: 0x6c31ca20, + 0x33c48: 0x6c31cc20, 0x33c49: 0x6c31ce20, 0x33c4a: 0x6c31d020, 0x33c4b: 0x6c31d220, + 0x33c4c: 0x6c31d420, 0x33c4d: 0x6c31d620, 0x33c4e: 0x6c31d820, 0x33c4f: 0x6c31da20, + 0x33c50: 0x6c4c1220, 0x33c51: 0x6c4c1420, 0x33c52: 0x6c4c1620, 0x33c53: 0x6c4c1820, + 0x33c54: 0x6c4c1a20, 0x33c55: 0x6c4c1c20, 0x33c56: 0x6c4c1e20, 0x33c57: 0x6c4c2020, + 0x33c58: 0x6c4c2220, 0x33c59: 0x6c4c2420, 0x33c5a: 0x6c4c2620, 0x33c5b: 0x6c4c2820, + 0x33c5c: 0x6c4c2a20, 0x33c5d: 0x6c4c2c20, 0x33c5e: 0x6c4c2e20, 0x33c5f: 0x6c4c3020, + 0x33c60: 0x6c4c3220, 0x33c61: 0x6c4c3420, 0x33c62: 0x6c4c3620, 0x33c63: 0x6c4c3820, + 0x33c64: 0x6c4c3a20, 0x33c65: 0x6c4c3c20, 0x33c66: 0x6c4c3e20, 0x33c67: 0x6c4c4020, + 0x33c68: 0x6c4c4220, 0x33c69: 0x6c4c4420, 0x33c6a: 0x6c4c4620, 0x33c6b: 0x6c4c4820, + 0x33c6c: 0x6c4c4a20, 0x33c6d: 0x6c4c4c20, 0x33c6e: 0x6c4c4e20, 0x33c6f: 0x6c4c5020, + 0x33c70: 0x6c4c5220, 0x33c71: 0x6c6e1420, 0x33c72: 0x6c6e1620, 0x33c73: 0x6c6e1820, + 0x33c74: 0x6c6e1a20, 0x33c75: 0x6c6e1c20, 0x33c76: 0x6c6e1e20, 0x33c77: 0x6c6e2020, + 0x33c78: 0x6c6e2220, 0x33c79: 0x6c6e2420, 0x33c7a: 0x6c6e2620, 0x33c7b: 0x6c6e2820, + 0x33c7c: 0x6c6e2a20, 0x33c7d: 0x6c6e2c20, 0x33c7e: 0x6c6e2e20, 0x33c7f: 0x6c6e3020, + // Block 0xcf2, offset 0x33c80 + 0x33c80: 0x6c6e3220, 0x33c81: 0x6c6e3420, 0x33c82: 0x6c6e3620, 0x33c83: 0x6c6e3820, + 0x33c84: 0x6c6e3a20, 0x33c85: 0x6c6e3c20, 0x33c86: 0x6c6e3e20, 0x33c87: 0x6c6e4020, + 0x33c88: 0x6c6e4220, 0x33c89: 0x6c6e4420, 0x33c8a: 0x6c6e4620, 0x33c8b: 0x6c6e4820, + 0x33c8c: 0x6c6e4a20, 0x33c8d: 0x6c958620, 0x33c8e: 0x6c958820, 0x33c8f: 0x6c958a20, + 0x33c90: 0x6c958c20, 0x33c91: 0x6c958e20, 0x33c92: 0x6c959020, 0x33c93: 0x6c959220, + 0x33c94: 0x6c959420, 0x33c95: 0x6c959620, 0x33c96: 0x6c959820, 0x33c97: 0x6c959a20, + 0x33c98: 0x6c959c20, 0x33c99: 0x6c959e20, 0x33c9a: 0x6c95a020, 0x33c9b: 0x6c95a220, + 0x33c9c: 0x6c95a420, 0x33c9d: 0x6c95a620, 0x33c9e: 0x6c95a820, 0x33c9f: 0x6c95aa20, + 0x33ca0: 0x6c95ac20, 0x33ca1: 0x6c95ae20, 0x33ca2: 0x6c95b020, 0x33ca3: 0x6c95b220, + 0x33ca4: 0x6c95b420, 0x33ca5: 0x6c95b620, 0x33ca6: 0x6c95b820, 0x33ca7: 0x6c95ba20, + 0x33ca8: 0x6c95bc20, 0x33ca9: 0x6c95be20, 0x33caa: 0x6c95c020, 0x33cab: 0x6cc1ae20, + 0x33cac: 0x6cc1b020, 0x33cad: 0x6cc1b220, 0x33cae: 0x6cc1b420, 0x33caf: 0x6cc1b620, + 0x33cb0: 0x6cc1b820, 0x33cb1: 0x6cc1ba20, 0x33cb2: 0x6cc1bc20, 0x33cb3: 0x6cc1be20, + 0x33cb4: 0x6cc1c020, 0x33cb5: 0x6cc1c220, 0x33cb6: 0x6cc1c420, 0x33cb7: 0x6cc1c620, + 0x33cb8: 0x6cc1c820, 0x33cb9: 0x6cc1ca20, 0x33cba: 0x6cc1cc20, 0x33cbb: 0x6cc1ce20, + 0x33cbc: 0x6cc1d020, 0x33cbd: 0x6cc1d220, 0x33cbe: 0x6cc1d420, 0x33cbf: 0x6cc1d620, + // Block 0xcf3, offset 0x33cc0 + 0x33cc0: 0x6cc1d820, 0x33cc1: 0x6cc1da20, 0x33cc2: 0x6cc1dc20, 0x33cc3: 0x6cc1de20, + 0x33cc4: 0x6cc1e020, 0x33cc5: 0x6cc1e220, 0x33cc6: 0x6cc1e420, 0x33cc7: 0x6cc1e620, + 0x33cc8: 0x6cc1e820, 0x33cc9: 0x6cc1ea20, 0x33cca: 0x6cf13020, 0x33ccb: 0x6cf13220, + 0x33ccc: 0x6cf13420, 0x33ccd: 0x6cf13620, 0x33cce: 0x6cf13820, 0x33ccf: 0x6cf13a20, + 0x33cd0: 0x6cf13c20, 0x33cd1: 0x6cf13e20, 0x33cd2: 0x6cf14020, 0x33cd3: 0x6cf14220, + 0x33cd4: 0x6cf14420, 0x33cd5: 0x6cf14620, 0x33cd6: 0x6cf14820, 0x33cd7: 0x6cf14a20, + 0x33cd8: 0x6cf14c20, 0x33cd9: 0x6cf14e20, 0x33cda: 0x6cf15020, 0x33cdb: 0x6cf15220, + 0x33cdc: 0x6cf15420, 0x33cdd: 0x6cf15620, 0x33cde: 0x6cf15820, 0x33cdf: 0x6d20dc20, + 0x33ce0: 0x6d20de20, 0x33ce1: 0x6d20e020, 0x33ce2: 0x6d20e220, 0x33ce3: 0x6d20e420, + 0x33ce4: 0x6d20e620, 0x33ce5: 0x6d20e820, 0x33ce6: 0x6d20ea20, 0x33ce7: 0x6d20ec20, + 0x33ce8: 0x6d20ee20, 0x33ce9: 0x6d20f020, 0x33cea: 0x6d20f220, 0x33ceb: 0x6d20f420, + 0x33cec: 0x6d20f620, 0x33ced: 0x6d20f820, 0x33cee: 0x6d20fa20, 0x33cef: 0x6d20fc20, + 0x33cf0: 0x6d20fe20, 0x33cf1: 0x6d210020, 0x33cf2: 0x6d210220, 0x33cf3: 0x6d4e7220, + 0x33cf4: 0x6d4e7420, 0x33cf5: 0x6d4e7620, 0x33cf6: 0x6d4e7820, 0x33cf7: 0x6d4e7a20, + 0x33cf8: 0x6d4e7c20, 0x33cf9: 0x6d4e7e20, 0x33cfa: 0x6d4e8020, 0x33cfb: 0x6d4e8220, + 0x33cfc: 0x6d4e8420, 0x33cfd: 0x6d4e8620, 0x33cfe: 0x6d4e8820, 0x33cff: 0x6d4e8a20, + // Block 0xcf4, offset 0x33d00 + 0x33d00: 0x6d4e8c20, 0x33d01: 0x6d4e8e20, 0x33d02: 0x6d4e9020, 0x33d03: 0x6d4e9220, + 0x33d04: 0x6d4e9420, 0x33d05: 0x6d4e9620, 0x33d06: 0x6d4e9820, 0x33d07: 0x6d4e9a20, + 0x33d08: 0x6d4e9c20, 0x33d09: 0x6d4e9e20, 0x33d0a: 0x6d4ea020, 0x33d0b: 0x6d4ea220, + 0x33d0c: 0x6d4ea420, 0x33d0d: 0x6d7af420, 0x33d0e: 0x6d7af620, 0x33d0f: 0x6d7af820, + 0x33d10: 0x6d7afa20, 0x33d11: 0x6d7afc20, 0x33d12: 0x6d7afe20, 0x33d13: 0x6d7b0020, + 0x33d14: 0x6d7b0220, 0x33d15: 0x6d7b0420, 0x33d16: 0x6d7b0620, 0x33d17: 0x6d7b0820, + 0x33d18: 0x6d7b0a20, 0x33d19: 0x6d7b0c20, 0x33d1a: 0x6d7b0e20, 0x33d1b: 0x6d7b1020, + 0x33d1c: 0x6d7b1220, 0x33d1d: 0x6d7b1420, 0x33d1e: 0x6d7b1620, 0x33d1f: 0x6da36620, + 0x33d20: 0x6da36820, 0x33d21: 0x6da36a20, 0x33d22: 0x6da36c20, 0x33d23: 0x6da36e20, + 0x33d24: 0x6da37020, 0x33d25: 0x6da37220, 0x33d26: 0x6da37420, 0x33d27: 0x6da37620, + 0x33d28: 0x6da37820, 0x33d29: 0x6dc51420, 0x33d2a: 0x6dc51620, 0x33d2b: 0x6dc51820, + 0x33d2c: 0x6dc51a20, 0x33d2d: 0x6de21420, 0x33d2e: 0x6de21620, 0x33d2f: 0x6de21820, + 0x33d30: 0x6de21a20, 0x33d31: 0x6de21c20, 0x33d32: 0x6de21e20, 0x33d33: 0x6de22020, + 0x33d34: 0x6de22220, 0x33d35: 0x6de22420, 0x33d36: 0x6de22620, 0x33d37: 0x6de22820, + 0x33d38: 0x6df9e220, 0x33d39: 0x6df9e420, 0x33d3a: 0x6df9e620, 0x33d3b: 0x6e0d9820, + 0x33d3c: 0x6e0d9a20, 0x33d3d: 0x6e0d9c20, 0x33d3e: 0x6e1d0820, 0x33d3f: 0x6e1d0a20, + // Block 0xcf5, offset 0x33d40 + 0x33d40: 0x6e1d0c20, 0x33d41: 0x6e1d0e20, 0x33d42: 0x6e28bc20, 0x33d43: 0x6e320a20, + 0x33d44: 0x6e320c20, 0x33d45: 0x6e320e20, 0x33d46: 0x6e321020, 0x33d47: 0x6e402e20, + 0x33d48: 0x6e403020, 0x33d49: 0x6c08bc20, 0x33d4a: 0x6c1e3220, 0x33d4b: 0x6c1e3420, + 0x33d4c: 0x6c1e3620, 0x33d4d: 0x6c31e020, 0x33d4e: 0x6c31e220, 0x33d4f: 0x6c31e420, + 0x33d50: 0x6c31e620, 0x33d51: 0x6c4c5420, 0x33d52: 0x6c4c5620, 0x33d53: 0x6c4c5820, + 0x33d54: 0x6c4c5a20, 0x33d55: 0x6c4c5c20, 0x33d56: 0x6c6e4e20, 0x33d57: 0x6c6e5020, + 0x33d58: 0x6c6e5220, 0x33d59: 0x6c6e5420, 0x33d5a: 0x6c95cc20, 0x33d5b: 0x6cc1f420, + 0x33d5c: 0x6cc1f620, 0x33d5d: 0x6cc1f820, 0x33d5e: 0x6cf15c20, 0x33d5f: 0x6cf15e20, + 0x33d60: 0x6cf16020, 0x33d61: 0x6d18a420, 0x33d62: 0x6d210820, 0x33d63: 0x6d1e2a20, + 0x33d64: 0x6d210a20, 0x33d65: 0x6d4eaa20, 0x33d66: 0x6d7b1c20, 0x33d67: 0x6d7b1e20, + 0x33d68: 0x6d7b2020, 0x33d69: 0x6d7b2220, 0x33d6a: 0x6dc51c20, 0x33d6b: 0x6de22c20, + 0x33d6c: 0x6df9ea20, 0x33d6d: 0x6e0d9e20, 0x33d6e: 0x6e28be20, 0x33d6f: 0x6c043420, + 0x33d70: 0x6c043620, 0x33d71: 0x6c043820, 0x33d72: 0x6c08c020, 0x33d73: 0x6c08c220, + 0x33d74: 0x6c08c420, 0x33d75: 0x6c08c620, 0x33d76: 0x6c10e020, 0x33d77: 0x6c1e3a20, + 0x33d78: 0x6c1e3c20, 0x33d79: 0x6c1e3e20, 0x33d7a: 0x6c1e4020, 0x33d7b: 0x6c31e820, + 0x33d7c: 0x6c31ea20, 0x33d7d: 0x6c31ec20, 0x33d7e: 0x6c31ee20, 0x33d7f: 0x6c4c6020, + // Block 0xcf6, offset 0x33d80 + 0x33d80: 0x6c4b0c20, 0x33d81: 0x6c6e5620, 0x33d82: 0x6c4c6220, 0x33d83: 0x6c6e5820, + 0x33d84: 0x6c6e5a20, 0x33d85: 0x6c6e5c20, 0x33d86: 0x6c6e5e20, 0x33d87: 0x6c95d220, + 0x33d88: 0x6c95d420, 0x33d89: 0x6c95d620, 0x33d8a: 0x6cc20220, 0x33d8b: 0x6cf16820, + 0x33d8c: 0x6d210e20, 0x33d8d: 0x6d211020, 0x33d8e: 0x6d211220, 0x33d8f: 0x6d211420, + 0x33d90: 0x6d4eae20, 0x33d91: 0x6d4eb020, 0x33d92: 0x6d4eb220, 0x33d93: 0x6d4eb420, + 0x33d94: 0x6da2ce20, 0x33d95: 0x6dc2b220, 0x33d96: 0x6e1d1020, 0x33d97: 0x6c10f020, + 0x33d98: 0x6c10f220, 0x33d99: 0x6c10f420, 0x33d9a: 0x6c10f620, 0x33d9b: 0x6c10f820, + 0x33d9c: 0x6c10fa20, 0x33d9d: 0x6c10fc20, 0x33d9e: 0x6c10fe20, 0x33d9f: 0x6c110020, + 0x33da0: 0x6c110220, 0x33da1: 0x6c110420, 0x33da2: 0x6c110620, 0x33da3: 0x6c1e6220, + 0x33da4: 0x6c1e6420, 0x33da5: 0x6c1e6620, 0x33da6: 0x6c1e6820, 0x33da7: 0x6c1e6a20, + 0x33da8: 0x6c1e6c20, 0x33da9: 0x6c1e6e20, 0x33daa: 0x6c1e7020, 0x33dab: 0x6c1e7220, + 0x33dac: 0x6c1e7420, 0x33dad: 0x6c1e7620, 0x33dae: 0x6c1e7820, 0x33daf: 0x6c1e7a20, + 0x33db0: 0x6c1e7c20, 0x33db1: 0x6c1e7e20, 0x33db2: 0x6c321420, 0x33db3: 0x6c321620, + 0x33db4: 0x6c321820, 0x33db5: 0x6c321a20, 0x33db6: 0x6c321c20, 0x33db7: 0x6c321e20, + 0x33db8: 0x6c322020, 0x33db9: 0x6c322220, 0x33dba: 0x6c322420, 0x33dbb: 0x6c322620, + 0x33dbc: 0x6c322820, 0x33dbd: 0x6c322a20, 0x33dbe: 0x6c322c20, 0x33dbf: 0x6c322e20, + // Block 0xcf7, offset 0x33dc0 + 0x33dc0: 0x6c323020, 0x33dc1: 0x6c323220, 0x33dc2: 0x6c323420, 0x33dc3: 0x6c323620, + 0x33dc4: 0x6c323820, 0x33dc5: 0x6c323a20, 0x33dc6: 0x6c323c20, 0x33dc7: 0x6c4c8420, + 0x33dc8: 0x6c4c8620, 0x33dc9: 0x6c4c8820, 0x33dca: 0x6c4c8a20, 0x33dcb: 0x6c4c8c20, + 0x33dcc: 0x6c4c8e20, 0x33dcd: 0x6c4c9020, 0x33dce: 0x6c4c9220, 0x33dcf: 0x6c4c9420, + 0x33dd0: 0x6c4c9620, 0x33dd1: 0x6c4c9820, 0x33dd2: 0x6c4c9a20, 0x33dd3: 0x6c4c9c20, + 0x33dd4: 0x6c4c9e20, 0x33dd5: 0x6c4ca020, 0x33dd6: 0x6c4ca220, 0x33dd7: 0x6c4ca420, + 0x33dd8: 0x6c4ca620, 0x33dd9: 0x6c6e7c20, 0x33dda: 0x6c6e7e20, 0x33ddb: 0x6c6e8020, + 0x33ddc: 0x6c6e8220, 0x33ddd: 0x6c6e8420, 0x33dde: 0x6c6e8620, 0x33ddf: 0x6c6e8820, + 0x33de0: 0x6c6e8a20, 0x33de1: 0x6c6e8c20, 0x33de2: 0x6c6e8e20, 0x33de3: 0x6c6e9020, + 0x33de4: 0x6c6e9220, 0x33de5: 0x6c6e9420, 0x33de6: 0x6c6e9620, 0x33de7: 0x6c6e9820, + 0x33de8: 0x6c6e9a20, 0x33de9: 0x6c6e9c20, 0x33dea: 0x6c6e9e20, 0x33deb: 0x6c6ea020, + 0x33dec: 0x6c6ea220, 0x33ded: 0x6c6ea420, 0x33dee: 0x6c6ea620, 0x33def: 0x6c6ea820, + 0x33df0: 0x6c6eaa20, 0x33df1: 0x6c6eac20, 0x33df2: 0x6c6bf220, 0x33df3: 0x6c95fa20, + 0x33df4: 0x6c95fc20, 0x33df5: 0x6c95fe20, 0x33df6: 0x6c960020, 0x33df7: 0x6c960220, + 0x33df8: 0x6c960420, 0x33df9: 0x6c960620, 0x33dfa: 0x6c960820, 0x33dfb: 0x6c960a20, + 0x33dfc: 0x6c960c20, 0x33dfd: 0x6c960e20, 0x33dfe: 0x6c961020, 0x33dff: 0x6c961220, + // Block 0xcf8, offset 0x33e00 + 0x33e00: 0x6c961420, 0x33e01: 0x6c961620, 0x33e02: 0x6c961820, 0x33e03: 0x6c961a20, + 0x33e04: 0x6c961c20, 0x33e05: 0x6c961e20, 0x33e06: 0x6c962020, 0x33e07: 0x6c962220, + 0x33e08: 0x6c962420, 0x33e09: 0x6c962620, 0x33e0a: 0x6c962820, 0x33e0b: 0x6c962a20, + 0x33e0c: 0x6c962c20, 0x33e0d: 0x6c962e20, 0x33e0e: 0x6c963020, 0x33e0f: 0x6c963220, + 0x33e10: 0x6c963420, 0x33e11: 0x6c963620, 0x33e12: 0x6c963820, 0x33e13: 0x6c963a20, + 0x33e14: 0x6c963c20, 0x33e15: 0x6c963e20, 0x33e16: 0x6cb78820, 0x33e17: 0x6c964020, + 0x33e18: 0x6c964220, 0x33e19: 0x6c964420, 0x33e1a: 0x6c964620, 0x33e1b: 0x6cc21a20, + 0x33e1c: 0x6cc21c20, 0x33e1d: 0x6cc21e20, 0x33e1e: 0x6cc22020, 0x33e1f: 0x6cc22220, + 0x33e20: 0x6cc22420, 0x33e21: 0x6cc22620, 0x33e22: 0x6cc22820, 0x33e23: 0x6cc22a20, + 0x33e24: 0x6cc22c20, 0x33e25: 0x6cc22e20, 0x33e26: 0x6cc23020, 0x33e27: 0x6cc23220, + 0x33e28: 0x6cc23420, 0x33e29: 0x6cc23620, 0x33e2a: 0x6cc23820, 0x33e2b: 0x6cc23a20, + 0x33e2c: 0x6cc23c20, 0x33e2d: 0x6cc23e20, 0x33e2e: 0x6cc24020, 0x33e2f: 0x6cc24220, + 0x33e30: 0x6cc24420, 0x33e31: 0x6cc24620, 0x33e32: 0x6cc24820, 0x33e33: 0x6cc24a20, + 0x33e34: 0x6cc24c20, 0x33e35: 0x6cc24e20, 0x33e36: 0x6cc25020, 0x33e37: 0x6cc25220, + 0x33e38: 0x6cc25420, 0x33e39: 0x6cc25620, 0x33e3a: 0x6cc25820, 0x33e3b: 0x6cc25a20, + 0x33e3c: 0x6cf17a20, 0x33e3d: 0x6cc25c20, 0x33e3e: 0x6cc25e20, 0x33e3f: 0x6cf17c20, + // Block 0xcf9, offset 0x33e40 + 0x33e40: 0x6cf17e20, 0x33e41: 0x6cf18020, 0x33e42: 0x6cf18220, 0x33e43: 0x6cf18420, + 0x33e44: 0x6cf18620, 0x33e45: 0x6cf18820, 0x33e46: 0x6cf18a20, 0x33e47: 0x6cf18c20, + 0x33e48: 0x6cf18e20, 0x33e49: 0x6cf19020, 0x33e4a: 0x6cf19220, 0x33e4b: 0x6cf19420, + 0x33e4c: 0x6cf19620, 0x33e4d: 0x6cf19820, 0x33e4e: 0x6cf19a20, 0x33e4f: 0x6cf19c20, + 0x33e50: 0x6cf19e20, 0x33e51: 0x6cf1a020, 0x33e52: 0x6cf1a220, 0x33e53: 0x6cf1a420, + 0x33e54: 0x6cf1a620, 0x33e55: 0x6d213620, 0x33e56: 0x6d213820, 0x33e57: 0x6d213a20, + 0x33e58: 0x6d213c20, 0x33e59: 0x6d213e20, 0x33e5a: 0x6d214020, 0x33e5b: 0x6d214220, + 0x33e5c: 0x6d214420, 0x33e5d: 0x6d214620, 0x33e5e: 0x6d214820, 0x33e5f: 0x6d214a20, + 0x33e60: 0x6d214c20, 0x33e61: 0x6d214e20, 0x33e62: 0x6d215020, 0x33e63: 0x6d215220, + 0x33e64: 0x6d215420, 0x33e65: 0x6d215620, 0x33e66: 0x6d215820, 0x33e67: 0x6d215a20, + 0x33e68: 0x6d215c20, 0x33e69: 0x6d215e20, 0x33e6a: 0x6d216020, 0x33e6b: 0x6d216220, + 0x33e6c: 0x6d216420, 0x33e6d: 0x6d4ed020, 0x33e6e: 0x6d4ed220, 0x33e6f: 0x6d4ed420, + 0x33e70: 0x6d4ed620, 0x33e71: 0x6d4ed820, 0x33e72: 0x6d4eda20, 0x33e73: 0x6d4edc20, + 0x33e74: 0x6d4ede20, 0x33e75: 0x6d4ee020, 0x33e76: 0x6d4ee220, 0x33e77: 0x6d4ee420, + 0x33e78: 0x6d4ee620, 0x33e79: 0x6d4ee820, 0x33e7a: 0x6d4eea20, 0x33e7b: 0x6d4eec20, + 0x33e7c: 0x6d4eee20, 0x33e7d: 0x6d4ef020, 0x33e7e: 0x6d4ef220, 0x33e7f: 0x6d4ef420, + // Block 0xcfa, offset 0x33e80 + 0x33e80: 0x6d4ef620, 0x33e81: 0x6d4ef820, 0x33e82: 0x6d7b3a20, 0x33e83: 0x6d7b3c20, + 0x33e84: 0x6d7b3e20, 0x33e85: 0x6d7b4020, 0x33e86: 0x6d7b4220, 0x33e87: 0x6d7b4420, + 0x33e88: 0x6d7b4620, 0x33e89: 0x6d7b4820, 0x33e8a: 0x6d7b4a20, 0x33e8b: 0x6d7b4c20, + 0x33e8c: 0x6d7b4e20, 0x33e8d: 0x6d7b5020, 0x33e8e: 0x6d7b5220, 0x33e8f: 0x6d7b5420, + 0x33e90: 0x6d7b5620, 0x33e91: 0x6da37c20, 0x33e92: 0x6da37e20, 0x33e93: 0x6da38020, + 0x33e94: 0x6da38220, 0x33e95: 0x6da38420, 0x33e96: 0x6da38620, 0x33e97: 0x6da38820, + 0x33e98: 0x6da38a20, 0x33e99: 0x6da38c20, 0x33e9a: 0x6da38e20, 0x33e9b: 0x6da39020, + 0x33e9c: 0x6db42620, 0x33e9d: 0x6da39220, 0x33e9e: 0x6da39420, 0x33e9f: 0x6da39620, + 0x33ea0: 0x6da39820, 0x33ea1: 0x6dc52220, 0x33ea2: 0x6dc52420, 0x33ea3: 0x6dc52620, + 0x33ea4: 0x6dc52820, 0x33ea5: 0x6dc52a20, 0x33ea6: 0x6dc52c20, 0x33ea7: 0x6dc52e20, + 0x33ea8: 0x6dc53020, 0x33ea9: 0x6dc53220, 0x33eaa: 0x6dc53420, 0x33eab: 0x6dc53620, + 0x33eac: 0x6dc53820, 0x33ead: 0x6dc53a20, 0x33eae: 0x6de23a20, 0x33eaf: 0x6de23c20, + 0x33eb0: 0x6de23e20, 0x33eb1: 0x6de24020, 0x33eb2: 0x6de24220, 0x33eb3: 0x6de24420, + 0x33eb4: 0x6de24620, 0x33eb5: 0x6de24820, 0x33eb6: 0x6de24a20, 0x33eb7: 0x6de24c20, + 0x33eb8: 0x6de24e20, 0x33eb9: 0x6de25020, 0x33eba: 0x6de25220, 0x33ebb: 0x6df9f420, + 0x33ebc: 0x6df9f620, 0x33ebd: 0x6df9f820, 0x33ebe: 0x6df9fa20, 0x33ebf: 0x6df9fc20, + // Block 0xcfb, offset 0x33ec0 + 0x33ec0: 0x6df9fe20, 0x33ec1: 0x6dfa0020, 0x33ec2: 0x6dfa0220, 0x33ec3: 0x6dfa0420, + 0x33ec4: 0x6e0da220, 0x33ec5: 0x6e0da420, 0x33ec6: 0x6e0da620, 0x33ec7: 0x6e0f2020, + 0x33ec8: 0x6e1d1420, 0x33ec9: 0x6e1d1620, 0x33eca: 0x6e1d1820, 0x33ecb: 0x6e1d1a20, + 0x33ecc: 0x6e1d1c20, 0x33ecd: 0x6e28c020, 0x33ece: 0x6e28c220, 0x33ecf: 0x6e28c420, + 0x33ed0: 0x6e28c620, 0x33ed1: 0x6e28c820, 0x33ed2: 0x6e321220, 0x33ed3: 0x6e3d2220, + 0x33ed4: 0x6e403220, 0x33ed5: 0x6e403420, 0x33ed6: 0x6e429420, 0x33ed7: 0x6c043a20, + 0x33ed8: 0x6c08d220, 0x33ed9: 0x6c08d420, 0x33eda: 0x6c08d620, 0x33edb: 0x6c1e8620, + 0x33edc: 0x6c110c20, 0x33edd: 0x6c1e8820, 0x33ede: 0x6c1e8a20, 0x33edf: 0x6c324a20, + 0x33ee0: 0x6c4cb420, 0x33ee1: 0x6c4cb620, 0x33ee2: 0x6c4cb820, 0x33ee3: 0x6c4cba20, + 0x33ee4: 0x6c4cbc20, 0x33ee5: 0x6c4cbe20, 0x33ee6: 0x6c6ebc20, 0x33ee7: 0x6c6ebe20, + 0x33ee8: 0x6c965220, 0x33ee9: 0x6c965420, 0x33eea: 0x6c965620, 0x33eeb: 0x6cc26620, + 0x33eec: 0x6c01da20, 0x33eed: 0x6c044020, 0x33eee: 0x6c08dc20, 0x33eef: 0x6c08de20, + 0x33ef0: 0x6c111020, 0x33ef1: 0x6c111220, 0x33ef2: 0x6c111420, 0x33ef3: 0x6c1e9620, + 0x33ef4: 0x6c4cc620, 0x33ef5: 0x6c1e9820, 0x33ef6: 0x6c1e9a20, 0x33ef7: 0x6c1e9c20, + 0x33ef8: 0x6c1e9e20, 0x33ef9: 0x6c1ea020, 0x33efa: 0x6c1ea220, 0x33efb: 0x6c324e20, + 0x33efc: 0x6c4cc820, 0x33efd: 0x6c325020, 0x33efe: 0x6c325220, 0x33eff: 0x6c325420, + // Block 0xcfc, offset 0x33f00 + 0x33f00: 0x6c325620, 0x33f01: 0x6c325820, 0x33f02: 0x6c4cca20, 0x33f03: 0x6c4ccc20, + 0x33f04: 0x6c4cce20, 0x33f05: 0x6c4cd020, 0x33f06: 0x6c4cd220, 0x33f07: 0x6c4cd420, + 0x33f08: 0x6c4cd620, 0x33f09: 0x6c4cd820, 0x33f0a: 0x6c4cda20, 0x33f0b: 0x6c4cdc20, + 0x33f0c: 0x6c4cde20, 0x33f0d: 0x6c6ec420, 0x33f0e: 0x6c6ec620, 0x33f0f: 0x6c6ec820, + 0x33f10: 0x6c6eca20, 0x33f11: 0x6c6ecc20, 0x33f12: 0x6c6ece20, 0x33f13: 0x6c6ed020, + 0x33f14: 0x6c965a20, 0x33f15: 0x6c965c20, 0x33f16: 0x6c965e20, 0x33f17: 0x6c966020, + 0x33f18: 0x6c966220, 0x33f19: 0x6c966420, 0x33f1a: 0x6cc26820, 0x33f1b: 0x6cc26a20, + 0x33f1c: 0x6cc26c20, 0x33f1d: 0x6cc26e20, 0x33f1e: 0x6cc27020, 0x33f1f: 0x6cc27220, + 0x33f20: 0x6cc27420, 0x33f21: 0x6cc27620, 0x33f22: 0x6cf1ae20, 0x33f23: 0x6cf1b020, + 0x33f24: 0x6cf1b220, 0x33f25: 0x6cf1b420, 0x33f26: 0x6d217620, 0x33f27: 0x6d217820, + 0x33f28: 0x6d217a20, 0x33f29: 0x6d217c20, 0x33f2a: 0x6d217e20, 0x33f2b: 0x6d218020, + 0x33f2c: 0x6d4f0220, 0x33f2d: 0x6d1a0c20, 0x33f2e: 0x6d7b5e20, 0x33f2f: 0x6d7b6020, + 0x33f30: 0x6d7b6220, 0x33f31: 0x6d7b6420, 0x33f32: 0x6da3a020, 0x33f33: 0x6da3a220, + 0x33f34: 0x6da3a420, 0x33f35: 0x6de25620, 0x33f36: 0x6e1d1e20, 0x33f37: 0x6e403620, + 0x33f38: 0x6e403820, 0x33f39: 0x6e442c20, 0x33f3a: 0x6c01de20, 0x33f3b: 0x6c044420, + 0x33f3c: 0x6c044620, 0x33f3d: 0x6c111c20, 0x33f3e: 0x6c111e20, 0x33f3f: 0x6c1ea820, + // Block 0xcfd, offset 0x33f40 + 0x33f40: 0x6c1eaa20, 0x33f41: 0x6c1eac20, 0x33f42: 0x6c1eae20, 0x33f43: 0x6c1eb020, + 0x33f44: 0x6c325c20, 0x33f45: 0x6c325e20, 0x33f46: 0x6c4ce220, 0x33f47: 0x6c4ce420, + 0x33f48: 0x6c4ce620, 0x33f49: 0x6c4ce820, 0x33f4a: 0x6c4cea20, 0x33f4b: 0x6c6ed420, + 0x33f4c: 0x6c6ed620, 0x33f4d: 0x6c966620, 0x33f4e: 0x6cc27c20, 0x33f4f: 0x6cf1bc20, + 0x33f50: 0x6cf1be20, 0x33f51: 0x6d4f0420, 0x33f52: 0x6d4f0620, 0x33f53: 0x6d7b6620, + 0x33f54: 0x6da3a820, 0x33f55: 0x6dc53e20, 0x33f56: 0x6e0daa20, 0x33f57: 0x6c01e220, + 0x33f58: 0x6c01e420, 0x33f59: 0x6c045020, 0x33f5a: 0x6c045220, 0x33f5b: 0x6c045420, + 0x33f5c: 0x6c045620, 0x33f5d: 0x6c045820, 0x33f5e: 0x6c045a20, 0x33f5f: 0x6c045c20, + 0x33f60: 0x6c045e20, 0x33f61: 0x6c046020, 0x33f62: 0x6c08e620, 0x33f63: 0x6c08e820, + 0x33f64: 0x6c08ea20, 0x33f65: 0x6c08ec20, 0x33f66: 0x6c08ee20, 0x33f67: 0x6c08f020, + 0x33f68: 0x6c08f220, 0x33f69: 0x6c08f420, 0x33f6a: 0x6c08f620, 0x33f6b: 0x6c113020, + 0x33f6c: 0x6c113220, 0x33f6d: 0x6c113420, 0x33f6e: 0x6c113620, 0x33f6f: 0x6c113820, + 0x33f70: 0x6c113a20, 0x33f71: 0x6c113c20, 0x33f72: 0x6c113e20, 0x33f73: 0x6c114020, + 0x33f74: 0x6c114220, 0x33f75: 0x6c114420, 0x33f76: 0x6c114620, 0x33f77: 0x6c1ebe20, + 0x33f78: 0x6c1ec020, 0x33f79: 0x6c1ec220, 0x33f7a: 0x6c1ec420, 0x33f7b: 0x6c1ec620, + 0x33f7c: 0x6c1ec820, 0x33f7d: 0x6c1eca20, 0x33f7e: 0x6c1ecc20, 0x33f7f: 0x6c1ece20, + // Block 0xcfe, offset 0x33f80 + 0x33f80: 0x6c1ed020, 0x33f81: 0x6c1ed220, 0x33f82: 0x6c1ed420, 0x33f83: 0x6c1ed620, + 0x33f84: 0x6c1ed820, 0x33f85: 0x6c1eda20, 0x33f86: 0x6c327c20, 0x33f87: 0x6c327e20, + 0x33f88: 0x6c328020, 0x33f89: 0x6c328220, 0x33f8a: 0x6c328420, 0x33f8b: 0x6c328620, + 0x33f8c: 0x6c328820, 0x33f8d: 0x6c328a20, 0x33f8e: 0x6c328c20, 0x33f8f: 0x6c328e20, + 0x33f90: 0x6c329020, 0x33f91: 0x6c329220, 0x33f92: 0x6c329420, 0x33f93: 0x6c329620, + 0x33f94: 0x6c4d0620, 0x33f95: 0x6c4d0820, 0x33f96: 0x6c4d0a20, 0x33f97: 0x6c4d0c20, + 0x33f98: 0x6c4d0e20, 0x33f99: 0x6c4d1020, 0x33f9a: 0x6c4d1220, 0x33f9b: 0x6c4d1420, + 0x33f9c: 0x6c4d1620, 0x33f9d: 0x6c4d1820, 0x33f9e: 0x6c4d1a20, 0x33f9f: 0x6c4d1c20, + 0x33fa0: 0x6c4d1e20, 0x33fa1: 0x6c4d2020, 0x33fa2: 0x6c4d2220, 0x33fa3: 0x6c4d2420, + 0x33fa4: 0x6c6ee420, 0x33fa5: 0x6c6ee620, 0x33fa6: 0x6c6ee820, 0x33fa7: 0x6c6eea20, + 0x33fa8: 0x6c6eec20, 0x33fa9: 0x6c6eee20, 0x33faa: 0x6c6ef020, 0x33fab: 0x6c6ef220, + 0x33fac: 0x6c6ef420, 0x33fad: 0x6c6ef620, 0x33fae: 0x6c967a20, 0x33faf: 0x6c967c20, + 0x33fb0: 0x6c967e20, 0x33fb1: 0x6c968020, 0x33fb2: 0x6c968220, 0x33fb3: 0x6c968420, + 0x33fb4: 0x6c968620, 0x33fb5: 0x6c968820, 0x33fb6: 0x6c968a20, 0x33fb7: 0x6c968c20, + 0x33fb8: 0x6c968e20, 0x33fb9: 0x6c969020, 0x33fba: 0x6c969220, 0x33fbb: 0x6c969420, + 0x33fbc: 0x6c969620, 0x33fbd: 0x6c969820, 0x33fbe: 0x6c969a20, 0x33fbf: 0x6c969c20, + // Block 0xcff, offset 0x33fc0 + 0x33fc0: 0x6cc28e20, 0x33fc1: 0x6cc29020, 0x33fc2: 0x6cc29220, 0x33fc3: 0x6cc29420, + 0x33fc4: 0x6cc29620, 0x33fc5: 0x6cc29820, 0x33fc6: 0x6cc29a20, 0x33fc7: 0x6cc29c20, + 0x33fc8: 0x6cc29e20, 0x33fc9: 0x6cc2a020, 0x33fca: 0x6cf1d020, 0x33fcb: 0x6cf1d220, + 0x33fcc: 0x6cf1d420, 0x33fcd: 0x6cf1d620, 0x33fce: 0x6cf1d820, 0x33fcf: 0x6cf1da20, + 0x33fd0: 0x6cf1dc20, 0x33fd1: 0x6cf1de20, 0x33fd2: 0x6d218c20, 0x33fd3: 0x6d218e20, + 0x33fd4: 0x6d219020, 0x33fd5: 0x6d219220, 0x33fd6: 0x6d219420, 0x33fd7: 0x6d219620, + 0x33fd8: 0x6d219820, 0x33fd9: 0x6d219a20, 0x33fda: 0x6d219c20, 0x33fdb: 0x6d219e20, + 0x33fdc: 0x6d21a020, 0x33fdd: 0x6d21a220, 0x33fde: 0x6d4f1220, 0x33fdf: 0x6d4f1420, + 0x33fe0: 0x6d4f1620, 0x33fe1: 0x6d4f1820, 0x33fe2: 0x6d4f1a20, 0x33fe3: 0x6d4f1c20, + 0x33fe4: 0x6d4f1e20, 0x33fe5: 0x6d7b6c20, 0x33fe6: 0x6d7b6e20, 0x33fe7: 0x6d7b7020, + 0x33fe8: 0x6d7b7220, 0x33fe9: 0x6d7b7420, 0x33fea: 0x6d7b7620, 0x33feb: 0x6d8a6c20, + 0x33fec: 0x6da3ac20, 0x33fed: 0x6da3ae20, 0x33fee: 0x6da3b020, 0x33fef: 0x6da3b220, + 0x33ff0: 0x6da3b420, 0x33ff1: 0x6da3b620, 0x33ff2: 0x6dc54220, 0x33ff3: 0x6dc54420, + 0x33ff4: 0x6dc54620, 0x33ff5: 0x6dc54820, 0x33ff6: 0x6dc54a20, 0x33ff7: 0x6dc54c20, + 0x33ff8: 0x6de25820, 0x33ff9: 0x6de25a20, 0x33ffa: 0x6de25c20, 0x33ffb: 0x6de25e20, + 0x33ffc: 0x6de26020, 0x33ffd: 0x6de26220, 0x33ffe: 0x6de26420, 0x33fff: 0x6dfa0620, + // Block 0xd00, offset 0x34000 + 0x34000: 0x6dfa0820, 0x34001: 0x6dfa0a20, 0x34002: 0x6dfa0c20, 0x34003: 0x6dfa0e20, + 0x34004: 0x6dfa1020, 0x34005: 0x6dfa1220, 0x34006: 0x6e0dae20, 0x34007: 0x6e0db020, + 0x34008: 0x6e0db220, 0x34009: 0x6e0db420, 0x3400a: 0x6e1d2420, 0x3400b: 0x6e321420, + 0x3400c: 0x6e388220, 0x3400d: 0x6e429620, 0x3400e: 0x6e462820, 0x3400f: 0x6c114c20, + 0x34010: 0x6c114e20, 0x34011: 0x6c115020, 0x34012: 0x6c115220, 0x34013: 0x6c1edc20, + 0x34014: 0x6c32a020, 0x34015: 0x6c32a220, 0x34016: 0x6c3bf820, 0x34017: 0x6c4d2c20, + 0x34018: 0x6c4d2e20, 0x34019: 0x6c4d3020, 0x3401a: 0x6c4d3220, 0x3401b: 0x6c6efa20, + 0x3401c: 0x6c6efc20, 0x3401d: 0x6c6efe20, 0x3401e: 0x6c96a220, 0x3401f: 0x6c96a420, + 0x34020: 0x6c96a620, 0x34021: 0x6c96a820, 0x34022: 0x6cc2a820, 0x34023: 0x6cc2aa20, + 0x34024: 0x6cc2ac20, 0x34025: 0x6cf1e420, 0x34026: 0x6cf1e620, 0x34027: 0x6cf1e820, + 0x34028: 0x6d21a820, 0x34029: 0x6d21aa20, 0x3402a: 0x6d21ac20, 0x3402b: 0x6d21ae20, + 0x3402c: 0x6d21b020, 0x3402d: 0x6d4f2020, 0x3402e: 0x6d4f2220, 0x3402f: 0x6d7b7e20, + 0x34030: 0x6d7adc20, 0x34031: 0x6d7b8020, 0x34032: 0x6da3ba20, 0x34033: 0x6dc55220, + 0x34034: 0x6dc55420, 0x34035: 0x6dc55620, 0x34036: 0x6dc55820, 0x34037: 0x6de26a20, + 0x34038: 0x6de26c20, 0x34039: 0x6de26e20, 0x3403a: 0x6de27020, 0x3403b: 0x6dfa1420, + 0x3403c: 0x6dfa1620, 0x3403d: 0x6e1d2620, 0x3403e: 0x6e28cc20, 0x3403f: 0x6e3d2620, + // Block 0xd01, offset 0x34040 + 0x34040: 0x6c08fa20, 0x34041: 0x6c08fc20, 0x34042: 0x6c08fe20, 0x34043: 0x6c115820, + 0x34044: 0x6c115a20, 0x34045: 0x6c115c20, 0x34046: 0x6c115e20, 0x34047: 0x6c1ee620, + 0x34048: 0x6c1ee820, 0x34049: 0x6c32aa20, 0x3404a: 0x6c32ac20, 0x3404b: 0x6c32ae20, + 0x3404c: 0x6c32b020, 0x3404d: 0x6c32b220, 0x3404e: 0x6c4d3820, 0x3404f: 0x6c6f0420, + 0x34050: 0x6c6f0620, 0x34051: 0x6c6f0820, 0x34052: 0x6c6f0a20, 0x34053: 0x6c6f0c20, + 0x34054: 0x6c96b220, 0x34055: 0x6c96b420, 0x34056: 0x6c96b620, 0x34057: 0x6c96b820, + 0x34058: 0x6c96ba20, 0x34059: 0x6c96bc20, 0x3405a: 0x6c96be20, 0x3405b: 0x6c96c020, + 0x3405c: 0x6c96c220, 0x3405d: 0x6c96c420, 0x3405e: 0x6cc2b420, 0x3405f: 0x6cc2b620, + 0x34060: 0x6cc2b820, 0x34061: 0x6cc2ba20, 0x34062: 0x6cc2bc20, 0x34063: 0x6cc2be20, + 0x34064: 0x6cf1ec20, 0x34065: 0x6cf1ee20, 0x34066: 0x6cf1f020, 0x34067: 0x6cf1f220, + 0x34068: 0x6cf1f420, 0x34069: 0x6d21b820, 0x3406a: 0x6d21ba20, 0x3406b: 0x6d4f2a20, + 0x3406c: 0x6d4f2c20, 0x3406d: 0x6d4f2e20, 0x3406e: 0x6d4f3020, 0x3406f: 0x6d4f3220, + 0x34070: 0x6d7b8420, 0x34071: 0x6d7b8620, 0x34072: 0x6d7b8820, 0x34073: 0x6d7b8a20, + 0x34074: 0x6da3bc20, 0x34075: 0x6dc55c20, 0x34076: 0x6e0db820, 0x34077: 0x6dfa1820, + 0x34078: 0x6e1d2a20, 0x34079: 0x6e1d2c20, 0x3407a: 0x6e1d2e20, 0x3407b: 0x6e388620, + 0x3407c: 0x6c046220, 0x3407d: 0x6c046420, 0x3407e: 0x6c090220, 0x3407f: 0x6c090420, + // Block 0xd02, offset 0x34080 + 0x34080: 0x6c116620, 0x34081: 0x6c116820, 0x34082: 0x6c116a20, 0x34083: 0x6c116c20, + 0x34084: 0x6c1efe20, 0x34085: 0x6c1f0020, 0x34086: 0x6c1f0220, 0x34087: 0x6c1f0420, + 0x34088: 0x6c1f0620, 0x34089: 0x6c1f0820, 0x3408a: 0x6c1f0a20, 0x3408b: 0x6c1f0c20, + 0x3408c: 0x6c1f0e20, 0x3408d: 0x6c1f1020, 0x3408e: 0x6c1f1220, 0x3408f: 0x6c1f1420, + 0x34090: 0x6c1f1620, 0x34091: 0x6c1f1820, 0x34092: 0x6c32ca20, 0x34093: 0x6c32cc20, + 0x34094: 0x6c32ce20, 0x34095: 0x6c32d020, 0x34096: 0x6c32d220, 0x34097: 0x6c32d420, + 0x34098: 0x6c32d620, 0x34099: 0x6c32d820, 0x3409a: 0x6c32da20, 0x3409b: 0x6c32dc20, + 0x3409c: 0x6c4d6020, 0x3409d: 0x6c4d6220, 0x3409e: 0x6c4d6420, 0x3409f: 0x6c4d6620, + 0x340a0: 0x6c4d6820, 0x340a1: 0x6c4d6a20, 0x340a2: 0x6c4d6c20, 0x340a3: 0x6c4d6e20, + 0x340a4: 0x6c4d7020, 0x340a5: 0x6c4d7220, 0x340a6: 0x6c4d7420, 0x340a7: 0x6c4d7620, + 0x340a8: 0x6c4d7820, 0x340a9: 0x6c4d7a20, 0x340aa: 0x6c6f2420, 0x340ab: 0x6c6f2620, + 0x340ac: 0x6c6f2820, 0x340ad: 0x6c6f2a20, 0x340ae: 0x6c6f2c20, 0x340af: 0x6c6f2e20, + 0x340b0: 0x6c6f3020, 0x340b1: 0x6c6f3220, 0x340b2: 0x6c6f3420, 0x340b3: 0x6c6f3620, + 0x340b4: 0x6c6f3820, 0x340b5: 0x6c6f3a20, 0x340b6: 0x6c6f3c20, 0x340b7: 0x6c6f3e20, + 0x340b8: 0x6c6f4020, 0x340b9: 0x6c6f4220, 0x340ba: 0x6c6f4420, 0x340bb: 0x6c6f4620, + 0x340bc: 0x6c6f4820, 0x340bd: 0x6c6f4a20, 0x340be: 0x6c6f4c20, 0x340bf: 0x6c6f4e20, + // Block 0xd03, offset 0x340c0 + 0x340c0: 0x6c6f5020, 0x340c1: 0x6c96ee20, 0x340c2: 0x6c96f020, 0x340c3: 0x6c96f220, + 0x340c4: 0x6c96f420, 0x340c5: 0x6c96f620, 0x340c6: 0x6c96f820, 0x340c7: 0x6c96fa20, + 0x340c8: 0x6c96fc20, 0x340c9: 0x6c96fe20, 0x340ca: 0x6c970020, 0x340cb: 0x6c970220, + 0x340cc: 0x6c970420, 0x340cd: 0x6c970620, 0x340ce: 0x6c970820, 0x340cf: 0x6c970a20, + 0x340d0: 0x6c970c20, 0x340d1: 0x6c970e20, 0x340d2: 0x6c971020, 0x340d3: 0x6c971220, + 0x340d4: 0x6c971420, 0x340d5: 0x6c971620, 0x340d6: 0x6c971820, 0x340d7: 0x6c971a20, + 0x340d8: 0x6c971c20, 0x340d9: 0x6c971e20, 0x340da: 0x6c972020, 0x340db: 0x6c972220, + 0x340dc: 0x6c972420, 0x340dd: 0x6c972620, 0x340de: 0x6c972820, 0x340df: 0x6cc2da20, + 0x340e0: 0x6cc2dc20, 0x340e1: 0x6cc2de20, 0x340e2: 0x6cc2e020, 0x340e3: 0x6cc2e220, + 0x340e4: 0x6cc2e420, 0x340e5: 0x6cc2e620, 0x340e6: 0x6cc2e820, 0x340e7: 0x6cc2ea20, + 0x340e8: 0x6cc2ec20, 0x340e9: 0x6cc2ee20, 0x340ea: 0x6cc2f020, 0x340eb: 0x6cc2f220, + 0x340ec: 0x6cde5820, 0x340ed: 0x6cc2f420, 0x340ee: 0x6cc2f620, 0x340ef: 0x6cc2f820, + 0x340f0: 0x6cc2fa20, 0x340f1: 0x6cc2fc20, 0x340f2: 0x6cf20220, 0x340f3: 0x6cf20420, + 0x340f4: 0x6cf20620, 0x340f5: 0x6cf20820, 0x340f6: 0x6cf20a20, 0x340f7: 0x6cf20c20, + 0x340f8: 0x6cf20e20, 0x340f9: 0x6cf21020, 0x340fa: 0x6cf21220, 0x340fb: 0x6cf21420, + 0x340fc: 0x6cf21620, 0x340fd: 0x6cf21820, 0x340fe: 0x6cf21a20, 0x340ff: 0x6cf21c20, + // Block 0xd04, offset 0x34100 + 0x34100: 0x6cf21e20, 0x34101: 0x6cf22020, 0x34102: 0x6cf22220, 0x34103: 0x6cf22420, + 0x34104: 0x6cf22620, 0x34105: 0x6cf22820, 0x34106: 0x6cf22a20, 0x34107: 0x6cf22c20, + 0x34108: 0x6cf22e20, 0x34109: 0x6cf23020, 0x3410a: 0x6cf23220, 0x3410b: 0x6cf23420, + 0x3410c: 0x6cf23620, 0x3410d: 0x6cf23820, 0x3410e: 0x6cf23a20, 0x3410f: 0x6d21c820, + 0x34110: 0x6d21ca20, 0x34111: 0x6d21cc20, 0x34112: 0x6d21ce20, 0x34113: 0x6d21d020, + 0x34114: 0x6d21d220, 0x34115: 0x6d21d420, 0x34116: 0x6d21d620, 0x34117: 0x6d21d820, + 0x34118: 0x6d21da20, 0x34119: 0x6d21dc20, 0x3411a: 0x6d21de20, 0x3411b: 0x6d21e020, + 0x3411c: 0x6d21e220, 0x3411d: 0x6d21e420, 0x3411e: 0x6d21e620, 0x3411f: 0x6d21e820, + 0x34120: 0x6d21ea20, 0x34121: 0x6d21ec20, 0x34122: 0x6d21ee20, 0x34123: 0x6d21f020, + 0x34124: 0x6d21f220, 0x34125: 0x6d21f420, 0x34126: 0x6d21f620, 0x34127: 0x6cf23c20, + 0x34128: 0x6d21f820, 0x34129: 0x6d21fa20, 0x3412a: 0x6d4f4620, 0x3412b: 0x6d4f4820, + 0x3412c: 0x6d4f4a20, 0x3412d: 0x6d4f4c20, 0x3412e: 0x6d4f4e20, 0x3412f: 0x6d4f5020, + 0x34130: 0x6d4f5220, 0x34131: 0x6d4f5420, 0x34132: 0x6d4f5620, 0x34133: 0x6d4f5820, + 0x34134: 0x6d4f5a20, 0x34135: 0x6d4f5c20, 0x34136: 0x6d4f5e20, 0x34137: 0x6d4f6020, + 0x34138: 0x6d4f6220, 0x34139: 0x6d7b9420, 0x3413a: 0x6d7b9620, 0x3413b: 0x6d7b9820, + 0x3413c: 0x6d7b9a20, 0x3413d: 0x6d7b9c20, 0x3413e: 0x6d7b9e20, 0x3413f: 0x6d7ba020, + // Block 0xd05, offset 0x34140 + 0x34140: 0x6d7ba220, 0x34141: 0x6d7ba420, 0x34142: 0x6d7ba620, 0x34143: 0x6d7ba820, + 0x34144: 0x6d7baa20, 0x34145: 0x6d912c20, 0x34146: 0x6d7bac20, 0x34147: 0x6d7bae20, + 0x34148: 0x6da3c620, 0x34149: 0x6da3c820, 0x3414a: 0x6da3ca20, 0x3414b: 0x6db4d020, + 0x3414c: 0x6da3cc20, 0x3414d: 0x6da3ce20, 0x3414e: 0x6da3d020, 0x3414f: 0x6dc55e20, + 0x34150: 0x6dc56020, 0x34151: 0x6dc56220, 0x34152: 0x6dc56420, 0x34153: 0x6dc56620, + 0x34154: 0x6dc56820, 0x34155: 0x6dc56a20, 0x34156: 0x6dc56c20, 0x34157: 0x6dc56e20, + 0x34158: 0x6de27620, 0x34159: 0x6de27820, 0x3415a: 0x6de27a20, 0x3415b: 0x6df7ca20, + 0x3415c: 0x6de27c20, 0x3415d: 0x6dfa2020, 0x3415e: 0x6dfa2220, 0x3415f: 0x6dfa2420, + 0x34160: 0x6dfa2620, 0x34161: 0x6e01e220, 0x34162: 0x6dfa2820, 0x34163: 0x6e0dbc20, + 0x34164: 0x6e0dbe20, 0x34165: 0x6e1d3020, 0x34166: 0x6e28ce20, 0x34167: 0x6e388820, + 0x34168: 0x6e403a20, 0x34169: 0x6c01f220, 0x3416a: 0x6c046a20, 0x3416b: 0x6c091020, + 0x3416c: 0x6c091220, 0x3416d: 0x6c091420, 0x3416e: 0x6c091620, 0x3416f: 0x6c091820, + 0x34170: 0x6c091a20, 0x34171: 0x6c091c20, 0x34172: 0x6c118a20, 0x34173: 0x6c118c20, + 0x34174: 0x6c118e20, 0x34175: 0x6c119020, 0x34176: 0x6c119220, 0x34177: 0x6c119420, + 0x34178: 0x6c119620, 0x34179: 0x6c119820, 0x3417a: 0x6c119a20, 0x3417b: 0x6c119c20, + 0x3417c: 0x6c119e20, 0x3417d: 0x6c11a020, 0x3417e: 0x6c11a220, 0x3417f: 0x6c11a420, + // Block 0xd06, offset 0x34180 + 0x34180: 0x6c11a620, 0x34181: 0x6c11a820, 0x34182: 0x6c11aa20, 0x34183: 0x6c11ac20, + 0x34184: 0x6c11ae20, 0x34185: 0x6c11b020, 0x34186: 0x6c11b220, 0x34187: 0x6c11b420, + 0x34188: 0x6c11b620, 0x34189: 0x6c1f8020, 0x3418a: 0x6c1f8220, 0x3418b: 0x6c1f8420, + 0x3418c: 0x6c1f8620, 0x3418d: 0x6c1f8820, 0x3418e: 0x6c1f8a20, 0x3418f: 0x6c1f8c20, + 0x34190: 0x6c1f8e20, 0x34191: 0x6c1f9020, 0x34192: 0x6c1f9220, 0x34193: 0x6c1f9420, + 0x34194: 0x6c1f9620, 0x34195: 0x6c1f9820, 0x34196: 0x6c1f9a20, 0x34197: 0x6c1f9c20, + 0x34198: 0x6c1f9e20, 0x34199: 0x6c1fa020, 0x3419a: 0x6c1fa220, 0x3419b: 0x6c1fa420, + 0x3419c: 0x6c1fa620, 0x3419d: 0x6c1fa820, 0x3419e: 0x6c1faa20, 0x3419f: 0x6c1fac20, + 0x341a0: 0x6c1fae20, 0x341a1: 0x6c1fb020, 0x341a2: 0x6c1fb220, 0x341a3: 0x6c1fb420, + 0x341a4: 0x6c1fb620, 0x341a5: 0x6c1fb820, 0x341a6: 0x6c1fba20, 0x341a7: 0x6c1fbc20, + 0x341a8: 0x6c1fbe20, 0x341a9: 0x6c1fc020, 0x341aa: 0x6c1fc220, 0x341ab: 0x6c1fc420, + 0x341ac: 0x6c1fc620, 0x341ad: 0x6c1fc820, 0x341ae: 0x6c1fca20, 0x341af: 0x6c1fcc20, + 0x341b0: 0x6c1fce20, 0x341b1: 0x6c1fd020, 0x341b2: 0x6c1fd220, 0x341b3: 0x6c1fd420, + 0x341b4: 0x6c1fd620, 0x341b5: 0x6c1fd820, 0x341b6: 0x6c1fda20, 0x341b7: 0x6c1fdc20, + 0x341b8: 0x6c1fde20, 0x341b9: 0x6c1fe020, 0x341ba: 0x6c1fe220, 0x341bb: 0x6c1fe420, + 0x341bc: 0x6c1fe620, 0x341bd: 0x6c1fe820, 0x341be: 0x6c1fea20, 0x341bf: 0x6c336420, + // Block 0xd07, offset 0x341c0 + 0x341c0: 0x6c336620, 0x341c1: 0x6c336820, 0x341c2: 0x6c336a20, 0x341c3: 0x6c336c20, + 0x341c4: 0x6c336e20, 0x341c5: 0x6c337020, 0x341c6: 0x6c337220, 0x341c7: 0x6c337420, + 0x341c8: 0x6c337620, 0x341c9: 0x6c337820, 0x341ca: 0x6c337a20, 0x341cb: 0x6c337c20, + 0x341cc: 0x6c337e20, 0x341cd: 0x6c338020, 0x341ce: 0x6c338220, 0x341cf: 0x6c338420, + 0x341d0: 0x6c338620, 0x341d1: 0x6c338820, 0x341d2: 0x6c338a20, 0x341d3: 0x6c338c20, + 0x341d4: 0x6c338e20, 0x341d5: 0x6c339020, 0x341d6: 0x6c339220, 0x341d7: 0x6c339420, + 0x341d8: 0x6c339620, 0x341d9: 0x6c339820, 0x341da: 0x6c339a20, 0x341db: 0x6c339c20, + 0x341dc: 0x6c339e20, 0x341dd: 0x6c33a020, 0x341de: 0x6c33a220, 0x341df: 0x6c33a420, + 0x341e0: 0x6c33a620, 0x341e1: 0x6c33a820, 0x341e2: 0x6c33aa20, 0x341e3: 0x6c33ac20, + 0x341e4: 0x6c33ae20, 0x341e5: 0x6c33b020, 0x341e6: 0x6c33b220, 0x341e7: 0x6c33b420, + 0x341e8: 0x6c33b620, 0x341e9: 0x6c33b820, 0x341ea: 0x6c33ba20, 0x341eb: 0x6c33bc20, + 0x341ec: 0x6c33be20, 0x341ed: 0x6c33c020, 0x341ee: 0x6c33c220, 0x341ef: 0x6c33c420, + 0x341f0: 0x6c33c620, 0x341f1: 0x6c33c820, 0x341f2: 0x6c33ca20, 0x341f3: 0x6c33cc20, + 0x341f4: 0x6c4e1420, 0x341f5: 0x6c4e1620, 0x341f6: 0x6c4e1820, 0x341f7: 0x6c4e1a20, + 0x341f8: 0x6c4e1c20, 0x341f9: 0x6c4e1e20, 0x341fa: 0x6c4e2020, 0x341fb: 0x6c4e2220, + 0x341fc: 0x6c4e2420, 0x341fd: 0x6c4e2620, 0x341fe: 0x6c4e2820, 0x341ff: 0x6c4e2a20, + // Block 0xd08, offset 0x34200 + 0x34200: 0x6c4e2c20, 0x34201: 0x6c4e2e20, 0x34202: 0x6c4e3020, 0x34203: 0x6c4e3220, + 0x34204: 0x6c4e3420, 0x34205: 0x6c4e3620, 0x34206: 0x6c4e3820, 0x34207: 0x6c4e3a20, + 0x34208: 0x6c4e3c20, 0x34209: 0x6c4e3e20, 0x3420a: 0x6c4e4020, 0x3420b: 0x6c4e4220, + 0x3420c: 0x6c4e4420, 0x3420d: 0x6c4e4620, 0x3420e: 0x6c4e4820, 0x3420f: 0x6c4e4a20, + 0x34210: 0x6c4e4c20, 0x34211: 0x6c4e4e20, 0x34212: 0x6c4e5020, 0x34213: 0x6c4e5220, + 0x34214: 0x6c4e5420, 0x34215: 0x6c4e5620, 0x34216: 0x6c4e5820, 0x34217: 0x6c4e5a20, + 0x34218: 0x6c4e5c20, 0x34219: 0x6c4e5e20, 0x3421a: 0x6c4e6020, 0x3421b: 0x6c4e6220, + 0x3421c: 0x6c4e6420, 0x3421d: 0x6c4e6620, 0x3421e: 0x6c4e6820, 0x3421f: 0x6c4e6a20, + 0x34220: 0x6c4e6c20, 0x34221: 0x6c4e6e20, 0x34222: 0x6c4e7020, 0x34223: 0x6c4e7220, + 0x34224: 0x6c4e7420, 0x34225: 0x6c4e7620, 0x34226: 0x6c4e7820, 0x34227: 0x6c4e7a20, + 0x34228: 0x6c4e7c20, 0x34229: 0x6c4e7e20, 0x3422a: 0x6c4e8020, 0x3422b: 0x6c4e8220, + 0x3422c: 0x6c4e8420, 0x3422d: 0x6c4e8620, 0x3422e: 0x6c4e8820, 0x3422f: 0x6c4e8a20, + 0x34230: 0x6c4e8c20, 0x34231: 0x6c6fe420, 0x34232: 0x6c6fe620, 0x34233: 0x6c6fe820, + 0x34234: 0x6c6fea20, 0x34235: 0x6c6fec20, 0x34236: 0x6c6fee20, 0x34237: 0x6c6ff020, + 0x34238: 0x6c6ff220, 0x34239: 0x6c6ff420, 0x3423a: 0x6c6ff620, 0x3423b: 0x6c6ff820, + 0x3423c: 0x6c6ffa20, 0x3423d: 0x6c6ffc20, 0x3423e: 0x6c6ffe20, 0x3423f: 0x6c700020, + // Block 0xd09, offset 0x34240 + 0x34240: 0x6c700220, 0x34241: 0x6c700420, 0x34242: 0x6c700620, 0x34243: 0x6c700820, + 0x34244: 0x6c700a20, 0x34245: 0x6c700c20, 0x34246: 0x6c700e20, 0x34247: 0x6c701020, + 0x34248: 0x6c701220, 0x34249: 0x6c701420, 0x3424a: 0x6c701620, 0x3424b: 0x6c701820, + 0x3424c: 0x6c701a20, 0x3424d: 0x6c701c20, 0x3424e: 0x6c701e20, 0x3424f: 0x6c702020, + 0x34250: 0x6c702220, 0x34251: 0x6c702420, 0x34252: 0x6c702620, 0x34253: 0x6c702820, + 0x34254: 0x6c702a20, 0x34255: 0x6c702c20, 0x34256: 0x6c702e20, 0x34257: 0x6c703020, + 0x34258: 0x6c703220, 0x34259: 0x6c703420, 0x3425a: 0x6c703620, 0x3425b: 0x6c703820, + 0x3425c: 0x6c703a20, 0x3425d: 0x6c703c20, 0x3425e: 0x6c703e20, 0x3425f: 0x6c704020, + 0x34260: 0x6c704220, 0x34261: 0x6c704420, 0x34262: 0x6c704620, 0x34263: 0x6c704820, + 0x34264: 0x6c704a20, 0x34265: 0x6c704c20, 0x34266: 0x6c704e20, 0x34267: 0x6c705020, + 0x34268: 0x6c705220, 0x34269: 0x6c705420, 0x3426a: 0x6c705620, 0x3426b: 0x6c705820, + 0x3426c: 0x6c705a20, 0x3426d: 0x6c705c20, 0x3426e: 0x6c705e20, 0x3426f: 0x6c706020, + 0x34270: 0x6c706220, 0x34271: 0x6c706420, 0x34272: 0x6c706620, 0x34273: 0x6c706820, + 0x34274: 0x6c706a20, 0x34275: 0x6c706c20, 0x34276: 0x6c706e20, 0x34277: 0x6c707020, + 0x34278: 0x6c707220, 0x34279: 0x6c707420, 0x3427a: 0x6c707620, 0x3427b: 0x6c707820, + 0x3427c: 0x6c707a20, 0x3427d: 0x6c707c20, 0x3427e: 0x6c707e20, 0x3427f: 0x6c708020, + // Block 0xd0a, offset 0x34280 + 0x34280: 0x6c97d620, 0x34281: 0x6c97d820, 0x34282: 0x6c97da20, 0x34283: 0x6c97dc20, + 0x34284: 0x6c97de20, 0x34285: 0x6c97e020, 0x34286: 0x6c97e220, 0x34287: 0x6c97e420, + 0x34288: 0x6c97e620, 0x34289: 0x6c97e820, 0x3428a: 0x6c97ea20, 0x3428b: 0x6c97ec20, + 0x3428c: 0x6c97ee20, 0x3428d: 0x6c97f020, 0x3428e: 0x6c97f220, 0x3428f: 0x6c97f420, + 0x34290: 0x6c97f620, 0x34291: 0x6c97f820, 0x34292: 0x6c97fa20, 0x34293: 0x6c97fc20, + 0x34294: 0x6c97fe20, 0x34295: 0x6c980020, 0x34296: 0x6c980220, 0x34297: 0x6c980420, + 0x34298: 0x6c980620, 0x34299: 0x6c980820, 0x3429a: 0x6c980a20, 0x3429b: 0x6c980c20, + 0x3429c: 0x6c980e20, 0x3429d: 0x6c981020, 0x3429e: 0x6c981220, 0x3429f: 0x6c981420, + 0x342a0: 0x6c981620, 0x342a1: 0x6c981820, 0x342a2: 0x6c981a20, 0x342a3: 0x6c981c20, + 0x342a4: 0x6c981e20, 0x342a5: 0x6c982020, 0x342a6: 0x6c982220, 0x342a7: 0x6c982420, + 0x342a8: 0x6c982620, 0x342a9: 0x6c982820, 0x342aa: 0x6c982a20, 0x342ab: 0x6c982c20, + 0x342ac: 0x6c982e20, 0x342ad: 0x6c983020, 0x342ae: 0x6c983220, 0x342af: 0x6c983420, + 0x342b0: 0x6c983620, 0x342b1: 0x6c983820, 0x342b2: 0x6c983a20, 0x342b3: 0x6c983c20, + 0x342b4: 0x6c983e20, 0x342b5: 0x6c984020, 0x342b6: 0x6c984220, 0x342b7: 0x6c984420, + 0x342b8: 0x6c984620, 0x342b9: 0x6c984820, 0x342ba: 0x6c984a20, 0x342bb: 0x6c984c20, + 0x342bc: 0x6c984e20, 0x342bd: 0x6c985020, 0x342be: 0x6c985220, 0x342bf: 0x6c985420, + // Block 0xd0b, offset 0x342c0 + 0x342c0: 0x6c985620, 0x342c1: 0x6c985820, 0x342c2: 0x6c985a20, 0x342c3: 0x6c985c20, + 0x342c4: 0x6c985e20, 0x342c5: 0x6c986020, 0x342c6: 0x6c986220, 0x342c7: 0x6c986420, + 0x342c8: 0x6c986620, 0x342c9: 0x6c986820, 0x342ca: 0x6c986a20, 0x342cb: 0x6c986c20, + 0x342cc: 0x6c986e20, 0x342cd: 0x6c987020, 0x342ce: 0x6c987220, 0x342cf: 0x6c987420, + 0x342d0: 0x6c987620, 0x342d1: 0x6c987820, 0x342d2: 0x6c987a20, 0x342d3: 0x6c987c20, + 0x342d4: 0x6c987e20, 0x342d5: 0x6c988020, 0x342d6: 0x6c988220, 0x342d7: 0x6c988420, + 0x342d8: 0x6c988620, 0x342d9: 0x6c988820, 0x342da: 0x6c988a20, 0x342db: 0x6c988c20, + 0x342dc: 0x6c988e20, 0x342dd: 0x6c989020, 0x342de: 0x6c989220, 0x342df: 0x6c989420, + 0x342e0: 0x6c989620, 0x342e1: 0x6c989820, 0x342e2: 0x6c989a20, 0x342e3: 0x6c989c20, + 0x342e4: 0x6c989e20, 0x342e5: 0x6c98a020, 0x342e6: 0x6c98a220, 0x342e7: 0x6c98a420, + 0x342e8: 0x6cc3ac20, 0x342e9: 0x6cc3ae20, 0x342ea: 0x6cc3b020, 0x342eb: 0x6cc3b220, + 0x342ec: 0x6cc3b420, 0x342ed: 0x6cc3b620, 0x342ee: 0x6cc3b820, 0x342ef: 0x6cc3ba20, + 0x342f0: 0x6cc3bc20, 0x342f1: 0x6cc3be20, 0x342f2: 0x6cc3c020, 0x342f3: 0x6cc3c220, + 0x342f4: 0x6cc3c420, 0x342f5: 0x6cc3c620, 0x342f6: 0x6cc3c820, 0x342f7: 0x6cc3ca20, + 0x342f8: 0x6cc3cc20, 0x342f9: 0x6cc3ce20, 0x342fa: 0x6cc3d020, 0x342fb: 0x6cc3d220, + 0x342fc: 0x6cc3d420, 0x342fd: 0x6cc3d620, 0x342fe: 0x6cc3d820, 0x342ff: 0x6cc3da20, + // Block 0xd0c, offset 0x34300 + 0x34300: 0x6cc3dc20, 0x34301: 0x6cc3de20, 0x34302: 0x6cc3e020, 0x34303: 0x6cc3e220, + 0x34304: 0x6cc3e420, 0x34305: 0x6cc3e620, 0x34306: 0x6cc3e820, 0x34307: 0x6cc3ea20, + 0x34308: 0x6cc3ec20, 0x34309: 0x6cc3ee20, 0x3430a: 0x6cc3f020, 0x3430b: 0x6cc3f220, + 0x3430c: 0x6cc3f420, 0x3430d: 0x6cc3f620, 0x3430e: 0x6cc3f820, 0x3430f: 0x6cc3fa20, + 0x34310: 0x6cc3fc20, 0x34311: 0x6cc3fe20, 0x34312: 0x6cc40020, 0x34313: 0x6cc40220, + 0x34314: 0x6cc40420, 0x34315: 0x6cc40620, 0x34316: 0x6cc40820, 0x34317: 0x6cc40a20, + 0x34318: 0x6cc40c20, 0x34319: 0x6cc40e20, 0x3431a: 0x6cc41020, 0x3431b: 0x6cc41220, + 0x3431c: 0x6cc41420, 0x3431d: 0x6cc41620, 0x3431e: 0x6cc41820, 0x3431f: 0x6cc41a20, + 0x34320: 0x6cc41c20, 0x34321: 0x6cc41e20, 0x34322: 0x6cc42020, 0x34323: 0x6cc42220, + 0x34324: 0x6cc42420, 0x34325: 0x6cc42620, 0x34326: 0x6cc42820, 0x34327: 0x6cc42a20, + 0x34328: 0x6cc42c20, 0x34329: 0x6cc42e20, 0x3432a: 0x6cc43020, 0x3432b: 0x6cc43220, + 0x3432c: 0x6cc43420, 0x3432d: 0x6cc43620, 0x3432e: 0x6cc43820, 0x3432f: 0x6cc43a20, + 0x34330: 0x6cc43c20, 0x34331: 0x6cc43e20, 0x34332: 0x6cc44020, 0x34333: 0x6cc44220, + 0x34334: 0x6cc44420, 0x34335: 0x6cc44620, 0x34336: 0x6cc44820, 0x34337: 0x6cc44a20, + 0x34338: 0x6cc44c20, 0x34339: 0x6cc44e20, 0x3433a: 0x6cc45020, 0x3433b: 0x6cc45220, + 0x3433c: 0x6cc45420, 0x3433d: 0x6cc45620, 0x3433e: 0x6cc45820, 0x3433f: 0x6cc45a20, + // Block 0xd0d, offset 0x34340 + 0x34340: 0x6cc45c20, 0x34341: 0x6cc45e20, 0x34342: 0x6cc46020, 0x34343: 0x6cc46220, + 0x34344: 0x6cc46420, 0x34345: 0x6cc46620, 0x34346: 0x6cc46820, 0x34347: 0x6cc46a20, + 0x34348: 0x6cc46c20, 0x34349: 0x6cc46e20, 0x3434a: 0x6cc47020, 0x3434b: 0x6cc47220, + 0x3434c: 0x6cc47420, 0x3434d: 0x6cf2b620, 0x3434e: 0x6cf2b820, 0x3434f: 0x6cf2ba20, + 0x34350: 0x6cf2bc20, 0x34351: 0x6cf2be20, 0x34352: 0x6cf2c020, 0x34353: 0x6cf2c220, + 0x34354: 0x6cf2c420, 0x34355: 0x6cf2c620, 0x34356: 0x6cf2c820, 0x34357: 0x6cf2ca20, + 0x34358: 0x6cf2cc20, 0x34359: 0x6cf2ce20, 0x3435a: 0x6cf2d020, 0x3435b: 0x6cf2d220, + 0x3435c: 0x6cf2d420, 0x3435d: 0x6cf2d620, 0x3435e: 0x6cf2d820, 0x3435f: 0x6cf2da20, + 0x34360: 0x6cf2dc20, 0x34361: 0x6cf2de20, 0x34362: 0x6cf2e020, 0x34363: 0x6cf2e220, + 0x34364: 0x6cf2e420, 0x34365: 0x6cf2e620, 0x34366: 0x6cf2e820, 0x34367: 0x6cf2ea20, + 0x34368: 0x6cf2ec20, 0x34369: 0x6cf2ee20, 0x3436a: 0x6cf2f020, 0x3436b: 0x6cf2f220, + 0x3436c: 0x6cf2f420, 0x3436d: 0x6cf2f620, 0x3436e: 0x6cf2f820, 0x3436f: 0x6cf2fa20, + 0x34370: 0x6cf2fc20, 0x34371: 0x6cf2fe20, 0x34372: 0x6cf30020, 0x34373: 0x6cf30220, + 0x34374: 0x6cf30420, 0x34375: 0x6cf30620, 0x34376: 0x6cf30820, 0x34377: 0x6cf30a20, + 0x34378: 0x6cf30c20, 0x34379: 0x6cf30e20, 0x3437a: 0x6cf31020, 0x3437b: 0x6cf31220, + 0x3437c: 0x6cf31420, 0x3437d: 0x6cf31620, 0x3437e: 0x6cf31820, 0x3437f: 0x6cf31a20, + // Block 0xd0e, offset 0x34380 + 0x34380: 0x6cf31c20, 0x34381: 0x6cf31e20, 0x34382: 0x6cf32020, 0x34383: 0x6cf32220, + 0x34384: 0x6cf32420, 0x34385: 0x6cf32620, 0x34386: 0x6cf32820, 0x34387: 0x6cf32a20, + 0x34388: 0x6cf32c20, 0x34389: 0x6cf32e20, 0x3438a: 0x6cf33020, 0x3438b: 0x6cf33220, + 0x3438c: 0x6cf33420, 0x3438d: 0x6cf33620, 0x3438e: 0x6cf33820, 0x3438f: 0x6cf33a20, + 0x34390: 0x6cf33c20, 0x34391: 0x6cf33e20, 0x34392: 0x6cf34020, 0x34393: 0x6cf34220, + 0x34394: 0x6cf34420, 0x34395: 0x6cf34620, 0x34396: 0x6cf34820, 0x34397: 0x6cf34a20, + 0x34398: 0x6cf34c20, 0x34399: 0x6cf34e20, 0x3439a: 0x6cf35020, 0x3439b: 0x6cf35220, + 0x3439c: 0x6cf35420, 0x3439d: 0x6cf35620, 0x3439e: 0x6cf35820, 0x3439f: 0x6cf35a20, + 0x343a0: 0x6d227c20, 0x343a1: 0x6d227e20, 0x343a2: 0x6d228020, 0x343a3: 0x6d228220, + 0x343a4: 0x6d228420, 0x343a5: 0x6d228620, 0x343a6: 0x6d228820, 0x343a7: 0x6d228a20, + 0x343a8: 0x6d228c20, 0x343a9: 0x6d228e20, 0x343aa: 0x6d229020, 0x343ab: 0x6d229220, + 0x343ac: 0x6d229420, 0x343ad: 0x6d229620, 0x343ae: 0x6d229820, 0x343af: 0x6d229a20, + 0x343b0: 0x6d229c20, 0x343b1: 0x6d229e20, 0x343b2: 0x6d22a020, 0x343b3: 0x6d22a220, + 0x343b4: 0x6d22a420, 0x343b5: 0x6d22a620, 0x343b6: 0x6d22a820, 0x343b7: 0x6d22aa20, + 0x343b8: 0x6d22ac20, 0x343b9: 0x6d22ae20, 0x343ba: 0x6d22b020, 0x343bb: 0x6d22b220, + 0x343bc: 0x6d22b420, 0x343bd: 0x6d22b620, 0x343be: 0x6d22b820, 0x343bf: 0x6d22ba20, + // Block 0xd0f, offset 0x343c0 + 0x343c0: 0x6d22bc20, 0x343c1: 0x6d22be20, 0x343c2: 0x6d22c020, 0x343c3: 0x6d22c220, + 0x343c4: 0x6d22c420, 0x343c5: 0x6d22c620, 0x343c6: 0x6d22c820, 0x343c7: 0x6d22ca20, + 0x343c8: 0x6d22cc20, 0x343c9: 0x6d22ce20, 0x343ca: 0x6d22d020, 0x343cb: 0x6d22d220, + 0x343cc: 0x6d22d420, 0x343cd: 0x6d22d620, 0x343ce: 0x6d22d820, 0x343cf: 0x6d22da20, + 0x343d0: 0x6d22dc20, 0x343d1: 0x6d22de20, 0x343d2: 0x6d22e020, 0x343d3: 0x6d22e220, + 0x343d4: 0x6d22e420, 0x343d5: 0x6d22e620, 0x343d6: 0x6d22e820, 0x343d7: 0x6d22ea20, + 0x343d8: 0x6d22ec20, 0x343d9: 0x6d22ee20, 0x343da: 0x6d22f020, 0x343db: 0x6d22f220, + 0x343dc: 0x6d22f420, 0x343dd: 0x6d22f620, 0x343de: 0x6d22f820, 0x343df: 0x6d22fa20, + 0x343e0: 0x6d22fc20, 0x343e1: 0x6d22fe20, 0x343e2: 0x6d230020, 0x343e3: 0x6d230220, + 0x343e4: 0x6d230420, 0x343e5: 0x6d230620, 0x343e6: 0x6d230820, 0x343e7: 0x6d230a20, + 0x343e8: 0x6d230c20, 0x343e9: 0x6d230e20, 0x343ea: 0x6d231020, 0x343eb: 0x6d231220, + 0x343ec: 0x6d231420, 0x343ed: 0x6d231620, 0x343ee: 0x6d231820, 0x343ef: 0x6d231a20, + 0x343f0: 0x6d231c20, 0x343f1: 0x6d4ff020, 0x343f2: 0x6d4ff220, 0x343f3: 0x6d4ff420, + 0x343f4: 0x6d4ff620, 0x343f5: 0x6d4ff820, 0x343f6: 0x6d4ffa20, 0x343f7: 0x6d4ffc20, + 0x343f8: 0x6d4ffe20, 0x343f9: 0x6d500020, 0x343fa: 0x6d500220, 0x343fb: 0x6d500420, + 0x343fc: 0x6d500620, 0x343fd: 0x6d500820, 0x343fe: 0x6d500a20, 0x343ff: 0x6d500c20, + // Block 0xd10, offset 0x34400 + 0x34400: 0x6d500e20, 0x34401: 0x6d501020, 0x34402: 0x6d501220, 0x34403: 0x6d501420, + 0x34404: 0x6d501620, 0x34405: 0x6d501820, 0x34406: 0x6d501a20, 0x34407: 0x6d501c20, + 0x34408: 0x6d501e20, 0x34409: 0x6d502020, 0x3440a: 0x6d502220, 0x3440b: 0x6d502420, + 0x3440c: 0x6d502620, 0x3440d: 0x6d502820, 0x3440e: 0x6d502a20, 0x3440f: 0x6d502c20, + 0x34410: 0x6d502e20, 0x34411: 0x6d503020, 0x34412: 0x6d503220, 0x34413: 0x6d503420, + 0x34414: 0x6d503620, 0x34415: 0x6d503820, 0x34416: 0x6d503a20, 0x34417: 0x6d503c20, + 0x34418: 0x6d503e20, 0x34419: 0x6d504020, 0x3441a: 0x6d504220, 0x3441b: 0x6d504420, + 0x3441c: 0x6d504620, 0x3441d: 0x6d504820, 0x3441e: 0x6d504a20, 0x3441f: 0x6d504c20, + 0x34420: 0x6d504e20, 0x34421: 0x6d505020, 0x34422: 0x6d505220, 0x34423: 0x6d505420, + 0x34424: 0x6d505620, 0x34425: 0x6d505820, 0x34426: 0x6d505a20, 0x34427: 0x6d505c20, + 0x34428: 0x6d505e20, 0x34429: 0x6d506020, 0x3442a: 0x6d506220, 0x3442b: 0x6d506420, + 0x3442c: 0x6d506620, 0x3442d: 0x6d506820, 0x3442e: 0x6d506a20, 0x3442f: 0x6d506c20, + 0x34430: 0x6d506e20, 0x34431: 0x6d507020, 0x34432: 0x6d507220, 0x34433: 0x6d507420, + 0x34434: 0x6d507620, 0x34435: 0x6d507820, 0x34436: 0x6d507a20, 0x34437: 0x6d507c20, + 0x34438: 0x6d507e20, 0x34439: 0x6d508020, 0x3443a: 0x6d508220, 0x3443b: 0x6d508420, + 0x3443c: 0x6d508620, 0x3443d: 0x6d508820, 0x3443e: 0x6d508a20, 0x3443f: 0x6d508c20, + // Block 0xd11, offset 0x34440 + 0x34440: 0x6d508e20, 0x34441: 0x6d509020, 0x34442: 0x6d509220, 0x34443: 0x6d509420, + 0x34444: 0x6d509620, 0x34445: 0x6d509820, 0x34446: 0x6d509a20, 0x34447: 0x6d509c20, + 0x34448: 0x6d509e20, 0x34449: 0x6d50a020, 0x3444a: 0x6d50a220, 0x3444b: 0x6d50a420, + 0x3444c: 0x6d50a620, 0x3444d: 0x6d50a820, 0x3444e: 0x6d50aa20, 0x3444f: 0x6d50ac20, + 0x34450: 0x6d50ae20, 0x34451: 0x6d50b020, 0x34452: 0x6d7c0220, 0x34453: 0x6d7c0420, + 0x34454: 0x6d7c0620, 0x34455: 0x6d7c0820, 0x34456: 0x6d7c0a20, 0x34457: 0x6d7c0c20, + 0x34458: 0x6d7c0e20, 0x34459: 0x6d7c1020, 0x3445a: 0x6d7c1220, 0x3445b: 0x6d7c1420, + 0x3445c: 0x6d7c1620, 0x3445d: 0x6d7c1820, 0x3445e: 0x6d7c1a20, 0x3445f: 0x6d7c1c20, + 0x34460: 0x6d7c1e20, 0x34461: 0x6d7c2020, 0x34462: 0x6d7c2220, 0x34463: 0x6d7c2420, + 0x34464: 0x6d7c2620, 0x34465: 0x6d7c2820, 0x34466: 0x6d7c2a20, 0x34467: 0x6d7c2c20, + 0x34468: 0x6d7c2e20, 0x34469: 0x6d7c3020, 0x3446a: 0x6d7c3220, 0x3446b: 0x6d7c3420, + 0x3446c: 0x6d7c3620, 0x3446d: 0x6d7c3820, 0x3446e: 0x6d7c3a20, 0x3446f: 0x6d7c3c20, + 0x34470: 0x6d7c3e20, 0x34471: 0x6d7c4020, 0x34472: 0x6d7c4220, 0x34473: 0x6d7c4420, + 0x34474: 0x6d7c4620, 0x34475: 0x6d7c4820, 0x34476: 0x6d7c4a20, 0x34477: 0x6d7c4c20, + 0x34478: 0x6d7c4e20, 0x34479: 0x6d7c5020, 0x3447a: 0x6d7c5220, 0x3447b: 0x6d7c5420, + 0x3447c: 0x6d7c5620, 0x3447d: 0x6d7c5820, 0x3447e: 0x6d7c5a20, 0x3447f: 0x6d7c5c20, + // Block 0xd12, offset 0x34480 + 0x34480: 0x6d7c5e20, 0x34481: 0x6d7c6020, 0x34482: 0x6d7c6220, 0x34483: 0x6d7c6420, + 0x34484: 0x6d7c6620, 0x34485: 0x6d7c6820, 0x34486: 0x6d7c6a20, 0x34487: 0x6d7c6c20, + 0x34488: 0x6d7c6e20, 0x34489: 0x6d7c7020, 0x3448a: 0x6d7c7220, 0x3448b: 0x6d7c7420, + 0x3448c: 0x6d7c7620, 0x3448d: 0x6d7c7820, 0x3448e: 0x6da40820, 0x3448f: 0x6da40a20, + 0x34490: 0x6da40c20, 0x34491: 0x6da40e20, 0x34492: 0x6da41020, 0x34493: 0x6da41220, + 0x34494: 0x6da41420, 0x34495: 0x6da41620, 0x34496: 0x6da41820, 0x34497: 0x6da41a20, + 0x34498: 0x6da41c20, 0x34499: 0x6da41e20, 0x3449a: 0x6da42020, 0x3449b: 0x6da42220, + 0x3449c: 0x6da42420, 0x3449d: 0x6da42620, 0x3449e: 0x6da42820, 0x3449f: 0x6da42a20, + 0x344a0: 0x6da42c20, 0x344a1: 0x6da42e20, 0x344a2: 0x6da43020, 0x344a3: 0x6da43220, + 0x344a4: 0x6da43420, 0x344a5: 0x6da43620, 0x344a6: 0x6da43820, 0x344a7: 0x6da43a20, + 0x344a8: 0x6da43c20, 0x344a9: 0x6da43e20, 0x344aa: 0x6da44020, 0x344ab: 0x6da44220, + 0x344ac: 0x6da44420, 0x344ad: 0x6da44620, 0x344ae: 0x6da44820, 0x344af: 0x6da44a20, + 0x344b0: 0x6da44c20, 0x344b1: 0x6da44e20, 0x344b2: 0x6da45020, 0x344b3: 0x6da45220, + 0x344b4: 0x6da45420, 0x344b5: 0x6da45620, 0x344b6: 0x6da45820, 0x344b7: 0x6da45a20, + 0x344b8: 0x6da45c20, 0x344b9: 0x6da45e20, 0x344ba: 0x6da46020, 0x344bb: 0x6dc59e20, + 0x344bc: 0x6dc5a020, 0x344bd: 0x6dc5a220, 0x344be: 0x6dc5a420, 0x344bf: 0x6dc5a620, + // Block 0xd13, offset 0x344c0 + 0x344c0: 0x6dc5a820, 0x344c1: 0x6dc5aa20, 0x344c2: 0x6dc5ac20, 0x344c3: 0x6dc5ae20, + 0x344c4: 0x6dc5b020, 0x344c5: 0x6dc5b220, 0x344c6: 0x6dc5b420, 0x344c7: 0x6dc5b620, + 0x344c8: 0x6dc5b820, 0x344c9: 0x6dc5ba20, 0x344ca: 0x6dc5bc20, 0x344cb: 0x6dc5be20, + 0x344cc: 0x6dc5c020, 0x344cd: 0x6dc5c220, 0x344ce: 0x6dc5c420, 0x344cf: 0x6dc5c620, + 0x344d0: 0x6dc5c820, 0x344d1: 0x6dc5ca20, 0x344d2: 0x6dc5cc20, 0x344d3: 0x6dc5ce20, + 0x344d4: 0x6dc5d020, 0x344d5: 0x6dc5d220, 0x344d6: 0x6dc5d420, 0x344d7: 0x6dc5d620, + 0x344d8: 0x6dc5d820, 0x344d9: 0x6dc5da20, 0x344da: 0x6dc5dc20, 0x344db: 0x6dc5de20, + 0x344dc: 0x6dc5e020, 0x344dd: 0x6dc5e220, 0x344de: 0x6dc5e420, 0x344df: 0x6dc5e620, + 0x344e0: 0x6dc5e820, 0x344e1: 0x6dc5ea20, 0x344e2: 0x6dc5ec20, 0x344e3: 0x6dc5ee20, + 0x344e4: 0x6dc5f020, 0x344e5: 0x6dc5f220, 0x344e6: 0x6de29020, 0x344e7: 0x6de29220, + 0x344e8: 0x6de29420, 0x344e9: 0x6de29620, 0x344ea: 0x6de29820, 0x344eb: 0x6de29a20, + 0x344ec: 0x6de29c20, 0x344ed: 0x6de29e20, 0x344ee: 0x6de2a020, 0x344ef: 0x6de2a220, + 0x344f0: 0x6de2a420, 0x344f1: 0x6de2a620, 0x344f2: 0x6de2a820, 0x344f3: 0x6de2aa20, + 0x344f4: 0x6de2ac20, 0x344f5: 0x6de2ae20, 0x344f6: 0x6de2b020, 0x344f7: 0x6de2b220, + 0x344f8: 0x6de2b420, 0x344f9: 0x6de2b620, 0x344fa: 0x6de2b820, 0x344fb: 0x6de2ba20, + 0x344fc: 0x6de2bc20, 0x344fd: 0x6de2be20, 0x344fe: 0x6de2c020, 0x344ff: 0x6de2c220, + // Block 0xd14, offset 0x34500 + 0x34500: 0x6de2c420, 0x34501: 0x6de2c620, 0x34502: 0x6de2c820, 0x34503: 0x6de2ca20, + 0x34504: 0x6de2cc20, 0x34505: 0x6de2ce20, 0x34506: 0x6de2d020, 0x34507: 0x6de2d220, + 0x34508: 0x6de2d420, 0x34509: 0x6de2d620, 0x3450a: 0x6de2d820, 0x3450b: 0x6dfa3a20, + 0x3450c: 0x6dfa3c20, 0x3450d: 0x6dfa3e20, 0x3450e: 0x6dfa4020, 0x3450f: 0x6dfa4220, + 0x34510: 0x6dfa4420, 0x34511: 0x6dfa4620, 0x34512: 0x6dfa4820, 0x34513: 0x6dfa4a20, + 0x34514: 0x6dfa4c20, 0x34515: 0x6dfa4e20, 0x34516: 0x6dfa5020, 0x34517: 0x6e0dc620, + 0x34518: 0x6e0dc820, 0x34519: 0x6e0dca20, 0x3451a: 0x6e0dcc20, 0x3451b: 0x6e0dce20, + 0x3451c: 0x6e0dd020, 0x3451d: 0x6e0dd220, 0x3451e: 0x6e0dd420, 0x3451f: 0x6e0dd620, + 0x34520: 0x6e0dd820, 0x34521: 0x6e0dda20, 0x34522: 0x6e0ddc20, 0x34523: 0x6e0dde20, + 0x34524: 0x6e0de020, 0x34525: 0x6e1d3a20, 0x34526: 0x6e1d3c20, 0x34527: 0x6e1d3e20, + 0x34528: 0x6e1d4020, 0x34529: 0x6e1d4220, 0x3452a: 0x6e1d4420, 0x3452b: 0x6e1d4620, + 0x3452c: 0x6e1d4820, 0x3452d: 0x6e1d4a20, 0x3452e: 0x6e1d4c20, 0x3452f: 0x6e28d820, + 0x34530: 0x6e28da20, 0x34531: 0x6e28dc20, 0x34532: 0x6e28de20, 0x34533: 0x6e28e020, + 0x34534: 0x6e28e220, 0x34535: 0x6e28e420, 0x34536: 0x6e28e620, 0x34537: 0x6e28e820, + 0x34538: 0x6e28ea20, 0x34539: 0x6e28ec20, 0x3453a: 0x6e28ee20, 0x3453b: 0x6e321620, + 0x3453c: 0x6e321820, 0x3453d: 0x6e321a20, 0x3453e: 0x6e321c20, 0x3453f: 0x6e321e20, + // Block 0xd15, offset 0x34540 + 0x34540: 0x6e322020, 0x34541: 0x6e322220, 0x34542: 0x6e322420, 0x34543: 0x6e3d2820, + 0x34544: 0x6e3d2a20, 0x34545: 0x6e403e20, 0x34546: 0x6e404020, 0x34547: 0x6e404220, + 0x34548: 0x6e429a20, 0x34549: 0x6e429c20, 0x3454a: 0x6e451c20, 0x3454b: 0x6e45c020, + 0x3454c: 0x6c092620, 0x3454d: 0x6c092820, 0x3454e: 0x6c11c420, 0x3454f: 0x6c11c620, + 0x34550: 0x6c11c820, 0x34551: 0x6c11ca20, 0x34552: 0x6c200620, 0x34553: 0x6c200820, + 0x34554: 0x6c200a20, 0x34555: 0x6c200c20, 0x34556: 0x6c200e20, 0x34557: 0x6c201020, + 0x34558: 0x6c201220, 0x34559: 0x6c201420, 0x3455a: 0x6c33ea20, 0x3455b: 0x6c33ec20, + 0x3455c: 0x6c33ee20, 0x3455d: 0x6c33f020, 0x3455e: 0x6c33f220, 0x3455f: 0x6c33f420, + 0x34560: 0x6c33f620, 0x34561: 0x6c33f820, 0x34562: 0x6c33fa20, 0x34563: 0x6c33fc20, + 0x34564: 0x6c33fe20, 0x34565: 0x6c340020, 0x34566: 0x6c4ea220, 0x34567: 0x6c4ea420, + 0x34568: 0x6c4ea620, 0x34569: 0x6c4ea820, 0x3456a: 0x6c4eaa20, 0x3456b: 0x6c4eac20, + 0x3456c: 0x6c4eae20, 0x3456d: 0x6c4eb020, 0x3456e: 0x6c4eb220, 0x3456f: 0x6c4eb420, + 0x34570: 0x6c4eb620, 0x34571: 0x6c4eb820, 0x34572: 0x6c4eba20, 0x34573: 0x6c4ebc20, + 0x34574: 0x6c4ebe20, 0x34575: 0x6c4ec020, 0x34576: 0x6c4ec220, 0x34577: 0x6c709e20, + 0x34578: 0x6c70a020, 0x34579: 0x6c70a220, 0x3457a: 0x6c70a420, 0x3457b: 0x6c70a620, + 0x3457c: 0x6c70a820, 0x3457d: 0x6c70aa20, 0x3457e: 0x6c70ac20, 0x3457f: 0x6c98c020, + // Block 0xd16, offset 0x34580 + 0x34580: 0x6c98c220, 0x34581: 0x6c98c420, 0x34582: 0x6c98c620, 0x34583: 0x6c98c820, + 0x34584: 0x6c98ca20, 0x34585: 0x6c98cc20, 0x34586: 0x6c98ce20, 0x34587: 0x6c98d020, + 0x34588: 0x6cc49420, 0x34589: 0x6cc49620, 0x3458a: 0x6cc49820, 0x3458b: 0x6cc49a20, + 0x3458c: 0x6cc49c20, 0x3458d: 0x6cc49e20, 0x3458e: 0x6cc4a020, 0x3458f: 0x6cc4a220, + 0x34590: 0x6cc4a420, 0x34591: 0x6cc4a620, 0x34592: 0x6cc4a820, 0x34593: 0x6cc4aa20, + 0x34594: 0x6cf38420, 0x34595: 0x6cf38620, 0x34596: 0x6cf38820, 0x34597: 0x6cf38a20, + 0x34598: 0x6cf38c20, 0x34599: 0x6cf38e20, 0x3459a: 0x6cf39020, 0x3459b: 0x6cf39220, + 0x3459c: 0x6cf39420, 0x3459d: 0x6cf39620, 0x3459e: 0x6cf39820, 0x3459f: 0x6cf39a20, + 0x345a0: 0x6cf39c20, 0x345a1: 0x6cf39e20, 0x345a2: 0x6d234220, 0x345a3: 0x6d234420, + 0x345a4: 0x6d234620, 0x345a5: 0x6d234820, 0x345a6: 0x6d234a20, 0x345a7: 0x6d234c20, + 0x345a8: 0x6d50c820, 0x345a9: 0x6d234e20, 0x345aa: 0x6d235020, 0x345ab: 0x6d235220, + 0x345ac: 0x6d235420, 0x345ad: 0x6d235620, 0x345ae: 0x6d235820, 0x345af: 0x6d235a20, + 0x345b0: 0x6d235c20, 0x345b1: 0x6d235e20, 0x345b2: 0x6d50ca20, 0x345b3: 0x6d50cc20, + 0x345b4: 0x6d50ce20, 0x345b5: 0x6d50d020, 0x345b6: 0x6d50d220, 0x345b7: 0x6d50d420, + 0x345b8: 0x6d50d620, 0x345b9: 0x6d50d820, 0x345ba: 0x6d50da20, 0x345bb: 0x6d50dc20, + 0x345bc: 0x6d50de20, 0x345bd: 0x6d50e020, 0x345be: 0x6d50e220, 0x345bf: 0x6d50e420, + // Block 0xd17, offset 0x345c0 + 0x345c0: 0x6d50e620, 0x345c1: 0x6d50e820, 0x345c2: 0x6d50ea20, 0x345c3: 0x6d50ec20, + 0x345c4: 0x6d50ee20, 0x345c5: 0x6d50f020, 0x345c6: 0x6d50f220, 0x345c7: 0x6d7c9420, + 0x345c8: 0x6d7c9620, 0x345c9: 0x6d7c9820, 0x345ca: 0x6d7c9a20, 0x345cb: 0x6d7c9c20, + 0x345cc: 0x6d7c9e20, 0x345cd: 0x6d7ca020, 0x345ce: 0x6d7ca220, 0x345cf: 0x6d7ca420, + 0x345d0: 0x6d784620, 0x345d1: 0x6d7ca620, 0x345d2: 0x6d7ca820, 0x345d3: 0x6da46e20, + 0x345d4: 0x6da47020, 0x345d5: 0x6da47220, 0x345d6: 0x6da47420, 0x345d7: 0x6da47620, + 0x345d8: 0x6dc60220, 0x345d9: 0x6dc60420, 0x345da: 0x6de2e020, 0x345db: 0x6de2e220, + 0x345dc: 0x6de2e420, 0x345dd: 0x6de2e620, 0x345de: 0x6dfa5620, 0x345df: 0x6dfa5820, + 0x345e0: 0x6dfa5a20, 0x345e1: 0x6e0de620, 0x345e2: 0x6e0de820, 0x345e3: 0x6e0dea20, + 0x345e4: 0x6c092e20, 0x345e5: 0x6c093020, 0x345e6: 0x6c11ce20, 0x345e7: 0x6c11d020, + 0x345e8: 0x6c11d220, 0x345e9: 0x6c11d420, 0x345ea: 0x6c201e20, 0x345eb: 0x6c202020, + 0x345ec: 0x6c202220, 0x345ed: 0x6c202420, 0x345ee: 0x6c202620, 0x345ef: 0x6c340e20, + 0x345f0: 0x6c341020, 0x345f1: 0x6c341220, 0x345f2: 0x6c341420, 0x345f3: 0x6c341620, + 0x345f4: 0x6c341820, 0x345f5: 0x6c341a20, 0x345f6: 0x6c4ed220, 0x345f7: 0x6c4ed420, + 0x345f8: 0x6c4ed620, 0x345f9: 0x6c4ed820, 0x345fa: 0x6c4eda20, 0x345fb: 0x6c4edc20, + 0x345fc: 0x6c4ede20, 0x345fd: 0x6c4ee020, 0x345fe: 0x6c4ee220, 0x345ff: 0x6c4ee420, + // Block 0xd18, offset 0x34600 + 0x34600: 0x6c4ee620, 0x34601: 0x6c4ee820, 0x34602: 0x6c4eea20, 0x34603: 0x6c4eec20, + 0x34604: 0x6c4eee20, 0x34605: 0x6c70ba20, 0x34606: 0x6c70bc20, 0x34607: 0x6c70be20, + 0x34608: 0x6c70c020, 0x34609: 0x6c70c220, 0x3460a: 0x6c70c420, 0x3460b: 0x6c70c620, + 0x3460c: 0x6c70c820, 0x3460d: 0x6c98d820, 0x3460e: 0x6c98da20, 0x3460f: 0x6c98dc20, + 0x34610: 0x6c98de20, 0x34611: 0x6cc4b220, 0x34612: 0x6cc4b420, 0x34613: 0x6cc4b620, + 0x34614: 0x6cc4b820, 0x34615: 0x6cc4ba20, 0x34616: 0x6cf3a220, 0x34617: 0x6cf3a420, + 0x34618: 0x6d236220, 0x34619: 0x6d236420, 0x3461a: 0x6d236620, 0x3461b: 0x6d236820, + 0x3461c: 0x6d50f420, 0x3461d: 0x6d50f620, 0x3461e: 0x6d50f820, 0x3461f: 0x6d7cb020, + 0x34620: 0x6da47820, 0x34621: 0x6dc60620, 0x34622: 0x6e0dec20, 0x34623: 0x6e28f220, + 0x34624: 0x6e28f420, 0x34625: 0x6c047820, 0x34626: 0x6c047a20, 0x34627: 0x6c047c20, + 0x34628: 0x6c094620, 0x34629: 0x6c094820, 0x3462a: 0x6c094a20, 0x3462b: 0x6c094c20, + 0x3462c: 0x6c094e20, 0x3462d: 0x6c120620, 0x3462e: 0x6c120820, 0x3462f: 0x6c120a20, + 0x34630: 0x6c120c20, 0x34631: 0x6c120e20, 0x34632: 0x6c121020, 0x34633: 0x6c121220, + 0x34634: 0x6c121420, 0x34635: 0x6c121620, 0x34636: 0x6c121820, 0x34637: 0x6c121a20, + 0x34638: 0x6c121c20, 0x34639: 0x6c121e20, 0x3463a: 0x6c122020, 0x3463b: 0x6c122220, + 0x3463c: 0x6c122420, 0x3463d: 0x6c122620, 0x3463e: 0x6c122820, 0x3463f: 0x6c122a20, + // Block 0xd19, offset 0x34640 + 0x34640: 0x6c122c20, 0x34641: 0x6c122e20, 0x34642: 0x6c123020, 0x34643: 0x6c20a820, + 0x34644: 0x6c20aa20, 0x34645: 0x6c20ac20, 0x34646: 0x6c20ae20, 0x34647: 0x6c20b020, + 0x34648: 0x6c20b220, 0x34649: 0x6c20b420, 0x3464a: 0x6c20b620, 0x3464b: 0x6c20b820, + 0x3464c: 0x6c20ba20, 0x3464d: 0x6c20bc20, 0x3464e: 0x6c20be20, 0x3464f: 0x6c20c020, + 0x34650: 0x6c20c220, 0x34651: 0x6c20c420, 0x34652: 0x6c20c620, 0x34653: 0x6c20c820, + 0x34654: 0x6c20ca20, 0x34655: 0x6c20cc20, 0x34656: 0x6c20ce20, 0x34657: 0x6c20d020, + 0x34658: 0x6c20d220, 0x34659: 0x6c20d420, 0x3465a: 0x6c20d620, 0x3465b: 0x6c20d820, + 0x3465c: 0x6c20da20, 0x3465d: 0x6c20dc20, 0x3465e: 0x6c20de20, 0x3465f: 0x6c20e020, + 0x34660: 0x6c20e220, 0x34661: 0x6c20e420, 0x34662: 0x6c20e620, 0x34663: 0x6c20e820, + 0x34664: 0x6c20ea20, 0x34665: 0x6c20ec20, 0x34666: 0x6c20ee20, 0x34667: 0x6c20f020, + 0x34668: 0x6c20f220, 0x34669: 0x6c20f420, 0x3466a: 0x6c20f620, 0x3466b: 0x6c20f820, + 0x3466c: 0x6c20fa20, 0x3466d: 0x6c20fc20, 0x3466e: 0x6c20fe20, 0x3466f: 0x6c210020, + 0x34670: 0x6c210220, 0x34671: 0x6c210420, 0x34672: 0x6c210620, 0x34673: 0x6c210820, + 0x34674: 0x6c34be20, 0x34675: 0x6c34c020, 0x34676: 0x6c34c220, 0x34677: 0x6c34c420, + 0x34678: 0x6c34c620, 0x34679: 0x6c34c820, 0x3467a: 0x6c34ca20, 0x3467b: 0x6c34cc20, + 0x3467c: 0x6c34ce20, 0x3467d: 0x6c34d020, 0x3467e: 0x6c34d220, 0x3467f: 0x6c34d420, + // Block 0xd1a, offset 0x34680 + 0x34680: 0x6c34d620, 0x34681: 0x6c34d820, 0x34682: 0x6c34da20, 0x34683: 0x6c34dc20, + 0x34684: 0x6c34de20, 0x34685: 0x6c34e020, 0x34686: 0x6c34e220, 0x34687: 0x6c34e420, + 0x34688: 0x6c34e620, 0x34689: 0x6c34e820, 0x3468a: 0x6c34ea20, 0x3468b: 0x6c34ec20, + 0x3468c: 0x6c34ee20, 0x3468d: 0x6c34f020, 0x3468e: 0x6c34f220, 0x3468f: 0x6c34f420, + 0x34690: 0x6c34f620, 0x34691: 0x6c34f820, 0x34692: 0x6c34fa20, 0x34693: 0x6c34fc20, + 0x34694: 0x6c34fe20, 0x34695: 0x6c350020, 0x34696: 0x6c350220, 0x34697: 0x6c350420, + 0x34698: 0x6c350620, 0x34699: 0x6c350820, 0x3469a: 0x6c350a20, 0x3469b: 0x6c350c20, + 0x3469c: 0x6c350e20, 0x3469d: 0x6c351020, 0x3469e: 0x6c351220, 0x3469f: 0x6c351420, + 0x346a0: 0x6c351620, 0x346a1: 0x6c351820, 0x346a2: 0x6c351a20, 0x346a3: 0x6c351c20, + 0x346a4: 0x6c4f8020, 0x346a5: 0x6c4f8220, 0x346a6: 0x6c4f8420, 0x346a7: 0x6c4f8620, + 0x346a8: 0x6c4f8820, 0x346a9: 0x6c4f8a20, 0x346aa: 0x6c4f8c20, 0x346ab: 0x6c4f8e20, + 0x346ac: 0x6c4f9020, 0x346ad: 0x6c4f9220, 0x346ae: 0x6c4f9420, 0x346af: 0x6c4f9620, + 0x346b0: 0x6c4f9820, 0x346b1: 0x6c4f9a20, 0x346b2: 0x6c4f9c20, 0x346b3: 0x6c4f9e20, + 0x346b4: 0x6c4fa020, 0x346b5: 0x6c4fa220, 0x346b6: 0x6c4fa420, 0x346b7: 0x6c4fa620, + 0x346b8: 0x6c4fa820, 0x346b9: 0x6c4faa20, 0x346ba: 0x6c4fac20, 0x346bb: 0x6c4fae20, + 0x346bc: 0x6c4fb020, 0x346bd: 0x6c4fb220, 0x346be: 0x6c4fb420, 0x346bf: 0x6c4fb620, + // Block 0xd1b, offset 0x346c0 + 0x346c0: 0x6c4fb820, 0x346c1: 0x6c4fba20, 0x346c2: 0x6c4fbc20, 0x346c3: 0x6c4fbe20, + 0x346c4: 0x6c4fc020, 0x346c5: 0x6c4fc220, 0x346c6: 0x6c4fc420, 0x346c7: 0x6c4fc620, + 0x346c8: 0x6c4fc820, 0x346c9: 0x6c4fca20, 0x346ca: 0x6c4fcc20, 0x346cb: 0x6c4fce20, + 0x346cc: 0x6c4fd020, 0x346cd: 0x6c4fd220, 0x346ce: 0x6c4fd420, 0x346cf: 0x6c4fd620, + 0x346d0: 0x6c4fd820, 0x346d1: 0x6c4fda20, 0x346d2: 0x6c4fdc20, 0x346d3: 0x6c4fde20, + 0x346d4: 0x6c4fe020, 0x346d5: 0x6c4fe220, 0x346d6: 0x6c4fe420, 0x346d7: 0x6c4fe620, + 0x346d8: 0x6c4fe820, 0x346d9: 0x6c4fea20, 0x346da: 0x6c4fec20, 0x346db: 0x6c4fee20, + 0x346dc: 0x6c4ff020, 0x346dd: 0x6c4ff220, 0x346de: 0x6c4ff420, 0x346df: 0x6c4ff620, + 0x346e0: 0x6c4ff820, 0x346e1: 0x6c4ffa20, 0x346e2: 0x6c4ffc20, 0x346e3: 0x6c4ffe20, + 0x346e4: 0x6c500020, 0x346e5: 0x6c500220, 0x346e6: 0x6c500420, 0x346e7: 0x6c500620, + 0x346e8: 0x6c500820, 0x346e9: 0x6c500a20, 0x346ea: 0x6c500c20, 0x346eb: 0x6c500e20, + 0x346ec: 0x6c501020, 0x346ed: 0x6c501220, 0x346ee: 0x6c501420, 0x346ef: 0x6c716220, + 0x346f0: 0x6c716420, 0x346f1: 0x6c716620, 0x346f2: 0x6c716820, 0x346f3: 0x6c716a20, + 0x346f4: 0x6c716c20, 0x346f5: 0x6c716e20, 0x346f6: 0x6c717020, 0x346f7: 0x6c717220, + 0x346f8: 0x6c717420, 0x346f9: 0x6c717620, 0x346fa: 0x6c717820, 0x346fb: 0x6c717a20, + 0x346fc: 0x6c717c20, 0x346fd: 0x6c717e20, 0x346fe: 0x6c718020, 0x346ff: 0x6c718220, + // Block 0xd1c, offset 0x34700 + 0x34700: 0x6c718420, 0x34701: 0x6c718620, 0x34702: 0x6c718820, 0x34703: 0x6c718a20, + 0x34704: 0x6c718c20, 0x34705: 0x6c718e20, 0x34706: 0x6c719020, 0x34707: 0x6c719220, + 0x34708: 0x6c719420, 0x34709: 0x6c719620, 0x3470a: 0x6c719820, 0x3470b: 0x6c719a20, + 0x3470c: 0x6c719c20, 0x3470d: 0x6c719e20, 0x3470e: 0x6c71a020, 0x3470f: 0x6c71a220, + 0x34710: 0x6c71a420, 0x34711: 0x6c71a620, 0x34712: 0x6c71a820, 0x34713: 0x6c71aa20, + 0x34714: 0x6c71ac20, 0x34715: 0x6c71ae20, 0x34716: 0x6c71b020, 0x34717: 0x6c71b220, + 0x34718: 0x6c71b420, 0x34719: 0x6c71b620, 0x3471a: 0x6c71b820, 0x3471b: 0x6c71ba20, + 0x3471c: 0x6c71bc20, 0x3471d: 0x6c71be20, 0x3471e: 0x6c71c020, 0x3471f: 0x6c71c220, + 0x34720: 0x6c71c420, 0x34721: 0x6c71c620, 0x34722: 0x6c71c820, 0x34723: 0x6c71ca20, + 0x34724: 0x6c71cc20, 0x34725: 0x6c71ce20, 0x34726: 0x6c71d020, 0x34727: 0x6c71d220, + 0x34728: 0x6c71d420, 0x34729: 0x6c71d620, 0x3472a: 0x6c71d820, 0x3472b: 0x6c71da20, + 0x3472c: 0x6c71dc20, 0x3472d: 0x6c71de20, 0x3472e: 0x6c71e020, 0x3472f: 0x6c71e220, + 0x34730: 0x6c71e420, 0x34731: 0x6c71e620, 0x34732: 0x6c71e820, 0x34733: 0x6c71ea20, + 0x34734: 0x6c71ec20, 0x34735: 0x6c71ee20, 0x34736: 0x6c71f020, 0x34737: 0x6c71f220, + 0x34738: 0x6c71f420, 0x34739: 0x6c71f620, 0x3473a: 0x6c71f820, 0x3473b: 0x6c71fa20, + 0x3473c: 0x6c71fc20, 0x3473d: 0x6c71fe20, 0x3473e: 0x6c720020, 0x3473f: 0x6c720220, + // Block 0xd1d, offset 0x34740 + 0x34740: 0x6c720420, 0x34741: 0x6c99ac20, 0x34742: 0x6c99ae20, 0x34743: 0x6c99b020, + 0x34744: 0x6c99b220, 0x34745: 0x6c99b420, 0x34746: 0x6c99b620, 0x34747: 0x6c99b820, + 0x34748: 0x6c99ba20, 0x34749: 0x6c99bc20, 0x3474a: 0x6c99be20, 0x3474b: 0x6c99c020, + 0x3474c: 0x6c99c220, 0x3474d: 0x6c99c420, 0x3474e: 0x6c99c620, 0x3474f: 0x6c99c820, + 0x34750: 0x6c99ca20, 0x34751: 0x6c99cc20, 0x34752: 0x6c99ce20, 0x34753: 0x6c99d020, + 0x34754: 0x6c99d220, 0x34755: 0x6c99d420, 0x34756: 0x6c99d620, 0x34757: 0x6c99d820, + 0x34758: 0x6c99da20, 0x34759: 0x6c99dc20, 0x3475a: 0x6c99de20, 0x3475b: 0x6c99e020, + 0x3475c: 0x6c99e220, 0x3475d: 0x6c99e420, 0x3475e: 0x6c99e620, 0x3475f: 0x6c99e820, + 0x34760: 0x6c99ea20, 0x34761: 0x6c99ec20, 0x34762: 0x6c99ee20, 0x34763: 0x6c99f020, + 0x34764: 0x6c99f220, 0x34765: 0x6c99f420, 0x34766: 0x6c99f620, 0x34767: 0x6c99f820, + 0x34768: 0x6c99fa20, 0x34769: 0x6c99fc20, 0x3476a: 0x6c99fe20, 0x3476b: 0x6c9a0020, + 0x3476c: 0x6c9a0220, 0x3476d: 0x6c9a0420, 0x3476e: 0x6c9a0620, 0x3476f: 0x6c9a0820, + 0x34770: 0x6c9a0a20, 0x34771: 0x6c9a0c20, 0x34772: 0x6c9a0e20, 0x34773: 0x6c9a1020, + 0x34774: 0x6c9a1220, 0x34775: 0x6c9a1420, 0x34776: 0x6c9a1620, 0x34777: 0x6c9a1820, + 0x34778: 0x6c9a1a20, 0x34779: 0x6c9a1c20, 0x3477a: 0x6c9a1e20, 0x3477b: 0x6c9a2020, + 0x3477c: 0x6c9a2220, 0x3477d: 0x6c9a2420, 0x3477e: 0x6c9a2620, 0x3477f: 0x6c9a2820, + // Block 0xd1e, offset 0x34780 + 0x34780: 0x6c9a2a20, 0x34781: 0x6c9a2c20, 0x34782: 0x6c9a2e20, 0x34783: 0x6c9a3020, + 0x34784: 0x6c9a3220, 0x34785: 0x6c9a3420, 0x34786: 0x6c9a3620, 0x34787: 0x6c9a3820, + 0x34788: 0x6c9a3a20, 0x34789: 0x6c9a3c20, 0x3478a: 0x6c9a3e20, 0x3478b: 0x6c9a4020, + 0x3478c: 0x6c9a4220, 0x3478d: 0x6c9a4420, 0x3478e: 0x6c9a4620, 0x3478f: 0x6c9a4820, + 0x34790: 0x6c9a4a20, 0x34791: 0x6c9a4c20, 0x34792: 0x6c9a4e20, 0x34793: 0x6c9a5020, + 0x34794: 0x6c9a5220, 0x34795: 0x6c9a5420, 0x34796: 0x6c9a5620, 0x34797: 0x6c9a5820, + 0x34798: 0x6c9a5a20, 0x34799: 0x6c9a5c20, 0x3479a: 0x6c9a5e20, 0x3479b: 0x6c9a6020, + 0x3479c: 0x6c9a6220, 0x3479d: 0x6c9a6420, 0x3479e: 0x6c9a6620, 0x3479f: 0x6c9a6820, + 0x347a0: 0x6c9a6a20, 0x347a1: 0x6c9a6c20, 0x347a2: 0x6c9a6e20, 0x347a3: 0x6c9a7020, + 0x347a4: 0x6c9a7220, 0x347a5: 0x6c9a7420, 0x347a6: 0x6c9a7620, 0x347a7: 0x6c9a7820, + 0x347a8: 0x6c9a7a20, 0x347a9: 0x6cc56a20, 0x347aa: 0x6cc56c20, 0x347ab: 0x6cc56e20, + 0x347ac: 0x6cc57020, 0x347ad: 0x6cc57220, 0x347ae: 0x6cc57420, 0x347af: 0x6cc57620, + 0x347b0: 0x6cc57820, 0x347b1: 0x6cc57a20, 0x347b2: 0x6cc57c20, 0x347b3: 0x6cc57e20, + 0x347b4: 0x6cc58020, 0x347b5: 0x6cc58220, 0x347b6: 0x6cc58420, 0x347b7: 0x6cc58620, + 0x347b8: 0x6cc58820, 0x347b9: 0x6cc58a20, 0x347ba: 0x6cc58c20, 0x347bb: 0x6cc58e20, + 0x347bc: 0x6cc59020, 0x347bd: 0x6cc59220, 0x347be: 0x6cc59420, 0x347bf: 0x6cc59620, + // Block 0xd1f, offset 0x347c0 + 0x347c0: 0x6cc59820, 0x347c1: 0x6cc59a20, 0x347c2: 0x6cc59c20, 0x347c3: 0x6cc59e20, + 0x347c4: 0x6cc5a020, 0x347c5: 0x6cc5a220, 0x347c6: 0x6cc5a420, 0x347c7: 0x6cc5a620, + 0x347c8: 0x6cc5a820, 0x347c9: 0x6cc5aa20, 0x347ca: 0x6cc5ac20, 0x347cb: 0x6cc5ae20, + 0x347cc: 0x6cc5b020, 0x347cd: 0x6cc5b220, 0x347ce: 0x6cc5b420, 0x347cf: 0x6cc5b620, + 0x347d0: 0x6cc5b820, 0x347d1: 0x6cc5ba20, 0x347d2: 0x6cc5bc20, 0x347d3: 0x6cc5be20, + 0x347d4: 0x6cc5c020, 0x347d5: 0x6cc5c220, 0x347d6: 0x6cc5c420, 0x347d7: 0x6cc5c620, + 0x347d8: 0x6cc5c820, 0x347d9: 0x6cc5ca20, 0x347da: 0x6cc5cc20, 0x347db: 0x6cc5ce20, + 0x347dc: 0x6cc5d020, 0x347dd: 0x6cc5d220, 0x347de: 0x6cc5d420, 0x347df: 0x6cc5d620, + 0x347e0: 0x6cc5d820, 0x347e1: 0x6cc5da20, 0x347e2: 0x6cc5dc20, 0x347e3: 0x6cc5de20, + 0x347e4: 0x6cc5e020, 0x347e5: 0x6cc5e220, 0x347e6: 0x6cc5e420, 0x347e7: 0x6cc5e620, + 0x347e8: 0x6cc5e820, 0x347e9: 0x6cc5ea20, 0x347ea: 0x6cc5ec20, 0x347eb: 0x6cc5ee20, + 0x347ec: 0x6cc5f020, 0x347ed: 0x6cc5f220, 0x347ee: 0x6cc5f420, 0x347ef: 0x6cc5f620, + 0x347f0: 0x6cc5f820, 0x347f1: 0x6cc5fa20, 0x347f2: 0x6cc5fc20, 0x347f3: 0x6cc5fe20, + 0x347f4: 0x6cc60020, 0x347f5: 0x6cc60220, 0x347f6: 0x6cc60420, 0x347f7: 0x6cc60620, + 0x347f8: 0x6cc60820, 0x347f9: 0x6cc60a20, 0x347fa: 0x6cc60c20, 0x347fb: 0x6cc60e20, + 0x347fc: 0x6cc61020, 0x347fd: 0x6cc61220, 0x347fe: 0x6cc61420, 0x347ff: 0x6d017820, + // Block 0xd20, offset 0x34800 + 0x34800: 0x6cc61620, 0x34801: 0x6cc61820, 0x34802: 0x6cc61a20, 0x34803: 0x6cc61c20, + 0x34804: 0x6cc61e20, 0x34805: 0x6cc62020, 0x34806: 0x6cc62220, 0x34807: 0x6cc62420, + 0x34808: 0x6cc62620, 0x34809: 0x6cc62820, 0x3480a: 0x6cc62a20, 0x3480b: 0x6cc62c20, + 0x3480c: 0x6cc62e20, 0x3480d: 0x6cc63020, 0x3480e: 0x6cc63220, 0x3480f: 0x6cc63420, + 0x34810: 0x6cc63620, 0x34811: 0x6cc63820, 0x34812: 0x6cc63a20, 0x34813: 0x6cc63c20, + 0x34814: 0x6cc63e20, 0x34815: 0x6cc64020, 0x34816: 0x6cc64220, 0x34817: 0x6cc64420, + 0x34818: 0x6cc64620, 0x34819: 0x6cc64820, 0x3481a: 0x6cc64a20, 0x3481b: 0x6cc64c20, + 0x3481c: 0x6cc64e20, 0x3481d: 0x6cc65020, 0x3481e: 0x6cc65220, 0x3481f: 0x6cf45a20, + 0x34820: 0x6cf45c20, 0x34821: 0x6cf45e20, 0x34822: 0x6cf46020, 0x34823: 0x6cf46220, + 0x34824: 0x6cf46420, 0x34825: 0x6cf46620, 0x34826: 0x6cf46820, 0x34827: 0x6cf46a20, + 0x34828: 0x6cf46c20, 0x34829: 0x6cf46e20, 0x3482a: 0x6cf47020, 0x3482b: 0x6cf47220, + 0x3482c: 0x6cf47420, 0x3482d: 0x6cf47620, 0x3482e: 0x6cf47820, 0x3482f: 0x6cf47a20, + 0x34830: 0x6cf47c20, 0x34831: 0x6cf47e20, 0x34832: 0x6cf48020, 0x34833: 0x6cf48220, + 0x34834: 0x6cf48420, 0x34835: 0x6cf48620, 0x34836: 0x6cf48820, 0x34837: 0x6cf48a20, + 0x34838: 0x6cf48c20, 0x34839: 0x6cf48e20, 0x3483a: 0x6cf49020, 0x3483b: 0x6cf49220, + 0x3483c: 0x6cf49420, 0x3483d: 0x6cf49620, 0x3483e: 0x6cf49820, 0x3483f: 0x6cf49a20, + // Block 0xd21, offset 0x34840 + 0x34840: 0x6cf49c20, 0x34841: 0x6cf49e20, 0x34842: 0x6cf4a020, 0x34843: 0x6cf4a220, + 0x34844: 0x6cf4a420, 0x34845: 0x6cf4a620, 0x34846: 0x6cf4a820, 0x34847: 0x6cf4aa20, + 0x34848: 0x6cf4ac20, 0x34849: 0x6cf4ae20, 0x3484a: 0x6cf4b020, 0x3484b: 0x6cf4b220, + 0x3484c: 0x6cf4b420, 0x3484d: 0x6cf4b620, 0x3484e: 0x6cf4b820, 0x3484f: 0x6cf4ba20, + 0x34850: 0x6cf4bc20, 0x34851: 0x6cf4be20, 0x34852: 0x6cf4c020, 0x34853: 0x6cf4c220, + 0x34854: 0x6cf4c420, 0x34855: 0x6cf4c620, 0x34856: 0x6cf4c820, 0x34857: 0x6cf4ca20, + 0x34858: 0x6cf4cc20, 0x34859: 0x6cf4ce20, 0x3485a: 0x6cf4d020, 0x3485b: 0x6cf4d220, + 0x3485c: 0x6cf4d420, 0x3485d: 0x6cf4d620, 0x3485e: 0x6cf4d820, 0x3485f: 0x6cf4da20, + 0x34860: 0x6cf4dc20, 0x34861: 0x6cf4de20, 0x34862: 0x6cf4e020, 0x34863: 0x6cf4e220, + 0x34864: 0x6cf4e420, 0x34865: 0x6cf4e620, 0x34866: 0x6cf4e820, 0x34867: 0x6cf4ea20, + 0x34868: 0x6cf4ec20, 0x34869: 0x6cf4ee20, 0x3486a: 0x6cf4f020, 0x3486b: 0x6cf4f220, + 0x3486c: 0x6cf4f420, 0x3486d: 0x6cf4f620, 0x3486e: 0x6cf4f820, 0x3486f: 0x6cf4fa20, + 0x34870: 0x6cf4fc20, 0x34871: 0x6cf4fe20, 0x34872: 0x6cf50020, 0x34873: 0x6d23fa20, + 0x34874: 0x6d23fc20, 0x34875: 0x6d23fe20, 0x34876: 0x6d240020, 0x34877: 0x6d240220, + 0x34878: 0x6d240420, 0x34879: 0x6d240620, 0x3487a: 0x6d240820, 0x3487b: 0x6d240a20, + 0x3487c: 0x6d240c20, 0x3487d: 0x6d240e20, 0x3487e: 0x6d241020, 0x3487f: 0x6d241220, + // Block 0xd22, offset 0x34880 + 0x34880: 0x6d241420, 0x34881: 0x6d241620, 0x34882: 0x6d241820, 0x34883: 0x6d241a20, + 0x34884: 0x6d241c20, 0x34885: 0x6d241e20, 0x34886: 0x6d242020, 0x34887: 0x6d242220, + 0x34888: 0x6d242420, 0x34889: 0x6d242620, 0x3488a: 0x6d242820, 0x3488b: 0x6d242a20, + 0x3488c: 0x6d242c20, 0x3488d: 0x6d242e20, 0x3488e: 0x6d243020, 0x3488f: 0x6d243220, + 0x34890: 0x6d243420, 0x34891: 0x6d243620, 0x34892: 0x6d243820, 0x34893: 0x6d243a20, + 0x34894: 0x6d243c20, 0x34895: 0x6d243e20, 0x34896: 0x6d244020, 0x34897: 0x6d244220, + 0x34898: 0x6d244420, 0x34899: 0x6d244620, 0x3489a: 0x6d244820, 0x3489b: 0x6d244a20, + 0x3489c: 0x6d244c20, 0x3489d: 0x6d244e20, 0x3489e: 0x6d245020, 0x3489f: 0x6d245220, + 0x348a0: 0x6d245420, 0x348a1: 0x6d245620, 0x348a2: 0x6d245820, 0x348a3: 0x6d245a20, + 0x348a4: 0x6d245c20, 0x348a5: 0x6d245e20, 0x348a6: 0x6d246020, 0x348a7: 0x6d246220, + 0x348a8: 0x6d246420, 0x348a9: 0x6d246620, 0x348aa: 0x6d246820, 0x348ab: 0x6d246a20, + 0x348ac: 0x6d246c20, 0x348ad: 0x6d246e20, 0x348ae: 0x6d247020, 0x348af: 0x6d247220, + 0x348b0: 0x6d247420, 0x348b1: 0x6d247620, 0x348b2: 0x6d247820, 0x348b3: 0x6d247a20, + 0x348b4: 0x6d247c20, 0x348b5: 0x6d247e20, 0x348b6: 0x6d248020, 0x348b7: 0x6d248220, + 0x348b8: 0x6d248420, 0x348b9: 0x6d248620, 0x348ba: 0x6d248820, 0x348bb: 0x6d248a20, + 0x348bc: 0x6d248c20, 0x348bd: 0x6d248e20, 0x348be: 0x6d249020, 0x348bf: 0x6d249220, + // Block 0xd23, offset 0x348c0 + 0x348c0: 0x6d249420, 0x348c1: 0x6d249620, 0x348c2: 0x6d249820, 0x348c3: 0x6d249a20, + 0x348c4: 0x6d249c20, 0x348c5: 0x6d249e20, 0x348c6: 0x6d24a020, 0x348c7: 0x6d24a220, + 0x348c8: 0x6d24a420, 0x348c9: 0x6d24a620, 0x348ca: 0x6d24a820, 0x348cb: 0x6d24aa20, + 0x348cc: 0x6d24ac20, 0x348cd: 0x6d24ae20, 0x348ce: 0x6d24b020, 0x348cf: 0x6d24b220, + 0x348d0: 0x6d24b420, 0x348d1: 0x6d24b620, 0x348d2: 0x6d24b820, 0x348d3: 0x6d24ba20, + 0x348d4: 0x6d24bc20, 0x348d5: 0x6d24be20, 0x348d6: 0x6d24c020, 0x348d7: 0x6d24c220, + 0x348d8: 0x6d24c420, 0x348d9: 0x6d24c620, 0x348da: 0x6d24c820, 0x348db: 0x6d24ca20, + 0x348dc: 0x6d24cc20, 0x348dd: 0x6d24ce20, 0x348de: 0x6d24d020, 0x348df: 0x6d24d220, + 0x348e0: 0x6d519620, 0x348e1: 0x6d519820, 0x348e2: 0x6d519a20, 0x348e3: 0x6d519c20, + 0x348e4: 0x6d519e20, 0x348e5: 0x6d51a020, 0x348e6: 0x6d51a220, 0x348e7: 0x6d51a420, + 0x348e8: 0x6d51a620, 0x348e9: 0x6d51a820, 0x348ea: 0x6d51aa20, 0x348eb: 0x6d51ac20, + 0x348ec: 0x6d51ae20, 0x348ed: 0x6d51b020, 0x348ee: 0x6d51b220, 0x348ef: 0x6d51b420, + 0x348f0: 0x6d51b620, 0x348f1: 0x6d51b820, 0x348f2: 0x6d51ba20, 0x348f3: 0x6d51bc20, + 0x348f4: 0x6d51be20, 0x348f5: 0x6d51c020, 0x348f6: 0x6d51c220, 0x348f7: 0x6d51c420, + 0x348f8: 0x6d51c620, 0x348f9: 0x6d51c820, 0x348fa: 0x6d51ca20, 0x348fb: 0x6d51cc20, + 0x348fc: 0x6d51ce20, 0x348fd: 0x6d51d020, 0x348fe: 0x6d51d220, 0x348ff: 0x6d51d420, + // Block 0xd24, offset 0x34900 + 0x34900: 0x6d51d620, 0x34901: 0x6d51d820, 0x34902: 0x6d51da20, 0x34903: 0x6d51dc20, + 0x34904: 0x6d51de20, 0x34905: 0x6d51e020, 0x34906: 0x6d51e220, 0x34907: 0x6d51e420, + 0x34908: 0x6d51e620, 0x34909: 0x6d51e820, 0x3490a: 0x6d51ea20, 0x3490b: 0x6d51ec20, + 0x3490c: 0x6d51ee20, 0x3490d: 0x6d51f020, 0x3490e: 0x6d51f220, 0x3490f: 0x6d51f420, + 0x34910: 0x6d51f620, 0x34911: 0x6d51f820, 0x34912: 0x6d51fa20, 0x34913: 0x6d51fc20, + 0x34914: 0x6d51fe20, 0x34915: 0x6d520020, 0x34916: 0x6d520220, 0x34917: 0x6d520420, + 0x34918: 0x6d520620, 0x34919: 0x6d520820, 0x3491a: 0x6d520a20, 0x3491b: 0x6d520c20, + 0x3491c: 0x6d520e20, 0x3491d: 0x6d521020, 0x3491e: 0x6d521220, 0x3491f: 0x6d521420, + 0x34920: 0x6d521620, 0x34921: 0x6d521820, 0x34922: 0x6d521a20, 0x34923: 0x6d521c20, + 0x34924: 0x6d521e20, 0x34925: 0x6d522020, 0x34926: 0x6d522220, 0x34927: 0x6d522420, + 0x34928: 0x6d522620, 0x34929: 0x6d522820, 0x3492a: 0x6d522a20, 0x3492b: 0x6d522c20, + 0x3492c: 0x6d522e20, 0x3492d: 0x6d523020, 0x3492e: 0x6d523220, 0x3492f: 0x6d523420, + 0x34930: 0x6d523620, 0x34931: 0x6d523820, 0x34932: 0x6d523a20, 0x34933: 0x6d523c20, + 0x34934: 0x6d523e20, 0x34935: 0x6d524020, 0x34936: 0x6d524220, 0x34937: 0x6d524420, + 0x34938: 0x6d524620, 0x34939: 0x6d524820, 0x3493a: 0x6d524a20, 0x3493b: 0x6d524c20, + 0x3493c: 0x6d524e20, 0x3493d: 0x6d525020, 0x3493e: 0x6d525220, 0x3493f: 0x6d7d0220, + // Block 0xd25, offset 0x34940 + 0x34940: 0x6d7d0420, 0x34941: 0x6d7d0620, 0x34942: 0x6d7d0820, 0x34943: 0x6d7d0a20, + 0x34944: 0x6d7d0c20, 0x34945: 0x6d7d0e20, 0x34946: 0x6d7d1020, 0x34947: 0x6d7d1220, + 0x34948: 0x6d7d1420, 0x34949: 0x6d7d1620, 0x3494a: 0x6d7d1820, 0x3494b: 0x6d7d1a20, + 0x3494c: 0x6d7d1c20, 0x3494d: 0x6d7d1e20, 0x3494e: 0x6d7d2020, 0x3494f: 0x6d7d2220, + 0x34950: 0x6d7d2420, 0x34951: 0x6d7d2620, 0x34952: 0x6d7d2820, 0x34953: 0x6d7d2a20, + 0x34954: 0x6d7d2c20, 0x34955: 0x6d7d2e20, 0x34956: 0x6d7d3020, 0x34957: 0x6d7d3220, + 0x34958: 0x6d7d3420, 0x34959: 0x6d7d3620, 0x3495a: 0x6d7d3820, 0x3495b: 0x6d7d3a20, + 0x3495c: 0x6d7d3c20, 0x3495d: 0x6d7d3e20, 0x3495e: 0x6d7d4020, 0x3495f: 0x6d7d4220, + 0x34960: 0x6d7d4420, 0x34961: 0x6d7d4620, 0x34962: 0x6d7d4820, 0x34963: 0x6d7d4a20, + 0x34964: 0x6d7d4c20, 0x34965: 0x6d7d4e20, 0x34966: 0x6d7d5020, 0x34967: 0x6d7d5220, + 0x34968: 0x6d7d5420, 0x34969: 0x6d7d5620, 0x3496a: 0x6d7d5820, 0x3496b: 0x6d7d5a20, + 0x3496c: 0x6d7d5c20, 0x3496d: 0x6d7d5e20, 0x3496e: 0x6d7d6020, 0x3496f: 0x6d7d6220, + 0x34970: 0x6d7d6420, 0x34971: 0x6d7d6620, 0x34972: 0x6d7d6820, 0x34973: 0x6d7d6a20, + 0x34974: 0x6d7d6c20, 0x34975: 0x6d7d6e20, 0x34976: 0x6d7d7020, 0x34977: 0x6d7d7220, + 0x34978: 0x6d7d7420, 0x34979: 0x6d7d7620, 0x3497a: 0x6d7d7820, 0x3497b: 0x6d7d7a20, + 0x3497c: 0x6d7d7c20, 0x3497d: 0x6d7d7e20, 0x3497e: 0x6d7d8020, 0x3497f: 0x6d7d8220, + // Block 0xd26, offset 0x34980 + 0x34980: 0x6d7d8420, 0x34981: 0x6d7d8620, 0x34982: 0x6d7d8820, 0x34983: 0x6d7d8a20, + 0x34984: 0x6d7d8c20, 0x34985: 0x6d525420, 0x34986: 0x6d7d8e20, 0x34987: 0x6d7d9020, + 0x34988: 0x6d7d9220, 0x34989: 0x6d7d9420, 0x3498a: 0x6d7d9620, 0x3498b: 0x6da4ae20, + 0x3498c: 0x6da4b020, 0x3498d: 0x6da4b220, 0x3498e: 0x6da4b420, 0x3498f: 0x6da4b620, + 0x34990: 0x6da4b820, 0x34991: 0x6da4ba20, 0x34992: 0x6da4bc20, 0x34993: 0x6da4be20, + 0x34994: 0x6da4c020, 0x34995: 0x6da4c220, 0x34996: 0x6da4c420, 0x34997: 0x6da4c620, + 0x34998: 0x6da4c820, 0x34999: 0x6da4ca20, 0x3499a: 0x6da4cc20, 0x3499b: 0x6da4ce20, + 0x3499c: 0x6da4d020, 0x3499d: 0x6da4d220, 0x3499e: 0x6da4d420, 0x3499f: 0x6da4d620, + 0x349a0: 0x6da4d820, 0x349a1: 0x6da4da20, 0x349a2: 0x6da4dc20, 0x349a3: 0x6da4de20, + 0x349a4: 0x6da4e020, 0x349a5: 0x6da4e220, 0x349a6: 0x6da4e420, 0x349a7: 0x6da4e620, + 0x349a8: 0x6da4e820, 0x349a9: 0x6da4ea20, 0x349aa: 0x6da4ec20, 0x349ab: 0x6da4ee20, + 0x349ac: 0x6da4f020, 0x349ad: 0x6da4f220, 0x349ae: 0x6da4f420, 0x349af: 0x6da4f620, + 0x349b0: 0x6da4f820, 0x349b1: 0x6da4fa20, 0x349b2: 0x6da4fc20, 0x349b3: 0x6da4fe20, + 0x349b4: 0x6da50020, 0x349b5: 0x6da50220, 0x349b6: 0x6dc64e20, 0x349b7: 0x6dc65020, + 0x349b8: 0x6dc65220, 0x349b9: 0x6dc65420, 0x349ba: 0x6dc65620, 0x349bb: 0x6dc65820, + 0x349bc: 0x6dc65a20, 0x349bd: 0x6dc65c20, 0x349be: 0x6dc65e20, 0x349bf: 0x6dc66020, + // Block 0xd27, offset 0x349c0 + 0x349c0: 0x6dc66220, 0x349c1: 0x6dc66420, 0x349c2: 0x6dc66620, 0x349c3: 0x6dc66820, + 0x349c4: 0x6dc66a20, 0x349c5: 0x6dc66c20, 0x349c6: 0x6dc66e20, 0x349c7: 0x6dc67020, + 0x349c8: 0x6dc67220, 0x349c9: 0x6dc67420, 0x349ca: 0x6dc67620, 0x349cb: 0x6dc67820, + 0x349cc: 0x6dc67a20, 0x349cd: 0x6dc67c20, 0x349ce: 0x6dc67e20, 0x349cf: 0x6dc68020, + 0x349d0: 0x6dc68220, 0x349d1: 0x6dc68420, 0x349d2: 0x6dc68620, 0x349d3: 0x6dc68820, + 0x349d4: 0x6dc68a20, 0x349d5: 0x6dc68c20, 0x349d6: 0x6dc68e20, 0x349d7: 0x6dc69020, + 0x349d8: 0x6dc69220, 0x349d9: 0x6dc69420, 0x349da: 0x6dc69620, 0x349db: 0x6dc69820, + 0x349dc: 0x6dc69a20, 0x349dd: 0x6dc69c20, 0x349de: 0x6dc69e20, 0x349df: 0x6dc6a020, + 0x349e0: 0x6dc6a220, 0x349e1: 0x6dc6a420, 0x349e2: 0x6dc6a620, 0x349e3: 0x6de30420, + 0x349e4: 0x6de30620, 0x349e5: 0x6de30820, 0x349e6: 0x6de30a20, 0x349e7: 0x6de30c20, + 0x349e8: 0x6de30e20, 0x349e9: 0x6de31020, 0x349ea: 0x6de31220, 0x349eb: 0x6de31420, + 0x349ec: 0x6de31620, 0x349ed: 0x6de31820, 0x349ee: 0x6de31a20, 0x349ef: 0x6de31c20, + 0x349f0: 0x6de31e20, 0x349f1: 0x6de32020, 0x349f2: 0x6de32220, 0x349f3: 0x6de32420, + 0x349f4: 0x6de32620, 0x349f5: 0x6de32820, 0x349f6: 0x6de32a20, 0x349f7: 0x6de32c20, + 0x349f8: 0x6de32e20, 0x349f9: 0x6de33020, 0x349fa: 0x6de33220, 0x349fb: 0x6de33420, + 0x349fc: 0x6de33620, 0x349fd: 0x6de33820, 0x349fe: 0x6de33a20, 0x349ff: 0x6de33c20, + // Block 0xd28, offset 0x34a00 + 0x34a00: 0x6de33e20, 0x34a01: 0x6de34020, 0x34a02: 0x6de34220, 0x34a03: 0x6de34420, + 0x34a04: 0x6de34620, 0x34a05: 0x6de34820, 0x34a06: 0x6de34a20, 0x34a07: 0x6de34c20, + 0x34a08: 0x6de34e20, 0x34a09: 0x6de35020, 0x34a0a: 0x6de35220, 0x34a0b: 0x6de35420, + 0x34a0c: 0x6de35620, 0x34a0d: 0x6dfa7220, 0x34a0e: 0x6dfa7420, 0x34a0f: 0x6dfa7620, + 0x34a10: 0x6dfa7820, 0x34a11: 0x6dfa7a20, 0x34a12: 0x6dfa7c20, 0x34a13: 0x6dfa7e20, + 0x34a14: 0x6dfa8020, 0x34a15: 0x6dfa8220, 0x34a16: 0x6dfa8420, 0x34a17: 0x6dfa8620, + 0x34a18: 0x6dfa8820, 0x34a19: 0x6dfa8a20, 0x34a1a: 0x6dfa8c20, 0x34a1b: 0x6dfa8e20, + 0x34a1c: 0x6dfa9020, 0x34a1d: 0x6dfa9220, 0x34a1e: 0x6dfa9420, 0x34a1f: 0x6dfa9620, + 0x34a20: 0x6dfa9820, 0x34a21: 0x6dfa9a20, 0x34a22: 0x6e0dfe20, 0x34a23: 0x6dfa9c20, + 0x34a24: 0x6dfa9e20, 0x34a25: 0x6dfaa020, 0x34a26: 0x6dfaa220, 0x34a27: 0x6dfaa420, + 0x34a28: 0x6dfaa620, 0x34a29: 0x6dfaa820, 0x34a2a: 0x6dfaaa20, 0x34a2b: 0x6dfaac20, + 0x34a2c: 0x6e0e0020, 0x34a2d: 0x6e0e0220, 0x34a2e: 0x6e0e0420, 0x34a2f: 0x6e0e0620, + 0x34a30: 0x6e0e0820, 0x34a31: 0x6e0e0a20, 0x34a32: 0x6e0e0c20, 0x34a33: 0x6e0e0e20, + 0x34a34: 0x6e0e1020, 0x34a35: 0x6e0e1220, 0x34a36: 0x6e0e1420, 0x34a37: 0x6e0e1620, + 0x34a38: 0x6e0e1820, 0x34a39: 0x6e0e1a20, 0x34a3a: 0x6e0e1c20, 0x34a3b: 0x6e0e1e20, + 0x34a3c: 0x6e0e2020, 0x34a3d: 0x6e0e2220, 0x34a3e: 0x6e0e2420, 0x34a3f: 0x6e0e2620, + // Block 0xd29, offset 0x34a40 + 0x34a40: 0x6e0e2820, 0x34a41: 0x6e0e2a20, 0x34a42: 0x6e1d6620, 0x34a43: 0x6e1d6820, + 0x34a44: 0x6e1d6a20, 0x34a45: 0x6e1d6c20, 0x34a46: 0x6e1d6e20, 0x34a47: 0x6e1d7020, + 0x34a48: 0x6e1d7220, 0x34a49: 0x6e1d7420, 0x34a4a: 0x6e1d7620, 0x34a4b: 0x6e1d7820, + 0x34a4c: 0x6e1d7a20, 0x34a4d: 0x6e1d7c20, 0x34a4e: 0x6e1d7e20, 0x34a4f: 0x6e1d8020, + 0x34a50: 0x6e1d8220, 0x34a51: 0x6e1d8420, 0x34a52: 0x6e1d8620, 0x34a53: 0x6e1d8820, + 0x34a54: 0x6e1d8a20, 0x34a55: 0x6e1d8c20, 0x34a56: 0x6e290820, 0x34a57: 0x6e290a20, + 0x34a58: 0x6e290c20, 0x34a59: 0x6e290e20, 0x34a5a: 0x6e291020, 0x34a5b: 0x6e291220, + 0x34a5c: 0x6e291420, 0x34a5d: 0x6e291620, 0x34a5e: 0x6e322a20, 0x34a5f: 0x6e322c20, + 0x34a60: 0x6e322e20, 0x34a61: 0x6e323020, 0x34a62: 0x6e323220, 0x34a63: 0x6e323420, + 0x34a64: 0x6e323620, 0x34a65: 0x6e323820, 0x34a66: 0x6e323a20, 0x34a67: 0x6e323c20, + 0x34a68: 0x6e323e20, 0x34a69: 0x6e324020, 0x34a6a: 0x6e324220, 0x34a6b: 0x6e324420, + 0x34a6c: 0x6e389620, 0x34a6d: 0x6e389820, 0x34a6e: 0x6e389a20, 0x34a6f: 0x6e389c20, + 0x34a70: 0x6e404420, 0x34a71: 0x6e404620, 0x34a72: 0x6e404820, 0x34a73: 0x6e429e20, + 0x34a74: 0x6e462a20, 0x34a75: 0x6c123820, 0x34a76: 0x6c211a20, 0x34a77: 0x6c353020, + 0x34a78: 0x6c353220, 0x34a79: 0x6c353420, 0x34a7a: 0x6c353620, 0x34a7b: 0x6c353820, + 0x34a7c: 0x6c353a20, 0x34a7d: 0x6c353c20, 0x34a7e: 0x6c502c20, 0x34a7f: 0x6c502e20, + // Block 0xd2a, offset 0x34a80 + 0x34a80: 0x6c503020, 0x34a81: 0x6c722620, 0x34a82: 0x6c722820, 0x34a83: 0x6c722a20, + 0x34a84: 0x6c722c20, 0x34a85: 0x6c722e20, 0x34a86: 0x6c723020, 0x34a87: 0x6c723220, + 0x34a88: 0x6c6aa620, 0x34a89: 0x6c723420, 0x34a8a: 0x6c9a9620, 0x34a8b: 0x6c9a9820, + 0x34a8c: 0x6c9a9a20, 0x34a8d: 0x6c9a9c20, 0x34a8e: 0x6cc67420, 0x34a8f: 0x6cc67620, + 0x34a90: 0x6cc67820, 0x34a91: 0x6cc67a20, 0x34a92: 0x6cc67c20, 0x34a93: 0x6cc67e20, + 0x34a94: 0x6cc68020, 0x34a95: 0x6cf52020, 0x34a96: 0x6cf52220, 0x34a97: 0x6cf52420, + 0x34a98: 0x6cf52620, 0x34a99: 0x6cf52820, 0x34a9a: 0x6d24ea20, 0x34a9b: 0x6d24ec20, + 0x34a9c: 0x6d24ee20, 0x34a9d: 0x6d526a20, 0x34a9e: 0x6d526c20, 0x34a9f: 0x6d526e20, + 0x34aa0: 0x6d7da220, 0x34aa1: 0x6d7da420, 0x34aa2: 0x6d7da620, 0x34aa3: 0x6d7da820, + 0x34aa4: 0x6d7daa20, 0x34aa5: 0x6da50a20, 0x34aa6: 0x6da50c20, 0x34aa7: 0x6da50e20, + 0x34aa8: 0x6da51020, 0x34aa9: 0x6da51220, 0x34aaa: 0x6dfab020, 0x34aab: 0x6c212a20, + 0x34aac: 0x6c212c20, 0x34aad: 0x6c212e20, 0x34aae: 0x6c213020, 0x34aaf: 0x6c213220, + 0x34ab0: 0x6c213420, 0x34ab1: 0x6c213620, 0x34ab2: 0x6c213820, 0x34ab3: 0x6c354820, + 0x34ab4: 0x6c354a20, 0x34ab5: 0x6c354c20, 0x34ab6: 0x6c354e20, 0x34ab7: 0x6c355020, + 0x34ab8: 0x6c355220, 0x34ab9: 0x6c355420, 0x34aba: 0x6c355620, 0x34abb: 0x6c355820, + 0x34abc: 0x6c355a20, 0x34abd: 0x6c355c20, 0x34abe: 0x6c355e20, 0x34abf: 0x6c356020, + // Block 0xd2b, offset 0x34ac0 + 0x34ac0: 0x6c356220, 0x34ac1: 0x6c356420, 0x34ac2: 0x6c356620, 0x34ac3: 0x6c356820, + 0x34ac4: 0x6c356a20, 0x34ac5: 0x6c356c20, 0x34ac6: 0x6c356e20, 0x34ac7: 0x6c357020, + 0x34ac8: 0x6c357220, 0x34ac9: 0x6c504820, 0x34aca: 0x6c504a20, 0x34acb: 0x6c504c20, + 0x34acc: 0x6c504e20, 0x34acd: 0x6c505020, 0x34ace: 0x6c505220, 0x34acf: 0x6c505420, + 0x34ad0: 0x6c505620, 0x34ad1: 0x6c505820, 0x34ad2: 0x6c505a20, 0x34ad3: 0x6c505c20, + 0x34ad4: 0x6c505e20, 0x34ad5: 0x6c506020, 0x34ad6: 0x6c506220, 0x34ad7: 0x6c506420, + 0x34ad8: 0x6c506620, 0x34ad9: 0x6c506820, 0x34ada: 0x6c506a20, 0x34adb: 0x6c724a20, + 0x34adc: 0x6c724c20, 0x34add: 0x6c724e20, 0x34ade: 0x6c725020, 0x34adf: 0x6c725220, + 0x34ae0: 0x6c725420, 0x34ae1: 0x6c725620, 0x34ae2: 0x6c725820, 0x34ae3: 0x6c725a20, + 0x34ae4: 0x6c725c20, 0x34ae5: 0x6c725e20, 0x34ae6: 0x6c726020, 0x34ae7: 0x6c726220, + 0x34ae8: 0x6c726420, 0x34ae9: 0x6c726620, 0x34aea: 0x6c726820, 0x34aeb: 0x6c726a20, + 0x34aec: 0x6c726c20, 0x34aed: 0x6c726e20, 0x34aee: 0x6c727020, 0x34aef: 0x6c727220, + 0x34af0: 0x6c727420, 0x34af1: 0x6c727620, 0x34af2: 0x6c727820, 0x34af3: 0x6c727a20, + 0x34af4: 0x6c727c20, 0x34af5: 0x6c727e20, 0x34af6: 0x6c728020, 0x34af7: 0x6c728220, + 0x34af8: 0x6c728420, 0x34af9: 0x6c9aca20, 0x34afa: 0x6c9acc20, 0x34afb: 0x6c9ace20, + 0x34afc: 0x6c9ad020, 0x34afd: 0x6c9ad220, 0x34afe: 0x6c9ad420, 0x34aff: 0x6c9ad620, + // Block 0xd2c, offset 0x34b00 + 0x34b00: 0x6c9ad820, 0x34b01: 0x6c9ada20, 0x34b02: 0x6c9adc20, 0x34b03: 0x6c9ade20, + 0x34b04: 0x6c9ae020, 0x34b05: 0x6c9ae220, 0x34b06: 0x6c9ae420, 0x34b07: 0x6c9ae620, + 0x34b08: 0x6c9ae820, 0x34b09: 0x6c9aea20, 0x34b0a: 0x6c9aec20, 0x34b0b: 0x6c9aee20, + 0x34b0c: 0x6c9af020, 0x34b0d: 0x6c9af220, 0x34b0e: 0x6c9af420, 0x34b0f: 0x6c9af620, + 0x34b10: 0x6c9af820, 0x34b11: 0x6c9afa20, 0x34b12: 0x6c9afc20, 0x34b13: 0x6c9afe20, + 0x34b14: 0x6c9b0020, 0x34b15: 0x6c9b0220, 0x34b16: 0x6c9b0420, 0x34b17: 0x6c9b0620, + 0x34b18: 0x6c9b0820, 0x34b19: 0x6c9b0a20, 0x34b1a: 0x6cc6b620, 0x34b1b: 0x6cc6b820, + 0x34b1c: 0x6c9b0c20, 0x34b1d: 0x6cc6ba20, 0x34b1e: 0x6cc6bc20, 0x34b1f: 0x6cc6be20, + 0x34b20: 0x6cc6c020, 0x34b21: 0x6cc6c220, 0x34b22: 0x6cc6c420, 0x34b23: 0x6cc6c620, + 0x34b24: 0x6cc6c820, 0x34b25: 0x6cc6ca20, 0x34b26: 0x6cc6cc20, 0x34b27: 0x6cc6ce20, + 0x34b28: 0x6cc6d020, 0x34b29: 0x6cc6d220, 0x34b2a: 0x6cc6d420, 0x34b2b: 0x6cc6d620, + 0x34b2c: 0x6cc6d820, 0x34b2d: 0x6cc6da20, 0x34b2e: 0x6cc6dc20, 0x34b2f: 0x6cc6de20, + 0x34b30: 0x6cc6e020, 0x34b31: 0x6cc6e220, 0x34b32: 0x6cc6e420, 0x34b33: 0x6cc6e620, + 0x34b34: 0x6cc6e820, 0x34b35: 0x6cc6ea20, 0x34b36: 0x6cc6ec20, 0x34b37: 0x6c9b0e20, + 0x34b38: 0x6cc6ee20, 0x34b39: 0x6cc6f020, 0x34b3a: 0x6cc6f220, 0x34b3b: 0x6cc6f420, + 0x34b3c: 0x6cc6f620, 0x34b3d: 0x6cc6f820, 0x34b3e: 0x6cc6fa20, 0x34b3f: 0x6cf54020, + // Block 0xd2d, offset 0x34b40 + 0x34b40: 0x6cf54220, 0x34b41: 0x6cf54420, 0x34b42: 0x6cf54620, 0x34b43: 0x6cf54820, + 0x34b44: 0x6cf54a20, 0x34b45: 0x6cf54c20, 0x34b46: 0x6cf54e20, 0x34b47: 0x6cf55020, + 0x34b48: 0x6cf55220, 0x34b49: 0x6cf55420, 0x34b4a: 0x6cf55620, 0x34b4b: 0x6cf55820, + 0x34b4c: 0x6cf55a20, 0x34b4d: 0x6cf55c20, 0x34b4e: 0x6cf55e20, 0x34b4f: 0x6cf56020, + 0x34b50: 0x6cf56220, 0x34b51: 0x6cf56420, 0x34b52: 0x6cf56620, 0x34b53: 0x6cf56820, + 0x34b54: 0x6cf56a20, 0x34b55: 0x6cf56c20, 0x34b56: 0x6cf56e20, 0x34b57: 0x6cf57020, + 0x34b58: 0x6cf57220, 0x34b59: 0x6cf57420, 0x34b5a: 0x6cf57620, 0x34b5b: 0x6cf57820, + 0x34b5c: 0x6cf57a20, 0x34b5d: 0x6cf57c20, 0x34b5e: 0x6cf57e20, 0x34b5f: 0x6cf58020, + 0x34b60: 0x6cf58220, 0x34b61: 0x6cf58420, 0x34b62: 0x6cf58620, 0x34b63: 0x6cc6fc20, + 0x34b64: 0x6cf58820, 0x34b65: 0x6d017a20, 0x34b66: 0x6d24fe20, 0x34b67: 0x6d250020, + 0x34b68: 0x6d250220, 0x34b69: 0x6d250420, 0x34b6a: 0x6d250620, 0x34b6b: 0x6d250820, + 0x34b6c: 0x6d250a20, 0x34b6d: 0x6d250c20, 0x34b6e: 0x6d250e20, 0x34b6f: 0x6d251020, + 0x34b70: 0x6d251220, 0x34b71: 0x6d251420, 0x34b72: 0x6d251620, 0x34b73: 0x6d251820, + 0x34b74: 0x6d251a20, 0x34b75: 0x6d251c20, 0x34b76: 0x6d251e20, 0x34b77: 0x6d252020, + 0x34b78: 0x6d252220, 0x34b79: 0x6d252420, 0x34b7a: 0x6d252620, 0x34b7b: 0x6d252820, + 0x34b7c: 0x6d252a20, 0x34b7d: 0x6d252c20, 0x34b7e: 0x6d252e20, 0x34b7f: 0x6d253020, + // Block 0xd2e, offset 0x34b80 + 0x34b80: 0x6d253220, 0x34b81: 0x6d253420, 0x34b82: 0x6d253620, 0x34b83: 0x6d253820, + 0x34b84: 0x6d253a20, 0x34b85: 0x6d253c20, 0x34b86: 0x6d033220, 0x34b87: 0x6d528620, + 0x34b88: 0x6d528820, 0x34b89: 0x6d528a20, 0x34b8a: 0x6d528c20, 0x34b8b: 0x6d528e20, + 0x34b8c: 0x6d529020, 0x34b8d: 0x6d529220, 0x34b8e: 0x6d529420, 0x34b8f: 0x6d529620, + 0x34b90: 0x6d529820, 0x34b91: 0x6d529a20, 0x34b92: 0x6d529c20, 0x34b93: 0x6d529e20, + 0x34b94: 0x6d52a020, 0x34b95: 0x6d52a220, 0x34b96: 0x6d52a420, 0x34b97: 0x6d52a620, + 0x34b98: 0x6d52a820, 0x34b99: 0x6d52aa20, 0x34b9a: 0x6d52ac20, 0x34b9b: 0x6d52ae20, + 0x34b9c: 0x6d52b020, 0x34b9d: 0x6d52b220, 0x34b9e: 0x6d7dbe20, 0x34b9f: 0x6d7dc020, + 0x34ba0: 0x6d7dc220, 0x34ba1: 0x6d7dc420, 0x34ba2: 0x6d7dc620, 0x34ba3: 0x6d7dc820, + 0x34ba4: 0x6d7dca20, 0x34ba5: 0x6d7dcc20, 0x34ba6: 0x6d7dce20, 0x34ba7: 0x6d7dd020, + 0x34ba8: 0x6d7dd220, 0x34ba9: 0x6d7dd420, 0x34baa: 0x6d7dd620, 0x34bab: 0x6d7dd820, + 0x34bac: 0x6d7dda20, 0x34bad: 0x6d7ddc20, 0x34bae: 0x6d7dde20, 0x34baf: 0x6d7de020, + 0x34bb0: 0x6d7de220, 0x34bb1: 0x6d7de420, 0x34bb2: 0x6d7de620, 0x34bb3: 0x6d7de820, + 0x34bb4: 0x6d7dea20, 0x34bb5: 0x6d7dec20, 0x34bb6: 0x6d7dee20, 0x34bb7: 0x6d7df020, + 0x34bb8: 0x6d7df220, 0x34bb9: 0x6d7df420, 0x34bba: 0x6d7df620, 0x34bbb: 0x6d7df820, + 0x34bbc: 0x6d7dfa20, 0x34bbd: 0x6d7dfc20, 0x34bbe: 0x6da51a20, 0x34bbf: 0x6da51c20, + // Block 0xd2f, offset 0x34bc0 + 0x34bc0: 0x6da51e20, 0x34bc1: 0x6da52020, 0x34bc2: 0x6da52220, 0x34bc3: 0x6da52420, + 0x34bc4: 0x6dc6bc20, 0x34bc5: 0x6da52620, 0x34bc6: 0x6da52820, 0x34bc7: 0x6da52a20, + 0x34bc8: 0x6da52c20, 0x34bc9: 0x6da52e20, 0x34bca: 0x6da53020, 0x34bcb: 0x6da53220, + 0x34bcc: 0x6da53420, 0x34bcd: 0x6da53620, 0x34bce: 0x6da53820, 0x34bcf: 0x6da53a20, + 0x34bd0: 0x6dc6be20, 0x34bd1: 0x6dc6c020, 0x34bd2: 0x6dc6c220, 0x34bd3: 0x6dc6c420, + 0x34bd4: 0x6dc6c620, 0x34bd5: 0x6dc6c820, 0x34bd6: 0x6dc6ca20, 0x34bd7: 0x6dc6cc20, + 0x34bd8: 0x6dc6ce20, 0x34bd9: 0x6dc6d020, 0x34bda: 0x6dc6d220, 0x34bdb: 0x6de35c20, + 0x34bdc: 0x6de35e20, 0x34bdd: 0x6de36020, 0x34bde: 0x6de36220, 0x34bdf: 0x6de36420, + 0x34be0: 0x6de36620, 0x34be1: 0x6de36820, 0x34be2: 0x6de36a20, 0x34be3: 0x6dfab820, + 0x34be4: 0x6dfaba20, 0x34be5: 0x6dfabc20, 0x34be6: 0x6dfabe20, 0x34be7: 0x6dfac020, + 0x34be8: 0x6dfac220, 0x34be9: 0x6dfac420, 0x34bea: 0x6dfac620, 0x34beb: 0x6dfac820, + 0x34bec: 0x6dfaca20, 0x34bed: 0x6dfacc20, 0x34bee: 0x6e0e2e20, 0x34bef: 0x6e0e3020, + 0x34bf0: 0x6e0e3220, 0x34bf1: 0x6e0e3420, 0x34bf2: 0x6e0e3620, 0x34bf3: 0x6e1d9020, + 0x34bf4: 0x6e1d9220, 0x34bf5: 0x6e291a20, 0x34bf6: 0x6e291c20, 0x34bf7: 0x6e291e20, + 0x34bf8: 0x6e292020, 0x34bf9: 0x6e292220, 0x34bfa: 0x6e292420, 0x34bfb: 0x6e389e20, + 0x34bfc: 0x6e38a020, 0x34bfd: 0x6e404a20, 0x34bfe: 0x6e404c20, 0x34bff: 0x6e42a020, + // Block 0xd30, offset 0x34c00 + 0x34c00: 0x6e442e20, 0x34c01: 0x6c123e20, 0x34c02: 0x6c213e20, 0x34c03: 0x6c357820, + 0x34c04: 0x6c357a20, 0x34c05: 0x6c357c20, 0x34c06: 0x6c507020, 0x34c07: 0x6c507220, + 0x34c08: 0x6c507420, 0x34c09: 0x6c507620, 0x34c0a: 0x6c729220, 0x34c0b: 0x6c728620, + 0x34c0c: 0x6c729420, 0x34c0d: 0x6c729620, 0x34c0e: 0x6c9b1c20, 0x34c0f: 0x6c9b1e20, + 0x34c10: 0x6c9b2020, 0x34c11: 0x6c9b2220, 0x34c12: 0x6c9b2420, 0x34c13: 0x6c9b2620, + 0x34c14: 0x6cc70820, 0x34c15: 0x6cc70a20, 0x34c16: 0x6cc70c20, 0x34c17: 0x6cf59020, + 0x34c18: 0x6cf59220, 0x34c19: 0x6cf59420, 0x34c1a: 0x6d52b420, 0x34c1b: 0x6d52be20, + 0x34c1c: 0x6d52c020, 0x34c1d: 0x6d52c220, 0x34c1e: 0x6d52c420, 0x34c1f: 0x6d52c620, + 0x34c20: 0x6d52c820, 0x34c21: 0x6d52ca20, 0x34c22: 0x6d7e0620, 0x34c23: 0x6d7e0820, + 0x34c24: 0x6da54020, 0x34c25: 0x6dc6d820, 0x34c26: 0x6dc6da20, 0x34c27: 0x6de36e20, + 0x34c28: 0x6dfad020, 0x34c29: 0x6e0e3e20, 0x34c2a: 0x6e0e4020, 0x34c2b: 0x6e292820, + 0x34c2c: 0x6c048820, 0x34c2d: 0x6c214420, 0x34c2e: 0x6c358420, 0x34c2f: 0x6c358620, + 0x34c30: 0x6c358820, 0x34c31: 0x6c507c20, 0x34c32: 0x6c507e20, 0x34c33: 0x6c72a020, + 0x34c34: 0x6c72a220, 0x34c35: 0x6c72a420, 0x34c36: 0x6c72a620, 0x34c37: 0x6c9b2e20, + 0x34c38: 0x6c9b3020, 0x34c39: 0x6c9b3220, 0x34c3a: 0x6c9b3420, 0x34c3b: 0x6c9b3620, + 0x34c3c: 0x6cc71820, 0x34c3d: 0x6cc71a20, 0x34c3e: 0x6cc71c20, 0x34c3f: 0x6cc71e20, + // Block 0xd31, offset 0x34c40 + 0x34c40: 0x6cc72020, 0x34c41: 0x6cf59a20, 0x34c42: 0x6d254c20, 0x34c43: 0x6cf59c20, + 0x34c44: 0x6cf59e20, 0x34c45: 0x6cf5a020, 0x34c46: 0x6d254e20, 0x34c47: 0x6d255020, + 0x34c48: 0x6d255220, 0x34c49: 0x6d52ce20, 0x34c4a: 0x6d52d020, 0x34c4b: 0x6d52d220, + 0x34c4c: 0x6da54620, 0x34c4d: 0x6da54820, 0x34c4e: 0x6dc6de20, 0x34c4f: 0x6de37020, + 0x34c50: 0x6dfad220, 0x34c51: 0x6c048c20, 0x34c52: 0x6c124420, 0x34c53: 0x6c214620, + 0x34c54: 0x6c359220, 0x34c55: 0x6c359420, 0x34c56: 0x6c359620, 0x34c57: 0x6c359820, + 0x34c58: 0x6c359a20, 0x34c59: 0x6c508a20, 0x34c5a: 0x6c508c20, 0x34c5b: 0x6c72ae20, + 0x34c5c: 0x6c72b020, 0x34c5d: 0x6c72b220, 0x34c5e: 0x6c9b3c20, 0x34c5f: 0x6c9b3e20, + 0x34c60: 0x6c9b4020, 0x34c61: 0x6cc72a20, 0x34c62: 0x6cc72c20, 0x34c63: 0x6cc72e20, + 0x34c64: 0x6cc73020, 0x34c65: 0x6cc73220, 0x34c66: 0x6cc73420, 0x34c67: 0x6cc73620, + 0x34c68: 0x6cc73820, 0x34c69: 0x6cc73a20, 0x34c6a: 0x6cc73c20, 0x34c6b: 0x6ca6ac20, + 0x34c6c: 0x6cc73e20, 0x34c6d: 0x6cc74020, 0x34c6e: 0x6cf5a420, 0x34c6f: 0x6cf5a620, + 0x34c70: 0x6cf5a820, 0x34c71: 0x6cf5aa20, 0x34c72: 0x6cf5ac20, 0x34c73: 0x6cf5ae20, + 0x34c74: 0x6cf5b020, 0x34c75: 0x6cf5b220, 0x34c76: 0x6d255a20, 0x34c77: 0x6d255c20, + 0x34c78: 0x6d255e20, 0x34c79: 0x6d256020, 0x34c7a: 0x6d256220, 0x34c7b: 0x6d52da20, + 0x34c7c: 0x6d52dc20, 0x34c7d: 0x6d52de20, 0x34c7e: 0x6d52e020, 0x34c7f: 0x6d52e220, + // Block 0xd32, offset 0x34c80 + 0x34c80: 0x6d7e0e20, 0x34c81: 0x6d7e1020, 0x34c82: 0x6d7e1220, 0x34c83: 0x6d7e1420, + 0x34c84: 0x6d7e1620, 0x34c85: 0x6d7e1820, 0x34c86: 0x6d7e1a20, 0x34c87: 0x6da55020, + 0x34c88: 0x6da55220, 0x34c89: 0x6da55420, 0x34c8a: 0x6da55620, 0x34c8b: 0x6da55820, + 0x34c8c: 0x6dc6e220, 0x34c8d: 0x6dc6e420, 0x34c8e: 0x6dc6e620, 0x34c8f: 0x6dc6e820, + 0x34c90: 0x6dc6ea20, 0x34c91: 0x6de37220, 0x34c92: 0x6de37420, 0x34c93: 0x6de37620, + 0x34c94: 0x6dfad420, 0x34c95: 0x6dfad620, 0x34c96: 0x6e1d9420, 0x34c97: 0x6c124820, + 0x34c98: 0x6c214820, 0x34c99: 0x6c214a20, 0x34c9a: 0x6c35a620, 0x34c9b: 0x6c35a820, + 0x34c9c: 0x6c35aa20, 0x34c9d: 0x6c509820, 0x34c9e: 0x6c509a20, 0x34c9f: 0x6c509c20, + 0x34ca0: 0x6c509e20, 0x34ca1: 0x6c50a020, 0x34ca2: 0x6c50a220, 0x34ca3: 0x6c50a420, + 0x34ca4: 0x6c50a620, 0x34ca5: 0x6c50a820, 0x34ca6: 0x6c72ca20, 0x34ca7: 0x6c72cc20, + 0x34ca8: 0x6c72ce20, 0x34ca9: 0x6c72d020, 0x34caa: 0x6c72d220, 0x34cab: 0x6c72d420, + 0x34cac: 0x6c72d620, 0x34cad: 0x6c72d820, 0x34cae: 0x6c72da20, 0x34caf: 0x6c72dc20, + 0x34cb0: 0x6c72de20, 0x34cb1: 0x6c72e020, 0x34cb2: 0x6c72e220, 0x34cb3: 0x6c9b5820, + 0x34cb4: 0x6c9b5a20, 0x34cb5: 0x6c9b5c20, 0x34cb6: 0x6c9b5e20, 0x34cb7: 0x6c9b6020, + 0x34cb8: 0x6c9b6220, 0x34cb9: 0x6c9b6420, 0x34cba: 0x6c9b6620, 0x34cbb: 0x6c9b6820, + 0x34cbc: 0x6cc74a20, 0x34cbd: 0x6cc74c20, 0x34cbe: 0x6cc74e20, 0x34cbf: 0x6cc75020, + // Block 0xd33, offset 0x34cc0 + 0x34cc0: 0x6cc75220, 0x34cc1: 0x6cc75420, 0x34cc2: 0x6cc75620, 0x34cc3: 0x6cc75820, + 0x34cc4: 0x6cc75a20, 0x34cc5: 0x6cc75c20, 0x34cc6: 0x6cc75e20, 0x34cc7: 0x6cc76020, + 0x34cc8: 0x6cf5be20, 0x34cc9: 0x6cf5c020, 0x34cca: 0x6cf5c220, 0x34ccb: 0x6cf5c420, + 0x34ccc: 0x6cf5c620, 0x34ccd: 0x6cf5c820, 0x34cce: 0x6d256820, 0x34ccf: 0x6d256a20, + 0x34cd0: 0x6d256c20, 0x34cd1: 0x6d256e20, 0x34cd2: 0x6d257020, 0x34cd3: 0x6d257220, + 0x34cd4: 0x6d52e820, 0x34cd5: 0x6d52ea20, 0x34cd6: 0x6d52ec20, 0x34cd7: 0x6d7e2020, + 0x34cd8: 0x6d7e2220, 0x34cd9: 0x6d7e2420, 0x34cda: 0x6d7e2620, 0x34cdb: 0x6d7e2820, + 0x34cdc: 0x6d7e2a20, 0x34cdd: 0x6da55c20, 0x34cde: 0x6dc6ee20, 0x34cdf: 0x6dc6f020, + 0x34ce0: 0x6dc6f220, 0x34ce1: 0x6dc6f420, 0x34ce2: 0x6dc6f620, 0x34ce3: 0x6dc6f820, + 0x34ce4: 0x6de37e20, 0x34ce5: 0x6dfada20, 0x34ce6: 0x6e0e4420, 0x34ce7: 0x6e1d9620, + 0x34ce8: 0x6e1d9820, 0x34ce9: 0x6e292c20, 0x34cea: 0x6e324820, 0x34ceb: 0x6e38a420, + 0x34cec: 0x6e3d2e20, 0x34ced: 0x6c124a20, 0x34cee: 0x6c214c20, 0x34cef: 0x6c214e20, + 0x34cf0: 0x6c50ae20, 0x34cf1: 0x6c72ea20, 0x34cf2: 0x6c72ec20, 0x34cf3: 0x6c72ee20, + 0x34cf4: 0x6cc76a20, 0x34cf5: 0x6cc76c20, 0x34cf6: 0x6cf5d020, 0x34cf7: 0x6cf5d220, + 0x34cf8: 0x6cf5d420, 0x34cf9: 0x6d52f220, 0x34cfa: 0x6d7e3020, 0x34cfb: 0x6c095820, + 0x34cfc: 0x6c095a20, 0x34cfd: 0x6c095c20, 0x34cfe: 0x6c126020, 0x34cff: 0x6c126220, + // Block 0xd34, offset 0x34d00 + 0x34d00: 0x6c126420, 0x34d01: 0x6c126620, 0x34d02: 0x6c126820, 0x34d03: 0x6c126a20, + 0x34d04: 0x6c216e20, 0x34d05: 0x6c126c20, 0x34d06: 0x6c217020, 0x34d07: 0x6c217220, + 0x34d08: 0x6c217420, 0x34d09: 0x6c217620, 0x34d0a: 0x6c217820, 0x34d0b: 0x6c217a20, + 0x34d0c: 0x6c217c20, 0x34d0d: 0x6c217e20, 0x34d0e: 0x6c218020, 0x34d0f: 0x6c218220, + 0x34d10: 0x6c218420, 0x34d11: 0x6c218620, 0x34d12: 0x6c218820, 0x34d13: 0x6c218a20, + 0x34d14: 0x6c218c20, 0x34d15: 0x6c218e20, 0x34d16: 0x6c219020, 0x34d17: 0x6c219220, + 0x34d18: 0x6c219420, 0x34d19: 0x6c219620, 0x34d1a: 0x6c35f820, 0x34d1b: 0x6c35fa20, + 0x34d1c: 0x6c35fc20, 0x34d1d: 0x6c35fe20, 0x34d1e: 0x6c360020, 0x34d1f: 0x6c360220, + 0x34d20: 0x6c360420, 0x34d21: 0x6c360620, 0x34d22: 0x6c360820, 0x34d23: 0x6c360a20, + 0x34d24: 0x6c360c20, 0x34d25: 0x6c360e20, 0x34d26: 0x6c361020, 0x34d27: 0x6c361220, + 0x34d28: 0x6c361420, 0x34d29: 0x6c361620, 0x34d2a: 0x6c361820, 0x34d2b: 0x6c361a20, + 0x34d2c: 0x6c361c20, 0x34d2d: 0x6c361e20, 0x34d2e: 0x6c362020, 0x34d2f: 0x6c362220, + 0x34d30: 0x6c362420, 0x34d31: 0x6c362620, 0x34d32: 0x6c362820, 0x34d33: 0x6c362a20, + 0x34d34: 0x6c362c20, 0x34d35: 0x6c362e20, 0x34d36: 0x6c363020, 0x34d37: 0x6c511020, + 0x34d38: 0x6c511220, 0x34d39: 0x6c511420, 0x34d3a: 0x6c511620, 0x34d3b: 0x6c511820, + 0x34d3c: 0x6c511a20, 0x34d3d: 0x6c511c20, 0x34d3e: 0x6c511e20, 0x34d3f: 0x6c512020, + // Block 0xd35, offset 0x34d40 + 0x34d40: 0x6c512220, 0x34d41: 0x6c512420, 0x34d42: 0x6c512620, 0x34d43: 0x6c512820, + 0x34d44: 0x6c512a20, 0x34d45: 0x6c512c20, 0x34d46: 0x6c512e20, 0x34d47: 0x6c513020, + 0x34d48: 0x6c513220, 0x34d49: 0x6c515e20, 0x34d4a: 0x6c513420, 0x34d4b: 0x6c513620, + 0x34d4c: 0x6c513820, 0x34d4d: 0x6c513a20, 0x34d4e: 0x6c513c20, 0x34d4f: 0x6c513e20, + 0x34d50: 0x6c514020, 0x34d51: 0x6c514220, 0x34d52: 0x6c733220, 0x34d53: 0x6c733420, + 0x34d54: 0x6c733620, 0x34d55: 0x6c733820, 0x34d56: 0x6c733a20, 0x34d57: 0x6c733c20, + 0x34d58: 0x6c733e20, 0x34d59: 0x6c734020, 0x34d5a: 0x6c734220, 0x34d5b: 0x6c734420, + 0x34d5c: 0x6c734620, 0x34d5d: 0x6c734820, 0x34d5e: 0x6c734a20, 0x34d5f: 0x6c734c20, + 0x34d60: 0x6c734e20, 0x34d61: 0x6c735020, 0x34d62: 0x6c735220, 0x34d63: 0x6c735420, + 0x34d64: 0x6c735620, 0x34d65: 0x6c735820, 0x34d66: 0x6c735a20, 0x34d67: 0x6c735c20, + 0x34d68: 0x6c735e20, 0x34d69: 0x6c736020, 0x34d6a: 0x6c736220, 0x34d6b: 0x6c736420, + 0x34d6c: 0x6c736620, 0x34d6d: 0x6c736820, 0x34d6e: 0x6c736a20, 0x34d6f: 0x6c736c20, + 0x34d70: 0x6c736e20, 0x34d71: 0x6c737020, 0x34d72: 0x6c9ba220, 0x34d73: 0x6c9ba420, + 0x34d74: 0x6c9ba620, 0x34d75: 0x6c9ba820, 0x34d76: 0x6c9baa20, 0x34d77: 0x6c9bac20, + 0x34d78: 0x6c9bae20, 0x34d79: 0x6c9bb020, 0x34d7a: 0x6c9bb220, 0x34d7b: 0x6c9bb420, + 0x34d7c: 0x6c9bb620, 0x34d7d: 0x6c9bb820, 0x34d7e: 0x6c9bba20, 0x34d7f: 0x6c9bbc20, + // Block 0xd36, offset 0x34d80 + 0x34d80: 0x6c9bbe20, 0x34d81: 0x6c9bc020, 0x34d82: 0x6c9bc220, 0x34d83: 0x6c9bc420, + 0x34d84: 0x6c9bc620, 0x34d85: 0x6c9bc820, 0x34d86: 0x6c9bca20, 0x34d87: 0x6c9bcc20, + 0x34d88: 0x6c9bce20, 0x34d89: 0x6c9bd020, 0x34d8a: 0x6c9bd220, 0x34d8b: 0x6c9bd420, + 0x34d8c: 0x6c9bd620, 0x34d8d: 0x6c9bd820, 0x34d8e: 0x6c9bda20, 0x34d8f: 0x6c9bdc20, + 0x34d90: 0x6c9bde20, 0x34d91: 0x6c9be020, 0x34d92: 0x6c9be220, 0x34d93: 0x6c9be420, + 0x34d94: 0x6c9be620, 0x34d95: 0x6c9be820, 0x34d96: 0x6c9bea20, 0x34d97: 0x6c9bec20, + 0x34d98: 0x6c9bee20, 0x34d99: 0x6c9bf020, 0x34d9a: 0x6c9bf220, 0x34d9b: 0x6c9bf420, + 0x34d9c: 0x6c9bf620, 0x34d9d: 0x6c9bf820, 0x34d9e: 0x6c9bfa20, 0x34d9f: 0x6c9bfc20, + 0x34da0: 0x6c9bfe20, 0x34da1: 0x6c9c0020, 0x34da2: 0x6cc7ba20, 0x34da3: 0x6cc7bc20, + 0x34da4: 0x6cc7be20, 0x34da5: 0x6cc7c020, 0x34da6: 0x6cc7c220, 0x34da7: 0x6cc7c420, + 0x34da8: 0x6cc7c620, 0x34da9: 0x6cc7c820, 0x34daa: 0x6cc7ca20, 0x34dab: 0x6cc7cc20, + 0x34dac: 0x6cc7ce20, 0x34dad: 0x6cc7d020, 0x34dae: 0x6cc7d220, 0x34daf: 0x6cc7d420, + 0x34db0: 0x6cc7d620, 0x34db1: 0x6cc7d820, 0x34db2: 0x6cc7da20, 0x34db3: 0x6cc7dc20, + 0x34db4: 0x6cc7de20, 0x34db5: 0x6cc7e020, 0x34db6: 0x6cc7e220, 0x34db7: 0x6cc7e420, + 0x34db8: 0x6cc7e620, 0x34db9: 0x6cc7e820, 0x34dba: 0x6cc7ea20, 0x34dbb: 0x6cc7ec20, + 0x34dbc: 0x6cc7ee20, 0x34dbd: 0x6cc7f020, 0x34dbe: 0x6cc7f220, 0x34dbf: 0x6cc7f420, + // Block 0xd37, offset 0x34dc0 + 0x34dc0: 0x6cc7f620, 0x34dc1: 0x6cc7f820, 0x34dc2: 0x6cc7fa20, 0x34dc3: 0x6cc7fc20, + 0x34dc4: 0x6cc7fe20, 0x34dc5: 0x6cc80020, 0x34dc6: 0x6cc80220, 0x34dc7: 0x6cc80420, + 0x34dc8: 0x6cc80620, 0x34dc9: 0x6cc80820, 0x34dca: 0x6cc80a20, 0x34dcb: 0x6cc80c20, + 0x34dcc: 0x6cc80e20, 0x34dcd: 0x6cc81020, 0x34dce: 0x6cc81220, 0x34dcf: 0x6cc81420, + 0x34dd0: 0x6cc81620, 0x34dd1: 0x6cc81820, 0x34dd2: 0x6cc81a20, 0x34dd3: 0x6cc81c20, + 0x34dd4: 0x6cc81e20, 0x34dd5: 0x6cc82020, 0x34dd6: 0x6cc82220, 0x34dd7: 0x6cc82420, + 0x34dd8: 0x6cc82620, 0x34dd9: 0x6cc82820, 0x34dda: 0x6cc82a20, 0x34ddb: 0x6cc82c20, + 0x34ddc: 0x6cc82e20, 0x34ddd: 0x6cc83020, 0x34dde: 0x6cc83220, 0x34ddf: 0x6cc83420, + 0x34de0: 0x6cc83620, 0x34de1: 0x6cc83820, 0x34de2: 0x6cc83a20, 0x34de3: 0x6cc83c20, + 0x34de4: 0x6cf61a20, 0x34de5: 0x6cf61c20, 0x34de6: 0x6cf61e20, 0x34de7: 0x6cf62020, + 0x34de8: 0x6cf62220, 0x34de9: 0x6cf62420, 0x34dea: 0x6cf62620, 0x34deb: 0x6cf62820, + 0x34dec: 0x6cf62a20, 0x34ded: 0x6cf62c20, 0x34dee: 0x6cf62e20, 0x34def: 0x6cf63020, + 0x34df0: 0x6cf63220, 0x34df1: 0x6cf63420, 0x34df2: 0x6cf63620, 0x34df3: 0x6cf63820, + 0x34df4: 0x6cf63a20, 0x34df5: 0x6cf63c20, 0x34df6: 0x6cf63e20, 0x34df7: 0x6cf64020, + 0x34df8: 0x6cf64220, 0x34df9: 0x6cf64420, 0x34dfa: 0x6cf64620, 0x34dfb: 0x6cf64820, + 0x34dfc: 0x6cf64a20, 0x34dfd: 0x6cf64c20, 0x34dfe: 0x6cf64e20, 0x34dff: 0x6cf65020, + // Block 0xd38, offset 0x34e00 + 0x34e00: 0x6cf65220, 0x34e01: 0x6cf65420, 0x34e02: 0x6cf65620, 0x34e03: 0x6cf65820, + 0x34e04: 0x6cf65a20, 0x34e05: 0x6cf65c20, 0x34e06: 0x6cf65e20, 0x34e07: 0x6cf66020, + 0x34e08: 0x6cf66220, 0x34e09: 0x6cf66420, 0x34e0a: 0x6cf66620, 0x34e0b: 0x6cf66820, + 0x34e0c: 0x6cf66a20, 0x34e0d: 0x6cf66c20, 0x34e0e: 0x6cf66e20, 0x34e0f: 0x6cf67020, + 0x34e10: 0x6cf67220, 0x34e11: 0x6cf67420, 0x34e12: 0x6d259c20, 0x34e13: 0x6d259e20, + 0x34e14: 0x6d25a020, 0x34e15: 0x6d25a220, 0x34e16: 0x6d25a420, 0x34e17: 0x6d25a620, + 0x34e18: 0x6d25a820, 0x34e19: 0x6d25aa20, 0x34e1a: 0x6d25ac20, 0x34e1b: 0x6d25ae20, + 0x34e1c: 0x6d25b020, 0x34e1d: 0x6d25b220, 0x34e1e: 0x6d25b420, 0x34e1f: 0x6d25b620, + 0x34e20: 0x6d25b820, 0x34e21: 0x6cf1ac20, 0x34e22: 0x6d25ba20, 0x34e23: 0x6d25bc20, + 0x34e24: 0x6d25be20, 0x34e25: 0x6d25c020, 0x34e26: 0x6d25c220, 0x34e27: 0x6d25c420, + 0x34e28: 0x6d25c620, 0x34e29: 0x6d25c820, 0x34e2a: 0x6d25ca20, 0x34e2b: 0x6d25cc20, + 0x34e2c: 0x6d25ce20, 0x34e2d: 0x6d25d020, 0x34e2e: 0x6d25d220, 0x34e2f: 0x6d25d420, + 0x34e30: 0x6d25d620, 0x34e31: 0x6d25d820, 0x34e32: 0x6d25da20, 0x34e33: 0x6d25dc20, + 0x34e34: 0x6d25de20, 0x34e35: 0x6d25e020, 0x34e36: 0x6d25e220, 0x34e37: 0x6d25e420, + 0x34e38: 0x6d25e620, 0x34e39: 0x6d25e820, 0x34e3a: 0x6d25ea20, 0x34e3b: 0x6d531e20, + 0x34e3c: 0x6d532020, 0x34e3d: 0x6d532220, 0x34e3e: 0x6d532420, 0x34e3f: 0x6d532620, + // Block 0xd39, offset 0x34e40 + 0x34e40: 0x6d532820, 0x34e41: 0x6d532a20, 0x34e42: 0x6d532c20, 0x34e43: 0x6d532e20, + 0x34e44: 0x6d533020, 0x34e45: 0x6d533220, 0x34e46: 0x6d533420, 0x34e47: 0x6d533620, + 0x34e48: 0x6d533820, 0x34e49: 0x6d7e7020, 0x34e4a: 0x6d533a20, 0x34e4b: 0x6d533c20, + 0x34e4c: 0x6d533e20, 0x34e4d: 0x6d534020, 0x34e4e: 0x6d534220, 0x34e4f: 0x6d534420, + 0x34e50: 0x6d534620, 0x34e51: 0x6d534820, 0x34e52: 0x6d4d3220, 0x34e53: 0x6d534a20, + 0x34e54: 0x6d534c20, 0x34e55: 0x6d534e20, 0x34e56: 0x6d535020, 0x34e57: 0x6d535220, + 0x34e58: 0x6d535420, 0x34e59: 0x6d535620, 0x34e5a: 0x6d535820, 0x34e5b: 0x6d535a20, + 0x34e5c: 0x6d535c20, 0x34e5d: 0x6d535e20, 0x34e5e: 0x6d7e7220, 0x34e5f: 0x6d7e7420, + 0x34e60: 0x6d7e7620, 0x34e61: 0x6d7e7820, 0x34e62: 0x6d7e7a20, 0x34e63: 0x6d7e7c20, + 0x34e64: 0x6d7e7e20, 0x34e65: 0x6d7e8020, 0x34e66: 0x6d7e8220, 0x34e67: 0x6d7e8420, + 0x34e68: 0x6d7e8620, 0x34e69: 0x6d7e8820, 0x34e6a: 0x6d7e8a20, 0x34e6b: 0x6d7e8c20, + 0x34e6c: 0x6d7e8e20, 0x34e6d: 0x6d7e9020, 0x34e6e: 0x6d7e9220, 0x34e6f: 0x6d7e9420, + 0x34e70: 0x6d7e9620, 0x34e71: 0x6d7e9820, 0x34e72: 0x6d7e9a20, 0x34e73: 0x6d7e9c20, + 0x34e74: 0x6d7e9e20, 0x34e75: 0x6d7ea020, 0x34e76: 0x6d7ea220, 0x34e77: 0x6d7ea420, + 0x34e78: 0x6d7ea620, 0x34e79: 0x6d7ea820, 0x34e7a: 0x6d7eaa20, 0x34e7b: 0x6d7eac20, + 0x34e7c: 0x6d7eae20, 0x34e7d: 0x6d7eb020, 0x34e7e: 0x6d7eb220, 0x34e7f: 0x6d7eb420, + // Block 0xd3a, offset 0x34e80 + 0x34e80: 0x6d7eb620, 0x34e81: 0x6d7eb820, 0x34e82: 0x6d7eba20, 0x34e83: 0x6d7ebc20, + 0x34e84: 0x6d7ebe20, 0x34e85: 0x6d7ec020, 0x34e86: 0x6d7ec220, 0x34e87: 0x6d536020, + 0x34e88: 0x6d7ec420, 0x34e89: 0x6da57a20, 0x34e8a: 0x6da57c20, 0x34e8b: 0x6da57e20, + 0x34e8c: 0x6da58020, 0x34e8d: 0x6da58220, 0x34e8e: 0x6da58420, 0x34e8f: 0x6da58620, + 0x34e90: 0x6da58820, 0x34e91: 0x6da58a20, 0x34e92: 0x6da58c20, 0x34e93: 0x6da58e20, + 0x34e94: 0x6da59020, 0x34e95: 0x6da59220, 0x34e96: 0x6da59420, 0x34e97: 0x6da59620, + 0x34e98: 0x6da59820, 0x34e99: 0x6da59a20, 0x34e9a: 0x6da59c20, 0x34e9b: 0x6da59e20, + 0x34e9c: 0x6da5a020, 0x34e9d: 0x6da5a220, 0x34e9e: 0x6dc70e20, 0x34e9f: 0x6dc71020, + 0x34ea0: 0x6dc71220, 0x34ea1: 0x6dc71420, 0x34ea2: 0x6dc71620, 0x34ea3: 0x6dc71820, + 0x34ea4: 0x6dc71a20, 0x34ea5: 0x6dc71c20, 0x34ea6: 0x6dc71e20, 0x34ea7: 0x6dc72020, + 0x34ea8: 0x6dc72220, 0x34ea9: 0x6dc72420, 0x34eaa: 0x6dc72620, 0x34eab: 0x6dc72820, + 0x34eac: 0x6dc72a20, 0x34ead: 0x6dc72c20, 0x34eae: 0x6dc72e20, 0x34eaf: 0x6dc73020, + 0x34eb0: 0x6dc73220, 0x34eb1: 0x6dc73420, 0x34eb2: 0x6de39420, 0x34eb3: 0x6de39620, + 0x34eb4: 0x6de39820, 0x34eb5: 0x6de39a20, 0x34eb6: 0x6de39c20, 0x34eb7: 0x6de39e20, + 0x34eb8: 0x6de3a020, 0x34eb9: 0x6de3a220, 0x34eba: 0x6de3a420, 0x34ebb: 0x6de3a620, + 0x34ebc: 0x6de3a820, 0x34ebd: 0x6de3aa20, 0x34ebe: 0x6de3ac20, 0x34ebf: 0x6dfaec20, + // Block 0xd3b, offset 0x34ec0 + 0x34ec0: 0x6dfaee20, 0x34ec1: 0x6dfaf020, 0x34ec2: 0x6dfaf220, 0x34ec3: 0x6dfaf420, + 0x34ec4: 0x6dfaf620, 0x34ec5: 0x6dfaf820, 0x34ec6: 0x6dfafa20, 0x34ec7: 0x6dfafc20, + 0x34ec8: 0x6e0e4820, 0x34ec9: 0x6e0e4a20, 0x34eca: 0x6e0e4c20, 0x34ecb: 0x6e0e4e20, + 0x34ecc: 0x6e0e5020, 0x34ecd: 0x6e1d9e20, 0x34ece: 0x6e1da020, 0x34ecf: 0x6e1da220, + 0x34ed0: 0x6e1da420, 0x34ed1: 0x6e1da620, 0x34ed2: 0x6e1da820, 0x34ed3: 0x6e1daa20, + 0x34ed4: 0x6e1dac20, 0x34ed5: 0x6e1dae20, 0x34ed6: 0x6e293620, 0x34ed7: 0x6e324e20, + 0x34ed8: 0x6e325020, 0x34ed9: 0x6e325220, 0x34eda: 0x6e348820, 0x34edb: 0x6e325420, + 0x34edc: 0x6e38aa20, 0x34edd: 0x6e38ac20, 0x34ede: 0x6e40ba20, 0x34edf: 0x6e42a220, + 0x34ee0: 0x6e46e620, 0x34ee1: 0x6c21a020, 0x34ee2: 0x6c21a220, 0x34ee3: 0x6c364220, + 0x34ee4: 0x6c364420, 0x34ee5: 0x6c364620, 0x34ee6: 0x6c364820, 0x34ee7: 0x6c516020, + 0x34ee8: 0x6c516220, 0x34ee9: 0x6c516420, 0x34eea: 0x6c516620, 0x34eeb: 0x6c516820, + 0x34eec: 0x6c516a20, 0x34eed: 0x6c739420, 0x34eee: 0x6c739620, 0x34eef: 0x6c739820, + 0x34ef0: 0x6c739a20, 0x34ef1: 0x6c739c20, 0x34ef2: 0x6c739e20, 0x34ef3: 0x6c73a020, + 0x34ef4: 0x6c73a220, 0x34ef5: 0x6c73a420, 0x34ef6: 0x6c73a620, 0x34ef7: 0x6c9c0e20, + 0x34ef8: 0x6c9c1020, 0x34ef9: 0x6c9c1220, 0x34efa: 0x6c9c1420, 0x34efb: 0x6cc85220, + 0x34efc: 0x6cc85420, 0x34efd: 0x6cc85620, 0x34efe: 0x6cf68a20, 0x34eff: 0x6cf68c20, + // Block 0xd3c, offset 0x34f00 + 0x34f00: 0x6cf68e20, 0x34f01: 0x6cf69020, 0x34f02: 0x6cf69220, 0x34f03: 0x6d25fc20, + 0x34f04: 0x6d25fe20, 0x34f05: 0x6d260020, 0x34f06: 0x6d537420, 0x34f07: 0x6d537620, + 0x34f08: 0x6d537820, 0x34f09: 0x6d537a20, 0x34f0a: 0x6d537c20, 0x34f0b: 0x6d7ed820, + 0x34f0c: 0x6d7eda20, 0x34f0d: 0x6d7edc20, 0x34f0e: 0x6d7ede20, 0x34f0f: 0x6da5ac20, + 0x34f10: 0x6da5ae20, 0x34f11: 0x6dc73e20, 0x34f12: 0x6dc74020, 0x34f13: 0x6dc74220, + 0x34f14: 0x6dc74420, 0x34f15: 0x6dc74620, 0x34f16: 0x6de3ae20, 0x34f17: 0x6de3b020, + 0x34f18: 0x6dfafe20, 0x34f19: 0x6dfb0020, 0x34f1a: 0x6e325820, 0x34f1b: 0x6e42a420, + 0x34f1c: 0x6e46c620, 0x34f1d: 0x6c096020, 0x34f1e: 0x6c127620, 0x34f1f: 0x6c21a420, + 0x34f20: 0x6c21a620, 0x34f21: 0x6c21a820, 0x34f22: 0x6c21aa20, 0x34f23: 0x6c21ac20, + 0x34f24: 0x6c365420, 0x34f25: 0x6c517420, 0x34f26: 0x6c517620, 0x34f27: 0x6c517820, + 0x34f28: 0x6c5dc820, 0x34f29: 0x6c517a20, 0x34f2a: 0x6c517c20, 0x34f2b: 0x6c517e20, + 0x34f2c: 0x6c518020, 0x34f2d: 0x6c73b620, 0x34f2e: 0x6c73b820, 0x34f2f: 0x6c825c20, + 0x34f30: 0x6c825e20, 0x34f31: 0x6c9c2420, 0x34f32: 0x6c9c2620, 0x34f33: 0x6c9c2820, + 0x34f34: 0x6c9c2a20, 0x34f35: 0x6c9c2c20, 0x34f36: 0x6c9c2e20, 0x34f37: 0x6cc86220, + 0x34f38: 0x6cc86420, 0x34f39: 0x6cc86620, 0x34f3a: 0x6cc86820, 0x34f3b: 0x6cc86a20, + 0x34f3c: 0x6cc86c20, 0x34f3d: 0x6cc86e20, 0x34f3e: 0x6cc87020, 0x34f3f: 0x6cc87220, + // Block 0xd3d, offset 0x34f40 + 0x34f40: 0x6cc87420, 0x34f41: 0x6cc87620, 0x34f42: 0x6cc87820, 0x34f43: 0x6cc87a20, + 0x34f44: 0x6cf69820, 0x34f45: 0x6cf69a20, 0x34f46: 0x6cf69c20, 0x34f47: 0x6cf69e20, + 0x34f48: 0x6cf6a020, 0x34f49: 0x6cf6a220, 0x34f4a: 0x6cf6a420, 0x34f4b: 0x6cf6a620, + 0x34f4c: 0x6cf6a820, 0x34f4d: 0x6d260820, 0x34f4e: 0x6d260a20, 0x34f4f: 0x6d260c20, + 0x34f50: 0x6d260e20, 0x34f51: 0x6d261020, 0x34f52: 0x6d538820, 0x34f53: 0x6d538a20, + 0x34f54: 0x6d538c20, 0x34f55: 0x6d538e20, 0x34f56: 0x6d539020, 0x34f57: 0x6d539220, + 0x34f58: 0x6d539420, 0x34f59: 0x6d539620, 0x34f5a: 0x6d7eec20, 0x34f5b: 0x6d7eee20, + 0x34f5c: 0x6da5b220, 0x34f5d: 0x6d7ef020, 0x34f5e: 0x6d7ef220, 0x34f5f: 0x6d7ef420, + 0x34f60: 0x6d7ef620, 0x34f61: 0x6d7ef820, 0x34f62: 0x6d7efa20, 0x34f63: 0x6da5b420, + 0x34f64: 0x6da5b620, 0x34f65: 0x6da5b820, 0x34f66: 0x6da5ba20, 0x34f67: 0x6da5bc20, + 0x34f68: 0x6da5be20, 0x34f69: 0x6dc74a20, 0x34f6a: 0x6dc74c20, 0x34f6b: 0x6dc74e20, + 0x34f6c: 0x6dc75020, 0x34f6d: 0x6dc75220, 0x34f6e: 0x6dfb0420, 0x34f6f: 0x6dfb0620, + 0x34f70: 0x6e1db020, 0x34f71: 0x6e293820, 0x34f72: 0x6e325a20, 0x34f73: 0x6c04a220, + 0x34f74: 0x6c04a420, 0x34f75: 0x6c097020, 0x34f76: 0x6c097220, 0x34f77: 0x6c097420, + 0x34f78: 0x6c12a220, 0x34f79: 0x6c12a420, 0x34f7a: 0x6c12a620, 0x34f7b: 0x6c12a820, + 0x34f7c: 0x6c12aa20, 0x34f7d: 0x6c12ac20, 0x34f7e: 0x6c12ae20, 0x34f7f: 0x6c12b020, + // Block 0xd3e, offset 0x34f80 + 0x34f80: 0x6c12b220, 0x34f81: 0x6c220820, 0x34f82: 0x6c220a20, 0x34f83: 0x6c220c20, + 0x34f84: 0x6c220e20, 0x34f85: 0x6c221020, 0x34f86: 0x6c221220, 0x34f87: 0x6c221420, + 0x34f88: 0x6c221620, 0x34f89: 0x6c221820, 0x34f8a: 0x6c221a20, 0x34f8b: 0x6c221c20, + 0x34f8c: 0x6c221e20, 0x34f8d: 0x6c222020, 0x34f8e: 0x6c222220, 0x34f8f: 0x6c222420, + 0x34f90: 0x6c222620, 0x34f91: 0x6c222820, 0x34f92: 0x6c222a20, 0x34f93: 0x6c222c20, + 0x34f94: 0x6c36f220, 0x34f95: 0x6c36f420, 0x34f96: 0x6c36f620, 0x34f97: 0x6c36f820, + 0x34f98: 0x6c36fa20, 0x34f99: 0x6c36fc20, 0x34f9a: 0x6c36fe20, 0x34f9b: 0x6c370020, + 0x34f9c: 0x6c370220, 0x34f9d: 0x6c370420, 0x34f9e: 0x6c370620, 0x34f9f: 0x6c370820, + 0x34fa0: 0x6c370a20, 0x34fa1: 0x6c370c20, 0x34fa2: 0x6c370e20, 0x34fa3: 0x6c371020, + 0x34fa4: 0x6c371220, 0x34fa5: 0x6c371420, 0x34fa6: 0x6c371620, 0x34fa7: 0x6c371820, + 0x34fa8: 0x6c371a20, 0x34fa9: 0x6c371c20, 0x34faa: 0x6c371e20, 0x34fab: 0x6c372020, + 0x34fac: 0x6c372220, 0x34fad: 0x6c372420, 0x34fae: 0x6c372620, 0x34faf: 0x6c372820, + 0x34fb0: 0x6c372a20, 0x34fb1: 0x6c372c20, 0x34fb2: 0x6c372e20, 0x34fb3: 0x6c373020, + 0x34fb4: 0x6c373220, 0x34fb5: 0x6c373420, 0x34fb6: 0x6c373620, 0x34fb7: 0x6c373820, + 0x34fb8: 0x6c373a20, 0x34fb9: 0x6c373c20, 0x34fba: 0x6c373e20, 0x34fbb: 0x6c374020, + 0x34fbc: 0x6c374220, 0x34fbd: 0x6c374420, 0x34fbe: 0x6c374620, 0x34fbf: 0x6c374820, + // Block 0xd3f, offset 0x34fc0 + 0x34fc0: 0x6c374a20, 0x34fc1: 0x6c374c20, 0x34fc2: 0x6c374e20, 0x34fc3: 0x6c375020, + 0x34fc4: 0x6c375220, 0x34fc5: 0x6c375420, 0x34fc6: 0x6c375620, 0x34fc7: 0x6c375820, + 0x34fc8: 0x6c525420, 0x34fc9: 0x6c525620, 0x34fca: 0x6c525820, 0x34fcb: 0x6c525a20, + 0x34fcc: 0x6c525c20, 0x34fcd: 0x6c525e20, 0x34fce: 0x6c526020, 0x34fcf: 0x6c526220, + 0x34fd0: 0x6c526420, 0x34fd1: 0x6c526620, 0x34fd2: 0x6c526820, 0x34fd3: 0x6c526a20, + 0x34fd4: 0x6c526c20, 0x34fd5: 0x6c526e20, 0x34fd6: 0x6c527020, 0x34fd7: 0x6c527220, + 0x34fd8: 0x6c527420, 0x34fd9: 0x6c527620, 0x34fda: 0x6c527820, 0x34fdb: 0x6c527a20, + 0x34fdc: 0x6c527c20, 0x34fdd: 0x6c527e20, 0x34fde: 0x6c528020, 0x34fdf: 0x6c528220, + 0x34fe0: 0x6c528420, 0x34fe1: 0x6c528620, 0x34fe2: 0x6c528820, 0x34fe3: 0x6c528a20, + 0x34fe4: 0x6c528c20, 0x34fe5: 0x6c528e20, 0x34fe6: 0x6c529020, 0x34fe7: 0x6c529220, + 0x34fe8: 0x6c529420, 0x34fe9: 0x6c529620, 0x34fea: 0x6c529820, 0x34feb: 0x6c529a20, + 0x34fec: 0x6c529c20, 0x34fed: 0x6c529e20, 0x34fee: 0x6c52a020, 0x34fef: 0x6c52a220, + 0x34ff0: 0x6c52a420, 0x34ff1: 0x6c52a620, 0x34ff2: 0x6c52a820, 0x34ff3: 0x6c52aa20, + 0x34ff4: 0x6c52ac20, 0x34ff5: 0x6c749820, 0x34ff6: 0x6c749a20, 0x34ff7: 0x6c749c20, + 0x34ff8: 0x6c749e20, 0x34ff9: 0x6c74a020, 0x34ffa: 0x6c74a220, 0x34ffb: 0x6c74a420, + 0x34ffc: 0x6c74a620, 0x34ffd: 0x6c74a820, 0x34ffe: 0x6c74aa20, 0x34fff: 0x6c74ac20, + // Block 0xd40, offset 0x35000 + 0x35000: 0x6c74ae20, 0x35001: 0x6c74b020, 0x35002: 0x6c74b220, 0x35003: 0x6c74b420, + 0x35004: 0x6c74b620, 0x35005: 0x6c74b820, 0x35006: 0x6c74ba20, 0x35007: 0x6c74bc20, + 0x35008: 0x6c74be20, 0x35009: 0x6c74c020, 0x3500a: 0x6c74c220, 0x3500b: 0x6c74c420, + 0x3500c: 0x6c74c620, 0x3500d: 0x6c74c820, 0x3500e: 0x6c74ca20, 0x3500f: 0x6c74cc20, + 0x35010: 0x6c74ce20, 0x35011: 0x6c74d020, 0x35012: 0x6c74d220, 0x35013: 0x6c74d420, + 0x35014: 0x6c74d620, 0x35015: 0x6c74d820, 0x35016: 0x6c74da20, 0x35017: 0x6c74dc20, + 0x35018: 0x6c74de20, 0x35019: 0x6c74e020, 0x3501a: 0x6c74e220, 0x3501b: 0x6c74e420, + 0x3501c: 0x6c74e620, 0x3501d: 0x6c74e820, 0x3501e: 0x6c74ea20, 0x3501f: 0x6c74ec20, + 0x35020: 0x6c74ee20, 0x35021: 0x6c74f020, 0x35022: 0x6c74f220, 0x35023: 0x6c74f420, + 0x35024: 0x6c74f620, 0x35025: 0x6c74f820, 0x35026: 0x6c74fa20, 0x35027: 0x6c6a4c20, + 0x35028: 0x6c74fc20, 0x35029: 0x6c74fe20, 0x3502a: 0x6c750020, 0x3502b: 0x6c750220, + 0x3502c: 0x6c750420, 0x3502d: 0x6c750620, 0x3502e: 0x6c750820, 0x3502f: 0x6c750a20, + 0x35030: 0x6c750c20, 0x35031: 0x6c750e20, 0x35032: 0x6c751020, 0x35033: 0x6c751220, + 0x35034: 0x6c751420, 0x35035: 0x6c751620, 0x35036: 0x6c751820, 0x35037: 0x6c751a20, + 0x35038: 0x6c751c20, 0x35039: 0x6c751e20, 0x3503a: 0x6c752020, 0x3503b: 0x6c752220, + 0x3503c: 0x6c752420, 0x3503d: 0x6c752620, 0x3503e: 0x6c752820, 0x3503f: 0x6c9d0220, + // Block 0xd41, offset 0x35040 + 0x35040: 0x6c9d0420, 0x35041: 0x6c9d0620, 0x35042: 0x6c9d0820, 0x35043: 0x6c9d0a20, + 0x35044: 0x6c9d0c20, 0x35045: 0x6c9d0e20, 0x35046: 0x6c9d1020, 0x35047: 0x6c9d1220, + 0x35048: 0x6c9d1420, 0x35049: 0x6c9d1620, 0x3504a: 0x6c9d1820, 0x3504b: 0x6c9d1a20, + 0x3504c: 0x6c9d1c20, 0x3504d: 0x6c9d1e20, 0x3504e: 0x6c9d2020, 0x3504f: 0x6c9d2220, + 0x35050: 0x6c9d2420, 0x35051: 0x6c9d2620, 0x35052: 0x6c9d2820, 0x35053: 0x6c9d2a20, + 0x35054: 0x6c9d2c20, 0x35055: 0x6c9d2e20, 0x35056: 0x6c9d3020, 0x35057: 0x6c9d3220, + 0x35058: 0x6c9d3420, 0x35059: 0x6c9d3620, 0x3505a: 0x6c9d3820, 0x3505b: 0x6c9d3a20, + 0x3505c: 0x6c9d3c20, 0x3505d: 0x6c9d3e20, 0x3505e: 0x6c9d4020, 0x3505f: 0x6c9d4220, + 0x35060: 0x6c9d4420, 0x35061: 0x6c9d4620, 0x35062: 0x6c9d4820, 0x35063: 0x6c9d4a20, + 0x35064: 0x6c9d4c20, 0x35065: 0x6c9d4e20, 0x35066: 0x6c9d5020, 0x35067: 0x6c9d5220, + 0x35068: 0x6c9d5420, 0x35069: 0x6c9d5620, 0x3506a: 0x6c9d5820, 0x3506b: 0x6c9d5a20, + 0x3506c: 0x6c9d5c20, 0x3506d: 0x6c9d5e20, 0x3506e: 0x6c9d6020, 0x3506f: 0x6c9d6220, + 0x35070: 0x6c9d6420, 0x35071: 0x6c9d6620, 0x35072: 0x6c9d6820, 0x35073: 0x6c9d6a20, + 0x35074: 0x6c9d6c20, 0x35075: 0x6c9d6e20, 0x35076: 0x6c9d7020, 0x35077: 0x6c9d7220, + 0x35078: 0x6c9d7420, 0x35079: 0x6c9d7620, 0x3507a: 0x6c9d7820, 0x3507b: 0x6c9d7a20, + 0x3507c: 0x6c9d7c20, 0x3507d: 0x6c9d7e20, 0x3507e: 0x6c9d8020, 0x3507f: 0x6c9d8220, + // Block 0xd42, offset 0x35080 + 0x35080: 0x6c9d8420, 0x35081: 0x6cc98620, 0x35082: 0x6cc98820, 0x35083: 0x6cc98a20, + 0x35084: 0x6cc98c20, 0x35085: 0x6cc98e20, 0x35086: 0x6cc99020, 0x35087: 0x6cc99220, + 0x35088: 0x6cc99420, 0x35089: 0x6cc99620, 0x3508a: 0x6cc99820, 0x3508b: 0x6cc99a20, + 0x3508c: 0x6cc99c20, 0x3508d: 0x6cc99e20, 0x3508e: 0x6cc9a020, 0x3508f: 0x6cc9a220, + 0x35090: 0x6cc9a420, 0x35091: 0x6cc9a620, 0x35092: 0x6cc9a820, 0x35093: 0x6cc9aa20, + 0x35094: 0x6cc9ac20, 0x35095: 0x6cc9ae20, 0x35096: 0x6cc9b020, 0x35097: 0x6cc9b220, + 0x35098: 0x6cc9b420, 0x35099: 0x6cc9b620, 0x3509a: 0x6cc9b820, 0x3509b: 0x6cc9ba20, + 0x3509c: 0x6cc9bc20, 0x3509d: 0x6cc9be20, 0x3509e: 0x6cc9c020, 0x3509f: 0x6cc9c220, + 0x350a0: 0x6cc9c420, 0x350a1: 0x6cc9c620, 0x350a2: 0x6cc9c820, 0x350a3: 0x6cc9ca20, + 0x350a4: 0x6cc9cc20, 0x350a5: 0x6cc9ce20, 0x350a6: 0x6cc9d020, 0x350a7: 0x6cc9d220, + 0x350a8: 0x6cc9d420, 0x350a9: 0x6cc9d620, 0x350aa: 0x6cc9d820, 0x350ab: 0x6cc9da20, + 0x350ac: 0x6cc9dc20, 0x350ad: 0x6cc9de20, 0x350ae: 0x6cc9e020, 0x350af: 0x6cc9e220, + 0x350b0: 0x6cc9e420, 0x350b1: 0x6cc9e620, 0x350b2: 0x6cc9e820, 0x350b3: 0x6cc9ea20, + 0x350b4: 0x6cc9ec20, 0x350b5: 0x6cc9ee20, 0x350b6: 0x6cc9f020, 0x350b7: 0x6cc9f220, + 0x350b8: 0x6cc9f420, 0x350b9: 0x6cc9f620, 0x350ba: 0x6cc9f820, 0x350bb: 0x6cc9fa20, + 0x350bc: 0x6cc9fc20, 0x350bd: 0x6cc9fe20, 0x350be: 0x6cca0020, 0x350bf: 0x6cca0220, + // Block 0xd43, offset 0x350c0 + 0x350c0: 0x6cca0420, 0x350c1: 0x6cca0620, 0x350c2: 0x6cca0820, 0x350c3: 0x6cca0a20, + 0x350c4: 0x6cca0c20, 0x350c5: 0x6cca0e20, 0x350c6: 0x6cca1020, 0x350c7: 0x6cca1220, + 0x350c8: 0x6cca1420, 0x350c9: 0x6cca1620, 0x350ca: 0x6cca1820, 0x350cb: 0x6cca1a20, + 0x350cc: 0x6cca1c20, 0x350cd: 0x6cca1e20, 0x350ce: 0x6cca2020, 0x350cf: 0x6cca2220, + 0x350d0: 0x6cca2420, 0x350d1: 0x6cca2620, 0x350d2: 0x6cca2820, 0x350d3: 0x6cca2a20, + 0x350d4: 0x6cca2c20, 0x350d5: 0x6cca2e20, 0x350d6: 0x6cca3020, 0x350d7: 0x6cca3220, + 0x350d8: 0x6cca3420, 0x350d9: 0x6cca3620, 0x350da: 0x6cca3820, 0x350db: 0x6cca3a20, + 0x350dc: 0x6cca3c20, 0x350dd: 0x6cca3e20, 0x350de: 0x6cca4020, 0x350df: 0x6cca4220, + 0x350e0: 0x6cca4420, 0x350e1: 0x6cca4620, 0x350e2: 0x6cca4820, 0x350e3: 0x6cca4a20, + 0x350e4: 0x6cca4c20, 0x350e5: 0x6cca4e20, 0x350e6: 0x6cca5020, 0x350e7: 0x6cca5220, + 0x350e8: 0x6cca5420, 0x350e9: 0x6cca5620, 0x350ea: 0x6cca5820, 0x350eb: 0x6cca5a20, + 0x350ec: 0x6cca5c20, 0x350ed: 0x6cca5e20, 0x350ee: 0x6cca6020, 0x350ef: 0x6cca6220, + 0x350f0: 0x6cca6420, 0x350f1: 0x6cf79c20, 0x350f2: 0x6cf79e20, 0x350f3: 0x6cf7a020, + 0x350f4: 0x6cf7a220, 0x350f5: 0x6cf7a420, 0x350f6: 0x6cf7a620, 0x350f7: 0x6cf7a820, + 0x350f8: 0x6cf7aa20, 0x350f9: 0x6cf7ac20, 0x350fa: 0x6cf7ae20, 0x350fb: 0x6cf7b020, + 0x350fc: 0x6cf7b220, 0x350fd: 0x6cf7b420, 0x350fe: 0x6cf7b620, 0x350ff: 0x6cf7b820, + // Block 0xd44, offset 0x35100 + 0x35100: 0x6cf7ba20, 0x35101: 0x6cf7bc20, 0x35102: 0x6cf7be20, 0x35103: 0x6cf7c020, + 0x35104: 0x6cf7c220, 0x35105: 0x6cf7c420, 0x35106: 0x6cf7c620, 0x35107: 0x6cf7c820, + 0x35108: 0x6cf7ca20, 0x35109: 0x6cf7cc20, 0x3510a: 0x6cf7ce20, 0x3510b: 0x6cf7d020, + 0x3510c: 0x6cf7d220, 0x3510d: 0x6cf7d420, 0x3510e: 0x6cf7d620, 0x3510f: 0x6cf7d820, + 0x35110: 0x6cf7da20, 0x35111: 0x6cf7dc20, 0x35112: 0x6cf7de20, 0x35113: 0x6cf7e020, + 0x35114: 0x6cf7e220, 0x35115: 0x6cf7e420, 0x35116: 0x6cf7e620, 0x35117: 0x6cf7e820, + 0x35118: 0x6cf7ea20, 0x35119: 0x6cf7ec20, 0x3511a: 0x6cf7ee20, 0x3511b: 0x6cf7f020, + 0x3511c: 0x6cf7f220, 0x3511d: 0x6cf7f420, 0x3511e: 0x6cf7f620, 0x3511f: 0x6cf7f820, + 0x35120: 0x6cf7fa20, 0x35121: 0x6cf7fc20, 0x35122: 0x6cf7fe20, 0x35123: 0x6cf80020, + 0x35124: 0x6d26fa20, 0x35125: 0x6cf80220, 0x35126: 0x6cf80420, 0x35127: 0x6cf80620, + 0x35128: 0x6cf80820, 0x35129: 0x6cf80a20, 0x3512a: 0x6cf80c20, 0x3512b: 0x6cf80e20, + 0x3512c: 0x6cf81020, 0x3512d: 0x6cf81220, 0x3512e: 0x6cf81420, 0x3512f: 0x6cf81620, + 0x35130: 0x6cf81820, 0x35131: 0x6cf81a20, 0x35132: 0x6cf81c20, 0x35133: 0x6cf81e20, + 0x35134: 0x6cf82020, 0x35135: 0x6cf82220, 0x35136: 0x6cf82420, 0x35137: 0x6cf82620, + 0x35138: 0x6cf82820, 0x35139: 0x6cf82a20, 0x3513a: 0x6cf82c20, 0x3513b: 0x6cf82e20, + 0x3513c: 0x6cf83020, 0x3513d: 0x6cf83220, 0x3513e: 0x6cf83420, 0x3513f: 0x6cf83620, + // Block 0xd45, offset 0x35140 + 0x35140: 0x6cf83820, 0x35141: 0x6cf83a20, 0x35142: 0x6cf83c20, 0x35143: 0x6cf83e20, + 0x35144: 0x6cf84020, 0x35145: 0x6cf84220, 0x35146: 0x6cf84420, 0x35147: 0x6cf84620, + 0x35148: 0x6cf84820, 0x35149: 0x6cf84a20, 0x3514a: 0x6cf84c20, 0x3514b: 0x6cf84e20, + 0x3514c: 0x6cf85020, 0x3514d: 0x6cf85220, 0x3514e: 0x6cf85420, 0x3514f: 0x6cf85620, + 0x35150: 0x6cf85820, 0x35151: 0x6cf85a20, 0x35152: 0x6cf85c20, 0x35153: 0x6cf85e20, + 0x35154: 0x6cf86020, 0x35155: 0x6cf86220, 0x35156: 0x6cf86420, 0x35157: 0x6cf86620, + 0x35158: 0x6cf86820, 0x35159: 0x6cf86a20, 0x3515a: 0x6cf86c20, 0x3515b: 0x6cf86e20, + 0x3515c: 0x6cf87020, 0x3515d: 0x6cf87220, 0x3515e: 0x6cf87420, 0x3515f: 0x6cf87620, + 0x35160: 0x6cf87820, 0x35161: 0x6cf87a20, 0x35162: 0x6cf87c20, 0x35163: 0x6cf87e20, + 0x35164: 0x6cf88020, 0x35165: 0x6cf88220, 0x35166: 0x6cf88420, 0x35167: 0x6cf88620, + 0x35168: 0x6cf88820, 0x35169: 0x6cf88a20, 0x3516a: 0x6d26fc20, 0x3516b: 0x6d26fe20, + 0x3516c: 0x6d270020, 0x3516d: 0x6d270220, 0x3516e: 0x6d270420, 0x3516f: 0x6d270620, + 0x35170: 0x6d270820, 0x35171: 0x6d270a20, 0x35172: 0x6d270c20, 0x35173: 0x6d270e20, + 0x35174: 0x6d271020, 0x35175: 0x6d271220, 0x35176: 0x6d271420, 0x35177: 0x6d271620, + 0x35178: 0x6d271820, 0x35179: 0x6d271a20, 0x3517a: 0x6d271c20, 0x3517b: 0x6d271e20, + 0x3517c: 0x6d272020, 0x3517d: 0x6d272220, 0x3517e: 0x6d272420, 0x3517f: 0x6d272620, + // Block 0xd46, offset 0x35180 + 0x35180: 0x6d272820, 0x35181: 0x6d272a20, 0x35182: 0x6d272c20, 0x35183: 0x6d272e20, + 0x35184: 0x6d273020, 0x35185: 0x6d273220, 0x35186: 0x6d273420, 0x35187: 0x6d273620, + 0x35188: 0x6d273820, 0x35189: 0x6d273a20, 0x3518a: 0x6d273c20, 0x3518b: 0x6d273e20, + 0x3518c: 0x6d274020, 0x3518d: 0x6d274220, 0x3518e: 0x6d274420, 0x3518f: 0x6d274620, + 0x35190: 0x6d274820, 0x35191: 0x6d274a20, 0x35192: 0x6d274c20, 0x35193: 0x6d274e20, + 0x35194: 0x6d275020, 0x35195: 0x6d275220, 0x35196: 0x6d275420, 0x35197: 0x6d275620, + 0x35198: 0x6d275820, 0x35199: 0x6d275a20, 0x3519a: 0x6d275c20, 0x3519b: 0x6d275e20, + 0x3519c: 0x6d276020, 0x3519d: 0x6d276220, 0x3519e: 0x6d276420, 0x3519f: 0x6d276620, + 0x351a0: 0x6d276820, 0x351a1: 0x6d276a20, 0x351a2: 0x6d276c20, 0x351a3: 0x6d276e20, + 0x351a4: 0x6d277020, 0x351a5: 0x6d277220, 0x351a6: 0x6d277420, 0x351a7: 0x6d277620, + 0x351a8: 0x6d277820, 0x351a9: 0x6d277a20, 0x351aa: 0x6d277c20, 0x351ab: 0x6d277e20, + 0x351ac: 0x6d278020, 0x351ad: 0x6d278220, 0x351ae: 0x6d278420, 0x351af: 0x6d278620, + 0x351b0: 0x6d278820, 0x351b1: 0x6d278a20, 0x351b2: 0x6d278c20, 0x351b3: 0x6d278e20, + 0x351b4: 0x6d279020, 0x351b5: 0x6d279220, 0x351b6: 0x6d279420, 0x351b7: 0x6d279620, + 0x351b8: 0x6d279820, 0x351b9: 0x6d279a20, 0x351ba: 0x6d279c20, 0x351bb: 0x6d279e20, + 0x351bc: 0x6d27a020, 0x351bd: 0x6d27a220, 0x351be: 0x6d27a420, 0x351bf: 0x6d27a620, + // Block 0xd47, offset 0x351c0 + 0x351c0: 0x6d27a820, 0x351c1: 0x6d27aa20, 0x351c2: 0x6d27ac20, 0x351c3: 0x6d27ae20, + 0x351c4: 0x6d27b020, 0x351c5: 0x6d27b220, 0x351c6: 0x6d27b420, 0x351c7: 0x6d27b620, + 0x351c8: 0x6d27b820, 0x351c9: 0x6d27ba20, 0x351ca: 0x6d27bc20, 0x351cb: 0x6d27be20, + 0x351cc: 0x6d27c020, 0x351cd: 0x6d27c220, 0x351ce: 0x6d27c420, 0x351cf: 0x6d27c620, + 0x351d0: 0x6d27c820, 0x351d1: 0x6d27ca20, 0x351d2: 0x6d27cc20, 0x351d3: 0x6d27ce20, + 0x351d4: 0x6d27d020, 0x351d5: 0x6d546220, 0x351d6: 0x6d546420, 0x351d7: 0x6d546620, + 0x351d8: 0x6d546820, 0x351d9: 0x6d546a20, 0x351da: 0x6d546c20, 0x351db: 0x6d546e20, + 0x351dc: 0x6d547020, 0x351dd: 0x6d547220, 0x351de: 0x6d547420, 0x351df: 0x6d547620, + 0x351e0: 0x6d547820, 0x351e1: 0x6d547a20, 0x351e2: 0x6d547c20, 0x351e3: 0x6d547e20, + 0x351e4: 0x6d548020, 0x351e5: 0x6d548220, 0x351e6: 0x6d548420, 0x351e7: 0x6d548620, + 0x351e8: 0x6d548820, 0x351e9: 0x6d548a20, 0x351ea: 0x6d548c20, 0x351eb: 0x6d548e20, + 0x351ec: 0x6d549020, 0x351ed: 0x6d549220, 0x351ee: 0x6d549420, 0x351ef: 0x6d549620, + 0x351f0: 0x6d549820, 0x351f1: 0x6d549a20, 0x351f2: 0x6d549c20, 0x351f3: 0x6d549e20, + 0x351f4: 0x6d54a020, 0x351f5: 0x6d54a220, 0x351f6: 0x6d54a420, 0x351f7: 0x6d54a620, + 0x351f8: 0x6d54a820, 0x351f9: 0x6d54aa20, 0x351fa: 0x6d54ac20, 0x351fb: 0x6d54ae20, + 0x351fc: 0x6d54b020, 0x351fd: 0x6d54b220, 0x351fe: 0x6d54b420, 0x351ff: 0x6d54b620, + // Block 0xd48, offset 0x35200 + 0x35200: 0x6d54b820, 0x35201: 0x6d54ba20, 0x35202: 0x6d54bc20, 0x35203: 0x6d54be20, + 0x35204: 0x6d54c020, 0x35205: 0x6d54c220, 0x35206: 0x6d54c420, 0x35207: 0x6d54c620, + 0x35208: 0x6d54c820, 0x35209: 0x6d54ca20, 0x3520a: 0x6d54cc20, 0x3520b: 0x6d54ce20, + 0x3520c: 0x6d54d020, 0x3520d: 0x6d54d220, 0x3520e: 0x6d54d420, 0x3520f: 0x6d54d620, + 0x35210: 0x6d54d820, 0x35211: 0x6d54da20, 0x35212: 0x6d7fc220, 0x35213: 0x6d54dc20, + 0x35214: 0x6d54de20, 0x35215: 0x6d54e020, 0x35216: 0x6d54e220, 0x35217: 0x6d54e420, + 0x35218: 0x6d54e620, 0x35219: 0x6d54e820, 0x3521a: 0x6d54ea20, 0x3521b: 0x6d54ec20, + 0x3521c: 0x6d54ee20, 0x3521d: 0x6d54f020, 0x3521e: 0x6d54f220, 0x3521f: 0x6d54f420, + 0x35220: 0x6d54f620, 0x35221: 0x6d54f820, 0x35222: 0x6d54fa20, 0x35223: 0x6d54fc20, + 0x35224: 0x6d54fe20, 0x35225: 0x6d550020, 0x35226: 0x6d550220, 0x35227: 0x6d550420, + 0x35228: 0x6d550620, 0x35229: 0x6d550820, 0x3522a: 0x6d550a20, 0x3522b: 0x6d550c20, + 0x3522c: 0x6d550e20, 0x3522d: 0x6d551020, 0x3522e: 0x6d551220, 0x3522f: 0x6d551420, + 0x35230: 0x6d551620, 0x35231: 0x6d551820, 0x35232: 0x6d551a20, 0x35233: 0x6d551c20, + 0x35234: 0x6d551e20, 0x35235: 0x6d552020, 0x35236: 0x6d552220, 0x35237: 0x6d552420, + 0x35238: 0x6d552620, 0x35239: 0x6d552820, 0x3523a: 0x6d552a20, 0x3523b: 0x6d7fc420, + 0x3523c: 0x6d7fc620, 0x3523d: 0x6d7fc820, 0x3523e: 0x6d7fca20, 0x3523f: 0x6d7fcc20, + // Block 0xd49, offset 0x35240 + 0x35240: 0x6d7fce20, 0x35241: 0x6d7fd020, 0x35242: 0x6d7fd220, 0x35243: 0x6d7fd420, + 0x35244: 0x6d7fd620, 0x35245: 0x6d7fd820, 0x35246: 0x6d7fda20, 0x35247: 0x6d7fdc20, + 0x35248: 0x6d7fde20, 0x35249: 0x6d7fe020, 0x3524a: 0x6d7fe220, 0x3524b: 0x6d7fe420, + 0x3524c: 0x6d7fe620, 0x3524d: 0x6d7fe820, 0x3524e: 0x6d7fea20, 0x3524f: 0x6d7fec20, + 0x35250: 0x6d7fee20, 0x35251: 0x6d7ff020, 0x35252: 0x6d7ff220, 0x35253: 0x6d7ff420, + 0x35254: 0x6d7ff620, 0x35255: 0x6d7ff820, 0x35256: 0x6d7ffa20, 0x35257: 0x6d7ffc20, + 0x35258: 0x6d7ffe20, 0x35259: 0x6d800020, 0x3525a: 0x6d800220, 0x3525b: 0x6d800420, + 0x3525c: 0x6d800620, 0x3525d: 0x6d800820, 0x3525e: 0x6d800a20, 0x3525f: 0x6d800c20, + 0x35260: 0x6d800e20, 0x35261: 0x6d801020, 0x35262: 0x6d801220, 0x35263: 0x6d801420, + 0x35264: 0x6d801620, 0x35265: 0x6d801820, 0x35266: 0x6d801a20, 0x35267: 0x6d801c20, + 0x35268: 0x6d801e20, 0x35269: 0x6d802020, 0x3526a: 0x6d802220, 0x3526b: 0x6d802420, + 0x3526c: 0x6d802620, 0x3526d: 0x6d802820, 0x3526e: 0x6d802a20, 0x3526f: 0x6d802c20, + 0x35270: 0x6d802e20, 0x35271: 0x6d803020, 0x35272: 0x6d803220, 0x35273: 0x6d803420, + 0x35274: 0x6d803620, 0x35275: 0x6d803820, 0x35276: 0x6d803a20, 0x35277: 0x6d803c20, + 0x35278: 0x6d803e20, 0x35279: 0x6d804020, 0x3527a: 0x6d804220, 0x3527b: 0x6d804420, + 0x3527c: 0x6d804620, 0x3527d: 0x6d804820, 0x3527e: 0x6d804a20, 0x3527f: 0x6d804c20, + // Block 0xd4a, offset 0x35280 + 0x35280: 0x6d804e20, 0x35281: 0x6d805020, 0x35282: 0x6d805220, 0x35283: 0x6d805420, + 0x35284: 0x6d805620, 0x35285: 0x6d805820, 0x35286: 0x6d805a20, 0x35287: 0x6d805c20, + 0x35288: 0x6d805e20, 0x35289: 0x6d806020, 0x3528a: 0x6d806220, 0x3528b: 0x6d806420, + 0x3528c: 0x6d806620, 0x3528d: 0x6d806820, 0x3528e: 0x6d806a20, 0x3528f: 0x6d806c20, + 0x35290: 0x6d806e20, 0x35291: 0x6d807020, 0x35292: 0x6d807220, 0x35293: 0x6d807420, + 0x35294: 0x6d807620, 0x35295: 0x6d807820, 0x35296: 0x6d807a20, 0x35297: 0x6d807c20, + 0x35298: 0x6d807e20, 0x35299: 0x6d808020, 0x3529a: 0x6d808220, 0x3529b: 0x6d808420, + 0x3529c: 0x6d808620, 0x3529d: 0x6d808820, 0x3529e: 0x6d808a20, 0x3529f: 0x6d808c20, + 0x352a0: 0x6d808e20, 0x352a1: 0x6d809020, 0x352a2: 0x6d809220, 0x352a3: 0x6d809420, + 0x352a4: 0x6d809620, 0x352a5: 0x6d809820, 0x352a6: 0x6d809a20, 0x352a7: 0x6d809c20, + 0x352a8: 0x6d809e20, 0x352a9: 0x6d80a020, 0x352aa: 0x6d80a220, 0x352ab: 0x6d80a420, + 0x352ac: 0x6d80a620, 0x352ad: 0x6d80a820, 0x352ae: 0x6d80aa20, 0x352af: 0x6d80ac20, + 0x352b0: 0x6da63820, 0x352b1: 0x6da63a20, 0x352b2: 0x6da63c20, 0x352b3: 0x6da63e20, + 0x352b4: 0x6da64020, 0x352b5: 0x6da64220, 0x352b6: 0x6da64420, 0x352b7: 0x6da64620, + 0x352b8: 0x6da64820, 0x352b9: 0x6da64a20, 0x352ba: 0x6da64c20, 0x352bb: 0x6da64e20, + 0x352bc: 0x6da65020, 0x352bd: 0x6da65220, 0x352be: 0x6da65420, 0x352bf: 0x6da65620, + // Block 0xd4b, offset 0x352c0 + 0x352c0: 0x6da65820, 0x352c1: 0x6da65a20, 0x352c2: 0x6da65c20, 0x352c3: 0x6da65e20, + 0x352c4: 0x6da66020, 0x352c5: 0x6da66220, 0x352c6: 0x6da66420, 0x352c7: 0x6da66620, + 0x352c8: 0x6da66820, 0x352c9: 0x6da66a20, 0x352ca: 0x6da66c20, 0x352cb: 0x6da66e20, + 0x352cc: 0x6da67020, 0x352cd: 0x6da67220, 0x352ce: 0x6da67420, 0x352cf: 0x6da67620, + 0x352d0: 0x6da67820, 0x352d1: 0x6da67a20, 0x352d2: 0x6da67c20, 0x352d3: 0x6da67e20, + 0x352d4: 0x6da68020, 0x352d5: 0x6da68220, 0x352d6: 0x6da68420, 0x352d7: 0x6da68620, + 0x352d8: 0x6da68820, 0x352d9: 0x6da68a20, 0x352da: 0x6da68c20, 0x352db: 0x6da68e20, + 0x352dc: 0x6da69020, 0x352dd: 0x6da69220, 0x352de: 0x6da69420, 0x352df: 0x6da69620, + 0x352e0: 0x6da69820, 0x352e1: 0x6da69a20, 0x352e2: 0x6d883220, 0x352e3: 0x6da69c20, + 0x352e4: 0x6da69e20, 0x352e5: 0x6da6a020, 0x352e6: 0x6da6a220, 0x352e7: 0x6da6a420, + 0x352e8: 0x6da6a620, 0x352e9: 0x6da6a820, 0x352ea: 0x6da6aa20, 0x352eb: 0x6da6ac20, + 0x352ec: 0x6da6ae20, 0x352ed: 0x6da6b020, 0x352ee: 0x6da6b220, 0x352ef: 0x6da6b420, + 0x352f0: 0x6da6b620, 0x352f1: 0x6da6b820, 0x352f2: 0x6da6ba20, 0x352f3: 0x6da6bc20, + 0x352f4: 0x6da6be20, 0x352f5: 0x6da6c020, 0x352f6: 0x6da6c220, 0x352f7: 0x6da6c420, + 0x352f8: 0x6da6c620, 0x352f9: 0x6da6c820, 0x352fa: 0x6da6ca20, 0x352fb: 0x6da6cc20, + 0x352fc: 0x6da6ce20, 0x352fd: 0x6da6d020, 0x352fe: 0x6da6d220, 0x352ff: 0x6da6d420, + // Block 0xd4c, offset 0x35300 + 0x35300: 0x6da6d620, 0x35301: 0x6dc7a220, 0x35302: 0x6dc7a420, 0x35303: 0x6dc7a620, + 0x35304: 0x6dc7a820, 0x35305: 0x6dc7aa20, 0x35306: 0x6dc7ac20, 0x35307: 0x6dc7ae20, + 0x35308: 0x6dc7b020, 0x35309: 0x6dc7b220, 0x3530a: 0x6dc7b420, 0x3530b: 0x6dc7b620, + 0x3530c: 0x6dc7b820, 0x3530d: 0x6dc7ba20, 0x3530e: 0x6dc7bc20, 0x3530f: 0x6dc7be20, + 0x35310: 0x6dc7c020, 0x35311: 0x6dc7c220, 0x35312: 0x6dc7c420, 0x35313: 0x6dc7c620, + 0x35314: 0x6dc7c820, 0x35315: 0x6dc7ca20, 0x35316: 0x6dc7cc20, 0x35317: 0x6dc7ce20, + 0x35318: 0x6dc7d020, 0x35319: 0x6de40020, 0x3531a: 0x6dc7d220, 0x3531b: 0x6dc7d420, + 0x3531c: 0x6dc7d620, 0x3531d: 0x6dc7d820, 0x3531e: 0x6dc7da20, 0x3531f: 0x6dc7dc20, + 0x35320: 0x6dc7de20, 0x35321: 0x6dc7e020, 0x35322: 0x6dc7e220, 0x35323: 0x6dc7e420, + 0x35324: 0x6dc7e620, 0x35325: 0x6dc7e820, 0x35326: 0x6dc7ea20, 0x35327: 0x6dc7ec20, + 0x35328: 0x6dc7ee20, 0x35329: 0x6dc7f020, 0x3532a: 0x6dc7f220, 0x3532b: 0x6dc7f420, + 0x3532c: 0x6dc7f620, 0x3532d: 0x6dc7f820, 0x3532e: 0x6dc7fa20, 0x3532f: 0x6dc7fc20, + 0x35330: 0x6dc7fe20, 0x35331: 0x6dc80020, 0x35332: 0x6dc80220, 0x35333: 0x6dc80420, + 0x35334: 0x6dc80620, 0x35335: 0x6dc80820, 0x35336: 0x6dc80a20, 0x35337: 0x6dc80c20, + 0x35338: 0x6dc80e20, 0x35339: 0x6dc81020, 0x3533a: 0x6dc81220, 0x3533b: 0x6dc81420, + 0x3533c: 0x6dc81620, 0x3533d: 0x6dc81820, 0x3533e: 0x6dc81a20, 0x3533f: 0x6dc81c20, + // Block 0xd4d, offset 0x35340 + 0x35340: 0x6dc81e20, 0x35341: 0x6dc82020, 0x35342: 0x6dc82220, 0x35343: 0x6dc82420, + 0x35344: 0x6dc82620, 0x35345: 0x6dc82820, 0x35346: 0x6dc82a20, 0x35347: 0x6dc82c20, + 0x35348: 0x6dc82e20, 0x35349: 0x6dc83020, 0x3534a: 0x6dc83220, 0x3534b: 0x6dc83420, + 0x3534c: 0x6dc83620, 0x3534d: 0x6dc83820, 0x3534e: 0x6dc83a20, 0x3534f: 0x6dcc7220, + 0x35350: 0x6de40220, 0x35351: 0x6de40420, 0x35352: 0x6de40620, 0x35353: 0x6de40820, + 0x35354: 0x6de40a20, 0x35355: 0x6de40c20, 0x35356: 0x6de40e20, 0x35357: 0x6de41020, + 0x35358: 0x6de41220, 0x35359: 0x6de41420, 0x3535a: 0x6de41620, 0x3535b: 0x6de41820, + 0x3535c: 0x6de41a20, 0x3535d: 0x6de41c20, 0x3535e: 0x6de41e20, 0x3535f: 0x6de42020, + 0x35360: 0x6de42220, 0x35361: 0x6de42420, 0x35362: 0x6de42620, 0x35363: 0x6de42820, + 0x35364: 0x6de42a20, 0x35365: 0x6de42c20, 0x35366: 0x6de42e20, 0x35367: 0x6de43020, + 0x35368: 0x6de43220, 0x35369: 0x6de43420, 0x3536a: 0x6de43620, 0x3536b: 0x6de43820, + 0x3536c: 0x6de43a20, 0x3536d: 0x6de43c20, 0x3536e: 0x6de43e20, 0x3536f: 0x6de44020, + 0x35370: 0x6de44220, 0x35371: 0x6de44420, 0x35372: 0x6de44620, 0x35373: 0x6de44820, + 0x35374: 0x6de44a20, 0x35375: 0x6de44c20, 0x35376: 0x6de44e20, 0x35377: 0x6de45020, + 0x35378: 0x6de45220, 0x35379: 0x6de45420, 0x3537a: 0x6de45620, 0x3537b: 0x6de45820, + 0x3537c: 0x6de45a20, 0x3537d: 0x6de45c20, 0x3537e: 0x6de45e20, 0x3537f: 0x6de46020, + // Block 0xd4e, offset 0x35380 + 0x35380: 0x6de46220, 0x35381: 0x6de46420, 0x35382: 0x6de46620, 0x35383: 0x6de46820, + 0x35384: 0x6dfb3a20, 0x35385: 0x6dfb3c20, 0x35386: 0x6dfb3e20, 0x35387: 0x6dfb4020, + 0x35388: 0x6dfb4220, 0x35389: 0x6dfb4420, 0x3538a: 0x6dfb4620, 0x3538b: 0x6dfb4820, + 0x3538c: 0x6dfb4a20, 0x3538d: 0x6dfb4c20, 0x3538e: 0x6dfb4e20, 0x3538f: 0x6dfb5020, + 0x35390: 0x6dfb5220, 0x35391: 0x6de46a20, 0x35392: 0x6dfb5420, 0x35393: 0x6dfb5620, + 0x35394: 0x6dfb5820, 0x35395: 0x6dfb5a20, 0x35396: 0x6dfb5c20, 0x35397: 0x6dfb5e20, + 0x35398: 0x6dfb6020, 0x35399: 0x6dfb6220, 0x3539a: 0x6dfb6420, 0x3539b: 0x6dfb6620, + 0x3539c: 0x6dfb6820, 0x3539d: 0x6dfb6a20, 0x3539e: 0x6dfb6c20, 0x3539f: 0x6dfb6e20, + 0x353a0: 0x6dfb7020, 0x353a1: 0x6dfb7220, 0x353a2: 0x6dfb7420, 0x353a3: 0x6dfb7620, + 0x353a4: 0x6dfb7820, 0x353a5: 0x6dfb7a20, 0x353a6: 0x6dfb7c20, 0x353a7: 0x6dfb7e20, + 0x353a8: 0x6dfb8020, 0x353a9: 0x6dfb8220, 0x353aa: 0x6dfb8420, 0x353ab: 0x6dfb8620, + 0x353ac: 0x6dfb8820, 0x353ad: 0x6dfb8a20, 0x353ae: 0x6dfb8c20, 0x353af: 0x6e0e7e20, + 0x353b0: 0x6e0e8020, 0x353b1: 0x6e0e8220, 0x353b2: 0x6e0e8420, 0x353b3: 0x6e0e8620, + 0x353b4: 0x6e0e8820, 0x353b5: 0x6e0e8a20, 0x353b6: 0x6e0e8c20, 0x353b7: 0x6e0e8e20, + 0x353b8: 0x6e0e9020, 0x353b9: 0x6e0e9220, 0x353ba: 0x6e0e9420, 0x353bb: 0x6e0e9620, + 0x353bc: 0x6e0e9820, 0x353bd: 0x6e0e9a20, 0x353be: 0x6e0e9c20, 0x353bf: 0x6e0e9e20, + // Block 0xd4f, offset 0x353c0 + 0x353c0: 0x6e0ea020, 0x353c1: 0x6e0ea220, 0x353c2: 0x6e1dc820, 0x353c3: 0x6e0ea420, + 0x353c4: 0x6e0ea620, 0x353c5: 0x6e0ea820, 0x353c6: 0x6e0eaa20, 0x353c7: 0x6e0eac20, + 0x353c8: 0x6e0eae20, 0x353c9: 0x6e0eb020, 0x353ca: 0x6e0eb220, 0x353cb: 0x6e0eb420, + 0x353cc: 0x6e0eb620, 0x353cd: 0x6e0eb820, 0x353ce: 0x6e0eba20, 0x353cf: 0x6e0ebc20, + 0x353d0: 0x6e0ebe20, 0x353d1: 0x6e0ec020, 0x353d2: 0x6e0ec220, 0x353d3: 0x6e0ec420, + 0x353d4: 0x6e0ec620, 0x353d5: 0x6e0ec820, 0x353d6: 0x6e0eca20, 0x353d7: 0x6e0ecc20, + 0x353d8: 0x6e0ece20, 0x353d9: 0x6e1dca20, 0x353da: 0x6e1dcc20, 0x353db: 0x6e1dce20, + 0x353dc: 0x6e1dd020, 0x353dd: 0x6e1dd220, 0x353de: 0x6e1dd420, 0x353df: 0x6e1dd620, + 0x353e0: 0x6e1dd820, 0x353e1: 0x6e1dda20, 0x353e2: 0x6e1ddc20, 0x353e3: 0x6e1dde20, + 0x353e4: 0x6e1de020, 0x353e5: 0x6e1de220, 0x353e6: 0x6e1de420, 0x353e7: 0x6e1de620, + 0x353e8: 0x6e1de820, 0x353e9: 0x6e1dea20, 0x353ea: 0x6e1dec20, 0x353eb: 0x6e1dee20, + 0x353ec: 0x6e1df020, 0x353ed: 0x6e1df220, 0x353ee: 0x6e1df420, 0x353ef: 0x6e1df620, + 0x353f0: 0x6e1df820, 0x353f1: 0x6e1dfa20, 0x353f2: 0x6e1dfc20, 0x353f3: 0x6e1dfe20, + 0x353f4: 0x6e1e0020, 0x353f5: 0x6e1e0220, 0x353f6: 0x6e1e0420, 0x353f7: 0x6e294a20, + 0x353f8: 0x6e294c20, 0x353f9: 0x6e294e20, 0x353fa: 0x6e295020, 0x353fb: 0x6e295220, + 0x353fc: 0x6e295420, 0x353fd: 0x6e295620, 0x353fe: 0x6e295820, 0x353ff: 0x6e295a20, + // Block 0xd50, offset 0x35400 + 0x35400: 0x6e295c20, 0x35401: 0x6e295e20, 0x35402: 0x6e296020, 0x35403: 0x6e296220, + 0x35404: 0x6e296420, 0x35405: 0x6e296620, 0x35406: 0x6e296820, 0x35407: 0x6e296a20, + 0x35408: 0x6e296c20, 0x35409: 0x6e296e20, 0x3540a: 0x6e297020, 0x3540b: 0x6e326420, + 0x3540c: 0x6e326620, 0x3540d: 0x6e326820, 0x3540e: 0x6e326a20, 0x3540f: 0x6e326c20, + 0x35410: 0x6e326e20, 0x35411: 0x6e327020, 0x35412: 0x6e327220, 0x35413: 0x6e327420, + 0x35414: 0x6e327620, 0x35415: 0x6e327820, 0x35416: 0x6e327a20, 0x35417: 0x6e327c20, + 0x35418: 0x6e327e20, 0x35419: 0x6e328020, 0x3541a: 0x6e328220, 0x3541b: 0x6e328420, + 0x3541c: 0x6e328620, 0x3541d: 0x6e328820, 0x3541e: 0x6e38bc20, 0x3541f: 0x6e38be20, + 0x35420: 0x6e38c020, 0x35421: 0x6e38c220, 0x35422: 0x6e38c420, 0x35423: 0x6e38c620, + 0x35424: 0x6e38c820, 0x35425: 0x6e38ca20, 0x35426: 0x6e38cc20, 0x35427: 0x6e38ce20, + 0x35428: 0x6e38d020, 0x35429: 0x6e3d3220, 0x3542a: 0x6e3d3420, 0x3542b: 0x6e3d3620, + 0x3542c: 0x6e3d3820, 0x3542d: 0x6e3d3a20, 0x3542e: 0x6e3d3c20, 0x3542f: 0x6e3d3e20, + 0x35430: 0x6e3d4020, 0x35431: 0x6e3d4220, 0x35432: 0x6e404e20, 0x35433: 0x6e401020, + 0x35434: 0x6e405020, 0x35435: 0x6e405220, 0x35436: 0x6e42aa20, 0x35437: 0x6e42ac20, + 0x35438: 0x6e42ae20, 0x35439: 0x6e443020, 0x3543a: 0x6e451e20, 0x3543b: 0x6e452020, + 0x3543c: 0x6e45c220, 0x3543d: 0x6e462c20, 0x3543e: 0x6e462e20, 0x3543f: 0x6e46b020, + // Block 0xd51, offset 0x35440 + 0x35440: 0x6c12b820, 0x35441: 0x6c223e20, 0x35442: 0x6c224020, 0x35443: 0x6c224220, + 0x35444: 0x6c224420, 0x35445: 0x6c224620, 0x35446: 0x6c224820, 0x35447: 0x6c224a20, + 0x35448: 0x6c224c20, 0x35449: 0x6c377620, 0x3544a: 0x6c377820, 0x3544b: 0x6c377a20, + 0x3544c: 0x6c377c20, 0x3544d: 0x6c377e20, 0x3544e: 0x6c378020, 0x3544f: 0x6c378220, + 0x35450: 0x6c378420, 0x35451: 0x6c378620, 0x35452: 0x6c378820, 0x35453: 0x6c378a20, + 0x35454: 0x6c378c20, 0x35455: 0x6c378e20, 0x35456: 0x6c379020, 0x35457: 0x6c52d420, + 0x35458: 0x6c52d620, 0x35459: 0x6c52d820, 0x3545a: 0x6c52da20, 0x3545b: 0x6c52dc20, + 0x3545c: 0x6c52de20, 0x3545d: 0x6c52e020, 0x3545e: 0x6c52e220, 0x3545f: 0x6c52e420, + 0x35460: 0x6c52e620, 0x35461: 0x6c52e820, 0x35462: 0x6c52ea20, 0x35463: 0x6c52ec20, + 0x35464: 0x6c52ee20, 0x35465: 0x6c52f020, 0x35466: 0x6c52f220, 0x35467: 0x6c756020, + 0x35468: 0x6c756220, 0x35469: 0x6c756420, 0x3546a: 0x6c756620, 0x3546b: 0x6c756820, + 0x3546c: 0x6c756a20, 0x3546d: 0x6c756c20, 0x3546e: 0x6c756e20, 0x3546f: 0x6c757020, + 0x35470: 0x6c757220, 0x35471: 0x6c757420, 0x35472: 0x6c757620, 0x35473: 0x6c757820, + 0x35474: 0x6c757a20, 0x35475: 0x6c757c20, 0x35476: 0x6c757e20, 0x35477: 0x6c758020, + 0x35478: 0x6c758220, 0x35479: 0x6c758420, 0x3547a: 0x6c9dba20, 0x3547b: 0x6c9dbc20, + 0x3547c: 0x6c9dbe20, 0x3547d: 0x6c9dc020, 0x3547e: 0x6c9dc220, 0x3547f: 0x6c9dc420, + // Block 0xd52, offset 0x35480 + 0x35480: 0x6c9dc620, 0x35481: 0x6c9dc820, 0x35482: 0x6c9dca20, 0x35483: 0x6c9dcc20, + 0x35484: 0x6c9dce20, 0x35485: 0x6c9dd020, 0x35486: 0x6c9dd220, 0x35487: 0x6c9dd420, + 0x35488: 0x6ccaa620, 0x35489: 0x6ccaa820, 0x3548a: 0x6ccaaa20, 0x3548b: 0x6ccaac20, + 0x3548c: 0x6ccaae20, 0x3548d: 0x6ccab020, 0x3548e: 0x6ccab220, 0x3548f: 0x6ccab420, + 0x35490: 0x6ccab620, 0x35491: 0x6ccab820, 0x35492: 0x6ccaba20, 0x35493: 0x6ccabc20, + 0x35494: 0x6ccabe20, 0x35495: 0x6ccac020, 0x35496: 0x6ccac220, 0x35497: 0x6ccac420, + 0x35498: 0x6ccac620, 0x35499: 0x6ccac820, 0x3549a: 0x6ccaca20, 0x3549b: 0x6ccacc20, + 0x3549c: 0x6ccace20, 0x3549d: 0x6cf8da20, 0x3549e: 0x6cf8dc20, 0x3549f: 0x6cf8de20, + 0x354a0: 0x6cf8e020, 0x354a1: 0x6cf8e220, 0x354a2: 0x6cf8e420, 0x354a3: 0x6cf8e620, + 0x354a4: 0x6cf8e820, 0x354a5: 0x6cf8ea20, 0x354a6: 0x6cf8ec20, 0x354a7: 0x6cf8ee20, + 0x354a8: 0x6cf8f020, 0x354a9: 0x6cf8f220, 0x354aa: 0x6cf8f420, 0x354ab: 0x6cf8f620, + 0x354ac: 0x6d0f4820, 0x354ad: 0x6cf8f820, 0x354ae: 0x6cf8fa20, 0x354af: 0x6cf8fc20, + 0x354b0: 0x6cf8fe20, 0x354b1: 0x6cf90020, 0x354b2: 0x6d281220, 0x354b3: 0x6d281420, + 0x354b4: 0x6d281620, 0x354b5: 0x6d281820, 0x354b6: 0x6d281a20, 0x354b7: 0x6d281c20, + 0x354b8: 0x6d281e20, 0x354b9: 0x6d282020, 0x354ba: 0x6d282220, 0x354bb: 0x6d282420, + 0x354bc: 0x6d282620, 0x354bd: 0x6d282820, 0x354be: 0x6d282a20, 0x354bf: 0x6d282c20, + // Block 0xd53, offset 0x354c0 + 0x354c0: 0x6d282e20, 0x354c1: 0x6d283020, 0x354c2: 0x6d283220, 0x354c3: 0x6d283420, + 0x354c4: 0x6d283620, 0x354c5: 0x6d283820, 0x354c6: 0x6d283a20, 0x354c7: 0x6d283c20, + 0x354c8: 0x6d556220, 0x354c9: 0x6d556420, 0x354ca: 0x6d556620, 0x354cb: 0x6d556820, + 0x354cc: 0x6d556a20, 0x354cd: 0x6d556c20, 0x354ce: 0x6d556e20, 0x354cf: 0x6d557020, + 0x354d0: 0x6d557220, 0x354d1: 0x6d557420, 0x354d2: 0x6d557620, 0x354d3: 0x6d557820, + 0x354d4: 0x6d557a20, 0x354d5: 0x6d557c20, 0x354d6: 0x6d557e20, 0x354d7: 0x6d558020, + 0x354d8: 0x6d80e220, 0x354d9: 0x6d80e420, 0x354da: 0x6d80e620, 0x354db: 0x6d80e820, + 0x354dc: 0x6d80ea20, 0x354dd: 0x6d80ec20, 0x354de: 0x6d80ee20, 0x354df: 0x6d80f020, + 0x354e0: 0x6da70220, 0x354e1: 0x6da70420, 0x354e2: 0x6da70620, 0x354e3: 0x6da70820, + 0x354e4: 0x6da70a20, 0x354e5: 0x6da70c20, 0x354e6: 0x6da70e20, 0x354e7: 0x6da71020, + 0x354e8: 0x6dc85420, 0x354e9: 0x6dc85620, 0x354ea: 0x6dc85820, 0x354eb: 0x6dc85a20, + 0x354ec: 0x6de47e20, 0x354ed: 0x6de48020, 0x354ee: 0x6de48220, 0x354ef: 0x6de48420, + 0x354f0: 0x6de48620, 0x354f1: 0x6dfb9c20, 0x354f2: 0x6dfb9e20, 0x354f3: 0x6dfba020, + 0x354f4: 0x6e0ed820, 0x354f5: 0x6e0eda20, 0x354f6: 0x6e1e1020, 0x354f7: 0x6e0edc20, + 0x354f8: 0x6e0ede20, 0x354f9: 0x6e1e1220, 0x354fa: 0x6e1e1420, 0x354fb: 0x6e1e1620, + 0x354fc: 0x6e1e1820, 0x354fd: 0x6e297820, 0x354fe: 0x6e329020, 0x354ff: 0x6e38d820, + // Block 0xd54, offset 0x35500 + 0x35500: 0x6e38da20, 0x35501: 0x6e3d4620, 0x35502: 0x6c04ac20, 0x35503: 0x6c097820, + 0x35504: 0x6c097a20, 0x35505: 0x6c12be20, 0x35506: 0x6c12c020, 0x35507: 0x6c225420, + 0x35508: 0x6c225620, 0x35509: 0x6c379c20, 0x3550a: 0x6c225820, 0x3550b: 0x6c225a20, + 0x3550c: 0x6c225c20, 0x3550d: 0x6c379e20, 0x3550e: 0x6c37a020, 0x3550f: 0x6c37a220, + 0x35510: 0x6c37a420, 0x35511: 0x6c37a620, 0x35512: 0x6c37a820, 0x35513: 0x6c37aa20, + 0x35514: 0x6c37ac20, 0x35515: 0x6c37ae20, 0x35516: 0x6c37b020, 0x35517: 0x6c37b220, + 0x35518: 0x6c37b420, 0x35519: 0x6c37b620, 0x3551a: 0x6c37b820, 0x3551b: 0x6c37ba20, + 0x3551c: 0x6c37bc20, 0x3551d: 0x6c37be20, 0x3551e: 0x6c37c020, 0x3551f: 0x6c37c220, + 0x35520: 0x6c37c420, 0x35521: 0x6c37c620, 0x35522: 0x6c530220, 0x35523: 0x6c530420, + 0x35524: 0x6c530620, 0x35525: 0x6c2bd020, 0x35526: 0x6c758c20, 0x35527: 0x6c758e20, + 0x35528: 0x6c759020, 0x35529: 0x6c759220, 0x3552a: 0x6c759420, 0x3552b: 0x6c759620, + 0x3552c: 0x6c759820, 0x3552d: 0x6c759a20, 0x3552e: 0x6c759c20, 0x3552f: 0x6c759e20, + 0x35530: 0x6c75a020, 0x35531: 0x6c75a220, 0x35532: 0x6c6f0e20, 0x35533: 0x6c9dda20, + 0x35534: 0x6c9ddc20, 0x35535: 0x6c9dde20, 0x35536: 0x6c9de020, 0x35537: 0x6c9de220, + 0x35538: 0x6c9de420, 0x35539: 0x6ccada20, 0x3553a: 0x6ccadc20, 0x3553b: 0x6ccade20, + 0x3553c: 0x6ccae020, 0x3553d: 0x6ccae220, 0x3553e: 0x6ccae420, 0x3553f: 0x6ccae620, + // Block 0xd55, offset 0x35540 + 0x35540: 0x6ccae820, 0x35541: 0x6ccaea20, 0x35542: 0x6ccaec20, 0x35543: 0x6ccaee20, + 0x35544: 0x6ccaf020, 0x35545: 0x6ccaf220, 0x35546: 0x6ccaf420, 0x35547: 0x6cf90c20, + 0x35548: 0x6cf90e20, 0x35549: 0x6cf91020, 0x3554a: 0x6cf91220, 0x3554b: 0x6d75b820, + 0x3554c: 0x6cf91420, 0x3554d: 0x6cf91620, 0x3554e: 0x6cf91820, 0x3554f: 0x6cf1c020, + 0x35550: 0x6d284620, 0x35551: 0x6d284820, 0x35552: 0x6d284a20, 0x35553: 0x6d284c20, + 0x35554: 0x6d558820, 0x35555: 0x6d558a20, 0x35556: 0x6d558c20, 0x35557: 0x6d558e20, + 0x35558: 0x6d559020, 0x35559: 0x6d559220, 0x3555a: 0x6d559420, 0x3555b: 0x6d559620, + 0x3555c: 0x6d80f420, 0x3555d: 0x6d80f620, 0x3555e: 0x6d80f820, 0x3555f: 0x6d80fa20, + 0x35560: 0x6d80fc20, 0x35561: 0x6da71220, 0x35562: 0x6da71420, 0x35563: 0x6da71620, + 0x35564: 0x6da71820, 0x35565: 0x6da71a20, 0x35566: 0x6dc86020, 0x35567: 0x6dc86220, + 0x35568: 0x6dc86420, 0x35569: 0x6dc86620, 0x3556a: 0x6dc86820, 0x3556b: 0x6dc86a20, + 0x3556c: 0x6de48820, 0x3556d: 0x6de20820, 0x3556e: 0x6e0ee020, 0x3556f: 0x6e1e1a20, + 0x35570: 0x6e1e1c20, 0x35571: 0x6e297a20, 0x35572: 0x6e297c20, 0x35573: 0x6e329420, + 0x35574: 0x6e329620, 0x35575: 0x6c04b020, 0x35576: 0x6c04b220, 0x35577: 0x6c097e20, + 0x35578: 0x6c12c620, 0x35579: 0x6c12c820, 0x3557a: 0x6c12ca20, 0x3557b: 0x6c12cc20, + 0x3557c: 0x6c12ce20, 0x3557d: 0x6c12d020, 0x3557e: 0x6c12d220, 0x3557f: 0x6c226020, + // Block 0xd56, offset 0x35580 + 0x35580: 0x6c226220, 0x35581: 0x6c226420, 0x35582: 0x6c226620, 0x35583: 0x6c226820, + 0x35584: 0x6c226a20, 0x35585: 0x6c226c20, 0x35586: 0x6c226e20, 0x35587: 0x6c227020, + 0x35588: 0x6c227220, 0x35589: 0x6c37dc20, 0x3558a: 0x6c37de20, 0x3558b: 0x6c37e020, + 0x3558c: 0x6c37e220, 0x3558d: 0x6c37e420, 0x3558e: 0x6c37e620, 0x3558f: 0x6c37e820, + 0x35590: 0x6c37ea20, 0x35591: 0x6c37ec20, 0x35592: 0x6c37ee20, 0x35593: 0x6c37f020, + 0x35594: 0x6c37f220, 0x35595: 0x6c37f420, 0x35596: 0x6c37f620, 0x35597: 0x6c37f820, + 0x35598: 0x6c37fa20, 0x35599: 0x6c37fc20, 0x3559a: 0x6c37fe20, 0x3559b: 0x6c380020, + 0x3559c: 0x6c380220, 0x3559d: 0x6c531a20, 0x3559e: 0x6c531c20, 0x3559f: 0x6c531e20, + 0x355a0: 0x6c532020, 0x355a1: 0x6c532220, 0x355a2: 0x6c532420, 0x355a3: 0x6c532620, + 0x355a4: 0x6c532820, 0x355a5: 0x6c532a20, 0x355a6: 0x6c532c20, 0x355a7: 0x6c532e20, + 0x355a8: 0x6c533020, 0x355a9: 0x6c533220, 0x355aa: 0x6c533420, 0x355ab: 0x6c533620, + 0x355ac: 0x6c533820, 0x355ad: 0x6c533a20, 0x355ae: 0x6c533c20, 0x355af: 0x6c533e20, + 0x355b0: 0x6c534020, 0x355b1: 0x6c534220, 0x355b2: 0x6c75b220, 0x355b3: 0x6c75b420, + 0x355b4: 0x6c75b620, 0x355b5: 0x6c75b820, 0x355b6: 0x6c75ba20, 0x355b7: 0x6c75bc20, + 0x355b8: 0x6c75be20, 0x355b9: 0x6c75c020, 0x355ba: 0x6c75c220, 0x355bb: 0x6c75c420, + 0x355bc: 0x6c75c620, 0x355bd: 0x6c75c820, 0x355be: 0x6c75ca20, 0x355bf: 0x6c75cc20, + // Block 0xd57, offset 0x355c0 + 0x355c0: 0x6c75ce20, 0x355c1: 0x6c75d020, 0x355c2: 0x6c75d220, 0x355c3: 0x6c75d420, + 0x355c4: 0x6c75d620, 0x355c5: 0x6c9dfc20, 0x355c6: 0x6c9dfe20, 0x355c7: 0x6c9e0020, + 0x355c8: 0x6c9e0220, 0x355c9: 0x6c9e0420, 0x355ca: 0x6c9e0620, 0x355cb: 0x6c9e0820, + 0x355cc: 0x6c9e0a20, 0x355cd: 0x6c9e0c20, 0x355ce: 0x6c9e0e20, 0x355cf: 0x6c9e1020, + 0x355d0: 0x6c9e1220, 0x355d1: 0x6c9e1420, 0x355d2: 0x6c9e1620, 0x355d3: 0x6c9e1820, + 0x355d4: 0x6c9e1a20, 0x355d5: 0x6c9e1c20, 0x355d6: 0x6ccb1220, 0x355d7: 0x6ccb1420, + 0x355d8: 0x6ccb1620, 0x355d9: 0x6ccb1820, 0x355da: 0x6ccb1a20, 0x355db: 0x6ccb1c20, + 0x355dc: 0x6ccb1e20, 0x355dd: 0x6ccb2020, 0x355de: 0x6ccb2220, 0x355df: 0x6ccb2420, + 0x355e0: 0x6ccb2620, 0x355e1: 0x6ccb2820, 0x355e2: 0x6ccb2a20, 0x355e3: 0x6ccb2c20, + 0x355e4: 0x6ccb2e20, 0x355e5: 0x6ccb3020, 0x355e6: 0x6ccb3220, 0x355e7: 0x6ccb3420, + 0x355e8: 0x6ccb3620, 0x355e9: 0x6ccb3820, 0x355ea: 0x6ccb3a20, 0x355eb: 0x6ccb3c20, + 0x355ec: 0x6ccb3e20, 0x355ed: 0x6ccb4020, 0x355ee: 0x6ccb4220, 0x355ef: 0x6ccb4420, + 0x355f0: 0x6ccb4620, 0x355f1: 0x6cf93020, 0x355f2: 0x6cf93220, 0x355f3: 0x6cf93420, + 0x355f4: 0x6cf93620, 0x355f5: 0x6cf93820, 0x355f6: 0x6cf93a20, 0x355f7: 0x6cf93c20, + 0x355f8: 0x6cf93e20, 0x355f9: 0x6cf94020, 0x355fa: 0x6cf94220, 0x355fb: 0x6cf94420, + 0x355fc: 0x6cf94620, 0x355fd: 0x6cf94820, 0x355fe: 0x6cf94a20, 0x355ff: 0x6cf94c20, + // Block 0xd58, offset 0x35600 + 0x35600: 0x6cf94e20, 0x35601: 0x6cf95020, 0x35602: 0x6cf95220, 0x35603: 0x6cf95420, + 0x35604: 0x6d286220, 0x35605: 0x6d286420, 0x35606: 0x6d286620, 0x35607: 0x6d286820, + 0x35608: 0x6d286a20, 0x35609: 0x6d286c20, 0x3560a: 0x6d286e20, 0x3560b: 0x6d287020, + 0x3560c: 0x6d287220, 0x3560d: 0x6d55a820, 0x3560e: 0x6d55aa20, 0x3560f: 0x6d55ac20, + 0x35610: 0x6d55ae20, 0x35611: 0x6d55b020, 0x35612: 0x6d55b220, 0x35613: 0x6d55b420, + 0x35614: 0x6d55b620, 0x35615: 0x6d55b820, 0x35616: 0x6d55ba20, 0x35617: 0x6d55bc20, + 0x35618: 0x6d55be20, 0x35619: 0x6d55c020, 0x3561a: 0x6d55c220, 0x3561b: 0x6d55c420, + 0x3561c: 0x6d55c620, 0x3561d: 0x6d811220, 0x3561e: 0x6d811420, 0x3561f: 0x6d811620, + 0x35620: 0x6d811820, 0x35621: 0x6d811a20, 0x35622: 0x6d811c20, 0x35623: 0x6d811e20, + 0x35624: 0x6d812020, 0x35625: 0x6d812220, 0x35626: 0x6d812420, 0x35627: 0x6d812620, + 0x35628: 0x6da72620, 0x35629: 0x6da72820, 0x3562a: 0x6da72a20, 0x3562b: 0x6da72c20, + 0x3562c: 0x6da72e20, 0x3562d: 0x6da73020, 0x3562e: 0x6da73220, 0x3562f: 0x6dc86e20, + 0x35630: 0x6dc87020, 0x35631: 0x6dc87220, 0x35632: 0x6dc87420, 0x35633: 0x6dc87620, + 0x35634: 0x6dc87820, 0x35635: 0x6dc87a20, 0x35636: 0x6dc87c20, 0x35637: 0x6de48e20, + 0x35638: 0x6de49020, 0x35639: 0x6dfba820, 0x3563a: 0x6dfbaa20, 0x3563b: 0x6dfbac20, + 0x3563c: 0x6e0ee420, 0x3563d: 0x6e0ee620, 0x3563e: 0x6e1e1e20, 0x3563f: 0x6e298020, + // Block 0xd59, offset 0x35640 + 0x35640: 0x6e298220, 0x35641: 0x6e298420, 0x35642: 0x6c380820, 0x35643: 0x6c380a20, + 0x35644: 0x6c380c20, 0x35645: 0x6c534c20, 0x35646: 0x6c534e20, 0x35647: 0x6c535020, + 0x35648: 0x6c75e220, 0x35649: 0x6c75e420, 0x3564a: 0x6c75e620, 0x3564b: 0x6c9e2a20, + 0x3564c: 0x6c9e2c20, 0x3564d: 0x6c9e2e20, 0x3564e: 0x6c9e3020, 0x3564f: 0x6c9e3220, + 0x35650: 0x6c9e3420, 0x35651: 0x6c9e3620, 0x35652: 0x6c9e3820, 0x35653: 0x6c9e3a20, + 0x35654: 0x6c9e3c20, 0x35655: 0x6c9e3e20, 0x35656: 0x6c9e4020, 0x35657: 0x6c9e4220, + 0x35658: 0x6c9e4420, 0x35659: 0x6ccb5420, 0x3565a: 0x6ccb5620, 0x3565b: 0x6ccb5820, + 0x3565c: 0x6ccb5a20, 0x3565d: 0x6ccb5c20, 0x3565e: 0x6ccb5e20, 0x3565f: 0x6ccb6020, + 0x35660: 0x6cf96020, 0x35661: 0x6cf96220, 0x35662: 0x6cf96420, 0x35663: 0x6cf96620, + 0x35664: 0x6cf96820, 0x35665: 0x6cf96a20, 0x35666: 0x6cf96c20, 0x35667: 0x6cf96e20, + 0x35668: 0x6cf97020, 0x35669: 0x6cf97220, 0x3566a: 0x6cf97420, 0x3566b: 0x6cf97620, + 0x3566c: 0x6cf97820, 0x3566d: 0x6d017c20, 0x3566e: 0x6d287c20, 0x3566f: 0x6d287e20, + 0x35670: 0x6d288020, 0x35671: 0x6d288220, 0x35672: 0x6d288420, 0x35673: 0x6d288620, + 0x35674: 0x6d288820, 0x35675: 0x6d288a20, 0x35676: 0x6d55ce20, 0x35677: 0x6d55d020, + 0x35678: 0x6d55d220, 0x35679: 0x6d55d420, 0x3567a: 0x6d55d620, 0x3567b: 0x6d813220, + 0x3567c: 0x6d813420, 0x3567d: 0x6d813620, 0x3567e: 0x6d813820, 0x3567f: 0x6d813a20, + // Block 0xd5a, offset 0x35680 + 0x35680: 0x6d813c20, 0x35681: 0x6d813e20, 0x35682: 0x6d814020, 0x35683: 0x6d814220, + 0x35684: 0x6d814420, 0x35685: 0x6d814620, 0x35686: 0x6d814820, 0x35687: 0x6d814a20, + 0x35688: 0x6d814c20, 0x35689: 0x6d814e20, 0x3568a: 0x6d815020, 0x3568b: 0x6d815220, + 0x3568c: 0x6da73820, 0x3568d: 0x6da73a20, 0x3568e: 0x6da73c20, 0x3568f: 0x6da73e20, + 0x35690: 0x6dc88020, 0x35691: 0x6dc88220, 0x35692: 0x6dc88420, 0x35693: 0x6dc88620, + 0x35694: 0x6dc88820, 0x35695: 0x6dc88a20, 0x35696: 0x6dc88c20, 0x35697: 0x6dc88e20, + 0x35698: 0x6de49220, 0x35699: 0x6de49420, 0x3569a: 0x6de49620, 0x3569b: 0x6de49820, + 0x3569c: 0x6de49a20, 0x3569d: 0x6de49c20, 0x3569e: 0x6dfbae20, 0x3569f: 0x6dfbb020, + 0x356a0: 0x6e0ee820, 0x356a1: 0x6e0eea20, 0x356a2: 0x6e298820, 0x356a3: 0x6e298a20, + 0x356a4: 0x6e298c20, 0x356a5: 0x6e298e20, 0x356a6: 0x6e329820, 0x356a7: 0x6e329a20, + 0x356a8: 0x6e329c20, 0x356a9: 0x6e38dc20, 0x356aa: 0x6e405620, 0x356ab: 0x6e405820, + 0x356ac: 0x6c04ba20, 0x356ad: 0x6c12d620, 0x356ae: 0x6c227a20, 0x356af: 0x6c381020, + 0x356b0: 0x6c381220, 0x356b1: 0x6c381420, 0x356b2: 0x6c381620, 0x356b3: 0x6c535420, + 0x356b4: 0x6c75ec20, 0x356b5: 0x6c9e4820, 0x356b6: 0x6c9e4a20, 0x356b7: 0x6c9e4c20, + 0x356b8: 0x6c9e4e20, 0x356b9: 0x6cf97e20, 0x356ba: 0x6d288c20, 0x356bb: 0x6d288e20, + 0x356bc: 0x6d289020, 0x356bd: 0x6d815420, 0x356be: 0x6d815620, 0x356bf: 0x6da74420, + // Block 0xd5b, offset 0x356c0 + 0x356c0: 0x6de49e20, 0x356c1: 0x6e1e2020, 0x356c2: 0x6c227e20, 0x356c3: 0x6c228020, + 0x356c4: 0x6c381820, 0x356c5: 0x6c381a20, 0x356c6: 0x6c381c20, 0x356c7: 0x6c381e20, + 0x356c8: 0x6c75f020, 0x356c9: 0x6c75f220, 0x356ca: 0x6c75f420, 0x356cb: 0x6c9e5020, + 0x356cc: 0x6c9e5220, 0x356cd: 0x6cf98020, 0x356ce: 0x6d289420, 0x356cf: 0x6d289620, + 0x356d0: 0x6d289820, 0x356d1: 0x6d289a20, 0x356d2: 0x6d55dc20, 0x356d3: 0x6d815820, + 0x356d4: 0x6d815a20, 0x356d5: 0x6da74820, 0x356d6: 0x6de4a020, 0x356d7: 0x6dfbb220, + 0x356d8: 0x6dfbb420, 0x356d9: 0x6e1e2220, 0x356da: 0x6e405a20, 0x356db: 0x6c04c020, + 0x356dc: 0x6c12dc20, 0x356dd: 0x6c12de20, 0x356de: 0x6c12e020, 0x356df: 0x6c12e220, + 0x356e0: 0x6c12e420, 0x356e1: 0x6c228620, 0x356e2: 0x6c228820, 0x356e3: 0x6c228a20, + 0x356e4: 0x6c228c20, 0x356e5: 0x6c228e20, 0x356e6: 0x6c229020, 0x356e7: 0x6c229220, + 0x356e8: 0x6c229420, 0x356e9: 0x6c382e20, 0x356ea: 0x6c383020, 0x356eb: 0x6c383220, + 0x356ec: 0x6c383420, 0x356ed: 0x6c383620, 0x356ee: 0x6c383820, 0x356ef: 0x6c383a20, + 0x356f0: 0x6c383c20, 0x356f1: 0x6c383e20, 0x356f2: 0x6c384020, 0x356f3: 0x6c384220, + 0x356f4: 0x6c384420, 0x356f5: 0x6c384620, 0x356f6: 0x6c384820, 0x356f7: 0x6c384a20, + 0x356f8: 0x6c536420, 0x356f9: 0x6c536620, 0x356fa: 0x6c536820, 0x356fb: 0x6c536a20, + 0x356fc: 0x6c536c20, 0x356fd: 0x6c536e20, 0x356fe: 0x6c537020, 0x356ff: 0x6c537220, + // Block 0xd5c, offset 0x35700 + 0x35700: 0x6c537420, 0x35701: 0x6c537620, 0x35702: 0x6c537820, 0x35703: 0x6c537a20, + 0x35704: 0x6c537c20, 0x35705: 0x6c537e20, 0x35706: 0x6c538020, 0x35707: 0x6c538220, + 0x35708: 0x6c538420, 0x35709: 0x6c538620, 0x3570a: 0x6c538820, 0x3570b: 0x6c538a20, + 0x3570c: 0x6c538c20, 0x3570d: 0x6c538e20, 0x3570e: 0x6c539020, 0x3570f: 0x6c539220, + 0x35710: 0x6c539420, 0x35711: 0x6c539620, 0x35712: 0x6c539820, 0x35713: 0x6c539a20, + 0x35714: 0x6c539c20, 0x35715: 0x6c539e20, 0x35716: 0x6c53a020, 0x35717: 0x6c53a220, + 0x35718: 0x6c53a420, 0x35719: 0x6c53a620, 0x3571a: 0x6c53a820, 0x3571b: 0x6c53aa20, + 0x3571c: 0x6c760a20, 0x3571d: 0x6c760c20, 0x3571e: 0x6c760e20, 0x3571f: 0x6c761020, + 0x35720: 0x6c761220, 0x35721: 0x6c761420, 0x35722: 0x6c761620, 0x35723: 0x6c761820, + 0x35724: 0x6c761a20, 0x35725: 0x6c761c20, 0x35726: 0x6c761e20, 0x35727: 0x6c762020, + 0x35728: 0x6c762220, 0x35729: 0x6c762420, 0x3572a: 0x6c762620, 0x3572b: 0x6c762820, + 0x3572c: 0x6c762a20, 0x3572d: 0x6c762c20, 0x3572e: 0x6c762e20, 0x3572f: 0x6c763020, + 0x35730: 0x6c763220, 0x35731: 0x6c9e6a20, 0x35732: 0x6c9e6c20, 0x35733: 0x6c9e6e20, + 0x35734: 0x6c9e7020, 0x35735: 0x6c9e7220, 0x35736: 0x6c9e7420, 0x35737: 0x6c9e7620, + 0x35738: 0x6c9e7820, 0x35739: 0x6c9e7a20, 0x3573a: 0x6c9e7c20, 0x3573b: 0x6c9e7e20, + 0x3573c: 0x6c9e8020, 0x3573d: 0x6c9e8220, 0x3573e: 0x6c9e8420, 0x3573f: 0x6c9e8620, + // Block 0xd5d, offset 0x35740 + 0x35740: 0x6c9e8820, 0x35741: 0x6c9e8a20, 0x35742: 0x6c9e8c20, 0x35743: 0x6c9e8e20, + 0x35744: 0x6c9e9020, 0x35745: 0x6c9e9220, 0x35746: 0x6c9e9420, 0x35747: 0x6c9e9620, + 0x35748: 0x6ccb8220, 0x35749: 0x6ccb8420, 0x3574a: 0x6ccb8620, 0x3574b: 0x6ccb8820, + 0x3574c: 0x6ccb8a20, 0x3574d: 0x6ccb8c20, 0x3574e: 0x6ccb8e20, 0x3574f: 0x6ccb9020, + 0x35750: 0x6ccb9220, 0x35751: 0x6ccb9420, 0x35752: 0x6ccb9620, 0x35753: 0x6ccb9820, + 0x35754: 0x6ccb9a20, 0x35755: 0x6ccb9c20, 0x35756: 0x6ccb9e20, 0x35757: 0x6ccba020, + 0x35758: 0x6ccba220, 0x35759: 0x6ccba420, 0x3575a: 0x6ccba620, 0x3575b: 0x6ccba820, + 0x3575c: 0x6ccbaa20, 0x3575d: 0x6ccbac20, 0x3575e: 0x6ccbae20, 0x3575f: 0x6ccbb020, + 0x35760: 0x6ccbb220, 0x35761: 0x6ccbb420, 0x35762: 0x6ccbb620, 0x35763: 0x6ccbb820, + 0x35764: 0x6ccbba20, 0x35765: 0x6ccbbc20, 0x35766: 0x6ccbbe20, 0x35767: 0x6ccbc020, + 0x35768: 0x6cf99a20, 0x35769: 0x6cf99c20, 0x3576a: 0x6cf99e20, 0x3576b: 0x6cf9a020, + 0x3576c: 0x6cf9a220, 0x3576d: 0x6cf9a420, 0x3576e: 0x6cf9a620, 0x3576f: 0x6cf9a820, + 0x35770: 0x6cf9aa20, 0x35771: 0x6cf9ac20, 0x35772: 0x6cf9ae20, 0x35773: 0x6cf9b020, + 0x35774: 0x6cf9b220, 0x35775: 0x6cf9b420, 0x35776: 0x6cf9b620, 0x35777: 0x6cf9b820, + 0x35778: 0x6cf9ba20, 0x35779: 0x6cf9bc20, 0x3577a: 0x6cf9be20, 0x3577b: 0x6cf9c020, + 0x3577c: 0x6cf9c220, 0x3577d: 0x6cf9c420, 0x3577e: 0x6cf9c620, 0x3577f: 0x6cf9c820, + // Block 0xd5e, offset 0x35780 + 0x35780: 0x6cf9ca20, 0x35781: 0x6cf9cc20, 0x35782: 0x6cf9ce20, 0x35783: 0x6cf9d020, + 0x35784: 0x6cf9d220, 0x35785: 0x6d28ac20, 0x35786: 0x6d28ae20, 0x35787: 0x6d28b020, + 0x35788: 0x6d28b220, 0x35789: 0x6d28b420, 0x3578a: 0x6d28b620, 0x3578b: 0x6d28b820, + 0x3578c: 0x6d28ba20, 0x3578d: 0x6d28bc20, 0x3578e: 0x6d28be20, 0x3578f: 0x6d28c020, + 0x35790: 0x6d28c220, 0x35791: 0x6d28c420, 0x35792: 0x6d28c620, 0x35793: 0x6d28c820, + 0x35794: 0x6d28ca20, 0x35795: 0x6d28cc20, 0x35796: 0x6d28ce20, 0x35797: 0x6d28d020, + 0x35798: 0x6d28d220, 0x35799: 0x6d28d420, 0x3579a: 0x6d28d620, 0x3579b: 0x6d28d820, + 0x3579c: 0x6d28da20, 0x3579d: 0x6d28dc20, 0x3579e: 0x6d28de20, 0x3579f: 0x6d28e020, + 0x357a0: 0x6d28e220, 0x357a1: 0x6d28e420, 0x357a2: 0x6d28e620, 0x357a3: 0x6d55e620, + 0x357a4: 0x6d55e820, 0x357a5: 0x6d55ea20, 0x357a6: 0x6d55ec20, 0x357a7: 0x6d55ee20, + 0x357a8: 0x6d55f020, 0x357a9: 0x6d55f220, 0x357aa: 0x6d55f420, 0x357ab: 0x6d55f620, + 0x357ac: 0x6d55f820, 0x357ad: 0x6d55fa20, 0x357ae: 0x6d55fc20, 0x357af: 0x6d55fe20, + 0x357b0: 0x6d560020, 0x357b1: 0x6d560220, 0x357b2: 0x6d560420, 0x357b3: 0x6d560620, + 0x357b4: 0x6d560820, 0x357b5: 0x6d560a20, 0x357b6: 0x6d560c20, 0x357b7: 0x6d560e20, + 0x357b8: 0x6d817020, 0x357b9: 0x6d817220, 0x357ba: 0x6d817420, 0x357bb: 0x6d817620, + 0x357bc: 0x6d817820, 0x357bd: 0x6d817a20, 0x357be: 0x6d817c20, 0x357bf: 0x6d817e20, + // Block 0xd5f, offset 0x357c0 + 0x357c0: 0x6d818020, 0x357c1: 0x6d818220, 0x357c2: 0x6d818420, 0x357c3: 0x6d818620, + 0x357c4: 0x6d818820, 0x357c5: 0x6d818a20, 0x357c6: 0x6d818c20, 0x357c7: 0x6d818e20, + 0x357c8: 0x6d819020, 0x357c9: 0x6d819220, 0x357ca: 0x6da75020, 0x357cb: 0x6da75220, + 0x357cc: 0x6da75420, 0x357cd: 0x6da75620, 0x357ce: 0x6da75820, 0x357cf: 0x6da75a20, + 0x357d0: 0x6da75c20, 0x357d1: 0x6da75e20, 0x357d2: 0x6da76020, 0x357d3: 0x6da76220, + 0x357d4: 0x6da76420, 0x357d5: 0x6da76620, 0x357d6: 0x6da76820, 0x357d7: 0x6da76a20, + 0x357d8: 0x6da76c20, 0x357d9: 0x6da76e20, 0x357da: 0x6dc89820, 0x357db: 0x6dc89a20, + 0x357dc: 0x6dc89c20, 0x357dd: 0x6dc89e20, 0x357de: 0x6dc8a020, 0x357df: 0x6dc8a220, + 0x357e0: 0x6dc8a420, 0x357e1: 0x6dc8a620, 0x357e2: 0x6dc8a820, 0x357e3: 0x6dc8aa20, + 0x357e4: 0x6dc8ac20, 0x357e5: 0x6dc8ae20, 0x357e6: 0x6dc8b020, 0x357e7: 0x6dc8b220, + 0x357e8: 0x6dc8b420, 0x357e9: 0x6dc8b620, 0x357ea: 0x6dc8b820, 0x357eb: 0x6de4a620, + 0x357ec: 0x6de4a820, 0x357ed: 0x6de4aa20, 0x357ee: 0x6de4ac20, 0x357ef: 0x6de4ae20, + 0x357f0: 0x6de4b020, 0x357f1: 0x6dfbb820, 0x357f2: 0x6dfbba20, 0x357f3: 0x6dfbbc20, + 0x357f4: 0x6dfbbe20, 0x357f5: 0x6dfbc020, 0x357f6: 0x6e0eec20, 0x357f7: 0x6e0eee20, + 0x357f8: 0x6e0ef020, 0x357f9: 0x6e0ef220, 0x357fa: 0x6e0ef420, 0x357fb: 0x6e1e2620, + 0x357fc: 0x6e1e2820, 0x357fd: 0x6e1e2a20, 0x357fe: 0x6e1e2c20, 0x357ff: 0x6e299020, + // Block 0xd60, offset 0x35800 + 0x35800: 0x6e299220, 0x35801: 0x6e299420, 0x35802: 0x6e3d4c20, 0x35803: 0x6e3d4e20, + 0x35804: 0x6e42b020, 0x35805: 0x6c385220, 0x35806: 0x6c385420, 0x35807: 0x6c53b020, + 0x35808: 0x6c53b220, 0x35809: 0x6c53b420, 0x3580a: 0x6c53b620, 0x3580b: 0x6c9e9820, + 0x3580c: 0x6c9e9a20, 0x3580d: 0x6c9e9c20, 0x3580e: 0x6c9e9e20, 0x3580f: 0x6cf9d620, + 0x35810: 0x6d28ea20, 0x35811: 0x6d819420, 0x35812: 0x6da77020, 0x35813: 0x6dc8bc20, + 0x35814: 0x6dc8be20, 0x35815: 0x6c12f020, 0x35816: 0x6c12f220, 0x35817: 0x6c229a20, + 0x35818: 0x6c229c20, 0x35819: 0x6c385e20, 0x3581a: 0x6c386020, 0x3581b: 0x6c386220, + 0x3581c: 0x6c53c220, 0x3581d: 0x6c53c420, 0x3581e: 0x6c53c620, 0x3581f: 0x6c53c820, + 0x35820: 0x6c53ca20, 0x35821: 0x6c764820, 0x35822: 0x6ccbd020, 0x35823: 0x6c9ea620, + 0x35824: 0x6ccbd220, 0x35825: 0x6ccbd420, 0x35826: 0x6cf9da20, 0x35827: 0x6cf9dc20, + 0x35828: 0x6cf9de20, 0x35829: 0x6d28f020, 0x3582a: 0x6d561420, 0x3582b: 0x6d561620, + 0x3582c: 0x6da77220, 0x3582d: 0x6da77420, 0x3582e: 0x6dc8c020, 0x3582f: 0x6e0ef620, + 0x35830: 0x6e0ef820, 0x35831: 0x6c01fc20, 0x35832: 0x6c04ca20, 0x35833: 0x6c04cc20, + 0x35834: 0x6c04ce20, 0x35835: 0x6c09b220, 0x35836: 0x6c09b420, 0x35837: 0x6c09b620, + 0x35838: 0x6c09b820, 0x35839: 0x6c09ba20, 0x3583a: 0x6c09bc20, 0x3583b: 0x6c09be20, + 0x3583c: 0x6c09c020, 0x3583d: 0x6c09c220, 0x3583e: 0x6c09c420, 0x3583f: 0x6c09c620, + // Block 0xd61, offset 0x35840 + 0x35840: 0x6c133020, 0x35841: 0x6c133220, 0x35842: 0x6c133420, 0x35843: 0x6c133620, + 0x35844: 0x6c133820, 0x35845: 0x6c133a20, 0x35846: 0x6c133c20, 0x35847: 0x6c133e20, + 0x35848: 0x6c134020, 0x35849: 0x6c134220, 0x3584a: 0x6c134420, 0x3584b: 0x6c134620, + 0x3584c: 0x6c134820, 0x3584d: 0x6c134a20, 0x3584e: 0x6c233a20, 0x3584f: 0x6c233c20, + 0x35850: 0x6c233e20, 0x35851: 0x6c234020, 0x35852: 0x6c234220, 0x35853: 0x6c234420, + 0x35854: 0x6c234620, 0x35855: 0x6c234820, 0x35856: 0x6c234a20, 0x35857: 0x6c234c20, + 0x35858: 0x6c234e20, 0x35859: 0x6c235020, 0x3585a: 0x6c235220, 0x3585b: 0x6c235420, + 0x3585c: 0x6c235620, 0x3585d: 0x6c235820, 0x3585e: 0x6c235a20, 0x3585f: 0x6c235c20, + 0x35860: 0x6c235e20, 0x35861: 0x6c236020, 0x35862: 0x6c236220, 0x35863: 0x6c236420, + 0x35864: 0x6c236620, 0x35865: 0x6c236820, 0x35866: 0x6c236a20, 0x35867: 0x6c236c20, + 0x35868: 0x6c236e20, 0x35869: 0x6c237020, 0x3586a: 0x6c237220, 0x3586b: 0x6c237420, + 0x3586c: 0x6c237620, 0x3586d: 0x6c237820, 0x3586e: 0x6c237a20, 0x3586f: 0x6c237c20, + 0x35870: 0x6c237e20, 0x35871: 0x6c238020, 0x35872: 0x6c392020, 0x35873: 0x6c392220, + 0x35874: 0x6c392420, 0x35875: 0x6c392620, 0x35876: 0x6c392820, 0x35877: 0x6c392a20, + 0x35878: 0x6c392c20, 0x35879: 0x6c392e20, 0x3587a: 0x6c393020, 0x3587b: 0x6c393220, + 0x3587c: 0x6c393420, 0x3587d: 0x6c393620, 0x3587e: 0x6c393820, 0x3587f: 0x6c393a20, + // Block 0xd62, offset 0x35880 + 0x35880: 0x6c393c20, 0x35881: 0x6c393e20, 0x35882: 0x6c394020, 0x35883: 0x6c394220, + 0x35884: 0x6c394420, 0x35885: 0x6c394620, 0x35886: 0x6c394820, 0x35887: 0x6c394a20, + 0x35888: 0x6c394c20, 0x35889: 0x6c394e20, 0x3588a: 0x6c395020, 0x3588b: 0x6c395220, + 0x3588c: 0x6c395420, 0x3588d: 0x6c395620, 0x3588e: 0x6c395820, 0x3588f: 0x6c395a20, + 0x35890: 0x6c395c20, 0x35891: 0x6c395e20, 0x35892: 0x6c396020, 0x35893: 0x6c396220, + 0x35894: 0x6c396420, 0x35895: 0x6c396620, 0x35896: 0x6c396820, 0x35897: 0x6c396a20, + 0x35898: 0x6c396c20, 0x35899: 0x6c396e20, 0x3589a: 0x6c397020, 0x3589b: 0x6c397220, + 0x3589c: 0x6c397420, 0x3589d: 0x6c397620, 0x3589e: 0x6c397820, 0x3589f: 0x6c397a20, + 0x358a0: 0x6c397c20, 0x358a1: 0x6c397e20, 0x358a2: 0x6c398020, 0x358a3: 0x6c398220, + 0x358a4: 0x6c549620, 0x358a5: 0x6c549820, 0x358a6: 0x6c549a20, 0x358a7: 0x6c549c20, + 0x358a8: 0x6c549e20, 0x358a9: 0x6c54a020, 0x358aa: 0x6c54a220, 0x358ab: 0x6c54a420, + 0x358ac: 0x6c54a620, 0x358ad: 0x6c54a820, 0x358ae: 0x6c54aa20, 0x358af: 0x6c54ac20, + 0x358b0: 0x6c54ae20, 0x358b1: 0x6c54b020, 0x358b2: 0x6c54b220, 0x358b3: 0x6c54b420, + 0x358b4: 0x6c54b620, 0x358b5: 0x6c54b820, 0x358b6: 0x6c54ba20, 0x358b7: 0x6c54bc20, + 0x358b8: 0x6c54be20, 0x358b9: 0x6c54c020, 0x358ba: 0x6c54c220, 0x358bb: 0x6c54c420, + 0x358bc: 0x6c54c620, 0x358bd: 0x6c54c820, 0x358be: 0x6c54ca20, 0x358bf: 0x6c54cc20, + // Block 0xd63, offset 0x358c0 + 0x358c0: 0x6c54ce20, 0x358c1: 0x6c54d020, 0x358c2: 0x6c54d220, 0x358c3: 0x6c54d420, + 0x358c4: 0x6c54d620, 0x358c5: 0x6c54d820, 0x358c6: 0x6c54da20, 0x358c7: 0x6c54dc20, + 0x358c8: 0x6c54de20, 0x358c9: 0x6c54e020, 0x358ca: 0x6c54e220, 0x358cb: 0x6c54e420, + 0x358cc: 0x6c54e620, 0x358cd: 0x6c54e820, 0x358ce: 0x6c54ea20, 0x358cf: 0x6c54ec20, + 0x358d0: 0x6c54ee20, 0x358d1: 0x6c54f020, 0x358d2: 0x6c54f220, 0x358d3: 0x6c54f420, + 0x358d4: 0x6c54f620, 0x358d5: 0x6c54f820, 0x358d6: 0x6c54fa20, 0x358d7: 0x6c54fc20, + 0x358d8: 0x6c54fe20, 0x358d9: 0x6c550020, 0x358da: 0x6c550220, 0x358db: 0x6c550420, + 0x358dc: 0x6c550620, 0x358dd: 0x6c550820, 0x358de: 0x6c771820, 0x358df: 0x6c771a20, + 0x358e0: 0x6c771c20, 0x358e1: 0x6c771e20, 0x358e2: 0x6c772020, 0x358e3: 0x6c772220, + 0x358e4: 0x6c772420, 0x358e5: 0x6c772620, 0x358e6: 0x6c772820, 0x358e7: 0x6c772a20, + 0x358e8: 0x6c772c20, 0x358e9: 0x6c772e20, 0x358ea: 0x6c773020, 0x358eb: 0x6c773220, + 0x358ec: 0x6c773420, 0x358ed: 0x6c773620, 0x358ee: 0x6c773820, 0x358ef: 0x6c773a20, + 0x358f0: 0x6c773c20, 0x358f1: 0x6c773e20, 0x358f2: 0x6c774020, 0x358f3: 0x6c774220, + 0x358f4: 0x6c774420, 0x358f5: 0x6c774620, 0x358f6: 0x6c774820, 0x358f7: 0x6c774a20, + 0x358f8: 0x6c774c20, 0x358f9: 0x6c774e20, 0x358fa: 0x6c775020, 0x358fb: 0x6c775220, + 0x358fc: 0x6c775420, 0x358fd: 0x6c775620, 0x358fe: 0x6c775820, 0x358ff: 0x6c775a20, + // Block 0xd64, offset 0x35900 + 0x35900: 0x6c775c20, 0x35901: 0x6c775e20, 0x35902: 0x6c776020, 0x35903: 0x6c776220, + 0x35904: 0x6c776420, 0x35905: 0x6c776620, 0x35906: 0x6c776820, 0x35907: 0x6c776a20, + 0x35908: 0x6c776c20, 0x35909: 0x6c776e20, 0x3590a: 0x6c777020, 0x3590b: 0x6c777220, + 0x3590c: 0x6c777420, 0x3590d: 0x6c777620, 0x3590e: 0x6c777820, 0x3590f: 0x6c777a20, + 0x35910: 0x6c777c20, 0x35911: 0x6c777e20, 0x35912: 0x6c778020, 0x35913: 0x6c778220, + 0x35914: 0x6c778420, 0x35915: 0x6c778620, 0x35916: 0x6c778820, 0x35917: 0x6c778a20, + 0x35918: 0x6c778c20, 0x35919: 0x6c778e20, 0x3591a: 0x6c779020, 0x3591b: 0x6c779220, + 0x3591c: 0x6c779420, 0x3591d: 0x6c779620, 0x3591e: 0x6c779820, 0x3591f: 0x6c779a20, + 0x35920: 0x6c779c20, 0x35921: 0x6c779e20, 0x35922: 0x6c77a020, 0x35923: 0x6c77a220, + 0x35924: 0x6c77a420, 0x35925: 0x6c77a620, 0x35926: 0x6c77a820, 0x35927: 0x6c77aa20, + 0x35928: 0x6c77ac20, 0x35929: 0x6c77ae20, 0x3592a: 0x6c77b020, 0x3592b: 0x6c77b220, + 0x3592c: 0x6c77b420, 0x3592d: 0x6c77b620, 0x3592e: 0x6c77b820, 0x3592f: 0x6c77ba20, + 0x35930: 0x6c77bc20, 0x35931: 0x6c77be20, 0x35932: 0x6c77c020, 0x35933: 0x6c77c220, + 0x35934: 0x6c77c420, 0x35935: 0x6c77c620, 0x35936: 0x6c77c820, 0x35937: 0x6c9fbc20, + 0x35938: 0x6c9fbe20, 0x35939: 0x6c9fc020, 0x3593a: 0x6c9fc220, 0x3593b: 0x6c9fc420, + 0x3593c: 0x6c9fc620, 0x3593d: 0x6c9fc820, 0x3593e: 0x6c9fca20, 0x3593f: 0x6c9fcc20, + // Block 0xd65, offset 0x35940 + 0x35940: 0x6c9fce20, 0x35941: 0x6c9fd020, 0x35942: 0x6c9fd220, 0x35943: 0x6c9fd420, + 0x35944: 0x6c9fd620, 0x35945: 0x6c9fd820, 0x35946: 0x6c9fda20, 0x35947: 0x6c9fdc20, + 0x35948: 0x6c9fde20, 0x35949: 0x6c9fe020, 0x3594a: 0x6c9fe220, 0x3594b: 0x6c9fe420, + 0x3594c: 0x6c9fe620, 0x3594d: 0x6c9fe820, 0x3594e: 0x6c9fea20, 0x3594f: 0x6c9fec20, + 0x35950: 0x6c9fee20, 0x35951: 0x6c9ff020, 0x35952: 0x6c9ff220, 0x35953: 0x6c9ff420, + 0x35954: 0x6c9ff620, 0x35955: 0x6c9ff820, 0x35956: 0x6c9ffa20, 0x35957: 0x6c9ffc20, + 0x35958: 0x6c9ffe20, 0x35959: 0x6ca00020, 0x3595a: 0x6ca00220, 0x3595b: 0x6ca00420, + 0x3595c: 0x6ca00620, 0x3595d: 0x6ca00820, 0x3595e: 0x6ca00a20, 0x3595f: 0x6ca00c20, + 0x35960: 0x6ca00e20, 0x35961: 0x6ca01020, 0x35962: 0x6ca01220, 0x35963: 0x6ca01420, + 0x35964: 0x6ca01620, 0x35965: 0x6ca01820, 0x35966: 0x6ca01a20, 0x35967: 0x6ca01c20, + 0x35968: 0x6ca01e20, 0x35969: 0x6ca02020, 0x3596a: 0x6ca02220, 0x3596b: 0x6ca02420, + 0x3596c: 0x6ca02620, 0x3596d: 0x6ca02820, 0x3596e: 0x6ca02a20, 0x3596f: 0x6ca02c20, + 0x35970: 0x6ca02e20, 0x35971: 0x6ca03020, 0x35972: 0x6ca03220, 0x35973: 0x6ca03420, + 0x35974: 0x6ca03620, 0x35975: 0x6ca03820, 0x35976: 0x6ca03a20, 0x35977: 0x6ca03c20, + 0x35978: 0x6ca03e20, 0x35979: 0x6ca04020, 0x3597a: 0x6ca04220, 0x3597b: 0x6ca04420, + 0x3597c: 0x6ca04620, 0x3597d: 0x6ca04820, 0x3597e: 0x6ca04a20, 0x3597f: 0x6ca04c20, + // Block 0xd66, offset 0x35980 + 0x35980: 0x6ca04e20, 0x35981: 0x6ca05020, 0x35982: 0x6ca05220, 0x35983: 0x6ca05420, + 0x35984: 0x6ca05620, 0x35985: 0x6ca05820, 0x35986: 0x6ca05a20, 0x35987: 0x6ca05c20, + 0x35988: 0x6ca05e20, 0x35989: 0x6ca06020, 0x3598a: 0x6ca06220, 0x3598b: 0x6ca06420, + 0x3598c: 0x6ca06620, 0x3598d: 0x6ca06820, 0x3598e: 0x6ca06a20, 0x3598f: 0x6ca06c20, + 0x35990: 0x6ca06e20, 0x35991: 0x6ca07020, 0x35992: 0x6ca07220, 0x35993: 0x6ca07420, + 0x35994: 0x6ca07620, 0x35995: 0x6ca07820, 0x35996: 0x6ca07a20, 0x35997: 0x6ca07c20, + 0x35998: 0x6ca07e20, 0x35999: 0x6ca08020, 0x3599a: 0x6c77ca20, 0x3599b: 0x6ca08220, + 0x3599c: 0x6ca08420, 0x3599d: 0x6ca08620, 0x3599e: 0x6ca08820, 0x3599f: 0x6ca08a20, + 0x359a0: 0x6ca08c20, 0x359a1: 0x6ca08e20, 0x359a2: 0x6ca09020, 0x359a3: 0x6ca09220, + 0x359a4: 0x6ca09420, 0x359a5: 0x6ca09620, 0x359a6: 0x6ca09820, 0x359a7: 0x6ca09a20, + 0x359a8: 0x6ca09c20, 0x359a9: 0x6ca09e20, 0x359aa: 0x6ca0a020, 0x359ab: 0x6ca0a220, + 0x359ac: 0x6ca0a420, 0x359ad: 0x6ca0a620, 0x359ae: 0x6ca0a820, 0x359af: 0x6ca0aa20, + 0x359b0: 0x6ca0ac20, 0x359b1: 0x6ca0ae20, 0x359b2: 0x6ca0b020, 0x359b3: 0x6ca0b220, + 0x359b4: 0x6ca0b420, 0x359b5: 0x6ca0b620, 0x359b6: 0x6ca0b820, 0x359b7: 0x6ca0ba20, + 0x359b8: 0x6ca0bc20, 0x359b9: 0x6ca0be20, 0x359ba: 0x6ca0c020, 0x359bb: 0x6ca0c220, + 0x359bc: 0x6cccf620, 0x359bd: 0x6cccf820, 0x359be: 0x6cccfa20, 0x359bf: 0x6cccfc20, + // Block 0xd67, offset 0x359c0 + 0x359c0: 0x6cccfe20, 0x359c1: 0x6ccd0020, 0x359c2: 0x6ccd0220, 0x359c3: 0x6ccd0420, + 0x359c4: 0x6ccd0620, 0x359c5: 0x6ccd0820, 0x359c6: 0x6ccd0a20, 0x359c7: 0x6ccd0c20, + 0x359c8: 0x6ccd0e20, 0x359c9: 0x6ccd1020, 0x359ca: 0x6ca0c420, 0x359cb: 0x6ccd1220, + 0x359cc: 0x6ccd1420, 0x359cd: 0x6ccd1620, 0x359ce: 0x6ccd1820, 0x359cf: 0x6ccd1a20, + 0x359d0: 0x6ccd1c20, 0x359d1: 0x6ccd1e20, 0x359d2: 0x6ccd2020, 0x359d3: 0x6ccd2220, + 0x359d4: 0x6ccd2420, 0x359d5: 0x6ccd2620, 0x359d6: 0x6ccd2820, 0x359d7: 0x6ccd2a20, + 0x359d8: 0x6ccd2c20, 0x359d9: 0x6ccd2e20, 0x359da: 0x6ccd3020, 0x359db: 0x6ccd3220, + 0x359dc: 0x6ccd3420, 0x359dd: 0x6ccd3620, 0x359de: 0x6ccd3820, 0x359df: 0x6ccd3a20, + 0x359e0: 0x6ccd3c20, 0x359e1: 0x6ccd3e20, 0x359e2: 0x6ccd4020, 0x359e3: 0x6ccd4220, + 0x359e4: 0x6ccd4420, 0x359e5: 0x6ccd4620, 0x359e6: 0x6ccd4820, 0x359e7: 0x6ccd4a20, + 0x359e8: 0x6ccd4c20, 0x359e9: 0x6ccd4e20, 0x359ea: 0x6ccd5020, 0x359eb: 0x6ccd5220, + 0x359ec: 0x6ccd5420, 0x359ed: 0x6ccd5620, 0x359ee: 0x6ccd5820, 0x359ef: 0x6ccd5a20, + 0x359f0: 0x6ccd5c20, 0x359f1: 0x6ccd5e20, 0x359f2: 0x6ccd6020, 0x359f3: 0x6ccd6220, + 0x359f4: 0x6ccd6420, 0x359f5: 0x6ccd6620, 0x359f6: 0x6ccd6820, 0x359f7: 0x6ccd6a20, + 0x359f8: 0x6ccd6c20, 0x359f9: 0x6ccd6e20, 0x359fa: 0x6ccd7020, 0x359fb: 0x6ccd7220, + 0x359fc: 0x6ccd7420, 0x359fd: 0x6ccd7620, 0x359fe: 0x6ccd7820, 0x359ff: 0x6ccd7a20, + // Block 0xd68, offset 0x35a00 + 0x35a00: 0x6ccd7c20, 0x35a01: 0x6ccd7e20, 0x35a02: 0x6ccd8020, 0x35a03: 0x6ccd8220, + 0x35a04: 0x6ccd8420, 0x35a05: 0x6ccd8620, 0x35a06: 0x6ccd8820, 0x35a07: 0x6ccd8a20, + 0x35a08: 0x6ccd8c20, 0x35a09: 0x6ccd8e20, 0x35a0a: 0x6ccd9020, 0x35a0b: 0x6ccd9220, + 0x35a0c: 0x6ccd9420, 0x35a0d: 0x6ccd9620, 0x35a0e: 0x6ccd9820, 0x35a0f: 0x6ccd9a20, + 0x35a10: 0x6ccd9c20, 0x35a11: 0x6ccd9e20, 0x35a12: 0x6ccda020, 0x35a13: 0x6ccda220, + 0x35a14: 0x6ccda420, 0x35a15: 0x6ccda620, 0x35a16: 0x6ccda820, 0x35a17: 0x6ccdaa20, + 0x35a18: 0x6ccdac20, 0x35a19: 0x6ccdae20, 0x35a1a: 0x6ccdb020, 0x35a1b: 0x6ccdb220, + 0x35a1c: 0x6ccdb420, 0x35a1d: 0x6cfac420, 0x35a1e: 0x6cfac620, 0x35a1f: 0x6cfac820, + 0x35a20: 0x6cfaca20, 0x35a21: 0x6cfacc20, 0x35a22: 0x6cface20, 0x35a23: 0x6cfad020, + 0x35a24: 0x6cfad220, 0x35a25: 0x6cfad420, 0x35a26: 0x6cfad620, 0x35a27: 0x6cfad820, + 0x35a28: 0x6cfada20, 0x35a29: 0x6cfadc20, 0x35a2a: 0x6cfade20, 0x35a2b: 0x6cfae020, + 0x35a2c: 0x6cfae220, 0x35a2d: 0x6cfae420, 0x35a2e: 0x6cfae620, 0x35a2f: 0x6cfae820, + 0x35a30: 0x6cfaea20, 0x35a31: 0x6cfaec20, 0x35a32: 0x6cfaee20, 0x35a33: 0x6cfaf020, + 0x35a34: 0x6cfaf220, 0x35a35: 0x6cfaf420, 0x35a36: 0x6cfaf620, 0x35a37: 0x6cfaf820, + 0x35a38: 0x6cfafa20, 0x35a39: 0x6cfafc20, 0x35a3a: 0x6cfafe20, 0x35a3b: 0x6cfb0020, + 0x35a3c: 0x6cfb0220, 0x35a3d: 0x6cfb0420, 0x35a3e: 0x6cfb0620, 0x35a3f: 0x6cfb0820, + // Block 0xd69, offset 0x35a40 + 0x35a40: 0x6cfb0a20, 0x35a41: 0x6cfb0c20, 0x35a42: 0x6cfb0e20, 0x35a43: 0x6cfb1020, + 0x35a44: 0x6cfb1220, 0x35a45: 0x6cfb1420, 0x35a46: 0x6cfb1620, 0x35a47: 0x6cfb1820, + 0x35a48: 0x6cfb1a20, 0x35a49: 0x6cfb1c20, 0x35a4a: 0x6cfb1e20, 0x35a4b: 0x6cfb2020, + 0x35a4c: 0x6cfb2220, 0x35a4d: 0x6cfb2420, 0x35a4e: 0x6cfb2620, 0x35a4f: 0x6cfb2820, + 0x35a50: 0x6cfb2a20, 0x35a51: 0x6cfb2c20, 0x35a52: 0x6cfb2e20, 0x35a53: 0x6cfb3020, + 0x35a54: 0x6cfb3220, 0x35a55: 0x6cfb3420, 0x35a56: 0x6cfb3620, 0x35a57: 0x6cfb3820, + 0x35a58: 0x6cfb3a20, 0x35a59: 0x6cfb3c20, 0x35a5a: 0x6cfb3e20, 0x35a5b: 0x6cfb4020, + 0x35a5c: 0x6cfb4220, 0x35a5d: 0x6cfb4420, 0x35a5e: 0x6cfb4620, 0x35a5f: 0x6cfb4820, + 0x35a60: 0x6cfb4a20, 0x35a61: 0x6cfb4c20, 0x35a62: 0x6cfb4e20, 0x35a63: 0x6cfb5020, + 0x35a64: 0x6cfb5220, 0x35a65: 0x6cfb5420, 0x35a66: 0x6cfb5620, 0x35a67: 0x6cfb5820, + 0x35a68: 0x6cfb5a20, 0x35a69: 0x6cfb5c20, 0x35a6a: 0x6cfb5e20, 0x35a6b: 0x6cfb6020, + 0x35a6c: 0x6cfb6220, 0x35a6d: 0x6cfb6420, 0x35a6e: 0x6cfb6620, 0x35a6f: 0x6cfb6820, + 0x35a70: 0x6cfb6a20, 0x35a71: 0x6cfb6c20, 0x35a72: 0x6cfb6e20, 0x35a73: 0x6cfb7020, + 0x35a74: 0x6cfb7220, 0x35a75: 0x6cfb7420, 0x35a76: 0x6cfb7620, 0x35a77: 0x6cfb7820, + 0x35a78: 0x6cfb7a20, 0x35a79: 0x6cfb7c20, 0x35a7a: 0x6cfb7e20, 0x35a7b: 0x6cfb8020, + 0x35a7c: 0x6cfb8220, 0x35a7d: 0x6cfb8420, 0x35a7e: 0x6cfb8620, 0x35a7f: 0x6cfb8820, + // Block 0xd6a, offset 0x35a80 + 0x35a80: 0x6cfb8a20, 0x35a81: 0x6cfb8c20, 0x35a82: 0x6cfb8e20, 0x35a83: 0x6cfb9020, + 0x35a84: 0x6cfb9220, 0x35a85: 0x6cfb9420, 0x35a86: 0x6cfb9620, 0x35a87: 0x6cfb9820, + 0x35a88: 0x6cfb9a20, 0x35a89: 0x6cfb9c20, 0x35a8a: 0x6cfb9e20, 0x35a8b: 0x6cfba020, + 0x35a8c: 0x6cfba220, 0x35a8d: 0x6d29ca20, 0x35a8e: 0x6d29cc20, 0x35a8f: 0x6d29ce20, + 0x35a90: 0x6d29d020, 0x35a91: 0x6d29d220, 0x35a92: 0x6d29d420, 0x35a93: 0x6d29d620, + 0x35a94: 0x6d29d820, 0x35a95: 0x6d29da20, 0x35a96: 0x6d29dc20, 0x35a97: 0x6d29de20, + 0x35a98: 0x6d29e020, 0x35a99: 0x6d29e220, 0x35a9a: 0x6d29e420, 0x35a9b: 0x6d29e620, + 0x35a9c: 0x6d29e820, 0x35a9d: 0x6d29ea20, 0x35a9e: 0x6d29ec20, 0x35a9f: 0x6d29ee20, + 0x35aa0: 0x6d29f020, 0x35aa1: 0x6d29f220, 0x35aa2: 0x6d29f420, 0x35aa3: 0x6d29f620, + 0x35aa4: 0x6d29f820, 0x35aa5: 0x6d29fa20, 0x35aa6: 0x6d29fc20, 0x35aa7: 0x6d29fe20, + 0x35aa8: 0x6d2a0020, 0x35aa9: 0x6d2a0220, 0x35aaa: 0x6d2a0420, 0x35aab: 0x6d2a0620, + 0x35aac: 0x6d2a0820, 0x35aad: 0x6d2a0a20, 0x35aae: 0x6d2a0c20, 0x35aaf: 0x6d2a0e20, + 0x35ab0: 0x6d2a1020, 0x35ab1: 0x6d2a1220, 0x35ab2: 0x6d2a1420, 0x35ab3: 0x6d2a1620, + 0x35ab4: 0x6d56e220, 0x35ab5: 0x6d2a1820, 0x35ab6: 0x6d2a1a20, 0x35ab7: 0x6d2a1c20, + 0x35ab8: 0x6d2a1e20, 0x35ab9: 0x6d2a2020, 0x35aba: 0x6d2a2220, 0x35abb: 0x6d2a2420, + 0x35abc: 0x6d2a2620, 0x35abd: 0x6d2a2820, 0x35abe: 0x6d2a2a20, 0x35abf: 0x6d2a2c20, + // Block 0xd6b, offset 0x35ac0 + 0x35ac0: 0x6d2a2e20, 0x35ac1: 0x6d2a3020, 0x35ac2: 0x6d2a3220, 0x35ac3: 0x6d2a3420, + 0x35ac4: 0x6d2a3620, 0x35ac5: 0x6d2a3820, 0x35ac6: 0x6d2a3a20, 0x35ac7: 0x6d2a3c20, + 0x35ac8: 0x6d2a3e20, 0x35ac9: 0x6d2a4020, 0x35aca: 0x6d2a4220, 0x35acb: 0x6d2a4420, + 0x35acc: 0x6d2a4620, 0x35acd: 0x6d2a4820, 0x35ace: 0x6d2a4a20, 0x35acf: 0x6d2a4c20, + 0x35ad0: 0x6d2a4e20, 0x35ad1: 0x6d2a5020, 0x35ad2: 0x6d2a5220, 0x35ad3: 0x6d2a5420, + 0x35ad4: 0x6d2a5620, 0x35ad5: 0x6d2a5820, 0x35ad6: 0x6d2a5a20, 0x35ad7: 0x6d2a5c20, + 0x35ad8: 0x6d2a5e20, 0x35ad9: 0x6d4f2420, 0x35ada: 0x6d2a6020, 0x35adb: 0x6d2a6220, + 0x35adc: 0x6d2a6420, 0x35add: 0x6d2a6620, 0x35ade: 0x6d2a6820, 0x35adf: 0x6d2a6a20, + 0x35ae0: 0x6d2a6c20, 0x35ae1: 0x6d2a6e20, 0x35ae2: 0x6d2a7020, 0x35ae3: 0x6d2a7220, + 0x35ae4: 0x6d2a7420, 0x35ae5: 0x6d2a7620, 0x35ae6: 0x6d2a7820, 0x35ae7: 0x6d2a7a20, + 0x35ae8: 0x6d2a7c20, 0x35ae9: 0x6d2a7e20, 0x35aea: 0x6d2a8020, 0x35aeb: 0x6d2a8220, + 0x35aec: 0x6d2a8420, 0x35aed: 0x6d2a8620, 0x35aee: 0x6d2a8820, 0x35aef: 0x6d2a8a20, + 0x35af0: 0x6d2a8c20, 0x35af1: 0x6d2a8e20, 0x35af2: 0x6d2a9020, 0x35af3: 0x6d2a9220, + 0x35af4: 0x6d2a9420, 0x35af5: 0x6d2a9620, 0x35af6: 0x6d2a9820, 0x35af7: 0x6d2a9a20, + 0x35af8: 0x6d2a9c20, 0x35af9: 0x6d2a9e20, 0x35afa: 0x6d2aa020, 0x35afb: 0x6d2aa220, + 0x35afc: 0x6d2aa420, 0x35afd: 0x6d2aa620, 0x35afe: 0x6d2aa820, 0x35aff: 0x6d2aaa20, + // Block 0xd6c, offset 0x35b00 + 0x35b00: 0x6d2aac20, 0x35b01: 0x6d2aae20, 0x35b02: 0x6d2ab020, 0x35b03: 0x6d56e420, + 0x35b04: 0x6d56e620, 0x35b05: 0x6d56e820, 0x35b06: 0x6d56ea20, 0x35b07: 0x6d56ec20, + 0x35b08: 0x6d56ee20, 0x35b09: 0x6d56f020, 0x35b0a: 0x6d56f220, 0x35b0b: 0x6d56f420, + 0x35b0c: 0x6d56f620, 0x35b0d: 0x6d56f820, 0x35b0e: 0x6d56fa20, 0x35b0f: 0x6d56fc20, + 0x35b10: 0x6d56fe20, 0x35b11: 0x6d570020, 0x35b12: 0x6d570220, 0x35b13: 0x6d570420, + 0x35b14: 0x6d570620, 0x35b15: 0x6d570820, 0x35b16: 0x6d570a20, 0x35b17: 0x6d570c20, + 0x35b18: 0x6d570e20, 0x35b19: 0x6d571020, 0x35b1a: 0x6d571220, 0x35b1b: 0x6d571420, + 0x35b1c: 0x6d571620, 0x35b1d: 0x6d571820, 0x35b1e: 0x6d571a20, 0x35b1f: 0x6d571c20, + 0x35b20: 0x6d571e20, 0x35b21: 0x6d572020, 0x35b22: 0x6d572220, 0x35b23: 0x6d572420, + 0x35b24: 0x6d572620, 0x35b25: 0x6d572820, 0x35b26: 0x6d572a20, 0x35b27: 0x6d572c20, + 0x35b28: 0x6d572e20, 0x35b29: 0x6d573020, 0x35b2a: 0x6d573220, 0x35b2b: 0x6d573420, + 0x35b2c: 0x6d573620, 0x35b2d: 0x6d573820, 0x35b2e: 0x6d573a20, 0x35b2f: 0x6d573c20, + 0x35b30: 0x6d573e20, 0x35b31: 0x6d574020, 0x35b32: 0x6d574220, 0x35b33: 0x6d574420, + 0x35b34: 0x6d574620, 0x35b35: 0x6d574820, 0x35b36: 0x6d574a20, 0x35b37: 0x6d574c20, + 0x35b38: 0x6d574e20, 0x35b39: 0x6d575020, 0x35b3a: 0x6d575220, 0x35b3b: 0x6d575420, + 0x35b3c: 0x6d575620, 0x35b3d: 0x6d575820, 0x35b3e: 0x6d575a20, 0x35b3f: 0x6d575c20, + // Block 0xd6d, offset 0x35b40 + 0x35b40: 0x6d575e20, 0x35b41: 0x6d576020, 0x35b42: 0x6d576220, 0x35b43: 0x6d576420, + 0x35b44: 0x6d576620, 0x35b45: 0x6d576820, 0x35b46: 0x6d576a20, 0x35b47: 0x6d576c20, + 0x35b48: 0x6d576e20, 0x35b49: 0x6d577020, 0x35b4a: 0x6d577220, 0x35b4b: 0x6d577420, + 0x35b4c: 0x6d577620, 0x35b4d: 0x6d577820, 0x35b4e: 0x6d577a20, 0x35b4f: 0x6d577c20, + 0x35b50: 0x6d577e20, 0x35b51: 0x6d578020, 0x35b52: 0x6d578220, 0x35b53: 0x6d578420, + 0x35b54: 0x6d578620, 0x35b55: 0x6d578820, 0x35b56: 0x6d578a20, 0x35b57: 0x6d578c20, + 0x35b58: 0x6d578e20, 0x35b59: 0x6d579020, 0x35b5a: 0x6d579220, 0x35b5b: 0x6d579420, + 0x35b5c: 0x6d579620, 0x35b5d: 0x6d579820, 0x35b5e: 0x6d579a20, 0x35b5f: 0x6d579c20, + 0x35b60: 0x6d579e20, 0x35b61: 0x6d57a020, 0x35b62: 0x6d57a220, 0x35b63: 0x6d57a420, + 0x35b64: 0x6d57a620, 0x35b65: 0x6d57a820, 0x35b66: 0x6d57aa20, 0x35b67: 0x6d57ac20, + 0x35b68: 0x6d57ae20, 0x35b69: 0x6d822820, 0x35b6a: 0x6d57b020, 0x35b6b: 0x6d57b220, + 0x35b6c: 0x6d57b420, 0x35b6d: 0x6d57b620, 0x35b6e: 0x6d57b820, 0x35b6f: 0x6d57ba20, + 0x35b70: 0x6d57bc20, 0x35b71: 0x6d57be20, 0x35b72: 0x6d57c020, 0x35b73: 0x6d57c220, + 0x35b74: 0x6d57c420, 0x35b75: 0x6d57c620, 0x35b76: 0x6d57c820, 0x35b77: 0x6d57ca20, + 0x35b78: 0x6d57cc20, 0x35b79: 0x6d57ce20, 0x35b7a: 0x6d57d020, 0x35b7b: 0x6d57d220, + 0x35b7c: 0x6d57d420, 0x35b7d: 0x6d57d620, 0x35b7e: 0x6d57d820, 0x35b7f: 0x6d57da20, + // Block 0xd6e, offset 0x35b80 + 0x35b80: 0x6da7de20, 0x35b81: 0x6d57dc20, 0x35b82: 0x6d57de20, 0x35b83: 0x6d57e020, + 0x35b84: 0x6d57e220, 0x35b85: 0x6d822a20, 0x35b86: 0x6d822c20, 0x35b87: 0x6d822e20, + 0x35b88: 0x6d823020, 0x35b89: 0x6d823220, 0x35b8a: 0x6d823420, 0x35b8b: 0x6d823620, + 0x35b8c: 0x6d823820, 0x35b8d: 0x6d823a20, 0x35b8e: 0x6d823c20, 0x35b8f: 0x6d823e20, + 0x35b90: 0x6d824020, 0x35b91: 0x6d824220, 0x35b92: 0x6d824420, 0x35b93: 0x6d824620, + 0x35b94: 0x6d824820, 0x35b95: 0x6d824a20, 0x35b96: 0x6d824c20, 0x35b97: 0x6d824e20, + 0x35b98: 0x6d825020, 0x35b99: 0x6d825220, 0x35b9a: 0x6d825420, 0x35b9b: 0x6d825620, + 0x35b9c: 0x6d825820, 0x35b9d: 0x6d825a20, 0x35b9e: 0x6d825c20, 0x35b9f: 0x6d825e20, + 0x35ba0: 0x6d826020, 0x35ba1: 0x6d826220, 0x35ba2: 0x6d826420, 0x35ba3: 0x6d826620, + 0x35ba4: 0x6d826820, 0x35ba5: 0x6d826a20, 0x35ba6: 0x6d826c20, 0x35ba7: 0x6d826e20, + 0x35ba8: 0x6d827020, 0x35ba9: 0x6d827220, 0x35baa: 0x6d827420, 0x35bab: 0x6d827620, + 0x35bac: 0x6d827820, 0x35bad: 0x6d827a20, 0x35bae: 0x6d827c20, 0x35baf: 0x6d827e20, + 0x35bb0: 0x6d828020, 0x35bb1: 0x6d828220, 0x35bb2: 0x6d828420, 0x35bb3: 0x6d828620, + 0x35bb4: 0x6d828820, 0x35bb5: 0x6d828a20, 0x35bb6: 0x6d828c20, 0x35bb7: 0x6d828e20, + 0x35bb8: 0x6d829020, 0x35bb9: 0x6d829220, 0x35bba: 0x6d829420, 0x35bbb: 0x6d829620, + 0x35bbc: 0x6d829820, 0x35bbd: 0x6d829a20, 0x35bbe: 0x6d829c20, 0x35bbf: 0x6d829e20, + // Block 0xd6f, offset 0x35bc0 + 0x35bc0: 0x6d82a020, 0x35bc1: 0x6d82a220, 0x35bc2: 0x6d82a420, 0x35bc3: 0x6d82a620, + 0x35bc4: 0x6d82a820, 0x35bc5: 0x6d82aa20, 0x35bc6: 0x6d82ac20, 0x35bc7: 0x6d82ae20, + 0x35bc8: 0x6d82b020, 0x35bc9: 0x6d82b220, 0x35bca: 0x6d82b420, 0x35bcb: 0x6d82b620, + 0x35bcc: 0x6d82b820, 0x35bcd: 0x6d82ba20, 0x35bce: 0x6d82bc20, 0x35bcf: 0x6d82be20, + 0x35bd0: 0x6d82c020, 0x35bd1: 0x6d82c220, 0x35bd2: 0x6d82c420, 0x35bd3: 0x6d82c620, + 0x35bd4: 0x6d82c820, 0x35bd5: 0x6d82ca20, 0x35bd6: 0x6d82cc20, 0x35bd7: 0x6d82ce20, + 0x35bd8: 0x6d82d020, 0x35bd9: 0x6d82d220, 0x35bda: 0x6d82d420, 0x35bdb: 0x6d82d620, + 0x35bdc: 0x6d82d820, 0x35bdd: 0x6d82da20, 0x35bde: 0x6d82dc20, 0x35bdf: 0x6d82de20, + 0x35be0: 0x6d82e020, 0x35be1: 0x6d82e220, 0x35be2: 0x6d7ade20, 0x35be3: 0x6da7e020, + 0x35be4: 0x6da7e220, 0x35be5: 0x6da7e420, 0x35be6: 0x6da7e620, 0x35be7: 0x6da7e820, + 0x35be8: 0x6da7ea20, 0x35be9: 0x6da7ec20, 0x35bea: 0x6da7ee20, 0x35beb: 0x6da7f020, + 0x35bec: 0x6da7f220, 0x35bed: 0x6da7f420, 0x35bee: 0x6da7f620, 0x35bef: 0x6da7f820, + 0x35bf0: 0x6da7fa20, 0x35bf1: 0x6da7fc20, 0x35bf2: 0x6da7fe20, 0x35bf3: 0x6da80020, + 0x35bf4: 0x6da80220, 0x35bf5: 0x6da80420, 0x35bf6: 0x6da80620, 0x35bf7: 0x6da80820, + 0x35bf8: 0x6da80a20, 0x35bf9: 0x6da80c20, 0x35bfa: 0x6da80e20, 0x35bfb: 0x6da81020, + 0x35bfc: 0x6da81220, 0x35bfd: 0x6da81420, 0x35bfe: 0x6da81620, 0x35bff: 0x6da81820, + // Block 0xd70, offset 0x35c00 + 0x35c00: 0x6da81a20, 0x35c01: 0x6da81c20, 0x35c02: 0x6da81e20, 0x35c03: 0x6da82020, + 0x35c04: 0x6da82220, 0x35c05: 0x6da82420, 0x35c06: 0x6da82620, 0x35c07: 0x6da82820, + 0x35c08: 0x6da82a20, 0x35c09: 0x6da82c20, 0x35c0a: 0x6da82e20, 0x35c0b: 0x6da83020, + 0x35c0c: 0x6da83220, 0x35c0d: 0x6da83420, 0x35c0e: 0x6da83620, 0x35c0f: 0x6da83820, + 0x35c10: 0x6da83a20, 0x35c11: 0x6da83c20, 0x35c12: 0x6da83e20, 0x35c13: 0x6da84020, + 0x35c14: 0x6da84220, 0x35c15: 0x6da84420, 0x35c16: 0x6da84620, 0x35c17: 0x6da84820, + 0x35c18: 0x6da84a20, 0x35c19: 0x6da84c20, 0x35c1a: 0x6da84e20, 0x35c1b: 0x6da85020, + 0x35c1c: 0x6da85220, 0x35c1d: 0x6da85420, 0x35c1e: 0x6dc90820, 0x35c1f: 0x6da85620, + 0x35c20: 0x6da85820, 0x35c21: 0x6dc90a20, 0x35c22: 0x6dc90c20, 0x35c23: 0x6dc90e20, + 0x35c24: 0x6dc91020, 0x35c25: 0x6dc91220, 0x35c26: 0x6dc91420, 0x35c27: 0x6dc91620, + 0x35c28: 0x6dc91820, 0x35c29: 0x6dc91a20, 0x35c2a: 0x6dc91c20, 0x35c2b: 0x6dc91e20, + 0x35c2c: 0x6dc92020, 0x35c2d: 0x6dc92220, 0x35c2e: 0x6dc92420, 0x35c2f: 0x6dc92620, + 0x35c30: 0x6dc92820, 0x35c31: 0x6dc92a20, 0x35c32: 0x6dc92c20, 0x35c33: 0x6dc92e20, + 0x35c34: 0x6dc93020, 0x35c35: 0x6dc93220, 0x35c36: 0x6dc93420, 0x35c37: 0x6dc93620, + 0x35c38: 0x6dc93820, 0x35c39: 0x6dc93a20, 0x35c3a: 0x6dc93c20, 0x35c3b: 0x6dc93e20, + 0x35c3c: 0x6dc94020, 0x35c3d: 0x6dc94220, 0x35c3e: 0x6dc94420, 0x35c3f: 0x6dc94620, + // Block 0xd71, offset 0x35c40 + 0x35c40: 0x6dc94820, 0x35c41: 0x6dc94a20, 0x35c42: 0x6dc94c20, 0x35c43: 0x6dc94e20, + 0x35c44: 0x6dc95020, 0x35c45: 0x6dc95220, 0x35c46: 0x6dc95420, 0x35c47: 0x6dc95620, + 0x35c48: 0x6dc95820, 0x35c49: 0x6dc95a20, 0x35c4a: 0x6dc95c20, 0x35c4b: 0x6dc95e20, + 0x35c4c: 0x6dc96020, 0x35c4d: 0x6dc96220, 0x35c4e: 0x6dc96420, 0x35c4f: 0x6dc96620, + 0x35c50: 0x6dc96820, 0x35c51: 0x6dc96a20, 0x35c52: 0x6dc96c20, 0x35c53: 0x6dc96e20, + 0x35c54: 0x6dc97020, 0x35c55: 0x6dc97220, 0x35c56: 0x6dc97420, 0x35c57: 0x6dc97620, + 0x35c58: 0x6dc97820, 0x35c59: 0x6dc97a20, 0x35c5a: 0x6dc97c20, 0x35c5b: 0x6dc97e20, + 0x35c5c: 0x6dc98020, 0x35c5d: 0x6de4f420, 0x35c5e: 0x6dc98220, 0x35c5f: 0x6dc98420, + 0x35c60: 0x6dc98620, 0x35c61: 0x6de4f620, 0x35c62: 0x6dc98820, 0x35c63: 0x6dc98a20, + 0x35c64: 0x6dc98c20, 0x35c65: 0x6dc98e20, 0x35c66: 0x6dc99020, 0x35c67: 0x6dc99220, + 0x35c68: 0x6dc99420, 0x35c69: 0x6dc99620, 0x35c6a: 0x6dc99820, 0x35c6b: 0x6dc99a20, + 0x35c6c: 0x6dc99c20, 0x35c6d: 0x6dc99e20, 0x35c6e: 0x6dc9a020, 0x35c6f: 0x6dc9a220, + 0x35c70: 0x6dc9a420, 0x35c71: 0x6dc9a620, 0x35c72: 0x6dc9a820, 0x35c73: 0x6de4f820, + 0x35c74: 0x6de4fa20, 0x35c75: 0x6de4fc20, 0x35c76: 0x6de4fe20, 0x35c77: 0x6de50020, + 0x35c78: 0x6de50220, 0x35c79: 0x6de50420, 0x35c7a: 0x6de50620, 0x35c7b: 0x6de50820, + 0x35c7c: 0x6de50a20, 0x35c7d: 0x6de50c20, 0x35c7e: 0x6de50e20, 0x35c7f: 0x6de51020, + // Block 0xd72, offset 0x35c80 + 0x35c80: 0x6de51220, 0x35c81: 0x6de51420, 0x35c82: 0x6de51620, 0x35c83: 0x6de51820, + 0x35c84: 0x6de51a20, 0x35c85: 0x6de51c20, 0x35c86: 0x6de51e20, 0x35c87: 0x6de52020, + 0x35c88: 0x6de52220, 0x35c89: 0x6de52420, 0x35c8a: 0x6de52620, 0x35c8b: 0x6de52820, + 0x35c8c: 0x6de52a20, 0x35c8d: 0x6de52c20, 0x35c8e: 0x6de52e20, 0x35c8f: 0x6de53020, + 0x35c90: 0x6de53220, 0x35c91: 0x6de53420, 0x35c92: 0x6de53620, 0x35c93: 0x6de53820, + 0x35c94: 0x6de53a20, 0x35c95: 0x6de53c20, 0x35c96: 0x6de53e20, 0x35c97: 0x6de54020, + 0x35c98: 0x6de54220, 0x35c99: 0x6de54420, 0x35c9a: 0x6de54620, 0x35c9b: 0x6de54820, + 0x35c9c: 0x6de54a20, 0x35c9d: 0x6de54c20, 0x35c9e: 0x6de54e20, 0x35c9f: 0x6de55020, + 0x35ca0: 0x6de55220, 0x35ca1: 0x6de55420, 0x35ca2: 0x6de55620, 0x35ca3: 0x6de55820, + 0x35ca4: 0x6de55a20, 0x35ca5: 0x6de55c20, 0x35ca6: 0x6de55e20, 0x35ca7: 0x6de56020, + 0x35ca8: 0x6dfbf620, 0x35ca9: 0x6dfbf820, 0x35caa: 0x6dfbfa20, 0x35cab: 0x6dfbfc20, + 0x35cac: 0x6dfbfe20, 0x35cad: 0x6dfc0020, 0x35cae: 0x6dfc0220, 0x35caf: 0x6dfc0420, + 0x35cb0: 0x6dfc0620, 0x35cb1: 0x6dfc0820, 0x35cb2: 0x6dfc0a20, 0x35cb3: 0x6dfc0c20, + 0x35cb4: 0x6dfc0e20, 0x35cb5: 0x6dfc1020, 0x35cb6: 0x6dfc1220, 0x35cb7: 0x6dfc1420, + 0x35cb8: 0x6dfc1620, 0x35cb9: 0x6dfc1820, 0x35cba: 0x6dfc1a20, 0x35cbb: 0x6dfc1c20, + 0x35cbc: 0x6dfc1e20, 0x35cbd: 0x6dfc2020, 0x35cbe: 0x6dfc2220, 0x35cbf: 0x6dfc2420, + // Block 0xd73, offset 0x35cc0 + 0x35cc0: 0x6dfc2620, 0x35cc1: 0x6dfc2820, 0x35cc2: 0x6dfc2a20, 0x35cc3: 0x6dfc2c20, + 0x35cc4: 0x6dfc2e20, 0x35cc5: 0x6dfc3020, 0x35cc6: 0x6dfc3220, 0x35cc7: 0x6dfc3420, + 0x35cc8: 0x6dfc3620, 0x35cc9: 0x6dfc3820, 0x35cca: 0x6dfc3a20, 0x35ccb: 0x6dfc3c20, + 0x35ccc: 0x6dfc3e20, 0x35ccd: 0x6dfc4020, 0x35cce: 0x6e0f2220, 0x35ccf: 0x6e0f2420, + 0x35cd0: 0x6e0f2620, 0x35cd1: 0x6e0f2820, 0x35cd2: 0x6e0f2a20, 0x35cd3: 0x6e0f2c20, + 0x35cd4: 0x6e0f2e20, 0x35cd5: 0x6e0f3020, 0x35cd6: 0x6e0f3220, 0x35cd7: 0x6e0f3420, + 0x35cd8: 0x6e0f3620, 0x35cd9: 0x6e0f3820, 0x35cda: 0x6e0f3a20, 0x35cdb: 0x6e0f3c20, + 0x35cdc: 0x6e0f3e20, 0x35cdd: 0x6e0f4020, 0x35cde: 0x6e0f4220, 0x35cdf: 0x6e0f4420, + 0x35ce0: 0x6e0f4620, 0x35ce1: 0x6e0f4820, 0x35ce2: 0x6e0f4a20, 0x35ce3: 0x6e0f4c20, + 0x35ce4: 0x6e0f4e20, 0x35ce5: 0x6e0f5020, 0x35ce6: 0x6e0f5220, 0x35ce7: 0x6e0f5420, + 0x35ce8: 0x6e0f5620, 0x35ce9: 0x6e0f5820, 0x35cea: 0x6e0f5a20, 0x35ceb: 0x6e0f5c20, + 0x35cec: 0x6e0f5e20, 0x35ced: 0x6e0f6020, 0x35cee: 0x6e0f6220, 0x35cef: 0x6e0f6420, + 0x35cf0: 0x6e0f6620, 0x35cf1: 0x6e0f6820, 0x35cf2: 0x6e0f6a20, 0x35cf3: 0x6e0f6c20, + 0x35cf4: 0x6e0f6e20, 0x35cf5: 0x6e0f7020, 0x35cf6: 0x6e1e4220, 0x35cf7: 0x6e1e4420, + 0x35cf8: 0x6e1e4620, 0x35cf9: 0x6e1e4820, 0x35cfa: 0x6e1e4a20, 0x35cfb: 0x6e1e4c20, + 0x35cfc: 0x6e1e4e20, 0x35cfd: 0x6e1e5020, 0x35cfe: 0x6e1e5220, 0x35cff: 0x6e1e5420, + // Block 0xd74, offset 0x35d00 + 0x35d00: 0x6e1e5620, 0x35d01: 0x6e1e5820, 0x35d02: 0x6e1e5a20, 0x35d03: 0x6e1e5c20, + 0x35d04: 0x6e1e5e20, 0x35d05: 0x6e1e6020, 0x35d06: 0x6e1e6220, 0x35d07: 0x6e1e6420, + 0x35d08: 0x6e1e6620, 0x35d09: 0x6e1e6820, 0x35d0a: 0x6e29a620, 0x35d0b: 0x6e29a820, + 0x35d0c: 0x6e29aa20, 0x35d0d: 0x6e29ac20, 0x35d0e: 0x6e29ae20, 0x35d0f: 0x6e29b020, + 0x35d10: 0x6e29b220, 0x35d11: 0x6e29b420, 0x35d12: 0x6e29b620, 0x35d13: 0x6e29b820, + 0x35d14: 0x6e29ba20, 0x35d15: 0x6e29bc20, 0x35d16: 0x6e29be20, 0x35d17: 0x6e29c020, + 0x35d18: 0x6e29c220, 0x35d19: 0x6e29c420, 0x35d1a: 0x6e29c620, 0x35d1b: 0x6e29c820, + 0x35d1c: 0x6e29ca20, 0x35d1d: 0x6e29cc20, 0x35d1e: 0x6e29ce20, 0x35d1f: 0x6e29d020, + 0x35d20: 0x6e32ac20, 0x35d21: 0x6e32ae20, 0x35d22: 0x6e32b020, 0x35d23: 0x6e32b220, + 0x35d24: 0x6e32b420, 0x35d25: 0x6e32b620, 0x35d26: 0x6e32b820, 0x35d27: 0x6e32ba20, + 0x35d28: 0x6e32bc20, 0x35d29: 0x6e38e420, 0x35d2a: 0x6e38e620, 0x35d2b: 0x6e38e820, + 0x35d2c: 0x6e38ea20, 0x35d2d: 0x6e38ec20, 0x35d2e: 0x6e38ee20, 0x35d2f: 0x6e38f020, + 0x35d30: 0x6e3d5820, 0x35d31: 0x6e3d5a20, 0x35d32: 0x6e3d5c20, 0x35d33: 0x6e3d5e20, + 0x35d34: 0x6e3d6020, 0x35d35: 0x6e3d6220, 0x35d36: 0x6e3d6420, 0x35d37: 0x6e406220, + 0x35d38: 0x6e406420, 0x35d39: 0x6e406620, 0x35d3a: 0x6e406820, 0x35d3b: 0x6e406a20, + 0x35d3c: 0x6e42b220, 0x35d3d: 0x6e42b420, 0x35d3e: 0x6e443220, 0x35d3f: 0x6e452220, + // Block 0xd75, offset 0x35d40 + 0x35d40: 0x6e468020, 0x35d41: 0x6e46c820, 0x35d42: 0x6c09cc20, 0x35d43: 0x6c136620, + 0x35d44: 0x6c136820, 0x35d45: 0x6c136a20, 0x35d46: 0x6c136c20, 0x35d47: 0x6c136e20, + 0x35d48: 0x6c137020, 0x35d49: 0x6c137220, 0x35d4a: 0x6c137420, 0x35d4b: 0x6c137620, + 0x35d4c: 0x6c137820, 0x35d4d: 0x6c23aa20, 0x35d4e: 0x6c23ac20, 0x35d4f: 0x6c23ae20, + 0x35d50: 0x6c23b020, 0x35d51: 0x6c23b220, 0x35d52: 0x6c23b420, 0x35d53: 0x6c23b620, + 0x35d54: 0x6c23b820, 0x35d55: 0x6c23ba20, 0x35d56: 0x6c23bc20, 0x35d57: 0x6c23be20, + 0x35d58: 0x6c23c020, 0x35d59: 0x6c23c220, 0x35d5a: 0x6c23c420, 0x35d5b: 0x6c23c620, + 0x35d5c: 0x6c23c820, 0x35d5d: 0x6c39d820, 0x35d5e: 0x6c39da20, 0x35d5f: 0x6c39dc20, + 0x35d60: 0x6c39de20, 0x35d61: 0x6c39e020, 0x35d62: 0x6c39e220, 0x35d63: 0x6c39e420, + 0x35d64: 0x6c39e620, 0x35d65: 0x6c39e820, 0x35d66: 0x6c39ea20, 0x35d67: 0x6c39ec20, + 0x35d68: 0x6c39ee20, 0x35d69: 0x6c39f020, 0x35d6a: 0x6c39f220, 0x35d6b: 0x6c39f420, + 0x35d6c: 0x6c39f620, 0x35d6d: 0x6c39f820, 0x35d6e: 0x6c39fa20, 0x35d6f: 0x6c39fc20, + 0x35d70: 0x6c39fe20, 0x35d71: 0x6c3a0020, 0x35d72: 0x6c3a0220, 0x35d73: 0x6c3a0420, + 0x35d74: 0x6c3a0620, 0x35d75: 0x6c3a0820, 0x35d76: 0x6c3a0a20, 0x35d77: 0x6c3a0c20, + 0x35d78: 0x6c3a0e20, 0x35d79: 0x6c3a1020, 0x35d7a: 0x6c3a1220, 0x35d7b: 0x6c3a1420, + 0x35d7c: 0x6c557220, 0x35d7d: 0x6c557420, 0x35d7e: 0x6c557620, 0x35d7f: 0x6c557820, + // Block 0xd76, offset 0x35d80 + 0x35d80: 0x6c557a20, 0x35d81: 0x6c557c20, 0x35d82: 0x6c557e20, 0x35d83: 0x6c558020, + 0x35d84: 0x6c558220, 0x35d85: 0x6c558420, 0x35d86: 0x6c558620, 0x35d87: 0x6c558820, + 0x35d88: 0x6c558a20, 0x35d89: 0x6c558c20, 0x35d8a: 0x6c558e20, 0x35d8b: 0x6c559020, + 0x35d8c: 0x6c559220, 0x35d8d: 0x6c559420, 0x35d8e: 0x6c559620, 0x35d8f: 0x6c559820, + 0x35d90: 0x6c559a20, 0x35d91: 0x6c559c20, 0x35d92: 0x6c559e20, 0x35d93: 0x6c55a020, + 0x35d94: 0x6c55a220, 0x35d95: 0x6c55a420, 0x35d96: 0x6c55a620, 0x35d97: 0x6c55a820, + 0x35d98: 0x6c55aa20, 0x35d99: 0x6c55ac20, 0x35d9a: 0x6c55ae20, 0x35d9b: 0x6c55b020, + 0x35d9c: 0x6c55b220, 0x35d9d: 0x6c55b420, 0x35d9e: 0x6c55b620, 0x35d9f: 0x6c55b820, + 0x35da0: 0x6c55ba20, 0x35da1: 0x6c55bc20, 0x35da2: 0x6c55be20, 0x35da3: 0x6c55c020, + 0x35da4: 0x6c55c220, 0x35da5: 0x6c55c420, 0x35da6: 0x6c55c620, 0x35da7: 0x6c55c820, + 0x35da8: 0x6c55ca20, 0x35da9: 0x6c55cc20, 0x35daa: 0x6c55ce20, 0x35dab: 0x6c55d020, + 0x35dac: 0x6c55d220, 0x35dad: 0x6c55d420, 0x35dae: 0x6c55d620, 0x35daf: 0x6c784c20, + 0x35db0: 0x6c784e20, 0x35db1: 0x6c785020, 0x35db2: 0x6c785220, 0x35db3: 0x6c785420, + 0x35db4: 0x6c785620, 0x35db5: 0x6c785820, 0x35db6: 0x6c785a20, 0x35db7: 0x6c785c20, + 0x35db8: 0x6c785e20, 0x35db9: 0x6c786020, 0x35dba: 0x6c786220, 0x35dbb: 0x6c786420, + 0x35dbc: 0x6c786620, 0x35dbd: 0x6c786820, 0x35dbe: 0x6c786a20, 0x35dbf: 0x6c786c20, + // Block 0xd77, offset 0x35dc0 + 0x35dc0: 0x6c786e20, 0x35dc1: 0x6c787020, 0x35dc2: 0x6c787220, 0x35dc3: 0x6c787420, + 0x35dc4: 0x6c787620, 0x35dc5: 0x6c787820, 0x35dc6: 0x6c787a20, 0x35dc7: 0x6c787c20, + 0x35dc8: 0x6c787e20, 0x35dc9: 0x6c788020, 0x35dca: 0x6c788220, 0x35dcb: 0x6c788420, + 0x35dcc: 0x6c788620, 0x35dcd: 0x6c788820, 0x35dce: 0x6c788a20, 0x35dcf: 0x6c788c20, + 0x35dd0: 0x6c788e20, 0x35dd1: 0x6c789020, 0x35dd2: 0x6c789220, 0x35dd3: 0x6c789420, + 0x35dd4: 0x6c789620, 0x35dd5: 0x6c789820, 0x35dd6: 0x6c789a20, 0x35dd7: 0x6c789c20, + 0x35dd8: 0x6c789e20, 0x35dd9: 0x6c78a020, 0x35dda: 0x6c78a220, 0x35ddb: 0x6c78a420, + 0x35ddc: 0x6c78a620, 0x35ddd: 0x6c78a820, 0x35dde: 0x6c78aa20, 0x35ddf: 0x6c78ac20, + 0x35de0: 0x6c78ae20, 0x35de1: 0x6c78b020, 0x35de2: 0x6c78b220, 0x35de3: 0x6c78b420, + 0x35de4: 0x6c78b620, 0x35de5: 0x6ca14020, 0x35de6: 0x6ca14220, 0x35de7: 0x6ca14420, + 0x35de8: 0x6ca14620, 0x35de9: 0x6ca14820, 0x35dea: 0x6ca14a20, 0x35deb: 0x6ca14c20, + 0x35dec: 0x6ca14e20, 0x35ded: 0x6ca15020, 0x35dee: 0x6ca15220, 0x35def: 0x6ca15420, + 0x35df0: 0x6ca15620, 0x35df1: 0x6ca15820, 0x35df2: 0x6ca15a20, 0x35df3: 0x6ca15c20, + 0x35df4: 0x6ca15e20, 0x35df5: 0x6ca16020, 0x35df6: 0x6ca16220, 0x35df7: 0x6ca16420, + 0x35df8: 0x6ca16620, 0x35df9: 0x6ca16820, 0x35dfa: 0x6ca16a20, 0x35dfb: 0x6ca16c20, + 0x35dfc: 0x6ca16e20, 0x35dfd: 0x6ca17020, 0x35dfe: 0x6ca17220, 0x35dff: 0x6ca17420, + // Block 0xd78, offset 0x35e00 + 0x35e00: 0x6ca17620, 0x35e01: 0x6ca17820, 0x35e02: 0x6ca17a20, 0x35e03: 0x6ca17c20, + 0x35e04: 0x6ca17e20, 0x35e05: 0x6ca18020, 0x35e06: 0x6ca18220, 0x35e07: 0x6ca18420, + 0x35e08: 0x6ca18620, 0x35e09: 0x6ca18820, 0x35e0a: 0x6ca18a20, 0x35e0b: 0x6ca18c20, + 0x35e0c: 0x6ca18e20, 0x35e0d: 0x6ca19020, 0x35e0e: 0x6ca19220, 0x35e0f: 0x6ca19420, + 0x35e10: 0x6ca19620, 0x35e11: 0x6ca19820, 0x35e12: 0x6ca19a20, 0x35e13: 0x6ca19c20, + 0x35e14: 0x6ca19e20, 0x35e15: 0x6ca1a020, 0x35e16: 0x6ca1a220, 0x35e17: 0x6ca1a420, + 0x35e18: 0x6ca1a620, 0x35e19: 0x6ca1a820, 0x35e1a: 0x6ca1aa20, 0x35e1b: 0x6ca1ac20, + 0x35e1c: 0x6ca1ae20, 0x35e1d: 0x6ca1b020, 0x35e1e: 0x6ca1b220, 0x35e1f: 0x6ca1b420, + 0x35e20: 0x6ca1b620, 0x35e21: 0x6ca1b820, 0x35e22: 0x6cce4820, 0x35e23: 0x6cce4a20, + 0x35e24: 0x6cce4c20, 0x35e25: 0x6cce4e20, 0x35e26: 0x6cce5020, 0x35e27: 0x6cce5220, + 0x35e28: 0x6cce5420, 0x35e29: 0x6cce5620, 0x35e2a: 0x6cce5820, 0x35e2b: 0x6cce5a20, + 0x35e2c: 0x6cce5c20, 0x35e2d: 0x6cce5e20, 0x35e2e: 0x6cce6020, 0x35e2f: 0x6cce6220, + 0x35e30: 0x6cce6420, 0x35e31: 0x6cce6620, 0x35e32: 0x6cce6820, 0x35e33: 0x6cce6a20, + 0x35e34: 0x6cce6c20, 0x35e35: 0x6cce6e20, 0x35e36: 0x6cce7020, 0x35e37: 0x6cce7220, + 0x35e38: 0x6cce7420, 0x35e39: 0x6cce7620, 0x35e3a: 0x6cce7820, 0x35e3b: 0x6cce7a20, + 0x35e3c: 0x6cce7c20, 0x35e3d: 0x6cce7e20, 0x35e3e: 0x6cce8020, 0x35e3f: 0x6cce8220, + // Block 0xd79, offset 0x35e40 + 0x35e40: 0x6cce8420, 0x35e41: 0x6cce8620, 0x35e42: 0x6cce8820, 0x35e43: 0x6cce8a20, + 0x35e44: 0x6cce8c20, 0x35e45: 0x6cce8e20, 0x35e46: 0x6cce9020, 0x35e47: 0x6cce9220, + 0x35e48: 0x6cce9420, 0x35e49: 0x6cce9620, 0x35e4a: 0x6cce9820, 0x35e4b: 0x6cce9a20, + 0x35e4c: 0x6cce9c20, 0x35e4d: 0x6cce9e20, 0x35e4e: 0x6ccea020, 0x35e4f: 0x6ccea220, + 0x35e50: 0x6ccea420, 0x35e51: 0x6ccea620, 0x35e52: 0x6ccea820, 0x35e53: 0x6cceaa20, + 0x35e54: 0x6cceac20, 0x35e55: 0x6cceae20, 0x35e56: 0x6cceb020, 0x35e57: 0x6cceb220, + 0x35e58: 0x6cceb420, 0x35e59: 0x6cceb620, 0x35e5a: 0x6cceb820, 0x35e5b: 0x6cceba20, + 0x35e5c: 0x6ccebc20, 0x35e5d: 0x6ccebe20, 0x35e5e: 0x6ccec020, 0x35e5f: 0x6ccec220, + 0x35e60: 0x6ccec420, 0x35e61: 0x6ccec620, 0x35e62: 0x6ccec820, 0x35e63: 0x6cceca20, + 0x35e64: 0x6ccecc20, 0x35e65: 0x6ccece20, 0x35e66: 0x6cced020, 0x35e67: 0x6cced220, + 0x35e68: 0x6cced420, 0x35e69: 0x6cced620, 0x35e6a: 0x6cced820, 0x35e6b: 0x6cceda20, + 0x35e6c: 0x6ccedc20, 0x35e6d: 0x6ccede20, 0x35e6e: 0x6ccee020, 0x35e6f: 0x6ccee220, + 0x35e70: 0x6ccee420, 0x35e71: 0x6ccee620, 0x35e72: 0x6cfc6820, 0x35e73: 0x6cfc6a20, + 0x35e74: 0x6cfc6c20, 0x35e75: 0x6cfc6e20, 0x35e76: 0x6cfc7020, 0x35e77: 0x6cfc7220, + 0x35e78: 0x6cfc7420, 0x35e79: 0x6cfc7620, 0x35e7a: 0x6cfc7820, 0x35e7b: 0x6cfc7a20, + 0x35e7c: 0x6cfc7c20, 0x35e7d: 0x6cfc7e20, 0x35e7e: 0x6cfc8020, 0x35e7f: 0x6cfc8220, + // Block 0xd7a, offset 0x35e80 + 0x35e80: 0x6cfc8420, 0x35e81: 0x6cfc8620, 0x35e82: 0x6cfc8820, 0x35e83: 0x6cfc8a20, + 0x35e84: 0x6cfc8c20, 0x35e85: 0x6cfc8e20, 0x35e86: 0x6cfc9020, 0x35e87: 0x6cfc9220, + 0x35e88: 0x6cfc9420, 0x35e89: 0x6cfc9620, 0x35e8a: 0x6cfc9820, 0x35e8b: 0x6cfc9a20, + 0x35e8c: 0x6cfc9c20, 0x35e8d: 0x6cfc9e20, 0x35e8e: 0x6cfca020, 0x35e8f: 0x6cfca220, + 0x35e90: 0x6cfca420, 0x35e91: 0x6cfca620, 0x35e92: 0x6cfca820, 0x35e93: 0x6cfcaa20, + 0x35e94: 0x6cfcac20, 0x35e95: 0x6cfcae20, 0x35e96: 0x6cfcb020, 0x35e97: 0x6cfcb220, + 0x35e98: 0x6cfcb420, 0x35e99: 0x6cfcb620, 0x35e9a: 0x6cfcb820, 0x35e9b: 0x6cfcba20, + 0x35e9c: 0x6cfcbc20, 0x35e9d: 0x6cfcbe20, 0x35e9e: 0x6cfcc020, 0x35e9f: 0x6cfcc220, + 0x35ea0: 0x6cfcc420, 0x35ea1: 0x6cfcc620, 0x35ea2: 0x6cfcc820, 0x35ea3: 0x6cfcca20, + 0x35ea4: 0x6cfccc20, 0x35ea5: 0x6cfcce20, 0x35ea6: 0x6cfcd020, 0x35ea7: 0x6cfcd220, + 0x35ea8: 0x6cfcd420, 0x35ea9: 0x6cfcd620, 0x35eaa: 0x6cfcd820, 0x35eab: 0x6cfcda20, + 0x35eac: 0x6cfcdc20, 0x35ead: 0x6cfcde20, 0x35eae: 0x6cfce020, 0x35eaf: 0x6cfce220, + 0x35eb0: 0x6cfce420, 0x35eb1: 0x6cfce620, 0x35eb2: 0x6cfce820, 0x35eb3: 0x6cb74620, + 0x35eb4: 0x6cfcea20, 0x35eb5: 0x6cfcec20, 0x35eb6: 0x6cfcee20, 0x35eb7: 0x6cfcf020, + 0x35eb8: 0x6cfcf220, 0x35eb9: 0x6cfcf420, 0x35eba: 0x6cfcf620, 0x35ebb: 0x6cfcf820, + 0x35ebc: 0x6cfcfa20, 0x35ebd: 0x6cfcfc20, 0x35ebe: 0x6cfcfe20, 0x35ebf: 0x6cfd0020, + // Block 0xd7b, offset 0x35ec0 + 0x35ec0: 0x6cfd0220, 0x35ec1: 0x6cfd0420, 0x35ec2: 0x6cfd0620, 0x35ec3: 0x6cfd0820, + 0x35ec4: 0x6cfd0a20, 0x35ec5: 0x6cfd0c20, 0x35ec6: 0x6cfd0e20, 0x35ec7: 0x6d2b2c20, + 0x35ec8: 0x6d2b2e20, 0x35ec9: 0x6d2b3020, 0x35eca: 0x6d2b3220, 0x35ecb: 0x6d2b3420, + 0x35ecc: 0x6d2b3620, 0x35ecd: 0x6d2b3820, 0x35ece: 0x6d2b3a20, 0x35ecf: 0x6d2b3c20, + 0x35ed0: 0x6d2b3e20, 0x35ed1: 0x6d2b4020, 0x35ed2: 0x6d2b4220, 0x35ed3: 0x6d2b4420, + 0x35ed4: 0x6d2b4620, 0x35ed5: 0x6d2b4820, 0x35ed6: 0x6d2b4a20, 0x35ed7: 0x6d2b4c20, + 0x35ed8: 0x6d2b4e20, 0x35ed9: 0x6d2b5020, 0x35eda: 0x6d2b5220, 0x35edb: 0x6d2b5420, + 0x35edc: 0x6d2b5620, 0x35edd: 0x6d2b5820, 0x35ede: 0x6d2b5a20, 0x35edf: 0x6d2b5c20, + 0x35ee0: 0x6d2b5e20, 0x35ee1: 0x6d2b6020, 0x35ee2: 0x6d2b6220, 0x35ee3: 0x6d2b6420, + 0x35ee4: 0x6d2b6620, 0x35ee5: 0x6d2b6820, 0x35ee6: 0x6d2b6a20, 0x35ee7: 0x6d2b6c20, + 0x35ee8: 0x6d2b6e20, 0x35ee9: 0x6d2b7020, 0x35eea: 0x6d2b7220, 0x35eeb: 0x6d2b7420, + 0x35eec: 0x6d2b7620, 0x35eed: 0x6d2b7820, 0x35eee: 0x6d2b7a20, 0x35eef: 0x6d2b7c20, + 0x35ef0: 0x6d2b7e20, 0x35ef1: 0x6d2b8020, 0x35ef2: 0x6d585a20, 0x35ef3: 0x6d2b8220, + 0x35ef4: 0x6d2b8420, 0x35ef5: 0x6d2b8620, 0x35ef6: 0x6d2b8820, 0x35ef7: 0x6d2b8a20, + 0x35ef8: 0x6d2b8c20, 0x35ef9: 0x6d2b8e20, 0x35efa: 0x6d2b9020, 0x35efb: 0x6d2b9220, + 0x35efc: 0x6d2b9420, 0x35efd: 0x6d2b9620, 0x35efe: 0x6d2b9820, 0x35eff: 0x6d2b9a20, + // Block 0xd7c, offset 0x35f00 + 0x35f00: 0x6d2b9c20, 0x35f01: 0x6d2b9e20, 0x35f02: 0x6d2ba020, 0x35f03: 0x6d2ba220, + 0x35f04: 0x6d2ba420, 0x35f05: 0x6d2ba620, 0x35f06: 0x6d2ba820, 0x35f07: 0x6d2baa20, + 0x35f08: 0x6d2bac20, 0x35f09: 0x6d2bae20, 0x35f0a: 0x6d2bb020, 0x35f0b: 0x6d2bb220, + 0x35f0c: 0x6d2bb420, 0x35f0d: 0x6d2bb620, 0x35f0e: 0x6d2bb820, 0x35f0f: 0x6cfd1020, + 0x35f10: 0x6d585c20, 0x35f11: 0x6d585e20, 0x35f12: 0x6d586020, 0x35f13: 0x6d586220, + 0x35f14: 0x6d586420, 0x35f15: 0x6d586620, 0x35f16: 0x6d586820, 0x35f17: 0x6d586a20, + 0x35f18: 0x6d586c20, 0x35f19: 0x6d586e20, 0x35f1a: 0x6d587020, 0x35f1b: 0x6d587220, + 0x35f1c: 0x6d587420, 0x35f1d: 0x6d587620, 0x35f1e: 0x6d587820, 0x35f1f: 0x6d587a20, + 0x35f20: 0x6d587c20, 0x35f21: 0x6d587e20, 0x35f22: 0x6d588020, 0x35f23: 0x6d588220, + 0x35f24: 0x6d588420, 0x35f25: 0x6d588620, 0x35f26: 0x6d588820, 0x35f27: 0x6d588a20, + 0x35f28: 0x6d588c20, 0x35f29: 0x6d836620, 0x35f2a: 0x6d588e20, 0x35f2b: 0x6d589020, + 0x35f2c: 0x6d589220, 0x35f2d: 0x6d589420, 0x35f2e: 0x6d589620, 0x35f2f: 0x6d589820, + 0x35f30: 0x6d589a20, 0x35f31: 0x6d589c20, 0x35f32: 0x6d589e20, 0x35f33: 0x6d58a020, + 0x35f34: 0x6d58a220, 0x35f35: 0x6d58a420, 0x35f36: 0x6d58a620, 0x35f37: 0x6d58a820, + 0x35f38: 0x6d58aa20, 0x35f39: 0x6d58ac20, 0x35f3a: 0x6d58ae20, 0x35f3b: 0x6d58b020, + 0x35f3c: 0x6d58b220, 0x35f3d: 0x6d58b420, 0x35f3e: 0x6d58b620, 0x35f3f: 0x6d58b820, + // Block 0xd7d, offset 0x35f40 + 0x35f40: 0x6d385220, 0x35f41: 0x6d58ba20, 0x35f42: 0x6d705e20, 0x35f43: 0x6d58bc20, + 0x35f44: 0x6d58be20, 0x35f45: 0x6d58c020, 0x35f46: 0x6d58c220, 0x35f47: 0x6d58c420, + 0x35f48: 0x6d58c620, 0x35f49: 0x6d58c820, 0x35f4a: 0x6d58ca20, 0x35f4b: 0x6d58cc20, + 0x35f4c: 0x6d58ce20, 0x35f4d: 0x6d58d020, 0x35f4e: 0x6d58d220, 0x35f4f: 0x6d58d420, + 0x35f50: 0x6d58d620, 0x35f51: 0x6d58d820, 0x35f52: 0x6d58da20, 0x35f53: 0x6d58dc20, + 0x35f54: 0x6d58de20, 0x35f55: 0x6d58e020, 0x35f56: 0x6d58e220, 0x35f57: 0x6d58e420, + 0x35f58: 0x6d58e620, 0x35f59: 0x6d58e820, 0x35f5a: 0x6d58ea20, 0x35f5b: 0x6d58ec20, + 0x35f5c: 0x6d58ee20, 0x35f5d: 0x6d836820, 0x35f5e: 0x6d836a20, 0x35f5f: 0x6d836c20, + 0x35f60: 0x6d836e20, 0x35f61: 0x6d837020, 0x35f62: 0x6d837220, 0x35f63: 0x6d837420, + 0x35f64: 0x6d837620, 0x35f65: 0x6d837820, 0x35f66: 0x6d837a20, 0x35f67: 0x6d837c20, + 0x35f68: 0x6d837e20, 0x35f69: 0x6d838020, 0x35f6a: 0x6d838220, 0x35f6b: 0x6d838420, + 0x35f6c: 0x6d838620, 0x35f6d: 0x6d838820, 0x35f6e: 0x6d838a20, 0x35f6f: 0x6d838c20, + 0x35f70: 0x6d838e20, 0x35f71: 0x6d839020, 0x35f72: 0x6d839220, 0x35f73: 0x6d839420, + 0x35f74: 0x6d839620, 0x35f75: 0x6d839820, 0x35f76: 0x6d839a20, 0x35f77: 0x6d839c20, + 0x35f78: 0x6d839e20, 0x35f79: 0x6d83a020, 0x35f7a: 0x6d83a220, 0x35f7b: 0x6d83a420, + 0x35f7c: 0x6d83a620, 0x35f7d: 0x6d83a820, 0x35f7e: 0x6d83aa20, 0x35f7f: 0x6d83ac20, + // Block 0xd7e, offset 0x35f80 + 0x35f80: 0x6d83ae20, 0x35f81: 0x6d83b020, 0x35f82: 0x6d83b220, 0x35f83: 0x6d83b420, + 0x35f84: 0x6d83b620, 0x35f85: 0x6d83b820, 0x35f86: 0x6d83ba20, 0x35f87: 0x6d83bc20, + 0x35f88: 0x6d83be20, 0x35f89: 0x6d83c020, 0x35f8a: 0x6d83c220, 0x35f8b: 0x6d83c420, + 0x35f8c: 0x6d83c620, 0x35f8d: 0x6d83c820, 0x35f8e: 0x6d83ca20, 0x35f8f: 0x6d83cc20, + 0x35f90: 0x6d83ce20, 0x35f91: 0x6d83d020, 0x35f92: 0x6d83d220, 0x35f93: 0x6d83d420, + 0x35f94: 0x6d83d620, 0x35f95: 0x6d83d820, 0x35f96: 0x6d83da20, 0x35f97: 0x6d83dc20, + 0x35f98: 0x6d83de20, 0x35f99: 0x6d83e020, 0x35f9a: 0x6d83e220, 0x35f9b: 0x6d83e420, + 0x35f9c: 0x6d83e620, 0x35f9d: 0x6d83e820, 0x35f9e: 0x6d83ea20, 0x35f9f: 0x6d83ec20, + 0x35fa0: 0x6d793420, 0x35fa1: 0x6d83ee20, 0x35fa2: 0x6d83f020, 0x35fa3: 0x6d83f220, + 0x35fa4: 0x6d83f420, 0x35fa5: 0x6d83f620, 0x35fa6: 0x6d83f820, 0x35fa7: 0x6d83fa20, + 0x35fa8: 0x6d83fc20, 0x35fa9: 0x6d83fe20, 0x35faa: 0x6d840020, 0x35fab: 0x6d840220, + 0x35fac: 0x6d840420, 0x35fad: 0x6d840620, 0x35fae: 0x6d840820, 0x35faf: 0x6d840a20, + 0x35fb0: 0x6d840c20, 0x35fb1: 0x6d840e20, 0x35fb2: 0x6d841020, 0x35fb3: 0x6d841220, + 0x35fb4: 0x6d841420, 0x35fb5: 0x6da8ae20, 0x35fb6: 0x6da8b020, 0x35fb7: 0x6da8b220, + 0x35fb8: 0x6da8b420, 0x35fb9: 0x6da8b620, 0x35fba: 0x6da8b820, 0x35fbb: 0x6da8ba20, + 0x35fbc: 0x6da8bc20, 0x35fbd: 0x6da8be20, 0x35fbe: 0x6da8c020, 0x35fbf: 0x6da8c220, + // Block 0xd7f, offset 0x35fc0 + 0x35fc0: 0x6da8c420, 0x35fc1: 0x6da8c620, 0x35fc2: 0x6da8c820, 0x35fc3: 0x6da8ca20, + 0x35fc4: 0x6da8cc20, 0x35fc5: 0x6da8ce20, 0x35fc6: 0x6da8d020, 0x35fc7: 0x6da8d220, + 0x35fc8: 0x6da8d420, 0x35fc9: 0x6da8d620, 0x35fca: 0x6da8d820, 0x35fcb: 0x6da8da20, + 0x35fcc: 0x6da8dc20, 0x35fcd: 0x6da8de20, 0x35fce: 0x6da8e020, 0x35fcf: 0x6da8e220, + 0x35fd0: 0x6da8e420, 0x35fd1: 0x6da8e620, 0x35fd2: 0x6da8e820, 0x35fd3: 0x6da8ea20, + 0x35fd4: 0x6da8ec20, 0x35fd5: 0x6da8ee20, 0x35fd6: 0x6da8f020, 0x35fd7: 0x6da8f220, + 0x35fd8: 0x6da8f420, 0x35fd9: 0x6da8f620, 0x35fda: 0x6da8f820, 0x35fdb: 0x6da8fa20, + 0x35fdc: 0x6da8fc20, 0x35fdd: 0x6da8fe20, 0x35fde: 0x6da90020, 0x35fdf: 0x6da90220, + 0x35fe0: 0x6da90420, 0x35fe1: 0x6da90620, 0x35fe2: 0x6da90820, 0x35fe3: 0x6da90a20, + 0x35fe4: 0x6dc9d420, 0x35fe5: 0x6dc9d620, 0x35fe6: 0x6dc9d820, 0x35fe7: 0x6dc9da20, + 0x35fe8: 0x6dc9dc20, 0x35fe9: 0x6dc9de20, 0x35fea: 0x6dc9e020, 0x35feb: 0x6dc9e220, + 0x35fec: 0x6dc9e420, 0x35fed: 0x6dc9e620, 0x35fee: 0x6dc9e820, 0x35fef: 0x6dc9ea20, + 0x35ff0: 0x6dc9ec20, 0x35ff1: 0x6dc9ee20, 0x35ff2: 0x6dc9f020, 0x35ff3: 0x6dc9f220, + 0x35ff4: 0x6dc9f420, 0x35ff5: 0x6dc9f620, 0x35ff6: 0x6dc9f820, 0x35ff7: 0x6dc9fa20, + 0x35ff8: 0x6dc9fc20, 0x35ff9: 0x6dc9fe20, 0x35ffa: 0x6dca0020, 0x35ffb: 0x6dca0220, + 0x35ffc: 0x6dca0420, 0x35ffd: 0x6dca0620, 0x35ffe: 0x6dca0820, 0x35fff: 0x6dca0a20, + // Block 0xd80, offset 0x36000 + 0x36000: 0x6dca0c20, 0x36001: 0x6dca0e20, 0x36002: 0x6dca1020, 0x36003: 0x6dd07420, + 0x36004: 0x6dca1220, 0x36005: 0x6dca1420, 0x36006: 0x6dca1620, 0x36007: 0x6dca1820, + 0x36008: 0x6dca1a20, 0x36009: 0x6dca1c20, 0x3600a: 0x6dca1e20, 0x3600b: 0x6dca2020, + 0x3600c: 0x6dca2220, 0x3600d: 0x6dca2420, 0x3600e: 0x6dca2620, 0x3600f: 0x6dca2820, + 0x36010: 0x6dca2a20, 0x36011: 0x6dca2c20, 0x36012: 0x6de58e20, 0x36013: 0x6de59020, + 0x36014: 0x6de59220, 0x36015: 0x6de59420, 0x36016: 0x6de59620, 0x36017: 0x6de59820, + 0x36018: 0x6de59a20, 0x36019: 0x6de59c20, 0x3601a: 0x6de59e20, 0x3601b: 0x6de5a020, + 0x3601c: 0x6de5a220, 0x3601d: 0x6de5a420, 0x3601e: 0x6de5a620, 0x3601f: 0x6de5a820, + 0x36020: 0x6de5aa20, 0x36021: 0x6de5ac20, 0x36022: 0x6de5ae20, 0x36023: 0x6de5b020, + 0x36024: 0x6de5b220, 0x36025: 0x6de5b420, 0x36026: 0x6de5b620, 0x36027: 0x6de5b820, + 0x36028: 0x6de5ba20, 0x36029: 0x6de5bc20, 0x3602a: 0x6de5be20, 0x3602b: 0x6de5c020, + 0x3602c: 0x6de5c220, 0x3602d: 0x6de5c420, 0x3602e: 0x6de5c620, 0x3602f: 0x6de5c820, + 0x36030: 0x6de5ca20, 0x36031: 0x6de5cc20, 0x36032: 0x6de5ce20, 0x36033: 0x6dfc6620, + 0x36034: 0x6dfc6820, 0x36035: 0x6dfc6a20, 0x36036: 0x6dfc6c20, 0x36037: 0x6dfc6e20, + 0x36038: 0x6dfc7020, 0x36039: 0x6dfc7220, 0x3603a: 0x6dfc7420, 0x3603b: 0x6dfc7620, + 0x3603c: 0x6dfc7820, 0x3603d: 0x6dfc7a20, 0x3603e: 0x6dfc7c20, 0x3603f: 0x6dfc7e20, + // Block 0xd81, offset 0x36040 + 0x36040: 0x6dfc8020, 0x36041: 0x6dfc8220, 0x36042: 0x6dfc8420, 0x36043: 0x6dfc8620, + 0x36044: 0x6dfc8820, 0x36045: 0x6dfc8a20, 0x36046: 0x6dfc8c20, 0x36047: 0x6dfc8e20, + 0x36048: 0x6dfc9020, 0x36049: 0x6dfc9220, 0x3604a: 0x6dfc9420, 0x3604b: 0x6dfc9620, + 0x3604c: 0x6dfc9820, 0x3604d: 0x6dfc9a20, 0x3604e: 0x6dfc9c20, 0x3604f: 0x6dfc9e20, + 0x36050: 0x6dfca020, 0x36051: 0x6dfca220, 0x36052: 0x6dfca420, 0x36053: 0x6dfca620, + 0x36054: 0x6dfca820, 0x36055: 0x6dfcaa20, 0x36056: 0x6dfcac20, 0x36057: 0x6dfcae20, + 0x36058: 0x6dfcb020, 0x36059: 0x6dfcb220, 0x3605a: 0x6dfcb420, 0x3605b: 0x6dfcb620, + 0x3605c: 0x6dfcb820, 0x3605d: 0x6dfcba20, 0x3605e: 0x6dfcbc20, 0x3605f: 0x6dfcbe20, + 0x36060: 0x6dfcc020, 0x36061: 0x6e0f8420, 0x36062: 0x6e0f8620, 0x36063: 0x6e0f8820, + 0x36064: 0x6e0f8a20, 0x36065: 0x6e0f8c20, 0x36066: 0x6e0f8e20, 0x36067: 0x6e0f9020, + 0x36068: 0x6dfcc220, 0x36069: 0x6e1e7820, 0x3606a: 0x6e0f9220, 0x3606b: 0x6e0f9420, + 0x3606c: 0x6e0f9620, 0x3606d: 0x6e0f9820, 0x3606e: 0x6e0f9a20, 0x3606f: 0x6e0f9c20, + 0x36070: 0x6e0f9e20, 0x36071: 0x6e0fa020, 0x36072: 0x6e0fa220, 0x36073: 0x6e0fa420, + 0x36074: 0x6e0fa620, 0x36075: 0x6e0fa820, 0x36076: 0x6e0faa20, 0x36077: 0x6e0fac20, + 0x36078: 0x6e0fae20, 0x36079: 0x6e0fb020, 0x3607a: 0x6e1e7a20, 0x3607b: 0x6e1e7c20, + 0x3607c: 0x6e29de20, 0x3607d: 0x6e1e7e20, 0x3607e: 0x6e1e8020, 0x3607f: 0x6e1e8220, + // Block 0xd82, offset 0x36080 + 0x36080: 0x6e1e8420, 0x36081: 0x6e1e8620, 0x36082: 0x6e1e8820, 0x36083: 0x6e1e8a20, + 0x36084: 0x6e1e8c20, 0x36085: 0x6e1e8e20, 0x36086: 0x6e1e9020, 0x36087: 0x6e1e9220, + 0x36088: 0x6e29e020, 0x36089: 0x6e29e220, 0x3608a: 0x6e29e420, 0x3608b: 0x6e29e620, + 0x3608c: 0x6e29e820, 0x3608d: 0x6e29ea20, 0x3608e: 0x6e29ec20, 0x3608f: 0x6e2b4a20, + 0x36090: 0x6e29ee20, 0x36091: 0x6e29f020, 0x36092: 0x6e29f220, 0x36093: 0x6e29f420, + 0x36094: 0x6e29f620, 0x36095: 0x6e29f820, 0x36096: 0x6e29fa20, 0x36097: 0x6e32c220, + 0x36098: 0x6e32c420, 0x36099: 0x6e32c620, 0x3609a: 0x6e32c820, 0x3609b: 0x6e32ca20, + 0x3609c: 0x6e38f820, 0x3609d: 0x6e38fa20, 0x3609e: 0x6e38fc20, 0x3609f: 0x6e33dc20, + 0x360a0: 0x6e38fe20, 0x360a1: 0x6e390020, 0x360a2: 0x6e390220, 0x360a3: 0x6e390420, + 0x360a4: 0x6e3d6820, 0x360a5: 0x6e3d6a20, 0x360a6: 0x6e406c20, 0x360a7: 0x6e406e20, + 0x360a8: 0x6e407020, 0x360a9: 0x6e407220, 0x360aa: 0x6e42b820, 0x360ab: 0x6e443620, + 0x360ac: 0x6e42ba20, 0x360ad: 0x6e452420, 0x360ae: 0x6e468420, 0x360af: 0x6c04da20, + 0x360b0: 0x6c04dc20, 0x360b1: 0x6c09d020, 0x360b2: 0x6c23d020, 0x360b3: 0x6c23d220, + 0x360b4: 0x6c23d420, 0x360b5: 0x6c23d620, 0x360b6: 0x6c3a2c20, 0x360b7: 0x6c3a2e20, + 0x360b8: 0x6c3a3020, 0x360b9: 0x6c3a3220, 0x360ba: 0x6c3a3420, 0x360bb: 0x6c3a3620, + 0x360bc: 0x6c3a3820, 0x360bd: 0x6c55f420, 0x360be: 0x6c55f620, 0x360bf: 0x6c55f820, + // Block 0xd83, offset 0x360c0 + 0x360c0: 0x6c55fa20, 0x360c1: 0x6c55fc20, 0x360c2: 0x6c55fe20, 0x360c3: 0x6c560020, + 0x360c4: 0x6c560220, 0x360c5: 0x6c560420, 0x360c6: 0x6c560620, 0x360c7: 0x6c560820, + 0x360c8: 0x6c560a20, 0x360c9: 0x6c560c20, 0x360ca: 0x6c560e20, 0x360cb: 0x6c561020, + 0x360cc: 0x6c78cc20, 0x360cd: 0x6c78ce20, 0x360ce: 0x6c78d020, 0x360cf: 0x6c78d220, + 0x360d0: 0x6ca1d020, 0x360d1: 0x6ca1d220, 0x360d2: 0x6ca1d420, 0x360d3: 0x6ca1d620, + 0x360d4: 0x6ccf0c20, 0x360d5: 0x6ccf0e20, 0x360d6: 0x6ccf1020, 0x360d7: 0x6cbc6220, + 0x360d8: 0x6ccf1220, 0x360d9: 0x6ccf1420, 0x360da: 0x6ccf1620, 0x360db: 0x6ccf1820, + 0x360dc: 0x6cfd2e20, 0x360dd: 0x6cfd3020, 0x360de: 0x6cfd3220, 0x360df: 0x6cfd3420, + 0x360e0: 0x6cfd3620, 0x360e1: 0x6cfd3820, 0x360e2: 0x6d2bde20, 0x360e3: 0x6d2be020, + 0x360e4: 0x6d2be220, 0x360e5: 0x6d2be420, 0x360e6: 0x6d2be620, 0x360e7: 0x6d590620, + 0x360e8: 0x6d590820, 0x360e9: 0x6d590a20, 0x360ea: 0x6d590c20, 0x360eb: 0x6d590e20, + 0x360ec: 0x6d591020, 0x360ed: 0x6d591220, 0x360ee: 0x6d842a20, 0x360ef: 0x6d842c20, + 0x360f0: 0x6d842e20, 0x360f1: 0x6d843020, 0x360f2: 0x6da91c20, 0x360f3: 0x6da91e20, + 0x360f4: 0x6da92020, 0x360f5: 0x6da92220, 0x360f6: 0x6da92420, 0x360f7: 0x6da92620, + 0x360f8: 0x6da92820, 0x360f9: 0x6dca3a20, 0x360fa: 0x6de5d420, 0x360fb: 0x6dca3c20, + 0x360fc: 0x6da92a20, 0x360fd: 0x6dca3e20, 0x360fe: 0x6dca4020, 0x360ff: 0x6de5d620, + // Block 0xd84, offset 0x36100 + 0x36100: 0x6de5d820, 0x36101: 0x6de9a820, 0x36102: 0x6dfcca20, 0x36103: 0x6dfccc20, + 0x36104: 0x6dfcce20, 0x36105: 0x6dfcd020, 0x36106: 0x6dfcd220, 0x36107: 0x6e0fb420, + 0x36108: 0x6e29fe20, 0x36109: 0x6e2a0020, 0x3610a: 0x6e2a0220, 0x3610b: 0x6e32ce20, + 0x3610c: 0x6e390a20, 0x3610d: 0x6e390c20, 0x3610e: 0x6c23da20, 0x3610f: 0x6c23dc20, + 0x36110: 0x6c3a3c20, 0x36111: 0x6c3a3e20, 0x36112: 0x6c561620, 0x36113: 0x6c78d820, + 0x36114: 0x6c78da20, 0x36115: 0x6ca1dc20, 0x36116: 0x6ccf2220, 0x36117: 0x6ccf2420, + 0x36118: 0x6cfd4220, 0x36119: 0x6d2be820, 0x3611a: 0x6d2bea20, 0x3611b: 0x6d843220, + 0x3611c: 0x6c09d220, 0x3611d: 0x6c3a4220, 0x3611e: 0x6c561a20, 0x3611f: 0x6c561c20, + 0x36120: 0x6c78de20, 0x36121: 0x6c78e020, 0x36122: 0x6ca1e220, 0x36123: 0x6ccf2620, + 0x36124: 0x6cfd4420, 0x36125: 0x6cfd4620, 0x36126: 0x6d591820, 0x36127: 0x6d591a20, + 0x36128: 0x6d591c20, 0x36129: 0x6d843420, 0x3612a: 0x6c04e620, 0x3612b: 0x6c09d420, + 0x3612c: 0x6c09d620, 0x3612d: 0x6c137c20, 0x3612e: 0x6c23de20, 0x3612f: 0x6c3a4820, + 0x36130: 0x6c3a4a20, 0x36131: 0x6c3a4c20, 0x36132: 0x6c562220, 0x36133: 0x6c562420, + 0x36134: 0x6c562620, 0x36135: 0x6c562820, 0x36136: 0x6c78e420, 0x36137: 0x6c78e620, + 0x36138: 0x6c78e820, 0x36139: 0x6c78ea20, 0x3613a: 0x6c78ec20, 0x3613b: 0x6ca1e420, + 0x3613c: 0x6ca1e620, 0x3613d: 0x6ca1e820, 0x3613e: 0x6ca1ea20, 0x3613f: 0x6ca1ec20, + // Block 0xd85, offset 0x36140 + 0x36140: 0x6ca1ee20, 0x36141: 0x6ca1f020, 0x36142: 0x6ca1f220, 0x36143: 0x6ca1f420, + 0x36144: 0x6ccf2a20, 0x36145: 0x6ccf2c20, 0x36146: 0x6ccf2e20, 0x36147: 0x6ccf3020, + 0x36148: 0x6ccf3220, 0x36149: 0x6ccf3420, 0x3614a: 0x6ccf3620, 0x3614b: 0x6ccf3820, + 0x3614c: 0x6cfd4a20, 0x3614d: 0x6cfd4c20, 0x3614e: 0x6cfd4e20, 0x3614f: 0x6d2bf220, + 0x36150: 0x6d2bf420, 0x36151: 0x6d2bf620, 0x36152: 0x6d2bf820, 0x36153: 0x6d592020, + 0x36154: 0x6d592220, 0x36155: 0x6d592420, 0x36156: 0x6d843620, 0x36157: 0x6d843820, + 0x36158: 0x6d843a20, 0x36159: 0x6d843c20, 0x3615a: 0x6d843e20, 0x3615b: 0x6d844020, + 0x3615c: 0x6da93420, 0x3615d: 0x6da93620, 0x3615e: 0x6da93820, 0x3615f: 0x6da93a20, + 0x36160: 0x6de5de20, 0x36161: 0x6de5e020, 0x36162: 0x6dfcd420, 0x36163: 0x6e1e9820, + 0x36164: 0x6e2a0420, 0x36165: 0x6e407620, 0x36166: 0x6e42bc20, 0x36167: 0x6e42be20, + 0x36168: 0x6c09d820, 0x36169: 0x6c23e020, 0x3616a: 0x6c23e220, 0x3616b: 0x6c23e420, + 0x3616c: 0x6c3a5420, 0x3616d: 0x6c3a5620, 0x3616e: 0x6c3a5820, 0x3616f: 0x6c3a5a20, + 0x36170: 0x6c3a5c20, 0x36171: 0x6c562e20, 0x36172: 0x6c563020, 0x36173: 0x6c563220, + 0x36174: 0x6c563420, 0x36175: 0x6c563620, 0x36176: 0x6c563820, 0x36177: 0x6c563a20, + 0x36178: 0x6c563c20, 0x36179: 0x6c563e20, 0x3617a: 0x6c78f420, 0x3617b: 0x6c78f620, + 0x3617c: 0x6c78f820, 0x3617d: 0x6c78fa20, 0x3617e: 0x6c78fc20, 0x3617f: 0x6c78fe20, + // Block 0xd86, offset 0x36180 + 0x36180: 0x6ca1f820, 0x36181: 0x6ca1fa20, 0x36182: 0x6ca1fc20, 0x36183: 0x6ca1fe20, + 0x36184: 0x6ca20020, 0x36185: 0x6ca20220, 0x36186: 0x6ca20420, 0x36187: 0x6ccf4220, + 0x36188: 0x6ccf4420, 0x36189: 0x6ccf4620, 0x3618a: 0x6ccf4820, 0x3618b: 0x6ccf4a20, + 0x3618c: 0x6ccf4c20, 0x3618d: 0x6ccf4e20, 0x3618e: 0x6ccf5020, 0x3618f: 0x6ccf5220, + 0x36190: 0x6ccf5420, 0x36191: 0x6ccf5620, 0x36192: 0x6ccf5820, 0x36193: 0x6ccf5a20, + 0x36194: 0x6ccf5c20, 0x36195: 0x6ccf5e20, 0x36196: 0x6ccf6020, 0x36197: 0x6ccf6220, + 0x36198: 0x6cfd5a20, 0x36199: 0x6cfd5c20, 0x3619a: 0x6cfd5e20, 0x3619b: 0x6cfd6020, + 0x3619c: 0x6cfd6220, 0x3619d: 0x6cfd6420, 0x3619e: 0x6cfd6620, 0x3619f: 0x6cfd6820, + 0x361a0: 0x6cfd6a20, 0x361a1: 0x6cfd6c20, 0x361a2: 0x6d2c0020, 0x361a3: 0x6d2c0220, + 0x361a4: 0x6d2c0420, 0x361a5: 0x6d2c0620, 0x361a6: 0x6d2c0820, 0x361a7: 0x6d2c0a20, + 0x361a8: 0x6d592e20, 0x361a9: 0x6d593020, 0x361aa: 0x6d593220, 0x361ab: 0x6d593420, + 0x361ac: 0x6d593620, 0x361ad: 0x6d593820, 0x361ae: 0x6d593a20, 0x361af: 0x6d593c20, + 0x361b0: 0x6d593e20, 0x361b1: 0x6d594020, 0x361b2: 0x6d594220, 0x361b3: 0x6d844220, + 0x361b4: 0x6d844420, 0x361b5: 0x6d844620, 0x361b6: 0x6d844820, 0x361b7: 0x6d844a20, + 0x361b8: 0x6d844c20, 0x361b9: 0x6d844e20, 0x361ba: 0x6da93e20, 0x361bb: 0x6da94020, + 0x361bc: 0x6da94220, 0x361bd: 0x6da94420, 0x361be: 0x6da94620, 0x361bf: 0x6dca4620, + // Block 0xd87, offset 0x361c0 + 0x361c0: 0x6dca4820, 0x361c1: 0x6dca4a20, 0x361c2: 0x6dca4c20, 0x361c3: 0x6dfcd620, + 0x361c4: 0x6e0fb820, 0x361c5: 0x6c23e620, 0x361c6: 0x6c3a5e20, 0x361c7: 0x6c564020, + 0x361c8: 0x6c790420, 0x361c9: 0x6c790620, 0x361ca: 0x6ca20a20, 0x361cb: 0x6ca20c20, + 0x361cc: 0x6ccf6820, 0x361cd: 0x6ccf6a20, 0x361ce: 0x6ccf6c20, 0x361cf: 0x6ccf6e20, + 0x361d0: 0x6cfd6e20, 0x361d1: 0x6d2c0c20, 0x361d2: 0x6d594420, 0x361d3: 0x6dca4e20, + 0x361d4: 0x6c09da20, 0x361d5: 0x6c138620, 0x361d6: 0x6c138820, 0x361d7: 0x6c138a20, + 0x361d8: 0x6c23f620, 0x361d9: 0x6c23f820, 0x361da: 0x6c23fa20, 0x361db: 0x6c23fc20, + 0x361dc: 0x6c3a7c20, 0x361dd: 0x6c3a7e20, 0x361de: 0x6c3a8020, 0x361df: 0x6c3a8220, + 0x361e0: 0x6c3a8420, 0x361e1: 0x6c3a8620, 0x361e2: 0x6c3a8820, 0x361e3: 0x6c3a8a20, + 0x361e4: 0x6c3a8c20, 0x361e5: 0x6c3a8e20, 0x361e6: 0x6c3a9020, 0x361e7: 0x6c3a9220, + 0x361e8: 0x6c3a9420, 0x361e9: 0x6c3a9620, 0x361ea: 0x6c3a9820, 0x361eb: 0x6c3a9a20, + 0x361ec: 0x6c3a9c20, 0x361ed: 0x6c3a9e20, 0x361ee: 0x6c3aa020, 0x361ef: 0x6c3aa220, + 0x361f0: 0x6c3aa420, 0x361f1: 0x6c3aa620, 0x361f2: 0x6c3aa820, 0x361f3: 0x6c3aaa20, + 0x361f4: 0x6c3aac20, 0x361f5: 0x6c3aae20, 0x361f6: 0x6c3ab020, 0x361f7: 0x6c3ab220, + 0x361f8: 0x6c565e20, 0x361f9: 0x6c566020, 0x361fa: 0x6c566220, 0x361fb: 0x6c566420, + 0x361fc: 0x6c566620, 0x361fd: 0x6c566820, 0x361fe: 0x6c566a20, 0x361ff: 0x6c566c20, + // Block 0xd88, offset 0x36200 + 0x36200: 0x6c566e20, 0x36201: 0x6c567020, 0x36202: 0x6c567220, 0x36203: 0x6c567420, + 0x36204: 0x6c567620, 0x36205: 0x6c567820, 0x36206: 0x6c567a20, 0x36207: 0x6c567c20, + 0x36208: 0x6c567e20, 0x36209: 0x6c568020, 0x3620a: 0x6c568220, 0x3620b: 0x6c568420, + 0x3620c: 0x6c568620, 0x3620d: 0x6c568820, 0x3620e: 0x6c568a20, 0x3620f: 0x6c568c20, + 0x36210: 0x6c568e20, 0x36211: 0x6c791a20, 0x36212: 0x6c791c20, 0x36213: 0x6c791e20, + 0x36214: 0x6c792020, 0x36215: 0x6c792220, 0x36216: 0x6c792420, 0x36217: 0x6c792620, + 0x36218: 0x6c792820, 0x36219: 0x6c792a20, 0x3621a: 0x6c792c20, 0x3621b: 0x6ca22a20, + 0x3621c: 0x6ca22c20, 0x3621d: 0x6ca22e20, 0x3621e: 0x6ca23020, 0x3621f: 0x6ca23220, + 0x36220: 0x6ca23420, 0x36221: 0x6ca23620, 0x36222: 0x6ca23820, 0x36223: 0x6ca23a20, + 0x36224: 0x6ca23c20, 0x36225: 0x6ca23e20, 0x36226: 0x6ca24020, 0x36227: 0x6ca24220, + 0x36228: 0x6ca24420, 0x36229: 0x6ca24620, 0x3622a: 0x6ca24820, 0x3622b: 0x6ca24a20, + 0x3622c: 0x6ca24c20, 0x3622d: 0x6ca24e20, 0x3622e: 0x6ca25020, 0x3622f: 0x6ccf8e20, + 0x36230: 0x6ccf9020, 0x36231: 0x6ccf9220, 0x36232: 0x6ccf9420, 0x36233: 0x6ccf9620, + 0x36234: 0x6ccf9820, 0x36235: 0x6ccf9a20, 0x36236: 0x6ccf9c20, 0x36237: 0x6ccf9e20, + 0x36238: 0x6ccfa020, 0x36239: 0x6ccfa220, 0x3623a: 0x6ccfa420, 0x3623b: 0x6ccfa620, + 0x3623c: 0x6ccfa820, 0x3623d: 0x6ccfaa20, 0x3623e: 0x6ccfac20, 0x3623f: 0x6ccfae20, + // Block 0xd89, offset 0x36240 + 0x36240: 0x6ccfb020, 0x36241: 0x6ccfb220, 0x36242: 0x6ccfb420, 0x36243: 0x6ccfb620, + 0x36244: 0x6ccfb820, 0x36245: 0x6ccfba20, 0x36246: 0x6ccfbc20, 0x36247: 0x6ccfbe20, + 0x36248: 0x6ccfc020, 0x36249: 0x6ccfc220, 0x3624a: 0x6ccfc420, 0x3624b: 0x6ccfc620, + 0x3624c: 0x6ccfc820, 0x3624d: 0x6cfd8420, 0x3624e: 0x6cfd8620, 0x3624f: 0x6cfd8820, + 0x36250: 0x6cfd8a20, 0x36251: 0x6cfd8c20, 0x36252: 0x6cfd8e20, 0x36253: 0x6cfd9020, + 0x36254: 0x6cfd9220, 0x36255: 0x6cfd9420, 0x36256: 0x6cfd9620, 0x36257: 0x6cfd9820, + 0x36258: 0x6cfd9a20, 0x36259: 0x6cfd9c20, 0x3625a: 0x6cfd9e20, 0x3625b: 0x6cfda020, + 0x3625c: 0x6cf91a20, 0x3625d: 0x6cfda220, 0x3625e: 0x6cfda420, 0x3625f: 0x6cfda620, + 0x36260: 0x6cfda820, 0x36261: 0x6cfdaa20, 0x36262: 0x6cfdac20, 0x36263: 0x6cfdae20, + 0x36264: 0x6cfdb020, 0x36265: 0x6cfdb220, 0x36266: 0x6cfdb420, 0x36267: 0x6cfdb620, + 0x36268: 0x6cfdb820, 0x36269: 0x6d2c2220, 0x3626a: 0x6d2c2420, 0x3626b: 0x6d2c2620, + 0x3626c: 0x6d2c2820, 0x3626d: 0x6d2c2a20, 0x3626e: 0x6d2c2c20, 0x3626f: 0x6d2c2e20, + 0x36270: 0x6d2c3020, 0x36271: 0x6d2c3220, 0x36272: 0x6d2c3420, 0x36273: 0x6d2c3620, + 0x36274: 0x6d2c3820, 0x36275: 0x6d2c3a20, 0x36276: 0x6d2c3c20, 0x36277: 0x6d2c3e20, + 0x36278: 0x6d2c4020, 0x36279: 0x6d2c4220, 0x3627a: 0x6d2c4420, 0x3627b: 0x6d2c4620, + 0x3627c: 0x6d2c4820, 0x3627d: 0x6d2c4a20, 0x3627e: 0x6d2c4c20, 0x3627f: 0x6cfdba20, + // Block 0xd8a, offset 0x36280 + 0x36280: 0x6d2c4e20, 0x36281: 0x6d2c5020, 0x36282: 0x6d2c5220, 0x36283: 0x6d2c5420, + 0x36284: 0x6d2c5620, 0x36285: 0x6d2c5820, 0x36286: 0x6d2c5a20, 0x36287: 0x6d2c5c20, + 0x36288: 0x6d2c5e20, 0x36289: 0x6d2c6020, 0x3628a: 0x6d595820, 0x3628b: 0x6d595a20, + 0x3628c: 0x6d595c20, 0x3628d: 0x6d595e20, 0x3628e: 0x6d596020, 0x3628f: 0x6d596220, + 0x36290: 0x6d596420, 0x36291: 0x6d596620, 0x36292: 0x6d596820, 0x36293: 0x6d596a20, + 0x36294: 0x6d596c20, 0x36295: 0x6d596e20, 0x36296: 0x6d597020, 0x36297: 0x6d55d820, + 0x36298: 0x6d597220, 0x36299: 0x6d597420, 0x3629a: 0x6d597620, 0x3629b: 0x6d597820, + 0x3629c: 0x6d597a20, 0x3629d: 0x6d597c20, 0x3629e: 0x6d597e20, 0x3629f: 0x6d598020, + 0x362a0: 0x6d598220, 0x362a1: 0x6d846020, 0x362a2: 0x6d846220, 0x362a3: 0x6d846420, + 0x362a4: 0x6d846620, 0x362a5: 0x6d846820, 0x362a6: 0x6d846a20, 0x362a7: 0x6d846c20, + 0x362a8: 0x6d846e20, 0x362a9: 0x6d847020, 0x362aa: 0x6d847220, 0x362ab: 0x6d847420, + 0x362ac: 0x6d847620, 0x362ad: 0x6d847820, 0x362ae: 0x6d847a20, 0x362af: 0x6da95020, + 0x362b0: 0x6da95220, 0x362b1: 0x6da95420, 0x362b2: 0x6da95620, 0x362b3: 0x6da95820, + 0x362b4: 0x6da95a20, 0x362b5: 0x6da95c20, 0x362b6: 0x6da95e20, 0x362b7: 0x6da96020, + 0x362b8: 0x6da96220, 0x362b9: 0x6dca5420, 0x362ba: 0x6dca5620, 0x362bb: 0x6de5f220, + 0x362bc: 0x6de5f420, 0x362bd: 0x6de5f620, 0x362be: 0x6de5f820, 0x362bf: 0x6de5fa20, + // Block 0xd8b, offset 0x362c0 + 0x362c0: 0x6de5fc20, 0x362c1: 0x6de5fe20, 0x362c2: 0x6dfcdc20, 0x362c3: 0x6dfcde20, + 0x362c4: 0x6dfce020, 0x362c5: 0x6dfce220, 0x362c6: 0x6dfce420, 0x362c7: 0x6e0fbc20, + 0x362c8: 0x6e0fbe20, 0x362c9: 0x6e0fc020, 0x362ca: 0x6e0fc220, 0x362cb: 0x6e0fc420, + 0x362cc: 0x6e1e9e20, 0x362cd: 0x6e1ea020, 0x362ce: 0x6e1ea220, 0x362cf: 0x6e1ea420, + 0x362d0: 0x6e1ea620, 0x362d1: 0x6e2a0620, 0x362d2: 0x6e2a0820, 0x362d3: 0x6e2a0a20, + 0x362d4: 0x6e32d020, 0x362d5: 0x6e32d220, 0x362d6: 0x6e391020, 0x362d7: 0x6e391220, + 0x362d8: 0x6e391420, 0x362d9: 0x6e42c020, 0x362da: 0x6c04f820, 0x362db: 0x6c09e220, + 0x362dc: 0x6c09e420, 0x362dd: 0x6c09e620, 0x362de: 0x6c09e820, 0x362df: 0x6c09ea20, + 0x362e0: 0x6c09ec20, 0x362e1: 0x6c139a20, 0x362e2: 0x6c139c20, 0x362e3: 0x6c139e20, + 0x362e4: 0x6c13a020, 0x362e5: 0x6c13a220, 0x362e6: 0x6c13a420, 0x362e7: 0x6c13a620, + 0x362e8: 0x6c13a820, 0x362e9: 0x6c13aa20, 0x362ea: 0x6c13ac20, 0x362eb: 0x6c13ae20, + 0x362ec: 0x6c13b020, 0x362ed: 0x6c13b220, 0x362ee: 0x6c13b420, 0x362ef: 0x6c242820, + 0x362f0: 0x6c242a20, 0x362f1: 0x6c242c20, 0x362f2: 0x6c242e20, 0x362f3: 0x6c243020, + 0x362f4: 0x6c243220, 0x362f5: 0x6c243420, 0x362f6: 0x6c243620, 0x362f7: 0x6c243820, + 0x362f8: 0x6c243a20, 0x362f9: 0x6c243c20, 0x362fa: 0x6c243e20, 0x362fb: 0x6c244020, + 0x362fc: 0x6c244220, 0x362fd: 0x6c244420, 0x362fe: 0x6c244620, 0x362ff: 0x6c244820, + // Block 0xd8c, offset 0x36300 + 0x36300: 0x6c244a20, 0x36301: 0x6c244c20, 0x36302: 0x6c244e20, 0x36303: 0x6c245020, + 0x36304: 0x6c245220, 0x36305: 0x6c245420, 0x36306: 0x6c245620, 0x36307: 0x6c245820, + 0x36308: 0x6c245a20, 0x36309: 0x6c245c20, 0x3630a: 0x6c245e20, 0x3630b: 0x6c246020, + 0x3630c: 0x6c246220, 0x3630d: 0x6c246420, 0x3630e: 0x6c246620, 0x3630f: 0x6c3af620, + 0x36310: 0x6c3af820, 0x36311: 0x6c3afa20, 0x36312: 0x6c3afc20, 0x36313: 0x6c3afe20, + 0x36314: 0x6c3b0020, 0x36315: 0x6c3b0220, 0x36316: 0x6c3b0420, 0x36317: 0x6c3b0620, + 0x36318: 0x6c3b0820, 0x36319: 0x6c3b0a20, 0x3631a: 0x6c3b0c20, 0x3631b: 0x6c3b0e20, + 0x3631c: 0x6c3b1020, 0x3631d: 0x6c3b1220, 0x3631e: 0x6c3b1420, 0x3631f: 0x6c3b1620, + 0x36320: 0x6c3b1820, 0x36321: 0x6c3b1a20, 0x36322: 0x6c3b1c20, 0x36323: 0x6c3b1e20, + 0x36324: 0x6c3b2020, 0x36325: 0x6c3b2220, 0x36326: 0x6c3b2420, 0x36327: 0x6c3b2620, + 0x36328: 0x6c3b2820, 0x36329: 0x6c3b2a20, 0x3632a: 0x6c3b2c20, 0x3632b: 0x6c3b2e20, + 0x3632c: 0x6c3b3020, 0x3632d: 0x6c3b3220, 0x3632e: 0x6c246820, 0x3632f: 0x6c56cc20, + 0x36330: 0x6c56ce20, 0x36331: 0x6c56d020, 0x36332: 0x6c56d220, 0x36333: 0x6c56d420, + 0x36334: 0x6c56d620, 0x36335: 0x6c56d820, 0x36336: 0x6c56da20, 0x36337: 0x6c56dc20, + 0x36338: 0x6c56de20, 0x36339: 0x6c56e020, 0x3633a: 0x6c56e220, 0x3633b: 0x6c56e420, + 0x3633c: 0x6c56e620, 0x3633d: 0x6c56e820, 0x3633e: 0x6c56ea20, 0x3633f: 0x6c56ec20, + // Block 0xd8d, offset 0x36340 + 0x36340: 0x6c56ee20, 0x36341: 0x6c56f020, 0x36342: 0x6c56f220, 0x36343: 0x6c56f420, + 0x36344: 0x6c56f620, 0x36345: 0x6c56f820, 0x36346: 0x6c56fa20, 0x36347: 0x6c56fc20, + 0x36348: 0x6c56fe20, 0x36349: 0x6c570020, 0x3634a: 0x6c570220, 0x3634b: 0x6c570420, + 0x3634c: 0x6c570620, 0x3634d: 0x6c570820, 0x3634e: 0x6c570a20, 0x3634f: 0x6c570c20, + 0x36350: 0x6c570e20, 0x36351: 0x6c571020, 0x36352: 0x6c571220, 0x36353: 0x6c571420, + 0x36354: 0x6c571620, 0x36355: 0x6c571820, 0x36356: 0x6c571a20, 0x36357: 0x6c571c20, + 0x36358: 0x6c571e20, 0x36359: 0x6c796420, 0x3635a: 0x6c796620, 0x3635b: 0x6c796820, + 0x3635c: 0x6c796a20, 0x3635d: 0x6c796c20, 0x3635e: 0x6c796e20, 0x3635f: 0x6c797020, + 0x36360: 0x6c797220, 0x36361: 0x6c797420, 0x36362: 0x6c797620, 0x36363: 0x6c572020, + 0x36364: 0x6c797820, 0x36365: 0x6c797a20, 0x36366: 0x6c797c20, 0x36367: 0x6c797e20, + 0x36368: 0x6c798020, 0x36369: 0x6c798220, 0x3636a: 0x6c798420, 0x3636b: 0x6c798620, + 0x3636c: 0x6c798820, 0x3636d: 0x6c798a20, 0x3636e: 0x6c798c20, 0x3636f: 0x6c798e20, + 0x36370: 0x6c799020, 0x36371: 0x6c799220, 0x36372: 0x6c799420, 0x36373: 0x6c799620, + 0x36374: 0x6c799820, 0x36375: 0x6c799a20, 0x36376: 0x6c799c20, 0x36377: 0x6c799e20, + 0x36378: 0x6c79a020, 0x36379: 0x6c79a220, 0x3637a: 0x6c79a420, 0x3637b: 0x6c79a620, + 0x3637c: 0x6c79a820, 0x3637d: 0x6c79aa20, 0x3637e: 0x6c79ac20, 0x3637f: 0x6c79ae20, + // Block 0xd8e, offset 0x36380 + 0x36380: 0x6c79b020, 0x36381: 0x6c79b220, 0x36382: 0x6c79b420, 0x36383: 0x6ca29a20, + 0x36384: 0x6ca29c20, 0x36385: 0x6ca29e20, 0x36386: 0x6ca2a020, 0x36387: 0x6ca2a220, + 0x36388: 0x6ca2a420, 0x36389: 0x6ca2a620, 0x3638a: 0x6ca2a820, 0x3638b: 0x6ca2aa20, + 0x3638c: 0x6ca2ac20, 0x3638d: 0x6ca2ae20, 0x3638e: 0x6ca2b020, 0x3638f: 0x6ca2b220, + 0x36390: 0x6ca2b420, 0x36391: 0x6ca2b620, 0x36392: 0x6ca2b820, 0x36393: 0x6ca2ba20, + 0x36394: 0x6ca2bc20, 0x36395: 0x6ca2be20, 0x36396: 0x6ca2c020, 0x36397: 0x6ca2c220, + 0x36398: 0x6ca2c420, 0x36399: 0x6ca2c620, 0x3639a: 0x6ca2c820, 0x3639b: 0x6ca2ca20, + 0x3639c: 0x6cd00c20, 0x3639d: 0x6cd00e20, 0x3639e: 0x6cd01020, 0x3639f: 0x6cd01220, + 0x363a0: 0x6cd01420, 0x363a1: 0x6cd01620, 0x363a2: 0x6cd01820, 0x363a3: 0x6cd01a20, + 0x363a4: 0x6cd01c20, 0x363a5: 0x6cd01e20, 0x363a6: 0x6cd02020, 0x363a7: 0x6cd02220, + 0x363a8: 0x6cd02420, 0x363a9: 0x6cd02620, 0x363aa: 0x6cd02820, 0x363ab: 0x6cd02a20, + 0x363ac: 0x6cd02c20, 0x363ad: 0x6cd02e20, 0x363ae: 0x6cd03020, 0x363af: 0x6cd03220, + 0x363b0: 0x6cd03420, 0x363b1: 0x6cd03620, 0x363b2: 0x6cd03820, 0x363b3: 0x6cd03a20, + 0x363b4: 0x6cd03c20, 0x363b5: 0x6cf3a620, 0x363b6: 0x6cd03e20, 0x363b7: 0x6cd04020, + 0x363b8: 0x6cd04220, 0x363b9: 0x6cd04420, 0x363ba: 0x6cd04620, 0x363bb: 0x6cd04820, + 0x363bc: 0x6cd04a20, 0x363bd: 0x6cd04c20, 0x363be: 0x6cd04e20, 0x363bf: 0x6cd05020, + // Block 0xd8f, offset 0x363c0 + 0x363c0: 0x6cd05220, 0x363c1: 0x6cd05420, 0x363c2: 0x6cd05620, 0x363c3: 0x6cd05820, + 0x363c4: 0x6cd05a20, 0x363c5: 0x6cd05c20, 0x363c6: 0x6cd05e20, 0x363c7: 0x6cd06020, + 0x363c8: 0x6cd06220, 0x363c9: 0x6cd06420, 0x363ca: 0x6cd06620, 0x363cb: 0x6cd06820, + 0x363cc: 0x6cd06a20, 0x363cd: 0x6cfdee20, 0x363ce: 0x6cfdf020, 0x363cf: 0x6cfdf220, + 0x363d0: 0x6cfdf420, 0x363d1: 0x6cfdf620, 0x363d2: 0x6cfdf820, 0x363d3: 0x6cfdfa20, + 0x363d4: 0x6cfdfc20, 0x363d5: 0x6cfdfe20, 0x363d6: 0x6cfe0020, 0x363d7: 0x6cfe0220, + 0x363d8: 0x6cfe0420, 0x363d9: 0x6cfe0620, 0x363da: 0x6cfe0820, 0x363db: 0x6cfe0a20, + 0x363dc: 0x6cfe0c20, 0x363dd: 0x6cfe0e20, 0x363de: 0x6cfe1020, 0x363df: 0x6cfe1220, + 0x363e0: 0x6cfe1420, 0x363e1: 0x6cfe1620, 0x363e2: 0x6cfe1820, 0x363e3: 0x6cfe1a20, + 0x363e4: 0x6cfe1c20, 0x363e5: 0x6cfe1e20, 0x363e6: 0x6cfe2020, 0x363e7: 0x6cfe2220, + 0x363e8: 0x6cfe2420, 0x363e9: 0x6cfe2620, 0x363ea: 0x6cfe2820, 0x363eb: 0x6cfe2a20, + 0x363ec: 0x6cfe2c20, 0x363ed: 0x6cfe2e20, 0x363ee: 0x6cfe3020, 0x363ef: 0x6cfe3220, + 0x363f0: 0x6cfe3420, 0x363f1: 0x6cfe3620, 0x363f2: 0x6cfe3820, 0x363f3: 0x6cfe3a20, + 0x363f4: 0x6cfe3c20, 0x363f5: 0x6cfe3e20, 0x363f6: 0x6cfe4020, 0x363f7: 0x6cfe4220, + 0x363f8: 0x6cfe4420, 0x363f9: 0x6d2c8a20, 0x363fa: 0x6d2c8c20, 0x363fb: 0x6d2c8e20, + 0x363fc: 0x6d2c9020, 0x363fd: 0x6d2c9220, 0x363fe: 0x6d2c9420, 0x363ff: 0x6d2c9620, + // Block 0xd90, offset 0x36400 + 0x36400: 0x6d2c9820, 0x36401: 0x6d2c9a20, 0x36402: 0x6d2c9c20, 0x36403: 0x6d2c9e20, + 0x36404: 0x6d2ca020, 0x36405: 0x6d2ca220, 0x36406: 0x6d2ca420, 0x36407: 0x6d2ca620, + 0x36408: 0x6d2ca820, 0x36409: 0x6d2caa20, 0x3640a: 0x6d2cac20, 0x3640b: 0x6d2cae20, + 0x3640c: 0x6d2cb020, 0x3640d: 0x6d2cb220, 0x3640e: 0x6d2cb420, 0x3640f: 0x6d2cb620, + 0x36410: 0x6d2cb820, 0x36411: 0x6d2cba20, 0x36412: 0x6d2cbc20, 0x36413: 0x6d2cbe20, + 0x36414: 0x6d2cc020, 0x36415: 0x6d2cc220, 0x36416: 0x6d2cc420, 0x36417: 0x6d2cc620, + 0x36418: 0x6d2cc820, 0x36419: 0x6d2cca20, 0x3641a: 0x6d2ccc20, 0x3641b: 0x6d2cce20, + 0x3641c: 0x6d2cd020, 0x3641d: 0x6d2cd220, 0x3641e: 0x6d2cd420, 0x3641f: 0x6d2cd620, + 0x36420: 0x6d2cd820, 0x36421: 0x6d2cda20, 0x36422: 0x6d2cdc20, 0x36423: 0x6d59b220, + 0x36424: 0x6d59b420, 0x36425: 0x6d59b620, 0x36426: 0x6d59b820, 0x36427: 0x6d59ba20, + 0x36428: 0x6d59bc20, 0x36429: 0x6d59be20, 0x3642a: 0x6d59c020, 0x3642b: 0x6d59c220, + 0x3642c: 0x6d59c420, 0x3642d: 0x6d59c620, 0x3642e: 0x6d59c820, 0x3642f: 0x6d59ca20, + 0x36430: 0x6d59cc20, 0x36431: 0x6d59ce20, 0x36432: 0x6d59d020, 0x36433: 0x6d59d220, + 0x36434: 0x6d59d420, 0x36435: 0x6d59d620, 0x36436: 0x6d59d820, 0x36437: 0x6d59da20, + 0x36438: 0x6d59dc20, 0x36439: 0x6d59de20, 0x3643a: 0x6d59e020, 0x3643b: 0x6d59e220, + 0x3643c: 0x6d59e420, 0x3643d: 0x6d59e620, 0x3643e: 0x6d59e820, 0x3643f: 0x6d59ea20, + // Block 0xd91, offset 0x36440 + 0x36440: 0x6d59ec20, 0x36441: 0x6d59ee20, 0x36442: 0x6d59f020, 0x36443: 0x6d59f220, + 0x36444: 0x6d59f420, 0x36445: 0x6d59f620, 0x36446: 0x6d59f820, 0x36447: 0x6d59fa20, + 0x36448: 0x6d59fc20, 0x36449: 0x6d59fe20, 0x3644a: 0x6d5a0020, 0x3644b: 0x6d5a0220, + 0x3644c: 0x6d849820, 0x3644d: 0x6d849a20, 0x3644e: 0x6d849c20, 0x3644f: 0x6d849e20, + 0x36450: 0x6d84a020, 0x36451: 0x6d84a220, 0x36452: 0x6d84a420, 0x36453: 0x6d84a620, + 0x36454: 0x6d84a820, 0x36455: 0x6d84aa20, 0x36456: 0x6d84ac20, 0x36457: 0x6d84ae20, + 0x36458: 0x6d84b020, 0x36459: 0x6d84b220, 0x3645a: 0x6d84b420, 0x3645b: 0x6d84b620, + 0x3645c: 0x6d84b820, 0x3645d: 0x6d84ba20, 0x3645e: 0x6d84bc20, 0x3645f: 0x6d84be20, + 0x36460: 0x6d84c020, 0x36461: 0x6d84c220, 0x36462: 0x6d84c420, 0x36463: 0x6d84c620, + 0x36464: 0x6d84c820, 0x36465: 0x6d84ca20, 0x36466: 0x6da97820, 0x36467: 0x6da97a20, + 0x36468: 0x6da97c20, 0x36469: 0x6da97e20, 0x3646a: 0x6da98020, 0x3646b: 0x6da98220, + 0x3646c: 0x6da98420, 0x3646d: 0x6da98620, 0x3646e: 0x6da98820, 0x3646f: 0x6da98a20, + 0x36470: 0x6da98c20, 0x36471: 0x6da98e20, 0x36472: 0x6da99020, 0x36473: 0x6da99220, + 0x36474: 0x6dca6020, 0x36475: 0x6dca6220, 0x36476: 0x6dca6420, 0x36477: 0x6dca6620, + 0x36478: 0x6dca6820, 0x36479: 0x6dca6a20, 0x3647a: 0x6dca6c20, 0x3647b: 0x6dca6e20, + 0x3647c: 0x6dca7020, 0x3647d: 0x6dca7220, 0x3647e: 0x6dca7420, 0x3647f: 0x6dca7620, + // Block 0xd92, offset 0x36480 + 0x36480: 0x6dca7820, 0x36481: 0x6dca7a20, 0x36482: 0x6dca7c20, 0x36483: 0x6dca7e20, + 0x36484: 0x6dca8020, 0x36485: 0x6de60a20, 0x36486: 0x6de60c20, 0x36487: 0x6de60e20, + 0x36488: 0x6de61020, 0x36489: 0x6de61220, 0x3648a: 0x6de61420, 0x3648b: 0x6de61620, + 0x3648c: 0x6de61820, 0x3648d: 0x6dfcf420, 0x3648e: 0x6dfcf620, 0x3648f: 0x6dfcf820, + 0x36490: 0x6dfcfa20, 0x36491: 0x6e0fca20, 0x36492: 0x6e0fcc20, 0x36493: 0x6e0fce20, + 0x36494: 0x6e0fd020, 0x36495: 0x6e0fd220, 0x36496: 0x6e0fd420, 0x36497: 0x6e1eac20, + 0x36498: 0x6e1eae20, 0x36499: 0x6e1eb020, 0x3649a: 0x6e1eb220, 0x3649b: 0x6e2a1220, + 0x3649c: 0x6e2a1420, 0x3649d: 0x6e2a1620, 0x3649e: 0x6e2a1820, 0x3649f: 0x6e32d620, + 0x364a0: 0x6e32d820, 0x364a1: 0x6e32da20, 0x364a2: 0x6e32dc20, 0x364a3: 0x6e391620, + 0x364a4: 0x6e407a20, 0x364a5: 0x6c09f020, 0x364a6: 0x6c572820, 0x364a7: 0x6cd07420, + 0x364a8: 0x6d2ce020, 0x364a9: 0x6c04fc20, 0x364aa: 0x6c13c620, 0x364ab: 0x6c13c820, + 0x364ac: 0x6c13ca20, 0x364ad: 0x6c248820, 0x364ae: 0x6c248a20, 0x364af: 0x6c248c20, + 0x364b0: 0x6c248e20, 0x364b1: 0x6c249020, 0x364b2: 0x6c249220, 0x364b3: 0x6c249420, + 0x364b4: 0x6c249620, 0x364b5: 0x6c249820, 0x364b6: 0x6c249a20, 0x364b7: 0x6c249c20, + 0x364b8: 0x6c249e20, 0x364b9: 0x6c3b7020, 0x364ba: 0x6c3b7220, 0x364bb: 0x6c3b7420, + 0x364bc: 0x6c3b7620, 0x364bd: 0x6c3b7820, 0x364be: 0x6c3b7a20, 0x364bf: 0x6c3b7c20, + // Block 0xd93, offset 0x364c0 + 0x364c0: 0x6c3b7e20, 0x364c1: 0x6c3b8020, 0x364c2: 0x6c3b8220, 0x364c3: 0x6c3b8420, + 0x364c4: 0x6c3b8620, 0x364c5: 0x6c3b8820, 0x364c6: 0x6c3b8a20, 0x364c7: 0x6c3b8c20, + 0x364c8: 0x6c3b8e20, 0x364c9: 0x6c3b9020, 0x364ca: 0x6c3b9220, 0x364cb: 0x6c3b9420, + 0x364cc: 0x6c3b9620, 0x364cd: 0x6c3b9820, 0x364ce: 0x6c3b9a20, 0x364cf: 0x6c577620, + 0x364d0: 0x6c577820, 0x364d1: 0x6c577a20, 0x364d2: 0x6c577c20, 0x364d3: 0x6c577e20, + 0x364d4: 0x6c578020, 0x364d5: 0x6c578220, 0x364d6: 0x6c578420, 0x364d7: 0x6c578620, + 0x364d8: 0x6c578820, 0x364d9: 0x6c578a20, 0x364da: 0x6c578c20, 0x364db: 0x6c578e20, + 0x364dc: 0x6c579020, 0x364dd: 0x6c579220, 0x364de: 0x6c579420, 0x364df: 0x6c579620, + 0x364e0: 0x6c579820, 0x364e1: 0x6c579a20, 0x364e2: 0x6c579c20, 0x364e3: 0x6c579e20, + 0x364e4: 0x6c57a020, 0x364e5: 0x6c57a220, 0x364e6: 0x6c57a420, 0x364e7: 0x6c57a620, + 0x364e8: 0x6c57a820, 0x364e9: 0x6c57aa20, 0x364ea: 0x6c57ac20, 0x364eb: 0x6c57ae20, + 0x364ec: 0x6c57b020, 0x364ed: 0x6c57b220, 0x364ee: 0x6c57b420, 0x364ef: 0x6c57b620, + 0x364f0: 0x6c57b820, 0x364f1: 0x6c57ba20, 0x364f2: 0x6c57bc20, 0x364f3: 0x6c57be20, + 0x364f4: 0x6c57c020, 0x364f5: 0x6c7a1c20, 0x364f6: 0x6c7a1e20, 0x364f7: 0x6c7a2020, + 0x364f8: 0x6c7a2220, 0x364f9: 0x6c7a2420, 0x364fa: 0x6c7a2620, 0x364fb: 0x6c7a2820, + 0x364fc: 0x6c7a2a20, 0x364fd: 0x6c7a2c20, 0x364fe: 0x6c7a2e20, 0x364ff: 0x6c7a3020, + // Block 0xd94, offset 0x36500 + 0x36500: 0x6c7a3220, 0x36501: 0x6c7a3420, 0x36502: 0x6c7a3620, 0x36503: 0x6c7a3820, + 0x36504: 0x6c7a3a20, 0x36505: 0x6c7a3c20, 0x36506: 0x6c7a3e20, 0x36507: 0x6c7a4020, + 0x36508: 0x6c7a4220, 0x36509: 0x6c7a4420, 0x3650a: 0x6c7a4620, 0x3650b: 0x6c7a4820, + 0x3650c: 0x6c7a4a20, 0x3650d: 0x6c7a4c20, 0x3650e: 0x6c7a4e20, 0x3650f: 0x6c7a5020, + 0x36510: 0x6c7a5220, 0x36511: 0x6c7a5420, 0x36512: 0x6c7a5620, 0x36513: 0x6c7a5820, + 0x36514: 0x6c7a5a20, 0x36515: 0x6c7a5c20, 0x36516: 0x6ca32620, 0x36517: 0x6ca32820, + 0x36518: 0x6ca32a20, 0x36519: 0x6ca32c20, 0x3651a: 0x6ca32e20, 0x3651b: 0x6ca33020, + 0x3651c: 0x6ca33220, 0x3651d: 0x6ca33420, 0x3651e: 0x6ca33620, 0x3651f: 0x6ca33820, + 0x36520: 0x6ca33a20, 0x36521: 0x6ca33c20, 0x36522: 0x6ca33e20, 0x36523: 0x6ca34020, + 0x36524: 0x6ca34220, 0x36525: 0x6ca34420, 0x36526: 0x6ca34620, 0x36527: 0x6ca34820, + 0x36528: 0x6ca34a20, 0x36529: 0x6ca34c20, 0x3652a: 0x6ca34e20, 0x3652b: 0x6ca35020, + 0x3652c: 0x6ca35220, 0x3652d: 0x6ca35420, 0x3652e: 0x6ca35620, 0x3652f: 0x6ca35820, + 0x36530: 0x6ca35a20, 0x36531: 0x6ca35c20, 0x36532: 0x6ca35e20, 0x36533: 0x6ca36020, + 0x36534: 0x6ca36220, 0x36535: 0x6ca36420, 0x36536: 0x6ca36620, 0x36537: 0x6ca36820, + 0x36538: 0x6ca36a20, 0x36539: 0x6ca36c20, 0x3653a: 0x6ca36e20, 0x3653b: 0x6cd0dc20, + 0x3653c: 0x6cd0de20, 0x3653d: 0x6cd0e020, 0x3653e: 0x6cd0e220, 0x3653f: 0x6cd0e420, + // Block 0xd95, offset 0x36540 + 0x36540: 0x6cd0e620, 0x36541: 0x6cd0e820, 0x36542: 0x6cd0ea20, 0x36543: 0x6cd0ec20, + 0x36544: 0x6cd0ee20, 0x36545: 0x6cd0f020, 0x36546: 0x6cd0f220, 0x36547: 0x6cd0f420, + 0x36548: 0x6cd0f620, 0x36549: 0x6cd0f820, 0x3654a: 0x6cd0fa20, 0x3654b: 0x6cd0fc20, + 0x3654c: 0x6cd0fe20, 0x3654d: 0x6cd10020, 0x3654e: 0x6cd10220, 0x3654f: 0x6cd10420, + 0x36550: 0x6cd10620, 0x36551: 0x6cd10820, 0x36552: 0x6cd10a20, 0x36553: 0x6cd10c20, + 0x36554: 0x6cd10e20, 0x36555: 0x6cd11020, 0x36556: 0x6cd11220, 0x36557: 0x6cd11420, + 0x36558: 0x6cd11620, 0x36559: 0x6cd11820, 0x3655a: 0x6cd11a20, 0x3655b: 0x6cd11c20, + 0x3655c: 0x6cd11e20, 0x3655d: 0x6cd12020, 0x3655e: 0x6cd12220, 0x3655f: 0x6cd12420, + 0x36560: 0x6cd12620, 0x36561: 0x6cd12820, 0x36562: 0x6cd12a20, 0x36563: 0x6cd12c20, + 0x36564: 0x6cd12e20, 0x36565: 0x6cd13020, 0x36566: 0x6cd13220, 0x36567: 0x6cd13420, + 0x36568: 0x6cd13620, 0x36569: 0x6cd13820, 0x3656a: 0x6cd13a20, 0x3656b: 0x6cd13c20, + 0x3656c: 0x6cd13e20, 0x3656d: 0x6cd14020, 0x3656e: 0x6cd14220, 0x3656f: 0x6cfeaa20, + 0x36570: 0x6cfeac20, 0x36571: 0x6cfeae20, 0x36572: 0x6cfeb020, 0x36573: 0x6cfeb220, + 0x36574: 0x6cfeb420, 0x36575: 0x6cfeb620, 0x36576: 0x6cfeb820, 0x36577: 0x6cfeba20, + 0x36578: 0x6cfebc20, 0x36579: 0x6cfebe20, 0x3657a: 0x6cfec020, 0x3657b: 0x6cfec220, + 0x3657c: 0x6cfec420, 0x3657d: 0x6cfec620, 0x3657e: 0x6cfec820, 0x3657f: 0x6cfeca20, + // Block 0xd96, offset 0x36580 + 0x36580: 0x6cfecc20, 0x36581: 0x6cfece20, 0x36582: 0x6cfed020, 0x36583: 0x6cfed220, + 0x36584: 0x6cfed420, 0x36585: 0x6cfed620, 0x36586: 0x6cfed820, 0x36587: 0x6cfeda20, + 0x36588: 0x6cfedc20, 0x36589: 0x6cfede20, 0x3658a: 0x6cfee020, 0x3658b: 0x6cfee220, + 0x3658c: 0x6cfee420, 0x3658d: 0x6cfee620, 0x3658e: 0x6cfee820, 0x3658f: 0x6cfeea20, + 0x36590: 0x6cfeec20, 0x36591: 0x6cfeee20, 0x36592: 0x6cfef020, 0x36593: 0x6cfef220, + 0x36594: 0x6cfef420, 0x36595: 0x6cfef620, 0x36596: 0x6cfef820, 0x36597: 0x6cfefa20, + 0x36598: 0x6cfefc20, 0x36599: 0x6cfefe20, 0x3659a: 0x6cff0020, 0x3659b: 0x6cff0220, + 0x3659c: 0x6cff0420, 0x3659d: 0x6cff0620, 0x3659e: 0x6cff0820, 0x3659f: 0x6cff0a20, + 0x365a0: 0x6cff0c20, 0x365a1: 0x6cff0e20, 0x365a2: 0x6cff1020, 0x365a3: 0x6cff1220, + 0x365a4: 0x6cff1420, 0x365a5: 0x6cff1620, 0x365a6: 0x6cff1820, 0x365a7: 0x6cff1a20, + 0x365a8: 0x6cff1c20, 0x365a9: 0x6cff1e20, 0x365aa: 0x6d2d1620, 0x365ab: 0x6d2d1820, + 0x365ac: 0x6d2d1a20, 0x365ad: 0x6d2d1c20, 0x365ae: 0x6d2d1e20, 0x365af: 0x6d2d2020, + 0x365b0: 0x6d2d2220, 0x365b1: 0x6d2d2420, 0x365b2: 0x6d2d2620, 0x365b3: 0x6d2d2820, + 0x365b4: 0x6d2d2a20, 0x365b5: 0x6d2d2c20, 0x365b6: 0x6d2d2e20, 0x365b7: 0x6d2d3020, + 0x365b8: 0x6d2d3220, 0x365b9: 0x6d2d3420, 0x365ba: 0x6d2d3620, 0x365bb: 0x6d2d3820, + 0x365bc: 0x6d2d3a20, 0x365bd: 0x6d2d3c20, 0x365be: 0x6d2d3e20, 0x365bf: 0x6d2d4020, + // Block 0xd97, offset 0x365c0 + 0x365c0: 0x6d2d4220, 0x365c1: 0x6d2d4420, 0x365c2: 0x6d2d4620, 0x365c3: 0x6d2d4820, + 0x365c4: 0x6d2d4a20, 0x365c5: 0x6d2d4c20, 0x365c6: 0x6d2d4e20, 0x365c7: 0x6d2d5020, + 0x365c8: 0x6d2d5220, 0x365c9: 0x6d2d5420, 0x365ca: 0x6d2d5620, 0x365cb: 0x6d2d5820, + 0x365cc: 0x6d2d5a20, 0x365cd: 0x6d2d5c20, 0x365ce: 0x6d2d5e20, 0x365cf: 0x6d2d6020, + 0x365d0: 0x6d2d6220, 0x365d1: 0x6d2d6420, 0x365d2: 0x6d2d6620, 0x365d3: 0x6d2d6820, + 0x365d4: 0x6d5a4820, 0x365d5: 0x6d5a4a20, 0x365d6: 0x6d5a4c20, 0x365d7: 0x6d5a4e20, + 0x365d8: 0x6d5a5020, 0x365d9: 0x6d5a5220, 0x365da: 0x6d5a5420, 0x365db: 0x6d5a5620, + 0x365dc: 0x6d5a5820, 0x365dd: 0x6d5a5a20, 0x365de: 0x6d5a5c20, 0x365df: 0x6d5a5e20, + 0x365e0: 0x6d5a6020, 0x365e1: 0x6d5a6220, 0x365e2: 0x6d5a6420, 0x365e3: 0x6d5a6620, + 0x365e4: 0x6d5a6820, 0x365e5: 0x6d5a6a20, 0x365e6: 0x6d5a6c20, 0x365e7: 0x6d5a6e20, + 0x365e8: 0x6d5a7020, 0x365e9: 0x6d5a7220, 0x365ea: 0x6d5a7420, 0x365eb: 0x6d5a7620, + 0x365ec: 0x6d5a7820, 0x365ed: 0x6d5a7a20, 0x365ee: 0x6d5a7c20, 0x365ef: 0x6d5a7e20, + 0x365f0: 0x6d5a8020, 0x365f1: 0x6d5a8220, 0x365f2: 0x6d5a8420, 0x365f3: 0x6d5a8620, + 0x365f4: 0x6d5a8820, 0x365f5: 0x6d5a8a20, 0x365f6: 0x6d5a8c20, 0x365f7: 0x6d5a8e20, + 0x365f8: 0x6d5a9020, 0x365f9: 0x6d5a9220, 0x365fa: 0x6d5a9420, 0x365fb: 0x6d5a9620, + 0x365fc: 0x6d5a9820, 0x365fd: 0x6d5a9a20, 0x365fe: 0x6d5a9c20, 0x365ff: 0x6d5a9e20, + // Block 0xd98, offset 0x36600 + 0x36600: 0x6d850020, 0x36601: 0x6d5aa020, 0x36602: 0x6d850220, 0x36603: 0x6d850420, + 0x36604: 0x6d850620, 0x36605: 0x6d850820, 0x36606: 0x6d850a20, 0x36607: 0x6d850c20, + 0x36608: 0x6d850e20, 0x36609: 0x6d851020, 0x3660a: 0x6d851220, 0x3660b: 0x6d851420, + 0x3660c: 0x6d851620, 0x3660d: 0x6d851820, 0x3660e: 0x6d851a20, 0x3660f: 0x6d851c20, + 0x36610: 0x6d851e20, 0x36611: 0x6d852020, 0x36612: 0x6d852220, 0x36613: 0x6d852420, + 0x36614: 0x6d852620, 0x36615: 0x6d852820, 0x36616: 0x6d852a20, 0x36617: 0x6d852c20, + 0x36618: 0x6d852e20, 0x36619: 0x6d853020, 0x3661a: 0x6d853220, 0x3661b: 0x6d853420, + 0x3661c: 0x6d853620, 0x3661d: 0x6d853820, 0x3661e: 0x6d853a20, 0x3661f: 0x6d853c20, + 0x36620: 0x6d853e20, 0x36621: 0x6d854020, 0x36622: 0x6d854220, 0x36623: 0x6d854420, + 0x36624: 0x6d854620, 0x36625: 0x6d854820, 0x36626: 0x6d854a20, 0x36627: 0x6d854c20, + 0x36628: 0x6d854e20, 0x36629: 0x6d855020, 0x3662a: 0x6d855220, 0x3662b: 0x6da9c420, + 0x3662c: 0x6da9c620, 0x3662d: 0x6da9c820, 0x3662e: 0x6da9ca20, 0x3662f: 0x6da9cc20, + 0x36630: 0x6da9ce20, 0x36631: 0x6da9d020, 0x36632: 0x6da9d220, 0x36633: 0x6da9d420, + 0x36634: 0x6da9d620, 0x36635: 0x6da9d820, 0x36636: 0x6da9da20, 0x36637: 0x6da9dc20, + 0x36638: 0x6da9de20, 0x36639: 0x6da9e020, 0x3663a: 0x6da9e220, 0x3663b: 0x6da9e420, + 0x3663c: 0x6da9e620, 0x3663d: 0x6da9e820, 0x3663e: 0x6da9ea20, 0x3663f: 0x6da9ec20, + // Block 0xd99, offset 0x36640 + 0x36640: 0x6da9ee20, 0x36641: 0x6da9f020, 0x36642: 0x6da9f220, 0x36643: 0x6da9f420, + 0x36644: 0x6da9f620, 0x36645: 0x6da9f820, 0x36646: 0x6da9fa20, 0x36647: 0x6da9fc20, + 0x36648: 0x6da9fe20, 0x36649: 0x6daa0020, 0x3664a: 0x6daa0220, 0x3664b: 0x6dcaa020, + 0x3664c: 0x6dcaa220, 0x3664d: 0x6dcaa420, 0x3664e: 0x6dcaa620, 0x3664f: 0x6dcaa820, + 0x36650: 0x6dcaaa20, 0x36651: 0x6dcaac20, 0x36652: 0x6dcaae20, 0x36653: 0x6dcab020, + 0x36654: 0x6dcab220, 0x36655: 0x6dcab420, 0x36656: 0x6dcab620, 0x36657: 0x6dcab820, + 0x36658: 0x6dcaba20, 0x36659: 0x6dcabc20, 0x3665a: 0x6dcabe20, 0x3665b: 0x6dcac020, + 0x3665c: 0x6dcac220, 0x3665d: 0x6dcac420, 0x3665e: 0x6dcac620, 0x3665f: 0x6dcac820, + 0x36660: 0x6dcaca20, 0x36661: 0x6dcacc20, 0x36662: 0x6dcace20, 0x36663: 0x6dcad020, + 0x36664: 0x6dcad220, 0x36665: 0x6dcad420, 0x36666: 0x6dcad620, 0x36667: 0x6dcad820, + 0x36668: 0x6dcada20, 0x36669: 0x6de63a20, 0x3666a: 0x6de63c20, 0x3666b: 0x6de63e20, + 0x3666c: 0x6de64020, 0x3666d: 0x6de64220, 0x3666e: 0x6de64420, 0x3666f: 0x6de64620, + 0x36670: 0x6de64820, 0x36671: 0x6de64a20, 0x36672: 0x6de64c20, 0x36673: 0x6de64e20, + 0x36674: 0x6dcadc20, 0x36675: 0x6de65020, 0x36676: 0x6de65220, 0x36677: 0x6de65420, + 0x36678: 0x6de65620, 0x36679: 0x6de65820, 0x3667a: 0x6de65a20, 0x3667b: 0x6de65c20, + 0x3667c: 0x6de65e20, 0x3667d: 0x6de66020, 0x3667e: 0x6dfd0e20, 0x3667f: 0x6dfd1020, + // Block 0xd9a, offset 0x36680 + 0x36680: 0x6dfd1220, 0x36681: 0x6dfd1420, 0x36682: 0x6dfd1620, 0x36683: 0x6dfd1820, + 0x36684: 0x6dfd1a20, 0x36685: 0x6dfd1c20, 0x36686: 0x6dfd1e20, 0x36687: 0x6dfd2020, + 0x36688: 0x6dfd2220, 0x36689: 0x6e0fdc20, 0x3668a: 0x6e0fde20, 0x3668b: 0x6e0fe020, + 0x3668c: 0x6e0fe220, 0x3668d: 0x6e0fe420, 0x3668e: 0x6e0fe620, 0x3668f: 0x6e0fe820, + 0x36690: 0x6e0fea20, 0x36691: 0x6e0fec20, 0x36692: 0x6e0fee20, 0x36693: 0x6e0ff020, + 0x36694: 0x6e1ebc20, 0x36695: 0x6e1ebe20, 0x36696: 0x6e1ec020, 0x36697: 0x6e1ec220, + 0x36698: 0x6e1ec420, 0x36699: 0x6e2a1e20, 0x3669a: 0x6e2a2020, 0x3669b: 0x6e2a2220, + 0x3669c: 0x6e2a2420, 0x3669d: 0x6e2a2620, 0x3669e: 0x6e2a2820, 0x3669f: 0x6e2a2a20, + 0x366a0: 0x6e32e020, 0x366a1: 0x6e33a820, 0x366a2: 0x6e3d6c20, 0x366a3: 0x6e391820, + 0x366a4: 0x6e391a20, 0x366a5: 0x6e391c20, 0x366a6: 0x6e391e20, 0x366a7: 0x6e392020, + 0x366a8: 0x6e3d6e20, 0x366a9: 0x6e42c220, 0x366aa: 0x6c3bae20, 0x366ab: 0x6c57ca20, + 0x366ac: 0x6c57cc20, 0x366ad: 0x6c57ce20, 0x366ae: 0x6c57d020, 0x366af: 0x6c57d220, + 0x366b0: 0x6c7a7c20, 0x366b1: 0x6c7a7e20, 0x366b2: 0x6c7a8020, 0x366b3: 0x6c7a8220, + 0x366b4: 0x6c7a8420, 0x366b5: 0x6ca38220, 0x366b6: 0x6ca38420, 0x366b7: 0x6ca38620, + 0x366b8: 0x6ca38820, 0x366b9: 0x6ca38a20, 0x366ba: 0x6cd16220, 0x366bb: 0x6cd16420, + 0x366bc: 0x6cd16620, 0x366bd: 0x6cd16820, 0x366be: 0x6cd16a20, 0x366bf: 0x6cd16c20, + // Block 0xd9b, offset 0x366c0 + 0x366c0: 0x6cd16e20, 0x366c1: 0x6cff4420, 0x366c2: 0x6cff4620, 0x366c3: 0x6cff4820, + 0x366c4: 0x6cff4a20, 0x366c5: 0x6cff4c20, 0x366c6: 0x6cff4e20, 0x366c7: 0x6d5ab620, + 0x366c8: 0x6d2d8c20, 0x366c9: 0x6d2d8e20, 0x366ca: 0x6d2d9020, 0x366cb: 0x6d2d9220, + 0x366cc: 0x6d2d9420, 0x366cd: 0x6d5ab820, 0x366ce: 0x6d856c20, 0x366cf: 0x6d856e20, + 0x366d0: 0x6d5aba20, 0x366d1: 0x6d5abc20, 0x366d2: 0x6d5abe20, 0x366d3: 0x6d5ac020, + 0x366d4: 0x6d5ac220, 0x366d5: 0x6d5ac420, 0x366d6: 0x6d857020, 0x366d7: 0x6daa1020, + 0x366d8: 0x6dcae420, 0x366d9: 0x6dcae620, 0x366da: 0x6dcae820, 0x366db: 0x6e0ff420, + 0x366dc: 0x6e0ff620, 0x366dd: 0x6e0ff820, 0x366de: 0x6e1ec820, 0x366df: 0x6e1eca20, + 0x366e0: 0x6e2a2e20, 0x366e1: 0x6e2a3020, 0x366e2: 0x6e32e620, 0x366e3: 0x6e3d7220, + 0x366e4: 0x6e3d7420, 0x366e5: 0x6e452620, 0x366e6: 0x6c24a420, 0x366e7: 0x6c24a620, + 0x366e8: 0x6c3bba20, 0x366e9: 0x6c3bbc20, 0x366ea: 0x6c3bbe20, 0x366eb: 0x6c3bc020, + 0x366ec: 0x6c57ec20, 0x366ed: 0x6c57ee20, 0x366ee: 0x6c57f020, 0x366ef: 0x6c57f220, + 0x366f0: 0x6c57f420, 0x366f1: 0x6c57f620, 0x366f2: 0x6c57f820, 0x366f3: 0x6c7a9620, + 0x366f4: 0x6c7a9820, 0x366f5: 0x6c7a9a20, 0x366f6: 0x6c7a9c20, 0x366f7: 0x6c7a9e20, + 0x366f8: 0x6c7aa020, 0x366f9: 0x6c7aa220, 0x366fa: 0x6c7aa420, 0x366fb: 0x6c7aa620, + 0x366fc: 0x6c7aa820, 0x366fd: 0x6c7aaa20, 0x366fe: 0x6ca39e20, 0x366ff: 0x6ca3a020, + // Block 0xd9c, offset 0x36700 + 0x36700: 0x6ca3a220, 0x36701: 0x6ca3a420, 0x36702: 0x6ca3a620, 0x36703: 0x6ca3a820, + 0x36704: 0x6ca3aa20, 0x36705: 0x6ca3ac20, 0x36706: 0x6ca3ae20, 0x36707: 0x6ca3b020, + 0x36708: 0x6ca3b220, 0x36709: 0x6ca3b420, 0x3670a: 0x6ca3b620, 0x3670b: 0x6ca3b820, + 0x3670c: 0x6cd18020, 0x3670d: 0x6cd18220, 0x3670e: 0x6cd18420, 0x3670f: 0x6cd18620, + 0x36710: 0x6cd18820, 0x36711: 0x6cd18a20, 0x36712: 0x6cd18c20, 0x36713: 0x6cd18e20, + 0x36714: 0x6cd19020, 0x36715: 0x6cd19220, 0x36716: 0x6cd19420, 0x36717: 0x6cd19620, + 0x36718: 0x6cd19820, 0x36719: 0x6cd19a20, 0x3671a: 0x6cd19c20, 0x3671b: 0x6cff6820, + 0x3671c: 0x6cff6a20, 0x3671d: 0x6cff6c20, 0x3671e: 0x6cff6e20, 0x3671f: 0x6cff7020, + 0x36720: 0x6cff7220, 0x36721: 0x6cff7420, 0x36722: 0x6cff7620, 0x36723: 0x6cff7820, + 0x36724: 0x6cff7a20, 0x36725: 0x6cff7c20, 0x36726: 0x6cff7e20, 0x36727: 0x6d2dae20, + 0x36728: 0x6d2db020, 0x36729: 0x6d2db220, 0x3672a: 0x6d2db420, 0x3672b: 0x6d2db620, + 0x3672c: 0x6d2db820, 0x3672d: 0x6d2dba20, 0x3672e: 0x6d2dbc20, 0x3672f: 0x6d2dbe20, + 0x36730: 0x6d2dc020, 0x36731: 0x6d2dc220, 0x36732: 0x6cff8020, 0x36733: 0x6d2dc420, + 0x36734: 0x6d2dc620, 0x36735: 0x6d2dc820, 0x36736: 0x6d2dca20, 0x36737: 0x6d2dcc20, + 0x36738: 0x6d2dce20, 0x36739: 0x6d5ad420, 0x3673a: 0x6d5ad620, 0x3673b: 0x6d5ad820, + 0x3673c: 0x6d5ada20, 0x3673d: 0x6d5adc20, 0x3673e: 0x6d5ade20, 0x3673f: 0x6d5ae020, + // Block 0xd9d, offset 0x36740 + 0x36740: 0x6d5ae220, 0x36741: 0x6d5ae420, 0x36742: 0x6d5ae620, 0x36743: 0x6d5ae820, + 0x36744: 0x6d5aea20, 0x36745: 0x6d858420, 0x36746: 0x6d858620, 0x36747: 0x6d858820, + 0x36748: 0x6d858a20, 0x36749: 0x6d858c20, 0x3674a: 0x6d858e20, 0x3674b: 0x6d859020, + 0x3674c: 0x6d859220, 0x3674d: 0x6d859420, 0x3674e: 0x6daa2820, 0x3674f: 0x6daa2a20, + 0x36750: 0x6daa2c20, 0x36751: 0x6daa2e20, 0x36752: 0x6daa3020, 0x36753: 0x6daa3220, + 0x36754: 0x6daa3420, 0x36755: 0x6daa3620, 0x36756: 0x6cff8220, 0x36757: 0x6daa3820, + 0x36758: 0x6dcaf420, 0x36759: 0x6dcaf620, 0x3675a: 0x6dcaf820, 0x3675b: 0x6dcafa20, + 0x3675c: 0x6dcafc20, 0x3675d: 0x6dcafe20, 0x3675e: 0x6dcb0020, 0x3675f: 0x6dcb0220, + 0x36760: 0x6de67020, 0x36761: 0x6de67220, 0x36762: 0x6dfd2c20, 0x36763: 0x6dfd2e20, + 0x36764: 0x6dfd3020, 0x36765: 0x6dfd3220, 0x36766: 0x6e0ffc20, 0x36767: 0x6e0ffe20, + 0x36768: 0x6e100020, 0x36769: 0x6e100220, 0x3676a: 0x6e100420, 0x3676b: 0x6e100620, + 0x3676c: 0x6e100820, 0x3676d: 0x6e1ece20, 0x3676e: 0x6e1ed020, 0x3676f: 0x6e1ed220, + 0x36770: 0x6e2a3220, 0x36771: 0x6e2a3420, 0x36772: 0x6e2a3620, 0x36773: 0x6e2a3820, + 0x36774: 0x6e2a3a20, 0x36775: 0x6e2a3c20, 0x36776: 0x6e32ea20, 0x36777: 0x6e392420, + 0x36778: 0x6e407c20, 0x36779: 0x6e443820, 0x3677a: 0x6c0a0020, 0x3677b: 0x6c3bc620, + 0x3677c: 0x6c3bc820, 0x3677d: 0x6c3bca20, 0x3677e: 0x6c3bcc20, 0x3677f: 0x6c3bce20, + // Block 0xd9e, offset 0x36780 + 0x36780: 0x6c3bd020, 0x36781: 0x6c580020, 0x36782: 0x6c580220, 0x36783: 0x6c580420, + 0x36784: 0x6c580620, 0x36785: 0x6c7ab020, 0x36786: 0x6cd19e20, 0x36787: 0x6cff8e20, + 0x36788: 0x6d2dd420, 0x36789: 0x6d5af220, 0x3678a: 0x6d5af420, 0x3678b: 0x6d859620, + 0x3678c: 0x6d859820, 0x3678d: 0x6daa3c20, 0x3678e: 0x6dcb0420, 0x3678f: 0x6dc4c420, + 0x36790: 0x6e100a20, 0x36791: 0x6e1ed620, 0x36792: 0x6e42c420, 0x36793: 0x6c0a0420, + 0x36794: 0x6c13ce20, 0x36795: 0x6c3bd220, 0x36796: 0x6c3bd420, 0x36797: 0x6c3bd620, + 0x36798: 0x6c580c20, 0x36799: 0x6c580e20, 0x3679a: 0x6c581020, 0x3679b: 0x6c581220, + 0x3679c: 0x6c581420, 0x3679d: 0x6c581620, 0x3679e: 0x6c581820, 0x3679f: 0x6c7ab420, + 0x367a0: 0x6ca3c220, 0x367a1: 0x6ca3c420, 0x367a2: 0x6ca3c620, 0x367a3: 0x6ca3c820, + 0x367a4: 0x6ca3ca20, 0x367a5: 0x6ca3cc20, 0x367a6: 0x6cd1aa20, 0x367a7: 0x6cd1ac20, + 0x367a8: 0x6cd1ae20, 0x367a9: 0x6cd1b020, 0x367aa: 0x6cd1b220, 0x367ab: 0x6cd1b420, + 0x367ac: 0x6cff9020, 0x367ad: 0x6cff9220, 0x367ae: 0x6cff9420, 0x367af: 0x6cff9620, + 0x367b0: 0x6cff9820, 0x367b1: 0x6cff9a20, 0x367b2: 0x6d2dd820, 0x367b3: 0x6d2dda20, + 0x367b4: 0x6d2ddc20, 0x367b5: 0x6d5af820, 0x367b6: 0x6d859c20, 0x367b7: 0x6daa3e20, + 0x367b8: 0x6daa4020, 0x367b9: 0x6daa4220, 0x367ba: 0x6dcb0620, 0x367bb: 0x6de67420, + 0x367bc: 0x6de67620, 0x367bd: 0x6de26620, 0x367be: 0x6de67820, 0x367bf: 0x6de67a20, + // Block 0xd9f, offset 0x367c0 + 0x367c0: 0x6e100c20, 0x367c1: 0x6e1ed820, 0x367c2: 0x6e1eda20, 0x367c3: 0x6c13d220, + 0x367c4: 0x6c24ae20, 0x367c5: 0x6c3bde20, 0x367c6: 0x6c3be020, 0x367c7: 0x6c7ab820, + 0x367c8: 0x6ca3d020, 0x367c9: 0x6cd1b820, 0x367ca: 0x6d2dde20, 0x367cb: 0x6d5afa20, + 0x367cc: 0x6d5afc20, 0x367cd: 0x6dcb0820, 0x367ce: 0x6de67c20, 0x367cf: 0x6e1edc20, + 0x367d0: 0x6e392620, 0x367d1: 0x6e2a3e20, 0x367d2: 0x6c0a1620, 0x367d3: 0x6c13d820, + 0x367d4: 0x6c13da20, 0x367d5: 0x6c24c220, 0x367d6: 0x6c24c420, 0x367d7: 0x6c24c620, + 0x367d8: 0x6c24c820, 0x367d9: 0x6c24ca20, 0x367da: 0x6c24cc20, 0x367db: 0x6c24ce20, + 0x367dc: 0x6c24d020, 0x367dd: 0x6c3bfa20, 0x367de: 0x6c3bfc20, 0x367df: 0x6c3bfe20, + 0x367e0: 0x6c3c0020, 0x367e1: 0x6c3c0220, 0x367e2: 0x6c3c0420, 0x367e3: 0x6c3c0620, + 0x367e4: 0x6c3c0820, 0x367e5: 0x6c3c0a20, 0x367e6: 0x6c3c0c20, 0x367e7: 0x6c3c0e20, + 0x367e8: 0x6c3c1020, 0x367e9: 0x6c584020, 0x367ea: 0x6c584220, 0x367eb: 0x6c584420, + 0x367ec: 0x6c584620, 0x367ed: 0x6c584820, 0x367ee: 0x6c584a20, 0x367ef: 0x6c584c20, + 0x367f0: 0x6c584e20, 0x367f1: 0x6c585020, 0x367f2: 0x6c585220, 0x367f3: 0x6c585420, + 0x367f4: 0x6c585620, 0x367f5: 0x6c585820, 0x367f6: 0x6c585a20, 0x367f7: 0x6c585c20, + 0x367f8: 0x6c585e20, 0x367f9: 0x6c586020, 0x367fa: 0x6c586220, 0x367fb: 0x6c586420, + 0x367fc: 0x6c586620, 0x367fd: 0x6c586820, 0x367fe: 0x6c586a20, 0x367ff: 0x6c586c20, + // Block 0xda0, offset 0x36800 + 0x36800: 0x6c586e20, 0x36801: 0x6c587020, 0x36802: 0x6c587220, 0x36803: 0x6c587420, + 0x36804: 0x6c587620, 0x36805: 0x6c587820, 0x36806: 0x6c587a20, 0x36807: 0x6c587c20, + 0x36808: 0x6c587e20, 0x36809: 0x6c588020, 0x3680a: 0x6c588220, 0x3680b: 0x6c588420, + 0x3680c: 0x6c7ad620, 0x3680d: 0x6c7ad820, 0x3680e: 0x6c7ada20, 0x3680f: 0x6c7adc20, + 0x36810: 0x6c7ade20, 0x36811: 0x6c7ae020, 0x36812: 0x6c7ae220, 0x36813: 0x6c7ae420, + 0x36814: 0x6c7ae620, 0x36815: 0x6c7ae820, 0x36816: 0x6c7aea20, 0x36817: 0x6c7aec20, + 0x36818: 0x6c7aee20, 0x36819: 0x6c7af020, 0x3681a: 0x6c7af220, 0x3681b: 0x6c7af420, + 0x3681c: 0x6c7af620, 0x3681d: 0x6c7af820, 0x3681e: 0x6c7afa20, 0x3681f: 0x6c7afc20, + 0x36820: 0x6c7afe20, 0x36821: 0x6c63fc20, 0x36822: 0x6c7b0020, 0x36823: 0x6c7b0220, + 0x36824: 0x6c7b0420, 0x36825: 0x6ca3e820, 0x36826: 0x6ca3ea20, 0x36827: 0x6ca3ec20, + 0x36828: 0x6ca3ee20, 0x36829: 0x6ca3f020, 0x3682a: 0x6ca3f220, 0x3682b: 0x6ca3f420, + 0x3682c: 0x6ca3f620, 0x3682d: 0x6ca3f820, 0x3682e: 0x6ca3fa20, 0x3682f: 0x6ca3fc20, + 0x36830: 0x6ca3fe20, 0x36831: 0x6ca40020, 0x36832: 0x6ca40220, 0x36833: 0x6ca40420, + 0x36834: 0x6ca40620, 0x36835: 0x6ca40820, 0x36836: 0x6ca40a20, 0x36837: 0x6ca40c20, + 0x36838: 0x6ca40e20, 0x36839: 0x6ca41020, 0x3683a: 0x6ca41220, 0x3683b: 0x6cd1d020, + 0x3683c: 0x6cd1d220, 0x3683d: 0x6cd1d420, 0x3683e: 0x6cd1d620, 0x3683f: 0x6cd1d820, + // Block 0xda1, offset 0x36840 + 0x36840: 0x6cd1da20, 0x36841: 0x6cd1dc20, 0x36842: 0x6cd1de20, 0x36843: 0x6cd1e020, + 0x36844: 0x6cd1e220, 0x36845: 0x6cd1e420, 0x36846: 0x6cd1e620, 0x36847: 0x6cd1e820, + 0x36848: 0x6cd1ea20, 0x36849: 0x6cd1ec20, 0x3684a: 0x6cd1ee20, 0x3684b: 0x6cd1f020, + 0x3684c: 0x6cd1f220, 0x3684d: 0x6cd1f420, 0x3684e: 0x6cd1f620, 0x3684f: 0x6cd1f820, + 0x36850: 0x6cd1fa20, 0x36851: 0x6cffb620, 0x36852: 0x6cffb820, 0x36853: 0x6cffba20, + 0x36854: 0x6cffbc20, 0x36855: 0x6cffbe20, 0x36856: 0x6cffc020, 0x36857: 0x6cffc220, + 0x36858: 0x6cffc420, 0x36859: 0x6cffc620, 0x3685a: 0x6cffc820, 0x3685b: 0x6cffca20, + 0x3685c: 0x6cffcc20, 0x3685d: 0x6cffce20, 0x3685e: 0x6cffd020, 0x3685f: 0x6cffd220, + 0x36860: 0x6cffd420, 0x36861: 0x6cffd620, 0x36862: 0x6cffd820, 0x36863: 0x6cffda20, + 0x36864: 0x6cffdc20, 0x36865: 0x6cffde20, 0x36866: 0x6cffe020, 0x36867: 0x6cffe220, + 0x36868: 0x6cffe420, 0x36869: 0x6cffe620, 0x3686a: 0x6cffe820, 0x3686b: 0x6d2de820, + 0x3686c: 0x6d2dea20, 0x3686d: 0x6d2dec20, 0x3686e: 0x6d2dee20, 0x3686f: 0x6d2df020, + 0x36870: 0x6d2df220, 0x36871: 0x6d2df420, 0x36872: 0x6d2df620, 0x36873: 0x6d2df820, + 0x36874: 0x6d2dfa20, 0x36875: 0x6d2dfc20, 0x36876: 0x6d2dfe20, 0x36877: 0x6d5b0820, + 0x36878: 0x6d5b0a20, 0x36879: 0x6d5b0c20, 0x3687a: 0x6d5b0e20, 0x3687b: 0x6d5b1020, + 0x3687c: 0x6d5b1220, 0x3687d: 0x6d5b1420, 0x3687e: 0x6d5b1620, 0x3687f: 0x6d5b1820, + // Block 0xda2, offset 0x36880 + 0x36880: 0x6d5b1a20, 0x36881: 0x6d5b1c20, 0x36882: 0x6d5b1e20, 0x36883: 0x6d5b2020, + 0x36884: 0x6d5b2220, 0x36885: 0x6d5b2420, 0x36886: 0x6d5b2620, 0x36887: 0x6d5b2820, + 0x36888: 0x6d85a620, 0x36889: 0x6d85a820, 0x3688a: 0x6d85aa20, 0x3688b: 0x6d85ac20, + 0x3688c: 0x6d85ae20, 0x3688d: 0x6d85b020, 0x3688e: 0x6d85b220, 0x3688f: 0x6d75d020, + 0x36890: 0x6d85b420, 0x36891: 0x6d85b620, 0x36892: 0x6daa4a20, 0x36893: 0x6daa4c20, + 0x36894: 0x6daa4e20, 0x36895: 0x6daa5020, 0x36896: 0x6daa5220, 0x36897: 0x6daa5420, + 0x36898: 0x6daa5620, 0x36899: 0x6daa5820, 0x3689a: 0x6daa5a20, 0x3689b: 0x6db99020, + 0x3689c: 0x6daa5c20, 0x3689d: 0x6daa5e20, 0x3689e: 0x6daa6020, 0x3689f: 0x6daa6220, + 0x368a0: 0x6daa6420, 0x368a1: 0x6daa6620, 0x368a2: 0x6daa6820, 0x368a3: 0x6daa6a20, + 0x368a4: 0x6dcb1020, 0x368a5: 0x6dcb1220, 0x368a6: 0x6dcb1420, 0x368a7: 0x6dcb1620, + 0x368a8: 0x6dcb1820, 0x368a9: 0x6de68420, 0x368aa: 0x6de68620, 0x368ab: 0x6de68820, + 0x368ac: 0x6de68a20, 0x368ad: 0x6de68c20, 0x368ae: 0x6de68e20, 0x368af: 0x6de69020, + 0x368b0: 0x6de69220, 0x368b1: 0x6dfd3820, 0x368b2: 0x6de69420, 0x368b3: 0x6dfd3a20, + 0x368b4: 0x6dfd3c20, 0x368b5: 0x6dfd3e20, 0x368b6: 0x6dfd4020, 0x368b7: 0x6dfd4220, + 0x368b8: 0x6dfd4420, 0x368b9: 0x6e100e20, 0x368ba: 0x6e101020, 0x368bb: 0x6e101220, + 0x368bc: 0x6e101420, 0x368bd: 0x6e101620, 0x368be: 0x6e101820, 0x368bf: 0x6e1ee020, + // Block 0xda3, offset 0x368c0 + 0x368c0: 0x6e1ee220, 0x368c1: 0x6e1ee420, 0x368c2: 0x6e2a4220, 0x368c3: 0x6e2a4420, + 0x368c4: 0x6e2a4620, 0x368c5: 0x6e32ec20, 0x368c6: 0x6e392820, 0x368c7: 0x6e3d7620, + 0x368c8: 0x6e3d7820, 0x368c9: 0x6e3d7a20, 0x368ca: 0x6e3d7c20, 0x368cb: 0x6e3d7e20, + 0x368cc: 0x6e407e20, 0x368cd: 0x6e408020, 0x368ce: 0x6e42c620, 0x368cf: 0x6e452820, + 0x368d0: 0x6e463220, 0x368d1: 0x6e468620, 0x368d2: 0x6e46e820, 0x368d3: 0x6c0a1c20, + 0x368d4: 0x6c0a1e20, 0x368d5: 0x6c13dc20, 0x368d6: 0x6c3c1620, 0x368d7: 0x6c7b1020, + 0x368d8: 0x6c588e20, 0x368d9: 0x6cd20c20, 0x368da: 0x6cd20e20, 0x368db: 0x6cd21020, + 0x368dc: 0x6cfff220, 0x368dd: 0x6cfff420, 0x368de: 0x6d5b2e20, 0x368df: 0x6d85be20, + 0x368e0: 0x6d85c020, 0x368e1: 0x6d85c220, 0x368e2: 0x6d85c420, 0x368e3: 0x6dcb1e20, + 0x368e4: 0x6e1ee620, 0x368e5: 0x6c13de20, 0x368e6: 0x6c24e220, 0x368e7: 0x6c24e420, + 0x368e8: 0x6c24e620, 0x368e9: 0x6c24e820, 0x368ea: 0x6c24ea20, 0x368eb: 0x6c24ec20, + 0x368ec: 0x6c24ee20, 0x368ed: 0x6c24f020, 0x368ee: 0x6c24f220, 0x368ef: 0x6c3c3220, + 0x368f0: 0x6c3c3420, 0x368f1: 0x6c3c3620, 0x368f2: 0x6c3c3820, 0x368f3: 0x6c3c3a20, + 0x368f4: 0x6c3c3c20, 0x368f5: 0x6c3c3e20, 0x368f6: 0x6c3c4020, 0x368f7: 0x6c58ba20, + 0x368f8: 0x6c58bc20, 0x368f9: 0x6c58be20, 0x368fa: 0x6c58c020, 0x368fb: 0x6c58c220, + 0x368fc: 0x6c58c420, 0x368fd: 0x6c58c620, 0x368fe: 0x6c58c820, 0x368ff: 0x6c58ca20, + // Block 0xda4, offset 0x36900 + 0x36900: 0x6c58cc20, 0x36901: 0x6c58ce20, 0x36902: 0x6c58d020, 0x36903: 0x6c58d220, + 0x36904: 0x6c58d420, 0x36905: 0x6c58d620, 0x36906: 0x6c58d820, 0x36907: 0x6c58da20, + 0x36908: 0x6c58dc20, 0x36909: 0x6c58de20, 0x3690a: 0x6c58e020, 0x3690b: 0x6c58e220, + 0x3690c: 0x6c58e420, 0x3690d: 0x6c58e620, 0x3690e: 0x6c58e820, 0x3690f: 0x6c58ea20, + 0x36910: 0x6c58ec20, 0x36911: 0x6c58ee20, 0x36912: 0x6c58f020, 0x36913: 0x6c58f220, + 0x36914: 0x6c58f420, 0x36915: 0x6c58f620, 0x36916: 0x6c58f820, 0x36917: 0x6c7b5c20, + 0x36918: 0x6c7b5e20, 0x36919: 0x6c7b6020, 0x3691a: 0x6c7b6220, 0x3691b: 0x6c7b6420, + 0x3691c: 0x6c7b6620, 0x3691d: 0x6c7b6820, 0x3691e: 0x6c7b6a20, 0x3691f: 0x6c7b6c20, + 0x36920: 0x6c7b6e20, 0x36921: 0x6c7b7020, 0x36922: 0x6c7b7220, 0x36923: 0x6c7b7420, + 0x36924: 0x6c7b7620, 0x36925: 0x6c7b7820, 0x36926: 0x6c7b7a20, 0x36927: 0x6c7b7c20, + 0x36928: 0x6c7b7e20, 0x36929: 0x6c7b8020, 0x3692a: 0x6c7b8220, 0x3692b: 0x6c7b8420, + 0x3692c: 0x6c7b8620, 0x3692d: 0x6c7b8820, 0x3692e: 0x6c7b8a20, 0x3692f: 0x6c7b8c20, + 0x36930: 0x6c7b8e20, 0x36931: 0x6c7b9020, 0x36932: 0x6c7b9220, 0x36933: 0x6c7b9420, + 0x36934: 0x6c7b9620, 0x36935: 0x6c7b9820, 0x36936: 0x6c7b9a20, 0x36937: 0x6ca44820, + 0x36938: 0x6ca44a20, 0x36939: 0x6ca44c20, 0x3693a: 0x6ca44e20, 0x3693b: 0x6ca45020, + 0x3693c: 0x6ca45220, 0x3693d: 0x6ca45420, 0x3693e: 0x6ca45620, 0x3693f: 0x6ca45820, + // Block 0xda5, offset 0x36940 + 0x36940: 0x6ca45a20, 0x36941: 0x6ca45c20, 0x36942: 0x6ca45e20, 0x36943: 0x6ca46020, + 0x36944: 0x6ca46220, 0x36945: 0x6ca46420, 0x36946: 0x6ca46620, 0x36947: 0x6ca46820, + 0x36948: 0x6ca46a20, 0x36949: 0x6ca46c20, 0x3694a: 0x6ca46e20, 0x3694b: 0x6ca47020, + 0x3694c: 0x6ca47220, 0x3694d: 0x6ca47420, 0x3694e: 0x6ca47620, 0x3694f: 0x6ca47820, + 0x36950: 0x6ca47a20, 0x36951: 0x6ca47c20, 0x36952: 0x6ca47e20, 0x36953: 0x6ca48020, + 0x36954: 0x6ca48220, 0x36955: 0x6cd25a20, 0x36956: 0x6cd25c20, 0x36957: 0x6cd25e20, + 0x36958: 0x6cd26020, 0x36959: 0x6cd26220, 0x3695a: 0x6cd26420, 0x3695b: 0x6cd26620, + 0x3695c: 0x6cd26820, 0x3695d: 0x6cd26a20, 0x3695e: 0x6cd26c20, 0x3695f: 0x6cd26e20, + 0x36960: 0x6cd27020, 0x36961: 0x6cd27220, 0x36962: 0x6cd27420, 0x36963: 0x6cd27620, + 0x36964: 0x6cd27820, 0x36965: 0x6cd27a20, 0x36966: 0x6cd27c20, 0x36967: 0x6cd27e20, + 0x36968: 0x6cd28020, 0x36969: 0x6cd28220, 0x3696a: 0x6cd28420, 0x3696b: 0x6cd28620, + 0x3696c: 0x6cd28820, 0x3696d: 0x6cd28a20, 0x3696e: 0x6cd28c20, 0x3696f: 0x6cd28e20, + 0x36970: 0x6cd29020, 0x36971: 0x6cd29220, 0x36972: 0x6cd29420, 0x36973: 0x6cd29620, + 0x36974: 0x6cd29820, 0x36975: 0x6cd29a20, 0x36976: 0x6cd29c20, 0x36977: 0x6cd29e20, + 0x36978: 0x6cd2a020, 0x36979: 0x6cd2a220, 0x3697a: 0x6cd2a420, 0x3697b: 0x6cd2a620, + 0x3697c: 0x6cd2a820, 0x3697d: 0x6cd2aa20, 0x3697e: 0x6cd2ac20, 0x3697f: 0x6cd2ae20, + // Block 0xda6, offset 0x36980 + 0x36980: 0x6cd2b020, 0x36981: 0x6cd2b220, 0x36982: 0x6d003c20, 0x36983: 0x6d003e20, + 0x36984: 0x6d004020, 0x36985: 0x6d004220, 0x36986: 0x6d004420, 0x36987: 0x6d004620, + 0x36988: 0x6d004820, 0x36989: 0x6d004a20, 0x3698a: 0x6d004c20, 0x3698b: 0x6d004e20, + 0x3698c: 0x6d005020, 0x3698d: 0x6d005220, 0x3698e: 0x6d005420, 0x3698f: 0x6d005620, + 0x36990: 0x6d005820, 0x36991: 0x6d005a20, 0x36992: 0x6d005c20, 0x36993: 0x6d005e20, + 0x36994: 0x6d006020, 0x36995: 0x6d006220, 0x36996: 0x6d006420, 0x36997: 0x6d006620, + 0x36998: 0x6d006820, 0x36999: 0x6d006a20, 0x3699a: 0x6d006c20, 0x3699b: 0x6d006e20, + 0x3699c: 0x6d007020, 0x3699d: 0x6d007220, 0x3699e: 0x6d007420, 0x3699f: 0x6d007620, + 0x369a0: 0x6d007820, 0x369a1: 0x6d007a20, 0x369a2: 0x6d007c20, 0x369a3: 0x6d007e20, + 0x369a4: 0x6d008020, 0x369a5: 0x6d008220, 0x369a6: 0x6d008420, 0x369a7: 0x6d008620, + 0x369a8: 0x6d008820, 0x369a9: 0x6d008a20, 0x369aa: 0x6d008c20, 0x369ab: 0x6d008e20, + 0x369ac: 0x6d009020, 0x369ad: 0x6d009220, 0x369ae: 0x6d009420, 0x369af: 0x6d009620, + 0x369b0: 0x6d009820, 0x369b1: 0x6d009a20, 0x369b2: 0x6d009c20, 0x369b3: 0x6d009e20, + 0x369b4: 0x6d00a020, 0x369b5: 0x6d00a220, 0x369b6: 0x6d00a420, 0x369b7: 0x6d00a620, + 0x369b8: 0x6d00a820, 0x369b9: 0x6d00aa20, 0x369ba: 0x6d00ac20, 0x369bb: 0x6d2e4220, + 0x369bc: 0x6d2e4420, 0x369bd: 0x6d2e4620, 0x369be: 0x6d2e4820, 0x369bf: 0x6d2e4a20, + // Block 0xda7, offset 0x369c0 + 0x369c0: 0x6d2e4c20, 0x369c1: 0x6d2e4e20, 0x369c2: 0x6d2e5020, 0x369c3: 0x6d2e5220, + 0x369c4: 0x6d2e5420, 0x369c5: 0x6d2e5620, 0x369c6: 0x6d2e5820, 0x369c7: 0x6d2e5a20, + 0x369c8: 0x6d2e5c20, 0x369c9: 0x6d2e5e20, 0x369ca: 0x6d2e6020, 0x369cb: 0x6d2e6220, + 0x369cc: 0x6d2e6420, 0x369cd: 0x6d2e6620, 0x369ce: 0x6d2e6820, 0x369cf: 0x6d2e6a20, + 0x369d0: 0x6d2e6c20, 0x369d1: 0x6d2e6e20, 0x369d2: 0x6d2e7020, 0x369d3: 0x6d2e7220, + 0x369d4: 0x6d2e7420, 0x369d5: 0x6d2e7620, 0x369d6: 0x6d2e7820, 0x369d7: 0x6d2e7a20, + 0x369d8: 0x6d2e7c20, 0x369d9: 0x6d2e7e20, 0x369da: 0x6d2e8020, 0x369db: 0x6d2e8220, + 0x369dc: 0x6d2e8420, 0x369dd: 0x6d2e8620, 0x369de: 0x6d2e8820, 0x369df: 0x6d2e8a20, + 0x369e0: 0x6d2e8c20, 0x369e1: 0x6d2e8e20, 0x369e2: 0x6d2e9020, 0x369e3: 0x6d2e9220, + 0x369e4: 0x6d2e9420, 0x369e5: 0x6d2e9620, 0x369e6: 0x6d2e9820, 0x369e7: 0x6d2e9a20, + 0x369e8: 0x6d2e9c20, 0x369e9: 0x6d2e9e20, 0x369ea: 0x6d5b6c20, 0x369eb: 0x6d5b6e20, + 0x369ec: 0x6d5b7020, 0x369ed: 0x6d5b7220, 0x369ee: 0x6d5b7420, 0x369ef: 0x6d5b7620, + 0x369f0: 0x6d5b7820, 0x369f1: 0x6d5b7a20, 0x369f2: 0x6d5b7c20, 0x369f3: 0x6d5b7e20, + 0x369f4: 0x6d5b8020, 0x369f5: 0x6d5b8220, 0x369f6: 0x6d5b8420, 0x369f7: 0x6d5b8620, + 0x369f8: 0x6d5b8820, 0x369f9: 0x6d5b8a20, 0x369fa: 0x6d5b8c20, 0x369fb: 0x6d5b8e20, + 0x369fc: 0x6d5b9020, 0x369fd: 0x6d5b9220, 0x369fe: 0x6d5b9420, 0x369ff: 0x6d5b9620, + // Block 0xda8, offset 0x36a00 + 0x36a00: 0x6d5b9820, 0x36a01: 0x6d5b9a20, 0x36a02: 0x6d5b9c20, 0x36a03: 0x6d5b9e20, + 0x36a04: 0x6d5ba020, 0x36a05: 0x6d5ba220, 0x36a06: 0x6d5ba420, 0x36a07: 0x6d5ba620, + 0x36a08: 0x6d5ba820, 0x36a09: 0x6d5baa20, 0x36a0a: 0x6d5bac20, 0x36a0b: 0x6d5bae20, + 0x36a0c: 0x6d5bb020, 0x36a0d: 0x6d5bb220, 0x36a0e: 0x6d5bb420, 0x36a0f: 0x6d5bb620, + 0x36a10: 0x6d5bb820, 0x36a11: 0x6d5bba20, 0x36a12: 0x6d5bbc20, 0x36a13: 0x6d5bbe20, + 0x36a14: 0x6d5bc020, 0x36a15: 0x6d5bc220, 0x36a16: 0x6d5bc420, 0x36a17: 0x6d5bc620, + 0x36a18: 0x6d5bc820, 0x36a19: 0x6d5bca20, 0x36a1a: 0x6d5bcc20, 0x36a1b: 0x6d5bce20, + 0x36a1c: 0x6d5bd020, 0x36a1d: 0x6d85fe20, 0x36a1e: 0x6d860020, 0x36a1f: 0x6d860220, + 0x36a20: 0x6d860420, 0x36a21: 0x6d860620, 0x36a22: 0x6d860820, 0x36a23: 0x6d860a20, + 0x36a24: 0x6d860c20, 0x36a25: 0x6d860e20, 0x36a26: 0x6d861020, 0x36a27: 0x6d861220, + 0x36a28: 0x6d861420, 0x36a29: 0x6d861620, 0x36a2a: 0x6d861820, 0x36a2b: 0x6d861a20, + 0x36a2c: 0x6d861c20, 0x36a2d: 0x6d861e20, 0x36a2e: 0x6d862020, 0x36a2f: 0x6d862220, + 0x36a30: 0x6d862420, 0x36a31: 0x6d862620, 0x36a32: 0x6d862820, 0x36a33: 0x6d862a20, + 0x36a34: 0x6d862c20, 0x36a35: 0x6d862e20, 0x36a36: 0x6d863020, 0x36a37: 0x6d863220, + 0x36a38: 0x6d863420, 0x36a39: 0x6d863620, 0x36a3a: 0x6d863820, 0x36a3b: 0x6d863a20, + 0x36a3c: 0x6d863c20, 0x36a3d: 0x6d863e20, 0x36a3e: 0x6d864020, 0x36a3f: 0x6d864220, + // Block 0xda9, offset 0x36a40 + 0x36a40: 0x6d864420, 0x36a41: 0x6d864620, 0x36a42: 0x6d864820, 0x36a43: 0x6daa9020, + 0x36a44: 0x6daa9220, 0x36a45: 0x6daa9420, 0x36a46: 0x6daa9620, 0x36a47: 0x6daa9820, + 0x36a48: 0x6daa9a20, 0x36a49: 0x6daa9c20, 0x36a4a: 0x6daa9e20, 0x36a4b: 0x6daaa020, + 0x36a4c: 0x6daaa220, 0x36a4d: 0x6daaa420, 0x36a4e: 0x6daaa620, 0x36a4f: 0x6daaa820, + 0x36a50: 0x6daaaa20, 0x36a51: 0x6daaac20, 0x36a52: 0x6daaae20, 0x36a53: 0x6daab020, + 0x36a54: 0x6daab220, 0x36a55: 0x6daab420, 0x36a56: 0x6daab620, 0x36a57: 0x6daab820, + 0x36a58: 0x6daaba20, 0x36a59: 0x6daabc20, 0x36a5a: 0x6daabe20, 0x36a5b: 0x6daac020, + 0x36a5c: 0x6daac220, 0x36a5d: 0x6daac420, 0x36a5e: 0x6d864a20, 0x36a5f: 0x6daac620, + 0x36a60: 0x6daac820, 0x36a61: 0x6daaca20, 0x36a62: 0x6daacc20, 0x36a63: 0x6daace20, + 0x36a64: 0x6daad020, 0x36a65: 0x6daad220, 0x36a66: 0x6daad420, 0x36a67: 0x6daad620, + 0x36a68: 0x6daad820, 0x36a69: 0x6daada20, 0x36a6a: 0x6daadc20, 0x36a6b: 0x6daade20, + 0x36a6c: 0x6daae020, 0x36a6d: 0x6daae220, 0x36a6e: 0x6daae420, 0x36a6f: 0x6daae620, + 0x36a70: 0x6daae820, 0x36a71: 0x6daaea20, 0x36a72: 0x6daaec20, 0x36a73: 0x6daaee20, + 0x36a74: 0x6daaf020, 0x36a75: 0x6daaf220, 0x36a76: 0x6daaf420, 0x36a77: 0x6daaf620, + 0x36a78: 0x6daaf820, 0x36a79: 0x6daafa20, 0x36a7a: 0x6dcb4c20, 0x36a7b: 0x6dcb4e20, + 0x36a7c: 0x6dcb5020, 0x36a7d: 0x6dcb5220, 0x36a7e: 0x6dcb5420, 0x36a7f: 0x6dcb5620, + // Block 0xdaa, offset 0x36a80 + 0x36a80: 0x6dcb5820, 0x36a81: 0x6dcb5a20, 0x36a82: 0x6dcb5c20, 0x36a83: 0x6dcb5e20, + 0x36a84: 0x6dcb6020, 0x36a85: 0x6dcb6220, 0x36a86: 0x6dcb6420, 0x36a87: 0x6dcb6620, + 0x36a88: 0x6dcb6820, 0x36a89: 0x6dcb6a20, 0x36a8a: 0x6dcb6c20, 0x36a8b: 0x6dcb6e20, + 0x36a8c: 0x6dcb7020, 0x36a8d: 0x6dcb7220, 0x36a8e: 0x6dcb7420, 0x36a8f: 0x6dcb7620, + 0x36a90: 0x6dcb7820, 0x36a91: 0x6dcb7a20, 0x36a92: 0x6dcb7c20, 0x36a93: 0x6dcb7e20, + 0x36a94: 0x6dcb8020, 0x36a95: 0x6de6a420, 0x36a96: 0x6de6a620, 0x36a97: 0x6de6a820, + 0x36a98: 0x6de6aa20, 0x36a99: 0x6de6ac20, 0x36a9a: 0x6de6ae20, 0x36a9b: 0x6de6b020, + 0x36a9c: 0x6de6b220, 0x36a9d: 0x6de6b420, 0x36a9e: 0x6de6b620, 0x36a9f: 0x6de6b820, + 0x36aa0: 0x6de6ba20, 0x36aa1: 0x6de6bc20, 0x36aa2: 0x6de6be20, 0x36aa3: 0x6de6c020, + 0x36aa4: 0x6de6c220, 0x36aa5: 0x6de6c420, 0x36aa6: 0x6de6c620, 0x36aa7: 0x6de6c820, + 0x36aa8: 0x6de6ca20, 0x36aa9: 0x6de6cc20, 0x36aaa: 0x6de6ce20, 0x36aab: 0x6de6d020, + 0x36aac: 0x6de6d220, 0x36aad: 0x6de6d420, 0x36aae: 0x6de6d620, 0x36aaf: 0x6de6d820, + 0x36ab0: 0x6dfd5220, 0x36ab1: 0x6dfd5420, 0x36ab2: 0x6dfd5620, 0x36ab3: 0x6dfd5820, + 0x36ab4: 0x6dfd5a20, 0x36ab5: 0x6dfd5c20, 0x36ab6: 0x6dfd5e20, 0x36ab7: 0x6dfd6020, + 0x36ab8: 0x6dfd6220, 0x36ab9: 0x6dfd6420, 0x36aba: 0x6dfd6620, 0x36abb: 0x6dfd6820, + 0x36abc: 0x6dfd6a20, 0x36abd: 0x6dfd6c20, 0x36abe: 0x6dfd6e20, 0x36abf: 0x6dfd7020, + // Block 0xdab, offset 0x36ac0 + 0x36ac0: 0x6e102e20, 0x36ac1: 0x6e103020, 0x36ac2: 0x6e103220, 0x36ac3: 0x6e103420, + 0x36ac4: 0x6e103620, 0x36ac5: 0x6e103820, 0x36ac6: 0x6e103a20, 0x36ac7: 0x6e103c20, + 0x36ac8: 0x6e103e20, 0x36ac9: 0x6e104020, 0x36aca: 0x6e104220, 0x36acb: 0x6e1ef020, + 0x36acc: 0x6e1ef220, 0x36acd: 0x6e1ef420, 0x36ace: 0x6e1ef620, 0x36acf: 0x6e1ef820, + 0x36ad0: 0x6e2a4e20, 0x36ad1: 0x6e2a5020, 0x36ad2: 0x6e2a5220, 0x36ad3: 0x6e2a5420, + 0x36ad4: 0x6e2a5620, 0x36ad5: 0x6e2a5820, 0x36ad6: 0x6e2a5a20, 0x36ad7: 0x6e2a5c20, + 0x36ad8: 0x6e32f620, 0x36ad9: 0x6e32f820, 0x36ada: 0x6e32fa20, 0x36adb: 0x6e32fc20, + 0x36adc: 0x6e392a20, 0x36add: 0x6e392c20, 0x36ade: 0x6e392e20, 0x36adf: 0x6e3d8220, + 0x36ae0: 0x6e3d8420, 0x36ae1: 0x6e3d8620, 0x36ae2: 0x6e408220, 0x36ae3: 0x6e42cc20, + 0x36ae4: 0x6e443a20, 0x36ae5: 0x6c24f420, 0x36ae6: 0x6c24f620, 0x36ae7: 0x6c590820, + 0x36ae8: 0x6c590a20, 0x36ae9: 0x6c7ba420, 0x36aea: 0x6c7ba620, 0x36aeb: 0x6c7ba820, + 0x36aec: 0x6ca48620, 0x36aed: 0x6ca48820, 0x36aee: 0x6ca48a20, 0x36aef: 0x6cd2bc20, + 0x36af0: 0x6cd2be20, 0x36af1: 0x6cd2c020, 0x36af2: 0x6cd2c220, 0x36af3: 0x6d00b420, + 0x36af4: 0x6d00b620, 0x36af5: 0x6d00b820, 0x36af6: 0x6d2ea620, 0x36af7: 0x6d5bd820, + 0x36af8: 0x6d5bda20, 0x36af9: 0x6d864c20, 0x36afa: 0x6d864e20, 0x36afb: 0x6dfd7220, + 0x36afc: 0x6d865020, 0x36afd: 0x6c13e420, 0x36afe: 0x6c13e620, 0x36aff: 0x6c250220, + // Block 0xdac, offset 0x36b00 + 0x36b00: 0x6c250420, 0x36b01: 0x6c250620, 0x36b02: 0x6c3c4820, 0x36b03: 0x6c3c4a20, + 0x36b04: 0x6c3c4c20, 0x36b05: 0x6c3c4e20, 0x36b06: 0x6c3c5020, 0x36b07: 0x6c3c5220, + 0x36b08: 0x6c591620, 0x36b09: 0x6c591820, 0x36b0a: 0x6c591a20, 0x36b0b: 0x6c591c20, + 0x36b0c: 0x6c591e20, 0x36b0d: 0x6c592020, 0x36b0e: 0x6c592220, 0x36b0f: 0x6c592420, + 0x36b10: 0x6c592620, 0x36b11: 0x6c592820, 0x36b12: 0x6c592a20, 0x36b13: 0x6c592c20, + 0x36b14: 0x6c592e20, 0x36b15: 0x6c593020, 0x36b16: 0x6c593220, 0x36b17: 0x6c593420, + 0x36b18: 0x6c7bb620, 0x36b19: 0x6c7bb820, 0x36b1a: 0x6c7bba20, 0x36b1b: 0x6c7bbc20, + 0x36b1c: 0x6c7bbe20, 0x36b1d: 0x6c7bc020, 0x36b1e: 0x6c7bc220, 0x36b1f: 0x6c7bc420, + 0x36b20: 0x6c7bc620, 0x36b21: 0x6c7bc820, 0x36b22: 0x6c7bca20, 0x36b23: 0x6c7bcc20, + 0x36b24: 0x6c7bce20, 0x36b25: 0x6ca49a20, 0x36b26: 0x6ca49c20, 0x36b27: 0x6ca49e20, + 0x36b28: 0x6ca4a020, 0x36b29: 0x6ca4a220, 0x36b2a: 0x6ca4a420, 0x36b2b: 0x6ca4a620, + 0x36b2c: 0x6cd2d020, 0x36b2d: 0x6cd2d220, 0x36b2e: 0x6cd2d420, 0x36b2f: 0x6cd2d620, + 0x36b30: 0x6cd2d820, 0x36b31: 0x6cd2da20, 0x36b32: 0x6cd2dc20, 0x36b33: 0x6cd2de20, + 0x36b34: 0x6cd2e020, 0x36b35: 0x6cd2e220, 0x36b36: 0x6cd2e420, 0x36b37: 0x6cd2e620, + 0x36b38: 0x6cd2e820, 0x36b39: 0x6d00c220, 0x36b3a: 0x6d00c420, 0x36b3b: 0x6d00c620, + 0x36b3c: 0x6d00c820, 0x36b3d: 0x6d00ca20, 0x36b3e: 0x6d00cc20, 0x36b3f: 0x6d00ce20, + // Block 0xdad, offset 0x36b40 + 0x36b40: 0x6d00d020, 0x36b41: 0x6d00d220, 0x36b42: 0x6d00d420, 0x36b43: 0x6d00d620, + 0x36b44: 0x6d00d820, 0x36b45: 0x6d00da20, 0x36b46: 0x6d00dc20, 0x36b47: 0x6d00de20, + 0x36b48: 0x6d2eac20, 0x36b49: 0x6d2eae20, 0x36b4a: 0x6d2eb020, 0x36b4b: 0x6d2eb220, + 0x36b4c: 0x6d2eb420, 0x36b4d: 0x6d2eb620, 0x36b4e: 0x6d2eb820, 0x36b4f: 0x6d2eba20, + 0x36b50: 0x6d2ebc20, 0x36b51: 0x6d2ebe20, 0x36b52: 0x6d2ec020, 0x36b53: 0x6d2ec220, + 0x36b54: 0x6d5be820, 0x36b55: 0x6d5bea20, 0x36b56: 0x6d5bec20, 0x36b57: 0x6d5bee20, + 0x36b58: 0x6d5bf020, 0x36b59: 0x6d5bf220, 0x36b5a: 0x6d5bf420, 0x36b5b: 0x6d865a20, + 0x36b5c: 0x6d865c20, 0x36b5d: 0x6d865e20, 0x36b5e: 0x6d866020, 0x36b5f: 0x6d866220, + 0x36b60: 0x6dab0820, 0x36b61: 0x6dab0a20, 0x36b62: 0x6dab0c20, 0x36b63: 0x6dab0e20, + 0x36b64: 0x6dab1020, 0x36b65: 0x6dab1220, 0x36b66: 0x6dab1420, 0x36b67: 0x6dcb8a20, + 0x36b68: 0x6dcb8c20, 0x36b69: 0x6dcb8e20, 0x36b6a: 0x6dcb9020, 0x36b6b: 0x6de6e020, + 0x36b6c: 0x6de6e220, 0x36b6d: 0x6de6e420, 0x36b6e: 0x6de6e620, 0x36b6f: 0x6de6e820, + 0x36b70: 0x6de6ea20, 0x36b71: 0x6de6ec20, 0x36b72: 0x6de6ee20, 0x36b73: 0x6de6f020, + 0x36b74: 0x6dfd7820, 0x36b75: 0x6dfd7a20, 0x36b76: 0x6dfd7c20, 0x36b77: 0x6dfd7e20, + 0x36b78: 0x6e104820, 0x36b79: 0x6e104a20, 0x36b7a: 0x6e104c20, 0x36b7b: 0x6e1efa20, + 0x36b7c: 0x6e1efc20, 0x36b7d: 0x6e1efe20, 0x36b7e: 0x6e2a5e20, 0x36b7f: 0x6e2a6020, + // Block 0xdae, offset 0x36b80 + 0x36b80: 0x6e32fe20, 0x36b81: 0x6e330020, 0x36b82: 0x6e330220, 0x36b83: 0x6e330420, + 0x36b84: 0x6e393220, 0x36b85: 0x6e443c20, 0x36b86: 0x6c250820, 0x36b87: 0x6c250a20, + 0x36b88: 0x6c3c5820, 0x36b89: 0x6c3c5a20, 0x36b8a: 0x6c3c5c20, 0x36b8b: 0x6c3c5e20, + 0x36b8c: 0x6c3c6020, 0x36b8d: 0x6c3c6220, 0x36b8e: 0x6c593e20, 0x36b8f: 0x6c594020, + 0x36b90: 0x6c594220, 0x36b91: 0x6c594420, 0x36b92: 0x6c594620, 0x36b93: 0x6c594820, + 0x36b94: 0x6c594a20, 0x36b95: 0x6c7bdc20, 0x36b96: 0x6c7bde20, 0x36b97: 0x6c7be020, + 0x36b98: 0x6c7be220, 0x36b99: 0x6c7be420, 0x36b9a: 0x6c7be620, 0x36b9b: 0x6c7be820, + 0x36b9c: 0x6c7bea20, 0x36b9d: 0x6c7bec20, 0x36b9e: 0x6c7bee20, 0x36b9f: 0x6ca4ae20, + 0x36ba0: 0x6ca4b020, 0x36ba1: 0x6ca4b220, 0x36ba2: 0x6ca4b420, 0x36ba3: 0x6ca4b620, + 0x36ba4: 0x6ca4b820, 0x36ba5: 0x6ca4ba20, 0x36ba6: 0x6ca4bc20, 0x36ba7: 0x6cd2f420, + 0x36ba8: 0x6cd2f620, 0x36ba9: 0x6cd2f820, 0x36baa: 0x6cd2fa20, 0x36bab: 0x6cd2fc20, + 0x36bac: 0x6cd2fe20, 0x36bad: 0x6cd30020, 0x36bae: 0x6cd30220, 0x36baf: 0x6d00ec20, + 0x36bb0: 0x6cd30420, 0x36bb1: 0x6cd30620, 0x36bb2: 0x6cd30820, 0x36bb3: 0x6d00ee20, + 0x36bb4: 0x6d00f020, 0x36bb5: 0x6d00f220, 0x36bb6: 0x6d00f420, 0x36bb7: 0x6d00f620, + 0x36bb8: 0x6d00f820, 0x36bb9: 0x6d00fa20, 0x36bba: 0x6d00fc20, 0x36bbb: 0x6d00fe20, + 0x36bbc: 0x6d010020, 0x36bbd: 0x6d010220, 0x36bbe: 0x6d010420, 0x36bbf: 0x6d010620, + // Block 0xdaf, offset 0x36bc0 + 0x36bc0: 0x6d2ed420, 0x36bc1: 0x6d2ed620, 0x36bc2: 0x6d2ed820, 0x36bc3: 0x6d2eda20, + 0x36bc4: 0x6d2edc20, 0x36bc5: 0x6d2ede20, 0x36bc6: 0x6d2ee020, 0x36bc7: 0x6d2ee220, + 0x36bc8: 0x6d2ee420, 0x36bc9: 0x6d2ee620, 0x36bca: 0x6d2ee820, 0x36bcb: 0x6d2eea20, + 0x36bcc: 0x6d2eec20, 0x36bcd: 0x6d5bfe20, 0x36bce: 0x6d5c0020, 0x36bcf: 0x6d5c0220, + 0x36bd0: 0x6d5c0420, 0x36bd1: 0x6d5c0620, 0x36bd2: 0x6d5c0820, 0x36bd3: 0x6d5c0a20, + 0x36bd4: 0x6d866820, 0x36bd5: 0x6d866a20, 0x36bd6: 0x6d866c20, 0x36bd7: 0x6d866e20, + 0x36bd8: 0x6d867020, 0x36bd9: 0x6d867220, 0x36bda: 0x6d867420, 0x36bdb: 0x6d867620, + 0x36bdc: 0x6d867820, 0x36bdd: 0x6d867a20, 0x36bde: 0x6d867c20, 0x36bdf: 0x6dab1820, + 0x36be0: 0x6dab1a20, 0x36be1: 0x6dab1c20, 0x36be2: 0x6dcb9620, 0x36be3: 0x6dcb9820, + 0x36be4: 0x6dcb9a20, 0x36be5: 0x6dcb9c20, 0x36be6: 0x6dcb9e20, 0x36be7: 0x6dcba020, + 0x36be8: 0x6dcba220, 0x36be9: 0x6dcba420, 0x36bea: 0x6dcba620, 0x36beb: 0x6de6f220, + 0x36bec: 0x6de6f420, 0x36bed: 0x6de6f620, 0x36bee: 0x6de6f820, 0x36bef: 0x6dfd8420, + 0x36bf0: 0x6dfd8620, 0x36bf1: 0x6dfd8820, 0x36bf2: 0x6dfd8a20, 0x36bf3: 0x6dfd8c20, + 0x36bf4: 0x6e105020, 0x36bf5: 0x6e105220, 0x36bf6: 0x6e1f0220, 0x36bf7: 0x6e1f0420, + 0x36bf8: 0x6e1f0620, 0x36bf9: 0x6e330620, 0x36bfa: 0x6e330820, 0x36bfb: 0x6e3c7e20, + 0x36bfc: 0x6e3fda20, 0x36bfd: 0x6e450420, 0x36bfe: 0x6e46a420, 0x36bff: 0x6c251020, + // Block 0xdb0, offset 0x36c00 + 0x36c00: 0x6c251220, 0x36c01: 0x6c3c6a20, 0x36c02: 0x6c3c6c20, 0x36c03: 0x6c3c6e20, + 0x36c04: 0x6c3c7020, 0x36c05: 0x6c3c7220, 0x36c06: 0x6c595e20, 0x36c07: 0x6c596020, + 0x36c08: 0x6c596220, 0x36c09: 0x6c596420, 0x36c0a: 0x6c596620, 0x36c0b: 0x6c596820, + 0x36c0c: 0x6c596a20, 0x36c0d: 0x6c596c20, 0x36c0e: 0x6c7c0820, 0x36c0f: 0x6c7c0a20, + 0x36c10: 0x6c7c0c20, 0x36c11: 0x6c7c0e20, 0x36c12: 0x6c7c1020, 0x36c13: 0x6c7c1220, + 0x36c14: 0x6c7c1420, 0x36c15: 0x6c7c1620, 0x36c16: 0x6c7c1820, 0x36c17: 0x6c7c1a20, + 0x36c18: 0x6c7c1c20, 0x36c19: 0x6c7c1e20, 0x36c1a: 0x6c7c2020, 0x36c1b: 0x6c7c2220, + 0x36c1c: 0x6c7c2420, 0x36c1d: 0x6c7c2620, 0x36c1e: 0x6ca4d220, 0x36c1f: 0x6ca4d420, + 0x36c20: 0x6ca4d620, 0x36c21: 0x6ca4d820, 0x36c22: 0x6ca4da20, 0x36c23: 0x6ca4dc20, + 0x36c24: 0x6ca4de20, 0x36c25: 0x6ca4e020, 0x36c26: 0x6ca4e220, 0x36c27: 0x6ca4e420, + 0x36c28: 0x6ca4e620, 0x36c29: 0x6ca4e820, 0x36c2a: 0x6ca4ea20, 0x36c2b: 0x6c7c2820, + 0x36c2c: 0x6cd31220, 0x36c2d: 0x6cd31420, 0x36c2e: 0x6cd31620, 0x36c2f: 0x6cd31820, + 0x36c30: 0x6cd31a20, 0x36c31: 0x6cd31c20, 0x36c32: 0x6cd31e20, 0x36c33: 0x6cd32020, + 0x36c34: 0x6cd32220, 0x36c35: 0x6cd32420, 0x36c36: 0x6cd32620, 0x36c37: 0x6d011220, + 0x36c38: 0x6d011420, 0x36c39: 0x6d011620, 0x36c3a: 0x6d011820, 0x36c3b: 0x6d011a20, + 0x36c3c: 0x6d011c20, 0x36c3d: 0x6d011e20, 0x36c3e: 0x6d012020, 0x36c3f: 0x6d012220, + // Block 0xdb1, offset 0x36c40 + 0x36c40: 0x6d012420, 0x36c41: 0x6d012620, 0x36c42: 0x6d012820, 0x36c43: 0x6d2efc20, + 0x36c44: 0x6d2efe20, 0x36c45: 0x6d2f0020, 0x36c46: 0x6d2f0220, 0x36c47: 0x6d5c0e20, + 0x36c48: 0x6d5c1020, 0x36c49: 0x6d5c1220, 0x36c4a: 0x6d5c1420, 0x36c4b: 0x6d5c1620, + 0x36c4c: 0x6d5c1820, 0x36c4d: 0x6d5c1a20, 0x36c4e: 0x6d5c1c20, 0x36c4f: 0x6d5c1e20, + 0x36c50: 0x6d5c2020, 0x36c51: 0x6d5c2220, 0x36c52: 0x6d5c2420, 0x36c53: 0x6d868820, + 0x36c54: 0x6d868a20, 0x36c55: 0x6d868c20, 0x36c56: 0x6d868e20, 0x36c57: 0x6d869020, + 0x36c58: 0x6d869220, 0x36c59: 0x6d869420, 0x36c5a: 0x6d869620, 0x36c5b: 0x6d869820, + 0x36c5c: 0x6d869a20, 0x36c5d: 0x6d869c20, 0x36c5e: 0x6d869e20, 0x36c5f: 0x6d86a020, + 0x36c60: 0x6d86a220, 0x36c61: 0x6d86a420, 0x36c62: 0x6d86a620, 0x36c63: 0x6d86a820, + 0x36c64: 0x6d86aa20, 0x36c65: 0x6dab2620, 0x36c66: 0x6dab2820, 0x36c67: 0x6dab2a20, + 0x36c68: 0x6dab2c20, 0x36c69: 0x6dab2e20, 0x36c6a: 0x6dab3020, 0x36c6b: 0x6dab3220, + 0x36c6c: 0x6dab3420, 0x36c6d: 0x6dab3620, 0x36c6e: 0x6dab3820, 0x36c6f: 0x6dab3a20, + 0x36c70: 0x6dab3c20, 0x36c71: 0x6dab3e20, 0x36c72: 0x6dab4020, 0x36c73: 0x6da02a20, + 0x36c74: 0x6dab4220, 0x36c75: 0x6dab4420, 0x36c76: 0x6dab4620, 0x36c77: 0x6dab4820, + 0x36c78: 0x6dcbac20, 0x36c79: 0x6dcbae20, 0x36c7a: 0x6dcbb020, 0x36c7b: 0x6de6fc20, + 0x36c7c: 0x6dcbb220, 0x36c7d: 0x6dcbb420, 0x36c7e: 0x6dcbb620, 0x36c7f: 0x6dcbb820, + // Block 0xdb2, offset 0x36c80 + 0x36c80: 0x6dcbba20, 0x36c81: 0x6de6fe20, 0x36c82: 0x6de70020, 0x36c83: 0x6de70220, + 0x36c84: 0x6de70420, 0x36c85: 0x6de70620, 0x36c86: 0x6de70820, 0x36c87: 0x6dfd9020, + 0x36c88: 0x6dfd9220, 0x36c89: 0x6dfd9420, 0x36c8a: 0x6dfd9620, 0x36c8b: 0x6dfd9820, + 0x36c8c: 0x6dfd9a20, 0x36c8d: 0x6dfd9c20, 0x36c8e: 0x6dfd9e20, 0x36c8f: 0x6dfda020, + 0x36c90: 0x6dfda220, 0x36c91: 0x6dfda420, 0x36c92: 0x6e105620, 0x36c93: 0x6e1f0a20, + 0x36c94: 0x6e1f0c20, 0x36c95: 0x6e1f0e20, 0x36c96: 0x6e1f1020, 0x36c97: 0x6e1f1220, + 0x36c98: 0x6e2a6220, 0x36c99: 0x6e2a6420, 0x36c9a: 0x6e330a20, 0x36c9b: 0x6e330c20, + 0x36c9c: 0x6e330e20, 0x36c9d: 0x6e331020, 0x36c9e: 0x6e2a6620, 0x36c9f: 0x6e393420, + 0x36ca0: 0x6e393620, 0x36ca1: 0x6e3d8820, 0x36ca2: 0x6e452c20, 0x36ca3: 0x6e468820, + 0x36ca4: 0x6c13e820, 0x36ca5: 0x6c13ea20, 0x36ca6: 0x6c251a20, 0x36ca7: 0x6c251c20, + 0x36ca8: 0x6c251e20, 0x36ca9: 0x6c252020, 0x36caa: 0x6c252220, 0x36cab: 0x6c252420, + 0x36cac: 0x6c252620, 0x36cad: 0x6c252820, 0x36cae: 0x6c252a20, 0x36caf: 0x6c252c20, + 0x36cb0: 0x6c252e20, 0x36cb1: 0x6c253020, 0x36cb2: 0x6c3c8c20, 0x36cb3: 0x6c3c8e20, + 0x36cb4: 0x6c3c9020, 0x36cb5: 0x6c3c9220, 0x36cb6: 0x6c3c9420, 0x36cb7: 0x6c3c9620, + 0x36cb8: 0x6c3c9820, 0x36cb9: 0x6c3c9a20, 0x36cba: 0x6c3c9c20, 0x36cbb: 0x6c3c9e20, + 0x36cbc: 0x6c3ca020, 0x36cbd: 0x6c3ca220, 0x36cbe: 0x6c3ca420, 0x36cbf: 0x6c3ca620, + // Block 0xdb3, offset 0x36cc0 + 0x36cc0: 0x6c3ca820, 0x36cc1: 0x6c3caa20, 0x36cc2: 0x6c3cac20, 0x36cc3: 0x6c59b820, + 0x36cc4: 0x6c59ba20, 0x36cc5: 0x6c59bc20, 0x36cc6: 0x6c59be20, 0x36cc7: 0x6c59c020, + 0x36cc8: 0x6c59c220, 0x36cc9: 0x6c59c420, 0x36cca: 0x6c59c620, 0x36ccb: 0x6c59c820, + 0x36ccc: 0x6c59ca20, 0x36ccd: 0x6c59cc20, 0x36cce: 0x6c59ce20, 0x36ccf: 0x6c59d020, + 0x36cd0: 0x6c59d220, 0x36cd1: 0x6c59d420, 0x36cd2: 0x6c59d620, 0x36cd3: 0x6c59d820, + 0x36cd4: 0x6c59da20, 0x36cd5: 0x6c59dc20, 0x36cd6: 0x6c59de20, 0x36cd7: 0x6c59e020, + 0x36cd8: 0x6c59e220, 0x36cd9: 0x6c59e420, 0x36cda: 0x6c59e620, 0x36cdb: 0x6c59e820, + 0x36cdc: 0x6c59ea20, 0x36cdd: 0x6c59ec20, 0x36cde: 0x6c59ee20, 0x36cdf: 0x6c59f020, + 0x36ce0: 0x6c59f220, 0x36ce1: 0x6c59f420, 0x36ce2: 0x6c59f620, 0x36ce3: 0x6c59f820, + 0x36ce4: 0x6c59fa20, 0x36ce5: 0x6c59fc20, 0x36ce6: 0x6c59fe20, 0x36ce7: 0x6c5a0020, + 0x36ce8: 0x6c5a0220, 0x36ce9: 0x6c5a0420, 0x36cea: 0x6c5a0620, 0x36ceb: 0x6c5a0820, + 0x36cec: 0x6c5a0a20, 0x36ced: 0x6c5a0c20, 0x36cee: 0x6c5a0e20, 0x36cef: 0x6c5a1020, + 0x36cf0: 0x6c5a1220, 0x36cf1: 0x6c7c7a20, 0x36cf2: 0x6c7c7c20, 0x36cf3: 0x6c7c7e20, + 0x36cf4: 0x6c7c8020, 0x36cf5: 0x6c7c8220, 0x36cf6: 0x6c7c8420, 0x36cf7: 0x6c7c8620, + 0x36cf8: 0x6c7c8820, 0x36cf9: 0x6c7c8a20, 0x36cfa: 0x6c7c8c20, 0x36cfb: 0x6c7c8e20, + 0x36cfc: 0x6c7c9020, 0x36cfd: 0x6c7c9220, 0x36cfe: 0x6c7c9420, 0x36cff: 0x6c7c9620, + // Block 0xdb4, offset 0x36d00 + 0x36d00: 0x6c7c9820, 0x36d01: 0x6c7c9a20, 0x36d02: 0x6c7c9c20, 0x36d03: 0x6c7c9e20, + 0x36d04: 0x6c7ca020, 0x36d05: 0x6c7ca220, 0x36d06: 0x6c7ca420, 0x36d07: 0x6c7ca620, + 0x36d08: 0x6c7ca820, 0x36d09: 0x6c7caa20, 0x36d0a: 0x6c7cac20, 0x36d0b: 0x6c7cae20, + 0x36d0c: 0x6c7cb020, 0x36d0d: 0x6c7cb220, 0x36d0e: 0x6c7cb420, 0x36d0f: 0x6c7cb620, + 0x36d10: 0x6c7cb820, 0x36d11: 0x6c7cba20, 0x36d12: 0x6c7cbc20, 0x36d13: 0x6c7cbe20, + 0x36d14: 0x6c7cc020, 0x36d15: 0x6c7cc220, 0x36d16: 0x6c7cc420, 0x36d17: 0x6c7cc620, + 0x36d18: 0x6c7cc820, 0x36d19: 0x6c7cca20, 0x36d1a: 0x6ca52a20, 0x36d1b: 0x6ca52c20, + 0x36d1c: 0x6ca52e20, 0x36d1d: 0x6ca53020, 0x36d1e: 0x6ca53220, 0x36d1f: 0x6ca53420, + 0x36d20: 0x6ca53620, 0x36d21: 0x6ca53820, 0x36d22: 0x6ca53a20, 0x36d23: 0x6ca53c20, + 0x36d24: 0x6ca53e20, 0x36d25: 0x6ca54020, 0x36d26: 0x6ca54220, 0x36d27: 0x6ca54420, + 0x36d28: 0x6ca54620, 0x36d29: 0x6ca54820, 0x36d2a: 0x6ca54a20, 0x36d2b: 0x6ca54c20, + 0x36d2c: 0x6ca54e20, 0x36d2d: 0x6ca55020, 0x36d2e: 0x6ca55220, 0x36d2f: 0x6ca55420, + 0x36d30: 0x6ca55620, 0x36d31: 0x6ca55820, 0x36d32: 0x6ca55a20, 0x36d33: 0x6ca55c20, + 0x36d34: 0x6ca55e20, 0x36d35: 0x6ca56020, 0x36d36: 0x6ca56220, 0x36d37: 0x6ca56420, + 0x36d38: 0x6ca56620, 0x36d39: 0x6ca56820, 0x36d3a: 0x6ca56a20, 0x36d3b: 0x6ca56c20, + 0x36d3c: 0x6ca56e20, 0x36d3d: 0x6ca57020, 0x36d3e: 0x6ca57220, 0x36d3f: 0x6ca57420, + // Block 0xdb5, offset 0x36d40 + 0x36d40: 0x6ca57620, 0x36d41: 0x6ca57820, 0x36d42: 0x6ca57a20, 0x36d43: 0x6ca57c20, + 0x36d44: 0x6ca57e20, 0x36d45: 0x6ca58020, 0x36d46: 0x6ca58220, 0x36d47: 0x6ca58420, + 0x36d48: 0x6ca58620, 0x36d49: 0x6ca58820, 0x36d4a: 0x6cd37220, 0x36d4b: 0x6cd37420, + 0x36d4c: 0x6cd37620, 0x36d4d: 0x6cd37820, 0x36d4e: 0x6cd37a20, 0x36d4f: 0x6cd37c20, + 0x36d50: 0x6cd37e20, 0x36d51: 0x6cd38020, 0x36d52: 0x6cd38220, 0x36d53: 0x6cd38420, + 0x36d54: 0x6cd38620, 0x36d55: 0x6cd38820, 0x36d56: 0x6cd38a20, 0x36d57: 0x6cd38c20, + 0x36d58: 0x6cd38e20, 0x36d59: 0x6cd39020, 0x36d5a: 0x6cd39220, 0x36d5b: 0x6cd39420, + 0x36d5c: 0x6cd39620, 0x36d5d: 0x6cd39820, 0x36d5e: 0x6cd39a20, 0x36d5f: 0x6cd39c20, + 0x36d60: 0x6cd39e20, 0x36d61: 0x6cd3a020, 0x36d62: 0x6cd3a220, 0x36d63: 0x6cd3a420, + 0x36d64: 0x6cd3a620, 0x36d65: 0x6cd3a820, 0x36d66: 0x6cd3aa20, 0x36d67: 0x6cd3ac20, + 0x36d68: 0x6cd3ae20, 0x36d69: 0x6cd3b020, 0x36d6a: 0x6cd3b220, 0x36d6b: 0x6cd3b420, + 0x36d6c: 0x6cd3b620, 0x36d6d: 0x6cd3b820, 0x36d6e: 0x6cd3ba20, 0x36d6f: 0x6cd3bc20, + 0x36d70: 0x6cd3be20, 0x36d71: 0x6cd3c020, 0x36d72: 0x6cd3c220, 0x36d73: 0x6cd3c420, + 0x36d74: 0x6cd3c620, 0x36d75: 0x6cd3c820, 0x36d76: 0x6cd3ca20, 0x36d77: 0x6cd3cc20, + 0x36d78: 0x6cd3ce20, 0x36d79: 0x6cd3d020, 0x36d7a: 0x6cd3d220, 0x36d7b: 0x6cd3d420, + 0x36d7c: 0x6cd3d620, 0x36d7d: 0x6cd3d820, 0x36d7e: 0x6cd3da20, 0x36d7f: 0x6cd3dc20, + // Block 0xdb6, offset 0x36d80 + 0x36d80: 0x6cd3de20, 0x36d81: 0x6cd3e020, 0x36d82: 0x6cd3e220, 0x36d83: 0x6cd3e420, + 0x36d84: 0x6cd3e620, 0x36d85: 0x6d017e20, 0x36d86: 0x6cd3e820, 0x36d87: 0x6cd3ea20, + 0x36d88: 0x6cd3ec20, 0x36d89: 0x6d018020, 0x36d8a: 0x6d018220, 0x36d8b: 0x6d018420, + 0x36d8c: 0x6d018620, 0x36d8d: 0x6d018820, 0x36d8e: 0x6d018a20, 0x36d8f: 0x6d018c20, + 0x36d90: 0x6d018e20, 0x36d91: 0x6d019020, 0x36d92: 0x6d019220, 0x36d93: 0x6d019420, + 0x36d94: 0x6d019620, 0x36d95: 0x6d019820, 0x36d96: 0x6d019a20, 0x36d97: 0x6d019c20, + 0x36d98: 0x6d019e20, 0x36d99: 0x6d01a020, 0x36d9a: 0x6d01a220, 0x36d9b: 0x6d01a420, + 0x36d9c: 0x6d01a620, 0x36d9d: 0x6d01a820, 0x36d9e: 0x6d01aa20, 0x36d9f: 0x6d01ac20, + 0x36da0: 0x6d01ae20, 0x36da1: 0x6d01b020, 0x36da2: 0x6d01b220, 0x36da3: 0x6d01b420, + 0x36da4: 0x6d01b620, 0x36da5: 0x6d01b820, 0x36da6: 0x6d01ba20, 0x36da7: 0x6d01bc20, + 0x36da8: 0x6d01be20, 0x36da9: 0x6d01c020, 0x36daa: 0x6d01c220, 0x36dab: 0x6cd3ee20, + 0x36dac: 0x6d01c420, 0x36dad: 0x6d01c620, 0x36dae: 0x6d01c820, 0x36daf: 0x6d01ca20, + 0x36db0: 0x6d01cc20, 0x36db1: 0x6d01ce20, 0x36db2: 0x6d01d020, 0x36db3: 0x6d01d220, + 0x36db4: 0x6cf5b420, 0x36db5: 0x6d01d420, 0x36db6: 0x6d01d620, 0x36db7: 0x6d01d820, + 0x36db8: 0x6d01da20, 0x36db9: 0x6d01dc20, 0x36dba: 0x6d01de20, 0x36dbb: 0x6d01e020, + 0x36dbc: 0x6d01e220, 0x36dbd: 0x6d01e420, 0x36dbe: 0x6d01e620, 0x36dbf: 0x6d01e820, + // Block 0xdb7, offset 0x36dc0 + 0x36dc0: 0x6d01ea20, 0x36dc1: 0x6d01ec20, 0x36dc2: 0x6d2f5220, 0x36dc3: 0x6d2f5420, + 0x36dc4: 0x6d2f5620, 0x36dc5: 0x6d2f5820, 0x36dc6: 0x6d2f5a20, 0x36dc7: 0x6d2f5c20, + 0x36dc8: 0x6d2f5e20, 0x36dc9: 0x6d2f6020, 0x36dca: 0x6d2f6220, 0x36dcb: 0x6d2f6420, + 0x36dcc: 0x6d2f6620, 0x36dcd: 0x6d2f6820, 0x36dce: 0x6d2f6a20, 0x36dcf: 0x6d2f6c20, + 0x36dd0: 0x6d2f6e20, 0x36dd1: 0x6d2f7020, 0x36dd2: 0x6d2f7220, 0x36dd3: 0x6d2f7420, + 0x36dd4: 0x6d2f7620, 0x36dd5: 0x6d2f7820, 0x36dd6: 0x6d2f7a20, 0x36dd7: 0x6d2f7c20, + 0x36dd8: 0x6d2f7e20, 0x36dd9: 0x6d2f8020, 0x36dda: 0x6d2f8220, 0x36ddb: 0x6d2f8420, + 0x36ddc: 0x6d2f8620, 0x36ddd: 0x6d2f8820, 0x36dde: 0x6d2f8a20, 0x36ddf: 0x6d2f8c20, + 0x36de0: 0x6d2f8e20, 0x36de1: 0x6d2f9020, 0x36de2: 0x6d2f9220, 0x36de3: 0x6d2f9420, + 0x36de4: 0x6d2f9620, 0x36de5: 0x6d2f9820, 0x36de6: 0x6d2f9a20, 0x36de7: 0x6d2f9c20, + 0x36de8: 0x6d2f9e20, 0x36de9: 0x6d2fa020, 0x36dea: 0x6d2fa220, 0x36deb: 0x6d2fa420, + 0x36dec: 0x6d2fa620, 0x36ded: 0x6d2fa820, 0x36dee: 0x6d2faa20, 0x36def: 0x6d2fac20, + 0x36df0: 0x6d2fae20, 0x36df1: 0x6d2fb020, 0x36df2: 0x6d2fb220, 0x36df3: 0x6d2fb420, + 0x36df4: 0x6d2fb620, 0x36df5: 0x6d2fb820, 0x36df6: 0x6d2fba20, 0x36df7: 0x6d2fbc20, + 0x36df8: 0x6d2fbe20, 0x36df9: 0x6d2fc020, 0x36dfa: 0x6d2fc220, 0x36dfb: 0x6d2fc420, + 0x36dfc: 0x6d5c5820, 0x36dfd: 0x6d5c5a20, 0x36dfe: 0x6d5c5c20, 0x36dff: 0x6d5c5e20, + // Block 0xdb8, offset 0x36e00 + 0x36e00: 0x6d5c6020, 0x36e01: 0x6d5c6220, 0x36e02: 0x6d5c6420, 0x36e03: 0x6d5c6620, + 0x36e04: 0x6d5c6820, 0x36e05: 0x6d5c6a20, 0x36e06: 0x6d5c6c20, 0x36e07: 0x6d5c6e20, + 0x36e08: 0x6d5c7020, 0x36e09: 0x6d5c7220, 0x36e0a: 0x6d5c7420, 0x36e0b: 0x6d5c7620, + 0x36e0c: 0x6d5c7820, 0x36e0d: 0x6d5c7a20, 0x36e0e: 0x6d5c7c20, 0x36e0f: 0x6d5c7e20, + 0x36e10: 0x6d5c8020, 0x36e11: 0x6d5c8220, 0x36e12: 0x6d5c8420, 0x36e13: 0x6d5c8620, + 0x36e14: 0x6d5c8820, 0x36e15: 0x6d5c8a20, 0x36e16: 0x6d5c8c20, 0x36e17: 0x6d5c8e20, + 0x36e18: 0x6d5c9020, 0x36e19: 0x6d5c9220, 0x36e1a: 0x6d5c9420, 0x36e1b: 0x6d5c9620, + 0x36e1c: 0x6d5c9820, 0x36e1d: 0x6d5c9a20, 0x36e1e: 0x6d5c9c20, 0x36e1f: 0x6d5c9e20, + 0x36e20: 0x6d5ca020, 0x36e21: 0x6d5ca220, 0x36e22: 0x6d5ca420, 0x36e23: 0x6d5ca620, + 0x36e24: 0x6d5ca820, 0x36e25: 0x6d5caa20, 0x36e26: 0x6d5cac20, 0x36e27: 0x6d5cae20, + 0x36e28: 0x6d5cb020, 0x36e29: 0x6d5cb220, 0x36e2a: 0x6d5cb420, 0x36e2b: 0x6d5cb620, + 0x36e2c: 0x6d5cb820, 0x36e2d: 0x6d5cba20, 0x36e2e: 0x6d5cbc20, 0x36e2f: 0x6d5cbe20, + 0x36e30: 0x6d5cc020, 0x36e31: 0x6d5cc220, 0x36e32: 0x6d5cc420, 0x36e33: 0x6d5cc620, + 0x36e34: 0x6d86e020, 0x36e35: 0x6d86e220, 0x36e36: 0x6d86e420, 0x36e37: 0x6d86e620, + 0x36e38: 0x6d86e820, 0x36e39: 0x6d86ea20, 0x36e3a: 0x6d86ec20, 0x36e3b: 0x6d86ee20, + 0x36e3c: 0x6d86f020, 0x36e3d: 0x6d86f220, 0x36e3e: 0x6d86f420, 0x36e3f: 0x6d86f620, + // Block 0xdb9, offset 0x36e40 + 0x36e40: 0x6d86f820, 0x36e41: 0x6d86fa20, 0x36e42: 0x6d86fc20, 0x36e43: 0x6d86fe20, + 0x36e44: 0x6d870020, 0x36e45: 0x6d870220, 0x36e46: 0x6d870420, 0x36e47: 0x6d5cc820, + 0x36e48: 0x6d870620, 0x36e49: 0x6d870820, 0x36e4a: 0x6d870a20, 0x36e4b: 0x6d870c20, + 0x36e4c: 0x6d870e20, 0x36e4d: 0x6d871020, 0x36e4e: 0x6d871220, 0x36e4f: 0x6d871420, + 0x36e50: 0x6d871620, 0x36e51: 0x6d871820, 0x36e52: 0x6d871a20, 0x36e53: 0x6d871c20, + 0x36e54: 0x6d871e20, 0x36e55: 0x6d872020, 0x36e56: 0x6d872220, 0x36e57: 0x6d872420, + 0x36e58: 0x6d872620, 0x36e59: 0x6d872820, 0x36e5a: 0x6d872a20, 0x36e5b: 0x6d872c20, + 0x36e5c: 0x6d872e20, 0x36e5d: 0x6d873020, 0x36e5e: 0x6d873220, 0x36e5f: 0x6d873420, + 0x36e60: 0x6d873620, 0x36e61: 0x6d873820, 0x36e62: 0x6d873a20, 0x36e63: 0x6d873c20, + 0x36e64: 0x6d873e20, 0x36e65: 0x6d874020, 0x36e66: 0x6d874220, 0x36e67: 0x6d874420, + 0x36e68: 0x6d874620, 0x36e69: 0x6d874820, 0x36e6a: 0x6dab8620, 0x36e6b: 0x6dab8820, + 0x36e6c: 0x6dab8a20, 0x36e6d: 0x6dab8c20, 0x36e6e: 0x6dab8e20, 0x36e6f: 0x6dab9020, + 0x36e70: 0x6dab9220, 0x36e71: 0x6dab9420, 0x36e72: 0x6dab9620, 0x36e73: 0x6dab9820, + 0x36e74: 0x6dab9a20, 0x36e75: 0x6dab9c20, 0x36e76: 0x6dab9e20, 0x36e77: 0x6daba020, + 0x36e78: 0x6daba220, 0x36e79: 0x6daba420, 0x36e7a: 0x6daba620, 0x36e7b: 0x6daba820, + 0x36e7c: 0x6dabaa20, 0x36e7d: 0x6dabac20, 0x36e7e: 0x6dabae20, 0x36e7f: 0x6dabb020, + // Block 0xdba, offset 0x36e80 + 0x36e80: 0x6dabb220, 0x36e81: 0x6dabb420, 0x36e82: 0x6dabb620, 0x36e83: 0x6dabb820, + 0x36e84: 0x6dabba20, 0x36e85: 0x6dabbc20, 0x36e86: 0x6dabbe20, 0x36e87: 0x6dabc020, + 0x36e88: 0x6dabc220, 0x36e89: 0x6dabc420, 0x36e8a: 0x6dabc620, 0x36e8b: 0x6dabc820, + 0x36e8c: 0x6dabca20, 0x36e8d: 0x6dabcc20, 0x36e8e: 0x6dabce20, 0x36e8f: 0x6dabd020, + 0x36e90: 0x6dabd220, 0x36e91: 0x6dabd420, 0x36e92: 0x6dabd620, 0x36e93: 0x6dabd820, + 0x36e94: 0x6dabda20, 0x36e95: 0x6dabdc20, 0x36e96: 0x6d874a20, 0x36e97: 0x6dabde20, + 0x36e98: 0x6dcbe220, 0x36e99: 0x6dcbe420, 0x36e9a: 0x6dcbe620, 0x36e9b: 0x6dcbe820, + 0x36e9c: 0x6dcbea20, 0x36e9d: 0x6dcbec20, 0x36e9e: 0x6dcbee20, 0x36e9f: 0x6dcbf020, + 0x36ea0: 0x6dcbf220, 0x36ea1: 0x6dcbf420, 0x36ea2: 0x6dcbf620, 0x36ea3: 0x6dcbf820, + 0x36ea4: 0x6dcbfa20, 0x36ea5: 0x6dcbfc20, 0x36ea6: 0x6dcbfe20, 0x36ea7: 0x6dcc0020, + 0x36ea8: 0x6dcc0220, 0x36ea9: 0x6dcc0420, 0x36eaa: 0x6dcc0620, 0x36eab: 0x6dcc0820, + 0x36eac: 0x6dcc0a20, 0x36ead: 0x6dcc0c20, 0x36eae: 0x6dcc0e20, 0x36eaf: 0x6dcc1020, + 0x36eb0: 0x6dcc1220, 0x36eb1: 0x6dcc1420, 0x36eb2: 0x6dcc1620, 0x36eb3: 0x6dcc1820, + 0x36eb4: 0x6dcc1a20, 0x36eb5: 0x6dcc1c20, 0x36eb6: 0x6dcc1e20, 0x36eb7: 0x6dcc2020, + 0x36eb8: 0x6dcc2220, 0x36eb9: 0x6dcc2420, 0x36eba: 0x6dcc2620, 0x36ebb: 0x6dcc2820, + 0x36ebc: 0x6dcc2a20, 0x36ebd: 0x6dcc2c20, 0x36ebe: 0x6dcc2e20, 0x36ebf: 0x6de71c20, + // Block 0xdbb, offset 0x36ec0 + 0x36ec0: 0x6de71e20, 0x36ec1: 0x6de72020, 0x36ec2: 0x6de72220, 0x36ec3: 0x6de72420, + 0x36ec4: 0x6de72620, 0x36ec5: 0x6de72820, 0x36ec6: 0x6de72a20, 0x36ec7: 0x6de72c20, + 0x36ec8: 0x6de72e20, 0x36ec9: 0x6de73020, 0x36eca: 0x6de73220, 0x36ecb: 0x6de73420, + 0x36ecc: 0x6de73620, 0x36ecd: 0x6de73820, 0x36ece: 0x6de73a20, 0x36ecf: 0x6de73c20, + 0x36ed0: 0x6de73e20, 0x36ed1: 0x6de74020, 0x36ed2: 0x6de74220, 0x36ed3: 0x6de74420, + 0x36ed4: 0x6de74620, 0x36ed5: 0x6df25c20, 0x36ed6: 0x6de74820, 0x36ed7: 0x6de74a20, + 0x36ed8: 0x6de74c20, 0x36ed9: 0x6de74e20, 0x36eda: 0x6dfdb820, 0x36edb: 0x6dfdba20, + 0x36edc: 0x6dfdbc20, 0x36edd: 0x6dfdbe20, 0x36ede: 0x6dfdc020, 0x36edf: 0x6dfdc220, + 0x36ee0: 0x6dfdc420, 0x36ee1: 0x6dfdc620, 0x36ee2: 0x6dfdc820, 0x36ee3: 0x6dfdca20, + 0x36ee4: 0x6dfdcc20, 0x36ee5: 0x6dfdce20, 0x36ee6: 0x6dfdd020, 0x36ee7: 0x6dfdd220, + 0x36ee8: 0x6dfdd420, 0x36ee9: 0x6dfdd620, 0x36eea: 0x6dfdd820, 0x36eeb: 0x6dfdda20, + 0x36eec: 0x6dfddc20, 0x36eed: 0x6e106820, 0x36eee: 0x6e106a20, 0x36eef: 0x6e106c20, + 0x36ef0: 0x6e106e20, 0x36ef1: 0x6e107020, 0x36ef2: 0x6e107220, 0x36ef3: 0x6e107420, + 0x36ef4: 0x6e107620, 0x36ef5: 0x6e107820, 0x36ef6: 0x6e107a20, 0x36ef7: 0x6e107c20, + 0x36ef8: 0x6e107e20, 0x36ef9: 0x6e108020, 0x36efa: 0x6e1f1820, 0x36efb: 0x6e1f1a20, + 0x36efc: 0x6e1f1c20, 0x36efd: 0x6e1f1e20, 0x36efe: 0x6e1f2020, 0x36eff: 0x6e1f2220, + // Block 0xdbc, offset 0x36f00 + 0x36f00: 0x6e1f2420, 0x36f01: 0x6e1f2620, 0x36f02: 0x6e108220, 0x36f03: 0x6e1f2820, + 0x36f04: 0x6e21a620, 0x36f05: 0x6e1f2a20, 0x36f06: 0x6e1f2c20, 0x36f07: 0x6e1f2e20, + 0x36f08: 0x6e2a6e20, 0x36f09: 0x6e2a7020, 0x36f0a: 0x6e2a7220, 0x36f0b: 0x6e2a7420, + 0x36f0c: 0x6e2a7620, 0x36f0d: 0x6e2a7820, 0x36f0e: 0x6e2a7a20, 0x36f0f: 0x6e331820, + 0x36f10: 0x6e331a20, 0x36f11: 0x6e331c20, 0x36f12: 0x6e331e20, 0x36f13: 0x6e393e20, + 0x36f14: 0x6e3d8c20, 0x36f15: 0x6e3d8e20, 0x36f16: 0x6e3d9020, 0x36f17: 0x6e3d9220, + 0x36f18: 0x6e3d9420, 0x36f19: 0x6e408420, 0x36f1a: 0x6e408620, 0x36f1b: 0x6e42ce20, + 0x36f1c: 0x6e444220, 0x36f1d: 0x6c13ec20, 0x36f1e: 0x6c3cb420, 0x36f1f: 0x6c5a1e20, + 0x36f20: 0x6c5a2020, 0x36f21: 0x6c7cd820, 0x36f22: 0x6c7cda20, 0x36f23: 0x6c7cdc20, + 0x36f24: 0x6c7cde20, 0x36f25: 0x6c7ce020, 0x36f26: 0x6c7ce220, 0x36f27: 0x6ca59620, + 0x36f28: 0x6ca59820, 0x36f29: 0x6ca59a20, 0x36f2a: 0x6cd3f820, 0x36f2b: 0x6cd3fa20, + 0x36f2c: 0x6cd3fc20, 0x36f2d: 0x6cd3fe20, 0x36f2e: 0x6cd40020, 0x36f2f: 0x6cd40220, + 0x36f30: 0x6cd40420, 0x36f31: 0x6cd40620, 0x36f32: 0x6d01fe20, 0x36f33: 0x6d020020, + 0x36f34: 0x6d020220, 0x36f35: 0x6d020420, 0x36f36: 0x6d2fd020, 0x36f37: 0x6d2fd220, + 0x36f38: 0x6d2fd420, 0x36f39: 0x6d2fd620, 0x36f3a: 0x6d2fd820, 0x36f3b: 0x6d2fda20, + 0x36f3c: 0x6d2fdc20, 0x36f3d: 0x6d2fde20, 0x36f3e: 0x6d2fe020, 0x36f3f: 0x6d2fe220, + // Block 0xdbd, offset 0x36f40 + 0x36f40: 0x6d2fe420, 0x36f41: 0x6d2fe620, 0x36f42: 0x6d5cd220, 0x36f43: 0x6d5cd420, + 0x36f44: 0x6d5cd620, 0x36f45: 0x6d5cd820, 0x36f46: 0x6d5cda20, 0x36f47: 0x6d5cdc20, + 0x36f48: 0x6d5cde20, 0x36f49: 0x6d5ce020, 0x36f4a: 0x6d875420, 0x36f4b: 0x6d875620, + 0x36f4c: 0x6d875820, 0x36f4d: 0x6d875a20, 0x36f4e: 0x6dcc3020, 0x36f4f: 0x6dabf020, + 0x36f50: 0x6dabf220, 0x36f51: 0x6dabf420, 0x36f52: 0x6dabf620, 0x36f53: 0x6dcc3220, + 0x36f54: 0x6dcc3420, 0x36f55: 0x6dcc3620, 0x36f56: 0x6de75220, 0x36f57: 0x6de75420, + 0x36f58: 0x6de75620, 0x36f59: 0x6de75820, 0x36f5a: 0x6de75a20, 0x36f5b: 0x6de75c20, + 0x36f5c: 0x6de75e20, 0x36f5d: 0x6e108820, 0x36f5e: 0x6dfde220, 0x36f5f: 0x6dfde420, + 0x36f60: 0x6dfde620, 0x36f61: 0x6e2a7c20, 0x36f62: 0x6e2a7e20, 0x36f63: 0x6e2a8020, + 0x36f64: 0x6e46ca20, 0x36f65: 0x6e46ea20, 0x36f66: 0x6c253420, 0x36f67: 0x6c253620, + 0x36f68: 0x6c3cba20, 0x36f69: 0x6c5a2a20, 0x36f6a: 0x6c5a2c20, 0x36f6b: 0x6c5a2e20, + 0x36f6c: 0x6c5a3020, 0x36f6d: 0x6c5a3220, 0x36f6e: 0x6c5a3420, 0x36f6f: 0x6c5a3620, + 0x36f70: 0x6c7cea20, 0x36f71: 0x6c7cec20, 0x36f72: 0x6c7cee20, 0x36f73: 0x6c7cf020, + 0x36f74: 0x6c7cf220, 0x36f75: 0x6c7cf420, 0x36f76: 0x6c7cf620, 0x36f77: 0x6c7cf820, + 0x36f78: 0x6c7cfa20, 0x36f79: 0x6ca5a220, 0x36f7a: 0x6ca5a420, 0x36f7b: 0x6ca5a620, + 0x36f7c: 0x6ca5a820, 0x36f7d: 0x6ca5aa20, 0x36f7e: 0x6ca5ac20, 0x36f7f: 0x6ca5ae20, + // Block 0xdbe, offset 0x36f80 + 0x36f80: 0x6ca5b020, 0x36f81: 0x6ca5b220, 0x36f82: 0x6ca5b420, 0x36f83: 0x6ca5b620, + 0x36f84: 0x6ca5b820, 0x36f85: 0x6ca5ba20, 0x36f86: 0x6ca5bc20, 0x36f87: 0x6ca5be20, + 0x36f88: 0x6ca5c020, 0x36f89: 0x6ca5c220, 0x36f8a: 0x6ca5c420, 0x36f8b: 0x6ca5c620, + 0x36f8c: 0x6ca5c820, 0x36f8d: 0x6ca5ca20, 0x36f8e: 0x6cd41220, 0x36f8f: 0x6cd41420, + 0x36f90: 0x6cd41620, 0x36f91: 0x6cd41820, 0x36f92: 0x6cd41a20, 0x36f93: 0x6cd41c20, + 0x36f94: 0x6cd41e20, 0x36f95: 0x6cd42020, 0x36f96: 0x6cd42220, 0x36f97: 0x6cd42420, + 0x36f98: 0x6d020a20, 0x36f99: 0x6d020c20, 0x36f9a: 0x6d020e20, 0x36f9b: 0x6d021020, + 0x36f9c: 0x6d021220, 0x36f9d: 0x6d021420, 0x36f9e: 0x6d021620, 0x36f9f: 0x6d021820, + 0x36fa0: 0x6d021a20, 0x36fa1: 0x6d021c20, 0x36fa2: 0x6d021e20, 0x36fa3: 0x6d022020, + 0x36fa4: 0x6d022220, 0x36fa5: 0x6d022420, 0x36fa6: 0x6d022620, 0x36fa7: 0x6d022820, + 0x36fa8: 0x6d022a20, 0x36fa9: 0x6d022c20, 0x36faa: 0x6d2fea20, 0x36fab: 0x6d2fec20, + 0x36fac: 0x6d2fee20, 0x36fad: 0x6d2ff020, 0x36fae: 0x6d2ff220, 0x36faf: 0x6d2ff420, + 0x36fb0: 0x6d2ff620, 0x36fb1: 0x6d2ff820, 0x36fb2: 0x6d5ce220, 0x36fb3: 0x6d5ce420, + 0x36fb4: 0x6d5ce620, 0x36fb5: 0x6d5ce820, 0x36fb6: 0x6d5cea20, 0x36fb7: 0x6d5cec20, + 0x36fb8: 0x6d5cee20, 0x36fb9: 0x6d5cf020, 0x36fba: 0x6d5cf220, 0x36fbb: 0x6d875c20, + 0x36fbc: 0x6d875e20, 0x36fbd: 0x6d876020, 0x36fbe: 0x6d876220, 0x36fbf: 0x6d876420, + // Block 0xdbf, offset 0x36fc0 + 0x36fc0: 0x6dabfc20, 0x36fc1: 0x6dabfe20, 0x36fc2: 0x6dac0020, 0x36fc3: 0x6dac0220, + 0x36fc4: 0x6dac0420, 0x36fc5: 0x6dac0620, 0x36fc6: 0x6dac0820, 0x36fc7: 0x6dcc3820, + 0x36fc8: 0x6dcc3a20, 0x36fc9: 0x6dcc3c20, 0x36fca: 0x6dcc3e20, 0x36fcb: 0x6dcc4020, + 0x36fcc: 0x6de76220, 0x36fcd: 0x6de76420, 0x36fce: 0x6de76620, 0x36fcf: 0x6de76820, + 0x36fd0: 0x6e2a8220, 0x36fd1: 0x6e1f3020, 0x36fd2: 0x6e1f3220, 0x36fd3: 0x6e2a8420, + 0x36fd4: 0x6e2a8620, 0x36fd5: 0x6c13f020, 0x36fd6: 0x6c13f220, 0x36fd7: 0x6c254020, + 0x36fd8: 0x6c254220, 0x36fd9: 0x6c254420, 0x36fda: 0x6c254620, 0x36fdb: 0x6c254820, + 0x36fdc: 0x6c254a20, 0x36fdd: 0x6c3cd620, 0x36fde: 0x6c3cd820, 0x36fdf: 0x6c3cda20, + 0x36fe0: 0x6c3cdc20, 0x36fe1: 0x6c3cde20, 0x36fe2: 0x6c3ce020, 0x36fe3: 0x6c3ce220, + 0x36fe4: 0x6c3ce420, 0x36fe5: 0x6c3ce620, 0x36fe6: 0x6c3ce820, 0x36fe7: 0x6c3cea20, + 0x36fe8: 0x6c3cec20, 0x36fe9: 0x6c5a7e20, 0x36fea: 0x6c5a8020, 0x36feb: 0x6c5a8220, + 0x36fec: 0x6c5a8420, 0x36fed: 0x6c5a8620, 0x36fee: 0x6c5a8820, 0x36fef: 0x6c5a8a20, + 0x36ff0: 0x6c5a8c20, 0x36ff1: 0x6c5a8e20, 0x36ff2: 0x6c5a9020, 0x36ff3: 0x6c5a9220, + 0x36ff4: 0x6c5a9420, 0x36ff5: 0x6c5a9620, 0x36ff6: 0x6c5a9820, 0x36ff7: 0x6c5a9a20, + 0x36ff8: 0x6c5a9c20, 0x36ff9: 0x6c5a9e20, 0x36ffa: 0x6c5aa020, 0x36ffb: 0x6c5aa220, + 0x36ffc: 0x6c5aa420, 0x36ffd: 0x6c5aa620, 0x36ffe: 0x6c5aa820, 0x36fff: 0x6c5aaa20, + // Block 0xdc0, offset 0x37000 + 0x37000: 0x6c5aac20, 0x37001: 0x6c5aae20, 0x37002: 0x6c5ab020, 0x37003: 0x6c5ab220, + 0x37004: 0x6c5ab420, 0x37005: 0x6c5ab620, 0x37006: 0x6c7d5a20, 0x37007: 0x6c7d5c20, + 0x37008: 0x6c7d5e20, 0x37009: 0x6c7d6020, 0x3700a: 0x6c7d6220, 0x3700b: 0x6c7d6420, + 0x3700c: 0x6c7d6620, 0x3700d: 0x6c7d6820, 0x3700e: 0x6c7d6a20, 0x3700f: 0x6c7d6c20, + 0x37010: 0x6c7d6e20, 0x37011: 0x6c7d7020, 0x37012: 0x6c7d7220, 0x37013: 0x6c7d7420, + 0x37014: 0x6c7d7620, 0x37015: 0x6c7d7820, 0x37016: 0x6c7d7a20, 0x37017: 0x6c7d7c20, + 0x37018: 0x6c7d7e20, 0x37019: 0x6c7d8020, 0x3701a: 0x6c7d8220, 0x3701b: 0x6c7d8420, + 0x3701c: 0x6c7d8620, 0x3701d: 0x6c7d8820, 0x3701e: 0x6c7d8a20, 0x3701f: 0x6c7d8c20, + 0x37020: 0x6c7d8e20, 0x37021: 0x6c7d9020, 0x37022: 0x6c7d9220, 0x37023: 0x6c7d9420, + 0x37024: 0x6c7d9620, 0x37025: 0x6c7d9820, 0x37026: 0x6c7d9a20, 0x37027: 0x6c7d9c20, + 0x37028: 0x6c7d9e20, 0x37029: 0x6c7da020, 0x3702a: 0x6c7da220, 0x3702b: 0x6c7da420, + 0x3702c: 0x6c7da620, 0x3702d: 0x6c7da820, 0x3702e: 0x6c7daa20, 0x3702f: 0x6c7dac20, + 0x37030: 0x6c7dae20, 0x37031: 0x6c7db020, 0x37032: 0x6c7db220, 0x37033: 0x6ca61220, + 0x37034: 0x6ca61420, 0x37035: 0x6ca61620, 0x37036: 0x6ca61820, 0x37037: 0x6ca61a20, + 0x37038: 0x6ca61c20, 0x37039: 0x6ca61e20, 0x3703a: 0x6ca62020, 0x3703b: 0x6ca62220, + 0x3703c: 0x6ca62420, 0x3703d: 0x6ca62620, 0x3703e: 0x6ca62820, 0x3703f: 0x6ca62a20, + // Block 0xdc1, offset 0x37040 + 0x37040: 0x6ca62c20, 0x37041: 0x6ca62e20, 0x37042: 0x6ca63020, 0x37043: 0x6ca63220, + 0x37044: 0x6ca63420, 0x37045: 0x6ca63620, 0x37046: 0x6ca63820, 0x37047: 0x6ca63a20, + 0x37048: 0x6ca63c20, 0x37049: 0x6ca63e20, 0x3704a: 0x6ca64020, 0x3704b: 0x6ca64220, + 0x3704c: 0x6ca64420, 0x3704d: 0x6ca64620, 0x3704e: 0x6ca64820, 0x3704f: 0x6ca64a20, + 0x37050: 0x6ca64c20, 0x37051: 0x6ca64e20, 0x37052: 0x6ca65020, 0x37053: 0x6ca65220, + 0x37054: 0x6ca65420, 0x37055: 0x6ca65620, 0x37056: 0x6ca65820, 0x37057: 0x6ca65a20, + 0x37058: 0x6ca65c20, 0x37059: 0x6ca65e20, 0x3705a: 0x6ca66020, 0x3705b: 0x6ca66220, + 0x3705c: 0x6ca66420, 0x3705d: 0x6ca66620, 0x3705e: 0x6ca66820, 0x3705f: 0x6ca66a20, + 0x37060: 0x6ca66c20, 0x37061: 0x6ca66e20, 0x37062: 0x6ca67020, 0x37063: 0x6ca67220, + 0x37064: 0x6ca67420, 0x37065: 0x6ca67620, 0x37066: 0x6ca67820, 0x37067: 0x6ca67a20, + 0x37068: 0x6ca67c20, 0x37069: 0x6ca67e20, 0x3706a: 0x6cd46c20, 0x3706b: 0x6cd46e20, + 0x3706c: 0x6cd47020, 0x3706d: 0x6cd47220, 0x3706e: 0x6cd47420, 0x3706f: 0x6cd47620, + 0x37070: 0x6cd47820, 0x37071: 0x6cd47a20, 0x37072: 0x6cd47c20, 0x37073: 0x6cd47e20, + 0x37074: 0x6cd48020, 0x37075: 0x6cd48220, 0x37076: 0x6cd48420, 0x37077: 0x6cd48620, + 0x37078: 0x6cd48820, 0x37079: 0x6cd48a20, 0x3707a: 0x6cd48c20, 0x3707b: 0x6cd48e20, + 0x3707c: 0x6cd49020, 0x3707d: 0x6cd49220, 0x3707e: 0x6cd49420, 0x3707f: 0x6cd49620, + // Block 0xdc2, offset 0x37080 + 0x37080: 0x6cd49820, 0x37081: 0x6cd49a20, 0x37082: 0x6cd49c20, 0x37083: 0x6cd49e20, + 0x37084: 0x6cd4a020, 0x37085: 0x6cd4a220, 0x37086: 0x6cd4a420, 0x37087: 0x6cd4a620, + 0x37088: 0x6cd4a820, 0x37089: 0x6cd4aa20, 0x3708a: 0x6d029c20, 0x3708b: 0x6d029e20, + 0x3708c: 0x6d02a020, 0x3708d: 0x6d02a220, 0x3708e: 0x6d02a420, 0x3708f: 0x6d02a620, + 0x37090: 0x6d02a820, 0x37091: 0x6d02aa20, 0x37092: 0x6d02ac20, 0x37093: 0x6d02ae20, + 0x37094: 0x6d02b020, 0x37095: 0x6d02b220, 0x37096: 0x6d02b420, 0x37097: 0x6d02b620, + 0x37098: 0x6d02b820, 0x37099: 0x6d02ba20, 0x3709a: 0x6d02bc20, 0x3709b: 0x6d02be20, + 0x3709c: 0x6d02c020, 0x3709d: 0x6d02c220, 0x3709e: 0x6d02c420, 0x3709f: 0x6d02c620, + 0x370a0: 0x6d02c820, 0x370a1: 0x6d02ca20, 0x370a2: 0x6d02cc20, 0x370a3: 0x6d02ce20, + 0x370a4: 0x6d02d020, 0x370a5: 0x6d02d220, 0x370a6: 0x6d02d420, 0x370a7: 0x6d02d620, + 0x370a8: 0x6d02d820, 0x370a9: 0x6d02da20, 0x370aa: 0x6d02dc20, 0x370ab: 0x6d02de20, + 0x370ac: 0x6d02e020, 0x370ad: 0x6d02e220, 0x370ae: 0x6d02e420, 0x370af: 0x6d02e620, + 0x370b0: 0x6d02e820, 0x370b1: 0x6d02ea20, 0x370b2: 0x6d02ec20, 0x370b3: 0x6d02ee20, + 0x370b4: 0x6d02f020, 0x370b5: 0x6d02f220, 0x370b6: 0x6d02f420, 0x370b7: 0x6d02f620, + 0x370b8: 0x6d02f820, 0x370b9: 0x6d02fa20, 0x370ba: 0x6d304a20, 0x370bb: 0x6d304c20, + 0x370bc: 0x6d304e20, 0x370bd: 0x6d305020, 0x370be: 0x6d305220, 0x370bf: 0x6d305420, + // Block 0xdc3, offset 0x370c0 + 0x370c0: 0x6d305620, 0x370c1: 0x6d305820, 0x370c2: 0x6d305a20, 0x370c3: 0x6d305c20, + 0x370c4: 0x6d305e20, 0x370c5: 0x6d306020, 0x370c6: 0x6d306220, 0x370c7: 0x6d306420, + 0x370c8: 0x6d306620, 0x370c9: 0x6d306820, 0x370ca: 0x6d306a20, 0x370cb: 0x6d306c20, + 0x370cc: 0x6d306e20, 0x370cd: 0x6d307020, 0x370ce: 0x6d307220, 0x370cf: 0x6d307420, + 0x370d0: 0x6d307620, 0x370d1: 0x6d307820, 0x370d2: 0x6d307a20, 0x370d3: 0x6d307c20, + 0x370d4: 0x6d307e20, 0x370d5: 0x6d308020, 0x370d6: 0x6d308220, 0x370d7: 0x6d308420, + 0x370d8: 0x6d308620, 0x370d9: 0x6d308820, 0x370da: 0x6d308a20, 0x370db: 0x6d308c20, + 0x370dc: 0x6d308e20, 0x370dd: 0x6d309020, 0x370de: 0x6d309220, 0x370df: 0x6d309420, + 0x370e0: 0x6d309620, 0x370e1: 0x6d309820, 0x370e2: 0x6d309a20, 0x370e3: 0x6d309c20, + 0x370e4: 0x6d309e20, 0x370e5: 0x6d30a020, 0x370e6: 0x6d30a220, 0x370e7: 0x6d30a420, + 0x370e8: 0x6d30a620, 0x370e9: 0x6d30a820, 0x370ea: 0x6d30aa20, 0x370eb: 0x6d30ac20, + 0x370ec: 0x6d30ae20, 0x370ed: 0x6d5d4420, 0x370ee: 0x6d5d4620, 0x370ef: 0x6d5d4820, + 0x370f0: 0x6d5d4a20, 0x370f1: 0x6d5d4c20, 0x370f2: 0x6d5d4e20, 0x370f3: 0x6d5d5020, + 0x370f4: 0x6d5d5220, 0x370f5: 0x6d5d5420, 0x370f6: 0x6d5d5620, 0x370f7: 0x6d5d5820, + 0x370f8: 0x6d5d5a20, 0x370f9: 0x6d5d5c20, 0x370fa: 0x6d5d5e20, 0x370fb: 0x6d5d6020, + 0x370fc: 0x6d5d6220, 0x370fd: 0x6d5d6420, 0x370fe: 0x6d5d6620, 0x370ff: 0x6d5d6820, + // Block 0xdc4, offset 0x37100 + 0x37100: 0x6d5d6a20, 0x37101: 0x6d5d6c20, 0x37102: 0x6d5d6e20, 0x37103: 0x6d5d7020, + 0x37104: 0x6d5d7220, 0x37105: 0x6d5d7420, 0x37106: 0x6d5d7620, 0x37107: 0x6d5d7820, + 0x37108: 0x6d5d7a20, 0x37109: 0x6d5d7c20, 0x3710a: 0x6d5d7e20, 0x3710b: 0x6d5d8020, + 0x3710c: 0x6d87a020, 0x3710d: 0x6d87a220, 0x3710e: 0x6d87a420, 0x3710f: 0x6d87a620, + 0x37110: 0x6d87a820, 0x37111: 0x6d87aa20, 0x37112: 0x6d87ac20, 0x37113: 0x6d87ae20, + 0x37114: 0x6d87b020, 0x37115: 0x6d87b220, 0x37116: 0x6d87b420, 0x37117: 0x6d87b620, + 0x37118: 0x6d87b820, 0x37119: 0x6d87ba20, 0x3711a: 0x6d87bc20, 0x3711b: 0x6d87be20, + 0x3711c: 0x6d87c020, 0x3711d: 0x6d87c220, 0x3711e: 0x6d87c420, 0x3711f: 0x6d87c620, + 0x37120: 0x6d87c820, 0x37121: 0x6d87ca20, 0x37122: 0x6d87cc20, 0x37123: 0x6d87ce20, + 0x37124: 0x6d87d020, 0x37125: 0x6d87d220, 0x37126: 0x6d87d420, 0x37127: 0x6d87d620, + 0x37128: 0x6d87d820, 0x37129: 0x6d87da20, 0x3712a: 0x6d87dc20, 0x3712b: 0x6d87de20, + 0x3712c: 0x6d87e020, 0x3712d: 0x6d87e220, 0x3712e: 0x6d87e420, 0x3712f: 0x6d87e620, + 0x37130: 0x6dac4a20, 0x37131: 0x6dac4c20, 0x37132: 0x6dac4e20, 0x37133: 0x6dac5020, + 0x37134: 0x6dac5220, 0x37135: 0x6dac5420, 0x37136: 0x6dac5620, 0x37137: 0x6dac5820, + 0x37138: 0x6dac5a20, 0x37139: 0x6dac5c20, 0x3713a: 0x6dac5e20, 0x3713b: 0x6dac6020, + 0x3713c: 0x6dac6220, 0x3713d: 0x6dac6420, 0x3713e: 0x6dac6620, 0x3713f: 0x6dac6820, + // Block 0xdc5, offset 0x37140 + 0x37140: 0x6dac6a20, 0x37141: 0x6dac6c20, 0x37142: 0x6dac6e20, 0x37143: 0x6dac7020, + 0x37144: 0x6dac7220, 0x37145: 0x6dac7420, 0x37146: 0x6dac7620, 0x37147: 0x6dac7820, + 0x37148: 0x6dac7a20, 0x37149: 0x6dac7c20, 0x3714a: 0x6dac7e20, 0x3714b: 0x6dac8020, + 0x3714c: 0x6dac8220, 0x3714d: 0x6dac8420, 0x3714e: 0x6dac8620, 0x3714f: 0x6dac8820, + 0x37150: 0x6dac8a20, 0x37151: 0x6dac8c20, 0x37152: 0x6dac8e20, 0x37153: 0x6dac9020, + 0x37154: 0x6dac9220, 0x37155: 0x6dac9420, 0x37156: 0x6dac9620, 0x37157: 0x6dcc7420, + 0x37158: 0x6dcc7620, 0x37159: 0x6dcc7820, 0x3715a: 0x6dcc7a20, 0x3715b: 0x6dcc7c20, + 0x3715c: 0x6dcc7e20, 0x3715d: 0x6dcc8020, 0x3715e: 0x6dcc8220, 0x3715f: 0x6dcc8420, + 0x37160: 0x6dcc8620, 0x37161: 0x6dcc8820, 0x37162: 0x6dcc8a20, 0x37163: 0x6dcc8c20, + 0x37164: 0x6dcc8e20, 0x37165: 0x6dcc9020, 0x37166: 0x6dcc9220, 0x37167: 0x6dcc9420, + 0x37168: 0x6dcc9620, 0x37169: 0x6dcc9820, 0x3716a: 0x6de78220, 0x3716b: 0x6de78420, + 0x3716c: 0x6de78620, 0x3716d: 0x6de78820, 0x3716e: 0x6de78a20, 0x3716f: 0x6de78c20, + 0x37170: 0x6de78e20, 0x37171: 0x6de79020, 0x37172: 0x6de79220, 0x37173: 0x6de79420, + 0x37174: 0x6de79620, 0x37175: 0x6de79820, 0x37176: 0x6de79a20, 0x37177: 0x6de79c20, + 0x37178: 0x6de79e20, 0x37179: 0x6de7a020, 0x3717a: 0x6de7a220, 0x3717b: 0x6dfe0a20, + 0x3717c: 0x6dfe0c20, 0x3717d: 0x6dfe0e20, 0x3717e: 0x6dfe1020, 0x3717f: 0x6dfe1220, + // Block 0xdc6, offset 0x37180 + 0x37180: 0x6dfe1420, 0x37181: 0x6dfe1620, 0x37182: 0x6dfe1820, 0x37183: 0x6dfe1a20, + 0x37184: 0x6dfe1c20, 0x37185: 0x6dfe1e20, 0x37186: 0x6dfe2020, 0x37187: 0x6dfe2220, + 0x37188: 0x6dfe2420, 0x37189: 0x6dfe2620, 0x3718a: 0x6dfe2820, 0x3718b: 0x6dfe2a20, + 0x3718c: 0x6dfe2c20, 0x3718d: 0x6dfe2e20, 0x3718e: 0x6dfe3020, 0x3718f: 0x6dfe3220, + 0x37190: 0x6dfe3420, 0x37191: 0x6dfe3620, 0x37192: 0x6e10a420, 0x37193: 0x6e10a620, + 0x37194: 0x6e10a820, 0x37195: 0x6e10aa20, 0x37196: 0x6e10ac20, 0x37197: 0x6e10ae20, + 0x37198: 0x6e10b020, 0x37199: 0x6e10b220, 0x3719a: 0x6e10b420, 0x3719b: 0x6e10b620, + 0x3719c: 0x6e10b820, 0x3719d: 0x6e1f3a20, 0x3719e: 0x6e1f3c20, 0x3719f: 0x6e1f3e20, + 0x371a0: 0x6e1f4020, 0x371a1: 0x6e1f4220, 0x371a2: 0x6e1f4420, 0x371a3: 0x6e1f4620, + 0x371a4: 0x6e1f4820, 0x371a5: 0x6e1f4a20, 0x371a6: 0x6e1f4c20, 0x371a7: 0x6e1f4e20, + 0x371a8: 0x6e1f5020, 0x371a9: 0x6e1f5220, 0x371aa: 0x6e1f5420, 0x371ab: 0x6e2a8c20, + 0x371ac: 0x6e2a8e20, 0x371ad: 0x6e2a9020, 0x371ae: 0x6e2a9220, 0x371af: 0x6e2a9420, + 0x371b0: 0x6e2a9620, 0x371b1: 0x6e2a9820, 0x371b2: 0x6e2a9a20, 0x371b3: 0x6e2a9c20, + 0x371b4: 0x6e332820, 0x371b5: 0x6e332a20, 0x371b6: 0x6e361a20, 0x371b7: 0x6e332c20, + 0x371b8: 0x6e332e20, 0x371b9: 0x6e394420, 0x371ba: 0x6e3d9820, 0x371bb: 0x6e3d9a20, + 0x371bc: 0x6e3d9c20, 0x371bd: 0x6e3d9e20, 0x371be: 0x6e408820, 0x371bf: 0x6e408a20, + // Block 0xdc7, offset 0x371c0 + 0x371c0: 0x6e408c20, 0x371c1: 0x6e42d020, 0x371c2: 0x6e42d220, 0x371c3: 0x6e444620, + 0x371c4: 0x6e46b220, 0x371c5: 0x6c050020, 0x371c6: 0x6c0a3620, 0x371c7: 0x6c13f820, + 0x371c8: 0x6c13fa20, 0x371c9: 0x6c13fc20, 0x371ca: 0x6c13fe20, 0x371cb: 0x6c140020, + 0x371cc: 0x6c140220, 0x371cd: 0x6c255020, 0x371ce: 0x6c255220, 0x371cf: 0x6c255420, + 0x371d0: 0x6c255620, 0x371d1: 0x6c255820, 0x371d2: 0x6c255a20, 0x371d3: 0x6c255c20, + 0x371d4: 0x6c255e20, 0x371d5: 0x6c3cfc20, 0x371d6: 0x6c3cfe20, 0x371d7: 0x6c3d0020, + 0x371d8: 0x6c3d0220, 0x371d9: 0x6c3d0420, 0x371da: 0x6c3d0620, 0x371db: 0x6c3d0820, + 0x371dc: 0x6c3d0a20, 0x371dd: 0x6c3d0c20, 0x371de: 0x6c3d0e20, 0x371df: 0x6c3d1020, + 0x371e0: 0x6c3d1220, 0x371e1: 0x6c3d1420, 0x371e2: 0x6c3d1620, 0x371e3: 0x6c3d1820, + 0x371e4: 0x6c3d1a20, 0x371e5: 0x6c3d1c20, 0x371e6: 0x6c3d1e20, 0x371e7: 0x6c3d2020, + 0x371e8: 0x6c3d2220, 0x371e9: 0x6c3d2420, 0x371ea: 0x6c3d2620, 0x371eb: 0x6c5ade20, + 0x371ec: 0x6c5ae020, 0x371ed: 0x6c5ae220, 0x371ee: 0x6c5ae420, 0x371ef: 0x6c5ae620, + 0x371f0: 0x6c5ae820, 0x371f1: 0x6c5aea20, 0x371f2: 0x6c5aec20, 0x371f3: 0x6c5aee20, + 0x371f4: 0x6c5af020, 0x371f5: 0x6c5af220, 0x371f6: 0x6c5af420, 0x371f7: 0x6c5af620, + 0x371f8: 0x6c5af820, 0x371f9: 0x6c5afa20, 0x371fa: 0x6c5afc20, 0x371fb: 0x6c5afe20, + 0x371fc: 0x6c5b0020, 0x371fd: 0x6c5b0220, 0x371fe: 0x6c5b0420, 0x371ff: 0x6c5b0620, + // Block 0xdc8, offset 0x37200 + 0x37200: 0x6c5b0820, 0x37201: 0x6c5b0a20, 0x37202: 0x6c5b0c20, 0x37203: 0x6c5b0e20, + 0x37204: 0x6c5b1020, 0x37205: 0x6c5b1220, 0x37206: 0x6c5b1420, 0x37207: 0x6c5b1620, + 0x37208: 0x6c5b1820, 0x37209: 0x6c5b1a20, 0x3720a: 0x6c5b1c20, 0x3720b: 0x6c5b1e20, + 0x3720c: 0x6c5b2020, 0x3720d: 0x6c5b2220, 0x3720e: 0x6c7dea20, 0x3720f: 0x6c7dec20, + 0x37210: 0x6c7dee20, 0x37211: 0x6c7df020, 0x37212: 0x6c7df220, 0x37213: 0x6c7df420, + 0x37214: 0x6c7df620, 0x37215: 0x6c7df820, 0x37216: 0x6c7dfa20, 0x37217: 0x6c7dfc20, + 0x37218: 0x6c7dfe20, 0x37219: 0x6c7e0020, 0x3721a: 0x6c7e0220, 0x3721b: 0x6c7e0420, + 0x3721c: 0x6c7e0620, 0x3721d: 0x6c7e0820, 0x3721e: 0x6c7e0a20, 0x3721f: 0x6c7e0c20, + 0x37220: 0x6c7e0e20, 0x37221: 0x6c7e1020, 0x37222: 0x6c7e1220, 0x37223: 0x6c7e1420, + 0x37224: 0x6c7e1620, 0x37225: 0x6c7e1820, 0x37226: 0x6c7e1a20, 0x37227: 0x6c7e1c20, + 0x37228: 0x6c7e1e20, 0x37229: 0x6c7e2020, 0x3722a: 0x6c7e2220, 0x3722b: 0x6ca6ae20, + 0x3722c: 0x6ca6b020, 0x3722d: 0x6ca6b220, 0x3722e: 0x6ca6b420, 0x3722f: 0x6ca6b620, + 0x37230: 0x6ca6b820, 0x37231: 0x6ca6ba20, 0x37232: 0x6ca6bc20, 0x37233: 0x6ca6be20, + 0x37234: 0x6ca6c020, 0x37235: 0x6ca6c220, 0x37236: 0x6ca6c420, 0x37237: 0x6ca6c620, + 0x37238: 0x6ca6c820, 0x37239: 0x6ca6ca20, 0x3723a: 0x6ca6cc20, 0x3723b: 0x6ca6ce20, + 0x3723c: 0x6ca6d020, 0x3723d: 0x6ca6d220, 0x3723e: 0x6ca6d420, 0x3723f: 0x6ca6d620, + // Block 0xdc9, offset 0x37240 + 0x37240: 0x6ca6d820, 0x37241: 0x6ca6da20, 0x37242: 0x6ca6dc20, 0x37243: 0x6ca6de20, + 0x37244: 0x6ca6e020, 0x37245: 0x6ca6e220, 0x37246: 0x6ca6e420, 0x37247: 0x6ca6e620, + 0x37248: 0x6cd4d620, 0x37249: 0x6cd4d820, 0x3724a: 0x6cd4da20, 0x3724b: 0x6cd4dc20, + 0x3724c: 0x6cd4de20, 0x3724d: 0x6cd4e020, 0x3724e: 0x6cd4e220, 0x3724f: 0x6cd4e420, + 0x37250: 0x6cd4e620, 0x37251: 0x6cd4e820, 0x37252: 0x6cd4ea20, 0x37253: 0x6cd4ec20, + 0x37254: 0x6cd4ee20, 0x37255: 0x6cd4f020, 0x37256: 0x6cd4f220, 0x37257: 0x6cd4f420, + 0x37258: 0x6cd4f620, 0x37259: 0x6cd4f820, 0x3725a: 0x6cd4fa20, 0x3725b: 0x6cd4fc20, + 0x3725c: 0x6cd4fe20, 0x3725d: 0x6cd50020, 0x3725e: 0x6cd50220, 0x3725f: 0x6cd50420, + 0x37260: 0x6cd50620, 0x37261: 0x6cd50820, 0x37262: 0x6cd50a20, 0x37263: 0x6cd50c20, + 0x37264: 0x6cd50e20, 0x37265: 0x6cd51020, 0x37266: 0x6d033420, 0x37267: 0x6d033620, + 0x37268: 0x6d033820, 0x37269: 0x6d033a20, 0x3726a: 0x6d033c20, 0x3726b: 0x6d033e20, + 0x3726c: 0x6d034020, 0x3726d: 0x6d034220, 0x3726e: 0x6d034420, 0x3726f: 0x6d034620, + 0x37270: 0x6d034820, 0x37271: 0x6d034a20, 0x37272: 0x6d034c20, 0x37273: 0x6d034e20, + 0x37274: 0x6d035020, 0x37275: 0x6d035220, 0x37276: 0x6d035420, 0x37277: 0x6d035620, + 0x37278: 0x6d035820, 0x37279: 0x6d035a20, 0x3727a: 0x6d035c20, 0x3727b: 0x6d035e20, + 0x3727c: 0x6d036020, 0x3727d: 0x6d036220, 0x3727e: 0x6d036420, 0x3727f: 0x6d036620, + // Block 0xdca, offset 0x37280 + 0x37280: 0x6d036820, 0x37281: 0x6d036a20, 0x37282: 0x6d036c20, 0x37283: 0x6d036e20, + 0x37284: 0x6d037020, 0x37285: 0x6d30e620, 0x37286: 0x6d30e820, 0x37287: 0x6d30ea20, + 0x37288: 0x6d30ec20, 0x37289: 0x6d30ee20, 0x3728a: 0x6d30f020, 0x3728b: 0x6d30f220, + 0x3728c: 0x6d30f420, 0x3728d: 0x6d30f620, 0x3728e: 0x6d30f820, 0x3728f: 0x6d30fa20, + 0x37290: 0x6d30fc20, 0x37291: 0x6d30fe20, 0x37292: 0x6d310020, 0x37293: 0x6d310220, + 0x37294: 0x6d310420, 0x37295: 0x6d310620, 0x37296: 0x6d310820, 0x37297: 0x6d310a20, + 0x37298: 0x6d5da020, 0x37299: 0x6d5da220, 0x3729a: 0x6d5da420, 0x3729b: 0x6d5da620, + 0x3729c: 0x6d5da820, 0x3729d: 0x6d5daa20, 0x3729e: 0x6d5dac20, 0x3729f: 0x6d5dae20, + 0x372a0: 0x6d5db020, 0x372a1: 0x6d5db220, 0x372a2: 0x6d5db420, 0x372a3: 0x6d5db620, + 0x372a4: 0x6d5db820, 0x372a5: 0x6d5dba20, 0x372a6: 0x6d5dbc20, 0x372a7: 0x6d5dbe20, + 0x372a8: 0x6d5dc020, 0x372a9: 0x6d5dc220, 0x372aa: 0x6d5dc420, 0x372ab: 0x6d5dc620, + 0x372ac: 0x6d5dc820, 0x372ad: 0x6d5dca20, 0x372ae: 0x6d880620, 0x372af: 0x6d880820, + 0x372b0: 0x6d880a20, 0x372b1: 0x6d880c20, 0x372b2: 0x6d880e20, 0x372b3: 0x6d881020, + 0x372b4: 0x6d881220, 0x372b5: 0x6d881420, 0x372b6: 0x6d881620, 0x372b7: 0x6d881820, + 0x372b8: 0x6d881a20, 0x372b9: 0x6d881c20, 0x372ba: 0x6d881e20, 0x372bb: 0x6d882020, + 0x372bc: 0x6d882220, 0x372bd: 0x6d882420, 0x372be: 0x6d882620, 0x372bf: 0x6d882820, + // Block 0xdcb, offset 0x372c0 + 0x372c0: 0x6d882a20, 0x372c1: 0x6d882c20, 0x372c2: 0x6d882e20, 0x372c3: 0x6dacaa20, + 0x372c4: 0x6dacac20, 0x372c5: 0x6dacae20, 0x372c6: 0x6dacb020, 0x372c7: 0x6dacb220, + 0x372c8: 0x6dacb420, 0x372c9: 0x6dacb620, 0x372ca: 0x6dacb820, 0x372cb: 0x6dacba20, + 0x372cc: 0x6dacbc20, 0x372cd: 0x6dacbe20, 0x372ce: 0x6dacc020, 0x372cf: 0x6dacc220, + 0x372d0: 0x6dacc420, 0x372d1: 0x6dacc620, 0x372d2: 0x6dccac20, 0x372d3: 0x6dccae20, + 0x372d4: 0x6dccb020, 0x372d5: 0x6dccb220, 0x372d6: 0x6dccb420, 0x372d7: 0x6dccb620, + 0x372d8: 0x6dccb820, 0x372d9: 0x6dccba20, 0x372da: 0x6de7b020, 0x372db: 0x6de7b220, + 0x372dc: 0x6de7b420, 0x372dd: 0x6de7b620, 0x372de: 0x6de7b820, 0x372df: 0x6de7ba20, + 0x372e0: 0x6dfe3c20, 0x372e1: 0x6dfe3e20, 0x372e2: 0x6dfe4020, 0x372e3: 0x6dfe4220, + 0x372e4: 0x6dfe4420, 0x372e5: 0x6e10be20, 0x372e6: 0x6e10c020, 0x372e7: 0x6e10c220, + 0x372e8: 0x6e10c420, 0x372e9: 0x6e10c620, 0x372ea: 0x6e1f5a20, 0x372eb: 0x6e1f5c20, + 0x372ec: 0x6e1f5e20, 0x372ed: 0x6e1f6020, 0x372ee: 0x6e1f6220, 0x372ef: 0x6e1f6420, + 0x372f0: 0x6e2aa220, 0x372f1: 0x6e2aa420, 0x372f2: 0x6e2aa620, 0x372f3: 0x6e2aa820, + 0x372f4: 0x6e333420, 0x372f5: 0x6e333620, 0x372f6: 0x6e394620, 0x372f7: 0x6e394820, + 0x372f8: 0x6e394a20, 0x372f9: 0x6e3da020, 0x372fa: 0x6e3da220, 0x372fb: 0x6c0a3a20, + 0x372fc: 0x6c3d2c20, 0x372fd: 0x6c7e2e20, 0x372fe: 0x6ca6f620, 0x372ff: 0x6cd52820, + // Block 0xdcc, offset 0x37300 + 0x37300: 0x6cb7b420, 0x37301: 0x6cd52a20, 0x37302: 0x6cd52c20, 0x37303: 0x6d037a20, + 0x37304: 0x6d311820, 0x37305: 0x6d5dd020, 0x37306: 0x6d5dd220, 0x37307: 0x6d5dd420, + 0x37308: 0x6dacca20, 0x37309: 0x6daccc20, 0x3730a: 0x6e10c820, 0x3730b: 0x6e333a20, + 0x3730c: 0x6c0a3e20, 0x3730d: 0x6c140420, 0x3730e: 0x6c140620, 0x3730f: 0x6c140820, + 0x37310: 0x6c257220, 0x37311: 0x6c257420, 0x37312: 0x6c257620, 0x37313: 0x6c257820, + 0x37314: 0x6c3d4820, 0x37315: 0x6c3d4a20, 0x37316: 0x6c3d4c20, 0x37317: 0x6c3d4e20, + 0x37318: 0x6c3d5020, 0x37319: 0x6c3d5220, 0x3731a: 0x6c3d5420, 0x3731b: 0x6c3d5620, + 0x3731c: 0x6c3d5820, 0x3731d: 0x6c3d5a20, 0x3731e: 0x6c3d5c20, 0x3731f: 0x6c3d5e20, + 0x37320: 0x6c3d6020, 0x37321: 0x6c3d6220, 0x37322: 0x6c3d6420, 0x37323: 0x6c5b5820, + 0x37324: 0x6c5b5a20, 0x37325: 0x6c5b5c20, 0x37326: 0x6c5b5e20, 0x37327: 0x6c5b6020, + 0x37328: 0x6c5b6220, 0x37329: 0x6c5b6420, 0x3732a: 0x6c5b6620, 0x3732b: 0x6c5b6820, + 0x3732c: 0x6c5b6a20, 0x3732d: 0x6c5b6c20, 0x3732e: 0x6c5b6e20, 0x3732f: 0x6c5b7020, + 0x37330: 0x6c5b7220, 0x37331: 0x6c5b7420, 0x37332: 0x6c5b7620, 0x37333: 0x6c5b7820, + 0x37334: 0x6c5b7a20, 0x37335: 0x6c5b7c20, 0x37336: 0x6c5b7e20, 0x37337: 0x6c5b8020, + 0x37338: 0x6c5b8220, 0x37339: 0x6c5b8420, 0x3733a: 0x6c5b8620, 0x3733b: 0x6c5b8820, + 0x3733c: 0x6c5b8a20, 0x3733d: 0x6c5b8c20, 0x3733e: 0x6c7e6a20, 0x3733f: 0x6c7e6c20, + // Block 0xdcd, offset 0x37340 + 0x37340: 0x6c7e6e20, 0x37341: 0x6c7e7020, 0x37342: 0x6c7e7220, 0x37343: 0x6c7e7420, + 0x37344: 0x6c7e7620, 0x37345: 0x6c7e7820, 0x37346: 0x6c7e7a20, 0x37347: 0x6c7e7c20, + 0x37348: 0x6c7e7e20, 0x37349: 0x6c7e8020, 0x3734a: 0x6c7e8220, 0x3734b: 0x6c7e8420, + 0x3734c: 0x6c7e8620, 0x3734d: 0x6c7e8820, 0x3734e: 0x6c7e8a20, 0x3734f: 0x6c7e8c20, + 0x37350: 0x6c7e8e20, 0x37351: 0x6c7e9020, 0x37352: 0x6c7e9220, 0x37353: 0x6c7e9420, + 0x37354: 0x6c7e9620, 0x37355: 0x6c7e9820, 0x37356: 0x6c7e9a20, 0x37357: 0x6c7e9c20, + 0x37358: 0x6ca73820, 0x37359: 0x6ca73a20, 0x3735a: 0x6ca73c20, 0x3735b: 0x6ca73e20, + 0x3735c: 0x6ca74020, 0x3735d: 0x6ca74220, 0x3735e: 0x6ca74420, 0x3735f: 0x6ca74620, + 0x37360: 0x6ca74820, 0x37361: 0x6ca74a20, 0x37362: 0x6ca74c20, 0x37363: 0x6ca74e20, + 0x37364: 0x6ca75020, 0x37365: 0x6ca75220, 0x37366: 0x6ca75420, 0x37367: 0x6ca75620, + 0x37368: 0x6ca75820, 0x37369: 0x6ca75a20, 0x3736a: 0x6ca75c20, 0x3736b: 0x6ca75e20, + 0x3736c: 0x6ca76020, 0x3736d: 0x6ca76220, 0x3736e: 0x6ca76420, 0x3736f: 0x6ca76620, + 0x37370: 0x6ca76820, 0x37371: 0x6ca76a20, 0x37372: 0x6cd56020, 0x37373: 0x6cd56220, + 0x37374: 0x6cd56420, 0x37375: 0x6cd56620, 0x37376: 0x6cd56820, 0x37377: 0x6cd56a20, + 0x37378: 0x6cd56c20, 0x37379: 0x6cd56e20, 0x3737a: 0x6cd57020, 0x3737b: 0x6cd57220, + 0x3737c: 0x6cd57420, 0x3737d: 0x6cd57620, 0x3737e: 0x6cd57820, 0x3737f: 0x6cd57a20, + // Block 0xdce, offset 0x37380 + 0x37380: 0x6cd57c20, 0x37381: 0x6cd57e20, 0x37382: 0x6cd58020, 0x37383: 0x6cd58220, + 0x37384: 0x6cd58420, 0x37385: 0x6ca76c20, 0x37386: 0x6cd58620, 0x37387: 0x6cd58820, + 0x37388: 0x6cd58a20, 0x37389: 0x6cd58c20, 0x3738a: 0x6cd58e20, 0x3738b: 0x6cd59020, + 0x3738c: 0x6cd59220, 0x3738d: 0x6d03c220, 0x3738e: 0x6d03c420, 0x3738f: 0x6d03c620, + 0x37390: 0x6d03c820, 0x37391: 0x6d03ca20, 0x37392: 0x6d03cc20, 0x37393: 0x6d03ce20, + 0x37394: 0x6d03d020, 0x37395: 0x6d03d220, 0x37396: 0x6d03d420, 0x37397: 0x6d03d620, + 0x37398: 0x6d03d820, 0x37399: 0x6d03da20, 0x3739a: 0x6d03dc20, 0x3739b: 0x6d03de20, + 0x3739c: 0x6d03e020, 0x3739d: 0x6d03e220, 0x3739e: 0x6d03e420, 0x3739f: 0x6d03e620, + 0x373a0: 0x6d03e820, 0x373a1: 0x6d03ea20, 0x373a2: 0x6d03ec20, 0x373a3: 0x6d03ee20, + 0x373a4: 0x6d03f020, 0x373a5: 0x6d03f220, 0x373a6: 0x6d03f420, 0x373a7: 0x6d03f620, + 0x373a8: 0x6d03f820, 0x373a9: 0x6d03fa20, 0x373aa: 0x6d03fc20, 0x373ab: 0x6d03fe20, + 0x373ac: 0x6d040020, 0x373ad: 0x6d040220, 0x373ae: 0x6d040420, 0x373af: 0x6d040620, + 0x373b0: 0x6d040820, 0x373b1: 0x6d040a20, 0x373b2: 0x6d040c20, 0x373b3: 0x6d040e20, + 0x373b4: 0x6d041020, 0x373b5: 0x6d041220, 0x373b6: 0x6d041420, 0x373b7: 0x6d041620, + 0x373b8: 0x6d041820, 0x373b9: 0x6d041a20, 0x373ba: 0x6d041c20, 0x373bb: 0x6d041e20, + 0x373bc: 0x6d042020, 0x373bd: 0x6d315020, 0x373be: 0x6d315220, 0x373bf: 0x6d315420, + // Block 0xdcf, offset 0x373c0 + 0x373c0: 0x6d315620, 0x373c1: 0x6d315820, 0x373c2: 0x6d315a20, 0x373c3: 0x6d315c20, + 0x373c4: 0x6d315e20, 0x373c5: 0x6d316020, 0x373c6: 0x6d316220, 0x373c7: 0x6d316420, + 0x373c8: 0x6d316620, 0x373c9: 0x6d316820, 0x373ca: 0x6d316a20, 0x373cb: 0x6d316c20, + 0x373cc: 0x6d316e20, 0x373cd: 0x6d317020, 0x373ce: 0x6d317220, 0x373cf: 0x6d317420, + 0x373d0: 0x6d317620, 0x373d1: 0x6d317820, 0x373d2: 0x6d317a20, 0x373d3: 0x6d317c20, + 0x373d4: 0x6d317e20, 0x373d5: 0x6d318020, 0x373d6: 0x6d318220, 0x373d7: 0x6d318420, + 0x373d8: 0x6d318620, 0x373d9: 0x6d318820, 0x373da: 0x6d318a20, 0x373db: 0x6d318c20, + 0x373dc: 0x6d318e20, 0x373dd: 0x6d319020, 0x373de: 0x6d319220, 0x373df: 0x6d319420, + 0x373e0: 0x6d319620, 0x373e1: 0x6d319820, 0x373e2: 0x6d319a20, 0x373e3: 0x6d319c20, + 0x373e4: 0x6d319e20, 0x373e5: 0x6d31a020, 0x373e6: 0x6d31a220, 0x373e7: 0x6d31a420, + 0x373e8: 0x6d31a620, 0x373e9: 0x6d31a820, 0x373ea: 0x6d31aa20, 0x373eb: 0x6d31ac20, + 0x373ec: 0x6d31ae20, 0x373ed: 0x6d31b020, 0x373ee: 0x6d31b220, 0x373ef: 0x6d31b420, + 0x373f0: 0x6d31b620, 0x373f1: 0x6d5e0c20, 0x373f2: 0x6d5e0e20, 0x373f3: 0x6d5e1020, + 0x373f4: 0x6d5e1220, 0x373f5: 0x6d5e1420, 0x373f6: 0x6d5e1620, 0x373f7: 0x6d5e1820, + 0x373f8: 0x6d5e1a20, 0x373f9: 0x6d5e1c20, 0x373fa: 0x6d5e1e20, 0x373fb: 0x6d5e2020, + 0x373fc: 0x6d5e2220, 0x373fd: 0x6d5e2420, 0x373fe: 0x6d5e2620, 0x373ff: 0x6d5e2820, + // Block 0xdd0, offset 0x37400 + 0x37400: 0x6d5e2a20, 0x37401: 0x6d5e2c20, 0x37402: 0x6d5e2e20, 0x37403: 0x6d5e3020, + 0x37404: 0x6d5e3220, 0x37405: 0x6d5e3420, 0x37406: 0x6d5e3620, 0x37407: 0x6d5e3820, + 0x37408: 0x6d5e3a20, 0x37409: 0x6d5e3c20, 0x3740a: 0x6d5e3e20, 0x3740b: 0x6d5e4020, + 0x3740c: 0x6d5e4220, 0x3740d: 0x6d5e4420, 0x3740e: 0x6d5e4620, 0x3740f: 0x6d5e4820, + 0x37410: 0x6d5e4a20, 0x37411: 0x6d5e4c20, 0x37412: 0x6d5e4e20, 0x37413: 0x6d5e5020, + 0x37414: 0x6d5e5220, 0x37415: 0x6d5e5420, 0x37416: 0x6d5e5620, 0x37417: 0x6d5e5820, + 0x37418: 0x6d5e5a20, 0x37419: 0x6d5e5c20, 0x3741a: 0x6d5e5e20, 0x3741b: 0x6d5e6020, + 0x3741c: 0x6d885c20, 0x3741d: 0x6d885e20, 0x3741e: 0x6d886020, 0x3741f: 0x6d886220, + 0x37420: 0x6d886420, 0x37421: 0x6d886620, 0x37422: 0x6d886820, 0x37423: 0x6d886a20, + 0x37424: 0x6d886c20, 0x37425: 0x6d886e20, 0x37426: 0x6d887020, 0x37427: 0x6d887220, + 0x37428: 0x6d887420, 0x37429: 0x6d887620, 0x3742a: 0x6d887820, 0x3742b: 0x6d887a20, + 0x3742c: 0x6d887c20, 0x3742d: 0x6d887e20, 0x3742e: 0x6d888020, 0x3742f: 0x6d888220, + 0x37430: 0x6d888420, 0x37431: 0x6d888620, 0x37432: 0x6d888820, 0x37433: 0x6d888a20, + 0x37434: 0x6d888c20, 0x37435: 0x6d888e20, 0x37436: 0x6d889020, 0x37437: 0x6d889220, + 0x37438: 0x6d889420, 0x37439: 0x6d889620, 0x3743a: 0x6d889820, 0x3743b: 0x6d889a20, + 0x3743c: 0x6d889c20, 0x3743d: 0x6d889e20, 0x3743e: 0x6d88a020, 0x3743f: 0x6d88a220, + // Block 0xdd1, offset 0x37440 + 0x37440: 0x6d88a420, 0x37441: 0x6d88a620, 0x37442: 0x6d88a820, 0x37443: 0x6d88aa20, + 0x37444: 0x6d88ac20, 0x37445: 0x6d88ae20, 0x37446: 0x6d88b020, 0x37447: 0x6d88b220, + 0x37448: 0x6d88b420, 0x37449: 0x6d88b620, 0x3744a: 0x6dacec20, 0x3744b: 0x6dacee20, + 0x3744c: 0x6dacf020, 0x3744d: 0x6dacf220, 0x3744e: 0x6dacf420, 0x3744f: 0x6dacf620, + 0x37450: 0x6dacf820, 0x37451: 0x6dacfa20, 0x37452: 0x6dacfc20, 0x37453: 0x6dacfe20, + 0x37454: 0x6dad0020, 0x37455: 0x6dad0220, 0x37456: 0x6dad0420, 0x37457: 0x6dad0620, + 0x37458: 0x6dad0820, 0x37459: 0x6dad0a20, 0x3745a: 0x6dad0c20, 0x3745b: 0x6dad0e20, + 0x3745c: 0x6dad1020, 0x3745d: 0x6dad1220, 0x3745e: 0x6dad1420, 0x3745f: 0x6dad1620, + 0x37460: 0x6dad1820, 0x37461: 0x6dad1a20, 0x37462: 0x6dad1c20, 0x37463: 0x6dad1e20, + 0x37464: 0x6dad2020, 0x37465: 0x6dad2220, 0x37466: 0x6dad2420, 0x37467: 0x6dad2620, + 0x37468: 0x6dad2820, 0x37469: 0x6dad2a20, 0x3746a: 0x6dad2c20, 0x3746b: 0x6dad2e20, + 0x3746c: 0x6dad3020, 0x3746d: 0x6dad3220, 0x3746e: 0x6dad3420, 0x3746f: 0x6dad3620, + 0x37470: 0x6dad3820, 0x37471: 0x6dad3a20, 0x37472: 0x6dad3c20, 0x37473: 0x6dad3e20, + 0x37474: 0x6dccd820, 0x37475: 0x6dccda20, 0x37476: 0x6dccdc20, 0x37477: 0x6dccde20, + 0x37478: 0x6dcce020, 0x37479: 0x6dcce220, 0x3747a: 0x6dcce420, 0x3747b: 0x6dcce620, + 0x3747c: 0x6dcce820, 0x3747d: 0x6dccea20, 0x3747e: 0x6dccec20, 0x3747f: 0x6dccee20, + // Block 0xdd2, offset 0x37480 + 0x37480: 0x6dccf020, 0x37481: 0x6dccf220, 0x37482: 0x6dccf420, 0x37483: 0x6dccf620, + 0x37484: 0x6dccf820, 0x37485: 0x6dccfa20, 0x37486: 0x6dccfc20, 0x37487: 0x6dccfe20, + 0x37488: 0x6dcd0020, 0x37489: 0x6dcd0220, 0x3748a: 0x6de7cc20, 0x3748b: 0x6dcd0420, + 0x3748c: 0x6dcd0620, 0x3748d: 0x6dcd0820, 0x3748e: 0x6dcd0a20, 0x3748f: 0x6dcd0c20, + 0x37490: 0x6dcd0e20, 0x37491: 0x6dcd1020, 0x37492: 0x6dcd1220, 0x37493: 0x6dcd1420, + 0x37494: 0x6dcd1620, 0x37495: 0x6de7ce20, 0x37496: 0x6de7d020, 0x37497: 0x6de7d220, + 0x37498: 0x6de7d420, 0x37499: 0x6de7d620, 0x3749a: 0x6de7d820, 0x3749b: 0x6de7da20, + 0x3749c: 0x6de7dc20, 0x3749d: 0x6de7de20, 0x3749e: 0x6de7e020, 0x3749f: 0x6de7e220, + 0x374a0: 0x6de7e420, 0x374a1: 0x6de7e620, 0x374a2: 0x6dfe5220, 0x374a3: 0x6de7e820, + 0x374a4: 0x6de7ea20, 0x374a5: 0x6de7ec20, 0x374a6: 0x6de7ee20, 0x374a7: 0x6de7f020, + 0x374a8: 0x6dfe5420, 0x374a9: 0x6dfe5620, 0x374aa: 0x6dfe5820, 0x374ab: 0x6dfe5a20, + 0x374ac: 0x6dfe5c20, 0x374ad: 0x6dfe5e20, 0x374ae: 0x6dfe6020, 0x374af: 0x6dfe6220, + 0x374b0: 0x6dfe6420, 0x374b1: 0x6dfe6620, 0x374b2: 0x6dfe6820, 0x374b3: 0x6dfe6a20, + 0x374b4: 0x6dfe6c20, 0x374b5: 0x6dfe6e20, 0x374b6: 0x6dfe7020, 0x374b7: 0x6e046620, + 0x374b8: 0x6dfe7220, 0x374b9: 0x6dfe7420, 0x374ba: 0x6dfe7620, 0x374bb: 0x6dfe7820, + 0x374bc: 0x6dfe7a20, 0x374bd: 0x6dfe7c20, 0x374be: 0x6dfe7e20, 0x374bf: 0x6dfe8020, + // Block 0xdd3, offset 0x374c0 + 0x374c0: 0x6e10d220, 0x374c1: 0x6e10d420, 0x374c2: 0x6e10d620, 0x374c3: 0x6e10d820, + 0x374c4: 0x6e10da20, 0x374c5: 0x6e10dc20, 0x374c6: 0x6e1f6c20, 0x374c7: 0x6e1f6e20, + 0x374c8: 0x6e1f7020, 0x374c9: 0x6e1f7220, 0x374ca: 0x6e2aaa20, 0x374cb: 0x6e2aac20, + 0x374cc: 0x6e2aae20, 0x374cd: 0x6e2ab020, 0x374ce: 0x6e2ab220, 0x374cf: 0x6e2ab420, + 0x374d0: 0x6e2ab620, 0x374d1: 0x6e2ab820, 0x374d2: 0x6e2aba20, 0x374d3: 0x6e334020, + 0x374d4: 0x6e328a20, 0x374d5: 0x6e334220, 0x374d6: 0x6e334420, 0x374d7: 0x6e394e20, + 0x374d8: 0x6e395020, 0x374d9: 0x6e395220, 0x374da: 0x6e395420, 0x374db: 0x6e3da420, + 0x374dc: 0x6e3da620, 0x374dd: 0x6e3da820, 0x374de: 0x6e444a20, 0x374df: 0x6e444c20, + 0x374e0: 0x6e463420, 0x374e1: 0x6e46cc20, 0x374e2: 0x6c0a4220, 0x374e3: 0x6c258020, + 0x374e4: 0x6c258220, 0x374e5: 0x6c258420, 0x374e6: 0x6c258620, 0x374e7: 0x6c3d7220, + 0x374e8: 0x6c3d7420, 0x374e9: 0x6c3d7620, 0x374ea: 0x6c3d7820, 0x374eb: 0x6c3d7a20, + 0x374ec: 0x6c3d7c20, 0x374ed: 0x6c3d7e20, 0x374ee: 0x6c3d8020, 0x374ef: 0x6c3d8220, + 0x374f0: 0x6c3d8420, 0x374f1: 0x6c3d8620, 0x374f2: 0x6c3d8820, 0x374f3: 0x6c3d8a20, + 0x374f4: 0x6c5baa20, 0x374f5: 0x6c5bac20, 0x374f6: 0x6c5bae20, 0x374f7: 0x6c5bb020, + 0x374f8: 0x6c5bb220, 0x374f9: 0x6c5bb420, 0x374fa: 0x6c5bb620, 0x374fb: 0x6c5bb820, + 0x374fc: 0x6c5bba20, 0x374fd: 0x6c5bbc20, 0x374fe: 0x6c5bbe20, 0x374ff: 0x6c5bc020, + // Block 0xdd4, offset 0x37500 + 0x37500: 0x6c5bc220, 0x37501: 0x6c5bc420, 0x37502: 0x6c5bc620, 0x37503: 0x6c5bc820, + 0x37504: 0x6c5bca20, 0x37505: 0x6c5bcc20, 0x37506: 0x6c5bce20, 0x37507: 0x6c7ec220, + 0x37508: 0x6c7ec420, 0x37509: 0x6c7ec620, 0x3750a: 0x6c7ec820, 0x3750b: 0x6c7eca20, + 0x3750c: 0x6c7ecc20, 0x3750d: 0x6c7ece20, 0x3750e: 0x6c7ed020, 0x3750f: 0x6c7ed220, + 0x37510: 0x6c7ed420, 0x37511: 0x6c7ed620, 0x37512: 0x6c7ed820, 0x37513: 0x6c7eda20, + 0x37514: 0x6c7edc20, 0x37515: 0x6c7ede20, 0x37516: 0x6c7ee020, 0x37517: 0x6c7ee220, + 0x37518: 0x6c7ee420, 0x37519: 0x6c7ee620, 0x3751a: 0x6c7ee820, 0x3751b: 0x6c7eea20, + 0x3751c: 0x6c7eec20, 0x3751d: 0x6c7eee20, 0x3751e: 0x6c7ef020, 0x3751f: 0x6c7ef220, + 0x37520: 0x6ca79420, 0x37521: 0x6ca79620, 0x37522: 0x6ca79820, 0x37523: 0x6ca79a20, + 0x37524: 0x6ca79c20, 0x37525: 0x6ca79e20, 0x37526: 0x6ca7a020, 0x37527: 0x6ca7a220, + 0x37528: 0x6ca7a420, 0x37529: 0x6ca7a620, 0x3752a: 0x6ca7a820, 0x3752b: 0x6ca7aa20, + 0x3752c: 0x6ca7ac20, 0x3752d: 0x6ca7ae20, 0x3752e: 0x6ca7b020, 0x3752f: 0x6ca7b220, + 0x37530: 0x6ca7b420, 0x37531: 0x6ca7b620, 0x37532: 0x6ca7b820, 0x37533: 0x6ca7ba20, + 0x37534: 0x6ca7bc20, 0x37535: 0x6ca7be20, 0x37536: 0x6cd5ba20, 0x37537: 0x6cd5bc20, + 0x37538: 0x6cd5be20, 0x37539: 0x6cd5c020, 0x3753a: 0x6cd5c220, 0x3753b: 0x6cd5c420, + 0x3753c: 0x6cd5c620, 0x3753d: 0x6cd5c820, 0x3753e: 0x6cd5ca20, 0x3753f: 0x6cd5cc20, + // Block 0xdd5, offset 0x37540 + 0x37540: 0x6cd5ce20, 0x37541: 0x6cd5d020, 0x37542: 0x6cd5d220, 0x37543: 0x6cd5d420, + 0x37544: 0x6cd5d620, 0x37545: 0x6cd5d820, 0x37546: 0x6cd5da20, 0x37547: 0x6cd5dc20, + 0x37548: 0x6cd5de20, 0x37549: 0x6cd5e020, 0x3754a: 0x6cd5e220, 0x3754b: 0x6cd5e420, + 0x3754c: 0x6cd5e620, 0x3754d: 0x6cd5e820, 0x3754e: 0x6cd5ea20, 0x3754f: 0x6cd5ec20, + 0x37550: 0x6cd5ee20, 0x37551: 0x6cd5f020, 0x37552: 0x6cd5f220, 0x37553: 0x6cd5f420, + 0x37554: 0x6cd5f620, 0x37555: 0x6cd5f820, 0x37556: 0x6cd5fa20, 0x37557: 0x6cd5fc20, + 0x37558: 0x6cd5fe20, 0x37559: 0x6cd60020, 0x3755a: 0x6cd60220, 0x3755b: 0x6d044620, + 0x3755c: 0x6d044820, 0x3755d: 0x6d044a20, 0x3755e: 0x6d044c20, 0x3755f: 0x6d044e20, + 0x37560: 0x6d045020, 0x37561: 0x6d045220, 0x37562: 0x6d045420, 0x37563: 0x6d045620, + 0x37564: 0x6d045820, 0x37565: 0x6d045a20, 0x37566: 0x6d045c20, 0x37567: 0x6d045e20, + 0x37568: 0x6d046020, 0x37569: 0x6d046220, 0x3756a: 0x6d046420, 0x3756b: 0x6d046620, + 0x3756c: 0x6d046820, 0x3756d: 0x6d046a20, 0x3756e: 0x6d046c20, 0x3756f: 0x6d046e20, + 0x37570: 0x6d047020, 0x37571: 0x6d047220, 0x37572: 0x6d047420, 0x37573: 0x6d047620, + 0x37574: 0x6d047820, 0x37575: 0x6d047a20, 0x37576: 0x6d047c20, 0x37577: 0x6d047e20, + 0x37578: 0x6d31d420, 0x37579: 0x6d31d620, 0x3757a: 0x6d31d820, 0x3757b: 0x6d31da20, + 0x3757c: 0x6d31dc20, 0x3757d: 0x6d31de20, 0x3757e: 0x6d31e020, 0x3757f: 0x6d31e220, + // Block 0xdd6, offset 0x37580 + 0x37580: 0x6d31e420, 0x37581: 0x6d31e620, 0x37582: 0x6d31e820, 0x37583: 0x6d31ea20, + 0x37584: 0x6d31ec20, 0x37585: 0x6d31ee20, 0x37586: 0x6d31f020, 0x37587: 0x6d31f220, + 0x37588: 0x6d31f420, 0x37589: 0x6d31f620, 0x3758a: 0x6d31f820, 0x3758b: 0x6d31fa20, + 0x3758c: 0x6d31fc20, 0x3758d: 0x6d31fe20, 0x3758e: 0x6d320020, 0x3758f: 0x6d320220, + 0x37590: 0x6d5e7e20, 0x37591: 0x6d5e8020, 0x37592: 0x6d5e8220, 0x37593: 0x6d5e8420, + 0x37594: 0x6d5e8620, 0x37595: 0x6d5e8820, 0x37596: 0x6d5e8a20, 0x37597: 0x6d5e8c20, + 0x37598: 0x6d5e8e20, 0x37599: 0x6d5e9020, 0x3759a: 0x6d5e9220, 0x3759b: 0x6d5e9420, + 0x3759c: 0x6d5e9620, 0x3759d: 0x6d5e9820, 0x3759e: 0x6d5e9a20, 0x3759f: 0x6d5e9c20, + 0x375a0: 0x6d5e9e20, 0x375a1: 0x6d5ea020, 0x375a2: 0x6d627c20, 0x375a3: 0x6d5ea220, + 0x375a4: 0x6d5ea420, 0x375a5: 0x6d5ea620, 0x375a6: 0x6d5ea820, 0x375a7: 0x6d5eaa20, + 0x375a8: 0x6d5eac20, 0x375a9: 0x6d5eae20, 0x375aa: 0x6d5eb020, 0x375ab: 0x6d5eb220, + 0x375ac: 0x6d88da20, 0x375ad: 0x6d88dc20, 0x375ae: 0x6d88de20, 0x375af: 0x6d88e020, + 0x375b0: 0x6d88e220, 0x375b1: 0x6d88e420, 0x375b2: 0x6d88e620, 0x375b3: 0x6d88e820, + 0x375b4: 0x6d88ea20, 0x375b5: 0x6d88ec20, 0x375b6: 0x6d88ee20, 0x375b7: 0x6d88f020, + 0x375b8: 0x6d88f220, 0x375b9: 0x6d88f420, 0x375ba: 0x6d88f620, 0x375bb: 0x6d88f820, + 0x375bc: 0x6dad5a20, 0x375bd: 0x6d88fa20, 0x375be: 0x6d88fc20, 0x375bf: 0x6d88fe20, + // Block 0xdd7, offset 0x375c0 + 0x375c0: 0x6d890020, 0x375c1: 0x6d890220, 0x375c2: 0x6d890420, 0x375c3: 0x6d890620, + 0x375c4: 0x6d890820, 0x375c5: 0x6d890a20, 0x375c6: 0x6d890c20, 0x375c7: 0x6d890e20, + 0x375c8: 0x6d891020, 0x375c9: 0x6d891220, 0x375ca: 0x6d891420, 0x375cb: 0x6d891620, + 0x375cc: 0x6dad5c20, 0x375cd: 0x6dad5e20, 0x375ce: 0x6dad6020, 0x375cf: 0x6dad6220, + 0x375d0: 0x6dad6420, 0x375d1: 0x6dad6620, 0x375d2: 0x6dad6820, 0x375d3: 0x6dad6a20, + 0x375d4: 0x6dad6c20, 0x375d5: 0x6dad6e20, 0x375d6: 0x6dad7020, 0x375d7: 0x6dad7220, + 0x375d8: 0x6dad7420, 0x375d9: 0x6dad7620, 0x375da: 0x6dad7820, 0x375db: 0x6dad7a20, + 0x375dc: 0x6dad7c20, 0x375dd: 0x6dad7e20, 0x375de: 0x6dad8020, 0x375df: 0x6dad8220, + 0x375e0: 0x6dcd2420, 0x375e1: 0x6dcd2620, 0x375e2: 0x6dcd2820, 0x375e3: 0x6dcd2a20, + 0x375e4: 0x6dcd2c20, 0x375e5: 0x6dcd2e20, 0x375e6: 0x6dcd3020, 0x375e7: 0x6dcd3220, + 0x375e8: 0x6dcd3420, 0x375e9: 0x6dad8420, 0x375ea: 0x6de7f820, 0x375eb: 0x6de7fa20, + 0x375ec: 0x6de7fc20, 0x375ed: 0x6de7fe20, 0x375ee: 0x6de80020, 0x375ef: 0x6de80220, + 0x375f0: 0x6dfe8820, 0x375f1: 0x6dfe8a20, 0x375f2: 0x6de80420, 0x375f3: 0x6dfe8c20, + 0x375f4: 0x6dfe8e20, 0x375f5: 0x6e10e420, 0x375f6: 0x6dfe9020, 0x375f7: 0x6dfe9220, + 0x375f8: 0x6dfe9420, 0x375f9: 0x6dfe9620, 0x375fa: 0x6dfe9820, 0x375fb: 0x6e10e620, + 0x375fc: 0x6e10e820, 0x375fd: 0x6e10ea20, 0x375fe: 0x6e10ec20, 0x375ff: 0x6e10ee20, + // Block 0xdd8, offset 0x37600 + 0x37600: 0x6e10f020, 0x37601: 0x6e10f220, 0x37602: 0x6e10f420, 0x37603: 0x6e10f620, + 0x37604: 0x6e10f820, 0x37605: 0x6e10fa20, 0x37606: 0x6e10fc20, 0x37607: 0x6e10fe20, + 0x37608: 0x6e110020, 0x37609: 0x6e1f7a20, 0x3760a: 0x6e2abc20, 0x3760b: 0x6e2abe20, + 0x3760c: 0x6e334620, 0x3760d: 0x6e334820, 0x3760e: 0x6e395620, 0x3760f: 0x6e334a20, + 0x37610: 0x6e334c20, 0x37611: 0x6e334e20, 0x37612: 0x6e395820, 0x37613: 0x6e3daa20, + 0x37614: 0x6e444e20, 0x37615: 0x6c258e20, 0x37616: 0x6c259020, 0x37617: 0x6c3d9420, + 0x37618: 0x6c3d9620, 0x37619: 0x6c5be620, 0x3761a: 0x6c5be820, 0x3761b: 0x6c5bea20, + 0x3761c: 0x6c5bec20, 0x3761d: 0x6c5bee20, 0x3761e: 0x6c5bf020, 0x3761f: 0x6c5bf220, + 0x37620: 0x6c7f0c20, 0x37621: 0x6c7f0e20, 0x37622: 0x6c7f1020, 0x37623: 0x6c7f1220, + 0x37624: 0x6c7f1420, 0x37625: 0x6c7f1620, 0x37626: 0x6c7f1820, 0x37627: 0x6c7f1a20, + 0x37628: 0x6c7f1c20, 0x37629: 0x6c7f1e20, 0x3762a: 0x6c7f2020, 0x3762b: 0x6c7f2220, + 0x3762c: 0x6c7f2420, 0x3762d: 0x6c7f2620, 0x3762e: 0x6c7f2820, 0x3762f: 0x6c7f2a20, + 0x37630: 0x6c7f2c20, 0x37631: 0x6ca7ca20, 0x37632: 0x6ca7cc20, 0x37633: 0x6ca7ce20, + 0x37634: 0x6ca7d020, 0x37635: 0x6ca7d220, 0x37636: 0x6ca7d420, 0x37637: 0x6ca7d620, + 0x37638: 0x6ca7d820, 0x37639: 0x6ca7da20, 0x3763a: 0x6ca7dc20, 0x3763b: 0x6ca7de20, + 0x3763c: 0x6ca7e020, 0x3763d: 0x6ca7e220, 0x3763e: 0x6cd61a20, 0x3763f: 0x6cd61c20, + // Block 0xdd9, offset 0x37640 + 0x37640: 0x6cd61e20, 0x37641: 0x6cd62020, 0x37642: 0x6cd62220, 0x37643: 0x6cd62420, + 0x37644: 0x6cd62620, 0x37645: 0x6cd62820, 0x37646: 0x6cd62a20, 0x37647: 0x6cd62c20, + 0x37648: 0x6cd62e20, 0x37649: 0x6cd63020, 0x3764a: 0x6d049620, 0x3764b: 0x6d049820, + 0x3764c: 0x6d049a20, 0x3764d: 0x6d049c20, 0x3764e: 0x6d049e20, 0x3764f: 0x6d04a020, + 0x37650: 0x6d04a220, 0x37651: 0x6d04a420, 0x37652: 0x6d04a620, 0x37653: 0x6d04a820, + 0x37654: 0x6d04aa20, 0x37655: 0x6d04ac20, 0x37656: 0x6d04ae20, 0x37657: 0x6d04b020, + 0x37658: 0x6d321020, 0x37659: 0x6d321220, 0x3765a: 0x6d321420, 0x3765b: 0x6d321620, + 0x3765c: 0x6d321820, 0x3765d: 0x6d321a20, 0x3765e: 0x6d321c20, 0x3765f: 0x6d321e20, + 0x37660: 0x6d322020, 0x37661: 0x6d322220, 0x37662: 0x6d322420, 0x37663: 0x6d322620, + 0x37664: 0x6d322820, 0x37665: 0x6d5eb620, 0x37666: 0x6d5eb820, 0x37667: 0x6d5eba20, + 0x37668: 0x6d5ebc20, 0x37669: 0x6d5ebe20, 0x3766a: 0x6d5ec020, 0x3766b: 0x6d5ec220, + 0x3766c: 0x6d5ec420, 0x3766d: 0x6d892420, 0x3766e: 0x6d892620, 0x3766f: 0x6dad9020, + 0x37670: 0x6d892820, 0x37671: 0x6d892a20, 0x37672: 0x6dad9220, 0x37673: 0x6dad9420, + 0x37674: 0x6dad9620, 0x37675: 0x6dad9820, 0x37676: 0x6dad9a20, 0x37677: 0x6dad9c20, + 0x37678: 0x6dad9e20, 0x37679: 0x6dada020, 0x3767a: 0x6de80820, 0x3767b: 0x6dada220, + 0x3767c: 0x6dcd3c20, 0x3767d: 0x6dcd3e20, 0x3767e: 0x6dcd4020, 0x3767f: 0x6dcd4220, + // Block 0xdda, offset 0x37680 + 0x37680: 0x6dcd4420, 0x37681: 0x6dcd4620, 0x37682: 0x6dc73620, 0x37683: 0x6dcd4820, + 0x37684: 0x6dcd4a20, 0x37685: 0x6de80a20, 0x37686: 0x6de80c20, 0x37687: 0x6de80e20, + 0x37688: 0x6dfe9e20, 0x37689: 0x6dfea020, 0x3768a: 0x6dfea220, 0x3768b: 0x6dfea420, + 0x3768c: 0x6dfea620, 0x3768d: 0x6dfea820, 0x3768e: 0x6e110220, 0x3768f: 0x6e110420, + 0x37690: 0x6e1f8020, 0x37691: 0x6e1f8220, 0x37692: 0x6e395a20, 0x37693: 0x6e2ac220, + 0x37694: 0x6e335020, 0x37695: 0x6e395c20, 0x37696: 0x6e395e20, 0x37697: 0x6c141220, + 0x37698: 0x6c259420, 0x37699: 0x6c3d9e20, 0x3769a: 0x6c3da020, 0x3769b: 0x6c3da220, + 0x3769c: 0x6c3da420, 0x3769d: 0x6c5c0820, 0x3769e: 0x6c5c0a20, 0x3769f: 0x6c5c0c20, + 0x376a0: 0x6c5c0e20, 0x376a1: 0x6c5c1020, 0x376a2: 0x6c5c1220, 0x376a3: 0x6c5c1420, + 0x376a4: 0x6c5c1620, 0x376a5: 0x6c5c1820, 0x376a6: 0x6c5c1a20, 0x376a7: 0x6c5c1c20, + 0x376a8: 0x6c5c1e20, 0x376a9: 0x6c5c2020, 0x376aa: 0x6c5c2220, 0x376ab: 0x6c5c2420, + 0x376ac: 0x6c5c2620, 0x376ad: 0x6c5c2820, 0x376ae: 0x6c5c2a20, 0x376af: 0x6c7f6220, + 0x376b0: 0x6c7f6420, 0x376b1: 0x6c7f6620, 0x376b2: 0x6c7f6820, 0x376b3: 0x6c7f6a20, + 0x376b4: 0x6c7f6c20, 0x376b5: 0x6c7f6e20, 0x376b6: 0x6c7f7020, 0x376b7: 0x6c7f7220, + 0x376b8: 0x6c7f7420, 0x376b9: 0x6c7f7620, 0x376ba: 0x6c7f7820, 0x376bb: 0x6c7f7a20, + 0x376bc: 0x6c7f7c20, 0x376bd: 0x6c7f7e20, 0x376be: 0x6c7f8020, 0x376bf: 0x6c7f8220, + // Block 0xddb, offset 0x376c0 + 0x376c0: 0x6c7f8420, 0x376c1: 0x6c7f8620, 0x376c2: 0x6c7f8820, 0x376c3: 0x6c7f8a20, + 0x376c4: 0x6c7f8c20, 0x376c5: 0x6c7f8e20, 0x376c6: 0x6c7f9020, 0x376c7: 0x6c7f9220, + 0x376c8: 0x6c7f9420, 0x376c9: 0x6c7f9620, 0x376ca: 0x6c7f9820, 0x376cb: 0x6c7f9a20, + 0x376cc: 0x6ca84c20, 0x376cd: 0x6ca84e20, 0x376ce: 0x6ca85020, 0x376cf: 0x6ca85220, + 0x376d0: 0x6ca85420, 0x376d1: 0x6ca85620, 0x376d2: 0x6ca85820, 0x376d3: 0x6ca85a20, + 0x376d4: 0x6ca85c20, 0x376d5: 0x6ca85e20, 0x376d6: 0x6ca86020, 0x376d7: 0x6ca86220, + 0x376d8: 0x6ca86420, 0x376d9: 0x6ca86620, 0x376da: 0x6ca86820, 0x376db: 0x6ca86a20, + 0x376dc: 0x6ca86c20, 0x376dd: 0x6ca86e20, 0x376de: 0x6ca87020, 0x376df: 0x6ca87220, + 0x376e0: 0x6ca87420, 0x376e1: 0x6ca87620, 0x376e2: 0x6ca87820, 0x376e3: 0x6ca87a20, + 0x376e4: 0x6ca87c20, 0x376e5: 0x6ca87e20, 0x376e6: 0x6ca88020, 0x376e7: 0x6ca88220, + 0x376e8: 0x6ca88420, 0x376e9: 0x6ca88620, 0x376ea: 0x6cd69020, 0x376eb: 0x6cd69220, + 0x376ec: 0x6cd69420, 0x376ed: 0x6cd69620, 0x376ee: 0x6cd69820, 0x376ef: 0x6cd69a20, + 0x376f0: 0x6cd69c20, 0x376f1: 0x6cd69e20, 0x376f2: 0x6cd6a020, 0x376f3: 0x6cd6a220, + 0x376f4: 0x6cd6a420, 0x376f5: 0x6cd6a620, 0x376f6: 0x6cd6a820, 0x376f7: 0x6cd6aa20, + 0x376f8: 0x6cd6ac20, 0x376f9: 0x6cd6ae20, 0x376fa: 0x6cd6b020, 0x376fb: 0x6cd6b220, + 0x376fc: 0x6cd6b420, 0x376fd: 0x6cd6b620, 0x376fe: 0x6cd6b820, 0x376ff: 0x6ca88820, + // Block 0xddc, offset 0x37700 + 0x37700: 0x6cd6ba20, 0x37701: 0x6cd6bc20, 0x37702: 0x6cd6be20, 0x37703: 0x6cd6c020, + 0x37704: 0x6cd6c220, 0x37705: 0x6cd6c420, 0x37706: 0x6cd6c620, 0x37707: 0x6cd6c820, + 0x37708: 0x6cd6ca20, 0x37709: 0x6cd6cc20, 0x3770a: 0x6cd6ce20, 0x3770b: 0x6cd6d020, + 0x3770c: 0x6cd6d220, 0x3770d: 0x6cd6d420, 0x3770e: 0x6cd6d620, 0x3770f: 0x6cd6d820, + 0x37710: 0x6d051220, 0x37711: 0x6d051420, 0x37712: 0x6d051620, 0x37713: 0x6d051820, + 0x37714: 0x6d051a20, 0x37715: 0x6d051c20, 0x37716: 0x6d051e20, 0x37717: 0x6d052020, + 0x37718: 0x6d052220, 0x37719: 0x6d052420, 0x3771a: 0x6d052620, 0x3771b: 0x6d052820, + 0x3771c: 0x6d052a20, 0x3771d: 0x6d052c20, 0x3771e: 0x6d052e20, 0x3771f: 0x6d053020, + 0x37720: 0x6d053220, 0x37721: 0x6d053420, 0x37722: 0x6d053620, 0x37723: 0x6d053820, + 0x37724: 0x6d053a20, 0x37725: 0x6d053c20, 0x37726: 0x6d053e20, 0x37727: 0x6d054020, + 0x37728: 0x6d054220, 0x37729: 0x6d054420, 0x3772a: 0x6d054620, 0x3772b: 0x6d054820, + 0x3772c: 0x6d054a20, 0x3772d: 0x6d054c20, 0x3772e: 0x6d054e20, 0x3772f: 0x6d055020, + 0x37730: 0x6d055220, 0x37731: 0x6d055420, 0x37732: 0x6d055620, 0x37733: 0x6d055820, + 0x37734: 0x6d055a20, 0x37735: 0x6d055c20, 0x37736: 0x6d055e20, 0x37737: 0x6d056020, + 0x37738: 0x6d056220, 0x37739: 0x6d056420, 0x3773a: 0x6d056620, 0x3773b: 0x6d056820, + 0x3773c: 0x6d056a20, 0x3773d: 0x6d056c20, 0x3773e: 0x6d056e20, 0x3773f: 0x6d057020, + // Block 0xddd, offset 0x37740 + 0x37740: 0x6d057220, 0x37741: 0x6d057420, 0x37742: 0x6d057620, 0x37743: 0x6d057820, + 0x37744: 0x6d057a20, 0x37745: 0x6d057c20, 0x37746: 0x6d057e20, 0x37747: 0x6d058020, + 0x37748: 0x6d058220, 0x37749: 0x6d058420, 0x3774a: 0x6d058620, 0x3774b: 0x6d058820, + 0x3774c: 0x6d058a20, 0x3774d: 0x6d32a220, 0x3774e: 0x6d32a420, 0x3774f: 0x6d32a620, + 0x37750: 0x6d32a820, 0x37751: 0x6d32aa20, 0x37752: 0x6d32ac20, 0x37753: 0x6d32ae20, + 0x37754: 0x6d32b020, 0x37755: 0x6d32b220, 0x37756: 0x6d32b420, 0x37757: 0x6d32b620, + 0x37758: 0x6d32b820, 0x37759: 0x6d32ba20, 0x3775a: 0x6d32bc20, 0x3775b: 0x6d32be20, + 0x3775c: 0x6d32c020, 0x3775d: 0x6d32c220, 0x3775e: 0x6d32c420, 0x3775f: 0x6d32c620, + 0x37760: 0x6d32c820, 0x37761: 0x6d32ca20, 0x37762: 0x6d32cc20, 0x37763: 0x6d32ce20, + 0x37764: 0x6d32d020, 0x37765: 0x6d32d220, 0x37766: 0x6d32d420, 0x37767: 0x6d32d620, + 0x37768: 0x6d32d820, 0x37769: 0x6d32da20, 0x3776a: 0x6d32dc20, 0x3776b: 0x6d32de20, + 0x3776c: 0x6d32e020, 0x3776d: 0x6d32e220, 0x3776e: 0x6d32e420, 0x3776f: 0x6d32e620, + 0x37770: 0x6d32e820, 0x37771: 0x6d32ea20, 0x37772: 0x6d32ec20, 0x37773: 0x6d32ee20, + 0x37774: 0x6d32f020, 0x37775: 0x6d32f220, 0x37776: 0x6d32f420, 0x37777: 0x6d32f620, + 0x37778: 0x6d32f820, 0x37779: 0x6d32fa20, 0x3777a: 0x6d32fc20, 0x3777b: 0x6d32fe20, + 0x3777c: 0x6d330020, 0x3777d: 0x6d330220, 0x3777e: 0x6d330420, 0x3777f: 0x6d330620, + // Block 0xdde, offset 0x37780 + 0x37780: 0x6d330820, 0x37781: 0x6d330a20, 0x37782: 0x6d330c20, 0x37783: 0x6d330e20, + 0x37784: 0x6d331020, 0x37785: 0x6d331220, 0x37786: 0x6d331420, 0x37787: 0x6d331620, + 0x37788: 0x6d331820, 0x37789: 0x6d331a20, 0x3778a: 0x6d331c20, 0x3778b: 0x6d331e20, + 0x3778c: 0x6d332020, 0x3778d: 0x6d332220, 0x3778e: 0x6d332420, 0x3778f: 0x6d332620, + 0x37790: 0x6d332820, 0x37791: 0x6d5f4e20, 0x37792: 0x6d5f5020, 0x37793: 0x6d5f5220, + 0x37794: 0x6d5f5420, 0x37795: 0x6d5f5620, 0x37796: 0x6d5f5820, 0x37797: 0x6d5f5a20, + 0x37798: 0x6d5f5c20, 0x37799: 0x6d5f5e20, 0x3779a: 0x6d5f6020, 0x3779b: 0x6d5f6220, + 0x3779c: 0x6d5f6420, 0x3779d: 0x6d5f6620, 0x3779e: 0x6d5f6820, 0x3779f: 0x6d5f6a20, + 0x377a0: 0x6d5f6c20, 0x377a1: 0x6d5f6e20, 0x377a2: 0x6d5f7020, 0x377a3: 0x6d5f7220, + 0x377a4: 0x6d5f7420, 0x377a5: 0x6d5f7620, 0x377a6: 0x6d5f7820, 0x377a7: 0x6d5f7a20, + 0x377a8: 0x6d5f7c20, 0x377a9: 0x6d5f7e20, 0x377aa: 0x6d5f8020, 0x377ab: 0x6d5f8220, + 0x377ac: 0x6d5f8420, 0x377ad: 0x6d5f8620, 0x377ae: 0x6d5f8820, 0x377af: 0x6d5f8a20, + 0x377b0: 0x6d5f8c20, 0x377b1: 0x6d5f8e20, 0x377b2: 0x6d5f9020, 0x377b3: 0x6d5f9220, + 0x377b4: 0x6d5f9420, 0x377b5: 0x6d5f9620, 0x377b6: 0x6d5f9820, 0x377b7: 0x6d5f9a20, + 0x377b8: 0x6d5f9c20, 0x377b9: 0x6d5f9e20, 0x377ba: 0x6d5fa020, 0x377bb: 0x6d5fa220, + 0x377bc: 0x6d5fa420, 0x377bd: 0x6d5fa620, 0x377be: 0x6d5fa820, 0x377bf: 0x6d5faa20, + // Block 0xddf, offset 0x377c0 + 0x377c0: 0x6d5fac20, 0x377c1: 0x6d5fae20, 0x377c2: 0x6d5fb020, 0x377c3: 0x6d5fb220, + 0x377c4: 0x6d5fb420, 0x377c5: 0x6d5fb620, 0x377c6: 0x6d5fb820, 0x377c7: 0x6d5fba20, + 0x377c8: 0x6d5fbc20, 0x377c9: 0x6d5fbe20, 0x377ca: 0x6d5fc020, 0x377cb: 0x6d5fc220, + 0x377cc: 0x6d5fc420, 0x377cd: 0x6d5fc620, 0x377ce: 0x6d5fc820, 0x377cf: 0x6d5fca20, + 0x377d0: 0x6d5fcc20, 0x377d1: 0x6d5fce20, 0x377d2: 0x6d5fd020, 0x377d3: 0x6d5fd220, + 0x377d4: 0x6d5fd420, 0x377d5: 0x6d5fd620, 0x377d6: 0x6d5fd820, 0x377d7: 0x6d5fda20, + 0x377d8: 0x6d898620, 0x377d9: 0x6d898820, 0x377da: 0x6d898a20, 0x377db: 0x6d898c20, + 0x377dc: 0x6d898e20, 0x377dd: 0x6d899020, 0x377de: 0x6d899220, 0x377df: 0x6d899420, + 0x377e0: 0x6d899620, 0x377e1: 0x6d899820, 0x377e2: 0x6d899a20, 0x377e3: 0x6d899c20, + 0x377e4: 0x6d899e20, 0x377e5: 0x6d89a020, 0x377e6: 0x6d89a220, 0x377e7: 0x6d89a420, + 0x377e8: 0x6d89a620, 0x377e9: 0x6d89a820, 0x377ea: 0x6d89aa20, 0x377eb: 0x6d89ac20, + 0x377ec: 0x6d89ae20, 0x377ed: 0x6d89b020, 0x377ee: 0x6d89b220, 0x377ef: 0x6d89b420, + 0x377f0: 0x6d89b620, 0x377f1: 0x6d89b820, 0x377f2: 0x6d89ba20, 0x377f3: 0x6d89bc20, + 0x377f4: 0x6d89be20, 0x377f5: 0x6d89c020, 0x377f6: 0x6d89c220, 0x377f7: 0x6d89c420, + 0x377f8: 0x6d89c620, 0x377f9: 0x6d89c820, 0x377fa: 0x6d89ca20, 0x377fb: 0x6d89cc20, + 0x377fc: 0x6d89ce20, 0x377fd: 0x6d89d020, 0x377fe: 0x6d89d220, 0x377ff: 0x6d89d420, + // Block 0xde0, offset 0x37800 + 0x37800: 0x6d89d620, 0x37801: 0x6d89d820, 0x37802: 0x6d89da20, 0x37803: 0x6d89dc20, + 0x37804: 0x6d89de20, 0x37805: 0x6d89e020, 0x37806: 0x6d89e220, 0x37807: 0x6d89e420, + 0x37808: 0x6d89e620, 0x37809: 0x6d89e820, 0x3780a: 0x6d89ea20, 0x3780b: 0x6d89ec20, + 0x3780c: 0x6d89ee20, 0x3780d: 0x6d89f020, 0x3780e: 0x6d89f220, 0x3780f: 0x6d89f420, + 0x37810: 0x6d89f620, 0x37811: 0x6d89f820, 0x37812: 0x6d89fa20, 0x37813: 0x6d89fc20, + 0x37814: 0x6d89fe20, 0x37815: 0x6d8a0020, 0x37816: 0x6d8a0220, 0x37817: 0x6d8a0420, + 0x37818: 0x6d8a0620, 0x37819: 0x6d8a0820, 0x3781a: 0x6d8a0a20, 0x3781b: 0x6d8a0c20, + 0x3781c: 0x6d8a0e20, 0x3781d: 0x6d8a1020, 0x3781e: 0x6d8a1220, 0x3781f: 0x6d8a1420, + 0x37820: 0x6d8a1620, 0x37821: 0x6d8a1820, 0x37822: 0x6d8a1a20, 0x37823: 0x6d8a1c20, + 0x37824: 0x6d8a1e20, 0x37825: 0x6d8a2020, 0x37826: 0x6d8a2220, 0x37827: 0x6d8a2420, + 0x37828: 0x6d8a2620, 0x37829: 0x6d8a2820, 0x3782a: 0x6d8a2a20, 0x3782b: 0x6d8a2c20, + 0x3782c: 0x6d8a2e20, 0x3782d: 0x6d8a3020, 0x3782e: 0x6d8a3220, 0x3782f: 0x6d8a3420, + 0x37830: 0x6d8a3620, 0x37831: 0x6d8a3820, 0x37832: 0x6d8a3a20, 0x37833: 0x6d8a3c20, + 0x37834: 0x6d8a3e20, 0x37835: 0x6dae1220, 0x37836: 0x6dae1420, 0x37837: 0x6dae1620, + 0x37838: 0x6dae1820, 0x37839: 0x6dae1a20, 0x3783a: 0x6dae1c20, 0x3783b: 0x6dae1e20, + 0x3783c: 0x6dae2020, 0x3783d: 0x6dae2220, 0x3783e: 0x6dae2420, 0x3783f: 0x6dae2620, + // Block 0xde1, offset 0x37840 + 0x37840: 0x6dae2820, 0x37841: 0x6dae2a20, 0x37842: 0x6dae2c20, 0x37843: 0x6dae2e20, + 0x37844: 0x6dae3020, 0x37845: 0x6dae3220, 0x37846: 0x6dae3420, 0x37847: 0x6dae3620, + 0x37848: 0x6dae3820, 0x37849: 0x6dae3a20, 0x3784a: 0x6dae3c20, 0x3784b: 0x6dae3e20, + 0x3784c: 0x6dae4020, 0x3784d: 0x6dae4220, 0x3784e: 0x6dae4420, 0x3784f: 0x6dae4620, + 0x37850: 0x6dae4820, 0x37851: 0x6dae4a20, 0x37852: 0x6dae4c20, 0x37853: 0x6dae4e20, + 0x37854: 0x6dae5020, 0x37855: 0x6dae5220, 0x37856: 0x6dae5420, 0x37857: 0x6dae5620, + 0x37858: 0x6dae5820, 0x37859: 0x6dae5a20, 0x3785a: 0x6dae5c20, 0x3785b: 0x6dae5e20, + 0x3785c: 0x6dae6020, 0x3785d: 0x6dae6220, 0x3785e: 0x6dae6420, 0x3785f: 0x6dae6620, + 0x37860: 0x6dae6820, 0x37861: 0x6dae6a20, 0x37862: 0x6dae6c20, 0x37863: 0x6dae6e20, + 0x37864: 0x6dae7020, 0x37865: 0x6dae7220, 0x37866: 0x6dae7420, 0x37867: 0x6dae7620, + 0x37868: 0x6dae7820, 0x37869: 0x6dae7a20, 0x3786a: 0x6dae7c20, 0x3786b: 0x6dae7e20, + 0x3786c: 0x6dae8020, 0x3786d: 0x6dae8220, 0x3786e: 0x6dae8420, 0x3786f: 0x6dae8620, + 0x37870: 0x6dae8820, 0x37871: 0x6dae8a20, 0x37872: 0x6dae8c20, 0x37873: 0x6dae8e20, + 0x37874: 0x6dae9020, 0x37875: 0x6dae9220, 0x37876: 0x6dae9420, 0x37877: 0x6dae9620, + 0x37878: 0x6dae9820, 0x37879: 0x6dae9a20, 0x3787a: 0x6dae9c20, 0x3787b: 0x6dae9e20, + 0x3787c: 0x6daea020, 0x3787d: 0x6daea220, 0x3787e: 0x6daea420, 0x3787f: 0x6daea620, + // Block 0xde2, offset 0x37880 + 0x37880: 0x6daea820, 0x37881: 0x6dcda420, 0x37882: 0x6daeaa20, 0x37883: 0x6daeac20, + 0x37884: 0x6daeae20, 0x37885: 0x6daeb020, 0x37886: 0x6dcda620, 0x37887: 0x6dcda820, + 0x37888: 0x6dcdaa20, 0x37889: 0x6dcdac20, 0x3788a: 0x6dcdae20, 0x3788b: 0x6dcdb020, + 0x3788c: 0x6dcdb220, 0x3788d: 0x6dcdb420, 0x3788e: 0x6dcdb620, 0x3788f: 0x6dcdb820, + 0x37890: 0x6dcdba20, 0x37891: 0x6dcdbc20, 0x37892: 0x6dcdbe20, 0x37893: 0x6dcdc020, + 0x37894: 0x6dcdc220, 0x37895: 0x6dcdc420, 0x37896: 0x6dcdc620, 0x37897: 0x6dcdc820, + 0x37898: 0x6dcdca20, 0x37899: 0x6dcdcc20, 0x3789a: 0x6dcdce20, 0x3789b: 0x6dcdd020, + 0x3789c: 0x6dcdd220, 0x3789d: 0x6dcdd420, 0x3789e: 0x6dcdd620, 0x3789f: 0x6dcdd820, + 0x378a0: 0x6dcdda20, 0x378a1: 0x6dcddc20, 0x378a2: 0x6dcdde20, 0x378a3: 0x6dcde020, + 0x378a4: 0x6dcde220, 0x378a5: 0x6dcde420, 0x378a6: 0x6dcde620, 0x378a7: 0x6dcde820, + 0x378a8: 0x6dcdea20, 0x378a9: 0x6dcdec20, 0x378aa: 0x6dcdee20, 0x378ab: 0x6dcdf020, + 0x378ac: 0x6dcdf220, 0x378ad: 0x6dcdf420, 0x378ae: 0x6dcdf620, 0x378af: 0x6dcdf820, + 0x378b0: 0x6dcdfa20, 0x378b1: 0x6dcdfc20, 0x378b2: 0x6dcdfe20, 0x378b3: 0x6dce0020, + 0x378b4: 0x6dce0220, 0x378b5: 0x6dce0420, 0x378b6: 0x6dce0620, 0x378b7: 0x6dce0820, + 0x378b8: 0x6dce0a20, 0x378b9: 0x6dce0c20, 0x378ba: 0x6dce0e20, 0x378bb: 0x6dce1020, + 0x378bc: 0x6dce1220, 0x378bd: 0x6dce1420, 0x378be: 0x6dce1620, 0x378bf: 0x6dce1820, + // Block 0xde3, offset 0x378c0 + 0x378c0: 0x6dce1a20, 0x378c1: 0x6dce1c20, 0x378c2: 0x6dce1e20, 0x378c3: 0x6dce2020, + 0x378c4: 0x6dce2220, 0x378c5: 0x6dce2420, 0x378c6: 0x6dce2620, 0x378c7: 0x6dce2820, + 0x378c8: 0x6dce2a20, 0x378c9: 0x6dce2c20, 0x378ca: 0x6dce2e20, 0x378cb: 0x6dce3020, + 0x378cc: 0x6dce3220, 0x378cd: 0x6dce3420, 0x378ce: 0x6daeb220, 0x378cf: 0x6dce3620, + 0x378d0: 0x6dce3820, 0x378d1: 0x6dce3a20, 0x378d2: 0x6dce3c20, 0x378d3: 0x6dce3e20, + 0x378d4: 0x6dce4020, 0x378d5: 0x6dce4220, 0x378d6: 0x6dce4420, 0x378d7: 0x6dce4620, + 0x378d8: 0x6dce4820, 0x378d9: 0x6dce4a20, 0x378da: 0x6dce4c20, 0x378db: 0x6dce4e20, + 0x378dc: 0x6dce5020, 0x378dd: 0x6dce5220, 0x378de: 0x6dce5420, 0x378df: 0x6dce5620, + 0x378e0: 0x6dce5820, 0x378e1: 0x6de84820, 0x378e2: 0x6de84a20, 0x378e3: 0x6de84c20, + 0x378e4: 0x6de84e20, 0x378e5: 0x6de85020, 0x378e6: 0x6de85220, 0x378e7: 0x6de85420, + 0x378e8: 0x6de85620, 0x378e9: 0x6de85820, 0x378ea: 0x6de85a20, 0x378eb: 0x6de85c20, + 0x378ec: 0x6de85e20, 0x378ed: 0x6de86020, 0x378ee: 0x6de86220, 0x378ef: 0x6de86420, + 0x378f0: 0x6de86620, 0x378f1: 0x6de86820, 0x378f2: 0x6de86a20, 0x378f3: 0x6de86c20, + 0x378f4: 0x6de86e20, 0x378f5: 0x6de87020, 0x378f6: 0x6de87220, 0x378f7: 0x6de87420, + 0x378f8: 0x6de87620, 0x378f9: 0x6de87820, 0x378fa: 0x6de87a20, 0x378fb: 0x6de87c20, + 0x378fc: 0x6de87e20, 0x378fd: 0x6de88020, 0x378fe: 0x6de88220, 0x378ff: 0x6de88420, + // Block 0xde4, offset 0x37900 + 0x37900: 0x6de88620, 0x37901: 0x6de88820, 0x37902: 0x6de88a20, 0x37903: 0x6de88c20, + 0x37904: 0x6de88e20, 0x37905: 0x6de89020, 0x37906: 0x6de89220, 0x37907: 0x6de89420, + 0x37908: 0x6de89620, 0x37909: 0x6de89820, 0x3790a: 0x6de89a20, 0x3790b: 0x6de89c20, + 0x3790c: 0x6de89e20, 0x3790d: 0x6de8a020, 0x3790e: 0x6de8a220, 0x3790f: 0x6de8a420, + 0x37910: 0x6de8a620, 0x37911: 0x6de8a820, 0x37912: 0x6de8aa20, 0x37913: 0x6de8ac20, + 0x37914: 0x6de8ae20, 0x37915: 0x6de8b020, 0x37916: 0x6de8b220, 0x37917: 0x6de8b420, + 0x37918: 0x6de8b620, 0x37919: 0x6de8b820, 0x3791a: 0x6de8ba20, 0x3791b: 0x6de8bc20, + 0x3791c: 0x6dfec820, 0x3791d: 0x6dfeca20, 0x3791e: 0x6dfecc20, 0x3791f: 0x6dfece20, + 0x37920: 0x6dfed020, 0x37921: 0x6dfed220, 0x37922: 0x6dfed420, 0x37923: 0x6dfed620, + 0x37924: 0x6dfed820, 0x37925: 0x6dfeda20, 0x37926: 0x6dfedc20, 0x37927: 0x6dfede20, + 0x37928: 0x6dfee020, 0x37929: 0x6dfee220, 0x3792a: 0x6dfee420, 0x3792b: 0x6dfee620, + 0x3792c: 0x6dfee820, 0x3792d: 0x6dfeea20, 0x3792e: 0x6dfeec20, 0x3792f: 0x6dfeee20, + 0x37930: 0x6dfef020, 0x37931: 0x6dfef220, 0x37932: 0x6dfef420, 0x37933: 0x6dfef620, + 0x37934: 0x6dfef820, 0x37935: 0x6dfefa20, 0x37936: 0x6dfefc20, 0x37937: 0x6dfefe20, + 0x37938: 0x6dff0020, 0x37939: 0x6dff0220, 0x3793a: 0x6dff0420, 0x3793b: 0x6dff0620, + 0x3793c: 0x6dff0820, 0x3793d: 0x6dff0a20, 0x3793e: 0x6dff0c20, 0x3793f: 0x6dff0e20, + // Block 0xde5, offset 0x37940 + 0x37940: 0x6dff1020, 0x37941: 0x6dff1220, 0x37942: 0x6dff1420, 0x37943: 0x6dff1620, + 0x37944: 0x6dff1820, 0x37945: 0x6e112220, 0x37946: 0x6e112420, 0x37947: 0x6e112620, + 0x37948: 0x6e112820, 0x37949: 0x6e112a20, 0x3794a: 0x6e112c20, 0x3794b: 0x6e112e20, + 0x3794c: 0x6e113020, 0x3794d: 0x6e113220, 0x3794e: 0x6e113420, 0x3794f: 0x6e113620, + 0x37950: 0x6e113820, 0x37951: 0x6e113a20, 0x37952: 0x6e113c20, 0x37953: 0x6e113e20, + 0x37954: 0x6e114020, 0x37955: 0x6e114220, 0x37956: 0x6e114420, 0x37957: 0x6e114620, + 0x37958: 0x6e114820, 0x37959: 0x6e114a20, 0x3795a: 0x6e114c20, 0x3795b: 0x6e114e20, + 0x3795c: 0x6e115020, 0x3795d: 0x6e115220, 0x3795e: 0x6e115420, 0x3795f: 0x6e115620, + 0x37960: 0x6e115820, 0x37961: 0x6e115a20, 0x37962: 0x6e115c20, 0x37963: 0x6e115e20, + 0x37964: 0x6e116020, 0x37965: 0x6e116220, 0x37966: 0x6e116420, 0x37967: 0x6e116620, + 0x37968: 0x6e116820, 0x37969: 0x6e116a20, 0x3796a: 0x6e116c20, 0x3796b: 0x6e116e20, + 0x3796c: 0x6e117020, 0x3796d: 0x6e117220, 0x3796e: 0x6e117420, 0x3796f: 0x6e117620, + 0x37970: 0x6e117820, 0x37971: 0x6e117a20, 0x37972: 0x6e117c20, 0x37973: 0x6e117e20, + 0x37974: 0x6e118020, 0x37975: 0x6e1fa220, 0x37976: 0x6e1fa420, 0x37977: 0x6e1fa620, + 0x37978: 0x6e1fa820, 0x37979: 0x6e1faa20, 0x3797a: 0x6e1fac20, 0x3797b: 0x6e1fae20, + 0x3797c: 0x6e1fb020, 0x3797d: 0x6e1fb220, 0x3797e: 0x6e1fb420, 0x3797f: 0x6e1fb620, + // Block 0xde6, offset 0x37980 + 0x37980: 0x6e1fb820, 0x37981: 0x6e1fba20, 0x37982: 0x6e1fbc20, 0x37983: 0x6e1fbe20, + 0x37984: 0x6e1fc020, 0x37985: 0x6e1fc220, 0x37986: 0x6e1fc420, 0x37987: 0x6e1fc620, + 0x37988: 0x6e1fc820, 0x37989: 0x6e1fca20, 0x3798a: 0x6e1fcc20, 0x3798b: 0x6e1fce20, + 0x3798c: 0x6e1fd020, 0x3798d: 0x6e1fd220, 0x3798e: 0x6e1fd420, 0x3798f: 0x6e1fd620, + 0x37990: 0x6e1fd820, 0x37991: 0x6e1fda20, 0x37992: 0x6e1fdc20, 0x37993: 0x6e1fde20, + 0x37994: 0x6e2ada20, 0x37995: 0x6e2adc20, 0x37996: 0x6e2ade20, 0x37997: 0x6e2ae020, + 0x37998: 0x6e2ae220, 0x37999: 0x6e2ae420, 0x3799a: 0x6e2ae620, 0x3799b: 0x6e2ae820, + 0x3799c: 0x6e2aea20, 0x3799d: 0x6e2aec20, 0x3799e: 0x6e2aee20, 0x3799f: 0x6e2af020, + 0x379a0: 0x6e2af220, 0x379a1: 0x6e2af420, 0x379a2: 0x6e2af620, 0x379a3: 0x6e2af820, + 0x379a4: 0x6e2afa20, 0x379a5: 0x6e2afc20, 0x379a6: 0x6e2afe20, 0x379a7: 0x6e2b0020, + 0x379a8: 0x6e335620, 0x379a9: 0x6e335820, 0x379aa: 0x6e335a20, 0x379ab: 0x6e335c20, + 0x379ac: 0x6e335e20, 0x379ad: 0x6e336020, 0x379ae: 0x6e336220, 0x379af: 0x6e336420, + 0x379b0: 0x6e336620, 0x379b1: 0x6e336820, 0x379b2: 0x6e336a20, 0x379b3: 0x6e336c20, + 0x379b4: 0x6e336e20, 0x379b5: 0x6e337020, 0x379b6: 0x6e337220, 0x379b7: 0x6e337420, + 0x379b8: 0x6e337620, 0x379b9: 0x6e337820, 0x379ba: 0x6e337a20, 0x379bb: 0x6e337c20, + 0x379bc: 0x6e396a20, 0x379bd: 0x6e396c20, 0x379be: 0x6e396e20, 0x379bf: 0x6e397020, + // Block 0xde7, offset 0x379c0 + 0x379c0: 0x6e397220, 0x379c1: 0x6e397420, 0x379c2: 0x6e397620, 0x379c3: 0x6e397820, + 0x379c4: 0x6e397a20, 0x379c5: 0x6e397c20, 0x379c6: 0x6e397e20, 0x379c7: 0x6e398020, + 0x379c8: 0x6e3db220, 0x379c9: 0x6e3db420, 0x379ca: 0x6e3db620, 0x379cb: 0x6e3db820, + 0x379cc: 0x6e3dba20, 0x379cd: 0x6e3dbc20, 0x379ce: 0x6e3dbe20, 0x379cf: 0x6e3dc020, + 0x379d0: 0x6e409020, 0x379d1: 0x6e409220, 0x379d2: 0x6e409420, 0x379d3: 0x6e409620, + 0x379d4: 0x6e409820, 0x379d5: 0x6e409a20, 0x379d6: 0x6e409c20, 0x379d7: 0x6e42d420, + 0x379d8: 0x6e445020, 0x379d9: 0x6e445220, 0x379da: 0x6e42d620, 0x379db: 0x6e42d820, + 0x379dc: 0x6e42da20, 0x379dd: 0x6e42dc20, 0x379de: 0x6e445420, 0x379df: 0x6e445620, + 0x379e0: 0x6e445820, 0x379e1: 0x6e453620, 0x379e2: 0x6e453820, 0x379e3: 0x6e45c620, + 0x379e4: 0x6e463820, 0x379e5: 0x6c259620, 0x379e6: 0x6c259820, 0x379e7: 0x6c3dae20, + 0x379e8: 0x6c3db020, 0x379e9: 0x6c3db220, 0x379ea: 0x6c3db420, 0x379eb: 0x6c5c4a20, + 0x379ec: 0x6c5c4c20, 0x379ed: 0x6c5c4e20, 0x379ee: 0x6c5c5020, 0x379ef: 0x6c5c5220, + 0x379f0: 0x6c5c5420, 0x379f1: 0x6c5c5620, 0x379f2: 0x6c5c5820, 0x379f3: 0x6c7fcc20, + 0x379f4: 0x6c7fce20, 0x379f5: 0x6c7fd020, 0x379f6: 0x6c7fd220, 0x379f7: 0x6c7fd420, + 0x379f8: 0x6c7fd620, 0x379f9: 0x6c7fd820, 0x379fa: 0x6c7fda20, 0x379fb: 0x6c7fdc20, + 0x379fc: 0x6c7fde20, 0x379fd: 0x6c7fe020, 0x379fe: 0x6c7fe220, 0x379ff: 0x6c7fe420, + // Block 0xde8, offset 0x37a00 + 0x37a00: 0x6c7fe620, 0x37a01: 0x6ca8b620, 0x37a02: 0x6ca8b820, 0x37a03: 0x6ca8ba20, + 0x37a04: 0x6ca8bc20, 0x37a05: 0x6ca8be20, 0x37a06: 0x6ca8c020, 0x37a07: 0x6ca8c220, + 0x37a08: 0x6ca8c420, 0x37a09: 0x6ca8c620, 0x37a0a: 0x6ca8c820, 0x37a0b: 0x6ca8ca20, + 0x37a0c: 0x6ca8cc20, 0x37a0d: 0x6ca8ce20, 0x37a0e: 0x6ca8d020, 0x37a0f: 0x6ca8d220, + 0x37a10: 0x6ca8d420, 0x37a11: 0x6ca8d620, 0x37a12: 0x6ca8d820, 0x37a13: 0x6ca8da20, + 0x37a14: 0x6ca8dc20, 0x37a15: 0x6ca8de20, 0x37a16: 0x6ca8e020, 0x37a17: 0x6cd70a20, + 0x37a18: 0x6ca8e220, 0x37a19: 0x6ca8e420, 0x37a1a: 0x6cd70c20, 0x37a1b: 0x6cd70e20, + 0x37a1c: 0x6cd71020, 0x37a1d: 0x6cd71220, 0x37a1e: 0x6cd71420, 0x37a1f: 0x6cd71620, + 0x37a20: 0x6cd71820, 0x37a21: 0x6cd71a20, 0x37a22: 0x6cd71c20, 0x37a23: 0x6cd71e20, + 0x37a24: 0x6cd72020, 0x37a25: 0x6cd72220, 0x37a26: 0x6cd72420, 0x37a27: 0x6cd72620, + 0x37a28: 0x6cd72820, 0x37a29: 0x6cd72a20, 0x37a2a: 0x6cd72c20, 0x37a2b: 0x6cd72e20, + 0x37a2c: 0x6cd73020, 0x37a2d: 0x6cd73220, 0x37a2e: 0x6cd73420, 0x37a2f: 0x6cd73620, + 0x37a30: 0x6cd73820, 0x37a31: 0x6ca8e620, 0x37a32: 0x6d05b620, 0x37a33: 0x6d05b820, + 0x37a34: 0x6d05ba20, 0x37a35: 0x6d05bc20, 0x37a36: 0x6d05be20, 0x37a37: 0x6d05c020, + 0x37a38: 0x6d05c220, 0x37a39: 0x6d05c420, 0x37a3a: 0x6d05c620, 0x37a3b: 0x6d05c820, + 0x37a3c: 0x6d05ca20, 0x37a3d: 0x6d05cc20, 0x37a3e: 0x6d05ce20, 0x37a3f: 0x6d05d020, + // Block 0xde9, offset 0x37a40 + 0x37a40: 0x6d05d220, 0x37a41: 0x6d05d420, 0x37a42: 0x6d05d620, 0x37a43: 0x6d05d820, + 0x37a44: 0x6d05da20, 0x37a45: 0x6d05dc20, 0x37a46: 0x6d05de20, 0x37a47: 0x6d05e020, + 0x37a48: 0x6d05e220, 0x37a49: 0x6d05e420, 0x37a4a: 0x6d05e620, 0x37a4b: 0x6d05e820, + 0x37a4c: 0x6d05ea20, 0x37a4d: 0x6d05ec20, 0x37a4e: 0x6d05ee20, 0x37a4f: 0x6d05f020, + 0x37a50: 0x6d05f220, 0x37a51: 0x6d05f420, 0x37a52: 0x6d05f620, 0x37a53: 0x6d05f820, + 0x37a54: 0x6d05fa20, 0x37a55: 0x6d05fc20, 0x37a56: 0x6d05fe20, 0x37a57: 0x6d060020, + 0x37a58: 0x6d335a20, 0x37a59: 0x6d335c20, 0x37a5a: 0x6d335e20, 0x37a5b: 0x6d336020, + 0x37a5c: 0x6d336220, 0x37a5d: 0x6d336420, 0x37a5e: 0x6d336620, 0x37a5f: 0x6d336820, + 0x37a60: 0x6d336a20, 0x37a61: 0x6d336c20, 0x37a62: 0x6d336e20, 0x37a63: 0x6d337020, + 0x37a64: 0x6d337220, 0x37a65: 0x6d337420, 0x37a66: 0x6d337620, 0x37a67: 0x6d337820, + 0x37a68: 0x6d337a20, 0x37a69: 0x6d337c20, 0x37a6a: 0x6d337e20, 0x37a6b: 0x6d338020, + 0x37a6c: 0x6d338220, 0x37a6d: 0x6d338420, 0x37a6e: 0x6d338620, 0x37a6f: 0x6d338820, + 0x37a70: 0x6d338a20, 0x37a71: 0x6d338c20, 0x37a72: 0x6d338e20, 0x37a73: 0x6d339020, + 0x37a74: 0x6d339220, 0x37a75: 0x6d339420, 0x37a76: 0x6d339620, 0x37a77: 0x6d339820, + 0x37a78: 0x6d339a20, 0x37a79: 0x6d339c20, 0x37a7a: 0x6d339e20, 0x37a7b: 0x6d33a020, + 0x37a7c: 0x6d33a220, 0x37a7d: 0x6d33a420, 0x37a7e: 0x6d33a620, 0x37a7f: 0x6d33a820, + // Block 0xdea, offset 0x37a80 + 0x37a80: 0x6d33aa20, 0x37a81: 0x6d601820, 0x37a82: 0x6d601a20, 0x37a83: 0x6d601c20, + 0x37a84: 0x6d601e20, 0x37a85: 0x6d602020, 0x37a86: 0x6d602220, 0x37a87: 0x6d602420, + 0x37a88: 0x6d602620, 0x37a89: 0x6d602820, 0x37a8a: 0x6d602a20, 0x37a8b: 0x6d602c20, + 0x37a8c: 0x6d602e20, 0x37a8d: 0x6d603020, 0x37a8e: 0x6d603220, 0x37a8f: 0x6d603420, + 0x37a90: 0x6d603620, 0x37a91: 0x6d603820, 0x37a92: 0x6d603a20, 0x37a93: 0x6d603c20, + 0x37a94: 0x6d603e20, 0x37a95: 0x6d604020, 0x37a96: 0x6d604220, 0x37a97: 0x6d604420, + 0x37a98: 0x6d604620, 0x37a99: 0x6d604820, 0x37a9a: 0x6d604a20, 0x37a9b: 0x6d604c20, + 0x37a9c: 0x6d604e20, 0x37a9d: 0x6d605020, 0x37a9e: 0x6d605220, 0x37a9f: 0x6d605420, + 0x37aa0: 0x6d605620, 0x37aa1: 0x6d605820, 0x37aa2: 0x6d605a20, 0x37aa3: 0x6d605c20, + 0x37aa4: 0x6d8a6e20, 0x37aa5: 0x6d8a7020, 0x37aa6: 0x6d8a7220, 0x37aa7: 0x6d8a7420, + 0x37aa8: 0x6d8a7620, 0x37aa9: 0x6d8a7820, 0x37aaa: 0x6d8a7a20, 0x37aab: 0x6d8a7c20, + 0x37aac: 0x6d8a7e20, 0x37aad: 0x6d8a8020, 0x37aae: 0x6d8a8220, 0x37aaf: 0x6d8a8420, + 0x37ab0: 0x6d8a8620, 0x37ab1: 0x6d8a8820, 0x37ab2: 0x6d8a8a20, 0x37ab3: 0x6d8a8c20, + 0x37ab4: 0x6d8a8e20, 0x37ab5: 0x6d8a9020, 0x37ab6: 0x6d8a9220, 0x37ab7: 0x6d8a9420, + 0x37ab8: 0x6d8a9620, 0x37ab9: 0x6d8a9820, 0x37aba: 0x6d8a9a20, 0x37abb: 0x6d8a9c20, + 0x37abc: 0x6d8a9e20, 0x37abd: 0x6d8aa020, 0x37abe: 0x6d8aa220, 0x37abf: 0x6daeea20, + // Block 0xdeb, offset 0x37ac0 + 0x37ac0: 0x6daeec20, 0x37ac1: 0x6daeee20, 0x37ac2: 0x6daef020, 0x37ac3: 0x6daef220, + 0x37ac4: 0x6daef420, 0x37ac5: 0x6daef620, 0x37ac6: 0x6daef820, 0x37ac7: 0x6daefa20, + 0x37ac8: 0x6daefc20, 0x37ac9: 0x6daefe20, 0x37aca: 0x6daf0020, 0x37acb: 0x6daf0220, + 0x37acc: 0x6daf0420, 0x37acd: 0x6daf0620, 0x37ace: 0x6daf0820, 0x37acf: 0x6daf0a20, + 0x37ad0: 0x6daf0c20, 0x37ad1: 0x6daf0e20, 0x37ad2: 0x6daf1020, 0x37ad3: 0x6daf1220, + 0x37ad4: 0x6daf1420, 0x37ad5: 0x6daf1620, 0x37ad6: 0x6daf1820, 0x37ad7: 0x6dce7c20, + 0x37ad8: 0x6dce7e20, 0x37ad9: 0x6dce8020, 0x37ada: 0x6dce8220, 0x37adb: 0x6dce8420, + 0x37adc: 0x6dce8620, 0x37add: 0x6dce8820, 0x37ade: 0x6dce8a20, 0x37adf: 0x6dce8c20, + 0x37ae0: 0x6dce8e20, 0x37ae1: 0x6dce9020, 0x37ae2: 0x6dce9220, 0x37ae3: 0x6dce9420, + 0x37ae4: 0x6dce9620, 0x37ae5: 0x6dce9820, 0x37ae6: 0x6dce9a20, 0x37ae7: 0x6dce9c20, + 0x37ae8: 0x6dce9e20, 0x37ae9: 0x6dcea020, 0x37aea: 0x6dcea220, 0x37aeb: 0x6dcea420, + 0x37aec: 0x6dcea620, 0x37aed: 0x6dcea820, 0x37aee: 0x6dceaa20, 0x37aef: 0x6dceac20, + 0x37af0: 0x6dceae20, 0x37af1: 0x6dceb020, 0x37af2: 0x6dceb220, 0x37af3: 0x6dceb420, + 0x37af4: 0x6dceb620, 0x37af5: 0x6dceb820, 0x37af6: 0x6de8d220, 0x37af7: 0x6de8d420, + 0x37af8: 0x6de8d620, 0x37af9: 0x6de8d820, 0x37afa: 0x6de8da20, 0x37afb: 0x6de8dc20, + 0x37afc: 0x6de8de20, 0x37afd: 0x6de8e020, 0x37afe: 0x6de8e220, 0x37aff: 0x6de8e420, + // Block 0xdec, offset 0x37b00 + 0x37b00: 0x6de8e620, 0x37b01: 0x6de8e820, 0x37b02: 0x6de8ea20, 0x37b03: 0x6de8ec20, + 0x37b04: 0x6de8ee20, 0x37b05: 0x6de8f020, 0x37b06: 0x6de8f220, 0x37b07: 0x6de8f420, + 0x37b08: 0x6de8f620, 0x37b09: 0x6de8f820, 0x37b0a: 0x6de8fa20, 0x37b0b: 0x6de8fc20, + 0x37b0c: 0x6de8fe20, 0x37b0d: 0x6de90020, 0x37b0e: 0x6de90220, 0x37b0f: 0x6dff2620, + 0x37b10: 0x6dff2820, 0x37b11: 0x6dff2a20, 0x37b12: 0x6dff2c20, 0x37b13: 0x6dff2e20, + 0x37b14: 0x6dff3020, 0x37b15: 0x6dff3220, 0x37b16: 0x6dff3420, 0x37b17: 0x6e118e20, + 0x37b18: 0x6e119020, 0x37b19: 0x6e119220, 0x37b1a: 0x6e119420, 0x37b1b: 0x6e119620, + 0x37b1c: 0x6e119820, 0x37b1d: 0x6e119a20, 0x37b1e: 0x6e119c20, 0x37b1f: 0x6e119e20, + 0x37b20: 0x6e11a020, 0x37b21: 0x6e1fe820, 0x37b22: 0x6e11a220, 0x37b23: 0x6e11a420, + 0x37b24: 0x6e1fea20, 0x37b25: 0x6e1fec20, 0x37b26: 0x6e1fee20, 0x37b27: 0x6e1ff020, + 0x37b28: 0x6e1ff220, 0x37b29: 0x6e1ff420, 0x37b2a: 0x6e1ff620, 0x37b2b: 0x6e1ff820, + 0x37b2c: 0x6e2b0a20, 0x37b2d: 0x6e2b0c20, 0x37b2e: 0x6e2b0e20, 0x37b2f: 0x6e2b1020, + 0x37b30: 0x6e2b1220, 0x37b31: 0x6e338020, 0x37b32: 0x6e338220, 0x37b33: 0x6e338420, + 0x37b34: 0x6e338620, 0x37b35: 0x6e338820, 0x37b36: 0x6e398a20, 0x37b37: 0x6e398c20, + 0x37b38: 0x6e398e20, 0x37b39: 0x6e399020, 0x37b3a: 0x6e399220, 0x37b3b: 0x6e3dc420, + 0x37b3c: 0x6e3dc620, 0x37b3d: 0x6e3dc820, 0x37b3e: 0x6e3dca20, 0x37b3f: 0x6e3dcc20, + // Block 0xded, offset 0x37b40 + 0x37b40: 0x6e40a020, 0x37b41: 0x6e40a220, 0x37b42: 0x6e453a20, 0x37b43: 0x6e45c820, + 0x37b44: 0x6e468a20, 0x37b45: 0x6c3dc420, 0x37b46: 0x6c3dc620, 0x37b47: 0x6c3dc820, + 0x37b48: 0x6c3dca20, 0x37b49: 0x6c3dcc20, 0x37b4a: 0x6c3dce20, 0x37b4b: 0x6c3dd020, + 0x37b4c: 0x6c5c7a20, 0x37b4d: 0x6c5c7c20, 0x37b4e: 0x6c5c7e20, 0x37b4f: 0x6c5c8020, + 0x37b50: 0x6c5c8220, 0x37b51: 0x6c5c8420, 0x37b52: 0x6c5c8620, 0x37b53: 0x6c5c8820, + 0x37b54: 0x6c5c8a20, 0x37b55: 0x6c5c8c20, 0x37b56: 0x6c5c8e20, 0x37b57: 0x6c5c9020, + 0x37b58: 0x6c5c9220, 0x37b59: 0x6c804620, 0x37b5a: 0x6c804820, 0x37b5b: 0x6c804a20, + 0x37b5c: 0x6c804c20, 0x37b5d: 0x6c804e20, 0x37b5e: 0x6c805020, 0x37b5f: 0x6c805220, + 0x37b60: 0x6c805420, 0x37b61: 0x6c805620, 0x37b62: 0x6c805820, 0x37b63: 0x6c805a20, + 0x37b64: 0x6c805c20, 0x37b65: 0x6c805e20, 0x37b66: 0x6c806020, 0x37b67: 0x6c806220, + 0x37b68: 0x6c806420, 0x37b69: 0x6c806620, 0x37b6a: 0x6c806820, 0x37b6b: 0x6c806a20, + 0x37b6c: 0x6c806c20, 0x37b6d: 0x6c806e20, 0x37b6e: 0x6c807020, 0x37b6f: 0x6c807220, + 0x37b70: 0x6c807420, 0x37b71: 0x6c807620, 0x37b72: 0x6c807820, 0x37b73: 0x6c807a20, + 0x37b74: 0x6c807c20, 0x37b75: 0x6c807e20, 0x37b76: 0x6c808020, 0x37b77: 0x6c808220, + 0x37b78: 0x6c808420, 0x37b79: 0x6c808620, 0x37b7a: 0x6c808820, 0x37b7b: 0x6c808a20, + 0x37b7c: 0x6c808c20, 0x37b7d: 0x6c808e20, 0x37b7e: 0x6c809020, 0x37b7f: 0x6c809220, + // Block 0xdee, offset 0x37b80 + 0x37b80: 0x6c809420, 0x37b81: 0x6c809620, 0x37b82: 0x6c809820, 0x37b83: 0x6ca95220, + 0x37b84: 0x6ca95420, 0x37b85: 0x6ca95620, 0x37b86: 0x6ca95820, 0x37b87: 0x6ca95a20, + 0x37b88: 0x6ca95c20, 0x37b89: 0x6ca95e20, 0x37b8a: 0x6ca96020, 0x37b8b: 0x6ca96220, + 0x37b8c: 0x6ca96420, 0x37b8d: 0x6ca96620, 0x37b8e: 0x6ca96820, 0x37b8f: 0x6ca96a20, + 0x37b90: 0x6ca96c20, 0x37b91: 0x6ca96e20, 0x37b92: 0x6ca97020, 0x37b93: 0x6ca97220, + 0x37b94: 0x6ca97420, 0x37b95: 0x6ca97620, 0x37b96: 0x6ca97820, 0x37b97: 0x6ca97a20, + 0x37b98: 0x6ca97c20, 0x37b99: 0x6ca97e20, 0x37b9a: 0x6ca98020, 0x37b9b: 0x6ca98220, + 0x37b9c: 0x6ca98420, 0x37b9d: 0x6ca98620, 0x37b9e: 0x6ca98820, 0x37b9f: 0x6ca98a20, + 0x37ba0: 0x6ca98c20, 0x37ba1: 0x6ca98e20, 0x37ba2: 0x6ca99020, 0x37ba3: 0x6ca99220, + 0x37ba4: 0x6ca99420, 0x37ba5: 0x6ca99620, 0x37ba6: 0x6cd7ae20, 0x37ba7: 0x6cd7b020, + 0x37ba8: 0x6cd7b220, 0x37ba9: 0x6cd7b420, 0x37baa: 0x6cd7b620, 0x37bab: 0x6cd7b820, + 0x37bac: 0x6cd7ba20, 0x37bad: 0x6cd7bc20, 0x37bae: 0x6cd7be20, 0x37baf: 0x6cd7c020, + 0x37bb0: 0x6cd7c220, 0x37bb1: 0x6cd7c420, 0x37bb2: 0x6cd7c620, 0x37bb3: 0x6cd7c820, + 0x37bb4: 0x6cd7ca20, 0x37bb5: 0x6cd7cc20, 0x37bb6: 0x6cd7ce20, 0x37bb7: 0x6cd7d020, + 0x37bb8: 0x6cd7d220, 0x37bb9: 0x6cd7d420, 0x37bba: 0x6cd7d620, 0x37bbb: 0x6cd7d820, + 0x37bbc: 0x6cd7da20, 0x37bbd: 0x6cd7dc20, 0x37bbe: 0x6cd7de20, 0x37bbf: 0x6cd7e020, + // Block 0xdef, offset 0x37bc0 + 0x37bc0: 0x6cd7e220, 0x37bc1: 0x6cd7e420, 0x37bc2: 0x6cd7e620, 0x37bc3: 0x6cd7e820, + 0x37bc4: 0x6cd7ea20, 0x37bc5: 0x6cd7ec20, 0x37bc6: 0x6cd7ee20, 0x37bc7: 0x6cd7f020, + 0x37bc8: 0x6cd7f220, 0x37bc9: 0x6cd7f420, 0x37bca: 0x6cd7f620, 0x37bcb: 0x6cd7f820, + 0x37bcc: 0x6cd7fa20, 0x37bcd: 0x6cd7fc20, 0x37bce: 0x6cd7fe20, 0x37bcf: 0x6cd80020, + 0x37bd0: 0x6cd80220, 0x37bd1: 0x6cd80420, 0x37bd2: 0x6d065a20, 0x37bd3: 0x6d065c20, + 0x37bd4: 0x6d065e20, 0x37bd5: 0x6d066020, 0x37bd6: 0x6d066220, 0x37bd7: 0x6d066420, + 0x37bd8: 0x6d066620, 0x37bd9: 0x6d066820, 0x37bda: 0x6d066a20, 0x37bdb: 0x6d066c20, + 0x37bdc: 0x6d066e20, 0x37bdd: 0x6d067020, 0x37bde: 0x6d067220, 0x37bdf: 0x6d067420, + 0x37be0: 0x6d067620, 0x37be1: 0x6d067820, 0x37be2: 0x6d067a20, 0x37be3: 0x6d067c20, + 0x37be4: 0x6d067e20, 0x37be5: 0x6d068020, 0x37be6: 0x6d068220, 0x37be7: 0x6d068420, + 0x37be8: 0x6d068620, 0x37be9: 0x6d068820, 0x37bea: 0x6d068a20, 0x37beb: 0x6d068c20, + 0x37bec: 0x6d068e20, 0x37bed: 0x6d069020, 0x37bee: 0x6d069220, 0x37bef: 0x6d069420, + 0x37bf0: 0x6d069620, 0x37bf1: 0x6d069820, 0x37bf2: 0x6d069a20, 0x37bf3: 0x6d069c20, + 0x37bf4: 0x6d069e20, 0x37bf5: 0x6d06a020, 0x37bf6: 0x6d06a220, 0x37bf7: 0x6d06a420, + 0x37bf8: 0x6d06a620, 0x37bf9: 0x6d06a820, 0x37bfa: 0x6d06aa20, 0x37bfb: 0x6d06ac20, + 0x37bfc: 0x6d06ae20, 0x37bfd: 0x6d06b020, 0x37bfe: 0x6d06b220, 0x37bff: 0x6d06b420, + // Block 0xdf0, offset 0x37c00 + 0x37c00: 0x6d06b620, 0x37c01: 0x6d06b820, 0x37c02: 0x6d06ba20, 0x37c03: 0x6d06bc20, + 0x37c04: 0x6d06be20, 0x37c05: 0x6d06c020, 0x37c06: 0x6d344020, 0x37c07: 0x6d344220, + 0x37c08: 0x6d344420, 0x37c09: 0x6d344620, 0x37c0a: 0x6d344820, 0x37c0b: 0x6d344a20, + 0x37c0c: 0x6d344c20, 0x37c0d: 0x6d344e20, 0x37c0e: 0x6d345020, 0x37c0f: 0x6d345220, + 0x37c10: 0x6d345420, 0x37c11: 0x6d345620, 0x37c12: 0x6d345820, 0x37c13: 0x6d345a20, + 0x37c14: 0x6d345c20, 0x37c15: 0x6d345e20, 0x37c16: 0x6d346020, 0x37c17: 0x6d346220, + 0x37c18: 0x6d346420, 0x37c19: 0x6d346620, 0x37c1a: 0x6d346820, 0x37c1b: 0x6d346a20, + 0x37c1c: 0x6d346c20, 0x37c1d: 0x6d346e20, 0x37c1e: 0x6d347020, 0x37c1f: 0x6d347220, + 0x37c20: 0x6d347420, 0x37c21: 0x6d347620, 0x37c22: 0x6d347820, 0x37c23: 0x6d347a20, + 0x37c24: 0x6d347c20, 0x37c25: 0x6d347e20, 0x37c26: 0x6d348020, 0x37c27: 0x6d348220, + 0x37c28: 0x6d348420, 0x37c29: 0x6d348620, 0x37c2a: 0x6d348820, 0x37c2b: 0x6d348a20, + 0x37c2c: 0x6d348c20, 0x37c2d: 0x6d348e20, 0x37c2e: 0x6d349020, 0x37c2f: 0x6d349220, + 0x37c30: 0x6d349420, 0x37c31: 0x6d349620, 0x37c32: 0x6d349820, 0x37c33: 0x6d349a20, + 0x37c34: 0x6d349c20, 0x37c35: 0x6d349e20, 0x37c36: 0x6d34a020, 0x37c37: 0x6d34a220, + 0x37c38: 0x6d34a420, 0x37c39: 0x6d34a620, 0x37c3a: 0x6d34a820, 0x37c3b: 0x6d34aa20, + 0x37c3c: 0x6d34ac20, 0x37c3d: 0x6d34ae20, 0x37c3e: 0x6d34b020, 0x37c3f: 0x6d34b220, + // Block 0xdf1, offset 0x37c40 + 0x37c40: 0x6d60ee20, 0x37c41: 0x6d60f020, 0x37c42: 0x6d60f220, 0x37c43: 0x6d60f420, + 0x37c44: 0x6d60f620, 0x37c45: 0x6d60f820, 0x37c46: 0x6d60fa20, 0x37c47: 0x6d60fc20, + 0x37c48: 0x6d60fe20, 0x37c49: 0x6d610020, 0x37c4a: 0x6d610220, 0x37c4b: 0x6d610420, + 0x37c4c: 0x6d610620, 0x37c4d: 0x6d610820, 0x37c4e: 0x6d610a20, 0x37c4f: 0x6d610c20, + 0x37c50: 0x6d610e20, 0x37c51: 0x6d611020, 0x37c52: 0x6d611220, 0x37c53: 0x6d611420, + 0x37c54: 0x6d611620, 0x37c55: 0x6d611820, 0x37c56: 0x6d611a20, 0x37c57: 0x6d611c20, + 0x37c58: 0x6d611e20, 0x37c59: 0x6d612020, 0x37c5a: 0x6d612220, 0x37c5b: 0x6d612420, + 0x37c5c: 0x6d612620, 0x37c5d: 0x6d612820, 0x37c5e: 0x6d612a20, 0x37c5f: 0x6d612c20, + 0x37c60: 0x6d612e20, 0x37c61: 0x6d613020, 0x37c62: 0x6d613220, 0x37c63: 0x6d613420, + 0x37c64: 0x6d613620, 0x37c65: 0x6d613820, 0x37c66: 0x6d613a20, 0x37c67: 0x6d8afc20, + 0x37c68: 0x6d613c20, 0x37c69: 0x6d613e20, 0x37c6a: 0x6d614020, 0x37c6b: 0x6d614220, + 0x37c6c: 0x6d614420, 0x37c6d: 0x6d614620, 0x37c6e: 0x6d614820, 0x37c6f: 0x6d614a20, + 0x37c70: 0x6d614c20, 0x37c71: 0x6d614e20, 0x37c72: 0x6d615020, 0x37c73: 0x6d615220, + 0x37c74: 0x6d615420, 0x37c75: 0x6d615620, 0x37c76: 0x6d615820, 0x37c77: 0x6d615a20, + 0x37c78: 0x6d615c20, 0x37c79: 0x6d615e20, 0x37c7a: 0x6d616020, 0x37c7b: 0x6d616220, + 0x37c7c: 0x6d616420, 0x37c7d: 0x6d616620, 0x37c7e: 0x6d616820, 0x37c7f: 0x6d616a20, + // Block 0xdf2, offset 0x37c80 + 0x37c80: 0x6d616c20, 0x37c81: 0x6d616e20, 0x37c82: 0x6d8afe20, 0x37c83: 0x6d8b0020, + 0x37c84: 0x6d8b0220, 0x37c85: 0x6d8b0420, 0x37c86: 0x6d8b0620, 0x37c87: 0x6d8b0820, + 0x37c88: 0x6d8b0a20, 0x37c89: 0x6d8b0c20, 0x37c8a: 0x6d8b0e20, 0x37c8b: 0x6d8b1020, + 0x37c8c: 0x6d8b1220, 0x37c8d: 0x6d8b1420, 0x37c8e: 0x6d8b1620, 0x37c8f: 0x6d8b1820, + 0x37c90: 0x6d8b1a20, 0x37c91: 0x6d8b1c20, 0x37c92: 0x6d8b1e20, 0x37c93: 0x6d8b2020, + 0x37c94: 0x6d8b2220, 0x37c95: 0x6d8b2420, 0x37c96: 0x6d8b2620, 0x37c97: 0x6d8b2820, + 0x37c98: 0x6d8b2a20, 0x37c99: 0x6d8b2c20, 0x37c9a: 0x6d8b2e20, 0x37c9b: 0x6d8b3020, + 0x37c9c: 0x6d8b3220, 0x37c9d: 0x6d8b3420, 0x37c9e: 0x6d8b3620, 0x37c9f: 0x6d8b3820, + 0x37ca0: 0x6d8b3a20, 0x37ca1: 0x6d8b3c20, 0x37ca2: 0x6d8b3e20, 0x37ca3: 0x6d8b4020, + 0x37ca4: 0x6d8b4220, 0x37ca5: 0x6d8b4420, 0x37ca6: 0x6d8b4620, 0x37ca7: 0x6d8b4820, + 0x37ca8: 0x6d8b4a20, 0x37ca9: 0x6d8b4c20, 0x37caa: 0x6d8b4e20, 0x37cab: 0x6d8b5020, + 0x37cac: 0x6d8b5220, 0x37cad: 0x6d8b5420, 0x37cae: 0x6d8b5620, 0x37caf: 0x6d8b5820, + 0x37cb0: 0x6d8b5a20, 0x37cb1: 0x6d8b5c20, 0x37cb2: 0x6d8b5e20, 0x37cb3: 0x6d8b6020, + 0x37cb4: 0x6d8b6220, 0x37cb5: 0x6d8b6420, 0x37cb6: 0x6d8b6620, 0x37cb7: 0x6d8b6820, + 0x37cb8: 0x6d8b6a20, 0x37cb9: 0x6d8b6c20, 0x37cba: 0x6d8b6e20, 0x37cbb: 0x6d8b7020, + 0x37cbc: 0x6d8b7220, 0x37cbd: 0x6d8b7420, 0x37cbe: 0x6d8b7620, 0x37cbf: 0x6d8b7820, + // Block 0xdf3, offset 0x37cc0 + 0x37cc0: 0x6d8b7a20, 0x37cc1: 0x6d8b7c20, 0x37cc2: 0x6daf7a20, 0x37cc3: 0x6d8b7e20, + 0x37cc4: 0x6d8b8020, 0x37cc5: 0x6d8b8220, 0x37cc6: 0x6d8b8420, 0x37cc7: 0x6d8b8620, + 0x37cc8: 0x6d8b8820, 0x37cc9: 0x6daf7c20, 0x37cca: 0x6daf7e20, 0x37ccb: 0x6daf8020, + 0x37ccc: 0x6daf8220, 0x37ccd: 0x6daf8420, 0x37cce: 0x6daf8620, 0x37ccf: 0x6daf8820, + 0x37cd0: 0x6daf8a20, 0x37cd1: 0x6daf8c20, 0x37cd2: 0x6daf8e20, 0x37cd3: 0x6daf9020, + 0x37cd4: 0x6daf9220, 0x37cd5: 0x6daf9420, 0x37cd6: 0x6daf9620, 0x37cd7: 0x6daf9820, + 0x37cd8: 0x6daf9a20, 0x37cd9: 0x6daf9c20, 0x37cda: 0x6daf9e20, 0x37cdb: 0x6dafa020, + 0x37cdc: 0x6dafa220, 0x37cdd: 0x6dafa420, 0x37cde: 0x6dafa620, 0x37cdf: 0x6dafa820, + 0x37ce0: 0x6dafaa20, 0x37ce1: 0x6dafac20, 0x37ce2: 0x6dafae20, 0x37ce3: 0x6dafb020, + 0x37ce4: 0x6dafb220, 0x37ce5: 0x6dafb420, 0x37ce6: 0x6dafb620, 0x37ce7: 0x6dafb820, + 0x37ce8: 0x6dafba20, 0x37ce9: 0x6dafbc20, 0x37cea: 0x6dafbe20, 0x37ceb: 0x6dafc020, + 0x37cec: 0x6dafc220, 0x37ced: 0x6dafc420, 0x37cee: 0x6dafc620, 0x37cef: 0x6dafc820, + 0x37cf0: 0x6dafca20, 0x37cf1: 0x6dafcc20, 0x37cf2: 0x6dafce20, 0x37cf3: 0x6dafd020, + 0x37cf4: 0x6dafd220, 0x37cf5: 0x6dafd420, 0x37cf6: 0x6dafd620, 0x37cf7: 0x6dafd820, + 0x37cf8: 0x6dafda20, 0x37cf9: 0x6dafdc20, 0x37cfa: 0x6dafde20, 0x37cfb: 0x6dafe020, + 0x37cfc: 0x6dcf0020, 0x37cfd: 0x6dcf0220, 0x37cfe: 0x6dcf0420, 0x37cff: 0x6dcf0620, + // Block 0xdf4, offset 0x37d00 + 0x37d00: 0x6dcf0820, 0x37d01: 0x6dcf0a20, 0x37d02: 0x6dcf0c20, 0x37d03: 0x6dcf0e20, + 0x37d04: 0x6dcf1020, 0x37d05: 0x6dcf1220, 0x37d06: 0x6dcf1420, 0x37d07: 0x6dcf1620, + 0x37d08: 0x6dcf1820, 0x37d09: 0x6dcf1a20, 0x37d0a: 0x6dcf1c20, 0x37d0b: 0x6dcf1e20, + 0x37d0c: 0x6dcf2020, 0x37d0d: 0x6dcf2220, 0x37d0e: 0x6dcf2420, 0x37d0f: 0x6dcf2620, + 0x37d10: 0x6dcf2820, 0x37d11: 0x6dcf2a20, 0x37d12: 0x6dcf2c20, 0x37d13: 0x6dcf2e20, + 0x37d14: 0x6dcf3020, 0x37d15: 0x6dcf3220, 0x37d16: 0x6dcf3420, 0x37d17: 0x6dcf3620, + 0x37d18: 0x6dcf3820, 0x37d19: 0x6dcf3a20, 0x37d1a: 0x6dcf3c20, 0x37d1b: 0x6dcf3e20, + 0x37d1c: 0x6dcf4020, 0x37d1d: 0x6dcf4220, 0x37d1e: 0x6dcf4420, 0x37d1f: 0x6dcf4620, + 0x37d20: 0x6dcf4820, 0x37d21: 0x6dcf4a20, 0x37d22: 0x6dcf4c20, 0x37d23: 0x6dcf4e20, + 0x37d24: 0x6dcf5020, 0x37d25: 0x6dcf5220, 0x37d26: 0x6dcf5420, 0x37d27: 0x6dcf5620, + 0x37d28: 0x6dcf5820, 0x37d29: 0x6dcf5a20, 0x37d2a: 0x6dcf5c20, 0x37d2b: 0x6dcf5e20, + 0x37d2c: 0x6dcf6020, 0x37d2d: 0x6dcf6220, 0x37d2e: 0x6dcf6420, 0x37d2f: 0x6dcf6620, + 0x37d30: 0x6dcf6820, 0x37d31: 0x6dcf6a20, 0x37d32: 0x6dcf6c20, 0x37d33: 0x6dcf6e20, + 0x37d34: 0x6dcf7020, 0x37d35: 0x6de94220, 0x37d36: 0x6de94420, 0x37d37: 0x6de94620, + 0x37d38: 0x6de94820, 0x37d39: 0x6de94a20, 0x37d3a: 0x6de94c20, 0x37d3b: 0x6de94e20, + 0x37d3c: 0x6de95020, 0x37d3d: 0x6de95220, 0x37d3e: 0x6de95420, 0x37d3f: 0x6de95620, + // Block 0xdf5, offset 0x37d40 + 0x37d40: 0x6de95820, 0x37d41: 0x6de95a20, 0x37d42: 0x6de95c20, 0x37d43: 0x6de95e20, + 0x37d44: 0x6de96020, 0x37d45: 0x6de96220, 0x37d46: 0x6de96420, 0x37d47: 0x6de96620, + 0x37d48: 0x6de96820, 0x37d49: 0x6de96a20, 0x37d4a: 0x6de96c20, 0x37d4b: 0x6de96e20, + 0x37d4c: 0x6de97020, 0x37d4d: 0x6de97220, 0x37d4e: 0x6de97420, 0x37d4f: 0x6de97620, + 0x37d50: 0x6de97820, 0x37d51: 0x6de97a20, 0x37d52: 0x6de97c20, 0x37d53: 0x6de97e20, + 0x37d54: 0x6de98020, 0x37d55: 0x6de98220, 0x37d56: 0x6de98420, 0x37d57: 0x6de98620, + 0x37d58: 0x6de98820, 0x37d59: 0x6de98a20, 0x37d5a: 0x6de98c20, 0x37d5b: 0x6de98e20, + 0x37d5c: 0x6dff5420, 0x37d5d: 0x6dff5620, 0x37d5e: 0x6dff5820, 0x37d5f: 0x6dff5a20, + 0x37d60: 0x6dff5c20, 0x37d61: 0x6dff5e20, 0x37d62: 0x6dff6020, 0x37d63: 0x6dff6220, + 0x37d64: 0x6e11c420, 0x37d65: 0x6de99020, 0x37d66: 0x6dff6420, 0x37d67: 0x6dff6620, + 0x37d68: 0x6e11c620, 0x37d69: 0x6dff6820, 0x37d6a: 0x6dff6a20, 0x37d6b: 0x6e11c820, + 0x37d6c: 0x6dff6c20, 0x37d6d: 0x6dff6e20, 0x37d6e: 0x6dff7020, 0x37d6f: 0x6dff7220, + 0x37d70: 0x6dff7420, 0x37d71: 0x6dff7620, 0x37d72: 0x6dff7820, 0x37d73: 0x6dff7a20, + 0x37d74: 0x6dff7c20, 0x37d75: 0x6dff7e20, 0x37d76: 0x6dff8020, 0x37d77: 0x6dff8220, + 0x37d78: 0x6dff8420, 0x37d79: 0x6dff8620, 0x37d7a: 0x6dff8820, 0x37d7b: 0x6e11ca20, + 0x37d7c: 0x6e11cc20, 0x37d7d: 0x6e11ce20, 0x37d7e: 0x6e11d020, 0x37d7f: 0x6e11d220, + // Block 0xdf6, offset 0x37d80 + 0x37d80: 0x6e11d420, 0x37d81: 0x6e11d620, 0x37d82: 0x6e200c20, 0x37d83: 0x6e11d820, + 0x37d84: 0x6e11da20, 0x37d85: 0x6e11dc20, 0x37d86: 0x6e11de20, 0x37d87: 0x6e11e020, + 0x37d88: 0x6e11e220, 0x37d89: 0x6e11e420, 0x37d8a: 0x6e11e620, 0x37d8b: 0x6e11e820, + 0x37d8c: 0x6e11ea20, 0x37d8d: 0x6e11ec20, 0x37d8e: 0x6e11ee20, 0x37d8f: 0x6e11f020, + 0x37d90: 0x6e11f220, 0x37d91: 0x6e11f420, 0x37d92: 0x6e11f620, 0x37d93: 0x6e11f820, + 0x37d94: 0x6e200e20, 0x37d95: 0x6e201020, 0x37d96: 0x6e201220, 0x37d97: 0x6e201420, + 0x37d98: 0x6e201620, 0x37d99: 0x6e201820, 0x37d9a: 0x6e201a20, 0x37d9b: 0x6e201c20, + 0x37d9c: 0x6e201e20, 0x37d9d: 0x6e202020, 0x37d9e: 0x6e202220, 0x37d9f: 0x6e202420, + 0x37da0: 0x6e202620, 0x37da1: 0x6e202820, 0x37da2: 0x6e202a20, 0x37da3: 0x6e202c20, + 0x37da4: 0x6e202e20, 0x37da5: 0x6e203020, 0x37da6: 0x6e203220, 0x37da7: 0x6e2b1e20, + 0x37da8: 0x6e2b2020, 0x37da9: 0x6e2b2220, 0x37daa: 0x6e2b2420, 0x37dab: 0x6e2b2620, + 0x37dac: 0x6e2b2820, 0x37dad: 0x6e2b2a20, 0x37dae: 0x6e2b2c20, 0x37daf: 0x6e2b2e20, + 0x37db0: 0x6e339420, 0x37db1: 0x6e339620, 0x37db2: 0x6e339820, 0x37db3: 0x6e339a20, + 0x37db4: 0x6e339c20, 0x37db5: 0x6e339e20, 0x37db6: 0x6e33a020, 0x37db7: 0x6e33a220, + 0x37db8: 0x6e39a020, 0x37db9: 0x6e33a420, 0x37dba: 0x6e39a220, 0x37dbb: 0x6e39a420, + 0x37dbc: 0x6e3dce20, 0x37dbd: 0x6e3dd020, 0x37dbe: 0x6e40aa20, 0x37dbf: 0x6e40ac20, + // Block 0xdf7, offset 0x37dc0 + 0x37dc0: 0x6e40ae20, 0x37dc1: 0x6e40b020, 0x37dc2: 0x6e40b220, 0x37dc3: 0x6e42e020, + 0x37dc4: 0x6e42e220, 0x37dc5: 0x6e445c20, 0x37dc6: 0x6e453c20, 0x37dc7: 0x6e45ca20, + 0x37dc8: 0x6c3dfa20, 0x37dc9: 0x6c5cb820, 0x37dca: 0x6c80b020, 0x37dcb: 0x6c80b220, + 0x37dcc: 0x6c80b420, 0x37dcd: 0x6ca9d420, 0x37dce: 0x6ca9d620, 0x37dcf: 0x6ca9d820, + 0x37dd0: 0x6ca9da20, 0x37dd1: 0x6cd84020, 0x37dd2: 0x6cd84220, 0x37dd3: 0x6cd84420, + 0x37dd4: 0x6cd84620, 0x37dd5: 0x6cd84820, 0x37dd6: 0x6d06e620, 0x37dd7: 0x6d06e820, + 0x37dd8: 0x6d06ea20, 0x37dd9: 0x6d06ec20, 0x37dda: 0x6d34d620, 0x37ddb: 0x6d618820, + 0x37ddc: 0x6d618a20, 0x37ddd: 0x6d618c20, 0x37dde: 0x6d8ba020, 0x37ddf: 0x6d8ba220, + 0x37de0: 0x6dafec20, 0x37de1: 0x6dafee20, 0x37de2: 0x6c143220, 0x37de3: 0x6c5cc820, + 0x37de4: 0x6c5cca20, 0x37de5: 0x6c5ccc20, 0x37de6: 0x6c80cc20, 0x37de7: 0x6c80ce20, + 0x37de8: 0x6c80d020, 0x37de9: 0x6ca9f220, 0x37dea: 0x6ca9f420, 0x37deb: 0x6ca9f620, + 0x37dec: 0x6ca9f820, 0x37ded: 0x6ca9fa20, 0x37dee: 0x6ca9fc20, 0x37def: 0x6cd85a20, + 0x37df0: 0x6cd85c20, 0x37df1: 0x6cd85e20, 0x37df2: 0x6cd86020, 0x37df3: 0x6cd86220, + 0x37df4: 0x6d06f220, 0x37df5: 0x6d06f420, 0x37df6: 0x6d06f620, 0x37df7: 0x6d06f820, + 0x37df8: 0x6d34e820, 0x37df9: 0x6d34ea20, 0x37dfa: 0x6d34ec20, 0x37dfb: 0x6d34ee20, + 0x37dfc: 0x6d34f020, 0x37dfd: 0x6d34f220, 0x37dfe: 0x6d34f420, 0x37dff: 0x6d34f620, + // Block 0xdf8, offset 0x37e00 + 0x37e00: 0x6d34f820, 0x37e01: 0x6d619220, 0x37e02: 0x6d619420, 0x37e03: 0x6d619620, + 0x37e04: 0x6d619820, 0x37e05: 0x6d619a20, 0x37e06: 0x6d619c20, 0x37e07: 0x6d619e20, + 0x37e08: 0x6d8baa20, 0x37e09: 0x6d8bac20, 0x37e0a: 0x6d8bae20, 0x37e0b: 0x6d8bb020, + 0x37e0c: 0x6d8bb220, 0x37e0d: 0x6d8bb420, 0x37e0e: 0x6d8bb620, 0x37e0f: 0x6daffa20, + 0x37e10: 0x6daffc20, 0x37e11: 0x6daffe20, 0x37e12: 0x6db00020, 0x37e13: 0x6db00220, + 0x37e14: 0x6db00420, 0x37e15: 0x6dcf8220, 0x37e16: 0x6dcf8420, 0x37e17: 0x6dcf8620, + 0x37e18: 0x6dcf8820, 0x37e19: 0x6de9aa20, 0x37e1a: 0x6de9ac20, 0x37e1b: 0x6de9ae20, + 0x37e1c: 0x6de9b020, 0x37e1d: 0x6dff9220, 0x37e1e: 0x6dff9420, 0x37e1f: 0x6e120420, + 0x37e20: 0x6e120620, 0x37e21: 0x6e203e20, 0x37e22: 0x6e2b3420, 0x37e23: 0x6e2b3620, + 0x37e24: 0x6e2b3820, 0x37e25: 0x6e33aa20, 0x37e26: 0x6e33ac20, 0x37e27: 0x6e3dd420, + 0x37e28: 0x6e40b620, 0x37e29: 0x6e45cc20, 0x37e2a: 0x6c0a4c20, 0x37e2b: 0x6c0a4e20, + 0x37e2c: 0x6c25cc20, 0x37e2d: 0x6c0a5020, 0x37e2e: 0x6c25ce20, 0x37e2f: 0x6c143620, + 0x37e30: 0x6c0a5220, 0x37e31: 0x6c25d020, 0x37e32: 0x6c25d220, 0x37e33: 0x6c25d420, + 0x37e34: 0x6c25d620, 0x37e35: 0x6c25d820, 0x37e36: 0x6c25da20, 0x37e37: 0x6c3e0a20, + 0x37e38: 0x6c3e0c20, 0x37e39: 0x6c3e0e20, 0x37e3a: 0x6c3e1020, 0x37e3b: 0x6c3e1220, + 0x37e3c: 0x6c3e1420, 0x37e3d: 0x6c3e1620, 0x37e3e: 0x6c3e1820, 0x37e3f: 0x6c3e1a20, + // Block 0xdf9, offset 0x37e40 + 0x37e40: 0x6c3e1c20, 0x37e41: 0x6c5cda20, 0x37e42: 0x6c5cdc20, 0x37e43: 0x6c5cde20, + 0x37e44: 0x6c5ce020, 0x37e45: 0x6c5ce220, 0x37e46: 0x6c5ce420, 0x37e47: 0x6c5ce620, + 0x37e48: 0x6c5ce820, 0x37e49: 0x6c5cea20, 0x37e4a: 0x6c5cec20, 0x37e4b: 0x6c5cee20, + 0x37e4c: 0x6c5cf020, 0x37e4d: 0x6c5cf220, 0x37e4e: 0x6c80e820, 0x37e4f: 0x6c80ea20, + 0x37e50: 0x6c80ec20, 0x37e51: 0x6c80ee20, 0x37e52: 0x6c80f020, 0x37e53: 0x6c80f220, + 0x37e54: 0x6c80f420, 0x37e55: 0x6c80f620, 0x37e56: 0x6c80f820, 0x37e57: 0x6c80fa20, + 0x37e58: 0x6c80fc20, 0x37e59: 0x6c80fe20, 0x37e5a: 0x6c810020, 0x37e5b: 0x6c810220, + 0x37e5c: 0x6c810420, 0x37e5d: 0x6c810620, 0x37e5e: 0x6c810820, 0x37e5f: 0x6c810a20, + 0x37e60: 0x6c810c20, 0x37e61: 0x6c810e20, 0x37e62: 0x6c811020, 0x37e63: 0x6c811220, + 0x37e64: 0x6c6dd220, 0x37e65: 0x6c811420, 0x37e66: 0x6c811620, 0x37e67: 0x6c811820, + 0x37e68: 0x6c811a20, 0x37e69: 0x6c811c20, 0x37e6a: 0x6caa0220, 0x37e6b: 0x6caa0420, + 0x37e6c: 0x6caa0620, 0x37e6d: 0x6caa0820, 0x37e6e: 0x6caa0a20, 0x37e6f: 0x6caa0c20, + 0x37e70: 0x6caa0e20, 0x37e71: 0x6caa1020, 0x37e72: 0x6caa1220, 0x37e73: 0x6c811e20, + 0x37e74: 0x6caa1420, 0x37e75: 0x6caa1620, 0x37e76: 0x6caa1820, 0x37e77: 0x6caa1a20, + 0x37e78: 0x6caa1c20, 0x37e79: 0x6caa1e20, 0x37e7a: 0x6caa2020, 0x37e7b: 0x6caa2220, + 0x37e7c: 0x6cd86e20, 0x37e7d: 0x6cd87020, 0x37e7e: 0x6cd87220, 0x37e7f: 0x6cd87420, + // Block 0xdfa, offset 0x37e80 + 0x37e80: 0x6cd87620, 0x37e81: 0x6cd87820, 0x37e82: 0x6cd87a20, 0x37e83: 0x6cd87c20, + 0x37e84: 0x6cd87e20, 0x37e85: 0x6d071420, 0x37e86: 0x6d071620, 0x37e87: 0x6d071820, + 0x37e88: 0x6d071a20, 0x37e89: 0x6d071c20, 0x37e8a: 0x6d071e20, 0x37e8b: 0x6d072020, + 0x37e8c: 0x6d072220, 0x37e8d: 0x6d072420, 0x37e8e: 0x6d072620, 0x37e8f: 0x6d072820, + 0x37e90: 0x6d072a20, 0x37e91: 0x6cd88020, 0x37e92: 0x6d072c20, 0x37e93: 0x6d072e20, + 0x37e94: 0x6d073020, 0x37e95: 0x6d073220, 0x37e96: 0x6d073420, 0x37e97: 0x6d073620, + 0x37e98: 0x6d073820, 0x37e99: 0x6d073a20, 0x37e9a: 0x6d073c20, 0x37e9b: 0x6d073e20, + 0x37e9c: 0x6d074020, 0x37e9d: 0x6d350a20, 0x37e9e: 0x6d350c20, 0x37e9f: 0x6d350e20, + 0x37ea0: 0x6d351020, 0x37ea1: 0x6d351220, 0x37ea2: 0x6d351420, 0x37ea3: 0x6d351620, + 0x37ea4: 0x6d351820, 0x37ea5: 0x6d351a20, 0x37ea6: 0x6d351c20, 0x37ea7: 0x6d351e20, + 0x37ea8: 0x6d352020, 0x37ea9: 0x6d352220, 0x37eaa: 0x6d217020, 0x37eab: 0x6d352420, + 0x37eac: 0x6d352620, 0x37ead: 0x6d352820, 0x37eae: 0x6d352a20, 0x37eaf: 0x6d61ac20, + 0x37eb0: 0x6d61ae20, 0x37eb1: 0x6d61b020, 0x37eb2: 0x6d61b220, 0x37eb3: 0x6d61b420, + 0x37eb4: 0x6d61b620, 0x37eb5: 0x6d61b820, 0x37eb6: 0x6d61ba20, 0x37eb7: 0x6d61bc20, + 0x37eb8: 0x6d61be20, 0x37eb9: 0x6d61c020, 0x37eba: 0x6d61c220, 0x37ebb: 0x6d61c420, + 0x37ebc: 0x6d61c620, 0x37ebd: 0x6d8bc620, 0x37ebe: 0x6d8bc820, 0x37ebf: 0x6d8bca20, + // Block 0xdfb, offset 0x37ec0 + 0x37ec0: 0x6d8bcc20, 0x37ec1: 0x6d8bce20, 0x37ec2: 0x6d8bd020, 0x37ec3: 0x6d8bd220, + 0x37ec4: 0x6d8bd420, 0x37ec5: 0x6d8bd620, 0x37ec6: 0x6d8bd820, 0x37ec7: 0x6d8bda20, + 0x37ec8: 0x6d8bdc20, 0x37ec9: 0x6d8bde20, 0x37eca: 0x6d8be020, 0x37ecb: 0x6d8be220, + 0x37ecc: 0x6d8be420, 0x37ecd: 0x6d8be620, 0x37ece: 0x6d8be820, 0x37ecf: 0x6d8bea20, + 0x37ed0: 0x6d8bec20, 0x37ed1: 0x6d8bee20, 0x37ed2: 0x6db01020, 0x37ed3: 0x6db01220, + 0x37ed4: 0x6db01420, 0x37ed5: 0x6db01620, 0x37ed6: 0x6db01820, 0x37ed7: 0x6db01a20, + 0x37ed8: 0x6db01c20, 0x37ed9: 0x6db01e20, 0x37eda: 0x6db02020, 0x37edb: 0x6db02220, + 0x37edc: 0x6db02420, 0x37edd: 0x6db02620, 0x37ede: 0x6db02820, 0x37edf: 0x6dcf9020, + 0x37ee0: 0x6dcf9220, 0x37ee1: 0x6dcf9420, 0x37ee2: 0x6dcf9620, 0x37ee3: 0x6dcf9820, + 0x37ee4: 0x6dcf9a20, 0x37ee5: 0x6dcf9c20, 0x37ee6: 0x6dcf9e20, 0x37ee7: 0x6dcfa020, + 0x37ee8: 0x6dcfa220, 0x37ee9: 0x6dcfb220, 0x37eea: 0x6de9be20, 0x37eeb: 0x6de9c020, + 0x37eec: 0x6de9c220, 0x37eed: 0x6de9c420, 0x37eee: 0x6de9c620, 0x37eef: 0x6de9c820, + 0x37ef0: 0x6de9ca20, 0x37ef1: 0x6de9cc20, 0x37ef2: 0x6de9ce20, 0x37ef3: 0x6de9d020, + 0x37ef4: 0x6de9d220, 0x37ef5: 0x6dff9620, 0x37ef6: 0x6dff9820, 0x37ef7: 0x6dff9a20, + 0x37ef8: 0x6dff9c20, 0x37ef9: 0x6dff9e20, 0x37efa: 0x6dffa020, 0x37efb: 0x6e120a20, + 0x37efc: 0x6e120c20, 0x37efd: 0x6e2b3a20, 0x37efe: 0x6e33b420, 0x37eff: 0x6e33b620, + // Block 0xdfc, offset 0x37f00 + 0x37f00: 0x6e33b820, 0x37f01: 0x6e33ba20, 0x37f02: 0x6e33bc20, 0x37f03: 0x6e33be20, + 0x37f04: 0x6e33c020, 0x37f05: 0x6e33c220, 0x37f06: 0x6e3dd620, 0x37f07: 0x6e40b820, + 0x37f08: 0x6e42e420, 0x37f09: 0x6e42e620, 0x37f0a: 0x6e42e820, 0x37f0b: 0x6c143c20, + 0x37f0c: 0x6c143e20, 0x37f0d: 0x6c144020, 0x37f0e: 0x6c3e2620, 0x37f0f: 0x6c3e2820, + 0x37f10: 0x6c3e2a20, 0x37f11: 0x6c5cfe20, 0x37f12: 0x6c5d0020, 0x37f13: 0x6c5d0220, + 0x37f14: 0x6c5d0420, 0x37f15: 0x6c5d0620, 0x37f16: 0x6c5d0820, 0x37f17: 0x6c813820, + 0x37f18: 0x6c813a20, 0x37f19: 0x6c813c20, 0x37f1a: 0x6c813e20, 0x37f1b: 0x6c814020, + 0x37f1c: 0x6c814220, 0x37f1d: 0x6c814420, 0x37f1e: 0x6c814620, 0x37f1f: 0x6c814820, + 0x37f20: 0x6c814a20, 0x37f21: 0x6c814c20, 0x37f22: 0x6c814e20, 0x37f23: 0x6c815020, + 0x37f24: 0x6c815220, 0x37f25: 0x6caa4020, 0x37f26: 0x6caa4220, 0x37f27: 0x6caa4420, + 0x37f28: 0x6caa4620, 0x37f29: 0x6caa4820, 0x37f2a: 0x6caa4a20, 0x37f2b: 0x6caa4c20, + 0x37f2c: 0x6caa4e20, 0x37f2d: 0x6caa5020, 0x37f2e: 0x6c815420, 0x37f2f: 0x6caa5220, + 0x37f30: 0x6caa5420, 0x37f31: 0x6caa5620, 0x37f32: 0x6caa5820, 0x37f33: 0x6caa5a20, + 0x37f34: 0x6caa5c20, 0x37f35: 0x6caa5e20, 0x37f36: 0x6caa6020, 0x37f37: 0x6caa6220, + 0x37f38: 0x6caa6420, 0x37f39: 0x6cd88e20, 0x37f3a: 0x6cd89020, 0x37f3b: 0x6cd89220, + 0x37f3c: 0x6cd89420, 0x37f3d: 0x6cd89620, 0x37f3e: 0x6cd89820, 0x37f3f: 0x6cd89a20, + // Block 0xdfd, offset 0x37f40 + 0x37f40: 0x6cd89c20, 0x37f41: 0x6cd89e20, 0x37f42: 0x6cd8a020, 0x37f43: 0x6cd8a220, + 0x37f44: 0x6cd8a420, 0x37f45: 0x6cba3e20, 0x37f46: 0x6d075820, 0x37f47: 0x6d075a20, + 0x37f48: 0x6d075c20, 0x37f49: 0x6d075e20, 0x37f4a: 0x6d076020, 0x37f4b: 0x6d076220, + 0x37f4c: 0x6d076420, 0x37f4d: 0x6d076620, 0x37f4e: 0x6d076820, 0x37f4f: 0x6d076a20, + 0x37f50: 0x6d076c20, 0x37f51: 0x6d076e20, 0x37f52: 0x6d077020, 0x37f53: 0x6d077220, + 0x37f54: 0x6d077420, 0x37f55: 0x6d077620, 0x37f56: 0x6d077820, 0x37f57: 0x6d353a20, + 0x37f58: 0x6d353c20, 0x37f59: 0x6d353e20, 0x37f5a: 0x6d354020, 0x37f5b: 0x6d354220, + 0x37f5c: 0x6d354420, 0x37f5d: 0x6d354620, 0x37f5e: 0x6d354820, 0x37f5f: 0x6d354a20, + 0x37f60: 0x6d354c20, 0x37f61: 0x6d354e20, 0x37f62: 0x6d61d620, 0x37f63: 0x6d61d820, + 0x37f64: 0x6d61da20, 0x37f65: 0x6d61dc20, 0x37f66: 0x6d61de20, 0x37f67: 0x6d61e020, + 0x37f68: 0x6d61e220, 0x37f69: 0x6d61e420, 0x37f6a: 0x6d61e620, 0x37f6b: 0x6d61e820, + 0x37f6c: 0x6d61ea20, 0x37f6d: 0x6d61ec20, 0x37f6e: 0x6d61ee20, 0x37f6f: 0x6d8bfa20, + 0x37f70: 0x6d8bfc20, 0x37f71: 0x6d8bfe20, 0x37f72: 0x6d8c0020, 0x37f73: 0x6d8c0220, + 0x37f74: 0x6d8c0420, 0x37f75: 0x6d8c0620, 0x37f76: 0x6d8c0820, 0x37f77: 0x6db02e20, + 0x37f78: 0x6db03020, 0x37f79: 0x6db03220, 0x37f7a: 0x6db03420, 0x37f7b: 0x6db03620, + 0x37f7c: 0x6db03820, 0x37f7d: 0x6db03a20, 0x37f7e: 0x6db03c20, 0x37f7f: 0x6db03e20, + // Block 0xdfe, offset 0x37f80 + 0x37f80: 0x6db04020, 0x37f81: 0x6db04220, 0x37f82: 0x6db04420, 0x37f83: 0x6db04620, + 0x37f84: 0x6db04820, 0x37f85: 0x6dcfb420, 0x37f86: 0x6dcfb620, 0x37f87: 0x6dcfb820, + 0x37f88: 0x6dcfba20, 0x37f89: 0x6dcfbc20, 0x37f8a: 0x6dcfbe20, 0x37f8b: 0x6dcfc020, + 0x37f8c: 0x6dcfc220, 0x37f8d: 0x6dcfc420, 0x37f8e: 0x6dcfc620, 0x37f8f: 0x6dcfc820, + 0x37f90: 0x6dcfca20, 0x37f91: 0x6dcfcc20, 0x37f92: 0x6dcfce20, 0x37f93: 0x6dcfd020, + 0x37f94: 0x6dcfd220, 0x37f95: 0x6de9de20, 0x37f96: 0x6de9e020, 0x37f97: 0x6de9e220, + 0x37f98: 0x6de9e420, 0x37f99: 0x6de9e620, 0x37f9a: 0x6de9e820, 0x37f9b: 0x6de9ea20, + 0x37f9c: 0x6dffa420, 0x37f9d: 0x6dffa620, 0x37f9e: 0x6dffa820, 0x37f9f: 0x6dffaa20, + 0x37fa0: 0x6dffac20, 0x37fa1: 0x6dffae20, 0x37fa2: 0x6e121620, 0x37fa3: 0x6e121820, + 0x37fa4: 0x6e121a20, 0x37fa5: 0x6e121c20, 0x37fa6: 0x6e121e20, 0x37fa7: 0x6e122020, + 0x37fa8: 0x6e204420, 0x37fa9: 0x6e204620, 0x37faa: 0x6e2b3c20, 0x37fab: 0x6e2b3e20, + 0x37fac: 0x6e33c420, 0x37fad: 0x6e39a820, 0x37fae: 0x6e3dd820, 0x37faf: 0x6e40bc20, + 0x37fb0: 0x6e453e20, 0x37fb1: 0x6e454020, 0x37fb2: 0x6c3e2e20, 0x37fb3: 0x6c25de20, + 0x37fb4: 0x6c5d1020, 0x37fb5: 0x6c5d1220, 0x37fb6: 0x6c5d1420, 0x37fb7: 0x6c5d1620, + 0x37fb8: 0x6c5d1820, 0x37fb9: 0x6c5d1a20, 0x37fba: 0x6c5d1c20, 0x37fbb: 0x6c5d1e20, + 0x37fbc: 0x6c5d2020, 0x37fbd: 0x6c5d2220, 0x37fbe: 0x6c5d2420, 0x37fbf: 0x6c5d2620, + // Block 0xdff, offset 0x37fc0 + 0x37fc0: 0x6c5d2820, 0x37fc1: 0x6c5d2a20, 0x37fc2: 0x6c816820, 0x37fc3: 0x6c816a20, + 0x37fc4: 0x6c816c20, 0x37fc5: 0x6c816e20, 0x37fc6: 0x6c817020, 0x37fc7: 0x6c817220, + 0x37fc8: 0x6c817420, 0x37fc9: 0x6c817620, 0x37fca: 0x6c817820, 0x37fcb: 0x6c817a20, + 0x37fcc: 0x6c817c20, 0x37fcd: 0x6c817e20, 0x37fce: 0x6c818020, 0x37fcf: 0x6c818220, + 0x37fd0: 0x6c818420, 0x37fd1: 0x6c818620, 0x37fd2: 0x6c818820, 0x37fd3: 0x6c818a20, + 0x37fd4: 0x6c818c20, 0x37fd5: 0x6caa9420, 0x37fd6: 0x6caa9620, 0x37fd7: 0x6caa9820, + 0x37fd8: 0x6caa9a20, 0x37fd9: 0x6caa9c20, 0x37fda: 0x6caa9e20, 0x37fdb: 0x6caaa020, + 0x37fdc: 0x6caaa220, 0x37fdd: 0x6caaa420, 0x37fde: 0x6caaa620, 0x37fdf: 0x6caaa820, + 0x37fe0: 0x6caaaa20, 0x37fe1: 0x6caaac20, 0x37fe2: 0x6caaae20, 0x37fe3: 0x6cd8c220, + 0x37fe4: 0x6cd8c420, 0x37fe5: 0x6cd8c620, 0x37fe6: 0x6cd8c820, 0x37fe7: 0x6cd8ca20, + 0x37fe8: 0x6cd8cc20, 0x37fe9: 0x6cd8ce20, 0x37fea: 0x6cd8d020, 0x37feb: 0x6cd8d220, + 0x37fec: 0x6cd8d420, 0x37fed: 0x6cd8d620, 0x37fee: 0x6cd8d820, 0x37fef: 0x6cd8da20, + 0x37ff0: 0x6cd8dc20, 0x37ff1: 0x6cd8de20, 0x37ff2: 0x6cd8e020, 0x37ff3: 0x6cd8e220, + 0x37ff4: 0x6cd8e420, 0x37ff5: 0x6cd8e620, 0x37ff6: 0x6cd8e820, 0x37ff7: 0x6cd8ea20, + 0x37ff8: 0x6d078a20, 0x37ff9: 0x6d078c20, 0x37ffa: 0x6d078e20, 0x37ffb: 0x6d079020, + 0x37ffc: 0x6d079220, 0x37ffd: 0x6d079420, 0x37ffe: 0x6d079620, 0x37fff: 0x6d079820, + // Block 0xe00, offset 0x38000 + 0x38000: 0x6d079a20, 0x38001: 0x6d079c20, 0x38002: 0x6d079e20, 0x38003: 0x6d07a020, + 0x38004: 0x6d07a220, 0x38005: 0x6d356820, 0x38006: 0x6d07a420, 0x38007: 0x6d356a20, + 0x38008: 0x6d356c20, 0x38009: 0x6d356e20, 0x3800a: 0x6d357020, 0x3800b: 0x6d357220, + 0x3800c: 0x6d357420, 0x3800d: 0x6d357620, 0x3800e: 0x6d357820, 0x3800f: 0x6d357a20, + 0x38010: 0x6d357c20, 0x38011: 0x6d231e20, 0x38012: 0x6d357e20, 0x38013: 0x6d358020, + 0x38014: 0x6d358220, 0x38015: 0x6d358420, 0x38016: 0x6d358620, 0x38017: 0x6d358820, + 0x38018: 0x6d620620, 0x38019: 0x6d620820, 0x3801a: 0x6d620a20, 0x3801b: 0x6d620c20, + 0x3801c: 0x6d620e20, 0x3801d: 0x6d621020, 0x3801e: 0x6d621220, 0x3801f: 0x6d621420, + 0x38020: 0x6d621620, 0x38021: 0x6d621820, 0x38022: 0x6d621a20, 0x38023: 0x6d621c20, + 0x38024: 0x6d621e20, 0x38025: 0x6d622020, 0x38026: 0x6d622220, 0x38027: 0x6d622420, + 0x38028: 0x6d622620, 0x38029: 0x6d622820, 0x3802a: 0x6d622a20, 0x3802b: 0x6d622c20, + 0x3802c: 0x6d622e20, 0x3802d: 0x6d623020, 0x3802e: 0x6d623220, 0x3802f: 0x6d623420, + 0x38030: 0x6d8c1820, 0x38031: 0x6d8c1a20, 0x38032: 0x6d8c1c20, 0x38033: 0x6d8c1e20, + 0x38034: 0x6d8c2020, 0x38035: 0x6d8c2220, 0x38036: 0x6d8c2420, 0x38037: 0x6d8c2620, + 0x38038: 0x6d8c2820, 0x38039: 0x6d8c2a20, 0x3803a: 0x6d8c2c20, 0x3803b: 0x6d623620, + 0x3803c: 0x6d8c2e20, 0x3803d: 0x6d8c3020, 0x3803e: 0x6d8c3220, 0x3803f: 0x6d8c3420, + // Block 0xe01, offset 0x38040 + 0x38040: 0x6d8c3620, 0x38041: 0x6d8c3820, 0x38042: 0x6d8c3a20, 0x38043: 0x6db05c20, + 0x38044: 0x6db05e20, 0x38045: 0x6db06020, 0x38046: 0x6db06220, 0x38047: 0x6db06420, + 0x38048: 0x6db06620, 0x38049: 0x6db06820, 0x3804a: 0x6db06a20, 0x3804b: 0x6db06c20, + 0x3804c: 0x6db06e20, 0x3804d: 0x6dcfe820, 0x3804e: 0x6dcfea20, 0x3804f: 0x6dcfec20, + 0x38050: 0x6dcfee20, 0x38051: 0x6dcff020, 0x38052: 0x6dcff220, 0x38053: 0x6dcff420, + 0x38054: 0x6dcff620, 0x38055: 0x6dcff820, 0x38056: 0x6dcffa20, 0x38057: 0x6dcffc20, + 0x38058: 0x6dcffe20, 0x38059: 0x6dd00020, 0x3805a: 0x6dd00220, 0x3805b: 0x6dd00420, + 0x3805c: 0x6de9f020, 0x3805d: 0x6de9f220, 0x3805e: 0x6d8c3c20, 0x3805f: 0x6dd00620, + 0x38060: 0x6de9f420, 0x38061: 0x6de9f620, 0x38062: 0x6dffb820, 0x38063: 0x6dffba20, + 0x38064: 0x6dffbc20, 0x38065: 0x6dffbe20, 0x38066: 0x6e122420, 0x38067: 0x6e204c20, + 0x38068: 0x6e122620, 0x38069: 0x6e122820, 0x3806a: 0x6dffc020, 0x3806b: 0x6dffc220, + 0x3806c: 0x6e122a20, 0x3806d: 0x6e204e20, 0x3806e: 0x6e205020, 0x3806f: 0x6e205220, + 0x38070: 0x6e33c620, 0x38071: 0x6c25e020, 0x38072: 0x6c25e220, 0x38073: 0x6c3e3020, + 0x38074: 0x6c3e3220, 0x38075: 0x6c3e3420, 0x38076: 0x6c5d3020, 0x38077: 0x6c5d3220, + 0x38078: 0x6c5d3420, 0x38079: 0x6c5d3620, 0x3807a: 0x6c819420, 0x3807b: 0x6c819620, + 0x3807c: 0x6c819820, 0x3807d: 0x6c819a20, 0x3807e: 0x6c819c20, 0x3807f: 0x6c819e20, + // Block 0xe02, offset 0x38080 + 0x38080: 0x6caab620, 0x38081: 0x6d07aa20, 0x38082: 0x6d358e20, 0x38083: 0x6db07220, + 0x38084: 0x6d623c20, 0x38085: 0x6d623e20, 0x38086: 0x6d8c4220, 0x38087: 0x6d8c4420, + 0x38088: 0x6db07420, 0x38089: 0x6db07620, 0x3808a: 0x6dd00c20, 0x3808b: 0x6e2b4020, + 0x3808c: 0x6e2b4220, 0x3808d: 0x6e3dda20, 0x3808e: 0x6c3e3820, 0x3808f: 0x6c3e3a20, + 0x38090: 0x6c144a20, 0x38091: 0x6c3e3c20, 0x38092: 0x6c81a820, 0x38093: 0x6caab820, + 0x38094: 0x6cd8fa20, 0x38095: 0x6cd8fc20, 0x38096: 0x6d07ae20, 0x38097: 0x6d359220, + 0x38098: 0x6d624220, 0x38099: 0x6d624420, 0x3809a: 0x6d624620, 0x3809b: 0x6d624820, + 0x3809c: 0x6d624a20, 0x3809d: 0x6d8c4620, 0x3809e: 0x6d8c4820, 0x3809f: 0x6db07820, + 0x380a0: 0x6db07a20, 0x380a1: 0x6db07c20, 0x380a2: 0x6e205620, 0x380a3: 0x6e33c820, + 0x380a4: 0x6c144e20, 0x380a5: 0x6c3e4020, 0x380a6: 0x6c3e4220, 0x380a7: 0x6c3e4420, + 0x380a8: 0x6c5d4c20, 0x380a9: 0x6c5d4e20, 0x380aa: 0x6c5d5020, 0x380ab: 0x6c81b420, + 0x380ac: 0x6caac820, 0x380ad: 0x6caaca20, 0x380ae: 0x6caacc20, 0x380af: 0x6cd90020, + 0x380b0: 0x6cd90220, 0x380b1: 0x6cd90420, 0x380b2: 0x6cd90620, 0x380b3: 0x6cd90820, + 0x380b4: 0x6d07b820, 0x380b5: 0x6d07ba20, 0x380b6: 0x6d07bc20, 0x380b7: 0x6d35a420, + 0x380b8: 0x6d35a620, 0x380b9: 0x6d35a820, 0x380ba: 0x6d35aa20, 0x380bb: 0x6d35ac20, + 0x380bc: 0x6d35ae20, 0x380bd: 0x6d35b020, 0x380be: 0x6d35b220, 0x380bf: 0x6d35b420, + // Block 0xe03, offset 0x380c0 + 0x380c0: 0x6d35b620, 0x380c1: 0x6d35b820, 0x380c2: 0x6d625420, 0x380c3: 0x6d625620, + 0x380c4: 0x6d625820, 0x380c5: 0x6d625a20, 0x380c6: 0x6d625c20, 0x380c7: 0x6d625e20, + 0x380c8: 0x6d626020, 0x380c9: 0x6d626220, 0x380ca: 0x6d626420, 0x380cb: 0x6d8c5020, + 0x380cc: 0x6d8c5220, 0x380cd: 0x6d8c5420, 0x380ce: 0x6d8c5620, 0x380cf: 0x6d8c5820, + 0x380d0: 0x6d8c5a20, 0x380d1: 0x6d8c5c20, 0x380d2: 0x6d8c5e20, 0x380d3: 0x6db08820, + 0x380d4: 0x6db08a20, 0x380d5: 0x6db08c20, 0x380d6: 0x6db08e20, 0x380d7: 0x6db09020, + 0x380d8: 0x6db09220, 0x380d9: 0x6db09420, 0x380da: 0x6db09620, 0x380db: 0x6dd01620, + 0x380dc: 0x6dd01820, 0x380dd: 0x6dd01a20, 0x380de: 0x6dd01c20, 0x380df: 0x6de9f820, + 0x380e0: 0x6dd01e20, 0x380e1: 0x6dd02020, 0x380e2: 0x6dd02220, 0x380e3: 0x6dd02420, + 0x380e4: 0x6dd02620, 0x380e5: 0x6de9fa20, 0x380e6: 0x6de9fc20, 0x380e7: 0x6de9fe20, + 0x380e8: 0x6dea0020, 0x380e9: 0x6e123020, 0x380ea: 0x6e123220, 0x380eb: 0x6e33ca20, + 0x380ec: 0x6e33cc20, 0x380ed: 0x6e39aa20, 0x380ee: 0x6c25e820, 0x380ef: 0x6c3e4820, + 0x380f0: 0x6c3e4a20, 0x380f1: 0x6c3e4c20, 0x380f2: 0x6c3e4e20, 0x380f3: 0x6c3e5020, + 0x380f4: 0x6c3e5220, 0x380f5: 0x6c3e5420, 0x380f6: 0x6c3e5620, 0x380f7: 0x6c5d5620, + 0x380f8: 0x6c5d5820, 0x380f9: 0x6c5d5a20, 0x380fa: 0x6c5d5c20, 0x380fb: 0x6c5d5e20, + 0x380fc: 0x6c81d020, 0x380fd: 0x6c81d220, 0x380fe: 0x6c81d420, 0x380ff: 0x6c81d620, + // Block 0xe04, offset 0x38100 + 0x38100: 0x6c81d820, 0x38101: 0x6c81da20, 0x38102: 0x6c81dc20, 0x38103: 0x6c81de20, + 0x38104: 0x6c81e020, 0x38105: 0x6c81e220, 0x38106: 0x6c81e420, 0x38107: 0x6c81e620, + 0x38108: 0x6c81e820, 0x38109: 0x6c81ea20, 0x3810a: 0x6c81ec20, 0x3810b: 0x6c81ee20, + 0x3810c: 0x6c81f020, 0x3810d: 0x6c81f220, 0x3810e: 0x6c81f420, 0x3810f: 0x6c81f620, + 0x38110: 0x6caaea20, 0x38111: 0x6caaec20, 0x38112: 0x6caaee20, 0x38113: 0x6caaf020, + 0x38114: 0x6caaf220, 0x38115: 0x6caaf420, 0x38116: 0x6caaf620, 0x38117: 0x6caaf820, + 0x38118: 0x6caafa20, 0x38119: 0x6caafc20, 0x3811a: 0x6caafe20, 0x3811b: 0x6cab0020, + 0x3811c: 0x6cab0220, 0x3811d: 0x6cab0420, 0x3811e: 0x6cab0620, 0x3811f: 0x6cab0820, + 0x38120: 0x6cd92020, 0x38121: 0x6cd92220, 0x38122: 0x6cd92420, 0x38123: 0x6d07cc20, + 0x38124: 0x6cd92620, 0x38125: 0x6cd92820, 0x38126: 0x6cd92a20, 0x38127: 0x6cd92c20, + 0x38128: 0x6cd92e20, 0x38129: 0x6cd93020, 0x3812a: 0x6cd93220, 0x3812b: 0x6cd93420, + 0x3812c: 0x6cd93620, 0x3812d: 0x6cd93820, 0x3812e: 0x6cd93a20, 0x3812f: 0x6cd93c20, + 0x38130: 0x6cd93e20, 0x38131: 0x6cd94020, 0x38132: 0x6cd94220, 0x38133: 0x6cd94420, + 0x38134: 0x6cd94620, 0x38135: 0x6d07ce20, 0x38136: 0x6d07d020, 0x38137: 0x6d07d220, + 0x38138: 0x6d07d420, 0x38139: 0x6d07d620, 0x3813a: 0x6d07d820, 0x3813b: 0x6d07da20, + 0x3813c: 0x6d07dc20, 0x3813d: 0x6d07de20, 0x3813e: 0x6d07e020, 0x3813f: 0x6d07e220, + // Block 0xe05, offset 0x38140 + 0x38140: 0x6d07e420, 0x38141: 0x6d07e620, 0x38142: 0x6d07e820, 0x38143: 0x6d07ea20, + 0x38144: 0x6d07ec20, 0x38145: 0x6d07ee20, 0x38146: 0x6d07f020, 0x38147: 0x6d07f220, + 0x38148: 0x6d35d820, 0x38149: 0x6d35da20, 0x3814a: 0x6d35dc20, 0x3814b: 0x6d35de20, + 0x3814c: 0x6d35e020, 0x3814d: 0x6d35e220, 0x3814e: 0x6d35e420, 0x3814f: 0x6d35e620, + 0x38150: 0x6d35e820, 0x38151: 0x6d35ea20, 0x38152: 0x6d35ec20, 0x38153: 0x6d35ee20, + 0x38154: 0x6d35f020, 0x38155: 0x6d35f220, 0x38156: 0x6d35f420, 0x38157: 0x6d07f420, + 0x38158: 0x6d35f620, 0x38159: 0x6d35f820, 0x3815a: 0x6d35fa20, 0x3815b: 0x6d35fc20, + 0x3815c: 0x6d35fe20, 0x3815d: 0x6d360020, 0x3815e: 0x6d360220, 0x3815f: 0x6d360420, + 0x38160: 0x6d360620, 0x38161: 0x6d360820, 0x38162: 0x6d627e20, 0x38163: 0x6d628020, + 0x38164: 0x6d628220, 0x38165: 0x6d628420, 0x38166: 0x6d628620, 0x38167: 0x6d628820, + 0x38168: 0x6d628a20, 0x38169: 0x6d628c20, 0x3816a: 0x6d628e20, 0x3816b: 0x6d629020, + 0x3816c: 0x6d629220, 0x3816d: 0x6d629420, 0x3816e: 0x6d629620, 0x3816f: 0x6d629820, + 0x38170: 0x6d629a20, 0x38171: 0x6d629c20, 0x38172: 0x6d629e20, 0x38173: 0x6d62a020, + 0x38174: 0x6d62a220, 0x38175: 0x6d62a420, 0x38176: 0x6d62a620, 0x38177: 0x6d62a820, + 0x38178: 0x6d62aa20, 0x38179: 0x6d62ac20, 0x3817a: 0x6d62ae20, 0x3817b: 0x6d62b020, + 0x3817c: 0x6d8c6c20, 0x3817d: 0x6d8c6e20, 0x3817e: 0x6d8c7020, 0x3817f: 0x6d8c7220, + // Block 0xe06, offset 0x38180 + 0x38180: 0x6d8c7420, 0x38181: 0x6d8c7620, 0x38182: 0x6d8c7820, 0x38183: 0x6d8c7a20, + 0x38184: 0x6d8c7c20, 0x38185: 0x6d8c7e20, 0x38186: 0x6d8c8020, 0x38187: 0x6d62b220, + 0x38188: 0x6d8c8220, 0x38189: 0x6d8c8420, 0x3818a: 0x6d8c8620, 0x3818b: 0x6d8c8820, + 0x3818c: 0x6d8c8a20, 0x3818d: 0x6d8c8c20, 0x3818e: 0x6d8c8e20, 0x3818f: 0x6d8c9020, + 0x38190: 0x6db0aa20, 0x38191: 0x6db0ac20, 0x38192: 0x6db0ae20, 0x38193: 0x6db0b020, + 0x38194: 0x6db0b220, 0x38195: 0x6db0b420, 0x38196: 0x6db0b620, 0x38197: 0x6db0b820, + 0x38198: 0x6db0ba20, 0x38199: 0x6db0bc20, 0x3819a: 0x6db0be20, 0x3819b: 0x6db0c020, + 0x3819c: 0x6db0c220, 0x3819d: 0x6db0c420, 0x3819e: 0x6db0c620, 0x3819f: 0x6dd03220, + 0x381a0: 0x6dd03420, 0x381a1: 0x6dd03620, 0x381a2: 0x6dd03820, 0x381a3: 0x6dd03a20, + 0x381a4: 0x6dd03c20, 0x381a5: 0x6dd03e20, 0x381a6: 0x6dd04020, 0x381a7: 0x6dd04220, + 0x381a8: 0x6dd04420, 0x381a9: 0x6dd04620, 0x381aa: 0x6dd04820, 0x381ab: 0x6dd04a20, + 0x381ac: 0x6dd04c20, 0x381ad: 0x6dd04e20, 0x381ae: 0x6dd05020, 0x381af: 0x6dd05220, + 0x381b0: 0x6dd05420, 0x381b1: 0x6dd05620, 0x381b2: 0x6dd05820, 0x381b3: 0x6dea0420, + 0x381b4: 0x6dea0620, 0x381b5: 0x6dea0820, 0x381b6: 0x6dea0a20, 0x381b7: 0x6dea0c20, + 0x381b8: 0x6dea0e20, 0x381b9: 0x6dea1020, 0x381ba: 0x6dea1220, 0x381bb: 0x6dea1420, + 0x381bc: 0x6dea1620, 0x381bd: 0x6dea1820, 0x381be: 0x6dffd020, 0x381bf: 0x6dffd220, + // Block 0xe07, offset 0x381c0 + 0x381c0: 0x6dffd420, 0x381c1: 0x6dffd620, 0x381c2: 0x6dffd820, 0x381c3: 0x6dffda20, + 0x381c4: 0x6dffdc20, 0x381c5: 0x6e123420, 0x381c6: 0x6e123620, 0x381c7: 0x6e123820, + 0x381c8: 0x6e123a20, 0x381c9: 0x6e123c20, 0x381ca: 0x6e206220, 0x381cb: 0x6e206420, + 0x381cc: 0x6e206620, 0x381cd: 0x6e2b4420, 0x381ce: 0x6e2b4620, 0x381cf: 0x6e33ce20, + 0x381d0: 0x6e39ac20, 0x381d1: 0x6e3ddc20, 0x381d2: 0x6c145420, 0x381d3: 0x6c3e5c20, + 0x381d4: 0x6c5d6020, 0x381d5: 0x6cab0a20, 0x381d6: 0x6cab0c20, 0x381d7: 0x6cab0e20, + 0x381d8: 0x6cd94c20, 0x381d9: 0x6cd94e20, 0x381da: 0x6cd95020, 0x381db: 0x6d080420, + 0x381dc: 0x6d080620, 0x381dd: 0x6d361220, 0x381de: 0x6d361420, 0x381df: 0x6d361620, + 0x381e0: 0x6d62b620, 0x381e1: 0x6d62b820, 0x381e2: 0x6d62ba20, 0x381e3: 0x6d8c9c20, + 0x381e4: 0x6db0ce20, 0x381e5: 0x6db0d020, 0x381e6: 0x6db0d220, 0x381e7: 0x6dea1c20, + 0x381e8: 0x6dffde20, 0x381e9: 0x6c146420, 0x381ea: 0x6c146620, 0x381eb: 0x6c146820, + 0x381ec: 0x6c146a20, 0x381ed: 0x6c146c20, 0x381ee: 0x6c146e20, 0x381ef: 0x6c147020, + 0x381f0: 0x6c147220, 0x381f1: 0x6c147420, 0x381f2: 0x6c147620, 0x381f3: 0x6c147820, + 0x381f4: 0x6c261020, 0x381f5: 0x6c261220, 0x381f6: 0x6c261420, 0x381f7: 0x6c261620, + 0x381f8: 0x6c261820, 0x381f9: 0x6c261a20, 0x381fa: 0x6c261c20, 0x381fb: 0x6c261e20, + 0x381fc: 0x6c262020, 0x381fd: 0x6c262220, 0x381fe: 0x6c262420, 0x381ff: 0x6c3ebe20, + // Block 0xe08, offset 0x38200 + 0x38200: 0x6c3ec020, 0x38201: 0x6c3ec220, 0x38202: 0x6c3ec420, 0x38203: 0x6c3ec620, + 0x38204: 0x6c3ec820, 0x38205: 0x6c3eca20, 0x38206: 0x6c3ecc20, 0x38207: 0x6c3ece20, + 0x38208: 0x6c3ed020, 0x38209: 0x6c3ed220, 0x3820a: 0x6c3ed420, 0x3820b: 0x6c3ed620, + 0x3820c: 0x6c3ed820, 0x3820d: 0x6c3eda20, 0x3820e: 0x6c3edc20, 0x3820f: 0x6c3ede20, + 0x38210: 0x6c3ee020, 0x38211: 0x6c3ee220, 0x38212: 0x6c3ee420, 0x38213: 0x6c3ee620, + 0x38214: 0x6c3ee820, 0x38215: 0x6c3eea20, 0x38216: 0x6c3eec20, 0x38217: 0x6c3eee20, + 0x38218: 0x6c3ef020, 0x38219: 0x6c3ef220, 0x3821a: 0x6c3ef420, 0x3821b: 0x6c3ef620, + 0x3821c: 0x6c3ef820, 0x3821d: 0x6c3efa20, 0x3821e: 0x6c3efc20, 0x3821f: 0x6c3efe20, + 0x38220: 0x6c3f0020, 0x38221: 0x6c3f0220, 0x38222: 0x6c3f0420, 0x38223: 0x6c3f0620, + 0x38224: 0x6c3f0820, 0x38225: 0x6c3f0a20, 0x38226: 0x6c3f0c20, 0x38227: 0x6c3f0e20, + 0x38228: 0x6c3f1020, 0x38229: 0x6c3f1220, 0x3822a: 0x6c5dca20, 0x3822b: 0x6c5dcc20, + 0x3822c: 0x6c5dce20, 0x3822d: 0x6c5dd020, 0x3822e: 0x6c5dd220, 0x3822f: 0x6c5dd420, + 0x38230: 0x6c5dd620, 0x38231: 0x6c5dd820, 0x38232: 0x6c5dda20, 0x38233: 0x6c5ddc20, + 0x38234: 0x6c5dde20, 0x38235: 0x6c5de020, 0x38236: 0x6c5de220, 0x38237: 0x6c5de420, + 0x38238: 0x6c5de620, 0x38239: 0x6c5de820, 0x3823a: 0x6c5dea20, 0x3823b: 0x6c5dec20, + 0x3823c: 0x6c5dee20, 0x3823d: 0x6c5df020, 0x3823e: 0x6c5df220, 0x3823f: 0x6c5df420, + // Block 0xe09, offset 0x38240 + 0x38240: 0x6c5df620, 0x38241: 0x6c5df820, 0x38242: 0x6c5dfa20, 0x38243: 0x6c5dfc20, + 0x38244: 0x6c5dfe20, 0x38245: 0x6c5e0020, 0x38246: 0x6c5e0220, 0x38247: 0x6c5e0420, + 0x38248: 0x6c5e0620, 0x38249: 0x6c5e0820, 0x3824a: 0x6c5e0a20, 0x3824b: 0x6c5e0c20, + 0x3824c: 0x6c5e0e20, 0x3824d: 0x6c5e1020, 0x3824e: 0x6c5e1220, 0x3824f: 0x6c5e1420, + 0x38250: 0x6c5e1620, 0x38251: 0x6c5e1820, 0x38252: 0x6c5e1a20, 0x38253: 0x6c5e1c20, + 0x38254: 0x6c5e1e20, 0x38255: 0x6c5e2020, 0x38256: 0x6c5e2220, 0x38257: 0x6c5e2420, + 0x38258: 0x6c5e2620, 0x38259: 0x6c5e2820, 0x3825a: 0x6c5e2a20, 0x3825b: 0x6c5e2c20, + 0x3825c: 0x6c5e2e20, 0x3825d: 0x6c826020, 0x3825e: 0x6c826220, 0x3825f: 0x6c826420, + 0x38260: 0x6c826620, 0x38261: 0x6c826820, 0x38262: 0x6c826a20, 0x38263: 0x6c826c20, + 0x38264: 0x6c826e20, 0x38265: 0x6c827020, 0x38266: 0x6c827220, 0x38267: 0x6c827420, + 0x38268: 0x6c827620, 0x38269: 0x6c827820, 0x3826a: 0x6c827a20, 0x3826b: 0x6c827c20, + 0x3826c: 0x6c827e20, 0x3826d: 0x6c828020, 0x3826e: 0x6c828220, 0x3826f: 0x6c828420, + 0x38270: 0x6c828620, 0x38271: 0x6c828820, 0x38272: 0x6c828a20, 0x38273: 0x6c828c20, + 0x38274: 0x6c828e20, 0x38275: 0x6c829020, 0x38276: 0x6c829220, 0x38277: 0x6c829420, + 0x38278: 0x6c829620, 0x38279: 0x6c829820, 0x3827a: 0x6c829a20, 0x3827b: 0x6c829c20, + 0x3827c: 0x6c829e20, 0x3827d: 0x6c82a020, 0x3827e: 0x6c82a220, 0x3827f: 0x6c82a420, + // Block 0xe0a, offset 0x38280 + 0x38280: 0x6c82a620, 0x38281: 0x6c82a820, 0x38282: 0x6c82aa20, 0x38283: 0x6c82ac20, + 0x38284: 0x6c82ae20, 0x38285: 0x6c82b020, 0x38286: 0x6c82b220, 0x38287: 0x6c82b420, + 0x38288: 0x6c82b620, 0x38289: 0x6c82b820, 0x3828a: 0x6c82ba20, 0x3828b: 0x6c82bc20, + 0x3828c: 0x6c82be20, 0x3828d: 0x6c82c020, 0x3828e: 0x6c82c220, 0x3828f: 0x6c82c420, + 0x38290: 0x6c82c620, 0x38291: 0x6c82c820, 0x38292: 0x6c82ca20, 0x38293: 0x6c82cc20, + 0x38294: 0x6cab7220, 0x38295: 0x6cab7420, 0x38296: 0x6cab7620, 0x38297: 0x6cab7820, + 0x38298: 0x6cab7a20, 0x38299: 0x6cab7c20, 0x3829a: 0x6cab7e20, 0x3829b: 0x6cab8020, + 0x3829c: 0x6cab8220, 0x3829d: 0x6cab8420, 0x3829e: 0x6cab8620, 0x3829f: 0x6cab8820, + 0x382a0: 0x6cab8a20, 0x382a1: 0x6cab8c20, 0x382a2: 0x6cab8e20, 0x382a3: 0x6cab9020, + 0x382a4: 0x6cab9220, 0x382a5: 0x6cab9420, 0x382a6: 0x6cab9620, 0x382a7: 0x6cab9820, + 0x382a8: 0x6cab9a20, 0x382a9: 0x6cab9c20, 0x382aa: 0x6cab9e20, 0x382ab: 0x6caba020, + 0x382ac: 0x6caba220, 0x382ad: 0x6caba420, 0x382ae: 0x6caba620, 0x382af: 0x6caba820, + 0x382b0: 0x6cabaa20, 0x382b1: 0x6cabac20, 0x382b2: 0x6cabae20, 0x382b3: 0x6cabb020, + 0x382b4: 0x6cabb220, 0x382b5: 0x6cabb420, 0x382b6: 0x6cabb620, 0x382b7: 0x6cabb820, + 0x382b8: 0x6cabba20, 0x382b9: 0x6cabbc20, 0x382ba: 0x6cabbe20, 0x382bb: 0x6cabc020, + 0x382bc: 0x6cabc220, 0x382bd: 0x6cabc420, 0x382be: 0x6cabc620, 0x382bf: 0x6cabc820, + // Block 0xe0b, offset 0x382c0 + 0x382c0: 0x6cabca20, 0x382c1: 0x6cabcc20, 0x382c2: 0x6cabce20, 0x382c3: 0x6cabd020, + 0x382c4: 0x6cabd220, 0x382c5: 0x6cabd420, 0x382c6: 0x6cd9c020, 0x382c7: 0x6cd9c220, + 0x382c8: 0x6cd9c420, 0x382c9: 0x6cd9c620, 0x382ca: 0x6cd9c820, 0x382cb: 0x6cd9ca20, + 0x382cc: 0x6cd9cc20, 0x382cd: 0x6cd9ce20, 0x382ce: 0x6cd9d020, 0x382cf: 0x6cd9d220, + 0x382d0: 0x6cd9d420, 0x382d1: 0x6cd9d620, 0x382d2: 0x6cd9d820, 0x382d3: 0x6cd9da20, + 0x382d4: 0x6cd9dc20, 0x382d5: 0x6cd9de20, 0x382d6: 0x6cd9e020, 0x382d7: 0x6cd9e220, + 0x382d8: 0x6cd9e420, 0x382d9: 0x6cd9e620, 0x382da: 0x6cd9e820, 0x382db: 0x6cd9ea20, + 0x382dc: 0x6cd9ec20, 0x382dd: 0x6cd9ee20, 0x382de: 0x6cd9f020, 0x382df: 0x6cd9f220, + 0x382e0: 0x6cd9f420, 0x382e1: 0x6cd9f620, 0x382e2: 0x6cd9f820, 0x382e3: 0x6cd9fa20, + 0x382e4: 0x6cd9fc20, 0x382e5: 0x6cd9fe20, 0x382e6: 0x6cda0020, 0x382e7: 0x6cda0220, + 0x382e8: 0x6cda0420, 0x382e9: 0x6cda0620, 0x382ea: 0x6cda0820, 0x382eb: 0x6cda0a20, + 0x382ec: 0x6cda0c20, 0x382ed: 0x6cda0e20, 0x382ee: 0x6cda1020, 0x382ef: 0x6cda1220, + 0x382f0: 0x6cda1420, 0x382f1: 0x6cda1620, 0x382f2: 0x6cda1820, 0x382f3: 0x6cc87c20, + 0x382f4: 0x6cda1a20, 0x382f5: 0x6cda1c20, 0x382f6: 0x6cda1e20, 0x382f7: 0x6cda2020, + 0x382f8: 0x6cda2220, 0x382f9: 0x6cda2420, 0x382fa: 0x6cda2620, 0x382fb: 0x6cda2820, + 0x382fc: 0x6cda2a20, 0x382fd: 0x6cda2c20, 0x382fe: 0x6cda2e20, 0x382ff: 0x6cda3020, + // Block 0xe0c, offset 0x38300 + 0x38300: 0x6cda3220, 0x38301: 0x6cda3420, 0x38302: 0x6cda3620, 0x38303: 0x6cda3820, + 0x38304: 0x6cda3a20, 0x38305: 0x6cda3c20, 0x38306: 0x6cda3e20, 0x38307: 0x6cda4020, + 0x38308: 0x6cda4220, 0x38309: 0x6cda4420, 0x3830a: 0x6cda4620, 0x3830b: 0x6cda4820, + 0x3830c: 0x6cda4a20, 0x3830d: 0x6cda4c20, 0x3830e: 0x6cda4e20, 0x3830f: 0x6cda5020, + 0x38310: 0x6cda5220, 0x38311: 0x6cda5420, 0x38312: 0x6cda5620, 0x38313: 0x6cda5820, + 0x38314: 0x6cda5a20, 0x38315: 0x6cda5c20, 0x38316: 0x6cda5e20, 0x38317: 0x6cda6020, + 0x38318: 0x6cda6220, 0x38319: 0x6cda6420, 0x3831a: 0x6d087020, 0x3831b: 0x6d087220, + 0x3831c: 0x6d087420, 0x3831d: 0x6d087620, 0x3831e: 0x6d087820, 0x3831f: 0x6d087a20, + 0x38320: 0x6d087c20, 0x38321: 0x6d087e20, 0x38322: 0x6d088020, 0x38323: 0x6d088220, + 0x38324: 0x6d088420, 0x38325: 0x6d088620, 0x38326: 0x6d088820, 0x38327: 0x6d088a20, + 0x38328: 0x6d088c20, 0x38329: 0x6d088e20, 0x3832a: 0x6d089020, 0x3832b: 0x6d089220, + 0x3832c: 0x6d089420, 0x3832d: 0x6d089620, 0x3832e: 0x6d089820, 0x3832f: 0x6d089a20, + 0x38330: 0x6d089c20, 0x38331: 0x6d089e20, 0x38332: 0x6d08a020, 0x38333: 0x6d08a220, + 0x38334: 0x6d08a420, 0x38335: 0x6d08a620, 0x38336: 0x6d08a820, 0x38337: 0x6d08aa20, + 0x38338: 0x6d08ac20, 0x38339: 0x6d08ae20, 0x3833a: 0x6d08b020, 0x3833b: 0x6d08b220, + 0x3833c: 0x6d08b420, 0x3833d: 0x6d08b620, 0x3833e: 0x6d08b820, 0x3833f: 0x6d08ba20, + // Block 0xe0d, offset 0x38340 + 0x38340: 0x6d08bc20, 0x38341: 0x6d08be20, 0x38342: 0x6d08c020, 0x38343: 0x6d08c220, + 0x38344: 0x6d08c420, 0x38345: 0x6d08c620, 0x38346: 0x6d08c820, 0x38347: 0x6d08ca20, + 0x38348: 0x6d08cc20, 0x38349: 0x6d08ce20, 0x3834a: 0x6d08d020, 0x3834b: 0x6d08d220, + 0x3834c: 0x6d08d420, 0x3834d: 0x6d08d620, 0x3834e: 0x6d08d820, 0x3834f: 0x6d08da20, + 0x38350: 0x6d08dc20, 0x38351: 0x6d08de20, 0x38352: 0x6d08e020, 0x38353: 0x6d08e220, + 0x38354: 0x6d08e420, 0x38355: 0x6d08e620, 0x38356: 0x6d08e820, 0x38357: 0x6d08ea20, + 0x38358: 0x6d08ec20, 0x38359: 0x6d365c20, 0x3835a: 0x6d365e20, 0x3835b: 0x6d366020, + 0x3835c: 0x6d366220, 0x3835d: 0x6d366420, 0x3835e: 0x6d366620, 0x3835f: 0x6d366820, + 0x38360: 0x6d366a20, 0x38361: 0x6d366c20, 0x38362: 0x6d366e20, 0x38363: 0x6d367020, + 0x38364: 0x6d367220, 0x38365: 0x6d367420, 0x38366: 0x6d367620, 0x38367: 0x6d367820, + 0x38368: 0x6d367a20, 0x38369: 0x6d367c20, 0x3836a: 0x6d367e20, 0x3836b: 0x6d368020, + 0x3836c: 0x6d368220, 0x3836d: 0x6d368420, 0x3836e: 0x6d368620, 0x3836f: 0x6d368820, + 0x38370: 0x6d368a20, 0x38371: 0x6d368c20, 0x38372: 0x6d368e20, 0x38373: 0x6d369020, + 0x38374: 0x6d369220, 0x38375: 0x6d369420, 0x38376: 0x6d369620, 0x38377: 0x6d369820, + 0x38378: 0x6d369a20, 0x38379: 0x6d369c20, 0x3837a: 0x6d369e20, 0x3837b: 0x6d36a020, + 0x3837c: 0x6d36a220, 0x3837d: 0x6d36a420, 0x3837e: 0x6d36a620, 0x3837f: 0x6d36a820, + // Block 0xe0e, offset 0x38380 + 0x38380: 0x6d36aa20, 0x38381: 0x6d36ac20, 0x38382: 0x6d36ae20, 0x38383: 0x6d36b020, + 0x38384: 0x6d36b220, 0x38385: 0x6d36b420, 0x38386: 0x6d36b620, 0x38387: 0x6d36b820, + 0x38388: 0x6d36ba20, 0x38389: 0x6d36bc20, 0x3838a: 0x6d36be20, 0x3838b: 0x6d36c020, + 0x3838c: 0x6d36c220, 0x3838d: 0x6d36c420, 0x3838e: 0x6d36c620, 0x3838f: 0x6d36c820, + 0x38390: 0x6d36ca20, 0x38391: 0x6d36cc20, 0x38392: 0x6d36ce20, 0x38393: 0x6d08ee20, + 0x38394: 0x6d08f020, 0x38395: 0x6d36d020, 0x38396: 0x6d36d220, 0x38397: 0x6d36d420, + 0x38398: 0x6d62f420, 0x38399: 0x6d62f620, 0x3839a: 0x6d62f820, 0x3839b: 0x6d62fa20, + 0x3839c: 0x6d62fc20, 0x3839d: 0x6d62fe20, 0x3839e: 0x6d630020, 0x3839f: 0x6d630220, + 0x383a0: 0x6d630420, 0x383a1: 0x6d630620, 0x383a2: 0x6d630820, 0x383a3: 0x6d630a20, + 0x383a4: 0x6d630c20, 0x383a5: 0x6d630e20, 0x383a6: 0x6d631020, 0x383a7: 0x6d631220, + 0x383a8: 0x6d631420, 0x383a9: 0x6d631620, 0x383aa: 0x6d631820, 0x383ab: 0x6d631a20, + 0x383ac: 0x6d631c20, 0x383ad: 0x6d631e20, 0x383ae: 0x6d632020, 0x383af: 0x6d632220, + 0x383b0: 0x6d632420, 0x383b1: 0x6d632620, 0x383b2: 0x6d632820, 0x383b3: 0x6d632a20, + 0x383b4: 0x6d632c20, 0x383b5: 0x6d632e20, 0x383b6: 0x6d633020, 0x383b7: 0x6d633220, + 0x383b8: 0x6d633420, 0x383b9: 0x6d633620, 0x383ba: 0x6d633820, 0x383bb: 0x6d633a20, + 0x383bc: 0x6d633c20, 0x383bd: 0x6d633e20, 0x383be: 0x6d634020, 0x383bf: 0x6d634220, + // Block 0xe0f, offset 0x383c0 + 0x383c0: 0x6d634420, 0x383c1: 0x6d634620, 0x383c2: 0x6d634820, 0x383c3: 0x6d8cd620, + 0x383c4: 0x6d8cd820, 0x383c5: 0x6d8cda20, 0x383c6: 0x6d8cdc20, 0x383c7: 0x6d8cde20, + 0x383c8: 0x6d8ce020, 0x383c9: 0x6d8ce220, 0x383ca: 0x6d8ce420, 0x383cb: 0x6d8ce620, + 0x383cc: 0x6d8ce820, 0x383cd: 0x6d8cea20, 0x383ce: 0x6d8cec20, 0x383cf: 0x6d8cee20, + 0x383d0: 0x6d8cf020, 0x383d1: 0x6d8cf220, 0x383d2: 0x6d8cf420, 0x383d3: 0x6d8cf620, + 0x383d4: 0x6d8cf820, 0x383d5: 0x6d8cfa20, 0x383d6: 0x6d8cfc20, 0x383d7: 0x6d8cfe20, + 0x383d8: 0x6d8d0020, 0x383d9: 0x6d8d0220, 0x383da: 0x6d8d0420, 0x383db: 0x6d8d0620, + 0x383dc: 0x6d8d0820, 0x383dd: 0x6d8d0a20, 0x383de: 0x6d8d0c20, 0x383df: 0x6d8d0e20, + 0x383e0: 0x6d8d1020, 0x383e1: 0x6d8d1220, 0x383e2: 0x6d8d1420, 0x383e3: 0x6d8d1620, + 0x383e4: 0x6d8d1820, 0x383e5: 0x6d8d1a20, 0x383e6: 0x6d8d1c20, 0x383e7: 0x6d8d1e20, + 0x383e8: 0x6d8d2020, 0x383e9: 0x6d8d2220, 0x383ea: 0x6d8d2420, 0x383eb: 0x6d8d2620, + 0x383ec: 0x6d8d2820, 0x383ed: 0x6d8d2a20, 0x383ee: 0x6d8d2c20, 0x383ef: 0x6d8d2e20, + 0x383f0: 0x6d8d3020, 0x383f1: 0x6d8d3220, 0x383f2: 0x6d8d3420, 0x383f3: 0x6d8d3620, + 0x383f4: 0x6d8d3820, 0x383f5: 0x6d8d3a20, 0x383f6: 0x6d8d3c20, 0x383f7: 0x6d8d3e20, + 0x383f8: 0x6d8d4020, 0x383f9: 0x6d8d4220, 0x383fa: 0x6d8d4420, 0x383fb: 0x6d8d4620, + 0x383fc: 0x6d8d4820, 0x383fd: 0x6d8d4a20, 0x383fe: 0x6db10420, 0x383ff: 0x6db10620, + // Block 0xe10, offset 0x38400 + 0x38400: 0x6db10820, 0x38401: 0x6db10a20, 0x38402: 0x6db10c20, 0x38403: 0x6db10e20, + 0x38404: 0x6d8d4c20, 0x38405: 0x6db11020, 0x38406: 0x6db11220, 0x38407: 0x6db11420, + 0x38408: 0x6db11620, 0x38409: 0x6db11820, 0x3840a: 0x6db11a20, 0x3840b: 0x6db11c20, + 0x3840c: 0x6db11e20, 0x3840d: 0x6db12020, 0x3840e: 0x6dd07620, 0x3840f: 0x6db12220, + 0x38410: 0x6db12420, 0x38411: 0x6db12620, 0x38412: 0x6db12820, 0x38413: 0x6db12a20, + 0x38414: 0x6db12c20, 0x38415: 0x6db12e20, 0x38416: 0x6da5c020, 0x38417: 0x6d7c7a20, + 0x38418: 0x6db13020, 0x38419: 0x6db13220, 0x3841a: 0x6db13420, 0x3841b: 0x6db13620, + 0x3841c: 0x6db13820, 0x3841d: 0x6db13a20, 0x3841e: 0x6db13c20, 0x3841f: 0x6db13e20, + 0x38420: 0x6db14020, 0x38421: 0x6db14220, 0x38422: 0x6db14420, 0x38423: 0x6db14620, + 0x38424: 0x6db14820, 0x38425: 0x6db14a20, 0x38426: 0x6db14c20, 0x38427: 0x6db14e20, + 0x38428: 0x6db15020, 0x38429: 0x6db15220, 0x3842a: 0x6db15420, 0x3842b: 0x6db15620, + 0x3842c: 0x6db15820, 0x3842d: 0x6db15a20, 0x3842e: 0x6d8d4e20, 0x3842f: 0x6db15c20, + 0x38430: 0x6dd07820, 0x38431: 0x6dd07a20, 0x38432: 0x6dd07c20, 0x38433: 0x6dd07e20, + 0x38434: 0x6dd08020, 0x38435: 0x6dd08220, 0x38436: 0x6dd08420, 0x38437: 0x6dd08620, + 0x38438: 0x6dd08820, 0x38439: 0x6dd08a20, 0x3843a: 0x6dd08c20, 0x3843b: 0x6dd08e20, + 0x3843c: 0x6dd09020, 0x3843d: 0x6dd09220, 0x3843e: 0x6dd09420, 0x3843f: 0x6dd09620, + // Block 0xe11, offset 0x38440 + 0x38440: 0x6dd09820, 0x38441: 0x6dd09a20, 0x38442: 0x6dd09c20, 0x38443: 0x6dd09e20, + 0x38444: 0x6dd0a020, 0x38445: 0x6dd0a220, 0x38446: 0x6dd0a420, 0x38447: 0x6dd0a620, + 0x38448: 0x6dd0a820, 0x38449: 0x6dd0aa20, 0x3844a: 0x6dea2e20, 0x3844b: 0x6dea3020, + 0x3844c: 0x6dea3220, 0x3844d: 0x6dea3420, 0x3844e: 0x6dea3620, 0x3844f: 0x6dea3820, + 0x38450: 0x6dea3a20, 0x38451: 0x6dea3c20, 0x38452: 0x6dea3e20, 0x38453: 0x6dea4020, + 0x38454: 0x6dea4220, 0x38455: 0x6dea4420, 0x38456: 0x6dea4620, 0x38457: 0x6dea4820, + 0x38458: 0x6dea4a20, 0x38459: 0x6dea4c20, 0x3845a: 0x6dea4e20, 0x3845b: 0x6dea5020, + 0x3845c: 0x6dea5220, 0x3845d: 0x6dea5420, 0x3845e: 0x6dea5620, 0x3845f: 0x6dea5820, + 0x38460: 0x6dea5a20, 0x38461: 0x6dea5c20, 0x38462: 0x6dea5e20, 0x38463: 0x6dea6020, + 0x38464: 0x6dea6220, 0x38465: 0x6dffee20, 0x38466: 0x6dfff020, 0x38467: 0x6dfff220, + 0x38468: 0x6dfff420, 0x38469: 0x6dfff620, 0x3846a: 0x6dfff820, 0x3846b: 0x6dfffa20, + 0x3846c: 0x6dfffc20, 0x3846d: 0x6dfffe20, 0x3846e: 0x6e000020, 0x3846f: 0x6e000220, + 0x38470: 0x6e000420, 0x38471: 0x6e000620, 0x38472: 0x6e000820, 0x38473: 0x6e000a20, + 0x38474: 0x6e000c20, 0x38475: 0x6e000e20, 0x38476: 0x6e001020, 0x38477: 0x6e001220, + 0x38478: 0x6e124a20, 0x38479: 0x6e124c20, 0x3847a: 0x6e124e20, 0x3847b: 0x6e125020, + 0x3847c: 0x6e125220, 0x3847d: 0x6e125420, 0x3847e: 0x6e125620, 0x3847f: 0x6e206e20, + // Block 0xe12, offset 0x38480 + 0x38480: 0x6e207020, 0x38481: 0x6e207220, 0x38482: 0x6e207420, 0x38483: 0x6e207620, + 0x38484: 0x6e207820, 0x38485: 0x6e207a20, 0x38486: 0x6e2b4c20, 0x38487: 0x6e2b4e20, + 0x38488: 0x6e2b5020, 0x38489: 0x6e2b5220, 0x3848a: 0x6e2b5420, 0x3848b: 0x6e2b5620, + 0x3848c: 0x6e2b5820, 0x3848d: 0x6e2b5a20, 0x3848e: 0x6e2b5c20, 0x3848f: 0x6e2b5e20, + 0x38490: 0x6e2b6020, 0x38491: 0x6e33d020, 0x38492: 0x6e33d220, 0x38493: 0x6e33d420, + 0x38494: 0x6e33d620, 0x38495: 0x6e33d820, 0x38496: 0x6e39b220, 0x38497: 0x6e39b420, + 0x38498: 0x6e3dde20, 0x38499: 0x6e3de020, 0x3849a: 0x6e3de220, 0x3849b: 0x6e40be20, + 0x3849c: 0x6e42ec20, 0x3849d: 0x6c262620, 0x3849e: 0x6c147c20, 0x3849f: 0x6c5e3820, + 0x384a0: 0x6c82d220, 0x384a1: 0x6c82d420, 0x384a2: 0x6c82d620, 0x384a3: 0x6c82d820, + 0x384a4: 0x6cabde20, 0x384a5: 0x6cabe020, 0x384a6: 0x6cda7220, 0x384a7: 0x6cda7420, + 0x384a8: 0x6cda7620, 0x384a9: 0x6cda7820, 0x384aa: 0x6d8d5c20, 0x384ab: 0x6d36e620, + 0x384ac: 0x6d36e820, 0x384ad: 0x6d635620, 0x384ae: 0x6d36ea20, 0x384af: 0x6d635820, + 0x384b0: 0x6db16820, 0x384b1: 0x6db16a20, 0x384b2: 0x6dd0b220, 0x384b3: 0x6dd0b420, + 0x384b4: 0x6e125a20, 0x384b5: 0x6e125c20, 0x384b6: 0x6e207e20, 0x384b7: 0x6e445e20, + 0x384b8: 0x6e45ce20, 0x384b9: 0x6c148020, 0x384ba: 0x6c262a20, 0x384bb: 0x6c262c20, + 0x384bc: 0x6c262e20, 0x384bd: 0x6c3f1e20, 0x384be: 0x6c5e3a20, 0x384bf: 0x6c5e3c20, + // Block 0xe13, offset 0x384c0 + 0x384c0: 0x6c5e3e20, 0x384c1: 0x6c82e020, 0x384c2: 0x6c82e220, 0x384c3: 0x6c82e420, + 0x384c4: 0x6c82e620, 0x384c5: 0x6c82e820, 0x384c6: 0x6c82ea20, 0x384c7: 0x6c82ec20, + 0x384c8: 0x6c82ee20, 0x384c9: 0x6c82f020, 0x384ca: 0x6c82f220, 0x384cb: 0x6c82f420, + 0x384cc: 0x6cabe220, 0x384cd: 0x6cabe420, 0x384ce: 0x6cabe620, 0x384cf: 0x6cabe820, + 0x384d0: 0x6cda8220, 0x384d1: 0x6cda8420, 0x384d2: 0x6cda8620, 0x384d3: 0x6cda8820, + 0x384d4: 0x6d08fa20, 0x384d5: 0x6d36ee20, 0x384d6: 0x6d36f020, 0x384d7: 0x6d36f220, + 0x384d8: 0x6d635c20, 0x384d9: 0x6d635e20, 0x384da: 0x6d636020, 0x384db: 0x6d636220, + 0x384dc: 0x6d636420, 0x384dd: 0x6d636620, 0x384de: 0x6d8d6020, 0x384df: 0x6d8d6220, + 0x384e0: 0x6d8d6420, 0x384e1: 0x6db16c20, 0x384e2: 0x6db16e20, 0x384e3: 0x6db17020, + 0x384e4: 0x6db17220, 0x384e5: 0x6dd0b820, 0x384e6: 0x6dea6820, 0x384e7: 0x6dea6a20, + 0x384e8: 0x6dea6c20, 0x384e9: 0x6dea6e20, 0x384ea: 0x6dea7020, 0x384eb: 0x6e001620, + 0x384ec: 0x6e001820, 0x384ed: 0x6e001a20, 0x384ee: 0x6e001c20, 0x384ef: 0x6e125e20, + 0x384f0: 0x6e126020, 0x384f1: 0x6e33da20, 0x384f2: 0x6e3de420, 0x384f3: 0x6c148420, + 0x384f4: 0x6c148620, 0x384f5: 0x6c3f2020, 0x384f6: 0x6c5e4420, 0x384f7: 0x6c5e4620, + 0x384f8: 0x6c5e4820, 0x384f9: 0x6c82f620, 0x384fa: 0x6c82f820, 0x384fb: 0x6cabea20, + 0x384fc: 0x6cabec20, 0x384fd: 0x6cabee20, 0x384fe: 0x6cabf020, 0x384ff: 0x6cda9420, + // Block 0xe14, offset 0x38500 + 0x38500: 0x6cda9620, 0x38501: 0x6d08fe20, 0x38502: 0x6d36f620, 0x38503: 0x6d36f820, + 0x38504: 0x6d36fa20, 0x38505: 0x6d636a20, 0x38506: 0x6d636c20, 0x38507: 0x6d636e20, + 0x38508: 0x6d1dd820, 0x38509: 0x6d8d6820, 0x3850a: 0x6d8d6a20, 0x3850b: 0x6d8d6c20, + 0x3850c: 0x6d8d6e20, 0x3850d: 0x6d8d7020, 0x3850e: 0x6db17420, 0x3850f: 0x6dd0bc20, + 0x38510: 0x6dd0be20, 0x38511: 0x6c148a20, 0x38512: 0x6c148c20, 0x38513: 0x6c148e20, + 0x38514: 0x6c263020, 0x38515: 0x6c3f2620, 0x38516: 0x6c3f2820, 0x38517: 0x6c5e4c20, + 0x38518: 0x6c5e4e20, 0x38519: 0x6c3f2a20, 0x3851a: 0x6c5e5020, 0x3851b: 0x6c5e5220, + 0x3851c: 0x6c5e5420, 0x3851d: 0x6c830020, 0x3851e: 0x6c830220, 0x3851f: 0x6c830420, + 0x38520: 0x6c830620, 0x38521: 0x6c830820, 0x38522: 0x6c830a20, 0x38523: 0x6c830c20, + 0x38524: 0x6c830e20, 0x38525: 0x6cabf620, 0x38526: 0x6cabf820, 0x38527: 0x6c5e5620, + 0x38528: 0x6cabfa20, 0x38529: 0x6cabfc20, 0x3852a: 0x6cabfe20, 0x3852b: 0x6cac0020, + 0x3852c: 0x6cac0220, 0x3852d: 0x6cda9e20, 0x3852e: 0x6cdaa020, 0x3852f: 0x6cdaa220, + 0x38530: 0x6cdaa420, 0x38531: 0x6cdaa620, 0x38532: 0x6cdaa820, 0x38533: 0x6d090420, + 0x38534: 0x6d090620, 0x38535: 0x6d090820, 0x38536: 0x6d090a20, 0x38537: 0x6d090c20, + 0x38538: 0x6d090e20, 0x38539: 0x6d091020, 0x3853a: 0x6d091220, 0x3853b: 0x6d370420, + 0x3853c: 0x6d370620, 0x3853d: 0x6d370820, 0x3853e: 0x6d370a20, 0x3853f: 0x6d370c20, + // Block 0xe15, offset 0x38540 + 0x38540: 0x6d370e20, 0x38541: 0x6d371020, 0x38542: 0x6d371220, 0x38543: 0x6d371420, + 0x38544: 0x6d371620, 0x38545: 0x6d637220, 0x38546: 0x6d637420, 0x38547: 0x6d637620, + 0x38548: 0x6d637820, 0x38549: 0x6d637a20, 0x3854a: 0x6d637c20, 0x3854b: 0x6d637e20, + 0x3854c: 0x6d638020, 0x3854d: 0x6d638220, 0x3854e: 0x6d638420, 0x3854f: 0x6d8d7a20, + 0x38550: 0x6d8d7c20, 0x38551: 0x6d8d7e20, 0x38552: 0x6d8d8020, 0x38553: 0x6d8d8220, + 0x38554: 0x6d5dd620, 0x38555: 0x6d8d8420, 0x38556: 0x6d8d8620, 0x38557: 0x6d8d8820, + 0x38558: 0x6db17620, 0x38559: 0x6db17820, 0x3855a: 0x6db17a20, 0x3855b: 0x6db17c20, + 0x3855c: 0x6db17e20, 0x3855d: 0x6db18020, 0x3855e: 0x6db18220, 0x3855f: 0x6db18420, + 0x38560: 0x6db18620, 0x38561: 0x6dd0c220, 0x38562: 0x6dd0c420, 0x38563: 0x6dd0c620, + 0x38564: 0x6dd0c820, 0x38565: 0x6dd0ca20, 0x38566: 0x6dd0cc20, 0x38567: 0x6dd0ce20, + 0x38568: 0x6dca2e20, 0x38569: 0x6dea7620, 0x3856a: 0x6dea7820, 0x3856b: 0x6dea7a20, + 0x3856c: 0x6dea7c20, 0x3856d: 0x6e002020, 0x3856e: 0x6e002220, 0x3856f: 0x6dea7e20, + 0x38570: 0x6e002420, 0x38571: 0x6e002620, 0x38572: 0x6e002820, 0x38573: 0x6e002a20, + 0x38574: 0x6e002c20, 0x38575: 0x6e002e20, 0x38576: 0x6e126220, 0x38577: 0x6e126420, + 0x38578: 0x6e126620, 0x38579: 0x6e208020, 0x3857a: 0x6e2b6420, 0x3857b: 0x6e2b6620, + 0x3857c: 0x6e33de20, 0x3857d: 0x6e39b620, 0x3857e: 0x6e39b820, 0x3857f: 0x6e39ba20, + // Block 0xe16, offset 0x38580 + 0x38580: 0x6e3de820, 0x38581: 0x6e40c020, 0x38582: 0x6e40c220, 0x38583: 0x6e454420, + 0x38584: 0x6e472c20, 0x38585: 0x6e473620, 0x38586: 0x6c263220, 0x38587: 0x6c5e5820, + 0x38588: 0x6c831620, 0x38589: 0x6c831820, 0x3858a: 0x6c831a20, 0x3858b: 0x6c831c20, + 0x3858c: 0x6c831e20, 0x3858d: 0x6c832020, 0x3858e: 0x6c832220, 0x3858f: 0x6c832420, + 0x38590: 0x6c832620, 0x38591: 0x6cac0820, 0x38592: 0x6cac0a20, 0x38593: 0x6cac0c20, + 0x38594: 0x6cac0e20, 0x38595: 0x6cdaae20, 0x38596: 0x6cdab020, 0x38597: 0x6cdab220, + 0x38598: 0x6cdab420, 0x38599: 0x6cdab620, 0x3859a: 0x6cdab820, 0x3859b: 0x6cdaba20, + 0x3859c: 0x6cdabc20, 0x3859d: 0x6d091420, 0x3859e: 0x6d091620, 0x3859f: 0x6d371e20, + 0x385a0: 0x6d372020, 0x385a1: 0x6d372220, 0x385a2: 0x6d372420, 0x385a3: 0x6d372620, + 0x385a4: 0x6d372820, 0x385a5: 0x6d372a20, 0x385a6: 0x6d372c20, 0x385a7: 0x6d638c20, + 0x385a8: 0x6d638e20, 0x385a9: 0x6d639020, 0x385aa: 0x6d639220, 0x385ab: 0x6d639420, + 0x385ac: 0x6d639620, 0x385ad: 0x6d8d8c20, 0x385ae: 0x6d8d8e20, 0x385af: 0x6d8d9020, + 0x385b0: 0x6d8d9220, 0x385b1: 0x6db18820, 0x385b2: 0x6db18a20, 0x385b3: 0x6db18c20, + 0x385b4: 0x6dd0d420, 0x385b5: 0x6dd0d620, 0x385b6: 0x6dd0d820, 0x385b7: 0x6dea8220, + 0x385b8: 0x6e003020, 0x385b9: 0x6e126820, 0x385ba: 0x6e208220, 0x385bb: 0x6e2b6820, + 0x385bc: 0x6e2b6a20, 0x385bd: 0x6e3dec20, 0x385be: 0x6d639820, 0x385bf: 0x6d639a20, + // Block 0xe17, offset 0x385c0 + 0x385c0: 0x6dd0da20, 0x385c1: 0x6e003220, 0x385c2: 0x6e2b6c20, 0x385c3: 0x6e208620, + 0x385c4: 0x6e33e020, 0x385c5: 0x6e39bc20, 0x385c6: 0x6e40c420, 0x385c7: 0x6c263420, + 0x385c8: 0x6c3f3820, 0x385c9: 0x6c3f3a20, 0x385ca: 0x6c3f3c20, 0x385cb: 0x6c3f3e20, + 0x385cc: 0x6c3f4020, 0x385cd: 0x6c3f4220, 0x385ce: 0x6c5e6820, 0x385cf: 0x6c5e6a20, + 0x385d0: 0x6c5e6c20, 0x385d1: 0x6c5e6e20, 0x385d2: 0x6c5e7020, 0x385d3: 0x6c5e7220, + 0x385d4: 0x6c5e7420, 0x385d5: 0x6c834620, 0x385d6: 0x6c834820, 0x385d7: 0x6c834a20, + 0x385d8: 0x6c834c20, 0x385d9: 0x6c834e20, 0x385da: 0x6c835020, 0x385db: 0x6c835220, + 0x385dc: 0x6c835420, 0x385dd: 0x6c835620, 0x385de: 0x6c835820, 0x385df: 0x6c835a20, + 0x385e0: 0x6c835c20, 0x385e1: 0x6cac2c20, 0x385e2: 0x6cac2e20, 0x385e3: 0x6cac3020, + 0x385e4: 0x6cac3220, 0x385e5: 0x6cac3420, 0x385e6: 0x6cac3620, 0x385e7: 0x6cac3820, + 0x385e8: 0x6cac3a20, 0x385e9: 0x6cac3c20, 0x385ea: 0x6cac3e20, 0x385eb: 0x6cac4020, + 0x385ec: 0x6cac4220, 0x385ed: 0x6cac4420, 0x385ee: 0x6cac4620, 0x385ef: 0x6cdad220, + 0x385f0: 0x6cdad420, 0x385f1: 0x6cdad620, 0x385f2: 0x6cdad820, 0x385f3: 0x6d093620, + 0x385f4: 0x6cdada20, 0x385f5: 0x6cdadc20, 0x385f6: 0x6cdade20, 0x385f7: 0x6cdae020, + 0x385f8: 0x6cdae220, 0x385f9: 0x6cdae420, 0x385fa: 0x6cdae620, 0x385fb: 0x6cdae820, + 0x385fc: 0x6cdaea20, 0x385fd: 0x6d093820, 0x385fe: 0x6d093a20, 0x385ff: 0x6d093c20, + // Block 0xe18, offset 0x38600 + 0x38600: 0x6d093e20, 0x38601: 0x6d094020, 0x38602: 0x6d094220, 0x38603: 0x6d094420, + 0x38604: 0x6d094620, 0x38605: 0x6d094820, 0x38606: 0x6d094a20, 0x38607: 0x6d094c20, + 0x38608: 0x6d094e20, 0x38609: 0x6d095020, 0x3860a: 0x6d374a20, 0x3860b: 0x6d374c20, + 0x3860c: 0x6d374e20, 0x3860d: 0x6d375020, 0x3860e: 0x6d375220, 0x3860f: 0x6d375420, + 0x38610: 0x6d375620, 0x38611: 0x6d375820, 0x38612: 0x6d375a20, 0x38613: 0x6d375c20, + 0x38614: 0x6d375e20, 0x38615: 0x6d376020, 0x38616: 0x6d376220, 0x38617: 0x6d376420, + 0x38618: 0x6d376620, 0x38619: 0x6d376820, 0x3861a: 0x6d376a20, 0x3861b: 0x6d376c20, + 0x3861c: 0x6d376e20, 0x3861d: 0x6d63b020, 0x3861e: 0x6d63b220, 0x3861f: 0x6d63b420, + 0x38620: 0x6d63b620, 0x38621: 0x6d63b820, 0x38622: 0x6d63ba20, 0x38623: 0x6d63bc20, + 0x38624: 0x6d63be20, 0x38625: 0x6d63c020, 0x38626: 0x6d63c220, 0x38627: 0x6d63c420, + 0x38628: 0x6d63c620, 0x38629: 0x6d63c820, 0x3862a: 0x6d63ca20, 0x3862b: 0x6d63cc20, + 0x3862c: 0x6d63ce20, 0x3862d: 0x6d63d020, 0x3862e: 0x6d63d220, 0x3862f: 0x6d63d420, + 0x38630: 0x6d63d620, 0x38631: 0x6d63d820, 0x38632: 0x6d63da20, 0x38633: 0x6d63dc20, + 0x38634: 0x6d8da820, 0x38635: 0x6d8daa20, 0x38636: 0x6d8dac20, 0x38637: 0x6d8dae20, + 0x38638: 0x6d8db020, 0x38639: 0x6d8db220, 0x3863a: 0x6d8db420, 0x3863b: 0x6d8db620, + 0x3863c: 0x6d8db820, 0x3863d: 0x6d8dba20, 0x3863e: 0x6d8dbc20, 0x3863f: 0x6d63de20, + // Block 0xe19, offset 0x38640 + 0x38640: 0x6d8dbe20, 0x38641: 0x6d8dc020, 0x38642: 0x6d8dc220, 0x38643: 0x6d8dc420, + 0x38644: 0x6d8dc620, 0x38645: 0x6d8dc820, 0x38646: 0x6db1a420, 0x38647: 0x6db1a620, + 0x38648: 0x6db1a820, 0x38649: 0x6db1aa20, 0x3864a: 0x6db1ac20, 0x3864b: 0x6db1ae20, + 0x3864c: 0x6db1b020, 0x3864d: 0x6db1b220, 0x3864e: 0x6db1b420, 0x3864f: 0x6db1b620, + 0x38650: 0x6db1b820, 0x38651: 0x6dd0e820, 0x38652: 0x6dd0ea20, 0x38653: 0x6dd0ec20, + 0x38654: 0x6dd0ee20, 0x38655: 0x6dd0f020, 0x38656: 0x6dd0f220, 0x38657: 0x6dd0f420, + 0x38658: 0x6dd0f620, 0x38659: 0x6dd0f820, 0x3865a: 0x6dd0fa20, 0x3865b: 0x6dd0fc20, + 0x3865c: 0x6dd0fe20, 0x3865d: 0x6dd10020, 0x3865e: 0x6dd10220, 0x3865f: 0x6dd10420, + 0x38660: 0x6dd10620, 0x38661: 0x6dd10820, 0x38662: 0x6dd10a20, 0x38663: 0x6dd10c20, + 0x38664: 0x6dd10e20, 0x38665: 0x6dd11020, 0x38666: 0x6dd11220, 0x38667: 0x6dd11420, + 0x38668: 0x6dea9020, 0x38669: 0x6dea9220, 0x3866a: 0x6dea9420, 0x3866b: 0x6dea9620, + 0x3866c: 0x6dea9820, 0x3866d: 0x6dea9a20, 0x3866e: 0x6dea9c20, 0x3866f: 0x6dea9e20, + 0x38670: 0x6deaa020, 0x38671: 0x6e003e20, 0x38672: 0x6e004020, 0x38673: 0x6e004220, + 0x38674: 0x6e004420, 0x38675: 0x6e004620, 0x38676: 0x6e126e20, 0x38677: 0x6e127020, + 0x38678: 0x6e127220, 0x38679: 0x6e105820, 0x3867a: 0x6e127420, 0x3867b: 0x6e127620, + 0x3867c: 0x6e127820, 0x3867d: 0x6e208a20, 0x3867e: 0x6e208c20, 0x3867f: 0x6e208e20, + // Block 0xe1a, offset 0x38680 + 0x38680: 0x6e209020, 0x38681: 0x6e209220, 0x38682: 0x6e209420, 0x38683: 0x6e2b7020, + 0x38684: 0x6e2b7220, 0x38685: 0x6e39be20, 0x38686: 0x6e39c020, 0x38687: 0x6e3dee20, + 0x38688: 0x6e40c620, 0x38689: 0x6e3df020, 0x3868a: 0x6e454620, 0x3868b: 0x6c5e7820, + 0x3868c: 0x6cac4820, 0x3868d: 0x6cac4a20, 0x3868e: 0x6cdaec20, 0x3868f: 0x6d095220, + 0x38690: 0x6d63e420, 0x38691: 0x6db1be20, 0x38692: 0x6e004a20, 0x38693: 0x6c5e7c20, + 0x38694: 0x6cac5020, 0x38695: 0x6cac5220, 0x38696: 0x6cac5420, 0x38697: 0x6cac5620, + 0x38698: 0x6cac5820, 0x38699: 0x6cac5a20, 0x3869a: 0x6cdaee20, 0x3869b: 0x6d095420, + 0x3869c: 0x6d095620, 0x3869d: 0x6d095820, 0x3869e: 0x6d377420, 0x3869f: 0x6d377620, + 0x386a0: 0x6d377820, 0x386a1: 0x6d377a20, 0x386a2: 0x6d377c20, 0x386a3: 0x6d377e20, + 0x386a4: 0x6d63e620, 0x386a5: 0x6d63e820, 0x386a6: 0x6d63ea20, 0x386a7: 0x6d63ec20, + 0x386a8: 0x6d63ee20, 0x386a9: 0x6d63f020, 0x386aa: 0x6d8dce20, 0x386ab: 0x6d8dd020, + 0x386ac: 0x6d8dd220, 0x386ad: 0x6d8dd420, 0x386ae: 0x6d8dd620, 0x386af: 0x6e004c20, + 0x386b0: 0x6e004e20, 0x386b1: 0x6e005020, 0x386b2: 0x6e39c220, 0x386b3: 0x6c0a5a20, + 0x386b4: 0x6c0a5c20, 0x386b5: 0x6c0a5e20, 0x386b6: 0x6c14b020, 0x386b7: 0x6c14b220, + 0x386b8: 0x6c14b420, 0x386b9: 0x6c14b620, 0x386ba: 0x6c14b820, 0x386bb: 0x6c14ba20, + 0x386bc: 0x6c14bc20, 0x386bd: 0x6c14be20, 0x386be: 0x6c14c020, 0x386bf: 0x6c14c220, + // Block 0xe1b, offset 0x386c0 + 0x386c0: 0x6c14c420, 0x386c1: 0x6c266020, 0x386c2: 0x6c266220, 0x386c3: 0x6c266420, + 0x386c4: 0x6c266620, 0x386c5: 0x6c266820, 0x386c6: 0x6c266a20, 0x386c7: 0x6c266c20, + 0x386c8: 0x6c266e20, 0x386c9: 0x6c267020, 0x386ca: 0x6c267220, 0x386cb: 0x6c267420, + 0x386cc: 0x6c267620, 0x386cd: 0x6c267820, 0x386ce: 0x6c267a20, 0x386cf: 0x6c267c20, + 0x386d0: 0x6c267e20, 0x386d1: 0x6c268020, 0x386d2: 0x6c268220, 0x386d3: 0x6c3fba20, + 0x386d4: 0x6c3fbc20, 0x386d5: 0x6c3fbe20, 0x386d6: 0x6c3fc020, 0x386d7: 0x6c3fc220, + 0x386d8: 0x6c3fc420, 0x386d9: 0x6c3fc620, 0x386da: 0x6c3fc820, 0x386db: 0x6c3fca20, + 0x386dc: 0x6c3fcc20, 0x386dd: 0x6c3fce20, 0x386de: 0x6c3fd020, 0x386df: 0x6c3fd220, + 0x386e0: 0x6c3fd420, 0x386e1: 0x6c3fd620, 0x386e2: 0x6c3fd820, 0x386e3: 0x6c3fda20, + 0x386e4: 0x6c3fdc20, 0x386e5: 0x6c3fde20, 0x386e6: 0x6c3fe020, 0x386e7: 0x6c3fe220, + 0x386e8: 0x6c3fe420, 0x386e9: 0x6c3fe620, 0x386ea: 0x6c3fe820, 0x386eb: 0x6c3fea20, + 0x386ec: 0x6c3fec20, 0x386ed: 0x6c3fee20, 0x386ee: 0x6c3ff020, 0x386ef: 0x6c3ff220, + 0x386f0: 0x6c3ff420, 0x386f1: 0x6c3ff620, 0x386f2: 0x6c3ff820, 0x386f3: 0x6c3ffa20, + 0x386f4: 0x6c3ffc20, 0x386f5: 0x6c3ffe20, 0x386f6: 0x6c400020, 0x386f7: 0x6c5f1220, + 0x386f8: 0x6c5f1420, 0x386f9: 0x6c5f1620, 0x386fa: 0x6c5f1820, 0x386fb: 0x6c5f1a20, + 0x386fc: 0x6c5f1c20, 0x386fd: 0x6c5f1e20, 0x386fe: 0x6c5f2020, 0x386ff: 0x6c5f2220, + // Block 0xe1c, offset 0x38700 + 0x38700: 0x6c5f2420, 0x38701: 0x6c5f2620, 0x38702: 0x6c5f2820, 0x38703: 0x6c5f2a20, + 0x38704: 0x6c5f2c20, 0x38705: 0x6c5f2e20, 0x38706: 0x6c5f3020, 0x38707: 0x6c5f3220, + 0x38708: 0x6c5f3420, 0x38709: 0x6c5f3620, 0x3870a: 0x6c5f3820, 0x3870b: 0x6c5f3a20, + 0x3870c: 0x6c5f3c20, 0x3870d: 0x6c5f3e20, 0x3870e: 0x6c5f4020, 0x3870f: 0x6c5f4220, + 0x38710: 0x6c5f4420, 0x38711: 0x6c5f4620, 0x38712: 0x6c5f4820, 0x38713: 0x6c5f4a20, + 0x38714: 0x6c5f4c20, 0x38715: 0x6c5f4e20, 0x38716: 0x6c5f5020, 0x38717: 0x6c5f5220, + 0x38718: 0x6c5f5420, 0x38719: 0x6c5f5620, 0x3871a: 0x6c5f5820, 0x3871b: 0x6c5f5a20, + 0x3871c: 0x6c5f5c20, 0x3871d: 0x6c5f5e20, 0x3871e: 0x6c5f6020, 0x3871f: 0x6c5f6220, + 0x38720: 0x6c5f6420, 0x38721: 0x6c5f6620, 0x38722: 0x6c5f6820, 0x38723: 0x6c5f6a20, + 0x38724: 0x6c5f6c20, 0x38725: 0x6c5f6e20, 0x38726: 0x6c5f7020, 0x38727: 0x6c5f7220, + 0x38728: 0x6c5f7420, 0x38729: 0x6c5f7620, 0x3872a: 0x6c5f7820, 0x3872b: 0x6c5f7a20, + 0x3872c: 0x6c5f7c20, 0x3872d: 0x6c841e20, 0x3872e: 0x6c842020, 0x3872f: 0x6c842220, + 0x38730: 0x6c842420, 0x38731: 0x6c842620, 0x38732: 0x6c842820, 0x38733: 0x6c842a20, + 0x38734: 0x6c842c20, 0x38735: 0x6c842e20, 0x38736: 0x6c843020, 0x38737: 0x6c843220, + 0x38738: 0x6c843420, 0x38739: 0x6c843620, 0x3873a: 0x6c843820, 0x3873b: 0x6c843a20, + 0x3873c: 0x6c843c20, 0x3873d: 0x6c843e20, 0x3873e: 0x6c844020, 0x3873f: 0x6c844220, + // Block 0xe1d, offset 0x38740 + 0x38740: 0x6c844420, 0x38741: 0x6c844620, 0x38742: 0x6c844820, 0x38743: 0x6c844a20, + 0x38744: 0x6c844c20, 0x38745: 0x6c844e20, 0x38746: 0x6c845020, 0x38747: 0x6c845220, + 0x38748: 0x6c845420, 0x38749: 0x6c845620, 0x3874a: 0x6c845820, 0x3874b: 0x6c845a20, + 0x3874c: 0x6c845c20, 0x3874d: 0x6c845e20, 0x3874e: 0x6c846020, 0x3874f: 0x6c846220, + 0x38750: 0x6c846420, 0x38751: 0x6c846620, 0x38752: 0x6c846820, 0x38753: 0x6c846a20, + 0x38754: 0x6c846c20, 0x38755: 0x6c846e20, 0x38756: 0x6c847020, 0x38757: 0x6c847220, + 0x38758: 0x6c847420, 0x38759: 0x6c847620, 0x3875a: 0x6c847820, 0x3875b: 0x6c847a20, + 0x3875c: 0x6c847c20, 0x3875d: 0x6c847e20, 0x3875e: 0x6c848020, 0x3875f: 0x6c848220, + 0x38760: 0x6c848420, 0x38761: 0x6c848620, 0x38762: 0x6c848820, 0x38763: 0x6c848a20, + 0x38764: 0x6c848c20, 0x38765: 0x6c848e20, 0x38766: 0x6c849020, 0x38767: 0x6c849220, + 0x38768: 0x6c849420, 0x38769: 0x6c849620, 0x3876a: 0x6c849820, 0x3876b: 0x6c849a20, + 0x3876c: 0x6c849c20, 0x3876d: 0x6c849e20, 0x3876e: 0x6c84a020, 0x3876f: 0x6c84a220, + 0x38770: 0x6c84a420, 0x38771: 0x6c84a620, 0x38772: 0x6c84a820, 0x38773: 0x6c84aa20, + 0x38774: 0x6c84ac20, 0x38775: 0x6c84ae20, 0x38776: 0x6cad1020, 0x38777: 0x6cad1220, + 0x38778: 0x6cad1420, 0x38779: 0x6cad1620, 0x3877a: 0x6cad1820, 0x3877b: 0x6cad1a20, + 0x3877c: 0x6cad1c20, 0x3877d: 0x6cad1e20, 0x3877e: 0x6cad2020, 0x3877f: 0x6cad2220, + // Block 0xe1e, offset 0x38780 + 0x38780: 0x6cad2420, 0x38781: 0x6cad2620, 0x38782: 0x6cad2820, 0x38783: 0x6cad2a20, + 0x38784: 0x6cad2c20, 0x38785: 0x6cad2e20, 0x38786: 0x6cad3020, 0x38787: 0x6cad3220, + 0x38788: 0x6cad3420, 0x38789: 0x6cad3620, 0x3878a: 0x6cad3820, 0x3878b: 0x6cad3a20, + 0x3878c: 0x6cad3c20, 0x3878d: 0x6cad3e20, 0x3878e: 0x6cad4020, 0x3878f: 0x6cad4220, + 0x38790: 0x6cad4420, 0x38791: 0x6cad4620, 0x38792: 0x6cad4820, 0x38793: 0x6cad4a20, + 0x38794: 0x6cad4c20, 0x38795: 0x6cad4e20, 0x38796: 0x6cad5020, 0x38797: 0x6cad5220, + 0x38798: 0x6cad5420, 0x38799: 0x6cad5620, 0x3879a: 0x6cad5820, 0x3879b: 0x6cad5a20, + 0x3879c: 0x6cad5c20, 0x3879d: 0x6cad5e20, 0x3879e: 0x6cad6020, 0x3879f: 0x6cad6220, + 0x387a0: 0x6cad6420, 0x387a1: 0x6cad6620, 0x387a2: 0x6cad6820, 0x387a3: 0x6cad6a20, + 0x387a4: 0x6cad6c20, 0x387a5: 0x6cad6e20, 0x387a6: 0x6cad7020, 0x387a7: 0x6cad7220, + 0x387a8: 0x6cad7420, 0x387a9: 0x6cad7620, 0x387aa: 0x6cad7820, 0x387ab: 0x6cad7a20, + 0x387ac: 0x6cad7c20, 0x387ad: 0x6cad7e20, 0x387ae: 0x6cad8020, 0x387af: 0x6cad8220, + 0x387b0: 0x6cad8420, 0x387b1: 0x6cdbf020, 0x387b2: 0x6cad8620, 0x387b3: 0x6cad8820, + 0x387b4: 0x6cad8a20, 0x387b5: 0x6cad8c20, 0x387b6: 0x6cad8e20, 0x387b7: 0x6cad9020, + 0x387b8: 0x6cad9220, 0x387b9: 0x6cad9420, 0x387ba: 0x6cad9620, 0x387bb: 0x6cad9820, + 0x387bc: 0x6cad9a20, 0x387bd: 0x6cad9c20, 0x387be: 0x6cad9e20, 0x387bf: 0x6cada020, + // Block 0xe1f, offset 0x387c0 + 0x387c0: 0x6cada220, 0x387c1: 0x6cada420, 0x387c2: 0x6cada620, 0x387c3: 0x6cada820, + 0x387c4: 0x6cadaa20, 0x387c5: 0x6cadac20, 0x387c6: 0x6cadae20, 0x387c7: 0x6cadb020, + 0x387c8: 0x6cadb220, 0x387c9: 0x6cadb420, 0x387ca: 0x6cadb620, 0x387cb: 0x6cadb820, + 0x387cc: 0x6cadba20, 0x387cd: 0x6cadbc20, 0x387ce: 0x6cadbe20, 0x387cf: 0x6cadc020, + 0x387d0: 0x6cadc220, 0x387d1: 0x6cadc420, 0x387d2: 0x6cadc620, 0x387d3: 0x6cadc820, + 0x387d4: 0x6cadca20, 0x387d5: 0x6cadcc20, 0x387d6: 0x6cdbf220, 0x387d7: 0x6cadce20, + 0x387d8: 0x6cadd020, 0x387d9: 0x6cadd220, 0x387da: 0x6cadd420, 0x387db: 0x6cadd620, + 0x387dc: 0x6cadd820, 0x387dd: 0x6cadda20, 0x387de: 0x6caddc20, 0x387df: 0x6cadde20, + 0x387e0: 0x6cade020, 0x387e1: 0x6cade220, 0x387e2: 0x6cade420, 0x387e3: 0x6cade620, + 0x387e4: 0x6cade820, 0x387e5: 0x6cadea20, 0x387e6: 0x6cadec20, 0x387e7: 0x6cadee20, + 0x387e8: 0x6cadf020, 0x387e9: 0x6cadf220, 0x387ea: 0x6cdbf420, 0x387eb: 0x6cdbf620, + 0x387ec: 0x6cdbf820, 0x387ed: 0x6cdbfa20, 0x387ee: 0x6cdbfc20, 0x387ef: 0x6cdbfe20, + 0x387f0: 0x6cdc0020, 0x387f1: 0x6cdc0220, 0x387f2: 0x6cdc0420, 0x387f3: 0x6cdc0620, + 0x387f4: 0x6cdc0820, 0x387f5: 0x6cdc0a20, 0x387f6: 0x6cdc0c20, 0x387f7: 0x6cdc0e20, + 0x387f8: 0x6cdc1020, 0x387f9: 0x6cdc1220, 0x387fa: 0x6cdc1420, 0x387fb: 0x6cdc1620, + 0x387fc: 0x6cdc1820, 0x387fd: 0x6cdc1a20, 0x387fe: 0x6cdc1c20, 0x387ff: 0x6cdc1e20, + // Block 0xe20, offset 0x38800 + 0x38800: 0x6cdc2020, 0x38801: 0x6cdc2220, 0x38802: 0x6cdc2420, 0x38803: 0x6cdc2620, + 0x38804: 0x6cdc2820, 0x38805: 0x6cdc2a20, 0x38806: 0x6cdc2c20, 0x38807: 0x6cdc2e20, + 0x38808: 0x6cdc3020, 0x38809: 0x6cdc3220, 0x3880a: 0x6cdc3420, 0x3880b: 0x6cdc3620, + 0x3880c: 0x6cdc3820, 0x3880d: 0x6cdc3a20, 0x3880e: 0x6cdc3c20, 0x3880f: 0x6cdc3e20, + 0x38810: 0x6cdc4020, 0x38811: 0x6cdc4220, 0x38812: 0x6cdc4420, 0x38813: 0x6cdc4620, + 0x38814: 0x6cdc4820, 0x38815: 0x6cdc4a20, 0x38816: 0x6cdc4c20, 0x38817: 0x6cdc4e20, + 0x38818: 0x6cdc5020, 0x38819: 0x6cdc5220, 0x3881a: 0x6cdc5420, 0x3881b: 0x6cdc5620, + 0x3881c: 0x6cdc5820, 0x3881d: 0x6cdc5a20, 0x3881e: 0x6cdc5c20, 0x3881f: 0x6cdc5e20, + 0x38820: 0x6cdc6020, 0x38821: 0x6cdc6220, 0x38822: 0x6cdc6420, 0x38823: 0x6cdc6620, + 0x38824: 0x6cdc6820, 0x38825: 0x6cdc6a20, 0x38826: 0x6cdc6c20, 0x38827: 0x6cdc6e20, + 0x38828: 0x6cdc7020, 0x38829: 0x6cdc7220, 0x3882a: 0x6cdc7420, 0x3882b: 0x6cdc7620, + 0x3882c: 0x6cdc7820, 0x3882d: 0x6cdc7a20, 0x3882e: 0x6cdc7c20, 0x3882f: 0x6cdc7e20, + 0x38830: 0x6cdc8020, 0x38831: 0x6cdc8220, 0x38832: 0x6cdc8420, 0x38833: 0x6cdc8620, + 0x38834: 0x6cdc8820, 0x38835: 0x6cdc8a20, 0x38836: 0x6cdc8c20, 0x38837: 0x6cdc8e20, + 0x38838: 0x6cdc9020, 0x38839: 0x6cdc9220, 0x3883a: 0x6cdc9420, 0x3883b: 0x6cdc9620, + 0x3883c: 0x6cdc9820, 0x3883d: 0x6cdc9a20, 0x3883e: 0x6cdc9c20, 0x3883f: 0x6cdc9e20, + // Block 0xe21, offset 0x38840 + 0x38840: 0x6cdca020, 0x38841: 0x6cdca220, 0x38842: 0x6cdca420, 0x38843: 0x6cdca620, + 0x38844: 0x6cdca820, 0x38845: 0x6cdcaa20, 0x38846: 0x6cdcac20, 0x38847: 0x6cdcae20, + 0x38848: 0x6cdcb020, 0x38849: 0x6cdcb220, 0x3884a: 0x6cdcb420, 0x3884b: 0x6cdcb620, + 0x3884c: 0x6cdcb820, 0x3884d: 0x6cdcba20, 0x3884e: 0x6cdcbc20, 0x3884f: 0x6cdcbe20, + 0x38850: 0x6cdcc020, 0x38851: 0x6cdcc220, 0x38852: 0x6cdcc420, 0x38853: 0x6cdcc620, + 0x38854: 0x6cdcc820, 0x38855: 0x6cdcca20, 0x38856: 0x6cdccc20, 0x38857: 0x6cdcce20, + 0x38858: 0x6cdcd020, 0x38859: 0x6cdcd220, 0x3885a: 0x6cdcd420, 0x3885b: 0x6cdcd620, + 0x3885c: 0x6cdcd820, 0x3885d: 0x6cdcda20, 0x3885e: 0x6cdcdc20, 0x3885f: 0x6cdcde20, + 0x38860: 0x6cdce020, 0x38861: 0x6cdce220, 0x38862: 0x6cdce420, 0x38863: 0x6cdce620, + 0x38864: 0x6cdce820, 0x38865: 0x6cdcea20, 0x38866: 0x6cdcec20, 0x38867: 0x6cdcee20, + 0x38868: 0x6cdcf020, 0x38869: 0x6cdcf220, 0x3886a: 0x6cdcf420, 0x3886b: 0x6cdcf620, + 0x3886c: 0x6cdcf820, 0x3886d: 0x6cdcfa20, 0x3886e: 0x6cdcfc20, 0x3886f: 0x6cdcfe20, + 0x38870: 0x6cdd0020, 0x38871: 0x6cdd0220, 0x38872: 0x6cdd0420, 0x38873: 0x6cdd0620, + 0x38874: 0x6cdd0820, 0x38875: 0x6cdd0a20, 0x38876: 0x6cdd0c20, 0x38877: 0x6cdd0e20, + 0x38878: 0x6cdd1020, 0x38879: 0x6cdd1220, 0x3887a: 0x6cdd1420, 0x3887b: 0x6cdd1620, + 0x3887c: 0x6cdd1820, 0x3887d: 0x6cdd1a20, 0x3887e: 0x6cdd1c20, 0x3887f: 0x6cdd1e20, + // Block 0xe22, offset 0x38880 + 0x38880: 0x6cdd2020, 0x38881: 0x6d0a5020, 0x38882: 0x6d0a5220, 0x38883: 0x6d0a5420, + 0x38884: 0x6d0a5620, 0x38885: 0x6d0a5820, 0x38886: 0x6d0a5a20, 0x38887: 0x6d0a5c20, + 0x38888: 0x6d0a5e20, 0x38889: 0x6d0a6020, 0x3888a: 0x6d0a6220, 0x3888b: 0x6d0a6420, + 0x3888c: 0x6d0a6620, 0x3888d: 0x6d0a6820, 0x3888e: 0x6d0a6a20, 0x3888f: 0x6d0a6c20, + 0x38890: 0x6d0a6e20, 0x38891: 0x6d0a7020, 0x38892: 0x6d0a7220, 0x38893: 0x6d0a7420, + 0x38894: 0x6d0a7620, 0x38895: 0x6d0a7820, 0x38896: 0x6d0a7a20, 0x38897: 0x6d0a7c20, + 0x38898: 0x6d0a7e20, 0x38899: 0x6d0a8020, 0x3889a: 0x6d0a8220, 0x3889b: 0x6d0a8420, + 0x3889c: 0x6d0a8620, 0x3889d: 0x6d0a8820, 0x3889e: 0x6d0a8a20, 0x3889f: 0x6d0a8c20, + 0x388a0: 0x6d0a8e20, 0x388a1: 0x6d0a9020, 0x388a2: 0x6d0a9220, 0x388a3: 0x6d0a9420, + 0x388a4: 0x6d0a9620, 0x388a5: 0x6d0a9820, 0x388a6: 0x6d0a9a20, 0x388a7: 0x6d0a9c20, + 0x388a8: 0x6d0a9e20, 0x388a9: 0x6d0aa020, 0x388aa: 0x6d0aa220, 0x388ab: 0x6d0aa420, + 0x388ac: 0x6d0aa620, 0x388ad: 0x6d0aa820, 0x388ae: 0x6d0aaa20, 0x388af: 0x6d0aac20, + 0x388b0: 0x6d0aae20, 0x388b1: 0x6d0ab020, 0x388b2: 0x6d0ab220, 0x388b3: 0x6d0ab420, + 0x388b4: 0x6d0ab620, 0x388b5: 0x6d0ab820, 0x388b6: 0x6d0aba20, 0x388b7: 0x6d0abc20, + 0x388b8: 0x6d0abe20, 0x388b9: 0x6d0ac020, 0x388ba: 0x6d0ac220, 0x388bb: 0x6d0ac420, + 0x388bc: 0x6d0ac620, 0x388bd: 0x6d0ac820, 0x388be: 0x6d0aca20, 0x388bf: 0x6d0acc20, + // Block 0xe23, offset 0x388c0 + 0x388c0: 0x6d0ace20, 0x388c1: 0x6d0ad020, 0x388c2: 0x6d0ad220, 0x388c3: 0x6d0ad420, + 0x388c4: 0x6d0ad620, 0x388c5: 0x6d0ad820, 0x388c6: 0x6d0ada20, 0x388c7: 0x6d0adc20, + 0x388c8: 0x6d0ade20, 0x388c9: 0x6d0ae020, 0x388ca: 0x6d0ae220, 0x388cb: 0x6d0ae420, + 0x388cc: 0x6d0ae620, 0x388cd: 0x6d0ae820, 0x388ce: 0x6d0aea20, 0x388cf: 0x6d0aec20, + 0x388d0: 0x6d0aee20, 0x388d1: 0x6d0af020, 0x388d2: 0x6d0af220, 0x388d3: 0x6d0af420, + 0x388d4: 0x6d0af620, 0x388d5: 0x6d0af820, 0x388d6: 0x6d0afa20, 0x388d7: 0x6d0afc20, + 0x388d8: 0x6d0afe20, 0x388d9: 0x6d0b0020, 0x388da: 0x6d0b0220, 0x388db: 0x6d0b0420, + 0x388dc: 0x6d0b0620, 0x388dd: 0x6d0b0820, 0x388de: 0x6d0b0a20, 0x388df: 0x6d0b0c20, + 0x388e0: 0x6d0b0e20, 0x388e1: 0x6d0b1020, 0x388e2: 0x6d0b1220, 0x388e3: 0x6d0b1420, + 0x388e4: 0x6d0b1620, 0x388e5: 0x6d0b1820, 0x388e6: 0x6d0b1a20, 0x388e7: 0x6d0b1c20, + 0x388e8: 0x6d0b1e20, 0x388e9: 0x6d0b2020, 0x388ea: 0x6d0b2220, 0x388eb: 0x6d0b2420, + 0x388ec: 0x6d0b2620, 0x388ed: 0x6d0b2820, 0x388ee: 0x6d0b2a20, 0x388ef: 0x6d0b2c20, + 0x388f0: 0x6d0b2e20, 0x388f1: 0x6d0b3020, 0x388f2: 0x6d0b3220, 0x388f3: 0x6d0b3420, + 0x388f4: 0x6d0b3620, 0x388f5: 0x6d0b3820, 0x388f6: 0x6cfba420, 0x388f7: 0x6d0b3a20, + 0x388f8: 0x6d0b3c20, 0x388f9: 0x6d0b3e20, 0x388fa: 0x6d0b4020, 0x388fb: 0x6d0b4220, + 0x388fc: 0x6d0b4420, 0x388fd: 0x6d0b4620, 0x388fe: 0x6d0b4820, 0x388ff: 0x6d0b4a20, + // Block 0xe24, offset 0x38900 + 0x38900: 0x6d0b4c20, 0x38901: 0x6d0b4e20, 0x38902: 0x6d0b5020, 0x38903: 0x6d0b5220, + 0x38904: 0x6d0b5420, 0x38905: 0x6d0b5620, 0x38906: 0x6d0b5820, 0x38907: 0x6d385420, + 0x38908: 0x6d0b5a20, 0x38909: 0x6d0b5c20, 0x3890a: 0x6d0b5e20, 0x3890b: 0x6d0b6020, + 0x3890c: 0x6d0b6220, 0x3890d: 0x6d0b6420, 0x3890e: 0x6d0b6620, 0x3890f: 0x6d0b6820, + 0x38910: 0x6d0b6a20, 0x38911: 0x6d0b6c20, 0x38912: 0x6d0b6e20, 0x38913: 0x6d0b7020, + 0x38914: 0x6d0b7220, 0x38915: 0x6d0b7420, 0x38916: 0x6d0b7620, 0x38917: 0x6d0b7820, + 0x38918: 0x6d0b7a20, 0x38919: 0x6d0b7c20, 0x3891a: 0x6d0b7e20, 0x3891b: 0x6d0b8020, + 0x3891c: 0x6d0b8220, 0x3891d: 0x6d0b8420, 0x3891e: 0x6d0b8620, 0x3891f: 0x6d0b8820, + 0x38920: 0x6d0b8a20, 0x38921: 0x6d385620, 0x38922: 0x6d385820, 0x38923: 0x6d385a20, + 0x38924: 0x6d385c20, 0x38925: 0x6d385e20, 0x38926: 0x6d386020, 0x38927: 0x6d386220, + 0x38928: 0x6d386420, 0x38929: 0x6d386620, 0x3892a: 0x6d386820, 0x3892b: 0x6d386a20, + 0x3892c: 0x6d386c20, 0x3892d: 0x6d386e20, 0x3892e: 0x6d387020, 0x3892f: 0x6d387220, + 0x38930: 0x6d387420, 0x38931: 0x6d387620, 0x38932: 0x6d387820, 0x38933: 0x6d387a20, + 0x38934: 0x6d387c20, 0x38935: 0x6d387e20, 0x38936: 0x6d388020, 0x38937: 0x6d388220, + 0x38938: 0x6d388420, 0x38939: 0x6d388620, 0x3893a: 0x6d388820, 0x3893b: 0x6d388a20, + 0x3893c: 0x6d388c20, 0x3893d: 0x6d388e20, 0x3893e: 0x6d389020, 0x3893f: 0x6d389220, + // Block 0xe25, offset 0x38940 + 0x38940: 0x6d389420, 0x38941: 0x6d389620, 0x38942: 0x6d389820, 0x38943: 0x6d389a20, + 0x38944: 0x6d389c20, 0x38945: 0x6d389e20, 0x38946: 0x6d38a020, 0x38947: 0x6d38a220, + 0x38948: 0x6d38a420, 0x38949: 0x6d38a620, 0x3894a: 0x6d38a820, 0x3894b: 0x6d38aa20, + 0x3894c: 0x6d38ac20, 0x3894d: 0x6d38ae20, 0x3894e: 0x6d38b020, 0x3894f: 0x6d38b220, + 0x38950: 0x6d38b420, 0x38951: 0x6d38b620, 0x38952: 0x6d38b820, 0x38953: 0x6d38ba20, + 0x38954: 0x6d38bc20, 0x38955: 0x6d38be20, 0x38956: 0x6d38c020, 0x38957: 0x6d38c220, + 0x38958: 0x6d38c420, 0x38959: 0x6d38c620, 0x3895a: 0x6d38c820, 0x3895b: 0x6d38ca20, + 0x3895c: 0x6d38cc20, 0x3895d: 0x6d38ce20, 0x3895e: 0x6d38d020, 0x3895f: 0x6d38d220, + 0x38960: 0x6d38d420, 0x38961: 0x6d38d620, 0x38962: 0x6d38d820, 0x38963: 0x6d38da20, + 0x38964: 0x6d38dc20, 0x38965: 0x6d38de20, 0x38966: 0x6d38e020, 0x38967: 0x6d38e220, + 0x38968: 0x6d38e420, 0x38969: 0x6d38e620, 0x3896a: 0x6d38e820, 0x3896b: 0x6d38ea20, + 0x3896c: 0x6d38ec20, 0x3896d: 0x6d38ee20, 0x3896e: 0x6d38f020, 0x3896f: 0x6d38f220, + 0x38970: 0x6d38f420, 0x38971: 0x6d38f620, 0x38972: 0x6d38f820, 0x38973: 0x6d38fa20, + 0x38974: 0x6d38fc20, 0x38975: 0x6d38fe20, 0x38976: 0x6d390020, 0x38977: 0x6d390220, + 0x38978: 0x6d390420, 0x38979: 0x6d390620, 0x3897a: 0x6d390820, 0x3897b: 0x6d390a20, + 0x3897c: 0x6d390c20, 0x3897d: 0x6d390e20, 0x3897e: 0x6d391020, 0x3897f: 0x6d391220, + // Block 0xe26, offset 0x38980 + 0x38980: 0x6d391420, 0x38981: 0x6d391620, 0x38982: 0x6d391820, 0x38983: 0x6d391a20, + 0x38984: 0x6d391c20, 0x38985: 0x6d391e20, 0x38986: 0x6d392020, 0x38987: 0x6d392220, + 0x38988: 0x6d392420, 0x38989: 0x6d392620, 0x3898a: 0x6d392820, 0x3898b: 0x6d392a20, + 0x3898c: 0x6d392c20, 0x3898d: 0x6d392e20, 0x3898e: 0x6d393020, 0x3898f: 0x6d393220, + 0x38990: 0x6d393420, 0x38991: 0x6d393620, 0x38992: 0x6d393820, 0x38993: 0x6d393a20, + 0x38994: 0x6d393c20, 0x38995: 0x6d393e20, 0x38996: 0x6d394020, 0x38997: 0x6d394220, + 0x38998: 0x6d394420, 0x38999: 0x6d394620, 0x3899a: 0x6d394820, 0x3899b: 0x6d394a20, + 0x3899c: 0x6d394c20, 0x3899d: 0x6d394e20, 0x3899e: 0x6d395020, 0x3899f: 0x6d395220, + 0x389a0: 0x6d395420, 0x389a1: 0x6d395620, 0x389a2: 0x6d395820, 0x389a3: 0x6d395a20, + 0x389a4: 0x6d395c20, 0x389a5: 0x6d395e20, 0x389a6: 0x6d396020, 0x389a7: 0x6d396220, + 0x389a8: 0x6d396420, 0x389a9: 0x6d396620, 0x389aa: 0x6d396820, 0x389ab: 0x6d396a20, + 0x389ac: 0x6d396c20, 0x389ad: 0x6d396e20, 0x389ae: 0x6d397020, 0x389af: 0x6d397220, + 0x389b0: 0x6d397420, 0x389b1: 0x6d397620, 0x389b2: 0x6d397820, 0x389b3: 0x6d397a20, + 0x389b4: 0x6d397c20, 0x389b5: 0x6d397e20, 0x389b6: 0x6d398020, 0x389b7: 0x6d398220, + 0x389b8: 0x6d398420, 0x389b9: 0x6d398620, 0x389ba: 0x6d398820, 0x389bb: 0x6d398a20, + 0x389bc: 0x6d398c20, 0x389bd: 0x6d398e20, 0x389be: 0x6d399020, 0x389bf: 0x6d64ba20, + // Block 0xe27, offset 0x389c0 + 0x389c0: 0x6d64bc20, 0x389c1: 0x6d64be20, 0x389c2: 0x6d64c020, 0x389c3: 0x6d64c220, + 0x389c4: 0x6d64c420, 0x389c5: 0x6d64c620, 0x389c6: 0x6d64c820, 0x389c7: 0x6d64ca20, + 0x389c8: 0x6d64cc20, 0x389c9: 0x6d64ce20, 0x389ca: 0x6d64d020, 0x389cb: 0x6d64d220, + 0x389cc: 0x6d64d420, 0x389cd: 0x6d64d620, 0x389ce: 0x6d64d820, 0x389cf: 0x6d64da20, + 0x389d0: 0x6d64dc20, 0x389d1: 0x6d64de20, 0x389d2: 0x6d64e020, 0x389d3: 0x6d64e220, + 0x389d4: 0x6d64e420, 0x389d5: 0x6d64e620, 0x389d6: 0x6d64e820, 0x389d7: 0x6d64ea20, + 0x389d8: 0x6d64ec20, 0x389d9: 0x6d64ee20, 0x389da: 0x6d64f020, 0x389db: 0x6d64f220, + 0x389dc: 0x6d64f420, 0x389dd: 0x6d64f620, 0x389de: 0x6d64f820, 0x389df: 0x6d64fa20, + 0x389e0: 0x6d64fc20, 0x389e1: 0x6d64fe20, 0x389e2: 0x6d650020, 0x389e3: 0x6d650220, + 0x389e4: 0x6d650420, 0x389e5: 0x6d650620, 0x389e6: 0x6d650820, 0x389e7: 0x6d650a20, + 0x389e8: 0x6d650c20, 0x389e9: 0x6d650e20, 0x389ea: 0x6d651020, 0x389eb: 0x6d651220, + 0x389ec: 0x6d651420, 0x389ed: 0x6d651620, 0x389ee: 0x6d651820, 0x389ef: 0x6d651a20, + 0x389f0: 0x6d651c20, 0x389f1: 0x6d651e20, 0x389f2: 0x6d652020, 0x389f3: 0x6d652220, + 0x389f4: 0x6d652420, 0x389f5: 0x6d652620, 0x389f6: 0x6d652820, 0x389f7: 0x6d652a20, + 0x389f8: 0x6d652c20, 0x389f9: 0x6d652e20, 0x389fa: 0x6d653020, 0x389fb: 0x6d653220, + 0x389fc: 0x6d653420, 0x389fd: 0x6d8e6c20, 0x389fe: 0x6d653620, 0x389ff: 0x6d653820, + // Block 0xe28, offset 0x38a00 + 0x38a00: 0x6d653a20, 0x38a01: 0x6d653c20, 0x38a02: 0x6d653e20, 0x38a03: 0x6d654020, + 0x38a04: 0x6d654220, 0x38a05: 0x6d654420, 0x38a06: 0x6d654620, 0x38a07: 0x6d654820, + 0x38a08: 0x6d654a20, 0x38a09: 0x6d654c20, 0x38a0a: 0x6d654e20, 0x38a0b: 0x6d655020, + 0x38a0c: 0x6d655220, 0x38a0d: 0x6d655420, 0x38a0e: 0x6d655620, 0x38a0f: 0x6d655820, + 0x38a10: 0x6d655a20, 0x38a11: 0x6d655c20, 0x38a12: 0x6d655e20, 0x38a13: 0x6d656020, + 0x38a14: 0x6d656220, 0x38a15: 0x6d656420, 0x38a16: 0x6d656620, 0x38a17: 0x6d656820, + 0x38a18: 0x6d656a20, 0x38a19: 0x6d656c20, 0x38a1a: 0x6d656e20, 0x38a1b: 0x6d657020, + 0x38a1c: 0x6d657220, 0x38a1d: 0x6d657420, 0x38a1e: 0x6d657620, 0x38a1f: 0x6d657820, + 0x38a20: 0x6d657a20, 0x38a21: 0x6d657c20, 0x38a22: 0x6d657e20, 0x38a23: 0x6d658020, + 0x38a24: 0x6d658220, 0x38a25: 0x6d658420, 0x38a26: 0x6d658620, 0x38a27: 0x6d658820, + 0x38a28: 0x6d658a20, 0x38a29: 0x6d658c20, 0x38a2a: 0x6d658e20, 0x38a2b: 0x6d659020, + 0x38a2c: 0x6d659220, 0x38a2d: 0x6d659420, 0x38a2e: 0x6d659620, 0x38a2f: 0x6d659820, + 0x38a30: 0x6d659a20, 0x38a31: 0x6d659c20, 0x38a32: 0x6d659e20, 0x38a33: 0x6d65a020, + 0x38a34: 0x6d65a220, 0x38a35: 0x6d65a420, 0x38a36: 0x6d65a620, 0x38a37: 0x6d65a820, + 0x38a38: 0x6d65aa20, 0x38a39: 0x6d65ac20, 0x38a3a: 0x6d65ae20, 0x38a3b: 0x6d65b020, + 0x38a3c: 0x6d65b220, 0x38a3d: 0x6d65b420, 0x38a3e: 0x6d65b620, 0x38a3f: 0x6d65b820, + // Block 0xe29, offset 0x38a40 + 0x38a40: 0x6d65ba20, 0x38a41: 0x6d65bc20, 0x38a42: 0x6d65be20, 0x38a43: 0x6d65c020, + 0x38a44: 0x6d65c220, 0x38a45: 0x6e454c20, 0x38a46: 0x6d8e6e20, 0x38a47: 0x6d8e7020, + 0x38a48: 0x6d8e7220, 0x38a49: 0x6d8e7420, 0x38a4a: 0x6d8e7620, 0x38a4b: 0x6d8e7820, + 0x38a4c: 0x6d8e7a20, 0x38a4d: 0x6d8e7c20, 0x38a4e: 0x6d8e7e20, 0x38a4f: 0x6d8e8020, + 0x38a50: 0x6d8e8220, 0x38a51: 0x6d8e8420, 0x38a52: 0x6d8e8620, 0x38a53: 0x6d8e8820, + 0x38a54: 0x6d8e8a20, 0x38a55: 0x6d8e8c20, 0x38a56: 0x6d8e8e20, 0x38a57: 0x6d8e9020, + 0x38a58: 0x6d8e9220, 0x38a59: 0x6d8e9420, 0x38a5a: 0x6d8e9620, 0x38a5b: 0x6d8e9820, + 0x38a5c: 0x6d8e9a20, 0x38a5d: 0x6d8e9c20, 0x38a5e: 0x6d8e9e20, 0x38a5f: 0x6d8ea020, + 0x38a60: 0x6d8ea220, 0x38a61: 0x6d8ea420, 0x38a62: 0x6d8ea620, 0x38a63: 0x6d8ea820, + 0x38a64: 0x6d8eaa20, 0x38a65: 0x6d8eac20, 0x38a66: 0x6d8eae20, 0x38a67: 0x6d8eb020, + 0x38a68: 0x6d8eb220, 0x38a69: 0x6d8eb420, 0x38a6a: 0x6d8eb620, 0x38a6b: 0x6d8eb820, + 0x38a6c: 0x6d8eba20, 0x38a6d: 0x6d8ebc20, 0x38a6e: 0x6d8ebe20, 0x38a6f: 0x6d8ec020, + 0x38a70: 0x6d8ec220, 0x38a71: 0x6d8ec420, 0x38a72: 0x6d8ec620, 0x38a73: 0x6d8ec820, + 0x38a74: 0x6d8eca20, 0x38a75: 0x6d8ecc20, 0x38a76: 0x6d8ece20, 0x38a77: 0x6d8ed020, + 0x38a78: 0x6d8ed220, 0x38a79: 0x6d8ed420, 0x38a7a: 0x6d8ed620, 0x38a7b: 0x6d8ed820, + 0x38a7c: 0x6d8eda20, 0x38a7d: 0x6d8edc20, 0x38a7e: 0x6d8ede20, 0x38a7f: 0x6d8ee020, + // Block 0xe2a, offset 0x38a80 + 0x38a80: 0x6d8ee220, 0x38a81: 0x6d8ee420, 0x38a82: 0x6d8ee620, 0x38a83: 0x6d8ee820, + 0x38a84: 0x6d8eea20, 0x38a85: 0x6d8eec20, 0x38a86: 0x6d8eee20, 0x38a87: 0x6dc5f420, + 0x38a88: 0x6d8ef020, 0x38a89: 0x6d8ef220, 0x38a8a: 0x6d8ef420, 0x38a8b: 0x6d8ef620, + 0x38a8c: 0x6d8ef820, 0x38a8d: 0x6d8efa20, 0x38a8e: 0x6d8efc20, 0x38a8f: 0x6d8efe20, + 0x38a90: 0x6d8f0020, 0x38a91: 0x6d8f0220, 0x38a92: 0x6d8f0420, 0x38a93: 0x6d8f0620, + 0x38a94: 0x6d8f0820, 0x38a95: 0x6d8f0a20, 0x38a96: 0x6d8f0c20, 0x38a97: 0x6d8f0e20, + 0x38a98: 0x6d8f1020, 0x38a99: 0x6d8f1220, 0x38a9a: 0x6d8f1420, 0x38a9b: 0x6d8f1620, + 0x38a9c: 0x6d8f1820, 0x38a9d: 0x6d8f1a20, 0x38a9e: 0x6d8f1c20, 0x38a9f: 0x6d8f1e20, + 0x38aa0: 0x6d8f2020, 0x38aa1: 0x6d8f2220, 0x38aa2: 0x6d8f2420, 0x38aa3: 0x6d8f2620, + 0x38aa4: 0x6d8f2820, 0x38aa5: 0x6d8f2a20, 0x38aa6: 0x6d8f2c20, 0x38aa7: 0x6d8f2e20, + 0x38aa8: 0x6d8f3020, 0x38aa9: 0x6d8f3220, 0x38aaa: 0x6d8f3420, 0x38aab: 0x6d8f3620, + 0x38aac: 0x6d8f3820, 0x38aad: 0x6d8f3a20, 0x38aae: 0x6d8f3c20, 0x38aaf: 0x6d8f3e20, + 0x38ab0: 0x6d8f4020, 0x38ab1: 0x6d8f4220, 0x38ab2: 0x6d8f4420, 0x38ab3: 0x6d8f4620, + 0x38ab4: 0x6d8f4820, 0x38ab5: 0x6d8f4a20, 0x38ab6: 0x6d8f4c20, 0x38ab7: 0x6d8f4e20, + 0x38ab8: 0x6d8f5020, 0x38ab9: 0x6d8f5220, 0x38aba: 0x6d8f5420, 0x38abb: 0x6d8f5620, + 0x38abc: 0x6d8f5820, 0x38abd: 0x6d8f5a20, 0x38abe: 0x6db26e20, 0x38abf: 0x6d8f5c20, + // Block 0xe2b, offset 0x38ac0 + 0x38ac0: 0x6d8f5e20, 0x38ac1: 0x6d8f6020, 0x38ac2: 0x6d8f6220, 0x38ac3: 0x6d8f6420, + 0x38ac4: 0x6d8f6620, 0x38ac5: 0x6d8f6820, 0x38ac6: 0x6d8f6a20, 0x38ac7: 0x6d8f6c20, + 0x38ac8: 0x6d8f6e20, 0x38ac9: 0x6d8f7020, 0x38aca: 0x6d8f7220, 0x38acb: 0x6d8f7420, + 0x38acc: 0x6d8f7620, 0x38acd: 0x6d8f7820, 0x38ace: 0x6d8f7a20, 0x38acf: 0x6d8f7c20, + 0x38ad0: 0x6d8f7e20, 0x38ad1: 0x6d8f8020, 0x38ad2: 0x6d8f8220, 0x38ad3: 0x6d8f8420, + 0x38ad4: 0x6d8f8620, 0x38ad5: 0x6d8f8820, 0x38ad6: 0x6d8f8a20, 0x38ad7: 0x6d8f8c20, + 0x38ad8: 0x6d8f8e20, 0x38ad9: 0x6d8f9020, 0x38ada: 0x6d8f9220, 0x38adb: 0x6d8f9420, + 0x38adc: 0x6d8f9620, 0x38add: 0x6d8f9820, 0x38ade: 0x6d8f9a20, 0x38adf: 0x6d8f9c20, + 0x38ae0: 0x6d8f9e20, 0x38ae1: 0x6d8fa020, 0x38ae2: 0x6d8fa220, 0x38ae3: 0x6d8fa420, + 0x38ae4: 0x6d8fa620, 0x38ae5: 0x6d8fa820, 0x38ae6: 0x6d8faa20, 0x38ae7: 0x6d8fac20, + 0x38ae8: 0x6d8fae20, 0x38ae9: 0x6db27020, 0x38aea: 0x6db27220, 0x38aeb: 0x6db27420, + 0x38aec: 0x6db27620, 0x38aed: 0x6db27820, 0x38aee: 0x6db27a20, 0x38aef: 0x6db27c20, + 0x38af0: 0x6db27e20, 0x38af1: 0x6db28020, 0x38af2: 0x6db28220, 0x38af3: 0x6db28420, + 0x38af4: 0x6db28620, 0x38af5: 0x6db28820, 0x38af6: 0x6db28a20, 0x38af7: 0x6db28c20, + 0x38af8: 0x6db28e20, 0x38af9: 0x6db29020, 0x38afa: 0x6db29220, 0x38afb: 0x6db29420, + 0x38afc: 0x6db29620, 0x38afd: 0x6db29820, 0x38afe: 0x6db29a20, 0x38aff: 0x6db29c20, + // Block 0xe2c, offset 0x38b00 + 0x38b00: 0x6db29e20, 0x38b01: 0x6db2a020, 0x38b02: 0x6db2a220, 0x38b03: 0x6db2a420, + 0x38b04: 0x6db2a620, 0x38b05: 0x6db2a820, 0x38b06: 0x6db2aa20, 0x38b07: 0x6db2ac20, + 0x38b08: 0x6db2ae20, 0x38b09: 0x6db2b020, 0x38b0a: 0x6db2b220, 0x38b0b: 0x6db2b420, + 0x38b0c: 0x6db2b620, 0x38b0d: 0x6db2b820, 0x38b0e: 0x6db2ba20, 0x38b0f: 0x6db2bc20, + 0x38b10: 0x6db2be20, 0x38b11: 0x6db2c020, 0x38b12: 0x6db2c220, 0x38b13: 0x6db2c420, + 0x38b14: 0x6db2c620, 0x38b15: 0x6db2c820, 0x38b16: 0x6db2ca20, 0x38b17: 0x6db2cc20, + 0x38b18: 0x6db2ce20, 0x38b19: 0x6db2d020, 0x38b1a: 0x6db2d220, 0x38b1b: 0x6db2d420, + 0x38b1c: 0x6db2d620, 0x38b1d: 0x6db2d820, 0x38b1e: 0x6db2da20, 0x38b1f: 0x6db2dc20, + 0x38b20: 0x6db2de20, 0x38b21: 0x6db2e020, 0x38b22: 0x6db2e220, 0x38b23: 0x6db2e420, + 0x38b24: 0x6db2e620, 0x38b25: 0x6db2e820, 0x38b26: 0x6db2ea20, 0x38b27: 0x6db2ec20, + 0x38b28: 0x6db2ee20, 0x38b29: 0x6db2f020, 0x38b2a: 0x6db2f220, 0x38b2b: 0x6db2f420, + 0x38b2c: 0x6db2f620, 0x38b2d: 0x6d8fb020, 0x38b2e: 0x6db2f820, 0x38b2f: 0x6db2fa20, + 0x38b30: 0x6db2fc20, 0x38b31: 0x6db2fe20, 0x38b32: 0x6db30020, 0x38b33: 0x6db30220, + 0x38b34: 0x6db30420, 0x38b35: 0x6db30620, 0x38b36: 0x6db30820, 0x38b37: 0x6db30a20, + 0x38b38: 0x6db30c20, 0x38b39: 0x6db30e20, 0x38b3a: 0x6db31020, 0x38b3b: 0x6db31220, + 0x38b3c: 0x6db31420, 0x38b3d: 0x6db31620, 0x38b3e: 0x6db31820, 0x38b3f: 0x6db31a20, + // Block 0xe2d, offset 0x38b40 + 0x38b40: 0x6db31c20, 0x38b41: 0x6db31e20, 0x38b42: 0x6db32020, 0x38b43: 0x6db32220, + 0x38b44: 0x6db32420, 0x38b45: 0x6db32620, 0x38b46: 0x6db32820, 0x38b47: 0x6db32a20, + 0x38b48: 0x6db32c20, 0x38b49: 0x6db32e20, 0x38b4a: 0x6db33020, 0x38b4b: 0x6db33220, + 0x38b4c: 0x6db33420, 0x38b4d: 0x6db33620, 0x38b4e: 0x6db33820, 0x38b4f: 0x6db33a20, + 0x38b50: 0x6db33c20, 0x38b51: 0x6db33e20, 0x38b52: 0x6db34020, 0x38b53: 0x6db34220, + 0x38b54: 0x6db34420, 0x38b55: 0x6db34620, 0x38b56: 0x6db34820, 0x38b57: 0x6db34a20, + 0x38b58: 0x6db34c20, 0x38b59: 0x6db34e20, 0x38b5a: 0x6db35020, 0x38b5b: 0x6db35220, + 0x38b5c: 0x6db35420, 0x38b5d: 0x6db35620, 0x38b5e: 0x6db35820, 0x38b5f: 0x6db35a20, + 0x38b60: 0x6db35c20, 0x38b61: 0x6db35e20, 0x38b62: 0x6db36020, 0x38b63: 0x6db36220, + 0x38b64: 0x6db36420, 0x38b65: 0x6db36620, 0x38b66: 0x6db36820, 0x38b67: 0x6db36a20, + 0x38b68: 0x6db36c20, 0x38b69: 0x6db36e20, 0x38b6a: 0x6dd19420, 0x38b6b: 0x6dd19620, + 0x38b6c: 0x6dd19820, 0x38b6d: 0x6dd19a20, 0x38b6e: 0x6dd19c20, 0x38b6f: 0x6dd19e20, + 0x38b70: 0x6dd1a020, 0x38b71: 0x6dd1a220, 0x38b72: 0x6dd1a420, 0x38b73: 0x6dd1a620, + 0x38b74: 0x6dd1a820, 0x38b75: 0x6dd1aa20, 0x38b76: 0x6dd1ac20, 0x38b77: 0x6dd1ae20, + 0x38b78: 0x6dd1b020, 0x38b79: 0x6dd1b220, 0x38b7a: 0x6dd1b420, 0x38b7b: 0x6dd1b620, + 0x38b7c: 0x6dd1b820, 0x38b7d: 0x6dd1ba20, 0x38b7e: 0x6dd1bc20, 0x38b7f: 0x6dd1be20, + // Block 0xe2e, offset 0x38b80 + 0x38b80: 0x6dd1c020, 0x38b81: 0x6dd1c220, 0x38b82: 0x6dd1c420, 0x38b83: 0x6dd1c620, + 0x38b84: 0x6dd1c820, 0x38b85: 0x6dd1ca20, 0x38b86: 0x6dd1cc20, 0x38b87: 0x6dd1ce20, + 0x38b88: 0x6dd1d020, 0x38b89: 0x6dd1d220, 0x38b8a: 0x6dd1d420, 0x38b8b: 0x6dd1d620, + 0x38b8c: 0x6dd1d820, 0x38b8d: 0x6dd1da20, 0x38b8e: 0x6dd1dc20, 0x38b8f: 0x6dd1de20, + 0x38b90: 0x6dd1e020, 0x38b91: 0x6dd1e220, 0x38b92: 0x6dd1e420, 0x38b93: 0x6dd1e620, + 0x38b94: 0x6deb0220, 0x38b95: 0x6deb0420, 0x38b96: 0x6dd1e820, 0x38b97: 0x6dd1ea20, + 0x38b98: 0x6dd1ec20, 0x38b99: 0x6dd1ee20, 0x38b9a: 0x6dd1f020, 0x38b9b: 0x6dd1f220, + 0x38b9c: 0x6dd1f420, 0x38b9d: 0x6deb0620, 0x38b9e: 0x6dd1f620, 0x38b9f: 0x6dd1f820, + 0x38ba0: 0x6dd1fa20, 0x38ba1: 0x6db37020, 0x38ba2: 0x6dd1fc20, 0x38ba3: 0x6dd1fe20, + 0x38ba4: 0x6dd20020, 0x38ba5: 0x6dd20220, 0x38ba6: 0x6dd20420, 0x38ba7: 0x6dd20620, + 0x38ba8: 0x6dd20820, 0x38ba9: 0x6dd20a20, 0x38baa: 0x6dd20c20, 0x38bab: 0x6dd20e20, + 0x38bac: 0x6dd21020, 0x38bad: 0x6dd21220, 0x38bae: 0x6dd21420, 0x38baf: 0x6dd21620, + 0x38bb0: 0x6dd21820, 0x38bb1: 0x6dd21a20, 0x38bb2: 0x6dd21c20, 0x38bb3: 0x6dd21e20, + 0x38bb4: 0x6dd22020, 0x38bb5: 0x6dd22220, 0x38bb6: 0x6dd22420, 0x38bb7: 0x6dd22620, + 0x38bb8: 0x6db37220, 0x38bb9: 0x6dd22820, 0x38bba: 0x6dd22a20, 0x38bbb: 0x6dd22c20, + 0x38bbc: 0x6dd22e20, 0x38bbd: 0x6dd23020, 0x38bbe: 0x6dd23220, 0x38bbf: 0x6dd23420, + // Block 0xe2f, offset 0x38bc0 + 0x38bc0: 0x6dd23620, 0x38bc1: 0x6dd23820, 0x38bc2: 0x6dd23a20, 0x38bc3: 0x6dd23c20, + 0x38bc4: 0x6dd23e20, 0x38bc5: 0x6dd24020, 0x38bc6: 0x6dd24220, 0x38bc7: 0x6dd24420, + 0x38bc8: 0x6dd24620, 0x38bc9: 0x6dd24820, 0x38bca: 0x6dd24a20, 0x38bcb: 0x6dd24c20, + 0x38bcc: 0x6dd24e20, 0x38bcd: 0x6dd25020, 0x38bce: 0x6dd25220, 0x38bcf: 0x6dd25420, + 0x38bd0: 0x6dd25620, 0x38bd1: 0x6dd25820, 0x38bd2: 0x6dd25a20, 0x38bd3: 0x6dd25c20, + 0x38bd4: 0x6dd25e20, 0x38bd5: 0x6dd26020, 0x38bd6: 0x6dd26220, 0x38bd7: 0x6dd26420, + 0x38bd8: 0x6dd26620, 0x38bd9: 0x6dd26820, 0x38bda: 0x6dd26a20, 0x38bdb: 0x6dd26c20, + 0x38bdc: 0x6dd26e20, 0x38bdd: 0x6dd27020, 0x38bde: 0x6dd27220, 0x38bdf: 0x6dd27420, + 0x38be0: 0x6deb0820, 0x38be1: 0x6deb0a20, 0x38be2: 0x6deb0c20, 0x38be3: 0x6deb0e20, + 0x38be4: 0x6deb1020, 0x38be5: 0x6deb1220, 0x38be6: 0x6deb1420, 0x38be7: 0x6deb1620, + 0x38be8: 0x6deb1820, 0x38be9: 0x6deb1a20, 0x38bea: 0x6deb1c20, 0x38beb: 0x6deb1e20, + 0x38bec: 0x6deb2020, 0x38bed: 0x6deb2220, 0x38bee: 0x6deb2420, 0x38bef: 0x6deb2620, + 0x38bf0: 0x6deb2820, 0x38bf1: 0x6deb2a20, 0x38bf2: 0x6deb2c20, 0x38bf3: 0x6deb2e20, + 0x38bf4: 0x6deb3020, 0x38bf5: 0x6deb3220, 0x38bf6: 0x6deb3420, 0x38bf7: 0x6deb3620, + 0x38bf8: 0x6deb3820, 0x38bf9: 0x6deb3a20, 0x38bfa: 0x6deb3c20, 0x38bfb: 0x6deb3e20, + 0x38bfc: 0x6deb4020, 0x38bfd: 0x6deb4220, 0x38bfe: 0x6deb4420, 0x38bff: 0x6deb4620, + // Block 0xe30, offset 0x38c00 + 0x38c00: 0x6deb4820, 0x38c01: 0x6deb4a20, 0x38c02: 0x6deb4c20, 0x38c03: 0x6deb4e20, + 0x38c04: 0x6deb5020, 0x38c05: 0x6deb5220, 0x38c06: 0x6deb5420, 0x38c07: 0x6deb5620, + 0x38c08: 0x6deb5820, 0x38c09: 0x6deb5a20, 0x38c0a: 0x6deb5c20, 0x38c0b: 0x6deb5e20, + 0x38c0c: 0x6deb6020, 0x38c0d: 0x6deb6220, 0x38c0e: 0x6deb6420, 0x38c0f: 0x6deb6620, + 0x38c10: 0x6deb6820, 0x38c11: 0x6deb6a20, 0x38c12: 0x6deb6c20, 0x38c13: 0x6deb6e20, + 0x38c14: 0x6deb7020, 0x38c15: 0x6deb7220, 0x38c16: 0x6deb7420, 0x38c17: 0x6deb7620, + 0x38c18: 0x6deb7820, 0x38c19: 0x6deb7a20, 0x38c1a: 0x6deb7c20, 0x38c1b: 0x6deb7e20, + 0x38c1c: 0x6deb8020, 0x38c1d: 0x6deb8220, 0x38c1e: 0x6deb8420, 0x38c1f: 0x6deb8620, + 0x38c20: 0x6deb8820, 0x38c21: 0x6deb8a20, 0x38c22: 0x6deb8c20, 0x38c23: 0x6deb8e20, + 0x38c24: 0x6deb9020, 0x38c25: 0x6deb9220, 0x38c26: 0x6deb9420, 0x38c27: 0x6deb9620, + 0x38c28: 0x6deb9820, 0x38c29: 0x6deb9a20, 0x38c2a: 0x6deb9c20, 0x38c2b: 0x6deb9e20, + 0x38c2c: 0x6deba020, 0x38c2d: 0x6deba220, 0x38c2e: 0x6deba420, 0x38c2f: 0x6deba620, + 0x38c30: 0x6deba820, 0x38c31: 0x6debaa20, 0x38c32: 0x6debac20, 0x38c33: 0x6debae20, + 0x38c34: 0x6debb020, 0x38c35: 0x6debb220, 0x38c36: 0x6debb420, 0x38c37: 0x6debb620, + 0x38c38: 0x6debb820, 0x38c39: 0x6debba20, 0x38c3a: 0x6debbc20, 0x38c3b: 0x6e00a820, + 0x38c3c: 0x6e00aa20, 0x38c3d: 0x6e00ac20, 0x38c3e: 0x6e00ae20, 0x38c3f: 0x6e00b020, + // Block 0xe31, offset 0x38c40 + 0x38c40: 0x6e00b220, 0x38c41: 0x6e00b420, 0x38c42: 0x6e00b620, 0x38c43: 0x6e00b820, + 0x38c44: 0x6e00ba20, 0x38c45: 0x6e00bc20, 0x38c46: 0x6e00be20, 0x38c47: 0x6e00c020, + 0x38c48: 0x6e00c220, 0x38c49: 0x6e00c420, 0x38c4a: 0x6e00c620, 0x38c4b: 0x6e00c820, + 0x38c4c: 0x6e00ca20, 0x38c4d: 0x6e00cc20, 0x38c4e: 0x6e00ce20, 0x38c4f: 0x6e00d020, + 0x38c50: 0x6e00d220, 0x38c51: 0x6e00d420, 0x38c52: 0x6e00d620, 0x38c53: 0x6e00d820, + 0x38c54: 0x6e00da20, 0x38c55: 0x6e00dc20, 0x38c56: 0x6e00de20, 0x38c57: 0x6e00e020, + 0x38c58: 0x6e00e220, 0x38c59: 0x6e00e420, 0x38c5a: 0x6e00e620, 0x38c5b: 0x6e00e820, + 0x38c5c: 0x6e00ea20, 0x38c5d: 0x6e00ec20, 0x38c5e: 0x6e00ee20, 0x38c5f: 0x6e00f020, + 0x38c60: 0x6e00f220, 0x38c61: 0x6e00f420, 0x38c62: 0x6e00f620, 0x38c63: 0x6e00f820, + 0x38c64: 0x6e00fa20, 0x38c65: 0x6e00fc20, 0x38c66: 0x6e00fe20, 0x38c67: 0x6e010020, + 0x38c68: 0x6e010220, 0x38c69: 0x6e010420, 0x38c6a: 0x6e010620, 0x38c6b: 0x6e010820, + 0x38c6c: 0x6e010a20, 0x38c6d: 0x6e010c20, 0x38c6e: 0x6e010e20, 0x38c6f: 0x6e011020, + 0x38c70: 0x6e011220, 0x38c71: 0x6e011420, 0x38c72: 0x6e011620, 0x38c73: 0x6e011820, + 0x38c74: 0x6e011a20, 0x38c75: 0x6e011c20, 0x38c76: 0x6e011e20, 0x38c77: 0x6e012020, + 0x38c78: 0x6e012220, 0x38c79: 0x6e012420, 0x38c7a: 0x6e012620, 0x38c7b: 0x6e012820, + 0x38c7c: 0x6e012a20, 0x38c7d: 0x6e012c20, 0x38c7e: 0x6e012e20, 0x38c7f: 0x6e013020, + // Block 0xe32, offset 0x38c80 + 0x38c80: 0x6e013220, 0x38c81: 0x6e013420, 0x38c82: 0x6e013620, 0x38c83: 0x6e013820, + 0x38c84: 0x6e013a20, 0x38c85: 0x6e013c20, 0x38c86: 0x6e013e20, 0x38c87: 0x6e014020, + 0x38c88: 0x6e014220, 0x38c89: 0x6e014420, 0x38c8a: 0x6e014620, 0x38c8b: 0x6e014820, + 0x38c8c: 0x6debbe20, 0x38c8d: 0x6e12ba20, 0x38c8e: 0x6e014a20, 0x38c8f: 0x6e12bc20, + 0x38c90: 0x6e12be20, 0x38c91: 0x6e12c020, 0x38c92: 0x6e12c220, 0x38c93: 0x6e12c420, + 0x38c94: 0x6e12c620, 0x38c95: 0x6e12c820, 0x38c96: 0x6e12ca20, 0x38c97: 0x6e12cc20, + 0x38c98: 0x6e12ce20, 0x38c99: 0x6e12d020, 0x38c9a: 0x6e12d220, 0x38c9b: 0x6e12d420, + 0x38c9c: 0x6e12d620, 0x38c9d: 0x6e12d820, 0x38c9e: 0x6e12da20, 0x38c9f: 0x6e12dc20, + 0x38ca0: 0x6e12de20, 0x38ca1: 0x6e12e020, 0x38ca2: 0x6e12e220, 0x38ca3: 0x6e12e420, + 0x38ca4: 0x6e12e620, 0x38ca5: 0x6e12e820, 0x38ca6: 0x6e12ea20, 0x38ca7: 0x6e12ec20, + 0x38ca8: 0x6e12ee20, 0x38ca9: 0x6e12f020, 0x38caa: 0x6e12f220, 0x38cab: 0x6e12f420, + 0x38cac: 0x6e12f620, 0x38cad: 0x6e12f820, 0x38cae: 0x6e12fa20, 0x38caf: 0x6e12fc20, + 0x38cb0: 0x6e12fe20, 0x38cb1: 0x6e130020, 0x38cb2: 0x6e130220, 0x38cb3: 0x6e130420, + 0x38cb4: 0x6e130620, 0x38cb5: 0x6e130820, 0x38cb6: 0x6e130a20, 0x38cb7: 0x6e130c20, + 0x38cb8: 0x6e130e20, 0x38cb9: 0x6e131020, 0x38cba: 0x6e131220, 0x38cbb: 0x6e131420, + 0x38cbc: 0x6e131620, 0x38cbd: 0x6e131820, 0x38cbe: 0x6e131a20, 0x38cbf: 0x6e131c20, + // Block 0xe33, offset 0x38cc0 + 0x38cc0: 0x6e131e20, 0x38cc1: 0x6e132020, 0x38cc2: 0x6e132220, 0x38cc3: 0x6e132420, + 0x38cc4: 0x6e132620, 0x38cc5: 0x6e132820, 0x38cc6: 0x6e132a20, 0x38cc7: 0x6e132c20, + 0x38cc8: 0x6e132e20, 0x38cc9: 0x6e133020, 0x38cca: 0x6e133220, 0x38ccb: 0x6e133420, + 0x38ccc: 0x6e133620, 0x38ccd: 0x6e20c620, 0x38cce: 0x6e20c820, 0x38ccf: 0x6e20ca20, + 0x38cd0: 0x6e20cc20, 0x38cd1: 0x6e20ce20, 0x38cd2: 0x6e20d020, 0x38cd3: 0x6e20d220, + 0x38cd4: 0x6e20d420, 0x38cd5: 0x6e20d620, 0x38cd6: 0x6e20d820, 0x38cd7: 0x6e20da20, + 0x38cd8: 0x6e20dc20, 0x38cd9: 0x6e20de20, 0x38cda: 0x6e20e020, 0x38cdb: 0x6e20e220, + 0x38cdc: 0x6e20e420, 0x38cdd: 0x6e20e620, 0x38cde: 0x6e20e820, 0x38cdf: 0x6e20ea20, + 0x38ce0: 0x6e20ec20, 0x38ce1: 0x6e20ee20, 0x38ce2: 0x6e20f020, 0x38ce3: 0x6e20f220, + 0x38ce4: 0x6e20f420, 0x38ce5: 0x6e20f620, 0x38ce6: 0x6e20f820, 0x38ce7: 0x6e20fa20, + 0x38ce8: 0x6e20fc20, 0x38ce9: 0x6e20fe20, 0x38cea: 0x6e210020, 0x38ceb: 0x6e210220, + 0x38cec: 0x6e210420, 0x38ced: 0x6e210620, 0x38cee: 0x6e210820, 0x38cef: 0x6e210a20, + 0x38cf0: 0x6e210c20, 0x38cf1: 0x6e210e20, 0x38cf2: 0x6e211020, 0x38cf3: 0x6e211220, + 0x38cf4: 0x6e211420, 0x38cf5: 0x6e211620, 0x38cf6: 0x6e2b9420, 0x38cf7: 0x6e2b9620, + 0x38cf8: 0x6e2b9820, 0x38cf9: 0x6e2b9a20, 0x38cfa: 0x6e2b9c20, 0x38cfb: 0x6e2b9e20, + 0x38cfc: 0x6e2ba020, 0x38cfd: 0x6e2ba220, 0x38cfe: 0x6e2ba420, 0x38cff: 0x6e2ba620, + // Block 0xe34, offset 0x38d00 + 0x38d00: 0x6e2ba820, 0x38d01: 0x6e2baa20, 0x38d02: 0x6e2bac20, 0x38d03: 0x6e2bae20, + 0x38d04: 0x6e2bb020, 0x38d05: 0x6e2bb220, 0x38d06: 0x6e2bb420, 0x38d07: 0x6e2bb620, + 0x38d08: 0x6e2bb820, 0x38d09: 0x6e2bba20, 0x38d0a: 0x6e2bbc20, 0x38d0b: 0x6e2bbe20, + 0x38d0c: 0x6e2bc020, 0x38d0d: 0x6e2bc220, 0x38d0e: 0x6e2bc420, 0x38d0f: 0x6e2bc620, + 0x38d10: 0x6e2bc820, 0x38d11: 0x6e2bca20, 0x38d12: 0x6e2bcc20, 0x38d13: 0x6e2bce20, + 0x38d14: 0x6e2bd020, 0x38d15: 0x6e2bd220, 0x38d16: 0x6e33f020, 0x38d17: 0x6e33f220, + 0x38d18: 0x6e33f420, 0x38d19: 0x6e33f620, 0x38d1a: 0x6e33f820, 0x38d1b: 0x6e33fa20, + 0x38d1c: 0x6e33fc20, 0x38d1d: 0x6e33fe20, 0x38d1e: 0x6e340020, 0x38d1f: 0x6e340220, + 0x38d20: 0x6e340420, 0x38d21: 0x6e340620, 0x38d22: 0x6e340820, 0x38d23: 0x6e340a20, + 0x38d24: 0x6e340c20, 0x38d25: 0x6e340e20, 0x38d26: 0x6e341020, 0x38d27: 0x6e341220, + 0x38d28: 0x6e341420, 0x38d29: 0x6e341620, 0x38d2a: 0x6e341820, 0x38d2b: 0x6e341a20, + 0x38d2c: 0x6e341c20, 0x38d2d: 0x6e341e20, 0x38d2e: 0x6e39d420, 0x38d2f: 0x6e39d620, + 0x38d30: 0x6e39d820, 0x38d31: 0x6e39da20, 0x38d32: 0x6e39dc20, 0x38d33: 0x6e39de20, + 0x38d34: 0x6e39e020, 0x38d35: 0x6e42f020, 0x38d36: 0x6e39e220, 0x38d37: 0x6e39e420, + 0x38d38: 0x6e39e620, 0x38d39: 0x6e39e820, 0x38d3a: 0x6e3df620, 0x38d3b: 0x6e3df820, + 0x38d3c: 0x6e3dfa20, 0x38d3d: 0x6e3dfc20, 0x38d3e: 0x6e3dfe20, 0x38d3f: 0x6e3e0020, + // Block 0xe35, offset 0x38d40 + 0x38d40: 0x6e3e0220, 0x38d41: 0x6e3e0420, 0x38d42: 0x6e3e0620, 0x38d43: 0x6e3e0820, + 0x38d44: 0x6e3e0a20, 0x38d45: 0x6e3e0c20, 0x38d46: 0x6e394c20, 0x38d47: 0x6e40ce20, + 0x38d48: 0x6e40d020, 0x38d49: 0x6e40d220, 0x38d4a: 0x6e40d420, 0x38d4b: 0x6e40d620, + 0x38d4c: 0x6e40d820, 0x38d4d: 0x6e40da20, 0x38d4e: 0x6e40dc20, 0x38d4f: 0x6e42f220, + 0x38d50: 0x6e42f420, 0x38d51: 0x6e42f620, 0x38d52: 0x6e42f820, 0x38d53: 0x6e470220, + 0x38d54: 0x6e446820, 0x38d55: 0x6e446a20, 0x38d56: 0x6e454e20, 0x38d57: 0x6e45d020, + 0x38d58: 0x6e472e20, 0x38d59: 0x6e468c20, 0x38d5a: 0x6e455020, 0x38d5b: 0x6c401420, + 0x38d5c: 0x6c5f9820, 0x38d5d: 0x6c5f9a20, 0x38d5e: 0x6c5f9c20, 0x38d5f: 0x6c84d420, + 0x38d60: 0x6c84d620, 0x38d61: 0x6c84d820, 0x38d62: 0x6c84da20, 0x38d63: 0x6cae3220, + 0x38d64: 0x6cae3420, 0x38d65: 0x6cae3620, 0x38d66: 0x6cae3820, 0x38d67: 0x6cae3a20, + 0x38d68: 0x6cae3c20, 0x38d69: 0x6cae3e20, 0x38d6a: 0x6cae4020, 0x38d6b: 0x6cae4220, + 0x38d6c: 0x6cae4420, 0x38d6d: 0x6cae4620, 0x38d6e: 0x6cae4820, 0x38d6f: 0x6cae4a20, + 0x38d70: 0x6cae4c20, 0x38d71: 0x6cdd5020, 0x38d72: 0x6cdd5220, 0x38d73: 0x6cdd5420, + 0x38d74: 0x6cdd5620, 0x38d75: 0x6cdd5820, 0x38d76: 0x6cdd5a20, 0x38d77: 0x6cdd5c20, + 0x38d78: 0x6cdd5e20, 0x38d79: 0x6cdd6020, 0x38d7a: 0x6d0bd020, 0x38d7b: 0x6d0bd220, + 0x38d7c: 0x6d0bd420, 0x38d7d: 0x6d0bd620, 0x38d7e: 0x6d0bd820, 0x38d7f: 0x6d0bda20, + // Block 0xe36, offset 0x38d80 + 0x38d80: 0x6d0bdc20, 0x38d81: 0x6d39be20, 0x38d82: 0x6d39c020, 0x38d83: 0x6d39c220, + 0x38d84: 0x6d39c420, 0x38d85: 0x6d39c620, 0x38d86: 0x6d39c820, 0x38d87: 0x6d39ca20, + 0x38d88: 0x6d39cc20, 0x38d89: 0x6d39ce20, 0x38d8a: 0x6d39d020, 0x38d8b: 0x6d39d220, + 0x38d8c: 0x6d39d420, 0x38d8d: 0x6d39d620, 0x38d8e: 0x6d39d820, 0x38d8f: 0x6d65f820, + 0x38d90: 0x6d65fa20, 0x38d91: 0x6d65fc20, 0x38d92: 0x6d65fe20, 0x38d93: 0x6d660020, + 0x38d94: 0x6d660220, 0x38d95: 0x6d660420, 0x38d96: 0x6d660620, 0x38d97: 0x6d660820, + 0x38d98: 0x6d660a20, 0x38d99: 0x6d660c20, 0x38d9a: 0x6d660e20, 0x38d9b: 0x6d661020, + 0x38d9c: 0x6d8fd020, 0x38d9d: 0x6d8fd220, 0x38d9e: 0x6d8fd420, 0x38d9f: 0x6d8fd620, + 0x38da0: 0x6d8fd820, 0x38da1: 0x6d8fda20, 0x38da2: 0x6d8fdc20, 0x38da3: 0x6d8fde20, + 0x38da4: 0x6d8fe020, 0x38da5: 0x6d8fe220, 0x38da6: 0x6d8fe420, 0x38da7: 0x6d8fe620, + 0x38da8: 0x6d8fe820, 0x38da9: 0x6d8fea20, 0x38daa: 0x6d8fec20, 0x38dab: 0x6d8fee20, + 0x38dac: 0x6d8ff020, 0x38dad: 0x6d8ff220, 0x38dae: 0x6d8ff420, 0x38daf: 0x6d8ff620, + 0x38db0: 0x6d8ff820, 0x38db1: 0x6db39e20, 0x38db2: 0x6db3a020, 0x38db3: 0x6db3a220, + 0x38db4: 0x6db3a420, 0x38db5: 0x6db3a620, 0x38db6: 0x6db3a820, 0x38db7: 0x6db3aa20, + 0x38db8: 0x6db3ac20, 0x38db9: 0x6db3ae20, 0x38dba: 0x6db3b020, 0x38dbb: 0x6dd29c20, + 0x38dbc: 0x6dd29e20, 0x38dbd: 0x6dd2a020, 0x38dbe: 0x6dd2a220, 0x38dbf: 0x6dd2a420, + // Block 0xe37, offset 0x38dc0 + 0x38dc0: 0x6dd2a620, 0x38dc1: 0x6dd2a820, 0x38dc2: 0x6debd420, 0x38dc3: 0x6dd2aa20, + 0x38dc4: 0x6dd2ac20, 0x38dc5: 0x6debd620, 0x38dc6: 0x6debd820, 0x38dc7: 0x6debda20, + 0x38dc8: 0x6debdc20, 0x38dc9: 0x6debde20, 0x38dca: 0x6debe020, 0x38dcb: 0x6e015a20, + 0x38dcc: 0x6e015c20, 0x38dcd: 0x6e015e20, 0x38dce: 0x6e016020, 0x38dcf: 0x6e016220, + 0x38dd0: 0x6df39420, 0x38dd1: 0x6e134220, 0x38dd2: 0x6e134420, 0x38dd3: 0x6e134620, + 0x38dd4: 0x6e134820, 0x38dd5: 0x6e134a20, 0x38dd6: 0x6e134c20, 0x38dd7: 0x6e134e20, + 0x38dd8: 0x6e211e20, 0x38dd9: 0x6e212020, 0x38dda: 0x6e2bd620, 0x38ddb: 0x6e2bd820, + 0x38ddc: 0x6e3e1420, 0x38ddd: 0x6c268c20, 0x38dde: 0x6c268e20, 0x38ddf: 0x6c402220, + 0x38de0: 0x6c402420, 0x38de1: 0x6c402620, 0x38de2: 0x6c402820, 0x38de3: 0x6c402a20, + 0x38de4: 0x6c402c20, 0x38de5: 0x6c402e20, 0x38de6: 0x6c403020, 0x38de7: 0x6c403220, + 0x38de8: 0x6c5fcc20, 0x38de9: 0x6c5fce20, 0x38dea: 0x6c5fd020, 0x38deb: 0x6c5fd220, + 0x38dec: 0x6c5fd420, 0x38ded: 0x6c5fd620, 0x38dee: 0x6c5fd820, 0x38def: 0x6c5fda20, + 0x38df0: 0x6c5fdc20, 0x38df1: 0x6c5fde20, 0x38df2: 0x6c5fe020, 0x38df3: 0x6c5fe220, + 0x38df4: 0x6c5fe420, 0x38df5: 0x6c5fe620, 0x38df6: 0x6c5fe820, 0x38df7: 0x6c5fea20, + 0x38df8: 0x6c5fec20, 0x38df9: 0x6c5fee20, 0x38dfa: 0x6c5ff020, 0x38dfb: 0x6c853220, + 0x38dfc: 0x6c853420, 0x38dfd: 0x6c853620, 0x38dfe: 0x6c853820, 0x38dff: 0x6c853a20, + // Block 0xe38, offset 0x38e00 + 0x38e00: 0x6c853c20, 0x38e01: 0x6c853e20, 0x38e02: 0x6c854020, 0x38e03: 0x6c854220, + 0x38e04: 0x6c854420, 0x38e05: 0x6c854620, 0x38e06: 0x6c854820, 0x38e07: 0x6c854a20, + 0x38e08: 0x6c854c20, 0x38e09: 0x6c854e20, 0x38e0a: 0x6c855020, 0x38e0b: 0x6c855220, + 0x38e0c: 0x6c855420, 0x38e0d: 0x6c855620, 0x38e0e: 0x6c855820, 0x38e0f: 0x6c855a20, + 0x38e10: 0x6c855c20, 0x38e11: 0x6c855e20, 0x38e12: 0x6c856020, 0x38e13: 0x6c856220, + 0x38e14: 0x6c856420, 0x38e15: 0x6c856620, 0x38e16: 0x6c856820, 0x38e17: 0x6c856a20, + 0x38e18: 0x6c856c20, 0x38e19: 0x6c856e20, 0x38e1a: 0x6c857020, 0x38e1b: 0x6c857220, + 0x38e1c: 0x6c857420, 0x38e1d: 0x6c857620, 0x38e1e: 0x6caeaa20, 0x38e1f: 0x6caeac20, + 0x38e20: 0x6caeae20, 0x38e21: 0x6caeb020, 0x38e22: 0x6caeb220, 0x38e23: 0x6caeb420, + 0x38e24: 0x6caeb620, 0x38e25: 0x6caeb820, 0x38e26: 0x6caeba20, 0x38e27: 0x6caebc20, + 0x38e28: 0x6caebe20, 0x38e29: 0x6caec020, 0x38e2a: 0x6caec220, 0x38e2b: 0x6caec420, + 0x38e2c: 0x6caec620, 0x38e2d: 0x6caec820, 0x38e2e: 0x6caeca20, 0x38e2f: 0x6caecc20, + 0x38e30: 0x6caece20, 0x38e31: 0x6caed020, 0x38e32: 0x6caed220, 0x38e33: 0x6caed420, + 0x38e34: 0x6caed620, 0x38e35: 0x6caed820, 0x38e36: 0x6caeda20, 0x38e37: 0x6caedc20, + 0x38e38: 0x6caede20, 0x38e39: 0x6caee020, 0x38e3a: 0x6caee220, 0x38e3b: 0x6caee420, + 0x38e3c: 0x6caee620, 0x38e3d: 0x6caee820, 0x38e3e: 0x6caeea20, 0x38e3f: 0x6caeec20, + // Block 0xe39, offset 0x38e40 + 0x38e40: 0x6caeee20, 0x38e41: 0x6caef020, 0x38e42: 0x6caef220, 0x38e43: 0x6caef420, + 0x38e44: 0x6caef620, 0x38e45: 0x6caef820, 0x38e46: 0x6caefa20, 0x38e47: 0x6caefc20, + 0x38e48: 0x6caefe20, 0x38e49: 0x6caf0020, 0x38e4a: 0x6caf0220, 0x38e4b: 0x6caf0420, + 0x38e4c: 0x6caf0620, 0x38e4d: 0x6caf0820, 0x38e4e: 0x6caf0a20, 0x38e4f: 0x6cddc220, + 0x38e50: 0x6cddc420, 0x38e51: 0x6cddc620, 0x38e52: 0x6cddc820, 0x38e53: 0x6cddca20, + 0x38e54: 0x6cddcc20, 0x38e55: 0x6cddce20, 0x38e56: 0x6cddd020, 0x38e57: 0x6cddd220, + 0x38e58: 0x6cddd420, 0x38e59: 0x6cddd620, 0x38e5a: 0x6cddd820, 0x38e5b: 0x6cddda20, + 0x38e5c: 0x6cdddc20, 0x38e5d: 0x6cddde20, 0x38e5e: 0x6cdde020, 0x38e5f: 0x6cdde220, + 0x38e60: 0x6cdde420, 0x38e61: 0x6cdde620, 0x38e62: 0x6cdde820, 0x38e63: 0x6cddea20, + 0x38e64: 0x6cddec20, 0x38e65: 0x6cddee20, 0x38e66: 0x6cddf020, 0x38e67: 0x6cddf220, + 0x38e68: 0x6cddf420, 0x38e69: 0x6cddf620, 0x38e6a: 0x6cddf820, 0x38e6b: 0x6d0c3620, + 0x38e6c: 0x6cddfa20, 0x38e6d: 0x6cddfc20, 0x38e6e: 0x6d0c3820, 0x38e6f: 0x6cddfe20, + 0x38e70: 0x6cde0020, 0x38e71: 0x6cde0220, 0x38e72: 0x6cde0420, 0x38e73: 0x6cde0620, + 0x38e74: 0x6cde0820, 0x38e75: 0x6cde0a20, 0x38e76: 0x6cde0c20, 0x38e77: 0x6cde0e20, + 0x38e78: 0x6cde1020, 0x38e79: 0x6cde1220, 0x38e7a: 0x6cde1420, 0x38e7b: 0x6cde1620, + 0x38e7c: 0x6cde1820, 0x38e7d: 0x6cde1a20, 0x38e7e: 0x6cde1c20, 0x38e7f: 0x6cde1e20, + // Block 0xe3a, offset 0x38e80 + 0x38e80: 0x6cde2020, 0x38e81: 0x6cde2220, 0x38e82: 0x6cde2420, 0x38e83: 0x6cde2620, + 0x38e84: 0x6cde2820, 0x38e85: 0x6cde2a20, 0x38e86: 0x6cde2c20, 0x38e87: 0x6cde2e20, + 0x38e88: 0x6d0c3a20, 0x38e89: 0x6d0c3c20, 0x38e8a: 0x6d0c3e20, 0x38e8b: 0x6d0c4020, + 0x38e8c: 0x6d0c4220, 0x38e8d: 0x6d0c4420, 0x38e8e: 0x6d0c4620, 0x38e8f: 0x6d0c4820, + 0x38e90: 0x6d0c4a20, 0x38e91: 0x6d0c4c20, 0x38e92: 0x6d0c4e20, 0x38e93: 0x6d0c5020, + 0x38e94: 0x6d0c5220, 0x38e95: 0x6d0c5420, 0x38e96: 0x6d0c5620, 0x38e97: 0x6d0c5820, + 0x38e98: 0x6d0c5a20, 0x38e99: 0x6d0c5c20, 0x38e9a: 0x6d0c5e20, 0x38e9b: 0x6d0c6020, + 0x38e9c: 0x6d0c6220, 0x38e9d: 0x6d0c6420, 0x38e9e: 0x6d3a6020, 0x38e9f: 0x6d0c6620, + 0x38ea0: 0x6d0c6820, 0x38ea1: 0x6d0c6a20, 0x38ea2: 0x6d0c6c20, 0x38ea3: 0x6d0c6e20, + 0x38ea4: 0x6d0c7020, 0x38ea5: 0x6d0c7220, 0x38ea6: 0x6d0c7420, 0x38ea7: 0x6d0c7620, + 0x38ea8: 0x6d0c7820, 0x38ea9: 0x6d0c7a20, 0x38eaa: 0x6d0c7c20, 0x38eab: 0x6d0c7e20, + 0x38eac: 0x6d0c8020, 0x38ead: 0x6d0c8220, 0x38eae: 0x6d0c8420, 0x38eaf: 0x6d0c8620, + 0x38eb0: 0x6d0c8820, 0x38eb1: 0x6d0c8a20, 0x38eb2: 0x6d0c8c20, 0x38eb3: 0x6d0c8e20, + 0x38eb4: 0x6d0c9020, 0x38eb5: 0x6d0c9220, 0x38eb6: 0x6d0c9420, 0x38eb7: 0x6d0c9620, + 0x38eb8: 0x6d0c9820, 0x38eb9: 0x6d0c9a20, 0x38eba: 0x6d0c9c20, 0x38ebb: 0x6d0c9e20, + 0x38ebc: 0x6d0ca020, 0x38ebd: 0x6d0ca220, 0x38ebe: 0x6d0ca420, 0x38ebf: 0x6d0ca620, + // Block 0xe3b, offset 0x38ec0 + 0x38ec0: 0x6d0ca820, 0x38ec1: 0x6d0caa20, 0x38ec2: 0x6d0cac20, 0x38ec3: 0x6d3a6220, + 0x38ec4: 0x6d3a6420, 0x38ec5: 0x6d3a6620, 0x38ec6: 0x6d3a6820, 0x38ec7: 0x6d3a6a20, + 0x38ec8: 0x6d3a6c20, 0x38ec9: 0x6d3a6e20, 0x38eca: 0x6d3a7020, 0x38ecb: 0x6d3a7220, + 0x38ecc: 0x6d3a7420, 0x38ecd: 0x6d3a7620, 0x38ece: 0x6d3a7820, 0x38ecf: 0x6d3a7a20, + 0x38ed0: 0x6d3a7c20, 0x38ed1: 0x6d3a7e20, 0x38ed2: 0x6d3a8020, 0x38ed3: 0x6d3a8220, + 0x38ed4: 0x6d3a8420, 0x38ed5: 0x6d3a8620, 0x38ed6: 0x6d3a8820, 0x38ed7: 0x6d3a8a20, + 0x38ed8: 0x6d3a8c20, 0x38ed9: 0x6d3a8e20, 0x38eda: 0x6d3a9020, 0x38edb: 0x6d3a9220, + 0x38edc: 0x6d3a9420, 0x38edd: 0x6d3a9620, 0x38ede: 0x6d0cae20, 0x38edf: 0x6d3a9820, + 0x38ee0: 0x6d3a9a20, 0x38ee1: 0x6d3a9c20, 0x38ee2: 0x6d3a9e20, 0x38ee3: 0x6d3aa020, + 0x38ee4: 0x6d3aa220, 0x38ee5: 0x6d3aa420, 0x38ee6: 0x6d3aa620, 0x38ee7: 0x6d3aa820, + 0x38ee8: 0x6d3aaa20, 0x38ee9: 0x6d3aac20, 0x38eea: 0x6d3aae20, 0x38eeb: 0x6d3ab020, + 0x38eec: 0x6d3ab220, 0x38eed: 0x6d3ab420, 0x38eee: 0x6d3ab620, 0x38eef: 0x6d3ab820, + 0x38ef0: 0x6d668c20, 0x38ef1: 0x6d3aba20, 0x38ef2: 0x6d3abc20, 0x38ef3: 0x6d3abe20, + 0x38ef4: 0x6d3ac020, 0x38ef5: 0x6d3ac220, 0x38ef6: 0x6d3ac420, 0x38ef7: 0x6d3ac620, + 0x38ef8: 0x6d3ac820, 0x38ef9: 0x6d3aca20, 0x38efa: 0x6d3acc20, 0x38efb: 0x6d3ace20, + 0x38efc: 0x6d3ad020, 0x38efd: 0x6d3ad220, 0x38efe: 0x6d3ad420, 0x38eff: 0x6d3ad620, + // Block 0xe3c, offset 0x38f00 + 0x38f00: 0x6d3ad820, 0x38f01: 0x6d3ada20, 0x38f02: 0x6d3adc20, 0x38f03: 0x6d3ade20, + 0x38f04: 0x6d3ae020, 0x38f05: 0x6d3ae220, 0x38f06: 0x6d3ae420, 0x38f07: 0x6d3ae620, + 0x38f08: 0x6d3ae820, 0x38f09: 0x6d3aea20, 0x38f0a: 0x6d3aec20, 0x38f0b: 0x6d3aee20, + 0x38f0c: 0x6d3af020, 0x38f0d: 0x6d3af220, 0x38f0e: 0x6d3af420, 0x38f0f: 0x6d3af620, + 0x38f10: 0x6d3af820, 0x38f11: 0x6d3afa20, 0x38f12: 0x6d668e20, 0x38f13: 0x6d669020, + 0x38f14: 0x6d669220, 0x38f15: 0x6d669420, 0x38f16: 0x6d669620, 0x38f17: 0x6d669820, + 0x38f18: 0x6d669a20, 0x38f19: 0x6d669c20, 0x38f1a: 0x6d669e20, 0x38f1b: 0x6d66a020, + 0x38f1c: 0x6d66a220, 0x38f1d: 0x6d66a420, 0x38f1e: 0x6d66a620, 0x38f1f: 0x6d66a820, + 0x38f20: 0x6d66aa20, 0x38f21: 0x6d66ac20, 0x38f22: 0x6d66ae20, 0x38f23: 0x6d66b020, + 0x38f24: 0x6d66b220, 0x38f25: 0x6d66b420, 0x38f26: 0x6d66b620, 0x38f27: 0x6d66b820, + 0x38f28: 0x6d66ba20, 0x38f29: 0x6d66bc20, 0x38f2a: 0x6d66be20, 0x38f2b: 0x6d66c020, + 0x38f2c: 0x6d66c220, 0x38f2d: 0x6d66c420, 0x38f2e: 0x6d66c620, 0x38f2f: 0x6d66c820, + 0x38f30: 0x6d66ca20, 0x38f31: 0x6d66cc20, 0x38f32: 0x6d66ce20, 0x38f33: 0x6d66d020, + 0x38f34: 0x6d66d220, 0x38f35: 0x6d66d420, 0x38f36: 0x6d66d620, 0x38f37: 0x6d66d820, + 0x38f38: 0x6d66da20, 0x38f39: 0x6d66dc20, 0x38f3a: 0x6d66de20, 0x38f3b: 0x6d66e020, + 0x38f3c: 0x6d66e220, 0x38f3d: 0x6d66e420, 0x38f3e: 0x6d66e620, 0x38f3f: 0x6d66e820, + // Block 0xe3d, offset 0x38f40 + 0x38f40: 0x6d66ea20, 0x38f41: 0x6d66ec20, 0x38f42: 0x6d66ee20, 0x38f43: 0x6d66f020, + 0x38f44: 0x6d66f220, 0x38f45: 0x6d66f420, 0x38f46: 0x6d66f620, 0x38f47: 0x6d66f820, + 0x38f48: 0x6d66fa20, 0x38f49: 0x6d66fc20, 0x38f4a: 0x6d66fe20, 0x38f4b: 0x6d670020, + 0x38f4c: 0x6d670220, 0x38f4d: 0x6d670420, 0x38f4e: 0x6d670620, 0x38f4f: 0x6d670820, + 0x38f50: 0x6d670a20, 0x38f51: 0x6d670c20, 0x38f52: 0x6d670e20, 0x38f53: 0x6d671020, + 0x38f54: 0x6d671220, 0x38f55: 0x6d671420, 0x38f56: 0x6d671620, 0x38f57: 0x6d671820, + 0x38f58: 0x6d671a20, 0x38f59: 0x6d671c20, 0x38f5a: 0x6d671e20, 0x38f5b: 0x6d672020, + 0x38f5c: 0x6d672220, 0x38f5d: 0x6d672420, 0x38f5e: 0x6d672620, 0x38f5f: 0x6d672820, + 0x38f60: 0x6d672a20, 0x38f61: 0x6d905c20, 0x38f62: 0x6d905e20, 0x38f63: 0x6d906020, + 0x38f64: 0x6d906220, 0x38f65: 0x6d906420, 0x38f66: 0x6d906620, 0x38f67: 0x6d906820, + 0x38f68: 0x6d906a20, 0x38f69: 0x6d906c20, 0x38f6a: 0x6d906e20, 0x38f6b: 0x6d907020, + 0x38f6c: 0x6d907220, 0x38f6d: 0x6d907420, 0x38f6e: 0x6d907620, 0x38f6f: 0x6d907820, + 0x38f70: 0x6d907a20, 0x38f71: 0x6d907c20, 0x38f72: 0x6d907e20, 0x38f73: 0x6d908020, + 0x38f74: 0x6d908220, 0x38f75: 0x6d908420, 0x38f76: 0x6d908620, 0x38f77: 0x6d908820, + 0x38f78: 0x6d908a20, 0x38f79: 0x6d908c20, 0x38f7a: 0x6d908e20, 0x38f7b: 0x6d909020, + 0x38f7c: 0x6d909220, 0x38f7d: 0x6d909420, 0x38f7e: 0x6d909620, 0x38f7f: 0x6d909820, + // Block 0xe3e, offset 0x38f80 + 0x38f80: 0x6d909a20, 0x38f81: 0x6d909c20, 0x38f82: 0x6d909e20, 0x38f83: 0x6d90a020, + 0x38f84: 0x6d90a220, 0x38f85: 0x6d90a420, 0x38f86: 0x6d90a620, 0x38f87: 0x6d672c20, + 0x38f88: 0x6d90a820, 0x38f89: 0x6d90aa20, 0x38f8a: 0x6d90ac20, 0x38f8b: 0x6d90ae20, + 0x38f8c: 0x6d90b020, 0x38f8d: 0x6d90b220, 0x38f8e: 0x6d90b420, 0x38f8f: 0x6d90b620, + 0x38f90: 0x6d90b820, 0x38f91: 0x6d90ba20, 0x38f92: 0x6d90bc20, 0x38f93: 0x6d90be20, + 0x38f94: 0x6d90c020, 0x38f95: 0x6d90c220, 0x38f96: 0x6d90c420, 0x38f97: 0x6d90c620, + 0x38f98: 0x6d90c820, 0x38f99: 0x6d90ca20, 0x38f9a: 0x6d90cc20, 0x38f9b: 0x6d90ce20, + 0x38f9c: 0x6d90d020, 0x38f9d: 0x6d90d220, 0x38f9e: 0x6d90d420, 0x38f9f: 0x6d90d620, + 0x38fa0: 0x6d90d820, 0x38fa1: 0x6d90da20, 0x38fa2: 0x6d90dc20, 0x38fa3: 0x6d90de20, + 0x38fa4: 0x6d90e020, 0x38fa5: 0x6d90e220, 0x38fa6: 0x6d90e420, 0x38fa7: 0x6d90e620, + 0x38fa8: 0x6d90e820, 0x38fa9: 0x6d90ea20, 0x38faa: 0x6d90ec20, 0x38fab: 0x6d90ee20, + 0x38fac: 0x6d90f020, 0x38fad: 0x6d90f220, 0x38fae: 0x6d90f420, 0x38faf: 0x6d90f620, + 0x38fb0: 0x6d90f820, 0x38fb1: 0x6d90fa20, 0x38fb2: 0x6d90fc20, 0x38fb3: 0x6d90fe20, + 0x38fb4: 0x6d910020, 0x38fb5: 0x6d910220, 0x38fb6: 0x6d910420, 0x38fb7: 0x6d910620, + 0x38fb8: 0x6db42820, 0x38fb9: 0x6db42a20, 0x38fba: 0x6db42c20, 0x38fbb: 0x6db42e20, + 0x38fbc: 0x6db43020, 0x38fbd: 0x6db43220, 0x38fbe: 0x6db43420, 0x38fbf: 0x6db43620, + // Block 0xe3f, offset 0x38fc0 + 0x38fc0: 0x6db43820, 0x38fc1: 0x6db43a20, 0x38fc2: 0x6db43c20, 0x38fc3: 0x6db43e20, + 0x38fc4: 0x6db44020, 0x38fc5: 0x6db44220, 0x38fc6: 0x6db44420, 0x38fc7: 0x6db44620, + 0x38fc8: 0x6db44820, 0x38fc9: 0x6db44a20, 0x38fca: 0x6db44c20, 0x38fcb: 0x6db44e20, + 0x38fcc: 0x6db45020, 0x38fcd: 0x6db45220, 0x38fce: 0x6db45420, 0x38fcf: 0x6db45620, + 0x38fd0: 0x6db45820, 0x38fd1: 0x6db45a20, 0x38fd2: 0x6db45c20, 0x38fd3: 0x6db45e20, + 0x38fd4: 0x6db46020, 0x38fd5: 0x6db46220, 0x38fd6: 0x6db46420, 0x38fd7: 0x6db46620, + 0x38fd8: 0x6db46820, 0x38fd9: 0x6db46a20, 0x38fda: 0x6db46c20, 0x38fdb: 0x6db46e20, + 0x38fdc: 0x6db47020, 0x38fdd: 0x6db47220, 0x38fde: 0x6db47420, 0x38fdf: 0x6db47620, + 0x38fe0: 0x6db47820, 0x38fe1: 0x6db47a20, 0x38fe2: 0x6db47c20, 0x38fe3: 0x6db47e20, + 0x38fe4: 0x6db48020, 0x38fe5: 0x6db48220, 0x38fe6: 0x6db48420, 0x38fe7: 0x6db48620, + 0x38fe8: 0x6db48820, 0x38fe9: 0x6db48a20, 0x38fea: 0x6db48c20, 0x38feb: 0x6db48e20, + 0x38fec: 0x6db49020, 0x38fed: 0x6db49220, 0x38fee: 0x6db49420, 0x38fef: 0x6db49620, + 0x38ff0: 0x6dcfa420, 0x38ff1: 0x6db49820, 0x38ff2: 0x6db49a20, 0x38ff3: 0x6db49c20, + 0x38ff4: 0x6db49e20, 0x38ff5: 0x6db4a020, 0x38ff6: 0x6db4a220, 0x38ff7: 0x6db4a420, + 0x38ff8: 0x6db4a620, 0x38ff9: 0x6db4a820, 0x38ffa: 0x6db4aa20, 0x38ffb: 0x6db4ac20, + 0x38ffc: 0x6db4ae20, 0x38ffd: 0x6db4b020, 0x38ffe: 0x6db4b220, 0x38fff: 0x6db4b420, + // Block 0xe40, offset 0x39000 + 0x39000: 0x6db4b620, 0x39001: 0x6db4b820, 0x39002: 0x6db4ba20, 0x39003: 0x6db4bc20, + 0x39004: 0x6dd2fa20, 0x39005: 0x6dd2fc20, 0x39006: 0x6dd2fe20, 0x39007: 0x6dd30020, + 0x39008: 0x6dd30220, 0x39009: 0x6dd30420, 0x3900a: 0x6dd30620, 0x3900b: 0x6dd30820, + 0x3900c: 0x6dd30a20, 0x3900d: 0x6dd30c20, 0x3900e: 0x6dd30e20, 0x3900f: 0x6dd31020, + 0x39010: 0x6dd31220, 0x39011: 0x6dd31420, 0x39012: 0x6dd31620, 0x39013: 0x6dd31820, + 0x39014: 0x6dd31a20, 0x39015: 0x6dd31c20, 0x39016: 0x6dd31e20, 0x39017: 0x6dd32020, + 0x39018: 0x6dd32220, 0x39019: 0x6dd32420, 0x3901a: 0x6dd32620, 0x3901b: 0x6dd32820, + 0x3901c: 0x6dd32a20, 0x3901d: 0x6dd32c20, 0x3901e: 0x6dd32e20, 0x3901f: 0x6dd33020, + 0x39020: 0x6dd33220, 0x39021: 0x6dd33420, 0x39022: 0x6dd33620, 0x39023: 0x6dd33820, + 0x39024: 0x6dd33a20, 0x39025: 0x6dd33c20, 0x39026: 0x6dd33e20, 0x39027: 0x6dd34020, + 0x39028: 0x6dd34220, 0x39029: 0x6dd34420, 0x3902a: 0x6dd34620, 0x3902b: 0x6dd34820, + 0x3902c: 0x6dd34a20, 0x3902d: 0x6dd34c20, 0x3902e: 0x6dd34e20, 0x3902f: 0x6dd35020, + 0x39030: 0x6dd35220, 0x39031: 0x6dd35420, 0x39032: 0x6dd35620, 0x39033: 0x6dd35820, + 0x39034: 0x6dd35a20, 0x39035: 0x6dd35c20, 0x39036: 0x6dd35e20, 0x39037: 0x6dd36020, + 0x39038: 0x6dd36220, 0x39039: 0x6dd36420, 0x3903a: 0x6dd36620, 0x3903b: 0x6dd36820, + 0x3903c: 0x6dd36a20, 0x3903d: 0x6dd36c20, 0x3903e: 0x6dd36e20, 0x3903f: 0x6dd37020, + // Block 0xe41, offset 0x39040 + 0x39040: 0x6dd37220, 0x39041: 0x6dd37420, 0x39042: 0x6dd37620, 0x39043: 0x6dd37820, + 0x39044: 0x6dd37a20, 0x39045: 0x6dd37c20, 0x39046: 0x6dd37e20, 0x39047: 0x6dd38020, + 0x39048: 0x6dd38220, 0x39049: 0x6dd38420, 0x3904a: 0x6dd38620, 0x3904b: 0x6dd38820, + 0x3904c: 0x6dd38a20, 0x3904d: 0x6dd38c20, 0x3904e: 0x6dec2620, 0x3904f: 0x6dec2820, + 0x39050: 0x6dec2a20, 0x39051: 0x6dec2c20, 0x39052: 0x6dec2e20, 0x39053: 0x6dec3020, + 0x39054: 0x6dec3220, 0x39055: 0x6dec3420, 0x39056: 0x6dec3620, 0x39057: 0x6dec3820, + 0x39058: 0x6dec3a20, 0x39059: 0x6dec3c20, 0x3905a: 0x6dec3e20, 0x3905b: 0x6dec4020, + 0x3905c: 0x6dec4220, 0x3905d: 0x6dec4420, 0x3905e: 0x6dec4620, 0x3905f: 0x6dec4820, + 0x39060: 0x6dec4a20, 0x39061: 0x6dec4c20, 0x39062: 0x6dec4e20, 0x39063: 0x6dec5020, + 0x39064: 0x6dec5220, 0x39065: 0x6dec5420, 0x39066: 0x6dec5620, 0x39067: 0x6dec5820, + 0x39068: 0x6dec5a20, 0x39069: 0x6dec5c20, 0x3906a: 0x6dec5e20, 0x3906b: 0x6dec6020, + 0x3906c: 0x6dec6220, 0x3906d: 0x6dec6420, 0x3906e: 0x6dec6620, 0x3906f: 0x6dec6820, + 0x39070: 0x6dec6a20, 0x39071: 0x6dec6c20, 0x39072: 0x6dec6e20, 0x39073: 0x6dec7020, + 0x39074: 0x6dec7220, 0x39075: 0x6dec7420, 0x39076: 0x6dec7620, 0x39077: 0x6dec7820, + 0x39078: 0x6dec7a20, 0x39079: 0x6dec7c20, 0x3907a: 0x6dec7e20, 0x3907b: 0x6dec8020, + 0x3907c: 0x6dec8220, 0x3907d: 0x6dec8420, 0x3907e: 0x6dec8620, 0x3907f: 0x6dec8820, + // Block 0xe42, offset 0x39080 + 0x39080: 0x6dec8a20, 0x39081: 0x6dec8c20, 0x39082: 0x6dec8e20, 0x39083: 0x6dec9020, + 0x39084: 0x6dec9220, 0x39085: 0x6dec9420, 0x39086: 0x6dec9620, 0x39087: 0x6dec9820, + 0x39088: 0x6dec9a20, 0x39089: 0x6e018420, 0x3908a: 0x6e018620, 0x3908b: 0x6e018820, + 0x3908c: 0x6e018a20, 0x3908d: 0x6e018c20, 0x3908e: 0x6e018e20, 0x3908f: 0x6e019020, + 0x39090: 0x6e019220, 0x39091: 0x6e019420, 0x39092: 0x6e019620, 0x39093: 0x6e019820, + 0x39094: 0x6e019a20, 0x39095: 0x6e019c20, 0x39096: 0x6e019e20, 0x39097: 0x6e01a020, + 0x39098: 0x6e01a220, 0x39099: 0x6e01a420, 0x3909a: 0x6e01a620, 0x3909b: 0x6e01a820, + 0x3909c: 0x6e01aa20, 0x3909d: 0x6e01ac20, 0x3909e: 0x6e01ae20, 0x3909f: 0x6e01b020, + 0x390a0: 0x6e01b220, 0x390a1: 0x6e01b420, 0x390a2: 0x6e01b620, 0x390a3: 0x6e01b820, + 0x390a4: 0x6e01ba20, 0x390a5: 0x6e01bc20, 0x390a6: 0x6e01be20, 0x390a7: 0x6e01c020, + 0x390a8: 0x6e01c220, 0x390a9: 0x6e01c420, 0x390aa: 0x6e01c620, 0x390ab: 0x6e01c820, + 0x390ac: 0x6e01ca20, 0x390ad: 0x6e01cc20, 0x390ae: 0x6e01ce20, 0x390af: 0x6e01d020, + 0x390b0: 0x6e01d220, 0x390b1: 0x6e136a20, 0x390b2: 0x6e136c20, 0x390b3: 0x6e136e20, + 0x390b4: 0x6e137020, 0x390b5: 0x6e137220, 0x390b6: 0x6e137420, 0x390b7: 0x6e137620, + 0x390b8: 0x6e137820, 0x390b9: 0x6e137a20, 0x390ba: 0x6e137c20, 0x390bb: 0x6e137e20, + 0x390bc: 0x6e138020, 0x390bd: 0x6e138220, 0x390be: 0x6e138420, 0x390bf: 0x6e138620, + // Block 0xe43, offset 0x390c0 + 0x390c0: 0x6e138820, 0x390c1: 0x6e138a20, 0x390c2: 0x6e138c20, 0x390c3: 0x6e138e20, + 0x390c4: 0x6e139020, 0x390c5: 0x6e139220, 0x390c6: 0x6e139420, 0x390c7: 0x6e139620, + 0x390c8: 0x6e139820, 0x390c9: 0x6e139a20, 0x390ca: 0x6e139c20, 0x390cb: 0x6e139e20, + 0x390cc: 0x6e13a020, 0x390cd: 0x6e13a220, 0x390ce: 0x6e13a420, 0x390cf: 0x6e13a620, + 0x390d0: 0x6e13a820, 0x390d1: 0x6e13aa20, 0x390d2: 0x6e13ac20, 0x390d3: 0x6e13ae20, + 0x390d4: 0x6e13b020, 0x390d5: 0x6e13b220, 0x390d6: 0x6e13b420, 0x390d7: 0x6e13b620, + 0x390d8: 0x6e13b820, 0x390d9: 0x6e13ba20, 0x390da: 0x6e13bc20, 0x390db: 0x6e13be20, + 0x390dc: 0x6e13c020, 0x390dd: 0x6e213820, 0x390de: 0x6e213a20, 0x390df: 0x6e213c20, + 0x390e0: 0x6e213e20, 0x390e1: 0x6e214020, 0x390e2: 0x6e214220, 0x390e3: 0x6e214420, + 0x390e4: 0x6e214620, 0x390e5: 0x6e214820, 0x390e6: 0x6e214a20, 0x390e7: 0x6e214c20, + 0x390e8: 0x6e214e20, 0x390e9: 0x6e215020, 0x390ea: 0x6e215220, 0x390eb: 0x6e215420, + 0x390ec: 0x6e215620, 0x390ed: 0x6e215820, 0x390ee: 0x6e215a20, 0x390ef: 0x6e215c20, + 0x390f0: 0x6e215e20, 0x390f1: 0x6e216020, 0x390f2: 0x6e216220, 0x390f3: 0x6e216420, + 0x390f4: 0x6e216620, 0x390f5: 0x6e216820, 0x390f6: 0x6e216a20, 0x390f7: 0x6e216c20, + 0x390f8: 0x6e216e20, 0x390f9: 0x6e217020, 0x390fa: 0x6e217220, 0x390fb: 0x6e217420, + 0x390fc: 0x6e217620, 0x390fd: 0x6e217820, 0x390fe: 0x6e217a20, 0x390ff: 0x6e217c20, + // Block 0xe44, offset 0x39100 + 0x39100: 0x6e217e20, 0x39101: 0x6e218020, 0x39102: 0x6e218220, 0x39103: 0x6e2bf020, + 0x39104: 0x6e2bf220, 0x39105: 0x6e2bf420, 0x39106: 0x6e2bf620, 0x39107: 0x6e2bf820, + 0x39108: 0x6e2bfa20, 0x39109: 0x6e2bfc20, 0x3910a: 0x6e2bfe20, 0x3910b: 0x6e2c0020, + 0x3910c: 0x6e2c0220, 0x3910d: 0x6e2c0420, 0x3910e: 0x6e2c0620, 0x3910f: 0x6e2c0820, + 0x39110: 0x6e2c0a20, 0x39111: 0x6e2c0c20, 0x39112: 0x6e2c0e20, 0x39113: 0x6e343220, + 0x39114: 0x6e2c1020, 0x39115: 0x6e2c1220, 0x39116: 0x6e2c1420, 0x39117: 0x6e2c1620, + 0x39118: 0x6e2c1820, 0x39119: 0x6e2c1a20, 0x3911a: 0x6e2c1c20, 0x3911b: 0x6e343420, + 0x3911c: 0x6e343620, 0x3911d: 0x6e343820, 0x3911e: 0x6e343a20, 0x3911f: 0x6e343c20, + 0x39120: 0x6e343e20, 0x39121: 0x6e344020, 0x39122: 0x6e344220, 0x39123: 0x6e344420, + 0x39124: 0x6e344620, 0x39125: 0x6e344820, 0x39126: 0x6e344a20, 0x39127: 0x6e344c20, + 0x39128: 0x6e344e20, 0x39129: 0x6e345020, 0x3912a: 0x6e345220, 0x3912b: 0x6e345420, + 0x3912c: 0x6e345620, 0x3912d: 0x6e345820, 0x3912e: 0x6e345a20, 0x3912f: 0x6e39ee20, + 0x39130: 0x6e39f020, 0x39131: 0x6e39f220, 0x39132: 0x6e39f420, 0x39133: 0x6e39f620, + 0x39134: 0x6e39f820, 0x39135: 0x6e39fa20, 0x39136: 0x6e39fc20, 0x39137: 0x6e39fe20, + 0x39138: 0x6e3a0020, 0x39139: 0x6e3a0220, 0x3913a: 0x6e3a0420, 0x3913b: 0x6e3a0620, + 0x3913c: 0x6e3a0820, 0x3913d: 0x6e3e1820, 0x3913e: 0x6e3e1a20, 0x3913f: 0x6e3e1c20, + // Block 0xe45, offset 0x39140 + 0x39140: 0x6e3e1e20, 0x39141: 0x6e3e2020, 0x39142: 0x6e3e2220, 0x39143: 0x6e3e2420, + 0x39144: 0x6e40e220, 0x39145: 0x6e40e420, 0x39146: 0x6e40e620, 0x39147: 0x6e40e820, + 0x39148: 0x6e40ea20, 0x39149: 0x6e40ec20, 0x3914a: 0x6e3e2620, 0x3914b: 0x6e40ee20, + 0x3914c: 0x6e40f020, 0x3914d: 0x6e40f220, 0x3914e: 0x6e40f420, 0x3914f: 0x6e40f620, + 0x39150: 0x6e40f820, 0x39151: 0x6e42fe20, 0x39152: 0x6e430020, 0x39153: 0x6e430220, + 0x39154: 0x6e430420, 0x39155: 0x6e430620, 0x39156: 0x6e430820, 0x39157: 0x6e430a20, + 0x39158: 0x6e446e20, 0x39159: 0x6e447020, 0x3915a: 0x6e447220, 0x3915b: 0x6e447420, + 0x3915c: 0x6e455220, 0x3915d: 0x6e455420, 0x3915e: 0x6e455620, 0x3915f: 0x6e455820, + 0x39160: 0x6e459020, 0x39161: 0x6e455a20, 0x39162: 0x6e45d220, 0x39163: 0x6e45d420, + 0x39164: 0x6e463a20, 0x39165: 0x6e463c20, 0x39166: 0x6e463e20, 0x39167: 0x6c403620, + 0x39168: 0x6c403820, 0x39169: 0x6c403a20, 0x3916a: 0x6c5ffc20, 0x3916b: 0x6c858820, + 0x3916c: 0x6c858a20, 0x3916d: 0x6c858c20, 0x3916e: 0x6c858e20, 0x3916f: 0x6c859020, + 0x39170: 0x6caf1e20, 0x39171: 0x6caf2020, 0x39172: 0x6caf2220, 0x39173: 0x6cde4c20, + 0x39174: 0x6cde4e20, 0x39175: 0x6d0cbe20, 0x39176: 0x6d0cc020, 0x39177: 0x6d0cc220, + 0x39178: 0x6d0cc420, 0x39179: 0x6d0cc620, 0x3917a: 0x6d3b1220, 0x3917b: 0x6d3b1420, + 0x3917c: 0x6d3b1620, 0x3917d: 0x6d3b1820, 0x3917e: 0x6d3b1a20, 0x3917f: 0x6d3b1c20, + // Block 0xe46, offset 0x39180 + 0x39180: 0x6d673c20, 0x39181: 0x6d673e20, 0x39182: 0x6d674020, 0x39183: 0x6d674220, + 0x39184: 0x6d3b1e20, 0x39185: 0x6d674420, 0x39186: 0x6d911620, 0x39187: 0x6d911820, + 0x39188: 0x6d911a20, 0x39189: 0x6d911c20, 0x3918a: 0x6d911e20, 0x3918b: 0x6db4c820, + 0x3918c: 0x6db4ca20, 0x3918d: 0x6db4cc20, 0x3918e: 0x6dd39820, 0x3918f: 0x6dd39a20, + 0x39190: 0x6dd39c20, 0x39191: 0x6dd39e20, 0x39192: 0x6dd3a020, 0x39193: 0x6dd3a220, + 0x39194: 0x6deca620, 0x39195: 0x6deca820, 0x39196: 0x6e01dc20, 0x39197: 0x6e01de20, + 0x39198: 0x6e13cc20, 0x39199: 0x6e218620, 0x3919a: 0x6e218820, 0x3919b: 0x6e2c1e20, + 0x3919c: 0x6e455c20, 0x3919d: 0x6c403c20, 0x3919e: 0x6c403e20, 0x3919f: 0x6c404020, + 0x391a0: 0x6c404220, 0x391a1: 0x6c600220, 0x391a2: 0x6c600420, 0x391a3: 0x6c600620, + 0x391a4: 0x6c600820, 0x391a5: 0x6c600a20, 0x391a6: 0x6c859820, 0x391a7: 0x6c859a20, + 0x391a8: 0x6c859c20, 0x391a9: 0x6c859e20, 0x391aa: 0x6caf3020, 0x391ab: 0x6cde5a20, + 0x391ac: 0x6cde5c20, 0x391ad: 0x6cde5e20, 0x391ae: 0x6cde6020, 0x391af: 0x6cde6220, + 0x391b0: 0x6cde6420, 0x391b1: 0x6cde6620, 0x391b2: 0x6d0ccc20, 0x391b3: 0x6d0cce20, + 0x391b4: 0x6d0cd020, 0x391b5: 0x6d0cd220, 0x391b6: 0x6d0cd420, 0x391b7: 0x6d0cd620, + 0x391b8: 0x6d3b2020, 0x391b9: 0x6d674e20, 0x391ba: 0x6d3b2220, 0x391bb: 0x6d3b2420, + 0x391bc: 0x6d675020, 0x391bd: 0x6d675220, 0x391be: 0x6d912e20, 0x391bf: 0x6db4d220, + // Block 0xe47, offset 0x391c0 + 0x391c0: 0x6db4d420, 0x391c1: 0x6db4d620, 0x391c2: 0x6dd3a420, 0x391c3: 0x6dd3a620, + 0x391c4: 0x6decaa20, 0x391c5: 0x6e13ce20, 0x391c6: 0x6e218a20, 0x391c7: 0x6c0a6220, + 0x391c8: 0x6c269020, 0x391c9: 0x6c269220, 0x391ca: 0x6c269420, 0x391cb: 0x6c269620, + 0x391cc: 0x6c269820, 0x391cd: 0x6c404c20, 0x391ce: 0x6c404e20, 0x391cf: 0x6c405020, + 0x391d0: 0x6c405220, 0x391d1: 0x6c405420, 0x391d2: 0x6c405620, 0x391d3: 0x6c405820, + 0x391d4: 0x6c405a20, 0x391d5: 0x6c405c20, 0x391d6: 0x6c405e20, 0x391d7: 0x6c406020, + 0x391d8: 0x6c406220, 0x391d9: 0x6c406420, 0x391da: 0x6c406620, 0x391db: 0x6c406820, + 0x391dc: 0x6c406a20, 0x391dd: 0x6c601e20, 0x391de: 0x6c602020, 0x391df: 0x6c602220, + 0x391e0: 0x6c602420, 0x391e1: 0x6c602620, 0x391e2: 0x6c602820, 0x391e3: 0x6c602a20, + 0x391e4: 0x6c602c20, 0x391e5: 0x6c602e20, 0x391e6: 0x6c603020, 0x391e7: 0x6c603220, + 0x391e8: 0x6c603420, 0x391e9: 0x6c603620, 0x391ea: 0x6c603820, 0x391eb: 0x6c603a20, + 0x391ec: 0x6c603c20, 0x391ed: 0x6c603e20, 0x391ee: 0x6c604020, 0x391ef: 0x6c604220, + 0x391f0: 0x6c604420, 0x391f1: 0x6c604620, 0x391f2: 0x6c604820, 0x391f3: 0x6c604a20, + 0x391f4: 0x6c604c20, 0x391f5: 0x6c604e20, 0x391f6: 0x6c605020, 0x391f7: 0x6c605220, + 0x391f8: 0x6c605420, 0x391f9: 0x6c605620, 0x391fa: 0x6c605820, 0x391fb: 0x6c605a20, + 0x391fc: 0x6c605c20, 0x391fd: 0x6c85dc20, 0x391fe: 0x6caf9220, 0x391ff: 0x6c85de20, + // Block 0xe48, offset 0x39200 + 0x39200: 0x6c85e020, 0x39201: 0x6c85e220, 0x39202: 0x6c85e420, 0x39203: 0x6c85e620, + 0x39204: 0x6c85e820, 0x39205: 0x6c85ea20, 0x39206: 0x6c85ec20, 0x39207: 0x6c85ee20, + 0x39208: 0x6c85f020, 0x39209: 0x6c85f220, 0x3920a: 0x6c85f420, 0x3920b: 0x6c85f620, + 0x3920c: 0x6c85f820, 0x3920d: 0x6c85fa20, 0x3920e: 0x6c85fc20, 0x3920f: 0x6c85fe20, + 0x39210: 0x6c860020, 0x39211: 0x6c860220, 0x39212: 0x6c860420, 0x39213: 0x6c860620, + 0x39214: 0x6c860820, 0x39215: 0x6c860a20, 0x39216: 0x6c860c20, 0x39217: 0x6c860e20, + 0x39218: 0x6c861020, 0x39219: 0x6c861220, 0x3921a: 0x6c861420, 0x3921b: 0x6c861620, + 0x3921c: 0x6c861820, 0x3921d: 0x6c861a20, 0x3921e: 0x6caf9420, 0x3921f: 0x6caf9620, + 0x39220: 0x6caf9820, 0x39221: 0x6caf9a20, 0x39222: 0x6caf9c20, 0x39223: 0x6caf9e20, + 0x39224: 0x6cafa020, 0x39225: 0x6cafa220, 0x39226: 0x6cafa420, 0x39227: 0x6cafa620, + 0x39228: 0x6cafa820, 0x39229: 0x6cafaa20, 0x3922a: 0x6cafac20, 0x3922b: 0x6cafae20, + 0x3922c: 0x6cafb020, 0x3922d: 0x6cafb220, 0x3922e: 0x6cafb420, 0x3922f: 0x6cafb620, + 0x39230: 0x6cafb820, 0x39231: 0x6cafba20, 0x39232: 0x6cafbc20, 0x39233: 0x6cafbe20, + 0x39234: 0x6cafc020, 0x39235: 0x6cafc220, 0x39236: 0x6cafc420, 0x39237: 0x6cafc620, + 0x39238: 0x6cafc820, 0x39239: 0x6cafca20, 0x3923a: 0x6cafcc20, 0x3923b: 0x6cafce20, + 0x3923c: 0x6cafd020, 0x3923d: 0x6cafd220, 0x3923e: 0x6cafd420, 0x3923f: 0x6cafd620, + // Block 0xe49, offset 0x39240 + 0x39240: 0x6cdeac20, 0x39241: 0x6cdeae20, 0x39242: 0x6cdeb020, 0x39243: 0x6cdeb220, + 0x39244: 0x6cdeb420, 0x39245: 0x6cdeb620, 0x39246: 0x6cdeb820, 0x39247: 0x6cdeba20, + 0x39248: 0x6cdebc20, 0x39249: 0x6cdebe20, 0x3924a: 0x6cdec020, 0x3924b: 0x6cdec220, + 0x3924c: 0x6cdec420, 0x3924d: 0x6cdec620, 0x3924e: 0x6cdec820, 0x3924f: 0x6cdeca20, + 0x39250: 0x6cdecc20, 0x39251: 0x6cdece20, 0x39252: 0x6cded020, 0x39253: 0x6cded220, + 0x39254: 0x6cded420, 0x39255: 0x6cded620, 0x39256: 0x6cded820, 0x39257: 0x6cdeda20, + 0x39258: 0x6cdedc20, 0x39259: 0x6cdede20, 0x3925a: 0x6cdee020, 0x3925b: 0x6cdee220, + 0x3925c: 0x6cdee420, 0x3925d: 0x6cdee620, 0x3925e: 0x6cdee820, 0x3925f: 0x6cdeea20, + 0x39260: 0x6cdeec20, 0x39261: 0x6cdeee20, 0x39262: 0x6cdef020, 0x39263: 0x6cdef220, + 0x39264: 0x6d0d1420, 0x39265: 0x6d0d1620, 0x39266: 0x6d0d1820, 0x39267: 0x6d0d1a20, + 0x39268: 0x6d0d1c20, 0x39269: 0x6d0d1e20, 0x3926a: 0x6d0d2020, 0x3926b: 0x6d0d2220, + 0x3926c: 0x6d0d2420, 0x3926d: 0x6d0d2620, 0x3926e: 0x6d0d2820, 0x3926f: 0x6d0d2a20, + 0x39270: 0x6d0d2c20, 0x39271: 0x6d0d2e20, 0x39272: 0x6d0d3020, 0x39273: 0x6d0d3220, + 0x39274: 0x6d0d3420, 0x39275: 0x6d0d3620, 0x39276: 0x6d0d3820, 0x39277: 0x6d0d3a20, + 0x39278: 0x6d0d3c20, 0x39279: 0x6d0d3e20, 0x3927a: 0x6d0d4020, 0x3927b: 0x6d3b8420, + 0x3927c: 0x6d0d4220, 0x3927d: 0x6d0d4420, 0x3927e: 0x6d0d4620, 0x3927f: 0x6d0d4820, + // Block 0xe4a, offset 0x39280 + 0x39280: 0x6d0d4a20, 0x39281: 0x6d0d4c20, 0x39282: 0x6d0d4e20, 0x39283: 0x6d0d5020, + 0x39284: 0x6d0d5220, 0x39285: 0x6d0d5420, 0x39286: 0x6d0d5620, 0x39287: 0x6d0d5820, + 0x39288: 0x6d0d5a20, 0x39289: 0x6d0d5c20, 0x3928a: 0x6d0d5e20, 0x3928b: 0x6d0d6020, + 0x3928c: 0x6d0d6220, 0x3928d: 0x6d0d6420, 0x3928e: 0x6d0d6620, 0x3928f: 0x6d3b8620, + 0x39290: 0x6d3b8820, 0x39291: 0x6d3b8a20, 0x39292: 0x6d3b8c20, 0x39293: 0x6d3b8e20, + 0x39294: 0x6d3b9020, 0x39295: 0x6d3b9220, 0x39296: 0x6d3b9420, 0x39297: 0x6d3b9620, + 0x39298: 0x6d3b9820, 0x39299: 0x6d3b9a20, 0x3929a: 0x6d3b9c20, 0x3929b: 0x6d3b9e20, + 0x3929c: 0x6d3ba020, 0x3929d: 0x6d3ba220, 0x3929e: 0x6d3ba420, 0x3929f: 0x6d3ba620, + 0x392a0: 0x6d3ba820, 0x392a1: 0x6d3baa20, 0x392a2: 0x6d3bac20, 0x392a3: 0x6d3bae20, + 0x392a4: 0x6d3bb020, 0x392a5: 0x6d3bb220, 0x392a6: 0x6d3bb420, 0x392a7: 0x6d3bb620, + 0x392a8: 0x6d3bb820, 0x392a9: 0x6d3bba20, 0x392aa: 0x6d3bbc20, 0x392ab: 0x6d3bbe20, + 0x392ac: 0x6d3bc020, 0x392ad: 0x6d3bc220, 0x392ae: 0x6d3bc420, 0x392af: 0x6d3bc620, + 0x392b0: 0x6d3bc820, 0x392b1: 0x6d3bca20, 0x392b2: 0x6d3bcc20, 0x392b3: 0x6d3bce20, + 0x392b4: 0x6d3bd020, 0x392b5: 0x6d3bd220, 0x392b6: 0x6d3bd420, 0x392b7: 0x6d3bd620, + 0x392b8: 0x6d67a020, 0x392b9: 0x6d67a220, 0x392ba: 0x6d67a420, 0x392bb: 0x6d67a620, + 0x392bc: 0x6d67a820, 0x392bd: 0x6d67aa20, 0x392be: 0x6d67ac20, 0x392bf: 0x6d67ae20, + // Block 0xe4b, offset 0x392c0 + 0x392c0: 0x6d67b020, 0x392c1: 0x6d67b220, 0x392c2: 0x6d67b420, 0x392c3: 0x6d67b620, + 0x392c4: 0x6d67b820, 0x392c5: 0x6d67ba20, 0x392c6: 0x6d67bc20, 0x392c7: 0x6d67be20, + 0x392c8: 0x6d67c020, 0x392c9: 0x6d67c220, 0x392ca: 0x6d67c420, 0x392cb: 0x6d67c620, + 0x392cc: 0x6d67c820, 0x392cd: 0x6d67ca20, 0x392ce: 0x6d67cc20, 0x392cf: 0x6d67ce20, + 0x392d0: 0x6d67d020, 0x392d1: 0x6d67d220, 0x392d2: 0x6d67d420, 0x392d3: 0x6d67d620, + 0x392d4: 0x6d67d820, 0x392d5: 0x6d67da20, 0x392d6: 0x6d67dc20, 0x392d7: 0x6d67de20, + 0x392d8: 0x6d67e020, 0x392d9: 0x6d67e220, 0x392da: 0x6d67e420, 0x392db: 0x6d67e620, + 0x392dc: 0x6d67e820, 0x392dd: 0x6d916820, 0x392de: 0x6d916a20, 0x392df: 0x6d916c20, + 0x392e0: 0x6d916e20, 0x392e1: 0x6d917020, 0x392e2: 0x6d917220, 0x392e3: 0x6d917420, + 0x392e4: 0x6d917620, 0x392e5: 0x6d917820, 0x392e6: 0x6d917a20, 0x392e7: 0x6d917c20, + 0x392e8: 0x6d67ea20, 0x392e9: 0x6d917e20, 0x392ea: 0x6d918020, 0x392eb: 0x6d918220, + 0x392ec: 0x6d918420, 0x392ed: 0x6db51820, 0x392ee: 0x6d918620, 0x392ef: 0x6d918820, + 0x392f0: 0x6d918a20, 0x392f1: 0x6d918c20, 0x392f2: 0x6d918e20, 0x392f3: 0x6d919020, + 0x392f4: 0x6d919220, 0x392f5: 0x6d919420, 0x392f6: 0x6d919620, 0x392f7: 0x6d919820, + 0x392f8: 0x6d919a20, 0x392f9: 0x6d919c20, 0x392fa: 0x6d919e20, 0x392fb: 0x6d91a020, + 0x392fc: 0x6d91a220, 0x392fd: 0x6d91a420, 0x392fe: 0x6d91a620, 0x392ff: 0x6d91a820, + // Block 0xe4c, offset 0x39300 + 0x39300: 0x6d91aa20, 0x39301: 0x6d91ac20, 0x39302: 0x6db51a20, 0x39303: 0x6db51c20, + 0x39304: 0x6db51e20, 0x39305: 0x6db52020, 0x39306: 0x6db52220, 0x39307: 0x6db52420, + 0x39308: 0x6db52620, 0x39309: 0x6db52820, 0x3930a: 0x6db52a20, 0x3930b: 0x6db52c20, + 0x3930c: 0x6db52e20, 0x3930d: 0x6db53020, 0x3930e: 0x6db53220, 0x3930f: 0x6db53420, + 0x39310: 0x6db53620, 0x39311: 0x6db53820, 0x39312: 0x6db53a20, 0x39313: 0x6db53c20, + 0x39314: 0x6db53e20, 0x39315: 0x6db54020, 0x39316: 0x6db54220, 0x39317: 0x6db54420, + 0x39318: 0x6db54620, 0x39319: 0x6db54820, 0x3931a: 0x6db54a20, 0x3931b: 0x6db54c20, + 0x3931c: 0x6db54e20, 0x3931d: 0x6db55020, 0x3931e: 0x6db55220, 0x3931f: 0x6db55420, + 0x39320: 0x6db55620, 0x39321: 0x6db55820, 0x39322: 0x6db55a20, 0x39323: 0x6db55c20, + 0x39324: 0x6db55e20, 0x39325: 0x6db56020, 0x39326: 0x6db56220, 0x39327: 0x6db56420, + 0x39328: 0x6db56620, 0x39329: 0x6db56820, 0x3932a: 0x6db56a20, 0x3932b: 0x6db56c20, + 0x3932c: 0x6db56e20, 0x3932d: 0x6db57020, 0x3932e: 0x6db57220, 0x3932f: 0x6db57420, + 0x39330: 0x6db57620, 0x39331: 0x6dd3d220, 0x39332: 0x6dd3d420, 0x39333: 0x6dd3d620, + 0x39334: 0x6dd3d820, 0x39335: 0x6dd3da20, 0x39336: 0x6dd3dc20, 0x39337: 0x6dd3de20, + 0x39338: 0x6dd3e020, 0x39339: 0x6dd3e220, 0x3933a: 0x6dd3e420, 0x3933b: 0x6dd3e620, + 0x3933c: 0x6dd3e820, 0x3933d: 0x6dd3ea20, 0x3933e: 0x6dd3ec20, 0x3933f: 0x6dd3ee20, + // Block 0xe4d, offset 0x39340 + 0x39340: 0x6dd3f020, 0x39341: 0x6dd3f220, 0x39342: 0x6dd3f420, 0x39343: 0x6dd3f620, + 0x39344: 0x6dd3f820, 0x39345: 0x6dd3fa20, 0x39346: 0x6dd3fc20, 0x39347: 0x6dd3fe20, + 0x39348: 0x6dd40020, 0x39349: 0x6dd40220, 0x3934a: 0x6dd40420, 0x3934b: 0x6dd40620, + 0x3934c: 0x6dd40820, 0x3934d: 0x6decca20, 0x3934e: 0x6deccc20, 0x3934f: 0x6decce20, + 0x39350: 0x6decd020, 0x39351: 0x6decd220, 0x39352: 0x6decd420, 0x39353: 0x6decd620, + 0x39354: 0x6decd820, 0x39355: 0x6decda20, 0x39356: 0x6decdc20, 0x39357: 0x6e01f820, + 0x39358: 0x6decde20, 0x39359: 0x6dece020, 0x3935a: 0x6dece220, 0x3935b: 0x6dece420, + 0x3935c: 0x6dece620, 0x3935d: 0x6dece820, 0x3935e: 0x6decea20, 0x3935f: 0x6decec20, + 0x39360: 0x6decee20, 0x39361: 0x6decf020, 0x39362: 0x6decf220, 0x39363: 0x6decf420, + 0x39364: 0x6decf620, 0x39365: 0x6decf820, 0x39366: 0x6decfa20, 0x39367: 0x6e01fa20, + 0x39368: 0x6e01fc20, 0x39369: 0x6e01fe20, 0x3936a: 0x6e020020, 0x3936b: 0x6e020220, + 0x3936c: 0x6e020420, 0x3936d: 0x6e020620, 0x3936e: 0x6e020820, 0x3936f: 0x6e020a20, + 0x39370: 0x6e020c20, 0x39371: 0x6e020e20, 0x39372: 0x6e13de20, 0x39373: 0x6e021020, + 0x39374: 0x6e021220, 0x39375: 0x6e021420, 0x39376: 0x6e13e020, 0x39377: 0x6e13e220, + 0x39378: 0x6e13e420, 0x39379: 0x6e13e620, 0x3937a: 0x6e13e820, 0x3937b: 0x6e13ea20, + 0x3937c: 0x6e13ec20, 0x3937d: 0x6e13ee20, 0x3937e: 0x6e13f020, 0x3937f: 0x6e13f220, + // Block 0xe4e, offset 0x39380 + 0x39380: 0x6e13f420, 0x39381: 0x6e13f620, 0x39382: 0x6e13f820, 0x39383: 0x6e219620, + 0x39384: 0x6e219820, 0x39385: 0x6e219a20, 0x39386: 0x6e219c20, 0x39387: 0x6e219e20, + 0x39388: 0x6e2c2c20, 0x39389: 0x6e2c2e20, 0x3938a: 0x6e2c3020, 0x3938b: 0x6e2c3220, + 0x3938c: 0x6e346820, 0x3938d: 0x6e346a20, 0x3938e: 0x6e346c20, 0x3938f: 0x6e346e20, + 0x39390: 0x6e3a1620, 0x39391: 0x6e3a1820, 0x39392: 0x6e3a1a20, 0x39393: 0x6e3a1c20, + 0x39394: 0x6e3a1e20, 0x39395: 0x6e3e2820, 0x39396: 0x6e3e2a20, 0x39397: 0x6e3e2c20, + 0x39398: 0x6e410020, 0x39399: 0x6e447820, 0x3939a: 0x6e447a20, 0x3939b: 0x6e45d620, + 0x3939c: 0x6e468e20, 0x3939d: 0x6e469020, 0x3939e: 0x6e470420, 0x3939f: 0x6e470620, + 0x393a0: 0x6c269a20, 0x393a1: 0x6c269c20, 0x393a2: 0x6c269e20, 0x393a3: 0x6c406c20, + 0x393a4: 0x6c606820, 0x393a5: 0x6c606a20, 0x393a6: 0x6c606c20, 0x393a7: 0x6c862420, + 0x393a8: 0x6c862620, 0x393a9: 0x6c862820, 0x393aa: 0x6cafe620, 0x393ab: 0x6cafe820, + 0x393ac: 0x6cafea20, 0x393ad: 0x6cdf0220, 0x393ae: 0x6cdf0420, 0x393af: 0x6d0d7820, + 0x393b0: 0x6d0d7a20, 0x393b1: 0x6d3bdc20, 0x393b2: 0x6d3bde20, 0x393b3: 0x6d3be020, + 0x393b4: 0x6d3be220, 0x393b5: 0x6d3be420, 0x393b6: 0x6d3be620, 0x393b7: 0x6d3be820, + 0x393b8: 0x6d3bea20, 0x393b9: 0x6d67f220, 0x393ba: 0x6d67f420, 0x393bb: 0x6d67f620, + 0x393bc: 0x6d91ba20, 0x393bd: 0x6d91bc20, 0x393be: 0x6d91be20, 0x393bf: 0x6db57e20, + // Block 0xe4f, offset 0x393c0 + 0x393c0: 0x6dd41020, 0x393c1: 0x6dd41220, 0x393c2: 0x6ded0220, 0x393c3: 0x6e021820, + 0x393c4: 0x6e13fa20, 0x393c5: 0x6e3a2220, 0x393c6: 0x6c406e20, 0x393c7: 0x6c407020, + 0x393c8: 0x6c607020, 0x393c9: 0x6c863220, 0x393ca: 0x6c863420, 0x393cb: 0x6c863620, + 0x393cc: 0x6c863820, 0x393cd: 0x6c863a20, 0x393ce: 0x6cb00020, 0x393cf: 0x6cb00220, + 0x393d0: 0x6cb00420, 0x393d1: 0x6cb00620, 0x393d2: 0x6cb00820, 0x393d3: 0x6cb00a20, + 0x393d4: 0x6cb00c20, 0x393d5: 0x6cb00e20, 0x393d6: 0x6cb01020, 0x393d7: 0x6cb01220, + 0x393d8: 0x6cb01420, 0x393d9: 0x6cb01620, 0x393da: 0x6cb01820, 0x393db: 0x6cb01a20, + 0x393dc: 0x6cdf1a20, 0x393dd: 0x6cdf1c20, 0x393de: 0x6cdf1e20, 0x393df: 0x6cdf2020, + 0x393e0: 0x6cdf2220, 0x393e1: 0x6cdf2420, 0x393e2: 0x6cdf2620, 0x393e3: 0x6cdf2820, + 0x393e4: 0x6cdf2a20, 0x393e5: 0x6cdf2c20, 0x393e6: 0x6cdf2e20, 0x393e7: 0x6cdf3020, + 0x393e8: 0x6d0d8420, 0x393e9: 0x6d0d8620, 0x393ea: 0x6d0d8820, 0x393eb: 0x6d0d8a20, + 0x393ec: 0x6d0d8c20, 0x393ed: 0x6d0d8e20, 0x393ee: 0x6d0d9020, 0x393ef: 0x6d0d9220, + 0x393f0: 0x6d0d9420, 0x393f1: 0x6d0d9620, 0x393f2: 0x6d0d9820, 0x393f3: 0x6d0d9a20, + 0x393f4: 0x6d0d9c20, 0x393f5: 0x6d0d9e20, 0x393f6: 0x6d0da020, 0x393f7: 0x6d0da220, + 0x393f8: 0x6d0da420, 0x393f9: 0x6d0da620, 0x393fa: 0x6d0da820, 0x393fb: 0x6d3bfa20, + 0x393fc: 0x6d3bfc20, 0x393fd: 0x6d3bfe20, 0x393fe: 0x6d3c0020, 0x393ff: 0x6d3c0220, + // Block 0xe50, offset 0x39400 + 0x39400: 0x6d3c0420, 0x39401: 0x6d3c0620, 0x39402: 0x6d3c0820, 0x39403: 0x6d3c0a20, + 0x39404: 0x6d3c0c20, 0x39405: 0x6d3c0e20, 0x39406: 0x6d3c1020, 0x39407: 0x6d3c1220, + 0x39408: 0x6d3c1420, 0x39409: 0x6d3c1620, 0x3940a: 0x6d3c1820, 0x3940b: 0x6d680420, + 0x3940c: 0x6d680620, 0x3940d: 0x6d680820, 0x3940e: 0x6d680a20, 0x3940f: 0x6d680c20, + 0x39410: 0x6d680e20, 0x39411: 0x6d681020, 0x39412: 0x6d681220, 0x39413: 0x6d681420, + 0x39414: 0x6d681620, 0x39415: 0x6d681820, 0x39416: 0x6d681a20, 0x39417: 0x6d681c20, + 0x39418: 0x6d681e20, 0x39419: 0x6d682020, 0x3941a: 0x6d682220, 0x3941b: 0x6d682420, + 0x3941c: 0x6d682620, 0x3941d: 0x6d682820, 0x3941e: 0x6d682a20, 0x3941f: 0x6d682c20, + 0x39420: 0x6d682e20, 0x39421: 0x6d91d220, 0x39422: 0x6d91d420, 0x39423: 0x6d91d620, + 0x39424: 0x6d91d820, 0x39425: 0x6d91da20, 0x39426: 0x6d91dc20, 0x39427: 0x6d91de20, + 0x39428: 0x6d91e020, 0x39429: 0x6d91e220, 0x3942a: 0x6d91e420, 0x3942b: 0x6d91e620, + 0x3942c: 0x6d91e820, 0x3942d: 0x6d91ea20, 0x3942e: 0x6d91ec20, 0x3942f: 0x6d91ee20, + 0x39430: 0x6d91f020, 0x39431: 0x6d91f220, 0x39432: 0x6d91f420, 0x39433: 0x6d91f620, + 0x39434: 0x6d91f820, 0x39435: 0x6d91fa20, 0x39436: 0x6d91fc20, 0x39437: 0x6db59020, + 0x39438: 0x6db59220, 0x39439: 0x6db59420, 0x3943a: 0x6db59620, 0x3943b: 0x6db59820, + 0x3943c: 0x6db59a20, 0x3943d: 0x6db59c20, 0x3943e: 0x6db59e20, 0x3943f: 0x6db5a020, + // Block 0xe51, offset 0x39440 + 0x39440: 0x6db5a220, 0x39441: 0x6db5a420, 0x39442: 0x6dd42020, 0x39443: 0x6dd42220, + 0x39444: 0x6dd42420, 0x39445: 0x6dd42620, 0x39446: 0x6dd42820, 0x39447: 0x6dd42a20, + 0x39448: 0x6dd42c20, 0x39449: 0x6dd42e20, 0x3944a: 0x6dd43020, 0x3944b: 0x6dd43220, + 0x3944c: 0x6ded1820, 0x3944d: 0x6ded1a20, 0x3944e: 0x6ded1c20, 0x3944f: 0x6ded1e20, + 0x39450: 0x6ded2020, 0x39451: 0x6ded2220, 0x39452: 0x6e022020, 0x39453: 0x6e022220, + 0x39454: 0x6e022420, 0x39455: 0x6e022620, 0x39456: 0x6e022820, 0x39457: 0x6e022a20, + 0x39458: 0x6e140220, 0x39459: 0x6e140420, 0x3945a: 0x6e140620, 0x3945b: 0x6e140820, + 0x3945c: 0x6e21a820, 0x3945d: 0x6e21aa20, 0x3945e: 0x6e21ac20, 0x3945f: 0x6e21ae20, + 0x39460: 0x6e21b020, 0x39461: 0x6e21b220, 0x39462: 0x6e347020, 0x39463: 0x6e347220, + 0x39464: 0x6e347420, 0x39465: 0x6e347620, 0x39466: 0x6e3a2620, 0x39467: 0x6e3a2820, + 0x39468: 0x6e3a2a20, 0x39469: 0x6e3a2c20, 0x3946a: 0x6e3a2e20, 0x3946b: 0x6e3a3020, + 0x3946c: 0x6e3e3020, 0x3946d: 0x6e410220, 0x3946e: 0x6e430c20, 0x3946f: 0x6e46b420, + 0x39470: 0x6e470820, 0x39471: 0x6e473020, 0x39472: 0x6c26a820, 0x39473: 0x6c407620, + 0x39474: 0x6c608020, 0x39475: 0x6c608220, 0x39476: 0x6c608420, 0x39477: 0x6c864220, + 0x39478: 0x6c864420, 0x39479: 0x6c864620, 0x3947a: 0x6c864820, 0x3947b: 0x6cb02a20, + 0x3947c: 0x6cb02c20, 0x3947d: 0x6cb02e20, 0x3947e: 0x6cb03020, 0x3947f: 0x6cb03220, + // Block 0xe52, offset 0x39480 + 0x39480: 0x6cb03420, 0x39481: 0x6cb03620, 0x39482: 0x6cb03820, 0x39483: 0x6cb03a20, + 0x39484: 0x6cb03c20, 0x39485: 0x6cb03e20, 0x39486: 0x6cb04020, 0x39487: 0x6cb04220, + 0x39488: 0x6cb04420, 0x39489: 0x6cb04620, 0x3948a: 0x6cb04820, 0x3948b: 0x6cb04a20, + 0x3948c: 0x6cb04c20, 0x3948d: 0x6cb04e20, 0x3948e: 0x6cb05020, 0x3948f: 0x6cb05220, + 0x39490: 0x6cb05420, 0x39491: 0x6cdf4020, 0x39492: 0x6cdf4220, 0x39493: 0x6cdf4420, + 0x39494: 0x6cdf4620, 0x39495: 0x6cdf4820, 0x39496: 0x6cdf4a20, 0x39497: 0x6cdf4c20, + 0x39498: 0x6cdf4e20, 0x39499: 0x6cdf5020, 0x3949a: 0x6cdf5220, 0x3949b: 0x6cdf5420, + 0x3949c: 0x6cdf5620, 0x3949d: 0x6cdf5820, 0x3949e: 0x6cdf5a20, 0x3949f: 0x6cdf5c20, + 0x394a0: 0x6cdf5e20, 0x394a1: 0x6d0dca20, 0x394a2: 0x6d0dcc20, 0x394a3: 0x6d0dce20, + 0x394a4: 0x6d0dd020, 0x394a5: 0x6d0dd220, 0x394a6: 0x6d0dd420, 0x394a7: 0x6d0dd620, + 0x394a8: 0x6d3c2a20, 0x394a9: 0x6d3c2c20, 0x394aa: 0x6d3c2e20, 0x394ab: 0x6d3c3020, + 0x394ac: 0x6d3c3220, 0x394ad: 0x6d3c3420, 0x394ae: 0x6d3c3620, 0x394af: 0x6d3c3820, + 0x394b0: 0x6d3c3a20, 0x394b1: 0x6d3c3c20, 0x394b2: 0x6d3c3e20, 0x394b3: 0x6d3c4020, + 0x394b4: 0x6d684c20, 0x394b5: 0x6d684e20, 0x394b6: 0x6d685020, 0x394b7: 0x6d685220, + 0x394b8: 0x6d685420, 0x394b9: 0x6d685620, 0x394ba: 0x6d685820, 0x394bb: 0x6d685a20, + 0x394bc: 0x6d685c20, 0x394bd: 0x6d685e20, 0x394be: 0x6d686020, 0x394bf: 0x6d686220, + // Block 0xe53, offset 0x394c0 + 0x394c0: 0x6d686420, 0x394c1: 0x6d686620, 0x394c2: 0x6d686820, 0x394c3: 0x6d686a20, + 0x394c4: 0x6d686c20, 0x394c5: 0x6d686e20, 0x394c6: 0x6d687020, 0x394c7: 0x6d687220, + 0x394c8: 0x6d687420, 0x394c9: 0x6d687620, 0x394ca: 0x6d687820, 0x394cb: 0x6d920c20, + 0x394cc: 0x6d920e20, 0x394cd: 0x6d921020, 0x394ce: 0x6d921220, 0x394cf: 0x6d921420, + 0x394d0: 0x6d921620, 0x394d1: 0x6d921820, 0x394d2: 0x6d921a20, 0x394d3: 0x6d921c20, + 0x394d4: 0x6d921e20, 0x394d5: 0x6d922020, 0x394d6: 0x6d922220, 0x394d7: 0x6d922420, + 0x394d8: 0x6d922620, 0x394d9: 0x6d922820, 0x394da: 0x6d922a20, 0x394db: 0x6db5b020, + 0x394dc: 0x6db5b220, 0x394dd: 0x6db5b420, 0x394de: 0x6db5b620, 0x394df: 0x6db5b820, + 0x394e0: 0x6db5ba20, 0x394e1: 0x6db5bc20, 0x394e2: 0x6d922c20, 0x394e3: 0x6db5be20, + 0x394e4: 0x6db5c020, 0x394e5: 0x6db5c220, 0x394e6: 0x6db5c420, 0x394e7: 0x6db5c620, + 0x394e8: 0x6db5c820, 0x394e9: 0x6db5ca20, 0x394ea: 0x6db5cc20, 0x394eb: 0x6db5ce20, + 0x394ec: 0x6db5d020, 0x394ed: 0x6db5d220, 0x394ee: 0x6db5d420, 0x394ef: 0x6dd43c20, + 0x394f0: 0x6dd43e20, 0x394f1: 0x6dd44020, 0x394f2: 0x6dd44220, 0x394f3: 0x6dd44420, + 0x394f4: 0x6dd44620, 0x394f5: 0x6dd44820, 0x394f6: 0x6dd44a20, 0x394f7: 0x6dd44c20, + 0x394f8: 0x6dd44e20, 0x394f9: 0x6dd45020, 0x394fa: 0x6ded2e20, 0x394fb: 0x6ded3020, + 0x394fc: 0x6ded3220, 0x394fd: 0x6ded3420, 0x394fe: 0x6ded3620, 0x394ff: 0x6ded3820, + // Block 0xe54, offset 0x39500 + 0x39500: 0x6ded3a20, 0x39501: 0x6ded3c20, 0x39502: 0x6ded3e20, 0x39503: 0x6ded4020, + 0x39504: 0x6e023820, 0x39505: 0x6e023a20, 0x39506: 0x6e023c20, 0x39507: 0x6e023e20, + 0x39508: 0x6e140c20, 0x39509: 0x6e140e20, 0x3950a: 0x6e141020, 0x3950b: 0x6e141220, + 0x3950c: 0x6e21b820, 0x3950d: 0x6e21ba20, 0x3950e: 0x6e21bc20, 0x3950f: 0x6e21be20, + 0x39510: 0x6e21c020, 0x39511: 0x6e2c4020, 0x39512: 0x6e2c4220, 0x39513: 0x6e347820, + 0x39514: 0x6e347a20, 0x39515: 0x6e3a3a20, 0x39516: 0x6e3e3220, 0x39517: 0x6e430e20, + 0x39518: 0x6e431020, 0x39519: 0x6e447c20, 0x3951a: 0x6e447e20, 0x3951b: 0x6c26ae20, + 0x3951c: 0x6c26b020, 0x3951d: 0x6c407820, 0x3951e: 0x6c407a20, 0x3951f: 0x6c407c20, + 0x39520: 0x6c609a20, 0x39521: 0x6c867220, 0x39522: 0x6c867420, 0x39523: 0x6c867620, + 0x39524: 0x6c867820, 0x39525: 0x6c867a20, 0x39526: 0x6c867c20, 0x39527: 0x6c867e20, + 0x39528: 0x6c868020, 0x39529: 0x6c868220, 0x3952a: 0x6c868420, 0x3952b: 0x6c868620, + 0x3952c: 0x6c868820, 0x3952d: 0x6c868a20, 0x3952e: 0x6cb0aa20, 0x3952f: 0x6cb0ac20, + 0x39530: 0x6cb0ae20, 0x39531: 0x6cb0b020, 0x39532: 0x6cb0b220, 0x39533: 0x6cb0b420, + 0x39534: 0x6cb0b620, 0x39535: 0x6cb0b820, 0x39536: 0x6cb0ba20, 0x39537: 0x6cb0bc20, + 0x39538: 0x6cb0be20, 0x39539: 0x6cb0c020, 0x3953a: 0x6cb0c220, 0x3953b: 0x6cb0c420, + 0x3953c: 0x6cb0c620, 0x3953d: 0x6cb0c820, 0x3953e: 0x6cb0ca20, 0x3953f: 0x6cb0cc20, + // Block 0xe55, offset 0x39540 + 0x39540: 0x6cb0ce20, 0x39541: 0x6cb0d020, 0x39542: 0x6cb0d220, 0x39543: 0x6cb0d420, + 0x39544: 0x6cb0d620, 0x39545: 0x6cb0d820, 0x39546: 0x6cb0da20, 0x39547: 0x6cb0dc20, + 0x39548: 0x6cb0de20, 0x39549: 0x6cb0e020, 0x3954a: 0x6cb0e220, 0x3954b: 0x6cb0e420, + 0x3954c: 0x6cb0e620, 0x3954d: 0x6cb0e820, 0x3954e: 0x6cb0ea20, 0x3954f: 0x6cb0ec20, + 0x39550: 0x6cb0ee20, 0x39551: 0x6cb0f020, 0x39552: 0x6cb0f220, 0x39553: 0x6cb0f420, + 0x39554: 0x6cb0f620, 0x39555: 0x6cb0f820, 0x39556: 0x6cb0fa20, 0x39557: 0x6cb0fc20, + 0x39558: 0x6cb0fe20, 0x39559: 0x6cb10020, 0x3955a: 0x6cb10220, 0x3955b: 0x6cb10420, + 0x3955c: 0x6cdfd620, 0x3955d: 0x6cdfd820, 0x3955e: 0x6cdfda20, 0x3955f: 0x6cdfdc20, + 0x39560: 0x6cdfde20, 0x39561: 0x6cdfe020, 0x39562: 0x6cdfe220, 0x39563: 0x6cdfe420, + 0x39564: 0x6cdfe620, 0x39565: 0x6cdfe820, 0x39566: 0x6cdfea20, 0x39567: 0x6cdfec20, + 0x39568: 0x6cdfee20, 0x39569: 0x6cdff020, 0x3956a: 0x6cdff220, 0x3956b: 0x6cdff420, + 0x3956c: 0x6cdff620, 0x3956d: 0x6cdff820, 0x3956e: 0x6cdffa20, 0x3956f: 0x6cdffc20, + 0x39570: 0x6cdffe20, 0x39571: 0x6ce00020, 0x39572: 0x6ce00220, 0x39573: 0x6ce00420, + 0x39574: 0x6ce00620, 0x39575: 0x6ce00820, 0x39576: 0x6ce00a20, 0x39577: 0x6ce00c20, + 0x39578: 0x6ce00e20, 0x39579: 0x6ce01020, 0x3957a: 0x6ce01220, 0x3957b: 0x6ce01420, + 0x3957c: 0x6ce01620, 0x3957d: 0x6ce01820, 0x3957e: 0x6ce01a20, 0x3957f: 0x6ce01c20, + // Block 0xe56, offset 0x39580 + 0x39580: 0x6ce01e20, 0x39581: 0x6ce02020, 0x39582: 0x6ce02220, 0x39583: 0x6d0e4a20, + 0x39584: 0x6d0e4c20, 0x39585: 0x6d0e4e20, 0x39586: 0x6d0e5020, 0x39587: 0x6d0e5220, + 0x39588: 0x6d0e5420, 0x39589: 0x6d0e5620, 0x3958a: 0x6d0e5820, 0x3958b: 0x6d0e5a20, + 0x3958c: 0x6d0e5c20, 0x3958d: 0x6d0e5e20, 0x3958e: 0x6d0e6020, 0x3958f: 0x6d0e6220, + 0x39590: 0x6d0e6420, 0x39591: 0x6d0e6620, 0x39592: 0x6d0e6820, 0x39593: 0x6d0e6a20, + 0x39594: 0x6d0e6c20, 0x39595: 0x6d0e6e20, 0x39596: 0x6d0e7020, 0x39597: 0x6d0e7220, + 0x39598: 0x6d0e7420, 0x39599: 0x6d0e7620, 0x3959a: 0x6d0e7820, 0x3959b: 0x6d0e7a20, + 0x3959c: 0x6d0e7c20, 0x3959d: 0x6d0e7e20, 0x3959e: 0x6d0e8020, 0x3959f: 0x6d0e8220, + 0x395a0: 0x6d0e8420, 0x395a1: 0x6d0e8620, 0x395a2: 0x6d0e8820, 0x395a3: 0x6d0e8a20, + 0x395a4: 0x6d0e8c20, 0x395a5: 0x6d0e8e20, 0x395a6: 0x6d0e9020, 0x395a7: 0x6d0e9220, + 0x395a8: 0x6d0e9420, 0x395a9: 0x6d0e9620, 0x395aa: 0x6d0e9820, 0x395ab: 0x6d0e9a20, + 0x395ac: 0x6d0e9c20, 0x395ad: 0x6d0e9e20, 0x395ae: 0x6d0ea020, 0x395af: 0x6d0ea220, + 0x395b0: 0x6d0ea420, 0x395b1: 0x6d0ea620, 0x395b2: 0x6d0ea820, 0x395b3: 0x6d0eaa20, + 0x395b4: 0x6d3c9e20, 0x395b5: 0x6d3ca020, 0x395b6: 0x6d3ca220, 0x395b7: 0x6d3ca420, + 0x395b8: 0x6d3ca620, 0x395b9: 0x6d3ca820, 0x395ba: 0x6d3caa20, 0x395bb: 0x6d3cac20, + 0x395bc: 0x6d3cae20, 0x395bd: 0x6d3cb020, 0x395be: 0x6d3cb220, 0x395bf: 0x6d3cb420, + // Block 0xe57, offset 0x395c0 + 0x395c0: 0x6d3cb620, 0x395c1: 0x6d3cb820, 0x395c2: 0x6d3cba20, 0x395c3: 0x6d3cbc20, + 0x395c4: 0x6d3cbe20, 0x395c5: 0x6d3cc020, 0x395c6: 0x6d3cc220, 0x395c7: 0x6d3cc420, + 0x395c8: 0x6d3cc620, 0x395c9: 0x6d3cc820, 0x395ca: 0x6d3cca20, 0x395cb: 0x6d3ccc20, + 0x395cc: 0x6d3cce20, 0x395cd: 0x6d3cd020, 0x395ce: 0x6d3cd220, 0x395cf: 0x6d3cd420, + 0x395d0: 0x6d3cd620, 0x395d1: 0x6d3cd820, 0x395d2: 0x6d3cda20, 0x395d3: 0x6d3cdc20, + 0x395d4: 0x6d3cde20, 0x395d5: 0x6d3ce020, 0x395d6: 0x6d3ce220, 0x395d7: 0x6d3ce420, + 0x395d8: 0x6d3ce620, 0x395d9: 0x6d3ce820, 0x395da: 0x6d3cea20, 0x395db: 0x6d3cec20, + 0x395dc: 0x6d0eac20, 0x395dd: 0x6d3cee20, 0x395de: 0x6d3cf020, 0x395df: 0x6d3cf220, + 0x395e0: 0x6d3cf420, 0x395e1: 0x6d3cf620, 0x395e2: 0x6d3cf820, 0x395e3: 0x6d3cfa20, + 0x395e4: 0x6d3cfc20, 0x395e5: 0x6d3cfe20, 0x395e6: 0x6d68f820, 0x395e7: 0x6d68fa20, + 0x395e8: 0x6d68fc20, 0x395e9: 0x6d68fe20, 0x395ea: 0x6d690020, 0x395eb: 0x6d690220, + 0x395ec: 0x6d690420, 0x395ed: 0x6d690620, 0x395ee: 0x6d690820, 0x395ef: 0x6d690a20, + 0x395f0: 0x6d690c20, 0x395f1: 0x6d690e20, 0x395f2: 0x6d691020, 0x395f3: 0x6d691220, + 0x395f4: 0x6d691420, 0x395f5: 0x6d691620, 0x395f6: 0x6d691820, 0x395f7: 0x6d691a20, + 0x395f8: 0x6d691c20, 0x395f9: 0x6d691e20, 0x395fa: 0x6d692020, 0x395fb: 0x6d692220, + 0x395fc: 0x6d692420, 0x395fd: 0x6d692620, 0x395fe: 0x6d692820, 0x395ff: 0x6d692a20, + // Block 0xe58, offset 0x39600 + 0x39600: 0x6d692c20, 0x39601: 0x6d692e20, 0x39602: 0x6d693020, 0x39603: 0x6d693220, + 0x39604: 0x6d693420, 0x39605: 0x6d693620, 0x39606: 0x6d693820, 0x39607: 0x6d693a20, + 0x39608: 0x6d693c20, 0x39609: 0x6d693e20, 0x3960a: 0x6d694020, 0x3960b: 0x6d694220, + 0x3960c: 0x6d694420, 0x3960d: 0x6d694620, 0x3960e: 0x6d694820, 0x3960f: 0x6d694a20, + 0x39610: 0x6d694c20, 0x39611: 0x6d694e20, 0x39612: 0x6d695020, 0x39613: 0x6d695220, + 0x39614: 0x6d695420, 0x39615: 0x6d695620, 0x39616: 0x6d695820, 0x39617: 0x6d695a20, + 0x39618: 0x6d695c20, 0x39619: 0x6d695e20, 0x3961a: 0x6d696020, 0x3961b: 0x6d696220, + 0x3961c: 0x6d696420, 0x3961d: 0x6d696620, 0x3961e: 0x6d696820, 0x3961f: 0x6d696a20, + 0x39620: 0x6d696c20, 0x39621: 0x6d696e20, 0x39622: 0x6d697020, 0x39623: 0x6d928820, + 0x39624: 0x6d928a20, 0x39625: 0x6d928c20, 0x39626: 0x6d928e20, 0x39627: 0x6d929020, + 0x39628: 0x6d929220, 0x39629: 0x6d929420, 0x3962a: 0x6d929620, 0x3962b: 0x6d929820, + 0x3962c: 0x6d929a20, 0x3962d: 0x6d929c20, 0x3962e: 0x6d929e20, 0x3962f: 0x6d92a020, + 0x39630: 0x6d92a220, 0x39631: 0x6d92a420, 0x39632: 0x6d92a620, 0x39633: 0x6d92a820, + 0x39634: 0x6d92aa20, 0x39635: 0x6d92ac20, 0x39636: 0x6d92ae20, 0x39637: 0x6d92b020, + 0x39638: 0x6d92b220, 0x39639: 0x6d92b420, 0x3963a: 0x6d92b620, 0x3963b: 0x6d92b820, + 0x3963c: 0x6d92ba20, 0x3963d: 0x6d92bc20, 0x3963e: 0x6d92be20, 0x3963f: 0x6d92c020, + // Block 0xe59, offset 0x39640 + 0x39640: 0x6d92c220, 0x39641: 0x6d92c420, 0x39642: 0x6d92c620, 0x39643: 0x6d92c820, + 0x39644: 0x6d92ca20, 0x39645: 0x6d92cc20, 0x39646: 0x6d92ce20, 0x39647: 0x6d92d020, + 0x39648: 0x6d92d220, 0x39649: 0x6d92d420, 0x3964a: 0x6d92d620, 0x3964b: 0x6d92d820, + 0x3964c: 0x6d92da20, 0x3964d: 0x6d92dc20, 0x3964e: 0x6d92de20, 0x3964f: 0x6d92e020, + 0x39650: 0x6d92e220, 0x39651: 0x6d92e420, 0x39652: 0x6d92e620, 0x39653: 0x6d92e820, + 0x39654: 0x6d92ea20, 0x39655: 0x6d92ec20, 0x39656: 0x6d92ee20, 0x39657: 0x6d92f020, + 0x39658: 0x6db61e20, 0x39659: 0x6db62020, 0x3965a: 0x6db62220, 0x3965b: 0x6db62420, + 0x3965c: 0x6db62620, 0x3965d: 0x6db62820, 0x3965e: 0x6db62a20, 0x3965f: 0x6db62c20, + 0x39660: 0x6db62e20, 0x39661: 0x6db63020, 0x39662: 0x6db63220, 0x39663: 0x6db63420, + 0x39664: 0x6db63620, 0x39665: 0x6db63820, 0x39666: 0x6db63a20, 0x39667: 0x6db63c20, + 0x39668: 0x6db63e20, 0x39669: 0x6db64020, 0x3966a: 0x6db64220, 0x3966b: 0x6db64420, + 0x3966c: 0x6db64620, 0x3966d: 0x6db64820, 0x3966e: 0x6db64a20, 0x3966f: 0x6db64c20, + 0x39670: 0x6db64e20, 0x39671: 0x6db65020, 0x39672: 0x6db65220, 0x39673: 0x6db65420, + 0x39674: 0x6db65620, 0x39675: 0x6db65820, 0x39676: 0x6db65a20, 0x39677: 0x6db65c20, + 0x39678: 0x6db65e20, 0x39679: 0x6db66020, 0x3967a: 0x6db66220, 0x3967b: 0x6db66420, + 0x3967c: 0x6db66620, 0x3967d: 0x6db66820, 0x3967e: 0x6db66a20, 0x3967f: 0x6db66c20, + // Block 0xe5a, offset 0x39680 + 0x39680: 0x6db66e20, 0x39681: 0x6db67020, 0x39682: 0x6db67220, 0x39683: 0x6db67420, + 0x39684: 0x6db67620, 0x39685: 0x6db67820, 0x39686: 0x6db67a20, 0x39687: 0x6db67c20, + 0x39688: 0x6db67e20, 0x39689: 0x6db68020, 0x3968a: 0x6db68220, 0x3968b: 0x6db68420, + 0x3968c: 0x6db68620, 0x3968d: 0x6db68820, 0x3968e: 0x6db68a20, 0x3968f: 0x6db68c20, + 0x39690: 0x6db68e20, 0x39691: 0x6db69020, 0x39692: 0x6dd49a20, 0x39693: 0x6dd49c20, + 0x39694: 0x6dd49e20, 0x39695: 0x6dd4a020, 0x39696: 0x6dd4a220, 0x39697: 0x6dd4a420, + 0x39698: 0x6dd4a620, 0x39699: 0x6dd4a820, 0x3969a: 0x6dd4aa20, 0x3969b: 0x6dd4ac20, + 0x3969c: 0x6dd4ae20, 0x3969d: 0x6dd4b020, 0x3969e: 0x6dd4b220, 0x3969f: 0x6dd4b420, + 0x396a0: 0x6dd4b620, 0x396a1: 0x6dd4b820, 0x396a2: 0x6dd4ba20, 0x396a3: 0x6dd4bc20, + 0x396a4: 0x6dd4be20, 0x396a5: 0x6dd4c020, 0x396a6: 0x6dd4c220, 0x396a7: 0x6dd4c420, + 0x396a8: 0x6dd4c620, 0x396a9: 0x6dd4c820, 0x396aa: 0x6dd4ca20, 0x396ab: 0x6dd4cc20, + 0x396ac: 0x6dd4ce20, 0x396ad: 0x6dd4d020, 0x396ae: 0x6dd4d220, 0x396af: 0x6dd4d420, + 0x396b0: 0x6dd4d620, 0x396b1: 0x6dd4d820, 0x396b2: 0x6dd4da20, 0x396b3: 0x6dd4dc20, + 0x396b4: 0x6dd4de20, 0x396b5: 0x6dd4e020, 0x396b6: 0x6dd4e220, 0x396b7: 0x6dd4e420, + 0x396b8: 0x6dd4e620, 0x396b9: 0x6dd4e820, 0x396ba: 0x6dd4ea20, 0x396bb: 0x6dd4ec20, + 0x396bc: 0x6dd4ee20, 0x396bd: 0x6dd4f020, 0x396be: 0x6ded8820, 0x396bf: 0x6ded8a20, + // Block 0xe5b, offset 0x396c0 + 0x396c0: 0x6ded8c20, 0x396c1: 0x6ded8e20, 0x396c2: 0x6ded9020, 0x396c3: 0x6ded9220, + 0x396c4: 0x6ded9420, 0x396c5: 0x6ded9620, 0x396c6: 0x6ded9820, 0x396c7: 0x6ded9a20, + 0x396c8: 0x6ded9c20, 0x396c9: 0x6ded9e20, 0x396ca: 0x6deda020, 0x396cb: 0x6deda220, + 0x396cc: 0x6deda420, 0x396cd: 0x6deda620, 0x396ce: 0x6deda820, 0x396cf: 0x6dedaa20, + 0x396d0: 0x6dedac20, 0x396d1: 0x6dedae20, 0x396d2: 0x6dedb020, 0x396d3: 0x6dedb220, + 0x396d4: 0x6dedb420, 0x396d5: 0x6dedb620, 0x396d6: 0x6dedb820, 0x396d7: 0x6dedba20, + 0x396d8: 0x6dedbc20, 0x396d9: 0x6dedbe20, 0x396da: 0x6dedc020, 0x396db: 0x6dedc220, + 0x396dc: 0x6dedc420, 0x396dd: 0x6dedc620, 0x396de: 0x6dedc820, 0x396df: 0x6dedca20, + 0x396e0: 0x6dedcc20, 0x396e1: 0x6dedce20, 0x396e2: 0x6dedd020, 0x396e3: 0x6dedd220, + 0x396e4: 0x6dedd420, 0x396e5: 0x6dedd620, 0x396e6: 0x6dedd820, 0x396e7: 0x6e027c20, + 0x396e8: 0x6e027e20, 0x396e9: 0x6e028020, 0x396ea: 0x6e028220, 0x396eb: 0x6e028420, + 0x396ec: 0x6e028620, 0x396ed: 0x6e028820, 0x396ee: 0x6e028a20, 0x396ef: 0x6e028c20, + 0x396f0: 0x6e028e20, 0x396f1: 0x6e029020, 0x396f2: 0x6e029220, 0x396f3: 0x6e029420, + 0x396f4: 0x6e029620, 0x396f5: 0x6e029820, 0x396f6: 0x6e029a20, 0x396f7: 0x6e029c20, + 0x396f8: 0x6e029e20, 0x396f9: 0x6e02a020, 0x396fa: 0x6e02a220, 0x396fb: 0x6e02a420, + 0x396fc: 0x6e02a620, 0x396fd: 0x6e02a820, 0x396fe: 0x6e02aa20, 0x396ff: 0x6e02ac20, + // Block 0xe5c, offset 0x39700 + 0x39700: 0x6e02ae20, 0x39701: 0x6e02b020, 0x39702: 0x6e143820, 0x39703: 0x6e143a20, + 0x39704: 0x6e143c20, 0x39705: 0x6e143e20, 0x39706: 0x6e144020, 0x39707: 0x6e144220, + 0x39708: 0x6e144420, 0x39709: 0x6e144620, 0x3970a: 0x6e144820, 0x3970b: 0x6e144a20, + 0x3970c: 0x6e144c20, 0x3970d: 0x6e144e20, 0x3970e: 0x6e145020, 0x3970f: 0x6e145220, + 0x39710: 0x6e145420, 0x39711: 0x6e21d820, 0x39712: 0x6e145620, 0x39713: 0x6e145820, + 0x39714: 0x6e145a20, 0x39715: 0x6e145c20, 0x39716: 0x6e145e20, 0x39717: 0x6e146020, + 0x39718: 0x6e146220, 0x39719: 0x6e146420, 0x3971a: 0x6e146620, 0x3971b: 0x6e146820, + 0x3971c: 0x6e21da20, 0x3971d: 0x6e21dc20, 0x3971e: 0x6e21de20, 0x3971f: 0x6e21e020, + 0x39720: 0x6e21e220, 0x39721: 0x6e21e420, 0x39722: 0x6e21e620, 0x39723: 0x6e21e820, + 0x39724: 0x6e21ea20, 0x39725: 0x6e21ec20, 0x39726: 0x6e21ee20, 0x39727: 0x6e21f020, + 0x39728: 0x6e21f220, 0x39729: 0x6e21f420, 0x3972a: 0x6e21f620, 0x3972b: 0x6e21f820, + 0x3972c: 0x6e21fa20, 0x3972d: 0x6e21fc20, 0x3972e: 0x6e21fe20, 0x3972f: 0x6e220020, + 0x39730: 0x6e220220, 0x39731: 0x6e220420, 0x39732: 0x6e220620, 0x39733: 0x6e220820, + 0x39734: 0x6e220a20, 0x39735: 0x6e220c20, 0x39736: 0x6e220e20, 0x39737: 0x6e221020, + 0x39738: 0x6e2c5a20, 0x39739: 0x6e2c5c20, 0x3973a: 0x6e2c5e20, 0x3973b: 0x6e2c6020, + 0x3973c: 0x6e2c6220, 0x3973d: 0x6e2c6420, 0x3973e: 0x6e2c6620, 0x3973f: 0x6e2c6820, + // Block 0xe5d, offset 0x39740 + 0x39740: 0x6e2c6a20, 0x39741: 0x6e2c6c20, 0x39742: 0x6e2c6e20, 0x39743: 0x6e2c7020, + 0x39744: 0x6e2c7220, 0x39745: 0x6e348a20, 0x39746: 0x6e348c20, 0x39747: 0x6e348e20, + 0x39748: 0x6e349020, 0x39749: 0x6e349220, 0x3974a: 0x6e349420, 0x3974b: 0x6e349620, + 0x3974c: 0x6e349820, 0x3974d: 0x6e349a20, 0x3974e: 0x6e349c20, 0x3974f: 0x6e349e20, + 0x39750: 0x6e34a020, 0x39751: 0x6e3a4220, 0x39752: 0x6e3a4420, 0x39753: 0x6e3a4620, + 0x39754: 0x6e3a4820, 0x39755: 0x6e3a4a20, 0x39756: 0x6e3a4c20, 0x39757: 0x6e3a4e20, + 0x39758: 0x6e3a5020, 0x39759: 0x6e3e3820, 0x3975a: 0x6e3e3a20, 0x3975b: 0x6e3e3c20, + 0x3975c: 0x6e3e3e20, 0x3975d: 0x6e3e4020, 0x3975e: 0x6e410a20, 0x3975f: 0x6e410c20, + 0x39760: 0x6e410e20, 0x39761: 0x6e411020, 0x39762: 0x6e431220, 0x39763: 0x6e431420, + 0x39764: 0x6e431620, 0x39765: 0x6e428c20, 0x39766: 0x6e431820, 0x39767: 0x6e431a20, + 0x39768: 0x6e448220, 0x39769: 0x6e472020, 0x3976a: 0x6c26d620, 0x3976b: 0x6c26e820, + 0x3976c: 0x6c86c820, 0x3976d: 0x6c86ca20, 0x3976e: 0x6c86cc20, 0x3976f: 0x6cb14620, + 0x39770: 0x6cb14820, 0x39771: 0x6cb14a20, 0x39772: 0x6cb14c20, 0x39773: 0x6ce04c20, + 0x39774: 0x6ce04e20, 0x39775: 0x6d0ec420, 0x39776: 0x6d0ec620, 0x39777: 0x6d0ec820, + 0x39778: 0x6d3d1a20, 0x39779: 0x6d3d1c20, 0x3977a: 0x6d698820, 0x3977b: 0x6d698a20, + 0x3977c: 0x6d698c20, 0x3977d: 0x6d698e20, 0x3977e: 0x6d699020, 0x3977f: 0x6d699220, + // Block 0xe5e, offset 0x39780 + 0x39780: 0x6d930020, 0x39781: 0x6d930220, 0x39782: 0x6d930420, 0x39783: 0x6d930620, + 0x39784: 0x6d930820, 0x39785: 0x6d930a20, 0x39786: 0x6db6a620, 0x39787: 0x6db6a820, + 0x39788: 0x6db6aa20, 0x39789: 0x6db6ac20, 0x3978a: 0x6dd50220, 0x3978b: 0x6dede620, + 0x3978c: 0x6dede820, 0x3978d: 0x6dedea20, 0x3978e: 0x6dedec20, 0x3978f: 0x6dedee20, + 0x39790: 0x6dedf020, 0x39791: 0x6dedf220, 0x39792: 0x6dedf420, 0x39793: 0x6e02b620, + 0x39794: 0x6e02b820, 0x39795: 0x6e146c20, 0x39796: 0x6e146e20, 0x39797: 0x6e3a5220, + 0x39798: 0x6e411220, 0x39799: 0x6e45da20, 0x3979a: 0x6c60c220, 0x3979b: 0x6c86d220, + 0x3979c: 0x6c86d420, 0x3979d: 0x6c86d620, 0x3979e: 0x6cb15420, 0x3979f: 0x6cb15620, + 0x397a0: 0x6ce05220, 0x397a1: 0x6ce05420, 0x397a2: 0x6ce05620, 0x397a3: 0x6ce05820, + 0x397a4: 0x6ce05a20, 0x397a5: 0x6d0ed020, 0x397a6: 0x6d0ed220, 0x397a7: 0x6cee2c20, + 0x397a8: 0x6d0ed420, 0x397a9: 0x6d3d2420, 0x397aa: 0x6d3d2620, 0x397ab: 0x6d3d2820, + 0x397ac: 0x6d3d2a20, 0x397ad: 0x6d699e20, 0x397ae: 0x6d69a020, 0x397af: 0x6d69a220, + 0x397b0: 0x6d69a420, 0x397b1: 0x6d69a620, 0x397b2: 0x6d69a820, 0x397b3: 0x6d69aa20, + 0x397b4: 0x6d69ac20, 0x397b5: 0x6d69ae20, 0x397b6: 0x6d69b020, 0x397b7: 0x6d931620, + 0x397b8: 0x6d931820, 0x397b9: 0x6d931a20, 0x397ba: 0x6d931c20, 0x397bb: 0x6d931e20, + 0x397bc: 0x6db6b620, 0x397bd: 0x6db6b820, 0x397be: 0x6db6ba20, 0x397bf: 0x6db6bc20, + // Block 0xe5f, offset 0x397c0 + 0x397c0: 0x6db6be20, 0x397c1: 0x6db6c020, 0x397c2: 0x6db6c220, 0x397c3: 0x6dd50820, + 0x397c4: 0x6dd50a20, 0x397c5: 0x6dd50c20, 0x397c6: 0x6dd50e20, 0x397c7: 0x6dd51020, + 0x397c8: 0x6db6c420, 0x397c9: 0x6dedf620, 0x397ca: 0x6dedf820, 0x397cb: 0x6dedfa20, + 0x397cc: 0x6dedfc20, 0x397cd: 0x6dedfe20, 0x397ce: 0x6dee0020, 0x397cf: 0x6dee0220, + 0x397d0: 0x6dee0420, 0x397d1: 0x6e02bc20, 0x397d2: 0x6e02be20, 0x397d3: 0x6e02c020, + 0x397d4: 0x6e02c220, 0x397d5: 0x6e02c420, 0x397d6: 0x6e02c620, 0x397d7: 0x6e147220, + 0x397d8: 0x6e147420, 0x397d9: 0x6e221a20, 0x397da: 0x6e221c20, 0x397db: 0x6e221e20, + 0x397dc: 0x6e222020, 0x397dd: 0x6e2c7a20, 0x397de: 0x6e2c7c20, 0x397df: 0x6e2c7e20, + 0x397e0: 0x6e34a820, 0x397e1: 0x6e3a5820, 0x397e2: 0x6e3a5a20, 0x397e3: 0x6e411620, + 0x397e4: 0x6e411820, 0x397e5: 0x6e448420, 0x397e6: 0x6c40ba20, 0x397e7: 0x6c26ee20, + 0x397e8: 0x6c26f020, 0x397e9: 0x6c60c420, 0x397ea: 0x6c86dc20, 0x397eb: 0x6c86de20, + 0x397ec: 0x6c86e020, 0x397ed: 0x6c86e220, 0x397ee: 0x6cb16820, 0x397ef: 0x6cb16a20, + 0x397f0: 0x6cb16c20, 0x397f1: 0x6cb16e20, 0x397f2: 0x6cb17020, 0x397f3: 0x6cb17220, + 0x397f4: 0x6cb17420, 0x397f5: 0x6ce06620, 0x397f6: 0x6ce06820, 0x397f7: 0x6ce06a20, + 0x397f8: 0x6ce06c20, 0x397f9: 0x6ce06e20, 0x397fa: 0x6ce07020, 0x397fb: 0x6ce07220, + 0x397fc: 0x6ce07420, 0x397fd: 0x6ce07620, 0x397fe: 0x6ce07820, 0x397ff: 0x6d0ee220, + // Block 0xe60, offset 0x39800 + 0x39800: 0x6d0ee420, 0x39801: 0x6d0ee620, 0x39802: 0x6d0ee820, 0x39803: 0x6d0eea20, + 0x39804: 0x6d0eec20, 0x39805: 0x6d0eee20, 0x39806: 0x6d0ef020, 0x39807: 0x6d0ef220, + 0x39808: 0x6d0ef420, 0x39809: 0x6d0ef620, 0x3980a: 0x6d0ef820, 0x3980b: 0x6d0efa20, + 0x3980c: 0x6d0efc20, 0x3980d: 0x6d3d3420, 0x3980e: 0x6d3d3620, 0x3980f: 0x6d3d3820, + 0x39810: 0x6d3d3a20, 0x39811: 0x6d3d3c20, 0x39812: 0x6d3d3e20, 0x39813: 0x6d3d4020, + 0x39814: 0x6d3d4220, 0x39815: 0x6d3d4420, 0x39816: 0x6d3d4620, 0x39817: 0x6d3d4820, + 0x39818: 0x6d69ba20, 0x39819: 0x6d69bc20, 0x3981a: 0x6d69be20, 0x3981b: 0x6d69c020, + 0x3981c: 0x6d69c220, 0x3981d: 0x6d69c420, 0x3981e: 0x6d69c620, 0x3981f: 0x6d69c820, + 0x39820: 0x6d69ca20, 0x39821: 0x6d69cc20, 0x39822: 0x6d69ce20, 0x39823: 0x6d69d020, + 0x39824: 0x6d69d220, 0x39825: 0x6d69d420, 0x39826: 0x6d69d620, 0x39827: 0x6d69d820, + 0x39828: 0x6d932a20, 0x39829: 0x6d932c20, 0x3982a: 0x6d932e20, 0x3982b: 0x6d933020, + 0x3982c: 0x6d933220, 0x3982d: 0x6d933420, 0x3982e: 0x6d933620, 0x3982f: 0x6d933820, + 0x39830: 0x6d933a20, 0x39831: 0x6d933c20, 0x39832: 0x6db6d020, 0x39833: 0x6db6d220, + 0x39834: 0x6db6d420, 0x39835: 0x6db6d620, 0x39836: 0x6db6d820, 0x39837: 0x6db6da20, + 0x39838: 0x6db6dc20, 0x39839: 0x6db6de20, 0x3983a: 0x6db6e020, 0x3983b: 0x6dd51a20, + 0x3983c: 0x6dd51c20, 0x3983d: 0x6dd51e20, 0x3983e: 0x6dd52020, 0x3983f: 0x6dd52220, + // Block 0xe61, offset 0x39840 + 0x39840: 0x6dd52420, 0x39841: 0x6dd52620, 0x39842: 0x6dee0c20, 0x39843: 0x6dee0e20, + 0x39844: 0x6dee1020, 0x39845: 0x6dee1220, 0x39846: 0x6dee1420, 0x39847: 0x6e02c820, + 0x39848: 0x6e02ca20, 0x39849: 0x6e02cc20, 0x3984a: 0x6e02ce20, 0x3984b: 0x6e02d020, + 0x3984c: 0x6e147820, 0x3984d: 0x6e147a20, 0x3984e: 0x6e147c20, 0x3984f: 0x6e147e20, + 0x39850: 0x6e222420, 0x39851: 0x6e222620, 0x39852: 0x6e222820, 0x39853: 0x6e222a20, + 0x39854: 0x6e2c8020, 0x39855: 0x6e2c8220, 0x39856: 0x6e2c8420, 0x39857: 0x6e222c20, + 0x39858: 0x6e34aa20, 0x39859: 0x6e34ac20, 0x3985a: 0x6e3a6020, 0x3985b: 0x6e3a6220, + 0x3985c: 0x6e3a6420, 0x3985d: 0x6e411a20, 0x3985e: 0x6e448620, 0x3985f: 0x6e46ec20, + 0x39860: 0x6c40be20, 0x39861: 0x6c60c620, 0x39862: 0x6c86ea20, 0x39863: 0x6c86ec20, + 0x39864: 0x6cb18420, 0x39865: 0x6cb18620, 0x39866: 0x6cb18820, 0x39867: 0x6cb18a20, + 0x39868: 0x6cb18c20, 0x39869: 0x6cb18e20, 0x3986a: 0x6cb19020, 0x3986b: 0x6cb19220, + 0x3986c: 0x6ce08a20, 0x3986d: 0x6ce08c20, 0x3986e: 0x6ce08e20, 0x3986f: 0x6ce09020, + 0x39870: 0x6ce09220, 0x39871: 0x6ce09420, 0x39872: 0x6ce09620, 0x39873: 0x6ce09820, + 0x39874: 0x6ce09a20, 0x39875: 0x6ce09c20, 0x39876: 0x6ce09e20, 0x39877: 0x6ce0a020, + 0x39878: 0x6ce0a220, 0x39879: 0x6ce0a420, 0x3987a: 0x6ce0a620, 0x3987b: 0x6ce0a820, + 0x3987c: 0x6ce0aa20, 0x3987d: 0x6ce0ac20, 0x3987e: 0x6d0f0c20, 0x3987f: 0x6d0f0e20, + // Block 0xe62, offset 0x39880 + 0x39880: 0x6d0f1020, 0x39881: 0x6d0f1220, 0x39882: 0x6d0f1420, 0x39883: 0x6d0f1620, + 0x39884: 0x6d0f1820, 0x39885: 0x6d0f1a20, 0x39886: 0x6d0f1c20, 0x39887: 0x6d0f1e20, + 0x39888: 0x6d0f2020, 0x39889: 0x6d0f2220, 0x3988a: 0x6d3d5620, 0x3988b: 0x6d3d5820, + 0x3988c: 0x6d3d5a20, 0x3988d: 0x6d3d5c20, 0x3988e: 0x6d3d5e20, 0x3988f: 0x6d3d6020, + 0x39890: 0x6d3d6220, 0x39891: 0x6d3d6420, 0x39892: 0x6d3d6620, 0x39893: 0x6d3d6820, + 0x39894: 0x6d3d6a20, 0x39895: 0x6d3d6c20, 0x39896: 0x6d3d6e20, 0x39897: 0x6d3d7020, + 0x39898: 0x6d3d7220, 0x39899: 0x6d69e420, 0x3989a: 0x6d69e620, 0x3989b: 0x6d69e820, + 0x3989c: 0x6d69ea20, 0x3989d: 0x6d69ec20, 0x3989e: 0x6d69ee20, 0x3989f: 0x6d69f020, + 0x398a0: 0x6d69f220, 0x398a1: 0x6d69f420, 0x398a2: 0x6d69f620, 0x398a3: 0x6d69f820, + 0x398a4: 0x6d69fa20, 0x398a5: 0x6d69fc20, 0x398a6: 0x6d934a20, 0x398a7: 0x6d934c20, + 0x398a8: 0x6d934e20, 0x398a9: 0x6d935020, 0x398aa: 0x6d935220, 0x398ab: 0x6d935420, + 0x398ac: 0x6d935620, 0x398ad: 0x6d935820, 0x398ae: 0x6d935a20, 0x398af: 0x6d935c20, + 0x398b0: 0x6d935e20, 0x398b1: 0x6d69fe20, 0x398b2: 0x6d936020, 0x398b3: 0x6d936220, + 0x398b4: 0x6d936420, 0x398b5: 0x6db6ea20, 0x398b6: 0x6db6ec20, 0x398b7: 0x6db6ee20, + 0x398b8: 0x6db6f020, 0x398b9: 0x6db6f220, 0x398ba: 0x6db6f420, 0x398bb: 0x6db6f620, + 0x398bc: 0x6db6f820, 0x398bd: 0x6db6fa20, 0x398be: 0x6db6fc20, 0x398bf: 0x6db6fe20, + // Block 0xe63, offset 0x398c0 + 0x398c0: 0x6db70020, 0x398c1: 0x6dd53220, 0x398c2: 0x6dd53420, 0x398c3: 0x6dd53620, + 0x398c4: 0x6dd53820, 0x398c5: 0x6dd53a20, 0x398c6: 0x6dee2220, 0x398c7: 0x6dd53c20, + 0x398c8: 0x6dd53e20, 0x398c9: 0x6dd54020, 0x398ca: 0x6dd54220, 0x398cb: 0x6dd54420, + 0x398cc: 0x6dee2420, 0x398cd: 0x6dee2620, 0x398ce: 0x6dee2820, 0x398cf: 0x6dee2a20, + 0x398d0: 0x6e02d220, 0x398d1: 0x6dee2c20, 0x398d2: 0x6dee2e20, 0x398d3: 0x6dee3020, + 0x398d4: 0x6dee3220, 0x398d5: 0x6dee3420, 0x398d6: 0x6e02d420, 0x398d7: 0x6e02d620, + 0x398d8: 0x6e02d820, 0x398d9: 0x6e02da20, 0x398da: 0x6e02dc20, 0x398db: 0x6e02de20, + 0x398dc: 0x6e02e020, 0x398dd: 0x6e148020, 0x398de: 0x6e148220, 0x398df: 0x6e222e20, + 0x398e0: 0x6e2c8620, 0x398e1: 0x6e2c8820, 0x398e2: 0x6e34ae20, 0x398e3: 0x6e411e20, + 0x398e4: 0x6c60ce20, 0x398e5: 0x6c60d020, 0x398e6: 0x6c60d220, 0x398e7: 0x6c60d420, + 0x398e8: 0x6c60d620, 0x398e9: 0x6c60d820, 0x398ea: 0x6c86f820, 0x398eb: 0x6c86fa20, + 0x398ec: 0x6c86fc20, 0x398ed: 0x6c86fe20, 0x398ee: 0x6c870020, 0x398ef: 0x6c870220, + 0x398f0: 0x6c870420, 0x398f1: 0x6c870620, 0x398f2: 0x6c870820, 0x398f3: 0x6cb1ac20, + 0x398f4: 0x6cb1ae20, 0x398f5: 0x6cb1b020, 0x398f6: 0x6cb1b220, 0x398f7: 0x6cb1b420, + 0x398f8: 0x6cb1b620, 0x398f9: 0x6cb1b820, 0x398fa: 0x6cb1ba20, 0x398fb: 0x6cb1bc20, + 0x398fc: 0x6cb1be20, 0x398fd: 0x6cb1c020, 0x398fe: 0x6cb1c220, 0x398ff: 0x6cb1c420, + // Block 0xe64, offset 0x39900 + 0x39900: 0x6cb1c620, 0x39901: 0x6cb1c820, 0x39902: 0x6cb1ca20, 0x39903: 0x6cb1cc20, + 0x39904: 0x6cb1ce20, 0x39905: 0x6cb1d020, 0x39906: 0x6cb1d220, 0x39907: 0x6cb1d420, + 0x39908: 0x6cb1d620, 0x39909: 0x6ce0e020, 0x3990a: 0x6ce0e220, 0x3990b: 0x6ce0e420, + 0x3990c: 0x6ce0e620, 0x3990d: 0x6ce0e820, 0x3990e: 0x6ce0ea20, 0x3990f: 0x6ce0ec20, + 0x39910: 0x6ce0ee20, 0x39911: 0x6ce0f020, 0x39912: 0x6ce0f220, 0x39913: 0x6ce0f420, + 0x39914: 0x6ce0f620, 0x39915: 0x6ce0f820, 0x39916: 0x6ce0fa20, 0x39917: 0x6ce0fc20, + 0x39918: 0x6ce0fe20, 0x39919: 0x6ce10020, 0x3991a: 0x6ce10220, 0x3991b: 0x6ce10420, + 0x3991c: 0x6ce10620, 0x3991d: 0x6ce10820, 0x3991e: 0x6ce10a20, 0x3991f: 0x6ce10c20, + 0x39920: 0x6ce10e20, 0x39921: 0x6ce11020, 0x39922: 0x6ce11220, 0x39923: 0x6d0f4a20, + 0x39924: 0x6d0f4c20, 0x39925: 0x6d0f4e20, 0x39926: 0x6d0f5020, 0x39927: 0x6d0f5220, + 0x39928: 0x6d0f5420, 0x39929: 0x6d0f5620, 0x3992a: 0x6d0f5820, 0x3992b: 0x6d0f5a20, + 0x3992c: 0x6d0f5c20, 0x3992d: 0x6d0f5e20, 0x3992e: 0x6d0f6020, 0x3992f: 0x6d0f6220, + 0x39930: 0x6d0f6420, 0x39931: 0x6d0f6620, 0x39932: 0x6d0f6820, 0x39933: 0x6d0f6a20, + 0x39934: 0x6d0f6c20, 0x39935: 0x6d0f6e20, 0x39936: 0x6d0f7020, 0x39937: 0x6d0f7220, + 0x39938: 0x6d0f7420, 0x39939: 0x6d0f7620, 0x3993a: 0x6d0f7820, 0x3993b: 0x6d0f7a20, + 0x3993c: 0x6d0f7c20, 0x3993d: 0x6d0f7e20, 0x3993e: 0x6d0f8020, 0x3993f: 0x6d0f8220, + // Block 0xe65, offset 0x39940 + 0x39940: 0x6d0f8420, 0x39941: 0x6d0f8620, 0x39942: 0x6d0f8820, 0x39943: 0x6d0f8a20, + 0x39944: 0x6d0f8c20, 0x39945: 0x6d3d9020, 0x39946: 0x6d3d9220, 0x39947: 0x6d3d9420, + 0x39948: 0x6d3d9620, 0x39949: 0x6d3d9820, 0x3994a: 0x6d3d9a20, 0x3994b: 0x6d3d9c20, + 0x3994c: 0x6d3d9e20, 0x3994d: 0x6d3da020, 0x3994e: 0x6d3da220, 0x3994f: 0x6d3da420, + 0x39950: 0x6d3da620, 0x39951: 0x6d3da820, 0x39952: 0x6d3daa20, 0x39953: 0x6d3dac20, + 0x39954: 0x6d3dae20, 0x39955: 0x6d3db020, 0x39956: 0x6d3db220, 0x39957: 0x6d3db420, + 0x39958: 0x6d3db620, 0x39959: 0x6d3db820, 0x3995a: 0x6d3dba20, 0x3995b: 0x6d6a3c20, + 0x3995c: 0x6d6a3e20, 0x3995d: 0x6d6a4020, 0x3995e: 0x6d6a4220, 0x3995f: 0x6d6a4420, + 0x39960: 0x6d6a4620, 0x39961: 0x6d6a4820, 0x39962: 0x6d6a4a20, 0x39963: 0x6d6a4c20, + 0x39964: 0x6d6a4e20, 0x39965: 0x6d6a5020, 0x39966: 0x6d6a5220, 0x39967: 0x6d6a5420, + 0x39968: 0x6d6a5620, 0x39969: 0x6d6a5820, 0x3996a: 0x6d6a5a20, 0x3996b: 0x6d6a5c20, + 0x3996c: 0x6d6a5e20, 0x3996d: 0x6d6a6020, 0x3996e: 0x6d6a6220, 0x3996f: 0x6d6a6420, + 0x39970: 0x6d6a6620, 0x39971: 0x6d938420, 0x39972: 0x6d938620, 0x39973: 0x6d938820, + 0x39974: 0x6d938a20, 0x39975: 0x6d938c20, 0x39976: 0x6d938e20, 0x39977: 0x6d939020, + 0x39978: 0x6d939220, 0x39979: 0x6d939420, 0x3997a: 0x6d939620, 0x3997b: 0x6d939820, + 0x3997c: 0x6d939a20, 0x3997d: 0x6d939c20, 0x3997e: 0x6d939e20, 0x3997f: 0x6d93a020, + // Block 0xe66, offset 0x39980 + 0x39980: 0x6d93a220, 0x39981: 0x6d93a420, 0x39982: 0x6d93a620, 0x39983: 0x6d93a820, + 0x39984: 0x6d93aa20, 0x39985: 0x6db02a20, 0x39986: 0x6d93ac20, 0x39987: 0x6d93ae20, + 0x39988: 0x6d93b020, 0x39989: 0x6d93b220, 0x3998a: 0x6d93b420, 0x3998b: 0x6d93b620, + 0x3998c: 0x6db71820, 0x3998d: 0x6db71a20, 0x3998e: 0x6db71c20, 0x3998f: 0x6db71e20, + 0x39990: 0x6db72020, 0x39991: 0x6db72220, 0x39992: 0x6db72420, 0x39993: 0x6db72620, + 0x39994: 0x6db72820, 0x39995: 0x6db72a20, 0x39996: 0x6db72c20, 0x39997: 0x6db72e20, + 0x39998: 0x6db73020, 0x39999: 0x6db73220, 0x3999a: 0x6db73420, 0x3999b: 0x6db73620, + 0x3999c: 0x6db73820, 0x3999d: 0x6db73a20, 0x3999e: 0x6dd55620, 0x3999f: 0x6dd55820, + 0x399a0: 0x6dd55a20, 0x399a1: 0x6dd55c20, 0x399a2: 0x6dd55e20, 0x399a3: 0x6dd56020, + 0x399a4: 0x6dd56220, 0x399a5: 0x6dd56420, 0x399a6: 0x6dd56620, 0x399a7: 0x6dd56820, + 0x399a8: 0x6dd56a20, 0x399a9: 0x6dd56c20, 0x399aa: 0x6dd56e20, 0x399ab: 0x6dd57020, + 0x399ac: 0x6dd57220, 0x399ad: 0x6dd57420, 0x399ae: 0x6dd57620, 0x399af: 0x6dd57820, + 0x399b0: 0x6dd57a20, 0x399b1: 0x6dd57c20, 0x399b2: 0x6dd57e20, 0x399b3: 0x6dd58020, + 0x399b4: 0x6dd58220, 0x399b5: 0x6dd58420, 0x399b6: 0x6dd58620, 0x399b7: 0x6dd58820, + 0x399b8: 0x6dd58a20, 0x399b9: 0x6dd58c20, 0x399ba: 0x6dd58e20, 0x399bb: 0x6dd59020, + 0x399bc: 0x6dee4620, 0x399bd: 0x6dee4820, 0x399be: 0x6dee4a20, 0x399bf: 0x6dee4c20, + // Block 0xe67, offset 0x399c0 + 0x399c0: 0x6dee4e20, 0x399c1: 0x6dee5020, 0x399c2: 0x6dee5220, 0x399c3: 0x6dee5420, + 0x399c4: 0x6dee5620, 0x399c5: 0x6dee5820, 0x399c6: 0x6dee5a20, 0x399c7: 0x6dee5c20, + 0x399c8: 0x6dee5e20, 0x399c9: 0x6dee6020, 0x399ca: 0x6dee6220, 0x399cb: 0x6dee6420, + 0x399cc: 0x6dee6620, 0x399cd: 0x6dee6820, 0x399ce: 0x6dee6a20, 0x399cf: 0x6dee6c20, + 0x399d0: 0x6dee6e20, 0x399d1: 0x6dee7020, 0x399d2: 0x6dee7220, 0x399d3: 0x6dee7420, + 0x399d4: 0x6dee7620, 0x399d5: 0x6dee7820, 0x399d6: 0x6e02ea20, 0x399d7: 0x6e02ec20, + 0x399d8: 0x6e02ee20, 0x399d9: 0x6e02f020, 0x399da: 0x6e02f220, 0x399db: 0x6e02f420, + 0x399dc: 0x6e02f620, 0x399dd: 0x6e02f820, 0x399de: 0x6e02fa20, 0x399df: 0x6e02fc20, + 0x399e0: 0x6e02fe20, 0x399e1: 0x6e030020, 0x399e2: 0x6e030220, 0x399e3: 0x6e030420, + 0x399e4: 0x6e030620, 0x399e5: 0x6e030820, 0x399e6: 0x6e148e20, 0x399e7: 0x6e149020, + 0x399e8: 0x6e149220, 0x399e9: 0x6e149420, 0x399ea: 0x6e149620, 0x399eb: 0x6e149820, + 0x399ec: 0x6e149a20, 0x399ed: 0x6e149c20, 0x399ee: 0x6e149e20, 0x399ef: 0x6e14a020, + 0x399f0: 0x6e14a220, 0x399f1: 0x6e223a20, 0x399f2: 0x6e223c20, 0x399f3: 0x6e223e20, + 0x399f4: 0x6e224020, 0x399f5: 0x6e224220, 0x399f6: 0x6e224420, 0x399f7: 0x6e224620, + 0x399f8: 0x6e224820, 0x399f9: 0x6e224a20, 0x399fa: 0x6e224c20, 0x399fb: 0x6e224e20, + 0x399fc: 0x6e225020, 0x399fd: 0x6e2c9020, 0x399fe: 0x6e2c9220, 0x399ff: 0x6e225220, + // Block 0xe68, offset 0x39a00 + 0x39a00: 0x6e2c9420, 0x39a01: 0x6e2c9620, 0x39a02: 0x6e2c9820, 0x39a03: 0x6e2c9a20, + 0x39a04: 0x6e2c9c20, 0x39a05: 0x6e2c9e20, 0x39a06: 0x6e2ca020, 0x39a07: 0x6e2ca220, + 0x39a08: 0x6e34b220, 0x39a09: 0x6e34b420, 0x39a0a: 0x6e34b620, 0x39a0b: 0x6e34b820, + 0x39a0c: 0x6e3a6a20, 0x39a0d: 0x6e3a6c20, 0x39a0e: 0x6e3e4420, 0x39a0f: 0x6e3e4620, + 0x39a10: 0x6e3e4820, 0x39a11: 0x6c40da20, 0x39a12: 0x6c60f420, 0x39a13: 0x6cb1e420, + 0x39a14: 0x6ce12e20, 0x39a15: 0x6ce13020, 0x39a16: 0x6ce13220, 0x39a17: 0x6d6a7420, + 0x39a18: 0x6c40dc20, 0x39a19: 0x6c60fa20, 0x39a1a: 0x6c60fc20, 0x39a1b: 0x6cb1ee20, + 0x39a1c: 0x6cb1f020, 0x39a1d: 0x6ce13620, 0x39a1e: 0x6ce13820, 0x39a1f: 0x6ce13a20, + 0x39a20: 0x6d0fa020, 0x39a21: 0x6d0fa220, 0x39a22: 0x6d0fa420, 0x39a23: 0x6d3dd020, + 0x39a24: 0x6d3dd220, 0x39a25: 0x6d3dd420, 0x39a26: 0x6d3dd620, 0x39a27: 0x6d6a7620, + 0x39a28: 0x6d6a7820, 0x39a29: 0x6d6a7a20, 0x39a2a: 0x6d6a7c20, 0x39a2b: 0x6d6a7e20, + 0x39a2c: 0x6d93d020, 0x39a2d: 0x6d93d220, 0x39a2e: 0x6d93d420, 0x39a2f: 0x6d93d620, + 0x39a30: 0x6d93d820, 0x39a31: 0x6d93da20, 0x39a32: 0x6db74620, 0x39a33: 0x6db74820, + 0x39a34: 0x6db74a20, 0x39a35: 0x6db74c20, 0x39a36: 0x6dd59620, 0x39a37: 0x6dd59820, + 0x39a38: 0x6dee7c20, 0x39a39: 0x6dee7e20, 0x39a3a: 0x6dee8020, 0x39a3b: 0x6dee8220, + 0x39a3c: 0x6dee8420, 0x39a3d: 0x6e14a820, 0x39a3e: 0x6e14aa20, 0x39a3f: 0x6e14ac20, + // Block 0xe69, offset 0x39a40 + 0x39a40: 0x6e225820, 0x39a41: 0x6e225a20, 0x39a42: 0x6e2ca620, 0x39a43: 0x6e2ca820, + 0x39a44: 0x6e2caa20, 0x39a45: 0x6e2cac20, 0x39a46: 0x6c26fe20, 0x39a47: 0x6c40de20, + 0x39a48: 0x6c610820, 0x39a49: 0x6c610a20, 0x39a4a: 0x6c610c20, 0x39a4b: 0x6c610e20, + 0x39a4c: 0x6c611020, 0x39a4d: 0x6c611220, 0x39a4e: 0x6c611420, 0x39a4f: 0x6c873420, + 0x39a50: 0x6c873620, 0x39a51: 0x6c873820, 0x39a52: 0x6c873a20, 0x39a53: 0x6c873c20, + 0x39a54: 0x6c873e20, 0x39a55: 0x6c874020, 0x39a56: 0x6c874220, 0x39a57: 0x6c874420, + 0x39a58: 0x6c874620, 0x39a59: 0x6c874820, 0x39a5a: 0x6c874a20, 0x39a5b: 0x6c874c20, + 0x39a5c: 0x6c874e20, 0x39a5d: 0x6cb20a20, 0x39a5e: 0x6cb20c20, 0x39a5f: 0x6cb20e20, + 0x39a60: 0x6cb21020, 0x39a61: 0x6cb21220, 0x39a62: 0x6cb21420, 0x39a63: 0x6cb21620, + 0x39a64: 0x6cb21820, 0x39a65: 0x6cb21a20, 0x39a66: 0x6cb21c20, 0x39a67: 0x6cb21e20, + 0x39a68: 0x6cb22020, 0x39a69: 0x6cb22220, 0x39a6a: 0x6cb22420, 0x39a6b: 0x6cb22620, + 0x39a6c: 0x6cb22820, 0x39a6d: 0x6cb22a20, 0x39a6e: 0x6cb22c20, 0x39a6f: 0x6cb22e20, + 0x39a70: 0x6cb23020, 0x39a71: 0x6cb23220, 0x39a72: 0x6cb23420, 0x39a73: 0x6cb23620, + 0x39a74: 0x6cb23820, 0x39a75: 0x6cb23a20, 0x39a76: 0x6ce16620, 0x39a77: 0x6ce16820, + 0x39a78: 0x6ce16a20, 0x39a79: 0x6ce16c20, 0x39a7a: 0x6ce16e20, 0x39a7b: 0x6ce17020, + 0x39a7c: 0x6ce17220, 0x39a7d: 0x6ce17420, 0x39a7e: 0x6ce17620, 0x39a7f: 0x6ce17820, + // Block 0xe6a, offset 0x39a80 + 0x39a80: 0x6ce17a20, 0x39a81: 0x6ce17c20, 0x39a82: 0x6ce17e20, 0x39a83: 0x6ce18020, + 0x39a84: 0x6ce18220, 0x39a85: 0x6ce18420, 0x39a86: 0x6ce18620, 0x39a87: 0x6ce18820, + 0x39a88: 0x6ce18a20, 0x39a89: 0x6ce18c20, 0x39a8a: 0x6ce18e20, 0x39a8b: 0x6ce19020, + 0x39a8c: 0x6ce19220, 0x39a8d: 0x6ce19420, 0x39a8e: 0x6ce19620, 0x39a8f: 0x6ce19820, + 0x39a90: 0x6d0fc620, 0x39a91: 0x6d0fc820, 0x39a92: 0x6d0fca20, 0x39a93: 0x6d0fcc20, + 0x39a94: 0x6d0fce20, 0x39a95: 0x6d0fd020, 0x39a96: 0x6d0fd220, 0x39a97: 0x6d0fd420, + 0x39a98: 0x6d0fd620, 0x39a99: 0x6d0fd820, 0x39a9a: 0x6d0fda20, 0x39a9b: 0x6d0fdc20, + 0x39a9c: 0x6d0fde20, 0x39a9d: 0x6d0fe020, 0x39a9e: 0x6d0fe220, 0x39a9f: 0x6d0fe420, + 0x39aa0: 0x6d0fe620, 0x39aa1: 0x6d0fe820, 0x39aa2: 0x6d0fea20, 0x39aa3: 0x6d0fec20, + 0x39aa4: 0x6d0fee20, 0x39aa5: 0x6d0ff020, 0x39aa6: 0x6d0ff220, 0x39aa7: 0x6d0ff420, + 0x39aa8: 0x6d0ff620, 0x39aa9: 0x6d0ff820, 0x39aaa: 0x6d0ffa20, 0x39aab: 0x6d0ffc20, + 0x39aac: 0x6d0ffe20, 0x39aad: 0x6d100020, 0x39aae: 0x6d100220, 0x39aaf: 0x6d3df420, + 0x39ab0: 0x6d3df620, 0x39ab1: 0x6d3df820, 0x39ab2: 0x6d3dfa20, 0x39ab3: 0x6d3dfc20, + 0x39ab4: 0x6d3dfe20, 0x39ab5: 0x6d3e0020, 0x39ab6: 0x6d3e0220, 0x39ab7: 0x6d3e0420, + 0x39ab8: 0x6d3e0620, 0x39ab9: 0x6d3e0820, 0x39aba: 0x6d3e0a20, 0x39abb: 0x6d3e0c20, + 0x39abc: 0x6d3e0e20, 0x39abd: 0x6d3e1020, 0x39abe: 0x6d3e1220, 0x39abf: 0x6d3e1420, + // Block 0xe6b, offset 0x39ac0 + 0x39ac0: 0x6d3e1620, 0x39ac1: 0x6d3e1820, 0x39ac2: 0x6d3e1a20, 0x39ac3: 0x6d3e1c20, + 0x39ac4: 0x6d3e1e20, 0x39ac5: 0x6d3e2020, 0x39ac6: 0x6d3e2220, 0x39ac7: 0x6d3e2420, + 0x39ac8: 0x6d3e2620, 0x39ac9: 0x6d3e2820, 0x39aca: 0x6d3e2a20, 0x39acb: 0x6d3e2c20, + 0x39acc: 0x6d3e2e20, 0x39acd: 0x6d3e3020, 0x39ace: 0x6d6aa420, 0x39acf: 0x6d6aa620, + 0x39ad0: 0x6d6aa820, 0x39ad1: 0x6d6aaa20, 0x39ad2: 0x6d6aac20, 0x39ad3: 0x6d6aae20, + 0x39ad4: 0x6d6ab020, 0x39ad5: 0x6d6ab220, 0x39ad6: 0x6d6ab420, 0x39ad7: 0x6d6ab620, + 0x39ad8: 0x6d6ab820, 0x39ad9: 0x6d6aba20, 0x39ada: 0x6d6abc20, 0x39adb: 0x6d6abe20, + 0x39adc: 0x6d6ac020, 0x39add: 0x6d3e3220, 0x39ade: 0x6d6ac220, 0x39adf: 0x6d93ea20, + 0x39ae0: 0x6d6ac420, 0x39ae1: 0x6d6ac620, 0x39ae2: 0x6d6ac820, 0x39ae3: 0x6d6aca20, + 0x39ae4: 0x6d6acc20, 0x39ae5: 0x6d6ace20, 0x39ae6: 0x6d6ad020, 0x39ae7: 0x6d6ad220, + 0x39ae8: 0x6d93ec20, 0x39ae9: 0x6d93ee20, 0x39aea: 0x6d93f020, 0x39aeb: 0x6d93f220, + 0x39aec: 0x6d93f420, 0x39aed: 0x6d93f620, 0x39aee: 0x6d93f820, 0x39aef: 0x6d93fa20, + 0x39af0: 0x6d93fc20, 0x39af1: 0x6d93fe20, 0x39af2: 0x6d940020, 0x39af3: 0x6d940220, + 0x39af4: 0x6d940420, 0x39af5: 0x6d940620, 0x39af6: 0x6d940820, 0x39af7: 0x6d940a20, + 0x39af8: 0x6d940c20, 0x39af9: 0x6d940e20, 0x39afa: 0x6d941020, 0x39afb: 0x6d941220, + 0x39afc: 0x6d941420, 0x39afd: 0x6d941620, 0x39afe: 0x6d941820, 0x39aff: 0x6d941a20, + // Block 0xe6c, offset 0x39b00 + 0x39b00: 0x6d941c20, 0x39b01: 0x6d941e20, 0x39b02: 0x6d942020, 0x39b03: 0x6d942220, + 0x39b04: 0x6d942420, 0x39b05: 0x6d942620, 0x39b06: 0x6d942820, 0x39b07: 0x6d942a20, + 0x39b08: 0x6d942c20, 0x39b09: 0x6db75820, 0x39b0a: 0x6db75a20, 0x39b0b: 0x6db75c20, + 0x39b0c: 0x6db75e20, 0x39b0d: 0x6db76020, 0x39b0e: 0x6db76220, 0x39b0f: 0x6db76420, + 0x39b10: 0x6db76620, 0x39b11: 0x6db76820, 0x39b12: 0x6db76a20, 0x39b13: 0x6db76c20, + 0x39b14: 0x6db76e20, 0x39b15: 0x6db77020, 0x39b16: 0x6db77220, 0x39b17: 0x6db77420, + 0x39b18: 0x6db77620, 0x39b19: 0x6db77820, 0x39b1a: 0x6db77a20, 0x39b1b: 0x6db77c20, + 0x39b1c: 0x6db77e20, 0x39b1d: 0x6db78020, 0x39b1e: 0x6dd5a820, 0x39b1f: 0x6dd5aa20, + 0x39b20: 0x6dd5ac20, 0x39b21: 0x6dd5ae20, 0x39b22: 0x6dd5b020, 0x39b23: 0x6dd5b220, + 0x39b24: 0x6dd5b420, 0x39b25: 0x6dd5b620, 0x39b26: 0x6dd5b820, 0x39b27: 0x6dd5ba20, + 0x39b28: 0x6dd5bc20, 0x39b29: 0x6dd5be20, 0x39b2a: 0x6dd5c020, 0x39b2b: 0x6dd5c220, + 0x39b2c: 0x6dd5c420, 0x39b2d: 0x6dd5c620, 0x39b2e: 0x6dd5c820, 0x39b2f: 0x6dd5ca20, + 0x39b30: 0x6dd5cc20, 0x39b31: 0x6dd5ce20, 0x39b32: 0x6dd5d020, 0x39b33: 0x6dd5d220, + 0x39b34: 0x6dd5d420, 0x39b35: 0x6dd5d620, 0x39b36: 0x6dee9020, 0x39b37: 0x6dee9220, + 0x39b38: 0x6dee9420, 0x39b39: 0x6dee9620, 0x39b3a: 0x6dee9820, 0x39b3b: 0x6dee9a20, + 0x39b3c: 0x6dee9c20, 0x39b3d: 0x6dee9e20, 0x39b3e: 0x6deea020, 0x39b3f: 0x6deea220, + // Block 0xe6d, offset 0x39b40 + 0x39b40: 0x6deea420, 0x39b41: 0x6deea620, 0x39b42: 0x6deea820, 0x39b43: 0x6deeaa20, + 0x39b44: 0x6deeac20, 0x39b45: 0x6deeae20, 0x39b46: 0x6deeb020, 0x39b47: 0x6deeb220, + 0x39b48: 0x6deeb420, 0x39b49: 0x6deeb620, 0x39b4a: 0x6deeb820, 0x39b4b: 0x6deeba20, + 0x39b4c: 0x6deebc20, 0x39b4d: 0x6e031420, 0x39b4e: 0x6e031620, 0x39b4f: 0x6e031820, + 0x39b50: 0x6e031a20, 0x39b51: 0x6e031c20, 0x39b52: 0x6e031e20, 0x39b53: 0x6e032020, + 0x39b54: 0x6e032220, 0x39b55: 0x6e032420, 0x39b56: 0x6e032620, 0x39b57: 0x6e032820, + 0x39b58: 0x6e032a20, 0x39b59: 0x6e14b420, 0x39b5a: 0x6e14b620, 0x39b5b: 0x6e14b820, + 0x39b5c: 0x6e14ba20, 0x39b5d: 0x6e14bc20, 0x39b5e: 0x6e14be20, 0x39b5f: 0x6e14c020, + 0x39b60: 0x6e14c220, 0x39b61: 0x6e226220, 0x39b62: 0x6e226420, 0x39b63: 0x6e226620, + 0x39b64: 0x6e226820, 0x39b65: 0x6e226a20, 0x39b66: 0x6e226c20, 0x39b67: 0x6e226e20, + 0x39b68: 0x6e2cb220, 0x39b69: 0x6e2cb420, 0x39b6a: 0x6e2cb620, 0x39b6b: 0x6e2cb820, + 0x39b6c: 0x6e2cba20, 0x39b6d: 0x6e2cbc20, 0x39b6e: 0x6e34bc20, 0x39b6f: 0x6e34be20, + 0x39b70: 0x6e3a7020, 0x39b71: 0x6e3a7220, 0x39b72: 0x6e3a7420, 0x39b73: 0x6e3a7620, + 0x39b74: 0x6e3a7820, 0x39b75: 0x6e412020, 0x39b76: 0x6e432020, 0x39b77: 0x6c270420, + 0x39b78: 0x6c40e020, 0x39b79: 0x6c40e220, 0x39b7a: 0x6c611c20, 0x39b7b: 0x6c611e20, + 0x39b7c: 0x6c612020, 0x39b7d: 0x6c612220, 0x39b7e: 0x6c612420, 0x39b7f: 0x6c612620, + // Block 0xe6e, offset 0x39b80 + 0x39b80: 0x6c612820, 0x39b81: 0x6c875c20, 0x39b82: 0x6c875e20, 0x39b83: 0x6c876020, + 0x39b84: 0x6c876220, 0x39b85: 0x6c876420, 0x39b86: 0x6c876620, 0x39b87: 0x6c876820, + 0x39b88: 0x6c876a20, 0x39b89: 0x6c876c20, 0x39b8a: 0x6c876e20, 0x39b8b: 0x6c877020, + 0x39b8c: 0x6c877220, 0x39b8d: 0x6c877420, 0x39b8e: 0x6c877620, 0x39b8f: 0x6c877820, + 0x39b90: 0x6c877a20, 0x39b91: 0x6c877c20, 0x39b92: 0x6cb26420, 0x39b93: 0x6cb26620, + 0x39b94: 0x6cb26820, 0x39b95: 0x6cb26a20, 0x39b96: 0x6cb26c20, 0x39b97: 0x6cb26e20, + 0x39b98: 0x6cb27020, 0x39b99: 0x6cb27220, 0x39b9a: 0x6cb27420, 0x39b9b: 0x6cb27620, + 0x39b9c: 0x6cb27820, 0x39b9d: 0x6cb27a20, 0x39b9e: 0x6cb27c20, 0x39b9f: 0x6cb27e20, + 0x39ba0: 0x6cb28020, 0x39ba1: 0x6cb28220, 0x39ba2: 0x6cb28420, 0x39ba3: 0x6cb28620, + 0x39ba4: 0x6cb28820, 0x39ba5: 0x6cb28a20, 0x39ba6: 0x6cb28c20, 0x39ba7: 0x6cb28e20, + 0x39ba8: 0x6cb29020, 0x39ba9: 0x6cb29220, 0x39baa: 0x6cb29420, 0x39bab: 0x6cb29620, + 0x39bac: 0x6cb29820, 0x39bad: 0x6cb29a20, 0x39bae: 0x6cb29c20, 0x39baf: 0x6cb29e20, + 0x39bb0: 0x6cb2a020, 0x39bb1: 0x6cb2a220, 0x39bb2: 0x6ce1ee20, 0x39bb3: 0x6ce1f020, + 0x39bb4: 0x6ce1f220, 0x39bb5: 0x6ce1f420, 0x39bb6: 0x6ce1f620, 0x39bb7: 0x6ce1f820, + 0x39bb8: 0x6ce1fa20, 0x39bb9: 0x6ce1fc20, 0x39bba: 0x6ce1fe20, 0x39bbb: 0x6ce20020, + 0x39bbc: 0x6ce20220, 0x39bbd: 0x6ce20420, 0x39bbe: 0x6ce20620, 0x39bbf: 0x6ce20820, + // Block 0xe6f, offset 0x39bc0 + 0x39bc0: 0x6ce20a20, 0x39bc1: 0x6ce20c20, 0x39bc2: 0x6ce20e20, 0x39bc3: 0x6ce21020, + 0x39bc4: 0x6ce21220, 0x39bc5: 0x6ce21420, 0x39bc6: 0x6ce21620, 0x39bc7: 0x6ce21820, + 0x39bc8: 0x6ce21a20, 0x39bc9: 0x6ce21c20, 0x39bca: 0x6ce21e20, 0x39bcb: 0x6ce22020, + 0x39bcc: 0x6ce22220, 0x39bcd: 0x6ce22420, 0x39bce: 0x6ce22620, 0x39bcf: 0x6ce22820, + 0x39bd0: 0x6ce22a20, 0x39bd1: 0x6ce22c20, 0x39bd2: 0x6ce22e20, 0x39bd3: 0x6ce23020, + 0x39bd4: 0x6ce23220, 0x39bd5: 0x6d105020, 0x39bd6: 0x6d105220, 0x39bd7: 0x6d105420, + 0x39bd8: 0x6d105620, 0x39bd9: 0x6d105820, 0x39bda: 0x6d105a20, 0x39bdb: 0x6d105c20, + 0x39bdc: 0x6d105e20, 0x39bdd: 0x6d106020, 0x39bde: 0x6d106220, 0x39bdf: 0x6d106420, + 0x39be0: 0x6d106620, 0x39be1: 0x6d106820, 0x39be2: 0x6d106a20, 0x39be3: 0x6d106c20, + 0x39be4: 0x6d106e20, 0x39be5: 0x6d107020, 0x39be6: 0x6d107220, 0x39be7: 0x6d107420, + 0x39be8: 0x6d107620, 0x39be9: 0x6d107820, 0x39bea: 0x6d107a20, 0x39beb: 0x6d107c20, + 0x39bec: 0x6d107e20, 0x39bed: 0x6d108020, 0x39bee: 0x6d108220, 0x39bef: 0x6d108420, + 0x39bf0: 0x6d108620, 0x39bf1: 0x6d108820, 0x39bf2: 0x6d108a20, 0x39bf3: 0x6d108c20, + 0x39bf4: 0x6d108e20, 0x39bf5: 0x6d109020, 0x39bf6: 0x6d109220, 0x39bf7: 0x6d109420, + 0x39bf8: 0x6d109620, 0x39bf9: 0x6d109820, 0x39bfa: 0x6d109a20, 0x39bfb: 0x6d109c20, + 0x39bfc: 0x6d109e20, 0x39bfd: 0x6d10a020, 0x39bfe: 0x6d10a220, 0x39bff: 0x6d10a420, + // Block 0xe70, offset 0x39c00 + 0x39c00: 0x6d3e7220, 0x39c01: 0x6d3e7420, 0x39c02: 0x6d3e7620, 0x39c03: 0x6d3e7820, + 0x39c04: 0x6d3e7a20, 0x39c05: 0x6d3e7c20, 0x39c06: 0x6d3e7e20, 0x39c07: 0x6d3e8020, + 0x39c08: 0x6d3e8220, 0x39c09: 0x6d3e8420, 0x39c0a: 0x6d3e8620, 0x39c0b: 0x6d3e8820, + 0x39c0c: 0x6d3e8a20, 0x39c0d: 0x6d3e8c20, 0x39c0e: 0x6d3e8e20, 0x39c0f: 0x6d3e9020, + 0x39c10: 0x6d3e9220, 0x39c11: 0x6d3e9420, 0x39c12: 0x6d3e9620, 0x39c13: 0x6d3e9820, + 0x39c14: 0x6d3e9a20, 0x39c15: 0x6d3e9c20, 0x39c16: 0x6d3e9e20, 0x39c17: 0x6d3ea020, + 0x39c18: 0x6d3ea220, 0x39c19: 0x6d3ea420, 0x39c1a: 0x6d3ea620, 0x39c1b: 0x6d3ea820, + 0x39c1c: 0x6d3eaa20, 0x39c1d: 0x6d3eac20, 0x39c1e: 0x6d3eae20, 0x39c1f: 0x6d3eb020, + 0x39c20: 0x6d3eb220, 0x39c21: 0x6d3eb420, 0x39c22: 0x6d3eb620, 0x39c23: 0x6d3eb820, + 0x39c24: 0x6d3eba20, 0x39c25: 0x6d3ebc20, 0x39c26: 0x6d3ebe20, 0x39c27: 0x6d3ec020, + 0x39c28: 0x6d3ec220, 0x39c29: 0x6d3ec420, 0x39c2a: 0x6d3ec620, 0x39c2b: 0x6d3ec820, + 0x39c2c: 0x6d3eca20, 0x39c2d: 0x6d3ecc20, 0x39c2e: 0x6d3ece20, 0x39c2f: 0x6d3ed020, + 0x39c30: 0x6d3ed220, 0x39c31: 0x6d3ed420, 0x39c32: 0x6d3ed620, 0x39c33: 0x6d3ed820, + 0x39c34: 0x6d3eda20, 0x39c35: 0x6d6b3c20, 0x39c36: 0x6d6b3e20, 0x39c37: 0x6d6b4020, + 0x39c38: 0x6d6b4220, 0x39c39: 0x6d6b4420, 0x39c3a: 0x6d6b4620, 0x39c3b: 0x6d6b4820, + 0x39c3c: 0x6d6b4a20, 0x39c3d: 0x6d6b4c20, 0x39c3e: 0x6d6b4e20, 0x39c3f: 0x6d6b5020, + // Block 0xe71, offset 0x39c40 + 0x39c40: 0x6d6b5220, 0x39c41: 0x6d6b5420, 0x39c42: 0x6d6b5620, 0x39c43: 0x6d6b5820, + 0x39c44: 0x6d6b5a20, 0x39c45: 0x6d6b5c20, 0x39c46: 0x6d6b5e20, 0x39c47: 0x6d6b6020, + 0x39c48: 0x6d6b6220, 0x39c49: 0x6d6b6420, 0x39c4a: 0x6d6b6620, 0x39c4b: 0x6d6b6820, + 0x39c4c: 0x6d6b6a20, 0x39c4d: 0x6d6b6c20, 0x39c4e: 0x6d6b6e20, 0x39c4f: 0x6d6b7020, + 0x39c50: 0x6d6b7220, 0x39c51: 0x6d6b7420, 0x39c52: 0x6d6b7620, 0x39c53: 0x6d6b7820, + 0x39c54: 0x6d6b7a20, 0x39c55: 0x6d6b7c20, 0x39c56: 0x6d6b7e20, 0x39c57: 0x6d6b8020, + 0x39c58: 0x6d6b8220, 0x39c59: 0x6d6b8420, 0x39c5a: 0x6d6b8620, 0x39c5b: 0x6d6b8820, + 0x39c5c: 0x6d6b8a20, 0x39c5d: 0x6d946e20, 0x39c5e: 0x6d947020, 0x39c5f: 0x6d6b8c20, + 0x39c60: 0x6d947220, 0x39c61: 0x6d947420, 0x39c62: 0x6d947620, 0x39c63: 0x6d947820, + 0x39c64: 0x6d947a20, 0x39c65: 0x6d947c20, 0x39c66: 0x6d947e20, 0x39c67: 0x6d948020, + 0x39c68: 0x6d948220, 0x39c69: 0x6d948420, 0x39c6a: 0x6d948620, 0x39c6b: 0x6d948820, + 0x39c6c: 0x6d948a20, 0x39c6d: 0x6d948c20, 0x39c6e: 0x6d948e20, 0x39c6f: 0x6d949020, + 0x39c70: 0x6d949220, 0x39c71: 0x6d949420, 0x39c72: 0x6d949620, 0x39c73: 0x6d949820, + 0x39c74: 0x6d949a20, 0x39c75: 0x6d949c20, 0x39c76: 0x6d949e20, 0x39c77: 0x6d94a020, + 0x39c78: 0x6d94a220, 0x39c79: 0x6d94a420, 0x39c7a: 0x6d94a620, 0x39c7b: 0x6d94a820, + 0x39c7c: 0x6d94aa20, 0x39c7d: 0x6d94ac20, 0x39c7e: 0x6d94ae20, 0x39c7f: 0x6d94b020, + // Block 0xe72, offset 0x39c80 + 0x39c80: 0x6d94b220, 0x39c81: 0x6d94b420, 0x39c82: 0x6d94b620, 0x39c83: 0x6d94b820, + 0x39c84: 0x6d94ba20, 0x39c85: 0x6d94bc20, 0x39c86: 0x6d94be20, 0x39c87: 0x6d94c020, + 0x39c88: 0x6d94c220, 0x39c89: 0x6d94c420, 0x39c8a: 0x6d94c620, 0x39c8b: 0x6d94c820, + 0x39c8c: 0x6d94ca20, 0x39c8d: 0x6d94cc20, 0x39c8e: 0x6d94ce20, 0x39c8f: 0x6d94d020, + 0x39c90: 0x6d94d220, 0x39c91: 0x6d94d420, 0x39c92: 0x6d94d620, 0x39c93: 0x6db7ae20, + 0x39c94: 0x6db7b020, 0x39c95: 0x6db7b220, 0x39c96: 0x6db7b420, 0x39c97: 0x6db7b620, + 0x39c98: 0x6db7b820, 0x39c99: 0x6db7ba20, 0x39c9a: 0x6db7bc20, 0x39c9b: 0x6db7be20, + 0x39c9c: 0x6db7c020, 0x39c9d: 0x6db7c220, 0x39c9e: 0x6db7c420, 0x39c9f: 0x6db7c620, + 0x39ca0: 0x6db7c820, 0x39ca1: 0x6db7ca20, 0x39ca2: 0x6db7cc20, 0x39ca3: 0x6db7ce20, + 0x39ca4: 0x6db7d020, 0x39ca5: 0x6db7d220, 0x39ca6: 0x6db7d420, 0x39ca7: 0x6db7d620, + 0x39ca8: 0x6db7d820, 0x39ca9: 0x6db7da20, 0x39caa: 0x6db7dc20, 0x39cab: 0x6db7de20, + 0x39cac: 0x6db7e020, 0x39cad: 0x6db7e220, 0x39cae: 0x6db7e420, 0x39caf: 0x6db7e620, + 0x39cb0: 0x6db7e820, 0x39cb1: 0x6db7ea20, 0x39cb2: 0x6db7ec20, 0x39cb3: 0x6db7ee20, + 0x39cb4: 0x6db7f020, 0x39cb5: 0x6db7f220, 0x39cb6: 0x6db7f420, 0x39cb7: 0x6db7f620, + 0x39cb8: 0x6db7f820, 0x39cb9: 0x6db7fa20, 0x39cba: 0x6db7fc20, 0x39cbb: 0x6db7fe20, + 0x39cbc: 0x6db80020, 0x39cbd: 0x6db80220, 0x39cbe: 0x6db80420, 0x39cbf: 0x6db80620, + // Block 0xe73, offset 0x39cc0 + 0x39cc0: 0x6db80820, 0x39cc1: 0x6db80a20, 0x39cc2: 0x6db80c20, 0x39cc3: 0x6dd61420, + 0x39cc4: 0x6db80e20, 0x39cc5: 0x6dd61620, 0x39cc6: 0x6dd61820, 0x39cc7: 0x6dd61a20, + 0x39cc8: 0x6dd61c20, 0x39cc9: 0x6dd61e20, 0x39cca: 0x6dd62020, 0x39ccb: 0x6dd62220, + 0x39ccc: 0x6dd62420, 0x39ccd: 0x6dd62620, 0x39cce: 0x6dd62820, 0x39ccf: 0x6dd62a20, + 0x39cd0: 0x6dd62c20, 0x39cd1: 0x6dd62e20, 0x39cd2: 0x6dd63020, 0x39cd3: 0x6dd63220, + 0x39cd4: 0x6dd63420, 0x39cd5: 0x6dd63620, 0x39cd6: 0x6dd63820, 0x39cd7: 0x6dd63a20, + 0x39cd8: 0x6dd63c20, 0x39cd9: 0x6dd63e20, 0x39cda: 0x6dd64020, 0x39cdb: 0x6dd64220, + 0x39cdc: 0x6dd64420, 0x39cdd: 0x6dd64620, 0x39cde: 0x6dd64820, 0x39cdf: 0x6dd64a20, + 0x39ce0: 0x6dd64c20, 0x39ce1: 0x6dd64e20, 0x39ce2: 0x6dd65020, 0x39ce3: 0x6dd65220, + 0x39ce4: 0x6dd65420, 0x39ce5: 0x6dd65620, 0x39ce6: 0x6dd65820, 0x39ce7: 0x6dd65a20, + 0x39ce8: 0x6dd65c20, 0x39ce9: 0x6dd65e20, 0x39cea: 0x6dd66020, 0x39ceb: 0x6dd66220, + 0x39cec: 0x6dd66420, 0x39ced: 0x6dd66620, 0x39cee: 0x6dd66820, 0x39cef: 0x6dd66a20, + 0x39cf0: 0x6dd66c20, 0x39cf1: 0x6dd66e20, 0x39cf2: 0x6dd67020, 0x39cf3: 0x6dd67220, + 0x39cf4: 0x6dd67420, 0x39cf5: 0x6dd67620, 0x39cf6: 0x6dd67820, 0x39cf7: 0x6dd67a20, + 0x39cf8: 0x6dd67c20, 0x39cf9: 0x6dd67e20, 0x39cfa: 0x6dd68020, 0x39cfb: 0x6dd68220, + 0x39cfc: 0x6dd68420, 0x39cfd: 0x6dd68620, 0x39cfe: 0x6dd68820, 0x39cff: 0x6dd68a20, + // Block 0xe74, offset 0x39d00 + 0x39d00: 0x6dd68c20, 0x39d01: 0x6dd68e20, 0x39d02: 0x6dd69020, 0x39d03: 0x6dd69220, + 0x39d04: 0x6dd69420, 0x39d05: 0x6dd69620, 0x39d06: 0x6dd69820, 0x39d07: 0x6dd69a20, + 0x39d08: 0x6dd69c20, 0x39d09: 0x6dd69e20, 0x39d0a: 0x6deef420, 0x39d0b: 0x6deef620, + 0x39d0c: 0x6deef820, 0x39d0d: 0x6deefa20, 0x39d0e: 0x6deefc20, 0x39d0f: 0x6deefe20, + 0x39d10: 0x6def0020, 0x39d11: 0x6def0220, 0x39d12: 0x6def0420, 0x39d13: 0x6def0620, + 0x39d14: 0x6def0820, 0x39d15: 0x6def0a20, 0x39d16: 0x6def0c20, 0x39d17: 0x6def0e20, + 0x39d18: 0x6def1020, 0x39d19: 0x6def1220, 0x39d1a: 0x6dd6a020, 0x39d1b: 0x6def1420, + 0x39d1c: 0x6def1620, 0x39d1d: 0x6def1820, 0x39d1e: 0x6def1a20, 0x39d1f: 0x6def1c20, + 0x39d20: 0x6def1e20, 0x39d21: 0x6def2020, 0x39d22: 0x6def2220, 0x39d23: 0x6def2420, + 0x39d24: 0x6def2620, 0x39d25: 0x6def2820, 0x39d26: 0x6def2a20, 0x39d27: 0x6def2c20, + 0x39d28: 0x6def2e20, 0x39d29: 0x6def3020, 0x39d2a: 0x6def3220, 0x39d2b: 0x6def3420, + 0x39d2c: 0x6def3620, 0x39d2d: 0x6def3820, 0x39d2e: 0x6def3a20, 0x39d2f: 0x6def3c20, + 0x39d30: 0x6def3e20, 0x39d31: 0x6def4020, 0x39d32: 0x6def4220, 0x39d33: 0x6def4420, + 0x39d34: 0x6def4620, 0x39d35: 0x6def4820, 0x39d36: 0x6def4a20, 0x39d37: 0x6def4c20, + 0x39d38: 0x6def4e20, 0x39d39: 0x6def5020, 0x39d3a: 0x6def5220, 0x39d3b: 0x6def5420, + 0x39d3c: 0x6def5620, 0x39d3d: 0x6def5820, 0x39d3e: 0x6def5a20, 0x39d3f: 0x6def5c20, + // Block 0xe75, offset 0x39d40 + 0x39d40: 0x6def5e20, 0x39d41: 0x6e034020, 0x39d42: 0x6e034220, 0x39d43: 0x6e034420, + 0x39d44: 0x6e034620, 0x39d45: 0x6e034820, 0x39d46: 0x6e034a20, 0x39d47: 0x6e034c20, + 0x39d48: 0x6e034e20, 0x39d49: 0x6e035020, 0x39d4a: 0x6e035220, 0x39d4b: 0x6e035420, + 0x39d4c: 0x6e035620, 0x39d4d: 0x6e035820, 0x39d4e: 0x6e035a20, 0x39d4f: 0x6e035c20, + 0x39d50: 0x6e035e20, 0x39d51: 0x6e036020, 0x39d52: 0x6e036220, 0x39d53: 0x6e036420, + 0x39d54: 0x6e036620, 0x39d55: 0x6e036820, 0x39d56: 0x6e036a20, 0x39d57: 0x6e036c20, + 0x39d58: 0x6e036e20, 0x39d59: 0x6e037020, 0x39d5a: 0x6e037220, 0x39d5b: 0x6e037420, + 0x39d5c: 0x6e037620, 0x39d5d: 0x6e037820, 0x39d5e: 0x6e037a20, 0x39d5f: 0x6e037c20, + 0x39d60: 0x6e037e20, 0x39d61: 0x6e038020, 0x39d62: 0x6e038220, 0x39d63: 0x6e038420, + 0x39d64: 0x6e038620, 0x39d65: 0x6e038820, 0x39d66: 0x6e038a20, 0x39d67: 0x6e038c20, + 0x39d68: 0x6e038e20, 0x39d69: 0x6e039020, 0x39d6a: 0x6e14d420, 0x39d6b: 0x6e14d620, + 0x39d6c: 0x6e14d820, 0x39d6d: 0x6e14da20, 0x39d6e: 0x6e14dc20, 0x39d6f: 0x6e14de20, + 0x39d70: 0x6e14e020, 0x39d71: 0x6e14e220, 0x39d72: 0x6e14e420, 0x39d73: 0x6e14e620, + 0x39d74: 0x6e14e820, 0x39d75: 0x6e14ea20, 0x39d76: 0x6e14ec20, 0x39d77: 0x6e14ee20, + 0x39d78: 0x6e14f020, 0x39d79: 0x6e14f220, 0x39d7a: 0x6e14f420, 0x39d7b: 0x6e14f620, + 0x39d7c: 0x6e14f820, 0x39d7d: 0x6e14fa20, 0x39d7e: 0x6e14fc20, 0x39d7f: 0x6e14fe20, + // Block 0xe76, offset 0x39d80 + 0x39d80: 0x6e150020, 0x39d81: 0x6e228020, 0x39d82: 0x6e228220, 0x39d83: 0x6e228420, + 0x39d84: 0x6e228620, 0x39d85: 0x6e228820, 0x39d86: 0x6e228a20, 0x39d87: 0x6e228c20, + 0x39d88: 0x6e228e20, 0x39d89: 0x6e229020, 0x39d8a: 0x6e229220, 0x39d8b: 0x6e229420, + 0x39d8c: 0x6e229620, 0x39d8d: 0x6e229820, 0x39d8e: 0x6e229a20, 0x39d8f: 0x6e229c20, + 0x39d90: 0x6e229e20, 0x39d91: 0x6e22a020, 0x39d92: 0x6e22a220, 0x39d93: 0x6e22a420, + 0x39d94: 0x6e22a620, 0x39d95: 0x6e22a820, 0x39d96: 0x6e2cca20, 0x39d97: 0x6e2ccc20, + 0x39d98: 0x6e2cce20, 0x39d99: 0x6e2cd020, 0x39d9a: 0x6e2cd220, 0x39d9b: 0x6e2cd420, + 0x39d9c: 0x6e2cd620, 0x39d9d: 0x6e2cd820, 0x39d9e: 0x6e2cda20, 0x39d9f: 0x6e2cdc20, + 0x39da0: 0x6e2cde20, 0x39da1: 0x6e2ce020, 0x39da2: 0x6e2ce220, 0x39da3: 0x6e2ce420, + 0x39da4: 0x6e34ca20, 0x39da5: 0x6e34cc20, 0x39da6: 0x6e34ce20, 0x39da7: 0x6e34d020, + 0x39da8: 0x6e34d220, 0x39da9: 0x6e34d420, 0x39daa: 0x6e34d620, 0x39dab: 0x6e34d820, + 0x39dac: 0x6e34da20, 0x39dad: 0x6e34dc20, 0x39dae: 0x6e3a8620, 0x39daf: 0x6e3a8820, + 0x39db0: 0x6e3a8a20, 0x39db1: 0x6e3a8c20, 0x39db2: 0x6e3a8e20, 0x39db3: 0x6e3a9020, + 0x39db4: 0x6e3a9220, 0x39db5: 0x6e3a9420, 0x39db6: 0x6e3a9620, 0x39db7: 0x6e3a9820, + 0x39db8: 0x6e3a9a20, 0x39db9: 0x6e3a9c20, 0x39dba: 0x6e3a9e20, 0x39dbb: 0x6e3e5020, + 0x39dbc: 0x6e3e5220, 0x39dbd: 0x6e3e5420, 0x39dbe: 0x6e3e5620, 0x39dbf: 0x6e3e5820, + // Block 0xe77, offset 0x39dc0 + 0x39dc0: 0x6e3e5a20, 0x39dc1: 0x6e412620, 0x39dc2: 0x6e412820, 0x39dc3: 0x6e412a20, + 0x39dc4: 0x6e432620, 0x39dc5: 0x6e432820, 0x39dc6: 0x6e432a20, 0x39dc7: 0x6e432c20, + 0x39dc8: 0x6e448820, 0x39dc9: 0x6e448a20, 0x39dca: 0x6e448c20, 0x39dcb: 0x6e455e20, + 0x39dcc: 0x6e456020, 0x39dcd: 0x6e45dc20, 0x39dce: 0x6e470a20, 0x39dcf: 0x6c270820, + 0x39dd0: 0x6c270a20, 0x39dd1: 0x6c270c20, 0x39dd2: 0x6c612a20, 0x39dd3: 0x6c878220, + 0x39dd4: 0x6c878420, 0x39dd5: 0x6c878620, 0x39dd6: 0x6c878820, 0x39dd7: 0x6c878a20, + 0x39dd8: 0x6cb2b020, 0x39dd9: 0x6cb2b220, 0x39dda: 0x6cb2b420, 0x39ddb: 0x6cb2b620, + 0x39ddc: 0x6cb2b820, 0x39ddd: 0x6cb2ba20, 0x39dde: 0x6cb2bc20, 0x39ddf: 0x6cb2be20, + 0x39de0: 0x6cb2c020, 0x39de1: 0x6cb2c220, 0x39de2: 0x6cb2c420, 0x39de3: 0x6cb2c620, + 0x39de4: 0x6cb2c820, 0x39de5: 0x6cb2ca20, 0x39de6: 0x6cb2cc20, 0x39de7: 0x6cb2ce20, + 0x39de8: 0x6cb2d020, 0x39de9: 0x6ce24620, 0x39dea: 0x6ce24820, 0x39deb: 0x6ce24a20, + 0x39dec: 0x6ce24c20, 0x39ded: 0x6ce24e20, 0x39dee: 0x6ce25020, 0x39def: 0x6ce25220, + 0x39df0: 0x6ce25420, 0x39df1: 0x6ce25620, 0x39df2: 0x6ce25820, 0x39df3: 0x6ce25a20, + 0x39df4: 0x6ce25c20, 0x39df5: 0x6ce25e20, 0x39df6: 0x6ce26020, 0x39df7: 0x6ce26220, + 0x39df8: 0x6d10bc20, 0x39df9: 0x6d10be20, 0x39dfa: 0x6d10c020, 0x39dfb: 0x6d10c220, + 0x39dfc: 0x6d10c420, 0x39dfd: 0x6d10c620, 0x39dfe: 0x6d10c820, 0x39dff: 0x6d10ca20, + // Block 0xe78, offset 0x39e00 + 0x39e00: 0x6d10cc20, 0x39e01: 0x6d10ce20, 0x39e02: 0x6d10d020, 0x39e03: 0x6d10d220, + 0x39e04: 0x6d10d420, 0x39e05: 0x6d10d620, 0x39e06: 0x6d10d820, 0x39e07: 0x6d10da20, + 0x39e08: 0x6d3ee820, 0x39e09: 0x6d3eea20, 0x39e0a: 0x6d3eec20, 0x39e0b: 0x6d3eee20, + 0x39e0c: 0x6d3ef020, 0x39e0d: 0x6d3ef220, 0x39e0e: 0x6d3ef420, 0x39e0f: 0x6d3ef620, + 0x39e10: 0x6d3ef820, 0x39e11: 0x6d3efa20, 0x39e12: 0x6d3efc20, 0x39e13: 0x6d3efe20, + 0x39e14: 0x6d6bac20, 0x39e15: 0x6d6bae20, 0x39e16: 0x6d6bb020, 0x39e17: 0x6d6bb220, + 0x39e18: 0x6d6bb420, 0x39e19: 0x6d6bb620, 0x39e1a: 0x6d6bb820, 0x39e1b: 0x6d6bba20, + 0x39e1c: 0x6d6bbc20, 0x39e1d: 0x6d6bbe20, 0x39e1e: 0x6d6bc020, 0x39e1f: 0x6d6bc220, + 0x39e20: 0x6d6bc420, 0x39e21: 0x6d6bc620, 0x39e22: 0x6d94e820, 0x39e23: 0x6d94ea20, + 0x39e24: 0x6d94ec20, 0x39e25: 0x6d94ee20, 0x39e26: 0x6db81a20, 0x39e27: 0x6d94f020, + 0x39e28: 0x6d94f220, 0x39e29: 0x6d94f420, 0x39e2a: 0x6d94f620, 0x39e2b: 0x6d94f820, + 0x39e2c: 0x6d94fa20, 0x39e2d: 0x6d94fc20, 0x39e2e: 0x6db81c20, 0x39e2f: 0x6db81e20, + 0x39e30: 0x6db82020, 0x39e31: 0x6db82220, 0x39e32: 0x6db82420, 0x39e33: 0x6db82620, + 0x39e34: 0x6db82820, 0x39e35: 0x6db82a20, 0x39e36: 0x6db82c20, 0x39e37: 0x6db82e20, + 0x39e38: 0x6db83020, 0x39e39: 0x6dd6b220, 0x39e3a: 0x6dd6b420, 0x39e3b: 0x6dd6b620, + 0x39e3c: 0x6dd6b820, 0x39e3d: 0x6dd6ba20, 0x39e3e: 0x6dd6bc20, 0x39e3f: 0x6def7420, + // Block 0xe79, offset 0x39e40 + 0x39e40: 0x6def7620, 0x39e41: 0x6def7820, 0x39e42: 0x6def7a20, 0x39e43: 0x6def7c20, + 0x39e44: 0x6def7e20, 0x39e45: 0x6def8020, 0x39e46: 0x6def8220, 0x39e47: 0x6def8420, + 0x39e48: 0x6def8620, 0x39e49: 0x6def8820, 0x39e4a: 0x6def8a20, 0x39e4b: 0x6def8c20, + 0x39e4c: 0x6def8e20, 0x39e4d: 0x6e039e20, 0x39e4e: 0x6e03a020, 0x39e4f: 0x6e03a220, + 0x39e50: 0x6e03a420, 0x39e51: 0x6e03a620, 0x39e52: 0x6e03a820, 0x39e53: 0x6e150820, + 0x39e54: 0x6e150a20, 0x39e55: 0x6e150c20, 0x39e56: 0x6e150e20, 0x39e57: 0x6e151020, + 0x39e58: 0x6e22ae20, 0x39e59: 0x6e22b020, 0x39e5a: 0x6e22b220, 0x39e5b: 0x6e2cea20, + 0x39e5c: 0x6e2cec20, 0x39e5d: 0x6e3aa020, 0x39e5e: 0x6e3aa220, 0x39e5f: 0x6e3e5c20, + 0x39e60: 0x6c613620, 0x39e61: 0x6c613820, 0x39e62: 0x6c613a20, 0x39e63: 0x6c613c20, + 0x39e64: 0x6c613e20, 0x39e65: 0x6c614020, 0x39e66: 0x6c614220, 0x39e67: 0x6c879e20, + 0x39e68: 0x6c87a020, 0x39e69: 0x6c87a220, 0x39e6a: 0x6c87a420, 0x39e6b: 0x6c87a620, + 0x39e6c: 0x6c87a820, 0x39e6d: 0x6c87aa20, 0x39e6e: 0x6c87ac20, 0x39e6f: 0x6c87ae20, + 0x39e70: 0x6c87b020, 0x39e71: 0x6c87b220, 0x39e72: 0x6c87b420, 0x39e73: 0x6cb30020, + 0x39e74: 0x6cb30220, 0x39e75: 0x6cb30420, 0x39e76: 0x6cb30620, 0x39e77: 0x6cb30820, + 0x39e78: 0x6cb30a20, 0x39e79: 0x6cb30c20, 0x39e7a: 0x6cb30e20, 0x39e7b: 0x6cb31020, + 0x39e7c: 0x6cb31220, 0x39e7d: 0x6cb31420, 0x39e7e: 0x6cb31620, 0x39e7f: 0x6cb31820, + // Block 0xe7a, offset 0x39e80 + 0x39e80: 0x6cb31a20, 0x39e81: 0x6cb31c20, 0x39e82: 0x6cb31e20, 0x39e83: 0x6cb32020, + 0x39e84: 0x6cb32220, 0x39e85: 0x6cb32420, 0x39e86: 0x6cb32620, 0x39e87: 0x6cb32820, + 0x39e88: 0x6cb32a20, 0x39e89: 0x6cb32c20, 0x39e8a: 0x6cb32e20, 0x39e8b: 0x6cb33020, + 0x39e8c: 0x6cb33220, 0x39e8d: 0x6cb33420, 0x39e8e: 0x6ce2a020, 0x39e8f: 0x6ce2a220, + 0x39e90: 0x6ce2a420, 0x39e91: 0x6ce2a620, 0x39e92: 0x6ce2a820, 0x39e93: 0x6ce2aa20, + 0x39e94: 0x6ce2ac20, 0x39e95: 0x6ce2ae20, 0x39e96: 0x6ce2b020, 0x39e97: 0x6ce2b220, + 0x39e98: 0x6ce2b420, 0x39e99: 0x6ce2b620, 0x39e9a: 0x6ce2b820, 0x39e9b: 0x6ce2ba20, + 0x39e9c: 0x6ce2bc20, 0x39e9d: 0x6ce2be20, 0x39e9e: 0x6ce2c020, 0x39e9f: 0x6ce2c220, + 0x39ea0: 0x6ce2c420, 0x39ea1: 0x6ce2c620, 0x39ea2: 0x6ce2c820, 0x39ea3: 0x6ce2ca20, + 0x39ea4: 0x6ce2cc20, 0x39ea5: 0x6ce2ce20, 0x39ea6: 0x6ce2d020, 0x39ea7: 0x6ce2d220, + 0x39ea8: 0x6d110a20, 0x39ea9: 0x6d110c20, 0x39eaa: 0x6d110e20, 0x39eab: 0x6d111020, + 0x39eac: 0x6d111220, 0x39ead: 0x6d111420, 0x39eae: 0x6d111620, 0x39eaf: 0x6d111820, + 0x39eb0: 0x6d111a20, 0x39eb1: 0x6d111c20, 0x39eb2: 0x6d111e20, 0x39eb3: 0x6d112020, + 0x39eb4: 0x6d112220, 0x39eb5: 0x6d112420, 0x39eb6: 0x6d112620, 0x39eb7: 0x6d112820, + 0x39eb8: 0x6d112a20, 0x39eb9: 0x6d112c20, 0x39eba: 0x6d112e20, 0x39ebb: 0x6d113020, + 0x39ebc: 0x6d113220, 0x39ebd: 0x6d113420, 0x39ebe: 0x6d113620, 0x39ebf: 0x6d113820, + // Block 0xe7b, offset 0x39ec0 + 0x39ec0: 0x6d113a20, 0x39ec1: 0x6d113c20, 0x39ec2: 0x6d3f1c20, 0x39ec3: 0x6d3f1e20, + 0x39ec4: 0x6d3f2020, 0x39ec5: 0x6d3f2220, 0x39ec6: 0x6d3f2420, 0x39ec7: 0x6d3f2620, + 0x39ec8: 0x6d3f2820, 0x39ec9: 0x6d3f2a20, 0x39eca: 0x6d3f2c20, 0x39ecb: 0x6d3f2e20, + 0x39ecc: 0x6d3f3020, 0x39ecd: 0x6d3f3220, 0x39ece: 0x6d3f3420, 0x39ecf: 0x6d3f3620, + 0x39ed0: 0x6d3f3820, 0x39ed1: 0x6d3f3a20, 0x39ed2: 0x6d3f3c20, 0x39ed3: 0x6d3f3e20, + 0x39ed4: 0x6d3f4020, 0x39ed5: 0x6d3f4220, 0x39ed6: 0x6d3f4420, 0x39ed7: 0x6d3f4620, + 0x39ed8: 0x6d3f4820, 0x39ed9: 0x6d3f4a20, 0x39eda: 0x6d3f4c20, 0x39edb: 0x6d3f4e20, + 0x39edc: 0x6d3f5020, 0x39edd: 0x6d3f5220, 0x39ede: 0x6d3f5420, 0x39edf: 0x6d3f5620, + 0x39ee0: 0x6d6bfe20, 0x39ee1: 0x6d6c0020, 0x39ee2: 0x6d6c0220, 0x39ee3: 0x6d6c0420, + 0x39ee4: 0x6d6c0620, 0x39ee5: 0x6d6c0820, 0x39ee6: 0x6d6c0a20, 0x39ee7: 0x6d6c0c20, + 0x39ee8: 0x6d6c0e20, 0x39ee9: 0x6d6c1020, 0x39eea: 0x6d6c1220, 0x39eeb: 0x6d6c1420, + 0x39eec: 0x6d6c1620, 0x39eed: 0x6d6c1820, 0x39eee: 0x6d6c1a20, 0x39eef: 0x6d6c1c20, + 0x39ef0: 0x6d6c1e20, 0x39ef1: 0x6d6c2020, 0x39ef2: 0x6d6c2220, 0x39ef3: 0x6d6c2420, + 0x39ef4: 0x6d6c2620, 0x39ef5: 0x6d6c2820, 0x39ef6: 0x6d6c2a20, 0x39ef7: 0x6d6c2c20, + 0x39ef8: 0x6d6c2e20, 0x39ef9: 0x6d6c3020, 0x39efa: 0x6d6c3220, 0x39efb: 0x6d6c3420, + 0x39efc: 0x6d6c3620, 0x39efd: 0x6d6c3820, 0x39efe: 0x6d6c3a20, 0x39eff: 0x6d6c3c20, + // Block 0xe7c, offset 0x39f00 + 0x39f00: 0x6d6c3e20, 0x39f01: 0x6d6c4020, 0x39f02: 0x6d6c4220, 0x39f03: 0x6d6c4420, + 0x39f04: 0x6d6c4620, 0x39f05: 0x6d6c4820, 0x39f06: 0x6d6c4a20, 0x39f07: 0x6d952820, + 0x39f08: 0x6d952a20, 0x39f09: 0x6d952c20, 0x39f0a: 0x6d952e20, 0x39f0b: 0x6d953020, + 0x39f0c: 0x6d953220, 0x39f0d: 0x6d953420, 0x39f0e: 0x6d953620, 0x39f0f: 0x6d953820, + 0x39f10: 0x6d953a20, 0x39f11: 0x6d953c20, 0x39f12: 0x6d953e20, 0x39f13: 0x6d954020, + 0x39f14: 0x6d954220, 0x39f15: 0x6d954420, 0x39f16: 0x6d954620, 0x39f17: 0x6d954820, + 0x39f18: 0x6d954a20, 0x39f19: 0x6d954c20, 0x39f1a: 0x6d954e20, 0x39f1b: 0x6d955020, + 0x39f1c: 0x6d955220, 0x39f1d: 0x6d955420, 0x39f1e: 0x6d955620, 0x39f1f: 0x6d955820, + 0x39f20: 0x6d955a20, 0x39f21: 0x6d955c20, 0x39f22: 0x6d955e20, 0x39f23: 0x6d956020, + 0x39f24: 0x6d956220, 0x39f25: 0x6d956420, 0x39f26: 0x6d956620, 0x39f27: 0x6d956820, + 0x39f28: 0x6d956a20, 0x39f29: 0x6db85420, 0x39f2a: 0x6db85620, 0x39f2b: 0x6db85820, + 0x39f2c: 0x6db85a20, 0x39f2d: 0x6db85c20, 0x39f2e: 0x6db85e20, 0x39f2f: 0x6db86020, + 0x39f30: 0x6db86220, 0x39f31: 0x6db86420, 0x39f32: 0x6db86620, 0x39f33: 0x6db86820, + 0x39f34: 0x6db86a20, 0x39f35: 0x6db86c20, 0x39f36: 0x6db86e20, 0x39f37: 0x6db87020, + 0x39f38: 0x6db87220, 0x39f39: 0x6db87420, 0x39f3a: 0x6db87620, 0x39f3b: 0x6db87820, + 0x39f3c: 0x6db87a20, 0x39f3d: 0x6db87c20, 0x39f3e: 0x6db87e20, 0x39f3f: 0x6db88020, + // Block 0xe7d, offset 0x39f40 + 0x39f40: 0x6db88220, 0x39f41: 0x6db88420, 0x39f42: 0x6db88620, 0x39f43: 0x6db88820, + 0x39f44: 0x6db88a20, 0x39f45: 0x6db88c20, 0x39f46: 0x6db88e20, 0x39f47: 0x6db89020, + 0x39f48: 0x6db89220, 0x39f49: 0x6db89420, 0x39f4a: 0x6dd6de20, 0x39f4b: 0x6dd6e020, + 0x39f4c: 0x6dd6e220, 0x39f4d: 0x6dd6e420, 0x39f4e: 0x6dd6e620, 0x39f4f: 0x6dd6e820, + 0x39f50: 0x6dd6ea20, 0x39f51: 0x6dd6ec20, 0x39f52: 0x6dd6ee20, 0x39f53: 0x6dd6f020, + 0x39f54: 0x6dd6f220, 0x39f55: 0x6dd6f420, 0x39f56: 0x6dd6f620, 0x39f57: 0x6dd6f820, + 0x39f58: 0x6dd6fa20, 0x39f59: 0x6dd6fc20, 0x39f5a: 0x6dd6fe20, 0x39f5b: 0x6dd70020, + 0x39f5c: 0x6dd70220, 0x39f5d: 0x6dd70420, 0x39f5e: 0x6dd70620, 0x39f5f: 0x6dd70820, + 0x39f60: 0x6dd70a20, 0x39f61: 0x6dd70c20, 0x39f62: 0x6dd70e20, 0x39f63: 0x6dd71020, + 0x39f64: 0x6defaa20, 0x39f65: 0x6defac20, 0x39f66: 0x6defae20, 0x39f67: 0x6defb020, + 0x39f68: 0x6defb220, 0x39f69: 0x6defb420, 0x39f6a: 0x6defb620, 0x39f6b: 0x6defb820, + 0x39f6c: 0x6defba20, 0x39f6d: 0x6defbc20, 0x39f6e: 0x6defbe20, 0x39f6f: 0x6defc020, + 0x39f70: 0x6defc220, 0x39f71: 0x6defc420, 0x39f72: 0x6e03ba20, 0x39f73: 0x6e03bc20, + 0x39f74: 0x6e03be20, 0x39f75: 0x6e03c020, 0x39f76: 0x6e03c220, 0x39f77: 0x6e03c420, + 0x39f78: 0x6e03c620, 0x39f79: 0x6e03c820, 0x39f7a: 0x6e03ca20, 0x39f7b: 0x6e03cc20, + 0x39f7c: 0x6e03ce20, 0x39f7d: 0x6e03d020, 0x39f7e: 0x6e03d220, 0x39f7f: 0x6e03d420, + // Block 0xe7e, offset 0x39f80 + 0x39f80: 0x6e03d620, 0x39f81: 0x6e03d820, 0x39f82: 0x6e03da20, 0x39f83: 0x6e03dc20, + 0x39f84: 0x6e03de20, 0x39f85: 0x6e03e020, 0x39f86: 0x6e03e220, 0x39f87: 0x6e03e420, + 0x39f88: 0x6e152220, 0x39f89: 0x6e152420, 0x39f8a: 0x6e152620, 0x39f8b: 0x6e152820, + 0x39f8c: 0x6e152a20, 0x39f8d: 0x6e152c20, 0x39f8e: 0x6e152e20, 0x39f8f: 0x6e153020, + 0x39f90: 0x6e153220, 0x39f91: 0x6e22be20, 0x39f92: 0x6e22c020, 0x39f93: 0x6e22c220, + 0x39f94: 0x6e22c420, 0x39f95: 0x6e22c620, 0x39f96: 0x6e22c820, 0x39f97: 0x6e22ca20, + 0x39f98: 0x6e22cc20, 0x39f99: 0x6e22ce20, 0x39f9a: 0x6e22d020, 0x39f9b: 0x6e22d220, + 0x39f9c: 0x6e22d420, 0x39f9d: 0x6e22d620, 0x39f9e: 0x6e2cf220, 0x39f9f: 0x6e2cf420, + 0x39fa0: 0x6e2cf620, 0x39fa1: 0x6e2cf820, 0x39fa2: 0x6e2cfa20, 0x39fa3: 0x6e2cfc20, + 0x39fa4: 0x6e2cfe20, 0x39fa5: 0x6e2d0020, 0x39fa6: 0x6e2d0220, 0x39fa7: 0x6e2d0420, + 0x39fa8: 0x6e2d0620, 0x39fa9: 0x6e34e220, 0x39faa: 0x6e34e420, 0x39fab: 0x6e34e620, + 0x39fac: 0x6e34e820, 0x39fad: 0x6e34ea20, 0x39fae: 0x6e34ec20, 0x39faf: 0x6e34ee20, + 0x39fb0: 0x6e34f020, 0x39fb1: 0x6e34f220, 0x39fb2: 0x6e34f420, 0x39fb3: 0x6e3aa420, + 0x39fb4: 0x6e3aa620, 0x39fb5: 0x6e3e6020, 0x39fb6: 0x6e3e6220, 0x39fb7: 0x6e3e6420, + 0x39fb8: 0x6e3e6620, 0x39fb9: 0x6e413220, 0x39fba: 0x6e432e20, 0x39fbb: 0x6e413420, + 0x39fbc: 0x6e433020, 0x39fbd: 0x6e3e6820, 0x39fbe: 0x6e413620, 0x39fbf: 0x6e433220, + // Block 0xe7f, offset 0x39fc0 + 0x39fc0: 0x6e433420, 0x39fc1: 0x6e448e20, 0x39fc2: 0x6e456220, 0x39fc3: 0x6e45e020, + 0x39fc4: 0x6e471420, 0x39fc5: 0x6c40f020, 0x39fc6: 0x6c40f220, 0x39fc7: 0x6c615c20, + 0x39fc8: 0x6c87ca20, 0x39fc9: 0x6d957420, 0x39fca: 0x6e03ea20, 0x39fcb: 0x6c271e20, + 0x39fcc: 0x6c40f620, 0x39fcd: 0x6c87d220, 0x39fce: 0x6c87d420, 0x39fcf: 0x6cb34220, + 0x39fd0: 0x6cb34420, 0x39fd1: 0x6cb34620, 0x39fd2: 0x6ce2f420, 0x39fd3: 0x6ce2f620, + 0x39fd4: 0x6d115220, 0x39fd5: 0x6d115420, 0x39fd6: 0x6d115620, 0x39fd7: 0x6d115820, + 0x39fd8: 0x6d3f6e20, 0x39fd9: 0x6d3f7020, 0x39fda: 0x6d3f7220, 0x39fdb: 0x6d3f7420, + 0x39fdc: 0x6d6c5820, 0x39fdd: 0x6d6c5a20, 0x39fde: 0x6d6c5c20, 0x39fdf: 0x6d6c5e20, + 0x39fe0: 0x6d958420, 0x39fe1: 0x6d958620, 0x39fe2: 0x6d958820, 0x39fe3: 0x6d958a20, + 0x39fe4: 0x6d958c20, 0x39fe5: 0x6d958e20, 0x39fe6: 0x6d959020, 0x39fe7: 0x6d959220, + 0x39fe8: 0x6db8a020, 0x39fe9: 0x6db8a220, 0x39fea: 0x6db8a420, 0x39feb: 0x6db8a620, + 0x39fec: 0x6db8a820, 0x39fed: 0x6db8aa20, 0x39fee: 0x6db8ac20, 0x39fef: 0x6db8ae20, + 0x39ff0: 0x6dd71820, 0x39ff1: 0x6dd71a20, 0x39ff2: 0x6dd71c20, 0x39ff3: 0x6dc60820, + 0x39ff4: 0x6dcb1a20, 0x39ff5: 0x6defcc20, 0x39ff6: 0x6defce20, 0x39ff7: 0x6defd020, + 0x39ff8: 0x6defd220, 0x39ff9: 0x6defd420, 0x39ffa: 0x6e03f020, 0x39ffb: 0x6e03f220, + 0x39ffc: 0x6e03f420, 0x39ffd: 0x6e153820, 0x39ffe: 0x6e22d820, 0x39fff: 0x6e22da20, + // Block 0xe80, offset 0x3a000 + 0x3a000: 0x6e34f620, 0x3a001: 0x6e449020, 0x3a002: 0x6e456420, 0x3a003: 0x6c272220, + 0x3a004: 0x6c272420, 0x3a005: 0x6d116220, 0x3a006: 0x6d116420, 0x3a007: 0x6d116620, + 0x3a008: 0x6d6c6420, 0x3a009: 0x6d959420, 0x3a00a: 0x6defd820, 0x3a00b: 0x6e153a20, + 0x3a00c: 0x6e22dc20, 0x3a00d: 0x6c0a8220, 0x3a00e: 0x6c0a8420, 0x3a00f: 0x6c0a8620, + 0x3a010: 0x6c0a8820, 0x3a011: 0x6c151620, 0x3a012: 0x6c151820, 0x3a013: 0x6c151a20, + 0x3a014: 0x6c151c20, 0x3a015: 0x6c151e20, 0x3a016: 0x6c152020, 0x3a017: 0x6c152220, + 0x3a018: 0x6c152420, 0x3a019: 0x6c152620, 0x3a01a: 0x6c152820, 0x3a01b: 0x6c152a20, + 0x3a01c: 0x6c152c20, 0x3a01d: 0x6c152e20, 0x3a01e: 0x6c153020, 0x3a01f: 0x6c153220, + 0x3a020: 0x6c153420, 0x3a021: 0x6c153620, 0x3a022: 0x6c274620, 0x3a023: 0x6c274820, + 0x3a024: 0x6c274a20, 0x3a025: 0x6c274c20, 0x3a026: 0x6c274e20, 0x3a027: 0x6c275020, + 0x3a028: 0x6c275220, 0x3a029: 0x6c275420, 0x3a02a: 0x6c275620, 0x3a02b: 0x6c275820, + 0x3a02c: 0x6c275a20, 0x3a02d: 0x6c275c20, 0x3a02e: 0x6c275e20, 0x3a02f: 0x6c276020, + 0x3a030: 0x6c276220, 0x3a031: 0x6c276420, 0x3a032: 0x6c276620, 0x3a033: 0x6c276820, + 0x3a034: 0x6c276a20, 0x3a035: 0x6c276c20, 0x3a036: 0x6c276e20, 0x3a037: 0x6c277020, + 0x3a038: 0x6c277220, 0x3a039: 0x6c277420, 0x3a03a: 0x6c277620, 0x3a03b: 0x6c277820, + 0x3a03c: 0x6c277a20, 0x3a03d: 0x6c277c20, 0x3a03e: 0x6c277e20, 0x3a03f: 0x6c278020, + // Block 0xe81, offset 0x3a040 + 0x3a040: 0x6c278220, 0x3a041: 0x6c278420, 0x3a042: 0x6c413020, 0x3a043: 0x6c413220, + 0x3a044: 0x6c413420, 0x3a045: 0x6c413620, 0x3a046: 0x6c413820, 0x3a047: 0x6c413a20, + 0x3a048: 0x6c413c20, 0x3a049: 0x6c413e20, 0x3a04a: 0x6c414020, 0x3a04b: 0x6c414220, + 0x3a04c: 0x6c414420, 0x3a04d: 0x6c414620, 0x3a04e: 0x6c414820, 0x3a04f: 0x6c414a20, + 0x3a050: 0x6c414c20, 0x3a051: 0x6c414e20, 0x3a052: 0x6c415020, 0x3a053: 0x6c415220, + 0x3a054: 0x6c415420, 0x3a055: 0x6c415620, 0x3a056: 0x6c415820, 0x3a057: 0x6c415a20, + 0x3a058: 0x6c415c20, 0x3a059: 0x6c415e20, 0x3a05a: 0x6c416020, 0x3a05b: 0x6c416220, + 0x3a05c: 0x6c416420, 0x3a05d: 0x6c416620, 0x3a05e: 0x6c416820, 0x3a05f: 0x6c416a20, + 0x3a060: 0x6c416c20, 0x3a061: 0x6c416e20, 0x3a062: 0x6c417020, 0x3a063: 0x6c417220, + 0x3a064: 0x6c417420, 0x3a065: 0x6c619020, 0x3a066: 0x6c619220, 0x3a067: 0x6c619420, + 0x3a068: 0x6c619620, 0x3a069: 0x6c619820, 0x3a06a: 0x6c619a20, 0x3a06b: 0x6c619c20, + 0x3a06c: 0x6c619e20, 0x3a06d: 0x6c61a020, 0x3a06e: 0x6c61a220, 0x3a06f: 0x6c61a420, + 0x3a070: 0x6c61a620, 0x3a071: 0x6c61a820, 0x3a072: 0x6c61aa20, 0x3a073: 0x6c61ac20, + 0x3a074: 0x6c61ae20, 0x3a075: 0x6c61b020, 0x3a076: 0x6c61b220, 0x3a077: 0x6c61b420, + 0x3a078: 0x6c61b620, 0x3a079: 0x6c61b820, 0x3a07a: 0x6c61ba20, 0x3a07b: 0x6c61bc20, + 0x3a07c: 0x6c61be20, 0x3a07d: 0x6c61c020, 0x3a07e: 0x6c61c220, 0x3a07f: 0x6c61c420, + // Block 0xe82, offset 0x3a080 + 0x3a080: 0x6c61c620, 0x3a081: 0x6c61c820, 0x3a082: 0x6c61ca20, 0x3a083: 0x6c61cc20, + 0x3a084: 0x6c61ce20, 0x3a085: 0x6c881420, 0x3a086: 0x6c881620, 0x3a087: 0x6c881820, + 0x3a088: 0x6c881a20, 0x3a089: 0x6c881c20, 0x3a08a: 0x6c881e20, 0x3a08b: 0x6c882020, + 0x3a08c: 0x6c882220, 0x3a08d: 0x6c882420, 0x3a08e: 0x6c882620, 0x3a08f: 0x6c882820, + 0x3a090: 0x6c882a20, 0x3a091: 0x6c882c20, 0x3a092: 0x6c882e20, 0x3a093: 0x6c883020, + 0x3a094: 0x6c883220, 0x3a095: 0x6c883420, 0x3a096: 0x6c883620, 0x3a097: 0x6c883820, + 0x3a098: 0x6c883a20, 0x3a099: 0x6c883c20, 0x3a09a: 0x6c883e20, 0x3a09b: 0x6c884020, + 0x3a09c: 0x6c884220, 0x3a09d: 0x6c884420, 0x3a09e: 0x6c884620, 0x3a09f: 0x6c884820, + 0x3a0a0: 0x6c884a20, 0x3a0a1: 0x6c884c20, 0x3a0a2: 0x6c884e20, 0x3a0a3: 0x6c885020, + 0x3a0a4: 0x6c885220, 0x3a0a5: 0x6c885420, 0x3a0a6: 0x6c885620, 0x3a0a7: 0x6c885820, + 0x3a0a8: 0x6c885a20, 0x3a0a9: 0x6c885c20, 0x3a0aa: 0x6c885e20, 0x3a0ab: 0x6cb38820, + 0x3a0ac: 0x6cb38a20, 0x3a0ad: 0x6cb38c20, 0x3a0ae: 0x6cb38e20, 0x3a0af: 0x6cb39020, + 0x3a0b0: 0x6cb39220, 0x3a0b1: 0x6cb39420, 0x3a0b2: 0x6cb39620, 0x3a0b3: 0x6cb39820, + 0x3a0b4: 0x6cb39a20, 0x3a0b5: 0x6cb39c20, 0x3a0b6: 0x6cb39e20, 0x3a0b7: 0x6cb3a020, + 0x3a0b8: 0x6cb3a220, 0x3a0b9: 0x6cb3a420, 0x3a0ba: 0x6cb3a620, 0x3a0bb: 0x6cb3a820, + 0x3a0bc: 0x6cb3aa20, 0x3a0bd: 0x6cb3ac20, 0x3a0be: 0x6cb3ae20, 0x3a0bf: 0x6cb3b020, + // Block 0xe83, offset 0x3a0c0 + 0x3a0c0: 0x6cb3b220, 0x3a0c1: 0x6cb3b420, 0x3a0c2: 0x6cb3b620, 0x3a0c3: 0x6cb3b820, + 0x3a0c4: 0x6cb3ba20, 0x3a0c5: 0x6cb3bc20, 0x3a0c6: 0x6cb3be20, 0x3a0c7: 0x6cb3c020, + 0x3a0c8: 0x6cb3c220, 0x3a0c9: 0x6cb3c420, 0x3a0ca: 0x6cb3c620, 0x3a0cb: 0x6cb3c820, + 0x3a0cc: 0x6cb3ca20, 0x3a0cd: 0x6cb3cc20, 0x3a0ce: 0x6ce32c20, 0x3a0cf: 0x6cb3ce20, + 0x3a0d0: 0x6cb3d020, 0x3a0d1: 0x6cb3d220, 0x3a0d2: 0x6cb3d420, 0x3a0d3: 0x6cb3d620, + 0x3a0d4: 0x6cb3d820, 0x3a0d5: 0x6cb3da20, 0x3a0d6: 0x6cb3dc20, 0x3a0d7: 0x6cb3de20, + 0x3a0d8: 0x6cb3e020, 0x3a0d9: 0x6cb3e220, 0x3a0da: 0x6cb3e420, 0x3a0db: 0x6cb3e620, + 0x3a0dc: 0x6cb3e820, 0x3a0dd: 0x6ce32e20, 0x3a0de: 0x6ce33020, 0x3a0df: 0x6ce33220, + 0x3a0e0: 0x6cb3ea20, 0x3a0e1: 0x6ce33420, 0x3a0e2: 0x6ce33620, 0x3a0e3: 0x6ce33820, + 0x3a0e4: 0x6ce33a20, 0x3a0e5: 0x6ce33c20, 0x3a0e6: 0x6ce33e20, 0x3a0e7: 0x6ce34020, + 0x3a0e8: 0x6ce34220, 0x3a0e9: 0x6ce34420, 0x3a0ea: 0x6ce34620, 0x3a0eb: 0x6ce34820, + 0x3a0ec: 0x6ce34a20, 0x3a0ed: 0x6ce34c20, 0x3a0ee: 0x6ce34e20, 0x3a0ef: 0x6ce35020, + 0x3a0f0: 0x6ce35220, 0x3a0f1: 0x6ce35420, 0x3a0f2: 0x6ce35620, 0x3a0f3: 0x6ce35820, + 0x3a0f4: 0x6ce35a20, 0x3a0f5: 0x6ce35c20, 0x3a0f6: 0x6ce35e20, 0x3a0f7: 0x6ce36020, + 0x3a0f8: 0x6ce36220, 0x3a0f9: 0x6ce36420, 0x3a0fa: 0x6ce36620, 0x3a0fb: 0x6ce36820, + 0x3a0fc: 0x6ce36a20, 0x3a0fd: 0x6ce36c20, 0x3a0fe: 0x6ce36e20, 0x3a0ff: 0x6ce37020, + // Block 0xe84, offset 0x3a100 + 0x3a100: 0x6ce37220, 0x3a101: 0x6ce37420, 0x3a102: 0x6ce37620, 0x3a103: 0x6ce37820, + 0x3a104: 0x6ce37a20, 0x3a105: 0x6ce37c20, 0x3a106: 0x6ce37e20, 0x3a107: 0x6ce38020, + 0x3a108: 0x6ce38220, 0x3a109: 0x6ce38420, 0x3a10a: 0x6ce38620, 0x3a10b: 0x6ce38820, + 0x3a10c: 0x6ce38a20, 0x3a10d: 0x6ce38c20, 0x3a10e: 0x6ce38e20, 0x3a10f: 0x6ce39020, + 0x3a110: 0x6ce39220, 0x3a111: 0x6ce39420, 0x3a112: 0x6ce39620, 0x3a113: 0x6ce39820, + 0x3a114: 0x6ce39a20, 0x3a115: 0x6ce39c20, 0x3a116: 0x6ce39e20, 0x3a117: 0x6ce3a020, + 0x3a118: 0x6ce3a220, 0x3a119: 0x6ce3a420, 0x3a11a: 0x6ce3a620, 0x3a11b: 0x6ce3a820, + 0x3a11c: 0x6ce3aa20, 0x3a11d: 0x6d11a220, 0x3a11e: 0x6d11a420, 0x3a11f: 0x6d11a620, + 0x3a120: 0x6d11a820, 0x3a121: 0x6d11aa20, 0x3a122: 0x6d11ac20, 0x3a123: 0x6d11ae20, + 0x3a124: 0x6d11b020, 0x3a125: 0x6d11b220, 0x3a126: 0x6d11b420, 0x3a127: 0x6d11b620, + 0x3a128: 0x6d11b820, 0x3a129: 0x6d11ba20, 0x3a12a: 0x6d11bc20, 0x3a12b: 0x6d11be20, + 0x3a12c: 0x6d11c020, 0x3a12d: 0x6d11c220, 0x3a12e: 0x6d11c420, 0x3a12f: 0x6d11c620, + 0x3a130: 0x6d11c820, 0x3a131: 0x6d11ca20, 0x3a132: 0x6d11cc20, 0x3a133: 0x6d11ce20, + 0x3a134: 0x6d11d020, 0x3a135: 0x6d11d220, 0x3a136: 0x6d11d420, 0x3a137: 0x6d11d620, + 0x3a138: 0x6d11d820, 0x3a139: 0x6d11da20, 0x3a13a: 0x6d11dc20, 0x3a13b: 0x6d11de20, + 0x3a13c: 0x6d11e020, 0x3a13d: 0x6d11e220, 0x3a13e: 0x6d11e420, 0x3a13f: 0x6d11e620, + // Block 0xe85, offset 0x3a140 + 0x3a140: 0x6d11e820, 0x3a141: 0x6d11ea20, 0x3a142: 0x6d11ec20, 0x3a143: 0x6d11ee20, + 0x3a144: 0x6d11f020, 0x3a145: 0x6d11f220, 0x3a146: 0x6d3f9c20, 0x3a147: 0x6d3f9e20, + 0x3a148: 0x6d3fa020, 0x3a149: 0x6d3fa220, 0x3a14a: 0x6d3fa420, 0x3a14b: 0x6d3fa620, + 0x3a14c: 0x6d3fa820, 0x3a14d: 0x6d3faa20, 0x3a14e: 0x6d3fac20, 0x3a14f: 0x6d3fae20, + 0x3a150: 0x6d3fb020, 0x3a151: 0x6d3fb220, 0x3a152: 0x6d3fb420, 0x3a153: 0x6d3fb620, + 0x3a154: 0x6d3fb820, 0x3a155: 0x6d3fba20, 0x3a156: 0x6d3fbc20, 0x3a157: 0x6d3fbe20, + 0x3a158: 0x6d3fc020, 0x3a159: 0x6d3fc220, 0x3a15a: 0x6d3fc420, 0x3a15b: 0x6d3fc620, + 0x3a15c: 0x6d3fc820, 0x3a15d: 0x6d3fca20, 0x3a15e: 0x6d3fcc20, 0x3a15f: 0x6d3fce20, + 0x3a160: 0x6d3fd020, 0x3a161: 0x6d3fd220, 0x3a162: 0x6d3fd420, 0x3a163: 0x6d3fd620, + 0x3a164: 0x6d3fd820, 0x3a165: 0x6d3fda20, 0x3a166: 0x6d3fdc20, 0x3a167: 0x6d3fde20, + 0x3a168: 0x6d3fe020, 0x3a169: 0x6d3fe220, 0x3a16a: 0x6d3fe420, 0x3a16b: 0x6d3fe620, + 0x3a16c: 0x6d3fe820, 0x3a16d: 0x6d3fea20, 0x3a16e: 0x6d3fec20, 0x3a16f: 0x6d3fee20, + 0x3a170: 0x6d3ff020, 0x3a171: 0x6d3ff220, 0x3a172: 0x6d3ff420, 0x3a173: 0x6d3ff620, + 0x3a174: 0x6d6c8a20, 0x3a175: 0x6d6c8c20, 0x3a176: 0x6d6c8e20, 0x3a177: 0x6d6c9020, + 0x3a178: 0x6d6c9220, 0x3a179: 0x6d6c9420, 0x3a17a: 0x6d6c9620, 0x3a17b: 0x6d6c9820, + 0x3a17c: 0x6d6c9a20, 0x3a17d: 0x6d6c9c20, 0x3a17e: 0x6d6c9e20, 0x3a17f: 0x6d6ca020, + // Block 0xe86, offset 0x3a180 + 0x3a180: 0x6d6ca220, 0x3a181: 0x6d6ca420, 0x3a182: 0x6d6ca620, 0x3a183: 0x6d6ca820, + 0x3a184: 0x6d6caa20, 0x3a185: 0x6d6cac20, 0x3a186: 0x6d6cae20, 0x3a187: 0x6d6cb020, + 0x3a188: 0x6d6cb220, 0x3a189: 0x6d6cb420, 0x3a18a: 0x6d6cb620, 0x3a18b: 0x6d6cb820, + 0x3a18c: 0x6d6cba20, 0x3a18d: 0x6d6cbc20, 0x3a18e: 0x6d6cbe20, 0x3a18f: 0x6d6cc020, + 0x3a190: 0x6d6cc220, 0x3a191: 0x6d6cc420, 0x3a192: 0x6d6cc620, 0x3a193: 0x6d784820, + 0x3a194: 0x6d6cc820, 0x3a195: 0x6d6cca20, 0x3a196: 0x6d6ccc20, 0x3a197: 0x6d6cce20, + 0x3a198: 0x6d6cd020, 0x3a199: 0x6d6cd220, 0x3a19a: 0x6d6cd420, 0x3a19b: 0x6d6cd620, + 0x3a19c: 0x6d6cd820, 0x3a19d: 0x6d6cda20, 0x3a19e: 0x6d6cdc20, 0x3a19f: 0x6d6cde20, + 0x3a1a0: 0x6d6ce020, 0x3a1a1: 0x6d6ce220, 0x3a1a2: 0x6d6ce420, 0x3a1a3: 0x6d6ce620, + 0x3a1a4: 0x6d6ce820, 0x3a1a5: 0x6d95b220, 0x3a1a6: 0x6d95b420, 0x3a1a7: 0x6d95b620, + 0x3a1a8: 0x6d95b820, 0x3a1a9: 0x6d95ba20, 0x3a1aa: 0x6d95bc20, 0x3a1ab: 0x6d95be20, + 0x3a1ac: 0x6d95c020, 0x3a1ad: 0x6d95c220, 0x3a1ae: 0x6d95c420, 0x3a1af: 0x6d95c620, + 0x3a1b0: 0x6d95c820, 0x3a1b1: 0x6d95ca20, 0x3a1b2: 0x6d95cc20, 0x3a1b3: 0x6d95ce20, + 0x3a1b4: 0x6d95d020, 0x3a1b5: 0x6d95d220, 0x3a1b6: 0x6d95d420, 0x3a1b7: 0x6d95d620, + 0x3a1b8: 0x6d95d820, 0x3a1b9: 0x6d95da20, 0x3a1ba: 0x6d95dc20, 0x3a1bb: 0x6d95de20, + 0x3a1bc: 0x6d95e020, 0x3a1bd: 0x6d95e220, 0x3a1be: 0x6d95e420, 0x3a1bf: 0x6d95e620, + // Block 0xe87, offset 0x3a1c0 + 0x3a1c0: 0x6d95e820, 0x3a1c1: 0x6d95ea20, 0x3a1c2: 0x6d95ec20, 0x3a1c3: 0x6d95ee20, + 0x3a1c4: 0x6d95f020, 0x3a1c5: 0x6d95f220, 0x3a1c6: 0x6d95f420, 0x3a1c7: 0x6db8c620, + 0x3a1c8: 0x6db8c820, 0x3a1c9: 0x6db8ca20, 0x3a1ca: 0x6db8cc20, 0x3a1cb: 0x6db8ce20, + 0x3a1cc: 0x6db8d020, 0x3a1cd: 0x6db8d220, 0x3a1ce: 0x6db8d420, 0x3a1cf: 0x6db8d620, + 0x3a1d0: 0x6db8d820, 0x3a1d1: 0x6db8da20, 0x3a1d2: 0x6db8dc20, 0x3a1d3: 0x6db8de20, + 0x3a1d4: 0x6db8e020, 0x3a1d5: 0x6db8e220, 0x3a1d6: 0x6db8e420, 0x3a1d7: 0x6db8e620, + 0x3a1d8: 0x6db8e820, 0x3a1d9: 0x6db8ea20, 0x3a1da: 0x6db8ec20, 0x3a1db: 0x6db8ee20, + 0x3a1dc: 0x6db8f020, 0x3a1dd: 0x6db8f220, 0x3a1de: 0x6db8f420, 0x3a1df: 0x6db8f620, + 0x3a1e0: 0x6db8f820, 0x3a1e1: 0x6dd72620, 0x3a1e2: 0x6dd72820, 0x3a1e3: 0x6dd72a20, + 0x3a1e4: 0x6dd72c20, 0x3a1e5: 0x6dd72e20, 0x3a1e6: 0x6dd73020, 0x3a1e7: 0x6dd73220, + 0x3a1e8: 0x6dd73420, 0x3a1e9: 0x6dd73620, 0x3a1ea: 0x6dd73820, 0x3a1eb: 0x6dd73a20, + 0x3a1ec: 0x6dd73c20, 0x3a1ed: 0x6dd73e20, 0x3a1ee: 0x6dd74020, 0x3a1ef: 0x6dd74220, + 0x3a1f0: 0x6dd74420, 0x3a1f1: 0x6dd74620, 0x3a1f2: 0x6dd74820, 0x3a1f3: 0x6dd74a20, + 0x3a1f4: 0x6dd74c20, 0x3a1f5: 0x6dd74e20, 0x3a1f6: 0x6dd75020, 0x3a1f7: 0x6defe220, + 0x3a1f8: 0x6defe420, 0x3a1f9: 0x6defe620, 0x3a1fa: 0x6defe820, 0x3a1fb: 0x6defea20, + 0x3a1fc: 0x6e03e620, 0x3a1fd: 0x6defec20, 0x3a1fe: 0x6defee20, 0x3a1ff: 0x6deff020, + // Block 0xe88, offset 0x3a200 + 0x3a200: 0x6deff220, 0x3a201: 0x6deff420, 0x3a202: 0x6e03fe20, 0x3a203: 0x6e040020, + 0x3a204: 0x6e040220, 0x3a205: 0x6e040420, 0x3a206: 0x6e040620, 0x3a207: 0x6e040820, + 0x3a208: 0x6e040a20, 0x3a209: 0x6e040c20, 0x3a20a: 0x6e040e20, 0x3a20b: 0x6e041020, + 0x3a20c: 0x6e041220, 0x3a20d: 0x6e041420, 0x3a20e: 0x6e041620, 0x3a20f: 0x6e041820, + 0x3a210: 0x6e041a20, 0x3a211: 0x6e041c20, 0x3a212: 0x6e153e20, 0x3a213: 0x6e154020, + 0x3a214: 0x6e154220, 0x3a215: 0x6e154420, 0x3a216: 0x6e154620, 0x3a217: 0x6e154820, + 0x3a218: 0x6e154a20, 0x3a219: 0x6e22de20, 0x3a21a: 0x6e22e020, 0x3a21b: 0x6e22e220, + 0x3a21c: 0x6e22e420, 0x3a21d: 0x6e22e620, 0x3a21e: 0x6e22e820, 0x3a21f: 0x6e2d0c20, + 0x3a220: 0x6e2d0e20, 0x3a221: 0x6e2d1020, 0x3a222: 0x6e2d1220, 0x3a223: 0x6e2d1420, + 0x3a224: 0x6e34fa20, 0x3a225: 0x6e34fc20, 0x3a226: 0x6e3aa820, 0x3a227: 0x6e3e6a20, + 0x3a228: 0x6c00ca20, 0x3a229: 0x6c052220, 0x3a22a: 0x6c052420, 0x3a22b: 0x6c0a9220, + 0x3a22c: 0x6c0a9420, 0x3a22d: 0x6c0a9620, 0x3a22e: 0x6c0a9820, 0x3a22f: 0x6c0a9a20, + 0x3a230: 0x6c0a9c20, 0x3a231: 0x6c0a9e20, 0x3a232: 0x6c0aa020, 0x3a233: 0x6c0aa220, + 0x3a234: 0x6c0aa420, 0x3a235: 0x6c0aa620, 0x3a236: 0x6c154e20, 0x3a237: 0x6c155020, + 0x3a238: 0x6c155220, 0x3a239: 0x6c155420, 0x3a23a: 0x6c155620, 0x3a23b: 0x6c155820, + 0x3a23c: 0x6c155a20, 0x3a23d: 0x6c155c20, 0x3a23e: 0x6c155e20, 0x3a23f: 0x6c156020, + // Block 0xe89, offset 0x3a240 + 0x3a240: 0x6c156220, 0x3a241: 0x6c156420, 0x3a242: 0x6c156620, 0x3a243: 0x6c156820, + 0x3a244: 0x6c156a20, 0x3a245: 0x6c156c20, 0x3a246: 0x6c156e20, 0x3a247: 0x6c157020, + 0x3a248: 0x6c157220, 0x3a249: 0x6c157420, 0x3a24a: 0x6c157620, 0x3a24b: 0x6c157820, + 0x3a24c: 0x6c157a20, 0x3a24d: 0x6c157c20, 0x3a24e: 0x6c157e20, 0x3a24f: 0x6c158020, + 0x3a250: 0x6c158220, 0x3a251: 0x6c158420, 0x3a252: 0x6c158620, 0x3a253: 0x6c27ae20, + 0x3a254: 0x6c27b020, 0x3a255: 0x6c27b220, 0x3a256: 0x6c27b420, 0x3a257: 0x6c27b620, + 0x3a258: 0x6c27b820, 0x3a259: 0x6c27ba20, 0x3a25a: 0x6c27bc20, 0x3a25b: 0x6c27be20, + 0x3a25c: 0x6c27c020, 0x3a25d: 0x6c27c220, 0x3a25e: 0x6c27c420, 0x3a25f: 0x6c27c620, + 0x3a260: 0x6c27c820, 0x3a261: 0x6c27ca20, 0x3a262: 0x6c27cc20, 0x3a263: 0x6c27ce20, + 0x3a264: 0x6c27d020, 0x3a265: 0x6c27d220, 0x3a266: 0x6c27d420, 0x3a267: 0x6c27d620, + 0x3a268: 0x6c27d820, 0x3a269: 0x6c27da20, 0x3a26a: 0x6c27dc20, 0x3a26b: 0x6c27de20, + 0x3a26c: 0x6c27e020, 0x3a26d: 0x6c27e220, 0x3a26e: 0x6c27e420, 0x3a26f: 0x6c41a020, + 0x3a270: 0x6c41a220, 0x3a271: 0x6c41a420, 0x3a272: 0x6c41a620, 0x3a273: 0x6c41a820, + 0x3a274: 0x6c41aa20, 0x3a275: 0x6c41ac20, 0x3a276: 0x6c41ae20, 0x3a277: 0x6c41b020, + 0x3a278: 0x6c41b220, 0x3a279: 0x6c41b420, 0x3a27a: 0x6c41b620, 0x3a27b: 0x6c41b820, + 0x3a27c: 0x6c41ba20, 0x3a27d: 0x6c41bc20, 0x3a27e: 0x6c41be20, 0x3a27f: 0x6c41c020, + // Block 0xe8a, offset 0x3a280 + 0x3a280: 0x6c41c220, 0x3a281: 0x6c41c420, 0x3a282: 0x6c41c620, 0x3a283: 0x6c41c820, + 0x3a284: 0x6c41ca20, 0x3a285: 0x6c41cc20, 0x3a286: 0x6c41ce20, 0x3a287: 0x6c41d020, + 0x3a288: 0x6c41d220, 0x3a289: 0x6c41d420, 0x3a28a: 0x6c41d620, 0x3a28b: 0x6c620e20, + 0x3a28c: 0x6c621020, 0x3a28d: 0x6c621220, 0x3a28e: 0x6c621420, 0x3a28f: 0x6c621620, + 0x3a290: 0x6c621820, 0x3a291: 0x6c621a20, 0x3a292: 0x6c621c20, 0x3a293: 0x6c621e20, + 0x3a294: 0x6c622020, 0x3a295: 0x6c622220, 0x3a296: 0x6c622420, 0x3a297: 0x6c622620, + 0x3a298: 0x6c622820, 0x3a299: 0x6c622a20, 0x3a29a: 0x6c622c20, 0x3a29b: 0x6c622e20, + 0x3a29c: 0x6c623020, 0x3a29d: 0x6c623220, 0x3a29e: 0x6c623420, 0x3a29f: 0x6c623620, + 0x3a2a0: 0x6c623820, 0x3a2a1: 0x6c623a20, 0x3a2a2: 0x6c623c20, 0x3a2a3: 0x6c623e20, + 0x3a2a4: 0x6c624020, 0x3a2a5: 0x6c624220, 0x3a2a6: 0x6c624420, 0x3a2a7: 0x6c624620, + 0x3a2a8: 0x6c624820, 0x3a2a9: 0x6c624a20, 0x3a2aa: 0x6c624c20, 0x3a2ab: 0x6c889a20, + 0x3a2ac: 0x6c889c20, 0x3a2ad: 0x6c889e20, 0x3a2ae: 0x6c88a020, 0x3a2af: 0x6c88a220, + 0x3a2b0: 0x6c88a420, 0x3a2b1: 0x6c88a620, 0x3a2b2: 0x6c88a820, 0x3a2b3: 0x6c88aa20, + 0x3a2b4: 0x6c88ac20, 0x3a2b5: 0x6c88ae20, 0x3a2b6: 0x6c88b020, 0x3a2b7: 0x6c88b220, + 0x3a2b8: 0x6c88b420, 0x3a2b9: 0x6c88b620, 0x3a2ba: 0x6c88b820, 0x3a2bb: 0x6c88ba20, + 0x3a2bc: 0x6c88bc20, 0x3a2bd: 0x6c88be20, 0x3a2be: 0x6c88c020, 0x3a2bf: 0x6c88c220, + // Block 0xe8b, offset 0x3a2c0 + 0x3a2c0: 0x6c88c420, 0x3a2c1: 0x6c88c620, 0x3a2c2: 0x6c88c820, 0x3a2c3: 0x6c88ca20, + 0x3a2c4: 0x6c88cc20, 0x3a2c5: 0x6c88ce20, 0x3a2c6: 0x6c88d020, 0x3a2c7: 0x6c88d220, + 0x3a2c8: 0x6c88d420, 0x3a2c9: 0x6c88d620, 0x3a2ca: 0x6c88d820, 0x3a2cb: 0x6c88da20, + 0x3a2cc: 0x6c88dc20, 0x3a2cd: 0x6c88de20, 0x3a2ce: 0x6c88e020, 0x3a2cf: 0x6cb42a20, + 0x3a2d0: 0x6cb42c20, 0x3a2d1: 0x6cb42e20, 0x3a2d2: 0x6cb43020, 0x3a2d3: 0x6cb43220, + 0x3a2d4: 0x6cb43420, 0x3a2d5: 0x6cb43620, 0x3a2d6: 0x6cb43820, 0x3a2d7: 0x6ce3e620, + 0x3a2d8: 0x6cb43a20, 0x3a2d9: 0x6cb43c20, 0x3a2da: 0x6cb43e20, 0x3a2db: 0x6cb44020, + 0x3a2dc: 0x6cb44220, 0x3a2dd: 0x6cb44420, 0x3a2de: 0x6cb44620, 0x3a2df: 0x6cb44820, + 0x3a2e0: 0x6cb44a20, 0x3a2e1: 0x6cb44c20, 0x3a2e2: 0x6cb44e20, 0x3a2e3: 0x6cb45020, + 0x3a2e4: 0x6cb45220, 0x3a2e5: 0x6cb45420, 0x3a2e6: 0x6cb45620, 0x3a2e7: 0x6cb45820, + 0x3a2e8: 0x6cb45a20, 0x3a2e9: 0x6cb45c20, 0x3a2ea: 0x6cb45e20, 0x3a2eb: 0x6cb46020, + 0x3a2ec: 0x6cb46220, 0x3a2ed: 0x6cb46420, 0x3a2ee: 0x6cb46620, 0x3a2ef: 0x6cb46820, + 0x3a2f0: 0x6cb46a20, 0x3a2f1: 0x6cb46c20, 0x3a2f2: 0x6ce3e820, 0x3a2f3: 0x6ce3ea20, + 0x3a2f4: 0x6ce3ec20, 0x3a2f5: 0x6ce3ee20, 0x3a2f6: 0x6ce3f020, 0x3a2f7: 0x6ce3f220, + 0x3a2f8: 0x6ce3f420, 0x3a2f9: 0x6ce3f620, 0x3a2fa: 0x6ce3f820, 0x3a2fb: 0x6ce3fa20, + 0x3a2fc: 0x6ce3fc20, 0x3a2fd: 0x6ce3fe20, 0x3a2fe: 0x6ce40020, 0x3a2ff: 0x6ce40220, + // Block 0xe8c, offset 0x3a300 + 0x3a300: 0x6ce40420, 0x3a301: 0x6ce40620, 0x3a302: 0x6ce40820, 0x3a303: 0x6ce40a20, + 0x3a304: 0x6ce40c20, 0x3a305: 0x6ce40e20, 0x3a306: 0x6ce41020, 0x3a307: 0x6ce41220, + 0x3a308: 0x6ce41420, 0x3a309: 0x6ce41620, 0x3a30a: 0x6ce41820, 0x3a30b: 0x6d122220, + 0x3a30c: 0x6d122420, 0x3a30d: 0x6d122620, 0x3a30e: 0x6d122820, 0x3a30f: 0x6d122a20, + 0x3a310: 0x6d122c20, 0x3a311: 0x6d122e20, 0x3a312: 0x6d123020, 0x3a313: 0x6d123220, + 0x3a314: 0x6d123420, 0x3a315: 0x6d123620, 0x3a316: 0x6d123820, 0x3a317: 0x6d123a20, + 0x3a318: 0x6d123c20, 0x3a319: 0x6d123e20, 0x3a31a: 0x6d124020, 0x3a31b: 0x6d124220, + 0x3a31c: 0x6d124420, 0x3a31d: 0x6d124620, 0x3a31e: 0x6d124820, 0x3a31f: 0x6d124a20, + 0x3a320: 0x6d124c20, 0x3a321: 0x6d124e20, 0x3a322: 0x6d125020, 0x3a323: 0x6d125220, + 0x3a324: 0x6d125420, 0x3a325: 0x6d125620, 0x3a326: 0x6d125820, 0x3a327: 0x6d125a20, + 0x3a328: 0x6d125c20, 0x3a329: 0x6d125e20, 0x3a32a: 0x6d126020, 0x3a32b: 0x6d403020, + 0x3a32c: 0x6d403220, 0x3a32d: 0x6d403420, 0x3a32e: 0x6d403620, 0x3a32f: 0x6d403820, + 0x3a330: 0x6d403a20, 0x3a331: 0x6d403c20, 0x3a332: 0x6d403e20, 0x3a333: 0x6d404020, + 0x3a334: 0x6d404220, 0x3a335: 0x6d404420, 0x3a336: 0x6d404620, 0x3a337: 0x6d404820, + 0x3a338: 0x6d404a20, 0x3a339: 0x6d126220, 0x3a33a: 0x6d404c20, 0x3a33b: 0x6d404e20, + 0x3a33c: 0x6d405020, 0x3a33d: 0x6d405220, 0x3a33e: 0x6d405420, 0x3a33f: 0x6d405620, + // Block 0xe8d, offset 0x3a340 + 0x3a340: 0x6d405820, 0x3a341: 0x6d405a20, 0x3a342: 0x6d405c20, 0x3a343: 0x6d405e20, + 0x3a344: 0x6d406020, 0x3a345: 0x6d406220, 0x3a346: 0x6d406420, 0x3a347: 0x6d406620, + 0x3a348: 0x6d406820, 0x3a349: 0x6d406a20, 0x3a34a: 0x6d406c20, 0x3a34b: 0x6d406e20, + 0x3a34c: 0x6d407020, 0x3a34d: 0x6d407220, 0x3a34e: 0x6d407420, 0x3a34f: 0x6d407620, + 0x3a350: 0x6d407820, 0x3a351: 0x6d6d1820, 0x3a352: 0x6d6d1a20, 0x3a353: 0x6d6d1c20, + 0x3a354: 0x6d6d1e20, 0x3a355: 0x6d6d2020, 0x3a356: 0x6d6d2220, 0x3a357: 0x6d6d2420, + 0x3a358: 0x6d6d2620, 0x3a359: 0x6d6d2820, 0x3a35a: 0x6d6d2a20, 0x3a35b: 0x6d6d2c20, + 0x3a35c: 0x6d6d2e20, 0x3a35d: 0x6d6d3020, 0x3a35e: 0x6d6d3220, 0x3a35f: 0x6d6d3420, + 0x3a360: 0x6d6d3620, 0x3a361: 0x6d6d3820, 0x3a362: 0x6d6d3a20, 0x3a363: 0x6d6d3c20, + 0x3a364: 0x6d6d3e20, 0x3a365: 0x6d6d4020, 0x3a366: 0x6d6d4220, 0x3a367: 0x6d960820, + 0x3a368: 0x6d960a20, 0x3a369: 0x6d960c20, 0x3a36a: 0x6d960e20, 0x3a36b: 0x6d961020, + 0x3a36c: 0x6d961220, 0x3a36d: 0x6d961420, 0x3a36e: 0x6d961620, 0x3a36f: 0x6d961820, + 0x3a370: 0x6d961a20, 0x3a371: 0x6d961c20, 0x3a372: 0x6d961e20, 0x3a373: 0x6d962020, + 0x3a374: 0x6d962220, 0x3a375: 0x6d962420, 0x3a376: 0x6d962620, 0x3a377: 0x6d962820, + 0x3a378: 0x6d962a20, 0x3a379: 0x6d962c20, 0x3a37a: 0x6db90c20, 0x3a37b: 0x6db90e20, + 0x3a37c: 0x6db91020, 0x3a37d: 0x6db91220, 0x3a37e: 0x6db91420, 0x3a37f: 0x6db91620, + // Block 0xe8e, offset 0x3a380 + 0x3a380: 0x6db91820, 0x3a381: 0x6db91a20, 0x3a382: 0x6db91c20, 0x3a383: 0x6db91e20, + 0x3a384: 0x6db92020, 0x3a385: 0x6db92220, 0x3a386: 0x6db92420, 0x3a387: 0x6db92620, + 0x3a388: 0x6db92820, 0x3a389: 0x6db92a20, 0x3a38a: 0x6db92c20, 0x3a38b: 0x6db92e20, + 0x3a38c: 0x6db93020, 0x3a38d: 0x6dd76220, 0x3a38e: 0x6dd76420, 0x3a38f: 0x6dd76620, + 0x3a390: 0x6dd76820, 0x3a391: 0x6dd76a20, 0x3a392: 0x6dd76c20, 0x3a393: 0x6dd76e20, + 0x3a394: 0x6dd77020, 0x3a395: 0x6dd77220, 0x3a396: 0x6dd77420, 0x3a397: 0x6dd77620, + 0x3a398: 0x6dd77820, 0x3a399: 0x6deffc20, 0x3a39a: 0x6deffe20, 0x3a39b: 0x6df00020, + 0x3a39c: 0x6df00220, 0x3a39d: 0x6df00420, 0x3a39e: 0x6df00620, 0x3a39f: 0x6df00820, + 0x3a3a0: 0x6e042a20, 0x3a3a1: 0x6e042c20, 0x3a3a2: 0x6e042e20, 0x3a3a3: 0x6e043020, + 0x3a3a4: 0x6e155420, 0x3a3a5: 0x6e155620, 0x3a3a6: 0x6e155820, 0x3a3a7: 0x6e155a20, + 0x3a3a8: 0x6e22ee20, 0x3a3a9: 0x6e2d1a20, 0x3a3aa: 0x6e2d1c20, 0x3a3ab: 0x6e2d1e20, + 0x3a3ac: 0x6e2d2020, 0x3a3ad: 0x6e2d2220, 0x3a3ae: 0x6e2d2420, 0x3a3af: 0x6e3e6c20, + 0x3a3b0: 0x6c88fc20, 0x3a3b1: 0x6c88fe20, 0x3a3b2: 0x6c890020, 0x3a3b3: 0x6c890220, + 0x3a3b4: 0x6cb49620, 0x3a3b5: 0x6cb49820, 0x3a3b6: 0x6cb49a20, 0x3a3b7: 0x6cb49c20, + 0x3a3b8: 0x6cb49e20, 0x3a3b9: 0x6cb4a020, 0x3a3ba: 0x6cb4a220, 0x3a3bb: 0x6cb4a420, + 0x3a3bc: 0x6cb4a620, 0x3a3bd: 0x6cb4a820, 0x3a3be: 0x6cb4aa20, 0x3a3bf: 0x6cb4ac20, + // Block 0xe8f, offset 0x3a3c0 + 0x3a3c0: 0x6cb4ae20, 0x3a3c1: 0x6cb4b020, 0x3a3c2: 0x6cb4b220, 0x3a3c3: 0x6cb4b420, + 0x3a3c4: 0x6cb4b620, 0x3a3c5: 0x6cb4b820, 0x3a3c6: 0x6cb4ba20, 0x3a3c7: 0x6cb4bc20, + 0x3a3c8: 0x6cb4be20, 0x3a3c9: 0x6cb4c020, 0x3a3ca: 0x6cb4c220, 0x3a3cb: 0x6ce43820, + 0x3a3cc: 0x6ce43a20, 0x3a3cd: 0x6ce43c20, 0x3a3ce: 0x6ce43e20, 0x3a3cf: 0x6ce44020, + 0x3a3d0: 0x6ce44220, 0x3a3d1: 0x6ce44420, 0x3a3d2: 0x6ce44620, 0x3a3d3: 0x6ce44820, + 0x3a3d4: 0x6ce44a20, 0x3a3d5: 0x6ce44c20, 0x3a3d6: 0x6ce44e20, 0x3a3d7: 0x6ce45020, + 0x3a3d8: 0x6ce45220, 0x3a3d9: 0x6ce45420, 0x3a3da: 0x6ce45620, 0x3a3db: 0x6ce45820, + 0x3a3dc: 0x6ce45a20, 0x3a3dd: 0x6ce45c20, 0x3a3de: 0x6ce45e20, 0x3a3df: 0x6ce46020, + 0x3a3e0: 0x6ce46220, 0x3a3e1: 0x6ce46420, 0x3a3e2: 0x6ce46620, 0x3a3e3: 0x6ce46820, + 0x3a3e4: 0x6d129020, 0x3a3e5: 0x6d129220, 0x3a3e6: 0x6d129420, 0x3a3e7: 0x6d129620, + 0x3a3e8: 0x6d129820, 0x3a3e9: 0x6d129a20, 0x3a3ea: 0x6d129c20, 0x3a3eb: 0x6d129e20, + 0x3a3ec: 0x6d12a020, 0x3a3ed: 0x6d12a220, 0x3a3ee: 0x6d12a420, 0x3a3ef: 0x6d12a620, + 0x3a3f0: 0x6d12a820, 0x3a3f1: 0x6d12aa20, 0x3a3f2: 0x6d12ac20, 0x3a3f3: 0x6d12ae20, + 0x3a3f4: 0x6d12b020, 0x3a3f5: 0x6d12b220, 0x3a3f6: 0x6d12b420, 0x3a3f7: 0x6d409a20, + 0x3a3f8: 0x6d409c20, 0x3a3f9: 0x6d409e20, 0x3a3fa: 0x6d40a020, 0x3a3fb: 0x6d40a220, + 0x3a3fc: 0x6d40a420, 0x3a3fd: 0x6d40a620, 0x3a3fe: 0x6d40a820, 0x3a3ff: 0x6d40aa20, + // Block 0xe90, offset 0x3a400 + 0x3a400: 0x6d40ac20, 0x3a401: 0x6d40ae20, 0x3a402: 0x6d40b020, 0x3a403: 0x6d40b220, + 0x3a404: 0x6d40b420, 0x3a405: 0x6d40b620, 0x3a406: 0x6d40b820, 0x3a407: 0x6d40ba20, + 0x3a408: 0x6d40bc20, 0x3a409: 0x6d40be20, 0x3a40a: 0x6d40c020, 0x3a40b: 0x6d40c220, + 0x3a40c: 0x6d6d6a20, 0x3a40d: 0x6d6d6c20, 0x3a40e: 0x6d6d6e20, 0x3a40f: 0x6d6d7020, + 0x3a410: 0x6d6d7220, 0x3a411: 0x6d6d7420, 0x3a412: 0x6d6d7620, 0x3a413: 0x6d6d7820, + 0x3a414: 0x6d6d7a20, 0x3a415: 0x6d6d7c20, 0x3a416: 0x6d6d7e20, 0x3a417: 0x6d6d8020, + 0x3a418: 0x6d6d8220, 0x3a419: 0x6d6d8420, 0x3a41a: 0x6d6d8620, 0x3a41b: 0x6d6d8820, + 0x3a41c: 0x6d6d8a20, 0x3a41d: 0x6d6d8c20, 0x3a41e: 0x6d6d8e20, 0x3a41f: 0x6d6d9020, + 0x3a420: 0x6d6d9220, 0x3a421: 0x6d6d9420, 0x3a422: 0x6d6d9620, 0x3a423: 0x6d6d9820, + 0x3a424: 0x6d6d9a20, 0x3a425: 0x6d6d9c20, 0x3a426: 0x6d6d9e20, 0x3a427: 0x6d6da020, + 0x3a428: 0x6d6da220, 0x3a429: 0x6d965820, 0x3a42a: 0x6d965a20, 0x3a42b: 0x6d965c20, + 0x3a42c: 0x6d965e20, 0x3a42d: 0x6d966020, 0x3a42e: 0x6d966220, 0x3a42f: 0x6d966420, + 0x3a430: 0x6d966620, 0x3a431: 0x6d966820, 0x3a432: 0x6d966a20, 0x3a433: 0x6d966c20, + 0x3a434: 0x6d966e20, 0x3a435: 0x6d967020, 0x3a436: 0x6d967220, 0x3a437: 0x6d967420, + 0x3a438: 0x6d967620, 0x3a439: 0x6d967820, 0x3a43a: 0x6d967a20, 0x3a43b: 0x6d967c20, + 0x3a43c: 0x6d967e20, 0x3a43d: 0x6d968020, 0x3a43e: 0x6d968220, 0x3a43f: 0x6d968420, + // Block 0xe91, offset 0x3a440 + 0x3a440: 0x6d968620, 0x3a441: 0x6d968820, 0x3a442: 0x6d968a20, 0x3a443: 0x6d968c20, + 0x3a444: 0x6d968e20, 0x3a445: 0x6db95620, 0x3a446: 0x6db95820, 0x3a447: 0x6db95a20, + 0x3a448: 0x6db95c20, 0x3a449: 0x6db95e20, 0x3a44a: 0x6db96020, 0x3a44b: 0x6db96220, + 0x3a44c: 0x6db96420, 0x3a44d: 0x6db96620, 0x3a44e: 0x6db96820, 0x3a44f: 0x6db96a20, + 0x3a450: 0x6db96c20, 0x3a451: 0x6db96e20, 0x3a452: 0x6db97020, 0x3a453: 0x6db97220, + 0x3a454: 0x6db97420, 0x3a455: 0x6db97620, 0x3a456: 0x6db97820, 0x3a457: 0x6db97a20, + 0x3a458: 0x6db97c20, 0x3a459: 0x6db97e20, 0x3a45a: 0x6db98020, 0x3a45b: 0x6db98220, + 0x3a45c: 0x6db98420, 0x3a45d: 0x6db98620, 0x3a45e: 0x6db98820, 0x3a45f: 0x6db98a20, + 0x3a460: 0x6db98c20, 0x3a461: 0x6dd79220, 0x3a462: 0x6dd79420, 0x3a463: 0x6dd79620, + 0x3a464: 0x6dd79820, 0x3a465: 0x6dd79a20, 0x3a466: 0x6dd79c20, 0x3a467: 0x6dd79e20, + 0x3a468: 0x6dd7a020, 0x3a469: 0x6dd7a220, 0x3a46a: 0x6dd7a420, 0x3a46b: 0x6dd7a620, + 0x3a46c: 0x6dd7a820, 0x3a46d: 0x6dd7aa20, 0x3a46e: 0x6dd7ac20, 0x3a46f: 0x6dd7ae20, + 0x3a470: 0x6dd7b020, 0x3a471: 0x6dd7b220, 0x3a472: 0x6dd7b420, 0x3a473: 0x6dd7b620, + 0x3a474: 0x6dd7b820, 0x3a475: 0x6dd7ba20, 0x3a476: 0x6dd7bc20, 0x3a477: 0x6dd7be20, + 0x3a478: 0x6dd7c020, 0x3a479: 0x6dd7c220, 0x3a47a: 0x6dd7c420, 0x3a47b: 0x6dd7c620, + 0x3a47c: 0x6dd7c820, 0x3a47d: 0x6df01e20, 0x3a47e: 0x6df02020, 0x3a47f: 0x6df02220, + // Block 0xe92, offset 0x3a480 + 0x3a480: 0x6df02420, 0x3a481: 0x6df02620, 0x3a482: 0x6df02820, 0x3a483: 0x6df02a20, + 0x3a484: 0x6df02c20, 0x3a485: 0x6df02e20, 0x3a486: 0x6df03020, 0x3a487: 0x6df03220, + 0x3a488: 0x6df03420, 0x3a489: 0x6df03620, 0x3a48a: 0x6df03820, 0x3a48b: 0x6df03a20, + 0x3a48c: 0x6df03c20, 0x3a48d: 0x6df03e20, 0x3a48e: 0x6df04020, 0x3a48f: 0x6df04220, + 0x3a490: 0x6df04420, 0x3a491: 0x6df04620, 0x3a492: 0x6df04820, 0x3a493: 0x6df04a20, + 0x3a494: 0x6df04c20, 0x3a495: 0x6df04e20, 0x3a496: 0x6e044220, 0x3a497: 0x6e044420, + 0x3a498: 0x6e044620, 0x3a499: 0x6e044820, 0x3a49a: 0x6e044a20, 0x3a49b: 0x6e044c20, + 0x3a49c: 0x6e044e20, 0x3a49d: 0x6e045020, 0x3a49e: 0x6e045220, 0x3a49f: 0x6e045420, + 0x3a4a0: 0x6e045620, 0x3a4a1: 0x6e045820, 0x3a4a2: 0x6e045a20, 0x3a4a3: 0x6e045c20, + 0x3a4a4: 0x6e045e20, 0x3a4a5: 0x6e046020, 0x3a4a6: 0x6e156620, 0x3a4a7: 0x6e156820, + 0x3a4a8: 0x6e156a20, 0x3a4a9: 0x6e156c20, 0x3a4aa: 0x6e156e20, 0x3a4ab: 0x6e157020, + 0x3a4ac: 0x6e157220, 0x3a4ad: 0x6e157420, 0x3a4ae: 0x6e22f420, 0x3a4af: 0x6e22f620, + 0x3a4b0: 0x6e22f820, 0x3a4b1: 0x6e22fa20, 0x3a4b2: 0x6e22fc20, 0x3a4b3: 0x6e22fe20, + 0x3a4b4: 0x6e230020, 0x3a4b5: 0x6e230220, 0x3a4b6: 0x6e2d2820, 0x3a4b7: 0x6e2d2a20, + 0x3a4b8: 0x6e2d2c20, 0x3a4b9: 0x6e2d2e20, 0x3a4ba: 0x6e2d3020, 0x3a4bb: 0x6e2d3220, + 0x3a4bc: 0x6e2d3420, 0x3a4bd: 0x6e2d3620, 0x3a4be: 0x6e350a20, 0x3a4bf: 0x6e350c20, + // Block 0xe93, offset 0x3a4c0 + 0x3a4c0: 0x6e350e20, 0x3a4c1: 0x6e351020, 0x3a4c2: 0x6e351220, 0x3a4c3: 0x6e3aac20, + 0x3a4c4: 0x6e3aae20, 0x3a4c5: 0x6e3e7220, 0x3a4c6: 0x6e3e7420, 0x3a4c7: 0x6e413a20, + 0x3a4c8: 0x6e413c20, 0x3a4c9: 0x6e413e20, 0x3a4ca: 0x6e433a20, 0x3a4cb: 0x6e433c20, + 0x3a4cc: 0x6e433e20, 0x3a4cd: 0x6e45e220, 0x3a4ce: 0x6e45e420, 0x3a4cf: 0x6c890620, + 0x3a4d0: 0x6cb4c620, 0x3a4d1: 0x6cb4c820, 0x3a4d2: 0x6d40ca20, 0x3a4d3: 0x6d40cc20, + 0x3a4d4: 0x6d40ce20, 0x3a4d5: 0x6d6da620, 0x3a4d6: 0x6d6da820, 0x3a4d7: 0x6d6daa20, + 0x3a4d8: 0x6d969020, 0x3a4d9: 0x6d969220, 0x3a4da: 0x6db99220, 0x3a4db: 0x6db99420, + 0x3a4dc: 0x6db99620, 0x3a4dd: 0x6dd7cc20, 0x3a4de: 0x6e046420, 0x3a4df: 0x6e157820, + 0x3a4e0: 0x6e157a20, 0x3a4e1: 0x6e230420, 0x3a4e2: 0x6cb4ce20, 0x3a4e3: 0x6c890820, + 0x3a4e4: 0x6c890a20, 0x3a4e5: 0x6cb4d020, 0x3a4e6: 0x6ce47220, 0x3a4e7: 0x6ce47420, + 0x3a4e8: 0x6ce47620, 0x3a4e9: 0x6ce47820, 0x3a4ea: 0x6d12bc20, 0x3a4eb: 0x6d12be20, + 0x3a4ec: 0x6d40d020, 0x3a4ed: 0x6d6dac20, 0x3a4ee: 0x6d6dae20, 0x3a4ef: 0x6d6db020, + 0x3a4f0: 0x6d969420, 0x3a4f1: 0x6d969620, 0x3a4f2: 0x6db99a20, 0x3a4f3: 0x6db99c20, + 0x3a4f4: 0x6dd7d020, 0x3a4f5: 0x6dd7d220, 0x3a4f6: 0x6dd7d420, 0x3a4f7: 0x6dd7d620, + 0x3a4f8: 0x6e046820, 0x3a4f9: 0x6e157c20, 0x3a4fa: 0x6e157e20, 0x3a4fb: 0x6e3ab020, + 0x3a4fc: 0x6e456620, 0x3a4fd: 0x6c892a20, 0x3a4fe: 0x6c892c20, 0x3a4ff: 0x6c892e20, + // Block 0xe94, offset 0x3a500 + 0x3a500: 0x6c893020, 0x3a501: 0x6c893220, 0x3a502: 0x6cb50a20, 0x3a503: 0x6cb50c20, + 0x3a504: 0x6cb50e20, 0x3a505: 0x6cb51020, 0x3a506: 0x6cb51220, 0x3a507: 0x6cb51420, + 0x3a508: 0x6cb51620, 0x3a509: 0x6cb51820, 0x3a50a: 0x6ce4e420, 0x3a50b: 0x6ce4e620, + 0x3a50c: 0x6ce4e820, 0x3a50d: 0x6ce4ea20, 0x3a50e: 0x6ce4ec20, 0x3a50f: 0x6ce4ee20, + 0x3a510: 0x6ce4f020, 0x3a511: 0x6ce4f220, 0x3a512: 0x6ce4f420, 0x3a513: 0x6ce4f620, + 0x3a514: 0x6ce4f820, 0x3a515: 0x6ce4fa20, 0x3a516: 0x6ce4fc20, 0x3a517: 0x6ce4fe20, + 0x3a518: 0x6ce50020, 0x3a519: 0x6ce50220, 0x3a51a: 0x6ce50420, 0x3a51b: 0x6ce50620, + 0x3a51c: 0x6ce50820, 0x3a51d: 0x6ce50a20, 0x3a51e: 0x6ce50c20, 0x3a51f: 0x6ce50e20, + 0x3a520: 0x6ce51020, 0x3a521: 0x6ce51220, 0x3a522: 0x6ce51420, 0x3a523: 0x6ce51620, + 0x3a524: 0x6ce51820, 0x3a525: 0x6d135820, 0x3a526: 0x6d135a20, 0x3a527: 0x6d135c20, + 0x3a528: 0x6d135e20, 0x3a529: 0x6d136020, 0x3a52a: 0x6d136220, 0x3a52b: 0x6d136420, + 0x3a52c: 0x6d136620, 0x3a52d: 0x6d136820, 0x3a52e: 0x6d136a20, 0x3a52f: 0x6d136c20, + 0x3a530: 0x6d136e20, 0x3a531: 0x6d137020, 0x3a532: 0x6d137220, 0x3a533: 0x6d137420, + 0x3a534: 0x6d137620, 0x3a535: 0x6d137820, 0x3a536: 0x6d137a20, 0x3a537: 0x6d137c20, + 0x3a538: 0x6d137e20, 0x3a539: 0x6d138020, 0x3a53a: 0x6d138220, 0x3a53b: 0x6d138420, + 0x3a53c: 0x6d138620, 0x3a53d: 0x6d138820, 0x3a53e: 0x6d138a20, 0x3a53f: 0x6d138c20, + // Block 0xe95, offset 0x3a540 + 0x3a540: 0x6d138e20, 0x3a541: 0x6d139020, 0x3a542: 0x6d415a20, 0x3a543: 0x6d415c20, + 0x3a544: 0x6d415e20, 0x3a545: 0x6d416020, 0x3a546: 0x6d416220, 0x3a547: 0x6d416420, + 0x3a548: 0x6d416620, 0x3a549: 0x6d416820, 0x3a54a: 0x6d416a20, 0x3a54b: 0x6d416c20, + 0x3a54c: 0x6d416e20, 0x3a54d: 0x6d417020, 0x3a54e: 0x6d417220, 0x3a54f: 0x6d417420, + 0x3a550: 0x6d417620, 0x3a551: 0x6d417820, 0x3a552: 0x6d417a20, 0x3a553: 0x6d417c20, + 0x3a554: 0x6d417e20, 0x3a555: 0x6d418020, 0x3a556: 0x6d418220, 0x3a557: 0x6d418420, + 0x3a558: 0x6d418620, 0x3a559: 0x6d418820, 0x3a55a: 0x6d418a20, 0x3a55b: 0x6d418c20, + 0x3a55c: 0x6d418e20, 0x3a55d: 0x6d419020, 0x3a55e: 0x6d377020, 0x3a55f: 0x6d419220, + 0x3a560: 0x6d419420, 0x3a561: 0x6d419620, 0x3a562: 0x6d419820, 0x3a563: 0x6d419a20, + 0x3a564: 0x6d419c20, 0x3a565: 0x6d419e20, 0x3a566: 0x6d41a020, 0x3a567: 0x6d41a220, + 0x3a568: 0x6d41a420, 0x3a569: 0x6d41a620, 0x3a56a: 0x6d41a820, 0x3a56b: 0x6d41aa20, + 0x3a56c: 0x6d6e4a20, 0x3a56d: 0x6d6e4c20, 0x3a56e: 0x6d6e4e20, 0x3a56f: 0x6d6e5020, + 0x3a570: 0x6d6e5220, 0x3a571: 0x6d6e5420, 0x3a572: 0x6d6e5620, 0x3a573: 0x6d6e5820, + 0x3a574: 0x6d6e5a20, 0x3a575: 0x6d6e5c20, 0x3a576: 0x6d6e5e20, 0x3a577: 0x6d6e6020, + 0x3a578: 0x6d6e6220, 0x3a579: 0x6d6e6420, 0x3a57a: 0x6d6e6620, 0x3a57b: 0x6d6e6820, + 0x3a57c: 0x6d6e6a20, 0x3a57d: 0x6d6e6c20, 0x3a57e: 0x6d6e6e20, 0x3a57f: 0x6d6e7020, + // Block 0xe96, offset 0x3a580 + 0x3a580: 0x6d6e7220, 0x3a581: 0x6d6e7420, 0x3a582: 0x6d6e7620, 0x3a583: 0x6d6e7820, + 0x3a584: 0x6d6e7a20, 0x3a585: 0x6d6e7c20, 0x3a586: 0x6d6e7e20, 0x3a587: 0x6d6e8020, + 0x3a588: 0x6d6e8220, 0x3a589: 0x6d6e8420, 0x3a58a: 0x6d6e8620, 0x3a58b: 0x6d6e8820, + 0x3a58c: 0x6d6e8a20, 0x3a58d: 0x6d6e8c20, 0x3a58e: 0x6d6e8e20, 0x3a58f: 0x6d6e9020, + 0x3a590: 0x6d6e9220, 0x3a591: 0x6d6e9420, 0x3a592: 0x6d6e9620, 0x3a593: 0x6d6e9820, + 0x3a594: 0x6d6e9a20, 0x3a595: 0x6d6e9c20, 0x3a596: 0x6d6e9e20, 0x3a597: 0x6d6ea020, + 0x3a598: 0x6d6ea220, 0x3a599: 0x6d6ea420, 0x3a59a: 0x6d6ea620, 0x3a59b: 0x6d6ea820, + 0x3a59c: 0x6d6eaa20, 0x3a59d: 0x6d6eac20, 0x3a59e: 0x6d6eae20, 0x3a59f: 0x6d6eb020, + 0x3a5a0: 0x6d6eb220, 0x3a5a1: 0x6d6eb420, 0x3a5a2: 0x6d6eb620, 0x3a5a3: 0x6d6eb820, + 0x3a5a4: 0x6d6eba20, 0x3a5a5: 0x6d6ebc20, 0x3a5a6: 0x6d974620, 0x3a5a7: 0x6d974820, + 0x3a5a8: 0x6d974a20, 0x3a5a9: 0x6d974c20, 0x3a5aa: 0x6d974e20, 0x3a5ab: 0x6d975020, + 0x3a5ac: 0x6d975220, 0x3a5ad: 0x6d975420, 0x3a5ae: 0x6d975620, 0x3a5af: 0x6d975820, + 0x3a5b0: 0x6d975a20, 0x3a5b1: 0x6d975c20, 0x3a5b2: 0x6d975e20, 0x3a5b3: 0x6d976020, + 0x3a5b4: 0x6d976220, 0x3a5b5: 0x6d976420, 0x3a5b6: 0x6d976620, 0x3a5b7: 0x6d976820, + 0x3a5b8: 0x6d976a20, 0x3a5b9: 0x6d976c20, 0x3a5ba: 0x6d976e20, 0x3a5bb: 0x6d977020, + 0x3a5bc: 0x6d977220, 0x3a5bd: 0x6d977420, 0x3a5be: 0x6d977620, 0x3a5bf: 0x6d977820, + // Block 0xe97, offset 0x3a5c0 + 0x3a5c0: 0x6d977a20, 0x3a5c1: 0x6d977c20, 0x3a5c2: 0x6d977e20, 0x3a5c3: 0x6d978020, + 0x3a5c4: 0x6d978220, 0x3a5c5: 0x6d978420, 0x3a5c6: 0x6d978620, 0x3a5c7: 0x6d978820, + 0x3a5c8: 0x6d978a20, 0x3a5c9: 0x6d978c20, 0x3a5ca: 0x6d978e20, 0x3a5cb: 0x6d979020, + 0x3a5cc: 0x6d979220, 0x3a5cd: 0x6d979420, 0x3a5ce: 0x6d979620, 0x3a5cf: 0x6d979820, + 0x3a5d0: 0x6d979a20, 0x3a5d1: 0x6d979c20, 0x3a5d2: 0x6d979e20, 0x3a5d3: 0x6d97a020, + 0x3a5d4: 0x6d97a220, 0x3a5d5: 0x6d97a420, 0x3a5d6: 0x6d97a620, 0x3a5d7: 0x6d97a820, + 0x3a5d8: 0x6d97aa20, 0x3a5d9: 0x6d97ac20, 0x3a5da: 0x6d97ae20, 0x3a5db: 0x6d97b020, + 0x3a5dc: 0x6d97b220, 0x3a5dd: 0x6d97b420, 0x3a5de: 0x6d97b620, 0x3a5df: 0x6d97b820, + 0x3a5e0: 0x6d97ba20, 0x3a5e1: 0x6d97bc20, 0x3a5e2: 0x6d97be20, 0x3a5e3: 0x6d97c020, + 0x3a5e4: 0x6d97c220, 0x3a5e5: 0x6d97c420, 0x3a5e6: 0x6d97c620, 0x3a5e7: 0x6d97c820, + 0x3a5e8: 0x6d97ca20, 0x3a5e9: 0x6d97cc20, 0x3a5ea: 0x6d97ce20, 0x3a5eb: 0x6d97d020, + 0x3a5ec: 0x6d97d220, 0x3a5ed: 0x6d97d420, 0x3a5ee: 0x6d97d620, 0x3a5ef: 0x6dba2c20, + 0x3a5f0: 0x6dba2e20, 0x3a5f1: 0x6dba3020, 0x3a5f2: 0x6dba3220, 0x3a5f3: 0x6dba3420, + 0x3a5f4: 0x6dba3620, 0x3a5f5: 0x6dba3820, 0x3a5f6: 0x6dba3a20, 0x3a5f7: 0x6dba3c20, + 0x3a5f8: 0x6dba3e20, 0x3a5f9: 0x6dba4020, 0x3a5fa: 0x6dba4220, 0x3a5fb: 0x6dba4420, + 0x3a5fc: 0x6dba4620, 0x3a5fd: 0x6dba4820, 0x3a5fe: 0x6dba4a20, 0x3a5ff: 0x6dba4c20, + // Block 0xe98, offset 0x3a600 + 0x3a600: 0x6dba4e20, 0x3a601: 0x6dba5020, 0x3a602: 0x6dba5220, 0x3a603: 0x6dba5420, + 0x3a604: 0x6dba5620, 0x3a605: 0x6dba5820, 0x3a606: 0x6dba5a20, 0x3a607: 0x6dba5c20, + 0x3a608: 0x6dba5e20, 0x3a609: 0x6dba6020, 0x3a60a: 0x6dba6220, 0x3a60b: 0x6dba6420, + 0x3a60c: 0x6dba6620, 0x3a60d: 0x6dba6820, 0x3a60e: 0x6dba6a20, 0x3a60f: 0x6dba6c20, + 0x3a610: 0x6dba6e20, 0x3a611: 0x6dba7020, 0x3a612: 0x6dba7220, 0x3a613: 0x6dba7420, + 0x3a614: 0x6dba7620, 0x3a615: 0x6dba7820, 0x3a616: 0x6dba7a20, 0x3a617: 0x6dba7c20, + 0x3a618: 0x6dba7e20, 0x3a619: 0x6dba8020, 0x3a61a: 0x6dba8220, 0x3a61b: 0x6dba8420, + 0x3a61c: 0x6dba8620, 0x3a61d: 0x6dba8820, 0x3a61e: 0x6dba8a20, 0x3a61f: 0x6dba8c20, + 0x3a620: 0x6dba8e20, 0x3a621: 0x6dba9020, 0x3a622: 0x6dba9220, 0x3a623: 0x6dba9420, + 0x3a624: 0x6dba9620, 0x3a625: 0x6dba9820, 0x3a626: 0x6dba9a20, 0x3a627: 0x6dba9c20, + 0x3a628: 0x6dba9e20, 0x3a629: 0x6dbaa020, 0x3a62a: 0x6dbaa220, 0x3a62b: 0x6dbaa420, + 0x3a62c: 0x6dbaa620, 0x3a62d: 0x6dbaa820, 0x3a62e: 0x6dbaaa20, 0x3a62f: 0x6dbaac20, + 0x3a630: 0x6dbaae20, 0x3a631: 0x6dbab020, 0x3a632: 0x6dbab220, 0x3a633: 0x6dbab420, + 0x3a634: 0x6dbab620, 0x3a635: 0x6dbab820, 0x3a636: 0x6dbaba20, 0x3a637: 0x6dbabc20, + 0x3a638: 0x6dbabe20, 0x3a639: 0x6dbac020, 0x3a63a: 0x6dbac220, 0x3a63b: 0x6dbac420, + 0x3a63c: 0x6dbac620, 0x3a63d: 0x6dbac820, 0x3a63e: 0x6dbaca20, 0x3a63f: 0x6dbacc20, + // Block 0xe99, offset 0x3a640 + 0x3a640: 0x6dbace20, 0x3a641: 0x6dbad020, 0x3a642: 0x6dbad220, 0x3a643: 0x6dbad420, + 0x3a644: 0x6dbad620, 0x3a645: 0x6dbad820, 0x3a646: 0x6dbada20, 0x3a647: 0x6dd85a20, + 0x3a648: 0x6dd85c20, 0x3a649: 0x6dd85e20, 0x3a64a: 0x6dd86020, 0x3a64b: 0x6dd86220, + 0x3a64c: 0x6dd86420, 0x3a64d: 0x6dd86620, 0x3a64e: 0x6dd86820, 0x3a64f: 0x6dd86a20, + 0x3a650: 0x6dd86c20, 0x3a651: 0x6dd86e20, 0x3a652: 0x6dd87020, 0x3a653: 0x6dd87220, + 0x3a654: 0x6dd87420, 0x3a655: 0x6dd87620, 0x3a656: 0x6dd87820, 0x3a657: 0x6dd87a20, + 0x3a658: 0x6dd87c20, 0x3a659: 0x6dd87e20, 0x3a65a: 0x6dd88020, 0x3a65b: 0x6dd88220, + 0x3a65c: 0x6dd88420, 0x3a65d: 0x6dd88620, 0x3a65e: 0x6dd88820, 0x3a65f: 0x6dd88a20, + 0x3a660: 0x6dd88c20, 0x3a661: 0x6dd88e20, 0x3a662: 0x6dd89020, 0x3a663: 0x6dd89220, + 0x3a664: 0x6dd89420, 0x3a665: 0x6dd89620, 0x3a666: 0x6dd89820, 0x3a667: 0x6dd89a20, + 0x3a668: 0x6dd89c20, 0x3a669: 0x6dd89e20, 0x3a66a: 0x6dd8a020, 0x3a66b: 0x6dd8a220, + 0x3a66c: 0x6dd8a420, 0x3a66d: 0x6dd8a620, 0x3a66e: 0x6dd8a820, 0x3a66f: 0x6dd8aa20, + 0x3a670: 0x6dd8ac20, 0x3a671: 0x6dd8ae20, 0x3a672: 0x6dd8b020, 0x3a673: 0x6dd8b220, + 0x3a674: 0x6dd8b420, 0x3a675: 0x6dd8b620, 0x3a676: 0x6dd8b820, 0x3a677: 0x6dd8ba20, + 0x3a678: 0x6dd8bc20, 0x3a679: 0x6dd8be20, 0x3a67a: 0x6dd8c020, 0x3a67b: 0x6dd8c220, + 0x3a67c: 0x6dd8c420, 0x3a67d: 0x6dd8c620, 0x3a67e: 0x6dd8c820, 0x3a67f: 0x6dd8ca20, + // Block 0xe9a, offset 0x3a680 + 0x3a680: 0x6dd8cc20, 0x3a681: 0x6dd8ce20, 0x3a682: 0x6dd8d020, 0x3a683: 0x6dd8d220, + 0x3a684: 0x6dd8d420, 0x3a685: 0x6dd8d620, 0x3a686: 0x6dd8d820, 0x3a687: 0x6dd8da20, + 0x3a688: 0x6dd8dc20, 0x3a689: 0x6dd8de20, 0x3a68a: 0x6dd8e020, 0x3a68b: 0x6dd8e220, + 0x3a68c: 0x6dd8e420, 0x3a68d: 0x6dd8e620, 0x3a68e: 0x6dd8e820, 0x3a68f: 0x6df0d820, + 0x3a690: 0x6df0da20, 0x3a691: 0x6df0dc20, 0x3a692: 0x6df0de20, 0x3a693: 0x6df0e020, + 0x3a694: 0x6df0e220, 0x3a695: 0x6df0e420, 0x3a696: 0x6df0e620, 0x3a697: 0x6df0e820, + 0x3a698: 0x6df0ea20, 0x3a699: 0x6df0ec20, 0x3a69a: 0x6df0ee20, 0x3a69b: 0x6df0f020, + 0x3a69c: 0x6df0f220, 0x3a69d: 0x6df0f420, 0x3a69e: 0x6df0f620, 0x3a69f: 0x6df0f820, + 0x3a6a0: 0x6df0fa20, 0x3a6a1: 0x6df0fc20, 0x3a6a2: 0x6df0fe20, 0x3a6a3: 0x6df10020, + 0x3a6a4: 0x6df10220, 0x3a6a5: 0x6df10420, 0x3a6a6: 0x6df10620, 0x3a6a7: 0x6df10820, + 0x3a6a8: 0x6df10a20, 0x3a6a9: 0x6df10c20, 0x3a6aa: 0x6df10e20, 0x3a6ab: 0x6df11020, + 0x3a6ac: 0x6df11220, 0x3a6ad: 0x6df11420, 0x3a6ae: 0x6df11620, 0x3a6af: 0x6df11820, + 0x3a6b0: 0x6df11a20, 0x3a6b1: 0x6df11c20, 0x3a6b2: 0x6df11e20, 0x3a6b3: 0x6df12020, + 0x3a6b4: 0x6df12220, 0x3a6b5: 0x6df12420, 0x3a6b6: 0x6df12620, 0x3a6b7: 0x6df12820, + 0x3a6b8: 0x6df12a20, 0x3a6b9: 0x6df12c20, 0x3a6ba: 0x6df12e20, 0x3a6bb: 0x6df13020, + 0x3a6bc: 0x6df13220, 0x3a6bd: 0x6df13420, 0x3a6be: 0x6df13620, 0x3a6bf: 0x6df13820, + // Block 0xe9b, offset 0x3a6c0 + 0x3a6c0: 0x6df13a20, 0x3a6c1: 0x6df13c20, 0x3a6c2: 0x6df13e20, 0x3a6c3: 0x6df14020, + 0x3a6c4: 0x6df14220, 0x3a6c5: 0x6df14420, 0x3a6c6: 0x6df14620, 0x3a6c7: 0x6df14820, + 0x3a6c8: 0x6df14a20, 0x3a6c9: 0x6df14c20, 0x3a6ca: 0x6df14e20, 0x3a6cb: 0x6df15020, + 0x3a6cc: 0x6df15220, 0x3a6cd: 0x6e04e420, 0x3a6ce: 0x6e04e620, 0x3a6cf: 0x6e04e820, + 0x3a6d0: 0x6e04ea20, 0x3a6d1: 0x6e04ec20, 0x3a6d2: 0x6e04ee20, 0x3a6d3: 0x6e04f020, + 0x3a6d4: 0x6e04f220, 0x3a6d5: 0x6e15c420, 0x3a6d6: 0x6e04f420, 0x3a6d7: 0x6e04f620, + 0x3a6d8: 0x6e04f820, 0x3a6d9: 0x6e04fa20, 0x3a6da: 0x6e04fc20, 0x3a6db: 0x6e04fe20, + 0x3a6dc: 0x6e050020, 0x3a6dd: 0x6e050220, 0x3a6de: 0x6e050420, 0x3a6df: 0x6e050620, + 0x3a6e0: 0x6e050820, 0x3a6e1: 0x6e050a20, 0x3a6e2: 0x6e050c20, 0x3a6e3: 0x6e050e20, + 0x3a6e4: 0x6e051020, 0x3a6e5: 0x6e051220, 0x3a6e6: 0x6e051420, 0x3a6e7: 0x6e051620, + 0x3a6e8: 0x6e051820, 0x3a6e9: 0x6e051a20, 0x3a6ea: 0x6e051c20, 0x3a6eb: 0x6e051e20, + 0x3a6ec: 0x6e052020, 0x3a6ed: 0x6e052220, 0x3a6ee: 0x6e052420, 0x3a6ef: 0x6e052620, + 0x3a6f0: 0x6e052820, 0x3a6f1: 0x6e052a20, 0x3a6f2: 0x6e052c20, 0x3a6f3: 0x6e052e20, + 0x3a6f4: 0x6e053020, 0x3a6f5: 0x6e053220, 0x3a6f6: 0x6e053420, 0x3a6f7: 0x6e053620, + 0x3a6f8: 0x6e053820, 0x3a6f9: 0x6e053a20, 0x3a6fa: 0x6e053c20, 0x3a6fb: 0x6e053e20, + 0x3a6fc: 0x6e054020, 0x3a6fd: 0x6e054220, 0x3a6fe: 0x6e054420, 0x3a6ff: 0x6e054620, + // Block 0xe9c, offset 0x3a700 + 0x3a700: 0x6e054820, 0x3a701: 0x6e054a20, 0x3a702: 0x6e054c20, 0x3a703: 0x6e054e20, + 0x3a704: 0x6e055020, 0x3a705: 0x6e055220, 0x3a706: 0x6e055420, 0x3a707: 0x6e055620, + 0x3a708: 0x6e055820, 0x3a709: 0x6e055a20, 0x3a70a: 0x6e055c20, 0x3a70b: 0x6e055e20, + 0x3a70c: 0x6e056020, 0x3a70d: 0x6e056220, 0x3a70e: 0x6e056420, 0x3a70f: 0x6e056620, + 0x3a710: 0x6e056820, 0x3a711: 0x6e056a20, 0x3a712: 0x6e056c20, 0x3a713: 0x6e056e20, + 0x3a714: 0x6e057020, 0x3a715: 0x6e15c620, 0x3a716: 0x6e15c820, 0x3a717: 0x6e15ca20, + 0x3a718: 0x6e15cc20, 0x3a719: 0x6e15ce20, 0x3a71a: 0x6e15d020, 0x3a71b: 0x6e15d220, + 0x3a71c: 0x6e15d420, 0x3a71d: 0x6e15d620, 0x3a71e: 0x6e15d820, 0x3a71f: 0x6e15da20, + 0x3a720: 0x6e15dc20, 0x3a721: 0x6e15de20, 0x3a722: 0x6e15e020, 0x3a723: 0x6e15e220, + 0x3a724: 0x6e15e420, 0x3a725: 0x6e15e620, 0x3a726: 0x6e15e820, 0x3a727: 0x6e15ea20, + 0x3a728: 0x6e15ec20, 0x3a729: 0x6e15ee20, 0x3a72a: 0x6e15f020, 0x3a72b: 0x6e15f220, + 0x3a72c: 0x6e15f420, 0x3a72d: 0x6e15f620, 0x3a72e: 0x6e15f820, 0x3a72f: 0x6e15fa20, + 0x3a730: 0x6e15fc20, 0x3a731: 0x6e15fe20, 0x3a732: 0x6e160020, 0x3a733: 0x6e160220, + 0x3a734: 0x6e160420, 0x3a735: 0x6e160620, 0x3a736: 0x6e160820, 0x3a737: 0x6e160a20, + 0x3a738: 0x6e160c20, 0x3a739: 0x6e160e20, 0x3a73a: 0x6e161020, 0x3a73b: 0x6e161220, + 0x3a73c: 0x6e161420, 0x3a73d: 0x6e161620, 0x3a73e: 0x6e161820, 0x3a73f: 0x6e161a20, + // Block 0xe9d, offset 0x3a740 + 0x3a740: 0x6e161c20, 0x3a741: 0x6e161e20, 0x3a742: 0x6e162020, 0x3a743: 0x6e162220, + 0x3a744: 0x6e162420, 0x3a745: 0x6e162620, 0x3a746: 0x6e162820, 0x3a747: 0x6e162a20, + 0x3a748: 0x6e162c20, 0x3a749: 0x6e162e20, 0x3a74a: 0x6e163020, 0x3a74b: 0x6e163220, + 0x3a74c: 0x6e163420, 0x3a74d: 0x6e163620, 0x3a74e: 0x6e163820, 0x3a74f: 0x6e163a20, + 0x3a750: 0x6e163c20, 0x3a751: 0x6e163e20, 0x3a752: 0x6e233e20, 0x3a753: 0x6e234020, + 0x3a754: 0x6e234220, 0x3a755: 0x6e234420, 0x3a756: 0x6e234620, 0x3a757: 0x6e234820, + 0x3a758: 0x6e234a20, 0x3a759: 0x6e234c20, 0x3a75a: 0x6e234e20, 0x3a75b: 0x6e235020, + 0x3a75c: 0x6e235220, 0x3a75d: 0x6e235420, 0x3a75e: 0x6e235620, 0x3a75f: 0x6e235820, + 0x3a760: 0x6e235a20, 0x3a761: 0x6e235c20, 0x3a762: 0x6e235e20, 0x3a763: 0x6e236020, + 0x3a764: 0x6e236220, 0x3a765: 0x6e236420, 0x3a766: 0x6e236620, 0x3a767: 0x6e236820, + 0x3a768: 0x6e236a20, 0x3a769: 0x6e236c20, 0x3a76a: 0x6e236e20, 0x3a76b: 0x6e237020, + 0x3a76c: 0x6e237220, 0x3a76d: 0x6e237420, 0x3a76e: 0x6e237620, 0x3a76f: 0x6e237820, + 0x3a770: 0x6e237a20, 0x3a771: 0x6e237c20, 0x3a772: 0x6e237e20, 0x3a773: 0x6e238020, + 0x3a774: 0x6e238220, 0x3a775: 0x6e238420, 0x3a776: 0x6e238620, 0x3a777: 0x6e238820, + 0x3a778: 0x6e2d6a20, 0x3a779: 0x6e2d6c20, 0x3a77a: 0x6e2d6e20, 0x3a77b: 0x6e2d7020, + 0x3a77c: 0x6e2d7220, 0x3a77d: 0x6e2d7420, 0x3a77e: 0x6e2d7620, 0x3a77f: 0x6e2d7820, + // Block 0xe9e, offset 0x3a780 + 0x3a780: 0x6e2d7a20, 0x3a781: 0x6e2d7c20, 0x3a782: 0x6e2d7e20, 0x3a783: 0x6e2d8020, + 0x3a784: 0x6e2d8220, 0x3a785: 0x6e2d8420, 0x3a786: 0x6e2d8620, 0x3a787: 0x6e2d8820, + 0x3a788: 0x6e2d8a20, 0x3a789: 0x6e2d8c20, 0x3a78a: 0x6e2d8e20, 0x3a78b: 0x6e2d9020, + 0x3a78c: 0x6e2d9220, 0x3a78d: 0x6e2d9420, 0x3a78e: 0x6e2d9620, 0x3a78f: 0x6e2d9820, + 0x3a790: 0x6e2d9a20, 0x3a791: 0x6e2d9c20, 0x3a792: 0x6e2d9e20, 0x3a793: 0x6e2da020, + 0x3a794: 0x6e2da220, 0x3a795: 0x6e2da420, 0x3a796: 0x6e2da620, 0x3a797: 0x6e2da820, + 0x3a798: 0x6e2daa20, 0x3a799: 0x6e2dac20, 0x3a79a: 0x6e2dae20, 0x3a79b: 0x6e2db020, + 0x3a79c: 0x6e2db220, 0x3a79d: 0x6e352620, 0x3a79e: 0x6e352820, 0x3a79f: 0x6e352a20, + 0x3a7a0: 0x6e352c20, 0x3a7a1: 0x6e352e20, 0x3a7a2: 0x6e353020, 0x3a7a3: 0x6e353220, + 0x3a7a4: 0x6e353420, 0x3a7a5: 0x6e353620, 0x3a7a6: 0x6e353820, 0x3a7a7: 0x6e353a20, + 0x3a7a8: 0x6e353c20, 0x3a7a9: 0x6e353e20, 0x3a7aa: 0x6e354020, 0x3a7ab: 0x6e354220, + 0x3a7ac: 0x6e354420, 0x3a7ad: 0x6e354620, 0x3a7ae: 0x6e354820, 0x3a7af: 0x6e354a20, + 0x3a7b0: 0x6e354c20, 0x3a7b1: 0x6e354e20, 0x3a7b2: 0x6e355020, 0x3a7b3: 0x6e355220, + 0x3a7b4: 0x6e355420, 0x3a7b5: 0x6e355620, 0x3a7b6: 0x6e355820, 0x3a7b7: 0x6e355a20, + 0x3a7b8: 0x6e355c20, 0x3a7b9: 0x6e355e20, 0x3a7ba: 0x6e3ac220, 0x3a7bb: 0x6e3ac420, + 0x3a7bc: 0x6e3ac620, 0x3a7bd: 0x6e3ac820, 0x3a7be: 0x6e3aca20, 0x3a7bf: 0x6e3acc20, + // Block 0xe9f, offset 0x3a7c0 + 0x3a7c0: 0x6e3ace20, 0x3a7c1: 0x6e3ad020, 0x3a7c2: 0x6e3ad220, 0x3a7c3: 0x6e3ad420, + 0x3a7c4: 0x6e3ad620, 0x3a7c5: 0x6e3ad820, 0x3a7c6: 0x6e3ada20, 0x3a7c7: 0x6e3adc20, + 0x3a7c8: 0x6e3ade20, 0x3a7c9: 0x6e3e8420, 0x3a7ca: 0x6e3e8620, 0x3a7cb: 0x6e3e8820, + 0x3a7cc: 0x6e3e8a20, 0x3a7cd: 0x6e3e8c20, 0x3a7ce: 0x6e3e8e20, 0x3a7cf: 0x6e3e9020, + 0x3a7d0: 0x6e3e9220, 0x3a7d1: 0x6e3e9420, 0x3a7d2: 0x6e3e9620, 0x3a7d3: 0x6e3e9820, + 0x3a7d4: 0x6e3e9a20, 0x3a7d5: 0x6e3e9c20, 0x3a7d6: 0x6e3e9e20, 0x3a7d7: 0x6e3ea020, + 0x3a7d8: 0x6e3ea220, 0x3a7d9: 0x6e3ea420, 0x3a7da: 0x6e3ea620, 0x3a7db: 0x6e3ea820, + 0x3a7dc: 0x6e3eaa20, 0x3a7dd: 0x6e3eac20, 0x3a7de: 0x6e414820, 0x3a7df: 0x6e414a20, + 0x3a7e0: 0x6e414c20, 0x3a7e1: 0x6e414e20, 0x3a7e2: 0x6e415020, 0x3a7e3: 0x6e415220, + 0x3a7e4: 0x6e415420, 0x3a7e5: 0x6e415620, 0x3a7e6: 0x6e415820, 0x3a7e7: 0x6e415a20, + 0x3a7e8: 0x6e415c20, 0x3a7e9: 0x6e434820, 0x3a7ea: 0x6e434a20, 0x3a7eb: 0x6e434c20, + 0x3a7ec: 0x6e434e20, 0x3a7ed: 0x6e435020, 0x3a7ee: 0x6e435220, 0x3a7ef: 0x6e435420, + 0x3a7f0: 0x6e435620, 0x3a7f1: 0x6e3ae020, 0x3a7f2: 0x6e449820, 0x3a7f3: 0x6e449a20, + 0x3a7f4: 0x6e449c20, 0x3a7f5: 0x6e449e20, 0x3a7f6: 0x6e44a020, 0x3a7f7: 0x6e456820, + 0x3a7f8: 0x6e456a20, 0x3a7f9: 0x6e456c20, 0x3a7fa: 0x6e45e620, 0x3a7fb: 0x6e464020, + 0x3a7fc: 0x6e46d020, 0x3a7fd: 0x6e471620, 0x3a7fe: 0x6c41f620, 0x3a7ff: 0x6c41f820, + // Block 0xea0, offset 0x3a800 + 0x3a800: 0x6c629620, 0x3a801: 0x6c629820, 0x3a802: 0x6c629a20, 0x3a803: 0x6c897220, + 0x3a804: 0x6c897420, 0x3a805: 0x6c897620, 0x3a806: 0x6c897820, 0x3a807: 0x6ce56620, + 0x3a808: 0x6ce56820, 0x3a809: 0x6d13dc20, 0x3a80a: 0x6d13de20, 0x3a80b: 0x6d13e020, + 0x3a80c: 0x6d13e220, 0x3a80d: 0x6d6ef220, 0x3a80e: 0x6d41ec20, 0x3a80f: 0x6d6ef420, + 0x3a810: 0x6d980420, 0x3a811: 0x6dbb0620, 0x3a812: 0x6d980620, 0x3a813: 0x6dbb0820, + 0x3a814: 0x6dbb0a20, 0x3a815: 0x6dd90820, 0x3a816: 0x6dd90a20, 0x3a817: 0x6c280020, + 0x3a818: 0x6c280220, 0x3a819: 0x6c62aa20, 0x3a81a: 0x6cb58e20, 0x3a81b: 0x6cb59020, + 0x3a81c: 0x6cb59220, 0x3a81d: 0x6cb59420, 0x3a81e: 0x6cb59620, 0x3a81f: 0x6cb59820, + 0x3a820: 0x6cb59a20, 0x3a821: 0x6cb59c20, 0x3a822: 0x6cb59e20, 0x3a823: 0x6cb5a020, + 0x3a824: 0x6cb5a220, 0x3a825: 0x6cb5a420, 0x3a826: 0x6ce57420, 0x3a827: 0x6ce57620, + 0x3a828: 0x6ce57820, 0x3a829: 0x6ce57a20, 0x3a82a: 0x6ce57c20, 0x3a82b: 0x6ce57e20, + 0x3a82c: 0x6ce58020, 0x3a82d: 0x6ce58220, 0x3a82e: 0x6ce58420, 0x3a82f: 0x6ce58620, + 0x3a830: 0x6ce58820, 0x3a831: 0x6ce58a20, 0x3a832: 0x6d13fa20, 0x3a833: 0x6d13fc20, + 0x3a834: 0x6d13fe20, 0x3a835: 0x6d140020, 0x3a836: 0x6d140220, 0x3a837: 0x6d140420, + 0x3a838: 0x6d140620, 0x3a839: 0x6d140820, 0x3a83a: 0x6d140a20, 0x3a83b: 0x6d140c20, + 0x3a83c: 0x6d140e20, 0x3a83d: 0x6d141020, 0x3a83e: 0x6d141220, 0x3a83f: 0x6d141420, + // Block 0xea1, offset 0x3a840 + 0x3a840: 0x6d41fe20, 0x3a841: 0x6d420020, 0x3a842: 0x6d420220, 0x3a843: 0x6d420420, + 0x3a844: 0x6d420620, 0x3a845: 0x6d420820, 0x3a846: 0x6d420a20, 0x3a847: 0x6d6f0220, + 0x3a848: 0x6d6f0420, 0x3a849: 0x6d6f0620, 0x3a84a: 0x6d6f0820, 0x3a84b: 0x6d6f0a20, + 0x3a84c: 0x6d6f0c20, 0x3a84d: 0x6d6f0e20, 0x3a84e: 0x6d6f1020, 0x3a84f: 0x6d6f1220, + 0x3a850: 0x6d6f1420, 0x3a851: 0x6d6f1620, 0x3a852: 0x6d6f1820, 0x3a853: 0x6d980e20, + 0x3a854: 0x6d981020, 0x3a855: 0x6d981220, 0x3a856: 0x6d981420, 0x3a857: 0x6d981620, + 0x3a858: 0x6d981820, 0x3a859: 0x6d981a20, 0x3a85a: 0x6d981c20, 0x3a85b: 0x6d981e20, + 0x3a85c: 0x6d982020, 0x3a85d: 0x6d982220, 0x3a85e: 0x6dbb1620, 0x3a85f: 0x6dbb1820, + 0x3a860: 0x6dbb1a20, 0x3a861: 0x6dbb1c20, 0x3a862: 0x6dbb1e20, 0x3a863: 0x6dbb2020, + 0x3a864: 0x6dbb2220, 0x3a865: 0x6dd91020, 0x3a866: 0x6dd91220, 0x3a867: 0x6dd91420, + 0x3a868: 0x6dd91620, 0x3a869: 0x6dd91820, 0x3a86a: 0x6dd91a20, 0x3a86b: 0x6dd91c20, + 0x3a86c: 0x6dd91e20, 0x3a86d: 0x6df16820, 0x3a86e: 0x6df16a20, 0x3a86f: 0x6df16c20, + 0x3a870: 0x6df16e20, 0x3a871: 0x6df17020, 0x3a872: 0x6df17220, 0x3a873: 0x6e059620, + 0x3a874: 0x6e059820, 0x3a875: 0x6e059a20, 0x3a876: 0x6e059c20, 0x3a877: 0x6e059e20, + 0x3a878: 0x6e165020, 0x3a879: 0x6e165220, 0x3a87a: 0x6e165420, 0x3a87b: 0x6e239a20, + 0x3a87c: 0x6e239c20, 0x3a87d: 0x6e239e20, 0x3a87e: 0x6e23a020, 0x3a87f: 0x6e23a220, + // Block 0xea2, offset 0x3a880 + 0x3a880: 0x6e2dba20, 0x3a881: 0x6e2dbc20, 0x3a882: 0x6e356820, 0x3a883: 0x6e356a20, + 0x3a884: 0x6e3eb020, 0x3a885: 0x6e435a20, 0x3a886: 0x6e44a220, 0x3a887: 0x6c420420, + 0x3a888: 0x6c420620, 0x3a889: 0x6c62b020, 0x3a88a: 0x6c898a20, 0x3a88b: 0x6c898c20, + 0x3a88c: 0x6c898e20, 0x3a88d: 0x6c899020, 0x3a88e: 0x6c899220, 0x3a88f: 0x6c899420, + 0x3a890: 0x6cb5b420, 0x3a891: 0x6cb5b620, 0x3a892: 0x6cb5b820, 0x3a893: 0x6cb5ba20, + 0x3a894: 0x6cb5bc20, 0x3a895: 0x6cb5be20, 0x3a896: 0x6cb5c020, 0x3a897: 0x6ce5ae20, + 0x3a898: 0x6ce5b020, 0x3a899: 0x6ce5b220, 0x3a89a: 0x6ce5b420, 0x3a89b: 0x6ce5b620, + 0x3a89c: 0x6ce5b820, 0x3a89d: 0x6ce5ba20, 0x3a89e: 0x6ce5bc20, 0x3a89f: 0x6ce5be20, + 0x3a8a0: 0x6ce5c020, 0x3a8a1: 0x6ce5c220, 0x3a8a2: 0x6ce5c420, 0x3a8a3: 0x6ce5c620, + 0x3a8a4: 0x6ce5c820, 0x3a8a5: 0x6ce5ca20, 0x3a8a6: 0x6ce5cc20, 0x3a8a7: 0x6ce5ce20, + 0x3a8a8: 0x6ce5d020, 0x3a8a9: 0x6ce5d220, 0x3a8aa: 0x6ce5d420, 0x3a8ab: 0x6ce5d620, + 0x3a8ac: 0x6ce5d820, 0x3a8ad: 0x6ce5da20, 0x3a8ae: 0x6ce5dc20, 0x3a8af: 0x6ce5de20, + 0x3a8b0: 0x6ce5e020, 0x3a8b1: 0x6ce5e220, 0x3a8b2: 0x6ce5e420, 0x3a8b3: 0x6d143020, + 0x3a8b4: 0x6d143220, 0x3a8b5: 0x6d143420, 0x3a8b6: 0x6d143620, 0x3a8b7: 0x6d143820, + 0x3a8b8: 0x6d143a20, 0x3a8b9: 0x6d143c20, 0x3a8ba: 0x6d143e20, 0x3a8bb: 0x6d144020, + 0x3a8bc: 0x6d144220, 0x3a8bd: 0x6d144420, 0x3a8be: 0x6d144620, 0x3a8bf: 0x6d144820, + // Block 0xea3, offset 0x3a8c0 + 0x3a8c0: 0x6d144a20, 0x3a8c1: 0x6d144c20, 0x3a8c2: 0x6d144e20, 0x3a8c3: 0x6d145020, + 0x3a8c4: 0x6d145220, 0x3a8c5: 0x6d145420, 0x3a8c6: 0x6d145620, 0x3a8c7: 0x6d145820, + 0x3a8c8: 0x6d145a20, 0x3a8c9: 0x6d145c20, 0x3a8ca: 0x6d145e20, 0x3a8cb: 0x6d146020, + 0x3a8cc: 0x6d146220, 0x3a8cd: 0x6d422e20, 0x3a8ce: 0x6d423020, 0x3a8cf: 0x6d423220, + 0x3a8d0: 0x6d423420, 0x3a8d1: 0x6d423620, 0x3a8d2: 0x6d423820, 0x3a8d3: 0x6d423a20, + 0x3a8d4: 0x6d423c20, 0x3a8d5: 0x6d423e20, 0x3a8d6: 0x6d424020, 0x3a8d7: 0x6d424220, + 0x3a8d8: 0x6d424420, 0x3a8d9: 0x6d424620, 0x3a8da: 0x6d424820, 0x3a8db: 0x6d424a20, + 0x3a8dc: 0x6d424c20, 0x3a8dd: 0x6d424e20, 0x3a8de: 0x6d425020, 0x3a8df: 0x6d425220, + 0x3a8e0: 0x6d425420, 0x3a8e1: 0x6d425620, 0x3a8e2: 0x6d425820, 0x3a8e3: 0x6d425a20, + 0x3a8e4: 0x6d425c20, 0x3a8e5: 0x6d425e20, 0x3a8e6: 0x6d426020, 0x3a8e7: 0x6d6f3820, + 0x3a8e8: 0x6d6f3a20, 0x3a8e9: 0x6d6f3c20, 0x3a8ea: 0x6d6f3e20, 0x3a8eb: 0x6d6f4020, + 0x3a8ec: 0x6d6f4220, 0x3a8ed: 0x6d6f4420, 0x3a8ee: 0x6d6f4620, 0x3a8ef: 0x6d6f4820, + 0x3a8f0: 0x6d6f4a20, 0x3a8f1: 0x6d6f4c20, 0x3a8f2: 0x6d6f4e20, 0x3a8f3: 0x6d6f5020, + 0x3a8f4: 0x6d6f5220, 0x3a8f5: 0x6d6f5420, 0x3a8f6: 0x6d6f5620, 0x3a8f7: 0x6d6f5820, + 0x3a8f8: 0x6d6f5a20, 0x3a8f9: 0x6d6f5c20, 0x3a8fa: 0x6d6f5e20, 0x3a8fb: 0x6d6f6020, + 0x3a8fc: 0x6d6f6220, 0x3a8fd: 0x6d6f6420, 0x3a8fe: 0x6d6f6620, 0x3a8ff: 0x6d6f6820, + // Block 0xea4, offset 0x3a900 + 0x3a900: 0x6d6f6a20, 0x3a901: 0x6d6f6c20, 0x3a902: 0x6d6f6e20, 0x3a903: 0x6d6f7020, + 0x3a904: 0x6d6f7220, 0x3a905: 0x6d6f7420, 0x3a906: 0x6d6f7620, 0x3a907: 0x6d6f7820, + 0x3a908: 0x6d984e20, 0x3a909: 0x6d985020, 0x3a90a: 0x6d985220, 0x3a90b: 0x6d985420, + 0x3a90c: 0x6d985620, 0x3a90d: 0x6d985820, 0x3a90e: 0x6d985a20, 0x3a90f: 0x6d985c20, + 0x3a910: 0x6d985e20, 0x3a911: 0x6d986020, 0x3a912: 0x6d986220, 0x3a913: 0x6d986420, + 0x3a914: 0x6d986620, 0x3a915: 0x6d986820, 0x3a916: 0x6d986a20, 0x3a917: 0x6d986c20, + 0x3a918: 0x6d986e20, 0x3a919: 0x6d987020, 0x3a91a: 0x6d987220, 0x3a91b: 0x6d987420, + 0x3a91c: 0x6d987620, 0x3a91d: 0x6d987820, 0x3a91e: 0x6d987a20, 0x3a91f: 0x6d987c20, + 0x3a920: 0x6d987e20, 0x3a921: 0x6d988020, 0x3a922: 0x6d988220, 0x3a923: 0x6d988420, + 0x3a924: 0x6d988620, 0x3a925: 0x6dbb4e20, 0x3a926: 0x6dbb5020, 0x3a927: 0x6dbb5220, + 0x3a928: 0x6dbb5420, 0x3a929: 0x6dbb5620, 0x3a92a: 0x6dbb5820, 0x3a92b: 0x6dbb5a20, + 0x3a92c: 0x6dbb5c20, 0x3a92d: 0x6dbb5e20, 0x3a92e: 0x6dbb6020, 0x3a92f: 0x6dbb6220, + 0x3a930: 0x6dbb6420, 0x3a931: 0x6dbb6620, 0x3a932: 0x6dbb6820, 0x3a933: 0x6dbb6a20, + 0x3a934: 0x6dbb6c20, 0x3a935: 0x6dbb6e20, 0x3a936: 0x6dbb7020, 0x3a937: 0x6dbb7220, + 0x3a938: 0x6dbb7420, 0x3a939: 0x6dbb7620, 0x3a93a: 0x6dbb7820, 0x3a93b: 0x6dbb7a20, + 0x3a93c: 0x6dbb7c20, 0x3a93d: 0x6dbb7e20, 0x3a93e: 0x6dbb8020, 0x3a93f: 0x6dbb8220, + // Block 0xea5, offset 0x3a940 + 0x3a940: 0x6dd93220, 0x3a941: 0x6dd93420, 0x3a942: 0x6dd93620, 0x3a943: 0x6dd93820, + 0x3a944: 0x6dd93a20, 0x3a945: 0x6dd93c20, 0x3a946: 0x6dd93e20, 0x3a947: 0x6dd94020, + 0x3a948: 0x6dd94220, 0x3a949: 0x6dd94420, 0x3a94a: 0x6dd94620, 0x3a94b: 0x6dd94820, + 0x3a94c: 0x6dd94a20, 0x3a94d: 0x6dd94c20, 0x3a94e: 0x6dd94e20, 0x3a94f: 0x6dd95020, + 0x3a950: 0x6dd95220, 0x3a951: 0x6dd95420, 0x3a952: 0x6dd95620, 0x3a953: 0x6dd95820, + 0x3a954: 0x6dd95a20, 0x3a955: 0x6dd95c20, 0x3a956: 0x6dd95e20, 0x3a957: 0x6dd96020, + 0x3a958: 0x6dd96220, 0x3a959: 0x6dd96420, 0x3a95a: 0x6dd96620, 0x3a95b: 0x6dd96820, + 0x3a95c: 0x6df18020, 0x3a95d: 0x6df18220, 0x3a95e: 0x6df18420, 0x3a95f: 0x6df18620, + 0x3a960: 0x6df18820, 0x3a961: 0x6df18a20, 0x3a962: 0x6df18c20, 0x3a963: 0x6df18e20, + 0x3a964: 0x6df19020, 0x3a965: 0x6df19220, 0x3a966: 0x6df19420, 0x3a967: 0x6df19620, + 0x3a968: 0x6df19820, 0x3a969: 0x6df19a20, 0x3a96a: 0x6df19c20, 0x3a96b: 0x6df19e20, + 0x3a96c: 0x6e05aa20, 0x3a96d: 0x6e05ac20, 0x3a96e: 0x6e05ae20, 0x3a96f: 0x6e05b020, + 0x3a970: 0x6e05b220, 0x3a971: 0x6e05b420, 0x3a972: 0x6e05b620, 0x3a973: 0x6e05b820, + 0x3a974: 0x6e05ba20, 0x3a975: 0x6e05bc20, 0x3a976: 0x6e05be20, 0x3a977: 0x6e05c020, + 0x3a978: 0x6e05c220, 0x3a979: 0x6e05c420, 0x3a97a: 0x6e05c620, 0x3a97b: 0x6e05c820, + 0x3a97c: 0x6e05ca20, 0x3a97d: 0x6e05cc20, 0x3a97e: 0x6e05ce20, 0x3a97f: 0x6e05d020, + // Block 0xea6, offset 0x3a980 + 0x3a980: 0x6e05d220, 0x3a981: 0x6e05d420, 0x3a982: 0x6e05d620, 0x3a983: 0x6e166620, + 0x3a984: 0x6e166820, 0x3a985: 0x6e166a20, 0x3a986: 0x6e166c20, 0x3a987: 0x6e166e20, + 0x3a988: 0x6e167020, 0x3a989: 0x6e167220, 0x3a98a: 0x6e167420, 0x3a98b: 0x6e167620, + 0x3a98c: 0x6e167820, 0x3a98d: 0x6e167a20, 0x3a98e: 0x6e167c20, 0x3a98f: 0x6e167e20, + 0x3a990: 0x6e168020, 0x3a991: 0x6e168220, 0x3a992: 0x6e168420, 0x3a993: 0x6e168620, + 0x3a994: 0x6e23a820, 0x3a995: 0x6e168820, 0x3a996: 0x6e168a20, 0x3a997: 0x6e168c20, + 0x3a998: 0x6e23aa20, 0x3a999: 0x6e23ac20, 0x3a99a: 0x6e23ae20, 0x3a99b: 0x6e23b020, + 0x3a99c: 0x6e23b220, 0x3a99d: 0x6e23b420, 0x3a99e: 0x6e23b620, 0x3a99f: 0x6e2dbe20, + 0x3a9a0: 0x6e2dc020, 0x3a9a1: 0x6e2dc220, 0x3a9a2: 0x6e2dc420, 0x3a9a3: 0x6e2dc620, + 0x3a9a4: 0x6e2dc820, 0x3a9a5: 0x6e2dca20, 0x3a9a6: 0x6e356c20, 0x3a9a7: 0x6e356e20, + 0x3a9a8: 0x6e357020, 0x3a9a9: 0x6e357220, 0x3a9aa: 0x6e357420, 0x3a9ab: 0x6e357620, + 0x3a9ac: 0x6e357820, 0x3a9ad: 0x6e357a20, 0x3a9ae: 0x6e357c20, 0x3a9af: 0x6e3ae820, + 0x3a9b0: 0x6e3aea20, 0x3a9b1: 0x6e3aec20, 0x3a9b2: 0x6e3aee20, 0x3a9b3: 0x6e3af020, + 0x3a9b4: 0x6e3af220, 0x3a9b5: 0x6e3af420, 0x3a9b6: 0x6e357e20, 0x3a9b7: 0x6e3eb220, + 0x3a9b8: 0x6e3af620, 0x3a9b9: 0x6e3eb420, 0x3a9ba: 0x6e3eb620, 0x3a9bb: 0x6e416020, + 0x3a9bc: 0x6e44a420, 0x3a9bd: 0x6e464220, 0x3a9be: 0x6e464420, 0x3a9bf: 0x6c159a20, + // Block 0xea7, offset 0x3a9c0 + 0x3a9c0: 0x6c159c20, 0x3a9c1: 0x6c159e20, 0x3a9c2: 0x6c281420, 0x3a9c3: 0x6c281620, + 0x3a9c4: 0x6c62c620, 0x3a9c5: 0x6c62c820, 0x3a9c6: 0x6ce5f420, 0x3a9c7: 0x6ce5f620, + 0x3a9c8: 0x6ce5f820, 0x3a9c9: 0x6d147620, 0x3a9ca: 0x6d147820, 0x3a9cb: 0x6d6f8420, + 0x3a9cc: 0x6d6f8620, 0x3a9cd: 0x6dbb8820, 0x3a9ce: 0x6e05d820, 0x3a9cf: 0x6c00d020, + 0x3a9d0: 0x6c052820, 0x3a9d1: 0x6c052a20, 0x3a9d2: 0x6c052c20, 0x3a9d3: 0x6c052e20, + 0x3a9d4: 0x6c053020, 0x3a9d5: 0x6c053220, 0x3a9d6: 0x6c0ab820, 0x3a9d7: 0x6c0aba20, + 0x3a9d8: 0x6c0abc20, 0x3a9d9: 0x6c0abe20, 0x3a9da: 0x6c15b020, 0x3a9db: 0x6c15b220, + 0x3a9dc: 0x6c15b420, 0x3a9dd: 0x6c15b620, 0x3a9de: 0x6c15b820, 0x3a9df: 0x6c15ba20, + 0x3a9e0: 0x6c15bc20, 0x3a9e1: 0x6c15be20, 0x3a9e2: 0x6c15c020, 0x3a9e3: 0x6c15c220, + 0x3a9e4: 0x6c15c420, 0x3a9e5: 0x6c15c620, 0x3a9e6: 0x6c15c820, 0x3a9e7: 0x6c15ca20, + 0x3a9e8: 0x6c15cc20, 0x3a9e9: 0x6c15ce20, 0x3a9ea: 0x6c284a20, 0x3a9eb: 0x6c284c20, + 0x3a9ec: 0x6c284e20, 0x3a9ed: 0x6c285020, 0x3a9ee: 0x6c285220, 0x3a9ef: 0x6c285420, + 0x3a9f0: 0x6c285620, 0x3a9f1: 0x6c285820, 0x3a9f2: 0x6c285a20, 0x3a9f3: 0x6c285c20, + 0x3a9f4: 0x6c285e20, 0x3a9f5: 0x6c286020, 0x3a9f6: 0x6c286220, 0x3a9f7: 0x6c286420, + 0x3a9f8: 0x6c286620, 0x3a9f9: 0x6c286820, 0x3a9fa: 0x6c286a20, 0x3a9fb: 0x6c286c20, + 0x3a9fc: 0x6c286e20, 0x3a9fd: 0x6c287020, 0x3a9fe: 0x6c287220, 0x3a9ff: 0x6c287420, + // Block 0xea8, offset 0x3aa00 + 0x3aa00: 0x6c287620, 0x3aa01: 0x6c423e20, 0x3aa02: 0x6c424020, 0x3aa03: 0x6c424220, + 0x3aa04: 0x6c424420, 0x3aa05: 0x6c424620, 0x3aa06: 0x6c424820, 0x3aa07: 0x6c424a20, + 0x3aa08: 0x6c424c20, 0x3aa09: 0x6c424e20, 0x3aa0a: 0x6c425020, 0x3aa0b: 0x6c425220, + 0x3aa0c: 0x6c425420, 0x3aa0d: 0x6c425620, 0x3aa0e: 0x6c425820, 0x3aa0f: 0x6c425a20, + 0x3aa10: 0x6c425c20, 0x3aa11: 0x6c425e20, 0x3aa12: 0x6c426020, 0x3aa13: 0x6c426220, + 0x3aa14: 0x6c426420, 0x3aa15: 0x6c426620, 0x3aa16: 0x6c426820, 0x3aa17: 0x6c426a20, + 0x3aa18: 0x6c62ee20, 0x3aa19: 0x6c62f020, 0x3aa1a: 0x6c62f220, 0x3aa1b: 0x6c62f420, + 0x3aa1c: 0x6c62f620, 0x3aa1d: 0x6c62f820, 0x3aa1e: 0x6c62fa20, 0x3aa1f: 0x6c62fc20, + 0x3aa20: 0x6c62fe20, 0x3aa21: 0x6c630020, 0x3aa22: 0x6c630220, 0x3aa23: 0x6c630420, + 0x3aa24: 0x6c630620, 0x3aa25: 0x6c630820, 0x3aa26: 0x6c630a20, 0x3aa27: 0x6c630c20, + 0x3aa28: 0x6c630e20, 0x3aa29: 0x6c631020, 0x3aa2a: 0x6c631220, 0x3aa2b: 0x6c631420, + 0x3aa2c: 0x6c631620, 0x3aa2d: 0x6c631820, 0x3aa2e: 0x6c631a20, 0x3aa2f: 0x6c631c20, + 0x3aa30: 0x6c631e20, 0x3aa31: 0x6c632020, 0x3aa32: 0x6c632220, 0x3aa33: 0x6c632420, + 0x3aa34: 0x6c6bf420, 0x3aa35: 0x6c89da20, 0x3aa36: 0x6c89dc20, 0x3aa37: 0x6c89de20, + 0x3aa38: 0x6c89e020, 0x3aa39: 0x6c89e220, 0x3aa3a: 0x6c89e420, 0x3aa3b: 0x6c89e620, + 0x3aa3c: 0x6c89e820, 0x3aa3d: 0x6c89ea20, 0x3aa3e: 0x6c89ec20, 0x3aa3f: 0x6c89ee20, + // Block 0xea9, offset 0x3aa40 + 0x3aa40: 0x6c89f020, 0x3aa41: 0x6c89f220, 0x3aa42: 0x6c89f420, 0x3aa43: 0x6c89f620, + 0x3aa44: 0x6c89f820, 0x3aa45: 0x6c89fa20, 0x3aa46: 0x6c89fc20, 0x3aa47: 0x6c89fe20, + 0x3aa48: 0x6c8a0020, 0x3aa49: 0x6c8a0220, 0x3aa4a: 0x6c8a0420, 0x3aa4b: 0x6c8a0620, + 0x3aa4c: 0x6c8a0820, 0x3aa4d: 0x6c8a0a20, 0x3aa4e: 0x6c8a0c20, 0x3aa4f: 0x6c8a0e20, + 0x3aa50: 0x6c8a1020, 0x3aa51: 0x6c8a1220, 0x3aa52: 0x6c8a1420, 0x3aa53: 0x6c8a1620, + 0x3aa54: 0x6c8a1820, 0x3aa55: 0x6c8a1a20, 0x3aa56: 0x6c8a1c20, 0x3aa57: 0x6c8a1e20, + 0x3aa58: 0x6c8a2020, 0x3aa59: 0x6c8a2220, 0x3aa5a: 0x6c8a2420, 0x3aa5b: 0x6c8a2620, + 0x3aa5c: 0x6c8a2820, 0x3aa5d: 0x6c8a2a20, 0x3aa5e: 0x6cb60a20, 0x3aa5f: 0x6cb60c20, + 0x3aa60: 0x6cb60e20, 0x3aa61: 0x6cb61020, 0x3aa62: 0x6cb61220, 0x3aa63: 0x6cb61420, + 0x3aa64: 0x6cb61620, 0x3aa65: 0x6cb61820, 0x3aa66: 0x6cb61a20, 0x3aa67: 0x6cb61c20, + 0x3aa68: 0x6cb61e20, 0x3aa69: 0x6cb62020, 0x3aa6a: 0x6cb62220, 0x3aa6b: 0x6cb62420, + 0x3aa6c: 0x6cb62620, 0x3aa6d: 0x6cb62820, 0x3aa6e: 0x6cb62a20, 0x3aa6f: 0x6cb62c20, + 0x3aa70: 0x6cb62e20, 0x3aa71: 0x6cb63020, 0x3aa72: 0x6cb63220, 0x3aa73: 0x6cb63420, + 0x3aa74: 0x6cb63620, 0x3aa75: 0x6cb63820, 0x3aa76: 0x6cb63a20, 0x3aa77: 0x6cb63c20, + 0x3aa78: 0x6cb63e20, 0x3aa79: 0x6cb64020, 0x3aa7a: 0x6cb64220, 0x3aa7b: 0x6cb64420, + 0x3aa7c: 0x6cb64620, 0x3aa7d: 0x6cb64820, 0x3aa7e: 0x6cb64a20, 0x3aa7f: 0x6cb64c20, + // Block 0xeaa, offset 0x3aa80 + 0x3aa80: 0x6ce62a20, 0x3aa81: 0x6ce62c20, 0x3aa82: 0x6ce62e20, 0x3aa83: 0x6ce63020, + 0x3aa84: 0x6ce63220, 0x3aa85: 0x6ce63420, 0x3aa86: 0x6ce63620, 0x3aa87: 0x6ce63820, + 0x3aa88: 0x6ce63a20, 0x3aa89: 0x6ce63c20, 0x3aa8a: 0x6ce63e20, 0x3aa8b: 0x6ce64020, + 0x3aa8c: 0x6ce64220, 0x3aa8d: 0x6ce64420, 0x3aa8e: 0x6ce64620, 0x3aa8f: 0x6ce64820, + 0x3aa90: 0x6ce64a20, 0x3aa91: 0x6ce64c20, 0x3aa92: 0x6ce64e20, 0x3aa93: 0x6ce65020, + 0x3aa94: 0x6ce65220, 0x3aa95: 0x6ce65420, 0x3aa96: 0x6ce65620, 0x3aa97: 0x6ce65820, + 0x3aa98: 0x6ce65a20, 0x3aa99: 0x6ce65c20, 0x3aa9a: 0x6ce65e20, 0x3aa9b: 0x6ce66020, + 0x3aa9c: 0x6ce66220, 0x3aa9d: 0x6ce66420, 0x3aa9e: 0x6ce66620, 0x3aa9f: 0x6ce66820, + 0x3aaa0: 0x6ce66a20, 0x3aaa1: 0x6ce66c20, 0x3aaa2: 0x6ce66e20, 0x3aaa3: 0x6ce67020, + 0x3aaa4: 0x6ce67220, 0x3aaa5: 0x6ce67420, 0x3aaa6: 0x6ce67620, 0x3aaa7: 0x6ce67820, + 0x3aaa8: 0x6ce67a20, 0x3aaa9: 0x6ce67c20, 0x3aaaa: 0x6ce67e20, 0x3aaab: 0x6ce68020, + 0x3aaac: 0x6ce68220, 0x3aaad: 0x6ce68420, 0x3aaae: 0x6d149e20, 0x3aaaf: 0x6d14a020, + 0x3aab0: 0x6d14a220, 0x3aab1: 0x6d14a420, 0x3aab2: 0x6d14a620, 0x3aab3: 0x6d14a820, + 0x3aab4: 0x6d14aa20, 0x3aab5: 0x6d14ac20, 0x3aab6: 0x6d14ae20, 0x3aab7: 0x6d14b020, + 0x3aab8: 0x6d14b220, 0x3aab9: 0x6d14b420, 0x3aaba: 0x6d14b620, 0x3aabb: 0x6d14b820, + 0x3aabc: 0x6d14ba20, 0x3aabd: 0x6d14bc20, 0x3aabe: 0x6d14be20, 0x3aabf: 0x6d14c020, + // Block 0xeab, offset 0x3aac0 + 0x3aac0: 0x6d14c220, 0x3aac1: 0x6d14c420, 0x3aac2: 0x6d14c620, 0x3aac3: 0x6d14c820, + 0x3aac4: 0x6d14ca20, 0x3aac5: 0x6d14cc20, 0x3aac6: 0x6d14ce20, 0x3aac7: 0x6d14d020, + 0x3aac8: 0x6d14d220, 0x3aac9: 0x6d14d420, 0x3aaca: 0x6d428420, 0x3aacb: 0x6d428620, + 0x3aacc: 0x6d428820, 0x3aacd: 0x6d428a20, 0x3aace: 0x6d428c20, 0x3aacf: 0x6d428e20, + 0x3aad0: 0x6d429020, 0x3aad1: 0x6d429220, 0x3aad2: 0x6d429420, 0x3aad3: 0x6d429620, + 0x3aad4: 0x6d429820, 0x3aad5: 0x6d429a20, 0x3aad6: 0x6d429c20, 0x3aad7: 0x6d429e20, + 0x3aad8: 0x6d42a020, 0x3aad9: 0x6d42a220, 0x3aada: 0x6d42a420, 0x3aadb: 0x6d42a620, + 0x3aadc: 0x6d42a820, 0x3aadd: 0x6d42aa20, 0x3aade: 0x6d42ac20, 0x3aadf: 0x6d42ae20, + 0x3aae0: 0x6d42b020, 0x3aae1: 0x6d42b220, 0x3aae2: 0x6d42b420, 0x3aae3: 0x6d42b620, + 0x3aae4: 0x6d42b820, 0x3aae5: 0x6d42ba20, 0x3aae6: 0x6d42bc20, 0x3aae7: 0x6d42be20, + 0x3aae8: 0x6d42c020, 0x3aae9: 0x6d42c220, 0x3aaea: 0x6d6f9820, 0x3aaeb: 0x6d6f9a20, + 0x3aaec: 0x6d6f9c20, 0x3aaed: 0x6d6f9e20, 0x3aaee: 0x6d6fa020, 0x3aaef: 0x6d6fa220, + 0x3aaf0: 0x6d6fa420, 0x3aaf1: 0x6d6fa620, 0x3aaf2: 0x6d6fa820, 0x3aaf3: 0x6d6faa20, + 0x3aaf4: 0x6d6fac20, 0x3aaf5: 0x6d6fae20, 0x3aaf6: 0x6d6fb020, 0x3aaf7: 0x6d6fb220, + 0x3aaf8: 0x6d6fb420, 0x3aaf9: 0x6d6fb620, 0x3aafa: 0x6d6fb820, 0x3aafb: 0x6d6fba20, + 0x3aafc: 0x6d6fbc20, 0x3aafd: 0x6d6fbe20, 0x3aafe: 0x6d6fc020, 0x3aaff: 0x6d98a420, + // Block 0xeac, offset 0x3ab00 + 0x3ab00: 0x6d98a620, 0x3ab01: 0x6d98a820, 0x3ab02: 0x6d98aa20, 0x3ab03: 0x6d98ac20, + 0x3ab04: 0x6d98ae20, 0x3ab05: 0x6d98b020, 0x3ab06: 0x6d98b220, 0x3ab07: 0x6d98b420, + 0x3ab08: 0x6d98b620, 0x3ab09: 0x6d98b820, 0x3ab0a: 0x6d98ba20, 0x3ab0b: 0x6d98bc20, + 0x3ab0c: 0x6d98be20, 0x3ab0d: 0x6dbba020, 0x3ab0e: 0x6dbba220, 0x3ab0f: 0x6dbba420, + 0x3ab10: 0x6dbba620, 0x3ab11: 0x6dbba820, 0x3ab12: 0x6dbbaa20, 0x3ab13: 0x6dbbac20, + 0x3ab14: 0x6dbbae20, 0x3ab15: 0x6dbbb020, 0x3ab16: 0x6dd96c20, 0x3ab17: 0x6dd96e20, + 0x3ab18: 0x6dd97020, 0x3ab19: 0x6dd97220, 0x3ab1a: 0x6dd97420, 0x3ab1b: 0x6dd97620, + 0x3ab1c: 0x6dd97820, 0x3ab1d: 0x6dd97a20, 0x3ab1e: 0x6dd97c20, 0x3ab1f: 0x6dd97e20, + 0x3ab20: 0x6dd98020, 0x3ab21: 0x6dd98220, 0x3ab22: 0x6df1a620, 0x3ab23: 0x6df1a820, + 0x3ab24: 0x6df1aa20, 0x3ab25: 0x6df1ac20, 0x3ab26: 0x6e05de20, 0x3ab27: 0x6e05e020, + 0x3ab28: 0x6e05e220, 0x3ab29: 0x6e05e420, 0x3ab2a: 0x6e05e620, 0x3ab2b: 0x6e05e820, + 0x3ab2c: 0x6e169220, 0x3ab2d: 0x6e169420, 0x3ab2e: 0x6e23b820, 0x3ab2f: 0x6e23ba20, + 0x3ab30: 0x6e2dcc20, 0x3ab31: 0x6e2dce20, 0x3ab32: 0x6e3eb820, 0x3ab33: 0x6e3eba20, + 0x3ab34: 0x6e416220, 0x3ab35: 0x6e416420, 0x3ab36: 0x6d14de20, 0x3ab37: 0x6d42cc20, + 0x3ab38: 0x6d6fc220, 0x3ab39: 0x6d6fc420, 0x3ab3a: 0x6d6fc620, 0x3ab3b: 0x6d6fc820, + 0x3ab3c: 0x6d98c220, 0x3ab3d: 0x6d98c420, 0x3ab3e: 0x6d98c620, 0x3ab3f: 0x6dbbb420, + // Block 0xead, offset 0x3ab40 + 0x3ab40: 0x6dd98620, 0x3ab41: 0x6dd98820, 0x3ab42: 0x6e05ea20, 0x3ab43: 0x6e05ec20, + 0x3ab44: 0x6e23bc20, 0x3ab45: 0x6c8a3c20, 0x3ab46: 0x6c8a3e20, 0x3ab47: 0x6c8a4020, + 0x3ab48: 0x6cb66820, 0x3ab49: 0x6cb66a20, 0x3ab4a: 0x6cb66c20, 0x3ab4b: 0x6cb66e20, + 0x3ab4c: 0x6cb67020, 0x3ab4d: 0x6cb67220, 0x3ab4e: 0x6cb67420, 0x3ab4f: 0x6cb67620, + 0x3ab50: 0x6cb67820, 0x3ab51: 0x6cb67a20, 0x3ab52: 0x6ce6a020, 0x3ab53: 0x6ce6a220, + 0x3ab54: 0x6ce6a420, 0x3ab55: 0x6ce6a620, 0x3ab56: 0x6ce6a820, 0x3ab57: 0x6ce6aa20, + 0x3ab58: 0x6ce6ac20, 0x3ab59: 0x6ce6ae20, 0x3ab5a: 0x6ce6b020, 0x3ab5b: 0x6ce6b220, + 0x3ab5c: 0x6ce6b420, 0x3ab5d: 0x6ce6b620, 0x3ab5e: 0x6ce6b820, 0x3ab5f: 0x6ce6ba20, + 0x3ab60: 0x6d14f420, 0x3ab61: 0x6d14f620, 0x3ab62: 0x6d14f820, 0x3ab63: 0x6d14fa20, + 0x3ab64: 0x6d14fc20, 0x3ab65: 0x6d14fe20, 0x3ab66: 0x6d150020, 0x3ab67: 0x6d150220, + 0x3ab68: 0x6d150420, 0x3ab69: 0x6d150620, 0x3ab6a: 0x6d150820, 0x3ab6b: 0x6d150a20, + 0x3ab6c: 0x6d150c20, 0x3ab6d: 0x6d150e20, 0x3ab6e: 0x6d151020, 0x3ab6f: 0x6d151220, + 0x3ab70: 0x6d151420, 0x3ab71: 0x6d151620, 0x3ab72: 0x6d42d820, 0x3ab73: 0x6d42da20, + 0x3ab74: 0x6d42dc20, 0x3ab75: 0x6d42de20, 0x3ab76: 0x6d42e020, 0x3ab77: 0x6d42e220, + 0x3ab78: 0x6d42e420, 0x3ab79: 0x6d42e620, 0x3ab7a: 0x6d42e820, 0x3ab7b: 0x6d42ea20, + 0x3ab7c: 0x6d42ec20, 0x3ab7d: 0x6d42ee20, 0x3ab7e: 0x6d42f020, 0x3ab7f: 0x6d42f220, + // Block 0xeae, offset 0x3ab80 + 0x3ab80: 0x6d42f420, 0x3ab81: 0x6d42f620, 0x3ab82: 0x6d42f820, 0x3ab83: 0x6d42fa20, + 0x3ab84: 0x6d42fc20, 0x3ab85: 0x6d42fe20, 0x3ab86: 0x6d430020, 0x3ab87: 0x6d430220, + 0x3ab88: 0x6d430420, 0x3ab89: 0x6d430620, 0x3ab8a: 0x6d430820, 0x3ab8b: 0x6d6fd220, + 0x3ab8c: 0x6d6fd420, 0x3ab8d: 0x6d6fd620, 0x3ab8e: 0x6d6fd820, 0x3ab8f: 0x6d6fda20, + 0x3ab90: 0x6d6fdc20, 0x3ab91: 0x6d6fde20, 0x3ab92: 0x6d6fe020, 0x3ab93: 0x6d6fe220, + 0x3ab94: 0x6d6fe420, 0x3ab95: 0x6d6fe620, 0x3ab96: 0x6d6fe820, 0x3ab97: 0x6d6fea20, + 0x3ab98: 0x6d6fec20, 0x3ab99: 0x6d6fee20, 0x3ab9a: 0x6d6ff020, 0x3ab9b: 0x6d6ff220, + 0x3ab9c: 0x6d6ff420, 0x3ab9d: 0x6d6ff620, 0x3ab9e: 0x6d6ff820, 0x3ab9f: 0x6d6ffa20, + 0x3aba0: 0x6d98d020, 0x3aba1: 0x6d98d220, 0x3aba2: 0x6d98d420, 0x3aba3: 0x6d98d620, + 0x3aba4: 0x6d98d820, 0x3aba5: 0x6d98da20, 0x3aba6: 0x6d98dc20, 0x3aba7: 0x6d98de20, + 0x3aba8: 0x6d98e020, 0x3aba9: 0x6d98e220, 0x3abaa: 0x6d98e420, 0x3abab: 0x6d98e620, + 0x3abac: 0x6d98e820, 0x3abad: 0x6d98ea20, 0x3abae: 0x6d98ec20, 0x3abaf: 0x6d98ee20, + 0x3abb0: 0x6d98f020, 0x3abb1: 0x6d98f220, 0x3abb2: 0x6d98f420, 0x3abb3: 0x6d98f620, + 0x3abb4: 0x6d98f820, 0x3abb5: 0x6d98fa20, 0x3abb6: 0x6d98fc20, 0x3abb7: 0x6d98fe20, + 0x3abb8: 0x6d990020, 0x3abb9: 0x6d990220, 0x3abba: 0x6d990420, 0x3abbb: 0x6d990620, + 0x3abbc: 0x6d990820, 0x3abbd: 0x6d990a20, 0x3abbe: 0x6d990c20, 0x3abbf: 0x6dbbbc20, + // Block 0xeaf, offset 0x3abc0 + 0x3abc0: 0x6dbbbe20, 0x3abc1: 0x6dbbc020, 0x3abc2: 0x6dbbc220, 0x3abc3: 0x6dbbc420, + 0x3abc4: 0x6dbbc620, 0x3abc5: 0x6dbbc820, 0x3abc6: 0x6dbbca20, 0x3abc7: 0x6dbbcc20, + 0x3abc8: 0x6dbbce20, 0x3abc9: 0x6dbbd020, 0x3abca: 0x6dbbd220, 0x3abcb: 0x6dbbd420, + 0x3abcc: 0x6dbbd620, 0x3abcd: 0x6dbbd820, 0x3abce: 0x6dbbda20, 0x3abcf: 0x6dbbdc20, + 0x3abd0: 0x6dbbde20, 0x3abd1: 0x6dbbe020, 0x3abd2: 0x6dbbe220, 0x3abd3: 0x6dbbe420, + 0x3abd4: 0x6dbbe620, 0x3abd5: 0x6dbbe820, 0x3abd6: 0x6dbbea20, 0x3abd7: 0x6dd9a020, + 0x3abd8: 0x6dd9a220, 0x3abd9: 0x6dd9a420, 0x3abda: 0x6dd9a620, 0x3abdb: 0x6dd9a820, + 0x3abdc: 0x6dd9aa20, 0x3abdd: 0x6dd9ac20, 0x3abde: 0x6dd9ae20, 0x3abdf: 0x6dd9b020, + 0x3abe0: 0x6dd9b220, 0x3abe1: 0x6dd9b420, 0x3abe2: 0x6dd9b620, 0x3abe3: 0x6dd9b820, + 0x3abe4: 0x6df1b420, 0x3abe5: 0x6df1b620, 0x3abe6: 0x6df1b820, 0x3abe7: 0x6df1ba20, + 0x3abe8: 0x6df1bc20, 0x3abe9: 0x6df1be20, 0x3abea: 0x6df1c020, 0x3abeb: 0x6df1c220, + 0x3abec: 0x6df1c420, 0x3abed: 0x6df1c620, 0x3abee: 0x6df1c820, 0x3abef: 0x6df1ca20, + 0x3abf0: 0x6df1cc20, 0x3abf1: 0x6df1ce20, 0x3abf2: 0x6df1d020, 0x3abf3: 0x6df1d220, + 0x3abf4: 0x6e05f420, 0x3abf5: 0x6e05f620, 0x3abf6: 0x6e05f820, 0x3abf7: 0x6e05fa20, + 0x3abf8: 0x6e05fc20, 0x3abf9: 0x6e05fe20, 0x3abfa: 0x6e060020, 0x3abfb: 0x6e060220, + 0x3abfc: 0x6e060420, 0x3abfd: 0x6e060620, 0x3abfe: 0x6e060820, 0x3abff: 0x6e060a20, + // Block 0xeb0, offset 0x3ac00 + 0x3ac00: 0x6e060c20, 0x3ac01: 0x6e060e20, 0x3ac02: 0x6e061020, 0x3ac03: 0x6e061220, + 0x3ac04: 0x6e061420, 0x3ac05: 0x6e061620, 0x3ac06: 0x6e061820, 0x3ac07: 0x6e169820, + 0x3ac08: 0x6e169a20, 0x3ac09: 0x6e169c20, 0x3ac0a: 0x6e169e20, 0x3ac0b: 0x6e16a020, + 0x3ac0c: 0x6e16a220, 0x3ac0d: 0x6e16a420, 0x3ac0e: 0x6e16a620, 0x3ac0f: 0x6e16a820, + 0x3ac10: 0x6e16aa20, 0x3ac11: 0x6e16ac20, 0x3ac12: 0x6e16ae20, 0x3ac13: 0x6e23c020, + 0x3ac14: 0x6e23c220, 0x3ac15: 0x6e23c420, 0x3ac16: 0x6e23c620, 0x3ac17: 0x6e23c820, + 0x3ac18: 0x6e23ca20, 0x3ac19: 0x6e23cc20, 0x3ac1a: 0x6e23ce20, 0x3ac1b: 0x6e23d020, + 0x3ac1c: 0x6e2dd020, 0x3ac1d: 0x6e2dd220, 0x3ac1e: 0x6e2dd420, 0x3ac1f: 0x6e2dd620, + 0x3ac20: 0x6e2dd820, 0x3ac21: 0x6e2dda20, 0x3ac22: 0x6e2ddc20, 0x3ac23: 0x6e2dde20, + 0x3ac24: 0x6e2de020, 0x3ac25: 0x6e2de220, 0x3ac26: 0x6e2de420, 0x3ac27: 0x6e358420, + 0x3ac28: 0x6e358620, 0x3ac29: 0x6e358820, 0x3ac2a: 0x6e358a20, 0x3ac2b: 0x6e358c20, + 0x3ac2c: 0x6e3afc20, 0x3ac2d: 0x6e3afe20, 0x3ac2e: 0x6e3b0020, 0x3ac2f: 0x6e3ebc20, + 0x3ac30: 0x6e3ebe20, 0x3ac31: 0x6e3ec020, 0x3ac32: 0x6e435e20, 0x3ac33: 0x6e436020, + 0x3ac34: 0x6e464820, 0x3ac35: 0x6e46ee20, 0x3ac36: 0x6c632c20, 0x3ac37: 0x6c8a4220, + 0x3ac38: 0x6c8a4420, 0x3ac39: 0x6cb68420, 0x3ac3a: 0x6cb68620, 0x3ac3b: 0x6cb68820, + 0x3ac3c: 0x6cb68a20, 0x3ac3d: 0x6cb68c20, 0x3ac3e: 0x6cb68e20, 0x3ac3f: 0x6cb69020, + // Block 0xeb1, offset 0x3ac40 + 0x3ac40: 0x6cb69220, 0x3ac41: 0x6cb69420, 0x3ac42: 0x6ce6d220, 0x3ac43: 0x6ce6d420, + 0x3ac44: 0x6ce6d620, 0x3ac45: 0x6ce6d820, 0x3ac46: 0x6ce6da20, 0x3ac47: 0x6ce6dc20, + 0x3ac48: 0x6ce6de20, 0x3ac49: 0x6ce6e020, 0x3ac4a: 0x6ce6e220, 0x3ac4b: 0x6ce6e420, + 0x3ac4c: 0x6ce6e620, 0x3ac4d: 0x6ce6e820, 0x3ac4e: 0x6ce6ea20, 0x3ac4f: 0x6ce6ec20, + 0x3ac50: 0x6ce6ee20, 0x3ac51: 0x6ce6f020, 0x3ac52: 0x6d153020, 0x3ac53: 0x6d153220, + 0x3ac54: 0x6d153420, 0x3ac55: 0x6d153620, 0x3ac56: 0x6d153820, 0x3ac57: 0x6d153a20, + 0x3ac58: 0x6d153c20, 0x3ac59: 0x6d153e20, 0x3ac5a: 0x6d154020, 0x3ac5b: 0x6d154220, + 0x3ac5c: 0x6d154420, 0x3ac5d: 0x6d154620, 0x3ac5e: 0x6d154820, 0x3ac5f: 0x6d154a20, + 0x3ac60: 0x6d154c20, 0x3ac61: 0x6d154e20, 0x3ac62: 0x6d432220, 0x3ac63: 0x6d432420, + 0x3ac64: 0x6d432620, 0x3ac65: 0x6d432820, 0x3ac66: 0x6d432a20, 0x3ac67: 0x6d432c20, + 0x3ac68: 0x6d432e20, 0x3ac69: 0x6d433020, 0x3ac6a: 0x6d433220, 0x3ac6b: 0x6d433420, + 0x3ac6c: 0x6d433620, 0x3ac6d: 0x6d433820, 0x3ac6e: 0x6d433a20, 0x3ac6f: 0x6d433c20, + 0x3ac70: 0x6d433e20, 0x3ac71: 0x6d434020, 0x3ac72: 0x6d434220, 0x3ac73: 0x6d434420, + 0x3ac74: 0x6d434620, 0x3ac75: 0x6d434820, 0x3ac76: 0x6d434a20, 0x3ac77: 0x6d701420, + 0x3ac78: 0x6d701620, 0x3ac79: 0x6d701820, 0x3ac7a: 0x6d701a20, 0x3ac7b: 0x6d701c20, + 0x3ac7c: 0x6d701e20, 0x3ac7d: 0x6d702020, 0x3ac7e: 0x6d702220, 0x3ac7f: 0x6d702420, + // Block 0xeb2, offset 0x3ac80 + 0x3ac80: 0x6d702620, 0x3ac81: 0x6d702820, 0x3ac82: 0x6d702a20, 0x3ac83: 0x6d702c20, + 0x3ac84: 0x6d702e20, 0x3ac85: 0x6d703020, 0x3ac86: 0x6d703220, 0x3ac87: 0x6d703420, + 0x3ac88: 0x6d703620, 0x3ac89: 0x6d703820, 0x3ac8a: 0x6d703a20, 0x3ac8b: 0x6d703c20, + 0x3ac8c: 0x6d703e20, 0x3ac8d: 0x6d704020, 0x3ac8e: 0x6d704220, 0x3ac8f: 0x6d704420, + 0x3ac90: 0x6d704620, 0x3ac91: 0x6d704820, 0x3ac92: 0x6d993020, 0x3ac93: 0x6d993220, + 0x3ac94: 0x6d993420, 0x3ac95: 0x6d993620, 0x3ac96: 0x6d993820, 0x3ac97: 0x6d993a20, + 0x3ac98: 0x6d993c20, 0x3ac99: 0x6d993e20, 0x3ac9a: 0x6d994020, 0x3ac9b: 0x6d994220, + 0x3ac9c: 0x6d994420, 0x3ac9d: 0x6d994620, 0x3ac9e: 0x6d994820, 0x3ac9f: 0x6d994a20, + 0x3aca0: 0x6d994c20, 0x3aca1: 0x6d994e20, 0x3aca2: 0x6d995020, 0x3aca3: 0x6d995220, + 0x3aca4: 0x6d995420, 0x3aca5: 0x6d995620, 0x3aca6: 0x6d995820, 0x3aca7: 0x6d995a20, + 0x3aca8: 0x6d995c20, 0x3aca9: 0x6d995e20, 0x3acaa: 0x6d996020, 0x3acab: 0x6d996220, + 0x3acac: 0x6d996420, 0x3acad: 0x6d996620, 0x3acae: 0x6d996820, 0x3acaf: 0x6d996a20, + 0x3acb0: 0x6d996c20, 0x3acb1: 0x6d996e20, 0x3acb2: 0x6d997020, 0x3acb3: 0x6d997220, + 0x3acb4: 0x6d997420, 0x3acb5: 0x6dbc0c20, 0x3acb6: 0x6dbc0e20, 0x3acb7: 0x6dbc1020, + 0x3acb8: 0x6dbc1220, 0x3acb9: 0x6dbc1420, 0x3acba: 0x6dbc1620, 0x3acbb: 0x6dbc1820, + 0x3acbc: 0x6dbc1a20, 0x3acbd: 0x6dbc1c20, 0x3acbe: 0x6dd9d220, 0x3acbf: 0x6dbc1e20, + // Block 0xeb3, offset 0x3acc0 + 0x3acc0: 0x6dbc2020, 0x3acc1: 0x6dbc2220, 0x3acc2: 0x6dbc2420, 0x3acc3: 0x6dbc2620, + 0x3acc4: 0x6dbc2820, 0x3acc5: 0x6dbc2a20, 0x3acc6: 0x6dbc2c20, 0x3acc7: 0x6dbc2e20, + 0x3acc8: 0x6dbc3020, 0x3acc9: 0x6dbc3220, 0x3acca: 0x6dbc3420, 0x3accb: 0x6dbc3620, + 0x3accc: 0x6dbc3820, 0x3accd: 0x6dbc3a20, 0x3acce: 0x6dbc3c20, 0x3accf: 0x6dbc3e20, + 0x3acd0: 0x6dbc4020, 0x3acd1: 0x6dbc4220, 0x3acd2: 0x6dbc4420, 0x3acd3: 0x6dbc4620, + 0x3acd4: 0x6dbc4820, 0x3acd5: 0x6dbc4a20, 0x3acd6: 0x6dbc4c20, 0x3acd7: 0x6dd9d420, + 0x3acd8: 0x6dd9d620, 0x3acd9: 0x6dd9d820, 0x3acda: 0x6dd9da20, 0x3acdb: 0x6dd9dc20, + 0x3acdc: 0x6dd9de20, 0x3acdd: 0x6dd9e020, 0x3acde: 0x6dd9e220, 0x3acdf: 0x6dd9e420, + 0x3ace0: 0x6dd9e620, 0x3ace1: 0x6dd9e820, 0x3ace2: 0x6dd9ea20, 0x3ace3: 0x6dd9ec20, + 0x3ace4: 0x6dd9ee20, 0x3ace5: 0x6dd9f020, 0x3ace6: 0x6dd9f220, 0x3ace7: 0x6dd9f420, + 0x3ace8: 0x6dd9f620, 0x3ace9: 0x6dd9f820, 0x3acea: 0x6dd9fa20, 0x3aceb: 0x6dd9fc20, + 0x3acec: 0x6dd9fe20, 0x3aced: 0x6dda0020, 0x3acee: 0x6db8fa20, 0x3acef: 0x6dda0220, + 0x3acf0: 0x6dda0420, 0x3acf1: 0x6dda0620, 0x3acf2: 0x6dda0820, 0x3acf3: 0x6dda0a20, + 0x3acf4: 0x6dda0c20, 0x3acf5: 0x6dda0e20, 0x3acf6: 0x6dda1020, 0x3acf7: 0x6dda1220, + 0x3acf8: 0x6dda1420, 0x3acf9: 0x6dda1620, 0x3acfa: 0x6dda1820, 0x3acfb: 0x6df1ee20, + 0x3acfc: 0x6df1f020, 0x3acfd: 0x6df1f220, 0x3acfe: 0x6df1f420, 0x3acff: 0x6df1f620, + // Block 0xeb4, offset 0x3ad00 + 0x3ad00: 0x6df1f820, 0x3ad01: 0x6df1fa20, 0x3ad02: 0x6df1fc20, 0x3ad03: 0x6df1fe20, + 0x3ad04: 0x6df20020, 0x3ad05: 0x6df20220, 0x3ad06: 0x6df20420, 0x3ad07: 0x6df20620, + 0x3ad08: 0x6df20820, 0x3ad09: 0x6df20a20, 0x3ad0a: 0x6df20c20, 0x3ad0b: 0x6df20e20, + 0x3ad0c: 0x6df21020, 0x3ad0d: 0x6df21220, 0x3ad0e: 0x6df21420, 0x3ad0f: 0x6df21620, + 0x3ad10: 0x6df21820, 0x3ad11: 0x6df21a20, 0x3ad12: 0x6df21c20, 0x3ad13: 0x6df21e20, + 0x3ad14: 0x6df22020, 0x3ad15: 0x6df22220, 0x3ad16: 0x6df22420, 0x3ad17: 0x6df22620, + 0x3ad18: 0x6df22820, 0x3ad19: 0x6df22a20, 0x3ad1a: 0x6df22c20, 0x3ad1b: 0x6df22e20, + 0x3ad1c: 0x6df23020, 0x3ad1d: 0x6e062a20, 0x3ad1e: 0x6e062c20, 0x3ad1f: 0x6e062e20, + 0x3ad20: 0x6e063020, 0x3ad21: 0x6e063220, 0x3ad22: 0x6e063420, 0x3ad23: 0x6e063620, + 0x3ad24: 0x6e063820, 0x3ad25: 0x6e063a20, 0x3ad26: 0x6e063c20, 0x3ad27: 0x6e063e20, + 0x3ad28: 0x6e064020, 0x3ad29: 0x6e064220, 0x3ad2a: 0x6e064420, 0x3ad2b: 0x6e064620, + 0x3ad2c: 0x6e064820, 0x3ad2d: 0x6e064a20, 0x3ad2e: 0x6e064c20, 0x3ad2f: 0x6e064e20, + 0x3ad30: 0x6e065020, 0x3ad31: 0x6e065220, 0x3ad32: 0x6e065420, 0x3ad33: 0x6e065620, + 0x3ad34: 0x6e065820, 0x3ad35: 0x6e065a20, 0x3ad36: 0x6e065c20, 0x3ad37: 0x6e065e20, + 0x3ad38: 0x6e066020, 0x3ad39: 0x6e066220, 0x3ad3a: 0x6e066420, 0x3ad3b: 0x6e066620, + 0x3ad3c: 0x6e16c020, 0x3ad3d: 0x6e16c220, 0x3ad3e: 0x6e16c420, 0x3ad3f: 0x6e16c620, + // Block 0xeb5, offset 0x3ad40 + 0x3ad40: 0x6e16c820, 0x3ad41: 0x6e16ca20, 0x3ad42: 0x6e16cc20, 0x3ad43: 0x6e16ce20, + 0x3ad44: 0x6e16d020, 0x3ad45: 0x6e16d220, 0x3ad46: 0x6e16d420, 0x3ad47: 0x6e16d620, + 0x3ad48: 0x6e16d820, 0x3ad49: 0x6e16da20, 0x3ad4a: 0x6e16dc20, 0x3ad4b: 0x6e16de20, + 0x3ad4c: 0x6e16e020, 0x3ad4d: 0x6e16e220, 0x3ad4e: 0x6e16e420, 0x3ad4f: 0x6e16e620, + 0x3ad50: 0x6e16e820, 0x3ad51: 0x6e23e220, 0x3ad52: 0x6e23e420, 0x3ad53: 0x6e23e620, + 0x3ad54: 0x6e23e820, 0x3ad55: 0x6e23ea20, 0x3ad56: 0x6e23ec20, 0x3ad57: 0x6e23ee20, + 0x3ad58: 0x6e23f020, 0x3ad59: 0x6e23f220, 0x3ad5a: 0x6e23f420, 0x3ad5b: 0x6e23f620, + 0x3ad5c: 0x6e23f820, 0x3ad5d: 0x6e23fa20, 0x3ad5e: 0x6e23fc20, 0x3ad5f: 0x6e23fe20, + 0x3ad60: 0x6e240020, 0x3ad61: 0x6e240220, 0x3ad62: 0x6e240420, 0x3ad63: 0x6e240620, + 0x3ad64: 0x6e2dec20, 0x3ad65: 0x6e2dee20, 0x3ad66: 0x6e2df020, 0x3ad67: 0x6e2df220, + 0x3ad68: 0x6e2df420, 0x3ad69: 0x6e2df620, 0x3ad6a: 0x6e2df820, 0x3ad6b: 0x6e2dfa20, + 0x3ad6c: 0x6e2dfc20, 0x3ad6d: 0x6e359e20, 0x3ad6e: 0x6e35a020, 0x3ad6f: 0x6e35a220, + 0x3ad70: 0x6e35a420, 0x3ad71: 0x6e35a620, 0x3ad72: 0x6e35a820, 0x3ad73: 0x6e35aa20, + 0x3ad74: 0x6e35ac20, 0x3ad75: 0x6e3b0620, 0x3ad76: 0x6e3b0820, 0x3ad77: 0x6e3b0a20, + 0x3ad78: 0x6e3b0c20, 0x3ad79: 0x6e3b0e20, 0x3ad7a: 0x6e3b1020, 0x3ad7b: 0x6e3b1220, + 0x3ad7c: 0x6e3b1420, 0x3ad7d: 0x6e3b1620, 0x3ad7e: 0x6e3b1820, 0x3ad7f: 0x6e3ec420, + // Block 0xeb6, offset 0x3ad80 + 0x3ad80: 0x6e3ec620, 0x3ad81: 0x6e3ec820, 0x3ad82: 0x6e3eca20, 0x3ad83: 0x6e3ecc20, + 0x3ad84: 0x6e3ece20, 0x3ad85: 0x6e3ed020, 0x3ad86: 0x6e3ed220, 0x3ad87: 0x6e3ed420, + 0x3ad88: 0x6e436220, 0x3ad89: 0x6e436420, 0x3ad8a: 0x6e44a820, 0x3ad8b: 0x6e44aa20, + 0x3ad8c: 0x6e44ac20, 0x3ad8d: 0x6e44ae20, 0x3ad8e: 0x6e44b020, 0x3ad8f: 0x6e45e820, + 0x3ad90: 0x6e464a20, 0x3ad91: 0x6e464c20, 0x3ad92: 0x6e471820, 0x3ad93: 0x6e472420, + 0x3ad94: 0x6e473820, 0x3ad95: 0x6cb69820, 0x3ad96: 0x6ce6fa20, 0x3ad97: 0x6ce6fc20, + 0x3ad98: 0x6d155820, 0x3ad99: 0x6d155a20, 0x3ad9a: 0x6d155c20, 0x3ad9b: 0x6d155e20, + 0x3ad9c: 0x6d435620, 0x3ad9d: 0x6d997e20, 0x3ad9e: 0x6d998020, 0x3ad9f: 0x6dbc5420, + 0x3ada0: 0x6dda1e20, 0x3ada1: 0x6df23620, 0x3ada2: 0x6e067020, 0x3ada3: 0x6e16ec20, + 0x3ada4: 0x6e35b220, 0x3ada5: 0x6e3b1a20, 0x3ada6: 0x6c8a4820, 0x3ada7: 0x6c8a4a20, + 0x3ada8: 0x6c8a4c20, 0x3ada9: 0x6cb6a020, 0x3adaa: 0x6cb6a220, 0x3adab: 0x6cb6a420, + 0x3adac: 0x6cb6a620, 0x3adad: 0x6ce70220, 0x3adae: 0x6ce70420, 0x3adaf: 0x6ce70620, + 0x3adb0: 0x6ce70820, 0x3adb1: 0x6ce70a20, 0x3adb2: 0x6ce70c20, 0x3adb3: 0x6ce70e20, + 0x3adb4: 0x6ce71020, 0x3adb5: 0x6d156420, 0x3adb6: 0x6d156620, 0x3adb7: 0x6d435820, + 0x3adb8: 0x6d705420, 0x3adb9: 0x6d705620, 0x3adba: 0x6d705820, 0x3adbb: 0x6d705a20, + 0x3adbc: 0x6d998420, 0x3adbd: 0x6dda2020, 0x3adbe: 0x6e067420, 0x3adbf: 0x6e067620, + // Block 0xeb7, offset 0x3adc0 + 0x3adc0: 0x6e067820, 0x3adc1: 0x6e067a20, 0x3adc2: 0x6e3ed620, 0x3adc3: 0x6ce71220, + 0x3adc4: 0x6ce71420, 0x3adc5: 0x6ce71620, 0x3adc6: 0x6d156e20, 0x3adc7: 0x6d157020, + 0x3adc8: 0x6d157220, 0x3adc9: 0x6d157420, 0x3adca: 0x6d157620, 0x3adcb: 0x6d157820, + 0x3adcc: 0x6d157a20, 0x3adcd: 0x6d436420, 0x3adce: 0x6d436620, 0x3adcf: 0x6d436820, + 0x3add0: 0x6d436a20, 0x3add1: 0x6d436c20, 0x3add2: 0x6d436e20, 0x3add3: 0x6d437020, + 0x3add4: 0x6d437220, 0x3add5: 0x6d437420, 0x3add6: 0x6d437620, 0x3add7: 0x6d437820, + 0x3add8: 0x6d437a20, 0x3add9: 0x6d706020, 0x3adda: 0x6d706220, 0x3addb: 0x6d706420, + 0x3addc: 0x6d706620, 0x3addd: 0x6d706820, 0x3adde: 0x6d706a20, 0x3addf: 0x6d706c20, + 0x3ade0: 0x6d706e20, 0x3ade1: 0x6d998c20, 0x3ade2: 0x6d998e20, 0x3ade3: 0x6d999020, + 0x3ade4: 0x6d999220, 0x3ade5: 0x6d999420, 0x3ade6: 0x6d999620, 0x3ade7: 0x6d999820, + 0x3ade8: 0x6d999a20, 0x3ade9: 0x6d999c20, 0x3adea: 0x6d999e20, 0x3adeb: 0x6dbc5820, + 0x3adec: 0x6dbc5a20, 0x3aded: 0x6dbc5c20, 0x3adee: 0x6dbc5e20, 0x3adef: 0x6dbc6020, + 0x3adf0: 0x6dbc6220, 0x3adf1: 0x6dbc6420, 0x3adf2: 0x6dda2220, 0x3adf3: 0x6dda2420, + 0x3adf4: 0x6dda2620, 0x3adf5: 0x6dda2820, 0x3adf6: 0x6dda2a20, 0x3adf7: 0x6dda2c20, + 0x3adf8: 0x6df23c20, 0x3adf9: 0x6df23e20, 0x3adfa: 0x6df24020, 0x3adfb: 0x6e067e20, + 0x3adfc: 0x6e068020, 0x3adfd: 0x6e068220, 0x3adfe: 0x6e068420, 0x3adff: 0x6e068620, + // Block 0xeb8, offset 0x3ae00 + 0x3ae00: 0x6e068820, 0x3ae01: 0x6e16f620, 0x3ae02: 0x6e16f820, 0x3ae03: 0x6e16fa20, + 0x3ae04: 0x6e16fc20, 0x3ae05: 0x6e16fe20, 0x3ae06: 0x6e170020, 0x3ae07: 0x6e170220, + 0x3ae08: 0x6e170420, 0x3ae09: 0x6e170620, 0x3ae0a: 0x6e241020, 0x3ae0b: 0x6e241220, + 0x3ae0c: 0x6e2e0020, 0x3ae0d: 0x6e2e0220, 0x3ae0e: 0x6e2e0420, 0x3ae0f: 0x6e2e0620, + 0x3ae10: 0x6e2e0820, 0x3ae11: 0x6e35b620, 0x3ae12: 0x6e35b820, 0x3ae13: 0x6e3b1e20, + 0x3ae14: 0x6e3ed820, 0x3ae15: 0x6e3eda20, 0x3ae16: 0x6e417020, 0x3ae17: 0x6e417220, + 0x3ae18: 0x6e417420, 0x3ae19: 0x6e436620, 0x3ae1a: 0x6e436820, 0x3ae1b: 0x6cb6aa20, + 0x3ae1c: 0x6cb6ac20, 0x3ae1d: 0x6ce72c20, 0x3ae1e: 0x6ce72e20, 0x3ae1f: 0x6ce73020, + 0x3ae20: 0x6ce73220, 0x3ae21: 0x6d159820, 0x3ae22: 0x6d159a20, 0x3ae23: 0x6d159c20, + 0x3ae24: 0x6d159e20, 0x3ae25: 0x6d15a020, 0x3ae26: 0x6d15a220, 0x3ae27: 0x6d15a420, + 0x3ae28: 0x6d15a620, 0x3ae29: 0x6d15a820, 0x3ae2a: 0x6d15aa20, 0x3ae2b: 0x6d15ac20, + 0x3ae2c: 0x6d15ae20, 0x3ae2d: 0x6d15b020, 0x3ae2e: 0x6d15b220, 0x3ae2f: 0x6d15b420, + 0x3ae30: 0x6d15b620, 0x3ae31: 0x6d15b820, 0x3ae32: 0x6d15ba20, 0x3ae33: 0x6d15bc20, + 0x3ae34: 0x6d15be20, 0x3ae35: 0x6d15c020, 0x3ae36: 0x6d15c220, 0x3ae37: 0x6d15c420, + 0x3ae38: 0x6d43a420, 0x3ae39: 0x6d43a620, 0x3ae3a: 0x6d43a820, 0x3ae3b: 0x6d43aa20, + 0x3ae3c: 0x6d43ac20, 0x3ae3d: 0x6d43ae20, 0x3ae3e: 0x6d43b020, 0x3ae3f: 0x6d43b220, + // Block 0xeb9, offset 0x3ae40 + 0x3ae40: 0x6d43b420, 0x3ae41: 0x6d43b620, 0x3ae42: 0x6d43b820, 0x3ae43: 0x6d43ba20, + 0x3ae44: 0x6d43bc20, 0x3ae45: 0x6d43be20, 0x3ae46: 0x6d43c020, 0x3ae47: 0x6d43c220, + 0x3ae48: 0x6d43c420, 0x3ae49: 0x6d43c620, 0x3ae4a: 0x6d43c820, 0x3ae4b: 0x6d43ca20, + 0x3ae4c: 0x6d43cc20, 0x3ae4d: 0x6d43ce20, 0x3ae4e: 0x6d43d020, 0x3ae4f: 0x6d43d220, + 0x3ae50: 0x6d708c20, 0x3ae51: 0x6d708e20, 0x3ae52: 0x6d709020, 0x3ae53: 0x6d709220, + 0x3ae54: 0x6d709420, 0x3ae55: 0x6d709620, 0x3ae56: 0x6d709820, 0x3ae57: 0x6d709a20, + 0x3ae58: 0x6d709c20, 0x3ae59: 0x6d709e20, 0x3ae5a: 0x6d70a020, 0x3ae5b: 0x6d70a220, + 0x3ae5c: 0x6d70a420, 0x3ae5d: 0x6d70a620, 0x3ae5e: 0x6d70a820, 0x3ae5f: 0x6d70aa20, + 0x3ae60: 0x6d70ac20, 0x3ae61: 0x6d70ae20, 0x3ae62: 0x6d70b020, 0x3ae63: 0x6d70b220, + 0x3ae64: 0x6d70b420, 0x3ae65: 0x6d70b620, 0x3ae66: 0x6d70b820, 0x3ae67: 0x6d70ba20, + 0x3ae68: 0x6d70bc20, 0x3ae69: 0x6d99c020, 0x3ae6a: 0x6d99c220, 0x3ae6b: 0x6d99c420, + 0x3ae6c: 0x6d99c620, 0x3ae6d: 0x6d99c820, 0x3ae6e: 0x6d99ca20, 0x3ae6f: 0x6d99cc20, + 0x3ae70: 0x6d99ce20, 0x3ae71: 0x6d99d020, 0x3ae72: 0x6d99d220, 0x3ae73: 0x6d99d420, + 0x3ae74: 0x6d99d620, 0x3ae75: 0x6d99d820, 0x3ae76: 0x6d99da20, 0x3ae77: 0x6d99dc20, + 0x3ae78: 0x6d99de20, 0x3ae79: 0x6d99e020, 0x3ae7a: 0x6d99e220, 0x3ae7b: 0x6d99e420, + 0x3ae7c: 0x6d99e620, 0x3ae7d: 0x6d99e820, 0x3ae7e: 0x6d99ea20, 0x3ae7f: 0x6dbc8420, + // Block 0xeba, offset 0x3ae80 + 0x3ae80: 0x6dbc8620, 0x3ae81: 0x6dbc8820, 0x3ae82: 0x6dbc8a20, 0x3ae83: 0x6dbc8c20, + 0x3ae84: 0x6dbc8e20, 0x3ae85: 0x6dbc9020, 0x3ae86: 0x6dbc9220, 0x3ae87: 0x6dbc9420, + 0x3ae88: 0x6dbc9620, 0x3ae89: 0x6dbc9820, 0x3ae8a: 0x6dbc9a20, 0x3ae8b: 0x6dbc9c20, + 0x3ae8c: 0x6dbc9e20, 0x3ae8d: 0x6dbca020, 0x3ae8e: 0x6dbca220, 0x3ae8f: 0x6dbca420, + 0x3ae90: 0x6dbca620, 0x3ae91: 0x6dbca820, 0x3ae92: 0x6dbcaa20, 0x3ae93: 0x6dbcac20, + 0x3ae94: 0x6dbcae20, 0x3ae95: 0x6dbcb020, 0x3ae96: 0x6dbcb220, 0x3ae97: 0x6dbcb420, + 0x3ae98: 0x6dbcb620, 0x3ae99: 0x6dbcb820, 0x3ae9a: 0x6dbcba20, 0x3ae9b: 0x6dbcbc20, + 0x3ae9c: 0x6dbcbe20, 0x3ae9d: 0x6dbcc020, 0x3ae9e: 0x6dbcc220, 0x3ae9f: 0x6dda5c20, + 0x3aea0: 0x6dda5e20, 0x3aea1: 0x6dda6020, 0x3aea2: 0x6dda6220, 0x3aea3: 0x6dda6420, + 0x3aea4: 0x6dda6620, 0x3aea5: 0x6dda6820, 0x3aea6: 0x6dda6a20, 0x3aea7: 0x6dda6c20, + 0x3aea8: 0x6dda6e20, 0x3aea9: 0x6dda7020, 0x3aeaa: 0x6dda7220, 0x3aeab: 0x6dda7420, + 0x3aeac: 0x6dda7620, 0x3aead: 0x6dda7820, 0x3aeae: 0x6dda7a20, 0x3aeaf: 0x6dda7c20, + 0x3aeb0: 0x6dda7e20, 0x3aeb1: 0x6dda8020, 0x3aeb2: 0x6dda8220, 0x3aeb3: 0x6dda8420, + 0x3aeb4: 0x6dda8620, 0x3aeb5: 0x6dda8820, 0x3aeb6: 0x6dda8a20, 0x3aeb7: 0x6dda8c20, + 0x3aeb8: 0x6dda8e20, 0x3aeb9: 0x6dda9020, 0x3aeba: 0x6dda9220, 0x3aebb: 0x6dda9420, + 0x3aebc: 0x6dda9620, 0x3aebd: 0x6dda9820, 0x3aebe: 0x6dda9a20, 0x3aebf: 0x6dda9c20, + // Block 0xebb, offset 0x3aec0 + 0x3aec0: 0x6dda9e20, 0x3aec1: 0x6ddaa020, 0x3aec2: 0x6ddaa220, 0x3aec3: 0x6df25e20, + 0x3aec4: 0x6df26020, 0x3aec5: 0x6df26220, 0x3aec6: 0x6df26420, 0x3aec7: 0x6df26620, + 0x3aec8: 0x6df26820, 0x3aec9: 0x6df26a20, 0x3aeca: 0x6df26c20, 0x3aecb: 0x6df26e20, + 0x3aecc: 0x6df27020, 0x3aecd: 0x6df27220, 0x3aece: 0x6df27420, 0x3aecf: 0x6df27620, + 0x3aed0: 0x6df27820, 0x3aed1: 0x6df27a20, 0x3aed2: 0x6df27c20, 0x3aed3: 0x6df27e20, + 0x3aed4: 0x6df28020, 0x3aed5: 0x6df28220, 0x3aed6: 0x6df28420, 0x3aed7: 0x6df28620, + 0x3aed8: 0x6df28820, 0x3aed9: 0x6df28a20, 0x3aeda: 0x6df28c20, 0x3aedb: 0x6df28e20, + 0x3aedc: 0x6df29020, 0x3aedd: 0x6df29220, 0x3aede: 0x6df29420, 0x3aedf: 0x6df29620, + 0x3aee0: 0x6df29820, 0x3aee1: 0x6df29a20, 0x3aee2: 0x6df29c20, 0x3aee3: 0x6df29e20, + 0x3aee4: 0x6df2a020, 0x3aee5: 0x6df2a220, 0x3aee6: 0x6e069820, 0x3aee7: 0x6e069a20, + 0x3aee8: 0x6e069c20, 0x3aee9: 0x6e069e20, 0x3aeea: 0x6e06a020, 0x3aeeb: 0x6e06a220, + 0x3aeec: 0x6e06a420, 0x3aeed: 0x6e06a620, 0x3aeee: 0x6e06a820, 0x3aeef: 0x6e06aa20, + 0x3aef0: 0x6e06ac20, 0x3aef1: 0x6e06ae20, 0x3aef2: 0x6e06b020, 0x3aef3: 0x6e06b220, + 0x3aef4: 0x6e06b420, 0x3aef5: 0x6e06b620, 0x3aef6: 0x6e06b820, 0x3aef7: 0x6e06ba20, + 0x3aef8: 0x6e06bc20, 0x3aef9: 0x6e06be20, 0x3aefa: 0x6e06c020, 0x3aefb: 0x6e06c220, + 0x3aefc: 0x6e06c420, 0x3aefd: 0x6e06c620, 0x3aefe: 0x6e06c820, 0x3aeff: 0x6e06ca20, + // Block 0xebc, offset 0x3af00 + 0x3af00: 0x6e06cc20, 0x3af01: 0x6e06ce20, 0x3af02: 0x6e06d020, 0x3af03: 0x6e171e20, + 0x3af04: 0x6e172020, 0x3af05: 0x6e172220, 0x3af06: 0x6e172420, 0x3af07: 0x6e172620, + 0x3af08: 0x6e172820, 0x3af09: 0x6e172a20, 0x3af0a: 0x6e172c20, 0x3af0b: 0x6e172e20, + 0x3af0c: 0x6e173020, 0x3af0d: 0x6e173220, 0x3af0e: 0x6e173420, 0x3af0f: 0x6e173620, + 0x3af10: 0x6e173820, 0x3af11: 0x6e173a20, 0x3af12: 0x6e173c20, 0x3af13: 0x6e242020, + 0x3af14: 0x6e242220, 0x3af15: 0x6e242420, 0x3af16: 0x6e242620, 0x3af17: 0x6e242820, + 0x3af18: 0x6e242a20, 0x3af19: 0x6e242c20, 0x3af1a: 0x6e242e20, 0x3af1b: 0x6e243020, + 0x3af1c: 0x6e243220, 0x3af1d: 0x6e243420, 0x3af1e: 0x6e243620, 0x3af1f: 0x6e243820, + 0x3af20: 0x6e243a20, 0x3af21: 0x6e243c20, 0x3af22: 0x6e243e20, 0x3af23: 0x6e244020, + 0x3af24: 0x6e244220, 0x3af25: 0x6e2e1220, 0x3af26: 0x6e2e1420, 0x3af27: 0x6e2e1620, + 0x3af28: 0x6e2e1820, 0x3af29: 0x6e2e1a20, 0x3af2a: 0x6e2e1c20, 0x3af2b: 0x6e2e1e20, + 0x3af2c: 0x6e2e2020, 0x3af2d: 0x6e2e2220, 0x3af2e: 0x6e2e2420, 0x3af2f: 0x6e2e2620, + 0x3af30: 0x6e2e2820, 0x3af31: 0x6e2e2a20, 0x3af32: 0x6e35c220, 0x3af33: 0x6e35c420, + 0x3af34: 0x6e35c620, 0x3af35: 0x6e35c820, 0x3af36: 0x6e35ca20, 0x3af37: 0x6e35cc20, + 0x3af38: 0x6e3b2420, 0x3af39: 0x6e3b2620, 0x3af3a: 0x6e3b2820, 0x3af3b: 0x6e3b9e20, + 0x3af3c: 0x6e3b2a20, 0x3af3d: 0x6e3b2c20, 0x3af3e: 0x6e3b2e20, 0x3af3f: 0x6e3ee220, + // Block 0xebd, offset 0x3af40 + 0x3af40: 0x6e3ee420, 0x3af41: 0x6e3ee620, 0x3af42: 0x6e3ee820, 0x3af43: 0x6e3eea20, + 0x3af44: 0x6e3eec20, 0x3af45: 0x6e3eee20, 0x3af46: 0x6e3ef020, 0x3af47: 0x6e417820, + 0x3af48: 0x6e436a20, 0x3af49: 0x6e436c20, 0x3af4a: 0x6e436e20, 0x3af4b: 0x6e457020, + 0x3af4c: 0x6e464e20, 0x3af4d: 0x6e465020, 0x3af4e: 0x6e469420, 0x3af4f: 0x6e469620, + 0x3af50: 0x6e46b620, 0x3af51: 0x6e471a20, 0x3af52: 0x6ce73620, 0x3af53: 0x6d15c820, + 0x3af54: 0x6d15ca20, 0x3af55: 0x6d15cc20, 0x3af56: 0x6d15ce20, 0x3af57: 0x6d15d020, + 0x3af58: 0x6d43e420, 0x3af59: 0x6d43e620, 0x3af5a: 0x6d43e820, 0x3af5b: 0x6d43ea20, + 0x3af5c: 0x6d43ec20, 0x3af5d: 0x6d43ee20, 0x3af5e: 0x6d43f020, 0x3af5f: 0x6d43f220, + 0x3af60: 0x6d43f420, 0x3af61: 0x6d43f620, 0x3af62: 0x6d43f820, 0x3af63: 0x6d43fa20, + 0x3af64: 0x6d70c820, 0x3af65: 0x6d70ca20, 0x3af66: 0x6d70cc20, 0x3af67: 0x6d70ce20, + 0x3af68: 0x6d70d020, 0x3af69: 0x6d70d220, 0x3af6a: 0x6d70d420, 0x3af6b: 0x6d70d620, + 0x3af6c: 0x6d70d820, 0x3af6d: 0x6d70da20, 0x3af6e: 0x6d70dc20, 0x3af6f: 0x6d99f020, + 0x3af70: 0x6d99f220, 0x3af71: 0x6d99f420, 0x3af72: 0x6d99f620, 0x3af73: 0x6d99f820, + 0x3af74: 0x6d99fa20, 0x3af75: 0x6d99fc20, 0x3af76: 0x6d99fe20, 0x3af77: 0x6d9a0020, + 0x3af78: 0x6dbccc20, 0x3af79: 0x6dbcce20, 0x3af7a: 0x6dbcd020, 0x3af7b: 0x6dbcd220, + 0x3af7c: 0x6dbcd420, 0x3af7d: 0x6dbcd620, 0x3af7e: 0x6dbcd820, 0x3af7f: 0x6dbcda20, + // Block 0xebe, offset 0x3af80 + 0x3af80: 0x6dbcdc20, 0x3af81: 0x6dbcde20, 0x3af82: 0x6dbce020, 0x3af83: 0x6dbce220, + 0x3af84: 0x6dbce420, 0x3af85: 0x6ddab420, 0x3af86: 0x6ddab620, 0x3af87: 0x6ddab820, + 0x3af88: 0x6ddaba20, 0x3af89: 0x6ddabc20, 0x3af8a: 0x6ddabe20, 0x3af8b: 0x6ddac020, + 0x3af8c: 0x6ddac220, 0x3af8d: 0x6ddac420, 0x3af8e: 0x6ddac620, 0x3af8f: 0x6df2b020, + 0x3af90: 0x6df2b220, 0x3af91: 0x6df2b420, 0x3af92: 0x6df2b620, 0x3af93: 0x6df2b820, + 0x3af94: 0x6df2ba20, 0x3af95: 0x6df2bc20, 0x3af96: 0x6df2be20, 0x3af97: 0x6df2c020, + 0x3af98: 0x6e06d820, 0x3af99: 0x6e06da20, 0x3af9a: 0x6e06dc20, 0x3af9b: 0x6e06de20, + 0x3af9c: 0x6e06e020, 0x3af9d: 0x6e06e220, 0x3af9e: 0x6e06e420, 0x3af9f: 0x6e06e620, + 0x3afa0: 0x6e174620, 0x3afa1: 0x6e174820, 0x3afa2: 0x6e174a20, 0x3afa3: 0x6e174c20, + 0x3afa4: 0x6e174e20, 0x3afa5: 0x6e175020, 0x3afa6: 0x6e175220, 0x3afa7: 0x6e175420, + 0x3afa8: 0x6e244a20, 0x3afa9: 0x6e244c20, 0x3afaa: 0x6e244e20, 0x3afab: 0x6e245020, + 0x3afac: 0x6e245220, 0x3afad: 0x6e245420, 0x3afae: 0x6e2e2e20, 0x3afaf: 0x6e2e3020, + 0x3afb0: 0x6e2e3220, 0x3afb1: 0x6e2e3420, 0x3afb2: 0x6e35d220, 0x3afb3: 0x6e35d420, + 0x3afb4: 0x6e3b3020, 0x3afb5: 0x6e3ef220, 0x3afb6: 0x6e417a20, 0x3afb7: 0x6e417c20, + 0x3afb8: 0x6e417e20, 0x3afb9: 0x6e437020, 0x3afba: 0x6e44b420, 0x3afbb: 0x6e44b620, + 0x3afbc: 0x6c428220, 0x3afbd: 0x6c633820, 0x3afbe: 0x6c633a20, 0x3afbf: 0x6d15d820, + // Block 0xebf, offset 0x3afc0 + 0x3afc0: 0x6d15da20, 0x3afc1: 0x6d15e220, 0x3afc2: 0x6d15e420, 0x3afc3: 0x6d70e420, + 0x3afc4: 0x6d9a0620, 0x3afc5: 0x6dbcec20, 0x3afc6: 0x6dbcee20, 0x3afc7: 0x6dbcf020, + 0x3afc8: 0x6ddac820, 0x3afc9: 0x6df2c820, 0x3afca: 0x6df2ca20, 0x3afcb: 0x6e06ec20, + 0x3afcc: 0x6e175820, 0x3afcd: 0x6e06ee20, 0x3afce: 0x6e06f020, 0x3afcf: 0x6e175a20, + 0x3afd0: 0x6e175c20, 0x3afd1: 0x6e245620, 0x3afd2: 0x6e245820, 0x3afd3: 0x6e245a20, + 0x3afd4: 0x6e2e3820, 0x3afd5: 0x6e2e3a20, 0x3afd6: 0x6e3b3220, 0x3afd7: 0x6ce74220, + 0x3afd8: 0x6d15ec20, 0x3afd9: 0x6d15ee20, 0x3afda: 0x6d440820, 0x3afdb: 0x6d440a20, + 0x3afdc: 0x6d440c20, 0x3afdd: 0x6d440e20, 0x3afde: 0x6d70e620, 0x3afdf: 0x6d70e820, + 0x3afe0: 0x6d70ea20, 0x3afe1: 0x6d70ec20, 0x3afe2: 0x6d70ee20, 0x3afe3: 0x6d70f020, + 0x3afe4: 0x6d70f220, 0x3afe5: 0x6d70f420, 0x3afe6: 0x6d70f620, 0x3afe7: 0x6d9a0e20, + 0x3afe8: 0x6d9a1020, 0x3afe9: 0x6d9a1220, 0x3afea: 0x6d9a1420, 0x3afeb: 0x6d9a1620, + 0x3afec: 0x6d9a1820, 0x3afed: 0x6dbcf220, 0x3afee: 0x6dbcf420, 0x3afef: 0x6dbcf620, + 0x3aff0: 0x6dbcf820, 0x3aff1: 0x6ddad020, 0x3aff2: 0x6ddad220, 0x3aff3: 0x6ddad420, + 0x3aff4: 0x6ddad620, 0x3aff5: 0x6df2d420, 0x3aff6: 0x6df2d620, 0x3aff7: 0x6df2d820, + 0x3aff8: 0x6df2da20, 0x3aff9: 0x6e06f820, 0x3affa: 0x6e06fa20, 0x3affb: 0x6e06fc20, + 0x3affc: 0x6e06fe20, 0x3affd: 0x6e070020, 0x3affe: 0x6e070220, 0x3afff: 0x6e175e20, + // Block 0xec0, offset 0x3b000 + 0x3b000: 0x6e176020, 0x3b001: 0x6e176220, 0x3b002: 0x6e245e20, 0x3b003: 0x6e246020, + 0x3b004: 0x6e246220, 0x3b005: 0x6e246420, 0x3b006: 0x6e246620, 0x3b007: 0x6e2e3e20, + 0x3b008: 0x6e35d820, 0x3b009: 0x6e418020, 0x3b00a: 0x6e469820, 0x3b00b: 0x6c634220, + 0x3b00c: 0x6cb6b820, 0x3b00d: 0x6cb6ba20, 0x3b00e: 0x6cb6bc20, 0x3b00f: 0x6cb6be20, + 0x3b010: 0x6ce75020, 0x3b011: 0x6ce75220, 0x3b012: 0x6ce75420, 0x3b013: 0x6ce75620, + 0x3b014: 0x6ce75820, 0x3b015: 0x6ce75a20, 0x3b016: 0x6ce75c20, 0x3b017: 0x6ce75e20, + 0x3b018: 0x6ce76020, 0x3b019: 0x6d160e20, 0x3b01a: 0x6d161020, 0x3b01b: 0x6d161220, + 0x3b01c: 0x6d161420, 0x3b01d: 0x6d161620, 0x3b01e: 0x6d161820, 0x3b01f: 0x6d161a20, + 0x3b020: 0x6d161c20, 0x3b021: 0x6d161e20, 0x3b022: 0x6d162020, 0x3b023: 0x6d162220, + 0x3b024: 0x6d162420, 0x3b025: 0x6d162620, 0x3b026: 0x6d162820, 0x3b027: 0x6d162a20, + 0x3b028: 0x6d162c20, 0x3b029: 0x6d162e20, 0x3b02a: 0x6d163020, 0x3b02b: 0x6d163220, + 0x3b02c: 0x6d163420, 0x3b02d: 0x6d163620, 0x3b02e: 0x6d163820, 0x3b02f: 0x6d163a20, + 0x3b030: 0x6d443220, 0x3b031: 0x6d443420, 0x3b032: 0x6d443620, 0x3b033: 0x6d443820, + 0x3b034: 0x6d443a20, 0x3b035: 0x6d443c20, 0x3b036: 0x6d443e20, 0x3b037: 0x6d444020, + 0x3b038: 0x6d444220, 0x3b039: 0x6d444420, 0x3b03a: 0x6d444620, 0x3b03b: 0x6d444820, + 0x3b03c: 0x6d444a20, 0x3b03d: 0x6d444c20, 0x3b03e: 0x6d444e20, 0x3b03f: 0x6d445020, + // Block 0xec1, offset 0x3b040 + 0x3b040: 0x6d445220, 0x3b041: 0x6d445420, 0x3b042: 0x6d445620, 0x3b043: 0x6d445820, + 0x3b044: 0x6d445a20, 0x3b045: 0x6d445c20, 0x3b046: 0x6d445e20, 0x3b047: 0x6d446020, + 0x3b048: 0x6d446220, 0x3b049: 0x6d446420, 0x3b04a: 0x6d446620, 0x3b04b: 0x6d446820, + 0x3b04c: 0x6d446a20, 0x3b04d: 0x6d446c20, 0x3b04e: 0x6d446e20, 0x3b04f: 0x6d712020, + 0x3b050: 0x6d712220, 0x3b051: 0x6d712420, 0x3b052: 0x6d712620, 0x3b053: 0x6d712820, + 0x3b054: 0x6d712a20, 0x3b055: 0x6d712c20, 0x3b056: 0x6d712e20, 0x3b057: 0x6d713020, + 0x3b058: 0x6d713220, 0x3b059: 0x6d713420, 0x3b05a: 0x6d713620, 0x3b05b: 0x6d713820, + 0x3b05c: 0x6d713a20, 0x3b05d: 0x6d713c20, 0x3b05e: 0x6d713e20, 0x3b05f: 0x6d714020, + 0x3b060: 0x6d714220, 0x3b061: 0x6d714420, 0x3b062: 0x6d714620, 0x3b063: 0x6d714820, + 0x3b064: 0x6d714a20, 0x3b065: 0x6d714c20, 0x3b066: 0x6d714e20, 0x3b067: 0x6d715020, + 0x3b068: 0x6d715220, 0x3b069: 0x6d715420, 0x3b06a: 0x6d715620, 0x3b06b: 0x6d715820, + 0x3b06c: 0x6d715a20, 0x3b06d: 0x6d715c20, 0x3b06e: 0x6d9a5020, 0x3b06f: 0x6d9a5220, + 0x3b070: 0x6d9a5420, 0x3b071: 0x6d9a5620, 0x3b072: 0x6d9a5820, 0x3b073: 0x6d9a5a20, + 0x3b074: 0x6d9a5c20, 0x3b075: 0x6d9a5e20, 0x3b076: 0x6d9a6020, 0x3b077: 0x6d9a6220, + 0x3b078: 0x6d9a6420, 0x3b079: 0x6d9a6620, 0x3b07a: 0x6d9a6820, 0x3b07b: 0x6d9a6a20, + 0x3b07c: 0x6d9a6c20, 0x3b07d: 0x6d9a6e20, 0x3b07e: 0x6d9a7020, 0x3b07f: 0x6d9a7220, + // Block 0xec2, offset 0x3b080 + 0x3b080: 0x6d9a7420, 0x3b081: 0x6d9a7620, 0x3b082: 0x6d9a7820, 0x3b083: 0x6d9a7a20, + 0x3b084: 0x6d9a7c20, 0x3b085: 0x6d9a7e20, 0x3b086: 0x6d9a8020, 0x3b087: 0x6d9a8220, + 0x3b088: 0x6d9a8420, 0x3b089: 0x6d9a8620, 0x3b08a: 0x6d9a8820, 0x3b08b: 0x6d9a8a20, + 0x3b08c: 0x6d9a8c20, 0x3b08d: 0x6d9a8e20, 0x3b08e: 0x6d9a9020, 0x3b08f: 0x6d9a9220, + 0x3b090: 0x6d9a9420, 0x3b091: 0x6d9a9620, 0x3b092: 0x6d9a9820, 0x3b093: 0x6d9a9a20, + 0x3b094: 0x6d9a9c20, 0x3b095: 0x6d9a9e20, 0x3b096: 0x6d9aa020, 0x3b097: 0x6d9aa220, + 0x3b098: 0x6d9aa420, 0x3b099: 0x6d9aa620, 0x3b09a: 0x6d9aa820, 0x3b09b: 0x6d9aaa20, + 0x3b09c: 0x6d9aac20, 0x3b09d: 0x6dbd2220, 0x3b09e: 0x6dbd2420, 0x3b09f: 0x6dbd2620, + 0x3b0a0: 0x6dbd2820, 0x3b0a1: 0x6dbd2a20, 0x3b0a2: 0x6dbd2c20, 0x3b0a3: 0x6dbd2e20, + 0x3b0a4: 0x6dbd3020, 0x3b0a5: 0x6dbd3220, 0x3b0a6: 0x6dbd3420, 0x3b0a7: 0x6dbd3620, + 0x3b0a8: 0x6dbd3820, 0x3b0a9: 0x6dbd3a20, 0x3b0aa: 0x6dbd3c20, 0x3b0ab: 0x6dbd3e20, + 0x3b0ac: 0x6dbd4020, 0x3b0ad: 0x6dbd4220, 0x3b0ae: 0x6dbd4420, 0x3b0af: 0x6dbd4620, + 0x3b0b0: 0x6dbd4820, 0x3b0b1: 0x6dbd4a20, 0x3b0b2: 0x6dbd4c20, 0x3b0b3: 0x6dbd4e20, + 0x3b0b4: 0x6dbd5020, 0x3b0b5: 0x6dbd5220, 0x3b0b6: 0x6dbd5420, 0x3b0b7: 0x6dbd5620, + 0x3b0b8: 0x6dbd5820, 0x3b0b9: 0x6dbd5a20, 0x3b0ba: 0x6dbd5c20, 0x3b0bb: 0x6dbd5e20, + 0x3b0bc: 0x6dbd6020, 0x3b0bd: 0x6dbd6220, 0x3b0be: 0x6dbd6420, 0x3b0bf: 0x6dbd6620, + // Block 0xec3, offset 0x3b0c0 + 0x3b0c0: 0x6ddb0820, 0x3b0c1: 0x6ddb0a20, 0x3b0c2: 0x6ddb0c20, 0x3b0c3: 0x6ddb0e20, + 0x3b0c4: 0x6ddb1020, 0x3b0c5: 0x6ddb1220, 0x3b0c6: 0x6ddb1420, 0x3b0c7: 0x6ddb1620, + 0x3b0c8: 0x6ddb1820, 0x3b0c9: 0x6ddb1a20, 0x3b0ca: 0x6ddb1c20, 0x3b0cb: 0x6ddb1e20, + 0x3b0cc: 0x6ddb2020, 0x3b0cd: 0x6ddb2220, 0x3b0ce: 0x6ddb2420, 0x3b0cf: 0x6ddb2620, + 0x3b0d0: 0x6ddb2820, 0x3b0d1: 0x6ddb2a20, 0x3b0d2: 0x6ddb2c20, 0x3b0d3: 0x6ddb2e20, + 0x3b0d4: 0x6ddb3020, 0x3b0d5: 0x6ddb3220, 0x3b0d6: 0x6ddb3420, 0x3b0d7: 0x6ddb3620, + 0x3b0d8: 0x6ddb3820, 0x3b0d9: 0x6df30220, 0x3b0da: 0x6df30420, 0x3b0db: 0x6df30620, + 0x3b0dc: 0x6df30820, 0x3b0dd: 0x6df30a20, 0x3b0de: 0x6df30c20, 0x3b0df: 0x6df30e20, + 0x3b0e0: 0x6df31020, 0x3b0e1: 0x6df31220, 0x3b0e2: 0x6df31420, 0x3b0e3: 0x6df31620, + 0x3b0e4: 0x6df31820, 0x3b0e5: 0x6df31a20, 0x3b0e6: 0x6df31c20, 0x3b0e7: 0x6df31e20, + 0x3b0e8: 0x6df32020, 0x3b0e9: 0x6df32220, 0x3b0ea: 0x6df32420, 0x3b0eb: 0x6df32620, + 0x3b0ec: 0x6df32820, 0x3b0ed: 0x6df32a20, 0x3b0ee: 0x6df32c20, 0x3b0ef: 0x6df32e20, + 0x3b0f0: 0x6df33020, 0x3b0f1: 0x6df33220, 0x3b0f2: 0x6df33420, 0x3b0f3: 0x6e071820, + 0x3b0f4: 0x6e071a20, 0x3b0f5: 0x6e071c20, 0x3b0f6: 0x6e071e20, 0x3b0f7: 0x6e072020, + 0x3b0f8: 0x6e072220, 0x3b0f9: 0x6e072420, 0x3b0fa: 0x6e072620, 0x3b0fb: 0x6e072820, + 0x3b0fc: 0x6e072a20, 0x3b0fd: 0x6e072c20, 0x3b0fe: 0x6e072e20, 0x3b0ff: 0x6e073020, + // Block 0xec4, offset 0x3b100 + 0x3b100: 0x6e073220, 0x3b101: 0x6e073420, 0x3b102: 0x6e073620, 0x3b103: 0x6e073820, + 0x3b104: 0x6e073a20, 0x3b105: 0x6e073c20, 0x3b106: 0x6e073e20, 0x3b107: 0x6e074020, + 0x3b108: 0x6e074220, 0x3b109: 0x6e177c20, 0x3b10a: 0x6e177e20, 0x3b10b: 0x6e178020, + 0x3b10c: 0x6e178220, 0x3b10d: 0x6e178420, 0x3b10e: 0x6e178620, 0x3b10f: 0x6e178820, + 0x3b110: 0x6e178a20, 0x3b111: 0x6e178c20, 0x3b112: 0x6e178e20, 0x3b113: 0x6e179020, + 0x3b114: 0x6e179220, 0x3b115: 0x6e179420, 0x3b116: 0x6e179620, 0x3b117: 0x6e179820, + 0x3b118: 0x6e179a20, 0x3b119: 0x6e179c20, 0x3b11a: 0x6e179e20, 0x3b11b: 0x6e17a020, + 0x3b11c: 0x6e17a220, 0x3b11d: 0x6e17a420, 0x3b11e: 0x6e17a620, 0x3b11f: 0x6e247420, + 0x3b120: 0x6e247620, 0x3b121: 0x6e247820, 0x3b122: 0x6e247a20, 0x3b123: 0x6e247c20, + 0x3b124: 0x6e247e20, 0x3b125: 0x6e248020, 0x3b126: 0x6e248220, 0x3b127: 0x6e248420, + 0x3b128: 0x6e248620, 0x3b129: 0x6e248820, 0x3b12a: 0x6e248a20, 0x3b12b: 0x6e248c20, + 0x3b12c: 0x6e2e4820, 0x3b12d: 0x6e2e4a20, 0x3b12e: 0x6e2e4c20, 0x3b12f: 0x6e2e4e20, + 0x3b130: 0x6e2e5020, 0x3b131: 0x6e2e5220, 0x3b132: 0x6e2e5420, 0x3b133: 0x6e2e5620, + 0x3b134: 0x6e2e5820, 0x3b135: 0x6e2e5a20, 0x3b136: 0x6e2e5c20, 0x3b137: 0x6e2e5e20, + 0x3b138: 0x6e2e6020, 0x3b139: 0x6e2e6220, 0x3b13a: 0x6e2e6420, 0x3b13b: 0x6e2e6620, + 0x3b13c: 0x6e2e6820, 0x3b13d: 0x6e2e6a20, 0x3b13e: 0x6e35e020, 0x3b13f: 0x6e35e220, + // Block 0xec5, offset 0x3b140 + 0x3b140: 0x6e35e420, 0x3b141: 0x6e35e620, 0x3b142: 0x6e35e820, 0x3b143: 0x6e35ea20, + 0x3b144: 0x6e35ec20, 0x3b145: 0x6e35ee20, 0x3b146: 0x6e3b3c20, 0x3b147: 0x6e3b3e20, + 0x3b148: 0x6e3b4020, 0x3b149: 0x6e3ef420, 0x3b14a: 0x6e3ef620, 0x3b14b: 0x6e3ef820, + 0x3b14c: 0x6e3efa20, 0x3b14d: 0x6e3efc20, 0x3b14e: 0x6e3efe20, 0x3b14f: 0x6e418620, + 0x3b150: 0x6e418820, 0x3b151: 0x6e418a20, 0x3b152: 0x6e44b820, 0x3b153: 0x6e44ba20, + 0x3b154: 0x6e460020, 0x3b155: 0x6d447420, 0x3b156: 0x6d447620, 0x3b157: 0x6df33a20, + 0x3b158: 0x6cb6ce20, 0x3b159: 0x6cb6d020, 0x3b15a: 0x6ce77e20, 0x3b15b: 0x6ce78020, + 0x3b15c: 0x6ce78220, 0x3b15d: 0x6ce78420, 0x3b15e: 0x6ce78620, 0x3b15f: 0x6ce78820, + 0x3b160: 0x6ce78a20, 0x3b161: 0x6ce78c20, 0x3b162: 0x6d165c20, 0x3b163: 0x6d165e20, + 0x3b164: 0x6d166020, 0x3b165: 0x6d166220, 0x3b166: 0x6d166420, 0x3b167: 0x6d166620, + 0x3b168: 0x6d166820, 0x3b169: 0x6d166a20, 0x3b16a: 0x6d166c20, 0x3b16b: 0x6d166e20, + 0x3b16c: 0x6d167020, 0x3b16d: 0x6d167220, 0x3b16e: 0x6d167420, 0x3b16f: 0x6d167620, + 0x3b170: 0x6cf59620, 0x3b171: 0x6d167820, 0x3b172: 0x6d167a20, 0x3b173: 0x6d167c20, + 0x3b174: 0x6d449420, 0x3b175: 0x6d449620, 0x3b176: 0x6d449820, 0x3b177: 0x6d449a20, + 0x3b178: 0x6d449c20, 0x3b179: 0x6d449e20, 0x3b17a: 0x6d44a020, 0x3b17b: 0x6d44a220, + 0x3b17c: 0x6d44a420, 0x3b17d: 0x6d44a620, 0x3b17e: 0x6d44a820, 0x3b17f: 0x6d44aa20, + // Block 0xec6, offset 0x3b180 + 0x3b180: 0x6d44ac20, 0x3b181: 0x6d44ae20, 0x3b182: 0x6d44b020, 0x3b183: 0x6d44b220, + 0x3b184: 0x6d717620, 0x3b185: 0x6d717820, 0x3b186: 0x6d717a20, 0x3b187: 0x6d717c20, + 0x3b188: 0x6d717e20, 0x3b189: 0x6d718020, 0x3b18a: 0x6d718220, 0x3b18b: 0x6d718420, + 0x3b18c: 0x6d718620, 0x3b18d: 0x6d718820, 0x3b18e: 0x6d718a20, 0x3b18f: 0x6d718c20, + 0x3b190: 0x6d718e20, 0x3b191: 0x6d719020, 0x3b192: 0x6d719220, 0x3b193: 0x6d9aca20, + 0x3b194: 0x6d9acc20, 0x3b195: 0x6d9ace20, 0x3b196: 0x6d9ad020, 0x3b197: 0x6d9ad220, + 0x3b198: 0x6d9ad420, 0x3b199: 0x6d9ad620, 0x3b19a: 0x6d9ad820, 0x3b19b: 0x6d9ada20, + 0x3b19c: 0x6d9adc20, 0x3b19d: 0x6d9ade20, 0x3b19e: 0x6d9ae020, 0x3b19f: 0x6d9ae220, + 0x3b1a0: 0x6d9ae420, 0x3b1a1: 0x6d9ae620, 0x3b1a2: 0x6d9ae820, 0x3b1a3: 0x6d9aea20, + 0x3b1a4: 0x6d9aec20, 0x3b1a5: 0x6d9aee20, 0x3b1a6: 0x6d9af020, 0x3b1a7: 0x6d9af220, + 0x3b1a8: 0x6dbd7c20, 0x3b1a9: 0x6dbd7e20, 0x3b1aa: 0x6dbd8020, 0x3b1ab: 0x6dbd8220, + 0x3b1ac: 0x6dbd8420, 0x3b1ad: 0x6dbd8620, 0x3b1ae: 0x6dbd8820, 0x3b1af: 0x6dbd8a20, + 0x3b1b0: 0x6dbd8c20, 0x3b1b1: 0x6dbd8e20, 0x3b1b2: 0x6dbd9020, 0x3b1b3: 0x6dbd9220, + 0x3b1b4: 0x6dbd9420, 0x3b1b5: 0x6dbd9620, 0x3b1b6: 0x6dbd9820, 0x3b1b7: 0x6dbd9a20, + 0x3b1b8: 0x6dbd9c20, 0x3b1b9: 0x6dbd9e20, 0x3b1ba: 0x6dbda020, 0x3b1bb: 0x6dbda220, + 0x3b1bc: 0x6dbda420, 0x3b1bd: 0x6dbda620, 0x3b1be: 0x6dbda820, 0x3b1bf: 0x6dbdaa20, + // Block 0xec7, offset 0x3b1c0 + 0x3b1c0: 0x6dbdac20, 0x3b1c1: 0x6dbdae20, 0x3b1c2: 0x6dbdb020, 0x3b1c3: 0x6dbdb220, + 0x3b1c4: 0x6dbdb420, 0x3b1c5: 0x6ddb5620, 0x3b1c6: 0x6ddb5820, 0x3b1c7: 0x6ddb5a20, + 0x3b1c8: 0x6ddb5c20, 0x3b1c9: 0x6ddb5e20, 0x3b1ca: 0x6ddb6020, 0x3b1cb: 0x6ddb6220, + 0x3b1cc: 0x6ddb6420, 0x3b1cd: 0x6ddb6620, 0x3b1ce: 0x6df34e20, 0x3b1cf: 0x6ddb6820, + 0x3b1d0: 0x6ddb6a20, 0x3b1d1: 0x6ddb6c20, 0x3b1d2: 0x6ddb6e20, 0x3b1d3: 0x6ddb7020, + 0x3b1d4: 0x6ddb7220, 0x3b1d5: 0x6ddb7420, 0x3b1d6: 0x6ddb7620, 0x3b1d7: 0x6ddb7820, + 0x3b1d8: 0x6ddb7a20, 0x3b1d9: 0x6ddb7c20, 0x3b1da: 0x6ddb7e20, 0x3b1db: 0x6ddb8020, + 0x3b1dc: 0x6df35020, 0x3b1dd: 0x6df35220, 0x3b1de: 0x6df35420, 0x3b1df: 0x6df35620, + 0x3b1e0: 0x6df35820, 0x3b1e1: 0x6df35a20, 0x3b1e2: 0x6df35c20, 0x3b1e3: 0x6df35e20, + 0x3b1e4: 0x6df36020, 0x3b1e5: 0x6df36220, 0x3b1e6: 0x6df36420, 0x3b1e7: 0x6df36620, + 0x3b1e8: 0x6df36820, 0x3b1e9: 0x6df36a20, 0x3b1ea: 0x6df36c20, 0x3b1eb: 0x6df36e20, + 0x3b1ec: 0x6df37020, 0x3b1ed: 0x6e075620, 0x3b1ee: 0x6e075820, 0x3b1ef: 0x6e075a20, + 0x3b1f0: 0x6e075c20, 0x3b1f1: 0x6e075e20, 0x3b1f2: 0x6e076020, 0x3b1f3: 0x6e076220, + 0x3b1f4: 0x6e076420, 0x3b1f5: 0x6e076620, 0x3b1f6: 0x6e076820, 0x3b1f7: 0x6e076a20, + 0x3b1f8: 0x6e17bc20, 0x3b1f9: 0x6e17be20, 0x3b1fa: 0x6e17c020, 0x3b1fb: 0x6e17c220, + 0x3b1fc: 0x6e17c420, 0x3b1fd: 0x6e17c620, 0x3b1fe: 0x6e17c820, 0x3b1ff: 0x6e17ca20, + // Block 0xec8, offset 0x3b200 + 0x3b200: 0x6e17cc20, 0x3b201: 0x6e17ce20, 0x3b202: 0x6e17d020, 0x3b203: 0x6e17d220, + 0x3b204: 0x6e17d420, 0x3b205: 0x6e17d620, 0x3b206: 0x6e17d820, 0x3b207: 0x6e17da20, + 0x3b208: 0x6e249220, 0x3b209: 0x6e249420, 0x3b20a: 0x6e249620, 0x3b20b: 0x6e249820, + 0x3b20c: 0x6e249a20, 0x3b20d: 0x6e249c20, 0x3b20e: 0x6e2e7020, 0x3b20f: 0x6e2e7220, + 0x3b210: 0x6e2e7420, 0x3b211: 0x6e35f420, 0x3b212: 0x6e35f620, 0x3b213: 0x6e35f820, + 0x3b214: 0x6e35fa20, 0x3b215: 0x6e35fc20, 0x3b216: 0x6e3b4220, 0x3b217: 0x6e3b4420, + 0x3b218: 0x6e3b4620, 0x3b219: 0x6e3b4820, 0x3b21a: 0x6e3b4a20, 0x3b21b: 0x6e3f0020, + 0x3b21c: 0x6e3f0220, 0x3b21d: 0x6e419020, 0x3b21e: 0x6e419220, 0x3b21f: 0x6e437220, + 0x3b220: 0x6e46d220, 0x3b221: 0x6e46f220, 0x3b222: 0x6e470c20, 0x3b223: 0x6e473420, + 0x3b224: 0x6e473a20, 0x3b225: 0x6c635620, 0x3b226: 0x6c635820, 0x3b227: 0x6cb6d220, + 0x3b228: 0x6ce79020, 0x3b229: 0x6ce79220, 0x3b22a: 0x6ce79420, 0x3b22b: 0x6d168220, + 0x3b22c: 0x6d168420, 0x3b22d: 0x6d44bc20, 0x3b22e: 0x6d44be20, 0x3b22f: 0x6d9af820, + 0x3b230: 0x6dbdb820, 0x3b231: 0x6c635e20, 0x3b232: 0x6d168820, 0x3b233: 0x6d44c020, + 0x3b234: 0x6d719620, 0x3b235: 0x6ddb8820, 0x3b236: 0x6df37820, 0x3b237: 0x6df37a20, + 0x3b238: 0x6df37c20, 0x3b239: 0x6e076c20, 0x3b23a: 0x6e17de20, 0x3b23b: 0x6e17e020, + 0x3b23c: 0x6e24a220, 0x3b23d: 0x6e24a420, 0x3b23e: 0x6e45ea20, 0x3b23f: 0x6c429020, + // Block 0xec9, offset 0x3b240 + 0x3b240: 0x6c429220, 0x3b241: 0x6c429420, 0x3b242: 0x6c636620, 0x3b243: 0x6c429620, + 0x3b244: 0x6c8a6e20, 0x3b245: 0x6c8a7020, 0x3b246: 0x6c8a7220, 0x3b247: 0x6cb6de20, + 0x3b248: 0x6cb6e020, 0x3b249: 0x6cb6e220, 0x3b24a: 0x6cb6e420, 0x3b24b: 0x6cb6e620, + 0x3b24c: 0x6cb6e820, 0x3b24d: 0x6cb6ea20, 0x3b24e: 0x6cb6ec20, 0x3b24f: 0x6cb6ee20, + 0x3b250: 0x6cb6f020, 0x3b251: 0x6cb6f220, 0x3b252: 0x6cb6f420, 0x3b253: 0x6cb6f620, + 0x3b254: 0x6cb6f820, 0x3b255: 0x6ce7b020, 0x3b256: 0x6ce7b220, 0x3b257: 0x6ce7b420, + 0x3b258: 0x6ce7b620, 0x3b259: 0x6ce7b820, 0x3b25a: 0x6ce7ba20, 0x3b25b: 0x6ce7bc20, + 0x3b25c: 0x6ce7be20, 0x3b25d: 0x6ce7c020, 0x3b25e: 0x6ce7c220, 0x3b25f: 0x6ce7c420, + 0x3b260: 0x6ce7c620, 0x3b261: 0x6ce7c820, 0x3b262: 0x6ce7ca20, 0x3b263: 0x6ce7cc20, + 0x3b264: 0x6ce7ce20, 0x3b265: 0x6ce7d020, 0x3b266: 0x6ce7d220, 0x3b267: 0x6ce7d420, + 0x3b268: 0x6d16b020, 0x3b269: 0x6d16b220, 0x3b26a: 0x6d16b420, 0x3b26b: 0x6d16b620, + 0x3b26c: 0x6d16b820, 0x3b26d: 0x6d16ba20, 0x3b26e: 0x6d16bc20, 0x3b26f: 0x6d16be20, + 0x3b270: 0x6d16c020, 0x3b271: 0x6d16c220, 0x3b272: 0x6d16c420, 0x3b273: 0x6d16c620, + 0x3b274: 0x6d16c820, 0x3b275: 0x6d16ca20, 0x3b276: 0x6d16cc20, 0x3b277: 0x6d16ce20, + 0x3b278: 0x6d16d020, 0x3b279: 0x6d16d220, 0x3b27a: 0x6d16d420, 0x3b27b: 0x6d16d620, + 0x3b27c: 0x6d16d820, 0x3b27d: 0x6d16da20, 0x3b27e: 0x6d16dc20, 0x3b27f: 0x6d16de20, + // Block 0xeca, offset 0x3b280 + 0x3b280: 0x6d16e020, 0x3b281: 0x6d16e220, 0x3b282: 0x6d16e420, 0x3b283: 0x6d16e620, + 0x3b284: 0x6d16e820, 0x3b285: 0x6d16ea20, 0x3b286: 0x6d16ec20, 0x3b287: 0x6d16ee20, + 0x3b288: 0x6d16f020, 0x3b289: 0x6d44f020, 0x3b28a: 0x6d44f220, 0x3b28b: 0x6d44f420, + 0x3b28c: 0x6d44f620, 0x3b28d: 0x6d44f820, 0x3b28e: 0x6d44fa20, 0x3b28f: 0x6d44fc20, + 0x3b290: 0x6d44fe20, 0x3b291: 0x6d450020, 0x3b292: 0x6d450220, 0x3b293: 0x6d450420, + 0x3b294: 0x6d450620, 0x3b295: 0x6d450820, 0x3b296: 0x6d450a20, 0x3b297: 0x6d450c20, + 0x3b298: 0x6d450e20, 0x3b299: 0x6d451020, 0x3b29a: 0x6d451220, 0x3b29b: 0x6d451420, + 0x3b29c: 0x6d451620, 0x3b29d: 0x6d71c220, 0x3b29e: 0x6d71c420, 0x3b29f: 0x6d71c620, + 0x3b2a0: 0x6d71c820, 0x3b2a1: 0x6d71ca20, 0x3b2a2: 0x6d71cc20, 0x3b2a3: 0x6d71ce20, + 0x3b2a4: 0x6d71d020, 0x3b2a5: 0x6d71d220, 0x3b2a6: 0x6d71d420, 0x3b2a7: 0x6d71d620, + 0x3b2a8: 0x6d71d820, 0x3b2a9: 0x6d71da20, 0x3b2aa: 0x6d71dc20, 0x3b2ab: 0x6d71de20, + 0x3b2ac: 0x6d71e020, 0x3b2ad: 0x6d71e220, 0x3b2ae: 0x6d71e420, 0x3b2af: 0x6d71e620, + 0x3b2b0: 0x6d71e820, 0x3b2b1: 0x6d71ea20, 0x3b2b2: 0x6d71ec20, 0x3b2b3: 0x6d71ee20, + 0x3b2b4: 0x6d71f020, 0x3b2b5: 0x6d71f220, 0x3b2b6: 0x6d71f420, 0x3b2b7: 0x6d71f620, + 0x3b2b8: 0x6d71f820, 0x3b2b9: 0x6d71fa20, 0x3b2ba: 0x6d9b2820, 0x3b2bb: 0x6d9b2a20, + 0x3b2bc: 0x6d9b2c20, 0x3b2bd: 0x6d9b2e20, 0x3b2be: 0x6d9b3020, 0x3b2bf: 0x6d9b3220, + // Block 0xecb, offset 0x3b2c0 + 0x3b2c0: 0x6d9b3420, 0x3b2c1: 0x6d9b3620, 0x3b2c2: 0x6d9b3820, 0x3b2c3: 0x6d9b3a20, + 0x3b2c4: 0x6d9b3c20, 0x3b2c5: 0x6d9b3e20, 0x3b2c6: 0x6d9b4020, 0x3b2c7: 0x6d9b4220, + 0x3b2c8: 0x6d9b4420, 0x3b2c9: 0x6d9b4620, 0x3b2ca: 0x6d9b4820, 0x3b2cb: 0x6d9b4a20, + 0x3b2cc: 0x6d9b4c20, 0x3b2cd: 0x6d9b4e20, 0x3b2ce: 0x6d9b5020, 0x3b2cf: 0x6d9b5220, + 0x3b2d0: 0x6d9b5420, 0x3b2d1: 0x6d9b5620, 0x3b2d2: 0x6d9b5820, 0x3b2d3: 0x6d9b5a20, + 0x3b2d4: 0x6d9b5c20, 0x3b2d5: 0x6d9b5e20, 0x3b2d6: 0x6d9b6020, 0x3b2d7: 0x6d9b6220, + 0x3b2d8: 0x6d9b6420, 0x3b2d9: 0x6d9b6620, 0x3b2da: 0x6d9b6820, 0x3b2db: 0x6d9b6a20, + 0x3b2dc: 0x6d9b6c20, 0x3b2dd: 0x6d9b6e20, 0x3b2de: 0x6d9b7020, 0x3b2df: 0x6d9b7220, + 0x3b2e0: 0x6d9b7420, 0x3b2e1: 0x6d9b7620, 0x3b2e2: 0x6d9b7820, 0x3b2e3: 0x6dbde220, + 0x3b2e4: 0x6d9b7a20, 0x3b2e5: 0x6d9b7c20, 0x3b2e6: 0x6d9b7e20, 0x3b2e7: 0x6d9b8020, + 0x3b2e8: 0x6d9b8220, 0x3b2e9: 0x6d9b8420, 0x3b2ea: 0x6d9b8620, 0x3b2eb: 0x6d9b8820, + 0x3b2ec: 0x6d9b8a20, 0x3b2ed: 0x6dbde420, 0x3b2ee: 0x6dbde620, 0x3b2ef: 0x6dbde820, + 0x3b2f0: 0x6dbdea20, 0x3b2f1: 0x6dbdec20, 0x3b2f2: 0x6dbdee20, 0x3b2f3: 0x6dbdf020, + 0x3b2f4: 0x6dbdf220, 0x3b2f5: 0x6dbdf420, 0x3b2f6: 0x6dbdf620, 0x3b2f7: 0x6dbdf820, + 0x3b2f8: 0x6dbdfa20, 0x3b2f9: 0x6dbdfc20, 0x3b2fa: 0x6dbdfe20, 0x3b2fb: 0x6dbe0020, + 0x3b2fc: 0x6dbe0220, 0x3b2fd: 0x6dbe0420, 0x3b2fe: 0x6dbe0620, 0x3b2ff: 0x6dbe0820, + // Block 0xecc, offset 0x3b300 + 0x3b300: 0x6dbe0a20, 0x3b301: 0x6dbe0c20, 0x3b302: 0x6dbe0e20, 0x3b303: 0x6dbe1020, + 0x3b304: 0x6dbe1220, 0x3b305: 0x6dbe1420, 0x3b306: 0x6dbe1620, 0x3b307: 0x6dbe1820, + 0x3b308: 0x6dbe1a20, 0x3b309: 0x6dbe1c20, 0x3b30a: 0x6dbe1e20, 0x3b30b: 0x6dbe2020, + 0x3b30c: 0x6dbe2220, 0x3b30d: 0x6dbe2420, 0x3b30e: 0x6dbe2620, 0x3b30f: 0x6dbe2820, + 0x3b310: 0x6dbe2a20, 0x3b311: 0x6dbe2c20, 0x3b312: 0x6dbe2e20, 0x3b313: 0x6dbe3020, + 0x3b314: 0x6dbe3220, 0x3b315: 0x6dbe3420, 0x3b316: 0x6dbe3620, 0x3b317: 0x6dbe3820, + 0x3b318: 0x6dbe3a20, 0x3b319: 0x6ddbb220, 0x3b31a: 0x6ddbb420, 0x3b31b: 0x6ddbb620, + 0x3b31c: 0x6ddbb820, 0x3b31d: 0x6ddbba20, 0x3b31e: 0x6ddbbc20, 0x3b31f: 0x6ddbbe20, + 0x3b320: 0x6ddbc020, 0x3b321: 0x6ddbc220, 0x3b322: 0x6ddbc420, 0x3b323: 0x6ddbc620, + 0x3b324: 0x6ddbc820, 0x3b325: 0x6ddbca20, 0x3b326: 0x6ddbcc20, 0x3b327: 0x6ddbce20, + 0x3b328: 0x6ddbd020, 0x3b329: 0x6ddbd220, 0x3b32a: 0x6ddbd420, 0x3b32b: 0x6ddbd620, + 0x3b32c: 0x6ddbd820, 0x3b32d: 0x6ddbda20, 0x3b32e: 0x6ddbdc20, 0x3b32f: 0x6ddbde20, + 0x3b330: 0x6ddbe020, 0x3b331: 0x6ddbe220, 0x3b332: 0x6ddbe420, 0x3b333: 0x6ddbe620, + 0x3b334: 0x6df39620, 0x3b335: 0x6ddbe820, 0x3b336: 0x6ddbea20, 0x3b337: 0x6ddbec20, + 0x3b338: 0x6ddbee20, 0x3b339: 0x6ddbf020, 0x3b33a: 0x6ddbf220, 0x3b33b: 0x6ddbf420, + 0x3b33c: 0x6ddbf620, 0x3b33d: 0x6df39820, 0x3b33e: 0x6df39a20, 0x3b33f: 0x6df39c20, + // Block 0xecd, offset 0x3b340 + 0x3b340: 0x6df39e20, 0x3b341: 0x6df3a020, 0x3b342: 0x6df3a220, 0x3b343: 0x6df3a420, + 0x3b344: 0x6df3a620, 0x3b345: 0x6df3a820, 0x3b346: 0x6df3aa20, 0x3b347: 0x6df3ac20, + 0x3b348: 0x6df3ae20, 0x3b349: 0x6df3b020, 0x3b34a: 0x6df3b220, 0x3b34b: 0x6df3b420, + 0x3b34c: 0x6df3b620, 0x3b34d: 0x6df3b820, 0x3b34e: 0x6df3ba20, 0x3b34f: 0x6df3bc20, + 0x3b350: 0x6df3be20, 0x3b351: 0x6df3c020, 0x3b352: 0x6df3c220, 0x3b353: 0x6df3c420, + 0x3b354: 0x6df3c620, 0x3b355: 0x6df3c820, 0x3b356: 0x6df3ca20, 0x3b357: 0x6df3cc20, + 0x3b358: 0x6df3ce20, 0x3b359: 0x6df3d020, 0x3b35a: 0x6df3d220, 0x3b35b: 0x6df3d420, + 0x3b35c: 0x6df3d620, 0x3b35d: 0x6df3d820, 0x3b35e: 0x6df3da20, 0x3b35f: 0x6df3dc20, + 0x3b360: 0x6df3de20, 0x3b361: 0x6e078820, 0x3b362: 0x6e078a20, 0x3b363: 0x6e078c20, + 0x3b364: 0x6e078e20, 0x3b365: 0x6e079020, 0x3b366: 0x6e079220, 0x3b367: 0x6e079420, + 0x3b368: 0x6e079620, 0x3b369: 0x6e079820, 0x3b36a: 0x6e079a20, 0x3b36b: 0x6e079c20, + 0x3b36c: 0x6e079e20, 0x3b36d: 0x6e07a020, 0x3b36e: 0x6e07a220, 0x3b36f: 0x6e07a420, + 0x3b370: 0x6e07a620, 0x3b371: 0x6e07a820, 0x3b372: 0x6e07aa20, 0x3b373: 0x6e07ac20, + 0x3b374: 0x6e07ae20, 0x3b375: 0x6e07b020, 0x3b376: 0x6e17f420, 0x3b377: 0x6e07b220, + 0x3b378: 0x6e07b420, 0x3b379: 0x6e07b620, 0x3b37a: 0x6e07b820, 0x3b37b: 0x6e07ba20, + 0x3b37c: 0x6e07bc20, 0x3b37d: 0x6e07be20, 0x3b37e: 0x6e17f620, 0x3b37f: 0x6e17f820, + // Block 0xece, offset 0x3b380 + 0x3b380: 0x6e17fa20, 0x3b381: 0x6e17fc20, 0x3b382: 0x6e17fe20, 0x3b383: 0x6e180020, + 0x3b384: 0x6e180220, 0x3b385: 0x6e180420, 0x3b386: 0x6e180620, 0x3b387: 0x6e180820, + 0x3b388: 0x6e180a20, 0x3b389: 0x6e180c20, 0x3b38a: 0x6e180e20, 0x3b38b: 0x6e181020, + 0x3b38c: 0x6e181220, 0x3b38d: 0x6e181420, 0x3b38e: 0x6e181620, 0x3b38f: 0x6e181820, + 0x3b390: 0x6e181a20, 0x3b391: 0x6e181c20, 0x3b392: 0x6e181e20, 0x3b393: 0x6e24b620, + 0x3b394: 0x6e24b820, 0x3b395: 0x6e24ba20, 0x3b396: 0x6e24bc20, 0x3b397: 0x6e24be20, + 0x3b398: 0x6e24c020, 0x3b399: 0x6e24c220, 0x3b39a: 0x6e24c420, 0x3b39b: 0x6e24c620, + 0x3b39c: 0x6e24c820, 0x3b39d: 0x6e24ca20, 0x3b39e: 0x6e24cc20, 0x3b39f: 0x6e24ce20, + 0x3b3a0: 0x6e24d020, 0x3b3a1: 0x6e24d220, 0x3b3a2: 0x6e24d420, 0x3b3a3: 0x6e24d620, + 0x3b3a4: 0x6e2e8420, 0x3b3a5: 0x6e2e8620, 0x3b3a6: 0x6e2e8820, 0x3b3a7: 0x6e2e8a20, + 0x3b3a8: 0x6e2e8c20, 0x3b3a9: 0x6e2e8e20, 0x3b3aa: 0x6e2e9020, 0x3b3ab: 0x6e2e9220, + 0x3b3ac: 0x6e2e9420, 0x3b3ad: 0x6e360420, 0x3b3ae: 0x6e360620, 0x3b3af: 0x6e360820, + 0x3b3b0: 0x6e360a20, 0x3b3b1: 0x6e360c20, 0x3b3b2: 0x6e360e20, 0x3b3b3: 0x6e361020, + 0x3b3b4: 0x6e361220, 0x3b3b5: 0x6e361420, 0x3b3b6: 0x6e3b5020, 0x3b3b7: 0x6e3f0820, + 0x3b3b8: 0x6e3f0a20, 0x3b3b9: 0x6e3f0c20, 0x3b3ba: 0x6e3f0e20, 0x3b3bb: 0x6e44bc20, + 0x3b3bc: 0x6e457420, 0x3b3bd: 0x6e465220, 0x3b3be: 0x6c288e20, 0x3b3bf: 0x6c289020, + // Block 0xecf, offset 0x3b3c0 + 0x3b3c0: 0x6c289220, 0x3b3c1: 0x6c42a420, 0x3b3c2: 0x6c42a620, 0x3b3c3: 0x6c637820, + 0x3b3c4: 0x6c8a8020, 0x3b3c5: 0x6c8a8220, 0x3b3c6: 0x6cb70220, 0x3b3c7: 0x6c8a8420, + 0x3b3c8: 0x6cb70420, 0x3b3c9: 0x6cb70620, 0x3b3ca: 0x6ce7e020, 0x3b3cb: 0x6ce7e220, + 0x3b3cc: 0x6d170020, 0x3b3cd: 0x6d452420, 0x3b3ce: 0x6d452620, 0x3b3cf: 0x6d720220, + 0x3b3d0: 0x6c638020, 0x3b3d1: 0x6cb70e20, 0x3b3d2: 0x6cb71020, 0x3b3d3: 0x6ce7ee20, + 0x3b3d4: 0x6d170620, 0x3b3d5: 0x6d452820, 0x3b3d6: 0x6d452a20, 0x3b3d7: 0x6d452c20, + 0x3b3d8: 0x6d452e20, 0x3b3d9: 0x6d453020, 0x3b3da: 0x6d720c20, 0x3b3db: 0x6d720e20, + 0x3b3dc: 0x6d721020, 0x3b3dd: 0x6d721220, 0x3b3de: 0x6d721420, 0x3b3df: 0x6d721620, + 0x3b3e0: 0x6d721820, 0x3b3e1: 0x6d9b9020, 0x3b3e2: 0x6d9b9220, 0x3b3e3: 0x6d9b9420, + 0x3b3e4: 0x6d9b9620, 0x3b3e5: 0x6d9b9820, 0x3b3e6: 0x6d9b9a20, 0x3b3e7: 0x6d9b9c20, + 0x3b3e8: 0x6dbe4a20, 0x3b3e9: 0x6dbe4c20, 0x3b3ea: 0x6ddbfc20, 0x3b3eb: 0x6ddbfe20, + 0x3b3ec: 0x6ddc0020, 0x3b3ed: 0x6ddc0220, 0x3b3ee: 0x6de36c20, 0x3b3ef: 0x6df3e620, + 0x3b3f0: 0x6dface20, 0x3b3f1: 0x6df3e820, 0x3b3f2: 0x6e07c620, 0x3b3f3: 0x6e182220, + 0x3b3f4: 0x6e24dc20, 0x3b3f5: 0x6e2e9620, 0x3b3f6: 0x6e2e9820, 0x3b3f7: 0x6e361620, + 0x3b3f8: 0x6e3b5420, 0x3b3f9: 0x6e419c20, 0x3b3fa: 0x6c8a8c20, 0x3b3fb: 0x6d170a20, + 0x3b3fc: 0x6d170c20, 0x3b3fd: 0x6d170e20, 0x3b3fe: 0x6d453c20, 0x3b3ff: 0x6d453e20, + // Block 0xed0, offset 0x3b400 + 0x3b400: 0x6d454020, 0x3b401: 0x6d454220, 0x3b402: 0x6d721a20, 0x3b403: 0x6d454420, + 0x3b404: 0x6d454620, 0x3b405: 0x6d721c20, 0x3b406: 0x6d721e20, 0x3b407: 0x6d9ba620, + 0x3b408: 0x6d9ba820, 0x3b409: 0x6dbe5c20, 0x3b40a: 0x6dbe5e20, 0x3b40b: 0x6dbe6020, + 0x3b40c: 0x6ddc0820, 0x3b40d: 0x6ddc0a20, 0x3b40e: 0x6ddc0c20, 0x3b40f: 0x6dbe6220, + 0x3b410: 0x6ddc0e20, 0x3b411: 0x6ddc1020, 0x3b412: 0x6ddc1220, 0x3b413: 0x6df3f020, + 0x3b414: 0x6df3f220, 0x3b415: 0x6df3f420, 0x3b416: 0x6df3f620, 0x3b417: 0x6df3f820, + 0x3b418: 0x6df3fa20, 0x3b419: 0x6e07cc20, 0x3b41a: 0x6e07ce20, 0x3b41b: 0x6e07d020, + 0x3b41c: 0x6e07d220, 0x3b41d: 0x6e182620, 0x3b41e: 0x6e182820, 0x3b41f: 0x6e182a20, + 0x3b420: 0x6e182c20, 0x3b421: 0x6e182e20, 0x3b422: 0x6e24de20, 0x3b423: 0x6e24e020, + 0x3b424: 0x6e2e9c20, 0x3b425: 0x6e3f1020, 0x3b426: 0x6e437620, 0x3b427: 0x6c8a9020, + 0x3b428: 0x6cb71220, 0x3b429: 0x6ce7f620, 0x3b42a: 0x6ce7f820, 0x3b42b: 0x6ce7fa20, + 0x3b42c: 0x6ce7fc20, 0x3b42d: 0x6ce7fe20, 0x3b42e: 0x6ce80020, 0x3b42f: 0x6ce80220, + 0x3b430: 0x6d172220, 0x3b431: 0x6d172420, 0x3b432: 0x6d172620, 0x3b433: 0x6d172820, + 0x3b434: 0x6d172a20, 0x3b435: 0x6d172c20, 0x3b436: 0x6d172e20, 0x3b437: 0x6d457c20, + 0x3b438: 0x6d457e20, 0x3b439: 0x6d458020, 0x3b43a: 0x6d458220, 0x3b43b: 0x6d458420, + 0x3b43c: 0x6d458620, 0x3b43d: 0x6d458820, 0x3b43e: 0x6d458a20, 0x3b43f: 0x6d726420, + // Block 0xed1, offset 0x3b440 + 0x3b440: 0x6d458c20, 0x3b441: 0x6d458e20, 0x3b442: 0x6d459020, 0x3b443: 0x6d459220, + 0x3b444: 0x6d459420, 0x3b445: 0x6d459620, 0x3b446: 0x6d726620, 0x3b447: 0x6d459820, + 0x3b448: 0x6d459a20, 0x3b449: 0x6d459c20, 0x3b44a: 0x6d459e20, 0x3b44b: 0x6d45a020, + 0x3b44c: 0x6d45a220, 0x3b44d: 0x6d726820, 0x3b44e: 0x6d726a20, 0x3b44f: 0x6d726c20, + 0x3b450: 0x6d726e20, 0x3b451: 0x6d727020, 0x3b452: 0x6d727220, 0x3b453: 0x6d727420, + 0x3b454: 0x6d727620, 0x3b455: 0x6d727820, 0x3b456: 0x6d727a20, 0x3b457: 0x6d727c20, + 0x3b458: 0x6d727e20, 0x3b459: 0x6d728020, 0x3b45a: 0x6d728220, 0x3b45b: 0x6d728420, + 0x3b45c: 0x6d728620, 0x3b45d: 0x6d728820, 0x3b45e: 0x6d728a20, 0x3b45f: 0x6d728c20, + 0x3b460: 0x6d728e20, 0x3b461: 0x6d729020, 0x3b462: 0x6d729220, 0x3b463: 0x6d729420, + 0x3b464: 0x6d729620, 0x3b465: 0x6d729820, 0x3b466: 0x6d729a20, 0x3b467: 0x6d729c20, + 0x3b468: 0x6d729e20, 0x3b469: 0x6d72a020, 0x3b46a: 0x6d72a220, 0x3b46b: 0x6d72a420, + 0x3b46c: 0x6d72a620, 0x3b46d: 0x6d72a820, 0x3b46e: 0x6d9bde20, 0x3b46f: 0x6d9be020, + 0x3b470: 0x6d9be220, 0x3b471: 0x6d9be420, 0x3b472: 0x6d9be620, 0x3b473: 0x6d9be820, + 0x3b474: 0x6d9bea20, 0x3b475: 0x6d9bec20, 0x3b476: 0x6d9bee20, 0x3b477: 0x6d9bf020, + 0x3b478: 0x6d9bf220, 0x3b479: 0x6d9bf420, 0x3b47a: 0x6d9bf620, 0x3b47b: 0x6d9bf820, + 0x3b47c: 0x6d9bfa20, 0x3b47d: 0x6d9bfc20, 0x3b47e: 0x6d9bfe20, 0x3b47f: 0x6d9c0020, + // Block 0xed2, offset 0x3b480 + 0x3b480: 0x6d9c0220, 0x3b481: 0x6d9c0420, 0x3b482: 0x6d9c0620, 0x3b483: 0x6d9c0820, + 0x3b484: 0x6d9c0a20, 0x3b485: 0x6d9c0c20, 0x3b486: 0x6d9c0e20, 0x3b487: 0x6d9c1020, + 0x3b488: 0x6d9c1220, 0x3b489: 0x6d9c1420, 0x3b48a: 0x6d9c1620, 0x3b48b: 0x6d9c1820, + 0x3b48c: 0x6d9c1a20, 0x3b48d: 0x6d9c1c20, 0x3b48e: 0x6d9c1e20, 0x3b48f: 0x6d9c2020, + 0x3b490: 0x6d9c2220, 0x3b491: 0x6d9c2420, 0x3b492: 0x6d9c2620, 0x3b493: 0x6d9c2820, + 0x3b494: 0x6d9c2a20, 0x3b495: 0x6d9c2c20, 0x3b496: 0x6dbe9020, 0x3b497: 0x6dbe9220, + 0x3b498: 0x6dbe9420, 0x3b499: 0x6dbe9620, 0x3b49a: 0x6dbe9820, 0x3b49b: 0x6dbe9a20, + 0x3b49c: 0x6dbe9c20, 0x3b49d: 0x6dbe9e20, 0x3b49e: 0x6dbea020, 0x3b49f: 0x6dbea220, + 0x3b4a0: 0x6dbea420, 0x3b4a1: 0x6dbea620, 0x3b4a2: 0x6dbea820, 0x3b4a3: 0x6dbeaa20, + 0x3b4a4: 0x6dbeac20, 0x3b4a5: 0x6dbeae20, 0x3b4a6: 0x6dbeb020, 0x3b4a7: 0x6dbeb220, + 0x3b4a8: 0x6dbeb420, 0x3b4a9: 0x6dbeb620, 0x3b4aa: 0x6dbeb820, 0x3b4ab: 0x6dbeba20, + 0x3b4ac: 0x6dbebc20, 0x3b4ad: 0x6ddc4820, 0x3b4ae: 0x6ddc4a20, 0x3b4af: 0x6ddc4c20, + 0x3b4b0: 0x6ddc4e20, 0x3b4b1: 0x6ddc5020, 0x3b4b2: 0x6ddc5220, 0x3b4b3: 0x6ddc5420, + 0x3b4b4: 0x6ddc5620, 0x3b4b5: 0x6ddc5820, 0x3b4b6: 0x6ddc5a20, 0x3b4b7: 0x6ddc5c20, + 0x3b4b8: 0x6ddc5e20, 0x3b4b9: 0x6ddc6020, 0x3b4ba: 0x6ddc6220, 0x3b4bb: 0x6ddc6420, + 0x3b4bc: 0x6ddc6620, 0x3b4bd: 0x6ddc6820, 0x3b4be: 0x6ddc6a20, 0x3b4bf: 0x6ddc6c20, + // Block 0xed3, offset 0x3b4c0 + 0x3b4c0: 0x6ddc6e20, 0x3b4c1: 0x6ddc7020, 0x3b4c2: 0x6ddc7220, 0x3b4c3: 0x6ddc7420, + 0x3b4c4: 0x6ddc7620, 0x3b4c5: 0x6ddc7820, 0x3b4c6: 0x6ddc7a20, 0x3b4c7: 0x6ddc7c20, + 0x3b4c8: 0x6ddc7e20, 0x3b4c9: 0x6ddc8020, 0x3b4ca: 0x6ddc8220, 0x3b4cb: 0x6ddc8420, + 0x3b4cc: 0x6ddc8620, 0x3b4cd: 0x6ddc8820, 0x3b4ce: 0x6ddc8a20, 0x3b4cf: 0x6ddc8c20, + 0x3b4d0: 0x6ddc8e20, 0x3b4d1: 0x6ddc9020, 0x3b4d2: 0x6ddc9220, 0x3b4d3: 0x6ddc9420, + 0x3b4d4: 0x6ddc9620, 0x3b4d5: 0x6ddc9820, 0x3b4d6: 0x6ddc9a20, 0x3b4d7: 0x6df43420, + 0x3b4d8: 0x6df43620, 0x3b4d9: 0x6df43820, 0x3b4da: 0x6df43a20, 0x3b4db: 0x6df43c20, + 0x3b4dc: 0x6df43e20, 0x3b4dd: 0x6df44020, 0x3b4de: 0x6ddc9c20, 0x3b4df: 0x6df44220, + 0x3b4e0: 0x6df44420, 0x3b4e1: 0x6df44620, 0x3b4e2: 0x6df44820, 0x3b4e3: 0x6df44a20, + 0x3b4e4: 0x6df44c20, 0x3b4e5: 0x6df44e20, 0x3b4e6: 0x6df45020, 0x3b4e7: 0x6df45220, + 0x3b4e8: 0x6df45420, 0x3b4e9: 0x6df45620, 0x3b4ea: 0x6df45820, 0x3b4eb: 0x6df45a20, + 0x3b4ec: 0x6df45c20, 0x3b4ed: 0x6df45e20, 0x3b4ee: 0x6df46020, 0x3b4ef: 0x6df46220, + 0x3b4f0: 0x6df46420, 0x3b4f1: 0x6df46620, 0x3b4f2: 0x6df46820, 0x3b4f3: 0x6df46a20, + 0x3b4f4: 0x6df46c20, 0x3b4f5: 0x6df46e20, 0x3b4f6: 0x6df47020, 0x3b4f7: 0x6dbebe20, + 0x3b4f8: 0x6df47220, 0x3b4f9: 0x6df47420, 0x3b4fa: 0x6df47620, 0x3b4fb: 0x6df47820, + 0x3b4fc: 0x6df47a20, 0x3b4fd: 0x6e080620, 0x3b4fe: 0x6e080820, 0x3b4ff: 0x6e080a20, + // Block 0xed4, offset 0x3b500 + 0x3b500: 0x6e080c20, 0x3b501: 0x6e080e20, 0x3b502: 0x6e081020, 0x3b503: 0x6e081220, + 0x3b504: 0x6e081420, 0x3b505: 0x6e081620, 0x3b506: 0x6e081820, 0x3b507: 0x6e081a20, + 0x3b508: 0x6e081c20, 0x3b509: 0x6e081e20, 0x3b50a: 0x6e082020, 0x3b50b: 0x6e082220, + 0x3b50c: 0x6e082420, 0x3b50d: 0x6e082620, 0x3b50e: 0x6e082820, 0x3b50f: 0x6e082a20, + 0x3b510: 0x6e082c20, 0x3b511: 0x6e082e20, 0x3b512: 0x6e083020, 0x3b513: 0x6e083220, + 0x3b514: 0x6e083420, 0x3b515: 0x6e083620, 0x3b516: 0x6e083820, 0x3b517: 0x6e083a20, + 0x3b518: 0x6e083c20, 0x3b519: 0x6e083e20, 0x3b51a: 0x6e084020, 0x3b51b: 0x6e084220, + 0x3b51c: 0x6e084420, 0x3b51d: 0x6e084620, 0x3b51e: 0x6e084820, 0x3b51f: 0x6e084a20, + 0x3b520: 0x6e084c20, 0x3b521: 0x6e084e20, 0x3b522: 0x6e085020, 0x3b523: 0x6e085220, + 0x3b524: 0x6e085420, 0x3b525: 0x6e085620, 0x3b526: 0x6e085820, 0x3b527: 0x6e085a20, + 0x3b528: 0x6e085c20, 0x3b529: 0x6e085e20, 0x3b52a: 0x6e086020, 0x3b52b: 0x6e186220, + 0x3b52c: 0x6e186420, 0x3b52d: 0x6e186620, 0x3b52e: 0x6e186820, 0x3b52f: 0x6e186a20, + 0x3b530: 0x6e186c20, 0x3b531: 0x6e186e20, 0x3b532: 0x6e187020, 0x3b533: 0x6e187220, + 0x3b534: 0x6e187420, 0x3b535: 0x6e187620, 0x3b536: 0x6e187820, 0x3b537: 0x6e187a20, + 0x3b538: 0x6e187c20, 0x3b539: 0x6e187e20, 0x3b53a: 0x6e188020, 0x3b53b: 0x6e188220, + 0x3b53c: 0x6e188420, 0x3b53d: 0x6e188620, 0x3b53e: 0x6e188820, 0x3b53f: 0x6e188a20, + // Block 0xed5, offset 0x3b540 + 0x3b540: 0x6e188c20, 0x3b541: 0x6e188e20, 0x3b542: 0x6e250a20, 0x3b543: 0x6e250c20, + 0x3b544: 0x6e250e20, 0x3b545: 0x6e251020, 0x3b546: 0x6e251220, 0x3b547: 0x6e251420, + 0x3b548: 0x6e251620, 0x3b549: 0x6e251820, 0x3b54a: 0x6e251a20, 0x3b54b: 0x6e251c20, + 0x3b54c: 0x6e251e20, 0x3b54d: 0x6e252020, 0x3b54e: 0x6e252220, 0x3b54f: 0x6e252420, + 0x3b550: 0x6e252620, 0x3b551: 0x6e252820, 0x3b552: 0x6e252a20, 0x3b553: 0x6e252c20, + 0x3b554: 0x6e252e20, 0x3b555: 0x6e253020, 0x3b556: 0x6e253220, 0x3b557: 0x6e253420, + 0x3b558: 0x6e253620, 0x3b559: 0x6e253820, 0x3b55a: 0x6e253a20, 0x3b55b: 0x6e253c20, + 0x3b55c: 0x6e253e20, 0x3b55d: 0x6e254020, 0x3b55e: 0x6e2eb220, 0x3b55f: 0x6e2eb420, + 0x3b560: 0x6e2eb620, 0x3b561: 0x6e2eb820, 0x3b562: 0x6e2eba20, 0x3b563: 0x6e2ebc20, + 0x3b564: 0x6e2ebe20, 0x3b565: 0x6e2ec020, 0x3b566: 0x6e2ec220, 0x3b567: 0x6e2ec420, + 0x3b568: 0x6e2ec620, 0x3b569: 0x6e2ec820, 0x3b56a: 0x6e2eca20, 0x3b56b: 0x6e2ecc20, + 0x3b56c: 0x6e2ece20, 0x3b56d: 0x6e2ed020, 0x3b56e: 0x6e2ed220, 0x3b56f: 0x6e2ed420, + 0x3b570: 0x6e2ed620, 0x3b571: 0x6e2ed820, 0x3b572: 0x6e2eda20, 0x3b573: 0x6e2edc20, + 0x3b574: 0x6e2ede20, 0x3b575: 0x6e2ee020, 0x3b576: 0x6e362820, 0x3b577: 0x6e362a20, + 0x3b578: 0x6e362c20, 0x3b579: 0x6e362e20, 0x3b57a: 0x6e363020, 0x3b57b: 0x6e363220, + 0x3b57c: 0x6e363420, 0x3b57d: 0x6e363620, 0x3b57e: 0x6e363820, 0x3b57f: 0x6e363a20, + // Block 0xed6, offset 0x3b580 + 0x3b580: 0x6e363c20, 0x3b581: 0x6e363e20, 0x3b582: 0x6e3b5820, 0x3b583: 0x6e3b5a20, + 0x3b584: 0x6e3b5c20, 0x3b585: 0x6e3b5e20, 0x3b586: 0x6e3b6020, 0x3b587: 0x6e3b6220, + 0x3b588: 0x6e3b6420, 0x3b589: 0x6e3b6620, 0x3b58a: 0x6e3b6820, 0x3b58b: 0x6e3b6a20, + 0x3b58c: 0x6e3b6c20, 0x3b58d: 0x6e3b6e20, 0x3b58e: 0x6e3b7020, 0x3b58f: 0x6e3f1c20, + 0x3b590: 0x6e3f1e20, 0x3b591: 0x6e3f2020, 0x3b592: 0x6e3f2220, 0x3b593: 0x6e3f2420, + 0x3b594: 0x6e41ac20, 0x3b595: 0x6e41ae20, 0x3b596: 0x6e41b020, 0x3b597: 0x6e41b220, + 0x3b598: 0x6e437e20, 0x3b599: 0x6e438020, 0x3b59a: 0x6e438220, 0x3b59b: 0x6e438420, + 0x3b59c: 0x6e438620, 0x3b59d: 0x6e438820, 0x3b59e: 0x6e438a20, 0x3b59f: 0x6e44c420, + 0x3b5a0: 0x6e44c620, 0x3b5a1: 0x6e457820, 0x3b5a2: 0x6e457a20, 0x3b5a3: 0x6e45ec20, + 0x3b5a4: 0x6e45ee20, 0x3b5a5: 0x6e46f420, 0x3b5a6: 0x6c28a020, 0x3b5a7: 0x6c42c620, + 0x3b5a8: 0x6c42c820, 0x3b5a9: 0x6c42ca20, 0x3b5aa: 0x6c42cc20, 0x3b5ab: 0x6c42ce20, + 0x3b5ac: 0x6c42d020, 0x3b5ad: 0x6c42d220, 0x3b5ae: 0x6c639620, 0x3b5af: 0x6c42d420, + 0x3b5b0: 0x6c639820, 0x3b5b1: 0x6c639a20, 0x3b5b2: 0x6c639c20, 0x3b5b3: 0x6c639e20, + 0x3b5b4: 0x6c63a020, 0x3b5b5: 0x6c63a220, 0x3b5b6: 0x6c63a420, 0x3b5b7: 0x6c8aa020, + 0x3b5b8: 0x6c8aa220, 0x3b5b9: 0x6c8aa420, 0x3b5ba: 0x6c8aa620, 0x3b5bb: 0x6cb72220, + 0x3b5bc: 0x6cb72420, 0x3b5bd: 0x6cb72620, 0x3b5be: 0x6ce80e20, 0x3b5bf: 0x6ce81020, + // Block 0xed7, offset 0x3b5c0 + 0x3b5c0: 0x6ce81220, 0x3b5c1: 0x6ce81420, 0x3b5c2: 0x6ce81620, 0x3b5c3: 0x6ce81820, + 0x3b5c4: 0x6d173a20, 0x3b5c5: 0x6ce81a20, 0x3b5c6: 0x6ce81c20, 0x3b5c7: 0x6ce81e20, + 0x3b5c8: 0x6ce82020, 0x3b5c9: 0x6ce82220, 0x3b5ca: 0x6ce82420, 0x3b5cb: 0x6d173c20, + 0x3b5cc: 0x6d173e20, 0x3b5cd: 0x6d174020, 0x3b5ce: 0x6d72ac20, 0x3b5cf: 0x6d72ae20, + 0x3b5d0: 0x6ddca620, 0x3b5d1: 0x6cb73020, 0x3b5d2: 0x6cb73220, 0x3b5d3: 0x6cb73420, + 0x3b5d4: 0x6ce82e20, 0x3b5d5: 0x6ce83020, 0x3b5d6: 0x6ce83220, 0x3b5d7: 0x6ce83420, + 0x3b5d8: 0x6ce83620, 0x3b5d9: 0x6ce83820, 0x3b5da: 0x6ce83a20, 0x3b5db: 0x6ce83c20, + 0x3b5dc: 0x6d175220, 0x3b5dd: 0x6d175420, 0x3b5de: 0x6d175620, 0x3b5df: 0x6d175820, + 0x3b5e0: 0x6d175a20, 0x3b5e1: 0x6d175c20, 0x3b5e2: 0x6d175e20, 0x3b5e3: 0x6d176020, + 0x3b5e4: 0x6d176220, 0x3b5e5: 0x6d176420, 0x3b5e6: 0x6d176620, 0x3b5e7: 0x6d176820, + 0x3b5e8: 0x6d176a20, 0x3b5e9: 0x6d176c20, 0x3b5ea: 0x6d176e20, 0x3b5eb: 0x6d177020, + 0x3b5ec: 0x6d45c220, 0x3b5ed: 0x6d45c420, 0x3b5ee: 0x6d45c620, 0x3b5ef: 0x6d45c820, + 0x3b5f0: 0x6d45ca20, 0x3b5f1: 0x6d45cc20, 0x3b5f2: 0x6d45ce20, 0x3b5f3: 0x6d45d020, + 0x3b5f4: 0x6d45d220, 0x3b5f5: 0x6d45d420, 0x3b5f6: 0x6d45d620, 0x3b5f7: 0x6d45d820, + 0x3b5f8: 0x6d45da20, 0x3b5f9: 0x6d45dc20, 0x3b5fa: 0x6d45de20, 0x3b5fb: 0x6d45e020, + 0x3b5fc: 0x6d45e220, 0x3b5fd: 0x6d72c820, 0x3b5fe: 0x6d72ca20, 0x3b5ff: 0x6d72cc20, + // Block 0xed8, offset 0x3b600 + 0x3b600: 0x6d72ce20, 0x3b601: 0x6d72d020, 0x3b602: 0x6d72d220, 0x3b603: 0x6d72d420, + 0x3b604: 0x6d72d620, 0x3b605: 0x6d72d820, 0x3b606: 0x6d72da20, 0x3b607: 0x6d72dc20, + 0x3b608: 0x6d72de20, 0x3b609: 0x6d9c4c20, 0x3b60a: 0x6d9c4e20, 0x3b60b: 0x6d9c5020, + 0x3b60c: 0x6d9c5220, 0x3b60d: 0x6d9c5420, 0x3b60e: 0x6d9c5620, 0x3b60f: 0x6d9c5820, + 0x3b610: 0x6d9c5a20, 0x3b611: 0x6d9c5c20, 0x3b612: 0x6d9c5e20, 0x3b613: 0x6d9c6020, + 0x3b614: 0x6d9c6220, 0x3b615: 0x6d9c6420, 0x3b616: 0x6d9c6620, 0x3b617: 0x6dbed620, + 0x3b618: 0x6dbed820, 0x3b619: 0x6dbeda20, 0x3b61a: 0x6dbedc20, 0x3b61b: 0x6dbede20, + 0x3b61c: 0x6dbee020, 0x3b61d: 0x6dbee220, 0x3b61e: 0x6dbee420, 0x3b61f: 0x6dbee620, + 0x3b620: 0x6dbee820, 0x3b621: 0x6dbeea20, 0x3b622: 0x6dbeec20, 0x3b623: 0x6dbeee20, + 0x3b624: 0x6dbef020, 0x3b625: 0x6dbef220, 0x3b626: 0x6dbef420, 0x3b627: 0x6dbef620, + 0x3b628: 0x6dbef820, 0x3b629: 0x6dbefa20, 0x3b62a: 0x6dbefc20, 0x3b62b: 0x6dbefe20, + 0x3b62c: 0x6dbf0020, 0x3b62d: 0x6ddcb020, 0x3b62e: 0x6ddcb220, 0x3b62f: 0x6ddcb420, + 0x3b630: 0x6ddcb620, 0x3b631: 0x6ddcb820, 0x3b632: 0x6ddcba20, 0x3b633: 0x6ddcbc20, + 0x3b634: 0x6ddcbe20, 0x3b635: 0x6ddcc020, 0x3b636: 0x6ddcc220, 0x3b637: 0x6ddcc420, + 0x3b638: 0x6ddcc620, 0x3b639: 0x6ddcc820, 0x3b63a: 0x6ddcca20, 0x3b63b: 0x6ddccc20, + 0x3b63c: 0x6ddcce20, 0x3b63d: 0x6ddcd020, 0x3b63e: 0x6ddcd220, 0x3b63f: 0x6ddcd420, + // Block 0xed9, offset 0x3b640 + 0x3b640: 0x6df49220, 0x3b641: 0x6df49420, 0x3b642: 0x6df49620, 0x3b643: 0x6df49820, + 0x3b644: 0x6df49a20, 0x3b645: 0x6df49c20, 0x3b646: 0x6df49e20, 0x3b647: 0x6df4a020, + 0x3b648: 0x6df4a220, 0x3b649: 0x6e088420, 0x3b64a: 0x6e088620, 0x3b64b: 0x6e088820, + 0x3b64c: 0x6e088a20, 0x3b64d: 0x6e088c20, 0x3b64e: 0x6e088e20, 0x3b64f: 0x6e089020, + 0x3b650: 0x6e089220, 0x3b651: 0x6e089420, 0x3b652: 0x6e089620, 0x3b653: 0x6e089820, + 0x3b654: 0x6e089a20, 0x3b655: 0x6e089c20, 0x3b656: 0x6e089e20, 0x3b657: 0x6e189a20, + 0x3b658: 0x6e189c20, 0x3b659: 0x6e189e20, 0x3b65a: 0x6e18a020, 0x3b65b: 0x6e18a220, + 0x3b65c: 0x6e18a420, 0x3b65d: 0x6e18a620, 0x3b65e: 0x6e18a820, 0x3b65f: 0x6e18aa20, + 0x3b660: 0x6e254a20, 0x3b661: 0x6e254c20, 0x3b662: 0x6e254e20, 0x3b663: 0x6e255020, + 0x3b664: 0x6e255220, 0x3b665: 0x6e255420, 0x3b666: 0x6e255620, 0x3b667: 0x6e255820, + 0x3b668: 0x6e255a20, 0x3b669: 0x6e255c20, 0x3b66a: 0x6e255e20, 0x3b66b: 0x6e256020, + 0x3b66c: 0x6e2eec20, 0x3b66d: 0x6e2eee20, 0x3b66e: 0x6e2ef020, 0x3b66f: 0x6e2ef220, + 0x3b670: 0x6e2ef420, 0x3b671: 0x6e2ef620, 0x3b672: 0x6e364620, 0x3b673: 0x6e364820, + 0x3b674: 0x6e364a20, 0x3b675: 0x6e364c20, 0x3b676: 0x6e364e20, 0x3b677: 0x6e3b7620, + 0x3b678: 0x6e3b7820, 0x3b679: 0x6e3b7a20, 0x3b67a: 0x6e3b7c20, 0x3b67b: 0x6e3f2a20, + 0x3b67c: 0x6e41b620, 0x3b67d: 0x6e41b820, 0x3b67e: 0x6e438c20, 0x3b67f: 0x6d177420, + // Block 0xeda, offset 0x3b680 + 0x3b680: 0x6d177620, 0x3b681: 0x6d45e820, 0x3b682: 0x6d45ea20, 0x3b683: 0x6d45ec20, + 0x3b684: 0x6d45ee20, 0x3b685: 0x6d45f020, 0x3b686: 0x6d45f220, 0x3b687: 0x6d45f420, + 0x3b688: 0x6d45f620, 0x3b689: 0x6d45f820, 0x3b68a: 0x6d72e420, 0x3b68b: 0x6d72e620, + 0x3b68c: 0x6d72e820, 0x3b68d: 0x6d72ea20, 0x3b68e: 0x6d9c6a20, 0x3b68f: 0x6d9c6c20, + 0x3b690: 0x6d9c6e20, 0x3b691: 0x6d9c7020, 0x3b692: 0x6d9c7220, 0x3b693: 0x6d9c7420, + 0x3b694: 0x6d9c7620, 0x3b695: 0x6dbf0220, 0x3b696: 0x6dbf0420, 0x3b697: 0x6dbf0620, + 0x3b698: 0x6dbf0820, 0x3b699: 0x6dbf0a20, 0x3b69a: 0x6ddcdc20, 0x3b69b: 0x6ddcde20, + 0x3b69c: 0x6ddce020, 0x3b69d: 0x6ddce220, 0x3b69e: 0x6df4a620, 0x3b69f: 0x6df4a820, + 0x3b6a0: 0x6e08a020, 0x3b6a1: 0x6e08a220, 0x3b6a2: 0x6e08a420, 0x3b6a3: 0x6e08a620, + 0x3b6a4: 0x6e08a820, 0x3b6a5: 0x6e18ac20, 0x3b6a6: 0x6e18ae20, 0x3b6a7: 0x6e256620, + 0x3b6a8: 0x6e2efa20, 0x3b6a9: 0x6e2efc20, 0x3b6aa: 0x6e2efe20, 0x3b6ab: 0x6e365020, + 0x3b6ac: 0x6e365220, 0x3b6ad: 0x6e3b8020, 0x3b6ae: 0x6e3f2c20, 0x3b6af: 0x6e3f2e20, + 0x3b6b0: 0x6e41ba20, 0x3b6b1: 0x6e41bc20, 0x3b6b2: 0x6e438e20, 0x3b6b3: 0x6e45f020, + 0x3b6b4: 0x6ce84820, 0x3b6b5: 0x6ce84a20, 0x3b6b6: 0x6ce84c20, 0x3b6b7: 0x6ce84e20, + 0x3b6b8: 0x6ce85020, 0x3b6b9: 0x6d177c20, 0x3b6ba: 0x6d177e20, 0x3b6bb: 0x6d178020, + 0x3b6bc: 0x6d178220, 0x3b6bd: 0x6d178420, 0x3b6be: 0x6d178620, 0x3b6bf: 0x6d461620, + // Block 0xedb, offset 0x3b6c0 + 0x3b6c0: 0x6d461820, 0x3b6c1: 0x6d461a20, 0x3b6c2: 0x6d461c20, 0x3b6c3: 0x6d461e20, + 0x3b6c4: 0x6d462020, 0x3b6c5: 0x6d462220, 0x3b6c6: 0x6d462420, 0x3b6c7: 0x6d462620, + 0x3b6c8: 0x6d462820, 0x3b6c9: 0x6d462a20, 0x3b6ca: 0x6d462c20, 0x3b6cb: 0x6d462e20, + 0x3b6cc: 0x6d463020, 0x3b6cd: 0x6d463220, 0x3b6ce: 0x6d463420, 0x3b6cf: 0x6d463620, + 0x3b6d0: 0x6d463820, 0x3b6d1: 0x6d730420, 0x3b6d2: 0x6d730620, 0x3b6d3: 0x6d730820, + 0x3b6d4: 0x6d730a20, 0x3b6d5: 0x6d730c20, 0x3b6d6: 0x6d730e20, 0x3b6d7: 0x6d731020, + 0x3b6d8: 0x6d731220, 0x3b6d9: 0x6d731420, 0x3b6da: 0x6d731620, 0x3b6db: 0x6d731820, + 0x3b6dc: 0x6d731a20, 0x3b6dd: 0x6d731c20, 0x3b6de: 0x6d731e20, 0x3b6df: 0x6d732020, + 0x3b6e0: 0x6d732220, 0x3b6e1: 0x6d732420, 0x3b6e2: 0x6d732620, 0x3b6e3: 0x6d732820, + 0x3b6e4: 0x6d732a20, 0x3b6e5: 0x6d732c20, 0x3b6e6: 0x6d732e20, 0x3b6e7: 0x6d733020, + 0x3b6e8: 0x6d733220, 0x3b6e9: 0x6d733420, 0x3b6ea: 0x6d733620, 0x3b6eb: 0x6d733820, + 0x3b6ec: 0x6d733a20, 0x3b6ed: 0x6d733c20, 0x3b6ee: 0x6d733e20, 0x3b6ef: 0x6d734020, + 0x3b6f0: 0x6d9c9020, 0x3b6f1: 0x6d9c9220, 0x3b6f2: 0x6d9c9420, 0x3b6f3: 0x6d9c9620, + 0x3b6f4: 0x6d9c9820, 0x3b6f5: 0x6d9c9a20, 0x3b6f6: 0x6d9c9c20, 0x3b6f7: 0x6d9c9e20, + 0x3b6f8: 0x6d9ca020, 0x3b6f9: 0x6d9ca220, 0x3b6fa: 0x6d9ca420, 0x3b6fb: 0x6d9ca620, + 0x3b6fc: 0x6d9ca820, 0x3b6fd: 0x6d9caa20, 0x3b6fe: 0x6d9cac20, 0x3b6ff: 0x6d9cae20, + // Block 0xedc, offset 0x3b700 + 0x3b700: 0x6d9cb020, 0x3b701: 0x6d9cb220, 0x3b702: 0x6d9cb420, 0x3b703: 0x6d9cb620, + 0x3b704: 0x6d9cb820, 0x3b705: 0x6d9cba20, 0x3b706: 0x6d9cbc20, 0x3b707: 0x6dbf2220, + 0x3b708: 0x6dbf2420, 0x3b709: 0x6dbf2620, 0x3b70a: 0x6dbf2820, 0x3b70b: 0x6dbf2a20, + 0x3b70c: 0x6dbf2c20, 0x3b70d: 0x6dbf2e20, 0x3b70e: 0x6dbf3020, 0x3b70f: 0x6dbf3220, + 0x3b710: 0x6dbf3420, 0x3b711: 0x6dbf3620, 0x3b712: 0x6dbf3820, 0x3b713: 0x6dbf3a20, + 0x3b714: 0x6dbf3c20, 0x3b715: 0x6dbf3e20, 0x3b716: 0x6dbf4020, 0x3b717: 0x6dbf4220, + 0x3b718: 0x6dbf4420, 0x3b719: 0x6dbf4620, 0x3b71a: 0x6dbf4820, 0x3b71b: 0x6dbf4a20, + 0x3b71c: 0x6dbf4c20, 0x3b71d: 0x6dbf4e20, 0x3b71e: 0x6ddcfc20, 0x3b71f: 0x6ddcfe20, + 0x3b720: 0x6ddd0020, 0x3b721: 0x6ddd0220, 0x3b722: 0x6ddd0420, 0x3b723: 0x6ddd0620, + 0x3b724: 0x6ddd0820, 0x3b725: 0x6ddd0a20, 0x3b726: 0x6ddd0c20, 0x3b727: 0x6ddd0e20, + 0x3b728: 0x6ddd1020, 0x3b729: 0x6ddd1220, 0x3b72a: 0x6ddd1420, 0x3b72b: 0x6ddd1620, + 0x3b72c: 0x6ddd1820, 0x3b72d: 0x6ddd1a20, 0x3b72e: 0x6ddd1c20, 0x3b72f: 0x6ddd1e20, + 0x3b730: 0x6ddd2020, 0x3b731: 0x6ddd2220, 0x3b732: 0x6ddd2420, 0x3b733: 0x6ddd2620, + 0x3b734: 0x6ddd2820, 0x3b735: 0x6ddd2a20, 0x3b736: 0x6ddd2c20, 0x3b737: 0x6ddd2e20, + 0x3b738: 0x6ddd3020, 0x3b739: 0x6ddd3220, 0x3b73a: 0x6df4c020, 0x3b73b: 0x6df4c220, + 0x3b73c: 0x6df4c420, 0x3b73d: 0x6df4c620, 0x3b73e: 0x6df4c820, 0x3b73f: 0x6df4ca20, + // Block 0xedd, offset 0x3b740 + 0x3b740: 0x6df4cc20, 0x3b741: 0x6df4ce20, 0x3b742: 0x6df4d020, 0x3b743: 0x6df4d220, + 0x3b744: 0x6df4d420, 0x3b745: 0x6df4d620, 0x3b746: 0x6df4d820, 0x3b747: 0x6df4da20, + 0x3b748: 0x6df4dc20, 0x3b749: 0x6df4de20, 0x3b74a: 0x6df4e020, 0x3b74b: 0x6df4e220, + 0x3b74c: 0x6df4e420, 0x3b74d: 0x6df4e620, 0x3b74e: 0x6df4e820, 0x3b74f: 0x6df4ea20, + 0x3b750: 0x6df4ec20, 0x3b751: 0x6df4ee20, 0x3b752: 0x6df4f020, 0x3b753: 0x6df4f220, + 0x3b754: 0x6df4f420, 0x3b755: 0x6df4f620, 0x3b756: 0x6e08ba20, 0x3b757: 0x6e08bc20, + 0x3b758: 0x6e08be20, 0x3b759: 0x6e08c020, 0x3b75a: 0x6e08c220, 0x3b75b: 0x6e08c420, + 0x3b75c: 0x6e08c620, 0x3b75d: 0x6e08c820, 0x3b75e: 0x6e08ca20, 0x3b75f: 0x6e08cc20, + 0x3b760: 0x6e08ce20, 0x3b761: 0x6e08d020, 0x3b762: 0x6e08d220, 0x3b763: 0x6e08d420, + 0x3b764: 0x6e08d620, 0x3b765: 0x6e08d820, 0x3b766: 0x6e08da20, 0x3b767: 0x6e08dc20, + 0x3b768: 0x6e08de20, 0x3b769: 0x6e08e020, 0x3b76a: 0x6e08e220, 0x3b76b: 0x6e08e420, + 0x3b76c: 0x6e08e620, 0x3b76d: 0x6e08e820, 0x3b76e: 0x6e08ea20, 0x3b76f: 0x6e18be20, + 0x3b770: 0x6e18c020, 0x3b771: 0x6e18c220, 0x3b772: 0x6e18c420, 0x3b773: 0x6e18c620, + 0x3b774: 0x6e18c820, 0x3b775: 0x6e18ca20, 0x3b776: 0x6e18cc20, 0x3b777: 0x6e18ce20, + 0x3b778: 0x6e18d020, 0x3b779: 0x6e18d220, 0x3b77a: 0x6e18d420, 0x3b77b: 0x6e18d620, + 0x3b77c: 0x6e18d820, 0x3b77d: 0x6e18da20, 0x3b77e: 0x6e18dc20, 0x3b77f: 0x6e18de20, + // Block 0xede, offset 0x3b780 + 0x3b780: 0x6e18e020, 0x3b781: 0x6e18e220, 0x3b782: 0x6e18e420, 0x3b783: 0x6e257420, + 0x3b784: 0x6e257620, 0x3b785: 0x6e257820, 0x3b786: 0x6e257a20, 0x3b787: 0x6e257c20, + 0x3b788: 0x6e257e20, 0x3b789: 0x6e258020, 0x3b78a: 0x6e258220, 0x3b78b: 0x6e258420, + 0x3b78c: 0x6e258620, 0x3b78d: 0x6e258820, 0x3b78e: 0x6e258a20, 0x3b78f: 0x6e258c20, + 0x3b790: 0x6e258e20, 0x3b791: 0x6e259020, 0x3b792: 0x6e259220, 0x3b793: 0x6e259420, + 0x3b794: 0x6e259620, 0x3b795: 0x6e259820, 0x3b796: 0x6e259a20, 0x3b797: 0x6e259c20, + 0x3b798: 0x6e259e20, 0x3b799: 0x6e25a020, 0x3b79a: 0x6e25a220, 0x3b79b: 0x6e2f0620, + 0x3b79c: 0x6e2f0820, 0x3b79d: 0x6e2f0a20, 0x3b79e: 0x6e2f0c20, 0x3b79f: 0x6e2f0e20, + 0x3b7a0: 0x6e2f1020, 0x3b7a1: 0x6e2f1220, 0x3b7a2: 0x6e2f1420, 0x3b7a3: 0x6e2f1620, + 0x3b7a4: 0x6e2f1820, 0x3b7a5: 0x6e2f1a20, 0x3b7a6: 0x6e366020, 0x3b7a7: 0x6e366220, + 0x3b7a8: 0x6e366420, 0x3b7a9: 0x6e366620, 0x3b7aa: 0x6e366820, 0x3b7ab: 0x6e366a20, + 0x3b7ac: 0x6e366c20, 0x3b7ad: 0x6e366e20, 0x3b7ae: 0x6e367020, 0x3b7af: 0x6e367220, + 0x3b7b0: 0x6e3b8820, 0x3b7b1: 0x6e3b8a20, 0x3b7b2: 0x6e3b8c20, 0x3b7b3: 0x6e3b8e20, + 0x3b7b4: 0x6e3b9020, 0x3b7b5: 0x6e3b9220, 0x3b7b6: 0x6e3b9420, 0x3b7b7: 0x6e3b9620, + 0x3b7b8: 0x6e3b9820, 0x3b7b9: 0x6e3b9a20, 0x3b7ba: 0x6e3f3220, 0x3b7bb: 0x6e3f3420, + 0x3b7bc: 0x6e3f3620, 0x3b7bd: 0x6e3f3820, 0x3b7be: 0x6e3f3a20, 0x3b7bf: 0x6e3f3c20, + // Block 0xedf, offset 0x3b7c0 + 0x3b7c0: 0x6e3f3e20, 0x3b7c1: 0x6e41c020, 0x3b7c2: 0x6e41c220, 0x3b7c3: 0x6e41c420, + 0x3b7c4: 0x6e41c620, 0x3b7c5: 0x6e439020, 0x3b7c6: 0x6e439220, 0x3b7c7: 0x6e439420, + 0x3b7c8: 0x6e45f220, 0x3b7c9: 0x6e465420, 0x3b7ca: 0x6c8ab620, 0x3b7cb: 0x6c8ab820, + 0x3b7cc: 0x6d178c20, 0x3b7cd: 0x6d463e20, 0x3b7ce: 0x6d464020, 0x3b7cf: 0x6d464220, + 0x3b7d0: 0x6d734620, 0x3b7d1: 0x6d9cc220, 0x3b7d2: 0x6dbf5420, 0x3b7d3: 0x6ddd3a20, + 0x3b7d4: 0x6ddd3c20, 0x3b7d5: 0x6e08f020, 0x3b7d6: 0x6e18ea20, 0x3b7d7: 0x6e18ec20, + 0x3b7d8: 0x6e18ee20, 0x3b7d9: 0x6e25a620, 0x3b7da: 0x6e25a820, 0x3b7db: 0x6e2f1c20, + 0x3b7dc: 0x6e367820, 0x3b7dd: 0x6e367a20, 0x3b7de: 0x6e367c20, 0x3b7df: 0x6e439620, + 0x3b7e0: 0x6d734820, 0x3b7e1: 0x6d734a20, 0x3b7e2: 0x6d9cc420, 0x3b7e3: 0x6ddd3e20, + 0x3b7e4: 0x6e08f220, 0x3b7e5: 0x6e18f020, 0x3b7e6: 0x6e18f220, 0x3b7e7: 0x6e25aa20, + 0x3b7e8: 0x6e2f1e20, 0x3b7e9: 0x6e41cc20, 0x3b7ea: 0x6e439820, 0x3b7eb: 0x6d178e20, + 0x3b7ec: 0x6d179020, 0x3b7ed: 0x6d464820, 0x3b7ee: 0x6d464a20, 0x3b7ef: 0x6d734e20, + 0x3b7f0: 0x6d735020, 0x3b7f1: 0x6d9cca20, 0x3b7f2: 0x6d9ccc20, 0x3b7f3: 0x6d9cce20, + 0x3b7f4: 0x6d9cd020, 0x3b7f5: 0x6d9cd220, 0x3b7f6: 0x6d9cd420, 0x3b7f7: 0x6d9cd620, + 0x3b7f8: 0x6d9cd820, 0x3b7f9: 0x6dbf5820, 0x3b7fa: 0x6dbf5a20, 0x3b7fb: 0x6dbf5c20, + 0x3b7fc: 0x6dbf5e20, 0x3b7fd: 0x6dbf6020, 0x3b7fe: 0x6ddd4420, 0x3b7ff: 0x6ddd4620, + // Block 0xee0, offset 0x3b800 + 0x3b800: 0x6ddd4820, 0x3b801: 0x6ddd4a20, 0x3b802: 0x6ddd4c20, 0x3b803: 0x6df4fc20, + 0x3b804: 0x6df4fe20, 0x3b805: 0x6df50020, 0x3b806: 0x6df50220, 0x3b807: 0x6e08f620, + 0x3b808: 0x6e08f820, 0x3b809: 0x6e08fa20, 0x3b80a: 0x6e08fc20, 0x3b80b: 0x6e08fe20, + 0x3b80c: 0x6e18f820, 0x3b80d: 0x6e18fa20, 0x3b80e: 0x6e18fc20, 0x3b80f: 0x6e18fe20, + 0x3b810: 0x6e190020, 0x3b811: 0x6e190220, 0x3b812: 0x6e25b020, 0x3b813: 0x6e25b220, + 0x3b814: 0x6e25b420, 0x3b815: 0x6e25b620, 0x3b816: 0x6e2f2020, 0x3b817: 0x6e2f2220, + 0x3b818: 0x6e2f2420, 0x3b819: 0x6e2f2620, 0x3b81a: 0x6e2f2820, 0x3b81b: 0x6e2f2a20, + 0x3b81c: 0x6e2f2c20, 0x3b81d: 0x6e2f2e20, 0x3b81e: 0x6e2f3020, 0x3b81f: 0x6e2f3220, + 0x3b820: 0x6e367e20, 0x3b821: 0x6e368020, 0x3b822: 0x6e368220, 0x3b823: 0x6e368420, + 0x3b824: 0x6e3ba020, 0x3b825: 0x6e3ba220, 0x3b826: 0x6e3f4020, 0x3b827: 0x6e3f4220, + 0x3b828: 0x6e3f4420, 0x3b829: 0x6e3f4620, 0x3b82a: 0x6e3f4820, 0x3b82b: 0x6e41ce20, + 0x3b82c: 0x6e41d020, 0x3b82d: 0x6e439a20, 0x3b82e: 0x6e439c20, 0x3b82f: 0x6e44cc20, + 0x3b830: 0x6e44ce20, 0x3b831: 0x6e457c20, 0x3b832: 0x6e457e20, 0x3b833: 0x6e458020, + 0x3b834: 0x6e45f420, 0x3b835: 0x6e45f620, 0x3b836: 0x6e465620, 0x3b837: 0x6e470e20, + 0x3b838: 0x6e471020, 0x3b839: 0x6cb73a20, 0x3b83a: 0x6cb73c20, 0x3b83b: 0x6cb73e20, + 0x3b83c: 0x6cb74020, 0x3b83d: 0x6ce85220, 0x3b83e: 0x6ce85420, 0x3b83f: 0x6ce85620, + // Block 0xee1, offset 0x3b840 + 0x3b840: 0x6ce85820, 0x3b841: 0x6ce85a20, 0x3b842: 0x6ce85c20, 0x3b843: 0x6ce85e20, + 0x3b844: 0x6ce86020, 0x3b845: 0x6ce86220, 0x3b846: 0x6ce86420, 0x3b847: 0x6ce86620, + 0x3b848: 0x6ce86820, 0x3b849: 0x6ce86a20, 0x3b84a: 0x6d179420, 0x3b84b: 0x6d179620, + 0x3b84c: 0x6d179820, 0x3b84d: 0x6d179a20, 0x3b84e: 0x6d179c20, 0x3b84f: 0x6d179e20, + 0x3b850: 0x6d17a020, 0x3b851: 0x6d17a220, 0x3b852: 0x6d17a420, 0x3b853: 0x6d17a620, + 0x3b854: 0x6d17a820, 0x3b855: 0x6d17aa20, 0x3b856: 0x6d17ac20, 0x3b857: 0x6d17ae20, + 0x3b858: 0x6d17b020, 0x3b859: 0x6d17b220, 0x3b85a: 0x6d17b420, 0x3b85b: 0x6d17b620, + 0x3b85c: 0x6d17b820, 0x3b85d: 0x6d17ba20, 0x3b85e: 0x6d17bc20, 0x3b85f: 0x6d17be20, + 0x3b860: 0x6d17c020, 0x3b861: 0x6d465a20, 0x3b862: 0x6d465c20, 0x3b863: 0x6d465e20, + 0x3b864: 0x6d466020, 0x3b865: 0x6d466220, 0x3b866: 0x6d466420, 0x3b867: 0x6d466620, + 0x3b868: 0x6d466820, 0x3b869: 0x6d466a20, 0x3b86a: 0x6d466c20, 0x3b86b: 0x6d466e20, + 0x3b86c: 0x6d467020, 0x3b86d: 0x6d467220, 0x3b86e: 0x6d467420, 0x3b86f: 0x6d467620, + 0x3b870: 0x6d467820, 0x3b871: 0x6d467a20, 0x3b872: 0x6d467c20, 0x3b873: 0x6d467e20, + 0x3b874: 0x6d468020, 0x3b875: 0x6d468220, 0x3b876: 0x6d468420, 0x3b877: 0x6d468620, + 0x3b878: 0x6d468820, 0x3b879: 0x6d468a20, 0x3b87a: 0x6d736020, 0x3b87b: 0x6d736220, + 0x3b87c: 0x6d736420, 0x3b87d: 0x6d736620, 0x3b87e: 0x6d736820, 0x3b87f: 0x6d736a20, + // Block 0xee2, offset 0x3b880 + 0x3b880: 0x6d736c20, 0x3b881: 0x6d736e20, 0x3b882: 0x6d737020, 0x3b883: 0x6d737220, + 0x3b884: 0x6d737420, 0x3b885: 0x6d737620, 0x3b886: 0x6d737820, 0x3b887: 0x6d737a20, + 0x3b888: 0x6d737c20, 0x3b889: 0x6d737e20, 0x3b88a: 0x6d738020, 0x3b88b: 0x6d738220, + 0x3b88c: 0x6d9ce020, 0x3b88d: 0x6d9ce220, 0x3b88e: 0x6d9ce420, 0x3b88f: 0x6d9ce620, + 0x3b890: 0x6d9ce820, 0x3b891: 0x6d9cea20, 0x3b892: 0x6d9cec20, 0x3b893: 0x6d9cee20, + 0x3b894: 0x6d9cf020, 0x3b895: 0x6d9cf220, 0x3b896: 0x6d9cf420, 0x3b897: 0x6d9cf620, + 0x3b898: 0x6d9cf820, 0x3b899: 0x6d9cfa20, 0x3b89a: 0x6d9cfc20, 0x3b89b: 0x6d9cfe20, + 0x3b89c: 0x6d9d0020, 0x3b89d: 0x6d9d0220, 0x3b89e: 0x6d9d0420, 0x3b89f: 0x6d9d0620, + 0x3b8a0: 0x6d9d0820, 0x3b8a1: 0x6d9d0a20, 0x3b8a2: 0x6dbf6620, 0x3b8a3: 0x6dbf6820, + 0x3b8a4: 0x6dbf6a20, 0x3b8a5: 0x6dbf6c20, 0x3b8a6: 0x6dbf6e20, 0x3b8a7: 0x6dbf7020, + 0x3b8a8: 0x6dbf7220, 0x3b8a9: 0x6dbf7420, 0x3b8aa: 0x6dbf7620, 0x3b8ab: 0x6dbf7820, + 0x3b8ac: 0x6dbf7a20, 0x3b8ad: 0x6dbf7c20, 0x3b8ae: 0x6dbf7e20, 0x3b8af: 0x6dbf8020, + 0x3b8b0: 0x6dbf8220, 0x3b8b1: 0x6dbf8420, 0x3b8b2: 0x6dbf8620, 0x3b8b3: 0x6dbf8820, + 0x3b8b4: 0x6dbf8a20, 0x3b8b5: 0x6ddd6220, 0x3b8b6: 0x6ddd6420, 0x3b8b7: 0x6ddd6620, + 0x3b8b8: 0x6ddd6820, 0x3b8b9: 0x6ddd6a20, 0x3b8ba: 0x6ddd6c20, 0x3b8bb: 0x6ddd6e20, + 0x3b8bc: 0x6ddd7020, 0x3b8bd: 0x6ddd7220, 0x3b8be: 0x6ddd7420, 0x3b8bf: 0x6ddd7620, + // Block 0xee3, offset 0x3b8c0 + 0x3b8c0: 0x6ddd7820, 0x3b8c1: 0x6ddd7a20, 0x3b8c2: 0x6ddd7c20, 0x3b8c3: 0x6ddd7e20, + 0x3b8c4: 0x6ddd8020, 0x3b8c5: 0x6ddd8220, 0x3b8c6: 0x6df50820, 0x3b8c7: 0x6df50a20, + 0x3b8c8: 0x6df50c20, 0x3b8c9: 0x6df50e20, 0x3b8ca: 0x6df51020, 0x3b8cb: 0x6df51220, + 0x3b8cc: 0x6df51420, 0x3b8cd: 0x6df51620, 0x3b8ce: 0x6df51820, 0x3b8cf: 0x6df51a20, + 0x3b8d0: 0x6e090420, 0x3b8d1: 0x6e090620, 0x3b8d2: 0x6e090820, 0x3b8d3: 0x6e090a20, + 0x3b8d4: 0x6e090c20, 0x3b8d5: 0x6e090e20, 0x3b8d6: 0x6e091020, 0x3b8d7: 0x6e091220, + 0x3b8d8: 0x6e091420, 0x3b8d9: 0x6e091620, 0x3b8da: 0x6e091820, 0x3b8db: 0x6e091a20, + 0x3b8dc: 0x6e190e20, 0x3b8dd: 0x6e191020, 0x3b8de: 0x6e191220, 0x3b8df: 0x6e191420, + 0x3b8e0: 0x6e191620, 0x3b8e1: 0x6e191820, 0x3b8e2: 0x6e191a20, 0x3b8e3: 0x6e191c20, + 0x3b8e4: 0x6e191e20, 0x3b8e5: 0x6e192020, 0x3b8e6: 0x6e192220, 0x3b8e7: 0x6e192420, + 0x3b8e8: 0x6e192620, 0x3b8e9: 0x6e192820, 0x3b8ea: 0x6e192a20, 0x3b8eb: 0x6e192c20, + 0x3b8ec: 0x6e192e20, 0x3b8ed: 0x6e193020, 0x3b8ee: 0x6e25c220, 0x3b8ef: 0x6e25c420, + 0x3b8f0: 0x6e25c620, 0x3b8f1: 0x6e2f3620, 0x3b8f2: 0x6e2f3820, 0x3b8f3: 0x6e2f3a20, + 0x3b8f4: 0x6e2f3c20, 0x3b8f5: 0x6e2f3e20, 0x3b8f6: 0x6e2f4020, 0x3b8f7: 0x6e2f4220, + 0x3b8f8: 0x6e2f4420, 0x3b8f9: 0x6e2f4620, 0x3b8fa: 0x6e369020, 0x3b8fb: 0x6e369220, + 0x3b8fc: 0x6e369420, 0x3b8fd: 0x6e369620, 0x3b8fe: 0x6e369820, 0x3b8ff: 0x6e3ba420, + // Block 0xee4, offset 0x3b900 + 0x3b900: 0x6e3f4a20, 0x3b901: 0x6e3f4c20, 0x3b902: 0x6e3f4e20, 0x3b903: 0x6e3f5020, + 0x3b904: 0x6e41d220, 0x3b905: 0x6e41d420, 0x3b906: 0x6e43a020, 0x3b907: 0x6e43a220, + 0x3b908: 0x6e44d020, 0x3b909: 0x6e45f820, 0x3b90a: 0x6e465820, 0x3b90b: 0x6cb74820, + 0x3b90c: 0x6d17ce20, 0x3b90d: 0x6d17d020, 0x3b90e: 0x6d17d220, 0x3b90f: 0x6d17d420, + 0x3b910: 0x6d17d620, 0x3b911: 0x6d17d820, 0x3b912: 0x6d17da20, 0x3b913: 0x6d17dc20, + 0x3b914: 0x6d469a20, 0x3b915: 0x6d469c20, 0x3b916: 0x6d469e20, 0x3b917: 0x6d46a020, + 0x3b918: 0x6d46a220, 0x3b919: 0x6d46a420, 0x3b91a: 0x6d46a620, 0x3b91b: 0x6d46a820, + 0x3b91c: 0x6d46aa20, 0x3b91d: 0x6d46ac20, 0x3b91e: 0x6d46ae20, 0x3b91f: 0x6d46b020, + 0x3b920: 0x6d73c420, 0x3b921: 0x6d73c620, 0x3b922: 0x6d73c820, 0x3b923: 0x6d73ca20, + 0x3b924: 0x6d73cc20, 0x3b925: 0x6d73ce20, 0x3b926: 0x6d73d020, 0x3b927: 0x6d73d220, + 0x3b928: 0x6d73d420, 0x3b929: 0x6d73d620, 0x3b92a: 0x6d73d820, 0x3b92b: 0x6d73da20, + 0x3b92c: 0x6d73dc20, 0x3b92d: 0x6d73de20, 0x3b92e: 0x6d73e020, 0x3b92f: 0x6d73e220, + 0x3b930: 0x6d73e420, 0x3b931: 0x6d73e620, 0x3b932: 0x6d73e820, 0x3b933: 0x6d73ea20, + 0x3b934: 0x6d73ec20, 0x3b935: 0x6d73ee20, 0x3b936: 0x6d73f020, 0x3b937: 0x6d73f220, + 0x3b938: 0x6d73f420, 0x3b939: 0x6d73f620, 0x3b93a: 0x6d73f820, 0x3b93b: 0x6d73fa20, + 0x3b93c: 0x6d73fc20, 0x3b93d: 0x6d73fe20, 0x3b93e: 0x6d740020, 0x3b93f: 0x6d740220, + // Block 0xee5, offset 0x3b940 + 0x3b940: 0x6d740420, 0x3b941: 0x6d9d6220, 0x3b942: 0x6d9d6420, 0x3b943: 0x6d9d6620, + 0x3b944: 0x6d9d6820, 0x3b945: 0x6d9d6a20, 0x3b946: 0x6d9d6c20, 0x3b947: 0x6d9d6e20, + 0x3b948: 0x6d9d7020, 0x3b949: 0x6d9d7220, 0x3b94a: 0x6d9d7420, 0x3b94b: 0x6d9d7620, + 0x3b94c: 0x6d9d7820, 0x3b94d: 0x6d9d7a20, 0x3b94e: 0x6d9d7c20, 0x3b94f: 0x6d9d7e20, + 0x3b950: 0x6d9d8020, 0x3b951: 0x6d9d8220, 0x3b952: 0x6d9d8420, 0x3b953: 0x6d9d8620, + 0x3b954: 0x6d9d8820, 0x3b955: 0x6d9d8a20, 0x3b956: 0x6d9d8c20, 0x3b957: 0x6d9d8e20, + 0x3b958: 0x6d9d9020, 0x3b959: 0x6d9d9220, 0x3b95a: 0x6d9d9420, 0x3b95b: 0x6d9d9620, + 0x3b95c: 0x6d9d9820, 0x3b95d: 0x6d9d9a20, 0x3b95e: 0x6d9d9c20, 0x3b95f: 0x6d9d9e20, + 0x3b960: 0x6d9da020, 0x3b961: 0x6dbfd420, 0x3b962: 0x6dbfd620, 0x3b963: 0x6dbfd820, + 0x3b964: 0x6dbfda20, 0x3b965: 0x6dbfdc20, 0x3b966: 0x6dbfde20, 0x3b967: 0x6dbfe020, + 0x3b968: 0x6dbfe220, 0x3b969: 0x6dbfe420, 0x3b96a: 0x6dbfe620, 0x3b96b: 0x6dbfe820, + 0x3b96c: 0x6dbfea20, 0x3b96d: 0x6dbfec20, 0x3b96e: 0x6dbfee20, 0x3b96f: 0x6dbff020, + 0x3b970: 0x6dbff220, 0x3b971: 0x6dbff420, 0x3b972: 0x6dbff620, 0x3b973: 0x6dbff820, + 0x3b974: 0x6dbffa20, 0x3b975: 0x6dbffc20, 0x3b976: 0x6dbffe20, 0x3b977: 0x6d46b220, + 0x3b978: 0x6dc00020, 0x3b979: 0x6dc00220, 0x3b97a: 0x6dc00420, 0x3b97b: 0x6dc00620, + 0x3b97c: 0x6dc00820, 0x3b97d: 0x6dc00a20, 0x3b97e: 0x6dc00c20, 0x3b97f: 0x6dc00e20, + // Block 0xee6, offset 0x3b980 + 0x3b980: 0x6dc01020, 0x3b981: 0x6dc01220, 0x3b982: 0x6dc01420, 0x3b983: 0x6dc01620, + 0x3b984: 0x6dc01820, 0x3b985: 0x6dc01a20, 0x3b986: 0x6dc01c20, 0x3b987: 0x6dc01e20, + 0x3b988: 0x6dc02020, 0x3b989: 0x6dc02220, 0x3b98a: 0x6dc02420, 0x3b98b: 0x6dc02620, + 0x3b98c: 0x6dc02820, 0x3b98d: 0x6dddd220, 0x3b98e: 0x6dddd420, 0x3b98f: 0x6dddd620, + 0x3b990: 0x6dddd820, 0x3b991: 0x6dddda20, 0x3b992: 0x6ddddc20, 0x3b993: 0x6dddde20, + 0x3b994: 0x6ddde020, 0x3b995: 0x6ddde220, 0x3b996: 0x6ddde420, 0x3b997: 0x6ddde620, + 0x3b998: 0x6ddde820, 0x3b999: 0x6dddea20, 0x3b99a: 0x6dddec20, 0x3b99b: 0x6dddee20, + 0x3b99c: 0x6dddf020, 0x3b99d: 0x6dddf220, 0x3b99e: 0x6dddf420, 0x3b99f: 0x6dddf620, + 0x3b9a0: 0x6dddf820, 0x3b9a1: 0x6dddfa20, 0x3b9a2: 0x6dddfc20, 0x3b9a3: 0x6dddfe20, + 0x3b9a4: 0x6dde0020, 0x3b9a5: 0x6dde0220, 0x3b9a6: 0x6dde0420, 0x3b9a7: 0x6dde0620, + 0x3b9a8: 0x6dde0820, 0x3b9a9: 0x6dde0a20, 0x3b9aa: 0x6dde0c20, 0x3b9ab: 0x6dde0e20, + 0x3b9ac: 0x6dde1020, 0x3b9ad: 0x6dde1220, 0x3b9ae: 0x6dde1420, 0x3b9af: 0x6dde1620, + 0x3b9b0: 0x6dde1820, 0x3b9b1: 0x6dde1a20, 0x3b9b2: 0x6dde1c20, 0x3b9b3: 0x6dde1e20, + 0x3b9b4: 0x6dde2020, 0x3b9b5: 0x6dde2220, 0x3b9b6: 0x6dde2420, 0x3b9b7: 0x6df58620, + 0x3b9b8: 0x6df58820, 0x3b9b9: 0x6df58a20, 0x3b9ba: 0x6df58c20, 0x3b9bb: 0x6df58e20, + 0x3b9bc: 0x6df59020, 0x3b9bd: 0x6df59220, 0x3b9be: 0x6df59420, 0x3b9bf: 0x6df59620, + // Block 0xee7, offset 0x3b9c0 + 0x3b9c0: 0x6df59820, 0x3b9c1: 0x6df59a20, 0x3b9c2: 0x6df59c20, 0x3b9c3: 0x6df59e20, + 0x3b9c4: 0x6df5a020, 0x3b9c5: 0x6df5a220, 0x3b9c6: 0x6df5a420, 0x3b9c7: 0x6df5a620, + 0x3b9c8: 0x6df5a820, 0x3b9c9: 0x6df5aa20, 0x3b9ca: 0x6df5ac20, 0x3b9cb: 0x6df5ae20, + 0x3b9cc: 0x6df5b020, 0x3b9cd: 0x6df5b220, 0x3b9ce: 0x6df5b420, 0x3b9cf: 0x6df5b620, + 0x3b9d0: 0x6df5b820, 0x3b9d1: 0x6df5ba20, 0x3b9d2: 0x6df5bc20, 0x3b9d3: 0x6df5be20, + 0x3b9d4: 0x6df5c020, 0x3b9d5: 0x6df5c220, 0x3b9d6: 0x6df5c420, 0x3b9d7: 0x6df5c620, + 0x3b9d8: 0x6df5c820, 0x3b9d9: 0x6df5ca20, 0x3b9da: 0x6df5cc20, 0x3b9db: 0x6df5ce20, + 0x3b9dc: 0x6df5d020, 0x3b9dd: 0x6df5d220, 0x3b9de: 0x6df5d420, 0x3b9df: 0x6df5d620, + 0x3b9e0: 0x6df5d820, 0x3b9e1: 0x6df5da20, 0x3b9e2: 0x6df5dc20, 0x3b9e3: 0x6df5de20, + 0x3b9e4: 0x6df5e020, 0x3b9e5: 0x6df5e220, 0x3b9e6: 0x6df5e420, 0x3b9e7: 0x6df5e620, + 0x3b9e8: 0x6df5e820, 0x3b9e9: 0x6df5ea20, 0x3b9ea: 0x6df5ec20, 0x3b9eb: 0x6df5ee20, + 0x3b9ec: 0x6df5f020, 0x3b9ed: 0x6df5f220, 0x3b9ee: 0x6df5f420, 0x3b9ef: 0x6df5f620, + 0x3b9f0: 0x6df5f820, 0x3b9f1: 0x6df5fa20, 0x3b9f2: 0x6df5fc20, 0x3b9f3: 0x6df5fe20, + 0x3b9f4: 0x6df60020, 0x3b9f5: 0x6df60220, 0x3b9f6: 0x6df60420, 0x3b9f7: 0x6df60620, + 0x3b9f8: 0x6df60820, 0x3b9f9: 0x6df60a20, 0x3b9fa: 0x6df60c20, 0x3b9fb: 0x6df60e20, + 0x3b9fc: 0x6df61020, 0x3b9fd: 0x6df61220, 0x3b9fe: 0x6e097a20, 0x3b9ff: 0x6e097c20, + // Block 0xee8, offset 0x3ba00 + 0x3ba00: 0x6e097e20, 0x3ba01: 0x6e098020, 0x3ba02: 0x6e098220, 0x3ba03: 0x6e098420, + 0x3ba04: 0x6e098620, 0x3ba05: 0x6e098820, 0x3ba06: 0x6e098a20, 0x3ba07: 0x6e098c20, + 0x3ba08: 0x6e098e20, 0x3ba09: 0x6e099020, 0x3ba0a: 0x6e099220, 0x3ba0b: 0x6e099420, + 0x3ba0c: 0x6e099620, 0x3ba0d: 0x6e099820, 0x3ba0e: 0x6e099a20, 0x3ba0f: 0x6e099c20, + 0x3ba10: 0x6e099e20, 0x3ba11: 0x6e09a020, 0x3ba12: 0x6e09a220, 0x3ba13: 0x6e09a420, + 0x3ba14: 0x6e09a620, 0x3ba15: 0x6e09a820, 0x3ba16: 0x6e09aa20, 0x3ba17: 0x6e09ac20, + 0x3ba18: 0x6e09ae20, 0x3ba19: 0x6e09b020, 0x3ba1a: 0x6e09b220, 0x3ba1b: 0x6e09b420, + 0x3ba1c: 0x6e09b620, 0x3ba1d: 0x6e09b820, 0x3ba1e: 0x6e09ba20, 0x3ba1f: 0x6e09bc20, + 0x3ba20: 0x6e09be20, 0x3ba21: 0x6e09c020, 0x3ba22: 0x6e09c220, 0x3ba23: 0x6e09c420, + 0x3ba24: 0x6e09c620, 0x3ba25: 0x6e09c820, 0x3ba26: 0x6e09ca20, 0x3ba27: 0x6e09cc20, + 0x3ba28: 0x6e09ce20, 0x3ba29: 0x6e09d020, 0x3ba2a: 0x6e09d220, 0x3ba2b: 0x6e09d420, + 0x3ba2c: 0x6e09d620, 0x3ba2d: 0x6e09d820, 0x3ba2e: 0x6e09da20, 0x3ba2f: 0x6e09dc20, + 0x3ba30: 0x6e09de20, 0x3ba31: 0x6e196e20, 0x3ba32: 0x6e197020, 0x3ba33: 0x6e197220, + 0x3ba34: 0x6e197420, 0x3ba35: 0x6e197620, 0x3ba36: 0x6e197820, 0x3ba37: 0x6e197a20, + 0x3ba38: 0x6e197c20, 0x3ba39: 0x6e197e20, 0x3ba3a: 0x6e198020, 0x3ba3b: 0x6e198220, + 0x3ba3c: 0x6e198420, 0x3ba3d: 0x6e198620, 0x3ba3e: 0x6e198820, 0x3ba3f: 0x6e198a20, + // Block 0xee9, offset 0x3ba40 + 0x3ba40: 0x6e198c20, 0x3ba41: 0x6e198e20, 0x3ba42: 0x6e199020, 0x3ba43: 0x6e199220, + 0x3ba44: 0x6e199420, 0x3ba45: 0x6e199620, 0x3ba46: 0x6e199820, 0x3ba47: 0x6e199a20, + 0x3ba48: 0x6e199c20, 0x3ba49: 0x6e199e20, 0x3ba4a: 0x6e19a020, 0x3ba4b: 0x6e19a220, + 0x3ba4c: 0x6e19a420, 0x3ba4d: 0x6e19a620, 0x3ba4e: 0x6e19a820, 0x3ba4f: 0x6e19aa20, + 0x3ba50: 0x6e19ac20, 0x3ba51: 0x6e19ae20, 0x3ba52: 0x6e19b020, 0x3ba53: 0x6e19b220, + 0x3ba54: 0x6e19b420, 0x3ba55: 0x6e19b620, 0x3ba56: 0x6e19b820, 0x3ba57: 0x6e19ba20, + 0x3ba58: 0x6e19bc20, 0x3ba59: 0x6e19be20, 0x3ba5a: 0x6e19c020, 0x3ba5b: 0x6e19c220, + 0x3ba5c: 0x6e19c420, 0x3ba5d: 0x6e19c620, 0x3ba5e: 0x6e19c820, 0x3ba5f: 0x6e19ca20, + 0x3ba60: 0x6e19cc20, 0x3ba61: 0x6e19ce20, 0x3ba62: 0x6e19d020, 0x3ba63: 0x6e19d220, + 0x3ba64: 0x6e19d420, 0x3ba65: 0x6e19d620, 0x3ba66: 0x6e19d820, 0x3ba67: 0x6e19da20, + 0x3ba68: 0x6e19dc20, 0x3ba69: 0x6e19de20, 0x3ba6a: 0x6e19e020, 0x3ba6b: 0x6e19e220, + 0x3ba6c: 0x6e19e420, 0x3ba6d: 0x6e260e20, 0x3ba6e: 0x6e261020, 0x3ba6f: 0x6e261220, + 0x3ba70: 0x6e261420, 0x3ba71: 0x6e261620, 0x3ba72: 0x6e261820, 0x3ba73: 0x6e261a20, + 0x3ba74: 0x6e261c20, 0x3ba75: 0x6e261e20, 0x3ba76: 0x6e262020, 0x3ba77: 0x6e262220, + 0x3ba78: 0x6e262420, 0x3ba79: 0x6e262620, 0x3ba7a: 0x6e262820, 0x3ba7b: 0x6e262a20, + 0x3ba7c: 0x6e262c20, 0x3ba7d: 0x6e262e20, 0x3ba7e: 0x6e263020, 0x3ba7f: 0x6e263220, + // Block 0xeea, offset 0x3ba80 + 0x3ba80: 0x6e263420, 0x3ba81: 0x6e263620, 0x3ba82: 0x6e263820, 0x3ba83: 0x6e263a20, + 0x3ba84: 0x6e263c20, 0x3ba85: 0x6e263e20, 0x3ba86: 0x6e264020, 0x3ba87: 0x6e264220, + 0x3ba88: 0x6e264420, 0x3ba89: 0x6e264620, 0x3ba8a: 0x6e264820, 0x3ba8b: 0x6e264a20, + 0x3ba8c: 0x6e264c20, 0x3ba8d: 0x6e264e20, 0x3ba8e: 0x6e265020, 0x3ba8f: 0x6e265220, + 0x3ba90: 0x6e265420, 0x3ba91: 0x6e265620, 0x3ba92: 0x6e265820, 0x3ba93: 0x6e265a20, + 0x3ba94: 0x6e265c20, 0x3ba95: 0x6e265e20, 0x3ba96: 0x6e266020, 0x3ba97: 0x6e266220, + 0x3ba98: 0x6e2f7a20, 0x3ba99: 0x6e2f7c20, 0x3ba9a: 0x6e2f7e20, 0x3ba9b: 0x6e2f8020, + 0x3ba9c: 0x6e2f8220, 0x3ba9d: 0x6e2f8420, 0x3ba9e: 0x6e2f8620, 0x3ba9f: 0x6e2f8820, + 0x3baa0: 0x6e2f8a20, 0x3baa1: 0x6e2f8c20, 0x3baa2: 0x6e2f8e20, 0x3baa3: 0x6e2f9020, + 0x3baa4: 0x6e2f9220, 0x3baa5: 0x6e2f9420, 0x3baa6: 0x6e2f9620, 0x3baa7: 0x6e2f9820, + 0x3baa8: 0x6e2f9a20, 0x3baa9: 0x6e2f9c20, 0x3baaa: 0x6e2f9e20, 0x3baab: 0x6e2fa020, + 0x3baac: 0x6e2fa220, 0x3baad: 0x6e2fa420, 0x3baae: 0x6e2fa620, 0x3baaf: 0x6e2fa820, + 0x3bab0: 0x6e2faa20, 0x3bab1: 0x6e2fac20, 0x3bab2: 0x6e2fae20, 0x3bab3: 0x6e2fb020, + 0x3bab4: 0x6e2fb220, 0x3bab5: 0x6e2fb420, 0x3bab6: 0x6e2fb620, 0x3bab7: 0x6e2fb820, + 0x3bab8: 0x6e2fba20, 0x3bab9: 0x6e2fbc20, 0x3baba: 0x6e2fbe20, 0x3babb: 0x6e2fc020, + 0x3babc: 0x6e2fc220, 0x3babd: 0x6e2fc420, 0x3babe: 0x6e2fc620, 0x3babf: 0x6e2fc820, + // Block 0xeeb, offset 0x3bac0 + 0x3bac0: 0x6e2fca20, 0x3bac1: 0x6e2fcc20, 0x3bac2: 0x6e36c220, 0x3bac3: 0x6e36c420, + 0x3bac4: 0x6e36c620, 0x3bac5: 0x6e36c820, 0x3bac6: 0x6e36ca20, 0x3bac7: 0x6e36cc20, + 0x3bac8: 0x6e36ce20, 0x3bac9: 0x6e36d020, 0x3baca: 0x6e36d220, 0x3bacb: 0x6e36d420, + 0x3bacc: 0x6e36d620, 0x3bacd: 0x6e36d820, 0x3bace: 0x6e36da20, 0x3bacf: 0x6e36dc20, + 0x3bad0: 0x6e36de20, 0x3bad1: 0x6e36e020, 0x3bad2: 0x6e36e220, 0x3bad3: 0x6e36e420, + 0x3bad4: 0x6e36e620, 0x3bad5: 0x6e36e820, 0x3bad6: 0x6e36ea20, 0x3bad7: 0x6e36ec20, + 0x3bad8: 0x6e36ee20, 0x3bad9: 0x6e36f020, 0x3bada: 0x6e36f220, 0x3badb: 0x6e36f420, + 0x3badc: 0x6e36f620, 0x3badd: 0x6e36f820, 0x3bade: 0x6e36fa20, 0x3badf: 0x6e36fc20, + 0x3bae0: 0x6e36fe20, 0x3bae1: 0x6e370020, 0x3bae2: 0x6e370220, 0x3bae3: 0x6e370420, + 0x3bae4: 0x6e370620, 0x3bae5: 0x6e3bb620, 0x3bae6: 0x6e3bb820, 0x3bae7: 0x6e3bba20, + 0x3bae8: 0x6e3bbc20, 0x3bae9: 0x6e3bbe20, 0x3baea: 0x6e3bc020, 0x3baeb: 0x6e3bc220, + 0x3baec: 0x6e3bc420, 0x3baed: 0x6e3bc620, 0x3baee: 0x6e3bc820, 0x3baef: 0x6e3bca20, + 0x3baf0: 0x6e3bcc20, 0x3baf1: 0x6e3bce20, 0x3baf2: 0x6e3bd020, 0x3baf3: 0x6e3bd220, + 0x3baf4: 0x6e3bd420, 0x3baf5: 0x6e3bd620, 0x3baf6: 0x6e3bd820, 0x3baf7: 0x6e3bda20, + 0x3baf8: 0x6e3bdc20, 0x3baf9: 0x6e3bde20, 0x3bafa: 0x6e3be020, 0x3bafb: 0x6e3f6020, + 0x3bafc: 0x6e3f6220, 0x3bafd: 0x6e3f6420, 0x3bafe: 0x6e3f6620, 0x3baff: 0x6e3f6820, + // Block 0xeec, offset 0x3bb00 + 0x3bb00: 0x6e3f6a20, 0x3bb01: 0x6e3f6c20, 0x3bb02: 0x6e3f6e20, 0x3bb03: 0x6e3f7020, + 0x3bb04: 0x6e3f7220, 0x3bb05: 0x6e3f7420, 0x3bb06: 0x6e3f7620, 0x3bb07: 0x6e3f7820, + 0x3bb08: 0x6e3f7a20, 0x3bb09: 0x6e3f7c20, 0x3bb0a: 0x6e3f7e20, 0x3bb0b: 0x6e3f8020, + 0x3bb0c: 0x6e3f8220, 0x3bb0d: 0x6e41de20, 0x3bb0e: 0x6e41e020, 0x3bb0f: 0x6e41e220, + 0x3bb10: 0x6e41e420, 0x3bb11: 0x6e41e620, 0x3bb12: 0x6e41e820, 0x3bb13: 0x6e41ea20, + 0x3bb14: 0x6e41ec20, 0x3bb15: 0x6e41ee20, 0x3bb16: 0x6e41f020, 0x3bb17: 0x6e41f220, + 0x3bb18: 0x6e41f420, 0x3bb19: 0x6e41f620, 0x3bb1a: 0x6e43a420, 0x3bb1b: 0x6e43a620, + 0x3bb1c: 0x6e43a820, 0x3bb1d: 0x6e43aa20, 0x3bb1e: 0x6e43ac20, 0x3bb1f: 0x6e43ae20, + 0x3bb20: 0x6e43b020, 0x3bb21: 0x6e43b220, 0x3bb22: 0x6e43b420, 0x3bb23: 0x6e43b620, + 0x3bb24: 0x6e43b820, 0x3bb25: 0x6e43ba20, 0x3bb26: 0x6e43bc20, 0x3bb27: 0x6e44d420, + 0x3bb28: 0x6e44d620, 0x3bb29: 0x6e44d820, 0x3bb2a: 0x6e44da20, 0x3bb2b: 0x6e44dc20, + 0x3bb2c: 0x6e44de20, 0x3bb2d: 0x6e44e020, 0x3bb2e: 0x6e44e220, 0x3bb2f: 0x6e44e420, + 0x3bb30: 0x6e458420, 0x3bb31: 0x6e458620, 0x3bb32: 0x6e458820, 0x3bb33: 0x6e45fa20, + 0x3bb34: 0x6e45fc20, 0x3bb35: 0x6e465a20, 0x3bb36: 0x6e465c20, 0x3bb37: 0x6e465e20, + 0x3bb38: 0x6e466020, 0x3bb39: 0x6ce87820, 0x3bb3a: 0x6ce87a20, 0x3bb3b: 0x6ce87c20, + 0x3bb3c: 0x6d46d420, 0x3bb3d: 0x6d46d620, 0x3bb3e: 0x6d46d820, 0x3bb3f: 0x6d46da20, + // Block 0xeed, offset 0x3bb40 + 0x3bb40: 0x6d17fa20, 0x3bb41: 0x6d742620, 0x3bb42: 0x6d742820, 0x3bb43: 0x6d742a20, + 0x3bb44: 0x6d742c20, 0x3bb45: 0x6d9dce20, 0x3bb46: 0x6d9dd020, 0x3bb47: 0x6d9dd220, + 0x3bb48: 0x6d9dd420, 0x3bb49: 0x6d742e20, 0x3bb4a: 0x6dc05a20, 0x3bb4b: 0x6dc05c20, + 0x3bb4c: 0x6df63020, 0x3bb4d: 0x6e1a0020, 0x3bb4e: 0x6e2fdc20, 0x3bb4f: 0x6ce88820, + 0x3bb50: 0x6ce88a20, 0x3bb51: 0x6ce88c20, 0x3bb52: 0x6d181a20, 0x3bb53: 0x6d181c20, + 0x3bb54: 0x6d181e20, 0x3bb55: 0x6d182020, 0x3bb56: 0x6d182220, 0x3bb57: 0x6d182420, + 0x3bb58: 0x6d182620, 0x3bb59: 0x6d182820, 0x3bb5a: 0x6d182a20, 0x3bb5b: 0x6d182c20, + 0x3bb5c: 0x6d182e20, 0x3bb5d: 0x6d470020, 0x3bb5e: 0x6d470220, 0x3bb5f: 0x6d470420, + 0x3bb60: 0x6d470620, 0x3bb61: 0x6d470820, 0x3bb62: 0x6d470a20, 0x3bb63: 0x6d470c20, + 0x3bb64: 0x6d470e20, 0x3bb65: 0x6d471020, 0x3bb66: 0x6d471220, 0x3bb67: 0x6d471420, + 0x3bb68: 0x6d471620, 0x3bb69: 0x6d471820, 0x3bb6a: 0x6d471a20, 0x3bb6b: 0x6d471c20, + 0x3bb6c: 0x6d471e20, 0x3bb6d: 0x6d472020, 0x3bb6e: 0x6d472220, 0x3bb6f: 0x6d472420, + 0x3bb70: 0x6d747e20, 0x3bb71: 0x6d748020, 0x3bb72: 0x6d748220, 0x3bb73: 0x6d748420, + 0x3bb74: 0x6d748620, 0x3bb75: 0x6d748820, 0x3bb76: 0x6d748a20, 0x3bb77: 0x6d748c20, + 0x3bb78: 0x6d748e20, 0x3bb79: 0x6d749020, 0x3bb7a: 0x6d749220, 0x3bb7b: 0x6d749420, + 0x3bb7c: 0x6d749620, 0x3bb7d: 0x6d749820, 0x3bb7e: 0x6d749a20, 0x3bb7f: 0x6d749c20, + // Block 0xeee, offset 0x3bb80 + 0x3bb80: 0x6d749e20, 0x3bb81: 0x6d74a020, 0x3bb82: 0x6d74a220, 0x3bb83: 0x6d74a420, + 0x3bb84: 0x6d74a620, 0x3bb85: 0x6d74a820, 0x3bb86: 0x6d74aa20, 0x3bb87: 0x6d74ac20, + 0x3bb88: 0x6d74ae20, 0x3bb89: 0x6d74b020, 0x3bb8a: 0x6d74b220, 0x3bb8b: 0x6d74b420, + 0x3bb8c: 0x6d74b620, 0x3bb8d: 0x6d74b820, 0x3bb8e: 0x6d74ba20, 0x3bb8f: 0x6d74bc20, + 0x3bb90: 0x6d74be20, 0x3bb91: 0x6d74c020, 0x3bb92: 0x6d74c220, 0x3bb93: 0x6d74c420, + 0x3bb94: 0x6d74c620, 0x3bb95: 0x6d74c820, 0x3bb96: 0x6d74ca20, 0x3bb97: 0x6d74cc20, + 0x3bb98: 0x6d74ce20, 0x3bb99: 0x6d74d020, 0x3bb9a: 0x6d74d220, 0x3bb9b: 0x6d74d420, + 0x3bb9c: 0x6d9e4220, 0x3bb9d: 0x6d9e4420, 0x3bb9e: 0x6d9e4620, 0x3bb9f: 0x6d9e4820, + 0x3bba0: 0x6d9e4a20, 0x3bba1: 0x6d9e4c20, 0x3bba2: 0x6d9e4e20, 0x3bba3: 0x6d9e5020, + 0x3bba4: 0x6d9e5220, 0x3bba5: 0x6d9e5420, 0x3bba6: 0x6d9e5620, 0x3bba7: 0x6d9e5820, + 0x3bba8: 0x6d9e5a20, 0x3bba9: 0x6d9e5c20, 0x3bbaa: 0x6d9e5e20, 0x3bbab: 0x6d9e6020, + 0x3bbac: 0x6d9e6220, 0x3bbad: 0x6d9e6420, 0x3bbae: 0x6d9e6620, 0x3bbaf: 0x6d9e6820, + 0x3bbb0: 0x6d9e6a20, 0x3bbb1: 0x6d9e6c20, 0x3bbb2: 0x6d9e6e20, 0x3bbb3: 0x6d9e7020, + 0x3bbb4: 0x6d9e7220, 0x3bbb5: 0x6d9e7420, 0x3bbb6: 0x6d9e7620, 0x3bbb7: 0x6d9e7820, + 0x3bbb8: 0x6d9e7a20, 0x3bbb9: 0x6d9e7c20, 0x3bbba: 0x6d9e7e20, 0x3bbbb: 0x6d9e8020, + 0x3bbbc: 0x6d9e8220, 0x3bbbd: 0x6d9e8420, 0x3bbbe: 0x6d9e8620, 0x3bbbf: 0x6d9e8820, + // Block 0xeef, offset 0x3bbc0 + 0x3bbc0: 0x6d9e8a20, 0x3bbc1: 0x6d9e8c20, 0x3bbc2: 0x6d9e8e20, 0x3bbc3: 0x6d9e9020, + 0x3bbc4: 0x6d9e9220, 0x3bbc5: 0x6d9e9420, 0x3bbc6: 0x6d9e9620, 0x3bbc7: 0x6d9e9820, + 0x3bbc8: 0x6d9e9a20, 0x3bbc9: 0x6d9e9c20, 0x3bbca: 0x6d9e9e20, 0x3bbcb: 0x6d9ea020, + 0x3bbcc: 0x6d9ea220, 0x3bbcd: 0x6d9ea420, 0x3bbce: 0x6d9ea620, 0x3bbcf: 0x6d9ea820, + 0x3bbd0: 0x6d9eaa20, 0x3bbd1: 0x6d9eac20, 0x3bbd2: 0x6dc0ba20, 0x3bbd3: 0x6dc0bc20, + 0x3bbd4: 0x6dc0be20, 0x3bbd5: 0x6dc0c020, 0x3bbd6: 0x6dc0c220, 0x3bbd7: 0x6dc0c420, + 0x3bbd8: 0x6dc0c620, 0x3bbd9: 0x6dc0c820, 0x3bbda: 0x6dc0ca20, 0x3bbdb: 0x6dc0cc20, + 0x3bbdc: 0x6dc0ce20, 0x3bbdd: 0x6dc0d020, 0x3bbde: 0x6dc0d220, 0x3bbdf: 0x6dc0d420, + 0x3bbe0: 0x6dc0d620, 0x3bbe1: 0x6dc0d820, 0x3bbe2: 0x6dc0da20, 0x3bbe3: 0x6dc0dc20, + 0x3bbe4: 0x6dc0de20, 0x3bbe5: 0x6dc0e020, 0x3bbe6: 0x6dc0e220, 0x3bbe7: 0x6dc0e420, + 0x3bbe8: 0x6dc0e620, 0x3bbe9: 0x6dc0e820, 0x3bbea: 0x6dc0ea20, 0x3bbeb: 0x6dc0ec20, + 0x3bbec: 0x6dc0ee20, 0x3bbed: 0x6dc0f020, 0x3bbee: 0x6dc0f220, 0x3bbef: 0x6dc0f420, + 0x3bbf0: 0x6dc0f620, 0x3bbf1: 0x6dc0f820, 0x3bbf2: 0x6dc0fa20, 0x3bbf3: 0x6dc0fc20, + 0x3bbf4: 0x6dc0fe20, 0x3bbf5: 0x6dc10020, 0x3bbf6: 0x6dc10220, 0x3bbf7: 0x6dc10420, + 0x3bbf8: 0x6dc10620, 0x3bbf9: 0x6dc10820, 0x3bbfa: 0x6dc10a20, 0x3bbfb: 0x6dc10c20, + 0x3bbfc: 0x6dc10e20, 0x3bbfd: 0x6dc11020, 0x3bbfe: 0x6dc11220, 0x3bbff: 0x6dc11420, + // Block 0xef0, offset 0x3bc00 + 0x3bc00: 0x6dc11620, 0x3bc01: 0x6dc11820, 0x3bc02: 0x6dc11a20, 0x3bc03: 0x6dc11c20, + 0x3bc04: 0x6dc11e20, 0x3bc05: 0x6dc12020, 0x3bc06: 0x6dc12220, 0x3bc07: 0x6dc12420, + 0x3bc08: 0x6dc12620, 0x3bc09: 0x6dc12820, 0x3bc0a: 0x6dde8220, 0x3bc0b: 0x6dde8420, + 0x3bc0c: 0x6dde8620, 0x3bc0d: 0x6dde8820, 0x3bc0e: 0x6dde8a20, 0x3bc0f: 0x6dde8c20, + 0x3bc10: 0x6dde8e20, 0x3bc11: 0x6dde9020, 0x3bc12: 0x6dde9220, 0x3bc13: 0x6dde9420, + 0x3bc14: 0x6dde9620, 0x3bc15: 0x6dde9820, 0x3bc16: 0x6dde9a20, 0x3bc17: 0x6dde9c20, + 0x3bc18: 0x6dde9e20, 0x3bc19: 0x6ddea020, 0x3bc1a: 0x6ddea220, 0x3bc1b: 0x6ddea420, + 0x3bc1c: 0x6ddea620, 0x3bc1d: 0x6ddea820, 0x3bc1e: 0x6ddeaa20, 0x3bc1f: 0x6ddeac20, + 0x3bc20: 0x6ddeae20, 0x3bc21: 0x6ddeb020, 0x3bc22: 0x6ddeb220, 0x3bc23: 0x6ddeb420, + 0x3bc24: 0x6ddeb620, 0x3bc25: 0x6ddeb820, 0x3bc26: 0x6ddeba20, 0x3bc27: 0x6ddebc20, + 0x3bc28: 0x6ddebe20, 0x3bc29: 0x6ddec020, 0x3bc2a: 0x6ddec220, 0x3bc2b: 0x6ddec420, + 0x3bc2c: 0x6ddec620, 0x3bc2d: 0x6ddec820, 0x3bc2e: 0x6ddeca20, 0x3bc2f: 0x6ddecc20, + 0x3bc30: 0x6ddece20, 0x3bc31: 0x6dded020, 0x3bc32: 0x6dded220, 0x3bc33: 0x6dded420, + 0x3bc34: 0x6dded620, 0x3bc35: 0x6dded820, 0x3bc36: 0x6ddeda20, 0x3bc37: 0x6df6a020, + 0x3bc38: 0x6df6a220, 0x3bc39: 0x6df6a420, 0x3bc3a: 0x6df6a620, 0x3bc3b: 0x6df6a820, + 0x3bc3c: 0x6df6aa20, 0x3bc3d: 0x6df6ac20, 0x3bc3e: 0x6df6ae20, 0x3bc3f: 0x6df6b020, + // Block 0xef1, offset 0x3bc40 + 0x3bc40: 0x6df6b220, 0x3bc41: 0x6df6b420, 0x3bc42: 0x6df6b620, 0x3bc43: 0x6df6b820, + 0x3bc44: 0x6df6ba20, 0x3bc45: 0x6df6bc20, 0x3bc46: 0x6df6be20, 0x3bc47: 0x6df6c020, + 0x3bc48: 0x6df6c220, 0x3bc49: 0x6df6c420, 0x3bc4a: 0x6df6c620, 0x3bc4b: 0x6df6c820, + 0x3bc4c: 0x6df6ca20, 0x3bc4d: 0x6df6cc20, 0x3bc4e: 0x6df6ce20, 0x3bc4f: 0x6df6d020, + 0x3bc50: 0x6df6d220, 0x3bc51: 0x6df6d420, 0x3bc52: 0x6df6d620, 0x3bc53: 0x6df6d820, + 0x3bc54: 0x6df6da20, 0x3bc55: 0x6df6dc20, 0x3bc56: 0x6df6de20, 0x3bc57: 0x6df6e020, + 0x3bc58: 0x6df6e220, 0x3bc59: 0x6df6e420, 0x3bc5a: 0x6df6e620, 0x3bc5b: 0x6df6e820, + 0x3bc5c: 0x6df6ea20, 0x3bc5d: 0x6df6ec20, 0x3bc5e: 0x6df6ee20, 0x3bc5f: 0x6df6f020, + 0x3bc60: 0x6df6f220, 0x3bc61: 0x6df6f420, 0x3bc62: 0x6df6f620, 0x3bc63: 0x6df6f820, + 0x3bc64: 0x6df6fa20, 0x3bc65: 0x6df6fc20, 0x3bc66: 0x6df6fe20, 0x3bc67: 0x6df70020, + 0x3bc68: 0x6df70220, 0x3bc69: 0x6df70420, 0x3bc6a: 0x6df70620, 0x3bc6b: 0x6df70820, + 0x3bc6c: 0x6df70a20, 0x3bc6d: 0x6df70c20, 0x3bc6e: 0x6df70e20, 0x3bc6f: 0x6df71020, + 0x3bc70: 0x6df71220, 0x3bc71: 0x6df71420, 0x3bc72: 0x6df71620, 0x3bc73: 0x6df71820, + 0x3bc74: 0x6df71a20, 0x3bc75: 0x6df71c20, 0x3bc76: 0x6e0a4420, 0x3bc77: 0x6e0a4620, + 0x3bc78: 0x6e0a4820, 0x3bc79: 0x6e0a4a20, 0x3bc7a: 0x6e0a4c20, 0x3bc7b: 0x6e0a4e20, + 0x3bc7c: 0x6e0a5020, 0x3bc7d: 0x6e0a5220, 0x3bc7e: 0x6e0a5420, 0x3bc7f: 0x6e0a5620, + // Block 0xef2, offset 0x3bc80 + 0x3bc80: 0x6e0a5820, 0x3bc81: 0x6e0a5a20, 0x3bc82: 0x6e0a5c20, 0x3bc83: 0x6e0a5e20, + 0x3bc84: 0x6e0a6020, 0x3bc85: 0x6e0a6220, 0x3bc86: 0x6e0a6420, 0x3bc87: 0x6e0a6620, + 0x3bc88: 0x6e0a6820, 0x3bc89: 0x6e0a6a20, 0x3bc8a: 0x6e0a6c20, 0x3bc8b: 0x6e0a6e20, + 0x3bc8c: 0x6e0a7020, 0x3bc8d: 0x6e0a7220, 0x3bc8e: 0x6e0a7420, 0x3bc8f: 0x6e0a7620, + 0x3bc90: 0x6e0a7820, 0x3bc91: 0x6e0a7a20, 0x3bc92: 0x6e0a7c20, 0x3bc93: 0x6e0a7e20, + 0x3bc94: 0x6e0a8020, 0x3bc95: 0x6e0a8220, 0x3bc96: 0x6e0a8420, 0x3bc97: 0x6e0a8620, + 0x3bc98: 0x6e0a8820, 0x3bc99: 0x6e0a8a20, 0x3bc9a: 0x6e0a8c20, 0x3bc9b: 0x6e0a8e20, + 0x3bc9c: 0x6e0a9020, 0x3bc9d: 0x6e0a9220, 0x3bc9e: 0x6e0a9420, 0x3bc9f: 0x6e0a9620, + 0x3bca0: 0x6e0a9820, 0x3bca1: 0x6e0a9a20, 0x3bca2: 0x6e0a9c20, 0x3bca3: 0x6e0a9e20, + 0x3bca4: 0x6e0aa020, 0x3bca5: 0x6e0aa220, 0x3bca6: 0x6e0aa420, 0x3bca7: 0x6e0aa620, + 0x3bca8: 0x6e0aa820, 0x3bca9: 0x6e0aaa20, 0x3bcaa: 0x6e0aac20, 0x3bcab: 0x6e0aae20, + 0x3bcac: 0x6e0ab020, 0x3bcad: 0x6e0ab220, 0x3bcae: 0x6e0ab420, 0x3bcaf: 0x6e0ab620, + 0x3bcb0: 0x6e0ab820, 0x3bcb1: 0x6e0aba20, 0x3bcb2: 0x6e0abc20, 0x3bcb3: 0x6e0abe20, + 0x3bcb4: 0x6e0ac020, 0x3bcb5: 0x6e0ac220, 0x3bcb6: 0x6e0ac420, 0x3bcb7: 0x6e0ac620, + 0x3bcb8: 0x6e0ac820, 0x3bcb9: 0x6e0aca20, 0x3bcba: 0x6e1a5420, 0x3bcbb: 0x6e1a5620, + 0x3bcbc: 0x6e1a5820, 0x3bcbd: 0x6e1a5a20, 0x3bcbe: 0x6e1a5c20, 0x3bcbf: 0x6e1a5e20, + // Block 0xef3, offset 0x3bcc0 + 0x3bcc0: 0x6e1a6020, 0x3bcc1: 0x6e1a6220, 0x3bcc2: 0x6e1a6420, 0x3bcc3: 0x6e1a6620, + 0x3bcc4: 0x6e1a6820, 0x3bcc5: 0x6e1a6a20, 0x3bcc6: 0x6e1a6c20, 0x3bcc7: 0x6e1a6e20, + 0x3bcc8: 0x6e1a7020, 0x3bcc9: 0x6e1a7220, 0x3bcca: 0x6e1a7420, 0x3bccb: 0x6e1a7620, + 0x3bccc: 0x6e1a7820, 0x3bccd: 0x6e1a7a20, 0x3bcce: 0x6e1a7c20, 0x3bccf: 0x6e1a7e20, + 0x3bcd0: 0x6e1a8020, 0x3bcd1: 0x6e1a8220, 0x3bcd2: 0x6e1a8420, 0x3bcd3: 0x6e1a8620, + 0x3bcd4: 0x6e1a8820, 0x3bcd5: 0x6e1a8a20, 0x3bcd6: 0x6e1a8c20, 0x3bcd7: 0x6e1a8e20, + 0x3bcd8: 0x6e1a9020, 0x3bcd9: 0x6e1a9220, 0x3bcda: 0x6e1a9420, 0x3bcdb: 0x6e1a9620, + 0x3bcdc: 0x6e1a9820, 0x3bcdd: 0x6e1a9a20, 0x3bcde: 0x6e1a9c20, 0x3bcdf: 0x6e1a9e20, + 0x3bce0: 0x6e1aa020, 0x3bce1: 0x6e1aa220, 0x3bce2: 0x6e1aa420, 0x3bce3: 0x6e1aa620, + 0x3bce4: 0x6e1aa820, 0x3bce5: 0x6e1aaa20, 0x3bce6: 0x6e1aac20, 0x3bce7: 0x6e1aae20, + 0x3bce8: 0x6e1ab020, 0x3bce9: 0x6e1ab220, 0x3bcea: 0x6e1ab420, 0x3bceb: 0x6e1ab620, + 0x3bcec: 0x6e1ab820, 0x3bced: 0x6e26a820, 0x3bcee: 0x6e26aa20, 0x3bcef: 0x6e26ac20, + 0x3bcf0: 0x6e26ae20, 0x3bcf1: 0x6e26b020, 0x3bcf2: 0x6e26b220, 0x3bcf3: 0x6e26b420, + 0x3bcf4: 0x6e26b620, 0x3bcf5: 0x6e26b820, 0x3bcf6: 0x6e26ba20, 0x3bcf7: 0x6e26bc20, + 0x3bcf8: 0x6e26be20, 0x3bcf9: 0x6e26c020, 0x3bcfa: 0x6e26c220, 0x3bcfb: 0x6e26c420, + 0x3bcfc: 0x6e26c620, 0x3bcfd: 0x6e26c820, 0x3bcfe: 0x6e26ca20, 0x3bcff: 0x6e26cc20, + // Block 0xef4, offset 0x3bd00 + 0x3bd00: 0x6e26ce20, 0x3bd01: 0x6e26d020, 0x3bd02: 0x6e26d220, 0x3bd03: 0x6e26d420, + 0x3bd04: 0x6e26d620, 0x3bd05: 0x6e26d820, 0x3bd06: 0x6e26da20, 0x3bd07: 0x6e26dc20, + 0x3bd08: 0x6e26de20, 0x3bd09: 0x6e26e020, 0x3bd0a: 0x6e26e220, 0x3bd0b: 0x6e26e420, + 0x3bd0c: 0x6e26e620, 0x3bd0d: 0x6e26e820, 0x3bd0e: 0x6e26ea20, 0x3bd0f: 0x6e26ec20, + 0x3bd10: 0x6e26ee20, 0x3bd11: 0x6e26f020, 0x3bd12: 0x6e26f220, 0x3bd13: 0x6e26f420, + 0x3bd14: 0x6e26f620, 0x3bd15: 0x6e26f820, 0x3bd16: 0x6e26fa20, 0x3bd17: 0x6e26fc20, + 0x3bd18: 0x6e26fe20, 0x3bd19: 0x6e270020, 0x3bd1a: 0x6e270220, 0x3bd1b: 0x6e270420, + 0x3bd1c: 0x6e270620, 0x3bd1d: 0x6e270820, 0x3bd1e: 0x6e270a20, 0x3bd1f: 0x6e270c20, + 0x3bd20: 0x6e270e20, 0x3bd21: 0x6e271020, 0x3bd22: 0x6e271220, 0x3bd23: 0x6e271420, + 0x3bd24: 0x6e271620, 0x3bd25: 0x6e271820, 0x3bd26: 0x6e271a20, 0x3bd27: 0x6e271c20, + 0x3bd28: 0x6e271e20, 0x3bd29: 0x6e272020, 0x3bd2a: 0x6e272220, 0x3bd2b: 0x6e272420, + 0x3bd2c: 0x6e272620, 0x3bd2d: 0x6e272820, 0x3bd2e: 0x6e272a20, 0x3bd2f: 0x6e302220, + 0x3bd30: 0x6e302420, 0x3bd31: 0x6e302620, 0x3bd32: 0x6e302820, 0x3bd33: 0x6e302a20, + 0x3bd34: 0x6e302c20, 0x3bd35: 0x6e302e20, 0x3bd36: 0x6e303020, 0x3bd37: 0x6e303220, + 0x3bd38: 0x6e303420, 0x3bd39: 0x6e303620, 0x3bd3a: 0x6e303820, 0x3bd3b: 0x6e303a20, + 0x3bd3c: 0x6e303c20, 0x3bd3d: 0x6e303e20, 0x3bd3e: 0x6e304020, 0x3bd3f: 0x6e304220, + // Block 0xef5, offset 0x3bd40 + 0x3bd40: 0x6e304420, 0x3bd41: 0x6e304620, 0x3bd42: 0x6e304820, 0x3bd43: 0x6e304a20, + 0x3bd44: 0x6e304c20, 0x3bd45: 0x6e304e20, 0x3bd46: 0x6e305020, 0x3bd47: 0x6e305220, + 0x3bd48: 0x6e305420, 0x3bd49: 0x6e305620, 0x3bd4a: 0x6e305820, 0x3bd4b: 0x6e305a20, + 0x3bd4c: 0x6e305c20, 0x3bd4d: 0x6e305e20, 0x3bd4e: 0x6e306020, 0x3bd4f: 0x6e306220, + 0x3bd50: 0x6e306420, 0x3bd51: 0x6e306620, 0x3bd52: 0x6e306820, 0x3bd53: 0x6e306a20, + 0x3bd54: 0x6e306c20, 0x3bd55: 0x6e306e20, 0x3bd56: 0x6e307020, 0x3bd57: 0x6e307220, + 0x3bd58: 0x6e307420, 0x3bd59: 0x6e307620, 0x3bd5a: 0x6e307820, 0x3bd5b: 0x6e307a20, + 0x3bd5c: 0x6e307c20, 0x3bd5d: 0x6e307e20, 0x3bd5e: 0x6e308020, 0x3bd5f: 0x6e308220, + 0x3bd60: 0x6e308420, 0x3bd61: 0x6e308620, 0x3bd62: 0x6e308820, 0x3bd63: 0x6e308a20, + 0x3bd64: 0x6e308c20, 0x3bd65: 0x6e308e20, 0x3bd66: 0x6e309020, 0x3bd67: 0x6e309220, + 0x3bd68: 0x6e309420, 0x3bd69: 0x6e309620, 0x3bd6a: 0x6e309820, 0x3bd6b: 0x6e309a20, + 0x3bd6c: 0x6e374020, 0x3bd6d: 0x6e309c20, 0x3bd6e: 0x6e374220, 0x3bd6f: 0x6e374420, + 0x3bd70: 0x6e374620, 0x3bd71: 0x6e374820, 0x3bd72: 0x6e374a20, 0x3bd73: 0x6e374c20, + 0x3bd74: 0x6e374e20, 0x3bd75: 0x6e375020, 0x3bd76: 0x6e375220, 0x3bd77: 0x6e375420, + 0x3bd78: 0x6e375620, 0x3bd79: 0x6e375820, 0x3bd7a: 0x6e375a20, 0x3bd7b: 0x6e375c20, + 0x3bd7c: 0x6e375e20, 0x3bd7d: 0x6e376020, 0x3bd7e: 0x6e376220, 0x3bd7f: 0x6e376420, + // Block 0xef6, offset 0x3bd80 + 0x3bd80: 0x6e376620, 0x3bd81: 0x6e376820, 0x3bd82: 0x6e376a20, 0x3bd83: 0x6e376c20, + 0x3bd84: 0x6e376e20, 0x3bd85: 0x6e377020, 0x3bd86: 0x6e377220, 0x3bd87: 0x6e377420, + 0x3bd88: 0x6e377620, 0x3bd89: 0x6e377820, 0x3bd8a: 0x6e377a20, 0x3bd8b: 0x6e377c20, + 0x3bd8c: 0x6e377e20, 0x3bd8d: 0x6e378020, 0x3bd8e: 0x6e378220, 0x3bd8f: 0x6e378420, + 0x3bd90: 0x6e378620, 0x3bd91: 0x6e3bfa20, 0x3bd92: 0x6e3bfc20, 0x3bd93: 0x6e3bfe20, + 0x3bd94: 0x6e3c0020, 0x3bd95: 0x6e3c0220, 0x3bd96: 0x6e3c0420, 0x3bd97: 0x6e3c0620, + 0x3bd98: 0x6e3c0820, 0x3bd99: 0x6e3c0a20, 0x3bd9a: 0x6e3c0c20, 0x3bd9b: 0x6e3c0e20, + 0x3bd9c: 0x6e3c1020, 0x3bd9d: 0x6e3c1220, 0x3bd9e: 0x6e3c8020, 0x3bd9f: 0x6e3c1420, + 0x3bda0: 0x6e3c1620, 0x3bda1: 0x6e3c1820, 0x3bda2: 0x6e3c1a20, 0x3bda3: 0x6e3c1c20, + 0x3bda4: 0x6e3c1e20, 0x3bda5: 0x6e3c2020, 0x3bda6: 0x6e3c2220, 0x3bda7: 0x6e3c2420, + 0x3bda8: 0x6e3c2620, 0x3bda9: 0x6e3c2820, 0x3bdaa: 0x6e3c2a20, 0x3bdab: 0x6e3c2c20, + 0x3bdac: 0x6e3c2e20, 0x3bdad: 0x6e3f8c20, 0x3bdae: 0x6e3f8e20, 0x3bdaf: 0x6e3f9020, + 0x3bdb0: 0x6e3f9220, 0x3bdb1: 0x6e3f9420, 0x3bdb2: 0x6e3f9620, 0x3bdb3: 0x6e3f9820, + 0x3bdb4: 0x6e3f9a20, 0x3bdb5: 0x6e3f9c20, 0x3bdb6: 0x6e3f9e20, 0x3bdb7: 0x6e3fa020, + 0x3bdb8: 0x6e3fa220, 0x3bdb9: 0x6e3fa420, 0x3bdba: 0x6e3fa620, 0x3bdbb: 0x6e3fa820, + 0x3bdbc: 0x6e3faa20, 0x3bdbd: 0x6e3fac20, 0x3bdbe: 0x6e3fae20, 0x3bdbf: 0x6e3fb020, + // Block 0xef7, offset 0x3bdc0 + 0x3bdc0: 0x6e3fb220, 0x3bdc1: 0x6e3fb420, 0x3bdc2: 0x6e3fb620, 0x3bdc3: 0x6e420020, + 0x3bdc4: 0x6e420220, 0x3bdc5: 0x6e420420, 0x3bdc6: 0x6e420620, 0x3bdc7: 0x6e420820, + 0x3bdc8: 0x6e420a20, 0x3bdc9: 0x6e420c20, 0x3bdca: 0x6e420e20, 0x3bdcb: 0x6e421020, + 0x3bdcc: 0x6e421220, 0x3bdcd: 0x6e421420, 0x3bdce: 0x6e421620, 0x3bdcf: 0x6e421820, + 0x3bdd0: 0x6e421a20, 0x3bdd1: 0x6e421c20, 0x3bdd2: 0x6e421e20, 0x3bdd3: 0x6e422020, + 0x3bdd4: 0x6e422220, 0x3bdd5: 0x6e422420, 0x3bdd6: 0x6e422620, 0x3bdd7: 0x6e422820, + 0x3bdd8: 0x6e43c620, 0x3bdd9: 0x6e43c820, 0x3bdda: 0x6e43ca20, 0x3bddb: 0x6e43cc20, + 0x3bddc: 0x6e43ce20, 0x3bddd: 0x6e43d020, 0x3bdde: 0x6e43d220, 0x3bddf: 0x6e43d420, + 0x3bde0: 0x6e43d620, 0x3bde1: 0x6e43d820, 0x3bde2: 0x6e43da20, 0x3bde3: 0x6e43dc20, + 0x3bde4: 0x6e43de20, 0x3bde5: 0x6e44ea20, 0x3bde6: 0x6e44ec20, 0x3bde7: 0x6e44ee20, + 0x3bde8: 0x6e44f020, 0x3bde9: 0x6e44f220, 0x3bdea: 0x6e44f420, 0x3bdeb: 0x6e44f620, + 0x3bdec: 0x6e44f820, 0x3bded: 0x6e44fa20, 0x3bdee: 0x6e459220, 0x3bdef: 0x6e459420, + 0x3bdf0: 0x6e459620, 0x3bdf1: 0x6e459820, 0x3bdf2: 0x6e459a20, 0x3bdf3: 0x6e459c20, + 0x3bdf4: 0x6e460220, 0x3bdf5: 0x6e460420, 0x3bdf6: 0x6e460620, 0x3bdf7: 0x6e460820, + 0x3bdf8: 0x6e466420, 0x3bdf9: 0x6e466620, 0x3bdfa: 0x6e466820, 0x3bdfb: 0x6e469c20, + 0x3bdfc: 0x6e469e20, 0x3bdfd: 0x6e46a020, 0x3bdfe: 0x6e46d620, 0x3bdff: 0x6e46f620, + // Block 0xef8, offset 0x3be00 + 0x3be00: 0x6e46f820, 0x3be01: 0x6c63b820, 0x3be02: 0x6c63ba20, 0x3be03: 0x6c63bc20, + 0x3be04: 0x6c8ade20, 0x3be05: 0x6cb76820, 0x3be06: 0x6cb76a20, 0x3be07: 0x6cb76c20, + 0x3be08: 0x6cb76e20, 0x3be09: 0x6cb77020, 0x3be0a: 0x6cb77220, 0x3be0b: 0x6cb77420, + 0x3be0c: 0x6ce8a220, 0x3be0d: 0x6ce8a420, 0x3be0e: 0x6d184820, 0x3be0f: 0x6d473420, + 0x3be10: 0x6d473620, 0x3be11: 0x6d74f220, 0x3be12: 0x6d74f420, 0x3be13: 0x6d74f620, + 0x3be14: 0x6d74f820, 0x3be15: 0x6e0ad620, 0x3be16: 0x6d474620, 0x3be17: 0x6d474820, + 0x3be18: 0x6d750220, 0x3be19: 0x6d750420, 0x3be1a: 0x6d750620, 0x3be1b: 0x6d750820, + 0x3be1c: 0x6d9ecc20, 0x3be1d: 0x6d9ece20, 0x3be1e: 0x6d9ed020, 0x3be1f: 0x6d9ed220, + 0x3be20: 0x6d9ed420, 0x3be21: 0x6d9ed620, 0x3be22: 0x6dc14420, 0x3be23: 0x6ddef220, + 0x3be24: 0x6ddef420, 0x3be25: 0x6ddef620, 0x3be26: 0x6df73820, 0x3be27: 0x6df73a20, + 0x3be28: 0x6df73c20, 0x3be29: 0x6df73e20, 0x3be2a: 0x6df74020, 0x3be2b: 0x6df74220, + 0x3be2c: 0x6df74420, 0x3be2d: 0x6e0ada20, 0x3be2e: 0x6e0adc20, 0x3be2f: 0x6e0ade20, + 0x3be30: 0x6e0ae020, 0x3be31: 0x6e0ae220, 0x3be32: 0x6e0ae420, 0x3be33: 0x6e0ae620, + 0x3be34: 0x6e0ae820, 0x3be35: 0x6e1aca20, 0x3be36: 0x6e1acc20, 0x3be37: 0x6e1ace20, + 0x3be38: 0x6e1ad020, 0x3be39: 0x6e1ad220, 0x3be3a: 0x6e273820, 0x3be3b: 0x6e273a20, + 0x3be3c: 0x6e273c20, 0x3be3d: 0x6e273e20, 0x3be3e: 0x6e274020, 0x3be3f: 0x6e30aa20, + // Block 0xef9, offset 0x3be40 + 0x3be40: 0x6e30ac20, 0x3be41: 0x6e30ae20, 0x3be42: 0x6e30b020, 0x3be43: 0x6e379020, + 0x3be44: 0x6e379220, 0x3be45: 0x6e379420, 0x3be46: 0x6e3c3420, 0x3be47: 0x6e3c3620, + 0x3be48: 0x6e3fba20, 0x3be49: 0x6e422a20, 0x3be4a: 0x6e43e020, 0x3be4b: 0x6d185c20, + 0x3be4c: 0x6d185e20, 0x3be4d: 0x6d474c20, 0x3be4e: 0x6d474e20, 0x3be4f: 0x6d751620, + 0x3be50: 0x6d751820, 0x3be51: 0x6d751a20, 0x3be52: 0x6d751c20, 0x3be53: 0x6d751e20, + 0x3be54: 0x6d752020, 0x3be55: 0x6d752220, 0x3be56: 0x6d752420, 0x3be57: 0x6d752620, + 0x3be58: 0x6d752820, 0x3be59: 0x6d752a20, 0x3be5a: 0x6d752c20, 0x3be5b: 0x6d9eea20, + 0x3be5c: 0x6d9eec20, 0x3be5d: 0x6d9eee20, 0x3be5e: 0x6d9ef020, 0x3be5f: 0x6d9ef220, + 0x3be60: 0x6d9ef420, 0x3be61: 0x6d9ef620, 0x3be62: 0x6d9ef820, 0x3be63: 0x6d9efa20, + 0x3be64: 0x6d9efc20, 0x3be65: 0x6dc14e20, 0x3be66: 0x6dc15020, 0x3be67: 0x6dc15220, + 0x3be68: 0x6dc15420, 0x3be69: 0x6dc15620, 0x3be6a: 0x6dc15820, 0x3be6b: 0x6dc15a20, + 0x3be6c: 0x6dc15c20, 0x3be6d: 0x6dc15e20, 0x3be6e: 0x6dc16020, 0x3be6f: 0x6dc16220, + 0x3be70: 0x6dc16420, 0x3be71: 0x6dc16620, 0x3be72: 0x6dc16820, 0x3be73: 0x6dc16a20, + 0x3be74: 0x6ddf0620, 0x3be75: 0x6ddf0820, 0x3be76: 0x6ddf0a20, 0x3be77: 0x6ddf0c20, + 0x3be78: 0x6ddf0e20, 0x3be79: 0x6ddf1020, 0x3be7a: 0x6ddf1220, 0x3be7b: 0x6ddf1420, + 0x3be7c: 0x6ddf1620, 0x3be7d: 0x6ddf1820, 0x3be7e: 0x6ddf1a20, 0x3be7f: 0x6ddf1c20, + // Block 0xefa, offset 0x3be80 + 0x3be80: 0x6ddf1e20, 0x3be81: 0x6ddf2020, 0x3be82: 0x6ddf2220, 0x3be83: 0x6ddf2420, + 0x3be84: 0x6df75620, 0x3be85: 0x6df75820, 0x3be86: 0x6df75a20, 0x3be87: 0x6df75c20, + 0x3be88: 0x6df75e20, 0x3be89: 0x6df76020, 0x3be8a: 0x6df76220, 0x3be8b: 0x6df76420, + 0x3be8c: 0x6df76620, 0x3be8d: 0x6df76820, 0x3be8e: 0x6e0af420, 0x3be8f: 0x6e0af620, + 0x3be90: 0x6e0af820, 0x3be91: 0x6e0afa20, 0x3be92: 0x6e0afc20, 0x3be93: 0x6e0afe20, + 0x3be94: 0x6e0b0020, 0x3be95: 0x6e0b0220, 0x3be96: 0x6e0b0420, 0x3be97: 0x6e1ada20, + 0x3be98: 0x6e1adc20, 0x3be99: 0x6e1ade20, 0x3be9a: 0x6e1ae020, 0x3be9b: 0x6e1ae220, + 0x3be9c: 0x6e274620, 0x3be9d: 0x6e274820, 0x3be9e: 0x6e274a20, 0x3be9f: 0x6e274c20, + 0x3bea0: 0x6e274e20, 0x3bea1: 0x6e30b420, 0x3bea2: 0x6e30b620, 0x3bea3: 0x6e30b820, + 0x3bea4: 0x6e30ba20, 0x3bea5: 0x6e30bc20, 0x3bea6: 0x6e30be20, 0x3bea7: 0x6e30c020, + 0x3bea8: 0x6e30c220, 0x3bea9: 0x6e30c420, 0x3beaa: 0x6e379c20, 0x3beab: 0x6e379e20, + 0x3beac: 0x6e37a020, 0x3bead: 0x6e37a220, 0x3beae: 0x6e3c3a20, 0x3beaf: 0x6e3c3c20, + 0x3beb0: 0x6e3c3e20, 0x3beb1: 0x6e3c4020, 0x3beb2: 0x6e3c4220, 0x3beb3: 0x6e3c4420, + 0x3beb4: 0x6e3c4620, 0x3beb5: 0x6e422c20, 0x3beb6: 0x6e43e420, 0x3beb7: 0x6e43e620, + 0x3beb8: 0x6e44fc20, 0x3beb9: 0x6e460c20, 0x3beba: 0x6e46d820, 0x3bebb: 0x6e46fa20, + 0x3bebc: 0x6d186220, 0x3bebd: 0x6d186420, 0x3bebe: 0x6d186620, 0x3bebf: 0x6d186820, + // Block 0xefb, offset 0x3bec0 + 0x3bec0: 0x6d186a20, 0x3bec1: 0x6d475820, 0x3bec2: 0x6d475a20, 0x3bec3: 0x6d475c20, + 0x3bec4: 0x6d475e20, 0x3bec5: 0x6d753c20, 0x3bec6: 0x6d753e20, 0x3bec7: 0x6d754020, + 0x3bec8: 0x6d754220, 0x3bec9: 0x6d754420, 0x3beca: 0x6d754620, 0x3becb: 0x6d754820, + 0x3becc: 0x6d754a20, 0x3becd: 0x6d754c20, 0x3bece: 0x6d754e20, 0x3becf: 0x6d755020, + 0x3bed0: 0x6d755220, 0x3bed1: 0x6d755420, 0x3bed2: 0x6d755620, 0x3bed3: 0x6d755820, + 0x3bed4: 0x6d9f0c20, 0x3bed5: 0x6d9f0e20, 0x3bed6: 0x6d9f1020, 0x3bed7: 0x6d9f1220, + 0x3bed8: 0x6d9f1420, 0x3bed9: 0x6d9f1620, 0x3beda: 0x6d9f1820, 0x3bedb: 0x6cbd9220, + 0x3bedc: 0x6d9f1a20, 0x3bedd: 0x6d9f1c20, 0x3bede: 0x6d9f1e20, 0x3bedf: 0x6d9f2020, + 0x3bee0: 0x6d9f2220, 0x3bee1: 0x6d9f2420, 0x3bee2: 0x6dc17420, 0x3bee3: 0x6dc17620, + 0x3bee4: 0x6dc17820, 0x3bee5: 0x6dc17a20, 0x3bee6: 0x6dc17c20, 0x3bee7: 0x6dc17e20, + 0x3bee8: 0x6dc18020, 0x3bee9: 0x6dc18220, 0x3beea: 0x6dc18420, 0x3beeb: 0x6dc18620, + 0x3beec: 0x6dc18820, 0x3beed: 0x6ddf3220, 0x3beee: 0x6ddf3420, 0x3beef: 0x6ddf3620, + 0x3bef0: 0x6ddf3820, 0x3bef1: 0x6ddf3a20, 0x3bef2: 0x6ddf3c20, 0x3bef3: 0x6ddf3e20, + 0x3bef4: 0x6ddf4020, 0x3bef5: 0x6ddf4220, 0x3bef6: 0x6ddf4420, 0x3bef7: 0x6ddf4620, + 0x3bef8: 0x6ddf4820, 0x3bef9: 0x6ddf4a20, 0x3befa: 0x6ddf4c20, 0x3befb: 0x6ddf4e20, + 0x3befc: 0x6df77820, 0x3befd: 0x6df77a20, 0x3befe: 0x6df77c20, 0x3beff: 0x6df77e20, + // Block 0xefc, offset 0x3bf00 + 0x3bf00: 0x6df78020, 0x3bf01: 0x6df78220, 0x3bf02: 0x6df78420, 0x3bf03: 0x6df78620, + 0x3bf04: 0x6df78820, 0x3bf05: 0x6df78a20, 0x3bf06: 0x6df78c20, 0x3bf07: 0x6df78e20, + 0x3bf08: 0x6df79020, 0x3bf09: 0x6df79220, 0x3bf0a: 0x6df79420, 0x3bf0b: 0x6df79620, + 0x3bf0c: 0x6e0b0820, 0x3bf0d: 0x6e0b0a20, 0x3bf0e: 0x6e0b0c20, 0x3bf0f: 0x6e0b0e20, + 0x3bf10: 0x6e0b1020, 0x3bf11: 0x6e0b1220, 0x3bf12: 0x6e0b1420, 0x3bf13: 0x6e0b1620, + 0x3bf14: 0x6e0b1820, 0x3bf15: 0x6e0b1a20, 0x3bf16: 0x6e0b1c20, 0x3bf17: 0x6e0b1e20, + 0x3bf18: 0x6e0b2020, 0x3bf19: 0x6e0b2220, 0x3bf1a: 0x6e0b2420, 0x3bf1b: 0x6e1aea20, + 0x3bf1c: 0x6e1aec20, 0x3bf1d: 0x6e1aee20, 0x3bf1e: 0x6e1af020, 0x3bf1f: 0x6e1af220, + 0x3bf20: 0x6e1af420, 0x3bf21: 0x6e1af620, 0x3bf22: 0x6e1af820, 0x3bf23: 0x6e275820, + 0x3bf24: 0x6e275a20, 0x3bf25: 0x6e275c20, 0x3bf26: 0x6e275e20, 0x3bf27: 0x6e276020, + 0x3bf28: 0x6e276220, 0x3bf29: 0x6e276420, 0x3bf2a: 0x6e276620, 0x3bf2b: 0x6e276820, + 0x3bf2c: 0x6e276a20, 0x3bf2d: 0x6e276c20, 0x3bf2e: 0x6e276e20, 0x3bf2f: 0x6e277020, + 0x3bf30: 0x6e277220, 0x3bf31: 0x6e277420, 0x3bf32: 0x6e30ca20, 0x3bf33: 0x6e30cc20, + 0x3bf34: 0x6e30ce20, 0x3bf35: 0x6e30d020, 0x3bf36: 0x6e30d220, 0x3bf37: 0x6e30d420, + 0x3bf38: 0x6e37a620, 0x3bf39: 0x6e37a820, 0x3bf3a: 0x6e37aa20, 0x3bf3b: 0x6e37ac20, + 0x3bf3c: 0x6e37ae20, 0x3bf3d: 0x6e37b020, 0x3bf3e: 0x6e37b220, 0x3bf3f: 0x6e3fbc20, + // Block 0xefd, offset 0x3bf40 + 0x3bf40: 0x6e3fbe20, 0x3bf41: 0x6e422e20, 0x3bf42: 0x6e423020, 0x3bf43: 0x6e43e820, + 0x3bf44: 0x6e43ea20, 0x3bf45: 0x6e43ec20, 0x3bf46: 0x6e45a020, 0x3bf47: 0x6e460e20, + 0x3bf48: 0x6c8aec20, 0x3bf49: 0x6cb78e20, 0x3bf4a: 0x6cb79020, 0x3bf4b: 0x6ce8b020, + 0x3bf4c: 0x6d476020, 0x3bf4d: 0x6c63ca20, 0x3bf4e: 0x6d755c20, 0x3bf4f: 0x6d755e20, + 0x3bf50: 0x6ddf5020, 0x3bf51: 0x6d186c20, 0x3bf52: 0x6d476820, 0x3bf53: 0x6d476a20, + 0x3bf54: 0x6d476c20, 0x3bf55: 0x6d756620, 0x3bf56: 0x6d756820, 0x3bf57: 0x6d756a20, + 0x3bf58: 0x6d756c20, 0x3bf59: 0x6d756e20, 0x3bf5a: 0x6d757020, 0x3bf5b: 0x6d9f2820, + 0x3bf5c: 0x6d9f2a20, 0x3bf5d: 0x6d9f2c20, 0x3bf5e: 0x6d9f2e20, 0x3bf5f: 0x6d9f3020, + 0x3bf60: 0x6dc18c20, 0x3bf61: 0x6dc18e20, 0x3bf62: 0x6dc19020, 0x3bf63: 0x6ddf5420, + 0x3bf64: 0x6ddf5620, 0x3bf65: 0x6df79c20, 0x3bf66: 0x6df79e20, 0x3bf67: 0x6df7a020, + 0x3bf68: 0x6e0b2c20, 0x3bf69: 0x6e0b2e20, 0x3bf6a: 0x6e1afa20, 0x3bf6b: 0x6e1afc20, + 0x3bf6c: 0x6e277620, 0x3bf6d: 0x6e30d620, 0x3bf6e: 0x6e30d820, 0x3bf6f: 0x6e30da20, + 0x3bf70: 0x6e37b420, 0x3bf71: 0x6e3c4a20, 0x3bf72: 0x6e461020, 0x3bf73: 0x6d186e20, + 0x3bf74: 0x6d476e20, 0x3bf75: 0x6d757220, 0x3bf76: 0x6d757420, 0x3bf77: 0x6d757620, + 0x3bf78: 0x6d757820, 0x3bf79: 0x6d757a20, 0x3bf7a: 0x6d9f3820, 0x3bf7b: 0x6dc19a20, + 0x3bf7c: 0x6dc19c20, 0x3bf7d: 0x6dc19e20, 0x3bf7e: 0x6dc1a020, 0x3bf7f: 0x6dc1a220, + // Block 0xefe, offset 0x3bf80 + 0x3bf80: 0x6dc1a420, 0x3bf81: 0x6dc1a620, 0x3bf82: 0x6ddf5e20, 0x3bf83: 0x6ddf6020, + 0x3bf84: 0x6ddf6220, 0x3bf85: 0x6ddf6420, 0x3bf86: 0x6df7a620, 0x3bf87: 0x6df7a820, + 0x3bf88: 0x6df7aa20, 0x3bf89: 0x6df7ac20, 0x3bf8a: 0x6df7ae20, 0x3bf8b: 0x6df7b020, + 0x3bf8c: 0x6df7b220, 0x3bf8d: 0x6df7b420, 0x3bf8e: 0x6df7b620, 0x3bf8f: 0x6df7b820, + 0x3bf90: 0x6df7ba20, 0x3bf91: 0x6df7bc20, 0x3bf92: 0x6df7be20, 0x3bf93: 0x6e0b3220, + 0x3bf94: 0x6e0b3420, 0x3bf95: 0x6e0b3620, 0x3bf96: 0x6e0b3820, 0x3bf97: 0x6e0b3a20, + 0x3bf98: 0x6e0b3c20, 0x3bf99: 0x6e1b0020, 0x3bf9a: 0x6e1b0220, 0x3bf9b: 0x6e1b0420, + 0x3bf9c: 0x6e1b0620, 0x3bf9d: 0x6e1b0820, 0x3bf9e: 0x6e1b0a20, 0x3bf9f: 0x6e277820, + 0x3bfa0: 0x6e277a20, 0x3bfa1: 0x6e277c20, 0x3bfa2: 0x6e277e20, 0x3bfa3: 0x6e278020, + 0x3bfa4: 0x6e30e020, 0x3bfa5: 0x6e30e220, 0x3bfa6: 0x6e30e420, 0x3bfa7: 0x6e37b820, + 0x3bfa8: 0x6e37ba20, 0x3bfa9: 0x6e37bc20, 0x3bfaa: 0x6e3fc020, 0x3bfab: 0x6e423220, + 0x3bfac: 0x6e461220, 0x3bfad: 0x6d477020, 0x3bfae: 0x6d758220, 0x3bfaf: 0x6d758420, + 0x3bfb0: 0x6d9f3e20, 0x3bfb1: 0x6d9f4020, 0x3bfb2: 0x6d9f4220, 0x3bfb3: 0x6d9f4420, + 0x3bfb4: 0x6d9f4620, 0x3bfb5: 0x6d9f4820, 0x3bfb6: 0x6dc1aa20, 0x3bfb7: 0x6dc1ac20, + 0x3bfb8: 0x6dc1ae20, 0x3bfb9: 0x6dc1b020, 0x3bfba: 0x6dc1b220, 0x3bfbb: 0x6dc1b420, + 0x3bfbc: 0x6dc1b620, 0x3bfbd: 0x6dc1b820, 0x3bfbe: 0x6dc1ba20, 0x3bfbf: 0x6ddf6620, + // Block 0xeff, offset 0x3bfc0 + 0x3bfc0: 0x6ddf6820, 0x3bfc1: 0x6df7c020, 0x3bfc2: 0x6e0b4420, 0x3bfc3: 0x6e0b4620, + 0x3bfc4: 0x6e0b4820, 0x3bfc5: 0x6e0b4a20, 0x3bfc6: 0x6e0b4c20, 0x3bfc7: 0x6e1b1220, + 0x3bfc8: 0x6e1b1420, 0x3bfc9: 0x6e1b1620, 0x3bfca: 0x6e1b1820, 0x3bfcb: 0x6e278620, + 0x3bfcc: 0x6e30e820, 0x3bfcd: 0x6e30ea20, 0x3bfce: 0x6e30ec20, 0x3bfcf: 0x6e30ee20, + 0x3bfd0: 0x6e37be20, 0x3bfd1: 0x6e3fc220, 0x3bfd2: 0x6e3c5020, 0x3bfd3: 0x6e3fc420, + 0x3bfd4: 0x6e43ee20, 0x3bfd5: 0x6e43f020, 0x3bfd6: 0x6e43f220, 0x3bfd7: 0x6ce8bc20, + 0x3bfd8: 0x6d187220, 0x3bfd9: 0x6d477420, 0x3bfda: 0x6d477620, 0x3bfdb: 0x6d477820, + 0x3bfdc: 0x6d758c20, 0x3bfdd: 0x6d758e20, 0x3bfde: 0x6d759020, 0x3bfdf: 0x6d759220, + 0x3bfe0: 0x6d759420, 0x3bfe1: 0x6d759620, 0x3bfe2: 0x6d759820, 0x3bfe3: 0x6d759a20, + 0x3bfe4: 0x6d9f5620, 0x3bfe5: 0x6d9f5820, 0x3bfe6: 0x6d9f5a20, 0x3bfe7: 0x6d9f5c20, + 0x3bfe8: 0x6d9f5e20, 0x3bfe9: 0x6d9f6020, 0x3bfea: 0x6d9f6220, 0x3bfeb: 0x6d9f6420, + 0x3bfec: 0x6d9f6620, 0x3bfed: 0x6d9f6820, 0x3bfee: 0x6d9f6a20, 0x3bfef: 0x6d9f6c20, + 0x3bff0: 0x6d9f6e20, 0x3bff1: 0x6d9f7020, 0x3bff2: 0x6dc1cc20, 0x3bff3: 0x6dc1ce20, + 0x3bff4: 0x6dc1d020, 0x3bff5: 0x6dc1d220, 0x3bff6: 0x6dc1d420, 0x3bff7: 0x6dc1d620, + 0x3bff8: 0x6dc1d820, 0x3bff9: 0x6dc1da20, 0x3bffa: 0x6dc1dc20, 0x3bffb: 0x6dc1de20, + 0x3bffc: 0x6dc1e020, 0x3bffd: 0x6dc1e220, 0x3bffe: 0x6dc1e420, 0x3bfff: 0x6ddf7820, + // Block 0xf00, offset 0x3c000 + 0x3c000: 0x6ddf7a20, 0x3c001: 0x6ddf7c20, 0x3c002: 0x6ddf7e20, 0x3c003: 0x6ddf8020, + 0x3c004: 0x6ddf8220, 0x3c005: 0x6ddf8420, 0x3c006: 0x6ddf8620, 0x3c007: 0x6ddf8820, + 0x3c008: 0x6df7cc20, 0x3c009: 0x6df7ce20, 0x3c00a: 0x6df7d020, 0x3c00b: 0x6df7d220, + 0x3c00c: 0x6df7d420, 0x3c00d: 0x6df7d620, 0x3c00e: 0x6df7d820, 0x3c00f: 0x6df7da20, + 0x3c010: 0x6df7dc20, 0x3c011: 0x6df7de20, 0x3c012: 0x6e0b6220, 0x3c013: 0x6e0b6420, + 0x3c014: 0x6e0b6620, 0x3c015: 0x6e0b6820, 0x3c016: 0x6e0b6a20, 0x3c017: 0x6e0b6c20, + 0x3c018: 0x6e0b6e20, 0x3c019: 0x6e0b7020, 0x3c01a: 0x6e0b7220, 0x3c01b: 0x6e0b7420, + 0x3c01c: 0x6e0b7620, 0x3c01d: 0x6e0b7820, 0x3c01e: 0x6e0b7a20, 0x3c01f: 0x6e0b7c20, + 0x3c020: 0x6e0b7e20, 0x3c021: 0x6e0b8020, 0x3c022: 0x6e0b8220, 0x3c023: 0x6e1b2a20, + 0x3c024: 0x6e0b8420, 0x3c025: 0x6e1b2c20, 0x3c026: 0x6e1b2e20, 0x3c027: 0x6e1b3020, + 0x3c028: 0x6e1b3220, 0x3c029: 0x6e1b3420, 0x3c02a: 0x6e1b3620, 0x3c02b: 0x6e1b3820, + 0x3c02c: 0x6e1b3a20, 0x3c02d: 0x6e1b3c20, 0x3c02e: 0x6e1b3e20, 0x3c02f: 0x6e1b4020, + 0x3c030: 0x6e1b4220, 0x3c031: 0x6e1b4420, 0x3c032: 0x6e1b4620, 0x3c033: 0x6e1b4820, + 0x3c034: 0x6e1b4a20, 0x3c035: 0x6e1b4c20, 0x3c036: 0x6e1b4e20, 0x3c037: 0x6e1b5020, + 0x3c038: 0x6e1b5220, 0x3c039: 0x6e1b5420, 0x3c03a: 0x6e1b5620, 0x3c03b: 0x6e1b5820, + 0x3c03c: 0x6e1b5a20, 0x3c03d: 0x6e1b5c20, 0x3c03e: 0x6e278c20, 0x3c03f: 0x6e278e20, + // Block 0xf01, offset 0x3c040 + 0x3c040: 0x6e279020, 0x3c041: 0x6e279220, 0x3c042: 0x6e279420, 0x3c043: 0x6e279620, + 0x3c044: 0x6e279820, 0x3c045: 0x6e279a20, 0x3c046: 0x6e279c20, 0x3c047: 0x6e279e20, + 0x3c048: 0x6e27a020, 0x3c049: 0x6e27a220, 0x3c04a: 0x6e27a420, 0x3c04b: 0x6e27a620, + 0x3c04c: 0x6e27a820, 0x3c04d: 0x6e27aa20, 0x3c04e: 0x6e27ac20, 0x3c04f: 0x6e30f820, + 0x3c050: 0x6e30fa20, 0x3c051: 0x6e30fc20, 0x3c052: 0x6e30fe20, 0x3c053: 0x6e310020, + 0x3c054: 0x6e310220, 0x3c055: 0x6e310420, 0x3c056: 0x6e310620, 0x3c057: 0x6e310820, + 0x3c058: 0x6e37c220, 0x3c059: 0x6e37c420, 0x3c05a: 0x6e37c620, 0x3c05b: 0x6e37c820, + 0x3c05c: 0x6e37ca20, 0x3c05d: 0x6e37cc20, 0x3c05e: 0x6e37ce20, 0x3c05f: 0x6e37d020, + 0x3c060: 0x6e37d220, 0x3c061: 0x6e37d420, 0x3c062: 0x6e37d620, 0x3c063: 0x6e37d820, + 0x3c064: 0x6e37da20, 0x3c065: 0x6e37dc20, 0x3c066: 0x6e37de20, 0x3c067: 0x6e37e020, + 0x3c068: 0x6e37e220, 0x3c069: 0x6e3c5a20, 0x3c06a: 0x6e3c5c20, 0x3c06b: 0x6e3c5e20, + 0x3c06c: 0x6e3c6020, 0x3c06d: 0x6e3c6220, 0x3c06e: 0x6e3c6420, 0x3c06f: 0x6e3c6620, + 0x3c070: 0x6e3c6820, 0x3c071: 0x6e3c6a20, 0x3c072: 0x6e3c6c20, 0x3c073: 0x6e3c6e20, + 0x3c074: 0x6e3fca20, 0x3c075: 0x6e3fcc20, 0x3c076: 0x6e3fce20, 0x3c077: 0x6e3fd020, + 0x3c078: 0x6e3fd220, 0x3c079: 0x6e423620, 0x3c07a: 0x6e423820, 0x3c07b: 0x6e423a20, + 0x3c07c: 0x6e423c20, 0x3c07d: 0x6e423e20, 0x3c07e: 0x6e424020, 0x3c07f: 0x6e43f620, + // Block 0xf02, offset 0x3c080 + 0x3c080: 0x6e43f820, 0x3c081: 0x6e43fa20, 0x3c082: 0x6e43fc20, 0x3c083: 0x6e450020, + 0x3c084: 0x6e450220, 0x3c085: 0x6e45a220, 0x3c086: 0x6e45a420, 0x3c087: 0x6e466a20, + 0x3c088: 0x6e466c20, 0x3c089: 0x6e471c20, 0x3c08a: 0x6e472a20, 0x3c08b: 0x6ddf8a20, + 0x3c08c: 0x6e0b8a20, 0x3c08d: 0x6e1b6020, 0x3c08e: 0x6e1b6220, 0x3c08f: 0x6e1b6420, + 0x3c090: 0x6e310a20, 0x3c091: 0x6d477a20, 0x3c092: 0x6d759c20, 0x3c093: 0x6d759e20, + 0x3c094: 0x6dc1ea20, 0x3c095: 0x6dc1ec20, 0x3c096: 0x6dc1ee20, 0x3c097: 0x6dc1f020, + 0x3c098: 0x6dc1f220, 0x3c099: 0x6dc1f420, 0x3c09a: 0x6ddf9420, 0x3c09b: 0x6ddf9620, + 0x3c09c: 0x6ddf9820, 0x3c09d: 0x6ddf9a20, 0x3c09e: 0x6ddf9c20, 0x3c09f: 0x6ddf9e20, + 0x3c0a0: 0x6ddfa020, 0x3c0a1: 0x6df7e820, 0x3c0a2: 0x6df7ea20, 0x3c0a3: 0x6df7ec20, + 0x3c0a4: 0x6df7ee20, 0x3c0a5: 0x6df7f020, 0x3c0a6: 0x6df7f220, 0x3c0a7: 0x6e0b8c20, + 0x3c0a8: 0x6e0b8e20, 0x3c0a9: 0x6e0b9020, 0x3c0aa: 0x6e0b9220, 0x3c0ab: 0x6e0b9420, + 0x3c0ac: 0x6e1b6820, 0x3c0ad: 0x6e1b6a20, 0x3c0ae: 0x6e27b020, 0x3c0af: 0x6e27b220, + 0x3c0b0: 0x6e27b420, 0x3c0b1: 0x6e27b620, 0x3c0b2: 0x6e27b820, 0x3c0b3: 0x6e27ba20, + 0x3c0b4: 0x6e27bc20, 0x3c0b5: 0x6e27be20, 0x3c0b6: 0x6e27c020, 0x3c0b7: 0x6e311020, + 0x3c0b8: 0x6e311220, 0x3c0b9: 0x6e37e620, 0x3c0ba: 0x6e3c7420, 0x3c0bb: 0x6e3cd420, + 0x3c0bc: 0x6e3fd620, 0x3c0bd: 0x6e3c7620, 0x3c0be: 0x6e3fd820, 0x3c0bf: 0x6e424220, + // Block 0xf03, offset 0x3c0c0 + 0x3c0c0: 0x6e424420, 0x3c0c1: 0x6e43fe20, 0x3c0c2: 0x6ce8c220, 0x3c0c3: 0x6d477c20, + 0x3c0c4: 0x6d75a620, 0x3c0c5: 0x6d75a820, 0x3c0c6: 0x6d75aa20, 0x3c0c7: 0x6d9f7a20, + 0x3c0c8: 0x6ddfa220, 0x3c0c9: 0x6e27c220, 0x3c0ca: 0x6e424620, 0x3c0cb: 0x6d9f7c20, + 0x3c0cc: 0x6d9f7e20, 0x3c0cd: 0x6dc1fa20, 0x3c0ce: 0x6dc1fc20, 0x3c0cf: 0x6dc1fe20, + 0x3c0d0: 0x6ddfae20, 0x3c0d1: 0x6ddfb020, 0x3c0d2: 0x6ddfb220, 0x3c0d3: 0x6ddfb420, + 0x3c0d4: 0x6df7fa20, 0x3c0d5: 0x6df7fc20, 0x3c0d6: 0x6df7fe20, 0x3c0d7: 0x6df80020, + 0x3c0d8: 0x6df80220, 0x3c0d9: 0x6df80420, 0x3c0da: 0x6df80620, 0x3c0db: 0x6df80820, + 0x3c0dc: 0x6e0b9820, 0x3c0dd: 0x6e0b9a20, 0x3c0de: 0x6e0b9c20, 0x3c0df: 0x6e0b9e20, + 0x3c0e0: 0x6e0ba020, 0x3c0e1: 0x6e0ba220, 0x3c0e2: 0x6e1b7620, 0x3c0e3: 0x6e1b7820, + 0x3c0e4: 0x6e1b7a20, 0x3c0e5: 0x6e1b7c20, 0x3c0e6: 0x6e27c620, 0x3c0e7: 0x6e27c820, + 0x3c0e8: 0x6e27ca20, 0x3c0e9: 0x6e27cc20, 0x3c0ea: 0x6e27ce20, 0x3c0eb: 0x6e27d020, + 0x3c0ec: 0x6e27d220, 0x3c0ed: 0x6e27d420, 0x3c0ee: 0x6e311620, 0x3c0ef: 0x6e37ee20, + 0x3c0f0: 0x6e37f020, 0x3c0f1: 0x6e37f220, 0x3c0f2: 0x6e37f420, 0x3c0f3: 0x6e3c8220, + 0x3c0f4: 0x6e3c8420, 0x3c0f5: 0x6e3fdc20, 0x3c0f6: 0x6e424820, 0x3c0f7: 0x6e450620, + 0x3c0f8: 0x6d75ae20, 0x3c0f9: 0x6d75b020, 0x3c0fa: 0x6d9f8220, 0x3c0fb: 0x6d9f8420, + 0x3c0fc: 0x6d9f8620, 0x3c0fd: 0x6dc20820, 0x3c0fe: 0x6dc20a20, 0x3c0ff: 0x6dc20c20, + // Block 0xf04, offset 0x3c100 + 0x3c100: 0x6dc20e20, 0x3c101: 0x6dc21020, 0x3c102: 0x6dc21220, 0x3c103: 0x6dc21420, + 0x3c104: 0x6dc21620, 0x3c105: 0x6dc21820, 0x3c106: 0x6dc21a20, 0x3c107: 0x6dc21c20, + 0x3c108: 0x6dc21e20, 0x3c109: 0x6ddfc820, 0x3c10a: 0x6ddfca20, 0x3c10b: 0x6ddfcc20, + 0x3c10c: 0x6ddfce20, 0x3c10d: 0x6ddfd020, 0x3c10e: 0x6ddfd220, 0x3c10f: 0x6ddfd420, + 0x3c110: 0x6ddfd620, 0x3c111: 0x6ddfd820, 0x3c112: 0x6df80e20, 0x3c113: 0x6df81020, + 0x3c114: 0x6df81220, 0x3c115: 0x6df81420, 0x3c116: 0x6df81620, 0x3c117: 0x6df81820, + 0x3c118: 0x6df81a20, 0x3c119: 0x6df81c20, 0x3c11a: 0x6e0baa20, 0x3c11b: 0x6e0bac20, + 0x3c11c: 0x6e0bae20, 0x3c11d: 0x6e0bb020, 0x3c11e: 0x6e0bb220, 0x3c11f: 0x6df81e20, + 0x3c120: 0x6e0bb420, 0x3c121: 0x6e0bb620, 0x3c122: 0x6e0bb820, 0x3c123: 0x6e0bba20, + 0x3c124: 0x6e0bbc20, 0x3c125: 0x6e0bbe20, 0x3c126: 0x6e0bc020, 0x3c127: 0x6e0bc220, + 0x3c128: 0x6e1b8220, 0x3c129: 0x6e1b8420, 0x3c12a: 0x6e1b8620, 0x3c12b: 0x6e27e020, + 0x3c12c: 0x6e27e220, 0x3c12d: 0x6e27e420, 0x3c12e: 0x6e27e620, 0x3c12f: 0x6e27e820, + 0x3c130: 0x6e27ea20, 0x3c131: 0x6e27ec20, 0x3c132: 0x6e27ee20, 0x3c133: 0x6e27f020, + 0x3c134: 0x6e27f220, 0x3c135: 0x6e312420, 0x3c136: 0x6e312620, 0x3c137: 0x6e312820, + 0x3c138: 0x6e312a20, 0x3c139: 0x6e312c20, 0x3c13a: 0x6e312e20, 0x3c13b: 0x6e313020, + 0x3c13c: 0x6e313220, 0x3c13d: 0x6e313420, 0x3c13e: 0x6e313620, 0x3c13f: 0x6e380420, + // Block 0xf05, offset 0x3c140 + 0x3c140: 0x6e37f620, 0x3c141: 0x6e37f820, 0x3c142: 0x6e37fa20, 0x3c143: 0x6e37fc20, + 0x3c144: 0x6e37fe20, 0x3c145: 0x6e3c8620, 0x3c146: 0x6e3c8820, 0x3c147: 0x6e3c8a20, + 0x3c148: 0x6e3c8c20, 0x3c149: 0x6e3c8e20, 0x3c14a: 0x6e3fde20, 0x3c14b: 0x6e424a20, + 0x3c14c: 0x6e450820, 0x3c14d: 0x6e450a20, 0x3c14e: 0x6e45a620, 0x3c14f: 0x6e461420, + 0x3c150: 0x6d75b220, 0x3c151: 0x6d9f8c20, 0x3c152: 0x6d9f8e20, 0x3c153: 0x6dc22420, + 0x3c154: 0x6dc22620, 0x3c155: 0x6ddfe020, 0x3c156: 0x6ddfe220, 0x3c157: 0x6ddfe420, + 0x3c158: 0x6ddfe620, 0x3c159: 0x6ddfe820, 0x3c15a: 0x6df82620, 0x3c15b: 0x6df82820, + 0x3c15c: 0x6df82a20, 0x3c15d: 0x6df82c20, 0x3c15e: 0x6df82e20, 0x3c15f: 0x6df83020, + 0x3c160: 0x6df83220, 0x3c161: 0x6e0bc820, 0x3c162: 0x6e0bca20, 0x3c163: 0x6e0bcc20, + 0x3c164: 0x6e0bce20, 0x3c165: 0x6e1b8a20, 0x3c166: 0x6e1b8c20, 0x3c167: 0x6e1b8e20, + 0x3c168: 0x6e1b9020, 0x3c169: 0x6e1b9220, 0x3c16a: 0x6e1b9420, 0x3c16b: 0x6e1b9620, + 0x3c16c: 0x6e1b9820, 0x3c16d: 0x6e27f620, 0x3c16e: 0x6e27f820, 0x3c16f: 0x6e313c20, + 0x3c170: 0x6e313e20, 0x3c171: 0x6e314020, 0x3c172: 0x6e314220, 0x3c173: 0x6e380620, + 0x3c174: 0x6e380820, 0x3c175: 0x6e380a20, 0x3c176: 0x6e3c9420, 0x3c177: 0x6e3c9620, + 0x3c178: 0x6e3c9820, 0x3c179: 0x6e3c9a20, 0x3c17a: 0x6e3c9c20, 0x3c17b: 0x6e3fe020, + 0x3c17c: 0x6e3fe220, 0x3c17d: 0x6e3fe420, 0x3c17e: 0x6e425020, 0x3c17f: 0x6e425220, + // Block 0xf06, offset 0x3c180 + 0x3c180: 0x6e425420, 0x3c181: 0x6e45aa20, 0x3c182: 0x6e461620, 0x3c183: 0x6e466e20, + 0x3c184: 0x6d478420, 0x3c185: 0x6d9f9020, 0x3c186: 0x6dc22e20, 0x3c187: 0x6ddff020, + 0x3c188: 0x6ddff220, 0x3c189: 0x6df83620, 0x3c18a: 0x6df83820, 0x3c18b: 0x6e0bd020, + 0x3c18c: 0x6e0bd220, 0x3c18d: 0x6e27fa20, 0x3c18e: 0x6e1b9c20, 0x3c18f: 0x6e3c9e20, + 0x3c190: 0x6e3ca020, 0x3c191: 0x6e3ca220, 0x3c192: 0x6e440220, 0x3c193: 0x6e45ac20, + 0x3c194: 0x6dc23220, 0x3c195: 0x6dc23420, 0x3c196: 0x6dc23620, 0x3c197: 0x6dc23820, + 0x3c198: 0x6ddff820, 0x3c199: 0x6ddffa20, 0x3c19a: 0x6ddffc20, 0x3c19b: 0x6df84420, + 0x3c19c: 0x6df84620, 0x3c19d: 0x6df84820, 0x3c19e: 0x6df84a20, 0x3c19f: 0x6df84c20, + 0x3c1a0: 0x6df84e20, 0x3c1a1: 0x6df85020, 0x3c1a2: 0x6df85220, 0x3c1a3: 0x6df85420, + 0x3c1a4: 0x6df85620, 0x3c1a5: 0x6e0bee20, 0x3c1a6: 0x6e0bf020, 0x3c1a7: 0x6e0bf220, + 0x3c1a8: 0x6e0bf420, 0x3c1a9: 0x6e0bf620, 0x3c1aa: 0x6e0bf820, 0x3c1ab: 0x6e0bfa20, + 0x3c1ac: 0x6e0bfc20, 0x3c1ad: 0x6e0bfe20, 0x3c1ae: 0x6e0c0020, 0x3c1af: 0x6e0c0220, + 0x3c1b0: 0x6e0c0420, 0x3c1b1: 0x6e0c0620, 0x3c1b2: 0x6e0c0820, 0x3c1b3: 0x6e0c0a20, + 0x3c1b4: 0x6e0c0c20, 0x3c1b5: 0x6e0c0e20, 0x3c1b6: 0x6e0c1020, 0x3c1b7: 0x6e1bb020, + 0x3c1b8: 0x6e1bb220, 0x3c1b9: 0x6e1bb420, 0x3c1ba: 0x6e1bb620, 0x3c1bb: 0x6e1bb820, + 0x3c1bc: 0x6e1bba20, 0x3c1bd: 0x6e1bbc20, 0x3c1be: 0x6e1bbe20, 0x3c1bf: 0x6e1bc020, + // Block 0xf07, offset 0x3c1c0 + 0x3c1c0: 0x6e1bc220, 0x3c1c1: 0x6e1bc420, 0x3c1c2: 0x6e1bc620, 0x3c1c3: 0x6e1bc820, + 0x3c1c4: 0x6e1bca20, 0x3c1c5: 0x6e1bcc20, 0x3c1c6: 0x6e1bce20, 0x3c1c7: 0x6e1bd020, + 0x3c1c8: 0x6e1bd220, 0x3c1c9: 0x6e1bd420, 0x3c1ca: 0x6e1bd620, 0x3c1cb: 0x6e1bd820, + 0x3c1cc: 0x6e1bda20, 0x3c1cd: 0x6e1bdc20, 0x3c1ce: 0x6e280620, 0x3c1cf: 0x6e280820, + 0x3c1d0: 0x6e280a20, 0x3c1d1: 0x6e280c20, 0x3c1d2: 0x6e280e20, 0x3c1d3: 0x6e281020, + 0x3c1d4: 0x6e281220, 0x3c1d5: 0x6e281420, 0x3c1d6: 0x6e281620, 0x3c1d7: 0x6e281820, + 0x3c1d8: 0x6e281a20, 0x3c1d9: 0x6e281c20, 0x3c1da: 0x6e281e20, 0x3c1db: 0x6e282020, + 0x3c1dc: 0x6e282220, 0x3c1dd: 0x6e282420, 0x3c1de: 0x6e282620, 0x3c1df: 0x6e282820, + 0x3c1e0: 0x6e282a20, 0x3c1e1: 0x6e282c20, 0x3c1e2: 0x6e282e20, 0x3c1e3: 0x6e283020, + 0x3c1e4: 0x6e283220, 0x3c1e5: 0x6e315420, 0x3c1e6: 0x6e315620, 0x3c1e7: 0x6e315820, + 0x3c1e8: 0x6e315a20, 0x3c1e9: 0x6e315c20, 0x3c1ea: 0x6e315e20, 0x3c1eb: 0x6e316020, + 0x3c1ec: 0x6e316220, 0x3c1ed: 0x6e316420, 0x3c1ee: 0x6e316620, 0x3c1ef: 0x6e316820, + 0x3c1f0: 0x6e316a20, 0x3c1f1: 0x6e316c20, 0x3c1f2: 0x6e316e20, 0x3c1f3: 0x6e317020, + 0x3c1f4: 0x6e317220, 0x3c1f5: 0x6e317420, 0x3c1f6: 0x6e317620, 0x3c1f7: 0x6e317820, + 0x3c1f8: 0x6e317a20, 0x3c1f9: 0x6e381e20, 0x3c1fa: 0x6e382020, 0x3c1fb: 0x6e382220, + 0x3c1fc: 0x6e382420, 0x3c1fd: 0x6e382620, 0x3c1fe: 0x6e382820, 0x3c1ff: 0x6e382a20, + // Block 0xf08, offset 0x3c200 + 0x3c200: 0x6e382c20, 0x3c201: 0x6e382e20, 0x3c202: 0x6e383020, 0x3c203: 0x6e383220, + 0x3c204: 0x6e383420, 0x3c205: 0x6e383620, 0x3c206: 0x6e383820, 0x3c207: 0x6e383a20, + 0x3c208: 0x6e383c20, 0x3c209: 0x6e3cb020, 0x3c20a: 0x6e3cb220, 0x3c20b: 0x6e3cb420, + 0x3c20c: 0x6e3cb620, 0x3c20d: 0x6e3cb820, 0x3c20e: 0x6e3cba20, 0x3c20f: 0x6e3cbc20, + 0x3c210: 0x6e3cbe20, 0x3c211: 0x6e3cc020, 0x3c212: 0x6e3cc220, 0x3c213: 0x6e3cc420, + 0x3c214: 0x6e3cc620, 0x3c215: 0x6e3cc820, 0x3c216: 0x6e3cca20, 0x3c217: 0x6e3ccc20, + 0x3c218: 0x6e3cce20, 0x3c219: 0x6e3cd020, 0x3c21a: 0x6e3fea20, 0x3c21b: 0x6e3fec20, + 0x3c21c: 0x6e3fee20, 0x3c21d: 0x6e3ff020, 0x3c21e: 0x6e3ff220, 0x3c21f: 0x6e3ff420, + 0x3c220: 0x6e3ff620, 0x3c221: 0x6e3ff820, 0x3c222: 0x6e3ffa20, 0x3c223: 0x6e425820, + 0x3c224: 0x6e425a20, 0x3c225: 0x6e425c20, 0x3c226: 0x6e425e20, 0x3c227: 0x6e426020, + 0x3c228: 0x6e426220, 0x3c229: 0x6e426420, 0x3c22a: 0x6e426620, 0x3c22b: 0x6e426820, + 0x3c22c: 0x6e426a20, 0x3c22d: 0x6e426c20, 0x3c22e: 0x6e426e20, 0x3c22f: 0x6e427020, + 0x3c230: 0x6e440a20, 0x3c231: 0x6e440c20, 0x3c232: 0x6e440e20, 0x3c233: 0x6e441020, + 0x3c234: 0x6e441220, 0x3c235: 0x6e441420, 0x3c236: 0x6e451020, 0x3c237: 0x6e45ae20, + 0x3c238: 0x6e45b020, 0x3c239: 0x6e45b220, 0x3c23a: 0x6e45b420, 0x3c23b: 0x6e45b620, + 0x3c23c: 0x6e45b820, 0x3c23d: 0x6e461820, 0x3c23e: 0x6e461a20, 0x3c23f: 0x6e461c20, + // Block 0xf09, offset 0x3c240 + 0x3c240: 0x6e461e20, 0x3c241: 0x6e467020, 0x3c242: 0x6e467220, 0x3c243: 0x6e467420, + 0x3c244: 0x6e467620, 0x3c245: 0x6e46a620, 0x3c246: 0x6e46be20, 0x3c247: 0x6e46c020, + 0x3c248: 0x6e46c220, 0x3c249: 0x6e46c420, 0x3c24a: 0x6e46de20, 0x3c24b: 0x6e46e020, + 0x3c24c: 0x6e46fe20, 0x3c24d: 0x6e472620, 0x3c24e: 0x6e472820, 0x3c24f: 0x6d478a20, + 0x3c250: 0x6d9f9420, 0x3c251: 0x6df85c20, 0x3c252: 0x6df85e20, 0x3c253: 0x6df86020, + 0x3c254: 0x6df86220, 0x3c255: 0x6e0c1420, 0x3c256: 0x6e0c1620, 0x3c257: 0x6e0c1820, + 0x3c258: 0x6e0c1a20, 0x3c259: 0x6e1be420, 0x3c25a: 0x6e0c1c20, 0x3c25b: 0x6e0c1e20, + 0x3c25c: 0x6e283e20, 0x3c25d: 0x6e284020, 0x3c25e: 0x6e284220, 0x3c25f: 0x6e284420, + 0x3c260: 0x6e317c20, 0x3c261: 0x6e317e20, 0x3c262: 0x6e3cd220, 0x3c263: 0x6e427420, + 0x3c264: 0x6e427620, 0x3c265: 0x6e474220, 0x3c266: 0x6d9fa020, 0x3c267: 0x6e1bec20, + 0x3c268: 0x6de00220, 0x3c269: 0x6df86620, 0x3c26a: 0x6df86820, 0x3c26b: 0x6e0c2620, + 0x3c26c: 0x6e0c2820, 0x3c26d: 0x6e0c2a20, 0x3c26e: 0x6e0c2c20, 0x3c26f: 0x6e0c2e20, + 0x3c270: 0x6e0c3020, 0x3c271: 0x6e0c3220, 0x3c272: 0x6e0c3420, 0x3c273: 0x6e0c3620, + 0x3c274: 0x6e0c3820, 0x3c275: 0x6e0c3a20, 0x3c276: 0x6e1bee20, 0x3c277: 0x6e1bf020, + 0x3c278: 0x6e1bf220, 0x3c279: 0x6e1bf420, 0x3c27a: 0x6e1bf620, 0x3c27b: 0x6e1bf820, + 0x3c27c: 0x6e1bfa20, 0x3c27d: 0x6e1bfc20, 0x3c27e: 0x6e318220, 0x3c27f: 0x6e318420, + // Block 0xf0a, offset 0x3c280 + 0x3c280: 0x6e384020, 0x3c281: 0x6e3cd620, 0x3c282: 0x6e427820, 0x3c283: 0x6e427a20, + 0x3c284: 0x6e427c20, 0x3c285: 0x6e441820, 0x3c286: 0x6e441a20, 0x3c287: 0x6e45ba20, + 0x3c288: 0x6e46aa20, 0x3c289: 0x6d9fa220, 0x3c28a: 0x6e1c0220, 0x3c28b: 0x6e3cdc20, + 0x3c28c: 0x6e3cde20, 0x3c28d: 0x6e3ce020, 0x3c28e: 0x6e400020, 0x3c28f: 0x6e400220, + 0x3c290: 0x6e400420, 0x3c291: 0x6e400620, 0x3c292: 0x6e428020, 0x3c293: 0x6e441e20, + 0x3c294: 0x6e462020, 0x3c295: 0x6e46ac20, 0x3c296: 0x6e471220, + // Block 0xf0b, offset 0x3c2c0 + 0x3c2c0: 0x6c00f020, 0x3c2c1: 0x6c00f220, 0x3c2c2: 0x6c023420, 0x3c2c3: 0x6c28c220, + 0x3c2c4: 0x6c42f420, 0x3c2c5: 0x6c63d620, 0x3c2c6: 0x6c8afa20, 0x3c2c7: 0x6d75d220, + 0x3c2c8: 0x6c024020, 0x3c2c9: 0x6c42fe20, 0x3c2ca: 0x6c004c20, 0x3c2cb: 0x6c28ce20, + 0x3c2cc: 0x6c0b0c20, 0x3c2cd: 0x6c430820, 0x3c2ce: 0x6c63ee20, 0x3c2cf: 0x6c63f020, + 0x3c2d0: 0x6c05ae20, 0x3c2d1: 0x6c0b3620, 0x3c2d2: 0x6c161c20, 0x3c2d3: 0x6c161e20, + 0x3c2d4: 0x6c28f020, 0x3c2d5: 0x6c432a20, 0x3c2d6: 0x6c63fe20, 0x3c2d7: 0x6c640020, + 0x3c2d8: 0x6c8b2020, 0x3c2d9: 0x6cb7b620, 0x3c2da: 0x6cb7b820, 0x3c2db: 0x6ce8dc20, + 0x3c2dc: 0x6c162820, 0x3c2dd: 0x6cb7bc20, 0x3c2de: 0x6d18a820, 0x3c2df: 0x6d479c20, + 0x3c2e0: 0x6c05b420, 0x3c2e1: 0x6c05b620, 0x3c2e2: 0x6c164420, 0x3c2e3: 0x6c8b3c20, + 0x3c2e4: 0x6cb7d620, 0x3c2e5: 0x6d47b020, 0x3c2e6: 0x6de00c20, 0x3c2e7: 0x6c02c420, + 0x3c2e8: 0x6c0c3c20, 0x3c2e9: 0x6c0c3e20, 0x3c2ea: 0x6c0c4020, 0x3c2eb: 0x6c0c4220, + 0x3c2ec: 0x6c172220, 0x3c2ed: 0x6c172420, 0x3c2ee: 0x6c172620, 0x3c2ef: 0x6c172820, + 0x3c2f0: 0x6c172a20, 0x3c2f1: 0x6c172c20, 0x3c2f2: 0x6c172e20, 0x3c2f3: 0x6c173020, + 0x3c2f4: 0x6c173220, 0x3c2f5: 0x6c2a1c20, 0x3c2f6: 0x6c2a1e20, 0x3c2f7: 0x6c2a2020, + 0x3c2f8: 0x6c2a2220, 0x3c2f9: 0x6c2a2420, 0x3c2fa: 0x6c2a2620, 0x3c2fb: 0x6c444a20, + 0x3c2fc: 0x6c444c20, 0x3c2fd: 0x6c444e20, 0x3c2fe: 0x6c445020, 0x3c2ff: 0x6c445220, + // Block 0xf0c, offset 0x3c300 + 0x3c300: 0x6c445420, 0x3c301: 0x6c445620, 0x3c302: 0x6c445820, 0x3c303: 0x6c655c20, + 0x3c304: 0x6c655e20, 0x3c305: 0x6c656020, 0x3c306: 0x6c656220, 0x3c307: 0x6c656420, + 0x3c308: 0x6c656620, 0x3c309: 0x6c656820, 0x3c30a: 0x6c656a20, 0x3c30b: 0x6c8c4e20, + 0x3c30c: 0x6c8c5020, 0x3c30d: 0x6c8c5220, 0x3c30e: 0x6c8c5420, 0x3c30f: 0x6c8c5620, + 0x3c310: 0x6c8c5820, 0x3c311: 0x6c8c5a20, 0x3c312: 0x6c8c5c20, 0x3c313: 0x6c8c5e20, + 0x3c314: 0x6c8c6020, 0x3c315: 0x6c8c6220, 0x3c316: 0x6cb8b220, 0x3c317: 0x6cb8b420, + 0x3c318: 0x6cb8b620, 0x3c319: 0x6cb8b820, 0x3c31a: 0x6cb8ba20, 0x3c31b: 0x6cb8bc20, + 0x3c31c: 0x6cb8be20, 0x3c31d: 0x6cb8c020, 0x3c31e: 0x6cb8c220, 0x3c31f: 0x6cb8c420, + 0x3c320: 0x6ce9d620, 0x3c321: 0x6ce9d820, 0x3c322: 0x6ce9da20, 0x3c323: 0x6ce9dc20, + 0x3c324: 0x6ce9de20, 0x3c325: 0x6d19a820, 0x3c326: 0x6d19aa20, 0x3c327: 0x6d19ac20, + 0x3c328: 0x6d19ae20, 0x3c329: 0x6d19b020, 0x3c32a: 0x6d19b220, 0x3c32b: 0x6d485020, + 0x3c32c: 0x6d485220, 0x3c32d: 0x6d485420, 0x3c32e: 0x6d485620, 0x3c32f: 0x6d485820, + 0x3c330: 0x6d765e20, 0x3c331: 0x6d766020, 0x3c332: 0x6d766220, 0x3c333: 0x6d766420, + 0x3c334: 0x6d9ffc20, 0x3c335: 0x6d9ffe20, 0x3c336: 0x6da00020, 0x3c337: 0x6dc28620, + 0x3c338: 0x6dc28820, 0x3c339: 0x6dc28a20, 0x3c33a: 0x6de03c20, 0x3c33b: 0x6de03e20, + 0x3c33c: 0x6de04020, 0x3c33d: 0x6df88c20, 0x3c33e: 0x6e0c6220, 0x3c33f: 0x6c2a4a20, + // Block 0xf0d, offset 0x3c340 + 0x3c340: 0x6c446820, 0x3c341: 0x6c658420, 0x3c342: 0x6ce9ea20, 0x3c343: 0x6d486a20, + 0x3c344: 0x6d486c20, 0x3c345: 0x6d486e20, 0x3c346: 0x6de04620, 0x3c347: 0x6c658e20, + 0x3c348: 0x6c0c7620, 0x3c349: 0x6cb8f020, 0x3c34a: 0x6cea0620, 0x3c34b: 0x6d19da20, + 0x3c34c: 0x6d487020, 0x3c34d: 0x6d768220, 0x3c34e: 0x6c177e20, 0x3c34f: 0x6c178a20, + 0x3c350: 0x6c178c20, 0x3c351: 0x6c2a7220, 0x3c352: 0x6c65c020, 0x3c353: 0x6c8c9420, + 0x3c354: 0x6cb90a20, 0x3c355: 0x6d19e820, 0x3c356: 0x6c065820, 0x3c357: 0x6c0cb220, + 0x3c358: 0x6c0cb420, 0x3c359: 0x6c0cb620, 0x3c35a: 0x6c0cb820, 0x3c35b: 0x6c17b220, + 0x3c35c: 0x6c17b420, 0x3c35d: 0x6c17b620, 0x3c35e: 0x6c2a9620, 0x3c35f: 0x6c44ca20, + 0x3c360: 0x6c44cc20, 0x3c361: 0x6c44ce20, 0x3c362: 0x6c65f820, 0x3c363: 0x6c65fa20, + 0x3c364: 0x6c65fc20, 0x3c365: 0x6c65fe20, 0x3c366: 0x6c8cb620, 0x3c367: 0x6c8cb820, + 0x3c368: 0x6c8cba20, 0x3c369: 0x6cb92c20, 0x3c36a: 0x6cb92e20, 0x3c36b: 0x6cea2a20, + 0x3c36c: 0x6cea2c20, 0x3c36d: 0x6d19fc20, 0x3c36e: 0x6d489020, 0x3c36f: 0x6d769820, + 0x3c370: 0x6df8a020, 0x3c371: 0x6c0cd020, 0x3c372: 0x6c17ce20, 0x3c373: 0x6c660a20, + 0x3c374: 0x6c8cce20, 0x3c375: 0x6cea3620, 0x3c376: 0x6c067a20, 0x3c377: 0x6c2aba20, + 0x3c378: 0x6c661020, 0x3c379: 0x6cb94420, 0x3c37a: 0x6cea3820, 0x3c37b: 0x6cea3a20, + 0x3c37c: 0x6dc2b420, 0x3c37d: 0x6de05420, 0x3c37e: 0x6c0d3420, 0x3c37f: 0x6c0d3620, + // Block 0xf0e, offset 0x3c380 + 0x3c380: 0x6c0d3820, 0x3c381: 0x6c183420, 0x3c382: 0x6c183620, 0x3c383: 0x6c2b4420, + 0x3c384: 0x6c2b4620, 0x3c385: 0x6c2b4820, 0x3c386: 0x6c454820, 0x3c387: 0x6c454a20, + 0x3c388: 0x6c66a220, 0x3c389: 0x6c66a420, 0x3c38a: 0x6c8d3a20, 0x3c38b: 0x6c8d3c20, + 0x3c38c: 0x6c8d3e20, 0x3c38d: 0x6c8d4020, 0x3c38e: 0x6cb9a420, 0x3c38f: 0x6cb9a620, + 0x3c390: 0x6cb9a820, 0x3c391: 0x6cea8c20, 0x3c392: 0x6cea8e20, 0x3c393: 0x6cea9020, + 0x3c394: 0x6d48d820, 0x3c395: 0x6d76d620, 0x3c396: 0x6d76d820, 0x3c397: 0x6c187220, + 0x3c398: 0x6c187420, 0x3c399: 0x6c187620, 0x3c39a: 0x6c2b8220, 0x3c39b: 0x6c2b8420, + 0x3c39c: 0x6c458020, 0x3c39d: 0x6c66d820, 0x3c39e: 0x6c66da20, 0x3c39f: 0x6c66dc20, + 0x3c3a0: 0x6c8d6820, 0x3c3a1: 0x6cb9d020, 0x3c3a2: 0x6cb9d220, 0x3c3a3: 0x6ceabe20, + 0x3c3a4: 0x6d1aa420, 0x3c3a5: 0x6d1aa620, 0x3c3a6: 0x6d48f020, 0x3c3a7: 0x6e0c8220, + 0x3c3a8: 0x6c016620, 0x3c3a9: 0x6c0d6620, 0x3c3aa: 0x6c459e20, 0x3c3ab: 0x6cead020, + 0x3c3ac: 0x6c0d7820, 0x3c3ad: 0x6c18a020, 0x3c3ae: 0x6c18a220, 0x3c3af: 0x6c45be20, + 0x3c3b0: 0x6c670c20, 0x3c3b1: 0x6d1ac820, 0x3c3b2: 0x6df8c020, 0x3c3b3: 0x6c18bc20, + 0x3c3b4: 0x6c671e20, 0x3c3b5: 0x6c8da620, 0x3c3b6: 0x6ceaf420, 0x3c3b7: 0x6d1ad220, + 0x3c3b8: 0x6d490e20, 0x3c3b9: 0x6d491020, 0x3c3ba: 0x6da08220, 0x3c3bb: 0x6dc2de20, + 0x3c3bc: 0x6df8c420, 0x3c3bd: 0x6c037a20, 0x3c3be: 0x6c18ce20, 0x3c3bf: 0x6c672c20, + // Block 0xf0f, offset 0x3c3c0 + 0x3c3c0: 0x6d1ad820, 0x3c3c1: 0x6c2bfe20, 0x3c3c2: 0x6c45f420, 0x3c3c3: 0x6c070820, + 0x3c3c4: 0x6c190020, 0x3c3c5: 0x6c2c2420, 0x3c3c6: 0x6c2c2620, 0x3c3c7: 0x6c462420, + 0x3c3c8: 0x6c462620, 0x3c3c9: 0x6c462820, 0x3c3ca: 0x6c462a20, 0x3c3cb: 0x6c676420, + 0x3c3cc: 0x6c676620, 0x3c3cd: 0x6c676820, 0x3c3ce: 0x6c676a20, 0x3c3cf: 0x6c8dde20, + 0x3c3d0: 0x6c8de020, 0x3c3d1: 0x6cba2a20, 0x3c3d2: 0x6cba2c20, 0x3c3d3: 0x6ceb1a20, + 0x3c3d4: 0x6ceb1c20, 0x3c3d5: 0x6ceb1e20, 0x3c3d6: 0x6d1b1020, 0x3c3d7: 0x6d1b1220, + 0x3c3d8: 0x6d493620, 0x3c3d9: 0x6d493820, 0x3c3da: 0x6da08c20, 0x3c3db: 0x6df8c820, + 0x3c3dc: 0x6c463c20, 0x3c3dd: 0x6c677a20, 0x3c3de: 0x6c8dee20, 0x3c3df: 0x6cba4020, + 0x3c3e0: 0x6ceb3020, 0x3c3e1: 0x6d494220, 0x3c3e2: 0x6df8ca20, 0x3c3e3: 0x6c03b820, + 0x3c3e4: 0x6c03ba20, 0x3c3e5: 0x6c0e1a20, 0x3c3e6: 0x6c192020, 0x3c3e7: 0x6c2c5220, + 0x3c3e8: 0x6c2c5420, 0x3c3e9: 0x6c466020, 0x3c3ea: 0x6c466220, 0x3c3eb: 0x6c679620, + 0x3c3ec: 0x6c679820, 0x3c3ed: 0x6cba5820, 0x3c3ee: 0x6cba5a20, 0x3c3ef: 0x6ceb4c20, + 0x3c3f0: 0x6d1b3220, 0x3c3f1: 0x6d770a20, 0x3c3f2: 0x6c078620, 0x3c3f3: 0x6c1a4420, + 0x3c3f4: 0x6c1a4620, 0x3c3f5: 0x6c1a4820, 0x3c3f6: 0x6c2d7620, 0x3c3f7: 0x6c2d7820, + 0x3c3f8: 0x6c2d7a20, 0x3c3f9: 0x6c2d7c20, 0x3c3fa: 0x6c47c620, 0x3c3fb: 0x6c47c820, + 0x3c3fc: 0x6c47ca20, 0x3c3fd: 0x6c47cc20, 0x3c3fe: 0x6c47ce20, 0x3c3ff: 0x6c47d020, + // Block 0xf10, offset 0x3c400 + 0x3c400: 0x6c47d220, 0x3c401: 0x6c47d420, 0x3c402: 0x6c47d620, 0x3c403: 0x6c47d820, + 0x3c404: 0x6c693820, 0x3c405: 0x6c693a20, 0x3c406: 0x6c693c20, 0x3c407: 0x6c693e20, + 0x3c408: 0x6c694020, 0x3c409: 0x6c694220, 0x3c40a: 0x6c694420, 0x3c40b: 0x6c694620, + 0x3c40c: 0x6c694820, 0x3c40d: 0x6c694a20, 0x3c40e: 0x6c694c20, 0x3c40f: 0x6d770c20, + 0x3c410: 0x6c900020, 0x3c411: 0x6c900220, 0x3c412: 0x6c900420, 0x3c413: 0x6c900620, + 0x3c414: 0x6c900820, 0x3c415: 0x6c900a20, 0x3c416: 0x6c900c20, 0x3c417: 0x6c900e20, + 0x3c418: 0x6c901020, 0x3c419: 0x6c901220, 0x3c41a: 0x6c901420, 0x3c41b: 0x6c901620, + 0x3c41c: 0x6cbc2220, 0x3c41d: 0x6cbc2420, 0x3c41e: 0x6cbc2620, 0x3c41f: 0x6cbc2820, + 0x3c420: 0x6cbc2a20, 0x3c421: 0x6cbc2c20, 0x3c422: 0x6cbc2e20, 0x3c423: 0x6cbc3020, + 0x3c424: 0x6cbc3220, 0x3c425: 0x6cbc3420, 0x3c426: 0x6cbc3620, 0x3c427: 0x6cbc3820, + 0x3c428: 0x6cbc3a20, 0x3c429: 0x6cbc3c20, 0x3c42a: 0x6ced0c20, 0x3c42b: 0x6ced0e20, + 0x3c42c: 0x6ced1020, 0x3c42d: 0x6ced1220, 0x3c42e: 0x6ced1420, 0x3c42f: 0x6ced1620, + 0x3c430: 0x6ced1820, 0x3c431: 0x6ced1a20, 0x3c432: 0x6ced1c20, 0x3c433: 0x6ced1e20, + 0x3c434: 0x6ced2020, 0x3c435: 0x6ced2220, 0x3c436: 0x6ced2420, 0x3c437: 0x6ced2620, + 0x3c438: 0x6d1cd020, 0x3c439: 0x6d1cd220, 0x3c43a: 0x6d1cd420, 0x3c43b: 0x6d1cd620, + 0x3c43c: 0x6d1cd820, 0x3c43d: 0x6d1cda20, 0x3c43e: 0x6d1cdc20, 0x3c43f: 0x6d1cde20, + // Block 0xf11, offset 0x3c440 + 0x3c440: 0x6d1ce020, 0x3c441: 0x6d1ce220, 0x3c442: 0x6d1ce420, 0x3c443: 0x6d1ce620, + 0x3c444: 0x6d1ce820, 0x3c445: 0x6d4aa220, 0x3c446: 0x6d4aa420, 0x3c447: 0x6d4aa620, + 0x3c448: 0x6d4aa820, 0x3c449: 0x6d4aaa20, 0x3c44a: 0x6d4aac20, 0x3c44b: 0x6d4aae20, + 0x3c44c: 0x6d4ab020, 0x3c44d: 0x6d4ab220, 0x3c44e: 0x6d784a20, 0x3c44f: 0x6d784c20, + 0x3c450: 0x6d784e20, 0x3c451: 0x6d785020, 0x3c452: 0x6d785220, 0x3c453: 0x6d785420, + 0x3c454: 0x6d785620, 0x3c455: 0x6da17420, 0x3c456: 0x6da17620, 0x3c457: 0x6da17820, + 0x3c458: 0x6da17a20, 0x3c459: 0x6dc3ce20, 0x3c45a: 0x6dc3d020, 0x3c45b: 0x6dc3d220, + 0x3c45c: 0x6dc3d420, 0x3c45d: 0x6dc3d620, 0x3c45e: 0x6dc3d820, 0x3c45f: 0x6de0f820, + 0x3c460: 0x6de0fa20, 0x3c461: 0x6de0fc20, 0x3c462: 0x6df92220, 0x3c463: 0x6df92420, + 0x3c464: 0x6df92620, 0x3c465: 0x6e1c7020, 0x3c466: 0x6e31be20, 0x3c467: 0x6e31c020, + 0x3c468: 0x6c1a9620, 0x3c469: 0x6c2da820, 0x3c46a: 0x6c47fe20, 0x3c46b: 0x6c697c20, + 0x3c46c: 0x6c904220, 0x3c46d: 0x6c904420, 0x3c46e: 0x6ced4820, 0x3c46f: 0x6d1d1420, + 0x3c470: 0x6d786420, 0x3c471: 0x6c07c020, 0x3c472: 0x6c07c220, 0x3c473: 0x6c0f0420, + 0x3c474: 0x6c0f0620, 0x3c475: 0x6c0f0820, 0x3c476: 0x6c0f0a20, 0x3c477: 0x6c0f0c20, + 0x3c478: 0x6c1b5020, 0x3c479: 0x6c1b5220, 0x3c47a: 0x6c1b5420, 0x3c47b: 0x6c1b5620, + 0x3c47c: 0x6c1b5820, 0x3c47d: 0x6c1b5a20, 0x3c47e: 0x6c1b5c20, 0x3c47f: 0x6c1b5e20, + // Block 0xf12, offset 0x3c480 + 0x3c480: 0x6c1b6020, 0x3c481: 0x6c1b6220, 0x3c482: 0x6c1b6420, 0x3c483: 0x6c2e6e20, + 0x3c484: 0x6c2e7020, 0x3c485: 0x6c2e7220, 0x3c486: 0x6c2e7420, 0x3c487: 0x6c2e7620, + 0x3c488: 0x6c2e7820, 0x3c489: 0x6c2e7a20, 0x3c48a: 0x6c2e7c20, 0x3c48b: 0x6c48d420, + 0x3c48c: 0x6c48d620, 0x3c48d: 0x6c48d820, 0x3c48e: 0x6c48da20, 0x3c48f: 0x6c48dc20, + 0x3c490: 0x6c48de20, 0x3c491: 0x6c48e020, 0x3c492: 0x6c48e220, 0x3c493: 0x6c48e420, + 0x3c494: 0x6c6a4e20, 0x3c495: 0x6c6a5020, 0x3c496: 0x6c6a5220, 0x3c497: 0x6c6a5420, + 0x3c498: 0x6c6a5620, 0x3c499: 0x6c6a5820, 0x3c49a: 0x6c6a5a20, 0x3c49b: 0x6c6a5c20, + 0x3c49c: 0x6c6a5e20, 0x3c49d: 0x6c6a6020, 0x3c49e: 0x6c6a6220, 0x3c49f: 0x6c6a6420, + 0x3c4a0: 0x6c6a6620, 0x3c4a1: 0x6c6a6820, 0x3c4a2: 0x6c6a6a20, 0x3c4a3: 0x6c6a6c20, + 0x3c4a4: 0x6c914220, 0x3c4a5: 0x6c914420, 0x3c4a6: 0x6c914620, 0x3c4a7: 0x6c914820, + 0x3c4a8: 0x6c914a20, 0x3c4a9: 0x6c914c20, 0x3c4aa: 0x6c914e20, 0x3c4ab: 0x6c915020, + 0x3c4ac: 0x6c915220, 0x3c4ad: 0x6c915420, 0x3c4ae: 0x6c915620, 0x3c4af: 0x6c915820, + 0x3c4b0: 0x6c915a20, 0x3c4b1: 0x6c915c20, 0x3c4b2: 0x6cbd6c20, 0x3c4b3: 0x6cbd6e20, + 0x3c4b4: 0x6cbd7020, 0x3c4b5: 0x6cbd7220, 0x3c4b6: 0x6cbd7420, 0x3c4b7: 0x6cbd7620, + 0x3c4b8: 0x6cbd7820, 0x3c4b9: 0x6cbd7a20, 0x3c4ba: 0x6cbd7c20, 0x3c4bb: 0x6cbd7e20, + 0x3c4bc: 0x6cbd8020, 0x3c4bd: 0x6cbd8220, 0x3c4be: 0x6cee2e20, 0x3c4bf: 0x6cee3020, + // Block 0xf13, offset 0x3c4c0 + 0x3c4c0: 0x6cee3220, 0x3c4c1: 0x6cee3420, 0x3c4c2: 0x6cee3620, 0x3c4c3: 0x6cee3820, + 0x3c4c4: 0x6cee3a20, 0x3c4c5: 0x6cee3c20, 0x3c4c6: 0x6cee3e20, 0x3c4c7: 0x6cee4020, + 0x3c4c8: 0x6cee4220, 0x3c4c9: 0x6cee4420, 0x3c4ca: 0x6cee4620, 0x3c4cb: 0x6cee4820, + 0x3c4cc: 0x6cee4a20, 0x3c4cd: 0x6cee4c20, 0x3c4ce: 0x6d1dda20, 0x3c4cf: 0x6d1ddc20, + 0x3c4d0: 0x6d1dde20, 0x3c4d1: 0x6d1de020, 0x3c4d2: 0x6d1de220, 0x3c4d3: 0x6d1de420, + 0x3c4d4: 0x6d1de620, 0x3c4d5: 0x6d1de820, 0x3c4d6: 0x6d1dea20, 0x3c4d7: 0x6d1dec20, + 0x3c4d8: 0x6d1dee20, 0x3c4d9: 0x6d4b9420, 0x3c4da: 0x6d4b9620, 0x3c4db: 0x6d4b9820, + 0x3c4dc: 0x6d4b9a20, 0x3c4dd: 0x6d4b9c20, 0x3c4de: 0x6d4b9e20, 0x3c4df: 0x6d78f020, + 0x3c4e0: 0x6d78f220, 0x3c4e1: 0x6d78f420, 0x3c4e2: 0x6d78f620, 0x3c4e3: 0x6d78f820, + 0x3c4e4: 0x6d78fa20, 0x3c4e5: 0x6d78fc20, 0x3c4e6: 0x6da1f420, 0x3c4e7: 0x6da1f620, + 0x3c4e8: 0x6da1f820, 0x3c4e9: 0x6da1fa20, 0x3c4ea: 0x6da1fc20, 0x3c4eb: 0x6da1fe20, + 0x3c4ec: 0x6dc42820, 0x3c4ed: 0x6dc42a20, 0x3c4ee: 0x6dc42c20, 0x3c4ef: 0x6dc42e20, + 0x3c4f0: 0x6de14220, 0x3c4f1: 0x6df95020, 0x3c4f2: 0x6c6a8020, 0x3c4f3: 0x6cee5a20, + 0x3c4f4: 0x6e1c8e20, 0x3c4f5: 0x6df95420, 0x3c4f6: 0x6cee6820, 0x3c4f7: 0x6c0f2820, + 0x3c4f8: 0x6c2e9820, 0x3c4f9: 0x6c490020, 0x3c4fa: 0x6c6aa820, 0x3c4fb: 0x6c919620, + 0x3c4fc: 0x6cbdb420, 0x3c4fd: 0x6d1e2c20, 0x3c4fe: 0x6d4bb620, 0x3c4ff: 0x6d791a20, + // Block 0xf14, offset 0x3c500 + 0x3c500: 0x6e1c9020, 0x3c501: 0x6c03ee20, 0x3c502: 0x6c07fa20, 0x3c503: 0x6c0f5420, + 0x3c504: 0x6c1bbe20, 0x3c505: 0x6c1bc020, 0x3c506: 0x6c1bc220, 0x3c507: 0x6c2ee620, + 0x3c508: 0x6c2ee820, 0x3c509: 0x6c2eea20, 0x3c50a: 0x6c2eec20, 0x3c50b: 0x6c2eee20, + 0x3c50c: 0x6c2ef020, 0x3c50d: 0x6c493620, 0x3c50e: 0x6c493820, 0x3c50f: 0x6c493a20, + 0x3c510: 0x6c6ae220, 0x3c511: 0x6c6ae420, 0x3c512: 0x6c6ae620, 0x3c513: 0x6c91cc20, + 0x3c514: 0x6c91ce20, 0x3c515: 0x6c91d020, 0x3c516: 0x6cbdec20, 0x3c517: 0x6cbdee20, + 0x3c518: 0x6cbdf020, 0x3c519: 0x6ceea020, 0x3c51a: 0x6ceea220, 0x3c51b: 0x6ceea420, + 0x3c51c: 0x6d1e4c20, 0x3c51d: 0x6d1e4e20, 0x3c51e: 0x6d1e5020, 0x3c51f: 0x6d4bd820, + 0x3c520: 0x6d4bda20, 0x3c521: 0x6d4bdc20, 0x3c522: 0x6dc45220, 0x3c523: 0x6df95a20, + 0x3c524: 0x6c0fa220, 0x3c525: 0x6c0fa420, 0x3c526: 0x6c1c5220, 0x3c527: 0x6c1c5420, + 0x3c528: 0x6c1c5620, 0x3c529: 0x6c1c5820, 0x3c52a: 0x6c1c5a20, 0x3c52b: 0x6c1c5c20, + 0x3c52c: 0x6c1c5e20, 0x3c52d: 0x6c2fc020, 0x3c52e: 0x6c2fc220, 0x3c52f: 0x6c2fc420, + 0x3c530: 0x6c2fc620, 0x3c531: 0x6c4a0c20, 0x3c532: 0x6c4a0e20, 0x3c533: 0x6c4a1020, + 0x3c534: 0x6c4a1220, 0x3c535: 0x6c4a1420, 0x3c536: 0x6c6bcc20, 0x3c537: 0x6c6bce20, + 0x3c538: 0x6c6bd020, 0x3c539: 0x6c6bd220, 0x3c53a: 0x6c6bd420, 0x3c53b: 0x6c92ec20, + 0x3c53c: 0x6c92ee20, 0x3c53d: 0x6c92f020, 0x3c53e: 0x6c92f220, 0x3c53f: 0x6c92f420, + // Block 0xf15, offset 0x3c540 + 0x3c540: 0x6c92f620, 0x3c541: 0x6c92f820, 0x3c542: 0x6c92fa20, 0x3c543: 0x6c92fc20, + 0x3c544: 0x6c92fe20, 0x3c545: 0x6c930020, 0x3c546: 0x6cbf2a20, 0x3c547: 0x6cbf2c20, + 0x3c548: 0x6cbf2e20, 0x3c549: 0x6cbf3020, 0x3c54a: 0x6cbf3220, 0x3c54b: 0x6cbf3420, + 0x3c54c: 0x6cbf3620, 0x3c54d: 0x6cbf3820, 0x3c54e: 0x6cbf3a20, 0x3c54f: 0x6cbf3c20, + 0x3c550: 0x6cbf3e20, 0x3c551: 0x6cef6c20, 0x3c552: 0x6cef6e20, 0x3c553: 0x6cef7020, + 0x3c554: 0x6cef7220, 0x3c555: 0x6cef7420, 0x3c556: 0x6cef7620, 0x3c557: 0x6d1f1420, + 0x3c558: 0x6d1f1620, 0x3c559: 0x6d1f1820, 0x3c55a: 0x6d1f1a20, 0x3c55b: 0x6d1f1c20, + 0x3c55c: 0x6d1f1e20, 0x3c55d: 0x6d1f2020, 0x3c55e: 0x6d1f2220, 0x3c55f: 0x6d1f2420, + 0x3c560: 0x6d4ca820, 0x3c561: 0x6d4caa20, 0x3c562: 0x6d4cac20, 0x3c563: 0x6d4cae20, + 0x3c564: 0x6d4cb020, 0x3c565: 0x6d4cb220, 0x3c566: 0x6d79d420, 0x3c567: 0x6d79d620, + 0x3c568: 0x6d79d820, 0x3c569: 0x6d79da20, 0x3c56a: 0x6d79dc20, 0x3c56b: 0x6da29420, + 0x3c56c: 0x6dc48620, 0x3c56d: 0x6dc48820, 0x3c56e: 0x6dc48a20, 0x3c56f: 0x6dc48c20, + 0x3c570: 0x6de18c20, 0x3c571: 0x6de18e20, 0x3c572: 0x6df98420, 0x3c573: 0x6e0d4020, + 0x3c574: 0x6e0d4220, 0x3c575: 0x6e28ae20, 0x3c576: 0x6c1c7e20, 0x3c577: 0x6c1c8020, + 0x3c578: 0x6c1c8220, 0x3c579: 0x6c1c8420, 0x3c57a: 0x6c2ff820, 0x3c57b: 0x6c4a3e20, + 0x3c57c: 0x6c931c20, 0x3c57d: 0x6c931e20, 0x3c57e: 0x6c932020, 0x3c57f: 0x6cbf6020, + // Block 0xf16, offset 0x3c580 + 0x3c580: 0x6d1f3a20, 0x3c581: 0x6d79fc20, 0x3c582: 0x6da29c20, 0x3c583: 0x6da29e20, + 0x3c584: 0x6e0d4420, 0x3c585: 0x6c1cb620, 0x3c586: 0x6c1cb820, 0x3c587: 0x6c1cba20, + 0x3c588: 0x6c304020, 0x3c589: 0x6c304220, 0x3c58a: 0x6c4a8820, 0x3c58b: 0x6c4a8a20, + 0x3c58c: 0x6c4a8c20, 0x3c58d: 0x6c6c6a20, 0x3c58e: 0x6c6c6c20, 0x3c58f: 0x6c6c6e20, + 0x3c590: 0x6c6c7020, 0x3c591: 0x6c937c20, 0x3c592: 0x6c937e20, 0x3c593: 0x6c938020, + 0x3c594: 0x6cbfc620, 0x3c595: 0x6cbfc820, 0x3c596: 0x6cbfca20, 0x3c597: 0x6cbfcc20, + 0x3c598: 0x6cbfce20, 0x3c599: 0x6cbfd020, 0x3c59a: 0x6cbfd220, 0x3c59b: 0x6cefec20, + 0x3c59c: 0x6cefee20, 0x3c59d: 0x6ceff020, 0x3c59e: 0x6ceff220, 0x3c59f: 0x6ceff420, + 0x3c5a0: 0x6ceff620, 0x3c5a1: 0x6d1fa020, 0x3c5a2: 0x6d1fa220, 0x3c5a3: 0x6d1fa420, + 0x3c5a4: 0x6d1fa620, 0x3c5a5: 0x6d1fa820, 0x3c5a6: 0x6d4d1620, 0x3c5a7: 0x6d4d1820, + 0x3c5a8: 0x6d4d1a20, 0x3c5a9: 0x6d4d1c20, 0x3c5aa: 0x6d4d1e20, 0x3c5ab: 0x6d7a2820, + 0x3c5ac: 0x6d7a2a20, 0x3c5ad: 0x6d7a2c20, 0x3c5ae: 0x6d7a2e20, 0x3c5af: 0x6da2be20, + 0x3c5b0: 0x6dc4b220, 0x3c5b1: 0x6dc4b420, 0x3c5b2: 0x6dc4b620, 0x3c5b3: 0x6df9a220, + 0x3c5b4: 0x6df9a420, 0x3c5b5: 0x6e0d5a20, 0x3c5b6: 0x6e31ee20, 0x3c5b7: 0x6c0fea20, + 0x3c5b8: 0x6c939220, 0x3c5b9: 0x6c939420, 0x3c5ba: 0x6cbfe820, 0x3c5bb: 0x6d4d3420, + 0x3c5bc: 0x6d4d3620, 0x3c5bd: 0x6d7a3620, 0x3c5be: 0x6da2c620, 0x3c5bf: 0x6c1cd420, + // Block 0xf17, offset 0x3c5c0 + 0x3c5c0: 0x6c306820, 0x3c5c1: 0x6c6c9020, 0x3c5c2: 0x6c6c9220, 0x3c5c3: 0x6d1fce20, + 0x3c5c4: 0x6d4d4e20, 0x3c5c5: 0x6d7a4020, 0x3c5c6: 0x6da2d020, 0x3c5c7: 0x6cc01e20, + 0x3c5c8: 0x6cf02c20, 0x3c5c9: 0x6c1d1820, 0x3c5ca: 0x6c1d1a20, 0x3c5cb: 0x6c1d1c20, + 0x3c5cc: 0x6c30b020, 0x3c5cd: 0x6c4b0e20, 0x3c5ce: 0x6c4b1020, 0x3c5cf: 0x6c6cf020, + 0x3c5d0: 0x6c6cf220, 0x3c5d1: 0x6c940e20, 0x3c5d2: 0x6cf05e20, 0x3c5d3: 0x6cf06020, + 0x3c5d4: 0x6cf06220, 0x3c5d5: 0x6cc05a20, 0x3c5d6: 0x6cc05c20, 0x3c5d7: 0x6cc05e20, + 0x3c5d8: 0x6cc06020, 0x3c5d9: 0x6d1ffc20, 0x3c5da: 0x6d1ffe20, 0x3c5db: 0x6d4d8820, + 0x3c5dc: 0x6d4d8a20, 0x3c5dd: 0x6d7a5e20, 0x3c5de: 0x6da2e020, 0x3c5df: 0x6de1cc20, + 0x3c5e0: 0x6de1ce20, 0x3c5e1: 0x6e1cd220, 0x3c5e2: 0x6c108820, 0x3c5e3: 0x6c108a20, + 0x3c5e4: 0x6c108c20, 0x3c5e5: 0x6c108e20, 0x3c5e6: 0x6c1dcc20, 0x3c5e7: 0x6c1dce20, + 0x3c5e8: 0x6c1dd020, 0x3c5e9: 0x6c316e20, 0x3c5ea: 0x6c317020, 0x3c5eb: 0x6c317220, + 0x3c5ec: 0x6c317420, 0x3c5ed: 0x6c317620, 0x3c5ee: 0x6c317820, 0x3c5ef: 0x6c4bbe20, + 0x3c5f0: 0x6c4bc020, 0x3c5f1: 0x6c4bc220, 0x3c5f2: 0x6c4bc420, 0x3c5f3: 0x6c4bc620, + 0x3c5f4: 0x6c4bc820, 0x3c5f5: 0x6c6dd420, 0x3c5f6: 0x6c6dd620, 0x3c5f7: 0x6c6dd820, + 0x3c5f8: 0x6c6dda20, 0x3c5f9: 0x6c6ddc20, 0x3c5fa: 0x6c6dde20, 0x3c5fb: 0x6c953c20, + 0x3c5fc: 0x6c953e20, 0x3c5fd: 0x6c954020, 0x3c5fe: 0x6c954220, 0x3c5ff: 0x6c954420, + // Block 0xf18, offset 0x3c600 + 0x3c600: 0x6c954620, 0x3c601: 0x6c954820, 0x3c602: 0x6cc15e20, 0x3c603: 0x6cc16020, + 0x3c604: 0x6cc16220, 0x3c605: 0x6cc16420, 0x3c606: 0x6cc16620, 0x3c607: 0x6cc16820, + 0x3c608: 0x6cf10820, 0x3c609: 0x6cf10a20, 0x3c60a: 0x6cf10c20, 0x3c60b: 0x6cf10e20, + 0x3c60c: 0x6d20ac20, 0x3c60d: 0x6d20ae20, 0x3c60e: 0x6d20b020, 0x3c60f: 0x6d20b220, + 0x3c610: 0x6d20b420, 0x3c611: 0x6d20b620, 0x3c612: 0x6d20b820, 0x3c613: 0x6d4e4020, + 0x3c614: 0x6d4e4220, 0x3c615: 0x6d4e4420, 0x3c616: 0x6d4e4620, 0x3c617: 0x6d7acc20, + 0x3c618: 0x6d7ace20, 0x3c619: 0x6d7ad020, 0x3c61a: 0x6d7ad220, 0x3c61b: 0x6da34c20, + 0x3c61c: 0x6da34e20, 0x3c61d: 0x6da35020, 0x3c61e: 0x6de20a20, 0x3c61f: 0x6e0d9020, + 0x3c620: 0x6e1cfc20, 0x3c621: 0x6c1ddc20, 0x3c622: 0x6c4bd820, 0x3c623: 0x6c10aa20, + 0x3c624: 0x6c955620, 0x3c625: 0x6cc17620, 0x3c626: 0x6cf11620, 0x3c627: 0x6d20bc20, + 0x3c628: 0x6da35820, 0x3c629: 0x6dc50c20, 0x3c62a: 0x6e1d0220, 0x3c62b: 0x6c319020, + 0x3c62c: 0x6c1de820, 0x3c62d: 0x6cc18420, 0x3c62e: 0x6cc18620, 0x3c62f: 0x6d20be20, + 0x3c630: 0x6d7ae420, 0x3c631: 0x6d7ae620, 0x3c632: 0x6c08b820, 0x3c633: 0x6c6e4c20, + 0x3c634: 0x6c95c220, 0x3c635: 0x6c95c420, 0x3c636: 0x6c95c620, 0x3c637: 0x6c95c820, + 0x3c638: 0x6cc1ec20, 0x3c639: 0x6cc1ee20, 0x3c63a: 0x6cc1f020, 0x3c63b: 0x6d210420, + 0x3c63c: 0x6d4ea620, 0x3c63d: 0x6d7b1820, 0x3c63e: 0x6da37a20, 0x3c63f: 0x6de22a20, + // Block 0xf19, offset 0x3c640 + 0x3c640: 0x6df9e820, 0x3c641: 0x6c1e3820, 0x3c642: 0x6c95ce20, 0x3c643: 0x6c95d020, + 0x3c644: 0x6cc1fa20, 0x3c645: 0x6cf16220, 0x3c646: 0x6cf16420, 0x3c647: 0x6d4eac20, + 0x3c648: 0x6dc51e20, 0x3c649: 0x6de22e20, 0x3c64a: 0x6c10e220, 0x3c64b: 0x6c4c6420, + 0x3c64c: 0x6c1e8020, 0x3c64d: 0x6c1e8220, 0x3c64e: 0x6c323e20, 0x3c64f: 0x6c324020, + 0x3c650: 0x6c4ca820, 0x3c651: 0x6c4caa20, 0x3c652: 0x6c6eae20, 0x3c653: 0x6c6eb020, + 0x3c654: 0x6c6eb220, 0x3c655: 0x6c6eb420, 0x3c656: 0x6c6eb620, 0x3c657: 0x6c6eb820, + 0x3c658: 0x6c964820, 0x3c659: 0x6c964a20, 0x3c65a: 0x6cc26020, 0x3c65b: 0x6cc26220, + 0x3c65c: 0x6cf1a820, 0x3c65d: 0x6cf1aa20, 0x3c65e: 0x6d216620, 0x3c65f: 0x6d216820, + 0x3c660: 0x6d216a20, 0x3c661: 0x6d4efa20, 0x3c662: 0x6d4efc20, 0x3c663: 0x6d4efe20, + 0x3c664: 0x6d7b5820, 0x3c665: 0x6d7b5a20, 0x3c666: 0x6da39a20, 0x3c667: 0x6da39c20, + 0x3c668: 0x6da39e20, 0x3c669: 0x6dc53c20, 0x3c66a: 0x6de25420, 0x3c66b: 0x6e0da820, + 0x3c66c: 0x6c08d820, 0x3c66d: 0x6c1e8c20, 0x3c66e: 0x6c1e8e20, 0x3c66f: 0x6c4cc020, + 0x3c670: 0x6c6ec020, 0x3c671: 0x6c965820, 0x3c672: 0x6d217220, 0x3c673: 0x6c1ea420, + 0x3c674: 0x6c325a20, 0x3c675: 0x6c6ed220, 0x3c676: 0x6cc27820, 0x3c677: 0x6cf1b620, + 0x3c678: 0x6da3a620, 0x3c679: 0x6e1d2020, 0x3c67a: 0x6c114820, 0x3c67b: 0x6c329820, + 0x3c67c: 0x6c4d2620, 0x3c67d: 0x6c4d2820, 0x3c67e: 0x6c6ef820, 0x3c67f: 0x6c969e20, + // Block 0xf1a, offset 0x3c680 + 0x3c680: 0x6cc2a220, 0x3c681: 0x6cc2a420, 0x3c682: 0x6d21a420, 0x3c683: 0x6da3b820, + 0x3c684: 0x6e0db620, 0x3c685: 0x6e388420, 0x3c686: 0x6c115420, 0x3c687: 0x6dc55a20, + 0x3c688: 0x6c6f1020, 0x3c689: 0x6d4f3420, 0x3c68a: 0x6da3be20, 0x3c68b: 0x6c1f1a20, + 0x3c68c: 0x6c32de20, 0x3c68d: 0x6c6f5220, 0x3c68e: 0x6c6f5420, 0x3c68f: 0x6c972a20, + 0x3c690: 0x6c972c20, 0x3c691: 0x6cc2fe20, 0x3c692: 0x6cc30020, 0x3c693: 0x6cc30220, + 0x3c694: 0x6cf23e20, 0x3c695: 0x6cf24020, 0x3c696: 0x6d21fc20, 0x3c697: 0x6d21fe20, + 0x3c698: 0x6d220020, 0x3c699: 0x6d7bb020, 0x3c69a: 0x6da3d220, 0x3c69b: 0x6dc57020, + 0x3c69c: 0x6dc57220, 0x3c69d: 0x6c091e20, 0x3c69e: 0x6c11b820, 0x3c69f: 0x6c1fec20, + 0x3c6a0: 0x6c1fee20, 0x3c6a1: 0x6c1ff020, 0x3c6a2: 0x6c1ff220, 0x3c6a3: 0x6c1ff420, + 0x3c6a4: 0x6c1ff620, 0x3c6a5: 0x6c1ff820, 0x3c6a6: 0x6c33ce20, 0x3c6a7: 0x6c33d020, + 0x3c6a8: 0x6c33d220, 0x3c6a9: 0x6c33d420, 0x3c6aa: 0x6c33d620, 0x3c6ab: 0x6c33d820, + 0x3c6ac: 0x6c33da20, 0x3c6ad: 0x6c4e8e20, 0x3c6ae: 0x6c4e9020, 0x3c6af: 0x6c4e9220, + 0x3c6b0: 0x6c4e9420, 0x3c6b1: 0x6c4e9620, 0x3c6b2: 0x6c4e9820, 0x3c6b3: 0x6c4e9a20, + 0x3c6b4: 0x6c4e9c20, 0x3c6b5: 0x6c708220, 0x3c6b6: 0x6c708420, 0x3c6b7: 0x6c708620, + 0x3c6b8: 0x6c708820, 0x3c6b9: 0x6c708a20, 0x3c6ba: 0x6c708c20, 0x3c6bb: 0x6c708e20, + 0x3c6bc: 0x6c709020, 0x3c6bd: 0x6c709220, 0x3c6be: 0x6c709420, 0x3c6bf: 0x6c98a620, + // Block 0xf1b, offset 0x3c6c0 + 0x3c6c0: 0x6c98a820, 0x3c6c1: 0x6c98aa20, 0x3c6c2: 0x6c98ac20, 0x3c6c3: 0x6c98ae20, + 0x3c6c4: 0x6c98b020, 0x3c6c5: 0x6c98b220, 0x3c6c6: 0x6c98b420, 0x3c6c7: 0x6cc47620, + 0x3c6c8: 0x6cc47820, 0x3c6c9: 0x6cc47a20, 0x3c6ca: 0x6cc47c20, 0x3c6cb: 0x6cc47e20, + 0x3c6cc: 0x6cc48020, 0x3c6cd: 0x6cc48220, 0x3c6ce: 0x6cc48420, 0x3c6cf: 0x6cc48620, + 0x3c6d0: 0x6cc48820, 0x3c6d1: 0x6cc48a20, 0x3c6d2: 0x6cc48c20, 0x3c6d3: 0x6cf35c20, + 0x3c6d4: 0x6cf35e20, 0x3c6d5: 0x6cf36020, 0x3c6d6: 0x6cf36220, 0x3c6d7: 0x6cf36420, + 0x3c6d8: 0x6cf36620, 0x3c6d9: 0x6cf36820, 0x3c6da: 0x6cf36a20, 0x3c6db: 0x6cf36c20, + 0x3c6dc: 0x6cf36e20, 0x3c6dd: 0x6cf37020, 0x3c6de: 0x6cf37220, 0x3c6df: 0x6d232020, + 0x3c6e0: 0x6d232220, 0x3c6e1: 0x6d232420, 0x3c6e2: 0x6d232620, 0x3c6e3: 0x6d232820, + 0x3c6e4: 0x6d232a20, 0x3c6e5: 0x6d232c20, 0x3c6e6: 0x6d232e20, 0x3c6e7: 0x6d233020, + 0x3c6e8: 0x6d50b220, 0x3c6e9: 0x6d50b420, 0x3c6ea: 0x6d50b620, 0x3c6eb: 0x6d50b820, + 0x3c6ec: 0x6d50ba20, 0x3c6ed: 0x6d50bc20, 0x3c6ee: 0x6d7c7c20, 0x3c6ef: 0x6d7c7e20, + 0x3c6f0: 0x6d7c8020, 0x3c6f1: 0x6d7c8220, 0x3c6f2: 0x6d7c8420, 0x3c6f3: 0x6d7c8620, + 0x3c6f4: 0x6d7c8820, 0x3c6f5: 0x6d7c8a20, 0x3c6f6: 0x6d7c8c20, 0x3c6f7: 0x6da46220, + 0x3c6f8: 0x6da46420, 0x3c6f9: 0x6da46620, 0x3c6fa: 0x6dc5f620, 0x3c6fb: 0x6dc5f820, + 0x3c6fc: 0x6dc5fa20, 0x3c6fd: 0x6dc5fc20, 0x3c6fe: 0x6dc5fe20, 0x3c6ff: 0x6de2da20, + // Block 0xf1c, offset 0x3c700 + 0x3c700: 0x6de2dc20, 0x3c701: 0x6dfa5220, 0x3c702: 0x6dfa5420, 0x3c703: 0x6e0de220, + 0x3c704: 0x6e0de420, 0x3c705: 0x6e1d4e20, 0x3c706: 0x6e1d5020, 0x3c707: 0x6e28f020, + 0x3c708: 0x6e388e20, 0x3c709: 0x6c092a20, 0x3c70a: 0x6c11cc20, 0x3c70b: 0x6c4ec420, + 0x3c70c: 0x6c4ec620, 0x3c70d: 0x6c70ae20, 0x3c70e: 0x6c70b020, 0x3c70f: 0x6c98d220, + 0x3c710: 0x6c98d420, 0x3c711: 0x6cc4ac20, 0x3c712: 0x6cf3a020, 0x3c713: 0x6d236020, + 0x3c714: 0x6d7caa20, 0x3c715: 0x6d7cac20, 0x3c716: 0x6d7cae20, 0x3c717: 0x6e3d2c20, + 0x3c718: 0x6c4ef020, 0x3c719: 0x6c98e020, 0x3c71a: 0x6d50fa20, 0x3c71b: 0x6e1d5420, + 0x3c71c: 0x6c123220, 0x3c71d: 0x6c210a20, 0x3c71e: 0x6c210c20, 0x3c71f: 0x6c210e20, + 0x3c720: 0x6c211020, 0x3c721: 0x6c211220, 0x3c722: 0x6c211420, 0x3c723: 0x6c211620, + 0x3c724: 0x6c351e20, 0x3c725: 0x6c352020, 0x3c726: 0x6c352220, 0x3c727: 0x6c352420, + 0x3c728: 0x6c352620, 0x3c729: 0x6c352820, 0x3c72a: 0x6c352a20, 0x3c72b: 0x6c501620, + 0x3c72c: 0x6c501820, 0x3c72d: 0x6c501a20, 0x3c72e: 0x6c501c20, 0x3c72f: 0x6c501e20, + 0x3c730: 0x6c502020, 0x3c731: 0x6c502220, 0x3c732: 0x6c502420, 0x3c733: 0x6c502620, + 0x3c734: 0x6c720620, 0x3c735: 0x6c720820, 0x3c736: 0x6c720a20, 0x3c737: 0x6c720c20, + 0x3c738: 0x6c720e20, 0x3c739: 0x6c721020, 0x3c73a: 0x6c721220, 0x3c73b: 0x6c721420, + 0x3c73c: 0x6c721620, 0x3c73d: 0x6c721820, 0x3c73e: 0x6c721a20, 0x3c73f: 0x6c721c20, + // Block 0xf1d, offset 0x3c740 + 0x3c740: 0x6c721e20, 0x3c741: 0x6c9a7c20, 0x3c742: 0x6c9a7e20, 0x3c743: 0x6c9a8020, + 0x3c744: 0x6c9a8220, 0x3c745: 0x6c9a8420, 0x3c746: 0x6c9a8620, 0x3c747: 0x6c9a8820, + 0x3c748: 0x6c9a8a20, 0x3c749: 0x6c9a8c20, 0x3c74a: 0x6c9a8e20, 0x3c74b: 0x6c9a9020, + 0x3c74c: 0x6cc65420, 0x3c74d: 0x6cc65620, 0x3c74e: 0x6cc65820, 0x3c74f: 0x6cc65a20, + 0x3c750: 0x6cc65c20, 0x3c751: 0x6cc65e20, 0x3c752: 0x6cc66020, 0x3c753: 0x6cc66220, + 0x3c754: 0x6cc66420, 0x3c755: 0x6cc66620, 0x3c756: 0x6cc66820, 0x3c757: 0x6cf50220, + 0x3c758: 0x6cf50420, 0x3c759: 0x6cf50620, 0x3c75a: 0x6cf50820, 0x3c75b: 0x6cf50a20, + 0x3c75c: 0x6cf50c20, 0x3c75d: 0x6cf50e20, 0x3c75e: 0x6cf51020, 0x3c75f: 0x6cf51220, + 0x3c760: 0x6cf51420, 0x3c761: 0x6cf51620, 0x3c762: 0x6cf51820, 0x3c763: 0x6d24d420, + 0x3c764: 0x6d24d620, 0x3c765: 0x6d24d820, 0x3c766: 0x6d24da20, 0x3c767: 0x6d24dc20, + 0x3c768: 0x6d24de20, 0x3c769: 0x6d24e020, 0x3c76a: 0x6d24e220, 0x3c76b: 0x6d525620, + 0x3c76c: 0x6d525820, 0x3c76d: 0x6d525a20, 0x3c76e: 0x6d525c20, 0x3c76f: 0x6d525e20, + 0x3c770: 0x6d526020, 0x3c771: 0x6d526220, 0x3c772: 0x6d526420, 0x3c773: 0x6d526620, + 0x3c774: 0x6d526820, 0x3c775: 0x6d7d9820, 0x3c776: 0x6d7d9a20, 0x3c777: 0x6d7d9c20, + 0x3c778: 0x6da50420, 0x3c779: 0x6da50620, 0x3c77a: 0x6da50820, 0x3c77b: 0x6dc6a820, + 0x3c77c: 0x6dc6aa20, 0x3c77d: 0x6dc6ac20, 0x3c77e: 0x6dc6ae20, 0x3c77f: 0x6dc6b020, + // Block 0xf1e, offset 0x3c780 + 0x3c780: 0x6dc6b220, 0x3c781: 0x6de35820, 0x3c782: 0x6dfaae20, 0x3c783: 0x6e1d8e20, + 0x3c784: 0x6e291820, 0x3c785: 0x6c9a9e20, 0x3c786: 0x6c353e20, 0x3c787: 0x6d527020, + 0x3c788: 0x6c357420, 0x3c789: 0x6c506c20, 0x3c78a: 0x6c506e20, 0x3c78b: 0x6c728820, + 0x3c78c: 0x6c728a20, 0x3c78d: 0x6c9b1020, 0x3c78e: 0x6cc6fe20, 0x3c78f: 0x6cc70020, + 0x3c790: 0x6cf58a20, 0x3c791: 0x6d253e20, 0x3c792: 0x6d254020, 0x3c793: 0x6d52b620, + 0x3c794: 0x6d52b820, 0x3c795: 0x6d52ba20, 0x3c796: 0x6d52bc20, 0x3c797: 0x6d7dfe20, + 0x3c798: 0x6d7e0020, 0x3c799: 0x6d7e0220, 0x3c79a: 0x6da53c20, 0x3c79b: 0x6dc6d420, + 0x3c79c: 0x6dc6d620, 0x3c79d: 0x6e0e3820, 0x3c79e: 0x6e0e3a20, 0x3c79f: 0x6e324620, + 0x3c7a0: 0x6c214020, 0x3c7a1: 0x6c357e20, 0x3c7a2: 0x6c358020, 0x3c7a3: 0x6c507820, + 0x3c7a4: 0x6c729820, 0x3c7a5: 0x6cc70e20, 0x3c7a6: 0x6cc71020, 0x3c7a7: 0x6cc71220, + 0x3c7a8: 0x6d254220, 0x3c7a9: 0x6d254420, 0x3c7aa: 0x6d254620, 0x3c7ab: 0x6c508020, + 0x3c7ac: 0x6c72a820, 0x3c7ad: 0x6d255420, 0x3c7ae: 0x6d52d420, 0x3c7af: 0x6da54a20, + 0x3c7b0: 0x6e0e4220, 0x3c7b1: 0x6c359c20, 0x3c7b2: 0x6c35ac20, 0x3c7b3: 0x6c35ae20, + 0x3c7b4: 0x6c50aa20, 0x3c7b5: 0x6c72e420, 0x3c7b6: 0x6c72e620, 0x3c7b7: 0x6c72e820, + 0x3c7b8: 0x6c9b6a20, 0x3c7b9: 0x6cc76220, 0x3c7ba: 0x6cc76420, 0x3c7bb: 0x6cc76620, + 0x3c7bc: 0x6cc76820, 0x3c7bd: 0x6cf5ca20, 0x3c7be: 0x6d257420, 0x3c7bf: 0x6d52ee20, + // Block 0xf1f, offset 0x3c7c0 + 0x3c7c0: 0x6d52f020, 0x3c7c1: 0x6d7e2c20, 0x3c7c2: 0x6d7e2e20, 0x3c7c3: 0x6de38020, + 0x3c7c4: 0x6de38220, 0x3c7c5: 0x6dfadc20, 0x3c7c6: 0x6c219820, 0x3c7c7: 0x6c219a20, + 0x3c7c8: 0x6c363220, 0x3c7c9: 0x6c363420, 0x3c7ca: 0x6c363620, 0x3c7cb: 0x6c363820, + 0x3c7cc: 0x6c363a20, 0x3c7cd: 0x6c363c20, 0x3c7ce: 0x6c363e20, 0x3c7cf: 0x6c514420, + 0x3c7d0: 0x6c514620, 0x3c7d1: 0x6c514820, 0x3c7d2: 0x6c514a20, 0x3c7d3: 0x6c514c20, + 0x3c7d4: 0x6c514e20, 0x3c7d5: 0x6c515020, 0x3c7d6: 0x6c515220, 0x3c7d7: 0x6c515420, + 0x3c7d8: 0x6c515620, 0x3c7d9: 0x6c737220, 0x3c7da: 0x6c737420, 0x3c7db: 0x6c737620, + 0x3c7dc: 0x6c737820, 0x3c7dd: 0x6c737a20, 0x3c7de: 0x6c737c20, 0x3c7df: 0x6c737e20, + 0x3c7e0: 0x6c738020, 0x3c7e1: 0x6c738220, 0x3c7e2: 0x6c738420, 0x3c7e3: 0x6c738620, + 0x3c7e4: 0x6c738820, 0x3c7e5: 0x6c9c0220, 0x3c7e6: 0x6c9c0420, 0x3c7e7: 0x6c9c0620, + 0x3c7e8: 0x6c9c0820, 0x3c7e9: 0x6cc83e20, 0x3c7ea: 0x6cc84020, 0x3c7eb: 0x6cc84220, + 0x3c7ec: 0x6cc84420, 0x3c7ed: 0x6cc84620, 0x3c7ee: 0x6cc84820, 0x3c7ef: 0x6cf67620, + 0x3c7f0: 0x6cf67820, 0x3c7f1: 0x6cf67a20, 0x3c7f2: 0x6cf67c20, 0x3c7f3: 0x6cf67e20, + 0x3c7f4: 0x6cf68020, 0x3c7f5: 0x6cf68220, 0x3c7f6: 0x6cf68420, 0x3c7f7: 0x6cf68620, + 0x3c7f8: 0x6d25ec20, 0x3c7f9: 0x6d25ee20, 0x3c7fa: 0x6d25f020, 0x3c7fb: 0x6d25f220, + 0x3c7fc: 0x6d25f420, 0x3c7fd: 0x6d25f620, 0x3c7fe: 0x6d536220, 0x3c7ff: 0x6d536420, + // Block 0xf20, offset 0x3c800 + 0x3c800: 0x6d536620, 0x3c801: 0x6d536820, 0x3c802: 0x6d536a20, 0x3c803: 0x6d536c20, + 0x3c804: 0x6d536e20, 0x3c805: 0x6d537020, 0x3c806: 0x6da5a420, 0x3c807: 0x6d7ec620, + 0x3c808: 0x6d7ec820, 0x3c809: 0x6d7eca20, 0x3c80a: 0x6d7ecc20, 0x3c80b: 0x6d7ece20, + 0x3c80c: 0x6d7ed020, 0x3c80d: 0x6da5a620, 0x3c80e: 0x6dc73820, 0x3c80f: 0x6dc73a20, + 0x3c810: 0x6dc73c20, 0x3c811: 0x6e0e5220, 0x3c812: 0x6e0e5420, 0x3c813: 0x6e0e5620, + 0x3c814: 0x6e325620, 0x3c815: 0x6d537e20, 0x3c816: 0x6d7ee020, 0x3c817: 0x6d7ee220, + 0x3c818: 0x6de3b220, 0x3c819: 0x6c127820, 0x3c81a: 0x6c21ae20, 0x3c81b: 0x6c365620, + 0x3c81c: 0x6c518220, 0x3c81d: 0x6c518420, 0x3c81e: 0x6c73ba20, 0x3c81f: 0x6d261220, + 0x3c820: 0x6c9c3020, 0x3c821: 0x6c9c3220, 0x3c822: 0x6c9c3420, 0x3c823: 0x6cc87e20, + 0x3c824: 0x6cf6aa20, 0x3c825: 0x6cf6ac20, 0x3c826: 0x6cf6ae20, 0x3c827: 0x6cf6b020, + 0x3c828: 0x6d261420, 0x3c829: 0x6d261620, 0x3c82a: 0x6d261820, 0x3c82b: 0x6d539820, + 0x3c82c: 0x6d539a20, 0x3c82d: 0x6d7efc20, 0x3c82e: 0x6e0e5a20, 0x3c82f: 0x6e0e5c20, + 0x3c830: 0x6e325c20, 0x3c831: 0x6c222e20, 0x3c832: 0x6c223020, 0x3c833: 0x6c223220, + 0x3c834: 0x6c223420, 0x3c835: 0x6c223620, 0x3c836: 0x6c375a20, 0x3c837: 0x6c375c20, + 0x3c838: 0x6c375e20, 0x3c839: 0x6c376020, 0x3c83a: 0x6c52ae20, 0x3c83b: 0x6c52b020, + 0x3c83c: 0x6c52b220, 0x3c83d: 0x6c52b420, 0x3c83e: 0x6c52b620, 0x3c83f: 0x6c52b820, + // Block 0xf21, offset 0x3c840 + 0x3c840: 0x6c52ba20, 0x3c841: 0x6c52bc20, 0x3c842: 0x6c52be20, 0x3c843: 0x6c752a20, + 0x3c844: 0x6c752c20, 0x3c845: 0x6c752e20, 0x3c846: 0x6c753020, 0x3c847: 0x6c753220, + 0x3c848: 0x6c753420, 0x3c849: 0x6c753620, 0x3c84a: 0x6c753820, 0x3c84b: 0x6c753a20, + 0x3c84c: 0x6c753c20, 0x3c84d: 0x6c753e20, 0x3c84e: 0x6c754020, 0x3c84f: 0x6c754220, + 0x3c850: 0x6c9d8620, 0x3c851: 0x6c9d8820, 0x3c852: 0x6c9d8a20, 0x3c853: 0x6c9d8c20, + 0x3c854: 0x6c9d8e20, 0x3c855: 0x6c9d9020, 0x3c856: 0x6c9d9220, 0x3c857: 0x6c9d9420, + 0x3c858: 0x6c9d9620, 0x3c859: 0x6c9d9820, 0x3c85a: 0x6c9d9a20, 0x3c85b: 0x6c9d9c20, + 0x3c85c: 0x6c9d9e20, 0x3c85d: 0x6c9da020, 0x3c85e: 0x6c9da220, 0x3c85f: 0x6cca6620, + 0x3c860: 0x6cca6820, 0x3c861: 0x6cca6a20, 0x3c862: 0x6cca6c20, 0x3c863: 0x6cca6e20, + 0x3c864: 0x6cca7020, 0x3c865: 0x6cca7220, 0x3c866: 0x6cca7420, 0x3c867: 0x6cca7620, + 0x3c868: 0x6cca7820, 0x3c869: 0x6cca7a20, 0x3c86a: 0x6cca7c20, 0x3c86b: 0x6cca7e20, + 0x3c86c: 0x6cca8020, 0x3c86d: 0x6cca8220, 0x3c86e: 0x6cca8420, 0x3c86f: 0x6cca8620, + 0x3c870: 0x6cf88c20, 0x3c871: 0x6cf88e20, 0x3c872: 0x6cf89020, 0x3c873: 0x6cf89220, + 0x3c874: 0x6cf89420, 0x3c875: 0x6cf89620, 0x3c876: 0x6cf89820, 0x3c877: 0x6cf89a20, + 0x3c878: 0x6cf89c20, 0x3c879: 0x6cf89e20, 0x3c87a: 0x6cf8a020, 0x3c87b: 0x6cf8a220, + 0x3c87c: 0x6cf8a420, 0x3c87d: 0x6cf8a620, 0x3c87e: 0x6cf8a820, 0x3c87f: 0x6cf8aa20, + // Block 0xf22, offset 0x3c880 + 0x3c880: 0x6cf8ac20, 0x3c881: 0x6cf8ae20, 0x3c882: 0x6cf8b020, 0x3c883: 0x6cf8b220, + 0x3c884: 0x6cf8b420, 0x3c885: 0x6cf8b620, 0x3c886: 0x6cf8b820, 0x3c887: 0x6cf8ba20, + 0x3c888: 0x6d27d220, 0x3c889: 0x6d27d420, 0x3c88a: 0x6d27d620, 0x3c88b: 0x6d27d820, + 0x3c88c: 0x6d27da20, 0x3c88d: 0x6d27dc20, 0x3c88e: 0x6d27de20, 0x3c88f: 0x6d27e020, + 0x3c890: 0x6d27e220, 0x3c891: 0x6d27e420, 0x3c892: 0x6d27e620, 0x3c893: 0x6d27e820, + 0x3c894: 0x6d27ea20, 0x3c895: 0x6d27ec20, 0x3c896: 0x6d27ee20, 0x3c897: 0x6d27f020, + 0x3c898: 0x6d27f220, 0x3c899: 0x6d27f420, 0x3c89a: 0x6d27f620, 0x3c89b: 0x6d27f820, + 0x3c89c: 0x6d27fa20, 0x3c89d: 0x6d552c20, 0x3c89e: 0x6d552e20, 0x3c89f: 0x6d553020, + 0x3c8a0: 0x6d553220, 0x3c8a1: 0x6d553420, 0x3c8a2: 0x6d553620, 0x3c8a3: 0x6d553820, + 0x3c8a4: 0x6d553a20, 0x3c8a5: 0x6d553c20, 0x3c8a6: 0x6d553e20, 0x3c8a7: 0x6d554020, + 0x3c8a8: 0x6d554220, 0x3c8a9: 0x6d554420, 0x3c8aa: 0x6d554620, 0x3c8ab: 0x6d554820, + 0x3c8ac: 0x6d554a20, 0x3c8ad: 0x6d80ae20, 0x3c8ae: 0x6d80b020, 0x3c8af: 0x6d80b220, + 0x3c8b0: 0x6d80b420, 0x3c8b1: 0x6d80b620, 0x3c8b2: 0x6d80b820, 0x3c8b3: 0x6d80ba20, + 0x3c8b4: 0x6d80bc20, 0x3c8b5: 0x6d80be20, 0x3c8b6: 0x6d80c020, 0x3c8b7: 0x6d80c220, + 0x3c8b8: 0x6d80c420, 0x3c8b9: 0x6d80c620, 0x3c8ba: 0x6d80c820, 0x3c8bb: 0x6d80ca20, + 0x3c8bc: 0x6d80cc20, 0x3c8bd: 0x6da6d820, 0x3c8be: 0x6da6da20, 0x3c8bf: 0x6da6dc20, + // Block 0xf23, offset 0x3c8c0 + 0x3c8c0: 0x6da6de20, 0x3c8c1: 0x6da6e020, 0x3c8c2: 0x6da6e220, 0x3c8c3: 0x6da6e420, + 0x3c8c4: 0x6da6e620, 0x3c8c5: 0x6da6e820, 0x3c8c6: 0x6da6ea20, 0x3c8c7: 0x6da6ec20, + 0x3c8c8: 0x6da6ee20, 0x3c8c9: 0x6dc83c20, 0x3c8ca: 0x6dc83e20, 0x3c8cb: 0x6dc84020, + 0x3c8cc: 0x6dc84220, 0x3c8cd: 0x6dc84420, 0x3c8ce: 0x6dc84620, 0x3c8cf: 0x6dc84820, + 0x3c8d0: 0x6de46c20, 0x3c8d1: 0x6de46e20, 0x3c8d2: 0x6de47020, 0x3c8d3: 0x6de47220, + 0x3c8d4: 0x6de47420, 0x3c8d5: 0x6de47620, 0x3c8d6: 0x6dfb8e20, 0x3c8d7: 0x6dfb9020, + 0x3c8d8: 0x6dfb9220, 0x3c8d9: 0x6dfb9420, 0x3c8da: 0x6dfb9620, 0x3c8db: 0x6e0ed020, + 0x3c8dc: 0x6e0ed220, 0x3c8dd: 0x6e0ed420, 0x3c8de: 0x6e0ed620, 0x3c8df: 0x6e1e0620, + 0x3c8e0: 0x6e1e0820, 0x3c8e1: 0x6e1e0a20, 0x3c8e2: 0x6e297220, 0x3c8e3: 0x6e297420, + 0x3c8e4: 0x6e328c20, 0x3c8e5: 0x6e328e20, 0x3c8e6: 0x6e38d220, 0x3c8e7: 0x6e405420, + 0x3c8e8: 0x6e3d4420, 0x3c8e9: 0x6c379220, 0x3c8ea: 0x6c52f420, 0x3c8eb: 0x6c52f620, + 0x3c8ec: 0x6c9dd620, 0x3c8ed: 0x6c9dd820, 0x3c8ee: 0x6ccad020, 0x3c8ef: 0x6cf90220, + 0x3c8f0: 0x6cf90420, 0x3c8f1: 0x6d283e20, 0x3c8f2: 0x6d558220, 0x3c8f3: 0x6dfba220, + 0x3c8f4: 0x6e329220, 0x3c8f5: 0x6c37c820, 0x3c8f6: 0x6c75a420, 0x3c8f7: 0x6c9de620, + 0x3c8f8: 0x6ccaf620, 0x3c8f9: 0x6cf91c20, 0x3c8fa: 0x6cf91e20, 0x3c8fb: 0x6d284e20, + 0x3c8fc: 0x6d559820, 0x3c8fd: 0x6d80fe20, 0x3c8fe: 0x6d810020, 0x3c8ff: 0x6da71c20, + // Block 0xf24, offset 0x3c900 + 0x3c900: 0x6c534420, 0x3c901: 0x6c534620, 0x3c902: 0x6c75d820, 0x3c903: 0x6c75da20, + 0x3c904: 0x6c9e1e20, 0x3c905: 0x6ccb4820, 0x3c906: 0x6d287420, 0x3c907: 0x6da73420, + 0x3c908: 0x6c75e820, 0x3c909: 0x6c75ea20, 0x3c90a: 0x6c9b1220, 0x3c90b: 0x6c9e4620, + 0x3c90c: 0x6ccb6220, 0x3c90d: 0x6ccb6420, 0x3c90e: 0x6ccb6620, 0x3c90f: 0x6cf97a20, + 0x3c910: 0x6d55da20, 0x3c911: 0x6da74020, 0x3c912: 0x6da74220, 0x3c913: 0x6e38de20, + 0x3c914: 0x6d289220, 0x3c915: 0x6d289c20, 0x3c916: 0x6c098220, 0x3c917: 0x6c384c20, + 0x3c918: 0x6c384e20, 0x3c919: 0x6c53ac20, 0x3c91a: 0x6c53ae20, 0x3c91b: 0x6c763420, + 0x3c91c: 0x6c763620, 0x3c91d: 0x6ccbc220, 0x3c91e: 0x6ccbc420, 0x3c91f: 0x6cf9d420, + 0x3c920: 0x6d28e820, 0x3c921: 0x6d561020, 0x3c922: 0x6dc8ba20, 0x3c923: 0x6c386420, + 0x3c924: 0x6c53cc20, 0x3c925: 0x6c9ea820, 0x3c926: 0x6cf9e020, 0x3c927: 0x6d28f220, + 0x3c928: 0x6c09c820, 0x3c929: 0x6c134c20, 0x3c92a: 0x6c134e20, 0x3c92b: 0x6c135020, + 0x3c92c: 0x6c135220, 0x3c92d: 0x6c238220, 0x3c92e: 0x6c238420, 0x3c92f: 0x6c238620, + 0x3c930: 0x6c238820, 0x3c931: 0x6c398420, 0x3c932: 0x6c398620, 0x3c933: 0x6c398820, + 0x3c934: 0x6c398a20, 0x3c935: 0x6c398c20, 0x3c936: 0x6c398e20, 0x3c937: 0x6c550a20, + 0x3c938: 0x6c550c20, 0x3c939: 0x6c550e20, 0x3c93a: 0x6c551020, 0x3c93b: 0x6c551220, + 0x3c93c: 0x6c551420, 0x3c93d: 0x6c551620, 0x3c93e: 0x6c77cc20, 0x3c93f: 0x6c77ce20, + // Block 0xf25, offset 0x3c940 + 0x3c940: 0x6c77d020, 0x3c941: 0x6c77d220, 0x3c942: 0x6c77d420, 0x3c943: 0x6c77d620, + 0x3c944: 0x6c77d820, 0x3c945: 0x6c77da20, 0x3c946: 0x6c77dc20, 0x3c947: 0x6c77de20, + 0x3c948: 0x6c77e020, 0x3c949: 0x6c77e220, 0x3c94a: 0x6c77e420, 0x3c94b: 0x6c77e620, + 0x3c94c: 0x6ca0c620, 0x3c94d: 0x6ca0c820, 0x3c94e: 0x6ca0ca20, 0x3c94f: 0x6ca0cc20, + 0x3c950: 0x6ca0ce20, 0x3c951: 0x6ca0d020, 0x3c952: 0x6ca0d220, 0x3c953: 0x6ca0d420, + 0x3c954: 0x6ca0d620, 0x3c955: 0x6ca0d820, 0x3c956: 0x6ca0da20, 0x3c957: 0x6ccdb620, + 0x3c958: 0x6ccdb820, 0x3c959: 0x6ccdba20, 0x3c95a: 0x6ccdbc20, 0x3c95b: 0x6ccdbe20, + 0x3c95c: 0x6ccdc020, 0x3c95d: 0x6ccdc220, 0x3c95e: 0x6ccdc420, 0x3c95f: 0x6ccdc620, + 0x3c960: 0x6ccdc820, 0x3c961: 0x6ccdca20, 0x3c962: 0x6ccdcc20, 0x3c963: 0x6ccdce20, + 0x3c964: 0x6ccdd020, 0x3c965: 0x6ccdd220, 0x3c966: 0x6ccdd420, 0x3c967: 0x6ccdd620, + 0x3c968: 0x6ccdd820, 0x3c969: 0x6ccdda20, 0x3c96a: 0x6cfba620, 0x3c96b: 0x6cfba820, + 0x3c96c: 0x6cfbaa20, 0x3c96d: 0x6cfbac20, 0x3c96e: 0x6cfbae20, 0x3c96f: 0x6cfbb020, + 0x3c970: 0x6cfbb220, 0x3c971: 0x6cfbb420, 0x3c972: 0x6cfbb620, 0x3c973: 0x6cfbb820, + 0x3c974: 0x6cfbba20, 0x3c975: 0x6cfbbc20, 0x3c976: 0x6cfbbe20, 0x3c977: 0x6cfbc020, + 0x3c978: 0x6cfbc220, 0x3c979: 0x6cfbc420, 0x3c97a: 0x6cfbc620, 0x3c97b: 0x6cfbc820, + 0x3c97c: 0x6cfbca20, 0x3c97d: 0x6cfbcc20, 0x3c97e: 0x6cfbce20, 0x3c97f: 0x6d2ab220, + // Block 0xf26, offset 0x3c980 + 0x3c980: 0x6d2ab420, 0x3c981: 0x6d2ab620, 0x3c982: 0x6d2ab820, 0x3c983: 0x6d2aba20, + 0x3c984: 0x6d2abc20, 0x3c985: 0x6d2abe20, 0x3c986: 0x6d2ac020, 0x3c987: 0x6d2ac220, + 0x3c988: 0x6d2ac420, 0x3c989: 0x6d2ac620, 0x3c98a: 0x6d2ac820, 0x3c98b: 0x6d57e420, + 0x3c98c: 0x6d57e620, 0x3c98d: 0x6d57e820, 0x3c98e: 0x6d57ea20, 0x3c98f: 0x6d57ec20, + 0x3c990: 0x6d57ee20, 0x3c991: 0x6d57f020, 0x3c992: 0x6d57f220, 0x3c993: 0x6d57f420, + 0x3c994: 0x6d57f620, 0x3c995: 0x6d57f820, 0x3c996: 0x6d57fa20, 0x3c997: 0x6d57fc20, + 0x3c998: 0x6d57fe20, 0x3c999: 0x6d580020, 0x3c99a: 0x6d580220, 0x3c99b: 0x6d580420, + 0x3c99c: 0x6d580620, 0x3c99d: 0x6d82e420, 0x3c99e: 0x6d82e620, 0x3c99f: 0x6d82e820, + 0x3c9a0: 0x6d82ea20, 0x3c9a1: 0x6d82ec20, 0x3c9a2: 0x6d82ee20, 0x3c9a3: 0x6d82f020, + 0x3c9a4: 0x6d82f220, 0x3c9a5: 0x6d82f420, 0x3c9a6: 0x6d82f620, 0x3c9a7: 0x6d82f820, + 0x3c9a8: 0x6da85a20, 0x3c9a9: 0x6da85c20, 0x3c9aa: 0x6da85e20, 0x3c9ab: 0x6da86020, + 0x3c9ac: 0x6da86220, 0x3c9ad: 0x6da86420, 0x3c9ae: 0x6da86620, 0x3c9af: 0x6da86820, + 0x3c9b0: 0x6da86a20, 0x3c9b1: 0x6da86c20, 0x3c9b2: 0x6da86e20, 0x3c9b3: 0x6dc9aa20, + 0x3c9b4: 0x6dc9ac20, 0x3c9b5: 0x6dc9ae20, 0x3c9b6: 0x6dc9b020, 0x3c9b7: 0x6dc9b220, + 0x3c9b8: 0x6dc9b420, 0x3c9b9: 0x6dc9b620, 0x3c9ba: 0x6de56220, 0x3c9bb: 0x6de56420, + 0x3c9bc: 0x6de56620, 0x3c9bd: 0x6de56820, 0x3c9be: 0x6de56a20, 0x3c9bf: 0x6de56c20, + // Block 0xf27, offset 0x3c9c0 + 0x3c9c0: 0x6dfc4220, 0x3c9c1: 0x6dfc4420, 0x3c9c2: 0x6dfc4620, 0x3c9c3: 0x6e0f7220, + 0x3c9c4: 0x6e0f7420, 0x3c9c5: 0x6e0f7620, 0x3c9c6: 0x6e0f7820, 0x3c9c7: 0x6e0f7a20, + 0x3c9c8: 0x6e1e6a20, 0x3c9c9: 0x6e1e6c20, 0x3c9ca: 0x6e29d220, 0x3c9cb: 0x6e29d420, + 0x3c9cc: 0x6e32be20, 0x3c9cd: 0x6c09ce20, 0x3c9ce: 0x6c23ca20, 0x3c9cf: 0x6c23cc20, + 0x3c9d0: 0x6c23ce20, 0x3c9d1: 0x6c3a1620, 0x3c9d2: 0x6c3a1820, 0x3c9d3: 0x6c3a1a20, + 0x3c9d4: 0x6c3a1c20, 0x3c9d5: 0x6c3a1e20, 0x3c9d6: 0x6c3a2020, 0x3c9d7: 0x6c3a2220, + 0x3c9d8: 0x6c55d820, 0x3c9d9: 0x6c55da20, 0x3c9da: 0x6c55dc20, 0x3c9db: 0x6c55de20, + 0x3c9dc: 0x6c55e020, 0x3c9dd: 0x6c55e220, 0x3c9de: 0x6c55e420, 0x3c9df: 0x6c55e620, + 0x3c9e0: 0x6c55e820, 0x3c9e1: 0x6c55ea20, 0x3c9e2: 0x6c55ec20, 0x3c9e3: 0x6c78b820, + 0x3c9e4: 0x6c78ba20, 0x3c9e5: 0x6c78bc20, 0x3c9e6: 0x6c78be20, 0x3c9e7: 0x6c78c020, + 0x3c9e8: 0x6c78c220, 0x3c9e9: 0x6c78c420, 0x3c9ea: 0x6c78c620, 0x3c9eb: 0x6ca1ba20, + 0x3c9ec: 0x6ca1bc20, 0x3c9ed: 0x6ca1be20, 0x3c9ee: 0x6ca1c020, 0x3c9ef: 0x6ca1c220, + 0x3c9f0: 0x6ca1c420, 0x3c9f1: 0x6ca1c620, 0x3c9f2: 0x6ca1c820, 0x3c9f3: 0x6ccee820, + 0x3c9f4: 0x6cceea20, 0x3c9f5: 0x6cceec20, 0x3c9f6: 0x6cceee20, 0x3c9f7: 0x6ccef020, + 0x3c9f8: 0x6ccef220, 0x3c9f9: 0x6ccef420, 0x3c9fa: 0x6ccef620, 0x3c9fb: 0x6ccef820, + 0x3c9fc: 0x6ccefa20, 0x3c9fd: 0x6ccefc20, 0x3c9fe: 0x6ccefe20, 0x3c9ff: 0x6ccf0020, + // Block 0xf28, offset 0x3ca00 + 0x3ca00: 0x6ccf0220, 0x3ca01: 0x6ccf0420, 0x3ca02: 0x6ccf0620, 0x3ca03: 0x6ccf0820, + 0x3ca04: 0x6cfd1220, 0x3ca05: 0x6cfd1420, 0x3ca06: 0x6cfd1620, 0x3ca07: 0x6cfd1820, + 0x3ca08: 0x6cfd1a20, 0x3ca09: 0x6cfd1c20, 0x3ca0a: 0x6cfd1e20, 0x3ca0b: 0x6cfd2020, + 0x3ca0c: 0x6cfd2220, 0x3ca0d: 0x6cfd2420, 0x3ca0e: 0x6cfd2620, 0x3ca0f: 0x6cfd2820, + 0x3ca10: 0x6cfd2a20, 0x3ca11: 0x6cfd2c20, 0x3ca12: 0x6d2bba20, 0x3ca13: 0x6d2bbc20, + 0x3ca14: 0x6d2bbe20, 0x3ca15: 0x6d2bc020, 0x3ca16: 0x6d2bc220, 0x3ca17: 0x6d2bc420, + 0x3ca18: 0x6d2bc620, 0x3ca19: 0x6d2bc820, 0x3ca1a: 0x6d2bca20, 0x3ca1b: 0x6d2bcc20, + 0x3ca1c: 0x6d2bce20, 0x3ca1d: 0x6d2bd020, 0x3ca1e: 0x6d2bd220, 0x3ca1f: 0x6d2bd420, + 0x3ca20: 0x6d2bd620, 0x3ca21: 0x6d58f020, 0x3ca22: 0x6d58f220, 0x3ca23: 0x6d58f420, + 0x3ca24: 0x6d58f620, 0x3ca25: 0x6d58f820, 0x3ca26: 0x6d58fa20, 0x3ca27: 0x6d58fc20, + 0x3ca28: 0x6d58fe20, 0x3ca29: 0x6d590020, 0x3ca2a: 0x6d841620, 0x3ca2b: 0x6d841820, + 0x3ca2c: 0x6d841a20, 0x3ca2d: 0x6d841c20, 0x3ca2e: 0x6d841e20, 0x3ca2f: 0x6d842020, + 0x3ca30: 0x6d842220, 0x3ca31: 0x6d842420, 0x3ca32: 0x6d842620, 0x3ca33: 0x6d842820, + 0x3ca34: 0x6da90c20, 0x3ca35: 0x6da90e20, 0x3ca36: 0x6da91020, 0x3ca37: 0x6da91220, + 0x3ca38: 0x6da91420, 0x3ca39: 0x6da91620, 0x3ca3a: 0x6da91820, 0x3ca3b: 0x6da91a20, + 0x3ca3c: 0x6dca3020, 0x3ca3d: 0x6dca3220, 0x3ca3e: 0x6dca3420, 0x3ca3f: 0x6dca3620, + // Block 0xf29, offset 0x3ca40 + 0x3ca40: 0x6dca3820, 0x3ca41: 0x6de5d020, 0x3ca42: 0x6de5d220, 0x3ca43: 0x6dfcc420, + 0x3ca44: 0x6dfcc620, 0x3ca45: 0x6dfcc820, 0x3ca46: 0x6e1e9420, 0x3ca47: 0x6e1e9620, + 0x3ca48: 0x6e29fc20, 0x3ca49: 0x6e32cc20, 0x3ca4a: 0x6e390620, 0x3ca4b: 0x6e390820, + 0x3ca4c: 0x6e407420, 0x3ca4d: 0x6c23d820, 0x3ca4e: 0x6c561220, 0x3ca4f: 0x6ca1d820, + 0x3ca50: 0x6ccf1a20, 0x3ca51: 0x6ccf1c20, 0x3ca52: 0x6ccf1e20, 0x3ca53: 0x6ccf2020, + 0x3ca54: 0x6cfd3a20, 0x3ca55: 0x6cfd3c20, 0x3ca56: 0x6d591420, 0x3ca57: 0x6d591620, + 0x3ca58: 0x6da92c20, 0x3ca59: 0x6da92e20, 0x3ca5a: 0x6e470020, 0x3ca5b: 0x6c78dc20, + 0x3ca5c: 0x6ca1de20, 0x3ca5d: 0x6c3a4420, 0x3ca5e: 0x6ca1f620, 0x3ca5f: 0x6ccf3a20, + 0x3ca60: 0x6d592620, 0x3ca61: 0x6dca4220, 0x3ca62: 0x6c790020, 0x3ca63: 0x6ca20620, + 0x3ca64: 0x6ca20820, 0x3ca65: 0x6ccf6420, 0x3ca66: 0x6d845020, 0x3ca67: 0x6c3a6020, + 0x3ca68: 0x6ccf7020, 0x3ca69: 0x6c23fe20, 0x3ca6a: 0x6c569020, 0x3ca6b: 0x6c569220, + 0x3ca6c: 0x6c792e20, 0x3ca6d: 0x6c793020, 0x3ca6e: 0x6c793220, 0x3ca6f: 0x6ccfca20, + 0x3ca70: 0x6cfdbc20, 0x3ca71: 0x6d2c6220, 0x3ca72: 0x6d2c6420, 0x3ca73: 0x6d2c6620, + 0x3ca74: 0x6d598420, 0x3ca75: 0x6d847c20, 0x3ca76: 0x6e0fc620, 0x3ca77: 0x6c246a20, + 0x3ca78: 0x6c3b3420, 0x3ca79: 0x6ccfcc20, 0x3ca7a: 0x6c572220, 0x3ca7b: 0x6c572420, + 0x3ca7c: 0x6c79b620, 0x3ca7d: 0x6c79b820, 0x3ca7e: 0x6ca2cc20, 0x3ca7f: 0x6ca2ce20, + // Block 0xf2a, offset 0x3ca80 + 0x3ca80: 0x6ca2d020, 0x3ca81: 0x6ca2d220, 0x3ca82: 0x6cd06c20, 0x3ca83: 0x6cd06e20, + 0x3ca84: 0x6cd07020, 0x3ca85: 0x6cd07220, 0x3ca86: 0x6cfe4620, 0x3ca87: 0x6cfe4820, + 0x3ca88: 0x6d2cde20, 0x3ca89: 0x6d5a0420, 0x3ca8a: 0x6da99420, 0x3ca8b: 0x6dca8220, + 0x3ca8c: 0x6de61a20, 0x3ca8d: 0x6c13cc20, 0x3ca8e: 0x6c3b9c20, 0x3ca8f: 0x6c3b9e20, + 0x3ca90: 0x6c3ba020, 0x3ca91: 0x6c3ba220, 0x3ca92: 0x6c3ba420, 0x3ca93: 0x6c3ba620, + 0x3ca94: 0x6c3ba820, 0x3ca95: 0x6c57c220, 0x3ca96: 0x6c57c420, 0x3ca97: 0x6c7a5e20, + 0x3ca98: 0x6c7a6020, 0x3ca99: 0x6c7a6220, 0x3ca9a: 0x6c7a6420, 0x3ca9b: 0x6c7a6620, + 0x3ca9c: 0x6c7a6820, 0x3ca9d: 0x6c7a6a20, 0x3ca9e: 0x6c7a6c20, 0x3ca9f: 0x6c7a6e20, + 0x3caa0: 0x6ca37020, 0x3caa1: 0x6ca37220, 0x3caa2: 0x6ca37420, 0x3caa3: 0x6ca37620, + 0x3caa4: 0x6ca37820, 0x3caa5: 0x6ca37a20, 0x3caa6: 0x6cd14420, 0x3caa7: 0x6cd14620, + 0x3caa8: 0x6cd14820, 0x3caa9: 0x6cd14a20, 0x3caaa: 0x6cd14c20, 0x3caab: 0x6cd14e20, + 0x3caac: 0x6cd15020, 0x3caad: 0x6cd15220, 0x3caae: 0x6cd15420, 0x3caaf: 0x6cd15620, + 0x3cab0: 0x6cd15820, 0x3cab1: 0x6cd15a20, 0x3cab2: 0x6cd15c20, 0x3cab3: 0x6cff2020, + 0x3cab4: 0x6cff2220, 0x3cab5: 0x6cff2420, 0x3cab6: 0x6cff2620, 0x3cab7: 0x6cff2820, + 0x3cab8: 0x6cff2a20, 0x3cab9: 0x6cff2c20, 0x3caba: 0x6cff2e20, 0x3cabb: 0x6cff3020, + 0x3cabc: 0x6cff3220, 0x3cabd: 0x6cff3420, 0x3cabe: 0x6cff3620, 0x3cabf: 0x6cff3820, + // Block 0xf2b, offset 0x3cac0 + 0x3cac0: 0x6cff3a20, 0x3cac1: 0x6cff3c20, 0x3cac2: 0x6cff3e20, 0x3cac3: 0x6d2d6a20, + 0x3cac4: 0x6d2d6c20, 0x3cac5: 0x6d2d6e20, 0x3cac6: 0x6d2d7020, 0x3cac7: 0x6d2d7220, + 0x3cac8: 0x6d2d7420, 0x3cac9: 0x6d2d7620, 0x3caca: 0x6d2d7820, 0x3cacb: 0x6d2d7a20, + 0x3cacc: 0x6d2d7c20, 0x3cacd: 0x6d2d7e20, 0x3cace: 0x6d2d8020, 0x3cacf: 0x6d2d8220, + 0x3cad0: 0x6d5aa220, 0x3cad1: 0x6d5aa420, 0x3cad2: 0x6d5aa620, 0x3cad3: 0x6d5aa820, + 0x3cad4: 0x6d5aaa20, 0x3cad5: 0x6d5aac20, 0x3cad6: 0x6d5aae20, 0x3cad7: 0x6d855420, + 0x3cad8: 0x6d855620, 0x3cad9: 0x6d855820, 0x3cada: 0x6d855a20, 0x3cadb: 0x6d855c20, + 0x3cadc: 0x6d855e20, 0x3cadd: 0x6d856020, 0x3cade: 0x6d856220, 0x3cadf: 0x6d856420, + 0x3cae0: 0x6d856620, 0x3cae1: 0x6daa0420, 0x3cae2: 0x6daa0620, 0x3cae3: 0x6daa0820, + 0x3cae4: 0x6daa0a20, 0x3cae5: 0x6daa0c20, 0x3cae6: 0x6daa0e20, 0x3cae7: 0x6dcade20, + 0x3cae8: 0x6dcae020, 0x3cae9: 0x6de66220, 0x3caea: 0x6de66420, 0x3caeb: 0x6de66620, + 0x3caec: 0x6dfd2420, 0x3caed: 0x6dfd2620, 0x3caee: 0x6dfd2820, 0x3caef: 0x6dfd2a20, + 0x3caf0: 0x6e0ff220, 0x3caf1: 0x6e2a2c20, 0x3caf2: 0x6e32e220, 0x3caf3: 0x6c3bb020, + 0x3caf4: 0x6c57d420, 0x3caf5: 0x6cff5020, 0x3caf6: 0x6c3bc220, 0x3caf7: 0x6c57fa20, + 0x3caf8: 0x6c57fc20, 0x3caf9: 0x6c7aac20, 0x3cafa: 0x6cff8420, 0x3cafb: 0x6cff8620, + 0x3cafc: 0x6d2dd020, 0x3cafd: 0x6d5aec20, 0x3cafe: 0x6d5aee20, 0x3caff: 0x6e1ed420, + // Block 0xf2c, offset 0x3cb00 + 0x3cb00: 0x6cd1a020, 0x3cb01: 0x6c24a820, 0x3cb02: 0x6ca3ce20, 0x3cb03: 0x6cff9c20, + 0x3cb04: 0x6cff9e20, 0x3cb05: 0x6cffa020, 0x3cb06: 0x6c13d420, 0x3cb07: 0x6c24d220, + 0x3cb08: 0x6c3c1220, 0x3cb09: 0x6c588620, 0x3cb0a: 0x6c588820, 0x3cb0b: 0x6c588a20, + 0x3cb0c: 0x6c588c20, 0x3cb0d: 0x6c7b0620, 0x3cb0e: 0x6c7b0820, 0x3cb0f: 0x6c7b0a20, + 0x3cb10: 0x6c7b0c20, 0x3cb11: 0x6ca41420, 0x3cb12: 0x6ca41620, 0x3cb13: 0x6cd1fc20, + 0x3cb14: 0x6cd1fe20, 0x3cb15: 0x6cd20020, 0x3cb16: 0x6cd20220, 0x3cb17: 0x6cd20420, + 0x3cb18: 0x6cffea20, 0x3cb19: 0x6cffec20, 0x3cb1a: 0x6cffee20, 0x3cb1b: 0x6d2e0020, + 0x3cb1c: 0x6d2e0220, 0x3cb1d: 0x6d5b2a20, 0x3cb1e: 0x6d5b2c20, 0x3cb1f: 0x6d85b820, + 0x3cb20: 0x6d85ba20, 0x3cb21: 0x6d85bc20, 0x3cb22: 0x6daa6c20, 0x3cb23: 0x6dcb1c20, + 0x3cb24: 0x6dfd4620, 0x3cb25: 0x6e101a20, 0x3cb26: 0x6e101c20, 0x3cb27: 0x6daa6e20, + 0x3cb28: 0x6c58fa20, 0x3cb29: 0x6c58fc20, 0x3cb2a: 0x6c58fe20, 0x3cb2b: 0x6c590020, + 0x3cb2c: 0x6c7b9c20, 0x3cb2d: 0x6c7b9e20, 0x3cb2e: 0x6c7ba020, 0x3cb2f: 0x6ca48420, + 0x3cb30: 0x6cd2b420, 0x3cb31: 0x6cd2b620, 0x3cb32: 0x6d00ae20, 0x3cb33: 0x6d2ea020, + 0x3cb34: 0x6d2ea220, 0x3cb35: 0x6d2ea420, 0x3cb36: 0x6d5bd220, 0x3cb37: 0x6d5bd420, + 0x3cb38: 0x6daafc20, 0x3cb39: 0x6daafe20, 0x3cb3a: 0x6de6da20, 0x3cb3b: 0x6c593620, + 0x3cb3c: 0x6c593820, 0x3cb3d: 0x6c7bd020, 0x3cb3e: 0x6cd2ea20, 0x3cb3f: 0x6cd2ec20, + // Block 0xf2d, offset 0x3cb40 + 0x3cb40: 0x6d00e020, 0x3cb41: 0x6d00e220, 0x3cb42: 0x6d2ec420, 0x3cb43: 0x6d2ec620, + 0x3cb44: 0x6d5bf620, 0x3cb45: 0x6e104e20, 0x3cb46: 0x6c3c6420, 0x3cb47: 0x6c594c20, + 0x3cb48: 0x6d2eee20, 0x3cb49: 0x6d2ef020, 0x3cb4a: 0x6c596e20, 0x3cb4b: 0x6c597020, + 0x3cb4c: 0x6c7c2a20, 0x3cb4d: 0x6c7c2c20, 0x3cb4e: 0x6ca4ec20, 0x3cb4f: 0x6cd32820, + 0x3cb50: 0x6cd32a20, 0x3cb51: 0x6d012a20, 0x3cb52: 0x6d012c20, 0x3cb53: 0x6d2f0420, + 0x3cb54: 0x6d2f0620, 0x3cb55: 0x6d5c2620, 0x3cb56: 0x6d86ac20, 0x3cb57: 0x6dab4a20, + 0x3cb58: 0x6dab4c20, 0x3cb59: 0x6dcbbc20, 0x3cb5a: 0x6de70a20, 0x3cb5b: 0x6e105a20, + 0x3cb5c: 0x6e1f1420, 0x3cb5d: 0x6e331220, 0x3cb5e: 0x6e444020, 0x3cb5f: 0x6c3cae20, + 0x3cb60: 0x6c3cb020, 0x3cb61: 0x6c5a1420, 0x3cb62: 0x6c5a1620, 0x3cb63: 0x6c5a1820, + 0x3cb64: 0x6c7ccc20, 0x3cb65: 0x6c7cce20, 0x3cb66: 0x6c7cd020, 0x3cb67: 0x6c7cd220, + 0x3cb68: 0x6ca58a20, 0x3cb69: 0x6ca58c20, 0x3cb6a: 0x6ca58e20, 0x3cb6b: 0x6cd3f020, + 0x3cb6c: 0x6cd3f220, 0x3cb6d: 0x6d01ee20, 0x3cb6e: 0x6d01f020, 0x3cb6f: 0x6d01f220, + 0x3cb70: 0x6d01f420, 0x3cb71: 0x6d2fc620, 0x3cb72: 0x6d2fc820, 0x3cb73: 0x6d2fca20, + 0x3cb74: 0x6d2fcc20, 0x3cb75: 0x6d5cca20, 0x3cb76: 0x6d5ccc20, 0x3cb77: 0x6d5cce20, + 0x3cb78: 0x6d5cd020, 0x3cb79: 0x6d874c20, 0x3cb7a: 0x6d874e20, 0x3cb7b: 0x6d875020, + 0x3cb7c: 0x6dabe020, 0x3cb7d: 0x6dabe220, 0x3cb7e: 0x6dabe420, 0x3cb7f: 0x6dabe620, + // Block 0xf2e, offset 0x3cb80 + 0x3cb80: 0x6dabe820, 0x3cb81: 0x6de75020, 0x3cb82: 0x6dfdde20, 0x3cb83: 0x6e108420, + 0x3cb84: 0x6e108620, 0x3cb85: 0x6e444420, 0x3cb86: 0x6c5a2220, 0x3cb87: 0x6cd40820, + 0x3cb88: 0x6c5a3820, 0x3cb89: 0x6c5a3a20, 0x3cb8a: 0x6ca5cc20, 0x3cb8b: 0x6d022e20, + 0x3cb8c: 0x6d2ffa20, 0x3cb8d: 0x6d5cf420, 0x3cb8e: 0x6d5cf620, 0x3cb8f: 0x6dfdea20, + 0x3cb90: 0x6e108a20, 0x3cb91: 0x6c5ab820, 0x3cb92: 0x6c5aba20, 0x3cb93: 0x6c5abc20, + 0x3cb94: 0x6c7db420, 0x3cb95: 0x6c7db620, 0x3cb96: 0x6c7db820, 0x3cb97: 0x6c7dba20, + 0x3cb98: 0x6c7dbc20, 0x3cb99: 0x6ca68020, 0x3cb9a: 0x6ca68220, 0x3cb9b: 0x6ca68420, + 0x3cb9c: 0x6ca68620, 0x3cb9d: 0x6ca68820, 0x3cb9e: 0x6cd4ac20, 0x3cb9f: 0x6cd4ae20, + 0x3cba0: 0x6cd4b020, 0x3cba1: 0x6cd4b220, 0x3cba2: 0x6cd4b420, 0x3cba3: 0x6cd4b620, + 0x3cba4: 0x6d02fc20, 0x3cba5: 0x6d02fe20, 0x3cba6: 0x6d030020, 0x3cba7: 0x6d030220, + 0x3cba8: 0x6d030420, 0x3cba9: 0x6d030620, 0x3cbaa: 0x6d30b020, 0x3cbab: 0x6d30b220, + 0x3cbac: 0x6d5d8220, 0x3cbad: 0x6d5d8420, 0x3cbae: 0x6d5d8620, 0x3cbaf: 0x6d87e820, + 0x3cbb0: 0x6d87ea20, 0x3cbb1: 0x6d87ec20, 0x3cbb2: 0x6d87ee20, 0x3cbb3: 0x6d87f020, + 0x3cbb4: 0x6d87f220, 0x3cbb5: 0x6dac9820, 0x3cbb6: 0x6dac9a20, 0x3cbb7: 0x6dac9c20, + 0x3cbb8: 0x6dcc9a20, 0x3cbb9: 0x6dcc9c20, 0x3cbba: 0x6dcc9e20, 0x3cbbb: 0x6de7a420, + 0x3cbbc: 0x6de7a620, 0x3cbbd: 0x6de7a820, 0x3cbbe: 0x6e10ba20, 0x3cbbf: 0x6e2a9e20, + // Block 0xf2f, offset 0x3cbc0 + 0x3cbc0: 0x6c256020, 0x3cbc1: 0x6c256220, 0x3cbc2: 0x6c3d2820, 0x3cbc3: 0x6c3d2a20, + 0x3cbc4: 0x6c5b2420, 0x3cbc5: 0x6c5b2620, 0x3cbc6: 0x6c5b2820, 0x3cbc7: 0x6c7e2420, + 0x3cbc8: 0x6c7e2620, 0x3cbc9: 0x6c7e2820, 0x3cbca: 0x6c7e2a20, 0x3cbcb: 0x6ca6e820, + 0x3cbcc: 0x6ca6ea20, 0x3cbcd: 0x6ca6ec20, 0x3cbce: 0x6ca6ee20, 0x3cbcf: 0x6ca6f020, + 0x3cbd0: 0x6cd51220, 0x3cbd1: 0x6cd51420, 0x3cbd2: 0x6cd51620, 0x3cbd3: 0x6cd51820, + 0x3cbd4: 0x6cd51a20, 0x3cbd5: 0x6cd51c20, 0x3cbd6: 0x6cd51e20, 0x3cbd7: 0x6cd52020, + 0x3cbd8: 0x6cd52220, 0x3cbd9: 0x6cd52420, 0x3cbda: 0x6d037220, 0x3cbdb: 0x6d037420, + 0x3cbdc: 0x6d310c20, 0x3cbdd: 0x6d310e20, 0x3cbde: 0x6d311020, 0x3cbdf: 0x6d311220, + 0x3cbe0: 0x6d5dcc20, 0x3cbe1: 0x6d5dce20, 0x3cbe2: 0x6dacc820, 0x3cbe3: 0x6dccbc20, + 0x3cbe4: 0x6e333820, 0x3cbe5: 0x6dccbe20, 0x3cbe6: 0x6c140a20, 0x3cbe7: 0x6c3d6620, + 0x3cbe8: 0x6c5b8e20, 0x3cbe9: 0x6c5b9020, 0x3cbea: 0x6c7e9e20, 0x3cbeb: 0x6c7ea020, + 0x3cbec: 0x6c7ea220, 0x3cbed: 0x6c7ea420, 0x3cbee: 0x6ca76e20, 0x3cbef: 0x6ca77020, + 0x3cbf0: 0x6ca77220, 0x3cbf1: 0x6ca77420, 0x3cbf2: 0x6cd59420, 0x3cbf3: 0x6cd59620, + 0x3cbf4: 0x6cd59820, 0x3cbf5: 0x6cd59a20, 0x3cbf6: 0x6cd59c20, 0x3cbf7: 0x6cd59e20, + 0x3cbf8: 0x6cd5a020, 0x3cbf9: 0x6d042220, 0x3cbfa: 0x6d042420, 0x3cbfb: 0x6d042620, + 0x3cbfc: 0x6d31b820, 0x3cbfd: 0x6d31ba20, 0x3cbfe: 0x6d31bc20, 0x3cbff: 0x6d31be20, + // Block 0xf30, offset 0x3cc00 + 0x3cc00: 0x6d31c020, 0x3cc01: 0x6d5e6220, 0x3cc02: 0x6d5e6420, 0x3cc03: 0x6d5e6620, + 0x3cc04: 0x6d5e6820, 0x3cc05: 0x6d88b820, 0x3cc06: 0x6dad4020, 0x3cc07: 0x6dcd1820, + 0x3cc08: 0x6dcd1a20, 0x3cc09: 0x6dfe8220, 0x3cc0a: 0x6c5bd020, 0x3cc0b: 0x6c7ef420, + 0x3cc0c: 0x6ca7c020, 0x3cc0d: 0x6ca7c220, 0x3cc0e: 0x6cd60420, 0x3cc0f: 0x6cd60620, + 0x3cc10: 0x6cd60820, 0x3cc11: 0x6d048020, 0x3cc12: 0x6d048220, 0x3cc13: 0x6d048420, + 0x3cc14: 0x6d320420, 0x3cc15: 0x6d320620, 0x3cc16: 0x6d5eb420, 0x3cc17: 0x6d891820, + 0x3cc18: 0x6d891a20, 0x3cc19: 0x6d891c20, 0x3cc1a: 0x6d891e20, 0x3cc1b: 0x6dad8620, + 0x3cc1c: 0x6dcd3620, 0x3cc1d: 0x6e2ac020, 0x3cc1e: 0x6c3d9820, 0x3cc1f: 0x6c5bf420, + 0x3cc20: 0x6c7f2e20, 0x3cc21: 0x6c7f3020, 0x3cc22: 0x6ca7e420, 0x3cc23: 0x6cd63220, + 0x3cc24: 0x6cd63420, 0x3cc25: 0x6d04b220, 0x3cc26: 0x6d04b420, 0x3cc27: 0x6d322a20, + 0x3cc28: 0x6d322c20, 0x3cc29: 0x6d5ec620, 0x3cc2a: 0x6d5ec820, 0x3cc2b: 0x6d5eca20, + 0x3cc2c: 0x6d892c20, 0x3cc2d: 0x6dada420, 0x3cc2e: 0x6de81020, 0x3cc2f: 0x6e1f8420, + 0x3cc30: 0x6c3da620, 0x3cc31: 0x6c5c2c20, 0x3cc32: 0x6c7f9c20, 0x3cc33: 0x6c7f9e20, + 0x3cc34: 0x6c7fa020, 0x3cc35: 0x6c7fa220, 0x3cc36: 0x6c7fa420, 0x3cc37: 0x6c7fa620, + 0x3cc38: 0x6ca88a20, 0x3cc39: 0x6ca88c20, 0x3cc3a: 0x6ca88e20, 0x3cc3b: 0x6ca89020, + 0x3cc3c: 0x6cd6da20, 0x3cc3d: 0x6cd6dc20, 0x3cc3e: 0x6d058c20, 0x3cc3f: 0x6d058e20, + // Block 0xf31, offset 0x3cc40 + 0x3cc40: 0x6d059020, 0x3cc41: 0x6d059220, 0x3cc42: 0x6d059420, 0x3cc43: 0x6d059620, + 0x3cc44: 0x6d332a20, 0x3cc45: 0x6d332c20, 0x3cc46: 0x6d332e20, 0x3cc47: 0x6d333020, + 0x3cc48: 0x6d333220, 0x3cc49: 0x6d333420, 0x3cc4a: 0x6d5fdc20, 0x3cc4b: 0x6d5fde20, + 0x3cc4c: 0x6d5fe020, 0x3cc4d: 0x6d5fe220, 0x3cc4e: 0x6d5fe420, 0x3cc4f: 0x6d5fe620, + 0x3cc50: 0x6d8a4020, 0x3cc51: 0x6d8a4220, 0x3cc52: 0x6d8a4420, 0x3cc53: 0x6d8a4620, + 0x3cc54: 0x6d8a4820, 0x3cc55: 0x6d8a4a20, 0x3cc56: 0x6d8a4c20, 0x3cc57: 0x6d8a4e20, + 0x3cc58: 0x6daeb420, 0x3cc59: 0x6daeb620, 0x3cc5a: 0x6daeb820, 0x3cc5b: 0x6daeba20, + 0x3cc5c: 0x6daebc20, 0x3cc5d: 0x6daebe20, 0x3cc5e: 0x6daec020, 0x3cc5f: 0x6daec220, + 0x3cc60: 0x6dce5a20, 0x3cc61: 0x6dce5c20, 0x3cc62: 0x6dce5e20, 0x3cc63: 0x6dce6020, + 0x3cc64: 0x6dce6220, 0x3cc65: 0x6de8be20, 0x3cc66: 0x6de8c020, 0x3cc67: 0x6dff1a20, + 0x3cc68: 0x6e118220, 0x3cc69: 0x6e118420, 0x3cc6a: 0x6e118620, 0x3cc6b: 0x6e118820, + 0x3cc6c: 0x6e1fe020, 0x3cc6d: 0x6e2b0220, 0x3cc6e: 0x6e337e20, 0x3cc6f: 0x6e398220, + 0x3cc70: 0x6e42de20, 0x3cc71: 0x6c3db620, 0x3cc72: 0x6c3db820, 0x3cc73: 0x6c5c5a20, + 0x3cc74: 0x6c5c5c20, 0x3cc75: 0x6c7fe820, 0x3cc76: 0x6c7fea20, 0x3cc77: 0x6c7fec20, + 0x3cc78: 0x6ca8e820, 0x3cc79: 0x6ca8ea20, 0x3cc7a: 0x6ca8ec20, 0x3cc7b: 0x6ca8ee20, + 0x3cc7c: 0x6ca8f020, 0x3cc7d: 0x6cd73a20, 0x3cc7e: 0x6cd73c20, 0x3cc7f: 0x6cd73e20, + // Block 0xf32, offset 0x3cc80 + 0x3cc80: 0x6cd74020, 0x3cc81: 0x6d060220, 0x3cc82: 0x6d33ac20, 0x3cc83: 0x6d33ae20, + 0x3cc84: 0x6d33b020, 0x3cc85: 0x6d33b220, 0x3cc86: 0x6d605e20, 0x3cc87: 0x6d606020, + 0x3cc88: 0x6d606220, 0x3cc89: 0x6d8aa420, 0x3cc8a: 0x6d8aa620, 0x3cc8b: 0x6d8aa820, + 0x3cc8c: 0x6d8aaa20, 0x3cc8d: 0x6daf1a20, 0x3cc8e: 0x6daf1c20, 0x3cc8f: 0x6dceba20, + 0x3cc90: 0x6dcebc20, 0x3cc91: 0x6dcebe20, 0x3cc92: 0x6de90420, 0x3cc93: 0x6de90620, + 0x3cc94: 0x6de90820, 0x3cc95: 0x6de90a20, 0x3cc96: 0x6dff3620, 0x3cc97: 0x6e1ffa20, + 0x3cc98: 0x6e1ffc20, 0x3cc99: 0x6e1ffe20, 0x3cc9a: 0x6c3dd220, 0x3cc9b: 0x6c3dd420, + 0x3cc9c: 0x6c5c9420, 0x3cc9d: 0x6c5c9620, 0x3cc9e: 0x6c809a20, 0x3cc9f: 0x6ca99820, + 0x3cca0: 0x6ca99a20, 0x3cca1: 0x6ca99c20, 0x3cca2: 0x6cd80620, 0x3cca3: 0x6cd80820, + 0x3cca4: 0x6cd80a20, 0x3cca5: 0x6d06c220, 0x3cca6: 0x6d06c420, 0x3cca7: 0x6d06c620, + 0x3cca8: 0x6d06c820, 0x3cca9: 0x6d06ca20, 0x3ccaa: 0x6d34b420, 0x3ccab: 0x6d34b620, + 0x3ccac: 0x6d34b820, 0x3ccad: 0x6d34ba20, 0x3ccae: 0x6d34bc20, 0x3ccaf: 0x6d34be20, + 0x3ccb0: 0x6d34c020, 0x3ccb1: 0x6d34c220, 0x3ccb2: 0x6d34c420, 0x3ccb3: 0x6d617020, + 0x3ccb4: 0x6d617220, 0x3ccb5: 0x6d617420, 0x3ccb6: 0x6d617620, 0x3ccb7: 0x6d617820, + 0x3ccb8: 0x6d8b8a20, 0x3ccb9: 0x6d8b8c20, 0x3ccba: 0x6d8b8e20, 0x3ccbb: 0x6d8b9020, + 0x3ccbc: 0x6d8b9220, 0x3ccbd: 0x6dafe220, 0x3ccbe: 0x6dafe420, 0x3ccbf: 0x6dafe620, + // Block 0xf33, offset 0x3ccc0 + 0x3ccc0: 0x6dafe820, 0x3ccc1: 0x6dcf7220, 0x3ccc2: 0x6dcf7420, 0x3ccc3: 0x6dcf7620, + 0x3ccc4: 0x6dcf7820, 0x3ccc5: 0x6de99220, 0x3ccc6: 0x6de99420, 0x3ccc7: 0x6de99620, + 0x3ccc8: 0x6de99820, 0x3ccc9: 0x6de99a20, 0x3ccca: 0x6de99c20, 0x3cccb: 0x6de99e20, + 0x3cccc: 0x6dff8a20, 0x3cccd: 0x6dff8c20, 0x3ccce: 0x6dff8e20, 0x3cccf: 0x6e11fa20, + 0x3ccd0: 0x6e11fc20, 0x3ccd1: 0x6e11fe20, 0x3ccd2: 0x6e203420, 0x3ccd3: 0x6e203620, + 0x3ccd4: 0x6e203820, 0x3ccd5: 0x6e2b3020, 0x3ccd6: 0x6e39a620, 0x3ccd7: 0x6e3dd220, + 0x3ccd8: 0x6e40b420, 0x3ccd9: 0x6c050220, 0x3ccda: 0x6c25c420, 0x3ccdb: 0x6c25c620, + 0x3ccdc: 0x6c25c820, 0x3ccdd: 0x6c25ca20, 0x3ccde: 0x6c3dfc20, 0x3ccdf: 0x6c3dfe20, + 0x3cce0: 0x6c5cba20, 0x3cce1: 0x6c5cbc20, 0x3cce2: 0x6c5cbe20, 0x3cce3: 0x6c5cc020, + 0x3cce4: 0x6c80b620, 0x3cce5: 0x6c80b820, 0x3cce6: 0x6c80ba20, 0x3cce7: 0x6c80bc20, + 0x3cce8: 0x6c80be20, 0x3cce9: 0x6c80c020, 0x3ccea: 0x6ca9dc20, 0x3cceb: 0x6ca9de20, + 0x3ccec: 0x6cd84a20, 0x3cced: 0x6cd84c20, 0x3ccee: 0x6cd84e20, 0x3ccef: 0x6d06ee20, + 0x3ccf0: 0x6d06f020, 0x3ccf1: 0x6d34d820, 0x3ccf2: 0x6d34da20, 0x3ccf3: 0x6d34dc20, + 0x3ccf4: 0x6d34de20, 0x3ccf5: 0x6d618e20, 0x3ccf6: 0x6d619020, 0x3ccf7: 0x6d8ba420, + 0x3ccf8: 0x6daff020, 0x3ccf9: 0x6e120020, 0x3ccfa: 0x6d06fa20, 0x3ccfb: 0x6d34fa20, + 0x3ccfc: 0x6d61a020, 0x3ccfd: 0x6d61a220, 0x3ccfe: 0x6d8bb820, 0x3ccff: 0x6de9b220, + // Block 0xf34, offset 0x3cd00 + 0x3cd00: 0x6c3e1e20, 0x3cd01: 0x6c5cf420, 0x3cd02: 0x6c812020, 0x3cd03: 0x6caa2420, + 0x3cd04: 0x6caa2620, 0x3cd05: 0x6caa2820, 0x3cd06: 0x6d074220, 0x3cd07: 0x6d074420, + 0x3cd08: 0x6d352c20, 0x3cd09: 0x6d61c820, 0x3cd0a: 0x6d8bf020, 0x3cd0b: 0x6dcfa620, + 0x3cd0c: 0x6de9d420, 0x3cd0d: 0x6e120e20, 0x3cd0e: 0x6c3e2c20, 0x3cd0f: 0x6caa6620, + 0x3cd10: 0x6caa6820, 0x3cd11: 0x6caa6a20, 0x3cd12: 0x6caa6c20, 0x3cd13: 0x6cd8a620, + 0x3cd14: 0x6cd8a820, 0x3cd15: 0x6d077a20, 0x3cd16: 0x6d61f020, 0x3cd17: 0x6d61f220, + 0x3cd18: 0x6d61f420, 0x3cd19: 0x6d8c0a20, 0x3cd1a: 0x6db04a20, 0x3cd1b: 0x6db04c20, + 0x3cd1c: 0x6db04e20, 0x3cd1d: 0x6dcfd420, 0x3cd1e: 0x6dcfd620, 0x3cd1f: 0x6dffb020, + 0x3cd20: 0x6e204820, 0x3cd21: 0x6e204a20, 0x3cd22: 0x6c5d2c20, 0x3cd23: 0x6c818e20, + 0x3cd24: 0x6caab020, 0x3cd25: 0x6cd8ec20, 0x3cd26: 0x6cd8ee20, 0x3cd27: 0x6cd8f020, + 0x3cd28: 0x6d07a620, 0x3cd29: 0x6d07a820, 0x3cd2a: 0x6d358a20, 0x3cd2b: 0x6d623820, + 0x3cd2c: 0x6d623a20, 0x3cd2d: 0x6d8c3e20, 0x3cd2e: 0x6d8c4020, 0x3cd2f: 0x6db07020, + 0x3cd30: 0x6dd00820, 0x3cd31: 0x6dd00a20, 0x3cd32: 0x6e205420, 0x3cd33: 0x6c81a020, + 0x3cd34: 0x6c81a220, 0x3cd35: 0x6d07ac20, 0x3cd36: 0x6d359020, 0x3cd37: 0x6d624020, + 0x3cd38: 0x6dd00e20, 0x3cd39: 0x6caace20, 0x3cd3a: 0x6cd90a20, 0x3cd3b: 0x6cd90c20, + 0x3cd3c: 0x6d07be20, 0x3cd3d: 0x6d626620, 0x3cd3e: 0x6d8c6020, 0x3cd3f: 0x6dd02820, + // Block 0xf35, offset 0x3cd40 + 0x3cd40: 0x6c3e5820, 0x3cd41: 0x6c81f820, 0x3cd42: 0x6cd94820, 0x3cd43: 0x6cd94a20, + 0x3cd44: 0x6d07f620, 0x3cd45: 0x6d07f820, 0x3cd46: 0x6d07fa20, 0x3cd47: 0x6d360a20, + 0x3cd48: 0x6d360c20, 0x3cd49: 0x6d62b420, 0x3cd4a: 0x6d8c9220, 0x3cd4b: 0x6d8c9420, + 0x3cd4c: 0x6d8c9620, 0x3cd4d: 0x6d8c9820, 0x3cd4e: 0x6db0c820, 0x3cd4f: 0x6db0ca20, + 0x3cd50: 0x6dd05a20, 0x3cd51: 0x6dd05c20, 0x3cd52: 0x6dea1a20, 0x3cd53: 0x6e42ea20, + 0x3cd54: 0x6d080820, 0x3cd55: 0x6d361820, 0x3cd56: 0x6c3f1420, 0x3cd57: 0x6c3f1620, + 0x3cd58: 0x6c3f1820, 0x3cd59: 0x6c5e3020, 0x3cd5a: 0x6c5e3220, 0x3cd5b: 0x6c5e3420, + 0x3cd5c: 0x6c5e3620, 0x3cd5d: 0x6c82ce20, 0x3cd5e: 0x6c82d020, 0x3cd5f: 0x6cabd620, + 0x3cd60: 0x6cabd820, 0x3cd61: 0x6cabda20, 0x3cd62: 0x6cda6620, 0x3cd63: 0x6cda6820, + 0x3cd64: 0x6cda6a20, 0x3cd65: 0x6cda6c20, 0x3cd66: 0x6d08f220, 0x3cd67: 0x6d08f420, + 0x3cd68: 0x6d08f620, 0x3cd69: 0x6d36d620, 0x3cd6a: 0x6d36d820, 0x3cd6b: 0x6d36da20, + 0x3cd6c: 0x6d36dc20, 0x3cd6d: 0x6d36de20, 0x3cd6e: 0x6d36e020, 0x3cd6f: 0x6d634a20, + 0x3cd70: 0x6d634c20, 0x3cd71: 0x6d634e20, 0x3cd72: 0x6d635020, 0x3cd73: 0x6d635220, + 0x3cd74: 0x6d635420, 0x3cd75: 0x6d8d5020, 0x3cd76: 0x6d8d5220, 0x3cd77: 0x6d8d5420, + 0x3cd78: 0x6d8d5620, 0x3cd79: 0x6db15e20, 0x3cd7a: 0x6db16020, 0x3cd7b: 0x6db16220, + 0x3cd7c: 0x6dd0ac20, 0x3cd7d: 0x6dd0ae20, 0x3cd7e: 0x6dea6420, 0x3cd7f: 0x6dea6620, + // Block 0xf36, offset 0x3cd80 + 0x3cd80: 0x6e001420, 0x3cd81: 0x6e125820, 0x3cd82: 0x6e207c20, 0x3cd83: 0x6e2b6220, + 0x3cd84: 0x6e454220, 0x3cd85: 0x6c82da20, 0x3cd86: 0x6cda7a20, 0x3cd87: 0x6d08f820, + 0x3cd88: 0x6d36ec20, 0x3cd89: 0x6dd0b620, 0x3cd8a: 0x6cda8a20, 0x3cd8b: 0x6d636820, + 0x3cd8c: 0x6dd0ba20, 0x3cd8d: 0x6e3de620, 0x3cd8e: 0x6d090020, 0x3cd8f: 0x6d36fc20, + 0x3cd90: 0x6d36fe20, 0x3cd91: 0x6e001e20, 0x3cd92: 0x6dd0d020, 0x3cd93: 0x6e3dea20, + 0x3cd94: 0x6c3f3220, 0x3cd95: 0x6d091820, 0x3cd96: 0x6d091a20, 0x3cd97: 0x6d8d9420, + 0x3cd98: 0x6dea8420, 0x3cd99: 0x6e208420, 0x3cd9a: 0x6c5e7620, 0x3cd9b: 0x6d377220, + 0x3cd9c: 0x6d63e020, 0x3cd9d: 0x6d63e220, 0x3cd9e: 0x6db1ba20, 0x3cd9f: 0x6dd11620, + 0x3cda0: 0x6e004820, 0x3cda1: 0x6e209620, 0x3cda2: 0x6e209820, 0x3cda3: 0x6e209a20, + 0x3cda4: 0x6d8dd820, 0x3cda5: 0x6c14c620, 0x3cda6: 0x6c14c820, 0x3cda7: 0x6c268420, + 0x3cda8: 0x6c268620, 0x3cda9: 0x6c400220, 0x3cdaa: 0x6c400420, 0x3cdab: 0x6c400620, + 0x3cdac: 0x6c400820, 0x3cdad: 0x6c400a20, 0x3cdae: 0x6c5f7e20, 0x3cdaf: 0x6c5f8020, + 0x3cdb0: 0x6c5f8220, 0x3cdb1: 0x6c5f8420, 0x3cdb2: 0x6c5f8620, 0x3cdb3: 0x6c5f8820, + 0x3cdb4: 0x6c5f8a20, 0x3cdb5: 0x6c5f8c20, 0x3cdb6: 0x6c84b020, 0x3cdb7: 0x6c84b220, + 0x3cdb8: 0x6c84b420, 0x3cdb9: 0x6c84b620, 0x3cdba: 0x6c84b820, 0x3cdbb: 0x6c84ba20, + 0x3cdbc: 0x6c84bc20, 0x3cdbd: 0x6c84be20, 0x3cdbe: 0x6c84c020, 0x3cdbf: 0x6cadf420, + // Block 0xf37, offset 0x3cdc0 + 0x3cdc0: 0x6cadf620, 0x3cdc1: 0x6cadf820, 0x3cdc2: 0x6cadfa20, 0x3cdc3: 0x6cadfc20, + 0x3cdc4: 0x6cadfe20, 0x3cdc5: 0x6cae0020, 0x3cdc6: 0x6cae0220, 0x3cdc7: 0x6cae0420, + 0x3cdc8: 0x6cae0620, 0x3cdc9: 0x6cae0820, 0x3cdca: 0x6cae0a20, 0x3cdcb: 0x6cae0c20, + 0x3cdcc: 0x6cae0e20, 0x3cdcd: 0x6cae1020, 0x3cdce: 0x6cae1220, 0x3cdcf: 0x6cae1420, + 0x3cdd0: 0x6cdd2220, 0x3cdd1: 0x6cdd2420, 0x3cdd2: 0x6cdd2620, 0x3cdd3: 0x6cdd2820, + 0x3cdd4: 0x6cdd2a20, 0x3cdd5: 0x6cdd2c20, 0x3cdd6: 0x6cdd2e20, 0x3cdd7: 0x6cdd3020, + 0x3cdd8: 0x6cdd3220, 0x3cdd9: 0x6cdd3420, 0x3cdda: 0x6cdd3620, 0x3cddb: 0x6cdd3820, + 0x3cddc: 0x6cdd3a20, 0x3cddd: 0x6cdd3c20, 0x3cdde: 0x6cdd3e20, 0x3cddf: 0x6cdd4020, + 0x3cde0: 0x6cdd4220, 0x3cde1: 0x6d0b8c20, 0x3cde2: 0x6d0b8e20, 0x3cde3: 0x6d0b9020, + 0x3cde4: 0x6d0b9220, 0x3cde5: 0x6d0b9420, 0x3cde6: 0x6d0b9620, 0x3cde7: 0x6d0b9820, + 0x3cde8: 0x6d0b9a20, 0x3cde9: 0x6d0b9c20, 0x3cdea: 0x6d0b9e20, 0x3cdeb: 0x6d0ba020, + 0x3cdec: 0x6d0ba220, 0x3cded: 0x6d0ba420, 0x3cdee: 0x6d0ba620, 0x3cdef: 0x6d0ba820, + 0x3cdf0: 0x6cdd4620, 0x3cdf1: 0x6d0baa20, 0x3cdf2: 0x6d0bac20, 0x3cdf3: 0x6d0bae20, + 0x3cdf4: 0x6d0bb020, 0x3cdf5: 0x6d0bb220, 0x3cdf6: 0x6d399220, 0x3cdf7: 0x6d399420, + 0x3cdf8: 0x6d399620, 0x3cdf9: 0x6d399820, 0x3cdfa: 0x6d399a20, 0x3cdfb: 0x6d399c20, + 0x3cdfc: 0x6d399e20, 0x3cdfd: 0x6d39a020, 0x3cdfe: 0x6d39a220, 0x3cdff: 0x6d39a420, + // Block 0xf38, offset 0x3ce00 + 0x3ce00: 0x6d39a620, 0x3ce01: 0x6d39a820, 0x3ce02: 0x6d39aa20, 0x3ce03: 0x6d39ac20, + 0x3ce04: 0x6d39ae20, 0x3ce05: 0x6d39b020, 0x3ce06: 0x6d39b220, 0x3ce07: 0x6d39b420, + 0x3ce08: 0x6d65c420, 0x3ce09: 0x6d65c620, 0x3ce0a: 0x6d65c820, 0x3ce0b: 0x6d65ca20, + 0x3ce0c: 0x6d65cc20, 0x3ce0d: 0x6d65ce20, 0x3ce0e: 0x6d65d020, 0x3ce0f: 0x6d65d220, + 0x3ce10: 0x6d65d420, 0x3ce11: 0x6d65d620, 0x3ce12: 0x6d65d820, 0x3ce13: 0x6d65da20, + 0x3ce14: 0x6d65dc20, 0x3ce15: 0x6d65de20, 0x3ce16: 0x6d65e020, 0x3ce17: 0x6d65e220, + 0x3ce18: 0x6d65e420, 0x3ce19: 0x6d65e620, 0x3ce1a: 0x6d65e820, 0x3ce1b: 0x6d65ea20, + 0x3ce1c: 0x6d65ec20, 0x3ce1d: 0x6d8fb220, 0x3ce1e: 0x6d8fb420, 0x3ce1f: 0x6d8fb620, + 0x3ce20: 0x6d8fb820, 0x3ce21: 0x6d8fba20, 0x3ce22: 0x6d8fbc20, 0x3ce23: 0x6d8fbe20, + 0x3ce24: 0x6d8fc020, 0x3ce25: 0x6db37420, 0x3ce26: 0x6db37620, 0x3ce27: 0x6db37820, + 0x3ce28: 0x6db37a20, 0x3ce29: 0x6db37c20, 0x3ce2a: 0x6db37e20, 0x3ce2b: 0x6db38020, + 0x3ce2c: 0x6db38220, 0x3ce2d: 0x6db38420, 0x3ce2e: 0x6db38620, 0x3ce2f: 0x6db38820, + 0x3ce30: 0x6db38a20, 0x3ce31: 0x6db38c20, 0x3ce32: 0x6db38e20, 0x3ce33: 0x6db39020, + 0x3ce34: 0x6db39220, 0x3ce35: 0x6dd27620, 0x3ce36: 0x6dd27820, 0x3ce37: 0x6dd27a20, + 0x3ce38: 0x6dd27c20, 0x3ce39: 0x6dd27e20, 0x3ce3a: 0x6dd28020, 0x3ce3b: 0x6dd28220, + 0x3ce3c: 0x6dd28420, 0x3ce3d: 0x6dd28620, 0x3ce3e: 0x6dd28820, 0x3ce3f: 0x6dd28a20, + // Block 0xf39, offset 0x3ce40 + 0x3ce40: 0x6dd28c20, 0x3ce41: 0x6dd28e20, 0x3ce42: 0x6dd29020, 0x3ce43: 0x6dd29220, + 0x3ce44: 0x6dd29420, 0x3ce45: 0x6debc020, 0x3ce46: 0x6debc220, 0x3ce47: 0x6debc420, + 0x3ce48: 0x6debc620, 0x3ce49: 0x6debc820, 0x3ce4a: 0x6debca20, 0x3ce4b: 0x6debcc20, + 0x3ce4c: 0x6e014c20, 0x3ce4d: 0x6e014e20, 0x3ce4e: 0x6e015020, 0x3ce4f: 0x6e015220, + 0x3ce50: 0x6e133820, 0x3ce51: 0x6e133a20, 0x3ce52: 0x6e133c20, 0x3ce53: 0x6e133e20, + 0x3ce54: 0x6e211820, 0x3ce55: 0x6e211a20, 0x3ce56: 0x6e211c20, 0x3ce57: 0x6e2bd420, + 0x3ce58: 0x6e342020, 0x3ce59: 0x6e342220, 0x3ce5a: 0x6e342420, 0x3ce5b: 0x6e3e0e20, + 0x3ce5c: 0x6e3e1020, 0x3ce5d: 0x6c5f9e20, 0x3ce5e: 0x6c5fa020, 0x3ce5f: 0x6c84dc20, + 0x3ce60: 0x6cdd6220, 0x3ce61: 0x6cdd6420, 0x3ce62: 0x6d39da20, 0x3ce63: 0x6db3b220, + 0x3ce64: 0x6c403420, 0x3ce65: 0x6c5ff220, 0x3ce66: 0x6c5ff420, 0x3ce67: 0x6c857820, + 0x3ce68: 0x6c857a20, 0x3ce69: 0x6c857c20, 0x3ce6a: 0x6c857e20, 0x3ce6b: 0x6c858020, + 0x3ce6c: 0x6caf0c20, 0x3ce6d: 0x6caf0e20, 0x3ce6e: 0x6caf1020, 0x3ce6f: 0x6caf1220, + 0x3ce70: 0x6caf1420, 0x3ce71: 0x6caf1620, 0x3ce72: 0x6caf1820, 0x3ce73: 0x6cde3020, + 0x3ce74: 0x6cde3220, 0x3ce75: 0x6cde3420, 0x3ce76: 0x6cde3620, 0x3ce77: 0x6cde3820, + 0x3ce78: 0x6cde3a20, 0x3ce79: 0x6cde3c20, 0x3ce7a: 0x6cde3e20, 0x3ce7b: 0x6cde4020, + 0x3ce7c: 0x6cde4220, 0x3ce7d: 0x6d0cb020, 0x3ce7e: 0x6d0cb220, 0x3ce7f: 0x6d0cb420, + // Block 0xf3a, offset 0x3ce80 + 0x3ce80: 0x6d0cb620, 0x3ce81: 0x6d0cb820, 0x3ce82: 0x6d3afc20, 0x3ce83: 0x6d3afe20, + 0x3ce84: 0x6d3b0020, 0x3ce85: 0x6d3b0220, 0x3ce86: 0x6d3b0420, 0x3ce87: 0x6d3b0620, + 0x3ce88: 0x6d3b0820, 0x3ce89: 0x6d3b0a20, 0x3ce8a: 0x6d672e20, 0x3ce8b: 0x6d673020, + 0x3ce8c: 0x6d673220, 0x3ce8d: 0x6d673420, 0x3ce8e: 0x6d673620, 0x3ce8f: 0x6d910820, + 0x3ce90: 0x6d910a20, 0x3ce91: 0x6d910c20, 0x3ce92: 0x6d910e20, 0x3ce93: 0x6d911020, + 0x3ce94: 0x6d911220, 0x3ce95: 0x6d911420, 0x3ce96: 0x6db4be20, 0x3ce97: 0x6db4c020, + 0x3ce98: 0x6db4c220, 0x3ce99: 0x6db4c420, 0x3ce9a: 0x6dd38e20, 0x3ce9b: 0x6dd39020, + 0x3ce9c: 0x6dd39220, 0x3ce9d: 0x6dd39420, 0x3ce9e: 0x6dd39620, 0x3ce9f: 0x6dec9c20, + 0x3cea0: 0x6dec9e20, 0x3cea1: 0x6deca020, 0x3cea2: 0x6deca220, 0x3cea3: 0x6e01d420, + 0x3cea4: 0x6e01d620, 0x3cea5: 0x6e01d820, 0x3cea6: 0x6e13c220, 0x3cea7: 0x6e13c420, + 0x3cea8: 0x6e218420, 0x3cea9: 0x6e447620, 0x3ceaa: 0x6c859220, 0x3ceab: 0x6caf2420, + 0x3ceac: 0x6db4ce20, 0x3cead: 0x6caf3220, 0x3ceae: 0x6cde6820, 0x3ceaf: 0x6d675420, + 0x3ceb0: 0x6dd3a820, 0x3ceb1: 0x6e2c2020, 0x3ceb2: 0x6c605e20, 0x3ceb3: 0x6c606020, + 0x3ceb4: 0x6c606220, 0x3ceb5: 0x6c861c20, 0x3ceb6: 0x6c861e20, 0x3ceb7: 0x6c862020, + 0x3ceb8: 0x6cafd820, 0x3ceb9: 0x6cafda20, 0x3ceba: 0x6cafdc20, 0x3cebb: 0x6cafde20, + 0x3cebc: 0x6cafe020, 0x3cebd: 0x6cdef420, 0x3cebe: 0x6d0d6820, 0x3cebf: 0x6d0d6a20, + // Block 0xf3b, offset 0x3cec0 + 0x3cec0: 0x6d0d6c20, 0x3cec1: 0x6d0d6e20, 0x3cec2: 0x6d0d7020, 0x3cec3: 0x6d0d7220, + 0x3cec4: 0x6d0d7420, 0x3cec5: 0x6d3bd820, 0x3cec6: 0x6d3bda20, 0x3cec7: 0x6d67ec20, + 0x3cec8: 0x6d67ee20, 0x3cec9: 0x6d67f020, 0x3ceca: 0x6d91ae20, 0x3cecb: 0x6d91b020, + 0x3cecc: 0x6d91b220, 0x3cecd: 0x6d91b420, 0x3cece: 0x6d91b620, 0x3cecf: 0x6d91b820, + 0x3ced0: 0x6db57820, 0x3ced1: 0x6db57a20, 0x3ced2: 0x6db57c20, 0x3ced3: 0x6dd40a20, + 0x3ced4: 0x6dd40c20, 0x3ced5: 0x6decfc20, 0x3ced6: 0x6e021620, 0x3ced7: 0x6e21a020, + 0x3ced8: 0x6e2c3420, 0x3ced9: 0x6e2c3620, 0x3ceda: 0x6cafec20, 0x3cedb: 0x6d91c020, + 0x3cedc: 0x6c863c20, 0x3cedd: 0x6cdf3220, 0x3cede: 0x6d0daa20, 0x3cedf: 0x6d3c1a20, + 0x3cee0: 0x6d3c1c20, 0x3cee1: 0x6d683020, 0x3cee2: 0x6d91fe20, 0x3cee3: 0x6d920020, + 0x3cee4: 0x6dd43420, 0x3cee5: 0x6e022c20, 0x3cee6: 0x6e3a3220, 0x3cee7: 0x6e3a3420, + 0x3cee8: 0x6c607820, 0x3cee9: 0x6c607a20, 0x3ceea: 0x6c864020, 0x3ceeb: 0x6d0dae20, + 0x3ceec: 0x6d683820, 0x3ceed: 0x6db5a620, 0x3ceee: 0x6d0dd820, 0x3ceef: 0x6d0dda20, + 0x3cef0: 0x6d922e20, 0x3cef1: 0x6d923020, 0x3cef2: 0x6c868c20, 0x3cef3: 0x6c868e20, + 0x3cef4: 0x6cb10620, 0x3cef5: 0x6cb10820, 0x3cef6: 0x6ce02420, 0x3cef7: 0x6ce02620, + 0x3cef8: 0x6ce02820, 0x3cef9: 0x6ce02a20, 0x3cefa: 0x6d0eae20, 0x3cefb: 0x6d0eb020, + 0x3cefc: 0x6d3d0020, 0x3cefd: 0x6d3d0220, 0x3cefe: 0x6d3d0420, 0x3ceff: 0x6d697220, + // Block 0xf3c, offset 0x3cf00 + 0x3cf00: 0x6d697420, 0x3cf01: 0x6d92f220, 0x3cf02: 0x6d92f420, 0x3cf03: 0x6d92f620, + 0x3cf04: 0x6d92f820, 0x3cf05: 0x6d92fa20, 0x3cf06: 0x6db69220, 0x3cf07: 0x6db69420, + 0x3cf08: 0x6db69620, 0x3cf09: 0x6dd4f220, 0x3cf0a: 0x6dd4f420, 0x3cf0b: 0x6dd4f620, + 0x3cf0c: 0x6dd4f820, 0x3cf0d: 0x6dedda20, 0x3cf0e: 0x6deddc20, 0x3cf0f: 0x6dedde20, + 0x3cf10: 0x6e02b220, 0x3cf11: 0x6e02b420, 0x3cf12: 0x6e146a20, 0x3cf13: 0x6e2c7420, + 0x3cf14: 0x6e34a220, 0x3cf15: 0x6e34a420, 0x3cf16: 0x6e34a620, 0x3cf17: 0x6e3e4220, + 0x3cf18: 0x6e431c20, 0x3cf19: 0x6c0a7c20, 0x3cf1a: 0x6c14fa20, 0x3cf1b: 0x6c14fc20, + 0x3cf1c: 0x6c26d820, 0x3cf1d: 0x6c26da20, 0x3cf1e: 0x6c26dc20, 0x3cf1f: 0x6c26de20, + 0x3cf20: 0x6c26e020, 0x3cf21: 0x6c26e220, 0x3cf22: 0x6c40ac20, 0x3cf23: 0x6c40ae20, + 0x3cf24: 0x6c40b020, 0x3cf25: 0x6c40b220, 0x3cf26: 0x6c40b420, 0x3cf27: 0x6c60b620, + 0x3cf28: 0x6c60b820, 0x3cf29: 0x6c60ba20, 0x3cf2a: 0x6c60bc20, 0x3cf2b: 0x6c86b820, + 0x3cf2c: 0x6c86ba20, 0x3cf2d: 0x6c86bc20, 0x3cf2e: 0x6c86be20, 0x3cf2f: 0x6cb13420, + 0x3cf30: 0x6cb13620, 0x3cf31: 0x6cb13820, 0x3cf32: 0x6cb13a20, 0x3cf33: 0x6cb13c20, + 0x3cf34: 0x6cb13e20, 0x3cf35: 0x6ce03e20, 0x3cf36: 0x6ce04020, 0x3cf37: 0x6ce04220, + 0x3cf38: 0x6ce04420, 0x3cf39: 0x6d0ebe20, 0x3cf3a: 0x6d0ec020, 0x3cf3b: 0x6d3d1220, + 0x3cf3c: 0x6d3d1420, 0x3cf3d: 0x6d698220, 0x3cf3e: 0x6d92fe20, 0x3cf3f: 0x6db69c20, + // Block 0xf3d, offset 0x3cf40 + 0x3cf40: 0x6c60c020, 0x3cf41: 0x6cb14e20, 0x3cf42: 0x6d699420, 0x3cf43: 0x6d69b220, + 0x3cf44: 0x6dd51220, 0x3cf45: 0x6c40bc20, 0x3cf46: 0x6cb17620, 0x3cf47: 0x6d3d4a20, + 0x3cf48: 0x6d3d4c20, 0x3cf49: 0x6d933e20, 0x3cf4a: 0x6c86ee20, 0x3cf4b: 0x6d0f2420, + 0x3cf4c: 0x6d936620, 0x3cf4d: 0x6db70220, 0x3cf4e: 0x6c60da20, 0x3cf4f: 0x6c870a20, + 0x3cf50: 0x6c870c20, 0x3cf51: 0x6c870e20, 0x3cf52: 0x6cb1d820, 0x3cf53: 0x6cb1da20, + 0x3cf54: 0x6ce11420, 0x3cf55: 0x6ce11620, 0x3cf56: 0x6d0f8e20, 0x3cf57: 0x6d3dbc20, + 0x3cf58: 0x6d3dbe20, 0x3cf59: 0x6d3dc020, 0x3cf5a: 0x6d6a6820, 0x3cf5b: 0x6d6a6a20, + 0x3cf5c: 0x6d93b820, 0x3cf5d: 0x6d93ba20, 0x3cf5e: 0x6d93bc20, 0x3cf5f: 0x6db73c20, + 0x3cf60: 0x6db73e20, 0x3cf61: 0x6dd59220, 0x3cf62: 0x6dee7a20, 0x3cf63: 0x6e225420, + 0x3cf64: 0x6e225620, 0x3cf65: 0x6e2ca420, 0x3cf66: 0x6c60f620, 0x3cf67: 0x6c60f820, + 0x3cf68: 0x6cb1e620, 0x3cf69: 0x6ce13420, 0x3cf6a: 0x6d0f9620, 0x3cf6b: 0x6d93ca20, + 0x3cf6c: 0x6dd59420, 0x3cf6d: 0x6ce13c20, 0x3cf6e: 0x6d0fa620, 0x3cf6f: 0x6d6a8020, + 0x3cf70: 0x6dd59a20, 0x3cf71: 0x6cb23c20, 0x3cf72: 0x6ce19a20, 0x3cf73: 0x6d100420, + 0x3cf74: 0x6d100620, 0x3cf75: 0x6d3e3420, 0x3cf76: 0x6d3e3620, 0x3cf77: 0x6d3e3820, + 0x3cf78: 0x6d6ad420, 0x3cf79: 0x6d6ad620, 0x3cf7a: 0x6d6ad820, 0x3cf7b: 0x6d942e20, + 0x3cf7c: 0x6d943020, 0x3cf7d: 0x6db78220, 0x3cf7e: 0x6dd5d820, 0x3cf7f: 0x6dd5da20, + // Block 0xf3e, offset 0x3cf80 + 0x3cf80: 0x6c877e20, 0x3cf81: 0x6cb2a420, 0x3cf82: 0x6cb2a620, 0x3cf83: 0x6cb2a820, + 0x3cf84: 0x6ce23420, 0x3cf85: 0x6ce23620, 0x3cf86: 0x6ce23820, 0x3cf87: 0x6d10a620, + 0x3cf88: 0x6d10a820, 0x3cf89: 0x6d10aa20, 0x3cf8a: 0x6d10ac20, 0x3cf8b: 0x6d10ae20, + 0x3cf8c: 0x6d3edc20, 0x3cf8d: 0x6d3ede20, 0x3cf8e: 0x6d3ee020, 0x3cf8f: 0x6d6b8e20, + 0x3cf90: 0x6d6b9020, 0x3cf91: 0x6d6b9220, 0x3cf92: 0x6d6b9420, 0x3cf93: 0x6d6b9620, + 0x3cf94: 0x6d94d820, 0x3cf95: 0x6d94da20, 0x3cf96: 0x6d94dc20, 0x3cf97: 0x6d94de20, + 0x3cf98: 0x6d94e020, 0x3cf99: 0x6db81020, 0x3cf9a: 0x6db81220, 0x3cf9b: 0x6db81420, + 0x3cf9c: 0x6dd6a220, 0x3cf9d: 0x6dd6a420, 0x3cf9e: 0x6dd6a620, 0x3cf9f: 0x6dd6a820, + 0x3cfa0: 0x6def6020, 0x3cfa1: 0x6def6220, 0x3cfa2: 0x6def6420, 0x3cfa3: 0x6e039220, + 0x3cfa4: 0x6e039420, 0x3cfa5: 0x6e039620, 0x3cfa6: 0x6e039820, 0x3cfa7: 0x6e150220, + 0x3cfa8: 0x6e150420, 0x3cfa9: 0x6e2ce620, 0x3cfaa: 0x6d10dc20, 0x3cfab: 0x6d10de20, + 0x3cfac: 0x6d3f0020, 0x3cfad: 0x6db83220, 0x3cfae: 0x6db83420, 0x3cfaf: 0x6dd6be20, + 0x3cfb0: 0x6def9020, 0x3cfb1: 0x6e03aa20, 0x3cfb2: 0x6c87b620, 0x3cfb3: 0x6cb33620, + 0x3cfb4: 0x6ce2d420, 0x3cfb5: 0x6ce2d620, 0x3cfb6: 0x6d3f5820, 0x3cfb7: 0x6d3f5a20, + 0x3cfb8: 0x6d3f5c20, 0x3cfb9: 0x6d6c4c20, 0x3cfba: 0x6d956c20, 0x3cfbb: 0x6d956e20, + 0x3cfbc: 0x6db89620, 0x3cfbd: 0x6db89820, 0x3cfbe: 0x6dd71220, 0x3cfbf: 0x6dd71420, + // Block 0xf3f, offset 0x3cfc0 + 0x3cfc0: 0x6defc620, 0x3cfc1: 0x6e03e820, 0x3cfc2: 0x6e153420, 0x3cfc3: 0x6e469220, + 0x3cfc4: 0x6c271620, 0x3cfc5: 0x6c271820, 0x3cfc6: 0x6c271a20, 0x3cfc7: 0x6c40f420, + 0x3cfc8: 0x6c615e20, 0x3cfc9: 0x6c616020, 0x3cfca: 0x6c616220, 0x3cfcb: 0x6c87cc20, + 0x3cfcc: 0x6c87ce20, 0x3cfcd: 0x6cb34020, 0x3cfce: 0x6ce2e820, 0x3cfcf: 0x6ce2ea20, + 0x3cfd0: 0x6ce2ec20, 0x3cfd1: 0x6ce2ee20, 0x3cfd2: 0x6d114a20, 0x3cfd3: 0x6c87d020, + 0x3cfd4: 0x6d3f6420, 0x3cfd5: 0x6d6c5020, 0x3cfd6: 0x6d6c5220, 0x3cfd7: 0x6d957620, + 0x3cfd8: 0x6db89a20, 0x3cfd9: 0x6defc820, 0x3cfda: 0x6ce2f820, 0x3cfdb: 0x6d115a20, + 0x3cfdc: 0x6d115c20, 0x3cfdd: 0x6e03f620, 0x3cfde: 0x6c052020, 0x3cfdf: 0x6c153820, + 0x3cfe0: 0x6c278620, 0x3cfe1: 0x6c278820, 0x3cfe2: 0x6c417620, 0x3cfe3: 0x6c417820, + 0x3cfe4: 0x6c417a20, 0x3cfe5: 0x6c61d020, 0x3cfe6: 0x6c886020, 0x3cfe7: 0x6c886220, + 0x3cfe8: 0x6c886420, 0x3cfe9: 0x6c886620, 0x3cfea: 0x6c886820, 0x3cfeb: 0x6cb3ec20, + 0x3cfec: 0x6cb3ee20, 0x3cfed: 0x6cb3f020, 0x3cfee: 0x6cb3f220, 0x3cfef: 0x6cb3f420, + 0x3cff0: 0x6cb3f620, 0x3cff1: 0x6cb3f820, 0x3cff2: 0x6cb3fa20, 0x3cff3: 0x6ce3ac20, + 0x3cff4: 0x6ce3ae20, 0x3cff5: 0x6ce3b020, 0x3cff6: 0x6ce3b220, 0x3cff7: 0x6ce3b420, + 0x3cff8: 0x6ce3b620, 0x3cff9: 0x6ce3b820, 0x3cffa: 0x6d11f420, 0x3cffb: 0x6d11f620, + 0x3cffc: 0x6d11f820, 0x3cffd: 0x6d11fa20, 0x3cffe: 0x6d3ff820, 0x3cfff: 0x6d3ffa20, + // Block 0xf40, offset 0x3d000 + 0x3d000: 0x6d3ffc20, 0x3d001: 0x6d3ffe20, 0x3d002: 0x6d400020, 0x3d003: 0x6d400220, + 0x3d004: 0x6d6cea20, 0x3d005: 0x6d6cec20, 0x3d006: 0x6d6cee20, 0x3d007: 0x6d6cf020, + 0x3d008: 0x6d6cf220, 0x3d009: 0x6d6cf420, 0x3d00a: 0x6d6cf620, 0x3d00b: 0x6d95f620, + 0x3d00c: 0x6db8fc20, 0x3d00d: 0x6db8fe20, 0x3d00e: 0x6db90020, 0x3d00f: 0x6db90220, + 0x3d010: 0x6dd75220, 0x3d011: 0x6dd75420, 0x3d012: 0x6e041e20, 0x3d013: 0x6e042020, + 0x3d014: 0x6e042220, 0x3d015: 0x6e042420, 0x3d016: 0x6e154c20, 0x3d017: 0x6c0aa820, + 0x3d018: 0x6c158820, 0x3d019: 0x6c158a20, 0x3d01a: 0x6c27e620, 0x3d01b: 0x6c27e820, + 0x3d01c: 0x6c41d820, 0x3d01d: 0x6c624e20, 0x3d01e: 0x6c625020, 0x3d01f: 0x6c625220, + 0x3d020: 0x6c88e220, 0x3d021: 0x6c88e420, 0x3d022: 0x6c88e620, 0x3d023: 0x6cb46e20, + 0x3d024: 0x6cb47020, 0x3d025: 0x6ce41a20, 0x3d026: 0x6ce41c20, 0x3d027: 0x6d126420, + 0x3d028: 0x6d126620, 0x3d029: 0x6d126820, 0x3d02a: 0x6d6d4420, 0x3d02b: 0x6d6d4620, + 0x3d02c: 0x6d962e20, 0x3d02d: 0x6db93220, 0x3d02e: 0x6dd77a20, 0x3d02f: 0x6dd77c20, + 0x3d030: 0x6dd77e20, 0x3d031: 0x6e043220, 0x3d032: 0x6e433620, 0x3d033: 0x6c890420, + 0x3d034: 0x6d12b620, 0x3d035: 0x6d12b820, 0x3d036: 0x6d40c420, 0x3d037: 0x6d40c620, + 0x3d038: 0x6d40c820, 0x3d039: 0x6d6da420, 0x3d03a: 0x6db98e20, 0x3d03b: 0x6dd7ca20, + 0x3d03c: 0x6df05020, 0x3d03d: 0x6df05220, 0x3d03e: 0x6e157620, 0x3d03f: 0x6e2d3820, + // Block 0xf41, offset 0x3d040 + 0x3d040: 0x6ce46e20, 0x3d041: 0x6cb4d220, 0x3d042: 0x6ce47a20, 0x3d043: 0x6d40d220, + 0x3d044: 0x6db99e20, 0x3d045: 0x6df05420, 0x3d046: 0x6cb51a20, 0x3d047: 0x6cb51c20, + 0x3d048: 0x6cb51e20, 0x3d049: 0x6cb52020, 0x3d04a: 0x6ce51a20, 0x3d04b: 0x6ce51c20, + 0x3d04c: 0x6ce51e20, 0x3d04d: 0x6ce52020, 0x3d04e: 0x6ce52220, 0x3d04f: 0x6d139220, + 0x3d050: 0x6d139420, 0x3d051: 0x6d139620, 0x3d052: 0x6d139820, 0x3d053: 0x6d139a20, + 0x3d054: 0x6d139c20, 0x3d055: 0x6d41ac20, 0x3d056: 0x6d41ae20, 0x3d057: 0x6d41b020, + 0x3d058: 0x6d41b220, 0x3d059: 0x6d41b420, 0x3d05a: 0x6d41b620, 0x3d05b: 0x6d41b820, + 0x3d05c: 0x6d41ba20, 0x3d05d: 0x6d6ebe20, 0x3d05e: 0x6d6ec020, 0x3d05f: 0x6d6ec220, + 0x3d060: 0x6d6ec420, 0x3d061: 0x6d6ec620, 0x3d062: 0x6d6ec820, 0x3d063: 0x6d6eca20, + 0x3d064: 0x6d6ecc20, 0x3d065: 0x6d6ece20, 0x3d066: 0x6d97d820, 0x3d067: 0x6d97da20, + 0x3d068: 0x6d97dc20, 0x3d069: 0x6d97de20, 0x3d06a: 0x6d97e020, 0x3d06b: 0x6d97e220, + 0x3d06c: 0x6d97e420, 0x3d06d: 0x6d97e620, 0x3d06e: 0x6d97e820, 0x3d06f: 0x6d97ea20, + 0x3d070: 0x6dbadc20, 0x3d071: 0x6dbade20, 0x3d072: 0x6dbae020, 0x3d073: 0x6dbae220, + 0x3d074: 0x6dbae420, 0x3d075: 0x6dbae620, 0x3d076: 0x6dbae820, 0x3d077: 0x6dbaea20, + 0x3d078: 0x6dd8ea20, 0x3d079: 0x6dd8ec20, 0x3d07a: 0x6dd8ee20, 0x3d07b: 0x6dd8f020, + 0x3d07c: 0x6dd8f220, 0x3d07d: 0x6dd8f420, 0x3d07e: 0x6dd8f620, 0x3d07f: 0x6df15420, + // Block 0xf42, offset 0x3d080 + 0x3d080: 0x6df15620, 0x3d081: 0x6df15820, 0x3d082: 0x6df15a20, 0x3d083: 0x6df15c20, + 0x3d084: 0x6e057220, 0x3d085: 0x6e057420, 0x3d086: 0x6e057620, 0x3d087: 0x6e057820, + 0x3d088: 0x6e057a20, 0x3d089: 0x6e057c20, 0x3d08a: 0x6e057e20, 0x3d08b: 0x6e058020, + 0x3d08c: 0x6e058220, 0x3d08d: 0x6e058420, 0x3d08e: 0x6e058620, 0x3d08f: 0x6e164020, + 0x3d090: 0x6e164220, 0x3d091: 0x6e164420, 0x3d092: 0x6e164620, 0x3d093: 0x6e164820, + 0x3d094: 0x6e164a20, 0x3d095: 0x6e164c20, 0x3d096: 0x6e238a20, 0x3d097: 0x6e238c20, + 0x3d098: 0x6e238e20, 0x3d099: 0x6e239020, 0x3d09a: 0x6e239220, 0x3d09b: 0x6e2db420, + 0x3d09c: 0x6e2db620, 0x3d09d: 0x6e356020, 0x3d09e: 0x6e356220, 0x3d09f: 0x6e356420, + 0x3d0a0: 0x6e3ae220, 0x3d0a1: 0x6e3ae420, 0x3d0a2: 0x6e3ae620, 0x3d0a3: 0x6e3eae20, + 0x3d0a4: 0x6e415e20, 0x3d0a5: 0x6c27fc20, 0x3d0a6: 0x6c41fa20, 0x3d0a7: 0x6c629c20, + 0x3d0a8: 0x6c629e20, 0x3d0a9: 0x6c62a020, 0x3d0aa: 0x6c62a220, 0x3d0ab: 0x6c62a420, + 0x3d0ac: 0x6c897a20, 0x3d0ad: 0x6c897c20, 0x3d0ae: 0x6c897e20, 0x3d0af: 0x6cb57420, + 0x3d0b0: 0x6cb57620, 0x3d0b1: 0x6cb57820, 0x3d0b2: 0x6cb57a20, 0x3d0b3: 0x6cb57c20, + 0x3d0b4: 0x6cb57e20, 0x3d0b5: 0x6ce56a20, 0x3d0b6: 0x6ce56c20, 0x3d0b7: 0x6ce56e20, + 0x3d0b8: 0x6d13e420, 0x3d0b9: 0x6d13e620, 0x3d0ba: 0x6d13e820, 0x3d0bb: 0x6d13ea20, + 0x3d0bc: 0x6d13ec20, 0x3d0bd: 0x6d13ee20, 0x3d0be: 0x6d13f020, 0x3d0bf: 0x6d13f220, + // Block 0xf43, offset 0x3d0c0 + 0x3d0c0: 0x6d41ee20, 0x3d0c1: 0x6d41f020, 0x3d0c2: 0x6d41f220, 0x3d0c3: 0x6d41f420, + 0x3d0c4: 0x6d41f620, 0x3d0c5: 0x6d6ef620, 0x3d0c6: 0x6d6ef820, 0x3d0c7: 0x6d6efa20, + 0x3d0c8: 0x6d6efc20, 0x3d0c9: 0x6d980820, 0x3d0ca: 0x6d980a20, 0x3d0cb: 0x6dbb0c20, + 0x3d0cc: 0x6dbb0e20, 0x3d0cd: 0x6dbb1020, 0x3d0ce: 0x6dbb1220, 0x3d0cf: 0x6dbb1420, + 0x3d0d0: 0x6dd90c20, 0x3d0d1: 0x6dd90e20, 0x3d0d2: 0x6df16020, 0x3d0d3: 0x6e164e20, + 0x3d0d4: 0x6e2db820, 0x3d0d5: 0x6e356620, 0x3d0d6: 0x6d141620, 0x3d0d7: 0x6d6f1a20, + 0x3d0d8: 0x6c62b220, 0x3d0d9: 0x6cb5c220, 0x3d0da: 0x6ce5e620, 0x3d0db: 0x6ce5e820, + 0x3d0dc: 0x6d146420, 0x3d0dd: 0x6d146620, 0x3d0de: 0x6d146820, 0x3d0df: 0x6d146a20, + 0x3d0e0: 0x6d146c20, 0x3d0e1: 0x6d6f7a20, 0x3d0e2: 0x6d6f7c20, 0x3d0e3: 0x6d6f7e20, + 0x3d0e4: 0x6d6f8020, 0x3d0e5: 0x6d988820, 0x3d0e6: 0x6d988a20, 0x3d0e7: 0x6d988c20, + 0x3d0e8: 0x6dbb8420, 0x3d0e9: 0x6df1a020, 0x3d0ea: 0x6e168e20, 0x3d0eb: 0x6e3af820, + 0x3d0ec: 0x6c15a020, 0x3d0ed: 0x6c281820, 0x3d0ee: 0x6c281a20, 0x3d0ef: 0x6c281c20, + 0x3d0f0: 0x6c420c20, 0x3d0f1: 0x6c62ca20, 0x3d0f2: 0x6c899e20, 0x3d0f3: 0x6c89a020, + 0x3d0f4: 0x6cb5d820, 0x3d0f5: 0x6d147a20, 0x3d0f6: 0x6d147c20, 0x3d0f7: 0x6d426620, + 0x3d0f8: 0x6d426820, 0x3d0f9: 0x6dbb8a20, 0x3d0fa: 0x6c0ac020, 0x3d0fb: 0x6c15d020, + 0x3d0fc: 0x6c287820, 0x3d0fd: 0x6c287a20, 0x3d0fe: 0x6c426c20, 0x3d0ff: 0x6c426e20, + // Block 0xf44, offset 0x3d100 + 0x3d100: 0x6c427020, 0x3d101: 0x6c632620, 0x3d102: 0x6c632820, 0x3d103: 0x6c632a20, + 0x3d104: 0x6c8a2c20, 0x3d105: 0x6c8a2e20, 0x3d106: 0x6cb64e20, 0x3d107: 0x6cb65020, + 0x3d108: 0x6cb65220, 0x3d109: 0x6cb65420, 0x3d10a: 0x6cb65620, 0x3d10b: 0x6cb65820, + 0x3d10c: 0x6cb65a20, 0x3d10d: 0x6cb65c20, 0x3d10e: 0x6ce68620, 0x3d10f: 0x6ce68820, + 0x3d110: 0x6d14d620, 0x3d111: 0x6d14d820, 0x3d112: 0x6d14da20, 0x3d113: 0x6d14dc20, + 0x3d114: 0x6d42c420, 0x3d115: 0x6d42c620, 0x3d116: 0x6d42c820, 0x3d117: 0x6d42ca20, + 0x3d118: 0x6dd98420, 0x3d119: 0x6d6fca20, 0x3d11a: 0x6ce6bc20, 0x3d11b: 0x6d430a20, + 0x3d11c: 0x6dd9ba20, 0x3d11d: 0x6c8a4620, 0x3d11e: 0x6cb69620, 0x3d11f: 0x6ce6f220, + 0x3d120: 0x6ce6f420, 0x3d121: 0x6d155020, 0x3d122: 0x6d155220, 0x3d123: 0x6d434c20, + 0x3d124: 0x6d434e20, 0x3d125: 0x6d704a20, 0x3d126: 0x6d704c20, 0x3d127: 0x6d997620, + 0x3d128: 0x6d997820, 0x3d129: 0x6dbc4e20, 0x3d12a: 0x6dbc5020, 0x3d12b: 0x6dda1a20, + 0x3d12c: 0x6df23220, 0x3d12d: 0x6df23420, 0x3d12e: 0x6e066820, 0x3d12f: 0x6e066a20, + 0x3d130: 0x6e066c20, 0x3d131: 0x6e066e20, 0x3d132: 0x6e16ea20, 0x3d133: 0x6e240820, + 0x3d134: 0x6e240a20, 0x3d135: 0x6e35ae20, 0x3d136: 0x6e35b020, 0x3d137: 0x6e44b220, + 0x3d138: 0x6cb69a20, 0x3d139: 0x6d156020, 0x3d13a: 0x6d156220, 0x3d13b: 0x6d998220, + 0x3d13c: 0x6df23820, 0x3d13d: 0x6d435a20, 0x3d13e: 0x6e16ee20, 0x3d13f: 0x6e3b1c20, + // Block 0xf45, offset 0x3d140 + 0x3d140: 0x6d437c20, 0x3d141: 0x6d707020, 0x3d142: 0x6d99a020, 0x3d143: 0x6dda2e20, + 0x3d144: 0x6e170820, 0x3d145: 0x6d43d420, 0x3d146: 0x6d43d620, 0x3d147: 0x6d70be20, + 0x3d148: 0x6d70c020, 0x3d149: 0x6e06d220, 0x3d14a: 0x6e173e20, 0x3d14b: 0x6e244420, + 0x3d14c: 0x6c8a4e20, 0x3d14d: 0x6d15d220, 0x3d14e: 0x6dbce620, 0x3d14f: 0x6e06e820, + 0x3d150: 0x6e35d620, 0x3d151: 0x6c428420, 0x3d152: 0x6c8a5020, 0x3d153: 0x6ce73a20, + 0x3d154: 0x6d43fe20, 0x3d155: 0x6d440020, 0x3d156: 0x6d9a0220, 0x3d157: 0x6d15f020, + 0x3d158: 0x6d441020, 0x3d159: 0x6ddad820, 0x3d15a: 0x6e070420, 0x3d15b: 0x6e176420, + 0x3d15c: 0x6e3b3420, 0x3d15d: 0x6d163c20, 0x3d15e: 0x6d447020, 0x3d15f: 0x6d9aae20, + 0x3d160: 0x6d9ab020, 0x3d161: 0x6dbd6820, 0x3d162: 0x6ddb3a20, 0x3d163: 0x6ddb3c20, + 0x3d164: 0x6df33620, 0x3d165: 0x6e074420, 0x3d166: 0x6e074620, 0x3d167: 0x6e17a820, + 0x3d168: 0x6e248e20, 0x3d169: 0x6e35f020, 0x3d16a: 0x6c634c20, 0x3d16b: 0x6c8a6420, + 0x3d16c: 0x6cb6c820, 0x3d16d: 0x6cb6ca20, 0x3d16e: 0x6ce77020, 0x3d16f: 0x6ce77220, + 0x3d170: 0x6ce77420, 0x3d171: 0x6ce77620, 0x3d172: 0x6d164c20, 0x3d173: 0x6d164e20, + 0x3d174: 0x6d447820, 0x3d175: 0x6d447a20, 0x3d176: 0x6d447c20, 0x3d177: 0x6d716a20, + 0x3d178: 0x6d9aba20, 0x3d179: 0x6dbd6a20, 0x3d17a: 0x6e17ac20, 0x3d17b: 0x6d167e20, + 0x3d17c: 0x6d44b420, 0x3d17d: 0x6dbdb620, 0x3d17e: 0x6ddb8220, 0x3d17f: 0x6ddb8420, + // Block 0xf46, offset 0x3d180 + 0x3d180: 0x6df37220, 0x3d181: 0x6df37420, 0x3d182: 0x6df37620, 0x3d183: 0x6e249e20, + 0x3d184: 0x6e24a020, 0x3d185: 0x6e2e7620, 0x3d186: 0x6e35fe20, 0x3d187: 0x6c428a20, + 0x3d188: 0x6cb6d420, 0x3d189: 0x6ce79620, 0x3d18a: 0x6d168620, 0x3d18b: 0x6dbdba20, + 0x3d18c: 0x6dbdbe20, 0x3d18d: 0x6ce7d620, 0x3d18e: 0x6d16f220, 0x3d18f: 0x6d451820, + 0x3d190: 0x6d451a20, 0x3d191: 0x6d451c20, 0x3d192: 0x6d451e20, 0x3d193: 0x6d71fc20, + 0x3d194: 0x6dbe3c20, 0x3d195: 0x6dbe3e20, 0x3d196: 0x6dbe4020, 0x3d197: 0x6dbe4220, + 0x3d198: 0x6ddbf820, 0x3d199: 0x6df3e020, 0x3d19a: 0x6df3e220, 0x3d19b: 0x6e07c020, + 0x3d19c: 0x6e24d820, 0x3d19d: 0x6e24da20, 0x3d19e: 0x6c15d820, 0x3d19f: 0x6c289420, + 0x3d1a0: 0x6c289620, 0x3d1a1: 0x6c42a820, 0x3d1a2: 0x6c42aa20, 0x3d1a3: 0x6c42ac20, + 0x3d1a4: 0x6c637a20, 0x3d1a5: 0x6c637c20, 0x3d1a6: 0x6c8a8620, 0x3d1a7: 0x6c8a8820, + 0x3d1a8: 0x6c8a8a20, 0x3d1a9: 0x6cb70820, 0x3d1aa: 0x6cb70a20, 0x3d1ab: 0x6ce7e420, + 0x3d1ac: 0x6ce7e620, 0x3d1ad: 0x6ce7e820, 0x3d1ae: 0x6ce7ea20, 0x3d1af: 0x6ce7ec20, + 0x3d1b0: 0x6d170220, 0x3d1b1: 0x6d170420, 0x3d1b2: 0x6d720420, 0x3d1b3: 0x6d720620, + 0x3d1b4: 0x6d9b8e20, 0x3d1b5: 0x6e07c420, 0x3d1b6: 0x6d453220, 0x3d1b7: 0x6d9b9e20, + 0x3d1b8: 0x6dbe4e20, 0x3d1b9: 0x6df3ea20, 0x3d1ba: 0x6e07c820, 0x3d1bb: 0x6e361820, + 0x3d1bc: 0x6d722020, 0x3d1bd: 0x6d722220, 0x3d1be: 0x6dbe6420, 0x3d1bf: 0x6ddc1420, + // Block 0xf47, offset 0x3d1c0 + 0x3d1c0: 0x6e07d420, 0x3d1c1: 0x6e07d620, 0x3d1c2: 0x6e183020, 0x3d1c3: 0x6e24e220, + 0x3d1c4: 0x6e44be20, 0x3d1c5: 0x6d173020, 0x3d1c6: 0x6d45a420, 0x3d1c7: 0x6d45a620, + 0x3d1c8: 0x6d45a820, 0x3d1c9: 0x6d45aa20, 0x3d1ca: 0x6d9c2e20, 0x3d1cb: 0x6ddc9e20, + 0x3d1cc: 0x6ddca020, 0x3d1cd: 0x6ddca220, 0x3d1ce: 0x6ddca420, 0x3d1cf: 0x6df47c20, + 0x3d1d0: 0x6df47e20, 0x3d1d1: 0x6df48020, 0x3d1d2: 0x6e086220, 0x3d1d3: 0x6e086420, + 0x3d1d4: 0x6e086620, 0x3d1d5: 0x6e086820, 0x3d1d6: 0x6e086a20, 0x3d1d7: 0x6e254220, + 0x3d1d8: 0x6e2ee220, 0x3d1d9: 0x6e364020, 0x3d1da: 0x6e41b420, 0x3d1db: 0x6c15e020, + 0x3d1dc: 0x6c28a220, 0x3d1dd: 0x6c28a420, 0x3d1de: 0x6c42d620, 0x3d1df: 0x6c42d820, + 0x3d1e0: 0x6c63a620, 0x3d1e1: 0x6c63a820, 0x3d1e2: 0x6c8aa820, 0x3d1e3: 0x6c8aaa20, + 0x3d1e4: 0x6c8aac20, 0x3d1e5: 0x6cb72820, 0x3d1e6: 0x6cb72a20, 0x3d1e7: 0x6cb72c20, + 0x3d1e8: 0x6ce82620, 0x3d1e9: 0x6ce82820, 0x3d1ea: 0x6d174220, 0x3d1eb: 0x6d174420, + 0x3d1ec: 0x6d174620, 0x3d1ed: 0x6d45b220, 0x3d1ee: 0x6d45b420, 0x3d1ef: 0x6d72b020, + 0x3d1f0: 0x6d9c3220, 0x3d1f1: 0x6e189020, 0x3d1f2: 0x6d72e020, 0x3d1f3: 0x6ddcd620, + 0x3d1f4: 0x6ddcd820, 0x3d1f5: 0x6ce84020, 0x3d1f6: 0x6d72ec20, 0x3d1f7: 0x6d9c7820, + 0x3d1f8: 0x6cb73820, 0x3d1f9: 0x6d178820, 0x3d1fa: 0x6d178a20, 0x3d1fb: 0x6d463a20, + 0x3d1fc: 0x6d734220, 0x3d1fd: 0x6d9cbe20, 0x3d1fe: 0x6dbf5020, 0x3d1ff: 0x6dbf5220, + // Block 0xf48, offset 0x3d200 + 0x3d200: 0x6ddd3420, 0x3d201: 0x6ddd3620, 0x3d202: 0x6df4f820, 0x3d203: 0x6e18e620, + 0x3d204: 0x6d464c20, 0x3d205: 0x6d735220, 0x3d206: 0x6e190420, 0x3d207: 0x6e439e20, + 0x3d208: 0x6cb74220, 0x3d209: 0x6d17c220, 0x3d20a: 0x6d738420, 0x3d20b: 0x6d9d0c20, + 0x3d20c: 0x6dbf8c20, 0x3d20d: 0x6dbf8e20, 0x3d20e: 0x6e193220, 0x3d20f: 0x6d17de20, + 0x3d210: 0x6d46b420, 0x3d211: 0x6d740620, 0x3d212: 0x6d740820, 0x3d213: 0x6d9da220, + 0x3d214: 0x6d9da420, 0x3d215: 0x6d9da620, 0x3d216: 0x6d9da820, 0x3d217: 0x6d9daa20, + 0x3d218: 0x6dc02a20, 0x3d219: 0x6dc02c20, 0x3d21a: 0x6dc02e20, 0x3d21b: 0x6dc03020, + 0x3d21c: 0x6dc03220, 0x3d21d: 0x6dc03420, 0x3d21e: 0x6dc03620, 0x3d21f: 0x6dc03820, + 0x3d220: 0x6dde2620, 0x3d221: 0x6dde2820, 0x3d222: 0x6dde2a20, 0x3d223: 0x6dde2c20, + 0x3d224: 0x6df61420, 0x3d225: 0x6df61620, 0x3d226: 0x6df61820, 0x3d227: 0x6df61a20, + 0x3d228: 0x6e09e020, 0x3d229: 0x6e09e220, 0x3d22a: 0x6e09e420, 0x3d22b: 0x6e19e620, + 0x3d22c: 0x6e19e820, 0x3d22d: 0x6e19ea20, 0x3d22e: 0x6e19ec20, 0x3d22f: 0x6e19ee20, + 0x3d230: 0x6e266420, 0x3d231: 0x6e266620, 0x3d232: 0x6e266820, 0x3d233: 0x6e266a20, + 0x3d234: 0x6e266c20, 0x3d235: 0x6e266e20, 0x3d236: 0x6e267020, 0x3d237: 0x6e2fce20, + 0x3d238: 0x6e2fd020, 0x3d239: 0x6e2fd220, 0x3d23a: 0x6e2fd420, 0x3d23b: 0x6e2fd620, + 0x3d23c: 0x6e2fd820, 0x3d23d: 0x6e370820, 0x3d23e: 0x6e370a20, 0x3d23f: 0x6e370c20, + // Block 0xf49, offset 0x3d240 + 0x3d240: 0x6e370e20, 0x3d241: 0x6e371020, 0x3d242: 0x6e3be220, 0x3d243: 0x6e3be420, + 0x3d244: 0x6e3f8420, 0x3d245: 0x6e43be20, 0x3d246: 0x6e458a20, 0x3d247: 0x6e466220, + 0x3d248: 0x6cb74c20, 0x3d249: 0x6cb74e20, 0x3d24a: 0x6cb75020, 0x3d24b: 0x6ce87e20, + 0x3d24c: 0x6ce88020, 0x3d24d: 0x6ce88220, 0x3d24e: 0x6d17fc20, 0x3d24f: 0x6d17fe20, + 0x3d250: 0x6d180020, 0x3d251: 0x6d180220, 0x3d252: 0x6c8ac220, 0x3d253: 0x6d46dc20, + 0x3d254: 0x6d46de20, 0x3d255: 0x6d46e020, 0x3d256: 0x6d46e220, 0x3d257: 0x6d46e420, + 0x3d258: 0x6d46e620, 0x3d259: 0x6d743020, 0x3d25a: 0x6d743220, 0x3d25b: 0x6d743420, + 0x3d25c: 0x6d9dd620, 0x3d25d: 0x6d9dd820, 0x3d25e: 0x6d9dda20, 0x3d25f: 0x6d9ddc20, + 0x3d260: 0x6d9dde20, 0x3d261: 0x6d9de020, 0x3d262: 0x6dc05e20, 0x3d263: 0x6dc06020, + 0x3d264: 0x6dc06220, 0x3d265: 0x6dc06420, 0x3d266: 0x6dde3c20, 0x3d267: 0x6df63220, + 0x3d268: 0x6df63420, 0x3d269: 0x6e09f420, 0x3d26a: 0x6e09f620, 0x3d26b: 0x6e1a0220, + 0x3d26c: 0x6e267620, 0x3d26d: 0x6e2fde20, 0x3d26e: 0x6ce88e20, 0x3d26f: 0x6d74d620, + 0x3d270: 0x6d74d820, 0x3d271: 0x6d74da20, 0x3d272: 0x6d74dc20, 0x3d273: 0x6d9eae20, + 0x3d274: 0x6d9eb020, 0x3d275: 0x6d9eb220, 0x3d276: 0x6d9eb420, 0x3d277: 0x6d9eb620, + 0x3d278: 0x6dc12a20, 0x3d279: 0x6dc12c20, 0x3d27a: 0x6dc12e20, 0x3d27b: 0x6dc13020, + 0x3d27c: 0x6ddedc20, 0x3d27d: 0x6ddede20, 0x3d27e: 0x6ddee020, 0x3d27f: 0x6ddee220, + // Block 0xf4a, offset 0x3d280 + 0x3d280: 0x6ddee420, 0x3d281: 0x6df71e20, 0x3d282: 0x6df72020, 0x3d283: 0x6df72220, + 0x3d284: 0x6df72420, 0x3d285: 0x6df72620, 0x3d286: 0x6df72820, 0x3d287: 0x6df72a20, + 0x3d288: 0x6df72c20, 0x3d289: 0x6e0acc20, 0x3d28a: 0x6e0ace20, 0x3d28b: 0x6e0ad020, + 0x3d28c: 0x6e1aba20, 0x3d28d: 0x6e1abc20, 0x3d28e: 0x6e1abe20, 0x3d28f: 0x6e1ac020, + 0x3d290: 0x6e272c20, 0x3d291: 0x6e309e20, 0x3d292: 0x6e30a020, 0x3d293: 0x6e30a220, + 0x3d294: 0x6e30a420, 0x3d295: 0x6e30a620, 0x3d296: 0x6e378820, 0x3d297: 0x6e3c3020, + 0x3d298: 0x6e3fb820, 0x3d299: 0x6e459e20, 0x3d29a: 0x6c63be20, 0x3d29b: 0x6c63c020, + 0x3d29c: 0x6c63c220, 0x3d29d: 0x6c63c420, 0x3d29e: 0x6c63c620, 0x3d29f: 0x6c8ae020, + 0x3d2a0: 0x6c8ae220, 0x3d2a1: 0x6c8ae420, 0x3d2a2: 0x6c8ae620, 0x3d2a3: 0x6c8ae820, + 0x3d2a4: 0x6c8aea20, 0x3d2a5: 0x6cb77620, 0x3d2a6: 0x6cb77820, 0x3d2a7: 0x6cb77a20, + 0x3d2a8: 0x6cb77c20, 0x3d2a9: 0x6cb77e20, 0x3d2aa: 0x6cb78020, 0x3d2ab: 0x6ce8a620, + 0x3d2ac: 0x6ce8a820, 0x3d2ad: 0x6ce8aa20, 0x3d2ae: 0x6ce8ac20, 0x3d2af: 0x6ce8ae20, + 0x3d2b0: 0x6d184a20, 0x3d2b1: 0x6d184c20, 0x3d2b2: 0x6d184e20, 0x3d2b3: 0x6d185020, + 0x3d2b4: 0x6d185220, 0x3d2b5: 0x6d185420, 0x3d2b6: 0x6d473820, 0x3d2b7: 0x6d473a20, + 0x3d2b8: 0x6d473c20, 0x3d2b9: 0x6d473e20, 0x3d2ba: 0x6d474020, 0x3d2bb: 0x6d474220, + 0x3d2bc: 0x6d474420, 0x3d2bd: 0x6d74fa20, 0x3d2be: 0x6d74fc20, 0x3d2bf: 0x6d9ec220, + // Block 0xf4b, offset 0x3d2c0 + 0x3d2c0: 0x6d9ec420, 0x3d2c1: 0x6d9ec620, 0x3d2c2: 0x6d9ec820, 0x3d2c3: 0x6dc14020, + 0x3d2c4: 0x6dc14220, 0x3d2c5: 0x6ddeee20, 0x3d2c6: 0x6df73420, 0x3d2c7: 0x6dc14620, + 0x3d2c8: 0x6ddef820, 0x3d2c9: 0x6e0aea20, 0x3d2ca: 0x6d9eda20, 0x3d2cb: 0x6d186020, + 0x3d2cc: 0x6d752e20, 0x3d2cd: 0x6dc16c20, 0x3d2ce: 0x6ddf2620, 0x3d2cf: 0x6e30c620, + 0x3d2d0: 0x6df79820, 0x3d2d1: 0x6cb79220, 0x3d2d2: 0x6ce8b220, 0x3d2d3: 0x6d476220, + 0x3d2d4: 0x6d756020, 0x3d2d5: 0x6dc18a20, 0x3d2d6: 0x6dc19220, 0x3d2d7: 0x6df7a220, + 0x3d2d8: 0x6d757c20, 0x3d2d9: 0x6e0b8620, 0x3d2da: 0x6e0b8820, 0x3d2db: 0x6e1b5e20, + 0x3d2dc: 0x6d9f7420, 0x3d2dd: 0x6df7f420, 0x3d2de: 0x6e3c7820, 0x3d2df: 0x6dc1f620, + 0x3d2e0: 0x6d75ac20, 0x3d2e1: 0x6e27c420, 0x3d2e2: 0x6d477e20, 0x3d2e3: 0x6e3c9020, + 0x3d2e4: 0x6ddfea20, 0x3d2e5: 0x6e1bde20, 0x3d2e6: 0x6e283420, 0x3d2e7: 0x6e427220, + 0x3d2e8: 0x6ce8c620, 0x3d2e9: 0x6d478c20, 0x3d2ea: 0x6d478e20, 0x3d2eb: 0x6d75be20, + 0x3d2ec: 0x6d9f9620, 0x3d2ed: 0x6d9f9820, 0x3d2ee: 0x6dc24020, 0x3d2ef: 0x6ddffe20, + 0x3d2f0: 0x6e1be020, 0x3d2f1: 0x6e318020, 0x3d2f2: 0x6d75c020, 0x3d2f3: 0x6ce8c820, + 0x3d2f4: 0x6e451220, + // Block 0xf4c, offset 0x3d300 + 0x3d300: 0x6c00f420, 0x3d301: 0x6c0ae820, 0x3d302: 0x6c15fe20, 0x3d303: 0x6d189620, + 0x3d304: 0x6c011820, 0x3d305: 0x6c0b6620, 0x3d306: 0x6c060c20, 0x3d307: 0x6c2a2820, + 0x3d308: 0x6c2a2a20, 0x3d309: 0x6c656c20, 0x3d30a: 0x6c8c6420, 0x3d30b: 0x6ce9e020, + 0x3d30c: 0x6c446a20, 0x3d30d: 0x6c448e20, 0x3d30e: 0x6c44d020, 0x3d30f: 0x6c8cbc20, + 0x3d310: 0x6c454c20, 0x3d311: 0x6ceac020, 0x3d312: 0x6c18be20, 0x3d313: 0x6c2bd220, + 0x3d314: 0x6c45cc20, 0x3d315: 0x6c190220, 0x3d316: 0x6c676c20, 0x3d317: 0x6c676e20, + 0x3d318: 0x6c0e9420, 0x3d319: 0x6c47da20, 0x3d31a: 0x6d1cea20, 0x3d31b: 0x6d4ab420, + 0x3d31c: 0x6da17c20, 0x3d31d: 0x6dc3da20, 0x3d31e: 0x6e1c7220, 0x3d31f: 0x6cbd8420, + 0x3d320: 0x6d1df020, 0x3d321: 0x6d78fe20, 0x3d322: 0x6c0f2a20, 0x3d323: 0x6c1b8820, + 0x3d324: 0x6c6ae820, 0x3d325: 0x6d793620, 0x3d326: 0x6c1c6020, 0x3d327: 0x6c4a1620, + 0x3d328: 0x6c4a1820, 0x3d329: 0x6c6bd620, 0x3d32a: 0x6c6bd820, 0x3d32b: 0x6c6bda20, + 0x3d32c: 0x6cbf4020, 0x3d32d: 0x6d1f2620, 0x3d32e: 0x6d4cb420, 0x3d32f: 0x6d4cc620, + 0x3d330: 0x6d1faa20, 0x3d331: 0x6d4d2020, 0x3d332: 0x6c102620, 0x3d333: 0x6c109020, + 0x3d334: 0x6c4bca20, 0x3d335: 0x6c6de020, 0x3d336: 0x6c964c20, 0x3d337: 0x6c964e20, + 0x3d338: 0x6c4d3a20, 0x3d339: 0x6c1ffa20, 0x3d33a: 0x6c352c20, 0x3d33b: 0x6c502820, + 0x3d33c: 0x6cc66a20, 0x3d33d: 0x6cf51a20, 0x3d33e: 0x6d24e420, 0x3d33f: 0x6dc6b420, + // Block 0xf4d, offset 0x3d340 + 0x3d340: 0x6c9b6c20, 0x3d341: 0x6cf5cc20, 0x3d342: 0x6c515820, 0x3d343: 0x6c515a20, + 0x3d344: 0x6c738a20, 0x3d345: 0x6c73bc20, 0x3d346: 0x6cc88020, 0x3d347: 0x6cc88220, + 0x3d348: 0x6c376220, 0x3d349: 0x6c754420, 0x3d34a: 0x6c754620, 0x3d34b: 0x6d27fc20, + 0x3d34c: 0x6d27fe20, 0x3d34d: 0x6d554c20, 0x3d34e: 0x6d554e20, 0x3d34f: 0x6d555020, + 0x3d350: 0x6d80ce20, 0x3d351: 0x6da6f020, 0x3d352: 0x6dc84a20, 0x3d353: 0x6cf92020, + 0x3d354: 0x6d55c820, 0x3d355: 0x6c098820, 0x3d356: 0x6c12e820, 0x3d357: 0x6c77e820, + 0x3d358: 0x6ca0dc20, 0x3d359: 0x6cfbd020, 0x3d35a: 0x6cfbd220, 0x3d35b: 0x6cfbd420, + 0x3d35c: 0x6d580820, 0x3d35d: 0x6d82fa20, 0x3d35e: 0x6de56e20, 0x3d35f: 0x6c78c820, + 0x3d360: 0x6ca1ca20, 0x3d361: 0x6d2bd820, 0x3d362: 0x6c569420, 0x3d363: 0x6c3b3620, + 0x3d364: 0x6ca2d420, 0x3d365: 0x6c3baa20, 0x3d366: 0x6c7a7020, 0x3d367: 0x6cd15e20, + 0x3d368: 0x6d2d8420, 0x3d369: 0x6d5ab020, 0x3d36a: 0x6c580820, 0x3d36b: 0x6ca41820, + 0x3d36c: 0x6c7ba220, 0x3d36d: 0x6d5bd620, 0x3d36e: 0x6c7bd220, 0x3d36f: 0x6c3c7420, + 0x3d370: 0x6c597220, 0x3d371: 0x6d012e20, 0x3d372: 0x6c7cd420, 0x3d373: 0x6ca59020, + 0x3d374: 0x6c7e2c20, 0x3d375: 0x6ca6f220, 0x3d376: 0x6d883020, 0x3d377: 0x6ca77620, + 0x3d378: 0x6d042820, 0x3d379: 0x6c258820, 0x3d37a: 0x6e1f7c20, 0x3d37b: 0x6c259220, + 0x3d37c: 0x6ca7e620, 0x3d37d: 0x6d5fe820, 0x3d37e: 0x6d5fea20, 0x3d37f: 0x6d5fec20, + // Block 0xf4e, offset 0x3d380 + 0x3d380: 0x6daf1e20, 0x3d381: 0x6d617a20, 0x3d382: 0x6dcf7a20, 0x3d383: 0x6c5cc220, + 0x3d384: 0x6c80c220, 0x3d385: 0x6ca9e020, 0x3d386: 0x6cd85020, 0x3d387: 0x6daff220, + 0x3d388: 0x6c5d0a20, 0x3d389: 0x6c3e5a20, 0x3d38a: 0x6d36e220, 0x3d38b: 0x6cdaaa20, + 0x3d38c: 0x6c5f8e20, 0x3d38d: 0x6c5f9020, 0x3d38e: 0x6c84c220, 0x3d38f: 0x6cae1620, + 0x3d390: 0x6cae1820, 0x3d391: 0x6cae1a20, 0x3d392: 0x6d0bb420, 0x3d393: 0x6d0bb620, + 0x3d394: 0x6d39b620, 0x3d395: 0x6d65ee20, 0x3d396: 0x6d8fc220, 0x3d397: 0x6e01da20, + 0x3d398: 0x6d675620, 0x3d399: 0x6db4d820, 0x3d39a: 0x6cdef620, 0x3d39b: 0x6cdf0620, + 0x3d39c: 0x6e2c3a20, 0x3d39d: 0x6e221220, 0x3d39e: 0x6c14fe20, 0x3d39f: 0x6c26e420, + 0x3d3a0: 0x6c86c020, 0x3d3a1: 0x6c86c220, 0x3d3a2: 0x6ce04620, 0x3d3a3: 0x6def6620, + 0x3d3a4: 0x6c616420, 0x3d3a5: 0x6d3f6620, 0x3d3a6: 0x6db89c20, 0x3d3a7: 0x6c0a8a20, + 0x3d3a8: 0x6ce3ba20, 0x3d3a9: 0x6ce3bc20, 0x3d3aa: 0x6d95f820, 0x3d3ab: 0x6c27ea20, + 0x3d3ac: 0x6c88e820, 0x3d3ad: 0x6cb47220, 0x3d3ae: 0x6d12ba20, 0x3d3af: 0x6c626020, + 0x3d3b0: 0x6d41bc20, 0x3d3b1: 0x6dd8f820, 0x3d3b2: 0x6c27fe20, 0x3d3b3: 0x6c41fc20, + 0x3d3b4: 0x6c62a620, 0x3d3b5: 0x6c62a820, 0x3d3b6: 0x6c898020, 0x3d3b7: 0x6c898220, + 0x3d3b8: 0x6cb58020, 0x3d3b9: 0x6cb58220, 0x3d3ba: 0x6cb58420, 0x3d3bb: 0x6cb58620, + 0x3d3bc: 0x6ce57020, 0x3d3bd: 0x6d13f420, 0x3d3be: 0x6d41f820, 0x3d3bf: 0x6d41fa20, + // Block 0xf4f, offset 0x3d3c0 + 0x3d3c0: 0x6d6efe20, 0x3d3c1: 0x6df16220, 0x3d3c2: 0x6c420e20, 0x3d3c3: 0x6cb65e20, + 0x3d3c4: 0x6d70de20, 0x3d3c5: 0x6d15dc20, 0x3d3c6: 0x6c8a6620, 0x3d3c7: 0x6c428c20, + 0x3d3c8: 0x6c635a20, 0x3d3c9: 0x6c8a9220, 0x3d3ca: 0x6c42da20, 0x3d3cb: 0x6d45b620, + 0x3d3cc: 0x6d9c3420, 0x3d3cd: 0x6e19f020, 0x3d3ce: 0x6e371220, 0x3d3cf: 0x6ce88420, + 0x3d3d0: 0x6d180420, 0x3d3d1: 0x6dc06620, 0x3d3d2: 0x6df63620, 0x3d3d3: 0x6cb75420, + 0x3d3d4: 0x6d9eb820, 0x3d3d5: 0x6e272e20, 0x3d3d6: 0x6c63c820, 0x3d3d7: 0x6d750a20, + 0x3d3d8: 0x6ddfda20, 0x3d3d9: 0x6df85820, 0x3d3da: 0x6d188a20, 0x3d3db: 0x6e383e20, + 0x3d3dc: 0x6d9f9a20, 0x3d3dd: 0x6e441c20, + // Block 0xf50, offset 0x3d400 + 0x3d400: 0x6c15ea20, 0x3d401: 0x6c00fe20, 0x3d402: 0x6c000c20, 0x3d403: 0x6c0b4420, + 0x3d404: 0x6c16ba20, 0x3d405: 0x6c435e20, 0x3d406: 0x6c437820, 0x3d407: 0x6c645620, + 0x3d408: 0x6c8bba20, 0x3d409: 0x6cb81c20, 0x3d40a: 0x6d18fe20, 0x3d40b: 0x6d18ce20, + 0x3d40c: 0x6d9fac20, 0x3d40d: 0x6c0ccc20, 0x3d40e: 0x6c173820, 0x3d40f: 0x6c2a3220, + 0x3d410: 0x6e0c6420, 0x3d411: 0x6c2a5220, 0x3d412: 0x6c8c8020, 0x3d413: 0x6df89620, + 0x3d414: 0x6c02ce20, 0x3d415: 0x6c0c7820, 0x3d416: 0x6c0c7c20, 0x3d417: 0x6c02fe20, + 0x3d418: 0x6c65aa20, 0x3d419: 0x6c02ae20, 0x3d41a: 0x6c064a20, 0x3d41b: 0x6c179020, + 0x3d41c: 0x6dbc5420, 0x3d41d: 0x6c009a20, 0x3d41e: 0x6c015a20, 0x3d41f: 0x6c17da20, + 0x3d420: 0x6c2ae220, 0x3d421: 0x6c2b4a20, 0x3d422: 0x6cb95220, 0x3d423: 0x6cea4020, + 0x3d424: 0x6c0d3c20, 0x3d425: 0x6c455c20, 0x3d426: 0x6c456020, 0x3d427: 0x6cea9c20, + 0x3d428: 0x6c016420, 0x3d429: 0x6c06b820, 0x3d42a: 0x6c06ba20, 0x3d42b: 0x6c06c620, + 0x3d42c: 0x6c06d220, 0x3d42d: 0x6c2bac20, 0x3d42e: 0x6cb9f220, 0x3d42f: 0x6c18d420, + 0x3d430: 0x6c45e820, 0x3d431: 0x6c673020, 0x3d432: 0x6c673020, 0x3d433: 0x6c673020, + 0x3d434: 0x6c038e20, 0x3d435: 0x6c135e20, 0x3d436: 0x6c03a020, 0x3d437: 0x6c677e20, + 0x3d438: 0x6c8e0c20, 0x3d439: 0x6c074420, 0x3d43a: 0x6c075020, 0x3d43b: 0x6c0e3020, + 0x3d43c: 0x6c468620, 0x3d43d: 0x6c197e20, 0x3d43e: 0x6c199e20, 0x3d43f: 0x6c2c7e20, + // Block 0xf51, offset 0x3d440 + 0x3d440: 0x6c468e20, 0x3d441: 0x6c67e620, 0x3d442: 0x6c681820, 0x3d443: 0x6c8e9620, + 0x3d444: 0x6c8eb220, 0x3d445: 0x6cbaaa20, 0x3d446: 0x6cbaaa20, 0x3d447: 0x6cbad220, + 0x3d448: 0x6cbaf620, 0x3d449: 0x6cbb0620, 0x3d44a: 0x6ceb7620, 0x3d44b: 0x6d1cf220, + 0x3d44c: 0x6d1b7220, 0x3d44d: 0x6d1cf420, 0x3d44e: 0x6d1bb220, 0x3d44f: 0x6d49c620, + 0x3d450: 0x6c032820, 0x3d451: 0x6c0f0e20, 0x3d452: 0x6c486820, 0x3d453: 0x6c908220, + 0x3d454: 0x6c90b420, 0x3d455: 0x6c481220, 0x3d456: 0x6c6a6e20, 0x3d457: 0x6cbcb020, + 0x3d458: 0x6d4af820, 0x3d459: 0x6de13e20, 0x3d45a: 0x6c1b6c20, 0x3d45b: 0x6c916220, + 0x3d45c: 0x6c1b7420, 0x3d45d: 0x6c0f1e20, 0x3d45e: 0x6d1e1020, 0x3d45f: 0x6c91d420, + 0x3d460: 0x6c080620, 0x3d461: 0x6c2f9020, 0x3d462: 0x6c6b1820, 0x3d463: 0x6c6b3c20, + 0x3d464: 0x6c6b5420, 0x3d465: 0x6c495620, 0x3d466: 0x6c924e20, 0x3d467: 0x6cbdf220, + 0x3d468: 0x6cbe0e20, 0x3d469: 0x6d4c1220, 0x3d46a: 0x6de16420, 0x3d46b: 0x6de16420, + 0x3d46c: 0x6c0fdc20, 0x3d46d: 0x6c933820, 0x3d46e: 0x6cefa820, 0x3d46f: 0x6d1f5620, + 0x3d470: 0x6de19a20, 0x3d471: 0x6e3d2020, 0x3d472: 0x6c1cc220, 0x3d473: 0x6c4a9220, + 0x3d474: 0x6c114a20, 0x3d475: 0x6c01ac20, 0x3d476: 0x6c4abc20, 0x3d477: 0x6c941020, + 0x3d478: 0x6c01b620, 0x3d479: 0x6c311420, 0x3d47a: 0x6c1dd220, 0x3d47b: 0x6c6d7820, + 0x3d47c: 0x6cc0a820, 0x3d47d: 0x6c6d7c20, 0x3d47e: 0x6cf09a20, 0x3d47f: 0x6cc16a20, + // Block 0xf52, offset 0x3d480 + 0x3d480: 0x6d202220, 0x3d481: 0x6c272c20, 0x3d482: 0x6c954a20, 0x3d483: 0x6c08a020, + 0x3d484: 0x6cc17820, 0x3d485: 0x6c6e0020, 0x3d486: 0x6cc19820, 0x3d487: 0x6d4ea820, + 0x3d488: 0x6d7ae820, 0x3d489: 0x6e320a20, 0x3d48a: 0x6c4c6820, 0x3d48b: 0x6c4cac20, + 0x3d48c: 0x6c95e620, 0x3d48d: 0x6c95ec20, 0x3d48e: 0x6cc21820, 0x3d48f: 0x6d476820, + 0x3d490: 0x6c01d820, 0x3d491: 0x6c111220, 0x3d492: 0x6c111220, 0x3d493: 0x6c82fe20, + 0x3d494: 0x6c326a20, 0x3d495: 0x6c326a20, 0x3d496: 0x6c329a20, 0x3d497: 0x6d7ea620, + 0x3d498: 0x6e201a20, 0x3d499: 0x6c1ee020, 0x3d49a: 0x6c96ae20, 0x3d49b: 0x6c6f1420, + 0x3d49c: 0x6cc2ca20, 0x3d49d: 0x6c1f2220, 0x3d49e: 0x6c1f2c20, 0x3d49f: 0x6c1f6c20, + 0x3d4a0: 0x6c6fa220, 0x3d4a1: 0x6c4dbe20, 0x3d4a2: 0x6c4da620, 0x3d4a3: 0x6c6fc020, + 0x3d4a4: 0x6c97fe20, 0x3d4a5: 0x6c97a020, 0x3d4a6: 0x6d222420, 0x3d4a7: 0x6cf2ac20, + 0x3d4a8: 0x6cf2b020, 0x3d4a9: 0x6cf2ac20, 0x3d4aa: 0x6d226c20, 0x3d4ab: 0x6d4fb820, + 0x3d4ac: 0x6d7bcc20, 0x3d4ad: 0x6d4fd820, 0x3d4ae: 0x6d4fe820, 0x3d4af: 0x6da3f620, + 0x3d4b0: 0x6de28220, 0x3d4b1: 0x6de28c20, 0x3d4b2: 0x6c11c220, 0x3d4b3: 0x6c98ba20, + 0x3d4b4: 0x6c11e820, 0x3d4b5: 0x6c345020, 0x3d4b6: 0x6c349420, 0x3d4b7: 0x6c713820, + 0x3d4b8: 0x6c4fd020, 0x3d4b9: 0x6c711220, 0x3d4ba: 0x6c4f3420, 0x3d4bb: 0x6c990c20, + 0x3d4bc: 0x6c994220, 0x3d4bd: 0x6c722020, 0x3d4be: 0x6cc57a20, 0x3d4bf: 0x6cf41220, + // Block 0xf53, offset 0x3d4c0 + 0x3d4c0: 0x6cf51c20, 0x3d4c1: 0x6c998820, 0x3d4c2: 0x6d237420, 0x3d4c3: 0x6d510220, + 0x3d4c4: 0x6d23ee20, 0x3d4c5: 0x6d515a20, 0x3d4c6: 0x6d23e220, 0x3d4c7: 0x6de2ea20, + 0x3d4c8: 0x6c9ab020, 0x3d4c9: 0x6cf53820, 0x3d4ca: 0x6da53020, 0x3d4cb: 0x6c9b6e20, + 0x3d4cc: 0x6c739020, 0x3d4cd: 0x6c731620, 0x3d4ce: 0x6d7e3620, 0x3d4cf: 0x6cc7b820, + 0x3d4d0: 0x6cf5e620, 0x3d4d1: 0x6c50c220, 0x3d4d2: 0x6c448820, 0x3d4d3: 0x6c8c8820, + 0x3d4d4: 0x6cb8f420, 0x3d4d5: 0x6d258220, 0x3d4d6: 0x6c3e9420, 0x3d4d7: 0x6c3e7220, + 0x3d4d8: 0x6c73be20, 0x3d4d9: 0x6c9c2220, 0x3d4da: 0x6cf69620, 0x3d4db: 0x6c21ee20, + 0x3d4dc: 0x6c21d820, 0x3d4dd: 0x6c220c20, 0x3d4de: 0x6c365c20, 0x3d4df: 0x6c522420, + 0x3d4e0: 0x6c36a020, 0x3d4e1: 0x6c52c020, 0x3d4e2: 0x6c9c8820, 0x3d4e3: 0x6c750620, + 0x3d4e4: 0x6c9c9a20, 0x3d4e5: 0x6c740020, 0x3d4e6: 0x6cc95020, 0x3d4e7: 0x6cf6d620, + 0x3d4e8: 0x6cf70820, 0x3d4e9: 0x6d267820, 0x3d4ea: 0x6d53d620, 0x3d4eb: 0x6da63220, + 0x3d4ec: 0x6d801420, 0x3d4ed: 0x6da6f220, 0x3d4ee: 0x6e1db420, 0x3d4ef: 0x6c12b420, + 0x3d4f0: 0x6c756020, 0x3d4f1: 0x6d80d420, 0x3d4f2: 0x6e38d620, 0x3d4f3: 0x6cf90820, + 0x3d4f4: 0x6d285c20, 0x3d4f5: 0x6c9e2620, 0x3d4f6: 0x6c9e2820, 0x3d4f7: 0x6c9e2e20, + 0x3d4f8: 0x6c30b220, 0x3d4f9: 0x6d288c20, 0x3d4fa: 0x6c130620, 0x3d4fb: 0x6c393420, + 0x3d4fc: 0x6c38ac20, 0x3d4fd: 0x6c38c620, 0x3d4fe: 0x6c22c020, 0x3d4ff: 0x6c767220, + // Block 0xf54, offset 0x3d500 + 0x3d500: 0x6c546820, 0x3d501: 0x6c76b620, 0x3d502: 0x6c546e20, 0x3d503: 0x6c769a20, + 0x3d504: 0x6c76b820, 0x3d505: 0x6c76d220, 0x3d506: 0x6c771820, 0x3d507: 0x6c545420, + 0x3d508: 0x6ccc3a20, 0x3d509: 0x6cccb620, 0x3d50a: 0x6cfa0020, 0x3d50b: 0x6cccf220, + 0x3d50c: 0x6cfa8620, 0x3d50d: 0x6d29d220, 0x3d50e: 0x6c9f8020, 0x3d50f: 0x6d568820, + 0x3d510: 0x6d571a20, 0x3d511: 0x6d577a20, 0x3d512: 0x6d580a20, 0x3d513: 0x6dfbe420, + 0x3d514: 0x6de4d620, 0x3d515: 0x6de4d020, 0x3d516: 0x6e0f0220, 0x3d517: 0x6e0f1420, + 0x3d518: 0x6c23a220, 0x3d519: 0x6c239620, 0x3d51a: 0x6c554420, 0x3d51b: 0x6cb8ea20, + 0x3d51c: 0x6cfc0420, 0x3d51d: 0x6cce4a20, 0x3d51e: 0x6d582220, 0x3d51f: 0x6d838420, + 0x3d520: 0x6e443420, 0x3d521: 0x6da93020, 0x3d522: 0x6cfd5420, 0x3d523: 0x6c790420, + 0x3d524: 0x6ccf7820, 0x3d525: 0x6d2c1c20, 0x3d526: 0x6c243420, 0x3d527: 0x6cfdfc20, + 0x3d528: 0x6de60820, 0x3d529: 0x6c04fa20, 0x3d52a: 0x6c246c20, 0x3d52b: 0x6c3b5620, + 0x3d52c: 0x6c79bc20, 0x3d52d: 0x6c79bc20, 0x3d52e: 0x6cfe7820, 0x3d52f: 0x6cfea220, + 0x3d530: 0x6d2d0620, 0x3d531: 0x6d5a3420, 0x3d532: 0x6de63620, 0x3d533: 0x6c57d820, + 0x3d534: 0x6cd1a420, 0x3d535: 0x6c585a20, 0x3d536: 0x6c3be620, 0x3d537: 0x6cffb820, + 0x3d538: 0x6ca3e620, 0x3d539: 0x6cf15e20, 0x3d53a: 0x6d00b220, 0x3d53b: 0x6dab0a20, + 0x3d53c: 0x6e104820, 0x3d53d: 0x6c3c7020, 0x3d53e: 0x6c594e20, 0x3d53f: 0x6d868020, + // Block 0xf55, offset 0x3d540 + 0x3d540: 0x6c3c8820, 0x3d541: 0x6c3c8e20, 0x3d542: 0x6c3c8c20, 0x3d543: 0x6c59e420, + 0x3d544: 0x6c7c7e20, 0x3d545: 0x6c7c5e20, 0x3d546: 0x6c7c6020, 0x3d547: 0x6c7c6020, + 0x3d548: 0x6cd36020, 0x3d549: 0x6cd34020, 0x3d54a: 0x6d5c4620, 0x3d54b: 0x6d013a20, + 0x3d54c: 0x6c13ee20, 0x3d54d: 0x6c3cd620, 0x3d54e: 0x6ca5f620, 0x3d54f: 0x6d027820, + 0x3d550: 0x6d5d2820, 0x3d551: 0x6dac1020, 0x3d552: 0x6c3d1e20, 0x3d553: 0x6c7dd220, + 0x3d554: 0x6cd4fa20, 0x3d555: 0x6d30e620, 0x3d556: 0x6d30ce20, 0x3d557: 0x6c7e5e20, + 0x3d558: 0x6c5b3020, 0x3d559: 0x6d5e0420, 0x3d55a: 0x6d314e20, 0x3d55b: 0x6d885420, + 0x3d55c: 0x6cd5c620, 0x3d55d: 0x6d5eba20, 0x3d55e: 0x6d5eba20, 0x3d55f: 0x6d322e20, + 0x3d560: 0x6d323420, 0x3d561: 0x6d32de20, 0x3d562: 0x6d5f3420, 0x3d563: 0x6d894a20, + 0x3d564: 0x6d5efe20, 0x3d565: 0x6dae2820, 0x3d566: 0x6d8a5e20, 0x3d567: 0x6daece20, + 0x3d568: 0x6daee820, 0x3d569: 0x6dce7220, 0x3d56a: 0x6c5c6620, 0x3d56b: 0x6c3dc620, + 0x3d56c: 0x6cd78420, 0x3d56d: 0x6d608020, 0x3d56e: 0x6d342620, 0x3d56f: 0x6d60e220, + 0x3d570: 0x6daf6c20, 0x3d571: 0x6e399620, 0x3d572: 0x6c80d020, 0x3d573: 0x6d619e20, + 0x3d574: 0x6cd86420, 0x3d575: 0x6d073a20, 0x3d576: 0x6d8bc020, 0x3d577: 0x6e33b420, + 0x3d578: 0x6caa3220, 0x3d579: 0x6dcfe420, 0x3d57a: 0x6c3e3620, 0x3d57b: 0x6d624620, + 0x3d57c: 0x6dd02420, 0x3d57d: 0x6cd91e20, 0x3d57e: 0x6d628a20, 0x3d57f: 0x6db0a220, + // Block 0xf56, offset 0x3d580 + 0x3d580: 0x6c21a420, 0x3d581: 0x6c3e6a20, 0x3d582: 0x6c3e9e20, 0x3d583: 0x6c823c20, + 0x3d584: 0x6cd97a20, 0x3d585: 0x6cd98820, 0x3d586: 0x6ceed220, 0x3d587: 0x6d367820, + 0x3d588: 0x6d369420, 0x3d589: 0x6d538a20, 0x3d58a: 0x6da5b220, 0x3d58b: 0x6c82fe20, + 0x3d58c: 0x6cda9c20, 0x3d58d: 0x6d114c20, 0x3d58e: 0x6cdac220, 0x3d58f: 0x6c265420, + 0x3d590: 0x6c264820, 0x3d591: 0x6c3f5620, 0x3d592: 0x6c185020, 0x3d593: 0x6c3f7e20, + 0x3d594: 0x6c3f8220, 0x3d595: 0x6c3f9420, 0x3d596: 0x6c5eb620, 0x3d597: 0x6c5f1c20, + 0x3d598: 0x6c5eb420, 0x3d599: 0x6cac7420, 0x3d59a: 0x6c840620, 0x3d59b: 0x6cae1e20, + 0x3d59c: 0x6cac7620, 0x3d59d: 0x6cad0c20, 0x3d59e: 0x6cdb6e20, 0x3d59f: 0x6cdbee20, + 0x3d5a0: 0x6c84c420, 0x3d5a1: 0x6cdb3620, 0x3d5a2: 0x6cdb3a20, 0x3d5a3: 0x6cdb5820, + 0x3d5a4: 0x6cdc0c20, 0x3d5a5: 0x6d386a20, 0x3d5a6: 0x6d0a7820, 0x3d5a7: 0x6db1fa20, + 0x3d5a8: 0x6d0bbc20, 0x3d5a9: 0x6d642820, 0x3d5aa: 0x6d646c20, 0x3d5ab: 0x6d90ac20, + 0x3d5ac: 0x6d8e4820, 0x3d5ad: 0x6db27620, 0x3d5ae: 0x6e006820, 0x3d5af: 0x6e128020, + 0x3d5b0: 0x6dd1a220, 0x3d5b1: 0x6e12c220, 0x3d5b2: 0x6e20a820, 0x3d5b3: 0x6c5f9620, + 0x3d5b4: 0x6d0bc020, 0x3d5b5: 0x6db39a20, 0x3d5b6: 0x6dd29a20, 0x3d5b7: 0x6c852c20, + 0x3d5b8: 0x6cdd7820, 0x3d5b9: 0x6d0c2420, 0x3d5ba: 0x6cdd9c20, 0x3d5bb: 0x6d900a20, + 0x3d5bc: 0x6d3a1c20, 0x3d5bd: 0x6d3b0e20, 0x3d5be: 0x6d901420, 0x3d5bf: 0x6d8ffa20, + // Block 0xf57, offset 0x3d5c0 + 0x3d5c0: 0x6d668a20, 0x3d5c1: 0x6debe220, 0x3d5c2: 0x6debf020, 0x3d5c3: 0x6d912820, + 0x3d5c4: 0x6c14d220, 0x3d5c5: 0x6cafa620, 0x3d5c6: 0x6cdeaa20, 0x3d5c7: 0x6d0d0620, + 0x3d5c8: 0x6d3b2c20, 0x3d5c9: 0x6d3b6e20, 0x3d5ca: 0x6c8c8420, 0x3d5cb: 0x6e430c20, + 0x3d5cc: 0x6c867c20, 0x3d5cd: 0x6cb06c20, 0x3d5ce: 0x6cdf6620, 0x3d5cf: 0x6d0e4620, + 0x3d5d0: 0x6d925c20, 0x3d5d1: 0x6e2c4c20, 0x3d5d2: 0x6c26ec20, 0x3d5d3: 0x6cb18c20, + 0x3d5d4: 0x6cb1a420, 0x3d5d5: 0x6ce0de20, 0x3d5d6: 0x6e34b020, 0x3d5d7: 0x6c873020, + 0x3d5d8: 0x6d93fa20, 0x3d5d9: 0x6d76c820, 0x3d5da: 0x6ce1c620, 0x3d5db: 0x6d101620, + 0x3d5dc: 0x6d103a20, 0x3d5dd: 0x6c458420, 0x3d5de: 0x6c879a20, 0x3d5df: 0x6d951e20, + 0x3d5e0: 0x6d6cc620, 0x3d5e1: 0x6d95c220, 0x3d5e2: 0x6c153c20, 0x3d5e3: 0x6c625420, + 0x3d5e4: 0x6d121420, 0x3d5e5: 0x6cb46620, 0x3d5e6: 0x6d401a20, 0x3d5e7: 0x6d12da20, + 0x3d5e8: 0x6d6e0a20, 0x3d5e9: 0x6d6e0c20, 0x3d5ea: 0x6d41c020, 0x3d5eb: 0x6df0d620, + 0x3d5ec: 0x6e04bc20, 0x3d5ed: 0x6e3ac220, 0x3d5ee: 0x6ce59420, 0x3d5ef: 0x6d420c20, + 0x3d5f0: 0x6dbb3420, 0x3d5f1: 0x6dbb7220, 0x3d5f2: 0x6d6f8c20, 0x3d5f3: 0x6ce69420, + 0x3d5f4: 0x6d7a8620, 0x3d5f5: 0x6dd9cc20, 0x3d5f6: 0x6df20220, 0x3d5f7: 0x6d706220, + 0x3d5f8: 0x6dbc7220, 0x3d5f9: 0x6df24220, 0x3d5fa: 0x6e06d620, 0x3d5fb: 0x6df2ca20, + 0x3d5fc: 0x6ce74620, 0x3d5fd: 0x6d712e20, 0x3d5fe: 0x6d15fc20, 0x3d5ff: 0x6d15fc20, + // Block 0xf58, offset 0x3d600 + 0x3d600: 0x6d711820, 0x3d601: 0x6d449820, 0x3d602: 0x6c8a6820, 0x3d603: 0x6d44d220, + 0x3d604: 0x6d9b2620, 0x3d605: 0x6df3ee20, 0x3d606: 0x6d457020, 0x3d607: 0x6dbe8420, + 0x3d608: 0x6d72ba20, 0x3d609: 0x6d9c9020, 0x3d60a: 0x6e08b620, 0x3d60b: 0x6e09e620, + 0x3d60c: 0x6d745c20, 0x3d60d: 0x6dc07220, 0x3d60e: 0x6e0a0620, 0x3d60f: 0x6dc13220, + 0x3d610: 0x6e0a7420, 0x3d611: 0x6e267a20, 0x3d612: 0x6e1a6a20, 0x3d613: 0x6e421620, + 0x3d614: 0x6d751a20, 0x3d615: 0x6cb79420, 0x3d616: 0x6e0b4220, 0x3d617: 0x6ce8be20, + 0x3d618: 0x6c42e420, 0x3d619: 0x6e1b6620, 0x3d61a: 0x6d75a020, 0x3d61b: 0x6ddfac20, + 0x3d61c: 0x6d478020, 0x3d61d: 0x6e1bc220, +} + +// mainLookup: 16576 entries, 33152 bytes +// Block 0 is the null block. +var mainLookup = [16576]uint16{ + // Block 0x0, offset 0x0 + // Block 0x1, offset 0x40 + // Block 0x2, offset 0x80 + // Block 0x3, offset 0xc0 + 0x0e0: 0x1f, 0x0e1: 0x20, 0x0e2: 0x21, 0x0e3: 0x22, 0x0e4: 0x23, 0x0e5: 0x24, 0x0e6: 0x25, 0x0e7: 0x26, + 0x0e8: 0x27, 0x0e9: 0x28, 0x0ea: 0x29, 0x0eb: 0x2a, 0x0ec: 0x2b, 0x0ed: 0x2c, 0x0ee: 0x2d, 0x0ef: 0x2e, + 0x0f0: 0x2f, 0x0f1: 0x30, 0x0f2: 0x31, 0x0f3: 0x32, 0x0f4: 0x33, 0x0f5: 0x34, 0x0f6: 0x35, 0x0f7: 0x36, + 0x0f8: 0x37, 0x0f9: 0x38, 0x0fa: 0x39, 0x0fb: 0x3a, 0x0fc: 0x3b, 0x0fd: 0x3c, 0x0fe: 0x3d, 0x0ff: 0x3e, + // Block 0x4, offset 0x100 + 0x100: 0x3f, 0x101: 0x40, 0x102: 0x41, 0x103: 0x42, 0x104: 0x43, 0x105: 0x44, 0x106: 0x45, 0x107: 0x46, + 0x108: 0x47, 0x109: 0x48, 0x10a: 0x49, 0x10b: 0x4a, 0x10c: 0x4b, 0x10d: 0x4c, 0x10e: 0x4d, 0x10f: 0x4e, + 0x110: 0x4f, 0x111: 0x50, 0x112: 0x51, 0x113: 0x52, 0x114: 0x53, 0x115: 0x54, 0x116: 0x55, 0x117: 0x56, + 0x118: 0x57, 0x119: 0x58, 0x11a: 0x59, 0x11b: 0x5a, 0x11c: 0x5b, 0x11d: 0x5c, 0x11e: 0x5d, 0x11f: 0x5e, + 0x120: 0x5f, 0x121: 0x60, 0x122: 0x61, 0x123: 0x62, 0x124: 0x63, 0x125: 0x64, 0x126: 0x65, 0x127: 0x66, + 0x128: 0x67, 0x129: 0x68, 0x12a: 0x69, 0x12c: 0x6a, 0x12d: 0x6b, 0x12e: 0x6c, 0x12f: 0x6d, + 0x130: 0x6e, 0x131: 0x6f, 0x133: 0x70, 0x134: 0x71, 0x135: 0x72, 0x136: 0x73, 0x137: 0x74, + 0x138: 0x75, 0x139: 0x76, 0x13a: 0x77, 0x13b: 0x78, 0x13c: 0x79, 0x13d: 0x7a, 0x13e: 0x7b, 0x13f: 0x7c, + // Block 0x5, offset 0x140 + 0x140: 0x7d, 0x141: 0x7e, 0x142: 0x7f, 0x143: 0x80, 0x144: 0x81, 0x145: 0x82, 0x146: 0x83, 0x147: 0x84, + 0x148: 0x85, 0x149: 0x86, 0x14a: 0x87, 0x14b: 0x88, 0x14c: 0x89, 0x14d: 0x8a, 0x14e: 0x8b, 0x14f: 0x8c, + 0x150: 0x8d, 0x151: 0x8e, 0x152: 0x8f, 0x153: 0x90, 0x154: 0x91, 0x155: 0x92, 0x156: 0x93, 0x157: 0x94, + 0x158: 0x95, 0x159: 0x96, 0x15a: 0x97, 0x15b: 0x98, 0x15c: 0x99, 0x15d: 0x9a, 0x15e: 0x9b, 0x15f: 0x9c, + 0x160: 0x9d, 0x161: 0x9e, 0x162: 0x9f, 0x163: 0xa0, 0x164: 0xa1, 0x165: 0xa2, 0x166: 0xa3, 0x167: 0xa4, + 0x168: 0xa5, 0x169: 0xa6, 0x16a: 0xa7, 0x16b: 0xa8, 0x16c: 0xa9, 0x16d: 0xaa, + 0x170: 0xab, 0x171: 0xac, 0x172: 0xad, 0x173: 0xae, 0x174: 0xaf, 0x175: 0xb0, 0x176: 0xb1, 0x177: 0xb2, + 0x178: 0xb3, 0x17a: 0xb4, 0x17b: 0xb5, 0x17c: 0xb6, 0x17d: 0xb7, 0x17e: 0xb8, 0x17f: 0xb9, + // Block 0x6, offset 0x180 + 0x180: 0xba, 0x181: 0xbb, 0x182: 0xbc, 0x183: 0xbd, 0x184: 0xbe, 0x185: 0xbf, 0x186: 0xc0, 0x187: 0xc1, + 0x188: 0xc2, 0x189: 0xc3, 0x18a: 0xc4, 0x18b: 0xc5, 0x18c: 0xc6, 0x18d: 0xc7, 0x18e: 0xc8, 0x18f: 0xc9, + // Block 0x7, offset 0x1c0 + 0x1f7: 0xca, + // Block 0x8, offset 0x200 + 0x200: 0xcb, 0x201: 0xcc, 0x202: 0xcd, 0x203: 0xce, 0x204: 0xcf, 0x205: 0xd0, 0x206: 0xd1, 0x207: 0xd2, + 0x208: 0xd3, 0x209: 0xd4, 0x20a: 0xd5, 0x20b: 0xd6, 0x20c: 0xd7, 0x20d: 0xd8, 0x20e: 0xd9, 0x20f: 0xda, + 0x210: 0xdb, 0x211: 0xdc, 0x212: 0xdd, 0x213: 0xde, 0x214: 0xdf, 0x215: 0xe0, 0x216: 0xe1, 0x217: 0xe2, + 0x218: 0xe3, 0x219: 0xe4, 0x21a: 0xe5, 0x21b: 0xe6, 0x21c: 0xe7, 0x21d: 0xe8, 0x21e: 0xe9, 0x21f: 0xea, + 0x220: 0xeb, 0x221: 0xec, 0x222: 0xed, 0x223: 0xee, 0x224: 0xef, 0x225: 0xf0, 0x226: 0xf1, 0x227: 0xf2, + 0x228: 0xf3, 0x229: 0xf4, 0x22a: 0xf5, 0x22b: 0xf6, 0x22c: 0xf7, 0x22f: 0xf8, + // Block 0x9, offset 0x240 + 0x25e: 0xf9, 0x25f: 0xfa, + // Block 0xa, offset 0x280 + 0x2a4: 0xfb, 0x2a5: 0xfc, 0x2a6: 0xfd, 0x2a7: 0xfe, + 0x2a8: 0xff, 0x2a9: 0x100, 0x2aa: 0x101, 0x2ab: 0x102, 0x2ac: 0x103, 0x2ad: 0x104, 0x2ae: 0x105, 0x2af: 0x106, + 0x2b0: 0x107, 0x2b1: 0x108, 0x2b2: 0x109, 0x2b3: 0x10a, 0x2b4: 0x10b, 0x2b5: 0x10c, 0x2b6: 0x10d, 0x2b7: 0x10e, + 0x2b8: 0x10f, 0x2b9: 0x110, 0x2ba: 0x111, 0x2bb: 0x112, 0x2bc: 0x113, 0x2bd: 0x114, 0x2be: 0x115, 0x2bf: 0x116, + // Block 0xb, offset 0x2c0 + 0x2c0: 0x117, 0x2c1: 0x118, 0x2c2: 0x119, 0x2c3: 0x11a, 0x2c4: 0x11b, 0x2c5: 0x11c, 0x2c6: 0x11d, 0x2c7: 0x11e, + 0x2ca: 0x11f, 0x2cb: 0x120, 0x2cc: 0x121, 0x2cd: 0x122, 0x2ce: 0x123, 0x2cf: 0x124, + 0x2d0: 0x125, 0x2d1: 0x126, 0x2d2: 0x127, + 0x2e0: 0x128, 0x2e1: 0x129, 0x2e4: 0x12a, 0x2e6: 0x12b, + 0x2e8: 0x12c, 0x2e9: 0x12d, 0x2ec: 0x12e, 0x2ed: 0x12f, + 0x2f0: 0x130, 0x2f1: 0x131, + 0x2f9: 0x132, + // Block 0xc, offset 0x300 + 0x300: 0x133, 0x301: 0x134, 0x302: 0x135, 0x303: 0x136, 0x304: 0x137, 0x305: 0x138, 0x306: 0x139, 0x307: 0x13a, + 0x31a: 0x13b, 0x31b: 0x13c, + // Block 0xd, offset 0x340 + 0x340: 0x13d, 0x341: 0x13e, 0x342: 0x13f, 0x343: 0x140, 0x344: 0x141, 0x345: 0x142, 0x346: 0x143, 0x347: 0x144, + 0x348: 0x145, 0x349: 0x146, 0x34a: 0x147, 0x34b: 0x148, 0x34c: 0x149, 0x34d: 0x14a, + 0x350: 0x14b, 0x351: 0x14c, + // Block 0xe, offset 0x380 + 0x380: 0x14d, 0x381: 0x14e, 0x382: 0x14f, 0x383: 0x150, 0x384: 0x151, 0x385: 0x152, 0x386: 0x153, 0x387: 0x154, + 0x388: 0x155, 0x389: 0x156, 0x38a: 0x157, 0x38b: 0x158, 0x38c: 0x159, 0x38d: 0x15a, 0x38e: 0x15b, 0x38f: 0x15c, + 0x390: 0x15d, + // Block 0xf, offset 0x3c0 + 0x3e0: 0x15e, 0x3e1: 0x15f, 0x3e2: 0x160, 0x3e3: 0x161, 0x3e4: 0x162, 0x3e5: 0x163, 0x3e6: 0x164, 0x3e7: 0x165, + 0x3e8: 0x166, + 0x3fc: 0x167, 0x3fd: 0x168, 0x3fe: 0x169, + // Block 0x10, offset 0x400 + 0x400: 0x16a, + // Block 0x11, offset 0x440 + 0x440: 0x16b, 0x441: 0x16c, 0x442: 0x16d, 0x443: 0x16e, 0x444: 0x16f, 0x445: 0x170, 0x446: 0x171, 0x447: 0x172, + 0x448: 0x173, 0x449: 0x174, 0x44c: 0x175, 0x44d: 0x176, + 0x450: 0x177, 0x451: 0x178, 0x452: 0x179, 0x453: 0x17a, 0x454: 0x17b, 0x455: 0x17c, 0x456: 0x17d, 0x457: 0x17e, + 0x458: 0x17f, 0x459: 0x180, 0x45a: 0x181, 0x45b: 0x182, 0x45c: 0x183, 0x45d: 0x184, 0x45e: 0x185, 0x45f: 0x186, + // Block 0x12, offset 0x480 + 0x4b8: 0x187, 0x4b9: 0x188, 0x4ba: 0x189, 0x4bb: 0x18a, + // Block 0x13, offset 0x4c0 + 0x4c0: 0x18b, 0x4c1: 0x18c, 0x4c2: 0x18d, 0x4c3: 0x18e, 0x4c4: 0x18f, 0x4c5: 0x190, 0x4c6: 0x191, 0x4c7: 0x192, + 0x4c8: 0x193, 0x4c9: 0x194, 0x4cc: 0x195, 0x4cd: 0x196, 0x4ce: 0x197, 0x4cf: 0x198, + 0x4d0: 0x199, 0x4d1: 0x19a, 0x4d2: 0x19b, 0x4d3: 0x19c, 0x4d4: 0x19d, 0x4d5: 0x19e, 0x4d7: 0x19f, + 0x4d8: 0x1a0, 0x4d9: 0x1a1, 0x4da: 0x1a2, 0x4db: 0x1a3, 0x4dc: 0x1a4, 0x4dd: 0x1a5, + // Block 0x14, offset 0x500 + 0x520: 0x1a6, 0x521: 0x1a7, 0x522: 0x1a8, 0x523: 0x1a9, 0x524: 0x1aa, 0x525: 0x1ab, 0x526: 0x1ac, 0x527: 0x1ad, + 0x528: 0x1ae, + // Block 0x15, offset 0x540 + 0x550: 0x09, 0x551: 0x0a, 0x552: 0x0b, 0x553: 0x0c, 0x556: 0x0d, + 0x55b: 0x0e, 0x55d: 0x0f, 0x55e: 0x10, 0x55f: 0x11, + 0x56f: 0x12, + // Block 0x16, offset 0x580 + 0x580: 0x1af, 0x581: 0x1b0, 0x584: 0x1b0, 0x585: 0x1b0, 0x586: 0x1b0, 0x587: 0x1b1, + // Block 0x17, offset 0x5c0 + 0x5e0: 0x14, + // Block 0x18, offset 0x600 + 0x602: 0x01, 0x603: 0x02, 0x604: 0x03, 0x605: 0x04, 0x606: 0x05, 0x607: 0x06, + 0x608: 0x07, 0x609: 0x08, 0x60a: 0x09, 0x60b: 0x0a, 0x60c: 0x0b, 0x60d: 0x0c, 0x60e: 0x0d, 0x60f: 0x0e, + 0x610: 0x0f, 0x611: 0x10, 0x612: 0x11, 0x613: 0x12, 0x614: 0x13, 0x615: 0x14, 0x616: 0x15, 0x617: 0x16, + 0x618: 0x17, 0x619: 0x18, 0x61a: 0x19, 0x61b: 0x1a, 0x61c: 0x1b, 0x61d: 0x1c, 0x61e: 0x1d, 0x61f: 0x1e, + 0x620: 0x01, 0x621: 0x02, 0x622: 0x03, 0x623: 0x04, 0x624: 0x05, + 0x62a: 0x06, 0x62d: 0x07, 0x62f: 0x08, + 0x630: 0x13, 0x633: 0x15, + // Block 0x19, offset 0x640 + 0x640: 0x3f, 0x641: 0x40, 0x642: 0x41, 0x643: 0x42, 0x644: 0x43, 0x645: 0x44, 0x646: 0x45, 0x647: 0x46, + 0x648: 0x47, 0x649: 0x48, 0x64a: 0x49, 0x64b: 0x4a, 0x64c: 0x4b, 0x64d: 0x4c, 0x64e: 0x4d, 0x64f: 0x4e, + 0x650: 0x4f, 0x651: 0x50, 0x652: 0x51, 0x653: 0x52, 0x654: 0x53, 0x655: 0x54, 0x656: 0x55, 0x657: 0x56, + 0x658: 0x57, 0x659: 0x58, 0x65a: 0x59, 0x65b: 0x5a, 0x65c: 0x5b, 0x65d: 0x5c, 0x65e: 0x5d, 0x65f: 0x5e, + 0x660: 0x5f, 0x661: 0x60, 0x662: 0x61, 0x663: 0x62, 0x664: 0x63, 0x665: 0x64, 0x666: 0x65, 0x667: 0x66, + 0x668: 0x67, 0x669: 0x68, 0x66a: 0x69, 0x66c: 0x6a, 0x66d: 0x6b, 0x66e: 0x6c, 0x66f: 0x6d, + 0x670: 0x6e, 0x671: 0x6f, 0x673: 0x70, 0x674: 0x71, 0x675: 0x72, 0x676: 0x73, 0x677: 0x74, + 0x678: 0x1ba, 0x679: 0x1bb, 0x67a: 0x1bc, 0x67b: 0x1bd, 0x67c: 0x79, 0x67d: 0x7a, 0x67e: 0x7b, 0x67f: 0x7c, + // Block 0x1a, offset 0x680 + 0x680: 0x7d, 0x681: 0x7e, 0x682: 0x7f, 0x683: 0x80, 0x684: 0x1be, 0x685: 0x1bf, 0x686: 0x83, 0x687: 0x84, + 0x688: 0x85, 0x689: 0x86, 0x68a: 0x87, 0x68b: 0x88, 0x68c: 0x89, 0x68d: 0x8a, 0x68e: 0x8b, 0x68f: 0x8c, + 0x690: 0x8d, 0x691: 0x8e, 0x692: 0x1c0, 0x693: 0x90, 0x694: 0x91, 0x695: 0x92, 0x696: 0x93, 0x697: 0x94, + 0x698: 0x95, 0x699: 0x96, 0x69a: 0x97, 0x69b: 0x98, 0x69c: 0x99, 0x69d: 0x9a, 0x69e: 0x9b, 0x69f: 0x9c, + 0x6a0: 0x9d, 0x6a1: 0x9e, 0x6a2: 0x9f, 0x6a3: 0xa0, 0x6a4: 0xa1, 0x6a5: 0xa2, 0x6a6: 0xa3, 0x6a7: 0xa4, + 0x6a8: 0xa5, 0x6a9: 0xa6, 0x6aa: 0xa7, 0x6ab: 0xa8, 0x6ac: 0xa9, 0x6ad: 0xaa, + 0x6b0: 0xab, 0x6b1: 0xac, 0x6b2: 0xad, 0x6b3: 0xae, 0x6b4: 0xaf, 0x6b5: 0xb0, 0x6b6: 0xb1, 0x6b7: 0xb2, + 0x6b8: 0xb3, 0x6ba: 0xb4, 0x6bb: 0xb5, 0x6bc: 0xb6, 0x6bd: 0xb7, 0x6be: 0xb8, 0x6bf: 0xb9, + // Block 0x1b, offset 0x6c0 + 0x6c0: 0xba, 0x6c1: 0xbb, 0x6c2: 0xbc, 0x6c3: 0xbd, 0x6c4: 0xbe, 0x6c5: 0xbf, 0x6c6: 0xc0, 0x6c7: 0xc1, + 0x6c8: 0xc2, 0x6c9: 0xc3, 0x6ca: 0xc4, 0x6cb: 0x1c1, 0x6cc: 0xc6, 0x6cd: 0x1c2, 0x6ce: 0x1c3, 0x6cf: 0x1c4, + // Block 0x1c, offset 0x700 + 0x724: 0xfb, 0x725: 0xfc, 0x726: 0xfd, 0x727: 0xfe, + 0x728: 0xff, 0x729: 0x100, 0x72a: 0x101, 0x72b: 0x102, 0x72c: 0x1c5, 0x72d: 0x104, 0x72e: 0x105, 0x72f: 0x106, + 0x730: 0x107, 0x731: 0x108, 0x732: 0x109, 0x733: 0x10a, 0x734: 0x10b, 0x735: 0x10c, 0x736: 0x10d, 0x737: 0x10e, + 0x738: 0x10f, 0x739: 0x110, 0x73a: 0x111, 0x73b: 0x112, 0x73c: 0x113, 0x73d: 0x114, 0x73e: 0x115, 0x73f: 0x116, + // Block 0x1d, offset 0x740 + 0x740: 0x18b, 0x741: 0x18c, 0x742: 0x18d, 0x743: 0x18e, 0x744: 0x1c6, 0x745: 0x1c7, 0x746: 0x191, 0x747: 0x192, + 0x748: 0x193, 0x749: 0x194, 0x74c: 0x195, 0x74d: 0x196, 0x74e: 0x197, 0x74f: 0x198, + 0x750: 0x199, 0x751: 0x19a, 0x752: 0x19b, 0x753: 0x19c, 0x754: 0x19d, 0x755: 0x19e, 0x757: 0x19f, + 0x758: 0x1a0, 0x759: 0x1a1, 0x75a: 0x1a2, 0x75b: 0x1a3, 0x75c: 0x1a4, 0x75d: 0x1a5, + // Block 0x1e, offset 0x780 + 0x790: 0x09, 0x791: 0x0a, 0x792: 0x0b, 0x793: 0x0c, 0x796: 0x0d, + 0x79b: 0x0e, 0x79d: 0x0f, 0x79e: 0x10, 0x79f: 0x1b, + 0x7af: 0x12, + // Block 0x1f, offset 0x7c0 + 0x7c2: 0x01, 0x7c3: 0x1b4, 0x7c4: 0x1b5, 0x7c5: 0x1b6, 0x7c6: 0x1b7, 0x7c7: 0x1b8, + 0x7c8: 0x1b9, 0x7c9: 0x08, 0x7ca: 0x09, 0x7cb: 0x0a, 0x7cc: 0x0b, 0x7cd: 0x0c, 0x7ce: 0x0d, 0x7cf: 0x0e, + 0x7d0: 0x0f, 0x7d1: 0x10, 0x7d2: 0x11, 0x7d3: 0x12, 0x7d4: 0x13, 0x7d5: 0x14, 0x7d6: 0x15, 0x7d7: 0x16, + 0x7d8: 0x17, 0x7d9: 0x18, 0x7da: 0x19, 0x7db: 0x1a, 0x7dc: 0x1b, 0x7dd: 0x1c, 0x7de: 0x1d, 0x7df: 0x1e, + 0x7e0: 0x01, 0x7e1: 0x17, 0x7e2: 0x18, 0x7e3: 0x19, 0x7e4: 0x05, + 0x7ea: 0x06, 0x7ed: 0x07, 0x7ef: 0x1a, + 0x7f0: 0x1c, 0x7f3: 0x15, + // Block 0x20, offset 0x800 + 0x802: 0x01, 0x803: 0x02, 0x804: 0x03, 0x805: 0x1c8, 0x806: 0x05, 0x807: 0x06, + 0x808: 0x07, 0x809: 0x08, 0x80a: 0x09, 0x80b: 0x0a, 0x80c: 0x0b, 0x80d: 0x0c, 0x80e: 0x0d, 0x80f: 0x0e, + 0x810: 0x0f, 0x811: 0x10, 0x812: 0x11, 0x813: 0x12, 0x814: 0x13, 0x815: 0x14, 0x816: 0x15, 0x817: 0x16, + 0x818: 0x17, 0x819: 0x18, 0x81a: 0x19, 0x81b: 0x1a, 0x81c: 0x1b, 0x81d: 0x1c, 0x81e: 0x1d, 0x81f: 0x1e, + 0x820: 0x01, 0x821: 0x02, 0x822: 0x03, 0x823: 0x04, 0x824: 0x05, + 0x82a: 0x06, 0x82d: 0x07, 0x82f: 0x08, + 0x830: 0x13, 0x833: 0x15, + // Block 0x21, offset 0x840 + 0x864: 0xfb, 0x865: 0xfc, 0x866: 0xfd, 0x867: 0xfe, + 0x868: 0xff, 0x869: 0x100, 0x86a: 0x101, 0x86b: 0x102, 0x86c: 0x103, 0x86d: 0x104, 0x86e: 0x105, 0x86f: 0x1cb, + 0x870: 0x1cc, 0x871: 0x1cd, 0x872: 0x1ce, 0x873: 0x1cf, 0x874: 0x1d0, 0x875: 0x10c, 0x876: 0x10d, 0x877: 0x10e, + 0x878: 0x10f, 0x879: 0x110, 0x87a: 0x1d1, 0x87b: 0x1d2, 0x87c: 0x113, 0x87d: 0x114, 0x87e: 0x115, 0x87f: 0x116, + // Block 0x22, offset 0x880 + 0x882: 0x01, 0x883: 0x02, 0x884: 0x03, 0x885: 0x04, 0x886: 0x05, 0x887: 0x06, + 0x888: 0x07, 0x889: 0x08, 0x88a: 0x09, 0x88b: 0x0a, 0x88c: 0x0b, 0x88d: 0x0c, 0x88e: 0x0d, 0x88f: 0x0e, + 0x890: 0x0f, 0x891: 0x10, 0x892: 0x11, 0x893: 0x12, 0x894: 0x13, 0x895: 0x14, 0x896: 0x15, 0x897: 0x16, + 0x898: 0x1c9, 0x899: 0x1ca, 0x89a: 0x19, 0x89b: 0x1a, 0x89c: 0x1b, 0x89d: 0x1c, 0x89e: 0x1d, 0x89f: 0x1e, + 0x8a0: 0x01, 0x8a1: 0x02, 0x8a2: 0x03, 0x8a3: 0x04, 0x8a4: 0x05, + 0x8aa: 0x06, 0x8ad: 0x07, 0x8af: 0x1f, + 0x8b0: 0x13, 0x8b3: 0x15, + // Block 0x23, offset 0x8c0 + 0x8e0: 0x1f, 0x8e1: 0x20, 0x8e2: 0x21, 0x8e3: 0x22, 0x8e4: 0x23, 0x8e5: 0x24, 0x8e6: 0x1d3, 0x8e7: 0x1d4, + 0x8e8: 0x27, 0x8e9: 0x28, 0x8ea: 0x29, 0x8eb: 0x2a, 0x8ec: 0x2b, 0x8ed: 0x2c, 0x8ee: 0x2d, 0x8ef: 0x2e, + 0x8f0: 0x2f, 0x8f1: 0x30, 0x8f2: 0x31, 0x8f3: 0x32, 0x8f4: 0x33, 0x8f5: 0x34, 0x8f6: 0x35, 0x8f7: 0x36, + 0x8f8: 0x37, 0x8f9: 0x38, 0x8fa: 0x39, 0x8fb: 0x3a, 0x8fc: 0x3b, 0x8fd: 0x3c, 0x8fe: 0x3d, 0x8ff: 0x3e, + // Block 0x24, offset 0x900 + 0x902: 0x01, 0x903: 0x02, 0x904: 0x03, 0x905: 0x04, 0x906: 0x05, 0x907: 0x06, + 0x908: 0x07, 0x909: 0x08, 0x90a: 0x09, 0x90b: 0x0a, 0x90c: 0x0b, 0x90d: 0x0c, 0x90e: 0x0d, 0x90f: 0x0e, + 0x910: 0x0f, 0x911: 0x10, 0x912: 0x11, 0x913: 0x12, 0x914: 0x13, 0x915: 0x14, 0x916: 0x15, 0x917: 0x16, + 0x918: 0x17, 0x919: 0x18, 0x91a: 0x19, 0x91b: 0x1a, 0x91c: 0x1b, 0x91d: 0x1c, 0x91e: 0x1d, 0x91f: 0x1e, + 0x920: 0x21, 0x921: 0x02, 0x922: 0x03, 0x923: 0x04, 0x924: 0x05, + 0x92a: 0x06, 0x92d: 0x07, 0x92f: 0x08, + 0x930: 0x13, 0x933: 0x15, + // Block 0x25, offset 0x940 + 0x940: 0x3f, 0x941: 0x40, 0x942: 0x41, 0x943: 0x42, 0x944: 0x43, 0x945: 0x44, 0x946: 0x45, 0x947: 0x46, + 0x948: 0x47, 0x949: 0x48, 0x94a: 0x49, 0x94b: 0x4a, 0x94c: 0x4b, 0x94d: 0x4c, 0x94e: 0x4d, 0x94f: 0x4e, + 0x950: 0x4f, 0x951: 0x50, 0x952: 0x51, 0x953: 0x52, 0x954: 0x53, 0x955: 0x54, 0x956: 0x55, 0x957: 0x56, + 0x958: 0x57, 0x959: 0x58, 0x95a: 0x59, 0x95b: 0x5a, 0x95c: 0x5b, 0x95d: 0x5c, 0x95e: 0x5d, 0x95f: 0x5e, + 0x960: 0x5f, 0x961: 0x60, 0x962: 0x61, 0x963: 0x62, 0x964: 0x63, 0x965: 0x64, 0x966: 0x65, 0x967: 0x66, + 0x968: 0x67, 0x969: 0x68, 0x96a: 0x69, 0x96c: 0x6a, 0x96d: 0x6b, 0x96e: 0x6c, 0x96f: 0x6d, + 0x970: 0x6e, 0x971: 0x6f, 0x973: 0x70, 0x974: 0x71, 0x975: 0x72, 0x976: 0x73, 0x977: 0x74, + 0x978: 0x1de, 0x979: 0x1df, 0x97a: 0x1e0, 0x97b: 0x1e1, 0x97c: 0x79, 0x97d: 0x7a, 0x97e: 0x7b, 0x97f: 0x7c, + // Block 0x26, offset 0x980 + 0x980: 0x7d, 0x981: 0x7e, 0x982: 0x7f, 0x983: 0x80, 0x984: 0x81, 0x985: 0x1e2, 0x986: 0x83, 0x987: 0x84, + 0x988: 0x85, 0x989: 0x86, 0x98a: 0x87, 0x98b: 0x88, 0x98c: 0x89, 0x98d: 0x8a, 0x98e: 0x8b, 0x98f: 0x8c, + 0x990: 0x8d, 0x991: 0x8e, 0x992: 0x1e3, 0x993: 0x90, 0x994: 0x91, 0x995: 0x92, 0x996: 0x93, 0x997: 0x94, + 0x998: 0x95, 0x999: 0x96, 0x99a: 0x97, 0x99b: 0x98, 0x99c: 0x99, 0x99d: 0x9a, 0x99e: 0x9b, 0x99f: 0x9c, + 0x9a0: 0x9d, 0x9a1: 0x9e, 0x9a2: 0x9f, 0x9a3: 0xa0, 0x9a4: 0xa1, 0x9a5: 0xa2, 0x9a6: 0xa3, 0x9a7: 0xa4, + 0x9a8: 0xa5, 0x9a9: 0xa6, 0x9aa: 0xa7, 0x9ab: 0xa8, 0x9ac: 0xa9, 0x9ad: 0xaa, + 0x9b0: 0xab, 0x9b1: 0xac, 0x9b2: 0xad, 0x9b3: 0xae, 0x9b4: 0xaf, 0x9b5: 0xb0, 0x9b6: 0xb1, 0x9b7: 0xb2, + 0x9b8: 0xb3, 0x9ba: 0xb4, 0x9bb: 0xb5, 0x9bc: 0xb6, 0x9bd: 0xb7, 0x9be: 0xb8, 0x9bf: 0xb9, + // Block 0x27, offset 0x9c0 + 0x9c0: 0xba, 0x9c1: 0xbb, 0x9c2: 0xbc, 0x9c3: 0xbd, 0x9c4: 0xbe, 0x9c5: 0xbf, 0x9c6: 0xc0, 0x9c7: 0xc1, + 0x9c8: 0xc2, 0x9c9: 0xc3, 0x9ca: 0xc4, 0x9cb: 0xc5, 0x9cc: 0xc6, 0x9cd: 0x1e4, 0x9ce: 0xc8, 0x9cf: 0x1e5, + // Block 0x28, offset 0xa00 + 0xa00: 0x18b, 0xa01: 0x18c, 0xa02: 0x18d, 0xa03: 0x18e, 0xa04: 0x1e6, 0xa05: 0x190, 0xa06: 0x191, 0xa07: 0x192, + 0xa08: 0x193, 0xa09: 0x194, 0xa0c: 0x195, 0xa0d: 0x196, 0xa0e: 0x197, 0xa0f: 0x198, + 0xa10: 0x199, 0xa11: 0x19a, 0xa12: 0x19b, 0xa13: 0x19c, 0xa14: 0x19d, 0xa15: 0x19e, 0xa17: 0x19f, + 0xa18: 0x1a0, 0xa19: 0x1a1, 0xa1a: 0x1a2, 0xa1b: 0x1a3, 0xa1c: 0x1a4, 0xa1d: 0x1a5, + // Block 0x29, offset 0xa40 + 0xa50: 0x09, 0xa51: 0x0a, 0xa52: 0x0b, 0xa53: 0x0c, 0xa56: 0x0d, + 0xa5b: 0x0e, 0xa5d: 0x0f, 0xa5e: 0x10, 0xa5f: 0x26, + 0xa6f: 0x12, + // Block 0x2a, offset 0xa80 + 0xa82: 0x01, 0xa83: 0x1d7, 0xa84: 0x1d8, 0xa85: 0x1d9, 0xa86: 0x1da, 0xa87: 0x1db, + 0xa88: 0x1dc, 0xa89: 0x1dd, 0xa8a: 0x09, 0xa8b: 0x0a, 0xa8c: 0x0b, 0xa8d: 0x0c, 0xa8e: 0x0d, 0xa8f: 0x0e, + 0xa90: 0x0f, 0xa91: 0x10, 0xa92: 0x11, 0xa93: 0x12, 0xa94: 0x13, 0xa95: 0x14, 0xa96: 0x15, 0xa97: 0x16, + 0xa98: 0x17, 0xa99: 0x18, 0xa9a: 0x19, 0xa9b: 0x1a, 0xa9c: 0x1b, 0xa9d: 0x1c, 0xa9e: 0x1d, 0xa9f: 0x1e, + 0xaa0: 0x01, 0xaa1: 0x23, 0xaa2: 0x24, 0xaa3: 0x25, 0xaa4: 0x05, + 0xaaa: 0x06, 0xaad: 0x07, 0xaaf: 0x08, + 0xab0: 0x27, 0xab3: 0x15, + // Block 0x2b, offset 0xac0 + 0xac2: 0x01, 0xac3: 0x02, 0xac4: 0x03, 0xac5: 0x04, 0xac6: 0x05, 0xac7: 0x06, + 0xac8: 0x07, 0xac9: 0x08, 0xaca: 0x09, 0xacb: 0x0a, 0xacc: 0x0b, 0xacd: 0x0c, 0xace: 0x0d, 0xacf: 0x0e, + 0xad0: 0x1e7, 0xad1: 0x1e8, 0xad2: 0x11, 0xad3: 0x12, 0xad4: 0x13, 0xad5: 0x14, 0xad6: 0x15, 0xad7: 0x16, + 0xad8: 0x17, 0xad9: 0x18, 0xada: 0x19, 0xadb: 0x1a, 0xadc: 0x1b, 0xadd: 0x1c, 0xade: 0x1d, 0xadf: 0x1e, + 0xae0: 0x01, 0xae1: 0x02, 0xae2: 0x03, 0xae3: 0x04, 0xae4: 0x05, + 0xaea: 0x06, 0xaed: 0x07, 0xaef: 0x08, + 0xaf0: 0x13, 0xaf3: 0x15, + // Block 0x2c, offset 0xb00 + 0xb20: 0x1f, 0xb21: 0x20, 0xb22: 0x21, 0xb23: 0x22, 0xb24: 0x23, 0xb25: 0x24, 0xb26: 0x1e9, 0xb27: 0x26, + 0xb28: 0x27, 0xb29: 0x28, 0xb2a: 0x29, 0xb2b: 0x2a, 0xb2c: 0x2b, 0xb2d: 0x2c, 0xb2e: 0x2d, 0xb2f: 0x2e, + 0xb30: 0x2f, 0xb31: 0x30, 0xb32: 0x31, 0xb33: 0x32, 0xb34: 0x33, 0xb35: 0x34, 0xb36: 0x35, 0xb37: 0x36, + 0xb38: 0x37, 0xb39: 0x38, 0xb3a: 0x39, 0xb3b: 0x3a, 0xb3c: 0x3b, 0xb3d: 0x3c, 0xb3e: 0x3d, 0xb3f: 0x3e, + // Block 0x2d, offset 0xb40 + 0xb42: 0x01, 0xb43: 0x02, 0xb44: 0x03, 0xb45: 0x04, 0xb46: 0x05, 0xb47: 0x06, + 0xb48: 0x07, 0xb49: 0x08, 0xb4a: 0x09, 0xb4b: 0x0a, 0xb4c: 0x0b, 0xb4d: 0x0c, 0xb4e: 0x0d, 0xb4f: 0x0e, + 0xb50: 0x0f, 0xb51: 0x10, 0xb52: 0x11, 0xb53: 0x12, 0xb54: 0x13, 0xb55: 0x14, 0xb56: 0x15, 0xb57: 0x16, + 0xb58: 0x17, 0xb59: 0x18, 0xb5a: 0x19, 0xb5b: 0x1a, 0xb5c: 0x1b, 0xb5d: 0x1c, 0xb5e: 0x1d, 0xb5f: 0x1e, + 0xb60: 0x2a, 0xb61: 0x02, 0xb62: 0x03, 0xb63: 0x04, 0xb64: 0x05, + 0xb6a: 0x06, 0xb6d: 0x07, 0xb6f: 0x08, + 0xb70: 0x13, 0xb73: 0x15, + // Block 0x2e, offset 0xb80 + 0xb82: 0x01, 0xb83: 0x02, 0xb84: 0x1ec, 0xb85: 0x1ed, 0xb86: 0x05, 0xb87: 0x06, + 0xb88: 0x07, 0xb89: 0x08, 0xb8a: 0x09, 0xb8b: 0x0a, 0xb8c: 0x0b, 0xb8d: 0x0c, 0xb8e: 0x0d, 0xb8f: 0x0e, + 0xb90: 0x0f, 0xb91: 0x10, 0xb92: 0x11, 0xb93: 0x12, 0xb94: 0x13, 0xb95: 0x14, 0xb96: 0x15, 0xb97: 0x16, + 0xb98: 0x17, 0xb99: 0x18, 0xb9a: 0x19, 0xb9b: 0x1a, 0xb9c: 0x1b, 0xb9d: 0x1c, 0xb9e: 0x1d, 0xb9f: 0x1e, + 0xba0: 0x01, 0xba1: 0x02, 0xba2: 0x03, 0xba3: 0x04, 0xba4: 0x05, + 0xbaa: 0x06, 0xbad: 0x07, 0xbaf: 0x08, + 0xbb0: 0x13, 0xbb3: 0x15, + // Block 0x2f, offset 0xbc0 + 0xbc0: 0x3f, 0xbc1: 0x40, 0xbc2: 0x41, 0xbc3: 0x42, 0xbc4: 0x43, 0xbc5: 0x44, 0xbc6: 0x45, 0xbc7: 0x46, + 0xbc8: 0x47, 0xbc9: 0x48, 0xbca: 0x49, 0xbcb: 0x4a, 0xbcc: 0x4b, 0xbcd: 0x4c, 0xbce: 0x4d, 0xbcf: 0x4e, + 0xbd0: 0x4f, 0xbd1: 0x50, 0xbd2: 0x51, 0xbd3: 0x52, 0xbd4: 0x53, 0xbd5: 0x54, 0xbd6: 0x55, 0xbd7: 0x56, + 0xbd8: 0x57, 0xbd9: 0x58, 0xbda: 0x59, 0xbdb: 0x5a, 0xbdc: 0x5b, 0xbdd: 0x5c, 0xbde: 0x5d, 0xbdf: 0x5e, + 0xbe0: 0x5f, 0xbe1: 0x60, 0xbe2: 0x61, 0xbe3: 0x62, 0xbe4: 0x63, 0xbe5: 0x64, 0xbe6: 0x65, 0xbe7: 0x66, + 0xbe8: 0x67, 0xbe9: 0x68, 0xbea: 0x69, 0xbec: 0x6a, 0xbed: 0x6b, 0xbee: 0x6c, 0xbef: 0x6d, + 0xbf0: 0x6e, 0xbf1: 0x6f, 0xbf3: 0x70, 0xbf4: 0x71, 0xbf5: 0x72, 0xbf6: 0x73, 0xbf7: 0x74, + 0xbf8: 0x75, 0xbf9: 0x1f2, 0xbfa: 0x77, 0xbfb: 0x78, 0xbfc: 0x79, 0xbfd: 0x7a, 0xbfe: 0x7b, 0xbff: 0x7c, + // Block 0x30, offset 0xc00 + 0xc02: 0x01, 0xc03: 0x02, 0xc04: 0x1f0, 0xc05: 0x1f1, 0xc06: 0x05, 0xc07: 0x06, + 0xc08: 0x07, 0xc09: 0x08, 0xc0a: 0x09, 0xc0b: 0x0a, 0xc0c: 0x0b, 0xc0d: 0x0c, 0xc0e: 0x0d, 0xc0f: 0x0e, + 0xc10: 0x0f, 0xc11: 0x10, 0xc12: 0x11, 0xc13: 0x12, 0xc14: 0x13, 0xc15: 0x14, 0xc16: 0x15, 0xc17: 0x16, + 0xc18: 0x17, 0xc19: 0x18, 0xc1a: 0x19, 0xc1b: 0x1a, 0xc1c: 0x1b, 0xc1d: 0x1c, 0xc1e: 0x1d, 0xc1f: 0x1e, + 0xc20: 0x01, 0xc21: 0x2d, 0xc22: 0x03, 0xc23: 0x04, 0xc24: 0x05, + 0xc2a: 0x06, 0xc2d: 0x07, 0xc2f: 0x08, + 0xc30: 0x13, 0xc33: 0x15, + // Block 0x31, offset 0xc40 + 0xc40: 0x3f, 0xc41: 0x40, 0xc42: 0x41, 0xc43: 0x42, 0xc44: 0x43, 0xc45: 0x44, 0xc46: 0x45, 0xc47: 0x46, + 0xc48: 0x47, 0xc49: 0x48, 0xc4a: 0x49, 0xc4b: 0x4a, 0xc4c: 0x4b, 0xc4d: 0x4c, 0xc4e: 0x4d, 0xc4f: 0x4e, + 0xc50: 0x4f, 0xc51: 0x50, 0xc52: 0x51, 0xc53: 0x52, 0xc54: 0x53, 0xc55: 0x54, 0xc56: 0x55, 0xc57: 0x56, + 0xc58: 0x57, 0xc59: 0x58, 0xc5a: 0x59, 0xc5b: 0x5a, 0xc5c: 0x5b, 0xc5d: 0x5c, 0xc5e: 0x5d, 0xc5f: 0x5e, + 0xc60: 0x5f, 0xc61: 0x60, 0xc62: 0x61, 0xc63: 0x62, 0xc64: 0x63, 0xc65: 0x64, 0xc66: 0x65, 0xc67: 0x66, + 0xc68: 0x67, 0xc69: 0x68, 0xc6a: 0x69, 0xc6c: 0x6a, 0xc6d: 0x6b, 0xc6e: 0x6c, 0xc6f: 0x6d, + 0xc70: 0x6e, 0xc71: 0x6f, 0xc73: 0x70, 0xc74: 0x71, 0xc75: 0x72, 0xc76: 0x1fc, 0xc77: 0x74, + 0xc78: 0x75, 0xc79: 0x1fd, 0xc7a: 0x77, 0xc7b: 0x78, 0xc7c: 0x79, 0xc7d: 0x7a, 0xc7e: 0x7b, 0xc7f: 0x7c, + // Block 0x32, offset 0xc80 + 0xc80: 0x7d, 0xc81: 0x7e, 0xc82: 0x7f, 0xc83: 0x80, 0xc84: 0x1fe, 0xc85: 0x82, 0xc86: 0x83, 0xc87: 0x84, + 0xc88: 0x85, 0xc89: 0x86, 0xc8a: 0x87, 0xc8b: 0x88, 0xc8c: 0x89, 0xc8d: 0x8a, 0xc8e: 0x8b, 0xc8f: 0x8c, + 0xc90: 0x8d, 0xc91: 0x8e, 0xc92: 0x8f, 0xc93: 0x90, 0xc94: 0x91, 0xc95: 0x92, 0xc96: 0x93, 0xc97: 0x94, + 0xc98: 0x95, 0xc99: 0x96, 0xc9a: 0x97, 0xc9b: 0x98, 0xc9c: 0x99, 0xc9d: 0x9a, 0xc9e: 0x9b, 0xc9f: 0x9c, + 0xca0: 0x9d, 0xca1: 0x9e, 0xca2: 0x9f, 0xca3: 0xa0, 0xca4: 0xa1, 0xca5: 0xa2, 0xca6: 0xa3, 0xca7: 0xa4, + 0xca8: 0xa5, 0xca9: 0xa6, 0xcaa: 0xa7, 0xcab: 0xa8, 0xcac: 0xa9, 0xcad: 0xaa, + 0xcb0: 0xab, 0xcb1: 0xac, 0xcb2: 0xad, 0xcb3: 0xae, 0xcb4: 0xaf, 0xcb5: 0xb0, 0xcb6: 0xb1, 0xcb7: 0xb2, + 0xcb8: 0xb3, 0xcba: 0xb4, 0xcbb: 0xb5, 0xcbc: 0xb6, 0xcbd: 0xb7, 0xcbe: 0xb8, 0xcbf: 0xb9, + // Block 0x33, offset 0xcc0 + 0xcc2: 0x01, 0xcc3: 0x1f7, 0xcc4: 0x1f8, 0xcc5: 0x1f9, 0xcc6: 0x05, 0xcc7: 0x1fa, + 0xcc8: 0x1fb, 0xcc9: 0x08, 0xcca: 0x09, 0xccb: 0x0a, 0xccc: 0x0b, 0xccd: 0x0c, 0xcce: 0x0d, 0xccf: 0x0e, + 0xcd0: 0x0f, 0xcd1: 0x10, 0xcd2: 0x11, 0xcd3: 0x12, 0xcd4: 0x13, 0xcd5: 0x14, 0xcd6: 0x15, 0xcd7: 0x16, + 0xcd8: 0x17, 0xcd9: 0x18, 0xcda: 0x19, 0xcdb: 0x1a, 0xcdc: 0x1b, 0xcdd: 0x1c, 0xcde: 0x1d, 0xcdf: 0x1e, + 0xce0: 0x01, 0xce1: 0x2f, 0xce2: 0x30, 0xce3: 0x04, 0xce4: 0x05, + 0xcea: 0x06, 0xced: 0x07, 0xcef: 0x08, + 0xcf0: 0x13, 0xcf3: 0x15, + // Block 0x34, offset 0xd00 + 0xd00: 0x3f, 0xd01: 0x40, 0xd02: 0x41, 0xd03: 0x42, 0xd04: 0x43, 0xd05: 0x44, 0xd06: 0x45, 0xd07: 0x46, + 0xd08: 0x47, 0xd09: 0x48, 0xd0a: 0x49, 0xd0b: 0x4a, 0xd0c: 0x4b, 0xd0d: 0x4c, 0xd0e: 0x4d, 0xd0f: 0x4e, + 0xd10: 0x4f, 0xd11: 0x50, 0xd12: 0x51, 0xd13: 0x52, 0xd14: 0x53, 0xd15: 0x54, 0xd16: 0x55, 0xd17: 0x56, + 0xd18: 0x57, 0xd19: 0x58, 0xd1a: 0x59, 0xd1b: 0x5a, 0xd1c: 0x5b, 0xd1d: 0x5c, 0xd1e: 0x5d, 0xd1f: 0x5e, + 0xd20: 0x5f, 0xd21: 0x60, 0xd22: 0x61, 0xd23: 0x62, 0xd24: 0x63, 0xd25: 0x64, 0xd26: 0x65, 0xd27: 0x66, + 0xd28: 0x67, 0xd29: 0x68, 0xd2a: 0x69, 0xd2c: 0x6a, 0xd2d: 0x6b, 0xd2e: 0x6c, 0xd2f: 0x6d, + 0xd30: 0x6e, 0xd31: 0x6f, 0xd33: 0x70, 0xd34: 0x71, 0xd35: 0x72, 0xd36: 0x73, 0xd37: 0x74, + 0xd38: 0x75, 0xd39: 0x204, 0xd3a: 0x77, 0xd3b: 0x78, 0xd3c: 0x79, 0xd3d: 0x7a, 0xd3e: 0x7b, 0xd3f: 0x7c, + // Block 0x35, offset 0xd40 + 0xd42: 0x01, 0xd43: 0x201, 0xd44: 0x03, 0xd45: 0x04, 0xd46: 0x05, 0xd47: 0x202, + 0xd48: 0x203, 0xd49: 0x08, 0xd4a: 0x09, 0xd4b: 0x0a, 0xd4c: 0x0b, 0xd4d: 0x0c, 0xd4e: 0x0d, 0xd4f: 0x0e, + 0xd50: 0x0f, 0xd51: 0x10, 0xd52: 0x11, 0xd53: 0x12, 0xd54: 0x13, 0xd55: 0x14, 0xd56: 0x15, 0xd57: 0x16, + 0xd58: 0x17, 0xd59: 0x18, 0xd5a: 0x19, 0xd5b: 0x1a, 0xd5c: 0x1b, 0xd5d: 0x1c, 0xd5e: 0x1d, 0xd5f: 0x1e, + 0xd60: 0x01, 0xd61: 0x32, 0xd62: 0x03, 0xd63: 0x04, 0xd64: 0x05, + 0xd6a: 0x06, 0xd6d: 0x07, 0xd6f: 0x08, + 0xd70: 0x13, 0xd73: 0x15, + // Block 0x36, offset 0xd80 + 0xda0: 0x1f, 0xda1: 0x20, 0xda2: 0x21, 0xda3: 0x22, 0xda4: 0x23, 0xda5: 0x24, 0xda6: 0x25, 0xda7: 0x26, + 0xda8: 0x27, 0xda9: 0x28, 0xdaa: 0x29, 0xdab: 0x2a, 0xdac: 0x2b, 0xdad: 0x2c, 0xdae: 0x2d, 0xdaf: 0x2e, + 0xdb0: 0x2f, 0xdb1: 0x30, 0xdb2: 0x31, 0xdb3: 0x32, 0xdb4: 0x33, 0xdb5: 0x34, 0xdb6: 0x35, 0xdb7: 0x36, + 0xdb8: 0x37, 0xdb9: 0x38, 0xdba: 0x39, 0xdbb: 0x3a, 0xdbc: 0x205, 0xdbd: 0x206, 0xdbe: 0x207, 0xdbf: 0x3e, + // Block 0x37, offset 0xdc0 + 0xdc2: 0x01, 0xdc3: 0x02, 0xdc4: 0x03, 0xdc5: 0x04, 0xdc6: 0x05, 0xdc7: 0x06, + 0xdc8: 0x07, 0xdc9: 0x08, 0xdca: 0x09, 0xdcb: 0x0a, 0xdcc: 0x0b, 0xdcd: 0x0c, 0xdce: 0x0d, 0xdcf: 0x0e, + 0xdd0: 0x0f, 0xdd1: 0x10, 0xdd2: 0x11, 0xdd3: 0x12, 0xdd4: 0x13, 0xdd5: 0x14, 0xdd6: 0x15, 0xdd7: 0x16, + 0xdd8: 0x17, 0xdd9: 0x18, 0xdda: 0x19, 0xddb: 0x1a, 0xddc: 0x1b, 0xddd: 0x1c, 0xdde: 0x1d, 0xddf: 0x1e, + 0xde0: 0x34, 0xde1: 0x02, 0xde2: 0x03, 0xde3: 0x04, 0xde4: 0x05, + 0xdea: 0x06, 0xded: 0x07, 0xdef: 0x08, + 0xdf0: 0x13, 0xdf3: 0x15, + // Block 0x38, offset 0xe00 + 0xe00: 0x3f, 0xe01: 0x40, 0xe02: 0x41, 0xe03: 0x42, 0xe04: 0x43, 0xe05: 0x44, 0xe06: 0x45, 0xe07: 0x46, + 0xe08: 0x47, 0xe09: 0x48, 0xe0a: 0x49, 0xe0b: 0x4a, 0xe0c: 0x4b, 0xe0d: 0x4c, 0xe0e: 0x4d, 0xe0f: 0x4e, + 0xe10: 0x4f, 0xe11: 0x50, 0xe12: 0x51, 0xe13: 0x52, 0xe14: 0x53, 0xe15: 0x54, 0xe16: 0x55, 0xe17: 0x56, + 0xe18: 0x57, 0xe19: 0x58, 0xe1a: 0x59, 0xe1b: 0x5a, 0xe1c: 0x5b, 0xe1d: 0x5c, 0xe1e: 0x5d, 0xe1f: 0x5e, + 0xe20: 0x5f, 0xe21: 0x60, 0xe22: 0x61, 0xe23: 0x62, 0xe24: 0x63, 0xe25: 0x64, 0xe26: 0x65, 0xe27: 0x66, + 0xe28: 0x67, 0xe29: 0x68, 0xe2a: 0x69, 0xe2c: 0x6a, 0xe2d: 0x6b, 0xe2e: 0x6c, 0xe2f: 0x6d, + 0xe30: 0x6e, 0xe31: 0x6f, 0xe33: 0x70, 0xe34: 0x71, 0xe35: 0x72, 0xe36: 0x73, 0xe37: 0x74, + 0xe38: 0x75, 0xe39: 0x76, 0xe3a: 0x211, 0xe3b: 0x212, 0xe3c: 0x79, 0xe3d: 0x7a, 0xe3e: 0x7b, 0xe3f: 0x7c, + // Block 0x39, offset 0xe40 + 0xe40: 0x7d, 0xe41: 0x7e, 0xe42: 0x7f, 0xe43: 0x80, 0xe44: 0x81, 0xe45: 0x213, 0xe46: 0x83, 0xe47: 0x84, + 0xe48: 0x85, 0xe49: 0x86, 0xe4a: 0x87, 0xe4b: 0x88, 0xe4c: 0x89, 0xe4d: 0x8a, 0xe4e: 0x8b, 0xe4f: 0x8c, + 0xe50: 0x8d, 0xe51: 0x8e, 0xe52: 0x214, 0xe53: 0x90, 0xe54: 0x91, 0xe55: 0x92, 0xe56: 0x93, 0xe57: 0x94, + 0xe58: 0x95, 0xe59: 0x96, 0xe5a: 0x97, 0xe5b: 0x98, 0xe5c: 0x99, 0xe5d: 0x9a, 0xe5e: 0x9b, 0xe5f: 0x9c, + 0xe60: 0x9d, 0xe61: 0x9e, 0xe62: 0x9f, 0xe63: 0xa0, 0xe64: 0xa1, 0xe65: 0xa2, 0xe66: 0xa3, 0xe67: 0xa4, + 0xe68: 0xa5, 0xe69: 0xa6, 0xe6a: 0xa7, 0xe6b: 0xa8, 0xe6c: 0xa9, 0xe6d: 0xaa, + 0xe70: 0xab, 0xe71: 0xac, 0xe72: 0xad, 0xe73: 0xae, 0xe74: 0xaf, 0xe75: 0xb0, 0xe76: 0xb1, 0xe77: 0xb2, + 0xe78: 0xb3, 0xe7a: 0xb4, 0xe7b: 0xb5, 0xe7c: 0xb6, 0xe7d: 0xb7, 0xe7e: 0xb8, 0xe7f: 0xb9, + // Block 0x3a, offset 0xe80 + 0xe80: 0xba, 0xe81: 0xbb, 0xe82: 0xbc, 0xe83: 0xbd, 0xe84: 0xbe, 0xe85: 0xbf, 0xe86: 0xc0, 0xe87: 0xc1, + 0xe88: 0xc2, 0xe89: 0xc3, 0xe8a: 0xc4, 0xe8b: 0xc5, 0xe8c: 0xc6, 0xe8d: 0xc7, 0xe8e: 0xc8, 0xe8f: 0x215, + // Block 0x3b, offset 0xec0 + 0xec0: 0x18b, 0xec1: 0x18c, 0xec2: 0x18d, 0xec3: 0x18e, 0xec4: 0x216, 0xec5: 0x190, 0xec6: 0x191, 0xec7: 0x192, + 0xec8: 0x193, 0xec9: 0x194, 0xecc: 0x195, 0xecd: 0x196, 0xece: 0x197, 0xecf: 0x198, + 0xed0: 0x199, 0xed1: 0x19a, 0xed2: 0x19b, 0xed3: 0x19c, 0xed4: 0x19d, 0xed5: 0x19e, 0xed7: 0x19f, + 0xed8: 0x1a0, 0xed9: 0x1a1, 0xeda: 0x1a2, 0xedb: 0x1a3, 0xedc: 0x1a4, 0xedd: 0x1a5, + // Block 0x3c, offset 0xf00 + 0xf10: 0x09, 0xf11: 0x0a, 0xf12: 0x0b, 0xf13: 0x0c, 0xf16: 0x0d, + 0xf1b: 0x0e, 0xf1d: 0x0f, 0xf1e: 0x10, 0xf1f: 0x39, + 0xf2f: 0x12, + // Block 0x3d, offset 0xf40 + 0xf42: 0x01, 0xf43: 0x20a, 0xf44: 0x20b, 0xf45: 0x20c, 0xf46: 0x20d, 0xf47: 0x06, + 0xf48: 0x07, 0xf49: 0x20e, 0xf4a: 0x20f, 0xf4b: 0x0a, 0xf4c: 0x210, 0xf4d: 0x0c, 0xf4e: 0x0d, 0xf4f: 0x0e, + 0xf50: 0x0f, 0xf51: 0x10, 0xf52: 0x11, 0xf53: 0x12, 0xf54: 0x13, 0xf55: 0x14, 0xf56: 0x15, 0xf57: 0x16, + 0xf58: 0x17, 0xf59: 0x18, 0xf5a: 0x19, 0xf5b: 0x1a, 0xf5c: 0x1b, 0xf5d: 0x1c, 0xf5e: 0x1d, 0xf5f: 0x1e, + 0xf60: 0x01, 0xf61: 0x36, 0xf62: 0x37, 0xf63: 0x38, 0xf64: 0x05, + 0xf6a: 0x06, 0xf6d: 0x07, 0xf6f: 0x08, + 0xf70: 0x3a, 0xf73: 0x15, + // Block 0x3e, offset 0xf80 + 0xf80: 0x3f, 0xf81: 0x40, 0xf82: 0x41, 0xf83: 0x42, 0xf84: 0x43, 0xf85: 0x44, 0xf86: 0x45, 0xf87: 0x46, + 0xf88: 0x47, 0xf89: 0x48, 0xf8a: 0x49, 0xf8b: 0x4a, 0xf8c: 0x4b, 0xf8d: 0x4c, 0xf8e: 0x4d, 0xf8f: 0x4e, + 0xf90: 0x4f, 0xf91: 0x50, 0xf92: 0x51, 0xf93: 0x52, 0xf94: 0x53, 0xf95: 0x54, 0xf96: 0x55, 0xf97: 0x56, + 0xf98: 0x57, 0xf99: 0x58, 0xf9a: 0x59, 0xf9b: 0x5a, 0xf9c: 0x5b, 0xf9d: 0x5c, 0xf9e: 0x5d, 0xf9f: 0x5e, + 0xfa0: 0x5f, 0xfa1: 0x60, 0xfa2: 0x61, 0xfa3: 0x62, 0xfa4: 0x63, 0xfa5: 0x64, 0xfa6: 0x65, 0xfa7: 0x66, + 0xfa8: 0x67, 0xfa9: 0x68, 0xfaa: 0x69, 0xfac: 0x6a, 0xfad: 0x6b, 0xfae: 0x6c, 0xfaf: 0x6d, + 0xfb0: 0x6e, 0xfb1: 0x6f, 0xfb3: 0x70, 0xfb4: 0x71, 0xfb5: 0x72, 0xfb6: 0x73, 0xfb7: 0x74, + 0xfb8: 0x220, 0xfb9: 0x221, 0xfba: 0x222, 0xfbb: 0x223, 0xfbc: 0x79, 0xfbd: 0x7a, 0xfbe: 0x7b, 0xfbf: 0x224, + // Block 0x3f, offset 0xfc0 + 0xfc0: 0x225, 0xfc1: 0x226, 0xfc2: 0x7f, 0xfc3: 0x80, 0xfc4: 0x227, 0xfc5: 0x228, 0xfc6: 0x83, 0xfc7: 0x84, + 0xfc8: 0x85, 0xfc9: 0x229, 0xfca: 0x87, 0xfcb: 0x88, 0xfcc: 0x89, 0xfcd: 0x8a, 0xfce: 0x8b, 0xfcf: 0x8c, + 0xfd0: 0x8d, 0xfd1: 0x22a, 0xfd2: 0x22b, 0xfd3: 0x90, 0xfd4: 0x91, 0xfd5: 0x92, 0xfd6: 0x93, 0xfd7: 0x94, + 0xfd8: 0x95, 0xfd9: 0x96, 0xfda: 0x97, 0xfdb: 0x98, 0xfdc: 0x99, 0xfdd: 0x9a, 0xfde: 0x9b, 0xfdf: 0x9c, + 0xfe0: 0x9d, 0xfe1: 0x9e, 0xfe2: 0x9f, 0xfe3: 0xa0, 0xfe4: 0xa1, 0xfe5: 0xa2, 0xfe6: 0xa3, 0xfe7: 0xa4, + 0xfe8: 0xa5, 0xfe9: 0x22c, 0xfea: 0xa7, 0xfeb: 0xa8, 0xfec: 0xa9, 0xfed: 0xaa, + 0xff0: 0xab, 0xff1: 0xac, 0xff2: 0xad, 0xff3: 0xae, 0xff4: 0xaf, 0xff5: 0xb0, 0xff6: 0xb1, 0xff7: 0xb2, + 0xff8: 0xb3, 0xffa: 0xb4, 0xffb: 0xb5, 0xffc: 0xb6, 0xffd: 0xb7, 0xffe: 0xb8, 0xfff: 0xb9, + // Block 0x40, offset 0x1000 + 0x1000: 0xba, 0x1001: 0xbb, 0x1002: 0xbc, 0x1003: 0xbd, 0x1004: 0xbe, 0x1005: 0xbf, 0x1006: 0xc0, 0x1007: 0xc1, + 0x1008: 0x22d, 0x1009: 0x22e, 0x100a: 0x22f, 0x100b: 0x230, 0x100c: 0xc6, 0x100d: 0x231, 0x100e: 0x232, 0x100f: 0x233, + // Block 0x41, offset 0x1040 + 0x1064: 0xfb, 0x1065: 0xfc, 0x1066: 0xfd, 0x1067: 0xfe, + 0x1068: 0xff, 0x1069: 0x100, 0x106a: 0x101, 0x106b: 0x102, 0x106c: 0x234, 0x106d: 0x104, 0x106e: 0x105, 0x106f: 0x106, + 0x1070: 0x107, 0x1071: 0x108, 0x1072: 0x109, 0x1073: 0x10a, 0x1074: 0x10b, 0x1075: 0x10c, 0x1076: 0x10d, 0x1077: 0x10e, + 0x1078: 0x235, 0x1079: 0x110, 0x107a: 0x111, 0x107b: 0x112, 0x107c: 0x113, 0x107d: 0x114, 0x107e: 0x115, 0x107f: 0x116, + // Block 0x42, offset 0x1080 + 0x1080: 0x18b, 0x1081: 0x18c, 0x1082: 0x18d, 0x1083: 0x18e, 0x1084: 0x236, 0x1085: 0x237, 0x1086: 0x238, 0x1087: 0x192, + 0x1088: 0x193, 0x1089: 0x194, 0x108c: 0x195, 0x108d: 0x196, 0x108e: 0x197, 0x108f: 0x198, + 0x1090: 0x199, 0x1091: 0x19a, 0x1092: 0x19b, 0x1093: 0x19c, 0x1094: 0x19d, 0x1095: 0x19e, 0x1097: 0x19f, + 0x1098: 0x1a0, 0x1099: 0x1a1, 0x109a: 0x1a2, 0x109b: 0x1a3, 0x109c: 0x1a4, 0x109d: 0x1a5, + // Block 0x43, offset 0x10c0 + 0x10d0: 0x09, 0x10d1: 0x0a, 0x10d2: 0x0b, 0x10d3: 0x0c, 0x10d6: 0x0d, + 0x10db: 0x0e, 0x10dd: 0x0f, 0x10de: 0x10, 0x10df: 0x40, + 0x10ef: 0x12, + // Block 0x44, offset 0x1100 + 0x1102: 0x01, 0x1103: 0x219, 0x1104: 0x21a, 0x1105: 0x21b, 0x1106: 0x21c, 0x1107: 0x21d, + 0x1108: 0x21e, 0x1109: 0x08, 0x110a: 0x09, 0x110b: 0x0a, 0x110c: 0x0b, 0x110d: 0x21f, 0x110e: 0x0d, 0x110f: 0x0e, + 0x1110: 0x0f, 0x1111: 0x10, 0x1112: 0x11, 0x1113: 0x12, 0x1114: 0x13, 0x1115: 0x14, 0x1116: 0x15, 0x1117: 0x16, + 0x1118: 0x17, 0x1119: 0x18, 0x111a: 0x19, 0x111b: 0x1a, 0x111c: 0x1b, 0x111d: 0x1c, 0x111e: 0x1d, 0x111f: 0x1e, + 0x1120: 0x01, 0x1121: 0x3c, 0x1122: 0x3d, 0x1123: 0x3e, 0x1124: 0x05, + 0x112a: 0x06, 0x112d: 0x07, 0x112f: 0x3f, + 0x1130: 0x41, 0x1133: 0x15, + // Block 0x45, offset 0x1140 + 0x1142: 0x01, 0x1143: 0x02, 0x1144: 0x23b, 0x1145: 0x23c, 0x1146: 0x05, 0x1147: 0x06, + 0x1148: 0x07, 0x1149: 0x08, 0x114a: 0x09, 0x114b: 0x0a, 0x114c: 0x0b, 0x114d: 0x0c, 0x114e: 0x0d, 0x114f: 0x0e, + 0x1150: 0x0f, 0x1151: 0x10, 0x1152: 0x11, 0x1153: 0x12, 0x1154: 0x13, 0x1155: 0x14, 0x1156: 0x15, 0x1157: 0x16, + 0x1158: 0x17, 0x1159: 0x18, 0x115a: 0x19, 0x115b: 0x1a, 0x115c: 0x1b, 0x115d: 0x1c, 0x115e: 0x1d, 0x115f: 0x1e, + 0x1160: 0x01, 0x1161: 0x02, 0x1162: 0x03, 0x1163: 0x04, 0x1164: 0x05, + 0x116a: 0x06, 0x116d: 0x07, 0x116f: 0x08, + 0x1170: 0x13, 0x1173: 0x15, + // Block 0x46, offset 0x1180 + 0x1182: 0x01, 0x1183: 0x23f, 0x1184: 0x03, 0x1185: 0x04, 0x1186: 0x05, 0x1187: 0x06, + 0x1188: 0x07, 0x1189: 0x08, 0x118a: 0x09, 0x118b: 0x0a, 0x118c: 0x0b, 0x118d: 0x0c, 0x118e: 0x0d, 0x118f: 0x0e, + 0x1190: 0x0f, 0x1191: 0x10, 0x1192: 0x11, 0x1193: 0x12, 0x1194: 0x13, 0x1195: 0x14, 0x1196: 0x15, 0x1197: 0x16, + 0x1198: 0x17, 0x1199: 0x18, 0x119a: 0x19, 0x119b: 0x1a, 0x119c: 0x1b, 0x119d: 0x1c, 0x119e: 0x1d, 0x119f: 0x1e, + 0x11a0: 0x01, 0x11a1: 0x02, 0x11a2: 0x03, 0x11a3: 0x04, 0x11a4: 0x05, + 0x11aa: 0x06, 0x11ad: 0x07, 0x11af: 0x08, + 0x11b0: 0x13, 0x11b3: 0x15, + // Block 0x47, offset 0x11c0 + 0x11c0: 0x3f, 0x11c1: 0x40, 0x11c2: 0x41, 0x11c3: 0x42, 0x11c4: 0x43, 0x11c5: 0x44, 0x11c6: 0x45, 0x11c7: 0x46, + 0x11c8: 0x47, 0x11c9: 0x48, 0x11ca: 0x49, 0x11cb: 0x4a, 0x11cc: 0x4b, 0x11cd: 0x4c, 0x11ce: 0x4d, 0x11cf: 0x4e, + 0x11d0: 0x4f, 0x11d1: 0x50, 0x11d2: 0x51, 0x11d3: 0x52, 0x11d4: 0x53, 0x11d5: 0x54, 0x11d6: 0x55, 0x11d7: 0x56, + 0x11d8: 0x57, 0x11d9: 0x58, 0x11da: 0x59, 0x11db: 0x5a, 0x11dc: 0x5b, 0x11dd: 0x5c, 0x11de: 0x5d, 0x11df: 0x5e, + 0x11e0: 0x5f, 0x11e1: 0x60, 0x11e2: 0x61, 0x11e3: 0x62, 0x11e4: 0x63, 0x11e5: 0x64, 0x11e6: 0x65, 0x11e7: 0x66, + 0x11e8: 0x67, 0x11e9: 0x68, 0x11ea: 0x69, 0x11ec: 0x6a, 0x11ed: 0x6b, 0x11ee: 0x6c, 0x11ef: 0x6d, + 0x11f0: 0x6e, 0x11f1: 0x6f, 0x11f3: 0x70, 0x11f4: 0x71, 0x11f5: 0x72, 0x11f6: 0x73, 0x11f7: 0x74, + 0x11f8: 0x75, 0x11f9: 0x246, 0x11fa: 0x247, 0x11fb: 0x248, 0x11fc: 0x79, 0x11fd: 0x7a, 0x11fe: 0x7b, 0x11ff: 0x7c, + // Block 0x48, offset 0x1200 + 0x1200: 0x7d, 0x1201: 0x7e, 0x1202: 0x7f, 0x1203: 0x80, 0x1204: 0x81, 0x1205: 0x82, 0x1206: 0x83, 0x1207: 0x84, + 0x1208: 0x85, 0x1209: 0x86, 0x120a: 0x87, 0x120b: 0x88, 0x120c: 0x89, 0x120d: 0x8a, 0x120e: 0x8b, 0x120f: 0x8c, + 0x1210: 0x8d, 0x1211: 0x8e, 0x1212: 0x249, 0x1213: 0x90, 0x1214: 0x91, 0x1215: 0x92, 0x1216: 0x93, 0x1217: 0x94, + 0x1218: 0x95, 0x1219: 0x96, 0x121a: 0x97, 0x121b: 0x98, 0x121c: 0x99, 0x121d: 0x9a, 0x121e: 0x9b, 0x121f: 0x9c, + 0x1220: 0x9d, 0x1221: 0x9e, 0x1222: 0x9f, 0x1223: 0xa0, 0x1224: 0xa1, 0x1225: 0xa2, 0x1226: 0xa3, 0x1227: 0xa4, + 0x1228: 0xa5, 0x1229: 0xa6, 0x122a: 0xa7, 0x122b: 0xa8, 0x122c: 0xa9, 0x122d: 0xaa, + 0x1230: 0xab, 0x1231: 0xac, 0x1232: 0xad, 0x1233: 0xae, 0x1234: 0xaf, 0x1235: 0xb0, 0x1236: 0xb1, 0x1237: 0xb2, + 0x1238: 0xb3, 0x123a: 0xb4, 0x123b: 0xb5, 0x123c: 0xb6, 0x123d: 0xb7, 0x123e: 0xb8, 0x123f: 0xb9, + // Block 0x49, offset 0x1240 + 0x1240: 0xba, 0x1241: 0xbb, 0x1242: 0xbc, 0x1243: 0xbd, 0x1244: 0xbe, 0x1245: 0xbf, 0x1246: 0xc0, 0x1247: 0xc1, + 0x1248: 0xc2, 0x1249: 0xc3, 0x124a: 0xc4, 0x124b: 0xc5, 0x124c: 0xc6, 0x124d: 0xc7, 0x124e: 0x24a, 0x124f: 0x24b, + // Block 0x4a, offset 0x1280 + 0x1280: 0x18b, 0x1281: 0x18c, 0x1282: 0x18d, 0x1283: 0x18e, 0x1284: 0x24c, 0x1285: 0x24d, 0x1286: 0x191, 0x1287: 0x192, + 0x1288: 0x193, 0x1289: 0x194, 0x128c: 0x195, 0x128d: 0x196, 0x128e: 0x197, 0x128f: 0x198, + 0x1290: 0x199, 0x1291: 0x19a, 0x1292: 0x19b, 0x1293: 0x19c, 0x1294: 0x19d, 0x1295: 0x19e, 0x1297: 0x19f, + 0x1298: 0x1a0, 0x1299: 0x1a1, 0x129a: 0x1a2, 0x129b: 0x1a3, 0x129c: 0x1a4, 0x129d: 0x1a5, + // Block 0x4b, offset 0x12c0 + 0x12d0: 0x09, 0x12d1: 0x0a, 0x12d2: 0x0b, 0x12d3: 0x0c, 0x12d6: 0x0d, + 0x12db: 0x0e, 0x12dd: 0x0f, 0x12de: 0x10, 0x12df: 0x48, + 0x12ef: 0x12, + // Block 0x4c, offset 0x1300 + 0x1302: 0x01, 0x1303: 0x242, 0x1304: 0x03, 0x1305: 0x243, 0x1306: 0x05, 0x1307: 0x244, + 0x1308: 0x245, 0x1309: 0x08, 0x130a: 0x09, 0x130b: 0x0a, 0x130c: 0x0b, 0x130d: 0x0c, 0x130e: 0x0d, 0x130f: 0x0e, + 0x1310: 0x0f, 0x1311: 0x10, 0x1312: 0x11, 0x1313: 0x12, 0x1314: 0x13, 0x1315: 0x14, 0x1316: 0x15, 0x1317: 0x16, + 0x1318: 0x17, 0x1319: 0x18, 0x131a: 0x19, 0x131b: 0x1a, 0x131c: 0x1b, 0x131d: 0x1c, 0x131e: 0x1d, 0x131f: 0x1e, + 0x1320: 0x01, 0x1321: 0x45, 0x1322: 0x46, 0x1323: 0x47, 0x1324: 0x05, + 0x132a: 0x06, 0x132d: 0x07, 0x132f: 0x08, + 0x1330: 0x49, 0x1333: 0x15, + // Block 0x4d, offset 0x1340 + 0x1364: 0xfb, 0x1365: 0xfc, 0x1366: 0xfd, 0x1367: 0xfe, + 0x1368: 0xff, 0x1369: 0x100, 0x136a: 0x101, 0x136b: 0x102, 0x136c: 0x103, 0x136d: 0x104, 0x136e: 0x252, 0x136f: 0x106, + 0x1370: 0x253, 0x1371: 0x254, 0x1372: 0x255, 0x1373: 0x256, 0x1374: 0x257, 0x1375: 0x10c, 0x1376: 0x10d, 0x1377: 0x10e, + 0x1378: 0x10f, 0x1379: 0x110, 0x137a: 0x111, 0x137b: 0x112, 0x137c: 0x113, 0x137d: 0x114, 0x137e: 0x115, 0x137f: 0x116, + // Block 0x4e, offset 0x1380 + 0x1382: 0x01, 0x1383: 0x02, 0x1384: 0x03, 0x1385: 0x04, 0x1386: 0x05, 0x1387: 0x06, + 0x1388: 0x07, 0x1389: 0x08, 0x138a: 0x09, 0x138b: 0x0a, 0x138c: 0x0b, 0x138d: 0x0c, 0x138e: 0x0d, 0x138f: 0x0e, + 0x1390: 0x0f, 0x1391: 0x10, 0x1392: 0x11, 0x1393: 0x12, 0x1394: 0x13, 0x1395: 0x14, 0x1396: 0x15, 0x1397: 0x16, + 0x1398: 0x24e, 0x1399: 0x24f, 0x139a: 0x250, 0x139b: 0x251, 0x139c: 0x1b, 0x139d: 0x1c, 0x139e: 0x1d, 0x139f: 0x1e, + 0x13a0: 0x01, 0x13a1: 0x02, 0x13a2: 0x03, 0x13a3: 0x04, 0x13a4: 0x05, + 0x13aa: 0x06, 0x13ad: 0x07, 0x13af: 0x4b, + 0x13b0: 0x13, 0x13b3: 0x15, + // Block 0x4f, offset 0x13c0 + 0x13c0: 0x3f, 0x13c1: 0x40, 0x13c2: 0x41, 0x13c3: 0x42, 0x13c4: 0x43, 0x13c5: 0x44, 0x13c6: 0x45, 0x13c7: 0x46, + 0x13c8: 0x47, 0x13c9: 0x48, 0x13ca: 0x49, 0x13cb: 0x4a, 0x13cc: 0x4b, 0x13cd: 0x4c, 0x13ce: 0x4d, 0x13cf: 0x4e, + 0x13d0: 0x4f, 0x13d1: 0x50, 0x13d2: 0x51, 0x13d3: 0x52, 0x13d4: 0x53, 0x13d5: 0x54, 0x13d6: 0x55, 0x13d7: 0x56, + 0x13d8: 0x57, 0x13d9: 0x58, 0x13da: 0x59, 0x13db: 0x5a, 0x13dc: 0x5b, 0x13dd: 0x5c, 0x13de: 0x5d, 0x13df: 0x5e, + 0x13e0: 0x5f, 0x13e1: 0x60, 0x13e2: 0x61, 0x13e3: 0x62, 0x13e4: 0x63, 0x13e5: 0x64, 0x13e6: 0x65, 0x13e7: 0x66, + 0x13e8: 0x67, 0x13e9: 0x68, 0x13ea: 0x69, 0x13ec: 0x6a, 0x13ed: 0x6b, 0x13ee: 0x6c, 0x13ef: 0x6d, + 0x13f0: 0x6e, 0x13f1: 0x6f, 0x13f3: 0x70, 0x13f4: 0x71, 0x13f5: 0x72, 0x13f6: 0x73, 0x13f7: 0x74, + 0x13f8: 0x75, 0x13f9: 0x261, 0x13fa: 0x77, 0x13fb: 0x78, 0x13fc: 0x79, 0x13fd: 0x7a, 0x13fe: 0x7b, 0x13ff: 0x7c, + // Block 0x50, offset 0x1400 + 0x1400: 0x7d, 0x1401: 0x7e, 0x1402: 0x7f, 0x1403: 0x80, 0x1404: 0x262, 0x1405: 0x82, 0x1406: 0x83, 0x1407: 0x84, + 0x1408: 0x85, 0x1409: 0x86, 0x140a: 0x87, 0x140b: 0x88, 0x140c: 0x89, 0x140d: 0x8a, 0x140e: 0x8b, 0x140f: 0x8c, + 0x1410: 0x8d, 0x1411: 0x8e, 0x1412: 0x8f, 0x1413: 0x90, 0x1414: 0x91, 0x1415: 0x92, 0x1416: 0x93, 0x1417: 0x94, + 0x1418: 0x95, 0x1419: 0x96, 0x141a: 0x97, 0x141b: 0x98, 0x141c: 0x99, 0x141d: 0x9a, 0x141e: 0x9b, 0x141f: 0x9c, + 0x1420: 0x9d, 0x1421: 0x9e, 0x1422: 0x9f, 0x1423: 0xa0, 0x1424: 0xa1, 0x1425: 0xa2, 0x1426: 0xa3, 0x1427: 0xa4, + 0x1428: 0xa5, 0x1429: 0xa6, 0x142a: 0xa7, 0x142b: 0xa8, 0x142c: 0xa9, 0x142d: 0xaa, + 0x1430: 0xab, 0x1431: 0xac, 0x1432: 0xad, 0x1433: 0xae, 0x1434: 0xaf, 0x1435: 0xb0, 0x1436: 0xb1, 0x1437: 0xb2, + 0x1438: 0xb3, 0x143a: 0xb4, 0x143b: 0xb5, 0x143c: 0xb6, 0x143d: 0xb7, 0x143e: 0xb8, 0x143f: 0xb9, + // Block 0x51, offset 0x1440 + 0x1442: 0x01, 0x1443: 0x25a, 0x1444: 0x25b, 0x1445: 0x25c, 0x1446: 0x25d, 0x1447: 0x25e, + 0x1448: 0x25f, 0x1449: 0x08, 0x144a: 0x260, 0x144b: 0x0a, 0x144c: 0x0b, 0x144d: 0x0c, 0x144e: 0x0d, 0x144f: 0x0e, + 0x1450: 0x0f, 0x1451: 0x10, 0x1452: 0x11, 0x1453: 0x12, 0x1454: 0x13, 0x1455: 0x14, 0x1456: 0x15, 0x1457: 0x16, + 0x1458: 0x17, 0x1459: 0x18, 0x145a: 0x19, 0x145b: 0x1a, 0x145c: 0x1b, 0x145d: 0x1c, 0x145e: 0x1d, 0x145f: 0x1e, + 0x1460: 0x01, 0x1461: 0x4d, 0x1462: 0x4e, 0x1463: 0x04, 0x1464: 0x05, + 0x146a: 0x06, 0x146d: 0x07, 0x146f: 0x08, + 0x1470: 0x13, 0x1473: 0x15, + // Block 0x52, offset 0x1480 + 0x1480: 0x3f, 0x1481: 0x40, 0x1482: 0x41, 0x1483: 0x42, 0x1484: 0x43, 0x1485: 0x44, 0x1486: 0x45, 0x1487: 0x46, + 0x1488: 0x47, 0x1489: 0x48, 0x148a: 0x49, 0x148b: 0x4a, 0x148c: 0x4b, 0x148d: 0x4c, 0x148e: 0x4d, 0x148f: 0x4e, + 0x1490: 0x4f, 0x1491: 0x50, 0x1492: 0x51, 0x1493: 0x52, 0x1494: 0x53, 0x1495: 0x54, 0x1496: 0x55, 0x1497: 0x56, + 0x1498: 0x57, 0x1499: 0x58, 0x149a: 0x59, 0x149b: 0x5a, 0x149c: 0x5b, 0x149d: 0x5c, 0x149e: 0x5d, 0x149f: 0x5e, + 0x14a0: 0x5f, 0x14a1: 0x60, 0x14a2: 0x61, 0x14a3: 0x62, 0x14a4: 0x63, 0x14a5: 0x64, 0x14a6: 0x65, 0x14a7: 0x66, + 0x14a8: 0x67, 0x14a9: 0x68, 0x14aa: 0x69, 0x14ac: 0x6a, 0x14ad: 0x6b, 0x14ae: 0x6c, 0x14af: 0x6d, + 0x14b0: 0x6e, 0x14b1: 0x6f, 0x14b3: 0x70, 0x14b4: 0x71, 0x14b5: 0x72, 0x14b6: 0x1fc, 0x14b7: 0x74, + 0x14b8: 0x75, 0x14b9: 0x26a, 0x14ba: 0x26b, 0x14bb: 0x26c, 0x14bc: 0x79, 0x14bd: 0x7a, 0x14be: 0x7b, 0x14bf: 0x7c, + // Block 0x53, offset 0x14c0 + 0x14c0: 0x7d, 0x14c1: 0x7e, 0x14c2: 0x7f, 0x14c3: 0x80, 0x14c4: 0x262, 0x14c5: 0x82, 0x14c6: 0x83, 0x14c7: 0x84, + 0x14c8: 0x85, 0x14c9: 0x86, 0x14ca: 0x87, 0x14cb: 0x88, 0x14cc: 0x89, 0x14cd: 0x8a, 0x14ce: 0x8b, 0x14cf: 0x8c, + 0x14d0: 0x8d, 0x14d1: 0x8e, 0x14d2: 0x26d, 0x14d3: 0x90, 0x14d4: 0x91, 0x14d5: 0x92, 0x14d6: 0x93, 0x14d7: 0x94, + 0x14d8: 0x95, 0x14d9: 0x96, 0x14da: 0x97, 0x14db: 0x98, 0x14dc: 0x99, 0x14dd: 0x9a, 0x14de: 0x9b, 0x14df: 0x9c, + 0x14e0: 0x9d, 0x14e1: 0x9e, 0x14e2: 0x9f, 0x14e3: 0xa0, 0x14e4: 0xa1, 0x14e5: 0xa2, 0x14e6: 0xa3, 0x14e7: 0xa4, + 0x14e8: 0xa5, 0x14e9: 0xa6, 0x14ea: 0xa7, 0x14eb: 0xa8, 0x14ec: 0xa9, 0x14ed: 0xaa, + 0x14f0: 0xab, 0x14f1: 0xac, 0x14f2: 0xad, 0x14f3: 0xae, 0x14f4: 0xaf, 0x14f5: 0xb0, 0x14f6: 0xb1, 0x14f7: 0xb2, + 0x14f8: 0xb3, 0x14fa: 0xb4, 0x14fb: 0xb5, 0x14fc: 0xb6, 0x14fd: 0xb7, 0x14fe: 0xb8, 0x14ff: 0xb9, + // Block 0x54, offset 0x1500 + 0x1500: 0xba, 0x1501: 0xbb, 0x1502: 0xbc, 0x1503: 0xbd, 0x1504: 0xbe, 0x1505: 0xbf, 0x1506: 0xc0, 0x1507: 0xc1, + 0x1508: 0xc2, 0x1509: 0xc3, 0x150a: 0xc4, 0x150b: 0xc5, 0x150c: 0xc6, 0x150d: 0xc7, 0x150e: 0x26e, 0x150f: 0x24b, + // Block 0x55, offset 0x1540 + 0x1540: 0x18b, 0x1541: 0x18c, 0x1542: 0x18d, 0x1543: 0x18e, 0x1544: 0x26f, 0x1545: 0x24d, 0x1546: 0x191, 0x1547: 0x192, + 0x1548: 0x193, 0x1549: 0x194, 0x154c: 0x195, 0x154d: 0x196, 0x154e: 0x197, 0x154f: 0x198, + 0x1550: 0x199, 0x1551: 0x19a, 0x1552: 0x19b, 0x1553: 0x19c, 0x1554: 0x19d, 0x1555: 0x19e, 0x1557: 0x19f, + 0x1558: 0x1a0, 0x1559: 0x1a1, 0x155a: 0x1a2, 0x155b: 0x1a3, 0x155c: 0x1a4, 0x155d: 0x1a5, + // Block 0x56, offset 0x1580 + 0x1590: 0x09, 0x1591: 0x0a, 0x1592: 0x0b, 0x1593: 0x0c, 0x1596: 0x0d, + 0x159b: 0x0e, 0x159d: 0x0f, 0x159e: 0x10, 0x159f: 0x53, + 0x15af: 0x12, + // Block 0x57, offset 0x15c0 + 0x15c2: 0x01, 0x15c3: 0x265, 0x15c4: 0x266, 0x15c5: 0x267, 0x15c6: 0x05, 0x15c7: 0x268, + 0x15c8: 0x269, 0x15c9: 0x08, 0x15ca: 0x09, 0x15cb: 0x0a, 0x15cc: 0x0b, 0x15cd: 0x0c, 0x15ce: 0x0d, 0x15cf: 0x0e, + 0x15d0: 0x0f, 0x15d1: 0x10, 0x15d2: 0x11, 0x15d3: 0x12, 0x15d4: 0x13, 0x15d5: 0x14, 0x15d6: 0x15, 0x15d7: 0x16, + 0x15d8: 0x17, 0x15d9: 0x18, 0x15da: 0x19, 0x15db: 0x1a, 0x15dc: 0x1b, 0x15dd: 0x1c, 0x15de: 0x1d, 0x15df: 0x1e, + 0x15e0: 0x01, 0x15e1: 0x50, 0x15e2: 0x51, 0x15e3: 0x52, 0x15e4: 0x05, + 0x15ea: 0x06, 0x15ed: 0x07, 0x15ef: 0x08, + 0x15f0: 0x54, 0x15f3: 0x15, + // Block 0x58, offset 0x1600 + 0x1620: 0x1f, 0x1621: 0x20, 0x1622: 0x21, 0x1623: 0x22, 0x1624: 0x23, 0x1625: 0x24, 0x1626: 0x25, 0x1627: 0x26, + 0x1628: 0x27, 0x1629: 0x28, 0x162a: 0x272, 0x162b: 0x2a, 0x162c: 0x2b, 0x162d: 0x2c, 0x162e: 0x2d, 0x162f: 0x2e, + 0x1630: 0x2f, 0x1631: 0x30, 0x1632: 0x31, 0x1633: 0x32, 0x1634: 0x33, 0x1635: 0x34, 0x1636: 0x35, 0x1637: 0x36, + 0x1638: 0x37, 0x1639: 0x38, 0x163a: 0x39, 0x163b: 0x3a, 0x163c: 0x3b, 0x163d: 0x3c, 0x163e: 0x3d, 0x163f: 0x3e, + // Block 0x59, offset 0x1640 + 0x1642: 0x01, 0x1643: 0x02, 0x1644: 0x03, 0x1645: 0x04, 0x1646: 0x05, 0x1647: 0x06, + 0x1648: 0x07, 0x1649: 0x08, 0x164a: 0x09, 0x164b: 0x0a, 0x164c: 0x0b, 0x164d: 0x0c, 0x164e: 0x0d, 0x164f: 0x0e, + 0x1650: 0x0f, 0x1651: 0x10, 0x1652: 0x11, 0x1653: 0x12, 0x1654: 0x13, 0x1655: 0x14, 0x1656: 0x15, 0x1657: 0x16, + 0x1658: 0x17, 0x1659: 0x18, 0x165a: 0x19, 0x165b: 0x1a, 0x165c: 0x1b, 0x165d: 0x1c, 0x165e: 0x1d, 0x165f: 0x1e, + 0x1660: 0x56, 0x1661: 0x02, 0x1662: 0x03, 0x1663: 0x04, 0x1664: 0x05, + 0x166a: 0x06, 0x166d: 0x07, 0x166f: 0x08, + 0x1670: 0x13, 0x1673: 0x15, + // Block 0x5a, offset 0x1680 + 0x1682: 0x01, 0x1683: 0x02, 0x1684: 0x03, 0x1685: 0x04, 0x1686: 0x275, 0x1687: 0x06, + 0x1688: 0x07, 0x1689: 0x276, 0x168a: 0x277, 0x168b: 0x0a, 0x168c: 0x0b, 0x168d: 0x0c, 0x168e: 0x0d, 0x168f: 0x0e, + 0x1690: 0x0f, 0x1691: 0x10, 0x1692: 0x11, 0x1693: 0x12, 0x1694: 0x13, 0x1695: 0x14, 0x1696: 0x15, 0x1697: 0x16, + 0x1698: 0x17, 0x1699: 0x18, 0x169a: 0x19, 0x169b: 0x1a, 0x169c: 0x1b, 0x169d: 0x1c, 0x169e: 0x1d, 0x169f: 0x1e, + 0x16a0: 0x01, 0x16a1: 0x02, 0x16a2: 0x03, 0x16a3: 0x04, 0x16a4: 0x05, + 0x16aa: 0x06, 0x16ad: 0x07, 0x16af: 0x08, + 0x16b0: 0x13, 0x16b3: 0x15, + // Block 0x5b, offset 0x16c0 + 0x16c0: 0x3f, 0x16c1: 0x40, 0x16c2: 0x41, 0x16c3: 0x42, 0x16c4: 0x43, 0x16c5: 0x44, 0x16c6: 0x45, 0x16c7: 0x46, + 0x16c8: 0x47, 0x16c9: 0x48, 0x16ca: 0x49, 0x16cb: 0x4a, 0x16cc: 0x4b, 0x16cd: 0x4c, 0x16ce: 0x4d, 0x16cf: 0x4e, + 0x16d0: 0x4f, 0x16d1: 0x50, 0x16d2: 0x51, 0x16d3: 0x52, 0x16d4: 0x53, 0x16d5: 0x54, 0x16d6: 0x55, 0x16d7: 0x56, + 0x16d8: 0x57, 0x16d9: 0x58, 0x16da: 0x59, 0x16db: 0x5a, 0x16dc: 0x5b, 0x16dd: 0x5c, 0x16de: 0x5d, 0x16df: 0x5e, + 0x16e0: 0x5f, 0x16e1: 0x60, 0x16e2: 0x61, 0x16e3: 0x62, 0x16e4: 0x63, 0x16e5: 0x64, 0x16e6: 0x65, 0x16e7: 0x66, + 0x16e8: 0x67, 0x16e9: 0x68, 0x16ea: 0x69, 0x16ec: 0x6a, 0x16ed: 0x6b, 0x16ee: 0x6c, 0x16ef: 0x6d, + 0x16f0: 0x6e, 0x16f1: 0x6f, 0x16f3: 0x70, 0x16f4: 0x71, 0x16f5: 0x72, 0x16f6: 0x73, 0x16f7: 0x74, + 0x16f8: 0x281, 0x16f9: 0x282, 0x16fa: 0x283, 0x16fb: 0x284, 0x16fc: 0x79, 0x16fd: 0x7a, 0x16fe: 0x7b, 0x16ff: 0x7c, + // Block 0x5c, offset 0x1700 + 0x1700: 0x7d, 0x1701: 0x7e, 0x1702: 0x7f, 0x1703: 0x80, 0x1704: 0x285, 0x1705: 0x1bf, 0x1706: 0x83, 0x1707: 0x84, + 0x1708: 0x85, 0x1709: 0x86, 0x170a: 0x87, 0x170b: 0x88, 0x170c: 0x89, 0x170d: 0x8a, 0x170e: 0x8b, 0x170f: 0x8c, + 0x1710: 0x8d, 0x1711: 0x8e, 0x1712: 0x286, 0x1713: 0x90, 0x1714: 0x91, 0x1715: 0x92, 0x1716: 0x93, 0x1717: 0x94, + 0x1718: 0x95, 0x1719: 0x96, 0x171a: 0x97, 0x171b: 0x98, 0x171c: 0x99, 0x171d: 0x9a, 0x171e: 0x9b, 0x171f: 0x9c, + 0x1720: 0x9d, 0x1721: 0x9e, 0x1722: 0x9f, 0x1723: 0xa0, 0x1724: 0xa1, 0x1725: 0xa2, 0x1726: 0xa3, 0x1727: 0xa4, + 0x1728: 0xa5, 0x1729: 0xa6, 0x172a: 0xa7, 0x172b: 0xa8, 0x172c: 0xa9, 0x172d: 0xaa, + 0x1730: 0xab, 0x1731: 0xac, 0x1732: 0xad, 0x1733: 0xae, 0x1734: 0xaf, 0x1735: 0xb0, 0x1736: 0xb1, 0x1737: 0xb2, + 0x1738: 0xb3, 0x173a: 0xb4, 0x173b: 0xb5, 0x173c: 0xb6, 0x173d: 0xb7, 0x173e: 0xb8, 0x173f: 0xb9, + // Block 0x5d, offset 0x1740 + 0x1740: 0xba, 0x1741: 0xbb, 0x1742: 0xbc, 0x1743: 0xbd, 0x1744: 0xbe, 0x1745: 0xbf, 0x1746: 0xc0, 0x1747: 0xc1, + 0x1748: 0xc2, 0x1749: 0xc3, 0x174a: 0xc4, 0x174b: 0x1c1, 0x174c: 0xc6, 0x174d: 0x287, 0x174e: 0x288, 0x174f: 0x289, + // Block 0x5e, offset 0x1780 + 0x17a4: 0xfb, 0x17a5: 0xfc, 0x17a6: 0xfd, 0x17a7: 0xfe, + 0x17a8: 0xff, 0x17a9: 0x100, 0x17aa: 0x101, 0x17ab: 0x102, 0x17ac: 0x28a, 0x17ad: 0x104, 0x17ae: 0x105, 0x17af: 0x106, + 0x17b0: 0x107, 0x17b1: 0x108, 0x17b2: 0x109, 0x17b3: 0x10a, 0x17b4: 0x10b, 0x17b5: 0x10c, 0x17b6: 0x10d, 0x17b7: 0x10e, + 0x17b8: 0x10f, 0x17b9: 0x110, 0x17ba: 0x111, 0x17bb: 0x112, 0x17bc: 0x113, 0x17bd: 0x114, 0x17be: 0x115, 0x17bf: 0x116, + // Block 0x5f, offset 0x17c0 + 0x17c0: 0x18b, 0x17c1: 0x18c, 0x17c2: 0x18d, 0x17c3: 0x18e, 0x17c4: 0x28b, 0x17c5: 0x28c, 0x17c6: 0x191, 0x17c7: 0x192, + 0x17c8: 0x193, 0x17c9: 0x194, 0x17cc: 0x195, 0x17cd: 0x196, 0x17ce: 0x197, 0x17cf: 0x198, + 0x17d0: 0x199, 0x17d1: 0x19a, 0x17d2: 0x19b, 0x17d3: 0x19c, 0x17d4: 0x19d, 0x17d5: 0x19e, 0x17d7: 0x19f, + 0x17d8: 0x1a0, 0x17d9: 0x1a1, 0x17da: 0x1a2, 0x17db: 0x1a3, 0x17dc: 0x1a4, 0x17dd: 0x1a5, + // Block 0x60, offset 0x1800 + 0x1810: 0x09, 0x1811: 0x0a, 0x1812: 0x0b, 0x1813: 0x0c, 0x1816: 0x0d, + 0x181b: 0x0e, 0x181d: 0x0f, 0x181e: 0x10, 0x181f: 0x5d, + 0x182f: 0x12, + // Block 0x61, offset 0x1840 + 0x1842: 0x01, 0x1843: 0x27a, 0x1844: 0x27b, 0x1845: 0x27c, 0x1846: 0x27d, 0x1847: 0x27e, + 0x1848: 0x27f, 0x1849: 0x08, 0x184a: 0x280, 0x184b: 0x0a, 0x184c: 0x0b, 0x184d: 0x0c, 0x184e: 0x0d, 0x184f: 0x0e, + 0x1850: 0x0f, 0x1851: 0x10, 0x1852: 0x11, 0x1853: 0x12, 0x1854: 0x13, 0x1855: 0x14, 0x1856: 0x15, 0x1857: 0x16, + 0x1858: 0x17, 0x1859: 0x18, 0x185a: 0x19, 0x185b: 0x1a, 0x185c: 0x1b, 0x185d: 0x1c, 0x185e: 0x1d, 0x185f: 0x1e, + 0x1860: 0x01, 0x1861: 0x59, 0x1862: 0x5a, 0x1863: 0x5b, 0x1864: 0x05, + 0x186a: 0x06, 0x186d: 0x07, 0x186f: 0x5c, + 0x1870: 0x5e, 0x1873: 0x15, + // Block 0x62, offset 0x1880 + 0x1882: 0x01, 0x1883: 0x02, 0x1884: 0x03, 0x1885: 0x04, 0x1886: 0x05, 0x1887: 0x06, + 0x1888: 0x07, 0x1889: 0x08, 0x188a: 0x09, 0x188b: 0x0a, 0x188c: 0x0b, 0x188d: 0x0c, 0x188e: 0x0d, 0x188f: 0x0e, + 0x1890: 0x0f, 0x1891: 0x10, 0x1892: 0x11, 0x1893: 0x12, 0x1894: 0x13, 0x1895: 0x14, 0x1896: 0x15, 0x1897: 0x28d, + 0x1898: 0x17, 0x1899: 0x18, 0x189a: 0x19, 0x189b: 0x1a, 0x189c: 0x1b, 0x189d: 0x1c, 0x189e: 0x1d, 0x189f: 0x1e, + 0x18a0: 0x01, 0x18a1: 0x02, 0x18a2: 0x03, 0x18a3: 0x04, 0x18a4: 0x05, + 0x18aa: 0x06, 0x18ad: 0x07, 0x18af: 0x08, + 0x18b0: 0x13, 0x18b3: 0x15, + // Block 0x63, offset 0x18c0 + 0x18e0: 0x1f, 0x18e1: 0x20, 0x18e2: 0x21, 0x18e3: 0x22, 0x18e4: 0x28e, 0x18e5: 0x24, 0x18e6: 0x25, 0x18e7: 0x26, + 0x18e8: 0x27, 0x18e9: 0x28, 0x18ea: 0x29, 0x18eb: 0x2a, 0x18ec: 0x2b, 0x18ed: 0x2c, 0x18ee: 0x2d, 0x18ef: 0x2e, + 0x18f0: 0x2f, 0x18f1: 0x30, 0x18f2: 0x31, 0x18f3: 0x32, 0x18f4: 0x33, 0x18f5: 0x34, 0x18f6: 0x35, 0x18f7: 0x36, + 0x18f8: 0x37, 0x18f9: 0x38, 0x18fa: 0x39, 0x18fb: 0x3a, 0x18fc: 0x3b, 0x18fd: 0x3c, 0x18fe: 0x3d, 0x18ff: 0x3e, + // Block 0x64, offset 0x1900 + 0x1902: 0x01, 0x1903: 0x02, 0x1904: 0x03, 0x1905: 0x04, 0x1906: 0x05, 0x1907: 0x06, + 0x1908: 0x07, 0x1909: 0x08, 0x190a: 0x09, 0x190b: 0x0a, 0x190c: 0x0b, 0x190d: 0x0c, 0x190e: 0x0d, 0x190f: 0x0e, + 0x1910: 0x0f, 0x1911: 0x10, 0x1912: 0x11, 0x1913: 0x12, 0x1914: 0x13, 0x1915: 0x14, 0x1916: 0x15, 0x1917: 0x16, + 0x1918: 0x17, 0x1919: 0x18, 0x191a: 0x19, 0x191b: 0x1a, 0x191c: 0x1b, 0x191d: 0x1c, 0x191e: 0x1d, 0x191f: 0x1e, + 0x1920: 0x61, 0x1921: 0x02, 0x1922: 0x03, 0x1923: 0x04, 0x1924: 0x05, + 0x192a: 0x06, 0x192d: 0x07, 0x192f: 0x08, + 0x1930: 0x13, 0x1933: 0x15, + // Block 0x65, offset 0x1940 + 0x1940: 0x3f, 0x1941: 0x40, 0x1942: 0x41, 0x1943: 0x42, 0x1944: 0x43, 0x1945: 0x44, 0x1946: 0x45, 0x1947: 0x46, + 0x1948: 0x47, 0x1949: 0x48, 0x194a: 0x49, 0x194b: 0x4a, 0x194c: 0x4b, 0x194d: 0x4c, 0x194e: 0x4d, 0x194f: 0x4e, + 0x1950: 0x4f, 0x1951: 0x50, 0x1952: 0x51, 0x1953: 0x52, 0x1954: 0x53, 0x1955: 0x54, 0x1956: 0x55, 0x1957: 0x56, + 0x1958: 0x57, 0x1959: 0x58, 0x195a: 0x59, 0x195b: 0x5a, 0x195c: 0x5b, 0x195d: 0x5c, 0x195e: 0x5d, 0x195f: 0x5e, + 0x1960: 0x5f, 0x1961: 0x60, 0x1962: 0x61, 0x1963: 0x62, 0x1964: 0x63, 0x1965: 0x64, 0x1966: 0x65, 0x1967: 0x66, + 0x1968: 0x67, 0x1969: 0x68, 0x196a: 0x69, 0x196c: 0x6a, 0x196d: 0x6b, 0x196e: 0x6c, 0x196f: 0x6d, + 0x1970: 0x6e, 0x1971: 0x6f, 0x1973: 0x70, 0x1974: 0x71, 0x1975: 0x72, 0x1976: 0x73, 0x1977: 0x74, + 0x1978: 0x294, 0x1979: 0x1f2, 0x197a: 0x77, 0x197b: 0x78, 0x197c: 0x79, 0x197d: 0x7a, 0x197e: 0x7b, 0x197f: 0x7c, + // Block 0x66, offset 0x1980 + 0x1982: 0x01, 0x1983: 0x02, 0x1984: 0x291, 0x1985: 0x292, 0x1986: 0x05, 0x1987: 0x293, + 0x1988: 0x07, 0x1989: 0x08, 0x198a: 0x09, 0x198b: 0x0a, 0x198c: 0x0b, 0x198d: 0x0c, 0x198e: 0x0d, 0x198f: 0x0e, + 0x1990: 0x0f, 0x1991: 0x10, 0x1992: 0x11, 0x1993: 0x12, 0x1994: 0x13, 0x1995: 0x14, 0x1996: 0x15, 0x1997: 0x16, + 0x1998: 0x17, 0x1999: 0x18, 0x199a: 0x19, 0x199b: 0x1a, 0x199c: 0x1b, 0x199d: 0x1c, 0x199e: 0x1d, 0x199f: 0x1e, + 0x19a0: 0x01, 0x19a1: 0x63, 0x19a2: 0x03, 0x19a3: 0x04, 0x19a4: 0x05, + 0x19aa: 0x06, 0x19ad: 0x07, 0x19af: 0x08, + 0x19b0: 0x13, 0x19b3: 0x15, + // Block 0x67, offset 0x19c0 + 0x19c0: 0x3f, 0x19c1: 0x40, 0x19c2: 0x41, 0x19c3: 0x42, 0x19c4: 0x43, 0x19c5: 0x44, 0x19c6: 0x45, 0x19c7: 0x46, + 0x19c8: 0x47, 0x19c9: 0x48, 0x19ca: 0x49, 0x19cb: 0x4a, 0x19cc: 0x4b, 0x19cd: 0x4c, 0x19ce: 0x4d, 0x19cf: 0x4e, + 0x19d0: 0x4f, 0x19d1: 0x50, 0x19d2: 0x51, 0x19d3: 0x52, 0x19d4: 0x53, 0x19d5: 0x54, 0x19d6: 0x55, 0x19d7: 0x56, + 0x19d8: 0x57, 0x19d9: 0x58, 0x19da: 0x59, 0x19db: 0x5a, 0x19dc: 0x5b, 0x19dd: 0x5c, 0x19de: 0x5d, 0x19df: 0x5e, + 0x19e0: 0x5f, 0x19e1: 0x60, 0x19e2: 0x61, 0x19e3: 0x62, 0x19e4: 0x63, 0x19e5: 0x64, 0x19e6: 0x65, 0x19e7: 0x66, + 0x19e8: 0x67, 0x19e9: 0x68, 0x19ea: 0x69, 0x19ec: 0x6a, 0x19ed: 0x6b, 0x19ee: 0x6c, 0x19ef: 0x6d, + 0x19f0: 0x6e, 0x19f1: 0x6f, 0x19f3: 0x70, 0x19f4: 0x71, 0x19f5: 0x72, 0x19f6: 0x73, 0x19f7: 0x74, + 0x19f8: 0x75, 0x19f9: 0x1df, 0x19fa: 0x77, 0x19fb: 0x78, 0x19fc: 0x79, 0x19fd: 0x7a, 0x19fe: 0x7b, 0x19ff: 0x7c, + // Block 0x68, offset 0x1a00 + 0x1a02: 0x01, 0x1a03: 0x297, 0x1a04: 0x03, 0x1a05: 0x298, 0x1a06: 0x05, 0x1a07: 0x299, + 0x1a08: 0x29a, 0x1a09: 0x08, 0x1a0a: 0x09, 0x1a0b: 0x0a, 0x1a0c: 0x0b, 0x1a0d: 0x0c, 0x1a0e: 0x0d, 0x1a0f: 0x0e, + 0x1a10: 0x0f, 0x1a11: 0x10, 0x1a12: 0x11, 0x1a13: 0x12, 0x1a14: 0x13, 0x1a15: 0x14, 0x1a16: 0x15, 0x1a17: 0x16, + 0x1a18: 0x17, 0x1a19: 0x18, 0x1a1a: 0x19, 0x1a1b: 0x1a, 0x1a1c: 0x1b, 0x1a1d: 0x1c, 0x1a1e: 0x1d, 0x1a1f: 0x1e, + 0x1a20: 0x01, 0x1a21: 0x65, 0x1a22: 0x03, 0x1a23: 0x04, 0x1a24: 0x05, + 0x1a2a: 0x06, 0x1a2d: 0x07, 0x1a2f: 0x08, + 0x1a30: 0x13, 0x1a33: 0x15, + // Block 0x69, offset 0x1a40 + 0x1a42: 0x01, 0x1a43: 0x02, 0x1a44: 0x03, 0x1a45: 0x04, 0x1a46: 0x05, 0x1a47: 0x06, + 0x1a48: 0x07, 0x1a49: 0x08, 0x1a4a: 0x09, 0x1a4b: 0x0a, 0x1a4c: 0x0b, 0x1a4d: 0x0c, 0x1a4e: 0x0d, 0x1a4f: 0x0e, + 0x1a50: 0x0f, 0x1a51: 0x10, 0x1a52: 0x11, 0x1a53: 0x12, 0x1a54: 0x29b, 0x1a55: 0x14, 0x1a56: 0x29c, 0x1a57: 0x16, + 0x1a58: 0x17, 0x1a59: 0x18, 0x1a5a: 0x19, 0x1a5b: 0x1a, 0x1a5c: 0x1b, 0x1a5d: 0x1c, 0x1a5e: 0x1d, 0x1a5f: 0x1e, + 0x1a60: 0x01, 0x1a61: 0x02, 0x1a62: 0x03, 0x1a63: 0x04, 0x1a64: 0x05, + 0x1a6a: 0x06, 0x1a6d: 0x07, 0x1a6f: 0x08, + 0x1a70: 0x13, 0x1a73: 0x15, + // Block 0x6a, offset 0x1a80 + 0x1a80: 0x3f, 0x1a81: 0x40, 0x1a82: 0x41, 0x1a83: 0x42, 0x1a84: 0x43, 0x1a85: 0x44, 0x1a86: 0x45, 0x1a87: 0x46, + 0x1a88: 0x47, 0x1a89: 0x48, 0x1a8a: 0x49, 0x1a8b: 0x4a, 0x1a8c: 0x4b, 0x1a8d: 0x4c, 0x1a8e: 0x4d, 0x1a8f: 0x4e, + 0x1a90: 0x4f, 0x1a91: 0x50, 0x1a92: 0x51, 0x1a93: 0x52, 0x1a94: 0x53, 0x1a95: 0x54, 0x1a96: 0x55, 0x1a97: 0x56, + 0x1a98: 0x57, 0x1a99: 0x58, 0x1a9a: 0x59, 0x1a9b: 0x5a, 0x1a9c: 0x5b, 0x1a9d: 0x5c, 0x1a9e: 0x5d, 0x1a9f: 0x5e, + 0x1aa0: 0x5f, 0x1aa1: 0x60, 0x1aa2: 0x61, 0x1aa3: 0x62, 0x1aa4: 0x63, 0x1aa5: 0x64, 0x1aa6: 0x65, 0x1aa7: 0x66, + 0x1aa8: 0x67, 0x1aa9: 0x68, 0x1aaa: 0x69, 0x1aac: 0x6a, 0x1aad: 0x6b, 0x1aae: 0x6c, 0x1aaf: 0x6d, + 0x1ab0: 0x6e, 0x1ab1: 0x6f, 0x1ab3: 0x70, 0x1ab4: 0x71, 0x1ab5: 0x72, 0x1ab6: 0x73, 0x1ab7: 0x74, + 0x1ab8: 0x75, 0x1ab9: 0x29f, 0x1aba: 0x77, 0x1abb: 0x2a0, 0x1abc: 0x79, 0x1abd: 0x7a, 0x1abe: 0x7b, 0x1abf: 0x7c, + // Block 0x6b, offset 0x1ac0 + 0x1ac2: 0x01, 0x1ac3: 0x02, 0x1ac4: 0x03, 0x1ac5: 0x04, 0x1ac6: 0x05, 0x1ac7: 0x06, + 0x1ac8: 0x07, 0x1ac9: 0x08, 0x1aca: 0x09, 0x1acb: 0x0a, 0x1acc: 0x0b, 0x1acd: 0x0c, 0x1ace: 0x0d, 0x1acf: 0x0e, + 0x1ad0: 0x0f, 0x1ad1: 0x10, 0x1ad2: 0x11, 0x1ad3: 0x12, 0x1ad4: 0x13, 0x1ad5: 0x14, 0x1ad6: 0x15, 0x1ad7: 0x16, + 0x1ad8: 0x17, 0x1ad9: 0x18, 0x1ada: 0x19, 0x1adb: 0x1a, 0x1adc: 0x1b, 0x1add: 0x1c, 0x1ade: 0x1d, 0x1adf: 0x1e, + 0x1ae0: 0x01, 0x1ae1: 0x68, 0x1ae2: 0x03, 0x1ae3: 0x04, 0x1ae4: 0x05, + 0x1aea: 0x06, 0x1aed: 0x07, 0x1aef: 0x08, + 0x1af0: 0x13, 0x1af3: 0x15, + // Block 0x6c, offset 0x1b00 + 0x1b00: 0x3f, 0x1b01: 0x40, 0x1b02: 0x41, 0x1b03: 0x42, 0x1b04: 0x43, 0x1b05: 0x44, 0x1b06: 0x45, 0x1b07: 0x46, + 0x1b08: 0x47, 0x1b09: 0x48, 0x1b0a: 0x49, 0x1b0b: 0x4a, 0x1b0c: 0x4b, 0x1b0d: 0x4c, 0x1b0e: 0x4d, 0x1b0f: 0x4e, + 0x1b10: 0x4f, 0x1b11: 0x50, 0x1b12: 0x51, 0x1b13: 0x52, 0x1b14: 0x53, 0x1b15: 0x54, 0x1b16: 0x55, 0x1b17: 0x56, + 0x1b18: 0x57, 0x1b19: 0x58, 0x1b1a: 0x59, 0x1b1b: 0x5a, 0x1b1c: 0x5b, 0x1b1d: 0x5c, 0x1b1e: 0x5d, 0x1b1f: 0x5e, + 0x1b20: 0x5f, 0x1b21: 0x60, 0x1b22: 0x61, 0x1b23: 0x62, 0x1b24: 0x63, 0x1b25: 0x64, 0x1b26: 0x65, 0x1b27: 0x66, + 0x1b28: 0x67, 0x1b29: 0x68, 0x1b2a: 0x69, 0x1b2c: 0x6a, 0x1b2d: 0x6b, 0x1b2e: 0x6c, 0x1b2f: 0x6d, + 0x1b30: 0x6e, 0x1b31: 0x6f, 0x1b33: 0x70, 0x1b34: 0x71, 0x1b35: 0x72, 0x1b36: 0x1fc, 0x1b37: 0x74, + 0x1b38: 0x2a7, 0x1b39: 0x2a8, 0x1b3a: 0x2a9, 0x1b3b: 0x2aa, 0x1b3c: 0x79, 0x1b3d: 0x7a, 0x1b3e: 0x7b, 0x1b3f: 0x7c, + // Block 0x6d, offset 0x1b40 + 0x1b42: 0x01, 0x1b43: 0x2a3, 0x1b44: 0x2a4, 0x1b45: 0x04, 0x1b46: 0x05, 0x1b47: 0x2a5, + 0x1b48: 0x2a6, 0x1b49: 0x08, 0x1b4a: 0x09, 0x1b4b: 0x0a, 0x1b4c: 0x0b, 0x1b4d: 0x0c, 0x1b4e: 0x0d, 0x1b4f: 0x0e, + 0x1b50: 0x0f, 0x1b51: 0x10, 0x1b52: 0x11, 0x1b53: 0x12, 0x1b54: 0x13, 0x1b55: 0x14, 0x1b56: 0x15, 0x1b57: 0x16, + 0x1b58: 0x17, 0x1b59: 0x18, 0x1b5a: 0x19, 0x1b5b: 0x1a, 0x1b5c: 0x1b, 0x1b5d: 0x1c, 0x1b5e: 0x1d, 0x1b5f: 0x1e, + 0x1b60: 0x01, 0x1b61: 0x6a, 0x1b62: 0x30, 0x1b63: 0x04, 0x1b64: 0x05, + 0x1b6a: 0x06, 0x1b6d: 0x07, 0x1b6f: 0x08, + 0x1b70: 0x13, 0x1b73: 0x15, + // Block 0x6e, offset 0x1b80 + 0x1b80: 0x2ab, 0x1b81: 0x2ac, 0x1b82: 0x2ad, 0x1b83: 0x2ae, 0x1b84: 0x2af, 0x1b85: 0x2b0, 0x1b86: 0xc0, 0x1b87: 0x2b1, + 0x1b88: 0x2b2, 0x1b89: 0x2b3, 0x1b8a: 0xc4, 0x1b8b: 0x2b4, 0x1b8c: 0xc6, 0x1b8d: 0x2b5, 0x1b8e: 0xc8, 0x1b8f: 0x2b6, + // Block 0x6f, offset 0x1bc0 + 0x1bf7: 0xca, + 0x1bf8: 0x2b7, 0x1bf9: 0x2b8, 0x1bfa: 0x2b9, 0x1bfb: 0x2ba, 0x1bfc: 0x2bb, 0x1bfd: 0x2bc, 0x1bfe: 0x2bd, 0x1bff: 0x2be, + // Block 0x70, offset 0x1c00 + 0x1c00: 0x2bf, 0x1c01: 0x2c0, 0x1c02: 0x2c1, 0x1c03: 0x2c2, 0x1c04: 0x2c3, 0x1c05: 0x2c4, 0x1c06: 0x2c5, 0x1c07: 0x2c6, + 0x1c08: 0x2c7, 0x1c09: 0x2c8, 0x1c0a: 0x2c9, 0x1c0b: 0x2ca, 0x1c0c: 0x2cb, 0x1c0d: 0x2cc, 0x1c0e: 0x2cd, 0x1c0f: 0x2ce, + 0x1c10: 0x2cf, 0x1c11: 0x2d0, 0x1c12: 0x2d1, 0x1c13: 0x2d2, 0x1c14: 0x2d3, 0x1c15: 0x2d4, 0x1c16: 0x2d5, 0x1c17: 0x2d6, + 0x1c18: 0x2d7, 0x1c19: 0x2d8, 0x1c1a: 0x2d9, 0x1c1b: 0x2da, 0x1c1c: 0x2db, 0x1c1d: 0x2dc, 0x1c1e: 0x2dd, 0x1c1f: 0x2de, + 0x1c20: 0x2df, 0x1c21: 0x2e0, 0x1c22: 0x2e1, 0x1c23: 0x2e2, 0x1c24: 0x2e3, 0x1c25: 0x2e4, 0x1c26: 0x2e5, 0x1c27: 0x2e6, + 0x1c28: 0x2e7, 0x1c29: 0x2e8, 0x1c2a: 0x2e9, 0x1c2b: 0x2ea, 0x1c2c: 0x2eb, 0x1c2d: 0x2ec, 0x1c2e: 0x2ed, 0x1c2f: 0x2ee, + 0x1c30: 0x2ef, 0x1c31: 0x2f0, 0x1c32: 0x2f1, 0x1c33: 0x2f2, 0x1c34: 0x2f3, 0x1c35: 0x2f4, 0x1c36: 0x2f5, 0x1c37: 0x2f6, + 0x1c38: 0x2f7, 0x1c39: 0x2f8, 0x1c3a: 0x2f9, 0x1c3b: 0x2fa, 0x1c3c: 0x2fb, 0x1c3d: 0x2fc, 0x1c3e: 0x2fd, 0x1c3f: 0x2fe, + // Block 0x71, offset 0x1c40 + 0x1c40: 0x2ff, 0x1c41: 0x300, 0x1c42: 0x301, 0x1c43: 0x302, 0x1c44: 0x303, 0x1c45: 0x304, 0x1c46: 0x305, 0x1c47: 0x306, + 0x1c48: 0x307, 0x1c49: 0x308, 0x1c4a: 0x309, 0x1c4b: 0x30a, 0x1c4c: 0x30b, 0x1c4d: 0x30c, 0x1c4e: 0x30d, 0x1c4f: 0x30e, + 0x1c50: 0x30f, 0x1c51: 0x310, 0x1c52: 0x311, 0x1c53: 0x312, 0x1c54: 0x313, 0x1c55: 0x314, 0x1c56: 0x315, 0x1c57: 0x316, + 0x1c58: 0x317, 0x1c59: 0x318, 0x1c5a: 0x319, 0x1c5b: 0x31a, 0x1c5c: 0x31b, 0x1c5d: 0x31c, 0x1c5e: 0x31d, 0x1c5f: 0x31e, + 0x1c60: 0x31f, 0x1c61: 0x320, 0x1c62: 0x321, 0x1c63: 0x322, 0x1c64: 0x323, 0x1c65: 0x324, 0x1c66: 0x325, 0x1c67: 0x326, + 0x1c68: 0x327, 0x1c69: 0x328, 0x1c6a: 0x329, 0x1c6b: 0x32a, 0x1c6c: 0x32b, 0x1c6d: 0x32c, 0x1c6e: 0x32d, 0x1c6f: 0x32e, + 0x1c70: 0x32f, 0x1c71: 0x330, 0x1c72: 0x331, 0x1c73: 0x332, 0x1c74: 0x333, 0x1c75: 0x334, 0x1c76: 0x335, 0x1c77: 0x336, + 0x1c78: 0x337, 0x1c79: 0x338, 0x1c7a: 0x339, 0x1c7b: 0x33a, 0x1c7c: 0x33b, 0x1c7d: 0x33c, 0x1c7e: 0x33d, 0x1c7f: 0x33e, + // Block 0x72, offset 0x1c80 + 0x1c80: 0x33f, 0x1c81: 0x340, 0x1c82: 0x341, 0x1c83: 0x342, 0x1c84: 0x343, 0x1c85: 0x344, 0x1c86: 0x345, 0x1c87: 0x346, + 0x1c88: 0x347, 0x1c89: 0x348, 0x1c8a: 0x349, 0x1c8b: 0x34a, 0x1c8c: 0x34b, 0x1c8d: 0x34c, 0x1c8e: 0x34d, 0x1c8f: 0x34e, + 0x1c90: 0x34f, 0x1c91: 0x350, 0x1c92: 0x351, 0x1c93: 0x352, 0x1c94: 0x353, 0x1c95: 0x354, 0x1c96: 0x355, 0x1c97: 0x356, + 0x1c98: 0x357, 0x1c99: 0x358, 0x1c9a: 0x359, 0x1c9b: 0x35a, 0x1c9c: 0x35b, 0x1c9d: 0x35c, 0x1c9e: 0x35d, 0x1c9f: 0x35e, + 0x1ca0: 0x35f, 0x1ca1: 0x360, 0x1ca2: 0x361, 0x1ca3: 0x362, 0x1ca4: 0x363, 0x1ca5: 0x364, 0x1ca6: 0x365, 0x1ca7: 0x366, + 0x1ca8: 0x367, 0x1ca9: 0x368, 0x1caa: 0x369, 0x1cab: 0x36a, 0x1cac: 0x36b, 0x1cad: 0x36c, 0x1cae: 0x36d, 0x1caf: 0x36e, + 0x1cb0: 0x36f, 0x1cb1: 0x370, 0x1cb2: 0x371, 0x1cb3: 0x372, 0x1cb4: 0x373, 0x1cb5: 0x374, 0x1cb6: 0x375, 0x1cb7: 0x376, + 0x1cb8: 0x377, 0x1cb9: 0x378, 0x1cba: 0x379, 0x1cbc: 0x37a, 0x1cbd: 0x37b, 0x1cbe: 0x37c, 0x1cbf: 0x37d, + // Block 0x73, offset 0x1cc0 + 0x1cc0: 0x37e, 0x1cc1: 0x37f, 0x1cc2: 0x380, 0x1cc3: 0x381, 0x1cc4: 0x382, 0x1cc5: 0x383, 0x1cc6: 0x384, 0x1cc7: 0x385, + 0x1cc8: 0x386, 0x1cc9: 0x387, 0x1cca: 0x388, 0x1ccb: 0x389, 0x1ccc: 0x38a, 0x1ccd: 0x38b, 0x1cce: 0x38c, 0x1ccf: 0x38d, + 0x1cd0: 0x38e, 0x1cd1: 0x38f, 0x1cd2: 0x390, 0x1cd3: 0x391, 0x1cd4: 0x392, 0x1cd5: 0x393, 0x1cd6: 0x394, 0x1cd7: 0x395, + 0x1cd8: 0x396, 0x1cd9: 0x397, 0x1cda: 0x398, 0x1cdb: 0x399, 0x1cdc: 0x39a, 0x1cdd: 0x39b, 0x1cde: 0x39c, 0x1cdf: 0x39d, + 0x1ce0: 0x39e, 0x1ce1: 0x39f, 0x1ce2: 0x3a0, 0x1ce3: 0x3a1, 0x1ce4: 0x3a2, 0x1ce5: 0x3a3, 0x1ce6: 0x3a4, 0x1ce7: 0x3a5, + 0x1ce8: 0x3a6, 0x1ce9: 0x3a7, 0x1cea: 0x3a8, 0x1ceb: 0x3a9, 0x1cec: 0x3aa, 0x1ced: 0x3ab, 0x1cee: 0x3ac, + 0x1cf0: 0x3ad, 0x1cf1: 0x3ae, 0x1cf2: 0x3af, 0x1cf3: 0x3b0, 0x1cf4: 0x3b1, 0x1cf5: 0x3b2, 0x1cf6: 0x3b3, 0x1cf7: 0x3b4, + 0x1cf8: 0x3b5, 0x1cf9: 0x3b6, 0x1cfa: 0x3b7, 0x1cfb: 0x3b8, 0x1cfc: 0x3b9, 0x1cfd: 0x3ba, 0x1cfe: 0x3bb, 0x1cff: 0x3bc, + // Block 0x74, offset 0x1d00 + 0x1d00: 0x3bd, 0x1d01: 0x3be, 0x1d02: 0x3bf, 0x1d03: 0x3c0, 0x1d04: 0x3c1, 0x1d05: 0x3c2, 0x1d06: 0x3c3, 0x1d07: 0x3c4, + 0x1d08: 0x3c5, 0x1d09: 0x3c6, 0x1d0a: 0x3c7, 0x1d0b: 0x3c8, 0x1d0c: 0x3c9, 0x1d0d: 0x3ca, 0x1d0e: 0x3cb, 0x1d0f: 0x3cc, + 0x1d10: 0x3cd, 0x1d11: 0x3ce, 0x1d12: 0x3cf, 0x1d15: 0x3d0, 0x1d16: 0x3d1, 0x1d17: 0x3d2, + 0x1d18: 0x3d3, 0x1d19: 0x3d4, 0x1d1a: 0x3d5, 0x1d1b: 0x3d6, 0x1d1c: 0x3d7, 0x1d1d: 0x3d8, 0x1d1e: 0x3d9, 0x1d1f: 0x3da, + 0x1d20: 0x3db, 0x1d21: 0x3dc, 0x1d22: 0x3dd, 0x1d23: 0x3de, 0x1d24: 0x3df, 0x1d25: 0x3e0, 0x1d26: 0x3e1, 0x1d27: 0x3e2, + 0x1d28: 0x3e3, 0x1d29: 0x3e4, 0x1d2a: 0x3e5, 0x1d2b: 0x3e6, 0x1d2c: 0x3e7, 0x1d2d: 0x3e8, 0x1d2e: 0x3e9, 0x1d2f: 0x3ea, + 0x1d30: 0x3eb, 0x1d31: 0x3ec, 0x1d33: 0x3ed, 0x1d34: 0x3ee, 0x1d35: 0x3ef, 0x1d36: 0x3f0, 0x1d37: 0x3f1, + 0x1d38: 0x3f2, 0x1d39: 0x3f3, 0x1d3a: 0x3f4, 0x1d3b: 0x3f5, 0x1d3c: 0x3f6, 0x1d3d: 0x3f7, 0x1d3e: 0x3f8, + // Block 0x75, offset 0x1d40 + 0x1d64: 0x3f9, 0x1d65: 0x3fa, 0x1d66: 0x3fb, 0x1d67: 0x3fc, + 0x1d68: 0x3fd, 0x1d69: 0x3fe, 0x1d6a: 0x3ff, 0x1d6b: 0x400, 0x1d6c: 0x103, 0x1d6d: 0x104, 0x1d6e: 0x105, 0x1d6f: 0x106, + 0x1d70: 0x107, 0x1d71: 0x108, 0x1d72: 0x109, 0x1d73: 0x10a, 0x1d74: 0x10b, 0x1d75: 0x10c, 0x1d76: 0x10d, 0x1d77: 0x10e, + 0x1d78: 0x10f, 0x1d79: 0x110, 0x1d7a: 0x111, 0x1d7b: 0x112, 0x1d7c: 0x401, 0x1d7d: 0x402, 0x1d7e: 0x403, 0x1d7f: 0x404, + // Block 0x76, offset 0x1d80 + 0x1d80: 0x18b, 0x1d81: 0x18c, 0x1d82: 0x18d, 0x1d83: 0x18e, 0x1d84: 0x18f, 0x1d85: 0x190, 0x1d86: 0x191, 0x1d87: 0x192, + 0x1d88: 0x193, 0x1d89: 0x405, 0x1d8c: 0x195, 0x1d8d: 0x196, 0x1d8e: 0x197, 0x1d8f: 0x198, + 0x1d90: 0x199, 0x1d91: 0x19a, 0x1d92: 0x19b, 0x1d93: 0x19c, 0x1d94: 0x19d, 0x1d95: 0x19e, 0x1d97: 0x19f, + 0x1d98: 0x1a0, 0x1d99: 0x1a1, 0x1d9a: 0x1a2, 0x1d9b: 0x1a3, 0x1d9c: 0x1a4, 0x1d9d: 0x1a5, + // Block 0x77, offset 0x1dc0 + 0x1de0: 0x406, 0x1de1: 0x407, 0x1de2: 0x408, 0x1de3: 0x409, 0x1de4: 0x40a, 0x1de5: 0x40b, 0x1de6: 0x40c, 0x1de7: 0x40d, + 0x1de8: 0x40e, + // Block 0x78, offset 0x1e00 + 0x1e10: 0x09, 0x1e11: 0x0a, 0x1e12: 0x0b, 0x1e13: 0x0c, 0x1e16: 0x0d, + 0x1e1b: 0x0e, 0x1e1d: 0x0f, 0x1e1e: 0x10, 0x1e1f: 0x74, + 0x1e2f: 0x75, + // Block 0x79, offset 0x1e40 + 0x1e42: 0x01, 0x1e43: 0x02, 0x1e44: 0x03, 0x1e45: 0x04, 0x1e46: 0x05, 0x1e47: 0x06, + 0x1e48: 0x07, 0x1e49: 0x08, 0x1e4a: 0x09, 0x1e4b: 0x0a, 0x1e4c: 0x0b, 0x1e4d: 0x0c, 0x1e4e: 0x0d, 0x1e4f: 0x0e, + 0x1e50: 0x0f, 0x1e51: 0x10, 0x1e52: 0x11, 0x1e53: 0x12, 0x1e54: 0x13, 0x1e55: 0x14, 0x1e56: 0x15, 0x1e57: 0x16, + 0x1e58: 0x17, 0x1e59: 0x18, 0x1e5a: 0x19, 0x1e5b: 0x1a, 0x1e5c: 0x1b, 0x1e5d: 0x1c, 0x1e5e: 0x1d, 0x1e5f: 0x1e, + 0x1e60: 0x01, 0x1e61: 0x02, 0x1e62: 0x03, 0x1e63: 0x6c, 0x1e64: 0x6d, 0x1e65: 0x6e, 0x1e66: 0x6f, 0x1e67: 0x70, + 0x1e68: 0x71, 0x1e69: 0x72, 0x1e6a: 0x06, 0x1e6d: 0x07, 0x1e6f: 0x73, + 0x1e70: 0x76, 0x1e73: 0x15, + // Block 0x7a, offset 0x1e80 + 0x1e82: 0x01, 0x1e83: 0x02, 0x1e84: 0x03, 0x1e85: 0x04, 0x1e86: 0x05, 0x1e87: 0x06, + 0x1e88: 0x07, 0x1e89: 0x08, 0x1e8a: 0x09, 0x1e8b: 0x0a, 0x1e8c: 0x0b, 0x1e8d: 0x0c, 0x1e8e: 0x0d, 0x1e8f: 0x0e, + 0x1e90: 0x40f, 0x1e91: 0x410, 0x1e92: 0x411, 0x1e93: 0x12, 0x1e94: 0x13, 0x1e95: 0x14, 0x1e96: 0x15, 0x1e97: 0x16, + 0x1e98: 0x17, 0x1e99: 0x18, 0x1e9a: 0x19, 0x1e9b: 0x1a, 0x1e9c: 0x1b, 0x1e9d: 0x1c, 0x1e9e: 0x1d, 0x1e9f: 0x1e, + 0x1ea0: 0x01, 0x1ea1: 0x02, 0x1ea2: 0x03, 0x1ea3: 0x04, 0x1ea4: 0x05, + 0x1eaa: 0x06, 0x1ead: 0x07, 0x1eaf: 0x08, + 0x1eb0: 0x13, 0x1eb3: 0x15, + // Block 0x7b, offset 0x1ec0 + 0x1ec2: 0x01, 0x1ec3: 0x1f7, 0x1ec4: 0x414, 0x1ec5: 0x1f9, 0x1ec6: 0x05, 0x1ec7: 0x1fa, + 0x1ec8: 0x1fb, 0x1ec9: 0x08, 0x1eca: 0x09, 0x1ecb: 0x0a, 0x1ecc: 0x0b, 0x1ecd: 0x0c, 0x1ece: 0x0d, 0x1ecf: 0x0e, + 0x1ed0: 0x0f, 0x1ed1: 0x10, 0x1ed2: 0x11, 0x1ed3: 0x12, 0x1ed4: 0x13, 0x1ed5: 0x14, 0x1ed6: 0x15, 0x1ed7: 0x16, + 0x1ed8: 0x17, 0x1ed9: 0x18, 0x1eda: 0x19, 0x1edb: 0x1a, 0x1edc: 0x1b, 0x1edd: 0x1c, 0x1ede: 0x1d, 0x1edf: 0x1e, + 0x1ee0: 0x01, 0x1ee1: 0x2f, 0x1ee2: 0x30, 0x1ee3: 0x04, 0x1ee4: 0x05, + 0x1eea: 0x06, 0x1eed: 0x07, 0x1eef: 0x08, + 0x1ef0: 0x13, 0x1ef3: 0x15, + // Block 0x7c, offset 0x1f00 + 0x1f00: 0x3f, 0x1f01: 0x40, 0x1f02: 0x41, 0x1f03: 0x42, 0x1f04: 0x43, 0x1f05: 0x44, 0x1f06: 0x45, 0x1f07: 0x46, + 0x1f08: 0x47, 0x1f09: 0x48, 0x1f0a: 0x49, 0x1f0b: 0x4a, 0x1f0c: 0x4b, 0x1f0d: 0x4c, 0x1f0e: 0x4d, 0x1f0f: 0x4e, + 0x1f10: 0x4f, 0x1f11: 0x50, 0x1f12: 0x51, 0x1f13: 0x52, 0x1f14: 0x53, 0x1f15: 0x54, 0x1f16: 0x55, 0x1f17: 0x56, + 0x1f18: 0x57, 0x1f19: 0x58, 0x1f1a: 0x59, 0x1f1b: 0x5a, 0x1f1c: 0x5b, 0x1f1d: 0x5c, 0x1f1e: 0x415, 0x1f1f: 0x416, + 0x1f20: 0x5f, 0x1f21: 0x60, 0x1f22: 0x61, 0x1f23: 0x62, 0x1f24: 0x63, 0x1f25: 0x64, 0x1f26: 0x65, 0x1f27: 0x66, + 0x1f28: 0x67, 0x1f29: 0x68, 0x1f2a: 0x69, 0x1f2c: 0x6a, 0x1f2d: 0x6b, 0x1f2e: 0x6c, 0x1f2f: 0x6d, + 0x1f30: 0x6e, 0x1f31: 0x6f, 0x1f33: 0x70, 0x1f34: 0x71, 0x1f35: 0x72, 0x1f36: 0x73, 0x1f37: 0x74, + 0x1f38: 0x75, 0x1f39: 0x76, 0x1f3a: 0x77, 0x1f3b: 0x78, 0x1f3c: 0x79, 0x1f3d: 0x7a, 0x1f3e: 0x7b, 0x1f3f: 0x7c, + // Block 0x7d, offset 0x1f40 + 0x1f42: 0x01, 0x1f43: 0x02, 0x1f44: 0x03, 0x1f45: 0x04, 0x1f46: 0x05, 0x1f47: 0x06, + 0x1f48: 0x07, 0x1f49: 0x08, 0x1f4a: 0x09, 0x1f4b: 0x0a, 0x1f4c: 0x0b, 0x1f4d: 0x0c, 0x1f4e: 0x0d, 0x1f4f: 0x0e, + 0x1f50: 0x0f, 0x1f51: 0x10, 0x1f52: 0x11, 0x1f53: 0x12, 0x1f54: 0x13, 0x1f55: 0x14, 0x1f56: 0x15, 0x1f57: 0x16, + 0x1f58: 0x17, 0x1f59: 0x18, 0x1f5a: 0x19, 0x1f5b: 0x1a, 0x1f5c: 0x1b, 0x1f5d: 0x1c, 0x1f5e: 0x1d, 0x1f5f: 0x1e, + 0x1f60: 0x01, 0x1f61: 0x7a, 0x1f62: 0x03, 0x1f63: 0x04, 0x1f64: 0x05, + 0x1f6a: 0x06, 0x1f6d: 0x07, 0x1f6f: 0x08, + 0x1f70: 0x13, 0x1f73: 0x15, + // Block 0x7e, offset 0x1f80 + 0x1fa0: 0x1f, 0x1fa1: 0x20, 0x1fa2: 0x21, 0x1fa3: 0x22, 0x1fa4: 0x23, 0x1fa5: 0x24, 0x1fa6: 0x25, 0x1fa7: 0x26, + 0x1fa8: 0x27, 0x1fa9: 0x28, 0x1faa: 0x29, 0x1fab: 0x2a, 0x1fac: 0x2b, 0x1fad: 0x2c, 0x1fae: 0x2d, 0x1faf: 0x2e, + 0x1fb0: 0x2f, 0x1fb1: 0x30, 0x1fb2: 0x417, 0x1fb3: 0x418, 0x1fb4: 0x33, 0x1fb5: 0x34, 0x1fb6: 0x35, 0x1fb7: 0x36, + 0x1fb8: 0x37, 0x1fb9: 0x38, 0x1fba: 0x39, 0x1fbb: 0x3a, 0x1fbc: 0x3b, 0x1fbd: 0x3c, 0x1fbe: 0x3d, 0x1fbf: 0x3e, + // Block 0x7f, offset 0x1fc0 + 0x1fc2: 0x01, 0x1fc3: 0x02, 0x1fc4: 0x03, 0x1fc5: 0x04, 0x1fc6: 0x05, 0x1fc7: 0x06, + 0x1fc8: 0x07, 0x1fc9: 0x08, 0x1fca: 0x09, 0x1fcb: 0x0a, 0x1fcc: 0x0b, 0x1fcd: 0x0c, 0x1fce: 0x0d, 0x1fcf: 0x0e, + 0x1fd0: 0x0f, 0x1fd1: 0x10, 0x1fd2: 0x11, 0x1fd3: 0x12, 0x1fd4: 0x13, 0x1fd5: 0x14, 0x1fd6: 0x15, 0x1fd7: 0x16, + 0x1fd8: 0x17, 0x1fd9: 0x18, 0x1fda: 0x19, 0x1fdb: 0x1a, 0x1fdc: 0x1b, 0x1fdd: 0x1c, 0x1fde: 0x1d, 0x1fdf: 0x1e, + 0x1fe0: 0x7c, 0x1fe1: 0x02, 0x1fe2: 0x03, 0x1fe3: 0x04, 0x1fe4: 0x05, + 0x1fea: 0x06, 0x1fed: 0x07, 0x1fef: 0x08, + 0x1ff0: 0x13, 0x1ff3: 0x15, + // Block 0x80, offset 0x2000 + 0x2000: 0xba, 0x2001: 0xbb, 0x2002: 0xbc, 0x2003: 0xbd, 0x2004: 0xbe, 0x2005: 0xbf, 0x2006: 0xc0, 0x2007: 0xc1, + 0x2008: 0x419, 0x2009: 0x2b3, 0x200a: 0xc4, 0x200b: 0x2b4, 0x200c: 0xc6, 0x200d: 0x2b5, 0x200e: 0xc8, 0x200f: 0x2b6, + // Block 0x81, offset 0x2040 + 0x2077: 0xca, + 0x2078: 0x41a, 0x2079: 0x41b, 0x207a: 0x41c, 0x207b: 0x41d, 0x207c: 0x41e, 0x207d: 0x41f, 0x207e: 0x420, 0x207f: 0x421, + // Block 0x82, offset 0x2080 + 0x2080: 0x422, 0x2081: 0x423, 0x2082: 0x424, 0x2083: 0x425, 0x2084: 0x426, 0x2085: 0x427, 0x2086: 0x428, 0x2087: 0x429, + 0x2088: 0x42a, 0x2089: 0x42b, 0x208a: 0x42c, 0x208b: 0x42d, 0x208c: 0x42e, 0x208d: 0x42f, 0x208e: 0x430, 0x208f: 0x431, + 0x2090: 0x432, 0x2091: 0x433, 0x2092: 0x434, 0x2093: 0x435, 0x2094: 0x436, 0x2095: 0x437, 0x2096: 0x438, 0x2097: 0x439, + 0x2098: 0x43a, 0x2099: 0x43b, 0x209a: 0x43c, 0x209b: 0x43d, 0x209c: 0x43e, 0x209d: 0x43f, 0x209e: 0x440, 0x209f: 0x441, + 0x20a0: 0x442, 0x20a1: 0x443, 0x20a2: 0x444, 0x20a3: 0x445, 0x20a4: 0x446, 0x20a5: 0x447, 0x20a6: 0x448, 0x20a7: 0x449, + 0x20a8: 0x44a, 0x20a9: 0x44b, 0x20aa: 0x44c, 0x20ab: 0x44d, 0x20ac: 0x44e, 0x20ad: 0x44f, 0x20ae: 0x450, 0x20af: 0x451, + 0x20b0: 0x452, 0x20b1: 0x453, 0x20b2: 0x454, 0x20b3: 0x455, 0x20b4: 0x456, 0x20b5: 0x457, 0x20b6: 0x458, 0x20b7: 0x459, + 0x20b8: 0x45a, 0x20b9: 0x45b, 0x20ba: 0x45c, 0x20bb: 0x45d, 0x20bc: 0x45e, 0x20bd: 0x45f, 0x20be: 0x460, 0x20bf: 0x461, + // Block 0x83, offset 0x20c0 + 0x20c0: 0x462, 0x20c1: 0x463, 0x20c2: 0x464, 0x20c3: 0x465, 0x20c4: 0x466, 0x20c5: 0x467, 0x20c6: 0x468, 0x20c7: 0x469, + 0x20c8: 0x46a, 0x20c9: 0x46b, 0x20ca: 0x46c, 0x20cb: 0x46d, 0x20cc: 0x46e, 0x20cd: 0x46f, 0x20ce: 0x470, 0x20cf: 0x471, + 0x20d0: 0x472, 0x20d1: 0x473, 0x20d2: 0x474, 0x20d3: 0x475, 0x20d4: 0x476, 0x20d5: 0x477, 0x20d6: 0x478, 0x20d7: 0x479, + 0x20d8: 0x47a, 0x20d9: 0x47b, 0x20da: 0x47c, 0x20db: 0x47d, 0x20dc: 0x47e, 0x20dd: 0x47f, 0x20de: 0x480, 0x20df: 0x481, + 0x20e0: 0x482, 0x20e1: 0x483, 0x20e2: 0x484, 0x20e3: 0x485, 0x20e4: 0x486, 0x20e5: 0x487, 0x20e6: 0x488, 0x20e7: 0x489, + 0x20e8: 0x48a, 0x20e9: 0x48b, 0x20ea: 0x48c, 0x20eb: 0x48d, 0x20ec: 0x48e, 0x20ed: 0x48f, 0x20ee: 0x490, 0x20ef: 0x491, + 0x20f0: 0x492, 0x20f1: 0x493, 0x20f2: 0x494, 0x20f3: 0x495, 0x20f4: 0x496, 0x20f5: 0x497, 0x20f6: 0x498, 0x20f7: 0x499, + 0x20f8: 0x49a, 0x20f9: 0x49b, 0x20fa: 0x49c, 0x20fb: 0x49d, 0x20fc: 0x49e, 0x20fd: 0x49f, 0x20fe: 0x4a0, 0x20ff: 0x4a1, + // Block 0x84, offset 0x2100 + 0x2100: 0x4a2, 0x2101: 0x4a3, 0x2102: 0x4a4, 0x2103: 0x4a5, 0x2104: 0x4a6, 0x2105: 0x4a7, 0x2106: 0x4a8, 0x2107: 0x4a9, + 0x2108: 0x4aa, 0x2109: 0x4ab, 0x210a: 0x4ac, 0x210b: 0x4ad, 0x210c: 0x4ae, 0x210d: 0x4af, 0x210e: 0x4b0, 0x210f: 0x4b1, + 0x2110: 0x4b2, 0x2111: 0x4b3, 0x2112: 0x4b4, 0x2113: 0x4b5, 0x2114: 0x4b6, 0x2115: 0x4b7, 0x2116: 0x4b8, 0x2117: 0x4b9, + 0x2118: 0x4ba, 0x2119: 0x4bb, 0x211a: 0x4bc, 0x211b: 0x4bd, 0x211c: 0x4be, 0x211d: 0x4bf, 0x211e: 0x4c0, 0x211f: 0x4c1, + 0x2120: 0x4c2, 0x2121: 0x4c3, 0x2122: 0x4c4, 0x2123: 0x4c5, 0x2124: 0x4c6, 0x2125: 0x4c7, 0x2126: 0x4c8, 0x2127: 0x4c9, + 0x2128: 0x4ca, 0x2129: 0x4cb, 0x212a: 0x4cc, 0x212b: 0x4cd, 0x212c: 0x4ce, 0x212d: 0x4cf, 0x212e: 0x4d0, 0x212f: 0x4d1, + 0x2130: 0x4d2, 0x2131: 0x4d3, 0x2132: 0x4d4, 0x2133: 0x4d5, 0x2134: 0x4d6, 0x2135: 0x4d7, 0x2136: 0x4d8, 0x2137: 0x4d9, + 0x2138: 0x4da, 0x2139: 0x4db, 0x213a: 0x4dc, 0x213c: 0x4dd, 0x213d: 0x4de, 0x213e: 0x4df, 0x213f: 0x4e0, + // Block 0x85, offset 0x2140 + 0x2140: 0x4e1, 0x2141: 0x4e2, 0x2142: 0x4e3, 0x2143: 0x4e4, 0x2144: 0x4e5, 0x2145: 0x4e6, 0x2146: 0x4e7, 0x2147: 0x4e8, + 0x2148: 0x4e9, 0x2149: 0x4ea, 0x214a: 0x4eb, 0x214b: 0x4ec, 0x214c: 0x4ed, 0x214d: 0x4ee, 0x214e: 0x4ef, 0x214f: 0x4f0, + 0x2150: 0x4f1, 0x2151: 0x4f2, 0x2152: 0x4f3, 0x2153: 0x4f4, 0x2154: 0x4f5, 0x2155: 0x4f6, 0x2156: 0x4f7, 0x2157: 0x4f8, + 0x2158: 0x4f9, 0x2159: 0x4fa, 0x215a: 0x4fb, 0x215b: 0x4fc, 0x215c: 0x4fd, 0x215d: 0x4fe, 0x215e: 0x4ff, 0x215f: 0x500, + 0x2160: 0x501, 0x2161: 0x502, 0x2162: 0x503, 0x2163: 0x504, 0x2164: 0x505, 0x2165: 0x506, 0x2166: 0x507, 0x2167: 0x508, + 0x2168: 0x509, 0x2169: 0x50a, 0x216a: 0x50b, 0x216b: 0x50c, 0x216c: 0x50d, 0x216d: 0x50e, 0x216e: 0x50f, + 0x2170: 0x510, 0x2171: 0x511, 0x2172: 0x512, 0x2173: 0x513, 0x2174: 0x514, 0x2175: 0x515, 0x2176: 0x516, 0x2177: 0x517, + 0x2178: 0x518, 0x2179: 0x519, 0x217a: 0x51a, 0x217b: 0x51b, 0x217c: 0x51c, 0x217d: 0x51d, 0x217e: 0x51e, 0x217f: 0x51f, + // Block 0x86, offset 0x2180 + 0x2180: 0x520, 0x2181: 0x521, 0x2182: 0x522, 0x2183: 0x523, 0x2184: 0x524, 0x2185: 0x525, 0x2186: 0x526, 0x2187: 0x527, + 0x2188: 0x528, 0x2189: 0x529, 0x218a: 0x52a, 0x218b: 0x52b, 0x218c: 0x52c, 0x218d: 0x52d, 0x218e: 0x52e, 0x218f: 0x52f, + 0x2190: 0x530, 0x2191: 0x531, 0x2195: 0x532, 0x2196: 0x533, 0x2197: 0x534, + 0x2198: 0x535, 0x2199: 0x536, 0x219a: 0x537, 0x219b: 0x538, 0x219c: 0x539, 0x219d: 0x53a, 0x219e: 0x53b, 0x219f: 0x53c, + 0x21a0: 0x53d, 0x21a1: 0x53e, 0x21a2: 0x53f, 0x21a3: 0x540, 0x21a4: 0x541, 0x21a5: 0x542, 0x21a6: 0x543, 0x21a7: 0x544, + 0x21a8: 0x545, 0x21a9: 0x546, 0x21aa: 0x547, 0x21ab: 0x548, 0x21ac: 0x549, 0x21ad: 0x54a, 0x21ae: 0x54b, 0x21af: 0x54c, + 0x21b0: 0x54d, 0x21b1: 0x54e, 0x21b3: 0x54f, 0x21b4: 0x550, 0x21b5: 0x551, 0x21b6: 0x552, 0x21b7: 0x553, + 0x21b8: 0x554, 0x21b9: 0x555, 0x21ba: 0x556, 0x21bb: 0x557, 0x21bc: 0x558, 0x21bd: 0x559, 0x21be: 0x55a, + // Block 0x87, offset 0x21c0 + 0x21e4: 0x55b, 0x21e5: 0x55c, 0x21e6: 0x55d, 0x21e7: 0x55e, + 0x21e8: 0x55f, 0x21e9: 0x560, 0x21ea: 0x561, 0x21eb: 0x562, 0x21ec: 0x103, 0x21ed: 0x104, 0x21ee: 0x105, 0x21ef: 0x106, + 0x21f0: 0x107, 0x21f1: 0x108, 0x21f2: 0x109, 0x21f3: 0x10a, 0x21f4: 0x10b, 0x21f5: 0x10c, 0x21f6: 0x10d, 0x21f7: 0x10e, + 0x21f8: 0x10f, 0x21f9: 0x110, 0x21fa: 0x111, 0x21fb: 0x112, 0x21fc: 0x113, 0x21fd: 0x114, 0x21fe: 0x115, 0x21ff: 0x116, + // Block 0x88, offset 0x2200 + 0x2200: 0x18b, 0x2201: 0x18c, 0x2202: 0x18d, 0x2203: 0x18e, 0x2204: 0x18f, 0x2205: 0x190, 0x2206: 0x191, 0x2207: 0x192, + 0x2208: 0x193, 0x2209: 0x563, 0x220c: 0x195, 0x220d: 0x196, 0x220e: 0x197, 0x220f: 0x198, + 0x2210: 0x199, 0x2211: 0x19a, 0x2212: 0x19b, 0x2213: 0x19c, 0x2214: 0x19d, 0x2215: 0x19e, 0x2217: 0x19f, + 0x2218: 0x1a0, 0x2219: 0x1a1, 0x221a: 0x1a2, 0x221b: 0x1a3, 0x221c: 0x1a4, 0x221d: 0x1a5, + // Block 0x89, offset 0x2240 + 0x2260: 0x564, 0x2261: 0x565, 0x2262: 0x566, 0x2263: 0x567, 0x2264: 0x568, 0x2265: 0x569, 0x2266: 0x56a, 0x2267: 0x56b, + 0x2268: 0x56c, + // Block 0x8a, offset 0x2280 + 0x2290: 0x09, 0x2291: 0x0a, 0x2292: 0x0b, 0x2293: 0x0c, 0x2296: 0x0d, + 0x229b: 0x0e, 0x229d: 0x0f, 0x229e: 0x10, 0x229f: 0x86, + 0x22af: 0x87, + // Block 0x8b, offset 0x22c0 + 0x22c2: 0x01, 0x22c3: 0x02, 0x22c4: 0x03, 0x22c5: 0x04, 0x22c6: 0x05, 0x22c7: 0x06, + 0x22c8: 0x07, 0x22c9: 0x08, 0x22ca: 0x09, 0x22cb: 0x0a, 0x22cc: 0x0b, 0x22cd: 0x0c, 0x22ce: 0x0d, 0x22cf: 0x0e, + 0x22d0: 0x0f, 0x22d1: 0x10, 0x22d2: 0x11, 0x22d3: 0x12, 0x22d4: 0x13, 0x22d5: 0x14, 0x22d6: 0x15, 0x22d7: 0x16, + 0x22d8: 0x17, 0x22d9: 0x18, 0x22da: 0x19, 0x22db: 0x1a, 0x22dc: 0x1b, 0x22dd: 0x1c, 0x22de: 0x1d, 0x22df: 0x1e, + 0x22e0: 0x01, 0x22e1: 0x02, 0x22e2: 0x03, 0x22e3: 0x7e, 0x22e4: 0x7f, 0x22e5: 0x80, 0x22e6: 0x81, 0x22e7: 0x82, + 0x22e8: 0x83, 0x22e9: 0x84, 0x22ea: 0x06, 0x22ed: 0x07, 0x22ef: 0x85, + 0x22f0: 0x88, 0x22f3: 0x15, + // Block 0x8c, offset 0x2300 + 0x2320: 0x1f, 0x2321: 0x20, 0x2322: 0x21, 0x2323: 0x22, 0x2324: 0x56d, 0x2325: 0x24, 0x2326: 0x25, 0x2327: 0x26, + 0x2328: 0x27, 0x2329: 0x28, 0x232a: 0x29, 0x232b: 0x2a, 0x232c: 0x2b, 0x232d: 0x2c, 0x232e: 0x2d, 0x232f: 0x2e, + 0x2330: 0x2f, 0x2331: 0x30, 0x2332: 0x31, 0x2333: 0x32, 0x2334: 0x33, 0x2335: 0x34, 0x2336: 0x35, 0x2337: 0x36, + 0x2338: 0x37, 0x2339: 0x38, 0x233a: 0x39, 0x233b: 0x3a, 0x233c: 0x3b, 0x233d: 0x3c, 0x233e: 0x3d, 0x233f: 0x3e, + // Block 0x8d, offset 0x2340 + 0x2342: 0x01, 0x2343: 0x02, 0x2344: 0x03, 0x2345: 0x04, 0x2346: 0x05, 0x2347: 0x06, + 0x2348: 0x07, 0x2349: 0x08, 0x234a: 0x09, 0x234b: 0x0a, 0x234c: 0x0b, 0x234d: 0x0c, 0x234e: 0x0d, 0x234f: 0x0e, + 0x2350: 0x0f, 0x2351: 0x10, 0x2352: 0x11, 0x2353: 0x12, 0x2354: 0x13, 0x2355: 0x14, 0x2356: 0x15, 0x2357: 0x16, + 0x2358: 0x17, 0x2359: 0x18, 0x235a: 0x19, 0x235b: 0x1a, 0x235c: 0x1b, 0x235d: 0x1c, 0x235e: 0x1d, 0x235f: 0x1e, + 0x2360: 0x8a, 0x2361: 0x02, 0x2362: 0x03, 0x2363: 0x04, 0x2364: 0x05, + 0x236a: 0x06, 0x236d: 0x07, 0x236f: 0x08, + 0x2370: 0x13, 0x2373: 0x15, + // Block 0x8e, offset 0x2380 + 0x2382: 0x01, 0x2383: 0x02, 0x2384: 0x03, 0x2385: 0x04, 0x2386: 0x570, 0x2387: 0x06, + 0x2388: 0x07, 0x2389: 0x571, 0x238a: 0x09, 0x238b: 0x0a, 0x238c: 0x0b, 0x238d: 0x0c, 0x238e: 0x0d, 0x238f: 0x0e, + 0x2390: 0x0f, 0x2391: 0x10, 0x2392: 0x11, 0x2393: 0x12, 0x2394: 0x13, 0x2395: 0x14, 0x2396: 0x15, 0x2397: 0x16, + 0x2398: 0x17, 0x2399: 0x18, 0x239a: 0x19, 0x239b: 0x1a, 0x239c: 0x1b, 0x239d: 0x1c, 0x239e: 0x1d, 0x239f: 0x1e, + 0x23a0: 0x01, 0x23a1: 0x02, 0x23a2: 0x03, 0x23a3: 0x04, 0x23a4: 0x05, + 0x23aa: 0x06, 0x23ad: 0x07, 0x23af: 0x08, + 0x23b0: 0x13, 0x23b3: 0x15, + // Block 0x8f, offset 0x23c0 + 0x23c0: 0x3f, 0x23c1: 0x40, 0x23c2: 0x41, 0x23c3: 0x42, 0x23c4: 0x43, 0x23c5: 0x44, 0x23c6: 0x45, 0x23c7: 0x46, + 0x23c8: 0x47, 0x23c9: 0x48, 0x23ca: 0x49, 0x23cb: 0x4a, 0x23cc: 0x4b, 0x23cd: 0x4c, 0x23ce: 0x4d, 0x23cf: 0x4e, + 0x23d0: 0x4f, 0x23d1: 0x50, 0x23d2: 0x51, 0x23d3: 0x52, 0x23d4: 0x53, 0x23d5: 0x54, 0x23d6: 0x55, 0x23d7: 0x56, + 0x23d8: 0x57, 0x23d9: 0x58, 0x23da: 0x59, 0x23db: 0x5a, 0x23dc: 0x5b, 0x23dd: 0x5c, 0x23de: 0x5d, 0x23df: 0x5e, + 0x23e0: 0x5f, 0x23e1: 0x60, 0x23e2: 0x61, 0x23e3: 0x62, 0x23e4: 0x63, 0x23e5: 0x64, 0x23e6: 0x65, 0x23e7: 0x66, + 0x23e8: 0x67, 0x23e9: 0x68, 0x23ea: 0x69, 0x23ec: 0x6a, 0x23ed: 0x6b, 0x23ee: 0x6c, 0x23ef: 0x6d, + 0x23f0: 0x6e, 0x23f1: 0x6f, 0x23f3: 0x70, 0x23f4: 0x71, 0x23f5: 0x72, 0x23f6: 0x73, 0x23f7: 0x74, + 0x23f8: 0x75, 0x23f9: 0x57a, 0x23fa: 0x57b, 0x23fb: 0x57c, 0x23fc: 0x79, 0x23fd: 0x7a, 0x23fe: 0x7b, 0x23ff: 0x7c, + // Block 0x90, offset 0x2400 + 0x2400: 0x7d, 0x2401: 0x7e, 0x2402: 0x7f, 0x2403: 0x80, 0x2404: 0x81, 0x2405: 0x82, 0x2406: 0x83, 0x2407: 0x84, + 0x2408: 0x85, 0x2409: 0x86, 0x240a: 0x87, 0x240b: 0x88, 0x240c: 0x89, 0x240d: 0x8a, 0x240e: 0x8b, 0x240f: 0x8c, + 0x2410: 0x8d, 0x2411: 0x8e, 0x2412: 0x57d, 0x2413: 0x90, 0x2414: 0x91, 0x2415: 0x92, 0x2416: 0x93, 0x2417: 0x94, + 0x2418: 0x95, 0x2419: 0x96, 0x241a: 0x97, 0x241b: 0x98, 0x241c: 0x99, 0x241d: 0x9a, 0x241e: 0x9b, 0x241f: 0x9c, + 0x2420: 0x9d, 0x2421: 0x9e, 0x2422: 0x9f, 0x2423: 0xa0, 0x2424: 0xa1, 0x2425: 0xa2, 0x2426: 0xa3, 0x2427: 0xa4, + 0x2428: 0xa5, 0x2429: 0xa6, 0x242a: 0xa7, 0x242b: 0xa8, 0x242c: 0xa9, 0x242d: 0xaa, + 0x2430: 0xab, 0x2431: 0xac, 0x2432: 0xad, 0x2433: 0xae, 0x2434: 0xaf, 0x2435: 0xb0, 0x2436: 0xb1, 0x2437: 0xb2, + 0x2438: 0xb3, 0x243a: 0xb4, 0x243b: 0xb5, 0x243c: 0xb6, 0x243d: 0xb7, 0x243e: 0xb8, 0x243f: 0xb9, + // Block 0x91, offset 0x2440 + 0x2440: 0xba, 0x2441: 0xbb, 0x2442: 0xbc, 0x2443: 0xbd, 0x2444: 0xbe, 0x2445: 0xbf, 0x2446: 0xc0, 0x2447: 0xc1, + 0x2448: 0xc2, 0x2449: 0xc3, 0x244a: 0xc4, 0x244b: 0xc5, 0x244c: 0xc6, 0x244d: 0xc7, 0x244e: 0xc8, 0x244f: 0x57e, + // Block 0x92, offset 0x2480 + 0x2480: 0x18b, 0x2481: 0x18c, 0x2482: 0x18d, 0x2483: 0x18e, 0x2484: 0x57f, 0x2485: 0x190, 0x2486: 0x191, 0x2487: 0x192, + 0x2488: 0x193, 0x2489: 0x194, 0x248c: 0x195, 0x248d: 0x196, 0x248e: 0x197, 0x248f: 0x198, + 0x2490: 0x199, 0x2491: 0x19a, 0x2492: 0x19b, 0x2493: 0x19c, 0x2494: 0x19d, 0x2495: 0x19e, 0x2497: 0x19f, + 0x2498: 0x1a0, 0x2499: 0x1a1, 0x249a: 0x1a2, 0x249b: 0x1a3, 0x249c: 0x1a4, 0x249d: 0x1a5, + // Block 0x93, offset 0x24c0 + 0x24d0: 0x09, 0x24d1: 0x0a, 0x24d2: 0x0b, 0x24d3: 0x0c, 0x24d6: 0x0d, + 0x24db: 0x0e, 0x24dd: 0x0f, 0x24de: 0x10, 0x24df: 0x90, + 0x24ef: 0x12, + // Block 0x94, offset 0x2500 + 0x2502: 0x01, 0x2503: 0x574, 0x2504: 0x575, 0x2505: 0x576, 0x2506: 0x05, 0x2507: 0x577, + 0x2508: 0x578, 0x2509: 0x08, 0x250a: 0x09, 0x250b: 0x0a, 0x250c: 0x579, 0x250d: 0x0c, 0x250e: 0x0d, 0x250f: 0x0e, + 0x2510: 0x0f, 0x2511: 0x10, 0x2512: 0x11, 0x2513: 0x12, 0x2514: 0x13, 0x2515: 0x14, 0x2516: 0x15, 0x2517: 0x16, + 0x2518: 0x17, 0x2519: 0x18, 0x251a: 0x19, 0x251b: 0x1a, 0x251c: 0x1b, 0x251d: 0x1c, 0x251e: 0x1d, 0x251f: 0x1e, + 0x2520: 0x01, 0x2521: 0x8d, 0x2522: 0x8e, 0x2523: 0x8f, 0x2524: 0x05, + 0x252a: 0x06, 0x252d: 0x07, 0x252f: 0x08, + 0x2530: 0x91, 0x2533: 0x15, + // Block 0x95, offset 0x2540 + 0x2540: 0x3f, 0x2541: 0x40, 0x2542: 0x41, 0x2543: 0x42, 0x2544: 0x43, 0x2545: 0x44, 0x2546: 0x45, 0x2547: 0x46, + 0x2548: 0x47, 0x2549: 0x48, 0x254a: 0x49, 0x254b: 0x4a, 0x254c: 0x4b, 0x254d: 0x4c, 0x254e: 0x4d, 0x254f: 0x4e, + 0x2550: 0x4f, 0x2551: 0x50, 0x2552: 0x51, 0x2553: 0x52, 0x2554: 0x53, 0x2555: 0x54, 0x2556: 0x55, 0x2557: 0x56, + 0x2558: 0x57, 0x2559: 0x58, 0x255a: 0x59, 0x255b: 0x5a, 0x255c: 0x5b, 0x255d: 0x5c, 0x255e: 0x5d, 0x255f: 0x5e, + 0x2560: 0x5f, 0x2561: 0x60, 0x2562: 0x61, 0x2563: 0x62, 0x2564: 0x63, 0x2565: 0x64, 0x2566: 0x65, 0x2567: 0x66, + 0x2568: 0x67, 0x2569: 0x68, 0x256a: 0x69, 0x256c: 0x6a, 0x256d: 0x6b, 0x256e: 0x6c, 0x256f: 0x6d, + 0x2570: 0x6e, 0x2571: 0x6f, 0x2573: 0x70, 0x2574: 0x71, 0x2575: 0x72, 0x2576: 0x73, 0x2577: 0x74, + 0x2578: 0x75, 0x2579: 0x584, 0x257a: 0x77, 0x257b: 0x78, 0x257c: 0x79, 0x257d: 0x7a, 0x257e: 0x7b, 0x257f: 0x7c, + // Block 0x96, offset 0x2580 + 0x2582: 0x01, 0x2583: 0x02, 0x2584: 0x582, 0x2585: 0x583, 0x2586: 0x05, 0x2587: 0x06, + 0x2588: 0x07, 0x2589: 0x08, 0x258a: 0x09, 0x258b: 0x0a, 0x258c: 0x0b, 0x258d: 0x0c, 0x258e: 0x0d, 0x258f: 0x0e, + 0x2590: 0x0f, 0x2591: 0x10, 0x2592: 0x11, 0x2593: 0x12, 0x2594: 0x13, 0x2595: 0x14, 0x2596: 0x15, 0x2597: 0x16, + 0x2598: 0x17, 0x2599: 0x18, 0x259a: 0x19, 0x259b: 0x1a, 0x259c: 0x1b, 0x259d: 0x1c, 0x259e: 0x1d, 0x259f: 0x1e, + 0x25a0: 0x01, 0x25a1: 0x93, 0x25a2: 0x03, 0x25a3: 0x04, 0x25a4: 0x05, + 0x25aa: 0x06, 0x25ad: 0x07, 0x25af: 0x08, + 0x25b0: 0x13, 0x25b3: 0x15, + // Block 0x97, offset 0x25c0 + 0x25e0: 0x1f, 0x25e1: 0x20, 0x25e2: 0x21, 0x25e3: 0x22, 0x25e4: 0x23, 0x25e5: 0x24, 0x25e6: 0x25, 0x25e7: 0x26, + 0x25e8: 0x27, 0x25e9: 0x28, 0x25ea: 0x29, 0x25eb: 0x2a, 0x25ec: 0x2b, 0x25ed: 0x2c, 0x25ee: 0x2d, 0x25ef: 0x2e, + 0x25f0: 0x2f, 0x25f1: 0x30, 0x25f2: 0x31, 0x25f3: 0x32, 0x25f4: 0x585, 0x25f5: 0x586, 0x25f6: 0x35, 0x25f7: 0x36, + 0x25f8: 0x37, 0x25f9: 0x38, 0x25fa: 0x39, 0x25fb: 0x3a, 0x25fc: 0x3b, 0x25fd: 0x3c, 0x25fe: 0x3d, 0x25ff: 0x3e, + // Block 0x98, offset 0x2600 + 0x2602: 0x01, 0x2603: 0x02, 0x2604: 0x03, 0x2605: 0x04, 0x2606: 0x05, 0x2607: 0x06, + 0x2608: 0x07, 0x2609: 0x08, 0x260a: 0x09, 0x260b: 0x0a, 0x260c: 0x0b, 0x260d: 0x0c, 0x260e: 0x0d, 0x260f: 0x0e, + 0x2610: 0x0f, 0x2611: 0x10, 0x2612: 0x11, 0x2613: 0x12, 0x2614: 0x13, 0x2615: 0x14, 0x2616: 0x15, 0x2617: 0x16, + 0x2618: 0x17, 0x2619: 0x18, 0x261a: 0x19, 0x261b: 0x1a, 0x261c: 0x1b, 0x261d: 0x1c, 0x261e: 0x1d, 0x261f: 0x1e, + 0x2620: 0x95, 0x2621: 0x02, 0x2622: 0x03, 0x2623: 0x04, 0x2624: 0x05, + 0x262a: 0x06, 0x262d: 0x07, 0x262f: 0x08, + 0x2630: 0x13, 0x2633: 0x15, + // Block 0x99, offset 0x2640 + 0x2660: 0x1f, 0x2661: 0x20, 0x2662: 0x21, 0x2663: 0x22, 0x2664: 0x587, 0x2665: 0x24, 0x2666: 0x25, 0x2667: 0x26, + 0x2668: 0x27, 0x2669: 0x28, 0x266a: 0x29, 0x266b: 0x2a, 0x266c: 0x2b, 0x266d: 0x2c, 0x266e: 0x2d, 0x266f: 0x2e, + 0x2670: 0x2f, 0x2671: 0x30, 0x2672: 0x31, 0x2673: 0x32, 0x2674: 0x33, 0x2675: 0x34, 0x2676: 0x35, 0x2677: 0x36, + 0x2678: 0x37, 0x2679: 0x38, 0x267a: 0x39, 0x267b: 0x3a, 0x267c: 0x3b, 0x267d: 0x3c, 0x267e: 0x3d, 0x267f: 0x3e, + // Block 0x9a, offset 0x2680 + 0x2682: 0x01, 0x2683: 0x02, 0x2684: 0x03, 0x2685: 0x04, 0x2686: 0x05, 0x2687: 0x06, + 0x2688: 0x07, 0x2689: 0x08, 0x268a: 0x09, 0x268b: 0x0a, 0x268c: 0x0b, 0x268d: 0x0c, 0x268e: 0x0d, 0x268f: 0x0e, + 0x2690: 0x0f, 0x2691: 0x10, 0x2692: 0x11, 0x2693: 0x12, 0x2694: 0x13, 0x2695: 0x14, 0x2696: 0x15, 0x2697: 0x16, + 0x2698: 0x17, 0x2699: 0x18, 0x269a: 0x19, 0x269b: 0x1a, 0x269c: 0x1b, 0x269d: 0x1c, 0x269e: 0x1d, 0x269f: 0x1e, + 0x26a0: 0x97, 0x26a1: 0x02, 0x26a2: 0x03, 0x26a3: 0x04, 0x26a4: 0x05, + 0x26aa: 0x06, 0x26ad: 0x07, 0x26af: 0x08, + 0x26b0: 0x13, 0x26b3: 0x15, + // Block 0x9b, offset 0x26c0 + 0x26c0: 0x7d, 0x26c1: 0x7e, 0x26c2: 0x7f, 0x26c3: 0x80, 0x26c4: 0x58c, 0x26c5: 0x82, 0x26c6: 0x83, 0x26c7: 0x84, + 0x26c8: 0x85, 0x26c9: 0x86, 0x26ca: 0x87, 0x26cb: 0x88, 0x26cc: 0x89, 0x26cd: 0x8a, 0x26ce: 0x8b, 0x26cf: 0x8c, + 0x26d0: 0x8d, 0x26d1: 0x8e, 0x26d2: 0x8f, 0x26d3: 0x90, 0x26d4: 0x91, 0x26d5: 0x92, 0x26d6: 0x93, 0x26d7: 0x94, + 0x26d8: 0x95, 0x26d9: 0x96, 0x26da: 0x97, 0x26db: 0x98, 0x26dc: 0x99, 0x26dd: 0x9a, 0x26de: 0x9b, 0x26df: 0x9c, + 0x26e0: 0x9d, 0x26e1: 0x9e, 0x26e2: 0x9f, 0x26e3: 0xa0, 0x26e4: 0xa1, 0x26e5: 0xa2, 0x26e6: 0xa3, 0x26e7: 0xa4, + 0x26e8: 0xa5, 0x26e9: 0xa6, 0x26ea: 0xa7, 0x26eb: 0xa8, 0x26ec: 0xa9, 0x26ed: 0xaa, + 0x26f0: 0xab, 0x26f1: 0xac, 0x26f2: 0xad, 0x26f3: 0xae, 0x26f4: 0xaf, 0x26f5: 0xb0, 0x26f6: 0xb1, 0x26f7: 0xb2, + 0x26f8: 0xb3, 0x26fa: 0xb4, 0x26fb: 0xb5, 0x26fc: 0xb6, 0x26fd: 0xb7, 0x26fe: 0xb8, 0x26ff: 0xb9, + // Block 0x9c, offset 0x2700 + 0x2700: 0xcb, 0x2701: 0xcc, 0x2702: 0xcd, 0x2703: 0xce, 0x2704: 0xcf, 0x2705: 0xd0, 0x2706: 0xd1, 0x2707: 0xd2, + 0x2708: 0xd3, 0x2709: 0xd4, 0x270a: 0xd5, 0x270b: 0xd6, 0x270c: 0xd7, 0x270d: 0xd8, 0x270e: 0xd9, 0x270f: 0xda, + 0x2710: 0xdb, 0x2711: 0xdc, 0x2712: 0xdd, 0x2713: 0xde, 0x2714: 0xdf, 0x2715: 0xe0, 0x2716: 0xe1, 0x2717: 0xe2, + 0x2718: 0xe3, 0x2719: 0xe4, 0x271a: 0xe5, 0x271b: 0xe6, 0x271c: 0xe7, 0x271d: 0xe8, 0x271e: 0xe9, 0x271f: 0x58d, + 0x2720: 0xeb, 0x2721: 0xec, 0x2722: 0xed, 0x2723: 0xee, 0x2724: 0xef, 0x2725: 0xf0, 0x2726: 0xf1, 0x2727: 0xf2, + 0x2728: 0xf3, 0x2729: 0xf4, 0x272a: 0xf5, 0x272b: 0xf6, 0x272c: 0xf7, 0x272f: 0xf8, + // Block 0x9d, offset 0x2740 + 0x2742: 0x01, 0x2743: 0x02, 0x2744: 0x58a, 0x2745: 0x58b, 0x2746: 0x05, 0x2747: 0x06, + 0x2748: 0x07, 0x2749: 0x08, 0x274a: 0x09, 0x274b: 0x0a, 0x274c: 0x0b, 0x274d: 0x0c, 0x274e: 0x0d, 0x274f: 0x0e, + 0x2750: 0x0f, 0x2751: 0x10, 0x2752: 0x11, 0x2753: 0x12, 0x2754: 0x13, 0x2755: 0x14, 0x2756: 0x15, 0x2757: 0x16, + 0x2758: 0x17, 0x2759: 0x18, 0x275a: 0x19, 0x275b: 0x1a, 0x275c: 0x1b, 0x275d: 0x1c, 0x275e: 0x1d, 0x275f: 0x1e, + 0x2760: 0x01, 0x2761: 0x02, 0x2762: 0x99, 0x2763: 0x04, 0x2764: 0x05, + 0x276a: 0x9a, 0x276d: 0x07, 0x276f: 0x08, + 0x2770: 0x13, 0x2773: 0x15, + // Block 0x9e, offset 0x2780 + 0x2780: 0x58e, 0x2781: 0x58f, 0x2782: 0x590, 0x2783: 0x42, 0x2784: 0x43, 0x2785: 0x44, 0x2786: 0x45, 0x2787: 0x46, + 0x2788: 0x47, 0x2789: 0x48, 0x278a: 0x49, 0x278b: 0x4a, 0x278c: 0x4b, 0x278d: 0x4c, 0x278e: 0x4d, 0x278f: 0x4e, + 0x2790: 0x4f, 0x2791: 0x50, 0x2792: 0x51, 0x2793: 0x52, 0x2794: 0x53, 0x2795: 0x54, 0x2796: 0x55, 0x2797: 0x56, + 0x2798: 0x57, 0x2799: 0x58, 0x279a: 0x59, 0x279b: 0x5a, 0x279c: 0x5b, 0x279d: 0x5c, 0x279e: 0x5d, 0x279f: 0x5e, + 0x27a0: 0x5f, 0x27a1: 0x60, 0x27a2: 0x61, 0x27a3: 0x62, 0x27a4: 0x63, 0x27a5: 0x64, 0x27a6: 0x65, 0x27a7: 0x66, + 0x27a8: 0x67, 0x27a9: 0x68, 0x27aa: 0x69, 0x27ac: 0x6a, 0x27ad: 0x6b, 0x27ae: 0x6c, 0x27af: 0x6d, + 0x27b0: 0x6e, 0x27b1: 0x6f, 0x27b3: 0x70, 0x27b4: 0x71, 0x27b5: 0x72, 0x27b6: 0x73, 0x27b7: 0x74, + 0x27b8: 0x75, 0x27b9: 0x76, 0x27ba: 0x77, 0x27bb: 0x78, 0x27bc: 0x79, 0x27bd: 0x7a, 0x27be: 0x7b, 0x27bf: 0x7c, + // Block 0x9f, offset 0x27c0 + 0x27c2: 0x01, 0x27c3: 0x02, 0x27c4: 0x03, 0x27c5: 0x04, 0x27c6: 0x05, 0x27c7: 0x06, + 0x27c8: 0x07, 0x27c9: 0x08, 0x27ca: 0x09, 0x27cb: 0x0a, 0x27cc: 0x0b, 0x27cd: 0x0c, 0x27ce: 0x0d, 0x27cf: 0x0e, + 0x27d0: 0x0f, 0x27d1: 0x10, 0x27d2: 0x11, 0x27d3: 0x12, 0x27d4: 0x13, 0x27d5: 0x14, 0x27d6: 0x15, 0x27d7: 0x16, + 0x27d8: 0x17, 0x27d9: 0x18, 0x27da: 0x19, 0x27db: 0x1a, 0x27dc: 0x1b, 0x27dd: 0x1c, 0x27de: 0x1d, 0x27df: 0x1e, + 0x27e0: 0x01, 0x27e1: 0x9c, 0x27e2: 0x03, 0x27e3: 0x04, 0x27e4: 0x05, + 0x27ea: 0x06, 0x27ed: 0x07, 0x27ef: 0x08, + 0x27f0: 0x13, 0x27f3: 0x15, + // Block 0xa0, offset 0x2800 + 0x2800: 0x3f, 0x2801: 0x40, 0x2802: 0x41, 0x2803: 0x42, 0x2804: 0x43, 0x2805: 0x44, 0x2806: 0x45, 0x2807: 0x46, + 0x2808: 0x47, 0x2809: 0x48, 0x280a: 0x49, 0x280b: 0x4a, 0x280c: 0x4b, 0x280d: 0x4c, 0x280e: 0x4d, 0x280f: 0x4e, + 0x2810: 0x4f, 0x2811: 0x50, 0x2812: 0x51, 0x2813: 0x52, 0x2814: 0x53, 0x2815: 0x54, 0x2816: 0x55, 0x2817: 0x56, + 0x2818: 0x57, 0x2819: 0x58, 0x281a: 0x59, 0x281b: 0x5a, 0x281c: 0x5b, 0x281d: 0x5c, 0x281e: 0x5d, 0x281f: 0x5e, + 0x2820: 0x5f, 0x2821: 0x60, 0x2822: 0x61, 0x2823: 0x62, 0x2824: 0x63, 0x2825: 0x64, 0x2826: 0x65, 0x2827: 0x66, + 0x2828: 0x67, 0x2829: 0x68, 0x282a: 0x69, 0x282c: 0x6a, 0x282d: 0x6b, 0x282e: 0x6c, 0x282f: 0x6d, + 0x2830: 0x6e, 0x2831: 0x6f, 0x2833: 0x70, 0x2834: 0x71, 0x2835: 0x72, 0x2836: 0x73, 0x2837: 0x74, + 0x2838: 0x75, 0x2839: 0x1f2, 0x283a: 0x597, 0x283b: 0x598, 0x283c: 0x79, 0x283d: 0x7a, 0x283e: 0x7b, 0x283f: 0x7c, + // Block 0xa1, offset 0x2840 + 0x2842: 0x01, 0x2843: 0x595, 0x2844: 0x03, 0x2845: 0x596, 0x2846: 0x05, 0x2847: 0x06, + 0x2848: 0x07, 0x2849: 0x08, 0x284a: 0x09, 0x284b: 0x0a, 0x284c: 0x0b, 0x284d: 0x0c, 0x284e: 0x0d, 0x284f: 0x0e, + 0x2850: 0x0f, 0x2851: 0x10, 0x2852: 0x11, 0x2853: 0x12, 0x2854: 0x13, 0x2855: 0x14, 0x2856: 0x15, 0x2857: 0x16, + 0x2858: 0x17, 0x2859: 0x18, 0x285a: 0x19, 0x285b: 0x1a, 0x285c: 0x1b, 0x285d: 0x1c, 0x285e: 0x1d, 0x285f: 0x1e, + 0x2860: 0x01, 0x2861: 0x9e, 0x2862: 0x03, 0x2863: 0x04, 0x2864: 0x05, + 0x286a: 0x06, 0x286d: 0x07, 0x286f: 0x08, + 0x2870: 0x13, 0x2873: 0x15, + // Block 0xa2, offset 0x2880 + 0x28a0: 0x1f, 0x28a1: 0x20, 0x28a2: 0x21, 0x28a3: 0x22, 0x28a4: 0x23, 0x28a5: 0x24, 0x28a6: 0x25, 0x28a7: 0x26, + 0x28a8: 0x27, 0x28a9: 0x28, 0x28aa: 0x29, 0x28ab: 0x2a, 0x28ac: 0x59b, 0x28ad: 0x59c, 0x28ae: 0x2d, 0x28af: 0x2e, + 0x28b0: 0x2f, 0x28b1: 0x30, 0x28b2: 0x31, 0x28b3: 0x32, 0x28b4: 0x33, 0x28b5: 0x34, 0x28b6: 0x35, 0x28b7: 0x36, + 0x28b8: 0x37, 0x28b9: 0x38, 0x28ba: 0x39, 0x28bb: 0x3a, 0x28bc: 0x3b, 0x28bd: 0x3c, 0x28be: 0x3d, 0x28bf: 0x3e, + // Block 0xa3, offset 0x28c0 + 0x28c2: 0x01, 0x28c3: 0x02, 0x28c4: 0x03, 0x28c5: 0x04, 0x28c6: 0x05, 0x28c7: 0x06, + 0x28c8: 0x07, 0x28c9: 0x08, 0x28ca: 0x09, 0x28cb: 0x0a, 0x28cc: 0x0b, 0x28cd: 0x0c, 0x28ce: 0x0d, 0x28cf: 0x0e, + 0x28d0: 0x0f, 0x28d1: 0x10, 0x28d2: 0x11, 0x28d3: 0x12, 0x28d4: 0x13, 0x28d5: 0x14, 0x28d6: 0x15, 0x28d7: 0x16, + 0x28d8: 0x17, 0x28d9: 0x18, 0x28da: 0x19, 0x28db: 0x1a, 0x28dc: 0x1b, 0x28dd: 0x1c, 0x28de: 0x1d, 0x28df: 0x1e, + 0x28e0: 0xa0, 0x28e1: 0x02, 0x28e2: 0x03, 0x28e3: 0x04, 0x28e4: 0x05, + 0x28ea: 0x06, 0x28ed: 0x07, 0x28ef: 0x08, + 0x28f0: 0x13, 0x28f3: 0x15, + // Block 0xa4, offset 0x2900 + 0x2920: 0x1f, 0x2921: 0x20, 0x2922: 0x21, 0x2923: 0x22, 0x2924: 0x23, 0x2925: 0x24, 0x2926: 0x25, 0x2927: 0x26, + 0x2928: 0x59d, 0x2929: 0x59e, 0x292a: 0x29, 0x292b: 0x2a, 0x292c: 0x2b, 0x292d: 0x2c, 0x292e: 0x2d, 0x292f: 0x2e, + 0x2930: 0x2f, 0x2931: 0x30, 0x2932: 0x31, 0x2933: 0x32, 0x2934: 0x33, 0x2935: 0x34, 0x2936: 0x35, 0x2937: 0x36, + 0x2938: 0x37, 0x2939: 0x38, 0x293a: 0x39, 0x293b: 0x3a, 0x293c: 0x3b, 0x293d: 0x3c, 0x293e: 0x3d, 0x293f: 0x3e, + // Block 0xa5, offset 0x2940 + 0x2942: 0x01, 0x2943: 0x02, 0x2944: 0x03, 0x2945: 0x04, 0x2946: 0x05, 0x2947: 0x06, + 0x2948: 0x07, 0x2949: 0x08, 0x294a: 0x09, 0x294b: 0x0a, 0x294c: 0x0b, 0x294d: 0x0c, 0x294e: 0x0d, 0x294f: 0x0e, + 0x2950: 0x0f, 0x2951: 0x10, 0x2952: 0x11, 0x2953: 0x12, 0x2954: 0x13, 0x2955: 0x14, 0x2956: 0x15, 0x2957: 0x16, + 0x2958: 0x17, 0x2959: 0x18, 0x295a: 0x19, 0x295b: 0x1a, 0x295c: 0x1b, 0x295d: 0x1c, 0x295e: 0x1d, 0x295f: 0x1e, + 0x2960: 0xa2, 0x2961: 0x02, 0x2962: 0x03, 0x2963: 0x04, 0x2964: 0x05, + 0x296a: 0x06, 0x296d: 0x07, 0x296f: 0x08, + 0x2970: 0x13, 0x2973: 0x15, + // Block 0xa6, offset 0x2980 + 0x2980: 0x3f, 0x2981: 0x40, 0x2982: 0x41, 0x2983: 0x42, 0x2984: 0x43, 0x2985: 0x44, 0x2986: 0x45, 0x2987: 0x46, + 0x2988: 0x47, 0x2989: 0x48, 0x298a: 0x49, 0x298b: 0x4a, 0x298c: 0x4b, 0x298d: 0x4c, 0x298e: 0x4d, 0x298f: 0x4e, + 0x2990: 0x4f, 0x2991: 0x50, 0x2992: 0x51, 0x2993: 0x52, 0x2994: 0x53, 0x2995: 0x54, 0x2996: 0x55, 0x2997: 0x56, + 0x2998: 0x57, 0x2999: 0x58, 0x299a: 0x59, 0x299b: 0x5a, 0x299c: 0x5b, 0x299d: 0x5c, 0x299e: 0x5d, 0x299f: 0x5e, + 0x29a0: 0x5f, 0x29a1: 0x60, 0x29a2: 0x61, 0x29a3: 0x62, 0x29a4: 0x63, 0x29a5: 0x64, 0x29a6: 0x65, 0x29a7: 0x66, + 0x29a8: 0x67, 0x29a9: 0x68, 0x29aa: 0x69, 0x29ac: 0x6a, 0x29ad: 0x6b, 0x29ae: 0x6c, 0x29af: 0x6d, + 0x29b0: 0x6e, 0x29b1: 0x6f, 0x29b3: 0x70, 0x29b4: 0x71, 0x29b5: 0x72, 0x29b6: 0x73, 0x29b7: 0x74, + 0x29b8: 0x5a4, 0x29b9: 0x5a5, 0x29ba: 0x77, 0x29bb: 0x5a6, 0x29bc: 0x79, 0x29bd: 0x7a, 0x29be: 0x7b, 0x29bf: 0x7c, + // Block 0xa7, offset 0x29c0 + 0x29c2: 0x01, 0x29c3: 0x5a1, 0x29c4: 0x5a2, 0x29c5: 0x5a3, 0x29c6: 0x05, 0x29c7: 0x06, + 0x29c8: 0x07, 0x29c9: 0x08, 0x29ca: 0x09, 0x29cb: 0x0a, 0x29cc: 0x0b, 0x29cd: 0x0c, 0x29ce: 0x0d, 0x29cf: 0x0e, + 0x29d0: 0x0f, 0x29d1: 0x10, 0x29d2: 0x11, 0x29d3: 0x12, 0x29d4: 0x13, 0x29d5: 0x14, 0x29d6: 0x15, 0x29d7: 0x16, + 0x29d8: 0x17, 0x29d9: 0x18, 0x29da: 0x19, 0x29db: 0x1a, 0x29dc: 0x1b, 0x29dd: 0x1c, 0x29de: 0x1d, 0x29df: 0x1e, + 0x29e0: 0x01, 0x29e1: 0xa4, 0x29e2: 0x03, 0x29e3: 0x04, 0x29e4: 0x05, + 0x29ea: 0x06, 0x29ed: 0x07, 0x29ef: 0x08, + 0x29f0: 0x13, 0x29f3: 0x15, + // Block 0xa8, offset 0x2a00 + 0x2a00: 0x5ab, 0x2a01: 0x7e, 0x2a02: 0x7f, 0x2a03: 0x80, 0x2a04: 0x81, 0x2a05: 0x82, 0x2a06: 0x83, 0x2a07: 0x84, + 0x2a08: 0x85, 0x2a09: 0x86, 0x2a0a: 0x87, 0x2a0b: 0x88, 0x2a0c: 0x89, 0x2a0d: 0x8a, 0x2a0e: 0x8b, 0x2a0f: 0x8c, + 0x2a10: 0x8d, 0x2a11: 0x8e, 0x2a12: 0x8f, 0x2a13: 0x90, 0x2a14: 0x91, 0x2a15: 0x92, 0x2a16: 0x93, 0x2a17: 0x94, + 0x2a18: 0x95, 0x2a19: 0x96, 0x2a1a: 0x97, 0x2a1b: 0x98, 0x2a1c: 0x99, 0x2a1d: 0x9a, 0x2a1e: 0x9b, 0x2a1f: 0x9c, + 0x2a20: 0x9d, 0x2a21: 0x9e, 0x2a22: 0x9f, 0x2a23: 0xa0, 0x2a24: 0xa1, 0x2a25: 0xa2, 0x2a26: 0xa3, 0x2a27: 0xa4, + 0x2a28: 0xa5, 0x2a29: 0xa6, 0x2a2a: 0xa7, 0x2a2b: 0xa8, 0x2a2c: 0xa9, 0x2a2d: 0xaa, + 0x2a30: 0xab, 0x2a31: 0xac, 0x2a32: 0xad, 0x2a33: 0xae, 0x2a34: 0xaf, 0x2a35: 0xb0, 0x2a36: 0xb1, 0x2a37: 0xb2, + 0x2a38: 0xb3, 0x2a3a: 0xb4, 0x2a3b: 0xb5, 0x2a3c: 0xb6, 0x2a3d: 0xb7, 0x2a3e: 0xb8, 0x2a3f: 0xb9, + // Block 0xa9, offset 0x2a40 + 0x2a64: 0xfb, 0x2a65: 0xfc, 0x2a66: 0xfd, 0x2a67: 0xfe, + 0x2a68: 0xff, 0x2a69: 0x100, 0x2a6a: 0x101, 0x2a6b: 0x102, 0x2a6c: 0x103, 0x2a6d: 0x104, 0x2a6e: 0x252, 0x2a6f: 0x5ac, + 0x2a70: 0x253, 0x2a71: 0x5ad, 0x2a72: 0x5ae, 0x2a73: 0x5af, 0x2a74: 0x5b0, 0x2a75: 0x10c, 0x2a76: 0x10d, 0x2a77: 0x10e, + 0x2a78: 0x10f, 0x2a79: 0x110, 0x2a7a: 0x111, 0x2a7b: 0x112, 0x2a7c: 0x113, 0x2a7d: 0x114, 0x2a7e: 0x115, 0x2a7f: 0x116, + // Block 0xaa, offset 0x2a80 + 0x2a82: 0x01, 0x2a83: 0x02, 0x2a84: 0x03, 0x2a85: 0x04, 0x2a86: 0x05, 0x2a87: 0x06, + 0x2a88: 0x07, 0x2a89: 0x08, 0x2a8a: 0x09, 0x2a8b: 0x0a, 0x2a8c: 0x0b, 0x2a8d: 0x0c, 0x2a8e: 0x0d, 0x2a8f: 0x0e, + 0x2a90: 0x0f, 0x2a91: 0x10, 0x2a92: 0x11, 0x2a93: 0x12, 0x2a94: 0x13, 0x2a95: 0x14, 0x2a96: 0x15, 0x2a97: 0x16, + 0x2a98: 0x5a7, 0x2a99: 0x5a8, 0x2a9a: 0x5a9, 0x2a9b: 0x5aa, 0x2a9c: 0x1b, 0x2a9d: 0x1c, 0x2a9e: 0x1d, 0x2a9f: 0x1e, + 0x2aa0: 0x01, 0x2aa1: 0x02, 0x2aa2: 0xa6, 0x2aa3: 0x04, 0x2aa4: 0x05, + 0x2aaa: 0x06, 0x2aad: 0x07, 0x2aaf: 0xa7, + 0x2ab0: 0x13, 0x2ab3: 0x15, + // Block 0xab, offset 0x2ac0 + 0x2ac0: 0x3f, 0x2ac1: 0x40, 0x2ac2: 0x41, 0x2ac3: 0x42, 0x2ac4: 0x43, 0x2ac5: 0x44, 0x2ac6: 0x45, 0x2ac7: 0x46, + 0x2ac8: 0x47, 0x2ac9: 0x48, 0x2aca: 0x49, 0x2acb: 0x4a, 0x2acc: 0x4b, 0x2acd: 0x4c, 0x2ace: 0x4d, 0x2acf: 0x4e, + 0x2ad0: 0x4f, 0x2ad1: 0x50, 0x2ad2: 0x51, 0x2ad3: 0x52, 0x2ad4: 0x53, 0x2ad5: 0x54, 0x2ad6: 0x55, 0x2ad7: 0x56, + 0x2ad8: 0x57, 0x2ad9: 0x58, 0x2ada: 0x59, 0x2adb: 0x5a, 0x2adc: 0x5b, 0x2add: 0x5c, 0x2ade: 0x5d, 0x2adf: 0x5e, + 0x2ae0: 0x5f, 0x2ae1: 0x60, 0x2ae2: 0x61, 0x2ae3: 0x62, 0x2ae4: 0x63, 0x2ae5: 0x64, 0x2ae6: 0x65, 0x2ae7: 0x66, + 0x2ae8: 0x67, 0x2ae9: 0x68, 0x2aea: 0x69, 0x2aec: 0x6a, 0x2aed: 0x6b, 0x2aee: 0x6c, 0x2aef: 0x6d, + 0x2af0: 0x6e, 0x2af1: 0x6f, 0x2af3: 0x70, 0x2af4: 0x71, 0x2af5: 0x72, 0x2af6: 0x73, 0x2af7: 0x74, + 0x2af8: 0x75, 0x2af9: 0x76, 0x2afa: 0x5b7, 0x2afb: 0x78, 0x2afc: 0x79, 0x2afd: 0x7a, 0x2afe: 0x7b, 0x2aff: 0x7c, + // Block 0xac, offset 0x2b00 + 0x2b02: 0x01, 0x2b03: 0x5b3, 0x2b04: 0x5b4, 0x2b05: 0x5b5, 0x2b06: 0x05, 0x2b07: 0x06, + 0x2b08: 0x5b6, 0x2b09: 0x08, 0x2b0a: 0x09, 0x2b0b: 0x0a, 0x2b0c: 0x0b, 0x2b0d: 0x0c, 0x2b0e: 0x0d, 0x2b0f: 0x0e, + 0x2b10: 0x0f, 0x2b11: 0x10, 0x2b12: 0x11, 0x2b13: 0x12, 0x2b14: 0x13, 0x2b15: 0x14, 0x2b16: 0x15, 0x2b17: 0x16, + 0x2b18: 0x17, 0x2b19: 0x18, 0x2b1a: 0x19, 0x2b1b: 0x1a, 0x2b1c: 0x1b, 0x2b1d: 0x1c, 0x2b1e: 0x1d, 0x2b1f: 0x1e, + 0x2b20: 0x01, 0x2b21: 0xa9, 0x2b22: 0x03, 0x2b23: 0x04, 0x2b24: 0x05, + 0x2b2a: 0x06, 0x2b2d: 0x07, 0x2b2f: 0x08, + 0x2b30: 0x13, 0x2b33: 0x15, + // Block 0xad, offset 0x2b40 + 0x2b40: 0x3f, 0x2b41: 0x40, 0x2b42: 0x41, 0x2b43: 0x42, 0x2b44: 0x43, 0x2b45: 0x44, 0x2b46: 0x45, 0x2b47: 0x46, + 0x2b48: 0x47, 0x2b49: 0x48, 0x2b4a: 0x49, 0x2b4b: 0x4a, 0x2b4c: 0x4b, 0x2b4d: 0x4c, 0x2b4e: 0x4d, 0x2b4f: 0x4e, + 0x2b50: 0x4f, 0x2b51: 0x50, 0x2b52: 0x51, 0x2b53: 0x52, 0x2b54: 0x53, 0x2b55: 0x54, 0x2b56: 0x55, 0x2b57: 0x56, + 0x2b58: 0x57, 0x2b59: 0x58, 0x2b5a: 0x59, 0x2b5b: 0x5a, 0x2b5c: 0x5b, 0x2b5d: 0x5c, 0x2b5e: 0x5d, 0x2b5f: 0x5e, + 0x2b60: 0x5f, 0x2b61: 0x60, 0x2b62: 0x61, 0x2b63: 0x62, 0x2b64: 0x63, 0x2b65: 0x64, 0x2b66: 0x65, 0x2b67: 0x66, + 0x2b68: 0x67, 0x2b69: 0x68, 0x2b6a: 0x69, 0x2b6c: 0x6a, 0x2b6d: 0x6b, 0x2b6e: 0x6c, 0x2b6f: 0x6d, + 0x2b70: 0x6e, 0x2b71: 0x6f, 0x2b73: 0x70, 0x2b74: 0x71, 0x2b75: 0x72, 0x2b76: 0x1fc, 0x2b77: 0x74, + 0x2b78: 0x75, 0x2b79: 0x5c1, 0x2b7a: 0x5c2, 0x2b7b: 0x5c3, 0x2b7c: 0x79, 0x2b7d: 0x7a, 0x2b7e: 0x7b, 0x2b7f: 0x7c, + // Block 0xae, offset 0x2b80 + 0x2b82: 0x01, 0x2b83: 0x5ba, 0x2b84: 0x5bb, 0x2b85: 0x5bc, 0x2b86: 0x5bd, 0x2b87: 0x5be, + 0x2b88: 0x5bf, 0x2b89: 0x08, 0x2b8a: 0x5c0, 0x2b8b: 0x0a, 0x2b8c: 0x0b, 0x2b8d: 0x0c, 0x2b8e: 0x0d, 0x2b8f: 0x0e, + 0x2b90: 0x0f, 0x2b91: 0x10, 0x2b92: 0x11, 0x2b93: 0x12, 0x2b94: 0x13, 0x2b95: 0x14, 0x2b96: 0x15, 0x2b97: 0x16, + 0x2b98: 0x17, 0x2b99: 0x18, 0x2b9a: 0x19, 0x2b9b: 0x1a, 0x2b9c: 0x1b, 0x2b9d: 0x1c, 0x2b9e: 0x1d, 0x2b9f: 0x1e, + 0x2ba0: 0x01, 0x2ba1: 0xab, 0x2ba2: 0x4e, 0x2ba3: 0x04, 0x2ba4: 0x05, + 0x2baa: 0x06, 0x2bad: 0x07, 0x2baf: 0x08, + 0x2bb0: 0x13, 0x2bb3: 0x15, + // Block 0xaf, offset 0x2bc0 + 0x2be0: 0x1f, 0x2be1: 0x20, 0x2be2: 0x21, 0x2be3: 0x22, 0x2be4: 0x23, 0x2be5: 0x24, 0x2be6: 0x25, 0x2be7: 0x26, + 0x2be8: 0x27, 0x2be9: 0x28, 0x2bea: 0x29, 0x2beb: 0x2a, 0x2bec: 0x2b, 0x2bed: 0x2c, 0x2bee: 0x2d, 0x2bef: 0x2e, + 0x2bf0: 0x2f, 0x2bf1: 0x30, 0x2bf2: 0x31, 0x2bf3: 0x32, 0x2bf4: 0x33, 0x2bf5: 0x34, 0x2bf6: 0x5c4, 0x2bf7: 0x36, + 0x2bf8: 0x37, 0x2bf9: 0x38, 0x2bfa: 0x39, 0x2bfb: 0x3a, 0x2bfc: 0x3b, 0x2bfd: 0x3c, 0x2bfe: 0x3d, 0x2bff: 0x3e, + // Block 0xb0, offset 0x2c00 + 0x2c02: 0x01, 0x2c03: 0x02, 0x2c04: 0x03, 0x2c05: 0x04, 0x2c06: 0x05, 0x2c07: 0x06, + 0x2c08: 0x07, 0x2c09: 0x08, 0x2c0a: 0x09, 0x2c0b: 0x0a, 0x2c0c: 0x0b, 0x2c0d: 0x0c, 0x2c0e: 0x0d, 0x2c0f: 0x0e, + 0x2c10: 0x0f, 0x2c11: 0x10, 0x2c12: 0x11, 0x2c13: 0x12, 0x2c14: 0x13, 0x2c15: 0x14, 0x2c16: 0x15, 0x2c17: 0x16, + 0x2c18: 0x17, 0x2c19: 0x18, 0x2c1a: 0x19, 0x2c1b: 0x1a, 0x2c1c: 0x1b, 0x2c1d: 0x1c, 0x2c1e: 0x1d, 0x2c1f: 0x1e, + 0x2c20: 0xad, 0x2c21: 0x02, 0x2c22: 0x03, 0x2c23: 0x04, 0x2c24: 0x05, + 0x2c2a: 0x06, 0x2c2d: 0x07, 0x2c2f: 0x08, + 0x2c30: 0x13, 0x2c33: 0x15, + // Block 0xb1, offset 0x2c40 + 0x2c40: 0x3f, 0x2c41: 0x40, 0x2c42: 0x41, 0x2c43: 0x42, 0x2c44: 0x43, 0x2c45: 0x44, 0x2c46: 0x45, 0x2c47: 0x46, + 0x2c48: 0x47, 0x2c49: 0x48, 0x2c4a: 0x49, 0x2c4b: 0x4a, 0x2c4c: 0x4b, 0x2c4d: 0x4c, 0x2c4e: 0x4d, 0x2c4f: 0x4e, + 0x2c50: 0x4f, 0x2c51: 0x50, 0x2c52: 0x51, 0x2c53: 0x52, 0x2c54: 0x53, 0x2c55: 0x54, 0x2c56: 0x55, 0x2c57: 0x56, + 0x2c58: 0x57, 0x2c59: 0x58, 0x2c5a: 0x59, 0x2c5b: 0x5a, 0x2c5c: 0x5b, 0x2c5d: 0x5c, 0x2c5e: 0x5d, 0x2c5f: 0x5e, + 0x2c60: 0x5f, 0x2c61: 0x60, 0x2c62: 0x61, 0x2c63: 0x62, 0x2c64: 0x63, 0x2c65: 0x64, 0x2c66: 0x65, 0x2c67: 0x66, + 0x2c68: 0x67, 0x2c69: 0x68, 0x2c6a: 0x69, 0x2c6c: 0x6a, 0x2c6d: 0x6b, 0x2c6e: 0x6c, 0x2c6f: 0x6d, + 0x2c70: 0x6e, 0x2c71: 0x6f, 0x2c73: 0x70, 0x2c74: 0x71, 0x2c75: 0x72, 0x2c76: 0x73, 0x2c77: 0x74, + 0x2c78: 0x75, 0x2c79: 0x1f2, 0x2c7a: 0x77, 0x2c7b: 0x5c9, 0x2c7c: 0x79, 0x2c7d: 0x7a, 0x2c7e: 0x7b, 0x2c7f: 0x7c, + // Block 0xb2, offset 0x2c80 + 0x2c82: 0x01, 0x2c83: 0x5c7, 0x2c84: 0x1f0, 0x2c85: 0x1f1, 0x2c86: 0x05, 0x2c87: 0x5c8, + 0x2c88: 0x07, 0x2c89: 0x08, 0x2c8a: 0x09, 0x2c8b: 0x0a, 0x2c8c: 0x0b, 0x2c8d: 0x0c, 0x2c8e: 0x0d, 0x2c8f: 0x0e, + 0x2c90: 0x0f, 0x2c91: 0x10, 0x2c92: 0x11, 0x2c93: 0x12, 0x2c94: 0x13, 0x2c95: 0x14, 0x2c96: 0x15, 0x2c97: 0x16, + 0x2c98: 0x17, 0x2c99: 0x18, 0x2c9a: 0x19, 0x2c9b: 0x1a, 0x2c9c: 0x1b, 0x2c9d: 0x1c, 0x2c9e: 0x1d, 0x2c9f: 0x1e, + 0x2ca0: 0x01, 0x2ca1: 0xaf, 0x2ca2: 0x03, 0x2ca3: 0x04, 0x2ca4: 0x05, + 0x2caa: 0x06, 0x2cad: 0x07, 0x2caf: 0x08, + 0x2cb0: 0x13, 0x2cb3: 0x15, + // Block 0xb3, offset 0x2cc0 + 0x2cc2: 0x01, 0x2cc3: 0x02, 0x2cc4: 0x5cc, 0x2cc5: 0x292, 0x2cc6: 0x05, 0x2cc7: 0x06, + 0x2cc8: 0x07, 0x2cc9: 0x08, 0x2cca: 0x09, 0x2ccb: 0x0a, 0x2ccc: 0x0b, 0x2ccd: 0x0c, 0x2cce: 0x0d, 0x2ccf: 0x0e, + 0x2cd0: 0x0f, 0x2cd1: 0x10, 0x2cd2: 0x11, 0x2cd3: 0x12, 0x2cd4: 0x13, 0x2cd5: 0x14, 0x2cd6: 0x15, 0x2cd7: 0x16, + 0x2cd8: 0x17, 0x2cd9: 0x18, 0x2cda: 0x19, 0x2cdb: 0x1a, 0x2cdc: 0x1b, 0x2cdd: 0x1c, 0x2cde: 0x1d, 0x2cdf: 0x1e, + 0x2ce0: 0x01, 0x2ce1: 0x63, 0x2ce2: 0x03, 0x2ce3: 0x04, 0x2ce4: 0x05, + 0x2cea: 0x06, 0x2ced: 0x07, 0x2cef: 0x08, + 0x2cf0: 0x13, 0x2cf3: 0x15, + // Block 0xb4, offset 0x2d00 + 0x2d00: 0x3f, 0x2d01: 0x40, 0x2d02: 0x41, 0x2d03: 0x42, 0x2d04: 0x43, 0x2d05: 0x44, 0x2d06: 0x45, 0x2d07: 0x46, + 0x2d08: 0x47, 0x2d09: 0x48, 0x2d0a: 0x49, 0x2d0b: 0x4a, 0x2d0c: 0x4b, 0x2d0d: 0x4c, 0x2d0e: 0x4d, 0x2d0f: 0x4e, + 0x2d10: 0x4f, 0x2d11: 0x50, 0x2d12: 0x51, 0x2d13: 0x52, 0x2d14: 0x53, 0x2d15: 0x54, 0x2d16: 0x55, 0x2d17: 0x56, + 0x2d18: 0x57, 0x2d19: 0x58, 0x2d1a: 0x59, 0x2d1b: 0x5a, 0x2d1c: 0x5b, 0x2d1d: 0x5c, 0x2d1e: 0x5d, 0x2d1f: 0x5e, + 0x2d20: 0x5f, 0x2d21: 0x60, 0x2d22: 0x61, 0x2d23: 0x62, 0x2d24: 0x63, 0x2d25: 0x64, 0x2d26: 0x65, 0x2d27: 0x66, + 0x2d28: 0x67, 0x2d29: 0x68, 0x2d2a: 0x69, 0x2d2c: 0x6a, 0x2d2d: 0x6b, 0x2d2e: 0x6c, 0x2d2f: 0x6d, + 0x2d30: 0x6e, 0x2d31: 0x6f, 0x2d33: 0x70, 0x2d34: 0x71, 0x2d35: 0x72, 0x2d36: 0x73, 0x2d37: 0x74, + 0x2d38: 0x5d0, 0x2d39: 0x76, 0x2d3a: 0x77, 0x2d3b: 0x78, 0x2d3c: 0x79, 0x2d3d: 0x7a, 0x2d3e: 0x7b, 0x2d3f: 0x7c, + // Block 0xb5, offset 0x2d40 + 0x2d42: 0x01, 0x2d43: 0x5cf, 0x2d44: 0x03, 0x2d45: 0x04, 0x2d46: 0x05, 0x2d47: 0x06, + 0x2d48: 0x07, 0x2d49: 0x08, 0x2d4a: 0x09, 0x2d4b: 0x0a, 0x2d4c: 0x0b, 0x2d4d: 0x0c, 0x2d4e: 0x0d, 0x2d4f: 0x0e, + 0x2d50: 0x0f, 0x2d51: 0x10, 0x2d52: 0x11, 0x2d53: 0x12, 0x2d54: 0x13, 0x2d55: 0x14, 0x2d56: 0x15, 0x2d57: 0x16, + 0x2d58: 0x17, 0x2d59: 0x18, 0x2d5a: 0x19, 0x2d5b: 0x1a, 0x2d5c: 0x1b, 0x2d5d: 0x1c, 0x2d5e: 0x1d, 0x2d5f: 0x1e, + 0x2d60: 0x01, 0x2d61: 0xb2, 0x2d62: 0x03, 0x2d63: 0x04, 0x2d64: 0x05, + 0x2d6a: 0x06, 0x2d6d: 0x07, 0x2d6f: 0x08, + 0x2d70: 0x13, 0x2d73: 0x15, + // Block 0xb6, offset 0x2d80 + 0x2d80: 0x3f, 0x2d81: 0x40, 0x2d82: 0x41, 0x2d83: 0x42, 0x2d84: 0x43, 0x2d85: 0x44, 0x2d86: 0x45, 0x2d87: 0x46, + 0x2d88: 0x47, 0x2d89: 0x48, 0x2d8a: 0x49, 0x2d8b: 0x4a, 0x2d8c: 0x4b, 0x2d8d: 0x4c, 0x2d8e: 0x4d, 0x2d8f: 0x4e, + 0x2d90: 0x4f, 0x2d91: 0x50, 0x2d92: 0x51, 0x2d93: 0x52, 0x2d94: 0x53, 0x2d95: 0x54, 0x2d96: 0x55, 0x2d97: 0x56, + 0x2d98: 0x57, 0x2d99: 0x58, 0x2d9a: 0x59, 0x2d9b: 0x5a, 0x2d9c: 0x5b, 0x2d9d: 0x5c, 0x2d9e: 0x5d, 0x2d9f: 0x5e, + 0x2da0: 0x5f, 0x2da1: 0x60, 0x2da2: 0x61, 0x2da3: 0x62, 0x2da4: 0x63, 0x2da5: 0x64, 0x2da6: 0x65, 0x2da7: 0x66, + 0x2da8: 0x67, 0x2da9: 0x68, 0x2daa: 0x69, 0x2dac: 0x6a, 0x2dad: 0x6b, 0x2dae: 0x6c, 0x2daf: 0x6d, + 0x2db0: 0x6e, 0x2db1: 0x6f, 0x2db3: 0x70, 0x2db4: 0x71, 0x2db5: 0x72, 0x2db6: 0x1fc, 0x2db7: 0x74, + 0x2db8: 0x75, 0x2db9: 0x261, 0x2dba: 0x77, 0x2dbb: 0x5d6, 0x2dbc: 0x79, 0x2dbd: 0x7a, 0x2dbe: 0x7b, 0x2dbf: 0x7c, + // Block 0xb7, offset 0x2dc0 + 0x2dc2: 0x01, 0x2dc3: 0x5d3, 0x2dc4: 0x5d4, 0x2dc5: 0x5d5, 0x2dc6: 0x05, 0x2dc7: 0x268, + 0x2dc8: 0x25f, 0x2dc9: 0x08, 0x2dca: 0x09, 0x2dcb: 0x0a, 0x2dcc: 0x0b, 0x2dcd: 0x0c, 0x2dce: 0x0d, 0x2dcf: 0x0e, + 0x2dd0: 0x0f, 0x2dd1: 0x10, 0x2dd2: 0x11, 0x2dd3: 0x12, 0x2dd4: 0x13, 0x2dd5: 0x14, 0x2dd6: 0x15, 0x2dd7: 0x16, + 0x2dd8: 0x17, 0x2dd9: 0x18, 0x2dda: 0x19, 0x2ddb: 0x1a, 0x2ddc: 0x1b, 0x2ddd: 0x1c, 0x2dde: 0x1d, 0x2ddf: 0x1e, + 0x2de0: 0x01, 0x2de1: 0xb4, 0x2de2: 0x4e, 0x2de3: 0x04, 0x2de4: 0x05, + 0x2dea: 0x06, 0x2ded: 0x07, 0x2def: 0x08, + 0x2df0: 0x13, 0x2df3: 0x15, + // Block 0xb8, offset 0x2e00 + 0x2e00: 0x3f, 0x2e01: 0x40, 0x2e02: 0x41, 0x2e03: 0x42, 0x2e04: 0x43, 0x2e05: 0x44, 0x2e06: 0x45, 0x2e07: 0x46, + 0x2e08: 0x47, 0x2e09: 0x48, 0x2e0a: 0x49, 0x2e0b: 0x4a, 0x2e0c: 0x4b, 0x2e0d: 0x4c, 0x2e0e: 0x4d, 0x2e0f: 0x4e, + 0x2e10: 0x4f, 0x2e11: 0x50, 0x2e12: 0x51, 0x2e13: 0x52, 0x2e14: 0x53, 0x2e15: 0x54, 0x2e16: 0x55, 0x2e17: 0x56, + 0x2e18: 0x57, 0x2e19: 0x58, 0x2e1a: 0x59, 0x2e1b: 0x5a, 0x2e1c: 0x5b, 0x2e1d: 0x5c, 0x2e1e: 0x5d, 0x2e1f: 0x5e, + 0x2e20: 0x5f, 0x2e21: 0x60, 0x2e22: 0x61, 0x2e23: 0x62, 0x2e24: 0x63, 0x2e25: 0x64, 0x2e26: 0x65, 0x2e27: 0x66, + 0x2e28: 0x67, 0x2e29: 0x68, 0x2e2a: 0x69, 0x2e2c: 0x6a, 0x2e2d: 0x6b, 0x2e2e: 0x6c, 0x2e2f: 0x6d, + 0x2e30: 0x6e, 0x2e31: 0x6f, 0x2e33: 0x70, 0x2e34: 0x71, 0x2e35: 0x72, 0x2e36: 0x1fc, 0x2e37: 0x74, + 0x2e38: 0x75, 0x2e39: 0x5da, 0x2e3a: 0x26b, 0x2e3b: 0x5d6, 0x2e3c: 0x79, 0x2e3d: 0x7a, 0x2e3e: 0x7b, 0x2e3f: 0x7c, + // Block 0xb9, offset 0x2e40 + 0x2e42: 0x01, 0x2e43: 0x5d3, 0x2e44: 0x5d4, 0x2e45: 0x5d9, 0x2e46: 0x05, 0x2e47: 0x268, + 0x2e48: 0x25f, 0x2e49: 0x08, 0x2e4a: 0x09, 0x2e4b: 0x0a, 0x2e4c: 0x0b, 0x2e4d: 0x0c, 0x2e4e: 0x0d, 0x2e4f: 0x0e, + 0x2e50: 0x0f, 0x2e51: 0x10, 0x2e52: 0x11, 0x2e53: 0x12, 0x2e54: 0x13, 0x2e55: 0x14, 0x2e56: 0x15, 0x2e57: 0x16, + 0x2e58: 0x17, 0x2e59: 0x18, 0x2e5a: 0x19, 0x2e5b: 0x1a, 0x2e5c: 0x1b, 0x2e5d: 0x1c, 0x2e5e: 0x1d, 0x2e5f: 0x1e, + 0x2e60: 0x01, 0x2e61: 0xb6, 0x2e62: 0x51, 0x2e63: 0x52, 0x2e64: 0x05, + 0x2e6a: 0x06, 0x2e6d: 0x07, 0x2e6f: 0x08, + 0x2e70: 0x54, 0x2e73: 0x15, + // Block 0xba, offset 0x2e80 + 0x2ea0: 0x1f, 0x2ea1: 0x20, 0x2ea2: 0x21, 0x2ea3: 0x22, 0x2ea4: 0x23, 0x2ea5: 0x24, 0x2ea6: 0x25, 0x2ea7: 0x26, + 0x2ea8: 0x27, 0x2ea9: 0x28, 0x2eaa: 0x29, 0x2eab: 0x2a, 0x2eac: 0x2b, 0x2ead: 0x2c, 0x2eae: 0x5db, 0x2eaf: 0x2e, + 0x2eb0: 0x2f, 0x2eb1: 0x30, 0x2eb2: 0x31, 0x2eb3: 0x32, 0x2eb4: 0x33, 0x2eb5: 0x34, 0x2eb6: 0x35, 0x2eb7: 0x36, + 0x2eb8: 0x37, 0x2eb9: 0x38, 0x2eba: 0x39, 0x2ebb: 0x3a, 0x2ebc: 0x3b, 0x2ebd: 0x3c, 0x2ebe: 0x3d, 0x2ebf: 0x3e, + // Block 0xbb, offset 0x2ec0 + 0x2ec2: 0x01, 0x2ec3: 0x02, 0x2ec4: 0x03, 0x2ec5: 0x04, 0x2ec6: 0x05, 0x2ec7: 0x06, + 0x2ec8: 0x07, 0x2ec9: 0x08, 0x2eca: 0x09, 0x2ecb: 0x0a, 0x2ecc: 0x0b, 0x2ecd: 0x0c, 0x2ece: 0x0d, 0x2ecf: 0x0e, + 0x2ed0: 0x0f, 0x2ed1: 0x10, 0x2ed2: 0x11, 0x2ed3: 0x12, 0x2ed4: 0x13, 0x2ed5: 0x14, 0x2ed6: 0x15, 0x2ed7: 0x16, + 0x2ed8: 0x17, 0x2ed9: 0x18, 0x2eda: 0x19, 0x2edb: 0x1a, 0x2edc: 0x1b, 0x2edd: 0x1c, 0x2ede: 0x1d, 0x2edf: 0x1e, + 0x2ee0: 0xb8, 0x2ee1: 0x02, 0x2ee2: 0x03, 0x2ee3: 0x04, 0x2ee4: 0x05, + 0x2eea: 0x06, 0x2eed: 0x07, 0x2eef: 0x08, + 0x2ef0: 0x13, 0x2ef3: 0x15, + // Block 0xbc, offset 0x2f00 + 0x2f20: 0x1f, 0x2f21: 0x20, 0x2f22: 0x21, 0x2f23: 0x22, 0x2f24: 0x23, 0x2f25: 0x24, 0x2f26: 0x25, 0x2f27: 0x26, + 0x2f28: 0x27, 0x2f29: 0x28, 0x2f2a: 0x29, 0x2f2b: 0x2a, 0x2f2c: 0x2b, 0x2f2d: 0x2c, 0x2f2e: 0x2d, 0x2f2f: 0x2e, + 0x2f30: 0x5dc, 0x2f31: 0x30, 0x2f32: 0x31, 0x2f33: 0x32, 0x2f34: 0x33, 0x2f35: 0x34, 0x2f36: 0x35, 0x2f37: 0x36, + 0x2f38: 0x37, 0x2f39: 0x38, 0x2f3a: 0x39, 0x2f3b: 0x3a, 0x2f3c: 0x3b, 0x2f3d: 0x3c, 0x2f3e: 0x3d, 0x2f3f: 0x3e, + // Block 0xbd, offset 0x2f40 + 0x2f42: 0x01, 0x2f43: 0x02, 0x2f44: 0x03, 0x2f45: 0x04, 0x2f46: 0x05, 0x2f47: 0x06, + 0x2f48: 0x07, 0x2f49: 0x08, 0x2f4a: 0x09, 0x2f4b: 0x0a, 0x2f4c: 0x0b, 0x2f4d: 0x0c, 0x2f4e: 0x0d, 0x2f4f: 0x0e, + 0x2f50: 0x0f, 0x2f51: 0x10, 0x2f52: 0x11, 0x2f53: 0x12, 0x2f54: 0x13, 0x2f55: 0x14, 0x2f56: 0x15, 0x2f57: 0x16, + 0x2f58: 0x17, 0x2f59: 0x18, 0x2f5a: 0x19, 0x2f5b: 0x1a, 0x2f5c: 0x1b, 0x2f5d: 0x1c, 0x2f5e: 0x1d, 0x2f5f: 0x1e, + 0x2f60: 0xba, 0x2f61: 0x02, 0x2f62: 0x03, 0x2f63: 0x04, 0x2f64: 0x05, + 0x2f6a: 0x06, 0x2f6d: 0x07, 0x2f6f: 0x08, + 0x2f70: 0x13, 0x2f73: 0x15, + // Block 0xbe, offset 0x2f80 + 0x2fa0: 0x1f, 0x2fa1: 0x20, 0x2fa2: 0x21, 0x2fa3: 0x22, 0x2fa4: 0x23, 0x2fa5: 0x24, 0x2fa6: 0x25, 0x2fa7: 0x26, + 0x2fa8: 0x27, 0x2fa9: 0x28, 0x2faa: 0x29, 0x2fab: 0x2a, 0x2fac: 0x2b, 0x2fad: 0x2c, 0x2fae: 0x2d, 0x2faf: 0x2e, + 0x2fb0: 0x2f, 0x2fb1: 0x30, 0x2fb2: 0x31, 0x2fb3: 0x32, 0x2fb4: 0x33, 0x2fb5: 0x34, 0x2fb6: 0x35, 0x2fb7: 0x36, + 0x2fb8: 0x5dd, 0x2fb9: 0x5de, 0x2fba: 0x39, 0x2fbb: 0x3a, 0x2fbc: 0x3b, 0x2fbd: 0x3c, 0x2fbe: 0x3d, 0x2fbf: 0x3e, + // Block 0xbf, offset 0x2fc0 + 0x2fc2: 0x01, 0x2fc3: 0x02, 0x2fc4: 0x03, 0x2fc5: 0x04, 0x2fc6: 0x05, 0x2fc7: 0x06, + 0x2fc8: 0x07, 0x2fc9: 0x08, 0x2fca: 0x09, 0x2fcb: 0x0a, 0x2fcc: 0x0b, 0x2fcd: 0x0c, 0x2fce: 0x0d, 0x2fcf: 0x0e, + 0x2fd0: 0x0f, 0x2fd1: 0x10, 0x2fd2: 0x11, 0x2fd3: 0x12, 0x2fd4: 0x13, 0x2fd5: 0x14, 0x2fd6: 0x15, 0x2fd7: 0x16, + 0x2fd8: 0x17, 0x2fd9: 0x18, 0x2fda: 0x19, 0x2fdb: 0x1a, 0x2fdc: 0x1b, 0x2fdd: 0x1c, 0x2fde: 0x1d, 0x2fdf: 0x1e, + 0x2fe0: 0xbc, 0x2fe1: 0x02, 0x2fe2: 0x03, 0x2fe3: 0x04, 0x2fe4: 0x05, + 0x2fea: 0x06, 0x2fed: 0x07, 0x2fef: 0x08, + 0x2ff0: 0x13, 0x2ff3: 0x15, + // Block 0xc0, offset 0x3000 + 0x3000: 0x3f, 0x3001: 0x40, 0x3002: 0x41, 0x3003: 0x42, 0x3004: 0x43, 0x3005: 0x44, 0x3006: 0x45, 0x3007: 0x46, + 0x3008: 0x47, 0x3009: 0x48, 0x300a: 0x49, 0x300b: 0x4a, 0x300c: 0x4b, 0x300d: 0x4c, 0x300e: 0x4d, 0x300f: 0x4e, + 0x3010: 0x4f, 0x3011: 0x50, 0x3012: 0x51, 0x3013: 0x52, 0x3014: 0x53, 0x3015: 0x54, 0x3016: 0x55, 0x3017: 0x56, + 0x3018: 0x57, 0x3019: 0x58, 0x301a: 0x59, 0x301b: 0x5a, 0x301c: 0x5b, 0x301d: 0x5c, 0x301e: 0x5d, 0x301f: 0x5e, + 0x3020: 0x5f, 0x3021: 0x60, 0x3022: 0x61, 0x3023: 0x62, 0x3024: 0x63, 0x3025: 0x64, 0x3026: 0x65, 0x3027: 0x66, + 0x3028: 0x67, 0x3029: 0x68, 0x302a: 0x69, 0x302c: 0x6a, 0x302d: 0x6b, 0x302e: 0x6c, 0x302f: 0x6d, + 0x3030: 0x6e, 0x3031: 0x6f, 0x3033: 0x70, 0x3034: 0x71, 0x3035: 0x72, 0x3036: 0x73, 0x3037: 0x74, + 0x3038: 0x5e7, 0x3039: 0x5e8, 0x303a: 0x5e9, 0x303b: 0x5ea, 0x303c: 0x79, 0x303d: 0x7a, 0x303e: 0x7b, 0x303f: 0x7c, + // Block 0xc1, offset 0x3040 + 0x3042: 0x01, 0x3043: 0x5e1, 0x3044: 0x5e2, 0x3045: 0x5e3, 0x3046: 0x05, 0x3047: 0x5e4, + 0x3048: 0x5e5, 0x3049: 0x08, 0x304a: 0x5e6, 0x304b: 0x0a, 0x304c: 0x0b, 0x304d: 0x0c, 0x304e: 0x0d, 0x304f: 0x0e, + 0x3050: 0x0f, 0x3051: 0x10, 0x3052: 0x11, 0x3053: 0x12, 0x3054: 0x13, 0x3055: 0x14, 0x3056: 0x15, 0x3057: 0x16, + 0x3058: 0x17, 0x3059: 0x18, 0x305a: 0x19, 0x305b: 0x1a, 0x305c: 0x1b, 0x305d: 0x1c, 0x305e: 0x1d, 0x305f: 0x1e, + 0x3060: 0x01, 0x3061: 0xbe, 0x3062: 0x03, 0x3063: 0x04, 0x3064: 0x05, + 0x306a: 0x06, 0x306d: 0x07, 0x306f: 0x08, + 0x3070: 0x13, 0x3073: 0x15, + // Block 0xc2, offset 0x3080 + 0x3080: 0x3f, 0x3081: 0x40, 0x3082: 0x41, 0x3083: 0x42, 0x3084: 0x43, 0x3085: 0x44, 0x3086: 0x45, 0x3087: 0x46, + 0x3088: 0x47, 0x3089: 0x48, 0x308a: 0x49, 0x308b: 0x4a, 0x308c: 0x4b, 0x308d: 0x4c, 0x308e: 0x4d, 0x308f: 0x4e, + 0x3090: 0x4f, 0x3091: 0x50, 0x3092: 0x51, 0x3093: 0x52, 0x3094: 0x53, 0x3095: 0x54, 0x3096: 0x55, 0x3097: 0x56, + 0x3098: 0x57, 0x3099: 0x58, 0x309a: 0x59, 0x309b: 0x5a, 0x309c: 0x5b, 0x309d: 0x5c, 0x309e: 0x5d, 0x309f: 0x5e, + 0x30a0: 0x5f, 0x30a1: 0x60, 0x30a2: 0x61, 0x30a3: 0x62, 0x30a4: 0x63, 0x30a5: 0x64, 0x30a6: 0x65, 0x30a7: 0x66, + 0x30a8: 0x67, 0x30a9: 0x68, 0x30aa: 0x69, 0x30ac: 0x6a, 0x30ad: 0x6b, 0x30ae: 0x6c, 0x30af: 0x6d, + 0x30b0: 0x6e, 0x30b1: 0x6f, 0x30b3: 0x70, 0x30b4: 0x71, 0x30b5: 0x72, 0x30b6: 0x73, 0x30b7: 0x74, + 0x30b8: 0x1de, 0x30b9: 0x1df, 0x30ba: 0x77, 0x30bb: 0x1e1, 0x30bc: 0x79, 0x30bd: 0x7a, 0x30be: 0x7b, 0x30bf: 0x7c, + // Block 0xc3, offset 0x30c0 + 0x30c0: 0x7d, 0x30c1: 0x7e, 0x30c2: 0x7f, 0x30c3: 0x80, 0x30c4: 0x81, 0x30c5: 0x5ed, 0x30c6: 0x83, 0x30c7: 0x84, + 0x30c8: 0x85, 0x30c9: 0x86, 0x30ca: 0x87, 0x30cb: 0x88, 0x30cc: 0x89, 0x30cd: 0x8a, 0x30ce: 0x8b, 0x30cf: 0x8c, + 0x30d0: 0x8d, 0x30d1: 0x8e, 0x30d2: 0x8f, 0x30d3: 0x90, 0x30d4: 0x91, 0x30d5: 0x92, 0x30d6: 0x93, 0x30d7: 0x94, + 0x30d8: 0x95, 0x30d9: 0x96, 0x30da: 0x97, 0x30db: 0x98, 0x30dc: 0x99, 0x30dd: 0x9a, 0x30de: 0x9b, 0x30df: 0x9c, + 0x30e0: 0x9d, 0x30e1: 0x9e, 0x30e2: 0x9f, 0x30e3: 0xa0, 0x30e4: 0xa1, 0x30e5: 0xa2, 0x30e6: 0xa3, 0x30e7: 0xa4, + 0x30e8: 0xa5, 0x30e9: 0xa6, 0x30ea: 0xa7, 0x30eb: 0xa8, 0x30ec: 0xa9, 0x30ed: 0xaa, + 0x30f0: 0xab, 0x30f1: 0xac, 0x30f2: 0xad, 0x30f3: 0xae, 0x30f4: 0xaf, 0x30f5: 0xb0, 0x30f6: 0xb1, 0x30f7: 0xb2, + 0x30f8: 0xb3, 0x30fa: 0xb4, 0x30fb: 0xb5, 0x30fc: 0xb6, 0x30fd: 0xb7, 0x30fe: 0xb8, 0x30ff: 0xb9, + // Block 0xc4, offset 0x3100 + 0x3100: 0xba, 0x3101: 0xbb, 0x3102: 0xbc, 0x3103: 0xbd, 0x3104: 0xbe, 0x3105: 0xbf, 0x3106: 0xc0, 0x3107: 0xc1, + 0x3108: 0xc2, 0x3109: 0xc3, 0x310a: 0xc4, 0x310b: 0xc5, 0x310c: 0xc6, 0x310d: 0x1e4, 0x310e: 0xc8, 0x310f: 0xc9, + // Block 0xc5, offset 0x3140 + 0x3140: 0x18b, 0x3141: 0x18c, 0x3142: 0x18d, 0x3143: 0x18e, 0x3144: 0x5ee, 0x3145: 0x190, 0x3146: 0x191, 0x3147: 0x192, + 0x3148: 0x193, 0x3149: 0x194, 0x314c: 0x195, 0x314d: 0x196, 0x314e: 0x197, 0x314f: 0x198, + 0x3150: 0x199, 0x3151: 0x19a, 0x3152: 0x19b, 0x3153: 0x19c, 0x3154: 0x19d, 0x3155: 0x19e, 0x3157: 0x19f, + 0x3158: 0x1a0, 0x3159: 0x1a1, 0x315a: 0x1a2, 0x315b: 0x1a3, 0x315c: 0x1a4, 0x315d: 0x1a5, + // Block 0xc6, offset 0x3180 + 0x3190: 0x09, 0x3191: 0x0a, 0x3192: 0x0b, 0x3193: 0x0c, 0x3196: 0x0d, + 0x319b: 0x0e, 0x319d: 0x0f, 0x319e: 0x10, 0x319f: 0xc3, + 0x31af: 0x12, + // Block 0xc7, offset 0x31c0 + 0x31c2: 0x01, 0x31c3: 0x1d7, 0x31c4: 0x1d8, 0x31c5: 0x1d9, 0x31c6: 0x05, 0x31c7: 0x1db, + 0x31c8: 0x1dc, 0x31c9: 0x08, 0x31ca: 0x09, 0x31cb: 0x0a, 0x31cc: 0x0b, 0x31cd: 0x0c, 0x31ce: 0x0d, 0x31cf: 0x0e, + 0x31d0: 0x0f, 0x31d1: 0x10, 0x31d2: 0x11, 0x31d3: 0x12, 0x31d4: 0x13, 0x31d5: 0x14, 0x31d6: 0x15, 0x31d7: 0x16, + 0x31d8: 0x17, 0x31d9: 0x18, 0x31da: 0x19, 0x31db: 0x1a, 0x31dc: 0x1b, 0x31dd: 0x1c, 0x31de: 0x1d, 0x31df: 0x1e, + 0x31e0: 0x01, 0x31e1: 0xc0, 0x31e2: 0xc1, 0x31e3: 0xc2, 0x31e4: 0x05, + 0x31ea: 0x06, 0x31ed: 0x07, 0x31ef: 0x08, + 0x31f0: 0xc4, 0x31f3: 0x15, + // Block 0xc8, offset 0x3200 + 0x3202: 0x01, 0x3203: 0x02, 0x3204: 0x03, 0x3205: 0x04, 0x3206: 0x05, 0x3207: 0x06, + 0x3208: 0x07, 0x3209: 0x08, 0x320a: 0x09, 0x320b: 0x0a, 0x320c: 0x0b, 0x320d: 0x0c, 0x320e: 0x0d, 0x320f: 0x0e, + 0x3210: 0x0f, 0x3211: 0x10, 0x3212: 0x5ef, 0x3213: 0x12, 0x3214: 0x13, 0x3215: 0x14, 0x3216: 0x15, 0x3217: 0x16, + 0x3218: 0x17, 0x3219: 0x18, 0x321a: 0x19, 0x321b: 0x1a, 0x321c: 0x1b, 0x321d: 0x1c, 0x321e: 0x1d, 0x321f: 0x1e, + 0x3220: 0x01, 0x3221: 0x02, 0x3222: 0x03, 0x3223: 0x04, 0x3224: 0x05, + 0x322a: 0x06, 0x322d: 0x07, 0x322f: 0x08, + 0x3230: 0x13, 0x3233: 0x15, + // Block 0xc9, offset 0x3240 + 0x3264: 0xfb, 0x3265: 0xfc, 0x3266: 0xfd, 0x3267: 0xfe, + 0x3268: 0xff, 0x3269: 0x100, 0x326a: 0x101, 0x326b: 0x102, 0x326c: 0x103, 0x326d: 0x104, 0x326e: 0x252, 0x326f: 0x106, + 0x3270: 0x5f4, 0x3271: 0x5f5, 0x3272: 0x5f6, 0x3273: 0x5f7, 0x3274: 0x5f8, 0x3275: 0x10c, 0x3276: 0x10d, 0x3277: 0x10e, + 0x3278: 0x10f, 0x3279: 0x110, 0x327a: 0x111, 0x327b: 0x5f9, 0x327c: 0x113, 0x327d: 0x114, 0x327e: 0x115, 0x327f: 0x116, + // Block 0xca, offset 0x3280 + 0x3282: 0x01, 0x3283: 0x02, 0x3284: 0x03, 0x3285: 0x04, 0x3286: 0x05, 0x3287: 0x06, + 0x3288: 0x07, 0x3289: 0x08, 0x328a: 0x09, 0x328b: 0x0a, 0x328c: 0x0b, 0x328d: 0x0c, 0x328e: 0x0d, 0x328f: 0x0e, + 0x3290: 0x0f, 0x3291: 0x10, 0x3292: 0x11, 0x3293: 0x12, 0x3294: 0x13, 0x3295: 0x14, 0x3296: 0x15, 0x3297: 0x16, + 0x3298: 0x5f0, 0x3299: 0x5f1, 0x329a: 0x5f2, 0x329b: 0x5f3, 0x329c: 0x1b, 0x329d: 0x1c, 0x329e: 0x1d, 0x329f: 0x1e, + 0x32a0: 0x01, 0x32a1: 0x02, 0x32a2: 0x03, 0x32a3: 0x04, 0x32a4: 0x05, + 0x32aa: 0x06, 0x32ad: 0x07, 0x32af: 0xc7, + 0x32b0: 0x13, 0x32b3: 0x15, + // Block 0xcb, offset 0x32c0 + 0x32c0: 0x3f, 0x32c1: 0x40, 0x32c2: 0x41, 0x32c3: 0x42, 0x32c4: 0x43, 0x32c5: 0x44, 0x32c6: 0x45, 0x32c7: 0x46, + 0x32c8: 0x47, 0x32c9: 0x48, 0x32ca: 0x49, 0x32cb: 0x4a, 0x32cc: 0x4b, 0x32cd: 0x4c, 0x32ce: 0x4d, 0x32cf: 0x4e, + 0x32d0: 0x4f, 0x32d1: 0x50, 0x32d2: 0x51, 0x32d3: 0x52, 0x32d4: 0x53, 0x32d5: 0x54, 0x32d6: 0x55, 0x32d7: 0x56, + 0x32d8: 0x57, 0x32d9: 0x58, 0x32da: 0x59, 0x32db: 0x5a, 0x32dc: 0x5b, 0x32dd: 0x5c, 0x32de: 0x5d, 0x32df: 0x5e, + 0x32e0: 0x5f, 0x32e1: 0x60, 0x32e2: 0x61, 0x32e3: 0x62, 0x32e4: 0x63, 0x32e5: 0x64, 0x32e6: 0x65, 0x32e7: 0x66, + 0x32e8: 0x67, 0x32e9: 0x68, 0x32ea: 0x69, 0x32ec: 0x6a, 0x32ed: 0x6b, 0x32ee: 0x6c, 0x32ef: 0x6d, + 0x32f0: 0x6e, 0x32f1: 0x6f, 0x32f3: 0x70, 0x32f4: 0x71, 0x32f5: 0x72, 0x32f6: 0x73, 0x32f7: 0x74, + 0x32f8: 0x606, 0x32f9: 0x607, 0x32fa: 0x608, 0x32fb: 0x609, 0x32fc: 0x60a, 0x32fd: 0x60b, 0x32fe: 0x60c, 0x32ff: 0x60d, + // Block 0xcc, offset 0x3300 + 0x3302: 0x01, 0x3303: 0x5fc, 0x3304: 0x5fd, 0x3305: 0x5fe, 0x3306: 0x5ff, 0x3307: 0x600, + 0x3308: 0x601, 0x3309: 0x08, 0x330a: 0x09, 0x330b: 0x0a, 0x330c: 0x602, 0x330d: 0x603, 0x330e: 0x604, 0x330f: 0x605, + 0x3310: 0x0f, 0x3311: 0x10, 0x3312: 0x11, 0x3313: 0x12, 0x3314: 0x13, 0x3315: 0x14, 0x3316: 0x15, 0x3317: 0x16, + 0x3318: 0x17, 0x3319: 0x18, 0x331a: 0x19, 0x331b: 0x1a, 0x331c: 0x1b, 0x331d: 0x1c, 0x331e: 0x1d, 0x331f: 0x1e, + 0x3320: 0x01, 0x3321: 0xc9, 0x3322: 0x03, 0x3323: 0x04, 0x3324: 0x05, + 0x332a: 0x06, 0x332d: 0x07, 0x332f: 0x08, + 0x3330: 0x13, 0x3333: 0x15, + // Block 0xcd, offset 0x3340 + 0x3342: 0x01, 0x3343: 0x610, 0x3344: 0x03, 0x3345: 0x04, 0x3346: 0x05, 0x3347: 0x06, + 0x3348: 0x07, 0x3349: 0x08, 0x334a: 0x09, 0x334b: 0x0a, 0x334c: 0x0b, 0x334d: 0x0c, 0x334e: 0x0d, 0x334f: 0x0e, + 0x3350: 0x0f, 0x3351: 0x10, 0x3352: 0x11, 0x3353: 0x12, 0x3354: 0x13, 0x3355: 0x14, 0x3356: 0x15, 0x3357: 0x16, + 0x3358: 0x17, 0x3359: 0x18, 0x335a: 0x19, 0x335b: 0x1a, 0x335c: 0x1b, 0x335d: 0x1c, 0x335e: 0x1d, 0x335f: 0x1e, + 0x3360: 0x01, 0x3361: 0x02, 0x3362: 0x03, 0x3363: 0x04, 0x3364: 0x05, + 0x336a: 0x06, 0x336d: 0x07, 0x336f: 0x08, + 0x3370: 0x13, 0x3373: 0x15, + // Block 0xce, offset 0x3380 + 0x3380: 0x3f, 0x3381: 0x40, 0x3382: 0x41, 0x3383: 0x42, 0x3384: 0x43, 0x3385: 0x44, 0x3386: 0x45, 0x3387: 0x46, + 0x3388: 0x47, 0x3389: 0x48, 0x338a: 0x49, 0x338b: 0x4a, 0x338c: 0x4b, 0x338d: 0x4c, 0x338e: 0x4d, 0x338f: 0x4e, + 0x3390: 0x4f, 0x3391: 0x50, 0x3392: 0x51, 0x3393: 0x52, 0x3394: 0x53, 0x3395: 0x54, 0x3396: 0x55, 0x3397: 0x56, + 0x3398: 0x57, 0x3399: 0x58, 0x339a: 0x59, 0x339b: 0x5a, 0x339c: 0x5b, 0x339d: 0x5c, 0x339e: 0x5d, 0x339f: 0x5e, + 0x33a0: 0x5f, 0x33a1: 0x60, 0x33a2: 0x61, 0x33a3: 0x62, 0x33a4: 0x63, 0x33a5: 0x64, 0x33a6: 0x65, 0x33a7: 0x66, + 0x33a8: 0x67, 0x33a9: 0x68, 0x33aa: 0x69, 0x33ac: 0x6a, 0x33ad: 0x6b, 0x33ae: 0x6c, 0x33af: 0x6d, + 0x33b0: 0x6e, 0x33b1: 0x6f, 0x33b3: 0x70, 0x33b4: 0x71, 0x33b5: 0x72, 0x33b6: 0x73, 0x33b7: 0x74, + 0x33b8: 0x75, 0x33b9: 0x613, 0x33ba: 0x614, 0x33bb: 0x615, 0x33bc: 0x79, 0x33bd: 0x7a, 0x33be: 0x7b, 0x33bf: 0x7c, + // Block 0xcf, offset 0x33c0 + 0x33c2: 0x01, 0x33c3: 0x02, 0x33c4: 0x03, 0x33c5: 0x04, 0x33c6: 0x05, 0x33c7: 0x06, + 0x33c8: 0x07, 0x33c9: 0x08, 0x33ca: 0x09, 0x33cb: 0x0a, 0x33cc: 0x0b, 0x33cd: 0x0c, 0x33ce: 0x0d, 0x33cf: 0x0e, + 0x33d0: 0x0f, 0x33d1: 0x10, 0x33d2: 0x11, 0x33d3: 0x12, 0x33d4: 0x13, 0x33d5: 0x14, 0x33d6: 0x15, 0x33d7: 0x16, + 0x33d8: 0x17, 0x33d9: 0x18, 0x33da: 0x19, 0x33db: 0x1a, 0x33dc: 0x1b, 0x33dd: 0x1c, 0x33de: 0x1d, 0x33df: 0x1e, + 0x33e0: 0x01, 0x33e1: 0xcc, 0x33e2: 0x03, 0x33e3: 0x04, 0x33e4: 0x05, + 0x33ea: 0x06, 0x33ed: 0x07, 0x33ef: 0x08, + 0x33f0: 0x13, 0x33f3: 0x15, + // Block 0xd0, offset 0x3400 + 0x3400: 0x3f, 0x3401: 0x40, 0x3402: 0x41, 0x3403: 0x42, 0x3404: 0x43, 0x3405: 0x44, 0x3406: 0x45, 0x3407: 0x46, + 0x3408: 0x47, 0x3409: 0x48, 0x340a: 0x49, 0x340b: 0x4a, 0x340c: 0x4b, 0x340d: 0x4c, 0x340e: 0x4d, 0x340f: 0x4e, + 0x3410: 0x4f, 0x3411: 0x50, 0x3412: 0x51, 0x3413: 0x52, 0x3414: 0x53, 0x3415: 0x54, 0x3416: 0x55, 0x3417: 0x56, + 0x3418: 0x57, 0x3419: 0x58, 0x341a: 0x59, 0x341b: 0x5a, 0x341c: 0x5b, 0x341d: 0x5c, 0x341e: 0x5d, 0x341f: 0x5e, + 0x3420: 0x5f, 0x3421: 0x60, 0x3422: 0x61, 0x3423: 0x62, 0x3424: 0x63, 0x3425: 0x64, 0x3426: 0x65, 0x3427: 0x66, + 0x3428: 0x67, 0x3429: 0x68, 0x342a: 0x69, 0x342c: 0x6a, 0x342d: 0x6b, 0x342e: 0x6c, 0x342f: 0x6d, + 0x3430: 0x6e, 0x3431: 0x6f, 0x3433: 0x70, 0x3434: 0x71, 0x3435: 0x72, 0x3436: 0x73, 0x3437: 0x74, + 0x3438: 0x61d, 0x3439: 0x61e, 0x343a: 0x61f, 0x343b: 0x620, 0x343c: 0x79, 0x343d: 0x7a, 0x343e: 0x7b, 0x343f: 0x7c, + // Block 0xd1, offset 0x3440 + 0x3440: 0x7d, 0x3441: 0x7e, 0x3442: 0x7f, 0x3443: 0x80, 0x3444: 0x81, 0x3445: 0x82, 0x3446: 0x83, 0x3447: 0x84, + 0x3448: 0x85, 0x3449: 0x86, 0x344a: 0x87, 0x344b: 0x88, 0x344c: 0x89, 0x344d: 0x8a, 0x344e: 0x8b, 0x344f: 0x8c, + 0x3450: 0x8d, 0x3451: 0x8e, 0x3452: 0x8f, 0x3453: 0x90, 0x3454: 0x91, 0x3455: 0x92, 0x3456: 0x93, 0x3457: 0x94, + 0x3458: 0x95, 0x3459: 0x96, 0x345a: 0x97, 0x345b: 0x98, 0x345c: 0x99, 0x345d: 0x9a, 0x345e: 0x9b, 0x345f: 0x9c, + 0x3460: 0x9d, 0x3461: 0x9e, 0x3462: 0x9f, 0x3463: 0xa0, 0x3464: 0xa1, 0x3465: 0xa2, 0x3466: 0xa3, 0x3467: 0xa4, + 0x3468: 0xa5, 0x3469: 0xa6, 0x346a: 0xa7, 0x346b: 0xa8, 0x346c: 0xa9, 0x346d: 0xaa, + 0x3470: 0xab, 0x3471: 0xac, 0x3472: 0xad, 0x3473: 0xae, 0x3474: 0xaf, 0x3475: 0xb0, 0x3476: 0xb1, 0x3477: 0xb2, + 0x3478: 0xb3, 0x347a: 0x621, 0x347b: 0x622, 0x347c: 0x623, 0x347d: 0x624, 0x347e: 0x625, 0x347f: 0x626, + // Block 0xd2, offset 0x3480 + 0x3480: 0x627, 0x3481: 0xbb, 0x3482: 0xbc, 0x3483: 0xbd, 0x3484: 0xbe, 0x3485: 0xbf, 0x3486: 0x628, 0x3487: 0xc1, + 0x3488: 0x629, 0x3489: 0x62a, 0x348a: 0x62b, 0x348b: 0x62c, 0x348c: 0xc6, 0x348d: 0x62d, 0x348e: 0xc8, 0x348f: 0x62e, + 0x3490: 0x62f, 0x3491: 0x630, 0x3492: 0x631, 0x3493: 0x632, 0x3494: 0x633, 0x3495: 0x634, 0x3496: 0x635, 0x3497: 0x636, + 0x3498: 0x637, 0x3499: 0x638, 0x349a: 0x639, 0x349b: 0x63a, 0x349c: 0x63b, 0x349d: 0x63c, 0x349e: 0x63d, 0x349f: 0x63e, + 0x34a0: 0x63f, 0x34a1: 0x640, 0x34a2: 0x641, 0x34a3: 0x642, 0x34a4: 0x643, 0x34a5: 0x644, 0x34a6: 0x645, 0x34a7: 0x646, + 0x34a8: 0x647, 0x34a9: 0x648, 0x34aa: 0x649, 0x34ab: 0x64a, 0x34ac: 0x64b, 0x34ad: 0x64c, 0x34ae: 0x64d, 0x34af: 0x64e, + 0x34b0: 0x64f, 0x34b1: 0x650, 0x34b2: 0x651, 0x34b3: 0x652, 0x34b4: 0x653, 0x34b5: 0x654, 0x34b6: 0x655, 0x34b7: 0x656, + 0x34b8: 0x657, 0x34b9: 0x658, 0x34ba: 0x659, 0x34bb: 0x65a, 0x34bc: 0x65b, 0x34bd: 0x65c, 0x34be: 0x65d, 0x34bf: 0x65e, + // Block 0xd3, offset 0x34c0 + 0x34c0: 0x65f, 0x34c1: 0x660, 0x34c2: 0x661, 0x34c3: 0x662, 0x34c4: 0x663, 0x34c5: 0x664, 0x34c6: 0x665, 0x34c7: 0x666, + 0x34c8: 0x667, 0x34c9: 0x668, 0x34ca: 0x669, 0x34cb: 0x66a, 0x34cc: 0x66b, 0x34cd: 0x66c, 0x34ce: 0x66d, 0x34cf: 0x66e, + 0x34d0: 0x66f, 0x34d1: 0x670, 0x34d2: 0x671, 0x34d3: 0x672, 0x34d4: 0x673, 0x34d5: 0x674, 0x34d6: 0x675, 0x34d7: 0x676, + 0x34d8: 0x677, 0x34d9: 0x678, 0x34da: 0x679, 0x34db: 0x67a, 0x34dc: 0x67b, 0x34dd: 0x67c, 0x34de: 0x67d, 0x34df: 0x67e, + 0x34e0: 0x67f, 0x34e1: 0x680, 0x34e2: 0x681, 0x34e3: 0x682, 0x34e4: 0x683, 0x34e5: 0x684, 0x34e6: 0x685, 0x34e7: 0x686, + 0x34e8: 0x687, 0x34e9: 0x688, 0x34ea: 0x689, 0x34eb: 0x68a, 0x34ec: 0x68b, 0x34ed: 0x68c, 0x34ee: 0x68d, 0x34ef: 0x68e, + 0x34f0: 0x68f, 0x34f1: 0x690, 0x34f2: 0x691, 0x34f3: 0x692, 0x34f4: 0x693, 0x34f5: 0x694, 0x34f6: 0x695, 0x34f7: 0xca, + 0x34f8: 0x696, 0x34f9: 0x697, 0x34fa: 0x698, 0x34fb: 0x699, 0x34fc: 0x69a, 0x34fd: 0x69b, 0x34fe: 0x69c, 0x34ff: 0x69d, + // Block 0xd4, offset 0x3500 + 0x3500: 0x69e, 0x3501: 0x69f, 0x3502: 0x6a0, 0x3503: 0x6a1, 0x3504: 0x6a2, 0x3505: 0x6a3, 0x3506: 0x6a4, 0x3507: 0x6a5, + 0x3508: 0x6a6, 0x3509: 0x6a7, 0x350a: 0x6a8, 0x350b: 0x6a9, 0x350c: 0x6aa, 0x350d: 0x6ab, 0x350e: 0x6ac, 0x350f: 0x6ad, + 0x3510: 0x6ae, 0x3511: 0x6af, 0x3512: 0x6b0, 0x3513: 0x6b1, 0x3514: 0x6b2, 0x3515: 0x6b3, 0x3516: 0x6b4, 0x3517: 0x6b5, + 0x3518: 0x6b6, 0x3519: 0x6b7, 0x351a: 0x6b8, 0x351b: 0x6b9, 0x351c: 0x6ba, 0x351d: 0x6bb, 0x351e: 0x6bc, 0x351f: 0x6bd, + 0x3520: 0x6be, 0x3521: 0x6bf, 0x3522: 0x6c0, 0x3523: 0x6c1, 0x3524: 0x6c2, 0x3525: 0x6c3, 0x3526: 0x6c4, 0x3527: 0x6c5, + 0x3528: 0x6c6, 0x3529: 0x6c7, 0x352a: 0x6c8, 0x352b: 0x6c9, 0x352c: 0x6ca, 0x352d: 0x6cb, 0x352e: 0x6cc, 0x352f: 0x6cd, + 0x3530: 0x6ce, 0x3531: 0x6cf, 0x3532: 0x6d0, 0x3533: 0x6d1, 0x3534: 0x6d2, 0x3535: 0x6d3, 0x3536: 0x6d4, 0x3537: 0x6d5, + 0x3538: 0x6d6, 0x3539: 0x6d7, 0x353a: 0x6d8, 0x353b: 0x6d9, 0x353c: 0x6da, 0x353d: 0x6db, 0x353e: 0x6dc, 0x353f: 0x6dd, + // Block 0xd5, offset 0x3540 + 0x3540: 0x6de, 0x3541: 0x6df, 0x3542: 0x6e0, 0x3543: 0x6e1, 0x3544: 0x6e2, 0x3545: 0x6e3, 0x3546: 0x6e4, 0x3547: 0x6e5, + 0x3548: 0x6e6, 0x3549: 0x6e7, 0x354a: 0x6e8, 0x354b: 0x6e9, 0x354c: 0x6ea, 0x354d: 0x6eb, 0x354e: 0x6ec, 0x354f: 0x6ed, + 0x3550: 0x6ee, 0x3551: 0x6ef, 0x3552: 0x6f0, 0x3553: 0x6f1, 0x3554: 0x6f2, 0x3555: 0x6f3, 0x3556: 0x6f4, 0x3557: 0x6f5, + 0x3558: 0x6f6, 0x3559: 0x6f7, 0x355a: 0x6f8, 0x355b: 0x6f9, 0x355c: 0x6fa, 0x355d: 0x6fb, 0x355e: 0x6fc, 0x355f: 0x6fd, + 0x3560: 0x6fe, 0x3561: 0x6ff, 0x3562: 0x700, 0x3563: 0x701, 0x3564: 0x702, 0x3565: 0x703, 0x3566: 0x704, 0x3567: 0x705, + 0x3568: 0x706, 0x3569: 0x707, 0x356a: 0x708, 0x356b: 0x709, 0x356c: 0x70a, 0x356d: 0x70b, 0x356e: 0x70c, 0x356f: 0x70d, + 0x3570: 0x70e, 0x3571: 0x70f, 0x3572: 0x710, 0x3573: 0x711, 0x3574: 0x712, 0x3575: 0x713, 0x3576: 0x714, 0x3577: 0x715, + 0x3578: 0x716, 0x3579: 0x717, 0x357a: 0x718, 0x357b: 0x719, 0x357c: 0x71a, 0x357d: 0x71b, 0x357e: 0x71c, 0x357f: 0x71d, + // Block 0xd6, offset 0x3580 + 0x3580: 0x71e, 0x3581: 0x71f, 0x3582: 0x720, 0x3583: 0x721, 0x3584: 0x722, 0x3585: 0x723, 0x3586: 0x724, 0x3587: 0x725, + 0x3588: 0x726, 0x3589: 0x727, 0x358a: 0x728, 0x358b: 0x729, 0x358c: 0x72a, 0x358d: 0x72b, 0x358e: 0x72c, 0x358f: 0x72d, + 0x3590: 0x72e, 0x3591: 0x72f, 0x3592: 0x730, 0x3593: 0x731, 0x3594: 0x732, 0x3595: 0x733, 0x3596: 0x734, 0x3597: 0x735, + 0x3598: 0x736, 0x3599: 0x737, 0x359a: 0x738, 0x359b: 0x739, 0x359c: 0x73a, 0x359d: 0x73b, 0x359e: 0x73c, 0x359f: 0x73d, + 0x35a0: 0x73e, 0x35a1: 0x73f, 0x35a2: 0x740, 0x35a3: 0x741, 0x35a4: 0x742, 0x35a5: 0x743, 0x35a6: 0x744, 0x35a7: 0x745, + 0x35a8: 0x746, 0x35a9: 0x747, 0x35aa: 0x748, 0x35ab: 0x749, 0x35ac: 0x74a, 0x35ad: 0x74b, 0x35ae: 0x74c, 0x35af: 0x74d, + 0x35b0: 0x74e, 0x35b1: 0x74f, 0x35b2: 0x750, 0x35b3: 0x751, 0x35b4: 0x752, 0x35b5: 0x753, 0x35b6: 0x754, 0x35b7: 0x755, + 0x35b8: 0x756, 0x35b9: 0x757, 0x35ba: 0x758, 0x35bb: 0x759, 0x35bc: 0x75a, 0x35bd: 0x75b, 0x35be: 0x75c, 0x35bf: 0x75d, + // Block 0xd7, offset 0x35c0 + 0x35c0: 0x75e, 0x35c1: 0x75f, 0x35c2: 0x760, 0x35c3: 0x761, 0x35c4: 0x762, 0x35c5: 0x763, 0x35c6: 0x764, 0x35c7: 0x765, + 0x35c8: 0x766, 0x35c9: 0x767, 0x35ca: 0x768, 0x35cb: 0x769, 0x35cc: 0x76a, 0x35cd: 0x76b, 0x35ce: 0x76c, 0x35cf: 0x76d, + 0x35d0: 0x76e, 0x35d1: 0x76f, 0x35d2: 0x770, 0x35d3: 0x771, 0x35d4: 0x772, 0x35d5: 0x773, 0x35d6: 0x774, 0x35d7: 0x775, + 0x35d8: 0x776, 0x35d9: 0x777, 0x35da: 0x778, 0x35db: 0x779, 0x35dc: 0x77a, 0x35dd: 0x77b, 0x35de: 0x77c, 0x35df: 0x77d, + 0x35e0: 0x77e, 0x35e1: 0x77f, 0x35e2: 0x780, 0x35e3: 0x781, 0x35e4: 0x782, 0x35e5: 0x783, 0x35e6: 0x784, 0x35e7: 0x785, + 0x35e8: 0x786, 0x35e9: 0x787, 0x35ea: 0x788, 0x35eb: 0x789, 0x35ec: 0x78a, 0x35ed: 0x78b, 0x35ee: 0x78c, 0x35ef: 0x78d, + 0x35f0: 0x78e, 0x35f1: 0x78f, 0x35f2: 0x790, 0x35f3: 0x791, 0x35f4: 0x792, 0x35f5: 0x793, 0x35f6: 0x794, 0x35f7: 0x795, + 0x35f8: 0x796, 0x35f9: 0x797, 0x35fa: 0x798, 0x35fb: 0x799, 0x35fc: 0x79a, 0x35fd: 0x79b, 0x35fe: 0x79c, 0x35ff: 0x79d, + // Block 0xd8, offset 0x3600 + 0x3600: 0x79e, 0x3601: 0x79f, 0x3602: 0x7a0, 0x3603: 0x7a1, 0x3604: 0x7a2, 0x3605: 0x7a3, 0x3606: 0x7a4, 0x3607: 0x7a5, + 0x3608: 0x7a6, 0x3609: 0x7a7, 0x360a: 0x7a8, 0x360b: 0x7a9, 0x360c: 0x7aa, 0x360d: 0x7ab, 0x360e: 0x7ac, 0x360f: 0x7ad, + 0x3610: 0x7ae, 0x3611: 0x7af, 0x3612: 0x7b0, 0x3613: 0x7b1, 0x3614: 0x7b2, 0x3615: 0x7b3, 0x3616: 0x7b4, 0x3617: 0x7b5, + 0x3618: 0x7b6, 0x3619: 0x7b7, 0x361a: 0x7b8, 0x361b: 0x7b9, 0x361c: 0x7ba, 0x361d: 0x7bb, 0x361e: 0x7bc, 0x361f: 0x7bd, + 0x3620: 0x7be, 0x3621: 0x7bf, 0x3622: 0x7c0, 0x3623: 0x7c1, 0x3624: 0x7c2, 0x3625: 0x7c3, 0x3626: 0x7c4, 0x3627: 0x7c5, + 0x3628: 0x7c6, 0x3629: 0x7c7, 0x362a: 0x7c8, 0x362b: 0x7c9, 0x362c: 0x7ca, 0x362d: 0x7cb, 0x362e: 0x7cc, 0x362f: 0x7cd, + 0x3630: 0x7ce, 0x3631: 0x7cf, 0x3632: 0x7d0, 0x3633: 0x7d1, 0x3634: 0x7d2, 0x3635: 0x7d3, 0x3636: 0x7d4, 0x3637: 0x7d5, + 0x3638: 0x7d6, 0x3639: 0x7d7, 0x363a: 0x7d8, 0x363b: 0x7d9, 0x363c: 0x7da, 0x363d: 0x7db, 0x363e: 0x7dc, 0x363f: 0x7dd, + // Block 0xd9, offset 0x3640 + 0x3664: 0x7de, 0x3665: 0x7df, 0x3666: 0x7e0, 0x3667: 0x7e1, + 0x3668: 0x7e2, 0x3669: 0x7e3, 0x366a: 0x7e4, 0x366b: 0x7e5, 0x366c: 0x103, 0x366d: 0x104, 0x366e: 0x105, 0x366f: 0x106, + 0x3670: 0x107, 0x3671: 0x108, 0x3672: 0x109, 0x3673: 0x10a, 0x3674: 0x10b, 0x3675: 0x10c, 0x3676: 0x10d, 0x3677: 0x10e, + 0x3678: 0x10f, 0x3679: 0x110, 0x367a: 0x111, 0x367b: 0x112, 0x367c: 0x113, 0x367d: 0x114, 0x367e: 0x115, 0x367f: 0x116, + // Block 0xda, offset 0x3680 + 0x3680: 0x18b, 0x3681: 0x18c, 0x3682: 0x18d, 0x3683: 0x18e, 0x3684: 0x18f, 0x3685: 0x190, 0x3686: 0x191, 0x3687: 0x192, + 0x3688: 0x7e6, 0x3689: 0x7e7, 0x368c: 0x195, 0x368d: 0x196, 0x368e: 0x197, 0x368f: 0x198, + 0x3690: 0x199, 0x3691: 0x19a, 0x3692: 0x19b, 0x3693: 0x19c, 0x3694: 0x19d, 0x3695: 0x19e, 0x3697: 0x19f, + 0x3698: 0x1a0, 0x3699: 0x1a1, 0x369a: 0x1a2, 0x369b: 0x1a3, 0x369c: 0x1a4, 0x369d: 0x1a5, + // Block 0xdb, offset 0x36c0 + 0x36c0: 0x7e8, 0x36c1: 0x7e9, 0x36c2: 0x7ea, 0x36c3: 0x7eb, 0x36c4: 0x7ec, 0x36c5: 0x7ed, 0x36c6: 0x7ee, 0x36c7: 0x7ef, + 0x36c8: 0x7f0, 0x36c9: 0x7f1, 0x36ca: 0x7f2, 0x36cb: 0x7f3, 0x36cc: 0x7f4, 0x36cd: 0x7f5, 0x36ce: 0x7f6, 0x36cf: 0x7f7, + 0x36d0: 0x7f8, 0x36d1: 0x7f9, 0x36d2: 0x7fa, 0x36d3: 0x7fb, 0x36d4: 0x7fc, 0x36d5: 0x7fd, 0x36d6: 0x7fe, 0x36d7: 0x7ff, + 0x36d8: 0x800, 0x36d9: 0x801, 0x36da: 0x802, 0x36db: 0x803, 0x36dc: 0x804, 0x36dd: 0x805, 0x36de: 0x806, 0x36df: 0x807, + 0x36e0: 0x808, 0x36e1: 0x809, 0x36e2: 0x80a, 0x36e3: 0x80b, 0x36e4: 0x80c, 0x36e5: 0x80d, 0x36e6: 0x80e, 0x36e7: 0x80f, + 0x36e8: 0x810, 0x36e9: 0x811, 0x36ea: 0x812, 0x36eb: 0x813, 0x36ec: 0x814, 0x36ed: 0x815, 0x36ee: 0x816, 0x36ef: 0x817, + 0x36f0: 0x818, 0x36f1: 0x819, 0x36f2: 0x81a, 0x36f3: 0x81b, 0x36f4: 0x81c, 0x36f5: 0x81d, 0x36f6: 0x81e, 0x36f7: 0x81f, + 0x36f8: 0x820, 0x36f9: 0x821, 0x36fa: 0x822, 0x36fb: 0x823, 0x36fc: 0x824, 0x36fd: 0x825, 0x36fe: 0x826, 0x36ff: 0x827, + // Block 0xdc, offset 0x3700 + 0x3700: 0x828, 0x3701: 0x829, 0x3702: 0x82a, 0x3703: 0x82b, 0x3704: 0x82c, 0x3705: 0x82d, 0x3706: 0x82e, 0x3707: 0x82f, + 0x3708: 0x830, 0x3709: 0x831, 0x370a: 0x832, 0x370b: 0x833, 0x370c: 0x834, 0x370d: 0x835, 0x370e: 0x836, 0x370f: 0x837, + 0x3710: 0x838, 0x3711: 0x839, 0x3712: 0x83a, 0x3713: 0x83b, 0x3714: 0x83c, 0x3715: 0x83d, 0x3716: 0x83e, 0x3717: 0x83f, + 0x3718: 0x840, 0x3719: 0x841, 0x371a: 0x842, 0x371b: 0x843, 0x371c: 0x844, 0x371d: 0x845, 0x371e: 0x846, 0x371f: 0x847, + 0x3720: 0x848, 0x3721: 0x849, 0x3722: 0x84a, 0x3723: 0x84b, 0x3724: 0x84c, 0x3725: 0x84d, 0x3726: 0x84e, 0x3727: 0x84f, + 0x3728: 0x850, 0x3729: 0x851, 0x372a: 0x852, 0x372b: 0x853, 0x372c: 0x854, 0x372d: 0x855, 0x372e: 0x856, 0x372f: 0x857, + 0x3730: 0x858, 0x3731: 0x859, 0x3732: 0x85a, 0x3733: 0x85b, 0x3734: 0x85c, 0x3735: 0x85d, 0x3736: 0x85e, 0x3737: 0x85f, + 0x3738: 0x860, 0x3739: 0x861, 0x373a: 0x862, 0x373b: 0x863, 0x373c: 0x864, 0x373d: 0x865, 0x373e: 0x866, 0x373f: 0x867, + // Block 0xdd, offset 0x3740 + 0x3740: 0x868, 0x3741: 0x869, 0x3742: 0x86a, 0x3743: 0x86b, 0x3744: 0x86c, 0x3745: 0x86d, 0x3746: 0x86e, 0x3747: 0x86f, + 0x3748: 0x870, 0x3749: 0x871, 0x374a: 0x872, 0x374b: 0x873, 0x374c: 0x874, 0x374d: 0x875, 0x374e: 0x876, 0x374f: 0x877, + 0x3750: 0x878, 0x3751: 0x879, 0x3752: 0x87a, 0x3753: 0x87b, 0x3754: 0x87c, 0x3755: 0x87d, 0x3756: 0x87e, 0x3757: 0x87f, + 0x3758: 0x880, 0x3759: 0x881, 0x375a: 0x882, 0x375b: 0x883, 0x375c: 0x884, 0x375d: 0x885, 0x375e: 0x886, 0x375f: 0x887, + 0x3760: 0x888, 0x3761: 0x889, 0x3762: 0x88a, 0x3763: 0x88b, 0x3764: 0x88c, 0x3765: 0x88d, 0x3766: 0x88e, 0x3767: 0x88f, + 0x3768: 0x890, 0x3769: 0x891, 0x376a: 0x892, 0x376b: 0x893, 0x376c: 0x894, 0x376d: 0x895, 0x376e: 0x896, 0x376f: 0x897, + 0x3770: 0x898, 0x3771: 0x899, 0x3772: 0x89a, 0x3773: 0x89b, 0x3774: 0x89c, 0x3775: 0x89d, 0x3776: 0x89e, 0x3777: 0x89f, + 0x3778: 0x8a0, 0x3779: 0x8a1, 0x377a: 0x8a2, 0x377b: 0x8a3, 0x377c: 0x8a4, 0x377d: 0x8a5, 0x377e: 0x8a6, 0x377f: 0x8a7, + // Block 0xde, offset 0x3780 + 0x3780: 0x8a8, 0x3781: 0x8a9, 0x3782: 0x8aa, 0x3783: 0x8ab, 0x3784: 0x8ac, 0x3785: 0x8ad, 0x3786: 0x8ae, 0x3787: 0x8af, + 0x3788: 0x8b0, 0x3789: 0x8b1, 0x378a: 0x8b2, 0x378b: 0x8b3, 0x378c: 0x8b4, 0x378d: 0x8b5, 0x378e: 0x8b6, 0x378f: 0x8b7, + 0x3790: 0x8b8, 0x3791: 0x8b9, 0x3792: 0x8ba, 0x3793: 0x8bb, 0x3794: 0x8bc, 0x3795: 0x8bd, 0x3796: 0x8be, 0x3797: 0x8bf, + 0x3798: 0x8c0, 0x3799: 0x8c1, 0x379a: 0x8c2, 0x379b: 0x8c3, 0x379c: 0x8c4, 0x379d: 0x8c5, 0x379e: 0x8c6, 0x379f: 0x8c7, + 0x37a0: 0x8c8, 0x37a1: 0x8c9, 0x37a2: 0x8ca, 0x37a3: 0x8cb, 0x37a4: 0x8cc, 0x37a5: 0x8cd, 0x37a6: 0x8ce, 0x37a7: 0x8cf, + 0x37a8: 0x8d0, 0x37a9: 0x8d1, 0x37aa: 0x8d2, 0x37ab: 0x8d3, 0x37ac: 0x8d4, 0x37ad: 0x8d5, 0x37ae: 0x8d6, 0x37af: 0x8d7, + 0x37b0: 0x8d8, 0x37b1: 0x8d9, 0x37b2: 0x8da, 0x37b3: 0x8db, 0x37b4: 0x8dc, 0x37b5: 0x8dd, 0x37b6: 0x8de, 0x37b7: 0x8df, + 0x37b8: 0x8e0, 0x37b9: 0x8e1, 0x37ba: 0x8e2, 0x37bb: 0x8e3, 0x37bc: 0x8e4, 0x37bd: 0x8e5, 0x37be: 0x8e6, 0x37bf: 0x8e7, + // Block 0xdf, offset 0x37c0 + 0x37c0: 0x8e8, 0x37c1: 0x8e9, 0x37c2: 0x8ea, 0x37c3: 0x8eb, 0x37c4: 0x8ec, 0x37c5: 0x8ed, 0x37c6: 0x8ee, 0x37c7: 0x8ef, + 0x37c8: 0x8f0, 0x37c9: 0x8f1, 0x37ca: 0x8f2, 0x37cb: 0x8f3, 0x37cc: 0x8f4, 0x37cd: 0x8f5, 0x37ce: 0x8f6, 0x37cf: 0x8f7, + 0x37d0: 0x8f8, 0x37d1: 0x8f9, 0x37d2: 0x8fa, 0x37d3: 0x8fb, 0x37d4: 0x8fc, 0x37d5: 0x8fd, 0x37d6: 0x8fe, 0x37d7: 0x8ff, + 0x37d8: 0x900, 0x37d9: 0x901, 0x37da: 0x902, 0x37db: 0x903, 0x37dc: 0x904, 0x37dd: 0x905, 0x37de: 0x906, 0x37df: 0x907, + 0x37e0: 0x908, 0x37e1: 0x909, 0x37e2: 0x90a, 0x37e3: 0x90b, 0x37e4: 0x90c, 0x37e5: 0x90d, 0x37e6: 0x90e, 0x37e7: 0x90f, + 0x37e8: 0x910, 0x37e9: 0x911, 0x37ea: 0x912, 0x37eb: 0x913, 0x37ec: 0x914, 0x37ed: 0x915, 0x37ee: 0x916, 0x37ef: 0x917, + 0x37f0: 0x918, 0x37f1: 0x919, 0x37f2: 0x91a, 0x37f3: 0x91b, 0x37f4: 0x91c, 0x37f5: 0x91d, 0x37f6: 0x91e, 0x37f7: 0x91f, + 0x37f8: 0x920, 0x37f9: 0x921, 0x37fa: 0x922, 0x37fb: 0x923, 0x37fc: 0x924, 0x37fd: 0x925, 0x37fe: 0x926, 0x37ff: 0x927, + // Block 0xe0, offset 0x3800 + 0x3800: 0x928, 0x3801: 0x929, 0x3802: 0x92a, 0x3803: 0x92b, 0x3804: 0x92c, 0x3805: 0x92d, 0x3806: 0x92e, 0x3807: 0x92f, + 0x3808: 0x930, 0x3809: 0x931, 0x380a: 0x932, 0x380b: 0x933, 0x380c: 0x934, 0x380d: 0x935, 0x380e: 0x936, 0x380f: 0x937, + 0x3810: 0x938, 0x3811: 0x939, 0x3812: 0x93a, 0x3813: 0x93b, 0x3814: 0x93c, 0x3815: 0x93d, 0x3816: 0x93e, 0x3817: 0x93f, + 0x3818: 0x940, 0x3819: 0x941, 0x381a: 0x942, 0x381b: 0x943, 0x381c: 0x944, 0x381d: 0x945, 0x381e: 0x946, 0x381f: 0x947, + 0x3820: 0x948, 0x3821: 0x949, 0x3822: 0x94a, 0x3823: 0x94b, 0x3824: 0x94c, 0x3825: 0x94d, 0x3826: 0x94e, 0x3827: 0x94f, + 0x3828: 0x950, 0x3829: 0x951, 0x382a: 0x952, 0x382b: 0x953, 0x382c: 0x954, 0x382d: 0x955, 0x382e: 0x956, 0x382f: 0x957, + 0x3830: 0x958, 0x3831: 0x959, 0x3832: 0x95a, 0x3833: 0x95b, 0x3834: 0x95c, 0x3835: 0x95d, 0x3836: 0x95e, 0x3837: 0x95f, + 0x3838: 0x960, 0x3839: 0x961, 0x383a: 0x962, 0x383b: 0x963, 0x383c: 0x964, 0x383d: 0x965, 0x383e: 0x966, 0x383f: 0x967, + // Block 0xe1, offset 0x3840 + 0x3840: 0x968, 0x3841: 0x969, 0x3842: 0x96a, 0x3843: 0x96b, 0x3844: 0x96c, 0x3845: 0x96d, 0x3846: 0x96e, 0x3847: 0x96f, + 0x3848: 0x970, 0x3849: 0x971, 0x384a: 0x972, 0x384b: 0x973, 0x384c: 0x974, 0x384d: 0x975, 0x384e: 0x976, 0x384f: 0x977, + 0x3850: 0x978, 0x3851: 0x979, 0x3852: 0x97a, 0x3853: 0x97b, 0x3854: 0x97c, 0x3855: 0x97d, 0x3856: 0x97e, 0x3857: 0x97f, + 0x3858: 0x980, 0x3859: 0x981, 0x385a: 0x982, 0x385b: 0x983, 0x385c: 0x984, 0x385d: 0x985, 0x385e: 0x986, 0x385f: 0x987, + 0x3860: 0x988, 0x3861: 0x989, 0x3862: 0x98a, 0x3863: 0x98b, 0x3864: 0x98c, 0x3865: 0x98d, 0x3866: 0x98e, 0x3867: 0x98f, + 0x3868: 0x990, 0x3869: 0x991, 0x386a: 0x992, 0x386b: 0x993, 0x386c: 0x994, 0x386d: 0x995, 0x386e: 0x996, 0x386f: 0x997, + 0x3870: 0x998, 0x3871: 0x999, 0x3872: 0x99a, 0x3873: 0x99b, 0x3874: 0x99c, 0x3875: 0x99d, 0x3876: 0x99e, 0x3877: 0x99f, + 0x3878: 0x9a0, 0x3879: 0x9a1, 0x387a: 0x9a2, 0x387b: 0x9a3, 0x387c: 0x9a4, 0x387d: 0x9a5, 0x387e: 0x9a6, 0x387f: 0x9a7, + // Block 0xe2, offset 0x3880 + 0x3880: 0x9a8, 0x3881: 0x9a9, 0x3882: 0x9aa, 0x3883: 0x9ab, 0x3884: 0x9ac, 0x3885: 0x9ad, 0x3886: 0x9ae, 0x3887: 0x9af, + 0x3888: 0x9b0, 0x3889: 0x9b1, 0x388a: 0x9b2, 0x388b: 0x9b3, 0x388c: 0x9b4, 0x388d: 0x9b5, 0x388e: 0x9b6, 0x388f: 0x9b7, + 0x3890: 0x9b8, 0x3891: 0x9b9, 0x3892: 0x9ba, 0x3893: 0x9bb, 0x3894: 0x9bc, 0x3895: 0x9bd, 0x3896: 0x9be, 0x3897: 0x9bf, + 0x3898: 0x9c0, 0x3899: 0x9c1, 0x389a: 0x9c2, 0x389b: 0x9c3, 0x389c: 0x9c4, 0x389d: 0x9c5, 0x389e: 0x9c6, 0x389f: 0x9c7, + 0x38a0: 0x9c8, 0x38a1: 0x9c9, 0x38a2: 0x9ca, 0x38a3: 0x9cb, 0x38a4: 0x9cc, 0x38a5: 0x9cd, 0x38a6: 0x9ce, 0x38a7: 0x9cf, + 0x38a8: 0x9d0, 0x38a9: 0x9d1, 0x38aa: 0x9d2, 0x38ab: 0x9d3, 0x38ac: 0x9d4, 0x38ad: 0x9d5, 0x38ae: 0x9d6, 0x38af: 0x9d7, + 0x38b0: 0x9d8, 0x38b1: 0x9d9, 0x38b2: 0x9da, 0x38b3: 0x9db, 0x38b4: 0x9dc, 0x38b5: 0x9dd, 0x38b6: 0x9de, 0x38b7: 0x9df, + 0x38b8: 0x9e0, 0x38b9: 0x9e1, 0x38ba: 0x9e2, 0x38bb: 0x9e3, 0x38bc: 0x9e4, 0x38bd: 0x9e5, 0x38be: 0x9e6, 0x38bf: 0x9e7, + // Block 0xe3, offset 0x38c0 + 0x38c0: 0x9e8, 0x38c1: 0x9e9, 0x38c2: 0x9ea, 0x38c3: 0x9eb, 0x38c4: 0x9ec, 0x38c5: 0x9ed, 0x38c6: 0x9ee, 0x38c7: 0x9ef, + 0x38c8: 0x9f0, 0x38c9: 0x9f1, 0x38ca: 0x9f2, 0x38cb: 0x9f3, 0x38cc: 0x9f4, 0x38cd: 0x9f5, 0x38ce: 0x9f6, 0x38cf: 0x9f7, + 0x38d0: 0x9f8, 0x38d1: 0x9f9, 0x38d2: 0x9fa, 0x38d3: 0x9fb, 0x38d4: 0x9fc, 0x38d5: 0x9fd, 0x38d6: 0x9fe, 0x38d7: 0x9ff, + 0x38d8: 0xa00, 0x38d9: 0xa01, 0x38da: 0xa02, 0x38db: 0xa03, 0x38dc: 0xa04, 0x38dd: 0xa05, 0x38de: 0xa06, 0x38df: 0xa07, + 0x38e0: 0xa08, 0x38e1: 0xa09, 0x38e2: 0xa0a, 0x38e3: 0xa0b, 0x38e4: 0xa0c, 0x38e5: 0xa0d, 0x38e6: 0xa0e, 0x38e7: 0xa0f, + 0x38e8: 0xa10, 0x38e9: 0xa11, 0x38ea: 0xa12, 0x38eb: 0xa13, 0x38ec: 0xa14, 0x38ed: 0xa15, 0x38ee: 0xa16, 0x38ef: 0xa17, + 0x38f0: 0xa18, 0x38f1: 0xa19, 0x38f2: 0xa1a, 0x38f3: 0xa1b, 0x38f4: 0xa1c, 0x38f5: 0xa1d, 0x38f6: 0xa1e, 0x38f7: 0xa1f, + 0x38f8: 0xa20, 0x38f9: 0xa21, 0x38fa: 0xa22, 0x38fb: 0xa23, 0x38fc: 0xa24, 0x38fd: 0xa25, 0x38fe: 0xa26, 0x38ff: 0xa27, + // Block 0xe4, offset 0x3900 + 0x3900: 0xa28, 0x3901: 0xa29, 0x3902: 0xa2a, 0x3903: 0xa2b, 0x3904: 0xa2c, 0x3905: 0xa2d, 0x3906: 0xa2e, 0x3907: 0xa2f, + 0x3908: 0xa30, 0x3909: 0xa31, 0x390a: 0xa32, 0x390b: 0xa33, 0x390c: 0xa34, 0x390d: 0xa35, 0x390e: 0xa36, 0x390f: 0xa37, + 0x3910: 0xa38, 0x3911: 0xa39, 0x3912: 0xa3a, 0x3913: 0xa3b, 0x3914: 0xa3c, 0x3915: 0xa3d, 0x3916: 0xa3e, 0x3917: 0xa3f, + 0x3918: 0xa40, 0x3919: 0xa41, 0x391a: 0xa42, 0x391b: 0xa43, 0x391c: 0xa44, 0x391d: 0xa45, 0x391e: 0xa46, 0x391f: 0xa47, + 0x3920: 0xa48, 0x3921: 0xa49, 0x3922: 0xa4a, 0x3923: 0xa4b, 0x3924: 0xa4c, 0x3925: 0xa4d, 0x3926: 0xa4e, 0x3927: 0xa4f, + 0x3928: 0xa50, 0x3929: 0xa51, 0x392a: 0xa52, 0x392b: 0xa53, 0x392c: 0xa54, 0x392d: 0xa55, 0x392e: 0xa56, 0x392f: 0xa57, + 0x3930: 0xa58, 0x3931: 0xa59, 0x3932: 0xa5a, 0x3933: 0xa5b, 0x3934: 0xa5c, 0x3935: 0xa5d, 0x3936: 0xa5e, 0x3937: 0xa5f, + 0x3938: 0xa60, 0x3939: 0xa61, 0x393a: 0xa62, 0x393b: 0xa63, 0x393c: 0xa64, 0x393d: 0xa65, 0x393e: 0xa66, 0x393f: 0xa67, + // Block 0xe5, offset 0x3940 + 0x3940: 0xa68, 0x3941: 0xa69, 0x3942: 0xa6a, 0x3943: 0xa6b, 0x3944: 0xa6c, 0x3945: 0xa6d, 0x3946: 0xa6e, 0x3947: 0xa6f, + 0x3948: 0xa70, 0x3949: 0xa71, 0x394a: 0xa72, 0x394b: 0xa73, 0x394c: 0xa74, 0x394d: 0xa75, 0x394e: 0xa76, 0x394f: 0xa77, + 0x3950: 0xa78, 0x3951: 0xa79, 0x3952: 0xa7a, 0x3953: 0xa7b, 0x3954: 0xa7c, 0x3955: 0xa7d, 0x3956: 0xa7e, 0x3957: 0xa7f, + 0x3958: 0xa80, 0x3959: 0xa81, 0x395a: 0xa82, 0x395b: 0xa83, 0x395e: 0xa84, + 0x3961: 0xa85, 0x3962: 0xa86, + 0x3968: 0xa87, 0x396a: 0xa88, + 0x397a: 0xa89, 0x397b: 0xa8a, 0x397e: 0xa8b, + // Block 0xe6, offset 0x3980 + 0x3981: 0xa8c, 0x3982: 0xa8d, 0x3983: 0xa8e, 0x3984: 0xa8f, + 0x3988: 0xa90, 0x398b: 0xa91, 0x398c: 0xa92, 0x398d: 0xa93, 0x398f: 0xa94, + 0x3990: 0xa95, 0x3992: 0xa96, 0x3993: 0xa97, 0x3994: 0xa98, 0x3997: 0xa99, + 0x3998: 0xa9a, 0x399a: 0xa9b, 0x399b: 0xa9c, + // Block 0xe7, offset 0x39c0 + 0x39e0: 0xa9d, 0x39e1: 0xa9e, 0x39e2: 0xa9f, 0x39e3: 0xaa0, 0x39e4: 0xaa1, 0x39e5: 0xaa2, 0x39e6: 0xaa3, 0x39e7: 0xaa4, + 0x39e8: 0xaa5, + // Block 0xe8, offset 0x3a00 + 0x3a10: 0x09, 0x3a11: 0x0a, 0x3a12: 0x0b, 0x3a13: 0x0c, 0x3a16: 0x0d, + 0x3a1b: 0x0e, 0x3a1d: 0x0f, 0x3a1e: 0x10, 0x3a1f: 0xd8, + 0x3a20: 0xd9, 0x3a21: 0xda, 0x3a22: 0xdb, 0x3a23: 0xdc, 0x3a24: 0xdd, 0x3a25: 0xde, 0x3a26: 0xdf, 0x3a27: 0xe0, + 0x3a28: 0xe1, 0x3a29: 0xe2, 0x3a2a: 0xe3, 0x3a2b: 0xe4, 0x3a2f: 0xe5, + // Block 0xe9, offset 0x3a40 + 0x3a42: 0x01, 0x3a43: 0x618, 0x3a44: 0x619, 0x3a45: 0x61a, 0x3a46: 0x05, 0x3a47: 0x61b, + 0x3a48: 0x61c, 0x3a49: 0x08, 0x3a4a: 0x09, 0x3a4b: 0x0a, 0x3a4c: 0x0b, 0x3a4d: 0x0c, 0x3a4e: 0x0d, 0x3a4f: 0x0e, + 0x3a50: 0x0f, 0x3a51: 0x10, 0x3a52: 0x11, 0x3a53: 0x12, 0x3a54: 0x13, 0x3a55: 0x14, 0x3a56: 0x15, 0x3a57: 0x16, + 0x3a58: 0x17, 0x3a59: 0x18, 0x3a5a: 0x19, 0x3a5b: 0x1a, 0x3a5c: 0x1b, 0x3a5d: 0x1c, 0x3a5e: 0x1d, 0x3a5f: 0x1e, + 0x3a60: 0x01, 0x3a61: 0xce, 0x3a62: 0xcf, 0x3a63: 0xd0, 0x3a64: 0xd1, 0x3a65: 0xd2, 0x3a66: 0xd3, 0x3a67: 0xd4, + 0x3a68: 0xd5, 0x3a69: 0xd6, 0x3a6a: 0x06, 0x3a6d: 0x07, 0x3a6f: 0xd7, + 0x3a70: 0xe6, 0x3a73: 0x15, + // Block 0xea, offset 0x3a80 + 0x3a80: 0x7d, 0x3a81: 0x7e, 0x3a82: 0x7f, 0x3a83: 0x80, 0x3a84: 0x81, 0x3a85: 0x82, 0x3a86: 0x83, 0x3a87: 0x84, + 0x3a88: 0x85, 0x3a89: 0x86, 0x3a8a: 0x87, 0x3a8b: 0x88, 0x3a8c: 0x89, 0x3a8d: 0x8a, 0x3a8e: 0x8b, 0x3a8f: 0x8c, + 0x3a90: 0x8d, 0x3a91: 0x8e, 0x3a92: 0x8f, 0x3a93: 0x90, 0x3a94: 0x91, 0x3a95: 0x92, 0x3a96: 0x93, 0x3a97: 0x94, + 0x3a98: 0x95, 0x3a99: 0x96, 0x3a9a: 0x97, 0x3a9b: 0x98, 0x3a9c: 0x99, 0x3a9d: 0x9a, 0x3a9e: 0x9b, 0x3a9f: 0x9c, + 0x3aa0: 0x9d, 0x3aa1: 0x9e, 0x3aa2: 0x9f, 0x3aa3: 0xa0, 0x3aa4: 0xa1, 0x3aa5: 0xa2, 0x3aa6: 0xa3, 0x3aa7: 0xa4, + 0x3aa8: 0xa5, 0x3aa9: 0xa6, 0x3aaa: 0xa7, 0x3aab: 0xa8, 0x3aac: 0xa9, 0x3aad: 0xaa, + 0x3ab0: 0xab, 0x3ab1: 0xac, 0x3ab2: 0xad, 0x3ab3: 0xae, 0x3ab4: 0xaf, 0x3ab5: 0xb0, 0x3ab6: 0xb1, 0x3ab7: 0xb2, + 0x3ab8: 0xb3, 0x3aba: 0xaa6, 0x3abb: 0xaa7, 0x3abc: 0xaa8, 0x3abd: 0xaa9, 0x3abe: 0xaaa, 0x3abf: 0xaab, + // Block 0xeb, offset 0x3ac0 + 0x3ac0: 0xaac, 0x3ac1: 0xbb, 0x3ac2: 0xbc, 0x3ac3: 0xbd, 0x3ac4: 0xbe, 0x3ac5: 0xbf, 0x3ac6: 0xaad, 0x3ac7: 0xc1, + 0x3ac8: 0xaae, 0x3ac9: 0xaaf, 0x3aca: 0xab0, 0x3acb: 0xab1, 0x3acc: 0xc6, 0x3acd: 0xab2, 0x3ace: 0xc8, 0x3acf: 0xab3, + 0x3ad0: 0xab4, 0x3ad1: 0xab5, 0x3ad2: 0xab6, 0x3ad3: 0xab7, 0x3ad4: 0xab8, 0x3ad5: 0xab9, 0x3ad6: 0xaba, 0x3ad7: 0xabb, + 0x3ad8: 0xabc, 0x3ad9: 0xabd, 0x3ada: 0xabe, 0x3adb: 0xabf, 0x3adc: 0xac0, 0x3add: 0xac1, 0x3ade: 0xac2, 0x3adf: 0xac3, + 0x3ae0: 0xac4, 0x3ae1: 0xac5, 0x3ae2: 0xac6, 0x3ae3: 0xac7, 0x3ae4: 0xac8, 0x3ae5: 0xac9, 0x3ae6: 0xaca, 0x3ae7: 0xacb, + 0x3ae8: 0xacc, 0x3ae9: 0xacd, 0x3aea: 0xace, 0x3aeb: 0xacf, 0x3aec: 0xad0, 0x3aed: 0xad1, 0x3aee: 0xad2, 0x3aef: 0xad3, + 0x3af0: 0xad4, 0x3af1: 0xad5, 0x3af2: 0xad6, 0x3af3: 0xad7, 0x3af4: 0xad8, 0x3af5: 0xad9, 0x3af6: 0xada, 0x3af7: 0xadb, + 0x3af8: 0xadc, 0x3af9: 0xadd, 0x3afa: 0xade, 0x3afb: 0xadf, 0x3afc: 0xae0, 0x3afd: 0xae1, 0x3afe: 0xae2, 0x3aff: 0xae3, + // Block 0xec, offset 0x3b00 + 0x3b00: 0xae4, 0x3b01: 0xae5, 0x3b02: 0xae6, 0x3b03: 0xae7, 0x3b04: 0xae8, 0x3b05: 0xae9, 0x3b06: 0xaea, 0x3b07: 0xaeb, + 0x3b08: 0xaec, 0x3b09: 0xaed, 0x3b0a: 0xaee, 0x3b0b: 0xaef, 0x3b0c: 0xaf0, 0x3b0d: 0xaf1, 0x3b0e: 0xaf2, 0x3b0f: 0xaf3, + 0x3b10: 0xaf4, 0x3b11: 0xaf5, 0x3b12: 0xaf6, 0x3b13: 0xaf7, 0x3b14: 0xaf8, 0x3b15: 0xaf9, 0x3b16: 0xafa, 0x3b17: 0xafb, + 0x3b18: 0xafc, 0x3b19: 0xafd, 0x3b1a: 0xafe, 0x3b1b: 0xaff, 0x3b1c: 0xb00, 0x3b1d: 0xb01, 0x3b1e: 0xb02, 0x3b1f: 0xb03, + 0x3b20: 0xb04, 0x3b21: 0xb05, 0x3b22: 0xb06, 0x3b23: 0xb07, 0x3b24: 0xb08, 0x3b25: 0xb09, 0x3b26: 0xb0a, 0x3b27: 0xb0b, + 0x3b28: 0xb0c, 0x3b29: 0xb0d, 0x3b2a: 0xb0e, 0x3b2b: 0xb0f, 0x3b2c: 0xb10, 0x3b2d: 0xb11, 0x3b2e: 0xb12, 0x3b2f: 0xb13, + 0x3b30: 0xb14, 0x3b31: 0xb15, 0x3b32: 0xb16, 0x3b33: 0xb17, 0x3b34: 0xb18, 0x3b35: 0xb19, 0x3b36: 0xb1a, 0x3b37: 0xca, + 0x3b38: 0xb1b, 0x3b39: 0xb1c, 0x3b3a: 0xb1d, 0x3b3b: 0xb1e, 0x3b3c: 0xb1f, 0x3b3d: 0xb20, 0x3b3e: 0xb21, 0x3b3f: 0xb22, + // Block 0xed, offset 0x3b40 + 0x3b40: 0xb23, 0x3b41: 0xb24, 0x3b42: 0xb25, 0x3b43: 0xb26, 0x3b44: 0xb27, 0x3b45: 0xb28, 0x3b46: 0xb29, 0x3b47: 0xb2a, + 0x3b48: 0xb2b, 0x3b49: 0xb2c, 0x3b4a: 0xb2d, 0x3b4b: 0xb2e, 0x3b4c: 0xb2f, 0x3b4d: 0xb30, 0x3b4e: 0xb31, 0x3b4f: 0xb32, + 0x3b50: 0xb33, 0x3b51: 0xb34, 0x3b52: 0xb35, 0x3b53: 0xb36, 0x3b54: 0xb37, 0x3b55: 0xb38, 0x3b56: 0xb39, 0x3b57: 0xb3a, + 0x3b58: 0xb3b, 0x3b59: 0xb3c, 0x3b5a: 0xb3d, 0x3b5b: 0xb3e, 0x3b5c: 0xb3f, 0x3b5d: 0xb40, 0x3b5e: 0xb41, 0x3b5f: 0xb42, + 0x3b60: 0xb43, 0x3b61: 0xb44, 0x3b62: 0xb45, 0x3b63: 0xb46, 0x3b64: 0xb47, 0x3b65: 0xb48, 0x3b66: 0xb49, 0x3b67: 0xb4a, + 0x3b68: 0xb4b, 0x3b69: 0xb4c, 0x3b6a: 0xb4d, 0x3b6b: 0xb4e, 0x3b6c: 0xb4f, 0x3b6d: 0xb50, 0x3b6e: 0xb51, 0x3b6f: 0xb52, + 0x3b70: 0xb53, 0x3b71: 0xb54, 0x3b72: 0xb55, 0x3b73: 0xb56, 0x3b74: 0xb57, 0x3b75: 0xb58, 0x3b76: 0xb59, 0x3b77: 0xb5a, + 0x3b78: 0xb5b, 0x3b79: 0xb5c, 0x3b7a: 0xb5d, 0x3b7b: 0xb5e, 0x3b7c: 0xb5f, 0x3b7d: 0xb60, 0x3b7e: 0xb61, 0x3b7f: 0xb62, + // Block 0xee, offset 0x3b80 + 0x3b80: 0xb63, 0x3b81: 0xb64, 0x3b82: 0xb65, 0x3b83: 0xb66, 0x3b84: 0xb67, 0x3b85: 0xb68, 0x3b86: 0xb69, 0x3b87: 0xb6a, + 0x3b88: 0xb6b, 0x3b89: 0xb6c, 0x3b8a: 0xb6d, 0x3b8b: 0xb6e, 0x3b8c: 0xb6f, 0x3b8d: 0xb70, 0x3b8e: 0xb71, 0x3b8f: 0xb72, + 0x3b90: 0xb73, 0x3b91: 0xb74, 0x3b92: 0xb75, 0x3b93: 0xb76, 0x3b94: 0xb77, 0x3b95: 0xb78, 0x3b96: 0xb79, 0x3b97: 0xb7a, + 0x3b98: 0xb7b, 0x3b99: 0xb7c, 0x3b9a: 0xb7d, 0x3b9b: 0xb7e, 0x3b9c: 0xb7f, 0x3b9d: 0xb80, 0x3b9e: 0xb81, 0x3b9f: 0xb82, + 0x3ba0: 0xb83, 0x3ba1: 0xb84, 0x3ba2: 0xb85, 0x3ba3: 0xb86, 0x3ba4: 0xb87, 0x3ba5: 0xb88, 0x3ba6: 0xb89, 0x3ba7: 0xb8a, + 0x3ba8: 0xb8b, 0x3ba9: 0xb8c, 0x3baa: 0xb8d, 0x3bab: 0xb8e, 0x3bac: 0xb8f, 0x3bad: 0xb90, 0x3bae: 0xb91, 0x3baf: 0xb92, + 0x3bb0: 0xb93, 0x3bb1: 0xb94, 0x3bb2: 0xb95, 0x3bb3: 0xb96, 0x3bb4: 0xb97, 0x3bb5: 0xb98, 0x3bb6: 0xb99, 0x3bb7: 0xb9a, + 0x3bb8: 0xb9b, 0x3bb9: 0xb9c, 0x3bba: 0xb9d, 0x3bbb: 0xb9e, 0x3bbc: 0xb9f, 0x3bbd: 0xba0, 0x3bbe: 0xba1, 0x3bbf: 0xba2, + // Block 0xef, offset 0x3bc0 + 0x3bc0: 0xba3, 0x3bc1: 0xba4, 0x3bc2: 0xba5, 0x3bc3: 0xba6, 0x3bc4: 0xba7, 0x3bc5: 0xba8, 0x3bc6: 0xba9, 0x3bc7: 0xbaa, + 0x3bc8: 0xbab, 0x3bc9: 0xbac, 0x3bca: 0xbad, 0x3bcb: 0xbae, 0x3bcc: 0xbaf, 0x3bcd: 0xbb0, 0x3bce: 0xbb1, 0x3bcf: 0xbb2, + 0x3bd0: 0xbb3, 0x3bd1: 0xbb4, 0x3bd2: 0xbb5, 0x3bd3: 0xbb6, 0x3bd4: 0xbb7, 0x3bd5: 0xbb8, 0x3bd6: 0xbb9, 0x3bd7: 0xbba, + 0x3bd8: 0xbbb, 0x3bd9: 0xbbc, 0x3bda: 0xbbd, 0x3bdb: 0xbbe, 0x3bdc: 0xbbf, 0x3bdd: 0xbc0, 0x3bde: 0xbc1, 0x3bdf: 0xbc2, + 0x3be0: 0xbc3, 0x3be1: 0xbc4, 0x3be2: 0xbc5, 0x3be3: 0xbc6, 0x3be4: 0xbc7, 0x3be5: 0xbc8, 0x3be6: 0xbc9, 0x3be7: 0xbca, + 0x3be8: 0xbcb, 0x3be9: 0xbcc, 0x3bea: 0xbcd, 0x3beb: 0xbce, 0x3bec: 0xbcf, 0x3bed: 0xbd0, 0x3bee: 0xbd1, 0x3bef: 0xbd2, + 0x3bf0: 0xbd3, 0x3bf1: 0xbd4, 0x3bf2: 0xbd5, 0x3bf3: 0xbd6, 0x3bf4: 0xbd7, 0x3bf5: 0xbd8, 0x3bf6: 0xbd9, 0x3bf7: 0xbda, + 0x3bf8: 0xbdb, 0x3bf9: 0xbdc, 0x3bfa: 0xbdd, 0x3bfb: 0xbde, 0x3bfc: 0xbdf, 0x3bfd: 0xbe0, 0x3bfe: 0xbe1, 0x3bff: 0xbe2, + // Block 0xf0, offset 0x3c00 + 0x3c00: 0xbe3, 0x3c01: 0xbe4, 0x3c02: 0xbe5, 0x3c03: 0xbe6, 0x3c04: 0xbe7, 0x3c05: 0xbe8, 0x3c06: 0xbe9, 0x3c07: 0xbea, + 0x3c08: 0xbeb, 0x3c09: 0xbec, 0x3c0a: 0xbed, 0x3c0b: 0xbee, 0x3c0c: 0xbef, 0x3c0d: 0xbf0, 0x3c0e: 0xbf1, 0x3c0f: 0xbf2, + 0x3c10: 0xbf3, 0x3c11: 0xbf4, 0x3c12: 0xbf5, 0x3c13: 0xbf6, 0x3c14: 0xbf7, 0x3c15: 0xbf8, 0x3c16: 0xbf9, 0x3c17: 0xbfa, + 0x3c18: 0xbfb, 0x3c19: 0xbfc, 0x3c1a: 0xbfd, 0x3c1b: 0xbfe, 0x3c1c: 0xbff, 0x3c1d: 0xc00, 0x3c1e: 0xc01, 0x3c1f: 0xc02, + 0x3c20: 0xc03, 0x3c21: 0xc04, 0x3c22: 0xc05, 0x3c23: 0xc06, 0x3c24: 0xc07, 0x3c25: 0xc08, 0x3c26: 0xc09, 0x3c27: 0xc0a, + 0x3c28: 0xc0b, 0x3c29: 0xc0c, 0x3c2a: 0xc0d, 0x3c2b: 0xc0e, 0x3c2c: 0xc0f, 0x3c2d: 0xc10, 0x3c2e: 0xc11, 0x3c2f: 0xc12, + 0x3c30: 0xc13, 0x3c31: 0xc14, 0x3c32: 0xc15, 0x3c33: 0xc16, 0x3c34: 0xc17, 0x3c35: 0xc18, 0x3c36: 0xc19, 0x3c37: 0xc1a, + 0x3c38: 0xc1b, 0x3c39: 0xc1c, 0x3c3a: 0xc1d, 0x3c3b: 0xc1e, 0x3c3c: 0xc1f, 0x3c3d: 0xc20, 0x3c3e: 0xc21, 0x3c3f: 0xc22, + // Block 0xf1, offset 0x3c40 + 0x3c40: 0xc23, 0x3c41: 0xc24, 0x3c42: 0xc25, 0x3c43: 0xc26, 0x3c44: 0xc27, 0x3c45: 0xc28, 0x3c46: 0xc29, 0x3c47: 0xc2a, + 0x3c48: 0xc2b, 0x3c49: 0xc2c, 0x3c4a: 0xc2d, 0x3c4b: 0xc2e, 0x3c4c: 0xc2f, 0x3c4d: 0xc30, 0x3c4e: 0xc31, 0x3c4f: 0xc32, + 0x3c50: 0xc33, 0x3c51: 0xc34, 0x3c52: 0xc35, 0x3c53: 0xc36, 0x3c54: 0xc37, 0x3c55: 0xc38, 0x3c56: 0xc39, 0x3c57: 0xc3a, + 0x3c58: 0xc3b, 0x3c59: 0xc3c, 0x3c5a: 0xc3d, 0x3c5b: 0xc3e, 0x3c5c: 0xc3f, 0x3c5d: 0xc40, 0x3c5e: 0xc41, 0x3c5f: 0xc42, + 0x3c60: 0xc43, 0x3c61: 0xc44, 0x3c62: 0xc45, 0x3c63: 0xc46, 0x3c64: 0xc47, 0x3c65: 0xc48, 0x3c66: 0xc49, 0x3c67: 0xc4a, + 0x3c68: 0xc4b, 0x3c69: 0xc4c, 0x3c6a: 0xc4d, 0x3c6b: 0xc4e, 0x3c6c: 0xc4f, 0x3c6d: 0xc50, 0x3c6e: 0xc51, 0x3c6f: 0xc52, + 0x3c70: 0xc53, 0x3c71: 0xc54, 0x3c72: 0xc55, 0x3c73: 0xc56, 0x3c74: 0xc57, 0x3c75: 0xc58, 0x3c76: 0xc59, 0x3c77: 0xc5a, + 0x3c78: 0xc5b, 0x3c79: 0xc5c, 0x3c7a: 0xc5d, 0x3c7b: 0xc5e, 0x3c7c: 0xc5f, 0x3c7d: 0xc60, 0x3c7e: 0xc61, 0x3c7f: 0xc62, + // Block 0xf2, offset 0x3c80 + 0x3ca4: 0xc63, 0x3ca5: 0xc64, 0x3ca6: 0xc65, 0x3ca7: 0xc66, + 0x3ca8: 0xc67, 0x3ca9: 0xc68, 0x3caa: 0xc69, 0x3cab: 0xc6a, 0x3cac: 0x103, 0x3cad: 0x104, 0x3cae: 0x105, 0x3caf: 0x106, + 0x3cb0: 0x107, 0x3cb1: 0x108, 0x3cb2: 0x109, 0x3cb3: 0x10a, 0x3cb4: 0x10b, 0x3cb5: 0x10c, 0x3cb6: 0x10d, 0x3cb7: 0x10e, + 0x3cb8: 0x10f, 0x3cb9: 0x110, 0x3cba: 0x111, 0x3cbb: 0x112, 0x3cbc: 0x113, 0x3cbd: 0x114, 0x3cbe: 0x115, 0x3cbf: 0x116, + // Block 0xf3, offset 0x3cc0 + 0x3cc0: 0x18b, 0x3cc1: 0x18c, 0x3cc2: 0x18d, 0x3cc3: 0x18e, 0x3cc4: 0x18f, 0x3cc5: 0x190, 0x3cc6: 0x191, 0x3cc7: 0x192, + 0x3cc8: 0xc6b, 0x3cc9: 0xc6c, 0x3ccc: 0x195, 0x3ccd: 0x196, 0x3cce: 0x197, 0x3ccf: 0x198, + 0x3cd0: 0x199, 0x3cd1: 0x19a, 0x3cd2: 0x19b, 0x3cd3: 0x19c, 0x3cd4: 0x19d, 0x3cd5: 0x19e, 0x3cd7: 0x19f, + 0x3cd8: 0x1a0, 0x3cd9: 0x1a1, 0x3cda: 0x1a2, 0x3cdb: 0x1a3, 0x3cdc: 0x1a4, 0x3cdd: 0x1a5, + // Block 0xf4, offset 0x3d00 + 0x3d00: 0xc6d, 0x3d01: 0xc6e, 0x3d02: 0xc6f, 0x3d03: 0xc70, 0x3d04: 0xc71, 0x3d05: 0xc72, 0x3d06: 0xc73, 0x3d07: 0xc74, + 0x3d08: 0xc75, 0x3d09: 0xc76, 0x3d0a: 0xc77, 0x3d0b: 0xc78, 0x3d0c: 0xc79, 0x3d0d: 0xc7a, 0x3d0e: 0xc7b, 0x3d0f: 0xc7c, + 0x3d10: 0xc7d, 0x3d11: 0xc7e, 0x3d12: 0xc7f, 0x3d13: 0xc80, 0x3d14: 0xc81, 0x3d15: 0xc82, 0x3d16: 0xc83, 0x3d17: 0xc84, + 0x3d18: 0xc85, 0x3d19: 0xc86, 0x3d1a: 0xc87, 0x3d1b: 0xc88, 0x3d1c: 0xc89, 0x3d1d: 0xc8a, 0x3d1e: 0xc8b, 0x3d1f: 0xc8c, + 0x3d20: 0xc8d, 0x3d21: 0xc8e, 0x3d22: 0xc8f, 0x3d23: 0xc90, 0x3d24: 0xc91, 0x3d25: 0xc92, 0x3d26: 0xc93, 0x3d27: 0xc94, + 0x3d28: 0xc95, 0x3d29: 0xc96, 0x3d2a: 0xc97, 0x3d2b: 0xc98, 0x3d2c: 0xc99, 0x3d2d: 0xc9a, 0x3d2e: 0xc9b, 0x3d2f: 0xc9c, + 0x3d30: 0xc9d, 0x3d31: 0xc9e, 0x3d32: 0xc9f, 0x3d33: 0xca0, 0x3d34: 0xca1, 0x3d35: 0xca2, 0x3d36: 0xca3, 0x3d37: 0xca4, + 0x3d38: 0xca5, 0x3d39: 0xca6, 0x3d3a: 0xca7, 0x3d3b: 0xca8, 0x3d3c: 0xca9, 0x3d3d: 0xcaa, 0x3d3e: 0xcab, 0x3d3f: 0xcac, + // Block 0xf5, offset 0x3d40 + 0x3d40: 0xcad, 0x3d41: 0xcae, 0x3d42: 0xcaf, 0x3d43: 0xcb0, 0x3d44: 0xcb1, 0x3d45: 0xcb2, 0x3d46: 0xcb3, 0x3d47: 0xcb4, + 0x3d48: 0xcb5, 0x3d49: 0xcb6, 0x3d4a: 0xcb7, 0x3d4b: 0xcb8, 0x3d4c: 0xcb9, 0x3d4d: 0xcba, 0x3d4e: 0xcbb, 0x3d4f: 0xcbc, + 0x3d50: 0xcbd, 0x3d51: 0xcbe, 0x3d52: 0xcbf, 0x3d53: 0xcc0, 0x3d54: 0xcc1, 0x3d55: 0xcc2, 0x3d56: 0xcc3, 0x3d57: 0xcc4, + 0x3d58: 0xcc5, 0x3d59: 0xcc6, 0x3d5a: 0xcc7, 0x3d5b: 0xcc8, 0x3d5c: 0xcc9, 0x3d5d: 0xcca, 0x3d5e: 0xccb, 0x3d5f: 0xccc, + 0x3d60: 0xccd, 0x3d61: 0xcce, 0x3d62: 0xccf, 0x3d63: 0xcd0, 0x3d64: 0xcd1, 0x3d65: 0xcd2, 0x3d66: 0xcd3, 0x3d67: 0xcd4, + 0x3d68: 0xcd5, 0x3d69: 0xcd6, 0x3d6a: 0xcd7, 0x3d6b: 0xcd8, 0x3d6c: 0xcd9, 0x3d6d: 0xcda, 0x3d6e: 0xcdb, 0x3d6f: 0xcdc, + 0x3d70: 0xcdd, 0x3d71: 0xcde, 0x3d72: 0xcdf, 0x3d73: 0xce0, 0x3d74: 0xce1, 0x3d75: 0xce2, 0x3d76: 0xce3, 0x3d77: 0xce4, + 0x3d78: 0xce5, 0x3d79: 0xce6, 0x3d7a: 0xce7, 0x3d7b: 0xce8, 0x3d7c: 0xce9, 0x3d7d: 0xcea, 0x3d7e: 0xceb, 0x3d7f: 0xcec, + // Block 0xf6, offset 0x3d80 + 0x3d80: 0xced, 0x3d81: 0xcee, 0x3d82: 0xcef, 0x3d83: 0xcf0, 0x3d84: 0xcf1, 0x3d85: 0xcf2, 0x3d86: 0xcf3, 0x3d87: 0xcf4, + 0x3d88: 0xcf5, 0x3d89: 0xcf6, 0x3d8a: 0xcf7, 0x3d8b: 0xcf8, 0x3d8c: 0xcf9, 0x3d8d: 0xcfa, 0x3d8e: 0xcfb, 0x3d8f: 0xcfc, + 0x3d90: 0xcfd, 0x3d91: 0xcfe, 0x3d92: 0xcff, 0x3d93: 0xd00, 0x3d94: 0xd01, 0x3d95: 0xd02, 0x3d96: 0xd03, 0x3d97: 0xd04, + 0x3d98: 0xd05, 0x3d99: 0xd06, 0x3d9a: 0xd07, 0x3d9b: 0xd08, 0x3d9c: 0xd09, 0x3d9d: 0xd0a, 0x3d9e: 0xd0b, 0x3d9f: 0xd0c, + 0x3da0: 0xd0d, 0x3da1: 0xd0e, 0x3da2: 0xd0f, 0x3da3: 0xd10, 0x3da4: 0xd11, 0x3da5: 0xd12, 0x3da6: 0xd13, 0x3da7: 0xd14, + 0x3da8: 0xd15, 0x3da9: 0xd16, 0x3daa: 0xd17, 0x3dab: 0xd18, 0x3dac: 0xd19, 0x3dad: 0xd1a, 0x3dae: 0xd1b, 0x3daf: 0xd1c, + 0x3db0: 0xd1d, 0x3db1: 0xd1e, 0x3db2: 0xd1f, 0x3db3: 0xd20, 0x3db4: 0xd21, 0x3db5: 0xd22, 0x3db6: 0xd23, 0x3db7: 0xd24, + 0x3db8: 0xd25, 0x3db9: 0xd26, 0x3dba: 0xd27, 0x3dbb: 0xd28, 0x3dbc: 0xd29, 0x3dbd: 0xd2a, 0x3dbe: 0xd2b, 0x3dbf: 0xd2c, + // Block 0xf7, offset 0x3dc0 + 0x3dc0: 0xd2d, 0x3dc1: 0xd2e, 0x3dc2: 0xd2f, 0x3dc3: 0xd30, 0x3dc4: 0xd31, 0x3dc5: 0xd32, 0x3dc6: 0xd33, 0x3dc7: 0xd34, + 0x3dc8: 0xd35, 0x3dc9: 0xd36, 0x3dca: 0xd37, 0x3dcb: 0xd38, 0x3dcc: 0xd39, 0x3dcd: 0xd3a, 0x3dce: 0xd3b, 0x3dcf: 0xd3c, + 0x3dd0: 0xd3d, 0x3dd1: 0xd3e, 0x3dd2: 0xd3f, 0x3dd3: 0xd40, 0x3dd4: 0xd41, 0x3dd5: 0xd42, 0x3dd6: 0xd43, 0x3dd7: 0xd44, + 0x3dd8: 0xd45, 0x3dd9: 0xd46, 0x3dda: 0xd47, 0x3ddb: 0xd48, 0x3ddc: 0xd49, 0x3ddd: 0xd4a, 0x3dde: 0xd4b, 0x3ddf: 0xd4c, + 0x3de0: 0xd4d, 0x3de1: 0xd4e, 0x3de2: 0xd4f, 0x3de3: 0xd50, 0x3de4: 0xd51, 0x3de5: 0xd52, 0x3de6: 0xd53, 0x3de7: 0xd54, + 0x3de8: 0xd55, 0x3de9: 0xd56, 0x3dea: 0xd57, 0x3deb: 0xd58, 0x3dec: 0xd59, 0x3ded: 0xd5a, 0x3dee: 0xd5b, 0x3def: 0xd5c, + 0x3df0: 0xd5d, 0x3df1: 0xd5e, 0x3df2: 0xd5f, 0x3df3: 0xd60, 0x3df4: 0xd61, 0x3df5: 0xd62, 0x3df6: 0xd63, 0x3df7: 0xd64, + 0x3df8: 0xd65, 0x3df9: 0xd66, 0x3dfa: 0xd67, 0x3dfb: 0xd68, 0x3dfc: 0xd69, 0x3dfd: 0xd6a, 0x3dfe: 0xd6b, 0x3dff: 0xd6c, + // Block 0xf8, offset 0x3e00 + 0x3e00: 0xd6d, 0x3e01: 0xd6e, 0x3e02: 0xd6f, 0x3e03: 0xd70, 0x3e04: 0xd71, 0x3e05: 0xd72, 0x3e06: 0xd73, 0x3e07: 0xd74, + 0x3e08: 0xd75, 0x3e09: 0xd76, 0x3e0a: 0xd77, 0x3e0b: 0xd78, 0x3e0c: 0xd79, 0x3e0d: 0xd7a, 0x3e0e: 0xd7b, 0x3e0f: 0xd7c, + 0x3e10: 0xd7d, 0x3e11: 0xd7e, 0x3e12: 0xd7f, 0x3e13: 0xd80, 0x3e14: 0xd81, 0x3e15: 0xd82, 0x3e16: 0xd83, 0x3e17: 0xd84, + 0x3e18: 0xd85, 0x3e19: 0xd86, 0x3e1a: 0xd87, 0x3e1b: 0xd88, 0x3e1c: 0xd89, 0x3e1d: 0xd8a, 0x3e1e: 0xd8b, 0x3e1f: 0xd8c, + 0x3e20: 0xd8d, 0x3e21: 0xd8e, 0x3e22: 0xd8f, 0x3e23: 0xd90, 0x3e24: 0xd91, 0x3e25: 0xd92, 0x3e26: 0xd93, 0x3e27: 0xd94, + 0x3e28: 0xd95, 0x3e29: 0xd96, 0x3e2a: 0xd97, 0x3e2b: 0xd98, 0x3e2c: 0xd99, 0x3e2d: 0xd9a, 0x3e2e: 0xd9b, 0x3e2f: 0xd9c, + 0x3e30: 0xd9d, 0x3e31: 0xd9e, 0x3e32: 0xd9f, 0x3e33: 0xda0, 0x3e34: 0xda1, 0x3e35: 0xda2, 0x3e36: 0xda3, 0x3e37: 0xda4, + 0x3e38: 0xda5, 0x3e39: 0xda6, 0x3e3a: 0xda7, 0x3e3b: 0xda8, 0x3e3c: 0xda9, 0x3e3d: 0xdaa, 0x3e3e: 0xdab, 0x3e3f: 0xdac, + // Block 0xf9, offset 0x3e40 + 0x3e40: 0xdad, 0x3e41: 0xdae, 0x3e42: 0xdaf, 0x3e43: 0xdb0, 0x3e44: 0xdb1, 0x3e45: 0xdb2, 0x3e46: 0xdb3, 0x3e47: 0xdb4, + 0x3e48: 0xdb5, 0x3e49: 0xdb6, 0x3e4a: 0xdb7, 0x3e4b: 0xdb8, 0x3e4c: 0xdb9, 0x3e4d: 0xdba, 0x3e4e: 0xdbb, 0x3e4f: 0xdbc, + 0x3e50: 0xdbd, 0x3e51: 0xdbe, 0x3e52: 0xdbf, 0x3e53: 0xdc0, 0x3e54: 0xdc1, 0x3e55: 0xdc2, 0x3e56: 0xdc3, 0x3e57: 0xdc4, + 0x3e58: 0xdc5, 0x3e59: 0xdc6, 0x3e5a: 0xdc7, 0x3e5b: 0xdc8, 0x3e5c: 0xdc9, 0x3e5d: 0xdca, 0x3e5e: 0xdcb, 0x3e5f: 0xdcc, + 0x3e60: 0xdcd, 0x3e61: 0xdce, 0x3e62: 0xdcf, 0x3e63: 0xdd0, 0x3e64: 0xdd1, 0x3e65: 0xdd2, 0x3e66: 0xdd3, 0x3e67: 0xdd4, + 0x3e68: 0xdd5, 0x3e69: 0xdd6, 0x3e6a: 0xdd7, 0x3e6b: 0xdd8, 0x3e6c: 0xdd9, 0x3e6d: 0xdda, 0x3e6e: 0xddb, 0x3e6f: 0xddc, + 0x3e70: 0xddd, 0x3e71: 0xdde, 0x3e72: 0xddf, 0x3e73: 0xde0, 0x3e74: 0xde1, 0x3e75: 0xde2, 0x3e76: 0xde3, 0x3e77: 0xde4, + 0x3e78: 0xde5, 0x3e79: 0xde6, 0x3e7a: 0xde7, 0x3e7b: 0xde8, 0x3e7c: 0xde9, 0x3e7d: 0xdea, 0x3e7e: 0xdeb, 0x3e7f: 0xdec, + // Block 0xfa, offset 0x3e80 + 0x3e80: 0xded, 0x3e81: 0xdee, 0x3e82: 0xdef, 0x3e83: 0xdf0, 0x3e84: 0xdf1, 0x3e85: 0xdf2, 0x3e86: 0xdf3, 0x3e87: 0xdf4, + 0x3e88: 0xdf5, 0x3e89: 0xdf6, 0x3e8a: 0xdf7, 0x3e8b: 0xdf8, 0x3e8c: 0xdf9, 0x3e8d: 0xdfa, 0x3e8e: 0xdfb, 0x3e8f: 0xdfc, + 0x3e90: 0xdfd, 0x3e91: 0xdfe, 0x3e92: 0xdff, 0x3e93: 0xe00, 0x3e94: 0xe01, 0x3e95: 0xe02, 0x3e96: 0xe03, 0x3e97: 0xe04, + 0x3e98: 0xe05, 0x3e99: 0xe06, 0x3e9a: 0xe07, 0x3e9b: 0xe08, 0x3e9c: 0xe09, 0x3e9d: 0xe0a, 0x3e9e: 0xe0b, 0x3e9f: 0xe0c, + 0x3ea0: 0xe0d, 0x3ea1: 0xe0e, 0x3ea2: 0xe0f, 0x3ea3: 0xe10, 0x3ea4: 0xe11, 0x3ea5: 0xe12, 0x3ea6: 0xe13, 0x3ea7: 0xe14, + 0x3ea8: 0xe15, 0x3ea9: 0xe16, 0x3eaa: 0xe17, 0x3eab: 0xe18, 0x3eac: 0xe19, 0x3ead: 0xe1a, 0x3eae: 0xe1b, 0x3eaf: 0xe1c, + 0x3eb0: 0xe1d, 0x3eb1: 0xe1e, 0x3eb2: 0xe1f, 0x3eb3: 0xe20, 0x3eb4: 0xe21, 0x3eb5: 0xe22, 0x3eb6: 0xe23, 0x3eb7: 0xe24, + 0x3eb8: 0xe25, 0x3eb9: 0xe26, 0x3eba: 0xe27, 0x3ebb: 0xe28, 0x3ebc: 0xe29, 0x3ebd: 0xe2a, 0x3ebe: 0xe2b, 0x3ebf: 0xe2c, + // Block 0xfb, offset 0x3ec0 + 0x3ec0: 0xe2d, 0x3ec1: 0xe2e, 0x3ec2: 0xe2f, 0x3ec3: 0xe30, 0x3ec4: 0xe31, 0x3ec5: 0xe32, 0x3ec6: 0xe33, 0x3ec7: 0xe34, + 0x3ec8: 0xe35, 0x3ec9: 0xe36, 0x3eca: 0xe37, 0x3ecb: 0xe38, 0x3ecc: 0xe39, 0x3ecd: 0xe3a, 0x3ece: 0xe3b, 0x3ecf: 0xe3c, + 0x3ed0: 0xe3d, 0x3ed1: 0xe3e, 0x3ed2: 0xe3f, 0x3ed3: 0xe40, 0x3ed4: 0xe41, 0x3ed5: 0xe42, 0x3ed6: 0xe43, 0x3ed7: 0xe44, + 0x3ed8: 0xe45, 0x3ed9: 0xe46, 0x3eda: 0xe47, 0x3edb: 0xe48, 0x3edc: 0xe49, 0x3edd: 0xe4a, 0x3ede: 0xe4b, 0x3edf: 0xe4c, + 0x3ee0: 0xe4d, 0x3ee1: 0xe4e, 0x3ee2: 0xe4f, 0x3ee3: 0xe50, 0x3ee4: 0xe51, 0x3ee5: 0xe52, 0x3ee6: 0xe53, 0x3ee7: 0xe54, + 0x3ee8: 0xe55, 0x3ee9: 0xe56, 0x3eea: 0xe57, 0x3eeb: 0xe58, 0x3eec: 0xe59, 0x3eed: 0xe5a, 0x3eee: 0xe5b, 0x3eef: 0xe5c, + 0x3ef0: 0xe5d, 0x3ef1: 0xe5e, 0x3ef2: 0xe5f, 0x3ef3: 0xe60, 0x3ef4: 0xe61, 0x3ef5: 0xe62, 0x3ef6: 0xe63, 0x3ef7: 0xe64, + 0x3ef8: 0xe65, 0x3ef9: 0xe66, 0x3efa: 0xe67, 0x3efb: 0xe68, 0x3efc: 0xe69, 0x3efd: 0xe6a, 0x3efe: 0xe6b, 0x3eff: 0xe6c, + // Block 0xfc, offset 0x3f00 + 0x3f00: 0xe6d, 0x3f01: 0xe6e, 0x3f02: 0xe6f, 0x3f03: 0xe70, 0x3f04: 0xe71, 0x3f05: 0xe72, 0x3f06: 0xe73, 0x3f07: 0xe74, + 0x3f08: 0xe75, 0x3f09: 0xe76, 0x3f0a: 0xe77, 0x3f0b: 0xe78, 0x3f0c: 0xe79, 0x3f0d: 0xe7a, 0x3f0e: 0xe7b, 0x3f0f: 0xe7c, + 0x3f10: 0xe7d, 0x3f11: 0xe7e, 0x3f12: 0xe7f, 0x3f13: 0xe80, 0x3f14: 0xe81, 0x3f15: 0xe82, 0x3f16: 0xe83, 0x3f17: 0xe84, + 0x3f18: 0xe85, 0x3f19: 0xe86, 0x3f1a: 0xe87, 0x3f1b: 0xe88, 0x3f1c: 0xe89, 0x3f1d: 0xe8a, 0x3f1e: 0xe8b, 0x3f1f: 0xe8c, + 0x3f20: 0xe8d, 0x3f21: 0xe8e, 0x3f22: 0xe8f, 0x3f23: 0xe90, 0x3f24: 0xe91, 0x3f25: 0xe92, 0x3f26: 0xe93, 0x3f27: 0xe94, + 0x3f28: 0xe95, 0x3f29: 0xe96, 0x3f2a: 0xe97, 0x3f2b: 0xe98, 0x3f2c: 0xe99, 0x3f2d: 0xe9a, 0x3f2e: 0xe9b, 0x3f2f: 0xe9c, + 0x3f30: 0xe9d, 0x3f31: 0xe9e, 0x3f32: 0xe9f, 0x3f33: 0xea0, 0x3f34: 0xea1, 0x3f35: 0xea2, 0x3f36: 0xea3, 0x3f37: 0xea4, + 0x3f38: 0xea5, 0x3f39: 0xea6, 0x3f3a: 0xea7, 0x3f3b: 0xea8, 0x3f3c: 0xea9, 0x3f3d: 0xeaa, 0x3f3e: 0xeab, 0x3f3f: 0xeac, + // Block 0xfd, offset 0x3f40 + 0x3f40: 0xead, 0x3f41: 0xeae, 0x3f42: 0xeaf, 0x3f43: 0xeb0, 0x3f44: 0xeb1, 0x3f45: 0xeb2, 0x3f46: 0xeb3, 0x3f47: 0xeb4, + 0x3f48: 0xeb5, 0x3f49: 0xeb6, 0x3f4a: 0xeb7, 0x3f4b: 0xeb8, 0x3f4c: 0xeb9, 0x3f4d: 0xeba, 0x3f4e: 0xebb, 0x3f4f: 0xebc, + 0x3f50: 0xebd, 0x3f51: 0xebe, 0x3f52: 0xebf, 0x3f53: 0xec0, 0x3f54: 0xec1, 0x3f55: 0xec2, 0x3f56: 0xec3, 0x3f57: 0xec4, + 0x3f58: 0xec5, 0x3f59: 0xec6, 0x3f5a: 0xec7, 0x3f5b: 0xec8, 0x3f5c: 0xec9, 0x3f5d: 0xeca, 0x3f5e: 0xecb, 0x3f5f: 0xecc, + 0x3f60: 0xecd, 0x3f61: 0xece, 0x3f62: 0xecf, 0x3f63: 0xed0, 0x3f64: 0xed1, 0x3f65: 0xed2, 0x3f66: 0xed3, 0x3f67: 0xed4, + 0x3f68: 0xed5, 0x3f69: 0xed6, 0x3f6a: 0xed7, 0x3f6b: 0xed8, 0x3f6c: 0xed9, 0x3f6d: 0xeda, 0x3f6e: 0xedb, 0x3f6f: 0xedc, + 0x3f70: 0xedd, 0x3f71: 0xede, 0x3f72: 0xedf, 0x3f73: 0xee0, 0x3f74: 0xee1, 0x3f75: 0xee2, 0x3f76: 0xee3, 0x3f77: 0xee4, + 0x3f78: 0xee5, 0x3f79: 0xee6, 0x3f7a: 0xee7, 0x3f7b: 0xee8, 0x3f7c: 0xee9, 0x3f7d: 0xeea, 0x3f7e: 0xeeb, 0x3f7f: 0xeec, + // Block 0xfe, offset 0x3f80 + 0x3f80: 0xeed, 0x3f81: 0xeee, 0x3f82: 0xeef, 0x3f83: 0xef0, 0x3f84: 0xef1, 0x3f85: 0xef2, 0x3f86: 0xef3, 0x3f87: 0xef4, + 0x3f88: 0xef5, 0x3f89: 0xef6, 0x3f8a: 0xef7, 0x3f8b: 0xef8, 0x3f8c: 0xef9, 0x3f8d: 0xefa, 0x3f8e: 0xefb, 0x3f8f: 0xefc, + 0x3f90: 0xefd, 0x3f91: 0xefe, 0x3f92: 0xeff, 0x3f93: 0xf00, 0x3f94: 0xf01, 0x3f95: 0xf02, 0x3f96: 0xf03, 0x3f97: 0xf04, + 0x3f98: 0xf05, 0x3f99: 0xf06, 0x3f9a: 0xf07, 0x3f9b: 0xf08, 0x3f9c: 0xf09, 0x3f9d: 0xf0a, 0x3f9e: 0xf0b, 0x3f9f: 0xf0c, + 0x3fa0: 0xf0d, 0x3fa1: 0xf0e, 0x3fa2: 0xf0f, 0x3fa3: 0xf10, 0x3fa4: 0xf11, 0x3fa5: 0xf12, 0x3fa6: 0xf13, 0x3fa7: 0xf14, + 0x3fa8: 0xf15, 0x3fa9: 0xf16, 0x3faa: 0xf17, 0x3fab: 0xf18, 0x3fac: 0xf19, 0x3fad: 0xf1a, 0x3fae: 0xf1b, 0x3faf: 0xf1c, + 0x3fb0: 0xf1d, 0x3fb1: 0xf1e, 0x3fb2: 0xf1f, 0x3fb3: 0xf20, 0x3fb4: 0xf21, 0x3fb5: 0xf22, 0x3fb6: 0xf23, 0x3fb7: 0xf24, + 0x3fb8: 0xf25, 0x3fb9: 0xf26, 0x3fba: 0xf27, 0x3fbb: 0xf28, 0x3fbc: 0xf29, 0x3fbd: 0xf2a, 0x3fbe: 0xf2b, 0x3fbf: 0xf2c, + // Block 0xff, offset 0x3fc0 + 0x3fc0: 0xf2d, 0x3fc1: 0xf2e, 0x3fc2: 0xf2f, 0x3fc3: 0xf30, 0x3fc4: 0xf31, 0x3fc5: 0xf32, 0x3fc6: 0xf33, 0x3fc7: 0xf34, + 0x3fc8: 0xf35, 0x3fc9: 0xf36, 0x3fca: 0xf37, 0x3fcb: 0xf38, 0x3fcc: 0xf39, 0x3fcd: 0xf3a, 0x3fce: 0xf3b, 0x3fcf: 0xf3c, + 0x3fd0: 0xf3d, 0x3fd1: 0xf3e, 0x3fd2: 0xf3f, 0x3fd3: 0xf40, 0x3fd4: 0xf41, 0x3fd5: 0xf42, 0x3fd6: 0xf43, 0x3fd7: 0xf44, + 0x3fd8: 0xf45, 0x3fd9: 0xf46, 0x3fda: 0xf47, 0x3fdb: 0xf48, 0x3fdc: 0xf49, 0x3fdd: 0xf4a, 0x3fde: 0xf4b, 0x3fdf: 0xf4c, + 0x3fe0: 0xf4d, + // Block 0x100, offset 0x4000 + 0x4020: 0xf4e, 0x4021: 0xf4f, 0x4022: 0xf50, 0x4023: 0xf51, 0x4024: 0xf52, 0x4025: 0xf53, 0x4026: 0xf54, 0x4027: 0xf55, + 0x4028: 0xf56, + // Block 0x101, offset 0x4040 + 0x4050: 0x09, 0x4051: 0x0a, 0x4052: 0x0b, 0x4053: 0x0c, 0x4056: 0x0d, + 0x405b: 0x0e, 0x405d: 0x0f, 0x405e: 0x10, 0x405f: 0xf1, + 0x4060: 0xf2, 0x4061: 0xf3, 0x4062: 0xf4, 0x4063: 0xf5, 0x4064: 0xf6, 0x4065: 0xf7, 0x4066: 0xf8, 0x4067: 0xf9, + 0x4068: 0xfa, 0x4069: 0xfb, 0x406a: 0xfc, 0x406b: 0xfd, 0x406f: 0xfe, + // Block 0x102, offset 0x4080 + 0x4082: 0x01, 0x4083: 0x618, 0x4084: 0x619, 0x4085: 0x61a, 0x4086: 0x05, 0x4087: 0x61b, + 0x4088: 0x61c, 0x4089: 0x08, 0x408a: 0x09, 0x408b: 0x0a, 0x408c: 0x0b, 0x408d: 0x0c, 0x408e: 0x0d, 0x408f: 0x0e, + 0x4090: 0x0f, 0x4091: 0x10, 0x4092: 0x11, 0x4093: 0x12, 0x4094: 0x13, 0x4095: 0x14, 0x4096: 0x15, 0x4097: 0x16, + 0x4098: 0x17, 0x4099: 0x18, 0x409a: 0x19, 0x409b: 0x1a, 0x409c: 0x1b, 0x409d: 0x1c, 0x409e: 0x1d, 0x409f: 0x1e, + 0x40a0: 0x01, 0x40a1: 0xce, 0x40a2: 0xe8, 0x40a3: 0xe9, 0x40a4: 0xea, 0x40a5: 0xeb, 0x40a6: 0xec, 0x40a7: 0xed, + 0x40a8: 0xee, 0x40a9: 0xef, 0x40aa: 0x06, 0x40ad: 0x07, 0x40af: 0xf0, + 0x40b0: 0xff, 0x40b3: 0x15, +} + +// mainCTEntries: 2529 entries, 10116 bytes +var mainCTEntries = [2529]struct{ L, H, N, I uint8 }{ + {0xCE, 0x1, 1, 255}, + {0xC2, 0x0, 1, 255}, + {0xB7, 0xB7, 0, 1}, + {0x87, 0x87, 0, 2}, + {0xCC, 0x0, 2, 255}, + {0x88, 0x88, 0, 2}, + {0x86, 0x86, 0, 1}, + {0xCC, 0x0, 1, 255}, + {0x88, 0x88, 0, 1}, + {0xCD, 0x1, 1, 255}, + {0xCC, 0x0, 1, 255}, + {0x81, 0x81, 0, 1}, + {0x81, 0x81, 0, 2}, + {0xCC, 0x0, 1, 255}, + {0x86, 0x86, 0, 1}, + {0xCC, 0x0, 3, 255}, + {0x8B, 0x8B, 0, 3}, + {0x88, 0x88, 0, 2}, + {0x86, 0x86, 0, 1}, + {0xCC, 0x0, 1, 255}, + {0x8F, 0x8F, 0, 1}, + {0xD9, 0x0, 1, 255}, + {0x93, 0x95, 0, 1}, + {0xD9, 0x0, 1, 255}, + {0x94, 0x94, 0, 1}, + {0xE0, 0x0, 2, 255}, + {0xA7, 0x1, 1, 255}, + {0xA6, 0x0, 1, 255}, + {0xBE, 0xBE, 0, 1}, + {0x97, 0x97, 0, 2}, + {0xE0, 0x0, 2, 255}, + {0xAD, 0x1, 1, 255}, + {0xAC, 0x0, 1, 255}, + {0xBE, 0xBE, 0, 1}, + {0x96, 0x97, 0, 2}, + {0xE0, 0x0, 1, 255}, + {0xAF, 0x0, 1, 255}, + {0x97, 0x97, 0, 1}, + {0xE0, 0x0, 2, 255}, + {0xAF, 0x1, 1, 255}, + {0xAE, 0x0, 1, 255}, + {0xBE, 0xBE, 0, 1}, + {0x97, 0x97, 0, 2}, + {0xE0, 0x0, 1, 255}, + {0xAE, 0x0, 1, 255}, + {0xBE, 0xBE, 0, 1}, + {0xE0, 0x0, 1, 255}, + {0xB1, 0x0, 1, 255}, + {0x96, 0x96, 0, 1}, + {0xE0, 0x0, 1, 255}, + {0xB3, 0x0, 1, 255}, + {0x95, 0x95, 0, 1}, + {0xE0, 0x0, 1, 255}, + {0xB3, 0x0, 2, 255}, + {0x95, 0x96, 0, 3}, + {0x82, 0x0, 1, 2}, + {0xE0, 0x0, 1, 255}, + {0xB3, 0x0, 1, 255}, + {0x95, 0x95, 0, 1}, + {0xE0, 0x0, 2, 255}, + {0xB5, 0x1, 1, 255}, + {0xB4, 0x0, 1, 255}, + {0xBE, 0xBE, 0, 1}, + {0x97, 0x97, 0, 2}, + {0xE0, 0x0, 1, 255}, + {0xB4, 0x0, 1, 255}, + {0xBE, 0xBE, 0, 1}, + {0xE0, 0x0, 1, 255}, + {0xB7, 0x0, 3, 255}, + {0x9F, 0x9F, 0, 4}, + {0x8F, 0x0, 1, 3}, + {0x8A, 0x8A, 0, 2}, + {0xE0, 0x0, 1, 255}, + {0xB7, 0x0, 1, 255}, + {0x8A, 0x8A, 0, 1}, + {0xE0, 0x0, 1, 255}, + {0xB7, 0x0, 1, 255}, + {0x8A, 0x8A, 0, 1}, + {0xE0, 0x0, 1, 255}, + {0xB8, 0x0, 1, 255}, + {0x81, 0xAE, 0, 1}, + {0xE0, 0x0, 1, 255}, + {0xB8, 0x0, 1, 255}, + {0xB2, 0xB2, 0, 1}, + {0xE0, 0x0, 2, 255}, + {0xBB, 0xC, 1, 255}, + {0xBA, 0x0, 12, 255}, + {0xAD, 0xAE, 0, 26}, + {0xAA, 0xAB, 0, 24}, + {0xA7, 0xA7, 0, 23}, + {0xA5, 0xA5, 0, 22}, + {0xA1, 0xA3, 0, 19}, + {0x99, 0x9F, 0, 12}, + {0x94, 0x97, 0, 8}, + {0x8D, 0x8D, 0, 7}, + {0x8A, 0x8A, 0, 6}, + {0x87, 0x88, 0, 4}, + {0x84, 0x84, 0, 3}, + {0x81, 0x82, 0, 1}, + {0x9C, 0x9F, 0, 28}, + {0xE0, 0x0, 1, 255}, + {0xBA, 0x0, 1, 255}, + {0xB2, 0xB2, 0, 1}, + {0xEA, 0x0, 1, 255}, + {0xAA, 0x0, 1, 255}, + {0x80, 0xAF, 0, 1}, + {0xE0, 0x0, 2, 255}, + {0xBE, 0x7, 1, 255}, + {0xBD, 0x0, 1, 255}, + {0xB1, 0x0, 1, 255}, + {0xE0, 0x0, 2, 255}, + {0xBE, 0x2, 1, 255}, + {0xBD, 0x0, 2, 255}, + {0xB4, 0xB4, 0, 2}, + {0xB2, 0xB2, 0, 1}, + {0x80, 0x80, 0, 3}, + {0x80, 0x81, 0, 4}, + {0xE0, 0x0, 2, 255}, + {0xBE, 0x2, 1, 255}, + {0xBD, 0x0, 2, 255}, + {0xB4, 0xB4, 0, 2}, + {0xB2, 0xB2, 0, 1}, + {0x80, 0x80, 0, 3}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xAE, 0xAE, 0, 1}, + {0xF0, 0x0, 1, 255}, + {0x91, 0x0, 1, 255}, + {0x84, 0x0, 1, 255}, + {0xA7, 0xA7, 0, 1}, + {0xE1, 0x0, 1, 255}, + {0xAC, 0x0, 1, 255}, + {0xB5, 0xB5, 0, 1}, + {0xE0, 0x0, 1, 255}, + {0xA7, 0x0, 1, 255}, + {0x8D, 0x0, 1, 255}, + {0xE2, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0x8D, 0x8D, 0, 1}, + {0xE0, 0x0, 1, 255}, + {0xA7, 0x0, 1, 255}, + {0x8D, 0x0, 1, 255}, + {0xE0, 0x0, 1, 255}, + {0xA6, 0x0, 1, 255}, + {0xB7, 0xB7, 0, 1}, + {0xCC, 0x0, 1, 255}, + {0xA7, 0xA7, 0, 1}, + {0xCC, 0x0, 1, 255}, + {0x87, 0x87, 0, 1}, + {0xCC, 0x0, 1, 255}, + {0x68, 0x68, 0, 3}, + {0x48, 0x48, 0, 2}, + {0x8C, 0x8C, 0, 1}, + {0xCC, 0x0, 1, 255}, + {0x8C, 0x8C, 0, 1}, + {0x68, 0x68, 0, 1}, + {0x68, 0x68, 0, 2}, + {0x48, 0x48, 0, 1}, + {0x64, 0x64, 0, 1}, + {0x64, 0x64, 0, 2}, + {0x44, 0x44, 0, 1}, + {0x66, 0x66, 0, 1}, + {0x66, 0x66, 0, 2}, + {0x46, 0x46, 0, 1}, + {0x67, 0x67, 0, 1}, + {0x67, 0x67, 0, 2}, + {0x47, 0x47, 0, 1}, + {0xCE, 0x1, 1, 255}, + {0xC2, 0x0, 1, 255}, + {0x6C, 0x6C, 0, 3}, + {0xB7, 0xB7, 0, 1}, + {0x87, 0x87, 0, 2}, + {0xCE, 0x1, 1, 255}, + {0xC2, 0x0, 1, 255}, + {0x6C, 0x6C, 0, 4}, + {0x4C, 0x4C, 0, 3}, + {0xB7, 0xB7, 0, 1}, + {0x87, 0x87, 0, 2}, + {0xCC, 0x0, 2, 255}, + {0x8B, 0x8B, 0, 2}, + {0x88, 0x88, 0, 1}, + {0xCC, 0x0, 2, 255}, + {0x61, 0x61, 0, 3}, + {0x8A, 0x8A, 0, 2}, + {0x88, 0x88, 0, 1}, + {0xCC, 0x0, 2, 255}, + {0x61, 0x61, 0, 4}, + {0x41, 0x41, 0, 3}, + {0x8A, 0x8A, 0, 2}, + {0x88, 0x88, 0, 1}, + {0xCC, 0x0, 1, 255}, + {0xA8, 0xA8, 0, 1}, + {0xE0, 0x0, 1, 255}, + {0xBE, 0x0, 1, 255}, + {0x90, 0x91, 0, 1}, + {0xE0, 0x0, 1, 255}, + {0xBD, 0x0, 6, 255}, + {0x98, 0x42, 1, 255}, + {0x96, 0x31, 1, 255}, + {0x94, 0x1B, 1, 255}, + {0x84, 0x11, 1, 255}, + {0x82, 0x0, 1, 255}, + {0x80, 0x80, 0, 73}, + {0xE0, 0x0, 2, 255}, + {0xBE, 0xD, 1, 255}, + {0xBD, 0x0, 13, 255}, + {0xBC, 0xBC, 0, 20}, + {0xBA, 0xBA, 0, 19}, + {0xB4, 0xB4, 0, 18}, + {0xA6, 0xA6, 0, 17}, + {0xA2, 0xA3, 0, 15}, + {0xA0, 0xA0, 0, 14}, + {0x9D, 0x9D, 0, 13}, + {0x96, 0x96, 0, 12}, + {0x91, 0x91, 0, 11}, + {0x8C, 0x8C, 0, 10}, + {0x8A, 0x8A, 0, 9}, + {0x84, 0x84, 0, 8}, + {0x82, 0x82, 0, 7}, + {0xB1, 0xB2, 0, 21}, + {0xE0, 0x0, 1, 255}, + {0xBD, 0x0, 8, 255}, + {0xBC, 0xBC, 0, 30}, + {0xB4, 0xB4, 0, 29}, + {0xA2, 0xA2, 0, 28}, + {0x93, 0x93, 0, 27}, + {0x8C, 0x8C, 0, 26}, + {0x8A, 0x8A, 0, 25}, + {0x84, 0x84, 0, 24}, + {0x82, 0x82, 0, 23}, + {0xE0, 0x0, 2, 255}, + {0xBE, 0x12, 1, 255}, + {0xBD, 0x0, 11, 255}, + {0xBC, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 41}, + {0xB4, 0xB4, 0, 40}, + {0xA6, 0xA6, 0, 39}, + {0xA2, 0xA3, 0, 37}, + {0xA0, 0xA0, 0, 36}, + {0x91, 0x91, 0, 35}, + {0x8C, 0x8C, 0, 34}, + {0x8A, 0x8A, 0, 33}, + {0x84, 0x84, 0, 32}, + {0x82, 0x82, 0, 31}, + {0xE0, 0x0, 1, 255}, + {0xBD, 0x0, 5, 255}, + {0xA2, 0xA2, 0, 5}, + {0x93, 0x93, 0, 4}, + {0x91, 0x91, 0, 3}, + {0x84, 0x84, 0, 2}, + {0x82, 0x82, 0, 1}, + {0xB1, 0xB2, 0, 42}, + {0xE0, 0x0, 2, 255}, + {0xBE, 0xD, 1, 255}, + {0xBD, 0x0, 13, 255}, + {0xBC, 0xBC, 0, 57}, + {0xBA, 0xBA, 0, 56}, + {0xB4, 0xB4, 0, 55}, + {0xA6, 0xA6, 0, 54}, + {0xA2, 0xA3, 0, 52}, + {0xA0, 0xA0, 0, 51}, + {0x96, 0x96, 0, 50}, + {0x93, 0x93, 0, 49}, + {0x91, 0x91, 0, 48}, + {0x8C, 0x8C, 0, 47}, + {0x8A, 0x8A, 0, 46}, + {0x84, 0x84, 0, 45}, + {0x82, 0x82, 0, 44}, + {0xB1, 0xB2, 0, 58}, + {0xE0, 0x0, 2, 255}, + {0xBE, 0x10, 1, 255}, + {0xBD, 0x0, 13, 255}, + {0xBC, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 71}, + {0xB4, 0xB4, 0, 70}, + {0xB2, 0xB2, 0, 69}, + {0xA6, 0xA6, 0, 68}, + {0xA2, 0xA2, 0, 67}, + {0xA0, 0xA0, 0, 66}, + {0x9D, 0x9D, 0, 65}, + {0x93, 0x93, 0, 64}, + {0x8C, 0x8C, 0, 63}, + {0x8A, 0x8A, 0, 62}, + {0x84, 0x84, 0, 61}, + {0x82, 0x82, 0, 60}, + {0xE0, 0x0, 1, 255}, + {0xBD, 0x0, 1, 255}, + {0x91, 0x91, 0, 6}, + {0xB1, 0xB1, 0, 72}, + {0xE0, 0x0, 1, 255}, + {0xBD, 0x0, 11, 255}, + {0xA6, 0x2E, 1, 255}, + {0xA4, 0xA4, 0, 72}, + {0xA3, 0x29, 1, 255}, + {0xA2, 0x1C, 1, 255}, + {0x9E, 0x9F, 0, 70}, + {0x99, 0x99, 0, 69}, + {0x91, 0xF, 1, 255}, + {0x8F, 0x8F, 0, 68}, + {0x85, 0x85, 0, 67}, + {0x82, 0x0, 1, 255}, + {0x80, 0x80, 0, 66}, + {0xE0, 0x0, 2, 255}, + {0xBE, 0xB, 1, 255}, + {0xBD, 0x0, 11, 255}, + {0xBE, 0xBE, 0, 11}, + {0xBC, 0xBC, 0, 10}, + {0xBA, 0xBA, 0, 9}, + {0xA2, 0xA2, 0, 8}, + {0xA0, 0xA0, 0, 7}, + {0x9D, 0x9D, 0, 6}, + {0x98, 0x98, 0, 5}, + {0x91, 0x91, 0, 4}, + {0x8C, 0x8C, 0, 3}, + {0x8A, 0x8A, 0, 2}, + {0x82, 0x82, 0, 1}, + {0xB1, 0xB3, 0, 12}, + {0xE0, 0x0, 1, 255}, + {0xBD, 0x0, 11, 255}, + {0xBE, 0xBE, 0, 26}, + {0xBC, 0xBC, 0, 25}, + {0xBA, 0xBA, 0, 24}, + {0xB4, 0xB4, 0, 23}, + {0xA6, 0xA6, 0, 22}, + {0xA2, 0xA3, 0, 20}, + {0xA0, 0xA0, 0, 19}, + {0x98, 0x98, 0, 18}, + {0x8C, 0x8C, 0, 17}, + {0x8A, 0x8A, 0, 16}, + {0x82, 0x82, 0, 15}, + {0xE0, 0x0, 1, 255}, + {0xBE, 0x0, 11, 255}, + {0xB3, 0xB3, 0, 37}, + {0xAB, 0xAB, 0, 36}, + {0xA9, 0xA9, 0, 35}, + {0xA3, 0xA3, 0, 34}, + {0xA1, 0xA1, 0, 33}, + {0x9F, 0x9F, 0, 32}, + {0x99, 0x99, 0, 31}, + {0x97, 0x97, 0, 30}, + {0x94, 0x94, 0, 29}, + {0x92, 0x92, 0, 28}, + {0x90, 0x90, 0, 27}, + {0xE0, 0x0, 1, 255}, + {0xBE, 0x0, 3, 255}, + {0xA1, 0xA1, 0, 40}, + {0x9F, 0x9F, 0, 39}, + {0x95, 0x95, 0, 38}, + {0xE0, 0x0, 2, 255}, + {0xBE, 0xD, 10, 255}, + {0xBD, 0x0, 13, 255}, + {0xBE, 0xBE, 0, 54}, + {0xBC, 0xBC, 0, 53}, + {0xBA, 0xBA, 0, 52}, + {0xB4, 0xB4, 0, 51}, + {0xB2, 0xB2, 0, 50}, + {0xA2, 0xA3, 0, 48}, + {0x98, 0x98, 0, 47}, + {0x96, 0x96, 0, 46}, + {0x91, 0x91, 0, 45}, + {0x8C, 0x8C, 0, 44}, + {0x8A, 0x8A, 0, 43}, + {0x84, 0x84, 0, 42}, + {0x82, 0x82, 0, 41}, + {0xB2, 0xB3, 0, 64}, + {0xAD, 0xAD, 0, 63}, + {0xA9, 0xA9, 0, 62}, + {0xA3, 0xA3, 0, 61}, + {0xA1, 0xA1, 0, 60}, + {0x9F, 0x9F, 0, 59}, + {0x99, 0x99, 0, 58}, + {0x94, 0x94, 0, 57}, + {0x92, 0x92, 0, 56}, + {0x90, 0x90, 0, 55}, + {0xE0, 0x0, 1, 255}, + {0xBE, 0x0, 11, 255}, + {0xAB, 0xAB, 0, 12}, + {0xA8, 0xA9, 0, 10}, + {0xA6, 0xA6, 0, 9}, + {0xA3, 0xA3, 0, 8}, + {0xA1, 0xA1, 0, 7}, + {0x9F, 0x9F, 0, 6}, + {0x99, 0x99, 0, 5}, + {0x97, 0x97, 0, 4}, + {0x94, 0x94, 0, 3}, + {0x92, 0x92, 0, 2}, + {0x90, 0x90, 0, 1}, + {0xE0, 0x0, 1, 255}, + {0xBE, 0x0, 9, 255}, + {0xB7, 0xB7, 0, 10}, + {0xA6, 0xA6, 0, 9}, + {0xA4, 0xA4, 0, 8}, + {0xA1, 0xA1, 0, 7}, + {0x9F, 0x9F, 0, 6}, + {0x97, 0x97, 0, 5}, + {0x94, 0x95, 0, 3}, + {0x92, 0x92, 0, 2}, + {0x90, 0x90, 0, 1}, + {0xE0, 0x0, 1, 255}, + {0xBD, 0x0, 9, 255}, + {0x9A, 0x9B, 0, 45}, + {0x93, 0x1D, 1, 255}, + {0x91, 0x11, 1, 255}, + {0x90, 0x90, 0, 44}, + {0x89, 0x89, 0, 43}, + {0x86, 0x87, 0, 41}, + {0x84, 0x8, 1, 255}, + {0x82, 0x0, 1, 255}, + {0x81, 0x81, 0, 40}, + {0xE0, 0x0, 2, 255}, + {0xBE, 0x4, 1, 255}, + {0xBD, 0x0, 4, 255}, + {0xBC, 0xBC, 0, 5}, + {0xBA, 0xBA, 0, 4}, + {0xB4, 0xB4, 0, 3}, + {0xA2, 0xA3, 0, 1}, + {0xB1, 0xB2, 0, 6}, + {0xE0, 0x0, 1, 255}, + {0xBD, 0x0, 7, 255}, + {0xBC, 0xBC, 0, 15}, + {0xA2, 0xA3, 0, 13}, + {0xA0, 0xA0, 0, 12}, + {0x93, 0x93, 0, 11}, + {0x8C, 0x8C, 0, 10}, + {0x8A, 0x8A, 0, 9}, + {0x82, 0x82, 0, 8}, + {0xE0, 0x0, 1, 255}, + {0xBD, 0x0, 10, 255}, + {0xBC, 0xBC, 0, 25}, + {0xBA, 0xBA, 0, 24}, + {0xB4, 0xB4, 0, 23}, + {0xA2, 0xA2, 0, 22}, + {0xA0, 0xA0, 0, 21}, + {0x93, 0x93, 0, 20}, + {0x8C, 0x8C, 0, 19}, + {0x8A, 0x8A, 0, 18}, + {0x84, 0x84, 0, 17}, + {0x82, 0x82, 0, 16}, + {0xE0, 0x0, 1, 255}, + {0xBD, 0x0, 13, 255}, + {0xBE, 0xBE, 0, 39}, + {0xBC, 0xBC, 0, 38}, + {0xBA, 0xBA, 0, 37}, + {0xB4, 0xB4, 0, 36}, + {0xA2, 0xA3, 0, 34}, + {0xA0, 0xA0, 0, 33}, + {0x98, 0x98, 0, 32}, + {0x96, 0x96, 0, 31}, + {0x93, 0x93, 0, 30}, + {0x8C, 0x8C, 0, 29}, + {0x8A, 0x8A, 0, 28}, + {0x84, 0x84, 0, 27}, + {0x82, 0x82, 0, 26}, + {0xE0, 0x0, 1, 255}, + {0xBE, 0x0, 9, 255}, + {0xA8, 0xA9, 0, 10}, + {0xA6, 0xA6, 0, 9}, + {0xA3, 0xA4, 0, 7}, + {0xA1, 0xA1, 0, 6}, + {0x9F, 0x9F, 0, 5}, + {0x99, 0x99, 0, 4}, + {0x94, 0x94, 0, 3}, + {0x92, 0x92, 0, 2}, + {0x90, 0x90, 0, 1}, + {0xE0, 0x0, 1, 255}, + {0xBD, 0x0, 8, 255}, + {0x9A, 0x9B, 0, 62}, + {0x96, 0x29, 1, 255}, + {0x95, 0x95, 0, 61}, + {0x91, 0x14, 1, 255}, + {0x90, 0x90, 0, 60}, + {0x86, 0x87, 0, 58}, + {0x82, 0x0, 1, 255}, + {0x81, 0x81, 0, 57}, + {0xE0, 0x0, 2, 255}, + {0xBE, 0x10, 1, 255}, + {0xBD, 0x0, 16, 255}, + {0xBE, 0xBE, 0, 17}, + {0xBC, 0xBC, 0, 16}, + {0xBA, 0xBA, 0, 15}, + {0xB4, 0xB4, 0, 14}, + {0xB2, 0xB2, 0, 13}, + {0xA6, 0xA6, 0, 12}, + {0xA2, 0xA3, 0, 10}, + {0xA0, 0xA0, 0, 9}, + {0x98, 0x98, 0, 8}, + {0x96, 0x96, 0, 7}, + {0x93, 0x93, 0, 6}, + {0x91, 0x91, 0, 5}, + {0x8C, 0x8C, 0, 4}, + {0x8A, 0x8A, 0, 3}, + {0x84, 0x84, 0, 2}, + {0x82, 0x82, 0, 1}, + {0xB1, 0xB2, 0, 18}, + {0xE0, 0x0, 2, 255}, + {0xBE, 0x11, 1, 255}, + {0xBD, 0x0, 17, 255}, + {0xBE, 0xBE, 0, 37}, + {0xBC, 0xBC, 0, 36}, + {0xBA, 0xBA, 0, 35}, + {0xB4, 0xB4, 0, 34}, + {0xB2, 0xB2, 0, 33}, + {0xA6, 0xA6, 0, 32}, + {0xA2, 0xA3, 0, 30}, + {0xA0, 0xA0, 0, 29}, + {0x9D, 0x9D, 0, 28}, + {0x98, 0x98, 0, 27}, + {0x96, 0x96, 0, 26}, + {0x93, 0x93, 0, 25}, + {0x91, 0x91, 0, 24}, + {0x8C, 0x8C, 0, 23}, + {0x8A, 0x8A, 0, 22}, + {0x84, 0x84, 0, 21}, + {0x82, 0x82, 0, 20}, + {0xB2, 0xB2, 0, 38}, + {0xE0, 0x0, 2, 255}, + {0xBE, 0xF, 1, 255}, + {0xBD, 0x0, 15, 255}, + {0xBE, 0xBE, 0, 54}, + {0xBC, 0xBC, 0, 53}, + {0xBA, 0xBA, 0, 52}, + {0xB4, 0xB4, 0, 51}, + {0xB2, 0xB2, 0, 50}, + {0xA2, 0xA3, 0, 48}, + {0xA0, 0xA0, 0, 47}, + {0x98, 0x98, 0, 46}, + {0x96, 0x96, 0, 45}, + {0x93, 0x93, 0, 44}, + {0x91, 0x91, 0, 43}, + {0x8C, 0x8C, 0, 42}, + {0x8A, 0x8A, 0, 41}, + {0x84, 0x84, 0, 40}, + {0x82, 0x82, 0, 39}, + {0xB1, 0xB2, 0, 55}, + {0xE0, 0x0, 1, 255}, + {0xBD, 0x0, 10, 255}, + {0xA6, 0x20, 1, 255}, + {0xA4, 0xA4, 0, 52}, + {0xA1, 0xA1, 0, 51}, + {0x9E, 0x9F, 0, 49}, + {0x99, 0x99, 0, 48}, + {0x93, 0x11, 1, 255}, + {0x91, 0x0, 1, 255}, + {0x8F, 0x8F, 0, 47}, + {0x89, 0x89, 0, 46}, + {0x85, 0x85, 0, 45}, + {0xE0, 0x0, 1, 255}, + {0xBD, 0x0, 15, 255}, + {0xBE, 0xBE, 0, 16}, + {0xBC, 0xBC, 0, 15}, + {0xBA, 0xBA, 0, 14}, + {0xB4, 0xB4, 0, 13}, + {0xB2, 0xB2, 0, 12}, + {0xA6, 0xA6, 0, 11}, + {0xA2, 0xA3, 0, 9}, + {0xA0, 0xA0, 0, 8}, + {0x98, 0x98, 0, 7}, + {0x96, 0x96, 0, 6}, + {0x93, 0x93, 0, 5}, + {0x8C, 0x8C, 0, 4}, + {0x8A, 0x8A, 0, 3}, + {0x84, 0x84, 0, 2}, + {0x82, 0x82, 0, 1}, + {0xE0, 0x0, 1, 255}, + {0xBD, 0x0, 13, 255}, + {0xBE, 0xBE, 0, 29}, + {0xBC, 0xBC, 0, 28}, + {0xB4, 0xB4, 0, 27}, + {0xA6, 0xA6, 0, 26}, + {0xA0, 0xA0, 0, 25}, + {0x9D, 0x9D, 0, 24}, + {0x98, 0x98, 0, 23}, + {0x93, 0x93, 0, 22}, + {0x91, 0x91, 0, 21}, + {0x8C, 0x8C, 0, 20}, + {0x8A, 0x8A, 0, 19}, + {0x84, 0x84, 0, 18}, + {0x82, 0x82, 0, 17}, + {0xE0, 0x0, 1, 255}, + {0xBD, 0x0, 14, 255}, + {0xBC, 0xBC, 0, 44}, + {0xBA, 0xBA, 0, 43}, + {0xB4, 0xB4, 0, 42}, + {0xB2, 0xB2, 0, 41}, + {0xA6, 0xA6, 0, 40}, + {0xA2, 0xA3, 0, 38}, + {0xA0, 0xA0, 0, 37}, + {0x96, 0x96, 0, 36}, + {0x93, 0x93, 0, 35}, + {0x91, 0x91, 0, 34}, + {0x8C, 0x8C, 0, 33}, + {0x8A, 0x8A, 0, 32}, + {0x84, 0x84, 0, 31}, + {0x82, 0x82, 0, 30}, + {0xE0, 0x0, 1, 255}, + {0xBE, 0x0, 1, 255}, + {0x99, 0x99, 0, 1}, + {0xE0, 0x0, 1, 255}, + {0xBE, 0x0, 1, 255}, + {0xA4, 0xA5, 0, 1}, + {0xE0, 0x0, 2, 255}, + {0xBE, 0x9, 1, 255}, + {0xBD, 0x0, 3, 255}, + {0xB5, 0xB5, 0, 6}, + {0xB3, 0xB3, 0, 5}, + {0xB1, 0x0, 1, 4}, + {0xE0, 0x0, 2, 255}, + {0xBE, 0x2, 1, 255}, + {0xBD, 0x0, 2, 255}, + {0xB4, 0xB4, 0, 2}, + {0xB2, 0xB2, 0, 1}, + {0x80, 0x80, 0, 3}, + {0x80, 0x81, 0, 7}, + {0x7A, 0x7A, 0, 1}, + {0x7A, 0x7A, 0, 2}, + {0x5A, 0x5A, 0, 1}, + {0x62, 0x62, 0, 1}, + {0x62, 0x62, 0, 2}, + {0x42, 0x42, 0, 1}, + {0x70, 0x70, 0, 1}, + {0x70, 0x70, 0, 2}, + {0x50, 0x50, 0, 1}, + {0x79, 0x79, 0, 1}, + {0x79, 0x79, 0, 2}, + {0x59, 0x59, 0, 1}, + {0x73, 0x73, 0, 1}, + {0x73, 0x73, 0, 2}, + {0x53, 0x53, 0, 1}, + {0xCC, 0x0, 1, 255}, + {0x82, 0x82, 0, 1}, + {0xCC, 0x0, 1, 255}, + {0x83, 0x83, 0, 1}, + {0xCC, 0x0, 2, 255}, + {0x88, 0x88, 0, 2}, + {0x83, 0x83, 0, 1}, + {0xCC, 0x0, 2, 255}, + {0x8A, 0x8A, 0, 2}, + {0x88, 0x88, 0, 1}, + {0xCC, 0x0, 3, 255}, + {0x8B, 0x8B, 0, 3}, + {0x88, 0x88, 0, 2}, + {0x83, 0x83, 0, 1}, + {0xCC, 0x0, 1, 255}, + {0x67, 0x67, 0, 2}, + {0x83, 0x83, 0, 1}, + {0xCC, 0x0, 1, 255}, + {0x67, 0x67, 0, 3}, + {0x47, 0x47, 0, 2}, + {0x83, 0x83, 0, 1}, + {0xCC, 0x0, 2, 255}, + {0x8C, 0x8C, 0, 2}, + {0x81, 0x81, 0, 1}, + {0xC5, 0x2, 1, 255}, + {0x7A, 0x0, 1, 255}, + {0xCC, 0x0, 1, 255}, + {0x8C, 0x8C, 0, 1}, + {0xBE, 0xBE, 0, 2}, + {0xC5, 0x4, 1, 255}, + {0x7A, 0x2, 1, 255}, + {0x5A, 0x0, 1, 255}, + {0xCC, 0x0, 1, 255}, + {0x8C, 0x8C, 0, 1}, + {0xCC, 0x0, 1, 255}, + {0x8C, 0x8C, 0, 2}, + {0xBD, 0xBE, 0, 3}, + {0xCE, 0x1, 1, 255}, + {0xC2, 0x0, 1, 255}, + {0x6A, 0x6A, 0, 3}, + {0xB7, 0xB7, 0, 1}, + {0x87, 0x87, 0, 2}, + {0xCE, 0x1, 1, 255}, + {0xC2, 0x0, 1, 255}, + {0x6A, 0x6A, 0, 4}, + {0x4A, 0x4A, 0, 3}, + {0xB7, 0xB7, 0, 1}, + {0x87, 0x87, 0, 2}, + {0x6A, 0x6A, 0, 1}, + {0x6A, 0x6A, 0, 2}, + {0x4A, 0x4A, 0, 1}, + {0x73, 0x73, 0, 2}, + {0x63, 0x0, 1, 255}, + {0x73, 0x73, 0, 1}, + {0x73, 0x73, 0, 4}, + {0x63, 0x1, 1, 255}, + {0x53, 0x53, 0, 3}, + {0x43, 0x0, 1, 255}, + {0x53, 0x53, 0, 1}, + {0x73, 0x73, 0, 2}, + {0x7A, 0x2, 1, 4}, + {0x64, 0x0, 1, 255}, + {0x7A, 0x0, 1, 2}, + {0x73, 0x73, 0, 1}, + {0x73, 0x73, 0, 3}, + {0x7A, 0x5, 1, 8}, + {0x64, 0x3, 1, 255}, + {0x5A, 0x2, 1, 7}, + {0x44, 0x0, 1, 255}, + {0x5A, 0x0, 1, 3}, + {0x53, 0x53, 0, 1}, + {0x53, 0x53, 0, 4}, + {0x7A, 0x0, 1, 5}, + {0x73, 0x73, 0, 2}, + {0x73, 0x73, 0, 6}, + {0x79, 0x79, 0, 2}, + {0x67, 0x0, 1, 255}, + {0x79, 0x79, 0, 1}, + {0x79, 0x79, 0, 4}, + {0x67, 0x1, 1, 255}, + {0x59, 0x59, 0, 3}, + {0x47, 0x0, 1, 255}, + {0x59, 0x59, 0, 1}, + {0x79, 0x79, 0, 2}, + {0xCE, 0x2, 1, 255}, + {0xC2, 0x1, 1, 255}, + {0x79, 0x79, 0, 4}, + {0x6C, 0x0, 1, 255}, + {0x79, 0x79, 0, 1}, + {0xB7, 0xB7, 0, 2}, + {0x87, 0x87, 0, 3}, + {0xCE, 0x3, 1, 255}, + {0xC2, 0x2, 1, 255}, + {0x79, 0x79, 0, 6}, + {0x6C, 0x1, 1, 255}, + {0x59, 0x59, 0, 5}, + {0x4C, 0x0, 1, 255}, + {0x59, 0x59, 0, 1}, + {0x79, 0x79, 0, 2}, + {0xB7, 0xB7, 0, 3}, + {0x87, 0x87, 0, 4}, + {0x79, 0x79, 0, 2}, + {0x6E, 0x0, 1, 255}, + {0x79, 0x79, 0, 1}, + {0x79, 0x79, 0, 4}, + {0x6E, 0x1, 1, 255}, + {0x59, 0x59, 0, 3}, + {0x4E, 0x0, 1, 255}, + {0x59, 0x59, 0, 1}, + {0x79, 0x79, 0, 2}, + {0x7A, 0x7A, 0, 2}, + {0x73, 0x0, 1, 255}, + {0x7A, 0x7A, 0, 1}, + {0x7A, 0x7A, 0, 4}, + {0x73, 0x1, 1, 255}, + {0x5A, 0x5A, 0, 3}, + {0x53, 0x0, 1, 255}, + {0x5A, 0x5A, 0, 1}, + {0x7A, 0x7A, 0, 2}, + {0x79, 0x79, 0, 2}, + {0x74, 0x0, 1, 255}, + {0x79, 0x79, 0, 1}, + {0x79, 0x79, 0, 4}, + {0x74, 0x1, 1, 255}, + {0x59, 0x59, 0, 3}, + {0x54, 0x0, 1, 255}, + {0x59, 0x59, 0, 1}, + {0x79, 0x79, 0, 2}, + {0x7A, 0x0, 1, 255}, + {0x73, 0x73, 0, 2}, + {0x73, 0x73, 0, 1}, + {0x7A, 0x1, 1, 255}, + {0x73, 0x73, 0, 4}, + {0x5A, 0x0, 1, 255}, + {0x53, 0x53, 0, 3}, + {0x53, 0x53, 0, 1}, + {0x73, 0x73, 0, 2}, + {0xD6, 0x0, 1, 255}, + {0x82, 0x82, 0, 1}, + {0x77, 0x77, 0, 3}, + {0x68, 0x68, 0, 2}, + {0x62, 0x62, 0, 1}, + {0x77, 0x77, 0, 6}, + {0x68, 0x68, 0, 5}, + {0x62, 0x62, 0, 4}, + {0x57, 0x57, 0, 3}, + {0x48, 0x48, 0, 2}, + {0x42, 0x42, 0, 1}, + {0xCC, 0x0, 1, 255}, + {0xA3, 0xA3, 0, 1}, + {0x77, 0x77, 0, 2}, + {0x70, 0x70, 0, 1}, + {0x77, 0x77, 0, 4}, + {0x70, 0x70, 0, 3}, + {0x57, 0x57, 0, 2}, + {0x50, 0x50, 0, 1}, + {0xCC, 0x0, 1, 255}, + {0x79, 0x79, 0, 3}, + {0x77, 0x77, 0, 2}, + {0x87, 0x87, 0, 1}, + {0xCC, 0x0, 1, 255}, + {0x79, 0x79, 0, 5}, + {0x77, 0x77, 0, 4}, + {0x59, 0x59, 0, 3}, + {0x57, 0x57, 0, 2}, + {0x87, 0x87, 0, 1}, + {0xCC, 0x0, 3, 255}, + {0x8A, 0x8A, 0, 3}, + {0x88, 0x88, 0, 2}, + {0x81, 0x81, 0, 1}, + {0xCC, 0x0, 1, 255}, + {0x81, 0x81, 0, 1}, + {0xCC, 0x0, 2, 255}, + {0x88, 0x88, 0, 2}, + {0x81, 0x81, 0, 1}, + {0xE3, 0x0, 2, 255}, + {0x83, 0x1, 1, 255}, + {0x82, 0x0, 1, 255}, + {0x9D, 0x9D, 0, 1}, + {0xBC, 0xBC, 0, 2}, + {0xE3, 0x0, 1, 255}, + {0x83, 0x0, 1, 255}, + {0xBC, 0xBD, 0, 1}, + {0xE3, 0x0, 2, 255}, + {0x83, 0x7, 1, 255}, + {0x82, 0x0, 2, 255}, + {0x9D, 0x9D, 0, 3}, + {0x99, 0x0, 1, 255}, + {0xE3, 0x0, 2, 255}, + {0x83, 0x1, 1, 255}, + {0x82, 0x0, 1, 255}, + {0x9D, 0x9D, 0, 1}, + {0xBC, 0xBC, 0, 2}, + {0xBC, 0xBC, 0, 4}, + {0xE3, 0x0, 2, 255}, + {0x83, 0x4, 1, 255}, + {0x82, 0x0, 1, 255}, + {0x99, 0x0, 1, 255}, + {0xE3, 0x0, 1, 255}, + {0x83, 0x0, 1, 255}, + {0xBC, 0xBD, 0, 1}, + {0xBC, 0xBD, 0, 3}, + {0xE3, 0x0, 2, 255}, + {0x83, 0xE, 1, 255}, + {0x82, 0x0, 3, 255}, + {0x9E, 0x9E, 0, 6}, + {0x9D, 0x8, 1, 5}, + {0x99, 0x0, 1, 255}, + {0xE3, 0x0, 2, 255}, + {0x83, 0x4, 1, 255}, + {0x82, 0x0, 1, 255}, + {0x9D, 0x0, 1, 2}, + {0xE3, 0x0, 1, 255}, + {0x82, 0x0, 1, 255}, + {0x99, 0x99, 0, 1}, + {0xBC, 0xBC, 0, 3}, + {0xE3, 0x0, 1, 255}, + {0x82, 0x0, 1, 255}, + {0x99, 0x99, 0, 4}, + {0xBC, 0xBC, 0, 7}, + {0xE3, 0x0, 2, 255}, + {0x83, 0x8, 2, 255}, + {0x82, 0x0, 1, 255}, + {0x99, 0x0, 1, 255}, + {0xE3, 0x0, 1, 255}, + {0x83, 0x0, 2, 255}, + {0xBD, 0x0, 1, 3}, + {0xBC, 0xBD, 0, 2}, + {0xE3, 0x0, 1, 255}, + {0x82, 0x0, 1, 255}, + {0x99, 0x99, 0, 1}, + {0xBD, 0x0, 1, 6}, + {0xBC, 0xBE, 0, 5}, + {0xE3, 0x0, 1, 255}, + {0x82, 0x0, 1, 255}, + {0x99, 0x99, 0, 4}, + {0xE3, 0x0, 1, 255}, + {0x83, 0x0, 2, 255}, + {0xBD, 0x0, 1, 3}, + {0xBC, 0xBE, 0, 2}, + {0xE3, 0x0, 1, 255}, + {0x82, 0x0, 1, 255}, + {0x99, 0x99, 0, 1}, + {0xE3, 0x0, 2, 255}, + {0x83, 0x1, 1, 255}, + {0x82, 0x0, 1, 255}, + {0x9D, 0x9E, 0, 1}, + {0xBC, 0xBC, 0, 3}, + {0xE3, 0x0, 1, 255}, + {0x83, 0x0, 1, 255}, + {0xBC, 0xBE, 0, 1}, + {0xE3, 0x0, 2, 255}, + {0x83, 0x17, 1, 255}, + {0x82, 0x0, 4, 255}, + {0x9E, 0x9E, 0, 9}, + {0x9D, 0x10, 1, 8}, + {0x9A, 0x8, 1, 255}, + {0x99, 0x0, 1, 255}, + {0xE3, 0x0, 2, 255}, + {0x83, 0x4, 1, 255}, + {0x82, 0x0, 1, 255}, + {0x9D, 0x0, 1, 3}, + {0xE3, 0x0, 1, 255}, + {0x82, 0x0, 1, 255}, + {0x99, 0x99, 0, 1}, + {0xBC, 0xBC, 0, 4}, + {0xE3, 0x0, 2, 255}, + {0x83, 0x4, 1, 255}, + {0x82, 0x0, 1, 255}, + {0x9D, 0x0, 1, 5}, + {0xE3, 0x0, 1, 255}, + {0x82, 0x0, 1, 255}, + {0x99, 0x99, 0, 2}, + {0xBC, 0xBC, 0, 6}, + {0xE3, 0x0, 1, 255}, + {0x82, 0x0, 1, 255}, + {0x99, 0x99, 0, 7}, + {0xBC, 0xBC, 0, 10}, + {0xE3, 0x0, 2, 255}, + {0x83, 0x10, 2, 255}, + {0x82, 0x0, 2, 255}, + {0x9A, 0x7, 1, 255}, + {0x99, 0x0, 1, 255}, + {0xE3, 0x0, 1, 255}, + {0x83, 0x0, 2, 255}, + {0xBD, 0x0, 1, 4}, + {0xBC, 0xBD, 0, 3}, + {0xE3, 0x0, 1, 255}, + {0x82, 0x0, 1, 255}, + {0x99, 0x99, 0, 1}, + {0xE3, 0x0, 1, 255}, + {0x83, 0x0, 2, 255}, + {0xBD, 0x0, 1, 6}, + {0xBC, 0xBD, 0, 5}, + {0xE3, 0x0, 1, 255}, + {0x82, 0x0, 1, 255}, + {0x99, 0x99, 0, 2}, + {0xBD, 0x0, 1, 9}, + {0xBC, 0xBE, 0, 8}, + {0xE3, 0x0, 1, 255}, + {0x82, 0x0, 1, 255}, + {0x99, 0x99, 0, 7}, + {0xE3, 0x0, 2, 255}, + {0x83, 0x5, 1, 255}, + {0x82, 0x0, 2, 255}, + {0x9E, 0x9E, 0, 3}, + {0x9D, 0x0, 1, 2}, + {0xE3, 0x0, 1, 255}, + {0x82, 0x0, 1, 255}, + {0x99, 0x99, 0, 1}, + {0xBC, 0xBC, 0, 4}, + {0xE3, 0x0, 1, 255}, + {0x82, 0x0, 1, 255}, + {0x9D, 0x9D, 0, 1}, + {0xE3, 0x0, 1, 255}, + {0x83, 0x0, 1, 255}, + {0xBD, 0xBD, 0, 1}, + {0x27, 0x27, 0, 1}, + {0xE1, 0x0, 1, 255}, + {0x9F, 0x0, 1, 255}, + {0x8C, 0x8C, 0, 1}, + {0xE1, 0x0, 1, 255}, + {0x9F, 0x0, 1, 255}, + {0x86, 0x87, 0, 1}, + {0xE1, 0x0, 1, 255}, + {0x9F, 0x0, 1, 255}, + {0x86, 0x86, 0, 1}, + {0xE1, 0x0, 1, 255}, + {0x9F, 0x0, 1, 255}, + {0x87, 0x87, 0, 1}, + {0xE0, 0x0, 1, 255}, + {0xA5, 0x0, 1, 255}, + {0x8D, 0x0, 1, 255}, + {0xE0, 0x0, 1, 255}, + {0xA4, 0x0, 1, 255}, + {0xB7, 0xB7, 0, 1}, + {0x76, 0x76, 0, 8}, + {0x70, 0x70, 0, 7}, + {0x66, 0x66, 0, 6}, + {0x62, 0x62, 0, 5}, + {0x56, 0x56, 0, 4}, + {0x50, 0x50, 0, 3}, + {0x46, 0x46, 0, 2}, + {0x42, 0x42, 0, 1}, + {0x79, 0x7A, 0, 17}, + {0x73, 0x74, 0, 15}, + {0x6B, 0x6B, 0, 14}, + {0x67, 0x2, 2, 13}, + {0x64, 0x64, 0, 12}, + {0x59, 0x5A, 0, 10}, + {0x53, 0x54, 0, 8}, + {0x4B, 0x4B, 0, 7}, + {0x47, 0x0, 2, 6}, + {0x44, 0x44, 0, 5}, + {0x62, 0x62, 0, 2}, + {0x42, 0x42, 0, 1}, + {0x62, 0x62, 0, 4}, + {0x42, 0x42, 0, 3}, + {0x79, 0x7A, 0, 16}, + {0x73, 0x74, 0, 14}, + {0x6B, 0x6B, 0, 13}, + {0x67, 0x1, 2, 12}, + {0x64, 0x64, 0, 11}, + {0x59, 0x5A, 0, 9}, + {0x53, 0x54, 0, 7}, + {0x4B, 0x4B, 0, 6}, + {0x47, 0x0, 1, 5}, + {0x44, 0x44, 0, 4}, + {0x42, 0x42, 0, 1}, + {0x62, 0x62, 0, 3}, + {0x42, 0x42, 0, 2}, + {0xCC, 0x0, 2, 255}, + {0x83, 0x83, 0, 3}, + {0x80, 0x81, 0, 1}, + {0xCC, 0x0, 2, 255}, + {0xA8, 0xA8, 0, 2}, + {0x87, 0x87, 0, 1}, + {0xCC, 0x0, 2, 255}, + {0xA8, 0xA8, 0, 2}, + {0x84, 0x84, 0, 1}, + {0xCE, 0x2, 1, 255}, + {0xCC, 0x1, 1, 255}, + {0xC2, 0x0, 1, 255}, + {0xB7, 0xB7, 0, 1}, + {0xA7, 0xA7, 0, 2}, + {0x87, 0x87, 0, 3}, + {0xE0, 0x0, 1, 255}, + {0xB5, 0x0, 1, 255}, + {0x8D, 0x0, 1, 255}, + {0xE2, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0x8D, 0x8D, 0, 1}, + {0xE0, 0x0, 1, 255}, + {0xB5, 0x0, 1, 255}, + {0x8D, 0x0, 1, 255}, + {0xE2, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0x8D, 0x0, 1, 255}, + {0x20, 0x20, 0, 1}, + {0xE0, 0x0, 1, 255}, + {0xB5, 0x0, 1, 255}, + {0x8D, 0x8D, 0, 1}, + {0xE0, 0x0, 1, 255}, + {0xA5, 0x0, 1, 255}, + {0x8D, 0x0, 1, 255}, + {0xE0, 0x0, 1, 255}, + {0xA4, 0x0, 1, 255}, + {0x9E, 0x9E, 0, 1}, + {0xCC, 0x1, 1, 255}, + {0xC4, 0x0, 1, 255}, + {0xA6, 0xA7, 0, 1}, + {0x87, 0x87, 0, 3}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 2, 255}, + {0xBA, 0xBA, 0, 3}, + {0xB9, 0x0, 1, 2}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0x99, 0x0, 1, 255}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0x84, 0x0, 1, 255}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0x0, 1, 255}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB8, 0xB8, 0, 1}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 2, 255}, + {0xBA, 0x0, 1, 3}, + {0xB9, 0xBA, 0, 2}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xAF, 0x0, 1, 255}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0x95, 0x0, 1, 255}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 1}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 3, 255}, + {0xBA, 0xBA, 0, 4}, + {0xB9, 0x9, 1, 3}, + {0x80, 0x0, 1, 255}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0x0, 1, 255}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBB, 0x0, 1, 255}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xAC, 0xAC, 0, 1}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0x98, 0x0, 1, 255}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 2}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0x84, 0x0, 1, 255}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0x0, 1, 255}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB8, 0xB8, 0, 1}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 2, 255}, + {0xBA, 0xBA, 0, 3}, + {0xB9, 0x0, 1, 2}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0x99, 0x0, 1, 255}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xAE, 0xAE, 0, 1}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 2, 255}, + {0xAF, 0x0, 1, 255}, + {0xAE, 0xAE, 0, 2}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB6, 0xB6, 0, 1}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 31, 255}, + {0xB1, 0x5A, 1, 255}, + {0x9F, 0x57, 1, 255}, + {0x9E, 0x54, 1, 255}, + {0x9C, 0x51, 1, 255}, + {0x9B, 0x4E, 1, 255}, + {0x9A, 0x4B, 1, 255}, + {0x99, 0x48, 1, 255}, + {0x98, 0x45, 1, 255}, + {0x97, 0x42, 1, 255}, + {0x96, 0x3F, 1, 255}, + {0x95, 0x3C, 1, 255}, + {0x94, 0x39, 1, 255}, + {0x93, 0x36, 1, 255}, + {0x92, 0x33, 1, 255}, + {0x91, 0x30, 1, 255}, + {0x90, 0x2D, 1, 255}, + {0x8F, 0x2A, 1, 255}, + {0x8E, 0x27, 1, 255}, + {0x8D, 0x24, 1, 255}, + {0x8C, 0x21, 1, 255}, + {0x8B, 0x1E, 1, 255}, + {0x8A, 0x1B, 1, 255}, + {0x89, 0x18, 1, 255}, + {0x87, 0x15, 1, 255}, + {0x86, 0x12, 1, 255}, + {0x85, 0xF, 1, 255}, + {0x84, 0xC, 1, 255}, + {0x83, 0x9, 1, 255}, + {0x82, 0x6, 1, 255}, + {0x81, 0x3, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 61}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 63}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 65}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 67}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 69}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 71}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 73}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 75}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 77}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 79}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 81}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 83}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 85}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 87}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 89}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 91}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 93}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 95}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 97}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 99}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 101}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 103}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 105}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 107}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 109}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 111}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 113}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 115}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 117}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 119}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xAC, 0x0, 1, 255}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 30, 255}, + {0x9F, 0x57, 1, 255}, + {0x9E, 0x54, 1, 255}, + {0x9C, 0x51, 1, 255}, + {0x9B, 0x4E, 1, 255}, + {0x9A, 0x4B, 1, 255}, + {0x99, 0x48, 1, 255}, + {0x98, 0x45, 1, 255}, + {0x97, 0x42, 1, 255}, + {0x96, 0x3F, 1, 255}, + {0x95, 0x3C, 1, 255}, + {0x94, 0x39, 1, 255}, + {0x93, 0x36, 1, 255}, + {0x92, 0x33, 1, 255}, + {0x91, 0x30, 1, 255}, + {0x90, 0x2D, 1, 255}, + {0x8F, 0x2A, 1, 255}, + {0x8E, 0x27, 1, 255}, + {0x8D, 0x24, 1, 255}, + {0x8C, 0x21, 1, 255}, + {0x8B, 0x1E, 1, 255}, + {0x8A, 0x1B, 1, 255}, + {0x89, 0x18, 1, 255}, + {0x87, 0x15, 1, 255}, + {0x86, 0x12, 1, 255}, + {0x85, 0xF, 1, 255}, + {0x84, 0xC, 1, 255}, + {0x83, 0x9, 1, 255}, + {0x82, 0x6, 1, 255}, + {0x81, 0x3, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 1}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 3}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 5}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 7}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 9}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 11}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 13}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 15}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 17}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 19}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 21}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 23}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 25}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 27}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 29}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 31}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 33}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 35}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 37}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 39}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 41}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 43}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 45}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 47}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 49}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 51}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 53}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 55}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 57}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 59}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 36, 255}, + {0xAC, 0xF7, 1, 197}, + {0xAB, 0x69, 1, 196}, + {0xA1, 0x66, 1, 255}, + {0xA0, 0x63, 1, 255}, + {0x9F, 0x60, 1, 255}, + {0x9E, 0x5D, 1, 255}, + {0x9D, 0x5A, 1, 255}, + {0x9C, 0x57, 1, 255}, + {0x9B, 0x54, 1, 255}, + {0x9A, 0x51, 1, 255}, + {0x99, 0x4E, 1, 255}, + {0x98, 0x4B, 1, 255}, + {0x97, 0x48, 1, 255}, + {0x96, 0x45, 1, 255}, + {0x95, 0x42, 1, 255}, + {0x94, 0x3F, 1, 255}, + {0x93, 0x3C, 1, 255}, + {0x92, 0x39, 1, 255}, + {0x91, 0x36, 1, 255}, + {0x90, 0x33, 1, 255}, + {0x8F, 0x30, 1, 255}, + {0x8E, 0x2D, 1, 255}, + {0x8D, 0x2A, 1, 255}, + {0x8C, 0x27, 1, 255}, + {0x8B, 0x24, 1, 255}, + {0x8A, 0x21, 1, 255}, + {0x89, 0x1E, 1, 255}, + {0x88, 0x1B, 1, 255}, + {0x87, 0x18, 1, 255}, + {0x86, 0x15, 1, 255}, + {0x85, 0x12, 1, 255}, + {0x84, 0xC, 1, 255}, + {0x83, 0x9, 1, 255}, + {0x82, 0x6, 1, 255}, + {0x81, 0x3, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 131}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 133}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 135}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 137}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0x0, 1, 139}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xB9, 0, 4}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 140}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 142}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 144}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 146}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 147}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 149}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 151}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 153}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 155}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 157}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 159}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 161}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 163}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 165}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 167}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 169}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 171}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 173}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 175}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 177}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 179}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 181}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 183}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 185}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 187}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 188}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 190}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 192}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 193}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 35, 255}, + {0xBA, 0xBA, 0, 194}, + {0xA1, 0x66, 1, 255}, + {0xA0, 0x63, 1, 255}, + {0x9F, 0x60, 1, 255}, + {0x9E, 0x5D, 1, 255}, + {0x9D, 0x5A, 1, 255}, + {0x9C, 0x57, 1, 255}, + {0x9B, 0x54, 1, 255}, + {0x9A, 0x51, 1, 255}, + {0x99, 0x4E, 1, 255}, + {0x98, 0x4B, 1, 255}, + {0x97, 0x48, 1, 255}, + {0x96, 0x45, 1, 255}, + {0x95, 0x42, 1, 255}, + {0x94, 0x3F, 1, 255}, + {0x93, 0x3C, 1, 255}, + {0x92, 0x39, 1, 255}, + {0x91, 0x36, 1, 255}, + {0x90, 0x33, 1, 255}, + {0x8F, 0x30, 1, 255}, + {0x8E, 0x2D, 1, 255}, + {0x8D, 0x2A, 1, 255}, + {0x8C, 0x27, 1, 255}, + {0x8B, 0x24, 1, 255}, + {0x8A, 0x21, 1, 255}, + {0x89, 0x1E, 1, 255}, + {0x88, 0x1B, 1, 255}, + {0x87, 0x18, 1, 255}, + {0x86, 0x15, 1, 255}, + {0x85, 0x12, 1, 255}, + {0x84, 0xC, 1, 255}, + {0x83, 0x9, 1, 255}, + {0x82, 0x6, 1, 255}, + {0x81, 0x3, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 5}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 7}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 9}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 11}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0x0, 1, 13}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xB9, 0, 1}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 14}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 16}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 18}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 20}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 21}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 23}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 25}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 27}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 29}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 31}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 33}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 35}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 37}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 39}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 41}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 43}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 45}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 47}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 49}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 51}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 53}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 55}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 57}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 59}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 61}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 62}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 64}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 66}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 67}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 35, 255}, + {0xBA, 0xBA, 0, 195}, + {0xA1, 0x6A, 1, 255}, + {0xA0, 0x67, 1, 255}, + {0x9F, 0x64, 1, 255}, + {0x9E, 0x61, 1, 255}, + {0x9D, 0x5E, 1, 255}, + {0x9C, 0x5B, 1, 255}, + {0x9B, 0x58, 1, 255}, + {0x9A, 0x55, 1, 255}, + {0x99, 0x52, 1, 255}, + {0x98, 0x4F, 1, 255}, + {0x97, 0x4C, 1, 255}, + {0x96, 0x49, 1, 255}, + {0x95, 0x46, 1, 255}, + {0x94, 0x43, 1, 255}, + {0x93, 0x40, 1, 255}, + {0x92, 0x3D, 1, 255}, + {0x91, 0x3A, 1, 255}, + {0x90, 0x37, 1, 255}, + {0x8F, 0x34, 1, 255}, + {0x8E, 0x31, 1, 255}, + {0x8D, 0x2E, 1, 255}, + {0x8C, 0x2B, 1, 255}, + {0x8B, 0x28, 1, 255}, + {0x8A, 0x25, 1, 255}, + {0x89, 0x22, 1, 255}, + {0x88, 0x1F, 1, 255}, + {0x87, 0x1C, 1, 255}, + {0x86, 0x19, 1, 255}, + {0x85, 0x16, 1, 255}, + {0x84, 0x10, 1, 255}, + {0x83, 0xD, 1, 255}, + {0x82, 0xA, 1, 255}, + {0x81, 0x7, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 2, 255}, + {0xBA, 0x0, 1, 69}, + {0xB9, 0xBA, 0, 68}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBB, 0xBB, 0, 2}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 70}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 72}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 74}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0x0, 1, 76}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xB9, 0, 3}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 77}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 79}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 81}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 83}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 84}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 86}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 88}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 90}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 92}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 94}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 96}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 98}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 100}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 102}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 104}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 106}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 108}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 110}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 112}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 114}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 116}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 118}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 120}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 122}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 124}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 125}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 127}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 129}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 130}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 36, 255}, + {0xB6, 0xFE, 1, 134}, + {0xAF, 0x71, 1, 133}, + {0xA1, 0x6E, 1, 255}, + {0xA0, 0x6B, 1, 255}, + {0x9F, 0x68, 1, 255}, + {0x9E, 0x65, 1, 255}, + {0x9D, 0x62, 1, 255}, + {0x9C, 0x5F, 1, 255}, + {0x9B, 0x5C, 1, 255}, + {0x9A, 0x59, 1, 255}, + {0x99, 0x4E, 1, 255}, + {0x98, 0x4B, 1, 255}, + {0x97, 0x48, 1, 255}, + {0x96, 0x45, 1, 255}, + {0x95, 0x42, 1, 255}, + {0x94, 0x3F, 1, 255}, + {0x93, 0x3C, 1, 255}, + {0x92, 0x39, 1, 255}, + {0x91, 0x36, 1, 255}, + {0x90, 0x33, 1, 255}, + {0x8F, 0x30, 1, 255}, + {0x8E, 0x2D, 1, 255}, + {0x8D, 0x2A, 1, 255}, + {0x8C, 0x27, 1, 255}, + {0x8B, 0x24, 1, 255}, + {0x8A, 0x21, 1, 255}, + {0x89, 0x1E, 1, 255}, + {0x88, 0x1B, 1, 255}, + {0x87, 0x18, 1, 255}, + {0x86, 0x15, 1, 255}, + {0x85, 0x12, 1, 255}, + {0x84, 0xC, 1, 255}, + {0x83, 0x9, 1, 255}, + {0x82, 0x6, 1, 255}, + {0x81, 0x3, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 68}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 70}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 72}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 74}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0x0, 1, 76}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xB9, 0, 2}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 77}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 79}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 81}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 83}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 84}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 86}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 88}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 90}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 92}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 94}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 96}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 98}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 100}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 102}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 104}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 106}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 108}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 110}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 112}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 114}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 3, 255}, + {0xBA, 0x3, 1, 117}, + {0xB9, 0xBA, 0, 116}, + {0xB7, 0x0, 1, 255}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 3}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB8, 0xB8, 0, 4}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 118}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 120}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 122}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 124}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 125}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 127}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 129}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 130}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 34, 255}, + {0xA1, 0x66, 1, 255}, + {0xA0, 0x63, 1, 255}, + {0x9F, 0x60, 1, 255}, + {0x9E, 0x5D, 1, 255}, + {0x9D, 0x5A, 1, 255}, + {0x9C, 0x57, 1, 255}, + {0x9B, 0x54, 1, 255}, + {0x9A, 0x51, 1, 255}, + {0x99, 0x4E, 1, 255}, + {0x98, 0x4B, 1, 255}, + {0x97, 0x48, 1, 255}, + {0x96, 0x45, 1, 255}, + {0x95, 0x42, 1, 255}, + {0x94, 0x3F, 1, 255}, + {0x93, 0x3C, 1, 255}, + {0x92, 0x39, 1, 255}, + {0x91, 0x36, 1, 255}, + {0x90, 0x33, 1, 255}, + {0x8F, 0x30, 1, 255}, + {0x8E, 0x2D, 1, 255}, + {0x8D, 0x2A, 1, 255}, + {0x8C, 0x27, 1, 255}, + {0x8B, 0x24, 1, 255}, + {0x8A, 0x21, 1, 255}, + {0x89, 0x1E, 1, 255}, + {0x88, 0x1B, 1, 255}, + {0x87, 0x18, 1, 255}, + {0x86, 0x15, 1, 255}, + {0x85, 0x12, 1, 255}, + {0x84, 0xC, 1, 255}, + {0x83, 0x9, 1, 255}, + {0x82, 0x6, 1, 255}, + {0x81, 0x3, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 5}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 7}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 9}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 11}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0x0, 1, 13}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xB9, 0, 1}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 14}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 16}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 18}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 20}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 21}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 23}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 25}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 27}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 29}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 31}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 33}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 35}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 37}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 39}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 41}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 43}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 45}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 47}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 49}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 51}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 53}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 55}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 57}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 59}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 61}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 62}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 64}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 66}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 67}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB7, 0xB8, 0, 131}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 1}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 34, 255}, + {0xA1, 0x66, 1, 255}, + {0xA0, 0x63, 1, 255}, + {0x9F, 0x60, 1, 255}, + {0x9E, 0x5D, 1, 255}, + {0x9D, 0x5A, 1, 255}, + {0x9C, 0x57, 1, 255}, + {0x9B, 0x54, 1, 255}, + {0x9A, 0x51, 1, 255}, + {0x99, 0x4E, 1, 255}, + {0x98, 0x4B, 1, 255}, + {0x97, 0x48, 1, 255}, + {0x96, 0x45, 1, 255}, + {0x95, 0x42, 1, 255}, + {0x94, 0x3F, 1, 255}, + {0x93, 0x3C, 1, 255}, + {0x92, 0x39, 1, 255}, + {0x91, 0x36, 1, 255}, + {0x90, 0x33, 1, 255}, + {0x8F, 0x30, 1, 255}, + {0x8E, 0x2D, 1, 255}, + {0x8D, 0x2A, 1, 255}, + {0x8C, 0x27, 1, 255}, + {0x8B, 0x24, 1, 255}, + {0x8A, 0x21, 1, 255}, + {0x89, 0x1E, 1, 255}, + {0x88, 0x1B, 1, 255}, + {0x87, 0x18, 1, 255}, + {0x86, 0x15, 1, 255}, + {0x85, 0x12, 1, 255}, + {0x84, 0xC, 1, 255}, + {0x83, 0x9, 1, 255}, + {0x82, 0x6, 1, 255}, + {0x81, 0x3, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 2}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 4}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 6}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 8}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0x0, 1, 10}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xB9, 0, 1}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 11}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 13}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 15}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 17}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 18}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 20}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 22}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 24}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 26}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 28}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 30}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 32}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 34}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 36}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 38}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 40}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 42}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 44}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 46}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 48}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 50}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 52}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 54}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 56}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 58}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 59}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 61}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 63}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 64}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 35, 255}, + {0xB6, 0x71, 1, 69}, + {0xA1, 0x6E, 1, 255}, + {0xA0, 0x6B, 1, 255}, + {0x9F, 0x68, 1, 255}, + {0x9E, 0x65, 1, 255}, + {0x9D, 0x62, 1, 255}, + {0x9C, 0x5F, 1, 255}, + {0x9B, 0x5C, 1, 255}, + {0x9A, 0x59, 1, 255}, + {0x99, 0x4E, 1, 255}, + {0x98, 0x4B, 1, 255}, + {0x97, 0x48, 1, 255}, + {0x96, 0x45, 1, 255}, + {0x95, 0x42, 1, 255}, + {0x94, 0x3F, 1, 255}, + {0x93, 0x3C, 1, 255}, + {0x92, 0x39, 1, 255}, + {0x91, 0x36, 1, 255}, + {0x90, 0x33, 1, 255}, + {0x8F, 0x30, 1, 255}, + {0x8E, 0x2D, 1, 255}, + {0x8D, 0x2A, 1, 255}, + {0x8C, 0x27, 1, 255}, + {0x8B, 0x24, 1, 255}, + {0x8A, 0x21, 1, 255}, + {0x89, 0x1E, 1, 255}, + {0x88, 0x1B, 1, 255}, + {0x87, 0x18, 1, 255}, + {0x86, 0x15, 1, 255}, + {0x85, 0x12, 1, 255}, + {0x84, 0xC, 1, 255}, + {0x83, 0x9, 1, 255}, + {0x82, 0x6, 1, 255}, + {0x81, 0x3, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 4}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 6}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 8}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 10}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0x0, 1, 12}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xB9, 0, 1}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 13}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 15}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 17}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 19}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 20}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 22}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 24}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 26}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 28}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 30}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 32}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 34}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 36}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 38}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 40}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 42}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 44}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 46}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 48}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 50}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 3, 255}, + {0xBA, 0x3, 1, 53}, + {0xB9, 0xBA, 0, 52}, + {0xB7, 0x0, 1, 255}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 2}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB8, 0xB8, 0, 3}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 54}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 56}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 58}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 60}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 61}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xBA, 0, 63}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 65}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 66}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB7, 0xB8, 0, 67}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB8, 0xB8, 0, 1}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0x0, 1, 2}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xB9, 0xB9, 0, 1}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBA, 0xBA, 0, 1}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 2, 255}, + {0xBE, 0xBE, 0, 3}, + {0xBD, 0x0, 1, 2}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBE, 0xBE, 0, 1}, + {0xE1, 0x0, 1, 255}, + {0x80, 0x0, 1, 255}, + {0xBE, 0xBE, 0, 1}, + {0xE0, 0x0, 1, 255}, + {0xAD, 0x0, 1, 255}, + {0x8D, 0x0, 1, 255}, + {0xE0, 0x0, 1, 255}, + {0xAC, 0x0, 1, 255}, + {0xB7, 0xB7, 0, 1}, + {0xCC, 0x0, 2, 255}, + {0x87, 0x87, 0, 2}, + {0x81, 0x81, 0, 1}, + {0xCC, 0x0, 2, 255}, + {0x86, 0x86, 0, 2}, + {0x82, 0x82, 0, 1}, + {0xCC, 0x0, 1, 255}, + {0xA6, 0xA7, 0, 1}, + {0xCC, 0x0, 4, 255}, + {0x8A, 0x8A, 0, 5}, + {0x87, 0x88, 0, 3}, + {0x83, 0x83, 0, 2}, + {0x81, 0x81, 0, 1}, + {0xCC, 0x0, 2, 255}, + {0x83, 0x83, 0, 2}, + {0x81, 0x81, 0, 1}, + {0xCC, 0x0, 4, 255}, + {0xA8, 0xA8, 0, 5}, + {0x8B, 0x8B, 0, 4}, + {0x88, 0x88, 0, 3}, + {0x82, 0x83, 0, 1}, + {0x72, 0x72, 0, 1}, + {0x72, 0x72, 0, 2}, + {0x52, 0x52, 0, 1}, + {0xCC, 0x0, 3, 255}, + {0x8B, 0x8B, 0, 3}, + {0x88, 0x88, 0, 2}, + {0x82, 0x82, 0, 1}, + {0xE0, 0x0, 1, 255}, + {0xAF, 0x0, 1, 255}, + {0x8D, 0x0, 1, 3}, + {0xE0, 0x0, 1, 255}, + {0xAE, 0x0, 1, 255}, + {0xB7, 0x0, 1, 2}, + {0xE0, 0x0, 1, 255}, + {0xAF, 0x0, 1, 255}, + {0x8D, 0x8D, 0, 1}, + {0xE0, 0x0, 1, 255}, + {0xAF, 0x0, 1, 255}, + {0x8D, 0x8D, 0, 1}, + {0xE0, 0x0, 2, 255}, + {0xB9, 0x1, 1, 255}, + {0xB8, 0x0, 1, 255}, + {0xB2, 0xB2, 0, 1}, + {0x85, 0x85, 0, 2}, + {0xCC, 0x0, 2, 255}, + {0x84, 0x84, 0, 2}, + {0x81, 0x81, 0, 1}, + {0xDA, 0x0, 1, 255}, + {0xBE, 0xBE, 0, 1}, + {0xDA, 0x1, 1, 255}, + {0xD9, 0x0, 1, 255}, + {0x94, 0x94, 0, 1}, + {0xBE, 0xBE, 0, 2}, + {0xCC, 0x0, 2, 255}, + {0x9B, 0x9B, 0, 2}, + {0x82, 0x82, 0, 1}, + {0xCC, 0x0, 1, 255}, + {0x9B, 0x9B, 0, 1}, + {0xCC, 0x0, 1, 255}, + {0x61, 0x61, 0, 2}, + {0x88, 0x0, 1, 255}, + {0x61, 0x0, 1, 255}, + {0xCC, 0x0, 1, 255}, + {0x88, 0x88, 0, 1}, + {0xC3, 0x0, 1, 255}, + {0xA4, 0xA4, 0, 1}, + {0x65, 0x65, 0, 1}, + {0x69, 0x69, 0, 1}, + {0xCC, 0x0, 1, 255}, + {0x6F, 0x6F, 0, 2}, + {0x88, 0x0, 1, 255}, + {0x6F, 0x0, 1, 255}, + {0xCC, 0x0, 1, 255}, + {0x88, 0x88, 0, 1}, + {0xC3, 0x0, 1, 255}, + {0xB6, 0xB6, 0, 1}, + {0x63, 0x0, 1, 255}, + {0x68, 0x68, 0, 1}, + {0xCC, 0x0, 1, 255}, + {0x75, 0x75, 0, 2}, + {0x88, 0x0, 1, 255}, + {0x75, 0x0, 1, 255}, + {0xCC, 0x0, 1, 255}, + {0x88, 0x88, 0, 1}, + {0xC3, 0x0, 1, 255}, + {0xBC, 0xBC, 0, 1}, + {0xCC, 0x0, 3, 255}, + {0x8C, 0x8C, 0, 4}, + {0x84, 0x84, 0, 3}, + {0x80, 0x81, 0, 1}, + {0xCC, 0x0, 4, 255}, + {0x8C, 0x8C, 0, 8}, + {0x84, 0x84, 0, 7}, + {0x82, 0x0, 1, 255}, + {0x80, 0x81, 0, 5}, + {0xCC, 0x0, 3, 255}, + {0x8C, 0x8C, 0, 4}, + {0x84, 0x84, 0, 3}, + {0x80, 0x81, 0, 1}, + {0xCC, 0x0, 2, 255}, + {0x8C, 0x8C, 0, 2}, + {0x84, 0x84, 0, 1}, + {0xCC, 0x0, 4, 255}, + {0x8C, 0x8C, 0, 9}, + {0x88, 0x0, 1, 8}, + {0x84, 0x84, 0, 7}, + {0x80, 0x81, 0, 5}, + {0xCC, 0x0, 3, 255}, + {0x8C, 0x8C, 0, 4}, + {0x84, 0x84, 0, 3}, + {0x80, 0x81, 0, 1}, +} + +// Total size of mainTable is 1253028 bytes diff --git a/vendor/golang.org/x/text/doc.go b/vendor/golang.org/x/text/doc.go new file mode 100644 index 000000000..a48e2843f --- /dev/null +++ b/vendor/golang.org/x/text/doc.go @@ -0,0 +1,13 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:generate go run gen.go + +// text is a repository of text-related packages related to internationalization +// (i18n) and localization (l10n), such as character encodings, text +// transformations, and locale-specific text handling. +package text + +// TODO: more documentation on general concepts, such as Transformers, use +// of normalization, etc. diff --git a/vendor/golang.org/x/text/gen.go b/vendor/golang.org/x/text/gen.go new file mode 100644 index 000000000..4257a1839 --- /dev/null +++ b/vendor/golang.org/x/text/gen.go @@ -0,0 +1,318 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +// gen runs go generate on Unicode- and CLDR-related package in the text +// repositories, taking into account dependencies and versions. +package main + +import ( + "bytes" + "flag" + "fmt" + "go/build" + "go/format" + "io/ioutil" + "os" + "os/exec" + "path" + "path/filepath" + "regexp" + "runtime" + "strings" + "sync" + "unicode" + + "golang.org/x/text/collate" + "golang.org/x/text/internal/gen" + "golang.org/x/text/language" +) + +var ( + verbose = flag.Bool("v", false, "verbose output") + force = flag.Bool("force", false, "ignore failing dependencies") + doCore = flag.Bool("core", false, "force an update to core") + excludeList = flag.String("exclude", "", + "comma-separated list of packages to exclude") + + // The user can specify a selection of packages to build on the command line. + args []string +) + +func exclude(pkg string) bool { + if len(args) > 0 { + return !contains(args, pkg) + } + return contains(strings.Split(*excludeList, ","), pkg) +} + +// TODO: +// - Better version handling. +// - Generate tables for the core unicode package? +// - Add generation for encodings. This requires some retooling here and there. +// - Running repo-wide "long" tests. + +var vprintf = fmt.Printf + +func main() { + gen.Init() + args = flag.Args() + if !*verbose { + // Set vprintf to a no-op. + vprintf = func(string, ...interface{}) (int, error) { return 0, nil } + } + + // TODO: create temporary cache directory to load files and create and set + // a "cache" option if the user did not specify the UNICODE_DIR environment + // variable. This will prevent duplicate downloads and also will enable long + // tests, which really need to be run after each generated package. + + updateCore := *doCore + if gen.UnicodeVersion() != unicode.Version { + fmt.Printf("Requested Unicode version %s; core unicode version is %s.\n", + gen.UnicodeVersion(), + unicode.Version) + c := collate.New(language.Und, collate.Numeric) + if c.CompareString(gen.UnicodeVersion(), unicode.Version) < 0 && !*force { + os.Exit(2) + } + updateCore = true + goroot := os.Getenv("GOROOT") + appendToFile( + filepath.Join(goroot, "api", "except.txt"), + fmt.Sprintf("pkg unicode, const Version = %q\n", unicode.Version), + ) + const lines = `pkg unicode, const Version = %q +// TODO: add a new line of the following form for each new script and property. +pkg unicode, var <new script or property> *RangeTable +` + appendToFile( + filepath.Join(goroot, "api", "next.txt"), + fmt.Sprintf(lines, gen.UnicodeVersion()), + ) + } + + var unicode = &dependency{} + if updateCore { + fmt.Printf("Updating core to version %s...\n", gen.UnicodeVersion()) + unicode = generate("unicode") + + // Test some users of the unicode packages, especially the ones that + // keep a mirrored table. These may need to be corrected by hand. + generate("regexp", unicode) + generate("strconv", unicode) // mimics Unicode table + generate("strings", unicode) + generate("testing", unicode) // mimics Unicode table + } + + var ( + cldr = generate("./unicode/cldr", unicode) + language = generate("./language", cldr) + internal = generate("./internal", unicode, language) + norm = generate("./unicode/norm", unicode) + rangetable = generate("./unicode/rangetable", unicode) + cases = generate("./cases", unicode, norm, language, rangetable) + width = generate("./width", unicode) + bidi = generate("./unicode/bidi", unicode, norm, rangetable) + mib = generate("./encoding/internal/identifier", unicode) + _ = generate("./encoding/htmlindex", unicode, language, mib) + _ = generate("./encoding/ianaindex", unicode, language, mib) + _ = generate("./secure/precis", unicode, norm, rangetable, cases, width, bidi) + _ = generate("./currency", unicode, cldr, language, internal) + _ = generate("./internal/number", unicode, cldr, language, internal) + _ = generate("./feature/plural", unicode, cldr, language, internal) + _ = generate("./internal/export/idna", unicode, bidi, norm) + _ = generate("./language/display", unicode, cldr, language, internal) + _ = generate("./collate", unicode, norm, cldr, language, rangetable) + _ = generate("./search", unicode, norm, cldr, language, rangetable) + ) + all.Wait() + + // Copy exported packages to the destination golang.org repo. + copyExported("golang.org/x/net/idna") + + if updateCore { + copyVendored() + } + + if hasErrors { + fmt.Println("FAIL") + os.Exit(1) + } + vprintf("SUCCESS\n") +} + +func appendToFile(file, text string) { + fmt.Println("Augmenting", file) + w, err := os.OpenFile(file, os.O_APPEND|os.O_WRONLY, 0600) + if err != nil { + fmt.Println("Failed to open file:", err) + os.Exit(1) + } + defer w.Close() + if _, err := w.WriteString(text); err != nil { + fmt.Println("Failed to write to file:", err) + os.Exit(1) + } +} + +var ( + all sync.WaitGroup + hasErrors bool +) + +type dependency struct { + sync.WaitGroup + hasErrors bool +} + +func generate(pkg string, deps ...*dependency) *dependency { + var wg dependency + if exclude(pkg) { + return &wg + } + wg.Add(1) + all.Add(1) + go func() { + defer wg.Done() + defer all.Done() + // Wait for dependencies to finish. + for _, d := range deps { + d.Wait() + if d.hasErrors && !*force { + fmt.Printf("--- ABORT: %s\n", pkg) + wg.hasErrors = true + return + } + } + vprintf("=== GENERATE %s\n", pkg) + args := []string{"generate"} + if *verbose { + args = append(args, "-v") + } + args = append(args, pkg) + cmd := exec.Command(filepath.Join(runtime.GOROOT(), "bin", "go"), args...) + w := &bytes.Buffer{} + cmd.Stderr = w + cmd.Stdout = w + if err := cmd.Run(); err != nil { + fmt.Printf("--- FAIL: %s:\n\t%v\n\tError: %v\n", pkg, indent(w), err) + hasErrors = true + wg.hasErrors = true + return + } + + vprintf("=== TEST %s\n", pkg) + args[0] = "test" + cmd = exec.Command(filepath.Join(runtime.GOROOT(), "bin", "go"), args...) + wt := &bytes.Buffer{} + cmd.Stderr = wt + cmd.Stdout = wt + if err := cmd.Run(); err != nil { + fmt.Printf("--- FAIL: %s:\n\t%v\n\tError: %v\n", pkg, indent(wt), err) + hasErrors = true + wg.hasErrors = true + return + } + vprintf("--- SUCCESS: %s\n\t%v\n", pkg, indent(w)) + fmt.Print(wt.String()) + }() + return &wg +} + +// copyExported copies a package in x/text/internal/export to the +// destination repository. +func copyExported(p string) { + copyPackage( + filepath.Join("internal", "export", path.Base(p)), + filepath.Join("..", filepath.FromSlash(p[len("golang.org/x"):])), + "golang.org/x/text/internal/export/"+path.Base(p), + p) +} + +// copyVendored copies packages used by Go core into the vendored directory. +func copyVendored() { + root := filepath.Join(build.Default.GOROOT, filepath.FromSlash("src/vendor/golang_org/x")) + + err := filepath.Walk(root, func(dir string, info os.FileInfo, err error) error { + if err != nil || !info.IsDir() || root == dir { + return err + } + src := dir[len(root)+1:] + const slash = string(filepath.Separator) + if c := strings.Split(src, slash); c[0] == "text" { + // Copy a text repo package from its normal location. + src = strings.Join(c[1:], slash) + } else { + // Copy the vendored package if it exists in the export directory. + src = filepath.Join("internal", "export", filepath.Base(src)) + } + copyPackage(src, dir, "golang.org", "golang_org") + return nil + }) + if err != nil { + fmt.Printf("Seeding directory %s has failed %v:", root, err) + os.Exit(1) + } +} + +// goGenRE is used to remove go:generate lines. +var goGenRE = regexp.MustCompile("//go:generate[^\n]*\n") + +// copyPackage copies relevant files from a directory in x/text to the +// destination package directory. The destination package is assumed to have +// the same name. For each copied file go:generate lines are removed and +// and package comments are rewritten to the new path. +func copyPackage(dirSrc, dirDst, search, replace string) { + err := filepath.Walk(dirSrc, func(file string, info os.FileInfo, err error) error { + base := filepath.Base(file) + if err != nil || info.IsDir() || + !strings.HasSuffix(base, ".go") || + strings.HasSuffix(base, "_test.go") || + // Don't process subdirectories. + filepath.Dir(file) != dirSrc { + return nil + } + b, err := ioutil.ReadFile(file) + if err != nil || bytes.Contains(b, []byte("\n// +build ignore")) { + return err + } + // Fix paths. + b = bytes.Replace(b, []byte(search), []byte(replace), -1) + // Remove go:generate lines. + b = goGenRE.ReplaceAllLiteral(b, nil) + comment := "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\n" + if *doCore { + comment = "// Code generated by running \"go run gen.go -core\" in golang.org/x/text. DO NOT EDIT.\n\n" + } + if !bytes.HasPrefix(b, []byte(comment)) { + b = append([]byte(comment), b...) + } + if b, err = format.Source(b); err != nil { + fmt.Println("Failed to format file:", err) + os.Exit(1) + } + file = filepath.Join(dirDst, base) + vprintf("=== COPY %s\n", file) + return ioutil.WriteFile(file, b, 0666) + }) + if err != nil { + fmt.Println("Copying exported files failed:", err) + os.Exit(1) + } +} + +func contains(a []string, s string) bool { + for _, e := range a { + if s == e { + return true + } + } + return false +} + +func indent(b *bytes.Buffer) string { + return strings.Replace(strings.TrimSpace(b.String()), "\n", "\n\t", -1) +} diff --git a/vendor/golang.org/x/text/internal/colltab/collate_test.go b/vendor/golang.org/x/text/internal/colltab/collate_test.go new file mode 100644 index 000000000..580c85c22 --- /dev/null +++ b/vendor/golang.org/x/text/internal/colltab/collate_test.go @@ -0,0 +1,121 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package colltab_test + +// This file contains tests which need to import package collate, which causes +// an import cycle when done within package colltab itself. + +import ( + "bytes" + "testing" + "unicode" + + "golang.org/x/text/collate" + "golang.org/x/text/language" + "golang.org/x/text/unicode/rangetable" +) + +// assigned is used to only test runes that are inside the scope of the Unicode +// version used to generation the collation table. +var assigned = rangetable.Assigned(collate.UnicodeVersion) + +func TestNonDigits(t *testing.T) { + c := collate.New(language.English, collate.Loose, collate.Numeric) + + // Verify that all non-digit numbers sort outside of the number range. + for r, hi := rune(unicode.N.R16[0].Lo), rune(unicode.N.R32[0].Hi); r <= hi; r++ { + if unicode.In(r, unicode.Nd) || !unicode.In(r, assigned) { + continue + } + if a := string(r); c.CompareString(a, "0") != -1 && c.CompareString(a, "999999") != 1 { + t.Errorf("%+q non-digit number is collated as digit", a) + } + } +} + +func TestNumericCompare(t *testing.T) { + c := collate.New(language.English, collate.Loose, collate.Numeric) + + // Iterate over all digits. + for _, r16 := range unicode.Nd.R16 { + testDigitCompare(t, c, rune(r16.Lo), rune(r16.Hi)) + } + for _, r32 := range unicode.Nd.R32 { + testDigitCompare(t, c, rune(r32.Lo), rune(r32.Hi)) + } +} + +func testDigitCompare(t *testing.T, c *collate.Collator, zero, nine rune) { + if !unicode.In(zero, assigned) { + return + } + n := int(nine - zero + 1) + if n%10 != 0 { + t.Fatalf("len([%+q, %+q]) = %d; want a multiple of 10", zero, nine, n) + } + for _, tt := range []struct { + prefix string + b [11]string + }{ + { + prefix: "", + b: [11]string{ + "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", + }, + }, + { + prefix: "1", + b: [11]string{ + "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", + }, + }, + { + prefix: "0", + b: [11]string{ + "00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", + }, + }, + { + prefix: "00", + b: [11]string{ + "000", "001", "002", "003", "004", "005", "006", "007", "008", "009", "010", + }, + }, + { + prefix: "9", + b: [11]string{ + "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "100", + }, + }, + } { + for k := 0; k <= n; k++ { + i := k % 10 + a := tt.prefix + string(zero+rune(i)) + for j, b := range tt.b { + want := 0 + switch { + case i < j: + want = -1 + case i > j: + want = 1 + } + got := c.CompareString(a, b) + if got != want { + t.Errorf("Compare(%+q, %+q) = %d; want %d", a, b, got, want) + return + } + } + } + } +} + +func BenchmarkNumericWeighter(b *testing.B) { + c := collate.New(language.English, collate.Numeric) + input := bytes.Repeat([]byte("Testing, testing 123..."), 100) + b.SetBytes(int64(2 * len(input))) + for i := 0; i < b.N; i++ { + c.Compare(input, input) + } +} diff --git a/vendor/golang.org/x/text/internal/colltab/collelem.go b/vendor/golang.org/x/text/internal/colltab/collelem.go new file mode 100644 index 000000000..28555897b --- /dev/null +++ b/vendor/golang.org/x/text/internal/colltab/collelem.go @@ -0,0 +1,371 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package colltab + +import ( + "fmt" + "unicode" +) + +// Level identifies the collation comparison level. +// The primary level corresponds to the basic sorting of text. +// The secondary level corresponds to accents and related linguistic elements. +// The tertiary level corresponds to casing and related concepts. +// The quaternary level is derived from the other levels by the +// various algorithms for handling variable elements. +type Level int + +const ( + Primary Level = iota + Secondary + Tertiary + Quaternary + Identity + + NumLevels +) + +const ( + defaultSecondary = 0x20 + defaultTertiary = 0x2 + maxTertiary = 0x1F + MaxQuaternary = 0x1FFFFF // 21 bits. +) + +// Elem is a representation of a collation element. This API provides ways to encode +// and decode Elems. Implementations of collation tables may use values greater +// or equal to PrivateUse for their own purposes. However, these should never be +// returned by AppendNext. +type Elem uint32 + +const ( + maxCE Elem = 0xAFFFFFFF + PrivateUse = minContract + minContract = 0xC0000000 + maxContract = 0xDFFFFFFF + minExpand = 0xE0000000 + maxExpand = 0xEFFFFFFF + minDecomp = 0xF0000000 +) + +type ceType int + +const ( + ceNormal ceType = iota // ceNormal includes implicits (ce == 0) + ceContractionIndex // rune can be a start of a contraction + ceExpansionIndex // rune expands into a sequence of collation elements + ceDecompose // rune expands using NFKC decomposition +) + +func (ce Elem) ctype() ceType { + if ce <= maxCE { + return ceNormal + } + if ce <= maxContract { + return ceContractionIndex + } else { + if ce <= maxExpand { + return ceExpansionIndex + } + return ceDecompose + } + panic("should not reach here") + return ceType(-1) +} + +// For normal collation elements, we assume that a collation element either has +// a primary or non-default secondary value, not both. +// Collation elements with a primary value are of the form +// 01pppppp pppppppp ppppppp0 ssssssss +// - p* is primary collation value +// - s* is the secondary collation value +// 00pppppp pppppppp ppppppps sssttttt, where +// - p* is primary collation value +// - s* offset of secondary from default value. +// - t* is the tertiary collation value +// 100ttttt cccccccc pppppppp pppppppp +// - t* is the tertiar collation value +// - c* is the canonical combining class +// - p* is the primary collation value +// Collation elements with a secondary value are of the form +// 1010cccc ccccssss ssssssss tttttttt, where +// - c* is the canonical combining class +// - s* is the secondary collation value +// - t* is the tertiary collation value +// 11qqqqqq qqqqqqqq qqqqqqq0 00000000 +// - q* quaternary value +const ( + ceTypeMask = 0xC0000000 + ceTypeMaskExt = 0xE0000000 + ceIgnoreMask = 0xF00FFFFF + ceType1 = 0x40000000 + ceType2 = 0x00000000 + ceType3or4 = 0x80000000 + ceType4 = 0xA0000000 + ceTypeQ = 0xC0000000 + Ignore = ceType4 + firstNonPrimary = 0x80000000 + lastSpecialPrimary = 0xA0000000 + secondaryMask = 0x80000000 + hasTertiaryMask = 0x40000000 + primaryValueMask = 0x3FFFFE00 + maxPrimaryBits = 21 + compactPrimaryBits = 16 + maxSecondaryBits = 12 + maxTertiaryBits = 8 + maxCCCBits = 8 + maxSecondaryCompactBits = 8 + maxSecondaryDiffBits = 4 + maxTertiaryCompactBits = 5 + primaryShift = 9 + compactSecondaryShift = 5 + minCompactSecondary = defaultSecondary - 4 +) + +func makeImplicitCE(primary int) Elem { + return ceType1 | Elem(primary<<primaryShift) | defaultSecondary +} + +// MakeElem returns an Elem for the given values. It will return an error +// if the given combination of values is invalid. +func MakeElem(primary, secondary, tertiary int, ccc uint8) (Elem, error) { + if w := primary; w >= 1<<maxPrimaryBits || w < 0 { + return 0, fmt.Errorf("makeCE: primary weight out of bounds: %x >= %x", w, 1<<maxPrimaryBits) + } + if w := secondary; w >= 1<<maxSecondaryBits || w < 0 { + return 0, fmt.Errorf("makeCE: secondary weight out of bounds: %x >= %x", w, 1<<maxSecondaryBits) + } + if w := tertiary; w >= 1<<maxTertiaryBits || w < 0 { + return 0, fmt.Errorf("makeCE: tertiary weight out of bounds: %x >= %x", w, 1<<maxTertiaryBits) + } + ce := Elem(0) + if primary != 0 { + if ccc != 0 { + if primary >= 1<<compactPrimaryBits { + return 0, fmt.Errorf("makeCE: primary weight with non-zero CCC out of bounds: %x >= %x", primary, 1<<compactPrimaryBits) + } + if secondary != defaultSecondary { + return 0, fmt.Errorf("makeCE: cannot combine non-default secondary value (%x) with non-zero CCC (%x)", secondary, ccc) + } + ce = Elem(tertiary << (compactPrimaryBits + maxCCCBits)) + ce |= Elem(ccc) << compactPrimaryBits + ce |= Elem(primary) + ce |= ceType3or4 + } else if tertiary == defaultTertiary { + if secondary >= 1<<maxSecondaryCompactBits { + return 0, fmt.Errorf("makeCE: secondary weight with non-zero primary out of bounds: %x >= %x", secondary, 1<<maxSecondaryCompactBits) + } + ce = Elem(primary<<(maxSecondaryCompactBits+1) + secondary) + ce |= ceType1 + } else { + d := secondary - defaultSecondary + maxSecondaryDiffBits + if d >= 1<<maxSecondaryDiffBits || d < 0 { + return 0, fmt.Errorf("makeCE: secondary weight diff out of bounds: %x < 0 || %x > %x", d, d, 1<<maxSecondaryDiffBits) + } + if tertiary >= 1<<maxTertiaryCompactBits { + return 0, fmt.Errorf("makeCE: tertiary weight with non-zero primary out of bounds: %x > %x", tertiary, 1<<maxTertiaryCompactBits) + } + ce = Elem(primary<<maxSecondaryDiffBits + d) + ce = ce<<maxTertiaryCompactBits + Elem(tertiary) + } + } else { + ce = Elem(secondary<<maxTertiaryBits + tertiary) + ce += Elem(ccc) << (maxSecondaryBits + maxTertiaryBits) + ce |= ceType4 + } + return ce, nil +} + +// MakeQuaternary returns an Elem with the given quaternary value. +func MakeQuaternary(v int) Elem { + return ceTypeQ | Elem(v<<primaryShift) +} + +// Mask sets weights for any level smaller than l to 0. +// The resulting Elem can be used to test for equality with +// other Elems to which the same mask has been applied. +func (ce Elem) Mask(l Level) uint32 { + return 0 +} + +// CCC returns the canonical combining class associated with the underlying character, +// if applicable, or 0 otherwise. +func (ce Elem) CCC() uint8 { + if ce&ceType3or4 != 0 { + if ce&ceType4 == ceType3or4 { + return uint8(ce >> 16) + } + return uint8(ce >> 20) + } + return 0 +} + +// Primary returns the primary collation weight for ce. +func (ce Elem) Primary() int { + if ce >= firstNonPrimary { + if ce > lastSpecialPrimary { + return 0 + } + return int(uint16(ce)) + } + return int(ce&primaryValueMask) >> primaryShift +} + +// Secondary returns the secondary collation weight for ce. +func (ce Elem) Secondary() int { + switch ce & ceTypeMask { + case ceType1: + return int(uint8(ce)) + case ceType2: + return minCompactSecondary + int((ce>>compactSecondaryShift)&0xF) + case ceType3or4: + if ce < ceType4 { + return defaultSecondary + } + return int(ce>>8) & 0xFFF + case ceTypeQ: + return 0 + } + panic("should not reach here") +} + +// Tertiary returns the tertiary collation weight for ce. +func (ce Elem) Tertiary() uint8 { + if ce&hasTertiaryMask == 0 { + if ce&ceType3or4 == 0 { + return uint8(ce & 0x1F) + } + if ce&ceType4 == ceType4 { + return uint8(ce) + } + return uint8(ce>>24) & 0x1F // type 2 + } else if ce&ceTypeMask == ceType1 { + return defaultTertiary + } + // ce is a quaternary value. + return 0 +} + +func (ce Elem) updateTertiary(t uint8) Elem { + if ce&ceTypeMask == ceType1 { + // convert to type 4 + nce := ce & primaryValueMask + nce |= Elem(uint8(ce)-minCompactSecondary) << compactSecondaryShift + ce = nce + } else if ce&ceTypeMaskExt == ceType3or4 { + ce &= ^Elem(maxTertiary << 24) + return ce | (Elem(t) << 24) + } else { + // type 2 or 4 + ce &= ^Elem(maxTertiary) + } + return ce | Elem(t) +} + +// Quaternary returns the quaternary value if explicitly specified, +// 0 if ce == Ignore, or MaxQuaternary otherwise. +// Quaternary values are used only for shifted variants. +func (ce Elem) Quaternary() int { + if ce&ceTypeMask == ceTypeQ { + return int(ce&primaryValueMask) >> primaryShift + } else if ce&ceIgnoreMask == Ignore { + return 0 + } + return MaxQuaternary +} + +// Weight returns the collation weight for the given level. +func (ce Elem) Weight(l Level) int { + switch l { + case Primary: + return ce.Primary() + case Secondary: + return ce.Secondary() + case Tertiary: + return int(ce.Tertiary()) + case Quaternary: + return ce.Quaternary() + } + return 0 // return 0 (ignore) for undefined levels. +} + +// For contractions, collation elements are of the form +// 110bbbbb bbbbbbbb iiiiiiii iiiinnnn, where +// - n* is the size of the first node in the contraction trie. +// - i* is the index of the first node in the contraction trie. +// - b* is the offset into the contraction collation element table. +// See contract.go for details on the contraction trie. +const ( + maxNBits = 4 + maxTrieIndexBits = 12 + maxContractOffsetBits = 13 +) + +func splitContractIndex(ce Elem) (index, n, offset int) { + n = int(ce & (1<<maxNBits - 1)) + ce >>= maxNBits + index = int(ce & (1<<maxTrieIndexBits - 1)) + ce >>= maxTrieIndexBits + offset = int(ce & (1<<maxContractOffsetBits - 1)) + return +} + +// For expansions, Elems are of the form 11100000 00000000 bbbbbbbb bbbbbbbb, +// where b* is the index into the expansion sequence table. +const maxExpandIndexBits = 16 + +func splitExpandIndex(ce Elem) (index int) { + return int(uint16(ce)) +} + +// Some runes can be expanded using NFKD decomposition. Instead of storing the full +// sequence of collation elements, we decompose the rune and lookup the collation +// elements for each rune in the decomposition and modify the tertiary weights. +// The Elem, in this case, is of the form 11110000 00000000 wwwwwwww vvvvvvvv, where +// - v* is the replacement tertiary weight for the first rune, +// - w* is the replacement tertiary weight for the second rune, +// Tertiary weights of subsequent runes should be replaced with maxTertiary. +// See http://www.unicode.org/reports/tr10/#Compatibility_Decompositions for more details. +func splitDecompose(ce Elem) (t1, t2 uint8) { + return uint8(ce), uint8(ce >> 8) +} + +const ( + // These constants were taken from http://www.unicode.org/versions/Unicode6.0.0/ch12.pdf. + minUnified rune = 0x4E00 + maxUnified = 0x9FFF + minCompatibility = 0xF900 + maxCompatibility = 0xFAFF + minRare = 0x3400 + maxRare = 0x4DBF +) +const ( + commonUnifiedOffset = 0x10000 + rareUnifiedOffset = 0x20000 // largest rune in common is U+FAFF + otherOffset = 0x50000 // largest rune in rare is U+2FA1D + illegalOffset = otherOffset + int(unicode.MaxRune) + maxPrimary = illegalOffset + 1 +) + +// implicitPrimary returns the primary weight for the a rune +// for which there is no entry for the rune in the collation table. +// We take a different approach from the one specified in +// http://unicode.org/reports/tr10/#Implicit_Weights, +// but preserve the resulting relative ordering of the runes. +func implicitPrimary(r rune) int { + if unicode.Is(unicode.Ideographic, r) { + if r >= minUnified && r <= maxUnified { + // The most common case for CJK. + return int(r) + commonUnifiedOffset + } + if r >= minCompatibility && r <= maxCompatibility { + // This will typically not hit. The DUCET explicitly specifies mappings + // for all characters that do not decompose. + return int(r) + commonUnifiedOffset + } + return int(r) + rareUnifiedOffset + } + return int(r) + otherOffset +} diff --git a/vendor/golang.org/x/text/internal/colltab/collelem_test.go b/vendor/golang.org/x/text/internal/colltab/collelem_test.go new file mode 100644 index 000000000..f131ecc32 --- /dev/null +++ b/vendor/golang.org/x/text/internal/colltab/collelem_test.go @@ -0,0 +1,183 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package colltab + +import ( + "fmt" + "testing" + "unicode" +) + +func (e Elem) String() string { + q := "" + if v := e.Quaternary(); v == MaxQuaternary { + q = "max" + } else { + q = fmt.Sprint(v) + } + return fmt.Sprintf("[%d, %d, %d, %s]", + e.Primary(), + e.Secondary(), + e.Tertiary(), + q) +} + +type ceTest struct { + f func(inout []int) (Elem, ceType) + arg []int +} + +func makeCE(weights []int) Elem { + ce, _ := MakeElem(weights[0], weights[1], weights[2], uint8(weights[3])) + return ce +} + +var defaultValues = []int{0, defaultSecondary, defaultTertiary, 0} + +func e(w ...int) Elem { + return makeCE(append(w, defaultValues[len(w):]...)) +} + +func makeContractIndex(index, n, offset int) Elem { + const ( + contractID = 0xC0000000 + maxNBits = 4 + maxTrieIndexBits = 12 + maxContractOffsetBits = 13 + ) + ce := Elem(contractID) + ce += Elem(offset << (maxNBits + maxTrieIndexBits)) + ce += Elem(index << maxNBits) + ce += Elem(n) + return ce +} + +func makeExpandIndex(index int) Elem { + const expandID = 0xE0000000 + return expandID + Elem(index) +} + +func makeDecompose(t1, t2 int) Elem { + const decompID = 0xF0000000 + return Elem(t2<<8+t1) + decompID +} + +func normalCE(inout []int) (ce Elem, t ceType) { + ce = makeCE(inout) + inout[0] = ce.Primary() + inout[1] = ce.Secondary() + inout[2] = int(ce.Tertiary()) + inout[3] = int(ce.CCC()) + return ce, ceNormal +} + +func expandCE(inout []int) (ce Elem, t ceType) { + ce = makeExpandIndex(inout[0]) + inout[0] = splitExpandIndex(ce) + return ce, ceExpansionIndex +} + +func contractCE(inout []int) (ce Elem, t ceType) { + ce = makeContractIndex(inout[0], inout[1], inout[2]) + i, n, o := splitContractIndex(ce) + inout[0], inout[1], inout[2] = i, n, o + return ce, ceContractionIndex +} + +func decompCE(inout []int) (ce Elem, t ceType) { + ce = makeDecompose(inout[0], inout[1]) + t1, t2 := splitDecompose(ce) + inout[0], inout[1] = int(t1), int(t2) + return ce, ceDecompose +} + +var ceTests = []ceTest{ + {normalCE, []int{0, 0, 0, 0}}, + {normalCE, []int{0, 30, 3, 0}}, + {normalCE, []int{0, 30, 3, 0xFF}}, + {normalCE, []int{100, defaultSecondary, defaultTertiary, 0}}, + {normalCE, []int{100, defaultSecondary, defaultTertiary, 0xFF}}, + {normalCE, []int{100, defaultSecondary, 3, 0}}, + {normalCE, []int{0x123, defaultSecondary, 8, 0xFF}}, + + {contractCE, []int{0, 0, 0}}, + {contractCE, []int{1, 1, 1}}, + {contractCE, []int{1, (1 << maxNBits) - 1, 1}}, + {contractCE, []int{(1 << maxTrieIndexBits) - 1, 1, 1}}, + {contractCE, []int{1, 1, (1 << maxContractOffsetBits) - 1}}, + + {expandCE, []int{0}}, + {expandCE, []int{5}}, + {expandCE, []int{(1 << maxExpandIndexBits) - 1}}, + + {decompCE, []int{0, 0}}, + {decompCE, []int{1, 1}}, + {decompCE, []int{0x1F, 0x1F}}, +} + +func TestColElem(t *testing.T) { + for i, tt := range ceTests { + inout := make([]int, len(tt.arg)) + copy(inout, tt.arg) + ce, typ := tt.f(inout) + if ce.ctype() != typ { + t.Errorf("%d: type is %d; want %d (ColElem: %X)", i, ce.ctype(), typ, ce) + } + for j, a := range tt.arg { + if inout[j] != a { + t.Errorf("%d: argument %d is %X; want %X (ColElem: %X)", i, j, inout[j], a, ce) + } + } + } +} + +type implicitTest struct { + r rune + p int +} + +var implicitTests = []implicitTest{ + {0x33FF, 0x533FF}, + {0x3400, 0x23400}, + {0x4DC0, 0x54DC0}, + {0x4DFF, 0x54DFF}, + {0x4E00, 0x14E00}, + {0x9FCB, 0x19FCB}, + {0xA000, 0x5A000}, + {0xF8FF, 0x5F8FF}, + {0xF900, 0x1F900}, + {0xFA23, 0x1FA23}, + {0xFAD9, 0x1FAD9}, + {0xFB00, 0x5FB00}, + {0x20000, 0x40000}, + {0x2B81C, 0x4B81C}, + {unicode.MaxRune, 0x15FFFF}, // maximum primary value +} + +func TestImplicit(t *testing.T) { + for _, tt := range implicitTests { + if p := implicitPrimary(tt.r); p != tt.p { + t.Errorf("%U: was %X; want %X", tt.r, p, tt.p) + } + } +} + +func TestUpdateTertiary(t *testing.T) { + tests := []struct { + in, out Elem + t uint8 + }{ + {0x4000FE20, 0x0000FE8A, 0x0A}, + {0x4000FE21, 0x0000FEAA, 0x0A}, + {0x0000FE8B, 0x0000FE83, 0x03}, + {0x82FF0188, 0x9BFF0188, 0x1B}, + {0xAFF0CC02, 0xAFF0CC1B, 0x1B}, + } + for i, tt := range tests { + if out := tt.in.updateTertiary(tt.t); out != tt.out { + t.Errorf("%d: was %X; want %X", i, out, tt.out) + } + } +} diff --git a/vendor/golang.org/x/text/internal/colltab/colltab.go b/vendor/golang.org/x/text/internal/colltab/colltab.go new file mode 100644 index 000000000..02f22477e --- /dev/null +++ b/vendor/golang.org/x/text/internal/colltab/colltab.go @@ -0,0 +1,105 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package colltab contains functionality related to collation tables. +// It is only to be used by the collate and search packages. +package colltab // import "golang.org/x/text/internal/colltab" + +import ( + "sort" + + "golang.org/x/text/language" +) + +// MatchLang finds the index of t in tags, using a matching algorithm used for +// collation and search. tags[0] must be language.Und, the remaining tags should +// be sorted alphabetically. +// +// Language matching for collation and search is different from the matching +// defined by language.Matcher: the (inferred) base language must be an exact +// match for the relevant fields. For example, "gsw" should not match "de". +// Also the parent relation is different, as a parent may have a different +// script. So usually the parent of zh-Hant is und, whereas for MatchLang it is +// zh. +func MatchLang(t language.Tag, tags []language.Tag) int { + // Canonicalize the values, including collapsing macro languages. + t, _ = language.All.Canonicalize(t) + + base, conf := t.Base() + // Estimate the base language, but only use high-confidence values. + if conf < language.High { + // The root locale supports "search" and "standard". We assume that any + // implementation will only use one of both. + return 0 + } + + // Maximize base and script and normalize the tag. + if _, s, r := t.Raw(); (r != language.Region{}) { + p, _ := language.Raw.Compose(base, s, r) + // Taking the parent forces the script to be maximized. + p = p.Parent() + // Add back region and extensions. + t, _ = language.Raw.Compose(p, r, t.Extensions()) + } else { + // Set the maximized base language. + t, _ = language.Raw.Compose(base, s, t.Extensions()) + } + + // Find start index of the language tag. + start := 1 + sort.Search(len(tags)-1, func(i int) bool { + b, _, _ := tags[i+1].Raw() + return base.String() <= b.String() + }) + if start < len(tags) { + if b, _, _ := tags[start].Raw(); b != base { + return 0 + } + } + + // Besides the base language, script and region, only the collation type and + // the custom variant defined in the 'u' extension are used to distinguish a + // locale. + // Strip all variants and extensions and add back the custom variant. + tdef, _ := language.Raw.Compose(t.Raw()) + tdef, _ = tdef.SetTypeForKey("va", t.TypeForKey("va")) + + // First search for a specialized collation type, if present. + try := []language.Tag{tdef} + if co := t.TypeForKey("co"); co != "" { + tco, _ := tdef.SetTypeForKey("co", co) + try = []language.Tag{tco, tdef} + } + + for _, tx := range try { + for ; tx != language.Und; tx = parent(tx) { + for i, t := range tags[start:] { + if b, _, _ := t.Raw(); b != base { + break + } + if tx == t { + return start + i + } + } + } + } + return 0 +} + +// parent computes the structural parent. This means inheritance may change +// script. So, unlike the CLDR parent, parent(zh-Hant) == zh. +func parent(t language.Tag) language.Tag { + if t.TypeForKey("va") != "" { + t, _ = t.SetTypeForKey("va", "") + return t + } + result := language.Und + if b, s, r := t.Raw(); (r != language.Region{}) { + result, _ = language.Raw.Compose(b, s, t.Extensions()) + } else if (s != language.Script{}) { + result, _ = language.Raw.Compose(b, t.Extensions()) + } else if (b != language.Base{}) { + result, _ = language.Raw.Compose(t.Extensions()) + } + return result +} diff --git a/vendor/golang.org/x/text/internal/colltab/colltab_test.go b/vendor/golang.org/x/text/internal/colltab/colltab_test.go new file mode 100644 index 000000000..c403ac346 --- /dev/null +++ b/vendor/golang.org/x/text/internal/colltab/colltab_test.go @@ -0,0 +1,64 @@ +package colltab + +import ( + "testing" + + "golang.org/x/text/language" +) + +func TestMatchLang(t *testing.T) { + tags := []language.Tag{ + 0: language.Und, + 1: language.MustParse("bs"), + 2: language.German, + 3: language.English, + 4: language.AmericanEnglish, + 5: language.MustParse("en-US-u-va-posix"), + 6: language.Portuguese, + 7: language.Serbian, + 8: language.MustParse("sr-Latn"), + 9: language.Chinese, + 10: language.MustParse("zh-u-co-stroke"), + 11: language.MustParse("zh-Hant-u-co-pinyin"), + 12: language.TraditionalChinese, + } + for i, tc := range []struct { + x int + t language.Tag + }{ + {0, language.Und}, + {0, language.Persian}, // Default to first element when no match. + {3, language.English}, + {4, language.AmericanEnglish}, + {5, language.MustParse("en-US-u-va-posix")}, // Ext. variant match. + {4, language.MustParse("en-US-u-va-noposix")}, // Ext. variant mismatch. + {3, language.MustParse("en-UK-u-va-noposix")}, // Ext. variant mismatch. + {7, language.Serbian}, + {0, language.Croatian}, // Don't match to close language! + {0, language.MustParse("gsw")}, // Don't match to close language! + {1, language.MustParse("bs-Cyrl")}, // Odd, but correct. + {1, language.MustParse("bs-Latn")}, // Estimated script drops. + {8, language.MustParse("sr-Latn")}, + {9, language.Chinese}, + {9, language.SimplifiedChinese}, + {12, language.TraditionalChinese}, + {11, language.MustParse("zh-Hant-u-co-pinyin")}, + // TODO: should this be 12? Either inherited value (10) or default is + // fine in this case, though. Other locales are not affected. + {10, language.MustParse("zh-Hant-u-co-stroke")}, + // There is no "phonebk" sorting order for zh-Hant, so use default. + {12, language.MustParse("zh-Hant-u-co-phonebk")}, + {10, language.MustParse("zh-u-co-stroke")}, + {12, language.MustParse("und-TW")}, // Infer script and language. + {12, language.MustParse("und-HK")}, // Infer script and language. + {6, language.MustParse("und-BR")}, // Infer script and language. + {6, language.MustParse("und-PT")}, // Infer script and language. + {2, language.MustParse("und-Latn-DE")}, // Infer language. + {0, language.MustParse("und-Jpan-BR")}, // Infers "ja", so no match. + {0, language.MustParse("zu")}, // No match past index. + } { + if x := MatchLang(tc.t, tags); x != tc.x { + t.Errorf("%d: MatchLang(%q, tags) = %d; want %d", i, tc.t, x, tc.x) + } + } +} diff --git a/vendor/golang.org/x/text/internal/colltab/contract.go b/vendor/golang.org/x/text/internal/colltab/contract.go new file mode 100644 index 000000000..25649d4f5 --- /dev/null +++ b/vendor/golang.org/x/text/internal/colltab/contract.go @@ -0,0 +1,145 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package colltab + +import "unicode/utf8" + +// For a description of ContractTrieSet, see text/collate/build/contract.go. + +type ContractTrieSet []struct{ L, H, N, I uint8 } + +// ctScanner is used to match a trie to an input sequence. +// A contraction may match a non-contiguous sequence of bytes in an input string. +// For example, if there is a contraction for <a, combining_ring>, it should match +// the sequence <a, combining_cedilla, combining_ring>, as combining_cedilla does +// not block combining_ring. +// ctScanner does not automatically skip over non-blocking non-starters, but rather +// retains the state of the last match and leaves it up to the user to continue +// the match at the appropriate points. +type ctScanner struct { + states ContractTrieSet + s []byte + n int + index int + pindex int + done bool +} + +type ctScannerString struct { + states ContractTrieSet + s string + n int + index int + pindex int + done bool +} + +func (t ContractTrieSet) scanner(index, n int, b []byte) ctScanner { + return ctScanner{s: b, states: t[index:], n: n} +} + +func (t ContractTrieSet) scannerString(index, n int, str string) ctScannerString { + return ctScannerString{s: str, states: t[index:], n: n} +} + +// result returns the offset i and bytes consumed p so far. If no suffix +// matched, i and p will be 0. +func (s *ctScanner) result() (i, p int) { + return s.index, s.pindex +} + +func (s *ctScannerString) result() (i, p int) { + return s.index, s.pindex +} + +const ( + final = 0 + noIndex = 0xFF +) + +// scan matches the longest suffix at the current location in the input +// and returns the number of bytes consumed. +func (s *ctScanner) scan(p int) int { + pr := p // the p at the rune start + str := s.s + states, n := s.states, s.n + for i := 0; i < n && p < len(str); { + e := states[i] + c := str[p] + // TODO: a significant number of contractions are of a form that + // cannot match discontiguous UTF-8 in a normalized string. We could let + // a negative value of e.n mean that we can set s.done = true and avoid + // the need for additional matches. + if c >= e.L { + if e.L == c { + p++ + if e.I != noIndex { + s.index = int(e.I) + s.pindex = p + } + if e.N != final { + i, states, n = 0, states[int(e.H)+n:], int(e.N) + if p >= len(str) || utf8.RuneStart(str[p]) { + s.states, s.n, pr = states, n, p + } + } else { + s.done = true + return p + } + continue + } else if e.N == final && c <= e.H { + p++ + s.done = true + s.index = int(c-e.L) + int(e.I) + s.pindex = p + return p + } + } + i++ + } + return pr +} + +// scan is a verbatim copy of ctScanner.scan. +func (s *ctScannerString) scan(p int) int { + pr := p // the p at the rune start + str := s.s + states, n := s.states, s.n + for i := 0; i < n && p < len(str); { + e := states[i] + c := str[p] + // TODO: a significant number of contractions are of a form that + // cannot match discontiguous UTF-8 in a normalized string. We could let + // a negative value of e.n mean that we can set s.done = true and avoid + // the need for additional matches. + if c >= e.L { + if e.L == c { + p++ + if e.I != noIndex { + s.index = int(e.I) + s.pindex = p + } + if e.N != final { + i, states, n = 0, states[int(e.H)+n:], int(e.N) + if p >= len(str) || utf8.RuneStart(str[p]) { + s.states, s.n, pr = states, n, p + } + } else { + s.done = true + return p + } + continue + } else if e.N == final && c <= e.H { + p++ + s.done = true + s.index = int(c-e.L) + int(e.I) + s.pindex = p + return p + } + } + i++ + } + return pr +} diff --git a/vendor/golang.org/x/text/internal/colltab/contract_test.go b/vendor/golang.org/x/text/internal/colltab/contract_test.go new file mode 100644 index 000000000..ce2871dd4 --- /dev/null +++ b/vendor/golang.org/x/text/internal/colltab/contract_test.go @@ -0,0 +1,131 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package colltab + +import ( + "testing" +) + +type lookupStrings struct { + str string + offset int + n int // bytes consumed from input +} + +type LookupTest struct { + lookup []lookupStrings + n int + tries ContractTrieSet +} + +var lookupTests = []LookupTest{{ + []lookupStrings{ + {"abc", 1, 3}, + {"a", 0, 0}, + {"b", 0, 0}, + {"c", 0, 0}, + {"d", 0, 0}, + }, + 1, + ContractTrieSet{ + {'a', 0, 1, 0xFF}, + {'b', 0, 1, 0xFF}, + {'c', 'c', 0, 1}, + }, +}, { + []lookupStrings{ + {"abc", 1, 3}, + {"abd", 2, 3}, + {"abe", 3, 3}, + {"a", 0, 0}, + {"ab", 0, 0}, + {"d", 0, 0}, + {"f", 0, 0}, + }, + 1, + ContractTrieSet{ + {'a', 0, 1, 0xFF}, + {'b', 0, 1, 0xFF}, + {'c', 'e', 0, 1}, + }, +}, { + []lookupStrings{ + {"abc", 1, 3}, + {"ab", 2, 2}, + {"a", 3, 1}, + {"abcd", 1, 3}, + {"abe", 2, 2}, + }, + 1, + ContractTrieSet{ + {'a', 0, 1, 3}, + {'b', 0, 1, 2}, + {'c', 'c', 0, 1}, + }, +}, { + []lookupStrings{ + {"abc", 1, 3}, + {"abd", 2, 3}, + {"ab", 3, 2}, + {"ac", 4, 2}, + {"a", 5, 1}, + {"b", 6, 1}, + {"ba", 6, 1}, + }, + 2, + ContractTrieSet{ + {'b', 'b', 0, 6}, + {'a', 0, 2, 5}, + {'c', 'c', 0, 4}, + {'b', 0, 1, 3}, + {'c', 'd', 0, 1}, + }, +}, { + []lookupStrings{ + {"bcde", 2, 4}, + {"bc", 7, 2}, + {"ab", 6, 2}, + {"bcd", 5, 3}, + {"abcd", 1, 4}, + {"abc", 4, 3}, + {"bcdf", 3, 4}, + }, + 2, + ContractTrieSet{ + {'b', 3, 1, 0xFF}, + {'a', 0, 1, 0xFF}, + {'b', 0, 1, 6}, + {'c', 0, 1, 4}, + {'d', 'd', 0, 1}, + {'c', 0, 1, 7}, + {'d', 0, 1, 5}, + {'e', 'f', 0, 2}, + }, +}} + +func lookup(c *ContractTrieSet, nnode int, s []uint8) (i, n int) { + scan := c.scanner(0, nnode, s) + scan.scan(0) + return scan.result() +} + +func TestLookupContraction(t *testing.T) { + for i, tt := range lookupTests { + cts := ContractTrieSet(tt.tries) + for j, lu := range tt.lookup { + str := lu.str + for _, s := range []string{str, str + "X"} { + const msg = `%d:%d: %s of "%s" %v; want %v` + offset, n := lookup(&cts, tt.n, []byte(s)) + if offset != lu.offset { + t.Errorf(msg, i, j, "offset", s, offset, lu.offset) + } + if n != lu.n { + t.Errorf(msg, i, j, "bytes consumed", s, n, len(str)) + } + } + } + } +} diff --git a/vendor/golang.org/x/text/internal/colltab/iter.go b/vendor/golang.org/x/text/internal/colltab/iter.go new file mode 100644 index 000000000..c1b1ba81e --- /dev/null +++ b/vendor/golang.org/x/text/internal/colltab/iter.go @@ -0,0 +1,178 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package colltab + +// An Iter incrementally converts chunks of the input text to collation +// elements, while ensuring that the collation elements are in normalized order +// (that is, they are in the order as if the input text were normalized first). +type Iter struct { + Weighter Weighter + Elems []Elem + // N is the number of elements in Elems that will not be reordered on + // subsequent iterations, N <= len(Elems). + N int + + bytes []byte + str string + // Because the Elems buffer may contain collation elements that are needed + // for look-ahead, we need two positions in the text (bytes or str): one for + // the end position in the text for the current iteration and one for the + // start of the next call to appendNext. + pEnd int // end position in text corresponding to N. + pNext int // pEnd <= pNext. +} + +// Reset sets the position in the current input text to p and discards any +// results obtained so far. +func (i *Iter) Reset(p int) { + i.Elems = i.Elems[:0] + i.N = 0 + i.pEnd = p + i.pNext = p +} + +// Len returns the length of the input text. +func (i *Iter) Len() int { + if i.bytes != nil { + return len(i.bytes) + } + return len(i.str) +} + +// Discard removes the collation elements up to N. +func (i *Iter) Discard() { + // TODO: change this such that only modifiers following starters will have + // to be copied. + i.Elems = i.Elems[:copy(i.Elems, i.Elems[i.N:])] + i.N = 0 +} + +// End returns the end position of the input text for which Next has returned +// results. +func (i *Iter) End() int { + return i.pEnd +} + +// SetInput resets i to input s. +func (i *Iter) SetInput(s []byte) { + i.bytes = s + i.str = "" + i.Reset(0) +} + +// SetInputString resets i to input s. +func (i *Iter) SetInputString(s string) { + i.str = s + i.bytes = nil + i.Reset(0) +} + +func (i *Iter) done() bool { + return i.pNext >= len(i.str) && i.pNext >= len(i.bytes) +} + +func (i *Iter) appendNext() bool { + if i.done() { + return false + } + var sz int + if i.bytes == nil { + i.Elems, sz = i.Weighter.AppendNextString(i.Elems, i.str[i.pNext:]) + } else { + i.Elems, sz = i.Weighter.AppendNext(i.Elems, i.bytes[i.pNext:]) + } + if sz == 0 { + sz = 1 + } + i.pNext += sz + return true +} + +// Next appends Elems to the internal array. On each iteration, it will either +// add starters or modifiers. In the majority of cases, an Elem with a primary +// value > 0 will have a CCC of 0. The CCC values of collation elements are also +// used to detect if the input string was not normalized and to adjust the +// result accordingly. +func (i *Iter) Next() bool { + if i.N == len(i.Elems) && !i.appendNext() { + return false + } + + // Check if the current segment starts with a starter. + prevCCC := i.Elems[len(i.Elems)-1].CCC() + if prevCCC == 0 { + i.N = len(i.Elems) + i.pEnd = i.pNext + return true + } else if i.Elems[i.N].CCC() == 0 { + // set i.N to only cover part of i.Elems for which prevCCC == 0 and + // use rest for the next call to next. + for i.N++; i.N < len(i.Elems) && i.Elems[i.N].CCC() == 0; i.N++ { + } + i.pEnd = i.pNext + return true + } + + // The current (partial) segment starts with modifiers. We need to collect + // all successive modifiers to ensure that they are normalized. + for { + p := len(i.Elems) + i.pEnd = i.pNext + if !i.appendNext() { + break + } + + if ccc := i.Elems[p].CCC(); ccc == 0 || len(i.Elems)-i.N > maxCombiningCharacters { + // Leave the starter for the next iteration. This ensures that we + // do not return sequences of collation elements that cross two + // segments. + // + // TODO: handle large number of combining characters by fully + // normalizing the input segment before iteration. This ensures + // results are consistent across the text repo. + i.N = p + return true + } else if ccc < prevCCC { + i.doNorm(p, ccc) // should be rare, never occurs for NFD and FCC. + } else { + prevCCC = ccc + } + } + + done := len(i.Elems) != i.N + i.N = len(i.Elems) + return done +} + +// nextNoNorm is the same as next, but does not "normalize" the collation +// elements. +func (i *Iter) nextNoNorm() bool { + // TODO: remove this function. Using this instead of next does not seem + // to improve performance in any significant way. We retain this until + // later for evaluation purposes. + if i.done() { + return false + } + i.appendNext() + i.N = len(i.Elems) + return true +} + +const maxCombiningCharacters = 30 + +// doNorm reorders the collation elements in i.Elems. +// It assumes that blocks of collation elements added with appendNext +// either start and end with the same CCC or start with CCC == 0. +// This allows for a single insertion point for the entire block. +// The correctness of this assumption is verified in builder.go. +func (i *Iter) doNorm(p int, ccc uint8) { + n := len(i.Elems) + k := p + for p--; p > i.N && ccc < i.Elems[p-1].CCC(); p-- { + } + i.Elems = append(i.Elems, i.Elems[p:k]...) + copy(i.Elems[p:], i.Elems[k:]) + i.Elems = i.Elems[:n] +} diff --git a/vendor/golang.org/x/text/internal/colltab/iter_test.go b/vendor/golang.org/x/text/internal/colltab/iter_test.go new file mode 100644 index 000000000..5783534c7 --- /dev/null +++ b/vendor/golang.org/x/text/internal/colltab/iter_test.go @@ -0,0 +1,63 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package colltab + +import ( + "testing" +) + +func TestDoNorm(t *testing.T) { + const div = -1 // The insertion point of the next block. + tests := []struct { + in, out []int + }{{ + in: []int{4, div, 3}, + out: []int{3, 4}, + }, { + in: []int{4, div, 3, 3, 3}, + out: []int{3, 3, 3, 4}, + }, { + in: []int{0, 4, div, 3}, + out: []int{0, 3, 4}, + }, { + in: []int{0, 0, 4, 5, div, 3, 3}, + out: []int{0, 0, 3, 3, 4, 5}, + }, { + in: []int{0, 0, 1, 4, 5, div, 3, 3}, + out: []int{0, 0, 1, 3, 3, 4, 5}, + }, { + in: []int{0, 0, 1, 4, 5, div, 4, 4}, + out: []int{0, 0, 1, 4, 4, 4, 5}, + }, + } + for j, tt := range tests { + i := Iter{} + var w, p int + for k, cc := range tt.in { + + if cc == div { + w = 100 + p = k + continue + } + i.Elems = append(i.Elems, makeCE([]int{w, defaultSecondary, 2, cc})) + } + i.doNorm(p, i.Elems[p].CCC()) + if len(i.Elems) != len(tt.out) { + t.Errorf("%d: length was %d; want %d", j, len(i.Elems), len(tt.out)) + } + prevCCC := uint8(0) + for k, ce := range i.Elems { + if int(ce.CCC()) != tt.out[k] { + t.Errorf("%d:%d: unexpected CCC. Was %d; want %d", j, k, ce.CCC(), tt.out[k]) + } + if k > 0 && ce.CCC() == prevCCC && i.Elems[k-1].Primary() > ce.Primary() { + t.Errorf("%d:%d: normalization crossed across CCC boundary.", j, k) + } + } + } + + // Combining rune overflow is tested in search/pattern_test.go. +} diff --git a/vendor/golang.org/x/text/internal/colltab/numeric.go b/vendor/golang.org/x/text/internal/colltab/numeric.go new file mode 100644 index 000000000..38c255cb4 --- /dev/null +++ b/vendor/golang.org/x/text/internal/colltab/numeric.go @@ -0,0 +1,236 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package colltab + +import ( + "unicode" + "unicode/utf8" +) + +// NewNumericWeighter wraps w to replace individual digits to sort based on their +// numeric value. +// +// Weighter w must have a free primary weight after the primary weight for 9. +// If this is not the case, numeric value will sort at the same primary level +// as the first primary sorting after 9. +func NewNumericWeighter(w Weighter) Weighter { + getElem := func(s string) Elem { + elems, _ := w.AppendNextString(nil, s) + return elems[0] + } + nine := getElem("9") + + // Numbers should order before zero, but the DUCET has no room for this. + // TODO: move before zero once we use fractional collation elements. + ns, _ := MakeElem(nine.Primary()+1, nine.Secondary(), int(nine.Tertiary()), 0) + + return &numericWeighter{ + Weighter: w, + + // We assume that w sorts digits of different kinds in order of numeric + // value and that the tertiary weight order is preserved. + // + // TODO: evaluate whether it is worth basing the ranges on the Elem + // encoding itself once the move to fractional weights is complete. + zero: getElem("0"), + zeroSpecialLo: getElem("0"), // U+FF10 FULLWIDTH DIGIT ZERO + zeroSpecialHi: getElem("₀"), // U+2080 SUBSCRIPT ZERO + nine: nine, + nineSpecialHi: getElem("₉"), // U+2089 SUBSCRIPT NINE + numberStart: ns, + } +} + +// A numericWeighter translates a stream of digits into a stream of weights +// representing the numeric value. +type numericWeighter struct { + Weighter + + // The Elems below all demarcate boundaries of specific ranges. With the + // current element encoding digits are in two ranges: normal (default + // tertiary value) and special. For most languages, digits have collation + // elements in the normal range. + // + // Note: the range tests are very specific for the element encoding used by + // this implementation. The tests in collate_test.go are designed to fail + // if this code is not updated when an encoding has changed. + + zero Elem // normal digit zero + zeroSpecialLo Elem // special digit zero, low tertiary value + zeroSpecialHi Elem // special digit zero, high tertiary value + nine Elem // normal digit nine + nineSpecialHi Elem // special digit nine + numberStart Elem +} + +// AppendNext calls the namesake of the underlying weigher, but replaces single +// digits with weights representing their value. +func (nw *numericWeighter) AppendNext(buf []Elem, s []byte) (ce []Elem, n int) { + ce, n = nw.Weighter.AppendNext(buf, s) + nc := numberConverter{ + elems: buf, + w: nw, + b: s, + } + isZero, ok := nc.checkNextDigit(ce) + if !ok { + return ce, n + } + // ce might have been grown already, so take it instead of buf. + nc.init(ce, len(buf), isZero) + for n < len(s) { + ce, sz := nw.Weighter.AppendNext(nc.elems, s[n:]) + nc.b = s + n += sz + if !nc.update(ce) { + break + } + } + return nc.result(), n +} + +// AppendNextString calls the namesake of the underlying weigher, but replaces +// single digits with weights representing their value. +func (nw *numericWeighter) AppendNextString(buf []Elem, s string) (ce []Elem, n int) { + ce, n = nw.Weighter.AppendNextString(buf, s) + nc := numberConverter{ + elems: buf, + w: nw, + s: s, + } + isZero, ok := nc.checkNextDigit(ce) + if !ok { + return ce, n + } + nc.init(ce, len(buf), isZero) + for n < len(s) { + ce, sz := nw.Weighter.AppendNextString(nc.elems, s[n:]) + nc.s = s + n += sz + if !nc.update(ce) { + break + } + } + return nc.result(), n +} + +type numberConverter struct { + w *numericWeighter + + elems []Elem + nDigits int + lenIndex int + + s string // set if the input was of type string + b []byte // set if the input was of type []byte +} + +// init completes initialization of a numberConverter and prepares it for adding +// more digits. elems is assumed to have a digit starting at oldLen. +func (nc *numberConverter) init(elems []Elem, oldLen int, isZero bool) { + // Insert a marker indicating the start of a number and and a placeholder + // for the number of digits. + if isZero { + elems = append(elems[:oldLen], nc.w.numberStart, 0) + } else { + elems = append(elems, 0, 0) + copy(elems[oldLen+2:], elems[oldLen:]) + elems[oldLen] = nc.w.numberStart + elems[oldLen+1] = 0 + + nc.nDigits = 1 + } + nc.elems = elems + nc.lenIndex = oldLen + 1 +} + +// checkNextDigit reports whether bufNew adds a single digit relative to the old +// buffer. If it does, it also reports whether this digit is zero. +func (nc *numberConverter) checkNextDigit(bufNew []Elem) (isZero, ok bool) { + if len(nc.elems) >= len(bufNew) { + return false, false + } + e := bufNew[len(nc.elems)] + if e < nc.w.zeroSpecialLo || nc.w.nine < e { + // Not a number. + return false, false + } + if e < nc.w.zero { + if e > nc.w.nineSpecialHi { + // Not a number. + return false, false + } + if !nc.isDigit() { + return false, false + } + isZero = e <= nc.w.zeroSpecialHi + } else { + // This is the common case if we encounter a digit. + isZero = e == nc.w.zero + } + // Test the remaining added collation elements have a zero primary value. + if n := len(bufNew) - len(nc.elems); n > 1 { + for i := len(nc.elems) + 1; i < len(bufNew); i++ { + if bufNew[i].Primary() != 0 { + return false, false + } + } + // In some rare cases, collation elements will encode runes in + // unicode.No as a digit. For example Ethiopic digits (U+1369 - U+1371) + // are not in Nd. Also some digits that clearly belong in unicode.No, + // like U+0C78 TELUGU FRACTION DIGIT ZERO FOR ODD POWERS OF FOUR, have + // collation elements indistinguishable from normal digits. + // Unfortunately, this means we need to make this check for nearly all + // non-Latin digits. + // + // TODO: check the performance impact and find something better if it is + // an issue. + if !nc.isDigit() { + return false, false + } + } + return isZero, true +} + +func (nc *numberConverter) isDigit() bool { + if nc.b != nil { + r, _ := utf8.DecodeRune(nc.b) + return unicode.In(r, unicode.Nd) + } + r, _ := utf8.DecodeRuneInString(nc.s) + return unicode.In(r, unicode.Nd) +} + +// We currently support a maximum of about 2M digits (the number of primary +// values). Such numbers will compare correctly against small numbers, but their +// comparison against other large numbers is undefined. +// +// TODO: define a proper fallback, such as comparing large numbers textually or +// actually allowing numbers of unlimited length. +// +// TODO: cap this to a lower number (like 100) and maybe allow a larger number +// in an option? +const maxDigits = 1<<maxPrimaryBits - 1 + +func (nc *numberConverter) update(elems []Elem) bool { + isZero, ok := nc.checkNextDigit(elems) + if nc.nDigits == 0 && isZero { + return true + } + nc.elems = elems + if !ok { + return false + } + nc.nDigits++ + return nc.nDigits < maxDigits +} + +// result fills in the length element for the digit sequence and returns the +// completed collation elements. +func (nc *numberConverter) result() []Elem { + e, _ := MakeElem(nc.nDigits, defaultSecondary, defaultTertiary, 0) + nc.elems[nc.lenIndex] = e + return nc.elems +} diff --git a/vendor/golang.org/x/text/internal/colltab/numeric_test.go b/vendor/golang.org/x/text/internal/colltab/numeric_test.go new file mode 100644 index 000000000..e9406ae3f --- /dev/null +++ b/vendor/golang.org/x/text/internal/colltab/numeric_test.go @@ -0,0 +1,159 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package colltab + +import ( + "reflect" + "strings" + "testing" + + "golang.org/x/text/internal/testtext" +) + +const ( + digSec = defaultSecondary + digTert = defaultTertiary +) + +var tPlus3 = e(0, 50, digTert+3) + +// numWeighter is a testWeighter used for testing numericWeighter. +var numWeighter = testWeighter{ + "0": p(100), + "0": []Elem{e(100, digSec, digTert+1)}, // U+FF10 FULLWIDTH DIGIT ZERO + "₀": []Elem{e(100, digSec, digTert+5)}, // U+2080 SUBSCRIPT ZERO + + "1": p(101), + // Allow non-primary collation elements to be inserted. + "١": append(p(101), tPlus3), // U+0661 ARABIC-INDIC DIGIT ONE + // Allow varying tertiary weight if the number is Nd. + "1": []Elem{e(101, digSec, digTert+1)}, // U+FF11 FULLWIDTH DIGIT ONE + "2": p(102), + // Allow non-primary collation elements to be inserted. + "٢": append(p(102), tPlus3), // U+0662 ARABIC-INDIC DIGIT TWO + // Varying tertiary weights should be ignored. + "2": []Elem{e(102, digSec, digTert+3)}, // U+FF12 FULLWIDTH DIGIT TWO + "3": p(103), + "4": p(104), + "5": p(105), + "6": p(106), + "7": p(107), + // Weights must be strictly monotonically increasing, but do not need to be + // consecutive. + "8": p(118), + "9": p(119), + // Allow non-primary collation elements to be inserted. + "٩": append(p(119), tPlus3), // U+0669 ARABIC-INDIC DIGIT NINE + // Varying tertiary weights should be ignored. + "9": []Elem{e(119, digSec, digTert+1)}, // U+FF19 FULLWIDTH DIGIT NINE + "₉": []Elem{e(119, digSec, digTert+5)}, // U+2089 SUBSCRIPT NINE + + "a": p(5), + "b": p(6), + "c": p(8, 2), + + "klm": p(99), + + "nop": p(121), + + "x": p(200), + "y": p(201), +} + +func p(w ...int) (elems []Elem) { + for _, x := range w { + e, _ := MakeElem(x, digSec, digTert, 0) + elems = append(elems, e) + } + return elems +} + +func TestNumericAppendNext(t *testing.T) { + for _, tt := range []struct { + in string + w []Elem + }{ + {"a", p(5)}, + {"klm", p(99)}, + {"aa", p(5, 5)}, + {"1", p(120, 1, 101)}, + {"0", p(120, 0)}, + {"01", p(120, 1, 101)}, + {"0001", p(120, 1, 101)}, + {"10", p(120, 2, 101, 100)}, + {"99", p(120, 2, 119, 119)}, + {"9999", p(120, 4, 119, 119, 119, 119)}, + {"1a", p(120, 1, 101, 5)}, + {"0b", p(120, 0, 6)}, + {"01c", p(120, 1, 101, 8, 2)}, + {"10x", p(120, 2, 101, 100, 200)}, + {"99y", p(120, 2, 119, 119, 201)}, + {"9999nop", p(120, 4, 119, 119, 119, 119, 121)}, + + // Allow follow-up collation elements if they have a zero non-primary. + {"١٢٩", []Elem{e(120), e(3), e(101), tPlus3, e(102), tPlus3, e(119), tPlus3}}, + { + "129", + []Elem{ + e(120), e(3), + e(101, digSec, digTert+1), + e(102, digSec, digTert+3), + e(119, digSec, digTert+1), + }, + }, + + // Ensure AppendNext* adds to the given buffer. + {"a10", p(5, 120, 2, 101, 100)}, + } { + nw := NewNumericWeighter(numWeighter) + + b := []byte(tt.in) + got := []Elem(nil) + for n, sz := 0, 0; n < len(b); { + got, sz = nw.AppendNext(got, b[n:]) + n += sz + } + if !reflect.DeepEqual(got, tt.w) { + t.Errorf("AppendNext(%q) =\n%v; want\n%v", tt.in, got, tt.w) + } + + got = nil + for n, sz := 0, 0; n < len(tt.in); { + got, sz = nw.AppendNextString(got, tt.in[n:]) + n += sz + } + if !reflect.DeepEqual(got, tt.w) { + t.Errorf("AppendNextString(%q) =\n%v; want\n%v", tt.in, got, tt.w) + } + } +} + +func TestNumericOverflow(t *testing.T) { + manyDigits := strings.Repeat("9", maxDigits+1) + "a" + + nw := NewNumericWeighter(numWeighter) + + got, n := nw.AppendNextString(nil, manyDigits) + + if n != maxDigits { + t.Errorf("n: got %d; want %d", n, maxDigits) + } + + if got[1].Primary() != maxDigits { + t.Errorf("primary(e[1]): got %d; want %d", n, maxDigits) + } +} + +func TestNumericWeighterAlloc(t *testing.T) { + buf := make([]Elem, 100) + w := NewNumericWeighter(numWeighter) + s := "1234567890a" + + nNormal := testtext.AllocsPerRun(3, func() { numWeighter.AppendNextString(buf, s) }) + nNumeric := testtext.AllocsPerRun(3, func() { w.AppendNextString(buf, s) }) + if n := nNumeric - nNormal; n > 0 { + t.Errorf("got %f; want 0", n) + } +} diff --git a/vendor/golang.org/x/text/internal/colltab/table.go b/vendor/golang.org/x/text/internal/colltab/table.go new file mode 100644 index 000000000..e26e36da9 --- /dev/null +++ b/vendor/golang.org/x/text/internal/colltab/table.go @@ -0,0 +1,275 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package colltab + +import ( + "unicode/utf8" + + "golang.org/x/text/unicode/norm" +) + +// Table holds all collation data for a given collation ordering. +type Table struct { + Index Trie // main trie + + // expansion info + ExpandElem []uint32 + + // contraction info + ContractTries ContractTrieSet + ContractElem []uint32 + MaxContractLen int + VariableTop uint32 +} + +func (t *Table) AppendNext(w []Elem, b []byte) (res []Elem, n int) { + return t.appendNext(w, source{bytes: b}) +} + +func (t *Table) AppendNextString(w []Elem, s string) (res []Elem, n int) { + return t.appendNext(w, source{str: s}) +} + +func (t *Table) Start(p int, b []byte) int { + // TODO: implement + panic("not implemented") +} + +func (t *Table) StartString(p int, s string) int { + // TODO: implement + panic("not implemented") +} + +func (t *Table) Domain() []string { + // TODO: implement + panic("not implemented") +} + +func (t *Table) Top() uint32 { + return t.VariableTop +} + +type source struct { + str string + bytes []byte +} + +func (src *source) lookup(t *Table) (ce Elem, sz int) { + if src.bytes == nil { + return t.Index.lookupString(src.str) + } + return t.Index.lookup(src.bytes) +} + +func (src *source) tail(sz int) { + if src.bytes == nil { + src.str = src.str[sz:] + } else { + src.bytes = src.bytes[sz:] + } +} + +func (src *source) nfd(buf []byte, end int) []byte { + if src.bytes == nil { + return norm.NFD.AppendString(buf[:0], src.str[:end]) + } + return norm.NFD.Append(buf[:0], src.bytes[:end]...) +} + +func (src *source) rune() (r rune, sz int) { + if src.bytes == nil { + return utf8.DecodeRuneInString(src.str) + } + return utf8.DecodeRune(src.bytes) +} + +func (src *source) properties(f norm.Form) norm.Properties { + if src.bytes == nil { + return f.PropertiesString(src.str) + } + return f.Properties(src.bytes) +} + +// appendNext appends the weights corresponding to the next rune or +// contraction in s. If a contraction is matched to a discontinuous +// sequence of runes, the weights for the interstitial runes are +// appended as well. It returns a new slice that includes the appended +// weights and the number of bytes consumed from s. +func (t *Table) appendNext(w []Elem, src source) (res []Elem, n int) { + ce, sz := src.lookup(t) + tp := ce.ctype() + if tp == ceNormal { + if ce == 0 { + r, _ := src.rune() + const ( + hangulSize = 3 + firstHangul = 0xAC00 + lastHangul = 0xD7A3 + ) + if r >= firstHangul && r <= lastHangul { + // TODO: performance can be considerably improved here. + n = sz + var buf [16]byte // Used for decomposing Hangul. + for b := src.nfd(buf[:0], hangulSize); len(b) > 0; b = b[sz:] { + ce, sz = t.Index.lookup(b) + w = append(w, ce) + } + return w, n + } + ce = makeImplicitCE(implicitPrimary(r)) + } + w = append(w, ce) + } else if tp == ceExpansionIndex { + w = t.appendExpansion(w, ce) + } else if tp == ceContractionIndex { + n := 0 + src.tail(sz) + if src.bytes == nil { + w, n = t.matchContractionString(w, ce, src.str) + } else { + w, n = t.matchContraction(w, ce, src.bytes) + } + sz += n + } else if tp == ceDecompose { + // Decompose using NFKD and replace tertiary weights. + t1, t2 := splitDecompose(ce) + i := len(w) + nfkd := src.properties(norm.NFKD).Decomposition() + for p := 0; len(nfkd) > 0; nfkd = nfkd[p:] { + w, p = t.appendNext(w, source{bytes: nfkd}) + } + w[i] = w[i].updateTertiary(t1) + if i++; i < len(w) { + w[i] = w[i].updateTertiary(t2) + for i++; i < len(w); i++ { + w[i] = w[i].updateTertiary(maxTertiary) + } + } + } + return w, sz +} + +func (t *Table) appendExpansion(w []Elem, ce Elem) []Elem { + i := splitExpandIndex(ce) + n := int(t.ExpandElem[i]) + i++ + for _, ce := range t.ExpandElem[i : i+n] { + w = append(w, Elem(ce)) + } + return w +} + +func (t *Table) matchContraction(w []Elem, ce Elem, suffix []byte) ([]Elem, int) { + index, n, offset := splitContractIndex(ce) + + scan := t.ContractTries.scanner(index, n, suffix) + buf := [norm.MaxSegmentSize]byte{} + bufp := 0 + p := scan.scan(0) + + if !scan.done && p < len(suffix) && suffix[p] >= utf8.RuneSelf { + // By now we should have filtered most cases. + p0 := p + bufn := 0 + rune := norm.NFD.Properties(suffix[p:]) + p += rune.Size() + if rune.LeadCCC() != 0 { + prevCC := rune.TrailCCC() + // A gap may only occur in the last normalization segment. + // This also ensures that len(scan.s) < norm.MaxSegmentSize. + if end := norm.NFD.FirstBoundary(suffix[p:]); end != -1 { + scan.s = suffix[:p+end] + } + for p < len(suffix) && !scan.done && suffix[p] >= utf8.RuneSelf { + rune = norm.NFD.Properties(suffix[p:]) + if ccc := rune.LeadCCC(); ccc == 0 || prevCC >= ccc { + break + } + prevCC = rune.TrailCCC() + if pp := scan.scan(p); pp != p { + // Copy the interstitial runes for later processing. + bufn += copy(buf[bufn:], suffix[p0:p]) + if scan.pindex == pp { + bufp = bufn + } + p, p0 = pp, pp + } else { + p += rune.Size() + } + } + } + } + // Append weights for the matched contraction, which may be an expansion. + i, n := scan.result() + ce = Elem(t.ContractElem[i+offset]) + if ce.ctype() == ceNormal { + w = append(w, ce) + } else { + w = t.appendExpansion(w, ce) + } + // Append weights for the runes in the segment not part of the contraction. + for b, p := buf[:bufp], 0; len(b) > 0; b = b[p:] { + w, p = t.appendNext(w, source{bytes: b}) + } + return w, n +} + +// TODO: unify the two implementations. This is best done after first simplifying +// the algorithm taking into account the inclusion of both NFC and NFD forms +// in the table. +func (t *Table) matchContractionString(w []Elem, ce Elem, suffix string) ([]Elem, int) { + index, n, offset := splitContractIndex(ce) + + scan := t.ContractTries.scannerString(index, n, suffix) + buf := [norm.MaxSegmentSize]byte{} + bufp := 0 + p := scan.scan(0) + + if !scan.done && p < len(suffix) && suffix[p] >= utf8.RuneSelf { + // By now we should have filtered most cases. + p0 := p + bufn := 0 + rune := norm.NFD.PropertiesString(suffix[p:]) + p += rune.Size() + if rune.LeadCCC() != 0 { + prevCC := rune.TrailCCC() + // A gap may only occur in the last normalization segment. + // This also ensures that len(scan.s) < norm.MaxSegmentSize. + if end := norm.NFD.FirstBoundaryInString(suffix[p:]); end != -1 { + scan.s = suffix[:p+end] + } + for p < len(suffix) && !scan.done && suffix[p] >= utf8.RuneSelf { + rune = norm.NFD.PropertiesString(suffix[p:]) + if ccc := rune.LeadCCC(); ccc == 0 || prevCC >= ccc { + break + } + prevCC = rune.TrailCCC() + if pp := scan.scan(p); pp != p { + // Copy the interstitial runes for later processing. + bufn += copy(buf[bufn:], suffix[p0:p]) + if scan.pindex == pp { + bufp = bufn + } + p, p0 = pp, pp + } else { + p += rune.Size() + } + } + } + } + // Append weights for the matched contraction, which may be an expansion. + i, n := scan.result() + ce = Elem(t.ContractElem[i+offset]) + if ce.ctype() == ceNormal { + w = append(w, ce) + } else { + w = t.appendExpansion(w, ce) + } + // Append weights for the runes in the segment not part of the contraction. + for b, p := buf[:bufp], 0; len(b) > 0; b = b[p:] { + w, p = t.appendNext(w, source{bytes: b}) + } + return w, n +} diff --git a/vendor/golang.org/x/text/internal/colltab/trie.go b/vendor/golang.org/x/text/internal/colltab/trie.go new file mode 100644 index 000000000..a0eaa0d23 --- /dev/null +++ b/vendor/golang.org/x/text/internal/colltab/trie.go @@ -0,0 +1,159 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// The trie in this file is used to associate the first full character in an +// UTF-8 string to a collation element. All but the last byte in a UTF-8 byte +// sequence are used to lookup offsets in the index table to be used for the +// next byte. The last byte is used to index into a table of collation elements. +// For a full description, see go.text/collate/build/trie.go. + +package colltab + +const blockSize = 64 + +type Trie struct { + Index0 []uint16 // index for first byte (0xC0-0xFF) + Values0 []uint32 // index for first byte (0x00-0x7F) + Index []uint16 + Values []uint32 +} + +const ( + t1 = 0x00 // 0000 0000 + tx = 0x80 // 1000 0000 + t2 = 0xC0 // 1100 0000 + t3 = 0xE0 // 1110 0000 + t4 = 0xF0 // 1111 0000 + t5 = 0xF8 // 1111 1000 + t6 = 0xFC // 1111 1100 + te = 0xFE // 1111 1110 +) + +func (t *Trie) lookupValue(n uint16, b byte) Elem { + return Elem(t.Values[int(n)<<6+int(b)]) +} + +// lookup returns the trie value for the first UTF-8 encoding in s and +// the width in bytes of this encoding. The size will be 0 if s does not +// hold enough bytes to complete the encoding. len(s) must be greater than 0. +func (t *Trie) lookup(s []byte) (v Elem, sz int) { + c0 := s[0] + switch { + case c0 < tx: + return Elem(t.Values0[c0]), 1 + case c0 < t2: + return 0, 1 + case c0 < t3: + if len(s) < 2 { + return 0, 0 + } + i := t.Index0[c0] + c1 := s[1] + if c1 < tx || t2 <= c1 { + return 0, 1 + } + return t.lookupValue(i, c1), 2 + case c0 < t4: + if len(s) < 3 { + return 0, 0 + } + i := t.Index0[c0] + c1 := s[1] + if c1 < tx || t2 <= c1 { + return 0, 1 + } + o := int(i)<<6 + int(c1) + i = t.Index[o] + c2 := s[2] + if c2 < tx || t2 <= c2 { + return 0, 2 + } + return t.lookupValue(i, c2), 3 + case c0 < t5: + if len(s) < 4 { + return 0, 0 + } + i := t.Index0[c0] + c1 := s[1] + if c1 < tx || t2 <= c1 { + return 0, 1 + } + o := int(i)<<6 + int(c1) + i = t.Index[o] + c2 := s[2] + if c2 < tx || t2 <= c2 { + return 0, 2 + } + o = int(i)<<6 + int(c2) + i = t.Index[o] + c3 := s[3] + if c3 < tx || t2 <= c3 { + return 0, 3 + } + return t.lookupValue(i, c3), 4 + } + // Illegal rune + return 0, 1 +} + +// The body of lookupString is a verbatim copy of that of lookup. +func (t *Trie) lookupString(s string) (v Elem, sz int) { + c0 := s[0] + switch { + case c0 < tx: + return Elem(t.Values0[c0]), 1 + case c0 < t2: + return 0, 1 + case c0 < t3: + if len(s) < 2 { + return 0, 0 + } + i := t.Index0[c0] + c1 := s[1] + if c1 < tx || t2 <= c1 { + return 0, 1 + } + return t.lookupValue(i, c1), 2 + case c0 < t4: + if len(s) < 3 { + return 0, 0 + } + i := t.Index0[c0] + c1 := s[1] + if c1 < tx || t2 <= c1 { + return 0, 1 + } + o := int(i)<<6 + int(c1) + i = t.Index[o] + c2 := s[2] + if c2 < tx || t2 <= c2 { + return 0, 2 + } + return t.lookupValue(i, c2), 3 + case c0 < t5: + if len(s) < 4 { + return 0, 0 + } + i := t.Index0[c0] + c1 := s[1] + if c1 < tx || t2 <= c1 { + return 0, 1 + } + o := int(i)<<6 + int(c1) + i = t.Index[o] + c2 := s[2] + if c2 < tx || t2 <= c2 { + return 0, 2 + } + o = int(i)<<6 + int(c2) + i = t.Index[o] + c3 := s[3] + if c3 < tx || t2 <= c3 { + return 0, 3 + } + return t.lookupValue(i, c3), 4 + } + // Illegal rune + return 0, 1 +} diff --git a/vendor/golang.org/x/text/internal/colltab/trie_test.go b/vendor/golang.org/x/text/internal/colltab/trie_test.go new file mode 100644 index 000000000..b056a811e --- /dev/null +++ b/vendor/golang.org/x/text/internal/colltab/trie_test.go @@ -0,0 +1,106 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package colltab + +import ( + "testing" +) + +// We take the smallest, largest and an arbitrary value for each +// of the UTF-8 sequence lengths. +var testRunes = []rune{ + 0x01, 0x0C, 0x7F, // 1-byte sequences + 0x80, 0x100, 0x7FF, // 2-byte sequences + 0x800, 0x999, 0xFFFF, // 3-byte sequences + 0x10000, 0x10101, 0x10FFFF, // 4-byte sequences + 0x200, 0x201, 0x202, 0x210, 0x215, // five entries in one sparse block +} + +// Test cases for illegal runes. +type trietest struct { + size int + bytes []byte +} + +var tests = []trietest{ + // illegal runes + {1, []byte{0x80}}, + {1, []byte{0xFF}}, + {1, []byte{t2, tx - 1}}, + {1, []byte{t2, t2}}, + {2, []byte{t3, tx, tx - 1}}, + {2, []byte{t3, tx, t2}}, + {1, []byte{t3, tx - 1, tx}}, + {3, []byte{t4, tx, tx, tx - 1}}, + {3, []byte{t4, tx, tx, t2}}, + {1, []byte{t4, t2, tx, tx - 1}}, + {2, []byte{t4, tx, t2, tx - 1}}, + + // short runes + {0, []byte{t2}}, + {0, []byte{t3, tx}}, + {0, []byte{t4, tx, tx}}, + + // we only support UTF-8 up to utf8.UTFMax bytes (4 bytes) + {1, []byte{t5, tx, tx, tx, tx}}, + {1, []byte{t6, tx, tx, tx, tx, tx}}, +} + +func TestLookupTrie(t *testing.T) { + for i, r := range testRunes { + b := []byte(string(r)) + v, sz := testTrie.lookup(b) + if int(v) != i { + t.Errorf("lookup(%U): found value %#x, expected %#x", r, v, i) + } + if sz != len(b) { + t.Errorf("lookup(%U): found size %d, expected %d", r, sz, len(b)) + } + } + for i, tt := range tests { + v, sz := testTrie.lookup(tt.bytes) + if int(v) != 0 { + t.Errorf("lookup of illegal rune, case %d: found value %#x, expected 0", i, v) + } + if sz != tt.size { + t.Errorf("lookup of illegal rune, case %d: found size %d, expected %d", i, sz, tt.size) + } + } +} + +// test data is taken from exp/collate/locale/build/trie_test.go +var testValues = [832]uint32{ + 0x000c: 0x00000001, + 0x007f: 0x00000002, + 0x00c0: 0x00000003, + 0x0100: 0x00000004, + 0x0140: 0x0000000c, 0x0141: 0x0000000d, 0x0142: 0x0000000e, + 0x0150: 0x0000000f, + 0x0155: 0x00000010, + 0x01bf: 0x00000005, + 0x01c0: 0x00000006, + 0x0219: 0x00000007, + 0x027f: 0x00000008, + 0x0280: 0x00000009, + 0x02c1: 0x0000000a, + 0x033f: 0x0000000b, +} + +var testLookup = [640]uint16{ + 0x0e0: 0x05, 0x0e6: 0x06, + 0x13f: 0x07, + 0x140: 0x08, 0x144: 0x09, + 0x190: 0x03, + 0x1ff: 0x0a, + 0x20f: 0x05, + 0x242: 0x01, 0x244: 0x02, + 0x248: 0x03, + 0x25f: 0x04, + 0x260: 0x01, + 0x26f: 0x02, + 0x270: 0x04, 0x274: 0x06, +} + +var testTrie = Trie{testLookup[6*blockSize:], testValues[:], testLookup[:], testValues[:]} diff --git a/vendor/golang.org/x/text/internal/colltab/weighter.go b/vendor/golang.org/x/text/internal/colltab/weighter.go new file mode 100644 index 000000000..f1ec45fb5 --- /dev/null +++ b/vendor/golang.org/x/text/internal/colltab/weighter.go @@ -0,0 +1,31 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package colltab // import "golang.org/x/text/internal/colltab" + +// A Weighter can be used as a source for Collator and Searcher. +type Weighter interface { + // Start finds the start of the segment that includes position p. + Start(p int, b []byte) int + + // StartString finds the start of the segment that includes position p. + StartString(p int, s string) int + + // AppendNext appends Elems to buf corresponding to the longest match + // of a single character or contraction from the start of s. + // It returns the new buf and the number of bytes consumed. + AppendNext(buf []Elem, s []byte) (ce []Elem, n int) + + // AppendNextString appends Elems to buf corresponding to the longest match + // of a single character or contraction from the start of s. + // It returns the new buf and the number of bytes consumed. + AppendNextString(buf []Elem, s string) (ce []Elem, n int) + + // Domain returns a slice of all single characters and contractions for which + // collation elements are defined in this table. + Domain() []string + + // Top returns the highest variable primary value. + Top() uint32 +} diff --git a/vendor/golang.org/x/text/internal/colltab/weighter_test.go b/vendor/golang.org/x/text/internal/colltab/weighter_test.go new file mode 100644 index 000000000..b5f8487b3 --- /dev/null +++ b/vendor/golang.org/x/text/internal/colltab/weighter_test.go @@ -0,0 +1,42 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package colltab + +// testWeighter is a simple Weighter that returns weights from a user-defined map. +type testWeighter map[string][]Elem + +func (t testWeighter) Start(int, []byte) int { return 0 } +func (t testWeighter) StartString(int, string) int { return 0 } +func (t testWeighter) Domain() []string { return nil } +func (t testWeighter) Top() uint32 { return 0 } + +// maxContractBytes is the maximum length of any key in the map. +const maxContractBytes = 10 + +func (t testWeighter) AppendNext(buf []Elem, s []byte) ([]Elem, int) { + n := len(s) + if n > maxContractBytes { + n = maxContractBytes + } + for i := n; i > 0; i-- { + if e, ok := t[string(s[:i])]; ok { + return append(buf, e...), i + } + } + panic("incomplete testWeighter: could not find " + string(s)) +} + +func (t testWeighter) AppendNextString(buf []Elem, s string) ([]Elem, int) { + n := len(s) + if n > maxContractBytes { + n = maxContractBytes + } + for i := n; i > 0; i-- { + if e, ok := t[s[:i]]; ok { + return append(buf, e...), i + } + } + panic("incomplete testWeighter: could not find " + s) +} diff --git a/vendor/golang.org/x/text/internal/gen/code.go b/vendor/golang.org/x/text/internal/gen/code.go new file mode 100644 index 000000000..d7031b694 --- /dev/null +++ b/vendor/golang.org/x/text/internal/gen/code.go @@ -0,0 +1,351 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package gen + +import ( + "bytes" + "encoding/gob" + "fmt" + "hash" + "hash/fnv" + "io" + "log" + "os" + "reflect" + "strings" + "unicode" + "unicode/utf8" +) + +// This file contains utilities for generating code. + +// TODO: other write methods like: +// - slices, maps, types, etc. + +// CodeWriter is a utility for writing structured code. It computes the content +// hash and size of written content. It ensures there are newlines between +// written code blocks. +type CodeWriter struct { + buf bytes.Buffer + Size int + Hash hash.Hash32 // content hash + gob *gob.Encoder + // For comments we skip the usual one-line separator if they are followed by + // a code block. + skipSep bool +} + +func (w *CodeWriter) Write(p []byte) (n int, err error) { + return w.buf.Write(p) +} + +// NewCodeWriter returns a new CodeWriter. +func NewCodeWriter() *CodeWriter { + h := fnv.New32() + return &CodeWriter{Hash: h, gob: gob.NewEncoder(h)} +} + +// WriteGoFile appends the buffer with the total size of all created structures +// and writes it as a Go file to the the given file with the given package name. +func (w *CodeWriter) WriteGoFile(filename, pkg string) { + f, err := os.Create(filename) + if err != nil { + log.Fatalf("Could not create file %s: %v", filename, err) + } + defer f.Close() + if _, err = w.WriteGo(f, pkg); err != nil { + log.Fatalf("Error writing file %s: %v", filename, err) + } +} + +// WriteGo appends the buffer with the total size of all created structures and +// writes it as a Go file to the the given writer with the given package name. +func (w *CodeWriter) WriteGo(out io.Writer, pkg string) (n int, err error) { + sz := w.Size + w.WriteComment("Total table size %d bytes (%dKiB); checksum: %X\n", sz, sz/1024, w.Hash.Sum32()) + defer w.buf.Reset() + return WriteGo(out, pkg, w.buf.Bytes()) +} + +func (w *CodeWriter) printf(f string, x ...interface{}) { + fmt.Fprintf(w, f, x...) +} + +func (w *CodeWriter) insertSep() { + if w.skipSep { + w.skipSep = false + return + } + // Use at least two newlines to ensure a blank space between the previous + // block. WriteGoFile will remove extraneous newlines. + w.printf("\n\n") +} + +// WriteComment writes a comment block. All line starts are prefixed with "//". +// Initial empty lines are gobbled. The indentation for the first line is +// stripped from consecutive lines. +func (w *CodeWriter) WriteComment(comment string, args ...interface{}) { + s := fmt.Sprintf(comment, args...) + s = strings.Trim(s, "\n") + + // Use at least two newlines to ensure a blank space between the previous + // block. WriteGoFile will remove extraneous newlines. + w.printf("\n\n// ") + w.skipSep = true + + // strip first indent level. + sep := "\n" + for ; len(s) > 0 && (s[0] == '\t' || s[0] == ' '); s = s[1:] { + sep += s[:1] + } + + strings.NewReplacer(sep, "\n// ", "\n", "\n// ").WriteString(w, s) + + w.printf("\n") +} + +func (w *CodeWriter) writeSizeInfo(size int) { + w.printf("// Size: %d bytes\n", size) +} + +// WriteConst writes a constant of the given name and value. +func (w *CodeWriter) WriteConst(name string, x interface{}) { + w.insertSep() + v := reflect.ValueOf(x) + + switch v.Type().Kind() { + case reflect.String: + w.printf("const %s %s = ", name, typeName(x)) + w.WriteString(v.String()) + w.printf("\n") + default: + w.printf("const %s = %#v\n", name, x) + } +} + +// WriteVar writes a variable of the given name and value. +func (w *CodeWriter) WriteVar(name string, x interface{}) { + w.insertSep() + v := reflect.ValueOf(x) + oldSize := w.Size + sz := int(v.Type().Size()) + w.Size += sz + + switch v.Type().Kind() { + case reflect.String: + w.printf("var %s %s = ", name, typeName(x)) + w.WriteString(v.String()) + case reflect.Struct: + w.gob.Encode(x) + fallthrough + case reflect.Slice, reflect.Array: + w.printf("var %s = ", name) + w.writeValue(v) + w.writeSizeInfo(w.Size - oldSize) + default: + w.printf("var %s %s = ", name, typeName(x)) + w.gob.Encode(x) + w.writeValue(v) + w.writeSizeInfo(w.Size - oldSize) + } + w.printf("\n") +} + +func (w *CodeWriter) writeValue(v reflect.Value) { + x := v.Interface() + switch v.Kind() { + case reflect.String: + w.WriteString(v.String()) + case reflect.Array: + // Don't double count: callers of WriteArray count on the size being + // added, so we need to discount it here. + w.Size -= int(v.Type().Size()) + w.writeSlice(x, true) + case reflect.Slice: + w.writeSlice(x, false) + case reflect.Struct: + w.printf("%s{\n", typeName(v.Interface())) + t := v.Type() + for i := 0; i < v.NumField(); i++ { + w.printf("%s: ", t.Field(i).Name) + w.writeValue(v.Field(i)) + w.printf(",\n") + } + w.printf("}") + default: + w.printf("%#v", x) + } +} + +// WriteString writes a string literal. +func (w *CodeWriter) WriteString(s string) { + s = strings.Replace(s, `\`, `\\`, -1) + io.WriteString(w.Hash, s) // content hash + w.Size += len(s) + + const maxInline = 40 + if len(s) <= maxInline { + w.printf("%q", s) + return + } + + // We will render the string as a multi-line string. + const maxWidth = 80 - 4 - len(`"`) - len(`" +`) + + // When starting on its own line, go fmt indents line 2+ an extra level. + n, max := maxWidth, maxWidth-4 + + // As per https://golang.org/issue/18078, the compiler has trouble + // compiling the concatenation of many strings, s0 + s1 + s2 + ... + sN, + // for large N. We insert redundant, explicit parentheses to work around + // that, lowering the N at any given step: (s0 + s1 + ... + s63) + (s64 + + // ... + s127) + etc + (etc + ... + sN). + explicitParens, extraComment := len(s) > 128*1024, "" + if explicitParens { + w.printf(`(`) + extraComment = "; the redundant, explicit parens are for https://golang.org/issue/18078" + } + + // Print "" +\n, if a string does not start on its own line. + b := w.buf.Bytes() + if p := len(bytes.TrimRight(b, " \t")); p > 0 && b[p-1] != '\n' { + w.printf("\"\" + // Size: %d bytes%s\n", len(s), extraComment) + n, max = maxWidth, maxWidth + } + + w.printf(`"`) + + for sz, p, nLines := 0, 0, 0; p < len(s); { + var r rune + r, sz = utf8.DecodeRuneInString(s[p:]) + out := s[p : p+sz] + chars := 1 + if !unicode.IsPrint(r) || r == utf8.RuneError || r == '"' { + switch sz { + case 1: + out = fmt.Sprintf("\\x%02x", s[p]) + case 2, 3: + out = fmt.Sprintf("\\u%04x", r) + case 4: + out = fmt.Sprintf("\\U%08x", r) + } + chars = len(out) + } + if n -= chars; n < 0 { + nLines++ + if explicitParens && nLines&63 == 63 { + w.printf("\") + (\"") + } + w.printf("\" +\n\"") + n = max - len(out) + } + w.printf("%s", out) + p += sz + } + w.printf(`"`) + if explicitParens { + w.printf(`)`) + } +} + +// WriteSlice writes a slice value. +func (w *CodeWriter) WriteSlice(x interface{}) { + w.writeSlice(x, false) +} + +// WriteArray writes an array value. +func (w *CodeWriter) WriteArray(x interface{}) { + w.writeSlice(x, true) +} + +func (w *CodeWriter) writeSlice(x interface{}, isArray bool) { + v := reflect.ValueOf(x) + w.gob.Encode(v.Len()) + w.Size += v.Len() * int(v.Type().Elem().Size()) + name := typeName(x) + if isArray { + name = fmt.Sprintf("[%d]%s", v.Len(), name[strings.Index(name, "]")+1:]) + } + if isArray { + w.printf("%s{\n", name) + } else { + w.printf("%s{ // %d elements\n", name, v.Len()) + } + + switch kind := v.Type().Elem().Kind(); kind { + case reflect.String: + for _, s := range x.([]string) { + w.WriteString(s) + w.printf(",\n") + } + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + // nLine and nBlock are the number of elements per line and block. + nLine, nBlock, format := 8, 64, "%d," + switch kind { + case reflect.Uint8: + format = "%#02x," + case reflect.Uint16: + format = "%#04x," + case reflect.Uint32: + nLine, nBlock, format = 4, 32, "%#08x," + case reflect.Uint, reflect.Uint64: + nLine, nBlock, format = 4, 32, "%#016x," + case reflect.Int8: + nLine = 16 + } + n := nLine + for i := 0; i < v.Len(); i++ { + if i%nBlock == 0 && v.Len() > nBlock { + w.printf("// Entry %X - %X\n", i, i+nBlock-1) + } + x := v.Index(i).Interface() + w.gob.Encode(x) + w.printf(format, x) + if n--; n == 0 { + n = nLine + w.printf("\n") + } + } + w.printf("\n") + case reflect.Struct: + zero := reflect.Zero(v.Type().Elem()).Interface() + for i := 0; i < v.Len(); i++ { + x := v.Index(i).Interface() + w.gob.EncodeValue(v) + if !reflect.DeepEqual(zero, x) { + line := fmt.Sprintf("%#v,\n", x) + line = line[strings.IndexByte(line, '{'):] + w.printf("%d: ", i) + w.printf(line) + } + } + case reflect.Array: + for i := 0; i < v.Len(); i++ { + w.printf("%d: %#v,\n", i, v.Index(i).Interface()) + } + default: + panic("gen: slice elem type not supported") + } + w.printf("}") +} + +// WriteType writes a definition of the type of the given value and returns the +// type name. +func (w *CodeWriter) WriteType(x interface{}) string { + t := reflect.TypeOf(x) + w.printf("type %s struct {\n", t.Name()) + for i := 0; i < t.NumField(); i++ { + w.printf("\t%s %s\n", t.Field(i).Name, t.Field(i).Type) + } + w.printf("}\n") + return t.Name() +} + +// typeName returns the name of the go type of x. +func typeName(x interface{}) string { + t := reflect.ValueOf(x).Type() + return strings.Replace(fmt.Sprint(t), "main.", "", 1) +} diff --git a/vendor/golang.org/x/text/internal/gen/gen.go b/vendor/golang.org/x/text/internal/gen/gen.go new file mode 100644 index 000000000..2acb0355a --- /dev/null +++ b/vendor/golang.org/x/text/internal/gen/gen.go @@ -0,0 +1,281 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package gen contains common code for the various code generation tools in the +// text repository. Its usage ensures consistency between tools. +// +// This package defines command line flags that are common to most generation +// tools. The flags allow for specifying specific Unicode and CLDR versions +// in the public Unicode data repository (http://www.unicode.org/Public). +// +// A local Unicode data mirror can be set through the flag -local or the +// environment variable UNICODE_DIR. The former takes precedence. The local +// directory should follow the same structure as the public repository. +// +// IANA data can also optionally be mirrored by putting it in the iana directory +// rooted at the top of the local mirror. Beware, though, that IANA data is not +// versioned. So it is up to the developer to use the right version. +package gen // import "golang.org/x/text/internal/gen" + +import ( + "bytes" + "flag" + "fmt" + "go/build" + "go/format" + "io" + "io/ioutil" + "log" + "net/http" + "os" + "path" + "path/filepath" + "sync" + "unicode" + + "golang.org/x/text/unicode/cldr" +) + +var ( + url = flag.String("url", + "http://www.unicode.org/Public", + "URL of Unicode database directory") + iana = flag.String("iana", + "http://www.iana.org", + "URL of the IANA repository") + unicodeVersion = flag.String("unicode", + getEnv("UNICODE_VERSION", unicode.Version), + "unicode version to use") + cldrVersion = flag.String("cldr", + getEnv("CLDR_VERSION", cldr.Version), + "cldr version to use") +) + +func getEnv(name, def string) string { + if v := os.Getenv(name); v != "" { + return v + } + return def +} + +// Init performs common initialization for a gen command. It parses the flags +// and sets up the standard logging parameters. +func Init() { + log.SetPrefix("") + log.SetFlags(log.Lshortfile) + flag.Parse() +} + +const header = `// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. + +package %s + +` + +// UnicodeVersion reports the requested Unicode version. +func UnicodeVersion() string { + return *unicodeVersion +} + +// UnicodeVersion reports the requested CLDR version. +func CLDRVersion() string { + return *cldrVersion +} + +// IsLocal reports whether data files are available locally. +func IsLocal() bool { + dir, err := localReadmeFile() + if err != nil { + return false + } + if _, err = os.Stat(dir); err != nil { + return false + } + return true +} + +// OpenUCDFile opens the requested UCD file. The file is specified relative to +// the public Unicode root directory. It will call log.Fatal if there are any +// errors. +func OpenUCDFile(file string) io.ReadCloser { + return openUnicode(path.Join(*unicodeVersion, "ucd", file)) +} + +// OpenCLDRCoreZip opens the CLDR core zip file. It will call log.Fatal if there +// are any errors. +func OpenCLDRCoreZip() io.ReadCloser { + return OpenUnicodeFile("cldr", *cldrVersion, "core.zip") +} + +// OpenUnicodeFile opens the requested file of the requested category from the +// root of the Unicode data archive. The file is specified relative to the +// public Unicode root directory. If version is "", it will use the default +// Unicode version. It will call log.Fatal if there are any errors. +func OpenUnicodeFile(category, version, file string) io.ReadCloser { + if version == "" { + version = UnicodeVersion() + } + return openUnicode(path.Join(category, version, file)) +} + +// OpenIANAFile opens the requested IANA file. The file is specified relative +// to the IANA root, which is typically either http://www.iana.org or the +// iana directory in the local mirror. It will call log.Fatal if there are any +// errors. +func OpenIANAFile(path string) io.ReadCloser { + return Open(*iana, "iana", path) +} + +var ( + dirMutex sync.Mutex + localDir string +) + +const permissions = 0755 + +func localReadmeFile() (string, error) { + p, err := build.Import("golang.org/x/text", "", build.FindOnly) + if err != nil { + return "", fmt.Errorf("Could not locate package: %v", err) + } + return filepath.Join(p.Dir, "DATA", "README"), nil +} + +func getLocalDir() string { + dirMutex.Lock() + defer dirMutex.Unlock() + + readme, err := localReadmeFile() + if err != nil { + log.Fatal(err) + } + dir := filepath.Dir(readme) + if _, err := os.Stat(readme); err != nil { + if err := os.MkdirAll(dir, permissions); err != nil { + log.Fatalf("Could not create directory: %v", err) + } + ioutil.WriteFile(readme, []byte(readmeTxt), permissions) + } + return dir +} + +const readmeTxt = `Generated by golang.org/x/text/internal/gen. DO NOT EDIT. + +This directory contains downloaded files used to generate the various tables +in the golang.org/x/text subrepo. + +Note that the language subtag repo (iana/assignments/language-subtag-registry) +and all other times in the iana subdirectory are not versioned and will need +to be periodically manually updated. The easiest way to do this is to remove +the entire iana directory. This is mostly of concern when updating the language +package. +` + +// Open opens subdir/path if a local directory is specified and the file exists, +// where subdir is a directory relative to the local root, or fetches it from +// urlRoot/path otherwise. It will call log.Fatal if there are any errors. +func Open(urlRoot, subdir, path string) io.ReadCloser { + file := filepath.Join(getLocalDir(), subdir, filepath.FromSlash(path)) + return open(file, urlRoot, path) +} + +func openUnicode(path string) io.ReadCloser { + file := filepath.Join(getLocalDir(), filepath.FromSlash(path)) + return open(file, *url, path) +} + +// TODO: automatically periodically update non-versioned files. + +func open(file, urlRoot, path string) io.ReadCloser { + if f, err := os.Open(file); err == nil { + return f + } + r := get(urlRoot, path) + defer r.Close() + b, err := ioutil.ReadAll(r) + if err != nil { + log.Fatalf("Could not download file: %v", err) + } + os.MkdirAll(filepath.Dir(file), permissions) + if err := ioutil.WriteFile(file, b, permissions); err != nil { + log.Fatalf("Could not create file: %v", err) + } + return ioutil.NopCloser(bytes.NewReader(b)) +} + +func get(root, path string) io.ReadCloser { + url := root + "/" + path + fmt.Printf("Fetching %s...", url) + defer fmt.Println(" done.") + resp, err := http.Get(url) + if err != nil { + log.Fatalf("HTTP GET: %v", err) + } + if resp.StatusCode != 200 { + log.Fatalf("Bad GET status for %q: %q", url, resp.Status) + } + return resp.Body +} + +// TODO: use Write*Version in all applicable packages. + +// WriteUnicodeVersion writes a constant for the Unicode version from which the +// tables are generated. +func WriteUnicodeVersion(w io.Writer) { + fmt.Fprintf(w, "// UnicodeVersion is the Unicode version from which the tables in this package are derived.\n") + fmt.Fprintf(w, "const UnicodeVersion = %q\n\n", UnicodeVersion()) +} + +// WriteCLDRVersion writes a constant for the CLDR version from which the +// tables are generated. +func WriteCLDRVersion(w io.Writer) { + fmt.Fprintf(w, "// CLDRVersion is the CLDR version from which the tables in this package are derived.\n") + fmt.Fprintf(w, "const CLDRVersion = %q\n\n", CLDRVersion()) +} + +// WriteGoFile prepends a standard file comment and package statement to the +// given bytes, applies gofmt, and writes them to a file with the given name. +// It will call log.Fatal if there are any errors. +func WriteGoFile(filename, pkg string, b []byte) { + w, err := os.Create(filename) + if err != nil { + log.Fatalf("Could not create file %s: %v", filename, err) + } + defer w.Close() + if _, err = WriteGo(w, pkg, b); err != nil { + log.Fatalf("Error writing file %s: %v", filename, err) + } +} + +// WriteGo prepends a standard file comment and package statement to the given +// bytes, applies gofmt, and writes them to w. +func WriteGo(w io.Writer, pkg string, b []byte) (n int, err error) { + src := []byte(fmt.Sprintf(header, pkg)) + src = append(src, b...) + formatted, err := format.Source(src) + if err != nil { + // Print the generated code even in case of an error so that the + // returned error can be meaningfully interpreted. + n, _ = w.Write(src) + return n, err + } + return w.Write(formatted) +} + +// Repackage rewrites a Go file from belonging to package main to belonging to +// the given package. +func Repackage(inFile, outFile, pkg string) { + src, err := ioutil.ReadFile(inFile) + if err != nil { + log.Fatalf("reading %s: %v", inFile, err) + } + const toDelete = "package main\n\n" + i := bytes.Index(src, []byte(toDelete)) + if i < 0 { + log.Fatalf("Could not find %q in %s.", toDelete, inFile) + } + w := &bytes.Buffer{} + w.Write(src[i+len(toDelete):]) + WriteGoFile(outFile, pkg, w.Bytes()) +} diff --git a/vendor/golang.org/x/text/internal/gen_test.go b/vendor/golang.org/x/text/internal/gen_test.go new file mode 100644 index 000000000..a2e1981ae --- /dev/null +++ b/vendor/golang.org/x/text/internal/gen_test.go @@ -0,0 +1,38 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package internal + +import ( + "testing" + + "golang.org/x/text/language" +) + +func TestParents(t *testing.T) { + testCases := []struct { + tag, parent string + }{ + {"af", "und"}, + {"en", "und"}, + {"en-001", "en"}, + {"en-AU", "en-001"}, + {"en-US", "en"}, + {"en-US-u-va-posix", "en-US"}, + {"ca-ES-valencia", "ca-ES"}, + } + for _, tc := range testCases { + tag, ok := language.CompactIndex(language.MustParse(tc.tag)) + if !ok { + t.Fatalf("Could not get index of flag %s", tc.tag) + } + want, ok := language.CompactIndex(language.MustParse(tc.parent)) + if !ok { + t.Fatalf("Could not get index of parent %s of tag %s", tc.parent, tc.tag) + } + if got := int(Parent[tag]); got != want { + t.Errorf("Parent[%s] = %d; want %d (%s)", tc.tag, got, want, tc.parent) + } + } +} diff --git a/vendor/golang.org/x/text/internal/internal.go b/vendor/golang.org/x/text/internal/internal.go index b39dc2122..eac832850 100644 --- a/vendor/golang.org/x/text/internal/internal.go +++ b/vendor/golang.org/x/text/internal/internal.go @@ -6,7 +6,7 @@ // Package internal contains non-exported functionality that are used by // packages in the text repository. -package internal +package internal // import "golang.org/x/text/internal" import ( "sort" diff --git a/vendor/golang.org/x/text/internal/internal_test.go b/vendor/golang.org/x/text/internal/internal_test.go new file mode 100644 index 000000000..ce1b9a382 --- /dev/null +++ b/vendor/golang.org/x/text/internal/internal_test.go @@ -0,0 +1,38 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package internal + +import ( + "fmt" + "strings" + "testing" + + "golang.org/x/text/language" +) + +func TestUnique(t *testing.T) { + testCases := []struct { + in, want string + }{ + {"", "[]"}, + {"en", "[en]"}, + {"en en", "[en]"}, + {"en en en", "[en]"}, + {"en-u-cu-eur en", "[en en-u-cu-eur]"}, + {"nl en", "[en nl]"}, + {"pt-Pt pt", "[pt pt-PT]"}, + } + for _, tc := range testCases { + tags := []language.Tag{} + for _, s := range strings.Split(tc.in, " ") { + if s != "" { + tags = append(tags, language.MustParse(s)) + } + } + if got := fmt.Sprint(UniqueTags(tags)); got != tc.want { + t.Errorf("Unique(%s) = %s; want %s", tc.in, got, tc.want) + } + } +} diff --git a/vendor/golang.org/x/text/internal/match_test.go b/vendor/golang.org/x/text/internal/match_test.go new file mode 100644 index 000000000..8a3fe6572 --- /dev/null +++ b/vendor/golang.org/x/text/internal/match_test.go @@ -0,0 +1,56 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package internal + +import ( + "strings" + "testing" + + "golang.org/x/text/language" +) + +func TestInheritanceMatcher(t *testing.T) { + for i, tt := range []struct { + haveTags string + wantTags string + match string + conf language.Confidence + }{ + {"und,en,en-US", "en-US", "en-US", language.Exact}, // most specific match + {"zh-Hant,zh", "zh-TW", "zh-Hant", language.High}, // zh-TW implies Hant. + {"und,zh", "zh-TW", "und", language.High}, // zh-TW does not match zh. + {"zh", "zh-TW", "und", language.No}, // zh-TW does not match zh. + {"iw,en,nl", "he", "he", language.Exact}, // matches after canonicalization + {"he,en,nl", "iw", "he", language.Exact}, // matches after canonicalization + // Prefer first match over more specific match for various reasons: + // a) consistency of user interface is more important than an exact match, + // b) _if_ und is specified, it should be considered a correct and useful match, + // Note that a call to this Match will almost always be with a single tag. + {"und,en,en-US", "he,en-US", "und", language.High}, + } { + have := parseTags(tt.haveTags) + m := NewInheritanceMatcher(have) + tag, index, conf := m.Match(parseTags(tt.wantTags)...) + want := language.Raw.Make(tt.match) + if tag != want { + t.Errorf("%d:tag: got %q; want %q", i, tag, want) + } + if conf != language.No { + if got, _ := language.All.Canonicalize(have[index]); got != want { + t.Errorf("%d:index: got %q; want %q ", i, got, want) + } + } + if conf != tt.conf { + t.Errorf("%d:conf: got %v; want %v", i, conf, tt.conf) + } + } +} + +func parseTags(list string) (out []language.Tag) { + for _, s := range strings.Split(list, ",") { + out = append(out, language.Raw.Make(strings.TrimSpace(s))) + } + return out +} diff --git a/vendor/golang.org/x/text/internal/tag/tag.go b/vendor/golang.org/x/text/internal/tag/tag.go index 2cf4ecd29..b5d348891 100644 --- a/vendor/golang.org/x/text/internal/tag/tag.go +++ b/vendor/golang.org/x/text/internal/tag/tag.go @@ -3,7 +3,7 @@ // license that can be found in the LICENSE file. // Package tag contains functionality handling tags and related data. -package tag +package tag // import "golang.org/x/text/internal/tag" import "sort" diff --git a/vendor/golang.org/x/text/internal/tag/tag_test.go b/vendor/golang.org/x/text/internal/tag/tag_test.go new file mode 100644 index 000000000..da174a24c --- /dev/null +++ b/vendor/golang.org/x/text/internal/tag/tag_test.go @@ -0,0 +1,67 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package tag + +import ( + "strings" + "testing" +) + +var strdata = []string{ + "aa ", + "aaa ", + "aaaa", + "aaab", + "aab ", + "ab ", + "ba ", + "xxxx", + "\xff\xff\xff\xff", +} + +var testCases = map[string]int{ + "a": 0, + "aa": 0, + "aaa": 1, + "aa ": 0, + "aaaa": 2, + "aaab": 3, + "b": 6, + "ba": 6, + " ": -1, + "aaax": -1, + "bbbb": -1, + "zzzz": -1, +} + +func TestIndex(t *testing.T) { + index := Index(strings.Join(strdata, "")) + for k, v := range testCases { + if i := index.Index([]byte(k)); i != v { + t.Errorf("%s: got %d; want %d", k, i, v) + } + } +} + +func TestFixCase(t *testing.T) { + tests := []string{ + "aaaa", "AbCD", "abcd", + "Zzzz", "AbCD", "Abcd", + "Zzzz", "AbC", "", + "XXX", "ab ", "", + "XXX", "usd", "USD", + "cmn", "AB ", "", + "gsw", "CMN", "cmn", + } + for tc := tests; len(tc) > 0; tc = tc[3:] { + b := []byte(tc[1]) + if !FixCase(tc[0], b) { + b = nil + } + if string(b) != tc[2] { + t.Errorf("FixCase(%q, %q) = %q; want %q", tc[0], tc[1], b, tc[2]) + } + } +} diff --git a/vendor/golang.org/x/text/internal/triegen/compact.go b/vendor/golang.org/x/text/internal/triegen/compact.go new file mode 100644 index 000000000..397b975c1 --- /dev/null +++ b/vendor/golang.org/x/text/internal/triegen/compact.go @@ -0,0 +1,58 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package triegen + +// This file defines Compacter and its implementations. + +import "io" + +// A Compacter generates an alternative, more space-efficient way to store a +// trie value block. A trie value block holds all possible values for the last +// byte of a UTF-8 encoded rune. Excluding ASCII characters, a trie value block +// always has 64 values, as a UTF-8 encoding ends with a byte in [0x80, 0xC0). +type Compacter interface { + // Size returns whether the Compacter could encode the given block as well + // as its size in case it can. len(v) is always 64. + Size(v []uint64) (sz int, ok bool) + + // Store stores the block using the Compacter's compression method. + // It returns a handle with which the block can be retrieved. + // len(v) is always 64. + Store(v []uint64) uint32 + + // Print writes the data structures associated to the given store to w. + Print(w io.Writer) error + + // Handler returns the name of a function that gets called during trie + // lookup for blocks generated by the Compacter. The function should be of + // the form func (n uint32, b byte) uint64, where n is the index returned by + // the Compacter's Store method and b is the last byte of the UTF-8 + // encoding, where 0x80 <= b < 0xC0, for which to do the lookup in the + // block. + Handler() string +} + +// simpleCompacter is the default Compacter used by builder. It implements a +// normal trie block. +type simpleCompacter builder + +func (b *simpleCompacter) Size([]uint64) (sz int, ok bool) { + return blockSize * b.ValueSize, true +} + +func (b *simpleCompacter) Store(v []uint64) uint32 { + h := uint32(len(b.ValueBlocks) - blockOffset) + b.ValueBlocks = append(b.ValueBlocks, v) + return h +} + +func (b *simpleCompacter) Print(io.Writer) error { + // Structures are printed in print.go. + return nil +} + +func (b *simpleCompacter) Handler() string { + panic("Handler should be special-cased for this Compacter") +} diff --git a/vendor/golang.org/x/text/internal/triegen/data_test.go b/vendor/golang.org/x/text/internal/triegen/data_test.go new file mode 100644 index 000000000..91de547a5 --- /dev/null +++ b/vendor/golang.org/x/text/internal/triegen/data_test.go @@ -0,0 +1,875 @@ +// This file is generated with "go test -tags generate". DO NOT EDIT! +// +build !generate + +package triegen_test + +// lookup returns the trie value for the first UTF-8 encoding in s and +// the width in bytes of this encoding. The size will be 0 if s does not +// hold enough bytes to complete the encoding. len(s) must be greater than 0. +func (t *randTrie) lookup(s []byte) (v uint8, sz int) { + c0 := s[0] + switch { + case c0 < 0x80: // is ASCII + return randValues[c0], 1 + case c0 < 0xC2: + return 0, 1 // Illegal UTF-8: not a starter, not ASCII. + case c0 < 0xE0: // 2-byte UTF-8 + if len(s) < 2 { + return 0, 0 + } + i := randIndex[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c1), 2 + case c0 < 0xF0: // 3-byte UTF-8 + if len(s) < 3 { + return 0, 0 + } + i := randIndex[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + o := uint32(i)<<6 + uint32(c1) + i = randIndex[o] + c2 := s[2] + if c2 < 0x80 || 0xC0 <= c2 { + return 0, 2 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c2), 3 + case c0 < 0xF8: // 4-byte UTF-8 + if len(s) < 4 { + return 0, 0 + } + i := randIndex[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + o := uint32(i)<<6 + uint32(c1) + i = randIndex[o] + c2 := s[2] + if c2 < 0x80 || 0xC0 <= c2 { + return 0, 2 // Illegal UTF-8: not a continuation byte. + } + o = uint32(i)<<6 + uint32(c2) + i = randIndex[o] + c3 := s[3] + if c3 < 0x80 || 0xC0 <= c3 { + return 0, 3 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c3), 4 + } + // Illegal rune + return 0, 1 +} + +// lookupUnsafe returns the trie value for the first UTF-8 encoding in s. +// s must start with a full and valid UTF-8 encoded rune. +func (t *randTrie) lookupUnsafe(s []byte) uint8 { + c0 := s[0] + if c0 < 0x80 { // is ASCII + return randValues[c0] + } + i := randIndex[c0] + if c0 < 0xE0 { // 2-byte UTF-8 + return t.lookupValue(uint32(i), s[1]) + } + i = randIndex[uint32(i)<<6+uint32(s[1])] + if c0 < 0xF0 { // 3-byte UTF-8 + return t.lookupValue(uint32(i), s[2]) + } + i = randIndex[uint32(i)<<6+uint32(s[2])] + if c0 < 0xF8 { // 4-byte UTF-8 + return t.lookupValue(uint32(i), s[3]) + } + return 0 +} + +// lookupString returns the trie value for the first UTF-8 encoding in s and +// the width in bytes of this encoding. The size will be 0 if s does not +// hold enough bytes to complete the encoding. len(s) must be greater than 0. +func (t *randTrie) lookupString(s string) (v uint8, sz int) { + c0 := s[0] + switch { + case c0 < 0x80: // is ASCII + return randValues[c0], 1 + case c0 < 0xC2: + return 0, 1 // Illegal UTF-8: not a starter, not ASCII. + case c0 < 0xE0: // 2-byte UTF-8 + if len(s) < 2 { + return 0, 0 + } + i := randIndex[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c1), 2 + case c0 < 0xF0: // 3-byte UTF-8 + if len(s) < 3 { + return 0, 0 + } + i := randIndex[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + o := uint32(i)<<6 + uint32(c1) + i = randIndex[o] + c2 := s[2] + if c2 < 0x80 || 0xC0 <= c2 { + return 0, 2 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c2), 3 + case c0 < 0xF8: // 4-byte UTF-8 + if len(s) < 4 { + return 0, 0 + } + i := randIndex[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + o := uint32(i)<<6 + uint32(c1) + i = randIndex[o] + c2 := s[2] + if c2 < 0x80 || 0xC0 <= c2 { + return 0, 2 // Illegal UTF-8: not a continuation byte. + } + o = uint32(i)<<6 + uint32(c2) + i = randIndex[o] + c3 := s[3] + if c3 < 0x80 || 0xC0 <= c3 { + return 0, 3 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c3), 4 + } + // Illegal rune + return 0, 1 +} + +// lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s. +// s must start with a full and valid UTF-8 encoded rune. +func (t *randTrie) lookupStringUnsafe(s string) uint8 { + c0 := s[0] + if c0 < 0x80 { // is ASCII + return randValues[c0] + } + i := randIndex[c0] + if c0 < 0xE0 { // 2-byte UTF-8 + return t.lookupValue(uint32(i), s[1]) + } + i = randIndex[uint32(i)<<6+uint32(s[1])] + if c0 < 0xF0 { // 3-byte UTF-8 + return t.lookupValue(uint32(i), s[2]) + } + i = randIndex[uint32(i)<<6+uint32(s[2])] + if c0 < 0xF8 { // 4-byte UTF-8 + return t.lookupValue(uint32(i), s[3]) + } + return 0 +} + +// randTrie. Total size: 9280 bytes (9.06 KiB). Checksum: 6debd324a8debb8f. +type randTrie struct{} + +func newRandTrie(i int) *randTrie { + return &randTrie{} +} + +// lookupValue determines the type of block n and looks up the value for b. +func (t *randTrie) lookupValue(n uint32, b byte) uint8 { + switch { + default: + return uint8(randValues[n<<6+uint32(b)]) + } +} + +// randValues: 56 blocks, 3584 entries, 3584 bytes +// The third block is the zero block. +var randValues = [3584]uint8{ + // Block 0x0, offset 0x0 + // Block 0x1, offset 0x40 + // Block 0x2, offset 0x80 + // Block 0x3, offset 0xc0 + 0xc9: 0x0001, + // Block 0x4, offset 0x100 + 0x100: 0x0001, + // Block 0x5, offset 0x140 + 0x155: 0x0001, + // Block 0x6, offset 0x180 + 0x196: 0x0001, + // Block 0x7, offset 0x1c0 + 0x1ef: 0x0001, + // Block 0x8, offset 0x200 + 0x206: 0x0001, + // Block 0x9, offset 0x240 + 0x258: 0x0001, + // Block 0xa, offset 0x280 + 0x288: 0x0001, + // Block 0xb, offset 0x2c0 + 0x2f2: 0x0001, + // Block 0xc, offset 0x300 + 0x304: 0x0001, + // Block 0xd, offset 0x340 + 0x34b: 0x0001, + // Block 0xe, offset 0x380 + 0x3ba: 0x0001, + // Block 0xf, offset 0x3c0 + 0x3f5: 0x0001, + // Block 0x10, offset 0x400 + 0x41d: 0x0001, + // Block 0x11, offset 0x440 + 0x442: 0x0001, + // Block 0x12, offset 0x480 + 0x4bb: 0x0001, + // Block 0x13, offset 0x4c0 + 0x4e9: 0x0001, + // Block 0x14, offset 0x500 + 0x53e: 0x0001, + // Block 0x15, offset 0x540 + 0x55f: 0x0001, + // Block 0x16, offset 0x580 + 0x5b7: 0x0001, + // Block 0x17, offset 0x5c0 + 0x5d9: 0x0001, + // Block 0x18, offset 0x600 + 0x60e: 0x0001, + // Block 0x19, offset 0x640 + 0x652: 0x0001, + // Block 0x1a, offset 0x680 + 0x68f: 0x0001, + // Block 0x1b, offset 0x6c0 + 0x6dc: 0x0001, + // Block 0x1c, offset 0x700 + 0x703: 0x0001, + // Block 0x1d, offset 0x740 + 0x741: 0x0001, + // Block 0x1e, offset 0x780 + 0x79b: 0x0001, + // Block 0x1f, offset 0x7c0 + 0x7f1: 0x0001, + // Block 0x20, offset 0x800 + 0x833: 0x0001, + // Block 0x21, offset 0x840 + 0x853: 0x0001, + // Block 0x22, offset 0x880 + 0x8a2: 0x0001, + // Block 0x23, offset 0x8c0 + 0x8f8: 0x0001, + // Block 0x24, offset 0x900 + 0x917: 0x0001, + // Block 0x25, offset 0x940 + 0x945: 0x0001, + // Block 0x26, offset 0x980 + 0x99e: 0x0001, + // Block 0x27, offset 0x9c0 + 0x9fd: 0x0001, + // Block 0x28, offset 0xa00 + 0xa0d: 0x0001, + // Block 0x29, offset 0xa40 + 0xa66: 0x0001, + // Block 0x2a, offset 0xa80 + 0xaab: 0x0001, + // Block 0x2b, offset 0xac0 + 0xaea: 0x0001, + // Block 0x2c, offset 0xb00 + 0xb2d: 0x0001, + // Block 0x2d, offset 0xb40 + 0xb54: 0x0001, + // Block 0x2e, offset 0xb80 + 0xb90: 0x0001, + // Block 0x2f, offset 0xbc0 + 0xbe5: 0x0001, + // Block 0x30, offset 0xc00 + 0xc28: 0x0001, + // Block 0x31, offset 0xc40 + 0xc7c: 0x0001, + // Block 0x32, offset 0xc80 + 0xcbf: 0x0001, + // Block 0x33, offset 0xcc0 + 0xcc7: 0x0001, + // Block 0x34, offset 0xd00 + 0xd34: 0x0001, + // Block 0x35, offset 0xd40 + 0xd61: 0x0001, + // Block 0x36, offset 0xd80 + 0xdb9: 0x0001, + // Block 0x37, offset 0xdc0 + 0xdda: 0x0001, +} + +// randIndex: 89 blocks, 5696 entries, 5696 bytes +// Block 0 is the zero block. +var randIndex = [5696]uint8{ + // Block 0x0, offset 0x0 + // Block 0x1, offset 0x40 + // Block 0x2, offset 0x80 + // Block 0x3, offset 0xc0 + 0xe1: 0x02, 0xe3: 0x03, 0xe4: 0x04, + 0xea: 0x05, 0xeb: 0x06, 0xec: 0x07, + 0xf0: 0x10, 0xf1: 0x24, 0xf2: 0x3d, 0xf3: 0x4f, 0xf4: 0x56, + // Block 0x4, offset 0x100 + 0x107: 0x01, + // Block 0x5, offset 0x140 + 0x16c: 0x02, + // Block 0x6, offset 0x180 + 0x19c: 0x03, + 0x1ae: 0x04, + // Block 0x7, offset 0x1c0 + 0x1d8: 0x05, + 0x1f7: 0x06, + // Block 0x8, offset 0x200 + 0x20c: 0x07, + // Block 0x9, offset 0x240 + 0x24a: 0x08, + // Block 0xa, offset 0x280 + 0x2b6: 0x09, + // Block 0xb, offset 0x2c0 + 0x2d5: 0x0a, + // Block 0xc, offset 0x300 + 0x31a: 0x0b, + // Block 0xd, offset 0x340 + 0x373: 0x0c, + // Block 0xe, offset 0x380 + 0x38b: 0x0d, + // Block 0xf, offset 0x3c0 + 0x3f0: 0x0e, + // Block 0x10, offset 0x400 + 0x433: 0x0f, + // Block 0x11, offset 0x440 + 0x45d: 0x10, + // Block 0x12, offset 0x480 + 0x491: 0x08, 0x494: 0x09, 0x497: 0x0a, + 0x49b: 0x0b, 0x49c: 0x0c, + 0x4a1: 0x0d, + 0x4ad: 0x0e, + 0x4ba: 0x0f, + // Block 0x13, offset 0x4c0 + 0x4c1: 0x11, + // Block 0x14, offset 0x500 + 0x531: 0x12, + // Block 0x15, offset 0x540 + 0x546: 0x13, + // Block 0x16, offset 0x580 + 0x5ab: 0x14, + // Block 0x17, offset 0x5c0 + 0x5d4: 0x11, + 0x5fe: 0x11, + // Block 0x18, offset 0x600 + 0x618: 0x0a, + // Block 0x19, offset 0x640 + 0x65b: 0x15, + // Block 0x1a, offset 0x680 + 0x6a0: 0x16, + // Block 0x1b, offset 0x6c0 + 0x6d2: 0x17, + 0x6f6: 0x18, + // Block 0x1c, offset 0x700 + 0x711: 0x19, + // Block 0x1d, offset 0x740 + 0x768: 0x1a, + // Block 0x1e, offset 0x780 + 0x783: 0x1b, + // Block 0x1f, offset 0x7c0 + 0x7f9: 0x1c, + // Block 0x20, offset 0x800 + 0x831: 0x1d, + // Block 0x21, offset 0x840 + 0x85e: 0x1e, + // Block 0x22, offset 0x880 + 0x898: 0x1f, + // Block 0x23, offset 0x8c0 + 0x8c7: 0x18, + 0x8d5: 0x14, + 0x8f7: 0x20, + 0x8fe: 0x1f, + // Block 0x24, offset 0x900 + 0x905: 0x21, + // Block 0x25, offset 0x940 + 0x966: 0x03, + // Block 0x26, offset 0x980 + 0x981: 0x07, 0x983: 0x11, + 0x989: 0x12, 0x98a: 0x13, 0x98e: 0x14, 0x98f: 0x15, + 0x992: 0x16, 0x995: 0x17, 0x996: 0x18, + 0x998: 0x19, 0x999: 0x1a, 0x99b: 0x1b, 0x99f: 0x1c, + 0x9a3: 0x1d, + 0x9ad: 0x1e, 0x9af: 0x1f, + 0x9b0: 0x20, 0x9b1: 0x21, + 0x9b8: 0x22, 0x9bd: 0x23, + // Block 0x27, offset 0x9c0 + 0x9cd: 0x22, + // Block 0x28, offset 0xa00 + 0xa0c: 0x08, + // Block 0x29, offset 0xa40 + 0xa6f: 0x1c, + // Block 0x2a, offset 0xa80 + 0xa90: 0x1a, + 0xaaf: 0x23, + // Block 0x2b, offset 0xac0 + 0xae3: 0x19, + 0xae8: 0x24, + 0xafc: 0x25, + // Block 0x2c, offset 0xb00 + 0xb13: 0x26, + // Block 0x2d, offset 0xb40 + 0xb67: 0x1c, + // Block 0x2e, offset 0xb80 + 0xb8f: 0x0b, + // Block 0x2f, offset 0xbc0 + 0xbcb: 0x27, + 0xbe7: 0x26, + // Block 0x30, offset 0xc00 + 0xc34: 0x16, + // Block 0x31, offset 0xc40 + 0xc62: 0x03, + // Block 0x32, offset 0xc80 + 0xcbb: 0x12, + // Block 0x33, offset 0xcc0 + 0xcdf: 0x09, + // Block 0x34, offset 0xd00 + 0xd34: 0x0a, + // Block 0x35, offset 0xd40 + 0xd41: 0x1e, + // Block 0x36, offset 0xd80 + 0xd83: 0x28, + // Block 0x37, offset 0xdc0 + 0xdc0: 0x15, + // Block 0x38, offset 0xe00 + 0xe1a: 0x15, + // Block 0x39, offset 0xe40 + 0xe65: 0x29, + // Block 0x3a, offset 0xe80 + 0xe86: 0x1f, + // Block 0x3b, offset 0xec0 + 0xeec: 0x18, + // Block 0x3c, offset 0xf00 + 0xf28: 0x2a, + // Block 0x3d, offset 0xf40 + 0xf53: 0x08, + // Block 0x3e, offset 0xf80 + 0xfa2: 0x2b, + 0xfaa: 0x17, + // Block 0x3f, offset 0xfc0 + 0xfc0: 0x25, 0xfc2: 0x26, + 0xfc9: 0x27, 0xfcd: 0x28, 0xfce: 0x29, + 0xfd5: 0x2a, + 0xfd8: 0x2b, 0xfd9: 0x2c, 0xfdf: 0x2d, + 0xfe1: 0x2e, 0xfe2: 0x2f, 0xfe3: 0x30, 0xfe6: 0x31, + 0xfe9: 0x32, 0xfec: 0x33, 0xfed: 0x34, 0xfef: 0x35, + 0xff1: 0x36, 0xff2: 0x37, 0xff3: 0x38, 0xff4: 0x39, + 0xffa: 0x3a, 0xffc: 0x3b, 0xffe: 0x3c, + // Block 0x40, offset 0x1000 + 0x102c: 0x2c, + // Block 0x41, offset 0x1040 + 0x1074: 0x2c, + // Block 0x42, offset 0x1080 + 0x108c: 0x08, + 0x10a0: 0x2d, + // Block 0x43, offset 0x10c0 + 0x10e8: 0x10, + // Block 0x44, offset 0x1100 + 0x110f: 0x13, + // Block 0x45, offset 0x1140 + 0x114b: 0x2e, + // Block 0x46, offset 0x1180 + 0x118b: 0x23, + 0x119d: 0x0c, + // Block 0x47, offset 0x11c0 + 0x11c3: 0x12, + 0x11f9: 0x0f, + // Block 0x48, offset 0x1200 + 0x121e: 0x1b, + // Block 0x49, offset 0x1240 + 0x1270: 0x2f, + // Block 0x4a, offset 0x1280 + 0x128a: 0x1b, + 0x12a7: 0x02, + // Block 0x4b, offset 0x12c0 + 0x12fb: 0x14, + // Block 0x4c, offset 0x1300 + 0x1333: 0x30, + // Block 0x4d, offset 0x1340 + 0x134d: 0x31, + // Block 0x4e, offset 0x1380 + 0x138e: 0x15, + // Block 0x4f, offset 0x13c0 + 0x13f4: 0x32, + // Block 0x50, offset 0x1400 + 0x141b: 0x33, + // Block 0x51, offset 0x1440 + 0x1448: 0x3e, 0x1449: 0x3f, 0x144a: 0x40, 0x144f: 0x41, + 0x1459: 0x42, 0x145c: 0x43, 0x145e: 0x44, 0x145f: 0x45, + 0x1468: 0x46, 0x1469: 0x47, 0x146c: 0x48, 0x146d: 0x49, 0x146e: 0x4a, + 0x1472: 0x4b, 0x1473: 0x4c, + 0x1479: 0x4d, 0x147b: 0x4e, + // Block 0x52, offset 0x1480 + 0x1480: 0x34, + 0x1499: 0x11, + 0x14b6: 0x2c, + // Block 0x53, offset 0x14c0 + 0x14e4: 0x0d, + // Block 0x54, offset 0x1500 + 0x1527: 0x08, + // Block 0x55, offset 0x1540 + 0x1555: 0x2b, + // Block 0x56, offset 0x1580 + 0x15b2: 0x35, + // Block 0x57, offset 0x15c0 + 0x15f2: 0x1c, 0x15f4: 0x29, + // Block 0x58, offset 0x1600 + 0x1600: 0x50, 0x1603: 0x51, + 0x1608: 0x52, 0x160a: 0x53, 0x160d: 0x54, 0x160e: 0x55, +} + +// lookup returns the trie value for the first UTF-8 encoding in s and +// the width in bytes of this encoding. The size will be 0 if s does not +// hold enough bytes to complete the encoding. len(s) must be greater than 0. +func (t *multiTrie) lookup(s []byte) (v uint64, sz int) { + c0 := s[0] + switch { + case c0 < 0x80: // is ASCII + return t.ascii[c0], 1 + case c0 < 0xC2: + return 0, 1 // Illegal UTF-8: not a starter, not ASCII. + case c0 < 0xE0: // 2-byte UTF-8 + if len(s) < 2 { + return 0, 0 + } + i := t.utf8Start[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c1), 2 + case c0 < 0xF0: // 3-byte UTF-8 + if len(s) < 3 { + return 0, 0 + } + i := t.utf8Start[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + o := uint32(i)<<6 + uint32(c1) + i = multiIndex[o] + c2 := s[2] + if c2 < 0x80 || 0xC0 <= c2 { + return 0, 2 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c2), 3 + case c0 < 0xF8: // 4-byte UTF-8 + if len(s) < 4 { + return 0, 0 + } + i := t.utf8Start[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + o := uint32(i)<<6 + uint32(c1) + i = multiIndex[o] + c2 := s[2] + if c2 < 0x80 || 0xC0 <= c2 { + return 0, 2 // Illegal UTF-8: not a continuation byte. + } + o = uint32(i)<<6 + uint32(c2) + i = multiIndex[o] + c3 := s[3] + if c3 < 0x80 || 0xC0 <= c3 { + return 0, 3 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c3), 4 + } + // Illegal rune + return 0, 1 +} + +// lookupUnsafe returns the trie value for the first UTF-8 encoding in s. +// s must start with a full and valid UTF-8 encoded rune. +func (t *multiTrie) lookupUnsafe(s []byte) uint64 { + c0 := s[0] + if c0 < 0x80 { // is ASCII + return t.ascii[c0] + } + i := t.utf8Start[c0] + if c0 < 0xE0 { // 2-byte UTF-8 + return t.lookupValue(uint32(i), s[1]) + } + i = multiIndex[uint32(i)<<6+uint32(s[1])] + if c0 < 0xF0 { // 3-byte UTF-8 + return t.lookupValue(uint32(i), s[2]) + } + i = multiIndex[uint32(i)<<6+uint32(s[2])] + if c0 < 0xF8 { // 4-byte UTF-8 + return t.lookupValue(uint32(i), s[3]) + } + return 0 +} + +// lookupString returns the trie value for the first UTF-8 encoding in s and +// the width in bytes of this encoding. The size will be 0 if s does not +// hold enough bytes to complete the encoding. len(s) must be greater than 0. +func (t *multiTrie) lookupString(s string) (v uint64, sz int) { + c0 := s[0] + switch { + case c0 < 0x80: // is ASCII + return t.ascii[c0], 1 + case c0 < 0xC2: + return 0, 1 // Illegal UTF-8: not a starter, not ASCII. + case c0 < 0xE0: // 2-byte UTF-8 + if len(s) < 2 { + return 0, 0 + } + i := t.utf8Start[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c1), 2 + case c0 < 0xF0: // 3-byte UTF-8 + if len(s) < 3 { + return 0, 0 + } + i := t.utf8Start[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + o := uint32(i)<<6 + uint32(c1) + i = multiIndex[o] + c2 := s[2] + if c2 < 0x80 || 0xC0 <= c2 { + return 0, 2 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c2), 3 + case c0 < 0xF8: // 4-byte UTF-8 + if len(s) < 4 { + return 0, 0 + } + i := t.utf8Start[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + o := uint32(i)<<6 + uint32(c1) + i = multiIndex[o] + c2 := s[2] + if c2 < 0x80 || 0xC0 <= c2 { + return 0, 2 // Illegal UTF-8: not a continuation byte. + } + o = uint32(i)<<6 + uint32(c2) + i = multiIndex[o] + c3 := s[3] + if c3 < 0x80 || 0xC0 <= c3 { + return 0, 3 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c3), 4 + } + // Illegal rune + return 0, 1 +} + +// lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s. +// s must start with a full and valid UTF-8 encoded rune. +func (t *multiTrie) lookupStringUnsafe(s string) uint64 { + c0 := s[0] + if c0 < 0x80 { // is ASCII + return t.ascii[c0] + } + i := t.utf8Start[c0] + if c0 < 0xE0 { // 2-byte UTF-8 + return t.lookupValue(uint32(i), s[1]) + } + i = multiIndex[uint32(i)<<6+uint32(s[1])] + if c0 < 0xF0 { // 3-byte UTF-8 + return t.lookupValue(uint32(i), s[2]) + } + i = multiIndex[uint32(i)<<6+uint32(s[2])] + if c0 < 0xF8 { // 4-byte UTF-8 + return t.lookupValue(uint32(i), s[3]) + } + return 0 +} + +// multiTrie. Total size: 18250 bytes (17.82 KiB). Checksum: a69a609d8696aa5e. +type multiTrie struct { + ascii []uint64 // index for ASCII bytes + utf8Start []uint8 // index for UTF-8 bytes >= 0xC0 +} + +func newMultiTrie(i int) *multiTrie { + h := multiTrieHandles[i] + return &multiTrie{multiValues[uint32(h.ascii)<<6:], multiIndex[uint32(h.multi)<<6:]} +} + +type multiTrieHandle struct { + ascii, multi uint8 +} + +// multiTrieHandles: 5 handles, 10 bytes +var multiTrieHandles = [5]multiTrieHandle{ + {0, 0}, // 8c1e77823143d35c: all + {0, 23}, // 8fb58ff8243b45b0: ASCII only + {0, 23}, // 8fb58ff8243b45b0: ASCII only 2 + {0, 24}, // 2ccc43994f11046f: BMP only + {30, 25}, // ce448591bdcb4733: No BMP +} + +// lookupValue determines the type of block n and looks up the value for b. +func (t *multiTrie) lookupValue(n uint32, b byte) uint64 { + switch { + default: + return uint64(multiValues[n<<6+uint32(b)]) + } +} + +// multiValues: 32 blocks, 2048 entries, 16384 bytes +// The third block is the zero block. +var multiValues = [2048]uint64{ + // Block 0x0, offset 0x0 + 0x03: 0x6e361699800b9fb8, 0x04: 0x52d3935a34f6f0b, 0x05: 0x2948319393e7ef10, + 0x07: 0x20f03b006704f663, 0x08: 0x6c15c0732bb2495f, 0x09: 0xe54e2c59d953551, + 0x0f: 0x33d8a825807d8037, 0x10: 0x6ecd93cb12168b92, 0x11: 0x6a81c9c0ce86e884, + 0x1f: 0xa03e77aac8be79b, 0x20: 0x28591d0e7e486efa, 0x21: 0x716fa3bc398dec8, + 0x3f: 0x4fd3bcfa72bce8b0, + // Block 0x1, offset 0x40 + 0x40: 0x3cbaef3db8ba5f12, 0x41: 0x2d262347c1f56357, + 0x7f: 0x782caa2d25a418a9, + // Block 0x2, offset 0x80 + // Block 0x3, offset 0xc0 + 0xc0: 0x6bbd1f937b1ff5d2, 0xc1: 0x732e23088d2eb8a4, + // Block 0x4, offset 0x100 + 0x13f: 0x56f8c4c82f5962dc, + // Block 0x5, offset 0x140 + 0x140: 0x57dc4544729a5da2, 0x141: 0x2f62f9cd307ffa0d, + // Block 0x6, offset 0x180 + 0x1bf: 0x7bf4d0ebf302a088, + // Block 0x7, offset 0x1c0 + 0x1c0: 0x1f0d67f249e59931, 0x1c1: 0x3011def73aa550c7, + // Block 0x8, offset 0x200 + 0x23f: 0x5de81c1dff6bf29d, + // Block 0x9, offset 0x240 + 0x240: 0x752c035737b825e8, 0x241: 0x1e793399081e3bb3, + // Block 0xa, offset 0x280 + 0x2bf: 0x6a28f01979cbf059, + // Block 0xb, offset 0x2c0 + 0x2c0: 0x373a4b0f2cbd4c74, 0x2c1: 0x4fd2c288683b767c, + // Block 0xc, offset 0x300 + 0x33f: 0x5a10ffa9e29184fb, + // Block 0xd, offset 0x340 + 0x340: 0x700f9bdb53fff6a5, 0x341: 0xcde93df0427eb79, + // Block 0xe, offset 0x380 + 0x3bf: 0x74071288fff39c76, + // Block 0xf, offset 0x3c0 + 0x3c0: 0x481fc2f510e5268a, 0x3c1: 0x7565c28164204849, + // Block 0x10, offset 0x400 + 0x43f: 0x5676a62fd49c6bec, + // Block 0x11, offset 0x440 + 0x440: 0x2f2d15776cbafc6b, 0x441: 0x4c55e8dc0ff11a3f, + // Block 0x12, offset 0x480 + 0x4bf: 0x69d6f0fe711fafc9, + // Block 0x13, offset 0x4c0 + 0x4c0: 0x33181de28cfb062d, 0x4c1: 0x2ef3adc6bb2f2d02, + // Block 0x14, offset 0x500 + 0x53f: 0xe03b31814c95f8b, + // Block 0x15, offset 0x540 + 0x540: 0x3bf6dc9a1c115603, 0x541: 0x6984ec9b7f51f7fc, + // Block 0x16, offset 0x580 + 0x5bf: 0x3c02ea92fb168559, + // Block 0x17, offset 0x5c0 + 0x5c0: 0x1badfe42e7629494, 0x5c1: 0x6dc4a554005f7645, + // Block 0x18, offset 0x600 + 0x63f: 0x3bb2ed2a72748f4b, + // Block 0x19, offset 0x640 + 0x640: 0x291354cd6767ec10, 0x641: 0x2c3a4715e3c070d6, + // Block 0x1a, offset 0x680 + 0x6bf: 0x352711cfb7236418, + // Block 0x1b, offset 0x6c0 + 0x6c0: 0x3a59d34fb8bceda, 0x6c1: 0x5e90d8ebedd64fa1, + // Block 0x1c, offset 0x700 + 0x73f: 0x7191a77b28d23110, + // Block 0x1d, offset 0x740 + 0x740: 0x4ca7f0c1623423d8, 0x741: 0x4f7156d996e2d0de, + // Block 0x1e, offset 0x780 + // Block 0x1f, offset 0x7c0 +} + +// multiIndex: 29 blocks, 1856 entries, 1856 bytes +// Block 0 is the zero block. +var multiIndex = [1856]uint8{ + // Block 0x0, offset 0x0 + // Block 0x1, offset 0x40 + // Block 0x2, offset 0x80 + // Block 0x3, offset 0xc0 + 0xc2: 0x01, 0xc3: 0x02, 0xc4: 0x03, 0xc7: 0x04, + 0xc8: 0x05, 0xcf: 0x06, + 0xd0: 0x07, + 0xdf: 0x08, + 0xe0: 0x02, 0xe1: 0x03, 0xe2: 0x04, 0xe3: 0x05, 0xe4: 0x06, 0xe7: 0x07, + 0xe8: 0x08, 0xef: 0x09, + 0xf0: 0x0e, 0xf1: 0x11, 0xf2: 0x13, 0xf3: 0x15, 0xf4: 0x17, + // Block 0x4, offset 0x100 + 0x120: 0x09, + 0x13f: 0x0a, + // Block 0x5, offset 0x140 + 0x140: 0x0b, + 0x17f: 0x0c, + // Block 0x6, offset 0x180 + 0x180: 0x0d, + // Block 0x7, offset 0x1c0 + 0x1ff: 0x0e, + // Block 0x8, offset 0x200 + 0x200: 0x0f, + // Block 0x9, offset 0x240 + 0x27f: 0x10, + // Block 0xa, offset 0x280 + 0x280: 0x11, + // Block 0xb, offset 0x2c0 + 0x2ff: 0x12, + // Block 0xc, offset 0x300 + 0x300: 0x13, + // Block 0xd, offset 0x340 + 0x37f: 0x14, + // Block 0xe, offset 0x380 + 0x380: 0x15, + // Block 0xf, offset 0x3c0 + 0x3ff: 0x16, + // Block 0x10, offset 0x400 + 0x410: 0x0a, + 0x41f: 0x0b, + 0x420: 0x0c, + 0x43f: 0x0d, + // Block 0x11, offset 0x440 + 0x440: 0x17, + // Block 0x12, offset 0x480 + 0x4bf: 0x18, + // Block 0x13, offset 0x4c0 + 0x4c0: 0x0f, + 0x4ff: 0x10, + // Block 0x14, offset 0x500 + 0x500: 0x19, + // Block 0x15, offset 0x540 + 0x540: 0x12, + // Block 0x16, offset 0x580 + 0x5bf: 0x1a, + // Block 0x17, offset 0x5c0 + 0x5ff: 0x14, + // Block 0x18, offset 0x600 + 0x600: 0x1b, + // Block 0x19, offset 0x640 + 0x640: 0x16, + // Block 0x1a, offset 0x680 + // Block 0x1b, offset 0x6c0 + 0x6c2: 0x01, 0x6c3: 0x02, 0x6c4: 0x03, 0x6c7: 0x04, + 0x6c8: 0x05, 0x6cf: 0x06, + 0x6d0: 0x07, + 0x6df: 0x08, + 0x6e0: 0x02, 0x6e1: 0x03, 0x6e2: 0x04, 0x6e3: 0x05, 0x6e4: 0x06, 0x6e7: 0x07, + 0x6e8: 0x08, 0x6ef: 0x09, + // Block 0x1c, offset 0x700 + 0x730: 0x0e, 0x731: 0x11, 0x732: 0x13, 0x733: 0x15, 0x734: 0x17, +} diff --git a/vendor/golang.org/x/text/internal/triegen/example_compact_test.go b/vendor/golang.org/x/text/internal/triegen/example_compact_test.go new file mode 100644 index 000000000..7cf604ca4 --- /dev/null +++ b/vendor/golang.org/x/text/internal/triegen/example_compact_test.go @@ -0,0 +1,71 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package triegen_test + +import ( + "fmt" + "io" + "io/ioutil" + + "golang.org/x/text/internal/triegen" +) + +func ExampleCompacter() { + t := triegen.NewTrie("root") + for r := rune(0); r < 10000; r += 64 { + t.Insert(r, 0x9015BADA55^uint64(r)) + } + sz, _ := t.Gen(ioutil.Discard) + + fmt.Printf("Size normal: %5d\n", sz) + + var c myCompacter + sz, _ = t.Gen(ioutil.Discard, triegen.Compact(&c)) + + fmt.Printf("Size compacted: %5d\n", sz) + + // Output: + // Size normal: 81344 + // Size compacted: 3224 +} + +// A myCompacter accepts a block if only the first value is given. +type myCompacter []uint64 + +func (c *myCompacter) Size(values []uint64) (sz int, ok bool) { + for _, v := range values[1:] { + if v != 0 { + return 0, false + } + } + return 8, true // the size of a uint64 +} + +func (c *myCompacter) Store(v []uint64) uint32 { + x := uint32(len(*c)) + *c = append(*c, v[0]) + return x +} + +func (c *myCompacter) Print(w io.Writer) error { + fmt.Fprintln(w, "var firstValue = []uint64{") + for _, v := range *c { + fmt.Fprintf(w, "\t%#x,\n", v) + } + fmt.Fprintln(w, "}") + return nil +} + +func (c *myCompacter) Handler() string { + return "getFirstValue" + + // Where getFirstValue is included along with the generated code: + // func getFirstValue(n uint32, b byte) uint64 { + // if b == 0x80 { // the first continuation byte + // return firstValue[n] + // } + // return 0 + // } +} diff --git a/vendor/golang.org/x/text/internal/triegen/example_test.go b/vendor/golang.org/x/text/internal/triegen/example_test.go new file mode 100644 index 000000000..557a152e7 --- /dev/null +++ b/vendor/golang.org/x/text/internal/triegen/example_test.go @@ -0,0 +1,148 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package triegen_test + +import ( + "fmt" + "io/ioutil" + "math/rand" + "unicode" + + "golang.org/x/text/internal/triegen" +) + +const seed = 0x12345 + +var genWriter = ioutil.Discard + +func randomRunes() map[rune]uint8 { + rnd := rand.New(rand.NewSource(seed)) + m := map[rune]uint8{} + for len(m) < 100 { + // Only set our random rune if it is a valid Unicode code point. + if r := rune(rnd.Int31n(unicode.MaxRune + 1)); []rune(string(r))[0] == r { + m[r] = 1 + } + } + return m +} + +// Example_build shows how to build a simple trie. It assigns the value 1 to +// 100 random runes generated by randomRunes. +func Example_build() { + t := triegen.NewTrie("rand") + + for r, _ := range randomRunes() { + t.Insert(r, 1) + } + sz, err := t.Gen(genWriter) + + fmt.Printf("Trie size: %d bytes\n", sz) + fmt.Printf("Error: %v\n", err) + + // Output: + // Trie size: 9280 bytes + // Error: <nil> +} + +// Example_lookup demonstrates how to use the trie generated by Example_build. +func Example_lookup() { + trie := newRandTrie(0) + + // The same set of runes used by Example_build. + runes := randomRunes() + + // Verify the right value is returned for all runes. + for r := rune(0); r <= unicode.MaxRune; r++ { + // Note that the return type of lookup is uint8. + if v, _ := trie.lookupString(string(r)); v != runes[r] { + fmt.Println("FAILURE") + return + } + } + fmt.Println("SUCCESS") + + // Output: + // SUCCESS +} + +// runeValues generates some random values for a set of interesting runes. +func runeValues() map[rune]uint64 { + rnd := rand.New(rand.NewSource(seed)) + m := map[rune]uint64{} + for p := 4; p <= unicode.MaxRune; p <<= 1 { + for d := -1; d <= 1; d++ { + m[rune(p+d)] = uint64(rnd.Int63()) + } + } + return m +} + +// ExampleGen_build demonstrates the creation of multiple tries sharing common +// blocks. ExampleGen_lookup demonstrates how to use the generated tries. +func ExampleGen_build() { + var tries []*triegen.Trie + + rv := runeValues() + for _, c := range []struct { + include func(rune) bool + name string + }{ + {func(r rune) bool { return true }, "all"}, + {func(r rune) bool { return r < 0x80 }, "ASCII only"}, + {func(r rune) bool { return r < 0x80 }, "ASCII only 2"}, + {func(r rune) bool { return r <= 0xFFFF }, "BMP only"}, + {func(r rune) bool { return r > 0xFFFF }, "No BMP"}, + } { + t := triegen.NewTrie(c.name) + tries = append(tries, t) + + for r, v := range rv { + if c.include(r) { + t.Insert(r, v) + } + } + } + sz, err := triegen.Gen(genWriter, "multi", tries) + + fmt.Printf("Trie size: %d bytes\n", sz) + fmt.Printf("Error: %v\n", err) + + // Output: + // Trie size: 18250 bytes + // Error: <nil> +} + +// ExampleGen_lookup shows how to look up values in the trie generated by +// ExampleGen_build. +func ExampleGen_lookup() { + rv := runeValues() + for i, include := range []func(rune) bool{ + func(r rune) bool { return true }, // all + func(r rune) bool { return r < 0x80 }, // ASCII only + func(r rune) bool { return r < 0x80 }, // ASCII only 2 + func(r rune) bool { return r <= 0xFFFF }, // BMP only + func(r rune) bool { return r > 0xFFFF }, // No BMP + } { + t := newMultiTrie(i) + + for r := rune(0); r <= unicode.MaxRune; r++ { + x := uint64(0) + if include(r) { + x = rv[r] + } + // As we convert from a valid rune, we know it is safe to use + // lookupStringUnsafe. + if v := t.lookupStringUnsafe(string(r)); x != v { + fmt.Println("FAILURE") + return + } + } + } + fmt.Println("SUCCESS") + + // Output: + // SUCCESS +} diff --git a/vendor/golang.org/x/text/internal/triegen/gen_test.go b/vendor/golang.org/x/text/internal/triegen/gen_test.go new file mode 100644 index 000000000..831627d7a --- /dev/null +++ b/vendor/golang.org/x/text/internal/triegen/gen_test.go @@ -0,0 +1,68 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build generate + +package triegen_test + +// The code in this file generates captures and writes the tries generated in +// the examples to data_test.go. To invoke it, run: +// go test -tags=generate +// +// Making the generation code a "test" allows us to link in the necessary test +// code. + +import ( + "log" + "os" + "os/exec" +) + +func init() { + const tmpfile = "tmpout" + const dstfile = "data_test.go" + + f, err := os.Create(tmpfile) + if err != nil { + log.Fatalf("Could not create output file: %v", err) + } + defer os.Remove(tmpfile) + defer f.Close() + + // We exit before this function returns, regardless of success or failure, + // so there's no need to save (and later restore) the existing genWriter + // value. + genWriter = f + + f.Write([]byte(header)) + + Example_build() + ExampleGen_build() + + if err := exec.Command("gofmt", "-w", tmpfile).Run(); err != nil { + log.Fatal(err) + } + os.Remove(dstfile) + os.Rename(tmpfile, dstfile) + + os.Exit(0) +} + +const header = `// This file is generated with "go test -tags generate". DO NOT EDIT! +// +build !generate + +package triegen_test +` + +// Stubs for generated tries. These are needed as we exclude data_test.go if +// the generate flag is set. This will clearly make the tests fail, but that +// is okay. It allows us to bootstrap. + +type trie struct{} + +func (t *trie) lookupString(string) (uint8, int) { return 0, 1 } +func (t *trie) lookupStringUnsafe(string) uint64 { return 0 } + +func newRandTrie(i int) *trie { return &trie{} } +func newMultiTrie(i int) *trie { return &trie{} } diff --git a/vendor/golang.org/x/text/internal/triegen/print.go b/vendor/golang.org/x/text/internal/triegen/print.go new file mode 100644 index 000000000..8d9f120bc --- /dev/null +++ b/vendor/golang.org/x/text/internal/triegen/print.go @@ -0,0 +1,251 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package triegen + +import ( + "bytes" + "fmt" + "io" + "strings" + "text/template" +) + +// print writes all the data structures as well as the code necessary to use the +// trie to w. +func (b *builder) print(w io.Writer) error { + b.Stats.NValueEntries = len(b.ValueBlocks) * blockSize + b.Stats.NValueBytes = len(b.ValueBlocks) * blockSize * b.ValueSize + b.Stats.NIndexEntries = len(b.IndexBlocks) * blockSize + b.Stats.NIndexBytes = len(b.IndexBlocks) * blockSize * b.IndexSize + b.Stats.NHandleBytes = len(b.Trie) * 2 * b.IndexSize + + // If we only have one root trie, all starter blocks are at position 0 and + // we can access the arrays directly. + if len(b.Trie) == 1 { + // At this point we cannot refer to the generated tables directly. + b.ASCIIBlock = b.Name + "Values" + b.StarterBlock = b.Name + "Index" + } else { + // Otherwise we need to have explicit starter indexes in the trie + // structure. + b.ASCIIBlock = "t.ascii" + b.StarterBlock = "t.utf8Start" + } + + b.SourceType = "[]byte" + if err := lookupGen.Execute(w, b); err != nil { + return err + } + + b.SourceType = "string" + if err := lookupGen.Execute(w, b); err != nil { + return err + } + + if err := trieGen.Execute(w, b); err != nil { + return err + } + + for _, c := range b.Compactions { + if err := c.c.Print(w); err != nil { + return err + } + } + + return nil +} + +func printValues(n int, values []uint64) string { + w := &bytes.Buffer{} + boff := n * blockSize + fmt.Fprintf(w, "\t// Block %#x, offset %#x", n, boff) + var newline bool + for i, v := range values { + if i%6 == 0 { + newline = true + } + if v != 0 { + if newline { + fmt.Fprintf(w, "\n") + newline = false + } + fmt.Fprintf(w, "\t%#02x:%#04x, ", boff+i, v) + } + } + return w.String() +} + +func printIndex(b *builder, nr int, n *node) string { + w := &bytes.Buffer{} + boff := nr * blockSize + fmt.Fprintf(w, "\t// Block %#x, offset %#x", nr, boff) + var newline bool + for i, c := range n.children { + if i%8 == 0 { + newline = true + } + if c != nil { + v := b.Compactions[c.index.compaction].Offset + uint32(c.index.index) + if v != 0 { + if newline { + fmt.Fprintf(w, "\n") + newline = false + } + fmt.Fprintf(w, "\t%#02x:%#02x, ", boff+i, v) + } + } + } + return w.String() +} + +var ( + trieGen = template.Must(template.New("trie").Funcs(template.FuncMap{ + "printValues": printValues, + "printIndex": printIndex, + "title": strings.Title, + "dec": func(x int) int { return x - 1 }, + "psize": func(n int) string { + return fmt.Sprintf("%d bytes (%.2f KiB)", n, float64(n)/1024) + }, + }).Parse(trieTemplate)) + lookupGen = template.Must(template.New("lookup").Parse(lookupTemplate)) +) + +// TODO: consider the return type of lookup. It could be uint64, even if the +// internal value type is smaller. We will have to verify this with the +// performance of unicode/norm, which is very sensitive to such changes. +const trieTemplate = `{{$b := .}}{{$multi := gt (len .Trie) 1}} +// {{.Name}}Trie. Total size: {{psize .Size}}. Checksum: {{printf "%08x" .Checksum}}. +type {{.Name}}Trie struct { {{if $multi}} + ascii []{{.ValueType}} // index for ASCII bytes + utf8Start []{{.IndexType}} // index for UTF-8 bytes >= 0xC0 +{{end}}} + +func new{{title .Name}}Trie(i int) *{{.Name}}Trie { {{if $multi}} + h := {{.Name}}TrieHandles[i] + return &{{.Name}}Trie{ {{.Name}}Values[uint32(h.ascii)<<6:], {{.Name}}Index[uint32(h.multi)<<6:] } +} + +type {{.Name}}TrieHandle struct { + ascii, multi {{.IndexType}} +} + +// {{.Name}}TrieHandles: {{len .Trie}} handles, {{.Stats.NHandleBytes}} bytes +var {{.Name}}TrieHandles = [{{len .Trie}}]{{.Name}}TrieHandle{ +{{range .Trie}} { {{.ASCIIIndex}}, {{.StarterIndex}} }, // {{printf "%08x" .Checksum}}: {{.Name}} +{{end}}}{{else}} + return &{{.Name}}Trie{} +} +{{end}} +// lookupValue determines the type of block n and looks up the value for b. +func (t *{{.Name}}Trie) lookupValue(n uint32, b byte) {{.ValueType}}{{$last := dec (len .Compactions)}} { + switch { {{range $i, $c := .Compactions}} + {{if eq $i $last}}default{{else}}case n < {{$c.Cutoff}}{{end}}:{{if ne $i 0}} + n -= {{$c.Offset}}{{end}} + return {{print $b.ValueType}}({{$c.Handler}}){{end}} + } +} + +// {{.Name}}Values: {{len .ValueBlocks}} blocks, {{.Stats.NValueEntries}} entries, {{.Stats.NValueBytes}} bytes +// The third block is the zero block. +var {{.Name}}Values = [{{.Stats.NValueEntries}}]{{.ValueType}} { +{{range $i, $v := .ValueBlocks}}{{printValues $i $v}} +{{end}}} + +// {{.Name}}Index: {{len .IndexBlocks}} blocks, {{.Stats.NIndexEntries}} entries, {{.Stats.NIndexBytes}} bytes +// Block 0 is the zero block. +var {{.Name}}Index = [{{.Stats.NIndexEntries}}]{{.IndexType}} { +{{range $i, $v := .IndexBlocks}}{{printIndex $b $i $v}} +{{end}}} +` + +// TODO: consider allowing zero-length strings after evaluating performance with +// unicode/norm. +const lookupTemplate = ` +// lookup{{if eq .SourceType "string"}}String{{end}} returns the trie value for the first UTF-8 encoding in s and +// the width in bytes of this encoding. The size will be 0 if s does not +// hold enough bytes to complete the encoding. len(s) must be greater than 0. +func (t *{{.Name}}Trie) lookup{{if eq .SourceType "string"}}String{{end}}(s {{.SourceType}}) (v {{.ValueType}}, sz int) { + c0 := s[0] + switch { + case c0 < 0x80: // is ASCII + return {{.ASCIIBlock}}[c0], 1 + case c0 < 0xC2: + return 0, 1 // Illegal UTF-8: not a starter, not ASCII. + case c0 < 0xE0: // 2-byte UTF-8 + if len(s) < 2 { + return 0, 0 + } + i := {{.StarterBlock}}[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c1), 2 + case c0 < 0xF0: // 3-byte UTF-8 + if len(s) < 3 { + return 0, 0 + } + i := {{.StarterBlock}}[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + o := uint32(i)<<6 + uint32(c1) + i = {{.Name}}Index[o] + c2 := s[2] + if c2 < 0x80 || 0xC0 <= c2 { + return 0, 2 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c2), 3 + case c0 < 0xF8: // 4-byte UTF-8 + if len(s) < 4 { + return 0, 0 + } + i := {{.StarterBlock}}[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + o := uint32(i)<<6 + uint32(c1) + i = {{.Name}}Index[o] + c2 := s[2] + if c2 < 0x80 || 0xC0 <= c2 { + return 0, 2 // Illegal UTF-8: not a continuation byte. + } + o = uint32(i)<<6 + uint32(c2) + i = {{.Name}}Index[o] + c3 := s[3] + if c3 < 0x80 || 0xC0 <= c3 { + return 0, 3 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c3), 4 + } + // Illegal rune + return 0, 1 +} + +// lookup{{if eq .SourceType "string"}}String{{end}}Unsafe returns the trie value for the first UTF-8 encoding in s. +// s must start with a full and valid UTF-8 encoded rune. +func (t *{{.Name}}Trie) lookup{{if eq .SourceType "string"}}String{{end}}Unsafe(s {{.SourceType}}) {{.ValueType}} { + c0 := s[0] + if c0 < 0x80 { // is ASCII + return {{.ASCIIBlock}}[c0] + } + i := {{.StarterBlock}}[c0] + if c0 < 0xE0 { // 2-byte UTF-8 + return t.lookupValue(uint32(i), s[1]) + } + i = {{.Name}}Index[uint32(i)<<6+uint32(s[1])] + if c0 < 0xF0 { // 3-byte UTF-8 + return t.lookupValue(uint32(i), s[2]) + } + i = {{.Name}}Index[uint32(i)<<6+uint32(s[2])] + if c0 < 0xF8 { // 4-byte UTF-8 + return t.lookupValue(uint32(i), s[3]) + } + return 0 +} +` diff --git a/vendor/golang.org/x/text/internal/triegen/triegen.go b/vendor/golang.org/x/text/internal/triegen/triegen.go new file mode 100644 index 000000000..adb010812 --- /dev/null +++ b/vendor/golang.org/x/text/internal/triegen/triegen.go @@ -0,0 +1,494 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package triegen implements a code generator for a trie for associating +// unsigned integer values with UTF-8 encoded runes. +// +// Many of the go.text packages use tries for storing per-rune information. A +// trie is especially useful if many of the runes have the same value. If this +// is the case, many blocks can be expected to be shared allowing for +// information on many runes to be stored in little space. +// +// As most of the lookups are done directly on []byte slices, the tries use the +// UTF-8 bytes directly for the lookup. This saves a conversion from UTF-8 to +// runes and contributes a little bit to better performance. It also naturally +// provides a fast path for ASCII. +// +// Space is also an issue. There are many code points defined in Unicode and as +// a result tables can get quite large. So every byte counts. The triegen +// package automatically chooses the smallest integer values to represent the +// tables. Compacters allow further compression of the trie by allowing for +// alternative representations of individual trie blocks. +// +// triegen allows generating multiple tries as a single structure. This is +// useful when, for example, one wants to generate tries for several languages +// that have a lot of values in common. Some existing libraries for +// internationalization store all per-language data as a dynamically loadable +// chunk. The go.text packages are designed with the assumption that the user +// typically wants to compile in support for all supported languages, in line +// with the approach common to Go to create a single standalone binary. The +// multi-root trie approach can give significant storage savings in this +// scenario. +// +// triegen generates both tables and code. The code is optimized to use the +// automatically chosen data types. The following code is generated for a Trie +// or multiple Tries named "foo": +// - type fooTrie +// The trie type. +// +// - func newFooTrie(x int) *fooTrie +// Trie constructor, where x is the index of the trie passed to Gen. +// +// - func (t *fooTrie) lookup(s []byte) (v uintX, sz int) +// The lookup method, where uintX is automatically chosen. +// +// - func lookupString, lookupUnsafe and lookupStringUnsafe +// Variants of the above. +// +// - var fooValues and fooIndex and any tables generated by Compacters. +// The core trie data. +// +// - var fooTrieHandles +// Indexes of starter blocks in case of multiple trie roots. +// +// It is recommended that users test the generated trie by checking the returned +// value for every rune. Such exhaustive tests are possible as the the number of +// runes in Unicode is limited. +package triegen // import "golang.org/x/text/internal/triegen" + +// TODO: Arguably, the internally optimized data types would not have to be +// exposed in the generated API. We could also investigate not generating the +// code, but using it through a package. We would have to investigate the impact +// on performance of making such change, though. For packages like unicode/norm, +// small changes like this could tank performance. + +import ( + "encoding/binary" + "fmt" + "hash/crc64" + "io" + "log" + "unicode/utf8" +) + +// builder builds a set of tries for associating values with runes. The set of +// tries can share common index and value blocks. +type builder struct { + Name string + + // ValueType is the type of the trie values looked up. + ValueType string + + // ValueSize is the byte size of the ValueType. + ValueSize int + + // IndexType is the type of trie index values used for all UTF-8 bytes of + // a rune except the last one. + IndexType string + + // IndexSize is the byte size of the IndexType. + IndexSize int + + // SourceType is used when generating the lookup functions. If the user + // requests StringSupport, all lookup functions will be generated for + // string input as well. + SourceType string + + Trie []*Trie + + IndexBlocks []*node + ValueBlocks [][]uint64 + Compactions []compaction + Checksum uint64 + + ASCIIBlock string + StarterBlock string + + indexBlockIdx map[uint64]int + valueBlockIdx map[uint64]nodeIndex + asciiBlockIdx map[uint64]int + + // Stats are used to fill out the template. + Stats struct { + NValueEntries int + NValueBytes int + NIndexEntries int + NIndexBytes int + NHandleBytes int + } + + err error +} + +// A nodeIndex encodes the index of a node, which is defined by the compaction +// which stores it and an index within the compaction. For internal nodes, the +// compaction is always 0. +type nodeIndex struct { + compaction int + index int +} + +// compaction keeps track of stats used for the compaction. +type compaction struct { + c Compacter + blocks []*node + maxHandle uint32 + totalSize int + + // Used by template-based generator and thus exported. + Cutoff uint32 + Offset uint32 + Handler string +} + +func (b *builder) setError(err error) { + if b.err == nil { + b.err = err + } +} + +// An Option can be passed to Gen. +type Option func(b *builder) error + +// Compact configures the trie generator to use the given Compacter. +func Compact(c Compacter) Option { + return func(b *builder) error { + b.Compactions = append(b.Compactions, compaction{ + c: c, + Handler: c.Handler() + "(n, b)"}) + return nil + } +} + +// Gen writes Go code for a shared trie lookup structure to w for the given +// Tries. The generated trie type will be called nameTrie. newNameTrie(x) will +// return the *nameTrie for tries[x]. A value can be looked up by using one of +// the various lookup methods defined on nameTrie. It returns the table size of +// the generated trie. +func Gen(w io.Writer, name string, tries []*Trie, opts ...Option) (sz int, err error) { + // The index contains two dummy blocks, followed by the zero block. The zero + // block is at offset 0x80, so that the offset for the zero block for + // continuation bytes is 0. + b := &builder{ + Name: name, + Trie: tries, + IndexBlocks: []*node{{}, {}, {}}, + Compactions: []compaction{{ + Handler: name + "Values[n<<6+uint32(b)]", + }}, + // The 0 key in indexBlockIdx and valueBlockIdx is the hash of the zero + // block. + indexBlockIdx: map[uint64]int{0: 0}, + valueBlockIdx: map[uint64]nodeIndex{0: {}}, + asciiBlockIdx: map[uint64]int{}, + } + b.Compactions[0].c = (*simpleCompacter)(b) + + for _, f := range opts { + if err := f(b); err != nil { + return 0, err + } + } + b.build() + if b.err != nil { + return 0, b.err + } + if err = b.print(w); err != nil { + return 0, err + } + return b.Size(), nil +} + +// A Trie represents a single root node of a trie. A builder may build several +// overlapping tries at once. +type Trie struct { + root *node + + hiddenTrie +} + +// hiddenTrie contains values we want to be visible to the template generator, +// but hidden from the API documentation. +type hiddenTrie struct { + Name string + Checksum uint64 + ASCIIIndex int + StarterIndex int +} + +// NewTrie returns a new trie root. +func NewTrie(name string) *Trie { + return &Trie{ + &node{ + children: make([]*node, blockSize), + values: make([]uint64, utf8.RuneSelf), + }, + hiddenTrie{Name: name}, + } +} + +// Gen is a convenience wrapper around the Gen func passing t as the only trie +// and uses the name passed to NewTrie. It returns the size of the generated +// tables. +func (t *Trie) Gen(w io.Writer, opts ...Option) (sz int, err error) { + return Gen(w, t.Name, []*Trie{t}, opts...) +} + +// node is a node of the intermediate trie structure. +type node struct { + // children holds this node's children. It is always of length 64. + // A child node may be nil. + children []*node + + // values contains the values of this node. If it is non-nil, this node is + // either a root or leaf node: + // For root nodes, len(values) == 128 and it maps the bytes in [0x00, 0x7F]. + // For leaf nodes, len(values) == 64 and it maps the bytes in [0x80, 0xBF]. + values []uint64 + + index nodeIndex +} + +// Insert associates value with the given rune. Insert will panic if a non-zero +// value is passed for an invalid rune. +func (t *Trie) Insert(r rune, value uint64) { + if value == 0 { + return + } + s := string(r) + if []rune(s)[0] != r && value != 0 { + // Note: The UCD tables will always assign what amounts to a zero value + // to a surrogate. Allowing a zero value for an illegal rune allows + // users to iterate over [0..MaxRune] without having to explicitly + // exclude surrogates, which would be tedious. + panic(fmt.Sprintf("triegen: non-zero value for invalid rune %U", r)) + } + if len(s) == 1 { + // It is a root node value (ASCII). + t.root.values[s[0]] = value + return + } + + n := t.root + for ; len(s) > 1; s = s[1:] { + if n.children == nil { + n.children = make([]*node, blockSize) + } + p := s[0] % blockSize + c := n.children[p] + if c == nil { + c = &node{} + n.children[p] = c + } + if len(s) > 2 && c.values != nil { + log.Fatalf("triegen: insert(%U): found internal node with values", r) + } + n = c + } + if n.values == nil { + n.values = make([]uint64, blockSize) + } + if n.children != nil { + log.Fatalf("triegen: insert(%U): found leaf node that also has child nodes", r) + } + n.values[s[0]-0x80] = value +} + +// Size returns the number of bytes the generated trie will take to store. It +// needs to be exported as it is used in the templates. +func (b *builder) Size() int { + // Index blocks. + sz := len(b.IndexBlocks) * blockSize * b.IndexSize + + // Skip the first compaction, which represents the normal value blocks, as + // its totalSize does not account for the ASCII blocks, which are managed + // separately. + sz += len(b.ValueBlocks) * blockSize * b.ValueSize + for _, c := range b.Compactions[1:] { + sz += c.totalSize + } + + // TODO: this computation does not account for the fixed overhead of a using + // a compaction, either code or data. As for data, though, the typical + // overhead of data is in the order of bytes (2 bytes for cases). Further, + // the savings of using a compaction should anyway be substantial for it to + // be worth it. + + // For multi-root tries, we also need to account for the handles. + if len(b.Trie) > 1 { + sz += 2 * b.IndexSize * len(b.Trie) + } + return sz +} + +func (b *builder) build() { + // Compute the sizes of the values. + var vmax uint64 + for _, t := range b.Trie { + vmax = maxValue(t.root, vmax) + } + b.ValueType, b.ValueSize = getIntType(vmax) + + // Compute all block allocations. + // TODO: first compute the ASCII blocks for all tries and then the other + // nodes. ASCII blocks are more restricted in placement, as they require two + // blocks to be placed consecutively. Processing them first may improve + // sharing (at least one zero block can be expected to be saved.) + for _, t := range b.Trie { + b.Checksum += b.buildTrie(t) + } + + // Compute the offsets for all the Compacters. + offset := uint32(0) + for i := range b.Compactions { + c := &b.Compactions[i] + c.Offset = offset + offset += c.maxHandle + 1 + c.Cutoff = offset + } + + // Compute the sizes of indexes. + // TODO: different byte positions could have different sizes. So far we have + // not found a case where this is beneficial. + imax := uint64(b.Compactions[len(b.Compactions)-1].Cutoff) + for _, ib := range b.IndexBlocks { + if x := uint64(ib.index.index); x > imax { + imax = x + } + } + b.IndexType, b.IndexSize = getIntType(imax) +} + +func maxValue(n *node, max uint64) uint64 { + if n == nil { + return max + } + for _, c := range n.children { + max = maxValue(c, max) + } + for _, v := range n.values { + if max < v { + max = v + } + } + return max +} + +func getIntType(v uint64) (string, int) { + switch { + case v < 1<<8: + return "uint8", 1 + case v < 1<<16: + return "uint16", 2 + case v < 1<<32: + return "uint32", 4 + } + return "uint64", 8 +} + +const ( + blockSize = 64 + + // Subtract two blocks to offset 0x80, the first continuation byte. + blockOffset = 2 + + // Subtract three blocks to offset 0xC0, the first non-ASCII starter. + rootBlockOffset = 3 +) + +var crcTable = crc64.MakeTable(crc64.ISO) + +func (b *builder) buildTrie(t *Trie) uint64 { + n := t.root + + // Get the ASCII offset. For the first trie, the ASCII block will be at + // position 0. + hasher := crc64.New(crcTable) + binary.Write(hasher, binary.BigEndian, n.values) + hash := hasher.Sum64() + + v, ok := b.asciiBlockIdx[hash] + if !ok { + v = len(b.ValueBlocks) + b.asciiBlockIdx[hash] = v + + b.ValueBlocks = append(b.ValueBlocks, n.values[:blockSize], n.values[blockSize:]) + if v == 0 { + // Add the zero block at position 2 so that it will be assigned a + // zero reference in the lookup blocks. + // TODO: always do this? This would allow us to remove a check from + // the trie lookup, but at the expense of extra space. Analyze + // performance for unicode/norm. + b.ValueBlocks = append(b.ValueBlocks, make([]uint64, blockSize)) + } + } + t.ASCIIIndex = v + + // Compute remaining offsets. + t.Checksum = b.computeOffsets(n, true) + // We already subtracted the normal blockOffset from the index. Subtract the + // difference for starter bytes. + t.StarterIndex = n.index.index - (rootBlockOffset - blockOffset) + return t.Checksum +} + +func (b *builder) computeOffsets(n *node, root bool) uint64 { + // For the first trie, the root lookup block will be at position 3, which is + // the offset for UTF-8 non-ASCII starter bytes. + first := len(b.IndexBlocks) == rootBlockOffset + if first { + b.IndexBlocks = append(b.IndexBlocks, n) + } + + // We special-case the cases where all values recursively are 0. This allows + // for the use of a zero block to which all such values can be directed. + hash := uint64(0) + if n.children != nil || n.values != nil { + hasher := crc64.New(crcTable) + for _, c := range n.children { + var v uint64 + if c != nil { + v = b.computeOffsets(c, false) + } + binary.Write(hasher, binary.BigEndian, v) + } + binary.Write(hasher, binary.BigEndian, n.values) + hash = hasher.Sum64() + } + + if first { + b.indexBlockIdx[hash] = rootBlockOffset - blockOffset + } + + // Compacters don't apply to internal nodes. + if n.children != nil { + v, ok := b.indexBlockIdx[hash] + if !ok { + v = len(b.IndexBlocks) - blockOffset + b.IndexBlocks = append(b.IndexBlocks, n) + b.indexBlockIdx[hash] = v + } + n.index = nodeIndex{0, v} + } else { + h, ok := b.valueBlockIdx[hash] + if !ok { + bestI, bestSize := 0, blockSize*b.ValueSize + for i, c := range b.Compactions[1:] { + if sz, ok := c.c.Size(n.values); ok && bestSize > sz { + bestI, bestSize = i+1, sz + } + } + c := &b.Compactions[bestI] + c.totalSize += bestSize + v := c.c.Store(n.values) + if c.maxHandle < v { + c.maxHandle = v + } + h = nodeIndex{bestI, int(v)} + b.valueBlockIdx[hash] = h + } + n.index = h + } + return hash +} diff --git a/vendor/golang.org/x/text/internal/ucd/example_test.go b/vendor/golang.org/x/text/internal/ucd/example_test.go new file mode 100644 index 000000000..338a50d1c --- /dev/null +++ b/vendor/golang.org/x/text/internal/ucd/example_test.go @@ -0,0 +1,81 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ucd_test + +import ( + "fmt" + "strings" + + "golang.org/x/text/internal/ucd" +) + +func Example() { + // Read rune-by-rune from UnicodeData. + var count int + p := ucd.New(strings.NewReader(unicodeData)) + for p.Next() { + count++ + if lower := p.Runes(ucd.SimpleLowercaseMapping); lower != nil { + fmt.Printf("lower(%U) -> %U\n", p.Rune(0), lower[0]) + } + } + if err := p.Err(); err != nil { + fmt.Println(err) + } + fmt.Println("Number of runes visited:", count) + + // Read raw ranges from Scripts. + p = ucd.New(strings.NewReader(scripts), ucd.KeepRanges) + for p.Next() { + start, end := p.Range(0) + fmt.Printf("%04X..%04X: %s\n", start, end, p.String(1)) + } + if err := p.Err(); err != nil { + fmt.Println(err) + } + + // Output: + // lower(U+00C0) -> U+00E0 + // lower(U+00C1) -> U+00E1 + // lower(U+00C2) -> U+00E2 + // lower(U+00C3) -> U+00E3 + // lower(U+00C4) -> U+00E4 + // Number of runes visited: 6594 + // 0000..001F: Common + // 0020..0020: Common + // 0021..0023: Common + // 0024..0024: Common +} + +// Excerpt from UnicodeData.txt +const unicodeData = ` +00B9;SUPERSCRIPT ONE;No;0;EN;<super> 0031;;1;1;N;SUPERSCRIPT DIGIT ONE;;;; +00BA;MASCULINE ORDINAL INDICATOR;Lo;0;L;<super> 006F;;;;N;;;;; +00BB;RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK;Pf;0;ON;;;;;Y;RIGHT POINTING GUILLEMET;;;; +00BC;VULGAR FRACTION ONE QUARTER;No;0;ON;<fraction> 0031 2044 0034;;;1/4;N;FRACTION ONE QUARTER;;;; +00BD;VULGAR FRACTION ONE HALF;No;0;ON;<fraction> 0031 2044 0032;;;1/2;N;FRACTION ONE HALF;;;; +00BE;VULGAR FRACTION THREE QUARTERS;No;0;ON;<fraction> 0033 2044 0034;;;3/4;N;FRACTION THREE QUARTERS;;;; +00BF;INVERTED QUESTION MARK;Po;0;ON;;;;;N;;;;; +00C0;LATIN CAPITAL LETTER A WITH GRAVE;Lu;0;L;0041 0300;;;;N;LATIN CAPITAL LETTER A GRAVE;;;00E0; +00C1;LATIN CAPITAL LETTER A WITH ACUTE;Lu;0;L;0041 0301;;;;N;LATIN CAPITAL LETTER A ACUTE;;;00E1; +00C2;LATIN CAPITAL LETTER A WITH CIRCUMFLEX;Lu;0;L;0041 0302;;;;N;LATIN CAPITAL LETTER A CIRCUMFLEX;;;00E2; +00C3;LATIN CAPITAL LETTER A WITH TILDE;Lu;0;L;0041 0303;;;;N;LATIN CAPITAL LETTER A TILDE;;;00E3; +00C4;LATIN CAPITAL LETTER A WITH DIAERESIS;Lu;0;L;0041 0308;;;;N;LATIN CAPITAL LETTER A DIAERESIS;;;00E4; + +# A legacy rune range. +3400;<CJK Ideograph Extension A, First>;Lo;0;L;;;;;N;;;;; +4DB5;<CJK Ideograph Extension A, Last>;Lo;0;L;;;;;N;;;;; +` + +// Excerpt from Scripts.txt +const scripts = ` +# Property: Script +# ================================================ + +0000..001F ; Common # Cc [32] <control-0000>..<control-001F> +0020 ; Common # Zs SPACE +0021..0023 ; Common # Po [3] EXCLAMATION MARK..NUMBER SIGN +0024 ; Common # Sc DOLLAR SIGN +` diff --git a/vendor/golang.org/x/text/internal/ucd/ucd.go b/vendor/golang.org/x/text/internal/ucd/ucd.go new file mode 100644 index 000000000..8c45b5f3d --- /dev/null +++ b/vendor/golang.org/x/text/internal/ucd/ucd.go @@ -0,0 +1,371 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package ucd provides a parser for Unicode Character Database files, the +// format of which is defined in http://www.unicode.org/reports/tr44/. See +// http://www.unicode.org/Public/UCD/latest/ucd/ for example files. +// +// It currently does not support substitutions of missing fields. +package ucd // import "golang.org/x/text/internal/ucd" + +import ( + "bufio" + "errors" + "fmt" + "io" + "log" + "regexp" + "strconv" + "strings" +) + +// UnicodeData.txt fields. +const ( + CodePoint = iota + Name + GeneralCategory + CanonicalCombiningClass + BidiClass + DecompMapping + DecimalValue + DigitValue + NumericValue + BidiMirrored + Unicode1Name + ISOComment + SimpleUppercaseMapping + SimpleLowercaseMapping + SimpleTitlecaseMapping +) + +// Parse calls f for each entry in the given reader of a UCD file. It will close +// the reader upon return. It will call log.Fatal if any error occurred. +// +// This implements the most common usage pattern of using Parser. +func Parse(r io.ReadCloser, f func(p *Parser)) { + defer r.Close() + + p := New(r) + for p.Next() { + f(p) + } + if err := p.Err(); err != nil { + r.Close() // os.Exit will cause defers not to be called. + log.Fatal(err) + } +} + +// An Option is used to configure a Parser. +type Option func(p *Parser) + +func keepRanges(p *Parser) { + p.keepRanges = true +} + +var ( + // KeepRanges prevents the expansion of ranges. The raw ranges can be + // obtained by calling Range(0) on the parser. + KeepRanges Option = keepRanges +) + +// The Part option register a handler for lines starting with a '@'. The text +// after a '@' is available as the first field. Comments are handled as usual. +func Part(f func(p *Parser)) Option { + return func(p *Parser) { + p.partHandler = f + } +} + +// The CommentHandler option passes comments that are on a line by itself to +// a given handler. +func CommentHandler(f func(s string)) Option { + return func(p *Parser) { + p.commentHandler = f + } +} + +// A Parser parses Unicode Character Database (UCD) files. +type Parser struct { + scanner *bufio.Scanner + + keepRanges bool // Don't expand rune ranges in field 0. + + err error + comment string + field []string + // parsedRange is needed in case Range(0) is called more than once for one + // field. In some cases this requires scanning ahead. + line int + parsedRange bool + rangeStart, rangeEnd rune + + partHandler func(p *Parser) + commentHandler func(s string) +} + +func (p *Parser) setError(err error, msg string) { + if p.err == nil && err != nil { + if msg == "" { + p.err = fmt.Errorf("ucd:line:%d: %v", p.line, err) + } else { + p.err = fmt.Errorf("ucd:line:%d:%s: %v", p.line, msg, err) + } + } +} + +func (p *Parser) getField(i int) string { + if i >= len(p.field) { + return "" + } + return p.field[i] +} + +// Err returns a non-nil error if any error occurred during parsing. +func (p *Parser) Err() error { + return p.err +} + +// New returns a Parser for the given Reader. +func New(r io.Reader, o ...Option) *Parser { + p := &Parser{ + scanner: bufio.NewScanner(r), + } + for _, f := range o { + f(p) + } + return p +} + +// Next parses the next line in the file. It returns true if a line was parsed +// and false if it reached the end of the file. +func (p *Parser) Next() bool { + if !p.keepRanges && p.rangeStart < p.rangeEnd { + p.rangeStart++ + return true + } + p.comment = "" + p.field = p.field[:0] + p.parsedRange = false + + for p.scanner.Scan() && p.err == nil { + p.line++ + s := p.scanner.Text() + if s == "" { + continue + } + if s[0] == '#' { + if p.commentHandler != nil { + p.commentHandler(strings.TrimSpace(s[1:])) + } + continue + } + + // Parse line + if i := strings.IndexByte(s, '#'); i != -1 { + p.comment = strings.TrimSpace(s[i+1:]) + s = s[:i] + } + if s[0] == '@' { + if p.partHandler != nil { + p.field = append(p.field, strings.TrimSpace(s[1:])) + p.partHandler(p) + p.field = p.field[:0] + } + p.comment = "" + continue + } + for { + i := strings.IndexByte(s, ';') + if i == -1 { + p.field = append(p.field, strings.TrimSpace(s)) + break + } + p.field = append(p.field, strings.TrimSpace(s[:i])) + s = s[i+1:] + } + if !p.keepRanges { + p.rangeStart, p.rangeEnd = p.getRange(0) + } + return true + } + p.setError(p.scanner.Err(), "scanner failed") + return false +} + +func parseRune(b string) (rune, error) { + if len(b) > 2 && b[0] == 'U' && b[1] == '+' { + b = b[2:] + } + x, err := strconv.ParseUint(b, 16, 32) + return rune(x), err +} + +func (p *Parser) parseRune(s string) rune { + x, err := parseRune(s) + p.setError(err, "failed to parse rune") + return x +} + +// Rune parses and returns field i as a rune. +func (p *Parser) Rune(i int) rune { + if i > 0 || p.keepRanges { + return p.parseRune(p.getField(i)) + } + return p.rangeStart +} + +// Runes interprets and returns field i as a sequence of runes. +func (p *Parser) Runes(i int) (runes []rune) { + add := func(s string) { + if s = strings.TrimSpace(s); len(s) > 0 { + runes = append(runes, p.parseRune(s)) + } + } + for b := p.getField(i); ; { + i := strings.IndexByte(b, ' ') + if i == -1 { + add(b) + break + } + add(b[:i]) + b = b[i+1:] + } + return +} + +var ( + errIncorrectLegacyRange = errors.New("ucd: unmatched <* First>") + + // reRange matches one line of a legacy rune range. + reRange = regexp.MustCompile("^([0-9A-F]*);<([^,]*), ([^>]*)>(.*)$") +) + +// Range parses and returns field i as a rune range. A range is inclusive at +// both ends. If the field only has one rune, first and last will be identical. +// It supports the legacy format for ranges used in UnicodeData.txt. +func (p *Parser) Range(i int) (first, last rune) { + if !p.keepRanges { + return p.rangeStart, p.rangeStart + } + return p.getRange(i) +} + +func (p *Parser) getRange(i int) (first, last rune) { + b := p.getField(i) + if k := strings.Index(b, ".."); k != -1 { + return p.parseRune(b[:k]), p.parseRune(b[k+2:]) + } + // The first field may not be a rune, in which case we may ignore any error + // and set the range as 0..0. + x, err := parseRune(b) + if err != nil { + // Disable range parsing henceforth. This ensures that an error will be + // returned if the user subsequently will try to parse this field as + // a Rune. + p.keepRanges = true + } + // Special case for UnicodeData that was retained for backwards compatibility. + if i == 0 && len(p.field) > 1 && strings.HasSuffix(p.field[1], "First>") { + if p.parsedRange { + return p.rangeStart, p.rangeEnd + } + mf := reRange.FindStringSubmatch(p.scanner.Text()) + p.line++ + if mf == nil || !p.scanner.Scan() { + p.setError(errIncorrectLegacyRange, "") + return x, x + } + // Using Bytes would be more efficient here, but Text is a lot easier + // and this is not a frequent case. + ml := reRange.FindStringSubmatch(p.scanner.Text()) + if ml == nil || mf[2] != ml[2] || ml[3] != "Last" || mf[4] != ml[4] { + p.setError(errIncorrectLegacyRange, "") + return x, x + } + p.rangeStart, p.rangeEnd = x, p.parseRune(p.scanner.Text()[:len(ml[1])]) + p.parsedRange = true + return p.rangeStart, p.rangeEnd + } + return x, x +} + +// bools recognizes all valid UCD boolean values. +var bools = map[string]bool{ + "": false, + "N": false, + "No": false, + "F": false, + "False": false, + "Y": true, + "Yes": true, + "T": true, + "True": true, +} + +// Bool parses and returns field i as a boolean value. +func (p *Parser) Bool(i int) bool { + f := p.getField(i) + for s, v := range bools { + if f == s { + return v + } + } + p.setError(strconv.ErrSyntax, "error parsing bool") + return false +} + +// Int parses and returns field i as an integer value. +func (p *Parser) Int(i int) int { + x, err := strconv.ParseInt(string(p.getField(i)), 10, 64) + p.setError(err, "error parsing int") + return int(x) +} + +// Uint parses and returns field i as an unsigned integer value. +func (p *Parser) Uint(i int) uint { + x, err := strconv.ParseUint(string(p.getField(i)), 10, 64) + p.setError(err, "error parsing uint") + return uint(x) +} + +// Float parses and returns field i as a decimal value. +func (p *Parser) Float(i int) float64 { + x, err := strconv.ParseFloat(string(p.getField(i)), 64) + p.setError(err, "error parsing float") + return x +} + +// String parses and returns field i as a string value. +func (p *Parser) String(i int) string { + return string(p.getField(i)) +} + +// Strings parses and returns field i as a space-separated list of strings. +func (p *Parser) Strings(i int) []string { + ss := strings.Split(string(p.getField(i)), " ") + for i, s := range ss { + ss[i] = strings.TrimSpace(s) + } + return ss +} + +// Comment returns the comments for the current line. +func (p *Parser) Comment() string { + return string(p.comment) +} + +var errUndefinedEnum = errors.New("ucd: undefined enum value") + +// Enum interprets and returns field i as a value that must be one of the values +// in enum. +func (p *Parser) Enum(i int, enum ...string) string { + f := p.getField(i) + for _, s := range enum { + if f == s { + return s + } + } + p.setError(errUndefinedEnum, "error parsing enum") + return "" +} diff --git a/vendor/golang.org/x/text/internal/ucd/ucd_test.go b/vendor/golang.org/x/text/internal/ucd/ucd_test.go new file mode 100644 index 000000000..11a6542e4 --- /dev/null +++ b/vendor/golang.org/x/text/internal/ucd/ucd_test.go @@ -0,0 +1,105 @@ +package ucd + +import ( + "strings" + "testing" +) + +const file = ` +# Comments should be skipped +# rune; bool; uint; int; float; runes; # Y +0..0005; Y; 0; 2; -5.25 ; 0 1 2 3 4 5; +6..0007; Yes ; 6; 1; -4.25 ; 0006 0007; +8; T ; 8 ; 0 ;-3.25 ;;# T +9; True ;9 ; -1;-2.25 ; 0009; + +# more comments to be ignored +@Part0 + +A; N; 10 ; -2; -1.25; ;# N +B; No; 11 ; -3; -0.25; +C; False;12; -4; 0.75; +D; ;13;-5;1.75; + +@Part1 # Another part. +# We test part comments get removed by not commenting the the next line. +E..10FFFF; F; 14 ; -6; 2.75; +` + +var want = []struct { + start, end rune +}{ + {0x00, 0x05}, + {0x06, 0x07}, + {0x08, 0x08}, + {0x09, 0x09}, + {0x0A, 0x0A}, + {0x0B, 0x0B}, + {0x0C, 0x0C}, + {0x0D, 0x0D}, + {0x0E, 0x10FFFF}, +} + +func TestGetters(t *testing.T) { + parts := [][2]string{ + {"Part0", ""}, + {"Part1", "Another part."}, + } + handler := func(p *Parser) { + if len(parts) == 0 { + t.Error("Part handler invoked too many times.") + return + } + want := parts[0] + parts = parts[1:] + if got0, got1 := p.String(0), p.Comment(); got0 != want[0] || got1 != want[1] { + t.Errorf(`part: got %q, %q; want %q"`, got0, got1, want) + } + } + + p := New(strings.NewReader(file), KeepRanges, Part(handler)) + for i := 0; p.Next(); i++ { + start, end := p.Range(0) + w := want[i] + if start != w.start || end != w.end { + t.Fatalf("%d:Range(0); got %#x..%#x; want %#x..%#x", i, start, end, w.start, w.end) + } + if w.start == w.end && p.Rune(0) != w.start { + t.Errorf("%d:Range(0).start: got %U; want %U", i, p.Rune(0), w.start) + } + if got, want := p.Bool(1), w.start <= 9; got != want { + t.Errorf("%d:Bool(1): got %v; want %v", i, got, want) + } + if got := p.Rune(4); got != 0 || p.Err() == nil { + t.Errorf("%d:Rune(%q): got no error; want error", i, p.String(1)) + } + p.err = nil + if got := p.Uint(2); rune(got) != start { + t.Errorf("%d:Uint(2): got %v; want %v", i, got, start) + } + if got, want := p.Int(3), 2-i; got != want { + t.Errorf("%d:Int(3): got %v; want %v", i, got, want) + } + if got, want := p.Float(4), -5.25+float64(i); got != want { + t.Errorf("%d:Int(3): got %v; want %v", i, got, want) + } + if got := p.Runes(5); got == nil { + if p.String(5) != "" { + t.Errorf("%d:Runes(5): expected non-empty list", i) + } + } else { + if got[0] != start || got[len(got)-1] != end { + t.Errorf("%d:Runes(5): got %#x; want %#x..%#x", i, got, start, end) + } + } + if got := p.Comment(); got != "" && got != p.String(1) { + t.Errorf("%d:Comment(): got %v; want %v", i, got, p.String(1)) + } + } + if err := p.Err(); err != nil { + t.Errorf("Parser error: %v", err) + } + if len(parts) != 0 { + t.Errorf("expected %d more invocations of part handler", len(parts)) + } +} diff --git a/vendor/golang.org/x/text/language/coverage_test.go b/vendor/golang.org/x/text/language/coverage_test.go new file mode 100644 index 000000000..8e08e5ca4 --- /dev/null +++ b/vendor/golang.org/x/text/language/coverage_test.go @@ -0,0 +1,154 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package language + +import ( + "fmt" + "reflect" + "testing" +) + +func TestSupported(t *testing.T) { + // To prove the results are correct for a type, we test that the number of + // results is identical to the number of results on record, that all results + // are distinct and that all results are valid. + tests := map[string]int{ + "BaseLanguages": numLanguages, + "Scripts": numScripts, + "Regions": numRegions, + "Tags": 0, + } + sup := reflect.ValueOf(Supported) + for name, num := range tests { + v := sup.MethodByName(name).Call(nil)[0] + if n := v.Len(); n != num { + t.Errorf("len(%s()) was %d; want %d", name, n, num) + } + dup := make(map[string]bool) + for i := 0; i < v.Len(); i++ { + x := v.Index(i).Interface() + // An invalid value will either cause a crash or result in a + // duplicate when passed to Sprint. + s := fmt.Sprint(x) + if dup[s] { + t.Errorf("%s: duplicate entry %q", name, s) + } + dup[s] = true + } + if len(dup) != v.Len() { + t.Errorf("%s: # unique entries was %d; want %d", name, len(dup), v.Len()) + } + } +} + +func TestNewCoverage(t *testing.T) { + bases := []Base{Base{0}, Base{3}, Base{7}} + scripts := []Script{Script{11}, Script{17}, Script{23}} + regions := []Region{Region{101}, Region{103}, Region{107}} + tags := []Tag{Make("pt"), Make("en"), Make("en-GB"), Make("en-US"), Make("pt-PT")} + fbases := func() []Base { return bases } + fscripts := func() []Script { return scripts } + fregions := func() []Region { return regions } + ftags := func() []Tag { return tags } + + tests := []struct { + desc string + list []interface{} + bases []Base + scripts []Script + regions []Region + tags []Tag + }{ + { + desc: "empty", + }, + { + desc: "bases", + list: []interface{}{bases}, + bases: bases, + }, + { + desc: "scripts", + list: []interface{}{scripts}, + scripts: scripts, + }, + { + desc: "regions", + list: []interface{}{regions}, + regions: regions, + }, + { + desc: "bases derives from tags", + list: []interface{}{tags}, + bases: []Base{Base{_en}, Base{_pt}}, + tags: tags, + }, + { + desc: "tags and bases", + list: []interface{}{tags, bases}, + bases: bases, + tags: tags, + }, + { + desc: "fully specified", + list: []interface{}{tags, bases, scripts, regions}, + bases: bases, + scripts: scripts, + regions: regions, + tags: tags, + }, + { + desc: "bases func", + list: []interface{}{fbases}, + bases: bases, + }, + { + desc: "scripts func", + list: []interface{}{fscripts}, + scripts: scripts, + }, + { + desc: "regions func", + list: []interface{}{fregions}, + regions: regions, + }, + { + desc: "tags func", + list: []interface{}{ftags}, + bases: []Base{Base{_en}, Base{_pt}}, + tags: tags, + }, + { + desc: "tags and bases", + list: []interface{}{ftags, fbases}, + bases: bases, + tags: tags, + }, + { + desc: "fully specified", + list: []interface{}{ftags, fbases, fscripts, fregions}, + bases: bases, + scripts: scripts, + regions: regions, + tags: tags, + }, + } + + for i, tt := range tests { + l := NewCoverage(tt.list...) + if a := l.BaseLanguages(); !reflect.DeepEqual(a, tt.bases) { + t.Errorf("%d:%s: BaseLanguages was %v; want %v", i, tt.desc, a, tt.bases) + } + if a := l.Scripts(); !reflect.DeepEqual(a, tt.scripts) { + t.Errorf("%d:%s: Scripts was %v; want %v", i, tt.desc, a, tt.scripts) + } + if a := l.Regions(); !reflect.DeepEqual(a, tt.regions) { + t.Errorf("%d:%s: Regions was %v; want %v", i, tt.desc, a, tt.regions) + } + if a := l.Tags(); !reflect.DeepEqual(a, tt.tags) { + t.Errorf("%d:%s: Tags was %v; want %v", i, tt.desc, a, tt.tags) + } + } +} diff --git a/vendor/golang.org/x/text/language/doc.go b/vendor/golang.org/x/text/language/doc.go new file mode 100644 index 000000000..8afecd50e --- /dev/null +++ b/vendor/golang.org/x/text/language/doc.go @@ -0,0 +1,102 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package language implements BCP 47 language tags and related functionality. +// +// The most important function of package language is to match a list of +// user-preferred languages to a list of supported languages. +// It alleviates the developer of dealing with the complexity of this process +// and provides the user with the best experience +// (see https://blog.golang.org/matchlang). +// +// +// Matching preferred against supported languages +// +// A Matcher for an application that supports English, Australian English, +// Danish, and standard Mandarin can be created as follows: +// +// var matcher = language.NewMatcher([]language.Tag{ +// language.English, // The first language is used as fallback. +// language.MustParse("en-AU"), +// language.Danish, +// language.Chinese, +// }) +// +// This list of supported languages is typically implied by the languages for +// which there exists translations of the user interface. +// +// User-preferred languages usually come as a comma-separated list of BCP 47 +// language tags. +// The MatchString finds best matches for such strings: +// +// handler(w http.ResponseWriter, r *http.Request) { +// lang, _ := r.Cookie("lang") +// accept := r.Header.Get("Accept-Language") +// tag, _ := language.MatchStrings(matcher, lang.String(), accept) +// +// // tag should now be used for the initialization of any +// // locale-specific service. +// } +// +// The Matcher's Match method can be used to match Tags directly. +// +// Matchers are aware of the intricacies of equivalence between languages, such +// as deprecated subtags, legacy tags, macro languages, mutual +// intelligibility between scripts and languages, and transparently passing +// BCP 47 user configuration. +// For instance, it will know that a reader of Bokmål Danish can read Norwegian +// and will know that Cantonese ("yue") is a good match for "zh-HK". +// +// +// Using match results +// +// To guarantee a consistent user experience to the user it is important to +// use the same language tag for the selection of any locale-specific services. +// For example, it is utterly confusing to substitute spelled-out numbers +// or dates in one language in text of another language. +// More subtly confusing is using the wrong sorting order or casing +// algorithm for a certain language. +// +// All the packages in x/text that provide locale-specific services +// (e.g. collate, cases) should be initialized with the tag that was +// obtained at the start of an interaction with the user. +// +// Note that Tag that is returned by Match and MatchString may differ from any +// of the supported languages, as it may contain carried over settings from +// the user tags. +// This may be inconvenient when your application has some additional +// locale-specific data for your supported languages. +// Match and MatchString both return the index of the matched supported tag +// to simplify associating such data with the matched tag. +// +// +// Canonicalization +// +// If one uses the Matcher to compare languages one does not need to +// worry about canonicalization. +// +// The meaning of a Tag varies per application. The language package +// therefore delays canonicalization and preserves information as much +// as possible. The Matcher, however, will always take into account that +// two different tags may represent the same language. +// +// By default, only legacy and deprecated tags are converted into their +// canonical equivalent. All other information is preserved. This approach makes +// the confidence scores more accurate and allows matchers to distinguish +// between variants that are otherwise lost. +// +// As a consequence, two tags that should be treated as identical according to +// BCP 47 or CLDR, like "en-Latn" and "en", will be represented differently. The +// Matcher handles such distinctions, though, and is aware of the +// equivalence relations. The CanonType type can be used to alter the +// canonicalization form. +// +// References +// +// BCP 47 - Tags for Identifying Languages http://tools.ietf.org/html/bcp47 +// +package language // import "golang.org/x/text/language" + +// TODO: explanation on how to match languages for your own locale-specific +// service. diff --git a/vendor/golang.org/x/text/language/examples_test.go b/vendor/golang.org/x/text/language/examples_test.go new file mode 100644 index 000000000..d5e8176dc --- /dev/null +++ b/vendor/golang.org/x/text/language/examples_test.go @@ -0,0 +1,413 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package language_test + +import ( + "fmt" + "net/http" + + "golang.org/x/text/language" +) + +func ExampleCanonType() { + p := func(id string) { + fmt.Printf("Default(%s) -> %s\n", id, language.Make(id)) + fmt.Printf("BCP47(%s) -> %s\n", id, language.BCP47.Make(id)) + fmt.Printf("Macro(%s) -> %s\n", id, language.Macro.Make(id)) + fmt.Printf("All(%s) -> %s\n", id, language.All.Make(id)) + } + p("en-Latn") + p("sh") + p("zh-cmn") + p("bjd") + p("iw-Latn-fonipa-u-cu-usd") + // Output: + // Default(en-Latn) -> en-Latn + // BCP47(en-Latn) -> en + // Macro(en-Latn) -> en-Latn + // All(en-Latn) -> en + // Default(sh) -> sr-Latn + // BCP47(sh) -> sh + // Macro(sh) -> sh + // All(sh) -> sr-Latn + // Default(zh-cmn) -> cmn + // BCP47(zh-cmn) -> cmn + // Macro(zh-cmn) -> zh + // All(zh-cmn) -> zh + // Default(bjd) -> drl + // BCP47(bjd) -> drl + // Macro(bjd) -> bjd + // All(bjd) -> drl + // Default(iw-Latn-fonipa-u-cu-usd) -> he-Latn-fonipa-u-cu-usd + // BCP47(iw-Latn-fonipa-u-cu-usd) -> he-Latn-fonipa-u-cu-usd + // Macro(iw-Latn-fonipa-u-cu-usd) -> iw-Latn-fonipa-u-cu-usd + // All(iw-Latn-fonipa-u-cu-usd) -> he-Latn-fonipa-u-cu-usd +} + +func ExampleTag_Base() { + fmt.Println(language.Make("und").Base()) + fmt.Println(language.Make("und-US").Base()) + fmt.Println(language.Make("und-NL").Base()) + fmt.Println(language.Make("und-419").Base()) // Latin America + fmt.Println(language.Make("und-ZZ").Base()) + // Output: + // en Low + // en High + // nl High + // es Low + // en Low +} + +func ExampleTag_Script() { + en := language.Make("en") + sr := language.Make("sr") + sr_Latn := language.Make("sr_Latn") + fmt.Println(en.Script()) + fmt.Println(sr.Script()) + // Was a script explicitly specified? + _, c := sr.Script() + fmt.Println(c == language.Exact) + _, c = sr_Latn.Script() + fmt.Println(c == language.Exact) + // Output: + // Latn High + // Cyrl Low + // false + // true +} + +func ExampleTag_Region() { + ru := language.Make("ru") + en := language.Make("en") + fmt.Println(ru.Region()) + fmt.Println(en.Region()) + // Output: + // RU Low + // US Low +} + +func ExampleRegion_TLD() { + us := language.MustParseRegion("US") + gb := language.MustParseRegion("GB") + uk := language.MustParseRegion("UK") + bu := language.MustParseRegion("BU") + + fmt.Println(us.TLD()) + fmt.Println(gb.TLD()) + fmt.Println(uk.TLD()) + fmt.Println(bu.TLD()) + + fmt.Println(us.Canonicalize().TLD()) + fmt.Println(gb.Canonicalize().TLD()) + fmt.Println(uk.Canonicalize().TLD()) + fmt.Println(bu.Canonicalize().TLD()) + // Output: + // US <nil> + // UK <nil> + // UK <nil> + // ZZ language: region is not a valid ccTLD + // US <nil> + // UK <nil> + // UK <nil> + // MM <nil> +} + +func ExampleCompose() { + nl, _ := language.ParseBase("nl") + us, _ := language.ParseRegion("US") + de := language.Make("de-1901-u-co-phonebk") + jp := language.Make("ja-JP") + fi := language.Make("fi-x-ing") + + u, _ := language.ParseExtension("u-nu-arabic") + x, _ := language.ParseExtension("x-piglatin") + + // Combine a base language and region. + fmt.Println(language.Compose(nl, us)) + // Combine a base language and extension. + fmt.Println(language.Compose(nl, x)) + // Replace the region. + fmt.Println(language.Compose(jp, us)) + // Combine several tags. + fmt.Println(language.Compose(us, nl, u)) + + // Replace the base language of a tag. + fmt.Println(language.Compose(de, nl)) + fmt.Println(language.Compose(de, nl, u)) + // Remove the base language. + fmt.Println(language.Compose(de, language.Base{})) + // Remove all variants. + fmt.Println(language.Compose(de, []language.Variant{})) + // Remove all extensions. + fmt.Println(language.Compose(de, []language.Extension{})) + fmt.Println(language.Compose(fi, []language.Extension{})) + // Remove all variants and extensions. + fmt.Println(language.Compose(de.Raw())) + + // An error is gobbled or returned if non-nil. + fmt.Println(language.Compose(language.ParseRegion("ZA"))) + fmt.Println(language.Compose(language.ParseRegion("HH"))) + + // Compose uses the same Default canonicalization as Make. + fmt.Println(language.Compose(language.Raw.Parse("en-Latn-UK"))) + + // Call compose on a different CanonType for different results. + fmt.Println(language.All.Compose(language.Raw.Parse("en-Latn-UK"))) + + // Output: + // nl-US <nil> + // nl-x-piglatin <nil> + // ja-US <nil> + // nl-US-u-nu-arabic <nil> + // nl-1901-u-co-phonebk <nil> + // nl-1901-u-nu-arabic <nil> + // und-1901-u-co-phonebk <nil> + // de-u-co-phonebk <nil> + // de-1901 <nil> + // fi <nil> + // de <nil> + // und-ZA <nil> + // und language: subtag "HH" is well-formed but unknown + // en-Latn-GB <nil> + // en-GB <nil> +} + +func ExampleParse_errors() { + for _, s := range []string{"Foo", "Bar", "Foobar"} { + _, err := language.Parse(s) + if err != nil { + if inv, ok := err.(language.ValueError); ok { + fmt.Println(inv.Subtag()) + } else { + fmt.Println(s) + } + } + } + for _, s := range []string{"en", "aa-Uuuu", "AC", "ac-u"} { + _, err := language.Parse(s) + switch e := err.(type) { + case language.ValueError: + fmt.Printf("%s: culprit %q\n", s, e.Subtag()) + case nil: + // No error. + default: + // A syntax error. + fmt.Printf("%s: ill-formed\n", s) + } + } + // Output: + // foo + // Foobar + // aa-Uuuu: culprit "Uuuu" + // AC: culprit "ac" + // ac-u: ill-formed +} + +func ExampleParent() { + p := func(tag string) { + fmt.Printf("parent(%v): %v\n", tag, language.Make(tag).Parent()) + } + p("zh-CN") + + // Australian English inherits from World English. + p("en-AU") + + // If the tag has a different maximized script from its parent, a tag with + // this maximized script is inserted. This allows different language tags + // which have the same base language and script in common to inherit from + // a common set of settings. + p("zh-HK") + + // If the maximized script of the parent is not identical, CLDR will skip + // inheriting from it, as it means there will not be many entries in common + // and inheriting from it is nonsensical. + p("zh-Hant") + + // The parent of a tag with variants and extensions is the tag with all + // variants and extensions removed. + p("de-1994-u-co-phonebk") + + // Remove default script. + p("de-Latn-LU") + + // Output: + // parent(zh-CN): zh + // parent(en-AU): en-001 + // parent(zh-HK): zh-Hant + // parent(zh-Hant): und + // parent(de-1994-u-co-phonebk): de + // parent(de-Latn-LU): de +} + +// ExampleMatcher_bestMatch gives some examples of getting the best match of +// a set of tags to any of the tags of given set. +func ExampleMatcher() { + // This is the set of tags from which we want to pick the best match. These + // can be, for example, the supported languages for some package. + tags := []language.Tag{ + language.English, + language.BritishEnglish, + language.French, + language.Afrikaans, + language.BrazilianPortuguese, + language.EuropeanPortuguese, + language.Croatian, + language.SimplifiedChinese, + language.Raw.Make("iw-IL"), + language.Raw.Make("iw"), + language.Raw.Make("he"), + } + m := language.NewMatcher(tags) + + // A simple match. + fmt.Println(m.Match(language.Make("fr"))) + + // Australian English is closer to British than American English. + fmt.Println(m.Match(language.Make("en-AU"))) + + // Default to the first tag passed to the Matcher if there is no match. + fmt.Println(m.Match(language.Make("ar"))) + + // Get the default tag. + fmt.Println(m.Match()) + + fmt.Println("----") + + // Someone specifying sr-Latn is probably fine with getting Croatian. + fmt.Println(m.Match(language.Make("sr-Latn"))) + + // We match SimplifiedChinese, but with Low confidence. + fmt.Println(m.Match(language.TraditionalChinese)) + + // Serbian in Latin script is a closer match to Croatian than Traditional + // Chinese to Simplified Chinese. + fmt.Println(m.Match(language.TraditionalChinese, language.Make("sr-Latn"))) + + fmt.Println("----") + + // In case a multiple variants of a language are available, the most spoken + // variant is typically returned. + fmt.Println(m.Match(language.Portuguese)) + + // Pick the first value passed to Match in case of a tie. + fmt.Println(m.Match(language.Dutch, language.Make("fr-BE"), language.Make("af-NA"))) + fmt.Println(m.Match(language.Dutch, language.Make("af-NA"), language.Make("fr-BE"))) + + fmt.Println("----") + + // If a Matcher is initialized with a language and it's deprecated version, + // it will distinguish between them. + fmt.Println(m.Match(language.Raw.Make("iw"))) + + // However, for non-exact matches, it will treat deprecated versions as + // equivalent and consider other factors first. + fmt.Println(m.Match(language.Raw.Make("he-IL"))) + + fmt.Println("----") + + // User settings passed to the Unicode extension are ignored for matching + // and preserved in the returned tag. + fmt.Println(m.Match(language.Make("de-u-co-phonebk"), language.Make("fr-u-cu-frf"))) + + // Even if the matching language is different. + fmt.Println(m.Match(language.Make("de-u-co-phonebk"), language.Make("br-u-cu-frf"))) + + // If there is no matching language, the options of the first preferred tag are used. + fmt.Println(m.Match(language.Make("de-u-co-phonebk"))) + + // Output: + // fr 2 Exact + // en-GB 1 High + // en 0 No + // en 0 No + // ---- + // hr 6 High + // zh-Hans 7 Low + // hr 6 High + // ---- + // pt-BR 4 High + // fr 2 High + // af 3 High + // ---- + // iw 9 Exact + // he 10 Exact + // ---- + // fr-u-cu-frf 2 Exact + // fr-u-cu-frf 2 High + // en-u-co-phonebk 0 No + + // TODO: "he" should be "he-u-rg-IL High" +} + +func ExampleMatchStrings() { + // languages supported by this service: + matcher := language.NewMatcher([]language.Tag{ + language.English, language.Dutch, language.German, + }) + + http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + lang, _ := r.Cookie("lang") + tag, _ := language.MatchStrings(matcher, lang.String(), r.Header.Get("Accept-Language")) + + fmt.Println("User language:", tag) + }) +} + +func ExampleComprehends() { + // Various levels of comprehensibility. + fmt.Println(language.Comprehends(language.English, language.English)) + fmt.Println(language.Comprehends(language.AmericanEnglish, language.BritishEnglish)) + + // An explicit Und results in no match. + fmt.Println(language.Comprehends(language.English, language.Und)) + + fmt.Println("----") + + // There is usually no mutual comprehensibility between different scripts. + fmt.Println(language.Comprehends(language.Make("en-Dsrt"), language.English)) + + // One exception is for Traditional versus Simplified Chinese, albeit with + // a low confidence. + fmt.Println(language.Comprehends(language.TraditionalChinese, language.SimplifiedChinese)) + + fmt.Println("----") + + // A Swiss German speaker will often understand High German. + fmt.Println(language.Comprehends(language.Make("gsw"), language.Make("de"))) + + // The converse is not generally the case. + fmt.Println(language.Comprehends(language.Make("de"), language.Make("gsw"))) + + // Output: + // Exact + // High + // No + // ---- + // No + // Low + // ---- + // High + // No +} + +func ExampleTag_values() { + us := language.MustParseRegion("US") + en := language.MustParseBase("en") + + lang, _, region := language.AmericanEnglish.Raw() + fmt.Println(lang == en, region == us) + + lang, _, region = language.BritishEnglish.Raw() + fmt.Println(lang == en, region == us) + + // Tags can be compared for exact equivalence using '=='. + en_us, _ := language.Compose(en, us) + fmt.Println(en_us == language.AmericanEnglish) + + // Output: + // true true + // true false + // true +} diff --git a/vendor/golang.org/x/text/language/gen.go b/vendor/golang.org/x/text/language/gen.go index 153269bc1..7c260e5c2 100644 --- a/vendor/golang.org/x/text/language/gen.go +++ b/vendor/golang.org/x/text/language/gen.go @@ -698,8 +698,8 @@ func (b *builder) computeRegionGroups() { b.groups[group] = index(len(b.groups)) } } - if len(b.groups) > 32 { - log.Fatalf("only 32 groups supported, found %d", len(b.groups)) + if len(b.groups) > 64 { + log.Fatalf("only 64 groups supported, found %d", len(b.groups)) } b.writeConst("nRegionGroups", len(b.groups)) } @@ -1417,20 +1417,27 @@ func (b *builder) writeMatchData() { } b.writeSlice("regionToGroups", regionToGroups) + // maps language id to in- and out-of-group region. + paradigmLocales := [][3]uint16{} + locales := strings.Split(lm[0].ParadigmLocales[0].Locales, " ") + for i := 0; i < len(locales); i += 2 { + x := [3]uint16{} + for j := 0; j < 2; j++ { + pc := strings.SplitN(locales[i+j], "-", 2) + x[0] = b.langIndex(pc[0]) + if len(pc) == 2 { + x[1+j] = uint16(b.region.index(pc[1])) + } + } + paradigmLocales = append(paradigmLocales, x) + } + b.writeSlice("paradigmLocales", paradigmLocales) + b.writeType(mutualIntelligibility{}) b.writeType(scriptIntelligibility{}) b.writeType(regionIntelligibility{}) - matchLang := []mutualIntelligibility{{ - // TODO: remove once CLDR is fixed. - want: uint16(b.langIndex("sr")), - have: uint16(b.langIndex("hr")), - distance: uint8(5), - }, { - want: uint16(b.langIndex("sr")), - have: uint16(b.langIndex("bs")), - distance: uint8(5), - }} + matchLang := []mutualIntelligibility{} matchScript := []scriptIntelligibility{} matchRegion := []regionIntelligibility{} // Convert the languageMatch entries in lists keyed by desired language. @@ -1559,7 +1566,7 @@ func (b *builder) writeRegionInclusionData() { } } - regionContainment := make([]uint32, len(b.groups)) + regionContainment := make([]uint64, len(b.groups)) for _, g := range b.groups { l := containment[g] @@ -1577,10 +1584,10 @@ func (b *builder) writeRegionInclusionData() { b.writeSlice("regionContainment", regionContainment) regionInclusion := make([]uint8, len(b.region.s)) - bvs := make(map[uint32]index) + bvs := make(map[uint64]index) // Make the first bitvector positions correspond with the groups. for r, i := range b.groups { - bv := uint32(1 << i) + bv := uint64(1 << i) for _, g := range mm[r] { bv |= 1 << g } @@ -1589,7 +1596,7 @@ func (b *builder) writeRegionInclusionData() { } for r := 1; r < len(b.region.s); r++ { if _, ok := b.groups[r]; !ok { - bv := uint32(0) + bv := uint64(0) for _, g := range mm[r] { bv |= 1 << g } @@ -1604,9 +1611,9 @@ func (b *builder) writeRegionInclusionData() { } } b.writeSlice("regionInclusion", regionInclusion) - regionInclusionBits := make([]uint32, len(bvs)) + regionInclusionBits := make([]uint64, len(bvs)) for k, v := range bvs { - regionInclusionBits[v] = uint32(k) + regionInclusionBits[v] = uint64(k) } // Add bit vectors for increasingly large distances until a fixed point is reached. regionInclusionNext := []uint8{} diff --git a/vendor/golang.org/x/text/language/httpexample_test.go b/vendor/golang.org/x/text/language/httpexample_test.go new file mode 100644 index 000000000..40d0663c8 --- /dev/null +++ b/vendor/golang.org/x/text/language/httpexample_test.go @@ -0,0 +1,48 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package language_test + +import ( + "fmt" + "net/http" + "strings" + + "golang.org/x/text/language" +) + +// matcher is a language.Matcher configured for all supported languages. +var matcher = language.NewMatcher([]language.Tag{ + language.BritishEnglish, + language.Norwegian, + language.German, +}) + +// handler is a http.HandlerFunc. +func handler(w http.ResponseWriter, r *http.Request) { + t, q, err := language.ParseAcceptLanguage(r.Header.Get("Accept-Language")) + // We ignore the error: the default language will be selected for t == nil. + tag, _, _ := matcher.Match(t...) + fmt.Printf("%5v (t: %6v; q: %3v; err: %v)\n", tag, t, q, err) +} + +func ExampleParseAcceptLanguage() { + for _, al := range []string{ + "nn;q=0.3, en-us;q=0.8, en,", + "gsw, en;q=0.7, en-US;q=0.8", + "gsw, nl, da", + "invalid", + } { + // Create dummy request with Accept-Language set and pass it to handler. + r, _ := http.NewRequest("GET", "example.com", strings.NewReader("Hello")) + r.Header.Set("Accept-Language", al) + handler(nil, r) + } + + // Output: + // en-GB (t: [ en en-US nn]; q: [ 1 0.8 0.3]; err: <nil>) + // en-GB (t: [ gsw en-US en]; q: [ 1 0.8 0.7]; err: <nil>) + // de (t: [ gsw nl da]; q: [ 1 1 1]; err: <nil>) + // en-GB (t: []; q: []; err: language: tag is not well-formed) +} diff --git a/vendor/golang.org/x/text/language/index.go b/vendor/golang.org/x/text/language/index.go index 973db9fd5..69ac557dc 100644 --- a/vendor/golang.org/x/text/language/index.go +++ b/vendor/golang.org/x/text/language/index.go @@ -7,763 +7,763 @@ package language const NumCompactTags = 754 var specialTags = []Tag{ // 2 elements - 0: {lang: 0xd7, region: 0x6d, script: 0x0, pVariant: 0x5, pExt: 0xe, str: "ca-ES-valencia"}, - 1: {lang: 0x138, region: 0x134, script: 0x0, pVariant: 0x5, pExt: 0x5, str: "en-US-u-va-posix"}, + 0: {lang: 0xd7, region: 0x6e, script: 0x0, pVariant: 0x5, pExt: 0xe, str: "ca-ES-valencia"}, + 1: {lang: 0x138, region: 0x135, script: 0x0, pVariant: 0x5, pExt: 0x5, str: "en-US-u-va-posix"}, } // Size: 72 bytes var coreTags = map[uint32]uint16{ 0x0: 0, // und 0x01600000: 3, // af - 0x016000d1: 4, // af-NA - 0x01600160: 5, // af-ZA + 0x016000d2: 4, // af-NA + 0x01600161: 5, // af-ZA 0x01c00000: 6, // agq - 0x01c00051: 7, // agq-CM + 0x01c00052: 7, // agq-CM 0x02100000: 8, // ak - 0x0210007f: 9, // ak-GH + 0x02100080: 9, // ak-GH 0x02700000: 10, // am - 0x0270006e: 11, // am-ET + 0x0270006f: 11, // am-ET 0x03a00000: 12, // ar 0x03a00001: 13, // ar-001 - 0x03a00022: 14, // ar-AE - 0x03a00038: 15, // ar-BH - 0x03a00061: 16, // ar-DJ - 0x03a00066: 17, // ar-DZ - 0x03a0006a: 18, // ar-EG - 0x03a0006b: 19, // ar-EH - 0x03a0006c: 20, // ar-ER - 0x03a00096: 21, // ar-IL - 0x03a0009a: 22, // ar-IQ - 0x03a000a0: 23, // ar-JO - 0x03a000a7: 24, // ar-KM - 0x03a000ab: 25, // ar-KW - 0x03a000af: 26, // ar-LB - 0x03a000b8: 27, // ar-LY - 0x03a000b9: 28, // ar-MA - 0x03a000c8: 29, // ar-MR - 0x03a000e0: 30, // ar-OM - 0x03a000ec: 31, // ar-PS - 0x03a000f2: 32, // ar-QA - 0x03a00107: 33, // ar-SA - 0x03a0010a: 34, // ar-SD - 0x03a00114: 35, // ar-SO - 0x03a00116: 36, // ar-SS - 0x03a0011b: 37, // ar-SY - 0x03a0011f: 38, // ar-TD - 0x03a00127: 39, // ar-TN - 0x03a0015d: 40, // ar-YE + 0x03a00023: 14, // ar-AE + 0x03a00039: 15, // ar-BH + 0x03a00062: 16, // ar-DJ + 0x03a00067: 17, // ar-DZ + 0x03a0006b: 18, // ar-EG + 0x03a0006c: 19, // ar-EH + 0x03a0006d: 20, // ar-ER + 0x03a00097: 21, // ar-IL + 0x03a0009b: 22, // ar-IQ + 0x03a000a1: 23, // ar-JO + 0x03a000a8: 24, // ar-KM + 0x03a000ac: 25, // ar-KW + 0x03a000b0: 26, // ar-LB + 0x03a000b9: 27, // ar-LY + 0x03a000ba: 28, // ar-MA + 0x03a000c9: 29, // ar-MR + 0x03a000e1: 30, // ar-OM + 0x03a000ed: 31, // ar-PS + 0x03a000f3: 32, // ar-QA + 0x03a00108: 33, // ar-SA + 0x03a0010b: 34, // ar-SD + 0x03a00115: 35, // ar-SO + 0x03a00117: 36, // ar-SS + 0x03a0011c: 37, // ar-SY + 0x03a00120: 38, // ar-TD + 0x03a00128: 39, // ar-TN + 0x03a0015e: 40, // ar-YE 0x04000000: 41, // ars 0x04300000: 42, // as - 0x04300098: 43, // as-IN + 0x04300099: 43, // as-IN 0x04400000: 44, // asa - 0x0440012e: 45, // asa-TZ + 0x0440012f: 45, // asa-TZ 0x04800000: 46, // ast - 0x0480006d: 47, // ast-ES + 0x0480006e: 47, // ast-ES 0x05800000: 48, // az 0x0581e000: 49, // az-Cyrl - 0x0581e031: 50, // az-Cyrl-AZ - 0x05852000: 51, // az-Latn - 0x05852031: 52, // az-Latn-AZ + 0x0581e032: 50, // az-Cyrl-AZ + 0x05855000: 51, // az-Latn + 0x05855032: 52, // az-Latn-AZ 0x05e00000: 53, // bas - 0x05e00051: 54, // bas-CM + 0x05e00052: 54, // bas-CM 0x07100000: 55, // be - 0x07100046: 56, // be-BY + 0x07100047: 56, // be-BY 0x07500000: 57, // bem - 0x07500161: 58, // bem-ZM + 0x07500162: 58, // bem-ZM 0x07900000: 59, // bez - 0x0790012e: 60, // bez-TZ + 0x0790012f: 60, // bez-TZ 0x07e00000: 61, // bg - 0x07e00037: 62, // bg-BG + 0x07e00038: 62, // bg-BG 0x08200000: 63, // bh 0x0a000000: 64, // bm - 0x0a0000c2: 65, // bm-ML + 0x0a0000c3: 65, // bm-ML 0x0a500000: 66, // bn - 0x0a500034: 67, // bn-BD - 0x0a500098: 68, // bn-IN + 0x0a500035: 67, // bn-BD + 0x0a500099: 68, // bn-IN 0x0a900000: 69, // bo - 0x0a900052: 70, // bo-CN - 0x0a900098: 71, // bo-IN + 0x0a900053: 70, // bo-CN + 0x0a900099: 71, // bo-IN 0x0b200000: 72, // br - 0x0b200077: 73, // br-FR + 0x0b200078: 73, // br-FR 0x0b500000: 74, // brx - 0x0b500098: 75, // brx-IN + 0x0b500099: 75, // brx-IN 0x0b700000: 76, // bs 0x0b71e000: 77, // bs-Cyrl - 0x0b71e032: 78, // bs-Cyrl-BA - 0x0b752000: 79, // bs-Latn - 0x0b752032: 80, // bs-Latn-BA + 0x0b71e033: 78, // bs-Cyrl-BA + 0x0b755000: 79, // bs-Latn + 0x0b755033: 80, // bs-Latn-BA 0x0d700000: 81, // ca - 0x0d700021: 82, // ca-AD - 0x0d70006d: 83, // ca-ES - 0x0d700077: 84, // ca-FR - 0x0d70009d: 85, // ca-IT + 0x0d700022: 82, // ca-AD + 0x0d70006e: 83, // ca-ES + 0x0d700078: 84, // ca-FR + 0x0d70009e: 85, // ca-IT 0x0dc00000: 86, // ce - 0x0dc00105: 87, // ce-RU + 0x0dc00106: 87, // ce-RU 0x0df00000: 88, // cgg - 0x0df00130: 89, // cgg-UG + 0x0df00131: 89, // cgg-UG 0x0e500000: 90, // chr - 0x0e500134: 91, // chr-US + 0x0e500135: 91, // chr-US 0x0e900000: 92, // ckb - 0x0e90009a: 93, // ckb-IQ - 0x0e90009b: 94, // ckb-IR + 0x0e90009b: 93, // ckb-IQ + 0x0e90009c: 94, // ckb-IR 0x0f900000: 95, // cs - 0x0f90005d: 96, // cs-CZ + 0x0f90005e: 96, // cs-CZ 0x0fd00000: 97, // cu - 0x0fd00105: 98, // cu-RU + 0x0fd00106: 98, // cu-RU 0x0ff00000: 99, // cy - 0x0ff0007a: 100, // cy-GB + 0x0ff0007b: 100, // cy-GB 0x10000000: 101, // da - 0x10000062: 102, // da-DK - 0x10000081: 103, // da-GL + 0x10000063: 102, // da-DK + 0x10000082: 103, // da-GL 0x10700000: 104, // dav - 0x107000a3: 105, // dav-KE + 0x107000a4: 105, // dav-KE 0x10c00000: 106, // de - 0x10c0002d: 107, // de-AT - 0x10c00035: 108, // de-BE - 0x10c0004d: 109, // de-CH - 0x10c0005f: 110, // de-DE - 0x10c0009d: 111, // de-IT - 0x10c000b1: 112, // de-LI - 0x10c000b6: 113, // de-LU + 0x10c0002e: 107, // de-AT + 0x10c00036: 108, // de-BE + 0x10c0004e: 109, // de-CH + 0x10c00060: 110, // de-DE + 0x10c0009e: 111, // de-IT + 0x10c000b2: 112, // de-LI + 0x10c000b7: 113, // de-LU 0x11600000: 114, // dje - 0x116000d3: 115, // dje-NE + 0x116000d4: 115, // dje-NE 0x11e00000: 116, // dsb - 0x11e0005f: 117, // dsb-DE + 0x11e00060: 117, // dsb-DE 0x12300000: 118, // dua - 0x12300051: 119, // dua-CM + 0x12300052: 119, // dua-CM 0x12700000: 120, // dv 0x12a00000: 121, // dyo - 0x12a00113: 122, // dyo-SN + 0x12a00114: 122, // dyo-SN 0x12c00000: 123, // dz - 0x12c00042: 124, // dz-BT + 0x12c00043: 124, // dz-BT 0x12e00000: 125, // ebu - 0x12e000a3: 126, // ebu-KE + 0x12e000a4: 126, // ebu-KE 0x12f00000: 127, // ee - 0x12f0007f: 128, // ee-GH - 0x12f00121: 129, // ee-TG + 0x12f00080: 128, // ee-GH + 0x12f00122: 129, // ee-TG 0x13500000: 130, // el - 0x1350005c: 131, // el-CY - 0x13500086: 132, // el-GR + 0x1350005d: 131, // el-CY + 0x13500087: 132, // el-GR 0x13800000: 133, // en 0x13800001: 134, // en-001 0x1380001a: 135, // en-150 - 0x13800024: 136, // en-AG - 0x13800025: 137, // en-AI - 0x1380002c: 138, // en-AS - 0x1380002d: 139, // en-AT - 0x1380002e: 140, // en-AU - 0x13800033: 141, // en-BB - 0x13800035: 142, // en-BE - 0x13800039: 143, // en-BI - 0x1380003c: 144, // en-BM - 0x13800041: 145, // en-BS - 0x13800045: 146, // en-BW - 0x13800047: 147, // en-BZ - 0x13800048: 148, // en-CA - 0x13800049: 149, // en-CC - 0x1380004d: 150, // en-CH - 0x1380004f: 151, // en-CK - 0x13800051: 152, // en-CM - 0x1380005b: 153, // en-CX - 0x1380005c: 154, // en-CY - 0x1380005f: 155, // en-DE - 0x13800060: 156, // en-DG - 0x13800062: 157, // en-DK - 0x13800063: 158, // en-DM - 0x1380006c: 159, // en-ER - 0x13800071: 160, // en-FI - 0x13800072: 161, // en-FJ - 0x13800073: 162, // en-FK - 0x13800074: 163, // en-FM - 0x1380007a: 164, // en-GB - 0x1380007b: 165, // en-GD - 0x1380007e: 166, // en-GG - 0x1380007f: 167, // en-GH - 0x13800080: 168, // en-GI - 0x13800082: 169, // en-GM - 0x13800089: 170, // en-GU - 0x1380008b: 171, // en-GY - 0x1380008c: 172, // en-HK - 0x13800095: 173, // en-IE - 0x13800096: 174, // en-IL - 0x13800097: 175, // en-IM - 0x13800098: 176, // en-IN - 0x13800099: 177, // en-IO - 0x1380009e: 178, // en-JE - 0x1380009f: 179, // en-JM - 0x138000a3: 180, // en-KE - 0x138000a6: 181, // en-KI - 0x138000a8: 182, // en-KN - 0x138000ac: 183, // en-KY - 0x138000b0: 184, // en-LC - 0x138000b3: 185, // en-LR - 0x138000b4: 186, // en-LS - 0x138000be: 187, // en-MG - 0x138000bf: 188, // en-MH - 0x138000c5: 189, // en-MO - 0x138000c6: 190, // en-MP - 0x138000c9: 191, // en-MS - 0x138000ca: 192, // en-MT - 0x138000cb: 193, // en-MU - 0x138000cd: 194, // en-MW - 0x138000cf: 195, // en-MY - 0x138000d1: 196, // en-NA - 0x138000d4: 197, // en-NF - 0x138000d5: 198, // en-NG - 0x138000d8: 199, // en-NL - 0x138000dc: 200, // en-NR - 0x138000de: 201, // en-NU - 0x138000df: 202, // en-NZ - 0x138000e5: 203, // en-PG - 0x138000e6: 204, // en-PH - 0x138000e7: 205, // en-PK - 0x138000ea: 206, // en-PN - 0x138000eb: 207, // en-PR - 0x138000ef: 208, // en-PW - 0x13800106: 209, // en-RW - 0x13800108: 210, // en-SB - 0x13800109: 211, // en-SC - 0x1380010a: 212, // en-SD - 0x1380010b: 213, // en-SE - 0x1380010c: 214, // en-SG - 0x1380010d: 215, // en-SH - 0x1380010e: 216, // en-SI - 0x13800111: 217, // en-SL - 0x13800116: 218, // en-SS - 0x1380011a: 219, // en-SX - 0x1380011c: 220, // en-SZ - 0x1380011e: 221, // en-TC - 0x13800124: 222, // en-TK - 0x13800128: 223, // en-TO - 0x1380012b: 224, // en-TT - 0x1380012c: 225, // en-TV - 0x1380012e: 226, // en-TZ - 0x13800130: 227, // en-UG - 0x13800132: 228, // en-UM - 0x13800134: 229, // en-US - 0x13800138: 230, // en-VC - 0x1380013b: 231, // en-VG - 0x1380013c: 232, // en-VI - 0x1380013e: 233, // en-VU - 0x13800141: 234, // en-WS - 0x13800160: 235, // en-ZA - 0x13800161: 236, // en-ZM - 0x13800163: 237, // en-ZW + 0x13800025: 136, // en-AG + 0x13800026: 137, // en-AI + 0x1380002d: 138, // en-AS + 0x1380002e: 139, // en-AT + 0x1380002f: 140, // en-AU + 0x13800034: 141, // en-BB + 0x13800036: 142, // en-BE + 0x1380003a: 143, // en-BI + 0x1380003d: 144, // en-BM + 0x13800042: 145, // en-BS + 0x13800046: 146, // en-BW + 0x13800048: 147, // en-BZ + 0x13800049: 148, // en-CA + 0x1380004a: 149, // en-CC + 0x1380004e: 150, // en-CH + 0x13800050: 151, // en-CK + 0x13800052: 152, // en-CM + 0x1380005c: 153, // en-CX + 0x1380005d: 154, // en-CY + 0x13800060: 155, // en-DE + 0x13800061: 156, // en-DG + 0x13800063: 157, // en-DK + 0x13800064: 158, // en-DM + 0x1380006d: 159, // en-ER + 0x13800072: 160, // en-FI + 0x13800073: 161, // en-FJ + 0x13800074: 162, // en-FK + 0x13800075: 163, // en-FM + 0x1380007b: 164, // en-GB + 0x1380007c: 165, // en-GD + 0x1380007f: 166, // en-GG + 0x13800080: 167, // en-GH + 0x13800081: 168, // en-GI + 0x13800083: 169, // en-GM + 0x1380008a: 170, // en-GU + 0x1380008c: 171, // en-GY + 0x1380008d: 172, // en-HK + 0x13800096: 173, // en-IE + 0x13800097: 174, // en-IL + 0x13800098: 175, // en-IM + 0x13800099: 176, // en-IN + 0x1380009a: 177, // en-IO + 0x1380009f: 178, // en-JE + 0x138000a0: 179, // en-JM + 0x138000a4: 180, // en-KE + 0x138000a7: 181, // en-KI + 0x138000a9: 182, // en-KN + 0x138000ad: 183, // en-KY + 0x138000b1: 184, // en-LC + 0x138000b4: 185, // en-LR + 0x138000b5: 186, // en-LS + 0x138000bf: 187, // en-MG + 0x138000c0: 188, // en-MH + 0x138000c6: 189, // en-MO + 0x138000c7: 190, // en-MP + 0x138000ca: 191, // en-MS + 0x138000cb: 192, // en-MT + 0x138000cc: 193, // en-MU + 0x138000ce: 194, // en-MW + 0x138000d0: 195, // en-MY + 0x138000d2: 196, // en-NA + 0x138000d5: 197, // en-NF + 0x138000d6: 198, // en-NG + 0x138000d9: 199, // en-NL + 0x138000dd: 200, // en-NR + 0x138000df: 201, // en-NU + 0x138000e0: 202, // en-NZ + 0x138000e6: 203, // en-PG + 0x138000e7: 204, // en-PH + 0x138000e8: 205, // en-PK + 0x138000eb: 206, // en-PN + 0x138000ec: 207, // en-PR + 0x138000f0: 208, // en-PW + 0x13800107: 209, // en-RW + 0x13800109: 210, // en-SB + 0x1380010a: 211, // en-SC + 0x1380010b: 212, // en-SD + 0x1380010c: 213, // en-SE + 0x1380010d: 214, // en-SG + 0x1380010e: 215, // en-SH + 0x1380010f: 216, // en-SI + 0x13800112: 217, // en-SL + 0x13800117: 218, // en-SS + 0x1380011b: 219, // en-SX + 0x1380011d: 220, // en-SZ + 0x1380011f: 221, // en-TC + 0x13800125: 222, // en-TK + 0x13800129: 223, // en-TO + 0x1380012c: 224, // en-TT + 0x1380012d: 225, // en-TV + 0x1380012f: 226, // en-TZ + 0x13800131: 227, // en-UG + 0x13800133: 228, // en-UM + 0x13800135: 229, // en-US + 0x13800139: 230, // en-VC + 0x1380013c: 231, // en-VG + 0x1380013d: 232, // en-VI + 0x1380013f: 233, // en-VU + 0x13800142: 234, // en-WS + 0x13800161: 235, // en-ZA + 0x13800162: 236, // en-ZM + 0x13800164: 237, // en-ZW 0x13b00000: 238, // eo 0x13b00001: 239, // eo-001 0x13d00000: 240, // es - 0x13d0001e: 241, // es-419 - 0x13d0002b: 242, // es-AR - 0x13d0003e: 243, // es-BO - 0x13d00040: 244, // es-BR - 0x13d00047: 245, // es-BZ - 0x13d00050: 246, // es-CL - 0x13d00053: 247, // es-CO - 0x13d00055: 248, // es-CR - 0x13d00058: 249, // es-CU - 0x13d00064: 250, // es-DO - 0x13d00067: 251, // es-EA - 0x13d00068: 252, // es-EC - 0x13d0006d: 253, // es-ES - 0x13d00085: 254, // es-GQ - 0x13d00088: 255, // es-GT - 0x13d0008e: 256, // es-HN - 0x13d00093: 257, // es-IC - 0x13d000ce: 258, // es-MX - 0x13d000d7: 259, // es-NI - 0x13d000e1: 260, // es-PA - 0x13d000e3: 261, // es-PE - 0x13d000e6: 262, // es-PH - 0x13d000eb: 263, // es-PR - 0x13d000f0: 264, // es-PY - 0x13d00119: 265, // es-SV - 0x13d00134: 266, // es-US - 0x13d00135: 267, // es-UY - 0x13d0013a: 268, // es-VE + 0x13d0001f: 241, // es-419 + 0x13d0002c: 242, // es-AR + 0x13d0003f: 243, // es-BO + 0x13d00041: 244, // es-BR + 0x13d00048: 245, // es-BZ + 0x13d00051: 246, // es-CL + 0x13d00054: 247, // es-CO + 0x13d00056: 248, // es-CR + 0x13d00059: 249, // es-CU + 0x13d00065: 250, // es-DO + 0x13d00068: 251, // es-EA + 0x13d00069: 252, // es-EC + 0x13d0006e: 253, // es-ES + 0x13d00086: 254, // es-GQ + 0x13d00089: 255, // es-GT + 0x13d0008f: 256, // es-HN + 0x13d00094: 257, // es-IC + 0x13d000cf: 258, // es-MX + 0x13d000d8: 259, // es-NI + 0x13d000e2: 260, // es-PA + 0x13d000e4: 261, // es-PE + 0x13d000e7: 262, // es-PH + 0x13d000ec: 263, // es-PR + 0x13d000f1: 264, // es-PY + 0x13d0011a: 265, // es-SV + 0x13d00135: 266, // es-US + 0x13d00136: 267, // es-UY + 0x13d0013b: 268, // es-VE 0x13f00000: 269, // et - 0x13f00069: 270, // et-EE + 0x13f0006a: 270, // et-EE 0x14400000: 271, // eu - 0x1440006d: 272, // eu-ES + 0x1440006e: 272, // eu-ES 0x14500000: 273, // ewo - 0x14500051: 274, // ewo-CM + 0x14500052: 274, // ewo-CM 0x14700000: 275, // fa - 0x14700023: 276, // fa-AF - 0x1470009b: 277, // fa-IR + 0x14700024: 276, // fa-AF + 0x1470009c: 277, // fa-IR 0x14d00000: 278, // ff - 0x14d00051: 279, // ff-CM - 0x14d00083: 280, // ff-GN - 0x14d000c8: 281, // ff-MR - 0x14d00113: 282, // ff-SN + 0x14d00052: 279, // ff-CM + 0x14d00084: 280, // ff-GN + 0x14d000c9: 281, // ff-MR + 0x14d00114: 282, // ff-SN 0x15000000: 283, // fi - 0x15000071: 284, // fi-FI + 0x15000072: 284, // fi-FI 0x15200000: 285, // fil - 0x152000e6: 286, // fil-PH + 0x152000e7: 286, // fil-PH 0x15700000: 287, // fo - 0x15700062: 288, // fo-DK - 0x15700075: 289, // fo-FO + 0x15700063: 288, // fo-DK + 0x15700076: 289, // fo-FO 0x15d00000: 290, // fr - 0x15d00035: 291, // fr-BE - 0x15d00036: 292, // fr-BF - 0x15d00039: 293, // fr-BI - 0x15d0003a: 294, // fr-BJ - 0x15d0003b: 295, // fr-BL - 0x15d00048: 296, // fr-CA - 0x15d0004a: 297, // fr-CD - 0x15d0004b: 298, // fr-CF - 0x15d0004c: 299, // fr-CG - 0x15d0004d: 300, // fr-CH - 0x15d0004e: 301, // fr-CI - 0x15d00051: 302, // fr-CM - 0x15d00061: 303, // fr-DJ - 0x15d00066: 304, // fr-DZ - 0x15d00077: 305, // fr-FR - 0x15d00079: 306, // fr-GA - 0x15d0007d: 307, // fr-GF - 0x15d00083: 308, // fr-GN - 0x15d00084: 309, // fr-GP - 0x15d00085: 310, // fr-GQ - 0x15d00090: 311, // fr-HT - 0x15d000a7: 312, // fr-KM - 0x15d000b6: 313, // fr-LU - 0x15d000b9: 314, // fr-MA - 0x15d000ba: 315, // fr-MC - 0x15d000bd: 316, // fr-MF - 0x15d000be: 317, // fr-MG - 0x15d000c2: 318, // fr-ML - 0x15d000c7: 319, // fr-MQ - 0x15d000c8: 320, // fr-MR - 0x15d000cb: 321, // fr-MU - 0x15d000d2: 322, // fr-NC - 0x15d000d3: 323, // fr-NE - 0x15d000e4: 324, // fr-PF - 0x15d000e9: 325, // fr-PM - 0x15d00101: 326, // fr-RE - 0x15d00106: 327, // fr-RW - 0x15d00109: 328, // fr-SC - 0x15d00113: 329, // fr-SN - 0x15d0011b: 330, // fr-SY - 0x15d0011f: 331, // fr-TD - 0x15d00121: 332, // fr-TG - 0x15d00127: 333, // fr-TN - 0x15d0013e: 334, // fr-VU - 0x15d0013f: 335, // fr-WF - 0x15d0015e: 336, // fr-YT + 0x15d00036: 291, // fr-BE + 0x15d00037: 292, // fr-BF + 0x15d0003a: 293, // fr-BI + 0x15d0003b: 294, // fr-BJ + 0x15d0003c: 295, // fr-BL + 0x15d00049: 296, // fr-CA + 0x15d0004b: 297, // fr-CD + 0x15d0004c: 298, // fr-CF + 0x15d0004d: 299, // fr-CG + 0x15d0004e: 300, // fr-CH + 0x15d0004f: 301, // fr-CI + 0x15d00052: 302, // fr-CM + 0x15d00062: 303, // fr-DJ + 0x15d00067: 304, // fr-DZ + 0x15d00078: 305, // fr-FR + 0x15d0007a: 306, // fr-GA + 0x15d0007e: 307, // fr-GF + 0x15d00084: 308, // fr-GN + 0x15d00085: 309, // fr-GP + 0x15d00086: 310, // fr-GQ + 0x15d00091: 311, // fr-HT + 0x15d000a8: 312, // fr-KM + 0x15d000b7: 313, // fr-LU + 0x15d000ba: 314, // fr-MA + 0x15d000bb: 315, // fr-MC + 0x15d000be: 316, // fr-MF + 0x15d000bf: 317, // fr-MG + 0x15d000c3: 318, // fr-ML + 0x15d000c8: 319, // fr-MQ + 0x15d000c9: 320, // fr-MR + 0x15d000cc: 321, // fr-MU + 0x15d000d3: 322, // fr-NC + 0x15d000d4: 323, // fr-NE + 0x15d000e5: 324, // fr-PF + 0x15d000ea: 325, // fr-PM + 0x15d00102: 326, // fr-RE + 0x15d00107: 327, // fr-RW + 0x15d0010a: 328, // fr-SC + 0x15d00114: 329, // fr-SN + 0x15d0011c: 330, // fr-SY + 0x15d00120: 331, // fr-TD + 0x15d00122: 332, // fr-TG + 0x15d00128: 333, // fr-TN + 0x15d0013f: 334, // fr-VU + 0x15d00140: 335, // fr-WF + 0x15d0015f: 336, // fr-YT 0x16800000: 337, // fur - 0x1680009d: 338, // fur-IT + 0x1680009e: 338, // fur-IT 0x16c00000: 339, // fy - 0x16c000d8: 340, // fy-NL + 0x16c000d9: 340, // fy-NL 0x16d00000: 341, // ga - 0x16d00095: 342, // ga-IE + 0x16d00096: 342, // ga-IE 0x17c00000: 343, // gd - 0x17c0007a: 344, // gd-GB + 0x17c0007b: 344, // gd-GB 0x18e00000: 345, // gl - 0x18e0006d: 346, // gl-ES + 0x18e0006e: 346, // gl-ES 0x1a100000: 347, // gsw - 0x1a10004d: 348, // gsw-CH - 0x1a100077: 349, // gsw-FR - 0x1a1000b1: 350, // gsw-LI + 0x1a10004e: 348, // gsw-CH + 0x1a100078: 349, // gsw-FR + 0x1a1000b2: 350, // gsw-LI 0x1a200000: 351, // gu - 0x1a200098: 352, // gu-IN + 0x1a200099: 352, // gu-IN 0x1a700000: 353, // guw 0x1a900000: 354, // guz - 0x1a9000a3: 355, // guz-KE + 0x1a9000a4: 355, // guz-KE 0x1aa00000: 356, // gv - 0x1aa00097: 357, // gv-IM + 0x1aa00098: 357, // gv-IM 0x1b200000: 358, // ha - 0x1b20007f: 359, // ha-GH - 0x1b2000d3: 360, // ha-NE - 0x1b2000d5: 361, // ha-NG + 0x1b200080: 359, // ha-GH + 0x1b2000d4: 360, // ha-NE + 0x1b2000d6: 361, // ha-NG 0x1b600000: 362, // haw - 0x1b600134: 363, // haw-US + 0x1b600135: 363, // haw-US 0x1ba00000: 364, // he - 0x1ba00096: 365, // he-IL + 0x1ba00097: 365, // he-IL 0x1bc00000: 366, // hi - 0x1bc00098: 367, // hi-IN + 0x1bc00099: 367, // hi-IN 0x1cf00000: 368, // hr - 0x1cf00032: 369, // hr-BA - 0x1cf0008f: 370, // hr-HR + 0x1cf00033: 369, // hr-BA + 0x1cf00090: 370, // hr-HR 0x1d000000: 371, // hsb - 0x1d00005f: 372, // hsb-DE + 0x1d000060: 372, // hsb-DE 0x1d300000: 373, // hu - 0x1d300091: 374, // hu-HU + 0x1d300092: 374, // hu-HU 0x1d500000: 375, // hy - 0x1d500027: 376, // hy-AM + 0x1d500028: 376, // hy-AM 0x1df00000: 377, // id - 0x1df00094: 378, // id-ID + 0x1df00095: 378, // id-ID 0x1e500000: 379, // ig - 0x1e5000d5: 380, // ig-NG + 0x1e5000d6: 380, // ig-NG 0x1e800000: 381, // ii - 0x1e800052: 382, // ii-CN + 0x1e800053: 382, // ii-CN 0x1f600000: 383, // is - 0x1f60009c: 384, // is-IS + 0x1f60009d: 384, // is-IS 0x1f700000: 385, // it - 0x1f70004d: 386, // it-CH - 0x1f70009d: 387, // it-IT - 0x1f700112: 388, // it-SM - 0x1f700137: 389, // it-VA + 0x1f70004e: 386, // it-CH + 0x1f70009e: 387, // it-IT + 0x1f700113: 388, // it-SM + 0x1f700138: 389, // it-VA 0x1f800000: 390, // iu 0x1fe00000: 391, // ja - 0x1fe000a1: 392, // ja-JP + 0x1fe000a2: 392, // ja-JP 0x20100000: 393, // jbo 0x20500000: 394, // jgo - 0x20500051: 395, // jgo-CM + 0x20500052: 395, // jgo-CM 0x20800000: 396, // jmc - 0x2080012e: 397, // jmc-TZ + 0x2080012f: 397, // jmc-TZ 0x20c00000: 398, // jv 0x20e00000: 399, // ka - 0x20e0007c: 400, // ka-GE + 0x20e0007d: 400, // ka-GE 0x21000000: 401, // kab - 0x21000066: 402, // kab-DZ + 0x21000067: 402, // kab-DZ 0x21400000: 403, // kaj 0x21500000: 404, // kam - 0x215000a3: 405, // kam-KE + 0x215000a4: 405, // kam-KE 0x21d00000: 406, // kcg 0x22100000: 407, // kde - 0x2210012e: 408, // kde-TZ + 0x2210012f: 408, // kde-TZ 0x22500000: 409, // kea - 0x22500059: 410, // kea-CV + 0x2250005a: 410, // kea-CV 0x23200000: 411, // khq - 0x232000c2: 412, // khq-ML + 0x232000c3: 412, // khq-ML 0x23700000: 413, // ki - 0x237000a3: 414, // ki-KE + 0x237000a4: 414, // ki-KE 0x24000000: 415, // kk - 0x240000ad: 416, // kk-KZ + 0x240000ae: 416, // kk-KZ 0x24200000: 417, // kkj - 0x24200051: 418, // kkj-CM + 0x24200052: 418, // kkj-CM 0x24300000: 419, // kl - 0x24300081: 420, // kl-GL + 0x24300082: 420, // kl-GL 0x24400000: 421, // kln - 0x244000a3: 422, // kln-KE + 0x244000a4: 422, // kln-KE 0x24800000: 423, // km - 0x248000a5: 424, // km-KH + 0x248000a6: 424, // km-KH 0x24f00000: 425, // kn - 0x24f00098: 426, // kn-IN + 0x24f00099: 426, // kn-IN 0x25200000: 427, // ko - 0x252000a9: 428, // ko-KP - 0x252000aa: 429, // ko-KR + 0x252000aa: 428, // ko-KP + 0x252000ab: 429, // ko-KR 0x25400000: 430, // kok - 0x25400098: 431, // kok-IN + 0x25400099: 431, // kok-IN 0x26800000: 432, // ks - 0x26800098: 433, // ks-IN + 0x26800099: 433, // ks-IN 0x26900000: 434, // ksb - 0x2690012e: 435, // ksb-TZ + 0x2690012f: 435, // ksb-TZ 0x26b00000: 436, // ksf - 0x26b00051: 437, // ksf-CM + 0x26b00052: 437, // ksf-CM 0x26c00000: 438, // ksh - 0x26c0005f: 439, // ksh-DE + 0x26c00060: 439, // ksh-DE 0x27200000: 440, // ku 0x27f00000: 441, // kw - 0x27f0007a: 442, // kw-GB + 0x27f0007b: 442, // kw-GB 0x28800000: 443, // ky - 0x288000a4: 444, // ky-KG + 0x288000a5: 444, // ky-KG 0x28f00000: 445, // lag - 0x28f0012e: 446, // lag-TZ + 0x28f0012f: 446, // lag-TZ 0x29300000: 447, // lb - 0x293000b6: 448, // lb-LU + 0x293000b7: 448, // lb-LU 0x2a100000: 449, // lg - 0x2a100130: 450, // lg-UG + 0x2a100131: 450, // lg-UG 0x2ad00000: 451, // lkt - 0x2ad00134: 452, // lkt-US + 0x2ad00135: 452, // lkt-US 0x2b300000: 453, // ln - 0x2b300029: 454, // ln-AO - 0x2b30004a: 455, // ln-CD - 0x2b30004b: 456, // ln-CF - 0x2b30004c: 457, // ln-CG + 0x2b30002a: 454, // ln-AO + 0x2b30004b: 455, // ln-CD + 0x2b30004c: 456, // ln-CF + 0x2b30004d: 457, // ln-CG 0x2b600000: 458, // lo - 0x2b6000ae: 459, // lo-LA + 0x2b6000af: 459, // lo-LA 0x2bd00000: 460, // lrc - 0x2bd0009a: 461, // lrc-IQ - 0x2bd0009b: 462, // lrc-IR + 0x2bd0009b: 461, // lrc-IQ + 0x2bd0009c: 462, // lrc-IR 0x2be00000: 463, // lt - 0x2be000b5: 464, // lt-LT + 0x2be000b6: 464, // lt-LT 0x2c000000: 465, // lu - 0x2c00004a: 466, // lu-CD + 0x2c00004b: 466, // lu-CD 0x2c200000: 467, // luo - 0x2c2000a3: 468, // luo-KE + 0x2c2000a4: 468, // luo-KE 0x2c300000: 469, // luy - 0x2c3000a3: 470, // luy-KE + 0x2c3000a4: 470, // luy-KE 0x2c500000: 471, // lv - 0x2c5000b7: 472, // lv-LV + 0x2c5000b8: 472, // lv-LV 0x2cf00000: 473, // mas - 0x2cf000a3: 474, // mas-KE - 0x2cf0012e: 475, // mas-TZ + 0x2cf000a4: 474, // mas-KE + 0x2cf0012f: 475, // mas-TZ 0x2e700000: 476, // mer - 0x2e7000a3: 477, // mer-KE + 0x2e7000a4: 477, // mer-KE 0x2eb00000: 478, // mfe - 0x2eb000cb: 479, // mfe-MU + 0x2eb000cc: 479, // mfe-MU 0x2ef00000: 480, // mg - 0x2ef000be: 481, // mg-MG + 0x2ef000bf: 481, // mg-MG 0x2f000000: 482, // mgh - 0x2f0000d0: 483, // mgh-MZ + 0x2f0000d1: 483, // mgh-MZ 0x2f200000: 484, // mgo - 0x2f200051: 485, // mgo-CM + 0x2f200052: 485, // mgo-CM 0x2fd00000: 486, // mk - 0x2fd000c1: 487, // mk-MK + 0x2fd000c2: 487, // mk-MK 0x30200000: 488, // ml - 0x30200098: 489, // ml-IN + 0x30200099: 489, // ml-IN 0x30900000: 490, // mn - 0x309000c4: 491, // mn-MN + 0x309000c5: 491, // mn-MN 0x31900000: 492, // mr - 0x31900098: 493, // mr-IN + 0x31900099: 493, // mr-IN 0x31d00000: 494, // ms - 0x31d0003d: 495, // ms-BN - 0x31d000cf: 496, // ms-MY - 0x31d0010c: 497, // ms-SG + 0x31d0003e: 495, // ms-BN + 0x31d000d0: 496, // ms-MY + 0x31d0010d: 497, // ms-SG 0x31e00000: 498, // mt - 0x31e000ca: 499, // mt-MT + 0x31e000cb: 499, // mt-MT 0x32300000: 500, // mua - 0x32300051: 501, // mua-CM + 0x32300052: 501, // mua-CM 0x32f00000: 502, // my - 0x32f000c3: 503, // my-MM + 0x32f000c4: 503, // my-MM 0x33800000: 504, // mzn - 0x3380009b: 505, // mzn-IR + 0x3380009c: 505, // mzn-IR 0x33f00000: 506, // nah 0x34300000: 507, // naq - 0x343000d1: 508, // naq-NA + 0x343000d2: 508, // naq-NA 0x34500000: 509, // nb - 0x345000d9: 510, // nb-NO - 0x3450010f: 511, // nb-SJ + 0x345000da: 510, // nb-NO + 0x34500110: 511, // nb-SJ 0x34c00000: 512, // nd - 0x34c00163: 513, // nd-ZW + 0x34c00164: 513, // nd-ZW 0x34e00000: 514, // nds - 0x34e0005f: 515, // nds-DE - 0x34e000d8: 516, // nds-NL + 0x34e00060: 515, // nds-DE + 0x34e000d9: 516, // nds-NL 0x34f00000: 517, // ne - 0x34f00098: 518, // ne-IN - 0x34f000da: 519, // ne-NP + 0x34f00099: 518, // ne-IN + 0x34f000db: 519, // ne-NP 0x36500000: 520, // nl - 0x3650002f: 521, // nl-AW - 0x36500035: 522, // nl-BE - 0x3650003f: 523, // nl-BQ - 0x3650005a: 524, // nl-CW - 0x365000d8: 525, // nl-NL - 0x36500115: 526, // nl-SR - 0x3650011a: 527, // nl-SX + 0x36500030: 521, // nl-AW + 0x36500036: 522, // nl-BE + 0x36500040: 523, // nl-BQ + 0x3650005b: 524, // nl-CW + 0x365000d9: 525, // nl-NL + 0x36500116: 526, // nl-SR + 0x3650011b: 527, // nl-SX 0x36600000: 528, // nmg - 0x36600051: 529, // nmg-CM + 0x36600052: 529, // nmg-CM 0x36800000: 530, // nn - 0x368000d9: 531, // nn-NO + 0x368000da: 531, // nn-NO 0x36a00000: 532, // nnh - 0x36a00051: 533, // nnh-CM + 0x36a00052: 533, // nnh-CM 0x36d00000: 534, // no 0x37300000: 535, // nqo 0x37400000: 536, // nr 0x37800000: 537, // nso 0x37e00000: 538, // nus - 0x37e00116: 539, // nus-SS + 0x37e00117: 539, // nus-SS 0x38500000: 540, // ny 0x38700000: 541, // nyn - 0x38700130: 542, // nyn-UG + 0x38700131: 542, // nyn-UG 0x38e00000: 543, // om - 0x38e0006e: 544, // om-ET - 0x38e000a3: 545, // om-KE + 0x38e0006f: 544, // om-ET + 0x38e000a4: 545, // om-KE 0x39300000: 546, // or - 0x39300098: 547, // or-IN + 0x39300099: 547, // or-IN 0x39600000: 548, // os - 0x3960007c: 549, // os-GE - 0x39600105: 550, // os-RU + 0x3960007d: 549, // os-GE + 0x39600106: 550, // os-RU 0x39b00000: 551, // pa 0x39b05000: 552, // pa-Arab - 0x39b050e7: 553, // pa-Arab-PK - 0x39b2f000: 554, // pa-Guru - 0x39b2f098: 555, // pa-Guru-IN + 0x39b050e8: 553, // pa-Arab-PK + 0x39b32000: 554, // pa-Guru + 0x39b32099: 555, // pa-Guru-IN 0x39f00000: 556, // pap 0x3b100000: 557, // pl - 0x3b1000e8: 558, // pl-PL + 0x3b1000e9: 558, // pl-PL 0x3bb00000: 559, // prg 0x3bb00001: 560, // prg-001 0x3bc00000: 561, // ps - 0x3bc00023: 562, // ps-AF + 0x3bc00024: 562, // ps-AF 0x3be00000: 563, // pt - 0x3be00029: 564, // pt-AO - 0x3be00040: 565, // pt-BR - 0x3be0004d: 566, // pt-CH - 0x3be00059: 567, // pt-CV - 0x3be00085: 568, // pt-GQ - 0x3be0008a: 569, // pt-GW - 0x3be000b6: 570, // pt-LU - 0x3be000c5: 571, // pt-MO - 0x3be000d0: 572, // pt-MZ - 0x3be000ed: 573, // pt-PT - 0x3be00117: 574, // pt-ST - 0x3be00125: 575, // pt-TL + 0x3be0002a: 564, // pt-AO + 0x3be00041: 565, // pt-BR + 0x3be0004e: 566, // pt-CH + 0x3be0005a: 567, // pt-CV + 0x3be00086: 568, // pt-GQ + 0x3be0008b: 569, // pt-GW + 0x3be000b7: 570, // pt-LU + 0x3be000c6: 571, // pt-MO + 0x3be000d1: 572, // pt-MZ + 0x3be000ee: 573, // pt-PT + 0x3be00118: 574, // pt-ST + 0x3be00126: 575, // pt-TL 0x3c200000: 576, // qu - 0x3c20003e: 577, // qu-BO - 0x3c200068: 578, // qu-EC - 0x3c2000e3: 579, // qu-PE + 0x3c20003f: 577, // qu-BO + 0x3c200069: 578, // qu-EC + 0x3c2000e4: 579, // qu-PE 0x3d200000: 580, // rm - 0x3d20004d: 581, // rm-CH + 0x3d20004e: 581, // rm-CH 0x3d700000: 582, // rn - 0x3d700039: 583, // rn-BI + 0x3d70003a: 583, // rn-BI 0x3da00000: 584, // ro - 0x3da000bb: 585, // ro-MD - 0x3da00103: 586, // ro-RO + 0x3da000bc: 585, // ro-MD + 0x3da00104: 586, // ro-RO 0x3dc00000: 587, // rof - 0x3dc0012e: 588, // rof-TZ + 0x3dc0012f: 588, // rof-TZ 0x3e000000: 589, // ru - 0x3e000046: 590, // ru-BY - 0x3e0000a4: 591, // ru-KG - 0x3e0000ad: 592, // ru-KZ - 0x3e0000bb: 593, // ru-MD - 0x3e000105: 594, // ru-RU - 0x3e00012f: 595, // ru-UA + 0x3e000047: 590, // ru-BY + 0x3e0000a5: 591, // ru-KG + 0x3e0000ae: 592, // ru-KZ + 0x3e0000bc: 593, // ru-MD + 0x3e000106: 594, // ru-RU + 0x3e000130: 595, // ru-UA 0x3e300000: 596, // rw - 0x3e300106: 597, // rw-RW + 0x3e300107: 597, // rw-RW 0x3e400000: 598, // rwk - 0x3e40012e: 599, // rwk-TZ + 0x3e40012f: 599, // rwk-TZ 0x3e900000: 600, // sah - 0x3e900105: 601, // sah-RU + 0x3e900106: 601, // sah-RU 0x3ea00000: 602, // saq - 0x3ea000a3: 603, // saq-KE + 0x3ea000a4: 603, // saq-KE 0x3f100000: 604, // sbp - 0x3f10012e: 605, // sbp-TZ + 0x3f10012f: 605, // sbp-TZ 0x3fa00000: 606, // sdh 0x3fb00000: 607, // se - 0x3fb00071: 608, // se-FI - 0x3fb000d9: 609, // se-NO - 0x3fb0010b: 610, // se-SE + 0x3fb00072: 608, // se-FI + 0x3fb000da: 609, // se-NO + 0x3fb0010c: 610, // se-SE 0x3fd00000: 611, // seh - 0x3fd000d0: 612, // seh-MZ + 0x3fd000d1: 612, // seh-MZ 0x3ff00000: 613, // ses - 0x3ff000c2: 614, // ses-ML + 0x3ff000c3: 614, // ses-ML 0x40000000: 615, // sg - 0x4000004b: 616, // sg-CF + 0x4000004c: 616, // sg-CF 0x40600000: 617, // shi - 0x40652000: 618, // shi-Latn - 0x406520b9: 619, // shi-Latn-MA - 0x406d2000: 620, // shi-Tfng - 0x406d20b9: 621, // shi-Tfng-MA + 0x40655000: 618, // shi-Latn + 0x406550ba: 619, // shi-Latn-MA + 0x406d8000: 620, // shi-Tfng + 0x406d80ba: 621, // shi-Tfng-MA 0x40a00000: 622, // si - 0x40a000b2: 623, // si-LK + 0x40a000b3: 623, // si-LK 0x41000000: 624, // sk - 0x41000110: 625, // sk-SK + 0x41000111: 625, // sk-SK 0x41400000: 626, // sl - 0x4140010e: 627, // sl-SI + 0x4140010f: 627, // sl-SI 0x41a00000: 628, // sma 0x41b00000: 629, // smi 0x41c00000: 630, // smj 0x41d00000: 631, // smn - 0x41d00071: 632, // smn-FI + 0x41d00072: 632, // smn-FI 0x42000000: 633, // sms 0x42100000: 634, // sn - 0x42100163: 635, // sn-ZW + 0x42100164: 635, // sn-ZW 0x42700000: 636, // so - 0x42700061: 637, // so-DJ - 0x4270006e: 638, // so-ET - 0x427000a3: 639, // so-KE - 0x42700114: 640, // so-SO + 0x42700062: 637, // so-DJ + 0x4270006f: 638, // so-ET + 0x427000a4: 639, // so-KE + 0x42700115: 640, // so-SO 0x42f00000: 641, // sq - 0x42f00026: 642, // sq-AL - 0x42f000c1: 643, // sq-MK - 0x42f0014c: 644, // sq-XK + 0x42f00027: 642, // sq-AL + 0x42f000c2: 643, // sq-MK + 0x42f0014d: 644, // sq-XK 0x43000000: 645, // sr 0x4301e000: 646, // sr-Cyrl - 0x4301e032: 647, // sr-Cyrl-BA - 0x4301e0bc: 648, // sr-Cyrl-ME - 0x4301e104: 649, // sr-Cyrl-RS - 0x4301e14c: 650, // sr-Cyrl-XK - 0x43052000: 651, // sr-Latn - 0x43052032: 652, // sr-Latn-BA - 0x430520bc: 653, // sr-Latn-ME - 0x43052104: 654, // sr-Latn-RS - 0x4305214c: 655, // sr-Latn-XK + 0x4301e033: 647, // sr-Cyrl-BA + 0x4301e0bd: 648, // sr-Cyrl-ME + 0x4301e105: 649, // sr-Cyrl-RS + 0x4301e14d: 650, // sr-Cyrl-XK + 0x43055000: 651, // sr-Latn + 0x43055033: 652, // sr-Latn-BA + 0x430550bd: 653, // sr-Latn-ME + 0x43055105: 654, // sr-Latn-RS + 0x4305514d: 655, // sr-Latn-XK 0x43500000: 656, // ss 0x43800000: 657, // ssy 0x43900000: 658, // st 0x44200000: 659, // sv - 0x44200030: 660, // sv-AX - 0x44200071: 661, // sv-FI - 0x4420010b: 662, // sv-SE + 0x44200031: 660, // sv-AX + 0x44200072: 661, // sv-FI + 0x4420010c: 662, // sv-SE 0x44300000: 663, // sw - 0x4430004a: 664, // sw-CD - 0x443000a3: 665, // sw-KE - 0x4430012e: 666, // sw-TZ - 0x44300130: 667, // sw-UG + 0x4430004b: 664, // sw-CD + 0x443000a4: 665, // sw-KE + 0x4430012f: 666, // sw-TZ + 0x44300131: 667, // sw-UG 0x44c00000: 668, // syr 0x44e00000: 669, // ta - 0x44e00098: 670, // ta-IN - 0x44e000b2: 671, // ta-LK - 0x44e000cf: 672, // ta-MY - 0x44e0010c: 673, // ta-SG + 0x44e00099: 670, // ta-IN + 0x44e000b3: 671, // ta-LK + 0x44e000d0: 672, // ta-MY + 0x44e0010d: 673, // ta-SG 0x45f00000: 674, // te - 0x45f00098: 675, // te-IN + 0x45f00099: 675, // te-IN 0x46200000: 676, // teo - 0x462000a3: 677, // teo-KE - 0x46200130: 678, // teo-UG + 0x462000a4: 677, // teo-KE + 0x46200131: 678, // teo-UG 0x46900000: 679, // th - 0x46900122: 680, // th-TH + 0x46900123: 680, // th-TH 0x46d00000: 681, // ti - 0x46d0006c: 682, // ti-ER - 0x46d0006e: 683, // ti-ET + 0x46d0006d: 682, // ti-ER + 0x46d0006f: 683, // ti-ET 0x46f00000: 684, // tig 0x47400000: 685, // tk - 0x47400126: 686, // tk-TM + 0x47400127: 686, // tk-TM 0x47e00000: 687, // tn 0x48000000: 688, // to - 0x48000128: 689, // to-TO + 0x48000129: 689, // to-TO 0x48800000: 690, // tr - 0x4880005c: 691, // tr-CY - 0x4880012a: 692, // tr-TR + 0x4880005d: 691, // tr-CY + 0x4880012b: 692, // tr-TR 0x48c00000: 693, // ts 0x4a200000: 694, // twq - 0x4a2000d3: 695, // twq-NE + 0x4a2000d4: 695, // twq-NE 0x4a700000: 696, // tzm - 0x4a7000b9: 697, // tzm-MA + 0x4a7000ba: 697, // tzm-MA 0x4aa00000: 698, // ug - 0x4aa00052: 699, // ug-CN + 0x4aa00053: 699, // ug-CN 0x4ac00000: 700, // uk - 0x4ac0012f: 701, // uk-UA + 0x4ac00130: 701, // uk-UA 0x4b200000: 702, // ur - 0x4b200098: 703, // ur-IN - 0x4b2000e7: 704, // ur-PK + 0x4b200099: 703, // ur-IN + 0x4b2000e8: 704, // ur-PK 0x4ba00000: 705, // uz 0x4ba05000: 706, // uz-Arab - 0x4ba05023: 707, // uz-Arab-AF + 0x4ba05024: 707, // uz-Arab-AF 0x4ba1e000: 708, // uz-Cyrl - 0x4ba1e136: 709, // uz-Cyrl-UZ - 0x4ba52000: 710, // uz-Latn - 0x4ba52136: 711, // uz-Latn-UZ + 0x4ba1e137: 709, // uz-Cyrl-UZ + 0x4ba55000: 710, // uz-Latn + 0x4ba55137: 711, // uz-Latn-UZ 0x4bc00000: 712, // vai - 0x4bc52000: 713, // vai-Latn - 0x4bc520b3: 714, // vai-Latn-LR - 0x4bcd9000: 715, // vai-Vaii - 0x4bcd90b3: 716, // vai-Vaii-LR + 0x4bc55000: 713, // vai-Latn + 0x4bc550b4: 714, // vai-Latn-LR + 0x4bcdf000: 715, // vai-Vaii + 0x4bcdf0b4: 716, // vai-Vaii-LR 0x4be00000: 717, // ve 0x4c100000: 718, // vi - 0x4c10013d: 719, // vi-VN + 0x4c10013e: 719, // vi-VN 0x4c700000: 720, // vo 0x4c700001: 721, // vo-001 0x4ca00000: 722, // vun - 0x4ca0012e: 723, // vun-TZ + 0x4ca0012f: 723, // vun-TZ 0x4cc00000: 724, // wa 0x4cd00000: 725, // wae - 0x4cd0004d: 726, // wae-CH + 0x4cd0004e: 726, // wae-CH 0x4e300000: 727, // wo 0x4f000000: 728, // xh 0x4f900000: 729, // xog - 0x4f900130: 730, // xog-UG + 0x4f900131: 730, // xog-UG 0x50700000: 731, // yav - 0x50700051: 732, // yav-CM + 0x50700052: 732, // yav-CM 0x51000000: 733, // yi 0x51000001: 734, // yi-001 0x51600000: 735, // yo - 0x5160003a: 736, // yo-BJ - 0x516000d5: 737, // yo-NG + 0x5160003b: 736, // yo-BJ + 0x516000d6: 737, // yo-NG 0x51d00000: 738, // yue - 0x51d0008c: 739, // yue-HK + 0x51d0008d: 739, // yue-HK 0x52600000: 740, // zgh - 0x526000b9: 741, // zgh-MA + 0x526000ba: 741, // zgh-MA 0x52700000: 742, // zh - 0x52734000: 743, // zh-Hans - 0x52734052: 744, // zh-Hans-CN - 0x5273408c: 745, // zh-Hans-HK - 0x527340c5: 746, // zh-Hans-MO - 0x5273410c: 747, // zh-Hans-SG - 0x52735000: 748, // zh-Hant - 0x5273508c: 749, // zh-Hant-HK - 0x527350c5: 750, // zh-Hant-MO - 0x5273512d: 751, // zh-Hant-TW + 0x52737000: 743, // zh-Hans + 0x52737053: 744, // zh-Hans-CN + 0x5273708d: 745, // zh-Hans-HK + 0x527370c6: 746, // zh-Hans-MO + 0x5273710d: 747, // zh-Hans-SG + 0x52738000: 748, // zh-Hant + 0x5273808d: 749, // zh-Hant-HK + 0x527380c6: 750, // zh-Hant-MO + 0x5273812e: 751, // zh-Hant-TW 0x52c00000: 752, // zu - 0x52c00160: 753, // zu-ZA + 0x52c00161: 753, // zu-ZA } // Total table size 4592 bytes (4KiB); checksum: C25F8AFF diff --git a/vendor/golang.org/x/text/language/language.go b/vendor/golang.org/x/text/language/language.go index e2da1ab17..ed1011f18 100644 --- a/vendor/golang.org/x/text/language/language.go +++ b/vendor/golang.org/x/text/language/language.go @@ -5,101 +5,6 @@ //go:generate go run gen.go gen_common.go -output tables.go //go:generate go run gen_index.go -// Package language implements BCP 47 language tags and related functionality. -// -// The Tag type, which is used to represent languages, is agnostic to the -// meaning of its subtags. Tags are not fully canonicalized to preserve -// information that may be valuable in certain contexts. As a consequence, two -// different tags may represent identical languages. -// -// Initializing language- or locale-specific components usually consists of -// two steps. The first step is to select a display language based on the -// preferred languages of the user and the languages supported by an application. -// The second step is to create the language-specific services based on -// this selection. Each is discussed in more details below. -// -// Matching preferred against supported languages -// -// An application may support various languages. This list is typically limited -// by the languages for which there exists translations of the user interface. -// Similarly, a user may provide a list of preferred languages which is limited -// by the languages understood by this user. -// An application should use a Matcher to find the best supported language based -// on the user's preferred list. -// Matchers are aware of the intricacies of equivalence between languages. -// The default Matcher implementation takes into account things such as -// deprecated subtags, legacy tags, and mutual intelligibility between scripts -// and languages. -// -// A Matcher for English, Australian English, Danish, and standard Mandarin can -// be defined as follows: -// -// var matcher = language.NewMatcher([]language.Tag{ -// language.English, // The first language is used as fallback. -// language.MustParse("en-AU"), -// language.Danish, -// language.Chinese, -// }) -// -// The following code selects the best match for someone speaking Spanish and -// Norwegian: -// -// preferred := []language.Tag{ language.Spanish, language.Norwegian } -// tag, _, _ := matcher.Match(preferred...) -// -// In this case, the best match is Danish, as Danish is sufficiently a match to -// Norwegian to not have to fall back to the default. -// See ParseAcceptLanguage on how to handle the Accept-Language HTTP header. -// -// Selecting language-specific services -// -// One should always use the Tag returned by the Matcher to create an instance -// of any of the language-specific services provided by the text repository. -// This prevents the mixing of languages, such as having a different language for -// messages and display names, as well as improper casing or sorting order for -// the selected language. -// Using the returned Tag also allows user-defined settings, such as collation -// order or numbering system to be transparently passed as options. -// -// If you have language-specific data in your application, however, it will in -// most cases suffice to use the index returned by the matcher to identify -// the user language. -// The following loop provides an alternative in case this is not sufficient: -// -// supported := map[language.Tag]data{ -// language.English: enData, -// language.MustParse("en-AU"): enAUData, -// language.Danish: daData, -// language.Chinese: zhData, -// } -// tag, _, _ := matcher.Match(preferred...) -// for ; tag != language.Und; tag = tag.Parent() { -// if v, ok := supported[tag]; ok { -// return v -// } -// } -// return enData // should not reach here -// -// Repeatedly taking the Parent of the tag returned by Match will eventually -// match one of the tags used to initialize the Matcher. -// -// Canonicalization -// -// By default, only legacy and deprecated tags are converted into their -// canonical equivalent. All other information is preserved. This approach makes -// the confidence scores more accurate and allows matchers to distinguish -// between variants that are otherwise lost. -// -// As a consequence, two tags that should be treated as identical according to -// BCP 47 or CLDR, like "en-Latn" and "en", will be represented differently. The -// Matchers will handle such distinctions, though, and are aware of the -// equivalence relations. The CanonType type can be used to alter the -// canonicalization form. -// -// References -// -// BCP 47 - Tags for Identifying Languages -// http://tools.ietf.org/html/bcp47 package language // TODO: Remove above NOTE after: diff --git a/vendor/golang.org/x/text/language/language_test.go b/vendor/golang.org/x/text/language/language_test.go new file mode 100644 index 000000000..f7c2d88ab --- /dev/null +++ b/vendor/golang.org/x/text/language/language_test.go @@ -0,0 +1,878 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package language + +import ( + "reflect" + "testing" + + "golang.org/x/text/internal/testtext" +) + +func TestTagSize(t *testing.T) { + id := Tag{} + typ := reflect.TypeOf(id) + if typ.Size() > 24 { + t.Errorf("size of Tag was %d; want 24", typ.Size()) + } +} + +func TestIsRoot(t *testing.T) { + loc := Tag{} + if !loc.IsRoot() { + t.Errorf("unspecified should be root.") + } + for i, tt := range parseTests() { + loc, _ := Parse(tt.in) + undef := tt.lang == "und" && tt.script == "" && tt.region == "" && tt.ext == "" + if loc.IsRoot() != undef { + t.Errorf("%d: was %v; want %v", i, loc.IsRoot(), undef) + } + } +} + +func TestEquality(t *testing.T) { + for i, tt := range parseTests()[48:49] { + s := tt.in + tag := Make(s) + t1 := Make(tag.String()) + if tag != t1 { + t.Errorf("%d:%s: equality test 1 failed\n got: %#v\nwant: %#v)", i, s, t1, tag) + } + t2, _ := Compose(tag) + if tag != t2 { + t.Errorf("%d:%s: equality test 2 failed\n got: %#v\nwant: %#v", i, s, t2, tag) + } + } +} + +func TestMakeString(t *testing.T) { + tests := []struct{ in, out string }{ + {"und", "und"}, + {"und", "und-CW"}, + {"nl", "nl-NL"}, + {"de-1901", "nl-1901"}, + {"de-1901", "de-Arab-1901"}, + {"x-a-b", "de-Arab-x-a-b"}, + {"x-a-b", "x-a-b"}, + } + for i, tt := range tests { + id, _ := Parse(tt.in) + mod, _ := Parse(tt.out) + id.setTagsFrom(mod) + for j := 0; j < 2; j++ { + id.remakeString() + if str := id.String(); str != tt.out { + t.Errorf("%d:%d: found %s; want %s", i, j, id.String(), tt.out) + } + } + // The bytes to string conversion as used in remakeString + // occasionally measures as more than one alloc, breaking this test. + // To alleviate this we set the number of runs to more than 1. + if n := testtext.AllocsPerRun(8, id.remakeString); n > 1 { + t.Errorf("%d: # allocs got %.1f; want <= 1", i, n) + } + } +} + +func TestCompactIndex(t *testing.T) { + tests := []struct { + tag string + index int + ok bool + }{ + // TODO: these values will change with each CLDR update. This issue + // will be solved if we decide to fix the indexes. + {"und", 0, true}, + {"ca-ES-valencia", 1, true}, + {"ca-ES-valencia-u-va-posix", 0, false}, + {"ca-ES-valencia-u-co-phonebk", 1, true}, + {"ca-ES-valencia-u-co-phonebk-va-posix", 0, false}, + {"x-klingon", 0, false}, + {"en-US", 229, true}, + {"en-US-u-va-posix", 2, true}, + {"en", 133, true}, + {"en-u-co-phonebk", 133, true}, + {"en-001", 134, true}, + {"sh", 0, false}, // We don't normalize. + } + for _, tt := range tests { + x, ok := CompactIndex(Raw.MustParse(tt.tag)) + if x != tt.index || ok != tt.ok { + t.Errorf("%s: got %d, %v; want %d %v", tt.tag, x, ok, tt.index, tt.ok) + } + } +} + +func TestBase(t *testing.T) { + tests := []struct { + loc, lang string + conf Confidence + }{ + {"und", "en", Low}, + {"x-abc", "und", No}, + {"en", "en", Exact}, + {"und-Cyrl", "ru", High}, + // If a region is not included, the official language should be English. + {"und-US", "en", High}, + // TODO: not-explicitly listed scripts should probably be und, No + // Modify addTags to return info on how the match was derived. + // {"und-Aghb", "und", No}, + } + for i, tt := range tests { + loc, _ := Parse(tt.loc) + lang, conf := loc.Base() + if lang.String() != tt.lang { + t.Errorf("%d: language was %s; want %s", i, lang, tt.lang) + } + if conf != tt.conf { + t.Errorf("%d: confidence was %d; want %d", i, conf, tt.conf) + } + } +} + +func TestParseBase(t *testing.T) { + tests := []struct { + in string + out string + ok bool + }{ + {"en", "en", true}, + {"EN", "en", true}, + {"nld", "nl", true}, + {"dut", "dut", true}, // bibliographic + {"aaj", "und", false}, // unknown + {"qaa", "qaa", true}, + {"a", "und", false}, + {"", "und", false}, + {"aaaa", "und", false}, + } + for i, tt := range tests { + x, err := ParseBase(tt.in) + if x.String() != tt.out || err == nil != tt.ok { + t.Errorf("%d:%s: was %s, %v; want %s, %v", i, tt.in, x, err == nil, tt.out, tt.ok) + } + if y, _, _ := Raw.Make(tt.out).Raw(); x != y { + t.Errorf("%d:%s: tag was %s; want %s", i, tt.in, x, y) + } + } +} + +func TestScript(t *testing.T) { + tests := []struct { + loc, scr string + conf Confidence + }{ + {"und", "Latn", Low}, + {"en-Latn", "Latn", Exact}, + {"en", "Latn", High}, + {"sr", "Cyrl", Low}, + {"kk", "Cyrl", High}, + {"kk-CN", "Arab", Low}, + {"cmn", "Hans", Low}, + {"ru", "Cyrl", High}, + {"ru-RU", "Cyrl", High}, + {"yue", "Hant", Low}, + {"x-abc", "Zzzz", Low}, + {"und-zyyy", "Zyyy", Exact}, + } + for i, tt := range tests { + loc, _ := Parse(tt.loc) + sc, conf := loc.Script() + if sc.String() != tt.scr { + t.Errorf("%d:%s: script was %s; want %s", i, tt.loc, sc, tt.scr) + } + if conf != tt.conf { + t.Errorf("%d:%s: confidence was %d; want %d", i, tt.loc, conf, tt.conf) + } + } +} + +func TestParseScript(t *testing.T) { + tests := []struct { + in string + out string + ok bool + }{ + {"Latn", "Latn", true}, + {"zzzz", "Zzzz", true}, + {"zyyy", "Zyyy", true}, + {"Latm", "Zzzz", false}, + {"Zzz", "Zzzz", false}, + {"", "Zzzz", false}, + {"Zzzxx", "Zzzz", false}, + } + for i, tt := range tests { + x, err := ParseScript(tt.in) + if x.String() != tt.out || err == nil != tt.ok { + t.Errorf("%d:%s: was %s, %v; want %s, %v", i, tt.in, x, err == nil, tt.out, tt.ok) + } + if err == nil { + if _, y, _ := Raw.Make("und-" + tt.out).Raw(); x != y { + t.Errorf("%d:%s: tag was %s; want %s", i, tt.in, x, y) + } + } + } +} + +func TestRegion(t *testing.T) { + tests := []struct { + loc, reg string + conf Confidence + }{ + {"und", "US", Low}, + {"en", "US", Low}, + {"zh-Hant", "TW", Low}, + {"en-US", "US", Exact}, + {"cmn", "CN", Low}, + {"ru", "RU", Low}, + {"yue", "HK", Low}, + {"x-abc", "ZZ", Low}, + } + for i, tt := range tests { + loc, _ := Raw.Parse(tt.loc) + reg, conf := loc.Region() + if reg.String() != tt.reg { + t.Errorf("%d:%s: region was %s; want %s", i, tt.loc, reg, tt.reg) + } + if conf != tt.conf { + t.Errorf("%d:%s: confidence was %d; want %d", i, tt.loc, conf, tt.conf) + } + } +} + +func TestEncodeM49(t *testing.T) { + tests := []struct { + m49 int + code string + ok bool + }{ + {1, "001", true}, + {840, "US", true}, + {899, "ZZ", false}, + } + for i, tt := range tests { + if r, err := EncodeM49(tt.m49); r.String() != tt.code || err == nil != tt.ok { + t.Errorf("%d:%d: was %s, %v; want %s, %v", i, tt.m49, r, err == nil, tt.code, tt.ok) + } + } + for i := 1; i <= 1000; i++ { + if r, err := EncodeM49(i); err == nil && r.M49() == 0 { + t.Errorf("%d has no error, but maps to undefined region", i) + } + } +} + +func TestParseRegion(t *testing.T) { + tests := []struct { + in string + out string + ok bool + }{ + {"001", "001", true}, + {"840", "US", true}, + {"899", "ZZ", false}, + {"USA", "US", true}, + {"US", "US", true}, + {"BC", "ZZ", false}, + {"C", "ZZ", false}, + {"CCCC", "ZZ", false}, + {"01", "ZZ", false}, + } + for i, tt := range tests { + r, err := ParseRegion(tt.in) + if r.String() != tt.out || err == nil != tt.ok { + t.Errorf("%d:%s: was %s, %v; want %s, %v", i, tt.in, r, err == nil, tt.out, tt.ok) + } + if err == nil { + if _, _, y := Raw.Make("und-" + tt.out).Raw(); r != y { + t.Errorf("%d:%s: tag was %s; want %s", i, tt.in, r, y) + } + } + } +} + +func TestIsCountry(t *testing.T) { + tests := []struct { + reg string + country bool + }{ + {"US", true}, + {"001", false}, + {"958", false}, + {"419", false}, + {"203", true}, + {"020", true}, + {"900", false}, + {"999", false}, + {"QO", false}, + {"EU", false}, + {"AA", false}, + {"XK", true}, + } + for i, tt := range tests { + reg, _ := getRegionID([]byte(tt.reg)) + r := Region{reg} + if r.IsCountry() != tt.country { + t.Errorf("%d: IsCountry(%s) was %v; want %v", i, tt.reg, r.IsCountry(), tt.country) + } + } +} + +func TestIsGroup(t *testing.T) { + tests := []struct { + reg string + group bool + }{ + {"US", false}, + {"001", true}, + {"958", false}, + {"419", true}, + {"203", false}, + {"020", false}, + {"900", false}, + {"999", false}, + {"QO", true}, + {"EU", true}, + {"AA", false}, + {"XK", false}, + } + for i, tt := range tests { + reg, _ := getRegionID([]byte(tt.reg)) + r := Region{reg} + if r.IsGroup() != tt.group { + t.Errorf("%d: IsGroup(%s) was %v; want %v", i, tt.reg, r.IsGroup(), tt.group) + } + } +} + +func TestContains(t *testing.T) { + tests := []struct { + enclosing, contained string + contains bool + }{ + // A region contains itself. + {"US", "US", true}, + {"001", "001", true}, + + // Direct containment. + {"001", "002", true}, + {"039", "XK", true}, + {"150", "XK", true}, + {"EU", "AT", true}, + {"QO", "AQ", true}, + + // Indirect containemnt. + {"001", "US", true}, + {"001", "419", true}, + {"001", "013", true}, + + // No containment. + {"US", "001", false}, + {"155", "EU", false}, + } + for i, tt := range tests { + enc, _ := getRegionID([]byte(tt.enclosing)) + con, _ := getRegionID([]byte(tt.contained)) + r := Region{enc} + if got := r.Contains(Region{con}); got != tt.contains { + t.Errorf("%d: %s.Contains(%s) was %v; want %v", i, tt.enclosing, tt.contained, got, tt.contains) + } + } +} + +func TestRegionCanonicalize(t *testing.T) { + for i, tt := range []struct{ in, out string }{ + {"UK", "GB"}, + {"TP", "TL"}, + {"QU", "EU"}, + {"SU", "SU"}, + {"VD", "VN"}, + {"DD", "DE"}, + } { + r := MustParseRegion(tt.in) + want := MustParseRegion(tt.out) + if got := r.Canonicalize(); got != want { + t.Errorf("%d: got %v; want %v", i, got, want) + } + } +} + +func TestRegionTLD(t *testing.T) { + for _, tt := range []struct { + in, out string + ok bool + }{ + {"EH", "EH", true}, + {"FR", "FR", true}, + {"TL", "TL", true}, + + // In ccTLD before in ISO. + {"GG", "GG", true}, + + // Non-standard assignment of ccTLD to ISO code. + {"GB", "UK", true}, + + // Exceptionally reserved in ISO and valid ccTLD. + {"UK", "UK", true}, + {"AC", "AC", true}, + {"EU", "EU", true}, + {"SU", "SU", true}, + + // Exceptionally reserved in ISO and invalid ccTLD. + {"CP", "ZZ", false}, + {"DG", "ZZ", false}, + {"EA", "ZZ", false}, + {"FX", "ZZ", false}, + {"IC", "ZZ", false}, + {"TA", "ZZ", false}, + + // Transitionally reserved in ISO (e.g. deprecated) but valid ccTLD as + // it is still being phased out. + {"AN", "AN", true}, + {"TP", "TP", true}, + + // Transitionally reserved in ISO (e.g. deprecated) and invalid ccTLD. + // Defined in package language as it has a mapping in CLDR. + {"BU", "ZZ", false}, + {"CS", "ZZ", false}, + {"NT", "ZZ", false}, + {"YU", "ZZ", false}, + {"ZR", "ZZ", false}, + // Not defined in package: SF. + + // Indeterminately reserved in ISO. + // Defined in package language as it has a legacy mapping in CLDR. + {"DY", "ZZ", false}, + {"RH", "ZZ", false}, + {"VD", "ZZ", false}, + // Not defined in package: EW, FL, JA, LF, PI, RA, RB, RC, RI, RL, RM, + // RN, RP, WG, WL, WV, and YV. + + // Not assigned in ISO, but legacy definitions in CLDR. + {"DD", "ZZ", false}, + {"YD", "ZZ", false}, + + // Normal mappings but somewhat special status in ccTLD. + {"BL", "BL", true}, + {"MF", "MF", true}, + {"BV", "BV", true}, + {"SJ", "SJ", true}, + + // Have values when normalized, but not as is. + {"QU", "ZZ", false}, + + // ISO Private Use. + {"AA", "ZZ", false}, + {"QM", "ZZ", false}, + {"QO", "ZZ", false}, + {"XA", "ZZ", false}, + {"XK", "ZZ", false}, // Sometimes used for Kosovo, but invalid ccTLD. + } { + if tt.in == "" { + continue + } + + r := MustParseRegion(tt.in) + var want Region + if tt.out != "ZZ" { + want = MustParseRegion(tt.out) + } + tld, err := r.TLD() + if got := err == nil; got != tt.ok { + t.Errorf("error(%v): got %v; want %v", r, got, tt.ok) + } + if tld != want { + t.Errorf("TLD(%v): got %v; want %v", r, tld, want) + } + } +} + +func TestCanonicalize(t *testing.T) { + // TODO: do a full test using CLDR data in a separate regression test. + tests := []struct { + in, out string + option CanonType + }{ + {"en-Latn", "en", SuppressScript}, + {"sr-Cyrl", "sr-Cyrl", SuppressScript}, + {"sh", "sr-Latn", Legacy}, + {"sh-HR", "sr-Latn-HR", Legacy}, + {"sh-Cyrl-HR", "sr-Cyrl-HR", Legacy}, + {"tl", "fil", Legacy}, + {"no", "no", Legacy}, + {"no", "nb", Legacy | CLDR}, + {"cmn", "cmn", Legacy}, + {"cmn", "zh", Macro}, + {"cmn-u-co-stroke", "zh-u-co-stroke", Macro}, + {"yue", "yue", Macro}, + {"nb", "no", Macro}, + {"nb", "nb", Macro | CLDR}, + {"no", "no", Macro}, + {"no", "no", Macro | CLDR}, + {"iw", "he", DeprecatedBase}, + {"iw", "he", Deprecated | CLDR}, + {"mo", "ro-MD", Deprecated}, // Adopted by CLDR as of version 25. + {"alb", "sq", Legacy}, // bibliographic + {"dut", "nl", Legacy}, // bibliographic + // As of CLDR 25, mo is no longer considered a legacy mapping. + {"mo", "mo", Legacy | CLDR}, + {"und-AN", "und-AN", Deprecated}, + {"und-YD", "und-YE", DeprecatedRegion}, + {"und-YD", "und-YD", DeprecatedBase}, + {"und-Qaai", "und-Zinh", DeprecatedScript}, + {"und-Qaai", "und-Qaai", DeprecatedBase}, + {"drh", "mn", All}, // drh -> khk -> mn + } + for i, tt := range tests { + in, _ := Raw.Parse(tt.in) + in, _ = tt.option.Canonicalize(in) + if in.String() != tt.out { + t.Errorf("%d:%s: was %s; want %s", i, tt.in, in.String(), tt.out) + } + if int(in.pVariant) > int(in.pExt) || int(in.pExt) > len(in.str) { + t.Errorf("%d:%s:offsets %d <= %d <= %d must be true", i, tt.in, in.pVariant, in.pExt, len(in.str)) + } + } + // Test idempotence. + for _, base := range Supported.BaseLanguages() { + tag, _ := Raw.Compose(base) + got, _ := All.Canonicalize(tag) + want, _ := All.Canonicalize(got) + if got != want { + t.Errorf("idem(%s): got %s; want %s", tag, got, want) + } + } +} + +func TestTypeForKey(t *testing.T) { + tests := []struct{ key, in, out string }{ + {"co", "en", ""}, + {"co", "en-u-abc", ""}, + {"co", "en-u-co-phonebk", "phonebk"}, + {"co", "en-u-co-phonebk-cu-aud", "phonebk"}, + {"co", "x-foo-u-co-phonebk", ""}, + {"nu", "en-u-co-phonebk-nu-arabic", "arabic"}, + {"kc", "cmn-u-co-stroke", ""}, + } + for _, tt := range tests { + if v := Make(tt.in).TypeForKey(tt.key); v != tt.out { + t.Errorf("%q[%q]: was %q; want %q", tt.in, tt.key, v, tt.out) + } + } +} + +func TestSetTypeForKey(t *testing.T) { + tests := []struct { + key, value, in, out string + err bool + }{ + // replace existing value + {"co", "pinyin", "en-u-co-phonebk", "en-u-co-pinyin", false}, + {"co", "pinyin", "en-u-co-phonebk-cu-xau", "en-u-co-pinyin-cu-xau", false}, + {"co", "pinyin", "en-u-co-phonebk-v-xx", "en-u-co-pinyin-v-xx", false}, + {"co", "pinyin", "en-u-co-phonebk-x-x", "en-u-co-pinyin-x-x", false}, + {"nu", "arabic", "en-u-co-phonebk-nu-vaai", "en-u-co-phonebk-nu-arabic", false}, + // add to existing -u extension + {"co", "pinyin", "en-u-ca-gregory", "en-u-ca-gregory-co-pinyin", false}, + {"co", "pinyin", "en-u-ca-gregory-nu-vaai", "en-u-ca-gregory-co-pinyin-nu-vaai", false}, + {"co", "pinyin", "en-u-ca-gregory-v-va", "en-u-ca-gregory-co-pinyin-v-va", false}, + {"co", "pinyin", "en-u-ca-gregory-x-a", "en-u-ca-gregory-co-pinyin-x-a", false}, + {"ca", "gregory", "en-u-co-pinyin", "en-u-ca-gregory-co-pinyin", false}, + // remove pair + {"co", "", "en-u-co-phonebk", "en", false}, + {"co", "", "en-u-ca-gregory-co-phonebk", "en-u-ca-gregory", false}, + {"co", "", "en-u-co-phonebk-nu-arabic", "en-u-nu-arabic", false}, + {"co", "", "en", "en", false}, + // add -u extension + {"co", "pinyin", "en", "en-u-co-pinyin", false}, + {"co", "pinyin", "und", "und-u-co-pinyin", false}, + {"co", "pinyin", "en-a-aaa", "en-a-aaa-u-co-pinyin", false}, + {"co", "pinyin", "en-x-aaa", "en-u-co-pinyin-x-aaa", false}, + {"co", "pinyin", "en-v-aa", "en-u-co-pinyin-v-aa", false}, + {"co", "pinyin", "en-a-aaa-x-x", "en-a-aaa-u-co-pinyin-x-x", false}, + {"co", "pinyin", "en-a-aaa-v-va", "en-a-aaa-u-co-pinyin-v-va", false}, + // error on invalid values + {"co", "pinyinxxx", "en", "en", true}, + {"co", "piny.n", "en", "en", true}, + {"co", "pinyinxxx", "en-a-aaa", "en-a-aaa", true}, + {"co", "pinyinxxx", "en-u-aaa", "en-u-aaa", true}, + {"co", "pinyinxxx", "en-u-aaa-co-pinyin", "en-u-aaa-co-pinyin", true}, + {"co", "pinyi.", "en-u-aaa-co-pinyin", "en-u-aaa-co-pinyin", true}, + {"col", "pinyin", "en", "en", true}, + {"co", "cu", "en", "en", true}, + // error when setting on a private use tag + {"co", "phonebook", "x-foo", "x-foo", true}, + } + for i, tt := range tests { + tag := Make(tt.in) + if v, err := tag.SetTypeForKey(tt.key, tt.value); v.String() != tt.out { + t.Errorf("%d:%q[%q]=%q: was %q; want %q", i, tt.in, tt.key, tt.value, v, tt.out) + } else if (err != nil) != tt.err { + t.Errorf("%d:%q[%q]=%q: error was %v; want %v", i, tt.in, tt.key, tt.value, err != nil, tt.err) + } else if val := v.TypeForKey(tt.key); err == nil && val != tt.value { + t.Errorf("%d:%q[%q]==%q: was %v; want %v", i, tt.out, tt.key, tt.value, val, tt.value) + } + if len(tag.String()) <= 3 { + // Simulate a tag for which the string has not been set. + tag.str, tag.pExt, tag.pVariant = "", 0, 0 + if tag, err := tag.SetTypeForKey(tt.key, tt.value); err == nil { + if val := tag.TypeForKey(tt.key); err == nil && val != tt.value { + t.Errorf("%d:%q[%q]==%q: was %v; want %v", i, tt.out, tt.key, tt.value, val, tt.value) + } + } + } + } +} + +func TestFindKeyAndType(t *testing.T) { + // out is either the matched type in case of a match or the original + // string up till the insertion point. + tests := []struct { + key string + hasExt bool + in, out string + }{ + // Don't search past a private use extension. + {"co", false, "en-x-foo-u-co-pinyin", "en"}, + {"co", false, "x-foo-u-co-pinyin", ""}, + {"co", false, "en-s-fff-x-foo", "en-s-fff"}, + // Insertion points in absence of -u extension. + {"cu", false, "en", ""}, // t.str is "" + {"cu", false, "en-v-va", "en"}, + {"cu", false, "en-a-va", "en-a-va"}, + {"cu", false, "en-a-va-v-va", "en-a-va"}, + {"cu", false, "en-x-a", "en"}, + // Tags with the -u extension. + {"co", true, "en-u-co-standard", "standard"}, + {"co", true, "yue-u-co-pinyin", "pinyin"}, + {"co", true, "en-u-co-abc", "abc"}, + {"co", true, "en-u-co-abc-def", "abc-def"}, + {"co", true, "en-u-co-abc-def-x-foo", "abc-def"}, + {"co", true, "en-u-co-standard-nu-arab", "standard"}, + {"co", true, "yue-u-co-pinyin-nu-arab", "pinyin"}, + // Insertion points. + {"cu", true, "en-u-co-standard", "en-u-co-standard"}, + {"cu", true, "yue-u-co-pinyin-x-foo", "yue-u-co-pinyin"}, + {"cu", true, "en-u-co-abc", "en-u-co-abc"}, + {"cu", true, "en-u-nu-arabic", "en-u"}, + {"cu", true, "en-u-co-abc-def-nu-arabic", "en-u-co-abc-def"}, + } + for i, tt := range tests { + start, end, hasExt := Make(tt.in).findTypeForKey(tt.key) + if start != end { + res := tt.in[start:end] + if res != tt.out { + t.Errorf("%d:%s: was %q; want %q", i, tt.in, res, tt.out) + } + } else { + if hasExt != tt.hasExt { + t.Errorf("%d:%s: hasExt was %v; want %v", i, tt.in, hasExt, tt.hasExt) + continue + } + if tt.in[:start] != tt.out { + t.Errorf("%d:%s: insertion point was %q; want %q", i, tt.in, tt.in[:start], tt.out) + } + } + } +} + +func TestParent(t *testing.T) { + tests := []struct{ in, out string }{ + // Strip variants and extensions first + {"de-u-co-phonebk", "de"}, + {"de-1994", "de"}, + {"de-Latn-1994", "de"}, // remove superfluous script. + + // Ensure the canonical Tag for an entry is in the chain for base-script + // pairs. + {"zh-Hans", "zh"}, + + // Skip the script if it is the maximized version. CLDR files for the + // skipped tag are always empty. + {"zh-Hans-TW", "zh"}, + {"zh-Hans-CN", "zh"}, + + // Insert the script if the maximized script is not the same as the + // maximized script of the base language. + {"zh-TW", "zh-Hant"}, + {"zh-HK", "zh-Hant"}, + {"zh-Hant-TW", "zh-Hant"}, + {"zh-Hant-HK", "zh-Hant"}, + + // Non-default script skips to und. + // CLDR + {"az-Cyrl", "und"}, + {"bs-Cyrl", "und"}, + {"en-Dsrt", "und"}, + {"ha-Arab", "und"}, + {"mn-Mong", "und"}, + {"pa-Arab", "und"}, + {"shi-Latn", "und"}, + {"sr-Latn", "und"}, + {"uz-Arab", "und"}, + {"uz-Cyrl", "und"}, + {"vai-Latn", "und"}, + {"zh-Hant", "und"}, + // extra + {"nl-Cyrl", "und"}, + + // World english inherits from en-001. + {"en-150", "en-001"}, + {"en-AU", "en-001"}, + {"en-BE", "en-001"}, + {"en-GG", "en-001"}, + {"en-GI", "en-001"}, + {"en-HK", "en-001"}, + {"en-IE", "en-001"}, + {"en-IM", "en-001"}, + {"en-IN", "en-001"}, + {"en-JE", "en-001"}, + {"en-MT", "en-001"}, + {"en-NZ", "en-001"}, + {"en-PK", "en-001"}, + {"en-SG", "en-001"}, + + // Spanish in Latin-American countries have es-419 as parent. + {"es-AR", "es-419"}, + {"es-BO", "es-419"}, + {"es-CL", "es-419"}, + {"es-CO", "es-419"}, + {"es-CR", "es-419"}, + {"es-CU", "es-419"}, + {"es-DO", "es-419"}, + {"es-EC", "es-419"}, + {"es-GT", "es-419"}, + {"es-HN", "es-419"}, + {"es-MX", "es-419"}, + {"es-NI", "es-419"}, + {"es-PA", "es-419"}, + {"es-PE", "es-419"}, + {"es-PR", "es-419"}, + {"es-PY", "es-419"}, + {"es-SV", "es-419"}, + {"es-US", "es-419"}, + {"es-UY", "es-419"}, + {"es-VE", "es-419"}, + // exceptions (according to CLDR) + {"es-CW", "es"}, + + // Inherit from pt-PT, instead of pt for these countries. + {"pt-AO", "pt-PT"}, + {"pt-CV", "pt-PT"}, + {"pt-GW", "pt-PT"}, + {"pt-MO", "pt-PT"}, + {"pt-MZ", "pt-PT"}, + {"pt-ST", "pt-PT"}, + {"pt-TL", "pt-PT"}, + } + for _, tt := range tests { + tag := Raw.MustParse(tt.in) + if p := Raw.MustParse(tt.out); p != tag.Parent() { + t.Errorf("%s: was %v; want %v", tt.in, tag.Parent(), p) + } + } +} + +var ( + // Tags without error that don't need to be changed. + benchBasic = []string{ + "en", + "en-Latn", + "en-GB", + "za", + "zh-Hant", + "zh", + "zh-HK", + "ar-MK", + "en-CA", + "fr-CA", + "fr-CH", + "fr", + "lv", + "he-IT", + "tlh", + "ja", + "ja-Jpan", + "ja-Jpan-JP", + "de-1996", + "de-CH", + "sr", + "sr-Latn", + } + // Tags with extensions, not changes required. + benchExt = []string{ + "x-a-b-c-d", + "x-aa-bbbb-cccccccc-d", + "en-x_cc-b-bbb-a-aaa", + "en-c_cc-b-bbb-a-aaa-x-x", + "en-u-co-phonebk", + "en-Cyrl-u-co-phonebk", + "en-US-u-co-phonebk-cu-xau", + "en-nedix-u-co-phonebk", + "en-t-t0-abcd", + "en-t-nl-latn", + "en-t-t0-abcd-x-a", + } + // Change, but not memory allocation required. + benchSimpleChange = []string{ + "EN", + "i-klingon", + "en-latn", + "zh-cmn-Hans-CN", + "iw-NL", + } + // Change and memory allocation required. + benchChangeAlloc = []string{ + "en-c_cc-b-bbb-a-aaa", + "en-u-cu-xua-co-phonebk", + "en-u-cu-xua-co-phonebk-a-cd", + "en-u-def-abc-cu-xua-co-phonebk", + "en-t-en-Cyrl-NL-1994", + "en-t-en-Cyrl-NL-1994-t0-abc-def", + } + // Tags that result in errors. + benchErr = []string{ + // IllFormed + "x_A.-B-C_D", + "en-u-cu-co-phonebk", + "en-u-cu-xau-co", + "en-t-nl-abcd", + // Invalid + "xx", + "nl-Uuuu", + "nl-QB", + } + benchChange = append(benchSimpleChange, benchChangeAlloc...) + benchAll = append(append(append(benchBasic, benchExt...), benchChange...), benchErr...) +) + +func doParse(b *testing.B, tag []string) { + for i := 0; i < b.N; i++ { + // Use the modulo instead of looping over all tags so that we get a somewhat + // meaningful ns/op. + Parse(tag[i%len(tag)]) + } +} + +func BenchmarkParse(b *testing.B) { + doParse(b, benchAll) +} + +func BenchmarkParseBasic(b *testing.B) { + doParse(b, benchBasic) +} + +func BenchmarkParseError(b *testing.B) { + doParse(b, benchErr) +} + +func BenchmarkParseSimpleChange(b *testing.B) { + doParse(b, benchSimpleChange) +} + +func BenchmarkParseChangeAlloc(b *testing.B) { + doParse(b, benchChangeAlloc) +} diff --git a/vendor/golang.org/x/text/language/lookup_test.go b/vendor/golang.org/x/text/language/lookup_test.go new file mode 100644 index 000000000..9833830c4 --- /dev/null +++ b/vendor/golang.org/x/text/language/lookup_test.go @@ -0,0 +1,457 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package language + +import ( + "testing" + + "golang.org/x/text/internal/tag" +) + +func b(s string) []byte { + return []byte(s) +} + +func TestLangID(t *testing.T) { + tests := []struct { + id, bcp47, iso3, norm string + err error + }{ + {id: "", bcp47: "und", iso3: "und", err: errSyntax}, + {id: " ", bcp47: "und", iso3: "und", err: errSyntax}, + {id: " ", bcp47: "und", iso3: "und", err: errSyntax}, + {id: " ", bcp47: "und", iso3: "und", err: errSyntax}, + {id: "xxx", bcp47: "und", iso3: "und", err: mkErrInvalid([]byte("xxx"))}, + {id: "und", bcp47: "und", iso3: "und"}, + {id: "aju", bcp47: "aju", iso3: "aju", norm: "jrb"}, + {id: "jrb", bcp47: "jrb", iso3: "jrb"}, + {id: "es", bcp47: "es", iso3: "spa"}, + {id: "spa", bcp47: "es", iso3: "spa"}, + {id: "ji", bcp47: "ji", iso3: "yid-", norm: "yi"}, + {id: "jw", bcp47: "jw", iso3: "jav-", norm: "jv"}, + {id: "ar", bcp47: "ar", iso3: "ara"}, + {id: "kw", bcp47: "kw", iso3: "cor"}, + {id: "arb", bcp47: "arb", iso3: "arb", norm: "ar"}, + {id: "ar", bcp47: "ar", iso3: "ara"}, + {id: "kur", bcp47: "ku", iso3: "kur"}, + {id: "nl", bcp47: "nl", iso3: "nld"}, + {id: "NL", bcp47: "nl", iso3: "nld"}, + {id: "gsw", bcp47: "gsw", iso3: "gsw"}, + {id: "gSW", bcp47: "gsw", iso3: "gsw"}, + {id: "und", bcp47: "und", iso3: "und"}, + {id: "sh", bcp47: "sh", iso3: "hbs", norm: "sr"}, + {id: "hbs", bcp47: "sh", iso3: "hbs", norm: "sr"}, + {id: "no", bcp47: "no", iso3: "nor", norm: "no"}, + {id: "nor", bcp47: "no", iso3: "nor", norm: "no"}, + {id: "cmn", bcp47: "cmn", iso3: "cmn", norm: "zh"}, + } + for i, tt := range tests { + want, err := getLangID(b(tt.id)) + if err != tt.err { + t.Errorf("%d:err(%s): found %q; want %q", i, tt.id, err, tt.err) + } + if err != nil { + continue + } + if id, _ := getLangISO2(b(tt.bcp47)); len(tt.bcp47) == 2 && want != id { + t.Errorf("%d:getISO2(%s): found %v; want %v", i, tt.bcp47, id, want) + } + if len(tt.iso3) == 3 { + if id, _ := getLangISO3(b(tt.iso3)); want != id { + t.Errorf("%d:getISO3(%s): found %q; want %q", i, tt.iso3, id, want) + } + if id, _ := getLangID(b(tt.iso3)); want != id { + t.Errorf("%d:getID3(%s): found %v; want %v", i, tt.iso3, id, want) + } + } + norm := want + if tt.norm != "" { + norm, _ = getLangID(b(tt.norm)) + } + id, _ := normLang(want) + if id != norm { + t.Errorf("%d:norm(%s): found %v; want %v", i, tt.id, id, norm) + } + if id := want.String(); tt.bcp47 != id { + t.Errorf("%d:String(): found %s; want %s", i, id, tt.bcp47) + } + if id := want.ISO3(); tt.iso3[:3] != id { + t.Errorf("%d:iso3(): found %s; want %s", i, id, tt.iso3[:3]) + } + } +} + +func TestGrandfathered(t *testing.T) { + for _, tt := range []struct{ in, out string }{ + {"art-lojban", "jbo"}, + {"i-ami", "ami"}, + {"i-bnn", "bnn"}, + {"i-hak", "hak"}, + {"i-klingon", "tlh"}, + {"i-lux", "lb"}, + {"i-navajo", "nv"}, + {"i-pwn", "pwn"}, + {"i-tao", "tao"}, + {"i-tay", "tay"}, + {"i-tsu", "tsu"}, + {"no-bok", "nb"}, + {"no-nyn", "nn"}, + {"sgn-BE-FR", "sfb"}, + {"sgn-BE-NL", "vgt"}, + {"sgn-CH-DE", "sgg"}, + {"sgn-ch-de", "sgg"}, + {"zh-guoyu", "cmn"}, + {"zh-hakka", "hak"}, + {"zh-min-nan", "nan"}, + {"zh-xiang", "hsn"}, + + // Grandfathered tags with no modern replacement will be converted as follows: + {"cel-gaulish", "xtg-x-cel-gaulish"}, + {"en-GB-oed", "en-GB-oxendict"}, + {"en-gb-oed", "en-GB-oxendict"}, + {"i-default", "en-x-i-default"}, + {"i-enochian", "und-x-i-enochian"}, + {"i-mingo", "see-x-i-mingo"}, + {"zh-min", "nan-x-zh-min"}, + + {"root", "und"}, + {"en_US_POSIX", "en-US-u-va-posix"}, + {"en_us_posix", "en-US-u-va-posix"}, + {"en-us-posix", "en-US-u-va-posix"}, + } { + got := Raw.Make(tt.in) + want := Raw.MustParse(tt.out) + if got != want { + t.Errorf("%s: got %q; want %q", tt.in, got, want) + } + } +} + +func TestRegionID(t *testing.T) { + tests := []struct { + in, out string + }{ + {"_ ", ""}, + {"_000", ""}, + {"419", "419"}, + {"AA", "AA"}, + {"ATF", "TF"}, + {"HV", "HV"}, + {"CT", "CT"}, + {"DY", "DY"}, + {"IC", "IC"}, + {"FQ", "FQ"}, + {"JT", "JT"}, + {"ZZ", "ZZ"}, + {"EU", "EU"}, + {"QO", "QO"}, + {"FX", "FX"}, + } + for i, tt := range tests { + if tt.in[0] == '_' { + id := tt.in[1:] + if _, err := getRegionID(b(id)); err == nil { + t.Errorf("%d:err(%s): found nil; want error", i, id) + } + continue + } + want, _ := getRegionID(b(tt.in)) + if s := want.String(); s != tt.out { + t.Errorf("%d:%s: found %q; want %q", i, tt.in, s, tt.out) + } + if len(tt.in) == 2 { + want, _ := getRegionISO2(b(tt.in)) + if s := want.String(); s != tt.out { + t.Errorf("%d:getISO2(%s): found %q; want %q", i, tt.in, s, tt.out) + } + } + } +} + +func TestRegionType(t *testing.T) { + for _, tt := range []struct { + r string + t byte + }{ + {"NL", bcp47Region | ccTLD}, + {"EU", bcp47Region | ccTLD}, // exceptionally reserved + {"AN", bcp47Region | ccTLD}, // transitionally reserved + + {"DD", bcp47Region}, // deleted in ISO, deprecated in BCP 47 + {"NT", bcp47Region}, // transitionally reserved, deprecated in BCP 47 + + {"XA", iso3166UserAssigned | bcp47Region}, + {"ZZ", iso3166UserAssigned | bcp47Region}, + {"AA", iso3166UserAssigned | bcp47Region}, + {"QO", iso3166UserAssigned | bcp47Region}, + {"QM", iso3166UserAssigned | bcp47Region}, + {"XK", iso3166UserAssigned | bcp47Region}, + + {"CT", 0}, // deleted in ISO, not in BCP 47, canonicalized in CLDR + } { + r := MustParseRegion(tt.r) + if tp := r.typ(); tp != tt.t { + t.Errorf("Type(%s): got %x; want %x", tt.r, tp, tt.t) + } + } +} + +func TestRegionISO3(t *testing.T) { + tests := []struct { + from, iso3, to string + }{ + {" ", "ZZZ", "ZZ"}, + {"000", "ZZZ", "ZZ"}, + {"AA", "AAA", ""}, + {"CT", "CTE", ""}, + {"DY", "DHY", ""}, + {"EU", "QUU", ""}, + {"HV", "HVO", ""}, + {"IC", "ZZZ", "ZZ"}, + {"JT", "JTN", ""}, + {"PZ", "PCZ", ""}, + {"QU", "QUU", "EU"}, + {"QO", "QOO", ""}, + {"YD", "YMD", ""}, + {"FQ", "ATF", "TF"}, + {"TF", "ATF", ""}, + {"FX", "FXX", ""}, + {"ZZ", "ZZZ", ""}, + {"419", "ZZZ", "ZZ"}, + } + for _, tt := range tests { + r, _ := getRegionID(b(tt.from)) + if s := r.ISO3(); s != tt.iso3 { + t.Errorf("iso3(%q): found %q; want %q", tt.from, s, tt.iso3) + } + if tt.iso3 == "" { + continue + } + want := tt.to + if tt.to == "" { + want = tt.from + } + r, _ = getRegionID(b(want)) + if id, _ := getRegionISO3(b(tt.iso3)); id != r { + t.Errorf("%s: found %q; want %q", tt.iso3, id, want) + } + } +} + +func TestRegionM49(t *testing.T) { + fromTests := []struct { + m49 int + id string + }{ + {0, ""}, + {-1, ""}, + {1000, ""}, + {10000, ""}, + + {001, "001"}, + {104, "MM"}, + {180, "CD"}, + {230, "ET"}, + {231, "ET"}, + {249, "FX"}, + {250, "FR"}, + {276, "DE"}, + {278, "DD"}, + {280, "DE"}, + {419, "419"}, + {626, "TL"}, + {736, "SD"}, + {840, "US"}, + {854, "BF"}, + {891, "CS"}, + {899, ""}, + {958, "AA"}, + {966, "QT"}, + {967, "EU"}, + {999, "ZZ"}, + } + for _, tt := range fromTests { + id, err := getRegionM49(tt.m49) + if want, have := err != nil, tt.id == ""; want != have { + t.Errorf("error(%d): have %v; want %v", tt.m49, have, want) + continue + } + r, _ := getRegionID(b(tt.id)) + if r != id { + t.Errorf("region(%d): have %s; want %s", tt.m49, id, r) + } + } + + toTests := []struct { + m49 int + id string + }{ + {0, "000"}, + {0, "IC"}, // Some codes don't have an ID + + {001, "001"}, + {104, "MM"}, + {104, "BU"}, + {180, "CD"}, + {180, "ZR"}, + {231, "ET"}, + {250, "FR"}, + {249, "FX"}, + {276, "DE"}, + {278, "DD"}, + {419, "419"}, + {626, "TL"}, + {626, "TP"}, + {729, "SD"}, + {826, "GB"}, + {840, "US"}, + {854, "BF"}, + {891, "YU"}, + {891, "CS"}, + {958, "AA"}, + {966, "QT"}, + {967, "EU"}, + {967, "QU"}, + {999, "ZZ"}, + // For codes that don't have an M49 code use the replacement value, + // if available. + {854, "HV"}, // maps to Burkino Faso + } + for _, tt := range toTests { + r, _ := getRegionID(b(tt.id)) + if r.M49() != tt.m49 { + t.Errorf("m49(%q): have %d; want %d", tt.id, r.M49(), tt.m49) + } + } +} + +func TestRegionDeprecation(t *testing.T) { + tests := []struct{ in, out string }{ + {"BU", "MM"}, + {"BUR", "MM"}, + {"CT", "KI"}, + {"DD", "DE"}, + {"DDR", "DE"}, + {"DY", "BJ"}, + {"FX", "FR"}, + {"HV", "BF"}, + {"JT", "UM"}, + {"MI", "UM"}, + {"NH", "VU"}, + {"NQ", "AQ"}, + {"PU", "UM"}, + {"PZ", "PA"}, + {"QU", "EU"}, + {"RH", "ZW"}, + {"TP", "TL"}, + {"UK", "GB"}, + {"VD", "VN"}, + {"WK", "UM"}, + {"YD", "YE"}, + {"NL", "NL"}, + } + for _, tt := range tests { + rIn, _ := getRegionID([]byte(tt.in)) + rOut, _ := getRegionISO2([]byte(tt.out)) + r := normRegion(rIn) + if rOut == rIn && r != 0 { + t.Errorf("%s: was %q; want %q", tt.in, r, tt.in) + } + if rOut != rIn && r != rOut { + t.Errorf("%s: was %q; want %q", tt.in, r, tt.out) + } + + } +} + +func TestGetScriptID(t *testing.T) { + idx := tag.Index("0000BbbbDdddEeeeZzzz\xff\xff\xff\xff") + tests := []struct { + in string + out scriptID + }{ + {" ", 0}, + {" ", 0}, + {" ", 0}, + {"", 0}, + {"Aaaa", 0}, + {"Bbbb", 1}, + {"Dddd", 2}, + {"dddd", 2}, + {"dDDD", 2}, + {"Eeee", 3}, + {"Zzzz", 4}, + } + for i, tt := range tests { + if id, err := getScriptID(idx, b(tt.in)); id != tt.out { + t.Errorf("%d:%s: found %d; want %d", i, tt.in, id, tt.out) + } else if id == 0 && err == nil { + t.Errorf("%d:%s: no error; expected one", i, tt.in) + } + } +} + +func TestIsPrivateUse(t *testing.T) { + type test struct { + s string + private bool + } + tests := []test{ + {"en", false}, + {"und", false}, + {"pzn", false}, + {"qaa", true}, + {"qtz", true}, + {"qua", false}, + } + for i, tt := range tests { + x, _ := getLangID([]byte(tt.s)) + if b := x.IsPrivateUse(); b != tt.private { + t.Errorf("%d: langID.IsPrivateUse(%s) was %v; want %v", i, tt.s, b, tt.private) + } + } + tests = []test{ + {"001", false}, + {"419", false}, + {"899", false}, + {"900", false}, + {"957", false}, + {"958", true}, + {"AA", true}, + {"AC", false}, + {"EU", false}, // CLDR grouping, exceptionally reserved in ISO. + {"QU", true}, // Canonicalizes to EU, User-assigned in ISO. + {"QO", true}, // CLDR grouping, User-assigned in ISO. + {"QA", false}, + {"QM", true}, + {"QZ", true}, + {"XA", true}, + {"XK", true}, // Assigned to Kosovo in CLDR, User-assigned in ISO. + {"XZ", true}, + {"ZW", false}, + {"ZZ", true}, + } + for i, tt := range tests { + x, _ := getRegionID([]byte(tt.s)) + if b := x.IsPrivateUse(); b != tt.private { + t.Errorf("%d: regionID.IsPrivateUse(%s) was %v; want %v", i, tt.s, b, tt.private) + } + } + tests = []test{ + {"Latn", false}, + {"Laaa", false}, // invalid + {"Qaaa", true}, + {"Qabx", true}, + {"Qaby", false}, + {"Zyyy", false}, + {"Zzzz", false}, + } + for i, tt := range tests { + x, _ := getScriptID(script, []byte(tt.s)) + if b := x.IsPrivateUse(); b != tt.private { + t.Errorf("%d: scriptID.IsPrivateUse(%s) was %v; want %v", i, tt.s, b, tt.private) + } + } +} diff --git a/vendor/golang.org/x/text/language/match.go b/vendor/golang.org/x/text/language/match.go index 63bc744a3..15b74d125 100644 --- a/vendor/golang.org/x/text/language/match.go +++ b/vendor/golang.org/x/text/language/match.go @@ -16,6 +16,29 @@ func PreferSameScript(preferSame bool) MatchOption { return func(m *matcher) { m.preferSameScript = preferSame } } +// TODO(v1.0.0): consider making Matcher a concrete type, instead of interface. +// There doesn't seem to be too much need for multiple types. +// Making it a concrete type allows MatchStrings to be a method, which will +// improve its discoverability. + +// MatchStrings parses and matches the given strings until one of them matches +// the language in the Matcher. A string may be an Accept-Language header as +// handled by ParseAcceptLanguage. The default language is returned if no +// other language matched. +func MatchStrings(m Matcher, lang ...string) (tag Tag, index int) { + for _, accept := range lang { + desired, _, err := ParseAcceptLanguage(accept) + if err != nil { + continue + } + if tag, index, conf := m.Match(desired...); conf != No { + return tag, index + } + } + tag, index, _ = m.Match() + return +} + // Matcher is the interface that wraps the Match method. // // Match returns the best match for any of the given tags, along with @@ -83,9 +106,8 @@ func (m *matcher) Match(want ...Tag) (t Tag, index int, c Confidence) { // to do after the fact, so we do it here. // TODO: add in alternative variants to -u-va-. // TODO: add preferred region to -u-rg-. - // TODO: add other extensions. Merge with existing extensions. - if u, ok := w.Extension('u'); ok { - t, _ = Raw.Compose(t, u) + if e := w.Extensions(); len(e) > 0 { + t, _ = Raw.Compose(t, e) } return t, index, c } @@ -122,7 +144,7 @@ var ErrMissingLikelyTagsData = errors.New("missing likely tags data") // addLikelySubtags sets subtags to their most likely value, given the locale. // In most cases this means setting fields for unknown values, but in some -// cases it may alter a value. It returns a ErrMissingLikelyTagsData error +// cases it may alter a value. It returns an ErrMissingLikelyTagsData error // if the given locale cannot be expanded. func (t Tag) addLikelySubtags() (Tag, error) { id, err := addTags(t) @@ -331,8 +353,9 @@ func minimizeTags(t Tag) (Tag, error) { // 1) compute the match between the two tags. // 2) if the match is better than the previous best match, replace it // with the new match. (see next section) -// b) if the current best match is above a certain threshold, return this -// match without proceeding to the next tag in "desired". [See Note 1] +// b) if the current best match is Exact and pin is true the result will be +// frozen to the language found thusfar, although better matches may +// still be found for the same language. // 3) If the best match so far is below a certain threshold, return "default". // // Ranking: @@ -381,9 +404,6 @@ func minimizeTags(t Tag) (Tag, error) { // found wins. // // Notes: -// [1] Note that even if we may not have a perfect match, if a match is above a -// certain threshold, it is considered a better match than any other match -// to a tag later in the list of preferred language tags. // [2] In practice, as matching of Exact is done in a separate phase from // matching the other levels, we reuse the Exact level to mean MaxExact in // the second phase. As a consequence, we only need the levels defined by @@ -429,8 +449,8 @@ type matcher struct { // matchHeader has the lists of tags for exact matches and matches based on // maximized and canonicalized tags for a given language. type matchHeader struct { - exact []*haveTag - max []*haveTag + haveTags []*haveTag + original bool } // haveTag holds a supported Tag and its maximized script and region. The maximized @@ -460,7 +480,7 @@ type haveTag struct { func makeHaveTag(tag Tag, index int) (haveTag, langID) { max := tag - if tag.lang != 0 { + if tag.lang != 0 || tag.region != 0 || tag.script != 0 { max, _ = max.canonicalize(All) max, _ = addTags(max) max.remakeString() @@ -485,29 +505,27 @@ func altScript(l langID, s scriptID) scriptID { // addIfNew adds a haveTag to the list of tags only if it is a unique tag. // Tags that have the same maximized values are linked by index. func (h *matchHeader) addIfNew(n haveTag, exact bool) { + h.original = h.original || exact // Don't add new exact matches. - for _, v := range h.exact { + for _, v := range h.haveTags { if v.tag.equalsRest(n.tag) { return } } - if exact { - h.exact = append(h.exact, &n) - } // Allow duplicate maximized tags, but create a linked list to allow quickly // comparing the equivalents and bail out. - for i, v := range h.max { + for i, v := range h.haveTags { if v.maxScript == n.maxScript && v.maxRegion == n.maxRegion && v.tag.variantOrPrivateTagStr() == n.tag.variantOrPrivateTagStr() { - for h.max[i].nextMax != 0 { - i = int(h.max[i].nextMax) + for h.haveTags[i].nextMax != 0 { + i = int(h.haveTags[i].nextMax) } - h.max[i].nextMax = uint16(len(h.max)) + h.haveTags[i].nextMax = uint16(len(h.haveTags)) break } } - h.max = append(h.max, &n) + h.haveTags = append(h.haveTags, &n) } // header returns the matchHeader for the given language. It creates one if @@ -553,27 +571,26 @@ func newMatcher(supported []Tag, options []MatchOption) *matcher { m.header(tag.lang).addIfNew(pair, true) m.supported = append(m.supported, &pair) } - m.default_ = m.header(supported[0].lang).exact[0] + m.default_ = m.header(supported[0].lang).haveTags[0] + // Keep these in two different loops to support the case that two equivalent + // languages are distinguished, such as iw and he. for i, tag := range supported { pair, max := makeHaveTag(tag, i) if max != tag.lang { - m.header(max).addIfNew(pair, false) + m.header(max).addIfNew(pair, true) } } - // TODO: include alt script. - // - don't replace regions, but allow regions to be made more specific. - // update is used to add indexes in the map for equivalent languages. - // If force is true, the update will also apply to derived entries. To - // avoid applying a "transitive closure", use false. - update := func(want, have uint16, conf Confidence, force bool) { + // update will only add entries to original indexes, thus not computing any + // transitive relations. + update := func(want, have uint16, conf Confidence) { if hh := m.index[langID(have)]; hh != nil { - if !force && len(hh.exact) == 0 { + if !hh.original { return } hw := m.header(langID(want)) - for _, ht := range hh.max { + for _, ht := range hh.haveTags { v := *ht if conf < v.conf { v.conf = conf @@ -582,7 +599,7 @@ func newMatcher(supported []Tag, options []MatchOption) *matcher { if v.altScript != 0 { v.altScript = altScript(langID(want), v.maxScript) } - hw.addIfNew(v, conf == Exact && len(hh.exact) > 0) + hw.addIfNew(v, conf == Exact && hh.original) } } } @@ -590,9 +607,9 @@ func newMatcher(supported []Tag, options []MatchOption) *matcher { // Add entries for languages with mutual intelligibility as defined by CLDR's // languageMatch data. for _, ml := range matchLang { - update(ml.want, ml.have, toConf(ml.distance), false) + update(ml.want, ml.have, toConf(ml.distance)) if !ml.oneway { - update(ml.have, ml.want, toConf(ml.distance), false) + update(ml.have, ml.want, toConf(ml.distance)) } } @@ -602,10 +619,6 @@ func newMatcher(supported []Tag, options []MatchOption) *matcher { // (their canonicalization simply substitutes a different language code, but // nothing else), the match confidence is Exact, otherwise it is High. for i, lm := range langAliasMap { - if lm.from == _sh { - continue - } - // If deprecated codes match and there is no fiddling with the script or // or region, we consider it an exact match. conf := Exact @@ -613,9 +626,9 @@ func newMatcher(supported []Tag, options []MatchOption) *matcher { if !isExactEquivalent(langID(lm.from)) { conf = High } - update(lm.to, lm.from, conf, true) + update(lm.to, lm.from, conf) } - update(lm.from, lm.to, conf, true) + update(lm.from, lm.to, conf) } return m } @@ -624,28 +637,29 @@ func newMatcher(supported []Tag, options []MatchOption) *matcher { // account the order of preference of the given tags. func (m *matcher) getBest(want ...Tag) (got *haveTag, orig Tag, c Confidence) { best := bestMatch{} - for _, w := range want { + for i, w := range want { var max Tag // Check for exact match first. h := m.index[w.lang] if w.lang != 0 { - // Base language is defined. if h == nil { continue } - for i := range h.exact { - have := h.exact[i] - if have.tag.equalsRest(w) { - return have, w, Exact - } + // Base language is defined. + max, _ = w.canonicalize(Legacy | Deprecated | Macro) + // A region that is added through canonicalization is stronger than + // a maximized region: set it in the original (e.g. mo -> ro-MD). + if w.region != max.region { + w.region = max.region } - max, _ = w.canonicalize(Legacy | Deprecated) + // TODO: should we do the same for scripts? + // See test case: en, sr, nl ; sh ; sr max, _ = addTags(max) } else { // Base language is not defined. if h != nil { - for i := range h.exact { - have := h.exact[i] + for i := range h.haveTags { + have := h.haveTags[i] if have.tag.equalsRest(w) { return have, w, Exact } @@ -661,16 +675,23 @@ func (m *matcher) getBest(want ...Tag) (got *haveTag, orig Tag, c Confidence) { continue } } + pin := true + for _, t := range want[i+1:] { + if w.lang == t.lang { + pin = false + break + } + } // Check for match based on maximized tag. - for i := range h.max { - have := h.max[i] - best.update(have, w, max.script, max.region) + for i := range h.haveTags { + have := h.haveTags[i] + best.update(have, w, max.script, max.region, pin) if best.conf == Exact { for have.nextMax != 0 { - have = h.max[have.nextMax] - best.update(have, w, max.script, max.region) + have = h.haveTags[have.nextMax] + best.update(have, w, max.script, max.region, pin) } - return best.have, best.want, High + return best.have, best.want, best.conf } } } @@ -685,43 +706,68 @@ func (m *matcher) getBest(want ...Tag) (got *haveTag, orig Tag, c Confidence) { // bestMatch accumulates the best match so far. type bestMatch struct { - have *haveTag - want Tag - conf Confidence + have *haveTag + want Tag + conf Confidence + pinnedRegion regionID + pinLanguage bool + sameRegionGroup bool // Cached results from applying tie-breaking rules. origLang bool origReg bool + paradigmReg bool regGroupDist uint8 - regDist uint8 origScript bool - parentDist uint8 // 255 if have is not an ancestor of want tag. } // update updates the existing best match if the new pair is considered to be a -// better match. -// To determine if the given pair is a better match, it first computes the rough -// confidence level. If this surpasses the current match, it will replace it and -// update the tie-breaker rule cache. If there is a tie, it proceeds with applying -// a series of tie-breaker rules. If there is no conclusive winner after applying -// the tie-breaker rules, it leaves the current match as the preferred match. -func (m *bestMatch) update(have *haveTag, tag Tag, maxScript scriptID, maxRegion regionID) { +// better match. To determine if the given pair is a better match, it first +// computes the rough confidence level. If this surpasses the current match, it +// will replace it and update the tie-breaker rule cache. If there is a tie, it +// proceeds with applying a series of tie-breaker rules. If there is no +// conclusive winner after applying the tie-breaker rules, it leaves the current +// match as the preferred match. +// +// If pin is true and have and tag are a strong match, it will henceforth only +// consider matches for this language. This corresponds to the nothing that most +// users have a strong preference for the first defined language. A user can +// still prefer a second language over a dialect of the preferred language by +// explicitly specifying dialects, e.g. "en, nl, en-GB". In this case pin should +// be false. +func (m *bestMatch) update(have *haveTag, tag Tag, maxScript scriptID, maxRegion regionID, pin bool) { // Bail if the maximum attainable confidence is below that of the current best match. c := have.conf if c < m.conf { return } - if have.maxScript != maxScript { + // Don't change the language once we already have found an exact match. + if m.pinLanguage && tag.lang != m.want.lang { + return + } + // Pin the region group if we are comparing tags for the same language. + if tag.lang == m.want.lang && m.sameRegionGroup { + _, sameGroup := regionGroupDist(m.pinnedRegion, have.maxRegion, have.maxScript, m.want.lang) + if !sameGroup { + return + } + } + if c == Exact && have.maxScript == maxScript { + // If there is another language and then another entry of this language, + // don't pin anything, otherwise pin the language. + m.pinLanguage = pin + } + if have.tag.equalsRest(tag) { + } else if have.maxScript != maxScript { // There is usually very little comprehension between different scripts. - // In a few cases there may still be Low comprehension. This possibility is - // pre-computed and stored in have.altScript. + // In a few cases there may still be Low comprehension. This possibility + // is pre-computed and stored in have.altScript. if Low < m.conf || have.altScript != maxScript { return } c = Low } else if have.maxRegion != maxRegion { - // There is usually a small difference between languages across regions. - // We use the region distance (below) to disambiguate between equal matches. if High < c { + // There is usually a small difference between languages across regions. c = High } } @@ -748,14 +794,6 @@ func (m *bestMatch) update(have *haveTag, tag Tag, maxScript scriptID, maxRegion beaten = true } - regGroupDist := regionGroupDist(have.maxRegion, maxRegion, maxScript, tag.lang) - if !beaten && m.regGroupDist != regGroupDist { - if regGroupDist > m.regGroupDist { - return - } - beaten = true - } - // We prefer if the pre-maximized region was specified and identical. origReg := have.tag.region == tag.region && tag.region != 0 if !beaten && m.origReg != origReg { @@ -765,24 +803,17 @@ func (m *bestMatch) update(have *haveTag, tag Tag, maxScript scriptID, maxRegion beaten = true } - // TODO: remove the region distance rule. Region distance has been replaced - // by the region grouping rule. For now we leave it as it still seems to - // have a net positive effect when applied after the grouping rule. - // Possible solutions: - // - apply the primary locale rule first to effectively disable region - // region distance if groups are defined. - // - express the following errors in terms of grouping (if possible) - // - find another method of handling the following cases. - // maximization of legacy: find mo in - // "sr-Cyrl, sr-Latn, ro, ro-MD": have ro; want ro-MD (High) - // region distance French: find fr-US in - // "en, fr, fr-CA, fr-CH": have fr; want fr-CA (High) + regGroupDist, sameGroup := regionGroupDist(have.maxRegion, maxRegion, maxScript, tag.lang) + if !beaten && m.regGroupDist != regGroupDist { + if regGroupDist > m.regGroupDist { + return + } + beaten = true + } - // Next we prefer smaller distances between regions, as defined by - // regionDist. - regDist := uint8(regionDistance(have.maxRegion, maxRegion)) - if !beaten && m.regDist != regDist { - if regDist > m.regDist { + paradigmReg := isParadigmLocale(tag.lang, have.maxRegion) + if !beaten && m.paradigmReg != paradigmReg { + if !paradigmReg { return } beaten = true @@ -797,52 +828,35 @@ func (m *bestMatch) update(have *haveTag, tag Tag, maxScript scriptID, maxRegion beaten = true } - // Finally we prefer tags which have a closer parent relationship. - // TODO: the parent relationship no longer seems necessary. It doesn't hurt - // to leave it in as the final tie-breaker, though, especially until the - // grouping data has further matured. - parentDist := parentDistance(have.tag.region, tag) - if !beaten && m.parentDist != parentDist { - if parentDist > m.parentDist { - return - } - beaten = true - } - // Update m to the newly found best match. if beaten { m.have = have m.want = tag m.conf = c + m.pinnedRegion = maxRegion + m.sameRegionGroup = sameGroup m.origLang = origLang m.origReg = origReg + m.paradigmReg = paradigmReg m.origScript = origScript m.regGroupDist = regGroupDist - m.regDist = regDist - m.parentDist = parentDist } } -// parentDistance returns the number of times Parent must be called before the -// regions match. It is assumed that it has already been checked that lang and -// script are identical. If haveRegion does not occur in the ancestor chain of -// tag, it returns 255. -func parentDistance(haveRegion regionID, tag Tag) uint8 { - p := tag.Parent() - d := uint8(1) - for haveRegion != p.region { - if p.region == 0 { - return 255 +func isParadigmLocale(lang langID, r regionID) bool { + for _, e := range paradigmLocales { + if langID(e[0]) == lang && (r == regionID(e[1]) || r == regionID(e[2])) { + return true } - p = p.Parent() - d++ } - return d + return false } // regionGroupDist computes the distance between two regions based on their // CLDR grouping. -func regionGroupDist(a, b regionID, script scriptID, lang langID) uint8 { +func regionGroupDist(a, b regionID, script scriptID, lang langID) (dist uint8, same bool) { + const defaultDistance = 4 + aGroup := uint(regionToGroups[a]) << 1 bGroup := uint(regionToGroups[b]) << 1 for _, ri := range matchRegion { @@ -850,40 +864,16 @@ func regionGroupDist(a, b regionID, script scriptID, lang langID) uint8 { group := uint(1 << (ri.group &^ 0x80)) if 0x80&ri.group == 0 { if aGroup&bGroup&group != 0 { // Both regions are in the group. - return ri.distance + return ri.distance, ri.distance == defaultDistance } } else { if (aGroup|bGroup)&group == 0 { // Both regions are not in the group. - return ri.distance + return ri.distance, ri.distance == defaultDistance } } } } - const defaultDistance = 4 - return defaultDistance -} - -// regionDistance computes the distance between two regions based on the -// distance in the graph of region containments as defined in CLDR. It iterates -// over increasingly inclusive sets of groups, represented as bit vectors, until -// the source bit vector has bits in common with the destination vector. -func regionDistance(a, b regionID) int { - if a == b { - return 0 - } - p, q := regionInclusion[a], regionInclusion[b] - if p < nRegionGroups { - p, q = q, p - } - set := regionInclusionBits - if q < nRegionGroups && set[p]&(1<<q) != 0 { - return 1 - } - d := 2 - for goal := set[q]; set[p]&goal == 0; p = regionInclusionNext[p] { - d++ - } - return d + return defaultDistance, true } func (t Tag) variants() string { @@ -930,4 +920,14 @@ func init() { notEquivalent = append(notEquivalent, langID(lm.from)) } } + // Maximize undefined regions of paradigm locales. + for i, v := range paradigmLocales { + max, _ := addTags(Tag{lang: langID(v[0])}) + if v[1] == 0 { + paradigmLocales[i][1] = uint16(max.region) + } + if v[2] == 0 { + paradigmLocales[i][2] = uint16(max.region) + } + } } diff --git a/vendor/golang.org/x/text/language/match_test.go b/vendor/golang.org/x/text/language/match_test.go new file mode 100644 index 000000000..8b60b07a3 --- /dev/null +++ b/vendor/golang.org/x/text/language/match_test.go @@ -0,0 +1,505 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package language + +import ( + "bytes" + "flag" + "fmt" + "os" + "path" + "path/filepath" + "strings" + "testing" + + "golang.org/x/text/internal/testtext" + "golang.org/x/text/internal/ucd" +) + +var verbose = flag.Bool("verbose", false, "set to true to print the internal tables of matchers") + +func TestCompliance(t *testing.T) { + filepath.Walk("testdata", func(file string, info os.FileInfo, err error) error { + if info.IsDir() { + return nil + } + r, err := os.Open(file) + if err != nil { + t.Fatal(err) + } + ucd.Parse(r, func(p *ucd.Parser) { + name := strings.Replace(path.Join(p.String(0), p.String(1)), " ", "", -1) + if skip[name] { + return + } + t.Run(info.Name()+"/"+name, func(t *testing.T) { + supported := makeTagList(p.String(0)) + desired := makeTagList(p.String(1)) + gotCombined, index, conf := NewMatcher(supported).Match(desired...) + + gotMatch := supported[index] + wantMatch := mk(p.String(2)) + if gotMatch != wantMatch { + t.Fatalf("match: got %q; want %q (%v)", gotMatch, wantMatch, conf) + } + wantCombined, err := Raw.Parse(p.String(3)) + if err == nil && gotCombined != wantCombined { + t.Errorf("combined: got %q; want %q (%v)", gotCombined, wantCombined, conf) + } + }) + }) + return nil + }) +} + +var skip = map[string]bool{ + // TODO: bugs + // Honor the wildcard match. This may only be useful to select non-exact + // stuff. + "mul,af/nl": true, // match: got "af"; want "mul" + + // TODO: include other extensions. + // combined: got "en-GB-u-ca-buddhist-nu-arab"; want "en-GB-fonipa-t-m0-iso-i0-pinyin-u-ca-buddhist-nu-arab" + "und,en-GB-u-sd-gbsct/en-fonipa-u-nu-Arab-ca-buddhist-t-m0-iso-i0-pinyin": true, + + // Inconsistencies with Mark Davis' implementation where it is not clear + // which is better. + + // Inconsistencies in combined. I think the Go approach is more appropriate. + // We could use -u-rg- and -u-va- as alternative. + "und,fr/fr-BE-fonipa": true, // combined: got "fr"; want "fr-BE-fonipa" + "und,fr-CA/fr-BE-fonipa": true, // combined: got "fr-CA"; want "fr-BE-fonipa" + "und,fr-fonupa/fr-BE-fonipa": true, // combined: got "fr-fonupa"; want "fr-BE-fonipa" + "und,no/nn-BE-fonipa": true, // combined: got "no"; want "no-BE-fonipa" + "50,und,fr-CA-fonupa/fr-BE-fonipa": true, // combined: got "fr-CA-fonupa"; want "fr-BE-fonipa" + + // The initial number is a threshold. As we don't use scoring, we will not + // implement this. + "50,und,fr-Cyrl-CA-fonupa/fr-BE-fonipa": true, + // match: got "und"; want "fr-Cyrl-CA-fonupa" + // combined: got "und"; want "fr-Cyrl-BE-fonipa" + + // Other interesting cases to test: + // - Should same language or same script have the preference if there is + // usually no understanding of the other script? + // - More specific region in desired may replace enclosing supported. +} + +func makeTagList(s string) (tags []Tag) { + for _, s := range strings.Split(s, ",") { + tags = append(tags, mk(strings.TrimSpace(s))) + } + return tags +} + +func TestMatchStrings(t *testing.T) { + testCases := []struct { + supported string + desired string // strings separted by | + tag string + index int + }{{ + supported: "en", + desired: "", + tag: "en", + index: 0, + }, { + supported: "en", + desired: "nl", + tag: "en", + index: 0, + }, { + supported: "en,nl", + desired: "nl", + tag: "nl", + index: 1, + }, { + supported: "en,nl", + desired: "nl|en", + tag: "nl", + index: 1, + }, { + supported: "en-GB,nl", + desired: "en ; q=0.1,nl", + tag: "nl", + index: 1, + }, { + supported: "en-GB,nl", + desired: "en;q=0.005 | dk; q=0.1,nl ", + tag: "en-GB", + index: 0, + }, { + // do not match faulty tags with und + supported: "en,und", + desired: "|en", + tag: "en", + index: 0, + }} + for _, tc := range testCases { + t.Run(path.Join(tc.supported, tc.desired), func(t *testing.T) { + m := NewMatcher(makeTagList(tc.supported)) + tag, index := MatchStrings(m, strings.Split(tc.desired, "|")...) + if tag.String() != tc.tag || index != tc.index { + t.Errorf("got %v, %d; want %v, %d", tag, index, tc.tag, tc.index) + } + }) + } +} + +func TestAddLikelySubtags(t *testing.T) { + tests := []struct{ in, out string }{ + {"aa", "aa-Latn-ET"}, + {"aa-Latn", "aa-Latn-ET"}, + {"aa-Arab", "aa-Arab-ET"}, + {"aa-Arab-ER", "aa-Arab-ER"}, + {"kk", "kk-Cyrl-KZ"}, + {"kk-CN", "kk-Arab-CN"}, + {"cmn", "cmn"}, + {"zh-AU", "zh-Hant-AU"}, + {"zh-VN", "zh-Hant-VN"}, + {"zh-SG", "zh-Hans-SG"}, + {"zh-Hant", "zh-Hant-TW"}, + {"zh-Hani", "zh-Hani-CN"}, + {"und-Hani", "zh-Hani-CN"}, + {"und", "en-Latn-US"}, + {"und-GB", "en-Latn-GB"}, + {"und-CW", "pap-Latn-CW"}, + {"und-YT", "fr-Latn-YT"}, + {"und-Arab", "ar-Arab-EG"}, + {"und-AM", "hy-Armn-AM"}, + {"und-TW", "zh-Hant-TW"}, + {"und-002", "en-Latn-NG"}, + {"und-Latn-002", "en-Latn-NG"}, + {"en-Latn-002", "en-Latn-NG"}, + {"en-002", "en-Latn-NG"}, + {"en-001", "en-Latn-US"}, + {"und-003", "en-Latn-US"}, + {"und-GB", "en-Latn-GB"}, + {"Latn-001", "en-Latn-US"}, + {"en-001", "en-Latn-US"}, + {"es-419", "es-Latn-419"}, + {"he-145", "he-Hebr-IL"}, + {"ky-145", "ky-Latn-TR"}, + {"kk", "kk-Cyrl-KZ"}, + // Don't specialize duplicate and ambiguous matches. + {"kk-034", "kk-Arab-034"}, // Matches IR and AF. Both are Arab. + {"ku-145", "ku-Latn-TR"}, // Matches IQ, TR, and LB, but kk -> TR. + {"und-Arab-CC", "ms-Arab-CC"}, + {"und-Arab-GB", "ks-Arab-GB"}, + {"und-Hans-CC", "zh-Hans-CC"}, + {"und-CC", "en-Latn-CC"}, + {"sr", "sr-Cyrl-RS"}, + {"sr-151", "sr-Latn-151"}, // Matches RO and RU. + // We would like addLikelySubtags to generate the same results if the input + // only changes by adding tags that would otherwise have been added + // by the expansion. + // In other words: + // und-AA -> xx-Scrp-AA implies und-Scrp-AA -> xx-Scrp-AA + // und-AA -> xx-Scrp-AA implies xx-AA -> xx-Scrp-AA + // und-Scrp -> xx-Scrp-AA implies und-Scrp-AA -> xx-Scrp-AA + // und-Scrp -> xx-Scrp-AA implies xx-Scrp -> xx-Scrp-AA + // xx -> xx-Scrp-AA implies xx-Scrp -> xx-Scrp-AA + // xx -> xx-Scrp-AA implies xx-AA -> xx-Scrp-AA + // + // The algorithm specified in + // http://unicode.org/reports/tr35/tr35-9.html#Supplemental_Data, + // Section C.10, does not handle the first case. For example, + // the CLDR data contains an entry und-BJ -> fr-Latn-BJ, but not + // there is no rule for und-Latn-BJ. According to spec, und-Latn-BJ + // would expand to en-Latn-BJ, violating the aforementioned principle. + // We deviate from the spec by letting und-Scrp-AA expand to xx-Scrp-AA + // if a rule of the form und-AA -> xx-Scrp-AA is defined. + // Note that as of version 23, CLDR has some explicitly specified + // entries that do not conform to these rules. The implementation + // will not correct these explicit inconsistencies. A later versions of CLDR + // is supposed to fix this. + {"und-Latn-BJ", "fr-Latn-BJ"}, + {"und-Bugi-ID", "bug-Bugi-ID"}, + // regions, scripts and languages without definitions + {"und-Arab-AA", "ar-Arab-AA"}, + {"und-Afak-RE", "fr-Afak-RE"}, + {"und-Arab-GB", "ks-Arab-GB"}, + {"abp-Arab-GB", "abp-Arab-GB"}, + // script has preference over region + {"und-Arab-NL", "ar-Arab-NL"}, + {"zza", "zza-Latn-TR"}, + // preserve variants and extensions + {"de-1901", "de-Latn-DE-1901"}, + {"de-x-abc", "de-Latn-DE-x-abc"}, + {"de-1901-x-abc", "de-Latn-DE-1901-x-abc"}, + {"x-abc", "x-abc"}, // TODO: is this the desired behavior? + } + for i, tt := range tests { + in, _ := Parse(tt.in) + out, _ := Parse(tt.out) + in, _ = in.addLikelySubtags() + if in.String() != out.String() { + t.Errorf("%d: add(%s) was %s; want %s", i, tt.in, in, tt.out) + } + } +} +func TestMinimize(t *testing.T) { + tests := []struct{ in, out string }{ + {"aa", "aa"}, + {"aa-Latn", "aa"}, + {"aa-Latn-ET", "aa"}, + {"aa-ET", "aa"}, + {"aa-Arab", "aa-Arab"}, + {"aa-Arab-ER", "aa-Arab-ER"}, + {"aa-Arab-ET", "aa-Arab"}, + {"und", "und"}, + {"und-Latn", "und"}, + {"und-Latn-US", "und"}, + {"en-Latn-US", "en"}, + {"cmn", "cmn"}, + {"cmn-Hans", "cmn-Hans"}, + {"cmn-Hant", "cmn-Hant"}, + {"zh-AU", "zh-AU"}, + {"zh-VN", "zh-VN"}, + {"zh-SG", "zh-SG"}, + {"zh-Hant", "zh-Hant"}, + {"zh-Hant-TW", "zh-TW"}, + {"zh-Hans", "zh"}, + {"zh-Hani", "zh-Hani"}, + {"und-Hans", "und-Hans"}, + {"und-Hani", "und-Hani"}, + + {"und-CW", "und-CW"}, + {"und-YT", "und-YT"}, + {"und-Arab", "und-Arab"}, + {"und-AM", "und-AM"}, + {"und-Arab-CC", "und-Arab-CC"}, + {"und-CC", "und-CC"}, + {"und-Latn-BJ", "und-BJ"}, + {"und-Bugi-ID", "und-Bugi"}, + {"bug-Bugi-ID", "bug-Bugi"}, + // regions, scripts and languages without definitions + {"und-Arab-AA", "und-Arab-AA"}, + // preserve variants and extensions + {"de-Latn-1901", "de-1901"}, + {"de-Latn-x-abc", "de-x-abc"}, + {"de-DE-1901-x-abc", "de-1901-x-abc"}, + {"x-abc", "x-abc"}, // TODO: is this the desired behavior? + } + for i, tt := range tests { + in, _ := Parse(tt.in) + out, _ := Parse(tt.out) + min, _ := in.minimize() + if min.String() != out.String() { + t.Errorf("%d: min(%s) was %s; want %s", i, tt.in, min, tt.out) + } + max, _ := min.addLikelySubtags() + if x, _ := in.addLikelySubtags(); x.String() != max.String() { + t.Errorf("%d: max(min(%s)) = %s; want %s", i, tt.in, max, x) + } + } +} + +func TestRegionGroups(t *testing.T) { + testCases := []struct { + a, b string + distance uint8 + }{ + {"zh-TW", "zh-HK", 5}, + {"zh-MO", "zh-HK", 4}, + {"es-ES", "es-AR", 5}, + {"es-ES", "es", 4}, + {"es-419", "es-MX", 4}, + {"es-AR", "es-MX", 4}, + {"es-ES", "es-MX", 5}, + {"es-PT", "es-MX", 5}, + } + for _, tc := range testCases { + a := MustParse(tc.a) + aScript, _ := a.Script() + b := MustParse(tc.b) + bScript, _ := b.Script() + + if aScript != bScript { + t.Errorf("scripts differ: %q vs %q", aScript, bScript) + continue + } + d, _ := regionGroupDist(a.region, b.region, aScript.scriptID, a.lang) + if d != tc.distance { + t.Errorf("got %q; want %q", d, tc.distance) + } + } +} + +func TestIsParadigmLocale(t *testing.T) { + testCases := map[string]bool{ + "en-US": true, + "en-GB": true, + "en-VI": false, + "es-GB": false, + "es-ES": true, + "es-419": true, + } + for str, want := range testCases { + tag := Make(str) + got := isParadigmLocale(tag.lang, tag.region) + if got != want { + t.Errorf("isPL(%q) = %v; want %v", str, got, want) + } + } +} + +// Implementation of String methods for various types for debugging purposes. + +func (m *matcher) String() string { + w := &bytes.Buffer{} + fmt.Fprintln(w, "Default:", m.default_) + for tag, h := range m.index { + fmt.Fprintf(w, " %s: %v\n", tag, h) + } + return w.String() +} + +func (h *matchHeader) String() string { + w := &bytes.Buffer{} + fmt.Fprint(w, "haveTag: ") + for _, h := range h.haveTags { + fmt.Fprintf(w, "%v, ", h) + } + return w.String() +} + +func (t haveTag) String() string { + return fmt.Sprintf("%v:%d:%v:%v-%v|%v", t.tag, t.index, t.conf, t.maxRegion, t.maxScript, t.altScript) +} + +func TestBestMatchAlloc(t *testing.T) { + m := NewMatcher(makeTagList("en sr nl")) + // Go allocates when creating a list of tags from a single tag! + list := []Tag{English} + avg := testtext.AllocsPerRun(1, func() { + m.Match(list...) + }) + if avg > 0 { + t.Errorf("got %f; want 0", avg) + } +} + +var benchHave = []Tag{ + mk("en"), + mk("en-GB"), + mk("za"), + mk("zh-Hant"), + mk("zh-Hans-CN"), + mk("zh"), + mk("zh-HK"), + mk("ar-MK"), + mk("en-CA"), + mk("fr-CA"), + mk("fr-US"), + mk("fr-CH"), + mk("fr"), + mk("lt"), + mk("lv"), + mk("iw"), + mk("iw-NL"), + mk("he"), + mk("he-IT"), + mk("tlh"), + mk("ja"), + mk("ja-Jpan"), + mk("ja-Jpan-JP"), + mk("de"), + mk("de-CH"), + mk("de-AT"), + mk("de-DE"), + mk("sr"), + mk("sr-Latn"), + mk("sr-Cyrl"), + mk("sr-ME"), +} + +var benchWant = [][]Tag{ + []Tag{ + mk("en"), + }, + []Tag{ + mk("en-AU"), + mk("de-HK"), + mk("nl"), + mk("fy"), + mk("lv"), + }, + []Tag{ + mk("en-AU"), + mk("de-HK"), + mk("nl"), + mk("fy"), + }, + []Tag{ + mk("ja-Hant"), + mk("da-HK"), + mk("nl"), + mk("zh-TW"), + }, + []Tag{ + mk("ja-Hant"), + mk("da-HK"), + mk("nl"), + mk("hr"), + }, +} + +func BenchmarkMatch(b *testing.B) { + m := newMatcher(benchHave, nil) + for i := 0; i < b.N; i++ { + for _, want := range benchWant { + m.getBest(want...) + } + } +} + +func BenchmarkMatchExact(b *testing.B) { + want := mk("en") + m := newMatcher(benchHave, nil) + for i := 0; i < b.N; i++ { + m.getBest(want) + } +} + +func BenchmarkMatchAltLanguagePresent(b *testing.B) { + want := mk("hr") + m := newMatcher(benchHave, nil) + for i := 0; i < b.N; i++ { + m.getBest(want) + } +} + +func BenchmarkMatchAltLanguageNotPresent(b *testing.B) { + want := mk("nn") + m := newMatcher(benchHave, nil) + for i := 0; i < b.N; i++ { + m.getBest(want) + } +} + +func BenchmarkMatchAltScriptPresent(b *testing.B) { + want := mk("zh-Hant-CN") + m := newMatcher(benchHave, nil) + for i := 0; i < b.N; i++ { + m.getBest(want) + } +} + +func BenchmarkMatchAltScriptNotPresent(b *testing.B) { + want := mk("fr-Cyrl") + m := newMatcher(benchHave, nil) + for i := 0; i < b.N; i++ { + m.getBest(want) + } +} + +func BenchmarkMatchLimitedExact(b *testing.B) { + want := []Tag{mk("he-NL"), mk("iw-NL")} + m := newMatcher(benchHave, nil) + for i := 0; i < b.N; i++ { + m.getBest(want...) + } +} diff --git a/vendor/golang.org/x/text/language/parse.go b/vendor/golang.org/x/text/language/parse.go index cfa28f56e..fca2d30e5 100644 --- a/vendor/golang.org/x/text/language/parse.go +++ b/vendor/golang.org/x/text/language/parse.go @@ -765,7 +765,7 @@ func nextExtension(s string, p int) int { var errInvalidWeight = errors.New("ParseAcceptLanguage: invalid weight") -// ParseAcceptLanguage parses the contents of a Accept-Language header as +// ParseAcceptLanguage parses the contents of an Accept-Language header as // defined in http://www.ietf.org/rfc/rfc2616.txt and returns a list of Tags and // a list of corresponding quality weights. It is more permissive than RFC 2616 // and may return non-nil slices even if the input is not valid. diff --git a/vendor/golang.org/x/text/language/parse_test.go b/vendor/golang.org/x/text/language/parse_test.go new file mode 100644 index 000000000..9b40eb444 --- /dev/null +++ b/vendor/golang.org/x/text/language/parse_test.go @@ -0,0 +1,517 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package language + +import ( + "bytes" + "strings" + "testing" + + "golang.org/x/text/internal/tag" +) + +type scanTest struct { + ok bool // true if scanning does not result in an error + in string + tok []string // the expected tokens +} + +var tests = []scanTest{ + {true, "", []string{}}, + {true, "1", []string{"1"}}, + {true, "en", []string{"en"}}, + {true, "root", []string{"root"}}, + {true, "maxchars", []string{"maxchars"}}, + {false, "bad/", []string{}}, + {false, "morethan8", []string{}}, + {false, "-", []string{}}, + {false, "----", []string{}}, + {false, "_", []string{}}, + {true, "en-US", []string{"en", "US"}}, + {true, "en_US", []string{"en", "US"}}, + {false, "en-US-", []string{"en", "US"}}, + {false, "en-US--", []string{"en", "US"}}, + {false, "en-US---", []string{"en", "US"}}, + {false, "en--US", []string{"en", "US"}}, + {false, "-en-US", []string{"en", "US"}}, + {false, "-en--US-", []string{"en", "US"}}, + {false, "-en--US-", []string{"en", "US"}}, + {false, "en-.-US", []string{"en", "US"}}, + {false, ".-en--US-.", []string{"en", "US"}}, + {false, "en-u.-US", []string{"en", "US"}}, + {true, "en-u1-US", []string{"en", "u1", "US"}}, + {true, "maxchar1_maxchar2-maxchar3", []string{"maxchar1", "maxchar2", "maxchar3"}}, + {false, "moreThan8-moreThan8-e", []string{"e"}}, +} + +func TestScan(t *testing.T) { + for i, tt := range tests { + scan := makeScannerString(tt.in) + for j := 0; !scan.done; j++ { + if j >= len(tt.tok) { + t.Errorf("%d: extra token %q", i, scan.token) + } else if tag.Compare(tt.tok[j], scan.token) != 0 { + t.Errorf("%d: token %d: found %q; want %q", i, j, scan.token, tt.tok[j]) + break + } + scan.scan() + } + if s := strings.Join(tt.tok, "-"); tag.Compare(s, bytes.Replace(scan.b, b("_"), b("-"), -1)) != 0 { + t.Errorf("%d: input: found %q; want %q", i, scan.b, s) + } + if (scan.err == nil) != tt.ok { + t.Errorf("%d: ok: found %v; want %v", i, scan.err == nil, tt.ok) + } + } +} + +func TestAcceptMinSize(t *testing.T) { + for i, tt := range tests { + // count number of successive tokens with a minimum size. + for sz := 1; sz <= 8; sz++ { + scan := makeScannerString(tt.in) + scan.end, scan.next = 0, 0 + end := scan.acceptMinSize(sz) + n := 0 + for i := 0; i < len(tt.tok) && len(tt.tok[i]) >= sz; i++ { + n += len(tt.tok[i]) + if i > 0 { + n++ + } + } + if end != n { + t.Errorf("%d:%d: found len %d; want %d", i, sz, end, n) + } + } + } +} + +type parseTest struct { + i int // the index of this test + in string + lang, script, region string + variants, ext string + extList []string // only used when more than one extension is present + invalid bool + rewrite bool // special rewrite not handled by parseTag + changed bool // string needed to be reformatted +} + +func parseTests() []parseTest { + tests := []parseTest{ + {in: "root", lang: "und"}, + {in: "und", lang: "und"}, + {in: "en", lang: "en"}, + {in: "xy", lang: "und", invalid: true}, + {in: "en-ZY", lang: "en", invalid: true}, + {in: "gsw", lang: "gsw"}, + {in: "sr_Latn", lang: "sr", script: "Latn"}, + {in: "af-Arab", lang: "af", script: "Arab"}, + {in: "nl-BE", lang: "nl", region: "BE"}, + {in: "es-419", lang: "es", region: "419"}, + {in: "und-001", lang: "und", region: "001"}, + {in: "de-latn-be", lang: "de", script: "Latn", region: "BE"}, + // Variants + {in: "de-1901", lang: "de", variants: "1901"}, + // Accept with unsuppressed script. + {in: "de-Latn-1901", lang: "de", script: "Latn", variants: "1901"}, + // Specialized. + {in: "sl-rozaj", lang: "sl", variants: "rozaj"}, + {in: "sl-rozaj-lipaw", lang: "sl", variants: "rozaj-lipaw"}, + {in: "sl-rozaj-biske", lang: "sl", variants: "rozaj-biske"}, + {in: "sl-rozaj-biske-1994", lang: "sl", variants: "rozaj-biske-1994"}, + {in: "sl-rozaj-1994", lang: "sl", variants: "rozaj-1994"}, + // Maximum number of variants while adhering to prefix rules. + {in: "sl-rozaj-biske-1994-alalc97-fonipa-fonupa-fonxsamp", lang: "sl", variants: "rozaj-biske-1994-alalc97-fonipa-fonupa-fonxsamp"}, + + // Sorting. + {in: "sl-1994-biske-rozaj", lang: "sl", variants: "rozaj-biske-1994", changed: true}, + {in: "sl-rozaj-biske-1994-alalc97-fonupa-fonipa-fonxsamp", lang: "sl", variants: "rozaj-biske-1994-alalc97-fonipa-fonupa-fonxsamp", changed: true}, + {in: "nl-fonxsamp-alalc97-fonipa-fonupa", lang: "nl", variants: "alalc97-fonipa-fonupa-fonxsamp", changed: true}, + + // Duplicates variants are removed, but not an error. + {in: "nl-fonupa-fonupa", lang: "nl", variants: "fonupa"}, + + // Variants that do not have correct prefixes. We still accept these. + {in: "de-Cyrl-1901", lang: "de", script: "Cyrl", variants: "1901"}, + {in: "sl-rozaj-lipaw-1994", lang: "sl", variants: "rozaj-lipaw-1994"}, + {in: "sl-1994-biske-rozaj-1994-biske-rozaj", lang: "sl", variants: "rozaj-biske-1994", changed: true}, + {in: "de-Cyrl-1901", lang: "de", script: "Cyrl", variants: "1901"}, + + // Invalid variant. + {in: "de-1902", lang: "de", variants: "", invalid: true}, + + {in: "EN_CYRL", lang: "en", script: "Cyrl"}, + // private use and extensions + {in: "x-a-b-c-d", ext: "x-a-b-c-d"}, + {in: "x_A.-B-C_D", ext: "x-b-c-d", invalid: true, changed: true}, + {in: "x-aa-bbbb-cccccccc-d", ext: "x-aa-bbbb-cccccccc-d"}, + {in: "en-c_cc-b-bbb-a-aaa", lang: "en", changed: true, extList: []string{"a-aaa", "b-bbb", "c-cc"}}, + {in: "en-x_cc-b-bbb-a-aaa", lang: "en", ext: "x-cc-b-bbb-a-aaa", changed: true}, + {in: "en-c_cc-b-bbb-a-aaa-x-x", lang: "en", changed: true, extList: []string{"a-aaa", "b-bbb", "c-cc", "x-x"}}, + {in: "en-v-c", lang: "en", ext: "", invalid: true}, + {in: "en-v-abcdefghi", lang: "en", ext: "", invalid: true}, + {in: "en-v-abc-x", lang: "en", ext: "v-abc", invalid: true}, + {in: "en-v-abc-x-", lang: "en", ext: "v-abc", invalid: true}, + {in: "en-v-abc-w-x-xx", lang: "en", extList: []string{"v-abc", "x-xx"}, invalid: true, changed: true}, + {in: "en-v-abc-w-y-yx", lang: "en", extList: []string{"v-abc", "y-yx"}, invalid: true, changed: true}, + {in: "en-v-c-abc", lang: "en", ext: "c-abc", invalid: true, changed: true}, + {in: "en-v-w-abc", lang: "en", ext: "w-abc", invalid: true, changed: true}, + {in: "en-v-x-abc", lang: "en", ext: "x-abc", invalid: true, changed: true}, + {in: "en-v-x-a", lang: "en", ext: "x-a", invalid: true, changed: true}, + {in: "en-9-aa-0-aa-z-bb-x-a", lang: "en", extList: []string{"0-aa", "9-aa", "z-bb", "x-a"}, changed: true}, + {in: "en-u-c", lang: "en", ext: "", invalid: true}, + {in: "en-u-co-phonebk", lang: "en", ext: "u-co-phonebk"}, + {in: "en-u-co-phonebk-ca", lang: "en", ext: "u-co-phonebk", invalid: true}, + {in: "en-u-nu-arabic-co-phonebk-ca", lang: "en", ext: "u-co-phonebk-nu-arabic", invalid: true, changed: true}, + {in: "en-u-nu-arabic-co-phonebk-ca-x", lang: "en", ext: "u-co-phonebk-nu-arabic", invalid: true, changed: true}, + {in: "en-u-nu-arabic-co-phonebk-ca-s", lang: "en", ext: "u-co-phonebk-nu-arabic", invalid: true, changed: true}, + {in: "en-u-nu-arabic-co-phonebk-ca-a12345678", lang: "en", ext: "u-co-phonebk-nu-arabic", invalid: true, changed: true}, + {in: "en-u-co-phonebook", lang: "en", ext: "", invalid: true}, + {in: "en-u-co-phonebook-cu-xau", lang: "en", ext: "u-cu-xau", invalid: true, changed: true}, + {in: "en-Cyrl-u-co-phonebk", lang: "en", script: "Cyrl", ext: "u-co-phonebk"}, + {in: "en-US-u-co-phonebk", lang: "en", region: "US", ext: "u-co-phonebk"}, + {in: "en-US-u-co-phonebk-cu-xau", lang: "en", region: "US", ext: "u-co-phonebk-cu-xau"}, + {in: "en-scotland-u-co-phonebk", lang: "en", variants: "scotland", ext: "u-co-phonebk"}, + {in: "en-u-cu-xua-co-phonebk", lang: "en", ext: "u-co-phonebk-cu-xua", changed: true}, + {in: "en-u-def-abc-cu-xua-co-phonebk", lang: "en", ext: "u-abc-def-co-phonebk-cu-xua", changed: true}, + {in: "en-u-def-abc", lang: "en", ext: "u-abc-def", changed: true}, + {in: "en-u-cu-xua-co-phonebk-a-cd", lang: "en", extList: []string{"a-cd", "u-co-phonebk-cu-xua"}, changed: true}, + // Invalid "u" extension. Drop invalid parts. + {in: "en-u-cu-co-phonebk", lang: "en", extList: []string{"u-co-phonebk"}, invalid: true, changed: true}, + {in: "en-u-cu-xau-co", lang: "en", extList: []string{"u-cu-xau"}, invalid: true}, + // We allow duplicate keys as the LDML spec does not explicitly prohibit it. + // TODO: Consider eliminating duplicates and returning an error. + {in: "en-u-cu-xau-co-phonebk-cu-xau", lang: "en", ext: "u-co-phonebk-cu-xau-cu-xau", changed: true}, + {in: "en-t-en-Cyrl-NL-fonipa", lang: "en", ext: "t-en-cyrl-nl-fonipa", changed: true}, + {in: "en-t-en-Cyrl-NL-fonipa-t0-abc-def", lang: "en", ext: "t-en-cyrl-nl-fonipa-t0-abc-def", changed: true}, + {in: "en-t-t0-abcd", lang: "en", ext: "t-t0-abcd"}, + // Not necessary to have changed here. + {in: "en-t-nl-abcd", lang: "en", ext: "t-nl", invalid: true}, + {in: "en-t-nl-latn", lang: "en", ext: "t-nl-latn"}, + {in: "en-t-t0-abcd-x-a", lang: "en", extList: []string{"t-t0-abcd", "x-a"}}, + // invalid + {in: "", lang: "und", invalid: true}, + {in: "-", lang: "und", invalid: true}, + {in: "x", lang: "und", invalid: true}, + {in: "x-", lang: "und", invalid: true}, + {in: "x--", lang: "und", invalid: true}, + {in: "a-a-b-c-d", lang: "und", invalid: true}, + {in: "en-", lang: "en", invalid: true}, + {in: "enne-", lang: "und", invalid: true}, + {in: "en.", lang: "und", invalid: true}, + {in: "en.-latn", lang: "und", invalid: true}, + {in: "en.-en", lang: "en", invalid: true}, + {in: "x-a-tooManyChars-c-d", ext: "x-a-c-d", invalid: true, changed: true}, + {in: "a-tooManyChars-c-d", lang: "und", invalid: true}, + // TODO: check key-value validity + // { in: "en-u-cu-xd", lang: "en", ext: "u-cu-xd", invalid: true }, + {in: "en-t-abcd", lang: "en", invalid: true}, + {in: "en-Latn-US-en", lang: "en", script: "Latn", region: "US", invalid: true}, + // rewrites (more tests in TestGrandfathered) + {in: "zh-min-nan", lang: "nan"}, + {in: "zh-yue", lang: "yue"}, + {in: "zh-xiang", lang: "hsn", rewrite: true}, + {in: "zh-guoyu", lang: "cmn", rewrite: true}, + {in: "iw", lang: "iw"}, + {in: "sgn-BE-FR", lang: "sfb", rewrite: true}, + {in: "i-klingon", lang: "tlh", rewrite: true}, + } + for i, tt := range tests { + tests[i].i = i + if tt.extList != nil { + tests[i].ext = strings.Join(tt.extList, "-") + } + if tt.ext != "" && tt.extList == nil { + tests[i].extList = []string{tt.ext} + } + } + return tests +} + +func TestParseExtensions(t *testing.T) { + for i, tt := range parseTests() { + if tt.ext == "" || tt.rewrite { + continue + } + scan := makeScannerString(tt.in) + if len(scan.b) > 1 && scan.b[1] != '-' { + scan.end = nextExtension(string(scan.b), 0) + scan.next = scan.end + 1 + scan.scan() + } + start := scan.start + scan.toLower(start, len(scan.b)) + parseExtensions(&scan) + ext := string(scan.b[start:]) + if ext != tt.ext { + t.Errorf("%d(%s): ext was %v; want %v", i, tt.in, ext, tt.ext) + } + if changed := !strings.HasPrefix(tt.in[start:], ext); changed != tt.changed { + t.Errorf("%d(%s): changed was %v; want %v", i, tt.in, changed, tt.changed) + } + } +} + +// partChecks runs checks for each part by calling the function returned by f. +func partChecks(t *testing.T, f func(*parseTest) (Tag, bool)) { + for i, tt := range parseTests() { + tag, skip := f(&tt) + if skip { + continue + } + if l, _ := getLangID(b(tt.lang)); l != tag.lang { + t.Errorf("%d: lang was %q; want %q", i, tag.lang, l) + } + if sc, _ := getScriptID(script, b(tt.script)); sc != tag.script { + t.Errorf("%d: script was %q; want %q", i, tag.script, sc) + } + if r, _ := getRegionID(b(tt.region)); r != tag.region { + t.Errorf("%d: region was %q; want %q", i, tag.region, r) + } + if tag.str == "" { + continue + } + p := int(tag.pVariant) + if p < int(tag.pExt) { + p++ + } + if s, g := tag.str[p:tag.pExt], tt.variants; s != g { + t.Errorf("%d: variants was %q; want %q", i, s, g) + } + p = int(tag.pExt) + if p > 0 && p < len(tag.str) { + p++ + } + if s, g := (tag.str)[p:], tt.ext; s != g { + t.Errorf("%d: extensions were %q; want %q", i, s, g) + } + } +} + +func TestParseTag(t *testing.T) { + partChecks(t, func(tt *parseTest) (id Tag, skip bool) { + if strings.HasPrefix(tt.in, "x-") || tt.rewrite { + return Tag{}, true + } + scan := makeScannerString(tt.in) + id, end := parseTag(&scan) + id.str = string(scan.b[:end]) + tt.ext = "" + tt.extList = []string{} + return id, false + }) +} + +func TestParse(t *testing.T) { + partChecks(t, func(tt *parseTest) (id Tag, skip bool) { + id, err := Raw.Parse(tt.in) + ext := "" + if id.str != "" { + if strings.HasPrefix(id.str, "x-") { + ext = id.str + } else if int(id.pExt) < len(id.str) && id.pExt > 0 { + ext = id.str[id.pExt+1:] + } + } + if tag, _ := Raw.Parse(id.String()); tag.String() != id.String() { + t.Errorf("%d:%s: reparse was %q; want %q", tt.i, tt.in, id.String(), tag.String()) + } + if ext != tt.ext { + t.Errorf("%d:%s: ext was %q; want %q", tt.i, tt.in, ext, tt.ext) + } + changed := id.str != "" && !strings.HasPrefix(tt.in, id.str) + if changed != tt.changed { + t.Errorf("%d:%s: changed was %v; want %v", tt.i, tt.in, changed, tt.changed) + } + if (err != nil) != tt.invalid { + t.Errorf("%d:%s: invalid was %v; want %v. Error: %v", tt.i, tt.in, err != nil, tt.invalid, err) + } + return id, false + }) +} + +func TestErrors(t *testing.T) { + mkInvalid := func(s string) error { + return mkErrInvalid([]byte(s)) + } + tests := []struct { + in string + out error + }{ + // invalid subtags. + {"ac", mkInvalid("ac")}, + {"AC", mkInvalid("ac")}, + {"aa-Uuuu", mkInvalid("Uuuu")}, + {"aa-AB", mkInvalid("AB")}, + // ill-formed wins over invalid. + {"ac-u", errSyntax}, + {"ac-u-ca", errSyntax}, + {"ac-u-ca-co-pinyin", errSyntax}, + {"noob", errSyntax}, + } + for _, tt := range tests { + _, err := Parse(tt.in) + if err != tt.out { + t.Errorf("%s: was %q; want %q", tt.in, err, tt.out) + } + } +} + +func TestCompose1(t *testing.T) { + partChecks(t, func(tt *parseTest) (id Tag, skip bool) { + l, _ := ParseBase(tt.lang) + s, _ := ParseScript(tt.script) + r, _ := ParseRegion(tt.region) + v := []Variant{} + for _, x := range strings.Split(tt.variants, "-") { + p, _ := ParseVariant(x) + v = append(v, p) + } + e := []Extension{} + for _, x := range tt.extList { + p, _ := ParseExtension(x) + e = append(e, p) + } + id, _ = Raw.Compose(l, s, r, v, e) + return id, false + }) +} + +func TestCompose2(t *testing.T) { + partChecks(t, func(tt *parseTest) (id Tag, skip bool) { + l, _ := ParseBase(tt.lang) + s, _ := ParseScript(tt.script) + r, _ := ParseRegion(tt.region) + p := []interface{}{l, s, r, s, r, l} + for _, x := range strings.Split(tt.variants, "-") { + v, _ := ParseVariant(x) + p = append(p, v) + } + for _, x := range tt.extList { + e, _ := ParseExtension(x) + p = append(p, e) + } + id, _ = Raw.Compose(p...) + return id, false + }) +} + +func TestCompose3(t *testing.T) { + partChecks(t, func(tt *parseTest) (id Tag, skip bool) { + id, _ = Raw.Parse(tt.in) + id, _ = Raw.Compose(id) + return id, false + }) +} + +func mk(s string) Tag { + return Raw.Make(s) +} + +func TestParseAcceptLanguage(t *testing.T) { + type res struct { + t Tag + q float32 + } + en := []res{{mk("en"), 1.0}} + tests := []struct { + out []res + in string + ok bool + }{ + {en, "en", true}, + {en, " en", true}, + {en, "en ", true}, + {en, " en ", true}, + {en, "en,", true}, + {en, ",en", true}, + {en, ",,,en,,,", true}, + {en, ",en;q=1", true}, + + // We allow an empty input, contrary to spec. + {nil, "", true}, + {[]res{{mk("aa"), 1}}, "aa;", true}, // allow unspecified weight + + // errors + {nil, ";", false}, + {nil, "$", false}, + {nil, "e;", false}, + {nil, "x;", false}, + {nil, "x", false}, + {nil, "ac", false}, // non-existing language + {nil, "aa;q", false}, + {nil, "aa;q=", false}, + {nil, "aa;q=.", false}, + + // odd fallbacks + { + []res{{mk("en"), 0.1}}, + " english ;q=.1", + true, + }, + { + []res{{mk("it"), 1.0}, {mk("de"), 1.0}, {mk("fr"), 1.0}}, + " italian, deutsch, french", + true, + }, + + // lists + { + []res{{mk("en"), 0.1}}, + "en;q=.1", + true, + }, + { + []res{{mk("mul"), 1.0}}, + "*", + true, + }, + { + []res{{mk("en"), 1.0}, {mk("de"), 1.0}}, + "en,de", + true, + }, + { + []res{{mk("en"), 1.0}, {mk("de"), .5}}, + "en,de;q=0.5", + true, + }, + { + []res{{mk("de"), 0.8}, {mk("en"), 0.5}}, + " en ; q = 0.5 , , de;q=0.8", + true, + }, + { + []res{{mk("en"), 1.0}, {mk("de"), 1.0}, {mk("fr"), 1.0}, {mk("tlh"), 1.0}}, + "en,de,fr,i-klingon", + true, + }, + // sorting + { + []res{{mk("tlh"), 0.4}, {mk("de"), 0.2}, {mk("fr"), 0.2}, {mk("en"), 0.1}}, + "en;q=0.1,de;q=0.2,fr;q=0.2,i-klingon;q=0.4", + true, + }, + // dropping + { + []res{{mk("fr"), 0.2}, {mk("en"), 0.1}}, + "en;q=0.1,de;q=0,fr;q=0.2,i-klingon;q=0.0", + true, + }, + } + for i, tt := range tests { + tags, qs, e := ParseAcceptLanguage(tt.in) + if e == nil != tt.ok { + t.Errorf("%d:%s:err: was %v; want %v", i, tt.in, e == nil, tt.ok) + } + for j, tag := range tags { + if out := tt.out[j]; !tag.equalTags(out.t) || qs[j] != out.q { + t.Errorf("%d:%s: was %s, %1f; want %s, %1f", i, tt.in, tag, qs[j], out.t, out.q) + break + } + } + } +} diff --git a/vendor/golang.org/x/text/language/tables.go b/vendor/golang.org/x/text/language/tables.go index a108554a4..ec17f97ad 100644 --- a/vendor/golang.org/x/text/language/tables.go +++ b/vendor/golang.org/x/text/language/tables.go @@ -7,11 +7,11 @@ import "golang.org/x/text/internal/tag" // CLDRVersion is the CLDR version from which the tables in this package are derived. const CLDRVersion = "31" -const numLanguages = 8654 +const numLanguages = 8665 -const numScripts = 230 +const numScripts = 237 -const numRegions = 356 +const numRegions = 357 type fromTo struct { from uint16 @@ -333,7 +333,7 @@ var langNoIndex = [2197]uint8{ // Entry 200 - 23F 0xdf, 0xc3, 0x83, 0x82, 0xc0, 0xfb, 0x57, 0x27, 0xcd, 0x55, 0xe7, 0x01, 0x00, 0x20, 0xb2, 0xc5, - 0xa4, 0x45, 0x25, 0x9b, 0x02, 0xcf, 0xe0, 0xdf, + 0xa4, 0x45, 0x25, 0x9b, 0x02, 0xdf, 0xe0, 0xdf, 0x03, 0x44, 0x08, 0x10, 0x01, 0x04, 0x01, 0xe3, 0x92, 0x54, 0xdb, 0x28, 0xd1, 0x5f, 0xf6, 0x6d, 0x79, 0xed, 0x1c, 0x7d, 0x04, 0x08, 0x00, 0x01, @@ -354,7 +354,7 @@ var langNoIndex = [2197]uint8{ 0xe2, 0xef, 0xfd, 0x3f, 0x05, 0x09, 0x08, 0x05, 0x40, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x60, - 0xe5, 0x48, 0x00, 0x81, 0x20, 0xc0, 0x05, 0x80, + 0xe7, 0x48, 0x00, 0x81, 0x20, 0xc0, 0x05, 0x80, 0x03, 0x00, 0x00, 0x00, 0x8c, 0x50, 0x40, 0x04, 0x84, 0x47, 0x84, 0x40, 0x20, 0x10, 0x00, 0x20, // Entry 2C0 - 2FF @@ -398,7 +398,7 @@ var langNoIndex = [2197]uint8{ 0xf2, 0xff, 0x31, 0xff, 0xf2, 0x1e, 0x90, 0xf7, 0xf1, 0xf9, 0x45, 0x80, 0x01, 0x02, 0x00, 0x00, 0x40, 0x54, 0x9f, 0x8a, 0xd9, 0xd9, 0x0e, 0x11, - 0x84, 0x51, 0xc0, 0xf3, 0xfb, 0x47, 0x00, 0x01, + 0x86, 0x51, 0xc0, 0xf3, 0xfb, 0x47, 0x00, 0x01, 0x05, 0xd1, 0x50, 0x58, 0x00, 0x00, 0x00, 0x10, 0x04, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x17, 0xd2, 0xb9, 0xfd, 0xfc, 0xba, 0xfe, 0xef, 0xc7, 0xbe, @@ -414,12 +414,12 @@ var langNoIndex = [2197]uint8{ // Entry 440 - 47F 0xfd, 0xfe, 0xfb, 0xff, 0xfe, 0xeb, 0x1f, 0x7d, 0x2f, 0xfd, 0xb6, 0xb5, 0xa5, 0xfc, 0xff, 0xfd, - 0x7f, 0x4e, 0xbf, 0x8e, 0xae, 0xff, 0xee, 0xdf, + 0x7f, 0x4e, 0xbf, 0x8f, 0xae, 0xff, 0xee, 0xdf, 0x7f, 0xf7, 0x73, 0x02, 0x02, 0x04, 0xfc, 0xf7, 0xff, 0xb7, 0xd7, 0xef, 0xfe, 0xcd, 0xf5, 0xce, 0xe2, 0x8e, 0xe7, 0xbf, 0xb7, 0xff, 0x56, 0xbd, 0xcd, 0xff, 0xfb, 0xff, 0xdf, 0xd7, 0xea, 0xff, - 0xe5, 0x5f, 0x6d, 0x0f, 0xa7, 0x51, 0x04, 0x44, + 0xe5, 0x5f, 0x6d, 0x0f, 0xa7, 0x51, 0x06, 0xc4, // Entry 480 - 4BF 0x13, 0x50, 0x5d, 0xaf, 0xa6, 0xfd, 0x99, 0xfb, 0x63, 0x1d, 0x53, 0xff, 0xef, 0xb7, 0x35, 0x20, @@ -473,7 +473,7 @@ var langNoIndex = [2197]uint8{ 0x31, 0x00, 0x00, 0x00, 0x01, 0x10, 0x02, 0x20, 0x00, 0x00, 0x01, 0x00, 0x42, 0x00, 0x20, 0x00, 0x00, 0x1f, 0xdf, 0xd2, 0xb9, 0xff, 0xfd, 0x3f, - 0x1f, 0x18, 0xcf, 0x9c, 0xbf, 0xaf, 0x5f, 0xfe, + 0x1f, 0x98, 0xcf, 0x9c, 0xbf, 0xaf, 0x5f, 0xfe, // Entry 600 - 63F 0x7b, 0x4b, 0x40, 0x10, 0xe1, 0xfd, 0xaf, 0xd9, 0xb7, 0xf6, 0xfb, 0xb3, 0xc7, 0xff, 0x6f, 0xf1, @@ -484,7 +484,7 @@ var langNoIndex = [2197]uint8{ 0xbe, 0x5f, 0x46, 0x1b, 0xe9, 0x5f, 0x50, 0x18, 0x02, 0xfa, 0xf7, 0x9d, 0x15, 0x97, 0x05, 0x0f, // Entry 640 - 67F - 0x75, 0xc4, 0x7d, 0x81, 0x82, 0xf1, 0x57, 0x6c, + 0x75, 0xc4, 0x7d, 0x81, 0x92, 0xf1, 0x57, 0x6c, 0xff, 0xe4, 0xef, 0x6f, 0xff, 0xfc, 0xdd, 0xde, 0xfc, 0xfd, 0x76, 0x5f, 0x7a, 0x1f, 0x00, 0x98, 0x02, 0xfb, 0xa3, 0xef, 0xf3, 0xd6, 0xf2, 0xff, @@ -500,7 +500,7 @@ var langNoIndex = [2197]uint8{ 0x04, 0x00, 0x00, 0x40, 0xd4, 0x02, 0x04, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x20, 0x01, 0x06, 0x50, 0x00, 0x08, 0x00, 0x00, 0x00, 0x24, 0x00, - 0x04, 0x00, 0x10, 0x8c, 0x58, 0xd5, 0x0d, 0x0f, + 0x04, 0x00, 0x10, 0xcc, 0x58, 0xd5, 0x0d, 0x0f, // Entry 6C0 - 6FF 0x14, 0x4d, 0xf1, 0x16, 0x44, 0xd1, 0x42, 0x08, 0x40, 0x00, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00, @@ -521,7 +521,7 @@ var langNoIndex = [2197]uint8{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Entry 740 - 77F 0x00, 0x00, 0x00, 0xef, 0xd5, 0xfd, 0xcf, 0x7e, - 0xa0, 0x11, 0x00, 0x00, 0x00, 0x92, 0x01, 0x44, + 0xb0, 0x11, 0x00, 0x00, 0x00, 0x92, 0x01, 0x44, 0xcd, 0xf9, 0x5c, 0x00, 0x01, 0x00, 0x30, 0x04, 0x04, 0x55, 0x00, 0x01, 0x04, 0xf4, 0x3f, 0x4a, 0x01, 0x00, 0x00, 0xb0, 0x80, 0x00, 0x55, 0x55, @@ -533,7 +533,7 @@ var langNoIndex = [2197]uint8{ 0x00, 0x00, 0x20, 0x00, 0x24, 0x44, 0x00, 0x00, 0x10, 0x03, 0x11, 0x02, 0x01, 0x00, 0x00, 0xf0, 0xf5, 0xff, 0xd5, 0x97, 0xbc, 0x70, 0xd6, 0x78, - 0x78, 0x15, 0x50, 0x00, 0xa4, 0x84, 0xa9, 0x41, + 0x78, 0x15, 0x50, 0x01, 0xa4, 0x84, 0xa9, 0x41, 0x00, 0x00, 0x00, 0x6b, 0x39, 0x52, 0x74, 0x00, 0xe8, 0x30, 0x90, 0x6a, 0x92, 0x00, 0x00, 0x02, 0xff, 0xef, 0xff, 0x4b, 0x85, 0x53, 0xf4, 0xed, @@ -582,8 +582,8 @@ var altLangIndex = [6]uint16{ } // langAliasMap maps langIDs to their suggested replacements. -// Size: 644 bytes, 161 elements -var langAliasMap = [161]fromTo{ +// Size: 656 bytes, 164 elements +var langAliasMap = [164]fromTo{ 0: {from: 0x82, to: 0x88}, 1: {from: 0x185, to: 0x1ac}, 2: {from: 0x1f1, to: 0x1df}, @@ -659,142 +659,145 @@ var langAliasMap = [161]fromTo{ 72: {from: 0x1a87, to: 0x1f6}, 73: {from: 0x1b57, to: 0x1f8}, 74: {from: 0x1b83, to: 0x1512}, - 75: {from: 0x2035, to: 0x37ae}, - 76: {from: 0x203a, to: 0x20da}, - 77: {from: 0x2057, to: 0x309}, - 78: {from: 0x20e0, to: 0x272}, - 79: {from: 0x20eb, to: 0x261}, - 80: {from: 0x20ef, to: 0x22b}, - 81: {from: 0x20f6, to: 0x254}, - 82: {from: 0x210c, to: 0x21e8}, - 83: {from: 0x2132, to: 0x27b}, - 84: {from: 0x2196, to: 0x120}, - 85: {from: 0x21cb, to: 0x155e}, - 86: {from: 0x21e3, to: 0x502}, - 87: {from: 0x21f1, to: 0x49d}, - 88: {from: 0x222a, to: 0x120}, - 89: {from: 0x2234, to: 0x120}, - 90: {from: 0x225f, to: 0x927}, - 91: {from: 0x2313, to: 0x3223}, - 92: {from: 0x237f, to: 0x3362}, - 93: {from: 0x246f, to: 0x2c5}, - 94: {from: 0x24e1, to: 0x2fd}, - 95: {from: 0x24ed, to: 0x2f8}, - 96: {from: 0x24f7, to: 0x31d}, - 97: {from: 0x254d, to: 0xb58}, - 98: {from: 0x25a6, to: 0xe2}, - 99: {from: 0x263b, to: 0x2ce}, - 100: {from: 0x26c6, to: 0x26b1}, - 101: {from: 0x26f6, to: 0x3c6}, - 102: {from: 0x2724, to: 0x3cac}, - 103: {from: 0x2762, to: 0x26b1}, - 104: {from: 0x2786, to: 0x4355}, - 105: {from: 0x28ec, to: 0x2834}, - 106: {from: 0x2911, to: 0x34f}, - 107: {from: 0x2983, to: 0x2da4}, - 108: {from: 0x2b17, to: 0x38b}, - 109: {from: 0x2bf9, to: 0x393}, - 110: {from: 0x2c3c, to: 0x3cac}, - 111: {from: 0x2cf9, to: 0x3bc}, - 112: {from: 0x2d10, to: 0x594}, - 113: {from: 0x2d44, to: 0x147}, - 114: {from: 0x2d45, to: 0x147}, - 115: {from: 0x2dfc, to: 0x2ef}, - 116: {from: 0x2e05, to: 0x19c9}, - 117: {from: 0x2e17, to: 0x2d92}, - 118: {from: 0x2e1e, to: 0x290}, - 119: {from: 0x2e51, to: 0x7d}, - 120: {from: 0x2e62, to: 0x227f}, - 121: {from: 0x2e9d, to: 0x2e98}, - 122: {from: 0x2eec, to: 0x2ed4}, - 123: {from: 0x3190, to: 0x3c2}, - 124: {from: 0x3363, to: 0x338b}, - 125: {from: 0x3427, to: 0x3da}, - 126: {from: 0x34eb, to: 0x18cd}, - 127: {from: 0x35e3, to: 0x410}, - 128: {from: 0x3655, to: 0x244}, - 129: {from: 0x3673, to: 0x3f2}, - 130: {from: 0x36fa, to: 0x443}, - 131: {from: 0x37bd, to: 0x120}, - 132: {from: 0x3813, to: 0x38ef}, - 133: {from: 0x3828, to: 0x2c98}, - 134: {from: 0x382c, to: 0xa9}, - 135: {from: 0x382f, to: 0x3225}, - 136: {from: 0x3869, to: 0x39a3}, - 137: {from: 0x388f, to: 0x3fbd}, - 138: {from: 0x38a2, to: 0x39d4}, - 139: {from: 0x38b1, to: 0x1fa1}, - 140: {from: 0x38b2, to: 0x2e97}, - 141: {from: 0x3959, to: 0x47c}, - 142: {from: 0x3b4b, to: 0xd8e}, - 143: {from: 0x3b75, to: 0x136}, - 144: {from: 0x3c96, to: 0x4ba}, - 145: {from: 0x3fba, to: 0xff}, - 146: {from: 0x4205, to: 0xa8e}, - 147: {from: 0x42bb, to: 0x570}, - 148: {from: 0x42f6, to: 0x3f5d}, - 149: {from: 0x4375, to: 0x258}, - 150: {from: 0x43c8, to: 0x36c8}, - 151: {from: 0x43ca, to: 0x10e}, - 152: {from: 0x44ac, to: 0x331f}, - 153: {from: 0x44e0, to: 0x510}, - 154: {from: 0x45c7, to: 0x2406}, - 155: {from: 0x45da, to: 0x26d9}, - 156: {from: 0x460d, to: 0x48ab}, - 157: {from: 0x46ab, to: 0x469d}, - 158: {from: 0x473b, to: 0x4742}, - 159: {from: 0x4913, to: 0x31d}, - 160: {from: 0x49a4, to: 0x521}, + 75: {from: 0x1d61, to: 0x2c98}, + 76: {from: 0x2035, to: 0x37ae}, + 77: {from: 0x203a, to: 0x20da}, + 78: {from: 0x2057, to: 0x309}, + 79: {from: 0x20e0, to: 0x272}, + 80: {from: 0x20eb, to: 0x261}, + 81: {from: 0x20ef, to: 0x22b}, + 82: {from: 0x20f6, to: 0x254}, + 83: {from: 0x210c, to: 0x21e8}, + 84: {from: 0x2132, to: 0x27b}, + 85: {from: 0x215d, to: 0x910}, + 86: {from: 0x2196, to: 0x120}, + 87: {from: 0x21cb, to: 0x155e}, + 88: {from: 0x21e3, to: 0x502}, + 89: {from: 0x21f1, to: 0x49d}, + 90: {from: 0x222a, to: 0x120}, + 91: {from: 0x2234, to: 0x120}, + 92: {from: 0x225f, to: 0x927}, + 93: {from: 0x2313, to: 0x3223}, + 94: {from: 0x237f, to: 0x3362}, + 95: {from: 0x246f, to: 0x2c5}, + 96: {from: 0x24e1, to: 0x2fd}, + 97: {from: 0x24ed, to: 0x2f8}, + 98: {from: 0x24f7, to: 0x31d}, + 99: {from: 0x254d, to: 0xb58}, + 100: {from: 0x25a6, to: 0xe2}, + 101: {from: 0x263b, to: 0x2ce}, + 102: {from: 0x26c6, to: 0x26b1}, + 103: {from: 0x26f6, to: 0x3c6}, + 104: {from: 0x2724, to: 0x3cac}, + 105: {from: 0x2762, to: 0x26b1}, + 106: {from: 0x2786, to: 0x4355}, + 107: {from: 0x28ec, to: 0x2834}, + 108: {from: 0x2911, to: 0x34f}, + 109: {from: 0x2983, to: 0x2da4}, + 110: {from: 0x2b17, to: 0x38b}, + 111: {from: 0x2bf9, to: 0x393}, + 112: {from: 0x2c3c, to: 0x3cac}, + 113: {from: 0x2cf9, to: 0x3bc}, + 114: {from: 0x2d10, to: 0x594}, + 115: {from: 0x2d44, to: 0x147}, + 116: {from: 0x2d45, to: 0x147}, + 117: {from: 0x2dfc, to: 0x2ef}, + 118: {from: 0x2e05, to: 0x19c9}, + 119: {from: 0x2e17, to: 0x2d92}, + 120: {from: 0x2e1e, to: 0x290}, + 121: {from: 0x2e51, to: 0x7d}, + 122: {from: 0x2e62, to: 0x227f}, + 123: {from: 0x2e9d, to: 0x2e98}, + 124: {from: 0x2eec, to: 0x2ed4}, + 125: {from: 0x3190, to: 0x3c2}, + 126: {from: 0x3363, to: 0x338b}, + 127: {from: 0x3427, to: 0x3da}, + 128: {from: 0x34eb, to: 0x18cd}, + 129: {from: 0x35c5, to: 0x2c98}, + 130: {from: 0x35e3, to: 0x410}, + 131: {from: 0x3655, to: 0x244}, + 132: {from: 0x3673, to: 0x3f2}, + 133: {from: 0x36fa, to: 0x443}, + 134: {from: 0x37bd, to: 0x120}, + 135: {from: 0x3813, to: 0x38ef}, + 136: {from: 0x3828, to: 0x2c98}, + 137: {from: 0x382c, to: 0xa9}, + 138: {from: 0x382f, to: 0x3225}, + 139: {from: 0x3869, to: 0x39a3}, + 140: {from: 0x388f, to: 0x3fbd}, + 141: {from: 0x38a2, to: 0x39d4}, + 142: {from: 0x38b1, to: 0x1fa1}, + 143: {from: 0x38b2, to: 0x2e97}, + 144: {from: 0x3959, to: 0x47c}, + 145: {from: 0x3b4b, to: 0xd8e}, + 146: {from: 0x3b75, to: 0x136}, + 147: {from: 0x3c96, to: 0x4ba}, + 148: {from: 0x3fba, to: 0xff}, + 149: {from: 0x4205, to: 0xa8e}, + 150: {from: 0x42bb, to: 0x570}, + 151: {from: 0x42f6, to: 0x3f5d}, + 152: {from: 0x4375, to: 0x258}, + 153: {from: 0x43c8, to: 0x36c8}, + 154: {from: 0x43ca, to: 0x10e}, + 155: {from: 0x44ac, to: 0x331f}, + 156: {from: 0x44e0, to: 0x510}, + 157: {from: 0x45c7, to: 0x2406}, + 158: {from: 0x45da, to: 0x26d9}, + 159: {from: 0x460d, to: 0x48ab}, + 160: {from: 0x46ab, to: 0x469d}, + 161: {from: 0x473b, to: 0x4742}, + 162: {from: 0x4913, to: 0x31d}, + 163: {from: 0x49a4, to: 0x521}, } -// Size: 161 bytes, 161 elements -var langAliasTypes = [161]langAliasType{ +// Size: 164 bytes, 164 elements +var langAliasTypes = [164]langAliasType{ // Entry 0 - 3F 1, 0, 0, 0, 0, 0, 0, 1, 2, 2, 0, 1, 0, 0, 1, 2, 1, 1, 2, 0, 1, 0, 1, 2, 1, 1, 0, 0, 2, 1, 1, 0, 2, 0, 0, 1, 0, 1, 0, 0, 1, 2, 1, 1, 1, 1, 0, 0, 2, 1, 1, 1, 1, 2, 1, 0, 1, 1, 2, 2, 0, 1, 2, 0, // Entry 40 - 7F - 1, 0, 1, 1, 1, 1, 0, 0, 2, 1, 0, 0, 0, 1, 1, 1, - 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 2, 2, - 2, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, - 0, 2, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 2, 0, 2, + 1, 0, 1, 1, 1, 1, 0, 0, 2, 1, 0, 0, 0, 0, 1, 1, + 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, + 2, 2, 2, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, + 0, 1, 0, 2, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 2, // Entry 80 - BF - 1, 1, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 1, 0, - 1, 2, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, - 1, + 0, 0, 2, 1, 1, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, + 1, 1, 0, 1, 2, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, + 0, 1, 1, 1, } const ( - _Latn = 82 - _Hani = 50 - _Hans = 52 - _Hant = 53 - _Qaaa = 131 - _Qaai = 139 - _Qabx = 180 - _Zinh = 224 - _Zyyy = 229 - _Zzzz = 230 + _Latn = 85 + _Hani = 53 + _Hans = 55 + _Hant = 56 + _Qaaa = 136 + _Qaai = 144 + _Qabx = 185 + _Zinh = 231 + _Zyyy = 236 + _Zzzz = 237 ) // script is an alphabetically sorted list of ISO 15924 codes. The index // of the script in the string, divided by 4, is the internal scriptID. -const script tag.Index = "" + // Size: 928 bytes +const script tag.Index = "" + // Size: 956 bytes "----AdlmAfakAghbAhomArabAranArmiArmnAvstBaliBamuBassBatkBengBhksBlisBopo" + - "BrahBraiBugiBuhdCakmCansCariChamCherCirtCoptCprtCyrlCyrsDevaDsrtDuplEgyd" + - "EgyhEgypElbaEthiGeokGeorGlagGothGranGrekGujrGuruHanbHangHaniHanoHansHant" + - "HatrHebrHiraHluwHmngHrktHungIndsItalJamoJavaJpanJurcKaliKanaKharKhmrKhoj" + - "KitlKitsKndaKoreKpelKthiLanaLaooLatfLatgLatnLekeLepcLimbLinaLinbLisuLoma" + - "LyciLydiMahjMandManiMarcMayaMendMercMeroMlymModiMongMoonMrooMteiMultMymr" + - "NarbNbatNewaNkgbNkooNshuOgamOlckOrkhOryaOsgeOsmaPalmPaucPermPhagPhliPhlp" + - "PhlvPhnxPiqdPlrdPrtiQaaaQaabQaacQaadQaaeQaafQaagQaahQaaiQaajQaakQaalQaam" + - "QaanQaaoQaapQaaqQaarQaasQaatQaauQaavQaawQaaxQaayQaazQabaQabbQabcQabdQabe" + - "QabfQabgQabhQabiQabjQabkQablQabmQabnQaboQabpQabqQabrQabsQabtQabuQabvQabw" + - "QabxRjngRoroRunrSamrSaraSarbSaurSgnwShawShrdSiddSindSinhSoraSundSyloSyrc" + - "SyreSyrjSyrnTagbTakrTaleTaluTamlTangTavtTeluTengTfngTglgThaaThaiTibtTirh" + - "UgarVaiiVispWaraWoleXpeoXsuxYiiiZinhZmthZsyeZsymZxxxZyyyZzzz\xff\xff\xff" + - "\xff" + "BrahBraiBugiBuhdCakmCansCariChamCherCirtCoptCprtCyrlCyrsDevaDogrDsrtDupl" + + "EgydEgyhEgypElbaEthiGeokGeorGlagGongGonmGothGranGrekGujrGuruHanbHangHani" + + "HanoHansHantHatrHebrHiraHluwHmngHrktHungIndsItalJamoJavaJpanJurcKaliKana" + + "KharKhmrKhojKitlKitsKndaKoreKpelKthiLanaLaooLatfLatgLatnLekeLepcLimbLina" + + "LinbLisuLomaLyciLydiMahjMakaMandManiMarcMayaMedfMendMercMeroMlymModiMong" + + "MoonMrooMteiMultMymrNarbNbatNewaNkgbNkooNshuOgamOlckOrkhOryaOsgeOsmaPalm" + + "PaucPermPhagPhliPhlpPhlvPhnxPiqdPlrdPrtiQaaaQaabQaacQaadQaaeQaafQaagQaah" + + "QaaiQaajQaakQaalQaamQaanQaaoQaapQaaqQaarQaasQaatQaauQaavQaawQaaxQaayQaaz" + + "QabaQabbQabcQabdQabeQabfQabgQabhQabiQabjQabkQablQabmQabnQaboQabpQabqQabr" + + "QabsQabtQabuQabvQabwQabxRjngRoroRunrSamrSaraSarbSaurSgnwShawShrdSiddSind" + + "SinhSoraSoyoSundSyloSyrcSyreSyrjSyrnTagbTakrTaleTaluTamlTangTavtTeluTeng" + + "TfngTglgThaaThaiTibtTirhUgarVaiiVispWaraWoleXpeoXsuxYiiiZanbZinhZmthZsye" + + "ZsymZxxxZyyyZzzz\xff\xff\xff\xff" // suppressScript is an index from langID to the dominant script for that language, // if it exists. If a script is given, it should be suppressed from the language tag. @@ -803,16 +806,16 @@ var suppressScript = [1327]uint8{ // Entry 0 - 3F 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, // Entry 40 - 7F 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -825,56 +828,56 @@ var suppressScript = [1327]uint8{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Entry C0 - FF 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, + 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, // Entry 100 - 13F - 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, + 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd4, - 0x00, 0x00, 0x00, 0x00, 0xd6, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x00, 0x00, - 0x52, 0x00, 0x00, 0x52, 0x00, 0x52, 0x00, 0x52, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xda, + 0x00, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, + 0x55, 0x00, 0x00, 0x55, 0x00, 0x55, 0x00, 0x55, // Entry 140 - 17F - 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x05, + 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x52, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x52, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, - 0x52, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x52, 0x52, 0x00, 0x00, + 0x55, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x55, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, + 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Entry 180 - 1BF 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, - 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, + 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x52, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x55, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x37, 0x00, 0x20, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x3a, 0x00, 0x20, 0x00, 0x00, 0x00, // Entry 1C0 - 1FF 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, - 0x52, 0x00, 0x52, 0x52, 0x00, 0x08, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, + 0x55, 0x00, 0x55, 0x55, 0x00, 0x08, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x52, 0x52, - 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, + 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, + 0x00, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, // Entry 200 - 23F 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -882,9 +885,9 @@ var suppressScript = [1327]uint8{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Entry 240 - 27F - 0x1e, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, - 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, - 0x00, 0x00, 0x4b, 0x00, 0x20, 0x00, 0x00, 0x00, + 0x1e, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, + 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4d, + 0x00, 0x00, 0x4e, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -892,179 +895,179 @@ var suppressScript = [1327]uint8{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Entry 280 - 2BF 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x4f, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, + 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x52, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, // Entry 2C0 - 2FF - 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, // Entry 300 - 33F - 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, + 0x00, 0x00, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x20, 0x00, 0x00, 0x00, 0x52, 0x52, 0x00, + 0x00, 0x20, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6b, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, // Entry 340 - 37F - 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x52, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, 0x55, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, - 0x52, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x52, 0x00, 0x00, 0x00, - 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, + 0x55, 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x75, 0x55, 0x00, 0x00, 0x00, + 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Entry 380 - 3BF - 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, - 0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, + 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x52, 0x00, + 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x55, 0x00, // Entry 3C0 - 3FF - 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x52, - 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1e, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x55, + 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1e, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Entry 400 - 43F - 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x52, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, - 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, - 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x55, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, + 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, + 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Entry 440 - 47F - 0x00, 0x00, 0x52, 0x52, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcd, 0x00, + 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, - 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xd5, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, - 0x52, 0x00, 0x00, 0x00, 0x52, 0x00, 0x52, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd6, + 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xdb, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, + 0x55, 0x00, 0x00, 0x00, 0x55, 0x00, 0x55, 0x00, // Entry 480 - 4BF - 0x52, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, - 0x52, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, + 0x55, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, + 0x55, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, // Entry 4C0 - 4FF - 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Entry 500 - 53F 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, } const ( _001 = 1 - _419 = 30 - _BR = 64 - _CA = 72 - _ES = 109 - _GB = 122 - _MD = 187 - _PT = 237 - _UK = 305 - _US = 308 - _ZZ = 356 - _XA = 322 - _XC = 324 - _XK = 332 + _419 = 31 + _BR = 65 + _CA = 73 + _ES = 110 + _GB = 123 + _MD = 188 + _PT = 238 + _UK = 306 + _US = 309 + _ZZ = 357 + _XA = 323 + _XC = 325 + _XK = 333 ) // isoRegionOffset needs to be added to the index of regionISO to obtain the regionID // for 2-letter ISO codes. (The first isoRegionOffset regionIDs are reserved for // the UN.M49 codes used for groups.) -const isoRegionOffset = 31 +const isoRegionOffset = 32 // regionTypes defines the status of a region for various standards. -// Size: 357 bytes, 357 elements -var regionTypes = [357]uint8{ +// Size: 358 bytes, 358 elements +var regionTypes = [358]uint8{ // Entry 0 - 3F 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, // Entry 40 - 7F - 0x06, 0x06, 0x06, 0x04, 0x06, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x06, 0x04, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x04, 0x06, 0x04, 0x00, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x04, 0x06, - 0x04, 0x06, 0x06, 0x06, 0x06, 0x00, 0x06, 0x04, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x04, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 0x06, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x04, 0x06, 0x04, + 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x04, + 0x06, 0x04, 0x06, 0x06, 0x06, 0x06, 0x00, 0x06, 0x04, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x06, 0x04, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, + 0x06, 0x04, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, // Entry 80 - BF 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x00, 0x04, 0x06, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x00, 0x04, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, // Entry C0 - FF - 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 0x06, - 0x06, 0x06, 0x06, 0x00, 0x06, 0x04, 0x06, 0x06, - 0x06, 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 0x06, - 0x06, 0x00, 0x06, 0x05, 0x05, 0x05, 0x05, 0x05, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, + 0x06, 0x06, 0x06, 0x06, 0x00, 0x06, 0x04, 0x06, + 0x06, 0x06, 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, + 0x06, 0x06, 0x00, 0x06, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, // Entry 100 - 13F - 0x05, 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x05, 0x05, 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x04, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x04, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x02, 0x06, 0x04, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x02, 0x06, 0x04, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, // Entry 140 - 17F - 0x00, 0x06, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, + 0x06, 0x00, 0x06, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, - 0x05, 0x05, 0x05, 0x05, 0x04, 0x06, 0x06, 0x04, - 0x06, 0x06, 0x04, 0x06, 0x05, + 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, 0x06, 0x06, + 0x04, 0x06, 0x06, 0x04, 0x06, 0x05, } // regionISO holds a list of alphabetically sorted 2-letter ISO region codes. @@ -1102,89 +1105,89 @@ const altRegionISO3 string = "SCGQUUSGSCOMPRKCYMSPMSRBATFMYTATN" // of the 3-letter ISO codes in altRegionISO3. // Size: 22 bytes, 11 elements var altRegionIDs = [11]uint16{ - 0x0056, 0x006f, 0x0087, 0x00a7, 0x00a9, 0x00ac, 0x00e9, 0x0104, - 0x0120, 0x015e, 0x00db, + 0x0057, 0x0070, 0x0088, 0x00a8, 0x00aa, 0x00ad, 0x00ea, 0x0105, + 0x0121, 0x015f, 0x00dc, } // Size: 80 bytes, 20 elements var regionOldMap = [20]fromTo{ - 0: {from: 0x43, to: 0xc3}, - 1: {from: 0x57, to: 0xa6}, - 2: {from: 0x5e, to: 0x5f}, - 3: {from: 0x65, to: 0x3a}, - 4: {from: 0x78, to: 0x77}, - 5: {from: 0x92, to: 0x36}, - 6: {from: 0xa2, to: 0x132}, - 7: {from: 0xc0, to: 0x132}, - 8: {from: 0xd6, to: 0x13e}, - 9: {from: 0xdb, to: 0x2a}, - 10: {from: 0xee, to: 0x132}, - 11: {from: 0xf1, to: 0xe1}, - 12: {from: 0xfb, to: 0x6f}, - 13: {from: 0x102, to: 0x163}, - 14: {from: 0x129, to: 0x125}, - 15: {from: 0x131, to: 0x7a}, - 16: {from: 0x139, to: 0x13d}, - 17: {from: 0x140, to: 0x132}, - 18: {from: 0x15c, to: 0x15d}, - 19: {from: 0x162, to: 0x4a}, + 0: {from: 0x44, to: 0xc4}, + 1: {from: 0x58, to: 0xa7}, + 2: {from: 0x5f, to: 0x60}, + 3: {from: 0x66, to: 0x3b}, + 4: {from: 0x79, to: 0x78}, + 5: {from: 0x93, to: 0x37}, + 6: {from: 0xa3, to: 0x133}, + 7: {from: 0xc1, to: 0x133}, + 8: {from: 0xd7, to: 0x13f}, + 9: {from: 0xdc, to: 0x2b}, + 10: {from: 0xef, to: 0x133}, + 11: {from: 0xf2, to: 0xe2}, + 12: {from: 0xfc, to: 0x70}, + 13: {from: 0x103, to: 0x164}, + 14: {from: 0x12a, to: 0x126}, + 15: {from: 0x132, to: 0x7b}, + 16: {from: 0x13a, to: 0x13e}, + 17: {from: 0x141, to: 0x133}, + 18: {from: 0x15d, to: 0x15e}, + 19: {from: 0x163, to: 0x4b}, } // m49 maps regionIDs to UN.M49 codes. The first isoRegionOffset entries are // codes indicating collections of regions. -// Size: 714 bytes, 357 elements -var m49 = [357]int16{ +// Size: 716 bytes, 358 elements +var m49 = [358]int16{ // Entry 0 - 3F 0, 1, 2, 3, 5, 9, 11, 13, 14, 15, 17, 18, 19, 21, 29, 30, 34, 35, 39, 53, 54, 57, 61, 142, - 143, 145, 150, 151, 154, 155, 419, 958, - 0, 20, 784, 4, 28, 660, 8, 51, - 530, 24, 10, 32, 16, 40, 36, 533, - 248, 31, 70, 52, 50, 56, 854, 100, - 48, 108, 204, 652, 60, 96, 68, 535, + 143, 145, 150, 151, 154, 155, 202, 419, + 958, 0, 20, 784, 4, 28, 660, 8, + 51, 530, 24, 10, 32, 16, 40, 36, + 533, 248, 31, 70, 52, 50, 56, 854, + 100, 48, 108, 204, 652, 60, 96, 68, // Entry 40 - 7F - 76, 44, 64, 104, 74, 72, 112, 84, - 124, 166, 180, 140, 178, 756, 384, 184, - 152, 120, 156, 170, 0, 188, 891, 296, - 192, 132, 531, 162, 196, 203, 278, 276, - 0, 262, 208, 212, 214, 204, 12, 0, - 218, 233, 818, 732, 232, 724, 231, 967, - 0, 246, 242, 238, 583, 234, 0, 250, - 249, 266, 826, 308, 268, 254, 831, 288, + 535, 76, 44, 64, 104, 74, 72, 112, + 84, 124, 166, 180, 140, 178, 756, 384, + 184, 152, 120, 156, 170, 0, 188, 891, + 296, 192, 132, 531, 162, 196, 203, 278, + 276, 0, 262, 208, 212, 214, 204, 12, + 0, 218, 233, 818, 732, 232, 724, 231, + 967, 0, 246, 242, 238, 583, 234, 0, + 250, 249, 266, 826, 308, 268, 254, 831, // Entry 80 - BF - 292, 304, 270, 324, 312, 226, 300, 239, - 320, 316, 624, 328, 344, 334, 340, 191, - 332, 348, 854, 0, 360, 372, 376, 833, - 356, 86, 368, 364, 352, 380, 832, 388, - 400, 392, 581, 404, 417, 116, 296, 174, - 659, 408, 410, 414, 136, 398, 418, 422, - 662, 438, 144, 430, 426, 440, 442, 428, - 434, 504, 492, 498, 499, 663, 450, 584, + 288, 292, 304, 270, 324, 312, 226, 300, + 239, 320, 316, 624, 328, 344, 334, 340, + 191, 332, 348, 854, 0, 360, 372, 376, + 833, 356, 86, 368, 364, 352, 380, 832, + 388, 400, 392, 581, 404, 417, 116, 296, + 174, 659, 408, 410, 414, 136, 398, 418, + 422, 662, 438, 144, 430, 426, 440, 442, + 428, 434, 504, 492, 498, 499, 663, 450, // Entry C0 - FF - 581, 807, 466, 104, 496, 446, 580, 474, - 478, 500, 470, 480, 462, 454, 484, 458, - 508, 516, 540, 562, 574, 566, 548, 558, - 528, 578, 524, 10, 520, 536, 570, 554, - 512, 591, 0, 604, 258, 598, 608, 586, - 616, 666, 612, 630, 275, 620, 581, 585, - 600, 591, 634, 959, 960, 961, 962, 963, - 964, 965, 966, 967, 968, 969, 970, 971, + 584, 581, 807, 466, 104, 496, 446, 580, + 474, 478, 500, 470, 480, 462, 454, 484, + 458, 508, 516, 540, 562, 574, 566, 548, + 558, 528, 578, 524, 10, 520, 536, 570, + 554, 512, 591, 0, 604, 258, 598, 608, + 586, 616, 666, 612, 630, 275, 620, 581, + 585, 600, 591, 634, 959, 960, 961, 962, + 963, 964, 965, 966, 967, 968, 969, 970, // Entry 100 - 13F - 972, 638, 716, 642, 688, 643, 646, 682, - 90, 690, 729, 752, 702, 654, 705, 744, - 703, 694, 674, 686, 706, 740, 728, 678, - 810, 222, 534, 760, 748, 0, 796, 148, - 260, 768, 764, 762, 772, 626, 795, 788, - 776, 626, 792, 780, 798, 158, 834, 804, - 800, 826, 581, 0, 840, 858, 860, 336, - 670, 704, 862, 92, 850, 704, 548, 876, + 971, 972, 638, 716, 642, 688, 643, 646, + 682, 90, 690, 729, 752, 702, 654, 705, + 744, 703, 694, 674, 686, 706, 740, 728, + 678, 810, 222, 534, 760, 748, 0, 796, + 148, 260, 768, 764, 762, 772, 626, 795, + 788, 776, 626, 792, 780, 798, 158, 834, + 804, 800, 826, 581, 0, 840, 858, 860, + 336, 670, 704, 862, 92, 850, 704, 548, // Entry 140 - 17F - 581, 882, 973, 974, 975, 976, 977, 978, - 979, 980, 981, 982, 983, 984, 985, 986, - 987, 988, 989, 990, 991, 992, 993, 994, - 995, 996, 997, 998, 720, 887, 175, 891, - 710, 894, 180, 716, 999, + 876, 581, 882, 973, 974, 975, 976, 977, + 978, 979, 980, 981, 982, 983, 984, 985, + 986, 987, 988, 989, 990, 991, 992, 993, + 994, 995, 996, 997, 998, 720, 887, 175, + 891, 710, 894, 180, 716, 999, } // m49Index gives indexes into fromM49 based on the three most significant bits @@ -1194,149 +1197,157 @@ var m49 = [357]int16{ // The region code is stored in the 9 lsb of the indexed value. // Size: 18 bytes, 9 elements var m49Index = [9]int16{ - 0, 59, 107, 142, 180, 219, 258, 290, - 332, + 0, 59, 108, 143, 181, 220, 259, 291, + 333, } // fromM49 contains entries to map UN.M49 codes to regions. See m49Index for details. -// Size: 664 bytes, 332 elements -var fromM49 = [332]uint16{ +// Size: 666 bytes, 333 elements +var fromM49 = [333]uint16{ // Entry 0 - 3F - 0x0201, 0x0402, 0x0603, 0x0823, 0x0a04, 0x1026, 0x1205, 0x142a, - 0x1606, 0x1866, 0x1a07, 0x1c08, 0x1e09, 0x202c, 0x220a, 0x240b, - 0x260c, 0x2821, 0x2a0d, 0x3029, 0x3824, 0x3a0e, 0x3c0f, 0x3e31, - 0x402b, 0x4410, 0x4611, 0x482e, 0x4e12, 0x502d, 0x5841, 0x6038, - 0x6434, 0x6627, 0x6833, 0x6a13, 0x6c14, 0x7035, 0x7215, 0x783c, - 0x7a16, 0x8042, 0x883e, 0x8c32, 0x9045, 0x9444, 0x9840, 0xa847, - 0xac99, 0xb508, 0xb93b, 0xc03d, 0xc837, 0xd0c3, 0xd839, 0xe046, - 0xe8a5, 0xf051, 0xf848, 0x0859, 0x10ac, 0x184b, 0x1c17, 0x1e18, + 0x0201, 0x0402, 0x0603, 0x0824, 0x0a04, 0x1027, 0x1205, 0x142b, + 0x1606, 0x1867, 0x1a07, 0x1c08, 0x1e09, 0x202d, 0x220a, 0x240b, + 0x260c, 0x2822, 0x2a0d, 0x302a, 0x3825, 0x3a0e, 0x3c0f, 0x3e32, + 0x402c, 0x4410, 0x4611, 0x482f, 0x4e12, 0x502e, 0x5842, 0x6039, + 0x6435, 0x6628, 0x6834, 0x6a13, 0x6c14, 0x7036, 0x7215, 0x783d, + 0x7a16, 0x8043, 0x883f, 0x8c33, 0x9046, 0x9445, 0x9841, 0xa848, + 0xac9a, 0xb509, 0xb93c, 0xc03e, 0xc838, 0xd0c4, 0xd83a, 0xe047, + 0xe8a6, 0xf052, 0xf849, 0x085a, 0x10ad, 0x184c, 0x1c17, 0x1e18, // Entry 40 - 7F - 0x20b2, 0x2219, 0x291f, 0x2c1a, 0x2e1b, 0x3050, 0x341c, 0x361d, - 0x3852, 0x3d2d, 0x445b, 0x4c49, 0x5453, 0x5ca7, 0x5f5e, 0x644c, - 0x684a, 0x704f, 0x7855, 0x7e8f, 0x8058, 0x885c, 0x965d, 0x983a, - 0xa062, 0xa863, 0xac64, 0xb468, 0xbd19, 0xc485, 0xcc6e, 0xce6e, - 0xd06c, 0xd269, 0xd475, 0xdc73, 0xde87, 0xe472, 0xec71, 0xf030, - 0xf278, 0xf477, 0xfc7d, 0x04e4, 0x0920, 0x0c61, 0x1479, 0x187c, - 0x1c82, 0x26ec, 0x285f, 0x2c5e, 0x305f, 0x407f, 0x4880, 0x50a6, - 0x5886, 0x6081, 0x687b, 0x7084, 0x7889, 0x8088, 0x8883, 0x908b, + 0x20b3, 0x2219, 0x2920, 0x2c1a, 0x2e1b, 0x3051, 0x341c, 0x361d, + 0x3853, 0x3d2e, 0x445c, 0x4c4a, 0x5454, 0x5ca8, 0x5f5f, 0x644d, + 0x684b, 0x7050, 0x7856, 0x7e90, 0x8059, 0x885d, 0x941e, 0x965e, + 0x983b, 0xa063, 0xa864, 0xac65, 0xb469, 0xbd1a, 0xc486, 0xcc6f, + 0xce6f, 0xd06d, 0xd26a, 0xd476, 0xdc74, 0xde88, 0xe473, 0xec72, + 0xf031, 0xf279, 0xf478, 0xfc7e, 0x04e5, 0x0921, 0x0c62, 0x147a, + 0x187d, 0x1c83, 0x26ed, 0x2860, 0x2c5f, 0x3060, 0x4080, 0x4881, + 0x50a7, 0x5887, 0x6082, 0x687c, 0x7085, 0x788a, 0x8089, 0x8884, // Entry 80 - BF - 0x9890, 0x9c8d, 0xa137, 0xa88e, 0xb08c, 0xb891, 0xc09c, 0xc898, - 0xd094, 0xd89b, 0xe09a, 0xe895, 0xf096, 0xf89d, 0x004e, 0x089f, - 0x10a1, 0x1cad, 0x20a0, 0x28a3, 0x30a9, 0x34aa, 0x3cab, 0x42a4, - 0x44ae, 0x461e, 0x4caf, 0x54b4, 0x58b7, 0x5cb3, 0x64b8, 0x6cb1, - 0x70b5, 0x74b6, 0x7cc5, 0x84be, 0x8ccd, 0x94cf, 0x9ccc, 0xa4c2, - 0xacca, 0xb4c7, 0xbcc8, 0xc0cb, 0xc8ce, 0xd8ba, 0xe0c4, 0xe4bb, - 0xe6bc, 0xe8c9, 0xf0b9, 0xf8d0, 0x00e0, 0x08d1, 0x10dc, 0x18da, - 0x20d8, 0x2428, 0x265a, 0x2a2f, 0x2d1a, 0x2e3f, 0x30dd, 0x38d2, + 0x908c, 0x9891, 0x9c8e, 0xa138, 0xa88f, 0xb08d, 0xb892, 0xc09d, + 0xc899, 0xd095, 0xd89c, 0xe09b, 0xe896, 0xf097, 0xf89e, 0x004f, + 0x08a0, 0x10a2, 0x1cae, 0x20a1, 0x28a4, 0x30aa, 0x34ab, 0x3cac, + 0x42a5, 0x44af, 0x461f, 0x4cb0, 0x54b5, 0x58b8, 0x5cb4, 0x64b9, + 0x6cb2, 0x70b6, 0x74b7, 0x7cc6, 0x84bf, 0x8cce, 0x94d0, 0x9ccd, + 0xa4c3, 0xaccb, 0xb4c8, 0xbcc9, 0xc0cc, 0xc8cf, 0xd8bb, 0xe0c5, + 0xe4bc, 0xe6bd, 0xe8ca, 0xf0ba, 0xf8d1, 0x00e1, 0x08d2, 0x10dd, + 0x18db, 0x20d9, 0x2429, 0x265b, 0x2a30, 0x2d1b, 0x2e40, 0x30de, // Entry C0 - FF - 0x493e, 0x54df, 0x5cd7, 0x64d3, 0x6cd5, 0x74de, 0x7cd4, 0x84d9, - 0x88c6, 0x8b32, 0x8e74, 0x90bf, 0x92ef, 0x94e7, 0x9ee1, 0xace5, - 0xb0f0, 0xb8e3, 0xc0e6, 0xc8ea, 0xd0e8, 0xd8ed, 0xe08a, 0xe525, - 0xeceb, 0xf4f2, 0xfd01, 0x0503, 0x0705, 0x0d06, 0x183b, 0x1d0d, - 0x26a8, 0x2825, 0x2cb0, 0x2ebd, 0x34e9, 0x3d38, 0x4512, 0x4d17, - 0x5507, 0x5d13, 0x6104, 0x6509, 0x6d11, 0x7d0c, 0x7f10, 0x813d, - 0x830e, 0x8514, 0x8d60, 0x9963, 0xa15c, 0xa86d, 0xb116, 0xb30a, - 0xb86b, 0xc10a, 0xc915, 0xd10f, 0xd91c, 0xe10b, 0xe84d, 0xf11b, + 0x38d3, 0x493f, 0x54e0, 0x5cd8, 0x64d4, 0x6cd6, 0x74df, 0x7cd5, + 0x84da, 0x88c7, 0x8b33, 0x8e75, 0x90c0, 0x92f0, 0x94e8, 0x9ee2, + 0xace6, 0xb0f1, 0xb8e4, 0xc0e7, 0xc8eb, 0xd0e9, 0xd8ee, 0xe08b, + 0xe526, 0xecec, 0xf4f3, 0xfd02, 0x0504, 0x0706, 0x0d07, 0x183c, + 0x1d0e, 0x26a9, 0x2826, 0x2cb1, 0x2ebe, 0x34ea, 0x3d39, 0x4513, + 0x4d18, 0x5508, 0x5d14, 0x6105, 0x650a, 0x6d12, 0x7d0d, 0x7f11, + 0x813e, 0x830f, 0x8515, 0x8d61, 0x9964, 0xa15d, 0xa86e, 0xb117, + 0xb30b, 0xb86c, 0xc10b, 0xc916, 0xd110, 0xd91d, 0xe10c, 0xe84e, // Entry 100 - 13F - 0xf523, 0xf922, 0x0121, 0x0924, 0x1128, 0x192b, 0x2022, 0x2927, - 0x312a, 0x3726, 0x391e, 0x3d2c, 0x4130, 0x492f, 0x4ec1, 0x5518, - 0x646a, 0x747a, 0x7e7e, 0x809e, 0x8297, 0x852e, 0x9134, 0xa53c, - 0xac36, 0xb535, 0xb936, 0xbd3a, 0xd93f, 0xe541, 0xed5d, 0xef5d, - 0xf656, 0xfd61, 0x7c1f, 0x7ef3, 0x80f4, 0x82f5, 0x84f6, 0x86f7, - 0x88f8, 0x8af9, 0x8cfa, 0x8e6f, 0x90fc, 0x92fd, 0x94fe, 0x96ff, - 0x9900, 0x9b42, 0x9d43, 0x9f44, 0xa145, 0xa346, 0xa547, 0xa748, - 0xa949, 0xab4a, 0xad4b, 0xaf4c, 0xb14d, 0xb34e, 0xb54f, 0xb750, + 0xf11c, 0xf524, 0xf923, 0x0122, 0x0925, 0x1129, 0x192c, 0x2023, + 0x2928, 0x312b, 0x3727, 0x391f, 0x3d2d, 0x4131, 0x4930, 0x4ec2, + 0x5519, 0x646b, 0x747b, 0x7e7f, 0x809f, 0x8298, 0x852f, 0x9135, + 0xa53d, 0xac37, 0xb536, 0xb937, 0xbd3b, 0xd940, 0xe542, 0xed5e, + 0xef5e, 0xf657, 0xfd62, 0x7c20, 0x7ef4, 0x80f5, 0x82f6, 0x84f7, + 0x86f8, 0x88f9, 0x8afa, 0x8cfb, 0x8e70, 0x90fd, 0x92fe, 0x94ff, + 0x9700, 0x9901, 0x9b43, 0x9d44, 0x9f45, 0xa146, 0xa347, 0xa548, + 0xa749, 0xa94a, 0xab4b, 0xad4c, 0xaf4d, 0xb14e, 0xb34f, 0xb550, // Entry 140 - 17F - 0xb951, 0xbb52, 0xbd53, 0xbf54, 0xc155, 0xc356, 0xc557, 0xc758, - 0xc959, 0xcb5a, 0xcd5b, 0xcf64, + 0xb751, 0xb952, 0xbb53, 0xbd54, 0xbf55, 0xc156, 0xc357, 0xc558, + 0xc759, 0xc95a, 0xcb5b, 0xcd5c, 0xcf65, } -// Size: 1463 bytes +// Size: 1615 bytes var variantIndex = map[string]uint8{ "1606nict": 0x0, "1694acad": 0x1, "1901": 0x2, "1959acad": 0x3, - "1994": 0x45, + "1994": 0x4d, "1996": 0x4, "abl1943": 0x5, - "alalc97": 0x47, - "aluku": 0x6, - "ao1990": 0x7, - "arevela": 0x8, - "arevmda": 0x9, - "baku1926": 0xa, - "balanka": 0xb, - "barla": 0xc, - "basiceng": 0xd, - "bauddha": 0xe, - "biscayan": 0xf, - "biske": 0x40, - "bohoric": 0x10, - "boont": 0x11, - "colb1945": 0x12, - "cornu": 0x13, - "dajnko": 0x14, - "ekavsk": 0x15, - "emodeng": 0x16, - "fonipa": 0x48, - "fonnapa": 0x49, - "fonupa": 0x4a, - "fonxsamp": 0x4b, - "hepburn": 0x17, - "heploc": 0x46, - "hognorsk": 0x18, - "ijekavsk": 0x19, - "itihasa": 0x1a, - "jauer": 0x1b, - "jyutping": 0x1c, - "kkcor": 0x1d, - "kociewie": 0x1e, - "kscor": 0x1f, - "laukika": 0x20, - "lipaw": 0x41, - "luna1918": 0x21, - "metelko": 0x22, - "monoton": 0x23, - "ndyuka": 0x24, - "nedis": 0x25, - "newfound": 0x26, - "njiva": 0x42, - "nulik": 0x27, - "osojs": 0x43, - "oxendict": 0x28, - "pamaka": 0x29, - "petr1708": 0x2a, - "pinyin": 0x2b, - "polyton": 0x2c, - "puter": 0x2d, - "rigik": 0x2e, - "rozaj": 0x2f, - "rumgr": 0x30, - "scotland": 0x31, - "scouse": 0x32, - "simple": 0x4c, - "solba": 0x44, - "sotav": 0x33, - "surmiran": 0x34, - "sursilv": 0x35, - "sutsilv": 0x36, - "tarask": 0x37, - "uccor": 0x38, - "ucrcor": 0x39, - "ulster": 0x3a, - "unifon": 0x3b, - "vaidika": 0x3c, - "valencia": 0x3d, - "vallader": 0x3e, - "wadegile": 0x3f, + "akuapem": 0x6, + "alalc97": 0x4f, + "aluku": 0x7, + "ao1990": 0x8, + "arevela": 0x9, + "arevmda": 0xa, + "asante": 0xb, + "baku1926": 0xc, + "balanka": 0xd, + "barla": 0xe, + "basiceng": 0xf, + "bauddha": 0x10, + "biscayan": 0x11, + "biske": 0x48, + "bohoric": 0x12, + "boont": 0x13, + "colb1945": 0x14, + "cornu": 0x15, + "dajnko": 0x16, + "ekavsk": 0x17, + "emodeng": 0x18, + "fonipa": 0x50, + "fonnapa": 0x51, + "fonupa": 0x52, + "fonxsamp": 0x53, + "hepburn": 0x19, + "heploc": 0x4e, + "hognorsk": 0x1a, + "hsistemo": 0x1b, + "ijekavsk": 0x1c, + "itihasa": 0x1d, + "jauer": 0x1e, + "jyutping": 0x1f, + "kkcor": 0x20, + "kociewie": 0x21, + "kscor": 0x22, + "laukika": 0x23, + "lipaw": 0x49, + "luna1918": 0x24, + "metelko": 0x25, + "monoton": 0x26, + "ndyuka": 0x27, + "nedis": 0x28, + "newfound": 0x29, + "njiva": 0x4a, + "nulik": 0x2a, + "osojs": 0x4b, + "oxendict": 0x2b, + "pahawh2": 0x2c, + "pahawh3": 0x2d, + "pahawh4": 0x2e, + "pamaka": 0x2f, + "petr1708": 0x30, + "pinyin": 0x31, + "polyton": 0x32, + "puter": 0x33, + "rigik": 0x34, + "rozaj": 0x35, + "rumgr": 0x36, + "scotland": 0x37, + "scouse": 0x38, + "simple": 0x54, + "solba": 0x4c, + "sotav": 0x39, + "spanglis": 0x3a, + "surmiran": 0x3b, + "sursilv": 0x3c, + "sutsilv": 0x3d, + "tarask": 0x3e, + "uccor": 0x3f, + "ucrcor": 0x40, + "ulster": 0x41, + "unifon": 0x42, + "vaidika": 0x43, + "valencia": 0x44, + "vallader": 0x45, + "wadegile": 0x46, + "xsistemo": 0x47, } // variantNumSpecialized is the number of specialized variants in variants. -const variantNumSpecialized = 71 +const variantNumSpecialized = 79 // nRegionGroups is the number of region groups. -const nRegionGroups = 32 +const nRegionGroups = 33 type likelyLangRegion struct { lang uint16 @@ -1345,147 +1356,147 @@ type likelyLangRegion struct { // likelyScript is a lookup table, indexed by scriptID, for the most likely // languages and regions given a script. -// Size: 928 bytes, 232 elements -var likelyScript = [232]likelyLangRegion{ - 1: {lang: 0x14d, region: 0x83}, - 3: {lang: 0x2a0, region: 0x105}, - 4: {lang: 0x1f, region: 0x98}, - 5: {lang: 0x3a, region: 0x6a}, - 7: {lang: 0x3b, region: 0x9b}, - 8: {lang: 0x1d5, region: 0x27}, - 9: {lang: 0x13, region: 0x9b}, - 10: {lang: 0x5b, region: 0x94}, - 11: {lang: 0x60, region: 0x51}, - 12: {lang: 0xb9, region: 0xb3}, - 13: {lang: 0x63, region: 0x94}, - 14: {lang: 0xa5, region: 0x34}, - 15: {lang: 0x3e7, region: 0x98}, - 17: {lang: 0x527, region: 0x12d}, - 18: {lang: 0x3af, region: 0x98}, - 19: {lang: 0x15d, region: 0x77}, - 20: {lang: 0xc2, region: 0x94}, - 21: {lang: 0x9d, region: 0xe6}, - 22: {lang: 0xdb, region: 0x34}, - 23: {lang: 0xf2, region: 0x48}, - 24: {lang: 0x4ee, region: 0x12a}, - 25: {lang: 0xe7, region: 0x13d}, - 26: {lang: 0xe5, region: 0x134}, - 28: {lang: 0xf0, region: 0x6a}, - 29: {lang: 0x19e, region: 0x5c}, - 30: {lang: 0x3e0, region: 0x105}, - 32: {lang: 0x1bc, region: 0x98}, - 34: {lang: 0x15d, region: 0x77}, - 37: {lang: 0x132, region: 0x6a}, - 38: {lang: 0x42f, region: 0x26}, - 39: {lang: 0x27, region: 0x6e}, - 41: {lang: 0x20e, region: 0x7c}, - 42: {lang: 0xfd, region: 0x37}, - 43: {lang: 0x19c, region: 0x12f}, - 44: {lang: 0x3e7, region: 0x98}, - 45: {lang: 0x135, region: 0x86}, - 46: {lang: 0x1a2, region: 0x98}, - 47: {lang: 0x39b, region: 0x98}, - 48: {lang: 0x527, region: 0x12d}, - 49: {lang: 0x252, region: 0xaa}, - 50: {lang: 0x527, region: 0x52}, - 51: {lang: 0x1c9, region: 0xe6}, - 52: {lang: 0x527, region: 0x52}, - 53: {lang: 0x527, region: 0x12d}, - 54: {lang: 0x2fb, region: 0x9a}, - 55: {lang: 0x1ba, region: 0x96}, - 56: {lang: 0x1fe, region: 0xa1}, - 57: {lang: 0x1c3, region: 0x12a}, - 58: {lang: 0x1c8, region: 0xae}, - 60: {lang: 0x1d3, region: 0x91}, - 62: {lang: 0x141, region: 0x9d}, - 63: {lang: 0x252, region: 0xaa}, - 64: {lang: 0x20c, region: 0x94}, - 65: {lang: 0x1fe, region: 0xa1}, - 67: {lang: 0x134, region: 0xc3}, - 68: {lang: 0x1fe, region: 0xa1}, - 69: {lang: 0x3b9, region: 0xe7}, - 70: {lang: 0x248, region: 0xa5}, - 71: {lang: 0x3f8, region: 0x98}, - 74: {lang: 0x24f, region: 0x98}, - 75: {lang: 0x252, region: 0xaa}, - 77: {lang: 0x88, region: 0x98}, - 78: {lang: 0x36e, region: 0x122}, - 79: {lang: 0x2b6, region: 0xae}, - 84: {lang: 0x29d, region: 0x98}, - 85: {lang: 0x2a6, region: 0x98}, - 86: {lang: 0x28d, region: 0x86}, - 87: {lang: 0x19e, region: 0x86}, - 88: {lang: 0x2aa, region: 0x52}, - 90: {lang: 0x4f2, region: 0x12a}, - 91: {lang: 0x4f3, region: 0x12a}, - 92: {lang: 0x1bc, region: 0x98}, - 93: {lang: 0x335, region: 0x9b}, - 94: {lang: 0x4f5, region: 0x52}, - 95: {lang: 0xa9, region: 0x52}, - 97: {lang: 0x2e6, region: 0x111}, - 98: {lang: 0x4f6, region: 0x10a}, - 99: {lang: 0x4f6, region: 0x10a}, - 100: {lang: 0x302, region: 0x98}, - 101: {lang: 0x319, region: 0x98}, - 102: {lang: 0x309, region: 0x52}, - 104: {lang: 0x31c, region: 0x34}, - 105: {lang: 0x30c, region: 0x98}, - 106: {lang: 0x412, region: 0xe7}, - 107: {lang: 0x32f, region: 0xc3}, - 108: {lang: 0x4f7, region: 0x107}, - 109: {lang: 0x3b, region: 0xa0}, - 110: {lang: 0x351, region: 0xda}, - 112: {lang: 0x2ce, region: 0x83}, - 114: {lang: 0x401, region: 0x95}, - 115: {lang: 0x3ec, region: 0x98}, - 116: {lang: 0x399, region: 0xc4}, - 117: {lang: 0x393, region: 0x98}, - 118: {lang: 0x397, region: 0x134}, - 119: {lang: 0x427, region: 0x114}, - 120: {lang: 0x3b, region: 0x11b}, - 121: {lang: 0xfc, region: 0xc3}, - 122: {lang: 0x27b, region: 0x105}, - 123: {lang: 0x2c7, region: 0x52}, - 124: {lang: 0x39d, region: 0x9b}, - 125: {lang: 0x39d, region: 0x52}, - 127: {lang: 0x3ab, region: 0xaf}, - 129: {lang: 0x1c4, region: 0x52}, - 130: {lang: 0x4fb, region: 0x9b}, - 181: {lang: 0x3c9, region: 0x94}, - 183: {lang: 0x370, region: 0x10b}, - 184: {lang: 0x41e, region: 0x96}, - 186: {lang: 0x4fd, region: 0x15d}, - 187: {lang: 0x3ee, region: 0x98}, - 188: {lang: 0x45, region: 0x134}, - 189: {lang: 0x138, region: 0x7a}, - 190: {lang: 0x3e7, region: 0x98}, - 191: {lang: 0x3e7, region: 0x98}, - 192: {lang: 0x3f8, region: 0x98}, - 193: {lang: 0x40a, region: 0xb2}, - 194: {lang: 0x431, region: 0x98}, - 195: {lang: 0x43c, region: 0x94}, - 196: {lang: 0x44b, region: 0x34}, - 197: {lang: 0x44c, region: 0x9a}, - 201: {lang: 0x458, region: 0xe6}, - 202: {lang: 0x119, region: 0x98}, - 203: {lang: 0x45c, region: 0x52}, - 204: {lang: 0x230, region: 0x52}, - 205: {lang: 0x44e, region: 0x98}, - 206: {lang: 0x4a3, region: 0x52}, - 207: {lang: 0x9f, region: 0x13d}, - 208: {lang: 0x45f, region: 0x98}, - 210: {lang: 0x526, region: 0xb9}, - 211: {lang: 0x152, region: 0xe6}, - 212: {lang: 0x127, region: 0xcc}, - 213: {lang: 0x469, region: 0x122}, - 214: {lang: 0xa9, region: 0x52}, - 215: {lang: 0x2cc, region: 0x98}, - 216: {lang: 0x4ab, region: 0x11b}, - 217: {lang: 0x4bc, region: 0xb3}, - 219: {lang: 0x1cc, region: 0x98}, - 221: {lang: 0x3a7, region: 0x9b}, - 222: {lang: 0x22, region: 0x9a}, - 223: {lang: 0x1e8, region: 0x52}, +// Size: 956 bytes, 239 elements +var likelyScript = [239]likelyLangRegion{ + 1: {lang: 0x14d, region: 0x84}, + 3: {lang: 0x2a0, region: 0x106}, + 4: {lang: 0x1f, region: 0x99}, + 5: {lang: 0x3a, region: 0x6b}, + 7: {lang: 0x3b, region: 0x9c}, + 8: {lang: 0x1d5, region: 0x28}, + 9: {lang: 0x13, region: 0x9c}, + 10: {lang: 0x5b, region: 0x95}, + 11: {lang: 0x60, region: 0x52}, + 12: {lang: 0xb9, region: 0xb4}, + 13: {lang: 0x63, region: 0x95}, + 14: {lang: 0xa5, region: 0x35}, + 15: {lang: 0x3e7, region: 0x99}, + 17: {lang: 0x527, region: 0x12e}, + 18: {lang: 0x3af, region: 0x99}, + 19: {lang: 0x15d, region: 0x78}, + 20: {lang: 0xc2, region: 0x95}, + 21: {lang: 0x9d, region: 0xe7}, + 22: {lang: 0xdb, region: 0x35}, + 23: {lang: 0xf2, region: 0x49}, + 24: {lang: 0x4ee, region: 0x12b}, + 25: {lang: 0xe7, region: 0x13e}, + 26: {lang: 0xe5, region: 0x135}, + 28: {lang: 0xf0, region: 0x6b}, + 29: {lang: 0x19e, region: 0x5d}, + 30: {lang: 0x3e0, region: 0x106}, + 32: {lang: 0x1bc, region: 0x99}, + 35: {lang: 0x15d, region: 0x78}, + 38: {lang: 0x132, region: 0x6b}, + 39: {lang: 0x42f, region: 0x27}, + 40: {lang: 0x27, region: 0x6f}, + 42: {lang: 0x20e, region: 0x7d}, + 43: {lang: 0xfd, region: 0x38}, + 46: {lang: 0x19c, region: 0x130}, + 47: {lang: 0x3e7, region: 0x99}, + 48: {lang: 0x135, region: 0x87}, + 49: {lang: 0x1a2, region: 0x99}, + 50: {lang: 0x39b, region: 0x99}, + 51: {lang: 0x527, region: 0x12e}, + 52: {lang: 0x252, region: 0xab}, + 53: {lang: 0x527, region: 0x53}, + 54: {lang: 0x1c9, region: 0xe7}, + 55: {lang: 0x527, region: 0x53}, + 56: {lang: 0x527, region: 0x12e}, + 57: {lang: 0x2fb, region: 0x9b}, + 58: {lang: 0x1ba, region: 0x97}, + 59: {lang: 0x1fe, region: 0xa2}, + 60: {lang: 0x1c3, region: 0x12b}, + 61: {lang: 0x1c8, region: 0xaf}, + 63: {lang: 0x1d3, region: 0x92}, + 65: {lang: 0x141, region: 0x9e}, + 66: {lang: 0x252, region: 0xab}, + 67: {lang: 0x20c, region: 0x95}, + 68: {lang: 0x1fe, region: 0xa2}, + 70: {lang: 0x134, region: 0xc4}, + 71: {lang: 0x1fe, region: 0xa2}, + 72: {lang: 0x3b9, region: 0xe8}, + 73: {lang: 0x248, region: 0xa6}, + 74: {lang: 0x3f8, region: 0x99}, + 77: {lang: 0x24f, region: 0x99}, + 78: {lang: 0x252, region: 0xab}, + 80: {lang: 0x88, region: 0x99}, + 81: {lang: 0x36e, region: 0x123}, + 82: {lang: 0x2b6, region: 0xaf}, + 87: {lang: 0x29d, region: 0x99}, + 88: {lang: 0x2a6, region: 0x99}, + 89: {lang: 0x28d, region: 0x87}, + 90: {lang: 0x19e, region: 0x87}, + 91: {lang: 0x2aa, region: 0x53}, + 93: {lang: 0x4f2, region: 0x12b}, + 94: {lang: 0x4f3, region: 0x12b}, + 95: {lang: 0x1bc, region: 0x99}, + 97: {lang: 0x335, region: 0x9c}, + 98: {lang: 0x4f5, region: 0x53}, + 99: {lang: 0xa9, region: 0x53}, + 102: {lang: 0x2e6, region: 0x112}, + 103: {lang: 0x4f6, region: 0x10b}, + 104: {lang: 0x4f6, region: 0x10b}, + 105: {lang: 0x302, region: 0x99}, + 106: {lang: 0x319, region: 0x99}, + 107: {lang: 0x309, region: 0x53}, + 109: {lang: 0x31c, region: 0x35}, + 110: {lang: 0x30c, region: 0x99}, + 111: {lang: 0x412, region: 0xe8}, + 112: {lang: 0x32f, region: 0xc4}, + 113: {lang: 0x4f7, region: 0x108}, + 114: {lang: 0x3b, region: 0xa1}, + 115: {lang: 0x351, region: 0xdb}, + 117: {lang: 0x2ce, region: 0x84}, + 119: {lang: 0x401, region: 0x96}, + 120: {lang: 0x3ec, region: 0x99}, + 121: {lang: 0x399, region: 0xc5}, + 122: {lang: 0x393, region: 0x99}, + 123: {lang: 0x397, region: 0x135}, + 124: {lang: 0x427, region: 0x115}, + 125: {lang: 0x3b, region: 0x11c}, + 126: {lang: 0xfc, region: 0xc4}, + 127: {lang: 0x27b, region: 0x106}, + 128: {lang: 0x2c7, region: 0x53}, + 129: {lang: 0x39d, region: 0x9c}, + 130: {lang: 0x39d, region: 0x53}, + 132: {lang: 0x3ab, region: 0xb0}, + 134: {lang: 0x1c4, region: 0x53}, + 135: {lang: 0x4fb, region: 0x9c}, + 186: {lang: 0x3c9, region: 0x95}, + 188: {lang: 0x370, region: 0x10c}, + 189: {lang: 0x41e, region: 0x97}, + 191: {lang: 0x4fd, region: 0x15e}, + 192: {lang: 0x3ee, region: 0x99}, + 193: {lang: 0x45, region: 0x135}, + 194: {lang: 0x138, region: 0x7b}, + 195: {lang: 0x3e7, region: 0x99}, + 196: {lang: 0x3e7, region: 0x99}, + 197: {lang: 0x3f8, region: 0x99}, + 198: {lang: 0x40a, region: 0xb3}, + 199: {lang: 0x431, region: 0x99}, + 201: {lang: 0x43c, region: 0x95}, + 202: {lang: 0x44b, region: 0x35}, + 203: {lang: 0x44c, region: 0x9b}, + 207: {lang: 0x458, region: 0xe7}, + 208: {lang: 0x119, region: 0x99}, + 209: {lang: 0x45c, region: 0x53}, + 210: {lang: 0x230, region: 0x53}, + 211: {lang: 0x44e, region: 0x99}, + 212: {lang: 0x4a3, region: 0x53}, + 213: {lang: 0x9f, region: 0x13e}, + 214: {lang: 0x45f, region: 0x99}, + 216: {lang: 0x526, region: 0xba}, + 217: {lang: 0x152, region: 0xe7}, + 218: {lang: 0x127, region: 0xcd}, + 219: {lang: 0x469, region: 0x123}, + 220: {lang: 0xa9, region: 0x53}, + 221: {lang: 0x2cc, region: 0x99}, + 222: {lang: 0x4ab, region: 0x11c}, + 223: {lang: 0x4bc, region: 0xb4}, + 225: {lang: 0x1cc, region: 0x99}, + 227: {lang: 0x3a7, region: 0x9c}, + 228: {lang: 0x22, region: 0x9b}, + 229: {lang: 0x1e8, region: 0x53}, } type likelyScriptRegion struct { @@ -1500,1417 +1511,1417 @@ type likelyScriptRegion struct { // of the list in likelyLangList. // Size: 5308 bytes, 1327 elements var likelyLang = [1327]likelyScriptRegion{ - 0: {region: 0x134, script: 0x52, flags: 0x0}, - 1: {region: 0x6e, script: 0x52, flags: 0x0}, - 2: {region: 0x164, script: 0x52, flags: 0x0}, - 3: {region: 0x164, script: 0x52, flags: 0x0}, - 4: {region: 0x164, script: 0x52, flags: 0x0}, - 5: {region: 0x7c, script: 0x1e, flags: 0x0}, - 6: {region: 0x164, script: 0x52, flags: 0x0}, - 7: {region: 0x164, script: 0x1e, flags: 0x0}, - 8: {region: 0x7f, script: 0x52, flags: 0x0}, - 9: {region: 0x164, script: 0x52, flags: 0x0}, - 10: {region: 0x164, script: 0x52, flags: 0x0}, - 11: {region: 0x164, script: 0x52, flags: 0x0}, - 12: {region: 0x94, script: 0x52, flags: 0x0}, - 13: {region: 0x130, script: 0x52, flags: 0x0}, - 14: {region: 0x7f, script: 0x52, flags: 0x0}, - 15: {region: 0x164, script: 0x52, flags: 0x0}, - 16: {region: 0x164, script: 0x52, flags: 0x0}, - 17: {region: 0x105, script: 0x1e, flags: 0x0}, - 18: {region: 0x164, script: 0x52, flags: 0x0}, - 19: {region: 0x9b, script: 0x9, flags: 0x0}, - 20: {region: 0x127, script: 0x5, flags: 0x0}, - 21: {region: 0x164, script: 0x52, flags: 0x0}, - 22: {region: 0x160, script: 0x52, flags: 0x0}, - 23: {region: 0x164, script: 0x52, flags: 0x0}, - 24: {region: 0x164, script: 0x52, flags: 0x0}, - 25: {region: 0x164, script: 0x52, flags: 0x0}, - 26: {region: 0x164, script: 0x52, flags: 0x0}, - 27: {region: 0x164, script: 0x52, flags: 0x0}, - 28: {region: 0x51, script: 0x52, flags: 0x0}, - 29: {region: 0x164, script: 0x52, flags: 0x0}, - 30: {region: 0x164, script: 0x52, flags: 0x0}, - 31: {region: 0x98, script: 0x4, flags: 0x0}, - 32: {region: 0x164, script: 0x52, flags: 0x0}, - 33: {region: 0x7f, script: 0x52, flags: 0x0}, - 34: {region: 0x9a, script: 0xde, flags: 0x0}, - 35: {region: 0x164, script: 0x52, flags: 0x0}, - 36: {region: 0x164, script: 0x52, flags: 0x0}, - 37: {region: 0x14c, script: 0x52, flags: 0x0}, - 38: {region: 0x105, script: 0x1e, flags: 0x0}, - 39: {region: 0x6e, script: 0x27, flags: 0x0}, - 40: {region: 0x164, script: 0x52, flags: 0x0}, - 41: {region: 0x164, script: 0x52, flags: 0x0}, - 42: {region: 0xd5, script: 0x52, flags: 0x0}, - 43: {region: 0x164, script: 0x52, flags: 0x0}, - 45: {region: 0x164, script: 0x52, flags: 0x0}, - 46: {region: 0x164, script: 0x52, flags: 0x0}, - 47: {region: 0x164, script: 0x52, flags: 0x0}, - 48: {region: 0x164, script: 0x52, flags: 0x0}, - 49: {region: 0x164, script: 0x52, flags: 0x0}, - 50: {region: 0x164, script: 0x52, flags: 0x0}, - 51: {region: 0x94, script: 0x52, flags: 0x0}, - 52: {region: 0x164, script: 0x5, flags: 0x0}, - 53: {region: 0x121, script: 0x5, flags: 0x0}, - 54: {region: 0x164, script: 0x52, flags: 0x0}, - 55: {region: 0x164, script: 0x52, flags: 0x0}, - 56: {region: 0x164, script: 0x52, flags: 0x0}, - 57: {region: 0x164, script: 0x52, flags: 0x0}, - 58: {region: 0x6a, script: 0x5, flags: 0x0}, + 0: {region: 0x135, script: 0x55, flags: 0x0}, + 1: {region: 0x6f, script: 0x55, flags: 0x0}, + 2: {region: 0x165, script: 0x55, flags: 0x0}, + 3: {region: 0x165, script: 0x55, flags: 0x0}, + 4: {region: 0x165, script: 0x55, flags: 0x0}, + 5: {region: 0x7d, script: 0x1e, flags: 0x0}, + 6: {region: 0x165, script: 0x55, flags: 0x0}, + 7: {region: 0x165, script: 0x1e, flags: 0x0}, + 8: {region: 0x80, script: 0x55, flags: 0x0}, + 9: {region: 0x165, script: 0x55, flags: 0x0}, + 10: {region: 0x165, script: 0x55, flags: 0x0}, + 11: {region: 0x165, script: 0x55, flags: 0x0}, + 12: {region: 0x95, script: 0x55, flags: 0x0}, + 13: {region: 0x131, script: 0x55, flags: 0x0}, + 14: {region: 0x80, script: 0x55, flags: 0x0}, + 15: {region: 0x165, script: 0x55, flags: 0x0}, + 16: {region: 0x165, script: 0x55, flags: 0x0}, + 17: {region: 0x106, script: 0x1e, flags: 0x0}, + 18: {region: 0x165, script: 0x55, flags: 0x0}, + 19: {region: 0x9c, script: 0x9, flags: 0x0}, + 20: {region: 0x128, script: 0x5, flags: 0x0}, + 21: {region: 0x165, script: 0x55, flags: 0x0}, + 22: {region: 0x161, script: 0x55, flags: 0x0}, + 23: {region: 0x165, script: 0x55, flags: 0x0}, + 24: {region: 0x165, script: 0x55, flags: 0x0}, + 25: {region: 0x165, script: 0x55, flags: 0x0}, + 26: {region: 0x165, script: 0x55, flags: 0x0}, + 27: {region: 0x165, script: 0x55, flags: 0x0}, + 28: {region: 0x52, script: 0x55, flags: 0x0}, + 29: {region: 0x165, script: 0x55, flags: 0x0}, + 30: {region: 0x165, script: 0x55, flags: 0x0}, + 31: {region: 0x99, script: 0x4, flags: 0x0}, + 32: {region: 0x165, script: 0x55, flags: 0x0}, + 33: {region: 0x80, script: 0x55, flags: 0x0}, + 34: {region: 0x9b, script: 0xe4, flags: 0x0}, + 35: {region: 0x165, script: 0x55, flags: 0x0}, + 36: {region: 0x165, script: 0x55, flags: 0x0}, + 37: {region: 0x14d, script: 0x55, flags: 0x0}, + 38: {region: 0x106, script: 0x1e, flags: 0x0}, + 39: {region: 0x6f, script: 0x28, flags: 0x0}, + 40: {region: 0x165, script: 0x55, flags: 0x0}, + 41: {region: 0x165, script: 0x55, flags: 0x0}, + 42: {region: 0xd6, script: 0x55, flags: 0x0}, + 43: {region: 0x165, script: 0x55, flags: 0x0}, + 45: {region: 0x165, script: 0x55, flags: 0x0}, + 46: {region: 0x165, script: 0x55, flags: 0x0}, + 47: {region: 0x165, script: 0x55, flags: 0x0}, + 48: {region: 0x165, script: 0x55, flags: 0x0}, + 49: {region: 0x165, script: 0x55, flags: 0x0}, + 50: {region: 0x165, script: 0x55, flags: 0x0}, + 51: {region: 0x95, script: 0x55, flags: 0x0}, + 52: {region: 0x165, script: 0x5, flags: 0x0}, + 53: {region: 0x122, script: 0x5, flags: 0x0}, + 54: {region: 0x165, script: 0x55, flags: 0x0}, + 55: {region: 0x165, script: 0x55, flags: 0x0}, + 56: {region: 0x165, script: 0x55, flags: 0x0}, + 57: {region: 0x165, script: 0x55, flags: 0x0}, + 58: {region: 0x6b, script: 0x5, flags: 0x0}, 59: {region: 0x0, script: 0x3, flags: 0x1}, - 60: {region: 0x164, script: 0x52, flags: 0x0}, - 61: {region: 0x50, script: 0x52, flags: 0x0}, - 62: {region: 0x3e, script: 0x52, flags: 0x0}, - 63: {region: 0x66, script: 0x5, flags: 0x0}, - 65: {region: 0xb9, script: 0x5, flags: 0x0}, - 66: {region: 0x6a, script: 0x5, flags: 0x0}, - 67: {region: 0x98, script: 0xe, flags: 0x0}, - 68: {region: 0x12e, script: 0x52, flags: 0x0}, - 69: {region: 0x134, script: 0xbc, flags: 0x0}, - 70: {region: 0x164, script: 0x52, flags: 0x0}, - 71: {region: 0x164, script: 0x52, flags: 0x0}, - 72: {region: 0x6d, script: 0x52, flags: 0x0}, - 73: {region: 0x164, script: 0x52, flags: 0x0}, - 74: {region: 0x164, script: 0x52, flags: 0x0}, - 75: {region: 0x48, script: 0x52, flags: 0x0}, - 76: {region: 0x164, script: 0x52, flags: 0x0}, - 77: {region: 0x105, script: 0x1e, flags: 0x0}, - 78: {region: 0x164, script: 0x5, flags: 0x0}, - 79: {region: 0x164, script: 0x52, flags: 0x0}, - 80: {region: 0x164, script: 0x52, flags: 0x0}, - 81: {region: 0x164, script: 0x52, flags: 0x0}, - 82: {region: 0x98, script: 0x20, flags: 0x0}, - 83: {region: 0x164, script: 0x52, flags: 0x0}, - 84: {region: 0x164, script: 0x52, flags: 0x0}, - 85: {region: 0x164, script: 0x52, flags: 0x0}, - 86: {region: 0x3e, script: 0x52, flags: 0x0}, - 87: {region: 0x164, script: 0x52, flags: 0x0}, + 60: {region: 0x165, script: 0x55, flags: 0x0}, + 61: {region: 0x51, script: 0x55, flags: 0x0}, + 62: {region: 0x3f, script: 0x55, flags: 0x0}, + 63: {region: 0x67, script: 0x5, flags: 0x0}, + 65: {region: 0xba, script: 0x5, flags: 0x0}, + 66: {region: 0x6b, script: 0x5, flags: 0x0}, + 67: {region: 0x99, script: 0xe, flags: 0x0}, + 68: {region: 0x12f, script: 0x55, flags: 0x0}, + 69: {region: 0x135, script: 0xc1, flags: 0x0}, + 70: {region: 0x165, script: 0x55, flags: 0x0}, + 71: {region: 0x165, script: 0x55, flags: 0x0}, + 72: {region: 0x6e, script: 0x55, flags: 0x0}, + 73: {region: 0x165, script: 0x55, flags: 0x0}, + 74: {region: 0x165, script: 0x55, flags: 0x0}, + 75: {region: 0x49, script: 0x55, flags: 0x0}, + 76: {region: 0x165, script: 0x55, flags: 0x0}, + 77: {region: 0x106, script: 0x1e, flags: 0x0}, + 78: {region: 0x165, script: 0x5, flags: 0x0}, + 79: {region: 0x165, script: 0x55, flags: 0x0}, + 80: {region: 0x165, script: 0x55, flags: 0x0}, + 81: {region: 0x165, script: 0x55, flags: 0x0}, + 82: {region: 0x99, script: 0x20, flags: 0x0}, + 83: {region: 0x165, script: 0x55, flags: 0x0}, + 84: {region: 0x165, script: 0x55, flags: 0x0}, + 85: {region: 0x165, script: 0x55, flags: 0x0}, + 86: {region: 0x3f, script: 0x55, flags: 0x0}, + 87: {region: 0x165, script: 0x55, flags: 0x0}, 88: {region: 0x3, script: 0x5, flags: 0x1}, - 89: {region: 0x105, script: 0x1e, flags: 0x0}, - 90: {region: 0xe7, script: 0x5, flags: 0x0}, - 91: {region: 0x94, script: 0x52, flags: 0x0}, - 92: {region: 0xda, script: 0x20, flags: 0x0}, - 93: {region: 0x2d, script: 0x52, flags: 0x0}, - 94: {region: 0x51, script: 0x52, flags: 0x0}, - 95: {region: 0x164, script: 0x52, flags: 0x0}, - 96: {region: 0x51, script: 0xb, flags: 0x0}, - 97: {region: 0x164, script: 0x52, flags: 0x0}, - 98: {region: 0x164, script: 0x52, flags: 0x0}, - 99: {region: 0x94, script: 0x52, flags: 0x0}, - 100: {region: 0x164, script: 0x52, flags: 0x0}, - 101: {region: 0x51, script: 0x52, flags: 0x0}, - 102: {region: 0x164, script: 0x52, flags: 0x0}, - 103: {region: 0x164, script: 0x52, flags: 0x0}, - 104: {region: 0x164, script: 0x52, flags: 0x0}, - 105: {region: 0x164, script: 0x52, flags: 0x0}, - 106: {region: 0x4e, script: 0x52, flags: 0x0}, - 107: {region: 0x164, script: 0x52, flags: 0x0}, - 108: {region: 0x164, script: 0x52, flags: 0x0}, - 109: {region: 0x164, script: 0x52, flags: 0x0}, - 110: {region: 0x164, script: 0x27, flags: 0x0}, - 111: {region: 0x164, script: 0x52, flags: 0x0}, - 112: {region: 0x164, script: 0x52, flags: 0x0}, - 113: {region: 0x46, script: 0x1e, flags: 0x0}, - 114: {region: 0x164, script: 0x52, flags: 0x0}, - 115: {region: 0x164, script: 0x52, flags: 0x0}, - 116: {region: 0x10a, script: 0x5, flags: 0x0}, - 117: {region: 0x161, script: 0x52, flags: 0x0}, - 118: {region: 0x164, script: 0x52, flags: 0x0}, - 119: {region: 0x94, script: 0x52, flags: 0x0}, - 120: {region: 0x164, script: 0x52, flags: 0x0}, - 121: {region: 0x12e, script: 0x52, flags: 0x0}, - 122: {region: 0x51, script: 0x52, flags: 0x0}, - 123: {region: 0x98, script: 0xcd, flags: 0x0}, - 124: {region: 0xe7, script: 0x5, flags: 0x0}, - 125: {region: 0x98, script: 0x20, flags: 0x0}, - 126: {region: 0x37, script: 0x1e, flags: 0x0}, - 127: {region: 0x98, script: 0x20, flags: 0x0}, - 128: {region: 0xe7, script: 0x5, flags: 0x0}, - 129: {region: 0x12a, script: 0x2d, flags: 0x0}, - 131: {region: 0x98, script: 0x20, flags: 0x0}, - 132: {region: 0x164, script: 0x52, flags: 0x0}, - 133: {region: 0x98, script: 0x20, flags: 0x0}, - 134: {region: 0xe6, script: 0x52, flags: 0x0}, - 135: {region: 0x164, script: 0x52, flags: 0x0}, - 136: {region: 0x98, script: 0x20, flags: 0x0}, - 137: {region: 0x164, script: 0x52, flags: 0x0}, - 138: {region: 0x13e, script: 0x52, flags: 0x0}, - 139: {region: 0x164, script: 0x52, flags: 0x0}, - 140: {region: 0x164, script: 0x52, flags: 0x0}, - 141: {region: 0xe6, script: 0x52, flags: 0x0}, - 142: {region: 0x164, script: 0x52, flags: 0x0}, - 143: {region: 0xd5, script: 0x52, flags: 0x0}, - 144: {region: 0x164, script: 0x52, flags: 0x0}, - 145: {region: 0x164, script: 0x52, flags: 0x0}, - 146: {region: 0x164, script: 0x52, flags: 0x0}, - 147: {region: 0x164, script: 0x27, flags: 0x0}, - 148: {region: 0x98, script: 0x20, flags: 0x0}, - 149: {region: 0x94, script: 0x52, flags: 0x0}, - 150: {region: 0x164, script: 0x52, flags: 0x0}, - 151: {region: 0x164, script: 0x52, flags: 0x0}, - 152: {region: 0x113, script: 0x52, flags: 0x0}, - 153: {region: 0x164, script: 0x52, flags: 0x0}, - 154: {region: 0x164, script: 0x52, flags: 0x0}, - 155: {region: 0x51, script: 0x52, flags: 0x0}, - 156: {region: 0x164, script: 0x52, flags: 0x0}, - 157: {region: 0xe6, script: 0x52, flags: 0x0}, - 158: {region: 0x164, script: 0x52, flags: 0x0}, - 159: {region: 0x13d, script: 0xcf, flags: 0x0}, - 160: {region: 0xc2, script: 0x52, flags: 0x0}, - 161: {region: 0x164, script: 0x52, flags: 0x0}, - 162: {region: 0x164, script: 0x52, flags: 0x0}, - 163: {region: 0xc2, script: 0x52, flags: 0x0}, - 164: {region: 0x164, script: 0x52, flags: 0x0}, - 165: {region: 0x34, script: 0xe, flags: 0x0}, - 166: {region: 0x164, script: 0x52, flags: 0x0}, - 167: {region: 0x164, script: 0x52, flags: 0x0}, - 168: {region: 0x164, script: 0x52, flags: 0x0}, - 169: {region: 0x52, script: 0xd6, flags: 0x0}, - 170: {region: 0x164, script: 0x52, flags: 0x0}, - 171: {region: 0x164, script: 0x52, flags: 0x0}, - 172: {region: 0x164, script: 0x52, flags: 0x0}, - 173: {region: 0x98, script: 0xe, flags: 0x0}, - 174: {region: 0x164, script: 0x52, flags: 0x0}, - 175: {region: 0x9b, script: 0x5, flags: 0x0}, - 176: {region: 0x164, script: 0x52, flags: 0x0}, - 177: {region: 0x4e, script: 0x52, flags: 0x0}, - 178: {region: 0x77, script: 0x52, flags: 0x0}, - 179: {region: 0x98, script: 0x20, flags: 0x0}, - 180: {region: 0xe7, script: 0x5, flags: 0x0}, - 181: {region: 0x98, script: 0x20, flags: 0x0}, - 182: {region: 0x164, script: 0x52, flags: 0x0}, - 183: {region: 0x32, script: 0x52, flags: 0x0}, - 184: {region: 0x164, script: 0x52, flags: 0x0}, - 185: {region: 0xb3, script: 0xc, flags: 0x0}, - 186: {region: 0x51, script: 0x52, flags: 0x0}, - 187: {region: 0x164, script: 0x27, flags: 0x0}, - 188: {region: 0xe6, script: 0x52, flags: 0x0}, - 189: {region: 0x164, script: 0x52, flags: 0x0}, - 190: {region: 0xe7, script: 0x20, flags: 0x0}, - 191: {region: 0x105, script: 0x1e, flags: 0x0}, - 192: {region: 0x15e, script: 0x52, flags: 0x0}, - 193: {region: 0x164, script: 0x52, flags: 0x0}, - 194: {region: 0x94, script: 0x52, flags: 0x0}, - 195: {region: 0x164, script: 0x52, flags: 0x0}, - 196: {region: 0x51, script: 0x52, flags: 0x0}, - 197: {region: 0x164, script: 0x52, flags: 0x0}, - 198: {region: 0x164, script: 0x52, flags: 0x0}, - 199: {region: 0x164, script: 0x52, flags: 0x0}, - 200: {region: 0x85, script: 0x52, flags: 0x0}, - 201: {region: 0x164, script: 0x52, flags: 0x0}, - 202: {region: 0x164, script: 0x52, flags: 0x0}, - 203: {region: 0x164, script: 0x52, flags: 0x0}, - 204: {region: 0x164, script: 0x52, flags: 0x0}, - 205: {region: 0x6c, script: 0x27, flags: 0x0}, - 206: {region: 0x164, script: 0x52, flags: 0x0}, - 207: {region: 0x164, script: 0x52, flags: 0x0}, - 208: {region: 0x51, script: 0x52, flags: 0x0}, - 209: {region: 0x164, script: 0x52, flags: 0x0}, - 210: {region: 0x164, script: 0x52, flags: 0x0}, - 211: {region: 0xc2, script: 0x52, flags: 0x0}, - 212: {region: 0x164, script: 0x52, flags: 0x0}, - 213: {region: 0x164, script: 0x52, flags: 0x0}, - 214: {region: 0x164, script: 0x52, flags: 0x0}, - 215: {region: 0x6d, script: 0x52, flags: 0x0}, - 216: {region: 0x164, script: 0x52, flags: 0x0}, - 217: {region: 0x164, script: 0x52, flags: 0x0}, - 218: {region: 0xd5, script: 0x52, flags: 0x0}, - 219: {region: 0x34, script: 0x16, flags: 0x0}, - 220: {region: 0x105, script: 0x1e, flags: 0x0}, - 221: {region: 0xe6, script: 0x52, flags: 0x0}, - 222: {region: 0x164, script: 0x52, flags: 0x0}, - 223: {region: 0x130, script: 0x52, flags: 0x0}, - 224: {region: 0x89, script: 0x52, flags: 0x0}, - 225: {region: 0x74, script: 0x52, flags: 0x0}, - 226: {region: 0x105, script: 0x1e, flags: 0x0}, - 227: {region: 0x134, script: 0x52, flags: 0x0}, - 228: {region: 0x48, script: 0x52, flags: 0x0}, - 229: {region: 0x134, script: 0x1a, flags: 0x0}, - 230: {region: 0xa5, script: 0x5, flags: 0x0}, - 231: {region: 0x13d, script: 0x19, flags: 0x0}, - 232: {region: 0x164, script: 0x52, flags: 0x0}, - 233: {region: 0x9a, script: 0x5, flags: 0x0}, - 234: {region: 0x164, script: 0x52, flags: 0x0}, - 235: {region: 0x164, script: 0x52, flags: 0x0}, - 236: {region: 0x164, script: 0x52, flags: 0x0}, - 237: {region: 0x164, script: 0x52, flags: 0x0}, - 238: {region: 0x164, script: 0x52, flags: 0x0}, - 239: {region: 0x77, script: 0x52, flags: 0x0}, - 240: {region: 0x6a, script: 0x1c, flags: 0x0}, - 241: {region: 0xe6, script: 0x52, flags: 0x0}, - 242: {region: 0x48, script: 0x17, flags: 0x0}, - 243: {region: 0x12f, script: 0x1e, flags: 0x0}, - 244: {region: 0x48, script: 0x17, flags: 0x0}, - 245: {region: 0x48, script: 0x17, flags: 0x0}, - 246: {region: 0x48, script: 0x17, flags: 0x0}, - 247: {region: 0x48, script: 0x17, flags: 0x0}, - 248: {region: 0x109, script: 0x52, flags: 0x0}, - 249: {region: 0x5d, script: 0x52, flags: 0x0}, - 250: {region: 0xe8, script: 0x52, flags: 0x0}, - 251: {region: 0x48, script: 0x17, flags: 0x0}, - 252: {region: 0xc3, script: 0x79, flags: 0x0}, + 89: {region: 0x106, script: 0x1e, flags: 0x0}, + 90: {region: 0xe8, script: 0x5, flags: 0x0}, + 91: {region: 0x95, script: 0x55, flags: 0x0}, + 92: {region: 0xdb, script: 0x20, flags: 0x0}, + 93: {region: 0x2e, script: 0x55, flags: 0x0}, + 94: {region: 0x52, script: 0x55, flags: 0x0}, + 95: {region: 0x165, script: 0x55, flags: 0x0}, + 96: {region: 0x52, script: 0xb, flags: 0x0}, + 97: {region: 0x165, script: 0x55, flags: 0x0}, + 98: {region: 0x165, script: 0x55, flags: 0x0}, + 99: {region: 0x95, script: 0x55, flags: 0x0}, + 100: {region: 0x165, script: 0x55, flags: 0x0}, + 101: {region: 0x52, script: 0x55, flags: 0x0}, + 102: {region: 0x165, script: 0x55, flags: 0x0}, + 103: {region: 0x165, script: 0x55, flags: 0x0}, + 104: {region: 0x165, script: 0x55, flags: 0x0}, + 105: {region: 0x165, script: 0x55, flags: 0x0}, + 106: {region: 0x4f, script: 0x55, flags: 0x0}, + 107: {region: 0x165, script: 0x55, flags: 0x0}, + 108: {region: 0x165, script: 0x55, flags: 0x0}, + 109: {region: 0x165, script: 0x55, flags: 0x0}, + 110: {region: 0x165, script: 0x28, flags: 0x0}, + 111: {region: 0x165, script: 0x55, flags: 0x0}, + 112: {region: 0x165, script: 0x55, flags: 0x0}, + 113: {region: 0x47, script: 0x1e, flags: 0x0}, + 114: {region: 0x165, script: 0x55, flags: 0x0}, + 115: {region: 0x165, script: 0x55, flags: 0x0}, + 116: {region: 0x10b, script: 0x5, flags: 0x0}, + 117: {region: 0x162, script: 0x55, flags: 0x0}, + 118: {region: 0x165, script: 0x55, flags: 0x0}, + 119: {region: 0x95, script: 0x55, flags: 0x0}, + 120: {region: 0x165, script: 0x55, flags: 0x0}, + 121: {region: 0x12f, script: 0x55, flags: 0x0}, + 122: {region: 0x52, script: 0x55, flags: 0x0}, + 123: {region: 0x99, script: 0xd3, flags: 0x0}, + 124: {region: 0xe8, script: 0x5, flags: 0x0}, + 125: {region: 0x99, script: 0x20, flags: 0x0}, + 126: {region: 0x38, script: 0x1e, flags: 0x0}, + 127: {region: 0x99, script: 0x20, flags: 0x0}, + 128: {region: 0xe8, script: 0x5, flags: 0x0}, + 129: {region: 0x12b, script: 0x30, flags: 0x0}, + 131: {region: 0x99, script: 0x20, flags: 0x0}, + 132: {region: 0x165, script: 0x55, flags: 0x0}, + 133: {region: 0x99, script: 0x20, flags: 0x0}, + 134: {region: 0xe7, script: 0x55, flags: 0x0}, + 135: {region: 0x165, script: 0x55, flags: 0x0}, + 136: {region: 0x99, script: 0x20, flags: 0x0}, + 137: {region: 0x165, script: 0x55, flags: 0x0}, + 138: {region: 0x13f, script: 0x55, flags: 0x0}, + 139: {region: 0x165, script: 0x55, flags: 0x0}, + 140: {region: 0x165, script: 0x55, flags: 0x0}, + 141: {region: 0xe7, script: 0x55, flags: 0x0}, + 142: {region: 0x165, script: 0x55, flags: 0x0}, + 143: {region: 0xd6, script: 0x55, flags: 0x0}, + 144: {region: 0x165, script: 0x55, flags: 0x0}, + 145: {region: 0x165, script: 0x55, flags: 0x0}, + 146: {region: 0x165, script: 0x55, flags: 0x0}, + 147: {region: 0x165, script: 0x28, flags: 0x0}, + 148: {region: 0x99, script: 0x20, flags: 0x0}, + 149: {region: 0x95, script: 0x55, flags: 0x0}, + 150: {region: 0x165, script: 0x55, flags: 0x0}, + 151: {region: 0x165, script: 0x55, flags: 0x0}, + 152: {region: 0x114, script: 0x55, flags: 0x0}, + 153: {region: 0x165, script: 0x55, flags: 0x0}, + 154: {region: 0x165, script: 0x55, flags: 0x0}, + 155: {region: 0x52, script: 0x55, flags: 0x0}, + 156: {region: 0x165, script: 0x55, flags: 0x0}, + 157: {region: 0xe7, script: 0x55, flags: 0x0}, + 158: {region: 0x165, script: 0x55, flags: 0x0}, + 159: {region: 0x13e, script: 0xd5, flags: 0x0}, + 160: {region: 0xc3, script: 0x55, flags: 0x0}, + 161: {region: 0x165, script: 0x55, flags: 0x0}, + 162: {region: 0x165, script: 0x55, flags: 0x0}, + 163: {region: 0xc3, script: 0x55, flags: 0x0}, + 164: {region: 0x165, script: 0x55, flags: 0x0}, + 165: {region: 0x35, script: 0xe, flags: 0x0}, + 166: {region: 0x165, script: 0x55, flags: 0x0}, + 167: {region: 0x165, script: 0x55, flags: 0x0}, + 168: {region: 0x165, script: 0x55, flags: 0x0}, + 169: {region: 0x53, script: 0xdc, flags: 0x0}, + 170: {region: 0x165, script: 0x55, flags: 0x0}, + 171: {region: 0x165, script: 0x55, flags: 0x0}, + 172: {region: 0x165, script: 0x55, flags: 0x0}, + 173: {region: 0x99, script: 0xe, flags: 0x0}, + 174: {region: 0x165, script: 0x55, flags: 0x0}, + 175: {region: 0x9c, script: 0x5, flags: 0x0}, + 176: {region: 0x165, script: 0x55, flags: 0x0}, + 177: {region: 0x4f, script: 0x55, flags: 0x0}, + 178: {region: 0x78, script: 0x55, flags: 0x0}, + 179: {region: 0x99, script: 0x20, flags: 0x0}, + 180: {region: 0xe8, script: 0x5, flags: 0x0}, + 181: {region: 0x99, script: 0x20, flags: 0x0}, + 182: {region: 0x165, script: 0x55, flags: 0x0}, + 183: {region: 0x33, script: 0x55, flags: 0x0}, + 184: {region: 0x165, script: 0x55, flags: 0x0}, + 185: {region: 0xb4, script: 0xc, flags: 0x0}, + 186: {region: 0x52, script: 0x55, flags: 0x0}, + 187: {region: 0x165, script: 0x28, flags: 0x0}, + 188: {region: 0xe7, script: 0x55, flags: 0x0}, + 189: {region: 0x165, script: 0x55, flags: 0x0}, + 190: {region: 0xe8, script: 0x20, flags: 0x0}, + 191: {region: 0x106, script: 0x1e, flags: 0x0}, + 192: {region: 0x15f, script: 0x55, flags: 0x0}, + 193: {region: 0x165, script: 0x55, flags: 0x0}, + 194: {region: 0x95, script: 0x55, flags: 0x0}, + 195: {region: 0x165, script: 0x55, flags: 0x0}, + 196: {region: 0x52, script: 0x55, flags: 0x0}, + 197: {region: 0x165, script: 0x55, flags: 0x0}, + 198: {region: 0x165, script: 0x55, flags: 0x0}, + 199: {region: 0x165, script: 0x55, flags: 0x0}, + 200: {region: 0x86, script: 0x55, flags: 0x0}, + 201: {region: 0x165, script: 0x55, flags: 0x0}, + 202: {region: 0x165, script: 0x55, flags: 0x0}, + 203: {region: 0x165, script: 0x55, flags: 0x0}, + 204: {region: 0x165, script: 0x55, flags: 0x0}, + 205: {region: 0x6d, script: 0x28, flags: 0x0}, + 206: {region: 0x165, script: 0x55, flags: 0x0}, + 207: {region: 0x165, script: 0x55, flags: 0x0}, + 208: {region: 0x52, script: 0x55, flags: 0x0}, + 209: {region: 0x165, script: 0x55, flags: 0x0}, + 210: {region: 0x165, script: 0x55, flags: 0x0}, + 211: {region: 0xc3, script: 0x55, flags: 0x0}, + 212: {region: 0x165, script: 0x55, flags: 0x0}, + 213: {region: 0x165, script: 0x55, flags: 0x0}, + 214: {region: 0x165, script: 0x55, flags: 0x0}, + 215: {region: 0x6e, script: 0x55, flags: 0x0}, + 216: {region: 0x165, script: 0x55, flags: 0x0}, + 217: {region: 0x165, script: 0x55, flags: 0x0}, + 218: {region: 0xd6, script: 0x55, flags: 0x0}, + 219: {region: 0x35, script: 0x16, flags: 0x0}, + 220: {region: 0x106, script: 0x1e, flags: 0x0}, + 221: {region: 0xe7, script: 0x55, flags: 0x0}, + 222: {region: 0x165, script: 0x55, flags: 0x0}, + 223: {region: 0x131, script: 0x55, flags: 0x0}, + 224: {region: 0x8a, script: 0x55, flags: 0x0}, + 225: {region: 0x75, script: 0x55, flags: 0x0}, + 226: {region: 0x106, script: 0x1e, flags: 0x0}, + 227: {region: 0x135, script: 0x55, flags: 0x0}, + 228: {region: 0x49, script: 0x55, flags: 0x0}, + 229: {region: 0x135, script: 0x1a, flags: 0x0}, + 230: {region: 0xa6, script: 0x5, flags: 0x0}, + 231: {region: 0x13e, script: 0x19, flags: 0x0}, + 232: {region: 0x165, script: 0x55, flags: 0x0}, + 233: {region: 0x9b, script: 0x5, flags: 0x0}, + 234: {region: 0x165, script: 0x55, flags: 0x0}, + 235: {region: 0x165, script: 0x55, flags: 0x0}, + 236: {region: 0x165, script: 0x55, flags: 0x0}, + 237: {region: 0x165, script: 0x55, flags: 0x0}, + 238: {region: 0x165, script: 0x55, flags: 0x0}, + 239: {region: 0x78, script: 0x55, flags: 0x0}, + 240: {region: 0x6b, script: 0x1c, flags: 0x0}, + 241: {region: 0xe7, script: 0x55, flags: 0x0}, + 242: {region: 0x49, script: 0x17, flags: 0x0}, + 243: {region: 0x130, script: 0x1e, flags: 0x0}, + 244: {region: 0x49, script: 0x17, flags: 0x0}, + 245: {region: 0x49, script: 0x17, flags: 0x0}, + 246: {region: 0x49, script: 0x17, flags: 0x0}, + 247: {region: 0x49, script: 0x17, flags: 0x0}, + 248: {region: 0x10a, script: 0x55, flags: 0x0}, + 249: {region: 0x5e, script: 0x55, flags: 0x0}, + 250: {region: 0xe9, script: 0x55, flags: 0x0}, + 251: {region: 0x49, script: 0x17, flags: 0x0}, + 252: {region: 0xc4, script: 0x7e, flags: 0x0}, 253: {region: 0x8, script: 0x2, flags: 0x1}, - 254: {region: 0x105, script: 0x1e, flags: 0x0}, - 255: {region: 0x7a, script: 0x52, flags: 0x0}, - 256: {region: 0x62, script: 0x52, flags: 0x0}, - 257: {region: 0x164, script: 0x52, flags: 0x0}, - 258: {region: 0x164, script: 0x52, flags: 0x0}, - 259: {region: 0x164, script: 0x52, flags: 0x0}, - 260: {region: 0x164, script: 0x52, flags: 0x0}, - 261: {region: 0x134, script: 0x52, flags: 0x0}, - 262: {region: 0x105, script: 0x1e, flags: 0x0}, - 263: {region: 0xa3, script: 0x52, flags: 0x0}, - 264: {region: 0x164, script: 0x52, flags: 0x0}, - 265: {region: 0x164, script: 0x52, flags: 0x0}, - 266: {region: 0x98, script: 0x5, flags: 0x0}, - 267: {region: 0x164, script: 0x52, flags: 0x0}, - 268: {region: 0x5f, script: 0x52, flags: 0x0}, - 269: {region: 0x164, script: 0x52, flags: 0x0}, - 270: {region: 0x48, script: 0x52, flags: 0x0}, - 271: {region: 0x164, script: 0x52, flags: 0x0}, - 272: {region: 0x164, script: 0x52, flags: 0x0}, - 273: {region: 0x164, script: 0x52, flags: 0x0}, - 274: {region: 0x164, script: 0x5, flags: 0x0}, - 275: {region: 0x48, script: 0x52, flags: 0x0}, - 276: {region: 0x164, script: 0x52, flags: 0x0}, - 277: {region: 0x164, script: 0x52, flags: 0x0}, - 278: {region: 0xd3, script: 0x52, flags: 0x0}, - 279: {region: 0x4e, script: 0x52, flags: 0x0}, - 280: {region: 0x164, script: 0x52, flags: 0x0}, - 281: {region: 0x98, script: 0x5, flags: 0x0}, - 282: {region: 0x164, script: 0x52, flags: 0x0}, - 283: {region: 0x164, script: 0x52, flags: 0x0}, - 284: {region: 0x164, script: 0x52, flags: 0x0}, - 285: {region: 0x164, script: 0x27, flags: 0x0}, - 286: {region: 0x5f, script: 0x52, flags: 0x0}, - 287: {region: 0xc2, script: 0x52, flags: 0x0}, - 288: {region: 0xcf, script: 0x52, flags: 0x0}, - 289: {region: 0x164, script: 0x52, flags: 0x0}, - 290: {region: 0xda, script: 0x20, flags: 0x0}, - 291: {region: 0x51, script: 0x52, flags: 0x0}, - 292: {region: 0x164, script: 0x52, flags: 0x0}, - 293: {region: 0x164, script: 0x52, flags: 0x0}, - 294: {region: 0x164, script: 0x52, flags: 0x0}, - 295: {region: 0xcc, script: 0xd4, flags: 0x0}, - 296: {region: 0x164, script: 0x52, flags: 0x0}, - 297: {region: 0x164, script: 0x52, flags: 0x0}, - 298: {region: 0x113, script: 0x52, flags: 0x0}, - 299: {region: 0x36, script: 0x52, flags: 0x0}, - 300: {region: 0x42, script: 0xd6, flags: 0x0}, - 301: {region: 0x164, script: 0x52, flags: 0x0}, - 302: {region: 0xa3, script: 0x52, flags: 0x0}, - 303: {region: 0x7f, script: 0x52, flags: 0x0}, - 304: {region: 0xd5, script: 0x52, flags: 0x0}, - 305: {region: 0x9d, script: 0x52, flags: 0x0}, - 306: {region: 0x6a, script: 0x25, flags: 0x0}, - 307: {region: 0x164, script: 0x52, flags: 0x0}, - 308: {region: 0xc3, script: 0x43, flags: 0x0}, - 309: {region: 0x86, script: 0x2d, flags: 0x0}, - 310: {region: 0x164, script: 0x52, flags: 0x0}, - 311: {region: 0x164, script: 0x52, flags: 0x0}, + 254: {region: 0x106, script: 0x1e, flags: 0x0}, + 255: {region: 0x7b, script: 0x55, flags: 0x0}, + 256: {region: 0x63, script: 0x55, flags: 0x0}, + 257: {region: 0x165, script: 0x55, flags: 0x0}, + 258: {region: 0x165, script: 0x55, flags: 0x0}, + 259: {region: 0x165, script: 0x55, flags: 0x0}, + 260: {region: 0x165, script: 0x55, flags: 0x0}, + 261: {region: 0x135, script: 0x55, flags: 0x0}, + 262: {region: 0x106, script: 0x1e, flags: 0x0}, + 263: {region: 0xa4, script: 0x55, flags: 0x0}, + 264: {region: 0x165, script: 0x55, flags: 0x0}, + 265: {region: 0x165, script: 0x55, flags: 0x0}, + 266: {region: 0x99, script: 0x5, flags: 0x0}, + 267: {region: 0x165, script: 0x55, flags: 0x0}, + 268: {region: 0x60, script: 0x55, flags: 0x0}, + 269: {region: 0x165, script: 0x55, flags: 0x0}, + 270: {region: 0x49, script: 0x55, flags: 0x0}, + 271: {region: 0x165, script: 0x55, flags: 0x0}, + 272: {region: 0x165, script: 0x55, flags: 0x0}, + 273: {region: 0x165, script: 0x55, flags: 0x0}, + 274: {region: 0x165, script: 0x5, flags: 0x0}, + 275: {region: 0x49, script: 0x55, flags: 0x0}, + 276: {region: 0x165, script: 0x55, flags: 0x0}, + 277: {region: 0x165, script: 0x55, flags: 0x0}, + 278: {region: 0xd4, script: 0x55, flags: 0x0}, + 279: {region: 0x4f, script: 0x55, flags: 0x0}, + 280: {region: 0x165, script: 0x55, flags: 0x0}, + 281: {region: 0x99, script: 0x5, flags: 0x0}, + 282: {region: 0x165, script: 0x55, flags: 0x0}, + 283: {region: 0x165, script: 0x55, flags: 0x0}, + 284: {region: 0x165, script: 0x55, flags: 0x0}, + 285: {region: 0x165, script: 0x28, flags: 0x0}, + 286: {region: 0x60, script: 0x55, flags: 0x0}, + 287: {region: 0xc3, script: 0x55, flags: 0x0}, + 288: {region: 0xd0, script: 0x55, flags: 0x0}, + 289: {region: 0x165, script: 0x55, flags: 0x0}, + 290: {region: 0xdb, script: 0x20, flags: 0x0}, + 291: {region: 0x52, script: 0x55, flags: 0x0}, + 292: {region: 0x165, script: 0x55, flags: 0x0}, + 293: {region: 0x165, script: 0x55, flags: 0x0}, + 294: {region: 0x165, script: 0x55, flags: 0x0}, + 295: {region: 0xcd, script: 0xda, flags: 0x0}, + 296: {region: 0x165, script: 0x55, flags: 0x0}, + 297: {region: 0x165, script: 0x55, flags: 0x0}, + 298: {region: 0x114, script: 0x55, flags: 0x0}, + 299: {region: 0x37, script: 0x55, flags: 0x0}, + 300: {region: 0x43, script: 0xdc, flags: 0x0}, + 301: {region: 0x165, script: 0x55, flags: 0x0}, + 302: {region: 0xa4, script: 0x55, flags: 0x0}, + 303: {region: 0x80, script: 0x55, flags: 0x0}, + 304: {region: 0xd6, script: 0x55, flags: 0x0}, + 305: {region: 0x9e, script: 0x55, flags: 0x0}, + 306: {region: 0x6b, script: 0x26, flags: 0x0}, + 307: {region: 0x165, script: 0x55, flags: 0x0}, + 308: {region: 0xc4, script: 0x46, flags: 0x0}, + 309: {region: 0x87, script: 0x30, flags: 0x0}, + 310: {region: 0x165, script: 0x55, flags: 0x0}, + 311: {region: 0x165, script: 0x55, flags: 0x0}, 312: {region: 0xa, script: 0x2, flags: 0x1}, - 313: {region: 0x164, script: 0x52, flags: 0x0}, - 314: {region: 0x164, script: 0x52, flags: 0x0}, - 315: {region: 0x1, script: 0x52, flags: 0x0}, - 316: {region: 0x164, script: 0x52, flags: 0x0}, - 317: {region: 0x6d, script: 0x52, flags: 0x0}, - 318: {region: 0x134, script: 0x52, flags: 0x0}, - 319: {region: 0x69, script: 0x52, flags: 0x0}, - 320: {region: 0x164, script: 0x52, flags: 0x0}, - 321: {region: 0x9d, script: 0x3e, flags: 0x0}, - 322: {region: 0x164, script: 0x52, flags: 0x0}, - 323: {region: 0x164, script: 0x52, flags: 0x0}, - 324: {region: 0x6d, script: 0x52, flags: 0x0}, - 325: {region: 0x51, script: 0x52, flags: 0x0}, - 326: {region: 0x6d, script: 0x52, flags: 0x0}, - 327: {region: 0x9b, script: 0x5, flags: 0x0}, - 328: {region: 0x164, script: 0x52, flags: 0x0}, - 329: {region: 0x164, script: 0x52, flags: 0x0}, - 330: {region: 0x164, script: 0x52, flags: 0x0}, - 331: {region: 0x164, script: 0x52, flags: 0x0}, - 332: {region: 0x85, script: 0x52, flags: 0x0}, + 313: {region: 0x165, script: 0x55, flags: 0x0}, + 314: {region: 0x165, script: 0x55, flags: 0x0}, + 315: {region: 0x1, script: 0x55, flags: 0x0}, + 316: {region: 0x165, script: 0x55, flags: 0x0}, + 317: {region: 0x6e, script: 0x55, flags: 0x0}, + 318: {region: 0x135, script: 0x55, flags: 0x0}, + 319: {region: 0x6a, script: 0x55, flags: 0x0}, + 320: {region: 0x165, script: 0x55, flags: 0x0}, + 321: {region: 0x9e, script: 0x41, flags: 0x0}, + 322: {region: 0x165, script: 0x55, flags: 0x0}, + 323: {region: 0x165, script: 0x55, flags: 0x0}, + 324: {region: 0x6e, script: 0x55, flags: 0x0}, + 325: {region: 0x52, script: 0x55, flags: 0x0}, + 326: {region: 0x6e, script: 0x55, flags: 0x0}, + 327: {region: 0x9c, script: 0x5, flags: 0x0}, + 328: {region: 0x165, script: 0x55, flags: 0x0}, + 329: {region: 0x165, script: 0x55, flags: 0x0}, + 330: {region: 0x165, script: 0x55, flags: 0x0}, + 331: {region: 0x165, script: 0x55, flags: 0x0}, + 332: {region: 0x86, script: 0x55, flags: 0x0}, 333: {region: 0xc, script: 0x2, flags: 0x1}, - 334: {region: 0x164, script: 0x52, flags: 0x0}, - 335: {region: 0xc2, script: 0x52, flags: 0x0}, - 336: {region: 0x71, script: 0x52, flags: 0x0}, - 337: {region: 0x10a, script: 0x5, flags: 0x0}, - 338: {region: 0xe6, script: 0x52, flags: 0x0}, - 339: {region: 0x10b, script: 0x52, flags: 0x0}, - 340: {region: 0x72, script: 0x52, flags: 0x0}, - 341: {region: 0x164, script: 0x52, flags: 0x0}, - 342: {region: 0x164, script: 0x52, flags: 0x0}, - 343: {region: 0x75, script: 0x52, flags: 0x0}, - 344: {region: 0x164, script: 0x52, flags: 0x0}, - 345: {region: 0x3a, script: 0x52, flags: 0x0}, - 346: {region: 0x164, script: 0x52, flags: 0x0}, - 347: {region: 0x164, script: 0x52, flags: 0x0}, - 348: {region: 0x164, script: 0x52, flags: 0x0}, - 349: {region: 0x77, script: 0x52, flags: 0x0}, - 350: {region: 0x134, script: 0x52, flags: 0x0}, - 351: {region: 0x77, script: 0x52, flags: 0x0}, - 352: {region: 0x5f, script: 0x52, flags: 0x0}, - 353: {region: 0x5f, script: 0x52, flags: 0x0}, - 354: {region: 0x51, script: 0x5, flags: 0x0}, - 355: {region: 0x13f, script: 0x52, flags: 0x0}, - 356: {region: 0x164, script: 0x52, flags: 0x0}, - 357: {region: 0x83, script: 0x52, flags: 0x0}, - 358: {region: 0x164, script: 0x52, flags: 0x0}, - 359: {region: 0xd3, script: 0x52, flags: 0x0}, - 360: {region: 0x9d, script: 0x52, flags: 0x0}, - 361: {region: 0xd5, script: 0x52, flags: 0x0}, - 362: {region: 0x164, script: 0x52, flags: 0x0}, - 363: {region: 0x10a, script: 0x52, flags: 0x0}, - 364: {region: 0xd8, script: 0x52, flags: 0x0}, - 365: {region: 0x95, script: 0x52, flags: 0x0}, - 366: {region: 0x7f, script: 0x52, flags: 0x0}, - 367: {region: 0x164, script: 0x52, flags: 0x0}, - 368: {region: 0xbb, script: 0x52, flags: 0x0}, - 369: {region: 0x164, script: 0x52, flags: 0x0}, - 370: {region: 0x164, script: 0x52, flags: 0x0}, - 371: {region: 0x164, script: 0x52, flags: 0x0}, - 372: {region: 0x52, script: 0x34, flags: 0x0}, - 373: {region: 0x164, script: 0x52, flags: 0x0}, - 374: {region: 0x94, script: 0x52, flags: 0x0}, - 375: {region: 0x164, script: 0x52, flags: 0x0}, - 376: {region: 0x98, script: 0x20, flags: 0x0}, - 377: {region: 0x164, script: 0x52, flags: 0x0}, - 378: {region: 0x9b, script: 0x5, flags: 0x0}, - 379: {region: 0x7d, script: 0x52, flags: 0x0}, - 380: {region: 0x7a, script: 0x52, flags: 0x0}, - 381: {region: 0x164, script: 0x52, flags: 0x0}, - 382: {region: 0x164, script: 0x52, flags: 0x0}, - 383: {region: 0x164, script: 0x52, flags: 0x0}, - 384: {region: 0x164, script: 0x52, flags: 0x0}, - 385: {region: 0x164, script: 0x52, flags: 0x0}, - 386: {region: 0x164, script: 0x52, flags: 0x0}, - 387: {region: 0x6e, script: 0x27, flags: 0x0}, - 388: {region: 0x164, script: 0x52, flags: 0x0}, - 389: {region: 0xda, script: 0x20, flags: 0x0}, - 390: {region: 0x164, script: 0x52, flags: 0x0}, - 391: {region: 0xa6, script: 0x52, flags: 0x0}, - 392: {region: 0x164, script: 0x52, flags: 0x0}, - 393: {region: 0xe7, script: 0x5, flags: 0x0}, - 394: {region: 0x164, script: 0x52, flags: 0x0}, - 395: {region: 0xe7, script: 0x5, flags: 0x0}, - 396: {region: 0x164, script: 0x52, flags: 0x0}, - 397: {region: 0x164, script: 0x52, flags: 0x0}, - 398: {region: 0x6d, script: 0x52, flags: 0x0}, - 399: {region: 0x9b, script: 0x5, flags: 0x0}, - 400: {region: 0x164, script: 0x52, flags: 0x0}, - 401: {region: 0x164, script: 0x27, flags: 0x0}, - 402: {region: 0xf0, script: 0x52, flags: 0x0}, - 403: {region: 0x164, script: 0x52, flags: 0x0}, - 404: {region: 0x164, script: 0x52, flags: 0x0}, - 405: {region: 0x164, script: 0x52, flags: 0x0}, - 406: {region: 0x164, script: 0x27, flags: 0x0}, - 407: {region: 0x164, script: 0x52, flags: 0x0}, - 408: {region: 0x98, script: 0x20, flags: 0x0}, - 409: {region: 0x98, script: 0xd0, flags: 0x0}, - 410: {region: 0x94, script: 0x52, flags: 0x0}, - 411: {region: 0xd8, script: 0x52, flags: 0x0}, - 412: {region: 0x12f, script: 0x2b, flags: 0x0}, - 413: {region: 0x164, script: 0x52, flags: 0x0}, + 334: {region: 0x165, script: 0x55, flags: 0x0}, + 335: {region: 0xc3, script: 0x55, flags: 0x0}, + 336: {region: 0x72, script: 0x55, flags: 0x0}, + 337: {region: 0x10b, script: 0x5, flags: 0x0}, + 338: {region: 0xe7, script: 0x55, flags: 0x0}, + 339: {region: 0x10c, script: 0x55, flags: 0x0}, + 340: {region: 0x73, script: 0x55, flags: 0x0}, + 341: {region: 0x165, script: 0x55, flags: 0x0}, + 342: {region: 0x165, script: 0x55, flags: 0x0}, + 343: {region: 0x76, script: 0x55, flags: 0x0}, + 344: {region: 0x165, script: 0x55, flags: 0x0}, + 345: {region: 0x3b, script: 0x55, flags: 0x0}, + 346: {region: 0x165, script: 0x55, flags: 0x0}, + 347: {region: 0x165, script: 0x55, flags: 0x0}, + 348: {region: 0x165, script: 0x55, flags: 0x0}, + 349: {region: 0x78, script: 0x55, flags: 0x0}, + 350: {region: 0x135, script: 0x55, flags: 0x0}, + 351: {region: 0x78, script: 0x55, flags: 0x0}, + 352: {region: 0x60, script: 0x55, flags: 0x0}, + 353: {region: 0x60, script: 0x55, flags: 0x0}, + 354: {region: 0x52, script: 0x5, flags: 0x0}, + 355: {region: 0x140, script: 0x55, flags: 0x0}, + 356: {region: 0x165, script: 0x55, flags: 0x0}, + 357: {region: 0x84, script: 0x55, flags: 0x0}, + 358: {region: 0x165, script: 0x55, flags: 0x0}, + 359: {region: 0xd4, script: 0x55, flags: 0x0}, + 360: {region: 0x9e, script: 0x55, flags: 0x0}, + 361: {region: 0xd6, script: 0x55, flags: 0x0}, + 362: {region: 0x165, script: 0x55, flags: 0x0}, + 363: {region: 0x10b, script: 0x55, flags: 0x0}, + 364: {region: 0xd9, script: 0x55, flags: 0x0}, + 365: {region: 0x96, script: 0x55, flags: 0x0}, + 366: {region: 0x80, script: 0x55, flags: 0x0}, + 367: {region: 0x165, script: 0x55, flags: 0x0}, + 368: {region: 0xbc, script: 0x55, flags: 0x0}, + 369: {region: 0x165, script: 0x55, flags: 0x0}, + 370: {region: 0x165, script: 0x55, flags: 0x0}, + 371: {region: 0x165, script: 0x55, flags: 0x0}, + 372: {region: 0x53, script: 0x37, flags: 0x0}, + 373: {region: 0x165, script: 0x55, flags: 0x0}, + 374: {region: 0x95, script: 0x55, flags: 0x0}, + 375: {region: 0x165, script: 0x55, flags: 0x0}, + 376: {region: 0x99, script: 0x20, flags: 0x0}, + 377: {region: 0x165, script: 0x55, flags: 0x0}, + 378: {region: 0x9c, script: 0x5, flags: 0x0}, + 379: {region: 0x7e, script: 0x55, flags: 0x0}, + 380: {region: 0x7b, script: 0x55, flags: 0x0}, + 381: {region: 0x165, script: 0x55, flags: 0x0}, + 382: {region: 0x165, script: 0x55, flags: 0x0}, + 383: {region: 0x165, script: 0x55, flags: 0x0}, + 384: {region: 0x165, script: 0x55, flags: 0x0}, + 385: {region: 0x165, script: 0x55, flags: 0x0}, + 386: {region: 0x165, script: 0x55, flags: 0x0}, + 387: {region: 0x6f, script: 0x28, flags: 0x0}, + 388: {region: 0x165, script: 0x55, flags: 0x0}, + 389: {region: 0xdb, script: 0x20, flags: 0x0}, + 390: {region: 0x165, script: 0x55, flags: 0x0}, + 391: {region: 0xa7, script: 0x55, flags: 0x0}, + 392: {region: 0x165, script: 0x55, flags: 0x0}, + 393: {region: 0xe8, script: 0x5, flags: 0x0}, + 394: {region: 0x165, script: 0x55, flags: 0x0}, + 395: {region: 0xe8, script: 0x5, flags: 0x0}, + 396: {region: 0x165, script: 0x55, flags: 0x0}, + 397: {region: 0x165, script: 0x55, flags: 0x0}, + 398: {region: 0x6e, script: 0x55, flags: 0x0}, + 399: {region: 0x9c, script: 0x5, flags: 0x0}, + 400: {region: 0x165, script: 0x55, flags: 0x0}, + 401: {region: 0x165, script: 0x28, flags: 0x0}, + 402: {region: 0xf1, script: 0x55, flags: 0x0}, + 403: {region: 0x165, script: 0x55, flags: 0x0}, + 404: {region: 0x165, script: 0x55, flags: 0x0}, + 405: {region: 0x165, script: 0x55, flags: 0x0}, + 406: {region: 0x165, script: 0x28, flags: 0x0}, + 407: {region: 0x165, script: 0x55, flags: 0x0}, + 408: {region: 0x99, script: 0x20, flags: 0x0}, + 409: {region: 0x99, script: 0xd6, flags: 0x0}, + 410: {region: 0x95, script: 0x55, flags: 0x0}, + 411: {region: 0xd9, script: 0x55, flags: 0x0}, + 412: {region: 0x130, script: 0x2e, flags: 0x0}, + 413: {region: 0x165, script: 0x55, flags: 0x0}, 414: {region: 0xe, script: 0x2, flags: 0x1}, - 415: {region: 0x98, script: 0xe, flags: 0x0}, - 416: {region: 0x164, script: 0x52, flags: 0x0}, - 417: {region: 0x4d, script: 0x52, flags: 0x0}, - 418: {region: 0x98, script: 0x2e, flags: 0x0}, - 419: {region: 0x40, script: 0x52, flags: 0x0}, - 420: {region: 0x53, script: 0x52, flags: 0x0}, - 421: {region: 0x164, script: 0x52, flags: 0x0}, - 422: {region: 0x7f, script: 0x52, flags: 0x0}, - 423: {region: 0x164, script: 0x52, flags: 0x0}, - 424: {region: 0x164, script: 0x52, flags: 0x0}, - 425: {region: 0xa3, script: 0x52, flags: 0x0}, - 426: {region: 0x97, script: 0x52, flags: 0x0}, - 427: {region: 0x164, script: 0x52, flags: 0x0}, - 428: {region: 0xda, script: 0x20, flags: 0x0}, - 429: {region: 0x164, script: 0x52, flags: 0x0}, - 430: {region: 0x164, script: 0x5, flags: 0x0}, - 431: {region: 0x48, script: 0x52, flags: 0x0}, - 432: {region: 0x164, script: 0x5, flags: 0x0}, - 433: {region: 0x164, script: 0x52, flags: 0x0}, + 415: {region: 0x99, script: 0xe, flags: 0x0}, + 416: {region: 0x165, script: 0x55, flags: 0x0}, + 417: {region: 0x4e, script: 0x55, flags: 0x0}, + 418: {region: 0x99, script: 0x31, flags: 0x0}, + 419: {region: 0x41, script: 0x55, flags: 0x0}, + 420: {region: 0x54, script: 0x55, flags: 0x0}, + 421: {region: 0x165, script: 0x55, flags: 0x0}, + 422: {region: 0x80, script: 0x55, flags: 0x0}, + 423: {region: 0x165, script: 0x55, flags: 0x0}, + 424: {region: 0x165, script: 0x55, flags: 0x0}, + 425: {region: 0xa4, script: 0x55, flags: 0x0}, + 426: {region: 0x98, script: 0x55, flags: 0x0}, + 427: {region: 0x165, script: 0x55, flags: 0x0}, + 428: {region: 0xdb, script: 0x20, flags: 0x0}, + 429: {region: 0x165, script: 0x55, flags: 0x0}, + 430: {region: 0x165, script: 0x5, flags: 0x0}, + 431: {region: 0x49, script: 0x55, flags: 0x0}, + 432: {region: 0x165, script: 0x5, flags: 0x0}, + 433: {region: 0x165, script: 0x55, flags: 0x0}, 434: {region: 0x10, script: 0x3, flags: 0x1}, - 435: {region: 0x164, script: 0x52, flags: 0x0}, - 436: {region: 0x52, script: 0x34, flags: 0x0}, - 437: {region: 0x164, script: 0x52, flags: 0x0}, - 438: {region: 0x134, script: 0x52, flags: 0x0}, - 439: {region: 0x23, script: 0x5, flags: 0x0}, - 440: {region: 0x164, script: 0x52, flags: 0x0}, - 441: {region: 0x164, script: 0x27, flags: 0x0}, - 442: {region: 0x96, script: 0x37, flags: 0x0}, - 443: {region: 0x164, script: 0x52, flags: 0x0}, - 444: {region: 0x98, script: 0x20, flags: 0x0}, - 445: {region: 0x164, script: 0x52, flags: 0x0}, - 446: {region: 0x72, script: 0x52, flags: 0x0}, - 447: {region: 0x164, script: 0x52, flags: 0x0}, - 448: {region: 0x164, script: 0x52, flags: 0x0}, - 449: {region: 0xe6, script: 0x52, flags: 0x0}, - 450: {region: 0x164, script: 0x52, flags: 0x0}, - 451: {region: 0x12a, script: 0x39, flags: 0x0}, - 452: {region: 0x52, script: 0x81, flags: 0x0}, - 453: {region: 0x164, script: 0x52, flags: 0x0}, - 454: {region: 0xe7, script: 0x5, flags: 0x0}, - 455: {region: 0x98, script: 0x20, flags: 0x0}, - 456: {region: 0xae, script: 0x3a, flags: 0x0}, - 457: {region: 0xe6, script: 0x52, flags: 0x0}, - 458: {region: 0xe7, script: 0x5, flags: 0x0}, - 459: {region: 0xe5, script: 0x52, flags: 0x0}, - 460: {region: 0x98, script: 0x20, flags: 0x0}, - 461: {region: 0x98, script: 0x20, flags: 0x0}, - 462: {region: 0x164, script: 0x52, flags: 0x0}, - 463: {region: 0x8f, script: 0x52, flags: 0x0}, - 464: {region: 0x5f, script: 0x52, flags: 0x0}, - 465: {region: 0x52, script: 0x34, flags: 0x0}, - 466: {region: 0x90, script: 0x52, flags: 0x0}, - 467: {region: 0x91, script: 0x52, flags: 0x0}, - 468: {region: 0x164, script: 0x52, flags: 0x0}, - 469: {region: 0x27, script: 0x8, flags: 0x0}, - 470: {region: 0xd1, script: 0x52, flags: 0x0}, - 471: {region: 0x77, script: 0x52, flags: 0x0}, - 472: {region: 0x164, script: 0x52, flags: 0x0}, - 473: {region: 0x164, script: 0x52, flags: 0x0}, - 474: {region: 0xcf, script: 0x52, flags: 0x0}, - 475: {region: 0xd5, script: 0x52, flags: 0x0}, - 476: {region: 0x164, script: 0x52, flags: 0x0}, - 477: {region: 0x164, script: 0x52, flags: 0x0}, - 478: {region: 0x164, script: 0x52, flags: 0x0}, - 479: {region: 0x94, script: 0x52, flags: 0x0}, - 480: {region: 0x164, script: 0x52, flags: 0x0}, - 481: {region: 0x164, script: 0x52, flags: 0x0}, - 482: {region: 0x164, script: 0x52, flags: 0x0}, - 484: {region: 0x121, script: 0x52, flags: 0x0}, - 485: {region: 0xd5, script: 0x52, flags: 0x0}, - 486: {region: 0x164, script: 0x52, flags: 0x0}, - 487: {region: 0x164, script: 0x52, flags: 0x0}, - 488: {region: 0x52, script: 0xdf, flags: 0x0}, - 489: {region: 0x164, script: 0x52, flags: 0x0}, - 490: {region: 0x134, script: 0x52, flags: 0x0}, - 491: {region: 0x164, script: 0x52, flags: 0x0}, - 492: {region: 0x48, script: 0x52, flags: 0x0}, - 493: {region: 0x164, script: 0x52, flags: 0x0}, - 494: {region: 0x164, script: 0x52, flags: 0x0}, - 495: {region: 0xe6, script: 0x52, flags: 0x0}, - 496: {region: 0x164, script: 0x52, flags: 0x0}, - 497: {region: 0x94, script: 0x52, flags: 0x0}, - 498: {region: 0x105, script: 0x1e, flags: 0x0}, - 500: {region: 0x164, script: 0x52, flags: 0x0}, - 501: {region: 0x164, script: 0x52, flags: 0x0}, - 502: {region: 0x9c, script: 0x52, flags: 0x0}, - 503: {region: 0x9d, script: 0x52, flags: 0x0}, - 504: {region: 0x48, script: 0x17, flags: 0x0}, - 505: {region: 0x96, script: 0x37, flags: 0x0}, - 506: {region: 0x164, script: 0x52, flags: 0x0}, - 507: {region: 0x164, script: 0x52, flags: 0x0}, - 508: {region: 0x105, script: 0x52, flags: 0x0}, - 509: {region: 0x164, script: 0x52, flags: 0x0}, - 510: {region: 0xa1, script: 0x41, flags: 0x0}, - 511: {region: 0x164, script: 0x52, flags: 0x0}, - 512: {region: 0x9f, script: 0x52, flags: 0x0}, - 514: {region: 0x164, script: 0x52, flags: 0x0}, - 515: {region: 0x164, script: 0x52, flags: 0x0}, - 516: {region: 0x164, script: 0x52, flags: 0x0}, - 517: {region: 0x51, script: 0x52, flags: 0x0}, - 518: {region: 0x12f, script: 0x37, flags: 0x0}, - 519: {region: 0x164, script: 0x52, flags: 0x0}, - 520: {region: 0x12e, script: 0x52, flags: 0x0}, - 521: {region: 0xda, script: 0x20, flags: 0x0}, - 522: {region: 0x164, script: 0x52, flags: 0x0}, - 523: {region: 0x62, script: 0x52, flags: 0x0}, - 524: {region: 0x94, script: 0x52, flags: 0x0}, - 525: {region: 0x94, script: 0x52, flags: 0x0}, - 526: {region: 0x7c, script: 0x29, flags: 0x0}, - 527: {region: 0x136, script: 0x1e, flags: 0x0}, - 528: {region: 0x66, script: 0x52, flags: 0x0}, - 529: {region: 0xc3, script: 0x52, flags: 0x0}, - 530: {region: 0x164, script: 0x52, flags: 0x0}, - 531: {region: 0x164, script: 0x52, flags: 0x0}, - 532: {region: 0xd5, script: 0x52, flags: 0x0}, - 533: {region: 0xa3, script: 0x52, flags: 0x0}, - 534: {region: 0xc2, script: 0x52, flags: 0x0}, - 535: {region: 0x105, script: 0x1e, flags: 0x0}, - 536: {region: 0x164, script: 0x52, flags: 0x0}, - 537: {region: 0x164, script: 0x52, flags: 0x0}, - 538: {region: 0x164, script: 0x52, flags: 0x0}, - 539: {region: 0x164, script: 0x52, flags: 0x0}, - 540: {region: 0xd3, script: 0x5, flags: 0x0}, - 541: {region: 0xd5, script: 0x52, flags: 0x0}, - 542: {region: 0x163, script: 0x52, flags: 0x0}, - 543: {region: 0x164, script: 0x52, flags: 0x0}, - 544: {region: 0x164, script: 0x52, flags: 0x0}, - 545: {region: 0x12e, script: 0x52, flags: 0x0}, - 546: {region: 0x121, script: 0x5, flags: 0x0}, - 547: {region: 0x164, script: 0x52, flags: 0x0}, - 548: {region: 0x122, script: 0xd5, flags: 0x0}, - 549: {region: 0x59, script: 0x52, flags: 0x0}, - 550: {region: 0x51, script: 0x52, flags: 0x0}, - 551: {region: 0x164, script: 0x52, flags: 0x0}, - 552: {region: 0x4e, script: 0x52, flags: 0x0}, - 553: {region: 0x98, script: 0x20, flags: 0x0}, - 554: {region: 0x98, script: 0x20, flags: 0x0}, - 555: {region: 0x4a, script: 0x52, flags: 0x0}, - 556: {region: 0x94, script: 0x52, flags: 0x0}, - 557: {region: 0x164, script: 0x52, flags: 0x0}, - 558: {region: 0x40, script: 0x52, flags: 0x0}, - 559: {region: 0x98, script: 0x52, flags: 0x0}, - 560: {region: 0x52, script: 0xcc, flags: 0x0}, - 561: {region: 0x98, script: 0x20, flags: 0x0}, - 562: {region: 0xc2, script: 0x52, flags: 0x0}, - 563: {region: 0x164, script: 0x52, flags: 0x0}, - 564: {region: 0x98, script: 0x6b, flags: 0x0}, - 565: {region: 0xe7, script: 0x5, flags: 0x0}, - 566: {region: 0x164, script: 0x52, flags: 0x0}, - 567: {region: 0xa3, script: 0x52, flags: 0x0}, - 568: {region: 0x164, script: 0x52, flags: 0x0}, - 569: {region: 0x12a, script: 0x52, flags: 0x0}, - 570: {region: 0x164, script: 0x52, flags: 0x0}, - 571: {region: 0xd1, script: 0x52, flags: 0x0}, - 572: {region: 0x164, script: 0x52, flags: 0x0}, - 573: {region: 0xae, script: 0x4f, flags: 0x0}, - 574: {region: 0x164, script: 0x52, flags: 0x0}, - 575: {region: 0x164, script: 0x52, flags: 0x0}, + 435: {region: 0x165, script: 0x55, flags: 0x0}, + 436: {region: 0x53, script: 0x37, flags: 0x0}, + 437: {region: 0x165, script: 0x55, flags: 0x0}, + 438: {region: 0x135, script: 0x55, flags: 0x0}, + 439: {region: 0x24, script: 0x5, flags: 0x0}, + 440: {region: 0x165, script: 0x55, flags: 0x0}, + 441: {region: 0x165, script: 0x28, flags: 0x0}, + 442: {region: 0x97, script: 0x3a, flags: 0x0}, + 443: {region: 0x165, script: 0x55, flags: 0x0}, + 444: {region: 0x99, script: 0x20, flags: 0x0}, + 445: {region: 0x165, script: 0x55, flags: 0x0}, + 446: {region: 0x73, script: 0x55, flags: 0x0}, + 447: {region: 0x165, script: 0x55, flags: 0x0}, + 448: {region: 0x165, script: 0x55, flags: 0x0}, + 449: {region: 0xe7, script: 0x55, flags: 0x0}, + 450: {region: 0x165, script: 0x55, flags: 0x0}, + 451: {region: 0x12b, script: 0x3c, flags: 0x0}, + 452: {region: 0x53, script: 0x86, flags: 0x0}, + 453: {region: 0x165, script: 0x55, flags: 0x0}, + 454: {region: 0xe8, script: 0x5, flags: 0x0}, + 455: {region: 0x99, script: 0x20, flags: 0x0}, + 456: {region: 0xaf, script: 0x3d, flags: 0x0}, + 457: {region: 0xe7, script: 0x55, flags: 0x0}, + 458: {region: 0xe8, script: 0x5, flags: 0x0}, + 459: {region: 0xe6, script: 0x55, flags: 0x0}, + 460: {region: 0x99, script: 0x20, flags: 0x0}, + 461: {region: 0x99, script: 0x20, flags: 0x0}, + 462: {region: 0x165, script: 0x55, flags: 0x0}, + 463: {region: 0x90, script: 0x55, flags: 0x0}, + 464: {region: 0x60, script: 0x55, flags: 0x0}, + 465: {region: 0x53, script: 0x37, flags: 0x0}, + 466: {region: 0x91, script: 0x55, flags: 0x0}, + 467: {region: 0x92, script: 0x55, flags: 0x0}, + 468: {region: 0x165, script: 0x55, flags: 0x0}, + 469: {region: 0x28, script: 0x8, flags: 0x0}, + 470: {region: 0xd2, script: 0x55, flags: 0x0}, + 471: {region: 0x78, script: 0x55, flags: 0x0}, + 472: {region: 0x165, script: 0x55, flags: 0x0}, + 473: {region: 0x165, script: 0x55, flags: 0x0}, + 474: {region: 0xd0, script: 0x55, flags: 0x0}, + 475: {region: 0xd6, script: 0x55, flags: 0x0}, + 476: {region: 0x165, script: 0x55, flags: 0x0}, + 477: {region: 0x165, script: 0x55, flags: 0x0}, + 478: {region: 0x165, script: 0x55, flags: 0x0}, + 479: {region: 0x95, script: 0x55, flags: 0x0}, + 480: {region: 0x165, script: 0x55, flags: 0x0}, + 481: {region: 0x165, script: 0x55, flags: 0x0}, + 482: {region: 0x165, script: 0x55, flags: 0x0}, + 484: {region: 0x122, script: 0x55, flags: 0x0}, + 485: {region: 0xd6, script: 0x55, flags: 0x0}, + 486: {region: 0x165, script: 0x55, flags: 0x0}, + 487: {region: 0x165, script: 0x55, flags: 0x0}, + 488: {region: 0x53, script: 0xe5, flags: 0x0}, + 489: {region: 0x165, script: 0x55, flags: 0x0}, + 490: {region: 0x135, script: 0x55, flags: 0x0}, + 491: {region: 0x165, script: 0x55, flags: 0x0}, + 492: {region: 0x49, script: 0x55, flags: 0x0}, + 493: {region: 0x165, script: 0x55, flags: 0x0}, + 494: {region: 0x165, script: 0x55, flags: 0x0}, + 495: {region: 0xe7, script: 0x55, flags: 0x0}, + 496: {region: 0x165, script: 0x55, flags: 0x0}, + 497: {region: 0x95, script: 0x55, flags: 0x0}, + 498: {region: 0x106, script: 0x1e, flags: 0x0}, + 500: {region: 0x165, script: 0x55, flags: 0x0}, + 501: {region: 0x165, script: 0x55, flags: 0x0}, + 502: {region: 0x9d, script: 0x55, flags: 0x0}, + 503: {region: 0x9e, script: 0x55, flags: 0x0}, + 504: {region: 0x49, script: 0x17, flags: 0x0}, + 505: {region: 0x97, script: 0x3a, flags: 0x0}, + 506: {region: 0x165, script: 0x55, flags: 0x0}, + 507: {region: 0x165, script: 0x55, flags: 0x0}, + 508: {region: 0x106, script: 0x55, flags: 0x0}, + 509: {region: 0x165, script: 0x55, flags: 0x0}, + 510: {region: 0xa2, script: 0x44, flags: 0x0}, + 511: {region: 0x165, script: 0x55, flags: 0x0}, + 512: {region: 0xa0, script: 0x55, flags: 0x0}, + 514: {region: 0x165, script: 0x55, flags: 0x0}, + 515: {region: 0x165, script: 0x55, flags: 0x0}, + 516: {region: 0x165, script: 0x55, flags: 0x0}, + 517: {region: 0x52, script: 0x55, flags: 0x0}, + 518: {region: 0x130, script: 0x3a, flags: 0x0}, + 519: {region: 0x165, script: 0x55, flags: 0x0}, + 520: {region: 0x12f, script: 0x55, flags: 0x0}, + 521: {region: 0xdb, script: 0x20, flags: 0x0}, + 522: {region: 0x165, script: 0x55, flags: 0x0}, + 523: {region: 0x63, script: 0x55, flags: 0x0}, + 524: {region: 0x95, script: 0x55, flags: 0x0}, + 525: {region: 0x95, script: 0x55, flags: 0x0}, + 526: {region: 0x7d, script: 0x2a, flags: 0x0}, + 527: {region: 0x137, script: 0x1e, flags: 0x0}, + 528: {region: 0x67, script: 0x55, flags: 0x0}, + 529: {region: 0xc4, script: 0x55, flags: 0x0}, + 530: {region: 0x165, script: 0x55, flags: 0x0}, + 531: {region: 0x165, script: 0x55, flags: 0x0}, + 532: {region: 0xd6, script: 0x55, flags: 0x0}, + 533: {region: 0xa4, script: 0x55, flags: 0x0}, + 534: {region: 0xc3, script: 0x55, flags: 0x0}, + 535: {region: 0x106, script: 0x1e, flags: 0x0}, + 536: {region: 0x165, script: 0x55, flags: 0x0}, + 537: {region: 0x165, script: 0x55, flags: 0x0}, + 538: {region: 0x165, script: 0x55, flags: 0x0}, + 539: {region: 0x165, script: 0x55, flags: 0x0}, + 540: {region: 0xd4, script: 0x5, flags: 0x0}, + 541: {region: 0xd6, script: 0x55, flags: 0x0}, + 542: {region: 0x164, script: 0x55, flags: 0x0}, + 543: {region: 0x165, script: 0x55, flags: 0x0}, + 544: {region: 0x165, script: 0x55, flags: 0x0}, + 545: {region: 0x12f, script: 0x55, flags: 0x0}, + 546: {region: 0x122, script: 0x5, flags: 0x0}, + 547: {region: 0x165, script: 0x55, flags: 0x0}, + 548: {region: 0x123, script: 0xdb, flags: 0x0}, + 549: {region: 0x5a, script: 0x55, flags: 0x0}, + 550: {region: 0x52, script: 0x55, flags: 0x0}, + 551: {region: 0x165, script: 0x55, flags: 0x0}, + 552: {region: 0x4f, script: 0x55, flags: 0x0}, + 553: {region: 0x99, script: 0x20, flags: 0x0}, + 554: {region: 0x99, script: 0x20, flags: 0x0}, + 555: {region: 0x4b, script: 0x55, flags: 0x0}, + 556: {region: 0x95, script: 0x55, flags: 0x0}, + 557: {region: 0x165, script: 0x55, flags: 0x0}, + 558: {region: 0x41, script: 0x55, flags: 0x0}, + 559: {region: 0x99, script: 0x55, flags: 0x0}, + 560: {region: 0x53, script: 0xd2, flags: 0x0}, + 561: {region: 0x99, script: 0x20, flags: 0x0}, + 562: {region: 0xc3, script: 0x55, flags: 0x0}, + 563: {region: 0x165, script: 0x55, flags: 0x0}, + 564: {region: 0x99, script: 0x70, flags: 0x0}, + 565: {region: 0xe8, script: 0x5, flags: 0x0}, + 566: {region: 0x165, script: 0x55, flags: 0x0}, + 567: {region: 0xa4, script: 0x55, flags: 0x0}, + 568: {region: 0x165, script: 0x55, flags: 0x0}, + 569: {region: 0x12b, script: 0x55, flags: 0x0}, + 570: {region: 0x165, script: 0x55, flags: 0x0}, + 571: {region: 0xd2, script: 0x55, flags: 0x0}, + 572: {region: 0x165, script: 0x55, flags: 0x0}, + 573: {region: 0xaf, script: 0x52, flags: 0x0}, + 574: {region: 0x165, script: 0x55, flags: 0x0}, + 575: {region: 0x165, script: 0x55, flags: 0x0}, 576: {region: 0x13, script: 0x6, flags: 0x1}, - 577: {region: 0x164, script: 0x52, flags: 0x0}, - 578: {region: 0x51, script: 0x52, flags: 0x0}, - 579: {region: 0x81, script: 0x52, flags: 0x0}, - 580: {region: 0xa3, script: 0x52, flags: 0x0}, - 581: {region: 0x164, script: 0x52, flags: 0x0}, - 582: {region: 0x164, script: 0x52, flags: 0x0}, - 583: {region: 0x164, script: 0x52, flags: 0x0}, - 584: {region: 0xa5, script: 0x46, flags: 0x0}, - 585: {region: 0x29, script: 0x52, flags: 0x0}, - 586: {region: 0x164, script: 0x52, flags: 0x0}, - 587: {region: 0x164, script: 0x52, flags: 0x0}, - 588: {region: 0x164, script: 0x52, flags: 0x0}, - 589: {region: 0x164, script: 0x52, flags: 0x0}, - 590: {region: 0x164, script: 0x52, flags: 0x0}, - 591: {region: 0x98, script: 0x4a, flags: 0x0}, - 592: {region: 0x113, script: 0x52, flags: 0x0}, - 593: {region: 0x164, script: 0x52, flags: 0x0}, - 594: {region: 0xaa, script: 0x4b, flags: 0x0}, - 595: {region: 0x105, script: 0x1e, flags: 0x0}, - 596: {region: 0x98, script: 0x20, flags: 0x0}, - 597: {region: 0x164, script: 0x52, flags: 0x0}, - 598: {region: 0x74, script: 0x52, flags: 0x0}, - 599: {region: 0x164, script: 0x52, flags: 0x0}, - 600: {region: 0xb3, script: 0x52, flags: 0x0}, - 601: {region: 0x164, script: 0x52, flags: 0x0}, - 602: {region: 0x164, script: 0x52, flags: 0x0}, - 603: {region: 0x164, script: 0x52, flags: 0x0}, - 604: {region: 0x164, script: 0x52, flags: 0x0}, - 605: {region: 0x164, script: 0x52, flags: 0x0}, - 606: {region: 0x164, script: 0x52, flags: 0x0}, - 607: {region: 0x164, script: 0x52, flags: 0x0}, - 608: {region: 0x164, script: 0x27, flags: 0x0}, - 610: {region: 0x105, script: 0x1e, flags: 0x0}, - 611: {region: 0x111, script: 0x52, flags: 0x0}, - 612: {region: 0xe6, script: 0x52, flags: 0x0}, - 613: {region: 0x105, script: 0x52, flags: 0x0}, - 614: {region: 0x164, script: 0x52, flags: 0x0}, - 615: {region: 0x98, script: 0x20, flags: 0x0}, - 616: {region: 0x98, script: 0x5, flags: 0x0}, - 617: {region: 0x12e, script: 0x52, flags: 0x0}, - 618: {region: 0x164, script: 0x52, flags: 0x0}, - 619: {region: 0x51, script: 0x52, flags: 0x0}, - 620: {region: 0x5f, script: 0x52, flags: 0x0}, - 621: {region: 0x164, script: 0x52, flags: 0x0}, - 622: {region: 0x164, script: 0x52, flags: 0x0}, - 623: {region: 0x164, script: 0x27, flags: 0x0}, - 624: {region: 0x164, script: 0x52, flags: 0x0}, - 625: {region: 0x164, script: 0x52, flags: 0x0}, + 577: {region: 0x165, script: 0x55, flags: 0x0}, + 578: {region: 0x52, script: 0x55, flags: 0x0}, + 579: {region: 0x82, script: 0x55, flags: 0x0}, + 580: {region: 0xa4, script: 0x55, flags: 0x0}, + 581: {region: 0x165, script: 0x55, flags: 0x0}, + 582: {region: 0x165, script: 0x55, flags: 0x0}, + 583: {region: 0x165, script: 0x55, flags: 0x0}, + 584: {region: 0xa6, script: 0x49, flags: 0x0}, + 585: {region: 0x2a, script: 0x55, flags: 0x0}, + 586: {region: 0x165, script: 0x55, flags: 0x0}, + 587: {region: 0x165, script: 0x55, flags: 0x0}, + 588: {region: 0x165, script: 0x55, flags: 0x0}, + 589: {region: 0x165, script: 0x55, flags: 0x0}, + 590: {region: 0x165, script: 0x55, flags: 0x0}, + 591: {region: 0x99, script: 0x4d, flags: 0x0}, + 592: {region: 0x114, script: 0x55, flags: 0x0}, + 593: {region: 0x165, script: 0x55, flags: 0x0}, + 594: {region: 0xab, script: 0x4e, flags: 0x0}, + 595: {region: 0x106, script: 0x1e, flags: 0x0}, + 596: {region: 0x99, script: 0x20, flags: 0x0}, + 597: {region: 0x165, script: 0x55, flags: 0x0}, + 598: {region: 0x75, script: 0x55, flags: 0x0}, + 599: {region: 0x165, script: 0x55, flags: 0x0}, + 600: {region: 0xb4, script: 0x55, flags: 0x0}, + 601: {region: 0x165, script: 0x55, flags: 0x0}, + 602: {region: 0x165, script: 0x55, flags: 0x0}, + 603: {region: 0x165, script: 0x55, flags: 0x0}, + 604: {region: 0x165, script: 0x55, flags: 0x0}, + 605: {region: 0x165, script: 0x55, flags: 0x0}, + 606: {region: 0x165, script: 0x55, flags: 0x0}, + 607: {region: 0x165, script: 0x55, flags: 0x0}, + 608: {region: 0x165, script: 0x28, flags: 0x0}, + 610: {region: 0x106, script: 0x1e, flags: 0x0}, + 611: {region: 0x112, script: 0x55, flags: 0x0}, + 612: {region: 0xe7, script: 0x55, flags: 0x0}, + 613: {region: 0x106, script: 0x55, flags: 0x0}, + 614: {region: 0x165, script: 0x55, flags: 0x0}, + 615: {region: 0x99, script: 0x20, flags: 0x0}, + 616: {region: 0x99, script: 0x5, flags: 0x0}, + 617: {region: 0x12f, script: 0x55, flags: 0x0}, + 618: {region: 0x165, script: 0x55, flags: 0x0}, + 619: {region: 0x52, script: 0x55, flags: 0x0}, + 620: {region: 0x60, script: 0x55, flags: 0x0}, + 621: {region: 0x165, script: 0x55, flags: 0x0}, + 622: {region: 0x165, script: 0x55, flags: 0x0}, + 623: {region: 0x165, script: 0x28, flags: 0x0}, + 624: {region: 0x165, script: 0x55, flags: 0x0}, + 625: {region: 0x165, script: 0x55, flags: 0x0}, 626: {region: 0x19, script: 0x3, flags: 0x1}, - 627: {region: 0x164, script: 0x52, flags: 0x0}, - 628: {region: 0x164, script: 0x52, flags: 0x0}, - 629: {region: 0x164, script: 0x52, flags: 0x0}, - 630: {region: 0x164, script: 0x52, flags: 0x0}, - 631: {region: 0x105, script: 0x1e, flags: 0x0}, - 632: {region: 0x164, script: 0x52, flags: 0x0}, - 633: {region: 0x164, script: 0x52, flags: 0x0}, - 634: {region: 0x164, script: 0x52, flags: 0x0}, - 635: {region: 0x105, script: 0x1e, flags: 0x0}, - 636: {region: 0x164, script: 0x52, flags: 0x0}, - 637: {region: 0x94, script: 0x52, flags: 0x0}, - 638: {region: 0xe7, script: 0x5, flags: 0x0}, - 639: {region: 0x7a, script: 0x52, flags: 0x0}, - 640: {region: 0x164, script: 0x52, flags: 0x0}, - 641: {region: 0x164, script: 0x52, flags: 0x0}, - 642: {region: 0x164, script: 0x52, flags: 0x0}, - 643: {region: 0x164, script: 0x27, flags: 0x0}, - 644: {region: 0x122, script: 0xd5, flags: 0x0}, - 645: {region: 0xe7, script: 0x5, flags: 0x0}, - 646: {region: 0x164, script: 0x52, flags: 0x0}, - 647: {region: 0x164, script: 0x52, flags: 0x0}, + 627: {region: 0x165, script: 0x55, flags: 0x0}, + 628: {region: 0x165, script: 0x55, flags: 0x0}, + 629: {region: 0x165, script: 0x55, flags: 0x0}, + 630: {region: 0x165, script: 0x55, flags: 0x0}, + 631: {region: 0x106, script: 0x1e, flags: 0x0}, + 632: {region: 0x165, script: 0x55, flags: 0x0}, + 633: {region: 0x165, script: 0x55, flags: 0x0}, + 634: {region: 0x165, script: 0x55, flags: 0x0}, + 635: {region: 0x106, script: 0x1e, flags: 0x0}, + 636: {region: 0x165, script: 0x55, flags: 0x0}, + 637: {region: 0x95, script: 0x55, flags: 0x0}, + 638: {region: 0xe8, script: 0x5, flags: 0x0}, + 639: {region: 0x7b, script: 0x55, flags: 0x0}, + 640: {region: 0x165, script: 0x55, flags: 0x0}, + 641: {region: 0x165, script: 0x55, flags: 0x0}, + 642: {region: 0x165, script: 0x55, flags: 0x0}, + 643: {region: 0x165, script: 0x28, flags: 0x0}, + 644: {region: 0x123, script: 0xdb, flags: 0x0}, + 645: {region: 0xe8, script: 0x5, flags: 0x0}, + 646: {region: 0x165, script: 0x55, flags: 0x0}, + 647: {region: 0x165, script: 0x55, flags: 0x0}, 648: {region: 0x1c, script: 0x5, flags: 0x1}, - 649: {region: 0x164, script: 0x52, flags: 0x0}, - 650: {region: 0x164, script: 0x52, flags: 0x0}, - 651: {region: 0x164, script: 0x52, flags: 0x0}, - 652: {region: 0x137, script: 0x52, flags: 0x0}, - 653: {region: 0x86, script: 0x56, flags: 0x0}, - 654: {region: 0x96, script: 0x37, flags: 0x0}, - 655: {region: 0x12e, script: 0x52, flags: 0x0}, - 656: {region: 0xe7, script: 0x5, flags: 0x0}, - 657: {region: 0x130, script: 0x52, flags: 0x0}, - 658: {region: 0x164, script: 0x52, flags: 0x0}, - 659: {region: 0xb6, script: 0x52, flags: 0x0}, - 660: {region: 0x105, script: 0x1e, flags: 0x0}, - 661: {region: 0x164, script: 0x52, flags: 0x0}, - 662: {region: 0x94, script: 0x52, flags: 0x0}, - 663: {region: 0x164, script: 0x52, flags: 0x0}, - 664: {region: 0x52, script: 0xd5, flags: 0x0}, - 665: {region: 0x164, script: 0x52, flags: 0x0}, - 666: {region: 0x164, script: 0x52, flags: 0x0}, - 667: {region: 0x164, script: 0x52, flags: 0x0}, - 668: {region: 0x164, script: 0x52, flags: 0x0}, - 669: {region: 0x98, script: 0x54, flags: 0x0}, - 670: {region: 0x164, script: 0x52, flags: 0x0}, - 671: {region: 0x164, script: 0x52, flags: 0x0}, - 672: {region: 0x105, script: 0x1e, flags: 0x0}, - 673: {region: 0x130, script: 0x52, flags: 0x0}, - 674: {region: 0x164, script: 0x52, flags: 0x0}, - 675: {region: 0xd8, script: 0x52, flags: 0x0}, - 676: {region: 0x164, script: 0x52, flags: 0x0}, - 677: {region: 0x164, script: 0x52, flags: 0x0}, + 649: {region: 0x165, script: 0x55, flags: 0x0}, + 650: {region: 0x165, script: 0x55, flags: 0x0}, + 651: {region: 0x165, script: 0x55, flags: 0x0}, + 652: {region: 0x138, script: 0x55, flags: 0x0}, + 653: {region: 0x87, script: 0x59, flags: 0x0}, + 654: {region: 0x97, script: 0x3a, flags: 0x0}, + 655: {region: 0x12f, script: 0x55, flags: 0x0}, + 656: {region: 0xe8, script: 0x5, flags: 0x0}, + 657: {region: 0x131, script: 0x55, flags: 0x0}, + 658: {region: 0x165, script: 0x55, flags: 0x0}, + 659: {region: 0xb7, script: 0x55, flags: 0x0}, + 660: {region: 0x106, script: 0x1e, flags: 0x0}, + 661: {region: 0x165, script: 0x55, flags: 0x0}, + 662: {region: 0x95, script: 0x55, flags: 0x0}, + 663: {region: 0x165, script: 0x55, flags: 0x0}, + 664: {region: 0x53, script: 0xdb, flags: 0x0}, + 665: {region: 0x165, script: 0x55, flags: 0x0}, + 666: {region: 0x165, script: 0x55, flags: 0x0}, + 667: {region: 0x165, script: 0x55, flags: 0x0}, + 668: {region: 0x165, script: 0x55, flags: 0x0}, + 669: {region: 0x99, script: 0x57, flags: 0x0}, + 670: {region: 0x165, script: 0x55, flags: 0x0}, + 671: {region: 0x165, script: 0x55, flags: 0x0}, + 672: {region: 0x106, script: 0x1e, flags: 0x0}, + 673: {region: 0x131, script: 0x55, flags: 0x0}, + 674: {region: 0x165, script: 0x55, flags: 0x0}, + 675: {region: 0xd9, script: 0x55, flags: 0x0}, + 676: {region: 0x165, script: 0x55, flags: 0x0}, + 677: {region: 0x165, script: 0x55, flags: 0x0}, 678: {region: 0x21, script: 0x2, flags: 0x1}, - 679: {region: 0x164, script: 0x52, flags: 0x0}, - 680: {region: 0x164, script: 0x52, flags: 0x0}, - 681: {region: 0x9d, script: 0x52, flags: 0x0}, - 682: {region: 0x52, script: 0x58, flags: 0x0}, - 683: {region: 0x94, script: 0x52, flags: 0x0}, - 684: {region: 0x9b, script: 0x5, flags: 0x0}, - 685: {region: 0x134, script: 0x52, flags: 0x0}, - 686: {region: 0x164, script: 0x52, flags: 0x0}, - 687: {region: 0x164, script: 0x52, flags: 0x0}, - 688: {region: 0x98, script: 0xd0, flags: 0x0}, - 689: {region: 0x9d, script: 0x52, flags: 0x0}, - 690: {region: 0x164, script: 0x52, flags: 0x0}, - 691: {region: 0x4a, script: 0x52, flags: 0x0}, - 692: {region: 0x164, script: 0x52, flags: 0x0}, - 693: {region: 0x164, script: 0x52, flags: 0x0}, - 694: {region: 0xae, script: 0x4f, flags: 0x0}, - 695: {region: 0x164, script: 0x52, flags: 0x0}, - 696: {region: 0x164, script: 0x52, flags: 0x0}, - 697: {region: 0x4a, script: 0x52, flags: 0x0}, - 698: {region: 0x164, script: 0x52, flags: 0x0}, - 699: {region: 0x164, script: 0x52, flags: 0x0}, - 700: {region: 0x161, script: 0x52, flags: 0x0}, - 701: {region: 0x9b, script: 0x5, flags: 0x0}, - 702: {region: 0xb5, script: 0x52, flags: 0x0}, - 703: {region: 0xb7, script: 0x52, flags: 0x0}, - 704: {region: 0x4a, script: 0x52, flags: 0x0}, - 705: {region: 0x4a, script: 0x52, flags: 0x0}, - 706: {region: 0xa3, script: 0x52, flags: 0x0}, - 707: {region: 0xa3, script: 0x52, flags: 0x0}, - 708: {region: 0x9b, script: 0x5, flags: 0x0}, - 709: {region: 0xb7, script: 0x52, flags: 0x0}, - 710: {region: 0x122, script: 0xd5, flags: 0x0}, - 711: {region: 0x52, script: 0x34, flags: 0x0}, - 712: {region: 0x12a, script: 0x52, flags: 0x0}, - 713: {region: 0x94, script: 0x52, flags: 0x0}, - 714: {region: 0x51, script: 0x52, flags: 0x0}, - 715: {region: 0x98, script: 0x20, flags: 0x0}, - 716: {region: 0x98, script: 0x20, flags: 0x0}, - 717: {region: 0x94, script: 0x52, flags: 0x0}, + 679: {region: 0x165, script: 0x55, flags: 0x0}, + 680: {region: 0x165, script: 0x55, flags: 0x0}, + 681: {region: 0x9e, script: 0x55, flags: 0x0}, + 682: {region: 0x53, script: 0x5b, flags: 0x0}, + 683: {region: 0x95, script: 0x55, flags: 0x0}, + 684: {region: 0x9c, script: 0x5, flags: 0x0}, + 685: {region: 0x135, script: 0x55, flags: 0x0}, + 686: {region: 0x165, script: 0x55, flags: 0x0}, + 687: {region: 0x165, script: 0x55, flags: 0x0}, + 688: {region: 0x99, script: 0xd6, flags: 0x0}, + 689: {region: 0x9e, script: 0x55, flags: 0x0}, + 690: {region: 0x165, script: 0x55, flags: 0x0}, + 691: {region: 0x4b, script: 0x55, flags: 0x0}, + 692: {region: 0x165, script: 0x55, flags: 0x0}, + 693: {region: 0x165, script: 0x55, flags: 0x0}, + 694: {region: 0xaf, script: 0x52, flags: 0x0}, + 695: {region: 0x165, script: 0x55, flags: 0x0}, + 696: {region: 0x165, script: 0x55, flags: 0x0}, + 697: {region: 0x4b, script: 0x55, flags: 0x0}, + 698: {region: 0x165, script: 0x55, flags: 0x0}, + 699: {region: 0x165, script: 0x55, flags: 0x0}, + 700: {region: 0x162, script: 0x55, flags: 0x0}, + 701: {region: 0x9c, script: 0x5, flags: 0x0}, + 702: {region: 0xb6, script: 0x55, flags: 0x0}, + 703: {region: 0xb8, script: 0x55, flags: 0x0}, + 704: {region: 0x4b, script: 0x55, flags: 0x0}, + 705: {region: 0x4b, script: 0x55, flags: 0x0}, + 706: {region: 0xa4, script: 0x55, flags: 0x0}, + 707: {region: 0xa4, script: 0x55, flags: 0x0}, + 708: {region: 0x9c, script: 0x5, flags: 0x0}, + 709: {region: 0xb8, script: 0x55, flags: 0x0}, + 710: {region: 0x123, script: 0xdb, flags: 0x0}, + 711: {region: 0x53, script: 0x37, flags: 0x0}, + 712: {region: 0x12b, script: 0x55, flags: 0x0}, + 713: {region: 0x95, script: 0x55, flags: 0x0}, + 714: {region: 0x52, script: 0x55, flags: 0x0}, + 715: {region: 0x99, script: 0x20, flags: 0x0}, + 716: {region: 0x99, script: 0x20, flags: 0x0}, + 717: {region: 0x95, script: 0x55, flags: 0x0}, 718: {region: 0x23, script: 0x3, flags: 0x1}, - 719: {region: 0xa3, script: 0x52, flags: 0x0}, - 720: {region: 0x164, script: 0x52, flags: 0x0}, - 721: {region: 0xce, script: 0x52, flags: 0x0}, - 722: {region: 0x164, script: 0x52, flags: 0x0}, - 723: {region: 0x164, script: 0x52, flags: 0x0}, - 724: {region: 0x164, script: 0x52, flags: 0x0}, - 725: {region: 0x164, script: 0x52, flags: 0x0}, - 726: {region: 0x164, script: 0x52, flags: 0x0}, - 727: {region: 0x164, script: 0x52, flags: 0x0}, - 728: {region: 0x164, script: 0x52, flags: 0x0}, - 729: {region: 0x164, script: 0x52, flags: 0x0}, - 730: {region: 0x164, script: 0x52, flags: 0x0}, - 731: {region: 0x164, script: 0x52, flags: 0x0}, - 732: {region: 0x164, script: 0x52, flags: 0x0}, - 733: {region: 0x164, script: 0x5, flags: 0x0}, - 734: {region: 0x105, script: 0x1e, flags: 0x0}, - 735: {region: 0xe6, script: 0x52, flags: 0x0}, - 736: {region: 0x164, script: 0x52, flags: 0x0}, - 737: {region: 0x94, script: 0x52, flags: 0x0}, - 738: {region: 0x164, script: 0x27, flags: 0x0}, - 739: {region: 0x164, script: 0x52, flags: 0x0}, - 740: {region: 0x164, script: 0x52, flags: 0x0}, - 741: {region: 0x164, script: 0x52, flags: 0x0}, - 742: {region: 0x111, script: 0x52, flags: 0x0}, - 743: {region: 0xa3, script: 0x52, flags: 0x0}, - 744: {region: 0x164, script: 0x52, flags: 0x0}, - 745: {region: 0x164, script: 0x52, flags: 0x0}, - 746: {region: 0x122, script: 0x5, flags: 0x0}, - 747: {region: 0xcb, script: 0x52, flags: 0x0}, - 748: {region: 0x164, script: 0x52, flags: 0x0}, - 749: {region: 0x164, script: 0x52, flags: 0x0}, - 750: {region: 0x164, script: 0x52, flags: 0x0}, - 751: {region: 0xbe, script: 0x52, flags: 0x0}, - 752: {region: 0xd0, script: 0x52, flags: 0x0}, - 753: {region: 0x164, script: 0x52, flags: 0x0}, - 754: {region: 0x51, script: 0x52, flags: 0x0}, - 755: {region: 0xda, script: 0x20, flags: 0x0}, - 756: {region: 0x12e, script: 0x52, flags: 0x0}, - 757: {region: 0xbf, script: 0x52, flags: 0x0}, - 758: {region: 0x164, script: 0x52, flags: 0x0}, - 759: {region: 0x164, script: 0x52, flags: 0x0}, - 760: {region: 0xdf, script: 0x52, flags: 0x0}, - 761: {region: 0x164, script: 0x52, flags: 0x0}, - 762: {region: 0x94, script: 0x52, flags: 0x0}, - 763: {region: 0x9a, script: 0x36, flags: 0x0}, - 764: {region: 0x164, script: 0x52, flags: 0x0}, - 765: {region: 0xc1, script: 0x1e, flags: 0x0}, - 766: {region: 0x164, script: 0x5, flags: 0x0}, - 767: {region: 0x164, script: 0x52, flags: 0x0}, - 768: {region: 0x164, script: 0x52, flags: 0x0}, - 769: {region: 0x164, script: 0x52, flags: 0x0}, - 770: {region: 0x98, script: 0x64, flags: 0x0}, - 771: {region: 0x164, script: 0x52, flags: 0x0}, - 772: {region: 0x164, script: 0x52, flags: 0x0}, - 773: {region: 0x10a, script: 0x52, flags: 0x0}, - 774: {region: 0x164, script: 0x52, flags: 0x0}, - 775: {region: 0x164, script: 0x52, flags: 0x0}, - 776: {region: 0x164, script: 0x52, flags: 0x0}, + 719: {region: 0xa4, script: 0x55, flags: 0x0}, + 720: {region: 0x165, script: 0x55, flags: 0x0}, + 721: {region: 0xcf, script: 0x55, flags: 0x0}, + 722: {region: 0x165, script: 0x55, flags: 0x0}, + 723: {region: 0x165, script: 0x55, flags: 0x0}, + 724: {region: 0x165, script: 0x55, flags: 0x0}, + 725: {region: 0x165, script: 0x55, flags: 0x0}, + 726: {region: 0x165, script: 0x55, flags: 0x0}, + 727: {region: 0x165, script: 0x55, flags: 0x0}, + 728: {region: 0x165, script: 0x55, flags: 0x0}, + 729: {region: 0x165, script: 0x55, flags: 0x0}, + 730: {region: 0x165, script: 0x55, flags: 0x0}, + 731: {region: 0x165, script: 0x55, flags: 0x0}, + 732: {region: 0x165, script: 0x55, flags: 0x0}, + 733: {region: 0x165, script: 0x5, flags: 0x0}, + 734: {region: 0x106, script: 0x1e, flags: 0x0}, + 735: {region: 0xe7, script: 0x55, flags: 0x0}, + 736: {region: 0x165, script: 0x55, flags: 0x0}, + 737: {region: 0x95, script: 0x55, flags: 0x0}, + 738: {region: 0x165, script: 0x28, flags: 0x0}, + 739: {region: 0x165, script: 0x55, flags: 0x0}, + 740: {region: 0x165, script: 0x55, flags: 0x0}, + 741: {region: 0x165, script: 0x55, flags: 0x0}, + 742: {region: 0x112, script: 0x55, flags: 0x0}, + 743: {region: 0xa4, script: 0x55, flags: 0x0}, + 744: {region: 0x165, script: 0x55, flags: 0x0}, + 745: {region: 0x165, script: 0x55, flags: 0x0}, + 746: {region: 0x123, script: 0x5, flags: 0x0}, + 747: {region: 0xcc, script: 0x55, flags: 0x0}, + 748: {region: 0x165, script: 0x55, flags: 0x0}, + 749: {region: 0x165, script: 0x55, flags: 0x0}, + 750: {region: 0x165, script: 0x55, flags: 0x0}, + 751: {region: 0xbf, script: 0x55, flags: 0x0}, + 752: {region: 0xd1, script: 0x55, flags: 0x0}, + 753: {region: 0x165, script: 0x55, flags: 0x0}, + 754: {region: 0x52, script: 0x55, flags: 0x0}, + 755: {region: 0xdb, script: 0x20, flags: 0x0}, + 756: {region: 0x12f, script: 0x55, flags: 0x0}, + 757: {region: 0xc0, script: 0x55, flags: 0x0}, + 758: {region: 0x165, script: 0x55, flags: 0x0}, + 759: {region: 0x165, script: 0x55, flags: 0x0}, + 760: {region: 0xe0, script: 0x55, flags: 0x0}, + 761: {region: 0x165, script: 0x55, flags: 0x0}, + 762: {region: 0x95, script: 0x55, flags: 0x0}, + 763: {region: 0x9b, script: 0x39, flags: 0x0}, + 764: {region: 0x165, script: 0x55, flags: 0x0}, + 765: {region: 0xc2, script: 0x1e, flags: 0x0}, + 766: {region: 0x165, script: 0x5, flags: 0x0}, + 767: {region: 0x165, script: 0x55, flags: 0x0}, + 768: {region: 0x165, script: 0x55, flags: 0x0}, + 769: {region: 0x165, script: 0x55, flags: 0x0}, + 770: {region: 0x99, script: 0x69, flags: 0x0}, + 771: {region: 0x165, script: 0x55, flags: 0x0}, + 772: {region: 0x165, script: 0x55, flags: 0x0}, + 773: {region: 0x10b, script: 0x55, flags: 0x0}, + 774: {region: 0x165, script: 0x55, flags: 0x0}, + 775: {region: 0x165, script: 0x55, flags: 0x0}, + 776: {region: 0x165, script: 0x55, flags: 0x0}, 777: {region: 0x26, script: 0x3, flags: 0x1}, - 778: {region: 0x164, script: 0x52, flags: 0x0}, - 779: {region: 0x164, script: 0x52, flags: 0x0}, - 780: {region: 0x98, script: 0xe, flags: 0x0}, - 781: {region: 0xc3, script: 0x6b, flags: 0x0}, - 783: {region: 0x164, script: 0x52, flags: 0x0}, - 784: {region: 0x48, script: 0x52, flags: 0x0}, - 785: {region: 0x48, script: 0x52, flags: 0x0}, - 786: {region: 0x36, script: 0x52, flags: 0x0}, - 787: {region: 0x164, script: 0x52, flags: 0x0}, - 788: {region: 0x164, script: 0x52, flags: 0x0}, - 789: {region: 0x164, script: 0x52, flags: 0x0}, - 790: {region: 0x164, script: 0x52, flags: 0x0}, - 791: {region: 0x164, script: 0x52, flags: 0x0}, - 792: {region: 0x164, script: 0x52, flags: 0x0}, - 793: {region: 0x98, script: 0x20, flags: 0x0}, - 794: {region: 0xda, script: 0x20, flags: 0x0}, - 795: {region: 0x105, script: 0x1e, flags: 0x0}, - 796: {region: 0x34, script: 0x68, flags: 0x0}, + 778: {region: 0x165, script: 0x55, flags: 0x0}, + 779: {region: 0x165, script: 0x55, flags: 0x0}, + 780: {region: 0x99, script: 0xe, flags: 0x0}, + 781: {region: 0xc4, script: 0x70, flags: 0x0}, + 783: {region: 0x165, script: 0x55, flags: 0x0}, + 784: {region: 0x49, script: 0x55, flags: 0x0}, + 785: {region: 0x49, script: 0x55, flags: 0x0}, + 786: {region: 0x37, script: 0x55, flags: 0x0}, + 787: {region: 0x165, script: 0x55, flags: 0x0}, + 788: {region: 0x165, script: 0x55, flags: 0x0}, + 789: {region: 0x165, script: 0x55, flags: 0x0}, + 790: {region: 0x165, script: 0x55, flags: 0x0}, + 791: {region: 0x165, script: 0x55, flags: 0x0}, + 792: {region: 0x165, script: 0x55, flags: 0x0}, + 793: {region: 0x99, script: 0x20, flags: 0x0}, + 794: {region: 0xdb, script: 0x20, flags: 0x0}, + 795: {region: 0x106, script: 0x1e, flags: 0x0}, + 796: {region: 0x35, script: 0x6d, flags: 0x0}, 797: {region: 0x29, script: 0x3, flags: 0x1}, - 798: {region: 0xca, script: 0x52, flags: 0x0}, - 799: {region: 0x164, script: 0x52, flags: 0x0}, - 800: {region: 0x164, script: 0x52, flags: 0x0}, - 801: {region: 0x164, script: 0x52, flags: 0x0}, - 802: {region: 0x98, script: 0x20, flags: 0x0}, - 803: {region: 0x51, script: 0x52, flags: 0x0}, - 805: {region: 0x164, script: 0x52, flags: 0x0}, - 806: {region: 0x134, script: 0x52, flags: 0x0}, - 807: {region: 0x164, script: 0x52, flags: 0x0}, - 808: {region: 0x164, script: 0x52, flags: 0x0}, - 809: {region: 0xe7, script: 0x5, flags: 0x0}, - 810: {region: 0xc2, script: 0x52, flags: 0x0}, - 811: {region: 0x98, script: 0x20, flags: 0x0}, - 812: {region: 0x94, script: 0x52, flags: 0x0}, - 813: {region: 0x163, script: 0x52, flags: 0x0}, - 814: {region: 0x164, script: 0x52, flags: 0x0}, - 815: {region: 0xc3, script: 0x6b, flags: 0x0}, - 816: {region: 0x164, script: 0x52, flags: 0x0}, - 817: {region: 0x164, script: 0x27, flags: 0x0}, - 818: {region: 0x105, script: 0x1e, flags: 0x0}, - 819: {region: 0x164, script: 0x52, flags: 0x0}, - 820: {region: 0x130, script: 0x52, flags: 0x0}, - 821: {region: 0x9b, script: 0x5d, flags: 0x0}, - 822: {region: 0x164, script: 0x52, flags: 0x0}, - 823: {region: 0x164, script: 0x52, flags: 0x0}, - 824: {region: 0x9b, script: 0x5, flags: 0x0}, - 825: {region: 0x164, script: 0x52, flags: 0x0}, - 826: {region: 0x164, script: 0x52, flags: 0x0}, - 827: {region: 0x164, script: 0x52, flags: 0x0}, - 828: {region: 0xdc, script: 0x52, flags: 0x0}, - 829: {region: 0x164, script: 0x52, flags: 0x0}, - 830: {region: 0x164, script: 0x52, flags: 0x0}, - 832: {region: 0x164, script: 0x52, flags: 0x0}, - 833: {region: 0x52, script: 0x34, flags: 0x0}, - 834: {region: 0x9d, script: 0x52, flags: 0x0}, - 835: {region: 0xd1, script: 0x52, flags: 0x0}, - 836: {region: 0x164, script: 0x52, flags: 0x0}, - 837: {region: 0xd9, script: 0x52, flags: 0x0}, - 838: {region: 0x164, script: 0x52, flags: 0x0}, - 839: {region: 0x164, script: 0x52, flags: 0x0}, - 840: {region: 0x164, script: 0x52, flags: 0x0}, - 841: {region: 0xce, script: 0x52, flags: 0x0}, - 842: {region: 0x164, script: 0x52, flags: 0x0}, - 843: {region: 0x164, script: 0x52, flags: 0x0}, - 844: {region: 0x163, script: 0x52, flags: 0x0}, - 845: {region: 0xd0, script: 0x52, flags: 0x0}, - 846: {region: 0x5f, script: 0x52, flags: 0x0}, - 847: {region: 0xda, script: 0x20, flags: 0x0}, - 848: {region: 0x164, script: 0x52, flags: 0x0}, - 849: {region: 0xda, script: 0x20, flags: 0x0}, - 850: {region: 0x164, script: 0x52, flags: 0x0}, - 851: {region: 0x164, script: 0x52, flags: 0x0}, - 852: {region: 0xd1, script: 0x52, flags: 0x0}, - 853: {region: 0x164, script: 0x52, flags: 0x0}, - 854: {region: 0x164, script: 0x52, flags: 0x0}, - 855: {region: 0xd0, script: 0x52, flags: 0x0}, - 856: {region: 0x164, script: 0x52, flags: 0x0}, - 857: {region: 0xce, script: 0x52, flags: 0x0}, - 858: {region: 0xce, script: 0x52, flags: 0x0}, - 859: {region: 0x164, script: 0x52, flags: 0x0}, - 860: {region: 0x164, script: 0x52, flags: 0x0}, - 861: {region: 0x94, script: 0x52, flags: 0x0}, - 862: {region: 0x164, script: 0x52, flags: 0x0}, - 863: {region: 0xde, script: 0x52, flags: 0x0}, - 864: {region: 0x164, script: 0x52, flags: 0x0}, - 865: {region: 0x164, script: 0x52, flags: 0x0}, - 866: {region: 0x98, script: 0x52, flags: 0x0}, - 867: {region: 0x164, script: 0x52, flags: 0x0}, - 868: {region: 0x164, script: 0x52, flags: 0x0}, - 869: {region: 0xd8, script: 0x52, flags: 0x0}, - 870: {region: 0x51, script: 0x52, flags: 0x0}, - 871: {region: 0x164, script: 0x52, flags: 0x0}, - 872: {region: 0xd9, script: 0x52, flags: 0x0}, - 873: {region: 0x164, script: 0x52, flags: 0x0}, - 874: {region: 0x51, script: 0x52, flags: 0x0}, - 875: {region: 0x164, script: 0x52, flags: 0x0}, - 876: {region: 0x164, script: 0x52, flags: 0x0}, - 877: {region: 0xd9, script: 0x52, flags: 0x0}, - 878: {region: 0x122, script: 0x4e, flags: 0x0}, - 879: {region: 0x98, script: 0x20, flags: 0x0}, - 880: {region: 0x10b, script: 0xb7, flags: 0x0}, - 881: {region: 0x164, script: 0x52, flags: 0x0}, - 882: {region: 0x164, script: 0x52, flags: 0x0}, - 883: {region: 0x83, script: 0x70, flags: 0x0}, - 884: {region: 0x160, script: 0x52, flags: 0x0}, - 885: {region: 0x164, script: 0x52, flags: 0x0}, - 886: {region: 0x48, script: 0x17, flags: 0x0}, - 887: {region: 0x164, script: 0x52, flags: 0x0}, - 888: {region: 0x160, script: 0x52, flags: 0x0}, - 889: {region: 0x164, script: 0x52, flags: 0x0}, - 890: {region: 0x164, script: 0x52, flags: 0x0}, - 891: {region: 0x164, script: 0x52, flags: 0x0}, - 892: {region: 0x164, script: 0x52, flags: 0x0}, - 893: {region: 0x164, script: 0x52, flags: 0x0}, - 894: {region: 0x116, script: 0x52, flags: 0x0}, - 895: {region: 0x164, script: 0x52, flags: 0x0}, - 896: {region: 0x164, script: 0x52, flags: 0x0}, - 897: {region: 0x134, script: 0x52, flags: 0x0}, - 898: {region: 0x164, script: 0x52, flags: 0x0}, - 899: {region: 0x52, script: 0x52, flags: 0x0}, - 900: {region: 0x164, script: 0x52, flags: 0x0}, - 901: {region: 0xcd, script: 0x52, flags: 0x0}, - 902: {region: 0x12e, script: 0x52, flags: 0x0}, - 903: {region: 0x130, script: 0x52, flags: 0x0}, - 904: {region: 0x7f, script: 0x52, flags: 0x0}, - 905: {region: 0x77, script: 0x52, flags: 0x0}, - 906: {region: 0x164, script: 0x52, flags: 0x0}, - 908: {region: 0x164, script: 0x52, flags: 0x0}, - 909: {region: 0x164, script: 0x52, flags: 0x0}, - 910: {region: 0x6e, script: 0x52, flags: 0x0}, - 911: {region: 0x164, script: 0x52, flags: 0x0}, - 912: {region: 0x164, script: 0x52, flags: 0x0}, - 913: {region: 0x164, script: 0x52, flags: 0x0}, - 914: {region: 0x164, script: 0x52, flags: 0x0}, - 915: {region: 0x98, script: 0x75, flags: 0x0}, - 916: {region: 0x164, script: 0x52, flags: 0x0}, - 917: {region: 0x164, script: 0x5, flags: 0x0}, - 918: {region: 0x7c, script: 0x1e, flags: 0x0}, - 919: {region: 0x134, script: 0x76, flags: 0x0}, - 920: {region: 0x164, script: 0x5, flags: 0x0}, - 921: {region: 0xc4, script: 0x74, flags: 0x0}, - 922: {region: 0x164, script: 0x52, flags: 0x0}, + 798: {region: 0xcb, script: 0x55, flags: 0x0}, + 799: {region: 0x165, script: 0x55, flags: 0x0}, + 800: {region: 0x165, script: 0x55, flags: 0x0}, + 801: {region: 0x165, script: 0x55, flags: 0x0}, + 802: {region: 0x99, script: 0x20, flags: 0x0}, + 803: {region: 0x52, script: 0x55, flags: 0x0}, + 805: {region: 0x165, script: 0x55, flags: 0x0}, + 806: {region: 0x135, script: 0x55, flags: 0x0}, + 807: {region: 0x165, script: 0x55, flags: 0x0}, + 808: {region: 0x165, script: 0x55, flags: 0x0}, + 809: {region: 0xe8, script: 0x5, flags: 0x0}, + 810: {region: 0xc3, script: 0x55, flags: 0x0}, + 811: {region: 0x99, script: 0x20, flags: 0x0}, + 812: {region: 0x95, script: 0x55, flags: 0x0}, + 813: {region: 0x164, script: 0x55, flags: 0x0}, + 814: {region: 0x165, script: 0x55, flags: 0x0}, + 815: {region: 0xc4, script: 0x70, flags: 0x0}, + 816: {region: 0x165, script: 0x55, flags: 0x0}, + 817: {region: 0x165, script: 0x28, flags: 0x0}, + 818: {region: 0x106, script: 0x1e, flags: 0x0}, + 819: {region: 0x165, script: 0x55, flags: 0x0}, + 820: {region: 0x131, script: 0x55, flags: 0x0}, + 821: {region: 0x9c, script: 0x61, flags: 0x0}, + 822: {region: 0x165, script: 0x55, flags: 0x0}, + 823: {region: 0x165, script: 0x55, flags: 0x0}, + 824: {region: 0x9c, script: 0x5, flags: 0x0}, + 825: {region: 0x165, script: 0x55, flags: 0x0}, + 826: {region: 0x165, script: 0x55, flags: 0x0}, + 827: {region: 0x165, script: 0x55, flags: 0x0}, + 828: {region: 0xdd, script: 0x55, flags: 0x0}, + 829: {region: 0x165, script: 0x55, flags: 0x0}, + 830: {region: 0x165, script: 0x55, flags: 0x0}, + 832: {region: 0x165, script: 0x55, flags: 0x0}, + 833: {region: 0x53, script: 0x37, flags: 0x0}, + 834: {region: 0x9e, script: 0x55, flags: 0x0}, + 835: {region: 0xd2, script: 0x55, flags: 0x0}, + 836: {region: 0x165, script: 0x55, flags: 0x0}, + 837: {region: 0xda, script: 0x55, flags: 0x0}, + 838: {region: 0x165, script: 0x55, flags: 0x0}, + 839: {region: 0x165, script: 0x55, flags: 0x0}, + 840: {region: 0x165, script: 0x55, flags: 0x0}, + 841: {region: 0xcf, script: 0x55, flags: 0x0}, + 842: {region: 0x165, script: 0x55, flags: 0x0}, + 843: {region: 0x165, script: 0x55, flags: 0x0}, + 844: {region: 0x164, script: 0x55, flags: 0x0}, + 845: {region: 0xd1, script: 0x55, flags: 0x0}, + 846: {region: 0x60, script: 0x55, flags: 0x0}, + 847: {region: 0xdb, script: 0x20, flags: 0x0}, + 848: {region: 0x165, script: 0x55, flags: 0x0}, + 849: {region: 0xdb, script: 0x20, flags: 0x0}, + 850: {region: 0x165, script: 0x55, flags: 0x0}, + 851: {region: 0x165, script: 0x55, flags: 0x0}, + 852: {region: 0xd2, script: 0x55, flags: 0x0}, + 853: {region: 0x165, script: 0x55, flags: 0x0}, + 854: {region: 0x165, script: 0x55, flags: 0x0}, + 855: {region: 0xd1, script: 0x55, flags: 0x0}, + 856: {region: 0x165, script: 0x55, flags: 0x0}, + 857: {region: 0xcf, script: 0x55, flags: 0x0}, + 858: {region: 0xcf, script: 0x55, flags: 0x0}, + 859: {region: 0x165, script: 0x55, flags: 0x0}, + 860: {region: 0x165, script: 0x55, flags: 0x0}, + 861: {region: 0x95, script: 0x55, flags: 0x0}, + 862: {region: 0x165, script: 0x55, flags: 0x0}, + 863: {region: 0xdf, script: 0x55, flags: 0x0}, + 864: {region: 0x165, script: 0x55, flags: 0x0}, + 865: {region: 0x165, script: 0x55, flags: 0x0}, + 866: {region: 0x99, script: 0x55, flags: 0x0}, + 867: {region: 0x165, script: 0x55, flags: 0x0}, + 868: {region: 0x165, script: 0x55, flags: 0x0}, + 869: {region: 0xd9, script: 0x55, flags: 0x0}, + 870: {region: 0x52, script: 0x55, flags: 0x0}, + 871: {region: 0x165, script: 0x55, flags: 0x0}, + 872: {region: 0xda, script: 0x55, flags: 0x0}, + 873: {region: 0x165, script: 0x55, flags: 0x0}, + 874: {region: 0x52, script: 0x55, flags: 0x0}, + 875: {region: 0x165, script: 0x55, flags: 0x0}, + 876: {region: 0x165, script: 0x55, flags: 0x0}, + 877: {region: 0xda, script: 0x55, flags: 0x0}, + 878: {region: 0x123, script: 0x51, flags: 0x0}, + 879: {region: 0x99, script: 0x20, flags: 0x0}, + 880: {region: 0x10c, script: 0xbc, flags: 0x0}, + 881: {region: 0x165, script: 0x55, flags: 0x0}, + 882: {region: 0x165, script: 0x55, flags: 0x0}, + 883: {region: 0x84, script: 0x75, flags: 0x0}, + 884: {region: 0x161, script: 0x55, flags: 0x0}, + 885: {region: 0x165, script: 0x55, flags: 0x0}, + 886: {region: 0x49, script: 0x17, flags: 0x0}, + 887: {region: 0x165, script: 0x55, flags: 0x0}, + 888: {region: 0x161, script: 0x55, flags: 0x0}, + 889: {region: 0x165, script: 0x55, flags: 0x0}, + 890: {region: 0x165, script: 0x55, flags: 0x0}, + 891: {region: 0x165, script: 0x55, flags: 0x0}, + 892: {region: 0x165, script: 0x55, flags: 0x0}, + 893: {region: 0x165, script: 0x55, flags: 0x0}, + 894: {region: 0x117, script: 0x55, flags: 0x0}, + 895: {region: 0x165, script: 0x55, flags: 0x0}, + 896: {region: 0x165, script: 0x55, flags: 0x0}, + 897: {region: 0x135, script: 0x55, flags: 0x0}, + 898: {region: 0x165, script: 0x55, flags: 0x0}, + 899: {region: 0x53, script: 0x55, flags: 0x0}, + 900: {region: 0x165, script: 0x55, flags: 0x0}, + 901: {region: 0xce, script: 0x55, flags: 0x0}, + 902: {region: 0x12f, script: 0x55, flags: 0x0}, + 903: {region: 0x131, script: 0x55, flags: 0x0}, + 904: {region: 0x80, script: 0x55, flags: 0x0}, + 905: {region: 0x78, script: 0x55, flags: 0x0}, + 906: {region: 0x165, script: 0x55, flags: 0x0}, + 908: {region: 0x165, script: 0x55, flags: 0x0}, + 909: {region: 0x165, script: 0x55, flags: 0x0}, + 910: {region: 0x6f, script: 0x55, flags: 0x0}, + 911: {region: 0x165, script: 0x55, flags: 0x0}, + 912: {region: 0x165, script: 0x55, flags: 0x0}, + 913: {region: 0x165, script: 0x55, flags: 0x0}, + 914: {region: 0x165, script: 0x55, flags: 0x0}, + 915: {region: 0x99, script: 0x7a, flags: 0x0}, + 916: {region: 0x165, script: 0x55, flags: 0x0}, + 917: {region: 0x165, script: 0x5, flags: 0x0}, + 918: {region: 0x7d, script: 0x1e, flags: 0x0}, + 919: {region: 0x135, script: 0x7b, flags: 0x0}, + 920: {region: 0x165, script: 0x5, flags: 0x0}, + 921: {region: 0xc5, script: 0x79, flags: 0x0}, + 922: {region: 0x165, script: 0x55, flags: 0x0}, 923: {region: 0x2c, script: 0x3, flags: 0x1}, - 924: {region: 0xe6, script: 0x52, flags: 0x0}, + 924: {region: 0xe7, script: 0x55, flags: 0x0}, 925: {region: 0x2f, script: 0x2, flags: 0x1}, - 926: {region: 0xe6, script: 0x52, flags: 0x0}, - 927: {region: 0x2f, script: 0x52, flags: 0x0}, - 928: {region: 0xef, script: 0x52, flags: 0x0}, - 929: {region: 0x164, script: 0x52, flags: 0x0}, - 930: {region: 0x77, script: 0x52, flags: 0x0}, - 931: {region: 0xd5, script: 0x52, flags: 0x0}, - 932: {region: 0x134, script: 0x52, flags: 0x0}, - 933: {region: 0x48, script: 0x52, flags: 0x0}, - 934: {region: 0x164, script: 0x52, flags: 0x0}, - 935: {region: 0x9b, script: 0xdd, flags: 0x0}, - 936: {region: 0x164, script: 0x52, flags: 0x0}, - 937: {region: 0x5f, script: 0x52, flags: 0x0}, - 938: {region: 0x164, script: 0x5, flags: 0x0}, - 939: {region: 0xaf, script: 0x7f, flags: 0x0}, - 941: {region: 0x164, script: 0x52, flags: 0x0}, - 942: {region: 0x164, script: 0x52, flags: 0x0}, - 943: {region: 0x98, script: 0x12, flags: 0x0}, - 944: {region: 0xa3, script: 0x52, flags: 0x0}, - 945: {region: 0xe8, script: 0x52, flags: 0x0}, - 946: {region: 0x164, script: 0x52, flags: 0x0}, - 947: {region: 0x9d, script: 0x52, flags: 0x0}, - 948: {region: 0x164, script: 0x52, flags: 0x0}, - 949: {region: 0x164, script: 0x52, flags: 0x0}, - 950: {region: 0x86, script: 0x2d, flags: 0x0}, - 951: {region: 0x74, script: 0x52, flags: 0x0}, - 952: {region: 0x164, script: 0x52, flags: 0x0}, - 953: {region: 0xe7, script: 0x45, flags: 0x0}, - 954: {region: 0x9b, script: 0x5, flags: 0x0}, - 955: {region: 0x1, script: 0x52, flags: 0x0}, - 956: {region: 0x23, script: 0x5, flags: 0x0}, - 957: {region: 0x164, script: 0x52, flags: 0x0}, - 958: {region: 0x40, script: 0x52, flags: 0x0}, - 959: {region: 0x164, script: 0x52, flags: 0x0}, - 960: {region: 0x79, script: 0x52, flags: 0x0}, - 961: {region: 0x164, script: 0x52, flags: 0x0}, - 962: {region: 0xe3, script: 0x52, flags: 0x0}, - 963: {region: 0x88, script: 0x52, flags: 0x0}, - 964: {region: 0x68, script: 0x52, flags: 0x0}, - 965: {region: 0x164, script: 0x52, flags: 0x0}, - 966: {region: 0x98, script: 0x20, flags: 0x0}, - 967: {region: 0x164, script: 0x52, flags: 0x0}, - 968: {region: 0x101, script: 0x52, flags: 0x0}, - 969: {region: 0x94, script: 0x52, flags: 0x0}, - 970: {region: 0x164, script: 0x52, flags: 0x0}, - 971: {region: 0x164, script: 0x52, flags: 0x0}, - 972: {region: 0x9d, script: 0x52, flags: 0x0}, - 973: {region: 0x164, script: 0x5, flags: 0x0}, - 974: {region: 0x98, script: 0x52, flags: 0x0}, + 926: {region: 0xe7, script: 0x55, flags: 0x0}, + 927: {region: 0x30, script: 0x55, flags: 0x0}, + 928: {region: 0xf0, script: 0x55, flags: 0x0}, + 929: {region: 0x165, script: 0x55, flags: 0x0}, + 930: {region: 0x78, script: 0x55, flags: 0x0}, + 931: {region: 0xd6, script: 0x55, flags: 0x0}, + 932: {region: 0x135, script: 0x55, flags: 0x0}, + 933: {region: 0x49, script: 0x55, flags: 0x0}, + 934: {region: 0x165, script: 0x55, flags: 0x0}, + 935: {region: 0x9c, script: 0xe3, flags: 0x0}, + 936: {region: 0x165, script: 0x55, flags: 0x0}, + 937: {region: 0x60, script: 0x55, flags: 0x0}, + 938: {region: 0x165, script: 0x5, flags: 0x0}, + 939: {region: 0xb0, script: 0x84, flags: 0x0}, + 941: {region: 0x165, script: 0x55, flags: 0x0}, + 942: {region: 0x165, script: 0x55, flags: 0x0}, + 943: {region: 0x99, script: 0x12, flags: 0x0}, + 944: {region: 0xa4, script: 0x55, flags: 0x0}, + 945: {region: 0xe9, script: 0x55, flags: 0x0}, + 946: {region: 0x165, script: 0x55, flags: 0x0}, + 947: {region: 0x9e, script: 0x55, flags: 0x0}, + 948: {region: 0x165, script: 0x55, flags: 0x0}, + 949: {region: 0x165, script: 0x55, flags: 0x0}, + 950: {region: 0x87, script: 0x30, flags: 0x0}, + 951: {region: 0x75, script: 0x55, flags: 0x0}, + 952: {region: 0x165, script: 0x55, flags: 0x0}, + 953: {region: 0xe8, script: 0x48, flags: 0x0}, + 954: {region: 0x9c, script: 0x5, flags: 0x0}, + 955: {region: 0x1, script: 0x55, flags: 0x0}, + 956: {region: 0x24, script: 0x5, flags: 0x0}, + 957: {region: 0x165, script: 0x55, flags: 0x0}, + 958: {region: 0x41, script: 0x55, flags: 0x0}, + 959: {region: 0x165, script: 0x55, flags: 0x0}, + 960: {region: 0x7a, script: 0x55, flags: 0x0}, + 961: {region: 0x165, script: 0x55, flags: 0x0}, + 962: {region: 0xe4, script: 0x55, flags: 0x0}, + 963: {region: 0x89, script: 0x55, flags: 0x0}, + 964: {region: 0x69, script: 0x55, flags: 0x0}, + 965: {region: 0x165, script: 0x55, flags: 0x0}, + 966: {region: 0x99, script: 0x20, flags: 0x0}, + 967: {region: 0x165, script: 0x55, flags: 0x0}, + 968: {region: 0x102, script: 0x55, flags: 0x0}, + 969: {region: 0x95, script: 0x55, flags: 0x0}, + 970: {region: 0x165, script: 0x55, flags: 0x0}, + 971: {region: 0x165, script: 0x55, flags: 0x0}, + 972: {region: 0x9e, script: 0x55, flags: 0x0}, + 973: {region: 0x165, script: 0x5, flags: 0x0}, + 974: {region: 0x99, script: 0x55, flags: 0x0}, 975: {region: 0x31, script: 0x2, flags: 0x1}, - 976: {region: 0xda, script: 0x20, flags: 0x0}, - 977: {region: 0x34, script: 0xe, flags: 0x0}, - 978: {region: 0x4d, script: 0x52, flags: 0x0}, - 979: {region: 0x71, script: 0x52, flags: 0x0}, - 980: {region: 0x4d, script: 0x52, flags: 0x0}, - 981: {region: 0x9b, script: 0x5, flags: 0x0}, - 982: {region: 0x10b, script: 0x52, flags: 0x0}, - 983: {region: 0x39, script: 0x52, flags: 0x0}, - 984: {region: 0x164, script: 0x52, flags: 0x0}, - 985: {region: 0xd0, script: 0x52, flags: 0x0}, - 986: {region: 0x103, script: 0x52, flags: 0x0}, - 987: {region: 0x94, script: 0x52, flags: 0x0}, - 988: {region: 0x12e, script: 0x52, flags: 0x0}, - 989: {region: 0x164, script: 0x52, flags: 0x0}, - 990: {region: 0x164, script: 0x52, flags: 0x0}, - 991: {region: 0x72, script: 0x52, flags: 0x0}, - 992: {region: 0x105, script: 0x1e, flags: 0x0}, - 993: {region: 0x12f, script: 0x1e, flags: 0x0}, - 994: {region: 0x108, script: 0x52, flags: 0x0}, - 995: {region: 0x106, script: 0x52, flags: 0x0}, - 996: {region: 0x12e, script: 0x52, flags: 0x0}, - 997: {region: 0x164, script: 0x52, flags: 0x0}, - 998: {region: 0xa1, script: 0x44, flags: 0x0}, - 999: {region: 0x98, script: 0x20, flags: 0x0}, - 1000: {region: 0x7f, script: 0x52, flags: 0x0}, - 1001: {region: 0x105, script: 0x1e, flags: 0x0}, - 1002: {region: 0xa3, script: 0x52, flags: 0x0}, - 1003: {region: 0x94, script: 0x52, flags: 0x0}, - 1004: {region: 0x98, script: 0x52, flags: 0x0}, - 1005: {region: 0x113, script: 0x52, flags: 0x0}, - 1006: {region: 0x98, script: 0xbb, flags: 0x0}, - 1007: {region: 0x164, script: 0x52, flags: 0x0}, - 1008: {region: 0x164, script: 0x52, flags: 0x0}, - 1009: {region: 0x12e, script: 0x52, flags: 0x0}, - 1010: {region: 0x9d, script: 0x52, flags: 0x0}, - 1011: {region: 0x98, script: 0x20, flags: 0x0}, - 1012: {region: 0x164, script: 0x5, flags: 0x0}, - 1013: {region: 0x9d, script: 0x52, flags: 0x0}, - 1014: {region: 0x7a, script: 0x52, flags: 0x0}, - 1015: {region: 0x48, script: 0x52, flags: 0x0}, + 976: {region: 0xdb, script: 0x20, flags: 0x0}, + 977: {region: 0x35, script: 0xe, flags: 0x0}, + 978: {region: 0x4e, script: 0x55, flags: 0x0}, + 979: {region: 0x72, script: 0x55, flags: 0x0}, + 980: {region: 0x4e, script: 0x55, flags: 0x0}, + 981: {region: 0x9c, script: 0x5, flags: 0x0}, + 982: {region: 0x10c, script: 0x55, flags: 0x0}, + 983: {region: 0x3a, script: 0x55, flags: 0x0}, + 984: {region: 0x165, script: 0x55, flags: 0x0}, + 985: {region: 0xd1, script: 0x55, flags: 0x0}, + 986: {region: 0x104, script: 0x55, flags: 0x0}, + 987: {region: 0x95, script: 0x55, flags: 0x0}, + 988: {region: 0x12f, script: 0x55, flags: 0x0}, + 989: {region: 0x165, script: 0x55, flags: 0x0}, + 990: {region: 0x165, script: 0x55, flags: 0x0}, + 991: {region: 0x73, script: 0x55, flags: 0x0}, + 992: {region: 0x106, script: 0x1e, flags: 0x0}, + 993: {region: 0x130, script: 0x1e, flags: 0x0}, + 994: {region: 0x109, script: 0x55, flags: 0x0}, + 995: {region: 0x107, script: 0x55, flags: 0x0}, + 996: {region: 0x12f, script: 0x55, flags: 0x0}, + 997: {region: 0x165, script: 0x55, flags: 0x0}, + 998: {region: 0xa2, script: 0x47, flags: 0x0}, + 999: {region: 0x99, script: 0x20, flags: 0x0}, + 1000: {region: 0x80, script: 0x55, flags: 0x0}, + 1001: {region: 0x106, script: 0x1e, flags: 0x0}, + 1002: {region: 0xa4, script: 0x55, flags: 0x0}, + 1003: {region: 0x95, script: 0x55, flags: 0x0}, + 1004: {region: 0x99, script: 0x55, flags: 0x0}, + 1005: {region: 0x114, script: 0x55, flags: 0x0}, + 1006: {region: 0x99, script: 0xc0, flags: 0x0}, + 1007: {region: 0x165, script: 0x55, flags: 0x0}, + 1008: {region: 0x165, script: 0x55, flags: 0x0}, + 1009: {region: 0x12f, script: 0x55, flags: 0x0}, + 1010: {region: 0x9e, script: 0x55, flags: 0x0}, + 1011: {region: 0x99, script: 0x20, flags: 0x0}, + 1012: {region: 0x165, script: 0x5, flags: 0x0}, + 1013: {region: 0x9e, script: 0x55, flags: 0x0}, + 1014: {region: 0x7b, script: 0x55, flags: 0x0}, + 1015: {region: 0x49, script: 0x55, flags: 0x0}, 1016: {region: 0x33, script: 0x4, flags: 0x1}, - 1017: {region: 0x9d, script: 0x52, flags: 0x0}, - 1018: {region: 0x9b, script: 0x5, flags: 0x0}, - 1019: {region: 0xd9, script: 0x52, flags: 0x0}, - 1020: {region: 0x4e, script: 0x52, flags: 0x0}, - 1021: {region: 0xd0, script: 0x52, flags: 0x0}, - 1022: {region: 0xce, script: 0x52, flags: 0x0}, - 1023: {region: 0xc2, script: 0x52, flags: 0x0}, - 1024: {region: 0x4b, script: 0x52, flags: 0x0}, - 1025: {region: 0x95, script: 0x72, flags: 0x0}, - 1026: {region: 0xb5, script: 0x52, flags: 0x0}, - 1027: {region: 0x164, script: 0x27, flags: 0x0}, - 1028: {region: 0x164, script: 0x52, flags: 0x0}, - 1030: {region: 0xb9, script: 0xd2, flags: 0x0}, - 1031: {region: 0x164, script: 0x52, flags: 0x0}, - 1032: {region: 0xc3, script: 0x6b, flags: 0x0}, - 1033: {region: 0x164, script: 0x5, flags: 0x0}, - 1034: {region: 0xb2, script: 0xc1, flags: 0x0}, - 1035: {region: 0x6e, script: 0x52, flags: 0x0}, - 1036: {region: 0x164, script: 0x52, flags: 0x0}, - 1037: {region: 0x164, script: 0x52, flags: 0x0}, - 1038: {region: 0x164, script: 0x52, flags: 0x0}, - 1039: {region: 0x164, script: 0x52, flags: 0x0}, - 1040: {region: 0x110, script: 0x52, flags: 0x0}, - 1041: {region: 0x164, script: 0x52, flags: 0x0}, - 1042: {region: 0xe7, script: 0x5, flags: 0x0}, - 1043: {region: 0x164, script: 0x52, flags: 0x0}, - 1044: {region: 0x10e, script: 0x52, flags: 0x0}, - 1045: {region: 0x164, script: 0x52, flags: 0x0}, - 1046: {region: 0xe8, script: 0x52, flags: 0x0}, - 1047: {region: 0x164, script: 0x52, flags: 0x0}, - 1048: {region: 0x94, script: 0x52, flags: 0x0}, - 1049: {region: 0x141, script: 0x52, flags: 0x0}, - 1050: {region: 0x10b, script: 0x52, flags: 0x0}, - 1052: {region: 0x10b, script: 0x52, flags: 0x0}, - 1053: {region: 0x71, script: 0x52, flags: 0x0}, - 1054: {region: 0x96, script: 0xb8, flags: 0x0}, - 1055: {region: 0x164, script: 0x52, flags: 0x0}, - 1056: {region: 0x71, script: 0x52, flags: 0x0}, - 1057: {region: 0x163, script: 0x52, flags: 0x0}, - 1058: {region: 0x164, script: 0x52, flags: 0x0}, - 1059: {region: 0xc2, script: 0x52, flags: 0x0}, - 1060: {region: 0x164, script: 0x52, flags: 0x0}, - 1061: {region: 0x164, script: 0x52, flags: 0x0}, - 1062: {region: 0x164, script: 0x52, flags: 0x0}, - 1063: {region: 0x114, script: 0x52, flags: 0x0}, - 1064: {region: 0x164, script: 0x52, flags: 0x0}, - 1065: {region: 0x164, script: 0x52, flags: 0x0}, - 1066: {region: 0x122, script: 0xd5, flags: 0x0}, - 1067: {region: 0x164, script: 0x52, flags: 0x0}, - 1068: {region: 0x164, script: 0x52, flags: 0x0}, - 1069: {region: 0x164, script: 0x52, flags: 0x0}, - 1070: {region: 0x164, script: 0x52, flags: 0x0}, - 1071: {region: 0x26, script: 0x52, flags: 0x0}, + 1017: {region: 0x9e, script: 0x55, flags: 0x0}, + 1018: {region: 0x9c, script: 0x5, flags: 0x0}, + 1019: {region: 0xda, script: 0x55, flags: 0x0}, + 1020: {region: 0x4f, script: 0x55, flags: 0x0}, + 1021: {region: 0xd1, script: 0x55, flags: 0x0}, + 1022: {region: 0xcf, script: 0x55, flags: 0x0}, + 1023: {region: 0xc3, script: 0x55, flags: 0x0}, + 1024: {region: 0x4c, script: 0x55, flags: 0x0}, + 1025: {region: 0x96, script: 0x77, flags: 0x0}, + 1026: {region: 0xb6, script: 0x55, flags: 0x0}, + 1027: {region: 0x165, script: 0x28, flags: 0x0}, + 1028: {region: 0x165, script: 0x55, flags: 0x0}, + 1030: {region: 0xba, script: 0xd8, flags: 0x0}, + 1031: {region: 0x165, script: 0x55, flags: 0x0}, + 1032: {region: 0xc4, script: 0x70, flags: 0x0}, + 1033: {region: 0x165, script: 0x5, flags: 0x0}, + 1034: {region: 0xb3, script: 0xc6, flags: 0x0}, + 1035: {region: 0x6f, script: 0x55, flags: 0x0}, + 1036: {region: 0x165, script: 0x55, flags: 0x0}, + 1037: {region: 0x165, script: 0x55, flags: 0x0}, + 1038: {region: 0x165, script: 0x55, flags: 0x0}, + 1039: {region: 0x165, script: 0x55, flags: 0x0}, + 1040: {region: 0x111, script: 0x55, flags: 0x0}, + 1041: {region: 0x165, script: 0x55, flags: 0x0}, + 1042: {region: 0xe8, script: 0x5, flags: 0x0}, + 1043: {region: 0x165, script: 0x55, flags: 0x0}, + 1044: {region: 0x10f, script: 0x55, flags: 0x0}, + 1045: {region: 0x165, script: 0x55, flags: 0x0}, + 1046: {region: 0xe9, script: 0x55, flags: 0x0}, + 1047: {region: 0x165, script: 0x55, flags: 0x0}, + 1048: {region: 0x95, script: 0x55, flags: 0x0}, + 1049: {region: 0x142, script: 0x55, flags: 0x0}, + 1050: {region: 0x10c, script: 0x55, flags: 0x0}, + 1052: {region: 0x10c, script: 0x55, flags: 0x0}, + 1053: {region: 0x72, script: 0x55, flags: 0x0}, + 1054: {region: 0x97, script: 0xbd, flags: 0x0}, + 1055: {region: 0x165, script: 0x55, flags: 0x0}, + 1056: {region: 0x72, script: 0x55, flags: 0x0}, + 1057: {region: 0x164, script: 0x55, flags: 0x0}, + 1058: {region: 0x165, script: 0x55, flags: 0x0}, + 1059: {region: 0xc3, script: 0x55, flags: 0x0}, + 1060: {region: 0x165, script: 0x55, flags: 0x0}, + 1061: {region: 0x165, script: 0x55, flags: 0x0}, + 1062: {region: 0x165, script: 0x55, flags: 0x0}, + 1063: {region: 0x115, script: 0x55, flags: 0x0}, + 1064: {region: 0x165, script: 0x55, flags: 0x0}, + 1065: {region: 0x165, script: 0x55, flags: 0x0}, + 1066: {region: 0x123, script: 0xdb, flags: 0x0}, + 1067: {region: 0x165, script: 0x55, flags: 0x0}, + 1068: {region: 0x165, script: 0x55, flags: 0x0}, + 1069: {region: 0x165, script: 0x55, flags: 0x0}, + 1070: {region: 0x165, script: 0x55, flags: 0x0}, + 1071: {region: 0x27, script: 0x55, flags: 0x0}, 1072: {region: 0x37, script: 0x5, flags: 0x1}, - 1073: {region: 0x98, script: 0xc2, flags: 0x0}, - 1074: {region: 0x115, script: 0x52, flags: 0x0}, - 1075: {region: 0x113, script: 0x52, flags: 0x0}, - 1076: {region: 0x98, script: 0x20, flags: 0x0}, - 1077: {region: 0x160, script: 0x52, flags: 0x0}, - 1078: {region: 0x164, script: 0x52, flags: 0x0}, - 1079: {region: 0x164, script: 0x52, flags: 0x0}, - 1080: {region: 0x6c, script: 0x52, flags: 0x0}, - 1081: {region: 0x160, script: 0x52, flags: 0x0}, - 1082: {region: 0x164, script: 0x52, flags: 0x0}, - 1083: {region: 0x5f, script: 0x52, flags: 0x0}, - 1084: {region: 0x94, script: 0x52, flags: 0x0}, - 1085: {region: 0x164, script: 0x52, flags: 0x0}, - 1086: {region: 0x164, script: 0x52, flags: 0x0}, - 1087: {region: 0x12e, script: 0x52, flags: 0x0}, - 1088: {region: 0x164, script: 0x52, flags: 0x0}, - 1089: {region: 0x83, script: 0x52, flags: 0x0}, - 1090: {region: 0x10b, script: 0x52, flags: 0x0}, - 1091: {region: 0x12e, script: 0x52, flags: 0x0}, - 1092: {region: 0x15e, script: 0x5, flags: 0x0}, - 1093: {region: 0x4a, script: 0x52, flags: 0x0}, - 1094: {region: 0x5f, script: 0x52, flags: 0x0}, - 1095: {region: 0x164, script: 0x52, flags: 0x0}, - 1096: {region: 0x98, script: 0x20, flags: 0x0}, - 1097: {region: 0x94, script: 0x52, flags: 0x0}, - 1098: {region: 0x164, script: 0x52, flags: 0x0}, - 1099: {region: 0x34, script: 0xe, flags: 0x0}, - 1100: {region: 0x9a, script: 0xc5, flags: 0x0}, - 1101: {region: 0xe8, script: 0x52, flags: 0x0}, - 1102: {region: 0x98, script: 0xcd, flags: 0x0}, - 1103: {region: 0xda, script: 0x20, flags: 0x0}, - 1104: {region: 0x164, script: 0x52, flags: 0x0}, - 1105: {region: 0x164, script: 0x52, flags: 0x0}, - 1106: {region: 0x164, script: 0x52, flags: 0x0}, - 1107: {region: 0x164, script: 0x52, flags: 0x0}, - 1108: {region: 0x164, script: 0x52, flags: 0x0}, - 1109: {region: 0x164, script: 0x52, flags: 0x0}, - 1110: {region: 0x164, script: 0x52, flags: 0x0}, - 1111: {region: 0x164, script: 0x52, flags: 0x0}, - 1112: {region: 0xe6, script: 0x52, flags: 0x0}, - 1113: {region: 0x164, script: 0x52, flags: 0x0}, - 1114: {region: 0x164, script: 0x52, flags: 0x0}, - 1115: {region: 0x98, script: 0x4a, flags: 0x0}, - 1116: {region: 0x52, script: 0xcb, flags: 0x0}, - 1117: {region: 0xda, script: 0x20, flags: 0x0}, - 1118: {region: 0xda, script: 0x20, flags: 0x0}, - 1119: {region: 0x98, script: 0xd0, flags: 0x0}, - 1120: {region: 0x164, script: 0x52, flags: 0x0}, - 1121: {region: 0x111, script: 0x52, flags: 0x0}, - 1122: {region: 0x130, script: 0x52, flags: 0x0}, - 1123: {region: 0x125, script: 0x52, flags: 0x0}, - 1124: {region: 0x164, script: 0x52, flags: 0x0}, + 1073: {region: 0x99, script: 0xc7, flags: 0x0}, + 1074: {region: 0x116, script: 0x55, flags: 0x0}, + 1075: {region: 0x114, script: 0x55, flags: 0x0}, + 1076: {region: 0x99, script: 0x20, flags: 0x0}, + 1077: {region: 0x161, script: 0x55, flags: 0x0}, + 1078: {region: 0x165, script: 0x55, flags: 0x0}, + 1079: {region: 0x165, script: 0x55, flags: 0x0}, + 1080: {region: 0x6d, script: 0x55, flags: 0x0}, + 1081: {region: 0x161, script: 0x55, flags: 0x0}, + 1082: {region: 0x165, script: 0x55, flags: 0x0}, + 1083: {region: 0x60, script: 0x55, flags: 0x0}, + 1084: {region: 0x95, script: 0x55, flags: 0x0}, + 1085: {region: 0x165, script: 0x55, flags: 0x0}, + 1086: {region: 0x165, script: 0x55, flags: 0x0}, + 1087: {region: 0x12f, script: 0x55, flags: 0x0}, + 1088: {region: 0x165, script: 0x55, flags: 0x0}, + 1089: {region: 0x84, script: 0x55, flags: 0x0}, + 1090: {region: 0x10c, script: 0x55, flags: 0x0}, + 1091: {region: 0x12f, script: 0x55, flags: 0x0}, + 1092: {region: 0x15f, script: 0x5, flags: 0x0}, + 1093: {region: 0x4b, script: 0x55, flags: 0x0}, + 1094: {region: 0x60, script: 0x55, flags: 0x0}, + 1095: {region: 0x165, script: 0x55, flags: 0x0}, + 1096: {region: 0x99, script: 0x20, flags: 0x0}, + 1097: {region: 0x95, script: 0x55, flags: 0x0}, + 1098: {region: 0x165, script: 0x55, flags: 0x0}, + 1099: {region: 0x35, script: 0xe, flags: 0x0}, + 1100: {region: 0x9b, script: 0xcb, flags: 0x0}, + 1101: {region: 0xe9, script: 0x55, flags: 0x0}, + 1102: {region: 0x99, script: 0xd3, flags: 0x0}, + 1103: {region: 0xdb, script: 0x20, flags: 0x0}, + 1104: {region: 0x165, script: 0x55, flags: 0x0}, + 1105: {region: 0x165, script: 0x55, flags: 0x0}, + 1106: {region: 0x165, script: 0x55, flags: 0x0}, + 1107: {region: 0x165, script: 0x55, flags: 0x0}, + 1108: {region: 0x165, script: 0x55, flags: 0x0}, + 1109: {region: 0x165, script: 0x55, flags: 0x0}, + 1110: {region: 0x165, script: 0x55, flags: 0x0}, + 1111: {region: 0x165, script: 0x55, flags: 0x0}, + 1112: {region: 0xe7, script: 0x55, flags: 0x0}, + 1113: {region: 0x165, script: 0x55, flags: 0x0}, + 1114: {region: 0x165, script: 0x55, flags: 0x0}, + 1115: {region: 0x99, script: 0x4d, flags: 0x0}, + 1116: {region: 0x53, script: 0xd1, flags: 0x0}, + 1117: {region: 0xdb, script: 0x20, flags: 0x0}, + 1118: {region: 0xdb, script: 0x20, flags: 0x0}, + 1119: {region: 0x99, script: 0xd6, flags: 0x0}, + 1120: {region: 0x165, script: 0x55, flags: 0x0}, + 1121: {region: 0x112, script: 0x55, flags: 0x0}, + 1122: {region: 0x131, script: 0x55, flags: 0x0}, + 1123: {region: 0x126, script: 0x55, flags: 0x0}, + 1124: {region: 0x165, script: 0x55, flags: 0x0}, 1125: {region: 0x3c, script: 0x3, flags: 0x1}, - 1126: {region: 0x164, script: 0x52, flags: 0x0}, - 1127: {region: 0x164, script: 0x52, flags: 0x0}, - 1128: {region: 0x164, script: 0x52, flags: 0x0}, - 1129: {region: 0x122, script: 0xd5, flags: 0x0}, - 1130: {region: 0xda, script: 0x20, flags: 0x0}, - 1131: {region: 0xda, script: 0x20, flags: 0x0}, - 1132: {region: 0xda, script: 0x20, flags: 0x0}, - 1133: {region: 0x6e, script: 0x27, flags: 0x0}, - 1134: {region: 0x164, script: 0x52, flags: 0x0}, - 1135: {region: 0x6c, script: 0x27, flags: 0x0}, - 1136: {region: 0x164, script: 0x52, flags: 0x0}, - 1137: {region: 0x164, script: 0x52, flags: 0x0}, - 1138: {region: 0x164, script: 0x52, flags: 0x0}, - 1139: {region: 0xd5, script: 0x52, flags: 0x0}, - 1140: {region: 0x126, script: 0x52, flags: 0x0}, - 1141: {region: 0x124, script: 0x52, flags: 0x0}, - 1142: {region: 0x31, script: 0x52, flags: 0x0}, - 1143: {region: 0xda, script: 0x20, flags: 0x0}, - 1144: {region: 0xe6, script: 0x52, flags: 0x0}, - 1145: {region: 0x164, script: 0x52, flags: 0x0}, - 1146: {region: 0x164, script: 0x52, flags: 0x0}, - 1147: {region: 0x31, script: 0x52, flags: 0x0}, - 1148: {region: 0xd3, script: 0x52, flags: 0x0}, - 1149: {region: 0x164, script: 0x52, flags: 0x0}, - 1150: {region: 0x160, script: 0x52, flags: 0x0}, - 1151: {region: 0x164, script: 0x52, flags: 0x0}, - 1152: {region: 0x128, script: 0x52, flags: 0x0}, - 1153: {region: 0x164, script: 0x52, flags: 0x0}, - 1154: {region: 0xcd, script: 0x52, flags: 0x0}, - 1155: {region: 0x164, script: 0x52, flags: 0x0}, - 1156: {region: 0xe5, script: 0x52, flags: 0x0}, - 1157: {region: 0x164, script: 0x52, flags: 0x0}, - 1158: {region: 0x164, script: 0x52, flags: 0x0}, - 1159: {region: 0x164, script: 0x52, flags: 0x0}, - 1160: {region: 0x12a, script: 0x52, flags: 0x0}, - 1161: {region: 0x12a, script: 0x52, flags: 0x0}, - 1162: {region: 0x12d, script: 0x52, flags: 0x0}, - 1163: {region: 0x164, script: 0x5, flags: 0x0}, - 1164: {region: 0x160, script: 0x52, flags: 0x0}, - 1165: {region: 0x86, script: 0x2d, flags: 0x0}, - 1166: {region: 0xda, script: 0x20, flags: 0x0}, - 1167: {region: 0xe6, script: 0x52, flags: 0x0}, - 1168: {region: 0x42, script: 0xd6, flags: 0x0}, - 1169: {region: 0x164, script: 0x52, flags: 0x0}, - 1170: {region: 0x105, script: 0x1e, flags: 0x0}, - 1171: {region: 0x164, script: 0x52, flags: 0x0}, - 1172: {region: 0x164, script: 0x52, flags: 0x0}, - 1173: {region: 0x130, script: 0x52, flags: 0x0}, - 1174: {region: 0x164, script: 0x52, flags: 0x0}, - 1175: {region: 0x122, script: 0xd5, flags: 0x0}, - 1176: {region: 0x31, script: 0x52, flags: 0x0}, - 1177: {region: 0x164, script: 0x52, flags: 0x0}, - 1178: {region: 0x164, script: 0x52, flags: 0x0}, - 1179: {region: 0xcd, script: 0x52, flags: 0x0}, - 1180: {region: 0x164, script: 0x52, flags: 0x0}, - 1181: {region: 0x164, script: 0x52, flags: 0x0}, - 1182: {region: 0x12c, script: 0x52, flags: 0x0}, - 1183: {region: 0x164, script: 0x52, flags: 0x0}, - 1185: {region: 0x164, script: 0x52, flags: 0x0}, - 1186: {region: 0xd3, script: 0x52, flags: 0x0}, - 1187: {region: 0x52, script: 0xce, flags: 0x0}, - 1188: {region: 0xe4, script: 0x52, flags: 0x0}, - 1189: {region: 0x164, script: 0x52, flags: 0x0}, - 1190: {region: 0x105, script: 0x1e, flags: 0x0}, - 1191: {region: 0xb9, script: 0x52, flags: 0x0}, - 1192: {region: 0x164, script: 0x52, flags: 0x0}, - 1193: {region: 0x105, script: 0x1e, flags: 0x0}, + 1126: {region: 0x165, script: 0x55, flags: 0x0}, + 1127: {region: 0x165, script: 0x55, flags: 0x0}, + 1128: {region: 0x165, script: 0x55, flags: 0x0}, + 1129: {region: 0x123, script: 0xdb, flags: 0x0}, + 1130: {region: 0xdb, script: 0x20, flags: 0x0}, + 1131: {region: 0xdb, script: 0x20, flags: 0x0}, + 1132: {region: 0xdb, script: 0x20, flags: 0x0}, + 1133: {region: 0x6f, script: 0x28, flags: 0x0}, + 1134: {region: 0x165, script: 0x55, flags: 0x0}, + 1135: {region: 0x6d, script: 0x28, flags: 0x0}, + 1136: {region: 0x165, script: 0x55, flags: 0x0}, + 1137: {region: 0x165, script: 0x55, flags: 0x0}, + 1138: {region: 0x165, script: 0x55, flags: 0x0}, + 1139: {region: 0xd6, script: 0x55, flags: 0x0}, + 1140: {region: 0x127, script: 0x55, flags: 0x0}, + 1141: {region: 0x125, script: 0x55, flags: 0x0}, + 1142: {region: 0x32, script: 0x55, flags: 0x0}, + 1143: {region: 0xdb, script: 0x20, flags: 0x0}, + 1144: {region: 0xe7, script: 0x55, flags: 0x0}, + 1145: {region: 0x165, script: 0x55, flags: 0x0}, + 1146: {region: 0x165, script: 0x55, flags: 0x0}, + 1147: {region: 0x32, script: 0x55, flags: 0x0}, + 1148: {region: 0xd4, script: 0x55, flags: 0x0}, + 1149: {region: 0x165, script: 0x55, flags: 0x0}, + 1150: {region: 0x161, script: 0x55, flags: 0x0}, + 1151: {region: 0x165, script: 0x55, flags: 0x0}, + 1152: {region: 0x129, script: 0x55, flags: 0x0}, + 1153: {region: 0x165, script: 0x55, flags: 0x0}, + 1154: {region: 0xce, script: 0x55, flags: 0x0}, + 1155: {region: 0x165, script: 0x55, flags: 0x0}, + 1156: {region: 0xe6, script: 0x55, flags: 0x0}, + 1157: {region: 0x165, script: 0x55, flags: 0x0}, + 1158: {region: 0x165, script: 0x55, flags: 0x0}, + 1159: {region: 0x165, script: 0x55, flags: 0x0}, + 1160: {region: 0x12b, script: 0x55, flags: 0x0}, + 1161: {region: 0x12b, script: 0x55, flags: 0x0}, + 1162: {region: 0x12e, script: 0x55, flags: 0x0}, + 1163: {region: 0x165, script: 0x5, flags: 0x0}, + 1164: {region: 0x161, script: 0x55, flags: 0x0}, + 1165: {region: 0x87, script: 0x30, flags: 0x0}, + 1166: {region: 0xdb, script: 0x20, flags: 0x0}, + 1167: {region: 0xe7, script: 0x55, flags: 0x0}, + 1168: {region: 0x43, script: 0xdc, flags: 0x0}, + 1169: {region: 0x165, script: 0x55, flags: 0x0}, + 1170: {region: 0x106, script: 0x1e, flags: 0x0}, + 1171: {region: 0x165, script: 0x55, flags: 0x0}, + 1172: {region: 0x165, script: 0x55, flags: 0x0}, + 1173: {region: 0x131, script: 0x55, flags: 0x0}, + 1174: {region: 0x165, script: 0x55, flags: 0x0}, + 1175: {region: 0x123, script: 0xdb, flags: 0x0}, + 1176: {region: 0x32, script: 0x55, flags: 0x0}, + 1177: {region: 0x165, script: 0x55, flags: 0x0}, + 1178: {region: 0x165, script: 0x55, flags: 0x0}, + 1179: {region: 0xce, script: 0x55, flags: 0x0}, + 1180: {region: 0x165, script: 0x55, flags: 0x0}, + 1181: {region: 0x165, script: 0x55, flags: 0x0}, + 1182: {region: 0x12d, script: 0x55, flags: 0x0}, + 1183: {region: 0x165, script: 0x55, flags: 0x0}, + 1185: {region: 0x165, script: 0x55, flags: 0x0}, + 1186: {region: 0xd4, script: 0x55, flags: 0x0}, + 1187: {region: 0x53, script: 0xd4, flags: 0x0}, + 1188: {region: 0xe5, script: 0x55, flags: 0x0}, + 1189: {region: 0x165, script: 0x55, flags: 0x0}, + 1190: {region: 0x106, script: 0x1e, flags: 0x0}, + 1191: {region: 0xba, script: 0x55, flags: 0x0}, + 1192: {region: 0x165, script: 0x55, flags: 0x0}, + 1193: {region: 0x106, script: 0x1e, flags: 0x0}, 1194: {region: 0x3f, script: 0x4, flags: 0x1}, - 1195: {region: 0x11b, script: 0xd8, flags: 0x0}, - 1196: {region: 0x12f, script: 0x1e, flags: 0x0}, - 1197: {region: 0x74, script: 0x52, flags: 0x0}, - 1198: {region: 0x29, script: 0x52, flags: 0x0}, + 1195: {region: 0x11c, script: 0xde, flags: 0x0}, + 1196: {region: 0x130, script: 0x1e, flags: 0x0}, + 1197: {region: 0x75, script: 0x55, flags: 0x0}, + 1198: {region: 0x2a, script: 0x55, flags: 0x0}, 1200: {region: 0x43, script: 0x3, flags: 0x1}, - 1201: {region: 0x98, script: 0xe, flags: 0x0}, - 1202: {region: 0xe7, script: 0x5, flags: 0x0}, - 1203: {region: 0x164, script: 0x52, flags: 0x0}, - 1204: {region: 0x164, script: 0x52, flags: 0x0}, - 1205: {region: 0x164, script: 0x52, flags: 0x0}, - 1206: {region: 0x164, script: 0x52, flags: 0x0}, - 1207: {region: 0x164, script: 0x52, flags: 0x0}, - 1208: {region: 0x164, script: 0x52, flags: 0x0}, - 1209: {region: 0x164, script: 0x52, flags: 0x0}, + 1201: {region: 0x99, script: 0xe, flags: 0x0}, + 1202: {region: 0xe8, script: 0x5, flags: 0x0}, + 1203: {region: 0x165, script: 0x55, flags: 0x0}, + 1204: {region: 0x165, script: 0x55, flags: 0x0}, + 1205: {region: 0x165, script: 0x55, flags: 0x0}, + 1206: {region: 0x165, script: 0x55, flags: 0x0}, + 1207: {region: 0x165, script: 0x55, flags: 0x0}, + 1208: {region: 0x165, script: 0x55, flags: 0x0}, + 1209: {region: 0x165, script: 0x55, flags: 0x0}, 1210: {region: 0x46, script: 0x4, flags: 0x1}, - 1211: {region: 0x164, script: 0x52, flags: 0x0}, - 1212: {region: 0xb3, script: 0xd9, flags: 0x0}, - 1213: {region: 0x164, script: 0x52, flags: 0x0}, - 1214: {region: 0x160, script: 0x52, flags: 0x0}, - 1215: {region: 0x9d, script: 0x52, flags: 0x0}, - 1216: {region: 0x105, script: 0x52, flags: 0x0}, - 1217: {region: 0x13d, script: 0x52, flags: 0x0}, - 1218: {region: 0x11a, script: 0x52, flags: 0x0}, - 1219: {region: 0x164, script: 0x52, flags: 0x0}, - 1220: {region: 0x35, script: 0x52, flags: 0x0}, - 1221: {region: 0x5f, script: 0x52, flags: 0x0}, - 1222: {region: 0xd0, script: 0x52, flags: 0x0}, - 1223: {region: 0x1, script: 0x52, flags: 0x0}, - 1224: {region: 0x105, script: 0x52, flags: 0x0}, - 1225: {region: 0x69, script: 0x52, flags: 0x0}, - 1226: {region: 0x12e, script: 0x52, flags: 0x0}, - 1227: {region: 0x164, script: 0x52, flags: 0x0}, - 1228: {region: 0x35, script: 0x52, flags: 0x0}, - 1229: {region: 0x4d, script: 0x52, flags: 0x0}, - 1230: {region: 0x164, script: 0x52, flags: 0x0}, - 1231: {region: 0x6e, script: 0x27, flags: 0x0}, - 1232: {region: 0x164, script: 0x52, flags: 0x0}, - 1233: {region: 0xe6, script: 0x52, flags: 0x0}, - 1234: {region: 0x2e, script: 0x52, flags: 0x0}, - 1235: {region: 0x98, script: 0xd0, flags: 0x0}, - 1236: {region: 0x98, script: 0x20, flags: 0x0}, - 1237: {region: 0x164, script: 0x52, flags: 0x0}, - 1238: {region: 0x164, script: 0x52, flags: 0x0}, - 1239: {region: 0x164, script: 0x52, flags: 0x0}, - 1240: {region: 0x164, script: 0x52, flags: 0x0}, - 1241: {region: 0x164, script: 0x52, flags: 0x0}, - 1242: {region: 0x164, script: 0x52, flags: 0x0}, - 1243: {region: 0x164, script: 0x52, flags: 0x0}, - 1244: {region: 0x164, script: 0x52, flags: 0x0}, - 1245: {region: 0x164, script: 0x52, flags: 0x0}, - 1246: {region: 0x13f, script: 0x52, flags: 0x0}, - 1247: {region: 0x164, script: 0x52, flags: 0x0}, - 1248: {region: 0x164, script: 0x52, flags: 0x0}, - 1249: {region: 0xa7, script: 0x5, flags: 0x0}, - 1250: {region: 0x164, script: 0x52, flags: 0x0}, - 1251: {region: 0x113, script: 0x52, flags: 0x0}, - 1252: {region: 0x164, script: 0x52, flags: 0x0}, - 1253: {region: 0x164, script: 0x52, flags: 0x0}, - 1254: {region: 0x164, script: 0x52, flags: 0x0}, - 1255: {region: 0x164, script: 0x52, flags: 0x0}, - 1256: {region: 0x98, script: 0x20, flags: 0x0}, - 1257: {region: 0x52, script: 0x34, flags: 0x0}, - 1258: {region: 0x164, script: 0x52, flags: 0x0}, - 1259: {region: 0x164, script: 0x52, flags: 0x0}, - 1260: {region: 0x40, script: 0x52, flags: 0x0}, - 1261: {region: 0x164, script: 0x52, flags: 0x0}, - 1262: {region: 0x12a, script: 0x18, flags: 0x0}, - 1263: {region: 0x164, script: 0x52, flags: 0x0}, - 1264: {region: 0x160, script: 0x52, flags: 0x0}, - 1265: {region: 0x164, script: 0x52, flags: 0x0}, - 1266: {region: 0x12a, script: 0x5a, flags: 0x0}, - 1267: {region: 0x12a, script: 0x5b, flags: 0x0}, - 1268: {region: 0x7c, script: 0x29, flags: 0x0}, - 1269: {region: 0x52, script: 0x5e, flags: 0x0}, - 1270: {region: 0x10a, script: 0x62, flags: 0x0}, - 1271: {region: 0x107, script: 0x6c, flags: 0x0}, - 1272: {region: 0x98, script: 0x20, flags: 0x0}, - 1273: {region: 0x130, script: 0x52, flags: 0x0}, - 1274: {region: 0x164, script: 0x52, flags: 0x0}, - 1275: {region: 0x9b, script: 0x82, flags: 0x0}, - 1276: {region: 0x164, script: 0x52, flags: 0x0}, - 1277: {region: 0x15d, script: 0xba, flags: 0x0}, - 1278: {region: 0x164, script: 0x52, flags: 0x0}, - 1279: {region: 0x164, script: 0x52, flags: 0x0}, - 1280: {region: 0xda, script: 0x20, flags: 0x0}, - 1281: {region: 0x164, script: 0x52, flags: 0x0}, - 1282: {region: 0x164, script: 0x52, flags: 0x0}, - 1283: {region: 0xd0, script: 0x52, flags: 0x0}, - 1284: {region: 0x74, script: 0x52, flags: 0x0}, - 1285: {region: 0x164, script: 0x52, flags: 0x0}, - 1286: {region: 0x164, script: 0x52, flags: 0x0}, - 1287: {region: 0x51, script: 0x52, flags: 0x0}, - 1288: {region: 0x164, script: 0x52, flags: 0x0}, - 1289: {region: 0x164, script: 0x52, flags: 0x0}, - 1290: {region: 0x164, script: 0x52, flags: 0x0}, - 1291: {region: 0x51, script: 0x52, flags: 0x0}, - 1292: {region: 0x164, script: 0x52, flags: 0x0}, - 1293: {region: 0x164, script: 0x52, flags: 0x0}, - 1294: {region: 0x164, script: 0x52, flags: 0x0}, - 1295: {region: 0x164, script: 0x52, flags: 0x0}, - 1296: {region: 0x1, script: 0x37, flags: 0x0}, - 1297: {region: 0x164, script: 0x52, flags: 0x0}, - 1298: {region: 0x164, script: 0x52, flags: 0x0}, - 1299: {region: 0x164, script: 0x52, flags: 0x0}, - 1300: {region: 0x164, script: 0x52, flags: 0x0}, - 1301: {region: 0x164, script: 0x52, flags: 0x0}, - 1302: {region: 0xd5, script: 0x52, flags: 0x0}, - 1303: {region: 0x164, script: 0x52, flags: 0x0}, - 1304: {region: 0x164, script: 0x52, flags: 0x0}, - 1305: {region: 0x164, script: 0x52, flags: 0x0}, - 1306: {region: 0x40, script: 0x52, flags: 0x0}, - 1307: {region: 0x164, script: 0x52, flags: 0x0}, - 1308: {region: 0xce, script: 0x52, flags: 0x0}, + 1211: {region: 0x165, script: 0x55, flags: 0x0}, + 1212: {region: 0xb4, script: 0xdf, flags: 0x0}, + 1213: {region: 0x165, script: 0x55, flags: 0x0}, + 1214: {region: 0x161, script: 0x55, flags: 0x0}, + 1215: {region: 0x9e, script: 0x55, flags: 0x0}, + 1216: {region: 0x106, script: 0x55, flags: 0x0}, + 1217: {region: 0x13e, script: 0x55, flags: 0x0}, + 1218: {region: 0x11b, script: 0x55, flags: 0x0}, + 1219: {region: 0x165, script: 0x55, flags: 0x0}, + 1220: {region: 0x36, script: 0x55, flags: 0x0}, + 1221: {region: 0x60, script: 0x55, flags: 0x0}, + 1222: {region: 0xd1, script: 0x55, flags: 0x0}, + 1223: {region: 0x1, script: 0x55, flags: 0x0}, + 1224: {region: 0x106, script: 0x55, flags: 0x0}, + 1225: {region: 0x6a, script: 0x55, flags: 0x0}, + 1226: {region: 0x12f, script: 0x55, flags: 0x0}, + 1227: {region: 0x165, script: 0x55, flags: 0x0}, + 1228: {region: 0x36, script: 0x55, flags: 0x0}, + 1229: {region: 0x4e, script: 0x55, flags: 0x0}, + 1230: {region: 0x165, script: 0x55, flags: 0x0}, + 1231: {region: 0x6f, script: 0x28, flags: 0x0}, + 1232: {region: 0x165, script: 0x55, flags: 0x0}, + 1233: {region: 0xe7, script: 0x55, flags: 0x0}, + 1234: {region: 0x2f, script: 0x55, flags: 0x0}, + 1235: {region: 0x99, script: 0xd6, flags: 0x0}, + 1236: {region: 0x99, script: 0x20, flags: 0x0}, + 1237: {region: 0x165, script: 0x55, flags: 0x0}, + 1238: {region: 0x165, script: 0x55, flags: 0x0}, + 1239: {region: 0x165, script: 0x55, flags: 0x0}, + 1240: {region: 0x165, script: 0x55, flags: 0x0}, + 1241: {region: 0x165, script: 0x55, flags: 0x0}, + 1242: {region: 0x165, script: 0x55, flags: 0x0}, + 1243: {region: 0x165, script: 0x55, flags: 0x0}, + 1244: {region: 0x165, script: 0x55, flags: 0x0}, + 1245: {region: 0x165, script: 0x55, flags: 0x0}, + 1246: {region: 0x140, script: 0x55, flags: 0x0}, + 1247: {region: 0x165, script: 0x55, flags: 0x0}, + 1248: {region: 0x165, script: 0x55, flags: 0x0}, + 1249: {region: 0xa8, script: 0x5, flags: 0x0}, + 1250: {region: 0x165, script: 0x55, flags: 0x0}, + 1251: {region: 0x114, script: 0x55, flags: 0x0}, + 1252: {region: 0x165, script: 0x55, flags: 0x0}, + 1253: {region: 0x165, script: 0x55, flags: 0x0}, + 1254: {region: 0x165, script: 0x55, flags: 0x0}, + 1255: {region: 0x165, script: 0x55, flags: 0x0}, + 1256: {region: 0x99, script: 0x20, flags: 0x0}, + 1257: {region: 0x53, script: 0x37, flags: 0x0}, + 1258: {region: 0x165, script: 0x55, flags: 0x0}, + 1259: {region: 0x165, script: 0x55, flags: 0x0}, + 1260: {region: 0x41, script: 0x55, flags: 0x0}, + 1261: {region: 0x165, script: 0x55, flags: 0x0}, + 1262: {region: 0x12b, script: 0x18, flags: 0x0}, + 1263: {region: 0x165, script: 0x55, flags: 0x0}, + 1264: {region: 0x161, script: 0x55, flags: 0x0}, + 1265: {region: 0x165, script: 0x55, flags: 0x0}, + 1266: {region: 0x12b, script: 0x5d, flags: 0x0}, + 1267: {region: 0x12b, script: 0x5e, flags: 0x0}, + 1268: {region: 0x7d, script: 0x2a, flags: 0x0}, + 1269: {region: 0x53, script: 0x62, flags: 0x0}, + 1270: {region: 0x10b, script: 0x67, flags: 0x0}, + 1271: {region: 0x108, script: 0x71, flags: 0x0}, + 1272: {region: 0x99, script: 0x20, flags: 0x0}, + 1273: {region: 0x131, script: 0x55, flags: 0x0}, + 1274: {region: 0x165, script: 0x55, flags: 0x0}, + 1275: {region: 0x9c, script: 0x87, flags: 0x0}, + 1276: {region: 0x165, script: 0x55, flags: 0x0}, + 1277: {region: 0x15e, script: 0xbf, flags: 0x0}, + 1278: {region: 0x165, script: 0x55, flags: 0x0}, + 1279: {region: 0x165, script: 0x55, flags: 0x0}, + 1280: {region: 0xdb, script: 0x20, flags: 0x0}, + 1281: {region: 0x165, script: 0x55, flags: 0x0}, + 1282: {region: 0x165, script: 0x55, flags: 0x0}, + 1283: {region: 0xd1, script: 0x55, flags: 0x0}, + 1284: {region: 0x75, script: 0x55, flags: 0x0}, + 1285: {region: 0x165, script: 0x55, flags: 0x0}, + 1286: {region: 0x165, script: 0x55, flags: 0x0}, + 1287: {region: 0x52, script: 0x55, flags: 0x0}, + 1288: {region: 0x165, script: 0x55, flags: 0x0}, + 1289: {region: 0x165, script: 0x55, flags: 0x0}, + 1290: {region: 0x165, script: 0x55, flags: 0x0}, + 1291: {region: 0x52, script: 0x55, flags: 0x0}, + 1292: {region: 0x165, script: 0x55, flags: 0x0}, + 1293: {region: 0x165, script: 0x55, flags: 0x0}, + 1294: {region: 0x165, script: 0x55, flags: 0x0}, + 1295: {region: 0x165, script: 0x55, flags: 0x0}, + 1296: {region: 0x1, script: 0x3a, flags: 0x0}, + 1297: {region: 0x165, script: 0x55, flags: 0x0}, + 1298: {region: 0x165, script: 0x55, flags: 0x0}, + 1299: {region: 0x165, script: 0x55, flags: 0x0}, + 1300: {region: 0x165, script: 0x55, flags: 0x0}, + 1301: {region: 0x165, script: 0x55, flags: 0x0}, + 1302: {region: 0xd6, script: 0x55, flags: 0x0}, + 1303: {region: 0x165, script: 0x55, flags: 0x0}, + 1304: {region: 0x165, script: 0x55, flags: 0x0}, + 1305: {region: 0x165, script: 0x55, flags: 0x0}, + 1306: {region: 0x41, script: 0x55, flags: 0x0}, + 1307: {region: 0x165, script: 0x55, flags: 0x0}, + 1308: {region: 0xcf, script: 0x55, flags: 0x0}, 1309: {region: 0x4a, script: 0x3, flags: 0x1}, - 1310: {region: 0x164, script: 0x52, flags: 0x0}, - 1311: {region: 0x164, script: 0x52, flags: 0x0}, - 1312: {region: 0x164, script: 0x52, flags: 0x0}, - 1313: {region: 0x52, script: 0x52, flags: 0x0}, - 1314: {region: 0x10a, script: 0x52, flags: 0x0}, - 1316: {region: 0xa7, script: 0x5, flags: 0x0}, - 1317: {region: 0xd8, script: 0x52, flags: 0x0}, - 1318: {region: 0xb9, script: 0xd2, flags: 0x0}, + 1310: {region: 0x165, script: 0x55, flags: 0x0}, + 1311: {region: 0x165, script: 0x55, flags: 0x0}, + 1312: {region: 0x165, script: 0x55, flags: 0x0}, + 1313: {region: 0x53, script: 0x55, flags: 0x0}, + 1314: {region: 0x10b, script: 0x55, flags: 0x0}, + 1316: {region: 0xa8, script: 0x5, flags: 0x0}, + 1317: {region: 0xd9, script: 0x55, flags: 0x0}, + 1318: {region: 0xba, script: 0xd8, flags: 0x0}, 1319: {region: 0x4d, script: 0x14, flags: 0x1}, - 1320: {region: 0x164, script: 0x52, flags: 0x0}, - 1321: {region: 0x121, script: 0x52, flags: 0x0}, - 1322: {region: 0xcf, script: 0x52, flags: 0x0}, - 1323: {region: 0x164, script: 0x52, flags: 0x0}, - 1324: {region: 0x160, script: 0x52, flags: 0x0}, - 1326: {region: 0x12a, script: 0x52, flags: 0x0}, + 1320: {region: 0x165, script: 0x55, flags: 0x0}, + 1321: {region: 0x122, script: 0x55, flags: 0x0}, + 1322: {region: 0xd0, script: 0x55, flags: 0x0}, + 1323: {region: 0x165, script: 0x55, flags: 0x0}, + 1324: {region: 0x161, script: 0x55, flags: 0x0}, + 1326: {region: 0x12b, script: 0x55, flags: 0x0}, } // likelyLangList holds lists info associated with likelyLang. // Size: 388 bytes, 97 elements var likelyLangList = [97]likelyScriptRegion{ - 0: {region: 0x9b, script: 0x7, flags: 0x0}, - 1: {region: 0xa0, script: 0x6d, flags: 0x2}, - 2: {region: 0x11b, script: 0x78, flags: 0x2}, - 3: {region: 0x31, script: 0x52, flags: 0x0}, - 4: {region: 0x9a, script: 0x5, flags: 0x4}, - 5: {region: 0x9b, script: 0x5, flags: 0x4}, - 6: {region: 0x105, script: 0x1e, flags: 0x4}, - 7: {region: 0x9b, script: 0x5, flags: 0x2}, - 8: {region: 0x105, script: 0x1e, flags: 0x0}, - 9: {region: 0x37, script: 0x2a, flags: 0x2}, - 10: {region: 0x134, script: 0x52, flags: 0x0}, - 11: {region: 0x7a, script: 0xbd, flags: 0x2}, - 12: {region: 0x113, script: 0x52, flags: 0x0}, - 13: {region: 0x83, script: 0x1, flags: 0x2}, - 14: {region: 0x5c, script: 0x1d, flags: 0x0}, - 15: {region: 0x86, script: 0x57, flags: 0x2}, - 16: {region: 0xd5, script: 0x52, flags: 0x0}, - 17: {region: 0x51, script: 0x5, flags: 0x4}, - 18: {region: 0x10a, script: 0x5, flags: 0x4}, - 19: {region: 0xad, script: 0x1e, flags: 0x0}, - 20: {region: 0x23, script: 0x5, flags: 0x4}, - 21: {region: 0x52, script: 0x5, flags: 0x4}, - 22: {region: 0x9b, script: 0x5, flags: 0x4}, - 23: {region: 0xc4, script: 0x5, flags: 0x4}, - 24: {region: 0x52, script: 0x5, flags: 0x2}, - 25: {region: 0x12a, script: 0x52, flags: 0x0}, - 26: {region: 0xaf, script: 0x5, flags: 0x4}, - 27: {region: 0x9a, script: 0x5, flags: 0x2}, - 28: {region: 0xa4, script: 0x1e, flags: 0x0}, - 29: {region: 0x52, script: 0x5, flags: 0x4}, - 30: {region: 0x12a, script: 0x52, flags: 0x4}, - 31: {region: 0x52, script: 0x5, flags: 0x2}, - 32: {region: 0x12a, script: 0x52, flags: 0x2}, - 33: {region: 0xda, script: 0x20, flags: 0x0}, - 34: {region: 0x98, script: 0x55, flags: 0x2}, - 35: {region: 0x82, script: 0x52, flags: 0x0}, - 36: {region: 0x83, script: 0x70, flags: 0x4}, - 37: {region: 0x83, script: 0x70, flags: 0x2}, - 38: {region: 0xc4, script: 0x1e, flags: 0x0}, - 39: {region: 0x52, script: 0x66, flags: 0x4}, - 40: {region: 0x52, script: 0x66, flags: 0x2}, - 41: {region: 0xcf, script: 0x52, flags: 0x0}, - 42: {region: 0x49, script: 0x5, flags: 0x4}, - 43: {region: 0x94, script: 0x5, flags: 0x4}, - 44: {region: 0x98, script: 0x2f, flags: 0x0}, - 45: {region: 0xe7, script: 0x5, flags: 0x4}, - 46: {region: 0xe7, script: 0x5, flags: 0x2}, - 47: {region: 0x9b, script: 0x7c, flags: 0x0}, - 48: {region: 0x52, script: 0x7d, flags: 0x2}, - 49: {region: 0xb9, script: 0xd2, flags: 0x0}, - 50: {region: 0xd8, script: 0x52, flags: 0x4}, - 51: {region: 0xe7, script: 0x5, flags: 0x0}, - 52: {region: 0x98, script: 0x20, flags: 0x2}, - 53: {region: 0x98, script: 0x47, flags: 0x2}, - 54: {region: 0x98, script: 0xc0, flags: 0x2}, - 55: {region: 0x104, script: 0x1e, flags: 0x0}, - 56: {region: 0xbc, script: 0x52, flags: 0x4}, - 57: {region: 0x103, script: 0x52, flags: 0x4}, - 58: {region: 0x105, script: 0x52, flags: 0x4}, - 59: {region: 0x12a, script: 0x52, flags: 0x4}, - 60: {region: 0x123, script: 0x1e, flags: 0x0}, - 61: {region: 0xe7, script: 0x5, flags: 0x4}, - 62: {region: 0xe7, script: 0x5, flags: 0x2}, - 63: {region: 0x52, script: 0x5, flags: 0x0}, - 64: {region: 0xad, script: 0x1e, flags: 0x4}, - 65: {region: 0xc4, script: 0x1e, flags: 0x4}, - 66: {region: 0xad, script: 0x1e, flags: 0x2}, - 67: {region: 0x98, script: 0xe, flags: 0x0}, - 68: {region: 0xda, script: 0x20, flags: 0x4}, - 69: {region: 0xda, script: 0x20, flags: 0x2}, - 70: {region: 0x136, script: 0x52, flags: 0x0}, - 71: {region: 0x23, script: 0x5, flags: 0x4}, - 72: {region: 0x52, script: 0x1e, flags: 0x4}, - 73: {region: 0x23, script: 0x5, flags: 0x2}, - 74: {region: 0x8c, script: 0x35, flags: 0x0}, - 75: {region: 0x52, script: 0x34, flags: 0x4}, - 76: {region: 0x52, script: 0x34, flags: 0x2}, - 77: {region: 0x52, script: 0x34, flags: 0x0}, - 78: {region: 0x2e, script: 0x35, flags: 0x4}, - 79: {region: 0x3d, script: 0x35, flags: 0x4}, - 80: {region: 0x7a, script: 0x35, flags: 0x4}, - 81: {region: 0x7d, script: 0x35, flags: 0x4}, - 82: {region: 0x8c, script: 0x35, flags: 0x4}, - 83: {region: 0x94, script: 0x35, flags: 0x4}, - 84: {region: 0xc5, script: 0x35, flags: 0x4}, - 85: {region: 0xcf, script: 0x35, flags: 0x4}, - 86: {region: 0xe1, script: 0x35, flags: 0x4}, - 87: {region: 0xe4, script: 0x35, flags: 0x4}, - 88: {region: 0xe6, script: 0x35, flags: 0x4}, - 89: {region: 0x115, script: 0x35, flags: 0x4}, - 90: {region: 0x122, script: 0x35, flags: 0x4}, - 91: {region: 0x12d, script: 0x35, flags: 0x4}, - 92: {region: 0x134, script: 0x35, flags: 0x4}, - 93: {region: 0x13d, script: 0x35, flags: 0x4}, - 94: {region: 0x12d, script: 0x11, flags: 0x2}, - 95: {region: 0x12d, script: 0x30, flags: 0x2}, - 96: {region: 0x12d, script: 0x35, flags: 0x2}, + 0: {region: 0x9c, script: 0x7, flags: 0x0}, + 1: {region: 0xa1, script: 0x72, flags: 0x2}, + 2: {region: 0x11c, script: 0x7d, flags: 0x2}, + 3: {region: 0x32, script: 0x55, flags: 0x0}, + 4: {region: 0x9b, script: 0x5, flags: 0x4}, + 5: {region: 0x9c, script: 0x5, flags: 0x4}, + 6: {region: 0x106, script: 0x1e, flags: 0x4}, + 7: {region: 0x9c, script: 0x5, flags: 0x2}, + 8: {region: 0x106, script: 0x1e, flags: 0x0}, + 9: {region: 0x38, script: 0x2b, flags: 0x2}, + 10: {region: 0x135, script: 0x55, flags: 0x0}, + 11: {region: 0x7b, script: 0xc2, flags: 0x2}, + 12: {region: 0x114, script: 0x55, flags: 0x0}, + 13: {region: 0x84, script: 0x1, flags: 0x2}, + 14: {region: 0x5d, script: 0x1d, flags: 0x0}, + 15: {region: 0x87, script: 0x5a, flags: 0x2}, + 16: {region: 0xd6, script: 0x55, flags: 0x0}, + 17: {region: 0x52, script: 0x5, flags: 0x4}, + 18: {region: 0x10b, script: 0x5, flags: 0x4}, + 19: {region: 0xae, script: 0x1e, flags: 0x0}, + 20: {region: 0x24, script: 0x5, flags: 0x4}, + 21: {region: 0x53, script: 0x5, flags: 0x4}, + 22: {region: 0x9c, script: 0x5, flags: 0x4}, + 23: {region: 0xc5, script: 0x5, flags: 0x4}, + 24: {region: 0x53, script: 0x5, flags: 0x2}, + 25: {region: 0x12b, script: 0x55, flags: 0x0}, + 26: {region: 0xb0, script: 0x5, flags: 0x4}, + 27: {region: 0x9b, script: 0x5, flags: 0x2}, + 28: {region: 0xa5, script: 0x1e, flags: 0x0}, + 29: {region: 0x53, script: 0x5, flags: 0x4}, + 30: {region: 0x12b, script: 0x55, flags: 0x4}, + 31: {region: 0x53, script: 0x5, flags: 0x2}, + 32: {region: 0x12b, script: 0x55, flags: 0x2}, + 33: {region: 0xdb, script: 0x20, flags: 0x0}, + 34: {region: 0x99, script: 0x58, flags: 0x2}, + 35: {region: 0x83, script: 0x55, flags: 0x0}, + 36: {region: 0x84, script: 0x75, flags: 0x4}, + 37: {region: 0x84, script: 0x75, flags: 0x2}, + 38: {region: 0xc5, script: 0x1e, flags: 0x0}, + 39: {region: 0x53, script: 0x6b, flags: 0x4}, + 40: {region: 0x53, script: 0x6b, flags: 0x2}, + 41: {region: 0xd0, script: 0x55, flags: 0x0}, + 42: {region: 0x4a, script: 0x5, flags: 0x4}, + 43: {region: 0x95, script: 0x5, flags: 0x4}, + 44: {region: 0x99, script: 0x32, flags: 0x0}, + 45: {region: 0xe8, script: 0x5, flags: 0x4}, + 46: {region: 0xe8, script: 0x5, flags: 0x2}, + 47: {region: 0x9c, script: 0x81, flags: 0x0}, + 48: {region: 0x53, script: 0x82, flags: 0x2}, + 49: {region: 0xba, script: 0xd8, flags: 0x0}, + 50: {region: 0xd9, script: 0x55, flags: 0x4}, + 51: {region: 0xe8, script: 0x5, flags: 0x0}, + 52: {region: 0x99, script: 0x20, flags: 0x2}, + 53: {region: 0x99, script: 0x4a, flags: 0x2}, + 54: {region: 0x99, script: 0xc5, flags: 0x2}, + 55: {region: 0x105, script: 0x1e, flags: 0x0}, + 56: {region: 0xbd, script: 0x55, flags: 0x4}, + 57: {region: 0x104, script: 0x55, flags: 0x4}, + 58: {region: 0x106, script: 0x55, flags: 0x4}, + 59: {region: 0x12b, script: 0x55, flags: 0x4}, + 60: {region: 0x124, script: 0x1e, flags: 0x0}, + 61: {region: 0xe8, script: 0x5, flags: 0x4}, + 62: {region: 0xe8, script: 0x5, flags: 0x2}, + 63: {region: 0x53, script: 0x5, flags: 0x0}, + 64: {region: 0xae, script: 0x1e, flags: 0x4}, + 65: {region: 0xc5, script: 0x1e, flags: 0x4}, + 66: {region: 0xae, script: 0x1e, flags: 0x2}, + 67: {region: 0x99, script: 0xe, flags: 0x0}, + 68: {region: 0xdb, script: 0x20, flags: 0x4}, + 69: {region: 0xdb, script: 0x20, flags: 0x2}, + 70: {region: 0x137, script: 0x55, flags: 0x0}, + 71: {region: 0x24, script: 0x5, flags: 0x4}, + 72: {region: 0x53, script: 0x1e, flags: 0x4}, + 73: {region: 0x24, script: 0x5, flags: 0x2}, + 74: {region: 0x8d, script: 0x38, flags: 0x0}, + 75: {region: 0x53, script: 0x37, flags: 0x4}, + 76: {region: 0x53, script: 0x37, flags: 0x2}, + 77: {region: 0x53, script: 0x37, flags: 0x0}, + 78: {region: 0x2f, script: 0x38, flags: 0x4}, + 79: {region: 0x3e, script: 0x38, flags: 0x4}, + 80: {region: 0x7b, script: 0x38, flags: 0x4}, + 81: {region: 0x7e, script: 0x38, flags: 0x4}, + 82: {region: 0x8d, script: 0x38, flags: 0x4}, + 83: {region: 0x95, script: 0x38, flags: 0x4}, + 84: {region: 0xc6, script: 0x38, flags: 0x4}, + 85: {region: 0xd0, script: 0x38, flags: 0x4}, + 86: {region: 0xe2, script: 0x38, flags: 0x4}, + 87: {region: 0xe5, script: 0x38, flags: 0x4}, + 88: {region: 0xe7, script: 0x38, flags: 0x4}, + 89: {region: 0x116, script: 0x38, flags: 0x4}, + 90: {region: 0x123, script: 0x38, flags: 0x4}, + 91: {region: 0x12e, script: 0x38, flags: 0x4}, + 92: {region: 0x135, script: 0x38, flags: 0x4}, + 93: {region: 0x13e, script: 0x38, flags: 0x4}, + 94: {region: 0x12e, script: 0x11, flags: 0x2}, + 95: {region: 0x12e, script: 0x33, flags: 0x2}, + 96: {region: 0x12e, script: 0x38, flags: 0x2}, } type likelyLangScript struct { @@ -2924,307 +2935,307 @@ type likelyLangScript struct { // for a given regionID, lang and script are the index and size respectively // of the list in likelyRegionList. // TODO: exclude containers and user-definable regions from the list. -// Size: 1428 bytes, 357 elements -var likelyRegion = [357]likelyLangScript{ - 33: {lang: 0xd7, script: 0x52, flags: 0x0}, - 34: {lang: 0x3a, script: 0x5, flags: 0x0}, - 35: {lang: 0x0, script: 0x2, flags: 0x1}, - 38: {lang: 0x2, script: 0x2, flags: 0x1}, - 39: {lang: 0x4, script: 0x2, flags: 0x1}, - 41: {lang: 0x3be, script: 0x52, flags: 0x0}, - 42: {lang: 0x0, script: 0x52, flags: 0x0}, - 43: {lang: 0x13d, script: 0x52, flags: 0x0}, - 44: {lang: 0x419, script: 0x52, flags: 0x0}, - 45: {lang: 0x10c, script: 0x52, flags: 0x0}, - 47: {lang: 0x365, script: 0x52, flags: 0x0}, - 48: {lang: 0x442, script: 0x52, flags: 0x0}, - 49: {lang: 0x58, script: 0x52, flags: 0x0}, - 50: {lang: 0x6, script: 0x2, flags: 0x1}, - 52: {lang: 0xa5, script: 0xe, flags: 0x0}, - 53: {lang: 0x365, script: 0x52, flags: 0x0}, - 54: {lang: 0x15d, script: 0x52, flags: 0x0}, - 55: {lang: 0x7e, script: 0x1e, flags: 0x0}, - 56: {lang: 0x3a, script: 0x5, flags: 0x0}, - 57: {lang: 0x3d7, script: 0x52, flags: 0x0}, - 58: {lang: 0x15d, script: 0x52, flags: 0x0}, - 59: {lang: 0x15d, script: 0x52, flags: 0x0}, - 61: {lang: 0x31d, script: 0x52, flags: 0x0}, - 62: {lang: 0x13d, script: 0x52, flags: 0x0}, - 63: {lang: 0x39f, script: 0x52, flags: 0x0}, - 64: {lang: 0x3be, script: 0x52, flags: 0x0}, - 66: {lang: 0x8, script: 0x2, flags: 0x1}, - 68: {lang: 0x0, script: 0x52, flags: 0x0}, - 70: {lang: 0x71, script: 0x1e, flags: 0x0}, - 72: {lang: 0x510, script: 0x37, flags: 0x2}, - 73: {lang: 0x31d, script: 0x5, flags: 0x2}, - 74: {lang: 0x443, script: 0x52, flags: 0x0}, - 75: {lang: 0x15d, script: 0x52, flags: 0x0}, - 76: {lang: 0x15d, script: 0x52, flags: 0x0}, - 77: {lang: 0x10c, script: 0x52, flags: 0x0}, - 78: {lang: 0x15d, script: 0x52, flags: 0x0}, - 80: {lang: 0x13d, script: 0x52, flags: 0x0}, - 81: {lang: 0x15d, script: 0x52, flags: 0x0}, - 82: {lang: 0xa, script: 0x5, flags: 0x1}, - 83: {lang: 0x13d, script: 0x52, flags: 0x0}, - 84: {lang: 0x0, script: 0x52, flags: 0x0}, - 85: {lang: 0x13d, script: 0x52, flags: 0x0}, - 88: {lang: 0x13d, script: 0x52, flags: 0x0}, - 89: {lang: 0x3be, script: 0x52, flags: 0x0}, - 90: {lang: 0x39f, script: 0x52, flags: 0x0}, - 92: {lang: 0xf, script: 0x2, flags: 0x1}, - 93: {lang: 0xf9, script: 0x52, flags: 0x0}, - 95: {lang: 0x10c, script: 0x52, flags: 0x0}, - 97: {lang: 0x1, script: 0x52, flags: 0x0}, - 98: {lang: 0x100, script: 0x52, flags: 0x0}, - 100: {lang: 0x13d, script: 0x52, flags: 0x0}, - 102: {lang: 0x11, script: 0x2, flags: 0x1}, - 103: {lang: 0x13d, script: 0x52, flags: 0x0}, - 104: {lang: 0x13d, script: 0x52, flags: 0x0}, - 105: {lang: 0x13f, script: 0x52, flags: 0x0}, - 106: {lang: 0x3a, script: 0x5, flags: 0x0}, +// Size: 1432 bytes, 358 elements +var likelyRegion = [358]likelyLangScript{ + 34: {lang: 0xd7, script: 0x55, flags: 0x0}, + 35: {lang: 0x3a, script: 0x5, flags: 0x0}, + 36: {lang: 0x0, script: 0x2, flags: 0x1}, + 39: {lang: 0x2, script: 0x2, flags: 0x1}, + 40: {lang: 0x4, script: 0x2, flags: 0x1}, + 42: {lang: 0x3be, script: 0x55, flags: 0x0}, + 43: {lang: 0x0, script: 0x55, flags: 0x0}, + 44: {lang: 0x13d, script: 0x55, flags: 0x0}, + 45: {lang: 0x419, script: 0x55, flags: 0x0}, + 46: {lang: 0x10c, script: 0x55, flags: 0x0}, + 48: {lang: 0x365, script: 0x55, flags: 0x0}, + 49: {lang: 0x442, script: 0x55, flags: 0x0}, + 50: {lang: 0x58, script: 0x55, flags: 0x0}, + 51: {lang: 0x6, script: 0x2, flags: 0x1}, + 53: {lang: 0xa5, script: 0xe, flags: 0x0}, + 54: {lang: 0x365, script: 0x55, flags: 0x0}, + 55: {lang: 0x15d, script: 0x55, flags: 0x0}, + 56: {lang: 0x7e, script: 0x1e, flags: 0x0}, + 57: {lang: 0x3a, script: 0x5, flags: 0x0}, + 58: {lang: 0x3d7, script: 0x55, flags: 0x0}, + 59: {lang: 0x15d, script: 0x55, flags: 0x0}, + 60: {lang: 0x15d, script: 0x55, flags: 0x0}, + 62: {lang: 0x31d, script: 0x55, flags: 0x0}, + 63: {lang: 0x13d, script: 0x55, flags: 0x0}, + 64: {lang: 0x39f, script: 0x55, flags: 0x0}, + 65: {lang: 0x3be, script: 0x55, flags: 0x0}, + 67: {lang: 0x8, script: 0x2, flags: 0x1}, + 69: {lang: 0x0, script: 0x55, flags: 0x0}, + 71: {lang: 0x71, script: 0x1e, flags: 0x0}, + 73: {lang: 0x510, script: 0x3a, flags: 0x2}, + 74: {lang: 0x31d, script: 0x5, flags: 0x2}, + 75: {lang: 0x443, script: 0x55, flags: 0x0}, + 76: {lang: 0x15d, script: 0x55, flags: 0x0}, + 77: {lang: 0x15d, script: 0x55, flags: 0x0}, + 78: {lang: 0x10c, script: 0x55, flags: 0x0}, + 79: {lang: 0x15d, script: 0x55, flags: 0x0}, + 81: {lang: 0x13d, script: 0x55, flags: 0x0}, + 82: {lang: 0x15d, script: 0x55, flags: 0x0}, + 83: {lang: 0xa, script: 0x5, flags: 0x1}, + 84: {lang: 0x13d, script: 0x55, flags: 0x0}, + 85: {lang: 0x0, script: 0x55, flags: 0x0}, + 86: {lang: 0x13d, script: 0x55, flags: 0x0}, + 89: {lang: 0x13d, script: 0x55, flags: 0x0}, + 90: {lang: 0x3be, script: 0x55, flags: 0x0}, + 91: {lang: 0x39f, script: 0x55, flags: 0x0}, + 93: {lang: 0xf, script: 0x2, flags: 0x1}, + 94: {lang: 0xf9, script: 0x55, flags: 0x0}, + 96: {lang: 0x10c, script: 0x55, flags: 0x0}, + 98: {lang: 0x1, script: 0x55, flags: 0x0}, + 99: {lang: 0x100, script: 0x55, flags: 0x0}, + 101: {lang: 0x13d, script: 0x55, flags: 0x0}, + 103: {lang: 0x11, script: 0x2, flags: 0x1}, + 104: {lang: 0x13d, script: 0x55, flags: 0x0}, + 105: {lang: 0x13d, script: 0x55, flags: 0x0}, + 106: {lang: 0x13f, script: 0x55, flags: 0x0}, 107: {lang: 0x3a, script: 0x5, flags: 0x0}, - 108: {lang: 0x46d, script: 0x27, flags: 0x0}, - 109: {lang: 0x13d, script: 0x52, flags: 0x0}, - 110: {lang: 0x13, script: 0x2, flags: 0x1}, - 112: {lang: 0x10c, script: 0x52, flags: 0x0}, - 113: {lang: 0x150, script: 0x52, flags: 0x0}, - 114: {lang: 0x1be, script: 0x20, flags: 0x2}, - 117: {lang: 0x157, script: 0x52, flags: 0x0}, - 119: {lang: 0x15d, script: 0x52, flags: 0x0}, - 121: {lang: 0x15d, script: 0x52, flags: 0x0}, - 122: {lang: 0x15, script: 0x2, flags: 0x1}, - 124: {lang: 0x17, script: 0x3, flags: 0x1}, - 125: {lang: 0x15d, script: 0x52, flags: 0x0}, - 127: {lang: 0x21, script: 0x52, flags: 0x0}, - 129: {lang: 0x243, script: 0x52, flags: 0x0}, - 131: {lang: 0x15d, script: 0x52, flags: 0x0}, - 132: {lang: 0x15d, script: 0x52, flags: 0x0}, - 133: {lang: 0x13d, script: 0x52, flags: 0x0}, - 134: {lang: 0x1a, script: 0x2, flags: 0x1}, - 135: {lang: 0x0, script: 0x52, flags: 0x0}, - 136: {lang: 0x13d, script: 0x52, flags: 0x0}, - 138: {lang: 0x3be, script: 0x52, flags: 0x0}, - 140: {lang: 0x527, script: 0x35, flags: 0x0}, - 141: {lang: 0x0, script: 0x52, flags: 0x0}, - 142: {lang: 0x13d, script: 0x52, flags: 0x0}, - 143: {lang: 0x1cf, script: 0x52, flags: 0x0}, - 144: {lang: 0x1d2, script: 0x52, flags: 0x0}, - 145: {lang: 0x1d3, script: 0x52, flags: 0x0}, - 147: {lang: 0x13d, script: 0x52, flags: 0x0}, - 148: {lang: 0x1c, script: 0x2, flags: 0x1}, - 150: {lang: 0x1ba, script: 0x37, flags: 0x0}, - 152: {lang: 0x1e, script: 0x3, flags: 0x1}, - 154: {lang: 0x3a, script: 0x5, flags: 0x0}, - 155: {lang: 0x21, script: 0x2, flags: 0x1}, - 156: {lang: 0x1f6, script: 0x52, flags: 0x0}, - 157: {lang: 0x1f7, script: 0x52, flags: 0x0}, - 160: {lang: 0x3a, script: 0x5, flags: 0x0}, - 161: {lang: 0x1fe, script: 0x41, flags: 0x0}, - 163: {lang: 0x443, script: 0x52, flags: 0x0}, - 164: {lang: 0x288, script: 0x1e, flags: 0x0}, - 165: {lang: 0x23, script: 0x3, flags: 0x1}, - 167: {lang: 0x26, script: 0x2, flags: 0x1}, - 169: {lang: 0x252, script: 0x4b, flags: 0x0}, - 170: {lang: 0x252, script: 0x4b, flags: 0x0}, - 171: {lang: 0x3a, script: 0x5, flags: 0x0}, - 173: {lang: 0x3e0, script: 0x1e, flags: 0x0}, - 174: {lang: 0x28, script: 0x2, flags: 0x1}, - 175: {lang: 0x3a, script: 0x5, flags: 0x0}, - 177: {lang: 0x10c, script: 0x52, flags: 0x0}, - 178: {lang: 0x40a, script: 0xc1, flags: 0x0}, - 180: {lang: 0x439, script: 0x52, flags: 0x0}, - 181: {lang: 0x2be, script: 0x52, flags: 0x0}, - 182: {lang: 0x15d, script: 0x52, flags: 0x0}, - 183: {lang: 0x2c5, script: 0x52, flags: 0x0}, - 184: {lang: 0x3a, script: 0x5, flags: 0x0}, - 185: {lang: 0x2a, script: 0x2, flags: 0x1}, - 186: {lang: 0x15d, script: 0x52, flags: 0x0}, - 187: {lang: 0x2c, script: 0x2, flags: 0x1}, - 188: {lang: 0x430, script: 0x52, flags: 0x0}, - 189: {lang: 0x15d, script: 0x52, flags: 0x0}, - 190: {lang: 0x2ef, script: 0x52, flags: 0x0}, - 193: {lang: 0x2e, script: 0x2, flags: 0x1}, - 194: {lang: 0xa0, script: 0x52, flags: 0x0}, - 195: {lang: 0x30, script: 0x2, flags: 0x1}, - 196: {lang: 0x32, script: 0x2, flags: 0x1}, - 197: {lang: 0x34, script: 0x2, flags: 0x1}, - 199: {lang: 0x15d, script: 0x52, flags: 0x0}, - 200: {lang: 0x36, script: 0x2, flags: 0x1}, - 202: {lang: 0x31e, script: 0x52, flags: 0x0}, - 203: {lang: 0x38, script: 0x3, flags: 0x1}, - 204: {lang: 0x127, script: 0xd4, flags: 0x0}, - 206: {lang: 0x13d, script: 0x52, flags: 0x0}, - 207: {lang: 0x31d, script: 0x52, flags: 0x0}, - 208: {lang: 0x3be, script: 0x52, flags: 0x0}, - 209: {lang: 0x16, script: 0x52, flags: 0x0}, - 210: {lang: 0x15d, script: 0x52, flags: 0x0}, - 211: {lang: 0x1b2, script: 0x52, flags: 0x0}, - 213: {lang: 0x1b2, script: 0x5, flags: 0x2}, - 215: {lang: 0x13d, script: 0x52, flags: 0x0}, - 216: {lang: 0x365, script: 0x52, flags: 0x0}, - 217: {lang: 0x345, script: 0x52, flags: 0x0}, - 218: {lang: 0x34f, script: 0x20, flags: 0x0}, - 224: {lang: 0x3a, script: 0x5, flags: 0x0}, - 225: {lang: 0x13d, script: 0x52, flags: 0x0}, - 227: {lang: 0x13d, script: 0x52, flags: 0x0}, - 228: {lang: 0x15d, script: 0x52, flags: 0x0}, - 229: {lang: 0x484, script: 0x52, flags: 0x0}, - 230: {lang: 0x152, script: 0x52, flags: 0x0}, - 231: {lang: 0x3b, script: 0x3, flags: 0x1}, - 232: {lang: 0x3b1, script: 0x52, flags: 0x0}, - 233: {lang: 0x15d, script: 0x52, flags: 0x0}, - 235: {lang: 0x13d, script: 0x52, flags: 0x0}, - 236: {lang: 0x3a, script: 0x5, flags: 0x0}, - 237: {lang: 0x3be, script: 0x52, flags: 0x0}, - 239: {lang: 0x3a0, script: 0x52, flags: 0x0}, - 240: {lang: 0x192, script: 0x52, flags: 0x0}, - 242: {lang: 0x3a, script: 0x5, flags: 0x0}, - 257: {lang: 0x15d, script: 0x52, flags: 0x0}, - 259: {lang: 0x3e, script: 0x2, flags: 0x1}, - 260: {lang: 0x430, script: 0x1e, flags: 0x0}, - 261: {lang: 0x40, script: 0x2, flags: 0x1}, - 262: {lang: 0x3e3, script: 0x52, flags: 0x0}, - 263: {lang: 0x3a, script: 0x5, flags: 0x0}, - 265: {lang: 0x15d, script: 0x52, flags: 0x0}, - 266: {lang: 0x3a, script: 0x5, flags: 0x0}, - 267: {lang: 0x42, script: 0x2, flags: 0x1}, - 270: {lang: 0x414, script: 0x52, flags: 0x0}, - 271: {lang: 0x345, script: 0x52, flags: 0x0}, - 272: {lang: 0x44, script: 0x2, flags: 0x1}, - 274: {lang: 0x1f7, script: 0x52, flags: 0x0}, - 275: {lang: 0x15d, script: 0x52, flags: 0x0}, - 276: {lang: 0x427, script: 0x52, flags: 0x0}, - 277: {lang: 0x365, script: 0x52, flags: 0x0}, - 279: {lang: 0x3be, script: 0x52, flags: 0x0}, - 281: {lang: 0x13d, script: 0x52, flags: 0x0}, - 283: {lang: 0x46, script: 0x2, flags: 0x1}, - 287: {lang: 0x15d, script: 0x52, flags: 0x0}, - 288: {lang: 0x15d, script: 0x52, flags: 0x0}, - 289: {lang: 0x48, script: 0x2, flags: 0x1}, - 290: {lang: 0x4a, script: 0x3, flags: 0x1}, - 291: {lang: 0x4d, script: 0x2, flags: 0x1}, - 292: {lang: 0x475, script: 0x52, flags: 0x0}, - 293: {lang: 0x3be, script: 0x52, flags: 0x0}, - 294: {lang: 0x474, script: 0x52, flags: 0x0}, - 295: {lang: 0x4f, script: 0x2, flags: 0x1}, - 296: {lang: 0x480, script: 0x52, flags: 0x0}, - 298: {lang: 0x51, script: 0x4, flags: 0x1}, - 300: {lang: 0x49e, script: 0x52, flags: 0x0}, - 301: {lang: 0x55, script: 0x2, flags: 0x1}, - 302: {lang: 0x443, script: 0x52, flags: 0x0}, - 303: {lang: 0x57, script: 0x3, flags: 0x1}, - 304: {lang: 0x443, script: 0x52, flags: 0x0}, - 308: {lang: 0x510, script: 0x37, flags: 0x2}, - 309: {lang: 0x13d, script: 0x52, flags: 0x0}, - 310: {lang: 0x4ba, script: 0x52, flags: 0x0}, - 311: {lang: 0x1f7, script: 0x52, flags: 0x0}, - 314: {lang: 0x13d, script: 0x52, flags: 0x0}, - 317: {lang: 0x4c1, script: 0x52, flags: 0x0}, - 318: {lang: 0x8a, script: 0x52, flags: 0x0}, - 319: {lang: 0x15d, script: 0x52, flags: 0x0}, - 321: {lang: 0x419, script: 0x52, flags: 0x0}, - 332: {lang: 0x5a, script: 0x2, flags: 0x1}, - 349: {lang: 0x3a, script: 0x5, flags: 0x0}, - 350: {lang: 0x5c, script: 0x2, flags: 0x1}, - 355: {lang: 0x421, script: 0x52, flags: 0x0}, + 108: {lang: 0x3a, script: 0x5, flags: 0x0}, + 109: {lang: 0x46d, script: 0x28, flags: 0x0}, + 110: {lang: 0x13d, script: 0x55, flags: 0x0}, + 111: {lang: 0x13, script: 0x2, flags: 0x1}, + 113: {lang: 0x10c, script: 0x55, flags: 0x0}, + 114: {lang: 0x150, script: 0x55, flags: 0x0}, + 115: {lang: 0x1be, script: 0x20, flags: 0x2}, + 118: {lang: 0x157, script: 0x55, flags: 0x0}, + 120: {lang: 0x15d, script: 0x55, flags: 0x0}, + 122: {lang: 0x15d, script: 0x55, flags: 0x0}, + 123: {lang: 0x15, script: 0x2, flags: 0x1}, + 125: {lang: 0x17, script: 0x3, flags: 0x1}, + 126: {lang: 0x15d, script: 0x55, flags: 0x0}, + 128: {lang: 0x21, script: 0x55, flags: 0x0}, + 130: {lang: 0x243, script: 0x55, flags: 0x0}, + 132: {lang: 0x15d, script: 0x55, flags: 0x0}, + 133: {lang: 0x15d, script: 0x55, flags: 0x0}, + 134: {lang: 0x13d, script: 0x55, flags: 0x0}, + 135: {lang: 0x1a, script: 0x2, flags: 0x1}, + 136: {lang: 0x0, script: 0x55, flags: 0x0}, + 137: {lang: 0x13d, script: 0x55, flags: 0x0}, + 139: {lang: 0x3be, script: 0x55, flags: 0x0}, + 141: {lang: 0x527, script: 0x38, flags: 0x0}, + 142: {lang: 0x0, script: 0x55, flags: 0x0}, + 143: {lang: 0x13d, script: 0x55, flags: 0x0}, + 144: {lang: 0x1cf, script: 0x55, flags: 0x0}, + 145: {lang: 0x1d2, script: 0x55, flags: 0x0}, + 146: {lang: 0x1d3, script: 0x55, flags: 0x0}, + 148: {lang: 0x13d, script: 0x55, flags: 0x0}, + 149: {lang: 0x1c, script: 0x2, flags: 0x1}, + 151: {lang: 0x1ba, script: 0x3a, flags: 0x0}, + 153: {lang: 0x1e, script: 0x3, flags: 0x1}, + 155: {lang: 0x3a, script: 0x5, flags: 0x0}, + 156: {lang: 0x21, script: 0x2, flags: 0x1}, + 157: {lang: 0x1f6, script: 0x55, flags: 0x0}, + 158: {lang: 0x1f7, script: 0x55, flags: 0x0}, + 161: {lang: 0x3a, script: 0x5, flags: 0x0}, + 162: {lang: 0x1fe, script: 0x44, flags: 0x0}, + 164: {lang: 0x443, script: 0x55, flags: 0x0}, + 165: {lang: 0x288, script: 0x1e, flags: 0x0}, + 166: {lang: 0x23, script: 0x3, flags: 0x1}, + 168: {lang: 0x26, script: 0x2, flags: 0x1}, + 170: {lang: 0x252, script: 0x4e, flags: 0x0}, + 171: {lang: 0x252, script: 0x4e, flags: 0x0}, + 172: {lang: 0x3a, script: 0x5, flags: 0x0}, + 174: {lang: 0x3e0, script: 0x1e, flags: 0x0}, + 175: {lang: 0x28, script: 0x2, flags: 0x1}, + 176: {lang: 0x3a, script: 0x5, flags: 0x0}, + 178: {lang: 0x10c, script: 0x55, flags: 0x0}, + 179: {lang: 0x40a, script: 0xc6, flags: 0x0}, + 181: {lang: 0x439, script: 0x55, flags: 0x0}, + 182: {lang: 0x2be, script: 0x55, flags: 0x0}, + 183: {lang: 0x15d, script: 0x55, flags: 0x0}, + 184: {lang: 0x2c5, script: 0x55, flags: 0x0}, + 185: {lang: 0x3a, script: 0x5, flags: 0x0}, + 186: {lang: 0x2a, script: 0x2, flags: 0x1}, + 187: {lang: 0x15d, script: 0x55, flags: 0x0}, + 188: {lang: 0x2c, script: 0x2, flags: 0x1}, + 189: {lang: 0x430, script: 0x55, flags: 0x0}, + 190: {lang: 0x15d, script: 0x55, flags: 0x0}, + 191: {lang: 0x2ef, script: 0x55, flags: 0x0}, + 194: {lang: 0x2e, script: 0x2, flags: 0x1}, + 195: {lang: 0xa0, script: 0x55, flags: 0x0}, + 196: {lang: 0x30, script: 0x2, flags: 0x1}, + 197: {lang: 0x32, script: 0x2, flags: 0x1}, + 198: {lang: 0x34, script: 0x2, flags: 0x1}, + 200: {lang: 0x15d, script: 0x55, flags: 0x0}, + 201: {lang: 0x36, script: 0x2, flags: 0x1}, + 203: {lang: 0x31e, script: 0x55, flags: 0x0}, + 204: {lang: 0x38, script: 0x3, flags: 0x1}, + 205: {lang: 0x127, script: 0xda, flags: 0x0}, + 207: {lang: 0x13d, script: 0x55, flags: 0x0}, + 208: {lang: 0x31d, script: 0x55, flags: 0x0}, + 209: {lang: 0x3be, script: 0x55, flags: 0x0}, + 210: {lang: 0x16, script: 0x55, flags: 0x0}, + 211: {lang: 0x15d, script: 0x55, flags: 0x0}, + 212: {lang: 0x1b2, script: 0x55, flags: 0x0}, + 214: {lang: 0x1b2, script: 0x5, flags: 0x2}, + 216: {lang: 0x13d, script: 0x55, flags: 0x0}, + 217: {lang: 0x365, script: 0x55, flags: 0x0}, + 218: {lang: 0x345, script: 0x55, flags: 0x0}, + 219: {lang: 0x34f, script: 0x20, flags: 0x0}, + 225: {lang: 0x3a, script: 0x5, flags: 0x0}, + 226: {lang: 0x13d, script: 0x55, flags: 0x0}, + 228: {lang: 0x13d, script: 0x55, flags: 0x0}, + 229: {lang: 0x15d, script: 0x55, flags: 0x0}, + 230: {lang: 0x484, script: 0x55, flags: 0x0}, + 231: {lang: 0x152, script: 0x55, flags: 0x0}, + 232: {lang: 0x3b, script: 0x3, flags: 0x1}, + 233: {lang: 0x3b1, script: 0x55, flags: 0x0}, + 234: {lang: 0x15d, script: 0x55, flags: 0x0}, + 236: {lang: 0x13d, script: 0x55, flags: 0x0}, + 237: {lang: 0x3a, script: 0x5, flags: 0x0}, + 238: {lang: 0x3be, script: 0x55, flags: 0x0}, + 240: {lang: 0x3a0, script: 0x55, flags: 0x0}, + 241: {lang: 0x192, script: 0x55, flags: 0x0}, + 243: {lang: 0x3a, script: 0x5, flags: 0x0}, + 258: {lang: 0x15d, script: 0x55, flags: 0x0}, + 260: {lang: 0x3e, script: 0x2, flags: 0x1}, + 261: {lang: 0x430, script: 0x1e, flags: 0x0}, + 262: {lang: 0x40, script: 0x2, flags: 0x1}, + 263: {lang: 0x3e3, script: 0x55, flags: 0x0}, + 264: {lang: 0x3a, script: 0x5, flags: 0x0}, + 266: {lang: 0x15d, script: 0x55, flags: 0x0}, + 267: {lang: 0x3a, script: 0x5, flags: 0x0}, + 268: {lang: 0x42, script: 0x2, flags: 0x1}, + 271: {lang: 0x414, script: 0x55, flags: 0x0}, + 272: {lang: 0x345, script: 0x55, flags: 0x0}, + 273: {lang: 0x44, script: 0x2, flags: 0x1}, + 275: {lang: 0x1f7, script: 0x55, flags: 0x0}, + 276: {lang: 0x15d, script: 0x55, flags: 0x0}, + 277: {lang: 0x427, script: 0x55, flags: 0x0}, + 278: {lang: 0x365, script: 0x55, flags: 0x0}, + 280: {lang: 0x3be, script: 0x55, flags: 0x0}, + 282: {lang: 0x13d, script: 0x55, flags: 0x0}, + 284: {lang: 0x46, script: 0x2, flags: 0x1}, + 288: {lang: 0x15d, script: 0x55, flags: 0x0}, + 289: {lang: 0x15d, script: 0x55, flags: 0x0}, + 290: {lang: 0x48, script: 0x2, flags: 0x1}, + 291: {lang: 0x4a, script: 0x3, flags: 0x1}, + 292: {lang: 0x4d, script: 0x2, flags: 0x1}, + 293: {lang: 0x475, script: 0x55, flags: 0x0}, + 294: {lang: 0x3be, script: 0x55, flags: 0x0}, + 295: {lang: 0x474, script: 0x55, flags: 0x0}, + 296: {lang: 0x4f, script: 0x2, flags: 0x1}, + 297: {lang: 0x480, script: 0x55, flags: 0x0}, + 299: {lang: 0x51, script: 0x4, flags: 0x1}, + 301: {lang: 0x49e, script: 0x55, flags: 0x0}, + 302: {lang: 0x55, script: 0x2, flags: 0x1}, + 303: {lang: 0x443, script: 0x55, flags: 0x0}, + 304: {lang: 0x57, script: 0x3, flags: 0x1}, + 305: {lang: 0x443, script: 0x55, flags: 0x0}, + 309: {lang: 0x510, script: 0x3a, flags: 0x2}, + 310: {lang: 0x13d, script: 0x55, flags: 0x0}, + 311: {lang: 0x4ba, script: 0x55, flags: 0x0}, + 312: {lang: 0x1f7, script: 0x55, flags: 0x0}, + 315: {lang: 0x13d, script: 0x55, flags: 0x0}, + 318: {lang: 0x4c1, script: 0x55, flags: 0x0}, + 319: {lang: 0x8a, script: 0x55, flags: 0x0}, + 320: {lang: 0x15d, script: 0x55, flags: 0x0}, + 322: {lang: 0x419, script: 0x55, flags: 0x0}, + 333: {lang: 0x5a, script: 0x2, flags: 0x1}, + 350: {lang: 0x3a, script: 0x5, flags: 0x0}, + 351: {lang: 0x5c, script: 0x2, flags: 0x1}, + 356: {lang: 0x421, script: 0x55, flags: 0x0}, } // likelyRegionList holds lists info associated with likelyRegion. // Size: 376 bytes, 94 elements var likelyRegionList = [94]likelyLangScript{ 0: {lang: 0x147, script: 0x5, flags: 0x0}, - 1: {lang: 0x474, script: 0x52, flags: 0x0}, - 2: {lang: 0x42f, script: 0x52, flags: 0x0}, + 1: {lang: 0x474, script: 0x55, flags: 0x0}, + 2: {lang: 0x42f, script: 0x55, flags: 0x0}, 3: {lang: 0x2fd, script: 0x1e, flags: 0x0}, 4: {lang: 0x1d5, script: 0x8, flags: 0x0}, - 5: {lang: 0x272, script: 0x52, flags: 0x0}, - 6: {lang: 0xb7, script: 0x52, flags: 0x0}, + 5: {lang: 0x272, script: 0x55, flags: 0x0}, + 6: {lang: 0xb7, script: 0x55, flags: 0x0}, 7: {lang: 0x430, script: 0x1e, flags: 0x0}, - 8: {lang: 0x12c, script: 0xd6, flags: 0x0}, + 8: {lang: 0x12c, script: 0xdc, flags: 0x0}, 9: {lang: 0x34f, script: 0x20, flags: 0x0}, - 10: {lang: 0x527, script: 0x34, flags: 0x0}, + 10: {lang: 0x527, script: 0x37, flags: 0x0}, 11: {lang: 0x4aa, script: 0x5, flags: 0x0}, - 12: {lang: 0x51d, script: 0x35, flags: 0x0}, - 13: {lang: 0x521, script: 0x52, flags: 0x0}, - 14: {lang: 0x298, script: 0xd5, flags: 0x0}, - 15: {lang: 0x135, script: 0x2d, flags: 0x0}, - 16: {lang: 0x488, script: 0x52, flags: 0x0}, + 12: {lang: 0x51d, script: 0x38, flags: 0x0}, + 13: {lang: 0x521, script: 0x55, flags: 0x0}, + 14: {lang: 0x298, script: 0xdb, flags: 0x0}, + 15: {lang: 0x135, script: 0x30, flags: 0x0}, + 16: {lang: 0x488, script: 0x55, flags: 0x0}, 17: {lang: 0x3a, script: 0x5, flags: 0x0}, - 18: {lang: 0x15d, script: 0x52, flags: 0x0}, - 19: {lang: 0x27, script: 0x27, flags: 0x0}, - 20: {lang: 0x138, script: 0x52, flags: 0x0}, + 18: {lang: 0x15d, script: 0x55, flags: 0x0}, + 19: {lang: 0x27, script: 0x28, flags: 0x0}, + 20: {lang: 0x138, script: 0x55, flags: 0x0}, 21: {lang: 0x268, script: 0x5, flags: 0x2}, - 22: {lang: 0x510, script: 0x37, flags: 0x2}, - 23: {lang: 0x20e, script: 0x29, flags: 0x0}, + 22: {lang: 0x510, script: 0x3a, flags: 0x2}, + 23: {lang: 0x20e, script: 0x2a, flags: 0x0}, 24: {lang: 0x5, script: 0x1e, flags: 0x0}, - 25: {lang: 0x272, script: 0x52, flags: 0x0}, - 26: {lang: 0x135, script: 0x2d, flags: 0x0}, + 25: {lang: 0x272, script: 0x55, flags: 0x0}, + 26: {lang: 0x135, script: 0x30, flags: 0x0}, 27: {lang: 0x2fd, script: 0x1e, flags: 0x0}, - 28: {lang: 0x1df, script: 0x52, flags: 0x0}, + 28: {lang: 0x1df, script: 0x55, flags: 0x0}, 29: {lang: 0x31d, script: 0x5, flags: 0x0}, 30: {lang: 0x1bc, script: 0x20, flags: 0x0}, 31: {lang: 0x4b2, script: 0x5, flags: 0x0}, - 32: {lang: 0x234, script: 0x6b, flags: 0x0}, + 32: {lang: 0x234, script: 0x70, flags: 0x0}, 33: {lang: 0x147, script: 0x5, flags: 0x0}, - 34: {lang: 0x474, script: 0x52, flags: 0x0}, - 35: {lang: 0x248, script: 0x46, flags: 0x0}, + 34: {lang: 0x474, script: 0x55, flags: 0x0}, + 35: {lang: 0x248, script: 0x49, flags: 0x0}, 36: {lang: 0xe6, script: 0x5, flags: 0x0}, - 37: {lang: 0x224, script: 0xd5, flags: 0x0}, + 37: {lang: 0x224, script: 0xdb, flags: 0x0}, 38: {lang: 0x3a, script: 0x5, flags: 0x0}, - 39: {lang: 0x15d, script: 0x52, flags: 0x0}, - 40: {lang: 0x2b6, script: 0x4f, flags: 0x0}, - 41: {lang: 0x224, script: 0xd5, flags: 0x0}, + 39: {lang: 0x15d, script: 0x55, flags: 0x0}, + 40: {lang: 0x2b6, script: 0x52, flags: 0x0}, + 41: {lang: 0x224, script: 0xdb, flags: 0x0}, 42: {lang: 0x3a, script: 0x5, flags: 0x0}, - 43: {lang: 0x15d, script: 0x52, flags: 0x0}, - 44: {lang: 0x3da, script: 0x52, flags: 0x0}, + 43: {lang: 0x15d, script: 0x55, flags: 0x0}, + 44: {lang: 0x3da, script: 0x55, flags: 0x0}, 45: {lang: 0x4ac, script: 0x1e, flags: 0x0}, 46: {lang: 0x2fd, script: 0x1e, flags: 0x0}, - 47: {lang: 0x42f, script: 0x52, flags: 0x0}, - 48: {lang: 0x32f, script: 0x6b, flags: 0x0}, - 49: {lang: 0x211, script: 0x52, flags: 0x0}, + 47: {lang: 0x42f, script: 0x55, flags: 0x0}, + 48: {lang: 0x32f, script: 0x70, flags: 0x0}, + 49: {lang: 0x211, script: 0x55, flags: 0x0}, 50: {lang: 0x309, script: 0x1e, flags: 0x0}, 51: {lang: 0x240, script: 0x5, flags: 0x0}, - 52: {lang: 0x527, script: 0x35, flags: 0x0}, - 53: {lang: 0x3be, script: 0x52, flags: 0x0}, + 52: {lang: 0x527, script: 0x38, flags: 0x0}, + 53: {lang: 0x3be, script: 0x55, flags: 0x0}, 54: {lang: 0x3a, script: 0x5, flags: 0x0}, - 55: {lang: 0x15d, script: 0x52, flags: 0x0}, - 56: {lang: 0x2eb, script: 0x52, flags: 0x0}, + 55: {lang: 0x15d, script: 0x55, flags: 0x0}, + 56: {lang: 0x2eb, script: 0x55, flags: 0x0}, 57: {lang: 0x4b2, script: 0x5, flags: 0x0}, 58: {lang: 0x88, script: 0x20, flags: 0x0}, 59: {lang: 0x4b2, script: 0x5, flags: 0x0}, 60: {lang: 0x4b2, script: 0x5, flags: 0x0}, 61: {lang: 0xbe, script: 0x20, flags: 0x0}, - 62: {lang: 0x3da, script: 0x52, flags: 0x0}, + 62: {lang: 0x3da, script: 0x55, flags: 0x0}, 63: {lang: 0x7e, script: 0x1e, flags: 0x0}, 64: {lang: 0x3e0, script: 0x1e, flags: 0x0}, - 65: {lang: 0x265, script: 0x52, flags: 0x0}, - 66: {lang: 0x442, script: 0x52, flags: 0x0}, - 67: {lang: 0x510, script: 0x37, flags: 0x0}, - 68: {lang: 0x410, script: 0x52, flags: 0x0}, + 65: {lang: 0x265, script: 0x55, flags: 0x0}, + 66: {lang: 0x442, script: 0x55, flags: 0x0}, + 67: {lang: 0x510, script: 0x3a, flags: 0x0}, + 68: {lang: 0x410, script: 0x55, flags: 0x0}, 69: {lang: 0x4ac, script: 0x1e, flags: 0x0}, 70: {lang: 0x3a, script: 0x5, flags: 0x0}, - 71: {lang: 0x15d, script: 0x52, flags: 0x0}, - 72: {lang: 0x15d, script: 0x52, flags: 0x0}, + 71: {lang: 0x15d, script: 0x55, flags: 0x0}, + 72: {lang: 0x15d, script: 0x55, flags: 0x0}, 73: {lang: 0x35, script: 0x5, flags: 0x0}, - 74: {lang: 0x469, script: 0xd5, flags: 0x0}, + 74: {lang: 0x469, script: 0xdb, flags: 0x0}, 75: {lang: 0x2ea, script: 0x5, flags: 0x0}, - 76: {lang: 0x30d, script: 0x6b, flags: 0x0}, + 76: {lang: 0x30d, script: 0x70, flags: 0x0}, 77: {lang: 0x465, script: 0x1e, flags: 0x0}, 78: {lang: 0x147, script: 0x5, flags: 0x0}, 79: {lang: 0x3a, script: 0x5, flags: 0x0}, - 80: {lang: 0x15d, script: 0x52, flags: 0x0}, - 81: {lang: 0x488, script: 0x52, flags: 0x0}, + 80: {lang: 0x15d, script: 0x55, flags: 0x0}, + 81: {lang: 0x488, script: 0x55, flags: 0x0}, 82: {lang: 0x58, script: 0x5, flags: 0x0}, 83: {lang: 0x217, script: 0x1e, flags: 0x0}, - 84: {lang: 0x81, script: 0x2d, flags: 0x0}, - 85: {lang: 0x527, script: 0x35, flags: 0x0}, - 86: {lang: 0x48a, script: 0x52, flags: 0x0}, + 84: {lang: 0x81, script: 0x30, flags: 0x0}, + 85: {lang: 0x527, script: 0x38, flags: 0x0}, + 86: {lang: 0x48a, script: 0x55, flags: 0x0}, 87: {lang: 0x4ac, script: 0x1e, flags: 0x0}, - 88: {lang: 0x510, script: 0x37, flags: 0x0}, - 89: {lang: 0x3b1, script: 0x52, flags: 0x0}, - 90: {lang: 0x42f, script: 0x52, flags: 0x0}, + 88: {lang: 0x510, script: 0x3a, flags: 0x0}, + 89: {lang: 0x3b1, script: 0x55, flags: 0x0}, + 90: {lang: 0x42f, script: 0x55, flags: 0x0}, 91: {lang: 0x430, script: 0x1e, flags: 0x0}, - 92: {lang: 0x15d, script: 0x52, flags: 0x0}, + 92: {lang: 0x15d, script: 0x55, flags: 0x0}, 93: {lang: 0x444, script: 0x5, flags: 0x0}, } @@ -3234,94 +3245,101 @@ type likelyTag struct { script uint8 } -// Size: 192 bytes, 32 elements -var likelyRegionGroup = [32]likelyTag{ - 1: {lang: 0x138, region: 0xd5, script: 0x52}, - 2: {lang: 0x138, region: 0x134, script: 0x52}, - 3: {lang: 0x3be, region: 0x40, script: 0x52}, - 4: {lang: 0x138, region: 0x2e, script: 0x52}, - 5: {lang: 0x138, region: 0xd5, script: 0x52}, - 6: {lang: 0x13d, region: 0xce, script: 0x52}, - 7: {lang: 0x443, region: 0x12e, script: 0x52}, - 8: {lang: 0x3a, region: 0x6a, script: 0x5}, - 9: {lang: 0x443, region: 0x4a, script: 0x52}, - 10: {lang: 0x138, region: 0x160, script: 0x52}, - 11: {lang: 0x138, region: 0x134, script: 0x52}, - 12: {lang: 0x138, region: 0x134, script: 0x52}, - 13: {lang: 0x13d, region: 0x58, script: 0x52}, - 14: {lang: 0x527, region: 0x52, script: 0x34}, - 15: {lang: 0x1bc, region: 0x98, script: 0x20}, - 16: {lang: 0x1df, region: 0x94, script: 0x52}, - 17: {lang: 0x1f7, region: 0x9d, script: 0x52}, - 18: {lang: 0x138, region: 0x2e, script: 0x52}, - 19: {lang: 0x138, region: 0xe5, script: 0x52}, - 20: {lang: 0x138, region: 0x89, script: 0x52}, - 21: {lang: 0x419, region: 0x141, script: 0x52}, - 22: {lang: 0x527, region: 0x52, script: 0x34}, - 23: {lang: 0x4ba, region: 0x136, script: 0x52}, - 24: {lang: 0x3a, region: 0x107, script: 0x5}, - 25: {lang: 0x3e0, region: 0x105, script: 0x1e}, - 26: {lang: 0x3e0, region: 0x105, script: 0x1e}, - 27: {lang: 0x138, region: 0x7a, script: 0x52}, - 28: {lang: 0x10c, region: 0x5f, script: 0x52}, - 29: {lang: 0x13d, region: 0x1e, script: 0x52}, - 30: {lang: 0x138, region: 0x99, script: 0x52}, - 31: {lang: 0x138, region: 0x7a, script: 0x52}, +// Size: 198 bytes, 33 elements +var likelyRegionGroup = [33]likelyTag{ + 1: {lang: 0x138, region: 0xd6, script: 0x55}, + 2: {lang: 0x138, region: 0x135, script: 0x55}, + 3: {lang: 0x3be, region: 0x41, script: 0x55}, + 4: {lang: 0x138, region: 0x2f, script: 0x55}, + 5: {lang: 0x138, region: 0xd6, script: 0x55}, + 6: {lang: 0x13d, region: 0xcf, script: 0x55}, + 7: {lang: 0x443, region: 0x12f, script: 0x55}, + 8: {lang: 0x3a, region: 0x6b, script: 0x5}, + 9: {lang: 0x443, region: 0x4b, script: 0x55}, + 10: {lang: 0x138, region: 0x161, script: 0x55}, + 11: {lang: 0x138, region: 0x135, script: 0x55}, + 12: {lang: 0x138, region: 0x135, script: 0x55}, + 13: {lang: 0x13d, region: 0x59, script: 0x55}, + 14: {lang: 0x527, region: 0x53, script: 0x37}, + 15: {lang: 0x1bc, region: 0x99, script: 0x20}, + 16: {lang: 0x1df, region: 0x95, script: 0x55}, + 17: {lang: 0x1f7, region: 0x9e, script: 0x55}, + 18: {lang: 0x138, region: 0x2f, script: 0x55}, + 19: {lang: 0x138, region: 0xe6, script: 0x55}, + 20: {lang: 0x138, region: 0x8a, script: 0x55}, + 21: {lang: 0x419, region: 0x142, script: 0x55}, + 22: {lang: 0x527, region: 0x53, script: 0x37}, + 23: {lang: 0x4ba, region: 0x137, script: 0x55}, + 24: {lang: 0x3a, region: 0x108, script: 0x5}, + 25: {lang: 0x3e0, region: 0x106, script: 0x1e}, + 26: {lang: 0x3e0, region: 0x106, script: 0x1e}, + 27: {lang: 0x138, region: 0x7b, script: 0x55}, + 28: {lang: 0x10c, region: 0x60, script: 0x55}, + 30: {lang: 0x13d, region: 0x1f, script: 0x55}, + 31: {lang: 0x138, region: 0x9a, script: 0x55}, + 32: {lang: 0x138, region: 0x7b, script: 0x55}, } -// Size: 357 bytes, 357 elements -var regionToGroups = [357]uint8{ +// Size: 358 bytes, 358 elements +var regionToGroups = [358]uint8{ // Entry 0 - 3F 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x04, - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x04, 0x04, - // Entry 40 - 7F - 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, - 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x08, 0x00, - 0x04, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, - // Entry 80 - BF - 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, - 0x04, 0x01, 0x00, 0x04, 0x02, 0x00, 0x04, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, + 0x00, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x01, - // Entry C0 - FF - 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x04, - 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x04, + // Entry 40 - 7F + 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x04, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x08, + 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, + // Entry 80 - BF + 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, + 0x00, 0x04, 0x01, 0x00, 0x04, 0x02, 0x00, 0x04, + 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, + 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, + // Entry C0 - FF + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, + 0x04, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x04, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Entry 100 - 13F 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, - 0x00, 0x04, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x05, 0x04, 0x00, 0x00, - 0x04, 0x00, 0x04, 0x04, 0x05, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, + 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x04, 0x00, + 0x00, 0x04, 0x00, 0x04, 0x04, 0x05, 0x00, 0x00, // Entry 140 - 17F 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +} + +// Size: 18 bytes, 3 elements +var paradigmLocales = [3][3]uint16{ + 0: [3]uint16{0x138, 0x0, 0x7b}, + 1: [3]uint16{0x13d, 0x0, 0x1f}, + 2: [3]uint16{0x3be, 0x41, 0xee}, } type mutualIntelligibility struct { @@ -3349,8 +3367,8 @@ type regionIntelligibility struct { // matchLang holds pairs of langIDs of base languages that are typically // mutually intelligible. Each pair is associated with a confidence and // whether the intelligibility goes one or both ways. -// Size: 690 bytes, 115 elements -var matchLang = [115]mutualIntelligibility{ +// Size: 678 bytes, 113 elements +var matchLang = [113]mutualIntelligibility{ 0: {want: 0x1cf, have: 0xb7, distance: 0x4, oneway: false}, 1: {want: 0x405, have: 0xb7, distance: 0x4, oneway: false}, 2: {want: 0x405, have: 0x1cf, distance: 0x4, oneway: false}, @@ -3358,146 +3376,144 @@ var matchLang = [115]mutualIntelligibility{ 4: {want: 0x438, have: 0x1, distance: 0x4, oneway: false}, 5: {want: 0x1a1, have: 0x10c, distance: 0x4, oneway: true}, 6: {want: 0x293, have: 0x10c, distance: 0x4, oneway: true}, - 7: {want: 0x430, have: 0x1cf, distance: 0x5, oneway: false}, - 8: {want: 0x430, have: 0xb7, distance: 0x5, oneway: false}, - 9: {want: 0x100, have: 0x36d, distance: 0x8, oneway: false}, - 10: {want: 0x100, have: 0x345, distance: 0x8, oneway: false}, - 11: {want: 0x5, have: 0x3e0, distance: 0xa, oneway: true}, - 12: {want: 0xd, have: 0x138, distance: 0xa, oneway: true}, - 13: {want: 0x16, have: 0x365, distance: 0xa, oneway: true}, - 14: {want: 0x21, have: 0x138, distance: 0xa, oneway: true}, - 15: {want: 0x56, have: 0x13d, distance: 0xa, oneway: true}, - 16: {want: 0x58, have: 0x3e0, distance: 0xa, oneway: true}, - 17: {want: 0x71, have: 0x3e0, distance: 0xa, oneway: true}, - 18: {want: 0x75, have: 0x138, distance: 0xa, oneway: true}, - 19: {want: 0x82, have: 0x1bc, distance: 0xa, oneway: true}, - 20: {want: 0xa5, have: 0x138, distance: 0xa, oneway: true}, - 21: {want: 0xb2, have: 0x15d, distance: 0xa, oneway: true}, - 22: {want: 0xdd, have: 0x152, distance: 0xa, oneway: true}, - 23: {want: 0xe5, have: 0x138, distance: 0xa, oneway: true}, - 24: {want: 0xe9, have: 0x3a, distance: 0xa, oneway: true}, - 25: {want: 0xef, have: 0x15d, distance: 0xa, oneway: true}, - 26: {want: 0xf8, have: 0x15d, distance: 0xa, oneway: true}, - 27: {want: 0xff, have: 0x138, distance: 0xa, oneway: true}, - 28: {want: 0x12f, have: 0x138, distance: 0xa, oneway: true}, - 29: {want: 0x13b, have: 0x138, distance: 0xa, oneway: true}, - 30: {want: 0x13f, have: 0x150, distance: 0xa, oneway: true}, - 31: {want: 0x144, have: 0x13d, distance: 0xa, oneway: true}, - 32: {want: 0x157, have: 0x100, distance: 0xa, oneway: true}, - 33: {want: 0x16c, have: 0x365, distance: 0xa, oneway: true}, - 34: {want: 0x16d, have: 0x138, distance: 0xa, oneway: true}, - 35: {want: 0x16e, have: 0x138, distance: 0xa, oneway: true}, - 36: {want: 0x17c, have: 0x138, distance: 0xa, oneway: true}, - 37: {want: 0x18e, have: 0x13d, distance: 0xa, oneway: true}, - 38: {want: 0x192, have: 0x13d, distance: 0xa, oneway: true}, - 39: {want: 0x1a2, have: 0x1bc, distance: 0xa, oneway: true}, - 40: {want: 0x1b2, have: 0x138, distance: 0xa, oneway: true}, - 41: {want: 0x1b6, have: 0x138, distance: 0xa, oneway: true}, - 42: {want: 0x1d2, have: 0x15d, distance: 0xa, oneway: true}, - 43: {want: 0x1d5, have: 0x3e0, distance: 0xa, oneway: true}, - 44: {want: 0x1d7, have: 0x138, distance: 0xa, oneway: true}, - 45: {want: 0x1e5, have: 0x138, distance: 0xa, oneway: true}, - 46: {want: 0x1f6, have: 0x138, distance: 0xa, oneway: true}, - 47: {want: 0x20c, have: 0x1df, distance: 0xa, oneway: true}, - 48: {want: 0x20e, have: 0x138, distance: 0xa, oneway: true}, - 49: {want: 0x22b, have: 0x15d, distance: 0xa, oneway: true}, - 50: {want: 0x240, have: 0x3e0, distance: 0xa, oneway: true}, - 51: {want: 0x248, have: 0x138, distance: 0xa, oneway: true}, - 52: {want: 0x24f, have: 0x138, distance: 0xa, oneway: true}, - 53: {want: 0x263, have: 0x138, distance: 0xa, oneway: true}, - 54: {want: 0x272, have: 0x488, distance: 0xa, oneway: true}, - 55: {want: 0x288, have: 0x3e0, distance: 0xa, oneway: true}, - 56: {want: 0x28c, have: 0x1f7, distance: 0xa, oneway: true}, - 57: {want: 0x2a1, have: 0x138, distance: 0xa, oneway: true}, - 58: {want: 0x2b3, have: 0x15d, distance: 0xa, oneway: true}, - 59: {want: 0x2b6, have: 0x138, distance: 0xa, oneway: true}, - 60: {want: 0x2bc, have: 0x138, distance: 0xa, oneway: true}, - 61: {want: 0x2c1, have: 0x15d, distance: 0xa, oneway: true}, - 62: {want: 0x2eb, have: 0x138, distance: 0xa, oneway: true}, - 63: {want: 0x2ef, have: 0x15d, distance: 0xa, oneway: true}, - 64: {want: 0x2f8, have: 0x138, distance: 0xa, oneway: true}, - 65: {want: 0x2fd, have: 0x7e, distance: 0xa, oneway: true}, - 66: {want: 0x302, have: 0x138, distance: 0xa, oneway: true}, - 67: {want: 0x309, have: 0x3e0, distance: 0xa, oneway: true}, - 68: {want: 0x319, have: 0x1bc, distance: 0xa, oneway: true}, - 69: {want: 0x31d, have: 0x1df, distance: 0xa, oneway: true}, - 70: {want: 0x31e, have: 0x138, distance: 0xa, oneway: true}, - 71: {want: 0x32f, have: 0x138, distance: 0xa, oneway: true}, - 72: {want: 0x34f, have: 0x138, distance: 0xa, oneway: true}, - 73: {want: 0x368, have: 0x345, distance: 0xa, oneway: false}, - 74: {want: 0x368, have: 0x36d, distance: 0xa, oneway: true}, - 75: {want: 0x378, have: 0x138, distance: 0xa, oneway: true}, - 76: {want: 0x385, have: 0x138, distance: 0xa, oneway: true}, - 77: {want: 0x387, have: 0x138, distance: 0xa, oneway: true}, - 78: {want: 0x389, have: 0x15d, distance: 0xa, oneway: true}, - 79: {want: 0x38e, have: 0x138, distance: 0xa, oneway: true}, - 80: {want: 0x393, have: 0x138, distance: 0xa, oneway: true}, - 81: {want: 0x39b, have: 0x138, distance: 0xa, oneway: true}, - 82: {want: 0x3a3, have: 0x138, distance: 0xa, oneway: true}, - 83: {want: 0x3bc, have: 0x138, distance: 0xa, oneway: true}, - 84: {want: 0x3c2, have: 0x13d, distance: 0xa, oneway: true}, - 85: {want: 0x3d2, have: 0x10c, distance: 0xa, oneway: true}, - 86: {want: 0x3d7, have: 0x138, distance: 0xa, oneway: true}, - 87: {want: 0x3e3, have: 0x15d, distance: 0xa, oneway: true}, - 88: {want: 0x3e7, have: 0x1bc, distance: 0xa, oneway: true}, - 89: {want: 0x3f8, have: 0x138, distance: 0xa, oneway: true}, - 90: {want: 0x40a, have: 0x138, distance: 0xa, oneway: true}, - 91: {want: 0x421, have: 0x138, distance: 0xa, oneway: true}, - 92: {want: 0x427, have: 0x138, distance: 0xa, oneway: true}, - 93: {want: 0x42f, have: 0x138, distance: 0xa, oneway: true}, - 94: {want: 0x439, have: 0x138, distance: 0xa, oneway: true}, - 95: {want: 0x43c, have: 0x1df, distance: 0xa, oneway: true}, - 96: {want: 0x443, have: 0x138, distance: 0xa, oneway: true}, - 97: {want: 0x44e, have: 0x138, distance: 0xa, oneway: true}, - 98: {want: 0x45f, have: 0x138, distance: 0xa, oneway: true}, - 99: {want: 0x465, have: 0x3e0, distance: 0xa, oneway: true}, - 100: {want: 0x46d, have: 0x138, distance: 0xa, oneway: true}, - 101: {want: 0x474, have: 0x3e0, distance: 0xa, oneway: true}, - 102: {want: 0x3880, have: 0x138, distance: 0xa, oneway: true}, - 103: {want: 0x47e, have: 0x138, distance: 0xa, oneway: true}, - 104: {want: 0x480, have: 0x138, distance: 0xa, oneway: true}, - 105: {want: 0x492, have: 0x3e0, distance: 0xa, oneway: true}, - 106: {want: 0x49b, have: 0x138, distance: 0xa, oneway: true}, - 107: {want: 0x4aa, have: 0x527, distance: 0xa, oneway: true}, - 108: {want: 0x4b2, have: 0x138, distance: 0xa, oneway: true}, - 109: {want: 0x4ba, have: 0x3e0, distance: 0xa, oneway: true}, - 110: {want: 0x4e3, have: 0x15d, distance: 0xa, oneway: true}, - 111: {want: 0x4f0, have: 0x138, distance: 0xa, oneway: true}, - 112: {want: 0x510, have: 0x138, distance: 0xa, oneway: true}, - 113: {want: 0x516, have: 0x138, distance: 0xa, oneway: true}, - 114: {want: 0x52c, have: 0x138, distance: 0xa, oneway: true}, + 7: {want: 0x100, have: 0x36d, distance: 0x8, oneway: false}, + 8: {want: 0x100, have: 0x345, distance: 0x8, oneway: false}, + 9: {want: 0x5, have: 0x3e0, distance: 0xa, oneway: true}, + 10: {want: 0xd, have: 0x138, distance: 0xa, oneway: true}, + 11: {want: 0x16, have: 0x365, distance: 0xa, oneway: true}, + 12: {want: 0x21, have: 0x138, distance: 0xa, oneway: true}, + 13: {want: 0x56, have: 0x13d, distance: 0xa, oneway: true}, + 14: {want: 0x58, have: 0x3e0, distance: 0xa, oneway: true}, + 15: {want: 0x71, have: 0x3e0, distance: 0xa, oneway: true}, + 16: {want: 0x75, have: 0x138, distance: 0xa, oneway: true}, + 17: {want: 0x82, have: 0x1bc, distance: 0xa, oneway: true}, + 18: {want: 0xa5, have: 0x138, distance: 0xa, oneway: true}, + 19: {want: 0xb2, have: 0x15d, distance: 0xa, oneway: true}, + 20: {want: 0xdd, have: 0x152, distance: 0xa, oneway: true}, + 21: {want: 0xe5, have: 0x138, distance: 0xa, oneway: true}, + 22: {want: 0xe9, have: 0x3a, distance: 0xa, oneway: true}, + 23: {want: 0xef, have: 0x15d, distance: 0xa, oneway: true}, + 24: {want: 0xf8, have: 0x15d, distance: 0xa, oneway: true}, + 25: {want: 0xff, have: 0x138, distance: 0xa, oneway: true}, + 26: {want: 0x12f, have: 0x138, distance: 0xa, oneway: true}, + 27: {want: 0x13b, have: 0x138, distance: 0xa, oneway: true}, + 28: {want: 0x13f, have: 0x150, distance: 0xa, oneway: true}, + 29: {want: 0x144, have: 0x13d, distance: 0xa, oneway: true}, + 30: {want: 0x157, have: 0x100, distance: 0xa, oneway: true}, + 31: {want: 0x16c, have: 0x365, distance: 0xa, oneway: true}, + 32: {want: 0x16d, have: 0x138, distance: 0xa, oneway: true}, + 33: {want: 0x16e, have: 0x138, distance: 0xa, oneway: true}, + 34: {want: 0x17c, have: 0x138, distance: 0xa, oneway: true}, + 35: {want: 0x18e, have: 0x13d, distance: 0xa, oneway: true}, + 36: {want: 0x192, have: 0x13d, distance: 0xa, oneway: true}, + 37: {want: 0x1a2, have: 0x1bc, distance: 0xa, oneway: true}, + 38: {want: 0x1b2, have: 0x138, distance: 0xa, oneway: true}, + 39: {want: 0x1b6, have: 0x138, distance: 0xa, oneway: true}, + 40: {want: 0x1d2, have: 0x15d, distance: 0xa, oneway: true}, + 41: {want: 0x1d5, have: 0x3e0, distance: 0xa, oneway: true}, + 42: {want: 0x1d7, have: 0x138, distance: 0xa, oneway: true}, + 43: {want: 0x1e5, have: 0x138, distance: 0xa, oneway: true}, + 44: {want: 0x1f6, have: 0x138, distance: 0xa, oneway: true}, + 45: {want: 0x20c, have: 0x1df, distance: 0xa, oneway: true}, + 46: {want: 0x20e, have: 0x138, distance: 0xa, oneway: true}, + 47: {want: 0x22b, have: 0x15d, distance: 0xa, oneway: true}, + 48: {want: 0x240, have: 0x3e0, distance: 0xa, oneway: true}, + 49: {want: 0x248, have: 0x138, distance: 0xa, oneway: true}, + 50: {want: 0x24f, have: 0x138, distance: 0xa, oneway: true}, + 51: {want: 0x263, have: 0x138, distance: 0xa, oneway: true}, + 52: {want: 0x272, have: 0x488, distance: 0xa, oneway: true}, + 53: {want: 0x288, have: 0x3e0, distance: 0xa, oneway: true}, + 54: {want: 0x28c, have: 0x1f7, distance: 0xa, oneway: true}, + 55: {want: 0x2a1, have: 0x138, distance: 0xa, oneway: true}, + 56: {want: 0x2b3, have: 0x15d, distance: 0xa, oneway: true}, + 57: {want: 0x2b6, have: 0x138, distance: 0xa, oneway: true}, + 58: {want: 0x2bc, have: 0x138, distance: 0xa, oneway: true}, + 59: {want: 0x2c1, have: 0x15d, distance: 0xa, oneway: true}, + 60: {want: 0x2eb, have: 0x138, distance: 0xa, oneway: true}, + 61: {want: 0x2ef, have: 0x15d, distance: 0xa, oneway: true}, + 62: {want: 0x2f8, have: 0x138, distance: 0xa, oneway: true}, + 63: {want: 0x2fd, have: 0x7e, distance: 0xa, oneway: true}, + 64: {want: 0x302, have: 0x138, distance: 0xa, oneway: true}, + 65: {want: 0x309, have: 0x3e0, distance: 0xa, oneway: true}, + 66: {want: 0x319, have: 0x1bc, distance: 0xa, oneway: true}, + 67: {want: 0x31d, have: 0x1df, distance: 0xa, oneway: true}, + 68: {want: 0x31e, have: 0x138, distance: 0xa, oneway: true}, + 69: {want: 0x32f, have: 0x138, distance: 0xa, oneway: true}, + 70: {want: 0x34f, have: 0x138, distance: 0xa, oneway: true}, + 71: {want: 0x368, have: 0x345, distance: 0xa, oneway: false}, + 72: {want: 0x368, have: 0x36d, distance: 0xa, oneway: true}, + 73: {want: 0x378, have: 0x138, distance: 0xa, oneway: true}, + 74: {want: 0x385, have: 0x138, distance: 0xa, oneway: true}, + 75: {want: 0x387, have: 0x138, distance: 0xa, oneway: true}, + 76: {want: 0x389, have: 0x15d, distance: 0xa, oneway: true}, + 77: {want: 0x38e, have: 0x138, distance: 0xa, oneway: true}, + 78: {want: 0x393, have: 0x138, distance: 0xa, oneway: true}, + 79: {want: 0x39b, have: 0x138, distance: 0xa, oneway: true}, + 80: {want: 0x3a3, have: 0x138, distance: 0xa, oneway: true}, + 81: {want: 0x3bc, have: 0x138, distance: 0xa, oneway: true}, + 82: {want: 0x3c2, have: 0x13d, distance: 0xa, oneway: true}, + 83: {want: 0x3d2, have: 0x10c, distance: 0xa, oneway: true}, + 84: {want: 0x3d7, have: 0x138, distance: 0xa, oneway: true}, + 85: {want: 0x3e3, have: 0x15d, distance: 0xa, oneway: true}, + 86: {want: 0x3e7, have: 0x1bc, distance: 0xa, oneway: true}, + 87: {want: 0x3f8, have: 0x138, distance: 0xa, oneway: true}, + 88: {want: 0x40a, have: 0x138, distance: 0xa, oneway: true}, + 89: {want: 0x421, have: 0x138, distance: 0xa, oneway: true}, + 90: {want: 0x427, have: 0x138, distance: 0xa, oneway: true}, + 91: {want: 0x42f, have: 0x138, distance: 0xa, oneway: true}, + 92: {want: 0x439, have: 0x138, distance: 0xa, oneway: true}, + 93: {want: 0x43c, have: 0x1df, distance: 0xa, oneway: true}, + 94: {want: 0x443, have: 0x138, distance: 0xa, oneway: true}, + 95: {want: 0x44e, have: 0x138, distance: 0xa, oneway: true}, + 96: {want: 0x45f, have: 0x138, distance: 0xa, oneway: true}, + 97: {want: 0x465, have: 0x3e0, distance: 0xa, oneway: true}, + 98: {want: 0x46d, have: 0x138, distance: 0xa, oneway: true}, + 99: {want: 0x474, have: 0x3e0, distance: 0xa, oneway: true}, + 100: {want: 0x3880, have: 0x138, distance: 0xa, oneway: true}, + 101: {want: 0x47e, have: 0x138, distance: 0xa, oneway: true}, + 102: {want: 0x480, have: 0x138, distance: 0xa, oneway: true}, + 103: {want: 0x492, have: 0x3e0, distance: 0xa, oneway: true}, + 104: {want: 0x49b, have: 0x138, distance: 0xa, oneway: true}, + 105: {want: 0x4aa, have: 0x527, distance: 0xa, oneway: true}, + 106: {want: 0x4b2, have: 0x138, distance: 0xa, oneway: true}, + 107: {want: 0x4ba, have: 0x3e0, distance: 0xa, oneway: true}, + 108: {want: 0x4e3, have: 0x15d, distance: 0xa, oneway: true}, + 109: {want: 0x4f0, have: 0x138, distance: 0xa, oneway: true}, + 110: {want: 0x510, have: 0x138, distance: 0xa, oneway: true}, + 111: {want: 0x516, have: 0x138, distance: 0xa, oneway: true}, + 112: {want: 0x52c, have: 0x138, distance: 0xa, oneway: true}, } // matchScript holds pairs of scriptIDs where readers of one script // can typically also read the other. Each is associated with a confidence. // Size: 208 bytes, 26 elements var matchScript = [26]scriptIntelligibility{ - 0: {wantLang: 0x430, haveLang: 0x430, wantScript: 0x52, haveScript: 0x1e, distance: 0x5}, - 1: {wantLang: 0x430, haveLang: 0x430, wantScript: 0x1e, haveScript: 0x52, distance: 0x5}, - 2: {wantLang: 0x58, haveLang: 0x3e0, wantScript: 0x52, haveScript: 0x1e, distance: 0xa}, - 3: {wantLang: 0xa5, haveLang: 0x138, wantScript: 0xe, haveScript: 0x52, distance: 0xa}, + 0: {wantLang: 0x430, haveLang: 0x430, wantScript: 0x55, haveScript: 0x1e, distance: 0x5}, + 1: {wantLang: 0x430, haveLang: 0x430, wantScript: 0x1e, haveScript: 0x55, distance: 0x5}, + 2: {wantLang: 0x58, haveLang: 0x3e0, wantScript: 0x55, haveScript: 0x1e, distance: 0xa}, + 3: {wantLang: 0xa5, haveLang: 0x138, wantScript: 0xe, haveScript: 0x55, distance: 0xa}, 4: {wantLang: 0x1d5, haveLang: 0x3e0, wantScript: 0x8, haveScript: 0x1e, distance: 0xa}, - 5: {wantLang: 0x20e, haveLang: 0x138, wantScript: 0x29, haveScript: 0x52, distance: 0xa}, - 6: {wantLang: 0x248, haveLang: 0x138, wantScript: 0x46, haveScript: 0x52, distance: 0xa}, - 7: {wantLang: 0x24f, haveLang: 0x138, wantScript: 0x4a, haveScript: 0x52, distance: 0xa}, - 8: {wantLang: 0x2b6, haveLang: 0x138, wantScript: 0x4f, haveScript: 0x52, distance: 0xa}, - 9: {wantLang: 0x302, haveLang: 0x138, wantScript: 0x64, haveScript: 0x52, distance: 0xa}, - 10: {wantLang: 0x32f, haveLang: 0x138, wantScript: 0x6b, haveScript: 0x52, distance: 0xa}, - 11: {wantLang: 0x34f, haveLang: 0x138, wantScript: 0x20, haveScript: 0x52, distance: 0xa}, - 12: {wantLang: 0x393, haveLang: 0x138, wantScript: 0x75, haveScript: 0x52, distance: 0xa}, - 13: {wantLang: 0x39b, haveLang: 0x138, wantScript: 0x2f, haveScript: 0x52, distance: 0xa}, - 14: {wantLang: 0x3bc, haveLang: 0x138, wantScript: 0x5, haveScript: 0x52, distance: 0xa}, - 15: {wantLang: 0x3f8, haveLang: 0x138, wantScript: 0x5, haveScript: 0x52, distance: 0xa}, - 16: {wantLang: 0x40a, haveLang: 0x138, wantScript: 0xc1, haveScript: 0x52, distance: 0xa}, - 17: {wantLang: 0x44e, haveLang: 0x138, wantScript: 0xcd, haveScript: 0x52, distance: 0xa}, - 18: {wantLang: 0x45f, haveLang: 0x138, wantScript: 0xd0, haveScript: 0x52, distance: 0xa}, - 19: {wantLang: 0x46d, haveLang: 0x138, wantScript: 0x27, haveScript: 0x52, distance: 0xa}, - 20: {wantLang: 0x474, haveLang: 0x3e0, wantScript: 0x52, haveScript: 0x1e, distance: 0xa}, - 21: {wantLang: 0x4b2, haveLang: 0x138, wantScript: 0x5, haveScript: 0x52, distance: 0xa}, - 22: {wantLang: 0x4ba, haveLang: 0x3e0, wantScript: 0x52, haveScript: 0x1e, distance: 0xa}, - 23: {wantLang: 0x510, haveLang: 0x138, wantScript: 0x37, haveScript: 0x52, distance: 0xa}, - 24: {wantLang: 0x527, haveLang: 0x527, wantScript: 0x34, haveScript: 0x35, distance: 0xf}, - 25: {wantLang: 0x527, haveLang: 0x527, wantScript: 0x35, haveScript: 0x34, distance: 0x13}, + 5: {wantLang: 0x20e, haveLang: 0x138, wantScript: 0x2a, haveScript: 0x55, distance: 0xa}, + 6: {wantLang: 0x248, haveLang: 0x138, wantScript: 0x49, haveScript: 0x55, distance: 0xa}, + 7: {wantLang: 0x24f, haveLang: 0x138, wantScript: 0x4d, haveScript: 0x55, distance: 0xa}, + 8: {wantLang: 0x2b6, haveLang: 0x138, wantScript: 0x52, haveScript: 0x55, distance: 0xa}, + 9: {wantLang: 0x302, haveLang: 0x138, wantScript: 0x69, haveScript: 0x55, distance: 0xa}, + 10: {wantLang: 0x32f, haveLang: 0x138, wantScript: 0x70, haveScript: 0x55, distance: 0xa}, + 11: {wantLang: 0x34f, haveLang: 0x138, wantScript: 0x20, haveScript: 0x55, distance: 0xa}, + 12: {wantLang: 0x393, haveLang: 0x138, wantScript: 0x7a, haveScript: 0x55, distance: 0xa}, + 13: {wantLang: 0x39b, haveLang: 0x138, wantScript: 0x32, haveScript: 0x55, distance: 0xa}, + 14: {wantLang: 0x3bc, haveLang: 0x138, wantScript: 0x5, haveScript: 0x55, distance: 0xa}, + 15: {wantLang: 0x3f8, haveLang: 0x138, wantScript: 0x5, haveScript: 0x55, distance: 0xa}, + 16: {wantLang: 0x40a, haveLang: 0x138, wantScript: 0xc6, haveScript: 0x55, distance: 0xa}, + 17: {wantLang: 0x44e, haveLang: 0x138, wantScript: 0xd3, haveScript: 0x55, distance: 0xa}, + 18: {wantLang: 0x45f, haveLang: 0x138, wantScript: 0xd6, haveScript: 0x55, distance: 0xa}, + 19: {wantLang: 0x46d, haveLang: 0x138, wantScript: 0x28, haveScript: 0x55, distance: 0xa}, + 20: {wantLang: 0x474, haveLang: 0x3e0, wantScript: 0x55, haveScript: 0x1e, distance: 0xa}, + 21: {wantLang: 0x4b2, haveLang: 0x138, wantScript: 0x5, haveScript: 0x55, distance: 0xa}, + 22: {wantLang: 0x4ba, haveLang: 0x3e0, wantScript: 0x55, haveScript: 0x1e, distance: 0xa}, + 23: {wantLang: 0x510, haveLang: 0x138, wantScript: 0x3a, haveScript: 0x55, distance: 0xa}, + 24: {wantLang: 0x527, haveLang: 0x527, wantScript: 0x37, haveScript: 0x38, distance: 0xf}, + 25: {wantLang: 0x527, haveLang: 0x527, wantScript: 0x38, haveScript: 0x37, distance: 0x13}, } // Size: 90 bytes, 15 elements @@ -3510,128 +3526,133 @@ var matchRegion = [15]regionIntelligibility{ 5: {lang: 0x13d, script: 0x0, group: 0x83, distance: 0x4}, 6: {lang: 0x3be, script: 0x0, group: 0x3, distance: 0x4}, 7: {lang: 0x3be, script: 0x0, group: 0x83, distance: 0x4}, - 8: {lang: 0x527, script: 0x35, group: 0x2, distance: 0x4}, - 9: {lang: 0x527, script: 0x35, group: 0x82, distance: 0x4}, + 8: {lang: 0x527, script: 0x38, group: 0x2, distance: 0x4}, + 9: {lang: 0x527, script: 0x38, group: 0x82, distance: 0x4}, 10: {lang: 0x3a, script: 0x0, group: 0x80, distance: 0x5}, 11: {lang: 0x138, script: 0x0, group: 0x80, distance: 0x5}, 12: {lang: 0x13d, script: 0x0, group: 0x80, distance: 0x5}, 13: {lang: 0x3be, script: 0x0, group: 0x80, distance: 0x5}, - 14: {lang: 0x527, script: 0x35, group: 0x80, distance: 0x5}, + 14: {lang: 0x527, script: 0x38, group: 0x80, distance: 0x5}, } -// Size: 128 bytes, 32 elements -var regionContainment = [32]uint32{ - 0xffffffff, 0x000007a2, 0x00003044, 0x00000008, - 0x403c0010, 0x00000020, 0x00000040, 0x00000080, - 0x00000100, 0x00000200, 0x00000400, 0x2000384c, - 0x00001000, 0x00002000, 0x00004000, 0x00008000, - 0x00010000, 0x00020000, 0x00040000, 0x00080000, - 0x00100000, 0x00200000, 0x01c1c000, 0x00800000, - 0x01000000, 0x1e020000, 0x04000000, 0x08000000, - 0x10000000, 0x20002048, 0x40000000, 0x80000000, +// Size: 264 bytes, 33 elements +var regionContainment = [33]uint64{ + // Entry 0 - 1F + 0x00000001dfffffff, 0x00000000000007a2, 0x0000000000003044, 0x0000000000000008, + 0x00000000803c0010, 0x0000000000000020, 0x0000000000000040, 0x0000000000000080, + 0x0000000000000100, 0x0000000000000200, 0x0000000000000400, 0x000000004000384c, + 0x0000000000001000, 0x0000000000002000, 0x0000000000004000, 0x0000000000008000, + 0x0000000000010000, 0x0000000000020000, 0x0000000000040000, 0x0000000000080000, + 0x0000000000100000, 0x0000000000200000, 0x0000000001c1c000, 0x0000000000800000, + 0x0000000001000000, 0x000000001e020000, 0x0000000004000000, 0x0000000008000000, + 0x0000000010000000, 0x0000000020000000, 0x0000000040002048, 0x0000000080000000, + // Entry 20 - 3F + 0x0000000100000000, } // regionInclusion maps region identifiers to sets of regions in regionInclusionBits, // where each set holds all groupings that are directly connected in a region // containment graph. -// Size: 357 bytes, 357 elements -var regionInclusion = [357]uint8{ +// Size: 358 bytes, 358 elements +var regionInclusion = [358]uint8{ // Entry 0 - 3F 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, - 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x20, - 0x21, 0x22, 0x23, 0x24, 0x25, 0x25, 0x22, 0x23, - 0x25, 0x26, 0x21, 0x27, 0x28, 0x29, 0x2a, 0x25, - 0x2b, 0x23, 0x22, 0x25, 0x24, 0x29, 0x2c, 0x2d, - 0x23, 0x2e, 0x2c, 0x25, 0x2f, 0x30, 0x27, 0x25, + 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, + 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x26, 0x23, + 0x24, 0x26, 0x27, 0x22, 0x28, 0x29, 0x2a, 0x2b, + 0x26, 0x2c, 0x24, 0x23, 0x26, 0x25, 0x2a, 0x2d, + 0x2e, 0x24, 0x2f, 0x2d, 0x26, 0x30, 0x31, 0x28, // Entry 40 - 7F - 0x27, 0x25, 0x24, 0x30, 0x21, 0x31, 0x32, 0x33, - 0x2f, 0x21, 0x26, 0x26, 0x26, 0x34, 0x2c, 0x28, - 0x27, 0x26, 0x35, 0x27, 0x21, 0x33, 0x22, 0x20, - 0x25, 0x2c, 0x25, 0x21, 0x36, 0x2d, 0x34, 0x29, - 0x21, 0x2e, 0x37, 0x25, 0x25, 0x20, 0x38, 0x38, - 0x27, 0x37, 0x38, 0x38, 0x2e, 0x39, 0x2e, 0x1f, - 0x20, 0x37, 0x3a, 0x27, 0x3b, 0x2b, 0x20, 0x29, - 0x34, 0x26, 0x37, 0x25, 0x23, 0x27, 0x2b, 0x2c, + 0x26, 0x28, 0x26, 0x25, 0x31, 0x22, 0x32, 0x33, + 0x34, 0x30, 0x22, 0x27, 0x27, 0x27, 0x35, 0x2d, + 0x29, 0x28, 0x27, 0x36, 0x28, 0x22, 0x34, 0x23, + 0x21, 0x26, 0x2d, 0x26, 0x22, 0x37, 0x2e, 0x35, + 0x2a, 0x22, 0x2f, 0x38, 0x26, 0x26, 0x21, 0x39, + 0x39, 0x28, 0x38, 0x39, 0x39, 0x2f, 0x3a, 0x2f, + 0x20, 0x21, 0x38, 0x3b, 0x28, 0x3c, 0x2c, 0x21, + 0x2a, 0x35, 0x27, 0x38, 0x26, 0x24, 0x28, 0x2c, // Entry 80 - BF - 0x22, 0x2f, 0x2c, 0x2c, 0x25, 0x26, 0x39, 0x21, - 0x33, 0x3b, 0x2c, 0x27, 0x35, 0x21, 0x33, 0x39, - 0x25, 0x2d, 0x20, 0x38, 0x30, 0x37, 0x23, 0x2b, - 0x24, 0x21, 0x23, 0x24, 0x2b, 0x39, 0x2b, 0x25, - 0x23, 0x35, 0x20, 0x2e, 0x3c, 0x30, 0x3b, 0x2e, - 0x25, 0x35, 0x35, 0x23, 0x25, 0x3c, 0x30, 0x23, - 0x25, 0x34, 0x24, 0x2c, 0x31, 0x37, 0x29, 0x37, - 0x38, 0x38, 0x34, 0x32, 0x22, 0x25, 0x2e, 0x3b, + 0x2d, 0x23, 0x30, 0x2d, 0x2d, 0x26, 0x27, 0x3a, + 0x22, 0x34, 0x3c, 0x2d, 0x28, 0x36, 0x22, 0x34, + 0x3a, 0x26, 0x2e, 0x21, 0x39, 0x31, 0x38, 0x24, + 0x2c, 0x25, 0x22, 0x24, 0x25, 0x2c, 0x3a, 0x2c, + 0x26, 0x24, 0x36, 0x21, 0x2f, 0x3d, 0x31, 0x3c, + 0x2f, 0x26, 0x36, 0x36, 0x24, 0x26, 0x3d, 0x31, + 0x24, 0x26, 0x35, 0x25, 0x2d, 0x32, 0x38, 0x2a, + 0x38, 0x39, 0x39, 0x35, 0x33, 0x23, 0x26, 0x2f, // Entry C0 - FF - 0x20, 0x22, 0x2c, 0x30, 0x35, 0x35, 0x3b, 0x25, - 0x2c, 0x25, 0x39, 0x2e, 0x24, 0x2e, 0x33, 0x30, - 0x2e, 0x31, 0x3a, 0x2c, 0x2a, 0x2c, 0x20, 0x33, - 0x29, 0x2b, 0x24, 0x20, 0x3b, 0x23, 0x28, 0x2a, - 0x23, 0x33, 0x20, 0x27, 0x28, 0x3a, 0x30, 0x24, - 0x2d, 0x2f, 0x28, 0x25, 0x23, 0x39, 0x20, 0x3b, - 0x27, 0x20, 0x23, 0x20, 0x20, 0x1e, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x3c, 0x21, 0x23, 0x2d, 0x31, 0x36, 0x36, 0x3c, + 0x26, 0x2d, 0x26, 0x3a, 0x2f, 0x25, 0x2f, 0x34, + 0x31, 0x2f, 0x32, 0x3b, 0x2d, 0x2b, 0x2d, 0x21, + 0x34, 0x2a, 0x2c, 0x25, 0x21, 0x3c, 0x24, 0x29, + 0x2b, 0x24, 0x34, 0x21, 0x28, 0x29, 0x3b, 0x31, + 0x25, 0x2e, 0x30, 0x29, 0x26, 0x24, 0x3a, 0x21, + 0x3c, 0x28, 0x21, 0x24, 0x21, 0x21, 0x1f, 0x21, + 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, // Entry 100 - 13F - 0x20, 0x2e, 0x20, 0x2d, 0x22, 0x32, 0x2e, 0x23, - 0x3a, 0x2e, 0x38, 0x37, 0x30, 0x2c, 0x39, 0x2b, - 0x2d, 0x2c, 0x22, 0x2c, 0x2e, 0x27, 0x2e, 0x26, - 0x32, 0x33, 0x25, 0x23, 0x31, 0x21, 0x25, 0x26, - 0x21, 0x2c, 0x30, 0x3c, 0x28, 0x30, 0x3c, 0x38, - 0x28, 0x30, 0x23, 0x25, 0x28, 0x35, 0x2e, 0x32, - 0x2e, 0x20, 0x21, 0x20, 0x2f, 0x27, 0x3c, 0x22, - 0x25, 0x20, 0x27, 0x25, 0x25, 0x30, 0x3a, 0x28, + 0x21, 0x21, 0x2f, 0x21, 0x2e, 0x23, 0x33, 0x2f, + 0x24, 0x3b, 0x2f, 0x39, 0x38, 0x31, 0x2d, 0x3a, + 0x2c, 0x2e, 0x2d, 0x23, 0x2d, 0x2f, 0x28, 0x2f, + 0x27, 0x33, 0x34, 0x26, 0x24, 0x32, 0x22, 0x26, + 0x27, 0x22, 0x2d, 0x31, 0x3d, 0x29, 0x31, 0x3d, + 0x39, 0x29, 0x31, 0x24, 0x26, 0x29, 0x36, 0x2f, + 0x33, 0x2f, 0x21, 0x22, 0x21, 0x30, 0x28, 0x3d, + 0x23, 0x26, 0x21, 0x28, 0x26, 0x26, 0x31, 0x3b, // Entry 140 - 17F - 0x20, 0x28, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x22, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x23, 0x23, 0x2e, 0x22, - 0x31, 0x2e, 0x26, 0x2e, 0x20, + 0x29, 0x21, 0x29, 0x21, 0x21, 0x21, 0x21, 0x21, + 0x21, 0x21, 0x21, 0x21, 0x21, 0x23, 0x21, 0x21, + 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, + 0x21, 0x21, 0x21, 0x21, 0x21, 0x24, 0x24, 0x2f, + 0x23, 0x32, 0x2f, 0x27, 0x2f, 0x21, } // regionInclusionBits is an array of bit vectors where every vector represents // a set of region groupings. These sets are used to compute the distance // between two regions for the purpose of language matching. -// Size: 288 bytes, 72 elements -var regionInclusionBits = [72]uint32{ +// Size: 584 bytes, 73 elements +var regionInclusionBits = [73]uint64{ // Entry 0 - 1F - 0x82400813, 0x000007a3, 0x00003844, 0x20000808, - 0x403c0011, 0x00000022, 0x20000844, 0x00000082, - 0x00000102, 0x00000202, 0x00000402, 0x2000384d, - 0x00001804, 0x20002804, 0x00404000, 0x00408000, - 0x00410000, 0x02020000, 0x00040010, 0x00080010, - 0x00100010, 0x00200010, 0x01c1c001, 0x00c00000, - 0x01400000, 0x1e020001, 0x06000000, 0x0a000000, - 0x12000000, 0x20002848, 0x40000010, 0x80000001, + 0x0000000102400813, 0x00000000000007a3, 0x0000000000003844, 0x0000000040000808, + 0x00000000803c0011, 0x0000000000000022, 0x0000000040000844, 0x0000000000000082, + 0x0000000000000102, 0x0000000000000202, 0x0000000000000402, 0x000000004000384d, + 0x0000000000001804, 0x0000000040002804, 0x0000000000404000, 0x0000000000408000, + 0x0000000000410000, 0x0000000002020000, 0x0000000000040010, 0x0000000000080010, + 0x0000000000100010, 0x0000000000200010, 0x0000000001c1c001, 0x0000000000c00000, + 0x0000000001400000, 0x000000001e020001, 0x0000000006000000, 0x000000000a000000, + 0x0000000012000000, 0x0000000020000000, 0x0000000040002848, 0x0000000080000010, // Entry 20 - 3F - 0x00000001, 0x40000000, 0x00020000, 0x01000000, - 0x00008000, 0x00002000, 0x00000200, 0x00000008, - 0x00200000, 0x90000000, 0x00040000, 0x08000000, - 0x00000020, 0x84000000, 0x00000080, 0x00001000, - 0x00010000, 0x00000400, 0x04000000, 0x00000040, - 0x10000000, 0x00004000, 0x81000000, 0x88000000, - 0x00000100, 0x80020000, 0x00080000, 0x00100000, - 0x00800000, 0xffffffff, 0x82400fb3, 0xc27c0813, + 0x0000000100000001, 0x0000000000000001, 0x0000000080000000, 0x0000000000020000, + 0x0000000001000000, 0x0000000000008000, 0x0000000000002000, 0x0000000000000200, + 0x0000000000000008, 0x0000000000200000, 0x0000000110000000, 0x0000000000040000, + 0x0000000008000000, 0x0000000000000020, 0x0000000104000000, 0x0000000000000080, + 0x0000000000001000, 0x0000000000010000, 0x0000000000000400, 0x0000000004000000, + 0x0000000000000040, 0x0000000010000000, 0x0000000000004000, 0x0000000101000000, + 0x0000000108000000, 0x0000000000000100, 0x0000000100020000, 0x0000000000080000, + 0x0000000000100000, 0x0000000000800000, 0x00000001dfffffff, 0x0000000102400fb3, // Entry 40 - 5F - 0xa240385f, 0x83c1c813, 0x9e420813, 0x92000001, - 0x86000001, 0x81400001, 0x8a000001, 0x82020001, + 0x00000001827c0813, 0x000000014240385f, 0x0000000103c1c813, 0x000000011e420813, + 0x0000000112000001, 0x0000000106000001, 0x0000000101400001, 0x000000010a000001, + 0x0000000102020001, } // regionInclusionNext marks, for each entry in regionInclusionBits, the set of // all groups that are reachable from the groups set in the respective entry. -// Size: 72 bytes, 72 elements -var regionInclusionNext = [72]uint8{ +// Size: 73 bytes, 73 elements +var regionInclusionNext = [73]uint8{ // Entry 0 - 3F - 0x3d, 0x3e, 0x0b, 0x0b, 0x3f, 0x01, 0x0b, 0x01, - 0x01, 0x01, 0x01, 0x40, 0x0b, 0x0b, 0x16, 0x16, - 0x16, 0x19, 0x04, 0x04, 0x04, 0x04, 0x41, 0x16, - 0x16, 0x42, 0x19, 0x19, 0x19, 0x0b, 0x04, 0x00, - 0x00, 0x1e, 0x11, 0x18, 0x0f, 0x0d, 0x09, 0x03, - 0x15, 0x43, 0x12, 0x1b, 0x05, 0x44, 0x07, 0x0c, - 0x10, 0x0a, 0x1a, 0x06, 0x1c, 0x0e, 0x45, 0x46, - 0x08, 0x47, 0x13, 0x14, 0x17, 0x3d, 0x3d, 0x3d, + 0x3e, 0x3f, 0x0b, 0x0b, 0x40, 0x01, 0x0b, 0x01, + 0x01, 0x01, 0x01, 0x41, 0x0b, 0x0b, 0x16, 0x16, + 0x16, 0x19, 0x04, 0x04, 0x04, 0x04, 0x42, 0x16, + 0x16, 0x43, 0x19, 0x19, 0x19, 0x1d, 0x0b, 0x04, + 0x00, 0x00, 0x1f, 0x11, 0x18, 0x0f, 0x0d, 0x09, + 0x03, 0x15, 0x44, 0x12, 0x1b, 0x05, 0x45, 0x07, + 0x0c, 0x10, 0x0a, 0x1a, 0x06, 0x1c, 0x0e, 0x46, + 0x47, 0x08, 0x48, 0x13, 0x14, 0x17, 0x3e, 0x3e, // Entry 40 - 7F - 0x3d, 0x3d, 0x3d, 0x42, 0x42, 0x41, 0x42, 0x42, + 0x3e, 0x3e, 0x3e, 0x3e, 0x43, 0x43, 0x42, 0x43, + 0x43, } type parentRel struct { @@ -3644,11 +3665,11 @@ type parentRel struct { // Size: 414 bytes, 5 elements var parents = [5]parentRel{ - 0: {lang: 0x138, script: 0x0, maxScript: 0x52, toRegion: 0x1, fromRegion: []uint16{0x1a, 0x24, 0x25, 0x2e, 0x33, 0x35, 0x3c, 0x41, 0x45, 0x47, 0x48, 0x49, 0x4f, 0x51, 0x5b, 0x5c, 0x60, 0x63, 0x6c, 0x72, 0x73, 0x74, 0x7a, 0x7b, 0x7e, 0x7f, 0x80, 0x82, 0x8b, 0x8c, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9e, 0x9f, 0xa3, 0xa6, 0xa8, 0xac, 0xb0, 0xb3, 0xb4, 0xbe, 0xc5, 0xc9, 0xca, 0xcb, 0xcd, 0xcf, 0xd1, 0xd4, 0xd5, 0xdc, 0xde, 0xdf, 0xe5, 0xe6, 0xe7, 0xea, 0xef, 0x106, 0x108, 0x109, 0x10a, 0x10c, 0x10d, 0x111, 0x116, 0x11a, 0x11c, 0x11e, 0x124, 0x128, 0x12b, 0x12c, 0x12e, 0x130, 0x138, 0x13b, 0x13e, 0x141, 0x160, 0x161, 0x163}}, - 1: {lang: 0x138, script: 0x0, maxScript: 0x52, toRegion: 0x1a, fromRegion: []uint16{0x2d, 0x4d, 0x5f, 0x62, 0x71, 0xd8, 0x10b, 0x10e}}, - 2: {lang: 0x13d, script: 0x0, maxScript: 0x52, toRegion: 0x1e, fromRegion: []uint16{0x2b, 0x3e, 0x40, 0x47, 0x50, 0x53, 0x55, 0x58, 0x64, 0x68, 0x88, 0x8e, 0xce, 0xd7, 0xe1, 0xe3, 0xeb, 0xf0, 0x119, 0x134, 0x135, 0x13a}}, - 3: {lang: 0x3be, script: 0x0, maxScript: 0x52, toRegion: 0xed, fromRegion: []uint16{0x29, 0x4d, 0x59, 0x85, 0x8a, 0xb6, 0xc5, 0xd0, 0x117, 0x125}}, - 4: {lang: 0x527, script: 0x35, maxScript: 0x35, toRegion: 0x8c, fromRegion: []uint16{0xc5}}, + 0: {lang: 0x138, script: 0x0, maxScript: 0x55, toRegion: 0x1, fromRegion: []uint16{0x1a, 0x25, 0x26, 0x2f, 0x34, 0x36, 0x3d, 0x42, 0x46, 0x48, 0x49, 0x4a, 0x50, 0x52, 0x5c, 0x5d, 0x61, 0x64, 0x6d, 0x73, 0x74, 0x75, 0x7b, 0x7c, 0x7f, 0x80, 0x81, 0x83, 0x8c, 0x8d, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9f, 0xa0, 0xa4, 0xa7, 0xa9, 0xad, 0xb1, 0xb4, 0xb5, 0xbf, 0xc6, 0xca, 0xcb, 0xcc, 0xce, 0xd0, 0xd2, 0xd5, 0xd6, 0xdd, 0xdf, 0xe0, 0xe6, 0xe7, 0xe8, 0xeb, 0xf0, 0x107, 0x109, 0x10a, 0x10b, 0x10d, 0x10e, 0x112, 0x117, 0x11b, 0x11d, 0x11f, 0x125, 0x129, 0x12c, 0x12d, 0x12f, 0x131, 0x139, 0x13c, 0x13f, 0x142, 0x161, 0x162, 0x164}}, + 1: {lang: 0x138, script: 0x0, maxScript: 0x55, toRegion: 0x1a, fromRegion: []uint16{0x2e, 0x4e, 0x60, 0x63, 0x72, 0xd9, 0x10c, 0x10f}}, + 2: {lang: 0x13d, script: 0x0, maxScript: 0x55, toRegion: 0x1f, fromRegion: []uint16{0x2c, 0x3f, 0x41, 0x48, 0x51, 0x54, 0x56, 0x59, 0x65, 0x69, 0x89, 0x8f, 0xcf, 0xd8, 0xe2, 0xe4, 0xec, 0xf1, 0x11a, 0x135, 0x136, 0x13b}}, + 3: {lang: 0x3be, script: 0x0, maxScript: 0x55, toRegion: 0xee, fromRegion: []uint16{0x2a, 0x4e, 0x5a, 0x86, 0x8b, 0xb7, 0xc6, 0xd1, 0x118, 0x126}}, + 4: {lang: 0x527, script: 0x38, maxScript: 0x38, toRegion: 0x8d, fromRegion: []uint16{0xc6}}, } -// Total table size 26496 bytes (25KiB); checksum: 6E24B15A +// Total table size 27175 bytes (26KiB); checksum: 569649CD diff --git a/vendor/golang.org/x/text/runes/cond.go b/vendor/golang.org/x/text/runes/cond.go deleted file mode 100644 index df7aa02db..000000000 --- a/vendor/golang.org/x/text/runes/cond.go +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package runes - -import ( - "unicode/utf8" - - "golang.org/x/text/transform" -) - -// Note: below we pass invalid UTF-8 to the tIn and tNotIn transformers as is. -// This is done for various reasons: -// - To retain the semantics of the Nop transformer: if input is passed to a Nop -// one would expect it to be unchanged. -// - It would be very expensive to pass a converted RuneError to a transformer: -// a transformer might need more source bytes after RuneError, meaning that -// the only way to pass it safely is to create a new buffer and manage the -// intermingling of RuneErrors and normal input. -// - Many transformers leave ill-formed UTF-8 as is, so this is not -// inconsistent. Generally ill-formed UTF-8 is only replaced if it is a -// logical consequence of the operation (as for Map) or if it otherwise would -// pose security concerns (as for Remove). -// - An alternative would be to return an error on ill-formed UTF-8, but this -// would be inconsistent with other operations. - -// If returns a transformer that applies tIn to consecutive runes for which -// s.Contains(r) and tNotIn to consecutive runes for which !s.Contains(r). Reset -// is called on tIn and tNotIn at the start of each run. A Nop transformer will -// substitute a nil value passed to tIn or tNotIn. Invalid UTF-8 is translated -// to RuneError to determine which transformer to apply, but is passed as is to -// the respective transformer. -func If(s Set, tIn, tNotIn transform.Transformer) Transformer { - if tIn == nil && tNotIn == nil { - return Transformer{transform.Nop} - } - if tIn == nil { - tIn = transform.Nop - } - if tNotIn == nil { - tNotIn = transform.Nop - } - sIn, ok := tIn.(transform.SpanningTransformer) - if !ok { - sIn = dummySpan{tIn} - } - sNotIn, ok := tNotIn.(transform.SpanningTransformer) - if !ok { - sNotIn = dummySpan{tNotIn} - } - - a := &cond{ - tIn: sIn, - tNotIn: sNotIn, - f: s.Contains, - } - a.Reset() - return Transformer{a} -} - -type dummySpan struct{ transform.Transformer } - -func (d dummySpan) Span(src []byte, atEOF bool) (n int, err error) { - return 0, transform.ErrEndOfSpan -} - -type cond struct { - tIn, tNotIn transform.SpanningTransformer - f func(rune) bool - check func(rune) bool // current check to perform - t transform.SpanningTransformer // current transformer to use -} - -// Reset implements transform.Transformer. -func (t *cond) Reset() { - t.check = t.is - t.t = t.tIn - t.t.Reset() // notIn will be reset on first usage. -} - -func (t *cond) is(r rune) bool { - if t.f(r) { - return true - } - t.check = t.isNot - t.t = t.tNotIn - t.tNotIn.Reset() - return false -} - -func (t *cond) isNot(r rune) bool { - if !t.f(r) { - return true - } - t.check = t.is - t.t = t.tIn - t.tIn.Reset() - return false -} - -// This implementation of Span doesn't help all too much, but it needs to be -// there to satisfy this package's Transformer interface. -// TODO: there are certainly room for improvements, though. For example, if -// t.t == transform.Nop (which will a common occurrence) it will save a bundle -// to special-case that loop. -func (t *cond) Span(src []byte, atEOF bool) (n int, err error) { - p := 0 - for n < len(src) && err == nil { - // Don't process too much at a time as the Spanner that will be - // called on this block may terminate early. - const maxChunk = 4096 - max := len(src) - if v := n + maxChunk; v < max { - max = v - } - atEnd := false - size := 0 - current := t.t - for ; p < max; p += size { - r := rune(src[p]) - if r < utf8.RuneSelf { - size = 1 - } else if r, size = utf8.DecodeRune(src[p:]); size == 1 { - if !atEOF && !utf8.FullRune(src[p:]) { - err = transform.ErrShortSrc - break - } - } - if !t.check(r) { - // The next rune will be the start of a new run. - atEnd = true - break - } - } - n2, err2 := current.Span(src[n:p], atEnd || (atEOF && p == len(src))) - n += n2 - if err2 != nil { - return n, err2 - } - // At this point either err != nil or t.check will pass for the rune at p. - p = n + size - } - return n, err -} - -func (t *cond) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { - p := 0 - for nSrc < len(src) && err == nil { - // Don't process too much at a time, as the work might be wasted if the - // destination buffer isn't large enough to hold the result or a - // transform returns an error early. - const maxChunk = 4096 - max := len(src) - if n := nSrc + maxChunk; n < len(src) { - max = n - } - atEnd := false - size := 0 - current := t.t - for ; p < max; p += size { - r := rune(src[p]) - if r < utf8.RuneSelf { - size = 1 - } else if r, size = utf8.DecodeRune(src[p:]); size == 1 { - if !atEOF && !utf8.FullRune(src[p:]) { - err = transform.ErrShortSrc - break - } - } - if !t.check(r) { - // The next rune will be the start of a new run. - atEnd = true - break - } - } - nDst2, nSrc2, err2 := current.Transform(dst[nDst:], src[nSrc:p], atEnd || (atEOF && p == len(src))) - nDst += nDst2 - nSrc += nSrc2 - if err2 != nil { - return nDst, nSrc, err2 - } - // At this point either err != nil or t.check will pass for the rune at p. - p = nSrc + size - } - return nDst, nSrc, err -} diff --git a/vendor/golang.org/x/text/runes/runes.go b/vendor/golang.org/x/text/runes/runes.go deleted file mode 100644 index 6a3195cf3..000000000 --- a/vendor/golang.org/x/text/runes/runes.go +++ /dev/null @@ -1,355 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package runes provide transforms for UTF-8 encoded text. -package runes - -import ( - "unicode" - "unicode/utf8" - - "golang.org/x/text/transform" -) - -// A Set is a collection of runes. -type Set interface { - // Contains returns true if r is contained in the set. - Contains(r rune) bool -} - -type setFunc func(rune) bool - -func (s setFunc) Contains(r rune) bool { - return s(r) -} - -// Note: using funcs here instead of wrapping types result in cleaner -// documentation and a smaller API. - -// In creates a Set with a Contains method that returns true for all runes in -// the given RangeTable. -func In(rt *unicode.RangeTable) Set { - return setFunc(func(r rune) bool { return unicode.Is(rt, r) }) -} - -// In creates a Set with a Contains method that returns true for all runes not -// in the given RangeTable. -func NotIn(rt *unicode.RangeTable) Set { - return setFunc(func(r rune) bool { return !unicode.Is(rt, r) }) -} - -// Predicate creates a Set with a Contains method that returns f(r). -func Predicate(f func(rune) bool) Set { - return setFunc(f) -} - -// Transformer implements the transform.Transformer interface. -type Transformer struct { - t transform.SpanningTransformer -} - -func (t Transformer) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { - return t.t.Transform(dst, src, atEOF) -} - -func (t Transformer) Span(b []byte, atEOF bool) (n int, err error) { - return t.t.Span(b, atEOF) -} - -func (t Transformer) Reset() { t.t.Reset() } - -// Bytes returns a new byte slice with the result of converting b using t. It -// calls Reset on t. It returns nil if any error was found. This can only happen -// if an error-producing Transformer is passed to If. -func (t Transformer) Bytes(b []byte) []byte { - b, _, err := transform.Bytes(t, b) - if err != nil { - return nil - } - return b -} - -// String returns a string with the result of converting s using t. It calls -// Reset on t. It returns the empty string if any error was found. This can only -// happen if an error-producing Transformer is passed to If. -func (t Transformer) String(s string) string { - s, _, err := transform.String(t, s) - if err != nil { - return "" - } - return s -} - -// TODO: -// - Copy: copying strings and bytes in whole-rune units. -// - Validation (maybe) -// - Well-formed-ness (maybe) - -const runeErrorString = string(utf8.RuneError) - -// Remove returns a Transformer that removes runes r for which s.Contains(r). -// Illegal input bytes are replaced by RuneError before being passed to f. -func Remove(s Set) Transformer { - if f, ok := s.(setFunc); ok { - // This little trick cuts the running time of BenchmarkRemove for sets - // created by Predicate roughly in half. - // TODO: special-case RangeTables as well. - return Transformer{remove(f)} - } - return Transformer{remove(s.Contains)} -} - -// TODO: remove transform.RemoveFunc. - -type remove func(r rune) bool - -func (remove) Reset() {} - -// Span implements transform.Spanner. -func (t remove) Span(src []byte, atEOF bool) (n int, err error) { - for r, size := rune(0), 0; n < len(src); { - if r = rune(src[n]); r < utf8.RuneSelf { - size = 1 - } else if r, size = utf8.DecodeRune(src[n:]); size == 1 { - // Invalid rune. - if !atEOF && !utf8.FullRune(src[n:]) { - err = transform.ErrShortSrc - } else { - err = transform.ErrEndOfSpan - } - break - } - if t(r) { - err = transform.ErrEndOfSpan - break - } - n += size - } - return -} - -// Transform implements transform.Transformer. -func (t remove) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { - for r, size := rune(0), 0; nSrc < len(src); { - if r = rune(src[nSrc]); r < utf8.RuneSelf { - size = 1 - } else if r, size = utf8.DecodeRune(src[nSrc:]); size == 1 { - // Invalid rune. - if !atEOF && !utf8.FullRune(src[nSrc:]) { - err = transform.ErrShortSrc - break - } - // We replace illegal bytes with RuneError. Not doing so might - // otherwise turn a sequence of invalid UTF-8 into valid UTF-8. - // The resulting byte sequence may subsequently contain runes - // for which t(r) is true that were passed unnoticed. - if !t(utf8.RuneError) { - if nDst+3 > len(dst) { - err = transform.ErrShortDst - break - } - dst[nDst+0] = runeErrorString[0] - dst[nDst+1] = runeErrorString[1] - dst[nDst+2] = runeErrorString[2] - nDst += 3 - } - nSrc++ - continue - } - if t(r) { - nSrc += size - continue - } - if nDst+size > len(dst) { - err = transform.ErrShortDst - break - } - for i := 0; i < size; i++ { - dst[nDst] = src[nSrc] - nDst++ - nSrc++ - } - } - return -} - -// Map returns a Transformer that maps the runes in the input using the given -// mapping. Illegal bytes in the input are converted to utf8.RuneError before -// being passed to the mapping func. -func Map(mapping func(rune) rune) Transformer { - return Transformer{mapper(mapping)} -} - -type mapper func(rune) rune - -func (mapper) Reset() {} - -// Span implements transform.Spanner. -func (t mapper) Span(src []byte, atEOF bool) (n int, err error) { - for r, size := rune(0), 0; n < len(src); n += size { - if r = rune(src[n]); r < utf8.RuneSelf { - size = 1 - } else if r, size = utf8.DecodeRune(src[n:]); size == 1 { - // Invalid rune. - if !atEOF && !utf8.FullRune(src[n:]) { - err = transform.ErrShortSrc - } else { - err = transform.ErrEndOfSpan - } - break - } - if t(r) != r { - err = transform.ErrEndOfSpan - break - } - } - return n, err -} - -// Transform implements transform.Transformer. -func (t mapper) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { - var replacement rune - var b [utf8.UTFMax]byte - - for r, size := rune(0), 0; nSrc < len(src); { - if r = rune(src[nSrc]); r < utf8.RuneSelf { - if replacement = t(r); replacement < utf8.RuneSelf { - if nDst == len(dst) { - err = transform.ErrShortDst - break - } - dst[nDst] = byte(replacement) - nDst++ - nSrc++ - continue - } - size = 1 - } else if r, size = utf8.DecodeRune(src[nSrc:]); size == 1 { - // Invalid rune. - if !atEOF && !utf8.FullRune(src[nSrc:]) { - err = transform.ErrShortSrc - break - } - - if replacement = t(utf8.RuneError); replacement == utf8.RuneError { - if nDst+3 > len(dst) { - err = transform.ErrShortDst - break - } - dst[nDst+0] = runeErrorString[0] - dst[nDst+1] = runeErrorString[1] - dst[nDst+2] = runeErrorString[2] - nDst += 3 - nSrc++ - continue - } - } else if replacement = t(r); replacement == r { - if nDst+size > len(dst) { - err = transform.ErrShortDst - break - } - for i := 0; i < size; i++ { - dst[nDst] = src[nSrc] - nDst++ - nSrc++ - } - continue - } - - n := utf8.EncodeRune(b[:], replacement) - - if nDst+n > len(dst) { - err = transform.ErrShortDst - break - } - for i := 0; i < n; i++ { - dst[nDst] = b[i] - nDst++ - } - nSrc += size - } - return -} - -// ReplaceIllFormed returns a transformer that replaces all input bytes that are -// not part of a well-formed UTF-8 code sequence with utf8.RuneError. -func ReplaceIllFormed() Transformer { - return Transformer{&replaceIllFormed{}} -} - -type replaceIllFormed struct{ transform.NopResetter } - -func (t replaceIllFormed) Span(src []byte, atEOF bool) (n int, err error) { - for n < len(src) { - // ASCII fast path. - if src[n] < utf8.RuneSelf { - n++ - continue - } - - r, size := utf8.DecodeRune(src[n:]) - - // Look for a valid non-ASCII rune. - if r != utf8.RuneError || size != 1 { - n += size - continue - } - - // Look for short source data. - if !atEOF && !utf8.FullRune(src[n:]) { - err = transform.ErrShortSrc - break - } - - // We have an invalid rune. - err = transform.ErrEndOfSpan - break - } - return n, err -} - -func (t replaceIllFormed) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { - for nSrc < len(src) { - // ASCII fast path. - if r := src[nSrc]; r < utf8.RuneSelf { - if nDst == len(dst) { - err = transform.ErrShortDst - break - } - dst[nDst] = r - nDst++ - nSrc++ - continue - } - - // Look for a valid non-ASCII rune. - if _, size := utf8.DecodeRune(src[nSrc:]); size != 1 { - if size != copy(dst[nDst:], src[nSrc:nSrc+size]) { - err = transform.ErrShortDst - break - } - nDst += size - nSrc += size - continue - } - - // Look for short source data. - if !atEOF && !utf8.FullRune(src[nSrc:]) { - err = transform.ErrShortSrc - break - } - - // We have an invalid rune. - if nDst+3 > len(dst) { - err = transform.ErrShortDst - break - } - dst[nDst+0] = runeErrorString[0] - dst[nDst+1] = runeErrorString[1] - dst[nDst+2] = runeErrorString[2] - nDst += 3 - nSrc++ - } - return nDst, nSrc, err -} diff --git a/vendor/golang.org/x/text/secure/bidirule/bench_test.go b/vendor/golang.org/x/text/secure/bidirule/bench_test.go new file mode 100644 index 000000000..2db922bfd --- /dev/null +++ b/vendor/golang.org/x/text/secure/bidirule/bench_test.go @@ -0,0 +1,54 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package bidirule + +import ( + "testing" + + "golang.org/x/text/internal/testtext" +) + +var benchData = []struct{ name, data string }{ + {"ascii", "Scheveningen"}, + {"arabic", "دبي"}, + {"hangul", "다음과"}, +} + +func doBench(b *testing.B, fn func(b *testing.B, data string)) { + for _, d := range benchData { + testtext.Bench(b, d.name, func(b *testing.B) { fn(b, d.data) }) + } +} + +func BenchmarkSpan(b *testing.B) { + r := New() + doBench(b, func(b *testing.B, str string) { + b.SetBytes(int64(len(str))) + data := []byte(str) + for i := 0; i < b.N; i++ { + r.Reset() + r.Span(data, true) + } + }) +} + +func BenchmarkDirectionASCII(b *testing.B) { + doBench(b, func(b *testing.B, str string) { + b.SetBytes(int64(len(str))) + data := []byte(str) + for i := 0; i < b.N; i++ { + Direction(data) + } + }) +} + +func BenchmarkDirectionStringASCII(b *testing.B) { + doBench(b, func(b *testing.B, str string) { + b.SetBytes(int64(len(str))) + for i := 0; i < b.N; i++ { + DirectionString(str) + } + }) +} diff --git a/vendor/golang.org/x/text/secure/bidirule/bidirule.go b/vendor/golang.org/x/text/secure/bidirule/bidirule.go index a7161bdd9..0e6b85824 100644 --- a/vendor/golang.org/x/text/secure/bidirule/bidirule.go +++ b/vendor/golang.org/x/text/secure/bidirule/bidirule.go @@ -155,6 +155,7 @@ func DirectionString(s string) bidi.Direction { e, sz := bidi.LookupString(s[i:]) if sz == 0 { i++ + continue } c := e.Class() if c == bidi.R || c == bidi.AL || c == bidi.AN { @@ -203,9 +204,6 @@ func (t *Transformer) isRTL() bool { } func (t *Transformer) isFinal() bool { - if !t.isRTL() { - return true - } return t.state == ruleLTRFinal || t.state == ruleRTLFinal || t.state == ruleInitial } diff --git a/vendor/golang.org/x/text/secure/bidirule/bidirule_test.go b/vendor/golang.org/x/text/secure/bidirule/bidirule_test.go new file mode 100644 index 000000000..4b6c612dc --- /dev/null +++ b/vendor/golang.org/x/text/secure/bidirule/bidirule_test.go @@ -0,0 +1,851 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package bidirule + +import ( + "fmt" + "testing" + + "golang.org/x/text/internal/testtext" + "golang.org/x/text/transform" + "golang.org/x/text/unicode/bidi" +) + +const ( + strL = "ABC" // Left to right - most letters in LTR scripts + strR = "עברית" // Right to left - most letters in non-Arabic RTL scripts + strAL = "دبي" // Arabic letters - most letters in the Arabic script + strEN = "123" // European Number (0-9, and Extended Arabic-Indic numbers) + strES = "+-" // European Number Separator (+ and -) + strET = "$" // European Number Terminator (currency symbols, the hash sign, the percent sign and so on) + strAN = "\u0660" // Arabic Number; this encompasses the Arabic-Indic numbers, but not the Extended Arabic-Indic numbers + strCS = "," // Common Number Separator (. , / : et al) + strNSM = "\u0300" // Nonspacing Mark - most combining accents + strBN = "\u200d" // Boundary Neutral - control characters (ZWNJ, ZWJ, and others) + strB = "\u2029" // Paragraph Separator + strS = "\u0009" // Segment Separator + strWS = " " // Whitespace, including the SPACE character + strON = "@" // Other Neutrals, including @, &, parentheses, MIDDLE DOT +) + +type ruleTest struct { + in string + dir bidi.Direction + n int // position at which the rule fails + err error + + // For tests that split the string in two. + pSrc int // number of source bytes to consume first + szDst int // size of destination buffer + nSrc int // source bytes consumed and bytes written + err0 error // error after first run +} + +var testCases = [][]ruleTest{ + // Go-specific rules. + // Invalid UTF-8 is invalid. + 0: []ruleTest{{ + in: "", + dir: bidi.LeftToRight, + }, { + in: "\x80", + dir: bidi.LeftToRight, + err: ErrInvalid, + n: 0, + }, { + in: "\xcc", + dir: bidi.LeftToRight, + err: ErrInvalid, + n: 0, + }, { + in: "abc\x80", + dir: bidi.LeftToRight, + err: ErrInvalid, + n: 3, + }, { + in: "abc\xcc", + dir: bidi.LeftToRight, + err: ErrInvalid, + n: 3, + }, { + in: "abc\xccdef", + dir: bidi.LeftToRight, + err: ErrInvalid, + n: 3, + }, { + in: "\xccdef", + dir: bidi.LeftToRight, + err: ErrInvalid, + n: 0, + }, { + in: strR + "\x80", + dir: bidi.RightToLeft, + err: ErrInvalid, + n: len(strR), + }, { + in: strR + "\xcc", + dir: bidi.RightToLeft, + err: ErrInvalid, + n: len(strR), + }, { + in: strAL + "\xcc" + strR, + dir: bidi.RightToLeft, + err: ErrInvalid, + n: len(strAL), + }, { + in: "\xcc" + strR, + dir: bidi.RightToLeft, + err: ErrInvalid, + n: 0, + }}, + + // Rule 2.1: The first character must be a character with Bidi property L, + // R, or AL. If it has the R or AL property, it is an RTL label; if it has + // the L property, it is an LTR label. + 1: []ruleTest{{ + in: strL, + dir: bidi.LeftToRight, + }, { + in: strR, + dir: bidi.RightToLeft, + }, { + in: strAL, + dir: bidi.RightToLeft, + }, { + in: strAN, + dir: bidi.RightToLeft, + err: ErrInvalid, + }, { + in: strEN, + dir: bidi.LeftToRight, + err: ErrInvalid, + n: len(strEN), + }, { + in: strES, + dir: bidi.LeftToRight, + err: ErrInvalid, + n: len(strES), + }, { + in: strET, + dir: bidi.LeftToRight, + err: ErrInvalid, + n: len(strET), + }, { + in: strCS, + dir: bidi.LeftToRight, + err: ErrInvalid, + n: len(strCS), + }, { + in: strNSM, + dir: bidi.LeftToRight, + err: ErrInvalid, + n: len(strNSM), + }, { + in: strBN, + dir: bidi.LeftToRight, + err: ErrInvalid, + n: len(strBN), + }, { + in: strB, + dir: bidi.LeftToRight, + err: ErrInvalid, + n: len(strB), + }, { + in: strS, + dir: bidi.LeftToRight, + err: ErrInvalid, + n: len(strS), + }, { + in: strWS, + dir: bidi.LeftToRight, + err: ErrInvalid, + n: len(strWS), + }, { + in: strON, + dir: bidi.LeftToRight, + err: ErrInvalid, + n: len(strON), + }, { + in: strEN + strR, + dir: bidi.RightToLeft, + err: ErrInvalid, + n: 3, + }, { + in: strES + strR, + dir: bidi.RightToLeft, + err: ErrInvalid, + n: 2, + }, { + in: strET + strR, + dir: bidi.RightToLeft, + err: ErrInvalid, + n: 1, + }, { + in: strCS + strR, + dir: bidi.RightToLeft, + err: ErrInvalid, + n: 1, + }, { + in: strNSM + strR, + dir: bidi.RightToLeft, + err: ErrInvalid, + n: 2, + }, { + in: strBN + strR, + dir: bidi.RightToLeft, + err: ErrInvalid, + n: 3, + }, { + in: strB + strR, + dir: bidi.RightToLeft, + err: ErrInvalid, + n: 3, + }, { + in: strS + strR, + dir: bidi.RightToLeft, + err: ErrInvalid, + n: 1, + }, { + in: strWS + strR, + dir: bidi.RightToLeft, + err: ErrInvalid, + n: 1, + }, { + in: strON + strR, + dir: bidi.RightToLeft, + err: ErrInvalid, + n: 1, + }}, + + // Rule 2.2: In an RTL label, only characters with the Bidi properties R, + // AL, AN, EN, ES, CS, ET, ON, BN, or NSM are allowed. + 2: []ruleTest{{ + in: strR + strR + strAL, + dir: bidi.RightToLeft, + }, { + in: strR + strAL + strR, + dir: bidi.RightToLeft, + }, { + in: strR + strAN + strAL, + dir: bidi.RightToLeft, + }, { + in: strR + strEN + strR, + dir: bidi.RightToLeft, + }, { + in: strR + strES + strR, + dir: bidi.RightToLeft, + }, { + in: strR + strCS + strR, + dir: bidi.RightToLeft, + }, { + in: strR + strET + strAL, + dir: bidi.RightToLeft, + }, { + in: strR + strON + strR, + dir: bidi.RightToLeft, + }, { + in: strR + strBN + strR, + dir: bidi.RightToLeft, + }, { + in: strR + strNSM + strAL, + dir: bidi.RightToLeft, + }, { + in: strR + strL + strR, + dir: bidi.RightToLeft, + n: len(strR), + err: ErrInvalid, + }, { + in: strR + strB + strR, + dir: bidi.RightToLeft, + n: len(strR), + err: ErrInvalid, + }, { + in: strR + strS + strAL, + dir: bidi.RightToLeft, + n: len(strR), + err: ErrInvalid, + }, { + in: strR + strWS + strAL, + dir: bidi.RightToLeft, + n: len(strR), + err: ErrInvalid, + }, { + in: strAL + strR + strAL, + dir: bidi.RightToLeft, + }, { + in: strAL + strAL + strR, + dir: bidi.RightToLeft, + }, { + in: strAL + strAN + strAL, + dir: bidi.RightToLeft, + }, { + in: strAL + strEN + strR, + dir: bidi.RightToLeft, + }, { + in: strAL + strES + strR, + dir: bidi.RightToLeft, + }, { + in: strAL + strCS + strR, + dir: bidi.RightToLeft, + }, { + in: strAL + strET + strAL, + dir: bidi.RightToLeft, + }, { + in: strAL + strON + strR, + dir: bidi.RightToLeft, + }, { + in: strAL + strBN + strR, + dir: bidi.RightToLeft, + }, { + in: strAL + strNSM + strAL, + dir: bidi.RightToLeft, + }, { + in: strAL + strL + strR, + dir: bidi.RightToLeft, + n: len(strAL), + err: ErrInvalid, + }, { + in: strAL + strB + strR, + dir: bidi.RightToLeft, + n: len(strAL), + err: ErrInvalid, + }, { + in: strAL + strS + strAL, + dir: bidi.RightToLeft, + n: len(strAL), + err: ErrInvalid, + }, { + in: strAL + strWS + strAL, + dir: bidi.RightToLeft, + n: len(strAL), + err: ErrInvalid, + }}, + + // Rule 2.3: In an RTL label, the end of the label must be a character with + // Bidi property R, AL, EN, or AN, followed by zero or more characters with + // Bidi property NSM. + 3: []ruleTest{{ + in: strR + strNSM, + dir: bidi.RightToLeft, + }, { + in: strR + strR, + dir: bidi.RightToLeft, + }, { + in: strR + strAL + strNSM, + dir: bidi.RightToLeft, + }, { + in: strR + strEN + strNSM + strNSM, + dir: bidi.RightToLeft, + }, { + in: strR + strAN, + dir: bidi.RightToLeft, + }, { + in: strR + strES + strNSM, + dir: bidi.RightToLeft, + n: len(strR + strES + strNSM), + err: ErrInvalid, + }, { + in: strR + strCS + strNSM + strNSM, + dir: bidi.RightToLeft, + n: len(strR + strCS + strNSM + strNSM), + err: ErrInvalid, + }, { + in: strR + strET, + dir: bidi.RightToLeft, + n: len(strR + strET), + err: ErrInvalid, + }, { + in: strR + strON + strNSM, + dir: bidi.RightToLeft, + n: len(strR + strON + strNSM), + err: ErrInvalid, + }, { + in: strR + strBN + strNSM + strNSM, + dir: bidi.RightToLeft, + n: len(strR + strBN + strNSM + strNSM), + err: ErrInvalid, + }, { + in: strR + strL + strNSM, + dir: bidi.RightToLeft, + n: len(strR), + err: ErrInvalid, + }, { + in: strR + strB + strNSM + strNSM, + dir: bidi.RightToLeft, + n: len(strR), + err: ErrInvalid, + }, { + in: strR + strS, + dir: bidi.RightToLeft, + n: len(strR), + err: ErrInvalid, + }, { + in: strR + strWS, + dir: bidi.RightToLeft, + n: len(strR), + err: ErrInvalid, + }, { + in: strAL + strNSM, + dir: bidi.RightToLeft, + }, { + in: strAL + strR, + dir: bidi.RightToLeft, + }, { + in: strAL + strAL + strNSM, + dir: bidi.RightToLeft, + }, { + in: strAL + strEN + strNSM + strNSM, + dir: bidi.RightToLeft, + }, { + in: strAL + strAN, + dir: bidi.RightToLeft, + }, { + in: strAL + strES + strNSM, + dir: bidi.RightToLeft, + n: len(strAL + strES + strNSM), + err: ErrInvalid, + }, { + in: strAL + strCS + strNSM + strNSM, + dir: bidi.RightToLeft, + n: len(strAL + strCS + strNSM + strNSM), + err: ErrInvalid, + }, { + in: strAL + strET, + dir: bidi.RightToLeft, + n: len(strAL + strET), + err: ErrInvalid, + }, { + in: strAL + strON + strNSM, + dir: bidi.RightToLeft, + n: len(strAL + strON + strNSM), + err: ErrInvalid, + }, { + in: strAL + strBN + strNSM + strNSM, + dir: bidi.RightToLeft, + n: len(strAL + strBN + strNSM + strNSM), + err: ErrInvalid, + }, { + in: strAL + strL + strNSM, + dir: bidi.RightToLeft, + n: len(strAL), + err: ErrInvalid, + }, { + in: strAL + strB + strNSM + strNSM, + dir: bidi.RightToLeft, + n: len(strAL), + err: ErrInvalid, + }, { + in: strAL + strS, + dir: bidi.RightToLeft, + n: len(strAL), + err: ErrInvalid, + }, { + in: strAL + strWS, + dir: bidi.RightToLeft, + n: len(strAL), + err: ErrInvalid, + }}, + + // Rule 2.4: In an RTL label, if an EN is present, no AN may be present, + // and vice versa. + 4: []ruleTest{{ + in: strR + strEN + strAN, + dir: bidi.RightToLeft, + n: len(strR + strEN), + err: ErrInvalid, + }, { + in: strR + strAN + strEN + strNSM, + dir: bidi.RightToLeft, + n: len(strR + strAN), + err: ErrInvalid, + }, { + in: strAL + strEN + strAN, + dir: bidi.RightToLeft, + n: len(strAL + strEN), + err: ErrInvalid, + }, { + in: strAL + strAN + strEN + strNSM, + dir: bidi.RightToLeft, + n: len(strAL + strAN), + err: ErrInvalid, + }}, + + // Rule 2.5: In an LTR label, only characters with the Bidi properties L, + // EN, ES, CS, ET, ON, BN, or NSM are allowed. + 5: []ruleTest{{ + in: strL + strL + strL, + dir: bidi.LeftToRight, + }, { + in: strL + strEN + strL, + dir: bidi.LeftToRight, + }, { + in: strL + strES + strL, + dir: bidi.LeftToRight, + }, { + in: strL + strCS + strL, + dir: bidi.LeftToRight, + }, { + in: strL + strET + strL, + dir: bidi.LeftToRight, + }, { + in: strL + strON + strL, + dir: bidi.LeftToRight, + }, { + in: strL + strBN + strL, + dir: bidi.LeftToRight, + }, { + in: strL + strNSM + strL, + dir: bidi.LeftToRight, + }, { + in: strL + strR + strL, + dir: bidi.RightToLeft, + n: len(strL), + err: ErrInvalid, + }, { + in: strL + strAL + strL, + dir: bidi.RightToLeft, + n: len(strL), + err: ErrInvalid, + }, { + in: strL + strAN + strL, + dir: bidi.RightToLeft, + n: len(strL), + err: ErrInvalid, + }, { + in: strL + strB + strL, + dir: bidi.LeftToRight, + n: len(strL + strB + strL), + err: ErrInvalid, + }, { + in: strL + strB + strL + strR, + dir: bidi.RightToLeft, + n: len(strL + strB + strL), + err: ErrInvalid, + }, { + in: strL + strS + strL, + dir: bidi.LeftToRight, + n: len(strL + strS + strL), + err: ErrInvalid, + }, { + in: strL + strS + strL + strR, + dir: bidi.RightToLeft, + n: len(strL + strS + strL), + err: ErrInvalid, + }, { + in: strL + strWS + strL, + dir: bidi.LeftToRight, + n: len(strL + strWS + strL), + err: ErrInvalid, + }, { + in: strL + strWS + strL + strR, + dir: bidi.RightToLeft, + n: len(strL + strWS + strL), + err: ErrInvalid, + }}, + + // Rule 2.6: In an LTR label, the end of the label must be a character with + // Bidi property L or EN, followed by zero or more characters with Bidi + // property NSM. + 6: []ruleTest{{ + in: strL, + dir: bidi.LeftToRight, + }, { + in: strL + strNSM, + dir: bidi.LeftToRight, + }, { + in: strL + strNSM + strNSM, + dir: bidi.LeftToRight, + }, { + in: strL + strEN, + dir: bidi.LeftToRight, + }, { + in: strL + strEN + strNSM, + dir: bidi.LeftToRight, + }, { + in: strL + strEN + strNSM + strNSM, + dir: bidi.LeftToRight, + }, { + in: strL + strES, + dir: bidi.LeftToRight, + n: len(strL + strES), + err: ErrInvalid, + }, { + in: strL + strES + strR, + dir: bidi.RightToLeft, + n: len(strL + strES), + err: ErrInvalid, + }, { + in: strL + strCS, + dir: bidi.LeftToRight, + n: len(strL + strCS), + err: ErrInvalid, + }, { + in: strL + strCS + strR, + dir: bidi.RightToLeft, + n: len(strL + strCS), + err: ErrInvalid, + }, { + in: strL + strET, + dir: bidi.LeftToRight, + n: len(strL + strET), + err: ErrInvalid, + }, { + in: strL + strET + strR, + dir: bidi.RightToLeft, + n: len(strL + strET), + err: ErrInvalid, + }, { + in: strL + strON, + dir: bidi.LeftToRight, + n: len(strL + strON), + err: ErrInvalid, + }, { + in: strL + strON + strR, + dir: bidi.RightToLeft, + n: len(strL + strON), + err: ErrInvalid, + }, { + in: strL + strBN, + dir: bidi.LeftToRight, + n: len(strL + strBN), + err: ErrInvalid, + }, { + in: strL + strBN + strR, + dir: bidi.RightToLeft, + n: len(strL + strBN), + err: ErrInvalid, + }, { + in: strL + strR, + dir: bidi.RightToLeft, + n: len(strL), + err: ErrInvalid, + }, { + in: strL + strAL, + dir: bidi.RightToLeft, + n: len(strL), + err: ErrInvalid, + }, { + in: strL + strAN, + dir: bidi.RightToLeft, + n: len(strL), + err: ErrInvalid, + }, { + in: strL + strB, + dir: bidi.LeftToRight, + n: len(strL + strB), + err: ErrInvalid, + }, { + in: strL + strB + strR, + dir: bidi.RightToLeft, + n: len(strL + strB), + err: ErrInvalid, + }, { + in: strL + strS, + dir: bidi.LeftToRight, + n: len(strL + strS), + err: ErrInvalid, + }, { + in: strL + strS + strR, + dir: bidi.RightToLeft, + n: len(strL + strS), + err: ErrInvalid, + }, { + in: strL + strWS, + dir: bidi.LeftToRight, + n: len(strL + strWS), + err: ErrInvalid, + }, { + in: strL + strWS + strR, + dir: bidi.RightToLeft, + n: len(strL + strWS), + err: ErrInvalid, + }}, + + // Incremental processing. + 9: []ruleTest{{ + in: "e\u0301", // é + dir: bidi.LeftToRight, + + pSrc: 2, + nSrc: 1, + err0: transform.ErrShortSrc, + }, { + in: "e\u1000f", // é + dir: bidi.LeftToRight, + + pSrc: 3, + nSrc: 1, + err0: transform.ErrShortSrc, + }, { + // Remain invalid once invalid. + in: strR + "ab", + dir: bidi.RightToLeft, + n: len(strR), + err: ErrInvalid, + + pSrc: len(strR) + 1, + nSrc: len(strR), + err0: ErrInvalid, + }, { + // Short destination + in: "abcdefghij", + dir: bidi.LeftToRight, + + pSrc: 10, + szDst: 5, + nSrc: 5, + err0: transform.ErrShortDst, + }, { + in: "\U000102f7", + dir: bidi.LeftToRight, + n: len("\U000102f7"), + err: ErrInvalid, + }, { + // Short destination splitting input rune + in: "e\u0301", + dir: bidi.LeftToRight, + + pSrc: 3, + szDst: 2, + nSrc: 1, + err0: transform.ErrShortDst, + }, { + // Unicode 10.0.0 IDNA test string. + in: "FAX\u2a77\U0001d186", + dir: bidi.LeftToRight, + n: len("FAX\u2a77\U0001d186"), + err: ErrInvalid, + }, { + in: "\x80\u0660", + dir: bidi.RightToLeft, + n: 0, + err: ErrInvalid, + }}, +} + +func init() { + for rule, cases := range testCases { + for i, tc := range cases { + if tc.err == nil { + testCases[rule][i].n = len(tc.in) + } + } + } +} + +func doTests(t *testing.T, fn func(t *testing.T, tc ruleTest)) { + for rule, cases := range testCases { + for i, tc := range cases { + name := fmt.Sprintf("%d/%d:%+q:%s", rule, i, tc.in, tc.in) + testtext.Run(t, name, func(t *testing.T) { + fn(t, tc) + }) + } + } +} + +func TestDirection(t *testing.T) { + doTests(t, func(t *testing.T, tc ruleTest) { + dir := Direction([]byte(tc.in)) + if dir != tc.dir { + t.Errorf("dir was %v; want %v", dir, tc.dir) + } + }) +} + +func TestDirectionString(t *testing.T) { + doTests(t, func(t *testing.T, tc ruleTest) { + dir := DirectionString(tc.in) + if dir != tc.dir { + t.Errorf("dir was %v; want %v", dir, tc.dir) + } + }) +} + +func TestValid(t *testing.T) { + doTests(t, func(t *testing.T, tc ruleTest) { + got := Valid([]byte(tc.in)) + want := tc.err == nil + if got != want { + t.Fatalf("Valid: got %v; want %v", got, want) + } + + got = ValidString(tc.in) + want = tc.err == nil + if got != want { + t.Fatalf("Valid: got %v; want %v", got, want) + } + }) +} + +func TestSpan(t *testing.T) { + doTests(t, func(t *testing.T, tc ruleTest) { + // Skip tests that test for limited destination buffer size. + if tc.szDst > 0 { + return + } + + r := New() + src := []byte(tc.in) + + n, err := r.Span(src[:tc.pSrc], tc.pSrc == len(tc.in)) + if err != tc.err0 { + t.Errorf("err0 was %v; want %v", err, tc.err0) + } + if n != tc.nSrc { + t.Fatalf("nSrc was %d; want %d", n, tc.nSrc) + } + + n, err = r.Span(src[n:], true) + if err != tc.err { + t.Errorf("error was %v; want %v", err, tc.err) + } + if got := n + tc.nSrc; got != tc.n { + t.Errorf("n was %d; want %d", got, tc.n) + } + }) +} + +func TestTransform(t *testing.T) { + doTests(t, func(t *testing.T, tc ruleTest) { + r := New() + + src := []byte(tc.in) + dst := make([]byte, len(tc.in)) + if tc.szDst > 0 { + dst = make([]byte, tc.szDst) + } + + // First transform operates on a zero-length string for most tests. + nDst, nSrc, err := r.Transform(dst, src[:tc.pSrc], tc.pSrc == len(tc.in)) + if err != tc.err0 { + t.Errorf("err0 was %v; want %v", err, tc.err0) + } + if nDst != nSrc { + t.Fatalf("nDst (%d) and nSrc (%d) should match", nDst, nSrc) + } + if nSrc != tc.nSrc { + t.Fatalf("nSrc was %d; want %d", nSrc, tc.nSrc) + } + + dst1 := make([]byte, len(tc.in)) + copy(dst1, dst[:nDst]) + + nDst, nSrc, err = r.Transform(dst1[nDst:], src[nSrc:], true) + if err != tc.err { + t.Errorf("error was %v; want %v", err, tc.err) + } + if nDst != nSrc { + t.Fatalf("nDst (%d) and nSrc (%d) should match", nDst, nSrc) + } + n := nSrc + tc.nSrc + if n != tc.n { + t.Fatalf("n was %d; want %d", n, tc.n) + } + if got, want := string(dst1[:n]), tc.in[:tc.n]; got != want { + t.Errorf("got %+q; want %+q", got, want) + } + }) +} diff --git a/vendor/golang.org/x/text/secure/doc.go b/vendor/golang.org/x/text/secure/doc.go new file mode 100644 index 000000000..e531c3543 --- /dev/null +++ b/vendor/golang.org/x/text/secure/doc.go @@ -0,0 +1,6 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// secure is a repository of text security related packages. +package secure // import "golang.org/x/text/secure" diff --git a/vendor/golang.org/x/text/secure/precis/class.go b/vendor/golang.org/x/text/secure/precis/class.go deleted file mode 100644 index f6b56413b..000000000 --- a/vendor/golang.org/x/text/secure/precis/class.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package precis - -import ( - "unicode/utf8" -) - -// TODO: Add contextual character rules from Appendix A of RFC5892. - -// A class is a set of characters that match certain derived properties. The -// PRECIS framework defines two classes: The Freeform class and the Identifier -// class. The freeform class should be used for profiles where expressiveness is -// prioritized over safety such as nicknames or passwords. The identifier class -// should be used for profiles where safety is the first priority such as -// addressable network labels and usernames. -type class struct { - validFrom property -} - -// Contains satisfies the runes.Set interface and returns whether the given rune -// is a member of the class. -func (c class) Contains(r rune) bool { - b := make([]byte, 4) - n := utf8.EncodeRune(b, r) - - trieval, _ := dpTrie.lookup(b[:n]) - return c.validFrom <= property(trieval) -} - -var ( - identifier = &class{validFrom: pValid} - freeform = &class{validFrom: idDisOrFreePVal} -) diff --git a/vendor/golang.org/x/text/secure/precis/context.go b/vendor/golang.org/x/text/secure/precis/context.go deleted file mode 100644 index 2dcaf29d7..000000000 --- a/vendor/golang.org/x/text/secure/precis/context.go +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package precis - -import "errors" - -// This file contains tables and code related to context rules. - -type catBitmap uint16 - -const ( - // These bits, once set depending on the current value, are never unset. - bJapanese catBitmap = 1 << iota - bArabicIndicDigit - bExtendedArabicIndicDigit - - // These bits are set on each iteration depending on the current value. - bJoinStart - bJoinMid - bJoinEnd - bVirama - bLatinSmallL - bGreek - bHebrew - - // These bits indicated which of the permanent bits need to be set at the - // end of the checks. - bMustHaveJapn - - permanent = bJapanese | bArabicIndicDigit | bExtendedArabicIndicDigit | bMustHaveJapn -) - -const finalShift = 10 - -var errContext = errors.New("precis: contextual rule violated") - -func init() { - // Programmatically set these required bits as, manually setting them seems - // too error prone. - for i, ct := range categoryTransitions { - categoryTransitions[i].keep |= permanent - categoryTransitions[i].accept |= ct.term - } -} - -var categoryTransitions = []struct { - keep catBitmap // mask selecting which bits to keep from the previous state - set catBitmap // mask for which bits to set for this transition - - // These bitmaps are used for rules that require lookahead. - // term&accept == term must be true, which is enforced programmatically. - term catBitmap // bits accepted as termination condition - accept catBitmap // bits that pass, but not sufficient as termination - - // The rule function cannot take a *context as an argument, as it would - // cause the context to escape, adding significant overhead. - rule func(beforeBits catBitmap) (doLookahead bool, err error) -}{ - joiningL: {set: bJoinStart}, - joiningD: {set: bJoinStart | bJoinEnd}, - joiningT: {keep: bJoinStart, set: bJoinMid}, - joiningR: {set: bJoinEnd}, - viramaModifier: {set: bVirama}, - viramaJoinT: {set: bVirama | bJoinMid}, - latinSmallL: {set: bLatinSmallL}, - greek: {set: bGreek}, - greekJoinT: {set: bGreek | bJoinMid}, - hebrew: {set: bHebrew}, - hebrewJoinT: {set: bHebrew | bJoinMid}, - japanese: {set: bJapanese}, - katakanaMiddleDot: {set: bMustHaveJapn}, - - zeroWidthNonJoiner: { - term: bJoinEnd, - accept: bJoinMid, - rule: func(before catBitmap) (doLookAhead bool, err error) { - if before&bVirama != 0 { - return false, nil - } - if before&bJoinStart == 0 { - return false, errContext - } - return true, nil - }, - }, - zeroWidthJoiner: { - rule: func(before catBitmap) (doLookAhead bool, err error) { - if before&bVirama == 0 { - err = errContext - } - return false, err - }, - }, - middleDot: { - term: bLatinSmallL, - rule: func(before catBitmap) (doLookAhead bool, err error) { - if before&bLatinSmallL == 0 { - return false, errContext - } - return true, nil - }, - }, - greekLowerNumeralSign: { - set: bGreek, - term: bGreek, - rule: func(before catBitmap) (doLookAhead bool, err error) { - return true, nil - }, - }, - hebrewPreceding: { - set: bHebrew, - rule: func(before catBitmap) (doLookAhead bool, err error) { - if before&bHebrew == 0 { - err = errContext - } - return false, err - }, - }, - arabicIndicDigit: { - set: bArabicIndicDigit, - rule: func(before catBitmap) (doLookAhead bool, err error) { - if before&bExtendedArabicIndicDigit != 0 { - err = errContext - } - return false, err - }, - }, - extendedArabicIndicDigit: { - set: bExtendedArabicIndicDigit, - rule: func(before catBitmap) (doLookAhead bool, err error) { - if before&bArabicIndicDigit != 0 { - err = errContext - } - return false, err - }, - }, -} diff --git a/vendor/golang.org/x/text/secure/precis/doc.go b/vendor/golang.org/x/text/secure/precis/doc.go deleted file mode 100644 index aa76205e6..000000000 --- a/vendor/golang.org/x/text/secure/precis/doc.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package precis contains types and functions for the preparation, -// enforcement, and comparison of internationalized strings ("PRECIS") as -// defined in RFC 7564. It also contains several pre-defined profiles for -// passwords, nicknames, and usernames as defined in RFC 7613 and RFC 7700. -// -// BE ADVISED: This package is under construction and the API may change in -// backwards incompatible ways and without notice. -package precis - -//go:generate go run gen.go gen_trieval.go diff --git a/vendor/golang.org/x/text/secure/precis/gen.go b/vendor/golang.org/x/text/secure/precis/gen.go deleted file mode 100644 index dba9004a6..000000000 --- a/vendor/golang.org/x/text/secure/precis/gen.go +++ /dev/null @@ -1,310 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Unicode table generator. -// Data read from the web. - -// +build ignore - -package main - -import ( - "flag" - "log" - "unicode" - "unicode/utf8" - - "golang.org/x/text/internal/gen" - "golang.org/x/text/internal/triegen" - "golang.org/x/text/internal/ucd" - "golang.org/x/text/unicode/norm" - "golang.org/x/text/unicode/rangetable" -) - -var outputFile = flag.String("output", "tables.go", "output file for generated tables; default tables.go") - -var assigned, disallowedRunes *unicode.RangeTable - -var runeCategory = map[rune]category{} - -var overrides = map[category]category{ - viramaModifier: viramaJoinT, - greek: greekJoinT, - hebrew: hebrewJoinT, -} - -func setCategory(r rune, cat category) { - if c, ok := runeCategory[r]; ok { - if override, ok := overrides[c]; cat == joiningT && ok { - cat = override - } else { - log.Fatalf("%U: multiple categories for rune (%v and %v)", r, c, cat) - } - } - runeCategory[r] = cat -} - -func init() { - if numCategories > 1<<propShift { - log.Fatalf("Number of categories is %d; may at most be %d", numCategories, 1<<propShift) - } -} - -func main() { - gen.Init() - - // Load data - runes := []rune{} - // PrecisIgnorableProperties: https://tools.ietf.org/html/rfc7564#section-9.13 - ucd.Parse(gen.OpenUCDFile("DerivedCoreProperties.txt"), func(p *ucd.Parser) { - if p.String(1) == "Default_Ignorable_Code_Point" { - runes = append(runes, p.Rune(0)) - } - }) - ucd.Parse(gen.OpenUCDFile("PropList.txt"), func(p *ucd.Parser) { - switch p.String(1) { - case "Noncharacter_Code_Point": - runes = append(runes, p.Rune(0)) - } - }) - // OldHangulJamo: https://tools.ietf.org/html/rfc5892#section-2.9 - ucd.Parse(gen.OpenUCDFile("HangulSyllableType.txt"), func(p *ucd.Parser) { - switch p.String(1) { - case "L", "V", "T": - runes = append(runes, p.Rune(0)) - } - }) - - disallowedRunes = rangetable.New(runes...) - assigned = rangetable.Assigned(unicode.Version) - - // Load category data. - runeCategory['l'] = latinSmallL - ucd.Parse(gen.OpenUCDFile("UnicodeData.txt"), func(p *ucd.Parser) { - const cccVirama = 9 - if p.Int(ucd.CanonicalCombiningClass) == cccVirama { - setCategory(p.Rune(0), viramaModifier) - } - }) - ucd.Parse(gen.OpenUCDFile("Scripts.txt"), func(p *ucd.Parser) { - switch p.String(1) { - case "Greek": - setCategory(p.Rune(0), greek) - case "Hebrew": - setCategory(p.Rune(0), hebrew) - case "Hiragana", "Katakana", "Han": - setCategory(p.Rune(0), japanese) - } - }) - - // Set the rule categories associated with exceptions. This overrides any - // previously set categories. The original categories are manually - // reintroduced in the categoryTransitions table. - for r, e := range exceptions { - if e.cat != 0 { - runeCategory[r] = e.cat - } - } - cat := map[string]category{ - "L": joiningL, - "D": joiningD, - "T": joiningT, - - "R": joiningR, - } - ucd.Parse(gen.OpenUCDFile("extracted/DerivedJoiningType.txt"), func(p *ucd.Parser) { - switch v := p.String(1); v { - case "L", "D", "T", "R": - setCategory(p.Rune(0), cat[v]) - } - }) - - writeTables() - gen.Repackage("gen_trieval.go", "trieval.go", "precis") -} - -type exception struct { - prop property - cat category -} - -func init() { - // Programmatically add the Arabic and Indic digits to the exceptions map. - // See comment in the exceptions map below why these are marked disallowed. - for i := rune(0); i <= 9; i++ { - exceptions[0x0660+i] = exception{ - prop: disallowed, - cat: arabicIndicDigit, - } - exceptions[0x06F0+i] = exception{ - prop: disallowed, - cat: extendedArabicIndicDigit, - } - } -} - -// The Exceptions class as defined in RFC 5892 -// https://tools.ietf.org/html/rfc5892#section-2.6 -var exceptions = map[rune]exception{ - 0x00DF: {prop: pValid}, - 0x03C2: {prop: pValid}, - 0x06FD: {prop: pValid}, - 0x06FE: {prop: pValid}, - 0x0F0B: {prop: pValid}, - 0x3007: {prop: pValid}, - - // ContextO|J rules are marked as disallowed, taking a "guilty until proven - // innocent" approach. The main reason for this is that the check for - // whether a context rule should be applied can be moved to the logic for - // handing disallowed runes, taken it off the common path. The exception to - // this rule is for katakanaMiddleDot, as the rule logic is handled without - // using a rule function. - - // ContextJ (Join control) - 0x200C: {prop: disallowed, cat: zeroWidthNonJoiner}, - 0x200D: {prop: disallowed, cat: zeroWidthJoiner}, - - // ContextO - 0x00B7: {prop: disallowed, cat: middleDot}, - 0x0375: {prop: disallowed, cat: greekLowerNumeralSign}, - 0x05F3: {prop: disallowed, cat: hebrewPreceding}, // punctuation Geresh - 0x05F4: {prop: disallowed, cat: hebrewPreceding}, // punctuation Gershayim - 0x30FB: {prop: pValid, cat: katakanaMiddleDot}, - - // These are officially ContextO, but the implementation does not require - // special treatment of these, so we simply mark them as valid. - 0x0660: {prop: pValid}, - 0x0661: {prop: pValid}, - 0x0662: {prop: pValid}, - 0x0663: {prop: pValid}, - 0x0664: {prop: pValid}, - 0x0665: {prop: pValid}, - 0x0666: {prop: pValid}, - 0x0667: {prop: pValid}, - 0x0668: {prop: pValid}, - 0x0669: {prop: pValid}, - 0x06F0: {prop: pValid}, - 0x06F1: {prop: pValid}, - 0x06F2: {prop: pValid}, - 0x06F3: {prop: pValid}, - 0x06F4: {prop: pValid}, - 0x06F5: {prop: pValid}, - 0x06F6: {prop: pValid}, - 0x06F7: {prop: pValid}, - 0x06F8: {prop: pValid}, - 0x06F9: {prop: pValid}, - - 0x0640: {prop: disallowed}, - 0x07FA: {prop: disallowed}, - 0x302E: {prop: disallowed}, - 0x302F: {prop: disallowed}, - 0x3031: {prop: disallowed}, - 0x3032: {prop: disallowed}, - 0x3033: {prop: disallowed}, - 0x3034: {prop: disallowed}, - 0x3035: {prop: disallowed}, - 0x303B: {prop: disallowed}, -} - -// LetterDigits: https://tools.ietf.org/html/rfc5892#section-2.1 -// r in {Ll, Lu, Lo, Nd, Lm, Mn, Mc}. -func isLetterDigits(r rune) bool { - return unicode.In(r, - unicode.Ll, unicode.Lu, unicode.Lm, unicode.Lo, // Letters - unicode.Mn, unicode.Mc, // Modifiers - unicode.Nd, // Digits - ) -} - -func isIdDisAndFreePVal(r rune) bool { - return unicode.In(r, - // OtherLetterDigits: https://tools.ietf.org/html/rfc7564#section-9.18 - // r in in {Lt, Nl, No, Me} - unicode.Lt, unicode.Nl, unicode.No, // Other letters / numbers - unicode.Me, // Modifiers - - // Spaces: https://tools.ietf.org/html/rfc7564#section-9.14 - // r in in {Zs} - unicode.Zs, - - // Symbols: https://tools.ietf.org/html/rfc7564#section-9.15 - // r in {Sm, Sc, Sk, So} - unicode.Sm, unicode.Sc, unicode.Sk, unicode.So, - - // Punctuation: https://tools.ietf.org/html/rfc7564#section-9.16 - // r in {Pc, Pd, Ps, Pe, Pi, Pf, Po} - unicode.Pc, unicode.Pd, unicode.Ps, unicode.Pe, - unicode.Pi, unicode.Pf, unicode.Po, - ) -} - -// HasCompat: https://tools.ietf.org/html/rfc7564#section-9.17 -func hasCompat(r rune) bool { - return !norm.NFKC.IsNormalString(string(r)) -} - -// From https://tools.ietf.org/html/rfc5892: -// -// If .cp. .in. Exceptions Then Exceptions(cp); -// Else If .cp. .in. BackwardCompatible Then BackwardCompatible(cp); -// Else If .cp. .in. Unassigned Then UNASSIGNED; -// Else If .cp. .in. ASCII7 Then PVALID; -// Else If .cp. .in. JoinControl Then CONTEXTJ; -// Else If .cp. .in. OldHangulJamo Then DISALLOWED; -// Else If .cp. .in. PrecisIgnorableProperties Then DISALLOWED; -// Else If .cp. .in. Controls Then DISALLOWED; -// Else If .cp. .in. HasCompat Then ID_DIS or FREE_PVAL; -// Else If .cp. .in. LetterDigits Then PVALID; -// Else If .cp. .in. OtherLetterDigits Then ID_DIS or FREE_PVAL; -// Else If .cp. .in. Spaces Then ID_DIS or FREE_PVAL; -// Else If .cp. .in. Symbols Then ID_DIS or FREE_PVAL; -// Else If .cp. .in. Punctuation Then ID_DIS or FREE_PVAL; -// Else DISALLOWED; - -func writeTables() { - propTrie := triegen.NewTrie("derivedProperties") - w := gen.NewCodeWriter() - defer w.WriteGoFile(*outputFile, "precis") - gen.WriteUnicodeVersion(w) - - // Iterate over all the runes... - for i := rune(0); i < unicode.MaxRune; i++ { - r := rune(i) - - if !utf8.ValidRune(r) { - continue - } - - e, ok := exceptions[i] - p := e.prop - switch { - case ok: - case !unicode.In(r, assigned): - p = unassigned - case r >= 0x0021 && r <= 0x007e: // Is ASCII 7 - p = pValid - case unicode.In(r, disallowedRunes, unicode.Cc): - p = disallowed - case hasCompat(r): - p = idDisOrFreePVal - case isLetterDigits(r): - p = pValid - case isIdDisAndFreePVal(r): - p = idDisOrFreePVal - default: - p = disallowed - } - cat := runeCategory[r] - // Don't set category for runes that are disallowed. - if p == disallowed { - cat = exceptions[r].cat - } - propTrie.Insert(r, uint64(p)|uint64(cat)) - } - sz, err := propTrie.Gen(w) - if err != nil { - log.Fatal(err) - } - w.Size += sz -} diff --git a/vendor/golang.org/x/text/secure/precis/gen_trieval.go b/vendor/golang.org/x/text/secure/precis/gen_trieval.go deleted file mode 100644 index 308510c9a..000000000 --- a/vendor/golang.org/x/text/secure/precis/gen_trieval.go +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -package main - -// entry is the entry of a trie table -// 7..6 property (unassigned, disallowed, maybe, valid) -// 5..0 category -type entry uint8 - -const ( - propShift = 6 - propMask = 0xc0 - catMask = 0x3f -) - -func (e entry) property() property { return property(e & propMask) } -func (e entry) category() category { return category(e & catMask) } - -type property uint8 - -// The order of these constants matter. A Profile may consider runes to be -// allowed either from pValid or idDisOrFreePVal. -const ( - unassigned property = iota << propShift - disallowed - idDisOrFreePVal // disallowed for Identifier, pValid for FreeForm - pValid -) - -// compute permutations of all properties and specialCategories. -type category uint8 - -const ( - other category = iota - - // Special rune types - joiningL - joiningD - joiningT - joiningR - viramaModifier - viramaJoinT // Virama + JoiningT - latinSmallL // U+006c - greek - greekJoinT // Greek + JoiningT - hebrew - hebrewJoinT // Hebrew + JoiningT - japanese // hirigana, katakana, han - - // Special rune types associated with contextual rules defined in - // https://tools.ietf.org/html/rfc5892#appendix-A. - // ContextO - zeroWidthNonJoiner // rule 1 - zeroWidthJoiner // rule 2 - // ContextJ - middleDot // rule 3 - greekLowerNumeralSign // rule 4 - hebrewPreceding // rule 5 and 6 - katakanaMiddleDot // rule 7 - arabicIndicDigit // rule 8 - extendedArabicIndicDigit // rule 9 - - numCategories -) diff --git a/vendor/golang.org/x/text/secure/precis/nickname.go b/vendor/golang.org/x/text/secure/precis/nickname.go deleted file mode 100644 index cd54b9e69..000000000 --- a/vendor/golang.org/x/text/secure/precis/nickname.go +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package precis - -import ( - "unicode" - "unicode/utf8" - - "golang.org/x/text/transform" -) - -type nickAdditionalMapping struct { - // TODO: This transformer needs to be stateless somehow… - notStart bool - prevSpace bool -} - -func (t *nickAdditionalMapping) Reset() { - t.prevSpace = false - t.notStart = false -} - -func (t *nickAdditionalMapping) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { - // RFC 7700 §2.1. Rules - // - // 2. Additional Mapping Rule: The additional mapping rule consists of - // the following sub-rules. - // - // 1. Any instances of non-ASCII space MUST be mapped to ASCII - // space (U+0020); a non-ASCII space is any Unicode code point - // having a general category of "Zs", naturally with the - // exception of U+0020. - // - // 2. Any instances of the ASCII space character at the beginning - // or end of a nickname MUST be removed (e.g., "stpeter " is - // mapped to "stpeter"). - // - // 3. Interior sequences of more than one ASCII space character - // MUST be mapped to a single ASCII space character (e.g., - // "St Peter" is mapped to "St Peter"). - - for nSrc < len(src) { - r, size := utf8.DecodeRune(src[nSrc:]) - if size == 0 { // Incomplete UTF-8 encoding - if !atEOF { - return nDst, nSrc, transform.ErrShortSrc - } - size = 1 - } - if unicode.Is(unicode.Zs, r) { - t.prevSpace = true - } else { - if t.prevSpace && t.notStart { - dst[nDst] = ' ' - nDst += 1 - } - if size != copy(dst[nDst:], src[nSrc:nSrc+size]) { - nDst += size - return nDst, nSrc, transform.ErrShortDst - } - nDst += size - t.prevSpace = false - t.notStart = true - } - nSrc += size - } - return nDst, nSrc, nil -} diff --git a/vendor/golang.org/x/text/secure/precis/options.go b/vendor/golang.org/x/text/secure/precis/options.go deleted file mode 100644 index 488f0b1f7..000000000 --- a/vendor/golang.org/x/text/secure/precis/options.go +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package precis - -import ( - "golang.org/x/text/cases" - "golang.org/x/text/language" - "golang.org/x/text/runes" - "golang.org/x/text/transform" - "golang.org/x/text/unicode/norm" -) - -// An Option is used to define the behavior and rules of a Profile. -type Option func(*options) - -type options struct { - // Preparation options - foldWidth bool - - // Enforcement options - asciiLower bool - cases transform.SpanningTransformer - disallow runes.Set - norm transform.SpanningTransformer - additional []func() transform.SpanningTransformer - width transform.SpanningTransformer - disallowEmpty bool - bidiRule bool - - // Comparison options - ignorecase bool -} - -func getOpts(o ...Option) (res options) { - for _, f := range o { - f(&res) - } - // Using a SpanningTransformer, instead of norm.Form prevents an allocation - // down the road. - if res.norm == nil { - res.norm = norm.NFC - } - return -} - -var ( - // The IgnoreCase option causes the profile to perform a case insensitive - // comparison during the PRECIS comparison step. - IgnoreCase Option = ignoreCase - - // The FoldWidth option causes the profile to map non-canonical wide and - // narrow variants to their decomposition mapping. This is useful for - // profiles that are based on the identifier class which would otherwise - // disallow such characters. - FoldWidth Option = foldWidth - - // The DisallowEmpty option causes the enforcement step to return an error if - // the resulting string would be empty. - DisallowEmpty Option = disallowEmpty - - // The BidiRule option causes the Bidi Rule defined in RFC 5893 to be - // applied. - BidiRule Option = bidiRule -) - -var ( - ignoreCase = func(o *options) { - o.ignorecase = true - } - foldWidth = func(o *options) { - o.foldWidth = true - } - disallowEmpty = func(o *options) { - o.disallowEmpty = true - } - bidiRule = func(o *options) { - o.bidiRule = true - } -) - -// TODO: move this logic to package transform - -type spanWrap struct{ transform.Transformer } - -func (s spanWrap) Span(src []byte, atEOF bool) (n int, err error) { - return 0, transform.ErrEndOfSpan -} - -// TODO: allow different types? For instance: -// func() transform.Transformer -// func() transform.SpanningTransformer -// func([]byte) bool // validation only -// -// Also, would be great if we could detect if a transformer is reentrant. - -// The AdditionalMapping option defines the additional mapping rule for the -// Profile by applying Transformer's in sequence. -func AdditionalMapping(t ...func() transform.Transformer) Option { - return func(o *options) { - for _, f := range t { - sf := func() transform.SpanningTransformer { - return f().(transform.SpanningTransformer) - } - if _, ok := f().(transform.SpanningTransformer); !ok { - sf = func() transform.SpanningTransformer { - return spanWrap{f()} - } - } - o.additional = append(o.additional, sf) - } - } -} - -// The Norm option defines a Profile's normalization rule. Defaults to NFC. -func Norm(f norm.Form) Option { - return func(o *options) { - o.norm = f - } -} - -// The FoldCase option defines a Profile's case mapping rule. Options can be -// provided to determine the type of case folding used. -func FoldCase(opts ...cases.Option) Option { - return func(o *options) { - o.asciiLower = true - o.cases = cases.Fold(opts...) - } -} - -// The LowerCase option defines a Profile's case mapping rule. Options can be -// provided to determine the type of case folding used. -func LowerCase(opts ...cases.Option) Option { - return func(o *options) { - o.asciiLower = true - if len(opts) == 0 { - o.cases = cases.Lower(language.Und, cases.HandleFinalSigma(false)) - return - } - - opts = append([]cases.Option{cases.HandleFinalSigma(false)}, opts...) - o.cases = cases.Lower(language.Und, opts...) - } -} - -// The Disallow option further restricts a Profile's allowed characters beyond -// what is disallowed by the underlying string class. -func Disallow(set runes.Set) Option { - return func(o *options) { - o.disallow = set - } -} diff --git a/vendor/golang.org/x/text/secure/precis/profile.go b/vendor/golang.org/x/text/secure/precis/profile.go deleted file mode 100644 index bf1025338..000000000 --- a/vendor/golang.org/x/text/secure/precis/profile.go +++ /dev/null @@ -1,378 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package precis - -import ( - "bytes" - "errors" - "unicode/utf8" - - "golang.org/x/text/cases" - "golang.org/x/text/language" - "golang.org/x/text/runes" - "golang.org/x/text/secure/bidirule" - "golang.org/x/text/transform" - "golang.org/x/text/width" -) - -var ( - errDisallowedRune = errors.New("precis: disallowed rune encountered") -) - -var dpTrie = newDerivedPropertiesTrie(0) - -// A Profile represents a set of rules for normalizing and validating strings in -// the PRECIS framework. -type Profile struct { - options - class *class -} - -// NewIdentifier creates a new PRECIS profile based on the Identifier string -// class. Profiles created from this class are suitable for use where safety is -// prioritized over expressiveness like network identifiers, user accounts, chat -// rooms, and file names. -func NewIdentifier(opts ...Option) *Profile { - return &Profile{ - options: getOpts(opts...), - class: identifier, - } -} - -// NewFreeform creates a new PRECIS profile based on the Freeform string class. -// Profiles created from this class are suitable for use where expressiveness is -// prioritized over safety like passwords, and display-elements such as -// nicknames in a chat room. -func NewFreeform(opts ...Option) *Profile { - return &Profile{ - options: getOpts(opts...), - class: freeform, - } -} - -// NewTransformer creates a new transform.Transformer that performs the PRECIS -// preparation and enforcement steps on the given UTF-8 encoded bytes. -func (p *Profile) NewTransformer() *Transformer { - var ts []transform.Transformer - - // These transforms are applied in the order defined in - // https://tools.ietf.org/html/rfc7564#section-7 - - if p.options.foldWidth { - ts = append(ts, width.Fold) - } - - for _, f := range p.options.additional { - ts = append(ts, f()) - } - - if p.options.cases != nil { - ts = append(ts, p.options.cases) - } - - ts = append(ts, p.options.norm) - - if p.options.bidiRule { - ts = append(ts, bidirule.New()) - } - - ts = append(ts, &checker{p: p, allowed: p.Allowed()}) - - // TODO: Add the disallow empty rule with a dummy transformer? - - return &Transformer{transform.Chain(ts...)} -} - -var errEmptyString = errors.New("precis: transformation resulted in empty string") - -type buffers struct { - src []byte - buf [2][]byte - next int -} - -func (b *buffers) apply(t transform.SpanningTransformer) (err error) { - n, err := t.Span(b.src, true) - if err != transform.ErrEndOfSpan { - return err - } - x := b.next & 1 - if b.buf[x] == nil { - b.buf[x] = make([]byte, 0, 8+len(b.src)+len(b.src)>>2) - } - span := append(b.buf[x][:0], b.src[:n]...) - b.src, _, err = transform.Append(t, span, b.src[n:]) - b.buf[x] = b.src - b.next++ - return err -} - -// Pre-allocate transformers when possible. In some cases this avoids allocation. -var ( - foldWidthT transform.SpanningTransformer = width.Fold - lowerCaseT transform.SpanningTransformer = cases.Lower(language.Und, cases.HandleFinalSigma(false)) -) - -// TODO: make this a method on profile. - -func (b *buffers) enforce(p *Profile, src []byte, comparing bool) (str []byte, err error) { - b.src = src - - ascii := true - for _, c := range src { - if c >= utf8.RuneSelf { - ascii = false - break - } - } - // ASCII fast path. - if ascii { - for _, f := range p.options.additional { - if err = b.apply(f()); err != nil { - return nil, err - } - } - switch { - case p.options.asciiLower || (comparing && p.options.ignorecase): - for i, c := range b.src { - if 'A' <= c && c <= 'Z' { - b.src[i] = c ^ 1<<5 - } - } - case p.options.cases != nil: - b.apply(p.options.cases) - } - c := checker{p: p} - if _, err := c.span(b.src, true); err != nil { - return nil, err - } - if p.disallow != nil { - for _, c := range b.src { - if p.disallow.Contains(rune(c)) { - return nil, errDisallowedRune - } - } - } - if p.options.disallowEmpty && len(b.src) == 0 { - return nil, errEmptyString - } - return b.src, nil - } - - // These transforms are applied in the order defined in - // https://tools.ietf.org/html/rfc7564#section-7 - - // TODO: allow different width transforms options. - if p.options.foldWidth || (p.options.ignorecase && comparing) { - b.apply(foldWidthT) - } - for _, f := range p.options.additional { - if err = b.apply(f()); err != nil { - return nil, err - } - } - if p.options.cases != nil { - b.apply(p.options.cases) - } - if comparing && p.options.ignorecase { - b.apply(lowerCaseT) - } - b.apply(p.norm) - if p.options.bidiRule && !bidirule.Valid(b.src) { - return nil, bidirule.ErrInvalid - } - c := checker{p: p} - if _, err := c.span(b.src, true); err != nil { - return nil, err - } - if p.disallow != nil { - for i := 0; i < len(b.src); { - r, size := utf8.DecodeRune(b.src[i:]) - if p.disallow.Contains(r) { - return nil, errDisallowedRune - } - i += size - } - } - if p.options.disallowEmpty && len(b.src) == 0 { - return nil, errEmptyString - } - return b.src, nil -} - -// Append appends the result of applying p to src writing the result to dst. -// It returns an error if the input string is invalid. -func (p *Profile) Append(dst, src []byte) ([]byte, error) { - var buf buffers - b, err := buf.enforce(p, src, false) - if err != nil { - return nil, err - } - return append(dst, b...), nil -} - -func processBytes(p *Profile, b []byte, key bool) ([]byte, error) { - var buf buffers - b, err := buf.enforce(p, b, key) - if err != nil { - return nil, err - } - if buf.next == 0 { - c := make([]byte, len(b)) - copy(c, b) - return c, nil - } - return b, nil -} - -// Bytes returns a new byte slice with the result of applying the profile to b. -func (p *Profile) Bytes(b []byte) ([]byte, error) { - return processBytes(p, b, false) -} - -// AppendCompareKey appends the result of applying p to src (including any -// optional rules to make strings comparable or useful in a map key such as -// applying lowercasing) writing the result to dst. It returns an error if the -// input string is invalid. -func (p *Profile) AppendCompareKey(dst, src []byte) ([]byte, error) { - var buf buffers - b, err := buf.enforce(p, src, true) - if err != nil { - return nil, err - } - return append(dst, b...), nil -} - -func processString(p *Profile, s string, key bool) (string, error) { - var buf buffers - b, err := buf.enforce(p, []byte(s), key) - if err != nil { - return "", err - } - return string(b), nil -} - -// String returns a string with the result of applying the profile to s. -func (p *Profile) String(s string) (string, error) { - return processString(p, s, false) -} - -// CompareKey returns a string that can be used for comparison, hashing, or -// collation. -func (p *Profile) CompareKey(s string) (string, error) { - return processString(p, s, true) -} - -// Compare enforces both strings, and then compares them for bit-string identity -// (byte-for-byte equality). If either string cannot be enforced, the comparison -// is false. -func (p *Profile) Compare(a, b string) bool { - var buf buffers - - akey, err := buf.enforce(p, []byte(a), true) - if err != nil { - return false - } - - buf = buffers{} - bkey, err := buf.enforce(p, []byte(b), true) - if err != nil { - return false - } - - return bytes.Compare(akey, bkey) == 0 -} - -// Allowed returns a runes.Set containing every rune that is a member of the -// underlying profile's string class and not disallowed by any profile specific -// rules. -func (p *Profile) Allowed() runes.Set { - if p.options.disallow != nil { - return runes.Predicate(func(r rune) bool { - return p.class.Contains(r) && !p.options.disallow.Contains(r) - }) - } - return p.class -} - -type checker struct { - p *Profile - allowed runes.Set - - beforeBits catBitmap - termBits catBitmap - acceptBits catBitmap -} - -func (c *checker) Reset() { - c.beforeBits = 0 - c.termBits = 0 - c.acceptBits = 0 -} - -func (c *checker) span(src []byte, atEOF bool) (n int, err error) { - for n < len(src) { - e, sz := dpTrie.lookup(src[n:]) - d := categoryTransitions[category(e&catMask)] - if sz == 0 { - if !atEOF { - return n, transform.ErrShortSrc - } - return n, errDisallowedRune - } - doLookAhead := false - if property(e) < c.p.class.validFrom { - if d.rule == nil { - return n, errDisallowedRune - } - doLookAhead, err = d.rule(c.beforeBits) - if err != nil { - return n, err - } - } - c.beforeBits &= d.keep - c.beforeBits |= d.set - if c.termBits != 0 { - // We are currently in an unterminated lookahead. - if c.beforeBits&c.termBits != 0 { - c.termBits = 0 - c.acceptBits = 0 - } else if c.beforeBits&c.acceptBits == 0 { - // Invalid continuation of the unterminated lookahead sequence. - return n, errContext - } - } - if doLookAhead { - if c.termBits != 0 { - // A previous lookahead run has not been terminated yet. - return n, errContext - } - c.termBits = d.term - c.acceptBits = d.accept - } - n += sz - } - if m := c.beforeBits >> finalShift; c.beforeBits&m != m || c.termBits != 0 { - err = errContext - } - return n, err -} - -// TODO: we may get rid of this transform if transform.Chain understands -// something like a Spanner interface. -func (c checker) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { - short := false - if len(dst) < len(src) { - src = src[:len(dst)] - atEOF = false - short = true - } - nSrc, err = c.span(src, atEOF) - nDst = copy(dst, src[:nSrc]) - if short && (err == transform.ErrShortSrc || err == nil) { - err = transform.ErrShortDst - } - return nDst, nSrc, err -} diff --git a/vendor/golang.org/x/text/secure/precis/profiles.go b/vendor/golang.org/x/text/secure/precis/profiles.go deleted file mode 100644 index 86010025c..000000000 --- a/vendor/golang.org/x/text/secure/precis/profiles.go +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package precis - -import ( - "unicode" - - "golang.org/x/text/runes" - "golang.org/x/text/transform" - "golang.org/x/text/unicode/norm" -) - -var ( - // Implements the Nickname profile specified in RFC 7700. - // The nickname profile is not idempotent and may need to be applied multiple - // times before being used for comparisons. - Nickname *Profile = nickname - - // Implements the UsernameCaseMapped profile specified in RFC 7613. - UsernameCaseMapped *Profile = usernameCaseMap - - // Implements the UsernameCasePreserved profile specified in RFC 7613. - UsernameCasePreserved *Profile = usernameNoCaseMap - - // Implements the OpaqueString profile defined in RFC 7613 for passwords and other secure labels. - OpaqueString *Profile = opaquestring -) - -var ( - nickname = &Profile{ - options: getOpts( - AdditionalMapping(func() transform.Transformer { - return &nickAdditionalMapping{} - }), - IgnoreCase, - Norm(norm.NFKC), - DisallowEmpty, - ), - class: freeform, - } - usernameCaseMap = &Profile{ - options: getOpts( - FoldWidth, - LowerCase(), - Norm(norm.NFC), - BidiRule, - ), - class: identifier, - } - usernameNoCaseMap = &Profile{ - options: getOpts( - FoldWidth, - Norm(norm.NFC), - BidiRule, - ), - class: identifier, - } - opaquestring = &Profile{ - options: getOpts( - AdditionalMapping(func() transform.Transformer { - return mapSpaces - }), - Norm(norm.NFC), - DisallowEmpty, - ), - class: freeform, - } -) - -// mapSpaces is a shared value of a runes.Map transformer. -var mapSpaces transform.Transformer = runes.Map(func(r rune) rune { - if unicode.Is(unicode.Zs, r) { - return ' ' - } - return r -}) diff --git a/vendor/golang.org/x/text/secure/precis/tables.go b/vendor/golang.org/x/text/secure/precis/tables.go deleted file mode 100644 index 2f550c1ef..000000000 --- a/vendor/golang.org/x/text/secure/precis/tables.go +++ /dev/null @@ -1,3788 +0,0 @@ -// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. - -package precis - -// UnicodeVersion is the Unicode version from which the tables in this package are derived. -const UnicodeVersion = "9.0.0" - -// lookup returns the trie value for the first UTF-8 encoding in s and -// the width in bytes of this encoding. The size will be 0 if s does not -// hold enough bytes to complete the encoding. len(s) must be greater than 0. -func (t *derivedPropertiesTrie) lookup(s []byte) (v uint8, sz int) { - c0 := s[0] - switch { - case c0 < 0x80: // is ASCII - return derivedPropertiesValues[c0], 1 - case c0 < 0xC2: - return 0, 1 // Illegal UTF-8: not a starter, not ASCII. - case c0 < 0xE0: // 2-byte UTF-8 - if len(s) < 2 { - return 0, 0 - } - i := derivedPropertiesIndex[c0] - c1 := s[1] - if c1 < 0x80 || 0xC0 <= c1 { - return 0, 1 // Illegal UTF-8: not a continuation byte. - } - return t.lookupValue(uint32(i), c1), 2 - case c0 < 0xF0: // 3-byte UTF-8 - if len(s) < 3 { - return 0, 0 - } - i := derivedPropertiesIndex[c0] - c1 := s[1] - if c1 < 0x80 || 0xC0 <= c1 { - return 0, 1 // Illegal UTF-8: not a continuation byte. - } - o := uint32(i)<<6 + uint32(c1) - i = derivedPropertiesIndex[o] - c2 := s[2] - if c2 < 0x80 || 0xC0 <= c2 { - return 0, 2 // Illegal UTF-8: not a continuation byte. - } - return t.lookupValue(uint32(i), c2), 3 - case c0 < 0xF8: // 4-byte UTF-8 - if len(s) < 4 { - return 0, 0 - } - i := derivedPropertiesIndex[c0] - c1 := s[1] - if c1 < 0x80 || 0xC0 <= c1 { - return 0, 1 // Illegal UTF-8: not a continuation byte. - } - o := uint32(i)<<6 + uint32(c1) - i = derivedPropertiesIndex[o] - c2 := s[2] - if c2 < 0x80 || 0xC0 <= c2 { - return 0, 2 // Illegal UTF-8: not a continuation byte. - } - o = uint32(i)<<6 + uint32(c2) - i = derivedPropertiesIndex[o] - c3 := s[3] - if c3 < 0x80 || 0xC0 <= c3 { - return 0, 3 // Illegal UTF-8: not a continuation byte. - } - return t.lookupValue(uint32(i), c3), 4 - } - // Illegal rune - return 0, 1 -} - -// lookupUnsafe returns the trie value for the first UTF-8 encoding in s. -// s must start with a full and valid UTF-8 encoded rune. -func (t *derivedPropertiesTrie) lookupUnsafe(s []byte) uint8 { - c0 := s[0] - if c0 < 0x80 { // is ASCII - return derivedPropertiesValues[c0] - } - i := derivedPropertiesIndex[c0] - if c0 < 0xE0 { // 2-byte UTF-8 - return t.lookupValue(uint32(i), s[1]) - } - i = derivedPropertiesIndex[uint32(i)<<6+uint32(s[1])] - if c0 < 0xF0 { // 3-byte UTF-8 - return t.lookupValue(uint32(i), s[2]) - } - i = derivedPropertiesIndex[uint32(i)<<6+uint32(s[2])] - if c0 < 0xF8 { // 4-byte UTF-8 - return t.lookupValue(uint32(i), s[3]) - } - return 0 -} - -// lookupString returns the trie value for the first UTF-8 encoding in s and -// the width in bytes of this encoding. The size will be 0 if s does not -// hold enough bytes to complete the encoding. len(s) must be greater than 0. -func (t *derivedPropertiesTrie) lookupString(s string) (v uint8, sz int) { - c0 := s[0] - switch { - case c0 < 0x80: // is ASCII - return derivedPropertiesValues[c0], 1 - case c0 < 0xC2: - return 0, 1 // Illegal UTF-8: not a starter, not ASCII. - case c0 < 0xE0: // 2-byte UTF-8 - if len(s) < 2 { - return 0, 0 - } - i := derivedPropertiesIndex[c0] - c1 := s[1] - if c1 < 0x80 || 0xC0 <= c1 { - return 0, 1 // Illegal UTF-8: not a continuation byte. - } - return t.lookupValue(uint32(i), c1), 2 - case c0 < 0xF0: // 3-byte UTF-8 - if len(s) < 3 { - return 0, 0 - } - i := derivedPropertiesIndex[c0] - c1 := s[1] - if c1 < 0x80 || 0xC0 <= c1 { - return 0, 1 // Illegal UTF-8: not a continuation byte. - } - o := uint32(i)<<6 + uint32(c1) - i = derivedPropertiesIndex[o] - c2 := s[2] - if c2 < 0x80 || 0xC0 <= c2 { - return 0, 2 // Illegal UTF-8: not a continuation byte. - } - return t.lookupValue(uint32(i), c2), 3 - case c0 < 0xF8: // 4-byte UTF-8 - if len(s) < 4 { - return 0, 0 - } - i := derivedPropertiesIndex[c0] - c1 := s[1] - if c1 < 0x80 || 0xC0 <= c1 { - return 0, 1 // Illegal UTF-8: not a continuation byte. - } - o := uint32(i)<<6 + uint32(c1) - i = derivedPropertiesIndex[o] - c2 := s[2] - if c2 < 0x80 || 0xC0 <= c2 { - return 0, 2 // Illegal UTF-8: not a continuation byte. - } - o = uint32(i)<<6 + uint32(c2) - i = derivedPropertiesIndex[o] - c3 := s[3] - if c3 < 0x80 || 0xC0 <= c3 { - return 0, 3 // Illegal UTF-8: not a continuation byte. - } - return t.lookupValue(uint32(i), c3), 4 - } - // Illegal rune - return 0, 1 -} - -// lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s. -// s must start with a full and valid UTF-8 encoded rune. -func (t *derivedPropertiesTrie) lookupStringUnsafe(s string) uint8 { - c0 := s[0] - if c0 < 0x80 { // is ASCII - return derivedPropertiesValues[c0] - } - i := derivedPropertiesIndex[c0] - if c0 < 0xE0 { // 2-byte UTF-8 - return t.lookupValue(uint32(i), s[1]) - } - i = derivedPropertiesIndex[uint32(i)<<6+uint32(s[1])] - if c0 < 0xF0 { // 3-byte UTF-8 - return t.lookupValue(uint32(i), s[2]) - } - i = derivedPropertiesIndex[uint32(i)<<6+uint32(s[2])] - if c0 < 0xF8 { // 4-byte UTF-8 - return t.lookupValue(uint32(i), s[3]) - } - return 0 -} - -// derivedPropertiesTrie. Total size: 25344 bytes (24.75 KiB). Checksum: c5b977d76d42d8a. -type derivedPropertiesTrie struct{} - -func newDerivedPropertiesTrie(i int) *derivedPropertiesTrie { - return &derivedPropertiesTrie{} -} - -// lookupValue determines the type of block n and looks up the value for b. -func (t *derivedPropertiesTrie) lookupValue(n uint32, b byte) uint8 { - switch { - default: - return uint8(derivedPropertiesValues[n<<6+uint32(b)]) - } -} - -// derivedPropertiesValues: 324 blocks, 20736 entries, 20736 bytes -// The third block is the zero block. -var derivedPropertiesValues = [20736]uint8{ - // Block 0x0, offset 0x0 - 0x00: 0x0040, 0x01: 0x0040, 0x02: 0x0040, 0x03: 0x0040, 0x04: 0x0040, 0x05: 0x0040, - 0x06: 0x0040, 0x07: 0x0040, 0x08: 0x0040, 0x09: 0x0040, 0x0a: 0x0040, 0x0b: 0x0040, - 0x0c: 0x0040, 0x0d: 0x0040, 0x0e: 0x0040, 0x0f: 0x0040, 0x10: 0x0040, 0x11: 0x0040, - 0x12: 0x0040, 0x13: 0x0040, 0x14: 0x0040, 0x15: 0x0040, 0x16: 0x0040, 0x17: 0x0040, - 0x18: 0x0040, 0x19: 0x0040, 0x1a: 0x0040, 0x1b: 0x0040, 0x1c: 0x0040, 0x1d: 0x0040, - 0x1e: 0x0040, 0x1f: 0x0040, 0x20: 0x0080, 0x21: 0x00c0, 0x22: 0x00c0, 0x23: 0x00c0, - 0x24: 0x00c0, 0x25: 0x00c0, 0x26: 0x00c0, 0x27: 0x00c0, 0x28: 0x00c0, 0x29: 0x00c0, - 0x2a: 0x00c0, 0x2b: 0x00c0, 0x2c: 0x00c0, 0x2d: 0x00c0, 0x2e: 0x00c0, 0x2f: 0x00c0, - 0x30: 0x00c0, 0x31: 0x00c0, 0x32: 0x00c0, 0x33: 0x00c0, 0x34: 0x00c0, 0x35: 0x00c0, - 0x36: 0x00c0, 0x37: 0x00c0, 0x38: 0x00c0, 0x39: 0x00c0, 0x3a: 0x00c0, 0x3b: 0x00c0, - 0x3c: 0x00c0, 0x3d: 0x00c0, 0x3e: 0x00c0, 0x3f: 0x00c0, - // Block 0x1, offset 0x40 - 0x40: 0x00c0, 0x41: 0x00c0, 0x42: 0x00c0, 0x43: 0x00c0, 0x44: 0x00c0, 0x45: 0x00c0, - 0x46: 0x00c0, 0x47: 0x00c0, 0x48: 0x00c0, 0x49: 0x00c0, 0x4a: 0x00c0, 0x4b: 0x00c0, - 0x4c: 0x00c0, 0x4d: 0x00c0, 0x4e: 0x00c0, 0x4f: 0x00c0, 0x50: 0x00c0, 0x51: 0x00c0, - 0x52: 0x00c0, 0x53: 0x00c0, 0x54: 0x00c0, 0x55: 0x00c0, 0x56: 0x00c0, 0x57: 0x00c0, - 0x58: 0x00c0, 0x59: 0x00c0, 0x5a: 0x00c0, 0x5b: 0x00c0, 0x5c: 0x00c0, 0x5d: 0x00c0, - 0x5e: 0x00c0, 0x5f: 0x00c0, 0x60: 0x00c0, 0x61: 0x00c0, 0x62: 0x00c0, 0x63: 0x00c0, - 0x64: 0x00c0, 0x65: 0x00c0, 0x66: 0x00c0, 0x67: 0x00c0, 0x68: 0x00c0, 0x69: 0x00c0, - 0x6a: 0x00c0, 0x6b: 0x00c0, 0x6c: 0x00c7, 0x6d: 0x00c0, 0x6e: 0x00c0, 0x6f: 0x00c0, - 0x70: 0x00c0, 0x71: 0x00c0, 0x72: 0x00c0, 0x73: 0x00c0, 0x74: 0x00c0, 0x75: 0x00c0, - 0x76: 0x00c0, 0x77: 0x00c0, 0x78: 0x00c0, 0x79: 0x00c0, 0x7a: 0x00c0, 0x7b: 0x00c0, - 0x7c: 0x00c0, 0x7d: 0x00c0, 0x7e: 0x00c0, 0x7f: 0x0040, - // Block 0x2, offset 0x80 - // Block 0x3, offset 0xc0 - 0xc0: 0x0040, 0xc1: 0x0040, 0xc2: 0x0040, 0xc3: 0x0040, 0xc4: 0x0040, 0xc5: 0x0040, - 0xc6: 0x0040, 0xc7: 0x0040, 0xc8: 0x0040, 0xc9: 0x0040, 0xca: 0x0040, 0xcb: 0x0040, - 0xcc: 0x0040, 0xcd: 0x0040, 0xce: 0x0040, 0xcf: 0x0040, 0xd0: 0x0040, 0xd1: 0x0040, - 0xd2: 0x0040, 0xd3: 0x0040, 0xd4: 0x0040, 0xd5: 0x0040, 0xd6: 0x0040, 0xd7: 0x0040, - 0xd8: 0x0040, 0xd9: 0x0040, 0xda: 0x0040, 0xdb: 0x0040, 0xdc: 0x0040, 0xdd: 0x0040, - 0xde: 0x0040, 0xdf: 0x0040, 0xe0: 0x0080, 0xe1: 0x0080, 0xe2: 0x0080, 0xe3: 0x0080, - 0xe4: 0x0080, 0xe5: 0x0080, 0xe6: 0x0080, 0xe7: 0x0080, 0xe8: 0x0080, 0xe9: 0x0080, - 0xea: 0x0080, 0xeb: 0x0080, 0xec: 0x0080, 0xed: 0x0040, 0xee: 0x0080, 0xef: 0x0080, - 0xf0: 0x0080, 0xf1: 0x0080, 0xf2: 0x0080, 0xf3: 0x0080, 0xf4: 0x0080, 0xf5: 0x0080, - 0xf6: 0x0080, 0xf7: 0x004f, 0xf8: 0x0080, 0xf9: 0x0080, 0xfa: 0x0080, 0xfb: 0x0080, - 0xfc: 0x0080, 0xfd: 0x0080, 0xfe: 0x0080, 0xff: 0x0080, - // Block 0x4, offset 0x100 - 0x100: 0x00c0, 0x101: 0x00c0, 0x102: 0x00c0, 0x103: 0x00c0, 0x104: 0x00c0, 0x105: 0x00c0, - 0x106: 0x00c0, 0x107: 0x00c0, 0x108: 0x00c0, 0x109: 0x00c0, 0x10a: 0x00c0, 0x10b: 0x00c0, - 0x10c: 0x00c0, 0x10d: 0x00c0, 0x10e: 0x00c0, 0x10f: 0x00c0, 0x110: 0x00c0, 0x111: 0x00c0, - 0x112: 0x00c0, 0x113: 0x00c0, 0x114: 0x00c0, 0x115: 0x00c0, 0x116: 0x00c0, 0x117: 0x0080, - 0x118: 0x00c0, 0x119: 0x00c0, 0x11a: 0x00c0, 0x11b: 0x00c0, 0x11c: 0x00c0, 0x11d: 0x00c0, - 0x11e: 0x00c0, 0x11f: 0x00c0, 0x120: 0x00c0, 0x121: 0x00c0, 0x122: 0x00c0, 0x123: 0x00c0, - 0x124: 0x00c0, 0x125: 0x00c0, 0x126: 0x00c0, 0x127: 0x00c0, 0x128: 0x00c0, 0x129: 0x00c0, - 0x12a: 0x00c0, 0x12b: 0x00c0, 0x12c: 0x00c0, 0x12d: 0x00c0, 0x12e: 0x00c0, 0x12f: 0x00c0, - 0x130: 0x00c0, 0x131: 0x00c0, 0x132: 0x00c0, 0x133: 0x00c0, 0x134: 0x00c0, 0x135: 0x00c0, - 0x136: 0x00c0, 0x137: 0x0080, 0x138: 0x00c0, 0x139: 0x00c0, 0x13a: 0x00c0, 0x13b: 0x00c0, - 0x13c: 0x00c0, 0x13d: 0x00c0, 0x13e: 0x00c0, 0x13f: 0x00c0, - // Block 0x5, offset 0x140 - 0x140: 0x00c0, 0x141: 0x00c0, 0x142: 0x00c0, 0x143: 0x00c0, 0x144: 0x00c0, 0x145: 0x00c0, - 0x146: 0x00c0, 0x147: 0x00c0, 0x148: 0x00c0, 0x149: 0x00c0, 0x14a: 0x00c0, 0x14b: 0x00c0, - 0x14c: 0x00c0, 0x14d: 0x00c0, 0x14e: 0x00c0, 0x14f: 0x00c0, 0x150: 0x00c0, 0x151: 0x00c0, - 0x152: 0x00c0, 0x153: 0x00c0, 0x154: 0x00c0, 0x155: 0x00c0, 0x156: 0x00c0, 0x157: 0x00c0, - 0x158: 0x00c0, 0x159: 0x00c0, 0x15a: 0x00c0, 0x15b: 0x00c0, 0x15c: 0x00c0, 0x15d: 0x00c0, - 0x15e: 0x00c0, 0x15f: 0x00c0, 0x160: 0x00c0, 0x161: 0x00c0, 0x162: 0x00c0, 0x163: 0x00c0, - 0x164: 0x00c0, 0x165: 0x00c0, 0x166: 0x00c0, 0x167: 0x00c0, 0x168: 0x00c0, 0x169: 0x00c0, - 0x16a: 0x00c0, 0x16b: 0x00c0, 0x16c: 0x00c0, 0x16d: 0x00c0, 0x16e: 0x00c0, 0x16f: 0x00c0, - 0x170: 0x00c0, 0x171: 0x00c0, 0x172: 0x0080, 0x173: 0x0080, 0x174: 0x00c0, 0x175: 0x00c0, - 0x176: 0x00c0, 0x177: 0x00c0, 0x178: 0x00c0, 0x179: 0x00c0, 0x17a: 0x00c0, 0x17b: 0x00c0, - 0x17c: 0x00c0, 0x17d: 0x00c0, 0x17e: 0x00c0, 0x17f: 0x0080, - // Block 0x6, offset 0x180 - 0x180: 0x0080, 0x181: 0x00c0, 0x182: 0x00c0, 0x183: 0x00c0, 0x184: 0x00c0, 0x185: 0x00c0, - 0x186: 0x00c0, 0x187: 0x00c0, 0x188: 0x00c0, 0x189: 0x0080, 0x18a: 0x00c0, 0x18b: 0x00c0, - 0x18c: 0x00c0, 0x18d: 0x00c0, 0x18e: 0x00c0, 0x18f: 0x00c0, 0x190: 0x00c0, 0x191: 0x00c0, - 0x192: 0x00c0, 0x193: 0x00c0, 0x194: 0x00c0, 0x195: 0x00c0, 0x196: 0x00c0, 0x197: 0x00c0, - 0x198: 0x00c0, 0x199: 0x00c0, 0x19a: 0x00c0, 0x19b: 0x00c0, 0x19c: 0x00c0, 0x19d: 0x00c0, - 0x19e: 0x00c0, 0x19f: 0x00c0, 0x1a0: 0x00c0, 0x1a1: 0x00c0, 0x1a2: 0x00c0, 0x1a3: 0x00c0, - 0x1a4: 0x00c0, 0x1a5: 0x00c0, 0x1a6: 0x00c0, 0x1a7: 0x00c0, 0x1a8: 0x00c0, 0x1a9: 0x00c0, - 0x1aa: 0x00c0, 0x1ab: 0x00c0, 0x1ac: 0x00c0, 0x1ad: 0x00c0, 0x1ae: 0x00c0, 0x1af: 0x00c0, - 0x1b0: 0x00c0, 0x1b1: 0x00c0, 0x1b2: 0x00c0, 0x1b3: 0x00c0, 0x1b4: 0x00c0, 0x1b5: 0x00c0, - 0x1b6: 0x00c0, 0x1b7: 0x00c0, 0x1b8: 0x00c0, 0x1b9: 0x00c0, 0x1ba: 0x00c0, 0x1bb: 0x00c0, - 0x1bc: 0x00c0, 0x1bd: 0x00c0, 0x1be: 0x00c0, 0x1bf: 0x0080, - // Block 0x7, offset 0x1c0 - 0x1c0: 0x00c0, 0x1c1: 0x00c0, 0x1c2: 0x00c0, 0x1c3: 0x00c0, 0x1c4: 0x00c0, 0x1c5: 0x00c0, - 0x1c6: 0x00c0, 0x1c7: 0x00c0, 0x1c8: 0x00c0, 0x1c9: 0x00c0, 0x1ca: 0x00c0, 0x1cb: 0x00c0, - 0x1cc: 0x00c0, 0x1cd: 0x00c0, 0x1ce: 0x00c0, 0x1cf: 0x00c0, 0x1d0: 0x00c0, 0x1d1: 0x00c0, - 0x1d2: 0x00c0, 0x1d3: 0x00c0, 0x1d4: 0x00c0, 0x1d5: 0x00c0, 0x1d6: 0x00c0, 0x1d7: 0x00c0, - 0x1d8: 0x00c0, 0x1d9: 0x00c0, 0x1da: 0x00c0, 0x1db: 0x00c0, 0x1dc: 0x00c0, 0x1dd: 0x00c0, - 0x1de: 0x00c0, 0x1df: 0x00c0, 0x1e0: 0x00c0, 0x1e1: 0x00c0, 0x1e2: 0x00c0, 0x1e3: 0x00c0, - 0x1e4: 0x00c0, 0x1e5: 0x00c0, 0x1e6: 0x00c0, 0x1e7: 0x00c0, 0x1e8: 0x00c0, 0x1e9: 0x00c0, - 0x1ea: 0x00c0, 0x1eb: 0x00c0, 0x1ec: 0x00c0, 0x1ed: 0x00c0, 0x1ee: 0x00c0, 0x1ef: 0x00c0, - 0x1f0: 0x00c0, 0x1f1: 0x00c0, 0x1f2: 0x00c0, 0x1f3: 0x00c0, 0x1f4: 0x00c0, 0x1f5: 0x00c0, - 0x1f6: 0x00c0, 0x1f7: 0x00c0, 0x1f8: 0x00c0, 0x1f9: 0x00c0, 0x1fa: 0x00c0, 0x1fb: 0x00c0, - 0x1fc: 0x00c0, 0x1fd: 0x00c0, 0x1fe: 0x00c0, 0x1ff: 0x00c0, - // Block 0x8, offset 0x200 - 0x200: 0x00c0, 0x201: 0x00c0, 0x202: 0x00c0, 0x203: 0x00c0, 0x204: 0x0080, 0x205: 0x0080, - 0x206: 0x0080, 0x207: 0x0080, 0x208: 0x0080, 0x209: 0x0080, 0x20a: 0x0080, 0x20b: 0x0080, - 0x20c: 0x0080, 0x20d: 0x00c0, 0x20e: 0x00c0, 0x20f: 0x00c0, 0x210: 0x00c0, 0x211: 0x00c0, - 0x212: 0x00c0, 0x213: 0x00c0, 0x214: 0x00c0, 0x215: 0x00c0, 0x216: 0x00c0, 0x217: 0x00c0, - 0x218: 0x00c0, 0x219: 0x00c0, 0x21a: 0x00c0, 0x21b: 0x00c0, 0x21c: 0x00c0, 0x21d: 0x00c0, - 0x21e: 0x00c0, 0x21f: 0x00c0, 0x220: 0x00c0, 0x221: 0x00c0, 0x222: 0x00c0, 0x223: 0x00c0, - 0x224: 0x00c0, 0x225: 0x00c0, 0x226: 0x00c0, 0x227: 0x00c0, 0x228: 0x00c0, 0x229: 0x00c0, - 0x22a: 0x00c0, 0x22b: 0x00c0, 0x22c: 0x00c0, 0x22d: 0x00c0, 0x22e: 0x00c0, 0x22f: 0x00c0, - 0x230: 0x00c0, 0x231: 0x0080, 0x232: 0x0080, 0x233: 0x0080, 0x234: 0x00c0, 0x235: 0x00c0, - 0x236: 0x00c0, 0x237: 0x00c0, 0x238: 0x00c0, 0x239: 0x00c0, 0x23a: 0x00c0, 0x23b: 0x00c0, - 0x23c: 0x00c0, 0x23d: 0x00c0, 0x23e: 0x00c0, 0x23f: 0x00c0, - // Block 0x9, offset 0x240 - 0x240: 0x00c0, 0x241: 0x00c0, 0x242: 0x00c0, 0x243: 0x00c0, 0x244: 0x00c0, 0x245: 0x00c0, - 0x246: 0x00c0, 0x247: 0x00c0, 0x248: 0x00c0, 0x249: 0x00c0, 0x24a: 0x00c0, 0x24b: 0x00c0, - 0x24c: 0x00c0, 0x24d: 0x00c0, 0x24e: 0x00c0, 0x24f: 0x00c0, 0x250: 0x00c0, 0x251: 0x00c0, - 0x252: 0x00c0, 0x253: 0x00c0, 0x254: 0x00c0, 0x255: 0x00c0, 0x256: 0x00c0, 0x257: 0x00c0, - 0x258: 0x00c0, 0x259: 0x00c0, 0x25a: 0x00c0, 0x25b: 0x00c0, 0x25c: 0x00c0, 0x25d: 0x00c0, - 0x25e: 0x00c0, 0x25f: 0x00c0, 0x260: 0x00c0, 0x261: 0x00c0, 0x262: 0x00c0, 0x263: 0x00c0, - 0x264: 0x00c0, 0x265: 0x00c0, 0x266: 0x00c0, 0x267: 0x00c0, 0x268: 0x00c0, 0x269: 0x00c0, - 0x26a: 0x00c0, 0x26b: 0x00c0, 0x26c: 0x00c0, 0x26d: 0x00c0, 0x26e: 0x00c0, 0x26f: 0x00c0, - 0x270: 0x0080, 0x271: 0x0080, 0x272: 0x0080, 0x273: 0x0080, 0x274: 0x0080, 0x275: 0x0080, - 0x276: 0x0080, 0x277: 0x0080, 0x278: 0x0080, 0x279: 0x00c0, 0x27a: 0x00c0, 0x27b: 0x00c0, - 0x27c: 0x00c0, 0x27d: 0x00c0, 0x27e: 0x00c0, 0x27f: 0x00c0, - // Block 0xa, offset 0x280 - 0x280: 0x00c0, 0x281: 0x00c0, 0x282: 0x0080, 0x283: 0x0080, 0x284: 0x0080, 0x285: 0x0080, - 0x286: 0x00c0, 0x287: 0x00c0, 0x288: 0x00c0, 0x289: 0x00c0, 0x28a: 0x00c0, 0x28b: 0x00c0, - 0x28c: 0x00c0, 0x28d: 0x00c0, 0x28e: 0x00c0, 0x28f: 0x00c0, 0x290: 0x00c0, 0x291: 0x00c0, - 0x292: 0x0080, 0x293: 0x0080, 0x294: 0x0080, 0x295: 0x0080, 0x296: 0x0080, 0x297: 0x0080, - 0x298: 0x0080, 0x299: 0x0080, 0x29a: 0x0080, 0x29b: 0x0080, 0x29c: 0x0080, 0x29d: 0x0080, - 0x29e: 0x0080, 0x29f: 0x0080, 0x2a0: 0x0080, 0x2a1: 0x0080, 0x2a2: 0x0080, 0x2a3: 0x0080, - 0x2a4: 0x0080, 0x2a5: 0x0080, 0x2a6: 0x0080, 0x2a7: 0x0080, 0x2a8: 0x0080, 0x2a9: 0x0080, - 0x2aa: 0x0080, 0x2ab: 0x0080, 0x2ac: 0x00c0, 0x2ad: 0x0080, 0x2ae: 0x00c0, 0x2af: 0x0080, - 0x2b0: 0x0080, 0x2b1: 0x0080, 0x2b2: 0x0080, 0x2b3: 0x0080, 0x2b4: 0x0080, 0x2b5: 0x0080, - 0x2b6: 0x0080, 0x2b7: 0x0080, 0x2b8: 0x0080, 0x2b9: 0x0080, 0x2ba: 0x0080, 0x2bb: 0x0080, - 0x2bc: 0x0080, 0x2bd: 0x0080, 0x2be: 0x0080, 0x2bf: 0x0080, - // Block 0xb, offset 0x2c0 - 0x2c0: 0x00c3, 0x2c1: 0x00c3, 0x2c2: 0x00c3, 0x2c3: 0x00c3, 0x2c4: 0x00c3, 0x2c5: 0x00c3, - 0x2c6: 0x00c3, 0x2c7: 0x00c3, 0x2c8: 0x00c3, 0x2c9: 0x00c3, 0x2ca: 0x00c3, 0x2cb: 0x00c3, - 0x2cc: 0x00c3, 0x2cd: 0x00c3, 0x2ce: 0x00c3, 0x2cf: 0x00c3, 0x2d0: 0x00c3, 0x2d1: 0x00c3, - 0x2d2: 0x00c3, 0x2d3: 0x00c3, 0x2d4: 0x00c3, 0x2d5: 0x00c3, 0x2d6: 0x00c3, 0x2d7: 0x00c3, - 0x2d8: 0x00c3, 0x2d9: 0x00c3, 0x2da: 0x00c3, 0x2db: 0x00c3, 0x2dc: 0x00c3, 0x2dd: 0x00c3, - 0x2de: 0x00c3, 0x2df: 0x00c3, 0x2e0: 0x00c3, 0x2e1: 0x00c3, 0x2e2: 0x00c3, 0x2e3: 0x00c3, - 0x2e4: 0x00c3, 0x2e5: 0x00c3, 0x2e6: 0x00c3, 0x2e7: 0x00c3, 0x2e8: 0x00c3, 0x2e9: 0x00c3, - 0x2ea: 0x00c3, 0x2eb: 0x00c3, 0x2ec: 0x00c3, 0x2ed: 0x00c3, 0x2ee: 0x00c3, 0x2ef: 0x00c3, - 0x2f0: 0x00c3, 0x2f1: 0x00c3, 0x2f2: 0x00c3, 0x2f3: 0x00c3, 0x2f4: 0x00c3, 0x2f5: 0x00c3, - 0x2f6: 0x00c3, 0x2f7: 0x00c3, 0x2f8: 0x00c3, 0x2f9: 0x00c3, 0x2fa: 0x00c3, 0x2fb: 0x00c3, - 0x2fc: 0x00c3, 0x2fd: 0x00c3, 0x2fe: 0x00c3, 0x2ff: 0x00c3, - // Block 0xc, offset 0x300 - 0x300: 0x0083, 0x301: 0x0083, 0x302: 0x00c3, 0x303: 0x0083, 0x304: 0x0083, 0x305: 0x00c3, - 0x306: 0x00c3, 0x307: 0x00c3, 0x308: 0x00c3, 0x309: 0x00c3, 0x30a: 0x00c3, 0x30b: 0x00c3, - 0x30c: 0x00c3, 0x30d: 0x00c3, 0x30e: 0x00c3, 0x30f: 0x0040, 0x310: 0x00c3, 0x311: 0x00c3, - 0x312: 0x00c3, 0x313: 0x00c3, 0x314: 0x00c3, 0x315: 0x00c3, 0x316: 0x00c3, 0x317: 0x00c3, - 0x318: 0x00c3, 0x319: 0x00c3, 0x31a: 0x00c3, 0x31b: 0x00c3, 0x31c: 0x00c3, 0x31d: 0x00c3, - 0x31e: 0x00c3, 0x31f: 0x00c3, 0x320: 0x00c3, 0x321: 0x00c3, 0x322: 0x00c3, 0x323: 0x00c3, - 0x324: 0x00c3, 0x325: 0x00c3, 0x326: 0x00c3, 0x327: 0x00c3, 0x328: 0x00c3, 0x329: 0x00c3, - 0x32a: 0x00c3, 0x32b: 0x00c3, 0x32c: 0x00c3, 0x32d: 0x00c3, 0x32e: 0x00c3, 0x32f: 0x00c3, - 0x330: 0x00c8, 0x331: 0x00c8, 0x332: 0x00c8, 0x333: 0x00c8, 0x334: 0x0080, 0x335: 0x0050, - 0x336: 0x00c8, 0x337: 0x00c8, 0x33a: 0x0088, 0x33b: 0x00c8, - 0x33c: 0x00c8, 0x33d: 0x00c8, 0x33e: 0x0080, 0x33f: 0x00c8, - // Block 0xd, offset 0x340 - 0x344: 0x0088, 0x345: 0x0080, - 0x346: 0x00c8, 0x347: 0x0080, 0x348: 0x00c8, 0x349: 0x00c8, 0x34a: 0x00c8, - 0x34c: 0x00c8, 0x34e: 0x00c8, 0x34f: 0x00c8, 0x350: 0x00c8, 0x351: 0x00c8, - 0x352: 0x00c8, 0x353: 0x00c8, 0x354: 0x00c8, 0x355: 0x00c8, 0x356: 0x00c8, 0x357: 0x00c8, - 0x358: 0x00c8, 0x359: 0x00c8, 0x35a: 0x00c8, 0x35b: 0x00c8, 0x35c: 0x00c8, 0x35d: 0x00c8, - 0x35e: 0x00c8, 0x35f: 0x00c8, 0x360: 0x00c8, 0x361: 0x00c8, 0x363: 0x00c8, - 0x364: 0x00c8, 0x365: 0x00c8, 0x366: 0x00c8, 0x367: 0x00c8, 0x368: 0x00c8, 0x369: 0x00c8, - 0x36a: 0x00c8, 0x36b: 0x00c8, 0x36c: 0x00c8, 0x36d: 0x00c8, 0x36e: 0x00c8, 0x36f: 0x00c8, - 0x370: 0x00c8, 0x371: 0x00c8, 0x372: 0x00c8, 0x373: 0x00c8, 0x374: 0x00c8, 0x375: 0x00c8, - 0x376: 0x00c8, 0x377: 0x00c8, 0x378: 0x00c8, 0x379: 0x00c8, 0x37a: 0x00c8, 0x37b: 0x00c8, - 0x37c: 0x00c8, 0x37d: 0x00c8, 0x37e: 0x00c8, 0x37f: 0x00c8, - // Block 0xe, offset 0x380 - 0x380: 0x00c8, 0x381: 0x00c8, 0x382: 0x00c8, 0x383: 0x00c8, 0x384: 0x00c8, 0x385: 0x00c8, - 0x386: 0x00c8, 0x387: 0x00c8, 0x388: 0x00c8, 0x389: 0x00c8, 0x38a: 0x00c8, 0x38b: 0x00c8, - 0x38c: 0x00c8, 0x38d: 0x00c8, 0x38e: 0x00c8, 0x38f: 0x00c8, 0x390: 0x0088, 0x391: 0x0088, - 0x392: 0x0088, 0x393: 0x0088, 0x394: 0x0088, 0x395: 0x0088, 0x396: 0x0088, 0x397: 0x00c8, - 0x398: 0x00c8, 0x399: 0x00c8, 0x39a: 0x00c8, 0x39b: 0x00c8, 0x39c: 0x00c8, 0x39d: 0x00c8, - 0x39e: 0x00c8, 0x39f: 0x00c8, 0x3a0: 0x00c8, 0x3a1: 0x00c8, 0x3a2: 0x00c0, 0x3a3: 0x00c0, - 0x3a4: 0x00c0, 0x3a5: 0x00c0, 0x3a6: 0x00c0, 0x3a7: 0x00c0, 0x3a8: 0x00c0, 0x3a9: 0x00c0, - 0x3aa: 0x00c0, 0x3ab: 0x00c0, 0x3ac: 0x00c0, 0x3ad: 0x00c0, 0x3ae: 0x00c0, 0x3af: 0x00c0, - 0x3b0: 0x0088, 0x3b1: 0x0088, 0x3b2: 0x0088, 0x3b3: 0x00c8, 0x3b4: 0x0088, 0x3b5: 0x0088, - 0x3b6: 0x0088, 0x3b7: 0x00c8, 0x3b8: 0x00c8, 0x3b9: 0x0088, 0x3ba: 0x00c8, 0x3bb: 0x00c8, - 0x3bc: 0x00c8, 0x3bd: 0x00c8, 0x3be: 0x00c8, 0x3bf: 0x00c8, - // Block 0xf, offset 0x3c0 - 0x3c0: 0x00c0, 0x3c1: 0x00c0, 0x3c2: 0x0080, 0x3c3: 0x00c3, 0x3c4: 0x00c3, 0x3c5: 0x00c3, - 0x3c6: 0x00c3, 0x3c7: 0x00c3, 0x3c8: 0x0083, 0x3c9: 0x0083, 0x3ca: 0x00c0, 0x3cb: 0x00c0, - 0x3cc: 0x00c0, 0x3cd: 0x00c0, 0x3ce: 0x00c0, 0x3cf: 0x00c0, 0x3d0: 0x00c0, 0x3d1: 0x00c0, - 0x3d2: 0x00c0, 0x3d3: 0x00c0, 0x3d4: 0x00c0, 0x3d5: 0x00c0, 0x3d6: 0x00c0, 0x3d7: 0x00c0, - 0x3d8: 0x00c0, 0x3d9: 0x00c0, 0x3da: 0x00c0, 0x3db: 0x00c0, 0x3dc: 0x00c0, 0x3dd: 0x00c0, - 0x3de: 0x00c0, 0x3df: 0x00c0, 0x3e0: 0x00c0, 0x3e1: 0x00c0, 0x3e2: 0x00c0, 0x3e3: 0x00c0, - 0x3e4: 0x00c0, 0x3e5: 0x00c0, 0x3e6: 0x00c0, 0x3e7: 0x00c0, 0x3e8: 0x00c0, 0x3e9: 0x00c0, - 0x3ea: 0x00c0, 0x3eb: 0x00c0, 0x3ec: 0x00c0, 0x3ed: 0x00c0, 0x3ee: 0x00c0, 0x3ef: 0x00c0, - 0x3f0: 0x00c0, 0x3f1: 0x00c0, 0x3f2: 0x00c0, 0x3f3: 0x00c0, 0x3f4: 0x00c0, 0x3f5: 0x00c0, - 0x3f6: 0x00c0, 0x3f7: 0x00c0, 0x3f8: 0x00c0, 0x3f9: 0x00c0, 0x3fa: 0x00c0, 0x3fb: 0x00c0, - 0x3fc: 0x00c0, 0x3fd: 0x00c0, 0x3fe: 0x00c0, 0x3ff: 0x00c0, - // Block 0x10, offset 0x400 - 0x400: 0x00c0, 0x401: 0x00c0, 0x402: 0x00c0, 0x403: 0x00c0, 0x404: 0x00c0, 0x405: 0x00c0, - 0x406: 0x00c0, 0x407: 0x00c0, 0x408: 0x00c0, 0x409: 0x00c0, 0x40a: 0x00c0, 0x40b: 0x00c0, - 0x40c: 0x00c0, 0x40d: 0x00c0, 0x40e: 0x00c0, 0x40f: 0x00c0, 0x410: 0x00c0, 0x411: 0x00c0, - 0x412: 0x00c0, 0x413: 0x00c0, 0x414: 0x00c0, 0x415: 0x00c0, 0x416: 0x00c0, 0x417: 0x00c0, - 0x418: 0x00c0, 0x419: 0x00c0, 0x41a: 0x00c0, 0x41b: 0x00c0, 0x41c: 0x00c0, 0x41d: 0x00c0, - 0x41e: 0x00c0, 0x41f: 0x00c0, 0x420: 0x00c0, 0x421: 0x00c0, 0x422: 0x00c0, 0x423: 0x00c0, - 0x424: 0x00c0, 0x425: 0x00c0, 0x426: 0x00c0, 0x427: 0x00c0, 0x428: 0x00c0, 0x429: 0x00c0, - 0x42a: 0x00c0, 0x42b: 0x00c0, 0x42c: 0x00c0, 0x42d: 0x00c0, 0x42e: 0x00c0, 0x42f: 0x00c0, - 0x431: 0x00c0, 0x432: 0x00c0, 0x433: 0x00c0, 0x434: 0x00c0, 0x435: 0x00c0, - 0x436: 0x00c0, 0x437: 0x00c0, 0x438: 0x00c0, 0x439: 0x00c0, 0x43a: 0x00c0, 0x43b: 0x00c0, - 0x43c: 0x00c0, 0x43d: 0x00c0, 0x43e: 0x00c0, 0x43f: 0x00c0, - // Block 0x11, offset 0x440 - 0x440: 0x00c0, 0x441: 0x00c0, 0x442: 0x00c0, 0x443: 0x00c0, 0x444: 0x00c0, 0x445: 0x00c0, - 0x446: 0x00c0, 0x447: 0x00c0, 0x448: 0x00c0, 0x449: 0x00c0, 0x44a: 0x00c0, 0x44b: 0x00c0, - 0x44c: 0x00c0, 0x44d: 0x00c0, 0x44e: 0x00c0, 0x44f: 0x00c0, 0x450: 0x00c0, 0x451: 0x00c0, - 0x452: 0x00c0, 0x453: 0x00c0, 0x454: 0x00c0, 0x455: 0x00c0, 0x456: 0x00c0, - 0x459: 0x00c0, 0x45a: 0x0080, 0x45b: 0x0080, 0x45c: 0x0080, 0x45d: 0x0080, - 0x45e: 0x0080, 0x45f: 0x0080, 0x461: 0x00c0, 0x462: 0x00c0, 0x463: 0x00c0, - 0x464: 0x00c0, 0x465: 0x00c0, 0x466: 0x00c0, 0x467: 0x00c0, 0x468: 0x00c0, 0x469: 0x00c0, - 0x46a: 0x00c0, 0x46b: 0x00c0, 0x46c: 0x00c0, 0x46d: 0x00c0, 0x46e: 0x00c0, 0x46f: 0x00c0, - 0x470: 0x00c0, 0x471: 0x00c0, 0x472: 0x00c0, 0x473: 0x00c0, 0x474: 0x00c0, 0x475: 0x00c0, - 0x476: 0x00c0, 0x477: 0x00c0, 0x478: 0x00c0, 0x479: 0x00c0, 0x47a: 0x00c0, 0x47b: 0x00c0, - 0x47c: 0x00c0, 0x47d: 0x00c0, 0x47e: 0x00c0, 0x47f: 0x00c0, - // Block 0x12, offset 0x480 - 0x480: 0x00c0, 0x481: 0x00c0, 0x482: 0x00c0, 0x483: 0x00c0, 0x484: 0x00c0, 0x485: 0x00c0, - 0x486: 0x00c0, 0x487: 0x0080, 0x489: 0x0080, 0x48a: 0x0080, - 0x48d: 0x0080, 0x48e: 0x0080, 0x48f: 0x0080, 0x491: 0x00cb, - 0x492: 0x00cb, 0x493: 0x00cb, 0x494: 0x00cb, 0x495: 0x00cb, 0x496: 0x00cb, 0x497: 0x00cb, - 0x498: 0x00cb, 0x499: 0x00cb, 0x49a: 0x00cb, 0x49b: 0x00cb, 0x49c: 0x00cb, 0x49d: 0x00cb, - 0x49e: 0x00cb, 0x49f: 0x00cb, 0x4a0: 0x00cb, 0x4a1: 0x00cb, 0x4a2: 0x00cb, 0x4a3: 0x00cb, - 0x4a4: 0x00cb, 0x4a5: 0x00cb, 0x4a6: 0x00cb, 0x4a7: 0x00cb, 0x4a8: 0x00cb, 0x4a9: 0x00cb, - 0x4aa: 0x00cb, 0x4ab: 0x00cb, 0x4ac: 0x00cb, 0x4ad: 0x00cb, 0x4ae: 0x00cb, 0x4af: 0x00cb, - 0x4b0: 0x00cb, 0x4b1: 0x00cb, 0x4b2: 0x00cb, 0x4b3: 0x00cb, 0x4b4: 0x00cb, 0x4b5: 0x00cb, - 0x4b6: 0x00cb, 0x4b7: 0x00cb, 0x4b8: 0x00cb, 0x4b9: 0x00cb, 0x4ba: 0x00cb, 0x4bb: 0x00cb, - 0x4bc: 0x00cb, 0x4bd: 0x00cb, 0x4be: 0x008a, 0x4bf: 0x00cb, - // Block 0x13, offset 0x4c0 - 0x4c0: 0x008a, 0x4c1: 0x00cb, 0x4c2: 0x00cb, 0x4c3: 0x008a, 0x4c4: 0x00cb, 0x4c5: 0x00cb, - 0x4c6: 0x008a, 0x4c7: 0x00cb, - 0x4d0: 0x00ca, 0x4d1: 0x00ca, - 0x4d2: 0x00ca, 0x4d3: 0x00ca, 0x4d4: 0x00ca, 0x4d5: 0x00ca, 0x4d6: 0x00ca, 0x4d7: 0x00ca, - 0x4d8: 0x00ca, 0x4d9: 0x00ca, 0x4da: 0x00ca, 0x4db: 0x00ca, 0x4dc: 0x00ca, 0x4dd: 0x00ca, - 0x4de: 0x00ca, 0x4df: 0x00ca, 0x4e0: 0x00ca, 0x4e1: 0x00ca, 0x4e2: 0x00ca, 0x4e3: 0x00ca, - 0x4e4: 0x00ca, 0x4e5: 0x00ca, 0x4e6: 0x00ca, 0x4e7: 0x00ca, 0x4e8: 0x00ca, 0x4e9: 0x00ca, - 0x4ea: 0x00ca, - 0x4f0: 0x00ca, 0x4f1: 0x00ca, 0x4f2: 0x00ca, 0x4f3: 0x0051, 0x4f4: 0x0051, - // Block 0x14, offset 0x500 - 0x500: 0x0040, 0x501: 0x0040, 0x502: 0x0040, 0x503: 0x0040, 0x504: 0x0040, 0x505: 0x0040, - 0x506: 0x0080, 0x507: 0x0080, 0x508: 0x0080, 0x509: 0x0080, 0x50a: 0x0080, 0x50b: 0x0080, - 0x50c: 0x0080, 0x50d: 0x0080, 0x50e: 0x0080, 0x50f: 0x0080, 0x510: 0x00c3, 0x511: 0x00c3, - 0x512: 0x00c3, 0x513: 0x00c3, 0x514: 0x00c3, 0x515: 0x00c3, 0x516: 0x00c3, 0x517: 0x00c3, - 0x518: 0x00c3, 0x519: 0x00c3, 0x51a: 0x00c3, 0x51b: 0x0080, 0x51c: 0x0040, - 0x51e: 0x0080, 0x51f: 0x0080, 0x520: 0x00c2, 0x521: 0x00c0, 0x522: 0x00c4, 0x523: 0x00c4, - 0x524: 0x00c4, 0x525: 0x00c4, 0x526: 0x00c2, 0x527: 0x00c4, 0x528: 0x00c2, 0x529: 0x00c4, - 0x52a: 0x00c2, 0x52b: 0x00c2, 0x52c: 0x00c2, 0x52d: 0x00c2, 0x52e: 0x00c2, 0x52f: 0x00c4, - 0x530: 0x00c4, 0x531: 0x00c4, 0x532: 0x00c4, 0x533: 0x00c2, 0x534: 0x00c2, 0x535: 0x00c2, - 0x536: 0x00c2, 0x537: 0x00c2, 0x538: 0x00c2, 0x539: 0x00c2, 0x53a: 0x00c2, 0x53b: 0x00c2, - 0x53c: 0x00c2, 0x53d: 0x00c2, 0x53e: 0x00c2, 0x53f: 0x00c2, - // Block 0x15, offset 0x540 - 0x540: 0x0040, 0x541: 0x00c2, 0x542: 0x00c2, 0x543: 0x00c2, 0x544: 0x00c2, 0x545: 0x00c2, - 0x546: 0x00c2, 0x547: 0x00c2, 0x548: 0x00c4, 0x549: 0x00c2, 0x54a: 0x00c2, 0x54b: 0x00c3, - 0x54c: 0x00c3, 0x54d: 0x00c3, 0x54e: 0x00c3, 0x54f: 0x00c3, 0x550: 0x00c3, 0x551: 0x00c3, - 0x552: 0x00c3, 0x553: 0x00c3, 0x554: 0x00c3, 0x555: 0x00c3, 0x556: 0x00c3, 0x557: 0x00c3, - 0x558: 0x00c3, 0x559: 0x00c3, 0x55a: 0x00c3, 0x55b: 0x00c3, 0x55c: 0x00c3, 0x55d: 0x00c3, - 0x55e: 0x00c3, 0x55f: 0x00c3, 0x560: 0x0053, 0x561: 0x0053, 0x562: 0x0053, 0x563: 0x0053, - 0x564: 0x0053, 0x565: 0x0053, 0x566: 0x0053, 0x567: 0x0053, 0x568: 0x0053, 0x569: 0x0053, - 0x56a: 0x0080, 0x56b: 0x0080, 0x56c: 0x0080, 0x56d: 0x0080, 0x56e: 0x00c2, 0x56f: 0x00c2, - 0x570: 0x00c3, 0x571: 0x00c4, 0x572: 0x00c4, 0x573: 0x00c4, 0x574: 0x00c0, 0x575: 0x0084, - 0x576: 0x0084, 0x577: 0x0084, 0x578: 0x0082, 0x579: 0x00c2, 0x57a: 0x00c2, 0x57b: 0x00c2, - 0x57c: 0x00c2, 0x57d: 0x00c2, 0x57e: 0x00c2, 0x57f: 0x00c2, - // Block 0x16, offset 0x580 - 0x580: 0x00c2, 0x581: 0x00c2, 0x582: 0x00c2, 0x583: 0x00c2, 0x584: 0x00c2, 0x585: 0x00c2, - 0x586: 0x00c2, 0x587: 0x00c2, 0x588: 0x00c4, 0x589: 0x00c4, 0x58a: 0x00c4, 0x58b: 0x00c4, - 0x58c: 0x00c4, 0x58d: 0x00c4, 0x58e: 0x00c4, 0x58f: 0x00c4, 0x590: 0x00c4, 0x591: 0x00c4, - 0x592: 0x00c4, 0x593: 0x00c4, 0x594: 0x00c4, 0x595: 0x00c4, 0x596: 0x00c4, 0x597: 0x00c4, - 0x598: 0x00c4, 0x599: 0x00c4, 0x59a: 0x00c2, 0x59b: 0x00c2, 0x59c: 0x00c2, 0x59d: 0x00c2, - 0x59e: 0x00c2, 0x59f: 0x00c2, 0x5a0: 0x00c2, 0x5a1: 0x00c2, 0x5a2: 0x00c2, 0x5a3: 0x00c2, - 0x5a4: 0x00c2, 0x5a5: 0x00c2, 0x5a6: 0x00c2, 0x5a7: 0x00c2, 0x5a8: 0x00c2, 0x5a9: 0x00c2, - 0x5aa: 0x00c2, 0x5ab: 0x00c2, 0x5ac: 0x00c2, 0x5ad: 0x00c2, 0x5ae: 0x00c2, 0x5af: 0x00c2, - 0x5b0: 0x00c2, 0x5b1: 0x00c2, 0x5b2: 0x00c2, 0x5b3: 0x00c2, 0x5b4: 0x00c2, 0x5b5: 0x00c2, - 0x5b6: 0x00c2, 0x5b7: 0x00c2, 0x5b8: 0x00c2, 0x5b9: 0x00c2, 0x5ba: 0x00c2, 0x5bb: 0x00c2, - 0x5bc: 0x00c2, 0x5bd: 0x00c2, 0x5be: 0x00c2, 0x5bf: 0x00c2, - // Block 0x17, offset 0x5c0 - 0x5c0: 0x00c4, 0x5c1: 0x00c2, 0x5c2: 0x00c2, 0x5c3: 0x00c4, 0x5c4: 0x00c4, 0x5c5: 0x00c4, - 0x5c6: 0x00c4, 0x5c7: 0x00c4, 0x5c8: 0x00c4, 0x5c9: 0x00c4, 0x5ca: 0x00c4, 0x5cb: 0x00c4, - 0x5cc: 0x00c2, 0x5cd: 0x00c4, 0x5ce: 0x00c2, 0x5cf: 0x00c4, 0x5d0: 0x00c2, 0x5d1: 0x00c2, - 0x5d2: 0x00c4, 0x5d3: 0x00c4, 0x5d4: 0x0080, 0x5d5: 0x00c4, 0x5d6: 0x00c3, 0x5d7: 0x00c3, - 0x5d8: 0x00c3, 0x5d9: 0x00c3, 0x5da: 0x00c3, 0x5db: 0x00c3, 0x5dc: 0x00c3, 0x5dd: 0x0040, - 0x5de: 0x0080, 0x5df: 0x00c3, 0x5e0: 0x00c3, 0x5e1: 0x00c3, 0x5e2: 0x00c3, 0x5e3: 0x00c3, - 0x5e4: 0x00c3, 0x5e5: 0x00c0, 0x5e6: 0x00c0, 0x5e7: 0x00c3, 0x5e8: 0x00c3, 0x5e9: 0x0080, - 0x5ea: 0x00c3, 0x5eb: 0x00c3, 0x5ec: 0x00c3, 0x5ed: 0x00c3, 0x5ee: 0x00c4, 0x5ef: 0x00c4, - 0x5f0: 0x0054, 0x5f1: 0x0054, 0x5f2: 0x0054, 0x5f3: 0x0054, 0x5f4: 0x0054, 0x5f5: 0x0054, - 0x5f6: 0x0054, 0x5f7: 0x0054, 0x5f8: 0x0054, 0x5f9: 0x0054, 0x5fa: 0x00c2, 0x5fb: 0x00c2, - 0x5fc: 0x00c2, 0x5fd: 0x00c0, 0x5fe: 0x00c0, 0x5ff: 0x00c2, - // Block 0x18, offset 0x600 - 0x600: 0x0080, 0x601: 0x0080, 0x602: 0x0080, 0x603: 0x0080, 0x604: 0x0080, 0x605: 0x0080, - 0x606: 0x0080, 0x607: 0x0080, 0x608: 0x0080, 0x609: 0x0080, 0x60a: 0x0080, 0x60b: 0x0080, - 0x60c: 0x0080, 0x60d: 0x0080, 0x60f: 0x0040, 0x610: 0x00c4, 0x611: 0x00c3, - 0x612: 0x00c2, 0x613: 0x00c2, 0x614: 0x00c2, 0x615: 0x00c4, 0x616: 0x00c4, 0x617: 0x00c4, - 0x618: 0x00c4, 0x619: 0x00c4, 0x61a: 0x00c2, 0x61b: 0x00c2, 0x61c: 0x00c2, 0x61d: 0x00c2, - 0x61e: 0x00c4, 0x61f: 0x00c2, 0x620: 0x00c2, 0x621: 0x00c2, 0x622: 0x00c2, 0x623: 0x00c2, - 0x624: 0x00c2, 0x625: 0x00c2, 0x626: 0x00c2, 0x627: 0x00c2, 0x628: 0x00c4, 0x629: 0x00c2, - 0x62a: 0x00c4, 0x62b: 0x00c2, 0x62c: 0x00c4, 0x62d: 0x00c2, 0x62e: 0x00c2, 0x62f: 0x00c4, - 0x630: 0x00c3, 0x631: 0x00c3, 0x632: 0x00c3, 0x633: 0x00c3, 0x634: 0x00c3, 0x635: 0x00c3, - 0x636: 0x00c3, 0x637: 0x00c3, 0x638: 0x00c3, 0x639: 0x00c3, 0x63a: 0x00c3, 0x63b: 0x00c3, - 0x63c: 0x00c3, 0x63d: 0x00c3, 0x63e: 0x00c3, 0x63f: 0x00c3, - // Block 0x19, offset 0x640 - 0x640: 0x00c3, 0x641: 0x00c3, 0x642: 0x00c3, 0x643: 0x00c3, 0x644: 0x00c3, 0x645: 0x00c3, - 0x646: 0x00c3, 0x647: 0x00c3, 0x648: 0x00c3, 0x649: 0x00c3, 0x64a: 0x00c3, - 0x64d: 0x00c4, 0x64e: 0x00c2, 0x64f: 0x00c2, 0x650: 0x00c2, 0x651: 0x00c2, - 0x652: 0x00c2, 0x653: 0x00c2, 0x654: 0x00c2, 0x655: 0x00c2, 0x656: 0x00c2, 0x657: 0x00c2, - 0x658: 0x00c2, 0x659: 0x00c4, 0x65a: 0x00c4, 0x65b: 0x00c4, 0x65c: 0x00c2, 0x65d: 0x00c2, - 0x65e: 0x00c2, 0x65f: 0x00c2, 0x660: 0x00c2, 0x661: 0x00c2, 0x662: 0x00c2, 0x663: 0x00c2, - 0x664: 0x00c2, 0x665: 0x00c2, 0x666: 0x00c2, 0x667: 0x00c2, 0x668: 0x00c2, 0x669: 0x00c2, - 0x66a: 0x00c2, 0x66b: 0x00c4, 0x66c: 0x00c4, 0x66d: 0x00c2, 0x66e: 0x00c2, 0x66f: 0x00c2, - 0x670: 0x00c2, 0x671: 0x00c4, 0x672: 0x00c2, 0x673: 0x00c4, 0x674: 0x00c4, 0x675: 0x00c2, - 0x676: 0x00c2, 0x677: 0x00c2, 0x678: 0x00c4, 0x679: 0x00c4, 0x67a: 0x00c2, 0x67b: 0x00c2, - 0x67c: 0x00c2, 0x67d: 0x00c2, 0x67e: 0x00c2, 0x67f: 0x00c2, - // Block 0x1a, offset 0x680 - 0x680: 0x00c0, 0x681: 0x00c0, 0x682: 0x00c0, 0x683: 0x00c0, 0x684: 0x00c0, 0x685: 0x00c0, - 0x686: 0x00c0, 0x687: 0x00c0, 0x688: 0x00c0, 0x689: 0x00c0, 0x68a: 0x00c0, 0x68b: 0x00c0, - 0x68c: 0x00c0, 0x68d: 0x00c0, 0x68e: 0x00c0, 0x68f: 0x00c0, 0x690: 0x00c0, 0x691: 0x00c0, - 0x692: 0x00c0, 0x693: 0x00c0, 0x694: 0x00c0, 0x695: 0x00c0, 0x696: 0x00c0, 0x697: 0x00c0, - 0x698: 0x00c0, 0x699: 0x00c0, 0x69a: 0x00c0, 0x69b: 0x00c0, 0x69c: 0x00c0, 0x69d: 0x00c0, - 0x69e: 0x00c0, 0x69f: 0x00c0, 0x6a0: 0x00c0, 0x6a1: 0x00c0, 0x6a2: 0x00c0, 0x6a3: 0x00c0, - 0x6a4: 0x00c0, 0x6a5: 0x00c0, 0x6a6: 0x00c3, 0x6a7: 0x00c3, 0x6a8: 0x00c3, 0x6a9: 0x00c3, - 0x6aa: 0x00c3, 0x6ab: 0x00c3, 0x6ac: 0x00c3, 0x6ad: 0x00c3, 0x6ae: 0x00c3, 0x6af: 0x00c3, - 0x6b0: 0x00c3, 0x6b1: 0x00c0, - // Block 0x1b, offset 0x6c0 - 0x6c0: 0x00c0, 0x6c1: 0x00c0, 0x6c2: 0x00c0, 0x6c3: 0x00c0, 0x6c4: 0x00c0, 0x6c5: 0x00c0, - 0x6c6: 0x00c0, 0x6c7: 0x00c0, 0x6c8: 0x00c0, 0x6c9: 0x00c0, 0x6ca: 0x00c2, 0x6cb: 0x00c2, - 0x6cc: 0x00c2, 0x6cd: 0x00c2, 0x6ce: 0x00c2, 0x6cf: 0x00c2, 0x6d0: 0x00c2, 0x6d1: 0x00c2, - 0x6d2: 0x00c2, 0x6d3: 0x00c2, 0x6d4: 0x00c2, 0x6d5: 0x00c2, 0x6d6: 0x00c2, 0x6d7: 0x00c2, - 0x6d8: 0x00c2, 0x6d9: 0x00c2, 0x6da: 0x00c2, 0x6db: 0x00c2, 0x6dc: 0x00c2, 0x6dd: 0x00c2, - 0x6de: 0x00c2, 0x6df: 0x00c2, 0x6e0: 0x00c2, 0x6e1: 0x00c2, 0x6e2: 0x00c2, 0x6e3: 0x00c2, - 0x6e4: 0x00c2, 0x6e5: 0x00c2, 0x6e6: 0x00c2, 0x6e7: 0x00c2, 0x6e8: 0x00c2, 0x6e9: 0x00c2, - 0x6ea: 0x00c2, 0x6eb: 0x00c3, 0x6ec: 0x00c3, 0x6ed: 0x00c3, 0x6ee: 0x00c3, 0x6ef: 0x00c3, - 0x6f0: 0x00c3, 0x6f1: 0x00c3, 0x6f2: 0x00c3, 0x6f3: 0x00c3, 0x6f4: 0x00c0, 0x6f5: 0x00c0, - 0x6f6: 0x0080, 0x6f7: 0x0080, 0x6f8: 0x0080, 0x6f9: 0x0080, 0x6fa: 0x0040, - // Block 0x1c, offset 0x700 - 0x700: 0x00c0, 0x701: 0x00c0, 0x702: 0x00c0, 0x703: 0x00c0, 0x704: 0x00c0, 0x705: 0x00c0, - 0x706: 0x00c0, 0x707: 0x00c0, 0x708: 0x00c0, 0x709: 0x00c0, 0x70a: 0x00c0, 0x70b: 0x00c0, - 0x70c: 0x00c0, 0x70d: 0x00c0, 0x70e: 0x00c0, 0x70f: 0x00c0, 0x710: 0x00c0, 0x711: 0x00c0, - 0x712: 0x00c0, 0x713: 0x00c0, 0x714: 0x00c0, 0x715: 0x00c0, 0x716: 0x00c3, 0x717: 0x00c3, - 0x718: 0x00c3, 0x719: 0x00c3, 0x71a: 0x00c0, 0x71b: 0x00c3, 0x71c: 0x00c3, 0x71d: 0x00c3, - 0x71e: 0x00c3, 0x71f: 0x00c3, 0x720: 0x00c3, 0x721: 0x00c3, 0x722: 0x00c3, 0x723: 0x00c3, - 0x724: 0x00c0, 0x725: 0x00c3, 0x726: 0x00c3, 0x727: 0x00c3, 0x728: 0x00c0, 0x729: 0x00c3, - 0x72a: 0x00c3, 0x72b: 0x00c3, 0x72c: 0x00c3, 0x72d: 0x00c3, - 0x730: 0x0080, 0x731: 0x0080, 0x732: 0x0080, 0x733: 0x0080, 0x734: 0x0080, 0x735: 0x0080, - 0x736: 0x0080, 0x737: 0x0080, 0x738: 0x0080, 0x739: 0x0080, 0x73a: 0x0080, 0x73b: 0x0080, - 0x73c: 0x0080, 0x73d: 0x0080, 0x73e: 0x0080, - // Block 0x1d, offset 0x740 - 0x740: 0x00c4, 0x741: 0x00c2, 0x742: 0x00c2, 0x743: 0x00c2, 0x744: 0x00c2, 0x745: 0x00c2, - 0x746: 0x00c4, 0x747: 0x00c4, 0x748: 0x00c2, 0x749: 0x00c4, 0x74a: 0x00c2, 0x74b: 0x00c2, - 0x74c: 0x00c2, 0x74d: 0x00c2, 0x74e: 0x00c2, 0x74f: 0x00c2, 0x750: 0x00c2, 0x751: 0x00c2, - 0x752: 0x00c2, 0x753: 0x00c2, 0x754: 0x00c4, 0x755: 0x00c2, 0x756: 0x00c0, 0x757: 0x00c0, - 0x758: 0x00c0, 0x759: 0x00c3, 0x75a: 0x00c3, 0x75b: 0x00c3, - 0x75e: 0x0080, - // Block 0x1e, offset 0x780 - 0x7a0: 0x00c2, 0x7a1: 0x00c2, 0x7a2: 0x00c2, 0x7a3: 0x00c2, - 0x7a4: 0x00c2, 0x7a5: 0x00c2, 0x7a6: 0x00c2, 0x7a7: 0x00c2, 0x7a8: 0x00c2, 0x7a9: 0x00c2, - 0x7aa: 0x00c4, 0x7ab: 0x00c4, 0x7ac: 0x00c4, 0x7ad: 0x00c0, 0x7ae: 0x00c4, 0x7af: 0x00c2, - 0x7b0: 0x00c2, 0x7b1: 0x00c4, 0x7b2: 0x00c4, 0x7b3: 0x00c2, 0x7b4: 0x00c2, - 0x7b6: 0x00c2, 0x7b7: 0x00c2, 0x7b8: 0x00c2, 0x7b9: 0x00c4, 0x7ba: 0x00c2, 0x7bb: 0x00c2, - 0x7bc: 0x00c2, 0x7bd: 0x00c2, - // Block 0x1f, offset 0x7c0 - 0x7d4: 0x00c3, 0x7d5: 0x00c3, 0x7d6: 0x00c3, 0x7d7: 0x00c3, - 0x7d8: 0x00c3, 0x7d9: 0x00c3, 0x7da: 0x00c3, 0x7db: 0x00c3, 0x7dc: 0x00c3, 0x7dd: 0x00c3, - 0x7de: 0x00c3, 0x7df: 0x00c3, 0x7e0: 0x00c3, 0x7e1: 0x00c3, 0x7e2: 0x0040, 0x7e3: 0x00c3, - 0x7e4: 0x00c3, 0x7e5: 0x00c3, 0x7e6: 0x00c3, 0x7e7: 0x00c3, 0x7e8: 0x00c3, 0x7e9: 0x00c3, - 0x7ea: 0x00c3, 0x7eb: 0x00c3, 0x7ec: 0x00c3, 0x7ed: 0x00c3, 0x7ee: 0x00c3, 0x7ef: 0x00c3, - 0x7f0: 0x00c3, 0x7f1: 0x00c3, 0x7f2: 0x00c3, 0x7f3: 0x00c3, 0x7f4: 0x00c3, 0x7f5: 0x00c3, - 0x7f6: 0x00c3, 0x7f7: 0x00c3, 0x7f8: 0x00c3, 0x7f9: 0x00c3, 0x7fa: 0x00c3, 0x7fb: 0x00c3, - 0x7fc: 0x00c3, 0x7fd: 0x00c3, 0x7fe: 0x00c3, 0x7ff: 0x00c3, - // Block 0x20, offset 0x800 - 0x800: 0x00c3, 0x801: 0x00c3, 0x802: 0x00c3, 0x803: 0x00c0, 0x804: 0x00c0, 0x805: 0x00c0, - 0x806: 0x00c0, 0x807: 0x00c0, 0x808: 0x00c0, 0x809: 0x00c0, 0x80a: 0x00c0, 0x80b: 0x00c0, - 0x80c: 0x00c0, 0x80d: 0x00c0, 0x80e: 0x00c0, 0x80f: 0x00c0, 0x810: 0x00c0, 0x811: 0x00c0, - 0x812: 0x00c0, 0x813: 0x00c0, 0x814: 0x00c0, 0x815: 0x00c0, 0x816: 0x00c0, 0x817: 0x00c0, - 0x818: 0x00c0, 0x819: 0x00c0, 0x81a: 0x00c0, 0x81b: 0x00c0, 0x81c: 0x00c0, 0x81d: 0x00c0, - 0x81e: 0x00c0, 0x81f: 0x00c0, 0x820: 0x00c0, 0x821: 0x00c0, 0x822: 0x00c0, 0x823: 0x00c0, - 0x824: 0x00c0, 0x825: 0x00c0, 0x826: 0x00c0, 0x827: 0x00c0, 0x828: 0x00c0, 0x829: 0x00c0, - 0x82a: 0x00c0, 0x82b: 0x00c0, 0x82c: 0x00c0, 0x82d: 0x00c0, 0x82e: 0x00c0, 0x82f: 0x00c0, - 0x830: 0x00c0, 0x831: 0x00c0, 0x832: 0x00c0, 0x833: 0x00c0, 0x834: 0x00c0, 0x835: 0x00c0, - 0x836: 0x00c0, 0x837: 0x00c0, 0x838: 0x00c0, 0x839: 0x00c0, 0x83a: 0x00c3, 0x83b: 0x00c0, - 0x83c: 0x00c3, 0x83d: 0x00c0, 0x83e: 0x00c0, 0x83f: 0x00c0, - // Block 0x21, offset 0x840 - 0x840: 0x00c0, 0x841: 0x00c3, 0x842: 0x00c3, 0x843: 0x00c3, 0x844: 0x00c3, 0x845: 0x00c3, - 0x846: 0x00c3, 0x847: 0x00c3, 0x848: 0x00c3, 0x849: 0x00c0, 0x84a: 0x00c0, 0x84b: 0x00c0, - 0x84c: 0x00c0, 0x84d: 0x00c6, 0x84e: 0x00c0, 0x84f: 0x00c0, 0x850: 0x00c0, 0x851: 0x00c3, - 0x852: 0x00c3, 0x853: 0x00c3, 0x854: 0x00c3, 0x855: 0x00c3, 0x856: 0x00c3, 0x857: 0x00c3, - 0x858: 0x0080, 0x859: 0x0080, 0x85a: 0x0080, 0x85b: 0x0080, 0x85c: 0x0080, 0x85d: 0x0080, - 0x85e: 0x0080, 0x85f: 0x0080, 0x860: 0x00c0, 0x861: 0x00c0, 0x862: 0x00c3, 0x863: 0x00c3, - 0x864: 0x0080, 0x865: 0x0080, 0x866: 0x00c0, 0x867: 0x00c0, 0x868: 0x00c0, 0x869: 0x00c0, - 0x86a: 0x00c0, 0x86b: 0x00c0, 0x86c: 0x00c0, 0x86d: 0x00c0, 0x86e: 0x00c0, 0x86f: 0x00c0, - 0x870: 0x0080, 0x871: 0x00c0, 0x872: 0x00c0, 0x873: 0x00c0, 0x874: 0x00c0, 0x875: 0x00c0, - 0x876: 0x00c0, 0x877: 0x00c0, 0x878: 0x00c0, 0x879: 0x00c0, 0x87a: 0x00c0, 0x87b: 0x00c0, - 0x87c: 0x00c0, 0x87d: 0x00c0, 0x87e: 0x00c0, 0x87f: 0x00c0, - // Block 0x22, offset 0x880 - 0x880: 0x00c0, 0x881: 0x00c3, 0x882: 0x00c0, 0x883: 0x00c0, 0x885: 0x00c0, - 0x886: 0x00c0, 0x887: 0x00c0, 0x888: 0x00c0, 0x889: 0x00c0, 0x88a: 0x00c0, 0x88b: 0x00c0, - 0x88c: 0x00c0, 0x88f: 0x00c0, 0x890: 0x00c0, - 0x893: 0x00c0, 0x894: 0x00c0, 0x895: 0x00c0, 0x896: 0x00c0, 0x897: 0x00c0, - 0x898: 0x00c0, 0x899: 0x00c0, 0x89a: 0x00c0, 0x89b: 0x00c0, 0x89c: 0x00c0, 0x89d: 0x00c0, - 0x89e: 0x00c0, 0x89f: 0x00c0, 0x8a0: 0x00c0, 0x8a1: 0x00c0, 0x8a2: 0x00c0, 0x8a3: 0x00c0, - 0x8a4: 0x00c0, 0x8a5: 0x00c0, 0x8a6: 0x00c0, 0x8a7: 0x00c0, 0x8a8: 0x00c0, - 0x8aa: 0x00c0, 0x8ab: 0x00c0, 0x8ac: 0x00c0, 0x8ad: 0x00c0, 0x8ae: 0x00c0, 0x8af: 0x00c0, - 0x8b0: 0x00c0, 0x8b2: 0x00c0, - 0x8b6: 0x00c0, 0x8b7: 0x00c0, 0x8b8: 0x00c0, 0x8b9: 0x00c0, - 0x8bc: 0x00c3, 0x8bd: 0x00c0, 0x8be: 0x00c0, 0x8bf: 0x00c0, - // Block 0x23, offset 0x8c0 - 0x8c0: 0x00c0, 0x8c1: 0x00c3, 0x8c2: 0x00c3, 0x8c3: 0x00c3, 0x8c4: 0x00c3, - 0x8c7: 0x00c0, 0x8c8: 0x00c0, 0x8cb: 0x00c0, - 0x8cc: 0x00c0, 0x8cd: 0x00c6, 0x8ce: 0x00c0, - 0x8d7: 0x00c0, - 0x8dc: 0x0080, 0x8dd: 0x0080, - 0x8df: 0x0080, 0x8e0: 0x00c0, 0x8e1: 0x00c0, 0x8e2: 0x00c3, 0x8e3: 0x00c3, - 0x8e6: 0x00c0, 0x8e7: 0x00c0, 0x8e8: 0x00c0, 0x8e9: 0x00c0, - 0x8ea: 0x00c0, 0x8eb: 0x00c0, 0x8ec: 0x00c0, 0x8ed: 0x00c0, 0x8ee: 0x00c0, 0x8ef: 0x00c0, - 0x8f0: 0x00c0, 0x8f1: 0x00c0, 0x8f2: 0x0080, 0x8f3: 0x0080, 0x8f4: 0x0080, 0x8f5: 0x0080, - 0x8f6: 0x0080, 0x8f7: 0x0080, 0x8f8: 0x0080, 0x8f9: 0x0080, 0x8fa: 0x0080, 0x8fb: 0x0080, - // Block 0x24, offset 0x900 - 0x901: 0x00c3, 0x902: 0x00c3, 0x903: 0x00c0, 0x905: 0x00c0, - 0x906: 0x00c0, 0x907: 0x00c0, 0x908: 0x00c0, 0x909: 0x00c0, 0x90a: 0x00c0, - 0x90f: 0x00c0, 0x910: 0x00c0, - 0x913: 0x00c0, 0x914: 0x00c0, 0x915: 0x00c0, 0x916: 0x00c0, 0x917: 0x00c0, - 0x918: 0x00c0, 0x919: 0x00c0, 0x91a: 0x00c0, 0x91b: 0x00c0, 0x91c: 0x00c0, 0x91d: 0x00c0, - 0x91e: 0x00c0, 0x91f: 0x00c0, 0x920: 0x00c0, 0x921: 0x00c0, 0x922: 0x00c0, 0x923: 0x00c0, - 0x924: 0x00c0, 0x925: 0x00c0, 0x926: 0x00c0, 0x927: 0x00c0, 0x928: 0x00c0, - 0x92a: 0x00c0, 0x92b: 0x00c0, 0x92c: 0x00c0, 0x92d: 0x00c0, 0x92e: 0x00c0, 0x92f: 0x00c0, - 0x930: 0x00c0, 0x932: 0x00c0, 0x933: 0x0080, 0x935: 0x00c0, - 0x936: 0x0080, 0x938: 0x00c0, 0x939: 0x00c0, - 0x93c: 0x00c3, 0x93e: 0x00c0, 0x93f: 0x00c0, - // Block 0x25, offset 0x940 - 0x940: 0x00c0, 0x941: 0x00c3, 0x942: 0x00c3, - 0x947: 0x00c3, 0x948: 0x00c3, 0x94b: 0x00c3, - 0x94c: 0x00c3, 0x94d: 0x00c6, 0x951: 0x00c3, - 0x959: 0x0080, 0x95a: 0x0080, 0x95b: 0x0080, 0x95c: 0x00c0, - 0x95e: 0x0080, - 0x966: 0x00c0, 0x967: 0x00c0, 0x968: 0x00c0, 0x969: 0x00c0, - 0x96a: 0x00c0, 0x96b: 0x00c0, 0x96c: 0x00c0, 0x96d: 0x00c0, 0x96e: 0x00c0, 0x96f: 0x00c0, - 0x970: 0x00c3, 0x971: 0x00c3, 0x972: 0x00c0, 0x973: 0x00c0, 0x974: 0x00c0, 0x975: 0x00c3, - // Block 0x26, offset 0x980 - 0x981: 0x00c3, 0x982: 0x00c3, 0x983: 0x00c0, 0x985: 0x00c0, - 0x986: 0x00c0, 0x987: 0x00c0, 0x988: 0x00c0, 0x989: 0x00c0, 0x98a: 0x00c0, 0x98b: 0x00c0, - 0x98c: 0x00c0, 0x98d: 0x00c0, 0x98f: 0x00c0, 0x990: 0x00c0, 0x991: 0x00c0, - 0x993: 0x00c0, 0x994: 0x00c0, 0x995: 0x00c0, 0x996: 0x00c0, 0x997: 0x00c0, - 0x998: 0x00c0, 0x999: 0x00c0, 0x99a: 0x00c0, 0x99b: 0x00c0, 0x99c: 0x00c0, 0x99d: 0x00c0, - 0x99e: 0x00c0, 0x99f: 0x00c0, 0x9a0: 0x00c0, 0x9a1: 0x00c0, 0x9a2: 0x00c0, 0x9a3: 0x00c0, - 0x9a4: 0x00c0, 0x9a5: 0x00c0, 0x9a6: 0x00c0, 0x9a7: 0x00c0, 0x9a8: 0x00c0, - 0x9aa: 0x00c0, 0x9ab: 0x00c0, 0x9ac: 0x00c0, 0x9ad: 0x00c0, 0x9ae: 0x00c0, 0x9af: 0x00c0, - 0x9b0: 0x00c0, 0x9b2: 0x00c0, 0x9b3: 0x00c0, 0x9b5: 0x00c0, - 0x9b6: 0x00c0, 0x9b7: 0x00c0, 0x9b8: 0x00c0, 0x9b9: 0x00c0, - 0x9bc: 0x00c3, 0x9bd: 0x00c0, 0x9be: 0x00c0, 0x9bf: 0x00c0, - // Block 0x27, offset 0x9c0 - 0x9c0: 0x00c0, 0x9c1: 0x00c3, 0x9c2: 0x00c3, 0x9c3: 0x00c3, 0x9c4: 0x00c3, 0x9c5: 0x00c3, - 0x9c7: 0x00c3, 0x9c8: 0x00c3, 0x9c9: 0x00c0, 0x9cb: 0x00c0, - 0x9cc: 0x00c0, 0x9cd: 0x00c6, 0x9d0: 0x00c0, - 0x9e0: 0x00c0, 0x9e1: 0x00c0, 0x9e2: 0x00c3, 0x9e3: 0x00c3, - 0x9e6: 0x00c0, 0x9e7: 0x00c0, 0x9e8: 0x00c0, 0x9e9: 0x00c0, - 0x9ea: 0x00c0, 0x9eb: 0x00c0, 0x9ec: 0x00c0, 0x9ed: 0x00c0, 0x9ee: 0x00c0, 0x9ef: 0x00c0, - 0x9f0: 0x0080, 0x9f1: 0x0080, - 0x9f9: 0x00c0, - // Block 0x28, offset 0xa00 - 0xa01: 0x00c3, 0xa02: 0x00c0, 0xa03: 0x00c0, 0xa05: 0x00c0, - 0xa06: 0x00c0, 0xa07: 0x00c0, 0xa08: 0x00c0, 0xa09: 0x00c0, 0xa0a: 0x00c0, 0xa0b: 0x00c0, - 0xa0c: 0x00c0, 0xa0f: 0x00c0, 0xa10: 0x00c0, - 0xa13: 0x00c0, 0xa14: 0x00c0, 0xa15: 0x00c0, 0xa16: 0x00c0, 0xa17: 0x00c0, - 0xa18: 0x00c0, 0xa19: 0x00c0, 0xa1a: 0x00c0, 0xa1b: 0x00c0, 0xa1c: 0x00c0, 0xa1d: 0x00c0, - 0xa1e: 0x00c0, 0xa1f: 0x00c0, 0xa20: 0x00c0, 0xa21: 0x00c0, 0xa22: 0x00c0, 0xa23: 0x00c0, - 0xa24: 0x00c0, 0xa25: 0x00c0, 0xa26: 0x00c0, 0xa27: 0x00c0, 0xa28: 0x00c0, - 0xa2a: 0x00c0, 0xa2b: 0x00c0, 0xa2c: 0x00c0, 0xa2d: 0x00c0, 0xa2e: 0x00c0, 0xa2f: 0x00c0, - 0xa30: 0x00c0, 0xa32: 0x00c0, 0xa33: 0x00c0, 0xa35: 0x00c0, - 0xa36: 0x00c0, 0xa37: 0x00c0, 0xa38: 0x00c0, 0xa39: 0x00c0, - 0xa3c: 0x00c3, 0xa3d: 0x00c0, 0xa3e: 0x00c0, 0xa3f: 0x00c3, - // Block 0x29, offset 0xa40 - 0xa40: 0x00c0, 0xa41: 0x00c3, 0xa42: 0x00c3, 0xa43: 0x00c3, 0xa44: 0x00c3, - 0xa47: 0x00c0, 0xa48: 0x00c0, 0xa4b: 0x00c0, - 0xa4c: 0x00c0, 0xa4d: 0x00c6, - 0xa56: 0x00c3, 0xa57: 0x00c0, - 0xa5c: 0x0080, 0xa5d: 0x0080, - 0xa5f: 0x00c0, 0xa60: 0x00c0, 0xa61: 0x00c0, 0xa62: 0x00c3, 0xa63: 0x00c3, - 0xa66: 0x00c0, 0xa67: 0x00c0, 0xa68: 0x00c0, 0xa69: 0x00c0, - 0xa6a: 0x00c0, 0xa6b: 0x00c0, 0xa6c: 0x00c0, 0xa6d: 0x00c0, 0xa6e: 0x00c0, 0xa6f: 0x00c0, - 0xa70: 0x0080, 0xa71: 0x00c0, 0xa72: 0x0080, 0xa73: 0x0080, 0xa74: 0x0080, 0xa75: 0x0080, - 0xa76: 0x0080, 0xa77: 0x0080, - // Block 0x2a, offset 0xa80 - 0xa82: 0x00c3, 0xa83: 0x00c0, 0xa85: 0x00c0, - 0xa86: 0x00c0, 0xa87: 0x00c0, 0xa88: 0x00c0, 0xa89: 0x00c0, 0xa8a: 0x00c0, - 0xa8e: 0x00c0, 0xa8f: 0x00c0, 0xa90: 0x00c0, - 0xa92: 0x00c0, 0xa93: 0x00c0, 0xa94: 0x00c0, 0xa95: 0x00c0, - 0xa99: 0x00c0, 0xa9a: 0x00c0, 0xa9c: 0x00c0, - 0xa9e: 0x00c0, 0xa9f: 0x00c0, 0xaa3: 0x00c0, - 0xaa4: 0x00c0, 0xaa8: 0x00c0, 0xaa9: 0x00c0, - 0xaaa: 0x00c0, 0xaae: 0x00c0, 0xaaf: 0x00c0, - 0xab0: 0x00c0, 0xab1: 0x00c0, 0xab2: 0x00c0, 0xab3: 0x00c0, 0xab4: 0x00c0, 0xab5: 0x00c0, - 0xab6: 0x00c0, 0xab7: 0x00c0, 0xab8: 0x00c0, 0xab9: 0x00c0, - 0xabe: 0x00c0, 0xabf: 0x00c0, - // Block 0x2b, offset 0xac0 - 0xac0: 0x00c3, 0xac1: 0x00c0, 0xac2: 0x00c0, - 0xac6: 0x00c0, 0xac7: 0x00c0, 0xac8: 0x00c0, 0xaca: 0x00c0, 0xacb: 0x00c0, - 0xacc: 0x00c0, 0xacd: 0x00c6, 0xad0: 0x00c0, - 0xad7: 0x00c0, - 0xae6: 0x00c0, 0xae7: 0x00c0, 0xae8: 0x00c0, 0xae9: 0x00c0, - 0xaea: 0x00c0, 0xaeb: 0x00c0, 0xaec: 0x00c0, 0xaed: 0x00c0, 0xaee: 0x00c0, 0xaef: 0x00c0, - 0xaf0: 0x0080, 0xaf1: 0x0080, 0xaf2: 0x0080, 0xaf3: 0x0080, 0xaf4: 0x0080, 0xaf5: 0x0080, - 0xaf6: 0x0080, 0xaf7: 0x0080, 0xaf8: 0x0080, 0xaf9: 0x0080, 0xafa: 0x0080, - // Block 0x2c, offset 0xb00 - 0xb00: 0x00c3, 0xb01: 0x00c0, 0xb02: 0x00c0, 0xb03: 0x00c0, 0xb05: 0x00c0, - 0xb06: 0x00c0, 0xb07: 0x00c0, 0xb08: 0x00c0, 0xb09: 0x00c0, 0xb0a: 0x00c0, 0xb0b: 0x00c0, - 0xb0c: 0x00c0, 0xb0e: 0x00c0, 0xb0f: 0x00c0, 0xb10: 0x00c0, - 0xb12: 0x00c0, 0xb13: 0x00c0, 0xb14: 0x00c0, 0xb15: 0x00c0, 0xb16: 0x00c0, 0xb17: 0x00c0, - 0xb18: 0x00c0, 0xb19: 0x00c0, 0xb1a: 0x00c0, 0xb1b: 0x00c0, 0xb1c: 0x00c0, 0xb1d: 0x00c0, - 0xb1e: 0x00c0, 0xb1f: 0x00c0, 0xb20: 0x00c0, 0xb21: 0x00c0, 0xb22: 0x00c0, 0xb23: 0x00c0, - 0xb24: 0x00c0, 0xb25: 0x00c0, 0xb26: 0x00c0, 0xb27: 0x00c0, 0xb28: 0x00c0, - 0xb2a: 0x00c0, 0xb2b: 0x00c0, 0xb2c: 0x00c0, 0xb2d: 0x00c0, 0xb2e: 0x00c0, 0xb2f: 0x00c0, - 0xb30: 0x00c0, 0xb31: 0x00c0, 0xb32: 0x00c0, 0xb33: 0x00c0, 0xb34: 0x00c0, 0xb35: 0x00c0, - 0xb36: 0x00c0, 0xb37: 0x00c0, 0xb38: 0x00c0, 0xb39: 0x00c0, - 0xb3d: 0x00c0, 0xb3e: 0x00c3, 0xb3f: 0x00c3, - // Block 0x2d, offset 0xb40 - 0xb40: 0x00c3, 0xb41: 0x00c0, 0xb42: 0x00c0, 0xb43: 0x00c0, 0xb44: 0x00c0, - 0xb46: 0x00c3, 0xb47: 0x00c3, 0xb48: 0x00c3, 0xb4a: 0x00c3, 0xb4b: 0x00c3, - 0xb4c: 0x00c3, 0xb4d: 0x00c6, - 0xb55: 0x00c3, 0xb56: 0x00c3, - 0xb58: 0x00c0, 0xb59: 0x00c0, 0xb5a: 0x00c0, - 0xb60: 0x00c0, 0xb61: 0x00c0, 0xb62: 0x00c3, 0xb63: 0x00c3, - 0xb66: 0x00c0, 0xb67: 0x00c0, 0xb68: 0x00c0, 0xb69: 0x00c0, - 0xb6a: 0x00c0, 0xb6b: 0x00c0, 0xb6c: 0x00c0, 0xb6d: 0x00c0, 0xb6e: 0x00c0, 0xb6f: 0x00c0, - 0xb78: 0x0080, 0xb79: 0x0080, 0xb7a: 0x0080, 0xb7b: 0x0080, - 0xb7c: 0x0080, 0xb7d: 0x0080, 0xb7e: 0x0080, 0xb7f: 0x0080, - // Block 0x2e, offset 0xb80 - 0xb80: 0x00c0, 0xb81: 0x00c3, 0xb82: 0x00c0, 0xb83: 0x00c0, 0xb85: 0x00c0, - 0xb86: 0x00c0, 0xb87: 0x00c0, 0xb88: 0x00c0, 0xb89: 0x00c0, 0xb8a: 0x00c0, 0xb8b: 0x00c0, - 0xb8c: 0x00c0, 0xb8e: 0x00c0, 0xb8f: 0x00c0, 0xb90: 0x00c0, - 0xb92: 0x00c0, 0xb93: 0x00c0, 0xb94: 0x00c0, 0xb95: 0x00c0, 0xb96: 0x00c0, 0xb97: 0x00c0, - 0xb98: 0x00c0, 0xb99: 0x00c0, 0xb9a: 0x00c0, 0xb9b: 0x00c0, 0xb9c: 0x00c0, 0xb9d: 0x00c0, - 0xb9e: 0x00c0, 0xb9f: 0x00c0, 0xba0: 0x00c0, 0xba1: 0x00c0, 0xba2: 0x00c0, 0xba3: 0x00c0, - 0xba4: 0x00c0, 0xba5: 0x00c0, 0xba6: 0x00c0, 0xba7: 0x00c0, 0xba8: 0x00c0, - 0xbaa: 0x00c0, 0xbab: 0x00c0, 0xbac: 0x00c0, 0xbad: 0x00c0, 0xbae: 0x00c0, 0xbaf: 0x00c0, - 0xbb0: 0x00c0, 0xbb1: 0x00c0, 0xbb2: 0x00c0, 0xbb3: 0x00c0, 0xbb5: 0x00c0, - 0xbb6: 0x00c0, 0xbb7: 0x00c0, 0xbb8: 0x00c0, 0xbb9: 0x00c0, - 0xbbc: 0x00c3, 0xbbd: 0x00c0, 0xbbe: 0x00c0, 0xbbf: 0x00c3, - // Block 0x2f, offset 0xbc0 - 0xbc0: 0x00c0, 0xbc1: 0x00c0, 0xbc2: 0x00c0, 0xbc3: 0x00c0, 0xbc4: 0x00c0, - 0xbc6: 0x00c3, 0xbc7: 0x00c0, 0xbc8: 0x00c0, 0xbca: 0x00c0, 0xbcb: 0x00c0, - 0xbcc: 0x00c3, 0xbcd: 0x00c6, - 0xbd5: 0x00c0, 0xbd6: 0x00c0, - 0xbde: 0x00c0, 0xbe0: 0x00c0, 0xbe1: 0x00c0, 0xbe2: 0x00c3, 0xbe3: 0x00c3, - 0xbe6: 0x00c0, 0xbe7: 0x00c0, 0xbe8: 0x00c0, 0xbe9: 0x00c0, - 0xbea: 0x00c0, 0xbeb: 0x00c0, 0xbec: 0x00c0, 0xbed: 0x00c0, 0xbee: 0x00c0, 0xbef: 0x00c0, - 0xbf1: 0x00c0, 0xbf2: 0x00c0, - // Block 0x30, offset 0xc00 - 0xc01: 0x00c3, 0xc02: 0x00c0, 0xc03: 0x00c0, 0xc05: 0x00c0, - 0xc06: 0x00c0, 0xc07: 0x00c0, 0xc08: 0x00c0, 0xc09: 0x00c0, 0xc0a: 0x00c0, 0xc0b: 0x00c0, - 0xc0c: 0x00c0, 0xc0e: 0x00c0, 0xc0f: 0x00c0, 0xc10: 0x00c0, - 0xc12: 0x00c0, 0xc13: 0x00c0, 0xc14: 0x00c0, 0xc15: 0x00c0, 0xc16: 0x00c0, 0xc17: 0x00c0, - 0xc18: 0x00c0, 0xc19: 0x00c0, 0xc1a: 0x00c0, 0xc1b: 0x00c0, 0xc1c: 0x00c0, 0xc1d: 0x00c0, - 0xc1e: 0x00c0, 0xc1f: 0x00c0, 0xc20: 0x00c0, 0xc21: 0x00c0, 0xc22: 0x00c0, 0xc23: 0x00c0, - 0xc24: 0x00c0, 0xc25: 0x00c0, 0xc26: 0x00c0, 0xc27: 0x00c0, 0xc28: 0x00c0, 0xc29: 0x00c0, - 0xc2a: 0x00c0, 0xc2b: 0x00c0, 0xc2c: 0x00c0, 0xc2d: 0x00c0, 0xc2e: 0x00c0, 0xc2f: 0x00c0, - 0xc30: 0x00c0, 0xc31: 0x00c0, 0xc32: 0x00c0, 0xc33: 0x00c0, 0xc34: 0x00c0, 0xc35: 0x00c0, - 0xc36: 0x00c0, 0xc37: 0x00c0, 0xc38: 0x00c0, 0xc39: 0x00c0, 0xc3a: 0x00c0, - 0xc3d: 0x00c0, 0xc3e: 0x00c0, 0xc3f: 0x00c0, - // Block 0x31, offset 0xc40 - 0xc40: 0x00c0, 0xc41: 0x00c3, 0xc42: 0x00c3, 0xc43: 0x00c3, 0xc44: 0x00c3, - 0xc46: 0x00c0, 0xc47: 0x00c0, 0xc48: 0x00c0, 0xc4a: 0x00c0, 0xc4b: 0x00c0, - 0xc4c: 0x00c0, 0xc4d: 0x00c6, 0xc4e: 0x00c0, 0xc4f: 0x0080, - 0xc54: 0x00c0, 0xc55: 0x00c0, 0xc56: 0x00c0, 0xc57: 0x00c0, - 0xc58: 0x0080, 0xc59: 0x0080, 0xc5a: 0x0080, 0xc5b: 0x0080, 0xc5c: 0x0080, 0xc5d: 0x0080, - 0xc5e: 0x0080, 0xc5f: 0x00c0, 0xc60: 0x00c0, 0xc61: 0x00c0, 0xc62: 0x00c3, 0xc63: 0x00c3, - 0xc66: 0x00c0, 0xc67: 0x00c0, 0xc68: 0x00c0, 0xc69: 0x00c0, - 0xc6a: 0x00c0, 0xc6b: 0x00c0, 0xc6c: 0x00c0, 0xc6d: 0x00c0, 0xc6e: 0x00c0, 0xc6f: 0x00c0, - 0xc70: 0x0080, 0xc71: 0x0080, 0xc72: 0x0080, 0xc73: 0x0080, 0xc74: 0x0080, 0xc75: 0x0080, - 0xc76: 0x0080, 0xc77: 0x0080, 0xc78: 0x0080, 0xc79: 0x0080, 0xc7a: 0x00c0, 0xc7b: 0x00c0, - 0xc7c: 0x00c0, 0xc7d: 0x00c0, 0xc7e: 0x00c0, 0xc7f: 0x00c0, - // Block 0x32, offset 0xc80 - 0xc82: 0x00c0, 0xc83: 0x00c0, 0xc85: 0x00c0, - 0xc86: 0x00c0, 0xc87: 0x00c0, 0xc88: 0x00c0, 0xc89: 0x00c0, 0xc8a: 0x00c0, 0xc8b: 0x00c0, - 0xc8c: 0x00c0, 0xc8d: 0x00c0, 0xc8e: 0x00c0, 0xc8f: 0x00c0, 0xc90: 0x00c0, 0xc91: 0x00c0, - 0xc92: 0x00c0, 0xc93: 0x00c0, 0xc94: 0x00c0, 0xc95: 0x00c0, 0xc96: 0x00c0, - 0xc9a: 0x00c0, 0xc9b: 0x00c0, 0xc9c: 0x00c0, 0xc9d: 0x00c0, - 0xc9e: 0x00c0, 0xc9f: 0x00c0, 0xca0: 0x00c0, 0xca1: 0x00c0, 0xca2: 0x00c0, 0xca3: 0x00c0, - 0xca4: 0x00c0, 0xca5: 0x00c0, 0xca6: 0x00c0, 0xca7: 0x00c0, 0xca8: 0x00c0, 0xca9: 0x00c0, - 0xcaa: 0x00c0, 0xcab: 0x00c0, 0xcac: 0x00c0, 0xcad: 0x00c0, 0xcae: 0x00c0, 0xcaf: 0x00c0, - 0xcb0: 0x00c0, 0xcb1: 0x00c0, 0xcb3: 0x00c0, 0xcb4: 0x00c0, 0xcb5: 0x00c0, - 0xcb6: 0x00c0, 0xcb7: 0x00c0, 0xcb8: 0x00c0, 0xcb9: 0x00c0, 0xcba: 0x00c0, 0xcbb: 0x00c0, - 0xcbd: 0x00c0, - // Block 0x33, offset 0xcc0 - 0xcc0: 0x00c0, 0xcc1: 0x00c0, 0xcc2: 0x00c0, 0xcc3: 0x00c0, 0xcc4: 0x00c0, 0xcc5: 0x00c0, - 0xcc6: 0x00c0, 0xcca: 0x00c6, - 0xccf: 0x00c0, 0xcd0: 0x00c0, 0xcd1: 0x00c0, - 0xcd2: 0x00c3, 0xcd3: 0x00c3, 0xcd4: 0x00c3, 0xcd6: 0x00c3, - 0xcd8: 0x00c0, 0xcd9: 0x00c0, 0xcda: 0x00c0, 0xcdb: 0x00c0, 0xcdc: 0x00c0, 0xcdd: 0x00c0, - 0xcde: 0x00c0, 0xcdf: 0x00c0, - 0xce6: 0x00c0, 0xce7: 0x00c0, 0xce8: 0x00c0, 0xce9: 0x00c0, - 0xcea: 0x00c0, 0xceb: 0x00c0, 0xcec: 0x00c0, 0xced: 0x00c0, 0xcee: 0x00c0, 0xcef: 0x00c0, - 0xcf2: 0x00c0, 0xcf3: 0x00c0, 0xcf4: 0x0080, - // Block 0x34, offset 0xd00 - 0xd01: 0x00c0, 0xd02: 0x00c0, 0xd03: 0x00c0, 0xd04: 0x00c0, 0xd05: 0x00c0, - 0xd06: 0x00c0, 0xd07: 0x00c0, 0xd08: 0x00c0, 0xd09: 0x00c0, 0xd0a: 0x00c0, 0xd0b: 0x00c0, - 0xd0c: 0x00c0, 0xd0d: 0x00c0, 0xd0e: 0x00c0, 0xd0f: 0x00c0, 0xd10: 0x00c0, 0xd11: 0x00c0, - 0xd12: 0x00c0, 0xd13: 0x00c0, 0xd14: 0x00c0, 0xd15: 0x00c0, 0xd16: 0x00c0, 0xd17: 0x00c0, - 0xd18: 0x00c0, 0xd19: 0x00c0, 0xd1a: 0x00c0, 0xd1b: 0x00c0, 0xd1c: 0x00c0, 0xd1d: 0x00c0, - 0xd1e: 0x00c0, 0xd1f: 0x00c0, 0xd20: 0x00c0, 0xd21: 0x00c0, 0xd22: 0x00c0, 0xd23: 0x00c0, - 0xd24: 0x00c0, 0xd25: 0x00c0, 0xd26: 0x00c0, 0xd27: 0x00c0, 0xd28: 0x00c0, 0xd29: 0x00c0, - 0xd2a: 0x00c0, 0xd2b: 0x00c0, 0xd2c: 0x00c0, 0xd2d: 0x00c0, 0xd2e: 0x00c0, 0xd2f: 0x00c0, - 0xd30: 0x00c0, 0xd31: 0x00c3, 0xd32: 0x00c0, 0xd33: 0x0080, 0xd34: 0x00c3, 0xd35: 0x00c3, - 0xd36: 0x00c3, 0xd37: 0x00c3, 0xd38: 0x00c3, 0xd39: 0x00c3, 0xd3a: 0x00c6, - 0xd3f: 0x0080, - // Block 0x35, offset 0xd40 - 0xd40: 0x00c0, 0xd41: 0x00c0, 0xd42: 0x00c0, 0xd43: 0x00c0, 0xd44: 0x00c0, 0xd45: 0x00c0, - 0xd46: 0x00c0, 0xd47: 0x00c3, 0xd48: 0x00c3, 0xd49: 0x00c3, 0xd4a: 0x00c3, 0xd4b: 0x00c3, - 0xd4c: 0x00c3, 0xd4d: 0x00c3, 0xd4e: 0x00c3, 0xd4f: 0x0080, 0xd50: 0x00c0, 0xd51: 0x00c0, - 0xd52: 0x00c0, 0xd53: 0x00c0, 0xd54: 0x00c0, 0xd55: 0x00c0, 0xd56: 0x00c0, 0xd57: 0x00c0, - 0xd58: 0x00c0, 0xd59: 0x00c0, 0xd5a: 0x0080, 0xd5b: 0x0080, - // Block 0x36, offset 0xd80 - 0xd81: 0x00c0, 0xd82: 0x00c0, 0xd84: 0x00c0, - 0xd87: 0x00c0, 0xd88: 0x00c0, 0xd8a: 0x00c0, - 0xd8d: 0x00c0, - 0xd94: 0x00c0, 0xd95: 0x00c0, 0xd96: 0x00c0, 0xd97: 0x00c0, - 0xd99: 0x00c0, 0xd9a: 0x00c0, 0xd9b: 0x00c0, 0xd9c: 0x00c0, 0xd9d: 0x00c0, - 0xd9e: 0x00c0, 0xd9f: 0x00c0, 0xda1: 0x00c0, 0xda2: 0x00c0, 0xda3: 0x00c0, - 0xda5: 0x00c0, 0xda7: 0x00c0, - 0xdaa: 0x00c0, 0xdab: 0x00c0, 0xdad: 0x00c0, 0xdae: 0x00c0, 0xdaf: 0x00c0, - 0xdb0: 0x00c0, 0xdb1: 0x00c3, 0xdb2: 0x00c0, 0xdb3: 0x0080, 0xdb4: 0x00c3, 0xdb5: 0x00c3, - 0xdb6: 0x00c3, 0xdb7: 0x00c3, 0xdb8: 0x00c3, 0xdb9: 0x00c3, 0xdbb: 0x00c3, - 0xdbc: 0x00c3, 0xdbd: 0x00c0, - // Block 0x37, offset 0xdc0 - 0xdc0: 0x00c0, 0xdc1: 0x00c0, 0xdc2: 0x00c0, 0xdc3: 0x00c0, 0xdc4: 0x00c0, - 0xdc6: 0x00c0, 0xdc8: 0x00c3, 0xdc9: 0x00c3, 0xdca: 0x00c3, 0xdcb: 0x00c3, - 0xdcc: 0x00c3, 0xdcd: 0x00c3, 0xdd0: 0x00c0, 0xdd1: 0x00c0, - 0xdd2: 0x00c0, 0xdd3: 0x00c0, 0xdd4: 0x00c0, 0xdd5: 0x00c0, 0xdd6: 0x00c0, 0xdd7: 0x00c0, - 0xdd8: 0x00c0, 0xdd9: 0x00c0, 0xddc: 0x0080, 0xddd: 0x0080, - 0xdde: 0x00c0, 0xddf: 0x00c0, - // Block 0x38, offset 0xe00 - 0xe00: 0x00c0, 0xe01: 0x0080, 0xe02: 0x0080, 0xe03: 0x0080, 0xe04: 0x0080, 0xe05: 0x0080, - 0xe06: 0x0080, 0xe07: 0x0080, 0xe08: 0x0080, 0xe09: 0x0080, 0xe0a: 0x0080, 0xe0b: 0x00c0, - 0xe0c: 0x0080, 0xe0d: 0x0080, 0xe0e: 0x0080, 0xe0f: 0x0080, 0xe10: 0x0080, 0xe11: 0x0080, - 0xe12: 0x0080, 0xe13: 0x0080, 0xe14: 0x0080, 0xe15: 0x0080, 0xe16: 0x0080, 0xe17: 0x0080, - 0xe18: 0x00c3, 0xe19: 0x00c3, 0xe1a: 0x0080, 0xe1b: 0x0080, 0xe1c: 0x0080, 0xe1d: 0x0080, - 0xe1e: 0x0080, 0xe1f: 0x0080, 0xe20: 0x00c0, 0xe21: 0x00c0, 0xe22: 0x00c0, 0xe23: 0x00c0, - 0xe24: 0x00c0, 0xe25: 0x00c0, 0xe26: 0x00c0, 0xe27: 0x00c0, 0xe28: 0x00c0, 0xe29: 0x00c0, - 0xe2a: 0x0080, 0xe2b: 0x0080, 0xe2c: 0x0080, 0xe2d: 0x0080, 0xe2e: 0x0080, 0xe2f: 0x0080, - 0xe30: 0x0080, 0xe31: 0x0080, 0xe32: 0x0080, 0xe33: 0x0080, 0xe34: 0x0080, 0xe35: 0x00c3, - 0xe36: 0x0080, 0xe37: 0x00c3, 0xe38: 0x0080, 0xe39: 0x00c3, 0xe3a: 0x0080, 0xe3b: 0x0080, - 0xe3c: 0x0080, 0xe3d: 0x0080, 0xe3e: 0x00c0, 0xe3f: 0x00c0, - // Block 0x39, offset 0xe40 - 0xe40: 0x00c0, 0xe41: 0x00c0, 0xe42: 0x00c0, 0xe43: 0x0080, 0xe44: 0x00c0, 0xe45: 0x00c0, - 0xe46: 0x00c0, 0xe47: 0x00c0, 0xe49: 0x00c0, 0xe4a: 0x00c0, 0xe4b: 0x00c0, - 0xe4c: 0x00c0, 0xe4d: 0x0080, 0xe4e: 0x00c0, 0xe4f: 0x00c0, 0xe50: 0x00c0, 0xe51: 0x00c0, - 0xe52: 0x0080, 0xe53: 0x00c0, 0xe54: 0x00c0, 0xe55: 0x00c0, 0xe56: 0x00c0, 0xe57: 0x0080, - 0xe58: 0x00c0, 0xe59: 0x00c0, 0xe5a: 0x00c0, 0xe5b: 0x00c0, 0xe5c: 0x0080, 0xe5d: 0x00c0, - 0xe5e: 0x00c0, 0xe5f: 0x00c0, 0xe60: 0x00c0, 0xe61: 0x00c0, 0xe62: 0x00c0, 0xe63: 0x00c0, - 0xe64: 0x00c0, 0xe65: 0x00c0, 0xe66: 0x00c0, 0xe67: 0x00c0, 0xe68: 0x00c0, 0xe69: 0x0080, - 0xe6a: 0x00c0, 0xe6b: 0x00c0, 0xe6c: 0x00c0, - 0xe71: 0x00c3, 0xe72: 0x00c3, 0xe73: 0x0083, 0xe74: 0x00c3, 0xe75: 0x0083, - 0xe76: 0x0083, 0xe77: 0x0083, 0xe78: 0x0083, 0xe79: 0x0083, 0xe7a: 0x00c3, 0xe7b: 0x00c3, - 0xe7c: 0x00c3, 0xe7d: 0x00c3, 0xe7e: 0x00c3, 0xe7f: 0x00c0, - // Block 0x3a, offset 0xe80 - 0xe80: 0x00c3, 0xe81: 0x0083, 0xe82: 0x00c3, 0xe83: 0x00c3, 0xe84: 0x00c6, 0xe85: 0x0080, - 0xe86: 0x00c3, 0xe87: 0x00c3, 0xe88: 0x00c0, 0xe89: 0x00c0, 0xe8a: 0x00c0, 0xe8b: 0x00c0, - 0xe8c: 0x00c0, 0xe8d: 0x00c3, 0xe8e: 0x00c3, 0xe8f: 0x00c3, 0xe90: 0x00c3, 0xe91: 0x00c3, - 0xe92: 0x00c3, 0xe93: 0x0083, 0xe94: 0x00c3, 0xe95: 0x00c3, 0xe96: 0x00c3, 0xe97: 0x00c3, - 0xe99: 0x00c3, 0xe9a: 0x00c3, 0xe9b: 0x00c3, 0xe9c: 0x00c3, 0xe9d: 0x0083, - 0xe9e: 0x00c3, 0xe9f: 0x00c3, 0xea0: 0x00c3, 0xea1: 0x00c3, 0xea2: 0x0083, 0xea3: 0x00c3, - 0xea4: 0x00c3, 0xea5: 0x00c3, 0xea6: 0x00c3, 0xea7: 0x0083, 0xea8: 0x00c3, 0xea9: 0x00c3, - 0xeaa: 0x00c3, 0xeab: 0x00c3, 0xeac: 0x0083, 0xead: 0x00c3, 0xeae: 0x00c3, 0xeaf: 0x00c3, - 0xeb0: 0x00c3, 0xeb1: 0x00c3, 0xeb2: 0x00c3, 0xeb3: 0x00c3, 0xeb4: 0x00c3, 0xeb5: 0x00c3, - 0xeb6: 0x00c3, 0xeb7: 0x00c3, 0xeb8: 0x00c3, 0xeb9: 0x0083, 0xeba: 0x00c3, 0xebb: 0x00c3, - 0xebc: 0x00c3, 0xebe: 0x0080, 0xebf: 0x0080, - // Block 0x3b, offset 0xec0 - 0xec0: 0x0080, 0xec1: 0x0080, 0xec2: 0x0080, 0xec3: 0x0080, 0xec4: 0x0080, 0xec5: 0x0080, - 0xec6: 0x00c3, 0xec7: 0x0080, 0xec8: 0x0080, 0xec9: 0x0080, 0xeca: 0x0080, 0xecb: 0x0080, - 0xecc: 0x0080, 0xece: 0x0080, 0xecf: 0x0080, 0xed0: 0x0080, 0xed1: 0x0080, - 0xed2: 0x0080, 0xed3: 0x0080, 0xed4: 0x0080, 0xed5: 0x0080, 0xed6: 0x0080, 0xed7: 0x0080, - 0xed8: 0x0080, 0xed9: 0x0080, 0xeda: 0x0080, - // Block 0x3c, offset 0xf00 - 0xf00: 0x00c0, 0xf01: 0x00c0, 0xf02: 0x00c0, 0xf03: 0x00c0, 0xf04: 0x00c0, 0xf05: 0x00c0, - 0xf06: 0x00c0, 0xf07: 0x00c0, 0xf08: 0x00c0, 0xf09: 0x00c0, 0xf0a: 0x00c0, 0xf0b: 0x00c0, - 0xf0c: 0x00c0, 0xf0d: 0x00c0, 0xf0e: 0x00c0, 0xf0f: 0x00c0, 0xf10: 0x00c0, 0xf11: 0x00c0, - 0xf12: 0x00c0, 0xf13: 0x00c0, 0xf14: 0x00c0, 0xf15: 0x00c0, 0xf16: 0x00c0, 0xf17: 0x00c0, - 0xf18: 0x00c0, 0xf19: 0x00c0, 0xf1a: 0x00c0, 0xf1b: 0x00c0, 0xf1c: 0x00c0, 0xf1d: 0x00c0, - 0xf1e: 0x00c0, 0xf1f: 0x00c0, 0xf20: 0x00c0, 0xf21: 0x00c0, 0xf22: 0x00c0, 0xf23: 0x00c0, - 0xf24: 0x00c0, 0xf25: 0x00c0, 0xf26: 0x00c0, 0xf27: 0x00c0, 0xf28: 0x00c0, 0xf29: 0x00c0, - 0xf2a: 0x00c0, 0xf2b: 0x00c0, 0xf2c: 0x00c0, 0xf2d: 0x00c3, 0xf2e: 0x00c3, 0xf2f: 0x00c3, - 0xf30: 0x00c3, 0xf31: 0x00c0, 0xf32: 0x00c3, 0xf33: 0x00c3, 0xf34: 0x00c3, 0xf35: 0x00c3, - 0xf36: 0x00c3, 0xf37: 0x00c3, 0xf38: 0x00c0, 0xf39: 0x00c6, 0xf3a: 0x00c6, 0xf3b: 0x00c0, - 0xf3c: 0x00c0, 0xf3d: 0x00c3, 0xf3e: 0x00c3, 0xf3f: 0x00c0, - // Block 0x3d, offset 0xf40 - 0xf40: 0x00c0, 0xf41: 0x00c0, 0xf42: 0x00c0, 0xf43: 0x00c0, 0xf44: 0x00c0, 0xf45: 0x00c0, - 0xf46: 0x00c0, 0xf47: 0x00c0, 0xf48: 0x00c0, 0xf49: 0x00c0, 0xf4a: 0x0080, 0xf4b: 0x0080, - 0xf4c: 0x0080, 0xf4d: 0x0080, 0xf4e: 0x0080, 0xf4f: 0x0080, 0xf50: 0x00c0, 0xf51: 0x00c0, - 0xf52: 0x00c0, 0xf53: 0x00c0, 0xf54: 0x00c0, 0xf55: 0x00c0, 0xf56: 0x00c0, 0xf57: 0x00c0, - 0xf58: 0x00c3, 0xf59: 0x00c3, 0xf5a: 0x00c0, 0xf5b: 0x00c0, 0xf5c: 0x00c0, 0xf5d: 0x00c0, - 0xf5e: 0x00c3, 0xf5f: 0x00c3, 0xf60: 0x00c3, 0xf61: 0x00c0, 0xf62: 0x00c0, 0xf63: 0x00c0, - 0xf64: 0x00c0, 0xf65: 0x00c0, 0xf66: 0x00c0, 0xf67: 0x00c0, 0xf68: 0x00c0, 0xf69: 0x00c0, - 0xf6a: 0x00c0, 0xf6b: 0x00c0, 0xf6c: 0x00c0, 0xf6d: 0x00c0, 0xf6e: 0x00c0, 0xf6f: 0x00c0, - 0xf70: 0x00c0, 0xf71: 0x00c3, 0xf72: 0x00c3, 0xf73: 0x00c3, 0xf74: 0x00c3, 0xf75: 0x00c0, - 0xf76: 0x00c0, 0xf77: 0x00c0, 0xf78: 0x00c0, 0xf79: 0x00c0, 0xf7a: 0x00c0, 0xf7b: 0x00c0, - 0xf7c: 0x00c0, 0xf7d: 0x00c0, 0xf7e: 0x00c0, 0xf7f: 0x00c0, - // Block 0x3e, offset 0xf80 - 0xf80: 0x00c0, 0xf81: 0x00c0, 0xf82: 0x00c3, 0xf83: 0x00c0, 0xf84: 0x00c0, 0xf85: 0x00c3, - 0xf86: 0x00c3, 0xf87: 0x00c0, 0xf88: 0x00c0, 0xf89: 0x00c0, 0xf8a: 0x00c0, 0xf8b: 0x00c0, - 0xf8c: 0x00c0, 0xf8d: 0x00c3, 0xf8e: 0x00c0, 0xf8f: 0x00c0, 0xf90: 0x00c0, 0xf91: 0x00c0, - 0xf92: 0x00c0, 0xf93: 0x00c0, 0xf94: 0x00c0, 0xf95: 0x00c0, 0xf96: 0x00c0, 0xf97: 0x00c0, - 0xf98: 0x00c0, 0xf99: 0x00c0, 0xf9a: 0x00c0, 0xf9b: 0x00c0, 0xf9c: 0x00c0, 0xf9d: 0x00c3, - 0xf9e: 0x0080, 0xf9f: 0x0080, 0xfa0: 0x00c0, 0xfa1: 0x00c0, 0xfa2: 0x00c0, 0xfa3: 0x00c0, - 0xfa4: 0x00c0, 0xfa5: 0x00c0, 0xfa6: 0x00c0, 0xfa7: 0x00c0, 0xfa8: 0x00c0, 0xfa9: 0x00c0, - 0xfaa: 0x00c0, 0xfab: 0x00c0, 0xfac: 0x00c0, 0xfad: 0x00c0, 0xfae: 0x00c0, 0xfaf: 0x00c0, - 0xfb0: 0x00c0, 0xfb1: 0x00c0, 0xfb2: 0x00c0, 0xfb3: 0x00c0, 0xfb4: 0x00c0, 0xfb5: 0x00c0, - 0xfb6: 0x00c0, 0xfb7: 0x00c0, 0xfb8: 0x00c0, 0xfb9: 0x00c0, 0xfba: 0x00c0, 0xfbb: 0x00c0, - 0xfbc: 0x00c0, 0xfbd: 0x00c0, 0xfbe: 0x00c0, 0xfbf: 0x00c0, - // Block 0x3f, offset 0xfc0 - 0xfc0: 0x00c0, 0xfc1: 0x00c0, 0xfc2: 0x00c0, 0xfc3: 0x00c0, 0xfc4: 0x00c0, 0xfc5: 0x00c0, - 0xfc7: 0x00c0, - 0xfcd: 0x00c0, 0xfd0: 0x00c0, 0xfd1: 0x00c0, - 0xfd2: 0x00c0, 0xfd3: 0x00c0, 0xfd4: 0x00c0, 0xfd5: 0x00c0, 0xfd6: 0x00c0, 0xfd7: 0x00c0, - 0xfd8: 0x00c0, 0xfd9: 0x00c0, 0xfda: 0x00c0, 0xfdb: 0x00c0, 0xfdc: 0x00c0, 0xfdd: 0x00c0, - 0xfde: 0x00c0, 0xfdf: 0x00c0, 0xfe0: 0x00c0, 0xfe1: 0x00c0, 0xfe2: 0x00c0, 0xfe3: 0x00c0, - 0xfe4: 0x00c0, 0xfe5: 0x00c0, 0xfe6: 0x00c0, 0xfe7: 0x00c0, 0xfe8: 0x00c0, 0xfe9: 0x00c0, - 0xfea: 0x00c0, 0xfeb: 0x00c0, 0xfec: 0x00c0, 0xfed: 0x00c0, 0xfee: 0x00c0, 0xfef: 0x00c0, - 0xff0: 0x00c0, 0xff1: 0x00c0, 0xff2: 0x00c0, 0xff3: 0x00c0, 0xff4: 0x00c0, 0xff5: 0x00c0, - 0xff6: 0x00c0, 0xff7: 0x00c0, 0xff8: 0x00c0, 0xff9: 0x00c0, 0xffa: 0x00c0, 0xffb: 0x0080, - 0xffc: 0x0080, 0xffd: 0x00c0, 0xffe: 0x00c0, 0xfff: 0x00c0, - // Block 0x40, offset 0x1000 - 0x1000: 0x0040, 0x1001: 0x0040, 0x1002: 0x0040, 0x1003: 0x0040, 0x1004: 0x0040, 0x1005: 0x0040, - 0x1006: 0x0040, 0x1007: 0x0040, 0x1008: 0x0040, 0x1009: 0x0040, 0x100a: 0x0040, 0x100b: 0x0040, - 0x100c: 0x0040, 0x100d: 0x0040, 0x100e: 0x0040, 0x100f: 0x0040, 0x1010: 0x0040, 0x1011: 0x0040, - 0x1012: 0x0040, 0x1013: 0x0040, 0x1014: 0x0040, 0x1015: 0x0040, 0x1016: 0x0040, 0x1017: 0x0040, - 0x1018: 0x0040, 0x1019: 0x0040, 0x101a: 0x0040, 0x101b: 0x0040, 0x101c: 0x0040, 0x101d: 0x0040, - 0x101e: 0x0040, 0x101f: 0x0040, 0x1020: 0x0040, 0x1021: 0x0040, 0x1022: 0x0040, 0x1023: 0x0040, - 0x1024: 0x0040, 0x1025: 0x0040, 0x1026: 0x0040, 0x1027: 0x0040, 0x1028: 0x0040, 0x1029: 0x0040, - 0x102a: 0x0040, 0x102b: 0x0040, 0x102c: 0x0040, 0x102d: 0x0040, 0x102e: 0x0040, 0x102f: 0x0040, - 0x1030: 0x0040, 0x1031: 0x0040, 0x1032: 0x0040, 0x1033: 0x0040, 0x1034: 0x0040, 0x1035: 0x0040, - 0x1036: 0x0040, 0x1037: 0x0040, 0x1038: 0x0040, 0x1039: 0x0040, 0x103a: 0x0040, 0x103b: 0x0040, - 0x103c: 0x0040, 0x103d: 0x0040, 0x103e: 0x0040, 0x103f: 0x0040, - // Block 0x41, offset 0x1040 - 0x1040: 0x00c0, 0x1041: 0x00c0, 0x1042: 0x00c0, 0x1043: 0x00c0, 0x1044: 0x00c0, 0x1045: 0x00c0, - 0x1046: 0x00c0, 0x1047: 0x00c0, 0x1048: 0x00c0, 0x104a: 0x00c0, 0x104b: 0x00c0, - 0x104c: 0x00c0, 0x104d: 0x00c0, 0x1050: 0x00c0, 0x1051: 0x00c0, - 0x1052: 0x00c0, 0x1053: 0x00c0, 0x1054: 0x00c0, 0x1055: 0x00c0, 0x1056: 0x00c0, - 0x1058: 0x00c0, 0x105a: 0x00c0, 0x105b: 0x00c0, 0x105c: 0x00c0, 0x105d: 0x00c0, - 0x1060: 0x00c0, 0x1061: 0x00c0, 0x1062: 0x00c0, 0x1063: 0x00c0, - 0x1064: 0x00c0, 0x1065: 0x00c0, 0x1066: 0x00c0, 0x1067: 0x00c0, 0x1068: 0x00c0, 0x1069: 0x00c0, - 0x106a: 0x00c0, 0x106b: 0x00c0, 0x106c: 0x00c0, 0x106d: 0x00c0, 0x106e: 0x00c0, 0x106f: 0x00c0, - 0x1070: 0x00c0, 0x1071: 0x00c0, 0x1072: 0x00c0, 0x1073: 0x00c0, 0x1074: 0x00c0, 0x1075: 0x00c0, - 0x1076: 0x00c0, 0x1077: 0x00c0, 0x1078: 0x00c0, 0x1079: 0x00c0, 0x107a: 0x00c0, 0x107b: 0x00c0, - 0x107c: 0x00c0, 0x107d: 0x00c0, 0x107e: 0x00c0, 0x107f: 0x00c0, - // Block 0x42, offset 0x1080 - 0x1080: 0x00c0, 0x1081: 0x00c0, 0x1082: 0x00c0, 0x1083: 0x00c0, 0x1084: 0x00c0, 0x1085: 0x00c0, - 0x1086: 0x00c0, 0x1087: 0x00c0, 0x1088: 0x00c0, 0x108a: 0x00c0, 0x108b: 0x00c0, - 0x108c: 0x00c0, 0x108d: 0x00c0, 0x1090: 0x00c0, 0x1091: 0x00c0, - 0x1092: 0x00c0, 0x1093: 0x00c0, 0x1094: 0x00c0, 0x1095: 0x00c0, 0x1096: 0x00c0, 0x1097: 0x00c0, - 0x1098: 0x00c0, 0x1099: 0x00c0, 0x109a: 0x00c0, 0x109b: 0x00c0, 0x109c: 0x00c0, 0x109d: 0x00c0, - 0x109e: 0x00c0, 0x109f: 0x00c0, 0x10a0: 0x00c0, 0x10a1: 0x00c0, 0x10a2: 0x00c0, 0x10a3: 0x00c0, - 0x10a4: 0x00c0, 0x10a5: 0x00c0, 0x10a6: 0x00c0, 0x10a7: 0x00c0, 0x10a8: 0x00c0, 0x10a9: 0x00c0, - 0x10aa: 0x00c0, 0x10ab: 0x00c0, 0x10ac: 0x00c0, 0x10ad: 0x00c0, 0x10ae: 0x00c0, 0x10af: 0x00c0, - 0x10b0: 0x00c0, 0x10b2: 0x00c0, 0x10b3: 0x00c0, 0x10b4: 0x00c0, 0x10b5: 0x00c0, - 0x10b8: 0x00c0, 0x10b9: 0x00c0, 0x10ba: 0x00c0, 0x10bb: 0x00c0, - 0x10bc: 0x00c0, 0x10bd: 0x00c0, 0x10be: 0x00c0, - // Block 0x43, offset 0x10c0 - 0x10c0: 0x00c0, 0x10c2: 0x00c0, 0x10c3: 0x00c0, 0x10c4: 0x00c0, 0x10c5: 0x00c0, - 0x10c8: 0x00c0, 0x10c9: 0x00c0, 0x10ca: 0x00c0, 0x10cb: 0x00c0, - 0x10cc: 0x00c0, 0x10cd: 0x00c0, 0x10ce: 0x00c0, 0x10cf: 0x00c0, 0x10d0: 0x00c0, 0x10d1: 0x00c0, - 0x10d2: 0x00c0, 0x10d3: 0x00c0, 0x10d4: 0x00c0, 0x10d5: 0x00c0, 0x10d6: 0x00c0, - 0x10d8: 0x00c0, 0x10d9: 0x00c0, 0x10da: 0x00c0, 0x10db: 0x00c0, 0x10dc: 0x00c0, 0x10dd: 0x00c0, - 0x10de: 0x00c0, 0x10df: 0x00c0, 0x10e0: 0x00c0, 0x10e1: 0x00c0, 0x10e2: 0x00c0, 0x10e3: 0x00c0, - 0x10e4: 0x00c0, 0x10e5: 0x00c0, 0x10e6: 0x00c0, 0x10e7: 0x00c0, 0x10e8: 0x00c0, 0x10e9: 0x00c0, - 0x10ea: 0x00c0, 0x10eb: 0x00c0, 0x10ec: 0x00c0, 0x10ed: 0x00c0, 0x10ee: 0x00c0, 0x10ef: 0x00c0, - 0x10f0: 0x00c0, 0x10f1: 0x00c0, 0x10f2: 0x00c0, 0x10f3: 0x00c0, 0x10f4: 0x00c0, 0x10f5: 0x00c0, - 0x10f6: 0x00c0, 0x10f7: 0x00c0, 0x10f8: 0x00c0, 0x10f9: 0x00c0, 0x10fa: 0x00c0, 0x10fb: 0x00c0, - 0x10fc: 0x00c0, 0x10fd: 0x00c0, 0x10fe: 0x00c0, 0x10ff: 0x00c0, - // Block 0x44, offset 0x1100 - 0x1100: 0x00c0, 0x1101: 0x00c0, 0x1102: 0x00c0, 0x1103: 0x00c0, 0x1104: 0x00c0, 0x1105: 0x00c0, - 0x1106: 0x00c0, 0x1107: 0x00c0, 0x1108: 0x00c0, 0x1109: 0x00c0, 0x110a: 0x00c0, 0x110b: 0x00c0, - 0x110c: 0x00c0, 0x110d: 0x00c0, 0x110e: 0x00c0, 0x110f: 0x00c0, 0x1110: 0x00c0, - 0x1112: 0x00c0, 0x1113: 0x00c0, 0x1114: 0x00c0, 0x1115: 0x00c0, - 0x1118: 0x00c0, 0x1119: 0x00c0, 0x111a: 0x00c0, 0x111b: 0x00c0, 0x111c: 0x00c0, 0x111d: 0x00c0, - 0x111e: 0x00c0, 0x111f: 0x00c0, 0x1120: 0x00c0, 0x1121: 0x00c0, 0x1122: 0x00c0, 0x1123: 0x00c0, - 0x1124: 0x00c0, 0x1125: 0x00c0, 0x1126: 0x00c0, 0x1127: 0x00c0, 0x1128: 0x00c0, 0x1129: 0x00c0, - 0x112a: 0x00c0, 0x112b: 0x00c0, 0x112c: 0x00c0, 0x112d: 0x00c0, 0x112e: 0x00c0, 0x112f: 0x00c0, - 0x1130: 0x00c0, 0x1131: 0x00c0, 0x1132: 0x00c0, 0x1133: 0x00c0, 0x1134: 0x00c0, 0x1135: 0x00c0, - 0x1136: 0x00c0, 0x1137: 0x00c0, 0x1138: 0x00c0, 0x1139: 0x00c0, 0x113a: 0x00c0, 0x113b: 0x00c0, - 0x113c: 0x00c0, 0x113d: 0x00c0, 0x113e: 0x00c0, 0x113f: 0x00c0, - // Block 0x45, offset 0x1140 - 0x1140: 0x00c0, 0x1141: 0x00c0, 0x1142: 0x00c0, 0x1143: 0x00c0, 0x1144: 0x00c0, 0x1145: 0x00c0, - 0x1146: 0x00c0, 0x1147: 0x00c0, 0x1148: 0x00c0, 0x1149: 0x00c0, 0x114a: 0x00c0, 0x114b: 0x00c0, - 0x114c: 0x00c0, 0x114d: 0x00c0, 0x114e: 0x00c0, 0x114f: 0x00c0, 0x1150: 0x00c0, 0x1151: 0x00c0, - 0x1152: 0x00c0, 0x1153: 0x00c0, 0x1154: 0x00c0, 0x1155: 0x00c0, 0x1156: 0x00c0, 0x1157: 0x00c0, - 0x1158: 0x00c0, 0x1159: 0x00c0, 0x115a: 0x00c0, 0x115d: 0x00c3, - 0x115e: 0x00c3, 0x115f: 0x00c3, 0x1160: 0x0080, 0x1161: 0x0080, 0x1162: 0x0080, 0x1163: 0x0080, - 0x1164: 0x0080, 0x1165: 0x0080, 0x1166: 0x0080, 0x1167: 0x0080, 0x1168: 0x0080, 0x1169: 0x0080, - 0x116a: 0x0080, 0x116b: 0x0080, 0x116c: 0x0080, 0x116d: 0x0080, 0x116e: 0x0080, 0x116f: 0x0080, - 0x1170: 0x0080, 0x1171: 0x0080, 0x1172: 0x0080, 0x1173: 0x0080, 0x1174: 0x0080, 0x1175: 0x0080, - 0x1176: 0x0080, 0x1177: 0x0080, 0x1178: 0x0080, 0x1179: 0x0080, 0x117a: 0x0080, 0x117b: 0x0080, - 0x117c: 0x0080, - // Block 0x46, offset 0x1180 - 0x1180: 0x00c0, 0x1181: 0x00c0, 0x1182: 0x00c0, 0x1183: 0x00c0, 0x1184: 0x00c0, 0x1185: 0x00c0, - 0x1186: 0x00c0, 0x1187: 0x00c0, 0x1188: 0x00c0, 0x1189: 0x00c0, 0x118a: 0x00c0, 0x118b: 0x00c0, - 0x118c: 0x00c0, 0x118d: 0x00c0, 0x118e: 0x00c0, 0x118f: 0x00c0, 0x1190: 0x0080, 0x1191: 0x0080, - 0x1192: 0x0080, 0x1193: 0x0080, 0x1194: 0x0080, 0x1195: 0x0080, 0x1196: 0x0080, 0x1197: 0x0080, - 0x1198: 0x0080, 0x1199: 0x0080, - 0x11a0: 0x00c0, 0x11a1: 0x00c0, 0x11a2: 0x00c0, 0x11a3: 0x00c0, - 0x11a4: 0x00c0, 0x11a5: 0x00c0, 0x11a6: 0x00c0, 0x11a7: 0x00c0, 0x11a8: 0x00c0, 0x11a9: 0x00c0, - 0x11aa: 0x00c0, 0x11ab: 0x00c0, 0x11ac: 0x00c0, 0x11ad: 0x00c0, 0x11ae: 0x00c0, 0x11af: 0x00c0, - 0x11b0: 0x00c0, 0x11b1: 0x00c0, 0x11b2: 0x00c0, 0x11b3: 0x00c0, 0x11b4: 0x00c0, 0x11b5: 0x00c0, - 0x11b6: 0x00c0, 0x11b7: 0x00c0, 0x11b8: 0x00c0, 0x11b9: 0x00c0, 0x11ba: 0x00c0, 0x11bb: 0x00c0, - 0x11bc: 0x00c0, 0x11bd: 0x00c0, 0x11be: 0x00c0, 0x11bf: 0x00c0, - // Block 0x47, offset 0x11c0 - 0x11c0: 0x00c0, 0x11c1: 0x00c0, 0x11c2: 0x00c0, 0x11c3: 0x00c0, 0x11c4: 0x00c0, 0x11c5: 0x00c0, - 0x11c6: 0x00c0, 0x11c7: 0x00c0, 0x11c8: 0x00c0, 0x11c9: 0x00c0, 0x11ca: 0x00c0, 0x11cb: 0x00c0, - 0x11cc: 0x00c0, 0x11cd: 0x00c0, 0x11ce: 0x00c0, 0x11cf: 0x00c0, 0x11d0: 0x00c0, 0x11d1: 0x00c0, - 0x11d2: 0x00c0, 0x11d3: 0x00c0, 0x11d4: 0x00c0, 0x11d5: 0x00c0, 0x11d6: 0x00c0, 0x11d7: 0x00c0, - 0x11d8: 0x00c0, 0x11d9: 0x00c0, 0x11da: 0x00c0, 0x11db: 0x00c0, 0x11dc: 0x00c0, 0x11dd: 0x00c0, - 0x11de: 0x00c0, 0x11df: 0x00c0, 0x11e0: 0x00c0, 0x11e1: 0x00c0, 0x11e2: 0x00c0, 0x11e3: 0x00c0, - 0x11e4: 0x00c0, 0x11e5: 0x00c0, 0x11e6: 0x00c0, 0x11e7: 0x00c0, 0x11e8: 0x00c0, 0x11e9: 0x00c0, - 0x11ea: 0x00c0, 0x11eb: 0x00c0, 0x11ec: 0x00c0, 0x11ed: 0x00c0, 0x11ee: 0x00c0, 0x11ef: 0x00c0, - 0x11f0: 0x00c0, 0x11f1: 0x00c0, 0x11f2: 0x00c0, 0x11f3: 0x00c0, 0x11f4: 0x00c0, 0x11f5: 0x00c0, - 0x11f8: 0x00c0, 0x11f9: 0x00c0, 0x11fa: 0x00c0, 0x11fb: 0x00c0, - 0x11fc: 0x00c0, 0x11fd: 0x00c0, - // Block 0x48, offset 0x1200 - 0x1200: 0x0080, 0x1201: 0x00c0, 0x1202: 0x00c0, 0x1203: 0x00c0, 0x1204: 0x00c0, 0x1205: 0x00c0, - 0x1206: 0x00c0, 0x1207: 0x00c0, 0x1208: 0x00c0, 0x1209: 0x00c0, 0x120a: 0x00c0, 0x120b: 0x00c0, - 0x120c: 0x00c0, 0x120d: 0x00c0, 0x120e: 0x00c0, 0x120f: 0x00c0, 0x1210: 0x00c0, 0x1211: 0x00c0, - 0x1212: 0x00c0, 0x1213: 0x00c0, 0x1214: 0x00c0, 0x1215: 0x00c0, 0x1216: 0x00c0, 0x1217: 0x00c0, - 0x1218: 0x00c0, 0x1219: 0x00c0, 0x121a: 0x00c0, 0x121b: 0x00c0, 0x121c: 0x00c0, 0x121d: 0x00c0, - 0x121e: 0x00c0, 0x121f: 0x00c0, 0x1220: 0x00c0, 0x1221: 0x00c0, 0x1222: 0x00c0, 0x1223: 0x00c0, - 0x1224: 0x00c0, 0x1225: 0x00c0, 0x1226: 0x00c0, 0x1227: 0x00c0, 0x1228: 0x00c0, 0x1229: 0x00c0, - 0x122a: 0x00c0, 0x122b: 0x00c0, 0x122c: 0x00c0, 0x122d: 0x00c0, 0x122e: 0x00c0, 0x122f: 0x00c0, - 0x1230: 0x00c0, 0x1231: 0x00c0, 0x1232: 0x00c0, 0x1233: 0x00c0, 0x1234: 0x00c0, 0x1235: 0x00c0, - 0x1236: 0x00c0, 0x1237: 0x00c0, 0x1238: 0x00c0, 0x1239: 0x00c0, 0x123a: 0x00c0, 0x123b: 0x00c0, - 0x123c: 0x00c0, 0x123d: 0x00c0, 0x123e: 0x00c0, 0x123f: 0x00c0, - // Block 0x49, offset 0x1240 - 0x1240: 0x00c0, 0x1241: 0x00c0, 0x1242: 0x00c0, 0x1243: 0x00c0, 0x1244: 0x00c0, 0x1245: 0x00c0, - 0x1246: 0x00c0, 0x1247: 0x00c0, 0x1248: 0x00c0, 0x1249: 0x00c0, 0x124a: 0x00c0, 0x124b: 0x00c0, - 0x124c: 0x00c0, 0x124d: 0x00c0, 0x124e: 0x00c0, 0x124f: 0x00c0, 0x1250: 0x00c0, 0x1251: 0x00c0, - 0x1252: 0x00c0, 0x1253: 0x00c0, 0x1254: 0x00c0, 0x1255: 0x00c0, 0x1256: 0x00c0, 0x1257: 0x00c0, - 0x1258: 0x00c0, 0x1259: 0x00c0, 0x125a: 0x00c0, 0x125b: 0x00c0, 0x125c: 0x00c0, 0x125d: 0x00c0, - 0x125e: 0x00c0, 0x125f: 0x00c0, 0x1260: 0x00c0, 0x1261: 0x00c0, 0x1262: 0x00c0, 0x1263: 0x00c0, - 0x1264: 0x00c0, 0x1265: 0x00c0, 0x1266: 0x00c0, 0x1267: 0x00c0, 0x1268: 0x00c0, 0x1269: 0x00c0, - 0x126a: 0x00c0, 0x126b: 0x00c0, 0x126c: 0x00c0, 0x126d: 0x0080, 0x126e: 0x0080, 0x126f: 0x00c0, - 0x1270: 0x00c0, 0x1271: 0x00c0, 0x1272: 0x00c0, 0x1273: 0x00c0, 0x1274: 0x00c0, 0x1275: 0x00c0, - 0x1276: 0x00c0, 0x1277: 0x00c0, 0x1278: 0x00c0, 0x1279: 0x00c0, 0x127a: 0x00c0, 0x127b: 0x00c0, - 0x127c: 0x00c0, 0x127d: 0x00c0, 0x127e: 0x00c0, 0x127f: 0x00c0, - // Block 0x4a, offset 0x1280 - 0x1280: 0x0080, 0x1281: 0x00c0, 0x1282: 0x00c0, 0x1283: 0x00c0, 0x1284: 0x00c0, 0x1285: 0x00c0, - 0x1286: 0x00c0, 0x1287: 0x00c0, 0x1288: 0x00c0, 0x1289: 0x00c0, 0x128a: 0x00c0, 0x128b: 0x00c0, - 0x128c: 0x00c0, 0x128d: 0x00c0, 0x128e: 0x00c0, 0x128f: 0x00c0, 0x1290: 0x00c0, 0x1291: 0x00c0, - 0x1292: 0x00c0, 0x1293: 0x00c0, 0x1294: 0x00c0, 0x1295: 0x00c0, 0x1296: 0x00c0, 0x1297: 0x00c0, - 0x1298: 0x00c0, 0x1299: 0x00c0, 0x129a: 0x00c0, 0x129b: 0x0080, 0x129c: 0x0080, - 0x12a0: 0x00c0, 0x12a1: 0x00c0, 0x12a2: 0x00c0, 0x12a3: 0x00c0, - 0x12a4: 0x00c0, 0x12a5: 0x00c0, 0x12a6: 0x00c0, 0x12a7: 0x00c0, 0x12a8: 0x00c0, 0x12a9: 0x00c0, - 0x12aa: 0x00c0, 0x12ab: 0x00c0, 0x12ac: 0x00c0, 0x12ad: 0x00c0, 0x12ae: 0x00c0, 0x12af: 0x00c0, - 0x12b0: 0x00c0, 0x12b1: 0x00c0, 0x12b2: 0x00c0, 0x12b3: 0x00c0, 0x12b4: 0x00c0, 0x12b5: 0x00c0, - 0x12b6: 0x00c0, 0x12b7: 0x00c0, 0x12b8: 0x00c0, 0x12b9: 0x00c0, 0x12ba: 0x00c0, 0x12bb: 0x00c0, - 0x12bc: 0x00c0, 0x12bd: 0x00c0, 0x12be: 0x00c0, 0x12bf: 0x00c0, - // Block 0x4b, offset 0x12c0 - 0x12c0: 0x00c0, 0x12c1: 0x00c0, 0x12c2: 0x00c0, 0x12c3: 0x00c0, 0x12c4: 0x00c0, 0x12c5: 0x00c0, - 0x12c6: 0x00c0, 0x12c7: 0x00c0, 0x12c8: 0x00c0, 0x12c9: 0x00c0, 0x12ca: 0x00c0, 0x12cb: 0x00c0, - 0x12cc: 0x00c0, 0x12cd: 0x00c0, 0x12ce: 0x00c0, 0x12cf: 0x00c0, 0x12d0: 0x00c0, 0x12d1: 0x00c0, - 0x12d2: 0x00c0, 0x12d3: 0x00c0, 0x12d4: 0x00c0, 0x12d5: 0x00c0, 0x12d6: 0x00c0, 0x12d7: 0x00c0, - 0x12d8: 0x00c0, 0x12d9: 0x00c0, 0x12da: 0x00c0, 0x12db: 0x00c0, 0x12dc: 0x00c0, 0x12dd: 0x00c0, - 0x12de: 0x00c0, 0x12df: 0x00c0, 0x12e0: 0x00c0, 0x12e1: 0x00c0, 0x12e2: 0x00c0, 0x12e3: 0x00c0, - 0x12e4: 0x00c0, 0x12e5: 0x00c0, 0x12e6: 0x00c0, 0x12e7: 0x00c0, 0x12e8: 0x00c0, 0x12e9: 0x00c0, - 0x12ea: 0x00c0, 0x12eb: 0x0080, 0x12ec: 0x0080, 0x12ed: 0x0080, 0x12ee: 0x0080, 0x12ef: 0x0080, - 0x12f0: 0x0080, 0x12f1: 0x00c0, 0x12f2: 0x00c0, 0x12f3: 0x00c0, 0x12f4: 0x00c0, 0x12f5: 0x00c0, - 0x12f6: 0x00c0, 0x12f7: 0x00c0, 0x12f8: 0x00c0, - // Block 0x4c, offset 0x1300 - 0x1300: 0x00c0, 0x1301: 0x00c0, 0x1302: 0x00c0, 0x1303: 0x00c0, 0x1304: 0x00c0, 0x1305: 0x00c0, - 0x1306: 0x00c0, 0x1307: 0x00c0, 0x1308: 0x00c0, 0x1309: 0x00c0, 0x130a: 0x00c0, 0x130b: 0x00c0, - 0x130c: 0x00c0, 0x130e: 0x00c0, 0x130f: 0x00c0, 0x1310: 0x00c0, 0x1311: 0x00c0, - 0x1312: 0x00c3, 0x1313: 0x00c3, 0x1314: 0x00c6, - 0x1320: 0x00c0, 0x1321: 0x00c0, 0x1322: 0x00c0, 0x1323: 0x00c0, - 0x1324: 0x00c0, 0x1325: 0x00c0, 0x1326: 0x00c0, 0x1327: 0x00c0, 0x1328: 0x00c0, 0x1329: 0x00c0, - 0x132a: 0x00c0, 0x132b: 0x00c0, 0x132c: 0x00c0, 0x132d: 0x00c0, 0x132e: 0x00c0, 0x132f: 0x00c0, - 0x1330: 0x00c0, 0x1331: 0x00c0, 0x1332: 0x00c3, 0x1333: 0x00c3, 0x1334: 0x00c6, 0x1335: 0x0080, - 0x1336: 0x0080, - // Block 0x4d, offset 0x1340 - 0x1340: 0x00c0, 0x1341: 0x00c0, 0x1342: 0x00c0, 0x1343: 0x00c0, 0x1344: 0x00c0, 0x1345: 0x00c0, - 0x1346: 0x00c0, 0x1347: 0x00c0, 0x1348: 0x00c0, 0x1349: 0x00c0, 0x134a: 0x00c0, 0x134b: 0x00c0, - 0x134c: 0x00c0, 0x134d: 0x00c0, 0x134e: 0x00c0, 0x134f: 0x00c0, 0x1350: 0x00c0, 0x1351: 0x00c0, - 0x1352: 0x00c3, 0x1353: 0x00c3, - 0x1360: 0x00c0, 0x1361: 0x00c0, 0x1362: 0x00c0, 0x1363: 0x00c0, - 0x1364: 0x00c0, 0x1365: 0x00c0, 0x1366: 0x00c0, 0x1367: 0x00c0, 0x1368: 0x00c0, 0x1369: 0x00c0, - 0x136a: 0x00c0, 0x136b: 0x00c0, 0x136c: 0x00c0, 0x136e: 0x00c0, 0x136f: 0x00c0, - 0x1370: 0x00c0, 0x1372: 0x00c3, 0x1373: 0x00c3, - // Block 0x4e, offset 0x1380 - 0x1380: 0x00c0, 0x1381: 0x00c0, 0x1382: 0x00c0, 0x1383: 0x00c0, 0x1384: 0x00c0, 0x1385: 0x00c0, - 0x1386: 0x00c0, 0x1387: 0x00c0, 0x1388: 0x00c0, 0x1389: 0x00c0, 0x138a: 0x00c0, 0x138b: 0x00c0, - 0x138c: 0x00c0, 0x138d: 0x00c0, 0x138e: 0x00c0, 0x138f: 0x00c0, 0x1390: 0x00c0, 0x1391: 0x00c0, - 0x1392: 0x00c0, 0x1393: 0x00c0, 0x1394: 0x00c0, 0x1395: 0x00c0, 0x1396: 0x00c0, 0x1397: 0x00c0, - 0x1398: 0x00c0, 0x1399: 0x00c0, 0x139a: 0x00c0, 0x139b: 0x00c0, 0x139c: 0x00c0, 0x139d: 0x00c0, - 0x139e: 0x00c0, 0x139f: 0x00c0, 0x13a0: 0x00c0, 0x13a1: 0x00c0, 0x13a2: 0x00c0, 0x13a3: 0x00c0, - 0x13a4: 0x00c0, 0x13a5: 0x00c0, 0x13a6: 0x00c0, 0x13a7: 0x00c0, 0x13a8: 0x00c0, 0x13a9: 0x00c0, - 0x13aa: 0x00c0, 0x13ab: 0x00c0, 0x13ac: 0x00c0, 0x13ad: 0x00c0, 0x13ae: 0x00c0, 0x13af: 0x00c0, - 0x13b0: 0x00c0, 0x13b1: 0x00c0, 0x13b2: 0x00c0, 0x13b3: 0x00c0, 0x13b4: 0x0040, 0x13b5: 0x0040, - 0x13b6: 0x00c0, 0x13b7: 0x00c3, 0x13b8: 0x00c3, 0x13b9: 0x00c3, 0x13ba: 0x00c3, 0x13bb: 0x00c3, - 0x13bc: 0x00c3, 0x13bd: 0x00c3, 0x13be: 0x00c0, 0x13bf: 0x00c0, - // Block 0x4f, offset 0x13c0 - 0x13c0: 0x00c0, 0x13c1: 0x00c0, 0x13c2: 0x00c0, 0x13c3: 0x00c0, 0x13c4: 0x00c0, 0x13c5: 0x00c0, - 0x13c6: 0x00c3, 0x13c7: 0x00c0, 0x13c8: 0x00c0, 0x13c9: 0x00c3, 0x13ca: 0x00c3, 0x13cb: 0x00c3, - 0x13cc: 0x00c3, 0x13cd: 0x00c3, 0x13ce: 0x00c3, 0x13cf: 0x00c3, 0x13d0: 0x00c3, 0x13d1: 0x00c3, - 0x13d2: 0x00c6, 0x13d3: 0x00c3, 0x13d4: 0x0080, 0x13d5: 0x0080, 0x13d6: 0x0080, 0x13d7: 0x00c0, - 0x13d8: 0x0080, 0x13d9: 0x0080, 0x13da: 0x0080, 0x13db: 0x0080, 0x13dc: 0x00c0, 0x13dd: 0x00c3, - 0x13e0: 0x00c0, 0x13e1: 0x00c0, 0x13e2: 0x00c0, 0x13e3: 0x00c0, - 0x13e4: 0x00c0, 0x13e5: 0x00c0, 0x13e6: 0x00c0, 0x13e7: 0x00c0, 0x13e8: 0x00c0, 0x13e9: 0x00c0, - 0x13f0: 0x0080, 0x13f1: 0x0080, 0x13f2: 0x0080, 0x13f3: 0x0080, 0x13f4: 0x0080, 0x13f5: 0x0080, - 0x13f6: 0x0080, 0x13f7: 0x0080, 0x13f8: 0x0080, 0x13f9: 0x0080, - // Block 0x50, offset 0x1400 - 0x1400: 0x0080, 0x1401: 0x0080, 0x1402: 0x0080, 0x1403: 0x0080, 0x1404: 0x0080, 0x1405: 0x0080, - 0x1406: 0x0080, 0x1407: 0x0082, 0x1408: 0x0080, 0x1409: 0x0080, 0x140a: 0x0080, 0x140b: 0x0040, - 0x140c: 0x0040, 0x140d: 0x0040, 0x140e: 0x0040, 0x1410: 0x00c0, 0x1411: 0x00c0, - 0x1412: 0x00c0, 0x1413: 0x00c0, 0x1414: 0x00c0, 0x1415: 0x00c0, 0x1416: 0x00c0, 0x1417: 0x00c0, - 0x1418: 0x00c0, 0x1419: 0x00c0, - 0x1420: 0x00c2, 0x1421: 0x00c2, 0x1422: 0x00c2, 0x1423: 0x00c2, - 0x1424: 0x00c2, 0x1425: 0x00c2, 0x1426: 0x00c2, 0x1427: 0x00c2, 0x1428: 0x00c2, 0x1429: 0x00c2, - 0x142a: 0x00c2, 0x142b: 0x00c2, 0x142c: 0x00c2, 0x142d: 0x00c2, 0x142e: 0x00c2, 0x142f: 0x00c2, - 0x1430: 0x00c2, 0x1431: 0x00c2, 0x1432: 0x00c2, 0x1433: 0x00c2, 0x1434: 0x00c2, 0x1435: 0x00c2, - 0x1436: 0x00c2, 0x1437: 0x00c2, 0x1438: 0x00c2, 0x1439: 0x00c2, 0x143a: 0x00c2, 0x143b: 0x00c2, - 0x143c: 0x00c2, 0x143d: 0x00c2, 0x143e: 0x00c2, 0x143f: 0x00c2, - // Block 0x51, offset 0x1440 - 0x1440: 0x00c2, 0x1441: 0x00c2, 0x1442: 0x00c2, 0x1443: 0x00c2, 0x1444: 0x00c2, 0x1445: 0x00c2, - 0x1446: 0x00c2, 0x1447: 0x00c2, 0x1448: 0x00c2, 0x1449: 0x00c2, 0x144a: 0x00c2, 0x144b: 0x00c2, - 0x144c: 0x00c2, 0x144d: 0x00c2, 0x144e: 0x00c2, 0x144f: 0x00c2, 0x1450: 0x00c2, 0x1451: 0x00c2, - 0x1452: 0x00c2, 0x1453: 0x00c2, 0x1454: 0x00c2, 0x1455: 0x00c2, 0x1456: 0x00c2, 0x1457: 0x00c2, - 0x1458: 0x00c2, 0x1459: 0x00c2, 0x145a: 0x00c2, 0x145b: 0x00c2, 0x145c: 0x00c2, 0x145d: 0x00c2, - 0x145e: 0x00c2, 0x145f: 0x00c2, 0x1460: 0x00c2, 0x1461: 0x00c2, 0x1462: 0x00c2, 0x1463: 0x00c2, - 0x1464: 0x00c2, 0x1465: 0x00c2, 0x1466: 0x00c2, 0x1467: 0x00c2, 0x1468: 0x00c2, 0x1469: 0x00c2, - 0x146a: 0x00c2, 0x146b: 0x00c2, 0x146c: 0x00c2, 0x146d: 0x00c2, 0x146e: 0x00c2, 0x146f: 0x00c2, - 0x1470: 0x00c2, 0x1471: 0x00c2, 0x1472: 0x00c2, 0x1473: 0x00c2, 0x1474: 0x00c2, 0x1475: 0x00c2, - 0x1476: 0x00c2, 0x1477: 0x00c2, - // Block 0x52, offset 0x1480 - 0x1480: 0x00c0, 0x1481: 0x00c0, 0x1482: 0x00c0, 0x1483: 0x00c0, 0x1484: 0x00c0, 0x1485: 0x00c3, - 0x1486: 0x00c3, 0x1487: 0x00c2, 0x1488: 0x00c2, 0x1489: 0x00c2, 0x148a: 0x00c2, 0x148b: 0x00c2, - 0x148c: 0x00c2, 0x148d: 0x00c2, 0x148e: 0x00c2, 0x148f: 0x00c2, 0x1490: 0x00c2, 0x1491: 0x00c2, - 0x1492: 0x00c2, 0x1493: 0x00c2, 0x1494: 0x00c2, 0x1495: 0x00c2, 0x1496: 0x00c2, 0x1497: 0x00c2, - 0x1498: 0x00c2, 0x1499: 0x00c2, 0x149a: 0x00c2, 0x149b: 0x00c2, 0x149c: 0x00c2, 0x149d: 0x00c2, - 0x149e: 0x00c2, 0x149f: 0x00c2, 0x14a0: 0x00c2, 0x14a1: 0x00c2, 0x14a2: 0x00c2, 0x14a3: 0x00c2, - 0x14a4: 0x00c2, 0x14a5: 0x00c2, 0x14a6: 0x00c2, 0x14a7: 0x00c2, 0x14a8: 0x00c2, 0x14a9: 0x00c3, - 0x14aa: 0x00c2, - 0x14b0: 0x00c0, 0x14b1: 0x00c0, 0x14b2: 0x00c0, 0x14b3: 0x00c0, 0x14b4: 0x00c0, 0x14b5: 0x00c0, - 0x14b6: 0x00c0, 0x14b7: 0x00c0, 0x14b8: 0x00c0, 0x14b9: 0x00c0, 0x14ba: 0x00c0, 0x14bb: 0x00c0, - 0x14bc: 0x00c0, 0x14bd: 0x00c0, 0x14be: 0x00c0, 0x14bf: 0x00c0, - // Block 0x53, offset 0x14c0 - 0x14c0: 0x00c0, 0x14c1: 0x00c0, 0x14c2: 0x00c0, 0x14c3: 0x00c0, 0x14c4: 0x00c0, 0x14c5: 0x00c0, - 0x14c6: 0x00c0, 0x14c7: 0x00c0, 0x14c8: 0x00c0, 0x14c9: 0x00c0, 0x14ca: 0x00c0, 0x14cb: 0x00c0, - 0x14cc: 0x00c0, 0x14cd: 0x00c0, 0x14ce: 0x00c0, 0x14cf: 0x00c0, 0x14d0: 0x00c0, 0x14d1: 0x00c0, - 0x14d2: 0x00c0, 0x14d3: 0x00c0, 0x14d4: 0x00c0, 0x14d5: 0x00c0, 0x14d6: 0x00c0, 0x14d7: 0x00c0, - 0x14d8: 0x00c0, 0x14d9: 0x00c0, 0x14da: 0x00c0, 0x14db: 0x00c0, 0x14dc: 0x00c0, 0x14dd: 0x00c0, - 0x14de: 0x00c0, 0x14df: 0x00c0, 0x14e0: 0x00c0, 0x14e1: 0x00c0, 0x14e2: 0x00c0, 0x14e3: 0x00c0, - 0x14e4: 0x00c0, 0x14e5: 0x00c0, 0x14e6: 0x00c0, 0x14e7: 0x00c0, 0x14e8: 0x00c0, 0x14e9: 0x00c0, - 0x14ea: 0x00c0, 0x14eb: 0x00c0, 0x14ec: 0x00c0, 0x14ed: 0x00c0, 0x14ee: 0x00c0, 0x14ef: 0x00c0, - 0x14f0: 0x00c0, 0x14f1: 0x00c0, 0x14f2: 0x00c0, 0x14f3: 0x00c0, 0x14f4: 0x00c0, 0x14f5: 0x00c0, - // Block 0x54, offset 0x1500 - 0x1500: 0x00c0, 0x1501: 0x00c0, 0x1502: 0x00c0, 0x1503: 0x00c0, 0x1504: 0x00c0, 0x1505: 0x00c0, - 0x1506: 0x00c0, 0x1507: 0x00c0, 0x1508: 0x00c0, 0x1509: 0x00c0, 0x150a: 0x00c0, 0x150b: 0x00c0, - 0x150c: 0x00c0, 0x150d: 0x00c0, 0x150e: 0x00c0, 0x150f: 0x00c0, 0x1510: 0x00c0, 0x1511: 0x00c0, - 0x1512: 0x00c0, 0x1513: 0x00c0, 0x1514: 0x00c0, 0x1515: 0x00c0, 0x1516: 0x00c0, 0x1517: 0x00c0, - 0x1518: 0x00c0, 0x1519: 0x00c0, 0x151a: 0x00c0, 0x151b: 0x00c0, 0x151c: 0x00c0, 0x151d: 0x00c0, - 0x151e: 0x00c0, 0x1520: 0x00c3, 0x1521: 0x00c3, 0x1522: 0x00c3, 0x1523: 0x00c0, - 0x1524: 0x00c0, 0x1525: 0x00c0, 0x1526: 0x00c0, 0x1527: 0x00c3, 0x1528: 0x00c3, 0x1529: 0x00c0, - 0x152a: 0x00c0, 0x152b: 0x00c0, - 0x1530: 0x00c0, 0x1531: 0x00c0, 0x1532: 0x00c3, 0x1533: 0x00c0, 0x1534: 0x00c0, 0x1535: 0x00c0, - 0x1536: 0x00c0, 0x1537: 0x00c0, 0x1538: 0x00c0, 0x1539: 0x00c3, 0x153a: 0x00c3, 0x153b: 0x00c3, - // Block 0x55, offset 0x1540 - 0x1540: 0x0080, 0x1544: 0x0080, 0x1545: 0x0080, - 0x1546: 0x00c0, 0x1547: 0x00c0, 0x1548: 0x00c0, 0x1549: 0x00c0, 0x154a: 0x00c0, 0x154b: 0x00c0, - 0x154c: 0x00c0, 0x154d: 0x00c0, 0x154e: 0x00c0, 0x154f: 0x00c0, 0x1550: 0x00c0, 0x1551: 0x00c0, - 0x1552: 0x00c0, 0x1553: 0x00c0, 0x1554: 0x00c0, 0x1555: 0x00c0, 0x1556: 0x00c0, 0x1557: 0x00c0, - 0x1558: 0x00c0, 0x1559: 0x00c0, 0x155a: 0x00c0, 0x155b: 0x00c0, 0x155c: 0x00c0, 0x155d: 0x00c0, - 0x155e: 0x00c0, 0x155f: 0x00c0, 0x1560: 0x00c0, 0x1561: 0x00c0, 0x1562: 0x00c0, 0x1563: 0x00c0, - 0x1564: 0x00c0, 0x1565: 0x00c0, 0x1566: 0x00c0, 0x1567: 0x00c0, 0x1568: 0x00c0, 0x1569: 0x00c0, - 0x156a: 0x00c0, 0x156b: 0x00c0, 0x156c: 0x00c0, 0x156d: 0x00c0, - 0x1570: 0x00c0, 0x1571: 0x00c0, 0x1572: 0x00c0, 0x1573: 0x00c0, 0x1574: 0x00c0, - // Block 0x56, offset 0x1580 - 0x1580: 0x00c0, 0x1581: 0x00c0, 0x1582: 0x00c0, 0x1583: 0x00c0, 0x1584: 0x00c0, 0x1585: 0x00c0, - 0x1586: 0x00c0, 0x1587: 0x00c0, 0x1588: 0x00c0, 0x1589: 0x00c0, 0x158a: 0x00c0, 0x158b: 0x00c0, - 0x158c: 0x00c0, 0x158d: 0x00c0, 0x158e: 0x00c0, 0x158f: 0x00c0, 0x1590: 0x00c0, 0x1591: 0x00c0, - 0x1592: 0x00c0, 0x1593: 0x00c0, 0x1594: 0x00c0, 0x1595: 0x00c0, 0x1596: 0x00c0, 0x1597: 0x00c0, - 0x1598: 0x00c0, 0x1599: 0x00c0, 0x159a: 0x00c0, 0x159b: 0x00c0, 0x159c: 0x00c0, 0x159d: 0x00c0, - 0x159e: 0x00c0, 0x159f: 0x00c0, 0x15a0: 0x00c0, 0x15a1: 0x00c0, 0x15a2: 0x00c0, 0x15a3: 0x00c0, - 0x15a4: 0x00c0, 0x15a5: 0x00c0, 0x15a6: 0x00c0, 0x15a7: 0x00c0, 0x15a8: 0x00c0, 0x15a9: 0x00c0, - 0x15aa: 0x00c0, 0x15ab: 0x00c0, - 0x15b0: 0x00c0, 0x15b1: 0x00c0, 0x15b2: 0x00c0, 0x15b3: 0x00c0, 0x15b4: 0x00c0, 0x15b5: 0x00c0, - 0x15b6: 0x00c0, 0x15b7: 0x00c0, 0x15b8: 0x00c0, 0x15b9: 0x00c0, 0x15ba: 0x00c0, 0x15bb: 0x00c0, - 0x15bc: 0x00c0, 0x15bd: 0x00c0, 0x15be: 0x00c0, 0x15bf: 0x00c0, - // Block 0x57, offset 0x15c0 - 0x15c0: 0x00c0, 0x15c1: 0x00c0, 0x15c2: 0x00c0, 0x15c3: 0x00c0, 0x15c4: 0x00c0, 0x15c5: 0x00c0, - 0x15c6: 0x00c0, 0x15c7: 0x00c0, 0x15c8: 0x00c0, 0x15c9: 0x00c0, - 0x15d0: 0x00c0, 0x15d1: 0x00c0, - 0x15d2: 0x00c0, 0x15d3: 0x00c0, 0x15d4: 0x00c0, 0x15d5: 0x00c0, 0x15d6: 0x00c0, 0x15d7: 0x00c0, - 0x15d8: 0x00c0, 0x15d9: 0x00c0, 0x15da: 0x0080, - 0x15de: 0x0080, 0x15df: 0x0080, 0x15e0: 0x0080, 0x15e1: 0x0080, 0x15e2: 0x0080, 0x15e3: 0x0080, - 0x15e4: 0x0080, 0x15e5: 0x0080, 0x15e6: 0x0080, 0x15e7: 0x0080, 0x15e8: 0x0080, 0x15e9: 0x0080, - 0x15ea: 0x0080, 0x15eb: 0x0080, 0x15ec: 0x0080, 0x15ed: 0x0080, 0x15ee: 0x0080, 0x15ef: 0x0080, - 0x15f0: 0x0080, 0x15f1: 0x0080, 0x15f2: 0x0080, 0x15f3: 0x0080, 0x15f4: 0x0080, 0x15f5: 0x0080, - 0x15f6: 0x0080, 0x15f7: 0x0080, 0x15f8: 0x0080, 0x15f9: 0x0080, 0x15fa: 0x0080, 0x15fb: 0x0080, - 0x15fc: 0x0080, 0x15fd: 0x0080, 0x15fe: 0x0080, 0x15ff: 0x0080, - // Block 0x58, offset 0x1600 - 0x1600: 0x00c0, 0x1601: 0x00c0, 0x1602: 0x00c0, 0x1603: 0x00c0, 0x1604: 0x00c0, 0x1605: 0x00c0, - 0x1606: 0x00c0, 0x1607: 0x00c0, 0x1608: 0x00c0, 0x1609: 0x00c0, 0x160a: 0x00c0, 0x160b: 0x00c0, - 0x160c: 0x00c0, 0x160d: 0x00c0, 0x160e: 0x00c0, 0x160f: 0x00c0, 0x1610: 0x00c0, 0x1611: 0x00c0, - 0x1612: 0x00c0, 0x1613: 0x00c0, 0x1614: 0x00c0, 0x1615: 0x00c0, 0x1616: 0x00c0, 0x1617: 0x00c3, - 0x1618: 0x00c3, 0x1619: 0x00c0, 0x161a: 0x00c0, 0x161b: 0x00c3, - 0x161e: 0x0080, 0x161f: 0x0080, 0x1620: 0x00c0, 0x1621: 0x00c0, 0x1622: 0x00c0, 0x1623: 0x00c0, - 0x1624: 0x00c0, 0x1625: 0x00c0, 0x1626: 0x00c0, 0x1627: 0x00c0, 0x1628: 0x00c0, 0x1629: 0x00c0, - 0x162a: 0x00c0, 0x162b: 0x00c0, 0x162c: 0x00c0, 0x162d: 0x00c0, 0x162e: 0x00c0, 0x162f: 0x00c0, - 0x1630: 0x00c0, 0x1631: 0x00c0, 0x1632: 0x00c0, 0x1633: 0x00c0, 0x1634: 0x00c0, 0x1635: 0x00c0, - 0x1636: 0x00c0, 0x1637: 0x00c0, 0x1638: 0x00c0, 0x1639: 0x00c0, 0x163a: 0x00c0, 0x163b: 0x00c0, - 0x163c: 0x00c0, 0x163d: 0x00c0, 0x163e: 0x00c0, 0x163f: 0x00c0, - // Block 0x59, offset 0x1640 - 0x1640: 0x00c0, 0x1641: 0x00c0, 0x1642: 0x00c0, 0x1643: 0x00c0, 0x1644: 0x00c0, 0x1645: 0x00c0, - 0x1646: 0x00c0, 0x1647: 0x00c0, 0x1648: 0x00c0, 0x1649: 0x00c0, 0x164a: 0x00c0, 0x164b: 0x00c0, - 0x164c: 0x00c0, 0x164d: 0x00c0, 0x164e: 0x00c0, 0x164f: 0x00c0, 0x1650: 0x00c0, 0x1651: 0x00c0, - 0x1652: 0x00c0, 0x1653: 0x00c0, 0x1654: 0x00c0, 0x1655: 0x00c0, 0x1656: 0x00c3, 0x1657: 0x00c0, - 0x1658: 0x00c3, 0x1659: 0x00c3, 0x165a: 0x00c3, 0x165b: 0x00c3, 0x165c: 0x00c3, 0x165d: 0x00c3, - 0x165e: 0x00c3, 0x1660: 0x00c6, 0x1661: 0x00c0, 0x1662: 0x00c3, 0x1663: 0x00c0, - 0x1664: 0x00c0, 0x1665: 0x00c3, 0x1666: 0x00c3, 0x1667: 0x00c3, 0x1668: 0x00c3, 0x1669: 0x00c3, - 0x166a: 0x00c3, 0x166b: 0x00c3, 0x166c: 0x00c3, 0x166d: 0x00c0, 0x166e: 0x00c0, 0x166f: 0x00c0, - 0x1670: 0x00c0, 0x1671: 0x00c0, 0x1672: 0x00c0, 0x1673: 0x00c3, 0x1674: 0x00c3, 0x1675: 0x00c3, - 0x1676: 0x00c3, 0x1677: 0x00c3, 0x1678: 0x00c3, 0x1679: 0x00c3, 0x167a: 0x00c3, 0x167b: 0x00c3, - 0x167c: 0x00c3, 0x167f: 0x00c3, - // Block 0x5a, offset 0x1680 - 0x1680: 0x00c0, 0x1681: 0x00c0, 0x1682: 0x00c0, 0x1683: 0x00c0, 0x1684: 0x00c0, 0x1685: 0x00c0, - 0x1686: 0x00c0, 0x1687: 0x00c0, 0x1688: 0x00c0, 0x1689: 0x00c0, - 0x1690: 0x00c0, 0x1691: 0x00c0, - 0x1692: 0x00c0, 0x1693: 0x00c0, 0x1694: 0x00c0, 0x1695: 0x00c0, 0x1696: 0x00c0, 0x1697: 0x00c0, - 0x1698: 0x00c0, 0x1699: 0x00c0, - 0x16a0: 0x0080, 0x16a1: 0x0080, 0x16a2: 0x0080, 0x16a3: 0x0080, - 0x16a4: 0x0080, 0x16a5: 0x0080, 0x16a6: 0x0080, 0x16a7: 0x00c0, 0x16a8: 0x0080, 0x16a9: 0x0080, - 0x16aa: 0x0080, 0x16ab: 0x0080, 0x16ac: 0x0080, 0x16ad: 0x0080, - 0x16b0: 0x00c3, 0x16b1: 0x00c3, 0x16b2: 0x00c3, 0x16b3: 0x00c3, 0x16b4: 0x00c3, 0x16b5: 0x00c3, - 0x16b6: 0x00c3, 0x16b7: 0x00c3, 0x16b8: 0x00c3, 0x16b9: 0x00c3, 0x16ba: 0x00c3, 0x16bb: 0x00c3, - 0x16bc: 0x00c3, 0x16bd: 0x00c3, 0x16be: 0x0083, - // Block 0x5b, offset 0x16c0 - 0x16c0: 0x00c3, 0x16c1: 0x00c3, 0x16c2: 0x00c3, 0x16c3: 0x00c3, 0x16c4: 0x00c0, 0x16c5: 0x00c0, - 0x16c6: 0x00c0, 0x16c7: 0x00c0, 0x16c8: 0x00c0, 0x16c9: 0x00c0, 0x16ca: 0x00c0, 0x16cb: 0x00c0, - 0x16cc: 0x00c0, 0x16cd: 0x00c0, 0x16ce: 0x00c0, 0x16cf: 0x00c0, 0x16d0: 0x00c0, 0x16d1: 0x00c0, - 0x16d2: 0x00c0, 0x16d3: 0x00c0, 0x16d4: 0x00c0, 0x16d5: 0x00c0, 0x16d6: 0x00c0, 0x16d7: 0x00c0, - 0x16d8: 0x00c0, 0x16d9: 0x00c0, 0x16da: 0x00c0, 0x16db: 0x00c0, 0x16dc: 0x00c0, 0x16dd: 0x00c0, - 0x16de: 0x00c0, 0x16df: 0x00c0, 0x16e0: 0x00c0, 0x16e1: 0x00c0, 0x16e2: 0x00c0, 0x16e3: 0x00c0, - 0x16e4: 0x00c0, 0x16e5: 0x00c0, 0x16e6: 0x00c0, 0x16e7: 0x00c0, 0x16e8: 0x00c0, 0x16e9: 0x00c0, - 0x16ea: 0x00c0, 0x16eb: 0x00c0, 0x16ec: 0x00c0, 0x16ed: 0x00c0, 0x16ee: 0x00c0, 0x16ef: 0x00c0, - 0x16f0: 0x00c0, 0x16f1: 0x00c0, 0x16f2: 0x00c0, 0x16f3: 0x00c0, 0x16f4: 0x00c3, 0x16f5: 0x00c0, - 0x16f6: 0x00c3, 0x16f7: 0x00c3, 0x16f8: 0x00c3, 0x16f9: 0x00c3, 0x16fa: 0x00c3, 0x16fb: 0x00c0, - 0x16fc: 0x00c3, 0x16fd: 0x00c0, 0x16fe: 0x00c0, 0x16ff: 0x00c0, - // Block 0x5c, offset 0x1700 - 0x1700: 0x00c0, 0x1701: 0x00c0, 0x1702: 0x00c3, 0x1703: 0x00c0, 0x1704: 0x00c5, 0x1705: 0x00c0, - 0x1706: 0x00c0, 0x1707: 0x00c0, 0x1708: 0x00c0, 0x1709: 0x00c0, 0x170a: 0x00c0, 0x170b: 0x00c0, - 0x1710: 0x00c0, 0x1711: 0x00c0, - 0x1712: 0x00c0, 0x1713: 0x00c0, 0x1714: 0x00c0, 0x1715: 0x00c0, 0x1716: 0x00c0, 0x1717: 0x00c0, - 0x1718: 0x00c0, 0x1719: 0x00c0, 0x171a: 0x0080, 0x171b: 0x0080, 0x171c: 0x0080, 0x171d: 0x0080, - 0x171e: 0x0080, 0x171f: 0x0080, 0x1720: 0x0080, 0x1721: 0x0080, 0x1722: 0x0080, 0x1723: 0x0080, - 0x1724: 0x0080, 0x1725: 0x0080, 0x1726: 0x0080, 0x1727: 0x0080, 0x1728: 0x0080, 0x1729: 0x0080, - 0x172a: 0x0080, 0x172b: 0x00c3, 0x172c: 0x00c3, 0x172d: 0x00c3, 0x172e: 0x00c3, 0x172f: 0x00c3, - 0x1730: 0x00c3, 0x1731: 0x00c3, 0x1732: 0x00c3, 0x1733: 0x00c3, 0x1734: 0x0080, 0x1735: 0x0080, - 0x1736: 0x0080, 0x1737: 0x0080, 0x1738: 0x0080, 0x1739: 0x0080, 0x173a: 0x0080, 0x173b: 0x0080, - 0x173c: 0x0080, - // Block 0x5d, offset 0x1740 - 0x1740: 0x00c3, 0x1741: 0x00c3, 0x1742: 0x00c0, 0x1743: 0x00c0, 0x1744: 0x00c0, 0x1745: 0x00c0, - 0x1746: 0x00c0, 0x1747: 0x00c0, 0x1748: 0x00c0, 0x1749: 0x00c0, 0x174a: 0x00c0, 0x174b: 0x00c0, - 0x174c: 0x00c0, 0x174d: 0x00c0, 0x174e: 0x00c0, 0x174f: 0x00c0, 0x1750: 0x00c0, 0x1751: 0x00c0, - 0x1752: 0x00c0, 0x1753: 0x00c0, 0x1754: 0x00c0, 0x1755: 0x00c0, 0x1756: 0x00c0, 0x1757: 0x00c0, - 0x1758: 0x00c0, 0x1759: 0x00c0, 0x175a: 0x00c0, 0x175b: 0x00c0, 0x175c: 0x00c0, 0x175d: 0x00c0, - 0x175e: 0x00c0, 0x175f: 0x00c0, 0x1760: 0x00c0, 0x1761: 0x00c0, 0x1762: 0x00c3, 0x1763: 0x00c3, - 0x1764: 0x00c3, 0x1765: 0x00c3, 0x1766: 0x00c0, 0x1767: 0x00c0, 0x1768: 0x00c3, 0x1769: 0x00c3, - 0x176a: 0x00c5, 0x176b: 0x00c6, 0x176c: 0x00c3, 0x176d: 0x00c3, 0x176e: 0x00c0, 0x176f: 0x00c0, - 0x1770: 0x00c0, 0x1771: 0x00c0, 0x1772: 0x00c0, 0x1773: 0x00c0, 0x1774: 0x00c0, 0x1775: 0x00c0, - 0x1776: 0x00c0, 0x1777: 0x00c0, 0x1778: 0x00c0, 0x1779: 0x00c0, 0x177a: 0x00c0, 0x177b: 0x00c0, - 0x177c: 0x00c0, 0x177d: 0x00c0, 0x177e: 0x00c0, 0x177f: 0x00c0, - // Block 0x5e, offset 0x1780 - 0x1780: 0x00c0, 0x1781: 0x00c0, 0x1782: 0x00c0, 0x1783: 0x00c0, 0x1784: 0x00c0, 0x1785: 0x00c0, - 0x1786: 0x00c0, 0x1787: 0x00c0, 0x1788: 0x00c0, 0x1789: 0x00c0, 0x178a: 0x00c0, 0x178b: 0x00c0, - 0x178c: 0x00c0, 0x178d: 0x00c0, 0x178e: 0x00c0, 0x178f: 0x00c0, 0x1790: 0x00c0, 0x1791: 0x00c0, - 0x1792: 0x00c0, 0x1793: 0x00c0, 0x1794: 0x00c0, 0x1795: 0x00c0, 0x1796: 0x00c0, 0x1797: 0x00c0, - 0x1798: 0x00c0, 0x1799: 0x00c0, 0x179a: 0x00c0, 0x179b: 0x00c0, 0x179c: 0x00c0, 0x179d: 0x00c0, - 0x179e: 0x00c0, 0x179f: 0x00c0, 0x17a0: 0x00c0, 0x17a1: 0x00c0, 0x17a2: 0x00c0, 0x17a3: 0x00c0, - 0x17a4: 0x00c0, 0x17a5: 0x00c0, 0x17a6: 0x00c3, 0x17a7: 0x00c0, 0x17a8: 0x00c3, 0x17a9: 0x00c3, - 0x17aa: 0x00c0, 0x17ab: 0x00c0, 0x17ac: 0x00c0, 0x17ad: 0x00c3, 0x17ae: 0x00c0, 0x17af: 0x00c3, - 0x17b0: 0x00c3, 0x17b1: 0x00c3, 0x17b2: 0x00c5, 0x17b3: 0x00c5, - 0x17bc: 0x0080, 0x17bd: 0x0080, 0x17be: 0x0080, 0x17bf: 0x0080, - // Block 0x5f, offset 0x17c0 - 0x17c0: 0x00c0, 0x17c1: 0x00c0, 0x17c2: 0x00c0, 0x17c3: 0x00c0, 0x17c4: 0x00c0, 0x17c5: 0x00c0, - 0x17c6: 0x00c0, 0x17c7: 0x00c0, 0x17c8: 0x00c0, 0x17c9: 0x00c0, 0x17ca: 0x00c0, 0x17cb: 0x00c0, - 0x17cc: 0x00c0, 0x17cd: 0x00c0, 0x17ce: 0x00c0, 0x17cf: 0x00c0, 0x17d0: 0x00c0, 0x17d1: 0x00c0, - 0x17d2: 0x00c0, 0x17d3: 0x00c0, 0x17d4: 0x00c0, 0x17d5: 0x00c0, 0x17d6: 0x00c0, 0x17d7: 0x00c0, - 0x17d8: 0x00c0, 0x17d9: 0x00c0, 0x17da: 0x00c0, 0x17db: 0x00c0, 0x17dc: 0x00c0, 0x17dd: 0x00c0, - 0x17de: 0x00c0, 0x17df: 0x00c0, 0x17e0: 0x00c0, 0x17e1: 0x00c0, 0x17e2: 0x00c0, 0x17e3: 0x00c0, - 0x17e4: 0x00c0, 0x17e5: 0x00c0, 0x17e6: 0x00c0, 0x17e7: 0x00c0, 0x17e8: 0x00c0, 0x17e9: 0x00c0, - 0x17ea: 0x00c0, 0x17eb: 0x00c0, 0x17ec: 0x00c3, 0x17ed: 0x00c3, 0x17ee: 0x00c3, 0x17ef: 0x00c3, - 0x17f0: 0x00c3, 0x17f1: 0x00c3, 0x17f2: 0x00c3, 0x17f3: 0x00c3, 0x17f4: 0x00c0, 0x17f5: 0x00c0, - 0x17f6: 0x00c3, 0x17f7: 0x00c3, 0x17fb: 0x0080, - 0x17fc: 0x0080, 0x17fd: 0x0080, 0x17fe: 0x0080, 0x17ff: 0x0080, - // Block 0x60, offset 0x1800 - 0x1800: 0x00c0, 0x1801: 0x00c0, 0x1802: 0x00c0, 0x1803: 0x00c0, 0x1804: 0x00c0, 0x1805: 0x00c0, - 0x1806: 0x00c0, 0x1807: 0x00c0, 0x1808: 0x00c0, 0x1809: 0x00c0, - 0x180d: 0x00c0, 0x180e: 0x00c0, 0x180f: 0x00c0, 0x1810: 0x00c0, 0x1811: 0x00c0, - 0x1812: 0x00c0, 0x1813: 0x00c0, 0x1814: 0x00c0, 0x1815: 0x00c0, 0x1816: 0x00c0, 0x1817: 0x00c0, - 0x1818: 0x00c0, 0x1819: 0x00c0, 0x181a: 0x00c0, 0x181b: 0x00c0, 0x181c: 0x00c0, 0x181d: 0x00c0, - 0x181e: 0x00c0, 0x181f: 0x00c0, 0x1820: 0x00c0, 0x1821: 0x00c0, 0x1822: 0x00c0, 0x1823: 0x00c0, - 0x1824: 0x00c0, 0x1825: 0x00c0, 0x1826: 0x00c0, 0x1827: 0x00c0, 0x1828: 0x00c0, 0x1829: 0x00c0, - 0x182a: 0x00c0, 0x182b: 0x00c0, 0x182c: 0x00c0, 0x182d: 0x00c0, 0x182e: 0x00c0, 0x182f: 0x00c0, - 0x1830: 0x00c0, 0x1831: 0x00c0, 0x1832: 0x00c0, 0x1833: 0x00c0, 0x1834: 0x00c0, 0x1835: 0x00c0, - 0x1836: 0x00c0, 0x1837: 0x00c0, 0x1838: 0x00c0, 0x1839: 0x00c0, 0x183a: 0x00c0, 0x183b: 0x00c0, - 0x183c: 0x00c0, 0x183d: 0x00c0, 0x183e: 0x0080, 0x183f: 0x0080, - // Block 0x61, offset 0x1840 - 0x1840: 0x00c0, 0x1841: 0x00c0, 0x1842: 0x00c0, 0x1843: 0x00c0, 0x1844: 0x00c0, 0x1845: 0x00c0, - 0x1846: 0x00c0, 0x1847: 0x00c0, 0x1848: 0x00c0, - // Block 0x62, offset 0x1880 - 0x1880: 0x0080, 0x1881: 0x0080, 0x1882: 0x0080, 0x1883: 0x0080, 0x1884: 0x0080, 0x1885: 0x0080, - 0x1886: 0x0080, 0x1887: 0x0080, - 0x1890: 0x00c3, 0x1891: 0x00c3, - 0x1892: 0x00c3, 0x1893: 0x0080, 0x1894: 0x00c3, 0x1895: 0x00c3, 0x1896: 0x00c3, 0x1897: 0x00c3, - 0x1898: 0x00c3, 0x1899: 0x00c3, 0x189a: 0x00c3, 0x189b: 0x00c3, 0x189c: 0x00c3, 0x189d: 0x00c3, - 0x189e: 0x00c3, 0x189f: 0x00c3, 0x18a0: 0x00c3, 0x18a1: 0x00c0, 0x18a2: 0x00c3, 0x18a3: 0x00c3, - 0x18a4: 0x00c3, 0x18a5: 0x00c3, 0x18a6: 0x00c3, 0x18a7: 0x00c3, 0x18a8: 0x00c3, 0x18a9: 0x00c0, - 0x18aa: 0x00c0, 0x18ab: 0x00c0, 0x18ac: 0x00c0, 0x18ad: 0x00c3, 0x18ae: 0x00c0, 0x18af: 0x00c0, - 0x18b0: 0x00c0, 0x18b1: 0x00c0, 0x18b2: 0x00c0, 0x18b3: 0x00c0, 0x18b4: 0x00c3, 0x18b5: 0x00c0, - 0x18b6: 0x00c0, 0x18b8: 0x00c3, 0x18b9: 0x00c3, - // Block 0x63, offset 0x18c0 - 0x18c0: 0x00c0, 0x18c1: 0x00c0, 0x18c2: 0x00c0, 0x18c3: 0x00c0, 0x18c4: 0x00c0, 0x18c5: 0x00c0, - 0x18c6: 0x00c0, 0x18c7: 0x00c0, 0x18c8: 0x00c0, 0x18c9: 0x00c0, 0x18ca: 0x00c0, 0x18cb: 0x00c0, - 0x18cc: 0x00c0, 0x18cd: 0x00c0, 0x18ce: 0x00c0, 0x18cf: 0x00c0, 0x18d0: 0x00c0, 0x18d1: 0x00c0, - 0x18d2: 0x00c0, 0x18d3: 0x00c0, 0x18d4: 0x00c0, 0x18d5: 0x00c0, 0x18d6: 0x00c0, 0x18d7: 0x00c0, - 0x18d8: 0x00c0, 0x18d9: 0x00c0, 0x18da: 0x00c0, 0x18db: 0x00c0, 0x18dc: 0x00c0, 0x18dd: 0x00c0, - 0x18de: 0x00c0, 0x18df: 0x00c0, 0x18e0: 0x00c0, 0x18e1: 0x00c0, 0x18e2: 0x00c0, 0x18e3: 0x00c0, - 0x18e4: 0x00c0, 0x18e5: 0x00c0, 0x18e6: 0x00c8, 0x18e7: 0x00c8, 0x18e8: 0x00c8, 0x18e9: 0x00c8, - 0x18ea: 0x00c8, 0x18eb: 0x00c0, 0x18ec: 0x0080, 0x18ed: 0x0080, 0x18ee: 0x0080, 0x18ef: 0x00c0, - 0x18f0: 0x0080, 0x18f1: 0x0080, 0x18f2: 0x0080, 0x18f3: 0x0080, 0x18f4: 0x0080, 0x18f5: 0x0080, - 0x18f6: 0x0080, 0x18f7: 0x0080, 0x18f8: 0x0080, 0x18f9: 0x0080, 0x18fa: 0x0080, 0x18fb: 0x00c0, - 0x18fc: 0x0080, 0x18fd: 0x0080, 0x18fe: 0x0080, 0x18ff: 0x0080, - // Block 0x64, offset 0x1900 - 0x1900: 0x0080, 0x1901: 0x0080, 0x1902: 0x0080, 0x1903: 0x0080, 0x1904: 0x0080, 0x1905: 0x0080, - 0x1906: 0x0080, 0x1907: 0x0080, 0x1908: 0x0080, 0x1909: 0x0080, 0x190a: 0x0080, 0x190b: 0x0080, - 0x190c: 0x0080, 0x190d: 0x0080, 0x190e: 0x00c0, 0x190f: 0x0080, 0x1910: 0x0080, 0x1911: 0x0080, - 0x1912: 0x0080, 0x1913: 0x0080, 0x1914: 0x0080, 0x1915: 0x0080, 0x1916: 0x0080, 0x1917: 0x0080, - 0x1918: 0x0080, 0x1919: 0x0080, 0x191a: 0x0080, 0x191b: 0x0080, 0x191c: 0x0080, 0x191d: 0x0088, - 0x191e: 0x0088, 0x191f: 0x0088, 0x1920: 0x0088, 0x1921: 0x0088, 0x1922: 0x0080, 0x1923: 0x0080, - 0x1924: 0x0080, 0x1925: 0x0080, 0x1926: 0x0088, 0x1927: 0x0088, 0x1928: 0x0088, 0x1929: 0x0088, - 0x192a: 0x0088, 0x192b: 0x00c0, 0x192c: 0x00c0, 0x192d: 0x00c0, 0x192e: 0x00c0, 0x192f: 0x00c0, - 0x1930: 0x00c0, 0x1931: 0x00c0, 0x1932: 0x00c0, 0x1933: 0x00c0, 0x1934: 0x00c0, 0x1935: 0x00c0, - 0x1936: 0x00c0, 0x1937: 0x00c0, 0x1938: 0x0080, 0x1939: 0x00c0, 0x193a: 0x00c0, 0x193b: 0x00c0, - 0x193c: 0x00c0, 0x193d: 0x00c0, 0x193e: 0x00c0, 0x193f: 0x00c0, - // Block 0x65, offset 0x1940 - 0x1940: 0x00c0, 0x1941: 0x00c0, 0x1942: 0x00c0, 0x1943: 0x00c0, 0x1944: 0x00c0, 0x1945: 0x00c0, - 0x1946: 0x00c0, 0x1947: 0x00c0, 0x1948: 0x00c0, 0x1949: 0x00c0, 0x194a: 0x00c0, 0x194b: 0x00c0, - 0x194c: 0x00c0, 0x194d: 0x00c0, 0x194e: 0x00c0, 0x194f: 0x00c0, 0x1950: 0x00c0, 0x1951: 0x00c0, - 0x1952: 0x00c0, 0x1953: 0x00c0, 0x1954: 0x00c0, 0x1955: 0x00c0, 0x1956: 0x00c0, 0x1957: 0x00c0, - 0x1958: 0x00c0, 0x1959: 0x00c0, 0x195a: 0x00c0, 0x195b: 0x0080, 0x195c: 0x0080, 0x195d: 0x0080, - 0x195e: 0x0080, 0x195f: 0x0080, 0x1960: 0x0080, 0x1961: 0x0080, 0x1962: 0x0080, 0x1963: 0x0080, - 0x1964: 0x0080, 0x1965: 0x0080, 0x1966: 0x0080, 0x1967: 0x0080, 0x1968: 0x0080, 0x1969: 0x0080, - 0x196a: 0x0080, 0x196b: 0x0080, 0x196c: 0x0080, 0x196d: 0x0080, 0x196e: 0x0080, 0x196f: 0x0080, - 0x1970: 0x0080, 0x1971: 0x0080, 0x1972: 0x0080, 0x1973: 0x0080, 0x1974: 0x0080, 0x1975: 0x0080, - 0x1976: 0x0080, 0x1977: 0x0080, 0x1978: 0x0080, 0x1979: 0x0080, 0x197a: 0x0080, 0x197b: 0x0080, - 0x197c: 0x0080, 0x197d: 0x0080, 0x197e: 0x0080, 0x197f: 0x0088, - // Block 0x66, offset 0x1980 - 0x1980: 0x00c3, 0x1981: 0x00c3, 0x1982: 0x00c3, 0x1983: 0x00c3, 0x1984: 0x00c3, 0x1985: 0x00c3, - 0x1986: 0x00c3, 0x1987: 0x00c3, 0x1988: 0x00c3, 0x1989: 0x00c3, 0x198a: 0x00c3, 0x198b: 0x00c3, - 0x198c: 0x00c3, 0x198d: 0x00c3, 0x198e: 0x00c3, 0x198f: 0x00c3, 0x1990: 0x00c3, 0x1991: 0x00c3, - 0x1992: 0x00c3, 0x1993: 0x00c3, 0x1994: 0x00c3, 0x1995: 0x00c3, 0x1996: 0x00c3, 0x1997: 0x00c3, - 0x1998: 0x00c3, 0x1999: 0x00c3, 0x199a: 0x00c3, 0x199b: 0x00c3, 0x199c: 0x00c3, 0x199d: 0x00c3, - 0x199e: 0x00c3, 0x199f: 0x00c3, 0x19a0: 0x00c3, 0x19a1: 0x00c3, 0x19a2: 0x00c3, 0x19a3: 0x00c3, - 0x19a4: 0x00c3, 0x19a5: 0x00c3, 0x19a6: 0x00c3, 0x19a7: 0x00c3, 0x19a8: 0x00c3, 0x19a9: 0x00c3, - 0x19aa: 0x00c3, 0x19ab: 0x00c3, 0x19ac: 0x00c3, 0x19ad: 0x00c3, 0x19ae: 0x00c3, 0x19af: 0x00c3, - 0x19b0: 0x00c3, 0x19b1: 0x00c3, 0x19b2: 0x00c3, 0x19b3: 0x00c3, 0x19b4: 0x00c3, 0x19b5: 0x00c3, - 0x19bb: 0x00c3, - 0x19bc: 0x00c3, 0x19bd: 0x00c3, 0x19be: 0x00c3, 0x19bf: 0x00c3, - // Block 0x67, offset 0x19c0 - 0x19c0: 0x00c0, 0x19c1: 0x00c0, 0x19c2: 0x00c0, 0x19c3: 0x00c0, 0x19c4: 0x00c0, 0x19c5: 0x00c0, - 0x19c6: 0x00c0, 0x19c7: 0x00c0, 0x19c8: 0x00c0, 0x19c9: 0x00c0, 0x19ca: 0x00c0, 0x19cb: 0x00c0, - 0x19cc: 0x00c0, 0x19cd: 0x00c0, 0x19ce: 0x00c0, 0x19cf: 0x00c0, 0x19d0: 0x00c0, 0x19d1: 0x00c0, - 0x19d2: 0x00c0, 0x19d3: 0x00c0, 0x19d4: 0x00c0, 0x19d5: 0x00c0, 0x19d6: 0x00c0, 0x19d7: 0x00c0, - 0x19d8: 0x00c0, 0x19d9: 0x00c0, 0x19da: 0x0080, 0x19db: 0x0080, 0x19dc: 0x00c0, 0x19dd: 0x00c0, - 0x19de: 0x00c0, 0x19df: 0x00c0, 0x19e0: 0x00c0, 0x19e1: 0x00c0, 0x19e2: 0x00c0, 0x19e3: 0x00c0, - 0x19e4: 0x00c0, 0x19e5: 0x00c0, 0x19e6: 0x00c0, 0x19e7: 0x00c0, 0x19e8: 0x00c0, 0x19e9: 0x00c0, - 0x19ea: 0x00c0, 0x19eb: 0x00c0, 0x19ec: 0x00c0, 0x19ed: 0x00c0, 0x19ee: 0x00c0, 0x19ef: 0x00c0, - 0x19f0: 0x00c0, 0x19f1: 0x00c0, 0x19f2: 0x00c0, 0x19f3: 0x00c0, 0x19f4: 0x00c0, 0x19f5: 0x00c0, - 0x19f6: 0x00c0, 0x19f7: 0x00c0, 0x19f8: 0x00c0, 0x19f9: 0x00c0, 0x19fa: 0x00c0, 0x19fb: 0x00c0, - 0x19fc: 0x00c0, 0x19fd: 0x00c0, 0x19fe: 0x00c0, 0x19ff: 0x00c0, - // Block 0x68, offset 0x1a00 - 0x1a00: 0x00c8, 0x1a01: 0x00c8, 0x1a02: 0x00c8, 0x1a03: 0x00c8, 0x1a04: 0x00c8, 0x1a05: 0x00c8, - 0x1a06: 0x00c8, 0x1a07: 0x00c8, 0x1a08: 0x00c8, 0x1a09: 0x00c8, 0x1a0a: 0x00c8, 0x1a0b: 0x00c8, - 0x1a0c: 0x00c8, 0x1a0d: 0x00c8, 0x1a0e: 0x00c8, 0x1a0f: 0x00c8, 0x1a10: 0x00c8, 0x1a11: 0x00c8, - 0x1a12: 0x00c8, 0x1a13: 0x00c8, 0x1a14: 0x00c8, 0x1a15: 0x00c8, - 0x1a18: 0x00c8, 0x1a19: 0x00c8, 0x1a1a: 0x00c8, 0x1a1b: 0x00c8, 0x1a1c: 0x00c8, 0x1a1d: 0x00c8, - 0x1a20: 0x00c8, 0x1a21: 0x00c8, 0x1a22: 0x00c8, 0x1a23: 0x00c8, - 0x1a24: 0x00c8, 0x1a25: 0x00c8, 0x1a26: 0x00c8, 0x1a27: 0x00c8, 0x1a28: 0x00c8, 0x1a29: 0x00c8, - 0x1a2a: 0x00c8, 0x1a2b: 0x00c8, 0x1a2c: 0x00c8, 0x1a2d: 0x00c8, 0x1a2e: 0x00c8, 0x1a2f: 0x00c8, - 0x1a30: 0x00c8, 0x1a31: 0x00c8, 0x1a32: 0x00c8, 0x1a33: 0x00c8, 0x1a34: 0x00c8, 0x1a35: 0x00c8, - 0x1a36: 0x00c8, 0x1a37: 0x00c8, 0x1a38: 0x00c8, 0x1a39: 0x00c8, 0x1a3a: 0x00c8, 0x1a3b: 0x00c8, - 0x1a3c: 0x00c8, 0x1a3d: 0x00c8, 0x1a3e: 0x00c8, 0x1a3f: 0x00c8, - // Block 0x69, offset 0x1a40 - 0x1a40: 0x00c8, 0x1a41: 0x00c8, 0x1a42: 0x00c8, 0x1a43: 0x00c8, 0x1a44: 0x00c8, 0x1a45: 0x00c8, - 0x1a48: 0x00c8, 0x1a49: 0x00c8, 0x1a4a: 0x00c8, 0x1a4b: 0x00c8, - 0x1a4c: 0x00c8, 0x1a4d: 0x00c8, 0x1a50: 0x00c8, 0x1a51: 0x00c8, - 0x1a52: 0x00c8, 0x1a53: 0x00c8, 0x1a54: 0x00c8, 0x1a55: 0x00c8, 0x1a56: 0x00c8, 0x1a57: 0x00c8, - 0x1a59: 0x00c8, 0x1a5b: 0x00c8, 0x1a5d: 0x00c8, - 0x1a5f: 0x00c8, 0x1a60: 0x00c8, 0x1a61: 0x00c8, 0x1a62: 0x00c8, 0x1a63: 0x00c8, - 0x1a64: 0x00c8, 0x1a65: 0x00c8, 0x1a66: 0x00c8, 0x1a67: 0x00c8, 0x1a68: 0x00c8, 0x1a69: 0x00c8, - 0x1a6a: 0x00c8, 0x1a6b: 0x00c8, 0x1a6c: 0x00c8, 0x1a6d: 0x00c8, 0x1a6e: 0x00c8, 0x1a6f: 0x00c8, - 0x1a70: 0x00c8, 0x1a71: 0x0088, 0x1a72: 0x00c8, 0x1a73: 0x0088, 0x1a74: 0x00c8, 0x1a75: 0x0088, - 0x1a76: 0x00c8, 0x1a77: 0x0088, 0x1a78: 0x00c8, 0x1a79: 0x0088, 0x1a7a: 0x00c8, 0x1a7b: 0x0088, - 0x1a7c: 0x00c8, 0x1a7d: 0x0088, - // Block 0x6a, offset 0x1a80 - 0x1a80: 0x00c8, 0x1a81: 0x00c8, 0x1a82: 0x00c8, 0x1a83: 0x00c8, 0x1a84: 0x00c8, 0x1a85: 0x00c8, - 0x1a86: 0x00c8, 0x1a87: 0x00c8, 0x1a88: 0x0088, 0x1a89: 0x0088, 0x1a8a: 0x0088, 0x1a8b: 0x0088, - 0x1a8c: 0x0088, 0x1a8d: 0x0088, 0x1a8e: 0x0088, 0x1a8f: 0x0088, 0x1a90: 0x00c8, 0x1a91: 0x00c8, - 0x1a92: 0x00c8, 0x1a93: 0x00c8, 0x1a94: 0x00c8, 0x1a95: 0x00c8, 0x1a96: 0x00c8, 0x1a97: 0x00c8, - 0x1a98: 0x0088, 0x1a99: 0x0088, 0x1a9a: 0x0088, 0x1a9b: 0x0088, 0x1a9c: 0x0088, 0x1a9d: 0x0088, - 0x1a9e: 0x0088, 0x1a9f: 0x0088, 0x1aa0: 0x00c8, 0x1aa1: 0x00c8, 0x1aa2: 0x00c8, 0x1aa3: 0x00c8, - 0x1aa4: 0x00c8, 0x1aa5: 0x00c8, 0x1aa6: 0x00c8, 0x1aa7: 0x00c8, 0x1aa8: 0x0088, 0x1aa9: 0x0088, - 0x1aaa: 0x0088, 0x1aab: 0x0088, 0x1aac: 0x0088, 0x1aad: 0x0088, 0x1aae: 0x0088, 0x1aaf: 0x0088, - 0x1ab0: 0x00c8, 0x1ab1: 0x00c8, 0x1ab2: 0x00c8, 0x1ab3: 0x00c8, 0x1ab4: 0x00c8, - 0x1ab6: 0x00c8, 0x1ab7: 0x00c8, 0x1ab8: 0x00c8, 0x1ab9: 0x00c8, 0x1aba: 0x00c8, 0x1abb: 0x0088, - 0x1abc: 0x0088, 0x1abd: 0x0088, 0x1abe: 0x0088, 0x1abf: 0x0088, - // Block 0x6b, offset 0x1ac0 - 0x1ac0: 0x0088, 0x1ac1: 0x0088, 0x1ac2: 0x00c8, 0x1ac3: 0x00c8, 0x1ac4: 0x00c8, - 0x1ac6: 0x00c8, 0x1ac7: 0x00c8, 0x1ac8: 0x00c8, 0x1ac9: 0x0088, 0x1aca: 0x00c8, 0x1acb: 0x0088, - 0x1acc: 0x0088, 0x1acd: 0x0088, 0x1ace: 0x0088, 0x1acf: 0x0088, 0x1ad0: 0x00c8, 0x1ad1: 0x00c8, - 0x1ad2: 0x00c8, 0x1ad3: 0x0088, 0x1ad6: 0x00c8, 0x1ad7: 0x00c8, - 0x1ad8: 0x00c8, 0x1ad9: 0x00c8, 0x1ada: 0x00c8, 0x1adb: 0x0088, 0x1add: 0x0088, - 0x1ade: 0x0088, 0x1adf: 0x0088, 0x1ae0: 0x00c8, 0x1ae1: 0x00c8, 0x1ae2: 0x00c8, 0x1ae3: 0x0088, - 0x1ae4: 0x00c8, 0x1ae5: 0x00c8, 0x1ae6: 0x00c8, 0x1ae7: 0x00c8, 0x1ae8: 0x00c8, 0x1ae9: 0x00c8, - 0x1aea: 0x00c8, 0x1aeb: 0x0088, 0x1aec: 0x00c8, 0x1aed: 0x0088, 0x1aee: 0x0088, 0x1aef: 0x0088, - 0x1af2: 0x00c8, 0x1af3: 0x00c8, 0x1af4: 0x00c8, - 0x1af6: 0x00c8, 0x1af7: 0x00c8, 0x1af8: 0x00c8, 0x1af9: 0x0088, 0x1afa: 0x00c8, 0x1afb: 0x0088, - 0x1afc: 0x0088, 0x1afd: 0x0088, 0x1afe: 0x0088, - // Block 0x6c, offset 0x1b00 - 0x1b00: 0x0080, 0x1b01: 0x0080, 0x1b02: 0x0080, 0x1b03: 0x0080, 0x1b04: 0x0080, 0x1b05: 0x0080, - 0x1b06: 0x0080, 0x1b07: 0x0080, 0x1b08: 0x0080, 0x1b09: 0x0080, 0x1b0a: 0x0080, 0x1b0b: 0x0040, - 0x1b0c: 0x004d, 0x1b0d: 0x004e, 0x1b0e: 0x0040, 0x1b0f: 0x0040, 0x1b10: 0x0080, 0x1b11: 0x0080, - 0x1b12: 0x0080, 0x1b13: 0x0080, 0x1b14: 0x0080, 0x1b15: 0x0080, 0x1b16: 0x0080, 0x1b17: 0x0080, - 0x1b18: 0x0080, 0x1b19: 0x0080, 0x1b1a: 0x0080, 0x1b1b: 0x0080, 0x1b1c: 0x0080, 0x1b1d: 0x0080, - 0x1b1e: 0x0080, 0x1b1f: 0x0080, 0x1b20: 0x0080, 0x1b21: 0x0080, 0x1b22: 0x0080, 0x1b23: 0x0080, - 0x1b24: 0x0080, 0x1b25: 0x0080, 0x1b26: 0x0080, 0x1b27: 0x0080, 0x1b28: 0x0040, 0x1b29: 0x0040, - 0x1b2a: 0x0040, 0x1b2b: 0x0040, 0x1b2c: 0x0040, 0x1b2d: 0x0040, 0x1b2e: 0x0040, 0x1b2f: 0x0080, - 0x1b30: 0x0080, 0x1b31: 0x0080, 0x1b32: 0x0080, 0x1b33: 0x0080, 0x1b34: 0x0080, 0x1b35: 0x0080, - 0x1b36: 0x0080, 0x1b37: 0x0080, 0x1b38: 0x0080, 0x1b39: 0x0080, 0x1b3a: 0x0080, 0x1b3b: 0x0080, - 0x1b3c: 0x0080, 0x1b3d: 0x0080, 0x1b3e: 0x0080, 0x1b3f: 0x0080, - // Block 0x6d, offset 0x1b40 - 0x1b40: 0x0080, 0x1b41: 0x0080, 0x1b42: 0x0080, 0x1b43: 0x0080, 0x1b44: 0x0080, 0x1b45: 0x0080, - 0x1b46: 0x0080, 0x1b47: 0x0080, 0x1b48: 0x0080, 0x1b49: 0x0080, 0x1b4a: 0x0080, 0x1b4b: 0x0080, - 0x1b4c: 0x0080, 0x1b4d: 0x0080, 0x1b4e: 0x0080, 0x1b4f: 0x0080, 0x1b50: 0x0080, 0x1b51: 0x0080, - 0x1b52: 0x0080, 0x1b53: 0x0080, 0x1b54: 0x0080, 0x1b55: 0x0080, 0x1b56: 0x0080, 0x1b57: 0x0080, - 0x1b58: 0x0080, 0x1b59: 0x0080, 0x1b5a: 0x0080, 0x1b5b: 0x0080, 0x1b5c: 0x0080, 0x1b5d: 0x0080, - 0x1b5e: 0x0080, 0x1b5f: 0x0080, 0x1b60: 0x0040, 0x1b61: 0x0040, 0x1b62: 0x0040, 0x1b63: 0x0040, - 0x1b64: 0x0040, 0x1b66: 0x0040, 0x1b67: 0x0040, 0x1b68: 0x0040, 0x1b69: 0x0040, - 0x1b6a: 0x0040, 0x1b6b: 0x0040, 0x1b6c: 0x0040, 0x1b6d: 0x0040, 0x1b6e: 0x0040, 0x1b6f: 0x0040, - 0x1b70: 0x0080, 0x1b71: 0x0080, 0x1b74: 0x0080, 0x1b75: 0x0080, - 0x1b76: 0x0080, 0x1b77: 0x0080, 0x1b78: 0x0080, 0x1b79: 0x0080, 0x1b7a: 0x0080, 0x1b7b: 0x0080, - 0x1b7c: 0x0080, 0x1b7d: 0x0080, 0x1b7e: 0x0080, 0x1b7f: 0x0080, - // Block 0x6e, offset 0x1b80 - 0x1b80: 0x0080, 0x1b81: 0x0080, 0x1b82: 0x0080, 0x1b83: 0x0080, 0x1b84: 0x0080, 0x1b85: 0x0080, - 0x1b86: 0x0080, 0x1b87: 0x0080, 0x1b88: 0x0080, 0x1b89: 0x0080, 0x1b8a: 0x0080, 0x1b8b: 0x0080, - 0x1b8c: 0x0080, 0x1b8d: 0x0080, 0x1b8e: 0x0080, 0x1b90: 0x0080, 0x1b91: 0x0080, - 0x1b92: 0x0080, 0x1b93: 0x0080, 0x1b94: 0x0080, 0x1b95: 0x0080, 0x1b96: 0x0080, 0x1b97: 0x0080, - 0x1b98: 0x0080, 0x1b99: 0x0080, 0x1b9a: 0x0080, 0x1b9b: 0x0080, 0x1b9c: 0x0080, - 0x1ba0: 0x0080, 0x1ba1: 0x0080, 0x1ba2: 0x0080, 0x1ba3: 0x0080, - 0x1ba4: 0x0080, 0x1ba5: 0x0080, 0x1ba6: 0x0080, 0x1ba7: 0x0080, 0x1ba8: 0x0080, 0x1ba9: 0x0080, - 0x1baa: 0x0080, 0x1bab: 0x0080, 0x1bac: 0x0080, 0x1bad: 0x0080, 0x1bae: 0x0080, 0x1baf: 0x0080, - 0x1bb0: 0x0080, 0x1bb1: 0x0080, 0x1bb2: 0x0080, 0x1bb3: 0x0080, 0x1bb4: 0x0080, 0x1bb5: 0x0080, - 0x1bb6: 0x0080, 0x1bb7: 0x0080, 0x1bb8: 0x0080, 0x1bb9: 0x0080, 0x1bba: 0x0080, 0x1bbb: 0x0080, - 0x1bbc: 0x0080, 0x1bbd: 0x0080, 0x1bbe: 0x0080, - // Block 0x6f, offset 0x1bc0 - 0x1bd0: 0x00c3, 0x1bd1: 0x00c3, - 0x1bd2: 0x00c3, 0x1bd3: 0x00c3, 0x1bd4: 0x00c3, 0x1bd5: 0x00c3, 0x1bd6: 0x00c3, 0x1bd7: 0x00c3, - 0x1bd8: 0x00c3, 0x1bd9: 0x00c3, 0x1bda: 0x00c3, 0x1bdb: 0x00c3, 0x1bdc: 0x00c3, 0x1bdd: 0x0083, - 0x1bde: 0x0083, 0x1bdf: 0x0083, 0x1be0: 0x0083, 0x1be1: 0x00c3, 0x1be2: 0x0083, 0x1be3: 0x0083, - 0x1be4: 0x0083, 0x1be5: 0x00c3, 0x1be6: 0x00c3, 0x1be7: 0x00c3, 0x1be8: 0x00c3, 0x1be9: 0x00c3, - 0x1bea: 0x00c3, 0x1beb: 0x00c3, 0x1bec: 0x00c3, 0x1bed: 0x00c3, 0x1bee: 0x00c3, 0x1bef: 0x00c3, - 0x1bf0: 0x00c3, - // Block 0x70, offset 0x1c00 - 0x1c00: 0x0080, 0x1c01: 0x0080, 0x1c02: 0x0080, 0x1c03: 0x0080, 0x1c04: 0x0080, 0x1c05: 0x0080, - 0x1c06: 0x0080, 0x1c07: 0x0080, 0x1c08: 0x0080, 0x1c09: 0x0080, 0x1c0a: 0x0080, 0x1c0b: 0x0080, - 0x1c0c: 0x0080, 0x1c0d: 0x0080, 0x1c0e: 0x0080, 0x1c0f: 0x0080, 0x1c10: 0x0080, 0x1c11: 0x0080, - 0x1c12: 0x0080, 0x1c13: 0x0080, 0x1c14: 0x0080, 0x1c15: 0x0080, 0x1c16: 0x0080, 0x1c17: 0x0080, - 0x1c18: 0x0080, 0x1c19: 0x0080, 0x1c1a: 0x0080, 0x1c1b: 0x0080, 0x1c1c: 0x0080, 0x1c1d: 0x0080, - 0x1c1e: 0x0080, 0x1c1f: 0x0080, 0x1c20: 0x0080, 0x1c21: 0x0080, 0x1c22: 0x0080, 0x1c23: 0x0080, - 0x1c24: 0x0080, 0x1c25: 0x0080, 0x1c26: 0x0088, 0x1c27: 0x0080, 0x1c28: 0x0080, 0x1c29: 0x0080, - 0x1c2a: 0x0080, 0x1c2b: 0x0080, 0x1c2c: 0x0080, 0x1c2d: 0x0080, 0x1c2e: 0x0080, 0x1c2f: 0x0080, - 0x1c30: 0x0080, 0x1c31: 0x0080, 0x1c32: 0x00c0, 0x1c33: 0x0080, 0x1c34: 0x0080, 0x1c35: 0x0080, - 0x1c36: 0x0080, 0x1c37: 0x0080, 0x1c38: 0x0080, 0x1c39: 0x0080, 0x1c3a: 0x0080, 0x1c3b: 0x0080, - 0x1c3c: 0x0080, 0x1c3d: 0x0080, 0x1c3e: 0x0080, 0x1c3f: 0x0080, - // Block 0x71, offset 0x1c40 - 0x1c40: 0x0080, 0x1c41: 0x0080, 0x1c42: 0x0080, 0x1c43: 0x0080, 0x1c44: 0x0080, 0x1c45: 0x0080, - 0x1c46: 0x0080, 0x1c47: 0x0080, 0x1c48: 0x0080, 0x1c49: 0x0080, 0x1c4a: 0x0080, 0x1c4b: 0x0080, - 0x1c4c: 0x0080, 0x1c4d: 0x0080, 0x1c4e: 0x00c0, 0x1c4f: 0x0080, 0x1c50: 0x0080, 0x1c51: 0x0080, - 0x1c52: 0x0080, 0x1c53: 0x0080, 0x1c54: 0x0080, 0x1c55: 0x0080, 0x1c56: 0x0080, 0x1c57: 0x0080, - 0x1c58: 0x0080, 0x1c59: 0x0080, 0x1c5a: 0x0080, 0x1c5b: 0x0080, 0x1c5c: 0x0080, 0x1c5d: 0x0080, - 0x1c5e: 0x0080, 0x1c5f: 0x0080, 0x1c60: 0x0080, 0x1c61: 0x0080, 0x1c62: 0x0080, 0x1c63: 0x0080, - 0x1c64: 0x0080, 0x1c65: 0x0080, 0x1c66: 0x0080, 0x1c67: 0x0080, 0x1c68: 0x0080, 0x1c69: 0x0080, - 0x1c6a: 0x0080, 0x1c6b: 0x0080, 0x1c6c: 0x0080, 0x1c6d: 0x0080, 0x1c6e: 0x0080, 0x1c6f: 0x0080, - 0x1c70: 0x0080, 0x1c71: 0x0080, 0x1c72: 0x0080, 0x1c73: 0x0080, 0x1c74: 0x0080, 0x1c75: 0x0080, - 0x1c76: 0x0080, 0x1c77: 0x0080, 0x1c78: 0x0080, 0x1c79: 0x0080, 0x1c7a: 0x0080, 0x1c7b: 0x0080, - 0x1c7c: 0x0080, 0x1c7d: 0x0080, 0x1c7e: 0x0080, 0x1c7f: 0x0080, - // Block 0x72, offset 0x1c80 - 0x1c80: 0x0080, 0x1c81: 0x0080, 0x1c82: 0x0080, 0x1c83: 0x00c0, 0x1c84: 0x00c0, 0x1c85: 0x0080, - 0x1c86: 0x0080, 0x1c87: 0x0080, 0x1c88: 0x0080, 0x1c89: 0x0080, 0x1c8a: 0x0080, 0x1c8b: 0x0080, - 0x1c90: 0x0080, 0x1c91: 0x0080, - 0x1c92: 0x0080, 0x1c93: 0x0080, 0x1c94: 0x0080, 0x1c95: 0x0080, 0x1c96: 0x0080, 0x1c97: 0x0080, - 0x1c98: 0x0080, 0x1c99: 0x0080, 0x1c9a: 0x0080, 0x1c9b: 0x0080, 0x1c9c: 0x0080, 0x1c9d: 0x0080, - 0x1c9e: 0x0080, 0x1c9f: 0x0080, 0x1ca0: 0x0080, 0x1ca1: 0x0080, 0x1ca2: 0x0080, 0x1ca3: 0x0080, - 0x1ca4: 0x0080, 0x1ca5: 0x0080, 0x1ca6: 0x0080, 0x1ca7: 0x0080, 0x1ca8: 0x0080, 0x1ca9: 0x0080, - 0x1caa: 0x0080, 0x1cab: 0x0080, 0x1cac: 0x0080, 0x1cad: 0x0080, 0x1cae: 0x0080, 0x1caf: 0x0080, - 0x1cb0: 0x0080, 0x1cb1: 0x0080, 0x1cb2: 0x0080, 0x1cb3: 0x0080, 0x1cb4: 0x0080, 0x1cb5: 0x0080, - 0x1cb6: 0x0080, 0x1cb7: 0x0080, 0x1cb8: 0x0080, 0x1cb9: 0x0080, 0x1cba: 0x0080, 0x1cbb: 0x0080, - 0x1cbc: 0x0080, 0x1cbd: 0x0080, 0x1cbe: 0x0080, 0x1cbf: 0x0080, - // Block 0x73, offset 0x1cc0 - 0x1cc0: 0x0080, 0x1cc1: 0x0080, 0x1cc2: 0x0080, 0x1cc3: 0x0080, 0x1cc4: 0x0080, 0x1cc5: 0x0080, - 0x1cc6: 0x0080, 0x1cc7: 0x0080, 0x1cc8: 0x0080, 0x1cc9: 0x0080, 0x1cca: 0x0080, 0x1ccb: 0x0080, - 0x1ccc: 0x0080, 0x1ccd: 0x0080, 0x1cce: 0x0080, 0x1ccf: 0x0080, 0x1cd0: 0x0080, 0x1cd1: 0x0080, - 0x1cd2: 0x0080, 0x1cd3: 0x0080, 0x1cd4: 0x0080, 0x1cd5: 0x0080, 0x1cd6: 0x0080, 0x1cd7: 0x0080, - 0x1cd8: 0x0080, 0x1cd9: 0x0080, 0x1cda: 0x0080, 0x1cdb: 0x0080, 0x1cdc: 0x0080, 0x1cdd: 0x0080, - 0x1cde: 0x0080, 0x1cdf: 0x0080, 0x1ce0: 0x0080, 0x1ce1: 0x0080, 0x1ce2: 0x0080, 0x1ce3: 0x0080, - 0x1ce4: 0x0080, 0x1ce5: 0x0080, 0x1ce6: 0x0080, 0x1ce7: 0x0080, 0x1ce8: 0x0080, 0x1ce9: 0x0080, - 0x1cea: 0x0080, 0x1ceb: 0x0080, 0x1cec: 0x0080, 0x1ced: 0x0080, 0x1cee: 0x0080, 0x1cef: 0x0080, - 0x1cf0: 0x0080, 0x1cf1: 0x0080, 0x1cf2: 0x0080, 0x1cf3: 0x0080, 0x1cf4: 0x0080, 0x1cf5: 0x0080, - 0x1cf6: 0x0080, 0x1cf7: 0x0080, 0x1cf8: 0x0080, 0x1cf9: 0x0080, 0x1cfa: 0x0080, 0x1cfb: 0x0080, - 0x1cfc: 0x0080, 0x1cfd: 0x0080, 0x1cfe: 0x0080, 0x1cff: 0x0080, - // Block 0x74, offset 0x1d00 - 0x1d00: 0x0080, 0x1d01: 0x0080, 0x1d02: 0x0080, 0x1d03: 0x0080, 0x1d04: 0x0080, 0x1d05: 0x0080, - 0x1d06: 0x0080, 0x1d07: 0x0080, 0x1d08: 0x0080, 0x1d09: 0x0080, 0x1d0a: 0x0080, 0x1d0b: 0x0080, - 0x1d0c: 0x0080, 0x1d0d: 0x0080, 0x1d0e: 0x0080, 0x1d0f: 0x0080, 0x1d10: 0x0080, 0x1d11: 0x0080, - 0x1d12: 0x0080, 0x1d13: 0x0080, 0x1d14: 0x0080, 0x1d15: 0x0080, 0x1d16: 0x0080, 0x1d17: 0x0080, - 0x1d18: 0x0080, 0x1d19: 0x0080, 0x1d1a: 0x0080, 0x1d1b: 0x0080, 0x1d1c: 0x0080, 0x1d1d: 0x0080, - 0x1d1e: 0x0080, 0x1d1f: 0x0080, 0x1d20: 0x0080, 0x1d21: 0x0080, 0x1d22: 0x0080, 0x1d23: 0x0080, - 0x1d24: 0x0080, 0x1d25: 0x0080, 0x1d26: 0x0080, 0x1d27: 0x0080, 0x1d28: 0x0080, 0x1d29: 0x0080, - 0x1d2a: 0x0080, 0x1d2b: 0x0080, 0x1d2c: 0x0080, 0x1d2d: 0x0080, 0x1d2e: 0x0080, 0x1d2f: 0x0080, - 0x1d30: 0x0080, 0x1d31: 0x0080, 0x1d32: 0x0080, 0x1d33: 0x0080, 0x1d34: 0x0080, 0x1d35: 0x0080, - 0x1d36: 0x0080, 0x1d37: 0x0080, 0x1d38: 0x0080, 0x1d39: 0x0080, 0x1d3a: 0x0080, 0x1d3b: 0x0080, - 0x1d3c: 0x0080, 0x1d3d: 0x0080, 0x1d3e: 0x0080, - // Block 0x75, offset 0x1d40 - 0x1d40: 0x0080, 0x1d41: 0x0080, 0x1d42: 0x0080, 0x1d43: 0x0080, 0x1d44: 0x0080, 0x1d45: 0x0080, - 0x1d46: 0x0080, 0x1d47: 0x0080, 0x1d48: 0x0080, 0x1d49: 0x0080, 0x1d4a: 0x0080, 0x1d4b: 0x0080, - 0x1d4c: 0x0080, 0x1d4d: 0x0080, 0x1d4e: 0x0080, 0x1d4f: 0x0080, 0x1d50: 0x0080, 0x1d51: 0x0080, - 0x1d52: 0x0080, 0x1d53: 0x0080, 0x1d54: 0x0080, 0x1d55: 0x0080, 0x1d56: 0x0080, 0x1d57: 0x0080, - 0x1d58: 0x0080, 0x1d59: 0x0080, 0x1d5a: 0x0080, 0x1d5b: 0x0080, 0x1d5c: 0x0080, 0x1d5d: 0x0080, - 0x1d5e: 0x0080, 0x1d5f: 0x0080, 0x1d60: 0x0080, 0x1d61: 0x0080, 0x1d62: 0x0080, 0x1d63: 0x0080, - 0x1d64: 0x0080, 0x1d65: 0x0080, 0x1d66: 0x0080, - // Block 0x76, offset 0x1d80 - 0x1d80: 0x0080, 0x1d81: 0x0080, 0x1d82: 0x0080, 0x1d83: 0x0080, 0x1d84: 0x0080, 0x1d85: 0x0080, - 0x1d86: 0x0080, 0x1d87: 0x0080, 0x1d88: 0x0080, 0x1d89: 0x0080, 0x1d8a: 0x0080, - 0x1da0: 0x0080, 0x1da1: 0x0080, 0x1da2: 0x0080, 0x1da3: 0x0080, - 0x1da4: 0x0080, 0x1da5: 0x0080, 0x1da6: 0x0080, 0x1da7: 0x0080, 0x1da8: 0x0080, 0x1da9: 0x0080, - 0x1daa: 0x0080, 0x1dab: 0x0080, 0x1dac: 0x0080, 0x1dad: 0x0080, 0x1dae: 0x0080, 0x1daf: 0x0080, - 0x1db0: 0x0080, 0x1db1: 0x0080, 0x1db2: 0x0080, 0x1db3: 0x0080, 0x1db4: 0x0080, 0x1db5: 0x0080, - 0x1db6: 0x0080, 0x1db7: 0x0080, 0x1db8: 0x0080, 0x1db9: 0x0080, 0x1dba: 0x0080, 0x1dbb: 0x0080, - 0x1dbc: 0x0080, 0x1dbd: 0x0080, 0x1dbe: 0x0080, 0x1dbf: 0x0080, - // Block 0x77, offset 0x1dc0 - 0x1dc0: 0x0080, 0x1dc1: 0x0080, 0x1dc2: 0x0080, 0x1dc3: 0x0080, 0x1dc4: 0x0080, 0x1dc5: 0x0080, - 0x1dc6: 0x0080, 0x1dc7: 0x0080, 0x1dc8: 0x0080, 0x1dc9: 0x0080, 0x1dca: 0x0080, 0x1dcb: 0x0080, - 0x1dcc: 0x0080, 0x1dcd: 0x0080, 0x1dce: 0x0080, 0x1dcf: 0x0080, 0x1dd0: 0x0080, 0x1dd1: 0x0080, - 0x1dd2: 0x0080, 0x1dd3: 0x0080, 0x1dd4: 0x0080, 0x1dd5: 0x0080, 0x1dd6: 0x0080, 0x1dd7: 0x0080, - 0x1dd8: 0x0080, 0x1dd9: 0x0080, 0x1dda: 0x0080, 0x1ddb: 0x0080, 0x1ddc: 0x0080, 0x1ddd: 0x0080, - 0x1dde: 0x0080, 0x1ddf: 0x0080, 0x1de0: 0x0080, 0x1de1: 0x0080, 0x1de2: 0x0080, 0x1de3: 0x0080, - 0x1de4: 0x0080, 0x1de5: 0x0080, 0x1de6: 0x0080, 0x1de7: 0x0080, 0x1de8: 0x0080, 0x1de9: 0x0080, - 0x1dea: 0x0080, 0x1deb: 0x0080, 0x1dec: 0x0080, 0x1ded: 0x0080, 0x1dee: 0x0080, 0x1def: 0x0080, - 0x1df0: 0x0080, 0x1df1: 0x0080, 0x1df2: 0x0080, 0x1df3: 0x0080, - 0x1df6: 0x0080, 0x1df7: 0x0080, 0x1df8: 0x0080, 0x1df9: 0x0080, 0x1dfa: 0x0080, 0x1dfb: 0x0080, - 0x1dfc: 0x0080, 0x1dfd: 0x0080, 0x1dfe: 0x0080, 0x1dff: 0x0080, - // Block 0x78, offset 0x1e00 - 0x1e00: 0x0080, 0x1e01: 0x0080, 0x1e02: 0x0080, 0x1e03: 0x0080, 0x1e04: 0x0080, 0x1e05: 0x0080, - 0x1e06: 0x0080, 0x1e07: 0x0080, 0x1e08: 0x0080, 0x1e09: 0x0080, 0x1e0a: 0x0080, 0x1e0b: 0x0080, - 0x1e0c: 0x0080, 0x1e0d: 0x0080, 0x1e0e: 0x0080, 0x1e0f: 0x0080, 0x1e10: 0x0080, 0x1e11: 0x0080, - 0x1e12: 0x0080, 0x1e13: 0x0080, 0x1e14: 0x0080, 0x1e15: 0x0080, - 0x1e18: 0x0080, 0x1e19: 0x0080, 0x1e1a: 0x0080, 0x1e1b: 0x0080, 0x1e1c: 0x0080, 0x1e1d: 0x0080, - 0x1e1e: 0x0080, 0x1e1f: 0x0080, 0x1e20: 0x0080, 0x1e21: 0x0080, 0x1e22: 0x0080, 0x1e23: 0x0080, - 0x1e24: 0x0080, 0x1e25: 0x0080, 0x1e26: 0x0080, 0x1e27: 0x0080, 0x1e28: 0x0080, 0x1e29: 0x0080, - 0x1e2a: 0x0080, 0x1e2b: 0x0080, 0x1e2c: 0x0080, 0x1e2d: 0x0080, 0x1e2e: 0x0080, 0x1e2f: 0x0080, - 0x1e30: 0x0080, 0x1e31: 0x0080, 0x1e32: 0x0080, 0x1e33: 0x0080, 0x1e34: 0x0080, 0x1e35: 0x0080, - 0x1e36: 0x0080, 0x1e37: 0x0080, 0x1e38: 0x0080, 0x1e39: 0x0080, - 0x1e3d: 0x0080, 0x1e3e: 0x0080, 0x1e3f: 0x0080, - // Block 0x79, offset 0x1e40 - 0x1e40: 0x0080, 0x1e41: 0x0080, 0x1e42: 0x0080, 0x1e43: 0x0080, 0x1e44: 0x0080, 0x1e45: 0x0080, - 0x1e46: 0x0080, 0x1e47: 0x0080, 0x1e48: 0x0080, 0x1e4a: 0x0080, 0x1e4b: 0x0080, - 0x1e4c: 0x0080, 0x1e4d: 0x0080, 0x1e4e: 0x0080, 0x1e4f: 0x0080, 0x1e50: 0x0080, 0x1e51: 0x0080, - 0x1e6c: 0x0080, 0x1e6d: 0x0080, 0x1e6e: 0x0080, 0x1e6f: 0x0080, - // Block 0x7a, offset 0x1e80 - 0x1e80: 0x00c0, 0x1e81: 0x00c0, 0x1e82: 0x00c0, 0x1e83: 0x00c0, 0x1e84: 0x00c0, 0x1e85: 0x00c0, - 0x1e86: 0x00c0, 0x1e87: 0x00c0, 0x1e88: 0x00c0, 0x1e89: 0x00c0, 0x1e8a: 0x00c0, 0x1e8b: 0x00c0, - 0x1e8c: 0x00c0, 0x1e8d: 0x00c0, 0x1e8e: 0x00c0, 0x1e8f: 0x00c0, 0x1e90: 0x00c0, 0x1e91: 0x00c0, - 0x1e92: 0x00c0, 0x1e93: 0x00c0, 0x1e94: 0x00c0, 0x1e95: 0x00c0, 0x1e96: 0x00c0, 0x1e97: 0x00c0, - 0x1e98: 0x00c0, 0x1e99: 0x00c0, 0x1e9a: 0x00c0, 0x1e9b: 0x00c0, 0x1e9c: 0x00c0, 0x1e9d: 0x00c0, - 0x1e9e: 0x00c0, 0x1e9f: 0x00c0, 0x1ea0: 0x00c0, 0x1ea1: 0x00c0, 0x1ea2: 0x00c0, 0x1ea3: 0x00c0, - 0x1ea4: 0x00c0, 0x1ea5: 0x00c0, 0x1ea6: 0x00c0, 0x1ea7: 0x00c0, 0x1ea8: 0x00c0, 0x1ea9: 0x00c0, - 0x1eaa: 0x00c0, 0x1eab: 0x00c0, 0x1eac: 0x00c0, 0x1ead: 0x00c0, 0x1eae: 0x00c0, - 0x1eb0: 0x00c0, 0x1eb1: 0x00c0, 0x1eb2: 0x00c0, 0x1eb3: 0x00c0, 0x1eb4: 0x00c0, 0x1eb5: 0x00c0, - 0x1eb6: 0x00c0, 0x1eb7: 0x00c0, 0x1eb8: 0x00c0, 0x1eb9: 0x00c0, 0x1eba: 0x00c0, 0x1ebb: 0x00c0, - 0x1ebc: 0x00c0, 0x1ebd: 0x00c0, 0x1ebe: 0x00c0, 0x1ebf: 0x00c0, - // Block 0x7b, offset 0x1ec0 - 0x1ec0: 0x00c0, 0x1ec1: 0x00c0, 0x1ec2: 0x00c0, 0x1ec3: 0x00c0, 0x1ec4: 0x00c0, 0x1ec5: 0x00c0, - 0x1ec6: 0x00c0, 0x1ec7: 0x00c0, 0x1ec8: 0x00c0, 0x1ec9: 0x00c0, 0x1eca: 0x00c0, 0x1ecb: 0x00c0, - 0x1ecc: 0x00c0, 0x1ecd: 0x00c0, 0x1ece: 0x00c0, 0x1ecf: 0x00c0, 0x1ed0: 0x00c0, 0x1ed1: 0x00c0, - 0x1ed2: 0x00c0, 0x1ed3: 0x00c0, 0x1ed4: 0x00c0, 0x1ed5: 0x00c0, 0x1ed6: 0x00c0, 0x1ed7: 0x00c0, - 0x1ed8: 0x00c0, 0x1ed9: 0x00c0, 0x1eda: 0x00c0, 0x1edb: 0x00c0, 0x1edc: 0x00c0, 0x1edd: 0x00c0, - 0x1ede: 0x00c0, 0x1ee0: 0x00c0, 0x1ee1: 0x00c0, 0x1ee2: 0x00c0, 0x1ee3: 0x00c0, - 0x1ee4: 0x00c0, 0x1ee5: 0x00c0, 0x1ee6: 0x00c0, 0x1ee7: 0x00c0, 0x1ee8: 0x00c0, 0x1ee9: 0x00c0, - 0x1eea: 0x00c0, 0x1eeb: 0x00c0, 0x1eec: 0x00c0, 0x1eed: 0x00c0, 0x1eee: 0x00c0, 0x1eef: 0x00c0, - 0x1ef0: 0x00c0, 0x1ef1: 0x00c0, 0x1ef2: 0x00c0, 0x1ef3: 0x00c0, 0x1ef4: 0x00c0, 0x1ef5: 0x00c0, - 0x1ef6: 0x00c0, 0x1ef7: 0x00c0, 0x1ef8: 0x00c0, 0x1ef9: 0x00c0, 0x1efa: 0x00c0, 0x1efb: 0x00c0, - 0x1efc: 0x0080, 0x1efd: 0x0080, 0x1efe: 0x00c0, 0x1eff: 0x00c0, - // Block 0x7c, offset 0x1f00 - 0x1f00: 0x00c0, 0x1f01: 0x00c0, 0x1f02: 0x00c0, 0x1f03: 0x00c0, 0x1f04: 0x00c0, 0x1f05: 0x00c0, - 0x1f06: 0x00c0, 0x1f07: 0x00c0, 0x1f08: 0x00c0, 0x1f09: 0x00c0, 0x1f0a: 0x00c0, 0x1f0b: 0x00c0, - 0x1f0c: 0x00c0, 0x1f0d: 0x00c0, 0x1f0e: 0x00c0, 0x1f0f: 0x00c0, 0x1f10: 0x00c0, 0x1f11: 0x00c0, - 0x1f12: 0x00c0, 0x1f13: 0x00c0, 0x1f14: 0x00c0, 0x1f15: 0x00c0, 0x1f16: 0x00c0, 0x1f17: 0x00c0, - 0x1f18: 0x00c0, 0x1f19: 0x00c0, 0x1f1a: 0x00c0, 0x1f1b: 0x00c0, 0x1f1c: 0x00c0, 0x1f1d: 0x00c0, - 0x1f1e: 0x00c0, 0x1f1f: 0x00c0, 0x1f20: 0x00c0, 0x1f21: 0x00c0, 0x1f22: 0x00c0, 0x1f23: 0x00c0, - 0x1f24: 0x00c0, 0x1f25: 0x0080, 0x1f26: 0x0080, 0x1f27: 0x0080, 0x1f28: 0x0080, 0x1f29: 0x0080, - 0x1f2a: 0x0080, 0x1f2b: 0x00c0, 0x1f2c: 0x00c0, 0x1f2d: 0x00c0, 0x1f2e: 0x00c0, 0x1f2f: 0x00c3, - 0x1f30: 0x00c3, 0x1f31: 0x00c3, 0x1f32: 0x00c0, 0x1f33: 0x00c0, - 0x1f39: 0x0080, 0x1f3a: 0x0080, 0x1f3b: 0x0080, - 0x1f3c: 0x0080, 0x1f3d: 0x0080, 0x1f3e: 0x0080, 0x1f3f: 0x0080, - // Block 0x7d, offset 0x1f40 - 0x1f40: 0x00c0, 0x1f41: 0x00c0, 0x1f42: 0x00c0, 0x1f43: 0x00c0, 0x1f44: 0x00c0, 0x1f45: 0x00c0, - 0x1f46: 0x00c0, 0x1f47: 0x00c0, 0x1f48: 0x00c0, 0x1f49: 0x00c0, 0x1f4a: 0x00c0, 0x1f4b: 0x00c0, - 0x1f4c: 0x00c0, 0x1f4d: 0x00c0, 0x1f4e: 0x00c0, 0x1f4f: 0x00c0, 0x1f50: 0x00c0, 0x1f51: 0x00c0, - 0x1f52: 0x00c0, 0x1f53: 0x00c0, 0x1f54: 0x00c0, 0x1f55: 0x00c0, 0x1f56: 0x00c0, 0x1f57: 0x00c0, - 0x1f58: 0x00c0, 0x1f59: 0x00c0, 0x1f5a: 0x00c0, 0x1f5b: 0x00c0, 0x1f5c: 0x00c0, 0x1f5d: 0x00c0, - 0x1f5e: 0x00c0, 0x1f5f: 0x00c0, 0x1f60: 0x00c0, 0x1f61: 0x00c0, 0x1f62: 0x00c0, 0x1f63: 0x00c0, - 0x1f64: 0x00c0, 0x1f65: 0x00c0, 0x1f67: 0x00c0, - 0x1f6d: 0x00c0, - 0x1f70: 0x00c0, 0x1f71: 0x00c0, 0x1f72: 0x00c0, 0x1f73: 0x00c0, 0x1f74: 0x00c0, 0x1f75: 0x00c0, - 0x1f76: 0x00c0, 0x1f77: 0x00c0, 0x1f78: 0x00c0, 0x1f79: 0x00c0, 0x1f7a: 0x00c0, 0x1f7b: 0x00c0, - 0x1f7c: 0x00c0, 0x1f7d: 0x00c0, 0x1f7e: 0x00c0, 0x1f7f: 0x00c0, - // Block 0x7e, offset 0x1f80 - 0x1f80: 0x00c0, 0x1f81: 0x00c0, 0x1f82: 0x00c0, 0x1f83: 0x00c0, 0x1f84: 0x00c0, 0x1f85: 0x00c0, - 0x1f86: 0x00c0, 0x1f87: 0x00c0, 0x1f88: 0x00c0, 0x1f89: 0x00c0, 0x1f8a: 0x00c0, 0x1f8b: 0x00c0, - 0x1f8c: 0x00c0, 0x1f8d: 0x00c0, 0x1f8e: 0x00c0, 0x1f8f: 0x00c0, 0x1f90: 0x00c0, 0x1f91: 0x00c0, - 0x1f92: 0x00c0, 0x1f93: 0x00c0, 0x1f94: 0x00c0, 0x1f95: 0x00c0, 0x1f96: 0x00c0, 0x1f97: 0x00c0, - 0x1f98: 0x00c0, 0x1f99: 0x00c0, 0x1f9a: 0x00c0, 0x1f9b: 0x00c0, 0x1f9c: 0x00c0, 0x1f9d: 0x00c0, - 0x1f9e: 0x00c0, 0x1f9f: 0x00c0, 0x1fa0: 0x00c0, 0x1fa1: 0x00c0, 0x1fa2: 0x00c0, 0x1fa3: 0x00c0, - 0x1fa4: 0x00c0, 0x1fa5: 0x00c0, 0x1fa6: 0x00c0, 0x1fa7: 0x00c0, - 0x1faf: 0x0080, - 0x1fb0: 0x0080, - 0x1fbf: 0x00c6, - // Block 0x7f, offset 0x1fc0 - 0x1fc0: 0x00c0, 0x1fc1: 0x00c0, 0x1fc2: 0x00c0, 0x1fc3: 0x00c0, 0x1fc4: 0x00c0, 0x1fc5: 0x00c0, - 0x1fc6: 0x00c0, 0x1fc7: 0x00c0, 0x1fc8: 0x00c0, 0x1fc9: 0x00c0, 0x1fca: 0x00c0, 0x1fcb: 0x00c0, - 0x1fcc: 0x00c0, 0x1fcd: 0x00c0, 0x1fce: 0x00c0, 0x1fcf: 0x00c0, 0x1fd0: 0x00c0, 0x1fd1: 0x00c0, - 0x1fd2: 0x00c0, 0x1fd3: 0x00c0, 0x1fd4: 0x00c0, 0x1fd5: 0x00c0, 0x1fd6: 0x00c0, - 0x1fe0: 0x00c0, 0x1fe1: 0x00c0, 0x1fe2: 0x00c0, 0x1fe3: 0x00c0, - 0x1fe4: 0x00c0, 0x1fe5: 0x00c0, 0x1fe6: 0x00c0, 0x1fe8: 0x00c0, 0x1fe9: 0x00c0, - 0x1fea: 0x00c0, 0x1feb: 0x00c0, 0x1fec: 0x00c0, 0x1fed: 0x00c0, 0x1fee: 0x00c0, - 0x1ff0: 0x00c0, 0x1ff1: 0x00c0, 0x1ff2: 0x00c0, 0x1ff3: 0x00c0, 0x1ff4: 0x00c0, 0x1ff5: 0x00c0, - 0x1ff6: 0x00c0, 0x1ff8: 0x00c0, 0x1ff9: 0x00c0, 0x1ffa: 0x00c0, 0x1ffb: 0x00c0, - 0x1ffc: 0x00c0, 0x1ffd: 0x00c0, 0x1ffe: 0x00c0, - // Block 0x80, offset 0x2000 - 0x2000: 0x00c0, 0x2001: 0x00c0, 0x2002: 0x00c0, 0x2003: 0x00c0, 0x2004: 0x00c0, 0x2005: 0x00c0, - 0x2006: 0x00c0, 0x2008: 0x00c0, 0x2009: 0x00c0, 0x200a: 0x00c0, 0x200b: 0x00c0, - 0x200c: 0x00c0, 0x200d: 0x00c0, 0x200e: 0x00c0, 0x2010: 0x00c0, 0x2011: 0x00c0, - 0x2012: 0x00c0, 0x2013: 0x00c0, 0x2014: 0x00c0, 0x2015: 0x00c0, 0x2016: 0x00c0, - 0x2018: 0x00c0, 0x2019: 0x00c0, 0x201a: 0x00c0, 0x201b: 0x00c0, 0x201c: 0x00c0, 0x201d: 0x00c0, - 0x201e: 0x00c0, 0x2020: 0x00c3, 0x2021: 0x00c3, 0x2022: 0x00c3, 0x2023: 0x00c3, - 0x2024: 0x00c3, 0x2025: 0x00c3, 0x2026: 0x00c3, 0x2027: 0x00c3, 0x2028: 0x00c3, 0x2029: 0x00c3, - 0x202a: 0x00c3, 0x202b: 0x00c3, 0x202c: 0x00c3, 0x202d: 0x00c3, 0x202e: 0x00c3, 0x202f: 0x00c3, - 0x2030: 0x00c3, 0x2031: 0x00c3, 0x2032: 0x00c3, 0x2033: 0x00c3, 0x2034: 0x00c3, 0x2035: 0x00c3, - 0x2036: 0x00c3, 0x2037: 0x00c3, 0x2038: 0x00c3, 0x2039: 0x00c3, 0x203a: 0x00c3, 0x203b: 0x00c3, - 0x203c: 0x00c3, 0x203d: 0x00c3, 0x203e: 0x00c3, 0x203f: 0x00c3, - // Block 0x81, offset 0x2040 - 0x2040: 0x0080, 0x2041: 0x0080, 0x2042: 0x0080, 0x2043: 0x0080, 0x2044: 0x0080, 0x2045: 0x0080, - 0x2046: 0x0080, 0x2047: 0x0080, 0x2048: 0x0080, 0x2049: 0x0080, 0x204a: 0x0080, 0x204b: 0x0080, - 0x204c: 0x0080, 0x204d: 0x0080, 0x204e: 0x0080, 0x204f: 0x0080, 0x2050: 0x0080, 0x2051: 0x0080, - 0x2052: 0x0080, 0x2053: 0x0080, 0x2054: 0x0080, 0x2055: 0x0080, 0x2056: 0x0080, 0x2057: 0x0080, - 0x2058: 0x0080, 0x2059: 0x0080, 0x205a: 0x0080, 0x205b: 0x0080, 0x205c: 0x0080, 0x205d: 0x0080, - 0x205e: 0x0080, 0x205f: 0x0080, 0x2060: 0x0080, 0x2061: 0x0080, 0x2062: 0x0080, 0x2063: 0x0080, - 0x2064: 0x0080, 0x2065: 0x0080, 0x2066: 0x0080, 0x2067: 0x0080, 0x2068: 0x0080, 0x2069: 0x0080, - 0x206a: 0x0080, 0x206b: 0x0080, 0x206c: 0x0080, 0x206d: 0x0080, 0x206e: 0x0080, 0x206f: 0x00c0, - 0x2070: 0x0080, 0x2071: 0x0080, 0x2072: 0x0080, 0x2073: 0x0080, 0x2074: 0x0080, 0x2075: 0x0080, - 0x2076: 0x0080, 0x2077: 0x0080, 0x2078: 0x0080, 0x2079: 0x0080, 0x207a: 0x0080, 0x207b: 0x0080, - 0x207c: 0x0080, 0x207d: 0x0080, 0x207e: 0x0080, 0x207f: 0x0080, - // Block 0x82, offset 0x2080 - 0x2080: 0x0080, 0x2081: 0x0080, 0x2082: 0x0080, 0x2083: 0x0080, 0x2084: 0x0080, - // Block 0x83, offset 0x20c0 - 0x20c0: 0x008c, 0x20c1: 0x008c, 0x20c2: 0x008c, 0x20c3: 0x008c, 0x20c4: 0x008c, 0x20c5: 0x008c, - 0x20c6: 0x008c, 0x20c7: 0x008c, 0x20c8: 0x008c, 0x20c9: 0x008c, 0x20ca: 0x008c, 0x20cb: 0x008c, - 0x20cc: 0x008c, 0x20cd: 0x008c, 0x20ce: 0x008c, 0x20cf: 0x008c, 0x20d0: 0x008c, 0x20d1: 0x008c, - 0x20d2: 0x008c, 0x20d3: 0x008c, 0x20d4: 0x008c, 0x20d5: 0x008c, 0x20d6: 0x008c, 0x20d7: 0x008c, - 0x20d8: 0x008c, 0x20d9: 0x008c, 0x20db: 0x008c, 0x20dc: 0x008c, 0x20dd: 0x008c, - 0x20de: 0x008c, 0x20df: 0x008c, 0x20e0: 0x008c, 0x20e1: 0x008c, 0x20e2: 0x008c, 0x20e3: 0x008c, - 0x20e4: 0x008c, 0x20e5: 0x008c, 0x20e6: 0x008c, 0x20e7: 0x008c, 0x20e8: 0x008c, 0x20e9: 0x008c, - 0x20ea: 0x008c, 0x20eb: 0x008c, 0x20ec: 0x008c, 0x20ed: 0x008c, 0x20ee: 0x008c, 0x20ef: 0x008c, - 0x20f0: 0x008c, 0x20f1: 0x008c, 0x20f2: 0x008c, 0x20f3: 0x008c, 0x20f4: 0x008c, 0x20f5: 0x008c, - 0x20f6: 0x008c, 0x20f7: 0x008c, 0x20f8: 0x008c, 0x20f9: 0x008c, 0x20fa: 0x008c, 0x20fb: 0x008c, - 0x20fc: 0x008c, 0x20fd: 0x008c, 0x20fe: 0x008c, 0x20ff: 0x008c, - // Block 0x84, offset 0x2100 - 0x2100: 0x008c, 0x2101: 0x008c, 0x2102: 0x008c, 0x2103: 0x008c, 0x2104: 0x008c, 0x2105: 0x008c, - 0x2106: 0x008c, 0x2107: 0x008c, 0x2108: 0x008c, 0x2109: 0x008c, 0x210a: 0x008c, 0x210b: 0x008c, - 0x210c: 0x008c, 0x210d: 0x008c, 0x210e: 0x008c, 0x210f: 0x008c, 0x2110: 0x008c, 0x2111: 0x008c, - 0x2112: 0x008c, 0x2113: 0x008c, 0x2114: 0x008c, 0x2115: 0x008c, 0x2116: 0x008c, 0x2117: 0x008c, - 0x2118: 0x008c, 0x2119: 0x008c, 0x211a: 0x008c, 0x211b: 0x008c, 0x211c: 0x008c, 0x211d: 0x008c, - 0x211e: 0x008c, 0x211f: 0x008c, 0x2120: 0x008c, 0x2121: 0x008c, 0x2122: 0x008c, 0x2123: 0x008c, - 0x2124: 0x008c, 0x2125: 0x008c, 0x2126: 0x008c, 0x2127: 0x008c, 0x2128: 0x008c, 0x2129: 0x008c, - 0x212a: 0x008c, 0x212b: 0x008c, 0x212c: 0x008c, 0x212d: 0x008c, 0x212e: 0x008c, 0x212f: 0x008c, - 0x2130: 0x008c, 0x2131: 0x008c, 0x2132: 0x008c, 0x2133: 0x008c, - // Block 0x85, offset 0x2140 - 0x2140: 0x008c, 0x2141: 0x008c, 0x2142: 0x008c, 0x2143: 0x008c, 0x2144: 0x008c, 0x2145: 0x008c, - 0x2146: 0x008c, 0x2147: 0x008c, 0x2148: 0x008c, 0x2149: 0x008c, 0x214a: 0x008c, 0x214b: 0x008c, - 0x214c: 0x008c, 0x214d: 0x008c, 0x214e: 0x008c, 0x214f: 0x008c, 0x2150: 0x008c, 0x2151: 0x008c, - 0x2152: 0x008c, 0x2153: 0x008c, 0x2154: 0x008c, 0x2155: 0x008c, 0x2156: 0x008c, 0x2157: 0x008c, - 0x2158: 0x008c, 0x2159: 0x008c, 0x215a: 0x008c, 0x215b: 0x008c, 0x215c: 0x008c, 0x215d: 0x008c, - 0x215e: 0x008c, 0x215f: 0x008c, 0x2160: 0x008c, 0x2161: 0x008c, 0x2162: 0x008c, 0x2163: 0x008c, - 0x2164: 0x008c, 0x2165: 0x008c, 0x2166: 0x008c, 0x2167: 0x008c, 0x2168: 0x008c, 0x2169: 0x008c, - 0x216a: 0x008c, 0x216b: 0x008c, 0x216c: 0x008c, 0x216d: 0x008c, 0x216e: 0x008c, 0x216f: 0x008c, - 0x2170: 0x008c, 0x2171: 0x008c, 0x2172: 0x008c, 0x2173: 0x008c, 0x2174: 0x008c, 0x2175: 0x008c, - 0x2176: 0x008c, 0x2177: 0x008c, 0x2178: 0x008c, 0x2179: 0x008c, 0x217a: 0x008c, 0x217b: 0x008c, - 0x217c: 0x008c, 0x217d: 0x008c, 0x217e: 0x008c, 0x217f: 0x008c, - // Block 0x86, offset 0x2180 - 0x2180: 0x008c, 0x2181: 0x008c, 0x2182: 0x008c, 0x2183: 0x008c, 0x2184: 0x008c, 0x2185: 0x008c, - 0x2186: 0x008c, 0x2187: 0x008c, 0x2188: 0x008c, 0x2189: 0x008c, 0x218a: 0x008c, 0x218b: 0x008c, - 0x218c: 0x008c, 0x218d: 0x008c, 0x218e: 0x008c, 0x218f: 0x008c, 0x2190: 0x008c, 0x2191: 0x008c, - 0x2192: 0x008c, 0x2193: 0x008c, 0x2194: 0x008c, 0x2195: 0x008c, - 0x21b0: 0x0080, 0x21b1: 0x0080, 0x21b2: 0x0080, 0x21b3: 0x0080, 0x21b4: 0x0080, 0x21b5: 0x0080, - 0x21b6: 0x0080, 0x21b7: 0x0080, 0x21b8: 0x0080, 0x21b9: 0x0080, 0x21ba: 0x0080, 0x21bb: 0x0080, - // Block 0x87, offset 0x21c0 - 0x21c0: 0x0080, 0x21c1: 0x0080, 0x21c2: 0x0080, 0x21c3: 0x0080, 0x21c4: 0x0080, 0x21c5: 0x00cc, - 0x21c6: 0x00c0, 0x21c7: 0x00cc, 0x21c8: 0x0080, 0x21c9: 0x0080, 0x21ca: 0x0080, 0x21cb: 0x0080, - 0x21cc: 0x0080, 0x21cd: 0x0080, 0x21ce: 0x0080, 0x21cf: 0x0080, 0x21d0: 0x0080, 0x21d1: 0x0080, - 0x21d2: 0x0080, 0x21d3: 0x0080, 0x21d4: 0x0080, 0x21d5: 0x0080, 0x21d6: 0x0080, 0x21d7: 0x0080, - 0x21d8: 0x0080, 0x21d9: 0x0080, 0x21da: 0x0080, 0x21db: 0x0080, 0x21dc: 0x0080, 0x21dd: 0x0080, - 0x21de: 0x0080, 0x21df: 0x0080, 0x21e0: 0x0080, 0x21e1: 0x008c, 0x21e2: 0x008c, 0x21e3: 0x008c, - 0x21e4: 0x008c, 0x21e5: 0x008c, 0x21e6: 0x008c, 0x21e7: 0x008c, 0x21e8: 0x008c, 0x21e9: 0x008c, - 0x21ea: 0x00c3, 0x21eb: 0x00c3, 0x21ec: 0x00c3, 0x21ed: 0x00c3, 0x21ee: 0x0040, 0x21ef: 0x0040, - 0x21f0: 0x0080, 0x21f1: 0x0040, 0x21f2: 0x0040, 0x21f3: 0x0040, 0x21f4: 0x0040, 0x21f5: 0x0040, - 0x21f6: 0x0080, 0x21f7: 0x0080, 0x21f8: 0x008c, 0x21f9: 0x008c, 0x21fa: 0x008c, 0x21fb: 0x0040, - 0x21fc: 0x00c0, 0x21fd: 0x0080, 0x21fe: 0x0080, 0x21ff: 0x0080, - // Block 0x88, offset 0x2200 - 0x2201: 0x00cc, 0x2202: 0x00cc, 0x2203: 0x00cc, 0x2204: 0x00cc, 0x2205: 0x00cc, - 0x2206: 0x00cc, 0x2207: 0x00cc, 0x2208: 0x00cc, 0x2209: 0x00cc, 0x220a: 0x00cc, 0x220b: 0x00cc, - 0x220c: 0x00cc, 0x220d: 0x00cc, 0x220e: 0x00cc, 0x220f: 0x00cc, 0x2210: 0x00cc, 0x2211: 0x00cc, - 0x2212: 0x00cc, 0x2213: 0x00cc, 0x2214: 0x00cc, 0x2215: 0x00cc, 0x2216: 0x00cc, 0x2217: 0x00cc, - 0x2218: 0x00cc, 0x2219: 0x00cc, 0x221a: 0x00cc, 0x221b: 0x00cc, 0x221c: 0x00cc, 0x221d: 0x00cc, - 0x221e: 0x00cc, 0x221f: 0x00cc, 0x2220: 0x00cc, 0x2221: 0x00cc, 0x2222: 0x00cc, 0x2223: 0x00cc, - 0x2224: 0x00cc, 0x2225: 0x00cc, 0x2226: 0x00cc, 0x2227: 0x00cc, 0x2228: 0x00cc, 0x2229: 0x00cc, - 0x222a: 0x00cc, 0x222b: 0x00cc, 0x222c: 0x00cc, 0x222d: 0x00cc, 0x222e: 0x00cc, 0x222f: 0x00cc, - 0x2230: 0x00cc, 0x2231: 0x00cc, 0x2232: 0x00cc, 0x2233: 0x00cc, 0x2234: 0x00cc, 0x2235: 0x00cc, - 0x2236: 0x00cc, 0x2237: 0x00cc, 0x2238: 0x00cc, 0x2239: 0x00cc, 0x223a: 0x00cc, 0x223b: 0x00cc, - 0x223c: 0x00cc, 0x223d: 0x00cc, 0x223e: 0x00cc, 0x223f: 0x00cc, - // Block 0x89, offset 0x2240 - 0x2240: 0x00cc, 0x2241: 0x00cc, 0x2242: 0x00cc, 0x2243: 0x00cc, 0x2244: 0x00cc, 0x2245: 0x00cc, - 0x2246: 0x00cc, 0x2247: 0x00cc, 0x2248: 0x00cc, 0x2249: 0x00cc, 0x224a: 0x00cc, 0x224b: 0x00cc, - 0x224c: 0x00cc, 0x224d: 0x00cc, 0x224e: 0x00cc, 0x224f: 0x00cc, 0x2250: 0x00cc, 0x2251: 0x00cc, - 0x2252: 0x00cc, 0x2253: 0x00cc, 0x2254: 0x00cc, 0x2255: 0x00cc, 0x2256: 0x00cc, - 0x2259: 0x00c3, 0x225a: 0x00c3, 0x225b: 0x0080, 0x225c: 0x0080, 0x225d: 0x00cc, - 0x225e: 0x00cc, 0x225f: 0x008c, 0x2260: 0x0080, 0x2261: 0x00cc, 0x2262: 0x00cc, 0x2263: 0x00cc, - 0x2264: 0x00cc, 0x2265: 0x00cc, 0x2266: 0x00cc, 0x2267: 0x00cc, 0x2268: 0x00cc, 0x2269: 0x00cc, - 0x226a: 0x00cc, 0x226b: 0x00cc, 0x226c: 0x00cc, 0x226d: 0x00cc, 0x226e: 0x00cc, 0x226f: 0x00cc, - 0x2270: 0x00cc, 0x2271: 0x00cc, 0x2272: 0x00cc, 0x2273: 0x00cc, 0x2274: 0x00cc, 0x2275: 0x00cc, - 0x2276: 0x00cc, 0x2277: 0x00cc, 0x2278: 0x00cc, 0x2279: 0x00cc, 0x227a: 0x00cc, 0x227b: 0x00cc, - 0x227c: 0x00cc, 0x227d: 0x00cc, 0x227e: 0x00cc, 0x227f: 0x00cc, - // Block 0x8a, offset 0x2280 - 0x2280: 0x00cc, 0x2281: 0x00cc, 0x2282: 0x00cc, 0x2283: 0x00cc, 0x2284: 0x00cc, 0x2285: 0x00cc, - 0x2286: 0x00cc, 0x2287: 0x00cc, 0x2288: 0x00cc, 0x2289: 0x00cc, 0x228a: 0x00cc, 0x228b: 0x00cc, - 0x228c: 0x00cc, 0x228d: 0x00cc, 0x228e: 0x00cc, 0x228f: 0x00cc, 0x2290: 0x00cc, 0x2291: 0x00cc, - 0x2292: 0x00cc, 0x2293: 0x00cc, 0x2294: 0x00cc, 0x2295: 0x00cc, 0x2296: 0x00cc, 0x2297: 0x00cc, - 0x2298: 0x00cc, 0x2299: 0x00cc, 0x229a: 0x00cc, 0x229b: 0x00cc, 0x229c: 0x00cc, 0x229d: 0x00cc, - 0x229e: 0x00cc, 0x229f: 0x00cc, 0x22a0: 0x00cc, 0x22a1: 0x00cc, 0x22a2: 0x00cc, 0x22a3: 0x00cc, - 0x22a4: 0x00cc, 0x22a5: 0x00cc, 0x22a6: 0x00cc, 0x22a7: 0x00cc, 0x22a8: 0x00cc, 0x22a9: 0x00cc, - 0x22aa: 0x00cc, 0x22ab: 0x00cc, 0x22ac: 0x00cc, 0x22ad: 0x00cc, 0x22ae: 0x00cc, 0x22af: 0x00cc, - 0x22b0: 0x00cc, 0x22b1: 0x00cc, 0x22b2: 0x00cc, 0x22b3: 0x00cc, 0x22b4: 0x00cc, 0x22b5: 0x00cc, - 0x22b6: 0x00cc, 0x22b7: 0x00cc, 0x22b8: 0x00cc, 0x22b9: 0x00cc, 0x22ba: 0x00cc, 0x22bb: 0x00d2, - 0x22bc: 0x00c0, 0x22bd: 0x00cc, 0x22be: 0x00cc, 0x22bf: 0x008c, - // Block 0x8b, offset 0x22c0 - 0x22c5: 0x00c0, - 0x22c6: 0x00c0, 0x22c7: 0x00c0, 0x22c8: 0x00c0, 0x22c9: 0x00c0, 0x22ca: 0x00c0, 0x22cb: 0x00c0, - 0x22cc: 0x00c0, 0x22cd: 0x00c0, 0x22ce: 0x00c0, 0x22cf: 0x00c0, 0x22d0: 0x00c0, 0x22d1: 0x00c0, - 0x22d2: 0x00c0, 0x22d3: 0x00c0, 0x22d4: 0x00c0, 0x22d5: 0x00c0, 0x22d6: 0x00c0, 0x22d7: 0x00c0, - 0x22d8: 0x00c0, 0x22d9: 0x00c0, 0x22da: 0x00c0, 0x22db: 0x00c0, 0x22dc: 0x00c0, 0x22dd: 0x00c0, - 0x22de: 0x00c0, 0x22df: 0x00c0, 0x22e0: 0x00c0, 0x22e1: 0x00c0, 0x22e2: 0x00c0, 0x22e3: 0x00c0, - 0x22e4: 0x00c0, 0x22e5: 0x00c0, 0x22e6: 0x00c0, 0x22e7: 0x00c0, 0x22e8: 0x00c0, 0x22e9: 0x00c0, - 0x22ea: 0x00c0, 0x22eb: 0x00c0, 0x22ec: 0x00c0, 0x22ed: 0x00c0, - 0x22f1: 0x0080, 0x22f2: 0x0080, 0x22f3: 0x0080, 0x22f4: 0x0080, 0x22f5: 0x0080, - 0x22f6: 0x0080, 0x22f7: 0x0080, 0x22f8: 0x0080, 0x22f9: 0x0080, 0x22fa: 0x0080, 0x22fb: 0x0080, - 0x22fc: 0x0080, 0x22fd: 0x0080, 0x22fe: 0x0080, 0x22ff: 0x0080, - // Block 0x8c, offset 0x2300 - 0x2300: 0x0080, 0x2301: 0x0080, 0x2302: 0x0080, 0x2303: 0x0080, 0x2304: 0x0080, 0x2305: 0x0080, - 0x2306: 0x0080, 0x2307: 0x0080, 0x2308: 0x0080, 0x2309: 0x0080, 0x230a: 0x0080, 0x230b: 0x0080, - 0x230c: 0x0080, 0x230d: 0x0080, 0x230e: 0x0080, 0x230f: 0x0080, 0x2310: 0x0080, 0x2311: 0x0080, - 0x2312: 0x0080, 0x2313: 0x0080, 0x2314: 0x0080, 0x2315: 0x0080, 0x2316: 0x0080, 0x2317: 0x0080, - 0x2318: 0x0080, 0x2319: 0x0080, 0x231a: 0x0080, 0x231b: 0x0080, 0x231c: 0x0080, 0x231d: 0x0080, - 0x231e: 0x0080, 0x231f: 0x0080, 0x2320: 0x0080, 0x2321: 0x0080, 0x2322: 0x0080, 0x2323: 0x0080, - 0x2324: 0x0040, 0x2325: 0x0080, 0x2326: 0x0080, 0x2327: 0x0080, 0x2328: 0x0080, 0x2329: 0x0080, - 0x232a: 0x0080, 0x232b: 0x0080, 0x232c: 0x0080, 0x232d: 0x0080, 0x232e: 0x0080, 0x232f: 0x0080, - 0x2330: 0x0080, 0x2331: 0x0080, 0x2332: 0x0080, 0x2333: 0x0080, 0x2334: 0x0080, 0x2335: 0x0080, - 0x2336: 0x0080, 0x2337: 0x0080, 0x2338: 0x0080, 0x2339: 0x0080, 0x233a: 0x0080, 0x233b: 0x0080, - 0x233c: 0x0080, 0x233d: 0x0080, 0x233e: 0x0080, 0x233f: 0x0080, - // Block 0x8d, offset 0x2340 - 0x2340: 0x0080, 0x2341: 0x0080, 0x2342: 0x0080, 0x2343: 0x0080, 0x2344: 0x0080, 0x2345: 0x0080, - 0x2346: 0x0080, 0x2347: 0x0080, 0x2348: 0x0080, 0x2349: 0x0080, 0x234a: 0x0080, 0x234b: 0x0080, - 0x234c: 0x0080, 0x234d: 0x0080, 0x234e: 0x0080, 0x2350: 0x0080, 0x2351: 0x0080, - 0x2352: 0x0080, 0x2353: 0x0080, 0x2354: 0x0080, 0x2355: 0x0080, 0x2356: 0x0080, 0x2357: 0x0080, - 0x2358: 0x0080, 0x2359: 0x0080, 0x235a: 0x0080, 0x235b: 0x0080, 0x235c: 0x0080, 0x235d: 0x0080, - 0x235e: 0x0080, 0x235f: 0x0080, 0x2360: 0x00c0, 0x2361: 0x00c0, 0x2362: 0x00c0, 0x2363: 0x00c0, - 0x2364: 0x00c0, 0x2365: 0x00c0, 0x2366: 0x00c0, 0x2367: 0x00c0, 0x2368: 0x00c0, 0x2369: 0x00c0, - 0x236a: 0x00c0, 0x236b: 0x00c0, 0x236c: 0x00c0, 0x236d: 0x00c0, 0x236e: 0x00c0, 0x236f: 0x00c0, - 0x2370: 0x00c0, 0x2371: 0x00c0, 0x2372: 0x00c0, 0x2373: 0x00c0, 0x2374: 0x00c0, 0x2375: 0x00c0, - 0x2376: 0x00c0, 0x2377: 0x00c0, 0x2378: 0x00c0, 0x2379: 0x00c0, 0x237a: 0x00c0, - // Block 0x8e, offset 0x2380 - 0x2380: 0x0080, 0x2381: 0x0080, 0x2382: 0x0080, 0x2383: 0x0080, 0x2384: 0x0080, 0x2385: 0x0080, - 0x2386: 0x0080, 0x2387: 0x0080, 0x2388: 0x0080, 0x2389: 0x0080, 0x238a: 0x0080, 0x238b: 0x0080, - 0x238c: 0x0080, 0x238d: 0x0080, 0x238e: 0x0080, 0x238f: 0x0080, 0x2390: 0x0080, 0x2391: 0x0080, - 0x2392: 0x0080, 0x2393: 0x0080, 0x2394: 0x0080, 0x2395: 0x0080, 0x2396: 0x0080, 0x2397: 0x0080, - 0x2398: 0x0080, 0x2399: 0x0080, 0x239a: 0x0080, 0x239b: 0x0080, 0x239c: 0x0080, 0x239d: 0x0080, - 0x239e: 0x0080, 0x239f: 0x0080, 0x23a0: 0x0080, 0x23a1: 0x0080, 0x23a2: 0x0080, 0x23a3: 0x0080, - 0x23b0: 0x00cc, 0x23b1: 0x00cc, 0x23b2: 0x00cc, 0x23b3: 0x00cc, 0x23b4: 0x00cc, 0x23b5: 0x00cc, - 0x23b6: 0x00cc, 0x23b7: 0x00cc, 0x23b8: 0x00cc, 0x23b9: 0x00cc, 0x23ba: 0x00cc, 0x23bb: 0x00cc, - 0x23bc: 0x00cc, 0x23bd: 0x00cc, 0x23be: 0x00cc, 0x23bf: 0x00cc, - // Block 0x8f, offset 0x23c0 - 0x23c0: 0x0080, 0x23c1: 0x0080, 0x23c2: 0x0080, 0x23c3: 0x0080, 0x23c4: 0x0080, 0x23c5: 0x0080, - 0x23c6: 0x0080, 0x23c7: 0x0080, 0x23c8: 0x0080, 0x23c9: 0x0080, 0x23ca: 0x0080, 0x23cb: 0x0080, - 0x23cc: 0x0080, 0x23cd: 0x0080, 0x23ce: 0x0080, 0x23cf: 0x0080, 0x23d0: 0x0080, 0x23d1: 0x0080, - 0x23d2: 0x0080, 0x23d3: 0x0080, 0x23d4: 0x0080, 0x23d5: 0x0080, 0x23d6: 0x0080, 0x23d7: 0x0080, - 0x23d8: 0x0080, 0x23d9: 0x0080, 0x23da: 0x0080, 0x23db: 0x0080, 0x23dc: 0x0080, 0x23dd: 0x0080, - 0x23de: 0x0080, 0x23e0: 0x0080, 0x23e1: 0x0080, 0x23e2: 0x0080, 0x23e3: 0x0080, - 0x23e4: 0x0080, 0x23e5: 0x0080, 0x23e6: 0x0080, 0x23e7: 0x0080, 0x23e8: 0x0080, 0x23e9: 0x0080, - 0x23ea: 0x0080, 0x23eb: 0x0080, 0x23ec: 0x0080, 0x23ed: 0x0080, 0x23ee: 0x0080, 0x23ef: 0x0080, - 0x23f0: 0x0080, 0x23f1: 0x0080, 0x23f2: 0x0080, 0x23f3: 0x0080, 0x23f4: 0x0080, 0x23f5: 0x0080, - 0x23f6: 0x0080, 0x23f7: 0x0080, 0x23f8: 0x0080, 0x23f9: 0x0080, 0x23fa: 0x0080, 0x23fb: 0x0080, - 0x23fc: 0x0080, 0x23fd: 0x0080, 0x23fe: 0x0080, 0x23ff: 0x0080, - // Block 0x90, offset 0x2400 - 0x2400: 0x0080, 0x2401: 0x0080, 0x2402: 0x0080, 0x2403: 0x0080, 0x2404: 0x0080, 0x2405: 0x0080, - 0x2406: 0x0080, 0x2407: 0x0080, 0x2408: 0x0080, 0x2409: 0x0080, 0x240a: 0x0080, 0x240b: 0x0080, - 0x240c: 0x0080, 0x240d: 0x0080, 0x240e: 0x0080, 0x240f: 0x0080, 0x2410: 0x008c, 0x2411: 0x008c, - 0x2412: 0x008c, 0x2413: 0x008c, 0x2414: 0x008c, 0x2415: 0x008c, 0x2416: 0x008c, 0x2417: 0x008c, - 0x2418: 0x008c, 0x2419: 0x008c, 0x241a: 0x008c, 0x241b: 0x008c, 0x241c: 0x008c, 0x241d: 0x008c, - 0x241e: 0x008c, 0x241f: 0x008c, 0x2420: 0x008c, 0x2421: 0x008c, 0x2422: 0x008c, 0x2423: 0x008c, - 0x2424: 0x008c, 0x2425: 0x008c, 0x2426: 0x008c, 0x2427: 0x008c, 0x2428: 0x008c, 0x2429: 0x008c, - 0x242a: 0x008c, 0x242b: 0x008c, 0x242c: 0x008c, 0x242d: 0x008c, 0x242e: 0x008c, 0x242f: 0x008c, - 0x2430: 0x008c, 0x2431: 0x008c, 0x2432: 0x008c, 0x2433: 0x008c, 0x2434: 0x008c, 0x2435: 0x008c, - 0x2436: 0x008c, 0x2437: 0x008c, 0x2438: 0x008c, 0x2439: 0x008c, 0x243a: 0x008c, 0x243b: 0x008c, - 0x243c: 0x008c, 0x243d: 0x008c, 0x243e: 0x008c, - // Block 0x91, offset 0x2440 - 0x2440: 0x008c, 0x2441: 0x008c, 0x2442: 0x008c, 0x2443: 0x008c, 0x2444: 0x008c, 0x2445: 0x008c, - 0x2446: 0x008c, 0x2447: 0x008c, 0x2448: 0x008c, 0x2449: 0x008c, 0x244a: 0x008c, 0x244b: 0x008c, - 0x244c: 0x008c, 0x244d: 0x008c, 0x244e: 0x008c, 0x244f: 0x008c, 0x2450: 0x008c, 0x2451: 0x008c, - 0x2452: 0x008c, 0x2453: 0x008c, 0x2454: 0x008c, 0x2455: 0x008c, 0x2456: 0x008c, 0x2457: 0x008c, - 0x2458: 0x0080, 0x2459: 0x0080, 0x245a: 0x0080, 0x245b: 0x0080, 0x245c: 0x0080, 0x245d: 0x0080, - 0x245e: 0x0080, 0x245f: 0x0080, 0x2460: 0x0080, 0x2461: 0x0080, 0x2462: 0x0080, 0x2463: 0x0080, - 0x2464: 0x0080, 0x2465: 0x0080, 0x2466: 0x0080, 0x2467: 0x0080, 0x2468: 0x0080, 0x2469: 0x0080, - 0x246a: 0x0080, 0x246b: 0x0080, 0x246c: 0x0080, 0x246d: 0x0080, 0x246e: 0x0080, 0x246f: 0x0080, - 0x2470: 0x0080, 0x2471: 0x0080, 0x2472: 0x0080, 0x2473: 0x0080, 0x2474: 0x0080, 0x2475: 0x0080, - 0x2476: 0x0080, 0x2477: 0x0080, 0x2478: 0x0080, 0x2479: 0x0080, 0x247a: 0x0080, 0x247b: 0x0080, - 0x247c: 0x0080, 0x247d: 0x0080, 0x247e: 0x0080, 0x247f: 0x0080, - // Block 0x92, offset 0x2480 - 0x2480: 0x00cc, 0x2481: 0x00cc, 0x2482: 0x00cc, 0x2483: 0x00cc, 0x2484: 0x00cc, 0x2485: 0x00cc, - 0x2486: 0x00cc, 0x2487: 0x00cc, 0x2488: 0x00cc, 0x2489: 0x00cc, 0x248a: 0x00cc, 0x248b: 0x00cc, - 0x248c: 0x00cc, 0x248d: 0x00cc, 0x248e: 0x00cc, 0x248f: 0x00cc, 0x2490: 0x00cc, 0x2491: 0x00cc, - 0x2492: 0x00cc, 0x2493: 0x00cc, 0x2494: 0x00cc, 0x2495: 0x00cc, 0x2496: 0x00cc, 0x2497: 0x00cc, - 0x2498: 0x00cc, 0x2499: 0x00cc, 0x249a: 0x00cc, 0x249b: 0x00cc, 0x249c: 0x00cc, 0x249d: 0x00cc, - 0x249e: 0x00cc, 0x249f: 0x00cc, 0x24a0: 0x00cc, 0x24a1: 0x00cc, 0x24a2: 0x00cc, 0x24a3: 0x00cc, - 0x24a4: 0x00cc, 0x24a5: 0x00cc, 0x24a6: 0x00cc, 0x24a7: 0x00cc, 0x24a8: 0x00cc, 0x24a9: 0x00cc, - 0x24aa: 0x00cc, 0x24ab: 0x00cc, 0x24ac: 0x00cc, 0x24ad: 0x00cc, 0x24ae: 0x00cc, 0x24af: 0x00cc, - 0x24b0: 0x00cc, 0x24b1: 0x00cc, 0x24b2: 0x00cc, 0x24b3: 0x00cc, 0x24b4: 0x00cc, 0x24b5: 0x00cc, - 0x24b6: 0x00cc, 0x24b7: 0x00cc, 0x24b8: 0x00cc, 0x24b9: 0x00cc, 0x24ba: 0x00cc, 0x24bb: 0x00cc, - 0x24bc: 0x00cc, 0x24bd: 0x00cc, 0x24be: 0x00cc, 0x24bf: 0x00cc, - // Block 0x93, offset 0x24c0 - 0x24c0: 0x00cc, 0x24c1: 0x00cc, 0x24c2: 0x00cc, 0x24c3: 0x00cc, 0x24c4: 0x00cc, 0x24c5: 0x00cc, - 0x24c6: 0x00cc, 0x24c7: 0x00cc, 0x24c8: 0x00cc, 0x24c9: 0x00cc, 0x24ca: 0x00cc, 0x24cb: 0x00cc, - 0x24cc: 0x00cc, 0x24cd: 0x00cc, 0x24ce: 0x00cc, 0x24cf: 0x00cc, 0x24d0: 0x00cc, 0x24d1: 0x00cc, - 0x24d2: 0x00cc, 0x24d3: 0x00cc, 0x24d4: 0x00cc, 0x24d5: 0x00cc, 0x24d6: 0x00cc, 0x24d7: 0x00cc, - 0x24d8: 0x00cc, 0x24d9: 0x00cc, 0x24da: 0x00cc, 0x24db: 0x00cc, 0x24dc: 0x00cc, 0x24dd: 0x00cc, - 0x24de: 0x00cc, 0x24df: 0x00cc, 0x24e0: 0x00cc, 0x24e1: 0x00cc, 0x24e2: 0x00cc, 0x24e3: 0x00cc, - 0x24e4: 0x00cc, 0x24e5: 0x00cc, 0x24e6: 0x00cc, 0x24e7: 0x00cc, 0x24e8: 0x00cc, 0x24e9: 0x00cc, - 0x24ea: 0x00cc, 0x24eb: 0x00cc, 0x24ec: 0x00cc, 0x24ed: 0x00cc, 0x24ee: 0x00cc, 0x24ef: 0x00cc, - 0x24f0: 0x00cc, 0x24f1: 0x00cc, 0x24f2: 0x00cc, 0x24f3: 0x00cc, 0x24f4: 0x00cc, 0x24f5: 0x00cc, - // Block 0x94, offset 0x2500 - 0x2500: 0x00cc, 0x2501: 0x00cc, 0x2502: 0x00cc, 0x2503: 0x00cc, 0x2504: 0x00cc, 0x2505: 0x00cc, - 0x2506: 0x00cc, 0x2507: 0x00cc, 0x2508: 0x00cc, 0x2509: 0x00cc, 0x250a: 0x00cc, 0x250b: 0x00cc, - 0x250c: 0x00cc, 0x250d: 0x00cc, 0x250e: 0x00cc, 0x250f: 0x00cc, 0x2510: 0x00cc, 0x2511: 0x00cc, - 0x2512: 0x00cc, 0x2513: 0x00cc, 0x2514: 0x00cc, 0x2515: 0x00cc, - // Block 0x95, offset 0x2540 - 0x2540: 0x00c0, 0x2541: 0x00c0, 0x2542: 0x00c0, 0x2543: 0x00c0, 0x2544: 0x00c0, 0x2545: 0x00c0, - 0x2546: 0x00c0, 0x2547: 0x00c0, 0x2548: 0x00c0, 0x2549: 0x00c0, 0x254a: 0x00c0, 0x254b: 0x00c0, - 0x254c: 0x00c0, 0x2550: 0x0080, 0x2551: 0x0080, - 0x2552: 0x0080, 0x2553: 0x0080, 0x2554: 0x0080, 0x2555: 0x0080, 0x2556: 0x0080, 0x2557: 0x0080, - 0x2558: 0x0080, 0x2559: 0x0080, 0x255a: 0x0080, 0x255b: 0x0080, 0x255c: 0x0080, 0x255d: 0x0080, - 0x255e: 0x0080, 0x255f: 0x0080, 0x2560: 0x0080, 0x2561: 0x0080, 0x2562: 0x0080, 0x2563: 0x0080, - 0x2564: 0x0080, 0x2565: 0x0080, 0x2566: 0x0080, 0x2567: 0x0080, 0x2568: 0x0080, 0x2569: 0x0080, - 0x256a: 0x0080, 0x256b: 0x0080, 0x256c: 0x0080, 0x256d: 0x0080, 0x256e: 0x0080, 0x256f: 0x0080, - 0x2570: 0x0080, 0x2571: 0x0080, 0x2572: 0x0080, 0x2573: 0x0080, 0x2574: 0x0080, 0x2575: 0x0080, - 0x2576: 0x0080, 0x2577: 0x0080, 0x2578: 0x0080, 0x2579: 0x0080, 0x257a: 0x0080, 0x257b: 0x0080, - 0x257c: 0x0080, 0x257d: 0x0080, 0x257e: 0x0080, 0x257f: 0x0080, - // Block 0x96, offset 0x2580 - 0x2580: 0x0080, 0x2581: 0x0080, 0x2582: 0x0080, 0x2583: 0x0080, 0x2584: 0x0080, 0x2585: 0x0080, - 0x2586: 0x0080, - 0x2590: 0x00c0, 0x2591: 0x00c0, - 0x2592: 0x00c0, 0x2593: 0x00c0, 0x2594: 0x00c0, 0x2595: 0x00c0, 0x2596: 0x00c0, 0x2597: 0x00c0, - 0x2598: 0x00c0, 0x2599: 0x00c0, 0x259a: 0x00c0, 0x259b: 0x00c0, 0x259c: 0x00c0, 0x259d: 0x00c0, - 0x259e: 0x00c0, 0x259f: 0x00c0, 0x25a0: 0x00c0, 0x25a1: 0x00c0, 0x25a2: 0x00c0, 0x25a3: 0x00c0, - 0x25a4: 0x00c0, 0x25a5: 0x00c0, 0x25a6: 0x00c0, 0x25a7: 0x00c0, 0x25a8: 0x00c0, 0x25a9: 0x00c0, - 0x25aa: 0x00c0, 0x25ab: 0x00c0, 0x25ac: 0x00c0, 0x25ad: 0x00c0, 0x25ae: 0x00c0, 0x25af: 0x00c0, - 0x25b0: 0x00c0, 0x25b1: 0x00c0, 0x25b2: 0x00c0, 0x25b3: 0x00c0, 0x25b4: 0x00c0, 0x25b5: 0x00c0, - 0x25b6: 0x00c0, 0x25b7: 0x00c0, 0x25b8: 0x00c0, 0x25b9: 0x00c0, 0x25ba: 0x00c0, 0x25bb: 0x00c0, - 0x25bc: 0x00c0, 0x25bd: 0x00c0, 0x25be: 0x0080, 0x25bf: 0x0080, - // Block 0x97, offset 0x25c0 - 0x25c0: 0x00c0, 0x25c1: 0x00c0, 0x25c2: 0x00c0, 0x25c3: 0x00c0, 0x25c4: 0x00c0, 0x25c5: 0x00c0, - 0x25c6: 0x00c0, 0x25c7: 0x00c0, 0x25c8: 0x00c0, 0x25c9: 0x00c0, 0x25ca: 0x00c0, 0x25cb: 0x00c0, - 0x25cc: 0x00c0, 0x25cd: 0x0080, 0x25ce: 0x0080, 0x25cf: 0x0080, 0x25d0: 0x00c0, 0x25d1: 0x00c0, - 0x25d2: 0x00c0, 0x25d3: 0x00c0, 0x25d4: 0x00c0, 0x25d5: 0x00c0, 0x25d6: 0x00c0, 0x25d7: 0x00c0, - 0x25d8: 0x00c0, 0x25d9: 0x00c0, 0x25da: 0x00c0, 0x25db: 0x00c0, 0x25dc: 0x00c0, 0x25dd: 0x00c0, - 0x25de: 0x00c0, 0x25df: 0x00c0, 0x25e0: 0x00c0, 0x25e1: 0x00c0, 0x25e2: 0x00c0, 0x25e3: 0x00c0, - 0x25e4: 0x00c0, 0x25e5: 0x00c0, 0x25e6: 0x00c0, 0x25e7: 0x00c0, 0x25e8: 0x00c0, 0x25e9: 0x00c0, - 0x25ea: 0x00c0, 0x25eb: 0x00c0, - // Block 0x98, offset 0x2600 - 0x2600: 0x00c0, 0x2601: 0x00c0, 0x2602: 0x00c0, 0x2603: 0x00c0, 0x2604: 0x00c0, 0x2605: 0x00c0, - 0x2606: 0x00c0, 0x2607: 0x00c0, 0x2608: 0x00c0, 0x2609: 0x00c0, 0x260a: 0x00c0, 0x260b: 0x00c0, - 0x260c: 0x00c0, 0x260d: 0x00c0, 0x260e: 0x00c0, 0x260f: 0x00c0, 0x2610: 0x00c0, 0x2611: 0x00c0, - 0x2612: 0x00c0, 0x2613: 0x00c0, 0x2614: 0x00c0, 0x2615: 0x00c0, 0x2616: 0x00c0, 0x2617: 0x00c0, - 0x2618: 0x00c0, 0x2619: 0x00c0, 0x261a: 0x00c0, 0x261b: 0x00c0, 0x261c: 0x00c0, 0x261d: 0x00c0, - 0x261e: 0x00c0, 0x261f: 0x00c0, 0x2620: 0x00c0, 0x2621: 0x00c0, 0x2622: 0x00c0, 0x2623: 0x00c0, - 0x2624: 0x00c0, 0x2625: 0x00c0, 0x2626: 0x00c0, 0x2627: 0x00c0, 0x2628: 0x00c0, 0x2629: 0x00c0, - 0x262a: 0x00c0, 0x262b: 0x00c0, 0x262c: 0x00c0, 0x262d: 0x00c0, 0x262e: 0x00c0, 0x262f: 0x00c3, - 0x2630: 0x0083, 0x2631: 0x0083, 0x2632: 0x0083, 0x2633: 0x0080, 0x2634: 0x00c3, 0x2635: 0x00c3, - 0x2636: 0x00c3, 0x2637: 0x00c3, 0x2638: 0x00c3, 0x2639: 0x00c3, 0x263a: 0x00c3, 0x263b: 0x00c3, - 0x263c: 0x00c3, 0x263d: 0x00c3, 0x263e: 0x0080, 0x263f: 0x00c0, - // Block 0x99, offset 0x2640 - 0x2640: 0x00c0, 0x2641: 0x00c0, 0x2642: 0x00c0, 0x2643: 0x00c0, 0x2644: 0x00c0, 0x2645: 0x00c0, - 0x2646: 0x00c0, 0x2647: 0x00c0, 0x2648: 0x00c0, 0x2649: 0x00c0, 0x264a: 0x00c0, 0x264b: 0x00c0, - 0x264c: 0x00c0, 0x264d: 0x00c0, 0x264e: 0x00c0, 0x264f: 0x00c0, 0x2650: 0x00c0, 0x2651: 0x00c0, - 0x2652: 0x00c0, 0x2653: 0x00c0, 0x2654: 0x00c0, 0x2655: 0x00c0, 0x2656: 0x00c0, 0x2657: 0x00c0, - 0x2658: 0x00c0, 0x2659: 0x00c0, 0x265a: 0x00c0, 0x265b: 0x00c0, 0x265c: 0x0080, 0x265d: 0x0080, - 0x265e: 0x00c3, 0x265f: 0x00c3, 0x2660: 0x00c0, 0x2661: 0x00c0, 0x2662: 0x00c0, 0x2663: 0x00c0, - 0x2664: 0x00c0, 0x2665: 0x00c0, 0x2666: 0x00c0, 0x2667: 0x00c0, 0x2668: 0x00c0, 0x2669: 0x00c0, - 0x266a: 0x00c0, 0x266b: 0x00c0, 0x266c: 0x00c0, 0x266d: 0x00c0, 0x266e: 0x00c0, 0x266f: 0x00c0, - 0x2670: 0x00c0, 0x2671: 0x00c0, 0x2672: 0x00c0, 0x2673: 0x00c0, 0x2674: 0x00c0, 0x2675: 0x00c0, - 0x2676: 0x00c0, 0x2677: 0x00c0, 0x2678: 0x00c0, 0x2679: 0x00c0, 0x267a: 0x00c0, 0x267b: 0x00c0, - 0x267c: 0x00c0, 0x267d: 0x00c0, 0x267e: 0x00c0, 0x267f: 0x00c0, - // Block 0x9a, offset 0x2680 - 0x2680: 0x00c0, 0x2681: 0x00c0, 0x2682: 0x00c0, 0x2683: 0x00c0, 0x2684: 0x00c0, 0x2685: 0x00c0, - 0x2686: 0x00c0, 0x2687: 0x00c0, 0x2688: 0x00c0, 0x2689: 0x00c0, 0x268a: 0x00c0, 0x268b: 0x00c0, - 0x268c: 0x00c0, 0x268d: 0x00c0, 0x268e: 0x00c0, 0x268f: 0x00c0, 0x2690: 0x00c0, 0x2691: 0x00c0, - 0x2692: 0x00c0, 0x2693: 0x00c0, 0x2694: 0x00c0, 0x2695: 0x00c0, 0x2696: 0x00c0, 0x2697: 0x00c0, - 0x2698: 0x00c0, 0x2699: 0x00c0, 0x269a: 0x00c0, 0x269b: 0x00c0, 0x269c: 0x00c0, 0x269d: 0x00c0, - 0x269e: 0x00c0, 0x269f: 0x00c0, 0x26a0: 0x00c0, 0x26a1: 0x00c0, 0x26a2: 0x00c0, 0x26a3: 0x00c0, - 0x26a4: 0x00c0, 0x26a5: 0x00c0, 0x26a6: 0x0080, 0x26a7: 0x0080, 0x26a8: 0x0080, 0x26a9: 0x0080, - 0x26aa: 0x0080, 0x26ab: 0x0080, 0x26ac: 0x0080, 0x26ad: 0x0080, 0x26ae: 0x0080, 0x26af: 0x0080, - 0x26b0: 0x00c3, 0x26b1: 0x00c3, 0x26b2: 0x0080, 0x26b3: 0x0080, 0x26b4: 0x0080, 0x26b5: 0x0080, - 0x26b6: 0x0080, 0x26b7: 0x0080, - // Block 0x9b, offset 0x26c0 - 0x26c0: 0x0080, 0x26c1: 0x0080, 0x26c2: 0x0080, 0x26c3: 0x0080, 0x26c4: 0x0080, 0x26c5: 0x0080, - 0x26c6: 0x0080, 0x26c7: 0x0080, 0x26c8: 0x0080, 0x26c9: 0x0080, 0x26ca: 0x0080, 0x26cb: 0x0080, - 0x26cc: 0x0080, 0x26cd: 0x0080, 0x26ce: 0x0080, 0x26cf: 0x0080, 0x26d0: 0x0080, 0x26d1: 0x0080, - 0x26d2: 0x0080, 0x26d3: 0x0080, 0x26d4: 0x0080, 0x26d5: 0x0080, 0x26d6: 0x0080, 0x26d7: 0x00c0, - 0x26d8: 0x00c0, 0x26d9: 0x00c0, 0x26da: 0x00c0, 0x26db: 0x00c0, 0x26dc: 0x00c0, 0x26dd: 0x00c0, - 0x26de: 0x00c0, 0x26df: 0x00c0, 0x26e0: 0x0080, 0x26e1: 0x0080, 0x26e2: 0x00c0, 0x26e3: 0x00c0, - 0x26e4: 0x00c0, 0x26e5: 0x00c0, 0x26e6: 0x00c0, 0x26e7: 0x00c0, 0x26e8: 0x00c0, 0x26e9: 0x00c0, - 0x26ea: 0x00c0, 0x26eb: 0x00c0, 0x26ec: 0x00c0, 0x26ed: 0x00c0, 0x26ee: 0x00c0, 0x26ef: 0x00c0, - 0x26f0: 0x00c0, 0x26f1: 0x00c0, 0x26f2: 0x00c0, 0x26f3: 0x00c0, 0x26f4: 0x00c0, 0x26f5: 0x00c0, - 0x26f6: 0x00c0, 0x26f7: 0x00c0, 0x26f8: 0x00c0, 0x26f9: 0x00c0, 0x26fa: 0x00c0, 0x26fb: 0x00c0, - 0x26fc: 0x00c0, 0x26fd: 0x00c0, 0x26fe: 0x00c0, 0x26ff: 0x00c0, - // Block 0x9c, offset 0x2700 - 0x2700: 0x00c0, 0x2701: 0x00c0, 0x2702: 0x00c0, 0x2703: 0x00c0, 0x2704: 0x00c0, 0x2705: 0x00c0, - 0x2706: 0x00c0, 0x2707: 0x00c0, 0x2708: 0x00c0, 0x2709: 0x00c0, 0x270a: 0x00c0, 0x270b: 0x00c0, - 0x270c: 0x00c0, 0x270d: 0x00c0, 0x270e: 0x00c0, 0x270f: 0x00c0, 0x2710: 0x00c0, 0x2711: 0x00c0, - 0x2712: 0x00c0, 0x2713: 0x00c0, 0x2714: 0x00c0, 0x2715: 0x00c0, 0x2716: 0x00c0, 0x2717: 0x00c0, - 0x2718: 0x00c0, 0x2719: 0x00c0, 0x271a: 0x00c0, 0x271b: 0x00c0, 0x271c: 0x00c0, 0x271d: 0x00c0, - 0x271e: 0x00c0, 0x271f: 0x00c0, 0x2720: 0x00c0, 0x2721: 0x00c0, 0x2722: 0x00c0, 0x2723: 0x00c0, - 0x2724: 0x00c0, 0x2725: 0x00c0, 0x2726: 0x00c0, 0x2727: 0x00c0, 0x2728: 0x00c0, 0x2729: 0x00c0, - 0x272a: 0x00c0, 0x272b: 0x00c0, 0x272c: 0x00c0, 0x272d: 0x00c0, 0x272e: 0x00c0, 0x272f: 0x00c0, - 0x2730: 0x0080, 0x2731: 0x00c0, 0x2732: 0x00c0, 0x2733: 0x00c0, 0x2734: 0x00c0, 0x2735: 0x00c0, - 0x2736: 0x00c0, 0x2737: 0x00c0, 0x2738: 0x00c0, 0x2739: 0x00c0, 0x273a: 0x00c0, 0x273b: 0x00c0, - 0x273c: 0x00c0, 0x273d: 0x00c0, 0x273e: 0x00c0, 0x273f: 0x00c0, - // Block 0x9d, offset 0x2740 - 0x2740: 0x00c0, 0x2741: 0x00c0, 0x2742: 0x00c0, 0x2743: 0x00c0, 0x2744: 0x00c0, 0x2745: 0x00c0, - 0x2746: 0x00c0, 0x2747: 0x00c0, 0x2748: 0x00c0, 0x2749: 0x0080, 0x274a: 0x0080, 0x274b: 0x00c0, - 0x274c: 0x00c0, 0x274d: 0x00c0, 0x274e: 0x00c0, 0x274f: 0x00c0, 0x2750: 0x00c0, 0x2751: 0x00c0, - 0x2752: 0x00c0, 0x2753: 0x00c0, 0x2754: 0x00c0, 0x2755: 0x00c0, 0x2756: 0x00c0, 0x2757: 0x00c0, - 0x2758: 0x00c0, 0x2759: 0x00c0, 0x275a: 0x00c0, 0x275b: 0x00c0, 0x275c: 0x00c0, 0x275d: 0x00c0, - 0x275e: 0x00c0, 0x275f: 0x00c0, 0x2760: 0x00c0, 0x2761: 0x00c0, 0x2762: 0x00c0, 0x2763: 0x00c0, - 0x2764: 0x00c0, 0x2765: 0x00c0, 0x2766: 0x00c0, 0x2767: 0x00c0, 0x2768: 0x00c0, 0x2769: 0x00c0, - 0x276a: 0x00c0, 0x276b: 0x00c0, 0x276c: 0x00c0, 0x276d: 0x00c0, 0x276e: 0x00c0, - 0x2770: 0x00c0, 0x2771: 0x00c0, 0x2772: 0x00c0, 0x2773: 0x00c0, 0x2774: 0x00c0, 0x2775: 0x00c0, - 0x2776: 0x00c0, 0x2777: 0x00c0, - // Block 0x9e, offset 0x2780 - 0x27b7: 0x00c0, 0x27b8: 0x0080, 0x27b9: 0x0080, 0x27ba: 0x00c0, 0x27bb: 0x00c0, - 0x27bc: 0x00c0, 0x27bd: 0x00c0, 0x27be: 0x00c0, 0x27bf: 0x00c0, - // Block 0x9f, offset 0x27c0 - 0x27c0: 0x00c0, 0x27c1: 0x00c0, 0x27c2: 0x00c3, 0x27c3: 0x00c0, 0x27c4: 0x00c0, 0x27c5: 0x00c0, - 0x27c6: 0x00c6, 0x27c7: 0x00c0, 0x27c8: 0x00c0, 0x27c9: 0x00c0, 0x27ca: 0x00c0, 0x27cb: 0x00c3, - 0x27cc: 0x00c0, 0x27cd: 0x00c0, 0x27ce: 0x00c0, 0x27cf: 0x00c0, 0x27d0: 0x00c0, 0x27d1: 0x00c0, - 0x27d2: 0x00c0, 0x27d3: 0x00c0, 0x27d4: 0x00c0, 0x27d5: 0x00c0, 0x27d6: 0x00c0, 0x27d7: 0x00c0, - 0x27d8: 0x00c0, 0x27d9: 0x00c0, 0x27da: 0x00c0, 0x27db: 0x00c0, 0x27dc: 0x00c0, 0x27dd: 0x00c0, - 0x27de: 0x00c0, 0x27df: 0x00c0, 0x27e0: 0x00c0, 0x27e1: 0x00c0, 0x27e2: 0x00c0, 0x27e3: 0x00c0, - 0x27e4: 0x00c0, 0x27e5: 0x00c3, 0x27e6: 0x00c3, 0x27e7: 0x00c0, 0x27e8: 0x0080, 0x27e9: 0x0080, - 0x27ea: 0x0080, 0x27eb: 0x0080, - 0x27f0: 0x0080, 0x27f1: 0x0080, 0x27f2: 0x0080, 0x27f3: 0x0080, 0x27f4: 0x0080, 0x27f5: 0x0080, - 0x27f6: 0x0080, 0x27f7: 0x0080, 0x27f8: 0x0080, 0x27f9: 0x0080, - // Block 0xa0, offset 0x2800 - 0x2800: 0x00c2, 0x2801: 0x00c2, 0x2802: 0x00c2, 0x2803: 0x00c2, 0x2804: 0x00c2, 0x2805: 0x00c2, - 0x2806: 0x00c2, 0x2807: 0x00c2, 0x2808: 0x00c2, 0x2809: 0x00c2, 0x280a: 0x00c2, 0x280b: 0x00c2, - 0x280c: 0x00c2, 0x280d: 0x00c2, 0x280e: 0x00c2, 0x280f: 0x00c2, 0x2810: 0x00c2, 0x2811: 0x00c2, - 0x2812: 0x00c2, 0x2813: 0x00c2, 0x2814: 0x00c2, 0x2815: 0x00c2, 0x2816: 0x00c2, 0x2817: 0x00c2, - 0x2818: 0x00c2, 0x2819: 0x00c2, 0x281a: 0x00c2, 0x281b: 0x00c2, 0x281c: 0x00c2, 0x281d: 0x00c2, - 0x281e: 0x00c2, 0x281f: 0x00c2, 0x2820: 0x00c2, 0x2821: 0x00c2, 0x2822: 0x00c2, 0x2823: 0x00c2, - 0x2824: 0x00c2, 0x2825: 0x00c2, 0x2826: 0x00c2, 0x2827: 0x00c2, 0x2828: 0x00c2, 0x2829: 0x00c2, - 0x282a: 0x00c2, 0x282b: 0x00c2, 0x282c: 0x00c2, 0x282d: 0x00c2, 0x282e: 0x00c2, 0x282f: 0x00c2, - 0x2830: 0x00c2, 0x2831: 0x00c2, 0x2832: 0x00c1, 0x2833: 0x00c0, 0x2834: 0x0080, 0x2835: 0x0080, - 0x2836: 0x0080, 0x2837: 0x0080, - // Block 0xa1, offset 0x2840 - 0x2840: 0x00c0, 0x2841: 0x00c0, 0x2842: 0x00c0, 0x2843: 0x00c0, 0x2844: 0x00c6, 0x2845: 0x00c3, - 0x284e: 0x0080, 0x284f: 0x0080, 0x2850: 0x00c0, 0x2851: 0x00c0, - 0x2852: 0x00c0, 0x2853: 0x00c0, 0x2854: 0x00c0, 0x2855: 0x00c0, 0x2856: 0x00c0, 0x2857: 0x00c0, - 0x2858: 0x00c0, 0x2859: 0x00c0, - 0x2860: 0x00c3, 0x2861: 0x00c3, 0x2862: 0x00c3, 0x2863: 0x00c3, - 0x2864: 0x00c3, 0x2865: 0x00c3, 0x2866: 0x00c3, 0x2867: 0x00c3, 0x2868: 0x00c3, 0x2869: 0x00c3, - 0x286a: 0x00c3, 0x286b: 0x00c3, 0x286c: 0x00c3, 0x286d: 0x00c3, 0x286e: 0x00c3, 0x286f: 0x00c3, - 0x2870: 0x00c3, 0x2871: 0x00c3, 0x2872: 0x00c0, 0x2873: 0x00c0, 0x2874: 0x00c0, 0x2875: 0x00c0, - 0x2876: 0x00c0, 0x2877: 0x00c0, 0x2878: 0x0080, 0x2879: 0x0080, 0x287a: 0x0080, 0x287b: 0x00c0, - 0x287c: 0x0080, 0x287d: 0x00c0, - // Block 0xa2, offset 0x2880 - 0x2880: 0x00c0, 0x2881: 0x00c0, 0x2882: 0x00c0, 0x2883: 0x00c0, 0x2884: 0x00c0, 0x2885: 0x00c0, - 0x2886: 0x00c0, 0x2887: 0x00c0, 0x2888: 0x00c0, 0x2889: 0x00c0, 0x288a: 0x00c0, 0x288b: 0x00c0, - 0x288c: 0x00c0, 0x288d: 0x00c0, 0x288e: 0x00c0, 0x288f: 0x00c0, 0x2890: 0x00c0, 0x2891: 0x00c0, - 0x2892: 0x00c0, 0x2893: 0x00c0, 0x2894: 0x00c0, 0x2895: 0x00c0, 0x2896: 0x00c0, 0x2897: 0x00c0, - 0x2898: 0x00c0, 0x2899: 0x00c0, 0x289a: 0x00c0, 0x289b: 0x00c0, 0x289c: 0x00c0, 0x289d: 0x00c0, - 0x289e: 0x00c0, 0x289f: 0x00c0, 0x28a0: 0x00c0, 0x28a1: 0x00c0, 0x28a2: 0x00c0, 0x28a3: 0x00c0, - 0x28a4: 0x00c0, 0x28a5: 0x00c0, 0x28a6: 0x00c3, 0x28a7: 0x00c3, 0x28a8: 0x00c3, 0x28a9: 0x00c3, - 0x28aa: 0x00c3, 0x28ab: 0x00c3, 0x28ac: 0x00c3, 0x28ad: 0x00c3, 0x28ae: 0x0080, 0x28af: 0x0080, - 0x28b0: 0x00c0, 0x28b1: 0x00c0, 0x28b2: 0x00c0, 0x28b3: 0x00c0, 0x28b4: 0x00c0, 0x28b5: 0x00c0, - 0x28b6: 0x00c0, 0x28b7: 0x00c0, 0x28b8: 0x00c0, 0x28b9: 0x00c0, 0x28ba: 0x00c0, 0x28bb: 0x00c0, - 0x28bc: 0x00c0, 0x28bd: 0x00c0, 0x28be: 0x00c0, 0x28bf: 0x00c0, - // Block 0xa3, offset 0x28c0 - 0x28c0: 0x00c0, 0x28c1: 0x00c0, 0x28c2: 0x00c0, 0x28c3: 0x00c0, 0x28c4: 0x00c0, 0x28c5: 0x00c0, - 0x28c6: 0x00c0, 0x28c7: 0x00c3, 0x28c8: 0x00c3, 0x28c9: 0x00c3, 0x28ca: 0x00c3, 0x28cb: 0x00c3, - 0x28cc: 0x00c3, 0x28cd: 0x00c3, 0x28ce: 0x00c3, 0x28cf: 0x00c3, 0x28d0: 0x00c3, 0x28d1: 0x00c3, - 0x28d2: 0x00c0, 0x28d3: 0x00c5, - 0x28df: 0x0080, 0x28e0: 0x0040, 0x28e1: 0x0040, 0x28e2: 0x0040, 0x28e3: 0x0040, - 0x28e4: 0x0040, 0x28e5: 0x0040, 0x28e6: 0x0040, 0x28e7: 0x0040, 0x28e8: 0x0040, 0x28e9: 0x0040, - 0x28ea: 0x0040, 0x28eb: 0x0040, 0x28ec: 0x0040, 0x28ed: 0x0040, 0x28ee: 0x0040, 0x28ef: 0x0040, - 0x28f0: 0x0040, 0x28f1: 0x0040, 0x28f2: 0x0040, 0x28f3: 0x0040, 0x28f4: 0x0040, 0x28f5: 0x0040, - 0x28f6: 0x0040, 0x28f7: 0x0040, 0x28f8: 0x0040, 0x28f9: 0x0040, 0x28fa: 0x0040, 0x28fb: 0x0040, - 0x28fc: 0x0040, - // Block 0xa4, offset 0x2900 - 0x2900: 0x00c3, 0x2901: 0x00c3, 0x2902: 0x00c3, 0x2903: 0x00c0, 0x2904: 0x00c0, 0x2905: 0x00c0, - 0x2906: 0x00c0, 0x2907: 0x00c0, 0x2908: 0x00c0, 0x2909: 0x00c0, 0x290a: 0x00c0, 0x290b: 0x00c0, - 0x290c: 0x00c0, 0x290d: 0x00c0, 0x290e: 0x00c0, 0x290f: 0x00c0, 0x2910: 0x00c0, 0x2911: 0x00c0, - 0x2912: 0x00c0, 0x2913: 0x00c0, 0x2914: 0x00c0, 0x2915: 0x00c0, 0x2916: 0x00c0, 0x2917: 0x00c0, - 0x2918: 0x00c0, 0x2919: 0x00c0, 0x291a: 0x00c0, 0x291b: 0x00c0, 0x291c: 0x00c0, 0x291d: 0x00c0, - 0x291e: 0x00c0, 0x291f: 0x00c0, 0x2920: 0x00c0, 0x2921: 0x00c0, 0x2922: 0x00c0, 0x2923: 0x00c0, - 0x2924: 0x00c0, 0x2925: 0x00c0, 0x2926: 0x00c0, 0x2927: 0x00c0, 0x2928: 0x00c0, 0x2929: 0x00c0, - 0x292a: 0x00c0, 0x292b: 0x00c0, 0x292c: 0x00c0, 0x292d: 0x00c0, 0x292e: 0x00c0, 0x292f: 0x00c0, - 0x2930: 0x00c0, 0x2931: 0x00c0, 0x2932: 0x00c0, 0x2933: 0x00c3, 0x2934: 0x00c0, 0x2935: 0x00c0, - 0x2936: 0x00c3, 0x2937: 0x00c3, 0x2938: 0x00c3, 0x2939: 0x00c3, 0x293a: 0x00c0, 0x293b: 0x00c0, - 0x293c: 0x00c3, 0x293d: 0x00c0, 0x293e: 0x00c0, 0x293f: 0x00c0, - // Block 0xa5, offset 0x2940 - 0x2940: 0x00c5, 0x2941: 0x0080, 0x2942: 0x0080, 0x2943: 0x0080, 0x2944: 0x0080, 0x2945: 0x0080, - 0x2946: 0x0080, 0x2947: 0x0080, 0x2948: 0x0080, 0x2949: 0x0080, 0x294a: 0x0080, 0x294b: 0x0080, - 0x294c: 0x0080, 0x294d: 0x0080, 0x294f: 0x00c0, 0x2950: 0x00c0, 0x2951: 0x00c0, - 0x2952: 0x00c0, 0x2953: 0x00c0, 0x2954: 0x00c0, 0x2955: 0x00c0, 0x2956: 0x00c0, 0x2957: 0x00c0, - 0x2958: 0x00c0, 0x2959: 0x00c0, - 0x295e: 0x0080, 0x295f: 0x0080, 0x2960: 0x00c0, 0x2961: 0x00c0, 0x2962: 0x00c0, 0x2963: 0x00c0, - 0x2964: 0x00c0, 0x2965: 0x00c3, 0x2966: 0x00c0, 0x2967: 0x00c0, 0x2968: 0x00c0, 0x2969: 0x00c0, - 0x296a: 0x00c0, 0x296b: 0x00c0, 0x296c: 0x00c0, 0x296d: 0x00c0, 0x296e: 0x00c0, 0x296f: 0x00c0, - 0x2970: 0x00c0, 0x2971: 0x00c0, 0x2972: 0x00c0, 0x2973: 0x00c0, 0x2974: 0x00c0, 0x2975: 0x00c0, - 0x2976: 0x00c0, 0x2977: 0x00c0, 0x2978: 0x00c0, 0x2979: 0x00c0, 0x297a: 0x00c0, 0x297b: 0x00c0, - 0x297c: 0x00c0, 0x297d: 0x00c0, 0x297e: 0x00c0, - // Block 0xa6, offset 0x2980 - 0x2980: 0x00c0, 0x2981: 0x00c0, 0x2982: 0x00c0, 0x2983: 0x00c0, 0x2984: 0x00c0, 0x2985: 0x00c0, - 0x2986: 0x00c0, 0x2987: 0x00c0, 0x2988: 0x00c0, 0x2989: 0x00c0, 0x298a: 0x00c0, 0x298b: 0x00c0, - 0x298c: 0x00c0, 0x298d: 0x00c0, 0x298e: 0x00c0, 0x298f: 0x00c0, 0x2990: 0x00c0, 0x2991: 0x00c0, - 0x2992: 0x00c0, 0x2993: 0x00c0, 0x2994: 0x00c0, 0x2995: 0x00c0, 0x2996: 0x00c0, 0x2997: 0x00c0, - 0x2998: 0x00c0, 0x2999: 0x00c0, 0x299a: 0x00c0, 0x299b: 0x00c0, 0x299c: 0x00c0, 0x299d: 0x00c0, - 0x299e: 0x00c0, 0x299f: 0x00c0, 0x29a0: 0x00c0, 0x29a1: 0x00c0, 0x29a2: 0x00c0, 0x29a3: 0x00c0, - 0x29a4: 0x00c0, 0x29a5: 0x00c0, 0x29a6: 0x00c0, 0x29a7: 0x00c0, 0x29a8: 0x00c0, 0x29a9: 0x00c3, - 0x29aa: 0x00c3, 0x29ab: 0x00c3, 0x29ac: 0x00c3, 0x29ad: 0x00c3, 0x29ae: 0x00c3, 0x29af: 0x00c0, - 0x29b0: 0x00c0, 0x29b1: 0x00c3, 0x29b2: 0x00c3, 0x29b3: 0x00c0, 0x29b4: 0x00c0, 0x29b5: 0x00c3, - 0x29b6: 0x00c3, - // Block 0xa7, offset 0x29c0 - 0x29c0: 0x00c0, 0x29c1: 0x00c0, 0x29c2: 0x00c0, 0x29c3: 0x00c3, 0x29c4: 0x00c0, 0x29c5: 0x00c0, - 0x29c6: 0x00c0, 0x29c7: 0x00c0, 0x29c8: 0x00c0, 0x29c9: 0x00c0, 0x29ca: 0x00c0, 0x29cb: 0x00c0, - 0x29cc: 0x00c3, 0x29cd: 0x00c0, 0x29d0: 0x00c0, 0x29d1: 0x00c0, - 0x29d2: 0x00c0, 0x29d3: 0x00c0, 0x29d4: 0x00c0, 0x29d5: 0x00c0, 0x29d6: 0x00c0, 0x29d7: 0x00c0, - 0x29d8: 0x00c0, 0x29d9: 0x00c0, 0x29dc: 0x0080, 0x29dd: 0x0080, - 0x29de: 0x0080, 0x29df: 0x0080, 0x29e0: 0x00c0, 0x29e1: 0x00c0, 0x29e2: 0x00c0, 0x29e3: 0x00c0, - 0x29e4: 0x00c0, 0x29e5: 0x00c0, 0x29e6: 0x00c0, 0x29e7: 0x00c0, 0x29e8: 0x00c0, 0x29e9: 0x00c0, - 0x29ea: 0x00c0, 0x29eb: 0x00c0, 0x29ec: 0x00c0, 0x29ed: 0x00c0, 0x29ee: 0x00c0, 0x29ef: 0x00c0, - 0x29f0: 0x00c0, 0x29f1: 0x00c0, 0x29f2: 0x00c0, 0x29f3: 0x00c0, 0x29f4: 0x00c0, 0x29f5: 0x00c0, - 0x29f6: 0x00c0, 0x29f7: 0x0080, 0x29f8: 0x0080, 0x29f9: 0x0080, 0x29fa: 0x00c0, 0x29fb: 0x00c0, - 0x29fc: 0x00c3, 0x29fd: 0x00c0, 0x29fe: 0x00c0, 0x29ff: 0x00c0, - // Block 0xa8, offset 0x2a00 - 0x2a00: 0x00c0, 0x2a01: 0x00c0, 0x2a02: 0x00c0, 0x2a03: 0x00c0, 0x2a04: 0x00c0, 0x2a05: 0x00c0, - 0x2a06: 0x00c0, 0x2a07: 0x00c0, 0x2a08: 0x00c0, 0x2a09: 0x00c0, 0x2a0a: 0x00c0, 0x2a0b: 0x00c0, - 0x2a0c: 0x00c0, 0x2a0d: 0x00c0, 0x2a0e: 0x00c0, 0x2a0f: 0x00c0, 0x2a10: 0x00c0, 0x2a11: 0x00c0, - 0x2a12: 0x00c0, 0x2a13: 0x00c0, 0x2a14: 0x00c0, 0x2a15: 0x00c0, 0x2a16: 0x00c0, 0x2a17: 0x00c0, - 0x2a18: 0x00c0, 0x2a19: 0x00c0, 0x2a1a: 0x00c0, 0x2a1b: 0x00c0, 0x2a1c: 0x00c0, 0x2a1d: 0x00c0, - 0x2a1e: 0x00c0, 0x2a1f: 0x00c0, 0x2a20: 0x00c0, 0x2a21: 0x00c0, 0x2a22: 0x00c0, 0x2a23: 0x00c0, - 0x2a24: 0x00c0, 0x2a25: 0x00c0, 0x2a26: 0x00c0, 0x2a27: 0x00c0, 0x2a28: 0x00c0, 0x2a29: 0x00c0, - 0x2a2a: 0x00c0, 0x2a2b: 0x00c0, 0x2a2c: 0x00c0, 0x2a2d: 0x00c0, 0x2a2e: 0x00c0, 0x2a2f: 0x00c0, - 0x2a30: 0x00c3, 0x2a31: 0x00c0, 0x2a32: 0x00c3, 0x2a33: 0x00c3, 0x2a34: 0x00c3, 0x2a35: 0x00c0, - 0x2a36: 0x00c0, 0x2a37: 0x00c3, 0x2a38: 0x00c3, 0x2a39: 0x00c0, 0x2a3a: 0x00c0, 0x2a3b: 0x00c0, - 0x2a3c: 0x00c0, 0x2a3d: 0x00c0, 0x2a3e: 0x00c3, 0x2a3f: 0x00c3, - // Block 0xa9, offset 0x2a40 - 0x2a40: 0x00c0, 0x2a41: 0x00c3, 0x2a42: 0x00c0, - 0x2a5b: 0x00c0, 0x2a5c: 0x00c0, 0x2a5d: 0x00c0, - 0x2a5e: 0x0080, 0x2a5f: 0x0080, 0x2a60: 0x00c0, 0x2a61: 0x00c0, 0x2a62: 0x00c0, 0x2a63: 0x00c0, - 0x2a64: 0x00c0, 0x2a65: 0x00c0, 0x2a66: 0x00c0, 0x2a67: 0x00c0, 0x2a68: 0x00c0, 0x2a69: 0x00c0, - 0x2a6a: 0x00c0, 0x2a6b: 0x00c0, 0x2a6c: 0x00c3, 0x2a6d: 0x00c3, 0x2a6e: 0x00c0, 0x2a6f: 0x00c0, - 0x2a70: 0x0080, 0x2a71: 0x0080, 0x2a72: 0x00c0, 0x2a73: 0x00c0, 0x2a74: 0x00c0, 0x2a75: 0x00c0, - 0x2a76: 0x00c6, - // Block 0xaa, offset 0x2a80 - 0x2a81: 0x00c0, 0x2a82: 0x00c0, 0x2a83: 0x00c0, 0x2a84: 0x00c0, 0x2a85: 0x00c0, - 0x2a86: 0x00c0, 0x2a89: 0x00c0, 0x2a8a: 0x00c0, 0x2a8b: 0x00c0, - 0x2a8c: 0x00c0, 0x2a8d: 0x00c0, 0x2a8e: 0x00c0, 0x2a91: 0x00c0, - 0x2a92: 0x00c0, 0x2a93: 0x00c0, 0x2a94: 0x00c0, 0x2a95: 0x00c0, 0x2a96: 0x00c0, - 0x2aa0: 0x00c0, 0x2aa1: 0x00c0, 0x2aa2: 0x00c0, 0x2aa3: 0x00c0, - 0x2aa4: 0x00c0, 0x2aa5: 0x00c0, 0x2aa6: 0x00c0, 0x2aa8: 0x00c0, 0x2aa9: 0x00c0, - 0x2aaa: 0x00c0, 0x2aab: 0x00c0, 0x2aac: 0x00c0, 0x2aad: 0x00c0, 0x2aae: 0x00c0, - 0x2ab0: 0x00c0, 0x2ab1: 0x00c0, 0x2ab2: 0x00c0, 0x2ab3: 0x00c0, 0x2ab4: 0x00c0, 0x2ab5: 0x00c0, - 0x2ab6: 0x00c0, 0x2ab7: 0x00c0, 0x2ab8: 0x00c0, 0x2ab9: 0x00c0, 0x2aba: 0x00c0, 0x2abb: 0x00c0, - 0x2abc: 0x00c0, 0x2abd: 0x00c0, 0x2abe: 0x00c0, 0x2abf: 0x00c0, - // Block 0xab, offset 0x2ac0 - 0x2ac0: 0x00c0, 0x2ac1: 0x00c0, 0x2ac2: 0x00c0, 0x2ac3: 0x00c0, 0x2ac4: 0x00c0, 0x2ac5: 0x00c0, - 0x2ac6: 0x00c0, 0x2ac7: 0x00c0, 0x2ac8: 0x00c0, 0x2ac9: 0x00c0, 0x2aca: 0x00c0, 0x2acb: 0x00c0, - 0x2acc: 0x00c0, 0x2acd: 0x00c0, 0x2ace: 0x00c0, 0x2acf: 0x00c0, 0x2ad0: 0x00c0, 0x2ad1: 0x00c0, - 0x2ad2: 0x00c0, 0x2ad3: 0x00c0, 0x2ad4: 0x00c0, 0x2ad5: 0x00c0, 0x2ad6: 0x00c0, 0x2ad7: 0x00c0, - 0x2ad8: 0x00c0, 0x2ad9: 0x00c0, 0x2ada: 0x00c0, 0x2adb: 0x0080, 0x2adc: 0x0080, 0x2add: 0x0080, - 0x2ade: 0x0080, 0x2adf: 0x0080, 0x2ae0: 0x00c0, 0x2ae1: 0x00c0, 0x2ae2: 0x00c0, 0x2ae3: 0x00c0, - 0x2ae4: 0x00c0, 0x2ae5: 0x00c8, - 0x2af0: 0x00c0, 0x2af1: 0x00c0, 0x2af2: 0x00c0, 0x2af3: 0x00c0, 0x2af4: 0x00c0, 0x2af5: 0x00c0, - 0x2af6: 0x00c0, 0x2af7: 0x00c0, 0x2af8: 0x00c0, 0x2af9: 0x00c0, 0x2afa: 0x00c0, 0x2afb: 0x00c0, - 0x2afc: 0x00c0, 0x2afd: 0x00c0, 0x2afe: 0x00c0, 0x2aff: 0x00c0, - // Block 0xac, offset 0x2b00 - 0x2b00: 0x00c0, 0x2b01: 0x00c0, 0x2b02: 0x00c0, 0x2b03: 0x00c0, 0x2b04: 0x00c0, 0x2b05: 0x00c0, - 0x2b06: 0x00c0, 0x2b07: 0x00c0, 0x2b08: 0x00c0, 0x2b09: 0x00c0, 0x2b0a: 0x00c0, 0x2b0b: 0x00c0, - 0x2b0c: 0x00c0, 0x2b0d: 0x00c0, 0x2b0e: 0x00c0, 0x2b0f: 0x00c0, 0x2b10: 0x00c0, 0x2b11: 0x00c0, - 0x2b12: 0x00c0, 0x2b13: 0x00c0, 0x2b14: 0x00c0, 0x2b15: 0x00c0, 0x2b16: 0x00c0, 0x2b17: 0x00c0, - 0x2b18: 0x00c0, 0x2b19: 0x00c0, 0x2b1a: 0x00c0, 0x2b1b: 0x00c0, 0x2b1c: 0x00c0, 0x2b1d: 0x00c0, - 0x2b1e: 0x00c0, 0x2b1f: 0x00c0, 0x2b20: 0x00c0, 0x2b21: 0x00c0, 0x2b22: 0x00c0, 0x2b23: 0x00c0, - 0x2b24: 0x00c0, 0x2b25: 0x00c3, 0x2b26: 0x00c0, 0x2b27: 0x00c0, 0x2b28: 0x00c3, 0x2b29: 0x00c0, - 0x2b2a: 0x00c0, 0x2b2b: 0x0080, 0x2b2c: 0x00c0, 0x2b2d: 0x00c6, - 0x2b30: 0x00c0, 0x2b31: 0x00c0, 0x2b32: 0x00c0, 0x2b33: 0x00c0, 0x2b34: 0x00c0, 0x2b35: 0x00c0, - 0x2b36: 0x00c0, 0x2b37: 0x00c0, 0x2b38: 0x00c0, 0x2b39: 0x00c0, - // Block 0xad, offset 0x2b40 - 0x2b40: 0x00c0, 0x2b41: 0x00c0, 0x2b42: 0x00c0, 0x2b43: 0x00c0, 0x2b44: 0x00c0, 0x2b45: 0x00c0, - 0x2b46: 0x00c0, 0x2b47: 0x00c0, 0x2b48: 0x00c0, 0x2b49: 0x00c0, 0x2b4a: 0x00c0, 0x2b4b: 0x00c0, - 0x2b4c: 0x00c0, 0x2b4d: 0x00c0, 0x2b4e: 0x00c0, 0x2b4f: 0x00c0, 0x2b50: 0x00c0, 0x2b51: 0x00c0, - 0x2b52: 0x00c0, 0x2b53: 0x00c0, 0x2b54: 0x00c0, 0x2b55: 0x00c0, 0x2b56: 0x00c0, 0x2b57: 0x00c0, - 0x2b58: 0x00c0, 0x2b59: 0x00c0, 0x2b5a: 0x00c0, 0x2b5b: 0x00c0, 0x2b5c: 0x00c0, 0x2b5d: 0x00c0, - 0x2b5e: 0x00c0, 0x2b5f: 0x00c0, 0x2b60: 0x00c0, 0x2b61: 0x00c0, 0x2b62: 0x00c0, 0x2b63: 0x00c0, - 0x2b70: 0x0040, 0x2b71: 0x0040, 0x2b72: 0x0040, 0x2b73: 0x0040, 0x2b74: 0x0040, 0x2b75: 0x0040, - 0x2b76: 0x0040, 0x2b77: 0x0040, 0x2b78: 0x0040, 0x2b79: 0x0040, 0x2b7a: 0x0040, 0x2b7b: 0x0040, - 0x2b7c: 0x0040, 0x2b7d: 0x0040, 0x2b7e: 0x0040, 0x2b7f: 0x0040, - // Block 0xae, offset 0x2b80 - 0x2b80: 0x0040, 0x2b81: 0x0040, 0x2b82: 0x0040, 0x2b83: 0x0040, 0x2b84: 0x0040, 0x2b85: 0x0040, - 0x2b86: 0x0040, 0x2b8b: 0x0040, - 0x2b8c: 0x0040, 0x2b8d: 0x0040, 0x2b8e: 0x0040, 0x2b8f: 0x0040, 0x2b90: 0x0040, 0x2b91: 0x0040, - 0x2b92: 0x0040, 0x2b93: 0x0040, 0x2b94: 0x0040, 0x2b95: 0x0040, 0x2b96: 0x0040, 0x2b97: 0x0040, - 0x2b98: 0x0040, 0x2b99: 0x0040, 0x2b9a: 0x0040, 0x2b9b: 0x0040, 0x2b9c: 0x0040, 0x2b9d: 0x0040, - 0x2b9e: 0x0040, 0x2b9f: 0x0040, 0x2ba0: 0x0040, 0x2ba1: 0x0040, 0x2ba2: 0x0040, 0x2ba3: 0x0040, - 0x2ba4: 0x0040, 0x2ba5: 0x0040, 0x2ba6: 0x0040, 0x2ba7: 0x0040, 0x2ba8: 0x0040, 0x2ba9: 0x0040, - 0x2baa: 0x0040, 0x2bab: 0x0040, 0x2bac: 0x0040, 0x2bad: 0x0040, 0x2bae: 0x0040, 0x2baf: 0x0040, - 0x2bb0: 0x0040, 0x2bb1: 0x0040, 0x2bb2: 0x0040, 0x2bb3: 0x0040, 0x2bb4: 0x0040, 0x2bb5: 0x0040, - 0x2bb6: 0x0040, 0x2bb7: 0x0040, 0x2bb8: 0x0040, 0x2bb9: 0x0040, 0x2bba: 0x0040, 0x2bbb: 0x0040, - // Block 0xaf, offset 0x2bc0 - 0x2bc0: 0x008c, 0x2bc1: 0x008c, 0x2bc2: 0x008c, 0x2bc3: 0x008c, 0x2bc4: 0x008c, 0x2bc5: 0x008c, - 0x2bc6: 0x008c, 0x2bc7: 0x008c, 0x2bc8: 0x008c, 0x2bc9: 0x008c, 0x2bca: 0x008c, 0x2bcb: 0x008c, - 0x2bcc: 0x008c, 0x2bcd: 0x008c, 0x2bce: 0x00cc, 0x2bcf: 0x00cc, 0x2bd0: 0x008c, 0x2bd1: 0x00cc, - 0x2bd2: 0x008c, 0x2bd3: 0x00cc, 0x2bd4: 0x00cc, 0x2bd5: 0x008c, 0x2bd6: 0x008c, 0x2bd7: 0x008c, - 0x2bd8: 0x008c, 0x2bd9: 0x008c, 0x2bda: 0x008c, 0x2bdb: 0x008c, 0x2bdc: 0x008c, 0x2bdd: 0x008c, - 0x2bde: 0x008c, 0x2bdf: 0x00cc, 0x2be0: 0x008c, 0x2be1: 0x00cc, 0x2be2: 0x008c, 0x2be3: 0x00cc, - 0x2be4: 0x00cc, 0x2be5: 0x008c, 0x2be6: 0x008c, 0x2be7: 0x00cc, 0x2be8: 0x00cc, 0x2be9: 0x00cc, - 0x2bea: 0x008c, 0x2beb: 0x008c, 0x2bec: 0x008c, 0x2bed: 0x008c, 0x2bee: 0x008c, 0x2bef: 0x008c, - 0x2bf0: 0x008c, 0x2bf1: 0x008c, 0x2bf2: 0x008c, 0x2bf3: 0x008c, 0x2bf4: 0x008c, 0x2bf5: 0x008c, - 0x2bf6: 0x008c, 0x2bf7: 0x008c, 0x2bf8: 0x008c, 0x2bf9: 0x008c, 0x2bfa: 0x008c, 0x2bfb: 0x008c, - 0x2bfc: 0x008c, 0x2bfd: 0x008c, 0x2bfe: 0x008c, 0x2bff: 0x008c, - // Block 0xb0, offset 0x2c00 - 0x2c00: 0x008c, 0x2c01: 0x008c, 0x2c02: 0x008c, 0x2c03: 0x008c, 0x2c04: 0x008c, 0x2c05: 0x008c, - 0x2c06: 0x008c, 0x2c07: 0x008c, 0x2c08: 0x008c, 0x2c09: 0x008c, 0x2c0a: 0x008c, 0x2c0b: 0x008c, - 0x2c0c: 0x008c, 0x2c0d: 0x008c, 0x2c0e: 0x008c, 0x2c0f: 0x008c, 0x2c10: 0x008c, 0x2c11: 0x008c, - 0x2c12: 0x008c, 0x2c13: 0x008c, 0x2c14: 0x008c, 0x2c15: 0x008c, 0x2c16: 0x008c, 0x2c17: 0x008c, - 0x2c18: 0x008c, 0x2c19: 0x008c, 0x2c1a: 0x008c, 0x2c1b: 0x008c, 0x2c1c: 0x008c, 0x2c1d: 0x008c, - 0x2c1e: 0x008c, 0x2c1f: 0x008c, 0x2c20: 0x008c, 0x2c21: 0x008c, 0x2c22: 0x008c, 0x2c23: 0x008c, - 0x2c24: 0x008c, 0x2c25: 0x008c, 0x2c26: 0x008c, 0x2c27: 0x008c, 0x2c28: 0x008c, 0x2c29: 0x008c, - 0x2c2a: 0x008c, 0x2c2b: 0x008c, 0x2c2c: 0x008c, 0x2c2d: 0x008c, - 0x2c30: 0x008c, 0x2c31: 0x008c, 0x2c32: 0x008c, 0x2c33: 0x008c, 0x2c34: 0x008c, 0x2c35: 0x008c, - 0x2c36: 0x008c, 0x2c37: 0x008c, 0x2c38: 0x008c, 0x2c39: 0x008c, 0x2c3a: 0x008c, 0x2c3b: 0x008c, - 0x2c3c: 0x008c, 0x2c3d: 0x008c, 0x2c3e: 0x008c, 0x2c3f: 0x008c, - // Block 0xb1, offset 0x2c40 - 0x2c40: 0x008c, 0x2c41: 0x008c, 0x2c42: 0x008c, 0x2c43: 0x008c, 0x2c44: 0x008c, 0x2c45: 0x008c, - 0x2c46: 0x008c, 0x2c47: 0x008c, 0x2c48: 0x008c, 0x2c49: 0x008c, 0x2c4a: 0x008c, 0x2c4b: 0x008c, - 0x2c4c: 0x008c, 0x2c4d: 0x008c, 0x2c4e: 0x008c, 0x2c4f: 0x008c, 0x2c50: 0x008c, 0x2c51: 0x008c, - 0x2c52: 0x008c, 0x2c53: 0x008c, 0x2c54: 0x008c, 0x2c55: 0x008c, 0x2c56: 0x008c, 0x2c57: 0x008c, - 0x2c58: 0x008c, 0x2c59: 0x008c, - // Block 0xb2, offset 0x2c80 - 0x2c80: 0x0080, 0x2c81: 0x0080, 0x2c82: 0x0080, 0x2c83: 0x0080, 0x2c84: 0x0080, 0x2c85: 0x0080, - 0x2c86: 0x0080, - 0x2c93: 0x0080, 0x2c94: 0x0080, 0x2c95: 0x0080, 0x2c96: 0x0080, 0x2c97: 0x0080, - 0x2c9d: 0x008a, - 0x2c9e: 0x00cb, 0x2c9f: 0x008a, 0x2ca0: 0x008a, 0x2ca1: 0x008a, 0x2ca2: 0x008a, 0x2ca3: 0x008a, - 0x2ca4: 0x008a, 0x2ca5: 0x008a, 0x2ca6: 0x008a, 0x2ca7: 0x008a, 0x2ca8: 0x008a, 0x2ca9: 0x008a, - 0x2caa: 0x008a, 0x2cab: 0x008a, 0x2cac: 0x008a, 0x2cad: 0x008a, 0x2cae: 0x008a, 0x2caf: 0x008a, - 0x2cb0: 0x008a, 0x2cb1: 0x008a, 0x2cb2: 0x008a, 0x2cb3: 0x008a, 0x2cb4: 0x008a, 0x2cb5: 0x008a, - 0x2cb6: 0x008a, 0x2cb8: 0x008a, 0x2cb9: 0x008a, 0x2cba: 0x008a, 0x2cbb: 0x008a, - 0x2cbc: 0x008a, 0x2cbe: 0x008a, - // Block 0xb3, offset 0x2cc0 - 0x2cc0: 0x008a, 0x2cc1: 0x008a, 0x2cc3: 0x008a, 0x2cc4: 0x008a, - 0x2cc6: 0x008a, 0x2cc7: 0x008a, 0x2cc8: 0x008a, 0x2cc9: 0x008a, 0x2cca: 0x008a, 0x2ccb: 0x008a, - 0x2ccc: 0x008a, 0x2ccd: 0x008a, 0x2cce: 0x008a, 0x2ccf: 0x008a, 0x2cd0: 0x0080, 0x2cd1: 0x0080, - 0x2cd2: 0x0080, 0x2cd3: 0x0080, 0x2cd4: 0x0080, 0x2cd5: 0x0080, 0x2cd6: 0x0080, 0x2cd7: 0x0080, - 0x2cd8: 0x0080, 0x2cd9: 0x0080, 0x2cda: 0x0080, 0x2cdb: 0x0080, 0x2cdc: 0x0080, 0x2cdd: 0x0080, - 0x2cde: 0x0080, 0x2cdf: 0x0080, 0x2ce0: 0x0080, 0x2ce1: 0x0080, 0x2ce2: 0x0080, 0x2ce3: 0x0080, - 0x2ce4: 0x0080, 0x2ce5: 0x0080, 0x2ce6: 0x0080, 0x2ce7: 0x0080, 0x2ce8: 0x0080, 0x2ce9: 0x0080, - 0x2cea: 0x0080, 0x2ceb: 0x0080, 0x2cec: 0x0080, 0x2ced: 0x0080, 0x2cee: 0x0080, 0x2cef: 0x0080, - 0x2cf0: 0x0080, 0x2cf1: 0x0080, 0x2cf2: 0x0080, 0x2cf3: 0x0080, 0x2cf4: 0x0080, 0x2cf5: 0x0080, - 0x2cf6: 0x0080, 0x2cf7: 0x0080, 0x2cf8: 0x0080, 0x2cf9: 0x0080, 0x2cfa: 0x0080, 0x2cfb: 0x0080, - 0x2cfc: 0x0080, 0x2cfd: 0x0080, 0x2cfe: 0x0080, 0x2cff: 0x0080, - // Block 0xb4, offset 0x2d00 - 0x2d00: 0x0080, 0x2d01: 0x0080, - 0x2d13: 0x0080, 0x2d14: 0x0080, 0x2d15: 0x0080, 0x2d16: 0x0080, 0x2d17: 0x0080, - 0x2d18: 0x0080, 0x2d19: 0x0080, 0x2d1a: 0x0080, 0x2d1b: 0x0080, 0x2d1c: 0x0080, 0x2d1d: 0x0080, - 0x2d1e: 0x0080, 0x2d1f: 0x0080, 0x2d20: 0x0080, 0x2d21: 0x0080, 0x2d22: 0x0080, 0x2d23: 0x0080, - 0x2d24: 0x0080, 0x2d25: 0x0080, 0x2d26: 0x0080, 0x2d27: 0x0080, 0x2d28: 0x0080, 0x2d29: 0x0080, - 0x2d2a: 0x0080, 0x2d2b: 0x0080, 0x2d2c: 0x0080, 0x2d2d: 0x0080, 0x2d2e: 0x0080, 0x2d2f: 0x0080, - 0x2d30: 0x0080, 0x2d31: 0x0080, 0x2d32: 0x0080, 0x2d33: 0x0080, 0x2d34: 0x0080, 0x2d35: 0x0080, - 0x2d36: 0x0080, 0x2d37: 0x0080, 0x2d38: 0x0080, 0x2d39: 0x0080, 0x2d3a: 0x0080, 0x2d3b: 0x0080, - 0x2d3c: 0x0080, 0x2d3d: 0x0080, 0x2d3e: 0x0080, 0x2d3f: 0x0080, - // Block 0xb5, offset 0x2d40 - 0x2d50: 0x0080, 0x2d51: 0x0080, - 0x2d52: 0x0080, 0x2d53: 0x0080, 0x2d54: 0x0080, 0x2d55: 0x0080, 0x2d56: 0x0080, 0x2d57: 0x0080, - 0x2d58: 0x0080, 0x2d59: 0x0080, 0x2d5a: 0x0080, 0x2d5b: 0x0080, 0x2d5c: 0x0080, 0x2d5d: 0x0080, - 0x2d5e: 0x0080, 0x2d5f: 0x0080, 0x2d60: 0x0080, 0x2d61: 0x0080, 0x2d62: 0x0080, 0x2d63: 0x0080, - 0x2d64: 0x0080, 0x2d65: 0x0080, 0x2d66: 0x0080, 0x2d67: 0x0080, 0x2d68: 0x0080, 0x2d69: 0x0080, - 0x2d6a: 0x0080, 0x2d6b: 0x0080, 0x2d6c: 0x0080, 0x2d6d: 0x0080, 0x2d6e: 0x0080, 0x2d6f: 0x0080, - 0x2d70: 0x0080, 0x2d71: 0x0080, 0x2d72: 0x0080, 0x2d73: 0x0080, 0x2d74: 0x0080, 0x2d75: 0x0080, - 0x2d76: 0x0080, 0x2d77: 0x0080, 0x2d78: 0x0080, 0x2d79: 0x0080, 0x2d7a: 0x0080, 0x2d7b: 0x0080, - 0x2d7c: 0x0080, 0x2d7d: 0x0080, 0x2d7e: 0x0080, 0x2d7f: 0x0080, - // Block 0xb6, offset 0x2d80 - 0x2d80: 0x0080, 0x2d81: 0x0080, 0x2d82: 0x0080, 0x2d83: 0x0080, 0x2d84: 0x0080, 0x2d85: 0x0080, - 0x2d86: 0x0080, 0x2d87: 0x0080, 0x2d88: 0x0080, 0x2d89: 0x0080, 0x2d8a: 0x0080, 0x2d8b: 0x0080, - 0x2d8c: 0x0080, 0x2d8d: 0x0080, 0x2d8e: 0x0080, 0x2d8f: 0x0080, - 0x2d92: 0x0080, 0x2d93: 0x0080, 0x2d94: 0x0080, 0x2d95: 0x0080, 0x2d96: 0x0080, 0x2d97: 0x0080, - 0x2d98: 0x0080, 0x2d99: 0x0080, 0x2d9a: 0x0080, 0x2d9b: 0x0080, 0x2d9c: 0x0080, 0x2d9d: 0x0080, - 0x2d9e: 0x0080, 0x2d9f: 0x0080, 0x2da0: 0x0080, 0x2da1: 0x0080, 0x2da2: 0x0080, 0x2da3: 0x0080, - 0x2da4: 0x0080, 0x2da5: 0x0080, 0x2da6: 0x0080, 0x2da7: 0x0080, 0x2da8: 0x0080, 0x2da9: 0x0080, - 0x2daa: 0x0080, 0x2dab: 0x0080, 0x2dac: 0x0080, 0x2dad: 0x0080, 0x2dae: 0x0080, 0x2daf: 0x0080, - 0x2db0: 0x0080, 0x2db1: 0x0080, 0x2db2: 0x0080, 0x2db3: 0x0080, 0x2db4: 0x0080, 0x2db5: 0x0080, - 0x2db6: 0x0080, 0x2db7: 0x0080, 0x2db8: 0x0080, 0x2db9: 0x0080, 0x2dba: 0x0080, 0x2dbb: 0x0080, - 0x2dbc: 0x0080, 0x2dbd: 0x0080, 0x2dbe: 0x0080, 0x2dbf: 0x0080, - // Block 0xb7, offset 0x2dc0 - 0x2dc0: 0x0080, 0x2dc1: 0x0080, 0x2dc2: 0x0080, 0x2dc3: 0x0080, 0x2dc4: 0x0080, 0x2dc5: 0x0080, - 0x2dc6: 0x0080, 0x2dc7: 0x0080, - 0x2df0: 0x0080, 0x2df1: 0x0080, 0x2df2: 0x0080, 0x2df3: 0x0080, 0x2df4: 0x0080, 0x2df5: 0x0080, - 0x2df6: 0x0080, 0x2df7: 0x0080, 0x2df8: 0x0080, 0x2df9: 0x0080, 0x2dfa: 0x0080, 0x2dfb: 0x0080, - 0x2dfc: 0x0080, 0x2dfd: 0x0080, - // Block 0xb8, offset 0x2e00 - 0x2e00: 0x0040, 0x2e01: 0x0040, 0x2e02: 0x0040, 0x2e03: 0x0040, 0x2e04: 0x0040, 0x2e05: 0x0040, - 0x2e06: 0x0040, 0x2e07: 0x0040, 0x2e08: 0x0040, 0x2e09: 0x0040, 0x2e0a: 0x0040, 0x2e0b: 0x0040, - 0x2e0c: 0x0040, 0x2e0d: 0x0040, 0x2e0e: 0x0040, 0x2e0f: 0x0040, 0x2e10: 0x0080, 0x2e11: 0x0080, - 0x2e12: 0x0080, 0x2e13: 0x0080, 0x2e14: 0x0080, 0x2e15: 0x0080, 0x2e16: 0x0080, 0x2e17: 0x0080, - 0x2e18: 0x0080, 0x2e19: 0x0080, - 0x2e20: 0x00c3, 0x2e21: 0x00c3, 0x2e22: 0x00c3, 0x2e23: 0x00c3, - 0x2e24: 0x00c3, 0x2e25: 0x00c3, 0x2e26: 0x00c3, 0x2e27: 0x00c3, 0x2e28: 0x00c3, 0x2e29: 0x00c3, - 0x2e2a: 0x00c3, 0x2e2b: 0x00c3, 0x2e2c: 0x00c3, 0x2e2d: 0x00c3, 0x2e2e: 0x00c3, 0x2e2f: 0x00c3, - 0x2e30: 0x0080, 0x2e31: 0x0080, 0x2e32: 0x0080, 0x2e33: 0x0080, 0x2e34: 0x0080, 0x2e35: 0x0080, - 0x2e36: 0x0080, 0x2e37: 0x0080, 0x2e38: 0x0080, 0x2e39: 0x0080, 0x2e3a: 0x0080, 0x2e3b: 0x0080, - 0x2e3c: 0x0080, 0x2e3d: 0x0080, 0x2e3e: 0x0080, 0x2e3f: 0x0080, - // Block 0xb9, offset 0x2e40 - 0x2e40: 0x0080, 0x2e41: 0x0080, 0x2e42: 0x0080, 0x2e43: 0x0080, 0x2e44: 0x0080, 0x2e45: 0x0080, - 0x2e46: 0x0080, 0x2e47: 0x0080, 0x2e48: 0x0080, 0x2e49: 0x0080, 0x2e4a: 0x0080, 0x2e4b: 0x0080, - 0x2e4c: 0x0080, 0x2e4d: 0x0080, 0x2e4e: 0x0080, 0x2e4f: 0x0080, 0x2e50: 0x0080, 0x2e51: 0x0080, - 0x2e52: 0x0080, 0x2e54: 0x0080, 0x2e55: 0x0080, 0x2e56: 0x0080, 0x2e57: 0x0080, - 0x2e58: 0x0080, 0x2e59: 0x0080, 0x2e5a: 0x0080, 0x2e5b: 0x0080, 0x2e5c: 0x0080, 0x2e5d: 0x0080, - 0x2e5e: 0x0080, 0x2e5f: 0x0080, 0x2e60: 0x0080, 0x2e61: 0x0080, 0x2e62: 0x0080, 0x2e63: 0x0080, - 0x2e64: 0x0080, 0x2e65: 0x0080, 0x2e66: 0x0080, 0x2e68: 0x0080, 0x2e69: 0x0080, - 0x2e6a: 0x0080, 0x2e6b: 0x0080, - 0x2e70: 0x0080, 0x2e71: 0x0080, 0x2e72: 0x0080, 0x2e73: 0x00c0, 0x2e74: 0x0080, - 0x2e76: 0x0080, 0x2e77: 0x0080, 0x2e78: 0x0080, 0x2e79: 0x0080, 0x2e7a: 0x0080, 0x2e7b: 0x0080, - 0x2e7c: 0x0080, 0x2e7d: 0x0080, 0x2e7e: 0x0080, 0x2e7f: 0x0080, - // Block 0xba, offset 0x2e80 - 0x2e80: 0x0080, 0x2e81: 0x0080, 0x2e82: 0x0080, 0x2e83: 0x0080, 0x2e84: 0x0080, 0x2e85: 0x0080, - 0x2e86: 0x0080, 0x2e87: 0x0080, 0x2e88: 0x0080, 0x2e89: 0x0080, 0x2e8a: 0x0080, 0x2e8b: 0x0080, - 0x2e8c: 0x0080, 0x2e8d: 0x0080, 0x2e8e: 0x0080, 0x2e8f: 0x0080, 0x2e90: 0x0080, 0x2e91: 0x0080, - 0x2e92: 0x0080, 0x2e93: 0x0080, 0x2e94: 0x0080, 0x2e95: 0x0080, 0x2e96: 0x0080, 0x2e97: 0x0080, - 0x2e98: 0x0080, 0x2e99: 0x0080, 0x2e9a: 0x0080, 0x2e9b: 0x0080, 0x2e9c: 0x0080, 0x2e9d: 0x0080, - 0x2e9e: 0x0080, 0x2e9f: 0x0080, 0x2ea0: 0x0080, 0x2ea1: 0x0080, 0x2ea2: 0x0080, 0x2ea3: 0x0080, - 0x2ea4: 0x0080, 0x2ea5: 0x0080, 0x2ea6: 0x0080, 0x2ea7: 0x0080, 0x2ea8: 0x0080, 0x2ea9: 0x0080, - 0x2eaa: 0x0080, 0x2eab: 0x0080, 0x2eac: 0x0080, 0x2ead: 0x0080, 0x2eae: 0x0080, 0x2eaf: 0x0080, - 0x2eb0: 0x0080, 0x2eb1: 0x0080, 0x2eb2: 0x0080, 0x2eb3: 0x0080, 0x2eb4: 0x0080, 0x2eb5: 0x0080, - 0x2eb6: 0x0080, 0x2eb7: 0x0080, 0x2eb8: 0x0080, 0x2eb9: 0x0080, 0x2eba: 0x0080, 0x2ebb: 0x0080, - 0x2ebc: 0x0080, 0x2ebf: 0x0040, - // Block 0xbb, offset 0x2ec0 - 0x2ec1: 0x0080, 0x2ec2: 0x0080, 0x2ec3: 0x0080, 0x2ec4: 0x0080, 0x2ec5: 0x0080, - 0x2ec6: 0x0080, 0x2ec7: 0x0080, 0x2ec8: 0x0080, 0x2ec9: 0x0080, 0x2eca: 0x0080, 0x2ecb: 0x0080, - 0x2ecc: 0x0080, 0x2ecd: 0x0080, 0x2ece: 0x0080, 0x2ecf: 0x0080, 0x2ed0: 0x0080, 0x2ed1: 0x0080, - 0x2ed2: 0x0080, 0x2ed3: 0x0080, 0x2ed4: 0x0080, 0x2ed5: 0x0080, 0x2ed6: 0x0080, 0x2ed7: 0x0080, - 0x2ed8: 0x0080, 0x2ed9: 0x0080, 0x2eda: 0x0080, 0x2edb: 0x0080, 0x2edc: 0x0080, 0x2edd: 0x0080, - 0x2ede: 0x0080, 0x2edf: 0x0080, 0x2ee0: 0x0080, 0x2ee1: 0x0080, 0x2ee2: 0x0080, 0x2ee3: 0x0080, - 0x2ee4: 0x0080, 0x2ee5: 0x0080, 0x2ee6: 0x0080, 0x2ee7: 0x0080, 0x2ee8: 0x0080, 0x2ee9: 0x0080, - 0x2eea: 0x0080, 0x2eeb: 0x0080, 0x2eec: 0x0080, 0x2eed: 0x0080, 0x2eee: 0x0080, 0x2eef: 0x0080, - 0x2ef0: 0x0080, 0x2ef1: 0x0080, 0x2ef2: 0x0080, 0x2ef3: 0x0080, 0x2ef4: 0x0080, 0x2ef5: 0x0080, - 0x2ef6: 0x0080, 0x2ef7: 0x0080, 0x2ef8: 0x0080, 0x2ef9: 0x0080, 0x2efa: 0x0080, 0x2efb: 0x0080, - 0x2efc: 0x0080, 0x2efd: 0x0080, 0x2efe: 0x0080, 0x2eff: 0x0080, - // Block 0xbc, offset 0x2f00 - 0x2f00: 0x0080, 0x2f01: 0x0080, 0x2f02: 0x0080, 0x2f03: 0x0080, 0x2f04: 0x0080, 0x2f05: 0x0080, - 0x2f06: 0x0080, 0x2f07: 0x0080, 0x2f08: 0x0080, 0x2f09: 0x0080, 0x2f0a: 0x0080, 0x2f0b: 0x0080, - 0x2f0c: 0x0080, 0x2f0d: 0x0080, 0x2f0e: 0x0080, 0x2f0f: 0x0080, 0x2f10: 0x0080, 0x2f11: 0x0080, - 0x2f12: 0x0080, 0x2f13: 0x0080, 0x2f14: 0x0080, 0x2f15: 0x0080, 0x2f16: 0x0080, 0x2f17: 0x0080, - 0x2f18: 0x0080, 0x2f19: 0x0080, 0x2f1a: 0x0080, 0x2f1b: 0x0080, 0x2f1c: 0x0080, 0x2f1d: 0x0080, - 0x2f1e: 0x0080, 0x2f1f: 0x0080, 0x2f20: 0x0080, 0x2f21: 0x0080, 0x2f22: 0x0080, 0x2f23: 0x0080, - 0x2f24: 0x0080, 0x2f25: 0x0080, 0x2f26: 0x008c, 0x2f27: 0x008c, 0x2f28: 0x008c, 0x2f29: 0x008c, - 0x2f2a: 0x008c, 0x2f2b: 0x008c, 0x2f2c: 0x008c, 0x2f2d: 0x008c, 0x2f2e: 0x008c, 0x2f2f: 0x008c, - 0x2f30: 0x0080, 0x2f31: 0x008c, 0x2f32: 0x008c, 0x2f33: 0x008c, 0x2f34: 0x008c, 0x2f35: 0x008c, - 0x2f36: 0x008c, 0x2f37: 0x008c, 0x2f38: 0x008c, 0x2f39: 0x008c, 0x2f3a: 0x008c, 0x2f3b: 0x008c, - 0x2f3c: 0x008c, 0x2f3d: 0x008c, 0x2f3e: 0x008c, 0x2f3f: 0x008c, - // Block 0xbd, offset 0x2f40 - 0x2f40: 0x008c, 0x2f41: 0x008c, 0x2f42: 0x008c, 0x2f43: 0x008c, 0x2f44: 0x008c, 0x2f45: 0x008c, - 0x2f46: 0x008c, 0x2f47: 0x008c, 0x2f48: 0x008c, 0x2f49: 0x008c, 0x2f4a: 0x008c, 0x2f4b: 0x008c, - 0x2f4c: 0x008c, 0x2f4d: 0x008c, 0x2f4e: 0x008c, 0x2f4f: 0x008c, 0x2f50: 0x008c, 0x2f51: 0x008c, - 0x2f52: 0x008c, 0x2f53: 0x008c, 0x2f54: 0x008c, 0x2f55: 0x008c, 0x2f56: 0x008c, 0x2f57: 0x008c, - 0x2f58: 0x008c, 0x2f59: 0x008c, 0x2f5a: 0x008c, 0x2f5b: 0x008c, 0x2f5c: 0x008c, 0x2f5d: 0x008c, - 0x2f5e: 0x0080, 0x2f5f: 0x0080, 0x2f60: 0x0040, 0x2f61: 0x0080, 0x2f62: 0x0080, 0x2f63: 0x0080, - 0x2f64: 0x0080, 0x2f65: 0x0080, 0x2f66: 0x0080, 0x2f67: 0x0080, 0x2f68: 0x0080, 0x2f69: 0x0080, - 0x2f6a: 0x0080, 0x2f6b: 0x0080, 0x2f6c: 0x0080, 0x2f6d: 0x0080, 0x2f6e: 0x0080, 0x2f6f: 0x0080, - 0x2f70: 0x0080, 0x2f71: 0x0080, 0x2f72: 0x0080, 0x2f73: 0x0080, 0x2f74: 0x0080, 0x2f75: 0x0080, - 0x2f76: 0x0080, 0x2f77: 0x0080, 0x2f78: 0x0080, 0x2f79: 0x0080, 0x2f7a: 0x0080, 0x2f7b: 0x0080, - 0x2f7c: 0x0080, 0x2f7d: 0x0080, 0x2f7e: 0x0080, - // Block 0xbe, offset 0x2f80 - 0x2f82: 0x0080, 0x2f83: 0x0080, 0x2f84: 0x0080, 0x2f85: 0x0080, - 0x2f86: 0x0080, 0x2f87: 0x0080, 0x2f8a: 0x0080, 0x2f8b: 0x0080, - 0x2f8c: 0x0080, 0x2f8d: 0x0080, 0x2f8e: 0x0080, 0x2f8f: 0x0080, - 0x2f92: 0x0080, 0x2f93: 0x0080, 0x2f94: 0x0080, 0x2f95: 0x0080, 0x2f96: 0x0080, 0x2f97: 0x0080, - 0x2f9a: 0x0080, 0x2f9b: 0x0080, 0x2f9c: 0x0080, - 0x2fa0: 0x0080, 0x2fa1: 0x0080, 0x2fa2: 0x0080, 0x2fa3: 0x0080, - 0x2fa4: 0x0080, 0x2fa5: 0x0080, 0x2fa6: 0x0080, 0x2fa8: 0x0080, 0x2fa9: 0x0080, - 0x2faa: 0x0080, 0x2fab: 0x0080, 0x2fac: 0x0080, 0x2fad: 0x0080, 0x2fae: 0x0080, - 0x2fb9: 0x0040, 0x2fba: 0x0040, 0x2fbb: 0x0040, - 0x2fbc: 0x0080, 0x2fbd: 0x0080, - // Block 0xbf, offset 0x2fc0 - 0x2fc0: 0x00c0, 0x2fc1: 0x00c0, 0x2fc2: 0x00c0, 0x2fc3: 0x00c0, 0x2fc4: 0x00c0, 0x2fc5: 0x00c0, - 0x2fc6: 0x00c0, 0x2fc7: 0x00c0, 0x2fc8: 0x00c0, 0x2fc9: 0x00c0, 0x2fca: 0x00c0, 0x2fcb: 0x00c0, - 0x2fcd: 0x00c0, 0x2fce: 0x00c0, 0x2fcf: 0x00c0, 0x2fd0: 0x00c0, 0x2fd1: 0x00c0, - 0x2fd2: 0x00c0, 0x2fd3: 0x00c0, 0x2fd4: 0x00c0, 0x2fd5: 0x00c0, 0x2fd6: 0x00c0, 0x2fd7: 0x00c0, - 0x2fd8: 0x00c0, 0x2fd9: 0x00c0, 0x2fda: 0x00c0, 0x2fdb: 0x00c0, 0x2fdc: 0x00c0, 0x2fdd: 0x00c0, - 0x2fde: 0x00c0, 0x2fdf: 0x00c0, 0x2fe0: 0x00c0, 0x2fe1: 0x00c0, 0x2fe2: 0x00c0, 0x2fe3: 0x00c0, - 0x2fe4: 0x00c0, 0x2fe5: 0x00c0, 0x2fe6: 0x00c0, 0x2fe8: 0x00c0, 0x2fe9: 0x00c0, - 0x2fea: 0x00c0, 0x2feb: 0x00c0, 0x2fec: 0x00c0, 0x2fed: 0x00c0, 0x2fee: 0x00c0, 0x2fef: 0x00c0, - 0x2ff0: 0x00c0, 0x2ff1: 0x00c0, 0x2ff2: 0x00c0, 0x2ff3: 0x00c0, 0x2ff4: 0x00c0, 0x2ff5: 0x00c0, - 0x2ff6: 0x00c0, 0x2ff7: 0x00c0, 0x2ff8: 0x00c0, 0x2ff9: 0x00c0, 0x2ffa: 0x00c0, - 0x2ffc: 0x00c0, 0x2ffd: 0x00c0, 0x2fff: 0x00c0, - // Block 0xc0, offset 0x3000 - 0x3000: 0x00c0, 0x3001: 0x00c0, 0x3002: 0x00c0, 0x3003: 0x00c0, 0x3004: 0x00c0, 0x3005: 0x00c0, - 0x3006: 0x00c0, 0x3007: 0x00c0, 0x3008: 0x00c0, 0x3009: 0x00c0, 0x300a: 0x00c0, 0x300b: 0x00c0, - 0x300c: 0x00c0, 0x300d: 0x00c0, 0x3010: 0x00c0, 0x3011: 0x00c0, - 0x3012: 0x00c0, 0x3013: 0x00c0, 0x3014: 0x00c0, 0x3015: 0x00c0, 0x3016: 0x00c0, 0x3017: 0x00c0, - 0x3018: 0x00c0, 0x3019: 0x00c0, 0x301a: 0x00c0, 0x301b: 0x00c0, 0x301c: 0x00c0, 0x301d: 0x00c0, - // Block 0xc1, offset 0x3040 - 0x3040: 0x00c0, 0x3041: 0x00c0, 0x3042: 0x00c0, 0x3043: 0x00c0, 0x3044: 0x00c0, 0x3045: 0x00c0, - 0x3046: 0x00c0, 0x3047: 0x00c0, 0x3048: 0x00c0, 0x3049: 0x00c0, 0x304a: 0x00c0, 0x304b: 0x00c0, - 0x304c: 0x00c0, 0x304d: 0x00c0, 0x304e: 0x00c0, 0x304f: 0x00c0, 0x3050: 0x00c0, 0x3051: 0x00c0, - 0x3052: 0x00c0, 0x3053: 0x00c0, 0x3054: 0x00c0, 0x3055: 0x00c0, 0x3056: 0x00c0, 0x3057: 0x00c0, - 0x3058: 0x00c0, 0x3059: 0x00c0, 0x305a: 0x00c0, 0x305b: 0x00c0, 0x305c: 0x00c0, 0x305d: 0x00c0, - 0x305e: 0x00c0, 0x305f: 0x00c0, 0x3060: 0x00c0, 0x3061: 0x00c0, 0x3062: 0x00c0, 0x3063: 0x00c0, - 0x3064: 0x00c0, 0x3065: 0x00c0, 0x3066: 0x00c0, 0x3067: 0x00c0, 0x3068: 0x00c0, 0x3069: 0x00c0, - 0x306a: 0x00c0, 0x306b: 0x00c0, 0x306c: 0x00c0, 0x306d: 0x00c0, 0x306e: 0x00c0, 0x306f: 0x00c0, - 0x3070: 0x00c0, 0x3071: 0x00c0, 0x3072: 0x00c0, 0x3073: 0x00c0, 0x3074: 0x00c0, 0x3075: 0x00c0, - 0x3076: 0x00c0, 0x3077: 0x00c0, 0x3078: 0x00c0, 0x3079: 0x00c0, 0x307a: 0x00c0, - // Block 0xc2, offset 0x3080 - 0x3080: 0x0080, 0x3081: 0x0080, 0x3082: 0x0080, - 0x3087: 0x0080, 0x3088: 0x0080, 0x3089: 0x0080, 0x308a: 0x0080, 0x308b: 0x0080, - 0x308c: 0x0080, 0x308d: 0x0080, 0x308e: 0x0080, 0x308f: 0x0080, 0x3090: 0x0080, 0x3091: 0x0080, - 0x3092: 0x0080, 0x3093: 0x0080, 0x3094: 0x0080, 0x3095: 0x0080, 0x3096: 0x0080, 0x3097: 0x0080, - 0x3098: 0x0080, 0x3099: 0x0080, 0x309a: 0x0080, 0x309b: 0x0080, 0x309c: 0x0080, 0x309d: 0x0080, - 0x309e: 0x0080, 0x309f: 0x0080, 0x30a0: 0x0080, 0x30a1: 0x0080, 0x30a2: 0x0080, 0x30a3: 0x0080, - 0x30a4: 0x0080, 0x30a5: 0x0080, 0x30a6: 0x0080, 0x30a7: 0x0080, 0x30a8: 0x0080, 0x30a9: 0x0080, - 0x30aa: 0x0080, 0x30ab: 0x0080, 0x30ac: 0x0080, 0x30ad: 0x0080, 0x30ae: 0x0080, 0x30af: 0x0080, - 0x30b0: 0x0080, 0x30b1: 0x0080, 0x30b2: 0x0080, 0x30b3: 0x0080, - 0x30b7: 0x0080, 0x30b8: 0x0080, 0x30b9: 0x0080, 0x30ba: 0x0080, 0x30bb: 0x0080, - 0x30bc: 0x0080, 0x30bd: 0x0080, 0x30be: 0x0080, 0x30bf: 0x0080, - // Block 0xc3, offset 0x30c0 - 0x30c0: 0x0088, 0x30c1: 0x0088, 0x30c2: 0x0088, 0x30c3: 0x0088, 0x30c4: 0x0088, 0x30c5: 0x0088, - 0x30c6: 0x0088, 0x30c7: 0x0088, 0x30c8: 0x0088, 0x30c9: 0x0088, 0x30ca: 0x0088, 0x30cb: 0x0088, - 0x30cc: 0x0088, 0x30cd: 0x0088, 0x30ce: 0x0088, 0x30cf: 0x0088, 0x30d0: 0x0088, 0x30d1: 0x0088, - 0x30d2: 0x0088, 0x30d3: 0x0088, 0x30d4: 0x0088, 0x30d5: 0x0088, 0x30d6: 0x0088, 0x30d7: 0x0088, - 0x30d8: 0x0088, 0x30d9: 0x0088, 0x30da: 0x0088, 0x30db: 0x0088, 0x30dc: 0x0088, 0x30dd: 0x0088, - 0x30de: 0x0088, 0x30df: 0x0088, 0x30e0: 0x0088, 0x30e1: 0x0088, 0x30e2: 0x0088, 0x30e3: 0x0088, - 0x30e4: 0x0088, 0x30e5: 0x0088, 0x30e6: 0x0088, 0x30e7: 0x0088, 0x30e8: 0x0088, 0x30e9: 0x0088, - 0x30ea: 0x0088, 0x30eb: 0x0088, 0x30ec: 0x0088, 0x30ed: 0x0088, 0x30ee: 0x0088, 0x30ef: 0x0088, - 0x30f0: 0x0088, 0x30f1: 0x0088, 0x30f2: 0x0088, 0x30f3: 0x0088, 0x30f4: 0x0088, 0x30f5: 0x0088, - 0x30f6: 0x0088, 0x30f7: 0x0088, 0x30f8: 0x0088, 0x30f9: 0x0088, 0x30fa: 0x0088, 0x30fb: 0x0088, - 0x30fc: 0x0088, 0x30fd: 0x0088, 0x30fe: 0x0088, 0x30ff: 0x0088, - // Block 0xc4, offset 0x3100 - 0x3100: 0x0088, 0x3101: 0x0088, 0x3102: 0x0088, 0x3103: 0x0088, 0x3104: 0x0088, 0x3105: 0x0088, - 0x3106: 0x0088, 0x3107: 0x0088, 0x3108: 0x0088, 0x3109: 0x0088, 0x310a: 0x0088, 0x310b: 0x0088, - 0x310c: 0x0088, 0x310d: 0x0088, 0x310e: 0x0088, 0x3110: 0x0080, 0x3111: 0x0080, - 0x3112: 0x0080, 0x3113: 0x0080, 0x3114: 0x0080, 0x3115: 0x0080, 0x3116: 0x0080, 0x3117: 0x0080, - 0x3118: 0x0080, 0x3119: 0x0080, 0x311a: 0x0080, 0x311b: 0x0080, - 0x3120: 0x0088, - // Block 0xc5, offset 0x3140 - 0x3150: 0x0080, 0x3151: 0x0080, - 0x3152: 0x0080, 0x3153: 0x0080, 0x3154: 0x0080, 0x3155: 0x0080, 0x3156: 0x0080, 0x3157: 0x0080, - 0x3158: 0x0080, 0x3159: 0x0080, 0x315a: 0x0080, 0x315b: 0x0080, 0x315c: 0x0080, 0x315d: 0x0080, - 0x315e: 0x0080, 0x315f: 0x0080, 0x3160: 0x0080, 0x3161: 0x0080, 0x3162: 0x0080, 0x3163: 0x0080, - 0x3164: 0x0080, 0x3165: 0x0080, 0x3166: 0x0080, 0x3167: 0x0080, 0x3168: 0x0080, 0x3169: 0x0080, - 0x316a: 0x0080, 0x316b: 0x0080, 0x316c: 0x0080, 0x316d: 0x0080, 0x316e: 0x0080, 0x316f: 0x0080, - 0x3170: 0x0080, 0x3171: 0x0080, 0x3172: 0x0080, 0x3173: 0x0080, 0x3174: 0x0080, 0x3175: 0x0080, - 0x3176: 0x0080, 0x3177: 0x0080, 0x3178: 0x0080, 0x3179: 0x0080, 0x317a: 0x0080, 0x317b: 0x0080, - 0x317c: 0x0080, 0x317d: 0x00c3, - // Block 0xc6, offset 0x3180 - 0x3180: 0x00c0, 0x3181: 0x00c0, 0x3182: 0x00c0, 0x3183: 0x00c0, 0x3184: 0x00c0, 0x3185: 0x00c0, - 0x3186: 0x00c0, 0x3187: 0x00c0, 0x3188: 0x00c0, 0x3189: 0x00c0, 0x318a: 0x00c0, 0x318b: 0x00c0, - 0x318c: 0x00c0, 0x318d: 0x00c0, 0x318e: 0x00c0, 0x318f: 0x00c0, 0x3190: 0x00c0, 0x3191: 0x00c0, - 0x3192: 0x00c0, 0x3193: 0x00c0, 0x3194: 0x00c0, 0x3195: 0x00c0, 0x3196: 0x00c0, 0x3197: 0x00c0, - 0x3198: 0x00c0, 0x3199: 0x00c0, 0x319a: 0x00c0, 0x319b: 0x00c0, 0x319c: 0x00c0, - 0x31a0: 0x00c0, 0x31a1: 0x00c0, 0x31a2: 0x00c0, 0x31a3: 0x00c0, - 0x31a4: 0x00c0, 0x31a5: 0x00c0, 0x31a6: 0x00c0, 0x31a7: 0x00c0, 0x31a8: 0x00c0, 0x31a9: 0x00c0, - 0x31aa: 0x00c0, 0x31ab: 0x00c0, 0x31ac: 0x00c0, 0x31ad: 0x00c0, 0x31ae: 0x00c0, 0x31af: 0x00c0, - 0x31b0: 0x00c0, 0x31b1: 0x00c0, 0x31b2: 0x00c0, 0x31b3: 0x00c0, 0x31b4: 0x00c0, 0x31b5: 0x00c0, - 0x31b6: 0x00c0, 0x31b7: 0x00c0, 0x31b8: 0x00c0, 0x31b9: 0x00c0, 0x31ba: 0x00c0, 0x31bb: 0x00c0, - 0x31bc: 0x00c0, 0x31bd: 0x00c0, 0x31be: 0x00c0, 0x31bf: 0x00c0, - // Block 0xc7, offset 0x31c0 - 0x31c0: 0x00c0, 0x31c1: 0x00c0, 0x31c2: 0x00c0, 0x31c3: 0x00c0, 0x31c4: 0x00c0, 0x31c5: 0x00c0, - 0x31c6: 0x00c0, 0x31c7: 0x00c0, 0x31c8: 0x00c0, 0x31c9: 0x00c0, 0x31ca: 0x00c0, 0x31cb: 0x00c0, - 0x31cc: 0x00c0, 0x31cd: 0x00c0, 0x31ce: 0x00c0, 0x31cf: 0x00c0, 0x31d0: 0x00c0, - 0x31e0: 0x00c3, 0x31e1: 0x0080, 0x31e2: 0x0080, 0x31e3: 0x0080, - 0x31e4: 0x0080, 0x31e5: 0x0080, 0x31e6: 0x0080, 0x31e7: 0x0080, 0x31e8: 0x0080, 0x31e9: 0x0080, - 0x31ea: 0x0080, 0x31eb: 0x0080, 0x31ec: 0x0080, 0x31ed: 0x0080, 0x31ee: 0x0080, 0x31ef: 0x0080, - 0x31f0: 0x0080, 0x31f1: 0x0080, 0x31f2: 0x0080, 0x31f3: 0x0080, 0x31f4: 0x0080, 0x31f5: 0x0080, - 0x31f6: 0x0080, 0x31f7: 0x0080, 0x31f8: 0x0080, 0x31f9: 0x0080, 0x31fa: 0x0080, 0x31fb: 0x0080, - // Block 0xc8, offset 0x3200 - 0x3200: 0x00c0, 0x3201: 0x00c0, 0x3202: 0x00c0, 0x3203: 0x00c0, 0x3204: 0x00c0, 0x3205: 0x00c0, - 0x3206: 0x00c0, 0x3207: 0x00c0, 0x3208: 0x00c0, 0x3209: 0x00c0, 0x320a: 0x00c0, 0x320b: 0x00c0, - 0x320c: 0x00c0, 0x320d: 0x00c0, 0x320e: 0x00c0, 0x320f: 0x00c0, 0x3210: 0x00c0, 0x3211: 0x00c0, - 0x3212: 0x00c0, 0x3213: 0x00c0, 0x3214: 0x00c0, 0x3215: 0x00c0, 0x3216: 0x00c0, 0x3217: 0x00c0, - 0x3218: 0x00c0, 0x3219: 0x00c0, 0x321a: 0x00c0, 0x321b: 0x00c0, 0x321c: 0x00c0, 0x321d: 0x00c0, - 0x321e: 0x00c0, 0x321f: 0x00c0, 0x3220: 0x0080, 0x3221: 0x0080, 0x3222: 0x0080, 0x3223: 0x0080, - 0x3230: 0x00c0, 0x3231: 0x00c0, 0x3232: 0x00c0, 0x3233: 0x00c0, 0x3234: 0x00c0, 0x3235: 0x00c0, - 0x3236: 0x00c0, 0x3237: 0x00c0, 0x3238: 0x00c0, 0x3239: 0x00c0, 0x323a: 0x00c0, 0x323b: 0x00c0, - 0x323c: 0x00c0, 0x323d: 0x00c0, 0x323e: 0x00c0, 0x323f: 0x00c0, - // Block 0xc9, offset 0x3240 - 0x3240: 0x00c0, 0x3241: 0x0080, 0x3242: 0x00c0, 0x3243: 0x00c0, 0x3244: 0x00c0, 0x3245: 0x00c0, - 0x3246: 0x00c0, 0x3247: 0x00c0, 0x3248: 0x00c0, 0x3249: 0x00c0, 0x324a: 0x0080, - 0x3250: 0x00c0, 0x3251: 0x00c0, - 0x3252: 0x00c0, 0x3253: 0x00c0, 0x3254: 0x00c0, 0x3255: 0x00c0, 0x3256: 0x00c0, 0x3257: 0x00c0, - 0x3258: 0x00c0, 0x3259: 0x00c0, 0x325a: 0x00c0, 0x325b: 0x00c0, 0x325c: 0x00c0, 0x325d: 0x00c0, - 0x325e: 0x00c0, 0x325f: 0x00c0, 0x3260: 0x00c0, 0x3261: 0x00c0, 0x3262: 0x00c0, 0x3263: 0x00c0, - 0x3264: 0x00c0, 0x3265: 0x00c0, 0x3266: 0x00c0, 0x3267: 0x00c0, 0x3268: 0x00c0, 0x3269: 0x00c0, - 0x326a: 0x00c0, 0x326b: 0x00c0, 0x326c: 0x00c0, 0x326d: 0x00c0, 0x326e: 0x00c0, 0x326f: 0x00c0, - 0x3270: 0x00c0, 0x3271: 0x00c0, 0x3272: 0x00c0, 0x3273: 0x00c0, 0x3274: 0x00c0, 0x3275: 0x00c0, - 0x3276: 0x00c3, 0x3277: 0x00c3, 0x3278: 0x00c3, 0x3279: 0x00c3, 0x327a: 0x00c3, - // Block 0xca, offset 0x3280 - 0x3280: 0x00c0, 0x3281: 0x00c0, 0x3282: 0x00c0, 0x3283: 0x00c0, 0x3284: 0x00c0, 0x3285: 0x00c0, - 0x3286: 0x00c0, 0x3287: 0x00c0, 0x3288: 0x00c0, 0x3289: 0x00c0, 0x328a: 0x00c0, 0x328b: 0x00c0, - 0x328c: 0x00c0, 0x328d: 0x00c0, 0x328e: 0x00c0, 0x328f: 0x00c0, 0x3290: 0x00c0, 0x3291: 0x00c0, - 0x3292: 0x00c0, 0x3293: 0x00c0, 0x3294: 0x00c0, 0x3295: 0x00c0, 0x3296: 0x00c0, 0x3297: 0x00c0, - 0x3298: 0x00c0, 0x3299: 0x00c0, 0x329a: 0x00c0, 0x329b: 0x00c0, 0x329c: 0x00c0, 0x329d: 0x00c0, - 0x329f: 0x0080, 0x32a0: 0x00c0, 0x32a1: 0x00c0, 0x32a2: 0x00c0, 0x32a3: 0x00c0, - 0x32a4: 0x00c0, 0x32a5: 0x00c0, 0x32a6: 0x00c0, 0x32a7: 0x00c0, 0x32a8: 0x00c0, 0x32a9: 0x00c0, - 0x32aa: 0x00c0, 0x32ab: 0x00c0, 0x32ac: 0x00c0, 0x32ad: 0x00c0, 0x32ae: 0x00c0, 0x32af: 0x00c0, - 0x32b0: 0x00c0, 0x32b1: 0x00c0, 0x32b2: 0x00c0, 0x32b3: 0x00c0, 0x32b4: 0x00c0, 0x32b5: 0x00c0, - 0x32b6: 0x00c0, 0x32b7: 0x00c0, 0x32b8: 0x00c0, 0x32b9: 0x00c0, 0x32ba: 0x00c0, 0x32bb: 0x00c0, - 0x32bc: 0x00c0, 0x32bd: 0x00c0, 0x32be: 0x00c0, 0x32bf: 0x00c0, - // Block 0xcb, offset 0x32c0 - 0x32c0: 0x00c0, 0x32c1: 0x00c0, 0x32c2: 0x00c0, 0x32c3: 0x00c0, - 0x32c8: 0x00c0, 0x32c9: 0x00c0, 0x32ca: 0x00c0, 0x32cb: 0x00c0, - 0x32cc: 0x00c0, 0x32cd: 0x00c0, 0x32ce: 0x00c0, 0x32cf: 0x00c0, 0x32d0: 0x0080, 0x32d1: 0x0080, - 0x32d2: 0x0080, 0x32d3: 0x0080, 0x32d4: 0x0080, 0x32d5: 0x0080, - // Block 0xcc, offset 0x3300 - 0x3300: 0x00c0, 0x3301: 0x00c0, 0x3302: 0x00c0, 0x3303: 0x00c0, 0x3304: 0x00c0, 0x3305: 0x00c0, - 0x3306: 0x00c0, 0x3307: 0x00c0, 0x3308: 0x00c0, 0x3309: 0x00c0, 0x330a: 0x00c0, 0x330b: 0x00c0, - 0x330c: 0x00c0, 0x330d: 0x00c0, 0x330e: 0x00c0, 0x330f: 0x00c0, 0x3310: 0x00c0, 0x3311: 0x00c0, - 0x3312: 0x00c0, 0x3313: 0x00c0, 0x3314: 0x00c0, 0x3315: 0x00c0, 0x3316: 0x00c0, 0x3317: 0x00c0, - 0x3318: 0x00c0, 0x3319: 0x00c0, 0x331a: 0x00c0, 0x331b: 0x00c0, 0x331c: 0x00c0, 0x331d: 0x00c0, - 0x3320: 0x00c0, 0x3321: 0x00c0, 0x3322: 0x00c0, 0x3323: 0x00c0, - 0x3324: 0x00c0, 0x3325: 0x00c0, 0x3326: 0x00c0, 0x3327: 0x00c0, 0x3328: 0x00c0, 0x3329: 0x00c0, - 0x3330: 0x00c0, 0x3331: 0x00c0, 0x3332: 0x00c0, 0x3333: 0x00c0, 0x3334: 0x00c0, 0x3335: 0x00c0, - 0x3336: 0x00c0, 0x3337: 0x00c0, 0x3338: 0x00c0, 0x3339: 0x00c0, 0x333a: 0x00c0, 0x333b: 0x00c0, - 0x333c: 0x00c0, 0x333d: 0x00c0, 0x333e: 0x00c0, 0x333f: 0x00c0, - // Block 0xcd, offset 0x3340 - 0x3340: 0x00c0, 0x3341: 0x00c0, 0x3342: 0x00c0, 0x3343: 0x00c0, 0x3344: 0x00c0, 0x3345: 0x00c0, - 0x3346: 0x00c0, 0x3347: 0x00c0, 0x3348: 0x00c0, 0x3349: 0x00c0, 0x334a: 0x00c0, 0x334b: 0x00c0, - 0x334c: 0x00c0, 0x334d: 0x00c0, 0x334e: 0x00c0, 0x334f: 0x00c0, 0x3350: 0x00c0, 0x3351: 0x00c0, - 0x3352: 0x00c0, 0x3353: 0x00c0, - 0x3358: 0x00c0, 0x3359: 0x00c0, 0x335a: 0x00c0, 0x335b: 0x00c0, 0x335c: 0x00c0, 0x335d: 0x00c0, - 0x335e: 0x00c0, 0x335f: 0x00c0, 0x3360: 0x00c0, 0x3361: 0x00c0, 0x3362: 0x00c0, 0x3363: 0x00c0, - 0x3364: 0x00c0, 0x3365: 0x00c0, 0x3366: 0x00c0, 0x3367: 0x00c0, 0x3368: 0x00c0, 0x3369: 0x00c0, - 0x336a: 0x00c0, 0x336b: 0x00c0, 0x336c: 0x00c0, 0x336d: 0x00c0, 0x336e: 0x00c0, 0x336f: 0x00c0, - 0x3370: 0x00c0, 0x3371: 0x00c0, 0x3372: 0x00c0, 0x3373: 0x00c0, 0x3374: 0x00c0, 0x3375: 0x00c0, - 0x3376: 0x00c0, 0x3377: 0x00c0, 0x3378: 0x00c0, 0x3379: 0x00c0, 0x337a: 0x00c0, 0x337b: 0x00c0, - // Block 0xce, offset 0x3380 - 0x3380: 0x00c0, 0x3381: 0x00c0, 0x3382: 0x00c0, 0x3383: 0x00c0, 0x3384: 0x00c0, 0x3385: 0x00c0, - 0x3386: 0x00c0, 0x3387: 0x00c0, 0x3388: 0x00c0, 0x3389: 0x00c0, 0x338a: 0x00c0, 0x338b: 0x00c0, - 0x338c: 0x00c0, 0x338d: 0x00c0, 0x338e: 0x00c0, 0x338f: 0x00c0, 0x3390: 0x00c0, 0x3391: 0x00c0, - 0x3392: 0x00c0, 0x3393: 0x00c0, 0x3394: 0x00c0, 0x3395: 0x00c0, 0x3396: 0x00c0, 0x3397: 0x00c0, - 0x3398: 0x00c0, 0x3399: 0x00c0, 0x339a: 0x00c0, 0x339b: 0x00c0, 0x339c: 0x00c0, 0x339d: 0x00c0, - 0x339e: 0x00c0, 0x339f: 0x00c0, 0x33a0: 0x00c0, 0x33a1: 0x00c0, 0x33a2: 0x00c0, 0x33a3: 0x00c0, - 0x33a4: 0x00c0, 0x33a5: 0x00c0, 0x33a6: 0x00c0, 0x33a7: 0x00c0, - 0x33b0: 0x00c0, 0x33b1: 0x00c0, 0x33b2: 0x00c0, 0x33b3: 0x00c0, 0x33b4: 0x00c0, 0x33b5: 0x00c0, - 0x33b6: 0x00c0, 0x33b7: 0x00c0, 0x33b8: 0x00c0, 0x33b9: 0x00c0, 0x33ba: 0x00c0, 0x33bb: 0x00c0, - 0x33bc: 0x00c0, 0x33bd: 0x00c0, 0x33be: 0x00c0, 0x33bf: 0x00c0, - // Block 0xcf, offset 0x33c0 - 0x33c0: 0x00c0, 0x33c1: 0x00c0, 0x33c2: 0x00c0, 0x33c3: 0x00c0, 0x33c4: 0x00c0, 0x33c5: 0x00c0, - 0x33c6: 0x00c0, 0x33c7: 0x00c0, 0x33c8: 0x00c0, 0x33c9: 0x00c0, 0x33ca: 0x00c0, 0x33cb: 0x00c0, - 0x33cc: 0x00c0, 0x33cd: 0x00c0, 0x33ce: 0x00c0, 0x33cf: 0x00c0, 0x33d0: 0x00c0, 0x33d1: 0x00c0, - 0x33d2: 0x00c0, 0x33d3: 0x00c0, 0x33d4: 0x00c0, 0x33d5: 0x00c0, 0x33d6: 0x00c0, 0x33d7: 0x00c0, - 0x33d8: 0x00c0, 0x33d9: 0x00c0, 0x33da: 0x00c0, 0x33db: 0x00c0, 0x33dc: 0x00c0, 0x33dd: 0x00c0, - 0x33de: 0x00c0, 0x33df: 0x00c0, 0x33e0: 0x00c0, 0x33e1: 0x00c0, 0x33e2: 0x00c0, 0x33e3: 0x00c0, - 0x33ef: 0x0080, - // Block 0xd0, offset 0x3400 - 0x3400: 0x00c0, 0x3401: 0x00c0, 0x3402: 0x00c0, 0x3403: 0x00c0, 0x3404: 0x00c0, 0x3405: 0x00c0, - 0x3406: 0x00c0, 0x3407: 0x00c0, 0x3408: 0x00c0, 0x3409: 0x00c0, 0x340a: 0x00c0, 0x340b: 0x00c0, - 0x340c: 0x00c0, 0x340d: 0x00c0, 0x340e: 0x00c0, 0x340f: 0x00c0, 0x3410: 0x00c0, 0x3411: 0x00c0, - 0x3412: 0x00c0, 0x3413: 0x00c0, 0x3414: 0x00c0, 0x3415: 0x00c0, 0x3416: 0x00c0, 0x3417: 0x00c0, - 0x3418: 0x00c0, 0x3419: 0x00c0, 0x341a: 0x00c0, 0x341b: 0x00c0, 0x341c: 0x00c0, 0x341d: 0x00c0, - 0x341e: 0x00c0, 0x341f: 0x00c0, 0x3420: 0x00c0, 0x3421: 0x00c0, 0x3422: 0x00c0, 0x3423: 0x00c0, - 0x3424: 0x00c0, 0x3425: 0x00c0, 0x3426: 0x00c0, 0x3427: 0x00c0, 0x3428: 0x00c0, 0x3429: 0x00c0, - 0x342a: 0x00c0, 0x342b: 0x00c0, 0x342c: 0x00c0, 0x342d: 0x00c0, 0x342e: 0x00c0, 0x342f: 0x00c0, - 0x3430: 0x00c0, 0x3431: 0x00c0, 0x3432: 0x00c0, 0x3433: 0x00c0, 0x3434: 0x00c0, 0x3435: 0x00c0, - 0x3436: 0x00c0, - // Block 0xd1, offset 0x3440 - 0x3440: 0x00c0, 0x3441: 0x00c0, 0x3442: 0x00c0, 0x3443: 0x00c0, 0x3444: 0x00c0, 0x3445: 0x00c0, - 0x3446: 0x00c0, 0x3447: 0x00c0, 0x3448: 0x00c0, 0x3449: 0x00c0, 0x344a: 0x00c0, 0x344b: 0x00c0, - 0x344c: 0x00c0, 0x344d: 0x00c0, 0x344e: 0x00c0, 0x344f: 0x00c0, 0x3450: 0x00c0, 0x3451: 0x00c0, - 0x3452: 0x00c0, 0x3453: 0x00c0, 0x3454: 0x00c0, 0x3455: 0x00c0, - 0x3460: 0x00c0, 0x3461: 0x00c0, 0x3462: 0x00c0, 0x3463: 0x00c0, - 0x3464: 0x00c0, 0x3465: 0x00c0, 0x3466: 0x00c0, 0x3467: 0x00c0, - // Block 0xd2, offset 0x3480 - 0x3480: 0x00c0, 0x3481: 0x00c0, 0x3482: 0x00c0, 0x3483: 0x00c0, 0x3484: 0x00c0, 0x3485: 0x00c0, - 0x3488: 0x00c0, 0x348a: 0x00c0, 0x348b: 0x00c0, - 0x348c: 0x00c0, 0x348d: 0x00c0, 0x348e: 0x00c0, 0x348f: 0x00c0, 0x3490: 0x00c0, 0x3491: 0x00c0, - 0x3492: 0x00c0, 0x3493: 0x00c0, 0x3494: 0x00c0, 0x3495: 0x00c0, 0x3496: 0x00c0, 0x3497: 0x00c0, - 0x3498: 0x00c0, 0x3499: 0x00c0, 0x349a: 0x00c0, 0x349b: 0x00c0, 0x349c: 0x00c0, 0x349d: 0x00c0, - 0x349e: 0x00c0, 0x349f: 0x00c0, 0x34a0: 0x00c0, 0x34a1: 0x00c0, 0x34a2: 0x00c0, 0x34a3: 0x00c0, - 0x34a4: 0x00c0, 0x34a5: 0x00c0, 0x34a6: 0x00c0, 0x34a7: 0x00c0, 0x34a8: 0x00c0, 0x34a9: 0x00c0, - 0x34aa: 0x00c0, 0x34ab: 0x00c0, 0x34ac: 0x00c0, 0x34ad: 0x00c0, 0x34ae: 0x00c0, 0x34af: 0x00c0, - 0x34b0: 0x00c0, 0x34b1: 0x00c0, 0x34b2: 0x00c0, 0x34b3: 0x00c0, 0x34b4: 0x00c0, 0x34b5: 0x00c0, - 0x34b7: 0x00c0, 0x34b8: 0x00c0, - 0x34bc: 0x00c0, 0x34bf: 0x00c0, - // Block 0xd3, offset 0x34c0 - 0x34c0: 0x00c0, 0x34c1: 0x00c0, 0x34c2: 0x00c0, 0x34c3: 0x00c0, 0x34c4: 0x00c0, 0x34c5: 0x00c0, - 0x34c6: 0x00c0, 0x34c7: 0x00c0, 0x34c8: 0x00c0, 0x34c9: 0x00c0, 0x34ca: 0x00c0, 0x34cb: 0x00c0, - 0x34cc: 0x00c0, 0x34cd: 0x00c0, 0x34ce: 0x00c0, 0x34cf: 0x00c0, 0x34d0: 0x00c0, 0x34d1: 0x00c0, - 0x34d2: 0x00c0, 0x34d3: 0x00c0, 0x34d4: 0x00c0, 0x34d5: 0x00c0, 0x34d7: 0x0080, - 0x34d8: 0x0080, 0x34d9: 0x0080, 0x34da: 0x0080, 0x34db: 0x0080, 0x34dc: 0x0080, 0x34dd: 0x0080, - 0x34de: 0x0080, 0x34df: 0x0080, 0x34e0: 0x00c0, 0x34e1: 0x00c0, 0x34e2: 0x00c0, 0x34e3: 0x00c0, - 0x34e4: 0x00c0, 0x34e5: 0x00c0, 0x34e6: 0x00c0, 0x34e7: 0x00c0, 0x34e8: 0x00c0, 0x34e9: 0x00c0, - 0x34ea: 0x00c0, 0x34eb: 0x00c0, 0x34ec: 0x00c0, 0x34ed: 0x00c0, 0x34ee: 0x00c0, 0x34ef: 0x00c0, - 0x34f0: 0x00c0, 0x34f1: 0x00c0, 0x34f2: 0x00c0, 0x34f3: 0x00c0, 0x34f4: 0x00c0, 0x34f5: 0x00c0, - 0x34f6: 0x00c0, 0x34f7: 0x0080, 0x34f8: 0x0080, 0x34f9: 0x0080, 0x34fa: 0x0080, 0x34fb: 0x0080, - 0x34fc: 0x0080, 0x34fd: 0x0080, 0x34fe: 0x0080, 0x34ff: 0x0080, - // Block 0xd4, offset 0x3500 - 0x3500: 0x00c0, 0x3501: 0x00c0, 0x3502: 0x00c0, 0x3503: 0x00c0, 0x3504: 0x00c0, 0x3505: 0x00c0, - 0x3506: 0x00c0, 0x3507: 0x00c0, 0x3508: 0x00c0, 0x3509: 0x00c0, 0x350a: 0x00c0, 0x350b: 0x00c0, - 0x350c: 0x00c0, 0x350d: 0x00c0, 0x350e: 0x00c0, 0x350f: 0x00c0, 0x3510: 0x00c0, 0x3511: 0x00c0, - 0x3512: 0x00c0, 0x3513: 0x00c0, 0x3514: 0x00c0, 0x3515: 0x00c0, 0x3516: 0x00c0, 0x3517: 0x00c0, - 0x3518: 0x00c0, 0x3519: 0x00c0, 0x351a: 0x00c0, 0x351b: 0x00c0, 0x351c: 0x00c0, 0x351d: 0x00c0, - 0x351e: 0x00c0, - 0x3527: 0x0080, 0x3528: 0x0080, 0x3529: 0x0080, - 0x352a: 0x0080, 0x352b: 0x0080, 0x352c: 0x0080, 0x352d: 0x0080, 0x352e: 0x0080, 0x352f: 0x0080, - // Block 0xd5, offset 0x3540 - 0x3560: 0x00c0, 0x3561: 0x00c0, 0x3562: 0x00c0, 0x3563: 0x00c0, - 0x3564: 0x00c0, 0x3565: 0x00c0, 0x3566: 0x00c0, 0x3567: 0x00c0, 0x3568: 0x00c0, 0x3569: 0x00c0, - 0x356a: 0x00c0, 0x356b: 0x00c0, 0x356c: 0x00c0, 0x356d: 0x00c0, 0x356e: 0x00c0, 0x356f: 0x00c0, - 0x3570: 0x00c0, 0x3571: 0x00c0, 0x3572: 0x00c0, 0x3574: 0x00c0, 0x3575: 0x00c0, - 0x357b: 0x0080, - 0x357c: 0x0080, 0x357d: 0x0080, 0x357e: 0x0080, 0x357f: 0x0080, - // Block 0xd6, offset 0x3580 - 0x3580: 0x00c0, 0x3581: 0x00c0, 0x3582: 0x00c0, 0x3583: 0x00c0, 0x3584: 0x00c0, 0x3585: 0x00c0, - 0x3586: 0x00c0, 0x3587: 0x00c0, 0x3588: 0x00c0, 0x3589: 0x00c0, 0x358a: 0x00c0, 0x358b: 0x00c0, - 0x358c: 0x00c0, 0x358d: 0x00c0, 0x358e: 0x00c0, 0x358f: 0x00c0, 0x3590: 0x00c0, 0x3591: 0x00c0, - 0x3592: 0x00c0, 0x3593: 0x00c0, 0x3594: 0x00c0, 0x3595: 0x00c0, 0x3596: 0x0080, 0x3597: 0x0080, - 0x3598: 0x0080, 0x3599: 0x0080, 0x359a: 0x0080, 0x359b: 0x0080, - 0x359f: 0x0080, 0x35a0: 0x00c0, 0x35a1: 0x00c0, 0x35a2: 0x00c0, 0x35a3: 0x00c0, - 0x35a4: 0x00c0, 0x35a5: 0x00c0, 0x35a6: 0x00c0, 0x35a7: 0x00c0, 0x35a8: 0x00c0, 0x35a9: 0x00c0, - 0x35aa: 0x00c0, 0x35ab: 0x00c0, 0x35ac: 0x00c0, 0x35ad: 0x00c0, 0x35ae: 0x00c0, 0x35af: 0x00c0, - 0x35b0: 0x00c0, 0x35b1: 0x00c0, 0x35b2: 0x00c0, 0x35b3: 0x00c0, 0x35b4: 0x00c0, 0x35b5: 0x00c0, - 0x35b6: 0x00c0, 0x35b7: 0x00c0, 0x35b8: 0x00c0, 0x35b9: 0x00c0, - 0x35bf: 0x0080, - // Block 0xd7, offset 0x35c0 - 0x35c0: 0x00c0, 0x35c1: 0x00c0, 0x35c2: 0x00c0, 0x35c3: 0x00c0, 0x35c4: 0x00c0, 0x35c5: 0x00c0, - 0x35c6: 0x00c0, 0x35c7: 0x00c0, 0x35c8: 0x00c0, 0x35c9: 0x00c0, 0x35ca: 0x00c0, 0x35cb: 0x00c0, - 0x35cc: 0x00c0, 0x35cd: 0x00c0, 0x35ce: 0x00c0, 0x35cf: 0x00c0, 0x35d0: 0x00c0, 0x35d1: 0x00c0, - 0x35d2: 0x00c0, 0x35d3: 0x00c0, 0x35d4: 0x00c0, 0x35d5: 0x00c0, 0x35d6: 0x00c0, 0x35d7: 0x00c0, - 0x35d8: 0x00c0, 0x35d9: 0x00c0, 0x35da: 0x00c0, 0x35db: 0x00c0, 0x35dc: 0x00c0, 0x35dd: 0x00c0, - 0x35de: 0x00c0, 0x35df: 0x00c0, 0x35e0: 0x00c0, 0x35e1: 0x00c0, 0x35e2: 0x00c0, 0x35e3: 0x00c0, - 0x35e4: 0x00c0, 0x35e5: 0x00c0, 0x35e6: 0x00c0, 0x35e7: 0x00c0, 0x35e8: 0x00c0, 0x35e9: 0x00c0, - 0x35ea: 0x00c0, 0x35eb: 0x00c0, 0x35ec: 0x00c0, 0x35ed: 0x00c0, 0x35ee: 0x00c0, 0x35ef: 0x00c0, - 0x35f0: 0x00c0, 0x35f1: 0x00c0, 0x35f2: 0x00c0, 0x35f3: 0x00c0, 0x35f4: 0x00c0, 0x35f5: 0x00c0, - 0x35f6: 0x00c0, 0x35f7: 0x00c0, - 0x35fc: 0x0080, 0x35fd: 0x0080, 0x35fe: 0x00c0, 0x35ff: 0x00c0, - // Block 0xd8, offset 0x3600 - 0x3600: 0x00c0, 0x3601: 0x00c3, 0x3602: 0x00c3, 0x3603: 0x00c3, 0x3605: 0x00c3, - 0x3606: 0x00c3, - 0x360c: 0x00c3, 0x360d: 0x00c3, 0x360e: 0x00c3, 0x360f: 0x00c3, 0x3610: 0x00c0, 0x3611: 0x00c0, - 0x3612: 0x00c0, 0x3613: 0x00c0, 0x3615: 0x00c0, 0x3616: 0x00c0, 0x3617: 0x00c0, - 0x3619: 0x00c0, 0x361a: 0x00c0, 0x361b: 0x00c0, 0x361c: 0x00c0, 0x361d: 0x00c0, - 0x361e: 0x00c0, 0x361f: 0x00c0, 0x3620: 0x00c0, 0x3621: 0x00c0, 0x3622: 0x00c0, 0x3623: 0x00c0, - 0x3624: 0x00c0, 0x3625: 0x00c0, 0x3626: 0x00c0, 0x3627: 0x00c0, 0x3628: 0x00c0, 0x3629: 0x00c0, - 0x362a: 0x00c0, 0x362b: 0x00c0, 0x362c: 0x00c0, 0x362d: 0x00c0, 0x362e: 0x00c0, 0x362f: 0x00c0, - 0x3630: 0x00c0, 0x3631: 0x00c0, 0x3632: 0x00c0, 0x3633: 0x00c0, - 0x3638: 0x00c3, 0x3639: 0x00c3, 0x363a: 0x00c3, - 0x363f: 0x00c6, - // Block 0xd9, offset 0x3640 - 0x3640: 0x0080, 0x3641: 0x0080, 0x3642: 0x0080, 0x3643: 0x0080, 0x3644: 0x0080, 0x3645: 0x0080, - 0x3646: 0x0080, 0x3647: 0x0080, - 0x3650: 0x0080, 0x3651: 0x0080, - 0x3652: 0x0080, 0x3653: 0x0080, 0x3654: 0x0080, 0x3655: 0x0080, 0x3656: 0x0080, 0x3657: 0x0080, - 0x3658: 0x0080, - 0x3660: 0x00c0, 0x3661: 0x00c0, 0x3662: 0x00c0, 0x3663: 0x00c0, - 0x3664: 0x00c0, 0x3665: 0x00c0, 0x3666: 0x00c0, 0x3667: 0x00c0, 0x3668: 0x00c0, 0x3669: 0x00c0, - 0x366a: 0x00c0, 0x366b: 0x00c0, 0x366c: 0x00c0, 0x366d: 0x00c0, 0x366e: 0x00c0, 0x366f: 0x00c0, - 0x3670: 0x00c0, 0x3671: 0x00c0, 0x3672: 0x00c0, 0x3673: 0x00c0, 0x3674: 0x00c0, 0x3675: 0x00c0, - 0x3676: 0x00c0, 0x3677: 0x00c0, 0x3678: 0x00c0, 0x3679: 0x00c0, 0x367a: 0x00c0, 0x367b: 0x00c0, - 0x367c: 0x00c0, 0x367d: 0x0080, 0x367e: 0x0080, 0x367f: 0x0080, - // Block 0xda, offset 0x3680 - 0x3680: 0x00c0, 0x3681: 0x00c0, 0x3682: 0x00c0, 0x3683: 0x00c0, 0x3684: 0x00c0, 0x3685: 0x00c0, - 0x3686: 0x00c0, 0x3687: 0x00c0, 0x3688: 0x00c0, 0x3689: 0x00c0, 0x368a: 0x00c0, 0x368b: 0x00c0, - 0x368c: 0x00c0, 0x368d: 0x00c0, 0x368e: 0x00c0, 0x368f: 0x00c0, 0x3690: 0x00c0, 0x3691: 0x00c0, - 0x3692: 0x00c0, 0x3693: 0x00c0, 0x3694: 0x00c0, 0x3695: 0x00c0, 0x3696: 0x00c0, 0x3697: 0x00c0, - 0x3698: 0x00c0, 0x3699: 0x00c0, 0x369a: 0x00c0, 0x369b: 0x00c0, 0x369c: 0x00c0, 0x369d: 0x0080, - 0x369e: 0x0080, 0x369f: 0x0080, - // Block 0xdb, offset 0x36c0 - 0x36c0: 0x00c2, 0x36c1: 0x00c2, 0x36c2: 0x00c2, 0x36c3: 0x00c2, 0x36c4: 0x00c2, 0x36c5: 0x00c4, - 0x36c6: 0x00c0, 0x36c7: 0x00c4, 0x36c8: 0x0080, 0x36c9: 0x00c4, 0x36ca: 0x00c4, 0x36cb: 0x00c0, - 0x36cc: 0x00c0, 0x36cd: 0x00c1, 0x36ce: 0x00c4, 0x36cf: 0x00c4, 0x36d0: 0x00c4, 0x36d1: 0x00c4, - 0x36d2: 0x00c4, 0x36d3: 0x00c2, 0x36d4: 0x00c2, 0x36d5: 0x00c2, 0x36d6: 0x00c2, 0x36d7: 0x00c1, - 0x36d8: 0x00c2, 0x36d9: 0x00c2, 0x36da: 0x00c2, 0x36db: 0x00c2, 0x36dc: 0x00c2, 0x36dd: 0x00c4, - 0x36de: 0x00c2, 0x36df: 0x00c2, 0x36e0: 0x00c2, 0x36e1: 0x00c4, 0x36e2: 0x00c0, 0x36e3: 0x00c0, - 0x36e4: 0x00c4, 0x36e5: 0x00c3, 0x36e6: 0x00c3, - 0x36eb: 0x0082, 0x36ec: 0x0082, 0x36ed: 0x0082, 0x36ee: 0x0082, 0x36ef: 0x0084, - 0x36f0: 0x0080, 0x36f1: 0x0080, 0x36f2: 0x0080, 0x36f3: 0x0080, 0x36f4: 0x0080, 0x36f5: 0x0080, - 0x36f6: 0x0080, - // Block 0xdc, offset 0x3700 - 0x3700: 0x00c0, 0x3701: 0x00c0, 0x3702: 0x00c0, 0x3703: 0x00c0, 0x3704: 0x00c0, 0x3705: 0x00c0, - 0x3706: 0x00c0, 0x3707: 0x00c0, 0x3708: 0x00c0, 0x3709: 0x00c0, 0x370a: 0x00c0, 0x370b: 0x00c0, - 0x370c: 0x00c0, 0x370d: 0x00c0, 0x370e: 0x00c0, 0x370f: 0x00c0, 0x3710: 0x00c0, 0x3711: 0x00c0, - 0x3712: 0x00c0, 0x3713: 0x00c0, 0x3714: 0x00c0, 0x3715: 0x00c0, 0x3716: 0x00c0, 0x3717: 0x00c0, - 0x3718: 0x00c0, 0x3719: 0x00c0, 0x371a: 0x00c0, 0x371b: 0x00c0, 0x371c: 0x00c0, 0x371d: 0x00c0, - 0x371e: 0x00c0, 0x371f: 0x00c0, 0x3720: 0x00c0, 0x3721: 0x00c0, 0x3722: 0x00c0, 0x3723: 0x00c0, - 0x3724: 0x00c0, 0x3725: 0x00c0, 0x3726: 0x00c0, 0x3727: 0x00c0, 0x3728: 0x00c0, 0x3729: 0x00c0, - 0x372a: 0x00c0, 0x372b: 0x00c0, 0x372c: 0x00c0, 0x372d: 0x00c0, 0x372e: 0x00c0, 0x372f: 0x00c0, - 0x3730: 0x00c0, 0x3731: 0x00c0, 0x3732: 0x00c0, 0x3733: 0x00c0, 0x3734: 0x00c0, 0x3735: 0x00c0, - 0x3739: 0x0080, 0x373a: 0x0080, 0x373b: 0x0080, - 0x373c: 0x0080, 0x373d: 0x0080, 0x373e: 0x0080, 0x373f: 0x0080, - // Block 0xdd, offset 0x3740 - 0x3740: 0x00c0, 0x3741: 0x00c0, 0x3742: 0x00c0, 0x3743: 0x00c0, 0x3744: 0x00c0, 0x3745: 0x00c0, - 0x3746: 0x00c0, 0x3747: 0x00c0, 0x3748: 0x00c0, 0x3749: 0x00c0, 0x374a: 0x00c0, 0x374b: 0x00c0, - 0x374c: 0x00c0, 0x374d: 0x00c0, 0x374e: 0x00c0, 0x374f: 0x00c0, 0x3750: 0x00c0, 0x3751: 0x00c0, - 0x3752: 0x00c0, 0x3753: 0x00c0, 0x3754: 0x00c0, 0x3755: 0x00c0, - 0x3758: 0x0080, 0x3759: 0x0080, 0x375a: 0x0080, 0x375b: 0x0080, 0x375c: 0x0080, 0x375d: 0x0080, - 0x375e: 0x0080, 0x375f: 0x0080, 0x3760: 0x00c0, 0x3761: 0x00c0, 0x3762: 0x00c0, 0x3763: 0x00c0, - 0x3764: 0x00c0, 0x3765: 0x00c0, 0x3766: 0x00c0, 0x3767: 0x00c0, 0x3768: 0x00c0, 0x3769: 0x00c0, - 0x376a: 0x00c0, 0x376b: 0x00c0, 0x376c: 0x00c0, 0x376d: 0x00c0, 0x376e: 0x00c0, 0x376f: 0x00c0, - 0x3770: 0x00c0, 0x3771: 0x00c0, 0x3772: 0x00c0, - 0x3778: 0x0080, 0x3779: 0x0080, 0x377a: 0x0080, 0x377b: 0x0080, - 0x377c: 0x0080, 0x377d: 0x0080, 0x377e: 0x0080, 0x377f: 0x0080, - // Block 0xde, offset 0x3780 - 0x3780: 0x00c2, 0x3781: 0x00c4, 0x3782: 0x00c2, 0x3783: 0x00c4, 0x3784: 0x00c4, 0x3785: 0x00c4, - 0x3786: 0x00c2, 0x3787: 0x00c2, 0x3788: 0x00c2, 0x3789: 0x00c4, 0x378a: 0x00c2, 0x378b: 0x00c2, - 0x378c: 0x00c4, 0x378d: 0x00c2, 0x378e: 0x00c4, 0x378f: 0x00c4, 0x3790: 0x00c2, 0x3791: 0x00c4, - 0x3799: 0x0080, 0x379a: 0x0080, 0x379b: 0x0080, 0x379c: 0x0080, - 0x37a9: 0x0084, - 0x37aa: 0x0084, 0x37ab: 0x0084, 0x37ac: 0x0084, 0x37ad: 0x0082, 0x37ae: 0x0082, 0x37af: 0x0080, - // Block 0xdf, offset 0x37c0 - 0x37c0: 0x00c0, 0x37c1: 0x00c0, 0x37c2: 0x00c0, 0x37c3: 0x00c0, 0x37c4: 0x00c0, 0x37c5: 0x00c0, - 0x37c6: 0x00c0, 0x37c7: 0x00c0, 0x37c8: 0x00c0, 0x37c9: 0x00c0, 0x37ca: 0x00c0, 0x37cb: 0x00c0, - 0x37cc: 0x00c0, 0x37cd: 0x00c0, 0x37ce: 0x00c0, 0x37cf: 0x00c0, 0x37d0: 0x00c0, 0x37d1: 0x00c0, - 0x37d2: 0x00c0, 0x37d3: 0x00c0, 0x37d4: 0x00c0, 0x37d5: 0x00c0, 0x37d6: 0x00c0, 0x37d7: 0x00c0, - 0x37d8: 0x00c0, 0x37d9: 0x00c0, 0x37da: 0x00c0, 0x37db: 0x00c0, 0x37dc: 0x00c0, 0x37dd: 0x00c0, - 0x37de: 0x00c0, 0x37df: 0x00c0, 0x37e0: 0x00c0, 0x37e1: 0x00c0, 0x37e2: 0x00c0, 0x37e3: 0x00c0, - 0x37e4: 0x00c0, 0x37e5: 0x00c0, 0x37e6: 0x00c0, 0x37e7: 0x00c0, 0x37e8: 0x00c0, 0x37e9: 0x00c0, - 0x37ea: 0x00c0, 0x37eb: 0x00c0, 0x37ec: 0x00c0, 0x37ed: 0x00c0, 0x37ee: 0x00c0, 0x37ef: 0x00c0, - 0x37f0: 0x00c0, 0x37f1: 0x00c0, 0x37f2: 0x00c0, - // Block 0xe0, offset 0x3800 - 0x3800: 0x00c0, 0x3801: 0x00c0, 0x3802: 0x00c0, 0x3803: 0x00c0, 0x3804: 0x00c0, 0x3805: 0x00c0, - 0x3806: 0x00c0, 0x3807: 0x00c0, 0x3808: 0x00c0, 0x3809: 0x00c0, 0x380a: 0x00c0, 0x380b: 0x00c0, - 0x380c: 0x00c0, 0x380d: 0x00c0, 0x380e: 0x00c0, 0x380f: 0x00c0, 0x3810: 0x00c0, 0x3811: 0x00c0, - 0x3812: 0x00c0, 0x3813: 0x00c0, 0x3814: 0x00c0, 0x3815: 0x00c0, 0x3816: 0x00c0, 0x3817: 0x00c0, - 0x3818: 0x00c0, 0x3819: 0x00c0, 0x381a: 0x00c0, 0x381b: 0x00c0, 0x381c: 0x00c0, 0x381d: 0x00c0, - 0x381e: 0x00c0, 0x381f: 0x00c0, 0x3820: 0x00c0, 0x3821: 0x00c0, 0x3822: 0x00c0, 0x3823: 0x00c0, - 0x3824: 0x00c0, 0x3825: 0x00c0, 0x3826: 0x00c0, 0x3827: 0x00c0, 0x3828: 0x00c0, 0x3829: 0x00c0, - 0x382a: 0x00c0, 0x382b: 0x00c0, 0x382c: 0x00c0, 0x382d: 0x00c0, 0x382e: 0x00c0, 0x382f: 0x00c0, - 0x3830: 0x00c0, 0x3831: 0x00c0, 0x3832: 0x00c0, - 0x383a: 0x0080, 0x383b: 0x0080, - 0x383c: 0x0080, 0x383d: 0x0080, 0x383e: 0x0080, 0x383f: 0x0080, - // Block 0xe1, offset 0x3840 - 0x3860: 0x0080, 0x3861: 0x0080, 0x3862: 0x0080, 0x3863: 0x0080, - 0x3864: 0x0080, 0x3865: 0x0080, 0x3866: 0x0080, 0x3867: 0x0080, 0x3868: 0x0080, 0x3869: 0x0080, - 0x386a: 0x0080, 0x386b: 0x0080, 0x386c: 0x0080, 0x386d: 0x0080, 0x386e: 0x0080, 0x386f: 0x0080, - 0x3870: 0x0080, 0x3871: 0x0080, 0x3872: 0x0080, 0x3873: 0x0080, 0x3874: 0x0080, 0x3875: 0x0080, - 0x3876: 0x0080, 0x3877: 0x0080, 0x3878: 0x0080, 0x3879: 0x0080, 0x387a: 0x0080, 0x387b: 0x0080, - 0x387c: 0x0080, 0x387d: 0x0080, 0x387e: 0x0080, - // Block 0xe2, offset 0x3880 - 0x3880: 0x00c0, 0x3881: 0x00c3, 0x3882: 0x00c0, 0x3883: 0x00c0, 0x3884: 0x00c0, 0x3885: 0x00c0, - 0x3886: 0x00c0, 0x3887: 0x00c0, 0x3888: 0x00c0, 0x3889: 0x00c0, 0x388a: 0x00c0, 0x388b: 0x00c0, - 0x388c: 0x00c0, 0x388d: 0x00c0, 0x388e: 0x00c0, 0x388f: 0x00c0, 0x3890: 0x00c0, 0x3891: 0x00c0, - 0x3892: 0x00c0, 0x3893: 0x00c0, 0x3894: 0x00c0, 0x3895: 0x00c0, 0x3896: 0x00c0, 0x3897: 0x00c0, - 0x3898: 0x00c0, 0x3899: 0x00c0, 0x389a: 0x00c0, 0x389b: 0x00c0, 0x389c: 0x00c0, 0x389d: 0x00c0, - 0x389e: 0x00c0, 0x389f: 0x00c0, 0x38a0: 0x00c0, 0x38a1: 0x00c0, 0x38a2: 0x00c0, 0x38a3: 0x00c0, - 0x38a4: 0x00c0, 0x38a5: 0x00c0, 0x38a6: 0x00c0, 0x38a7: 0x00c0, 0x38a8: 0x00c0, 0x38a9: 0x00c0, - 0x38aa: 0x00c0, 0x38ab: 0x00c0, 0x38ac: 0x00c0, 0x38ad: 0x00c0, 0x38ae: 0x00c0, 0x38af: 0x00c0, - 0x38b0: 0x00c0, 0x38b1: 0x00c0, 0x38b2: 0x00c0, 0x38b3: 0x00c0, 0x38b4: 0x00c0, 0x38b5: 0x00c0, - 0x38b6: 0x00c0, 0x38b7: 0x00c0, 0x38b8: 0x00c3, 0x38b9: 0x00c3, 0x38ba: 0x00c3, 0x38bb: 0x00c3, - 0x38bc: 0x00c3, 0x38bd: 0x00c3, 0x38be: 0x00c3, 0x38bf: 0x00c3, - // Block 0xe3, offset 0x38c0 - 0x38c0: 0x00c3, 0x38c1: 0x00c3, 0x38c2: 0x00c3, 0x38c3: 0x00c3, 0x38c4: 0x00c3, 0x38c5: 0x00c3, - 0x38c6: 0x00c6, 0x38c7: 0x0080, 0x38c8: 0x0080, 0x38c9: 0x0080, 0x38ca: 0x0080, 0x38cb: 0x0080, - 0x38cc: 0x0080, 0x38cd: 0x0080, - 0x38d2: 0x0080, 0x38d3: 0x0080, 0x38d4: 0x0080, 0x38d5: 0x0080, 0x38d6: 0x0080, 0x38d7: 0x0080, - 0x38d8: 0x0080, 0x38d9: 0x0080, 0x38da: 0x0080, 0x38db: 0x0080, 0x38dc: 0x0080, 0x38dd: 0x0080, - 0x38de: 0x0080, 0x38df: 0x0080, 0x38e0: 0x0080, 0x38e1: 0x0080, 0x38e2: 0x0080, 0x38e3: 0x0080, - 0x38e4: 0x0080, 0x38e5: 0x0080, 0x38e6: 0x00c0, 0x38e7: 0x00c0, 0x38e8: 0x00c0, 0x38e9: 0x00c0, - 0x38ea: 0x00c0, 0x38eb: 0x00c0, 0x38ec: 0x00c0, 0x38ed: 0x00c0, 0x38ee: 0x00c0, 0x38ef: 0x00c0, - 0x38ff: 0x00c6, - // Block 0xe4, offset 0x3900 - 0x3900: 0x00c3, 0x3901: 0x00c3, 0x3902: 0x00c0, 0x3903: 0x00c0, 0x3904: 0x00c0, 0x3905: 0x00c0, - 0x3906: 0x00c0, 0x3907: 0x00c0, 0x3908: 0x00c0, 0x3909: 0x00c0, 0x390a: 0x00c0, 0x390b: 0x00c0, - 0x390c: 0x00c0, 0x390d: 0x00c0, 0x390e: 0x00c0, 0x390f: 0x00c0, 0x3910: 0x00c0, 0x3911: 0x00c0, - 0x3912: 0x00c0, 0x3913: 0x00c0, 0x3914: 0x00c0, 0x3915: 0x00c0, 0x3916: 0x00c0, 0x3917: 0x00c0, - 0x3918: 0x00c0, 0x3919: 0x00c0, 0x391a: 0x00c0, 0x391b: 0x00c0, 0x391c: 0x00c0, 0x391d: 0x00c0, - 0x391e: 0x00c0, 0x391f: 0x00c0, 0x3920: 0x00c0, 0x3921: 0x00c0, 0x3922: 0x00c0, 0x3923: 0x00c0, - 0x3924: 0x00c0, 0x3925: 0x00c0, 0x3926: 0x00c0, 0x3927: 0x00c0, 0x3928: 0x00c0, 0x3929: 0x00c0, - 0x392a: 0x00c0, 0x392b: 0x00c0, 0x392c: 0x00c0, 0x392d: 0x00c0, 0x392e: 0x00c0, 0x392f: 0x00c0, - 0x3930: 0x00c0, 0x3931: 0x00c0, 0x3932: 0x00c0, 0x3933: 0x00c3, 0x3934: 0x00c3, 0x3935: 0x00c3, - 0x3936: 0x00c3, 0x3937: 0x00c0, 0x3938: 0x00c0, 0x3939: 0x00c6, 0x393a: 0x00c3, 0x393b: 0x0080, - 0x393c: 0x0080, 0x393d: 0x0040, 0x393e: 0x0080, 0x393f: 0x0080, - // Block 0xe5, offset 0x3940 - 0x3940: 0x0080, 0x3941: 0x0080, - 0x3950: 0x00c0, 0x3951: 0x00c0, - 0x3952: 0x00c0, 0x3953: 0x00c0, 0x3954: 0x00c0, 0x3955: 0x00c0, 0x3956: 0x00c0, 0x3957: 0x00c0, - 0x3958: 0x00c0, 0x3959: 0x00c0, 0x395a: 0x00c0, 0x395b: 0x00c0, 0x395c: 0x00c0, 0x395d: 0x00c0, - 0x395e: 0x00c0, 0x395f: 0x00c0, 0x3960: 0x00c0, 0x3961: 0x00c0, 0x3962: 0x00c0, 0x3963: 0x00c0, - 0x3964: 0x00c0, 0x3965: 0x00c0, 0x3966: 0x00c0, 0x3967: 0x00c0, 0x3968: 0x00c0, - 0x3970: 0x00c0, 0x3971: 0x00c0, 0x3972: 0x00c0, 0x3973: 0x00c0, 0x3974: 0x00c0, 0x3975: 0x00c0, - 0x3976: 0x00c0, 0x3977: 0x00c0, 0x3978: 0x00c0, 0x3979: 0x00c0, - // Block 0xe6, offset 0x3980 - 0x3980: 0x00c3, 0x3981: 0x00c3, 0x3982: 0x00c3, 0x3983: 0x00c0, 0x3984: 0x00c0, 0x3985: 0x00c0, - 0x3986: 0x00c0, 0x3987: 0x00c0, 0x3988: 0x00c0, 0x3989: 0x00c0, 0x398a: 0x00c0, 0x398b: 0x00c0, - 0x398c: 0x00c0, 0x398d: 0x00c0, 0x398e: 0x00c0, 0x398f: 0x00c0, 0x3990: 0x00c0, 0x3991: 0x00c0, - 0x3992: 0x00c0, 0x3993: 0x00c0, 0x3994: 0x00c0, 0x3995: 0x00c0, 0x3996: 0x00c0, 0x3997: 0x00c0, - 0x3998: 0x00c0, 0x3999: 0x00c0, 0x399a: 0x00c0, 0x399b: 0x00c0, 0x399c: 0x00c0, 0x399d: 0x00c0, - 0x399e: 0x00c0, 0x399f: 0x00c0, 0x39a0: 0x00c0, 0x39a1: 0x00c0, 0x39a2: 0x00c0, 0x39a3: 0x00c0, - 0x39a4: 0x00c0, 0x39a5: 0x00c0, 0x39a6: 0x00c0, 0x39a7: 0x00c3, 0x39a8: 0x00c3, 0x39a9: 0x00c3, - 0x39aa: 0x00c3, 0x39ab: 0x00c3, 0x39ac: 0x00c0, 0x39ad: 0x00c3, 0x39ae: 0x00c3, 0x39af: 0x00c3, - 0x39b0: 0x00c3, 0x39b1: 0x00c3, 0x39b2: 0x00c3, 0x39b3: 0x00c6, 0x39b4: 0x00c6, - 0x39b6: 0x00c0, 0x39b7: 0x00c0, 0x39b8: 0x00c0, 0x39b9: 0x00c0, 0x39ba: 0x00c0, 0x39bb: 0x00c0, - 0x39bc: 0x00c0, 0x39bd: 0x00c0, 0x39be: 0x00c0, 0x39bf: 0x00c0, - // Block 0xe7, offset 0x39c0 - 0x39c0: 0x0080, 0x39c1: 0x0080, 0x39c2: 0x0080, 0x39c3: 0x0080, - 0x39d0: 0x00c0, 0x39d1: 0x00c0, - 0x39d2: 0x00c0, 0x39d3: 0x00c0, 0x39d4: 0x00c0, 0x39d5: 0x00c0, 0x39d6: 0x00c0, 0x39d7: 0x00c0, - 0x39d8: 0x00c0, 0x39d9: 0x00c0, 0x39da: 0x00c0, 0x39db: 0x00c0, 0x39dc: 0x00c0, 0x39dd: 0x00c0, - 0x39de: 0x00c0, 0x39df: 0x00c0, 0x39e0: 0x00c0, 0x39e1: 0x00c0, 0x39e2: 0x00c0, 0x39e3: 0x00c0, - 0x39e4: 0x00c0, 0x39e5: 0x00c0, 0x39e6: 0x00c0, 0x39e7: 0x00c0, 0x39e8: 0x00c0, 0x39e9: 0x00c0, - 0x39ea: 0x00c0, 0x39eb: 0x00c0, 0x39ec: 0x00c0, 0x39ed: 0x00c0, 0x39ee: 0x00c0, 0x39ef: 0x00c0, - 0x39f0: 0x00c0, 0x39f1: 0x00c0, 0x39f2: 0x00c0, 0x39f3: 0x00c3, 0x39f4: 0x0080, 0x39f5: 0x0080, - 0x39f6: 0x00c0, - // Block 0xe8, offset 0x3a00 - 0x3a00: 0x00c3, 0x3a01: 0x00c3, 0x3a02: 0x00c0, 0x3a03: 0x00c0, 0x3a04: 0x00c0, 0x3a05: 0x00c0, - 0x3a06: 0x00c0, 0x3a07: 0x00c0, 0x3a08: 0x00c0, 0x3a09: 0x00c0, 0x3a0a: 0x00c0, 0x3a0b: 0x00c0, - 0x3a0c: 0x00c0, 0x3a0d: 0x00c0, 0x3a0e: 0x00c0, 0x3a0f: 0x00c0, 0x3a10: 0x00c0, 0x3a11: 0x00c0, - 0x3a12: 0x00c0, 0x3a13: 0x00c0, 0x3a14: 0x00c0, 0x3a15: 0x00c0, 0x3a16: 0x00c0, 0x3a17: 0x00c0, - 0x3a18: 0x00c0, 0x3a19: 0x00c0, 0x3a1a: 0x00c0, 0x3a1b: 0x00c0, 0x3a1c: 0x00c0, 0x3a1d: 0x00c0, - 0x3a1e: 0x00c0, 0x3a1f: 0x00c0, 0x3a20: 0x00c0, 0x3a21: 0x00c0, 0x3a22: 0x00c0, 0x3a23: 0x00c0, - 0x3a24: 0x00c0, 0x3a25: 0x00c0, 0x3a26: 0x00c0, 0x3a27: 0x00c0, 0x3a28: 0x00c0, 0x3a29: 0x00c0, - 0x3a2a: 0x00c0, 0x3a2b: 0x00c0, 0x3a2c: 0x00c0, 0x3a2d: 0x00c0, 0x3a2e: 0x00c0, 0x3a2f: 0x00c0, - 0x3a30: 0x00c0, 0x3a31: 0x00c0, 0x3a32: 0x00c0, 0x3a33: 0x00c0, 0x3a34: 0x00c0, 0x3a35: 0x00c0, - 0x3a36: 0x00c3, 0x3a37: 0x00c3, 0x3a38: 0x00c3, 0x3a39: 0x00c3, 0x3a3a: 0x00c3, 0x3a3b: 0x00c3, - 0x3a3c: 0x00c3, 0x3a3d: 0x00c3, 0x3a3e: 0x00c3, 0x3a3f: 0x00c0, - // Block 0xe9, offset 0x3a40 - 0x3a40: 0x00c5, 0x3a41: 0x00c0, 0x3a42: 0x00c0, 0x3a43: 0x00c0, 0x3a44: 0x00c0, 0x3a45: 0x0080, - 0x3a46: 0x0080, 0x3a47: 0x0080, 0x3a48: 0x0080, 0x3a49: 0x0080, 0x3a4a: 0x00c3, 0x3a4b: 0x00c3, - 0x3a4c: 0x00c3, 0x3a4d: 0x0080, 0x3a50: 0x00c0, 0x3a51: 0x00c0, - 0x3a52: 0x00c0, 0x3a53: 0x00c0, 0x3a54: 0x00c0, 0x3a55: 0x00c0, 0x3a56: 0x00c0, 0x3a57: 0x00c0, - 0x3a58: 0x00c0, 0x3a59: 0x00c0, 0x3a5a: 0x00c0, 0x3a5b: 0x0080, 0x3a5c: 0x00c0, 0x3a5d: 0x0080, - 0x3a5e: 0x0080, 0x3a5f: 0x0080, 0x3a61: 0x0080, 0x3a62: 0x0080, 0x3a63: 0x0080, - 0x3a64: 0x0080, 0x3a65: 0x0080, 0x3a66: 0x0080, 0x3a67: 0x0080, 0x3a68: 0x0080, 0x3a69: 0x0080, - 0x3a6a: 0x0080, 0x3a6b: 0x0080, 0x3a6c: 0x0080, 0x3a6d: 0x0080, 0x3a6e: 0x0080, 0x3a6f: 0x0080, - 0x3a70: 0x0080, 0x3a71: 0x0080, 0x3a72: 0x0080, 0x3a73: 0x0080, 0x3a74: 0x0080, - // Block 0xea, offset 0x3a80 - 0x3a80: 0x00c0, 0x3a81: 0x00c0, 0x3a82: 0x00c0, 0x3a83: 0x00c0, 0x3a84: 0x00c0, 0x3a85: 0x00c0, - 0x3a86: 0x00c0, 0x3a87: 0x00c0, 0x3a88: 0x00c0, 0x3a89: 0x00c0, 0x3a8a: 0x00c0, 0x3a8b: 0x00c0, - 0x3a8c: 0x00c0, 0x3a8d: 0x00c0, 0x3a8e: 0x00c0, 0x3a8f: 0x00c0, 0x3a90: 0x00c0, 0x3a91: 0x00c0, - 0x3a93: 0x00c0, 0x3a94: 0x00c0, 0x3a95: 0x00c0, 0x3a96: 0x00c0, 0x3a97: 0x00c0, - 0x3a98: 0x00c0, 0x3a99: 0x00c0, 0x3a9a: 0x00c0, 0x3a9b: 0x00c0, 0x3a9c: 0x00c0, 0x3a9d: 0x00c0, - 0x3a9e: 0x00c0, 0x3a9f: 0x00c0, 0x3aa0: 0x00c0, 0x3aa1: 0x00c0, 0x3aa2: 0x00c0, 0x3aa3: 0x00c0, - 0x3aa4: 0x00c0, 0x3aa5: 0x00c0, 0x3aa6: 0x00c0, 0x3aa7: 0x00c0, 0x3aa8: 0x00c0, 0x3aa9: 0x00c0, - 0x3aaa: 0x00c0, 0x3aab: 0x00c0, 0x3aac: 0x00c0, 0x3aad: 0x00c0, 0x3aae: 0x00c0, 0x3aaf: 0x00c3, - 0x3ab0: 0x00c3, 0x3ab1: 0x00c3, 0x3ab2: 0x00c0, 0x3ab3: 0x00c0, 0x3ab4: 0x00c3, 0x3ab5: 0x00c5, - 0x3ab6: 0x00c3, 0x3ab7: 0x00c3, 0x3ab8: 0x0080, 0x3ab9: 0x0080, 0x3aba: 0x0080, 0x3abb: 0x0080, - 0x3abc: 0x0080, 0x3abd: 0x0080, 0x3abe: 0x00c3, - // Block 0xeb, offset 0x3ac0 - 0x3ac0: 0x00c0, 0x3ac1: 0x00c0, 0x3ac2: 0x00c0, 0x3ac3: 0x00c0, 0x3ac4: 0x00c0, 0x3ac5: 0x00c0, - 0x3ac6: 0x00c0, 0x3ac8: 0x00c0, 0x3aca: 0x00c0, 0x3acb: 0x00c0, - 0x3acc: 0x00c0, 0x3acd: 0x00c0, 0x3acf: 0x00c0, 0x3ad0: 0x00c0, 0x3ad1: 0x00c0, - 0x3ad2: 0x00c0, 0x3ad3: 0x00c0, 0x3ad4: 0x00c0, 0x3ad5: 0x00c0, 0x3ad6: 0x00c0, 0x3ad7: 0x00c0, - 0x3ad8: 0x00c0, 0x3ad9: 0x00c0, 0x3ada: 0x00c0, 0x3adb: 0x00c0, 0x3adc: 0x00c0, 0x3add: 0x00c0, - 0x3adf: 0x00c0, 0x3ae0: 0x00c0, 0x3ae1: 0x00c0, 0x3ae2: 0x00c0, 0x3ae3: 0x00c0, - 0x3ae4: 0x00c0, 0x3ae5: 0x00c0, 0x3ae6: 0x00c0, 0x3ae7: 0x00c0, 0x3ae8: 0x00c0, 0x3ae9: 0x0080, - 0x3af0: 0x00c0, 0x3af1: 0x00c0, 0x3af2: 0x00c0, 0x3af3: 0x00c0, 0x3af4: 0x00c0, 0x3af5: 0x00c0, - 0x3af6: 0x00c0, 0x3af7: 0x00c0, 0x3af8: 0x00c0, 0x3af9: 0x00c0, 0x3afa: 0x00c0, 0x3afb: 0x00c0, - 0x3afc: 0x00c0, 0x3afd: 0x00c0, 0x3afe: 0x00c0, 0x3aff: 0x00c0, - // Block 0xec, offset 0x3b00 - 0x3b00: 0x00c0, 0x3b01: 0x00c0, 0x3b02: 0x00c0, 0x3b03: 0x00c0, 0x3b04: 0x00c0, 0x3b05: 0x00c0, - 0x3b06: 0x00c0, 0x3b07: 0x00c0, 0x3b08: 0x00c0, 0x3b09: 0x00c0, 0x3b0a: 0x00c0, 0x3b0b: 0x00c0, - 0x3b0c: 0x00c0, 0x3b0d: 0x00c0, 0x3b0e: 0x00c0, 0x3b0f: 0x00c0, 0x3b10: 0x00c0, 0x3b11: 0x00c0, - 0x3b12: 0x00c0, 0x3b13: 0x00c0, 0x3b14: 0x00c0, 0x3b15: 0x00c0, 0x3b16: 0x00c0, 0x3b17: 0x00c0, - 0x3b18: 0x00c0, 0x3b19: 0x00c0, 0x3b1a: 0x00c0, 0x3b1b: 0x00c0, 0x3b1c: 0x00c0, 0x3b1d: 0x00c0, - 0x3b1e: 0x00c0, 0x3b1f: 0x00c3, 0x3b20: 0x00c0, 0x3b21: 0x00c0, 0x3b22: 0x00c0, 0x3b23: 0x00c3, - 0x3b24: 0x00c3, 0x3b25: 0x00c3, 0x3b26: 0x00c3, 0x3b27: 0x00c3, 0x3b28: 0x00c3, 0x3b29: 0x00c3, - 0x3b2a: 0x00c6, - 0x3b30: 0x00c0, 0x3b31: 0x00c0, 0x3b32: 0x00c0, 0x3b33: 0x00c0, 0x3b34: 0x00c0, 0x3b35: 0x00c0, - 0x3b36: 0x00c0, 0x3b37: 0x00c0, 0x3b38: 0x00c0, 0x3b39: 0x00c0, - // Block 0xed, offset 0x3b40 - 0x3b40: 0x00c3, 0x3b41: 0x00c3, 0x3b42: 0x00c0, 0x3b43: 0x00c0, 0x3b45: 0x00c0, - 0x3b46: 0x00c0, 0x3b47: 0x00c0, 0x3b48: 0x00c0, 0x3b49: 0x00c0, 0x3b4a: 0x00c0, 0x3b4b: 0x00c0, - 0x3b4c: 0x00c0, 0x3b4f: 0x00c0, 0x3b50: 0x00c0, - 0x3b53: 0x00c0, 0x3b54: 0x00c0, 0x3b55: 0x00c0, 0x3b56: 0x00c0, 0x3b57: 0x00c0, - 0x3b58: 0x00c0, 0x3b59: 0x00c0, 0x3b5a: 0x00c0, 0x3b5b: 0x00c0, 0x3b5c: 0x00c0, 0x3b5d: 0x00c0, - 0x3b5e: 0x00c0, 0x3b5f: 0x00c0, 0x3b60: 0x00c0, 0x3b61: 0x00c0, 0x3b62: 0x00c0, 0x3b63: 0x00c0, - 0x3b64: 0x00c0, 0x3b65: 0x00c0, 0x3b66: 0x00c0, 0x3b67: 0x00c0, 0x3b68: 0x00c0, - 0x3b6a: 0x00c0, 0x3b6b: 0x00c0, 0x3b6c: 0x00c0, 0x3b6d: 0x00c0, 0x3b6e: 0x00c0, 0x3b6f: 0x00c0, - 0x3b70: 0x00c0, 0x3b72: 0x00c0, 0x3b73: 0x00c0, 0x3b75: 0x00c0, - 0x3b76: 0x00c0, 0x3b77: 0x00c0, 0x3b78: 0x00c0, 0x3b79: 0x00c0, - 0x3b7c: 0x00c3, 0x3b7d: 0x00c0, 0x3b7e: 0x00c0, 0x3b7f: 0x00c0, - // Block 0xee, offset 0x3b80 - 0x3b80: 0x00c3, 0x3b81: 0x00c0, 0x3b82: 0x00c0, 0x3b83: 0x00c0, 0x3b84: 0x00c0, - 0x3b87: 0x00c0, 0x3b88: 0x00c0, 0x3b8b: 0x00c0, - 0x3b8c: 0x00c0, 0x3b8d: 0x00c5, 0x3b90: 0x00c0, - 0x3b97: 0x00c0, - 0x3b9d: 0x00c0, - 0x3b9e: 0x00c0, 0x3b9f: 0x00c0, 0x3ba0: 0x00c0, 0x3ba1: 0x00c0, 0x3ba2: 0x00c0, 0x3ba3: 0x00c0, - 0x3ba6: 0x00c3, 0x3ba7: 0x00c3, 0x3ba8: 0x00c3, 0x3ba9: 0x00c3, - 0x3baa: 0x00c3, 0x3bab: 0x00c3, 0x3bac: 0x00c3, - 0x3bb0: 0x00c3, 0x3bb1: 0x00c3, 0x3bb2: 0x00c3, 0x3bb3: 0x00c3, 0x3bb4: 0x00c3, - // Block 0xef, offset 0x3bc0 - 0x3bc0: 0x00c0, 0x3bc1: 0x00c0, 0x3bc2: 0x00c0, 0x3bc3: 0x00c0, 0x3bc4: 0x00c0, 0x3bc5: 0x00c0, - 0x3bc6: 0x00c0, 0x3bc7: 0x00c0, 0x3bc8: 0x00c0, 0x3bc9: 0x00c0, 0x3bca: 0x00c0, 0x3bcb: 0x00c0, - 0x3bcc: 0x00c0, 0x3bcd: 0x00c0, 0x3bce: 0x00c0, 0x3bcf: 0x00c0, 0x3bd0: 0x00c0, 0x3bd1: 0x00c0, - 0x3bd2: 0x00c0, 0x3bd3: 0x00c0, 0x3bd4: 0x00c0, 0x3bd5: 0x00c0, 0x3bd6: 0x00c0, 0x3bd7: 0x00c0, - 0x3bd8: 0x00c0, 0x3bd9: 0x00c0, 0x3bda: 0x00c0, 0x3bdb: 0x00c0, 0x3bdc: 0x00c0, 0x3bdd: 0x00c0, - 0x3bde: 0x00c0, 0x3bdf: 0x00c0, 0x3be0: 0x00c0, 0x3be1: 0x00c0, 0x3be2: 0x00c0, 0x3be3: 0x00c0, - 0x3be4: 0x00c0, 0x3be5: 0x00c0, 0x3be6: 0x00c0, 0x3be7: 0x00c0, 0x3be8: 0x00c0, 0x3be9: 0x00c0, - 0x3bea: 0x00c0, 0x3beb: 0x00c0, 0x3bec: 0x00c0, 0x3bed: 0x00c0, 0x3bee: 0x00c0, 0x3bef: 0x00c0, - 0x3bf0: 0x00c0, 0x3bf1: 0x00c0, 0x3bf2: 0x00c0, 0x3bf3: 0x00c0, 0x3bf4: 0x00c0, 0x3bf5: 0x00c0, - 0x3bf6: 0x00c0, 0x3bf7: 0x00c0, 0x3bf8: 0x00c3, 0x3bf9: 0x00c3, 0x3bfa: 0x00c3, 0x3bfb: 0x00c3, - 0x3bfc: 0x00c3, 0x3bfd: 0x00c3, 0x3bfe: 0x00c3, 0x3bff: 0x00c3, - // Block 0xf0, offset 0x3c00 - 0x3c00: 0x00c0, 0x3c01: 0x00c0, 0x3c02: 0x00c6, 0x3c03: 0x00c3, 0x3c04: 0x00c3, 0x3c05: 0x00c0, - 0x3c06: 0x00c3, 0x3c07: 0x00c0, 0x3c08: 0x00c0, 0x3c09: 0x00c0, 0x3c0a: 0x00c0, 0x3c0b: 0x0080, - 0x3c0c: 0x0080, 0x3c0d: 0x0080, 0x3c0e: 0x0080, 0x3c0f: 0x0080, 0x3c10: 0x00c0, 0x3c11: 0x00c0, - 0x3c12: 0x00c0, 0x3c13: 0x00c0, 0x3c14: 0x00c0, 0x3c15: 0x00c0, 0x3c16: 0x00c0, 0x3c17: 0x00c0, - 0x3c18: 0x00c0, 0x3c19: 0x00c0, 0x3c1b: 0x0080, 0x3c1d: 0x0080, - // Block 0xf1, offset 0x3c40 - 0x3c40: 0x00c0, 0x3c41: 0x00c0, 0x3c42: 0x00c0, 0x3c43: 0x00c0, 0x3c44: 0x00c0, 0x3c45: 0x00c0, - 0x3c46: 0x00c0, 0x3c47: 0x00c0, 0x3c48: 0x00c0, 0x3c49: 0x00c0, 0x3c4a: 0x00c0, 0x3c4b: 0x00c0, - 0x3c4c: 0x00c0, 0x3c4d: 0x00c0, 0x3c4e: 0x00c0, 0x3c4f: 0x00c0, 0x3c50: 0x00c0, 0x3c51: 0x00c0, - 0x3c52: 0x00c0, 0x3c53: 0x00c0, 0x3c54: 0x00c0, 0x3c55: 0x00c0, 0x3c56: 0x00c0, 0x3c57: 0x00c0, - 0x3c58: 0x00c0, 0x3c59: 0x00c0, 0x3c5a: 0x00c0, 0x3c5b: 0x00c0, 0x3c5c: 0x00c0, 0x3c5d: 0x00c0, - 0x3c5e: 0x00c0, 0x3c5f: 0x00c0, 0x3c60: 0x00c0, 0x3c61: 0x00c0, 0x3c62: 0x00c0, 0x3c63: 0x00c0, - 0x3c64: 0x00c0, 0x3c65: 0x00c0, 0x3c66: 0x00c0, 0x3c67: 0x00c0, 0x3c68: 0x00c0, 0x3c69: 0x00c0, - 0x3c6a: 0x00c0, 0x3c6b: 0x00c0, 0x3c6c: 0x00c0, 0x3c6d: 0x00c0, 0x3c6e: 0x00c0, 0x3c6f: 0x00c0, - 0x3c70: 0x00c0, 0x3c71: 0x00c0, 0x3c72: 0x00c0, 0x3c73: 0x00c3, 0x3c74: 0x00c3, 0x3c75: 0x00c3, - 0x3c76: 0x00c3, 0x3c77: 0x00c3, 0x3c78: 0x00c3, 0x3c79: 0x00c0, 0x3c7a: 0x00c3, 0x3c7b: 0x00c0, - 0x3c7c: 0x00c0, 0x3c7d: 0x00c0, 0x3c7e: 0x00c0, 0x3c7f: 0x00c3, - // Block 0xf2, offset 0x3c80 - 0x3c80: 0x00c3, 0x3c81: 0x00c0, 0x3c82: 0x00c6, 0x3c83: 0x00c3, 0x3c84: 0x00c0, 0x3c85: 0x00c0, - 0x3c86: 0x0080, 0x3c87: 0x00c0, - 0x3c90: 0x00c0, 0x3c91: 0x00c0, - 0x3c92: 0x00c0, 0x3c93: 0x00c0, 0x3c94: 0x00c0, 0x3c95: 0x00c0, 0x3c96: 0x00c0, 0x3c97: 0x00c0, - 0x3c98: 0x00c0, 0x3c99: 0x00c0, - // Block 0xf3, offset 0x3cc0 - 0x3cc0: 0x00c0, 0x3cc1: 0x00c0, 0x3cc2: 0x00c0, 0x3cc3: 0x00c0, 0x3cc4: 0x00c0, 0x3cc5: 0x00c0, - 0x3cc6: 0x00c0, 0x3cc7: 0x00c0, 0x3cc8: 0x00c0, 0x3cc9: 0x00c0, 0x3cca: 0x00c0, 0x3ccb: 0x00c0, - 0x3ccc: 0x00c0, 0x3ccd: 0x00c0, 0x3cce: 0x00c0, 0x3ccf: 0x00c0, 0x3cd0: 0x00c0, 0x3cd1: 0x00c0, - 0x3cd2: 0x00c0, 0x3cd3: 0x00c0, 0x3cd4: 0x00c0, 0x3cd5: 0x00c0, 0x3cd6: 0x00c0, 0x3cd7: 0x00c0, - 0x3cd8: 0x00c0, 0x3cd9: 0x00c0, 0x3cda: 0x00c0, 0x3cdb: 0x00c0, 0x3cdc: 0x00c0, 0x3cdd: 0x00c0, - 0x3cde: 0x00c0, 0x3cdf: 0x00c0, 0x3ce0: 0x00c0, 0x3ce1: 0x00c0, 0x3ce2: 0x00c0, 0x3ce3: 0x00c0, - 0x3ce4: 0x00c0, 0x3ce5: 0x00c0, 0x3ce6: 0x00c0, 0x3ce7: 0x00c0, 0x3ce8: 0x00c0, 0x3ce9: 0x00c0, - 0x3cea: 0x00c0, 0x3ceb: 0x00c0, 0x3cec: 0x00c0, 0x3ced: 0x00c0, 0x3cee: 0x00c0, 0x3cef: 0x00c0, - 0x3cf0: 0x00c0, 0x3cf1: 0x00c0, 0x3cf2: 0x00c3, 0x3cf3: 0x00c3, 0x3cf4: 0x00c3, 0x3cf5: 0x00c3, - 0x3cf8: 0x00c0, 0x3cf9: 0x00c0, 0x3cfa: 0x00c0, 0x3cfb: 0x00c0, - 0x3cfc: 0x00c3, 0x3cfd: 0x00c3, 0x3cfe: 0x00c0, 0x3cff: 0x00c6, - // Block 0xf4, offset 0x3d00 - 0x3d00: 0x00c3, 0x3d01: 0x0080, 0x3d02: 0x0080, 0x3d03: 0x0080, 0x3d04: 0x0080, 0x3d05: 0x0080, - 0x3d06: 0x0080, 0x3d07: 0x0080, 0x3d08: 0x0080, 0x3d09: 0x0080, 0x3d0a: 0x0080, 0x3d0b: 0x0080, - 0x3d0c: 0x0080, 0x3d0d: 0x0080, 0x3d0e: 0x0080, 0x3d0f: 0x0080, 0x3d10: 0x0080, 0x3d11: 0x0080, - 0x3d12: 0x0080, 0x3d13: 0x0080, 0x3d14: 0x0080, 0x3d15: 0x0080, 0x3d16: 0x0080, 0x3d17: 0x0080, - 0x3d18: 0x00c0, 0x3d19: 0x00c0, 0x3d1a: 0x00c0, 0x3d1b: 0x00c0, 0x3d1c: 0x00c3, 0x3d1d: 0x00c3, - // Block 0xf5, offset 0x3d40 - 0x3d40: 0x00c0, 0x3d41: 0x00c0, 0x3d42: 0x00c0, 0x3d43: 0x00c0, 0x3d44: 0x00c0, 0x3d45: 0x00c0, - 0x3d46: 0x00c0, 0x3d47: 0x00c0, 0x3d48: 0x00c0, 0x3d49: 0x00c0, 0x3d4a: 0x00c0, 0x3d4b: 0x00c0, - 0x3d4c: 0x00c0, 0x3d4d: 0x00c0, 0x3d4e: 0x00c0, 0x3d4f: 0x00c0, 0x3d50: 0x00c0, 0x3d51: 0x00c0, - 0x3d52: 0x00c0, 0x3d53: 0x00c0, 0x3d54: 0x00c0, 0x3d55: 0x00c0, 0x3d56: 0x00c0, 0x3d57: 0x00c0, - 0x3d58: 0x00c0, 0x3d59: 0x00c0, 0x3d5a: 0x00c0, 0x3d5b: 0x00c0, 0x3d5c: 0x00c0, 0x3d5d: 0x00c0, - 0x3d5e: 0x00c0, 0x3d5f: 0x00c0, 0x3d60: 0x00c0, 0x3d61: 0x00c0, 0x3d62: 0x00c0, 0x3d63: 0x00c0, - 0x3d64: 0x00c0, 0x3d65: 0x00c0, 0x3d66: 0x00c0, 0x3d67: 0x00c0, 0x3d68: 0x00c0, 0x3d69: 0x00c0, - 0x3d6a: 0x00c0, 0x3d6b: 0x00c0, 0x3d6c: 0x00c0, 0x3d6d: 0x00c0, 0x3d6e: 0x00c0, 0x3d6f: 0x00c0, - 0x3d70: 0x00c0, 0x3d71: 0x00c0, 0x3d72: 0x00c0, 0x3d73: 0x00c3, 0x3d74: 0x00c3, 0x3d75: 0x00c3, - 0x3d76: 0x00c3, 0x3d77: 0x00c3, 0x3d78: 0x00c3, 0x3d79: 0x00c3, 0x3d7a: 0x00c3, 0x3d7b: 0x00c0, - 0x3d7c: 0x00c0, 0x3d7d: 0x00c3, 0x3d7e: 0x00c0, 0x3d7f: 0x00c6, - // Block 0xf6, offset 0x3d80 - 0x3d80: 0x00c3, 0x3d81: 0x0080, 0x3d82: 0x0080, 0x3d83: 0x0080, 0x3d84: 0x00c0, - 0x3d90: 0x00c0, 0x3d91: 0x00c0, - 0x3d92: 0x00c0, 0x3d93: 0x00c0, 0x3d94: 0x00c0, 0x3d95: 0x00c0, 0x3d96: 0x00c0, 0x3d97: 0x00c0, - 0x3d98: 0x00c0, 0x3d99: 0x00c0, - 0x3da0: 0x0080, 0x3da1: 0x0080, 0x3da2: 0x0080, 0x3da3: 0x0080, - 0x3da4: 0x0080, 0x3da5: 0x0080, 0x3da6: 0x0080, 0x3da7: 0x0080, 0x3da8: 0x0080, 0x3da9: 0x0080, - 0x3daa: 0x0080, 0x3dab: 0x0080, 0x3dac: 0x0080, - // Block 0xf7, offset 0x3dc0 - 0x3dc0: 0x00c0, 0x3dc1: 0x00c0, 0x3dc2: 0x00c0, 0x3dc3: 0x00c0, 0x3dc4: 0x00c0, 0x3dc5: 0x00c0, - 0x3dc6: 0x00c0, 0x3dc7: 0x00c0, 0x3dc8: 0x00c0, 0x3dc9: 0x00c0, 0x3dca: 0x00c0, 0x3dcb: 0x00c0, - 0x3dcc: 0x00c0, 0x3dcd: 0x00c0, 0x3dce: 0x00c0, 0x3dcf: 0x00c0, 0x3dd0: 0x00c0, 0x3dd1: 0x00c0, - 0x3dd2: 0x00c0, 0x3dd3: 0x00c0, 0x3dd4: 0x00c0, 0x3dd5: 0x00c0, 0x3dd6: 0x00c0, 0x3dd7: 0x00c0, - 0x3dd8: 0x00c0, 0x3dd9: 0x00c0, 0x3dda: 0x00c0, 0x3ddb: 0x00c0, 0x3ddc: 0x00c0, 0x3ddd: 0x00c0, - 0x3dde: 0x00c0, 0x3ddf: 0x00c0, 0x3de0: 0x00c0, 0x3de1: 0x00c0, 0x3de2: 0x00c0, 0x3de3: 0x00c0, - 0x3de4: 0x00c0, 0x3de5: 0x00c0, 0x3de6: 0x00c0, 0x3de7: 0x00c0, 0x3de8: 0x00c0, 0x3de9: 0x00c0, - 0x3dea: 0x00c0, 0x3deb: 0x00c3, 0x3dec: 0x00c0, 0x3ded: 0x00c3, 0x3dee: 0x00c0, 0x3def: 0x00c0, - 0x3df0: 0x00c3, 0x3df1: 0x00c3, 0x3df2: 0x00c3, 0x3df3: 0x00c3, 0x3df4: 0x00c3, 0x3df5: 0x00c3, - 0x3df6: 0x00c5, 0x3df7: 0x00c3, - // Block 0xf8, offset 0x3e00 - 0x3e00: 0x00c0, 0x3e01: 0x00c0, 0x3e02: 0x00c0, 0x3e03: 0x00c0, 0x3e04: 0x00c0, 0x3e05: 0x00c0, - 0x3e06: 0x00c0, 0x3e07: 0x00c0, 0x3e08: 0x00c0, 0x3e09: 0x00c0, - // Block 0xf9, offset 0x3e40 - 0x3e40: 0x00c0, 0x3e41: 0x00c0, 0x3e42: 0x00c0, 0x3e43: 0x00c0, 0x3e44: 0x00c0, 0x3e45: 0x00c0, - 0x3e46: 0x00c0, 0x3e47: 0x00c0, 0x3e48: 0x00c0, 0x3e49: 0x00c0, 0x3e4a: 0x00c0, 0x3e4b: 0x00c0, - 0x3e4c: 0x00c0, 0x3e4d: 0x00c0, 0x3e4e: 0x00c0, 0x3e4f: 0x00c0, 0x3e50: 0x00c0, 0x3e51: 0x00c0, - 0x3e52: 0x00c0, 0x3e53: 0x00c0, 0x3e54: 0x00c0, 0x3e55: 0x00c0, 0x3e56: 0x00c0, 0x3e57: 0x00c0, - 0x3e58: 0x00c0, 0x3e59: 0x00c0, 0x3e5d: 0x00c3, - 0x3e5e: 0x00c3, 0x3e5f: 0x00c3, 0x3e60: 0x00c0, 0x3e61: 0x00c0, 0x3e62: 0x00c3, 0x3e63: 0x00c3, - 0x3e64: 0x00c3, 0x3e65: 0x00c3, 0x3e66: 0x00c0, 0x3e67: 0x00c3, 0x3e68: 0x00c3, 0x3e69: 0x00c3, - 0x3e6a: 0x00c3, 0x3e6b: 0x00c6, - 0x3e70: 0x00c0, 0x3e71: 0x00c0, 0x3e72: 0x00c0, 0x3e73: 0x00c0, 0x3e74: 0x00c0, 0x3e75: 0x00c0, - 0x3e76: 0x00c0, 0x3e77: 0x00c0, 0x3e78: 0x00c0, 0x3e79: 0x00c0, 0x3e7a: 0x0080, 0x3e7b: 0x0080, - 0x3e7c: 0x0080, 0x3e7d: 0x0080, 0x3e7e: 0x0080, 0x3e7f: 0x0080, - // Block 0xfa, offset 0x3e80 - 0x3ea0: 0x00c0, 0x3ea1: 0x00c0, 0x3ea2: 0x00c0, 0x3ea3: 0x00c0, - 0x3ea4: 0x00c0, 0x3ea5: 0x00c0, 0x3ea6: 0x00c0, 0x3ea7: 0x00c0, 0x3ea8: 0x00c0, 0x3ea9: 0x00c0, - 0x3eaa: 0x00c0, 0x3eab: 0x00c0, 0x3eac: 0x00c0, 0x3ead: 0x00c0, 0x3eae: 0x00c0, 0x3eaf: 0x00c0, - 0x3eb0: 0x00c0, 0x3eb1: 0x00c0, 0x3eb2: 0x00c0, 0x3eb3: 0x00c0, 0x3eb4: 0x00c0, 0x3eb5: 0x00c0, - 0x3eb6: 0x00c0, 0x3eb7: 0x00c0, 0x3eb8: 0x00c0, 0x3eb9: 0x00c0, 0x3eba: 0x00c0, 0x3ebb: 0x00c0, - 0x3ebc: 0x00c0, 0x3ebd: 0x00c0, 0x3ebe: 0x00c0, 0x3ebf: 0x00c0, - // Block 0xfb, offset 0x3ec0 - 0x3ec0: 0x00c0, 0x3ec1: 0x00c0, 0x3ec2: 0x00c0, 0x3ec3: 0x00c0, 0x3ec4: 0x00c0, 0x3ec5: 0x00c0, - 0x3ec6: 0x00c0, 0x3ec7: 0x00c0, 0x3ec8: 0x00c0, 0x3ec9: 0x00c0, 0x3eca: 0x00c0, 0x3ecb: 0x00c0, - 0x3ecc: 0x00c0, 0x3ecd: 0x00c0, 0x3ece: 0x00c0, 0x3ecf: 0x00c0, 0x3ed0: 0x00c0, 0x3ed1: 0x00c0, - 0x3ed2: 0x00c0, 0x3ed3: 0x00c0, 0x3ed4: 0x00c0, 0x3ed5: 0x00c0, 0x3ed6: 0x00c0, 0x3ed7: 0x00c0, - 0x3ed8: 0x00c0, 0x3ed9: 0x00c0, 0x3eda: 0x00c0, 0x3edb: 0x00c0, 0x3edc: 0x00c0, 0x3edd: 0x00c0, - 0x3ede: 0x00c0, 0x3edf: 0x00c0, 0x3ee0: 0x00c0, 0x3ee1: 0x00c0, 0x3ee2: 0x00c0, 0x3ee3: 0x00c0, - 0x3ee4: 0x00c0, 0x3ee5: 0x00c0, 0x3ee6: 0x00c0, 0x3ee7: 0x00c0, 0x3ee8: 0x00c0, 0x3ee9: 0x00c0, - 0x3eea: 0x0080, 0x3eeb: 0x0080, 0x3eec: 0x0080, 0x3eed: 0x0080, 0x3eee: 0x0080, 0x3eef: 0x0080, - 0x3ef0: 0x0080, 0x3ef1: 0x0080, 0x3ef2: 0x0080, - 0x3eff: 0x00c0, - // Block 0xfc, offset 0x3f00 - 0x3f00: 0x00c0, 0x3f01: 0x00c0, 0x3f02: 0x00c0, 0x3f03: 0x00c0, 0x3f04: 0x00c0, 0x3f05: 0x00c0, - 0x3f06: 0x00c0, 0x3f07: 0x00c0, 0x3f08: 0x00c0, 0x3f09: 0x00c0, 0x3f0a: 0x00c0, 0x3f0b: 0x00c0, - 0x3f0c: 0x00c0, 0x3f0d: 0x00c0, 0x3f0e: 0x00c0, 0x3f0f: 0x00c0, 0x3f10: 0x00c0, 0x3f11: 0x00c0, - 0x3f12: 0x00c0, 0x3f13: 0x00c0, 0x3f14: 0x00c0, 0x3f15: 0x00c0, 0x3f16: 0x00c0, 0x3f17: 0x00c0, - 0x3f18: 0x00c0, 0x3f19: 0x00c0, 0x3f1a: 0x00c0, 0x3f1b: 0x00c0, 0x3f1c: 0x00c0, 0x3f1d: 0x00c0, - 0x3f1e: 0x00c0, 0x3f1f: 0x00c0, 0x3f20: 0x00c0, 0x3f21: 0x00c0, 0x3f22: 0x00c0, 0x3f23: 0x00c0, - 0x3f24: 0x00c0, 0x3f25: 0x00c0, 0x3f26: 0x00c0, 0x3f27: 0x00c0, 0x3f28: 0x00c0, 0x3f29: 0x00c0, - 0x3f2a: 0x00c0, 0x3f2b: 0x00c0, 0x3f2c: 0x00c0, 0x3f2d: 0x00c0, 0x3f2e: 0x00c0, 0x3f2f: 0x00c0, - 0x3f30: 0x00c0, 0x3f31: 0x00c0, 0x3f32: 0x00c0, 0x3f33: 0x00c0, 0x3f34: 0x00c0, 0x3f35: 0x00c0, - 0x3f36: 0x00c0, 0x3f37: 0x00c0, 0x3f38: 0x00c0, - // Block 0xfd, offset 0x3f40 - 0x3f40: 0x00c0, 0x3f41: 0x00c0, 0x3f42: 0x00c0, 0x3f43: 0x00c0, 0x3f44: 0x00c0, 0x3f45: 0x00c0, - 0x3f46: 0x00c0, 0x3f47: 0x00c0, 0x3f48: 0x00c0, 0x3f4a: 0x00c0, 0x3f4b: 0x00c0, - 0x3f4c: 0x00c0, 0x3f4d: 0x00c0, 0x3f4e: 0x00c0, 0x3f4f: 0x00c0, 0x3f50: 0x00c0, 0x3f51: 0x00c0, - 0x3f52: 0x00c0, 0x3f53: 0x00c0, 0x3f54: 0x00c0, 0x3f55: 0x00c0, 0x3f56: 0x00c0, 0x3f57: 0x00c0, - 0x3f58: 0x00c0, 0x3f59: 0x00c0, 0x3f5a: 0x00c0, 0x3f5b: 0x00c0, 0x3f5c: 0x00c0, 0x3f5d: 0x00c0, - 0x3f5e: 0x00c0, 0x3f5f: 0x00c0, 0x3f60: 0x00c0, 0x3f61: 0x00c0, 0x3f62: 0x00c0, 0x3f63: 0x00c0, - 0x3f64: 0x00c0, 0x3f65: 0x00c0, 0x3f66: 0x00c0, 0x3f67: 0x00c0, 0x3f68: 0x00c0, 0x3f69: 0x00c0, - 0x3f6a: 0x00c0, 0x3f6b: 0x00c0, 0x3f6c: 0x00c0, 0x3f6d: 0x00c0, 0x3f6e: 0x00c0, 0x3f6f: 0x00c0, - 0x3f70: 0x00c3, 0x3f71: 0x00c3, 0x3f72: 0x00c3, 0x3f73: 0x00c3, 0x3f74: 0x00c3, 0x3f75: 0x00c3, - 0x3f76: 0x00c3, 0x3f78: 0x00c3, 0x3f79: 0x00c3, 0x3f7a: 0x00c3, 0x3f7b: 0x00c3, - 0x3f7c: 0x00c3, 0x3f7d: 0x00c3, 0x3f7e: 0x00c0, 0x3f7f: 0x00c6, - // Block 0xfe, offset 0x3f80 - 0x3f80: 0x00c0, 0x3f81: 0x0080, 0x3f82: 0x0080, 0x3f83: 0x0080, 0x3f84: 0x0080, 0x3f85: 0x0080, - 0x3f90: 0x00c0, 0x3f91: 0x00c0, - 0x3f92: 0x00c0, 0x3f93: 0x00c0, 0x3f94: 0x00c0, 0x3f95: 0x00c0, 0x3f96: 0x00c0, 0x3f97: 0x00c0, - 0x3f98: 0x00c0, 0x3f99: 0x00c0, 0x3f9a: 0x0080, 0x3f9b: 0x0080, 0x3f9c: 0x0080, 0x3f9d: 0x0080, - 0x3f9e: 0x0080, 0x3f9f: 0x0080, 0x3fa0: 0x0080, 0x3fa1: 0x0080, 0x3fa2: 0x0080, 0x3fa3: 0x0080, - 0x3fa4: 0x0080, 0x3fa5: 0x0080, 0x3fa6: 0x0080, 0x3fa7: 0x0080, 0x3fa8: 0x0080, 0x3fa9: 0x0080, - 0x3faa: 0x0080, 0x3fab: 0x0080, 0x3fac: 0x0080, - 0x3fb0: 0x0080, 0x3fb1: 0x0080, 0x3fb2: 0x00c0, 0x3fb3: 0x00c0, 0x3fb4: 0x00c0, 0x3fb5: 0x00c0, - 0x3fb6: 0x00c0, 0x3fb7: 0x00c0, 0x3fb8: 0x00c0, 0x3fb9: 0x00c0, 0x3fba: 0x00c0, 0x3fbb: 0x00c0, - 0x3fbc: 0x00c0, 0x3fbd: 0x00c0, 0x3fbe: 0x00c0, 0x3fbf: 0x00c0, - // Block 0xff, offset 0x3fc0 - 0x3fc0: 0x00c0, 0x3fc1: 0x00c0, 0x3fc2: 0x00c0, 0x3fc3: 0x00c0, 0x3fc4: 0x00c0, 0x3fc5: 0x00c0, - 0x3fc6: 0x00c0, 0x3fc7: 0x00c0, 0x3fc8: 0x00c0, 0x3fc9: 0x00c0, 0x3fca: 0x00c0, 0x3fcb: 0x00c0, - 0x3fcc: 0x00c0, 0x3fcd: 0x00c0, 0x3fce: 0x00c0, 0x3fcf: 0x00c0, - 0x3fd2: 0x00c3, 0x3fd3: 0x00c3, 0x3fd4: 0x00c3, 0x3fd5: 0x00c3, 0x3fd6: 0x00c3, 0x3fd7: 0x00c3, - 0x3fd8: 0x00c3, 0x3fd9: 0x00c3, 0x3fda: 0x00c3, 0x3fdb: 0x00c3, 0x3fdc: 0x00c3, 0x3fdd: 0x00c3, - 0x3fde: 0x00c3, 0x3fdf: 0x00c3, 0x3fe0: 0x00c3, 0x3fe1: 0x00c3, 0x3fe2: 0x00c3, 0x3fe3: 0x00c3, - 0x3fe4: 0x00c3, 0x3fe5: 0x00c3, 0x3fe6: 0x00c3, 0x3fe7: 0x00c3, 0x3fe9: 0x00c0, - 0x3fea: 0x00c3, 0x3feb: 0x00c3, 0x3fec: 0x00c3, 0x3fed: 0x00c3, 0x3fee: 0x00c3, 0x3fef: 0x00c3, - 0x3ff0: 0x00c3, 0x3ff1: 0x00c0, 0x3ff2: 0x00c3, 0x3ff3: 0x00c3, 0x3ff4: 0x00c0, 0x3ff5: 0x00c3, - 0x3ff6: 0x00c3, - // Block 0x100, offset 0x4000 - 0x4000: 0x00c0, 0x4001: 0x00c0, 0x4002: 0x00c0, 0x4003: 0x00c0, 0x4004: 0x00c0, 0x4005: 0x00c0, - 0x4006: 0x00c0, 0x4007: 0x00c0, 0x4008: 0x00c0, 0x4009: 0x00c0, 0x400a: 0x00c0, 0x400b: 0x00c0, - 0x400c: 0x00c0, 0x400d: 0x00c0, 0x400e: 0x00c0, 0x400f: 0x00c0, 0x4010: 0x00c0, 0x4011: 0x00c0, - 0x4012: 0x00c0, 0x4013: 0x00c0, 0x4014: 0x00c0, 0x4015: 0x00c0, 0x4016: 0x00c0, 0x4017: 0x00c0, - 0x4018: 0x00c0, 0x4019: 0x00c0, - // Block 0x101, offset 0x4040 - 0x4040: 0x0080, 0x4041: 0x0080, 0x4042: 0x0080, 0x4043: 0x0080, 0x4044: 0x0080, 0x4045: 0x0080, - 0x4046: 0x0080, 0x4047: 0x0080, 0x4048: 0x0080, 0x4049: 0x0080, 0x404a: 0x0080, 0x404b: 0x0080, - 0x404c: 0x0080, 0x404d: 0x0080, 0x404e: 0x0080, 0x404f: 0x0080, 0x4050: 0x0080, 0x4051: 0x0080, - 0x4052: 0x0080, 0x4053: 0x0080, 0x4054: 0x0080, 0x4055: 0x0080, 0x4056: 0x0080, 0x4057: 0x0080, - 0x4058: 0x0080, 0x4059: 0x0080, 0x405a: 0x0080, 0x405b: 0x0080, 0x405c: 0x0080, 0x405d: 0x0080, - 0x405e: 0x0080, 0x405f: 0x0080, 0x4060: 0x0080, 0x4061: 0x0080, 0x4062: 0x0080, 0x4063: 0x0080, - 0x4064: 0x0080, 0x4065: 0x0080, 0x4066: 0x0080, 0x4067: 0x0080, 0x4068: 0x0080, 0x4069: 0x0080, - 0x406a: 0x0080, 0x406b: 0x0080, 0x406c: 0x0080, 0x406d: 0x0080, 0x406e: 0x0080, - 0x4070: 0x0080, 0x4071: 0x0080, 0x4072: 0x0080, 0x4073: 0x0080, 0x4074: 0x0080, - // Block 0x102, offset 0x4080 - 0x4080: 0x00c0, 0x4081: 0x00c0, 0x4082: 0x00c0, 0x4083: 0x00c0, - // Block 0x103, offset 0x40c0 - 0x40c0: 0x00c0, 0x40c1: 0x00c0, 0x40c2: 0x00c0, 0x40c3: 0x00c0, 0x40c4: 0x00c0, 0x40c5: 0x00c0, - 0x40c6: 0x00c0, 0x40c7: 0x00c0, 0x40c8: 0x00c0, 0x40c9: 0x00c0, 0x40ca: 0x00c0, 0x40cb: 0x00c0, - 0x40cc: 0x00c0, 0x40cd: 0x00c0, 0x40ce: 0x00c0, 0x40cf: 0x00c0, 0x40d0: 0x00c0, 0x40d1: 0x00c0, - 0x40d2: 0x00c0, 0x40d3: 0x00c0, 0x40d4: 0x00c0, 0x40d5: 0x00c0, 0x40d6: 0x00c0, 0x40d7: 0x00c0, - 0x40d8: 0x00c0, 0x40d9: 0x00c0, 0x40da: 0x00c0, 0x40db: 0x00c0, 0x40dc: 0x00c0, 0x40dd: 0x00c0, - 0x40de: 0x00c0, 0x40df: 0x00c0, 0x40e0: 0x00c0, 0x40e1: 0x00c0, 0x40e2: 0x00c0, 0x40e3: 0x00c0, - 0x40e4: 0x00c0, 0x40e5: 0x00c0, 0x40e6: 0x00c0, 0x40e7: 0x00c0, 0x40e8: 0x00c0, 0x40e9: 0x00c0, - 0x40ea: 0x00c0, 0x40eb: 0x00c0, 0x40ec: 0x00c0, 0x40ed: 0x00c0, 0x40ee: 0x00c0, - // Block 0x104, offset 0x4100 - 0x4100: 0x00c0, 0x4101: 0x00c0, 0x4102: 0x00c0, 0x4103: 0x00c0, 0x4104: 0x00c0, 0x4105: 0x00c0, - 0x4106: 0x00c0, - // Block 0x105, offset 0x4140 - 0x4140: 0x00c0, 0x4141: 0x00c0, 0x4142: 0x00c0, 0x4143: 0x00c0, 0x4144: 0x00c0, 0x4145: 0x00c0, - 0x4146: 0x00c0, 0x4147: 0x00c0, 0x4148: 0x00c0, 0x4149: 0x00c0, 0x414a: 0x00c0, 0x414b: 0x00c0, - 0x414c: 0x00c0, 0x414d: 0x00c0, 0x414e: 0x00c0, 0x414f: 0x00c0, 0x4150: 0x00c0, 0x4151: 0x00c0, - 0x4152: 0x00c0, 0x4153: 0x00c0, 0x4154: 0x00c0, 0x4155: 0x00c0, 0x4156: 0x00c0, 0x4157: 0x00c0, - 0x4158: 0x00c0, 0x4159: 0x00c0, 0x415a: 0x00c0, 0x415b: 0x00c0, 0x415c: 0x00c0, 0x415d: 0x00c0, - 0x415e: 0x00c0, 0x4160: 0x00c0, 0x4161: 0x00c0, 0x4162: 0x00c0, 0x4163: 0x00c0, - 0x4164: 0x00c0, 0x4165: 0x00c0, 0x4166: 0x00c0, 0x4167: 0x00c0, 0x4168: 0x00c0, 0x4169: 0x00c0, - 0x416e: 0x0080, 0x416f: 0x0080, - // Block 0x106, offset 0x4180 - 0x4190: 0x00c0, 0x4191: 0x00c0, - 0x4192: 0x00c0, 0x4193: 0x00c0, 0x4194: 0x00c0, 0x4195: 0x00c0, 0x4196: 0x00c0, 0x4197: 0x00c0, - 0x4198: 0x00c0, 0x4199: 0x00c0, 0x419a: 0x00c0, 0x419b: 0x00c0, 0x419c: 0x00c0, 0x419d: 0x00c0, - 0x419e: 0x00c0, 0x419f: 0x00c0, 0x41a0: 0x00c0, 0x41a1: 0x00c0, 0x41a2: 0x00c0, 0x41a3: 0x00c0, - 0x41a4: 0x00c0, 0x41a5: 0x00c0, 0x41a6: 0x00c0, 0x41a7: 0x00c0, 0x41a8: 0x00c0, 0x41a9: 0x00c0, - 0x41aa: 0x00c0, 0x41ab: 0x00c0, 0x41ac: 0x00c0, 0x41ad: 0x00c0, - 0x41b0: 0x00c3, 0x41b1: 0x00c3, 0x41b2: 0x00c3, 0x41b3: 0x00c3, 0x41b4: 0x00c3, 0x41b5: 0x0080, - // Block 0x107, offset 0x41c0 - 0x41c0: 0x00c0, 0x41c1: 0x00c0, 0x41c2: 0x00c0, 0x41c3: 0x00c0, 0x41c4: 0x00c0, 0x41c5: 0x00c0, - 0x41c6: 0x00c0, 0x41c7: 0x00c0, 0x41c8: 0x00c0, 0x41c9: 0x00c0, 0x41ca: 0x00c0, 0x41cb: 0x00c0, - 0x41cc: 0x00c0, 0x41cd: 0x00c0, 0x41ce: 0x00c0, 0x41cf: 0x00c0, 0x41d0: 0x00c0, 0x41d1: 0x00c0, - 0x41d2: 0x00c0, 0x41d3: 0x00c0, 0x41d4: 0x00c0, 0x41d5: 0x00c0, 0x41d6: 0x00c0, 0x41d7: 0x00c0, - 0x41d8: 0x00c0, 0x41d9: 0x00c0, 0x41da: 0x00c0, 0x41db: 0x00c0, 0x41dc: 0x00c0, 0x41dd: 0x00c0, - 0x41de: 0x00c0, 0x41df: 0x00c0, 0x41e0: 0x00c0, 0x41e1: 0x00c0, 0x41e2: 0x00c0, 0x41e3: 0x00c0, - 0x41e4: 0x00c0, 0x41e5: 0x00c0, 0x41e6: 0x00c0, 0x41e7: 0x00c0, 0x41e8: 0x00c0, 0x41e9: 0x00c0, - 0x41ea: 0x00c0, 0x41eb: 0x00c0, 0x41ec: 0x00c0, 0x41ed: 0x00c0, 0x41ee: 0x00c0, 0x41ef: 0x00c0, - 0x41f0: 0x00c3, 0x41f1: 0x00c3, 0x41f2: 0x00c3, 0x41f3: 0x00c3, 0x41f4: 0x00c3, 0x41f5: 0x00c3, - 0x41f6: 0x00c3, 0x41f7: 0x0080, 0x41f8: 0x0080, 0x41f9: 0x0080, 0x41fa: 0x0080, 0x41fb: 0x0080, - 0x41fc: 0x0080, 0x41fd: 0x0080, 0x41fe: 0x0080, 0x41ff: 0x0080, - // Block 0x108, offset 0x4200 - 0x4200: 0x00c0, 0x4201: 0x00c0, 0x4202: 0x00c0, 0x4203: 0x00c0, 0x4204: 0x0080, 0x4205: 0x0080, - 0x4210: 0x00c0, 0x4211: 0x00c0, - 0x4212: 0x00c0, 0x4213: 0x00c0, 0x4214: 0x00c0, 0x4215: 0x00c0, 0x4216: 0x00c0, 0x4217: 0x00c0, - 0x4218: 0x00c0, 0x4219: 0x00c0, 0x421b: 0x0080, 0x421c: 0x0080, 0x421d: 0x0080, - 0x421e: 0x0080, 0x421f: 0x0080, 0x4220: 0x0080, 0x4221: 0x0080, 0x4223: 0x00c0, - 0x4224: 0x00c0, 0x4225: 0x00c0, 0x4226: 0x00c0, 0x4227: 0x00c0, 0x4228: 0x00c0, 0x4229: 0x00c0, - 0x422a: 0x00c0, 0x422b: 0x00c0, 0x422c: 0x00c0, 0x422d: 0x00c0, 0x422e: 0x00c0, 0x422f: 0x00c0, - 0x4230: 0x00c0, 0x4231: 0x00c0, 0x4232: 0x00c0, 0x4233: 0x00c0, 0x4234: 0x00c0, 0x4235: 0x00c0, - 0x4236: 0x00c0, 0x4237: 0x00c0, - 0x423d: 0x00c0, 0x423e: 0x00c0, 0x423f: 0x00c0, - // Block 0x109, offset 0x4240 - 0x4240: 0x00c0, 0x4241: 0x00c0, 0x4242: 0x00c0, 0x4243: 0x00c0, 0x4244: 0x00c0, 0x4245: 0x00c0, - 0x4246: 0x00c0, 0x4247: 0x00c0, 0x4248: 0x00c0, 0x4249: 0x00c0, 0x424a: 0x00c0, 0x424b: 0x00c0, - 0x424c: 0x00c0, 0x424d: 0x00c0, 0x424e: 0x00c0, 0x424f: 0x00c0, - // Block 0x10a, offset 0x4280 - 0x4280: 0x00c0, 0x4281: 0x00c0, 0x4282: 0x00c0, 0x4283: 0x00c0, 0x4284: 0x00c0, - 0x4290: 0x00c0, 0x4291: 0x00c0, - 0x4292: 0x00c0, 0x4293: 0x00c0, 0x4294: 0x00c0, 0x4295: 0x00c0, 0x4296: 0x00c0, 0x4297: 0x00c0, - 0x4298: 0x00c0, 0x4299: 0x00c0, 0x429a: 0x00c0, 0x429b: 0x00c0, 0x429c: 0x00c0, 0x429d: 0x00c0, - 0x429e: 0x00c0, 0x429f: 0x00c0, 0x42a0: 0x00c0, 0x42a1: 0x00c0, 0x42a2: 0x00c0, 0x42a3: 0x00c0, - 0x42a4: 0x00c0, 0x42a5: 0x00c0, 0x42a6: 0x00c0, 0x42a7: 0x00c0, 0x42a8: 0x00c0, 0x42a9: 0x00c0, - 0x42aa: 0x00c0, 0x42ab: 0x00c0, 0x42ac: 0x00c0, 0x42ad: 0x00c0, 0x42ae: 0x00c0, 0x42af: 0x00c0, - 0x42b0: 0x00c0, 0x42b1: 0x00c0, 0x42b2: 0x00c0, 0x42b3: 0x00c0, 0x42b4: 0x00c0, 0x42b5: 0x00c0, - 0x42b6: 0x00c0, 0x42b7: 0x00c0, 0x42b8: 0x00c0, 0x42b9: 0x00c0, 0x42ba: 0x00c0, 0x42bb: 0x00c0, - 0x42bc: 0x00c0, 0x42bd: 0x00c0, 0x42be: 0x00c0, - // Block 0x10b, offset 0x42c0 - 0x42cf: 0x00c3, 0x42d0: 0x00c3, 0x42d1: 0x00c3, - 0x42d2: 0x00c3, 0x42d3: 0x00c0, 0x42d4: 0x00c0, 0x42d5: 0x00c0, 0x42d6: 0x00c0, 0x42d7: 0x00c0, - 0x42d8: 0x00c0, 0x42d9: 0x00c0, 0x42da: 0x00c0, 0x42db: 0x00c0, 0x42dc: 0x00c0, 0x42dd: 0x00c0, - 0x42de: 0x00c0, 0x42df: 0x00c0, - // Block 0x10c, offset 0x4300 - 0x4320: 0x00c0, - // Block 0x10d, offset 0x4340 - 0x4340: 0x00c0, 0x4341: 0x00c0, 0x4342: 0x00c0, 0x4343: 0x00c0, 0x4344: 0x00c0, 0x4345: 0x00c0, - 0x4346: 0x00c0, 0x4347: 0x00c0, 0x4348: 0x00c0, 0x4349: 0x00c0, 0x434a: 0x00c0, 0x434b: 0x00c0, - 0x434c: 0x00c0, 0x434d: 0x00c0, 0x434e: 0x00c0, 0x434f: 0x00c0, 0x4350: 0x00c0, 0x4351: 0x00c0, - 0x4352: 0x00c0, 0x4353: 0x00c0, 0x4354: 0x00c0, 0x4355: 0x00c0, 0x4356: 0x00c0, 0x4357: 0x00c0, - 0x4358: 0x00c0, 0x4359: 0x00c0, 0x435a: 0x00c0, 0x435b: 0x00c0, 0x435c: 0x00c0, 0x435d: 0x00c0, - 0x435e: 0x00c0, 0x435f: 0x00c0, 0x4360: 0x00c0, 0x4361: 0x00c0, 0x4362: 0x00c0, 0x4363: 0x00c0, - 0x4364: 0x00c0, 0x4365: 0x00c0, 0x4366: 0x00c0, 0x4367: 0x00c0, 0x4368: 0x00c0, 0x4369: 0x00c0, - 0x436a: 0x00c0, 0x436b: 0x00c0, 0x436c: 0x00c0, - // Block 0x10e, offset 0x4380 - 0x4380: 0x00cc, 0x4381: 0x00cc, - // Block 0x10f, offset 0x43c0 - 0x43c0: 0x00c0, 0x43c1: 0x00c0, 0x43c2: 0x00c0, 0x43c3: 0x00c0, 0x43c4: 0x00c0, 0x43c5: 0x00c0, - 0x43c6: 0x00c0, 0x43c7: 0x00c0, 0x43c8: 0x00c0, 0x43c9: 0x00c0, 0x43ca: 0x00c0, 0x43cb: 0x00c0, - 0x43cc: 0x00c0, 0x43cd: 0x00c0, 0x43ce: 0x00c0, 0x43cf: 0x00c0, 0x43d0: 0x00c0, 0x43d1: 0x00c0, - 0x43d2: 0x00c0, 0x43d3: 0x00c0, 0x43d4: 0x00c0, 0x43d5: 0x00c0, 0x43d6: 0x00c0, 0x43d7: 0x00c0, - 0x43d8: 0x00c0, 0x43d9: 0x00c0, 0x43da: 0x00c0, 0x43db: 0x00c0, 0x43dc: 0x00c0, 0x43dd: 0x00c0, - 0x43de: 0x00c0, 0x43df: 0x00c0, 0x43e0: 0x00c0, 0x43e1: 0x00c0, 0x43e2: 0x00c0, 0x43e3: 0x00c0, - 0x43e4: 0x00c0, 0x43e5: 0x00c0, 0x43e6: 0x00c0, 0x43e7: 0x00c0, 0x43e8: 0x00c0, 0x43e9: 0x00c0, - 0x43ea: 0x00c0, - 0x43f0: 0x00c0, 0x43f1: 0x00c0, 0x43f2: 0x00c0, 0x43f3: 0x00c0, 0x43f4: 0x00c0, 0x43f5: 0x00c0, - 0x43f6: 0x00c0, 0x43f7: 0x00c0, 0x43f8: 0x00c0, 0x43f9: 0x00c0, 0x43fa: 0x00c0, 0x43fb: 0x00c0, - 0x43fc: 0x00c0, - // Block 0x110, offset 0x4400 - 0x4400: 0x00c0, 0x4401: 0x00c0, 0x4402: 0x00c0, 0x4403: 0x00c0, 0x4404: 0x00c0, 0x4405: 0x00c0, - 0x4406: 0x00c0, 0x4407: 0x00c0, 0x4408: 0x00c0, - 0x4410: 0x00c0, 0x4411: 0x00c0, - 0x4412: 0x00c0, 0x4413: 0x00c0, 0x4414: 0x00c0, 0x4415: 0x00c0, 0x4416: 0x00c0, 0x4417: 0x00c0, - 0x4418: 0x00c0, 0x4419: 0x00c0, 0x441c: 0x0080, 0x441d: 0x00c3, - 0x441e: 0x00c3, 0x441f: 0x0080, 0x4420: 0x0040, 0x4421: 0x0040, 0x4422: 0x0040, 0x4423: 0x0040, - // Block 0x111, offset 0x4440 - 0x4440: 0x0080, 0x4441: 0x0080, 0x4442: 0x0080, 0x4443: 0x0080, 0x4444: 0x0080, 0x4445: 0x0080, - 0x4446: 0x0080, 0x4447: 0x0080, 0x4448: 0x0080, 0x4449: 0x0080, 0x444a: 0x0080, 0x444b: 0x0080, - 0x444c: 0x0080, 0x444d: 0x0080, 0x444e: 0x0080, 0x444f: 0x0080, 0x4450: 0x0080, 0x4451: 0x0080, - 0x4452: 0x0080, 0x4453: 0x0080, 0x4454: 0x0080, 0x4455: 0x0080, 0x4456: 0x0080, 0x4457: 0x0080, - 0x4458: 0x0080, 0x4459: 0x0080, 0x445a: 0x0080, 0x445b: 0x0080, 0x445c: 0x0080, 0x445d: 0x0080, - 0x445e: 0x0080, 0x445f: 0x0080, 0x4460: 0x0080, 0x4461: 0x0080, 0x4462: 0x0080, 0x4463: 0x0080, - 0x4464: 0x0080, 0x4465: 0x0080, 0x4466: 0x0080, 0x4467: 0x0080, 0x4468: 0x0080, 0x4469: 0x0080, - 0x446a: 0x0080, 0x446b: 0x0080, 0x446c: 0x0080, 0x446d: 0x0080, 0x446e: 0x0080, 0x446f: 0x0080, - 0x4470: 0x0080, 0x4471: 0x0080, 0x4472: 0x0080, 0x4473: 0x0080, 0x4474: 0x0080, 0x4475: 0x0080, - // Block 0x112, offset 0x4480 - 0x4480: 0x0080, 0x4481: 0x0080, 0x4482: 0x0080, 0x4483: 0x0080, 0x4484: 0x0080, 0x4485: 0x0080, - 0x4486: 0x0080, 0x4487: 0x0080, 0x4488: 0x0080, 0x4489: 0x0080, 0x448a: 0x0080, 0x448b: 0x0080, - 0x448c: 0x0080, 0x448d: 0x0080, 0x448e: 0x0080, 0x448f: 0x0080, 0x4490: 0x0080, 0x4491: 0x0080, - 0x4492: 0x0080, 0x4493: 0x0080, 0x4494: 0x0080, 0x4495: 0x0080, 0x4496: 0x0080, 0x4497: 0x0080, - 0x4498: 0x0080, 0x4499: 0x0080, 0x449a: 0x0080, 0x449b: 0x0080, 0x449c: 0x0080, 0x449d: 0x0080, - 0x449e: 0x0080, 0x449f: 0x0080, 0x44a0: 0x0080, 0x44a1: 0x0080, 0x44a2: 0x0080, 0x44a3: 0x0080, - 0x44a4: 0x0080, 0x44a5: 0x0080, 0x44a6: 0x0080, 0x44a9: 0x0080, - 0x44aa: 0x0080, 0x44ab: 0x0080, 0x44ac: 0x0080, 0x44ad: 0x0080, 0x44ae: 0x0080, 0x44af: 0x0080, - 0x44b0: 0x0080, 0x44b1: 0x0080, 0x44b2: 0x0080, 0x44b3: 0x0080, 0x44b4: 0x0080, 0x44b5: 0x0080, - 0x44b6: 0x0080, 0x44b7: 0x0080, 0x44b8: 0x0080, 0x44b9: 0x0080, 0x44ba: 0x0080, 0x44bb: 0x0080, - 0x44bc: 0x0080, 0x44bd: 0x0080, 0x44be: 0x0080, 0x44bf: 0x0080, - // Block 0x113, offset 0x44c0 - 0x44c0: 0x0080, 0x44c1: 0x0080, 0x44c2: 0x0080, 0x44c3: 0x0080, 0x44c4: 0x0080, 0x44c5: 0x0080, - 0x44c6: 0x0080, 0x44c7: 0x0080, 0x44c8: 0x0080, 0x44c9: 0x0080, 0x44ca: 0x0080, 0x44cb: 0x0080, - 0x44cc: 0x0080, 0x44cd: 0x0080, 0x44ce: 0x0080, 0x44cf: 0x0080, 0x44d0: 0x0080, 0x44d1: 0x0080, - 0x44d2: 0x0080, 0x44d3: 0x0080, 0x44d4: 0x0080, 0x44d5: 0x0080, 0x44d6: 0x0080, 0x44d7: 0x0080, - 0x44d8: 0x0080, 0x44d9: 0x0080, 0x44da: 0x0080, 0x44db: 0x0080, 0x44dc: 0x0080, 0x44dd: 0x0080, - 0x44de: 0x0080, 0x44df: 0x0080, 0x44e0: 0x0080, 0x44e1: 0x0080, 0x44e2: 0x0080, 0x44e3: 0x0080, - 0x44e4: 0x0080, 0x44e5: 0x00c0, 0x44e6: 0x00c0, 0x44e7: 0x00c3, 0x44e8: 0x00c3, 0x44e9: 0x00c3, - 0x44ea: 0x0080, 0x44eb: 0x0080, 0x44ec: 0x0080, 0x44ed: 0x00c0, 0x44ee: 0x00c0, 0x44ef: 0x00c0, - 0x44f0: 0x00c0, 0x44f1: 0x00c0, 0x44f2: 0x00c0, 0x44f3: 0x0040, 0x44f4: 0x0040, 0x44f5: 0x0040, - 0x44f6: 0x0040, 0x44f7: 0x0040, 0x44f8: 0x0040, 0x44f9: 0x0040, 0x44fa: 0x0040, 0x44fb: 0x00c3, - 0x44fc: 0x00c3, 0x44fd: 0x00c3, 0x44fe: 0x00c3, 0x44ff: 0x00c3, - // Block 0x114, offset 0x4500 - 0x4500: 0x00c3, 0x4501: 0x00c3, 0x4502: 0x00c3, 0x4503: 0x0080, 0x4504: 0x0080, 0x4505: 0x00c3, - 0x4506: 0x00c3, 0x4507: 0x00c3, 0x4508: 0x00c3, 0x4509: 0x00c3, 0x450a: 0x00c3, 0x450b: 0x00c3, - 0x450c: 0x0080, 0x450d: 0x0080, 0x450e: 0x0080, 0x450f: 0x0080, 0x4510: 0x0080, 0x4511: 0x0080, - 0x4512: 0x0080, 0x4513: 0x0080, 0x4514: 0x0080, 0x4515: 0x0080, 0x4516: 0x0080, 0x4517: 0x0080, - 0x4518: 0x0080, 0x4519: 0x0080, 0x451a: 0x0080, 0x451b: 0x0080, 0x451c: 0x0080, 0x451d: 0x0080, - 0x451e: 0x0080, 0x451f: 0x0080, 0x4520: 0x0080, 0x4521: 0x0080, 0x4522: 0x0080, 0x4523: 0x0080, - 0x4524: 0x0080, 0x4525: 0x0080, 0x4526: 0x0080, 0x4527: 0x0080, 0x4528: 0x0080, 0x4529: 0x0080, - 0x452a: 0x00c3, 0x452b: 0x00c3, 0x452c: 0x00c3, 0x452d: 0x00c3, 0x452e: 0x0080, 0x452f: 0x0080, - 0x4530: 0x0080, 0x4531: 0x0080, 0x4532: 0x0080, 0x4533: 0x0080, 0x4534: 0x0080, 0x4535: 0x0080, - 0x4536: 0x0080, 0x4537: 0x0080, 0x4538: 0x0080, 0x4539: 0x0080, 0x453a: 0x0080, 0x453b: 0x0080, - 0x453c: 0x0080, 0x453d: 0x0080, 0x453e: 0x0080, 0x453f: 0x0080, - // Block 0x115, offset 0x4540 - 0x4540: 0x0080, 0x4541: 0x0080, 0x4542: 0x0080, 0x4543: 0x0080, 0x4544: 0x0080, 0x4545: 0x0080, - 0x4546: 0x0080, 0x4547: 0x0080, 0x4548: 0x0080, 0x4549: 0x0080, 0x454a: 0x0080, 0x454b: 0x0080, - 0x454c: 0x0080, 0x454d: 0x0080, 0x454e: 0x0080, 0x454f: 0x0080, 0x4550: 0x0080, 0x4551: 0x0080, - 0x4552: 0x0080, 0x4553: 0x0080, 0x4554: 0x0080, 0x4555: 0x0080, 0x4556: 0x0080, 0x4557: 0x0080, - 0x4558: 0x0080, 0x4559: 0x0080, 0x455a: 0x0080, 0x455b: 0x0080, 0x455c: 0x0080, 0x455d: 0x0080, - 0x455e: 0x0080, 0x455f: 0x0080, 0x4560: 0x0080, 0x4561: 0x0080, 0x4562: 0x0080, 0x4563: 0x0080, - 0x4564: 0x0080, 0x4565: 0x0080, 0x4566: 0x0080, 0x4567: 0x0080, 0x4568: 0x0080, - // Block 0x116, offset 0x4580 - 0x4580: 0x0088, 0x4581: 0x0088, 0x4582: 0x00c9, 0x4583: 0x00c9, 0x4584: 0x00c9, 0x4585: 0x0088, - // Block 0x117, offset 0x45c0 - 0x45c0: 0x0080, 0x45c1: 0x0080, 0x45c2: 0x0080, 0x45c3: 0x0080, 0x45c4: 0x0080, 0x45c5: 0x0080, - 0x45c6: 0x0080, 0x45c7: 0x0080, 0x45c8: 0x0080, 0x45c9: 0x0080, 0x45ca: 0x0080, 0x45cb: 0x0080, - 0x45cc: 0x0080, 0x45cd: 0x0080, 0x45ce: 0x0080, 0x45cf: 0x0080, 0x45d0: 0x0080, 0x45d1: 0x0080, - 0x45d2: 0x0080, 0x45d3: 0x0080, 0x45d4: 0x0080, 0x45d5: 0x0080, 0x45d6: 0x0080, - 0x45e0: 0x0080, 0x45e1: 0x0080, 0x45e2: 0x0080, 0x45e3: 0x0080, - 0x45e4: 0x0080, 0x45e5: 0x0080, 0x45e6: 0x0080, 0x45e7: 0x0080, 0x45e8: 0x0080, 0x45e9: 0x0080, - 0x45ea: 0x0080, 0x45eb: 0x0080, 0x45ec: 0x0080, 0x45ed: 0x0080, 0x45ee: 0x0080, 0x45ef: 0x0080, - 0x45f0: 0x0080, 0x45f1: 0x0080, - // Block 0x118, offset 0x4600 - 0x4600: 0x0080, 0x4601: 0x0080, 0x4602: 0x0080, 0x4603: 0x0080, 0x4604: 0x0080, 0x4605: 0x0080, - 0x4606: 0x0080, 0x4607: 0x0080, 0x4608: 0x0080, 0x4609: 0x0080, 0x460a: 0x0080, 0x460b: 0x0080, - 0x460c: 0x0080, 0x460d: 0x0080, 0x460e: 0x0080, 0x460f: 0x0080, 0x4610: 0x0080, 0x4611: 0x0080, - 0x4612: 0x0080, 0x4613: 0x0080, 0x4614: 0x0080, 0x4616: 0x0080, 0x4617: 0x0080, - 0x4618: 0x0080, 0x4619: 0x0080, 0x461a: 0x0080, 0x461b: 0x0080, 0x461c: 0x0080, 0x461d: 0x0080, - 0x461e: 0x0080, 0x461f: 0x0080, 0x4620: 0x0080, 0x4621: 0x0080, 0x4622: 0x0080, 0x4623: 0x0080, - 0x4624: 0x0080, 0x4625: 0x0080, 0x4626: 0x0080, 0x4627: 0x0080, 0x4628: 0x0080, 0x4629: 0x0080, - 0x462a: 0x0080, 0x462b: 0x0080, 0x462c: 0x0080, 0x462d: 0x0080, 0x462e: 0x0080, 0x462f: 0x0080, - 0x4630: 0x0080, 0x4631: 0x0080, 0x4632: 0x0080, 0x4633: 0x0080, 0x4634: 0x0080, 0x4635: 0x0080, - 0x4636: 0x0080, 0x4637: 0x0080, 0x4638: 0x0080, 0x4639: 0x0080, 0x463a: 0x0080, 0x463b: 0x0080, - 0x463c: 0x0080, 0x463d: 0x0080, 0x463e: 0x0080, 0x463f: 0x0080, - // Block 0x119, offset 0x4640 - 0x4640: 0x0080, 0x4641: 0x0080, 0x4642: 0x0080, 0x4643: 0x0080, 0x4644: 0x0080, 0x4645: 0x0080, - 0x4646: 0x0080, 0x4647: 0x0080, 0x4648: 0x0080, 0x4649: 0x0080, 0x464a: 0x0080, 0x464b: 0x0080, - 0x464c: 0x0080, 0x464d: 0x0080, 0x464e: 0x0080, 0x464f: 0x0080, 0x4650: 0x0080, 0x4651: 0x0080, - 0x4652: 0x0080, 0x4653: 0x0080, 0x4654: 0x0080, 0x4655: 0x0080, 0x4656: 0x0080, 0x4657: 0x0080, - 0x4658: 0x0080, 0x4659: 0x0080, 0x465a: 0x0080, 0x465b: 0x0080, 0x465c: 0x0080, - 0x465e: 0x0080, 0x465f: 0x0080, 0x4662: 0x0080, - 0x4665: 0x0080, 0x4666: 0x0080, 0x4669: 0x0080, - 0x466a: 0x0080, 0x466b: 0x0080, 0x466c: 0x0080, 0x466e: 0x0080, 0x466f: 0x0080, - 0x4670: 0x0080, 0x4671: 0x0080, 0x4672: 0x0080, 0x4673: 0x0080, 0x4674: 0x0080, 0x4675: 0x0080, - 0x4676: 0x0080, 0x4677: 0x0080, 0x4678: 0x0080, 0x4679: 0x0080, 0x467b: 0x0080, - 0x467d: 0x0080, 0x467e: 0x0080, 0x467f: 0x0080, - // Block 0x11a, offset 0x4680 - 0x4680: 0x0080, 0x4681: 0x0080, 0x4682: 0x0080, 0x4683: 0x0080, 0x4685: 0x0080, - 0x4686: 0x0080, 0x4687: 0x0080, 0x4688: 0x0080, 0x4689: 0x0080, 0x468a: 0x0080, 0x468b: 0x0080, - 0x468c: 0x0080, 0x468d: 0x0080, 0x468e: 0x0080, 0x468f: 0x0080, 0x4690: 0x0080, 0x4691: 0x0080, - 0x4692: 0x0080, 0x4693: 0x0080, 0x4694: 0x0080, 0x4695: 0x0080, 0x4696: 0x0080, 0x4697: 0x0080, - 0x4698: 0x0080, 0x4699: 0x0080, 0x469a: 0x0080, 0x469b: 0x0080, 0x469c: 0x0080, 0x469d: 0x0080, - 0x469e: 0x0080, 0x469f: 0x0080, 0x46a0: 0x0080, 0x46a1: 0x0080, 0x46a2: 0x0080, 0x46a3: 0x0080, - 0x46a4: 0x0080, 0x46a5: 0x0080, 0x46a6: 0x0080, 0x46a7: 0x0080, 0x46a8: 0x0080, 0x46a9: 0x0080, - 0x46aa: 0x0080, 0x46ab: 0x0080, 0x46ac: 0x0080, 0x46ad: 0x0080, 0x46ae: 0x0080, 0x46af: 0x0080, - 0x46b0: 0x0080, 0x46b1: 0x0080, 0x46b2: 0x0080, 0x46b3: 0x0080, 0x46b4: 0x0080, 0x46b5: 0x0080, - 0x46b6: 0x0080, 0x46b7: 0x0080, 0x46b8: 0x0080, 0x46b9: 0x0080, 0x46ba: 0x0080, 0x46bb: 0x0080, - 0x46bc: 0x0080, 0x46bd: 0x0080, 0x46be: 0x0080, 0x46bf: 0x0080, - // Block 0x11b, offset 0x46c0 - 0x46c0: 0x0080, 0x46c1: 0x0080, 0x46c2: 0x0080, 0x46c3: 0x0080, 0x46c4: 0x0080, 0x46c5: 0x0080, - 0x46c7: 0x0080, 0x46c8: 0x0080, 0x46c9: 0x0080, 0x46ca: 0x0080, - 0x46cd: 0x0080, 0x46ce: 0x0080, 0x46cf: 0x0080, 0x46d0: 0x0080, 0x46d1: 0x0080, - 0x46d2: 0x0080, 0x46d3: 0x0080, 0x46d4: 0x0080, 0x46d6: 0x0080, 0x46d7: 0x0080, - 0x46d8: 0x0080, 0x46d9: 0x0080, 0x46da: 0x0080, 0x46db: 0x0080, 0x46dc: 0x0080, - 0x46de: 0x0080, 0x46df: 0x0080, 0x46e0: 0x0080, 0x46e1: 0x0080, 0x46e2: 0x0080, 0x46e3: 0x0080, - 0x46e4: 0x0080, 0x46e5: 0x0080, 0x46e6: 0x0080, 0x46e7: 0x0080, 0x46e8: 0x0080, 0x46e9: 0x0080, - 0x46ea: 0x0080, 0x46eb: 0x0080, 0x46ec: 0x0080, 0x46ed: 0x0080, 0x46ee: 0x0080, 0x46ef: 0x0080, - 0x46f0: 0x0080, 0x46f1: 0x0080, 0x46f2: 0x0080, 0x46f3: 0x0080, 0x46f4: 0x0080, 0x46f5: 0x0080, - 0x46f6: 0x0080, 0x46f7: 0x0080, 0x46f8: 0x0080, 0x46f9: 0x0080, 0x46fb: 0x0080, - 0x46fc: 0x0080, 0x46fd: 0x0080, 0x46fe: 0x0080, - // Block 0x11c, offset 0x4700 - 0x4700: 0x0080, 0x4701: 0x0080, 0x4702: 0x0080, 0x4703: 0x0080, 0x4704: 0x0080, - 0x4706: 0x0080, 0x470a: 0x0080, 0x470b: 0x0080, - 0x470c: 0x0080, 0x470d: 0x0080, 0x470e: 0x0080, 0x470f: 0x0080, 0x4710: 0x0080, - 0x4712: 0x0080, 0x4713: 0x0080, 0x4714: 0x0080, 0x4715: 0x0080, 0x4716: 0x0080, 0x4717: 0x0080, - 0x4718: 0x0080, 0x4719: 0x0080, 0x471a: 0x0080, 0x471b: 0x0080, 0x471c: 0x0080, 0x471d: 0x0080, - 0x471e: 0x0080, 0x471f: 0x0080, 0x4720: 0x0080, 0x4721: 0x0080, 0x4722: 0x0080, 0x4723: 0x0080, - 0x4724: 0x0080, 0x4725: 0x0080, 0x4726: 0x0080, 0x4727: 0x0080, 0x4728: 0x0080, 0x4729: 0x0080, - 0x472a: 0x0080, 0x472b: 0x0080, 0x472c: 0x0080, 0x472d: 0x0080, 0x472e: 0x0080, 0x472f: 0x0080, - 0x4730: 0x0080, 0x4731: 0x0080, 0x4732: 0x0080, 0x4733: 0x0080, 0x4734: 0x0080, 0x4735: 0x0080, - 0x4736: 0x0080, 0x4737: 0x0080, 0x4738: 0x0080, 0x4739: 0x0080, 0x473a: 0x0080, 0x473b: 0x0080, - 0x473c: 0x0080, 0x473d: 0x0080, 0x473e: 0x0080, 0x473f: 0x0080, - // Block 0x11d, offset 0x4740 - 0x4740: 0x0080, 0x4741: 0x0080, 0x4742: 0x0080, 0x4743: 0x0080, 0x4744: 0x0080, 0x4745: 0x0080, - 0x4746: 0x0080, 0x4747: 0x0080, 0x4748: 0x0080, 0x4749: 0x0080, 0x474a: 0x0080, 0x474b: 0x0080, - 0x474c: 0x0080, 0x474d: 0x0080, 0x474e: 0x0080, 0x474f: 0x0080, 0x4750: 0x0080, 0x4751: 0x0080, - 0x4752: 0x0080, 0x4753: 0x0080, 0x4754: 0x0080, 0x4755: 0x0080, 0x4756: 0x0080, 0x4757: 0x0080, - 0x4758: 0x0080, 0x4759: 0x0080, 0x475a: 0x0080, 0x475b: 0x0080, 0x475c: 0x0080, 0x475d: 0x0080, - 0x475e: 0x0080, 0x475f: 0x0080, 0x4760: 0x0080, 0x4761: 0x0080, 0x4762: 0x0080, 0x4763: 0x0080, - 0x4764: 0x0080, 0x4765: 0x0080, 0x4768: 0x0080, 0x4769: 0x0080, - 0x476a: 0x0080, 0x476b: 0x0080, 0x476c: 0x0080, 0x476d: 0x0080, 0x476e: 0x0080, 0x476f: 0x0080, - 0x4770: 0x0080, 0x4771: 0x0080, 0x4772: 0x0080, 0x4773: 0x0080, 0x4774: 0x0080, 0x4775: 0x0080, - 0x4776: 0x0080, 0x4777: 0x0080, 0x4778: 0x0080, 0x4779: 0x0080, 0x477a: 0x0080, 0x477b: 0x0080, - 0x477c: 0x0080, 0x477d: 0x0080, 0x477e: 0x0080, 0x477f: 0x0080, - // Block 0x11e, offset 0x4780 - 0x4780: 0x0080, 0x4781: 0x0080, 0x4782: 0x0080, 0x4783: 0x0080, 0x4784: 0x0080, 0x4785: 0x0080, - 0x4786: 0x0080, 0x4787: 0x0080, 0x4788: 0x0080, 0x4789: 0x0080, 0x478a: 0x0080, 0x478b: 0x0080, - 0x478e: 0x0080, 0x478f: 0x0080, 0x4790: 0x0080, 0x4791: 0x0080, - 0x4792: 0x0080, 0x4793: 0x0080, 0x4794: 0x0080, 0x4795: 0x0080, 0x4796: 0x0080, 0x4797: 0x0080, - 0x4798: 0x0080, 0x4799: 0x0080, 0x479a: 0x0080, 0x479b: 0x0080, 0x479c: 0x0080, 0x479d: 0x0080, - 0x479e: 0x0080, 0x479f: 0x0080, 0x47a0: 0x0080, 0x47a1: 0x0080, 0x47a2: 0x0080, 0x47a3: 0x0080, - 0x47a4: 0x0080, 0x47a5: 0x0080, 0x47a6: 0x0080, 0x47a7: 0x0080, 0x47a8: 0x0080, 0x47a9: 0x0080, - 0x47aa: 0x0080, 0x47ab: 0x0080, 0x47ac: 0x0080, 0x47ad: 0x0080, 0x47ae: 0x0080, 0x47af: 0x0080, - 0x47b0: 0x0080, 0x47b1: 0x0080, 0x47b2: 0x0080, 0x47b3: 0x0080, 0x47b4: 0x0080, 0x47b5: 0x0080, - 0x47b6: 0x0080, 0x47b7: 0x0080, 0x47b8: 0x0080, 0x47b9: 0x0080, 0x47ba: 0x0080, 0x47bb: 0x0080, - 0x47bc: 0x0080, 0x47bd: 0x0080, 0x47be: 0x0080, 0x47bf: 0x0080, - // Block 0x11f, offset 0x47c0 - 0x47c0: 0x00c3, 0x47c1: 0x00c3, 0x47c2: 0x00c3, 0x47c3: 0x00c3, 0x47c4: 0x00c3, 0x47c5: 0x00c3, - 0x47c6: 0x00c3, 0x47c7: 0x00c3, 0x47c8: 0x00c3, 0x47c9: 0x00c3, 0x47ca: 0x00c3, 0x47cb: 0x00c3, - 0x47cc: 0x00c3, 0x47cd: 0x00c3, 0x47ce: 0x00c3, 0x47cf: 0x00c3, 0x47d0: 0x00c3, 0x47d1: 0x00c3, - 0x47d2: 0x00c3, 0x47d3: 0x00c3, 0x47d4: 0x00c3, 0x47d5: 0x00c3, 0x47d6: 0x00c3, 0x47d7: 0x00c3, - 0x47d8: 0x00c3, 0x47d9: 0x00c3, 0x47da: 0x00c3, 0x47db: 0x00c3, 0x47dc: 0x00c3, 0x47dd: 0x00c3, - 0x47de: 0x00c3, 0x47df: 0x00c3, 0x47e0: 0x00c3, 0x47e1: 0x00c3, 0x47e2: 0x00c3, 0x47e3: 0x00c3, - 0x47e4: 0x00c3, 0x47e5: 0x00c3, 0x47e6: 0x00c3, 0x47e7: 0x00c3, 0x47e8: 0x00c3, 0x47e9: 0x00c3, - 0x47ea: 0x00c3, 0x47eb: 0x00c3, 0x47ec: 0x00c3, 0x47ed: 0x00c3, 0x47ee: 0x00c3, 0x47ef: 0x00c3, - 0x47f0: 0x00c3, 0x47f1: 0x00c3, 0x47f2: 0x00c3, 0x47f3: 0x00c3, 0x47f4: 0x00c3, 0x47f5: 0x00c3, - 0x47f6: 0x00c3, 0x47f7: 0x0080, 0x47f8: 0x0080, 0x47f9: 0x0080, 0x47fa: 0x0080, 0x47fb: 0x00c3, - 0x47fc: 0x00c3, 0x47fd: 0x00c3, 0x47fe: 0x00c3, 0x47ff: 0x00c3, - // Block 0x120, offset 0x4800 - 0x4800: 0x00c3, 0x4801: 0x00c3, 0x4802: 0x00c3, 0x4803: 0x00c3, 0x4804: 0x00c3, 0x4805: 0x00c3, - 0x4806: 0x00c3, 0x4807: 0x00c3, 0x4808: 0x00c3, 0x4809: 0x00c3, 0x480a: 0x00c3, 0x480b: 0x00c3, - 0x480c: 0x00c3, 0x480d: 0x00c3, 0x480e: 0x00c3, 0x480f: 0x00c3, 0x4810: 0x00c3, 0x4811: 0x00c3, - 0x4812: 0x00c3, 0x4813: 0x00c3, 0x4814: 0x00c3, 0x4815: 0x00c3, 0x4816: 0x00c3, 0x4817: 0x00c3, - 0x4818: 0x00c3, 0x4819: 0x00c3, 0x481a: 0x00c3, 0x481b: 0x00c3, 0x481c: 0x00c3, 0x481d: 0x00c3, - 0x481e: 0x00c3, 0x481f: 0x00c3, 0x4820: 0x00c3, 0x4821: 0x00c3, 0x4822: 0x00c3, 0x4823: 0x00c3, - 0x4824: 0x00c3, 0x4825: 0x00c3, 0x4826: 0x00c3, 0x4827: 0x00c3, 0x4828: 0x00c3, 0x4829: 0x00c3, - 0x482a: 0x00c3, 0x482b: 0x00c3, 0x482c: 0x00c3, 0x482d: 0x0080, 0x482e: 0x0080, 0x482f: 0x0080, - 0x4830: 0x0080, 0x4831: 0x0080, 0x4832: 0x0080, 0x4833: 0x0080, 0x4834: 0x0080, 0x4835: 0x00c3, - 0x4836: 0x0080, 0x4837: 0x0080, 0x4838: 0x0080, 0x4839: 0x0080, 0x483a: 0x0080, 0x483b: 0x0080, - 0x483c: 0x0080, 0x483d: 0x0080, 0x483e: 0x0080, 0x483f: 0x0080, - // Block 0x121, offset 0x4840 - 0x4840: 0x0080, 0x4841: 0x0080, 0x4842: 0x0080, 0x4843: 0x0080, 0x4844: 0x00c3, 0x4845: 0x0080, - 0x4846: 0x0080, 0x4847: 0x0080, 0x4848: 0x0080, 0x4849: 0x0080, 0x484a: 0x0080, 0x484b: 0x0080, - 0x485b: 0x00c3, 0x485c: 0x00c3, 0x485d: 0x00c3, - 0x485e: 0x00c3, 0x485f: 0x00c3, 0x4861: 0x00c3, 0x4862: 0x00c3, 0x4863: 0x00c3, - 0x4864: 0x00c3, 0x4865: 0x00c3, 0x4866: 0x00c3, 0x4867: 0x00c3, 0x4868: 0x00c3, 0x4869: 0x00c3, - 0x486a: 0x00c3, 0x486b: 0x00c3, 0x486c: 0x00c3, 0x486d: 0x00c3, 0x486e: 0x00c3, 0x486f: 0x00c3, - // Block 0x122, offset 0x4880 - 0x4880: 0x00c3, 0x4881: 0x00c3, 0x4882: 0x00c3, 0x4883: 0x00c3, 0x4884: 0x00c3, 0x4885: 0x00c3, - 0x4886: 0x00c3, 0x4888: 0x00c3, 0x4889: 0x00c3, 0x488a: 0x00c3, 0x488b: 0x00c3, - 0x488c: 0x00c3, 0x488d: 0x00c3, 0x488e: 0x00c3, 0x488f: 0x00c3, 0x4890: 0x00c3, 0x4891: 0x00c3, - 0x4892: 0x00c3, 0x4893: 0x00c3, 0x4894: 0x00c3, 0x4895: 0x00c3, 0x4896: 0x00c3, 0x4897: 0x00c3, - 0x4898: 0x00c3, 0x489b: 0x00c3, 0x489c: 0x00c3, 0x489d: 0x00c3, - 0x489e: 0x00c3, 0x489f: 0x00c3, 0x48a0: 0x00c3, 0x48a1: 0x00c3, 0x48a3: 0x00c3, - 0x48a4: 0x00c3, 0x48a6: 0x00c3, 0x48a7: 0x00c3, 0x48a8: 0x00c3, 0x48a9: 0x00c3, - 0x48aa: 0x00c3, - // Block 0x123, offset 0x48c0 - 0x48c0: 0x00c0, 0x48c1: 0x00c0, 0x48c2: 0x00c0, 0x48c3: 0x00c0, 0x48c4: 0x00c0, - 0x48c7: 0x0080, 0x48c8: 0x0080, 0x48c9: 0x0080, 0x48ca: 0x0080, 0x48cb: 0x0080, - 0x48cc: 0x0080, 0x48cd: 0x0080, 0x48ce: 0x0080, 0x48cf: 0x0080, 0x48d0: 0x00c3, 0x48d1: 0x00c3, - 0x48d2: 0x00c3, 0x48d3: 0x00c3, 0x48d4: 0x00c3, 0x48d5: 0x00c3, 0x48d6: 0x00c3, - // Block 0x124, offset 0x4900 - 0x4900: 0x00c2, 0x4901: 0x00c2, 0x4902: 0x00c2, 0x4903: 0x00c2, 0x4904: 0x00c2, 0x4905: 0x00c2, - 0x4906: 0x00c2, 0x4907: 0x00c2, 0x4908: 0x00c2, 0x4909: 0x00c2, 0x490a: 0x00c2, 0x490b: 0x00c2, - 0x490c: 0x00c2, 0x490d: 0x00c2, 0x490e: 0x00c2, 0x490f: 0x00c2, 0x4910: 0x00c2, 0x4911: 0x00c2, - 0x4912: 0x00c2, 0x4913: 0x00c2, 0x4914: 0x00c2, 0x4915: 0x00c2, 0x4916: 0x00c2, 0x4917: 0x00c2, - 0x4918: 0x00c2, 0x4919: 0x00c2, 0x491a: 0x00c2, 0x491b: 0x00c2, 0x491c: 0x00c2, 0x491d: 0x00c2, - 0x491e: 0x00c2, 0x491f: 0x00c2, 0x4920: 0x00c2, 0x4921: 0x00c2, 0x4922: 0x00c2, 0x4923: 0x00c2, - 0x4924: 0x00c2, 0x4925: 0x00c2, 0x4926: 0x00c2, 0x4927: 0x00c2, 0x4928: 0x00c2, 0x4929: 0x00c2, - 0x492a: 0x00c2, 0x492b: 0x00c2, 0x492c: 0x00c2, 0x492d: 0x00c2, 0x492e: 0x00c2, 0x492f: 0x00c2, - 0x4930: 0x00c2, 0x4931: 0x00c2, 0x4932: 0x00c2, 0x4933: 0x00c2, 0x4934: 0x00c2, 0x4935: 0x00c2, - 0x4936: 0x00c2, 0x4937: 0x00c2, 0x4938: 0x00c2, 0x4939: 0x00c2, 0x493a: 0x00c2, 0x493b: 0x00c2, - 0x493c: 0x00c2, 0x493d: 0x00c2, 0x493e: 0x00c2, 0x493f: 0x00c2, - // Block 0x125, offset 0x4940 - 0x4940: 0x00c2, 0x4941: 0x00c2, 0x4942: 0x00c2, 0x4943: 0x00c2, 0x4944: 0x00c3, 0x4945: 0x00c3, - 0x4946: 0x00c3, 0x4947: 0x00c3, 0x4948: 0x00c3, 0x4949: 0x00c3, 0x494a: 0x00c3, - 0x4950: 0x00c0, 0x4951: 0x00c0, - 0x4952: 0x00c0, 0x4953: 0x00c0, 0x4954: 0x00c0, 0x4955: 0x00c0, 0x4956: 0x00c0, 0x4957: 0x00c0, - 0x4958: 0x00c0, 0x4959: 0x00c0, - 0x495e: 0x0080, 0x495f: 0x0080, - // Block 0x126, offset 0x4980 - 0x4980: 0x0080, 0x4981: 0x0080, 0x4982: 0x0080, 0x4983: 0x0080, 0x4985: 0x0080, - 0x4986: 0x0080, 0x4987: 0x0080, 0x4988: 0x0080, 0x4989: 0x0080, 0x498a: 0x0080, 0x498b: 0x0080, - 0x498c: 0x0080, 0x498d: 0x0080, 0x498e: 0x0080, 0x498f: 0x0080, 0x4990: 0x0080, 0x4991: 0x0080, - 0x4992: 0x0080, 0x4993: 0x0080, 0x4994: 0x0080, 0x4995: 0x0080, 0x4996: 0x0080, 0x4997: 0x0080, - 0x4998: 0x0080, 0x4999: 0x0080, 0x499a: 0x0080, 0x499b: 0x0080, 0x499c: 0x0080, 0x499d: 0x0080, - 0x499e: 0x0080, 0x499f: 0x0080, 0x49a1: 0x0080, 0x49a2: 0x0080, - 0x49a4: 0x0080, 0x49a7: 0x0080, 0x49a9: 0x0080, - 0x49aa: 0x0080, 0x49ab: 0x0080, 0x49ac: 0x0080, 0x49ad: 0x0080, 0x49ae: 0x0080, 0x49af: 0x0080, - 0x49b0: 0x0080, 0x49b1: 0x0080, 0x49b2: 0x0080, 0x49b4: 0x0080, 0x49b5: 0x0080, - 0x49b6: 0x0080, 0x49b7: 0x0080, 0x49b9: 0x0080, 0x49bb: 0x0080, - // Block 0x127, offset 0x49c0 - 0x49c2: 0x0080, - 0x49c7: 0x0080, 0x49c9: 0x0080, 0x49cb: 0x0080, - 0x49cd: 0x0080, 0x49ce: 0x0080, 0x49cf: 0x0080, 0x49d1: 0x0080, - 0x49d2: 0x0080, 0x49d4: 0x0080, 0x49d7: 0x0080, - 0x49d9: 0x0080, 0x49db: 0x0080, 0x49dd: 0x0080, - 0x49df: 0x0080, 0x49e1: 0x0080, 0x49e2: 0x0080, - 0x49e4: 0x0080, 0x49e7: 0x0080, 0x49e8: 0x0080, 0x49e9: 0x0080, - 0x49ea: 0x0080, 0x49ec: 0x0080, 0x49ed: 0x0080, 0x49ee: 0x0080, 0x49ef: 0x0080, - 0x49f0: 0x0080, 0x49f1: 0x0080, 0x49f2: 0x0080, 0x49f4: 0x0080, 0x49f5: 0x0080, - 0x49f6: 0x0080, 0x49f7: 0x0080, 0x49f9: 0x0080, 0x49fa: 0x0080, 0x49fb: 0x0080, - 0x49fc: 0x0080, 0x49fe: 0x0080, - // Block 0x128, offset 0x4a00 - 0x4a00: 0x0080, 0x4a01: 0x0080, 0x4a02: 0x0080, 0x4a03: 0x0080, 0x4a04: 0x0080, 0x4a05: 0x0080, - 0x4a06: 0x0080, 0x4a07: 0x0080, 0x4a08: 0x0080, 0x4a09: 0x0080, 0x4a0b: 0x0080, - 0x4a0c: 0x0080, 0x4a0d: 0x0080, 0x4a0e: 0x0080, 0x4a0f: 0x0080, 0x4a10: 0x0080, 0x4a11: 0x0080, - 0x4a12: 0x0080, 0x4a13: 0x0080, 0x4a14: 0x0080, 0x4a15: 0x0080, 0x4a16: 0x0080, 0x4a17: 0x0080, - 0x4a18: 0x0080, 0x4a19: 0x0080, 0x4a1a: 0x0080, 0x4a1b: 0x0080, - 0x4a21: 0x0080, 0x4a22: 0x0080, 0x4a23: 0x0080, - 0x4a25: 0x0080, 0x4a26: 0x0080, 0x4a27: 0x0080, 0x4a28: 0x0080, 0x4a29: 0x0080, - 0x4a2b: 0x0080, 0x4a2c: 0x0080, 0x4a2d: 0x0080, 0x4a2e: 0x0080, 0x4a2f: 0x0080, - 0x4a30: 0x0080, 0x4a31: 0x0080, 0x4a32: 0x0080, 0x4a33: 0x0080, 0x4a34: 0x0080, 0x4a35: 0x0080, - 0x4a36: 0x0080, 0x4a37: 0x0080, 0x4a38: 0x0080, 0x4a39: 0x0080, 0x4a3a: 0x0080, 0x4a3b: 0x0080, - // Block 0x129, offset 0x4a40 - 0x4a70: 0x0080, 0x4a71: 0x0080, - // Block 0x12a, offset 0x4a80 - 0x4a80: 0x0080, 0x4a81: 0x0080, 0x4a82: 0x0080, 0x4a83: 0x0080, 0x4a84: 0x0080, 0x4a85: 0x0080, - 0x4a86: 0x0080, 0x4a87: 0x0080, 0x4a88: 0x0080, 0x4a89: 0x0080, 0x4a8a: 0x0080, 0x4a8b: 0x0080, - 0x4a8c: 0x0080, 0x4a8d: 0x0080, 0x4a8e: 0x0080, 0x4a8f: 0x0080, 0x4a90: 0x0080, 0x4a91: 0x0080, - 0x4a92: 0x0080, 0x4a93: 0x0080, 0x4a94: 0x0080, 0x4a95: 0x0080, 0x4a96: 0x0080, 0x4a97: 0x0080, - 0x4a98: 0x0080, 0x4a99: 0x0080, 0x4a9a: 0x0080, 0x4a9b: 0x0080, 0x4a9c: 0x0080, 0x4a9d: 0x0080, - 0x4a9e: 0x0080, 0x4a9f: 0x0080, 0x4aa0: 0x0080, 0x4aa1: 0x0080, 0x4aa2: 0x0080, 0x4aa3: 0x0080, - 0x4aa4: 0x0080, 0x4aa5: 0x0080, 0x4aa6: 0x0080, 0x4aa7: 0x0080, 0x4aa8: 0x0080, 0x4aa9: 0x0080, - 0x4aaa: 0x0080, 0x4aab: 0x0080, - 0x4ab0: 0x0080, 0x4ab1: 0x0080, 0x4ab2: 0x0080, 0x4ab3: 0x0080, 0x4ab4: 0x0080, 0x4ab5: 0x0080, - 0x4ab6: 0x0080, 0x4ab7: 0x0080, 0x4ab8: 0x0080, 0x4ab9: 0x0080, 0x4aba: 0x0080, 0x4abb: 0x0080, - 0x4abc: 0x0080, 0x4abd: 0x0080, 0x4abe: 0x0080, 0x4abf: 0x0080, - // Block 0x12b, offset 0x4ac0 - 0x4ac0: 0x0080, 0x4ac1: 0x0080, 0x4ac2: 0x0080, 0x4ac3: 0x0080, 0x4ac4: 0x0080, 0x4ac5: 0x0080, - 0x4ac6: 0x0080, 0x4ac7: 0x0080, 0x4ac8: 0x0080, 0x4ac9: 0x0080, 0x4aca: 0x0080, 0x4acb: 0x0080, - 0x4acc: 0x0080, 0x4acd: 0x0080, 0x4ace: 0x0080, 0x4acf: 0x0080, 0x4ad0: 0x0080, 0x4ad1: 0x0080, - 0x4ad2: 0x0080, 0x4ad3: 0x0080, - 0x4ae0: 0x0080, 0x4ae1: 0x0080, 0x4ae2: 0x0080, 0x4ae3: 0x0080, - 0x4ae4: 0x0080, 0x4ae5: 0x0080, 0x4ae6: 0x0080, 0x4ae7: 0x0080, 0x4ae8: 0x0080, 0x4ae9: 0x0080, - 0x4aea: 0x0080, 0x4aeb: 0x0080, 0x4aec: 0x0080, 0x4aed: 0x0080, 0x4aee: 0x0080, - 0x4af1: 0x0080, 0x4af2: 0x0080, 0x4af3: 0x0080, 0x4af4: 0x0080, 0x4af5: 0x0080, - 0x4af6: 0x0080, 0x4af7: 0x0080, 0x4af8: 0x0080, 0x4af9: 0x0080, 0x4afa: 0x0080, 0x4afb: 0x0080, - 0x4afc: 0x0080, 0x4afd: 0x0080, 0x4afe: 0x0080, 0x4aff: 0x0080, - // Block 0x12c, offset 0x4b00 - 0x4b01: 0x0080, 0x4b02: 0x0080, 0x4b03: 0x0080, 0x4b04: 0x0080, 0x4b05: 0x0080, - 0x4b06: 0x0080, 0x4b07: 0x0080, 0x4b08: 0x0080, 0x4b09: 0x0080, 0x4b0a: 0x0080, 0x4b0b: 0x0080, - 0x4b0c: 0x0080, 0x4b0d: 0x0080, 0x4b0e: 0x0080, 0x4b0f: 0x0080, 0x4b11: 0x0080, - 0x4b12: 0x0080, 0x4b13: 0x0080, 0x4b14: 0x0080, 0x4b15: 0x0080, 0x4b16: 0x0080, 0x4b17: 0x0080, - 0x4b18: 0x0080, 0x4b19: 0x0080, 0x4b1a: 0x0080, 0x4b1b: 0x0080, 0x4b1c: 0x0080, 0x4b1d: 0x0080, - 0x4b1e: 0x0080, 0x4b1f: 0x0080, 0x4b20: 0x0080, 0x4b21: 0x0080, 0x4b22: 0x0080, 0x4b23: 0x0080, - 0x4b24: 0x0080, 0x4b25: 0x0080, 0x4b26: 0x0080, 0x4b27: 0x0080, 0x4b28: 0x0080, 0x4b29: 0x0080, - 0x4b2a: 0x0080, 0x4b2b: 0x0080, 0x4b2c: 0x0080, 0x4b2d: 0x0080, 0x4b2e: 0x0080, 0x4b2f: 0x0080, - 0x4b30: 0x0080, 0x4b31: 0x0080, 0x4b32: 0x0080, 0x4b33: 0x0080, 0x4b34: 0x0080, 0x4b35: 0x0080, - // Block 0x12d, offset 0x4b40 - 0x4b40: 0x0080, 0x4b41: 0x0080, 0x4b42: 0x0080, 0x4b43: 0x0080, 0x4b44: 0x0080, 0x4b45: 0x0080, - 0x4b46: 0x0080, 0x4b47: 0x0080, 0x4b48: 0x0080, 0x4b49: 0x0080, 0x4b4a: 0x0080, 0x4b4b: 0x0080, - 0x4b4c: 0x0080, 0x4b50: 0x0080, 0x4b51: 0x0080, - 0x4b52: 0x0080, 0x4b53: 0x0080, 0x4b54: 0x0080, 0x4b55: 0x0080, 0x4b56: 0x0080, 0x4b57: 0x0080, - 0x4b58: 0x0080, 0x4b59: 0x0080, 0x4b5a: 0x0080, 0x4b5b: 0x0080, 0x4b5c: 0x0080, 0x4b5d: 0x0080, - 0x4b5e: 0x0080, 0x4b5f: 0x0080, 0x4b60: 0x0080, 0x4b61: 0x0080, 0x4b62: 0x0080, 0x4b63: 0x0080, - 0x4b64: 0x0080, 0x4b65: 0x0080, 0x4b66: 0x0080, 0x4b67: 0x0080, 0x4b68: 0x0080, 0x4b69: 0x0080, - 0x4b6a: 0x0080, 0x4b6b: 0x0080, 0x4b6c: 0x0080, 0x4b6d: 0x0080, 0x4b6e: 0x0080, - 0x4b70: 0x0080, 0x4b71: 0x0080, 0x4b72: 0x0080, 0x4b73: 0x0080, 0x4b74: 0x0080, 0x4b75: 0x0080, - 0x4b76: 0x0080, 0x4b77: 0x0080, 0x4b78: 0x0080, 0x4b79: 0x0080, 0x4b7a: 0x0080, 0x4b7b: 0x0080, - 0x4b7c: 0x0080, 0x4b7d: 0x0080, 0x4b7e: 0x0080, 0x4b7f: 0x0080, - // Block 0x12e, offset 0x4b80 - 0x4b80: 0x0080, 0x4b81: 0x0080, 0x4b82: 0x0080, 0x4b83: 0x0080, 0x4b84: 0x0080, 0x4b85: 0x0080, - 0x4b86: 0x0080, 0x4b87: 0x0080, 0x4b88: 0x0080, 0x4b89: 0x0080, 0x4b8a: 0x0080, 0x4b8b: 0x0080, - 0x4b8c: 0x0080, 0x4b8d: 0x0080, 0x4b8e: 0x0080, 0x4b8f: 0x0080, 0x4b90: 0x0080, 0x4b91: 0x0080, - 0x4b92: 0x0080, 0x4b93: 0x0080, 0x4b94: 0x0080, 0x4b95: 0x0080, 0x4b96: 0x0080, 0x4b97: 0x0080, - 0x4b98: 0x0080, 0x4b99: 0x0080, 0x4b9a: 0x0080, 0x4b9b: 0x0080, 0x4b9c: 0x0080, 0x4b9d: 0x0080, - 0x4b9e: 0x0080, 0x4b9f: 0x0080, 0x4ba0: 0x0080, 0x4ba1: 0x0080, 0x4ba2: 0x0080, 0x4ba3: 0x0080, - 0x4ba4: 0x0080, 0x4ba5: 0x0080, 0x4ba6: 0x0080, 0x4ba7: 0x0080, 0x4ba8: 0x0080, 0x4ba9: 0x0080, - 0x4baa: 0x0080, 0x4bab: 0x0080, 0x4bac: 0x0080, - // Block 0x12f, offset 0x4bc0 - 0x4be6: 0x0080, 0x4be7: 0x0080, 0x4be8: 0x0080, 0x4be9: 0x0080, - 0x4bea: 0x0080, 0x4beb: 0x0080, 0x4bec: 0x0080, 0x4bed: 0x0080, 0x4bee: 0x0080, 0x4bef: 0x0080, - 0x4bf0: 0x0080, 0x4bf1: 0x0080, 0x4bf2: 0x0080, 0x4bf3: 0x0080, 0x4bf4: 0x0080, 0x4bf5: 0x0080, - 0x4bf6: 0x0080, 0x4bf7: 0x0080, 0x4bf8: 0x0080, 0x4bf9: 0x0080, 0x4bfa: 0x0080, 0x4bfb: 0x0080, - 0x4bfc: 0x0080, 0x4bfd: 0x0080, 0x4bfe: 0x0080, 0x4bff: 0x0080, - // Block 0x130, offset 0x4c00 - 0x4c00: 0x008c, 0x4c01: 0x0080, 0x4c02: 0x0080, - 0x4c10: 0x0080, 0x4c11: 0x0080, - 0x4c12: 0x0080, 0x4c13: 0x0080, 0x4c14: 0x0080, 0x4c15: 0x0080, 0x4c16: 0x0080, 0x4c17: 0x0080, - 0x4c18: 0x0080, 0x4c19: 0x0080, 0x4c1a: 0x0080, 0x4c1b: 0x0080, 0x4c1c: 0x0080, 0x4c1d: 0x0080, - 0x4c1e: 0x0080, 0x4c1f: 0x0080, 0x4c20: 0x0080, 0x4c21: 0x0080, 0x4c22: 0x0080, 0x4c23: 0x0080, - 0x4c24: 0x0080, 0x4c25: 0x0080, 0x4c26: 0x0080, 0x4c27: 0x0080, 0x4c28: 0x0080, 0x4c29: 0x0080, - 0x4c2a: 0x0080, 0x4c2b: 0x0080, 0x4c2c: 0x0080, 0x4c2d: 0x0080, 0x4c2e: 0x0080, 0x4c2f: 0x0080, - 0x4c30: 0x0080, 0x4c31: 0x0080, 0x4c32: 0x0080, 0x4c33: 0x0080, 0x4c34: 0x0080, 0x4c35: 0x0080, - 0x4c36: 0x0080, 0x4c37: 0x0080, 0x4c38: 0x0080, 0x4c39: 0x0080, 0x4c3a: 0x0080, 0x4c3b: 0x0080, - // Block 0x131, offset 0x4c40 - 0x4c40: 0x0080, 0x4c41: 0x0080, 0x4c42: 0x0080, 0x4c43: 0x0080, 0x4c44: 0x0080, 0x4c45: 0x0080, - 0x4c46: 0x0080, 0x4c47: 0x0080, 0x4c48: 0x0080, - 0x4c50: 0x0080, 0x4c51: 0x0080, - // Block 0x132, offset 0x4c80 - 0x4c80: 0x0080, 0x4c81: 0x0080, 0x4c82: 0x0080, 0x4c83: 0x0080, 0x4c84: 0x0080, 0x4c85: 0x0080, - 0x4c86: 0x0080, 0x4c87: 0x0080, 0x4c88: 0x0080, 0x4c89: 0x0080, 0x4c8a: 0x0080, 0x4c8b: 0x0080, - 0x4c8c: 0x0080, 0x4c8d: 0x0080, 0x4c8e: 0x0080, 0x4c8f: 0x0080, 0x4c90: 0x0080, 0x4c91: 0x0080, - 0x4c92: 0x0080, - 0x4ca0: 0x0080, 0x4ca1: 0x0080, 0x4ca2: 0x0080, 0x4ca3: 0x0080, - 0x4ca4: 0x0080, 0x4ca5: 0x0080, 0x4ca6: 0x0080, 0x4ca7: 0x0080, 0x4ca8: 0x0080, 0x4ca9: 0x0080, - 0x4caa: 0x0080, 0x4cab: 0x0080, 0x4cac: 0x0080, - 0x4cb0: 0x0080, 0x4cb1: 0x0080, 0x4cb2: 0x0080, 0x4cb3: 0x0080, 0x4cb4: 0x0080, 0x4cb5: 0x0080, - 0x4cb6: 0x0080, - // Block 0x133, offset 0x4cc0 - 0x4cc0: 0x0080, 0x4cc1: 0x0080, 0x4cc2: 0x0080, 0x4cc3: 0x0080, 0x4cc4: 0x0080, 0x4cc5: 0x0080, - 0x4cc6: 0x0080, 0x4cc7: 0x0080, 0x4cc8: 0x0080, 0x4cc9: 0x0080, 0x4cca: 0x0080, 0x4ccb: 0x0080, - 0x4ccc: 0x0080, 0x4ccd: 0x0080, 0x4cce: 0x0080, 0x4ccf: 0x0080, 0x4cd0: 0x0080, 0x4cd1: 0x0080, - 0x4cd2: 0x0080, 0x4cd3: 0x0080, 0x4cd4: 0x0080, 0x4cd5: 0x0080, 0x4cd6: 0x0080, 0x4cd7: 0x0080, - 0x4cd8: 0x0080, 0x4cd9: 0x0080, 0x4cda: 0x0080, 0x4cdb: 0x0080, 0x4cdc: 0x0080, 0x4cdd: 0x0080, - 0x4cde: 0x0080, 0x4cdf: 0x0080, 0x4ce0: 0x0080, 0x4ce1: 0x0080, 0x4ce2: 0x0080, 0x4ce3: 0x0080, - 0x4ce4: 0x0080, 0x4ce5: 0x0080, 0x4ce6: 0x0080, 0x4ce7: 0x0080, 0x4ce8: 0x0080, 0x4ce9: 0x0080, - 0x4cea: 0x0080, 0x4ceb: 0x0080, 0x4cec: 0x0080, 0x4ced: 0x0080, 0x4cee: 0x0080, 0x4cef: 0x0080, - 0x4cf0: 0x0080, 0x4cf1: 0x0080, 0x4cf2: 0x0080, 0x4cf3: 0x0080, - // Block 0x134, offset 0x4d00 - 0x4d00: 0x0080, 0x4d01: 0x0080, 0x4d02: 0x0080, 0x4d03: 0x0080, 0x4d04: 0x0080, 0x4d05: 0x0080, - 0x4d06: 0x0080, 0x4d07: 0x0080, 0x4d08: 0x0080, 0x4d09: 0x0080, 0x4d0a: 0x0080, 0x4d0b: 0x0080, - 0x4d0c: 0x0080, 0x4d0d: 0x0080, 0x4d0e: 0x0080, 0x4d0f: 0x0080, 0x4d10: 0x0080, 0x4d11: 0x0080, - 0x4d12: 0x0080, 0x4d13: 0x0080, 0x4d14: 0x0080, - // Block 0x135, offset 0x4d40 - 0x4d40: 0x0080, 0x4d41: 0x0080, 0x4d42: 0x0080, 0x4d43: 0x0080, 0x4d44: 0x0080, 0x4d45: 0x0080, - 0x4d46: 0x0080, 0x4d47: 0x0080, 0x4d48: 0x0080, 0x4d49: 0x0080, 0x4d4a: 0x0080, 0x4d4b: 0x0080, - 0x4d50: 0x0080, 0x4d51: 0x0080, - 0x4d52: 0x0080, 0x4d53: 0x0080, 0x4d54: 0x0080, 0x4d55: 0x0080, 0x4d56: 0x0080, 0x4d57: 0x0080, - 0x4d58: 0x0080, 0x4d59: 0x0080, 0x4d5a: 0x0080, 0x4d5b: 0x0080, 0x4d5c: 0x0080, 0x4d5d: 0x0080, - 0x4d5e: 0x0080, 0x4d5f: 0x0080, 0x4d60: 0x0080, 0x4d61: 0x0080, 0x4d62: 0x0080, 0x4d63: 0x0080, - 0x4d64: 0x0080, 0x4d65: 0x0080, 0x4d66: 0x0080, 0x4d67: 0x0080, 0x4d68: 0x0080, 0x4d69: 0x0080, - 0x4d6a: 0x0080, 0x4d6b: 0x0080, 0x4d6c: 0x0080, 0x4d6d: 0x0080, 0x4d6e: 0x0080, 0x4d6f: 0x0080, - 0x4d70: 0x0080, 0x4d71: 0x0080, 0x4d72: 0x0080, 0x4d73: 0x0080, 0x4d74: 0x0080, 0x4d75: 0x0080, - 0x4d76: 0x0080, 0x4d77: 0x0080, 0x4d78: 0x0080, 0x4d79: 0x0080, 0x4d7a: 0x0080, 0x4d7b: 0x0080, - 0x4d7c: 0x0080, 0x4d7d: 0x0080, 0x4d7e: 0x0080, 0x4d7f: 0x0080, - // Block 0x136, offset 0x4d80 - 0x4d80: 0x0080, 0x4d81: 0x0080, 0x4d82: 0x0080, 0x4d83: 0x0080, 0x4d84: 0x0080, 0x4d85: 0x0080, - 0x4d86: 0x0080, 0x4d87: 0x0080, - 0x4d90: 0x0080, 0x4d91: 0x0080, - 0x4d92: 0x0080, 0x4d93: 0x0080, 0x4d94: 0x0080, 0x4d95: 0x0080, 0x4d96: 0x0080, 0x4d97: 0x0080, - 0x4d98: 0x0080, 0x4d99: 0x0080, - 0x4da0: 0x0080, 0x4da1: 0x0080, 0x4da2: 0x0080, 0x4da3: 0x0080, - 0x4da4: 0x0080, 0x4da5: 0x0080, 0x4da6: 0x0080, 0x4da7: 0x0080, 0x4da8: 0x0080, 0x4da9: 0x0080, - 0x4daa: 0x0080, 0x4dab: 0x0080, 0x4dac: 0x0080, 0x4dad: 0x0080, 0x4dae: 0x0080, 0x4daf: 0x0080, - 0x4db0: 0x0080, 0x4db1: 0x0080, 0x4db2: 0x0080, 0x4db3: 0x0080, 0x4db4: 0x0080, 0x4db5: 0x0080, - 0x4db6: 0x0080, 0x4db7: 0x0080, 0x4db8: 0x0080, 0x4db9: 0x0080, 0x4dba: 0x0080, 0x4dbb: 0x0080, - 0x4dbc: 0x0080, 0x4dbd: 0x0080, 0x4dbe: 0x0080, 0x4dbf: 0x0080, - // Block 0x137, offset 0x4dc0 - 0x4dc0: 0x0080, 0x4dc1: 0x0080, 0x4dc2: 0x0080, 0x4dc3: 0x0080, 0x4dc4: 0x0080, 0x4dc5: 0x0080, - 0x4dc6: 0x0080, 0x4dc7: 0x0080, - 0x4dd0: 0x0080, 0x4dd1: 0x0080, - 0x4dd2: 0x0080, 0x4dd3: 0x0080, 0x4dd4: 0x0080, 0x4dd5: 0x0080, 0x4dd6: 0x0080, 0x4dd7: 0x0080, - 0x4dd8: 0x0080, 0x4dd9: 0x0080, 0x4dda: 0x0080, 0x4ddb: 0x0080, 0x4ddc: 0x0080, 0x4ddd: 0x0080, - 0x4dde: 0x0080, 0x4ddf: 0x0080, 0x4de0: 0x0080, 0x4de1: 0x0080, 0x4de2: 0x0080, 0x4de3: 0x0080, - 0x4de4: 0x0080, 0x4de5: 0x0080, 0x4de6: 0x0080, 0x4de7: 0x0080, 0x4de8: 0x0080, 0x4de9: 0x0080, - 0x4dea: 0x0080, 0x4deb: 0x0080, 0x4dec: 0x0080, 0x4ded: 0x0080, - // Block 0x138, offset 0x4e00 - 0x4e10: 0x0080, 0x4e11: 0x0080, - 0x4e12: 0x0080, 0x4e13: 0x0080, 0x4e14: 0x0080, 0x4e15: 0x0080, 0x4e16: 0x0080, 0x4e17: 0x0080, - 0x4e18: 0x0080, 0x4e19: 0x0080, 0x4e1a: 0x0080, 0x4e1b: 0x0080, 0x4e1c: 0x0080, 0x4e1d: 0x0080, - 0x4e1e: 0x0080, 0x4e20: 0x0080, 0x4e21: 0x0080, 0x4e22: 0x0080, 0x4e23: 0x0080, - 0x4e24: 0x0080, 0x4e25: 0x0080, 0x4e26: 0x0080, 0x4e27: 0x0080, - 0x4e30: 0x0080, 0x4e33: 0x0080, 0x4e34: 0x0080, 0x4e35: 0x0080, - 0x4e36: 0x0080, 0x4e37: 0x0080, 0x4e38: 0x0080, 0x4e39: 0x0080, 0x4e3a: 0x0080, 0x4e3b: 0x0080, - 0x4e3c: 0x0080, 0x4e3d: 0x0080, 0x4e3e: 0x0080, - // Block 0x139, offset 0x4e40 - 0x4e40: 0x0080, 0x4e41: 0x0080, 0x4e42: 0x0080, 0x4e43: 0x0080, 0x4e44: 0x0080, 0x4e45: 0x0080, - 0x4e46: 0x0080, 0x4e47: 0x0080, 0x4e48: 0x0080, 0x4e49: 0x0080, 0x4e4a: 0x0080, 0x4e4b: 0x0080, - 0x4e50: 0x0080, 0x4e51: 0x0080, - 0x4e52: 0x0080, 0x4e53: 0x0080, 0x4e54: 0x0080, 0x4e55: 0x0080, 0x4e56: 0x0080, 0x4e57: 0x0080, - 0x4e58: 0x0080, 0x4e59: 0x0080, 0x4e5a: 0x0080, 0x4e5b: 0x0080, 0x4e5c: 0x0080, 0x4e5d: 0x0080, - 0x4e5e: 0x0080, - // Block 0x13a, offset 0x4e80 - 0x4e80: 0x0080, 0x4e81: 0x0080, 0x4e82: 0x0080, 0x4e83: 0x0080, 0x4e84: 0x0080, 0x4e85: 0x0080, - 0x4e86: 0x0080, 0x4e87: 0x0080, 0x4e88: 0x0080, 0x4e89: 0x0080, 0x4e8a: 0x0080, 0x4e8b: 0x0080, - 0x4e8c: 0x0080, 0x4e8d: 0x0080, 0x4e8e: 0x0080, 0x4e8f: 0x0080, 0x4e90: 0x0080, 0x4e91: 0x0080, - // Block 0x13b, offset 0x4ec0 - 0x4ec0: 0x0080, - // Block 0x13c, offset 0x4f00 - 0x4f00: 0x00cc, 0x4f01: 0x00cc, 0x4f02: 0x00cc, 0x4f03: 0x00cc, 0x4f04: 0x00cc, 0x4f05: 0x00cc, - 0x4f06: 0x00cc, 0x4f07: 0x00cc, 0x4f08: 0x00cc, 0x4f09: 0x00cc, 0x4f0a: 0x00cc, 0x4f0b: 0x00cc, - 0x4f0c: 0x00cc, 0x4f0d: 0x00cc, 0x4f0e: 0x00cc, 0x4f0f: 0x00cc, 0x4f10: 0x00cc, 0x4f11: 0x00cc, - 0x4f12: 0x00cc, 0x4f13: 0x00cc, 0x4f14: 0x00cc, 0x4f15: 0x00cc, 0x4f16: 0x00cc, - // Block 0x13d, offset 0x4f40 - 0x4f40: 0x00cc, 0x4f41: 0x00cc, 0x4f42: 0x00cc, 0x4f43: 0x00cc, 0x4f44: 0x00cc, 0x4f45: 0x00cc, - 0x4f46: 0x00cc, 0x4f47: 0x00cc, 0x4f48: 0x00cc, 0x4f49: 0x00cc, 0x4f4a: 0x00cc, 0x4f4b: 0x00cc, - 0x4f4c: 0x00cc, 0x4f4d: 0x00cc, 0x4f4e: 0x00cc, 0x4f4f: 0x00cc, 0x4f50: 0x00cc, 0x4f51: 0x00cc, - 0x4f52: 0x00cc, 0x4f53: 0x00cc, 0x4f54: 0x00cc, 0x4f55: 0x00cc, 0x4f56: 0x00cc, 0x4f57: 0x00cc, - 0x4f58: 0x00cc, 0x4f59: 0x00cc, 0x4f5a: 0x00cc, 0x4f5b: 0x00cc, 0x4f5c: 0x00cc, 0x4f5d: 0x00cc, - 0x4f5e: 0x00cc, 0x4f5f: 0x00cc, 0x4f60: 0x00cc, 0x4f61: 0x00cc, 0x4f62: 0x00cc, 0x4f63: 0x00cc, - 0x4f64: 0x00cc, 0x4f65: 0x00cc, 0x4f66: 0x00cc, 0x4f67: 0x00cc, 0x4f68: 0x00cc, 0x4f69: 0x00cc, - 0x4f6a: 0x00cc, 0x4f6b: 0x00cc, 0x4f6c: 0x00cc, 0x4f6d: 0x00cc, 0x4f6e: 0x00cc, 0x4f6f: 0x00cc, - 0x4f70: 0x00cc, 0x4f71: 0x00cc, 0x4f72: 0x00cc, 0x4f73: 0x00cc, 0x4f74: 0x00cc, - // Block 0x13e, offset 0x4f80 - 0x4f80: 0x00cc, 0x4f81: 0x00cc, 0x4f82: 0x00cc, 0x4f83: 0x00cc, 0x4f84: 0x00cc, 0x4f85: 0x00cc, - 0x4f86: 0x00cc, 0x4f87: 0x00cc, 0x4f88: 0x00cc, 0x4f89: 0x00cc, 0x4f8a: 0x00cc, 0x4f8b: 0x00cc, - 0x4f8c: 0x00cc, 0x4f8d: 0x00cc, 0x4f8e: 0x00cc, 0x4f8f: 0x00cc, 0x4f90: 0x00cc, 0x4f91: 0x00cc, - 0x4f92: 0x00cc, 0x4f93: 0x00cc, 0x4f94: 0x00cc, 0x4f95: 0x00cc, 0x4f96: 0x00cc, 0x4f97: 0x00cc, - 0x4f98: 0x00cc, 0x4f99: 0x00cc, 0x4f9a: 0x00cc, 0x4f9b: 0x00cc, 0x4f9c: 0x00cc, 0x4f9d: 0x00cc, - 0x4fa0: 0x00cc, 0x4fa1: 0x00cc, 0x4fa2: 0x00cc, 0x4fa3: 0x00cc, - 0x4fa4: 0x00cc, 0x4fa5: 0x00cc, 0x4fa6: 0x00cc, 0x4fa7: 0x00cc, 0x4fa8: 0x00cc, 0x4fa9: 0x00cc, - 0x4faa: 0x00cc, 0x4fab: 0x00cc, 0x4fac: 0x00cc, 0x4fad: 0x00cc, 0x4fae: 0x00cc, 0x4faf: 0x00cc, - 0x4fb0: 0x00cc, 0x4fb1: 0x00cc, 0x4fb2: 0x00cc, 0x4fb3: 0x00cc, 0x4fb4: 0x00cc, 0x4fb5: 0x00cc, - 0x4fb6: 0x00cc, 0x4fb7: 0x00cc, 0x4fb8: 0x00cc, 0x4fb9: 0x00cc, 0x4fba: 0x00cc, 0x4fbb: 0x00cc, - 0x4fbc: 0x00cc, 0x4fbd: 0x00cc, 0x4fbe: 0x00cc, 0x4fbf: 0x00cc, - // Block 0x13f, offset 0x4fc0 - 0x4fc0: 0x00cc, 0x4fc1: 0x00cc, 0x4fc2: 0x00cc, 0x4fc3: 0x00cc, 0x4fc4: 0x00cc, 0x4fc5: 0x00cc, - 0x4fc6: 0x00cc, 0x4fc7: 0x00cc, 0x4fc8: 0x00cc, 0x4fc9: 0x00cc, 0x4fca: 0x00cc, 0x4fcb: 0x00cc, - 0x4fcc: 0x00cc, 0x4fcd: 0x00cc, 0x4fce: 0x00cc, 0x4fcf: 0x00cc, 0x4fd0: 0x00cc, 0x4fd1: 0x00cc, - 0x4fd2: 0x00cc, 0x4fd3: 0x00cc, 0x4fd4: 0x00cc, 0x4fd5: 0x00cc, 0x4fd6: 0x00cc, 0x4fd7: 0x00cc, - 0x4fd8: 0x00cc, 0x4fd9: 0x00cc, 0x4fda: 0x00cc, 0x4fdb: 0x00cc, 0x4fdc: 0x00cc, 0x4fdd: 0x00cc, - 0x4fde: 0x00cc, 0x4fdf: 0x00cc, 0x4fe0: 0x00cc, 0x4fe1: 0x00cc, - // Block 0x140, offset 0x5000 - 0x5000: 0x008c, 0x5001: 0x008c, 0x5002: 0x008c, 0x5003: 0x008c, 0x5004: 0x008c, 0x5005: 0x008c, - 0x5006: 0x008c, 0x5007: 0x008c, 0x5008: 0x008c, 0x5009: 0x008c, 0x500a: 0x008c, 0x500b: 0x008c, - 0x500c: 0x008c, 0x500d: 0x008c, 0x500e: 0x008c, 0x500f: 0x008c, 0x5010: 0x008c, 0x5011: 0x008c, - 0x5012: 0x008c, 0x5013: 0x008c, 0x5014: 0x008c, 0x5015: 0x008c, 0x5016: 0x008c, 0x5017: 0x008c, - 0x5018: 0x008c, 0x5019: 0x008c, 0x501a: 0x008c, 0x501b: 0x008c, 0x501c: 0x008c, 0x501d: 0x008c, - // Block 0x141, offset 0x5040 - 0x5041: 0x0040, - 0x5060: 0x0040, 0x5061: 0x0040, 0x5062: 0x0040, 0x5063: 0x0040, - 0x5064: 0x0040, 0x5065: 0x0040, 0x5066: 0x0040, 0x5067: 0x0040, 0x5068: 0x0040, 0x5069: 0x0040, - 0x506a: 0x0040, 0x506b: 0x0040, 0x506c: 0x0040, 0x506d: 0x0040, 0x506e: 0x0040, 0x506f: 0x0040, - 0x5070: 0x0040, 0x5071: 0x0040, 0x5072: 0x0040, 0x5073: 0x0040, 0x5074: 0x0040, 0x5075: 0x0040, - 0x5076: 0x0040, 0x5077: 0x0040, 0x5078: 0x0040, 0x5079: 0x0040, 0x507a: 0x0040, 0x507b: 0x0040, - 0x507c: 0x0040, 0x507d: 0x0040, 0x507e: 0x0040, 0x507f: 0x0040, - // Block 0x142, offset 0x5080 - 0x5080: 0x0040, 0x5081: 0x0040, 0x5082: 0x0040, 0x5083: 0x0040, 0x5084: 0x0040, 0x5085: 0x0040, - 0x5086: 0x0040, 0x5087: 0x0040, 0x5088: 0x0040, 0x5089: 0x0040, 0x508a: 0x0040, 0x508b: 0x0040, - 0x508c: 0x0040, 0x508d: 0x0040, 0x508e: 0x0040, 0x508f: 0x0040, 0x5090: 0x0040, 0x5091: 0x0040, - 0x5092: 0x0040, 0x5093: 0x0040, 0x5094: 0x0040, 0x5095: 0x0040, 0x5096: 0x0040, 0x5097: 0x0040, - 0x5098: 0x0040, 0x5099: 0x0040, 0x509a: 0x0040, 0x509b: 0x0040, 0x509c: 0x0040, 0x509d: 0x0040, - 0x509e: 0x0040, 0x509f: 0x0040, 0x50a0: 0x0040, 0x50a1: 0x0040, 0x50a2: 0x0040, 0x50a3: 0x0040, - 0x50a4: 0x0040, 0x50a5: 0x0040, 0x50a6: 0x0040, 0x50a7: 0x0040, 0x50a8: 0x0040, 0x50a9: 0x0040, - 0x50aa: 0x0040, 0x50ab: 0x0040, 0x50ac: 0x0040, 0x50ad: 0x0040, 0x50ae: 0x0040, 0x50af: 0x0040, - // Block 0x143, offset 0x50c0 - 0x50c0: 0x0040, 0x50c1: 0x0040, 0x50c2: 0x0040, 0x50c3: 0x0040, 0x50c4: 0x0040, 0x50c5: 0x0040, - 0x50c6: 0x0040, 0x50c7: 0x0040, 0x50c8: 0x0040, 0x50c9: 0x0040, 0x50ca: 0x0040, 0x50cb: 0x0040, - 0x50cc: 0x0040, 0x50cd: 0x0040, 0x50ce: 0x0040, 0x50cf: 0x0040, 0x50d0: 0x0040, 0x50d1: 0x0040, - 0x50d2: 0x0040, 0x50d3: 0x0040, 0x50d4: 0x0040, 0x50d5: 0x0040, 0x50d6: 0x0040, 0x50d7: 0x0040, - 0x50d8: 0x0040, 0x50d9: 0x0040, 0x50da: 0x0040, 0x50db: 0x0040, 0x50dc: 0x0040, 0x50dd: 0x0040, - 0x50de: 0x0040, 0x50df: 0x0040, 0x50e0: 0x0040, 0x50e1: 0x0040, 0x50e2: 0x0040, 0x50e3: 0x0040, - 0x50e4: 0x0040, 0x50e5: 0x0040, 0x50e6: 0x0040, 0x50e7: 0x0040, 0x50e8: 0x0040, 0x50e9: 0x0040, - 0x50ea: 0x0040, 0x50eb: 0x0040, 0x50ec: 0x0040, 0x50ed: 0x0040, 0x50ee: 0x0040, 0x50ef: 0x0040, - 0x50f0: 0x0040, 0x50f1: 0x0040, 0x50f2: 0x0040, 0x50f3: 0x0040, 0x50f4: 0x0040, 0x50f5: 0x0040, - 0x50f6: 0x0040, 0x50f7: 0x0040, 0x50f8: 0x0040, 0x50f9: 0x0040, 0x50fa: 0x0040, 0x50fb: 0x0040, - 0x50fc: 0x0040, 0x50fd: 0x0040, -} - -// derivedPropertiesIndex: 36 blocks, 2304 entries, 4608 bytes -// Block 0 is the zero block. -var derivedPropertiesIndex = [2304]uint16{ - // Block 0x0, offset 0x0 - // Block 0x1, offset 0x40 - // Block 0x2, offset 0x80 - // Block 0x3, offset 0xc0 - 0xc2: 0x01, 0xc3: 0x02, 0xc4: 0x03, 0xc5: 0x04, 0xc6: 0x05, 0xc7: 0x06, - 0xc8: 0x05, 0xc9: 0x05, 0xca: 0x07, 0xcb: 0x08, 0xcc: 0x09, 0xcd: 0x0a, 0xce: 0x0b, 0xcf: 0x0c, - 0xd0: 0x05, 0xd1: 0x05, 0xd2: 0x0d, 0xd3: 0x05, 0xd4: 0x0e, 0xd5: 0x0f, 0xd6: 0x10, 0xd7: 0x11, - 0xd8: 0x12, 0xd9: 0x13, 0xda: 0x14, 0xdb: 0x15, 0xdc: 0x16, 0xdd: 0x17, 0xde: 0x18, 0xdf: 0x19, - 0xe0: 0x02, 0xe1: 0x03, 0xe2: 0x04, 0xe3: 0x05, 0xe4: 0x06, 0xe5: 0x07, 0xe6: 0x07, 0xe7: 0x07, - 0xe8: 0x07, 0xe9: 0x08, 0xea: 0x09, 0xeb: 0x0a, 0xec: 0x0a, 0xed: 0x0b, 0xee: 0x0c, 0xef: 0x0d, - 0xf0: 0x1d, 0xf3: 0x20, 0xf4: 0x21, - // Block 0x4, offset 0x100 - 0x120: 0x1a, 0x121: 0x1b, 0x122: 0x1c, 0x123: 0x1d, 0x124: 0x1e, 0x125: 0x1f, 0x126: 0x20, 0x127: 0x21, - 0x128: 0x22, 0x129: 0x23, 0x12a: 0x24, 0x12b: 0x25, 0x12c: 0x26, 0x12d: 0x27, 0x12e: 0x28, 0x12f: 0x29, - 0x130: 0x2a, 0x131: 0x2b, 0x132: 0x2c, 0x133: 0x2d, 0x134: 0x2e, 0x135: 0x2f, 0x136: 0x30, 0x137: 0x31, - 0x138: 0x32, 0x139: 0x33, 0x13a: 0x34, 0x13b: 0x35, 0x13c: 0x36, 0x13d: 0x37, 0x13e: 0x38, 0x13f: 0x39, - // Block 0x5, offset 0x140 - 0x140: 0x3a, 0x141: 0x3b, 0x142: 0x3c, 0x143: 0x3d, 0x144: 0x3e, 0x145: 0x3e, 0x146: 0x3e, 0x147: 0x3e, - 0x148: 0x05, 0x149: 0x3f, 0x14a: 0x40, 0x14b: 0x41, 0x14c: 0x42, 0x14d: 0x43, 0x14e: 0x44, 0x14f: 0x45, - 0x150: 0x46, 0x151: 0x05, 0x152: 0x05, 0x153: 0x05, 0x154: 0x05, 0x155: 0x05, 0x156: 0x05, 0x157: 0x05, - 0x158: 0x05, 0x159: 0x47, 0x15a: 0x48, 0x15b: 0x49, 0x15c: 0x4a, 0x15d: 0x4b, 0x15e: 0x4c, 0x15f: 0x4d, - 0x160: 0x4e, 0x161: 0x4f, 0x162: 0x50, 0x163: 0x51, 0x164: 0x52, 0x165: 0x53, 0x166: 0x54, 0x167: 0x55, - 0x168: 0x56, 0x169: 0x57, 0x16a: 0x58, 0x16c: 0x59, 0x16d: 0x5a, 0x16e: 0x5b, 0x16f: 0x5c, - 0x170: 0x5d, 0x171: 0x5e, 0x172: 0x5f, 0x173: 0x60, 0x174: 0x61, 0x175: 0x62, 0x176: 0x63, 0x177: 0x64, - 0x178: 0x05, 0x179: 0x05, 0x17a: 0x65, 0x17b: 0x05, 0x17c: 0x66, 0x17d: 0x67, 0x17e: 0x68, 0x17f: 0x69, - // Block 0x6, offset 0x180 - 0x180: 0x6a, 0x181: 0x6b, 0x182: 0x6c, 0x183: 0x6d, 0x184: 0x6e, 0x185: 0x6f, 0x186: 0x70, 0x187: 0x71, - 0x188: 0x71, 0x189: 0x71, 0x18a: 0x71, 0x18b: 0x71, 0x18c: 0x71, 0x18d: 0x71, 0x18e: 0x71, 0x18f: 0x72, - 0x190: 0x73, 0x191: 0x74, 0x192: 0x71, 0x193: 0x71, 0x194: 0x71, 0x195: 0x71, 0x196: 0x71, 0x197: 0x71, - 0x198: 0x71, 0x199: 0x71, 0x19a: 0x71, 0x19b: 0x71, 0x19c: 0x71, 0x19d: 0x71, 0x19e: 0x71, 0x19f: 0x71, - 0x1a0: 0x71, 0x1a1: 0x71, 0x1a2: 0x71, 0x1a3: 0x71, 0x1a4: 0x71, 0x1a5: 0x71, 0x1a6: 0x71, 0x1a7: 0x71, - 0x1a8: 0x71, 0x1a9: 0x71, 0x1aa: 0x71, 0x1ab: 0x71, 0x1ac: 0x71, 0x1ad: 0x75, 0x1ae: 0x76, 0x1af: 0x77, - 0x1b0: 0x78, 0x1b1: 0x79, 0x1b2: 0x05, 0x1b3: 0x7a, 0x1b4: 0x7b, 0x1b5: 0x7c, 0x1b6: 0x7d, 0x1b7: 0x7e, - 0x1b8: 0x7f, 0x1b9: 0x80, 0x1ba: 0x81, 0x1bb: 0x82, 0x1bc: 0x83, 0x1bd: 0x83, 0x1be: 0x83, 0x1bf: 0x84, - // Block 0x7, offset 0x1c0 - 0x1c0: 0x85, 0x1c1: 0x86, 0x1c2: 0x87, 0x1c3: 0x88, 0x1c4: 0x89, 0x1c5: 0x8a, 0x1c6: 0x8b, 0x1c7: 0x8c, - 0x1c8: 0x8d, 0x1c9: 0x71, 0x1ca: 0x71, 0x1cb: 0x8e, 0x1cc: 0x83, 0x1cd: 0x8f, 0x1ce: 0x71, 0x1cf: 0x71, - 0x1d0: 0x90, 0x1d1: 0x90, 0x1d2: 0x90, 0x1d3: 0x90, 0x1d4: 0x90, 0x1d5: 0x90, 0x1d6: 0x90, 0x1d7: 0x90, - 0x1d8: 0x90, 0x1d9: 0x90, 0x1da: 0x90, 0x1db: 0x90, 0x1dc: 0x90, 0x1dd: 0x90, 0x1de: 0x90, 0x1df: 0x90, - 0x1e0: 0x90, 0x1e1: 0x90, 0x1e2: 0x90, 0x1e3: 0x90, 0x1e4: 0x90, 0x1e5: 0x90, 0x1e6: 0x90, 0x1e7: 0x90, - 0x1e8: 0x90, 0x1e9: 0x90, 0x1ea: 0x90, 0x1eb: 0x90, 0x1ec: 0x90, 0x1ed: 0x90, 0x1ee: 0x90, 0x1ef: 0x90, - 0x1f0: 0x90, 0x1f1: 0x90, 0x1f2: 0x90, 0x1f3: 0x90, 0x1f4: 0x90, 0x1f5: 0x90, 0x1f6: 0x90, 0x1f7: 0x90, - 0x1f8: 0x90, 0x1f9: 0x90, 0x1fa: 0x90, 0x1fb: 0x90, 0x1fc: 0x90, 0x1fd: 0x90, 0x1fe: 0x90, 0x1ff: 0x90, - // Block 0x8, offset 0x200 - 0x200: 0x90, 0x201: 0x90, 0x202: 0x90, 0x203: 0x90, 0x204: 0x90, 0x205: 0x90, 0x206: 0x90, 0x207: 0x90, - 0x208: 0x90, 0x209: 0x90, 0x20a: 0x90, 0x20b: 0x90, 0x20c: 0x90, 0x20d: 0x90, 0x20e: 0x90, 0x20f: 0x90, - 0x210: 0x90, 0x211: 0x90, 0x212: 0x90, 0x213: 0x90, 0x214: 0x90, 0x215: 0x90, 0x216: 0x90, 0x217: 0x90, - 0x218: 0x90, 0x219: 0x90, 0x21a: 0x90, 0x21b: 0x90, 0x21c: 0x90, 0x21d: 0x90, 0x21e: 0x90, 0x21f: 0x90, - 0x220: 0x90, 0x221: 0x90, 0x222: 0x90, 0x223: 0x90, 0x224: 0x90, 0x225: 0x90, 0x226: 0x90, 0x227: 0x90, - 0x228: 0x90, 0x229: 0x90, 0x22a: 0x90, 0x22b: 0x90, 0x22c: 0x90, 0x22d: 0x90, 0x22e: 0x90, 0x22f: 0x90, - 0x230: 0x90, 0x231: 0x90, 0x232: 0x90, 0x233: 0x90, 0x234: 0x90, 0x235: 0x90, 0x236: 0x91, 0x237: 0x71, - 0x238: 0x90, 0x239: 0x90, 0x23a: 0x90, 0x23b: 0x90, 0x23c: 0x90, 0x23d: 0x90, 0x23e: 0x90, 0x23f: 0x90, - // Block 0x9, offset 0x240 - 0x240: 0x90, 0x241: 0x90, 0x242: 0x90, 0x243: 0x90, 0x244: 0x90, 0x245: 0x90, 0x246: 0x90, 0x247: 0x90, - 0x248: 0x90, 0x249: 0x90, 0x24a: 0x90, 0x24b: 0x90, 0x24c: 0x90, 0x24d: 0x90, 0x24e: 0x90, 0x24f: 0x90, - 0x250: 0x90, 0x251: 0x90, 0x252: 0x90, 0x253: 0x90, 0x254: 0x90, 0x255: 0x90, 0x256: 0x90, 0x257: 0x90, - 0x258: 0x90, 0x259: 0x90, 0x25a: 0x90, 0x25b: 0x90, 0x25c: 0x90, 0x25d: 0x90, 0x25e: 0x90, 0x25f: 0x90, - 0x260: 0x90, 0x261: 0x90, 0x262: 0x90, 0x263: 0x90, 0x264: 0x90, 0x265: 0x90, 0x266: 0x90, 0x267: 0x90, - 0x268: 0x90, 0x269: 0x90, 0x26a: 0x90, 0x26b: 0x90, 0x26c: 0x90, 0x26d: 0x90, 0x26e: 0x90, 0x26f: 0x90, - 0x270: 0x90, 0x271: 0x90, 0x272: 0x90, 0x273: 0x90, 0x274: 0x90, 0x275: 0x90, 0x276: 0x90, 0x277: 0x90, - 0x278: 0x90, 0x279: 0x90, 0x27a: 0x90, 0x27b: 0x90, 0x27c: 0x90, 0x27d: 0x90, 0x27e: 0x90, 0x27f: 0x90, - // Block 0xa, offset 0x280 - 0x280: 0x90, 0x281: 0x90, 0x282: 0x90, 0x283: 0x90, 0x284: 0x90, 0x285: 0x90, 0x286: 0x90, 0x287: 0x90, - 0x288: 0x90, 0x289: 0x90, 0x28a: 0x90, 0x28b: 0x90, 0x28c: 0x90, 0x28d: 0x90, 0x28e: 0x90, 0x28f: 0x90, - 0x290: 0x90, 0x291: 0x90, 0x292: 0x90, 0x293: 0x90, 0x294: 0x90, 0x295: 0x90, 0x296: 0x90, 0x297: 0x90, - 0x298: 0x90, 0x299: 0x90, 0x29a: 0x90, 0x29b: 0x90, 0x29c: 0x90, 0x29d: 0x90, 0x29e: 0x90, 0x29f: 0x90, - 0x2a0: 0x90, 0x2a1: 0x90, 0x2a2: 0x90, 0x2a3: 0x90, 0x2a4: 0x90, 0x2a5: 0x90, 0x2a6: 0x90, 0x2a7: 0x90, - 0x2a8: 0x90, 0x2a9: 0x90, 0x2aa: 0x90, 0x2ab: 0x90, 0x2ac: 0x90, 0x2ad: 0x90, 0x2ae: 0x90, 0x2af: 0x90, - 0x2b0: 0x90, 0x2b1: 0x90, 0x2b2: 0x90, 0x2b3: 0x90, 0x2b4: 0x90, 0x2b5: 0x90, 0x2b6: 0x90, 0x2b7: 0x90, - 0x2b8: 0x90, 0x2b9: 0x90, 0x2ba: 0x90, 0x2bb: 0x90, 0x2bc: 0x90, 0x2bd: 0x90, 0x2be: 0x90, 0x2bf: 0x92, - // Block 0xb, offset 0x2c0 - 0x2c0: 0x05, 0x2c1: 0x05, 0x2c2: 0x05, 0x2c3: 0x05, 0x2c4: 0x05, 0x2c5: 0x05, 0x2c6: 0x05, 0x2c7: 0x05, - 0x2c8: 0x05, 0x2c9: 0x05, 0x2ca: 0x05, 0x2cb: 0x05, 0x2cc: 0x05, 0x2cd: 0x05, 0x2ce: 0x05, 0x2cf: 0x05, - 0x2d0: 0x05, 0x2d1: 0x05, 0x2d2: 0x93, 0x2d3: 0x94, 0x2d4: 0x05, 0x2d5: 0x05, 0x2d6: 0x05, 0x2d7: 0x05, - 0x2d8: 0x95, 0x2d9: 0x96, 0x2da: 0x97, 0x2db: 0x98, 0x2dc: 0x99, 0x2dd: 0x9a, 0x2de: 0x9b, 0x2df: 0x9c, - 0x2e0: 0x9d, 0x2e1: 0x9e, 0x2e2: 0x05, 0x2e3: 0x9f, 0x2e4: 0xa0, 0x2e5: 0xa1, 0x2e6: 0xa2, 0x2e7: 0xa3, - 0x2e8: 0xa4, 0x2e9: 0xa5, 0x2ea: 0xa6, 0x2eb: 0xa7, 0x2ec: 0xa8, 0x2ed: 0xa9, 0x2ee: 0x05, 0x2ef: 0xaa, - 0x2f0: 0x05, 0x2f1: 0x05, 0x2f2: 0x05, 0x2f3: 0x05, 0x2f4: 0x05, 0x2f5: 0x05, 0x2f6: 0x05, 0x2f7: 0x05, - 0x2f8: 0x05, 0x2f9: 0x05, 0x2fa: 0x05, 0x2fb: 0x05, 0x2fc: 0x05, 0x2fd: 0x05, 0x2fe: 0x05, 0x2ff: 0x05, - // Block 0xc, offset 0x300 - 0x300: 0x05, 0x301: 0x05, 0x302: 0x05, 0x303: 0x05, 0x304: 0x05, 0x305: 0x05, 0x306: 0x05, 0x307: 0x05, - 0x308: 0x05, 0x309: 0x05, 0x30a: 0x05, 0x30b: 0x05, 0x30c: 0x05, 0x30d: 0x05, 0x30e: 0x05, 0x30f: 0x05, - 0x310: 0x05, 0x311: 0x05, 0x312: 0x05, 0x313: 0x05, 0x314: 0x05, 0x315: 0x05, 0x316: 0x05, 0x317: 0x05, - 0x318: 0x05, 0x319: 0x05, 0x31a: 0x05, 0x31b: 0x05, 0x31c: 0x05, 0x31d: 0x05, 0x31e: 0x05, 0x31f: 0x05, - 0x320: 0x05, 0x321: 0x05, 0x322: 0x05, 0x323: 0x05, 0x324: 0x05, 0x325: 0x05, 0x326: 0x05, 0x327: 0x05, - 0x328: 0x05, 0x329: 0x05, 0x32a: 0x05, 0x32b: 0x05, 0x32c: 0x05, 0x32d: 0x05, 0x32e: 0x05, 0x32f: 0x05, - 0x330: 0x05, 0x331: 0x05, 0x332: 0x05, 0x333: 0x05, 0x334: 0x05, 0x335: 0x05, 0x336: 0x05, 0x337: 0x05, - 0x338: 0x05, 0x339: 0x05, 0x33a: 0x05, 0x33b: 0x05, 0x33c: 0x05, 0x33d: 0x05, 0x33e: 0x05, 0x33f: 0x05, - // Block 0xd, offset 0x340 - 0x340: 0x05, 0x341: 0x05, 0x342: 0x05, 0x343: 0x05, 0x344: 0x05, 0x345: 0x05, 0x346: 0x05, 0x347: 0x05, - 0x348: 0x05, 0x349: 0x05, 0x34a: 0x05, 0x34b: 0x05, 0x34c: 0x05, 0x34d: 0x05, 0x34e: 0x05, 0x34f: 0x05, - 0x350: 0x05, 0x351: 0x05, 0x352: 0x05, 0x353: 0x05, 0x354: 0x05, 0x355: 0x05, 0x356: 0x05, 0x357: 0x05, - 0x358: 0x05, 0x359: 0x05, 0x35a: 0x05, 0x35b: 0x05, 0x35c: 0x05, 0x35d: 0x05, 0x35e: 0xab, 0x35f: 0xac, - // Block 0xe, offset 0x380 - 0x380: 0x3e, 0x381: 0x3e, 0x382: 0x3e, 0x383: 0x3e, 0x384: 0x3e, 0x385: 0x3e, 0x386: 0x3e, 0x387: 0x3e, - 0x388: 0x3e, 0x389: 0x3e, 0x38a: 0x3e, 0x38b: 0x3e, 0x38c: 0x3e, 0x38d: 0x3e, 0x38e: 0x3e, 0x38f: 0x3e, - 0x390: 0x3e, 0x391: 0x3e, 0x392: 0x3e, 0x393: 0x3e, 0x394: 0x3e, 0x395: 0x3e, 0x396: 0x3e, 0x397: 0x3e, - 0x398: 0x3e, 0x399: 0x3e, 0x39a: 0x3e, 0x39b: 0x3e, 0x39c: 0x3e, 0x39d: 0x3e, 0x39e: 0x3e, 0x39f: 0x3e, - 0x3a0: 0x3e, 0x3a1: 0x3e, 0x3a2: 0x3e, 0x3a3: 0x3e, 0x3a4: 0x3e, 0x3a5: 0x3e, 0x3a6: 0x3e, 0x3a7: 0x3e, - 0x3a8: 0x3e, 0x3a9: 0x3e, 0x3aa: 0x3e, 0x3ab: 0x3e, 0x3ac: 0x3e, 0x3ad: 0x3e, 0x3ae: 0x3e, 0x3af: 0x3e, - 0x3b0: 0x3e, 0x3b1: 0x3e, 0x3b2: 0x3e, 0x3b3: 0x3e, 0x3b4: 0x3e, 0x3b5: 0x3e, 0x3b6: 0x3e, 0x3b7: 0x3e, - 0x3b8: 0x3e, 0x3b9: 0x3e, 0x3ba: 0x3e, 0x3bb: 0x3e, 0x3bc: 0x3e, 0x3bd: 0x3e, 0x3be: 0x3e, 0x3bf: 0x3e, - // Block 0xf, offset 0x3c0 - 0x3c0: 0x3e, 0x3c1: 0x3e, 0x3c2: 0x3e, 0x3c3: 0x3e, 0x3c4: 0x3e, 0x3c5: 0x3e, 0x3c6: 0x3e, 0x3c7: 0x3e, - 0x3c8: 0x3e, 0x3c9: 0x3e, 0x3ca: 0x3e, 0x3cb: 0x3e, 0x3cc: 0x3e, 0x3cd: 0x3e, 0x3ce: 0x3e, 0x3cf: 0x3e, - 0x3d0: 0x3e, 0x3d1: 0x3e, 0x3d2: 0x3e, 0x3d3: 0x3e, 0x3d4: 0x3e, 0x3d5: 0x3e, 0x3d6: 0x3e, 0x3d7: 0x3e, - 0x3d8: 0x3e, 0x3d9: 0x3e, 0x3da: 0x3e, 0x3db: 0x3e, 0x3dc: 0x3e, 0x3dd: 0x3e, 0x3de: 0x3e, 0x3df: 0x3e, - 0x3e0: 0x3e, 0x3e1: 0x3e, 0x3e2: 0x3e, 0x3e3: 0x3e, 0x3e4: 0x83, 0x3e5: 0x83, 0x3e6: 0x83, 0x3e7: 0x83, - 0x3e8: 0xad, 0x3e9: 0xae, 0x3ea: 0x83, 0x3eb: 0xaf, 0x3ec: 0xb0, 0x3ed: 0xb1, 0x3ee: 0x71, 0x3ef: 0xb2, - 0x3f0: 0x71, 0x3f1: 0x71, 0x3f2: 0x71, 0x3f3: 0x71, 0x3f4: 0x71, 0x3f5: 0xb3, 0x3f6: 0xb4, 0x3f7: 0xb5, - 0x3f8: 0xb6, 0x3f9: 0xb7, 0x3fa: 0x71, 0x3fb: 0xb8, 0x3fc: 0xb9, 0x3fd: 0xba, 0x3fe: 0xbb, 0x3ff: 0xbc, - // Block 0x10, offset 0x400 - 0x400: 0xbd, 0x401: 0xbe, 0x402: 0x05, 0x403: 0xbf, 0x404: 0xc0, 0x405: 0xc1, 0x406: 0xc2, 0x407: 0xc3, - 0x40a: 0xc4, 0x40b: 0xc5, 0x40c: 0xc6, 0x40d: 0xc7, 0x40e: 0xc8, 0x40f: 0xc9, - 0x410: 0x05, 0x411: 0x05, 0x412: 0xca, 0x413: 0xcb, 0x414: 0xcc, 0x415: 0xcd, - 0x418: 0x05, 0x419: 0x05, 0x41a: 0x05, 0x41b: 0x05, 0x41c: 0xce, 0x41d: 0xcf, - 0x420: 0xd0, 0x421: 0xd1, 0x422: 0xd2, 0x423: 0xd3, 0x424: 0xd4, 0x426: 0xd5, 0x427: 0xb4, - 0x428: 0xd6, 0x429: 0xd7, 0x42a: 0xd8, 0x42b: 0xd9, 0x42c: 0xda, 0x42d: 0xdb, 0x42e: 0xdc, - 0x430: 0x05, 0x431: 0x5f, 0x432: 0xdd, 0x433: 0xde, - 0x439: 0xdf, - // Block 0x11, offset 0x440 - 0x440: 0xe0, 0x441: 0xe1, 0x442: 0xe2, 0x443: 0xe3, 0x444: 0xe4, 0x445: 0xe5, 0x446: 0xe6, 0x447: 0xe7, - 0x448: 0xe8, 0x44a: 0xe9, 0x44b: 0xea, 0x44c: 0xeb, 0x44d: 0xec, - 0x450: 0xed, 0x451: 0xee, 0x452: 0xef, 0x453: 0xf0, 0x456: 0xf1, 0x457: 0xf2, - 0x458: 0xf3, 0x459: 0xf4, 0x45a: 0xf5, 0x45b: 0xf6, 0x45c: 0xf7, - 0x462: 0xf8, 0x463: 0xf9, - 0x46b: 0xfa, - 0x470: 0xfb, 0x471: 0xfc, 0x472: 0xfd, - // Block 0x12, offset 0x480 - 0x480: 0x05, 0x481: 0x05, 0x482: 0x05, 0x483: 0x05, 0x484: 0x05, 0x485: 0x05, 0x486: 0x05, 0x487: 0x05, - 0x488: 0x05, 0x489: 0x05, 0x48a: 0x05, 0x48b: 0x05, 0x48c: 0x05, 0x48d: 0x05, 0x48e: 0xfe, - 0x490: 0x71, 0x491: 0xff, 0x492: 0x05, 0x493: 0x05, 0x494: 0x05, 0x495: 0x100, - // Block 0x13, offset 0x4c0 - 0x4c0: 0x05, 0x4c1: 0x05, 0x4c2: 0x05, 0x4c3: 0x05, 0x4c4: 0x05, 0x4c5: 0x05, 0x4c6: 0x05, 0x4c7: 0x05, - 0x4c8: 0x05, 0x4c9: 0x05, 0x4ca: 0x05, 0x4cb: 0x05, 0x4cc: 0x05, 0x4cd: 0x05, 0x4ce: 0x05, 0x4cf: 0x05, - 0x4d0: 0x101, - // Block 0x14, offset 0x500 - 0x510: 0x05, 0x511: 0x05, 0x512: 0x05, 0x513: 0x05, 0x514: 0x05, 0x515: 0x05, 0x516: 0x05, 0x517: 0x05, - 0x518: 0x05, 0x519: 0x102, - // Block 0x15, offset 0x540 - 0x560: 0x05, 0x561: 0x05, 0x562: 0x05, 0x563: 0x05, 0x564: 0x05, 0x565: 0x05, 0x566: 0x05, 0x567: 0x05, - 0x568: 0xfa, 0x569: 0x103, 0x56b: 0x104, 0x56c: 0x105, 0x56d: 0x106, 0x56e: 0x107, - 0x57c: 0x05, 0x57d: 0x108, 0x57e: 0x109, 0x57f: 0x10a, - // Block 0x16, offset 0x580 - 0x580: 0x05, 0x581: 0x05, 0x582: 0x05, 0x583: 0x05, 0x584: 0x05, 0x585: 0x05, 0x586: 0x05, 0x587: 0x05, - 0x588: 0x05, 0x589: 0x05, 0x58a: 0x05, 0x58b: 0x05, 0x58c: 0x05, 0x58d: 0x05, 0x58e: 0x05, 0x58f: 0x05, - 0x590: 0x05, 0x591: 0x05, 0x592: 0x05, 0x593: 0x05, 0x594: 0x05, 0x595: 0x05, 0x596: 0x05, 0x597: 0x05, - 0x598: 0x05, 0x599: 0x05, 0x59a: 0x05, 0x59b: 0x05, 0x59c: 0x05, 0x59d: 0x05, 0x59e: 0x05, 0x59f: 0x10b, - 0x5a0: 0x05, 0x5a1: 0x05, 0x5a2: 0x05, 0x5a3: 0x05, 0x5a4: 0x05, 0x5a5: 0x05, 0x5a6: 0x05, 0x5a7: 0x05, - 0x5a8: 0x05, 0x5a9: 0x05, 0x5aa: 0x05, 0x5ab: 0xdd, - // Block 0x17, offset 0x5c0 - 0x5c0: 0x10c, - 0x5f0: 0x05, 0x5f1: 0x10d, 0x5f2: 0x10e, - // Block 0x18, offset 0x600 - 0x600: 0x71, 0x601: 0x71, 0x602: 0x71, 0x603: 0x10f, 0x604: 0x110, 0x605: 0x111, 0x606: 0x112, 0x607: 0x113, - 0x608: 0xc1, 0x609: 0x114, 0x60c: 0x71, 0x60d: 0x115, - 0x610: 0x71, 0x611: 0x116, 0x612: 0x117, 0x613: 0x118, 0x614: 0x119, 0x615: 0x11a, 0x616: 0x71, 0x617: 0x71, - 0x618: 0x71, 0x619: 0x71, 0x61a: 0x11b, 0x61b: 0x71, 0x61c: 0x71, 0x61d: 0x71, 0x61e: 0x71, 0x61f: 0x11c, - 0x620: 0x71, 0x621: 0x71, 0x622: 0x71, 0x623: 0x71, 0x624: 0x71, 0x625: 0x71, 0x626: 0x71, 0x627: 0x71, - 0x628: 0x11d, 0x629: 0x11e, 0x62a: 0x11f, - // Block 0x19, offset 0x640 - 0x640: 0x120, - 0x660: 0x05, 0x661: 0x05, 0x662: 0x05, 0x663: 0x121, 0x664: 0x122, 0x665: 0x123, - 0x678: 0x124, 0x679: 0x125, 0x67a: 0x126, 0x67b: 0x127, - // Block 0x1a, offset 0x680 - 0x680: 0x128, 0x681: 0x71, 0x682: 0x129, 0x683: 0x12a, 0x684: 0x12b, 0x685: 0x128, 0x686: 0x12c, 0x687: 0x12d, - 0x688: 0x12e, 0x689: 0x12f, 0x68c: 0x71, 0x68d: 0x71, 0x68e: 0x71, 0x68f: 0x71, - 0x690: 0x71, 0x691: 0x71, 0x692: 0x71, 0x693: 0x71, 0x694: 0x71, 0x695: 0x71, 0x696: 0x71, 0x697: 0x71, - 0x698: 0x71, 0x699: 0x71, 0x69a: 0x71, 0x69b: 0x130, 0x69c: 0x71, 0x69d: 0x131, 0x69e: 0x71, 0x69f: 0x132, - 0x6a0: 0x133, 0x6a1: 0x134, 0x6a2: 0x135, 0x6a4: 0x136, 0x6a5: 0x137, 0x6a6: 0x138, 0x6a7: 0x139, - // Block 0x1b, offset 0x6c0 - 0x6c0: 0x90, 0x6c1: 0x90, 0x6c2: 0x90, 0x6c3: 0x90, 0x6c4: 0x90, 0x6c5: 0x90, 0x6c6: 0x90, 0x6c7: 0x90, - 0x6c8: 0x90, 0x6c9: 0x90, 0x6ca: 0x90, 0x6cb: 0x90, 0x6cc: 0x90, 0x6cd: 0x90, 0x6ce: 0x90, 0x6cf: 0x90, - 0x6d0: 0x90, 0x6d1: 0x90, 0x6d2: 0x90, 0x6d3: 0x90, 0x6d4: 0x90, 0x6d5: 0x90, 0x6d6: 0x90, 0x6d7: 0x90, - 0x6d8: 0x90, 0x6d9: 0x90, 0x6da: 0x90, 0x6db: 0x13a, 0x6dc: 0x90, 0x6dd: 0x90, 0x6de: 0x90, 0x6df: 0x90, - 0x6e0: 0x90, 0x6e1: 0x90, 0x6e2: 0x90, 0x6e3: 0x90, 0x6e4: 0x90, 0x6e5: 0x90, 0x6e6: 0x90, 0x6e7: 0x90, - 0x6e8: 0x90, 0x6e9: 0x90, 0x6ea: 0x90, 0x6eb: 0x90, 0x6ec: 0x90, 0x6ed: 0x90, 0x6ee: 0x90, 0x6ef: 0x90, - 0x6f0: 0x90, 0x6f1: 0x90, 0x6f2: 0x90, 0x6f3: 0x90, 0x6f4: 0x90, 0x6f5: 0x90, 0x6f6: 0x90, 0x6f7: 0x90, - 0x6f8: 0x90, 0x6f9: 0x90, 0x6fa: 0x90, 0x6fb: 0x90, 0x6fc: 0x90, 0x6fd: 0x90, 0x6fe: 0x90, 0x6ff: 0x90, - // Block 0x1c, offset 0x700 - 0x700: 0x90, 0x701: 0x90, 0x702: 0x90, 0x703: 0x90, 0x704: 0x90, 0x705: 0x90, 0x706: 0x90, 0x707: 0x90, - 0x708: 0x90, 0x709: 0x90, 0x70a: 0x90, 0x70b: 0x90, 0x70c: 0x90, 0x70d: 0x90, 0x70e: 0x90, 0x70f: 0x90, - 0x710: 0x90, 0x711: 0x90, 0x712: 0x90, 0x713: 0x90, 0x714: 0x90, 0x715: 0x90, 0x716: 0x90, 0x717: 0x90, - 0x718: 0x90, 0x719: 0x90, 0x71a: 0x90, 0x71b: 0x90, 0x71c: 0x13b, 0x71d: 0x90, 0x71e: 0x90, 0x71f: 0x90, - 0x720: 0x13c, 0x721: 0x90, 0x722: 0x90, 0x723: 0x90, 0x724: 0x90, 0x725: 0x90, 0x726: 0x90, 0x727: 0x90, - 0x728: 0x90, 0x729: 0x90, 0x72a: 0x90, 0x72b: 0x90, 0x72c: 0x90, 0x72d: 0x90, 0x72e: 0x90, 0x72f: 0x90, - 0x730: 0x90, 0x731: 0x90, 0x732: 0x90, 0x733: 0x90, 0x734: 0x90, 0x735: 0x90, 0x736: 0x90, 0x737: 0x90, - 0x738: 0x90, 0x739: 0x90, 0x73a: 0x90, 0x73b: 0x90, 0x73c: 0x90, 0x73d: 0x90, 0x73e: 0x90, 0x73f: 0x90, - // Block 0x1d, offset 0x740 - 0x740: 0x90, 0x741: 0x90, 0x742: 0x90, 0x743: 0x90, 0x744: 0x90, 0x745: 0x90, 0x746: 0x90, 0x747: 0x90, - 0x748: 0x90, 0x749: 0x90, 0x74a: 0x90, 0x74b: 0x90, 0x74c: 0x90, 0x74d: 0x90, 0x74e: 0x90, 0x74f: 0x90, - 0x750: 0x90, 0x751: 0x90, 0x752: 0x90, 0x753: 0x90, 0x754: 0x90, 0x755: 0x90, 0x756: 0x90, 0x757: 0x90, - 0x758: 0x90, 0x759: 0x90, 0x75a: 0x90, 0x75b: 0x90, 0x75c: 0x90, 0x75d: 0x90, 0x75e: 0x90, 0x75f: 0x90, - 0x760: 0x90, 0x761: 0x90, 0x762: 0x90, 0x763: 0x90, 0x764: 0x90, 0x765: 0x90, 0x766: 0x90, 0x767: 0x90, - 0x768: 0x90, 0x769: 0x90, 0x76a: 0x90, 0x76b: 0x90, 0x76c: 0x90, 0x76d: 0x90, 0x76e: 0x90, 0x76f: 0x90, - 0x770: 0x90, 0x771: 0x90, 0x772: 0x90, 0x773: 0x90, 0x774: 0x90, 0x775: 0x90, 0x776: 0x90, 0x777: 0x90, - 0x778: 0x90, 0x779: 0x90, 0x77a: 0x13d, - // Block 0x1e, offset 0x780 - 0x7a0: 0x83, 0x7a1: 0x83, 0x7a2: 0x83, 0x7a3: 0x83, 0x7a4: 0x83, 0x7a5: 0x83, 0x7a6: 0x83, 0x7a7: 0x83, - 0x7a8: 0x13e, - // Block 0x1f, offset 0x7c0 - 0x7d0: 0x0e, 0x7d1: 0x0f, 0x7d2: 0x10, 0x7d3: 0x11, 0x7d4: 0x12, 0x7d6: 0x13, 0x7d7: 0x0a, - 0x7d8: 0x14, 0x7db: 0x15, 0x7dd: 0x16, 0x7de: 0x17, 0x7df: 0x18, - 0x7e0: 0x07, 0x7e1: 0x07, 0x7e2: 0x07, 0x7e3: 0x07, 0x7e4: 0x07, 0x7e5: 0x07, 0x7e6: 0x07, 0x7e7: 0x07, - 0x7e8: 0x07, 0x7e9: 0x07, 0x7ea: 0x19, 0x7eb: 0x1a, 0x7ec: 0x1b, 0x7ef: 0x1c, - // Block 0x20, offset 0x800 - 0x800: 0x13f, 0x801: 0x3e, 0x804: 0x3e, 0x805: 0x3e, 0x806: 0x3e, 0x807: 0x140, - // Block 0x21, offset 0x840 - 0x840: 0x3e, 0x841: 0x3e, 0x842: 0x3e, 0x843: 0x3e, 0x844: 0x3e, 0x845: 0x3e, 0x846: 0x3e, 0x847: 0x3e, - 0x848: 0x3e, 0x849: 0x3e, 0x84a: 0x3e, 0x84b: 0x3e, 0x84c: 0x3e, 0x84d: 0x3e, 0x84e: 0x3e, 0x84f: 0x3e, - 0x850: 0x3e, 0x851: 0x3e, 0x852: 0x3e, 0x853: 0x3e, 0x854: 0x3e, 0x855: 0x3e, 0x856: 0x3e, 0x857: 0x3e, - 0x858: 0x3e, 0x859: 0x3e, 0x85a: 0x3e, 0x85b: 0x3e, 0x85c: 0x3e, 0x85d: 0x3e, 0x85e: 0x3e, 0x85f: 0x3e, - 0x860: 0x3e, 0x861: 0x3e, 0x862: 0x3e, 0x863: 0x3e, 0x864: 0x3e, 0x865: 0x3e, 0x866: 0x3e, 0x867: 0x3e, - 0x868: 0x3e, 0x869: 0x3e, 0x86a: 0x3e, 0x86b: 0x3e, 0x86c: 0x3e, 0x86d: 0x3e, 0x86e: 0x3e, 0x86f: 0x3e, - 0x870: 0x3e, 0x871: 0x3e, 0x872: 0x3e, 0x873: 0x3e, 0x874: 0x3e, 0x875: 0x3e, 0x876: 0x3e, 0x877: 0x3e, - 0x878: 0x3e, 0x879: 0x3e, 0x87a: 0x3e, 0x87b: 0x3e, 0x87c: 0x3e, 0x87d: 0x3e, 0x87e: 0x3e, 0x87f: 0x141, - // Block 0x22, offset 0x880 - 0x8a0: 0x1e, - 0x8b0: 0x0c, 0x8b1: 0x0c, 0x8b2: 0x0c, 0x8b3: 0x0c, 0x8b4: 0x0c, 0x8b5: 0x0c, 0x8b6: 0x0c, 0x8b7: 0x0c, - 0x8b8: 0x0c, 0x8b9: 0x0c, 0x8ba: 0x0c, 0x8bb: 0x0c, 0x8bc: 0x0c, 0x8bd: 0x0c, 0x8be: 0x0c, 0x8bf: 0x1f, - // Block 0x23, offset 0x8c0 - 0x8c0: 0x0c, 0x8c1: 0x0c, 0x8c2: 0x0c, 0x8c3: 0x0c, 0x8c4: 0x0c, 0x8c5: 0x0c, 0x8c6: 0x0c, 0x8c7: 0x0c, - 0x8c8: 0x0c, 0x8c9: 0x0c, 0x8ca: 0x0c, 0x8cb: 0x0c, 0x8cc: 0x0c, 0x8cd: 0x0c, 0x8ce: 0x0c, 0x8cf: 0x1f, -} - -// Total table size 25344 bytes (24KiB); checksum: 811C9DC5 diff --git a/vendor/golang.org/x/text/secure/precis/transformer.go b/vendor/golang.org/x/text/secure/precis/transformer.go deleted file mode 100644 index 97ce5e757..000000000 --- a/vendor/golang.org/x/text/secure/precis/transformer.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package precis - -import "golang.org/x/text/transform" - -// Transformer implements the transform.Transformer interface. -type Transformer struct { - t transform.Transformer -} - -// Reset implements the transform.Transformer interface. -func (t Transformer) Reset() { t.t.Reset() } - -// Transform implements the transform.Transformer interface. -func (t Transformer) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { - return t.t.Transform(dst, src, atEOF) -} - -// Bytes returns a new byte slice with the result of applying t to b. -func (t Transformer) Bytes(b []byte) []byte { - b, _, _ = transform.Bytes(t, b) - return b -} - -// String returns a string with the result of applying t to s. -func (t Transformer) String(s string) string { - s, _, _ = transform.String(t, s) - return s -} diff --git a/vendor/golang.org/x/text/secure/precis/trieval.go b/vendor/golang.org/x/text/secure/precis/trieval.go deleted file mode 100644 index 4833f9622..000000000 --- a/vendor/golang.org/x/text/secure/precis/trieval.go +++ /dev/null @@ -1,64 +0,0 @@ -// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. - -package precis - -// entry is the entry of a trie table -// 7..6 property (unassigned, disallowed, maybe, valid) -// 5..0 category -type entry uint8 - -const ( - propShift = 6 - propMask = 0xc0 - catMask = 0x3f -) - -func (e entry) property() property { return property(e & propMask) } -func (e entry) category() category { return category(e & catMask) } - -type property uint8 - -// The order of these constants matter. A Profile may consider runes to be -// allowed either from pValid or idDisOrFreePVal. -const ( - unassigned property = iota << propShift - disallowed - idDisOrFreePVal // disallowed for Identifier, pValid for FreeForm - pValid -) - -// compute permutations of all properties and specialCategories. -type category uint8 - -const ( - other category = iota - - // Special rune types - joiningL - joiningD - joiningT - joiningR - viramaModifier - viramaJoinT // Virama + JoiningT - latinSmallL // U+006c - greek - greekJoinT // Greek + JoiningT - hebrew - hebrewJoinT // Hebrew + JoiningT - japanese // hirigana, katakana, han - - // Special rune types associated with contextual rules defined in - // https://tools.ietf.org/html/rfc5892#appendix-A. - // ContextO - zeroWidthNonJoiner // rule 1 - zeroWidthJoiner // rule 2 - // ContextJ - middleDot // rule 3 - greekLowerNumeralSign // rule 4 - hebrewPreceding // rule 5 and 6 - katakanaMiddleDot // rule 7 - arabicIndicDigit // rule 8 - extendedArabicIndicDigit // rule 9 - - numCategories -) diff --git a/vendor/golang.org/x/text/transform/examples_test.go b/vendor/golang.org/x/text/transform/examples_test.go new file mode 100644 index 000000000..f2e284dba --- /dev/null +++ b/vendor/golang.org/x/text/transform/examples_test.go @@ -0,0 +1,37 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package transform_test + +import ( + "fmt" + "unicode" + + "golang.org/x/text/transform" + "golang.org/x/text/unicode/norm" +) + +func ExampleRemoveFunc() { + input := []byte(`tschüß; до свидания`) + + b := make([]byte, len(input)) + + t := transform.RemoveFunc(unicode.IsSpace) + n, _, _ := t.Transform(b, input, true) + fmt.Println(string(b[:n])) + + t = transform.RemoveFunc(func(r rune) bool { + return !unicode.Is(unicode.Latin, r) + }) + n, _, _ = t.Transform(b, input, true) + fmt.Println(string(b[:n])) + + n, _, _ = t.Transform(b, norm.NFD.Bytes(input), true) + fmt.Println(string(b[:n])) + + // Output: + // tschüß;досвидания + // tschüß + // tschuß +} diff --git a/vendor/golang.org/x/text/transform/transform.go b/vendor/golang.org/x/text/transform/transform.go index 24dcca6a8..fe47b9b35 100644 --- a/vendor/golang.org/x/text/transform/transform.go +++ b/vendor/golang.org/x/text/transform/transform.go @@ -6,7 +6,7 @@ // bytes passing through as well as various transformations. Example // transformations provided by other packages include normalization and // conversion between character sets. -package transform +package transform // import "golang.org/x/text/transform" import ( "bytes" diff --git a/vendor/golang.org/x/text/transform/transform_test.go b/vendor/golang.org/x/text/transform/transform_test.go new file mode 100644 index 000000000..771633d1d --- /dev/null +++ b/vendor/golang.org/x/text/transform/transform_test.go @@ -0,0 +1,1317 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package transform + +import ( + "bytes" + "errors" + "fmt" + "io/ioutil" + "strconv" + "strings" + "testing" + "time" + "unicode/utf8" + + "golang.org/x/text/internal/testtext" +) + +type lowerCaseASCII struct{ NopResetter } + +func (lowerCaseASCII) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { + n := len(src) + if n > len(dst) { + n, err = len(dst), ErrShortDst + } + for i, c := range src[:n] { + if 'A' <= c && c <= 'Z' { + c += 'a' - 'A' + } + dst[i] = c + } + return n, n, err +} + +// lowerCaseASCIILookahead lowercases the string and reports ErrShortSrc as long +// as the input is not atEOF. +type lowerCaseASCIILookahead struct{ NopResetter } + +func (lowerCaseASCIILookahead) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { + n := len(src) + if n > len(dst) { + n, err = len(dst), ErrShortDst + } + for i, c := range src[:n] { + if 'A' <= c && c <= 'Z' { + c += 'a' - 'A' + } + dst[i] = c + } + if !atEOF { + err = ErrShortSrc + } + return n, n, err +} + +var errYouMentionedX = errors.New("you mentioned X") + +type dontMentionX struct{ NopResetter } + +func (dontMentionX) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { + n := len(src) + if n > len(dst) { + n, err = len(dst), ErrShortDst + } + for i, c := range src[:n] { + if c == 'X' { + return i, i, errYouMentionedX + } + dst[i] = c + } + return n, n, err +} + +var errAtEnd = errors.New("error after all text") + +type errorAtEnd struct{ NopResetter } + +func (errorAtEnd) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { + n := copy(dst, src) + if n < len(src) { + return n, n, ErrShortDst + } + if atEOF { + return n, n, errAtEnd + } + return n, n, nil +} + +type replaceWithConstant struct { + replacement string + written int +} + +func (t *replaceWithConstant) Reset() { + t.written = 0 +} + +func (t *replaceWithConstant) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { + if atEOF { + nDst = copy(dst, t.replacement[t.written:]) + t.written += nDst + if t.written < len(t.replacement) { + err = ErrShortDst + } + } + return nDst, len(src), err +} + +type addAnXAtTheEnd struct{ NopResetter } + +func (addAnXAtTheEnd) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { + n := copy(dst, src) + if n < len(src) { + return n, n, ErrShortDst + } + if !atEOF { + return n, n, nil + } + if len(dst) == n { + return n, n, ErrShortDst + } + dst[n] = 'X' + return n + 1, n, nil +} + +// doublerAtEOF is a strange Transformer that transforms "this" to "tthhiiss", +// but only if atEOF is true. +type doublerAtEOF struct{ NopResetter } + +func (doublerAtEOF) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { + if !atEOF { + return 0, 0, ErrShortSrc + } + for i, c := range src { + if 2*i+2 >= len(dst) { + return 2 * i, i, ErrShortDst + } + dst[2*i+0] = c + dst[2*i+1] = c + } + return 2 * len(src), len(src), nil +} + +// rleDecode and rleEncode implement a toy run-length encoding: "aabbbbbbbbbb" +// is encoded as "2a10b". The decoding is assumed to not contain any numbers. + +type rleDecode struct{ NopResetter } + +func (rleDecode) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { +loop: + for len(src) > 0 { + n := 0 + for i, c := range src { + if '0' <= c && c <= '9' { + n = 10*n + int(c-'0') + continue + } + if i == 0 { + return nDst, nSrc, errors.New("rleDecode: bad input") + } + if n > len(dst) { + return nDst, nSrc, ErrShortDst + } + for j := 0; j < n; j++ { + dst[j] = c + } + dst, src = dst[n:], src[i+1:] + nDst, nSrc = nDst+n, nSrc+i+1 + continue loop + } + if atEOF { + return nDst, nSrc, errors.New("rleDecode: bad input") + } + return nDst, nSrc, ErrShortSrc + } + return nDst, nSrc, nil +} + +type rleEncode struct { + NopResetter + + // allowStutter means that "xxxxxxxx" can be encoded as "5x3x" + // instead of always as "8x". + allowStutter bool +} + +func (e rleEncode) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { + for len(src) > 0 { + n, c0 := len(src), src[0] + for i, c := range src[1:] { + if c != c0 { + n = i + 1 + break + } + } + if n == len(src) && !atEOF && !e.allowStutter { + return nDst, nSrc, ErrShortSrc + } + s := strconv.Itoa(n) + if len(s) >= len(dst) { + return nDst, nSrc, ErrShortDst + } + copy(dst, s) + dst[len(s)] = c0 + dst, src = dst[len(s)+1:], src[n:] + nDst, nSrc = nDst+len(s)+1, nSrc+n + } + return nDst, nSrc, nil +} + +// trickler consumes all input bytes, but writes a single byte at a time to dst. +type trickler []byte + +func (t *trickler) Reset() { + *t = nil +} + +func (t *trickler) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { + *t = append(*t, src...) + if len(*t) == 0 { + return 0, 0, nil + } + if len(dst) == 0 { + return 0, len(src), ErrShortDst + } + dst[0] = (*t)[0] + *t = (*t)[1:] + if len(*t) > 0 { + err = ErrShortDst + } + return 1, len(src), err +} + +// delayedTrickler is like trickler, but delays writing output to dst. This is +// highly unlikely to be relevant in practice, but it seems like a good idea +// to have some tolerance as long as progress can be detected. +type delayedTrickler []byte + +func (t *delayedTrickler) Reset() { + *t = nil +} + +func (t *delayedTrickler) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { + if len(*t) > 0 && len(dst) > 0 { + dst[0] = (*t)[0] + *t = (*t)[1:] + nDst = 1 + } + *t = append(*t, src...) + if len(*t) > 0 { + err = ErrShortDst + } + return nDst, len(src), err +} + +type testCase struct { + desc string + t Transformer + src string + dstSize int + srcSize int + ioSize int + wantStr string + wantErr error + wantIter int // number of iterations taken; 0 means we don't care. +} + +func (t testCase) String() string { + return tstr(t.t) + "; " + t.desc +} + +func tstr(t Transformer) string { + if stringer, ok := t.(fmt.Stringer); ok { + return stringer.String() + } + s := fmt.Sprintf("%T", t) + return s[1+strings.Index(s, "."):] +} + +func (c chain) String() string { + buf := &bytes.Buffer{} + buf.WriteString("Chain(") + for i, l := range c.link[:len(c.link)-1] { + if i != 0 { + fmt.Fprint(buf, ", ") + } + buf.WriteString(tstr(l.t)) + } + buf.WriteString(")") + return buf.String() +} + +var testCases = []testCase{ + { + desc: "empty", + t: lowerCaseASCII{}, + src: "", + dstSize: 100, + srcSize: 100, + wantStr: "", + }, + + { + desc: "basic", + t: lowerCaseASCII{}, + src: "Hello WORLD.", + dstSize: 100, + srcSize: 100, + wantStr: "hello world.", + }, + + { + desc: "small dst", + t: lowerCaseASCII{}, + src: "Hello WORLD.", + dstSize: 3, + srcSize: 100, + wantStr: "hello world.", + }, + + { + desc: "small src", + t: lowerCaseASCII{}, + src: "Hello WORLD.", + dstSize: 100, + srcSize: 4, + wantStr: "hello world.", + }, + + { + desc: "small buffers", + t: lowerCaseASCII{}, + src: "Hello WORLD.", + dstSize: 3, + srcSize: 4, + wantStr: "hello world.", + }, + + { + desc: "very small buffers", + t: lowerCaseASCII{}, + src: "Hello WORLD.", + dstSize: 1, + srcSize: 1, + wantStr: "hello world.", + }, + + { + desc: "small dst with lookahead", + t: lowerCaseASCIILookahead{}, + src: "Hello WORLD.", + dstSize: 3, + srcSize: 100, + wantStr: "hello world.", + }, + + { + desc: "small src with lookahead", + t: lowerCaseASCIILookahead{}, + src: "Hello WORLD.", + dstSize: 100, + srcSize: 4, + wantStr: "hello world.", + }, + + { + desc: "small buffers with lookahead", + t: lowerCaseASCIILookahead{}, + src: "Hello WORLD.", + dstSize: 3, + srcSize: 4, + wantStr: "hello world.", + }, + + { + desc: "very small buffers with lookahead", + t: lowerCaseASCIILookahead{}, + src: "Hello WORLD.", + dstSize: 1, + srcSize: 2, + wantStr: "hello world.", + }, + + { + desc: "user error", + t: dontMentionX{}, + src: "The First Rule of Transform Club: don't mention Mister X, ever.", + dstSize: 100, + srcSize: 100, + wantStr: "The First Rule of Transform Club: don't mention Mister ", + wantErr: errYouMentionedX, + }, + + { + desc: "user error at end", + t: errorAtEnd{}, + src: "All goes well until it doesn't.", + dstSize: 100, + srcSize: 100, + wantStr: "All goes well until it doesn't.", + wantErr: errAtEnd, + }, + + { + desc: "user error at end, incremental", + t: errorAtEnd{}, + src: "All goes well until it doesn't.", + dstSize: 10, + srcSize: 10, + wantStr: "All goes well until it doesn't.", + wantErr: errAtEnd, + }, + + { + desc: "replace entire non-empty string with one byte", + t: &replaceWithConstant{replacement: "X"}, + src: "none of this will be copied", + dstSize: 1, + srcSize: 10, + wantStr: "X", + }, + + { + desc: "replace entire empty string with one byte", + t: &replaceWithConstant{replacement: "X"}, + src: "", + dstSize: 1, + srcSize: 10, + wantStr: "X", + }, + + { + desc: "replace entire empty string with seven bytes", + t: &replaceWithConstant{replacement: "ABCDEFG"}, + src: "", + dstSize: 3, + srcSize: 10, + wantStr: "ABCDEFG", + }, + + { + desc: "add an X (initialBufSize-1)", + t: addAnXAtTheEnd{}, + src: aaa[:initialBufSize-1], + dstSize: 10, + srcSize: 10, + wantStr: aaa[:initialBufSize-1] + "X", + }, + + { + desc: "add an X (initialBufSize+0)", + t: addAnXAtTheEnd{}, + src: aaa[:initialBufSize+0], + dstSize: 10, + srcSize: 10, + wantStr: aaa[:initialBufSize+0] + "X", + }, + + { + desc: "add an X (initialBufSize+1)", + t: addAnXAtTheEnd{}, + src: aaa[:initialBufSize+1], + dstSize: 10, + srcSize: 10, + wantStr: aaa[:initialBufSize+1] + "X", + }, + + { + desc: "small buffers", + t: dontMentionX{}, + src: "The First Rule of Transform Club: don't mention Mister X, ever.", + dstSize: 10, + srcSize: 10, + wantStr: "The First Rule of Transform Club: don't mention Mister ", + wantErr: errYouMentionedX, + }, + + { + desc: "very small buffers", + t: dontMentionX{}, + src: "The First Rule of Transform Club: don't mention Mister X, ever.", + dstSize: 1, + srcSize: 1, + wantStr: "The First Rule of Transform Club: don't mention Mister ", + wantErr: errYouMentionedX, + }, + + { + desc: "only transform at EOF", + t: doublerAtEOF{}, + src: "this", + dstSize: 100, + srcSize: 100, + wantStr: "tthhiiss", + }, + + { + desc: "basic", + t: rleDecode{}, + src: "1a2b3c10d11e0f1g", + dstSize: 100, + srcSize: 100, + wantStr: "abbcccddddddddddeeeeeeeeeeeg", + }, + + { + desc: "long", + t: rleDecode{}, + src: "12a23b34c45d56e99z", + dstSize: 100, + srcSize: 100, + wantStr: strings.Repeat("a", 12) + + strings.Repeat("b", 23) + + strings.Repeat("c", 34) + + strings.Repeat("d", 45) + + strings.Repeat("e", 56) + + strings.Repeat("z", 99), + }, + + { + desc: "tight buffers", + t: rleDecode{}, + src: "1a2b3c10d11e0f1g", + dstSize: 11, + srcSize: 3, + wantStr: "abbcccddddddddddeeeeeeeeeeeg", + }, + + { + desc: "short dst", + t: rleDecode{}, + src: "1a2b3c10d11e0f1g", + dstSize: 10, + srcSize: 3, + wantStr: "abbcccdddddddddd", + wantErr: ErrShortDst, + }, + + { + desc: "short src", + t: rleDecode{}, + src: "1a2b3c10d11e0f1g", + dstSize: 11, + srcSize: 2, + ioSize: 2, + wantStr: "abbccc", + wantErr: ErrShortSrc, + }, + + { + desc: "basic", + t: rleEncode{}, + src: "abbcccddddddddddeeeeeeeeeeeg", + dstSize: 100, + srcSize: 100, + wantStr: "1a2b3c10d11e1g", + }, + + { + desc: "long", + t: rleEncode{}, + src: strings.Repeat("a", 12) + + strings.Repeat("b", 23) + + strings.Repeat("c", 34) + + strings.Repeat("d", 45) + + strings.Repeat("e", 56) + + strings.Repeat("z", 99), + dstSize: 100, + srcSize: 100, + wantStr: "12a23b34c45d56e99z", + }, + + { + desc: "tight buffers", + t: rleEncode{}, + src: "abbcccddddddddddeeeeeeeeeeeg", + dstSize: 3, + srcSize: 12, + wantStr: "1a2b3c10d11e1g", + }, + + { + desc: "short dst", + t: rleEncode{}, + src: "abbcccddddddddddeeeeeeeeeeeg", + dstSize: 2, + srcSize: 12, + wantStr: "1a2b3c", + wantErr: ErrShortDst, + }, + + { + desc: "short src", + t: rleEncode{}, + src: "abbcccddddddddddeeeeeeeeeeeg", + dstSize: 3, + srcSize: 11, + ioSize: 11, + wantStr: "1a2b3c10d", + wantErr: ErrShortSrc, + }, + + { + desc: "allowStutter = false", + t: rleEncode{allowStutter: false}, + src: "aaaabbbbbbbbccccddddd", + dstSize: 10, + srcSize: 10, + wantStr: "4a8b4c5d", + }, + + { + desc: "allowStutter = true", + t: rleEncode{allowStutter: true}, + src: "aaaabbbbbbbbccccddddd", + dstSize: 10, + srcSize: 10, + ioSize: 10, + wantStr: "4a6b2b4c4d1d", + }, + + { + desc: "trickler", + t: &trickler{}, + src: "abcdefghijklm", + dstSize: 3, + srcSize: 15, + wantStr: "abcdefghijklm", + }, + + { + desc: "delayedTrickler", + t: &delayedTrickler{}, + src: "abcdefghijklm", + dstSize: 3, + srcSize: 15, + wantStr: "abcdefghijklm", + }, +} + +func TestReader(t *testing.T) { + for _, tc := range testCases { + testtext.Run(t, tc.desc, func(t *testing.T) { + r := NewReader(strings.NewReader(tc.src), tc.t) + // Differently sized dst and src buffers are not part of the + // exported API. We override them manually. + r.dst = make([]byte, tc.dstSize) + r.src = make([]byte, tc.srcSize) + got, err := ioutil.ReadAll(r) + str := string(got) + if str != tc.wantStr || err != tc.wantErr { + t.Errorf("\ngot %q, %v\nwant %q, %v", str, err, tc.wantStr, tc.wantErr) + } + }) + } +} + +func TestWriter(t *testing.T) { + tests := append(testCases, chainTests()...) + for _, tc := range tests { + sizes := []int{1, 2, 3, 4, 5, 10, 100, 1000} + if tc.ioSize > 0 { + sizes = []int{tc.ioSize} + } + for _, sz := range sizes { + testtext.Run(t, fmt.Sprintf("%s/%d", tc.desc, sz), func(t *testing.T) { + bb := &bytes.Buffer{} + w := NewWriter(bb, tc.t) + // Differently sized dst and src buffers are not part of the + // exported API. We override them manually. + w.dst = make([]byte, tc.dstSize) + w.src = make([]byte, tc.srcSize) + src := make([]byte, sz) + var err error + for b := tc.src; len(b) > 0 && err == nil; { + n := copy(src, b) + b = b[n:] + m := 0 + m, err = w.Write(src[:n]) + if m != n && err == nil { + t.Errorf("did not consume all bytes %d < %d", m, n) + } + } + if err == nil { + err = w.Close() + } + str := bb.String() + if str != tc.wantStr || err != tc.wantErr { + t.Errorf("\ngot %q, %v\nwant %q, %v", str, err, tc.wantStr, tc.wantErr) + } + }) + } + } +} + +func TestNop(t *testing.T) { + testCases := []struct { + str string + dstSize int + err error + }{ + {"", 0, nil}, + {"", 10, nil}, + {"a", 0, ErrShortDst}, + {"a", 1, nil}, + {"a", 10, nil}, + } + for i, tc := range testCases { + dst := make([]byte, tc.dstSize) + nDst, nSrc, err := Nop.Transform(dst, []byte(tc.str), true) + want := tc.str + if tc.dstSize < len(want) { + want = want[:tc.dstSize] + } + if got := string(dst[:nDst]); got != want || err != tc.err || nSrc != nDst { + t.Errorf("%d:\ngot %q, %d, %v\nwant %q, %d, %v", i, got, nSrc, err, want, nDst, tc.err) + } + } +} + +func TestDiscard(t *testing.T) { + testCases := []struct { + str string + dstSize int + }{ + {"", 0}, + {"", 10}, + {"a", 0}, + {"ab", 10}, + } + for i, tc := range testCases { + nDst, nSrc, err := Discard.Transform(make([]byte, tc.dstSize), []byte(tc.str), true) + if nDst != 0 || nSrc != len(tc.str) || err != nil { + t.Errorf("%d:\ngot %q, %d, %v\nwant 0, %d, nil", i, nDst, nSrc, err, len(tc.str)) + } + } +} + +// mkChain creates a Chain transformer. x must be alternating between transformer +// and bufSize, like T, (sz, T)* +func mkChain(x ...interface{}) *chain { + t := []Transformer{} + for i := 0; i < len(x); i += 2 { + t = append(t, x[i].(Transformer)) + } + c := Chain(t...).(*chain) + for i, j := 1, 1; i < len(x); i, j = i+2, j+1 { + c.link[j].b = make([]byte, x[i].(int)) + } + return c +} + +func chainTests() []testCase { + return []testCase{ + { + desc: "nil error", + t: mkChain(rleEncode{}, 100, lowerCaseASCII{}), + src: "ABB", + dstSize: 100, + srcSize: 100, + wantStr: "1a2b", + wantErr: nil, + wantIter: 1, + }, + + { + desc: "short dst buffer", + t: mkChain(lowerCaseASCII{}, 3, rleDecode{}), + src: "1a2b3c10d11e0f1g", + dstSize: 10, + srcSize: 3, + wantStr: "abbcccdddddddddd", + wantErr: ErrShortDst, + }, + + { + desc: "short internal dst buffer", + t: mkChain(lowerCaseASCII{}, 3, rleDecode{}, 10, Nop), + src: "1a2b3c10d11e0f1g", + dstSize: 100, + srcSize: 3, + wantStr: "abbcccdddddddddd", + wantErr: errShortInternal, + }, + + { + desc: "short internal dst buffer from input", + t: mkChain(rleDecode{}, 10, Nop), + src: "1a2b3c10d11e0f1g", + dstSize: 100, + srcSize: 3, + wantStr: "abbcccdddddddddd", + wantErr: errShortInternal, + }, + + { + desc: "empty short internal dst buffer", + t: mkChain(lowerCaseASCII{}, 3, rleDecode{}, 10, Nop), + src: "4a7b11e0f1g", + dstSize: 100, + srcSize: 3, + wantStr: "aaaabbbbbbb", + wantErr: errShortInternal, + }, + + { + desc: "empty short internal dst buffer from input", + t: mkChain(rleDecode{}, 10, Nop), + src: "4a7b11e0f1g", + dstSize: 100, + srcSize: 3, + wantStr: "aaaabbbbbbb", + wantErr: errShortInternal, + }, + + { + desc: "short internal src buffer after full dst buffer", + t: mkChain(Nop, 5, rleEncode{}, 10, Nop), + src: "cccccddddd", + dstSize: 100, + srcSize: 100, + wantStr: "", + wantErr: errShortInternal, + wantIter: 1, + }, + + { + desc: "short internal src buffer after short dst buffer; test lastFull", + t: mkChain(rleDecode{}, 5, rleEncode{}, 4, Nop), + src: "2a1b4c6d", + dstSize: 100, + srcSize: 100, + wantStr: "2a1b", + wantErr: errShortInternal, + }, + + { + desc: "short internal src buffer after successful complete fill", + t: mkChain(Nop, 3, rleDecode{}), + src: "123a4b", + dstSize: 4, + srcSize: 3, + wantStr: "", + wantErr: errShortInternal, + wantIter: 1, + }, + + { + desc: "short internal src buffer after short dst buffer; test lastFull", + t: mkChain(rleDecode{}, 5, rleEncode{}), + src: "2a1b4c6d", + dstSize: 4, + srcSize: 100, + wantStr: "2a1b", + wantErr: errShortInternal, + }, + + { + desc: "short src buffer", + t: mkChain(rleEncode{}, 5, Nop), + src: "abbcccddddeeeee", + dstSize: 4, + srcSize: 4, + ioSize: 4, + wantStr: "1a2b3c", + wantErr: ErrShortSrc, + }, + + { + desc: "process all in one go", + t: mkChain(rleEncode{}, 5, Nop), + src: "abbcccddddeeeeeffffff", + dstSize: 100, + srcSize: 100, + wantStr: "1a2b3c4d5e6f", + wantErr: nil, + wantIter: 1, + }, + + { + desc: "complete processing downstream after error", + t: mkChain(dontMentionX{}, 2, rleDecode{}, 5, Nop), + src: "3a4b5eX", + dstSize: 100, + srcSize: 100, + ioSize: 100, + wantStr: "aaabbbbeeeee", + wantErr: errYouMentionedX, + }, + + { + desc: "return downstream fatal errors first (followed by short dst)", + t: mkChain(dontMentionX{}, 8, rleDecode{}, 4, Nop), + src: "3a4b5eX", + dstSize: 100, + srcSize: 100, + ioSize: 100, + wantStr: "aaabbbb", + wantErr: errShortInternal, + }, + + { + desc: "return downstream fatal errors first (followed by short src)", + t: mkChain(dontMentionX{}, 5, Nop, 1, rleDecode{}), + src: "1a5bX", + dstSize: 100, + srcSize: 100, + ioSize: 100, + wantStr: "", + wantErr: errShortInternal, + }, + + { + desc: "short internal", + t: mkChain(Nop, 11, rleEncode{}, 3, Nop), + src: "abbcccddddddddddeeeeeeeeeeeg", + dstSize: 3, + srcSize: 100, + wantStr: "1a2b3c10d", + wantErr: errShortInternal, + }, + } +} + +func doTransform(tc testCase) (res string, iter int, err error) { + tc.t.Reset() + dst := make([]byte, tc.dstSize) + out, in := make([]byte, 0, 2*len(tc.src)), []byte(tc.src) + for { + iter++ + src, atEOF := in, true + if len(src) > tc.srcSize { + src, atEOF = src[:tc.srcSize], false + } + nDst, nSrc, err := tc.t.Transform(dst, src, atEOF) + out = append(out, dst[:nDst]...) + in = in[nSrc:] + switch { + case err == nil && len(in) != 0: + case err == ErrShortSrc && nSrc > 0: + case err == ErrShortDst && (nDst > 0 || nSrc > 0): + default: + return string(out), iter, err + } + } +} + +func TestChain(t *testing.T) { + if c, ok := Chain().(nop); !ok { + t.Errorf("empty chain: %v; want Nop", c) + } + + // Test Chain for a single Transformer. + for _, tc := range testCases { + tc.t = Chain(tc.t) + str, _, err := doTransform(tc) + if str != tc.wantStr || err != tc.wantErr { + t.Errorf("%s:\ngot %q, %v\nwant %q, %v", tc, str, err, tc.wantStr, tc.wantErr) + } + } + + tests := chainTests() + sizes := []int{1, 2, 3, 4, 5, 7, 10, 100, 1000} + addTest := func(tc testCase, t *chain) { + if t.link[0].t != tc.t && tc.wantErr == ErrShortSrc { + tc.wantErr = errShortInternal + } + if t.link[len(t.link)-2].t != tc.t && tc.wantErr == ErrShortDst { + tc.wantErr = errShortInternal + } + tc.t = t + tests = append(tests, tc) + } + for _, tc := range testCases { + for _, sz := range sizes { + tt := tc + tt.dstSize = sz + addTest(tt, mkChain(tc.t, tc.dstSize, Nop)) + addTest(tt, mkChain(tc.t, tc.dstSize, Nop, 2, Nop)) + addTest(tt, mkChain(Nop, tc.srcSize, tc.t, tc.dstSize, Nop)) + if sz >= tc.dstSize && (tc.wantErr != ErrShortDst || sz == tc.dstSize) { + addTest(tt, mkChain(Nop, tc.srcSize, tc.t)) + addTest(tt, mkChain(Nop, 100, Nop, tc.srcSize, tc.t)) + } + } + } + for _, tc := range testCases { + tt := tc + tt.dstSize = 1 + tt.wantStr = "" + addTest(tt, mkChain(tc.t, tc.dstSize, Discard)) + addTest(tt, mkChain(Nop, tc.srcSize, tc.t, tc.dstSize, Discard)) + addTest(tt, mkChain(Nop, tc.srcSize, tc.t, tc.dstSize, Nop, tc.dstSize, Discard)) + } + for _, tc := range testCases { + tt := tc + tt.dstSize = 100 + tt.wantStr = strings.Replace(tc.src, "0f", "", -1) + // Chain encoders and decoders. + if _, ok := tc.t.(rleEncode); ok && tc.wantErr == nil { + addTest(tt, mkChain(tc.t, tc.dstSize, Nop, 1000, rleDecode{})) + addTest(tt, mkChain(tc.t, tc.dstSize, Nop, tc.dstSize, rleDecode{})) + addTest(tt, mkChain(Nop, tc.srcSize, tc.t, tc.dstSize, Nop, 100, rleDecode{})) + // decoding needs larger destinations + addTest(tt, mkChain(Nop, tc.srcSize, tc.t, tc.dstSize, rleDecode{}, 100, Nop)) + addTest(tt, mkChain(Nop, tc.srcSize, tc.t, tc.dstSize, Nop, 100, rleDecode{}, 100, Nop)) + } else if _, ok := tc.t.(rleDecode); ok && tc.wantErr == nil { + // The internal buffer size may need to be the sum of the maximum segment + // size of the two encoders! + addTest(tt, mkChain(tc.t, 2*tc.dstSize, rleEncode{})) + addTest(tt, mkChain(tc.t, tc.dstSize, Nop, 101, rleEncode{})) + addTest(tt, mkChain(Nop, tc.srcSize, tc.t, tc.dstSize, Nop, 100, rleEncode{})) + addTest(tt, mkChain(Nop, tc.srcSize, tc.t, tc.dstSize, Nop, 200, rleEncode{}, 100, Nop)) + } + } + for _, tc := range tests { + str, iter, err := doTransform(tc) + mi := tc.wantIter != 0 && tc.wantIter != iter + if str != tc.wantStr || err != tc.wantErr || mi { + t.Errorf("%s:\ngot iter:%d, %q, %v\nwant iter:%d, %q, %v", tc, iter, str, err, tc.wantIter, tc.wantStr, tc.wantErr) + } + break + } +} + +func TestRemoveFunc(t *testing.T) { + filter := RemoveFunc(func(r rune) bool { + return strings.IndexRune("ab\u0300\u1234,", r) != -1 + }) + tests := []testCase{ + { + src: ",", + wantStr: "", + }, + + { + src: "c", + wantStr: "c", + }, + + { + src: "\u2345", + wantStr: "\u2345", + }, + + { + src: "tschüß", + wantStr: "tschüß", + }, + + { + src: ",до,свидания,", + wantStr: "досвидания", + }, + + { + src: "a\xbd\xb2=\xbc ⌘", + wantStr: "\uFFFD\uFFFD=\uFFFD ⌘", + }, + + { + // If we didn't replace illegal bytes with RuneError, the result + // would be \u0300 or the code would need to be more complex. + src: "\xcc\u0300\x80", + wantStr: "\uFFFD\uFFFD", + }, + + { + src: "\xcc\u0300\x80", + dstSize: 3, + wantStr: "\uFFFD\uFFFD", + wantIter: 2, + }, + + { + // Test a long buffer greater than the internal buffer size + src: "hello\xcc\xcc\xccworld", + srcSize: 13, + wantStr: "hello\uFFFD\uFFFD\uFFFDworld", + wantIter: 1, + }, + + { + src: "\u2345", + dstSize: 2, + wantStr: "", + wantErr: ErrShortDst, + }, + + { + src: "\xcc", + dstSize: 2, + wantStr: "", + wantErr: ErrShortDst, + }, + + { + src: "\u0300", + dstSize: 2, + srcSize: 1, + wantStr: "", + wantErr: ErrShortSrc, + }, + + { + t: RemoveFunc(func(r rune) bool { + return r == utf8.RuneError + }), + src: "\xcc\u0300\x80", + wantStr: "\u0300", + }, + } + + for _, tc := range tests { + tc.desc = tc.src + if tc.t == nil { + tc.t = filter + } + if tc.dstSize == 0 { + tc.dstSize = 100 + } + if tc.srcSize == 0 { + tc.srcSize = 100 + } + str, iter, err := doTransform(tc) + mi := tc.wantIter != 0 && tc.wantIter != iter + if str != tc.wantStr || err != tc.wantErr || mi { + t.Errorf("%+q:\ngot iter:%d, %+q, %v\nwant iter:%d, %+q, %v", tc.src, iter, str, err, tc.wantIter, tc.wantStr, tc.wantErr) + } + + tc.src = str + idem, _, _ := doTransform(tc) + if str != idem { + t.Errorf("%+q: found %+q; want %+q", tc.src, idem, str) + } + } +} + +func testString(t *testing.T, f func(Transformer, string) (string, int, error)) { + for _, tt := range append(testCases, chainTests()...) { + if tt.desc == "allowStutter = true" { + // We don't have control over the buffer size, so we eliminate tests + // that depend on a specific buffer size being set. + continue + } + if tt.wantErr == ErrShortDst || tt.wantErr == ErrShortSrc { + // The result string will be different. + continue + } + testtext.Run(t, tt.desc, func(t *testing.T) { + got, n, err := f(tt.t, tt.src) + if tt.wantErr != err { + t.Errorf("error: got %v; want %v", err, tt.wantErr) + } + // Check that err == nil implies that n == len(tt.src). Note that vice + // versa isn't necessarily true. + if err == nil && n != len(tt.src) { + t.Errorf("err == nil: got %d bytes, want %d", n, err) + } + if got != tt.wantStr { + t.Errorf("string: got %q; want %q", got, tt.wantStr) + } + }) + } +} + +func TestBytes(t *testing.T) { + testString(t, func(z Transformer, s string) (string, int, error) { + b, n, err := Bytes(z, []byte(s)) + return string(b), n, err + }) +} + +func TestAppend(t *testing.T) { + // Create a bunch of subtests for different buffer sizes. + testCases := [][]byte{ + nil, + make([]byte, 0, 0), + make([]byte, 0, 1), + make([]byte, 1, 1), + make([]byte, 1, 5), + make([]byte, 100, 100), + make([]byte, 100, 200), + } + for _, tc := range testCases { + testString(t, func(z Transformer, s string) (string, int, error) { + b, n, err := Append(z, tc, []byte(s)) + return string(b[len(tc):]), n, err + }) + } +} + +func TestString(t *testing.T) { + testtext.Run(t, "transform", func(t *testing.T) { testString(t, String) }) + + // Overrun the internal destination buffer. + for i, s := range []string{ + aaa[:1*initialBufSize-1], + aaa[:1*initialBufSize+0], + aaa[:1*initialBufSize+1], + AAA[:1*initialBufSize-1], + AAA[:1*initialBufSize+0], + AAA[:1*initialBufSize+1], + AAA[:2*initialBufSize-1], + AAA[:2*initialBufSize+0], + AAA[:2*initialBufSize+1], + aaa[:1*initialBufSize-2] + "A", + aaa[:1*initialBufSize-1] + "A", + aaa[:1*initialBufSize+0] + "A", + aaa[:1*initialBufSize+1] + "A", + } { + testtext.Run(t, fmt.Sprint("dst buffer test using lower/", i), func(t *testing.T) { + got, _, _ := String(lowerCaseASCII{}, s) + if want := strings.ToLower(s); got != want { + t.Errorf("got %s (%d); want %s (%d)", got, len(got), want, len(want)) + } + }) + } + + // Overrun the internal source buffer. + for i, s := range []string{ + aaa[:1*initialBufSize-1], + aaa[:1*initialBufSize+0], + aaa[:1*initialBufSize+1], + aaa[:2*initialBufSize+1], + aaa[:2*initialBufSize+0], + aaa[:2*initialBufSize+1], + } { + testtext.Run(t, fmt.Sprint("src buffer test using rleEncode/", i), func(t *testing.T) { + got, _, _ := String(rleEncode{}, s) + if want := fmt.Sprintf("%da", len(s)); got != want { + t.Errorf("got %s (%d); want %s (%d)", got, len(got), want, len(want)) + } + }) + } + + // Test allocations for non-changing strings. + // Note we still need to allocate a single buffer. + for i, s := range []string{ + "", + "123456789", + aaa[:initialBufSize-1], + aaa[:initialBufSize+0], + aaa[:initialBufSize+1], + aaa[:10*initialBufSize], + } { + testtext.Run(t, fmt.Sprint("alloc/", i), func(t *testing.T) { + if n := testtext.AllocsPerRun(5, func() { String(&lowerCaseASCIILookahead{}, s) }); n > 1 { + t.Errorf("#allocs was %f; want 1", n) + } + }) + } +} + +// TestBytesAllocation tests that buffer growth stays limited with the trickler +// transformer, which behaves oddly but within spec. In case buffer growth is +// not correctly handled, the test will either panic with a failed allocation or +// thrash. To ensure the tests terminate under the last condition, we time out +// after some sufficiently long period of time. +func TestBytesAllocation(t *testing.T) { + done := make(chan bool) + go func() { + in := bytes.Repeat([]byte{'a'}, 1000) + tr := trickler(make([]byte, 1)) + Bytes(&tr, in) + done <- true + }() + select { + case <-done: + case <-time.After(3 * time.Second): + t.Error("time out, likely due to excessive allocation") + } +} + +// TestStringAllocation tests that buffer growth stays limited with the trickler +// transformer, which behaves oddly but within spec. In case buffer growth is +// not correctly handled, the test will either panic with a failed allocation or +// thrash. To ensure the tests terminate under the last condition, we time out +// after some sufficiently long period of time. +func TestStringAllocation(t *testing.T) { + done := make(chan bool) + go func() { + tr := trickler(make([]byte, 1)) + String(&tr, aaa[:1000]) + done <- true + }() + select { + case <-done: + case <-time.After(3 * time.Second): + t.Error("time out, likely due to excessive allocation") + } +} + +func BenchmarkStringLowerEmpty(b *testing.B) { + for i := 0; i < b.N; i++ { + String(&lowerCaseASCIILookahead{}, "") + } +} + +func BenchmarkStringLowerIdentical(b *testing.B) { + for i := 0; i < b.N; i++ { + String(&lowerCaseASCIILookahead{}, aaa[:4096]) + } +} + +func BenchmarkStringLowerChanged(b *testing.B) { + for i := 0; i < b.N; i++ { + String(&lowerCaseASCIILookahead{}, AAA[:4096]) + } +} + +var ( + aaa = strings.Repeat("a", 4096) + AAA = strings.Repeat("A", 4096) +) diff --git a/vendor/golang.org/x/text/unicode/bidi/bidi.go b/vendor/golang.org/x/text/unicode/bidi/bidi.go index 1254119b5..3fc4a6252 100644 --- a/vendor/golang.org/x/text/unicode/bidi/bidi.go +++ b/vendor/golang.org/x/text/unicode/bidi/bidi.go @@ -10,7 +10,7 @@ // // NOTE: UNDER CONSTRUCTION. This API may change in backwards incompatible ways // and without notice. -package bidi +package bidi // import "golang.org/x/text/unicode/bidi" // TODO: // The following functionality would not be hard to implement, but hinges on diff --git a/vendor/golang.org/x/text/unicode/bidi/core_test.go b/vendor/golang.org/x/text/unicode/bidi/core_test.go new file mode 100644 index 000000000..f28d386c8 --- /dev/null +++ b/vendor/golang.org/x/text/unicode/bidi/core_test.go @@ -0,0 +1,224 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package bidi + +import ( + "flag" + "fmt" + "log" + "strconv" + "strings" + "testing" + + "golang.org/x/text/internal/gen" + "golang.org/x/text/internal/testtext" + "golang.org/x/text/internal/ucd" + "golang.org/x/text/unicode/norm" +) + +var testLevels = flag.Bool("levels", false, "enable testing of levels") + +// TestBidiCore performs the tests in BidiTest.txt. +// See http://www.unicode.org/Public/UCD/latest/ucd/BidiTest.txt. +func TestBidiCore(t *testing.T) { + testtext.SkipIfNotLong(t) + + r := gen.OpenUCDFile("BidiTest.txt") + defer r.Close() + + var wantLevels, wantOrder []string + p := ucd.New(r, ucd.Part(func(p *ucd.Parser) { + s := strings.Split(p.String(0), ":") + switch s[0] { + case "Levels": + wantLevels = strings.Fields(s[1]) + case "Reorder": + wantOrder = strings.Fields(s[1]) + default: + log.Fatalf("Unknown part %q.", s[0]) + } + })) + + for p.Next() { + types := []Class{} + for _, s := range p.Strings(0) { + types = append(types, bidiClass[s]) + } + // We ignore the bracketing part of the algorithm. + pairTypes := make([]bracketType, len(types)) + pairValues := make([]rune, len(types)) + + for i := uint(0); i < 3; i++ { + if p.Uint(1)&(1<<i) == 0 { + continue + } + lev := level(int(i) - 1) + par := newParagraph(types, pairTypes, pairValues, lev) + + if *testLevels { + levels := par.getLevels([]int{len(types)}) + for i, s := range wantLevels { + if s == "x" { + continue + } + l, _ := strconv.ParseUint(s, 10, 8) + if level(l)&1 != levels[i]&1 { + t.Errorf("%s:%d:levels: got %v; want %v", p.String(0), lev, levels, wantLevels) + break + } + } + } + + order := par.getReordering([]int{len(types)}) + gotOrder := filterOrder(types, order) + if got, want := fmt.Sprint(gotOrder), fmt.Sprint(wantOrder); got != want { + t.Errorf("%s:%d:order: got %v; want %v\noriginal %v", p.String(0), lev, got, want, order) + } + } + } + if err := p.Err(); err != nil { + log.Fatal(err) + } +} + +var removeClasses = map[Class]bool{ + LRO: true, + RLO: true, + RLE: true, + LRE: true, + PDF: true, + BN: true, +} + +// TestBidiCharacters performs the tests in BidiCharacterTest.txt. +// See http://www.unicode.org/Public/UCD/latest/ucd/BidiCharacterTest.txt +func TestBidiCharacters(t *testing.T) { + testtext.SkipIfNotLong(t) + + ucd.Parse(gen.OpenUCDFile("BidiCharacterTest.txt"), func(p *ucd.Parser) { + var ( + types []Class + pairTypes []bracketType + pairValues []rune + parLevel level + + wantLevel = level(p.Int(2)) + wantLevels = p.Strings(3) + wantVisualOrder = p.Strings(4) + ) + + switch l := p.Int(1); l { + case 0, 1: + parLevel = level(l) + case 2: + parLevel = implicitLevel + default: + // Spec says to ignore unknown parts. + } + + runes := p.Runes(0) + + for _, r := range runes { + // Assign the bracket type. + if d := norm.NFKD.PropertiesString(string(r)).Decomposition(); d != nil { + r = []rune(string(d))[0] + } + p, _ := LookupRune(r) + + // Assign the class for this rune. + types = append(types, p.Class()) + + switch { + case !p.IsBracket(): + pairTypes = append(pairTypes, bpNone) + pairValues = append(pairValues, 0) + case p.IsOpeningBracket(): + pairTypes = append(pairTypes, bpOpen) + pairValues = append(pairValues, r) + default: + pairTypes = append(pairTypes, bpClose) + pairValues = append(pairValues, p.reverseBracket(r)) + } + } + par := newParagraph(types, pairTypes, pairValues, parLevel) + + // Test results: + if got := par.embeddingLevel; got != wantLevel { + t.Errorf("%v:level: got %d; want %d", string(runes), got, wantLevel) + } + + if *testLevels { + gotLevels := getLevelStrings(types, par.getLevels([]int{len(types)})) + if got, want := fmt.Sprint(gotLevels), fmt.Sprint(wantLevels); got != want { + t.Errorf("%04X %q:%d: got %v; want %v\nval: %x\npair: %v", runes, string(runes), parLevel, got, want, pairValues, pairTypes) + } + } + + order := par.getReordering([]int{len(types)}) + order = filterOrder(types, order) + if got, want := fmt.Sprint(order), fmt.Sprint(wantVisualOrder); got != want { + t.Errorf("%04X %q:%d: got %v; want %v\ngot order: %s", runes, string(runes), parLevel, got, want, reorder(runes, order)) + } + }) +} + +func getLevelStrings(cl []Class, levels []level) []string { + var results []string + for i, l := range levels { + if !removeClasses[cl[i]] { + results = append(results, fmt.Sprint(l)) + } else { + results = append(results, "x") + } + } + return results +} + +func filterOrder(cl []Class, order []int) []int { + no := []int{} + for _, o := range order { + if !removeClasses[cl[o]] { + no = append(no, o) + } + } + return no +} + +func reorder(r []rune, order []int) string { + nr := make([]rune, len(order)) + for i, o := range order { + nr[i] = r[o] + } + return string(nr) +} + +// bidiClass names and codes taken from class "bc" in +// http://www.unicode.org/Public/8.0.0/ucd/PropertyValueAliases.txt +var bidiClass = map[string]Class{ + "AL": AL, // classArabicLetter, + "AN": AN, // classArabicNumber, + "B": B, // classParagraphSeparator, + "BN": BN, // classBoundaryNeutral, + "CS": CS, // classCommonSeparator, + "EN": EN, // classEuropeanNumber, + "ES": ES, // classEuropeanSeparator, + "ET": ET, // classEuropeanTerminator, + "L": L, // classLeftToRight, + "NSM": NSM, // classNonspacingMark, + "ON": ON, // classOtherNeutral, + "R": R, // classRightToLeft, + "S": S, // classSegmentSeparator, + "WS": WS, // classWhiteSpace, + + "LRO": LRO, // classLeftToRightOverride, + "RLO": RLO, // classRightToLeftOverride, + "LRE": LRE, // classLeftToRightEmbedding, + "RLE": RLE, // classRightToLeftEmbedding, + "PDF": PDF, // classPopDirectionalFormat, + "LRI": LRI, // classLeftToRightIsolate, + "RLI": RLI, // classRightToLeftIsolate, + "FSI": FSI, // classFirstStrongIsolate, + "PDI": PDI, // classPopDirectionalIsolate, +} diff --git a/vendor/golang.org/x/text/unicode/bidi/ranges_test.go b/vendor/golang.org/x/text/unicode/bidi/ranges_test.go new file mode 100644 index 000000000..bfaecd502 --- /dev/null +++ b/vendor/golang.org/x/text/unicode/bidi/ranges_test.go @@ -0,0 +1,53 @@ +// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. + +package bidi + +import ( + "unicode" + + "golang.org/x/text/internal/gen" + "golang.org/x/text/internal/ucd" + "golang.org/x/text/unicode/rangetable" +) + +// These tables are hand-extracted from: +// http://www.unicode.org/Public/8.0.0/ucd/extracted/DerivedBidiClass.txt +func visitDefaults(fn func(r rune, c Class)) { + // first write default values for ranges listed above. + visitRunes(fn, AL, []rune{ + 0x0600, 0x07BF, // Arabic + 0x08A0, 0x08FF, // Arabic Extended-A + 0xFB50, 0xFDCF, // Arabic Presentation Forms + 0xFDF0, 0xFDFF, + 0xFE70, 0xFEFF, + 0x0001EE00, 0x0001EEFF, // Arabic Mathematical Alpha Symbols + }) + visitRunes(fn, R, []rune{ + 0x0590, 0x05FF, // Hebrew + 0x07C0, 0x089F, // Nko et al. + 0xFB1D, 0xFB4F, + 0x00010800, 0x00010FFF, // Cypriot Syllabary et. al. + 0x0001E800, 0x0001EDFF, + 0x0001EF00, 0x0001EFFF, + }) + visitRunes(fn, ET, []rune{ // European Terminator + 0x20A0, 0x20Cf, // Currency symbols + }) + rangetable.Visit(unicode.Noncharacter_Code_Point, func(r rune) { + fn(r, BN) // Boundary Neutral + }) + ucd.Parse(gen.OpenUCDFile("DerivedCoreProperties.txt"), func(p *ucd.Parser) { + if p.String(1) == "Default_Ignorable_Code_Point" { + fn(p.Rune(0), BN) // Boundary Neutral + } + }) +} + +func visitRunes(fn func(r rune, c Class), c Class, runes []rune) { + for i := 0; i < len(runes); i += 2 { + lo, hi := runes[i], runes[i+1] + for j := lo; j <= hi; j++ { + fn(j, c) + } + } +} diff --git a/vendor/golang.org/x/text/unicode/bidi/tables.go b/vendor/golang.org/x/text/unicode/bidi/tables.go index 7212d5add..a0b2b17a1 100644 --- a/vendor/golang.org/x/text/unicode/bidi/tables.go +++ b/vendor/golang.org/x/text/unicode/bidi/tables.go @@ -3,7 +3,7 @@ package bidi // UnicodeVersion is the Unicode version from which the tables in this package are derived. -const UnicodeVersion = "9.0.0" +const UnicodeVersion = "10.0.0" // xorMasks contains masks to be xor-ed with brackets to get the reverse // version. @@ -181,7 +181,7 @@ func (t *bidiTrie) lookupStringUnsafe(s string) uint8 { return 0 } -// bidiTrie. Total size: 15744 bytes (15.38 KiB). Checksum: b4c3b70954803b86. +// bidiTrie. Total size: 16128 bytes (15.75 KiB). Checksum: 8122d83e461996f. type bidiTrie struct{} func newBidiTrie(i int) *bidiTrie { @@ -196,9 +196,9 @@ func (t *bidiTrie) lookupValue(n uint32, b byte) uint8 { } } -// bidiValues: 222 blocks, 14208 entries, 14208 bytes +// bidiValues: 228 blocks, 14592 entries, 14592 bytes // The third block is the zero block. -var bidiValues = [14208]uint8{ +var bidiValues = [14592]uint8{ // Block 0x0, offset 0x0 0x00: 0x000b, 0x01: 0x000b, 0x02: 0x000b, 0x03: 0x000b, 0x04: 0x000b, 0x05: 0x000b, 0x06: 0x000b, 0x07: 0x000b, 0x08: 0x000b, 0x09: 0x0008, 0x0a: 0x0007, 0x0b: 0x0008, @@ -415,9 +415,9 @@ var bidiValues = [14208]uint8{ 0x5cc: 0x0001, 0x5cd: 0x0001, 0x5ce: 0x0001, 0x5cf: 0x0001, 0x5d0: 0x0001, 0x5d1: 0x0001, 0x5d2: 0x0001, 0x5d3: 0x0001, 0x5d4: 0x0001, 0x5d5: 0x0001, 0x5d6: 0x0001, 0x5d7: 0x0001, 0x5d8: 0x0001, 0x5d9: 0x000c, 0x5da: 0x000c, 0x5db: 0x000c, 0x5dc: 0x0001, 0x5dd: 0x0001, - 0x5de: 0x0001, 0x5df: 0x0001, 0x5e0: 0x0001, 0x5e1: 0x0001, 0x5e2: 0x0001, 0x5e3: 0x0001, - 0x5e4: 0x0001, 0x5e5: 0x0001, 0x5e6: 0x0001, 0x5e7: 0x0001, 0x5e8: 0x0001, 0x5e9: 0x0001, - 0x5ea: 0x0001, 0x5eb: 0x0001, 0x5ec: 0x0001, 0x5ed: 0x0001, 0x5ee: 0x0001, 0x5ef: 0x0001, + 0x5de: 0x0001, 0x5df: 0x0001, 0x5e0: 0x000d, 0x5e1: 0x000d, 0x5e2: 0x000d, 0x5e3: 0x000d, + 0x5e4: 0x000d, 0x5e5: 0x000d, 0x5e6: 0x000d, 0x5e7: 0x000d, 0x5e8: 0x000d, 0x5e9: 0x000d, + 0x5ea: 0x000d, 0x5eb: 0x000d, 0x5ec: 0x000d, 0x5ed: 0x000d, 0x5ee: 0x000d, 0x5ef: 0x000d, 0x5f0: 0x0001, 0x5f1: 0x0001, 0x5f2: 0x0001, 0x5f3: 0x0001, 0x5f4: 0x0001, 0x5f5: 0x0001, 0x5f6: 0x0001, 0x5f7: 0x0001, 0x5f8: 0x0001, 0x5f9: 0x0001, 0x5fa: 0x0001, 0x5fb: 0x0001, 0x5fc: 0x0001, 0x5fd: 0x0001, 0x5fe: 0x0001, 0x5ff: 0x0001, @@ -478,6 +478,8 @@ var bidiValues = [14208]uint8{ 0x80d: 0x000c, 0x822: 0x000c, 0x823: 0x000c, 0x831: 0x0004, + 0x83a: 0x000c, 0x83b: 0x000c, + 0x83c: 0x000c, 0x83d: 0x000c, 0x83e: 0x000c, 0x83f: 0x000c, // Block 0x21, offset 0x840 0x841: 0x000c, 0x87c: 0x000c, 0x87f: 0x000c, @@ -508,7 +510,9 @@ var bidiValues = [14208]uint8{ 0x9cc: 0x000c, 0x9cd: 0x000c, 0x9e2: 0x000c, 0x9e3: 0x000c, // Block 0x28, offset 0xa00 - 0xa01: 0x000c, + 0xa00: 0x000c, 0xa01: 0x000c, + 0xa3b: 0x000c, + 0xa3c: 0x000c, // Block 0x29, offset 0xa40 0xa41: 0x000c, 0xa42: 0x000c, 0xa43: 0x000c, 0xa44: 0x000c, 0xa4d: 0x000c, @@ -675,7 +679,7 @@ var bidiValues = [14208]uint8{ 0x1324: 0x000c, 0x1325: 0x000c, 0x1326: 0x000c, 0x1327: 0x000c, 0x1328: 0x000c, 0x1329: 0x000c, 0x132a: 0x000c, 0x132b: 0x000c, 0x132c: 0x000c, 0x132d: 0x000c, 0x132e: 0x000c, 0x132f: 0x000c, 0x1330: 0x000c, 0x1331: 0x000c, 0x1332: 0x000c, 0x1333: 0x000c, 0x1334: 0x000c, 0x1335: 0x000c, - 0x133b: 0x000c, + 0x1336: 0x000c, 0x1337: 0x000c, 0x1338: 0x000c, 0x1339: 0x000c, 0x133b: 0x000c, 0x133c: 0x000c, 0x133d: 0x000c, 0x133e: 0x000c, 0x133f: 0x000c, // Block 0x4d, offset 0x1340 0x137d: 0x000a, 0x137f: 0x000a, @@ -813,36 +817,36 @@ var bidiValues = [14208]uint8{ 0x16d2: 0x000a, 0x16d3: 0x000a, 0x16d4: 0x000a, 0x16d5: 0x000a, 0x16d6: 0x000a, 0x16d7: 0x000a, 0x16d8: 0x000a, 0x16d9: 0x000a, 0x16da: 0x000a, 0x16db: 0x000a, 0x16dc: 0x000a, 0x16dd: 0x000a, 0x16de: 0x000a, 0x16df: 0x000a, 0x16e0: 0x000a, 0x16e1: 0x000a, 0x16e2: 0x000a, 0x16e3: 0x000a, - 0x16e4: 0x000a, 0x16e5: 0x000a, 0x16e6: 0x000a, 0x16e7: 0x000a, 0x16e8: 0x000a, 0x16e9: 0x000a, - 0x16ea: 0x000a, 0x16eb: 0x000a, 0x16ec: 0x000a, 0x16ed: 0x000a, 0x16ee: 0x000a, 0x16ef: 0x000a, - 0x16f0: 0x000a, 0x16f1: 0x000a, 0x16f2: 0x000a, 0x16f3: 0x000a, 0x16f4: 0x000a, 0x16f5: 0x000a, - 0x16f6: 0x000a, 0x16f7: 0x000a, 0x16f8: 0x000a, 0x16f9: 0x000a, 0x16fa: 0x000a, 0x16fb: 0x000a, - 0x16fc: 0x000a, 0x16fd: 0x000a, 0x16fe: 0x000a, + 0x16e4: 0x000a, 0x16e5: 0x000a, 0x16e6: 0x000a, // Block 0x5c, offset 0x1700 0x1700: 0x000a, 0x1701: 0x000a, 0x1702: 0x000a, 0x1703: 0x000a, 0x1704: 0x000a, 0x1705: 0x000a, - 0x1706: 0x000a, 0x1707: 0x000a, 0x1708: 0x000a, 0x1709: 0x000a, 0x170a: 0x000a, 0x170b: 0x000a, - 0x170c: 0x000a, 0x170d: 0x000a, 0x170e: 0x000a, 0x170f: 0x000a, 0x1710: 0x000a, 0x1711: 0x000a, - 0x1712: 0x000a, 0x1713: 0x000a, 0x1714: 0x000a, 0x1715: 0x000a, 0x1716: 0x000a, 0x1717: 0x000a, - 0x1718: 0x000a, 0x1719: 0x000a, 0x171a: 0x000a, 0x171b: 0x000a, 0x171c: 0x000a, 0x171d: 0x000a, - 0x171e: 0x000a, 0x171f: 0x000a, 0x1720: 0x000a, 0x1721: 0x000a, 0x1722: 0x000a, 0x1723: 0x000a, - 0x1724: 0x000a, 0x1725: 0x000a, 0x1726: 0x000a, + 0x1706: 0x000a, 0x1707: 0x000a, 0x1708: 0x000a, 0x1709: 0x000a, 0x170a: 0x000a, + 0x1720: 0x000a, 0x1721: 0x000a, 0x1722: 0x000a, 0x1723: 0x000a, + 0x1724: 0x000a, 0x1725: 0x000a, 0x1726: 0x000a, 0x1727: 0x000a, 0x1728: 0x000a, 0x1729: 0x000a, + 0x172a: 0x000a, 0x172b: 0x000a, 0x172c: 0x000a, 0x172d: 0x000a, 0x172e: 0x000a, 0x172f: 0x000a, + 0x1730: 0x000a, 0x1731: 0x000a, 0x1732: 0x000a, 0x1733: 0x000a, 0x1734: 0x000a, 0x1735: 0x000a, + 0x1736: 0x000a, 0x1737: 0x000a, 0x1738: 0x000a, 0x1739: 0x000a, 0x173a: 0x000a, 0x173b: 0x000a, + 0x173c: 0x000a, 0x173d: 0x000a, 0x173e: 0x000a, 0x173f: 0x000a, // Block 0x5d, offset 0x1740 0x1740: 0x000a, 0x1741: 0x000a, 0x1742: 0x000a, 0x1743: 0x000a, 0x1744: 0x000a, 0x1745: 0x000a, - 0x1746: 0x000a, 0x1747: 0x000a, 0x1748: 0x000a, 0x1749: 0x000a, 0x174a: 0x000a, - 0x1760: 0x000a, 0x1761: 0x000a, 0x1762: 0x000a, 0x1763: 0x000a, - 0x1764: 0x000a, 0x1765: 0x000a, 0x1766: 0x000a, 0x1767: 0x000a, 0x1768: 0x000a, 0x1769: 0x000a, - 0x176a: 0x000a, 0x176b: 0x000a, 0x176c: 0x000a, 0x176d: 0x000a, 0x176e: 0x000a, 0x176f: 0x000a, - 0x1770: 0x000a, 0x1771: 0x000a, 0x1772: 0x000a, 0x1773: 0x000a, 0x1774: 0x000a, 0x1775: 0x000a, - 0x1776: 0x000a, 0x1777: 0x000a, 0x1778: 0x000a, 0x1779: 0x000a, 0x177a: 0x000a, 0x177b: 0x000a, - 0x177c: 0x000a, 0x177d: 0x000a, 0x177e: 0x000a, 0x177f: 0x000a, + 0x1746: 0x000a, 0x1747: 0x000a, 0x1748: 0x0002, 0x1749: 0x0002, 0x174a: 0x0002, 0x174b: 0x0002, + 0x174c: 0x0002, 0x174d: 0x0002, 0x174e: 0x0002, 0x174f: 0x0002, 0x1750: 0x0002, 0x1751: 0x0002, + 0x1752: 0x0002, 0x1753: 0x0002, 0x1754: 0x0002, 0x1755: 0x0002, 0x1756: 0x0002, 0x1757: 0x0002, + 0x1758: 0x0002, 0x1759: 0x0002, 0x175a: 0x0002, 0x175b: 0x0002, // Block 0x5e, offset 0x1780 - 0x1780: 0x000a, 0x1781: 0x000a, 0x1782: 0x000a, 0x1783: 0x000a, 0x1784: 0x000a, 0x1785: 0x000a, - 0x1786: 0x000a, 0x1787: 0x000a, 0x1788: 0x0002, 0x1789: 0x0002, 0x178a: 0x0002, 0x178b: 0x0002, - 0x178c: 0x0002, 0x178d: 0x0002, 0x178e: 0x0002, 0x178f: 0x0002, 0x1790: 0x0002, 0x1791: 0x0002, - 0x1792: 0x0002, 0x1793: 0x0002, 0x1794: 0x0002, 0x1795: 0x0002, 0x1796: 0x0002, 0x1797: 0x0002, - 0x1798: 0x0002, 0x1799: 0x0002, 0x179a: 0x0002, 0x179b: 0x0002, + 0x17aa: 0x000a, 0x17ab: 0x000a, 0x17ac: 0x000a, 0x17ad: 0x000a, 0x17ae: 0x000a, 0x17af: 0x000a, + 0x17b0: 0x000a, 0x17b1: 0x000a, 0x17b2: 0x000a, 0x17b3: 0x000a, 0x17b4: 0x000a, 0x17b5: 0x000a, + 0x17b6: 0x000a, 0x17b7: 0x000a, 0x17b8: 0x000a, 0x17b9: 0x000a, 0x17ba: 0x000a, 0x17bb: 0x000a, + 0x17bc: 0x000a, 0x17bd: 0x000a, 0x17be: 0x000a, 0x17bf: 0x000a, // Block 0x5f, offset 0x17c0 - 0x17ea: 0x000a, 0x17eb: 0x000a, 0x17ec: 0x000a, 0x17ed: 0x000a, 0x17ee: 0x000a, 0x17ef: 0x000a, + 0x17c0: 0x000a, 0x17c1: 0x000a, 0x17c2: 0x000a, 0x17c3: 0x000a, 0x17c4: 0x000a, 0x17c5: 0x000a, + 0x17c6: 0x000a, 0x17c7: 0x000a, 0x17c8: 0x000a, 0x17c9: 0x000a, 0x17ca: 0x000a, 0x17cb: 0x000a, + 0x17cc: 0x000a, 0x17cd: 0x000a, 0x17ce: 0x000a, 0x17cf: 0x000a, 0x17d0: 0x000a, 0x17d1: 0x000a, + 0x17d2: 0x000a, 0x17d3: 0x000a, 0x17d4: 0x000a, 0x17d5: 0x000a, 0x17d6: 0x000a, 0x17d7: 0x000a, + 0x17d8: 0x000a, 0x17d9: 0x000a, 0x17da: 0x000a, 0x17db: 0x000a, 0x17dc: 0x000a, 0x17dd: 0x000a, + 0x17de: 0x000a, 0x17df: 0x000a, 0x17e0: 0x000a, 0x17e1: 0x000a, 0x17e2: 0x000a, 0x17e3: 0x000a, + 0x17e4: 0x000a, 0x17e5: 0x000a, 0x17e6: 0x000a, 0x17e7: 0x000a, 0x17e8: 0x000a, 0x17e9: 0x000a, + 0x17ea: 0x000a, 0x17eb: 0x000a, 0x17ed: 0x000a, 0x17ee: 0x000a, 0x17ef: 0x000a, 0x17f0: 0x000a, 0x17f1: 0x000a, 0x17f2: 0x000a, 0x17f3: 0x000a, 0x17f4: 0x000a, 0x17f5: 0x000a, 0x17f6: 0x000a, 0x17f7: 0x000a, 0x17f8: 0x000a, 0x17f9: 0x000a, 0x17fa: 0x000a, 0x17fb: 0x000a, 0x17fc: 0x000a, 0x17fd: 0x000a, 0x17fe: 0x000a, 0x17ff: 0x000a, @@ -853,282 +857,284 @@ var bidiValues = [14208]uint8{ 0x1812: 0x000a, 0x1813: 0x000a, 0x1814: 0x000a, 0x1815: 0x000a, 0x1816: 0x000a, 0x1817: 0x000a, 0x1818: 0x000a, 0x1819: 0x000a, 0x181a: 0x000a, 0x181b: 0x000a, 0x181c: 0x000a, 0x181d: 0x000a, 0x181e: 0x000a, 0x181f: 0x000a, 0x1820: 0x000a, 0x1821: 0x000a, 0x1822: 0x000a, 0x1823: 0x000a, - 0x1824: 0x000a, 0x1825: 0x000a, 0x1826: 0x000a, 0x1827: 0x000a, 0x1828: 0x000a, 0x1829: 0x000a, - 0x182a: 0x000a, 0x182b: 0x000a, 0x182d: 0x000a, 0x182e: 0x000a, 0x182f: 0x000a, - 0x1830: 0x000a, 0x1831: 0x000a, 0x1832: 0x000a, 0x1833: 0x000a, 0x1834: 0x000a, 0x1835: 0x000a, + 0x1824: 0x000a, 0x1825: 0x000a, 0x1826: 0x000a, 0x1827: 0x000a, 0x1828: 0x003a, 0x1829: 0x002a, + 0x182a: 0x003a, 0x182b: 0x002a, 0x182c: 0x003a, 0x182d: 0x002a, 0x182e: 0x003a, 0x182f: 0x002a, + 0x1830: 0x003a, 0x1831: 0x002a, 0x1832: 0x003a, 0x1833: 0x002a, 0x1834: 0x003a, 0x1835: 0x002a, 0x1836: 0x000a, 0x1837: 0x000a, 0x1838: 0x000a, 0x1839: 0x000a, 0x183a: 0x000a, 0x183b: 0x000a, 0x183c: 0x000a, 0x183d: 0x000a, 0x183e: 0x000a, 0x183f: 0x000a, // Block 0x61, offset 0x1840 - 0x1840: 0x000a, 0x1841: 0x000a, 0x1842: 0x000a, 0x1843: 0x000a, 0x1844: 0x000a, 0x1845: 0x000a, - 0x1846: 0x000a, 0x1847: 0x000a, 0x1848: 0x000a, 0x1849: 0x000a, 0x184a: 0x000a, 0x184b: 0x000a, + 0x1840: 0x000a, 0x1841: 0x000a, 0x1842: 0x000a, 0x1843: 0x000a, 0x1844: 0x000a, 0x1845: 0x009a, + 0x1846: 0x008a, 0x1847: 0x000a, 0x1848: 0x000a, 0x1849: 0x000a, 0x184a: 0x000a, 0x184b: 0x000a, 0x184c: 0x000a, 0x184d: 0x000a, 0x184e: 0x000a, 0x184f: 0x000a, 0x1850: 0x000a, 0x1851: 0x000a, 0x1852: 0x000a, 0x1853: 0x000a, 0x1854: 0x000a, 0x1855: 0x000a, 0x1856: 0x000a, 0x1857: 0x000a, 0x1858: 0x000a, 0x1859: 0x000a, 0x185a: 0x000a, 0x185b: 0x000a, 0x185c: 0x000a, 0x185d: 0x000a, 0x185e: 0x000a, 0x185f: 0x000a, 0x1860: 0x000a, 0x1861: 0x000a, 0x1862: 0x000a, 0x1863: 0x000a, - 0x1864: 0x000a, 0x1865: 0x000a, 0x1866: 0x000a, 0x1867: 0x000a, 0x1868: 0x003a, 0x1869: 0x002a, + 0x1864: 0x000a, 0x1865: 0x000a, 0x1866: 0x003a, 0x1867: 0x002a, 0x1868: 0x003a, 0x1869: 0x002a, 0x186a: 0x003a, 0x186b: 0x002a, 0x186c: 0x003a, 0x186d: 0x002a, 0x186e: 0x003a, 0x186f: 0x002a, - 0x1870: 0x003a, 0x1871: 0x002a, 0x1872: 0x003a, 0x1873: 0x002a, 0x1874: 0x003a, 0x1875: 0x002a, + 0x1870: 0x000a, 0x1871: 0x000a, 0x1872: 0x000a, 0x1873: 0x000a, 0x1874: 0x000a, 0x1875: 0x000a, 0x1876: 0x000a, 0x1877: 0x000a, 0x1878: 0x000a, 0x1879: 0x000a, 0x187a: 0x000a, 0x187b: 0x000a, 0x187c: 0x000a, 0x187d: 0x000a, 0x187e: 0x000a, 0x187f: 0x000a, // Block 0x62, offset 0x1880 - 0x1880: 0x000a, 0x1881: 0x000a, 0x1882: 0x000a, 0x1883: 0x000a, 0x1884: 0x000a, 0x1885: 0x009a, - 0x1886: 0x008a, 0x1887: 0x000a, 0x1888: 0x000a, 0x1889: 0x000a, 0x188a: 0x000a, 0x188b: 0x000a, - 0x188c: 0x000a, 0x188d: 0x000a, 0x188e: 0x000a, 0x188f: 0x000a, 0x1890: 0x000a, 0x1891: 0x000a, - 0x1892: 0x000a, 0x1893: 0x000a, 0x1894: 0x000a, 0x1895: 0x000a, 0x1896: 0x000a, 0x1897: 0x000a, - 0x1898: 0x000a, 0x1899: 0x000a, 0x189a: 0x000a, 0x189b: 0x000a, 0x189c: 0x000a, 0x189d: 0x000a, + 0x1880: 0x000a, 0x1881: 0x000a, 0x1882: 0x000a, 0x1883: 0x007a, 0x1884: 0x006a, 0x1885: 0x009a, + 0x1886: 0x008a, 0x1887: 0x00ba, 0x1888: 0x00aa, 0x1889: 0x009a, 0x188a: 0x008a, 0x188b: 0x007a, + 0x188c: 0x006a, 0x188d: 0x00da, 0x188e: 0x002a, 0x188f: 0x003a, 0x1890: 0x00ca, 0x1891: 0x009a, + 0x1892: 0x008a, 0x1893: 0x007a, 0x1894: 0x006a, 0x1895: 0x009a, 0x1896: 0x008a, 0x1897: 0x00ba, + 0x1898: 0x00aa, 0x1899: 0x000a, 0x189a: 0x000a, 0x189b: 0x000a, 0x189c: 0x000a, 0x189d: 0x000a, 0x189e: 0x000a, 0x189f: 0x000a, 0x18a0: 0x000a, 0x18a1: 0x000a, 0x18a2: 0x000a, 0x18a3: 0x000a, - 0x18a4: 0x000a, 0x18a5: 0x000a, 0x18a6: 0x003a, 0x18a7: 0x002a, 0x18a8: 0x003a, 0x18a9: 0x002a, - 0x18aa: 0x003a, 0x18ab: 0x002a, 0x18ac: 0x003a, 0x18ad: 0x002a, 0x18ae: 0x003a, 0x18af: 0x002a, + 0x18a4: 0x000a, 0x18a5: 0x000a, 0x18a6: 0x000a, 0x18a7: 0x000a, 0x18a8: 0x000a, 0x18a9: 0x000a, + 0x18aa: 0x000a, 0x18ab: 0x000a, 0x18ac: 0x000a, 0x18ad: 0x000a, 0x18ae: 0x000a, 0x18af: 0x000a, 0x18b0: 0x000a, 0x18b1: 0x000a, 0x18b2: 0x000a, 0x18b3: 0x000a, 0x18b4: 0x000a, 0x18b5: 0x000a, 0x18b6: 0x000a, 0x18b7: 0x000a, 0x18b8: 0x000a, 0x18b9: 0x000a, 0x18ba: 0x000a, 0x18bb: 0x000a, 0x18bc: 0x000a, 0x18bd: 0x000a, 0x18be: 0x000a, 0x18bf: 0x000a, // Block 0x63, offset 0x18c0 - 0x18c0: 0x000a, 0x18c1: 0x000a, 0x18c2: 0x000a, 0x18c3: 0x007a, 0x18c4: 0x006a, 0x18c5: 0x009a, - 0x18c6: 0x008a, 0x18c7: 0x00ba, 0x18c8: 0x00aa, 0x18c9: 0x009a, 0x18ca: 0x008a, 0x18cb: 0x007a, - 0x18cc: 0x006a, 0x18cd: 0x00da, 0x18ce: 0x002a, 0x18cf: 0x003a, 0x18d0: 0x00ca, 0x18d1: 0x009a, - 0x18d2: 0x008a, 0x18d3: 0x007a, 0x18d4: 0x006a, 0x18d5: 0x009a, 0x18d6: 0x008a, 0x18d7: 0x00ba, - 0x18d8: 0x00aa, 0x18d9: 0x000a, 0x18da: 0x000a, 0x18db: 0x000a, 0x18dc: 0x000a, 0x18dd: 0x000a, + 0x18c0: 0x000a, 0x18c1: 0x000a, 0x18c2: 0x000a, 0x18c3: 0x000a, 0x18c4: 0x000a, 0x18c5: 0x000a, + 0x18c6: 0x000a, 0x18c7: 0x000a, 0x18c8: 0x000a, 0x18c9: 0x000a, 0x18ca: 0x000a, 0x18cb: 0x000a, + 0x18cc: 0x000a, 0x18cd: 0x000a, 0x18ce: 0x000a, 0x18cf: 0x000a, 0x18d0: 0x000a, 0x18d1: 0x000a, + 0x18d2: 0x000a, 0x18d3: 0x000a, 0x18d4: 0x000a, 0x18d5: 0x000a, 0x18d6: 0x000a, 0x18d7: 0x000a, + 0x18d8: 0x003a, 0x18d9: 0x002a, 0x18da: 0x003a, 0x18db: 0x002a, 0x18dc: 0x000a, 0x18dd: 0x000a, 0x18de: 0x000a, 0x18df: 0x000a, 0x18e0: 0x000a, 0x18e1: 0x000a, 0x18e2: 0x000a, 0x18e3: 0x000a, 0x18e4: 0x000a, 0x18e5: 0x000a, 0x18e6: 0x000a, 0x18e7: 0x000a, 0x18e8: 0x000a, 0x18e9: 0x000a, 0x18ea: 0x000a, 0x18eb: 0x000a, 0x18ec: 0x000a, 0x18ed: 0x000a, 0x18ee: 0x000a, 0x18ef: 0x000a, 0x18f0: 0x000a, 0x18f1: 0x000a, 0x18f2: 0x000a, 0x18f3: 0x000a, 0x18f4: 0x000a, 0x18f5: 0x000a, 0x18f6: 0x000a, 0x18f7: 0x000a, 0x18f8: 0x000a, 0x18f9: 0x000a, 0x18fa: 0x000a, 0x18fb: 0x000a, - 0x18fc: 0x000a, 0x18fd: 0x000a, 0x18fe: 0x000a, 0x18ff: 0x000a, + 0x18fc: 0x003a, 0x18fd: 0x002a, 0x18fe: 0x000a, 0x18ff: 0x000a, // Block 0x64, offset 0x1900 0x1900: 0x000a, 0x1901: 0x000a, 0x1902: 0x000a, 0x1903: 0x000a, 0x1904: 0x000a, 0x1905: 0x000a, 0x1906: 0x000a, 0x1907: 0x000a, 0x1908: 0x000a, 0x1909: 0x000a, 0x190a: 0x000a, 0x190b: 0x000a, 0x190c: 0x000a, 0x190d: 0x000a, 0x190e: 0x000a, 0x190f: 0x000a, 0x1910: 0x000a, 0x1911: 0x000a, 0x1912: 0x000a, 0x1913: 0x000a, 0x1914: 0x000a, 0x1915: 0x000a, 0x1916: 0x000a, 0x1917: 0x000a, - 0x1918: 0x003a, 0x1919: 0x002a, 0x191a: 0x003a, 0x191b: 0x002a, 0x191c: 0x000a, 0x191d: 0x000a, + 0x1918: 0x000a, 0x1919: 0x000a, 0x191a: 0x000a, 0x191b: 0x000a, 0x191c: 0x000a, 0x191d: 0x000a, 0x191e: 0x000a, 0x191f: 0x000a, 0x1920: 0x000a, 0x1921: 0x000a, 0x1922: 0x000a, 0x1923: 0x000a, 0x1924: 0x000a, 0x1925: 0x000a, 0x1926: 0x000a, 0x1927: 0x000a, 0x1928: 0x000a, 0x1929: 0x000a, 0x192a: 0x000a, 0x192b: 0x000a, 0x192c: 0x000a, 0x192d: 0x000a, 0x192e: 0x000a, 0x192f: 0x000a, - 0x1930: 0x000a, 0x1931: 0x000a, 0x1932: 0x000a, 0x1933: 0x000a, 0x1934: 0x000a, 0x1935: 0x000a, + 0x1930: 0x000a, 0x1931: 0x000a, 0x1932: 0x000a, 0x1933: 0x000a, 0x1936: 0x000a, 0x1937: 0x000a, 0x1938: 0x000a, 0x1939: 0x000a, 0x193a: 0x000a, 0x193b: 0x000a, - 0x193c: 0x003a, 0x193d: 0x002a, 0x193e: 0x000a, 0x193f: 0x000a, + 0x193c: 0x000a, 0x193d: 0x000a, 0x193e: 0x000a, 0x193f: 0x000a, // Block 0x65, offset 0x1940 0x1940: 0x000a, 0x1941: 0x000a, 0x1942: 0x000a, 0x1943: 0x000a, 0x1944: 0x000a, 0x1945: 0x000a, 0x1946: 0x000a, 0x1947: 0x000a, 0x1948: 0x000a, 0x1949: 0x000a, 0x194a: 0x000a, 0x194b: 0x000a, 0x194c: 0x000a, 0x194d: 0x000a, 0x194e: 0x000a, 0x194f: 0x000a, 0x1950: 0x000a, 0x1951: 0x000a, - 0x1952: 0x000a, 0x1953: 0x000a, 0x1954: 0x000a, 0x1955: 0x000a, 0x1956: 0x000a, 0x1957: 0x000a, + 0x1952: 0x000a, 0x1953: 0x000a, 0x1954: 0x000a, 0x1955: 0x000a, 0x1958: 0x000a, 0x1959: 0x000a, 0x195a: 0x000a, 0x195b: 0x000a, 0x195c: 0x000a, 0x195d: 0x000a, 0x195e: 0x000a, 0x195f: 0x000a, 0x1960: 0x000a, 0x1961: 0x000a, 0x1962: 0x000a, 0x1963: 0x000a, 0x1964: 0x000a, 0x1965: 0x000a, 0x1966: 0x000a, 0x1967: 0x000a, 0x1968: 0x000a, 0x1969: 0x000a, 0x196a: 0x000a, 0x196b: 0x000a, 0x196c: 0x000a, 0x196d: 0x000a, 0x196e: 0x000a, 0x196f: 0x000a, - 0x1970: 0x000a, 0x1971: 0x000a, 0x1972: 0x000a, 0x1973: 0x000a, - 0x1976: 0x000a, 0x1977: 0x000a, 0x1978: 0x000a, 0x1979: 0x000a, 0x197a: 0x000a, 0x197b: 0x000a, - 0x197c: 0x000a, 0x197d: 0x000a, 0x197e: 0x000a, 0x197f: 0x000a, + 0x1970: 0x000a, 0x1971: 0x000a, 0x1972: 0x000a, 0x1973: 0x000a, 0x1974: 0x000a, 0x1975: 0x000a, + 0x1976: 0x000a, 0x1977: 0x000a, 0x1978: 0x000a, 0x1979: 0x000a, + 0x197d: 0x000a, 0x197e: 0x000a, 0x197f: 0x000a, // Block 0x66, offset 0x1980 0x1980: 0x000a, 0x1981: 0x000a, 0x1982: 0x000a, 0x1983: 0x000a, 0x1984: 0x000a, 0x1985: 0x000a, - 0x1986: 0x000a, 0x1987: 0x000a, 0x1988: 0x000a, 0x1989: 0x000a, 0x198a: 0x000a, 0x198b: 0x000a, + 0x1986: 0x000a, 0x1987: 0x000a, 0x1988: 0x000a, 0x198a: 0x000a, 0x198b: 0x000a, 0x198c: 0x000a, 0x198d: 0x000a, 0x198e: 0x000a, 0x198f: 0x000a, 0x1990: 0x000a, 0x1991: 0x000a, - 0x1992: 0x000a, 0x1993: 0x000a, 0x1994: 0x000a, 0x1995: 0x000a, - 0x1998: 0x000a, 0x1999: 0x000a, 0x199a: 0x000a, 0x199b: 0x000a, 0x199c: 0x000a, 0x199d: 0x000a, - 0x199e: 0x000a, 0x199f: 0x000a, 0x19a0: 0x000a, 0x19a1: 0x000a, 0x19a2: 0x000a, 0x19a3: 0x000a, - 0x19a4: 0x000a, 0x19a5: 0x000a, 0x19a6: 0x000a, 0x19a7: 0x000a, 0x19a8: 0x000a, 0x19a9: 0x000a, - 0x19aa: 0x000a, 0x19ab: 0x000a, 0x19ac: 0x000a, 0x19ad: 0x000a, 0x19ae: 0x000a, 0x19af: 0x000a, - 0x19b0: 0x000a, 0x19b1: 0x000a, 0x19b2: 0x000a, 0x19b3: 0x000a, 0x19b4: 0x000a, 0x19b5: 0x000a, - 0x19b6: 0x000a, 0x19b7: 0x000a, 0x19b8: 0x000a, 0x19b9: 0x000a, - 0x19bd: 0x000a, 0x19be: 0x000a, 0x19bf: 0x000a, + 0x1992: 0x000a, + 0x19ac: 0x000a, 0x19ad: 0x000a, 0x19ae: 0x000a, 0x19af: 0x000a, // Block 0x67, offset 0x19c0 - 0x19c0: 0x000a, 0x19c1: 0x000a, 0x19c2: 0x000a, 0x19c3: 0x000a, 0x19c4: 0x000a, 0x19c5: 0x000a, - 0x19c6: 0x000a, 0x19c7: 0x000a, 0x19c8: 0x000a, 0x19ca: 0x000a, 0x19cb: 0x000a, - 0x19cc: 0x000a, 0x19cd: 0x000a, 0x19ce: 0x000a, 0x19cf: 0x000a, 0x19d0: 0x000a, 0x19d1: 0x000a, - 0x19ec: 0x000a, 0x19ed: 0x000a, 0x19ee: 0x000a, 0x19ef: 0x000a, + 0x19e5: 0x000a, 0x19e6: 0x000a, 0x19e7: 0x000a, 0x19e8: 0x000a, 0x19e9: 0x000a, + 0x19ea: 0x000a, 0x19ef: 0x000c, + 0x19f0: 0x000c, 0x19f1: 0x000c, + 0x19f9: 0x000a, 0x19fa: 0x000a, 0x19fb: 0x000a, + 0x19fc: 0x000a, 0x19fd: 0x000a, 0x19fe: 0x000a, 0x19ff: 0x000a, // Block 0x68, offset 0x1a00 - 0x1a25: 0x000a, 0x1a26: 0x000a, 0x1a27: 0x000a, 0x1a28: 0x000a, 0x1a29: 0x000a, - 0x1a2a: 0x000a, 0x1a2f: 0x000c, - 0x1a30: 0x000c, 0x1a31: 0x000c, - 0x1a39: 0x000a, 0x1a3a: 0x000a, 0x1a3b: 0x000a, - 0x1a3c: 0x000a, 0x1a3d: 0x000a, 0x1a3e: 0x000a, 0x1a3f: 0x000a, + 0x1a3f: 0x000c, // Block 0x69, offset 0x1a40 - 0x1a7f: 0x000c, + 0x1a60: 0x000c, 0x1a61: 0x000c, 0x1a62: 0x000c, 0x1a63: 0x000c, + 0x1a64: 0x000c, 0x1a65: 0x000c, 0x1a66: 0x000c, 0x1a67: 0x000c, 0x1a68: 0x000c, 0x1a69: 0x000c, + 0x1a6a: 0x000c, 0x1a6b: 0x000c, 0x1a6c: 0x000c, 0x1a6d: 0x000c, 0x1a6e: 0x000c, 0x1a6f: 0x000c, + 0x1a70: 0x000c, 0x1a71: 0x000c, 0x1a72: 0x000c, 0x1a73: 0x000c, 0x1a74: 0x000c, 0x1a75: 0x000c, + 0x1a76: 0x000c, 0x1a77: 0x000c, 0x1a78: 0x000c, 0x1a79: 0x000c, 0x1a7a: 0x000c, 0x1a7b: 0x000c, + 0x1a7c: 0x000c, 0x1a7d: 0x000c, 0x1a7e: 0x000c, 0x1a7f: 0x000c, // Block 0x6a, offset 0x1a80 - 0x1aa0: 0x000c, 0x1aa1: 0x000c, 0x1aa2: 0x000c, 0x1aa3: 0x000c, - 0x1aa4: 0x000c, 0x1aa5: 0x000c, 0x1aa6: 0x000c, 0x1aa7: 0x000c, 0x1aa8: 0x000c, 0x1aa9: 0x000c, - 0x1aaa: 0x000c, 0x1aab: 0x000c, 0x1aac: 0x000c, 0x1aad: 0x000c, 0x1aae: 0x000c, 0x1aaf: 0x000c, - 0x1ab0: 0x000c, 0x1ab1: 0x000c, 0x1ab2: 0x000c, 0x1ab3: 0x000c, 0x1ab4: 0x000c, 0x1ab5: 0x000c, - 0x1ab6: 0x000c, 0x1ab7: 0x000c, 0x1ab8: 0x000c, 0x1ab9: 0x000c, 0x1aba: 0x000c, 0x1abb: 0x000c, - 0x1abc: 0x000c, 0x1abd: 0x000c, 0x1abe: 0x000c, 0x1abf: 0x000c, + 0x1a80: 0x000a, 0x1a81: 0x000a, 0x1a82: 0x000a, 0x1a83: 0x000a, 0x1a84: 0x000a, 0x1a85: 0x000a, + 0x1a86: 0x000a, 0x1a87: 0x000a, 0x1a88: 0x000a, 0x1a89: 0x000a, 0x1a8a: 0x000a, 0x1a8b: 0x000a, + 0x1a8c: 0x000a, 0x1a8d: 0x000a, 0x1a8e: 0x000a, 0x1a8f: 0x000a, 0x1a90: 0x000a, 0x1a91: 0x000a, + 0x1a92: 0x000a, 0x1a93: 0x000a, 0x1a94: 0x000a, 0x1a95: 0x000a, 0x1a96: 0x000a, 0x1a97: 0x000a, + 0x1a98: 0x000a, 0x1a99: 0x000a, 0x1a9a: 0x000a, 0x1a9b: 0x000a, 0x1a9c: 0x000a, 0x1a9d: 0x000a, + 0x1a9e: 0x000a, 0x1a9f: 0x000a, 0x1aa0: 0x000a, 0x1aa1: 0x000a, 0x1aa2: 0x003a, 0x1aa3: 0x002a, + 0x1aa4: 0x003a, 0x1aa5: 0x002a, 0x1aa6: 0x003a, 0x1aa7: 0x002a, 0x1aa8: 0x003a, 0x1aa9: 0x002a, + 0x1aaa: 0x000a, 0x1aab: 0x000a, 0x1aac: 0x000a, 0x1aad: 0x000a, 0x1aae: 0x000a, 0x1aaf: 0x000a, + 0x1ab0: 0x000a, 0x1ab1: 0x000a, 0x1ab2: 0x000a, 0x1ab3: 0x000a, 0x1ab4: 0x000a, 0x1ab5: 0x000a, + 0x1ab6: 0x000a, 0x1ab7: 0x000a, 0x1ab8: 0x000a, 0x1ab9: 0x000a, 0x1aba: 0x000a, 0x1abb: 0x000a, + 0x1abc: 0x000a, 0x1abd: 0x000a, 0x1abe: 0x000a, 0x1abf: 0x000a, // Block 0x6b, offset 0x1ac0 0x1ac0: 0x000a, 0x1ac1: 0x000a, 0x1ac2: 0x000a, 0x1ac3: 0x000a, 0x1ac4: 0x000a, 0x1ac5: 0x000a, - 0x1ac6: 0x000a, 0x1ac7: 0x000a, 0x1ac8: 0x000a, 0x1ac9: 0x000a, 0x1aca: 0x000a, 0x1acb: 0x000a, - 0x1acc: 0x000a, 0x1acd: 0x000a, 0x1ace: 0x000a, 0x1acf: 0x000a, 0x1ad0: 0x000a, 0x1ad1: 0x000a, - 0x1ad2: 0x000a, 0x1ad3: 0x000a, 0x1ad4: 0x000a, 0x1ad5: 0x000a, 0x1ad6: 0x000a, 0x1ad7: 0x000a, - 0x1ad8: 0x000a, 0x1ad9: 0x000a, 0x1ada: 0x000a, 0x1adb: 0x000a, 0x1adc: 0x000a, 0x1add: 0x000a, - 0x1ade: 0x000a, 0x1adf: 0x000a, 0x1ae0: 0x000a, 0x1ae1: 0x000a, 0x1ae2: 0x003a, 0x1ae3: 0x002a, - 0x1ae4: 0x003a, 0x1ae5: 0x002a, 0x1ae6: 0x003a, 0x1ae7: 0x002a, 0x1ae8: 0x003a, 0x1ae9: 0x002a, - 0x1aea: 0x000a, 0x1aeb: 0x000a, 0x1aec: 0x000a, 0x1aed: 0x000a, 0x1aee: 0x000a, 0x1aef: 0x000a, - 0x1af0: 0x000a, 0x1af1: 0x000a, 0x1af2: 0x000a, 0x1af3: 0x000a, 0x1af4: 0x000a, 0x1af5: 0x000a, - 0x1af6: 0x000a, 0x1af7: 0x000a, 0x1af8: 0x000a, 0x1af9: 0x000a, 0x1afa: 0x000a, 0x1afb: 0x000a, - 0x1afc: 0x000a, 0x1afd: 0x000a, 0x1afe: 0x000a, 0x1aff: 0x000a, + 0x1ac6: 0x000a, 0x1ac7: 0x000a, 0x1ac8: 0x000a, 0x1ac9: 0x000a, // Block 0x6c, offset 0x1b00 - 0x1b00: 0x000a, 0x1b01: 0x000a, 0x1b02: 0x000a, 0x1b03: 0x000a, 0x1b04: 0x000a, + 0x1b00: 0x000a, 0x1b01: 0x000a, 0x1b02: 0x000a, 0x1b03: 0x000a, 0x1b04: 0x000a, 0x1b05: 0x000a, + 0x1b06: 0x000a, 0x1b07: 0x000a, 0x1b08: 0x000a, 0x1b09: 0x000a, 0x1b0a: 0x000a, 0x1b0b: 0x000a, + 0x1b0c: 0x000a, 0x1b0d: 0x000a, 0x1b0e: 0x000a, 0x1b0f: 0x000a, 0x1b10: 0x000a, 0x1b11: 0x000a, + 0x1b12: 0x000a, 0x1b13: 0x000a, 0x1b14: 0x000a, 0x1b15: 0x000a, 0x1b16: 0x000a, 0x1b17: 0x000a, + 0x1b18: 0x000a, 0x1b19: 0x000a, 0x1b1b: 0x000a, 0x1b1c: 0x000a, 0x1b1d: 0x000a, + 0x1b1e: 0x000a, 0x1b1f: 0x000a, 0x1b20: 0x000a, 0x1b21: 0x000a, 0x1b22: 0x000a, 0x1b23: 0x000a, + 0x1b24: 0x000a, 0x1b25: 0x000a, 0x1b26: 0x000a, 0x1b27: 0x000a, 0x1b28: 0x000a, 0x1b29: 0x000a, + 0x1b2a: 0x000a, 0x1b2b: 0x000a, 0x1b2c: 0x000a, 0x1b2d: 0x000a, 0x1b2e: 0x000a, 0x1b2f: 0x000a, + 0x1b30: 0x000a, 0x1b31: 0x000a, 0x1b32: 0x000a, 0x1b33: 0x000a, 0x1b34: 0x000a, 0x1b35: 0x000a, + 0x1b36: 0x000a, 0x1b37: 0x000a, 0x1b38: 0x000a, 0x1b39: 0x000a, 0x1b3a: 0x000a, 0x1b3b: 0x000a, + 0x1b3c: 0x000a, 0x1b3d: 0x000a, 0x1b3e: 0x000a, 0x1b3f: 0x000a, // Block 0x6d, offset 0x1b40 0x1b40: 0x000a, 0x1b41: 0x000a, 0x1b42: 0x000a, 0x1b43: 0x000a, 0x1b44: 0x000a, 0x1b45: 0x000a, 0x1b46: 0x000a, 0x1b47: 0x000a, 0x1b48: 0x000a, 0x1b49: 0x000a, 0x1b4a: 0x000a, 0x1b4b: 0x000a, 0x1b4c: 0x000a, 0x1b4d: 0x000a, 0x1b4e: 0x000a, 0x1b4f: 0x000a, 0x1b50: 0x000a, 0x1b51: 0x000a, 0x1b52: 0x000a, 0x1b53: 0x000a, 0x1b54: 0x000a, 0x1b55: 0x000a, 0x1b56: 0x000a, 0x1b57: 0x000a, - 0x1b58: 0x000a, 0x1b59: 0x000a, 0x1b5b: 0x000a, 0x1b5c: 0x000a, 0x1b5d: 0x000a, + 0x1b58: 0x000a, 0x1b59: 0x000a, 0x1b5a: 0x000a, 0x1b5b: 0x000a, 0x1b5c: 0x000a, 0x1b5d: 0x000a, 0x1b5e: 0x000a, 0x1b5f: 0x000a, 0x1b60: 0x000a, 0x1b61: 0x000a, 0x1b62: 0x000a, 0x1b63: 0x000a, 0x1b64: 0x000a, 0x1b65: 0x000a, 0x1b66: 0x000a, 0x1b67: 0x000a, 0x1b68: 0x000a, 0x1b69: 0x000a, 0x1b6a: 0x000a, 0x1b6b: 0x000a, 0x1b6c: 0x000a, 0x1b6d: 0x000a, 0x1b6e: 0x000a, 0x1b6f: 0x000a, - 0x1b70: 0x000a, 0x1b71: 0x000a, 0x1b72: 0x000a, 0x1b73: 0x000a, 0x1b74: 0x000a, 0x1b75: 0x000a, - 0x1b76: 0x000a, 0x1b77: 0x000a, 0x1b78: 0x000a, 0x1b79: 0x000a, 0x1b7a: 0x000a, 0x1b7b: 0x000a, - 0x1b7c: 0x000a, 0x1b7d: 0x000a, 0x1b7e: 0x000a, 0x1b7f: 0x000a, + 0x1b70: 0x000a, 0x1b71: 0x000a, 0x1b72: 0x000a, 0x1b73: 0x000a, // Block 0x6e, offset 0x1b80 0x1b80: 0x000a, 0x1b81: 0x000a, 0x1b82: 0x000a, 0x1b83: 0x000a, 0x1b84: 0x000a, 0x1b85: 0x000a, 0x1b86: 0x000a, 0x1b87: 0x000a, 0x1b88: 0x000a, 0x1b89: 0x000a, 0x1b8a: 0x000a, 0x1b8b: 0x000a, 0x1b8c: 0x000a, 0x1b8d: 0x000a, 0x1b8e: 0x000a, 0x1b8f: 0x000a, 0x1b90: 0x000a, 0x1b91: 0x000a, - 0x1b92: 0x000a, 0x1b93: 0x000a, 0x1b94: 0x000a, 0x1b95: 0x000a, 0x1b96: 0x000a, 0x1b97: 0x000a, - 0x1b98: 0x000a, 0x1b99: 0x000a, 0x1b9a: 0x000a, 0x1b9b: 0x000a, 0x1b9c: 0x000a, 0x1b9d: 0x000a, - 0x1b9e: 0x000a, 0x1b9f: 0x000a, 0x1ba0: 0x000a, 0x1ba1: 0x000a, 0x1ba2: 0x000a, 0x1ba3: 0x000a, - 0x1ba4: 0x000a, 0x1ba5: 0x000a, 0x1ba6: 0x000a, 0x1ba7: 0x000a, 0x1ba8: 0x000a, 0x1ba9: 0x000a, - 0x1baa: 0x000a, 0x1bab: 0x000a, 0x1bac: 0x000a, 0x1bad: 0x000a, 0x1bae: 0x000a, 0x1baf: 0x000a, - 0x1bb0: 0x000a, 0x1bb1: 0x000a, 0x1bb2: 0x000a, 0x1bb3: 0x000a, + 0x1b92: 0x000a, 0x1b93: 0x000a, 0x1b94: 0x000a, 0x1b95: 0x000a, + 0x1bb0: 0x000a, 0x1bb1: 0x000a, 0x1bb2: 0x000a, 0x1bb3: 0x000a, 0x1bb4: 0x000a, 0x1bb5: 0x000a, + 0x1bb6: 0x000a, 0x1bb7: 0x000a, 0x1bb8: 0x000a, 0x1bb9: 0x000a, 0x1bba: 0x000a, 0x1bbb: 0x000a, // Block 0x6f, offset 0x1bc0 - 0x1bc0: 0x000a, 0x1bc1: 0x000a, 0x1bc2: 0x000a, 0x1bc3: 0x000a, 0x1bc4: 0x000a, 0x1bc5: 0x000a, - 0x1bc6: 0x000a, 0x1bc7: 0x000a, 0x1bc8: 0x000a, 0x1bc9: 0x000a, 0x1bca: 0x000a, 0x1bcb: 0x000a, - 0x1bcc: 0x000a, 0x1bcd: 0x000a, 0x1bce: 0x000a, 0x1bcf: 0x000a, 0x1bd0: 0x000a, 0x1bd1: 0x000a, - 0x1bd2: 0x000a, 0x1bd3: 0x000a, 0x1bd4: 0x000a, 0x1bd5: 0x000a, - 0x1bf0: 0x000a, 0x1bf1: 0x000a, 0x1bf2: 0x000a, 0x1bf3: 0x000a, 0x1bf4: 0x000a, 0x1bf5: 0x000a, - 0x1bf6: 0x000a, 0x1bf7: 0x000a, 0x1bf8: 0x000a, 0x1bf9: 0x000a, 0x1bfa: 0x000a, 0x1bfb: 0x000a, + 0x1bc0: 0x0009, 0x1bc1: 0x000a, 0x1bc2: 0x000a, 0x1bc3: 0x000a, 0x1bc4: 0x000a, + 0x1bc8: 0x003a, 0x1bc9: 0x002a, 0x1bca: 0x003a, 0x1bcb: 0x002a, + 0x1bcc: 0x003a, 0x1bcd: 0x002a, 0x1bce: 0x003a, 0x1bcf: 0x002a, 0x1bd0: 0x003a, 0x1bd1: 0x002a, + 0x1bd2: 0x000a, 0x1bd3: 0x000a, 0x1bd4: 0x003a, 0x1bd5: 0x002a, 0x1bd6: 0x003a, 0x1bd7: 0x002a, + 0x1bd8: 0x003a, 0x1bd9: 0x002a, 0x1bda: 0x003a, 0x1bdb: 0x002a, 0x1bdc: 0x000a, 0x1bdd: 0x000a, + 0x1bde: 0x000a, 0x1bdf: 0x000a, 0x1be0: 0x000a, + 0x1bea: 0x000c, 0x1beb: 0x000c, 0x1bec: 0x000c, 0x1bed: 0x000c, + 0x1bf0: 0x000a, + 0x1bf6: 0x000a, 0x1bf7: 0x000a, + 0x1bfd: 0x000a, 0x1bfe: 0x000a, 0x1bff: 0x000a, // Block 0x70, offset 0x1c00 - 0x1c00: 0x0009, 0x1c01: 0x000a, 0x1c02: 0x000a, 0x1c03: 0x000a, 0x1c04: 0x000a, - 0x1c08: 0x003a, 0x1c09: 0x002a, 0x1c0a: 0x003a, 0x1c0b: 0x002a, - 0x1c0c: 0x003a, 0x1c0d: 0x002a, 0x1c0e: 0x003a, 0x1c0f: 0x002a, 0x1c10: 0x003a, 0x1c11: 0x002a, - 0x1c12: 0x000a, 0x1c13: 0x000a, 0x1c14: 0x003a, 0x1c15: 0x002a, 0x1c16: 0x003a, 0x1c17: 0x002a, - 0x1c18: 0x003a, 0x1c19: 0x002a, 0x1c1a: 0x003a, 0x1c1b: 0x002a, 0x1c1c: 0x000a, 0x1c1d: 0x000a, - 0x1c1e: 0x000a, 0x1c1f: 0x000a, 0x1c20: 0x000a, - 0x1c2a: 0x000c, 0x1c2b: 0x000c, 0x1c2c: 0x000c, 0x1c2d: 0x000c, - 0x1c30: 0x000a, - 0x1c36: 0x000a, 0x1c37: 0x000a, - 0x1c3d: 0x000a, 0x1c3e: 0x000a, 0x1c3f: 0x000a, + 0x1c19: 0x000c, 0x1c1a: 0x000c, 0x1c1b: 0x000a, 0x1c1c: 0x000a, + 0x1c20: 0x000a, // Block 0x71, offset 0x1c40 - 0x1c59: 0x000c, 0x1c5a: 0x000c, 0x1c5b: 0x000a, 0x1c5c: 0x000a, - 0x1c60: 0x000a, + 0x1c7b: 0x000a, // Block 0x72, offset 0x1c80 - 0x1cbb: 0x000a, + 0x1c80: 0x000a, 0x1c81: 0x000a, 0x1c82: 0x000a, 0x1c83: 0x000a, 0x1c84: 0x000a, 0x1c85: 0x000a, + 0x1c86: 0x000a, 0x1c87: 0x000a, 0x1c88: 0x000a, 0x1c89: 0x000a, 0x1c8a: 0x000a, 0x1c8b: 0x000a, + 0x1c8c: 0x000a, 0x1c8d: 0x000a, 0x1c8e: 0x000a, 0x1c8f: 0x000a, 0x1c90: 0x000a, 0x1c91: 0x000a, + 0x1c92: 0x000a, 0x1c93: 0x000a, 0x1c94: 0x000a, 0x1c95: 0x000a, 0x1c96: 0x000a, 0x1c97: 0x000a, + 0x1c98: 0x000a, 0x1c99: 0x000a, 0x1c9a: 0x000a, 0x1c9b: 0x000a, 0x1c9c: 0x000a, 0x1c9d: 0x000a, + 0x1c9e: 0x000a, 0x1c9f: 0x000a, 0x1ca0: 0x000a, 0x1ca1: 0x000a, 0x1ca2: 0x000a, 0x1ca3: 0x000a, // Block 0x73, offset 0x1cc0 - 0x1cc0: 0x000a, 0x1cc1: 0x000a, 0x1cc2: 0x000a, 0x1cc3: 0x000a, 0x1cc4: 0x000a, 0x1cc5: 0x000a, - 0x1cc6: 0x000a, 0x1cc7: 0x000a, 0x1cc8: 0x000a, 0x1cc9: 0x000a, 0x1cca: 0x000a, 0x1ccb: 0x000a, - 0x1ccc: 0x000a, 0x1ccd: 0x000a, 0x1cce: 0x000a, 0x1ccf: 0x000a, 0x1cd0: 0x000a, 0x1cd1: 0x000a, - 0x1cd2: 0x000a, 0x1cd3: 0x000a, 0x1cd4: 0x000a, 0x1cd5: 0x000a, 0x1cd6: 0x000a, 0x1cd7: 0x000a, - 0x1cd8: 0x000a, 0x1cd9: 0x000a, 0x1cda: 0x000a, 0x1cdb: 0x000a, 0x1cdc: 0x000a, 0x1cdd: 0x000a, - 0x1cde: 0x000a, 0x1cdf: 0x000a, 0x1ce0: 0x000a, 0x1ce1: 0x000a, 0x1ce2: 0x000a, 0x1ce3: 0x000a, + 0x1cdd: 0x000a, + 0x1cde: 0x000a, // Block 0x74, offset 0x1d00 - 0x1d1d: 0x000a, - 0x1d1e: 0x000a, + 0x1d10: 0x000a, 0x1d11: 0x000a, + 0x1d12: 0x000a, 0x1d13: 0x000a, 0x1d14: 0x000a, 0x1d15: 0x000a, 0x1d16: 0x000a, 0x1d17: 0x000a, + 0x1d18: 0x000a, 0x1d19: 0x000a, 0x1d1a: 0x000a, 0x1d1b: 0x000a, 0x1d1c: 0x000a, 0x1d1d: 0x000a, + 0x1d1e: 0x000a, 0x1d1f: 0x000a, + 0x1d3c: 0x000a, 0x1d3d: 0x000a, 0x1d3e: 0x000a, // Block 0x75, offset 0x1d40 - 0x1d50: 0x000a, 0x1d51: 0x000a, - 0x1d52: 0x000a, 0x1d53: 0x000a, 0x1d54: 0x000a, 0x1d55: 0x000a, 0x1d56: 0x000a, 0x1d57: 0x000a, - 0x1d58: 0x000a, 0x1d59: 0x000a, 0x1d5a: 0x000a, 0x1d5b: 0x000a, 0x1d5c: 0x000a, 0x1d5d: 0x000a, - 0x1d5e: 0x000a, 0x1d5f: 0x000a, - 0x1d7c: 0x000a, 0x1d7d: 0x000a, 0x1d7e: 0x000a, + 0x1d71: 0x000a, 0x1d72: 0x000a, 0x1d73: 0x000a, 0x1d74: 0x000a, 0x1d75: 0x000a, + 0x1d76: 0x000a, 0x1d77: 0x000a, 0x1d78: 0x000a, 0x1d79: 0x000a, 0x1d7a: 0x000a, 0x1d7b: 0x000a, + 0x1d7c: 0x000a, 0x1d7d: 0x000a, 0x1d7e: 0x000a, 0x1d7f: 0x000a, // Block 0x76, offset 0x1d80 - 0x1db1: 0x000a, 0x1db2: 0x000a, 0x1db3: 0x000a, 0x1db4: 0x000a, 0x1db5: 0x000a, - 0x1db6: 0x000a, 0x1db7: 0x000a, 0x1db8: 0x000a, 0x1db9: 0x000a, 0x1dba: 0x000a, 0x1dbb: 0x000a, - 0x1dbc: 0x000a, 0x1dbd: 0x000a, 0x1dbe: 0x000a, 0x1dbf: 0x000a, + 0x1d8c: 0x000a, 0x1d8d: 0x000a, 0x1d8e: 0x000a, 0x1d8f: 0x000a, // Block 0x77, offset 0x1dc0 - 0x1dcc: 0x000a, 0x1dcd: 0x000a, 0x1dce: 0x000a, 0x1dcf: 0x000a, + 0x1df7: 0x000a, 0x1df8: 0x000a, 0x1df9: 0x000a, 0x1dfa: 0x000a, // Block 0x78, offset 0x1e00 - 0x1e37: 0x000a, 0x1e38: 0x000a, 0x1e39: 0x000a, 0x1e3a: 0x000a, + 0x1e1e: 0x000a, 0x1e1f: 0x000a, + 0x1e3f: 0x000a, // Block 0x79, offset 0x1e40 - 0x1e5e: 0x000a, 0x1e5f: 0x000a, - 0x1e7f: 0x000a, + 0x1e50: 0x000a, 0x1e51: 0x000a, + 0x1e52: 0x000a, 0x1e53: 0x000a, 0x1e54: 0x000a, 0x1e55: 0x000a, 0x1e56: 0x000a, 0x1e57: 0x000a, + 0x1e58: 0x000a, 0x1e59: 0x000a, 0x1e5a: 0x000a, 0x1e5b: 0x000a, 0x1e5c: 0x000a, 0x1e5d: 0x000a, + 0x1e5e: 0x000a, 0x1e5f: 0x000a, 0x1e60: 0x000a, 0x1e61: 0x000a, 0x1e62: 0x000a, 0x1e63: 0x000a, + 0x1e64: 0x000a, 0x1e65: 0x000a, 0x1e66: 0x000a, 0x1e67: 0x000a, 0x1e68: 0x000a, 0x1e69: 0x000a, + 0x1e6a: 0x000a, 0x1e6b: 0x000a, 0x1e6c: 0x000a, 0x1e6d: 0x000a, 0x1e6e: 0x000a, 0x1e6f: 0x000a, + 0x1e70: 0x000a, 0x1e71: 0x000a, 0x1e72: 0x000a, 0x1e73: 0x000a, 0x1e74: 0x000a, 0x1e75: 0x000a, + 0x1e76: 0x000a, 0x1e77: 0x000a, 0x1e78: 0x000a, 0x1e79: 0x000a, 0x1e7a: 0x000a, 0x1e7b: 0x000a, + 0x1e7c: 0x000a, 0x1e7d: 0x000a, 0x1e7e: 0x000a, 0x1e7f: 0x000a, // Block 0x7a, offset 0x1e80 - 0x1e90: 0x000a, 0x1e91: 0x000a, - 0x1e92: 0x000a, 0x1e93: 0x000a, 0x1e94: 0x000a, 0x1e95: 0x000a, 0x1e96: 0x000a, 0x1e97: 0x000a, - 0x1e98: 0x000a, 0x1e99: 0x000a, 0x1e9a: 0x000a, 0x1e9b: 0x000a, 0x1e9c: 0x000a, 0x1e9d: 0x000a, - 0x1e9e: 0x000a, 0x1e9f: 0x000a, 0x1ea0: 0x000a, 0x1ea1: 0x000a, 0x1ea2: 0x000a, 0x1ea3: 0x000a, - 0x1ea4: 0x000a, 0x1ea5: 0x000a, 0x1ea6: 0x000a, 0x1ea7: 0x000a, 0x1ea8: 0x000a, 0x1ea9: 0x000a, - 0x1eaa: 0x000a, 0x1eab: 0x000a, 0x1eac: 0x000a, 0x1ead: 0x000a, 0x1eae: 0x000a, 0x1eaf: 0x000a, - 0x1eb0: 0x000a, 0x1eb1: 0x000a, 0x1eb2: 0x000a, 0x1eb3: 0x000a, 0x1eb4: 0x000a, 0x1eb5: 0x000a, - 0x1eb6: 0x000a, 0x1eb7: 0x000a, 0x1eb8: 0x000a, 0x1eb9: 0x000a, 0x1eba: 0x000a, 0x1ebb: 0x000a, - 0x1ebc: 0x000a, 0x1ebd: 0x000a, 0x1ebe: 0x000a, 0x1ebf: 0x000a, + 0x1e80: 0x000a, 0x1e81: 0x000a, 0x1e82: 0x000a, 0x1e83: 0x000a, 0x1e84: 0x000a, 0x1e85: 0x000a, + 0x1e86: 0x000a, // Block 0x7b, offset 0x1ec0 - 0x1ec0: 0x000a, 0x1ec1: 0x000a, 0x1ec2: 0x000a, 0x1ec3: 0x000a, 0x1ec4: 0x000a, 0x1ec5: 0x000a, - 0x1ec6: 0x000a, + 0x1ecd: 0x000a, 0x1ece: 0x000a, 0x1ecf: 0x000a, // Block 0x7c, offset 0x1f00 - 0x1f0d: 0x000a, 0x1f0e: 0x000a, 0x1f0f: 0x000a, + 0x1f2f: 0x000c, + 0x1f30: 0x000c, 0x1f31: 0x000c, 0x1f32: 0x000c, 0x1f33: 0x000a, 0x1f34: 0x000c, 0x1f35: 0x000c, + 0x1f36: 0x000c, 0x1f37: 0x000c, 0x1f38: 0x000c, 0x1f39: 0x000c, 0x1f3a: 0x000c, 0x1f3b: 0x000c, + 0x1f3c: 0x000c, 0x1f3d: 0x000c, 0x1f3e: 0x000a, 0x1f3f: 0x000a, // Block 0x7d, offset 0x1f40 - 0x1f6f: 0x000c, - 0x1f70: 0x000c, 0x1f71: 0x000c, 0x1f72: 0x000c, 0x1f73: 0x000a, 0x1f74: 0x000c, 0x1f75: 0x000c, - 0x1f76: 0x000c, 0x1f77: 0x000c, 0x1f78: 0x000c, 0x1f79: 0x000c, 0x1f7a: 0x000c, 0x1f7b: 0x000c, - 0x1f7c: 0x000c, 0x1f7d: 0x000c, 0x1f7e: 0x000a, 0x1f7f: 0x000a, + 0x1f5e: 0x000c, 0x1f5f: 0x000c, // Block 0x7e, offset 0x1f80 - 0x1f9e: 0x000c, 0x1f9f: 0x000c, + 0x1fb0: 0x000c, 0x1fb1: 0x000c, // Block 0x7f, offset 0x1fc0 - 0x1ff0: 0x000c, 0x1ff1: 0x000c, + 0x1fc0: 0x000a, 0x1fc1: 0x000a, 0x1fc2: 0x000a, 0x1fc3: 0x000a, 0x1fc4: 0x000a, 0x1fc5: 0x000a, + 0x1fc6: 0x000a, 0x1fc7: 0x000a, 0x1fc8: 0x000a, 0x1fc9: 0x000a, 0x1fca: 0x000a, 0x1fcb: 0x000a, + 0x1fcc: 0x000a, 0x1fcd: 0x000a, 0x1fce: 0x000a, 0x1fcf: 0x000a, 0x1fd0: 0x000a, 0x1fd1: 0x000a, + 0x1fd2: 0x000a, 0x1fd3: 0x000a, 0x1fd4: 0x000a, 0x1fd5: 0x000a, 0x1fd6: 0x000a, 0x1fd7: 0x000a, + 0x1fd8: 0x000a, 0x1fd9: 0x000a, 0x1fda: 0x000a, 0x1fdb: 0x000a, 0x1fdc: 0x000a, 0x1fdd: 0x000a, + 0x1fde: 0x000a, 0x1fdf: 0x000a, 0x1fe0: 0x000a, 0x1fe1: 0x000a, // Block 0x80, offset 0x2000 - 0x2000: 0x000a, 0x2001: 0x000a, 0x2002: 0x000a, 0x2003: 0x000a, 0x2004: 0x000a, 0x2005: 0x000a, - 0x2006: 0x000a, 0x2007: 0x000a, 0x2008: 0x000a, 0x2009: 0x000a, 0x200a: 0x000a, 0x200b: 0x000a, - 0x200c: 0x000a, 0x200d: 0x000a, 0x200e: 0x000a, 0x200f: 0x000a, 0x2010: 0x000a, 0x2011: 0x000a, - 0x2012: 0x000a, 0x2013: 0x000a, 0x2014: 0x000a, 0x2015: 0x000a, 0x2016: 0x000a, 0x2017: 0x000a, - 0x2018: 0x000a, 0x2019: 0x000a, 0x201a: 0x000a, 0x201b: 0x000a, 0x201c: 0x000a, 0x201d: 0x000a, - 0x201e: 0x000a, 0x201f: 0x000a, 0x2020: 0x000a, 0x2021: 0x000a, + 0x2008: 0x000a, // Block 0x81, offset 0x2040 - 0x2048: 0x000a, + 0x2042: 0x000c, + 0x2046: 0x000c, 0x204b: 0x000c, + 0x2065: 0x000c, 0x2066: 0x000c, 0x2068: 0x000a, 0x2069: 0x000a, + 0x206a: 0x000a, 0x206b: 0x000a, + 0x2078: 0x0004, 0x2079: 0x0004, // Block 0x82, offset 0x2080 - 0x2082: 0x000c, - 0x2086: 0x000c, 0x208b: 0x000c, - 0x20a5: 0x000c, 0x20a6: 0x000c, 0x20a8: 0x000a, 0x20a9: 0x000a, - 0x20aa: 0x000a, 0x20ab: 0x000a, - 0x20b8: 0x0004, 0x20b9: 0x0004, + 0x20b4: 0x000a, 0x20b5: 0x000a, + 0x20b6: 0x000a, 0x20b7: 0x000a, // Block 0x83, offset 0x20c0 - 0x20f4: 0x000a, 0x20f5: 0x000a, - 0x20f6: 0x000a, 0x20f7: 0x000a, + 0x20c4: 0x000c, 0x20c5: 0x000c, + 0x20e0: 0x000c, 0x20e1: 0x000c, 0x20e2: 0x000c, 0x20e3: 0x000c, + 0x20e4: 0x000c, 0x20e5: 0x000c, 0x20e6: 0x000c, 0x20e7: 0x000c, 0x20e8: 0x000c, 0x20e9: 0x000c, + 0x20ea: 0x000c, 0x20eb: 0x000c, 0x20ec: 0x000c, 0x20ed: 0x000c, 0x20ee: 0x000c, 0x20ef: 0x000c, + 0x20f0: 0x000c, 0x20f1: 0x000c, // Block 0x84, offset 0x2100 - 0x2104: 0x000c, 0x2105: 0x000c, - 0x2120: 0x000c, 0x2121: 0x000c, 0x2122: 0x000c, 0x2123: 0x000c, - 0x2124: 0x000c, 0x2125: 0x000c, 0x2126: 0x000c, 0x2127: 0x000c, 0x2128: 0x000c, 0x2129: 0x000c, - 0x212a: 0x000c, 0x212b: 0x000c, 0x212c: 0x000c, 0x212d: 0x000c, 0x212e: 0x000c, 0x212f: 0x000c, - 0x2130: 0x000c, 0x2131: 0x000c, + 0x2126: 0x000c, 0x2127: 0x000c, 0x2128: 0x000c, 0x2129: 0x000c, + 0x212a: 0x000c, 0x212b: 0x000c, 0x212c: 0x000c, 0x212d: 0x000c, // Block 0x85, offset 0x2140 - 0x2166: 0x000c, 0x2167: 0x000c, 0x2168: 0x000c, 0x2169: 0x000c, - 0x216a: 0x000c, 0x216b: 0x000c, 0x216c: 0x000c, 0x216d: 0x000c, + 0x2147: 0x000c, 0x2148: 0x000c, 0x2149: 0x000c, 0x214a: 0x000c, 0x214b: 0x000c, + 0x214c: 0x000c, 0x214d: 0x000c, 0x214e: 0x000c, 0x214f: 0x000c, 0x2150: 0x000c, 0x2151: 0x000c, // Block 0x86, offset 0x2180 - 0x2187: 0x000c, 0x2188: 0x000c, 0x2189: 0x000c, 0x218a: 0x000c, 0x218b: 0x000c, - 0x218c: 0x000c, 0x218d: 0x000c, 0x218e: 0x000c, 0x218f: 0x000c, 0x2190: 0x000c, 0x2191: 0x000c, + 0x2180: 0x000c, 0x2181: 0x000c, 0x2182: 0x000c, + 0x21b3: 0x000c, + 0x21b6: 0x000c, 0x21b7: 0x000c, 0x21b8: 0x000c, 0x21b9: 0x000c, + 0x21bc: 0x000c, // Block 0x87, offset 0x21c0 - 0x21c0: 0x000c, 0x21c1: 0x000c, 0x21c2: 0x000c, - 0x21f3: 0x000c, - 0x21f6: 0x000c, 0x21f7: 0x000c, 0x21f8: 0x000c, 0x21f9: 0x000c, - 0x21fc: 0x000c, + 0x21e5: 0x000c, // Block 0x88, offset 0x2200 - 0x2225: 0x000c, + 0x2229: 0x000c, + 0x222a: 0x000c, 0x222b: 0x000c, 0x222c: 0x000c, 0x222d: 0x000c, 0x222e: 0x000c, + 0x2231: 0x000c, 0x2232: 0x000c, 0x2235: 0x000c, + 0x2236: 0x000c, // Block 0x89, offset 0x2240 - 0x2269: 0x000c, - 0x226a: 0x000c, 0x226b: 0x000c, 0x226c: 0x000c, 0x226d: 0x000c, 0x226e: 0x000c, - 0x2271: 0x000c, 0x2272: 0x000c, 0x2275: 0x000c, - 0x2276: 0x000c, + 0x2243: 0x000c, + 0x224c: 0x000c, + 0x227c: 0x000c, // Block 0x8a, offset 0x2280 - 0x2283: 0x000c, - 0x228c: 0x000c, - 0x22bc: 0x000c, + 0x22b0: 0x000c, 0x22b2: 0x000c, 0x22b3: 0x000c, 0x22b4: 0x000c, + 0x22b7: 0x000c, 0x22b8: 0x000c, + 0x22be: 0x000c, 0x22bf: 0x000c, // Block 0x8b, offset 0x22c0 - 0x22f0: 0x000c, 0x22f2: 0x000c, 0x22f3: 0x000c, 0x22f4: 0x000c, - 0x22f7: 0x000c, 0x22f8: 0x000c, - 0x22fe: 0x000c, 0x22ff: 0x000c, + 0x22c1: 0x000c, + 0x22ec: 0x000c, 0x22ed: 0x000c, + 0x22f6: 0x000c, // Block 0x8c, offset 0x2300 - 0x2301: 0x000c, - 0x232c: 0x000c, 0x232d: 0x000c, - 0x2336: 0x000c, + 0x2325: 0x000c, 0x2328: 0x000c, + 0x232d: 0x000c, // Block 0x8d, offset 0x2340 - 0x2365: 0x000c, 0x2368: 0x000c, - 0x236d: 0x000c, + 0x235d: 0x0001, + 0x235e: 0x000c, 0x235f: 0x0001, 0x2360: 0x0001, 0x2361: 0x0001, 0x2362: 0x0001, 0x2363: 0x0001, + 0x2364: 0x0001, 0x2365: 0x0001, 0x2366: 0x0001, 0x2367: 0x0001, 0x2368: 0x0001, 0x2369: 0x0003, + 0x236a: 0x0001, 0x236b: 0x0001, 0x236c: 0x0001, 0x236d: 0x0001, 0x236e: 0x0001, 0x236f: 0x0001, + 0x2370: 0x0001, 0x2371: 0x0001, 0x2372: 0x0001, 0x2373: 0x0001, 0x2374: 0x0001, 0x2375: 0x0001, + 0x2376: 0x0001, 0x2377: 0x0001, 0x2378: 0x0001, 0x2379: 0x0001, 0x237a: 0x0001, 0x237b: 0x0001, + 0x237c: 0x0001, 0x237d: 0x0001, 0x237e: 0x0001, 0x237f: 0x0001, // Block 0x8e, offset 0x2380 - 0x239d: 0x0001, - 0x239e: 0x000c, 0x239f: 0x0001, 0x23a0: 0x0001, 0x23a1: 0x0001, 0x23a2: 0x0001, 0x23a3: 0x0001, - 0x23a4: 0x0001, 0x23a5: 0x0001, 0x23a6: 0x0001, 0x23a7: 0x0001, 0x23a8: 0x0001, 0x23a9: 0x0003, - 0x23aa: 0x0001, 0x23ab: 0x0001, 0x23ac: 0x0001, 0x23ad: 0x0001, 0x23ae: 0x0001, 0x23af: 0x0001, - 0x23b0: 0x0001, 0x23b1: 0x0001, 0x23b2: 0x0001, 0x23b3: 0x0001, 0x23b4: 0x0001, 0x23b5: 0x0001, - 0x23b6: 0x0001, 0x23b7: 0x0001, 0x23b8: 0x0001, 0x23b9: 0x0001, 0x23ba: 0x0001, 0x23bb: 0x0001, - 0x23bc: 0x0001, 0x23bd: 0x0001, 0x23be: 0x0001, 0x23bf: 0x0001, + 0x2380: 0x0001, 0x2381: 0x0001, 0x2382: 0x0001, 0x2383: 0x0001, 0x2384: 0x0001, 0x2385: 0x0001, + 0x2386: 0x0001, 0x2387: 0x0001, 0x2388: 0x0001, 0x2389: 0x0001, 0x238a: 0x0001, 0x238b: 0x0001, + 0x238c: 0x0001, 0x238d: 0x0001, 0x238e: 0x0001, 0x238f: 0x0001, 0x2390: 0x000d, 0x2391: 0x000d, + 0x2392: 0x000d, 0x2393: 0x000d, 0x2394: 0x000d, 0x2395: 0x000d, 0x2396: 0x000d, 0x2397: 0x000d, + 0x2398: 0x000d, 0x2399: 0x000d, 0x239a: 0x000d, 0x239b: 0x000d, 0x239c: 0x000d, 0x239d: 0x000d, + 0x239e: 0x000d, 0x239f: 0x000d, 0x23a0: 0x000d, 0x23a1: 0x000d, 0x23a2: 0x000d, 0x23a3: 0x000d, + 0x23a4: 0x000d, 0x23a5: 0x000d, 0x23a6: 0x000d, 0x23a7: 0x000d, 0x23a8: 0x000d, 0x23a9: 0x000d, + 0x23aa: 0x000d, 0x23ab: 0x000d, 0x23ac: 0x000d, 0x23ad: 0x000d, 0x23ae: 0x000d, 0x23af: 0x000d, + 0x23b0: 0x000d, 0x23b1: 0x000d, 0x23b2: 0x000d, 0x23b3: 0x000d, 0x23b4: 0x000d, 0x23b5: 0x000d, + 0x23b6: 0x000d, 0x23b7: 0x000d, 0x23b8: 0x000d, 0x23b9: 0x000d, 0x23ba: 0x000d, 0x23bb: 0x000d, + 0x23bc: 0x000d, 0x23bd: 0x000d, 0x23be: 0x000d, 0x23bf: 0x000d, // Block 0x8f, offset 0x23c0 - 0x23c0: 0x0001, 0x23c1: 0x0001, 0x23c2: 0x0001, 0x23c3: 0x0001, 0x23c4: 0x0001, 0x23c5: 0x0001, - 0x23c6: 0x0001, 0x23c7: 0x0001, 0x23c8: 0x0001, 0x23c9: 0x0001, 0x23ca: 0x0001, 0x23cb: 0x0001, - 0x23cc: 0x0001, 0x23cd: 0x0001, 0x23ce: 0x0001, 0x23cf: 0x0001, 0x23d0: 0x000d, 0x23d1: 0x000d, + 0x23c0: 0x000d, 0x23c1: 0x000d, 0x23c2: 0x000d, 0x23c3: 0x000d, 0x23c4: 0x000d, 0x23c5: 0x000d, + 0x23c6: 0x000d, 0x23c7: 0x000d, 0x23c8: 0x000d, 0x23c9: 0x000d, 0x23ca: 0x000d, 0x23cb: 0x000d, + 0x23cc: 0x000d, 0x23cd: 0x000d, 0x23ce: 0x000d, 0x23cf: 0x000d, 0x23d0: 0x000d, 0x23d1: 0x000d, 0x23d2: 0x000d, 0x23d3: 0x000d, 0x23d4: 0x000d, 0x23d5: 0x000d, 0x23d6: 0x000d, 0x23d7: 0x000d, 0x23d8: 0x000d, 0x23d9: 0x000d, 0x23da: 0x000d, 0x23db: 0x000d, 0x23dc: 0x000d, 0x23dd: 0x000d, 0x23de: 0x000d, 0x23df: 0x000d, 0x23e0: 0x000d, 0x23e1: 0x000d, 0x23e2: 0x000d, 0x23e3: 0x000d, @@ -1136,143 +1142,143 @@ var bidiValues = [14208]uint8{ 0x23ea: 0x000d, 0x23eb: 0x000d, 0x23ec: 0x000d, 0x23ed: 0x000d, 0x23ee: 0x000d, 0x23ef: 0x000d, 0x23f0: 0x000d, 0x23f1: 0x000d, 0x23f2: 0x000d, 0x23f3: 0x000d, 0x23f4: 0x000d, 0x23f5: 0x000d, 0x23f6: 0x000d, 0x23f7: 0x000d, 0x23f8: 0x000d, 0x23f9: 0x000d, 0x23fa: 0x000d, 0x23fb: 0x000d, - 0x23fc: 0x000d, 0x23fd: 0x000d, 0x23fe: 0x000d, 0x23ff: 0x000d, + 0x23fc: 0x000d, 0x23fd: 0x000d, 0x23fe: 0x000a, 0x23ff: 0x000a, // Block 0x90, offset 0x2400 0x2400: 0x000d, 0x2401: 0x000d, 0x2402: 0x000d, 0x2403: 0x000d, 0x2404: 0x000d, 0x2405: 0x000d, 0x2406: 0x000d, 0x2407: 0x000d, 0x2408: 0x000d, 0x2409: 0x000d, 0x240a: 0x000d, 0x240b: 0x000d, - 0x240c: 0x000d, 0x240d: 0x000d, 0x240e: 0x000d, 0x240f: 0x000d, 0x2410: 0x000d, 0x2411: 0x000d, - 0x2412: 0x000d, 0x2413: 0x000d, 0x2414: 0x000d, 0x2415: 0x000d, 0x2416: 0x000d, 0x2417: 0x000d, - 0x2418: 0x000d, 0x2419: 0x000d, 0x241a: 0x000d, 0x241b: 0x000d, 0x241c: 0x000d, 0x241d: 0x000d, - 0x241e: 0x000d, 0x241f: 0x000d, 0x2420: 0x000d, 0x2421: 0x000d, 0x2422: 0x000d, 0x2423: 0x000d, - 0x2424: 0x000d, 0x2425: 0x000d, 0x2426: 0x000d, 0x2427: 0x000d, 0x2428: 0x000d, 0x2429: 0x000d, - 0x242a: 0x000d, 0x242b: 0x000d, 0x242c: 0x000d, 0x242d: 0x000d, 0x242e: 0x000d, 0x242f: 0x000d, + 0x240c: 0x000d, 0x240d: 0x000d, 0x240e: 0x000d, 0x240f: 0x000d, 0x2410: 0x000b, 0x2411: 0x000b, + 0x2412: 0x000b, 0x2413: 0x000b, 0x2414: 0x000b, 0x2415: 0x000b, 0x2416: 0x000b, 0x2417: 0x000b, + 0x2418: 0x000b, 0x2419: 0x000b, 0x241a: 0x000b, 0x241b: 0x000b, 0x241c: 0x000b, 0x241d: 0x000b, + 0x241e: 0x000b, 0x241f: 0x000b, 0x2420: 0x000b, 0x2421: 0x000b, 0x2422: 0x000b, 0x2423: 0x000b, + 0x2424: 0x000b, 0x2425: 0x000b, 0x2426: 0x000b, 0x2427: 0x000b, 0x2428: 0x000b, 0x2429: 0x000b, + 0x242a: 0x000b, 0x242b: 0x000b, 0x242c: 0x000b, 0x242d: 0x000b, 0x242e: 0x000b, 0x242f: 0x000b, 0x2430: 0x000d, 0x2431: 0x000d, 0x2432: 0x000d, 0x2433: 0x000d, 0x2434: 0x000d, 0x2435: 0x000d, 0x2436: 0x000d, 0x2437: 0x000d, 0x2438: 0x000d, 0x2439: 0x000d, 0x243a: 0x000d, 0x243b: 0x000d, - 0x243c: 0x000d, 0x243d: 0x000d, 0x243e: 0x000a, 0x243f: 0x000a, + 0x243c: 0x000d, 0x243d: 0x000a, 0x243e: 0x000d, 0x243f: 0x000d, // Block 0x91, offset 0x2440 - 0x2440: 0x000d, 0x2441: 0x000d, 0x2442: 0x000d, 0x2443: 0x000d, 0x2444: 0x000d, 0x2445: 0x000d, - 0x2446: 0x000d, 0x2447: 0x000d, 0x2448: 0x000d, 0x2449: 0x000d, 0x244a: 0x000d, 0x244b: 0x000d, - 0x244c: 0x000d, 0x244d: 0x000d, 0x244e: 0x000d, 0x244f: 0x000d, 0x2450: 0x000b, 0x2451: 0x000b, - 0x2452: 0x000b, 0x2453: 0x000b, 0x2454: 0x000b, 0x2455: 0x000b, 0x2456: 0x000b, 0x2457: 0x000b, - 0x2458: 0x000b, 0x2459: 0x000b, 0x245a: 0x000b, 0x245b: 0x000b, 0x245c: 0x000b, 0x245d: 0x000b, - 0x245e: 0x000b, 0x245f: 0x000b, 0x2460: 0x000b, 0x2461: 0x000b, 0x2462: 0x000b, 0x2463: 0x000b, - 0x2464: 0x000b, 0x2465: 0x000b, 0x2466: 0x000b, 0x2467: 0x000b, 0x2468: 0x000b, 0x2469: 0x000b, - 0x246a: 0x000b, 0x246b: 0x000b, 0x246c: 0x000b, 0x246d: 0x000b, 0x246e: 0x000b, 0x246f: 0x000b, - 0x2470: 0x000d, 0x2471: 0x000d, 0x2472: 0x000d, 0x2473: 0x000d, 0x2474: 0x000d, 0x2475: 0x000d, - 0x2476: 0x000d, 0x2477: 0x000d, 0x2478: 0x000d, 0x2479: 0x000d, 0x247a: 0x000d, 0x247b: 0x000d, - 0x247c: 0x000d, 0x247d: 0x000a, 0x247e: 0x000d, 0x247f: 0x000d, + 0x2440: 0x000c, 0x2441: 0x000c, 0x2442: 0x000c, 0x2443: 0x000c, 0x2444: 0x000c, 0x2445: 0x000c, + 0x2446: 0x000c, 0x2447: 0x000c, 0x2448: 0x000c, 0x2449: 0x000c, 0x244a: 0x000c, 0x244b: 0x000c, + 0x244c: 0x000c, 0x244d: 0x000c, 0x244e: 0x000c, 0x244f: 0x000c, 0x2450: 0x000a, 0x2451: 0x000a, + 0x2452: 0x000a, 0x2453: 0x000a, 0x2454: 0x000a, 0x2455: 0x000a, 0x2456: 0x000a, 0x2457: 0x000a, + 0x2458: 0x000a, 0x2459: 0x000a, + 0x2460: 0x000c, 0x2461: 0x000c, 0x2462: 0x000c, 0x2463: 0x000c, + 0x2464: 0x000c, 0x2465: 0x000c, 0x2466: 0x000c, 0x2467: 0x000c, 0x2468: 0x000c, 0x2469: 0x000c, + 0x246a: 0x000c, 0x246b: 0x000c, 0x246c: 0x000c, 0x246d: 0x000c, 0x246e: 0x000c, 0x246f: 0x000c, + 0x2470: 0x000a, 0x2471: 0x000a, 0x2472: 0x000a, 0x2473: 0x000a, 0x2474: 0x000a, 0x2475: 0x000a, + 0x2476: 0x000a, 0x2477: 0x000a, 0x2478: 0x000a, 0x2479: 0x000a, 0x247a: 0x000a, 0x247b: 0x000a, + 0x247c: 0x000a, 0x247d: 0x000a, 0x247e: 0x000a, 0x247f: 0x000a, // Block 0x92, offset 0x2480 - 0x2480: 0x000c, 0x2481: 0x000c, 0x2482: 0x000c, 0x2483: 0x000c, 0x2484: 0x000c, 0x2485: 0x000c, - 0x2486: 0x000c, 0x2487: 0x000c, 0x2488: 0x000c, 0x2489: 0x000c, 0x248a: 0x000c, 0x248b: 0x000c, - 0x248c: 0x000c, 0x248d: 0x000c, 0x248e: 0x000c, 0x248f: 0x000c, 0x2490: 0x000a, 0x2491: 0x000a, - 0x2492: 0x000a, 0x2493: 0x000a, 0x2494: 0x000a, 0x2495: 0x000a, 0x2496: 0x000a, 0x2497: 0x000a, - 0x2498: 0x000a, 0x2499: 0x000a, - 0x24a0: 0x000c, 0x24a1: 0x000c, 0x24a2: 0x000c, 0x24a3: 0x000c, - 0x24a4: 0x000c, 0x24a5: 0x000c, 0x24a6: 0x000c, 0x24a7: 0x000c, 0x24a8: 0x000c, 0x24a9: 0x000c, - 0x24aa: 0x000c, 0x24ab: 0x000c, 0x24ac: 0x000c, 0x24ad: 0x000c, 0x24ae: 0x000c, 0x24af: 0x000c, - 0x24b0: 0x000a, 0x24b1: 0x000a, 0x24b2: 0x000a, 0x24b3: 0x000a, 0x24b4: 0x000a, 0x24b5: 0x000a, - 0x24b6: 0x000a, 0x24b7: 0x000a, 0x24b8: 0x000a, 0x24b9: 0x000a, 0x24ba: 0x000a, 0x24bb: 0x000a, - 0x24bc: 0x000a, 0x24bd: 0x000a, 0x24be: 0x000a, 0x24bf: 0x000a, + 0x2480: 0x000a, 0x2481: 0x000a, 0x2482: 0x000a, 0x2483: 0x000a, 0x2484: 0x000a, 0x2485: 0x000a, + 0x2486: 0x000a, 0x2487: 0x000a, 0x2488: 0x000a, 0x2489: 0x000a, 0x248a: 0x000a, 0x248b: 0x000a, + 0x248c: 0x000a, 0x248d: 0x000a, 0x248e: 0x000a, 0x248f: 0x000a, 0x2490: 0x0006, 0x2491: 0x000a, + 0x2492: 0x0006, 0x2494: 0x000a, 0x2495: 0x0006, 0x2496: 0x000a, 0x2497: 0x000a, + 0x2498: 0x000a, 0x2499: 0x009a, 0x249a: 0x008a, 0x249b: 0x007a, 0x249c: 0x006a, 0x249d: 0x009a, + 0x249e: 0x008a, 0x249f: 0x0004, 0x24a0: 0x000a, 0x24a1: 0x000a, 0x24a2: 0x0003, 0x24a3: 0x0003, + 0x24a4: 0x000a, 0x24a5: 0x000a, 0x24a6: 0x000a, 0x24a8: 0x000a, 0x24a9: 0x0004, + 0x24aa: 0x0004, 0x24ab: 0x000a, + 0x24b0: 0x000d, 0x24b1: 0x000d, 0x24b2: 0x000d, 0x24b3: 0x000d, 0x24b4: 0x000d, 0x24b5: 0x000d, + 0x24b6: 0x000d, 0x24b7: 0x000d, 0x24b8: 0x000d, 0x24b9: 0x000d, 0x24ba: 0x000d, 0x24bb: 0x000d, + 0x24bc: 0x000d, 0x24bd: 0x000d, 0x24be: 0x000d, 0x24bf: 0x000d, // Block 0x93, offset 0x24c0 - 0x24c0: 0x000a, 0x24c1: 0x000a, 0x24c2: 0x000a, 0x24c3: 0x000a, 0x24c4: 0x000a, 0x24c5: 0x000a, - 0x24c6: 0x000a, 0x24c7: 0x000a, 0x24c8: 0x000a, 0x24c9: 0x000a, 0x24ca: 0x000a, 0x24cb: 0x000a, - 0x24cc: 0x000a, 0x24cd: 0x000a, 0x24ce: 0x000a, 0x24cf: 0x000a, 0x24d0: 0x0006, 0x24d1: 0x000a, - 0x24d2: 0x0006, 0x24d4: 0x000a, 0x24d5: 0x0006, 0x24d6: 0x000a, 0x24d7: 0x000a, - 0x24d8: 0x000a, 0x24d9: 0x009a, 0x24da: 0x008a, 0x24db: 0x007a, 0x24dc: 0x006a, 0x24dd: 0x009a, - 0x24de: 0x008a, 0x24df: 0x0004, 0x24e0: 0x000a, 0x24e1: 0x000a, 0x24e2: 0x0003, 0x24e3: 0x0003, - 0x24e4: 0x000a, 0x24e5: 0x000a, 0x24e6: 0x000a, 0x24e8: 0x000a, 0x24e9: 0x0004, - 0x24ea: 0x0004, 0x24eb: 0x000a, + 0x24c0: 0x000d, 0x24c1: 0x000d, 0x24c2: 0x000d, 0x24c3: 0x000d, 0x24c4: 0x000d, 0x24c5: 0x000d, + 0x24c6: 0x000d, 0x24c7: 0x000d, 0x24c8: 0x000d, 0x24c9: 0x000d, 0x24ca: 0x000d, 0x24cb: 0x000d, + 0x24cc: 0x000d, 0x24cd: 0x000d, 0x24ce: 0x000d, 0x24cf: 0x000d, 0x24d0: 0x000d, 0x24d1: 0x000d, + 0x24d2: 0x000d, 0x24d3: 0x000d, 0x24d4: 0x000d, 0x24d5: 0x000d, 0x24d6: 0x000d, 0x24d7: 0x000d, + 0x24d8: 0x000d, 0x24d9: 0x000d, 0x24da: 0x000d, 0x24db: 0x000d, 0x24dc: 0x000d, 0x24dd: 0x000d, + 0x24de: 0x000d, 0x24df: 0x000d, 0x24e0: 0x000d, 0x24e1: 0x000d, 0x24e2: 0x000d, 0x24e3: 0x000d, + 0x24e4: 0x000d, 0x24e5: 0x000d, 0x24e6: 0x000d, 0x24e7: 0x000d, 0x24e8: 0x000d, 0x24e9: 0x000d, + 0x24ea: 0x000d, 0x24eb: 0x000d, 0x24ec: 0x000d, 0x24ed: 0x000d, 0x24ee: 0x000d, 0x24ef: 0x000d, 0x24f0: 0x000d, 0x24f1: 0x000d, 0x24f2: 0x000d, 0x24f3: 0x000d, 0x24f4: 0x000d, 0x24f5: 0x000d, 0x24f6: 0x000d, 0x24f7: 0x000d, 0x24f8: 0x000d, 0x24f9: 0x000d, 0x24fa: 0x000d, 0x24fb: 0x000d, - 0x24fc: 0x000d, 0x24fd: 0x000d, 0x24fe: 0x000d, 0x24ff: 0x000d, + 0x24fc: 0x000d, 0x24fd: 0x000d, 0x24fe: 0x000d, 0x24ff: 0x000b, // Block 0x94, offset 0x2500 - 0x2500: 0x000d, 0x2501: 0x000d, 0x2502: 0x000d, 0x2503: 0x000d, 0x2504: 0x000d, 0x2505: 0x000d, - 0x2506: 0x000d, 0x2507: 0x000d, 0x2508: 0x000d, 0x2509: 0x000d, 0x250a: 0x000d, 0x250b: 0x000d, - 0x250c: 0x000d, 0x250d: 0x000d, 0x250e: 0x000d, 0x250f: 0x000d, 0x2510: 0x000d, 0x2511: 0x000d, - 0x2512: 0x000d, 0x2513: 0x000d, 0x2514: 0x000d, 0x2515: 0x000d, 0x2516: 0x000d, 0x2517: 0x000d, - 0x2518: 0x000d, 0x2519: 0x000d, 0x251a: 0x000d, 0x251b: 0x000d, 0x251c: 0x000d, 0x251d: 0x000d, - 0x251e: 0x000d, 0x251f: 0x000d, 0x2520: 0x000d, 0x2521: 0x000d, 0x2522: 0x000d, 0x2523: 0x000d, - 0x2524: 0x000d, 0x2525: 0x000d, 0x2526: 0x000d, 0x2527: 0x000d, 0x2528: 0x000d, 0x2529: 0x000d, - 0x252a: 0x000d, 0x252b: 0x000d, 0x252c: 0x000d, 0x252d: 0x000d, 0x252e: 0x000d, 0x252f: 0x000d, - 0x2530: 0x000d, 0x2531: 0x000d, 0x2532: 0x000d, 0x2533: 0x000d, 0x2534: 0x000d, 0x2535: 0x000d, - 0x2536: 0x000d, 0x2537: 0x000d, 0x2538: 0x000d, 0x2539: 0x000d, 0x253a: 0x000d, 0x253b: 0x000d, - 0x253c: 0x000d, 0x253d: 0x000d, 0x253e: 0x000d, 0x253f: 0x000b, + 0x2501: 0x000a, 0x2502: 0x000a, 0x2503: 0x0004, 0x2504: 0x0004, 0x2505: 0x0004, + 0x2506: 0x000a, 0x2507: 0x000a, 0x2508: 0x003a, 0x2509: 0x002a, 0x250a: 0x000a, 0x250b: 0x0003, + 0x250c: 0x0006, 0x250d: 0x0003, 0x250e: 0x0006, 0x250f: 0x0006, 0x2510: 0x0002, 0x2511: 0x0002, + 0x2512: 0x0002, 0x2513: 0x0002, 0x2514: 0x0002, 0x2515: 0x0002, 0x2516: 0x0002, 0x2517: 0x0002, + 0x2518: 0x0002, 0x2519: 0x0002, 0x251a: 0x0006, 0x251b: 0x000a, 0x251c: 0x000a, 0x251d: 0x000a, + 0x251e: 0x000a, 0x251f: 0x000a, 0x2520: 0x000a, + 0x253b: 0x005a, + 0x253c: 0x000a, 0x253d: 0x004a, 0x253e: 0x000a, 0x253f: 0x000a, // Block 0x95, offset 0x2540 - 0x2541: 0x000a, 0x2542: 0x000a, 0x2543: 0x0004, 0x2544: 0x0004, 0x2545: 0x0004, - 0x2546: 0x000a, 0x2547: 0x000a, 0x2548: 0x003a, 0x2549: 0x002a, 0x254a: 0x000a, 0x254b: 0x0003, - 0x254c: 0x0006, 0x254d: 0x0003, 0x254e: 0x0006, 0x254f: 0x0006, 0x2550: 0x0002, 0x2551: 0x0002, - 0x2552: 0x0002, 0x2553: 0x0002, 0x2554: 0x0002, 0x2555: 0x0002, 0x2556: 0x0002, 0x2557: 0x0002, - 0x2558: 0x0002, 0x2559: 0x0002, 0x255a: 0x0006, 0x255b: 0x000a, 0x255c: 0x000a, 0x255d: 0x000a, - 0x255e: 0x000a, 0x255f: 0x000a, 0x2560: 0x000a, - 0x257b: 0x005a, - 0x257c: 0x000a, 0x257d: 0x004a, 0x257e: 0x000a, 0x257f: 0x000a, + 0x2540: 0x000a, + 0x255b: 0x005a, 0x255c: 0x000a, 0x255d: 0x004a, + 0x255e: 0x000a, 0x255f: 0x00fa, 0x2560: 0x00ea, 0x2561: 0x000a, 0x2562: 0x003a, 0x2563: 0x002a, + 0x2564: 0x000a, 0x2565: 0x000a, // Block 0x96, offset 0x2580 - 0x2580: 0x000a, - 0x259b: 0x005a, 0x259c: 0x000a, 0x259d: 0x004a, - 0x259e: 0x000a, 0x259f: 0x00fa, 0x25a0: 0x00ea, 0x25a1: 0x000a, 0x25a2: 0x003a, 0x25a3: 0x002a, - 0x25a4: 0x000a, 0x25a5: 0x000a, + 0x25a0: 0x0004, 0x25a1: 0x0004, 0x25a2: 0x000a, 0x25a3: 0x000a, + 0x25a4: 0x000a, 0x25a5: 0x0004, 0x25a6: 0x0004, 0x25a8: 0x000a, 0x25a9: 0x000a, + 0x25aa: 0x000a, 0x25ab: 0x000a, 0x25ac: 0x000a, 0x25ad: 0x000a, 0x25ae: 0x000a, + 0x25b0: 0x000b, 0x25b1: 0x000b, 0x25b2: 0x000b, 0x25b3: 0x000b, 0x25b4: 0x000b, 0x25b5: 0x000b, + 0x25b6: 0x000b, 0x25b7: 0x000b, 0x25b8: 0x000b, 0x25b9: 0x000a, 0x25ba: 0x000a, 0x25bb: 0x000a, + 0x25bc: 0x000a, 0x25bd: 0x000a, 0x25be: 0x000b, 0x25bf: 0x000b, // Block 0x97, offset 0x25c0 - 0x25e0: 0x0004, 0x25e1: 0x0004, 0x25e2: 0x000a, 0x25e3: 0x000a, - 0x25e4: 0x000a, 0x25e5: 0x0004, 0x25e6: 0x0004, 0x25e8: 0x000a, 0x25e9: 0x000a, - 0x25ea: 0x000a, 0x25eb: 0x000a, 0x25ec: 0x000a, 0x25ed: 0x000a, 0x25ee: 0x000a, - 0x25f0: 0x000b, 0x25f1: 0x000b, 0x25f2: 0x000b, 0x25f3: 0x000b, 0x25f4: 0x000b, 0x25f5: 0x000b, - 0x25f6: 0x000b, 0x25f7: 0x000b, 0x25f8: 0x000b, 0x25f9: 0x000a, 0x25fa: 0x000a, 0x25fb: 0x000a, - 0x25fc: 0x000a, 0x25fd: 0x000a, 0x25fe: 0x000b, 0x25ff: 0x000b, + 0x25c1: 0x000a, // Block 0x98, offset 0x2600 - 0x2601: 0x000a, + 0x2600: 0x000a, 0x2601: 0x000a, 0x2602: 0x000a, 0x2603: 0x000a, 0x2604: 0x000a, 0x2605: 0x000a, + 0x2606: 0x000a, 0x2607: 0x000a, 0x2608: 0x000a, 0x2609: 0x000a, 0x260a: 0x000a, 0x260b: 0x000a, + 0x260c: 0x000a, 0x2610: 0x000a, 0x2611: 0x000a, + 0x2612: 0x000a, 0x2613: 0x000a, 0x2614: 0x000a, 0x2615: 0x000a, 0x2616: 0x000a, 0x2617: 0x000a, + 0x2618: 0x000a, 0x2619: 0x000a, 0x261a: 0x000a, 0x261b: 0x000a, + 0x2620: 0x000a, // Block 0x99, offset 0x2640 - 0x2640: 0x000a, 0x2641: 0x000a, 0x2642: 0x000a, 0x2643: 0x000a, 0x2644: 0x000a, 0x2645: 0x000a, - 0x2646: 0x000a, 0x2647: 0x000a, 0x2648: 0x000a, 0x2649: 0x000a, 0x264a: 0x000a, 0x264b: 0x000a, - 0x264c: 0x000a, 0x2650: 0x000a, 0x2651: 0x000a, - 0x2652: 0x000a, 0x2653: 0x000a, 0x2654: 0x000a, 0x2655: 0x000a, 0x2656: 0x000a, 0x2657: 0x000a, - 0x2658: 0x000a, 0x2659: 0x000a, 0x265a: 0x000a, 0x265b: 0x000a, - 0x2660: 0x000a, + 0x267d: 0x000c, // Block 0x9a, offset 0x2680 - 0x26bd: 0x000c, + 0x26a0: 0x000c, 0x26a1: 0x0002, 0x26a2: 0x0002, 0x26a3: 0x0002, + 0x26a4: 0x0002, 0x26a5: 0x0002, 0x26a6: 0x0002, 0x26a7: 0x0002, 0x26a8: 0x0002, 0x26a9: 0x0002, + 0x26aa: 0x0002, 0x26ab: 0x0002, 0x26ac: 0x0002, 0x26ad: 0x0002, 0x26ae: 0x0002, 0x26af: 0x0002, + 0x26b0: 0x0002, 0x26b1: 0x0002, 0x26b2: 0x0002, 0x26b3: 0x0002, 0x26b4: 0x0002, 0x26b5: 0x0002, + 0x26b6: 0x0002, 0x26b7: 0x0002, 0x26b8: 0x0002, 0x26b9: 0x0002, 0x26ba: 0x0002, 0x26bb: 0x0002, // Block 0x9b, offset 0x26c0 - 0x26e0: 0x000c, 0x26e1: 0x0002, 0x26e2: 0x0002, 0x26e3: 0x0002, - 0x26e4: 0x0002, 0x26e5: 0x0002, 0x26e6: 0x0002, 0x26e7: 0x0002, 0x26e8: 0x0002, 0x26e9: 0x0002, - 0x26ea: 0x0002, 0x26eb: 0x0002, 0x26ec: 0x0002, 0x26ed: 0x0002, 0x26ee: 0x0002, 0x26ef: 0x0002, - 0x26f0: 0x0002, 0x26f1: 0x0002, 0x26f2: 0x0002, 0x26f3: 0x0002, 0x26f4: 0x0002, 0x26f5: 0x0002, - 0x26f6: 0x0002, 0x26f7: 0x0002, 0x26f8: 0x0002, 0x26f9: 0x0002, 0x26fa: 0x0002, 0x26fb: 0x0002, + 0x26f6: 0x000c, 0x26f7: 0x000c, 0x26f8: 0x000c, 0x26f9: 0x000c, 0x26fa: 0x000c, // Block 0x9c, offset 0x2700 - 0x2736: 0x000c, 0x2737: 0x000c, 0x2738: 0x000c, 0x2739: 0x000c, 0x273a: 0x000c, + 0x2700: 0x0001, 0x2701: 0x0001, 0x2702: 0x0001, 0x2703: 0x0001, 0x2704: 0x0001, 0x2705: 0x0001, + 0x2706: 0x0001, 0x2707: 0x0001, 0x2708: 0x0001, 0x2709: 0x0001, 0x270a: 0x0001, 0x270b: 0x0001, + 0x270c: 0x0001, 0x270d: 0x0001, 0x270e: 0x0001, 0x270f: 0x0001, 0x2710: 0x0001, 0x2711: 0x0001, + 0x2712: 0x0001, 0x2713: 0x0001, 0x2714: 0x0001, 0x2715: 0x0001, 0x2716: 0x0001, 0x2717: 0x0001, + 0x2718: 0x0001, 0x2719: 0x0001, 0x271a: 0x0001, 0x271b: 0x0001, 0x271c: 0x0001, 0x271d: 0x0001, + 0x271e: 0x0001, 0x271f: 0x0001, 0x2720: 0x0001, 0x2721: 0x0001, 0x2722: 0x0001, 0x2723: 0x0001, + 0x2724: 0x0001, 0x2725: 0x0001, 0x2726: 0x0001, 0x2727: 0x0001, 0x2728: 0x0001, 0x2729: 0x0001, + 0x272a: 0x0001, 0x272b: 0x0001, 0x272c: 0x0001, 0x272d: 0x0001, 0x272e: 0x0001, 0x272f: 0x0001, + 0x2730: 0x0001, 0x2731: 0x0001, 0x2732: 0x0001, 0x2733: 0x0001, 0x2734: 0x0001, 0x2735: 0x0001, + 0x2736: 0x0001, 0x2737: 0x0001, 0x2738: 0x0001, 0x2739: 0x0001, 0x273a: 0x0001, 0x273b: 0x0001, + 0x273c: 0x0001, 0x273d: 0x0001, 0x273e: 0x0001, 0x273f: 0x0001, // Block 0x9d, offset 0x2740 0x2740: 0x0001, 0x2741: 0x0001, 0x2742: 0x0001, 0x2743: 0x0001, 0x2744: 0x0001, 0x2745: 0x0001, 0x2746: 0x0001, 0x2747: 0x0001, 0x2748: 0x0001, 0x2749: 0x0001, 0x274a: 0x0001, 0x274b: 0x0001, 0x274c: 0x0001, 0x274d: 0x0001, 0x274e: 0x0001, 0x274f: 0x0001, 0x2750: 0x0001, 0x2751: 0x0001, 0x2752: 0x0001, 0x2753: 0x0001, 0x2754: 0x0001, 0x2755: 0x0001, 0x2756: 0x0001, 0x2757: 0x0001, 0x2758: 0x0001, 0x2759: 0x0001, 0x275a: 0x0001, 0x275b: 0x0001, 0x275c: 0x0001, 0x275d: 0x0001, - 0x275e: 0x0001, 0x275f: 0x0001, 0x2760: 0x0001, 0x2761: 0x0001, 0x2762: 0x0001, 0x2763: 0x0001, + 0x275e: 0x0001, 0x275f: 0x000a, 0x2760: 0x0001, 0x2761: 0x0001, 0x2762: 0x0001, 0x2763: 0x0001, 0x2764: 0x0001, 0x2765: 0x0001, 0x2766: 0x0001, 0x2767: 0x0001, 0x2768: 0x0001, 0x2769: 0x0001, 0x276a: 0x0001, 0x276b: 0x0001, 0x276c: 0x0001, 0x276d: 0x0001, 0x276e: 0x0001, 0x276f: 0x0001, 0x2770: 0x0001, 0x2771: 0x0001, 0x2772: 0x0001, 0x2773: 0x0001, 0x2774: 0x0001, 0x2775: 0x0001, 0x2776: 0x0001, 0x2777: 0x0001, 0x2778: 0x0001, 0x2779: 0x0001, 0x277a: 0x0001, 0x277b: 0x0001, 0x277c: 0x0001, 0x277d: 0x0001, 0x277e: 0x0001, 0x277f: 0x0001, // Block 0x9e, offset 0x2780 - 0x2780: 0x0001, 0x2781: 0x0001, 0x2782: 0x0001, 0x2783: 0x0001, 0x2784: 0x0001, 0x2785: 0x0001, - 0x2786: 0x0001, 0x2787: 0x0001, 0x2788: 0x0001, 0x2789: 0x0001, 0x278a: 0x0001, 0x278b: 0x0001, - 0x278c: 0x0001, 0x278d: 0x0001, 0x278e: 0x0001, 0x278f: 0x0001, 0x2790: 0x0001, 0x2791: 0x0001, + 0x2780: 0x0001, 0x2781: 0x000c, 0x2782: 0x000c, 0x2783: 0x000c, 0x2784: 0x0001, 0x2785: 0x000c, + 0x2786: 0x000c, 0x2787: 0x0001, 0x2788: 0x0001, 0x2789: 0x0001, 0x278a: 0x0001, 0x278b: 0x0001, + 0x278c: 0x000c, 0x278d: 0x000c, 0x278e: 0x000c, 0x278f: 0x000c, 0x2790: 0x0001, 0x2791: 0x0001, 0x2792: 0x0001, 0x2793: 0x0001, 0x2794: 0x0001, 0x2795: 0x0001, 0x2796: 0x0001, 0x2797: 0x0001, 0x2798: 0x0001, 0x2799: 0x0001, 0x279a: 0x0001, 0x279b: 0x0001, 0x279c: 0x0001, 0x279d: 0x0001, - 0x279e: 0x0001, 0x279f: 0x000a, 0x27a0: 0x0001, 0x27a1: 0x0001, 0x27a2: 0x0001, 0x27a3: 0x0001, + 0x279e: 0x0001, 0x279f: 0x0001, 0x27a0: 0x0001, 0x27a1: 0x0001, 0x27a2: 0x0001, 0x27a3: 0x0001, 0x27a4: 0x0001, 0x27a5: 0x0001, 0x27a6: 0x0001, 0x27a7: 0x0001, 0x27a8: 0x0001, 0x27a9: 0x0001, 0x27aa: 0x0001, 0x27ab: 0x0001, 0x27ac: 0x0001, 0x27ad: 0x0001, 0x27ae: 0x0001, 0x27af: 0x0001, 0x27b0: 0x0001, 0x27b1: 0x0001, 0x27b2: 0x0001, 0x27b3: 0x0001, 0x27b4: 0x0001, 0x27b5: 0x0001, - 0x27b6: 0x0001, 0x27b7: 0x0001, 0x27b8: 0x0001, 0x27b9: 0x0001, 0x27ba: 0x0001, 0x27bb: 0x0001, - 0x27bc: 0x0001, 0x27bd: 0x0001, 0x27be: 0x0001, 0x27bf: 0x0001, + 0x27b6: 0x0001, 0x27b7: 0x0001, 0x27b8: 0x000c, 0x27b9: 0x000c, 0x27ba: 0x000c, 0x27bb: 0x0001, + 0x27bc: 0x0001, 0x27bd: 0x0001, 0x27be: 0x0001, 0x27bf: 0x000c, // Block 0x9f, offset 0x27c0 - 0x27c0: 0x0001, 0x27c1: 0x000c, 0x27c2: 0x000c, 0x27c3: 0x000c, 0x27c4: 0x0001, 0x27c5: 0x000c, - 0x27c6: 0x000c, 0x27c7: 0x0001, 0x27c8: 0x0001, 0x27c9: 0x0001, 0x27ca: 0x0001, 0x27cb: 0x0001, - 0x27cc: 0x000c, 0x27cd: 0x000c, 0x27ce: 0x000c, 0x27cf: 0x000c, 0x27d0: 0x0001, 0x27d1: 0x0001, + 0x27c0: 0x0001, 0x27c1: 0x0001, 0x27c2: 0x0001, 0x27c3: 0x0001, 0x27c4: 0x0001, 0x27c5: 0x0001, + 0x27c6: 0x0001, 0x27c7: 0x0001, 0x27c8: 0x0001, 0x27c9: 0x0001, 0x27ca: 0x0001, 0x27cb: 0x0001, + 0x27cc: 0x0001, 0x27cd: 0x0001, 0x27ce: 0x0001, 0x27cf: 0x0001, 0x27d0: 0x0001, 0x27d1: 0x0001, 0x27d2: 0x0001, 0x27d3: 0x0001, 0x27d4: 0x0001, 0x27d5: 0x0001, 0x27d6: 0x0001, 0x27d7: 0x0001, 0x27d8: 0x0001, 0x27d9: 0x0001, 0x27da: 0x0001, 0x27db: 0x0001, 0x27dc: 0x0001, 0x27dd: 0x0001, 0x27de: 0x0001, 0x27df: 0x0001, 0x27e0: 0x0001, 0x27e1: 0x0001, 0x27e2: 0x0001, 0x27e3: 0x0001, - 0x27e4: 0x0001, 0x27e5: 0x0001, 0x27e6: 0x0001, 0x27e7: 0x0001, 0x27e8: 0x0001, 0x27e9: 0x0001, + 0x27e4: 0x0001, 0x27e5: 0x000c, 0x27e6: 0x000c, 0x27e7: 0x0001, 0x27e8: 0x0001, 0x27e9: 0x0001, 0x27ea: 0x0001, 0x27eb: 0x0001, 0x27ec: 0x0001, 0x27ed: 0x0001, 0x27ee: 0x0001, 0x27ef: 0x0001, 0x27f0: 0x0001, 0x27f1: 0x0001, 0x27f2: 0x0001, 0x27f3: 0x0001, 0x27f4: 0x0001, 0x27f5: 0x0001, - 0x27f6: 0x0001, 0x27f7: 0x0001, 0x27f8: 0x000c, 0x27f9: 0x000c, 0x27fa: 0x000c, 0x27fb: 0x0001, - 0x27fc: 0x0001, 0x27fd: 0x0001, 0x27fe: 0x0001, 0x27ff: 0x000c, + 0x27f6: 0x0001, 0x27f7: 0x0001, 0x27f8: 0x0001, 0x27f9: 0x0001, 0x27fa: 0x0001, 0x27fb: 0x0001, + 0x27fc: 0x0001, 0x27fd: 0x0001, 0x27fe: 0x0001, 0x27ff: 0x0001, // Block 0xa0, offset 0x2800 0x2800: 0x0001, 0x2801: 0x0001, 0x2802: 0x0001, 0x2803: 0x0001, 0x2804: 0x0001, 0x2805: 0x0001, 0x2806: 0x0001, 0x2807: 0x0001, 0x2808: 0x0001, 0x2809: 0x0001, 0x280a: 0x0001, 0x280b: 0x0001, @@ -1280,382 +1286,409 @@ var bidiValues = [14208]uint8{ 0x2812: 0x0001, 0x2813: 0x0001, 0x2814: 0x0001, 0x2815: 0x0001, 0x2816: 0x0001, 0x2817: 0x0001, 0x2818: 0x0001, 0x2819: 0x0001, 0x281a: 0x0001, 0x281b: 0x0001, 0x281c: 0x0001, 0x281d: 0x0001, 0x281e: 0x0001, 0x281f: 0x0001, 0x2820: 0x0001, 0x2821: 0x0001, 0x2822: 0x0001, 0x2823: 0x0001, - 0x2824: 0x0001, 0x2825: 0x000c, 0x2826: 0x000c, 0x2827: 0x0001, 0x2828: 0x0001, 0x2829: 0x0001, + 0x2824: 0x0001, 0x2825: 0x0001, 0x2826: 0x0001, 0x2827: 0x0001, 0x2828: 0x0001, 0x2829: 0x0001, 0x282a: 0x0001, 0x282b: 0x0001, 0x282c: 0x0001, 0x282d: 0x0001, 0x282e: 0x0001, 0x282f: 0x0001, 0x2830: 0x0001, 0x2831: 0x0001, 0x2832: 0x0001, 0x2833: 0x0001, 0x2834: 0x0001, 0x2835: 0x0001, - 0x2836: 0x0001, 0x2837: 0x0001, 0x2838: 0x0001, 0x2839: 0x0001, 0x283a: 0x0001, 0x283b: 0x0001, - 0x283c: 0x0001, 0x283d: 0x0001, 0x283e: 0x0001, 0x283f: 0x0001, + 0x2836: 0x0001, 0x2837: 0x0001, 0x2838: 0x0001, 0x2839: 0x000a, 0x283a: 0x000a, 0x283b: 0x000a, + 0x283c: 0x000a, 0x283d: 0x000a, 0x283e: 0x000a, 0x283f: 0x000a, // Block 0xa1, offset 0x2840 0x2840: 0x0001, 0x2841: 0x0001, 0x2842: 0x0001, 0x2843: 0x0001, 0x2844: 0x0001, 0x2845: 0x0001, 0x2846: 0x0001, 0x2847: 0x0001, 0x2848: 0x0001, 0x2849: 0x0001, 0x284a: 0x0001, 0x284b: 0x0001, 0x284c: 0x0001, 0x284d: 0x0001, 0x284e: 0x0001, 0x284f: 0x0001, 0x2850: 0x0001, 0x2851: 0x0001, 0x2852: 0x0001, 0x2853: 0x0001, 0x2854: 0x0001, 0x2855: 0x0001, 0x2856: 0x0001, 0x2857: 0x0001, 0x2858: 0x0001, 0x2859: 0x0001, 0x285a: 0x0001, 0x285b: 0x0001, 0x285c: 0x0001, 0x285d: 0x0001, - 0x285e: 0x0001, 0x285f: 0x0001, 0x2860: 0x0001, 0x2861: 0x0001, 0x2862: 0x0001, 0x2863: 0x0001, - 0x2864: 0x0001, 0x2865: 0x0001, 0x2866: 0x0001, 0x2867: 0x0001, 0x2868: 0x0001, 0x2869: 0x0001, - 0x286a: 0x0001, 0x286b: 0x0001, 0x286c: 0x0001, 0x286d: 0x0001, 0x286e: 0x0001, 0x286f: 0x0001, - 0x2870: 0x0001, 0x2871: 0x0001, 0x2872: 0x0001, 0x2873: 0x0001, 0x2874: 0x0001, 0x2875: 0x0001, - 0x2876: 0x0001, 0x2877: 0x0001, 0x2878: 0x0001, 0x2879: 0x000a, 0x287a: 0x000a, 0x287b: 0x000a, - 0x287c: 0x000a, 0x287d: 0x000a, 0x287e: 0x000a, 0x287f: 0x000a, + 0x285e: 0x0001, 0x285f: 0x0001, 0x2860: 0x0005, 0x2861: 0x0005, 0x2862: 0x0005, 0x2863: 0x0005, + 0x2864: 0x0005, 0x2865: 0x0005, 0x2866: 0x0005, 0x2867: 0x0005, 0x2868: 0x0005, 0x2869: 0x0005, + 0x286a: 0x0005, 0x286b: 0x0005, 0x286c: 0x0005, 0x286d: 0x0005, 0x286e: 0x0005, 0x286f: 0x0005, + 0x2870: 0x0005, 0x2871: 0x0005, 0x2872: 0x0005, 0x2873: 0x0005, 0x2874: 0x0005, 0x2875: 0x0005, + 0x2876: 0x0005, 0x2877: 0x0005, 0x2878: 0x0005, 0x2879: 0x0005, 0x287a: 0x0005, 0x287b: 0x0005, + 0x287c: 0x0005, 0x287d: 0x0005, 0x287e: 0x0005, 0x287f: 0x0001, // Block 0xa2, offset 0x2880 - 0x2880: 0x0001, 0x2881: 0x0001, 0x2882: 0x0001, 0x2883: 0x0001, 0x2884: 0x0001, 0x2885: 0x0001, - 0x2886: 0x0001, 0x2887: 0x0001, 0x2888: 0x0001, 0x2889: 0x0001, 0x288a: 0x0001, 0x288b: 0x0001, - 0x288c: 0x0001, 0x288d: 0x0001, 0x288e: 0x0001, 0x288f: 0x0001, 0x2890: 0x0001, 0x2891: 0x0001, - 0x2892: 0x0001, 0x2893: 0x0001, 0x2894: 0x0001, 0x2895: 0x0001, 0x2896: 0x0001, 0x2897: 0x0001, - 0x2898: 0x0001, 0x2899: 0x0001, 0x289a: 0x0001, 0x289b: 0x0001, 0x289c: 0x0001, 0x289d: 0x0001, - 0x289e: 0x0001, 0x289f: 0x0001, 0x28a0: 0x0005, 0x28a1: 0x0005, 0x28a2: 0x0005, 0x28a3: 0x0005, - 0x28a4: 0x0005, 0x28a5: 0x0005, 0x28a6: 0x0005, 0x28a7: 0x0005, 0x28a8: 0x0005, 0x28a9: 0x0005, - 0x28aa: 0x0005, 0x28ab: 0x0005, 0x28ac: 0x0005, 0x28ad: 0x0005, 0x28ae: 0x0005, 0x28af: 0x0005, - 0x28b0: 0x0005, 0x28b1: 0x0005, 0x28b2: 0x0005, 0x28b3: 0x0005, 0x28b4: 0x0005, 0x28b5: 0x0005, - 0x28b6: 0x0005, 0x28b7: 0x0005, 0x28b8: 0x0005, 0x28b9: 0x0005, 0x28ba: 0x0005, 0x28bb: 0x0005, - 0x28bc: 0x0005, 0x28bd: 0x0005, 0x28be: 0x0005, 0x28bf: 0x0001, + 0x2881: 0x000c, + 0x28b8: 0x000c, 0x28b9: 0x000c, 0x28ba: 0x000c, 0x28bb: 0x000c, + 0x28bc: 0x000c, 0x28bd: 0x000c, 0x28be: 0x000c, 0x28bf: 0x000c, // Block 0xa3, offset 0x28c0 - 0x28c1: 0x000c, - 0x28f8: 0x000c, 0x28f9: 0x000c, 0x28fa: 0x000c, 0x28fb: 0x000c, - 0x28fc: 0x000c, 0x28fd: 0x000c, 0x28fe: 0x000c, 0x28ff: 0x000c, + 0x28c0: 0x000c, 0x28c1: 0x000c, 0x28c2: 0x000c, 0x28c3: 0x000c, 0x28c4: 0x000c, 0x28c5: 0x000c, + 0x28c6: 0x000c, + 0x28d2: 0x000a, 0x28d3: 0x000a, 0x28d4: 0x000a, 0x28d5: 0x000a, 0x28d6: 0x000a, 0x28d7: 0x000a, + 0x28d8: 0x000a, 0x28d9: 0x000a, 0x28da: 0x000a, 0x28db: 0x000a, 0x28dc: 0x000a, 0x28dd: 0x000a, + 0x28de: 0x000a, 0x28df: 0x000a, 0x28e0: 0x000a, 0x28e1: 0x000a, 0x28e2: 0x000a, 0x28e3: 0x000a, + 0x28e4: 0x000a, 0x28e5: 0x000a, + 0x28ff: 0x000c, // Block 0xa4, offset 0x2900 - 0x2900: 0x000c, 0x2901: 0x000c, 0x2902: 0x000c, 0x2903: 0x000c, 0x2904: 0x000c, 0x2905: 0x000c, - 0x2906: 0x000c, - 0x2912: 0x000a, 0x2913: 0x000a, 0x2914: 0x000a, 0x2915: 0x000a, 0x2916: 0x000a, 0x2917: 0x000a, - 0x2918: 0x000a, 0x2919: 0x000a, 0x291a: 0x000a, 0x291b: 0x000a, 0x291c: 0x000a, 0x291d: 0x000a, - 0x291e: 0x000a, 0x291f: 0x000a, 0x2920: 0x000a, 0x2921: 0x000a, 0x2922: 0x000a, 0x2923: 0x000a, - 0x2924: 0x000a, 0x2925: 0x000a, - 0x293f: 0x000c, + 0x2900: 0x000c, 0x2901: 0x000c, + 0x2933: 0x000c, 0x2934: 0x000c, 0x2935: 0x000c, + 0x2936: 0x000c, 0x2939: 0x000c, 0x293a: 0x000c, // Block 0xa5, offset 0x2940 - 0x2940: 0x000c, 0x2941: 0x000c, - 0x2973: 0x000c, 0x2974: 0x000c, 0x2975: 0x000c, - 0x2976: 0x000c, 0x2979: 0x000c, 0x297a: 0x000c, + 0x2940: 0x000c, 0x2941: 0x000c, 0x2942: 0x000c, + 0x2967: 0x000c, 0x2968: 0x000c, 0x2969: 0x000c, + 0x296a: 0x000c, 0x296b: 0x000c, 0x296d: 0x000c, 0x296e: 0x000c, 0x296f: 0x000c, + 0x2970: 0x000c, 0x2971: 0x000c, 0x2972: 0x000c, 0x2973: 0x000c, 0x2974: 0x000c, // Block 0xa6, offset 0x2980 - 0x2980: 0x000c, 0x2981: 0x000c, 0x2982: 0x000c, - 0x29a7: 0x000c, 0x29a8: 0x000c, 0x29a9: 0x000c, - 0x29aa: 0x000c, 0x29ab: 0x000c, 0x29ad: 0x000c, 0x29ae: 0x000c, 0x29af: 0x000c, - 0x29b0: 0x000c, 0x29b1: 0x000c, 0x29b2: 0x000c, 0x29b3: 0x000c, 0x29b4: 0x000c, + 0x29b3: 0x000c, // Block 0xa7, offset 0x29c0 - 0x29f3: 0x000c, + 0x29c0: 0x000c, 0x29c1: 0x000c, + 0x29f6: 0x000c, 0x29f7: 0x000c, 0x29f8: 0x000c, 0x29f9: 0x000c, 0x29fa: 0x000c, 0x29fb: 0x000c, + 0x29fc: 0x000c, 0x29fd: 0x000c, 0x29fe: 0x000c, // Block 0xa8, offset 0x2a00 - 0x2a00: 0x000c, 0x2a01: 0x000c, - 0x2a36: 0x000c, 0x2a37: 0x000c, 0x2a38: 0x000c, 0x2a39: 0x000c, 0x2a3a: 0x000c, 0x2a3b: 0x000c, - 0x2a3c: 0x000c, 0x2a3d: 0x000c, 0x2a3e: 0x000c, + 0x2a0a: 0x000c, 0x2a0b: 0x000c, + 0x2a0c: 0x000c, // Block 0xa9, offset 0x2a40 - 0x2a4a: 0x000c, 0x2a4b: 0x000c, - 0x2a4c: 0x000c, + 0x2a6f: 0x000c, + 0x2a70: 0x000c, 0x2a71: 0x000c, 0x2a74: 0x000c, + 0x2a76: 0x000c, 0x2a77: 0x000c, + 0x2a7e: 0x000c, // Block 0xaa, offset 0x2a80 - 0x2aaf: 0x000c, - 0x2ab0: 0x000c, 0x2ab1: 0x000c, 0x2ab4: 0x000c, - 0x2ab6: 0x000c, 0x2ab7: 0x000c, - 0x2abe: 0x000c, + 0x2a9f: 0x000c, 0x2aa3: 0x000c, + 0x2aa4: 0x000c, 0x2aa5: 0x000c, 0x2aa6: 0x000c, 0x2aa7: 0x000c, 0x2aa8: 0x000c, 0x2aa9: 0x000c, + 0x2aaa: 0x000c, // Block 0xab, offset 0x2ac0 - 0x2adf: 0x000c, 0x2ae3: 0x000c, - 0x2ae4: 0x000c, 0x2ae5: 0x000c, 0x2ae6: 0x000c, 0x2ae7: 0x000c, 0x2ae8: 0x000c, 0x2ae9: 0x000c, - 0x2aea: 0x000c, + 0x2ac0: 0x000c, 0x2ac1: 0x000c, + 0x2afc: 0x000c, // Block 0xac, offset 0x2b00 - 0x2b00: 0x000c, 0x2b01: 0x000c, - 0x2b3c: 0x000c, + 0x2b00: 0x000c, + 0x2b26: 0x000c, 0x2b27: 0x000c, 0x2b28: 0x000c, 0x2b29: 0x000c, + 0x2b2a: 0x000c, 0x2b2b: 0x000c, 0x2b2c: 0x000c, + 0x2b30: 0x000c, 0x2b31: 0x000c, 0x2b32: 0x000c, 0x2b33: 0x000c, 0x2b34: 0x000c, // Block 0xad, offset 0x2b40 - 0x2b40: 0x000c, - 0x2b66: 0x000c, 0x2b67: 0x000c, 0x2b68: 0x000c, 0x2b69: 0x000c, - 0x2b6a: 0x000c, 0x2b6b: 0x000c, 0x2b6c: 0x000c, - 0x2b70: 0x000c, 0x2b71: 0x000c, 0x2b72: 0x000c, 0x2b73: 0x000c, 0x2b74: 0x000c, + 0x2b78: 0x000c, 0x2b79: 0x000c, 0x2b7a: 0x000c, 0x2b7b: 0x000c, + 0x2b7c: 0x000c, 0x2b7d: 0x000c, 0x2b7e: 0x000c, 0x2b7f: 0x000c, // Block 0xae, offset 0x2b80 - 0x2bb8: 0x000c, 0x2bb9: 0x000c, 0x2bba: 0x000c, 0x2bbb: 0x000c, - 0x2bbc: 0x000c, 0x2bbd: 0x000c, 0x2bbe: 0x000c, 0x2bbf: 0x000c, + 0x2b82: 0x000c, 0x2b83: 0x000c, 0x2b84: 0x000c, + 0x2b86: 0x000c, // Block 0xaf, offset 0x2bc0 - 0x2bc2: 0x000c, 0x2bc3: 0x000c, 0x2bc4: 0x000c, - 0x2bc6: 0x000c, + 0x2bf3: 0x000c, 0x2bf4: 0x000c, 0x2bf5: 0x000c, + 0x2bf6: 0x000c, 0x2bf7: 0x000c, 0x2bf8: 0x000c, 0x2bfa: 0x000c, + 0x2bff: 0x000c, // Block 0xb0, offset 0x2c00 - 0x2c33: 0x000c, 0x2c34: 0x000c, 0x2c35: 0x000c, - 0x2c36: 0x000c, 0x2c37: 0x000c, 0x2c38: 0x000c, 0x2c3a: 0x000c, - 0x2c3f: 0x000c, + 0x2c00: 0x000c, 0x2c02: 0x000c, 0x2c03: 0x000c, // Block 0xb1, offset 0x2c40 - 0x2c40: 0x000c, 0x2c42: 0x000c, 0x2c43: 0x000c, + 0x2c72: 0x000c, 0x2c73: 0x000c, 0x2c74: 0x000c, 0x2c75: 0x000c, + 0x2c7c: 0x000c, 0x2c7d: 0x000c, 0x2c7f: 0x000c, // Block 0xb2, offset 0x2c80 - 0x2cb2: 0x000c, 0x2cb3: 0x000c, 0x2cb4: 0x000c, 0x2cb5: 0x000c, - 0x2cbc: 0x000c, 0x2cbd: 0x000c, 0x2cbf: 0x000c, + 0x2c80: 0x000c, + 0x2c9c: 0x000c, 0x2c9d: 0x000c, // Block 0xb3, offset 0x2cc0 - 0x2cc0: 0x000c, - 0x2cdc: 0x000c, 0x2cdd: 0x000c, + 0x2cf3: 0x000c, 0x2cf4: 0x000c, 0x2cf5: 0x000c, + 0x2cf6: 0x000c, 0x2cf7: 0x000c, 0x2cf8: 0x000c, 0x2cf9: 0x000c, 0x2cfa: 0x000c, + 0x2cfd: 0x000c, 0x2cff: 0x000c, // Block 0xb4, offset 0x2d00 - 0x2d33: 0x000c, 0x2d34: 0x000c, 0x2d35: 0x000c, - 0x2d36: 0x000c, 0x2d37: 0x000c, 0x2d38: 0x000c, 0x2d39: 0x000c, 0x2d3a: 0x000c, - 0x2d3d: 0x000c, 0x2d3f: 0x000c, + 0x2d00: 0x000c, + 0x2d20: 0x000a, 0x2d21: 0x000a, 0x2d22: 0x000a, 0x2d23: 0x000a, + 0x2d24: 0x000a, 0x2d25: 0x000a, 0x2d26: 0x000a, 0x2d27: 0x000a, 0x2d28: 0x000a, 0x2d29: 0x000a, + 0x2d2a: 0x000a, 0x2d2b: 0x000a, 0x2d2c: 0x000a, // Block 0xb5, offset 0x2d40 - 0x2d40: 0x000c, - 0x2d60: 0x000a, 0x2d61: 0x000a, 0x2d62: 0x000a, 0x2d63: 0x000a, - 0x2d64: 0x000a, 0x2d65: 0x000a, 0x2d66: 0x000a, 0x2d67: 0x000a, 0x2d68: 0x000a, 0x2d69: 0x000a, - 0x2d6a: 0x000a, 0x2d6b: 0x000a, 0x2d6c: 0x000a, + 0x2d6b: 0x000c, 0x2d6d: 0x000c, + 0x2d70: 0x000c, 0x2d71: 0x000c, 0x2d72: 0x000c, 0x2d73: 0x000c, 0x2d74: 0x000c, 0x2d75: 0x000c, + 0x2d77: 0x000c, // Block 0xb6, offset 0x2d80 - 0x2dab: 0x000c, 0x2dad: 0x000c, - 0x2db0: 0x000c, 0x2db1: 0x000c, 0x2db2: 0x000c, 0x2db3: 0x000c, 0x2db4: 0x000c, 0x2db5: 0x000c, - 0x2db7: 0x000c, + 0x2d9d: 0x000c, + 0x2d9e: 0x000c, 0x2d9f: 0x000c, 0x2da2: 0x000c, 0x2da3: 0x000c, + 0x2da4: 0x000c, 0x2da5: 0x000c, 0x2da7: 0x000c, 0x2da8: 0x000c, 0x2da9: 0x000c, + 0x2daa: 0x000c, 0x2dab: 0x000c, // Block 0xb7, offset 0x2dc0 - 0x2ddd: 0x000c, - 0x2dde: 0x000c, 0x2ddf: 0x000c, 0x2de2: 0x000c, 0x2de3: 0x000c, - 0x2de4: 0x000c, 0x2de5: 0x000c, 0x2de7: 0x000c, 0x2de8: 0x000c, 0x2de9: 0x000c, - 0x2dea: 0x000c, 0x2deb: 0x000c, + 0x2dc1: 0x000c, 0x2dc2: 0x000c, 0x2dc3: 0x000c, 0x2dc4: 0x000c, 0x2dc5: 0x000c, + 0x2dc6: 0x000c, 0x2dc9: 0x000c, 0x2dca: 0x000c, + 0x2df3: 0x000c, 0x2df4: 0x000c, 0x2df5: 0x000c, + 0x2df6: 0x000c, 0x2df7: 0x000c, 0x2df8: 0x000c, 0x2dfb: 0x000c, + 0x2dfc: 0x000c, 0x2dfd: 0x000c, 0x2dfe: 0x000c, // Block 0xb8, offset 0x2e00 - 0x2e30: 0x000c, 0x2e31: 0x000c, 0x2e32: 0x000c, 0x2e33: 0x000c, 0x2e34: 0x000c, 0x2e35: 0x000c, - 0x2e36: 0x000c, 0x2e38: 0x000c, 0x2e39: 0x000c, 0x2e3a: 0x000c, 0x2e3b: 0x000c, - 0x2e3c: 0x000c, 0x2e3d: 0x000c, + 0x2e07: 0x000c, + 0x2e11: 0x000c, + 0x2e12: 0x000c, 0x2e13: 0x000c, 0x2e14: 0x000c, 0x2e15: 0x000c, 0x2e16: 0x000c, + 0x2e19: 0x000c, 0x2e1a: 0x000c, 0x2e1b: 0x000c, // Block 0xb9, offset 0x2e40 - 0x2e52: 0x000c, 0x2e53: 0x000c, 0x2e54: 0x000c, 0x2e55: 0x000c, 0x2e56: 0x000c, 0x2e57: 0x000c, - 0x2e58: 0x000c, 0x2e59: 0x000c, 0x2e5a: 0x000c, 0x2e5b: 0x000c, 0x2e5c: 0x000c, 0x2e5d: 0x000c, - 0x2e5e: 0x000c, 0x2e5f: 0x000c, 0x2e60: 0x000c, 0x2e61: 0x000c, 0x2e62: 0x000c, 0x2e63: 0x000c, - 0x2e64: 0x000c, 0x2e65: 0x000c, 0x2e66: 0x000c, 0x2e67: 0x000c, - 0x2e6a: 0x000c, 0x2e6b: 0x000c, 0x2e6c: 0x000c, 0x2e6d: 0x000c, 0x2e6e: 0x000c, 0x2e6f: 0x000c, - 0x2e70: 0x000c, 0x2e72: 0x000c, 0x2e73: 0x000c, 0x2e75: 0x000c, - 0x2e76: 0x000c, + 0x2e4a: 0x000c, 0x2e4b: 0x000c, + 0x2e4c: 0x000c, 0x2e4d: 0x000c, 0x2e4e: 0x000c, 0x2e4f: 0x000c, 0x2e50: 0x000c, 0x2e51: 0x000c, + 0x2e52: 0x000c, 0x2e53: 0x000c, 0x2e54: 0x000c, 0x2e55: 0x000c, 0x2e56: 0x000c, + 0x2e58: 0x000c, 0x2e59: 0x000c, // Block 0xba, offset 0x2e80 - 0x2eb0: 0x000c, 0x2eb1: 0x000c, 0x2eb2: 0x000c, 0x2eb3: 0x000c, 0x2eb4: 0x000c, + 0x2eb0: 0x000c, 0x2eb1: 0x000c, 0x2eb2: 0x000c, 0x2eb3: 0x000c, 0x2eb4: 0x000c, 0x2eb5: 0x000c, + 0x2eb6: 0x000c, 0x2eb8: 0x000c, 0x2eb9: 0x000c, 0x2eba: 0x000c, 0x2ebb: 0x000c, + 0x2ebc: 0x000c, 0x2ebd: 0x000c, // Block 0xbb, offset 0x2ec0 - 0x2ef0: 0x000c, 0x2ef1: 0x000c, 0x2ef2: 0x000c, 0x2ef3: 0x000c, 0x2ef4: 0x000c, 0x2ef5: 0x000c, + 0x2ed2: 0x000c, 0x2ed3: 0x000c, 0x2ed4: 0x000c, 0x2ed5: 0x000c, 0x2ed6: 0x000c, 0x2ed7: 0x000c, + 0x2ed8: 0x000c, 0x2ed9: 0x000c, 0x2eda: 0x000c, 0x2edb: 0x000c, 0x2edc: 0x000c, 0x2edd: 0x000c, + 0x2ede: 0x000c, 0x2edf: 0x000c, 0x2ee0: 0x000c, 0x2ee1: 0x000c, 0x2ee2: 0x000c, 0x2ee3: 0x000c, + 0x2ee4: 0x000c, 0x2ee5: 0x000c, 0x2ee6: 0x000c, 0x2ee7: 0x000c, + 0x2eea: 0x000c, 0x2eeb: 0x000c, 0x2eec: 0x000c, 0x2eed: 0x000c, 0x2eee: 0x000c, 0x2eef: 0x000c, + 0x2ef0: 0x000c, 0x2ef2: 0x000c, 0x2ef3: 0x000c, 0x2ef5: 0x000c, 0x2ef6: 0x000c, // Block 0xbc, offset 0x2f00 - 0x2f0f: 0x000c, 0x2f10: 0x000c, 0x2f11: 0x000c, - 0x2f12: 0x000c, + 0x2f31: 0x000c, 0x2f32: 0x000c, 0x2f33: 0x000c, 0x2f34: 0x000c, 0x2f35: 0x000c, + 0x2f36: 0x000c, 0x2f3a: 0x000c, + 0x2f3c: 0x000c, 0x2f3d: 0x000c, 0x2f3f: 0x000c, // Block 0xbd, offset 0x2f40 - 0x2f5d: 0x000c, - 0x2f5e: 0x000c, 0x2f60: 0x000b, 0x2f61: 0x000b, 0x2f62: 0x000b, 0x2f63: 0x000b, + 0x2f40: 0x000c, 0x2f41: 0x000c, 0x2f42: 0x000c, 0x2f43: 0x000c, 0x2f44: 0x000c, 0x2f45: 0x000c, + 0x2f47: 0x000c, // Block 0xbe, offset 0x2f80 - 0x2fa7: 0x000c, 0x2fa8: 0x000c, 0x2fa9: 0x000c, - 0x2fb3: 0x000b, 0x2fb4: 0x000b, 0x2fb5: 0x000b, - 0x2fb6: 0x000b, 0x2fb7: 0x000b, 0x2fb8: 0x000b, 0x2fb9: 0x000b, 0x2fba: 0x000b, 0x2fbb: 0x000c, - 0x2fbc: 0x000c, 0x2fbd: 0x000c, 0x2fbe: 0x000c, 0x2fbf: 0x000c, + 0x2fb0: 0x000c, 0x2fb1: 0x000c, 0x2fb2: 0x000c, 0x2fb3: 0x000c, 0x2fb4: 0x000c, // Block 0xbf, offset 0x2fc0 - 0x2fc0: 0x000c, 0x2fc1: 0x000c, 0x2fc2: 0x000c, 0x2fc5: 0x000c, - 0x2fc6: 0x000c, 0x2fc7: 0x000c, 0x2fc8: 0x000c, 0x2fc9: 0x000c, 0x2fca: 0x000c, 0x2fcb: 0x000c, - 0x2fea: 0x000c, 0x2feb: 0x000c, 0x2fec: 0x000c, 0x2fed: 0x000c, + 0x2ff0: 0x000c, 0x2ff1: 0x000c, 0x2ff2: 0x000c, 0x2ff3: 0x000c, 0x2ff4: 0x000c, 0x2ff5: 0x000c, + 0x2ff6: 0x000c, // Block 0xc0, offset 0x3000 - 0x3000: 0x000a, 0x3001: 0x000a, 0x3002: 0x000c, 0x3003: 0x000c, 0x3004: 0x000c, 0x3005: 0x000a, + 0x300f: 0x000c, 0x3010: 0x000c, 0x3011: 0x000c, + 0x3012: 0x000c, // Block 0xc1, offset 0x3040 - 0x3040: 0x000a, 0x3041: 0x000a, 0x3042: 0x000a, 0x3043: 0x000a, 0x3044: 0x000a, 0x3045: 0x000a, - 0x3046: 0x000a, 0x3047: 0x000a, 0x3048: 0x000a, 0x3049: 0x000a, 0x304a: 0x000a, 0x304b: 0x000a, - 0x304c: 0x000a, 0x304d: 0x000a, 0x304e: 0x000a, 0x304f: 0x000a, 0x3050: 0x000a, 0x3051: 0x000a, - 0x3052: 0x000a, 0x3053: 0x000a, 0x3054: 0x000a, 0x3055: 0x000a, 0x3056: 0x000a, + 0x305d: 0x000c, + 0x305e: 0x000c, 0x3060: 0x000b, 0x3061: 0x000b, 0x3062: 0x000b, 0x3063: 0x000b, // Block 0xc2, offset 0x3080 - 0x309b: 0x000a, + 0x30a7: 0x000c, 0x30a8: 0x000c, 0x30a9: 0x000c, + 0x30b3: 0x000b, 0x30b4: 0x000b, 0x30b5: 0x000b, + 0x30b6: 0x000b, 0x30b7: 0x000b, 0x30b8: 0x000b, 0x30b9: 0x000b, 0x30ba: 0x000b, 0x30bb: 0x000c, + 0x30bc: 0x000c, 0x30bd: 0x000c, 0x30be: 0x000c, 0x30bf: 0x000c, // Block 0xc3, offset 0x30c0 - 0x30d5: 0x000a, + 0x30c0: 0x000c, 0x30c1: 0x000c, 0x30c2: 0x000c, 0x30c5: 0x000c, + 0x30c6: 0x000c, 0x30c7: 0x000c, 0x30c8: 0x000c, 0x30c9: 0x000c, 0x30ca: 0x000c, 0x30cb: 0x000c, + 0x30ea: 0x000c, 0x30eb: 0x000c, 0x30ec: 0x000c, 0x30ed: 0x000c, // Block 0xc4, offset 0x3100 - 0x310f: 0x000a, + 0x3100: 0x000a, 0x3101: 0x000a, 0x3102: 0x000c, 0x3103: 0x000c, 0x3104: 0x000c, 0x3105: 0x000a, // Block 0xc5, offset 0x3140 - 0x3149: 0x000a, + 0x3140: 0x000a, 0x3141: 0x000a, 0x3142: 0x000a, 0x3143: 0x000a, 0x3144: 0x000a, 0x3145: 0x000a, + 0x3146: 0x000a, 0x3147: 0x000a, 0x3148: 0x000a, 0x3149: 0x000a, 0x314a: 0x000a, 0x314b: 0x000a, + 0x314c: 0x000a, 0x314d: 0x000a, 0x314e: 0x000a, 0x314f: 0x000a, 0x3150: 0x000a, 0x3151: 0x000a, + 0x3152: 0x000a, 0x3153: 0x000a, 0x3154: 0x000a, 0x3155: 0x000a, 0x3156: 0x000a, // Block 0xc6, offset 0x3180 - 0x3183: 0x000a, - 0x318e: 0x0002, 0x318f: 0x0002, 0x3190: 0x0002, 0x3191: 0x0002, - 0x3192: 0x0002, 0x3193: 0x0002, 0x3194: 0x0002, 0x3195: 0x0002, 0x3196: 0x0002, 0x3197: 0x0002, - 0x3198: 0x0002, 0x3199: 0x0002, 0x319a: 0x0002, 0x319b: 0x0002, 0x319c: 0x0002, 0x319d: 0x0002, - 0x319e: 0x0002, 0x319f: 0x0002, 0x31a0: 0x0002, 0x31a1: 0x0002, 0x31a2: 0x0002, 0x31a3: 0x0002, - 0x31a4: 0x0002, 0x31a5: 0x0002, 0x31a6: 0x0002, 0x31a7: 0x0002, 0x31a8: 0x0002, 0x31a9: 0x0002, - 0x31aa: 0x0002, 0x31ab: 0x0002, 0x31ac: 0x0002, 0x31ad: 0x0002, 0x31ae: 0x0002, 0x31af: 0x0002, - 0x31b0: 0x0002, 0x31b1: 0x0002, 0x31b2: 0x0002, 0x31b3: 0x0002, 0x31b4: 0x0002, 0x31b5: 0x0002, - 0x31b6: 0x0002, 0x31b7: 0x0002, 0x31b8: 0x0002, 0x31b9: 0x0002, 0x31ba: 0x0002, 0x31bb: 0x0002, - 0x31bc: 0x0002, 0x31bd: 0x0002, 0x31be: 0x0002, 0x31bf: 0x0002, + 0x319b: 0x000a, // Block 0xc7, offset 0x31c0 - 0x31c0: 0x000c, 0x31c1: 0x000c, 0x31c2: 0x000c, 0x31c3: 0x000c, 0x31c4: 0x000c, 0x31c5: 0x000c, - 0x31c6: 0x000c, 0x31c7: 0x000c, 0x31c8: 0x000c, 0x31c9: 0x000c, 0x31ca: 0x000c, 0x31cb: 0x000c, - 0x31cc: 0x000c, 0x31cd: 0x000c, 0x31ce: 0x000c, 0x31cf: 0x000c, 0x31d0: 0x000c, 0x31d1: 0x000c, - 0x31d2: 0x000c, 0x31d3: 0x000c, 0x31d4: 0x000c, 0x31d5: 0x000c, 0x31d6: 0x000c, 0x31d7: 0x000c, - 0x31d8: 0x000c, 0x31d9: 0x000c, 0x31da: 0x000c, 0x31db: 0x000c, 0x31dc: 0x000c, 0x31dd: 0x000c, - 0x31de: 0x000c, 0x31df: 0x000c, 0x31e0: 0x000c, 0x31e1: 0x000c, 0x31e2: 0x000c, 0x31e3: 0x000c, - 0x31e4: 0x000c, 0x31e5: 0x000c, 0x31e6: 0x000c, 0x31e7: 0x000c, 0x31e8: 0x000c, 0x31e9: 0x000c, - 0x31ea: 0x000c, 0x31eb: 0x000c, 0x31ec: 0x000c, 0x31ed: 0x000c, 0x31ee: 0x000c, 0x31ef: 0x000c, - 0x31f0: 0x000c, 0x31f1: 0x000c, 0x31f2: 0x000c, 0x31f3: 0x000c, 0x31f4: 0x000c, 0x31f5: 0x000c, - 0x31f6: 0x000c, 0x31fb: 0x000c, - 0x31fc: 0x000c, 0x31fd: 0x000c, 0x31fe: 0x000c, 0x31ff: 0x000c, + 0x31d5: 0x000a, // Block 0xc8, offset 0x3200 - 0x3200: 0x000c, 0x3201: 0x000c, 0x3202: 0x000c, 0x3203: 0x000c, 0x3204: 0x000c, 0x3205: 0x000c, - 0x3206: 0x000c, 0x3207: 0x000c, 0x3208: 0x000c, 0x3209: 0x000c, 0x320a: 0x000c, 0x320b: 0x000c, - 0x320c: 0x000c, 0x320d: 0x000c, 0x320e: 0x000c, 0x320f: 0x000c, 0x3210: 0x000c, 0x3211: 0x000c, - 0x3212: 0x000c, 0x3213: 0x000c, 0x3214: 0x000c, 0x3215: 0x000c, 0x3216: 0x000c, 0x3217: 0x000c, - 0x3218: 0x000c, 0x3219: 0x000c, 0x321a: 0x000c, 0x321b: 0x000c, 0x321c: 0x000c, 0x321d: 0x000c, - 0x321e: 0x000c, 0x321f: 0x000c, 0x3220: 0x000c, 0x3221: 0x000c, 0x3222: 0x000c, 0x3223: 0x000c, - 0x3224: 0x000c, 0x3225: 0x000c, 0x3226: 0x000c, 0x3227: 0x000c, 0x3228: 0x000c, 0x3229: 0x000c, - 0x322a: 0x000c, 0x322b: 0x000c, 0x322c: 0x000c, - 0x3235: 0x000c, + 0x320f: 0x000a, // Block 0xc9, offset 0x3240 - 0x3244: 0x000c, - 0x325b: 0x000c, 0x325c: 0x000c, 0x325d: 0x000c, - 0x325e: 0x000c, 0x325f: 0x000c, 0x3261: 0x000c, 0x3262: 0x000c, 0x3263: 0x000c, - 0x3264: 0x000c, 0x3265: 0x000c, 0x3266: 0x000c, 0x3267: 0x000c, 0x3268: 0x000c, 0x3269: 0x000c, - 0x326a: 0x000c, 0x326b: 0x000c, 0x326c: 0x000c, 0x326d: 0x000c, 0x326e: 0x000c, 0x326f: 0x000c, + 0x3249: 0x000a, // Block 0xca, offset 0x3280 - 0x3280: 0x000c, 0x3281: 0x000c, 0x3282: 0x000c, 0x3283: 0x000c, 0x3284: 0x000c, 0x3285: 0x000c, - 0x3286: 0x000c, 0x3288: 0x000c, 0x3289: 0x000c, 0x328a: 0x000c, 0x328b: 0x000c, - 0x328c: 0x000c, 0x328d: 0x000c, 0x328e: 0x000c, 0x328f: 0x000c, 0x3290: 0x000c, 0x3291: 0x000c, - 0x3292: 0x000c, 0x3293: 0x000c, 0x3294: 0x000c, 0x3295: 0x000c, 0x3296: 0x000c, 0x3297: 0x000c, - 0x3298: 0x000c, 0x329b: 0x000c, 0x329c: 0x000c, 0x329d: 0x000c, - 0x329e: 0x000c, 0x329f: 0x000c, 0x32a0: 0x000c, 0x32a1: 0x000c, 0x32a3: 0x000c, - 0x32a4: 0x000c, 0x32a6: 0x000c, 0x32a7: 0x000c, 0x32a8: 0x000c, 0x32a9: 0x000c, - 0x32aa: 0x000c, + 0x3283: 0x000a, + 0x328e: 0x0002, 0x328f: 0x0002, 0x3290: 0x0002, 0x3291: 0x0002, + 0x3292: 0x0002, 0x3293: 0x0002, 0x3294: 0x0002, 0x3295: 0x0002, 0x3296: 0x0002, 0x3297: 0x0002, + 0x3298: 0x0002, 0x3299: 0x0002, 0x329a: 0x0002, 0x329b: 0x0002, 0x329c: 0x0002, 0x329d: 0x0002, + 0x329e: 0x0002, 0x329f: 0x0002, 0x32a0: 0x0002, 0x32a1: 0x0002, 0x32a2: 0x0002, 0x32a3: 0x0002, + 0x32a4: 0x0002, 0x32a5: 0x0002, 0x32a6: 0x0002, 0x32a7: 0x0002, 0x32a8: 0x0002, 0x32a9: 0x0002, + 0x32aa: 0x0002, 0x32ab: 0x0002, 0x32ac: 0x0002, 0x32ad: 0x0002, 0x32ae: 0x0002, 0x32af: 0x0002, + 0x32b0: 0x0002, 0x32b1: 0x0002, 0x32b2: 0x0002, 0x32b3: 0x0002, 0x32b4: 0x0002, 0x32b5: 0x0002, + 0x32b6: 0x0002, 0x32b7: 0x0002, 0x32b8: 0x0002, 0x32b9: 0x0002, 0x32ba: 0x0002, 0x32bb: 0x0002, + 0x32bc: 0x0002, 0x32bd: 0x0002, 0x32be: 0x0002, 0x32bf: 0x0002, // Block 0xcb, offset 0x32c0 - 0x32c0: 0x0001, 0x32c1: 0x0001, 0x32c2: 0x0001, 0x32c3: 0x0001, 0x32c4: 0x0001, 0x32c5: 0x0001, - 0x32c6: 0x0001, 0x32c7: 0x0001, 0x32c8: 0x0001, 0x32c9: 0x0001, 0x32ca: 0x0001, 0x32cb: 0x0001, - 0x32cc: 0x0001, 0x32cd: 0x0001, 0x32ce: 0x0001, 0x32cf: 0x0001, 0x32d0: 0x000c, 0x32d1: 0x000c, - 0x32d2: 0x000c, 0x32d3: 0x000c, 0x32d4: 0x000c, 0x32d5: 0x000c, 0x32d6: 0x000c, 0x32d7: 0x0001, - 0x32d8: 0x0001, 0x32d9: 0x0001, 0x32da: 0x0001, 0x32db: 0x0001, 0x32dc: 0x0001, 0x32dd: 0x0001, - 0x32de: 0x0001, 0x32df: 0x0001, 0x32e0: 0x0001, 0x32e1: 0x0001, 0x32e2: 0x0001, 0x32e3: 0x0001, - 0x32e4: 0x0001, 0x32e5: 0x0001, 0x32e6: 0x0001, 0x32e7: 0x0001, 0x32e8: 0x0001, 0x32e9: 0x0001, - 0x32ea: 0x0001, 0x32eb: 0x0001, 0x32ec: 0x0001, 0x32ed: 0x0001, 0x32ee: 0x0001, 0x32ef: 0x0001, - 0x32f0: 0x0001, 0x32f1: 0x0001, 0x32f2: 0x0001, 0x32f3: 0x0001, 0x32f4: 0x0001, 0x32f5: 0x0001, - 0x32f6: 0x0001, 0x32f7: 0x0001, 0x32f8: 0x0001, 0x32f9: 0x0001, 0x32fa: 0x0001, 0x32fb: 0x0001, - 0x32fc: 0x0001, 0x32fd: 0x0001, 0x32fe: 0x0001, 0x32ff: 0x0001, + 0x32c0: 0x000c, 0x32c1: 0x000c, 0x32c2: 0x000c, 0x32c3: 0x000c, 0x32c4: 0x000c, 0x32c5: 0x000c, + 0x32c6: 0x000c, 0x32c7: 0x000c, 0x32c8: 0x000c, 0x32c9: 0x000c, 0x32ca: 0x000c, 0x32cb: 0x000c, + 0x32cc: 0x000c, 0x32cd: 0x000c, 0x32ce: 0x000c, 0x32cf: 0x000c, 0x32d0: 0x000c, 0x32d1: 0x000c, + 0x32d2: 0x000c, 0x32d3: 0x000c, 0x32d4: 0x000c, 0x32d5: 0x000c, 0x32d6: 0x000c, 0x32d7: 0x000c, + 0x32d8: 0x000c, 0x32d9: 0x000c, 0x32da: 0x000c, 0x32db: 0x000c, 0x32dc: 0x000c, 0x32dd: 0x000c, + 0x32de: 0x000c, 0x32df: 0x000c, 0x32e0: 0x000c, 0x32e1: 0x000c, 0x32e2: 0x000c, 0x32e3: 0x000c, + 0x32e4: 0x000c, 0x32e5: 0x000c, 0x32e6: 0x000c, 0x32e7: 0x000c, 0x32e8: 0x000c, 0x32e9: 0x000c, + 0x32ea: 0x000c, 0x32eb: 0x000c, 0x32ec: 0x000c, 0x32ed: 0x000c, 0x32ee: 0x000c, 0x32ef: 0x000c, + 0x32f0: 0x000c, 0x32f1: 0x000c, 0x32f2: 0x000c, 0x32f3: 0x000c, 0x32f4: 0x000c, 0x32f5: 0x000c, + 0x32f6: 0x000c, 0x32fb: 0x000c, + 0x32fc: 0x000c, 0x32fd: 0x000c, 0x32fe: 0x000c, 0x32ff: 0x000c, // Block 0xcc, offset 0x3300 - 0x3300: 0x0001, 0x3301: 0x0001, 0x3302: 0x0001, 0x3303: 0x0001, 0x3304: 0x000c, 0x3305: 0x000c, - 0x3306: 0x000c, 0x3307: 0x000c, 0x3308: 0x000c, 0x3309: 0x000c, 0x330a: 0x000c, 0x330b: 0x0001, - 0x330c: 0x0001, 0x330d: 0x0001, 0x330e: 0x0001, 0x330f: 0x0001, 0x3310: 0x0001, 0x3311: 0x0001, - 0x3312: 0x0001, 0x3313: 0x0001, 0x3314: 0x0001, 0x3315: 0x0001, 0x3316: 0x0001, 0x3317: 0x0001, - 0x3318: 0x0001, 0x3319: 0x0001, 0x331a: 0x0001, 0x331b: 0x0001, 0x331c: 0x0001, 0x331d: 0x0001, - 0x331e: 0x0001, 0x331f: 0x0001, 0x3320: 0x0001, 0x3321: 0x0001, 0x3322: 0x0001, 0x3323: 0x0001, - 0x3324: 0x0001, 0x3325: 0x0001, 0x3326: 0x0001, 0x3327: 0x0001, 0x3328: 0x0001, 0x3329: 0x0001, - 0x332a: 0x0001, 0x332b: 0x0001, 0x332c: 0x0001, 0x332d: 0x0001, 0x332e: 0x0001, 0x332f: 0x0001, - 0x3330: 0x0001, 0x3331: 0x0001, 0x3332: 0x0001, 0x3333: 0x0001, 0x3334: 0x0001, 0x3335: 0x0001, - 0x3336: 0x0001, 0x3337: 0x0001, 0x3338: 0x0001, 0x3339: 0x0001, 0x333a: 0x0001, 0x333b: 0x0001, - 0x333c: 0x0001, 0x333d: 0x0001, 0x333e: 0x0001, 0x333f: 0x0001, + 0x3300: 0x000c, 0x3301: 0x000c, 0x3302: 0x000c, 0x3303: 0x000c, 0x3304: 0x000c, 0x3305: 0x000c, + 0x3306: 0x000c, 0x3307: 0x000c, 0x3308: 0x000c, 0x3309: 0x000c, 0x330a: 0x000c, 0x330b: 0x000c, + 0x330c: 0x000c, 0x330d: 0x000c, 0x330e: 0x000c, 0x330f: 0x000c, 0x3310: 0x000c, 0x3311: 0x000c, + 0x3312: 0x000c, 0x3313: 0x000c, 0x3314: 0x000c, 0x3315: 0x000c, 0x3316: 0x000c, 0x3317: 0x000c, + 0x3318: 0x000c, 0x3319: 0x000c, 0x331a: 0x000c, 0x331b: 0x000c, 0x331c: 0x000c, 0x331d: 0x000c, + 0x331e: 0x000c, 0x331f: 0x000c, 0x3320: 0x000c, 0x3321: 0x000c, 0x3322: 0x000c, 0x3323: 0x000c, + 0x3324: 0x000c, 0x3325: 0x000c, 0x3326: 0x000c, 0x3327: 0x000c, 0x3328: 0x000c, 0x3329: 0x000c, + 0x332a: 0x000c, 0x332b: 0x000c, 0x332c: 0x000c, + 0x3335: 0x000c, // Block 0xcd, offset 0x3340 - 0x3340: 0x000d, 0x3341: 0x000d, 0x3342: 0x000d, 0x3343: 0x000d, 0x3344: 0x000d, 0x3345: 0x000d, - 0x3346: 0x000d, 0x3347: 0x000d, 0x3348: 0x000d, 0x3349: 0x000d, 0x334a: 0x000d, 0x334b: 0x000d, - 0x334c: 0x000d, 0x334d: 0x000d, 0x334e: 0x000d, 0x334f: 0x000d, 0x3350: 0x000d, 0x3351: 0x000d, - 0x3352: 0x000d, 0x3353: 0x000d, 0x3354: 0x000d, 0x3355: 0x000d, 0x3356: 0x000d, 0x3357: 0x000d, - 0x3358: 0x000d, 0x3359: 0x000d, 0x335a: 0x000d, 0x335b: 0x000d, 0x335c: 0x000d, 0x335d: 0x000d, - 0x335e: 0x000d, 0x335f: 0x000d, 0x3360: 0x000d, 0x3361: 0x000d, 0x3362: 0x000d, 0x3363: 0x000d, - 0x3364: 0x000d, 0x3365: 0x000d, 0x3366: 0x000d, 0x3367: 0x000d, 0x3368: 0x000d, 0x3369: 0x000d, - 0x336a: 0x000d, 0x336b: 0x000d, 0x336c: 0x000d, 0x336d: 0x000d, 0x336e: 0x000d, 0x336f: 0x000d, - 0x3370: 0x000a, 0x3371: 0x000a, 0x3372: 0x000d, 0x3373: 0x000d, 0x3374: 0x000d, 0x3375: 0x000d, - 0x3376: 0x000d, 0x3377: 0x000d, 0x3378: 0x000d, 0x3379: 0x000d, 0x337a: 0x000d, 0x337b: 0x000d, - 0x337c: 0x000d, 0x337d: 0x000d, 0x337e: 0x000d, 0x337f: 0x000d, + 0x3344: 0x000c, + 0x335b: 0x000c, 0x335c: 0x000c, 0x335d: 0x000c, + 0x335e: 0x000c, 0x335f: 0x000c, 0x3361: 0x000c, 0x3362: 0x000c, 0x3363: 0x000c, + 0x3364: 0x000c, 0x3365: 0x000c, 0x3366: 0x000c, 0x3367: 0x000c, 0x3368: 0x000c, 0x3369: 0x000c, + 0x336a: 0x000c, 0x336b: 0x000c, 0x336c: 0x000c, 0x336d: 0x000c, 0x336e: 0x000c, 0x336f: 0x000c, // Block 0xce, offset 0x3380 - 0x3380: 0x000a, 0x3381: 0x000a, 0x3382: 0x000a, 0x3383: 0x000a, 0x3384: 0x000a, 0x3385: 0x000a, - 0x3386: 0x000a, 0x3387: 0x000a, 0x3388: 0x000a, 0x3389: 0x000a, 0x338a: 0x000a, 0x338b: 0x000a, - 0x338c: 0x000a, 0x338d: 0x000a, 0x338e: 0x000a, 0x338f: 0x000a, 0x3390: 0x000a, 0x3391: 0x000a, - 0x3392: 0x000a, 0x3393: 0x000a, 0x3394: 0x000a, 0x3395: 0x000a, 0x3396: 0x000a, 0x3397: 0x000a, - 0x3398: 0x000a, 0x3399: 0x000a, 0x339a: 0x000a, 0x339b: 0x000a, 0x339c: 0x000a, 0x339d: 0x000a, - 0x339e: 0x000a, 0x339f: 0x000a, 0x33a0: 0x000a, 0x33a1: 0x000a, 0x33a2: 0x000a, 0x33a3: 0x000a, - 0x33a4: 0x000a, 0x33a5: 0x000a, 0x33a6: 0x000a, 0x33a7: 0x000a, 0x33a8: 0x000a, 0x33a9: 0x000a, - 0x33aa: 0x000a, 0x33ab: 0x000a, - 0x33b0: 0x000a, 0x33b1: 0x000a, 0x33b2: 0x000a, 0x33b3: 0x000a, 0x33b4: 0x000a, 0x33b5: 0x000a, - 0x33b6: 0x000a, 0x33b7: 0x000a, 0x33b8: 0x000a, 0x33b9: 0x000a, 0x33ba: 0x000a, 0x33bb: 0x000a, - 0x33bc: 0x000a, 0x33bd: 0x000a, 0x33be: 0x000a, 0x33bf: 0x000a, + 0x3380: 0x000c, 0x3381: 0x000c, 0x3382: 0x000c, 0x3383: 0x000c, 0x3384: 0x000c, 0x3385: 0x000c, + 0x3386: 0x000c, 0x3388: 0x000c, 0x3389: 0x000c, 0x338a: 0x000c, 0x338b: 0x000c, + 0x338c: 0x000c, 0x338d: 0x000c, 0x338e: 0x000c, 0x338f: 0x000c, 0x3390: 0x000c, 0x3391: 0x000c, + 0x3392: 0x000c, 0x3393: 0x000c, 0x3394: 0x000c, 0x3395: 0x000c, 0x3396: 0x000c, 0x3397: 0x000c, + 0x3398: 0x000c, 0x339b: 0x000c, 0x339c: 0x000c, 0x339d: 0x000c, + 0x339e: 0x000c, 0x339f: 0x000c, 0x33a0: 0x000c, 0x33a1: 0x000c, 0x33a3: 0x000c, + 0x33a4: 0x000c, 0x33a6: 0x000c, 0x33a7: 0x000c, 0x33a8: 0x000c, 0x33a9: 0x000c, + 0x33aa: 0x000c, // Block 0xcf, offset 0x33c0 - 0x33c0: 0x000a, 0x33c1: 0x000a, 0x33c2: 0x000a, 0x33c3: 0x000a, 0x33c4: 0x000a, 0x33c5: 0x000a, - 0x33c6: 0x000a, 0x33c7: 0x000a, 0x33c8: 0x000a, 0x33c9: 0x000a, 0x33ca: 0x000a, 0x33cb: 0x000a, - 0x33cc: 0x000a, 0x33cd: 0x000a, 0x33ce: 0x000a, 0x33cf: 0x000a, 0x33d0: 0x000a, 0x33d1: 0x000a, - 0x33d2: 0x000a, 0x33d3: 0x000a, - 0x33e0: 0x000a, 0x33e1: 0x000a, 0x33e2: 0x000a, 0x33e3: 0x000a, - 0x33e4: 0x000a, 0x33e5: 0x000a, 0x33e6: 0x000a, 0x33e7: 0x000a, 0x33e8: 0x000a, 0x33e9: 0x000a, - 0x33ea: 0x000a, 0x33eb: 0x000a, 0x33ec: 0x000a, 0x33ed: 0x000a, 0x33ee: 0x000a, - 0x33f1: 0x000a, 0x33f2: 0x000a, 0x33f3: 0x000a, 0x33f4: 0x000a, 0x33f5: 0x000a, - 0x33f6: 0x000a, 0x33f7: 0x000a, 0x33f8: 0x000a, 0x33f9: 0x000a, 0x33fa: 0x000a, 0x33fb: 0x000a, - 0x33fc: 0x000a, 0x33fd: 0x000a, 0x33fe: 0x000a, 0x33ff: 0x000a, + 0x33c0: 0x0001, 0x33c1: 0x0001, 0x33c2: 0x0001, 0x33c3: 0x0001, 0x33c4: 0x0001, 0x33c5: 0x0001, + 0x33c6: 0x0001, 0x33c7: 0x0001, 0x33c8: 0x0001, 0x33c9: 0x0001, 0x33ca: 0x0001, 0x33cb: 0x0001, + 0x33cc: 0x0001, 0x33cd: 0x0001, 0x33ce: 0x0001, 0x33cf: 0x0001, 0x33d0: 0x000c, 0x33d1: 0x000c, + 0x33d2: 0x000c, 0x33d3: 0x000c, 0x33d4: 0x000c, 0x33d5: 0x000c, 0x33d6: 0x000c, 0x33d7: 0x0001, + 0x33d8: 0x0001, 0x33d9: 0x0001, 0x33da: 0x0001, 0x33db: 0x0001, 0x33dc: 0x0001, 0x33dd: 0x0001, + 0x33de: 0x0001, 0x33df: 0x0001, 0x33e0: 0x0001, 0x33e1: 0x0001, 0x33e2: 0x0001, 0x33e3: 0x0001, + 0x33e4: 0x0001, 0x33e5: 0x0001, 0x33e6: 0x0001, 0x33e7: 0x0001, 0x33e8: 0x0001, 0x33e9: 0x0001, + 0x33ea: 0x0001, 0x33eb: 0x0001, 0x33ec: 0x0001, 0x33ed: 0x0001, 0x33ee: 0x0001, 0x33ef: 0x0001, + 0x33f0: 0x0001, 0x33f1: 0x0001, 0x33f2: 0x0001, 0x33f3: 0x0001, 0x33f4: 0x0001, 0x33f5: 0x0001, + 0x33f6: 0x0001, 0x33f7: 0x0001, 0x33f8: 0x0001, 0x33f9: 0x0001, 0x33fa: 0x0001, 0x33fb: 0x0001, + 0x33fc: 0x0001, 0x33fd: 0x0001, 0x33fe: 0x0001, 0x33ff: 0x0001, // Block 0xd0, offset 0x3400 - 0x3401: 0x000a, 0x3402: 0x000a, 0x3403: 0x000a, 0x3404: 0x000a, 0x3405: 0x000a, - 0x3406: 0x000a, 0x3407: 0x000a, 0x3408: 0x000a, 0x3409: 0x000a, 0x340a: 0x000a, 0x340b: 0x000a, - 0x340c: 0x000a, 0x340d: 0x000a, 0x340e: 0x000a, 0x340f: 0x000a, 0x3411: 0x000a, - 0x3412: 0x000a, 0x3413: 0x000a, 0x3414: 0x000a, 0x3415: 0x000a, 0x3416: 0x000a, 0x3417: 0x000a, - 0x3418: 0x000a, 0x3419: 0x000a, 0x341a: 0x000a, 0x341b: 0x000a, 0x341c: 0x000a, 0x341d: 0x000a, - 0x341e: 0x000a, 0x341f: 0x000a, 0x3420: 0x000a, 0x3421: 0x000a, 0x3422: 0x000a, 0x3423: 0x000a, - 0x3424: 0x000a, 0x3425: 0x000a, 0x3426: 0x000a, 0x3427: 0x000a, 0x3428: 0x000a, 0x3429: 0x000a, - 0x342a: 0x000a, 0x342b: 0x000a, 0x342c: 0x000a, 0x342d: 0x000a, 0x342e: 0x000a, 0x342f: 0x000a, - 0x3430: 0x000a, 0x3431: 0x000a, 0x3432: 0x000a, 0x3433: 0x000a, 0x3434: 0x000a, 0x3435: 0x000a, + 0x3400: 0x0001, 0x3401: 0x0001, 0x3402: 0x0001, 0x3403: 0x0001, 0x3404: 0x000c, 0x3405: 0x000c, + 0x3406: 0x000c, 0x3407: 0x000c, 0x3408: 0x000c, 0x3409: 0x000c, 0x340a: 0x000c, 0x340b: 0x0001, + 0x340c: 0x0001, 0x340d: 0x0001, 0x340e: 0x0001, 0x340f: 0x0001, 0x3410: 0x0001, 0x3411: 0x0001, + 0x3412: 0x0001, 0x3413: 0x0001, 0x3414: 0x0001, 0x3415: 0x0001, 0x3416: 0x0001, 0x3417: 0x0001, + 0x3418: 0x0001, 0x3419: 0x0001, 0x341a: 0x0001, 0x341b: 0x0001, 0x341c: 0x0001, 0x341d: 0x0001, + 0x341e: 0x0001, 0x341f: 0x0001, 0x3420: 0x0001, 0x3421: 0x0001, 0x3422: 0x0001, 0x3423: 0x0001, + 0x3424: 0x0001, 0x3425: 0x0001, 0x3426: 0x0001, 0x3427: 0x0001, 0x3428: 0x0001, 0x3429: 0x0001, + 0x342a: 0x0001, 0x342b: 0x0001, 0x342c: 0x0001, 0x342d: 0x0001, 0x342e: 0x0001, 0x342f: 0x0001, + 0x3430: 0x0001, 0x3431: 0x0001, 0x3432: 0x0001, 0x3433: 0x0001, 0x3434: 0x0001, 0x3435: 0x0001, + 0x3436: 0x0001, 0x3437: 0x0001, 0x3438: 0x0001, 0x3439: 0x0001, 0x343a: 0x0001, 0x343b: 0x0001, + 0x343c: 0x0001, 0x343d: 0x0001, 0x343e: 0x0001, 0x343f: 0x0001, // Block 0xd1, offset 0x3440 - 0x3440: 0x0002, 0x3441: 0x0002, 0x3442: 0x0002, 0x3443: 0x0002, 0x3444: 0x0002, 0x3445: 0x0002, - 0x3446: 0x0002, 0x3447: 0x0002, 0x3448: 0x0002, 0x3449: 0x0002, 0x344a: 0x0002, 0x344b: 0x000a, - 0x344c: 0x000a, + 0x3440: 0x000d, 0x3441: 0x000d, 0x3442: 0x000d, 0x3443: 0x000d, 0x3444: 0x000d, 0x3445: 0x000d, + 0x3446: 0x000d, 0x3447: 0x000d, 0x3448: 0x000d, 0x3449: 0x000d, 0x344a: 0x000d, 0x344b: 0x000d, + 0x344c: 0x000d, 0x344d: 0x000d, 0x344e: 0x000d, 0x344f: 0x000d, 0x3450: 0x000d, 0x3451: 0x000d, + 0x3452: 0x000d, 0x3453: 0x000d, 0x3454: 0x000d, 0x3455: 0x000d, 0x3456: 0x000d, 0x3457: 0x000d, + 0x3458: 0x000d, 0x3459: 0x000d, 0x345a: 0x000d, 0x345b: 0x000d, 0x345c: 0x000d, 0x345d: 0x000d, + 0x345e: 0x000d, 0x345f: 0x000d, 0x3460: 0x000d, 0x3461: 0x000d, 0x3462: 0x000d, 0x3463: 0x000d, + 0x3464: 0x000d, 0x3465: 0x000d, 0x3466: 0x000d, 0x3467: 0x000d, 0x3468: 0x000d, 0x3469: 0x000d, + 0x346a: 0x000d, 0x346b: 0x000d, 0x346c: 0x000d, 0x346d: 0x000d, 0x346e: 0x000d, 0x346f: 0x000d, + 0x3470: 0x000a, 0x3471: 0x000a, 0x3472: 0x000d, 0x3473: 0x000d, 0x3474: 0x000d, 0x3475: 0x000d, + 0x3476: 0x000d, 0x3477: 0x000d, 0x3478: 0x000d, 0x3479: 0x000d, 0x347a: 0x000d, 0x347b: 0x000d, + 0x347c: 0x000d, 0x347d: 0x000d, 0x347e: 0x000d, 0x347f: 0x000d, // Block 0xd2, offset 0x3480 + 0x3480: 0x000a, 0x3481: 0x000a, 0x3482: 0x000a, 0x3483: 0x000a, 0x3484: 0x000a, 0x3485: 0x000a, + 0x3486: 0x000a, 0x3487: 0x000a, 0x3488: 0x000a, 0x3489: 0x000a, 0x348a: 0x000a, 0x348b: 0x000a, + 0x348c: 0x000a, 0x348d: 0x000a, 0x348e: 0x000a, 0x348f: 0x000a, 0x3490: 0x000a, 0x3491: 0x000a, + 0x3492: 0x000a, 0x3493: 0x000a, 0x3494: 0x000a, 0x3495: 0x000a, 0x3496: 0x000a, 0x3497: 0x000a, + 0x3498: 0x000a, 0x3499: 0x000a, 0x349a: 0x000a, 0x349b: 0x000a, 0x349c: 0x000a, 0x349d: 0x000a, + 0x349e: 0x000a, 0x349f: 0x000a, 0x34a0: 0x000a, 0x34a1: 0x000a, 0x34a2: 0x000a, 0x34a3: 0x000a, + 0x34a4: 0x000a, 0x34a5: 0x000a, 0x34a6: 0x000a, 0x34a7: 0x000a, 0x34a8: 0x000a, 0x34a9: 0x000a, 0x34aa: 0x000a, 0x34ab: 0x000a, + 0x34b0: 0x000a, 0x34b1: 0x000a, 0x34b2: 0x000a, 0x34b3: 0x000a, 0x34b4: 0x000a, 0x34b5: 0x000a, + 0x34b6: 0x000a, 0x34b7: 0x000a, 0x34b8: 0x000a, 0x34b9: 0x000a, 0x34ba: 0x000a, 0x34bb: 0x000a, + 0x34bc: 0x000a, 0x34bd: 0x000a, 0x34be: 0x000a, 0x34bf: 0x000a, // Block 0xd3, offset 0x34c0 0x34c0: 0x000a, 0x34c1: 0x000a, 0x34c2: 0x000a, 0x34c3: 0x000a, 0x34c4: 0x000a, 0x34c5: 0x000a, 0x34c6: 0x000a, 0x34c7: 0x000a, 0x34c8: 0x000a, 0x34c9: 0x000a, 0x34ca: 0x000a, 0x34cb: 0x000a, 0x34cc: 0x000a, 0x34cd: 0x000a, 0x34ce: 0x000a, 0x34cf: 0x000a, 0x34d0: 0x000a, 0x34d1: 0x000a, - 0x34d2: 0x000a, + 0x34d2: 0x000a, 0x34d3: 0x000a, 0x34e0: 0x000a, 0x34e1: 0x000a, 0x34e2: 0x000a, 0x34e3: 0x000a, 0x34e4: 0x000a, 0x34e5: 0x000a, 0x34e6: 0x000a, 0x34e7: 0x000a, 0x34e8: 0x000a, 0x34e9: 0x000a, - 0x34ea: 0x000a, 0x34eb: 0x000a, 0x34ec: 0x000a, - 0x34f0: 0x000a, 0x34f1: 0x000a, 0x34f2: 0x000a, 0x34f3: 0x000a, 0x34f4: 0x000a, 0x34f5: 0x000a, - 0x34f6: 0x000a, + 0x34ea: 0x000a, 0x34eb: 0x000a, 0x34ec: 0x000a, 0x34ed: 0x000a, 0x34ee: 0x000a, + 0x34f1: 0x000a, 0x34f2: 0x000a, 0x34f3: 0x000a, 0x34f4: 0x000a, 0x34f5: 0x000a, + 0x34f6: 0x000a, 0x34f7: 0x000a, 0x34f8: 0x000a, 0x34f9: 0x000a, 0x34fa: 0x000a, 0x34fb: 0x000a, + 0x34fc: 0x000a, 0x34fd: 0x000a, 0x34fe: 0x000a, 0x34ff: 0x000a, // Block 0xd4, offset 0x3500 - 0x3500: 0x000a, 0x3501: 0x000a, 0x3502: 0x000a, 0x3503: 0x000a, 0x3504: 0x000a, 0x3505: 0x000a, + 0x3501: 0x000a, 0x3502: 0x000a, 0x3503: 0x000a, 0x3504: 0x000a, 0x3505: 0x000a, 0x3506: 0x000a, 0x3507: 0x000a, 0x3508: 0x000a, 0x3509: 0x000a, 0x350a: 0x000a, 0x350b: 0x000a, - 0x350c: 0x000a, 0x350d: 0x000a, 0x350e: 0x000a, 0x350f: 0x000a, 0x3510: 0x000a, 0x3511: 0x000a, - 0x3512: 0x000a, 0x3513: 0x000a, 0x3514: 0x000a, + 0x350c: 0x000a, 0x350d: 0x000a, 0x350e: 0x000a, 0x350f: 0x000a, 0x3511: 0x000a, + 0x3512: 0x000a, 0x3513: 0x000a, 0x3514: 0x000a, 0x3515: 0x000a, 0x3516: 0x000a, 0x3517: 0x000a, + 0x3518: 0x000a, 0x3519: 0x000a, 0x351a: 0x000a, 0x351b: 0x000a, 0x351c: 0x000a, 0x351d: 0x000a, + 0x351e: 0x000a, 0x351f: 0x000a, 0x3520: 0x000a, 0x3521: 0x000a, 0x3522: 0x000a, 0x3523: 0x000a, + 0x3524: 0x000a, 0x3525: 0x000a, 0x3526: 0x000a, 0x3527: 0x000a, 0x3528: 0x000a, 0x3529: 0x000a, + 0x352a: 0x000a, 0x352b: 0x000a, 0x352c: 0x000a, 0x352d: 0x000a, 0x352e: 0x000a, 0x352f: 0x000a, + 0x3530: 0x000a, 0x3531: 0x000a, 0x3532: 0x000a, 0x3533: 0x000a, 0x3534: 0x000a, 0x3535: 0x000a, // Block 0xd5, offset 0x3540 - 0x3540: 0x000a, 0x3541: 0x000a, 0x3542: 0x000a, 0x3543: 0x000a, 0x3544: 0x000a, 0x3545: 0x000a, - 0x3546: 0x000a, 0x3547: 0x000a, 0x3548: 0x000a, 0x3549: 0x000a, 0x354a: 0x000a, 0x354b: 0x000a, - 0x3550: 0x000a, 0x3551: 0x000a, - 0x3552: 0x000a, 0x3553: 0x000a, 0x3554: 0x000a, 0x3555: 0x000a, 0x3556: 0x000a, 0x3557: 0x000a, - 0x3558: 0x000a, 0x3559: 0x000a, 0x355a: 0x000a, 0x355b: 0x000a, 0x355c: 0x000a, 0x355d: 0x000a, - 0x355e: 0x000a, 0x355f: 0x000a, 0x3560: 0x000a, 0x3561: 0x000a, 0x3562: 0x000a, 0x3563: 0x000a, - 0x3564: 0x000a, 0x3565: 0x000a, 0x3566: 0x000a, 0x3567: 0x000a, 0x3568: 0x000a, 0x3569: 0x000a, - 0x356a: 0x000a, 0x356b: 0x000a, 0x356c: 0x000a, 0x356d: 0x000a, 0x356e: 0x000a, 0x356f: 0x000a, - 0x3570: 0x000a, 0x3571: 0x000a, 0x3572: 0x000a, 0x3573: 0x000a, 0x3574: 0x000a, 0x3575: 0x000a, - 0x3576: 0x000a, 0x3577: 0x000a, 0x3578: 0x000a, 0x3579: 0x000a, 0x357a: 0x000a, 0x357b: 0x000a, - 0x357c: 0x000a, 0x357d: 0x000a, 0x357e: 0x000a, 0x357f: 0x000a, + 0x3540: 0x0002, 0x3541: 0x0002, 0x3542: 0x0002, 0x3543: 0x0002, 0x3544: 0x0002, 0x3545: 0x0002, + 0x3546: 0x0002, 0x3547: 0x0002, 0x3548: 0x0002, 0x3549: 0x0002, 0x354a: 0x0002, 0x354b: 0x000a, + 0x354c: 0x000a, // Block 0xd6, offset 0x3580 - 0x3580: 0x000a, 0x3581: 0x000a, 0x3582: 0x000a, 0x3583: 0x000a, 0x3584: 0x000a, 0x3585: 0x000a, - 0x3586: 0x000a, 0x3587: 0x000a, - 0x3590: 0x000a, 0x3591: 0x000a, - 0x3592: 0x000a, 0x3593: 0x000a, 0x3594: 0x000a, 0x3595: 0x000a, 0x3596: 0x000a, 0x3597: 0x000a, - 0x3598: 0x000a, 0x3599: 0x000a, - 0x35a0: 0x000a, 0x35a1: 0x000a, 0x35a2: 0x000a, 0x35a3: 0x000a, - 0x35a4: 0x000a, 0x35a5: 0x000a, 0x35a6: 0x000a, 0x35a7: 0x000a, 0x35a8: 0x000a, 0x35a9: 0x000a, - 0x35aa: 0x000a, 0x35ab: 0x000a, 0x35ac: 0x000a, 0x35ad: 0x000a, 0x35ae: 0x000a, 0x35af: 0x000a, - 0x35b0: 0x000a, 0x35b1: 0x000a, 0x35b2: 0x000a, 0x35b3: 0x000a, 0x35b4: 0x000a, 0x35b5: 0x000a, - 0x35b6: 0x000a, 0x35b7: 0x000a, 0x35b8: 0x000a, 0x35b9: 0x000a, 0x35ba: 0x000a, 0x35bb: 0x000a, - 0x35bc: 0x000a, 0x35bd: 0x000a, 0x35be: 0x000a, 0x35bf: 0x000a, + 0x35aa: 0x000a, 0x35ab: 0x000a, // Block 0xd7, offset 0x35c0 - 0x35c0: 0x000a, 0x35c1: 0x000a, 0x35c2: 0x000a, 0x35c3: 0x000a, 0x35c4: 0x000a, 0x35c5: 0x000a, - 0x35c6: 0x000a, 0x35c7: 0x000a, - 0x35d0: 0x000a, 0x35d1: 0x000a, - 0x35d2: 0x000a, 0x35d3: 0x000a, 0x35d4: 0x000a, 0x35d5: 0x000a, 0x35d6: 0x000a, 0x35d7: 0x000a, - 0x35d8: 0x000a, 0x35d9: 0x000a, 0x35da: 0x000a, 0x35db: 0x000a, 0x35dc: 0x000a, 0x35dd: 0x000a, - 0x35de: 0x000a, 0x35df: 0x000a, 0x35e0: 0x000a, 0x35e1: 0x000a, 0x35e2: 0x000a, 0x35e3: 0x000a, - 0x35e4: 0x000a, 0x35e5: 0x000a, 0x35e6: 0x000a, 0x35e7: 0x000a, 0x35e8: 0x000a, 0x35e9: 0x000a, - 0x35ea: 0x000a, 0x35eb: 0x000a, 0x35ec: 0x000a, 0x35ed: 0x000a, + 0x35e0: 0x000a, 0x35e1: 0x000a, 0x35e2: 0x000a, 0x35e3: 0x000a, + 0x35e4: 0x000a, 0x35e5: 0x000a, // Block 0xd8, offset 0x3600 - 0x3610: 0x000a, 0x3611: 0x000a, - 0x3612: 0x000a, 0x3613: 0x000a, 0x3614: 0x000a, 0x3615: 0x000a, 0x3616: 0x000a, 0x3617: 0x000a, - 0x3618: 0x000a, 0x3619: 0x000a, 0x361a: 0x000a, 0x361b: 0x000a, 0x361c: 0x000a, 0x361d: 0x000a, - 0x361e: 0x000a, 0x3620: 0x000a, 0x3621: 0x000a, 0x3622: 0x000a, 0x3623: 0x000a, - 0x3624: 0x000a, 0x3625: 0x000a, 0x3626: 0x000a, 0x3627: 0x000a, - 0x3630: 0x000a, 0x3633: 0x000a, 0x3634: 0x000a, 0x3635: 0x000a, - 0x3636: 0x000a, 0x3637: 0x000a, 0x3638: 0x000a, 0x3639: 0x000a, 0x363a: 0x000a, 0x363b: 0x000a, - 0x363c: 0x000a, 0x363d: 0x000a, 0x363e: 0x000a, + 0x3600: 0x000a, 0x3601: 0x000a, 0x3602: 0x000a, 0x3603: 0x000a, 0x3604: 0x000a, 0x3605: 0x000a, + 0x3606: 0x000a, 0x3607: 0x000a, 0x3608: 0x000a, 0x3609: 0x000a, 0x360a: 0x000a, 0x360b: 0x000a, + 0x360c: 0x000a, 0x360d: 0x000a, 0x360e: 0x000a, 0x360f: 0x000a, 0x3610: 0x000a, 0x3611: 0x000a, + 0x3612: 0x000a, 0x3613: 0x000a, 0x3614: 0x000a, + 0x3620: 0x000a, 0x3621: 0x000a, 0x3622: 0x000a, 0x3623: 0x000a, + 0x3624: 0x000a, 0x3625: 0x000a, 0x3626: 0x000a, 0x3627: 0x000a, 0x3628: 0x000a, 0x3629: 0x000a, + 0x362a: 0x000a, 0x362b: 0x000a, 0x362c: 0x000a, + 0x3630: 0x000a, 0x3631: 0x000a, 0x3632: 0x000a, 0x3633: 0x000a, 0x3634: 0x000a, 0x3635: 0x000a, + 0x3636: 0x000a, 0x3637: 0x000a, 0x3638: 0x000a, // Block 0xd9, offset 0x3640 0x3640: 0x000a, 0x3641: 0x000a, 0x3642: 0x000a, 0x3643: 0x000a, 0x3644: 0x000a, 0x3645: 0x000a, 0x3646: 0x000a, 0x3647: 0x000a, 0x3648: 0x000a, 0x3649: 0x000a, 0x364a: 0x000a, 0x364b: 0x000a, - 0x3650: 0x000a, 0x3651: 0x000a, - 0x3652: 0x000a, 0x3653: 0x000a, 0x3654: 0x000a, 0x3655: 0x000a, 0x3656: 0x000a, 0x3657: 0x000a, - 0x3658: 0x000a, 0x3659: 0x000a, 0x365a: 0x000a, 0x365b: 0x000a, 0x365c: 0x000a, 0x365d: 0x000a, - 0x365e: 0x000a, + 0x364c: 0x000a, 0x364d: 0x000a, 0x364e: 0x000a, 0x364f: 0x000a, 0x3650: 0x000a, 0x3651: 0x000a, + 0x3652: 0x000a, 0x3653: 0x000a, 0x3654: 0x000a, // Block 0xda, offset 0x3680 0x3680: 0x000a, 0x3681: 0x000a, 0x3682: 0x000a, 0x3683: 0x000a, 0x3684: 0x000a, 0x3685: 0x000a, 0x3686: 0x000a, 0x3687: 0x000a, 0x3688: 0x000a, 0x3689: 0x000a, 0x368a: 0x000a, 0x368b: 0x000a, - 0x368c: 0x000a, 0x368d: 0x000a, 0x368e: 0x000a, 0x368f: 0x000a, 0x3690: 0x000a, 0x3691: 0x000a, + 0x3690: 0x000a, 0x3691: 0x000a, + 0x3692: 0x000a, 0x3693: 0x000a, 0x3694: 0x000a, 0x3695: 0x000a, 0x3696: 0x000a, 0x3697: 0x000a, + 0x3698: 0x000a, 0x3699: 0x000a, 0x369a: 0x000a, 0x369b: 0x000a, 0x369c: 0x000a, 0x369d: 0x000a, + 0x369e: 0x000a, 0x369f: 0x000a, 0x36a0: 0x000a, 0x36a1: 0x000a, 0x36a2: 0x000a, 0x36a3: 0x000a, + 0x36a4: 0x000a, 0x36a5: 0x000a, 0x36a6: 0x000a, 0x36a7: 0x000a, 0x36a8: 0x000a, 0x36a9: 0x000a, + 0x36aa: 0x000a, 0x36ab: 0x000a, 0x36ac: 0x000a, 0x36ad: 0x000a, 0x36ae: 0x000a, 0x36af: 0x000a, + 0x36b0: 0x000a, 0x36b1: 0x000a, 0x36b2: 0x000a, 0x36b3: 0x000a, 0x36b4: 0x000a, 0x36b5: 0x000a, + 0x36b6: 0x000a, 0x36b7: 0x000a, 0x36b8: 0x000a, 0x36b9: 0x000a, 0x36ba: 0x000a, 0x36bb: 0x000a, + 0x36bc: 0x000a, 0x36bd: 0x000a, 0x36be: 0x000a, 0x36bf: 0x000a, // Block 0xdb, offset 0x36c0 - 0x36fe: 0x000b, 0x36ff: 0x000b, + 0x36c0: 0x000a, 0x36c1: 0x000a, 0x36c2: 0x000a, 0x36c3: 0x000a, 0x36c4: 0x000a, 0x36c5: 0x000a, + 0x36c6: 0x000a, 0x36c7: 0x000a, + 0x36d0: 0x000a, 0x36d1: 0x000a, + 0x36d2: 0x000a, 0x36d3: 0x000a, 0x36d4: 0x000a, 0x36d5: 0x000a, 0x36d6: 0x000a, 0x36d7: 0x000a, + 0x36d8: 0x000a, 0x36d9: 0x000a, + 0x36e0: 0x000a, 0x36e1: 0x000a, 0x36e2: 0x000a, 0x36e3: 0x000a, + 0x36e4: 0x000a, 0x36e5: 0x000a, 0x36e6: 0x000a, 0x36e7: 0x000a, 0x36e8: 0x000a, 0x36e9: 0x000a, + 0x36ea: 0x000a, 0x36eb: 0x000a, 0x36ec: 0x000a, 0x36ed: 0x000a, 0x36ee: 0x000a, 0x36ef: 0x000a, + 0x36f0: 0x000a, 0x36f1: 0x000a, 0x36f2: 0x000a, 0x36f3: 0x000a, 0x36f4: 0x000a, 0x36f5: 0x000a, + 0x36f6: 0x000a, 0x36f7: 0x000a, 0x36f8: 0x000a, 0x36f9: 0x000a, 0x36fa: 0x000a, 0x36fb: 0x000a, + 0x36fc: 0x000a, 0x36fd: 0x000a, 0x36fe: 0x000a, 0x36ff: 0x000a, // Block 0xdc, offset 0x3700 - 0x3700: 0x000b, 0x3701: 0x000b, 0x3702: 0x000b, 0x3703: 0x000b, 0x3704: 0x000b, 0x3705: 0x000b, - 0x3706: 0x000b, 0x3707: 0x000b, 0x3708: 0x000b, 0x3709: 0x000b, 0x370a: 0x000b, 0x370b: 0x000b, - 0x370c: 0x000b, 0x370d: 0x000b, 0x370e: 0x000b, 0x370f: 0x000b, 0x3710: 0x000b, 0x3711: 0x000b, - 0x3712: 0x000b, 0x3713: 0x000b, 0x3714: 0x000b, 0x3715: 0x000b, 0x3716: 0x000b, 0x3717: 0x000b, - 0x3718: 0x000b, 0x3719: 0x000b, 0x371a: 0x000b, 0x371b: 0x000b, 0x371c: 0x000b, 0x371d: 0x000b, - 0x371e: 0x000b, 0x371f: 0x000b, 0x3720: 0x000b, 0x3721: 0x000b, 0x3722: 0x000b, 0x3723: 0x000b, - 0x3724: 0x000b, 0x3725: 0x000b, 0x3726: 0x000b, 0x3727: 0x000b, 0x3728: 0x000b, 0x3729: 0x000b, - 0x372a: 0x000b, 0x372b: 0x000b, 0x372c: 0x000b, 0x372d: 0x000b, 0x372e: 0x000b, 0x372f: 0x000b, - 0x3730: 0x000b, 0x3731: 0x000b, 0x3732: 0x000b, 0x3733: 0x000b, 0x3734: 0x000b, 0x3735: 0x000b, - 0x3736: 0x000b, 0x3737: 0x000b, 0x3738: 0x000b, 0x3739: 0x000b, 0x373a: 0x000b, 0x373b: 0x000b, - 0x373c: 0x000b, 0x373d: 0x000b, 0x373e: 0x000b, 0x373f: 0x000b, + 0x3700: 0x000a, 0x3701: 0x000a, 0x3702: 0x000a, 0x3703: 0x000a, 0x3704: 0x000a, 0x3705: 0x000a, + 0x3706: 0x000a, 0x3707: 0x000a, + 0x3710: 0x000a, 0x3711: 0x000a, + 0x3712: 0x000a, 0x3713: 0x000a, 0x3714: 0x000a, 0x3715: 0x000a, 0x3716: 0x000a, 0x3717: 0x000a, + 0x3718: 0x000a, 0x3719: 0x000a, 0x371a: 0x000a, 0x371b: 0x000a, 0x371c: 0x000a, 0x371d: 0x000a, + 0x371e: 0x000a, 0x371f: 0x000a, 0x3720: 0x000a, 0x3721: 0x000a, 0x3722: 0x000a, 0x3723: 0x000a, + 0x3724: 0x000a, 0x3725: 0x000a, 0x3726: 0x000a, 0x3727: 0x000a, 0x3728: 0x000a, 0x3729: 0x000a, + 0x372a: 0x000a, 0x372b: 0x000a, 0x372c: 0x000a, 0x372d: 0x000a, // Block 0xdd, offset 0x3740 - 0x3740: 0x000c, 0x3741: 0x000c, 0x3742: 0x000c, 0x3743: 0x000c, 0x3744: 0x000c, 0x3745: 0x000c, - 0x3746: 0x000c, 0x3747: 0x000c, 0x3748: 0x000c, 0x3749: 0x000c, 0x374a: 0x000c, 0x374b: 0x000c, - 0x374c: 0x000c, 0x374d: 0x000c, 0x374e: 0x000c, 0x374f: 0x000c, 0x3750: 0x000c, 0x3751: 0x000c, - 0x3752: 0x000c, 0x3753: 0x000c, 0x3754: 0x000c, 0x3755: 0x000c, 0x3756: 0x000c, 0x3757: 0x000c, - 0x3758: 0x000c, 0x3759: 0x000c, 0x375a: 0x000c, 0x375b: 0x000c, 0x375c: 0x000c, 0x375d: 0x000c, - 0x375e: 0x000c, 0x375f: 0x000c, 0x3760: 0x000c, 0x3761: 0x000c, 0x3762: 0x000c, 0x3763: 0x000c, - 0x3764: 0x000c, 0x3765: 0x000c, 0x3766: 0x000c, 0x3767: 0x000c, 0x3768: 0x000c, 0x3769: 0x000c, - 0x376a: 0x000c, 0x376b: 0x000c, 0x376c: 0x000c, 0x376d: 0x000c, 0x376e: 0x000c, 0x376f: 0x000c, - 0x3770: 0x000b, 0x3771: 0x000b, 0x3772: 0x000b, 0x3773: 0x000b, 0x3774: 0x000b, 0x3775: 0x000b, - 0x3776: 0x000b, 0x3777: 0x000b, 0x3778: 0x000b, 0x3779: 0x000b, 0x377a: 0x000b, 0x377b: 0x000b, - 0x377c: 0x000b, 0x377d: 0x000b, 0x377e: 0x000b, 0x377f: 0x000b, + 0x3740: 0x000a, 0x3741: 0x000a, 0x3742: 0x000a, 0x3743: 0x000a, 0x3744: 0x000a, 0x3745: 0x000a, + 0x3746: 0x000a, 0x3747: 0x000a, 0x3748: 0x000a, 0x3749: 0x000a, 0x374a: 0x000a, 0x374b: 0x000a, + 0x3750: 0x000a, 0x3751: 0x000a, + 0x3752: 0x000a, 0x3753: 0x000a, 0x3754: 0x000a, 0x3755: 0x000a, 0x3756: 0x000a, 0x3757: 0x000a, + 0x3758: 0x000a, 0x3759: 0x000a, 0x375a: 0x000a, 0x375b: 0x000a, 0x375c: 0x000a, 0x375d: 0x000a, + 0x375e: 0x000a, 0x375f: 0x000a, 0x3760: 0x000a, 0x3761: 0x000a, 0x3762: 0x000a, 0x3763: 0x000a, + 0x3764: 0x000a, 0x3765: 0x000a, 0x3766: 0x000a, 0x3767: 0x000a, 0x3768: 0x000a, 0x3769: 0x000a, + 0x376a: 0x000a, 0x376b: 0x000a, 0x376c: 0x000a, 0x376d: 0x000a, 0x376e: 0x000a, 0x376f: 0x000a, + 0x3770: 0x000a, 0x3771: 0x000a, 0x3772: 0x000a, 0x3773: 0x000a, 0x3774: 0x000a, 0x3775: 0x000a, + 0x3776: 0x000a, 0x3777: 0x000a, 0x3778: 0x000a, 0x3779: 0x000a, 0x377a: 0x000a, 0x377b: 0x000a, + 0x377c: 0x000a, 0x377d: 0x000a, 0x377e: 0x000a, + // Block 0xde, offset 0x3780 + 0x3780: 0x000a, 0x3781: 0x000a, 0x3782: 0x000a, 0x3783: 0x000a, 0x3784: 0x000a, 0x3785: 0x000a, + 0x3786: 0x000a, 0x3787: 0x000a, 0x3788: 0x000a, 0x3789: 0x000a, 0x378a: 0x000a, 0x378b: 0x000a, + 0x378c: 0x000a, 0x3790: 0x000a, 0x3791: 0x000a, + 0x3792: 0x000a, 0x3793: 0x000a, 0x3794: 0x000a, 0x3795: 0x000a, 0x3796: 0x000a, 0x3797: 0x000a, + 0x3798: 0x000a, 0x3799: 0x000a, 0x379a: 0x000a, 0x379b: 0x000a, 0x379c: 0x000a, 0x379d: 0x000a, + 0x379e: 0x000a, 0x379f: 0x000a, 0x37a0: 0x000a, 0x37a1: 0x000a, 0x37a2: 0x000a, 0x37a3: 0x000a, + 0x37a4: 0x000a, 0x37a5: 0x000a, 0x37a6: 0x000a, 0x37a7: 0x000a, 0x37a8: 0x000a, 0x37a9: 0x000a, + 0x37aa: 0x000a, 0x37ab: 0x000a, + // Block 0xdf, offset 0x37c0 + 0x37c0: 0x000a, 0x37c1: 0x000a, 0x37c2: 0x000a, 0x37c3: 0x000a, 0x37c4: 0x000a, 0x37c5: 0x000a, + 0x37c6: 0x000a, 0x37c7: 0x000a, 0x37c8: 0x000a, 0x37c9: 0x000a, 0x37ca: 0x000a, 0x37cb: 0x000a, + 0x37cc: 0x000a, 0x37cd: 0x000a, 0x37ce: 0x000a, 0x37cf: 0x000a, 0x37d0: 0x000a, 0x37d1: 0x000a, + 0x37d2: 0x000a, 0x37d3: 0x000a, 0x37d4: 0x000a, 0x37d5: 0x000a, 0x37d6: 0x000a, 0x37d7: 0x000a, + // Block 0xe0, offset 0x3800 + 0x3800: 0x000a, + 0x3810: 0x000a, 0x3811: 0x000a, + 0x3812: 0x000a, 0x3813: 0x000a, 0x3814: 0x000a, 0x3815: 0x000a, 0x3816: 0x000a, 0x3817: 0x000a, + 0x3818: 0x000a, 0x3819: 0x000a, 0x381a: 0x000a, 0x381b: 0x000a, 0x381c: 0x000a, 0x381d: 0x000a, + 0x381e: 0x000a, 0x381f: 0x000a, 0x3820: 0x000a, 0x3821: 0x000a, 0x3822: 0x000a, 0x3823: 0x000a, + 0x3824: 0x000a, 0x3825: 0x000a, 0x3826: 0x000a, + // Block 0xe1, offset 0x3840 + 0x387e: 0x000b, 0x387f: 0x000b, + // Block 0xe2, offset 0x3880 + 0x3880: 0x000b, 0x3881: 0x000b, 0x3882: 0x000b, 0x3883: 0x000b, 0x3884: 0x000b, 0x3885: 0x000b, + 0x3886: 0x000b, 0x3887: 0x000b, 0x3888: 0x000b, 0x3889: 0x000b, 0x388a: 0x000b, 0x388b: 0x000b, + 0x388c: 0x000b, 0x388d: 0x000b, 0x388e: 0x000b, 0x388f: 0x000b, 0x3890: 0x000b, 0x3891: 0x000b, + 0x3892: 0x000b, 0x3893: 0x000b, 0x3894: 0x000b, 0x3895: 0x000b, 0x3896: 0x000b, 0x3897: 0x000b, + 0x3898: 0x000b, 0x3899: 0x000b, 0x389a: 0x000b, 0x389b: 0x000b, 0x389c: 0x000b, 0x389d: 0x000b, + 0x389e: 0x000b, 0x389f: 0x000b, 0x38a0: 0x000b, 0x38a1: 0x000b, 0x38a2: 0x000b, 0x38a3: 0x000b, + 0x38a4: 0x000b, 0x38a5: 0x000b, 0x38a6: 0x000b, 0x38a7: 0x000b, 0x38a8: 0x000b, 0x38a9: 0x000b, + 0x38aa: 0x000b, 0x38ab: 0x000b, 0x38ac: 0x000b, 0x38ad: 0x000b, 0x38ae: 0x000b, 0x38af: 0x000b, + 0x38b0: 0x000b, 0x38b1: 0x000b, 0x38b2: 0x000b, 0x38b3: 0x000b, 0x38b4: 0x000b, 0x38b5: 0x000b, + 0x38b6: 0x000b, 0x38b7: 0x000b, 0x38b8: 0x000b, 0x38b9: 0x000b, 0x38ba: 0x000b, 0x38bb: 0x000b, + 0x38bc: 0x000b, 0x38bd: 0x000b, 0x38be: 0x000b, 0x38bf: 0x000b, + // Block 0xe3, offset 0x38c0 + 0x38c0: 0x000c, 0x38c1: 0x000c, 0x38c2: 0x000c, 0x38c3: 0x000c, 0x38c4: 0x000c, 0x38c5: 0x000c, + 0x38c6: 0x000c, 0x38c7: 0x000c, 0x38c8: 0x000c, 0x38c9: 0x000c, 0x38ca: 0x000c, 0x38cb: 0x000c, + 0x38cc: 0x000c, 0x38cd: 0x000c, 0x38ce: 0x000c, 0x38cf: 0x000c, 0x38d0: 0x000c, 0x38d1: 0x000c, + 0x38d2: 0x000c, 0x38d3: 0x000c, 0x38d4: 0x000c, 0x38d5: 0x000c, 0x38d6: 0x000c, 0x38d7: 0x000c, + 0x38d8: 0x000c, 0x38d9: 0x000c, 0x38da: 0x000c, 0x38db: 0x000c, 0x38dc: 0x000c, 0x38dd: 0x000c, + 0x38de: 0x000c, 0x38df: 0x000c, 0x38e0: 0x000c, 0x38e1: 0x000c, 0x38e2: 0x000c, 0x38e3: 0x000c, + 0x38e4: 0x000c, 0x38e5: 0x000c, 0x38e6: 0x000c, 0x38e7: 0x000c, 0x38e8: 0x000c, 0x38e9: 0x000c, + 0x38ea: 0x000c, 0x38eb: 0x000c, 0x38ec: 0x000c, 0x38ed: 0x000c, 0x38ee: 0x000c, 0x38ef: 0x000c, + 0x38f0: 0x000b, 0x38f1: 0x000b, 0x38f2: 0x000b, 0x38f3: 0x000b, 0x38f4: 0x000b, 0x38f5: 0x000b, + 0x38f6: 0x000b, 0x38f7: 0x000b, 0x38f8: 0x000b, 0x38f9: 0x000b, 0x38fa: 0x000b, 0x38fb: 0x000b, + 0x38fc: 0x000b, 0x38fd: 0x000b, 0x38fe: 0x000b, 0x38ff: 0x000b, } // bidiIndex: 24 blocks, 1536 entries, 1536 bytes @@ -1688,65 +1721,66 @@ var bidiIndex = [1536]uint8{ 0x17e: 0x4b, 0x17f: 0x4c, // Block 0x6, offset 0x180 0x180: 0x4d, 0x181: 0x4e, 0x182: 0x4f, 0x183: 0x50, 0x184: 0x51, 0x185: 0x52, 0x186: 0x53, 0x187: 0x54, - 0x188: 0x55, 0x189: 0x54, 0x18a: 0x54, 0x18b: 0x54, 0x18c: 0x56, 0x18d: 0x57, 0x18e: 0x58, 0x18f: 0x59, - 0x190: 0x5a, 0x191: 0x5b, 0x192: 0x5c, 0x193: 0x5d, 0x194: 0x54, 0x195: 0x54, 0x196: 0x54, 0x197: 0x54, - 0x198: 0x54, 0x199: 0x54, 0x19a: 0x5e, 0x19b: 0x54, 0x19c: 0x54, 0x19d: 0x5f, 0x19e: 0x54, 0x19f: 0x60, - 0x1a4: 0x54, 0x1a5: 0x54, 0x1a6: 0x61, 0x1a7: 0x62, - 0x1a8: 0x54, 0x1a9: 0x54, 0x1aa: 0x54, 0x1ab: 0x54, 0x1ac: 0x54, 0x1ad: 0x63, 0x1ae: 0x64, 0x1af: 0x65, - 0x1b3: 0x66, 0x1b5: 0x67, 0x1b7: 0x68, - 0x1b8: 0x69, 0x1b9: 0x6a, 0x1ba: 0x6b, 0x1bb: 0x6c, 0x1bc: 0x54, 0x1bd: 0x54, 0x1be: 0x54, 0x1bf: 0x6d, + 0x188: 0x55, 0x189: 0x54, 0x18a: 0x54, 0x18b: 0x54, 0x18c: 0x56, 0x18d: 0x57, 0x18e: 0x58, 0x18f: 0x54, + 0x190: 0x59, 0x191: 0x5a, 0x192: 0x5b, 0x193: 0x5c, 0x194: 0x54, 0x195: 0x54, 0x196: 0x54, 0x197: 0x54, + 0x198: 0x54, 0x199: 0x54, 0x19a: 0x5d, 0x19b: 0x54, 0x19c: 0x54, 0x19d: 0x5e, 0x19e: 0x54, 0x19f: 0x5f, + 0x1a4: 0x54, 0x1a5: 0x54, 0x1a6: 0x60, 0x1a7: 0x61, + 0x1a8: 0x54, 0x1a9: 0x54, 0x1aa: 0x54, 0x1ab: 0x54, 0x1ac: 0x54, 0x1ad: 0x62, 0x1ae: 0x63, 0x1af: 0x64, + 0x1b3: 0x65, 0x1b5: 0x66, 0x1b7: 0x67, + 0x1b8: 0x68, 0x1b9: 0x69, 0x1ba: 0x6a, 0x1bb: 0x6b, 0x1bc: 0x54, 0x1bd: 0x54, 0x1be: 0x54, 0x1bf: 0x6c, // Block 0x7, offset 0x1c0 - 0x1c0: 0x6e, 0x1c2: 0x6f, 0x1c3: 0x70, 0x1c7: 0x71, - 0x1c8: 0x72, 0x1c9: 0x73, 0x1ca: 0x74, 0x1cb: 0x75, 0x1cd: 0x76, 0x1cf: 0x77, + 0x1c0: 0x6d, 0x1c2: 0x6e, 0x1c3: 0x6f, 0x1c7: 0x70, + 0x1c8: 0x71, 0x1c9: 0x72, 0x1ca: 0x73, 0x1cb: 0x74, 0x1cd: 0x75, 0x1cf: 0x76, // Block 0x8, offset 0x200 0x237: 0x54, // Block 0x9, offset 0x240 - 0x252: 0x78, 0x253: 0x79, - 0x258: 0x7a, 0x259: 0x7b, 0x25a: 0x7c, 0x25b: 0x7d, 0x25c: 0x7e, 0x25e: 0x7f, - 0x260: 0x80, 0x261: 0x81, 0x263: 0x82, 0x264: 0x83, 0x265: 0x84, 0x266: 0x85, 0x267: 0x86, - 0x268: 0x87, 0x269: 0x88, 0x26a: 0x89, 0x26b: 0x8a, 0x26f: 0x8b, + 0x252: 0x77, 0x253: 0x78, + 0x258: 0x79, 0x259: 0x7a, 0x25a: 0x7b, 0x25b: 0x7c, 0x25c: 0x7d, 0x25e: 0x7e, + 0x260: 0x7f, 0x261: 0x80, 0x263: 0x81, 0x264: 0x82, 0x265: 0x83, 0x266: 0x84, 0x267: 0x85, + 0x268: 0x86, 0x269: 0x87, 0x26a: 0x88, 0x26b: 0x89, 0x26f: 0x8a, // Block 0xa, offset 0x280 - 0x2ac: 0x8c, 0x2ad: 0x8d, 0x2ae: 0x0e, 0x2af: 0x0e, - 0x2b0: 0x0e, 0x2b1: 0x0e, 0x2b2: 0x0e, 0x2b3: 0x0e, 0x2b4: 0x8e, 0x2b5: 0x0e, 0x2b6: 0x0e, 0x2b7: 0x8f, - 0x2b8: 0x90, 0x2b9: 0x91, 0x2ba: 0x0e, 0x2bb: 0x92, 0x2bc: 0x93, 0x2bd: 0x94, 0x2bf: 0x95, + 0x2ac: 0x8b, 0x2ad: 0x8c, 0x2ae: 0x0e, 0x2af: 0x0e, + 0x2b0: 0x0e, 0x2b1: 0x0e, 0x2b2: 0x0e, 0x2b3: 0x0e, 0x2b4: 0x8d, 0x2b5: 0x0e, 0x2b6: 0x0e, 0x2b7: 0x8e, + 0x2b8: 0x8f, 0x2b9: 0x90, 0x2ba: 0x0e, 0x2bb: 0x91, 0x2bc: 0x92, 0x2bd: 0x93, 0x2bf: 0x94, // Block 0xb, offset 0x2c0 - 0x2c4: 0x96, 0x2c5: 0x54, 0x2c6: 0x97, 0x2c7: 0x98, - 0x2cb: 0x99, 0x2cd: 0x9a, - 0x2e0: 0x9b, 0x2e1: 0x9b, 0x2e2: 0x9b, 0x2e3: 0x9b, 0x2e4: 0x9c, 0x2e5: 0x9b, 0x2e6: 0x9b, 0x2e7: 0x9b, - 0x2e8: 0x9d, 0x2e9: 0x9b, 0x2ea: 0x9b, 0x2eb: 0x9e, 0x2ec: 0x9f, 0x2ed: 0x9b, 0x2ee: 0x9b, 0x2ef: 0x9b, - 0x2f0: 0x9b, 0x2f1: 0x9b, 0x2f2: 0x9b, 0x2f3: 0x9b, 0x2f4: 0x9b, 0x2f5: 0x9b, 0x2f6: 0x9b, 0x2f7: 0x9b, - 0x2f8: 0x9b, 0x2f9: 0xa0, 0x2fa: 0x9b, 0x2fb: 0x9b, 0x2fc: 0x9b, 0x2fd: 0x9b, 0x2fe: 0x9b, 0x2ff: 0x9b, + 0x2c4: 0x95, 0x2c5: 0x54, 0x2c6: 0x96, 0x2c7: 0x97, + 0x2cb: 0x98, 0x2cd: 0x99, + 0x2e0: 0x9a, 0x2e1: 0x9a, 0x2e2: 0x9a, 0x2e3: 0x9a, 0x2e4: 0x9b, 0x2e5: 0x9a, 0x2e6: 0x9a, 0x2e7: 0x9a, + 0x2e8: 0x9c, 0x2e9: 0x9a, 0x2ea: 0x9a, 0x2eb: 0x9d, 0x2ec: 0x9e, 0x2ed: 0x9a, 0x2ee: 0x9a, 0x2ef: 0x9a, + 0x2f0: 0x9a, 0x2f1: 0x9a, 0x2f2: 0x9a, 0x2f3: 0x9a, 0x2f4: 0x9a, 0x2f5: 0x9a, 0x2f6: 0x9a, 0x2f7: 0x9a, + 0x2f8: 0x9a, 0x2f9: 0x9f, 0x2fa: 0x9a, 0x2fb: 0x9a, 0x2fc: 0x9a, 0x2fd: 0x9a, 0x2fe: 0x9a, 0x2ff: 0x9a, // Block 0xc, offset 0x300 - 0x300: 0xa1, 0x301: 0xa2, 0x302: 0xa3, 0x304: 0xa4, 0x305: 0xa5, 0x306: 0xa6, 0x307: 0xa7, - 0x308: 0xa8, 0x30b: 0xa9, 0x30c: 0xaa, 0x30d: 0xab, - 0x310: 0xac, 0x311: 0xad, 0x312: 0xae, 0x313: 0xaf, 0x316: 0xb0, 0x317: 0xb1, - 0x318: 0xb2, 0x319: 0xb3, 0x31a: 0xb4, 0x31c: 0xb5, - 0x330: 0xb6, 0x332: 0xb7, + 0x300: 0xa0, 0x301: 0xa1, 0x302: 0xa2, 0x304: 0xa3, 0x305: 0xa4, 0x306: 0xa5, 0x307: 0xa6, + 0x308: 0xa7, 0x30b: 0xa8, 0x30c: 0xa9, 0x30d: 0xaa, + 0x310: 0xab, 0x311: 0xac, 0x312: 0xad, 0x313: 0xae, 0x316: 0xaf, 0x317: 0xb0, + 0x318: 0xb1, 0x319: 0xb2, 0x31a: 0xb3, 0x31c: 0xb4, + 0x328: 0xb5, 0x329: 0xb6, 0x32a: 0xb7, + 0x330: 0xb8, 0x332: 0xb9, 0x334: 0xba, 0x335: 0xbb, // Block 0xd, offset 0x340 - 0x36b: 0xb8, 0x36c: 0xb9, - 0x37e: 0xba, + 0x36b: 0xbc, 0x36c: 0xbd, + 0x37e: 0xbe, // Block 0xe, offset 0x380 - 0x3b2: 0xbb, + 0x3b2: 0xbf, // Block 0xf, offset 0x3c0 - 0x3c5: 0xbc, 0x3c6: 0xbd, - 0x3c8: 0x54, 0x3c9: 0xbe, 0x3cc: 0x54, 0x3cd: 0xbf, - 0x3db: 0xc0, 0x3dc: 0xc1, 0x3dd: 0xc2, 0x3de: 0xc3, 0x3df: 0xc4, - 0x3e8: 0xc5, 0x3e9: 0xc6, 0x3ea: 0xc7, + 0x3c5: 0xc0, 0x3c6: 0xc1, + 0x3c8: 0x54, 0x3c9: 0xc2, 0x3cc: 0x54, 0x3cd: 0xc3, + 0x3db: 0xc4, 0x3dc: 0xc5, 0x3dd: 0xc6, 0x3de: 0xc7, 0x3df: 0xc8, + 0x3e8: 0xc9, 0x3e9: 0xca, 0x3ea: 0xcb, // Block 0x10, offset 0x400 - 0x400: 0xc8, - 0x420: 0x9b, 0x421: 0x9b, 0x422: 0x9b, 0x423: 0xc9, 0x424: 0x9b, 0x425: 0xca, 0x426: 0x9b, 0x427: 0x9b, - 0x428: 0x9b, 0x429: 0x9b, 0x42a: 0x9b, 0x42b: 0x9b, 0x42c: 0x9b, 0x42d: 0x9b, 0x42e: 0x9b, 0x42f: 0x9b, - 0x430: 0x9b, 0x431: 0x9b, 0x432: 0x9b, 0x433: 0x9b, 0x434: 0x9b, 0x435: 0x9b, 0x436: 0x9b, 0x437: 0x9b, - 0x438: 0x0e, 0x439: 0x0e, 0x43a: 0x0e, 0x43b: 0xcb, 0x43c: 0x9b, 0x43d: 0x9b, 0x43e: 0x9b, 0x43f: 0x9b, + 0x400: 0xcc, + 0x420: 0x9a, 0x421: 0x9a, 0x422: 0x9a, 0x423: 0xcd, 0x424: 0x9a, 0x425: 0xce, 0x426: 0x9a, 0x427: 0x9a, + 0x428: 0x9a, 0x429: 0x9a, 0x42a: 0x9a, 0x42b: 0x9a, 0x42c: 0x9a, 0x42d: 0x9a, 0x42e: 0x9a, 0x42f: 0x9a, + 0x430: 0x9a, 0x431: 0x9a, 0x432: 0x9a, 0x433: 0x9a, 0x434: 0x9a, 0x435: 0x9a, 0x436: 0x9a, 0x437: 0x9a, + 0x438: 0x0e, 0x439: 0x0e, 0x43a: 0x0e, 0x43b: 0xcf, 0x43c: 0x9a, 0x43d: 0x9a, 0x43e: 0x9a, 0x43f: 0x9a, // Block 0x11, offset 0x440 - 0x440: 0xcc, 0x441: 0x54, 0x442: 0xcd, 0x443: 0xce, 0x444: 0xcf, 0x445: 0xd0, - 0x44c: 0x54, 0x44d: 0x54, 0x44e: 0x54, 0x44f: 0x54, + 0x440: 0xd0, 0x441: 0x54, 0x442: 0xd1, 0x443: 0xd2, 0x444: 0xd3, 0x445: 0xd4, + 0x449: 0xd5, 0x44c: 0x54, 0x44d: 0x54, 0x44e: 0x54, 0x44f: 0x54, 0x450: 0x54, 0x451: 0x54, 0x452: 0x54, 0x453: 0x54, 0x454: 0x54, 0x455: 0x54, 0x456: 0x54, 0x457: 0x54, - 0x458: 0x54, 0x459: 0x54, 0x45a: 0x54, 0x45b: 0xd1, 0x45c: 0x54, 0x45d: 0x6c, 0x45e: 0x54, 0x45f: 0xd2, - 0x460: 0xd3, 0x461: 0xd4, 0x462: 0xd5, 0x464: 0xd6, 0x465: 0xd7, 0x466: 0xd8, 0x467: 0x36, - 0x47f: 0xd9, + 0x458: 0x54, 0x459: 0x54, 0x45a: 0x54, 0x45b: 0xd6, 0x45c: 0x54, 0x45d: 0x6b, 0x45e: 0x54, 0x45f: 0xd7, + 0x460: 0xd8, 0x461: 0xd9, 0x462: 0xda, 0x464: 0xdb, 0x465: 0xdc, 0x466: 0xdd, 0x467: 0xde, + 0x47f: 0xdf, // Block 0x12, offset 0x480 - 0x4bf: 0xd9, + 0x4bf: 0xdf, // Block 0x13, offset 0x4c0 0x4d0: 0x09, 0x4d1: 0x0a, 0x4d6: 0x0b, 0x4db: 0x0c, 0x4dd: 0x0d, 0x4de: 0x0e, 0x4df: 0x0f, @@ -1758,14 +1792,14 @@ var bidiIndex = [1536]uint8{ 0x52f: 0x10, 0x53f: 0x10, // Block 0x15, offset 0x540 - 0x540: 0xda, 0x541: 0xda, 0x542: 0xda, 0x543: 0xda, 0x544: 0x05, 0x545: 0x05, 0x546: 0x05, 0x547: 0xdb, - 0x548: 0xda, 0x549: 0xda, 0x54a: 0xda, 0x54b: 0xda, 0x54c: 0xda, 0x54d: 0xda, 0x54e: 0xda, 0x54f: 0xda, - 0x550: 0xda, 0x551: 0xda, 0x552: 0xda, 0x553: 0xda, 0x554: 0xda, 0x555: 0xda, 0x556: 0xda, 0x557: 0xda, - 0x558: 0xda, 0x559: 0xda, 0x55a: 0xda, 0x55b: 0xda, 0x55c: 0xda, 0x55d: 0xda, 0x55e: 0xda, 0x55f: 0xda, - 0x560: 0xda, 0x561: 0xda, 0x562: 0xda, 0x563: 0xda, 0x564: 0xda, 0x565: 0xda, 0x566: 0xda, 0x567: 0xda, - 0x568: 0xda, 0x569: 0xda, 0x56a: 0xda, 0x56b: 0xda, 0x56c: 0xda, 0x56d: 0xda, 0x56e: 0xda, 0x56f: 0xda, - 0x570: 0xda, 0x571: 0xda, 0x572: 0xda, 0x573: 0xda, 0x574: 0xda, 0x575: 0xda, 0x576: 0xda, 0x577: 0xda, - 0x578: 0xda, 0x579: 0xda, 0x57a: 0xda, 0x57b: 0xda, 0x57c: 0xda, 0x57d: 0xda, 0x57e: 0xda, 0x57f: 0xda, + 0x540: 0xe0, 0x541: 0xe0, 0x542: 0xe0, 0x543: 0xe0, 0x544: 0x05, 0x545: 0x05, 0x546: 0x05, 0x547: 0xe1, + 0x548: 0xe0, 0x549: 0xe0, 0x54a: 0xe0, 0x54b: 0xe0, 0x54c: 0xe0, 0x54d: 0xe0, 0x54e: 0xe0, 0x54f: 0xe0, + 0x550: 0xe0, 0x551: 0xe0, 0x552: 0xe0, 0x553: 0xe0, 0x554: 0xe0, 0x555: 0xe0, 0x556: 0xe0, 0x557: 0xe0, + 0x558: 0xe0, 0x559: 0xe0, 0x55a: 0xe0, 0x55b: 0xe0, 0x55c: 0xe0, 0x55d: 0xe0, 0x55e: 0xe0, 0x55f: 0xe0, + 0x560: 0xe0, 0x561: 0xe0, 0x562: 0xe0, 0x563: 0xe0, 0x564: 0xe0, 0x565: 0xe0, 0x566: 0xe0, 0x567: 0xe0, + 0x568: 0xe0, 0x569: 0xe0, 0x56a: 0xe0, 0x56b: 0xe0, 0x56c: 0xe0, 0x56d: 0xe0, 0x56e: 0xe0, 0x56f: 0xe0, + 0x570: 0xe0, 0x571: 0xe0, 0x572: 0xe0, 0x573: 0xe0, 0x574: 0xe0, 0x575: 0xe0, 0x576: 0xe0, 0x577: 0xe0, + 0x578: 0xe0, 0x579: 0xe0, 0x57a: 0xe0, 0x57b: 0xe0, 0x57c: 0xe0, 0x57d: 0xe0, 0x57e: 0xe0, 0x57f: 0xe0, // Block 0x16, offset 0x580 0x58f: 0x10, 0x59f: 0x10, @@ -1776,4 +1810,4 @@ var bidiIndex = [1536]uint8{ 0x5cf: 0x10, } -// Total table size 15800 bytes (15KiB); checksum: F50EF68C +// Total table size 16184 bytes (15KiB); checksum: F50EF68C diff --git a/vendor/golang.org/x/text/unicode/bidi/tables_test.go b/vendor/golang.org/x/text/unicode/bidi/tables_test.go new file mode 100644 index 000000000..356a4a58d --- /dev/null +++ b/vendor/golang.org/x/text/unicode/bidi/tables_test.go @@ -0,0 +1,82 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package bidi + +import ( + "testing" + + "golang.org/x/text/internal/gen" + "golang.org/x/text/internal/testtext" + "golang.org/x/text/internal/ucd" +) + +var labels = []string{ + AL: "AL", + AN: "AN", + B: "B", + BN: "BN", + CS: "CS", + EN: "EN", + ES: "ES", + ET: "ET", + L: "L", + NSM: "NSM", + ON: "ON", + R: "R", + S: "S", + WS: "WS", + + LRO: "LRO", + RLO: "RLO", + LRE: "LRE", + RLE: "RLE", + PDF: "PDF", + LRI: "LRI", + RLI: "RLI", + FSI: "FSI", + PDI: "PDI", +} + +func TestTables(t *testing.T) { + testtext.SkipIfNotLong(t) + + ucd.Parse(gen.OpenUCDFile("BidiBrackets.txt"), func(p *ucd.Parser) { + r1 := p.Rune(0) + want := p.Rune(1) + + e, _ := LookupRune(r1) + if got := e.reverseBracket(r1); got != want { + t.Errorf("Reverse(%U) = %U; want %U", r1, got, want) + } + }) + + done := map[rune]bool{} + test := func(name string, r rune, want string) { + str := string(r) + e, _ := LookupString(str) + if got := labels[e.Class()]; got != want { + t.Errorf("%s:%U: got %s; want %s", name, r, got, want) + } + if e2, sz := LookupRune(r); e != e2 || sz != len(str) { + t.Errorf("LookupRune(%U) = %v, %d; want %v, %d", r, e2, e, sz, len(str)) + } + if e2, sz := Lookup([]byte(str)); e != e2 || sz != len(str) { + t.Errorf("Lookup(%U) = %v, %d; want %v, %d", r, e2, e, sz, len(str)) + } + done[r] = true + } + + // Insert the derived BiDi properties. + ucd.Parse(gen.OpenUCDFile("extracted/DerivedBidiClass.txt"), func(p *ucd.Parser) { + r := p.Rune(0) + test("derived", r, p.String(1)) + }) + visitDefaults(func(r rune, c Class) { + if !done[r] { + test("default", r, labels[c]) + } + }) + +} diff --git a/vendor/golang.org/x/text/unicode/cldr/base.go b/vendor/golang.org/x/text/unicode/cldr/base.go new file mode 100644 index 000000000..2382f4d6d --- /dev/null +++ b/vendor/golang.org/x/text/unicode/cldr/base.go @@ -0,0 +1,100 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cldr + +import ( + "encoding/xml" + "regexp" + "strconv" +) + +// Elem is implemented by every XML element. +type Elem interface { + setEnclosing(Elem) + setName(string) + enclosing() Elem + + GetCommon() *Common +} + +type hidden struct { + CharData string `xml:",chardata"` + Alias *struct { + Common + Source string `xml:"source,attr"` + Path string `xml:"path,attr"` + } `xml:"alias"` + Def *struct { + Common + Choice string `xml:"choice,attr,omitempty"` + Type string `xml:"type,attr,omitempty"` + } `xml:"default"` +} + +// Common holds several of the most common attributes and sub elements +// of an XML element. +type Common struct { + XMLName xml.Name + name string + enclElem Elem + Type string `xml:"type,attr,omitempty"` + Reference string `xml:"reference,attr,omitempty"` + Alt string `xml:"alt,attr,omitempty"` + ValidSubLocales string `xml:"validSubLocales,attr,omitempty"` + Draft string `xml:"draft,attr,omitempty"` + hidden +} + +// Default returns the default type to select from the enclosed list +// or "" if no default value is specified. +func (e *Common) Default() string { + if e.Def == nil { + return "" + } + if e.Def.Choice != "" { + return e.Def.Choice + } else if e.Def.Type != "" { + // Type is still used by the default element in collation. + return e.Def.Type + } + return "" +} + +// GetCommon returns e. It is provided such that Common implements Elem. +func (e *Common) GetCommon() *Common { + return e +} + +// Data returns the character data accumulated for this element. +func (e *Common) Data() string { + e.CharData = charRe.ReplaceAllStringFunc(e.CharData, replaceUnicode) + return e.CharData +} + +func (e *Common) setName(s string) { + e.name = s +} + +func (e *Common) enclosing() Elem { + return e.enclElem +} + +func (e *Common) setEnclosing(en Elem) { + e.enclElem = en +} + +// Escape characters that can be escaped without further escaping the string. +var charRe = regexp.MustCompile(`&#x[0-9a-fA-F]*;|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}|\\x[0-9a-fA-F]{2}|\\[0-7]{3}|\\[abtnvfr]`) + +// replaceUnicode converts hexadecimal Unicode codepoint notations to a one-rune string. +// It assumes the input string is correctly formatted. +func replaceUnicode(s string) string { + if s[1] == '#' { + r, _ := strconv.ParseInt(s[3:len(s)-1], 16, 32) + return string(r) + } + r, _, _, _ := strconv.UnquoteChar(s, 0) + return string(r) +} diff --git a/vendor/golang.org/x/text/unicode/cldr/cldr.go b/vendor/golang.org/x/text/unicode/cldr/cldr.go new file mode 100644 index 000000000..2197f8ac2 --- /dev/null +++ b/vendor/golang.org/x/text/unicode/cldr/cldr.go @@ -0,0 +1,130 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:generate go run makexml.go -output xml.go + +// Package cldr provides a parser for LDML and related XML formats. +// This package is intended to be used by the table generation tools +// for the various internationalization-related packages. +// As the XML types are generated from the CLDR DTD, and as the CLDR standard +// is periodically amended, this package may change considerably over time. +// This mostly means that data may appear and disappear between versions. +// That is, old code should keep compiling for newer versions, but data +// may have moved or changed. +// CLDR version 22 is the first version supported by this package. +// Older versions may not work. +package cldr // import "golang.org/x/text/unicode/cldr" + +import ( + "fmt" + "sort" +) + +// CLDR provides access to parsed data of the Unicode Common Locale Data Repository. +type CLDR struct { + parent map[string][]string + locale map[string]*LDML + resolved map[string]*LDML + bcp47 *LDMLBCP47 + supp *SupplementalData +} + +func makeCLDR() *CLDR { + return &CLDR{ + parent: make(map[string][]string), + locale: make(map[string]*LDML), + resolved: make(map[string]*LDML), + bcp47: &LDMLBCP47{}, + supp: &SupplementalData{}, + } +} + +// BCP47 returns the parsed BCP47 LDML data. If no such data was parsed, nil is returned. +func (cldr *CLDR) BCP47() *LDMLBCP47 { + return nil +} + +// Draft indicates the draft level of an element. +type Draft int + +const ( + Approved Draft = iota + Contributed + Provisional + Unconfirmed +) + +var drafts = []string{"unconfirmed", "provisional", "contributed", "approved", ""} + +// ParseDraft returns the Draft value corresponding to the given string. The +// empty string corresponds to Approved. +func ParseDraft(level string) (Draft, error) { + if level == "" { + return Approved, nil + } + for i, s := range drafts { + if level == s { + return Unconfirmed - Draft(i), nil + } + } + return Approved, fmt.Errorf("cldr: unknown draft level %q", level) +} + +func (d Draft) String() string { + return drafts[len(drafts)-1-int(d)] +} + +// SetDraftLevel sets which draft levels to include in the evaluated LDML. +// Any draft element for which the draft level is higher than lev will be excluded. +// If multiple draft levels are available for a single element, the one with the +// lowest draft level will be selected, unless preferDraft is true, in which case +// the highest draft will be chosen. +// It is assumed that the underlying LDML is canonicalized. +func (cldr *CLDR) SetDraftLevel(lev Draft, preferDraft bool) { + // TODO: implement + cldr.resolved = make(map[string]*LDML) +} + +// RawLDML returns the LDML XML for id in unresolved form. +// id must be one of the strings returned by Locales. +func (cldr *CLDR) RawLDML(loc string) *LDML { + return cldr.locale[loc] +} + +// LDML returns the fully resolved LDML XML for loc, which must be one of +// the strings returned by Locales. +func (cldr *CLDR) LDML(loc string) (*LDML, error) { + return cldr.resolve(loc) +} + +// Supplemental returns the parsed supplemental data. If no such data was parsed, +// nil is returned. +func (cldr *CLDR) Supplemental() *SupplementalData { + return cldr.supp +} + +// Locales returns the locales for which there exist files. +// Valid sublocales for which there is no file are not included. +// The root locale is always sorted first. +func (cldr *CLDR) Locales() []string { + loc := []string{"root"} + hasRoot := false + for l, _ := range cldr.locale { + if l == "root" { + hasRoot = true + continue + } + loc = append(loc, l) + } + sort.Strings(loc[1:]) + if !hasRoot { + return loc[1:] + } + return loc +} + +// Get fills in the fields of x based on the XPath path. +func Get(e Elem, path string) (res Elem, err error) { + return walkXPath(e, path) +} diff --git a/vendor/golang.org/x/text/unicode/cldr/cldr_test.go b/vendor/golang.org/x/text/unicode/cldr/cldr_test.go new file mode 100644 index 000000000..951028d7e --- /dev/null +++ b/vendor/golang.org/x/text/unicode/cldr/cldr_test.go @@ -0,0 +1,27 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cldr + +import "testing" + +func TestParseDraft(t *testing.T) { + tests := []struct { + in string + draft Draft + err bool + }{ + {"unconfirmed", Unconfirmed, false}, + {"provisional", Provisional, false}, + {"contributed", Contributed, false}, + {"approved", Approved, false}, + {"", Approved, false}, + {"foo", Approved, true}, + } + for _, tt := range tests { + if d, err := ParseDraft(tt.in); d != tt.draft || (err != nil) != tt.err { + t.Errorf("%q: was %v, %v; want %v, %v", tt.in, d, err != nil, tt.draft, tt.err) + } + } +} diff --git a/vendor/golang.org/x/text/unicode/cldr/collate.go b/vendor/golang.org/x/text/unicode/cldr/collate.go new file mode 100644 index 000000000..80ee28d79 --- /dev/null +++ b/vendor/golang.org/x/text/unicode/cldr/collate.go @@ -0,0 +1,359 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cldr + +import ( + "bufio" + "encoding/xml" + "errors" + "fmt" + "strconv" + "strings" + "unicode" + "unicode/utf8" +) + +// RuleProcessor can be passed to Collator's Process method, which +// parses the rules and calls the respective method for each rule found. +type RuleProcessor interface { + Reset(anchor string, before int) error + Insert(level int, str, context, extend string) error + Index(id string) +} + +const ( + // cldrIndex is a Unicode-reserved sentinel value used to mark the start + // of a grouping within an index. + // We ignore any rule that starts with this rune. + // See http://unicode.org/reports/tr35/#Collation_Elements for details. + cldrIndex = "\uFDD0" + + // specialAnchor is the format in which to represent logical reset positions, + // such as "first tertiary ignorable". + specialAnchor = "<%s/>" +) + +// Process parses the rules for the tailorings of this collation +// and calls the respective methods of p for each rule found. +func (c Collation) Process(p RuleProcessor) (err error) { + if len(c.Cr) > 0 { + if len(c.Cr) > 1 { + return fmt.Errorf("multiple cr elements, want 0 or 1") + } + return processRules(p, c.Cr[0].Data()) + } + if c.Rules.Any != nil { + return c.processXML(p) + } + return errors.New("no tailoring data") +} + +// processRules parses rules in the Collation Rule Syntax defined in +// http://www.unicode.org/reports/tr35/tr35-collation.html#Collation_Tailorings. +func processRules(p RuleProcessor, s string) (err error) { + chk := func(s string, e error) string { + if err == nil { + err = e + } + return s + } + i := 0 // Save the line number for use after the loop. + scanner := bufio.NewScanner(strings.NewReader(s)) + for ; scanner.Scan() && err == nil; i++ { + for s := skipSpace(scanner.Text()); s != "" && s[0] != '#'; s = skipSpace(s) { + level := 5 + var ch byte + switch ch, s = s[0], s[1:]; ch { + case '&': // followed by <anchor> or '[' <key> ']' + if s = skipSpace(s); consume(&s, '[') { + s = chk(parseSpecialAnchor(p, s)) + } else { + s = chk(parseAnchor(p, 0, s)) + } + case '<': // sort relation '<'{1,4}, optionally followed by '*'. + for level = 1; consume(&s, '<'); level++ { + } + if level > 4 { + err = fmt.Errorf("level %d > 4", level) + } + fallthrough + case '=': // identity relation, optionally followed by *. + if consume(&s, '*') { + s = chk(parseSequence(p, level, s)) + } else { + s = chk(parseOrder(p, level, s)) + } + default: + chk("", fmt.Errorf("illegal operator %q", ch)) + break + } + } + } + if chk("", scanner.Err()); err != nil { + return fmt.Errorf("%d: %v", i, err) + } + return nil +} + +// parseSpecialAnchor parses the anchor syntax which is either of the form +// ['before' <level>] <anchor> +// or +// [<label>] +// The starting should already be consumed. +func parseSpecialAnchor(p RuleProcessor, s string) (tail string, err error) { + i := strings.IndexByte(s, ']') + if i == -1 { + return "", errors.New("unmatched bracket") + } + a := strings.TrimSpace(s[:i]) + s = s[i+1:] + if strings.HasPrefix(a, "before ") { + l, err := strconv.ParseUint(skipSpace(a[len("before "):]), 10, 3) + if err != nil { + return s, err + } + return parseAnchor(p, int(l), s) + } + return s, p.Reset(fmt.Sprintf(specialAnchor, a), 0) +} + +func parseAnchor(p RuleProcessor, level int, s string) (tail string, err error) { + anchor, s, err := scanString(s) + if err != nil { + return s, err + } + return s, p.Reset(anchor, level) +} + +func parseOrder(p RuleProcessor, level int, s string) (tail string, err error) { + var value, context, extend string + if value, s, err = scanString(s); err != nil { + return s, err + } + if strings.HasPrefix(value, cldrIndex) { + p.Index(value[len(cldrIndex):]) + return + } + if consume(&s, '|') { + if context, s, err = scanString(s); err != nil { + return s, errors.New("missing string after context") + } + } + if consume(&s, '/') { + if extend, s, err = scanString(s); err != nil { + return s, errors.New("missing string after extension") + } + } + return s, p.Insert(level, value, context, extend) +} + +// scanString scans a single input string. +func scanString(s string) (str, tail string, err error) { + if s = skipSpace(s); s == "" { + return s, s, errors.New("missing string") + } + buf := [16]byte{} // small but enough to hold most cases. + value := buf[:0] + for s != "" { + if consume(&s, '\'') { + i := strings.IndexByte(s, '\'') + if i == -1 { + return "", "", errors.New(`unmatched single quote`) + } + if i == 0 { + value = append(value, '\'') + } else { + value = append(value, s[:i]...) + } + s = s[i+1:] + continue + } + r, sz := utf8.DecodeRuneInString(s) + if unicode.IsSpace(r) || strings.ContainsRune("&<=#", r) { + break + } + value = append(value, s[:sz]...) + s = s[sz:] + } + return string(value), skipSpace(s), nil +} + +func parseSequence(p RuleProcessor, level int, s string) (tail string, err error) { + if s = skipSpace(s); s == "" { + return s, errors.New("empty sequence") + } + last := rune(0) + for s != "" { + r, sz := utf8.DecodeRuneInString(s) + s = s[sz:] + + if r == '-' { + // We have a range. The first element was already written. + if last == 0 { + return s, errors.New("range without starter value") + } + r, sz = utf8.DecodeRuneInString(s) + s = s[sz:] + if r == utf8.RuneError || r < last { + return s, fmt.Errorf("invalid range %q-%q", last, r) + } + for i := last + 1; i <= r; i++ { + if err := p.Insert(level, string(i), "", ""); err != nil { + return s, err + } + } + last = 0 + continue + } + + if unicode.IsSpace(r) || unicode.IsPunct(r) { + break + } + + // normal case + if err := p.Insert(level, string(r), "", ""); err != nil { + return s, err + } + last = r + } + return s, nil +} + +func skipSpace(s string) string { + return strings.TrimLeftFunc(s, unicode.IsSpace) +} + +// consumes returns whether the next byte is ch. If so, it gobbles it by +// updating s. +func consume(s *string, ch byte) (ok bool) { + if *s == "" || (*s)[0] != ch { + return false + } + *s = (*s)[1:] + return true +} + +// The following code parses Collation rules of CLDR version 24 and before. + +var lmap = map[byte]int{ + 'p': 1, + 's': 2, + 't': 3, + 'i': 5, +} + +type rulesElem struct { + Rules struct { + Common + Any []*struct { + XMLName xml.Name + rule + } `xml:",any"` + } `xml:"rules"` +} + +type rule struct { + Value string `xml:",chardata"` + Before string `xml:"before,attr"` + Any []*struct { + XMLName xml.Name + rule + } `xml:",any"` +} + +var emptyValueError = errors.New("cldr: empty rule value") + +func (r *rule) value() (string, error) { + // Convert hexadecimal Unicode codepoint notation to a string. + s := charRe.ReplaceAllStringFunc(r.Value, replaceUnicode) + r.Value = s + if s == "" { + if len(r.Any) != 1 { + return "", emptyValueError + } + r.Value = fmt.Sprintf(specialAnchor, r.Any[0].XMLName.Local) + r.Any = nil + } else if len(r.Any) != 0 { + return "", fmt.Errorf("cldr: XML elements found in collation rule: %v", r.Any) + } + return r.Value, nil +} + +func (r rule) process(p RuleProcessor, name, context, extend string) error { + v, err := r.value() + if err != nil { + return err + } + switch name { + case "p", "s", "t", "i": + if strings.HasPrefix(v, cldrIndex) { + p.Index(v[len(cldrIndex):]) + return nil + } + if err := p.Insert(lmap[name[0]], v, context, extend); err != nil { + return err + } + case "pc", "sc", "tc", "ic": + level := lmap[name[0]] + for _, s := range v { + if err := p.Insert(level, string(s), context, extend); err != nil { + return err + } + } + default: + return fmt.Errorf("cldr: unsupported tag: %q", name) + } + return nil +} + +// processXML parses the format of CLDR versions 24 and older. +func (c Collation) processXML(p RuleProcessor) (err error) { + // Collation is generated and defined in xml.go. + var v string + for _, r := range c.Rules.Any { + switch r.XMLName.Local { + case "reset": + level := 0 + switch r.Before { + case "primary", "1": + level = 1 + case "secondary", "2": + level = 2 + case "tertiary", "3": + level = 3 + case "": + default: + return fmt.Errorf("cldr: unknown level %q", r.Before) + } + v, err = r.value() + if err == nil { + err = p.Reset(v, level) + } + case "x": + var context, extend string + for _, r1 := range r.Any { + v, err = r1.value() + switch r1.XMLName.Local { + case "context": + context = v + case "extend": + extend = v + } + } + for _, r1 := range r.Any { + if t := r1.XMLName.Local; t == "context" || t == "extend" { + continue + } + r1.rule.process(p, r1.XMLName.Local, context, extend) + } + default: + err = r.rule.process(p, r.XMLName.Local, "", "") + } + if err != nil { + return err + } + } + return nil +} diff --git a/vendor/golang.org/x/text/unicode/cldr/collate_test.go b/vendor/golang.org/x/text/unicode/cldr/collate_test.go new file mode 100644 index 000000000..f6721639a --- /dev/null +++ b/vendor/golang.org/x/text/unicode/cldr/collate_test.go @@ -0,0 +1,275 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cldr + +import ( + "fmt" + "strings" + "testing" +) + +// A recorder implements the RuleProcessor interface, whereby its methods +// simply record the invocations. +type recorder struct { + calls []string +} + +func (r *recorder) Reset(anchor string, before int) error { + if before > 5 { + return fmt.Errorf("before %d > 5", before) + } + r.calls = append(r.calls, fmt.Sprintf("R:%s-%d", anchor, before)) + return nil +} + +func (r *recorder) Insert(level int, str, context, extend string) error { + s := fmt.Sprintf("O:%d:%s", level, str) + if context != "" { + s += "|" + context + } + if extend != "" { + s += "/" + extend + } + r.calls = append(r.calls, s) + return nil +} + +func (r *recorder) Index(id string) { + r.calls = append(r.calls, fmt.Sprintf("I:%s", id)) +} + +func (r *recorder) Error(err error) { + r.calls = append(r.calls, fmt.Sprintf("E:%v", err)) +} + +func TestRuleProcessor(t *testing.T) { + for _, tt := range []struct { + desc string + in string + out string + }{ + {desc: "empty"}, + {desc: "whitespace and comments only", + in: ` + + + # adsfads +# adfadf + `, + }, + { + desc: "reset anchor", + in: ` + & a + &b # + & [ before 3 ] c + & [before 4] d & ee + & [first tertiary ignorable] + &'g' + & 'h''h'h'h' + &'\u0069' # LATIN SMALL LETTER I + `, + out: ` + R:a-0 + R:b-0 + R:c-3 + R:d-4 + R:ee-0 + R:<first tertiary ignorable/>-0 + R:g-0 + R:hhhh-0 + R:i-0 + `, + }, + { + desc: "ordering", + in: ` + & 0 + < 1 <<''2# +<<< 3'3''33'3# + <<<<4 + = 5 << 6 | s + <<<< 7 / z + << 8'' | s / ch + `, + out: ` + R:0-0 + O:1:1 + O:2:'2 + O:3:33333 + O:4:4 + O:5:5 + O:2:6|s + O:4:7/z + O:2:8'|s/ch + `, + }, + { + desc: "index", + in: "< '\ufdd0'A", + out: "I:A", + }, + { + desc: "sequence", + in: ` + & 0 + <<* 1234 + <* a-cde-f + =* q-q + `, + out: ` + R:0-0 + O:2:1 + O:2:2 + O:2:3 + O:2:4 + O:1:a + O:1:b + O:1:c + O:1:d + O:1:e + O:1:f + O:5:q + `, + }, + { + desc: "compact", + in: "&B<t<<<T<s<<<S<e<<<E", + out: ` + R:B-0 + O:1:t + O:3:T + O:1:s + O:3:S + O:1:e + O:3:E + `, + }, + { + desc: "err operator", + in: "a", + out: "E:1: illegal operator 'a'", + }, + { + desc: "err line number", + in: `& a + << b + a`, + out: ` + R:a-0 + O:2:b + E:3: illegal operator 'a'`, + }, + { + desc: "err empty anchor", + in: " & ", + out: "E:1: missing string", + }, + { + desc: "err anchor invalid special 1", + in: " & [ foo ", + out: "E:1: unmatched bracket", + }, + { + desc: "err anchor invalid special 2", + in: "&[", + out: "E:1: unmatched bracket", + }, + { + desc: "err anchor invalid before 1", + in: "&[before a]", + out: `E:1: strconv.ParseUint: parsing "a": invalid syntax`, + }, + { + desc: "err anchor invalid before 2", + in: "&[before 12]", + out: `E:1: strconv.ParseUint: parsing "12": value out of range`, + }, + { + desc: "err anchor invalid before 3", + in: "&[before 2]", + out: "E:1: missing string", + }, + { + desc: "err anchor invalid before 4", + in: "&[before 6] a", + out: "E:1: before 6 > 5", + }, + { + desc: "err empty order", + in: " < ", + out: "E:1: missing string", + }, + { + desc: "err empty identity", + in: " = ", + out: "E:1: missing string", + }, + { + desc: "err empty context", + in: " < a | ", + out: "E:1: missing string after context", + }, + { + desc: "err empty extend", + in: " < a / ", + out: "E:1: missing string after extension", + }, + { + desc: "err empty sequence", + in: " <* ", + out: "E:1: empty sequence", + }, + { + desc: "err sequence 1", + in: " <* -a", + out: "E:1: range without starter value", + }, + { + desc: "err sequence 3", + in: " <* a-a-b", + out: `O:1:a + E:1: range without starter value + `, + }, + { + desc: "err sequence 3", + in: " <* b-a", + out: `O:1:b + E:1: invalid range 'b'-'a' + `, + }, + { + desc: "err unmatched quote", + in: " < 'b", + out: ` E:1: unmatched single quote + `, + }, + } { + rec := &recorder{} + err := Collation{ + Cr: []*Common{ + {hidden: hidden{CharData: tt.in}}, + }, + }.Process(rec) + if err != nil { + rec.Error(err) + } + got := rec.calls + want := strings.Split(strings.TrimSpace(tt.out), "\n") + if tt.out == "" { + want = nil + } + if len(got) != len(want) { + t.Errorf("%s: nResults: got %d; want %d", tt.desc, len(got), len(want)) + continue + } + for i, g := range got { + if want := strings.TrimSpace(want[i]); g != want { + t.Errorf("%s:%d: got %q; want %q", tt.desc, i, g, want) + } + } + } +} diff --git a/vendor/golang.org/x/text/unicode/cldr/data_test.go b/vendor/golang.org/x/text/unicode/cldr/data_test.go new file mode 100644 index 000000000..166218962 --- /dev/null +++ b/vendor/golang.org/x/text/unicode/cldr/data_test.go @@ -0,0 +1,186 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cldr + +// This file contains test data. + +import ( + "io" + "strings" +) + +type testLoader struct { +} + +func (t testLoader) Len() int { + return len(testFiles) +} + +func (t testLoader) Path(i int) string { + return testPaths[i] +} + +func (t testLoader) Reader(i int) (io.ReadCloser, error) { + return &reader{*strings.NewReader(testFiles[i])}, nil +} + +// reader adds a dummy Close method to strings.Reader so that it +// satisfies the io.ReadCloser interface. +type reader struct { + strings.Reader +} + +func (r reader) Close() error { + return nil +} + +var ( + testFiles = []string{de_xml, gsw_xml, root_xml} + testPaths = []string{ + "common/main/de.xml", + "common/main/gsw.xml", + "common/main/root.xml", + } +) + +var root_xml = `<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE ldml SYSTEM "../../common/dtd/ldml.dtd"> +<ldml> + <identity> + <language type="root"/> + <generation date="now"/> + </identity> + <characters> + <exemplarCharacters>[]</exemplarCharacters> + <exemplarCharacters type="auxiliary">[]</exemplarCharacters> + <exemplarCharacters type="punctuation">[\- ‐ – — … ' ‘ ‚ " “ „ \& #]</exemplarCharacters> + <ellipsis type="final">{0}…</ellipsis> + <ellipsis type="initial">…{0}</ellipsis> + <moreInformation>?</moreInformation> + </characters> + <dates> + <calendars> + <default choice="gregorian"/> + <calendar type="buddhist"> + <months> + <alias source="locale" path="../../calendar[@type='gregorian']/months"/> + </months> + </calendar> + <calendar type="chinese"> + <months> + <alias source="locale" path="../../calendar[@type='gregorian']/months"/> + </months> + </calendar> + <calendar type="gregorian"> + <months> + <default choice="format"/> + <monthContext type="format"> + <default choice="wide"/> + <monthWidth type="narrow"> + <alias source="locale" path="../../monthContext[@type='stand-alone']/monthWidth[@type='narrow']"/> + </monthWidth> + <monthWidth type="wide"> + <month type="1">11</month> + <month type="2">22</month> + <month type="3">33</month> + <month type="4">44</month> + </monthWidth> + </monthContext> + <monthContext type="stand-alone"> + <monthWidth type="narrow"> + <month type="1">1</month> + <month type="2">2</month> + <month type="3">3</month> + <month type="4">4</month> + </monthWidth> + <monthWidth type="wide"> + <alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='wide']"/> + </monthWidth> + </monthContext> + </months> + </calendar> + </calendars> + </dates> +</ldml> +` + +var de_xml = `<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE ldml SYSTEM "../../common/dtd/ldml.dtd"> +<ldml> + <identity> + <language type="de"/> + </identity> + <characters> + <exemplarCharacters>[a ä b c d e ö p q r s ß t u ü v w x y z]</exemplarCharacters> + <exemplarCharacters type="auxiliary">[á à ă]</exemplarCharacters> + <exemplarCharacters type="index">[A B C D E F G H Z]</exemplarCharacters> + <ellipsis type="final">{0} …</ellipsis> + <ellipsis type="initial">… {0}</ellipsis> + <moreInformation>?</moreInformation> + <stopwords> + <stopwordList type="collation" draft="provisional">der die das</stopwordList> + </stopwords> + </characters> + <dates> + <calendars> + <calendar type="buddhist"> + <months> + <monthContext type="format"> + <monthWidth type="narrow"> + <month type="3">BBB</month> + </monthWidth> + <monthWidth type="wide"> + <month type="3">bbb</month> + </monthWidth> + </monthContext> + </months> + </calendar> + <calendar type="gregorian"> + <months> + <monthContext type="format"> + <monthWidth type="narrow"> + <month type="3">M</month> + <month type="4">A</month> + </monthWidth> + <monthWidth type="wide"> + <month type="3">Maerz</month> + <month type="4">April</month> + <month type="5">Mai</month> + </monthWidth> + </monthContext> + <monthContext type="stand-alone"> + <monthWidth type="narrow"> + <month type="3">m</month> + <month type="5">m</month> + </monthWidth> + <monthWidth type="wide"> + <month type="4">april</month> + <month type="5">mai</month> + </monthWidth> + </monthContext> + </months> + </calendar> + </calendars> + </dates> + <posix> + <messages> + <yesstr>yes:y</yesstr> + <nostr>no:n</nostr> + </messages> + </posix> +</ldml> +` + +var gsw_xml = `<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE ldml SYSTEM "../../common/dtd/ldml.dtd"> +<ldml> + <identity> + <language type="gsw"/> + </identity> + <posix> + <alias source="de" path="//ldml/posix"/> + </posix> +</ldml> +` diff --git a/vendor/golang.org/x/text/unicode/cldr/decode.go b/vendor/golang.org/x/text/unicode/cldr/decode.go new file mode 100644 index 000000000..e5ee4aed1 --- /dev/null +++ b/vendor/golang.org/x/text/unicode/cldr/decode.go @@ -0,0 +1,171 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cldr + +import ( + "archive/zip" + "bytes" + "encoding/xml" + "fmt" + "io" + "io/ioutil" + "log" + "os" + "path/filepath" + "regexp" +) + +// A Decoder loads an archive of CLDR data. +type Decoder struct { + dirFilter []string + sectionFilter []string + loader Loader + cldr *CLDR + curLocale string +} + +// SetSectionFilter takes a list top-level LDML element names to which +// evaluation of LDML should be limited. It automatically calls SetDirFilter. +func (d *Decoder) SetSectionFilter(filter ...string) { + d.sectionFilter = filter + // TODO: automatically set dir filter +} + +// SetDirFilter limits the loading of LDML XML files of the specied directories. +// Note that sections may be split across directories differently for different CLDR versions. +// For more robust code, use SetSectionFilter. +func (d *Decoder) SetDirFilter(dir ...string) { + d.dirFilter = dir +} + +// A Loader provides access to the files of a CLDR archive. +type Loader interface { + Len() int + Path(i int) string + Reader(i int) (io.ReadCloser, error) +} + +var fileRe = regexp.MustCompile(".*/(.*)/(.*)\\.xml") + +// Decode loads and decodes the files represented by l. +func (d *Decoder) Decode(l Loader) (cldr *CLDR, err error) { + d.cldr = makeCLDR() + for i := 0; i < l.Len(); i++ { + fname := l.Path(i) + if m := fileRe.FindStringSubmatch(fname); m != nil { + if len(d.dirFilter) > 0 && !in(d.dirFilter, m[1]) { + continue + } + var r io.Reader + if r, err = l.Reader(i); err == nil { + err = d.decode(m[1], m[2], r) + } + if err != nil { + return nil, err + } + } + } + d.cldr.finalize(d.sectionFilter) + return d.cldr, nil +} + +func (d *Decoder) decode(dir, id string, r io.Reader) error { + var v interface{} + var l *LDML + cldr := d.cldr + switch { + case dir == "supplemental": + v = cldr.supp + case dir == "transforms": + return nil + case dir == "bcp47": + v = cldr.bcp47 + case dir == "validity": + return nil + default: + ok := false + if v, ok = cldr.locale[id]; !ok { + l = &LDML{} + v, cldr.locale[id] = l, l + } + } + x := xml.NewDecoder(r) + if err := x.Decode(v); err != nil { + log.Printf("%s/%s: %v", dir, id, err) + return err + } + if l != nil { + if l.Identity == nil { + return fmt.Errorf("%s/%s: missing identity element", dir, id) + } + // TODO: verify when CLDR bug http://unicode.org/cldr/trac/ticket/8970 + // is resolved. + // path := strings.Split(id, "_") + // if lang := l.Identity.Language.Type; lang != path[0] { + // return fmt.Errorf("%s/%s: language was %s; want %s", dir, id, lang, path[0]) + // } + } + return nil +} + +type pathLoader []string + +func makePathLoader(path string) (pl pathLoader, err error) { + err = filepath.Walk(path, func(path string, _ os.FileInfo, err error) error { + pl = append(pl, path) + return err + }) + return pl, err +} + +func (pl pathLoader) Len() int { + return len(pl) +} + +func (pl pathLoader) Path(i int) string { + return pl[i] +} + +func (pl pathLoader) Reader(i int) (io.ReadCloser, error) { + return os.Open(pl[i]) +} + +// DecodePath loads CLDR data from the given path. +func (d *Decoder) DecodePath(path string) (cldr *CLDR, err error) { + loader, err := makePathLoader(path) + if err != nil { + return nil, err + } + return d.Decode(loader) +} + +type zipLoader struct { + r *zip.Reader +} + +func (zl zipLoader) Len() int { + return len(zl.r.File) +} + +func (zl zipLoader) Path(i int) string { + return zl.r.File[i].Name +} + +func (zl zipLoader) Reader(i int) (io.ReadCloser, error) { + return zl.r.File[i].Open() +} + +// DecodeZip loads CLDR data from the zip archive for which r is the source. +func (d *Decoder) DecodeZip(r io.Reader) (cldr *CLDR, err error) { + buffer, err := ioutil.ReadAll(r) + if err != nil { + return nil, err + } + archive, err := zip.NewReader(bytes.NewReader(buffer), int64(len(buffer))) + if err != nil { + return nil, err + } + return d.Decode(zipLoader{archive}) +} diff --git a/vendor/golang.org/x/text/unicode/cldr/examples_test.go b/vendor/golang.org/x/text/unicode/cldr/examples_test.go new file mode 100644 index 000000000..1a69b0073 --- /dev/null +++ b/vendor/golang.org/x/text/unicode/cldr/examples_test.go @@ -0,0 +1,21 @@ +package cldr_test + +import ( + "fmt" + + "golang.org/x/text/unicode/cldr" +) + +func ExampleSlice() { + var dr *cldr.CLDR // assume this is initialized + + x, _ := dr.LDML("en") + cs := x.Collations.Collation + // remove all but the default + cldr.MakeSlice(&cs).Filter(func(e cldr.Elem) bool { + return e.GetCommon().Type != x.Collations.Default() + }) + for i, c := range cs { + fmt.Println(i, c.Type) + } +} diff --git a/vendor/golang.org/x/text/unicode/cldr/makexml.go b/vendor/golang.org/x/text/unicode/cldr/makexml.go new file mode 100644 index 000000000..6114d01cb --- /dev/null +++ b/vendor/golang.org/x/text/unicode/cldr/makexml.go @@ -0,0 +1,400 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +// This tool generates types for the various XML formats of CLDR. +package main + +import ( + "archive/zip" + "bytes" + "encoding/xml" + "flag" + "fmt" + "io" + "io/ioutil" + "log" + "os" + "regexp" + "strings" + + "golang.org/x/text/internal/gen" +) + +var outputFile = flag.String("output", "xml.go", "output file name") + +func main() { + flag.Parse() + + r := gen.OpenCLDRCoreZip() + buffer, err := ioutil.ReadAll(r) + if err != nil { + log.Fatal("Could not read zip file") + } + r.Close() + z, err := zip.NewReader(bytes.NewReader(buffer), int64(len(buffer))) + if err != nil { + log.Fatalf("Could not read zip archive: %v", err) + } + + var buf bytes.Buffer + + version := gen.CLDRVersion() + + for _, dtd := range files { + for _, f := range z.File { + if strings.HasSuffix(f.Name, dtd.file+".dtd") { + r, err := f.Open() + failOnError(err) + + b := makeBuilder(&buf, dtd) + b.parseDTD(r) + b.resolve(b.index[dtd.top[0]]) + b.write() + if b.version != "" && version != b.version { + println(f.Name) + log.Fatalf("main: inconsistent versions: found %s; want %s", b.version, version) + } + break + } + } + } + fmt.Fprintln(&buf, "// Version is the version of CLDR from which the XML definitions are generated.") + fmt.Fprintf(&buf, "const Version = %q\n", version) + + gen.WriteGoFile(*outputFile, "cldr", buf.Bytes()) +} + +func failOnError(err error) { + if err != nil { + log.New(os.Stderr, "", log.Lshortfile).Output(2, err.Error()) + os.Exit(1) + } +} + +// configuration data per DTD type +type dtd struct { + file string // base file name + root string // Go name of the root XML element + top []string // create a different type for this section + + skipElem []string // hard-coded or deprecated elements + skipAttr []string // attributes to exclude + predefined []string // hard-coded elements exist of the form <name>Elem + forceRepeat []string // elements to make slices despite DTD +} + +var files = []dtd{ + { + file: "ldmlBCP47", + root: "LDMLBCP47", + top: []string{"ldmlBCP47"}, + skipElem: []string{ + "cldrVersion", // deprecated, not used + }, + }, + { + file: "ldmlSupplemental", + root: "SupplementalData", + top: []string{"supplementalData"}, + skipElem: []string{ + "cldrVersion", // deprecated, not used + }, + forceRepeat: []string{ + "plurals", // data defined in plurals.xml and ordinals.xml + }, + }, + { + file: "ldml", + root: "LDML", + top: []string{ + "ldml", "collation", "calendar", "timeZoneNames", "localeDisplayNames", "numbers", + }, + skipElem: []string{ + "cp", // not used anywhere + "special", // not used anywhere + "fallback", // deprecated, not used + "alias", // in Common + "default", // in Common + }, + skipAttr: []string{ + "hiraganaQuarternary", // typo in DTD, correct version included as well + }, + predefined: []string{"rules"}, + }, +} + +var comments = map[string]string{ + "ldmlBCP47": ` +// LDMLBCP47 holds information on allowable values for various variables in LDML. +`, + "supplementalData": ` +// SupplementalData holds information relevant for internationalization +// and proper use of CLDR, but that is not contained in the locale hierarchy. +`, + "ldml": ` +// LDML is the top-level type for locale-specific data. +`, + "collation": ` +// Collation contains rules that specify a certain sort-order, +// as a tailoring of the root order. +// The parsed rules are obtained by passing a RuleProcessor to Collation's +// Process method. +`, + "calendar": ` +// Calendar specifies the fields used for formatting and parsing dates and times. +// The month and quarter names are identified numerically, starting at 1. +// The day (of the week) names are identified with short strings, since there is +// no universally-accepted numeric designation. +`, + "dates": ` +// Dates contains information regarding the format and parsing of dates and times. +`, + "localeDisplayNames": ` +// LocaleDisplayNames specifies localized display names for for scripts, languages, +// countries, currencies, and variants. +`, + "numbers": ` +// Numbers supplies information for formatting and parsing numbers and currencies. +`, +} + +type element struct { + name string // XML element name + category string // elements contained by this element + signature string // category + attrKey* + + attr []*attribute // attributes supported by this element. + sub []struct { // parsed and evaluated sub elements of this element. + e *element + repeat bool // true if the element needs to be a slice + } + + resolved bool // prevent multiple resolutions of this element. +} + +type attribute struct { + name string + key string + list []string + + tag string // Go tag +} + +var ( + reHead = regexp.MustCompile(` *(\w+) +([\w\-]+)`) + reAttr = regexp.MustCompile(` *(\w+) *(?:(\w+)|\(([\w\- \|]+)\)) *(?:#([A-Z]*) *(?:\"([\.\d+])\")?)? *("[\w\-:]*")?`) + reElem = regexp.MustCompile(`^ *(EMPTY|ANY|\(.*\)[\*\+\?]?) *$`) + reToken = regexp.MustCompile(`\w\-`) +) + +// builder is used to read in the DTD files from CLDR and generate Go code +// to be used with the encoding/xml package. +type builder struct { + w io.Writer + index map[string]*element + elem []*element + info dtd + version string +} + +func makeBuilder(w io.Writer, d dtd) builder { + return builder{ + w: w, + index: make(map[string]*element), + elem: []*element{}, + info: d, + } +} + +// parseDTD parses a DTD file. +func (b *builder) parseDTD(r io.Reader) { + for d := xml.NewDecoder(r); ; { + t, err := d.Token() + if t == nil { + break + } + failOnError(err) + dir, ok := t.(xml.Directive) + if !ok { + continue + } + m := reHead.FindSubmatch(dir) + dir = dir[len(m[0]):] + ename := string(m[2]) + el, elementFound := b.index[ename] + switch string(m[1]) { + case "ELEMENT": + if elementFound { + log.Fatal("parseDTD: duplicate entry for element %q", ename) + } + m := reElem.FindSubmatch(dir) + if m == nil { + log.Fatalf("parseDTD: invalid element %q", string(dir)) + } + if len(m[0]) != len(dir) { + log.Fatal("parseDTD: invalid element %q", string(dir), len(dir), len(m[0]), string(m[0])) + } + s := string(m[1]) + el = &element{ + name: ename, + category: s, + } + b.index[ename] = el + case "ATTLIST": + if !elementFound { + log.Fatalf("parseDTD: unknown element %q", ename) + } + s := string(dir) + m := reAttr.FindStringSubmatch(s) + if m == nil { + log.Fatal(fmt.Errorf("parseDTD: invalid attribute %q", string(dir))) + } + if m[4] == "FIXED" { + b.version = m[5] + } else { + switch m[1] { + case "draft", "references", "alt", "validSubLocales", "standard" /* in Common */ : + case "type", "choice": + default: + el.attr = append(el.attr, &attribute{ + name: m[1], + key: s, + list: reToken.FindAllString(m[3], -1), + }) + el.signature = fmt.Sprintf("%s=%s+%s", el.signature, m[1], m[2]) + } + } + } + } +} + +var reCat = regexp.MustCompile(`[ ,\|]*(?:(\(|\)|\#?[\w_-]+)([\*\+\?]?))?`) + +// resolve takes a parsed element and converts it into structured data +// that can be used to generate the XML code. +func (b *builder) resolve(e *element) { + if e.resolved { + return + } + b.elem = append(b.elem, e) + e.resolved = true + s := e.category + found := make(map[string]bool) + sequenceStart := []int{} + for len(s) > 0 { + m := reCat.FindStringSubmatch(s) + if m == nil { + log.Fatalf("%s: invalid category string %q", e.name, s) + } + repeat := m[2] == "*" || m[2] == "+" || in(b.info.forceRepeat, m[1]) + switch m[1] { + case "": + case "(": + sequenceStart = append(sequenceStart, len(e.sub)) + case ")": + if len(sequenceStart) == 0 { + log.Fatalf("%s: unmatched closing parenthesis", e.name) + } + for i := sequenceStart[len(sequenceStart)-1]; i < len(e.sub); i++ { + e.sub[i].repeat = e.sub[i].repeat || repeat + } + sequenceStart = sequenceStart[:len(sequenceStart)-1] + default: + if in(b.info.skipElem, m[1]) { + } else if sub, ok := b.index[m[1]]; ok { + if !found[sub.name] { + e.sub = append(e.sub, struct { + e *element + repeat bool + }{sub, repeat}) + found[sub.name] = true + b.resolve(sub) + } + } else if m[1] == "#PCDATA" || m[1] == "ANY" { + } else if m[1] != "EMPTY" { + log.Fatalf("resolve:%s: element %q not found", e.name, m[1]) + } + } + s = s[len(m[0]):] + } +} + +// return true if s is contained in set. +func in(set []string, s string) bool { + for _, v := range set { + if v == s { + return true + } + } + return false +} + +var repl = strings.NewReplacer("-", " ", "_", " ") + +// title puts the first character or each character following '_' in title case and +// removes all occurrences of '_'. +func title(s string) string { + return strings.Replace(strings.Title(repl.Replace(s)), " ", "", -1) +} + +// writeElem generates Go code for a single element, recursively. +func (b *builder) writeElem(tab int, e *element) { + p := func(f string, x ...interface{}) { + f = strings.Replace(f, "\n", "\n"+strings.Repeat("\t", tab), -1) + fmt.Fprintf(b.w, f, x...) + } + if len(e.sub) == 0 && len(e.attr) == 0 { + p("Common") + return + } + p("struct {") + tab++ + p("\nCommon") + for _, attr := range e.attr { + if !in(b.info.skipAttr, attr.name) { + p("\n%s string `xml:\"%s,attr\"`", title(attr.name), attr.name) + } + } + for _, sub := range e.sub { + if in(b.info.predefined, sub.e.name) { + p("\n%sElem", sub.e.name) + continue + } + if in(b.info.skipElem, sub.e.name) { + continue + } + p("\n%s ", title(sub.e.name)) + if sub.repeat { + p("[]") + } + p("*") + if in(b.info.top, sub.e.name) { + p(title(sub.e.name)) + } else { + b.writeElem(tab, sub.e) + } + p(" `xml:\"%s\"`", sub.e.name) + } + tab-- + p("\n}") +} + +// write generates the Go XML code. +func (b *builder) write() { + for i, name := range b.info.top { + e := b.index[name] + if e != nil { + fmt.Fprintf(b.w, comments[name]) + name := title(e.name) + if i == 0 { + name = b.info.root + } + fmt.Fprintf(b.w, "type %s ", name) + b.writeElem(0, e) + fmt.Fprint(b.w, "\n") + } + } +} diff --git a/vendor/golang.org/x/text/unicode/cldr/resolve.go b/vendor/golang.org/x/text/unicode/cldr/resolve.go new file mode 100644 index 000000000..691b5903f --- /dev/null +++ b/vendor/golang.org/x/text/unicode/cldr/resolve.go @@ -0,0 +1,602 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cldr + +// This file implements the various inheritance constructs defined by LDML. +// See http://www.unicode.org/reports/tr35/#Inheritance_and_Validity +// for more details. + +import ( + "fmt" + "log" + "reflect" + "regexp" + "sort" + "strings" +) + +// fieldIter iterates over fields in a struct. It includes +// fields of embedded structs. +type fieldIter struct { + v reflect.Value + index, n []int +} + +func iter(v reflect.Value) fieldIter { + if v.Kind() != reflect.Struct { + log.Panicf("value %v must be a struct", v) + } + i := fieldIter{ + v: v, + index: []int{0}, + n: []int{v.NumField()}, + } + i.descent() + return i +} + +func (i *fieldIter) descent() { + for f := i.field(); f.Anonymous && f.Type.NumField() > 0; f = i.field() { + i.index = append(i.index, 0) + i.n = append(i.n, f.Type.NumField()) + } +} + +func (i *fieldIter) done() bool { + return len(i.index) == 1 && i.index[0] >= i.n[0] +} + +func skip(f reflect.StructField) bool { + return !f.Anonymous && (f.Name[0] < 'A' || f.Name[0] > 'Z') +} + +func (i *fieldIter) next() { + for { + k := len(i.index) - 1 + i.index[k]++ + if i.index[k] < i.n[k] { + if !skip(i.field()) { + break + } + } else { + if k == 0 { + return + } + i.index = i.index[:k] + i.n = i.n[:k] + } + } + i.descent() +} + +func (i *fieldIter) value() reflect.Value { + return i.v.FieldByIndex(i.index) +} + +func (i *fieldIter) field() reflect.StructField { + return i.v.Type().FieldByIndex(i.index) +} + +type visitor func(v reflect.Value) error + +var stopDescent = fmt.Errorf("do not recurse") + +func (f visitor) visit(x interface{}) error { + return f.visitRec(reflect.ValueOf(x)) +} + +// visit recursively calls f on all nodes in v. +func (f visitor) visitRec(v reflect.Value) error { + if v.Kind() == reflect.Ptr { + if v.IsNil() { + return nil + } + return f.visitRec(v.Elem()) + } + if err := f(v); err != nil { + if err == stopDescent { + return nil + } + return err + } + switch v.Kind() { + case reflect.Struct: + for i := iter(v); !i.done(); i.next() { + if err := f.visitRec(i.value()); err != nil { + return err + } + } + case reflect.Slice: + for i := 0; i < v.Len(); i++ { + if err := f.visitRec(v.Index(i)); err != nil { + return err + } + } + } + return nil +} + +// getPath is used for error reporting purposes only. +func getPath(e Elem) string { + if e == nil { + return "<nil>" + } + if e.enclosing() == nil { + return e.GetCommon().name + } + if e.GetCommon().Type == "" { + return fmt.Sprintf("%s.%s", getPath(e.enclosing()), e.GetCommon().name) + } + return fmt.Sprintf("%s.%s[type=%s]", getPath(e.enclosing()), e.GetCommon().name, e.GetCommon().Type) +} + +// xmlName returns the xml name of the element or attribute +func xmlName(f reflect.StructField) (name string, attr bool) { + tags := strings.Split(f.Tag.Get("xml"), ",") + for _, s := range tags { + attr = attr || s == "attr" + } + return tags[0], attr +} + +func findField(v reflect.Value, key string) (reflect.Value, error) { + v = reflect.Indirect(v) + for i := iter(v); !i.done(); i.next() { + if n, _ := xmlName(i.field()); n == key { + return i.value(), nil + } + } + return reflect.Value{}, fmt.Errorf("cldr: no field %q in element %#v", key, v.Interface()) +} + +var xpathPart = regexp.MustCompile(`(\pL+)(?:\[@(\pL+)='([\w-]+)'\])?`) + +func walkXPath(e Elem, path string) (res Elem, err error) { + for _, c := range strings.Split(path, "/") { + if c == ".." { + if e = e.enclosing(); e == nil { + panic("path ..") + return nil, fmt.Errorf(`cldr: ".." moves past root in path %q`, path) + } + continue + } else if c == "" { + continue + } + m := xpathPart.FindStringSubmatch(c) + if len(m) == 0 || len(m[0]) != len(c) { + return nil, fmt.Errorf("cldr: syntax error in path component %q", c) + } + v, err := findField(reflect.ValueOf(e), m[1]) + if err != nil { + return nil, err + } + switch v.Kind() { + case reflect.Slice: + i := 0 + if m[2] != "" || v.Len() > 1 { + if m[2] == "" { + m[2] = "type" + if m[3] = e.GetCommon().Default(); m[3] == "" { + return nil, fmt.Errorf("cldr: type selector or default value needed for element %s", m[1]) + } + } + for ; i < v.Len(); i++ { + vi := v.Index(i) + key, err := findField(vi.Elem(), m[2]) + if err != nil { + return nil, err + } + key = reflect.Indirect(key) + if key.Kind() == reflect.String && key.String() == m[3] { + break + } + } + } + if i == v.Len() || v.Index(i).IsNil() { + return nil, fmt.Errorf("no %s found with %s==%s", m[1], m[2], m[3]) + } + e = v.Index(i).Interface().(Elem) + case reflect.Ptr: + if v.IsNil() { + return nil, fmt.Errorf("cldr: element %q not found within element %q", m[1], e.GetCommon().name) + } + var ok bool + if e, ok = v.Interface().(Elem); !ok { + return nil, fmt.Errorf("cldr: %q is not an XML element", m[1]) + } else if m[2] != "" || m[3] != "" { + return nil, fmt.Errorf("cldr: no type selector allowed for element %s", m[1]) + } + default: + return nil, fmt.Errorf("cldr: %q is not an XML element", m[1]) + } + } + return e, nil +} + +const absPrefix = "//ldml/" + +func (cldr *CLDR) resolveAlias(e Elem, src, path string) (res Elem, err error) { + if src != "locale" { + if !strings.HasPrefix(path, absPrefix) { + return nil, fmt.Errorf("cldr: expected absolute path, found %q", path) + } + path = path[len(absPrefix):] + if e, err = cldr.resolve(src); err != nil { + return nil, err + } + } + return walkXPath(e, path) +} + +func (cldr *CLDR) resolveAndMergeAlias(e Elem) error { + alias := e.GetCommon().Alias + if alias == nil { + return nil + } + a, err := cldr.resolveAlias(e, alias.Source, alias.Path) + if err != nil { + return fmt.Errorf("%v: error evaluating path %q: %v", getPath(e), alias.Path, err) + } + // Ensure alias node was already evaluated. TODO: avoid double evaluation. + err = cldr.resolveAndMergeAlias(a) + v := reflect.ValueOf(e).Elem() + for i := iter(reflect.ValueOf(a).Elem()); !i.done(); i.next() { + if vv := i.value(); vv.Kind() != reflect.Ptr || !vv.IsNil() { + if _, attr := xmlName(i.field()); !attr { + v.FieldByIndex(i.index).Set(vv) + } + } + } + return err +} + +func (cldr *CLDR) aliasResolver() visitor { + return func(v reflect.Value) (err error) { + if e, ok := v.Addr().Interface().(Elem); ok { + err = cldr.resolveAndMergeAlias(e) + if err == nil && blocking[e.GetCommon().name] { + return stopDescent + } + } + return err + } +} + +// elements within blocking elements do not inherit. +// Taken from CLDR's supplementalMetaData.xml. +var blocking = map[string]bool{ + "identity": true, + "supplementalData": true, + "cldrTest": true, + "collation": true, + "transform": true, +} + +// Distinguishing attributes affect inheritance; two elements with different +// distinguishing attributes are treated as different for purposes of inheritance, +// except when such attributes occur in the indicated elements. +// Taken from CLDR's supplementalMetaData.xml. +var distinguishing = map[string][]string{ + "key": nil, + "request_id": nil, + "id": nil, + "registry": nil, + "alt": nil, + "iso4217": nil, + "iso3166": nil, + "mzone": nil, + "from": nil, + "to": nil, + "type": []string{ + "abbreviationFallback", + "default", + "mapping", + "measurementSystem", + "preferenceOrdering", + }, + "numberSystem": nil, +} + +func in(set []string, s string) bool { + for _, v := range set { + if v == s { + return true + } + } + return false +} + +// attrKey computes a key based on the distinguishable attributes of +// an element and it's values. +func attrKey(v reflect.Value, exclude ...string) string { + parts := []string{} + ename := v.Interface().(Elem).GetCommon().name + v = v.Elem() + for i := iter(v); !i.done(); i.next() { + if name, attr := xmlName(i.field()); attr { + if except, ok := distinguishing[name]; ok && !in(exclude, name) && !in(except, ename) { + v := i.value() + if v.Kind() == reflect.Ptr { + v = v.Elem() + } + if v.IsValid() { + parts = append(parts, fmt.Sprintf("%s=%s", name, v.String())) + } + } + } + } + sort.Strings(parts) + return strings.Join(parts, ";") +} + +// Key returns a key for e derived from all distinguishing attributes +// except those specified by exclude. +func Key(e Elem, exclude ...string) string { + return attrKey(reflect.ValueOf(e), exclude...) +} + +// linkEnclosing sets the enclosing element as well as the name +// for all sub-elements of child, recursively. +func linkEnclosing(parent, child Elem) { + child.setEnclosing(parent) + v := reflect.ValueOf(child).Elem() + for i := iter(v); !i.done(); i.next() { + vf := i.value() + if vf.Kind() == reflect.Slice { + for j := 0; j < vf.Len(); j++ { + linkEnclosing(child, vf.Index(j).Interface().(Elem)) + } + } else if vf.Kind() == reflect.Ptr && !vf.IsNil() && vf.Elem().Kind() == reflect.Struct { + linkEnclosing(child, vf.Interface().(Elem)) + } + } +} + +func setNames(e Elem, name string) { + e.setName(name) + v := reflect.ValueOf(e).Elem() + for i := iter(v); !i.done(); i.next() { + vf := i.value() + name, _ = xmlName(i.field()) + if vf.Kind() == reflect.Slice { + for j := 0; j < vf.Len(); j++ { + setNames(vf.Index(j).Interface().(Elem), name) + } + } else if vf.Kind() == reflect.Ptr && !vf.IsNil() && vf.Elem().Kind() == reflect.Struct { + setNames(vf.Interface().(Elem), name) + } + } +} + +// deepCopy copies elements of v recursively. All elements of v that may +// be modified by inheritance are explicitly copied. +func deepCopy(v reflect.Value) reflect.Value { + switch v.Kind() { + case reflect.Ptr: + if v.IsNil() || v.Elem().Kind() != reflect.Struct { + return v + } + nv := reflect.New(v.Elem().Type()) + nv.Elem().Set(v.Elem()) + deepCopyRec(nv.Elem(), v.Elem()) + return nv + case reflect.Slice: + nv := reflect.MakeSlice(v.Type(), v.Len(), v.Len()) + for i := 0; i < v.Len(); i++ { + deepCopyRec(nv.Index(i), v.Index(i)) + } + return nv + } + panic("deepCopy: must be called with pointer or slice") +} + +// deepCopyRec is only called by deepCopy. +func deepCopyRec(nv, v reflect.Value) { + if v.Kind() == reflect.Struct { + t := v.Type() + for i := 0; i < v.NumField(); i++ { + if name, attr := xmlName(t.Field(i)); name != "" && !attr { + deepCopyRec(nv.Field(i), v.Field(i)) + } + } + } else { + nv.Set(deepCopy(v)) + } +} + +// newNode is used to insert a missing node during inheritance. +func (cldr *CLDR) newNode(v, enc reflect.Value) reflect.Value { + n := reflect.New(v.Type()) + for i := iter(v); !i.done(); i.next() { + if name, attr := xmlName(i.field()); name == "" || attr { + n.Elem().FieldByIndex(i.index).Set(i.value()) + } + } + n.Interface().(Elem).GetCommon().setEnclosing(enc.Addr().Interface().(Elem)) + return n +} + +// v, parent must be pointers to struct +func (cldr *CLDR) inheritFields(v, parent reflect.Value) (res reflect.Value, err error) { + t := v.Type() + nv := reflect.New(t) + nv.Elem().Set(v) + for i := iter(v); !i.done(); i.next() { + vf := i.value() + f := i.field() + name, attr := xmlName(f) + if name == "" || attr { + continue + } + pf := parent.FieldByIndex(i.index) + if blocking[name] { + if vf.IsNil() { + vf = pf + } + nv.Elem().FieldByIndex(i.index).Set(deepCopy(vf)) + continue + } + switch f.Type.Kind() { + case reflect.Ptr: + if f.Type.Elem().Kind() == reflect.Struct { + if !vf.IsNil() { + if vf, err = cldr.inheritStructPtr(vf, pf); err != nil { + return reflect.Value{}, err + } + vf.Interface().(Elem).setEnclosing(nv.Interface().(Elem)) + nv.Elem().FieldByIndex(i.index).Set(vf) + } else if !pf.IsNil() { + n := cldr.newNode(pf.Elem(), v) + if vf, err = cldr.inheritStructPtr(n, pf); err != nil { + return reflect.Value{}, err + } + vf.Interface().(Elem).setEnclosing(nv.Interface().(Elem)) + nv.Elem().FieldByIndex(i.index).Set(vf) + } + } + case reflect.Slice: + vf, err := cldr.inheritSlice(nv.Elem(), vf, pf) + if err != nil { + return reflect.Zero(t), err + } + nv.Elem().FieldByIndex(i.index).Set(vf) + } + } + return nv, nil +} + +func root(e Elem) *LDML { + for ; e.enclosing() != nil; e = e.enclosing() { + } + return e.(*LDML) +} + +// inheritStructPtr first merges possible aliases in with v and then inherits +// any underspecified elements from parent. +func (cldr *CLDR) inheritStructPtr(v, parent reflect.Value) (r reflect.Value, err error) { + if !v.IsNil() { + e := v.Interface().(Elem).GetCommon() + alias := e.Alias + if alias == nil && !parent.IsNil() { + alias = parent.Interface().(Elem).GetCommon().Alias + } + if alias != nil { + a, err := cldr.resolveAlias(v.Interface().(Elem), alias.Source, alias.Path) + if a != nil { + if v, err = cldr.inheritFields(v.Elem(), reflect.ValueOf(a).Elem()); err != nil { + return reflect.Value{}, err + } + } + } + if !parent.IsNil() { + return cldr.inheritFields(v.Elem(), parent.Elem()) + } + } else if parent.IsNil() { + panic("should not reach here") + } + return v, nil +} + +// Must be slice of struct pointers. +func (cldr *CLDR) inheritSlice(enc, v, parent reflect.Value) (res reflect.Value, err error) { + t := v.Type() + index := make(map[string]reflect.Value) + if !v.IsNil() { + for i := 0; i < v.Len(); i++ { + vi := v.Index(i) + key := attrKey(vi) + index[key] = vi + } + } + if !parent.IsNil() { + for i := 0; i < parent.Len(); i++ { + vi := parent.Index(i) + key := attrKey(vi) + if w, ok := index[key]; ok { + index[key], err = cldr.inheritStructPtr(w, vi) + } else { + n := cldr.newNode(vi.Elem(), enc) + index[key], err = cldr.inheritStructPtr(n, vi) + } + index[key].Interface().(Elem).setEnclosing(enc.Addr().Interface().(Elem)) + if err != nil { + return v, err + } + } + } + keys := make([]string, 0, len(index)) + for k, _ := range index { + keys = append(keys, k) + } + sort.Strings(keys) + sl := reflect.MakeSlice(t, len(index), len(index)) + for i, k := range keys { + sl.Index(i).Set(index[k]) + } + return sl, nil +} + +func parentLocale(loc string) string { + parts := strings.Split(loc, "_") + if len(parts) == 1 { + return "root" + } + parts = parts[:len(parts)-1] + key := strings.Join(parts, "_") + return key +} + +func (cldr *CLDR) resolve(loc string) (res *LDML, err error) { + if r := cldr.resolved[loc]; r != nil { + return r, nil + } + x := cldr.RawLDML(loc) + if x == nil { + return nil, fmt.Errorf("cldr: unknown locale %q", loc) + } + var v reflect.Value + if loc == "root" { + x = deepCopy(reflect.ValueOf(x)).Interface().(*LDML) + linkEnclosing(nil, x) + err = cldr.aliasResolver().visit(x) + } else { + key := parentLocale(loc) + var parent *LDML + for ; cldr.locale[key] == nil; key = parentLocale(key) { + } + if parent, err = cldr.resolve(key); err != nil { + return nil, err + } + v, err = cldr.inheritFields(reflect.ValueOf(x).Elem(), reflect.ValueOf(parent).Elem()) + x = v.Interface().(*LDML) + linkEnclosing(nil, x) + } + if err != nil { + return nil, err + } + cldr.resolved[loc] = x + return x, err +} + +// finalize finalizes the initialization of the raw LDML structs. It also +// removed unwanted fields, as specified by filter, so that they will not +// be unnecessarily evaluated. +func (cldr *CLDR) finalize(filter []string) { + for _, x := range cldr.locale { + if filter != nil { + v := reflect.ValueOf(x).Elem() + t := v.Type() + for i := 0; i < v.NumField(); i++ { + f := t.Field(i) + name, _ := xmlName(f) + if name != "" && name != "identity" && !in(filter, name) { + v.Field(i).Set(reflect.Zero(f.Type)) + } + } + } + linkEnclosing(nil, x) // for resolving aliases and paths + setNames(x, "ldml") + } +} diff --git a/vendor/golang.org/x/text/unicode/cldr/resolve_test.go b/vendor/golang.org/x/text/unicode/cldr/resolve_test.go new file mode 100644 index 000000000..3d8edaec8 --- /dev/null +++ b/vendor/golang.org/x/text/unicode/cldr/resolve_test.go @@ -0,0 +1,368 @@ +package cldr + +import ( + "fmt" + "log" + "reflect" + "testing" +) + +func failOnError(err error) { + if err != nil { + log.Panic(err) + } +} + +func data() *CLDR { + d := Decoder{} + data, err := d.Decode(testLoader{}) + failOnError(err) + return data +} + +type h struct { + A string `xml:"ha,attr"` + E string `xml:"he"` + D string `xml:",chardata"` + X string +} + +type fieldTest struct { + Common + To string `xml:"to,attr"` + Key string `xml:"key,attr"` + E string `xml:"e"` + D string `xml:",chardata"` + X string + h +} + +var testStruct = fieldTest{ + Common: Common{ + name: "mapping", // exclude "type" as distinguishing attribute + Type: "foo", + Alt: "foo", + }, + To: "nyc", + Key: "k", + E: "E", + D: "D", + h: h{ + A: "A", + E: "E", + D: "D", + }, +} + +func TestIter(t *testing.T) { + tests := map[string]string{ + "Type": "foo", + "Alt": "foo", + "To": "nyc", + "A": "A", + "Alias": "<nil>", + } + k := 0 + for i := iter(reflect.ValueOf(testStruct)); !i.done(); i.next() { + v := i.value() + if v.Kind() == reflect.Ptr && v.Elem().Kind() == reflect.String { + v = v.Elem() + } + name := i.field().Name + if w, ok := tests[name]; ok { + s := fmt.Sprint(v.Interface()) + if w != s { + t.Errorf("value: found %q; want %q", w, s) + } + delete(tests, name) + } + k++ + } + if len(tests) != 0 { + t.Errorf("missing fields: %v", tests) + } +} + +func TestFindField(t *testing.T) { + tests := []struct { + name, val string + exist bool + }{ + {"type", "foo", true}, + {"alt", "foo", true}, + {"to", "nyc", true}, + {"he", "E", true}, + {"q", "", false}, + } + vf := reflect.ValueOf(testStruct) + for i, tt := range tests { + v, err := findField(vf, tt.name) + if (err == nil) != tt.exist { + t.Errorf("%d: field %q present is %v; want %v", i, tt.name, err == nil, tt.exist) + } else if tt.exist { + if v.Kind() == reflect.Ptr { + if v.IsNil() { + continue + } + v = v.Elem() + } + if v.String() != tt.val { + t.Errorf("%d: found value %q; want %q", i, v.String(), tt.val) + } + } + } +} + +var keyTests = []struct { + exclude []string + key string +}{ + {[]string{}, "alt=foo;key=k;to=nyc"}, + {[]string{"type"}, "alt=foo;key=k;to=nyc"}, + {[]string{"choice"}, "alt=foo;key=k;to=nyc"}, + {[]string{"alt"}, "key=k;to=nyc"}, + {[]string{"a"}, "alt=foo;key=k;to=nyc"}, + {[]string{"to"}, "alt=foo;key=k"}, + {[]string{"alt", "to"}, "key=k"}, + {[]string{"alt", "to", "key"}, ""}, +} + +func TestAttrKey(t *testing.T) { + v := reflect.ValueOf(&testStruct) + for i, tt := range keyTests { + key := attrKey(v, tt.exclude...) + if key != tt.key { + t.Errorf("%d: found %q, want %q", i, key, tt.key) + } + } +} + +func TestKey(t *testing.T) { + for i, tt := range keyTests { + key := Key(&testStruct, tt.exclude...) + if key != tt.key { + t.Errorf("%d: found %q, want %q", i, key, tt.key) + } + } +} + +func testEnclosing(t *testing.T, x *LDML, name string) { + eq := func(a, b Elem, i int) { + for ; i > 0; i-- { + b = b.enclosing() + } + if a != b { + t.Errorf("%s: found path %q, want %q", name, getPath(a), getPath(b)) + } + } + eq(x, x, 0) + eq(x, x.Identity, 1) + eq(x, x.Dates.Calendars, 2) + eq(x, x.Dates.Calendars.Calendar[0], 3) + eq(x, x.Dates.Calendars.Calendar[1], 3) + //eq(x, x.Dates.Calendars.Calendar[0].Months, 4) + eq(x, x.Dates.Calendars.Calendar[1].Months, 4) +} + +func TestEnclosing(t *testing.T) { + testEnclosing(t, data().RawLDML("de"), "enclosing-raw") + de, _ := data().LDML("de") + testEnclosing(t, de, "enclosing") +} + +func TestDeepCopy(t *testing.T) { + eq := func(have, want string) { + if have != want { + t.Errorf("found %q; want %q", have, want) + } + } + x, _ := data().LDML("de") + vc := deepCopy(reflect.ValueOf(x)) + c := vc.Interface().(*LDML) + linkEnclosing(nil, c) + if x == c { + t.Errorf("did not copy") + } + + eq(c.name, "ldml") + eq(c.Dates.name, "dates") + testEnclosing(t, c, "deepCopy") +} + +type getTest struct { + loc string + path string + field string // used in combination with length + data string + altData string // used for buddhist calendar if value != "" + typ string + length int + missing bool +} + +const ( + budMon = "dates/calendars/calendar[@type='buddhist']/months/" + chnMon = "dates/calendars/calendar[@type='chinese']/months/" + greMon = "dates/calendars/calendar[@type='gregorian']/months/" +) + +func monthVal(path, context, width string, month int) string { + const format = "%s/monthContext[@type='%s']/monthWidth[@type='%s']/month[@type='%d']" + return fmt.Sprintf(format, path, context, width, month) +} + +var rootGetTests = []getTest{ + {loc: "root", path: "identity/language", typ: "root"}, + {loc: "root", path: "characters/moreInformation", data: "?"}, + {loc: "root", path: "characters", field: "exemplarCharacters", length: 3}, + {loc: "root", path: greMon, field: "monthContext", length: 2}, + {loc: "root", path: greMon + "monthContext[@type='format']/monthWidth[@type='narrow']", field: "month", length: 4}, + {loc: "root", path: greMon + "monthContext[@type='stand-alone']/monthWidth[@type='wide']", field: "month", length: 4}, + // unescaping character data + {loc: "root", path: "characters/exemplarCharacters[@type='punctuation']", data: `[\- ‐ – — … ' ‘ ‚ " “ „ \& #]`}, + // default resolution + {loc: "root", path: "dates/calendars/calendar", typ: "gregorian"}, + // alias resolution + {loc: "root", path: budMon, field: "monthContext", length: 2}, + // crossing but non-circular alias resolution + {loc: "root", path: budMon + "monthContext[@type='format']/monthWidth[@type='narrow']", field: "month", length: 4}, + {loc: "root", path: budMon + "monthContext[@type='stand-alone']/monthWidth[@type='wide']", field: "month", length: 4}, + {loc: "root", path: monthVal(greMon, "format", "wide", 1), data: "11"}, + {loc: "root", path: monthVal(greMon, "format", "narrow", 2), data: "2"}, + {loc: "root", path: monthVal(greMon, "stand-alone", "wide", 3), data: "33"}, + {loc: "root", path: monthVal(greMon, "stand-alone", "narrow", 4), data: "4"}, + {loc: "root", path: monthVal(budMon, "format", "wide", 1), data: "11"}, + {loc: "root", path: monthVal(budMon, "format", "narrow", 2), data: "2"}, + {loc: "root", path: monthVal(budMon, "stand-alone", "wide", 3), data: "33"}, + {loc: "root", path: monthVal(budMon, "stand-alone", "narrow", 4), data: "4"}, +} + +// 19 +var deGetTests = []getTest{ + {loc: "de", path: "identity/language", typ: "de"}, + {loc: "de", path: "posix", length: 2}, + {loc: "de", path: "characters", field: "exemplarCharacters", length: 4}, + {loc: "de", path: "characters/exemplarCharacters[@type='auxiliary']", data: `[á à ă]`}, + // identity is a blocking element, so de should not inherit generation from root. + {loc: "de", path: "identity/generation", missing: true}, + // default resolution + {loc: "root", path: "dates/calendars/calendar", typ: "gregorian"}, + + // absolute path alias resolution + {loc: "gsw", path: "posix", field: "messages", length: 1}, + {loc: "gsw", path: "posix/messages/yesstr", data: "yes:y"}, +} + +// 27(greMon) - 52(budMon) - 77(chnMon) +func calGetTests(s string) []getTest { + tests := []getTest{ + {loc: "de", path: s, length: 2}, + {loc: "de", path: s + "monthContext[@type='format']/monthWidth[@type='wide']", field: "month", length: 5}, + {loc: "de", path: monthVal(s, "format", "wide", 1), data: "11"}, + {loc: "de", path: monthVal(s, "format", "wide", 2), data: "22"}, + {loc: "de", path: monthVal(s, "format", "wide", 3), data: "Maerz", altData: "bbb"}, + {loc: "de", path: monthVal(s, "format", "wide", 4), data: "April"}, + {loc: "de", path: monthVal(s, "format", "wide", 5), data: "Mai"}, + + {loc: "de", path: s + "monthContext[@type='format']/monthWidth[@type='narrow']", field: "month", length: 5}, + {loc: "de", path: monthVal(s, "format", "narrow", 1), data: "1"}, + {loc: "de", path: monthVal(s, "format", "narrow", 2), data: "2"}, + {loc: "de", path: monthVal(s, "format", "narrow", 3), data: "M", altData: "BBB"}, + {loc: "de", path: monthVal(s, "format", "narrow", 4), data: "A"}, + {loc: "de", path: monthVal(s, "format", "narrow", 5), data: "m"}, + + {loc: "de", path: s + "monthContext[@type='stand-alone']/monthWidth[@type='wide']", field: "month", length: 5}, + {loc: "de", path: monthVal(s, "stand-alone", "wide", 1), data: "11"}, + {loc: "de", path: monthVal(s, "stand-alone", "wide", 2), data: "22"}, + {loc: "de", path: monthVal(s, "stand-alone", "wide", 3), data: "Maerz", altData: "bbb"}, + {loc: "de", path: monthVal(s, "stand-alone", "wide", 4), data: "april"}, + {loc: "de", path: monthVal(s, "stand-alone", "wide", 5), data: "mai"}, + + {loc: "de", path: s + "monthContext[@type='stand-alone']/monthWidth[@type='narrow']", field: "month", length: 5}, + {loc: "de", path: monthVal(s, "stand-alone", "narrow", 1), data: "1"}, + {loc: "de", path: monthVal(s, "stand-alone", "narrow", 2), data: "2"}, + {loc: "de", path: monthVal(s, "stand-alone", "narrow", 3), data: "m"}, + {loc: "de", path: monthVal(s, "stand-alone", "narrow", 4), data: "4"}, + {loc: "de", path: monthVal(s, "stand-alone", "narrow", 5), data: "m"}, + } + if s == budMon { + for i, t := range tests { + if t.altData != "" { + tests[i].data = t.altData + } + } + } + return tests +} + +var getTests = append(rootGetTests, + append(deGetTests, + append(calGetTests(greMon), + append(calGetTests(budMon), + calGetTests(chnMon)...)...)...)...) + +func TestPath(t *testing.T) { + d := data() + for i, tt := range getTests { + x, _ := d.LDML(tt.loc) + e, err := walkXPath(x, tt.path) + if err != nil { + if !tt.missing { + t.Errorf("%d:error: %v %v", i, err, tt.missing) + } + continue + } + if tt.missing { + t.Errorf("%d: missing is %v; want %v", i, e == nil, tt.missing) + continue + } + if tt.data != "" && e.GetCommon().Data() != tt.data { + t.Errorf("%d: data is %v; want %v", i, e.GetCommon().Data(), tt.data) + continue + } + if tt.typ != "" && e.GetCommon().Type != tt.typ { + t.Errorf("%d: type is %v; want %v", i, e.GetCommon().Type, tt.typ) + continue + } + if tt.field != "" { + slice, _ := findField(reflect.ValueOf(e), tt.field) + if slice.Len() != tt.length { + t.Errorf("%d: length is %v; want %v", i, slice.Len(), tt.length) + continue + } + } + } +} + +func TestGet(t *testing.T) { + d := data() + for i, tt := range getTests { + x, _ := d.LDML(tt.loc) + e, err := Get(x, tt.path) + if err != nil { + if !tt.missing { + t.Errorf("%d:error: %v %v", i, err, tt.missing) + } + continue + } + if tt.missing { + t.Errorf("%d: missing is %v; want %v", i, e == nil, tt.missing) + continue + } + if tt.data != "" && e.GetCommon().Data() != tt.data { + t.Errorf("%d: data is %v; want %v", i, e.GetCommon().Data(), tt.data) + continue + } + if tt.typ != "" && e.GetCommon().Type != tt.typ { + t.Errorf("%d: type is %v; want %v", i, e.GetCommon().Type, tt.typ) + continue + } + if tt.field != "" { + slice, _ := findField(reflect.ValueOf(e), tt.field) + if slice.Len() != tt.length { + t.Errorf("%d: length is %v; want %v", i, slice.Len(), tt.length) + continue + } + } + } +} diff --git a/vendor/golang.org/x/text/unicode/cldr/slice.go b/vendor/golang.org/x/text/unicode/cldr/slice.go new file mode 100644 index 000000000..388c983ff --- /dev/null +++ b/vendor/golang.org/x/text/unicode/cldr/slice.go @@ -0,0 +1,144 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cldr + +import ( + "fmt" + "reflect" + "sort" +) + +// Slice provides utilities for modifying slices of elements. +// It can be wrapped around any slice of which the element type implements +// interface Elem. +type Slice struct { + ptr reflect.Value + typ reflect.Type +} + +// Value returns the reflect.Value of the underlying slice. +func (s *Slice) Value() reflect.Value { + return s.ptr.Elem() +} + +// MakeSlice wraps a pointer to a slice of Elems. +// It replaces the array pointed to by the slice so that subsequent modifications +// do not alter the data in a CLDR type. +// It panics if an incorrect type is passed. +func MakeSlice(slicePtr interface{}) Slice { + ptr := reflect.ValueOf(slicePtr) + if ptr.Kind() != reflect.Ptr { + panic(fmt.Sprintf("MakeSlice: argument must be pointer to slice, found %v", ptr.Type())) + } + sl := ptr.Elem() + if sl.Kind() != reflect.Slice { + panic(fmt.Sprintf("MakeSlice: argument must point to a slice, found %v", sl.Type())) + } + intf := reflect.TypeOf((*Elem)(nil)).Elem() + if !sl.Type().Elem().Implements(intf) { + panic(fmt.Sprintf("MakeSlice: element type of slice (%v) does not implement Elem", sl.Type().Elem())) + } + nsl := reflect.MakeSlice(sl.Type(), sl.Len(), sl.Len()) + reflect.Copy(nsl, sl) + sl.Set(nsl) + return Slice{ + ptr: ptr, + typ: sl.Type().Elem().Elem(), + } +} + +func (s Slice) indexForAttr(a string) []int { + for i := iter(reflect.Zero(s.typ)); !i.done(); i.next() { + if n, _ := xmlName(i.field()); n == a { + return i.index + } + } + panic(fmt.Sprintf("MakeSlice: no attribute %q for type %v", a, s.typ)) +} + +// Filter filters s to only include elements for which fn returns true. +func (s Slice) Filter(fn func(e Elem) bool) { + k := 0 + sl := s.Value() + for i := 0; i < sl.Len(); i++ { + vi := sl.Index(i) + if fn(vi.Interface().(Elem)) { + sl.Index(k).Set(vi) + k++ + } + } + sl.Set(sl.Slice(0, k)) +} + +// Group finds elements in s for which fn returns the same value and groups +// them in a new Slice. +func (s Slice) Group(fn func(e Elem) string) []Slice { + m := make(map[string][]reflect.Value) + sl := s.Value() + for i := 0; i < sl.Len(); i++ { + vi := sl.Index(i) + key := fn(vi.Interface().(Elem)) + m[key] = append(m[key], vi) + } + keys := []string{} + for k, _ := range m { + keys = append(keys, k) + } + sort.Strings(keys) + res := []Slice{} + for _, k := range keys { + nsl := reflect.New(sl.Type()) + nsl.Elem().Set(reflect.Append(nsl.Elem(), m[k]...)) + res = append(res, MakeSlice(nsl.Interface())) + } + return res +} + +// SelectAnyOf filters s to contain only elements for which attr matches +// any of the values. +func (s Slice) SelectAnyOf(attr string, values ...string) { + index := s.indexForAttr(attr) + s.Filter(func(e Elem) bool { + vf := reflect.ValueOf(e).Elem().FieldByIndex(index) + return in(values, vf.String()) + }) +} + +// SelectOnePerGroup filters s to include at most one element e per group of +// elements matching Key(attr), where e has an attribute a that matches any +// the values in v. +// If more than one element in a group matches a value in v preference +// is given to the element that matches the first value in v. +func (s Slice) SelectOnePerGroup(a string, v []string) { + index := s.indexForAttr(a) + grouped := s.Group(func(e Elem) string { return Key(e, a) }) + sl := s.Value() + sl.Set(sl.Slice(0, 0)) + for _, g := range grouped { + e := reflect.Value{} + found := len(v) + gsl := g.Value() + for i := 0; i < gsl.Len(); i++ { + vi := gsl.Index(i).Elem().FieldByIndex(index) + j := 0 + for ; j < len(v) && v[j] != vi.String(); j++ { + } + if j < found { + found = j + e = gsl.Index(i) + } + } + if found < len(v) { + sl.Set(reflect.Append(sl, e)) + } + } +} + +// SelectDraft drops all elements from the list with a draft level smaller than d +// and selects the highest draft level of the remaining. +// This method assumes that the input CLDR is canonicalized. +func (s Slice) SelectDraft(d Draft) { + s.SelectOnePerGroup("draft", drafts[len(drafts)-2-int(d):]) +} diff --git a/vendor/golang.org/x/text/unicode/cldr/slice_test.go b/vendor/golang.org/x/text/unicode/cldr/slice_test.go new file mode 100644 index 000000000..3d487d3bd --- /dev/null +++ b/vendor/golang.org/x/text/unicode/cldr/slice_test.go @@ -0,0 +1,175 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cldr + +import ( + "reflect" + "testing" +) + +type testSlice []*Common + +func mkElem(alt, typ, ref string) *Common { + return &Common{ + Type: typ, + Reference: ref, + Alt: alt, + } +} + +var ( + testSlice1 = testSlice{ + mkElem("1", "a", "i.a"), + mkElem("1", "b", "i.b"), + mkElem("1", "c", "i.c"), + mkElem("2", "b", "ii"), + mkElem("3", "c", "iii"), + mkElem("4", "a", "iv.a"), + mkElem("4", "d", "iv.d"), + } + testSliceE = testSlice{} +) + +func panics(f func()) (panics bool) { + defer func() { + if err := recover(); err != nil { + panics = true + } + }() + f() + return panics +} + +func TestMakeSlice(t *testing.T) { + foo := 1 + bar := []int{} + tests := []struct { + i interface{} + panics bool + err string + }{ + {&foo, true, "should panic when passed a pointer to the wrong type"}, + {&bar, true, "should panic when slice element of the wrong type"}, + {testSlice1, true, "should panic when passed a slice"}, + {&testSlice1, false, "should not panic"}, + } + for i, tt := range tests { + if panics(func() { MakeSlice(tt.i) }) != tt.panics { + t.Errorf("%d: %s", i, tt.err) + } + } +} + +var anyOfTests = []struct { + sl testSlice + values []string + n int +}{ + {testSliceE, []string{}, 0}, + {testSliceE, []string{"1", "2", "3"}, 0}, + {testSlice1, []string{}, 0}, + {testSlice1, []string{"1"}, 3}, + {testSlice1, []string{"2"}, 1}, + {testSlice1, []string{"5"}, 0}, + {testSlice1, []string{"1", "2", "3"}, 5}, +} + +func TestSelectAnyOf(t *testing.T) { + for i, tt := range anyOfTests { + sl := tt.sl + s := MakeSlice(&sl) + s.SelectAnyOf("alt", tt.values...) + if len(sl) != tt.n { + t.Errorf("%d: found len == %d; want %d", i, len(sl), tt.n) + } + } + sl := testSlice1 + s := MakeSlice(&sl) + if !panics(func() { s.SelectAnyOf("foo") }) { + t.Errorf("should panic on non-existing attribute") + } +} + +func TestFilter(t *testing.T) { + for i, tt := range anyOfTests { + sl := tt.sl + s := MakeSlice(&sl) + s.Filter(func(e Elem) bool { + v, _ := findField(reflect.ValueOf(e), "alt") + return in(tt.values, v.String()) + }) + if len(sl) != tt.n { + t.Errorf("%d: found len == %d; want %d", i, len(sl), tt.n) + } + } +} + +func TestGroup(t *testing.T) { + f := func(excl ...string) func(Elem) string { + return func(e Elem) string { + return Key(e, excl...) + } + } + tests := []struct { + sl testSlice + f func(Elem) string + lens []int + }{ + {testSliceE, f(), []int{}}, + {testSlice1, f(), []int{1, 1, 1, 1, 1, 1, 1}}, + {testSlice1, f("type"), []int{3, 1, 1, 2}}, + {testSlice1, f("alt"), []int{2, 2, 2, 1}}, + {testSlice1, f("alt", "type"), []int{7}}, + {testSlice1, f("alt", "type"), []int{7}}, + } + for i, tt := range tests { + sl := tt.sl + s := MakeSlice(&sl) + g := s.Group(tt.f) + if len(tt.lens) != len(g) { + t.Errorf("%d: found %d; want %d", i, len(g), len(tt.lens)) + continue + } + for j, v := range tt.lens { + if n := g[j].Value().Len(); n != v { + t.Errorf("%d: found %d for length of group %d; want %d", i, n, j, v) + } + } + } +} + +func TestSelectOnePerGroup(t *testing.T) { + tests := []struct { + sl testSlice + attr string + values []string + refs []string + }{ + {testSliceE, "alt", []string{"1"}, []string{}}, + {testSliceE, "type", []string{"a"}, []string{}}, + {testSlice1, "alt", []string{"2", "3", "1"}, []string{"i.a", "ii", "iii"}}, + {testSlice1, "alt", []string{"1", "4"}, []string{"i.a", "i.b", "i.c", "iv.d"}}, + {testSlice1, "type", []string{"c", "d"}, []string{"i.c", "iii", "iv.d"}}, + } + for i, tt := range tests { + sl := tt.sl + s := MakeSlice(&sl) + s.SelectOnePerGroup(tt.attr, tt.values) + if len(sl) != len(tt.refs) { + t.Errorf("%d: found result length %d; want %d", i, len(sl), len(tt.refs)) + continue + } + for j, e := range sl { + if tt.refs[j] != e.Reference { + t.Errorf("%d:%d found %s; want %s", i, j, e.Reference, tt.refs[i]) + } + } + } + sl := testSlice1 + s := MakeSlice(&sl) + if !panics(func() { s.SelectOnePerGroup("foo", nil) }) { + t.Errorf("should panic on non-existing attribute") + } +} diff --git a/vendor/golang.org/x/text/unicode/cldr/xml.go b/vendor/golang.org/x/text/unicode/cldr/xml.go new file mode 100644 index 000000000..ce3203827 --- /dev/null +++ b/vendor/golang.org/x/text/unicode/cldr/xml.go @@ -0,0 +1,1487 @@ +// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. + +package cldr + +// LDMLBCP47 holds information on allowable values for various variables in LDML. +type LDMLBCP47 struct { + Common + Version *struct { + Common + Number string `xml:"number,attr"` + } `xml:"version"` + Generation *struct { + Common + Date string `xml:"date,attr"` + } `xml:"generation"` + Keyword []*struct { + Common + Key []*struct { + Common + Extension string `xml:"extension,attr"` + Name string `xml:"name,attr"` + Description string `xml:"description,attr"` + Deprecated string `xml:"deprecated,attr"` + Preferred string `xml:"preferred,attr"` + Alias string `xml:"alias,attr"` + ValueType string `xml:"valueType,attr"` + Since string `xml:"since,attr"` + Type []*struct { + Common + Name string `xml:"name,attr"` + Description string `xml:"description,attr"` + Deprecated string `xml:"deprecated,attr"` + Preferred string `xml:"preferred,attr"` + Alias string `xml:"alias,attr"` + Since string `xml:"since,attr"` + } `xml:"type"` + } `xml:"key"` + } `xml:"keyword"` + Attribute []*struct { + Common + Name string `xml:"name,attr"` + Description string `xml:"description,attr"` + Deprecated string `xml:"deprecated,attr"` + Preferred string `xml:"preferred,attr"` + Since string `xml:"since,attr"` + } `xml:"attribute"` +} + +// SupplementalData holds information relevant for internationalization +// and proper use of CLDR, but that is not contained in the locale hierarchy. +type SupplementalData struct { + Common + Version *struct { + Common + Number string `xml:"number,attr"` + } `xml:"version"` + Generation *struct { + Common + Date string `xml:"date,attr"` + } `xml:"generation"` + CurrencyData *struct { + Common + Fractions []*struct { + Common + Info []*struct { + Common + Iso4217 string `xml:"iso4217,attr"` + Digits string `xml:"digits,attr"` + Rounding string `xml:"rounding,attr"` + CashDigits string `xml:"cashDigits,attr"` + CashRounding string `xml:"cashRounding,attr"` + } `xml:"info"` + } `xml:"fractions"` + Region []*struct { + Common + Iso3166 string `xml:"iso3166,attr"` + Currency []*struct { + Common + Before string `xml:"before,attr"` + From string `xml:"from,attr"` + To string `xml:"to,attr"` + Iso4217 string `xml:"iso4217,attr"` + Digits string `xml:"digits,attr"` + Rounding string `xml:"rounding,attr"` + CashRounding string `xml:"cashRounding,attr"` + Tender string `xml:"tender,attr"` + Alternate []*struct { + Common + Iso4217 string `xml:"iso4217,attr"` + } `xml:"alternate"` + } `xml:"currency"` + } `xml:"region"` + } `xml:"currencyData"` + TerritoryContainment *struct { + Common + Group []*struct { + Common + Contains string `xml:"contains,attr"` + Grouping string `xml:"grouping,attr"` + Status string `xml:"status,attr"` + } `xml:"group"` + } `xml:"territoryContainment"` + SubdivisionContainment *struct { + Common + Subgroup []*struct { + Common + Subtype string `xml:"subtype,attr"` + Contains string `xml:"contains,attr"` + } `xml:"subgroup"` + } `xml:"subdivisionContainment"` + LanguageData *struct { + Common + Language []*struct { + Common + Scripts string `xml:"scripts,attr"` + Territories string `xml:"territories,attr"` + Variants string `xml:"variants,attr"` + } `xml:"language"` + } `xml:"languageData"` + TerritoryInfo *struct { + Common + Territory []*struct { + Common + Gdp string `xml:"gdp,attr"` + LiteracyPercent string `xml:"literacyPercent,attr"` + Population string `xml:"population,attr"` + LanguagePopulation []*struct { + Common + LiteracyPercent string `xml:"literacyPercent,attr"` + WritingPercent string `xml:"writingPercent,attr"` + PopulationPercent string `xml:"populationPercent,attr"` + OfficialStatus string `xml:"officialStatus,attr"` + } `xml:"languagePopulation"` + } `xml:"territory"` + } `xml:"territoryInfo"` + PostalCodeData *struct { + Common + PostCodeRegex []*struct { + Common + TerritoryId string `xml:"territoryId,attr"` + } `xml:"postCodeRegex"` + } `xml:"postalCodeData"` + CalendarData *struct { + Common + Calendar []*struct { + Common + Territories string `xml:"territories,attr"` + CalendarSystem *Common `xml:"calendarSystem"` + Eras *struct { + Common + Era []*struct { + Common + Start string `xml:"start,attr"` + End string `xml:"end,attr"` + } `xml:"era"` + } `xml:"eras"` + } `xml:"calendar"` + } `xml:"calendarData"` + CalendarPreferenceData *struct { + Common + CalendarPreference []*struct { + Common + Territories string `xml:"territories,attr"` + Ordering string `xml:"ordering,attr"` + } `xml:"calendarPreference"` + } `xml:"calendarPreferenceData"` + WeekData *struct { + Common + MinDays []*struct { + Common + Count string `xml:"count,attr"` + Territories string `xml:"territories,attr"` + } `xml:"minDays"` + FirstDay []*struct { + Common + Day string `xml:"day,attr"` + Territories string `xml:"territories,attr"` + } `xml:"firstDay"` + WeekendStart []*struct { + Common + Day string `xml:"day,attr"` + Territories string `xml:"territories,attr"` + } `xml:"weekendStart"` + WeekendEnd []*struct { + Common + Day string `xml:"day,attr"` + Territories string `xml:"territories,attr"` + } `xml:"weekendEnd"` + WeekOfPreference []*struct { + Common + Locales string `xml:"locales,attr"` + Ordering string `xml:"ordering,attr"` + } `xml:"weekOfPreference"` + } `xml:"weekData"` + TimeData *struct { + Common + Hours []*struct { + Common + Allowed string `xml:"allowed,attr"` + Preferred string `xml:"preferred,attr"` + Regions string `xml:"regions,attr"` + } `xml:"hours"` + } `xml:"timeData"` + MeasurementData *struct { + Common + MeasurementSystem []*struct { + Common + Category string `xml:"category,attr"` + Territories string `xml:"territories,attr"` + } `xml:"measurementSystem"` + PaperSize []*struct { + Common + Territories string `xml:"territories,attr"` + } `xml:"paperSize"` + } `xml:"measurementData"` + UnitPreferenceData *struct { + Common + UnitPreferences []*struct { + Common + Category string `xml:"category,attr"` + Usage string `xml:"usage,attr"` + Scope string `xml:"scope,attr"` + UnitPreference []*struct { + Common + Regions string `xml:"regions,attr"` + } `xml:"unitPreference"` + } `xml:"unitPreferences"` + } `xml:"unitPreferenceData"` + TimezoneData *struct { + Common + MapTimezones []*struct { + Common + OtherVersion string `xml:"otherVersion,attr"` + TypeVersion string `xml:"typeVersion,attr"` + MapZone []*struct { + Common + Other string `xml:"other,attr"` + Territory string `xml:"territory,attr"` + } `xml:"mapZone"` + } `xml:"mapTimezones"` + ZoneFormatting []*struct { + Common + Multizone string `xml:"multizone,attr"` + TzidVersion string `xml:"tzidVersion,attr"` + ZoneItem []*struct { + Common + Territory string `xml:"territory,attr"` + Aliases string `xml:"aliases,attr"` + } `xml:"zoneItem"` + } `xml:"zoneFormatting"` + } `xml:"timezoneData"` + Characters *struct { + Common + CharacterFallback []*struct { + Common + Character []*struct { + Common + Value string `xml:"value,attr"` + Substitute []*Common `xml:"substitute"` + } `xml:"character"` + } `xml:"character-fallback"` + } `xml:"characters"` + Transforms *struct { + Common + Transform []*struct { + Common + Source string `xml:"source,attr"` + Target string `xml:"target,attr"` + Variant string `xml:"variant,attr"` + Direction string `xml:"direction,attr"` + Alias string `xml:"alias,attr"` + BackwardAlias string `xml:"backwardAlias,attr"` + Visibility string `xml:"visibility,attr"` + Comment []*Common `xml:"comment"` + TRule []*Common `xml:"tRule"` + } `xml:"transform"` + } `xml:"transforms"` + Metadata *struct { + Common + AttributeOrder *Common `xml:"attributeOrder"` + ElementOrder *Common `xml:"elementOrder"` + SerialElements *Common `xml:"serialElements"` + Suppress *struct { + Common + Attributes []*struct { + Common + Element string `xml:"element,attr"` + Attribute string `xml:"attribute,attr"` + AttributeValue string `xml:"attributeValue,attr"` + } `xml:"attributes"` + } `xml:"suppress"` + Validity *struct { + Common + Variable []*struct { + Common + Id string `xml:"id,attr"` + } `xml:"variable"` + AttributeValues []*struct { + Common + Dtds string `xml:"dtds,attr"` + Elements string `xml:"elements,attr"` + Attributes string `xml:"attributes,attr"` + Order string `xml:"order,attr"` + } `xml:"attributeValues"` + } `xml:"validity"` + Alias *struct { + Common + LanguageAlias []*struct { + Common + Replacement string `xml:"replacement,attr"` + Reason string `xml:"reason,attr"` + } `xml:"languageAlias"` + ScriptAlias []*struct { + Common + Replacement string `xml:"replacement,attr"` + Reason string `xml:"reason,attr"` + } `xml:"scriptAlias"` + TerritoryAlias []*struct { + Common + Replacement string `xml:"replacement,attr"` + Reason string `xml:"reason,attr"` + } `xml:"territoryAlias"` + SubdivisionAlias []*struct { + Common + Replacement string `xml:"replacement,attr"` + Reason string `xml:"reason,attr"` + } `xml:"subdivisionAlias"` + VariantAlias []*struct { + Common + Replacement string `xml:"replacement,attr"` + Reason string `xml:"reason,attr"` + } `xml:"variantAlias"` + ZoneAlias []*struct { + Common + Replacement string `xml:"replacement,attr"` + Reason string `xml:"reason,attr"` + } `xml:"zoneAlias"` + } `xml:"alias"` + Deprecated *struct { + Common + DeprecatedItems []*struct { + Common + Elements string `xml:"elements,attr"` + Attributes string `xml:"attributes,attr"` + Values string `xml:"values,attr"` + } `xml:"deprecatedItems"` + } `xml:"deprecated"` + Distinguishing *struct { + Common + DistinguishingItems []*struct { + Common + Exclude string `xml:"exclude,attr"` + Elements string `xml:"elements,attr"` + Attributes string `xml:"attributes,attr"` + } `xml:"distinguishingItems"` + } `xml:"distinguishing"` + Blocking *struct { + Common + BlockingItems []*struct { + Common + Elements string `xml:"elements,attr"` + } `xml:"blockingItems"` + } `xml:"blocking"` + CoverageAdditions *struct { + Common + LanguageCoverage []*struct { + Common + Values string `xml:"values,attr"` + } `xml:"languageCoverage"` + ScriptCoverage []*struct { + Common + Values string `xml:"values,attr"` + } `xml:"scriptCoverage"` + TerritoryCoverage []*struct { + Common + Values string `xml:"values,attr"` + } `xml:"territoryCoverage"` + CurrencyCoverage []*struct { + Common + Values string `xml:"values,attr"` + } `xml:"currencyCoverage"` + TimezoneCoverage []*struct { + Common + Values string `xml:"values,attr"` + } `xml:"timezoneCoverage"` + } `xml:"coverageAdditions"` + SkipDefaultLocale *struct { + Common + Services string `xml:"services,attr"` + } `xml:"skipDefaultLocale"` + DefaultContent *struct { + Common + Locales string `xml:"locales,attr"` + } `xml:"defaultContent"` + } `xml:"metadata"` + CodeMappings *struct { + Common + LanguageCodes []*struct { + Common + Alpha3 string `xml:"alpha3,attr"` + } `xml:"languageCodes"` + TerritoryCodes []*struct { + Common + Numeric string `xml:"numeric,attr"` + Alpha3 string `xml:"alpha3,attr"` + Fips10 string `xml:"fips10,attr"` + Internet string `xml:"internet,attr"` + } `xml:"territoryCodes"` + CurrencyCodes []*struct { + Common + Numeric string `xml:"numeric,attr"` + } `xml:"currencyCodes"` + } `xml:"codeMappings"` + ParentLocales *struct { + Common + ParentLocale []*struct { + Common + Parent string `xml:"parent,attr"` + Locales string `xml:"locales,attr"` + } `xml:"parentLocale"` + } `xml:"parentLocales"` + LikelySubtags *struct { + Common + LikelySubtag []*struct { + Common + From string `xml:"from,attr"` + To string `xml:"to,attr"` + } `xml:"likelySubtag"` + } `xml:"likelySubtags"` + MetazoneInfo *struct { + Common + Timezone []*struct { + Common + UsesMetazone []*struct { + Common + From string `xml:"from,attr"` + To string `xml:"to,attr"` + Mzone string `xml:"mzone,attr"` + } `xml:"usesMetazone"` + } `xml:"timezone"` + } `xml:"metazoneInfo"` + Plurals []*struct { + Common + PluralRules []*struct { + Common + Locales string `xml:"locales,attr"` + PluralRule []*struct { + Common + Count string `xml:"count,attr"` + } `xml:"pluralRule"` + } `xml:"pluralRules"` + PluralRanges []*struct { + Common + Locales string `xml:"locales,attr"` + PluralRange []*struct { + Common + Start string `xml:"start,attr"` + End string `xml:"end,attr"` + Result string `xml:"result,attr"` + } `xml:"pluralRange"` + } `xml:"pluralRanges"` + } `xml:"plurals"` + TelephoneCodeData *struct { + Common + CodesByTerritory []*struct { + Common + Territory string `xml:"territory,attr"` + TelephoneCountryCode []*struct { + Common + Code string `xml:"code,attr"` + From string `xml:"from,attr"` + To string `xml:"to,attr"` + } `xml:"telephoneCountryCode"` + } `xml:"codesByTerritory"` + } `xml:"telephoneCodeData"` + NumberingSystems *struct { + Common + NumberingSystem []*struct { + Common + Id string `xml:"id,attr"` + Radix string `xml:"radix,attr"` + Digits string `xml:"digits,attr"` + Rules string `xml:"rules,attr"` + } `xml:"numberingSystem"` + } `xml:"numberingSystems"` + Bcp47KeywordMappings *struct { + Common + MapKeys *struct { + Common + KeyMap []*struct { + Common + Bcp47 string `xml:"bcp47,attr"` + } `xml:"keyMap"` + } `xml:"mapKeys"` + MapTypes []*struct { + Common + TypeMap []*struct { + Common + Bcp47 string `xml:"bcp47,attr"` + } `xml:"typeMap"` + } `xml:"mapTypes"` + } `xml:"bcp47KeywordMappings"` + Gender *struct { + Common + PersonList []*struct { + Common + Locales string `xml:"locales,attr"` + } `xml:"personList"` + } `xml:"gender"` + References *struct { + Common + Reference []*struct { + Common + Uri string `xml:"uri,attr"` + } `xml:"reference"` + } `xml:"references"` + LanguageMatching *struct { + Common + LanguageMatches []*struct { + Common + ParadigmLocales []*struct { + Common + Locales string `xml:"locales,attr"` + } `xml:"paradigmLocales"` + MatchVariable []*struct { + Common + Id string `xml:"id,attr"` + Value string `xml:"value,attr"` + } `xml:"matchVariable"` + LanguageMatch []*struct { + Common + Desired string `xml:"desired,attr"` + Supported string `xml:"supported,attr"` + Percent string `xml:"percent,attr"` + Distance string `xml:"distance,attr"` + Oneway string `xml:"oneway,attr"` + } `xml:"languageMatch"` + } `xml:"languageMatches"` + } `xml:"languageMatching"` + DayPeriodRuleSet []*struct { + Common + DayPeriodRules []*struct { + Common + Locales string `xml:"locales,attr"` + DayPeriodRule []*struct { + Common + At string `xml:"at,attr"` + After string `xml:"after,attr"` + Before string `xml:"before,attr"` + From string `xml:"from,attr"` + To string `xml:"to,attr"` + } `xml:"dayPeriodRule"` + } `xml:"dayPeriodRules"` + } `xml:"dayPeriodRuleSet"` + MetaZones *struct { + Common + MetazoneInfo *struct { + Common + Timezone []*struct { + Common + UsesMetazone []*struct { + Common + From string `xml:"from,attr"` + To string `xml:"to,attr"` + Mzone string `xml:"mzone,attr"` + } `xml:"usesMetazone"` + } `xml:"timezone"` + } `xml:"metazoneInfo"` + MapTimezones *struct { + Common + OtherVersion string `xml:"otherVersion,attr"` + TypeVersion string `xml:"typeVersion,attr"` + MapZone []*struct { + Common + Other string `xml:"other,attr"` + Territory string `xml:"territory,attr"` + } `xml:"mapZone"` + } `xml:"mapTimezones"` + } `xml:"metaZones"` + PrimaryZones *struct { + Common + PrimaryZone []*struct { + Common + Iso3166 string `xml:"iso3166,attr"` + } `xml:"primaryZone"` + } `xml:"primaryZones"` + WindowsZones *struct { + Common + MapTimezones *struct { + Common + OtherVersion string `xml:"otherVersion,attr"` + TypeVersion string `xml:"typeVersion,attr"` + MapZone []*struct { + Common + Other string `xml:"other,attr"` + Territory string `xml:"territory,attr"` + } `xml:"mapZone"` + } `xml:"mapTimezones"` + } `xml:"windowsZones"` + CoverageLevels *struct { + Common + ApprovalRequirements *struct { + Common + ApprovalRequirement []*struct { + Common + Votes string `xml:"votes,attr"` + Locales string `xml:"locales,attr"` + Paths string `xml:"paths,attr"` + } `xml:"approvalRequirement"` + } `xml:"approvalRequirements"` + CoverageVariable []*struct { + Common + Key string `xml:"key,attr"` + Value string `xml:"value,attr"` + } `xml:"coverageVariable"` + CoverageLevel []*struct { + Common + InLanguage string `xml:"inLanguage,attr"` + InScript string `xml:"inScript,attr"` + InTerritory string `xml:"inTerritory,attr"` + Value string `xml:"value,attr"` + Match string `xml:"match,attr"` + } `xml:"coverageLevel"` + } `xml:"coverageLevels"` + IdValidity *struct { + Common + Id []*struct { + Common + IdStatus string `xml:"idStatus,attr"` + } `xml:"id"` + } `xml:"idValidity"` + RgScope *struct { + Common + RgPath []*struct { + Common + Path string `xml:"path,attr"` + } `xml:"rgPath"` + } `xml:"rgScope"` +} + +// LDML is the top-level type for locale-specific data. +type LDML struct { + Common + Version string `xml:"version,attr"` + Identity *struct { + Common + Version *struct { + Common + Number string `xml:"number,attr"` + } `xml:"version"` + Generation *struct { + Common + Date string `xml:"date,attr"` + } `xml:"generation"` + Language *Common `xml:"language"` + Script *Common `xml:"script"` + Territory *Common `xml:"territory"` + Variant *Common `xml:"variant"` + } `xml:"identity"` + LocaleDisplayNames *LocaleDisplayNames `xml:"localeDisplayNames"` + Layout *struct { + Common + Orientation []*struct { + Common + Characters string `xml:"characters,attr"` + Lines string `xml:"lines,attr"` + CharacterOrder []*Common `xml:"characterOrder"` + LineOrder []*Common `xml:"lineOrder"` + } `xml:"orientation"` + InList []*struct { + Common + Casing string `xml:"casing,attr"` + } `xml:"inList"` + InText []*Common `xml:"inText"` + } `xml:"layout"` + ContextTransforms *struct { + Common + ContextTransformUsage []*struct { + Common + ContextTransform []*Common `xml:"contextTransform"` + } `xml:"contextTransformUsage"` + } `xml:"contextTransforms"` + Characters *struct { + Common + ExemplarCharacters []*Common `xml:"exemplarCharacters"` + Ellipsis []*Common `xml:"ellipsis"` + MoreInformation []*Common `xml:"moreInformation"` + Stopwords []*struct { + Common + StopwordList []*Common `xml:"stopwordList"` + } `xml:"stopwords"` + IndexLabels []*struct { + Common + IndexSeparator []*Common `xml:"indexSeparator"` + CompressedIndexSeparator []*Common `xml:"compressedIndexSeparator"` + IndexRangePattern []*Common `xml:"indexRangePattern"` + IndexLabelBefore []*Common `xml:"indexLabelBefore"` + IndexLabelAfter []*Common `xml:"indexLabelAfter"` + IndexLabel []*struct { + Common + IndexSource string `xml:"indexSource,attr"` + Priority string `xml:"priority,attr"` + } `xml:"indexLabel"` + } `xml:"indexLabels"` + Mapping []*struct { + Common + Registry string `xml:"registry,attr"` + } `xml:"mapping"` + ParseLenients []*struct { + Common + Scope string `xml:"scope,attr"` + Level string `xml:"level,attr"` + ParseLenient []*struct { + Common + Sample string `xml:"sample,attr"` + } `xml:"parseLenient"` + } `xml:"parseLenients"` + } `xml:"characters"` + Delimiters *struct { + Common + QuotationStart []*Common `xml:"quotationStart"` + QuotationEnd []*Common `xml:"quotationEnd"` + AlternateQuotationStart []*Common `xml:"alternateQuotationStart"` + AlternateQuotationEnd []*Common `xml:"alternateQuotationEnd"` + } `xml:"delimiters"` + Measurement *struct { + Common + MeasurementSystem []*Common `xml:"measurementSystem"` + PaperSize []*struct { + Common + Height []*Common `xml:"height"` + Width []*Common `xml:"width"` + } `xml:"paperSize"` + } `xml:"measurement"` + Dates *struct { + Common + LocalizedPatternChars []*Common `xml:"localizedPatternChars"` + DateRangePattern []*Common `xml:"dateRangePattern"` + Calendars *struct { + Common + Calendar []*Calendar `xml:"calendar"` + } `xml:"calendars"` + Fields *struct { + Common + Field []*struct { + Common + DisplayName []*struct { + Common + Count string `xml:"count,attr"` + } `xml:"displayName"` + Relative []*Common `xml:"relative"` + RelativeTime []*struct { + Common + RelativeTimePattern []*struct { + Common + Count string `xml:"count,attr"` + } `xml:"relativeTimePattern"` + } `xml:"relativeTime"` + RelativePeriod []*Common `xml:"relativePeriod"` + } `xml:"field"` + } `xml:"fields"` + TimeZoneNames *TimeZoneNames `xml:"timeZoneNames"` + } `xml:"dates"` + Numbers *Numbers `xml:"numbers"` + Units *struct { + Common + Unit []*struct { + Common + DisplayName []*struct { + Common + Count string `xml:"count,attr"` + } `xml:"displayName"` + UnitPattern []*struct { + Common + Count string `xml:"count,attr"` + } `xml:"unitPattern"` + PerUnitPattern []*Common `xml:"perUnitPattern"` + } `xml:"unit"` + UnitLength []*struct { + Common + CompoundUnit []*struct { + Common + CompoundUnitPattern []*Common `xml:"compoundUnitPattern"` + } `xml:"compoundUnit"` + Unit []*struct { + Common + DisplayName []*struct { + Common + Count string `xml:"count,attr"` + } `xml:"displayName"` + UnitPattern []*struct { + Common + Count string `xml:"count,attr"` + } `xml:"unitPattern"` + PerUnitPattern []*Common `xml:"perUnitPattern"` + } `xml:"unit"` + CoordinateUnit []*struct { + Common + CoordinateUnitPattern []*Common `xml:"coordinateUnitPattern"` + } `xml:"coordinateUnit"` + } `xml:"unitLength"` + DurationUnit []*struct { + Common + DurationUnitPattern []*Common `xml:"durationUnitPattern"` + } `xml:"durationUnit"` + } `xml:"units"` + ListPatterns *struct { + Common + ListPattern []*struct { + Common + ListPatternPart []*Common `xml:"listPatternPart"` + } `xml:"listPattern"` + } `xml:"listPatterns"` + Collations *struct { + Common + Version string `xml:"version,attr"` + DefaultCollation *Common `xml:"defaultCollation"` + Collation []*Collation `xml:"collation"` + } `xml:"collations"` + Posix *struct { + Common + Messages []*struct { + Common + Yesstr []*Common `xml:"yesstr"` + Nostr []*Common `xml:"nostr"` + Yesexpr []*Common `xml:"yesexpr"` + Noexpr []*Common `xml:"noexpr"` + } `xml:"messages"` + } `xml:"posix"` + CharacterLabels *struct { + Common + CharacterLabelPattern []*struct { + Common + Count string `xml:"count,attr"` + } `xml:"characterLabelPattern"` + CharacterLabel []*Common `xml:"characterLabel"` + } `xml:"characterLabels"` + Segmentations *struct { + Common + Segmentation []*struct { + Common + Variables *struct { + Common + Variable []*struct { + Common + Id string `xml:"id,attr"` + } `xml:"variable"` + } `xml:"variables"` + SegmentRules *struct { + Common + Rule []*struct { + Common + Id string `xml:"id,attr"` + } `xml:"rule"` + } `xml:"segmentRules"` + Exceptions *struct { + Common + Exception []*Common `xml:"exception"` + } `xml:"exceptions"` + Suppressions *struct { + Common + Suppression []*Common `xml:"suppression"` + } `xml:"suppressions"` + } `xml:"segmentation"` + } `xml:"segmentations"` + Rbnf *struct { + Common + RulesetGrouping []*struct { + Common + Ruleset []*struct { + Common + Access string `xml:"access,attr"` + AllowsParsing string `xml:"allowsParsing,attr"` + Rbnfrule []*struct { + Common + Value string `xml:"value,attr"` + Radix string `xml:"radix,attr"` + Decexp string `xml:"decexp,attr"` + } `xml:"rbnfrule"` + } `xml:"ruleset"` + } `xml:"rulesetGrouping"` + } `xml:"rbnf"` + Annotations *struct { + Common + Annotation []*struct { + Common + Cp string `xml:"cp,attr"` + Tts string `xml:"tts,attr"` + } `xml:"annotation"` + } `xml:"annotations"` + Metadata *struct { + Common + CasingData *struct { + Common + CasingItem []*struct { + Common + Override string `xml:"override,attr"` + ForceError string `xml:"forceError,attr"` + } `xml:"casingItem"` + } `xml:"casingData"` + } `xml:"metadata"` + References *struct { + Common + Reference []*struct { + Common + Uri string `xml:"uri,attr"` + } `xml:"reference"` + } `xml:"references"` +} + +// Collation contains rules that specify a certain sort-order, +// as a tailoring of the root order. +// The parsed rules are obtained by passing a RuleProcessor to Collation's +// Process method. +type Collation struct { + Common + Visibility string `xml:"visibility,attr"` + Base *Common `xml:"base"` + Import []*struct { + Common + Source string `xml:"source,attr"` + } `xml:"import"` + Settings *struct { + Common + Strength string `xml:"strength,attr"` + Alternate string `xml:"alternate,attr"` + Backwards string `xml:"backwards,attr"` + Normalization string `xml:"normalization,attr"` + CaseLevel string `xml:"caseLevel,attr"` + CaseFirst string `xml:"caseFirst,attr"` + HiraganaQuaternary string `xml:"hiraganaQuaternary,attr"` + MaxVariable string `xml:"maxVariable,attr"` + Numeric string `xml:"numeric,attr"` + Private string `xml:"private,attr"` + VariableTop string `xml:"variableTop,attr"` + Reorder string `xml:"reorder,attr"` + } `xml:"settings"` + SuppressContractions *Common `xml:"suppress_contractions"` + Optimize *Common `xml:"optimize"` + Cr []*Common `xml:"cr"` + rulesElem +} + +// Calendar specifies the fields used for formatting and parsing dates and times. +// The month and quarter names are identified numerically, starting at 1. +// The day (of the week) names are identified with short strings, since there is +// no universally-accepted numeric designation. +type Calendar struct { + Common + Months *struct { + Common + MonthContext []*struct { + Common + MonthWidth []*struct { + Common + Month []*struct { + Common + Yeartype string `xml:"yeartype,attr"` + } `xml:"month"` + } `xml:"monthWidth"` + } `xml:"monthContext"` + } `xml:"months"` + MonthNames *struct { + Common + Month []*struct { + Common + Yeartype string `xml:"yeartype,attr"` + } `xml:"month"` + } `xml:"monthNames"` + MonthAbbr *struct { + Common + Month []*struct { + Common + Yeartype string `xml:"yeartype,attr"` + } `xml:"month"` + } `xml:"monthAbbr"` + MonthPatterns *struct { + Common + MonthPatternContext []*struct { + Common + MonthPatternWidth []*struct { + Common + MonthPattern []*Common `xml:"monthPattern"` + } `xml:"monthPatternWidth"` + } `xml:"monthPatternContext"` + } `xml:"monthPatterns"` + Days *struct { + Common + DayContext []*struct { + Common + DayWidth []*struct { + Common + Day []*Common `xml:"day"` + } `xml:"dayWidth"` + } `xml:"dayContext"` + } `xml:"days"` + DayNames *struct { + Common + Day []*Common `xml:"day"` + } `xml:"dayNames"` + DayAbbr *struct { + Common + Day []*Common `xml:"day"` + } `xml:"dayAbbr"` + Quarters *struct { + Common + QuarterContext []*struct { + Common + QuarterWidth []*struct { + Common + Quarter []*Common `xml:"quarter"` + } `xml:"quarterWidth"` + } `xml:"quarterContext"` + } `xml:"quarters"` + Week *struct { + Common + MinDays []*struct { + Common + Count string `xml:"count,attr"` + } `xml:"minDays"` + FirstDay []*struct { + Common + Day string `xml:"day,attr"` + } `xml:"firstDay"` + WeekendStart []*struct { + Common + Day string `xml:"day,attr"` + Time string `xml:"time,attr"` + } `xml:"weekendStart"` + WeekendEnd []*struct { + Common + Day string `xml:"day,attr"` + Time string `xml:"time,attr"` + } `xml:"weekendEnd"` + } `xml:"week"` + Am []*Common `xml:"am"` + Pm []*Common `xml:"pm"` + DayPeriods *struct { + Common + DayPeriodContext []*struct { + Common + DayPeriodWidth []*struct { + Common + DayPeriod []*Common `xml:"dayPeriod"` + } `xml:"dayPeriodWidth"` + } `xml:"dayPeriodContext"` + } `xml:"dayPeriods"` + Eras *struct { + Common + EraNames *struct { + Common + Era []*Common `xml:"era"` + } `xml:"eraNames"` + EraAbbr *struct { + Common + Era []*Common `xml:"era"` + } `xml:"eraAbbr"` + EraNarrow *struct { + Common + Era []*Common `xml:"era"` + } `xml:"eraNarrow"` + } `xml:"eras"` + CyclicNameSets *struct { + Common + CyclicNameSet []*struct { + Common + CyclicNameContext []*struct { + Common + CyclicNameWidth []*struct { + Common + CyclicName []*Common `xml:"cyclicName"` + } `xml:"cyclicNameWidth"` + } `xml:"cyclicNameContext"` + } `xml:"cyclicNameSet"` + } `xml:"cyclicNameSets"` + DateFormats *struct { + Common + DateFormatLength []*struct { + Common + DateFormat []*struct { + Common + Pattern []*struct { + Common + Numbers string `xml:"numbers,attr"` + Count string `xml:"count,attr"` + } `xml:"pattern"` + DisplayName []*struct { + Common + Count string `xml:"count,attr"` + } `xml:"displayName"` + } `xml:"dateFormat"` + } `xml:"dateFormatLength"` + } `xml:"dateFormats"` + TimeFormats *struct { + Common + TimeFormatLength []*struct { + Common + TimeFormat []*struct { + Common + Pattern []*struct { + Common + Numbers string `xml:"numbers,attr"` + Count string `xml:"count,attr"` + } `xml:"pattern"` + DisplayName []*struct { + Common + Count string `xml:"count,attr"` + } `xml:"displayName"` + } `xml:"timeFormat"` + } `xml:"timeFormatLength"` + } `xml:"timeFormats"` + DateTimeFormats *struct { + Common + DateTimeFormatLength []*struct { + Common + DateTimeFormat []*struct { + Common + Pattern []*struct { + Common + Numbers string `xml:"numbers,attr"` + Count string `xml:"count,attr"` + } `xml:"pattern"` + DisplayName []*struct { + Common + Count string `xml:"count,attr"` + } `xml:"displayName"` + } `xml:"dateTimeFormat"` + } `xml:"dateTimeFormatLength"` + AvailableFormats []*struct { + Common + DateFormatItem []*struct { + Common + Id string `xml:"id,attr"` + Count string `xml:"count,attr"` + } `xml:"dateFormatItem"` + } `xml:"availableFormats"` + AppendItems []*struct { + Common + AppendItem []*struct { + Common + Request string `xml:"request,attr"` + } `xml:"appendItem"` + } `xml:"appendItems"` + IntervalFormats []*struct { + Common + IntervalFormatFallback []*Common `xml:"intervalFormatFallback"` + IntervalFormatItem []*struct { + Common + Id string `xml:"id,attr"` + GreatestDifference []*struct { + Common + Id string `xml:"id,attr"` + } `xml:"greatestDifference"` + } `xml:"intervalFormatItem"` + } `xml:"intervalFormats"` + } `xml:"dateTimeFormats"` + Fields []*struct { + Common + Field []*struct { + Common + DisplayName []*struct { + Common + Count string `xml:"count,attr"` + } `xml:"displayName"` + Relative []*Common `xml:"relative"` + RelativeTime []*struct { + Common + RelativeTimePattern []*struct { + Common + Count string `xml:"count,attr"` + } `xml:"relativeTimePattern"` + } `xml:"relativeTime"` + RelativePeriod []*Common `xml:"relativePeriod"` + } `xml:"field"` + } `xml:"fields"` +} +type TimeZoneNames struct { + Common + HourFormat []*Common `xml:"hourFormat"` + HoursFormat []*Common `xml:"hoursFormat"` + GmtFormat []*Common `xml:"gmtFormat"` + GmtZeroFormat []*Common `xml:"gmtZeroFormat"` + RegionFormat []*Common `xml:"regionFormat"` + FallbackFormat []*Common `xml:"fallbackFormat"` + FallbackRegionFormat []*Common `xml:"fallbackRegionFormat"` + AbbreviationFallback []*Common `xml:"abbreviationFallback"` + PreferenceOrdering []*Common `xml:"preferenceOrdering"` + SingleCountries []*struct { + Common + List string `xml:"list,attr"` + } `xml:"singleCountries"` + Zone []*struct { + Common + Long []*struct { + Common + Generic []*Common `xml:"generic"` + Standard []*Common `xml:"standard"` + Daylight []*Common `xml:"daylight"` + } `xml:"long"` + Short []*struct { + Common + Generic []*Common `xml:"generic"` + Standard []*Common `xml:"standard"` + Daylight []*Common `xml:"daylight"` + } `xml:"short"` + CommonlyUsed []*struct { + Common + Used string `xml:"used,attr"` + } `xml:"commonlyUsed"` + ExemplarCity []*Common `xml:"exemplarCity"` + } `xml:"zone"` + Metazone []*struct { + Common + Long []*struct { + Common + Generic []*Common `xml:"generic"` + Standard []*Common `xml:"standard"` + Daylight []*Common `xml:"daylight"` + } `xml:"long"` + Short []*struct { + Common + Generic []*Common `xml:"generic"` + Standard []*Common `xml:"standard"` + Daylight []*Common `xml:"daylight"` + } `xml:"short"` + CommonlyUsed []*struct { + Common + Used string `xml:"used,attr"` + } `xml:"commonlyUsed"` + } `xml:"metazone"` +} + +// LocaleDisplayNames specifies localized display names for for scripts, languages, +// countries, currencies, and variants. +type LocaleDisplayNames struct { + Common + LocaleDisplayPattern *struct { + Common + LocalePattern []*Common `xml:"localePattern"` + LocaleSeparator []*Common `xml:"localeSeparator"` + LocaleKeyTypePattern []*Common `xml:"localeKeyTypePattern"` + } `xml:"localeDisplayPattern"` + Languages *struct { + Common + Language []*Common `xml:"language"` + } `xml:"languages"` + Scripts *struct { + Common + Script []*Common `xml:"script"` + } `xml:"scripts"` + Territories *struct { + Common + Territory []*Common `xml:"territory"` + } `xml:"territories"` + Subdivisions *struct { + Common + Subdivision []*Common `xml:"subdivision"` + } `xml:"subdivisions"` + Variants *struct { + Common + Variant []*Common `xml:"variant"` + } `xml:"variants"` + Keys *struct { + Common + Key []*Common `xml:"key"` + } `xml:"keys"` + Types *struct { + Common + Type []*struct { + Common + Key string `xml:"key,attr"` + } `xml:"type"` + } `xml:"types"` + TransformNames *struct { + Common + TransformName []*Common `xml:"transformName"` + } `xml:"transformNames"` + MeasurementSystemNames *struct { + Common + MeasurementSystemName []*Common `xml:"measurementSystemName"` + } `xml:"measurementSystemNames"` + CodePatterns *struct { + Common + CodePattern []*Common `xml:"codePattern"` + } `xml:"codePatterns"` +} + +// Numbers supplies information for formatting and parsing numbers and currencies. +type Numbers struct { + Common + DefaultNumberingSystem []*Common `xml:"defaultNumberingSystem"` + OtherNumberingSystems []*struct { + Common + Native []*Common `xml:"native"` + Traditional []*Common `xml:"traditional"` + Finance []*Common `xml:"finance"` + } `xml:"otherNumberingSystems"` + MinimumGroupingDigits []*Common `xml:"minimumGroupingDigits"` + Symbols []*struct { + Common + NumberSystem string `xml:"numberSystem,attr"` + Decimal []*struct { + Common + NumberSystem string `xml:"numberSystem,attr"` + } `xml:"decimal"` + Group []*struct { + Common + NumberSystem string `xml:"numberSystem,attr"` + } `xml:"group"` + List []*struct { + Common + NumberSystem string `xml:"numberSystem,attr"` + } `xml:"list"` + PercentSign []*struct { + Common + NumberSystem string `xml:"numberSystem,attr"` + } `xml:"percentSign"` + NativeZeroDigit []*struct { + Common + NumberSystem string `xml:"numberSystem,attr"` + } `xml:"nativeZeroDigit"` + PatternDigit []*struct { + Common + NumberSystem string `xml:"numberSystem,attr"` + } `xml:"patternDigit"` + PlusSign []*struct { + Common + NumberSystem string `xml:"numberSystem,attr"` + } `xml:"plusSign"` + MinusSign []*struct { + Common + NumberSystem string `xml:"numberSystem,attr"` + } `xml:"minusSign"` + Exponential []*struct { + Common + NumberSystem string `xml:"numberSystem,attr"` + } `xml:"exponential"` + SuperscriptingExponent []*Common `xml:"superscriptingExponent"` + PerMille []*struct { + Common + NumberSystem string `xml:"numberSystem,attr"` + } `xml:"perMille"` + Infinity []*struct { + Common + NumberSystem string `xml:"numberSystem,attr"` + } `xml:"infinity"` + Nan []*struct { + Common + NumberSystem string `xml:"numberSystem,attr"` + } `xml:"nan"` + CurrencyDecimal []*struct { + Common + NumberSystem string `xml:"numberSystem,attr"` + } `xml:"currencyDecimal"` + CurrencyGroup []*struct { + Common + NumberSystem string `xml:"numberSystem,attr"` + } `xml:"currencyGroup"` + TimeSeparator []*Common `xml:"timeSeparator"` + } `xml:"symbols"` + DecimalFormats []*struct { + Common + NumberSystem string `xml:"numberSystem,attr"` + DecimalFormatLength []*struct { + Common + DecimalFormat []*struct { + Common + Pattern []*struct { + Common + Numbers string `xml:"numbers,attr"` + Count string `xml:"count,attr"` + } `xml:"pattern"` + } `xml:"decimalFormat"` + } `xml:"decimalFormatLength"` + } `xml:"decimalFormats"` + ScientificFormats []*struct { + Common + NumberSystem string `xml:"numberSystem,attr"` + ScientificFormatLength []*struct { + Common + ScientificFormat []*struct { + Common + Pattern []*struct { + Common + Numbers string `xml:"numbers,attr"` + Count string `xml:"count,attr"` + } `xml:"pattern"` + } `xml:"scientificFormat"` + } `xml:"scientificFormatLength"` + } `xml:"scientificFormats"` + PercentFormats []*struct { + Common + NumberSystem string `xml:"numberSystem,attr"` + PercentFormatLength []*struct { + Common + PercentFormat []*struct { + Common + Pattern []*struct { + Common + Numbers string `xml:"numbers,attr"` + Count string `xml:"count,attr"` + } `xml:"pattern"` + } `xml:"percentFormat"` + } `xml:"percentFormatLength"` + } `xml:"percentFormats"` + CurrencyFormats []*struct { + Common + NumberSystem string `xml:"numberSystem,attr"` + CurrencySpacing []*struct { + Common + BeforeCurrency []*struct { + Common + CurrencyMatch []*Common `xml:"currencyMatch"` + SurroundingMatch []*Common `xml:"surroundingMatch"` + InsertBetween []*Common `xml:"insertBetween"` + } `xml:"beforeCurrency"` + AfterCurrency []*struct { + Common + CurrencyMatch []*Common `xml:"currencyMatch"` + SurroundingMatch []*Common `xml:"surroundingMatch"` + InsertBetween []*Common `xml:"insertBetween"` + } `xml:"afterCurrency"` + } `xml:"currencySpacing"` + CurrencyFormatLength []*struct { + Common + CurrencyFormat []*struct { + Common + Pattern []*struct { + Common + Numbers string `xml:"numbers,attr"` + Count string `xml:"count,attr"` + } `xml:"pattern"` + } `xml:"currencyFormat"` + } `xml:"currencyFormatLength"` + UnitPattern []*struct { + Common + Count string `xml:"count,attr"` + } `xml:"unitPattern"` + } `xml:"currencyFormats"` + Currencies *struct { + Common + Currency []*struct { + Common + Pattern []*struct { + Common + Numbers string `xml:"numbers,attr"` + Count string `xml:"count,attr"` + } `xml:"pattern"` + DisplayName []*struct { + Common + Count string `xml:"count,attr"` + } `xml:"displayName"` + Symbol []*Common `xml:"symbol"` + Decimal []*struct { + Common + NumberSystem string `xml:"numberSystem,attr"` + } `xml:"decimal"` + Group []*struct { + Common + NumberSystem string `xml:"numberSystem,attr"` + } `xml:"group"` + } `xml:"currency"` + } `xml:"currencies"` + MiscPatterns []*struct { + Common + NumberSystem string `xml:"numberSystem,attr"` + Pattern []*struct { + Common + Numbers string `xml:"numbers,attr"` + Count string `xml:"count,attr"` + } `xml:"pattern"` + } `xml:"miscPatterns"` + MinimalPairs []*struct { + Common + PluralMinimalPairs []*struct { + Common + Count string `xml:"count,attr"` + } `xml:"pluralMinimalPairs"` + OrdinalMinimalPairs []*struct { + Common + Ordinal string `xml:"ordinal,attr"` + } `xml:"ordinalMinimalPairs"` + } `xml:"minimalPairs"` +} + +// Version is the version of CLDR from which the XML definitions are generated. +const Version = "31" diff --git a/vendor/golang.org/x/text/unicode/doc.go b/vendor/golang.org/x/text/unicode/doc.go new file mode 100644 index 000000000..e8f1032d0 --- /dev/null +++ b/vendor/golang.org/x/text/unicode/doc.go @@ -0,0 +1,8 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// unicode holds packages with implementations of Unicode standards that are +// mostly used as building blocks for other packages in golang.org/x/text, +// layout engines, or are otherwise more low-level in nature. +package unicode diff --git a/vendor/golang.org/x/text/unicode/norm/composition_test.go b/vendor/golang.org/x/text/unicode/norm/composition_test.go new file mode 100644 index 000000000..11684069d --- /dev/null +++ b/vendor/golang.org/x/text/unicode/norm/composition_test.go @@ -0,0 +1,130 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package norm + +import "testing" + +// TestCase is used for most tests. +type TestCase struct { + in []rune + out []rune +} + +func runTests(t *testing.T, name string, fm Form, tests []TestCase) { + rb := reorderBuffer{} + rb.init(fm, nil) + for i, test := range tests { + rb.setFlusher(nil, appendFlush) + for j, rune := range test.in { + b := []byte(string(rune)) + src := inputBytes(b) + info := rb.f.info(src, 0) + if j == 0 { + rb.ss.first(info) + } else { + rb.ss.next(info) + } + if rb.insertFlush(src, 0, info) < 0 { + t.Errorf("%s:%d: insert failed for rune %d", name, i, j) + } + } + rb.doFlush() + was := string(rb.out) + want := string(test.out) + if len(was) != len(want) { + t.Errorf("%s:%d: length = %d; want %d", name, i, len(was), len(want)) + } + if was != want { + k, pfx := pidx(was, want) + t.Errorf("%s:%d: \nwas %s%+q; \nwant %s%+q", name, i, pfx, was[k:], pfx, want[k:]) + } + } +} + +func TestFlush(t *testing.T) { + const ( + hello = "Hello " + world = "world!" + ) + buf := make([]byte, maxByteBufferSize) + p := copy(buf, hello) + out := buf[p:] + rb := reorderBuffer{} + rb.initString(NFC, world) + if i := rb.flushCopy(out); i != 0 { + t.Errorf("wrote bytes on flush of empty buffer. (len(out) = %d)", i) + } + + for i := range world { + // No need to set streamSafe values for this test. + rb.insertFlush(rb.src, i, rb.f.info(rb.src, i)) + n := rb.flushCopy(out) + out = out[n:] + p += n + } + + was := buf[:p] + want := hello + world + if string(was) != want { + t.Errorf(`output after flush was "%s"; want "%s"`, string(was), want) + } + if rb.nrune != 0 { + t.Errorf("non-null size of info buffer (rb.nrune == %d)", rb.nrune) + } + if rb.nbyte != 0 { + t.Errorf("non-null size of byte buffer (rb.nbyte == %d)", rb.nbyte) + } +} + +var insertTests = []TestCase{ + {[]rune{'a'}, []rune{'a'}}, + {[]rune{0x300}, []rune{0x300}}, + {[]rune{0x300, 0x316}, []rune{0x316, 0x300}}, // CCC(0x300)==230; CCC(0x316)==220 + {[]rune{0x316, 0x300}, []rune{0x316, 0x300}}, + {[]rune{0x41, 0x316, 0x300}, []rune{0x41, 0x316, 0x300}}, + {[]rune{0x41, 0x300, 0x316}, []rune{0x41, 0x316, 0x300}}, + {[]rune{0x300, 0x316, 0x41}, []rune{0x316, 0x300, 0x41}}, + {[]rune{0x41, 0x300, 0x40, 0x316}, []rune{0x41, 0x300, 0x40, 0x316}}, +} + +func TestInsert(t *testing.T) { + runTests(t, "TestInsert", NFD, insertTests) +} + +var decompositionNFDTest = []TestCase{ + {[]rune{0xC0}, []rune{0x41, 0x300}}, + {[]rune{0xAC00}, []rune{0x1100, 0x1161}}, + {[]rune{0x01C4}, []rune{0x01C4}}, + {[]rune{0x320E}, []rune{0x320E}}, + {[]rune("음ẻ과"), []rune{0x110B, 0x1173, 0x11B7, 0x65, 0x309, 0x1100, 0x116A}}, +} + +var decompositionNFKDTest = []TestCase{ + {[]rune{0xC0}, []rune{0x41, 0x300}}, + {[]rune{0xAC00}, []rune{0x1100, 0x1161}}, + {[]rune{0x01C4}, []rune{0x44, 0x5A, 0x030C}}, + {[]rune{0x320E}, []rune{0x28, 0x1100, 0x1161, 0x29}}, +} + +func TestDecomposition(t *testing.T) { + runTests(t, "TestDecompositionNFD", NFD, decompositionNFDTest) + runTests(t, "TestDecompositionNFKD", NFKD, decompositionNFKDTest) +} + +var compositionTest = []TestCase{ + {[]rune{0x41, 0x300}, []rune{0xC0}}, + {[]rune{0x41, 0x316}, []rune{0x41, 0x316}}, + {[]rune{0x41, 0x300, 0x35D}, []rune{0xC0, 0x35D}}, + {[]rune{0x41, 0x316, 0x300}, []rune{0xC0, 0x316}}, + // blocking starter + {[]rune{0x41, 0x316, 0x40, 0x300}, []rune{0x41, 0x316, 0x40, 0x300}}, + {[]rune{0x1100, 0x1161}, []rune{0xAC00}}, + // parenthesized Hangul, alternate between ASCII and Hangul. + {[]rune{0x28, 0x1100, 0x1161, 0x29}, []rune{0x28, 0xAC00, 0x29}}, +} + +func TestComposition(t *testing.T) { + runTests(t, "TestComposition", NFC, compositionTest) +} diff --git a/vendor/golang.org/x/text/unicode/norm/example_iter_test.go b/vendor/golang.org/x/text/unicode/norm/example_iter_test.go new file mode 100644 index 000000000..82df89c7b --- /dev/null +++ b/vendor/golang.org/x/text/unicode/norm/example_iter_test.go @@ -0,0 +1,82 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package norm_test + +import ( + "bytes" + "fmt" + "unicode/utf8" + + "golang.org/x/text/unicode/norm" +) + +// EqualSimple uses a norm.Iter to compare two non-normalized +// strings for equivalence. +func EqualSimple(a, b string) bool { + var ia, ib norm.Iter + ia.InitString(norm.NFKD, a) + ib.InitString(norm.NFKD, b) + for !ia.Done() && !ib.Done() { + if !bytes.Equal(ia.Next(), ib.Next()) { + return false + } + } + return ia.Done() && ib.Done() +} + +// FindPrefix finds the longest common prefix of ASCII characters +// of a and b. +func FindPrefix(a, b string) int { + i := 0 + for ; i < len(a) && i < len(b) && a[i] < utf8.RuneSelf && a[i] == b[i]; i++ { + } + return i +} + +// EqualOpt is like EqualSimple, but optimizes the special +// case for ASCII characters. +func EqualOpt(a, b string) bool { + n := FindPrefix(a, b) + a, b = a[n:], b[n:] + var ia, ib norm.Iter + ia.InitString(norm.NFKD, a) + ib.InitString(norm.NFKD, b) + for !ia.Done() && !ib.Done() { + if !bytes.Equal(ia.Next(), ib.Next()) { + return false + } + if n := int64(FindPrefix(a[ia.Pos():], b[ib.Pos():])); n != 0 { + ia.Seek(n, 1) + ib.Seek(n, 1) + } + } + return ia.Done() && ib.Done() +} + +var compareTests = []struct{ a, b string }{ + {"aaa", "aaa"}, + {"aaa", "aab"}, + {"a\u0300a", "\u00E0a"}, + {"a\u0300\u0320b", "a\u0320\u0300b"}, + {"\u1E0A\u0323", "\x44\u0323\u0307"}, + // A character that decomposes into multiple segments + // spans several iterations. + {"\u3304", "\u30A4\u30CB\u30F3\u30AF\u3099"}, +} + +func ExampleIter() { + for i, t := range compareTests { + r0 := EqualSimple(t.a, t.b) + r1 := EqualOpt(t.a, t.b) + fmt.Printf("%d: %v %v\n", i, r0, r1) + } + // Output: + // 0: true true + // 1: false false + // 2: true true + // 3: true true + // 4: true true + // 5: true true +} diff --git a/vendor/golang.org/x/text/unicode/norm/example_test.go b/vendor/golang.org/x/text/unicode/norm/example_test.go new file mode 100644 index 000000000..8f3b15653 --- /dev/null +++ b/vendor/golang.org/x/text/unicode/norm/example_test.go @@ -0,0 +1,27 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package norm_test + +import ( + "fmt" + + "golang.org/x/text/unicode/norm" +) + +func ExampleForm_NextBoundary() { + s := norm.NFD.String("Mêlée") + + for i := 0; i < len(s); { + d := norm.NFC.NextBoundaryInString(s[i:], true) + fmt.Printf("%[1]s: %+[1]q\n", s[i:i+d]) + i += d + } + // Output: + // M: "M" + // ê: "e\u0302" + // l: "l" + // é: "e\u0301" + // e: "e" +} diff --git a/vendor/golang.org/x/text/unicode/norm/forminfo_test.go b/vendor/golang.org/x/text/unicode/norm/forminfo_test.go new file mode 100644 index 000000000..e15ba9bee --- /dev/null +++ b/vendor/golang.org/x/text/unicode/norm/forminfo_test.go @@ -0,0 +1,54 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build test + +package norm + +import "testing" + +func TestProperties(t *testing.T) { + var d runeData + CK := [2]string{"C", "K"} + for k, r := 1, rune(0); r < 0x2ffff; r++ { + if k < len(testData) && r == testData[k].r { + d = testData[k] + k++ + } + s := string(r) + for j, p := range []Properties{NFC.PropertiesString(s), NFKC.PropertiesString(s)} { + f := d.f[j] + if p.CCC() != d.ccc { + t.Errorf("%U: ccc(%s): was %d; want %d %X", r, CK[j], p.CCC(), d.ccc, p.index) + } + if p.isYesC() != (f.qc == Yes) { + t.Errorf("%U: YesC(%s): was %v; want %v", r, CK[j], p.isYesC(), f.qc == Yes) + } + if p.combinesBackward() != (f.qc == Maybe) { + t.Errorf("%U: combines backwards(%s): was %v; want %v", r, CK[j], p.combinesBackward(), f.qc == Maybe) + } + if p.nLeadingNonStarters() != d.nLead { + t.Errorf("%U: nLead(%s): was %d; want %d %#v %#v", r, CK[j], p.nLeadingNonStarters(), d.nLead, p, d) + } + if p.nTrailingNonStarters() != d.nTrail { + t.Errorf("%U: nTrail(%s): was %d; want %d %#v %#v", r, CK[j], p.nTrailingNonStarters(), d.nTrail, p, d) + } + if p.combinesForward() != f.combinesForward { + t.Errorf("%U: combines forward(%s): was %v; want %v %#v", r, CK[j], p.combinesForward(), f.combinesForward, p) + } + // Skip Hangul as it is algorithmically computed. + if r >= hangulBase && r < hangulEnd { + continue + } + if p.hasDecomposition() { + if has := f.decomposition != ""; !has { + t.Errorf("%U: hasDecomposition(%s): was %v; want %v", r, CK[j], p.hasDecomposition(), has) + } + if string(p.Decomposition()) != f.decomposition { + t.Errorf("%U: decomp(%s): was %+q; want %+q", r, CK[j], p.Decomposition(), f.decomposition) + } + } + } + } +} diff --git a/vendor/golang.org/x/text/unicode/norm/iter_test.go b/vendor/golang.org/x/text/unicode/norm/iter_test.go new file mode 100644 index 000000000..d95aa304d --- /dev/null +++ b/vendor/golang.org/x/text/unicode/norm/iter_test.go @@ -0,0 +1,98 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package norm + +import ( + "strings" + "testing" +) + +func doIterNorm(f Form, s string) []byte { + acc := []byte{} + i := Iter{} + i.InitString(f, s) + for !i.Done() { + acc = append(acc, i.Next()...) + } + return acc +} + +func TestIterNext(t *testing.T) { + runNormTests(t, "IterNext", func(f Form, out []byte, s string) []byte { + return doIterNorm(f, string(append(out, s...))) + }) +} + +type SegmentTest struct { + in string + out []string +} + +var segmentTests = []SegmentTest{ + {"\u1E0A\u0323a", []string{"\x44\u0323\u0307", "a", ""}}, + {rep('a', segSize), append(strings.Split(rep('a', segSize), ""), "")}, + {rep('a', segSize+2), append(strings.Split(rep('a', segSize+2), ""), "")}, + {rep('a', segSize) + "\u0300aa", + append(strings.Split(rep('a', segSize-1), ""), "a\u0300", "a", "a", "")}, + + // U+0f73 is NOT treated as a starter as it is a modifier + {"a" + grave(29) + "\u0f73", []string{"a" + grave(29), cgj + "\u0f73"}}, + {"a\u0f73", []string{"a\u0f73"}}, + + // U+ff9e is treated as a non-starter. + // TODO: should we? Note that this will only affect iteration, as whether + // or not we do so does not affect the normalization output and will either + // way result in consistent iteration output. + {"a" + grave(30) + "\uff9e", []string{"a" + grave(30), cgj + "\uff9e"}}, + {"a\uff9e", []string{"a\uff9e"}}, +} + +var segmentTestsK = []SegmentTest{ + {"\u3332", []string{"\u30D5", "\u30A1", "\u30E9", "\u30C3", "\u30C8\u3099", ""}}, + // last segment of multi-segment decomposition needs normalization + {"\u3332\u093C", []string{"\u30D5", "\u30A1", "\u30E9", "\u30C3", "\u30C8\u093C\u3099", ""}}, + {"\u320E", []string{"\x28", "\uAC00", "\x29"}}, + + // last segment should be copied to start of buffer. + {"\ufdfa", []string{"\u0635", "\u0644", "\u0649", " ", "\u0627", "\u0644", "\u0644", "\u0647", " ", "\u0639", "\u0644", "\u064a", "\u0647", " ", "\u0648", "\u0633", "\u0644", "\u0645", ""}}, + {"\ufdfa" + grave(30), []string{"\u0635", "\u0644", "\u0649", " ", "\u0627", "\u0644", "\u0644", "\u0647", " ", "\u0639", "\u0644", "\u064a", "\u0647", " ", "\u0648", "\u0633", "\u0644", "\u0645" + grave(30), ""}}, + {"\uFDFA" + grave(64), []string{"\u0635", "\u0644", "\u0649", " ", "\u0627", "\u0644", "\u0644", "\u0647", " ", "\u0639", "\u0644", "\u064a", "\u0647", " ", "\u0648", "\u0633", "\u0644", "\u0645" + grave(30), cgj + grave(30), cgj + grave(4), ""}}, + + // Hangul and Jamo are grouped together. + {"\uAC00", []string{"\u1100\u1161", ""}}, + {"\uAC01", []string{"\u1100\u1161\u11A8", ""}}, + {"\u1100\u1161", []string{"\u1100\u1161", ""}}, +} + +// Note that, by design, segmentation is equal for composing and decomposing forms. +func TestIterSegmentation(t *testing.T) { + segmentTest(t, "SegmentTestD", NFD, segmentTests) + segmentTest(t, "SegmentTestC", NFC, segmentTests) + segmentTest(t, "SegmentTestKD", NFKD, segmentTestsK) + segmentTest(t, "SegmentTestKC", NFKC, segmentTestsK) +} + +func segmentTest(t *testing.T, name string, f Form, tests []SegmentTest) { + iter := Iter{} + for i, tt := range tests { + iter.InitString(f, tt.in) + for j, seg := range tt.out { + if seg == "" { + if !iter.Done() { + res := string(iter.Next()) + t.Errorf(`%s:%d:%d: expected Done()==true, found segment %+q`, name, i, j, res) + } + continue + } + if iter.Done() { + t.Errorf("%s:%d:%d: Done()==true, want false", name, i, j) + } + seg = f.String(seg) + if res := string(iter.Next()); res != seg { + t.Errorf(`%s:%d:%d" segment was %+q (%d); want %+q (%d)`, name, i, j, pc(res), len(res), pc(seg), len(seg)) + } + } + } +} diff --git a/vendor/golang.org/x/text/unicode/norm/norm_test.go b/vendor/golang.org/x/text/unicode/norm/norm_test.go new file mode 100644 index 000000000..12dacfcf3 --- /dev/null +++ b/vendor/golang.org/x/text/unicode/norm/norm_test.go @@ -0,0 +1,14 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package norm_test + +import ( + "testing" +) + +func TestPlaceHolder(t *testing.T) { + // Does nothing, just allows the Makefile to be canonical + // while waiting for the package itself to be written. +} diff --git a/vendor/golang.org/x/text/unicode/norm/normalize.go b/vendor/golang.org/x/text/unicode/norm/normalize.go index 2747f6c9a..e28ac641a 100644 --- a/vendor/golang.org/x/text/unicode/norm/normalize.go +++ b/vendor/golang.org/x/text/unicode/norm/normalize.go @@ -7,7 +7,7 @@ //go:generate go test -tags test // Package norm contains types and functions for normalizing Unicode strings. -package norm +package norm // import "golang.org/x/text/unicode/norm" import ( "unicode/utf8" diff --git a/vendor/golang.org/x/text/unicode/norm/normalize_test.go b/vendor/golang.org/x/text/unicode/norm/normalize_test.go new file mode 100644 index 000000000..4f837372c --- /dev/null +++ b/vendor/golang.org/x/text/unicode/norm/normalize_test.go @@ -0,0 +1,1287 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package norm + +import ( + "bytes" + "flag" + "fmt" + "io" + "log" + "strings" + "testing" + "unicode/utf8" + + "golang.org/x/text/internal/testtext" + "golang.org/x/text/transform" +) + +var ( + testn = flag.Int("testn", -1, "specific test number to run or -1 for all") +) + +// pc replaces any rune r that is repeated n times, for n > 1, with r{n}. +func pc(s string) []byte { + b := bytes.NewBuffer(make([]byte, 0, len(s))) + for i := 0; i < len(s); { + r, sz := utf8.DecodeRuneInString(s[i:]) + n := 0 + if sz == 1 { + // Special-case one-byte case to handle repetition for invalid UTF-8. + for c := s[i]; i+n < len(s) && s[i+n] == c; n++ { + } + } else { + for _, r2 := range s[i:] { + if r2 != r { + break + } + n++ + } + } + b.WriteString(s[i : i+sz]) + if n > 1 { + fmt.Fprintf(b, "{%d}", n) + } + i += sz * n + } + return b.Bytes() +} + +// pidx finds the index from which two strings start to differ, plus context. +// It returns the index and ellipsis if the index is greater than 0. +func pidx(a, b string) (i int, prefix string) { + for ; i < len(a) && i < len(b) && a[i] == b[i]; i++ { + } + if i < 8 { + return 0, "" + } + i -= 3 // ensure taking at least one full rune before the difference. + for k := i - 7; i > k && !utf8.RuneStart(a[i]); i-- { + } + return i, "..." +} + +type PositionTest struct { + input string + pos int + buffer string // expected contents of reorderBuffer, if applicable +} + +type positionFunc func(rb *reorderBuffer, s string) (int, []byte) + +func runPosTests(t *testing.T, name string, f Form, fn positionFunc, tests []PositionTest) { + rb := reorderBuffer{} + rb.init(f, nil) + for i, test := range tests { + rb.reset() + rb.src = inputString(test.input) + rb.nsrc = len(test.input) + pos, out := fn(&rb, test.input) + if pos != test.pos { + t.Errorf("%s:%d: position is %d; want %d", name, i, pos, test.pos) + } + if outs := string(out); outs != test.buffer { + k, pfx := pidx(outs, test.buffer) + t.Errorf("%s:%d: buffer \nwas %s%+q; \nwant %s%+q", name, i, pfx, pc(outs[k:]), pfx, pc(test.buffer[k:])) + } + } +} + +func grave(n int) string { + return rep(0x0300, n) +} + +func rep(r rune, n int) string { + return strings.Repeat(string(r), n) +} + +const segSize = maxByteBufferSize + +var cgj = GraphemeJoiner + +var decomposeSegmentTests = []PositionTest{ + // illegal runes + {"\xC2", 0, ""}, + {"\xC0", 1, "\xC0"}, + {"\u00E0\x80", 2, "\u0061\u0300"}, + // starter + {"a", 1, "a"}, + {"ab", 1, "a"}, + // starter + composing + {"a\u0300", 3, "a\u0300"}, + {"a\u0300b", 3, "a\u0300"}, + // with decomposition + {"\u00C0", 2, "A\u0300"}, + {"\u00C0b", 2, "A\u0300"}, + // long + {grave(31), 60, grave(30) + cgj}, + {"a" + grave(31), 61, "a" + grave(30) + cgj}, + + // Stability tests: see http://www.unicode.org/review/pr-29.html. + // U+0300 COMBINING GRAVE ACCENT;Mn;230;NSM;;;;;N;NON-SPACING GRAVE;;;; + // U+0B47 ORIYA VOWEL SIGN E;Mc;0;L;;;;;N;;;;; + // U+0B3E ORIYA VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; + // U+1100 HANGUL CHOSEONG KIYEOK;Lo;0;L;;;;;N;;;;; + // U+1161 HANGUL JUNGSEONG A;Lo;0;L;;;;;N;;;;; + {"\u0B47\u0300\u0B3E", 8, "\u0B47\u0300\u0B3E"}, + {"\u1100\u0300\u1161", 8, "\u1100\u0300\u1161"}, + {"\u0B47\u0B3E", 6, "\u0B47\u0B3E"}, + {"\u1100\u1161", 6, "\u1100\u1161"}, + + // U+04DA MALAYALAM VOWEL SIGN O;Mc;0;L;0D46 0D3E;;;;N;;;;; + // Sequence of decomposing characters that are starters and modifiers. + {"\u0d4a" + strings.Repeat("\u0d3e", 31), 90, "\u0d46" + strings.Repeat("\u0d3e", 30) + cgj}, + + {grave(30), 60, grave(30)}, + // U+FF9E is a starter, but decomposes to U+3099, which is not. + {grave(30) + "\uff9e", 60, grave(30) + cgj}, + // ends with incomplete UTF-8 encoding + {"\xCC", 0, ""}, + {"\u0300\xCC", 2, "\u0300"}, +} + +func decomposeSegmentF(rb *reorderBuffer, s string) (int, []byte) { + rb.initString(NFD, s) + rb.setFlusher(nil, appendFlush) + p := decomposeSegment(rb, 0, true) + return p, rb.out +} + +func TestDecomposeSegment(t *testing.T) { + runPosTests(t, "TestDecomposeSegment", NFC, decomposeSegmentF, decomposeSegmentTests) +} + +var firstBoundaryTests = []PositionTest{ + // no boundary + {"", -1, ""}, + {"\u0300", -1, ""}, + {"\x80\x80", -1, ""}, + // illegal runes + {"\xff", 0, ""}, + {"\u0300\xff", 2, ""}, + {"\u0300\xc0\x80\x80", 2, ""}, + // boundaries + {"a", 0, ""}, + {"\u0300a", 2, ""}, + // Hangul + {"\u1103\u1161", 0, ""}, + {"\u110B\u1173\u11B7", 0, ""}, + {"\u1161\u110B\u1173\u11B7", 3, ""}, + {"\u1173\u11B7\u1103\u1161", 6, ""}, + // too many combining characters. + {grave(maxNonStarters - 1), -1, ""}, + {grave(maxNonStarters), 60, ""}, + {grave(maxNonStarters + 1), 60, ""}, +} + +func firstBoundaryF(rb *reorderBuffer, s string) (int, []byte) { + return rb.f.form.FirstBoundary([]byte(s)), nil +} + +func firstBoundaryStringF(rb *reorderBuffer, s string) (int, []byte) { + return rb.f.form.FirstBoundaryInString(s), nil +} + +func TestFirstBoundary(t *testing.T) { + runPosTests(t, "TestFirstBoundary", NFC, firstBoundaryF, firstBoundaryTests) + runPosTests(t, "TestFirstBoundaryInString", NFC, firstBoundaryStringF, firstBoundaryTests) +} + +func TestNextBoundary(t *testing.T) { + testCases := []struct { + input string + atEOF bool + want int + }{ + // no boundary + {"", true, 0}, + {"", false, -1}, + {"\u0300", true, 2}, + {"\u0300", false, -1}, + {"\x80\x80", true, 1}, + {"\x80\x80", false, 1}, + // illegal runes + {"\xff", false, 1}, + {"\u0300\xff", false, 2}, + {"\u0300\xc0\x80\x80", false, 2}, + {"\xc2\x80\x80", false, 2}, + {"\xc2", false, -1}, + {"\xc2", true, 1}, + {"a\u0300\xc2", false, -1}, + {"a\u0300\xc2", true, 3}, + // boundaries + {"a", true, 1}, + {"a", false, -1}, + {"aa", false, 1}, + {"\u0300", true, 2}, + {"\u0300", false, -1}, + {"\u0300a", false, 2}, + // Hangul + {"\u1103\u1161", true, 6}, + {"\u1103\u1161", false, -1}, + {"\u110B\u1173\u11B7", false, -1}, + {"\u110B\u1173\u11B7\u110B\u1173\u11B7", false, 9}, + {"\u1161\u110B\u1173\u11B7", false, 3}, + {"\u1173\u11B7\u1103\u1161", false, 6}, + // too many combining characters. + {grave(maxNonStarters - 1), false, -1}, + {grave(maxNonStarters), false, 60}, + {grave(maxNonStarters + 1), false, 60}, + } + + for _, tc := range testCases { + if got := NFC.NextBoundary([]byte(tc.input), tc.atEOF); got != tc.want { + t.Errorf("NextBoundary(%+q, %v) = %d; want %d", tc.input, tc.atEOF, got, tc.want) + } + if got := NFC.NextBoundaryInString(tc.input, tc.atEOF); got != tc.want { + t.Errorf("NextBoundaryInString(%+q, %v) = %d; want %d", tc.input, tc.atEOF, got, tc.want) + } + } +} + +var decomposeToLastTests = []PositionTest{ + // ends with inert character + {"Hello!", 6, ""}, + {"\u0632", 2, ""}, + {"a\u0301\u0635", 5, ""}, + // ends with non-inert starter + {"a", 0, "a"}, + {"a\u0301a", 3, "a"}, + {"a\u0301\u03B9", 3, "\u03B9"}, + {"a\u0327", 0, "a\u0327"}, + // illegal runes + {"\xFF", 1, ""}, + {"aa\xFF", 3, ""}, + {"\xC0\x80\x80", 3, ""}, + {"\xCC\x80\x80", 3, ""}, + // ends with incomplete UTF-8 encoding + {"a\xCC", 2, ""}, + // ends with combining characters + {"\u0300\u0301", 0, "\u0300\u0301"}, + {"a\u0300\u0301", 0, "a\u0300\u0301"}, + {"a\u0301\u0308", 0, "a\u0301\u0308"}, + {"a\u0308\u0301", 0, "a\u0308\u0301"}, + {"aaaa\u0300\u0301", 3, "a\u0300\u0301"}, + {"\u0300a\u0300\u0301", 2, "a\u0300\u0301"}, + {"\u00C0", 0, "A\u0300"}, + {"a\u00C0", 1, "A\u0300"}, + // decomposing + {"a\u0300\u00E0", 3, "a\u0300"}, + // multisegment decompositions (flushes leading segments) + {"a\u0300\uFDC0", 7, "\u064A"}, + {"\uFDC0" + grave(29), 4, "\u064A" + grave(29)}, + {"\uFDC0" + grave(30), 4, "\u064A" + grave(30)}, + {"\uFDC0" + grave(31), 5, grave(30)}, + {"\uFDFA" + grave(14), 31, "\u0645" + grave(14)}, + // Overflow + {"\u00E0" + grave(29), 0, "a" + grave(30)}, + {"\u00E0" + grave(30), 2, grave(30)}, + // Hangul + {"a\u1103", 1, "\u1103"}, + {"a\u110B", 1, "\u110B"}, + {"a\u110B\u1173", 1, "\u110B\u1173"}, + // See comment in composition.go:compBoundaryAfter. + {"a\u110B\u1173\u11B7", 1, "\u110B\u1173\u11B7"}, + {"a\uC73C", 1, "\u110B\u1173"}, + {"다음", 3, "\u110B\u1173\u11B7"}, + {"다", 0, "\u1103\u1161"}, + {"\u1103\u1161\u110B\u1173\u11B7", 6, "\u110B\u1173\u11B7"}, + {"\u110B\u1173\u11B7\u1103\u1161", 9, "\u1103\u1161"}, + {"다음음", 6, "\u110B\u1173\u11B7"}, + {"음다다", 6, "\u1103\u1161"}, + // maximized buffer + {"a" + grave(30), 0, "a" + grave(30)}, + // Buffer overflow + {"a" + grave(31), 3, grave(30)}, + // weird UTF-8 + {"a\u0300\u11B7", 0, "a\u0300\u11B7"}, +} + +func decomposeToLast(rb *reorderBuffer, s string) (int, []byte) { + rb.setFlusher([]byte(s), appendFlush) + decomposeToLastBoundary(rb) + buf := rb.flush(nil) + return len(rb.out), buf +} + +func TestDecomposeToLastBoundary(t *testing.T) { + runPosTests(t, "TestDecomposeToLastBoundary", NFKC, decomposeToLast, decomposeToLastTests) +} + +var lastBoundaryTests = []PositionTest{ + // ends with inert character + {"Hello!", 6, ""}, + {"\u0632", 2, ""}, + // ends with non-inert starter + {"a", 0, ""}, + // illegal runes + {"\xff", 1, ""}, + {"aa\xff", 3, ""}, + {"a\xff\u0300", 1, ""}, // TODO: should probably be 2. + {"\xc0\x80\x80", 3, ""}, + {"\xc0\x80\x80\u0300", 3, ""}, + // ends with incomplete UTF-8 encoding + {"\xCC", -1, ""}, + {"\xE0\x80", -1, ""}, + {"\xF0\x80\x80", -1, ""}, + {"a\xCC", 0, ""}, + {"\x80\xCC", 1, ""}, + {"\xCC\xCC", 1, ""}, + // ends with combining characters + {"a\u0300\u0301", 0, ""}, + {"aaaa\u0300\u0301", 3, ""}, + {"\u0300a\u0300\u0301", 2, ""}, + {"\u00C2", 0, ""}, + {"a\u00C2", 1, ""}, + // decomposition may recombine + {"\u0226", 0, ""}, + // no boundary + {"", -1, ""}, + {"\u0300\u0301", -1, ""}, + {"\u0300", -1, ""}, + {"\x80\x80", -1, ""}, + {"\x80\x80\u0301", -1, ""}, + // Hangul + {"다음", 3, ""}, + {"다", 0, ""}, + {"\u1103\u1161\u110B\u1173\u11B7", 6, ""}, + {"\u110B\u1173\u11B7\u1103\u1161", 9, ""}, + // too many combining characters. + {grave(maxNonStarters - 1), -1, ""}, + // May still be preceded with a non-starter. + {grave(maxNonStarters), -1, ""}, + // May still need to insert a cgj after the last combiner. + {grave(maxNonStarters + 1), 2, ""}, + {grave(maxNonStarters + 2), 4, ""}, + + {"a" + grave(maxNonStarters-1), 0, ""}, + {"a" + grave(maxNonStarters), 0, ""}, + // May still need to insert a cgj after the last combiner. + {"a" + grave(maxNonStarters+1), 3, ""}, + {"a" + grave(maxNonStarters+2), 5, ""}, +} + +func lastBoundaryF(rb *reorderBuffer, s string) (int, []byte) { + return rb.f.form.LastBoundary([]byte(s)), nil +} + +func TestLastBoundary(t *testing.T) { + runPosTests(t, "TestLastBoundary", NFC, lastBoundaryF, lastBoundaryTests) +} + +type spanTest struct { + input string + atEOF bool + n int + err error +} + +var quickSpanTests = []spanTest{ + {"", true, 0, nil}, + // starters + {"a", true, 1, nil}, + {"abc", true, 3, nil}, + {"\u043Eb", true, 3, nil}, + // incomplete last rune. + {"\xCC", true, 1, nil}, + {"\xCC", false, 0, transform.ErrShortSrc}, + {"a\xCC", true, 2, nil}, + {"a\xCC", false, 0, transform.ErrShortSrc}, // TODO: could be 1 for NFD + // incorrectly ordered combining characters + {"\u0300\u0316", true, 0, transform.ErrEndOfSpan}, + {"\u0300\u0316", false, 0, transform.ErrEndOfSpan}, + {"\u0300\u0316cd", true, 0, transform.ErrEndOfSpan}, + {"\u0300\u0316cd", false, 0, transform.ErrEndOfSpan}, + // have a maximum number of combining characters. + {rep(0x035D, 30) + "\u035B", true, 0, transform.ErrEndOfSpan}, + {"a" + rep(0x035D, 30) + "\u035B", true, 0, transform.ErrEndOfSpan}, + {"Ɵ" + rep(0x035D, 30) + "\u035B", true, 0, transform.ErrEndOfSpan}, + {"aa" + rep(0x035D, 30) + "\u035B", true, 1, transform.ErrEndOfSpan}, + {rep(0x035D, 30) + cgj + "\u035B", true, 64, nil}, + {"a" + rep(0x035D, 30) + cgj + "\u035B", true, 65, nil}, + {"Ɵ" + rep(0x035D, 30) + cgj + "\u035B", true, 66, nil}, + {"aa" + rep(0x035D, 30) + cgj + "\u035B", true, 66, nil}, + + {"a" + rep(0x035D, 30) + cgj + "\u035B", false, 61, transform.ErrShortSrc}, + {"Ɵ" + rep(0x035D, 30) + cgj + "\u035B", false, 62, transform.ErrShortSrc}, + {"aa" + rep(0x035D, 30) + cgj + "\u035B", false, 62, transform.ErrShortSrc}, +} + +var quickSpanNFDTests = []spanTest{ + // needs decomposing + {"\u00C0", true, 0, transform.ErrEndOfSpan}, + {"abc\u00C0", true, 3, transform.ErrEndOfSpan}, + // correctly ordered combining characters + {"\u0300", true, 2, nil}, + {"ab\u0300", true, 4, nil}, + {"ab\u0300cd", true, 6, nil}, + {"\u0300cd", true, 4, nil}, + {"\u0316\u0300", true, 4, nil}, + {"ab\u0316\u0300", true, 6, nil}, + {"ab\u0316\u0300cd", true, 8, nil}, + {"ab\u0316\u0300\u00C0", true, 6, transform.ErrEndOfSpan}, + {"\u0316\u0300cd", true, 6, nil}, + {"\u043E\u0308b", true, 5, nil}, + // incorrectly ordered combining characters + {"ab\u0300\u0316", true, 1, transform.ErrEndOfSpan}, // TODO: we could skip 'b' as well. + {"ab\u0300\u0316cd", true, 1, transform.ErrEndOfSpan}, + // Hangul + {"같은", true, 0, transform.ErrEndOfSpan}, +} + +var quickSpanNFCTests = []spanTest{ + // okay composed + {"\u00C0", true, 2, nil}, + {"abc\u00C0", true, 5, nil}, + // correctly ordered combining characters + // TODO: b may combine with modifiers, which is why this fails. We could + // make a more precise test that that actually checks whether last + // characters combines. Probably not worth it. + {"ab\u0300", true, 1, transform.ErrEndOfSpan}, + {"ab\u0300cd", true, 1, transform.ErrEndOfSpan}, + {"ab\u0316\u0300", true, 1, transform.ErrEndOfSpan}, + {"ab\u0316\u0300cd", true, 1, transform.ErrEndOfSpan}, + {"\u00C0\u035D", true, 4, nil}, + // we do not special case leading combining characters + {"\u0300cd", true, 0, transform.ErrEndOfSpan}, + {"\u0300", true, 0, transform.ErrEndOfSpan}, + {"\u0316\u0300", true, 0, transform.ErrEndOfSpan}, + {"\u0316\u0300cd", true, 0, transform.ErrEndOfSpan}, + // incorrectly ordered combining characters + {"ab\u0300\u0316", true, 1, transform.ErrEndOfSpan}, + {"ab\u0300\u0316cd", true, 1, transform.ErrEndOfSpan}, + // Hangul + {"같은", true, 6, nil}, + {"같은", false, 3, transform.ErrShortSrc}, + // We return the start of the violating segment in case of overflow. + {grave(30) + "\uff9e", true, 0, transform.ErrEndOfSpan}, + {grave(30), true, 0, transform.ErrEndOfSpan}, +} + +func runSpanTests(t *testing.T, name string, f Form, testCases []spanTest) { + for i, tc := range testCases { + s := fmt.Sprintf("Bytes/%s/%d=%+q/atEOF=%v", name, i, pc(tc.input), tc.atEOF) + ok := testtext.Run(t, s, func(t *testing.T) { + n, err := f.Span([]byte(tc.input), tc.atEOF) + if n != tc.n || err != tc.err { + t.Errorf("\n got %d, %v;\nwant %d, %v", n, err, tc.n, tc.err) + } + }) + if !ok { + continue // Don't do the String variant if the Bytes variant failed. + } + s = fmt.Sprintf("String/%s/%d=%+q/atEOF=%v", name, i, pc(tc.input), tc.atEOF) + testtext.Run(t, s, func(t *testing.T) { + n, err := f.SpanString(tc.input, tc.atEOF) + if n != tc.n || err != tc.err { + t.Errorf("\n got %d, %v;\nwant %d, %v", n, err, tc.n, tc.err) + } + }) + } +} + +func TestSpan(t *testing.T) { + runSpanTests(t, "NFD", NFD, quickSpanTests) + runSpanTests(t, "NFD", NFD, quickSpanNFDTests) + runSpanTests(t, "NFC", NFC, quickSpanTests) + runSpanTests(t, "NFC", NFC, quickSpanNFCTests) +} + +var isNormalTests = []PositionTest{ + {"", 1, ""}, + // illegal runes + {"\xff", 1, ""}, + // starters + {"a", 1, ""}, + {"abc", 1, ""}, + {"\u043Eb", 1, ""}, + // incorrectly ordered combining characters + {"\u0300\u0316", 0, ""}, + {"ab\u0300\u0316", 0, ""}, + {"ab\u0300\u0316cd", 0, ""}, + {"\u0300\u0316cd", 0, ""}, +} +var isNormalNFDTests = []PositionTest{ + // needs decomposing + {"\u00C0", 0, ""}, + {"abc\u00C0", 0, ""}, + // correctly ordered combining characters + {"\u0300", 1, ""}, + {"ab\u0300", 1, ""}, + {"ab\u0300cd", 1, ""}, + {"\u0300cd", 1, ""}, + {"\u0316\u0300", 1, ""}, + {"ab\u0316\u0300", 1, ""}, + {"ab\u0316\u0300cd", 1, ""}, + {"\u0316\u0300cd", 1, ""}, + {"\u043E\u0308b", 1, ""}, + // Hangul + {"같은", 0, ""}, +} +var isNormalNFCTests = []PositionTest{ + // okay composed + {"\u00C0", 1, ""}, + {"abc\u00C0", 1, ""}, + // need reordering + {"a\u0300", 0, ""}, + {"a\u0300cd", 0, ""}, + {"a\u0316\u0300", 0, ""}, + {"a\u0316\u0300cd", 0, ""}, + // correctly ordered combining characters + {"ab\u0300", 1, ""}, + {"ab\u0300cd", 1, ""}, + {"ab\u0316\u0300", 1, ""}, + {"ab\u0316\u0300cd", 1, ""}, + {"\u00C0\u035D", 1, ""}, + {"\u0300", 1, ""}, + {"\u0316\u0300cd", 1, ""}, + // Hangul + {"같은", 1, ""}, +} + +var isNormalNFKXTests = []PositionTest{ + // Special case. + {"\u00BC", 0, ""}, +} + +func isNormalF(rb *reorderBuffer, s string) (int, []byte) { + if rb.f.form.IsNormal([]byte(s)) { + return 1, nil + } + return 0, nil +} + +func isNormalStringF(rb *reorderBuffer, s string) (int, []byte) { + if rb.f.form.IsNormalString(s) { + return 1, nil + } + return 0, nil +} + +func TestIsNormal(t *testing.T) { + runPosTests(t, "TestIsNormalNFD1", NFD, isNormalF, isNormalTests) + runPosTests(t, "TestIsNormalNFD2", NFD, isNormalF, isNormalNFDTests) + runPosTests(t, "TestIsNormalNFC1", NFC, isNormalF, isNormalTests) + runPosTests(t, "TestIsNormalNFC2", NFC, isNormalF, isNormalNFCTests) + runPosTests(t, "TestIsNormalNFKD1", NFKD, isNormalF, isNormalTests) + runPosTests(t, "TestIsNormalNFKD2", NFKD, isNormalF, isNormalNFDTests) + runPosTests(t, "TestIsNormalNFKD3", NFKD, isNormalF, isNormalNFKXTests) + runPosTests(t, "TestIsNormalNFKC1", NFKC, isNormalF, isNormalTests) + runPosTests(t, "TestIsNormalNFKC2", NFKC, isNormalF, isNormalNFCTests) + runPosTests(t, "TestIsNormalNFKC3", NFKC, isNormalF, isNormalNFKXTests) +} + +func TestIsNormalString(t *testing.T) { + runPosTests(t, "TestIsNormalNFD1", NFD, isNormalStringF, isNormalTests) + runPosTests(t, "TestIsNormalNFD2", NFD, isNormalStringF, isNormalNFDTests) + runPosTests(t, "TestIsNormalNFC1", NFC, isNormalStringF, isNormalTests) + runPosTests(t, "TestIsNormalNFC2", NFC, isNormalStringF, isNormalNFCTests) +} + +type AppendTest struct { + left string + right string + out string +} + +type appendFunc func(f Form, out []byte, s string) []byte + +var fstr = []string{"NFC", "NFD", "NFKC", "NFKD"} + +func runNormTests(t *testing.T, name string, fn appendFunc) { + for f := NFC; f <= NFKD; f++ { + runAppendTests(t, name, f, fn, normTests[f]) + } +} + +func runAppendTests(t *testing.T, name string, f Form, fn appendFunc, tests []AppendTest) { + for i, test := range tests { + t.Run(fmt.Sprintf("%s/%d", fstr[f], i), func(t *testing.T) { + id := pc(test.left + test.right) + if *testn >= 0 && i != *testn { + return + } + t.Run("fn", func(t *testing.T) { + out := []byte(test.left) + have := string(fn(f, out, test.right)) + if len(have) != len(test.out) { + t.Errorf("%+q: length is %d; want %d (%+q vs %+q)", id, len(have), len(test.out), pc(have), pc(test.out)) + } + if have != test.out { + k, pf := pidx(have, test.out) + t.Errorf("%+q:\nwas %s%+q; \nwant %s%+q", id, pf, pc(have[k:]), pf, pc(test.out[k:])) + } + }) + + // Bootstrap by normalizing input. Ensures that the various variants + // behave the same. + for g := NFC; g <= NFKD; g++ { + if f == g { + continue + } + t.Run(fstr[g], func(t *testing.T) { + want := g.String(test.left + test.right) + have := string(fn(g, g.AppendString(nil, test.left), test.right)) + if len(have) != len(want) { + t.Errorf("%+q: length is %d; want %d (%+q vs %+q)", id, len(have), len(want), pc(have), pc(want)) + } + if have != want { + k, pf := pidx(have, want) + t.Errorf("%+q:\nwas %s%+q; \nwant %s%+q", id, pf, pc(have[k:]), pf, pc(want[k:])) + } + }) + } + }) + } +} + +var normTests = [][]AppendTest{ + appendTestsNFC, + appendTestsNFD, + appendTestsNFKC, + appendTestsNFKD, +} + +var appendTestsNFC = []AppendTest{ + {"", ascii, ascii}, + {"", txt_all, txt_all}, + {"\uff9e", grave(30), "\uff9e" + grave(29) + cgj + grave(1)}, + {grave(30), "\uff9e", grave(30) + cgj + "\uff9e"}, + + // Tests designed for Iter. + { // ordering of non-composing combining characters + "", + "\u0305\u0316", + "\u0316\u0305", + }, + { // segment overflow + "", + "a" + rep(0x0305, maxNonStarters+4) + "\u0316", + "a" + rep(0x0305, maxNonStarters) + cgj + "\u0316" + rep(0x305, 4), + }, + + { // Combine across non-blocking non-starters. + // U+0327 COMBINING CEDILLA;Mn;202;NSM;;;;;N;NON-SPACING CEDILLA;;;; + // U+0325 COMBINING RING BELOW;Mn;220;NSM;;;;;N;NON-SPACING RING BELOW;;;; + "", "a\u0327\u0325", "\u1e01\u0327", + }, + + { // Jamo V+T does not combine. + "", + "\u1161\u11a8", + "\u1161\u11a8", + }, + + // Stability tests: see http://www.unicode.org/review/pr-29.html. + {"", "\u0b47\u0300\u0b3e", "\u0b47\u0300\u0b3e"}, + {"", "\u1100\u0300\u1161", "\u1100\u0300\u1161"}, + {"", "\u0b47\u0b3e", "\u0b4b"}, + {"", "\u1100\u1161", "\uac00"}, + + // U+04DA MALAYALAM VOWEL SIGN O;Mc;0;L;0D46 0D3E;;;;N;;;;; + { // 0d4a starts a new segment. + "", + "\u0d4a" + strings.Repeat("\u0d3e", 15) + "\u0d4a" + strings.Repeat("\u0d3e", 15), + "\u0d4a" + strings.Repeat("\u0d3e", 15) + "\u0d4a" + strings.Repeat("\u0d3e", 15), + }, + + { // Split combining characters. + // TODO: don't insert CGJ before starters. + "", + "\u0d46" + strings.Repeat("\u0d3e", 31), + "\u0d4a" + strings.Repeat("\u0d3e", 29) + cgj + "\u0d3e", + }, + + { // Split combining characters. + "", + "\u0d4a" + strings.Repeat("\u0d3e", 30), + "\u0d4a" + strings.Repeat("\u0d3e", 29) + cgj + "\u0d3e", + }, + + { // https://golang.org/issues/20079 + "", + "\xeb\u0344", + "\xeb\u0308\u0301", + }, + + { // https://golang.org/issues/20079 + "", + "\uac00" + strings.Repeat("\u0300", 30), + "\uac00" + strings.Repeat("\u0300", 29) + "\u034f\u0300", + }, + + { // https://golang.org/issues/20079 + "", + "\xeb" + strings.Repeat("\u0300", 31), + "\xeb" + strings.Repeat("\u0300", 30) + "\u034f\u0300", + }, +} + +var appendTestsNFD = []AppendTest{ +// TODO: Move some of the tests here. +} + +var appendTestsNFKC = []AppendTest{ + // empty buffers + {"", "", ""}, + {"a", "", "a"}, + {"", "a", "a"}, + {"", "\u0041\u0307\u0304", "\u01E0"}, + // segment split across buffers + {"", "a\u0300b", "\u00E0b"}, + {"a", "\u0300b", "\u00E0b"}, + {"a", "\u0300\u0316", "\u00E0\u0316"}, + {"a", "\u0316\u0300", "\u00E0\u0316"}, + {"a", "\u0300a\u0300", "\u00E0\u00E0"}, + {"a", "\u0300a\u0300a\u0300", "\u00E0\u00E0\u00E0"}, + {"a", "\u0300aaa\u0300aaa\u0300", "\u00E0aa\u00E0aa\u00E0"}, + {"a\u0300", "\u0327", "\u00E0\u0327"}, + {"a\u0327", "\u0300", "\u00E0\u0327"}, + {"a\u0316", "\u0300", "\u00E0\u0316"}, + {"\u0041\u0307", "\u0304", "\u01E0"}, + // Hangul + {"", "\u110B\u1173", "\uC73C"}, + {"", "\u1103\u1161", "\uB2E4"}, + {"", "\u110B\u1173\u11B7", "\uC74C"}, + {"", "\u320E", "\x28\uAC00\x29"}, + {"", "\x28\u1100\u1161\x29", "\x28\uAC00\x29"}, + {"\u1103", "\u1161", "\uB2E4"}, + {"\u110B", "\u1173\u11B7", "\uC74C"}, + {"\u110B\u1173", "\u11B7", "\uC74C"}, + {"\uC73C", "\u11B7", "\uC74C"}, + // UTF-8 encoding split across buffers + {"a\xCC", "\x80", "\u00E0"}, + {"a\xCC", "\x80b", "\u00E0b"}, + {"a\xCC", "\x80a\u0300", "\u00E0\u00E0"}, + {"a\xCC", "\x80\x80", "\u00E0\x80"}, + {"a\xCC", "\x80\xCC", "\u00E0\xCC"}, + {"a\u0316\xCC", "\x80a\u0316\u0300", "\u00E0\u0316\u00E0\u0316"}, + // ending in incomplete UTF-8 encoding + {"", "\xCC", "\xCC"}, + {"a", "\xCC", "a\xCC"}, + {"a", "b\xCC", "ab\xCC"}, + {"\u0226", "\xCC", "\u0226\xCC"}, + // illegal runes + {"", "\x80", "\x80"}, + {"", "\x80\x80\x80", "\x80\x80\x80"}, + {"", "\xCC\x80\x80\x80", "\xCC\x80\x80\x80"}, + {"", "a\x80", "a\x80"}, + {"", "a\x80\x80\x80", "a\x80\x80\x80"}, + {"", "a\x80\x80\x80\x80\x80\x80", "a\x80\x80\x80\x80\x80\x80"}, + {"a", "\x80\x80\x80", "a\x80\x80\x80"}, + // overflow + {"", strings.Repeat("\x80", 33), strings.Repeat("\x80", 33)}, + {strings.Repeat("\x80", 33), "", strings.Repeat("\x80", 33)}, + {strings.Repeat("\x80", 33), strings.Repeat("\x80", 33), strings.Repeat("\x80", 66)}, + // overflow of combining characters + {"", grave(34), grave(30) + cgj + grave(4)}, + {"", grave(36), grave(30) + cgj + grave(6)}, + {grave(29), grave(5), grave(30) + cgj + grave(4)}, + {grave(30), grave(4), grave(30) + cgj + grave(4)}, + {grave(30), grave(3), grave(30) + cgj + grave(3)}, + {grave(30) + "\xCC", "\x80", grave(30) + cgj + grave(1)}, + {"", "\uFDFA" + grave(14), "\u0635\u0644\u0649 \u0627\u0644\u0644\u0647 \u0639\u0644\u064a\u0647 \u0648\u0633\u0644\u0645" + grave(14)}, + {"", "\uFDFA" + grave(28) + "\u0316", "\u0635\u0644\u0649 \u0627\u0644\u0644\u0647 \u0639\u0644\u064a\u0647 \u0648\u0633\u0644\u0645\u0316" + grave(28)}, + // - First rune has a trailing non-starter. + {"\u00d5", grave(30), "\u00d5" + grave(29) + cgj + grave(1)}, + // - U+FF9E decomposes into a non-starter in compatibility mode. A CGJ must be + // inserted even when FF9E starts a new segment. + {"\uff9e", grave(30), "\u3099" + grave(29) + cgj + grave(1)}, + {grave(30), "\uff9e", grave(30) + cgj + "\u3099"}, + // - Many non-starter decompositions in a row causing overflow. + {"", rep(0x340, 31), rep(0x300, 30) + cgj + "\u0300"}, + {"", rep(0xFF9E, 31), rep(0x3099, 30) + cgj + "\u3099"}, + + {"", "\u0644\u0625" + rep(0x300, 31), "\u0644\u0625" + rep(0x300, 29) + cgj + "\u0300\u0300"}, + {"", "\ufef9" + rep(0x300, 31), "\u0644\u0625" + rep(0x300, 29) + cgj + rep(0x0300, 2)}, + {"", "\ufef9" + rep(0x300, 31), "\u0644\u0625" + rep(0x300, 29) + cgj + rep(0x0300, 2)}, + + // U+0F81 TIBETAN VOWEL SIGN REVERSED II splits into two modifiers. + {"", "\u0f7f" + rep(0xf71, 29) + "\u0f81", "\u0f7f" + rep(0xf71, 29) + cgj + "\u0f71\u0f80"}, + {"", "\u0f7f" + rep(0xf71, 28) + "\u0f81", "\u0f7f" + rep(0xf71, 29) + "\u0f80"}, + {"", "\u0f7f" + rep(0xf81, 16), "\u0f7f" + rep(0xf71, 15) + rep(0xf80, 15) + cgj + "\u0f71\u0f80"}, + + // weird UTF-8 + {"\u00E0\xE1", "\x86", "\u00E0\xE1\x86"}, + {"a\u0300\u11B7", "\u0300", "\u00E0\u11B7\u0300"}, + {"a\u0300\u11B7\u0300", "\u0300", "\u00E0\u11B7\u0300\u0300"}, + {"\u0300", "\xF8\x80\x80\x80\x80\u0300", "\u0300\xF8\x80\x80\x80\x80\u0300"}, + {"\u0300", "\xFC\x80\x80\x80\x80\x80\u0300", "\u0300\xFC\x80\x80\x80\x80\x80\u0300"}, + {"\xF8\x80\x80\x80\x80\u0300", "\u0300", "\xF8\x80\x80\x80\x80\u0300\u0300"}, + {"\xFC\x80\x80\x80\x80\x80\u0300", "\u0300", "\xFC\x80\x80\x80\x80\x80\u0300\u0300"}, + {"\xF8\x80\x80\x80", "\x80\u0300\u0300", "\xF8\x80\x80\x80\x80\u0300\u0300"}, + + {"", strings.Repeat("a\u0316\u0300", 6), strings.Repeat("\u00E0\u0316", 6)}, + // large input. + {"", strings.Repeat("a\u0300\u0316", 31), strings.Repeat("\u00E0\u0316", 31)}, + {"", strings.Repeat("a\u0300\u0316", 4000), strings.Repeat("\u00E0\u0316", 4000)}, + {"", strings.Repeat("\x80\x80", 4000), strings.Repeat("\x80\x80", 4000)}, + {"", "\u0041\u0307\u0304", "\u01E0"}, +} + +var appendTestsNFKD = []AppendTest{ + {"", "a" + grave(64), "a" + grave(30) + cgj + grave(30) + cgj + grave(4)}, + + { // segment overflow on unchanged character + "", + "a" + grave(64) + "\u0316", + "a" + grave(30) + cgj + grave(30) + cgj + "\u0316" + grave(4), + }, + { // segment overflow on unchanged character + start value + "", + "a" + grave(98) + "\u0316", + "a" + grave(30) + cgj + grave(30) + cgj + grave(30) + cgj + "\u0316" + grave(8), + }, + { // segment overflow on decomposition. (U+0340 decomposes to U+0300.) + "", + "a" + grave(59) + "\u0340", + "a" + grave(30) + cgj + grave(30), + }, + { // segment overflow on non-starter decomposition + "", + "a" + grave(33) + "\u0340" + grave(30) + "\u0320", + "a" + grave(30) + cgj + grave(30) + cgj + "\u0320" + grave(4), + }, + { // start value after ASCII overflow + "", + rep('a', segSize) + grave(32) + "\u0320", + rep('a', segSize) + grave(30) + cgj + "\u0320" + grave(2), + }, + { // Jamo overflow + "", + "\u1100\u1161" + grave(30) + "\u0320" + grave(2), + "\u1100\u1161" + grave(29) + cgj + "\u0320" + grave(3), + }, + { // Hangul + "", + "\uac00", + "\u1100\u1161", + }, + { // Hangul overflow + "", + "\uac00" + grave(32) + "\u0320", + "\u1100\u1161" + grave(29) + cgj + "\u0320" + grave(3), + }, + { // Hangul overflow in Hangul mode. + "", + "\uac00\uac00" + grave(32) + "\u0320", + "\u1100\u1161\u1100\u1161" + grave(29) + cgj + "\u0320" + grave(3), + }, + { // Hangul overflow in Hangul mode. + "", + strings.Repeat("\uac00", 3) + grave(32) + "\u0320", + strings.Repeat("\u1100\u1161", 3) + grave(29) + cgj + "\u0320" + grave(3), + }, + { // start value after cc=0 + "", + "您您" + grave(34) + "\u0320", + "您您" + grave(30) + cgj + "\u0320" + grave(4), + }, + { // start value after normalization + "", + "\u0300\u0320a" + grave(34) + "\u0320", + "\u0320\u0300a" + grave(30) + cgj + "\u0320" + grave(4), + }, + { + // U+0F81 TIBETAN VOWEL SIGN REVERSED II splits into two modifiers. + "", + "a\u0f7f" + rep(0xf71, 29) + "\u0f81", + "a\u0f7f" + rep(0xf71, 29) + cgj + "\u0f71\u0f80", + }, +} + +func TestAppend(t *testing.T) { + runNormTests(t, "Append", func(f Form, out []byte, s string) []byte { + return f.Append(out, []byte(s)...) + }) +} + +func TestAppendString(t *testing.T) { + runNormTests(t, "AppendString", func(f Form, out []byte, s string) []byte { + return f.AppendString(out, s) + }) +} + +func TestBytes(t *testing.T) { + runNormTests(t, "Bytes", func(f Form, out []byte, s string) []byte { + buf := []byte{} + buf = append(buf, out...) + buf = append(buf, s...) + return f.Bytes(buf) + }) +} + +func TestString(t *testing.T) { + runNormTests(t, "String", func(f Form, out []byte, s string) []byte { + outs := string(out) + s + return []byte(f.String(outs)) + }) +} + +func TestLinking(t *testing.T) { + const prog = ` + package main + import "fmt" + import "golang.org/x/text/unicode/norm" + func main() { fmt.Println(norm.%s) } + ` + baseline, errB := testtext.CodeSize(fmt.Sprintf(prog, "MaxSegmentSize")) + withTables, errT := testtext.CodeSize(fmt.Sprintf(prog, `NFC.String("")`)) + if errB != nil || errT != nil { + t.Skipf("code size failed: %v and %v", errB, errT) + } + // Tables are at least 50K + if d := withTables - baseline; d < 50*1024 { + t.Errorf("tables appear not to be dropped: %d - %d = %d", + withTables, baseline, d) + } +} + +func appendBench(f Form, in []byte) func() { + buf := make([]byte, 0, 4*len(in)) + return func() { + f.Append(buf, in...) + } +} + +func bytesBench(f Form, in []byte) func() { + return func() { + f.Bytes(in) + } +} + +func iterBench(f Form, in []byte) func() { + iter := Iter{} + return func() { + iter.Init(f, in) + for !iter.Done() { + iter.Next() + } + } +} + +func transformBench(f Form, in []byte) func() { + buf := make([]byte, 4*len(in)) + return func() { + if _, n, err := f.Transform(buf, in, true); err != nil || len(in) != n { + log.Panic(n, len(in), err) + } + } +} + +func readerBench(f Form, in []byte) func() { + buf := make([]byte, 4*len(in)) + return func() { + r := f.Reader(bytes.NewReader(in)) + var err error + for err == nil { + _, err = r.Read(buf) + } + if err != io.EOF { + panic("") + } + } +} + +func writerBench(f Form, in []byte) func() { + buf := make([]byte, 0, 4*len(in)) + return func() { + r := f.Writer(bytes.NewBuffer(buf)) + if _, err := r.Write(in); err != nil { + panic("") + } + } +} + +func appendBenchmarks(bm []func(), f Form, in []byte) []func() { + bm = append(bm, appendBench(f, in)) + bm = append(bm, iterBench(f, in)) + bm = append(bm, transformBench(f, in)) + bm = append(bm, readerBench(f, in)) + bm = append(bm, writerBench(f, in)) + return bm +} + +func doFormBenchmark(b *testing.B, inf, f Form, s string) { + b.StopTimer() + in := inf.Bytes([]byte(s)) + bm := appendBenchmarks(nil, f, in) + b.SetBytes(int64(len(in) * len(bm))) + b.StartTimer() + for i := 0; i < b.N; i++ { + for _, fn := range bm { + fn() + } + } +} + +func doSingle(b *testing.B, f func(Form, []byte) func(), s []byte) { + b.StopTimer() + fn := f(NFC, s) + b.SetBytes(int64(len(s))) + b.StartTimer() + for i := 0; i < b.N; i++ { + fn() + } +} + +var ( + smallNoChange = []byte("nörmalization") + smallChange = []byte("No\u0308rmalization") + ascii = strings.Repeat("There is nothing to change here! ", 500) +) + +func lowerBench(f Form, in []byte) func() { + // Use package strings instead of bytes as it doesn't allocate memory + // if there aren't any changes. + s := string(in) + return func() { + strings.ToLower(s) + } +} + +func BenchmarkLowerCaseNoChange(b *testing.B) { + doSingle(b, lowerBench, smallNoChange) +} +func BenchmarkLowerCaseChange(b *testing.B) { + doSingle(b, lowerBench, smallChange) +} + +func quickSpanBench(f Form, in []byte) func() { + return func() { + f.QuickSpan(in) + } +} + +func BenchmarkQuickSpanChangeNFC(b *testing.B) { + doSingle(b, quickSpanBench, smallNoChange) +} + +func BenchmarkBytesNoChangeNFC(b *testing.B) { + doSingle(b, bytesBench, smallNoChange) +} +func BenchmarkBytesChangeNFC(b *testing.B) { + doSingle(b, bytesBench, smallChange) +} + +func BenchmarkAppendNoChangeNFC(b *testing.B) { + doSingle(b, appendBench, smallNoChange) +} +func BenchmarkAppendChangeNFC(b *testing.B) { + doSingle(b, appendBench, smallChange) +} +func BenchmarkAppendLargeNFC(b *testing.B) { + doSingle(b, appendBench, txt_all_bytes) +} + +func BenchmarkIterNoChangeNFC(b *testing.B) { + doSingle(b, iterBench, smallNoChange) +} +func BenchmarkIterChangeNFC(b *testing.B) { + doSingle(b, iterBench, smallChange) +} +func BenchmarkIterLargeNFC(b *testing.B) { + doSingle(b, iterBench, txt_all_bytes) +} + +func BenchmarkTransformNoChangeNFC(b *testing.B) { + doSingle(b, transformBench, smallNoChange) +} +func BenchmarkTransformChangeNFC(b *testing.B) { + doSingle(b, transformBench, smallChange) +} +func BenchmarkTransformLargeNFC(b *testing.B) { + doSingle(b, transformBench, txt_all_bytes) +} + +func BenchmarkNormalizeAsciiNFC(b *testing.B) { + doFormBenchmark(b, NFC, NFC, ascii) +} +func BenchmarkNormalizeAsciiNFD(b *testing.B) { + doFormBenchmark(b, NFC, NFD, ascii) +} +func BenchmarkNormalizeAsciiNFKC(b *testing.B) { + doFormBenchmark(b, NFC, NFKC, ascii) +} +func BenchmarkNormalizeAsciiNFKD(b *testing.B) { + doFormBenchmark(b, NFC, NFKD, ascii) +} + +func BenchmarkNormalizeNFC2NFC(b *testing.B) { + doFormBenchmark(b, NFC, NFC, txt_all) +} +func BenchmarkNormalizeNFC2NFD(b *testing.B) { + doFormBenchmark(b, NFC, NFD, txt_all) +} +func BenchmarkNormalizeNFD2NFC(b *testing.B) { + doFormBenchmark(b, NFD, NFC, txt_all) +} +func BenchmarkNormalizeNFD2NFD(b *testing.B) { + doFormBenchmark(b, NFD, NFD, txt_all) +} + +// Hangul is often special-cased, so we test it separately. +func BenchmarkNormalizeHangulNFC2NFC(b *testing.B) { + doFormBenchmark(b, NFC, NFC, txt_kr) +} +func BenchmarkNormalizeHangulNFC2NFD(b *testing.B) { + doFormBenchmark(b, NFC, NFD, txt_kr) +} +func BenchmarkNormalizeHangulNFD2NFC(b *testing.B) { + doFormBenchmark(b, NFD, NFC, txt_kr) +} +func BenchmarkNormalizeHangulNFD2NFD(b *testing.B) { + doFormBenchmark(b, NFD, NFD, txt_kr) +} + +var forms = []Form{NFC, NFD, NFKC, NFKD} + +func doTextBenchmark(b *testing.B, s string) { + b.StopTimer() + in := []byte(s) + bm := []func(){} + for _, f := range forms { + bm = appendBenchmarks(bm, f, in) + } + b.SetBytes(int64(len(s) * len(bm))) + b.StartTimer() + for i := 0; i < b.N; i++ { + for _, f := range bm { + f() + } + } +} + +func BenchmarkCanonicalOrdering(b *testing.B) { + doTextBenchmark(b, txt_canon) +} +func BenchmarkExtendedLatin(b *testing.B) { + doTextBenchmark(b, txt_vn) +} +func BenchmarkMiscTwoByteUtf8(b *testing.B) { + doTextBenchmark(b, twoByteUtf8) +} +func BenchmarkMiscThreeByteUtf8(b *testing.B) { + doTextBenchmark(b, threeByteUtf8) +} +func BenchmarkHangul(b *testing.B) { + doTextBenchmark(b, txt_kr) +} +func BenchmarkJapanese(b *testing.B) { + doTextBenchmark(b, txt_jp) +} +func BenchmarkChinese(b *testing.B) { + doTextBenchmark(b, txt_cn) +} +func BenchmarkOverflow(b *testing.B) { + doTextBenchmark(b, overflow) +} + +var overflow = string(bytes.Repeat([]byte("\u035D"), 4096)) + "\u035B" + +// Tests sampled from the Canonical ordering tests (Part 2) of +// http://unicode.org/Public/UNIDATA/NormalizationTest.txt +const txt_canon = `\u0061\u0315\u0300\u05AE\u0300\u0062 \u0061\u0300\u0315\u0300\u05AE\u0062 +\u0061\u0302\u0315\u0300\u05AE\u0062 \u0061\u0307\u0315\u0300\u05AE\u0062 +\u0061\u0315\u0300\u05AE\u030A\u0062 \u0061\u059A\u0316\u302A\u031C\u0062 +\u0061\u032E\u059A\u0316\u302A\u0062 \u0061\u0338\u093C\u0334\u0062 +\u0061\u059A\u0316\u302A\u0339 \u0061\u0341\u0315\u0300\u05AE\u0062 +\u0061\u0348\u059A\u0316\u302A\u0062 \u0061\u0361\u0345\u035D\u035C\u0062 +\u0061\u0366\u0315\u0300\u05AE\u0062 \u0061\u0315\u0300\u05AE\u0486\u0062 +\u0061\u05A4\u059A\u0316\u302A\u0062 \u0061\u0315\u0300\u05AE\u0613\u0062 +\u0061\u0315\u0300\u05AE\u0615\u0062 \u0061\u0617\u0315\u0300\u05AE\u0062 +\u0061\u0619\u0618\u064D\u064E\u0062 \u0061\u0315\u0300\u05AE\u0654\u0062 +\u0061\u0315\u0300\u05AE\u06DC\u0062 \u0061\u0733\u0315\u0300\u05AE\u0062 +\u0061\u0744\u059A\u0316\u302A\u0062 \u0061\u0315\u0300\u05AE\u0745\u0062 +\u0061\u09CD\u05B0\u094D\u3099\u0062 \u0061\u0E38\u0E48\u0E38\u0C56\u0062 +\u0061\u0EB8\u0E48\u0E38\u0E49\u0062 \u0061\u0F72\u0F71\u0EC8\u0F71\u0062 +\u0061\u1039\u05B0\u094D\u3099\u0062 \u0061\u05B0\u094D\u3099\u1A60\u0062 +\u0061\u3099\u093C\u0334\u1BE6\u0062 \u0061\u3099\u093C\u0334\u1C37\u0062 +\u0061\u1CD9\u059A\u0316\u302A\u0062 \u0061\u2DED\u0315\u0300\u05AE\u0062 +\u0061\u2DEF\u0315\u0300\u05AE\u0062 \u0061\u302D\u302E\u059A\u0316\u0062` + +// Taken from http://creativecommons.org/licenses/by-sa/3.0/vn/ +const txt_vn = `Với các điều kiện sau: Ghi nhận công của tác giả. +Nếu bạn sử dụng, chuyển đổi, hoặc xây dựng dự án từ +nội dung được chia sẻ này, bạn phải áp dụng giấy phép này hoặc +một giấy phép khác có các điều khoản tương tự như giấy phép này +cho dự án của bạn. Hiểu rằng: Miễn — Bất kỳ các điều kiện nào +trên đây cũng có thể được miễn bỏ nếu bạn được sự cho phép của +người sở hữu bản quyền. Phạm vi công chúng — Khi tác phẩm hoặc +bất kỳ chương nào của tác phẩm đã trong vùng dành cho công +chúng theo quy định của pháp luật thì tình trạng của nó không +bị ảnh hưởng bởi giấy phép trong bất kỳ trường hợp nào.` + +// Taken from http://creativecommons.org/licenses/by-sa/1.0/deed.ru +const txt_ru = `При обязательном соблюдении следующих условий: +Attribution — Вы должны атрибутировать произведение (указывать +автора и источник) в порядке, предусмотренном автором или +лицензиаром (но только так, чтобы никоим образом не подразумевалось, +что они поддерживают вас или использование вами данного произведения). +Υπό τις ακόλουθες προϋποθέσεις:` + +// Taken from http://creativecommons.org/licenses/by-sa/3.0/gr/ +const txt_gr = `Αναφορά Δημιουργού — Θα πρέπει να κάνετε την αναφορά στο έργο με τον +τρόπο που έχει οριστεί από το δημιουργό ή το χορηγούντο την άδεια +(χωρίς όμως να εννοείται με οποιονδήποτε τρόπο ότι εγκρίνουν εσάς ή +τη χρήση του έργου από εσάς). Παρόμοια Διανομή — Εάν αλλοιώσετε, +τροποποιήσετε ή δημιουργήσετε περαιτέρω βασισμένοι στο έργο θα +μπορείτε να διανέμετε το έργο που θα προκύψει μόνο με την ίδια ή +παρόμοια άδεια.` + +// Taken from http://creativecommons.org/licenses/by-sa/3.0/deed.ar +const txt_ar = `بموجب الشروط التالية نسب المصنف — يجب عليك أن +تنسب العمل بالطريقة التي تحددها المؤلف أو المرخص (ولكن ليس بأي حال من +الأحوال أن توحي وتقترح بتحول أو استخدامك للعمل). +المشاركة على قدم المساواة — إذا كنت يعدل ، والتغيير ، أو الاستفادة +من هذا العمل ، قد ينتج عن توزيع العمل إلا في ظل تشابه او تطابق فى واحد +لهذا الترخيص.` + +// Taken from http://creativecommons.org/licenses/by-sa/1.0/il/ +const txt_il = `בכפוף לתנאים הבאים: ייחוס — עליך לייחס את היצירה (לתת קרדיט) באופן +המצויין על-ידי היוצר או מעניק הרישיון (אך לא בשום אופן המרמז על כך +שהם תומכים בך או בשימוש שלך ביצירה). שיתוף זהה — אם תחליט/י לשנות, +לעבד או ליצור יצירה נגזרת בהסתמך על יצירה זו, תוכל/י להפיץ את יצירתך +החדשה רק תחת אותו הרישיון או רישיון דומה לרישיון זה.` + +const twoByteUtf8 = txt_ru + txt_gr + txt_ar + txt_il + +// Taken from http://creativecommons.org/licenses/by-sa/2.0/kr/ +const txt_kr = `다음과 같은 조건을 따라야 합니다: 저작자표시 +(Attribution) — 저작자나 이용허락자가 정한 방법으로 저작물의 +원저작자를 표시하여야 합니다(그러나 원저작자가 이용자나 이용자의 +이용을 보증하거나 추천한다는 의미로 표시해서는 안됩니다). +동일조건변경허락 — 이 저작물을 이용하여 만든 이차적 저작물에는 본 +라이선스와 동일한 라이선스를 적용해야 합니다.` + +// Taken from http://creativecommons.org/licenses/by-sa/3.0/th/ +const txt_th = `ภายใต้เงื่อนไข ดังต่อไปนี้ : แสดงที่มา — คุณต้องแสดงที่ +มาของงานดังกล่าว ตามรูปแบบที่ผู้สร้างสรรค์หรือผู้อนุญาตกำหนด (แต่ +ไม่ใช่ในลักษณะที่ว่า พวกเขาสนับสนุนคุณหรือสนับสนุนการที่ +คุณนำงานไปใช้) อนุญาตแบบเดียวกัน — หากคุณดัดแปลง เปลี่ยนรูป หรื +อต่อเติมงานนี้ คุณต้องใช้สัญญาอนุญาตแบบเดียวกันหรือแบบที่เหมื +อนกับสัญญาอนุญาตที่ใช้กับงานนี้เท่านั้น` + +const threeByteUtf8 = txt_th + +// Taken from http://creativecommons.org/licenses/by-sa/2.0/jp/ +const txt_jp = `あなたの従うべき条件は以下の通りです。 +表示 — あなたは原著作者のクレジットを表示しなければなりません。 +継承 — もしあなたがこの作品を改変、変形または加工した場合、 +あなたはその結果生じた作品をこの作品と同一の許諾条件の下でのみ +頒布することができます。` + +// http://creativecommons.org/licenses/by-sa/2.5/cn/ +const txt_cn = `您可以自由: 复制、发行、展览、表演、放映、 +广播或通过信息网络传播本作品 创作演绎作品 +对本作品进行商业性使用 惟须遵守下列条件: +署名 — 您必须按照作者或者许可人指定的方式对作品进行署名。 +相同方式共享 — 如果您改变、转换本作品或者以本作品为基础进行创作, +您只能采用与本协议相同的许可协议发布基于本作品的演绎作品。` + +const txt_cjk = txt_cn + txt_jp + txt_kr +const txt_all = txt_vn + twoByteUtf8 + threeByteUtf8 + txt_cjk + +var txt_all_bytes = []byte(txt_all) diff --git a/vendor/golang.org/x/text/unicode/norm/readwriter_test.go b/vendor/golang.org/x/text/unicode/norm/readwriter_test.go new file mode 100644 index 000000000..b7756ba24 --- /dev/null +++ b/vendor/golang.org/x/text/unicode/norm/readwriter_test.go @@ -0,0 +1,56 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package norm + +import ( + "bytes" + "fmt" + "testing" +) + +var bufSizes = []int{1, 2, 3, 4, 5, 6, 7, 8, 100, 101, 102, 103, 4000, 4001, 4002, 4003} + +func readFunc(size int) appendFunc { + return func(f Form, out []byte, s string) []byte { + out = append(out, s...) + r := f.Reader(bytes.NewBuffer(out)) + buf := make([]byte, size) + result := []byte{} + for n, err := 0, error(nil); err == nil; { + n, err = r.Read(buf) + result = append(result, buf[:n]...) + } + return result + } +} + +func TestReader(t *testing.T) { + for _, s := range bufSizes { + name := fmt.Sprintf("TestReader%d", s) + runNormTests(t, name, readFunc(s)) + } +} + +func writeFunc(size int) appendFunc { + return func(f Form, out []byte, s string) []byte { + in := append(out, s...) + result := new(bytes.Buffer) + w := f.Writer(result) + buf := make([]byte, size) + for n := 0; len(in) > 0; in = in[n:] { + n = copy(buf, in) + _, _ = w.Write(buf[:n]) + } + w.Close() + return result.Bytes() + } +} + +func TestWriter(t *testing.T) { + for _, s := range bufSizes { + name := fmt.Sprintf("TestWriter%d", s) + runNormTests(t, name, writeFunc(s)) + } +} diff --git a/vendor/golang.org/x/text/unicode/norm/tables.go b/vendor/golang.org/x/text/unicode/norm/tables.go index bf9ff8038..316b093c5 100644 --- a/vendor/golang.org/x/text/unicode/norm/tables.go +++ b/vendor/golang.org/x/text/unicode/norm/tables.go @@ -4,7 +4,7 @@ package norm const ( // Version is the Unicode edition from which the tables are derived. - Version = "9.0.0" + Version = "10.0.0" // MaxTransformChunkSize indicates the maximum number of bytes that Transform // may need to write atomically for any Form. Making a destination buffer at @@ -2896,7 +2896,7 @@ func (t *nfcTrie) lookupStringUnsafe(s string) uint16 { return 0 } -// nfcTrie. Total size: 10332 bytes (10.09 KiB). Checksum: 51cc525b297fc970. +// nfcTrie. Total size: 10442 bytes (10.20 KiB). Checksum: 4ba400a9d8208e03. type nfcTrie struct{} func newNfcTrie(i int) *nfcTrie { @@ -2906,17 +2906,17 @@ func newNfcTrie(i int) *nfcTrie { // lookupValue determines the type of block n and looks up the value for b. func (t *nfcTrie) lookupValue(n uint32, b byte) uint16 { switch { - case n < 44: + case n < 45: return uint16(nfcValues[n<<6+uint32(b)]) default: - n -= 44 + n -= 45 return uint16(nfcSparse.lookup(n, b)) } } -// nfcValues: 46 blocks, 2944 entries, 5888 bytes +// nfcValues: 47 blocks, 3008 entries, 6016 bytes // The third block is the zero block. -var nfcValues = [2944]uint16{ +var nfcValues = [3008]uint16{ // Block 0x0, offset 0x0 0x3c: 0xa000, 0x3d: 0xa000, 0x3e: 0xa000, // Block 0x1, offset 0x40 @@ -3073,341 +3073,353 @@ var nfcValues = [2944]uint16{ 0x3fa: 0xa000, 0x3fb: 0x2d56, 0x3fc: 0xa000, 0x3fd: 0x2d5e, 0x3fe: 0xa000, 0x3ff: 0xa000, // Block 0x10, offset 0x400 - 0x400: 0x2f97, 0x401: 0x32a3, 0x402: 0x2fa1, 0x403: 0x32ad, 0x404: 0x2fa6, 0x405: 0x32b2, - 0x406: 0x2fab, 0x407: 0x32b7, 0x408: 0x38cc, 0x409: 0x3a5b, 0x40a: 0x2fc4, 0x40b: 0x32d0, - 0x40c: 0x2fce, 0x40d: 0x32da, 0x40e: 0x2fdd, 0x40f: 0x32e9, 0x410: 0x2fd3, 0x411: 0x32df, - 0x412: 0x2fd8, 0x413: 0x32e4, 0x414: 0x38ef, 0x415: 0x3a7e, 0x416: 0x38f6, 0x417: 0x3a85, - 0x418: 0x3019, 0x419: 0x3325, 0x41a: 0x301e, 0x41b: 0x332a, 0x41c: 0x3904, 0x41d: 0x3a93, - 0x41e: 0x3023, 0x41f: 0x332f, 0x420: 0x3032, 0x421: 0x333e, 0x422: 0x3050, 0x423: 0x335c, - 0x424: 0x305f, 0x425: 0x336b, 0x426: 0x3055, 0x427: 0x3361, 0x428: 0x3064, 0x429: 0x3370, - 0x42a: 0x3069, 0x42b: 0x3375, 0x42c: 0x30af, 0x42d: 0x33bb, 0x42e: 0x390b, 0x42f: 0x3a9a, - 0x430: 0x30b9, 0x431: 0x33ca, 0x432: 0x30c3, 0x433: 0x33d4, 0x434: 0x30cd, 0x435: 0x33de, - 0x436: 0x46c4, 0x437: 0x4755, 0x438: 0x3912, 0x439: 0x3aa1, 0x43a: 0x30e6, 0x43b: 0x33f7, - 0x43c: 0x30e1, 0x43d: 0x33f2, 0x43e: 0x30eb, 0x43f: 0x33fc, + 0x400: 0x8132, 0x401: 0x8132, 0x402: 0x812d, 0x403: 0x8132, 0x404: 0x8132, 0x405: 0x8132, + 0x406: 0x8132, 0x407: 0x8132, 0x408: 0x8132, 0x409: 0x8132, 0x40a: 0x812d, 0x40b: 0x8132, + 0x40c: 0x8132, 0x40d: 0x8135, 0x40e: 0x812a, 0x40f: 0x812d, 0x410: 0x8129, 0x411: 0x8132, + 0x412: 0x8132, 0x413: 0x8132, 0x414: 0x8132, 0x415: 0x8132, 0x416: 0x8132, 0x417: 0x8132, + 0x418: 0x8132, 0x419: 0x8132, 0x41a: 0x8132, 0x41b: 0x8132, 0x41c: 0x8132, 0x41d: 0x8132, + 0x41e: 0x8132, 0x41f: 0x8132, 0x420: 0x8132, 0x421: 0x8132, 0x422: 0x8132, 0x423: 0x8132, + 0x424: 0x8132, 0x425: 0x8132, 0x426: 0x8132, 0x427: 0x8132, 0x428: 0x8132, 0x429: 0x8132, + 0x42a: 0x8132, 0x42b: 0x8132, 0x42c: 0x8132, 0x42d: 0x8132, 0x42e: 0x8132, 0x42f: 0x8132, + 0x430: 0x8132, 0x431: 0x8132, 0x432: 0x8132, 0x433: 0x8132, 0x434: 0x8132, 0x435: 0x8132, + 0x436: 0x8133, 0x437: 0x8131, 0x438: 0x8131, 0x439: 0x812d, 0x43b: 0x8132, + 0x43c: 0x8134, 0x43d: 0x812d, 0x43e: 0x8132, 0x43f: 0x812d, // Block 0x11, offset 0x440 - 0x440: 0x30f0, 0x441: 0x3401, 0x442: 0x30f5, 0x443: 0x3406, 0x444: 0x3109, 0x445: 0x341a, - 0x446: 0x3113, 0x447: 0x3424, 0x448: 0x3122, 0x449: 0x3433, 0x44a: 0x311d, 0x44b: 0x342e, - 0x44c: 0x3935, 0x44d: 0x3ac4, 0x44e: 0x3943, 0x44f: 0x3ad2, 0x450: 0x394a, 0x451: 0x3ad9, - 0x452: 0x3951, 0x453: 0x3ae0, 0x454: 0x314f, 0x455: 0x3460, 0x456: 0x3154, 0x457: 0x3465, - 0x458: 0x315e, 0x459: 0x346f, 0x45a: 0x46f1, 0x45b: 0x4782, 0x45c: 0x3997, 0x45d: 0x3b26, - 0x45e: 0x3177, 0x45f: 0x3488, 0x460: 0x3181, 0x461: 0x3492, 0x462: 0x4700, 0x463: 0x4791, - 0x464: 0x399e, 0x465: 0x3b2d, 0x466: 0x39a5, 0x467: 0x3b34, 0x468: 0x39ac, 0x469: 0x3b3b, - 0x46a: 0x3190, 0x46b: 0x34a1, 0x46c: 0x319a, 0x46d: 0x34b0, 0x46e: 0x31ae, 0x46f: 0x34c4, - 0x470: 0x31a9, 0x471: 0x34bf, 0x472: 0x31ea, 0x473: 0x3500, 0x474: 0x31f9, 0x475: 0x350f, - 0x476: 0x31f4, 0x477: 0x350a, 0x478: 0x39b3, 0x479: 0x3b42, 0x47a: 0x39ba, 0x47b: 0x3b49, - 0x47c: 0x31fe, 0x47d: 0x3514, 0x47e: 0x3203, 0x47f: 0x3519, + 0x440: 0x2f97, 0x441: 0x32a3, 0x442: 0x2fa1, 0x443: 0x32ad, 0x444: 0x2fa6, 0x445: 0x32b2, + 0x446: 0x2fab, 0x447: 0x32b7, 0x448: 0x38cc, 0x449: 0x3a5b, 0x44a: 0x2fc4, 0x44b: 0x32d0, + 0x44c: 0x2fce, 0x44d: 0x32da, 0x44e: 0x2fdd, 0x44f: 0x32e9, 0x450: 0x2fd3, 0x451: 0x32df, + 0x452: 0x2fd8, 0x453: 0x32e4, 0x454: 0x38ef, 0x455: 0x3a7e, 0x456: 0x38f6, 0x457: 0x3a85, + 0x458: 0x3019, 0x459: 0x3325, 0x45a: 0x301e, 0x45b: 0x332a, 0x45c: 0x3904, 0x45d: 0x3a93, + 0x45e: 0x3023, 0x45f: 0x332f, 0x460: 0x3032, 0x461: 0x333e, 0x462: 0x3050, 0x463: 0x335c, + 0x464: 0x305f, 0x465: 0x336b, 0x466: 0x3055, 0x467: 0x3361, 0x468: 0x3064, 0x469: 0x3370, + 0x46a: 0x3069, 0x46b: 0x3375, 0x46c: 0x30af, 0x46d: 0x33bb, 0x46e: 0x390b, 0x46f: 0x3a9a, + 0x470: 0x30b9, 0x471: 0x33ca, 0x472: 0x30c3, 0x473: 0x33d4, 0x474: 0x30cd, 0x475: 0x33de, + 0x476: 0x46c4, 0x477: 0x4755, 0x478: 0x3912, 0x479: 0x3aa1, 0x47a: 0x30e6, 0x47b: 0x33f7, + 0x47c: 0x30e1, 0x47d: 0x33f2, 0x47e: 0x30eb, 0x47f: 0x33fc, // Block 0x12, offset 0x480 - 0x480: 0x3208, 0x481: 0x351e, 0x482: 0x320d, 0x483: 0x3523, 0x484: 0x321c, 0x485: 0x3532, - 0x486: 0x3217, 0x487: 0x352d, 0x488: 0x3221, 0x489: 0x353c, 0x48a: 0x3226, 0x48b: 0x3541, - 0x48c: 0x322b, 0x48d: 0x3546, 0x48e: 0x3249, 0x48f: 0x3564, 0x490: 0x3262, 0x491: 0x3582, - 0x492: 0x3271, 0x493: 0x3591, 0x494: 0x3276, 0x495: 0x3596, 0x496: 0x337a, 0x497: 0x34a6, - 0x498: 0x3537, 0x499: 0x3573, 0x49b: 0x35d1, - 0x4a0: 0x46a1, 0x4a1: 0x4732, 0x4a2: 0x2f83, 0x4a3: 0x328f, - 0x4a4: 0x3878, 0x4a5: 0x3a07, 0x4a6: 0x3871, 0x4a7: 0x3a00, 0x4a8: 0x3886, 0x4a9: 0x3a15, - 0x4aa: 0x387f, 0x4ab: 0x3a0e, 0x4ac: 0x38be, 0x4ad: 0x3a4d, 0x4ae: 0x3894, 0x4af: 0x3a23, - 0x4b0: 0x388d, 0x4b1: 0x3a1c, 0x4b2: 0x38a2, 0x4b3: 0x3a31, 0x4b4: 0x389b, 0x4b5: 0x3a2a, - 0x4b6: 0x38c5, 0x4b7: 0x3a54, 0x4b8: 0x46b5, 0x4b9: 0x4746, 0x4ba: 0x3000, 0x4bb: 0x330c, - 0x4bc: 0x2fec, 0x4bd: 0x32f8, 0x4be: 0x38da, 0x4bf: 0x3a69, + 0x480: 0x30f0, 0x481: 0x3401, 0x482: 0x30f5, 0x483: 0x3406, 0x484: 0x3109, 0x485: 0x341a, + 0x486: 0x3113, 0x487: 0x3424, 0x488: 0x3122, 0x489: 0x3433, 0x48a: 0x311d, 0x48b: 0x342e, + 0x48c: 0x3935, 0x48d: 0x3ac4, 0x48e: 0x3943, 0x48f: 0x3ad2, 0x490: 0x394a, 0x491: 0x3ad9, + 0x492: 0x3951, 0x493: 0x3ae0, 0x494: 0x314f, 0x495: 0x3460, 0x496: 0x3154, 0x497: 0x3465, + 0x498: 0x315e, 0x499: 0x346f, 0x49a: 0x46f1, 0x49b: 0x4782, 0x49c: 0x3997, 0x49d: 0x3b26, + 0x49e: 0x3177, 0x49f: 0x3488, 0x4a0: 0x3181, 0x4a1: 0x3492, 0x4a2: 0x4700, 0x4a3: 0x4791, + 0x4a4: 0x399e, 0x4a5: 0x3b2d, 0x4a6: 0x39a5, 0x4a7: 0x3b34, 0x4a8: 0x39ac, 0x4a9: 0x3b3b, + 0x4aa: 0x3190, 0x4ab: 0x34a1, 0x4ac: 0x319a, 0x4ad: 0x34b0, 0x4ae: 0x31ae, 0x4af: 0x34c4, + 0x4b0: 0x31a9, 0x4b1: 0x34bf, 0x4b2: 0x31ea, 0x4b3: 0x3500, 0x4b4: 0x31f9, 0x4b5: 0x350f, + 0x4b6: 0x31f4, 0x4b7: 0x350a, 0x4b8: 0x39b3, 0x4b9: 0x3b42, 0x4ba: 0x39ba, 0x4bb: 0x3b49, + 0x4bc: 0x31fe, 0x4bd: 0x3514, 0x4be: 0x3203, 0x4bf: 0x3519, // Block 0x13, offset 0x4c0 - 0x4c0: 0x38d3, 0x4c1: 0x3a62, 0x4c2: 0x38e8, 0x4c3: 0x3a77, 0x4c4: 0x38e1, 0x4c5: 0x3a70, - 0x4c6: 0x38fd, 0x4c7: 0x3a8c, 0x4c8: 0x3091, 0x4c9: 0x339d, 0x4ca: 0x30a5, 0x4cb: 0x33b1, - 0x4cc: 0x46e7, 0x4cd: 0x4778, 0x4ce: 0x3136, 0x4cf: 0x3447, 0x4d0: 0x3920, 0x4d1: 0x3aaf, - 0x4d2: 0x3919, 0x4d3: 0x3aa8, 0x4d4: 0x392e, 0x4d5: 0x3abd, 0x4d6: 0x3927, 0x4d7: 0x3ab6, - 0x4d8: 0x3989, 0x4d9: 0x3b18, 0x4da: 0x396d, 0x4db: 0x3afc, 0x4dc: 0x3966, 0x4dd: 0x3af5, - 0x4de: 0x397b, 0x4df: 0x3b0a, 0x4e0: 0x3974, 0x4e1: 0x3b03, 0x4e2: 0x3982, 0x4e3: 0x3b11, - 0x4e4: 0x31e5, 0x4e5: 0x34fb, 0x4e6: 0x31c7, 0x4e7: 0x34dd, 0x4e8: 0x39e4, 0x4e9: 0x3b73, - 0x4ea: 0x39dd, 0x4eb: 0x3b6c, 0x4ec: 0x39f2, 0x4ed: 0x3b81, 0x4ee: 0x39eb, 0x4ef: 0x3b7a, - 0x4f0: 0x39f9, 0x4f1: 0x3b88, 0x4f2: 0x3230, 0x4f3: 0x354b, 0x4f4: 0x3258, 0x4f5: 0x3578, - 0x4f6: 0x3253, 0x4f7: 0x356e, 0x4f8: 0x323f, 0x4f9: 0x355a, + 0x4c0: 0x3208, 0x4c1: 0x351e, 0x4c2: 0x320d, 0x4c3: 0x3523, 0x4c4: 0x321c, 0x4c5: 0x3532, + 0x4c6: 0x3217, 0x4c7: 0x352d, 0x4c8: 0x3221, 0x4c9: 0x353c, 0x4ca: 0x3226, 0x4cb: 0x3541, + 0x4cc: 0x322b, 0x4cd: 0x3546, 0x4ce: 0x3249, 0x4cf: 0x3564, 0x4d0: 0x3262, 0x4d1: 0x3582, + 0x4d2: 0x3271, 0x4d3: 0x3591, 0x4d4: 0x3276, 0x4d5: 0x3596, 0x4d6: 0x337a, 0x4d7: 0x34a6, + 0x4d8: 0x3537, 0x4d9: 0x3573, 0x4db: 0x35d1, + 0x4e0: 0x46a1, 0x4e1: 0x4732, 0x4e2: 0x2f83, 0x4e3: 0x328f, + 0x4e4: 0x3878, 0x4e5: 0x3a07, 0x4e6: 0x3871, 0x4e7: 0x3a00, 0x4e8: 0x3886, 0x4e9: 0x3a15, + 0x4ea: 0x387f, 0x4eb: 0x3a0e, 0x4ec: 0x38be, 0x4ed: 0x3a4d, 0x4ee: 0x3894, 0x4ef: 0x3a23, + 0x4f0: 0x388d, 0x4f1: 0x3a1c, 0x4f2: 0x38a2, 0x4f3: 0x3a31, 0x4f4: 0x389b, 0x4f5: 0x3a2a, + 0x4f6: 0x38c5, 0x4f7: 0x3a54, 0x4f8: 0x46b5, 0x4f9: 0x4746, 0x4fa: 0x3000, 0x4fb: 0x330c, + 0x4fc: 0x2fec, 0x4fd: 0x32f8, 0x4fe: 0x38da, 0x4ff: 0x3a69, // Block 0x14, offset 0x500 - 0x500: 0x4804, 0x501: 0x480a, 0x502: 0x491e, 0x503: 0x4936, 0x504: 0x4926, 0x505: 0x493e, - 0x506: 0x492e, 0x507: 0x4946, 0x508: 0x47aa, 0x509: 0x47b0, 0x50a: 0x488e, 0x50b: 0x48a6, - 0x50c: 0x4896, 0x50d: 0x48ae, 0x50e: 0x489e, 0x50f: 0x48b6, 0x510: 0x4816, 0x511: 0x481c, - 0x512: 0x3db8, 0x513: 0x3dc8, 0x514: 0x3dc0, 0x515: 0x3dd0, - 0x518: 0x47b6, 0x519: 0x47bc, 0x51a: 0x3ce8, 0x51b: 0x3cf8, 0x51c: 0x3cf0, 0x51d: 0x3d00, - 0x520: 0x482e, 0x521: 0x4834, 0x522: 0x494e, 0x523: 0x4966, - 0x524: 0x4956, 0x525: 0x496e, 0x526: 0x495e, 0x527: 0x4976, 0x528: 0x47c2, 0x529: 0x47c8, - 0x52a: 0x48be, 0x52b: 0x48d6, 0x52c: 0x48c6, 0x52d: 0x48de, 0x52e: 0x48ce, 0x52f: 0x48e6, - 0x530: 0x4846, 0x531: 0x484c, 0x532: 0x3e18, 0x533: 0x3e30, 0x534: 0x3e20, 0x535: 0x3e38, - 0x536: 0x3e28, 0x537: 0x3e40, 0x538: 0x47ce, 0x539: 0x47d4, 0x53a: 0x3d18, 0x53b: 0x3d30, - 0x53c: 0x3d20, 0x53d: 0x3d38, 0x53e: 0x3d28, 0x53f: 0x3d40, + 0x500: 0x38d3, 0x501: 0x3a62, 0x502: 0x38e8, 0x503: 0x3a77, 0x504: 0x38e1, 0x505: 0x3a70, + 0x506: 0x38fd, 0x507: 0x3a8c, 0x508: 0x3091, 0x509: 0x339d, 0x50a: 0x30a5, 0x50b: 0x33b1, + 0x50c: 0x46e7, 0x50d: 0x4778, 0x50e: 0x3136, 0x50f: 0x3447, 0x510: 0x3920, 0x511: 0x3aaf, + 0x512: 0x3919, 0x513: 0x3aa8, 0x514: 0x392e, 0x515: 0x3abd, 0x516: 0x3927, 0x517: 0x3ab6, + 0x518: 0x3989, 0x519: 0x3b18, 0x51a: 0x396d, 0x51b: 0x3afc, 0x51c: 0x3966, 0x51d: 0x3af5, + 0x51e: 0x397b, 0x51f: 0x3b0a, 0x520: 0x3974, 0x521: 0x3b03, 0x522: 0x3982, 0x523: 0x3b11, + 0x524: 0x31e5, 0x525: 0x34fb, 0x526: 0x31c7, 0x527: 0x34dd, 0x528: 0x39e4, 0x529: 0x3b73, + 0x52a: 0x39dd, 0x52b: 0x3b6c, 0x52c: 0x39f2, 0x52d: 0x3b81, 0x52e: 0x39eb, 0x52f: 0x3b7a, + 0x530: 0x39f9, 0x531: 0x3b88, 0x532: 0x3230, 0x533: 0x354b, 0x534: 0x3258, 0x535: 0x3578, + 0x536: 0x3253, 0x537: 0x356e, 0x538: 0x323f, 0x539: 0x355a, // Block 0x15, offset 0x540 - 0x540: 0x4852, 0x541: 0x4858, 0x542: 0x3e48, 0x543: 0x3e58, 0x544: 0x3e50, 0x545: 0x3e60, - 0x548: 0x47da, 0x549: 0x47e0, 0x54a: 0x3d48, 0x54b: 0x3d58, - 0x54c: 0x3d50, 0x54d: 0x3d60, 0x550: 0x4864, 0x551: 0x486a, - 0x552: 0x3e80, 0x553: 0x3e98, 0x554: 0x3e88, 0x555: 0x3ea0, 0x556: 0x3e90, 0x557: 0x3ea8, - 0x559: 0x47e6, 0x55b: 0x3d68, 0x55d: 0x3d70, - 0x55f: 0x3d78, 0x560: 0x487c, 0x561: 0x4882, 0x562: 0x497e, 0x563: 0x4996, - 0x564: 0x4986, 0x565: 0x499e, 0x566: 0x498e, 0x567: 0x49a6, 0x568: 0x47ec, 0x569: 0x47f2, - 0x56a: 0x48ee, 0x56b: 0x4906, 0x56c: 0x48f6, 0x56d: 0x490e, 0x56e: 0x48fe, 0x56f: 0x4916, - 0x570: 0x47f8, 0x571: 0x431e, 0x572: 0x3691, 0x573: 0x4324, 0x574: 0x4822, 0x575: 0x432a, - 0x576: 0x36a3, 0x577: 0x4330, 0x578: 0x36c1, 0x579: 0x4336, 0x57a: 0x36d9, 0x57b: 0x433c, - 0x57c: 0x4870, 0x57d: 0x4342, + 0x540: 0x4804, 0x541: 0x480a, 0x542: 0x491e, 0x543: 0x4936, 0x544: 0x4926, 0x545: 0x493e, + 0x546: 0x492e, 0x547: 0x4946, 0x548: 0x47aa, 0x549: 0x47b0, 0x54a: 0x488e, 0x54b: 0x48a6, + 0x54c: 0x4896, 0x54d: 0x48ae, 0x54e: 0x489e, 0x54f: 0x48b6, 0x550: 0x4816, 0x551: 0x481c, + 0x552: 0x3db8, 0x553: 0x3dc8, 0x554: 0x3dc0, 0x555: 0x3dd0, + 0x558: 0x47b6, 0x559: 0x47bc, 0x55a: 0x3ce8, 0x55b: 0x3cf8, 0x55c: 0x3cf0, 0x55d: 0x3d00, + 0x560: 0x482e, 0x561: 0x4834, 0x562: 0x494e, 0x563: 0x4966, + 0x564: 0x4956, 0x565: 0x496e, 0x566: 0x495e, 0x567: 0x4976, 0x568: 0x47c2, 0x569: 0x47c8, + 0x56a: 0x48be, 0x56b: 0x48d6, 0x56c: 0x48c6, 0x56d: 0x48de, 0x56e: 0x48ce, 0x56f: 0x48e6, + 0x570: 0x4846, 0x571: 0x484c, 0x572: 0x3e18, 0x573: 0x3e30, 0x574: 0x3e20, 0x575: 0x3e38, + 0x576: 0x3e28, 0x577: 0x3e40, 0x578: 0x47ce, 0x579: 0x47d4, 0x57a: 0x3d18, 0x57b: 0x3d30, + 0x57c: 0x3d20, 0x57d: 0x3d38, 0x57e: 0x3d28, 0x57f: 0x3d40, // Block 0x16, offset 0x580 - 0x580: 0x3da0, 0x581: 0x3da8, 0x582: 0x4184, 0x583: 0x41a2, 0x584: 0x418e, 0x585: 0x41ac, - 0x586: 0x4198, 0x587: 0x41b6, 0x588: 0x3cd8, 0x589: 0x3ce0, 0x58a: 0x40d0, 0x58b: 0x40ee, - 0x58c: 0x40da, 0x58d: 0x40f8, 0x58e: 0x40e4, 0x58f: 0x4102, 0x590: 0x3de8, 0x591: 0x3df0, - 0x592: 0x41c0, 0x593: 0x41de, 0x594: 0x41ca, 0x595: 0x41e8, 0x596: 0x41d4, 0x597: 0x41f2, - 0x598: 0x3d08, 0x599: 0x3d10, 0x59a: 0x410c, 0x59b: 0x412a, 0x59c: 0x4116, 0x59d: 0x4134, - 0x59e: 0x4120, 0x59f: 0x413e, 0x5a0: 0x3ec0, 0x5a1: 0x3ec8, 0x5a2: 0x41fc, 0x5a3: 0x421a, - 0x5a4: 0x4206, 0x5a5: 0x4224, 0x5a6: 0x4210, 0x5a7: 0x422e, 0x5a8: 0x3d80, 0x5a9: 0x3d88, - 0x5aa: 0x4148, 0x5ab: 0x4166, 0x5ac: 0x4152, 0x5ad: 0x4170, 0x5ae: 0x415c, 0x5af: 0x417a, - 0x5b0: 0x3685, 0x5b1: 0x367f, 0x5b2: 0x3d90, 0x5b3: 0x368b, 0x5b4: 0x3d98, - 0x5b6: 0x4810, 0x5b7: 0x3db0, 0x5b8: 0x35f5, 0x5b9: 0x35ef, 0x5ba: 0x35e3, 0x5bb: 0x42ee, - 0x5bc: 0x35fb, 0x5bd: 0x8100, 0x5be: 0x01d3, 0x5bf: 0xa100, + 0x580: 0x4852, 0x581: 0x4858, 0x582: 0x3e48, 0x583: 0x3e58, 0x584: 0x3e50, 0x585: 0x3e60, + 0x588: 0x47da, 0x589: 0x47e0, 0x58a: 0x3d48, 0x58b: 0x3d58, + 0x58c: 0x3d50, 0x58d: 0x3d60, 0x590: 0x4864, 0x591: 0x486a, + 0x592: 0x3e80, 0x593: 0x3e98, 0x594: 0x3e88, 0x595: 0x3ea0, 0x596: 0x3e90, 0x597: 0x3ea8, + 0x599: 0x47e6, 0x59b: 0x3d68, 0x59d: 0x3d70, + 0x59f: 0x3d78, 0x5a0: 0x487c, 0x5a1: 0x4882, 0x5a2: 0x497e, 0x5a3: 0x4996, + 0x5a4: 0x4986, 0x5a5: 0x499e, 0x5a6: 0x498e, 0x5a7: 0x49a6, 0x5a8: 0x47ec, 0x5a9: 0x47f2, + 0x5aa: 0x48ee, 0x5ab: 0x4906, 0x5ac: 0x48f6, 0x5ad: 0x490e, 0x5ae: 0x48fe, 0x5af: 0x4916, + 0x5b0: 0x47f8, 0x5b1: 0x431e, 0x5b2: 0x3691, 0x5b3: 0x4324, 0x5b4: 0x4822, 0x5b5: 0x432a, + 0x5b6: 0x36a3, 0x5b7: 0x4330, 0x5b8: 0x36c1, 0x5b9: 0x4336, 0x5ba: 0x36d9, 0x5bb: 0x433c, + 0x5bc: 0x4870, 0x5bd: 0x4342, // Block 0x17, offset 0x5c0 - 0x5c0: 0x8100, 0x5c1: 0x35a7, 0x5c2: 0x3dd8, 0x5c3: 0x369d, 0x5c4: 0x3de0, - 0x5c6: 0x483a, 0x5c7: 0x3df8, 0x5c8: 0x3601, 0x5c9: 0x42f4, 0x5ca: 0x360d, 0x5cb: 0x42fa, - 0x5cc: 0x3619, 0x5cd: 0x3b8f, 0x5ce: 0x3b96, 0x5cf: 0x3b9d, 0x5d0: 0x36b5, 0x5d1: 0x36af, - 0x5d2: 0x3e00, 0x5d3: 0x44e4, 0x5d6: 0x36bb, 0x5d7: 0x3e10, - 0x5d8: 0x3631, 0x5d9: 0x362b, 0x5da: 0x361f, 0x5db: 0x4300, 0x5dd: 0x3ba4, - 0x5de: 0x3bab, 0x5df: 0x3bb2, 0x5e0: 0x36eb, 0x5e1: 0x36e5, 0x5e2: 0x3e68, 0x5e3: 0x44ec, - 0x5e4: 0x36cd, 0x5e5: 0x36d3, 0x5e6: 0x36f1, 0x5e7: 0x3e78, 0x5e8: 0x3661, 0x5e9: 0x365b, - 0x5ea: 0x364f, 0x5eb: 0x430c, 0x5ec: 0x3649, 0x5ed: 0x359b, 0x5ee: 0x42e8, 0x5ef: 0x0081, - 0x5f2: 0x3eb0, 0x5f3: 0x36f7, 0x5f4: 0x3eb8, - 0x5f6: 0x4888, 0x5f7: 0x3ed0, 0x5f8: 0x363d, 0x5f9: 0x4306, 0x5fa: 0x366d, 0x5fb: 0x4318, - 0x5fc: 0x3679, 0x5fd: 0x4256, 0x5fe: 0xa100, + 0x5c0: 0x3da0, 0x5c1: 0x3da8, 0x5c2: 0x4184, 0x5c3: 0x41a2, 0x5c4: 0x418e, 0x5c5: 0x41ac, + 0x5c6: 0x4198, 0x5c7: 0x41b6, 0x5c8: 0x3cd8, 0x5c9: 0x3ce0, 0x5ca: 0x40d0, 0x5cb: 0x40ee, + 0x5cc: 0x40da, 0x5cd: 0x40f8, 0x5ce: 0x40e4, 0x5cf: 0x4102, 0x5d0: 0x3de8, 0x5d1: 0x3df0, + 0x5d2: 0x41c0, 0x5d3: 0x41de, 0x5d4: 0x41ca, 0x5d5: 0x41e8, 0x5d6: 0x41d4, 0x5d7: 0x41f2, + 0x5d8: 0x3d08, 0x5d9: 0x3d10, 0x5da: 0x410c, 0x5db: 0x412a, 0x5dc: 0x4116, 0x5dd: 0x4134, + 0x5de: 0x4120, 0x5df: 0x413e, 0x5e0: 0x3ec0, 0x5e1: 0x3ec8, 0x5e2: 0x41fc, 0x5e3: 0x421a, + 0x5e4: 0x4206, 0x5e5: 0x4224, 0x5e6: 0x4210, 0x5e7: 0x422e, 0x5e8: 0x3d80, 0x5e9: 0x3d88, + 0x5ea: 0x4148, 0x5eb: 0x4166, 0x5ec: 0x4152, 0x5ed: 0x4170, 0x5ee: 0x415c, 0x5ef: 0x417a, + 0x5f0: 0x3685, 0x5f1: 0x367f, 0x5f2: 0x3d90, 0x5f3: 0x368b, 0x5f4: 0x3d98, + 0x5f6: 0x4810, 0x5f7: 0x3db0, 0x5f8: 0x35f5, 0x5f9: 0x35ef, 0x5fa: 0x35e3, 0x5fb: 0x42ee, + 0x5fc: 0x35fb, 0x5fd: 0x8100, 0x5fe: 0x01d3, 0x5ff: 0xa100, // Block 0x18, offset 0x600 - 0x601: 0x3c06, 0x603: 0xa000, 0x604: 0x3c0d, 0x605: 0xa000, - 0x607: 0x3c14, 0x608: 0xa000, 0x609: 0x3c1b, - 0x60d: 0xa000, - 0x620: 0x2f65, 0x621: 0xa000, 0x622: 0x3c29, - 0x624: 0xa000, 0x625: 0xa000, - 0x62d: 0x3c22, 0x62e: 0x2f60, 0x62f: 0x2f6a, - 0x630: 0x3c30, 0x631: 0x3c37, 0x632: 0xa000, 0x633: 0xa000, 0x634: 0x3c3e, 0x635: 0x3c45, - 0x636: 0xa000, 0x637: 0xa000, 0x638: 0x3c4c, 0x639: 0x3c53, 0x63a: 0xa000, 0x63b: 0xa000, - 0x63c: 0xa000, 0x63d: 0xa000, + 0x600: 0x8100, 0x601: 0x35a7, 0x602: 0x3dd8, 0x603: 0x369d, 0x604: 0x3de0, + 0x606: 0x483a, 0x607: 0x3df8, 0x608: 0x3601, 0x609: 0x42f4, 0x60a: 0x360d, 0x60b: 0x42fa, + 0x60c: 0x3619, 0x60d: 0x3b8f, 0x60e: 0x3b96, 0x60f: 0x3b9d, 0x610: 0x36b5, 0x611: 0x36af, + 0x612: 0x3e00, 0x613: 0x44e4, 0x616: 0x36bb, 0x617: 0x3e10, + 0x618: 0x3631, 0x619: 0x362b, 0x61a: 0x361f, 0x61b: 0x4300, 0x61d: 0x3ba4, + 0x61e: 0x3bab, 0x61f: 0x3bb2, 0x620: 0x36eb, 0x621: 0x36e5, 0x622: 0x3e68, 0x623: 0x44ec, + 0x624: 0x36cd, 0x625: 0x36d3, 0x626: 0x36f1, 0x627: 0x3e78, 0x628: 0x3661, 0x629: 0x365b, + 0x62a: 0x364f, 0x62b: 0x430c, 0x62c: 0x3649, 0x62d: 0x359b, 0x62e: 0x42e8, 0x62f: 0x0081, + 0x632: 0x3eb0, 0x633: 0x36f7, 0x634: 0x3eb8, + 0x636: 0x4888, 0x637: 0x3ed0, 0x638: 0x363d, 0x639: 0x4306, 0x63a: 0x366d, 0x63b: 0x4318, + 0x63c: 0x3679, 0x63d: 0x4256, 0x63e: 0xa100, // Block 0x19, offset 0x640 - 0x640: 0x3c5a, 0x641: 0x3c61, 0x642: 0xa000, 0x643: 0xa000, 0x644: 0x3c76, 0x645: 0x3c7d, - 0x646: 0xa000, 0x647: 0xa000, 0x648: 0x3c84, 0x649: 0x3c8b, - 0x651: 0xa000, - 0x652: 0xa000, - 0x662: 0xa000, - 0x668: 0xa000, 0x669: 0xa000, - 0x66b: 0xa000, 0x66c: 0x3ca0, 0x66d: 0x3ca7, 0x66e: 0x3cae, 0x66f: 0x3cb5, - 0x672: 0xa000, 0x673: 0xa000, 0x674: 0xa000, 0x675: 0xa000, + 0x641: 0x3c06, 0x643: 0xa000, 0x644: 0x3c0d, 0x645: 0xa000, + 0x647: 0x3c14, 0x648: 0xa000, 0x649: 0x3c1b, + 0x64d: 0xa000, + 0x660: 0x2f65, 0x661: 0xa000, 0x662: 0x3c29, + 0x664: 0xa000, 0x665: 0xa000, + 0x66d: 0x3c22, 0x66e: 0x2f60, 0x66f: 0x2f6a, + 0x670: 0x3c30, 0x671: 0x3c37, 0x672: 0xa000, 0x673: 0xa000, 0x674: 0x3c3e, 0x675: 0x3c45, + 0x676: 0xa000, 0x677: 0xa000, 0x678: 0x3c4c, 0x679: 0x3c53, 0x67a: 0xa000, 0x67b: 0xa000, + 0x67c: 0xa000, 0x67d: 0xa000, // Block 0x1a, offset 0x680 - 0x686: 0xa000, 0x68b: 0xa000, - 0x68c: 0x3f08, 0x68d: 0xa000, 0x68e: 0x3f10, 0x68f: 0xa000, 0x690: 0x3f18, 0x691: 0xa000, - 0x692: 0x3f20, 0x693: 0xa000, 0x694: 0x3f28, 0x695: 0xa000, 0x696: 0x3f30, 0x697: 0xa000, - 0x698: 0x3f38, 0x699: 0xa000, 0x69a: 0x3f40, 0x69b: 0xa000, 0x69c: 0x3f48, 0x69d: 0xa000, - 0x69e: 0x3f50, 0x69f: 0xa000, 0x6a0: 0x3f58, 0x6a1: 0xa000, 0x6a2: 0x3f60, - 0x6a4: 0xa000, 0x6a5: 0x3f68, 0x6a6: 0xa000, 0x6a7: 0x3f70, 0x6a8: 0xa000, 0x6a9: 0x3f78, - 0x6af: 0xa000, - 0x6b0: 0x3f80, 0x6b1: 0x3f88, 0x6b2: 0xa000, 0x6b3: 0x3f90, 0x6b4: 0x3f98, 0x6b5: 0xa000, - 0x6b6: 0x3fa0, 0x6b7: 0x3fa8, 0x6b8: 0xa000, 0x6b9: 0x3fb0, 0x6ba: 0x3fb8, 0x6bb: 0xa000, - 0x6bc: 0x3fc0, 0x6bd: 0x3fc8, + 0x680: 0x3c5a, 0x681: 0x3c61, 0x682: 0xa000, 0x683: 0xa000, 0x684: 0x3c76, 0x685: 0x3c7d, + 0x686: 0xa000, 0x687: 0xa000, 0x688: 0x3c84, 0x689: 0x3c8b, + 0x691: 0xa000, + 0x692: 0xa000, + 0x6a2: 0xa000, + 0x6a8: 0xa000, 0x6a9: 0xa000, + 0x6ab: 0xa000, 0x6ac: 0x3ca0, 0x6ad: 0x3ca7, 0x6ae: 0x3cae, 0x6af: 0x3cb5, + 0x6b2: 0xa000, 0x6b3: 0xa000, 0x6b4: 0xa000, 0x6b5: 0xa000, // Block 0x1b, offset 0x6c0 - 0x6d4: 0x3f00, - 0x6d9: 0x9903, 0x6da: 0x9903, 0x6db: 0x8100, 0x6dc: 0x8100, 0x6dd: 0xa000, - 0x6de: 0x3fd0, - 0x6e6: 0xa000, - 0x6eb: 0xa000, 0x6ec: 0x3fe0, 0x6ed: 0xa000, 0x6ee: 0x3fe8, 0x6ef: 0xa000, - 0x6f0: 0x3ff0, 0x6f1: 0xa000, 0x6f2: 0x3ff8, 0x6f3: 0xa000, 0x6f4: 0x4000, 0x6f5: 0xa000, - 0x6f6: 0x4008, 0x6f7: 0xa000, 0x6f8: 0x4010, 0x6f9: 0xa000, 0x6fa: 0x4018, 0x6fb: 0xa000, - 0x6fc: 0x4020, 0x6fd: 0xa000, 0x6fe: 0x4028, 0x6ff: 0xa000, + 0x6c6: 0xa000, 0x6cb: 0xa000, + 0x6cc: 0x3f08, 0x6cd: 0xa000, 0x6ce: 0x3f10, 0x6cf: 0xa000, 0x6d0: 0x3f18, 0x6d1: 0xa000, + 0x6d2: 0x3f20, 0x6d3: 0xa000, 0x6d4: 0x3f28, 0x6d5: 0xa000, 0x6d6: 0x3f30, 0x6d7: 0xa000, + 0x6d8: 0x3f38, 0x6d9: 0xa000, 0x6da: 0x3f40, 0x6db: 0xa000, 0x6dc: 0x3f48, 0x6dd: 0xa000, + 0x6de: 0x3f50, 0x6df: 0xa000, 0x6e0: 0x3f58, 0x6e1: 0xa000, 0x6e2: 0x3f60, + 0x6e4: 0xa000, 0x6e5: 0x3f68, 0x6e6: 0xa000, 0x6e7: 0x3f70, 0x6e8: 0xa000, 0x6e9: 0x3f78, + 0x6ef: 0xa000, + 0x6f0: 0x3f80, 0x6f1: 0x3f88, 0x6f2: 0xa000, 0x6f3: 0x3f90, 0x6f4: 0x3f98, 0x6f5: 0xa000, + 0x6f6: 0x3fa0, 0x6f7: 0x3fa8, 0x6f8: 0xa000, 0x6f9: 0x3fb0, 0x6fa: 0x3fb8, 0x6fb: 0xa000, + 0x6fc: 0x3fc0, 0x6fd: 0x3fc8, // Block 0x1c, offset 0x700 - 0x700: 0x4030, 0x701: 0xa000, 0x702: 0x4038, 0x704: 0xa000, 0x705: 0x4040, - 0x706: 0xa000, 0x707: 0x4048, 0x708: 0xa000, 0x709: 0x4050, - 0x70f: 0xa000, 0x710: 0x4058, 0x711: 0x4060, - 0x712: 0xa000, 0x713: 0x4068, 0x714: 0x4070, 0x715: 0xa000, 0x716: 0x4078, 0x717: 0x4080, - 0x718: 0xa000, 0x719: 0x4088, 0x71a: 0x4090, 0x71b: 0xa000, 0x71c: 0x4098, 0x71d: 0x40a0, - 0x72f: 0xa000, - 0x730: 0xa000, 0x731: 0xa000, 0x732: 0xa000, 0x734: 0x3fd8, - 0x737: 0x40a8, 0x738: 0x40b0, 0x739: 0x40b8, 0x73a: 0x40c0, - 0x73d: 0xa000, 0x73e: 0x40c8, + 0x714: 0x3f00, + 0x719: 0x9903, 0x71a: 0x9903, 0x71b: 0x8100, 0x71c: 0x8100, 0x71d: 0xa000, + 0x71e: 0x3fd0, + 0x726: 0xa000, + 0x72b: 0xa000, 0x72c: 0x3fe0, 0x72d: 0xa000, 0x72e: 0x3fe8, 0x72f: 0xa000, + 0x730: 0x3ff0, 0x731: 0xa000, 0x732: 0x3ff8, 0x733: 0xa000, 0x734: 0x4000, 0x735: 0xa000, + 0x736: 0x4008, 0x737: 0xa000, 0x738: 0x4010, 0x739: 0xa000, 0x73a: 0x4018, 0x73b: 0xa000, + 0x73c: 0x4020, 0x73d: 0xa000, 0x73e: 0x4028, 0x73f: 0xa000, // Block 0x1d, offset 0x740 - 0x740: 0x1377, 0x741: 0x0cfb, 0x742: 0x13d3, 0x743: 0x139f, 0x744: 0x0e57, 0x745: 0x06eb, - 0x746: 0x08df, 0x747: 0x162b, 0x748: 0x162b, 0x749: 0x0a0b, 0x74a: 0x145f, 0x74b: 0x0943, - 0x74c: 0x0a07, 0x74d: 0x0bef, 0x74e: 0x0fcf, 0x74f: 0x115f, 0x750: 0x1297, 0x751: 0x12d3, - 0x752: 0x1307, 0x753: 0x141b, 0x754: 0x0d73, 0x755: 0x0dff, 0x756: 0x0eab, 0x757: 0x0f43, - 0x758: 0x125f, 0x759: 0x1447, 0x75a: 0x1573, 0x75b: 0x070f, 0x75c: 0x08b3, 0x75d: 0x0d87, - 0x75e: 0x0ecf, 0x75f: 0x1293, 0x760: 0x15c3, 0x761: 0x0ab3, 0x762: 0x0e77, 0x763: 0x1283, - 0x764: 0x1317, 0x765: 0x0c23, 0x766: 0x11bb, 0x767: 0x12df, 0x768: 0x0b1f, 0x769: 0x0d0f, - 0x76a: 0x0e17, 0x76b: 0x0f1b, 0x76c: 0x1427, 0x76d: 0x074f, 0x76e: 0x07e7, 0x76f: 0x0853, - 0x770: 0x0c8b, 0x771: 0x0d7f, 0x772: 0x0ecb, 0x773: 0x0fef, 0x774: 0x1177, 0x775: 0x128b, - 0x776: 0x12a3, 0x777: 0x13c7, 0x778: 0x14ef, 0x779: 0x15a3, 0x77a: 0x15bf, 0x77b: 0x102b, - 0x77c: 0x106b, 0x77d: 0x1123, 0x77e: 0x1243, 0x77f: 0x147b, + 0x740: 0x4030, 0x741: 0xa000, 0x742: 0x4038, 0x744: 0xa000, 0x745: 0x4040, + 0x746: 0xa000, 0x747: 0x4048, 0x748: 0xa000, 0x749: 0x4050, + 0x74f: 0xa000, 0x750: 0x4058, 0x751: 0x4060, + 0x752: 0xa000, 0x753: 0x4068, 0x754: 0x4070, 0x755: 0xa000, 0x756: 0x4078, 0x757: 0x4080, + 0x758: 0xa000, 0x759: 0x4088, 0x75a: 0x4090, 0x75b: 0xa000, 0x75c: 0x4098, 0x75d: 0x40a0, + 0x76f: 0xa000, + 0x770: 0xa000, 0x771: 0xa000, 0x772: 0xa000, 0x774: 0x3fd8, + 0x777: 0x40a8, 0x778: 0x40b0, 0x779: 0x40b8, 0x77a: 0x40c0, + 0x77d: 0xa000, 0x77e: 0x40c8, // Block 0x1e, offset 0x780 - 0x780: 0x15cb, 0x781: 0x134b, 0x782: 0x09c7, 0x783: 0x0b3b, 0x784: 0x10db, 0x785: 0x119b, - 0x786: 0x0eff, 0x787: 0x1033, 0x788: 0x1397, 0x789: 0x14e7, 0x78a: 0x09c3, 0x78b: 0x0a8f, - 0x78c: 0x0d77, 0x78d: 0x0e2b, 0x78e: 0x0e5f, 0x78f: 0x1113, 0x790: 0x113b, 0x791: 0x14a7, - 0x792: 0x084f, 0x793: 0x11a7, 0x794: 0x07f3, 0x795: 0x07ef, 0x796: 0x1097, 0x797: 0x1127, - 0x798: 0x125b, 0x799: 0x14af, 0x79a: 0x1367, 0x79b: 0x0c27, 0x79c: 0x0d73, 0x79d: 0x1357, - 0x79e: 0x06f7, 0x79f: 0x0a63, 0x7a0: 0x0b93, 0x7a1: 0x0f2f, 0x7a2: 0x0faf, 0x7a3: 0x0873, - 0x7a4: 0x103b, 0x7a5: 0x075f, 0x7a6: 0x0b77, 0x7a7: 0x06d7, 0x7a8: 0x0deb, 0x7a9: 0x0ca3, - 0x7aa: 0x110f, 0x7ab: 0x08c7, 0x7ac: 0x09b3, 0x7ad: 0x0ffb, 0x7ae: 0x1263, 0x7af: 0x133b, - 0x7b0: 0x0db7, 0x7b1: 0x13f7, 0x7b2: 0x0de3, 0x7b3: 0x0c37, 0x7b4: 0x121b, 0x7b5: 0x0c57, - 0x7b6: 0x0fab, 0x7b7: 0x072b, 0x7b8: 0x07a7, 0x7b9: 0x07eb, 0x7ba: 0x0d53, 0x7bb: 0x10fb, - 0x7bc: 0x11f3, 0x7bd: 0x1347, 0x7be: 0x145b, 0x7bf: 0x085b, + 0x780: 0x1377, 0x781: 0x0cfb, 0x782: 0x13d3, 0x783: 0x139f, 0x784: 0x0e57, 0x785: 0x06eb, + 0x786: 0x08df, 0x787: 0x162b, 0x788: 0x162b, 0x789: 0x0a0b, 0x78a: 0x145f, 0x78b: 0x0943, + 0x78c: 0x0a07, 0x78d: 0x0bef, 0x78e: 0x0fcf, 0x78f: 0x115f, 0x790: 0x1297, 0x791: 0x12d3, + 0x792: 0x1307, 0x793: 0x141b, 0x794: 0x0d73, 0x795: 0x0dff, 0x796: 0x0eab, 0x797: 0x0f43, + 0x798: 0x125f, 0x799: 0x1447, 0x79a: 0x1573, 0x79b: 0x070f, 0x79c: 0x08b3, 0x79d: 0x0d87, + 0x79e: 0x0ecf, 0x79f: 0x1293, 0x7a0: 0x15c3, 0x7a1: 0x0ab3, 0x7a2: 0x0e77, 0x7a3: 0x1283, + 0x7a4: 0x1317, 0x7a5: 0x0c23, 0x7a6: 0x11bb, 0x7a7: 0x12df, 0x7a8: 0x0b1f, 0x7a9: 0x0d0f, + 0x7aa: 0x0e17, 0x7ab: 0x0f1b, 0x7ac: 0x1427, 0x7ad: 0x074f, 0x7ae: 0x07e7, 0x7af: 0x0853, + 0x7b0: 0x0c8b, 0x7b1: 0x0d7f, 0x7b2: 0x0ecb, 0x7b3: 0x0fef, 0x7b4: 0x1177, 0x7b5: 0x128b, + 0x7b6: 0x12a3, 0x7b7: 0x13c7, 0x7b8: 0x14ef, 0x7b9: 0x15a3, 0x7ba: 0x15bf, 0x7bb: 0x102b, + 0x7bc: 0x106b, 0x7bd: 0x1123, 0x7be: 0x1243, 0x7bf: 0x147b, // Block 0x1f, offset 0x7c0 - 0x7c0: 0x090f, 0x7c1: 0x0a17, 0x7c2: 0x0b2f, 0x7c3: 0x0cbf, 0x7c4: 0x0e7b, 0x7c5: 0x103f, - 0x7c6: 0x1497, 0x7c7: 0x157b, 0x7c8: 0x15cf, 0x7c9: 0x15e7, 0x7ca: 0x0837, 0x7cb: 0x0cf3, - 0x7cc: 0x0da3, 0x7cd: 0x13eb, 0x7ce: 0x0afb, 0x7cf: 0x0bd7, 0x7d0: 0x0bf3, 0x7d1: 0x0c83, - 0x7d2: 0x0e6b, 0x7d3: 0x0eb7, 0x7d4: 0x0f67, 0x7d5: 0x108b, 0x7d6: 0x112f, 0x7d7: 0x1193, - 0x7d8: 0x13db, 0x7d9: 0x126b, 0x7da: 0x1403, 0x7db: 0x147f, 0x7dc: 0x080f, 0x7dd: 0x083b, - 0x7de: 0x0923, 0x7df: 0x0ea7, 0x7e0: 0x12f3, 0x7e1: 0x133b, 0x7e2: 0x0b1b, 0x7e3: 0x0b8b, - 0x7e4: 0x0c4f, 0x7e5: 0x0daf, 0x7e6: 0x10d7, 0x7e7: 0x0f23, 0x7e8: 0x073b, 0x7e9: 0x097f, - 0x7ea: 0x0a63, 0x7eb: 0x0ac7, 0x7ec: 0x0b97, 0x7ed: 0x0f3f, 0x7ee: 0x0f5b, 0x7ef: 0x116b, - 0x7f0: 0x118b, 0x7f1: 0x1463, 0x7f2: 0x14e3, 0x7f3: 0x14f3, 0x7f4: 0x152f, 0x7f5: 0x0753, - 0x7f6: 0x107f, 0x7f7: 0x144f, 0x7f8: 0x14cb, 0x7f9: 0x0baf, 0x7fa: 0x0717, 0x7fb: 0x0777, - 0x7fc: 0x0a67, 0x7fd: 0x0a87, 0x7fe: 0x0caf, 0x7ff: 0x0d73, + 0x7c0: 0x15cb, 0x7c1: 0x134b, 0x7c2: 0x09c7, 0x7c3: 0x0b3b, 0x7c4: 0x10db, 0x7c5: 0x119b, + 0x7c6: 0x0eff, 0x7c7: 0x1033, 0x7c8: 0x1397, 0x7c9: 0x14e7, 0x7ca: 0x09c3, 0x7cb: 0x0a8f, + 0x7cc: 0x0d77, 0x7cd: 0x0e2b, 0x7ce: 0x0e5f, 0x7cf: 0x1113, 0x7d0: 0x113b, 0x7d1: 0x14a7, + 0x7d2: 0x084f, 0x7d3: 0x11a7, 0x7d4: 0x07f3, 0x7d5: 0x07ef, 0x7d6: 0x1097, 0x7d7: 0x1127, + 0x7d8: 0x125b, 0x7d9: 0x14af, 0x7da: 0x1367, 0x7db: 0x0c27, 0x7dc: 0x0d73, 0x7dd: 0x1357, + 0x7de: 0x06f7, 0x7df: 0x0a63, 0x7e0: 0x0b93, 0x7e1: 0x0f2f, 0x7e2: 0x0faf, 0x7e3: 0x0873, + 0x7e4: 0x103b, 0x7e5: 0x075f, 0x7e6: 0x0b77, 0x7e7: 0x06d7, 0x7e8: 0x0deb, 0x7e9: 0x0ca3, + 0x7ea: 0x110f, 0x7eb: 0x08c7, 0x7ec: 0x09b3, 0x7ed: 0x0ffb, 0x7ee: 0x1263, 0x7ef: 0x133b, + 0x7f0: 0x0db7, 0x7f1: 0x13f7, 0x7f2: 0x0de3, 0x7f3: 0x0c37, 0x7f4: 0x121b, 0x7f5: 0x0c57, + 0x7f6: 0x0fab, 0x7f7: 0x072b, 0x7f8: 0x07a7, 0x7f9: 0x07eb, 0x7fa: 0x0d53, 0x7fb: 0x10fb, + 0x7fc: 0x11f3, 0x7fd: 0x1347, 0x7fe: 0x145b, 0x7ff: 0x085b, // Block 0x20, offset 0x800 - 0x800: 0x0ec3, 0x801: 0x0fcb, 0x802: 0x1277, 0x803: 0x1417, 0x804: 0x1623, 0x805: 0x0ce3, - 0x806: 0x14a3, 0x807: 0x0833, 0x808: 0x0d2f, 0x809: 0x0d3b, 0x80a: 0x0e0f, 0x80b: 0x0e47, - 0x80c: 0x0f4b, 0x80d: 0x0fa7, 0x80e: 0x1027, 0x80f: 0x110b, 0x810: 0x153b, 0x811: 0x07af, - 0x812: 0x0c03, 0x813: 0x14b3, 0x814: 0x0767, 0x815: 0x0aab, 0x816: 0x0e2f, 0x817: 0x13df, - 0x818: 0x0b67, 0x819: 0x0bb7, 0x81a: 0x0d43, 0x81b: 0x0f2f, 0x81c: 0x14bb, 0x81d: 0x0817, - 0x81e: 0x08ff, 0x81f: 0x0a97, 0x820: 0x0cd3, 0x821: 0x0d1f, 0x822: 0x0d5f, 0x823: 0x0df3, - 0x824: 0x0f47, 0x825: 0x0fbb, 0x826: 0x1157, 0x827: 0x12f7, 0x828: 0x1303, 0x829: 0x1457, - 0x82a: 0x14d7, 0x82b: 0x0883, 0x82c: 0x0e4b, 0x82d: 0x0903, 0x82e: 0x0ec7, 0x82f: 0x0f6b, - 0x830: 0x1287, 0x831: 0x14bf, 0x832: 0x15ab, 0x833: 0x15d3, 0x834: 0x0d37, 0x835: 0x0e27, - 0x836: 0x11c3, 0x837: 0x10b7, 0x838: 0x10c3, 0x839: 0x10e7, 0x83a: 0x0f17, 0x83b: 0x0e9f, - 0x83c: 0x1363, 0x83d: 0x0733, 0x83e: 0x122b, 0x83f: 0x081b, + 0x800: 0x090f, 0x801: 0x0a17, 0x802: 0x0b2f, 0x803: 0x0cbf, 0x804: 0x0e7b, 0x805: 0x103f, + 0x806: 0x1497, 0x807: 0x157b, 0x808: 0x15cf, 0x809: 0x15e7, 0x80a: 0x0837, 0x80b: 0x0cf3, + 0x80c: 0x0da3, 0x80d: 0x13eb, 0x80e: 0x0afb, 0x80f: 0x0bd7, 0x810: 0x0bf3, 0x811: 0x0c83, + 0x812: 0x0e6b, 0x813: 0x0eb7, 0x814: 0x0f67, 0x815: 0x108b, 0x816: 0x112f, 0x817: 0x1193, + 0x818: 0x13db, 0x819: 0x126b, 0x81a: 0x1403, 0x81b: 0x147f, 0x81c: 0x080f, 0x81d: 0x083b, + 0x81e: 0x0923, 0x81f: 0x0ea7, 0x820: 0x12f3, 0x821: 0x133b, 0x822: 0x0b1b, 0x823: 0x0b8b, + 0x824: 0x0c4f, 0x825: 0x0daf, 0x826: 0x10d7, 0x827: 0x0f23, 0x828: 0x073b, 0x829: 0x097f, + 0x82a: 0x0a63, 0x82b: 0x0ac7, 0x82c: 0x0b97, 0x82d: 0x0f3f, 0x82e: 0x0f5b, 0x82f: 0x116b, + 0x830: 0x118b, 0x831: 0x1463, 0x832: 0x14e3, 0x833: 0x14f3, 0x834: 0x152f, 0x835: 0x0753, + 0x836: 0x107f, 0x837: 0x144f, 0x838: 0x14cb, 0x839: 0x0baf, 0x83a: 0x0717, 0x83b: 0x0777, + 0x83c: 0x0a67, 0x83d: 0x0a87, 0x83e: 0x0caf, 0x83f: 0x0d73, // Block 0x21, offset 0x840 - 0x840: 0x080b, 0x841: 0x0b0b, 0x842: 0x0c2b, 0x843: 0x10f3, 0x844: 0x0a53, 0x845: 0x0e03, - 0x846: 0x0cef, 0x847: 0x13e7, 0x848: 0x12e7, 0x849: 0x14ab, 0x84a: 0x1323, 0x84b: 0x0b27, - 0x84c: 0x0787, 0x84d: 0x095b, 0x850: 0x09af, - 0x852: 0x0cdf, 0x855: 0x07f7, 0x856: 0x0f1f, 0x857: 0x0fe3, - 0x858: 0x1047, 0x859: 0x1063, 0x85a: 0x1067, 0x85b: 0x107b, 0x85c: 0x14fb, 0x85d: 0x10eb, - 0x85e: 0x116f, 0x860: 0x128f, 0x862: 0x1353, - 0x865: 0x1407, 0x866: 0x1433, - 0x86a: 0x154f, 0x86b: 0x1553, 0x86c: 0x1557, 0x86d: 0x15bb, 0x86e: 0x142b, 0x86f: 0x14c7, - 0x870: 0x0757, 0x871: 0x077b, 0x872: 0x078f, 0x873: 0x084b, 0x874: 0x0857, 0x875: 0x0897, - 0x876: 0x094b, 0x877: 0x0967, 0x878: 0x096f, 0x879: 0x09ab, 0x87a: 0x09b7, 0x87b: 0x0a93, - 0x87c: 0x0a9b, 0x87d: 0x0ba3, 0x87e: 0x0bcb, 0x87f: 0x0bd3, + 0x840: 0x0ec3, 0x841: 0x0fcb, 0x842: 0x1277, 0x843: 0x1417, 0x844: 0x1623, 0x845: 0x0ce3, + 0x846: 0x14a3, 0x847: 0x0833, 0x848: 0x0d2f, 0x849: 0x0d3b, 0x84a: 0x0e0f, 0x84b: 0x0e47, + 0x84c: 0x0f4b, 0x84d: 0x0fa7, 0x84e: 0x1027, 0x84f: 0x110b, 0x850: 0x153b, 0x851: 0x07af, + 0x852: 0x0c03, 0x853: 0x14b3, 0x854: 0x0767, 0x855: 0x0aab, 0x856: 0x0e2f, 0x857: 0x13df, + 0x858: 0x0b67, 0x859: 0x0bb7, 0x85a: 0x0d43, 0x85b: 0x0f2f, 0x85c: 0x14bb, 0x85d: 0x0817, + 0x85e: 0x08ff, 0x85f: 0x0a97, 0x860: 0x0cd3, 0x861: 0x0d1f, 0x862: 0x0d5f, 0x863: 0x0df3, + 0x864: 0x0f47, 0x865: 0x0fbb, 0x866: 0x1157, 0x867: 0x12f7, 0x868: 0x1303, 0x869: 0x1457, + 0x86a: 0x14d7, 0x86b: 0x0883, 0x86c: 0x0e4b, 0x86d: 0x0903, 0x86e: 0x0ec7, 0x86f: 0x0f6b, + 0x870: 0x1287, 0x871: 0x14bf, 0x872: 0x15ab, 0x873: 0x15d3, 0x874: 0x0d37, 0x875: 0x0e27, + 0x876: 0x11c3, 0x877: 0x10b7, 0x878: 0x10c3, 0x879: 0x10e7, 0x87a: 0x0f17, 0x87b: 0x0e9f, + 0x87c: 0x1363, 0x87d: 0x0733, 0x87e: 0x122b, 0x87f: 0x081b, // Block 0x22, offset 0x880 - 0x880: 0x0beb, 0x881: 0x0c97, 0x882: 0x0cc7, 0x883: 0x0ce7, 0x884: 0x0d57, 0x885: 0x0e1b, - 0x886: 0x0e37, 0x887: 0x0e67, 0x888: 0x0ebb, 0x889: 0x0edb, 0x88a: 0x0f4f, 0x88b: 0x102f, - 0x88c: 0x104b, 0x88d: 0x1053, 0x88e: 0x104f, 0x88f: 0x1057, 0x890: 0x105b, 0x891: 0x105f, - 0x892: 0x1073, 0x893: 0x1077, 0x894: 0x109b, 0x895: 0x10af, 0x896: 0x10cb, 0x897: 0x112f, - 0x898: 0x1137, 0x899: 0x113f, 0x89a: 0x1153, 0x89b: 0x117b, 0x89c: 0x11cb, 0x89d: 0x11ff, - 0x89e: 0x11ff, 0x89f: 0x1267, 0x8a0: 0x130f, 0x8a1: 0x1327, 0x8a2: 0x135b, 0x8a3: 0x135f, - 0x8a4: 0x13a3, 0x8a5: 0x13a7, 0x8a6: 0x13ff, 0x8a7: 0x1407, 0x8a8: 0x14db, 0x8a9: 0x151f, - 0x8aa: 0x1537, 0x8ab: 0x0b9b, 0x8ac: 0x171e, 0x8ad: 0x11e3, - 0x8b0: 0x06df, 0x8b1: 0x07e3, 0x8b2: 0x07a3, 0x8b3: 0x074b, 0x8b4: 0x078b, 0x8b5: 0x07b7, - 0x8b6: 0x0847, 0x8b7: 0x0863, 0x8b8: 0x094b, 0x8b9: 0x0937, 0x8ba: 0x0947, 0x8bb: 0x0963, - 0x8bc: 0x09af, 0x8bd: 0x09bf, 0x8be: 0x0a03, 0x8bf: 0x0a0f, + 0x880: 0x080b, 0x881: 0x0b0b, 0x882: 0x0c2b, 0x883: 0x10f3, 0x884: 0x0a53, 0x885: 0x0e03, + 0x886: 0x0cef, 0x887: 0x13e7, 0x888: 0x12e7, 0x889: 0x14ab, 0x88a: 0x1323, 0x88b: 0x0b27, + 0x88c: 0x0787, 0x88d: 0x095b, 0x890: 0x09af, + 0x892: 0x0cdf, 0x895: 0x07f7, 0x896: 0x0f1f, 0x897: 0x0fe3, + 0x898: 0x1047, 0x899: 0x1063, 0x89a: 0x1067, 0x89b: 0x107b, 0x89c: 0x14fb, 0x89d: 0x10eb, + 0x89e: 0x116f, 0x8a0: 0x128f, 0x8a2: 0x1353, + 0x8a5: 0x1407, 0x8a6: 0x1433, + 0x8aa: 0x154f, 0x8ab: 0x1553, 0x8ac: 0x1557, 0x8ad: 0x15bb, 0x8ae: 0x142b, 0x8af: 0x14c7, + 0x8b0: 0x0757, 0x8b1: 0x077b, 0x8b2: 0x078f, 0x8b3: 0x084b, 0x8b4: 0x0857, 0x8b5: 0x0897, + 0x8b6: 0x094b, 0x8b7: 0x0967, 0x8b8: 0x096f, 0x8b9: 0x09ab, 0x8ba: 0x09b7, 0x8bb: 0x0a93, + 0x8bc: 0x0a9b, 0x8bd: 0x0ba3, 0x8be: 0x0bcb, 0x8bf: 0x0bd3, // Block 0x23, offset 0x8c0 - 0x8c0: 0x0a2b, 0x8c1: 0x0a3b, 0x8c2: 0x0b23, 0x8c3: 0x0b2b, 0x8c4: 0x0b5b, 0x8c5: 0x0b7b, - 0x8c6: 0x0bab, 0x8c7: 0x0bc3, 0x8c8: 0x0bb3, 0x8c9: 0x0bd3, 0x8ca: 0x0bc7, 0x8cb: 0x0beb, - 0x8cc: 0x0c07, 0x8cd: 0x0c5f, 0x8ce: 0x0c6b, 0x8cf: 0x0c73, 0x8d0: 0x0c9b, 0x8d1: 0x0cdf, - 0x8d2: 0x0d0f, 0x8d3: 0x0d13, 0x8d4: 0x0d27, 0x8d5: 0x0da7, 0x8d6: 0x0db7, 0x8d7: 0x0e0f, - 0x8d8: 0x0e5b, 0x8d9: 0x0e53, 0x8da: 0x0e67, 0x8db: 0x0e83, 0x8dc: 0x0ebb, 0x8dd: 0x1013, - 0x8de: 0x0edf, 0x8df: 0x0f13, 0x8e0: 0x0f1f, 0x8e1: 0x0f5f, 0x8e2: 0x0f7b, 0x8e3: 0x0f9f, - 0x8e4: 0x0fc3, 0x8e5: 0x0fc7, 0x8e6: 0x0fe3, 0x8e7: 0x0fe7, 0x8e8: 0x0ff7, 0x8e9: 0x100b, - 0x8ea: 0x1007, 0x8eb: 0x1037, 0x8ec: 0x10b3, 0x8ed: 0x10cb, 0x8ee: 0x10e3, 0x8ef: 0x111b, - 0x8f0: 0x112f, 0x8f1: 0x114b, 0x8f2: 0x117b, 0x8f3: 0x122f, 0x8f4: 0x1257, 0x8f5: 0x12cb, - 0x8f6: 0x1313, 0x8f7: 0x131f, 0x8f8: 0x1327, 0x8f9: 0x133f, 0x8fa: 0x1353, 0x8fb: 0x1343, - 0x8fc: 0x135b, 0x8fd: 0x1357, 0x8fe: 0x134f, 0x8ff: 0x135f, + 0x8c0: 0x0beb, 0x8c1: 0x0c97, 0x8c2: 0x0cc7, 0x8c3: 0x0ce7, 0x8c4: 0x0d57, 0x8c5: 0x0e1b, + 0x8c6: 0x0e37, 0x8c7: 0x0e67, 0x8c8: 0x0ebb, 0x8c9: 0x0edb, 0x8ca: 0x0f4f, 0x8cb: 0x102f, + 0x8cc: 0x104b, 0x8cd: 0x1053, 0x8ce: 0x104f, 0x8cf: 0x1057, 0x8d0: 0x105b, 0x8d1: 0x105f, + 0x8d2: 0x1073, 0x8d3: 0x1077, 0x8d4: 0x109b, 0x8d5: 0x10af, 0x8d6: 0x10cb, 0x8d7: 0x112f, + 0x8d8: 0x1137, 0x8d9: 0x113f, 0x8da: 0x1153, 0x8db: 0x117b, 0x8dc: 0x11cb, 0x8dd: 0x11ff, + 0x8de: 0x11ff, 0x8df: 0x1267, 0x8e0: 0x130f, 0x8e1: 0x1327, 0x8e2: 0x135b, 0x8e3: 0x135f, + 0x8e4: 0x13a3, 0x8e5: 0x13a7, 0x8e6: 0x13ff, 0x8e7: 0x1407, 0x8e8: 0x14db, 0x8e9: 0x151f, + 0x8ea: 0x1537, 0x8eb: 0x0b9b, 0x8ec: 0x171e, 0x8ed: 0x11e3, + 0x8f0: 0x06df, 0x8f1: 0x07e3, 0x8f2: 0x07a3, 0x8f3: 0x074b, 0x8f4: 0x078b, 0x8f5: 0x07b7, + 0x8f6: 0x0847, 0x8f7: 0x0863, 0x8f8: 0x094b, 0x8f9: 0x0937, 0x8fa: 0x0947, 0x8fb: 0x0963, + 0x8fc: 0x09af, 0x8fd: 0x09bf, 0x8fe: 0x0a03, 0x8ff: 0x0a0f, // Block 0x24, offset 0x900 - 0x900: 0x136b, 0x901: 0x13a7, 0x902: 0x13e3, 0x903: 0x1413, 0x904: 0x144b, 0x905: 0x146b, - 0x906: 0x14b7, 0x907: 0x14db, 0x908: 0x14fb, 0x909: 0x150f, 0x90a: 0x151f, 0x90b: 0x152b, - 0x90c: 0x1537, 0x90d: 0x158b, 0x90e: 0x162b, 0x90f: 0x16b5, 0x910: 0x16b0, 0x911: 0x16e2, - 0x912: 0x0607, 0x913: 0x062f, 0x914: 0x0633, 0x915: 0x1764, 0x916: 0x1791, 0x917: 0x1809, - 0x918: 0x1617, 0x919: 0x1627, + 0x900: 0x0a2b, 0x901: 0x0a3b, 0x902: 0x0b23, 0x903: 0x0b2b, 0x904: 0x0b5b, 0x905: 0x0b7b, + 0x906: 0x0bab, 0x907: 0x0bc3, 0x908: 0x0bb3, 0x909: 0x0bd3, 0x90a: 0x0bc7, 0x90b: 0x0beb, + 0x90c: 0x0c07, 0x90d: 0x0c5f, 0x90e: 0x0c6b, 0x90f: 0x0c73, 0x910: 0x0c9b, 0x911: 0x0cdf, + 0x912: 0x0d0f, 0x913: 0x0d13, 0x914: 0x0d27, 0x915: 0x0da7, 0x916: 0x0db7, 0x917: 0x0e0f, + 0x918: 0x0e5b, 0x919: 0x0e53, 0x91a: 0x0e67, 0x91b: 0x0e83, 0x91c: 0x0ebb, 0x91d: 0x1013, + 0x91e: 0x0edf, 0x91f: 0x0f13, 0x920: 0x0f1f, 0x921: 0x0f5f, 0x922: 0x0f7b, 0x923: 0x0f9f, + 0x924: 0x0fc3, 0x925: 0x0fc7, 0x926: 0x0fe3, 0x927: 0x0fe7, 0x928: 0x0ff7, 0x929: 0x100b, + 0x92a: 0x1007, 0x92b: 0x1037, 0x92c: 0x10b3, 0x92d: 0x10cb, 0x92e: 0x10e3, 0x92f: 0x111b, + 0x930: 0x112f, 0x931: 0x114b, 0x932: 0x117b, 0x933: 0x122f, 0x934: 0x1257, 0x935: 0x12cb, + 0x936: 0x1313, 0x937: 0x131f, 0x938: 0x1327, 0x939: 0x133f, 0x93a: 0x1353, 0x93b: 0x1343, + 0x93c: 0x135b, 0x93d: 0x1357, 0x93e: 0x134f, 0x93f: 0x135f, // Block 0x25, offset 0x940 - 0x940: 0x06fb, 0x941: 0x06f3, 0x942: 0x0703, 0x943: 0x1647, 0x944: 0x0747, 0x945: 0x0757, - 0x946: 0x075b, 0x947: 0x0763, 0x948: 0x076b, 0x949: 0x076f, 0x94a: 0x077b, 0x94b: 0x0773, - 0x94c: 0x05b3, 0x94d: 0x165b, 0x94e: 0x078f, 0x94f: 0x0793, 0x950: 0x0797, 0x951: 0x07b3, - 0x952: 0x164c, 0x953: 0x05b7, 0x954: 0x079f, 0x955: 0x07bf, 0x956: 0x1656, 0x957: 0x07cf, - 0x958: 0x07d7, 0x959: 0x0737, 0x95a: 0x07df, 0x95b: 0x07e3, 0x95c: 0x1831, 0x95d: 0x07ff, - 0x95e: 0x0807, 0x95f: 0x05bf, 0x960: 0x081f, 0x961: 0x0823, 0x962: 0x082b, 0x963: 0x082f, - 0x964: 0x05c3, 0x965: 0x0847, 0x966: 0x084b, 0x967: 0x0857, 0x968: 0x0863, 0x969: 0x0867, - 0x96a: 0x086b, 0x96b: 0x0873, 0x96c: 0x0893, 0x96d: 0x0897, 0x96e: 0x089f, 0x96f: 0x08af, - 0x970: 0x08b7, 0x971: 0x08bb, 0x972: 0x08bb, 0x973: 0x08bb, 0x974: 0x166a, 0x975: 0x0e93, - 0x976: 0x08cf, 0x977: 0x08d7, 0x978: 0x166f, 0x979: 0x08e3, 0x97a: 0x08eb, 0x97b: 0x08f3, - 0x97c: 0x091b, 0x97d: 0x0907, 0x97e: 0x0913, 0x97f: 0x0917, + 0x940: 0x136b, 0x941: 0x13a7, 0x942: 0x13e3, 0x943: 0x1413, 0x944: 0x144b, 0x945: 0x146b, + 0x946: 0x14b7, 0x947: 0x14db, 0x948: 0x14fb, 0x949: 0x150f, 0x94a: 0x151f, 0x94b: 0x152b, + 0x94c: 0x1537, 0x94d: 0x158b, 0x94e: 0x162b, 0x94f: 0x16b5, 0x950: 0x16b0, 0x951: 0x16e2, + 0x952: 0x0607, 0x953: 0x062f, 0x954: 0x0633, 0x955: 0x1764, 0x956: 0x1791, 0x957: 0x1809, + 0x958: 0x1617, 0x959: 0x1627, // Block 0x26, offset 0x980 - 0x980: 0x091f, 0x981: 0x0927, 0x982: 0x092b, 0x983: 0x0933, 0x984: 0x093b, 0x985: 0x093f, - 0x986: 0x093f, 0x987: 0x0947, 0x988: 0x094f, 0x989: 0x0953, 0x98a: 0x095f, 0x98b: 0x0983, - 0x98c: 0x0967, 0x98d: 0x0987, 0x98e: 0x096b, 0x98f: 0x0973, 0x990: 0x080b, 0x991: 0x09cf, - 0x992: 0x0997, 0x993: 0x099b, 0x994: 0x099f, 0x995: 0x0993, 0x996: 0x09a7, 0x997: 0x09a3, - 0x998: 0x09bb, 0x999: 0x1674, 0x99a: 0x09d7, 0x99b: 0x09db, 0x99c: 0x09e3, 0x99d: 0x09ef, - 0x99e: 0x09f7, 0x99f: 0x0a13, 0x9a0: 0x1679, 0x9a1: 0x167e, 0x9a2: 0x0a1f, 0x9a3: 0x0a23, - 0x9a4: 0x0a27, 0x9a5: 0x0a1b, 0x9a6: 0x0a2f, 0x9a7: 0x05c7, 0x9a8: 0x05cb, 0x9a9: 0x0a37, - 0x9aa: 0x0a3f, 0x9ab: 0x0a3f, 0x9ac: 0x1683, 0x9ad: 0x0a5b, 0x9ae: 0x0a5f, 0x9af: 0x0a63, - 0x9b0: 0x0a6b, 0x9b1: 0x1688, 0x9b2: 0x0a73, 0x9b3: 0x0a77, 0x9b4: 0x0b4f, 0x9b5: 0x0a7f, - 0x9b6: 0x05cf, 0x9b7: 0x0a8b, 0x9b8: 0x0a9b, 0x9b9: 0x0aa7, 0x9ba: 0x0aa3, 0x9bb: 0x1692, - 0x9bc: 0x0aaf, 0x9bd: 0x1697, 0x9be: 0x0abb, 0x9bf: 0x0ab7, + 0x980: 0x06fb, 0x981: 0x06f3, 0x982: 0x0703, 0x983: 0x1647, 0x984: 0x0747, 0x985: 0x0757, + 0x986: 0x075b, 0x987: 0x0763, 0x988: 0x076b, 0x989: 0x076f, 0x98a: 0x077b, 0x98b: 0x0773, + 0x98c: 0x05b3, 0x98d: 0x165b, 0x98e: 0x078f, 0x98f: 0x0793, 0x990: 0x0797, 0x991: 0x07b3, + 0x992: 0x164c, 0x993: 0x05b7, 0x994: 0x079f, 0x995: 0x07bf, 0x996: 0x1656, 0x997: 0x07cf, + 0x998: 0x07d7, 0x999: 0x0737, 0x99a: 0x07df, 0x99b: 0x07e3, 0x99c: 0x1831, 0x99d: 0x07ff, + 0x99e: 0x0807, 0x99f: 0x05bf, 0x9a0: 0x081f, 0x9a1: 0x0823, 0x9a2: 0x082b, 0x9a3: 0x082f, + 0x9a4: 0x05c3, 0x9a5: 0x0847, 0x9a6: 0x084b, 0x9a7: 0x0857, 0x9a8: 0x0863, 0x9a9: 0x0867, + 0x9aa: 0x086b, 0x9ab: 0x0873, 0x9ac: 0x0893, 0x9ad: 0x0897, 0x9ae: 0x089f, 0x9af: 0x08af, + 0x9b0: 0x08b7, 0x9b1: 0x08bb, 0x9b2: 0x08bb, 0x9b3: 0x08bb, 0x9b4: 0x166a, 0x9b5: 0x0e93, + 0x9b6: 0x08cf, 0x9b7: 0x08d7, 0x9b8: 0x166f, 0x9b9: 0x08e3, 0x9ba: 0x08eb, 0x9bb: 0x08f3, + 0x9bc: 0x091b, 0x9bd: 0x0907, 0x9be: 0x0913, 0x9bf: 0x0917, // Block 0x27, offset 0x9c0 - 0x9c0: 0x0abf, 0x9c1: 0x0acf, 0x9c2: 0x0ad3, 0x9c3: 0x05d3, 0x9c4: 0x0ae3, 0x9c5: 0x0aeb, - 0x9c6: 0x0aef, 0x9c7: 0x0af3, 0x9c8: 0x05d7, 0x9c9: 0x169c, 0x9ca: 0x05db, 0x9cb: 0x0b0f, - 0x9cc: 0x0b13, 0x9cd: 0x0b17, 0x9ce: 0x0b1f, 0x9cf: 0x1863, 0x9d0: 0x0b37, 0x9d1: 0x16a6, - 0x9d2: 0x16a6, 0x9d3: 0x11d7, 0x9d4: 0x0b47, 0x9d5: 0x0b47, 0x9d6: 0x05df, 0x9d7: 0x16c9, - 0x9d8: 0x179b, 0x9d9: 0x0b57, 0x9da: 0x0b5f, 0x9db: 0x05e3, 0x9dc: 0x0b73, 0x9dd: 0x0b83, - 0x9de: 0x0b87, 0x9df: 0x0b8f, 0x9e0: 0x0b9f, 0x9e1: 0x05eb, 0x9e2: 0x05e7, 0x9e3: 0x0ba3, - 0x9e4: 0x16ab, 0x9e5: 0x0ba7, 0x9e6: 0x0bbb, 0x9e7: 0x0bbf, 0x9e8: 0x0bc3, 0x9e9: 0x0bbf, - 0x9ea: 0x0bcf, 0x9eb: 0x0bd3, 0x9ec: 0x0be3, 0x9ed: 0x0bdb, 0x9ee: 0x0bdf, 0x9ef: 0x0be7, - 0x9f0: 0x0beb, 0x9f1: 0x0bef, 0x9f2: 0x0bfb, 0x9f3: 0x0bff, 0x9f4: 0x0c17, 0x9f5: 0x0c1f, - 0x9f6: 0x0c2f, 0x9f7: 0x0c43, 0x9f8: 0x16ba, 0x9f9: 0x0c3f, 0x9fa: 0x0c33, 0x9fb: 0x0c4b, - 0x9fc: 0x0c53, 0x9fd: 0x0c67, 0x9fe: 0x16bf, 0x9ff: 0x0c6f, + 0x9c0: 0x091f, 0x9c1: 0x0927, 0x9c2: 0x092b, 0x9c3: 0x0933, 0x9c4: 0x093b, 0x9c5: 0x093f, + 0x9c6: 0x093f, 0x9c7: 0x0947, 0x9c8: 0x094f, 0x9c9: 0x0953, 0x9ca: 0x095f, 0x9cb: 0x0983, + 0x9cc: 0x0967, 0x9cd: 0x0987, 0x9ce: 0x096b, 0x9cf: 0x0973, 0x9d0: 0x080b, 0x9d1: 0x09cf, + 0x9d2: 0x0997, 0x9d3: 0x099b, 0x9d4: 0x099f, 0x9d5: 0x0993, 0x9d6: 0x09a7, 0x9d7: 0x09a3, + 0x9d8: 0x09bb, 0x9d9: 0x1674, 0x9da: 0x09d7, 0x9db: 0x09db, 0x9dc: 0x09e3, 0x9dd: 0x09ef, + 0x9de: 0x09f7, 0x9df: 0x0a13, 0x9e0: 0x1679, 0x9e1: 0x167e, 0x9e2: 0x0a1f, 0x9e3: 0x0a23, + 0x9e4: 0x0a27, 0x9e5: 0x0a1b, 0x9e6: 0x0a2f, 0x9e7: 0x05c7, 0x9e8: 0x05cb, 0x9e9: 0x0a37, + 0x9ea: 0x0a3f, 0x9eb: 0x0a3f, 0x9ec: 0x1683, 0x9ed: 0x0a5b, 0x9ee: 0x0a5f, 0x9ef: 0x0a63, + 0x9f0: 0x0a6b, 0x9f1: 0x1688, 0x9f2: 0x0a73, 0x9f3: 0x0a77, 0x9f4: 0x0b4f, 0x9f5: 0x0a7f, + 0x9f6: 0x05cf, 0x9f7: 0x0a8b, 0x9f8: 0x0a9b, 0x9f9: 0x0aa7, 0x9fa: 0x0aa3, 0x9fb: 0x1692, + 0x9fc: 0x0aaf, 0x9fd: 0x1697, 0x9fe: 0x0abb, 0x9ff: 0x0ab7, // Block 0x28, offset 0xa00 - 0xa00: 0x0c63, 0xa01: 0x0c5b, 0xa02: 0x05ef, 0xa03: 0x0c77, 0xa04: 0x0c7f, 0xa05: 0x0c87, - 0xa06: 0x0c7b, 0xa07: 0x05f3, 0xa08: 0x0c97, 0xa09: 0x0c9f, 0xa0a: 0x16c4, 0xa0b: 0x0ccb, - 0xa0c: 0x0cff, 0xa0d: 0x0cdb, 0xa0e: 0x05ff, 0xa0f: 0x0ce7, 0xa10: 0x05fb, 0xa11: 0x05f7, - 0xa12: 0x07c3, 0xa13: 0x07c7, 0xa14: 0x0d03, 0xa15: 0x0ceb, 0xa16: 0x11ab, 0xa17: 0x0663, - 0xa18: 0x0d0f, 0xa19: 0x0d13, 0xa1a: 0x0d17, 0xa1b: 0x0d2b, 0xa1c: 0x0d23, 0xa1d: 0x16dd, - 0xa1e: 0x0603, 0xa1f: 0x0d3f, 0xa20: 0x0d33, 0xa21: 0x0d4f, 0xa22: 0x0d57, 0xa23: 0x16e7, - 0xa24: 0x0d5b, 0xa25: 0x0d47, 0xa26: 0x0d63, 0xa27: 0x0607, 0xa28: 0x0d67, 0xa29: 0x0d6b, - 0xa2a: 0x0d6f, 0xa2b: 0x0d7b, 0xa2c: 0x16ec, 0xa2d: 0x0d83, 0xa2e: 0x060b, 0xa2f: 0x0d8f, - 0xa30: 0x16f1, 0xa31: 0x0d93, 0xa32: 0x060f, 0xa33: 0x0d9f, 0xa34: 0x0dab, 0xa35: 0x0db7, - 0xa36: 0x0dbb, 0xa37: 0x16f6, 0xa38: 0x168d, 0xa39: 0x16fb, 0xa3a: 0x0ddb, 0xa3b: 0x1700, - 0xa3c: 0x0de7, 0xa3d: 0x0def, 0xa3e: 0x0ddf, 0xa3f: 0x0dfb, + 0xa00: 0x0abf, 0xa01: 0x0acf, 0xa02: 0x0ad3, 0xa03: 0x05d3, 0xa04: 0x0ae3, 0xa05: 0x0aeb, + 0xa06: 0x0aef, 0xa07: 0x0af3, 0xa08: 0x05d7, 0xa09: 0x169c, 0xa0a: 0x05db, 0xa0b: 0x0b0f, + 0xa0c: 0x0b13, 0xa0d: 0x0b17, 0xa0e: 0x0b1f, 0xa0f: 0x1863, 0xa10: 0x0b37, 0xa11: 0x16a6, + 0xa12: 0x16a6, 0xa13: 0x11d7, 0xa14: 0x0b47, 0xa15: 0x0b47, 0xa16: 0x05df, 0xa17: 0x16c9, + 0xa18: 0x179b, 0xa19: 0x0b57, 0xa1a: 0x0b5f, 0xa1b: 0x05e3, 0xa1c: 0x0b73, 0xa1d: 0x0b83, + 0xa1e: 0x0b87, 0xa1f: 0x0b8f, 0xa20: 0x0b9f, 0xa21: 0x05eb, 0xa22: 0x05e7, 0xa23: 0x0ba3, + 0xa24: 0x16ab, 0xa25: 0x0ba7, 0xa26: 0x0bbb, 0xa27: 0x0bbf, 0xa28: 0x0bc3, 0xa29: 0x0bbf, + 0xa2a: 0x0bcf, 0xa2b: 0x0bd3, 0xa2c: 0x0be3, 0xa2d: 0x0bdb, 0xa2e: 0x0bdf, 0xa2f: 0x0be7, + 0xa30: 0x0beb, 0xa31: 0x0bef, 0xa32: 0x0bfb, 0xa33: 0x0bff, 0xa34: 0x0c17, 0xa35: 0x0c1f, + 0xa36: 0x0c2f, 0xa37: 0x0c43, 0xa38: 0x16ba, 0xa39: 0x0c3f, 0xa3a: 0x0c33, 0xa3b: 0x0c4b, + 0xa3c: 0x0c53, 0xa3d: 0x0c67, 0xa3e: 0x16bf, 0xa3f: 0x0c6f, // Block 0x29, offset 0xa40 - 0xa40: 0x0e0b, 0xa41: 0x0e1b, 0xa42: 0x0e0f, 0xa43: 0x0e13, 0xa44: 0x0e1f, 0xa45: 0x0e23, - 0xa46: 0x1705, 0xa47: 0x0e07, 0xa48: 0x0e3b, 0xa49: 0x0e3f, 0xa4a: 0x0613, 0xa4b: 0x0e53, - 0xa4c: 0x0e4f, 0xa4d: 0x170a, 0xa4e: 0x0e33, 0xa4f: 0x0e6f, 0xa50: 0x170f, 0xa51: 0x1714, - 0xa52: 0x0e73, 0xa53: 0x0e87, 0xa54: 0x0e83, 0xa55: 0x0e7f, 0xa56: 0x0617, 0xa57: 0x0e8b, - 0xa58: 0x0e9b, 0xa59: 0x0e97, 0xa5a: 0x0ea3, 0xa5b: 0x1651, 0xa5c: 0x0eb3, 0xa5d: 0x1719, - 0xa5e: 0x0ebf, 0xa5f: 0x1723, 0xa60: 0x0ed3, 0xa61: 0x0edf, 0xa62: 0x0ef3, 0xa63: 0x1728, - 0xa64: 0x0f07, 0xa65: 0x0f0b, 0xa66: 0x172d, 0xa67: 0x1732, 0xa68: 0x0f27, 0xa69: 0x0f37, - 0xa6a: 0x061b, 0xa6b: 0x0f3b, 0xa6c: 0x061f, 0xa6d: 0x061f, 0xa6e: 0x0f53, 0xa6f: 0x0f57, - 0xa70: 0x0f5f, 0xa71: 0x0f63, 0xa72: 0x0f6f, 0xa73: 0x0623, 0xa74: 0x0f87, 0xa75: 0x1737, - 0xa76: 0x0fa3, 0xa77: 0x173c, 0xa78: 0x0faf, 0xa79: 0x16a1, 0xa7a: 0x0fbf, 0xa7b: 0x1741, - 0xa7c: 0x1746, 0xa7d: 0x174b, 0xa7e: 0x0627, 0xa7f: 0x062b, + 0xa40: 0x0c63, 0xa41: 0x0c5b, 0xa42: 0x05ef, 0xa43: 0x0c77, 0xa44: 0x0c7f, 0xa45: 0x0c87, + 0xa46: 0x0c7b, 0xa47: 0x05f3, 0xa48: 0x0c97, 0xa49: 0x0c9f, 0xa4a: 0x16c4, 0xa4b: 0x0ccb, + 0xa4c: 0x0cff, 0xa4d: 0x0cdb, 0xa4e: 0x05ff, 0xa4f: 0x0ce7, 0xa50: 0x05fb, 0xa51: 0x05f7, + 0xa52: 0x07c3, 0xa53: 0x07c7, 0xa54: 0x0d03, 0xa55: 0x0ceb, 0xa56: 0x11ab, 0xa57: 0x0663, + 0xa58: 0x0d0f, 0xa59: 0x0d13, 0xa5a: 0x0d17, 0xa5b: 0x0d2b, 0xa5c: 0x0d23, 0xa5d: 0x16dd, + 0xa5e: 0x0603, 0xa5f: 0x0d3f, 0xa60: 0x0d33, 0xa61: 0x0d4f, 0xa62: 0x0d57, 0xa63: 0x16e7, + 0xa64: 0x0d5b, 0xa65: 0x0d47, 0xa66: 0x0d63, 0xa67: 0x0607, 0xa68: 0x0d67, 0xa69: 0x0d6b, + 0xa6a: 0x0d6f, 0xa6b: 0x0d7b, 0xa6c: 0x16ec, 0xa6d: 0x0d83, 0xa6e: 0x060b, 0xa6f: 0x0d8f, + 0xa70: 0x16f1, 0xa71: 0x0d93, 0xa72: 0x060f, 0xa73: 0x0d9f, 0xa74: 0x0dab, 0xa75: 0x0db7, + 0xa76: 0x0dbb, 0xa77: 0x16f6, 0xa78: 0x168d, 0xa79: 0x16fb, 0xa7a: 0x0ddb, 0xa7b: 0x1700, + 0xa7c: 0x0de7, 0xa7d: 0x0def, 0xa7e: 0x0ddf, 0xa7f: 0x0dfb, // Block 0x2a, offset 0xa80 - 0xa80: 0x0ff7, 0xa81: 0x1755, 0xa82: 0x1750, 0xa83: 0x175a, 0xa84: 0x175f, 0xa85: 0x0fff, - 0xa86: 0x1003, 0xa87: 0x1003, 0xa88: 0x100b, 0xa89: 0x0633, 0xa8a: 0x100f, 0xa8b: 0x0637, - 0xa8c: 0x063b, 0xa8d: 0x1769, 0xa8e: 0x1023, 0xa8f: 0x102b, 0xa90: 0x1037, 0xa91: 0x063f, - 0xa92: 0x176e, 0xa93: 0x105b, 0xa94: 0x1773, 0xa95: 0x1778, 0xa96: 0x107b, 0xa97: 0x1093, - 0xa98: 0x0643, 0xa99: 0x109b, 0xa9a: 0x109f, 0xa9b: 0x10a3, 0xa9c: 0x177d, 0xa9d: 0x1782, - 0xa9e: 0x1782, 0xa9f: 0x10bb, 0xaa0: 0x0647, 0xaa1: 0x1787, 0xaa2: 0x10cf, 0xaa3: 0x10d3, - 0xaa4: 0x064b, 0xaa5: 0x178c, 0xaa6: 0x10ef, 0xaa7: 0x064f, 0xaa8: 0x10ff, 0xaa9: 0x10f7, - 0xaaa: 0x1107, 0xaab: 0x1796, 0xaac: 0x111f, 0xaad: 0x0653, 0xaae: 0x112b, 0xaaf: 0x1133, - 0xab0: 0x1143, 0xab1: 0x0657, 0xab2: 0x17a0, 0xab3: 0x17a5, 0xab4: 0x065b, 0xab5: 0x17aa, - 0xab6: 0x115b, 0xab7: 0x17af, 0xab8: 0x1167, 0xab9: 0x1173, 0xaba: 0x117b, 0xabb: 0x17b4, - 0xabc: 0x17b9, 0xabd: 0x118f, 0xabe: 0x17be, 0xabf: 0x1197, + 0xa80: 0x0e0b, 0xa81: 0x0e1b, 0xa82: 0x0e0f, 0xa83: 0x0e13, 0xa84: 0x0e1f, 0xa85: 0x0e23, + 0xa86: 0x1705, 0xa87: 0x0e07, 0xa88: 0x0e3b, 0xa89: 0x0e3f, 0xa8a: 0x0613, 0xa8b: 0x0e53, + 0xa8c: 0x0e4f, 0xa8d: 0x170a, 0xa8e: 0x0e33, 0xa8f: 0x0e6f, 0xa90: 0x170f, 0xa91: 0x1714, + 0xa92: 0x0e73, 0xa93: 0x0e87, 0xa94: 0x0e83, 0xa95: 0x0e7f, 0xa96: 0x0617, 0xa97: 0x0e8b, + 0xa98: 0x0e9b, 0xa99: 0x0e97, 0xa9a: 0x0ea3, 0xa9b: 0x1651, 0xa9c: 0x0eb3, 0xa9d: 0x1719, + 0xa9e: 0x0ebf, 0xa9f: 0x1723, 0xaa0: 0x0ed3, 0xaa1: 0x0edf, 0xaa2: 0x0ef3, 0xaa3: 0x1728, + 0xaa4: 0x0f07, 0xaa5: 0x0f0b, 0xaa6: 0x172d, 0xaa7: 0x1732, 0xaa8: 0x0f27, 0xaa9: 0x0f37, + 0xaaa: 0x061b, 0xaab: 0x0f3b, 0xaac: 0x061f, 0xaad: 0x061f, 0xaae: 0x0f53, 0xaaf: 0x0f57, + 0xab0: 0x0f5f, 0xab1: 0x0f63, 0xab2: 0x0f6f, 0xab3: 0x0623, 0xab4: 0x0f87, 0xab5: 0x1737, + 0xab6: 0x0fa3, 0xab7: 0x173c, 0xab8: 0x0faf, 0xab9: 0x16a1, 0xaba: 0x0fbf, 0xabb: 0x1741, + 0xabc: 0x1746, 0xabd: 0x174b, 0xabe: 0x0627, 0xabf: 0x062b, // Block 0x2b, offset 0xac0 - 0xac0: 0x16ce, 0xac1: 0x065f, 0xac2: 0x11af, 0xac3: 0x11b3, 0xac4: 0x0667, 0xac5: 0x11b7, - 0xac6: 0x0a33, 0xac7: 0x17c3, 0xac8: 0x17c8, 0xac9: 0x16d3, 0xaca: 0x16d8, 0xacb: 0x11d7, - 0xacc: 0x11db, 0xacd: 0x13f3, 0xace: 0x066b, 0xacf: 0x1207, 0xad0: 0x1203, 0xad1: 0x120b, - 0xad2: 0x083f, 0xad3: 0x120f, 0xad4: 0x1213, 0xad5: 0x1217, 0xad6: 0x121f, 0xad7: 0x17cd, - 0xad8: 0x121b, 0xad9: 0x1223, 0xada: 0x1237, 0xadb: 0x123b, 0xadc: 0x1227, 0xadd: 0x123f, - 0xade: 0x1253, 0xadf: 0x1267, 0xae0: 0x1233, 0xae1: 0x1247, 0xae2: 0x124b, 0xae3: 0x124f, - 0xae4: 0x17d2, 0xae5: 0x17dc, 0xae6: 0x17d7, 0xae7: 0x066f, 0xae8: 0x126f, 0xae9: 0x1273, - 0xaea: 0x127b, 0xaeb: 0x17f0, 0xaec: 0x127f, 0xaed: 0x17e1, 0xaee: 0x0673, 0xaef: 0x0677, - 0xaf0: 0x17e6, 0xaf1: 0x17eb, 0xaf2: 0x067b, 0xaf3: 0x129f, 0xaf4: 0x12a3, 0xaf5: 0x12a7, - 0xaf6: 0x12ab, 0xaf7: 0x12b7, 0xaf8: 0x12b3, 0xaf9: 0x12bf, 0xafa: 0x12bb, 0xafb: 0x12cb, - 0xafc: 0x12c3, 0xafd: 0x12c7, 0xafe: 0x12cf, 0xaff: 0x067f, + 0xac0: 0x0ff7, 0xac1: 0x1755, 0xac2: 0x1750, 0xac3: 0x175a, 0xac4: 0x175f, 0xac5: 0x0fff, + 0xac6: 0x1003, 0xac7: 0x1003, 0xac8: 0x100b, 0xac9: 0x0633, 0xaca: 0x100f, 0xacb: 0x0637, + 0xacc: 0x063b, 0xacd: 0x1769, 0xace: 0x1023, 0xacf: 0x102b, 0xad0: 0x1037, 0xad1: 0x063f, + 0xad2: 0x176e, 0xad3: 0x105b, 0xad4: 0x1773, 0xad5: 0x1778, 0xad6: 0x107b, 0xad7: 0x1093, + 0xad8: 0x0643, 0xad9: 0x109b, 0xada: 0x109f, 0xadb: 0x10a3, 0xadc: 0x177d, 0xadd: 0x1782, + 0xade: 0x1782, 0xadf: 0x10bb, 0xae0: 0x0647, 0xae1: 0x1787, 0xae2: 0x10cf, 0xae3: 0x10d3, + 0xae4: 0x064b, 0xae5: 0x178c, 0xae6: 0x10ef, 0xae7: 0x064f, 0xae8: 0x10ff, 0xae9: 0x10f7, + 0xaea: 0x1107, 0xaeb: 0x1796, 0xaec: 0x111f, 0xaed: 0x0653, 0xaee: 0x112b, 0xaef: 0x1133, + 0xaf0: 0x1143, 0xaf1: 0x0657, 0xaf2: 0x17a0, 0xaf3: 0x17a5, 0xaf4: 0x065b, 0xaf5: 0x17aa, + 0xaf6: 0x115b, 0xaf7: 0x17af, 0xaf8: 0x1167, 0xaf9: 0x1173, 0xafa: 0x117b, 0xafb: 0x17b4, + 0xafc: 0x17b9, 0xafd: 0x118f, 0xafe: 0x17be, 0xaff: 0x1197, // Block 0x2c, offset 0xb00 - 0xb00: 0x12d7, 0xb01: 0x12db, 0xb02: 0x0683, 0xb03: 0x12eb, 0xb04: 0x12ef, 0xb05: 0x17f5, - 0xb06: 0x12fb, 0xb07: 0x12ff, 0xb08: 0x0687, 0xb09: 0x130b, 0xb0a: 0x05bb, 0xb0b: 0x17fa, - 0xb0c: 0x17ff, 0xb0d: 0x068b, 0xb0e: 0x068f, 0xb0f: 0x1337, 0xb10: 0x134f, 0xb11: 0x136b, - 0xb12: 0x137b, 0xb13: 0x1804, 0xb14: 0x138f, 0xb15: 0x1393, 0xb16: 0x13ab, 0xb17: 0x13b7, - 0xb18: 0x180e, 0xb19: 0x1660, 0xb1a: 0x13c3, 0xb1b: 0x13bf, 0xb1c: 0x13cb, 0xb1d: 0x1665, - 0xb1e: 0x13d7, 0xb1f: 0x13e3, 0xb20: 0x1813, 0xb21: 0x1818, 0xb22: 0x1423, 0xb23: 0x142f, - 0xb24: 0x1437, 0xb25: 0x181d, 0xb26: 0x143b, 0xb27: 0x1467, 0xb28: 0x1473, 0xb29: 0x1477, - 0xb2a: 0x146f, 0xb2b: 0x1483, 0xb2c: 0x1487, 0xb2d: 0x1822, 0xb2e: 0x1493, 0xb2f: 0x0693, - 0xb30: 0x149b, 0xb31: 0x1827, 0xb32: 0x0697, 0xb33: 0x14d3, 0xb34: 0x0ac3, 0xb35: 0x14eb, - 0xb36: 0x182c, 0xb37: 0x1836, 0xb38: 0x069b, 0xb39: 0x069f, 0xb3a: 0x1513, 0xb3b: 0x183b, - 0xb3c: 0x06a3, 0xb3d: 0x1840, 0xb3e: 0x152b, 0xb3f: 0x152b, + 0xb00: 0x16ce, 0xb01: 0x065f, 0xb02: 0x11af, 0xb03: 0x11b3, 0xb04: 0x0667, 0xb05: 0x11b7, + 0xb06: 0x0a33, 0xb07: 0x17c3, 0xb08: 0x17c8, 0xb09: 0x16d3, 0xb0a: 0x16d8, 0xb0b: 0x11d7, + 0xb0c: 0x11db, 0xb0d: 0x13f3, 0xb0e: 0x066b, 0xb0f: 0x1207, 0xb10: 0x1203, 0xb11: 0x120b, + 0xb12: 0x083f, 0xb13: 0x120f, 0xb14: 0x1213, 0xb15: 0x1217, 0xb16: 0x121f, 0xb17: 0x17cd, + 0xb18: 0x121b, 0xb19: 0x1223, 0xb1a: 0x1237, 0xb1b: 0x123b, 0xb1c: 0x1227, 0xb1d: 0x123f, + 0xb1e: 0x1253, 0xb1f: 0x1267, 0xb20: 0x1233, 0xb21: 0x1247, 0xb22: 0x124b, 0xb23: 0x124f, + 0xb24: 0x17d2, 0xb25: 0x17dc, 0xb26: 0x17d7, 0xb27: 0x066f, 0xb28: 0x126f, 0xb29: 0x1273, + 0xb2a: 0x127b, 0xb2b: 0x17f0, 0xb2c: 0x127f, 0xb2d: 0x17e1, 0xb2e: 0x0673, 0xb2f: 0x0677, + 0xb30: 0x17e6, 0xb31: 0x17eb, 0xb32: 0x067b, 0xb33: 0x129f, 0xb34: 0x12a3, 0xb35: 0x12a7, + 0xb36: 0x12ab, 0xb37: 0x12b7, 0xb38: 0x12b3, 0xb39: 0x12bf, 0xb3a: 0x12bb, 0xb3b: 0x12cb, + 0xb3c: 0x12c3, 0xb3d: 0x12c7, 0xb3e: 0x12cf, 0xb3f: 0x067f, // Block 0x2d, offset 0xb40 - 0xb40: 0x1533, 0xb41: 0x1845, 0xb42: 0x154b, 0xb43: 0x06a7, 0xb44: 0x155b, 0xb45: 0x1567, - 0xb46: 0x156f, 0xb47: 0x1577, 0xb48: 0x06ab, 0xb49: 0x184a, 0xb4a: 0x158b, 0xb4b: 0x15a7, - 0xb4c: 0x15b3, 0xb4d: 0x06af, 0xb4e: 0x06b3, 0xb4f: 0x15b7, 0xb50: 0x184f, 0xb51: 0x06b7, - 0xb52: 0x1854, 0xb53: 0x1859, 0xb54: 0x185e, 0xb55: 0x15db, 0xb56: 0x06bb, 0xb57: 0x15ef, - 0xb58: 0x15f7, 0xb59: 0x15fb, 0xb5a: 0x1603, 0xb5b: 0x160b, 0xb5c: 0x1613, 0xb5d: 0x1868, + 0xb40: 0x12d7, 0xb41: 0x12db, 0xb42: 0x0683, 0xb43: 0x12eb, 0xb44: 0x12ef, 0xb45: 0x17f5, + 0xb46: 0x12fb, 0xb47: 0x12ff, 0xb48: 0x0687, 0xb49: 0x130b, 0xb4a: 0x05bb, 0xb4b: 0x17fa, + 0xb4c: 0x17ff, 0xb4d: 0x068b, 0xb4e: 0x068f, 0xb4f: 0x1337, 0xb50: 0x134f, 0xb51: 0x136b, + 0xb52: 0x137b, 0xb53: 0x1804, 0xb54: 0x138f, 0xb55: 0x1393, 0xb56: 0x13ab, 0xb57: 0x13b7, + 0xb58: 0x180e, 0xb59: 0x1660, 0xb5a: 0x13c3, 0xb5b: 0x13bf, 0xb5c: 0x13cb, 0xb5d: 0x1665, + 0xb5e: 0x13d7, 0xb5f: 0x13e3, 0xb60: 0x1813, 0xb61: 0x1818, 0xb62: 0x1423, 0xb63: 0x142f, + 0xb64: 0x1437, 0xb65: 0x181d, 0xb66: 0x143b, 0xb67: 0x1467, 0xb68: 0x1473, 0xb69: 0x1477, + 0xb6a: 0x146f, 0xb6b: 0x1483, 0xb6c: 0x1487, 0xb6d: 0x1822, 0xb6e: 0x1493, 0xb6f: 0x0693, + 0xb70: 0x149b, 0xb71: 0x1827, 0xb72: 0x0697, 0xb73: 0x14d3, 0xb74: 0x0ac3, 0xb75: 0x14eb, + 0xb76: 0x182c, 0xb77: 0x1836, 0xb78: 0x069b, 0xb79: 0x069f, 0xb7a: 0x1513, 0xb7b: 0x183b, + 0xb7c: 0x06a3, 0xb7d: 0x1840, 0xb7e: 0x152b, 0xb7f: 0x152b, + // Block 0x2e, offset 0xb80 + 0xb80: 0x1533, 0xb81: 0x1845, 0xb82: 0x154b, 0xb83: 0x06a7, 0xb84: 0x155b, 0xb85: 0x1567, + 0xb86: 0x156f, 0xb87: 0x1577, 0xb88: 0x06ab, 0xb89: 0x184a, 0xb8a: 0x158b, 0xb8b: 0x15a7, + 0xb8c: 0x15b3, 0xb8d: 0x06af, 0xb8e: 0x06b3, 0xb8f: 0x15b7, 0xb90: 0x184f, 0xb91: 0x06b7, + 0xb92: 0x1854, 0xb93: 0x1859, 0xb94: 0x185e, 0xb95: 0x15db, 0xb96: 0x06bb, 0xb97: 0x15ef, + 0xb98: 0x15f7, 0xb99: 0x15fb, 0xb9a: 0x1603, 0xb9b: 0x160b, 0xb9c: 0x1613, 0xb9d: 0x1868, } // nfcIndex: 22 blocks, 1408 entries, 1408 bytes @@ -3417,33 +3429,33 @@ var nfcIndex = [1408]uint8{ // Block 0x1, offset 0x40 // Block 0x2, offset 0x80 // Block 0x3, offset 0xc0 - 0xc2: 0x2c, 0xc3: 0x01, 0xc4: 0x02, 0xc5: 0x03, 0xc6: 0x2d, 0xc7: 0x04, - 0xc8: 0x05, 0xca: 0x2e, 0xcb: 0x2f, 0xcc: 0x06, 0xcd: 0x07, 0xce: 0x08, 0xcf: 0x30, - 0xd0: 0x09, 0xd1: 0x31, 0xd2: 0x32, 0xd3: 0x0a, 0xd6: 0x0b, 0xd7: 0x33, - 0xd8: 0x34, 0xd9: 0x0c, 0xdb: 0x35, 0xdc: 0x36, 0xdd: 0x37, 0xdf: 0x38, + 0xc2: 0x2d, 0xc3: 0x01, 0xc4: 0x02, 0xc5: 0x03, 0xc6: 0x2e, 0xc7: 0x04, + 0xc8: 0x05, 0xca: 0x2f, 0xcb: 0x30, 0xcc: 0x06, 0xcd: 0x07, 0xce: 0x08, 0xcf: 0x31, + 0xd0: 0x09, 0xd1: 0x32, 0xd2: 0x33, 0xd3: 0x0a, 0xd6: 0x0b, 0xd7: 0x34, + 0xd8: 0x35, 0xd9: 0x0c, 0xdb: 0x36, 0xdc: 0x37, 0xdd: 0x38, 0xdf: 0x39, 0xe0: 0x02, 0xe1: 0x03, 0xe2: 0x04, 0xe3: 0x05, 0xea: 0x06, 0xeb: 0x07, 0xec: 0x08, 0xed: 0x09, 0xef: 0x0a, 0xf0: 0x13, // Block 0x4, offset 0x100 - 0x120: 0x39, 0x121: 0x3a, 0x123: 0x3b, 0x124: 0x3c, 0x125: 0x3d, 0x126: 0x3e, 0x127: 0x3f, - 0x128: 0x40, 0x129: 0x41, 0x12a: 0x42, 0x12b: 0x43, 0x12c: 0x3e, 0x12d: 0x44, 0x12e: 0x45, 0x12f: 0x46, - 0x131: 0x47, 0x132: 0x48, 0x133: 0x49, 0x134: 0x4a, 0x135: 0x4b, 0x137: 0x4c, - 0x138: 0x4d, 0x139: 0x4e, 0x13a: 0x4f, 0x13b: 0x50, 0x13c: 0x51, 0x13d: 0x52, 0x13e: 0x53, 0x13f: 0x54, + 0x120: 0x3a, 0x121: 0x3b, 0x123: 0x3c, 0x124: 0x3d, 0x125: 0x3e, 0x126: 0x3f, 0x127: 0x40, + 0x128: 0x41, 0x129: 0x42, 0x12a: 0x43, 0x12b: 0x44, 0x12c: 0x3f, 0x12d: 0x45, 0x12e: 0x46, 0x12f: 0x47, + 0x131: 0x48, 0x132: 0x49, 0x133: 0x4a, 0x134: 0x4b, 0x135: 0x4c, 0x137: 0x4d, + 0x138: 0x4e, 0x139: 0x4f, 0x13a: 0x50, 0x13b: 0x51, 0x13c: 0x52, 0x13d: 0x53, 0x13e: 0x54, 0x13f: 0x55, // Block 0x5, offset 0x140 - 0x140: 0x55, 0x142: 0x56, 0x144: 0x57, 0x145: 0x58, 0x146: 0x59, 0x147: 0x5a, - 0x14d: 0x5b, - 0x15c: 0x5c, 0x15f: 0x5d, - 0x162: 0x5e, 0x164: 0x5f, - 0x168: 0x60, 0x169: 0x61, 0x16a: 0x62, 0x16c: 0x0d, 0x16d: 0x63, 0x16e: 0x64, 0x16f: 0x65, - 0x170: 0x66, 0x173: 0x67, 0x177: 0x68, - 0x178: 0x0e, 0x179: 0x0f, 0x17a: 0x10, 0x17b: 0x11, 0x17c: 0x12, 0x17d: 0x13, 0x17e: 0x14, 0x17f: 0x15, + 0x140: 0x56, 0x142: 0x57, 0x144: 0x58, 0x145: 0x59, 0x146: 0x5a, 0x147: 0x5b, + 0x14d: 0x5c, + 0x15c: 0x5d, 0x15f: 0x5e, + 0x162: 0x5f, 0x164: 0x60, + 0x168: 0x61, 0x169: 0x62, 0x16a: 0x63, 0x16c: 0x0d, 0x16d: 0x64, 0x16e: 0x65, 0x16f: 0x66, + 0x170: 0x67, 0x173: 0x68, 0x177: 0x0e, + 0x178: 0x0f, 0x179: 0x10, 0x17a: 0x11, 0x17b: 0x12, 0x17c: 0x13, 0x17d: 0x14, 0x17e: 0x15, 0x17f: 0x16, // Block 0x6, offset 0x180 0x180: 0x69, 0x183: 0x6a, 0x184: 0x6b, 0x186: 0x6c, 0x187: 0x6d, - 0x188: 0x6e, 0x189: 0x16, 0x18a: 0x17, 0x18b: 0x6f, 0x18c: 0x70, + 0x188: 0x6e, 0x189: 0x17, 0x18a: 0x18, 0x18b: 0x6f, 0x18c: 0x70, 0x1ab: 0x71, 0x1b3: 0x72, 0x1b5: 0x73, 0x1b7: 0x74, // Block 0x7, offset 0x1c0 - 0x1c0: 0x75, 0x1c1: 0x18, 0x1c2: 0x19, 0x1c3: 0x1a, 0x1c4: 0x76, 0x1c5: 0x77, + 0x1c0: 0x75, 0x1c1: 0x19, 0x1c2: 0x1a, 0x1c3: 0x1b, 0x1c4: 0x76, 0x1c5: 0x77, 0x1c9: 0x78, 0x1cc: 0x79, 0x1cd: 0x7a, // Block 0x8, offset 0x200 0x219: 0x7b, 0x21a: 0x7c, 0x21b: 0x7d, @@ -3475,8 +3487,8 @@ var nfcIndex = [1408]uint8{ 0x2d0: 0x8d, 0x2d1: 0x87, 0x2d2: 0x88, 0x2d3: 0x89, 0x2d4: 0x8a, 0x2d5: 0x8b, 0x2d6: 0x8c, 0x2d7: 0x8d, 0x2d8: 0x87, 0x2d9: 0x88, 0x2da: 0x89, 0x2db: 0x8a, 0x2dc: 0x8b, 0x2dd: 0x8c, 0x2de: 0x8e, // Block 0xc, offset 0x300 - 0x324: 0x1b, 0x325: 0x1c, 0x326: 0x1d, 0x327: 0x1e, - 0x328: 0x1f, 0x329: 0x20, 0x32a: 0x21, 0x32b: 0x22, 0x32c: 0x8f, 0x32d: 0x90, 0x32e: 0x91, + 0x324: 0x1c, 0x325: 0x1d, 0x326: 0x1e, 0x327: 0x1f, + 0x328: 0x20, 0x329: 0x21, 0x32a: 0x22, 0x32b: 0x23, 0x32c: 0x8f, 0x32d: 0x90, 0x32e: 0x91, 0x331: 0x92, 0x332: 0x93, 0x333: 0x94, 0x334: 0x95, 0x338: 0x96, 0x339: 0x97, 0x33a: 0x98, 0x33b: 0x99, 0x33e: 0x9a, 0x33f: 0x9b, // Block 0xd, offset 0x340 @@ -3485,36 +3497,37 @@ var nfcIndex = [1408]uint8{ 0x368: 0x9f, 0x36b: 0xa0, // Block 0xe, offset 0x380 0x381: 0xa1, 0x382: 0xa2, 0x384: 0xa3, 0x385: 0x82, 0x387: 0xa4, - 0x388: 0xa5, 0x38b: 0xa6, 0x38c: 0x3e, 0x38d: 0xa7, + 0x388: 0xa5, 0x38b: 0xa6, 0x38c: 0x3f, 0x38d: 0xa7, 0x391: 0xa8, 0x392: 0xa9, 0x393: 0xaa, 0x396: 0xab, 0x397: 0xac, 0x398: 0x73, 0x39a: 0xad, 0x39c: 0xae, - 0x3b0: 0x73, + 0x3a8: 0xaf, 0x3a9: 0xb0, 0x3aa: 0xb1, + 0x3b0: 0x73, 0x3b5: 0xb2, // Block 0xf, offset 0x3c0 - 0x3eb: 0xaf, 0x3ec: 0xb0, + 0x3eb: 0xb3, 0x3ec: 0xb4, // Block 0x10, offset 0x400 - 0x432: 0xb1, + 0x432: 0xb5, // Block 0x11, offset 0x440 - 0x445: 0xb2, 0x446: 0xb3, 0x447: 0xb4, - 0x449: 0xb5, + 0x445: 0xb6, 0x446: 0xb7, 0x447: 0xb8, + 0x449: 0xb9, // Block 0x12, offset 0x480 - 0x480: 0xb6, - 0x4a3: 0xb7, 0x4a5: 0xb8, + 0x480: 0xba, + 0x4a3: 0xbb, 0x4a5: 0xbc, // Block 0x13, offset 0x4c0 - 0x4c8: 0xb9, + 0x4c8: 0xbd, // Block 0x14, offset 0x500 - 0x520: 0x23, 0x521: 0x24, 0x522: 0x25, 0x523: 0x26, 0x524: 0x27, 0x525: 0x28, 0x526: 0x29, 0x527: 0x2a, - 0x528: 0x2b, + 0x520: 0x24, 0x521: 0x25, 0x522: 0x26, 0x523: 0x27, 0x524: 0x28, 0x525: 0x29, 0x526: 0x2a, 0x527: 0x2b, + 0x528: 0x2c, // Block 0x15, offset 0x540 0x550: 0x0b, 0x551: 0x0c, 0x556: 0x0d, 0x55b: 0x0e, 0x55d: 0x0f, 0x55e: 0x10, 0x55f: 0x11, 0x56f: 0x12, } -// nfcSparseOffset: 142 entries, 284 bytes -var nfcSparseOffset = []uint16{0x0, 0x5, 0x9, 0xb, 0xd, 0x18, 0x28, 0x2a, 0x2f, 0x3a, 0x49, 0x56, 0x5e, 0x62, 0x67, 0x69, 0x7a, 0x82, 0x89, 0x8c, 0x93, 0x97, 0x9b, 0x9d, 0x9f, 0xa8, 0xac, 0xb3, 0xb8, 0xbb, 0xc5, 0xc7, 0xce, 0xd6, 0xd9, 0xdb, 0xdd, 0xdf, 0xe4, 0xf5, 0x101, 0x103, 0x109, 0x10b, 0x10d, 0x10f, 0x111, 0x113, 0x115, 0x118, 0x11b, 0x11d, 0x120, 0x123, 0x127, 0x12c, 0x135, 0x137, 0x13a, 0x13c, 0x147, 0x157, 0x15b, 0x169, 0x16c, 0x172, 0x178, 0x183, 0x187, 0x189, 0x18b, 0x18d, 0x18f, 0x191, 0x197, 0x19b, 0x19d, 0x19f, 0x1a7, 0x1ab, 0x1ae, 0x1b0, 0x1b2, 0x1b4, 0x1b7, 0x1b9, 0x1bb, 0x1bd, 0x1bf, 0x1c5, 0x1c8, 0x1ca, 0x1d1, 0x1d7, 0x1dd, 0x1e5, 0x1eb, 0x1f1, 0x1f7, 0x1fb, 0x209, 0x212, 0x215, 0x218, 0x21a, 0x21d, 0x21f, 0x223, 0x228, 0x22a, 0x22c, 0x231, 0x237, 0x239, 0x23b, 0x23d, 0x243, 0x246, 0x249, 0x251, 0x258, 0x25b, 0x25e, 0x260, 0x268, 0x26b, 0x272, 0x275, 0x27b, 0x27d, 0x280, 0x282, 0x284, 0x286, 0x288, 0x295, 0x29f, 0x2a1, 0x2a3, 0x2a9, 0x2ab, 0x2ae} +// nfcSparseOffset: 145 entries, 290 bytes +var nfcSparseOffset = []uint16{0x0, 0x5, 0x9, 0xb, 0xd, 0x18, 0x28, 0x2a, 0x2f, 0x3a, 0x49, 0x56, 0x5e, 0x62, 0x67, 0x69, 0x7a, 0x82, 0x89, 0x8c, 0x93, 0x97, 0x9b, 0x9d, 0x9f, 0xa8, 0xac, 0xb3, 0xb8, 0xbb, 0xc5, 0xc8, 0xcf, 0xd7, 0xda, 0xdc, 0xde, 0xe0, 0xe5, 0xf6, 0x102, 0x104, 0x10a, 0x10c, 0x10e, 0x110, 0x112, 0x114, 0x116, 0x119, 0x11c, 0x11e, 0x121, 0x124, 0x128, 0x12d, 0x136, 0x138, 0x13b, 0x13d, 0x148, 0x14c, 0x15a, 0x15d, 0x163, 0x169, 0x174, 0x178, 0x17a, 0x17c, 0x17e, 0x180, 0x182, 0x188, 0x18c, 0x18e, 0x190, 0x198, 0x19c, 0x19f, 0x1a1, 0x1a3, 0x1a5, 0x1a8, 0x1aa, 0x1ac, 0x1ae, 0x1b0, 0x1b6, 0x1b9, 0x1bb, 0x1c2, 0x1c8, 0x1ce, 0x1d6, 0x1dc, 0x1e2, 0x1e8, 0x1ec, 0x1fa, 0x203, 0x206, 0x209, 0x20b, 0x20e, 0x210, 0x214, 0x219, 0x21b, 0x21d, 0x222, 0x228, 0x22a, 0x22c, 0x22e, 0x234, 0x237, 0x23a, 0x242, 0x249, 0x24c, 0x24f, 0x251, 0x259, 0x25c, 0x263, 0x266, 0x26c, 0x26e, 0x271, 0x273, 0x275, 0x277, 0x279, 0x27c, 0x27e, 0x280, 0x282, 0x28f, 0x299, 0x29b, 0x29d, 0x2a3, 0x2a5, 0x2a8} -// nfcSparseValues: 688 entries, 2752 bytes -var nfcSparseValues = [688]valueRange{ +// nfcSparseValues: 682 entries, 2728 bytes +var nfcSparseValues = [682]valueRange{ // Block 0x0, offset 0x0 {value: 0x0000, lo: 0x04}, {value: 0xa100, lo: 0xa8, hi: 0xa8}, @@ -3743,9 +3756,10 @@ var nfcSparseValues = [688]valueRange{ {value: 0x8104, lo: 0x8d, hi: 0x8d}, {value: 0x9900, lo: 0x95, hi: 0x96}, // Block 0x1e, offset 0xc5 - {value: 0x0000, lo: 0x01}, + {value: 0x0000, lo: 0x02}, + {value: 0x8104, lo: 0xbb, hi: 0xbc}, {value: 0x9900, lo: 0xbe, hi: 0xbe}, - // Block 0x1f, offset 0xc7 + // Block 0x1f, offset 0xc8 {value: 0x0000, lo: 0x06}, {value: 0xa000, lo: 0x86, hi: 0x87}, {value: 0x2cfe, lo: 0x8a, hi: 0x8a}, @@ -3753,7 +3767,7 @@ var nfcSparseValues = [688]valueRange{ {value: 0x2d06, lo: 0x8c, hi: 0x8c}, {value: 0x8104, lo: 0x8d, hi: 0x8d}, {value: 0x9900, lo: 0x97, hi: 0x97}, - // Block 0x20, offset 0xce + // Block 0x20, offset 0xcf {value: 0x6bea, lo: 0x07}, {value: 0x9904, lo: 0x8a, hi: 0x8a}, {value: 0x9900, lo: 0x8f, hi: 0x8f}, @@ -3762,26 +3776,26 @@ var nfcSparseValues = [688]valueRange{ {value: 0x2f58, lo: 0x9c, hi: 0x9c}, {value: 0x2de3, lo: 0x9d, hi: 0x9d}, {value: 0x2d16, lo: 0x9e, hi: 0x9f}, - // Block 0x21, offset 0xd6 + // Block 0x21, offset 0xd7 {value: 0x0000, lo: 0x02}, {value: 0x8122, lo: 0xb8, hi: 0xb9}, {value: 0x8104, lo: 0xba, hi: 0xba}, - // Block 0x22, offset 0xd9 + // Block 0x22, offset 0xda {value: 0x0000, lo: 0x01}, {value: 0x8123, lo: 0x88, hi: 0x8b}, - // Block 0x23, offset 0xdb + // Block 0x23, offset 0xdc {value: 0x0000, lo: 0x01}, {value: 0x8124, lo: 0xb8, hi: 0xb9}, - // Block 0x24, offset 0xdd + // Block 0x24, offset 0xde {value: 0x0000, lo: 0x01}, {value: 0x8125, lo: 0x88, hi: 0x8b}, - // Block 0x25, offset 0xdf + // Block 0x25, offset 0xe0 {value: 0x0000, lo: 0x04}, {value: 0x812d, lo: 0x98, hi: 0x99}, {value: 0x812d, lo: 0xb5, hi: 0xb5}, {value: 0x812d, lo: 0xb7, hi: 0xb7}, {value: 0x812b, lo: 0xb9, hi: 0xb9}, - // Block 0x26, offset 0xe4 + // Block 0x26, offset 0xe5 {value: 0x0000, lo: 0x10}, {value: 0x2644, lo: 0x83, hi: 0x83}, {value: 0x264b, lo: 0x8d, hi: 0x8d}, @@ -3799,7 +3813,7 @@ var nfcSparseValues = [688]valueRange{ {value: 0x45bc, lo: 0xb8, hi: 0xb8}, {value: 0x8200, lo: 0xb9, hi: 0xb9}, {value: 0x8127, lo: 0xba, hi: 0xbd}, - // Block 0x27, offset 0xf5 + // Block 0x27, offset 0xf6 {value: 0x0000, lo: 0x0b}, {value: 0x8127, lo: 0x80, hi: 0x80}, {value: 0x4a96, lo: 0x81, hi: 0x81}, @@ -3812,65 +3826,65 @@ var nfcSparseValues = [688]valueRange{ {value: 0x2683, lo: 0xa7, hi: 0xa7}, {value: 0x268a, lo: 0xac, hi: 0xac}, {value: 0x2667, lo: 0xb9, hi: 0xb9}, - // Block 0x28, offset 0x101 + // Block 0x28, offset 0x102 {value: 0x0000, lo: 0x01}, {value: 0x812d, lo: 0x86, hi: 0x86}, - // Block 0x29, offset 0x103 + // Block 0x29, offset 0x104 {value: 0x0000, lo: 0x05}, {value: 0xa000, lo: 0xa5, hi: 0xa5}, {value: 0x2d1e, lo: 0xa6, hi: 0xa6}, {value: 0x9900, lo: 0xae, hi: 0xae}, {value: 0x8102, lo: 0xb7, hi: 0xb7}, {value: 0x8104, lo: 0xb9, hi: 0xba}, - // Block 0x2a, offset 0x109 + // Block 0x2a, offset 0x10a {value: 0x0000, lo: 0x01}, {value: 0x812d, lo: 0x8d, hi: 0x8d}, - // Block 0x2b, offset 0x10b + // Block 0x2b, offset 0x10c {value: 0x0000, lo: 0x01}, {value: 0xa000, lo: 0x80, hi: 0x92}, - // Block 0x2c, offset 0x10d + // Block 0x2c, offset 0x10e {value: 0x0000, lo: 0x01}, {value: 0xb900, lo: 0xa1, hi: 0xb5}, - // Block 0x2d, offset 0x10f + // Block 0x2d, offset 0x110 {value: 0x0000, lo: 0x01}, {value: 0x9900, lo: 0xa8, hi: 0xbf}, - // Block 0x2e, offset 0x111 + // Block 0x2e, offset 0x112 {value: 0x0000, lo: 0x01}, {value: 0x9900, lo: 0x80, hi: 0x82}, - // Block 0x2f, offset 0x113 + // Block 0x2f, offset 0x114 {value: 0x0000, lo: 0x01}, {value: 0x8132, lo: 0x9d, hi: 0x9f}, - // Block 0x30, offset 0x115 + // Block 0x30, offset 0x116 {value: 0x0000, lo: 0x02}, {value: 0x8104, lo: 0x94, hi: 0x94}, {value: 0x8104, lo: 0xb4, hi: 0xb4}, - // Block 0x31, offset 0x118 + // Block 0x31, offset 0x119 {value: 0x0000, lo: 0x02}, {value: 0x8104, lo: 0x92, hi: 0x92}, {value: 0x8132, lo: 0x9d, hi: 0x9d}, - // Block 0x32, offset 0x11b + // Block 0x32, offset 0x11c {value: 0x0000, lo: 0x01}, {value: 0x8131, lo: 0xa9, hi: 0xa9}, - // Block 0x33, offset 0x11d + // Block 0x33, offset 0x11e {value: 0x0004, lo: 0x02}, {value: 0x812e, lo: 0xb9, hi: 0xba}, {value: 0x812d, lo: 0xbb, hi: 0xbb}, - // Block 0x34, offset 0x120 + // Block 0x34, offset 0x121 {value: 0x0000, lo: 0x02}, {value: 0x8132, lo: 0x97, hi: 0x97}, {value: 0x812d, lo: 0x98, hi: 0x98}, - // Block 0x35, offset 0x123 + // Block 0x35, offset 0x124 {value: 0x0000, lo: 0x03}, {value: 0x8104, lo: 0xa0, hi: 0xa0}, {value: 0x8132, lo: 0xb5, hi: 0xbc}, {value: 0x812d, lo: 0xbf, hi: 0xbf}, - // Block 0x36, offset 0x127 + // Block 0x36, offset 0x128 {value: 0x0000, lo: 0x04}, {value: 0x8132, lo: 0xb0, hi: 0xb4}, {value: 0x812d, lo: 0xb5, hi: 0xba}, {value: 0x8132, lo: 0xbb, hi: 0xbc}, {value: 0x812d, lo: 0xbd, hi: 0xbd}, - // Block 0x37, offset 0x12c + // Block 0x37, offset 0x12d {value: 0x0000, lo: 0x08}, {value: 0x2d66, lo: 0x80, hi: 0x80}, {value: 0x2d6e, lo: 0x81, hi: 0x81}, @@ -3880,17 +3894,17 @@ var nfcSparseValues = [688]valueRange{ {value: 0x8132, lo: 0xab, hi: 0xab}, {value: 0x812d, lo: 0xac, hi: 0xac}, {value: 0x8132, lo: 0xad, hi: 0xb3}, - // Block 0x38, offset 0x135 + // Block 0x38, offset 0x136 {value: 0x0000, lo: 0x01}, {value: 0x8104, lo: 0xaa, hi: 0xab}, - // Block 0x39, offset 0x137 + // Block 0x39, offset 0x138 {value: 0x0000, lo: 0x02}, {value: 0x8102, lo: 0xa6, hi: 0xa6}, {value: 0x8104, lo: 0xb2, hi: 0xb3}, - // Block 0x3a, offset 0x13a + // Block 0x3a, offset 0x13b {value: 0x0000, lo: 0x01}, {value: 0x8102, lo: 0xb7, hi: 0xb7}, - // Block 0x3b, offset 0x13c + // Block 0x3b, offset 0x13d {value: 0x0000, lo: 0x0a}, {value: 0x8132, lo: 0x90, hi: 0x92}, {value: 0x8101, lo: 0x94, hi: 0x94}, @@ -3902,29 +3916,12 @@ var nfcSparseValues = [688]valueRange{ {value: 0x812d, lo: 0xad, hi: 0xad}, {value: 0x8132, lo: 0xb4, hi: 0xb4}, {value: 0x8132, lo: 0xb8, hi: 0xb9}, - // Block 0x3c, offset 0x147 - {value: 0x0000, lo: 0x0f}, - {value: 0x8132, lo: 0x80, hi: 0x81}, - {value: 0x812d, lo: 0x82, hi: 0x82}, - {value: 0x8132, lo: 0x83, hi: 0x89}, - {value: 0x812d, lo: 0x8a, hi: 0x8a}, - {value: 0x8132, lo: 0x8b, hi: 0x8c}, - {value: 0x8135, lo: 0x8d, hi: 0x8d}, - {value: 0x812a, lo: 0x8e, hi: 0x8e}, - {value: 0x812d, lo: 0x8f, hi: 0x8f}, - {value: 0x8129, lo: 0x90, hi: 0x90}, - {value: 0x8132, lo: 0x91, hi: 0xb5}, - {value: 0x8132, lo: 0xbb, hi: 0xbb}, - {value: 0x8134, lo: 0xbc, hi: 0xbc}, - {value: 0x812d, lo: 0xbd, hi: 0xbd}, - {value: 0x8132, lo: 0xbe, hi: 0xbe}, - {value: 0x812d, lo: 0xbf, hi: 0xbf}, - // Block 0x3d, offset 0x157 + // Block 0x3c, offset 0x148 {value: 0x0004, lo: 0x03}, {value: 0x0433, lo: 0x80, hi: 0x81}, {value: 0x8100, lo: 0x97, hi: 0x97}, {value: 0x8100, lo: 0xbe, hi: 0xbe}, - // Block 0x3e, offset 0x15b + // Block 0x3d, offset 0x14c {value: 0x0000, lo: 0x0d}, {value: 0x8132, lo: 0x90, hi: 0x91}, {value: 0x8101, lo: 0x92, hi: 0x93}, @@ -3939,25 +3936,25 @@ var nfcSparseValues = [688]valueRange{ {value: 0x8101, lo: 0xaa, hi: 0xab}, {value: 0x812d, lo: 0xac, hi: 0xaf}, {value: 0x8132, lo: 0xb0, hi: 0xb0}, - // Block 0x3f, offset 0x169 + // Block 0x3e, offset 0x15a {value: 0x427b, lo: 0x02}, {value: 0x01b8, lo: 0xa6, hi: 0xa6}, {value: 0x0057, lo: 0xaa, hi: 0xab}, - // Block 0x40, offset 0x16c + // Block 0x3f, offset 0x15d {value: 0x0007, lo: 0x05}, {value: 0xa000, lo: 0x90, hi: 0x90}, {value: 0xa000, lo: 0x92, hi: 0x92}, {value: 0xa000, lo: 0x94, hi: 0x94}, {value: 0x3bb9, lo: 0x9a, hi: 0x9b}, {value: 0x3bc7, lo: 0xae, hi: 0xae}, - // Block 0x41, offset 0x172 + // Block 0x40, offset 0x163 {value: 0x000e, lo: 0x05}, {value: 0x3bce, lo: 0x8d, hi: 0x8e}, {value: 0x3bd5, lo: 0x8f, hi: 0x8f}, {value: 0xa000, lo: 0x90, hi: 0x90}, {value: 0xa000, lo: 0x92, hi: 0x92}, {value: 0xa000, lo: 0x94, hi: 0x94}, - // Block 0x42, offset 0x178 + // Block 0x41, offset 0x169 {value: 0x6408, lo: 0x0a}, {value: 0xa000, lo: 0x83, hi: 0x83}, {value: 0x3be3, lo: 0x84, hi: 0x84}, @@ -3969,45 +3966,45 @@ var nfcSparseValues = [688]valueRange{ {value: 0x3bf8, lo: 0xa4, hi: 0xa5}, {value: 0x3bff, lo: 0xa6, hi: 0xa6}, {value: 0xa000, lo: 0xbc, hi: 0xbc}, - // Block 0x43, offset 0x183 + // Block 0x42, offset 0x174 {value: 0x0007, lo: 0x03}, {value: 0x3c68, lo: 0xa0, hi: 0xa1}, {value: 0x3c92, lo: 0xa2, hi: 0xa3}, {value: 0x3cbc, lo: 0xaa, hi: 0xad}, - // Block 0x44, offset 0x187 + // Block 0x43, offset 0x178 {value: 0x0004, lo: 0x01}, {value: 0x048b, lo: 0xa9, hi: 0xaa}, - // Block 0x45, offset 0x189 + // Block 0x44, offset 0x17a {value: 0x0000, lo: 0x01}, {value: 0x44dd, lo: 0x9c, hi: 0x9c}, - // Block 0x46, offset 0x18b + // Block 0x45, offset 0x17c {value: 0x0000, lo: 0x01}, {value: 0x8132, lo: 0xaf, hi: 0xb1}, - // Block 0x47, offset 0x18d + // Block 0x46, offset 0x17e {value: 0x0000, lo: 0x01}, {value: 0x8104, lo: 0xbf, hi: 0xbf}, - // Block 0x48, offset 0x18f + // Block 0x47, offset 0x180 {value: 0x0000, lo: 0x01}, {value: 0x8132, lo: 0xa0, hi: 0xbf}, - // Block 0x49, offset 0x191 + // Block 0x48, offset 0x182 {value: 0x0000, lo: 0x05}, {value: 0x812c, lo: 0xaa, hi: 0xaa}, {value: 0x8131, lo: 0xab, hi: 0xab}, {value: 0x8133, lo: 0xac, hi: 0xac}, {value: 0x812e, lo: 0xad, hi: 0xad}, {value: 0x812f, lo: 0xae, hi: 0xaf}, - // Block 0x4a, offset 0x197 + // Block 0x49, offset 0x188 {value: 0x0000, lo: 0x03}, {value: 0x4a9f, lo: 0xb3, hi: 0xb3}, {value: 0x4a9f, lo: 0xb5, hi: 0xb6}, {value: 0x4a9f, lo: 0xba, hi: 0xbf}, - // Block 0x4b, offset 0x19b + // Block 0x4a, offset 0x18c {value: 0x0000, lo: 0x01}, {value: 0x4a9f, lo: 0x8f, hi: 0xa3}, - // Block 0x4c, offset 0x19d + // Block 0x4b, offset 0x18e {value: 0x0000, lo: 0x01}, {value: 0x8100, lo: 0xae, hi: 0xbe}, - // Block 0x4d, offset 0x19f + // Block 0x4c, offset 0x190 {value: 0x0000, lo: 0x07}, {value: 0x8100, lo: 0x84, hi: 0x84}, {value: 0x8100, lo: 0x87, hi: 0x87}, @@ -4016,55 +4013,55 @@ var nfcSparseValues = [688]valueRange{ {value: 0x8100, lo: 0xa1, hi: 0xa1}, {value: 0x8100, lo: 0xb2, hi: 0xb2}, {value: 0x8100, lo: 0xbb, hi: 0xbb}, - // Block 0x4e, offset 0x1a7 + // Block 0x4d, offset 0x198 {value: 0x0000, lo: 0x03}, {value: 0x8100, lo: 0x80, hi: 0x80}, {value: 0x8100, lo: 0x8b, hi: 0x8b}, {value: 0x8100, lo: 0x8e, hi: 0x8e}, - // Block 0x4f, offset 0x1ab + // Block 0x4e, offset 0x19c {value: 0x0000, lo: 0x02}, {value: 0x8132, lo: 0xaf, hi: 0xaf}, {value: 0x8132, lo: 0xb4, hi: 0xbd}, - // Block 0x50, offset 0x1ae + // Block 0x4f, offset 0x19f {value: 0x0000, lo: 0x01}, {value: 0x8132, lo: 0x9e, hi: 0x9f}, - // Block 0x51, offset 0x1b0 + // Block 0x50, offset 0x1a1 {value: 0x0000, lo: 0x01}, {value: 0x8132, lo: 0xb0, hi: 0xb1}, - // Block 0x52, offset 0x1b2 + // Block 0x51, offset 0x1a3 {value: 0x0000, lo: 0x01}, {value: 0x8104, lo: 0x86, hi: 0x86}, - // Block 0x53, offset 0x1b4 + // Block 0x52, offset 0x1a5 {value: 0x0000, lo: 0x02}, {value: 0x8104, lo: 0x84, hi: 0x84}, {value: 0x8132, lo: 0xa0, hi: 0xb1}, - // Block 0x54, offset 0x1b7 + // Block 0x53, offset 0x1a8 {value: 0x0000, lo: 0x01}, {value: 0x812d, lo: 0xab, hi: 0xad}, - // Block 0x55, offset 0x1b9 + // Block 0x54, offset 0x1aa {value: 0x0000, lo: 0x01}, {value: 0x8104, lo: 0x93, hi: 0x93}, - // Block 0x56, offset 0x1bb + // Block 0x55, offset 0x1ac {value: 0x0000, lo: 0x01}, {value: 0x8102, lo: 0xb3, hi: 0xb3}, - // Block 0x57, offset 0x1bd + // Block 0x56, offset 0x1ae {value: 0x0000, lo: 0x01}, {value: 0x8104, lo: 0x80, hi: 0x80}, - // Block 0x58, offset 0x1bf + // Block 0x57, offset 0x1b0 {value: 0x0000, lo: 0x05}, {value: 0x8132, lo: 0xb0, hi: 0xb0}, {value: 0x8132, lo: 0xb2, hi: 0xb3}, {value: 0x812d, lo: 0xb4, hi: 0xb4}, {value: 0x8132, lo: 0xb7, hi: 0xb8}, {value: 0x8132, lo: 0xbe, hi: 0xbf}, - // Block 0x59, offset 0x1c5 + // Block 0x58, offset 0x1b6 {value: 0x0000, lo: 0x02}, {value: 0x8132, lo: 0x81, hi: 0x81}, {value: 0x8104, lo: 0xb6, hi: 0xb6}, - // Block 0x5a, offset 0x1c8 + // Block 0x59, offset 0x1b9 {value: 0x0000, lo: 0x01}, {value: 0x8104, lo: 0xad, hi: 0xad}, - // Block 0x5b, offset 0x1ca + // Block 0x5a, offset 0x1bb {value: 0x0000, lo: 0x06}, {value: 0xe500, lo: 0x80, hi: 0x80}, {value: 0xc600, lo: 0x81, hi: 0x9b}, @@ -4072,21 +4069,21 @@ var nfcSparseValues = [688]valueRange{ {value: 0xc600, lo: 0x9d, hi: 0xb7}, {value: 0xe500, lo: 0xb8, hi: 0xb8}, {value: 0xc600, lo: 0xb9, hi: 0xbf}, - // Block 0x5c, offset 0x1d1 + // Block 0x5b, offset 0x1c2 {value: 0x0000, lo: 0x05}, {value: 0xc600, lo: 0x80, hi: 0x93}, {value: 0xe500, lo: 0x94, hi: 0x94}, {value: 0xc600, lo: 0x95, hi: 0xaf}, {value: 0xe500, lo: 0xb0, hi: 0xb0}, {value: 0xc600, lo: 0xb1, hi: 0xbf}, - // Block 0x5d, offset 0x1d7 + // Block 0x5c, offset 0x1c8 {value: 0x0000, lo: 0x05}, {value: 0xc600, lo: 0x80, hi: 0x8b}, {value: 0xe500, lo: 0x8c, hi: 0x8c}, {value: 0xc600, lo: 0x8d, hi: 0xa7}, {value: 0xe500, lo: 0xa8, hi: 0xa8}, {value: 0xc600, lo: 0xa9, hi: 0xbf}, - // Block 0x5e, offset 0x1dd + // Block 0x5d, offset 0x1ce {value: 0x0000, lo: 0x07}, {value: 0xc600, lo: 0x80, hi: 0x83}, {value: 0xe500, lo: 0x84, hi: 0x84}, @@ -4095,33 +4092,33 @@ var nfcSparseValues = [688]valueRange{ {value: 0xc600, lo: 0xa1, hi: 0xbb}, {value: 0xe500, lo: 0xbc, hi: 0xbc}, {value: 0xc600, lo: 0xbd, hi: 0xbf}, - // Block 0x5f, offset 0x1e5 + // Block 0x5e, offset 0x1d6 {value: 0x0000, lo: 0x05}, {value: 0xc600, lo: 0x80, hi: 0x97}, {value: 0xe500, lo: 0x98, hi: 0x98}, {value: 0xc600, lo: 0x99, hi: 0xb3}, {value: 0xe500, lo: 0xb4, hi: 0xb4}, {value: 0xc600, lo: 0xb5, hi: 0xbf}, - // Block 0x60, offset 0x1eb + // Block 0x5f, offset 0x1dc {value: 0x0000, lo: 0x05}, {value: 0xc600, lo: 0x80, hi: 0x8f}, {value: 0xe500, lo: 0x90, hi: 0x90}, {value: 0xc600, lo: 0x91, hi: 0xab}, {value: 0xe500, lo: 0xac, hi: 0xac}, {value: 0xc600, lo: 0xad, hi: 0xbf}, - // Block 0x61, offset 0x1f1 + // Block 0x60, offset 0x1e2 {value: 0x0000, lo: 0x05}, {value: 0xc600, lo: 0x80, hi: 0x87}, {value: 0xe500, lo: 0x88, hi: 0x88}, {value: 0xc600, lo: 0x89, hi: 0xa3}, {value: 0xe500, lo: 0xa4, hi: 0xa4}, {value: 0xc600, lo: 0xa5, hi: 0xbf}, - // Block 0x62, offset 0x1f7 + // Block 0x61, offset 0x1e8 {value: 0x0000, lo: 0x03}, {value: 0xc600, lo: 0x80, hi: 0x87}, {value: 0xe500, lo: 0x88, hi: 0x88}, {value: 0xc600, lo: 0x89, hi: 0xa3}, - // Block 0x63, offset 0x1fb + // Block 0x62, offset 0x1ec {value: 0x0006, lo: 0x0d}, {value: 0x4390, lo: 0x9d, hi: 0x9d}, {value: 0x8115, lo: 0x9e, hi: 0x9e}, @@ -4136,7 +4133,7 @@ var nfcSparseValues = [688]valueRange{ {value: 0x4396, lo: 0xb9, hi: 0xbb}, {value: 0x43ae, lo: 0xbc, hi: 0xbc}, {value: 0x43b4, lo: 0xbe, hi: 0xbe}, - // Block 0x64, offset 0x209 + // Block 0x63, offset 0x1fa {value: 0x0006, lo: 0x08}, {value: 0x43ba, lo: 0x80, hi: 0x81}, {value: 0x43c6, lo: 0x83, hi: 0x84}, @@ -4146,79 +4143,79 @@ var nfcSparseValues = [688]valueRange{ {value: 0x4360, lo: 0x8c, hi: 0x8c}, {value: 0x43a8, lo: 0x8d, hi: 0x8d}, {value: 0x43d2, lo: 0x8e, hi: 0x8e}, - // Block 0x65, offset 0x212 + // Block 0x64, offset 0x203 {value: 0x0000, lo: 0x02}, {value: 0x8100, lo: 0xa4, hi: 0xa5}, {value: 0x8100, lo: 0xb0, hi: 0xb1}, - // Block 0x66, offset 0x215 + // Block 0x65, offset 0x206 {value: 0x0000, lo: 0x02}, {value: 0x8100, lo: 0x9b, hi: 0x9d}, {value: 0x8200, lo: 0x9e, hi: 0xa3}, - // Block 0x67, offset 0x218 + // Block 0x66, offset 0x209 {value: 0x0000, lo: 0x01}, {value: 0x8100, lo: 0x90, hi: 0x90}, - // Block 0x68, offset 0x21a + // Block 0x67, offset 0x20b {value: 0x0000, lo: 0x02}, {value: 0x8100, lo: 0x99, hi: 0x99}, {value: 0x8200, lo: 0xb2, hi: 0xb4}, - // Block 0x69, offset 0x21d + // Block 0x68, offset 0x20e {value: 0x0000, lo: 0x01}, {value: 0x8100, lo: 0xbc, hi: 0xbd}, - // Block 0x6a, offset 0x21f + // Block 0x69, offset 0x210 {value: 0x0000, lo: 0x03}, {value: 0x8132, lo: 0xa0, hi: 0xa6}, {value: 0x812d, lo: 0xa7, hi: 0xad}, {value: 0x8132, lo: 0xae, hi: 0xaf}, - // Block 0x6b, offset 0x223 + // Block 0x6a, offset 0x214 {value: 0x0000, lo: 0x04}, {value: 0x8100, lo: 0x89, hi: 0x8c}, {value: 0x8100, lo: 0xb0, hi: 0xb2}, {value: 0x8100, lo: 0xb4, hi: 0xb4}, {value: 0x8100, lo: 0xb6, hi: 0xbf}, - // Block 0x6c, offset 0x228 + // Block 0x6b, offset 0x219 {value: 0x0000, lo: 0x01}, {value: 0x8100, lo: 0x81, hi: 0x8c}, - // Block 0x6d, offset 0x22a + // Block 0x6c, offset 0x21b {value: 0x0000, lo: 0x01}, {value: 0x8100, lo: 0xb5, hi: 0xba}, - // Block 0x6e, offset 0x22c + // Block 0x6d, offset 0x21d {value: 0x0000, lo: 0x04}, {value: 0x4a9f, lo: 0x9e, hi: 0x9f}, {value: 0x4a9f, lo: 0xa3, hi: 0xa3}, {value: 0x4a9f, lo: 0xa5, hi: 0xa6}, {value: 0x4a9f, lo: 0xaa, hi: 0xaf}, - // Block 0x6f, offset 0x231 + // Block 0x6e, offset 0x222 {value: 0x0000, lo: 0x05}, {value: 0x4a9f, lo: 0x82, hi: 0x87}, {value: 0x4a9f, lo: 0x8a, hi: 0x8f}, {value: 0x4a9f, lo: 0x92, hi: 0x97}, {value: 0x4a9f, lo: 0x9a, hi: 0x9c}, {value: 0x8100, lo: 0xa3, hi: 0xa3}, - // Block 0x70, offset 0x237 + // Block 0x6f, offset 0x228 {value: 0x0000, lo: 0x01}, {value: 0x812d, lo: 0xbd, hi: 0xbd}, - // Block 0x71, offset 0x239 + // Block 0x70, offset 0x22a {value: 0x0000, lo: 0x01}, {value: 0x812d, lo: 0xa0, hi: 0xa0}, - // Block 0x72, offset 0x23b + // Block 0x71, offset 0x22c {value: 0x0000, lo: 0x01}, {value: 0x8132, lo: 0xb6, hi: 0xba}, - // Block 0x73, offset 0x23d + // Block 0x72, offset 0x22e {value: 0x002c, lo: 0x05}, {value: 0x812d, lo: 0x8d, hi: 0x8d}, {value: 0x8132, lo: 0x8f, hi: 0x8f}, {value: 0x8132, lo: 0xb8, hi: 0xb8}, {value: 0x8101, lo: 0xb9, hi: 0xba}, {value: 0x8104, lo: 0xbf, hi: 0xbf}, - // Block 0x74, offset 0x243 + // Block 0x73, offset 0x234 {value: 0x0000, lo: 0x02}, {value: 0x8132, lo: 0xa5, hi: 0xa5}, {value: 0x812d, lo: 0xa6, hi: 0xa6}, - // Block 0x75, offset 0x246 + // Block 0x74, offset 0x237 {value: 0x0000, lo: 0x02}, {value: 0x8104, lo: 0x86, hi: 0x86}, {value: 0x8104, lo: 0xbf, hi: 0xbf}, - // Block 0x76, offset 0x249 + // Block 0x75, offset 0x23a {value: 0x17fe, lo: 0x07}, {value: 0xa000, lo: 0x99, hi: 0x99}, {value: 0x4238, lo: 0x9a, hi: 0x9a}, @@ -4227,7 +4224,7 @@ var nfcSparseValues = [688]valueRange{ {value: 0xa000, lo: 0xa5, hi: 0xa5}, {value: 0x424c, lo: 0xab, hi: 0xab}, {value: 0x8104, lo: 0xb9, hi: 0xba}, - // Block 0x77, offset 0x251 + // Block 0x76, offset 0x242 {value: 0x0000, lo: 0x06}, {value: 0x8132, lo: 0x80, hi: 0x82}, {value: 0x9900, lo: 0xa7, hi: 0xa7}, @@ -4235,18 +4232,18 @@ var nfcSparseValues = [688]valueRange{ {value: 0x2d88, lo: 0xaf, hi: 0xaf}, {value: 0xa000, lo: 0xb1, hi: 0xb2}, {value: 0x8104, lo: 0xb3, hi: 0xb4}, - // Block 0x78, offset 0x258 + // Block 0x77, offset 0x249 {value: 0x0000, lo: 0x02}, {value: 0x8104, lo: 0x80, hi: 0x80}, {value: 0x8102, lo: 0x8a, hi: 0x8a}, - // Block 0x79, offset 0x25b + // Block 0x78, offset 0x24c {value: 0x0000, lo: 0x02}, {value: 0x8104, lo: 0xb5, hi: 0xb5}, {value: 0x8102, lo: 0xb6, hi: 0xb6}, - // Block 0x7a, offset 0x25e + // Block 0x79, offset 0x24f {value: 0x0002, lo: 0x01}, {value: 0x8102, lo: 0xa9, hi: 0xaa}, - // Block 0x7b, offset 0x260 + // Block 0x7a, offset 0x251 {value: 0x0000, lo: 0x07}, {value: 0xa000, lo: 0x87, hi: 0x87}, {value: 0x2d92, lo: 0x8b, hi: 0x8b}, @@ -4255,11 +4252,11 @@ var nfcSparseValues = [688]valueRange{ {value: 0x9900, lo: 0x97, hi: 0x97}, {value: 0x8132, lo: 0xa6, hi: 0xac}, {value: 0x8132, lo: 0xb0, hi: 0xb4}, - // Block 0x7c, offset 0x268 + // Block 0x7b, offset 0x259 {value: 0x0000, lo: 0x02}, {value: 0x8104, lo: 0x82, hi: 0x82}, {value: 0x8102, lo: 0x86, hi: 0x86}, - // Block 0x7d, offset 0x26b + // Block 0x7c, offset 0x25c {value: 0x6b5a, lo: 0x06}, {value: 0x9900, lo: 0xb0, hi: 0xb0}, {value: 0xa000, lo: 0xb9, hi: 0xb9}, @@ -4267,37 +4264,50 @@ var nfcSparseValues = [688]valueRange{ {value: 0x2db0, lo: 0xbb, hi: 0xbb}, {value: 0x2da6, lo: 0xbc, hi: 0xbd}, {value: 0x2dba, lo: 0xbe, hi: 0xbe}, - // Block 0x7e, offset 0x272 + // Block 0x7d, offset 0x263 {value: 0x0000, lo: 0x02}, {value: 0x8104, lo: 0x82, hi: 0x82}, {value: 0x8102, lo: 0x83, hi: 0x83}, - // Block 0x7f, offset 0x275 + // Block 0x7e, offset 0x266 {value: 0x0000, lo: 0x05}, {value: 0x9900, lo: 0xaf, hi: 0xaf}, {value: 0xa000, lo: 0xb8, hi: 0xb9}, {value: 0x2dc4, lo: 0xba, hi: 0xba}, {value: 0x2dce, lo: 0xbb, hi: 0xbb}, {value: 0x8104, lo: 0xbf, hi: 0xbf}, - // Block 0x80, offset 0x27b + // Block 0x7f, offset 0x26c {value: 0x0000, lo: 0x01}, {value: 0x8102, lo: 0x80, hi: 0x80}, - // Block 0x81, offset 0x27d + // Block 0x80, offset 0x26e {value: 0x0000, lo: 0x02}, {value: 0x8104, lo: 0xb6, hi: 0xb6}, {value: 0x8102, lo: 0xb7, hi: 0xb7}, - // Block 0x82, offset 0x280 + // Block 0x81, offset 0x271 {value: 0x0000, lo: 0x01}, {value: 0x8104, lo: 0xab, hi: 0xab}, - // Block 0x83, offset 0x282 + // Block 0x82, offset 0x273 + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0xb4, hi: 0xb4}, + // Block 0x83, offset 0x275 + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0x87, hi: 0x87}, + // Block 0x84, offset 0x277 + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0x99, hi: 0x99}, + // Block 0x85, offset 0x279 + {value: 0x0000, lo: 0x02}, + {value: 0x8102, lo: 0x82, hi: 0x82}, + {value: 0x8104, lo: 0x84, hi: 0x85}, + // Block 0x86, offset 0x27c {value: 0x0000, lo: 0x01}, {value: 0x8101, lo: 0xb0, hi: 0xb4}, - // Block 0x84, offset 0x284 + // Block 0x87, offset 0x27e {value: 0x0000, lo: 0x01}, {value: 0x8132, lo: 0xb0, hi: 0xb6}, - // Block 0x85, offset 0x286 + // Block 0x88, offset 0x280 {value: 0x0000, lo: 0x01}, {value: 0x8101, lo: 0x9e, hi: 0x9e}, - // Block 0x86, offset 0x288 + // Block 0x89, offset 0x282 {value: 0x0000, lo: 0x0c}, {value: 0x45cc, lo: 0x9e, hi: 0x9e}, {value: 0x45d6, lo: 0x9f, hi: 0x9f}, @@ -4311,7 +4321,7 @@ var nfcSparseValues = [688]valueRange{ {value: 0x8130, lo: 0xad, hi: 0xad}, {value: 0x812b, lo: 0xae, hi: 0xb2}, {value: 0x812d, lo: 0xbb, hi: 0xbf}, - // Block 0x87, offset 0x295 + // Block 0x8a, offset 0x28f {value: 0x0000, lo: 0x09}, {value: 0x812d, lo: 0x80, hi: 0x82}, {value: 0x8132, lo: 0x85, hi: 0x89}, @@ -4322,27 +4332,27 @@ var nfcSparseValues = [688]valueRange{ {value: 0x4650, lo: 0xbd, hi: 0xbd}, {value: 0x466c, lo: 0xbe, hi: 0xbe}, {value: 0x465e, lo: 0xbf, hi: 0xbf}, - // Block 0x88, offset 0x29f + // Block 0x8b, offset 0x299 {value: 0x0000, lo: 0x01}, {value: 0x467a, lo: 0x80, hi: 0x80}, - // Block 0x89, offset 0x2a1 + // Block 0x8c, offset 0x29b {value: 0x0000, lo: 0x01}, {value: 0x8132, lo: 0x82, hi: 0x84}, - // Block 0x8a, offset 0x2a3 + // Block 0x8d, offset 0x29d {value: 0x0000, lo: 0x05}, {value: 0x8132, lo: 0x80, hi: 0x86}, {value: 0x8132, lo: 0x88, hi: 0x98}, {value: 0x8132, lo: 0x9b, hi: 0xa1}, {value: 0x8132, lo: 0xa3, hi: 0xa4}, {value: 0x8132, lo: 0xa6, hi: 0xaa}, - // Block 0x8b, offset 0x2a9 + // Block 0x8e, offset 0x2a3 {value: 0x0000, lo: 0x01}, {value: 0x812d, lo: 0x90, hi: 0x96}, - // Block 0x8c, offset 0x2ab + // Block 0x8f, offset 0x2a5 {value: 0x0000, lo: 0x02}, {value: 0x8132, lo: 0x84, hi: 0x89}, {value: 0x8102, lo: 0x8a, hi: 0x8a}, - // Block 0x8d, offset 0x2ae + // Block 0x90, offset 0x2a8 {value: 0x0000, lo: 0x01}, {value: 0x8100, lo: 0x93, hi: 0x93}, } @@ -4517,7 +4527,7 @@ func (t *nfkcTrie) lookupStringUnsafe(s string) uint16 { return 0 } -// nfkcTrie. Total size: 16994 bytes (16.60 KiB). Checksum: c3ed54ee046f3c46. +// nfkcTrie. Total size: 17104 bytes (16.70 KiB). Checksum: d985061cf5307b35. type nfkcTrie struct{} func newNfkcTrie(i int) *nfkcTrie { @@ -4527,17 +4537,17 @@ func newNfkcTrie(i int) *nfkcTrie { // lookupValue determines the type of block n and looks up the value for b. func (t *nfkcTrie) lookupValue(n uint32, b byte) uint16 { switch { - case n < 90: + case n < 91: return uint16(nfkcValues[n<<6+uint32(b)]) default: - n -= 90 + n -= 91 return uint16(nfkcSparse.lookup(n, b)) } } -// nfkcValues: 92 blocks, 5888 entries, 11776 bytes +// nfkcValues: 93 blocks, 5952 entries, 11904 bytes // The third block is the zero block. -var nfkcValues = [5888]uint16{ +var nfkcValues = [5952]uint16{ // Block 0x0, offset 0x0 0x3c: 0xa000, 0x3d: 0xa000, 0x3e: 0xa000, // Block 0x1, offset 0x40 @@ -4721,824 +4731,836 @@ var nfkcValues = [5888]uint16{ 0x4b6: 0x0152, 0x4b7: 0x0155, 0x4b8: 0x041f, 0x4b9: 0x0158, 0x4ba: 0x015b, 0x4bb: 0x00b5, 0x4bc: 0x015e, 0x4bd: 0x0161, 0x4be: 0x0164, 0x4bf: 0x01d0, // Block 0x13, offset 0x4c0 - 0x4c0: 0x2f97, 0x4c1: 0x32a3, 0x4c2: 0x2fa1, 0x4c3: 0x32ad, 0x4c4: 0x2fa6, 0x4c5: 0x32b2, - 0x4c6: 0x2fab, 0x4c7: 0x32b7, 0x4c8: 0x38cc, 0x4c9: 0x3a5b, 0x4ca: 0x2fc4, 0x4cb: 0x32d0, - 0x4cc: 0x2fce, 0x4cd: 0x32da, 0x4ce: 0x2fdd, 0x4cf: 0x32e9, 0x4d0: 0x2fd3, 0x4d1: 0x32df, - 0x4d2: 0x2fd8, 0x4d3: 0x32e4, 0x4d4: 0x38ef, 0x4d5: 0x3a7e, 0x4d6: 0x38f6, 0x4d7: 0x3a85, - 0x4d8: 0x3019, 0x4d9: 0x3325, 0x4da: 0x301e, 0x4db: 0x332a, 0x4dc: 0x3904, 0x4dd: 0x3a93, - 0x4de: 0x3023, 0x4df: 0x332f, 0x4e0: 0x3032, 0x4e1: 0x333e, 0x4e2: 0x3050, 0x4e3: 0x335c, - 0x4e4: 0x305f, 0x4e5: 0x336b, 0x4e6: 0x3055, 0x4e7: 0x3361, 0x4e8: 0x3064, 0x4e9: 0x3370, - 0x4ea: 0x3069, 0x4eb: 0x3375, 0x4ec: 0x30af, 0x4ed: 0x33bb, 0x4ee: 0x390b, 0x4ef: 0x3a9a, - 0x4f0: 0x30b9, 0x4f1: 0x33ca, 0x4f2: 0x30c3, 0x4f3: 0x33d4, 0x4f4: 0x30cd, 0x4f5: 0x33de, - 0x4f6: 0x46c4, 0x4f7: 0x4755, 0x4f8: 0x3912, 0x4f9: 0x3aa1, 0x4fa: 0x30e6, 0x4fb: 0x33f7, - 0x4fc: 0x30e1, 0x4fd: 0x33f2, 0x4fe: 0x30eb, 0x4ff: 0x33fc, + 0x4c0: 0x8132, 0x4c1: 0x8132, 0x4c2: 0x812d, 0x4c3: 0x8132, 0x4c4: 0x8132, 0x4c5: 0x8132, + 0x4c6: 0x8132, 0x4c7: 0x8132, 0x4c8: 0x8132, 0x4c9: 0x8132, 0x4ca: 0x812d, 0x4cb: 0x8132, + 0x4cc: 0x8132, 0x4cd: 0x8135, 0x4ce: 0x812a, 0x4cf: 0x812d, 0x4d0: 0x8129, 0x4d1: 0x8132, + 0x4d2: 0x8132, 0x4d3: 0x8132, 0x4d4: 0x8132, 0x4d5: 0x8132, 0x4d6: 0x8132, 0x4d7: 0x8132, + 0x4d8: 0x8132, 0x4d9: 0x8132, 0x4da: 0x8132, 0x4db: 0x8132, 0x4dc: 0x8132, 0x4dd: 0x8132, + 0x4de: 0x8132, 0x4df: 0x8132, 0x4e0: 0x8132, 0x4e1: 0x8132, 0x4e2: 0x8132, 0x4e3: 0x8132, + 0x4e4: 0x8132, 0x4e5: 0x8132, 0x4e6: 0x8132, 0x4e7: 0x8132, 0x4e8: 0x8132, 0x4e9: 0x8132, + 0x4ea: 0x8132, 0x4eb: 0x8132, 0x4ec: 0x8132, 0x4ed: 0x8132, 0x4ee: 0x8132, 0x4ef: 0x8132, + 0x4f0: 0x8132, 0x4f1: 0x8132, 0x4f2: 0x8132, 0x4f3: 0x8132, 0x4f4: 0x8132, 0x4f5: 0x8132, + 0x4f6: 0x8133, 0x4f7: 0x8131, 0x4f8: 0x8131, 0x4f9: 0x812d, 0x4fb: 0x8132, + 0x4fc: 0x8134, 0x4fd: 0x812d, 0x4fe: 0x8132, 0x4ff: 0x812d, // Block 0x14, offset 0x500 - 0x500: 0x30f0, 0x501: 0x3401, 0x502: 0x30f5, 0x503: 0x3406, 0x504: 0x3109, 0x505: 0x341a, - 0x506: 0x3113, 0x507: 0x3424, 0x508: 0x3122, 0x509: 0x3433, 0x50a: 0x311d, 0x50b: 0x342e, - 0x50c: 0x3935, 0x50d: 0x3ac4, 0x50e: 0x3943, 0x50f: 0x3ad2, 0x510: 0x394a, 0x511: 0x3ad9, - 0x512: 0x3951, 0x513: 0x3ae0, 0x514: 0x314f, 0x515: 0x3460, 0x516: 0x3154, 0x517: 0x3465, - 0x518: 0x315e, 0x519: 0x346f, 0x51a: 0x46f1, 0x51b: 0x4782, 0x51c: 0x3997, 0x51d: 0x3b26, - 0x51e: 0x3177, 0x51f: 0x3488, 0x520: 0x3181, 0x521: 0x3492, 0x522: 0x4700, 0x523: 0x4791, - 0x524: 0x399e, 0x525: 0x3b2d, 0x526: 0x39a5, 0x527: 0x3b34, 0x528: 0x39ac, 0x529: 0x3b3b, - 0x52a: 0x3190, 0x52b: 0x34a1, 0x52c: 0x319a, 0x52d: 0x34b0, 0x52e: 0x31ae, 0x52f: 0x34c4, - 0x530: 0x31a9, 0x531: 0x34bf, 0x532: 0x31ea, 0x533: 0x3500, 0x534: 0x31f9, 0x535: 0x350f, - 0x536: 0x31f4, 0x537: 0x350a, 0x538: 0x39b3, 0x539: 0x3b42, 0x53a: 0x39ba, 0x53b: 0x3b49, - 0x53c: 0x31fe, 0x53d: 0x3514, 0x53e: 0x3203, 0x53f: 0x3519, + 0x500: 0x2f97, 0x501: 0x32a3, 0x502: 0x2fa1, 0x503: 0x32ad, 0x504: 0x2fa6, 0x505: 0x32b2, + 0x506: 0x2fab, 0x507: 0x32b7, 0x508: 0x38cc, 0x509: 0x3a5b, 0x50a: 0x2fc4, 0x50b: 0x32d0, + 0x50c: 0x2fce, 0x50d: 0x32da, 0x50e: 0x2fdd, 0x50f: 0x32e9, 0x510: 0x2fd3, 0x511: 0x32df, + 0x512: 0x2fd8, 0x513: 0x32e4, 0x514: 0x38ef, 0x515: 0x3a7e, 0x516: 0x38f6, 0x517: 0x3a85, + 0x518: 0x3019, 0x519: 0x3325, 0x51a: 0x301e, 0x51b: 0x332a, 0x51c: 0x3904, 0x51d: 0x3a93, + 0x51e: 0x3023, 0x51f: 0x332f, 0x520: 0x3032, 0x521: 0x333e, 0x522: 0x3050, 0x523: 0x335c, + 0x524: 0x305f, 0x525: 0x336b, 0x526: 0x3055, 0x527: 0x3361, 0x528: 0x3064, 0x529: 0x3370, + 0x52a: 0x3069, 0x52b: 0x3375, 0x52c: 0x30af, 0x52d: 0x33bb, 0x52e: 0x390b, 0x52f: 0x3a9a, + 0x530: 0x30b9, 0x531: 0x33ca, 0x532: 0x30c3, 0x533: 0x33d4, 0x534: 0x30cd, 0x535: 0x33de, + 0x536: 0x46c4, 0x537: 0x4755, 0x538: 0x3912, 0x539: 0x3aa1, 0x53a: 0x30e6, 0x53b: 0x33f7, + 0x53c: 0x30e1, 0x53d: 0x33f2, 0x53e: 0x30eb, 0x53f: 0x33fc, // Block 0x15, offset 0x540 - 0x540: 0x3208, 0x541: 0x351e, 0x542: 0x320d, 0x543: 0x3523, 0x544: 0x321c, 0x545: 0x3532, - 0x546: 0x3217, 0x547: 0x352d, 0x548: 0x3221, 0x549: 0x353c, 0x54a: 0x3226, 0x54b: 0x3541, - 0x54c: 0x322b, 0x54d: 0x3546, 0x54e: 0x3249, 0x54f: 0x3564, 0x550: 0x3262, 0x551: 0x3582, - 0x552: 0x3271, 0x553: 0x3591, 0x554: 0x3276, 0x555: 0x3596, 0x556: 0x337a, 0x557: 0x34a6, - 0x558: 0x3537, 0x559: 0x3573, 0x55a: 0x1be0, 0x55b: 0x42d7, - 0x560: 0x46a1, 0x561: 0x4732, 0x562: 0x2f83, 0x563: 0x328f, - 0x564: 0x3878, 0x565: 0x3a07, 0x566: 0x3871, 0x567: 0x3a00, 0x568: 0x3886, 0x569: 0x3a15, - 0x56a: 0x387f, 0x56b: 0x3a0e, 0x56c: 0x38be, 0x56d: 0x3a4d, 0x56e: 0x3894, 0x56f: 0x3a23, - 0x570: 0x388d, 0x571: 0x3a1c, 0x572: 0x38a2, 0x573: 0x3a31, 0x574: 0x389b, 0x575: 0x3a2a, - 0x576: 0x38c5, 0x577: 0x3a54, 0x578: 0x46b5, 0x579: 0x4746, 0x57a: 0x3000, 0x57b: 0x330c, - 0x57c: 0x2fec, 0x57d: 0x32f8, 0x57e: 0x38da, 0x57f: 0x3a69, + 0x540: 0x30f0, 0x541: 0x3401, 0x542: 0x30f5, 0x543: 0x3406, 0x544: 0x3109, 0x545: 0x341a, + 0x546: 0x3113, 0x547: 0x3424, 0x548: 0x3122, 0x549: 0x3433, 0x54a: 0x311d, 0x54b: 0x342e, + 0x54c: 0x3935, 0x54d: 0x3ac4, 0x54e: 0x3943, 0x54f: 0x3ad2, 0x550: 0x394a, 0x551: 0x3ad9, + 0x552: 0x3951, 0x553: 0x3ae0, 0x554: 0x314f, 0x555: 0x3460, 0x556: 0x3154, 0x557: 0x3465, + 0x558: 0x315e, 0x559: 0x346f, 0x55a: 0x46f1, 0x55b: 0x4782, 0x55c: 0x3997, 0x55d: 0x3b26, + 0x55e: 0x3177, 0x55f: 0x3488, 0x560: 0x3181, 0x561: 0x3492, 0x562: 0x4700, 0x563: 0x4791, + 0x564: 0x399e, 0x565: 0x3b2d, 0x566: 0x39a5, 0x567: 0x3b34, 0x568: 0x39ac, 0x569: 0x3b3b, + 0x56a: 0x3190, 0x56b: 0x34a1, 0x56c: 0x319a, 0x56d: 0x34b0, 0x56e: 0x31ae, 0x56f: 0x34c4, + 0x570: 0x31a9, 0x571: 0x34bf, 0x572: 0x31ea, 0x573: 0x3500, 0x574: 0x31f9, 0x575: 0x350f, + 0x576: 0x31f4, 0x577: 0x350a, 0x578: 0x39b3, 0x579: 0x3b42, 0x57a: 0x39ba, 0x57b: 0x3b49, + 0x57c: 0x31fe, 0x57d: 0x3514, 0x57e: 0x3203, 0x57f: 0x3519, // Block 0x16, offset 0x580 - 0x580: 0x38d3, 0x581: 0x3a62, 0x582: 0x38e8, 0x583: 0x3a77, 0x584: 0x38e1, 0x585: 0x3a70, - 0x586: 0x38fd, 0x587: 0x3a8c, 0x588: 0x3091, 0x589: 0x339d, 0x58a: 0x30a5, 0x58b: 0x33b1, - 0x58c: 0x46e7, 0x58d: 0x4778, 0x58e: 0x3136, 0x58f: 0x3447, 0x590: 0x3920, 0x591: 0x3aaf, - 0x592: 0x3919, 0x593: 0x3aa8, 0x594: 0x392e, 0x595: 0x3abd, 0x596: 0x3927, 0x597: 0x3ab6, - 0x598: 0x3989, 0x599: 0x3b18, 0x59a: 0x396d, 0x59b: 0x3afc, 0x59c: 0x3966, 0x59d: 0x3af5, - 0x59e: 0x397b, 0x59f: 0x3b0a, 0x5a0: 0x3974, 0x5a1: 0x3b03, 0x5a2: 0x3982, 0x5a3: 0x3b11, - 0x5a4: 0x31e5, 0x5a5: 0x34fb, 0x5a6: 0x31c7, 0x5a7: 0x34dd, 0x5a8: 0x39e4, 0x5a9: 0x3b73, - 0x5aa: 0x39dd, 0x5ab: 0x3b6c, 0x5ac: 0x39f2, 0x5ad: 0x3b81, 0x5ae: 0x39eb, 0x5af: 0x3b7a, - 0x5b0: 0x39f9, 0x5b1: 0x3b88, 0x5b2: 0x3230, 0x5b3: 0x354b, 0x5b4: 0x3258, 0x5b5: 0x3578, - 0x5b6: 0x3253, 0x5b7: 0x356e, 0x5b8: 0x323f, 0x5b9: 0x355a, + 0x580: 0x3208, 0x581: 0x351e, 0x582: 0x320d, 0x583: 0x3523, 0x584: 0x321c, 0x585: 0x3532, + 0x586: 0x3217, 0x587: 0x352d, 0x588: 0x3221, 0x589: 0x353c, 0x58a: 0x3226, 0x58b: 0x3541, + 0x58c: 0x322b, 0x58d: 0x3546, 0x58e: 0x3249, 0x58f: 0x3564, 0x590: 0x3262, 0x591: 0x3582, + 0x592: 0x3271, 0x593: 0x3591, 0x594: 0x3276, 0x595: 0x3596, 0x596: 0x337a, 0x597: 0x34a6, + 0x598: 0x3537, 0x599: 0x3573, 0x59a: 0x1be0, 0x59b: 0x42d7, + 0x5a0: 0x46a1, 0x5a1: 0x4732, 0x5a2: 0x2f83, 0x5a3: 0x328f, + 0x5a4: 0x3878, 0x5a5: 0x3a07, 0x5a6: 0x3871, 0x5a7: 0x3a00, 0x5a8: 0x3886, 0x5a9: 0x3a15, + 0x5aa: 0x387f, 0x5ab: 0x3a0e, 0x5ac: 0x38be, 0x5ad: 0x3a4d, 0x5ae: 0x3894, 0x5af: 0x3a23, + 0x5b0: 0x388d, 0x5b1: 0x3a1c, 0x5b2: 0x38a2, 0x5b3: 0x3a31, 0x5b4: 0x389b, 0x5b5: 0x3a2a, + 0x5b6: 0x38c5, 0x5b7: 0x3a54, 0x5b8: 0x46b5, 0x5b9: 0x4746, 0x5ba: 0x3000, 0x5bb: 0x330c, + 0x5bc: 0x2fec, 0x5bd: 0x32f8, 0x5be: 0x38da, 0x5bf: 0x3a69, // Block 0x17, offset 0x5c0 - 0x5c0: 0x4804, 0x5c1: 0x480a, 0x5c2: 0x491e, 0x5c3: 0x4936, 0x5c4: 0x4926, 0x5c5: 0x493e, - 0x5c6: 0x492e, 0x5c7: 0x4946, 0x5c8: 0x47aa, 0x5c9: 0x47b0, 0x5ca: 0x488e, 0x5cb: 0x48a6, - 0x5cc: 0x4896, 0x5cd: 0x48ae, 0x5ce: 0x489e, 0x5cf: 0x48b6, 0x5d0: 0x4816, 0x5d1: 0x481c, - 0x5d2: 0x3db8, 0x5d3: 0x3dc8, 0x5d4: 0x3dc0, 0x5d5: 0x3dd0, - 0x5d8: 0x47b6, 0x5d9: 0x47bc, 0x5da: 0x3ce8, 0x5db: 0x3cf8, 0x5dc: 0x3cf0, 0x5dd: 0x3d00, - 0x5e0: 0x482e, 0x5e1: 0x4834, 0x5e2: 0x494e, 0x5e3: 0x4966, - 0x5e4: 0x4956, 0x5e5: 0x496e, 0x5e6: 0x495e, 0x5e7: 0x4976, 0x5e8: 0x47c2, 0x5e9: 0x47c8, - 0x5ea: 0x48be, 0x5eb: 0x48d6, 0x5ec: 0x48c6, 0x5ed: 0x48de, 0x5ee: 0x48ce, 0x5ef: 0x48e6, - 0x5f0: 0x4846, 0x5f1: 0x484c, 0x5f2: 0x3e18, 0x5f3: 0x3e30, 0x5f4: 0x3e20, 0x5f5: 0x3e38, - 0x5f6: 0x3e28, 0x5f7: 0x3e40, 0x5f8: 0x47ce, 0x5f9: 0x47d4, 0x5fa: 0x3d18, 0x5fb: 0x3d30, - 0x5fc: 0x3d20, 0x5fd: 0x3d38, 0x5fe: 0x3d28, 0x5ff: 0x3d40, + 0x5c0: 0x38d3, 0x5c1: 0x3a62, 0x5c2: 0x38e8, 0x5c3: 0x3a77, 0x5c4: 0x38e1, 0x5c5: 0x3a70, + 0x5c6: 0x38fd, 0x5c7: 0x3a8c, 0x5c8: 0x3091, 0x5c9: 0x339d, 0x5ca: 0x30a5, 0x5cb: 0x33b1, + 0x5cc: 0x46e7, 0x5cd: 0x4778, 0x5ce: 0x3136, 0x5cf: 0x3447, 0x5d0: 0x3920, 0x5d1: 0x3aaf, + 0x5d2: 0x3919, 0x5d3: 0x3aa8, 0x5d4: 0x392e, 0x5d5: 0x3abd, 0x5d6: 0x3927, 0x5d7: 0x3ab6, + 0x5d8: 0x3989, 0x5d9: 0x3b18, 0x5da: 0x396d, 0x5db: 0x3afc, 0x5dc: 0x3966, 0x5dd: 0x3af5, + 0x5de: 0x397b, 0x5df: 0x3b0a, 0x5e0: 0x3974, 0x5e1: 0x3b03, 0x5e2: 0x3982, 0x5e3: 0x3b11, + 0x5e4: 0x31e5, 0x5e5: 0x34fb, 0x5e6: 0x31c7, 0x5e7: 0x34dd, 0x5e8: 0x39e4, 0x5e9: 0x3b73, + 0x5ea: 0x39dd, 0x5eb: 0x3b6c, 0x5ec: 0x39f2, 0x5ed: 0x3b81, 0x5ee: 0x39eb, 0x5ef: 0x3b7a, + 0x5f0: 0x39f9, 0x5f1: 0x3b88, 0x5f2: 0x3230, 0x5f3: 0x354b, 0x5f4: 0x3258, 0x5f5: 0x3578, + 0x5f6: 0x3253, 0x5f7: 0x356e, 0x5f8: 0x323f, 0x5f9: 0x355a, // Block 0x18, offset 0x600 - 0x600: 0x4852, 0x601: 0x4858, 0x602: 0x3e48, 0x603: 0x3e58, 0x604: 0x3e50, 0x605: 0x3e60, - 0x608: 0x47da, 0x609: 0x47e0, 0x60a: 0x3d48, 0x60b: 0x3d58, - 0x60c: 0x3d50, 0x60d: 0x3d60, 0x610: 0x4864, 0x611: 0x486a, - 0x612: 0x3e80, 0x613: 0x3e98, 0x614: 0x3e88, 0x615: 0x3ea0, 0x616: 0x3e90, 0x617: 0x3ea8, - 0x619: 0x47e6, 0x61b: 0x3d68, 0x61d: 0x3d70, - 0x61f: 0x3d78, 0x620: 0x487c, 0x621: 0x4882, 0x622: 0x497e, 0x623: 0x4996, - 0x624: 0x4986, 0x625: 0x499e, 0x626: 0x498e, 0x627: 0x49a6, 0x628: 0x47ec, 0x629: 0x47f2, - 0x62a: 0x48ee, 0x62b: 0x4906, 0x62c: 0x48f6, 0x62d: 0x490e, 0x62e: 0x48fe, 0x62f: 0x4916, - 0x630: 0x47f8, 0x631: 0x431e, 0x632: 0x3691, 0x633: 0x4324, 0x634: 0x4822, 0x635: 0x432a, - 0x636: 0x36a3, 0x637: 0x4330, 0x638: 0x36c1, 0x639: 0x4336, 0x63a: 0x36d9, 0x63b: 0x433c, - 0x63c: 0x4870, 0x63d: 0x4342, + 0x600: 0x4804, 0x601: 0x480a, 0x602: 0x491e, 0x603: 0x4936, 0x604: 0x4926, 0x605: 0x493e, + 0x606: 0x492e, 0x607: 0x4946, 0x608: 0x47aa, 0x609: 0x47b0, 0x60a: 0x488e, 0x60b: 0x48a6, + 0x60c: 0x4896, 0x60d: 0x48ae, 0x60e: 0x489e, 0x60f: 0x48b6, 0x610: 0x4816, 0x611: 0x481c, + 0x612: 0x3db8, 0x613: 0x3dc8, 0x614: 0x3dc0, 0x615: 0x3dd0, + 0x618: 0x47b6, 0x619: 0x47bc, 0x61a: 0x3ce8, 0x61b: 0x3cf8, 0x61c: 0x3cf0, 0x61d: 0x3d00, + 0x620: 0x482e, 0x621: 0x4834, 0x622: 0x494e, 0x623: 0x4966, + 0x624: 0x4956, 0x625: 0x496e, 0x626: 0x495e, 0x627: 0x4976, 0x628: 0x47c2, 0x629: 0x47c8, + 0x62a: 0x48be, 0x62b: 0x48d6, 0x62c: 0x48c6, 0x62d: 0x48de, 0x62e: 0x48ce, 0x62f: 0x48e6, + 0x630: 0x4846, 0x631: 0x484c, 0x632: 0x3e18, 0x633: 0x3e30, 0x634: 0x3e20, 0x635: 0x3e38, + 0x636: 0x3e28, 0x637: 0x3e40, 0x638: 0x47ce, 0x639: 0x47d4, 0x63a: 0x3d18, 0x63b: 0x3d30, + 0x63c: 0x3d20, 0x63d: 0x3d38, 0x63e: 0x3d28, 0x63f: 0x3d40, // Block 0x19, offset 0x640 - 0x640: 0x3da0, 0x641: 0x3da8, 0x642: 0x4184, 0x643: 0x41a2, 0x644: 0x418e, 0x645: 0x41ac, - 0x646: 0x4198, 0x647: 0x41b6, 0x648: 0x3cd8, 0x649: 0x3ce0, 0x64a: 0x40d0, 0x64b: 0x40ee, - 0x64c: 0x40da, 0x64d: 0x40f8, 0x64e: 0x40e4, 0x64f: 0x4102, 0x650: 0x3de8, 0x651: 0x3df0, - 0x652: 0x41c0, 0x653: 0x41de, 0x654: 0x41ca, 0x655: 0x41e8, 0x656: 0x41d4, 0x657: 0x41f2, - 0x658: 0x3d08, 0x659: 0x3d10, 0x65a: 0x410c, 0x65b: 0x412a, 0x65c: 0x4116, 0x65d: 0x4134, - 0x65e: 0x4120, 0x65f: 0x413e, 0x660: 0x3ec0, 0x661: 0x3ec8, 0x662: 0x41fc, 0x663: 0x421a, - 0x664: 0x4206, 0x665: 0x4224, 0x666: 0x4210, 0x667: 0x422e, 0x668: 0x3d80, 0x669: 0x3d88, - 0x66a: 0x4148, 0x66b: 0x4166, 0x66c: 0x4152, 0x66d: 0x4170, 0x66e: 0x415c, 0x66f: 0x417a, - 0x670: 0x3685, 0x671: 0x367f, 0x672: 0x3d90, 0x673: 0x368b, 0x674: 0x3d98, - 0x676: 0x4810, 0x677: 0x3db0, 0x678: 0x35f5, 0x679: 0x35ef, 0x67a: 0x35e3, 0x67b: 0x42ee, - 0x67c: 0x35fb, 0x67d: 0x4287, 0x67e: 0x01d3, 0x67f: 0x4287, + 0x640: 0x4852, 0x641: 0x4858, 0x642: 0x3e48, 0x643: 0x3e58, 0x644: 0x3e50, 0x645: 0x3e60, + 0x648: 0x47da, 0x649: 0x47e0, 0x64a: 0x3d48, 0x64b: 0x3d58, + 0x64c: 0x3d50, 0x64d: 0x3d60, 0x650: 0x4864, 0x651: 0x486a, + 0x652: 0x3e80, 0x653: 0x3e98, 0x654: 0x3e88, 0x655: 0x3ea0, 0x656: 0x3e90, 0x657: 0x3ea8, + 0x659: 0x47e6, 0x65b: 0x3d68, 0x65d: 0x3d70, + 0x65f: 0x3d78, 0x660: 0x487c, 0x661: 0x4882, 0x662: 0x497e, 0x663: 0x4996, + 0x664: 0x4986, 0x665: 0x499e, 0x666: 0x498e, 0x667: 0x49a6, 0x668: 0x47ec, 0x669: 0x47f2, + 0x66a: 0x48ee, 0x66b: 0x4906, 0x66c: 0x48f6, 0x66d: 0x490e, 0x66e: 0x48fe, 0x66f: 0x4916, + 0x670: 0x47f8, 0x671: 0x431e, 0x672: 0x3691, 0x673: 0x4324, 0x674: 0x4822, 0x675: 0x432a, + 0x676: 0x36a3, 0x677: 0x4330, 0x678: 0x36c1, 0x679: 0x4336, 0x67a: 0x36d9, 0x67b: 0x433c, + 0x67c: 0x4870, 0x67d: 0x4342, // Block 0x1a, offset 0x680 - 0x680: 0x42a0, 0x681: 0x4482, 0x682: 0x3dd8, 0x683: 0x369d, 0x684: 0x3de0, - 0x686: 0x483a, 0x687: 0x3df8, 0x688: 0x3601, 0x689: 0x42f4, 0x68a: 0x360d, 0x68b: 0x42fa, - 0x68c: 0x3619, 0x68d: 0x4489, 0x68e: 0x4490, 0x68f: 0x4497, 0x690: 0x36b5, 0x691: 0x36af, - 0x692: 0x3e00, 0x693: 0x44e4, 0x696: 0x36bb, 0x697: 0x3e10, - 0x698: 0x3631, 0x699: 0x362b, 0x69a: 0x361f, 0x69b: 0x4300, 0x69d: 0x449e, - 0x69e: 0x44a5, 0x69f: 0x44ac, 0x6a0: 0x36eb, 0x6a1: 0x36e5, 0x6a2: 0x3e68, 0x6a3: 0x44ec, - 0x6a4: 0x36cd, 0x6a5: 0x36d3, 0x6a6: 0x36f1, 0x6a7: 0x3e78, 0x6a8: 0x3661, 0x6a9: 0x365b, - 0x6aa: 0x364f, 0x6ab: 0x430c, 0x6ac: 0x3649, 0x6ad: 0x4474, 0x6ae: 0x447b, 0x6af: 0x0081, - 0x6b2: 0x3eb0, 0x6b3: 0x36f7, 0x6b4: 0x3eb8, - 0x6b6: 0x4888, 0x6b7: 0x3ed0, 0x6b8: 0x363d, 0x6b9: 0x4306, 0x6ba: 0x366d, 0x6bb: 0x4318, - 0x6bc: 0x3679, 0x6bd: 0x425a, 0x6be: 0x428c, + 0x680: 0x3da0, 0x681: 0x3da8, 0x682: 0x4184, 0x683: 0x41a2, 0x684: 0x418e, 0x685: 0x41ac, + 0x686: 0x4198, 0x687: 0x41b6, 0x688: 0x3cd8, 0x689: 0x3ce0, 0x68a: 0x40d0, 0x68b: 0x40ee, + 0x68c: 0x40da, 0x68d: 0x40f8, 0x68e: 0x40e4, 0x68f: 0x4102, 0x690: 0x3de8, 0x691: 0x3df0, + 0x692: 0x41c0, 0x693: 0x41de, 0x694: 0x41ca, 0x695: 0x41e8, 0x696: 0x41d4, 0x697: 0x41f2, + 0x698: 0x3d08, 0x699: 0x3d10, 0x69a: 0x410c, 0x69b: 0x412a, 0x69c: 0x4116, 0x69d: 0x4134, + 0x69e: 0x4120, 0x69f: 0x413e, 0x6a0: 0x3ec0, 0x6a1: 0x3ec8, 0x6a2: 0x41fc, 0x6a3: 0x421a, + 0x6a4: 0x4206, 0x6a5: 0x4224, 0x6a6: 0x4210, 0x6a7: 0x422e, 0x6a8: 0x3d80, 0x6a9: 0x3d88, + 0x6aa: 0x4148, 0x6ab: 0x4166, 0x6ac: 0x4152, 0x6ad: 0x4170, 0x6ae: 0x415c, 0x6af: 0x417a, + 0x6b0: 0x3685, 0x6b1: 0x367f, 0x6b2: 0x3d90, 0x6b3: 0x368b, 0x6b4: 0x3d98, + 0x6b6: 0x4810, 0x6b7: 0x3db0, 0x6b8: 0x35f5, 0x6b9: 0x35ef, 0x6ba: 0x35e3, 0x6bb: 0x42ee, + 0x6bc: 0x35fb, 0x6bd: 0x4287, 0x6be: 0x01d3, 0x6bf: 0x4287, // Block 0x1b, offset 0x6c0 - 0x6c0: 0x1bd8, 0x6c1: 0x1bdc, 0x6c2: 0x0047, 0x6c3: 0x1c54, 0x6c5: 0x1be8, - 0x6c6: 0x1bec, 0x6c7: 0x00e9, 0x6c9: 0x1c58, 0x6ca: 0x008f, 0x6cb: 0x0051, - 0x6cc: 0x0051, 0x6cd: 0x0051, 0x6ce: 0x0091, 0x6cf: 0x00da, 0x6d0: 0x0053, 0x6d1: 0x0053, - 0x6d2: 0x0059, 0x6d3: 0x0099, 0x6d5: 0x005d, 0x6d6: 0x198d, - 0x6d9: 0x0061, 0x6da: 0x0063, 0x6db: 0x0065, 0x6dc: 0x0065, 0x6dd: 0x0065, - 0x6e0: 0x199f, 0x6e1: 0x1bc8, 0x6e2: 0x19a8, - 0x6e4: 0x0075, 0x6e6: 0x01b8, 0x6e8: 0x0075, - 0x6ea: 0x0057, 0x6eb: 0x42d2, 0x6ec: 0x0045, 0x6ed: 0x0047, 0x6ef: 0x008b, - 0x6f0: 0x004b, 0x6f1: 0x004d, 0x6f3: 0x005b, 0x6f4: 0x009f, 0x6f5: 0x0215, - 0x6f6: 0x0218, 0x6f7: 0x021b, 0x6f8: 0x021e, 0x6f9: 0x0093, 0x6fb: 0x1b98, - 0x6fc: 0x01e8, 0x6fd: 0x01c1, 0x6fe: 0x0179, 0x6ff: 0x01a0, + 0x6c0: 0x42a0, 0x6c1: 0x4482, 0x6c2: 0x3dd8, 0x6c3: 0x369d, 0x6c4: 0x3de0, + 0x6c6: 0x483a, 0x6c7: 0x3df8, 0x6c8: 0x3601, 0x6c9: 0x42f4, 0x6ca: 0x360d, 0x6cb: 0x42fa, + 0x6cc: 0x3619, 0x6cd: 0x4489, 0x6ce: 0x4490, 0x6cf: 0x4497, 0x6d0: 0x36b5, 0x6d1: 0x36af, + 0x6d2: 0x3e00, 0x6d3: 0x44e4, 0x6d6: 0x36bb, 0x6d7: 0x3e10, + 0x6d8: 0x3631, 0x6d9: 0x362b, 0x6da: 0x361f, 0x6db: 0x4300, 0x6dd: 0x449e, + 0x6de: 0x44a5, 0x6df: 0x44ac, 0x6e0: 0x36eb, 0x6e1: 0x36e5, 0x6e2: 0x3e68, 0x6e3: 0x44ec, + 0x6e4: 0x36cd, 0x6e5: 0x36d3, 0x6e6: 0x36f1, 0x6e7: 0x3e78, 0x6e8: 0x3661, 0x6e9: 0x365b, + 0x6ea: 0x364f, 0x6eb: 0x430c, 0x6ec: 0x3649, 0x6ed: 0x4474, 0x6ee: 0x447b, 0x6ef: 0x0081, + 0x6f2: 0x3eb0, 0x6f3: 0x36f7, 0x6f4: 0x3eb8, + 0x6f6: 0x4888, 0x6f7: 0x3ed0, 0x6f8: 0x363d, 0x6f9: 0x4306, 0x6fa: 0x366d, 0x6fb: 0x4318, + 0x6fc: 0x3679, 0x6fd: 0x425a, 0x6fe: 0x428c, // Block 0x1c, offset 0x700 - 0x700: 0x0463, 0x705: 0x0049, - 0x706: 0x0089, 0x707: 0x008b, 0x708: 0x0093, 0x709: 0x0095, - 0x710: 0x222e, 0x711: 0x223a, - 0x712: 0x22ee, 0x713: 0x2216, 0x714: 0x229a, 0x715: 0x2222, 0x716: 0x22a0, 0x717: 0x22b8, - 0x718: 0x22c4, 0x719: 0x2228, 0x71a: 0x22ca, 0x71b: 0x2234, 0x71c: 0x22be, 0x71d: 0x22d0, - 0x71e: 0x22d6, 0x71f: 0x1cbc, 0x720: 0x0053, 0x721: 0x195a, 0x722: 0x1ba4, 0x723: 0x1963, - 0x724: 0x006d, 0x725: 0x19ab, 0x726: 0x1bd0, 0x727: 0x1d48, 0x728: 0x1966, 0x729: 0x0071, - 0x72a: 0x19b7, 0x72b: 0x1bd4, 0x72c: 0x0059, 0x72d: 0x0047, 0x72e: 0x0049, 0x72f: 0x005b, - 0x730: 0x0093, 0x731: 0x19e4, 0x732: 0x1c18, 0x733: 0x19ed, 0x734: 0x00ad, 0x735: 0x1a62, - 0x736: 0x1c4c, 0x737: 0x1d5c, 0x738: 0x19f0, 0x739: 0x00b1, 0x73a: 0x1a65, 0x73b: 0x1c50, - 0x73c: 0x0099, 0x73d: 0x0087, 0x73e: 0x0089, 0x73f: 0x009b, + 0x700: 0x1bd8, 0x701: 0x1bdc, 0x702: 0x0047, 0x703: 0x1c54, 0x705: 0x1be8, + 0x706: 0x1bec, 0x707: 0x00e9, 0x709: 0x1c58, 0x70a: 0x008f, 0x70b: 0x0051, + 0x70c: 0x0051, 0x70d: 0x0051, 0x70e: 0x0091, 0x70f: 0x00da, 0x710: 0x0053, 0x711: 0x0053, + 0x712: 0x0059, 0x713: 0x0099, 0x715: 0x005d, 0x716: 0x198d, + 0x719: 0x0061, 0x71a: 0x0063, 0x71b: 0x0065, 0x71c: 0x0065, 0x71d: 0x0065, + 0x720: 0x199f, 0x721: 0x1bc8, 0x722: 0x19a8, + 0x724: 0x0075, 0x726: 0x01b8, 0x728: 0x0075, + 0x72a: 0x0057, 0x72b: 0x42d2, 0x72c: 0x0045, 0x72d: 0x0047, 0x72f: 0x008b, + 0x730: 0x004b, 0x731: 0x004d, 0x733: 0x005b, 0x734: 0x009f, 0x735: 0x0215, + 0x736: 0x0218, 0x737: 0x021b, 0x738: 0x021e, 0x739: 0x0093, 0x73b: 0x1b98, + 0x73c: 0x01e8, 0x73d: 0x01c1, 0x73e: 0x0179, 0x73f: 0x01a0, // Block 0x1d, offset 0x740 - 0x741: 0x3c06, 0x743: 0xa000, 0x744: 0x3c0d, 0x745: 0xa000, - 0x747: 0x3c14, 0x748: 0xa000, 0x749: 0x3c1b, - 0x74d: 0xa000, - 0x760: 0x2f65, 0x761: 0xa000, 0x762: 0x3c29, - 0x764: 0xa000, 0x765: 0xa000, - 0x76d: 0x3c22, 0x76e: 0x2f60, 0x76f: 0x2f6a, - 0x770: 0x3c30, 0x771: 0x3c37, 0x772: 0xa000, 0x773: 0xa000, 0x774: 0x3c3e, 0x775: 0x3c45, - 0x776: 0xa000, 0x777: 0xa000, 0x778: 0x3c4c, 0x779: 0x3c53, 0x77a: 0xa000, 0x77b: 0xa000, - 0x77c: 0xa000, 0x77d: 0xa000, + 0x740: 0x0463, 0x745: 0x0049, + 0x746: 0x0089, 0x747: 0x008b, 0x748: 0x0093, 0x749: 0x0095, + 0x750: 0x222e, 0x751: 0x223a, + 0x752: 0x22ee, 0x753: 0x2216, 0x754: 0x229a, 0x755: 0x2222, 0x756: 0x22a0, 0x757: 0x22b8, + 0x758: 0x22c4, 0x759: 0x2228, 0x75a: 0x22ca, 0x75b: 0x2234, 0x75c: 0x22be, 0x75d: 0x22d0, + 0x75e: 0x22d6, 0x75f: 0x1cbc, 0x760: 0x0053, 0x761: 0x195a, 0x762: 0x1ba4, 0x763: 0x1963, + 0x764: 0x006d, 0x765: 0x19ab, 0x766: 0x1bd0, 0x767: 0x1d48, 0x768: 0x1966, 0x769: 0x0071, + 0x76a: 0x19b7, 0x76b: 0x1bd4, 0x76c: 0x0059, 0x76d: 0x0047, 0x76e: 0x0049, 0x76f: 0x005b, + 0x770: 0x0093, 0x771: 0x19e4, 0x772: 0x1c18, 0x773: 0x19ed, 0x774: 0x00ad, 0x775: 0x1a62, + 0x776: 0x1c4c, 0x777: 0x1d5c, 0x778: 0x19f0, 0x779: 0x00b1, 0x77a: 0x1a65, 0x77b: 0x1c50, + 0x77c: 0x0099, 0x77d: 0x0087, 0x77e: 0x0089, 0x77f: 0x009b, // Block 0x1e, offset 0x780 - 0x780: 0x3c5a, 0x781: 0x3c61, 0x782: 0xa000, 0x783: 0xa000, 0x784: 0x3c76, 0x785: 0x3c7d, - 0x786: 0xa000, 0x787: 0xa000, 0x788: 0x3c84, 0x789: 0x3c8b, - 0x791: 0xa000, - 0x792: 0xa000, - 0x7a2: 0xa000, - 0x7a8: 0xa000, 0x7a9: 0xa000, - 0x7ab: 0xa000, 0x7ac: 0x3ca0, 0x7ad: 0x3ca7, 0x7ae: 0x3cae, 0x7af: 0x3cb5, - 0x7b2: 0xa000, 0x7b3: 0xa000, 0x7b4: 0xa000, 0x7b5: 0xa000, + 0x781: 0x3c06, 0x783: 0xa000, 0x784: 0x3c0d, 0x785: 0xa000, + 0x787: 0x3c14, 0x788: 0xa000, 0x789: 0x3c1b, + 0x78d: 0xa000, + 0x7a0: 0x2f65, 0x7a1: 0xa000, 0x7a2: 0x3c29, + 0x7a4: 0xa000, 0x7a5: 0xa000, + 0x7ad: 0x3c22, 0x7ae: 0x2f60, 0x7af: 0x2f6a, + 0x7b0: 0x3c30, 0x7b1: 0x3c37, 0x7b2: 0xa000, 0x7b3: 0xa000, 0x7b4: 0x3c3e, 0x7b5: 0x3c45, + 0x7b6: 0xa000, 0x7b7: 0xa000, 0x7b8: 0x3c4c, 0x7b9: 0x3c53, 0x7ba: 0xa000, 0x7bb: 0xa000, + 0x7bc: 0xa000, 0x7bd: 0xa000, // Block 0x1f, offset 0x7c0 - 0x7e0: 0x0023, 0x7e1: 0x0025, 0x7e2: 0x0027, 0x7e3: 0x0029, - 0x7e4: 0x002b, 0x7e5: 0x002d, 0x7e6: 0x002f, 0x7e7: 0x0031, 0x7e8: 0x0033, 0x7e9: 0x1882, - 0x7ea: 0x1885, 0x7eb: 0x1888, 0x7ec: 0x188b, 0x7ed: 0x188e, 0x7ee: 0x1891, 0x7ef: 0x1894, - 0x7f0: 0x1897, 0x7f1: 0x189a, 0x7f2: 0x189d, 0x7f3: 0x18a6, 0x7f4: 0x1a68, 0x7f5: 0x1a6c, - 0x7f6: 0x1a70, 0x7f7: 0x1a74, 0x7f8: 0x1a78, 0x7f9: 0x1a7c, 0x7fa: 0x1a80, 0x7fb: 0x1a84, - 0x7fc: 0x1a88, 0x7fd: 0x1c80, 0x7fe: 0x1c85, 0x7ff: 0x1c8a, + 0x7c0: 0x3c5a, 0x7c1: 0x3c61, 0x7c2: 0xa000, 0x7c3: 0xa000, 0x7c4: 0x3c76, 0x7c5: 0x3c7d, + 0x7c6: 0xa000, 0x7c7: 0xa000, 0x7c8: 0x3c84, 0x7c9: 0x3c8b, + 0x7d1: 0xa000, + 0x7d2: 0xa000, + 0x7e2: 0xa000, + 0x7e8: 0xa000, 0x7e9: 0xa000, + 0x7eb: 0xa000, 0x7ec: 0x3ca0, 0x7ed: 0x3ca7, 0x7ee: 0x3cae, 0x7ef: 0x3cb5, + 0x7f2: 0xa000, 0x7f3: 0xa000, 0x7f4: 0xa000, 0x7f5: 0xa000, // Block 0x20, offset 0x800 - 0x800: 0x1c8f, 0x801: 0x1c94, 0x802: 0x1c99, 0x803: 0x1c9e, 0x804: 0x1ca3, 0x805: 0x1ca8, - 0x806: 0x1cad, 0x807: 0x1cb2, 0x808: 0x187f, 0x809: 0x18a3, 0x80a: 0x18c7, 0x80b: 0x18eb, - 0x80c: 0x190f, 0x80d: 0x1918, 0x80e: 0x191e, 0x80f: 0x1924, 0x810: 0x192a, 0x811: 0x1b60, - 0x812: 0x1b64, 0x813: 0x1b68, 0x814: 0x1b6c, 0x815: 0x1b70, 0x816: 0x1b74, 0x817: 0x1b78, - 0x818: 0x1b7c, 0x819: 0x1b80, 0x81a: 0x1b84, 0x81b: 0x1b88, 0x81c: 0x1af4, 0x81d: 0x1af8, - 0x81e: 0x1afc, 0x81f: 0x1b00, 0x820: 0x1b04, 0x821: 0x1b08, 0x822: 0x1b0c, 0x823: 0x1b10, - 0x824: 0x1b14, 0x825: 0x1b18, 0x826: 0x1b1c, 0x827: 0x1b20, 0x828: 0x1b24, 0x829: 0x1b28, - 0x82a: 0x1b2c, 0x82b: 0x1b30, 0x82c: 0x1b34, 0x82d: 0x1b38, 0x82e: 0x1b3c, 0x82f: 0x1b40, - 0x830: 0x1b44, 0x831: 0x1b48, 0x832: 0x1b4c, 0x833: 0x1b50, 0x834: 0x1b54, 0x835: 0x1b58, - 0x836: 0x0043, 0x837: 0x0045, 0x838: 0x0047, 0x839: 0x0049, 0x83a: 0x004b, 0x83b: 0x004d, - 0x83c: 0x004f, 0x83d: 0x0051, 0x83e: 0x0053, 0x83f: 0x0055, + 0x820: 0x0023, 0x821: 0x0025, 0x822: 0x0027, 0x823: 0x0029, + 0x824: 0x002b, 0x825: 0x002d, 0x826: 0x002f, 0x827: 0x0031, 0x828: 0x0033, 0x829: 0x1882, + 0x82a: 0x1885, 0x82b: 0x1888, 0x82c: 0x188b, 0x82d: 0x188e, 0x82e: 0x1891, 0x82f: 0x1894, + 0x830: 0x1897, 0x831: 0x189a, 0x832: 0x189d, 0x833: 0x18a6, 0x834: 0x1a68, 0x835: 0x1a6c, + 0x836: 0x1a70, 0x837: 0x1a74, 0x838: 0x1a78, 0x839: 0x1a7c, 0x83a: 0x1a80, 0x83b: 0x1a84, + 0x83c: 0x1a88, 0x83d: 0x1c80, 0x83e: 0x1c85, 0x83f: 0x1c8a, // Block 0x21, offset 0x840 - 0x840: 0x06bf, 0x841: 0x06e3, 0x842: 0x06ef, 0x843: 0x06ff, 0x844: 0x0707, 0x845: 0x0713, - 0x846: 0x071b, 0x847: 0x0723, 0x848: 0x072f, 0x849: 0x0783, 0x84a: 0x079b, 0x84b: 0x07ab, - 0x84c: 0x07bb, 0x84d: 0x07cb, 0x84e: 0x07db, 0x84f: 0x07fb, 0x850: 0x07ff, 0x851: 0x0803, - 0x852: 0x0837, 0x853: 0x085f, 0x854: 0x086f, 0x855: 0x0877, 0x856: 0x087b, 0x857: 0x0887, - 0x858: 0x08a3, 0x859: 0x08a7, 0x85a: 0x08bf, 0x85b: 0x08c3, 0x85c: 0x08cb, 0x85d: 0x08db, - 0x85e: 0x0977, 0x85f: 0x098b, 0x860: 0x09cb, 0x861: 0x09df, 0x862: 0x09e7, 0x863: 0x09eb, - 0x864: 0x09fb, 0x865: 0x0a17, 0x866: 0x0a43, 0x867: 0x0a4f, 0x868: 0x0a6f, 0x869: 0x0a7b, - 0x86a: 0x0a7f, 0x86b: 0x0a83, 0x86c: 0x0a9b, 0x86d: 0x0a9f, 0x86e: 0x0acb, 0x86f: 0x0ad7, - 0x870: 0x0adf, 0x871: 0x0ae7, 0x872: 0x0af7, 0x873: 0x0aff, 0x874: 0x0b07, 0x875: 0x0b33, - 0x876: 0x0b37, 0x877: 0x0b3f, 0x878: 0x0b43, 0x879: 0x0b4b, 0x87a: 0x0b53, 0x87b: 0x0b63, - 0x87c: 0x0b7f, 0x87d: 0x0bf7, 0x87e: 0x0c0b, 0x87f: 0x0c0f, + 0x840: 0x1c8f, 0x841: 0x1c94, 0x842: 0x1c99, 0x843: 0x1c9e, 0x844: 0x1ca3, 0x845: 0x1ca8, + 0x846: 0x1cad, 0x847: 0x1cb2, 0x848: 0x187f, 0x849: 0x18a3, 0x84a: 0x18c7, 0x84b: 0x18eb, + 0x84c: 0x190f, 0x84d: 0x1918, 0x84e: 0x191e, 0x84f: 0x1924, 0x850: 0x192a, 0x851: 0x1b60, + 0x852: 0x1b64, 0x853: 0x1b68, 0x854: 0x1b6c, 0x855: 0x1b70, 0x856: 0x1b74, 0x857: 0x1b78, + 0x858: 0x1b7c, 0x859: 0x1b80, 0x85a: 0x1b84, 0x85b: 0x1b88, 0x85c: 0x1af4, 0x85d: 0x1af8, + 0x85e: 0x1afc, 0x85f: 0x1b00, 0x860: 0x1b04, 0x861: 0x1b08, 0x862: 0x1b0c, 0x863: 0x1b10, + 0x864: 0x1b14, 0x865: 0x1b18, 0x866: 0x1b1c, 0x867: 0x1b20, 0x868: 0x1b24, 0x869: 0x1b28, + 0x86a: 0x1b2c, 0x86b: 0x1b30, 0x86c: 0x1b34, 0x86d: 0x1b38, 0x86e: 0x1b3c, 0x86f: 0x1b40, + 0x870: 0x1b44, 0x871: 0x1b48, 0x872: 0x1b4c, 0x873: 0x1b50, 0x874: 0x1b54, 0x875: 0x1b58, + 0x876: 0x0043, 0x877: 0x0045, 0x878: 0x0047, 0x879: 0x0049, 0x87a: 0x004b, 0x87b: 0x004d, + 0x87c: 0x004f, 0x87d: 0x0051, 0x87e: 0x0053, 0x87f: 0x0055, // Block 0x22, offset 0x880 - 0x880: 0x0c8f, 0x881: 0x0c93, 0x882: 0x0ca7, 0x883: 0x0cab, 0x884: 0x0cb3, 0x885: 0x0cbb, - 0x886: 0x0cc3, 0x887: 0x0ccf, 0x888: 0x0cf7, 0x889: 0x0d07, 0x88a: 0x0d1b, 0x88b: 0x0d8b, - 0x88c: 0x0d97, 0x88d: 0x0da7, 0x88e: 0x0db3, 0x88f: 0x0dbf, 0x890: 0x0dc7, 0x891: 0x0dcb, - 0x892: 0x0dcf, 0x893: 0x0dd3, 0x894: 0x0dd7, 0x895: 0x0e8f, 0x896: 0x0ed7, 0x897: 0x0ee3, - 0x898: 0x0ee7, 0x899: 0x0eeb, 0x89a: 0x0eef, 0x89b: 0x0ef7, 0x89c: 0x0efb, 0x89d: 0x0f0f, - 0x89e: 0x0f2b, 0x89f: 0x0f33, 0x8a0: 0x0f73, 0x8a1: 0x0f77, 0x8a2: 0x0f7f, 0x8a3: 0x0f83, - 0x8a4: 0x0f8b, 0x8a5: 0x0f8f, 0x8a6: 0x0fb3, 0x8a7: 0x0fb7, 0x8a8: 0x0fd3, 0x8a9: 0x0fd7, - 0x8aa: 0x0fdb, 0x8ab: 0x0fdf, 0x8ac: 0x0ff3, 0x8ad: 0x1017, 0x8ae: 0x101b, 0x8af: 0x101f, - 0x8b0: 0x1043, 0x8b1: 0x1083, 0x8b2: 0x1087, 0x8b3: 0x10a7, 0x8b4: 0x10b7, 0x8b5: 0x10bf, - 0x8b6: 0x10df, 0x8b7: 0x1103, 0x8b8: 0x1147, 0x8b9: 0x114f, 0x8ba: 0x1163, 0x8bb: 0x116f, - 0x8bc: 0x1177, 0x8bd: 0x117f, 0x8be: 0x1183, 0x8bf: 0x1187, + 0x880: 0x06bf, 0x881: 0x06e3, 0x882: 0x06ef, 0x883: 0x06ff, 0x884: 0x0707, 0x885: 0x0713, + 0x886: 0x071b, 0x887: 0x0723, 0x888: 0x072f, 0x889: 0x0783, 0x88a: 0x079b, 0x88b: 0x07ab, + 0x88c: 0x07bb, 0x88d: 0x07cb, 0x88e: 0x07db, 0x88f: 0x07fb, 0x890: 0x07ff, 0x891: 0x0803, + 0x892: 0x0837, 0x893: 0x085f, 0x894: 0x086f, 0x895: 0x0877, 0x896: 0x087b, 0x897: 0x0887, + 0x898: 0x08a3, 0x899: 0x08a7, 0x89a: 0x08bf, 0x89b: 0x08c3, 0x89c: 0x08cb, 0x89d: 0x08db, + 0x89e: 0x0977, 0x89f: 0x098b, 0x8a0: 0x09cb, 0x8a1: 0x09df, 0x8a2: 0x09e7, 0x8a3: 0x09eb, + 0x8a4: 0x09fb, 0x8a5: 0x0a17, 0x8a6: 0x0a43, 0x8a7: 0x0a4f, 0x8a8: 0x0a6f, 0x8a9: 0x0a7b, + 0x8aa: 0x0a7f, 0x8ab: 0x0a83, 0x8ac: 0x0a9b, 0x8ad: 0x0a9f, 0x8ae: 0x0acb, 0x8af: 0x0ad7, + 0x8b0: 0x0adf, 0x8b1: 0x0ae7, 0x8b2: 0x0af7, 0x8b3: 0x0aff, 0x8b4: 0x0b07, 0x8b5: 0x0b33, + 0x8b6: 0x0b37, 0x8b7: 0x0b3f, 0x8b8: 0x0b43, 0x8b9: 0x0b4b, 0x8ba: 0x0b53, 0x8bb: 0x0b63, + 0x8bc: 0x0b7f, 0x8bd: 0x0bf7, 0x8be: 0x0c0b, 0x8bf: 0x0c0f, // Block 0x23, offset 0x8c0 - 0x8c0: 0x119f, 0x8c1: 0x11a3, 0x8c2: 0x11bf, 0x8c3: 0x11c7, 0x8c4: 0x11cf, 0x8c5: 0x11d3, - 0x8c6: 0x11df, 0x8c7: 0x11e7, 0x8c8: 0x11eb, 0x8c9: 0x11ef, 0x8ca: 0x11f7, 0x8cb: 0x11fb, - 0x8cc: 0x129b, 0x8cd: 0x12af, 0x8ce: 0x12e3, 0x8cf: 0x12e7, 0x8d0: 0x12ef, 0x8d1: 0x131b, - 0x8d2: 0x1323, 0x8d3: 0x132b, 0x8d4: 0x1333, 0x8d5: 0x136f, 0x8d6: 0x1373, 0x8d7: 0x137b, - 0x8d8: 0x137f, 0x8d9: 0x1383, 0x8da: 0x13af, 0x8db: 0x13b3, 0x8dc: 0x13bb, 0x8dd: 0x13cf, - 0x8de: 0x13d3, 0x8df: 0x13ef, 0x8e0: 0x13f7, 0x8e1: 0x13fb, 0x8e2: 0x141f, 0x8e3: 0x143f, - 0x8e4: 0x1453, 0x8e5: 0x1457, 0x8e6: 0x145f, 0x8e7: 0x148b, 0x8e8: 0x148f, 0x8e9: 0x149f, - 0x8ea: 0x14c3, 0x8eb: 0x14cf, 0x8ec: 0x14df, 0x8ed: 0x14f7, 0x8ee: 0x14ff, 0x8ef: 0x1503, - 0x8f0: 0x1507, 0x8f1: 0x150b, 0x8f2: 0x1517, 0x8f3: 0x151b, 0x8f4: 0x1523, 0x8f5: 0x153f, - 0x8f6: 0x1543, 0x8f7: 0x1547, 0x8f8: 0x155f, 0x8f9: 0x1563, 0x8fa: 0x156b, 0x8fb: 0x157f, - 0x8fc: 0x1583, 0x8fd: 0x1587, 0x8fe: 0x158f, 0x8ff: 0x1593, + 0x8c0: 0x0c8f, 0x8c1: 0x0c93, 0x8c2: 0x0ca7, 0x8c3: 0x0cab, 0x8c4: 0x0cb3, 0x8c5: 0x0cbb, + 0x8c6: 0x0cc3, 0x8c7: 0x0ccf, 0x8c8: 0x0cf7, 0x8c9: 0x0d07, 0x8ca: 0x0d1b, 0x8cb: 0x0d8b, + 0x8cc: 0x0d97, 0x8cd: 0x0da7, 0x8ce: 0x0db3, 0x8cf: 0x0dbf, 0x8d0: 0x0dc7, 0x8d1: 0x0dcb, + 0x8d2: 0x0dcf, 0x8d3: 0x0dd3, 0x8d4: 0x0dd7, 0x8d5: 0x0e8f, 0x8d6: 0x0ed7, 0x8d7: 0x0ee3, + 0x8d8: 0x0ee7, 0x8d9: 0x0eeb, 0x8da: 0x0eef, 0x8db: 0x0ef7, 0x8dc: 0x0efb, 0x8dd: 0x0f0f, + 0x8de: 0x0f2b, 0x8df: 0x0f33, 0x8e0: 0x0f73, 0x8e1: 0x0f77, 0x8e2: 0x0f7f, 0x8e3: 0x0f83, + 0x8e4: 0x0f8b, 0x8e5: 0x0f8f, 0x8e6: 0x0fb3, 0x8e7: 0x0fb7, 0x8e8: 0x0fd3, 0x8e9: 0x0fd7, + 0x8ea: 0x0fdb, 0x8eb: 0x0fdf, 0x8ec: 0x0ff3, 0x8ed: 0x1017, 0x8ee: 0x101b, 0x8ef: 0x101f, + 0x8f0: 0x1043, 0x8f1: 0x1083, 0x8f2: 0x1087, 0x8f3: 0x10a7, 0x8f4: 0x10b7, 0x8f5: 0x10bf, + 0x8f6: 0x10df, 0x8f7: 0x1103, 0x8f8: 0x1147, 0x8f9: 0x114f, 0x8fa: 0x1163, 0x8fb: 0x116f, + 0x8fc: 0x1177, 0x8fd: 0x117f, 0x8fe: 0x1183, 0x8ff: 0x1187, // Block 0x24, offset 0x900 - 0x906: 0xa000, 0x90b: 0xa000, - 0x90c: 0x3f08, 0x90d: 0xa000, 0x90e: 0x3f10, 0x90f: 0xa000, 0x910: 0x3f18, 0x911: 0xa000, - 0x912: 0x3f20, 0x913: 0xa000, 0x914: 0x3f28, 0x915: 0xa000, 0x916: 0x3f30, 0x917: 0xa000, - 0x918: 0x3f38, 0x919: 0xa000, 0x91a: 0x3f40, 0x91b: 0xa000, 0x91c: 0x3f48, 0x91d: 0xa000, - 0x91e: 0x3f50, 0x91f: 0xa000, 0x920: 0x3f58, 0x921: 0xa000, 0x922: 0x3f60, - 0x924: 0xa000, 0x925: 0x3f68, 0x926: 0xa000, 0x927: 0x3f70, 0x928: 0xa000, 0x929: 0x3f78, - 0x92f: 0xa000, - 0x930: 0x3f80, 0x931: 0x3f88, 0x932: 0xa000, 0x933: 0x3f90, 0x934: 0x3f98, 0x935: 0xa000, - 0x936: 0x3fa0, 0x937: 0x3fa8, 0x938: 0xa000, 0x939: 0x3fb0, 0x93a: 0x3fb8, 0x93b: 0xa000, - 0x93c: 0x3fc0, 0x93d: 0x3fc8, + 0x900: 0x119f, 0x901: 0x11a3, 0x902: 0x11bf, 0x903: 0x11c7, 0x904: 0x11cf, 0x905: 0x11d3, + 0x906: 0x11df, 0x907: 0x11e7, 0x908: 0x11eb, 0x909: 0x11ef, 0x90a: 0x11f7, 0x90b: 0x11fb, + 0x90c: 0x129b, 0x90d: 0x12af, 0x90e: 0x12e3, 0x90f: 0x12e7, 0x910: 0x12ef, 0x911: 0x131b, + 0x912: 0x1323, 0x913: 0x132b, 0x914: 0x1333, 0x915: 0x136f, 0x916: 0x1373, 0x917: 0x137b, + 0x918: 0x137f, 0x919: 0x1383, 0x91a: 0x13af, 0x91b: 0x13b3, 0x91c: 0x13bb, 0x91d: 0x13cf, + 0x91e: 0x13d3, 0x91f: 0x13ef, 0x920: 0x13f7, 0x921: 0x13fb, 0x922: 0x141f, 0x923: 0x143f, + 0x924: 0x1453, 0x925: 0x1457, 0x926: 0x145f, 0x927: 0x148b, 0x928: 0x148f, 0x929: 0x149f, + 0x92a: 0x14c3, 0x92b: 0x14cf, 0x92c: 0x14df, 0x92d: 0x14f7, 0x92e: 0x14ff, 0x92f: 0x1503, + 0x930: 0x1507, 0x931: 0x150b, 0x932: 0x1517, 0x933: 0x151b, 0x934: 0x1523, 0x935: 0x153f, + 0x936: 0x1543, 0x937: 0x1547, 0x938: 0x155f, 0x939: 0x1563, 0x93a: 0x156b, 0x93b: 0x157f, + 0x93c: 0x1583, 0x93d: 0x1587, 0x93e: 0x158f, 0x93f: 0x1593, // Block 0x25, offset 0x940 - 0x954: 0x3f00, - 0x959: 0x9903, 0x95a: 0x9903, 0x95b: 0x42dc, 0x95c: 0x42e2, 0x95d: 0xa000, - 0x95e: 0x3fd0, 0x95f: 0x26b4, - 0x966: 0xa000, - 0x96b: 0xa000, 0x96c: 0x3fe0, 0x96d: 0xa000, 0x96e: 0x3fe8, 0x96f: 0xa000, - 0x970: 0x3ff0, 0x971: 0xa000, 0x972: 0x3ff8, 0x973: 0xa000, 0x974: 0x4000, 0x975: 0xa000, - 0x976: 0x4008, 0x977: 0xa000, 0x978: 0x4010, 0x979: 0xa000, 0x97a: 0x4018, 0x97b: 0xa000, - 0x97c: 0x4020, 0x97d: 0xa000, 0x97e: 0x4028, 0x97f: 0xa000, + 0x946: 0xa000, 0x94b: 0xa000, + 0x94c: 0x3f08, 0x94d: 0xa000, 0x94e: 0x3f10, 0x94f: 0xa000, 0x950: 0x3f18, 0x951: 0xa000, + 0x952: 0x3f20, 0x953: 0xa000, 0x954: 0x3f28, 0x955: 0xa000, 0x956: 0x3f30, 0x957: 0xa000, + 0x958: 0x3f38, 0x959: 0xa000, 0x95a: 0x3f40, 0x95b: 0xa000, 0x95c: 0x3f48, 0x95d: 0xa000, + 0x95e: 0x3f50, 0x95f: 0xa000, 0x960: 0x3f58, 0x961: 0xa000, 0x962: 0x3f60, + 0x964: 0xa000, 0x965: 0x3f68, 0x966: 0xa000, 0x967: 0x3f70, 0x968: 0xa000, 0x969: 0x3f78, + 0x96f: 0xa000, + 0x970: 0x3f80, 0x971: 0x3f88, 0x972: 0xa000, 0x973: 0x3f90, 0x974: 0x3f98, 0x975: 0xa000, + 0x976: 0x3fa0, 0x977: 0x3fa8, 0x978: 0xa000, 0x979: 0x3fb0, 0x97a: 0x3fb8, 0x97b: 0xa000, + 0x97c: 0x3fc0, 0x97d: 0x3fc8, // Block 0x26, offset 0x980 - 0x980: 0x4030, 0x981: 0xa000, 0x982: 0x4038, 0x984: 0xa000, 0x985: 0x4040, - 0x986: 0xa000, 0x987: 0x4048, 0x988: 0xa000, 0x989: 0x4050, - 0x98f: 0xa000, 0x990: 0x4058, 0x991: 0x4060, - 0x992: 0xa000, 0x993: 0x4068, 0x994: 0x4070, 0x995: 0xa000, 0x996: 0x4078, 0x997: 0x4080, - 0x998: 0xa000, 0x999: 0x4088, 0x99a: 0x4090, 0x99b: 0xa000, 0x99c: 0x4098, 0x99d: 0x40a0, - 0x9af: 0xa000, - 0x9b0: 0xa000, 0x9b1: 0xa000, 0x9b2: 0xa000, 0x9b4: 0x3fd8, - 0x9b7: 0x40a8, 0x9b8: 0x40b0, 0x9b9: 0x40b8, 0x9ba: 0x40c0, - 0x9bd: 0xa000, 0x9be: 0x40c8, 0x9bf: 0x26c9, + 0x994: 0x3f00, + 0x999: 0x9903, 0x99a: 0x9903, 0x99b: 0x42dc, 0x99c: 0x42e2, 0x99d: 0xa000, + 0x99e: 0x3fd0, 0x99f: 0x26b4, + 0x9a6: 0xa000, + 0x9ab: 0xa000, 0x9ac: 0x3fe0, 0x9ad: 0xa000, 0x9ae: 0x3fe8, 0x9af: 0xa000, + 0x9b0: 0x3ff0, 0x9b1: 0xa000, 0x9b2: 0x3ff8, 0x9b3: 0xa000, 0x9b4: 0x4000, 0x9b5: 0xa000, + 0x9b6: 0x4008, 0x9b7: 0xa000, 0x9b8: 0x4010, 0x9b9: 0xa000, 0x9ba: 0x4018, 0x9bb: 0xa000, + 0x9bc: 0x4020, 0x9bd: 0xa000, 0x9be: 0x4028, 0x9bf: 0xa000, // Block 0x27, offset 0x9c0 - 0x9c0: 0x0367, 0x9c1: 0x032b, 0x9c2: 0x032f, 0x9c3: 0x0333, 0x9c4: 0x037b, 0x9c5: 0x0337, - 0x9c6: 0x033b, 0x9c7: 0x033f, 0x9c8: 0x0343, 0x9c9: 0x0347, 0x9ca: 0x034b, 0x9cb: 0x034f, - 0x9cc: 0x0353, 0x9cd: 0x0357, 0x9ce: 0x035b, 0x9cf: 0x49bd, 0x9d0: 0x49c3, 0x9d1: 0x49c9, - 0x9d2: 0x49cf, 0x9d3: 0x49d5, 0x9d4: 0x49db, 0x9d5: 0x49e1, 0x9d6: 0x49e7, 0x9d7: 0x49ed, - 0x9d8: 0x49f3, 0x9d9: 0x49f9, 0x9da: 0x49ff, 0x9db: 0x4a05, 0x9dc: 0x4a0b, 0x9dd: 0x4a11, - 0x9de: 0x4a17, 0x9df: 0x4a1d, 0x9e0: 0x4a23, 0x9e1: 0x4a29, 0x9e2: 0x4a2f, 0x9e3: 0x4a35, - 0x9e4: 0x03c3, 0x9e5: 0x035f, 0x9e6: 0x0363, 0x9e7: 0x03e7, 0x9e8: 0x03eb, 0x9e9: 0x03ef, - 0x9ea: 0x03f3, 0x9eb: 0x03f7, 0x9ec: 0x03fb, 0x9ed: 0x03ff, 0x9ee: 0x036b, 0x9ef: 0x0403, - 0x9f0: 0x0407, 0x9f1: 0x036f, 0x9f2: 0x0373, 0x9f3: 0x0377, 0x9f4: 0x037f, 0x9f5: 0x0383, - 0x9f6: 0x0387, 0x9f7: 0x038b, 0x9f8: 0x038f, 0x9f9: 0x0393, 0x9fa: 0x0397, 0x9fb: 0x039b, - 0x9fc: 0x039f, 0x9fd: 0x03a3, 0x9fe: 0x03a7, 0x9ff: 0x03ab, + 0x9c0: 0x4030, 0x9c1: 0xa000, 0x9c2: 0x4038, 0x9c4: 0xa000, 0x9c5: 0x4040, + 0x9c6: 0xa000, 0x9c7: 0x4048, 0x9c8: 0xa000, 0x9c9: 0x4050, + 0x9cf: 0xa000, 0x9d0: 0x4058, 0x9d1: 0x4060, + 0x9d2: 0xa000, 0x9d3: 0x4068, 0x9d4: 0x4070, 0x9d5: 0xa000, 0x9d6: 0x4078, 0x9d7: 0x4080, + 0x9d8: 0xa000, 0x9d9: 0x4088, 0x9da: 0x4090, 0x9db: 0xa000, 0x9dc: 0x4098, 0x9dd: 0x40a0, + 0x9ef: 0xa000, + 0x9f0: 0xa000, 0x9f1: 0xa000, 0x9f2: 0xa000, 0x9f4: 0x3fd8, + 0x9f7: 0x40a8, 0x9f8: 0x40b0, 0x9f9: 0x40b8, 0x9fa: 0x40c0, + 0x9fd: 0xa000, 0x9fe: 0x40c8, 0x9ff: 0x26c9, // Block 0x28, offset 0xa00 - 0xa00: 0x03af, 0xa01: 0x03b3, 0xa02: 0x040b, 0xa03: 0x040f, 0xa04: 0x03b7, 0xa05: 0x03bb, - 0xa06: 0x03bf, 0xa07: 0x03c7, 0xa08: 0x03cb, 0xa09: 0x03cf, 0xa0a: 0x03d3, 0xa0b: 0x03d7, - 0xa0c: 0x03db, 0xa0d: 0x03df, 0xa0e: 0x03e3, - 0xa12: 0x06bf, 0xa13: 0x071b, 0xa14: 0x06cb, 0xa15: 0x097b, 0xa16: 0x06cf, 0xa17: 0x06e7, - 0xa18: 0x06d3, 0xa19: 0x0f93, 0xa1a: 0x0707, 0xa1b: 0x06db, 0xa1c: 0x06c3, 0xa1d: 0x09ff, - 0xa1e: 0x098f, 0xa1f: 0x072f, + 0xa00: 0x0367, 0xa01: 0x032b, 0xa02: 0x032f, 0xa03: 0x0333, 0xa04: 0x037b, 0xa05: 0x0337, + 0xa06: 0x033b, 0xa07: 0x033f, 0xa08: 0x0343, 0xa09: 0x0347, 0xa0a: 0x034b, 0xa0b: 0x034f, + 0xa0c: 0x0353, 0xa0d: 0x0357, 0xa0e: 0x035b, 0xa0f: 0x49bd, 0xa10: 0x49c3, 0xa11: 0x49c9, + 0xa12: 0x49cf, 0xa13: 0x49d5, 0xa14: 0x49db, 0xa15: 0x49e1, 0xa16: 0x49e7, 0xa17: 0x49ed, + 0xa18: 0x49f3, 0xa19: 0x49f9, 0xa1a: 0x49ff, 0xa1b: 0x4a05, 0xa1c: 0x4a0b, 0xa1d: 0x4a11, + 0xa1e: 0x4a17, 0xa1f: 0x4a1d, 0xa20: 0x4a23, 0xa21: 0x4a29, 0xa22: 0x4a2f, 0xa23: 0x4a35, + 0xa24: 0x03c3, 0xa25: 0x035f, 0xa26: 0x0363, 0xa27: 0x03e7, 0xa28: 0x03eb, 0xa29: 0x03ef, + 0xa2a: 0x03f3, 0xa2b: 0x03f7, 0xa2c: 0x03fb, 0xa2d: 0x03ff, 0xa2e: 0x036b, 0xa2f: 0x0403, + 0xa30: 0x0407, 0xa31: 0x036f, 0xa32: 0x0373, 0xa33: 0x0377, 0xa34: 0x037f, 0xa35: 0x0383, + 0xa36: 0x0387, 0xa37: 0x038b, 0xa38: 0x038f, 0xa39: 0x0393, 0xa3a: 0x0397, 0xa3b: 0x039b, + 0xa3c: 0x039f, 0xa3d: 0x03a3, 0xa3e: 0x03a7, 0xa3f: 0x03ab, // Block 0x29, offset 0xa40 - 0xa40: 0x2054, 0xa41: 0x205a, 0xa42: 0x2060, 0xa43: 0x2066, 0xa44: 0x206c, 0xa45: 0x2072, - 0xa46: 0x2078, 0xa47: 0x207e, 0xa48: 0x2084, 0xa49: 0x208a, 0xa4a: 0x2090, 0xa4b: 0x2096, - 0xa4c: 0x209c, 0xa4d: 0x20a2, 0xa4e: 0x2726, 0xa4f: 0x272f, 0xa50: 0x2738, 0xa51: 0x2741, - 0xa52: 0x274a, 0xa53: 0x2753, 0xa54: 0x275c, 0xa55: 0x2765, 0xa56: 0x276e, 0xa57: 0x2780, - 0xa58: 0x2789, 0xa59: 0x2792, 0xa5a: 0x279b, 0xa5b: 0x27a4, 0xa5c: 0x2777, 0xa5d: 0x2bac, - 0xa5e: 0x2aed, 0xa60: 0x20a8, 0xa61: 0x20c0, 0xa62: 0x20b4, 0xa63: 0x2108, - 0xa64: 0x20c6, 0xa65: 0x20e4, 0xa66: 0x20ae, 0xa67: 0x20de, 0xa68: 0x20ba, 0xa69: 0x20f0, - 0xa6a: 0x2120, 0xa6b: 0x213e, 0xa6c: 0x2138, 0xa6d: 0x212c, 0xa6e: 0x217a, 0xa6f: 0x210e, - 0xa70: 0x211a, 0xa71: 0x2132, 0xa72: 0x2126, 0xa73: 0x2150, 0xa74: 0x20fc, 0xa75: 0x2144, - 0xa76: 0x216e, 0xa77: 0x2156, 0xa78: 0x20ea, 0xa79: 0x20cc, 0xa7a: 0x2102, 0xa7b: 0x2114, - 0xa7c: 0x214a, 0xa7d: 0x20d2, 0xa7e: 0x2174, 0xa7f: 0x20f6, + 0xa40: 0x03af, 0xa41: 0x03b3, 0xa42: 0x040b, 0xa43: 0x040f, 0xa44: 0x03b7, 0xa45: 0x03bb, + 0xa46: 0x03bf, 0xa47: 0x03c7, 0xa48: 0x03cb, 0xa49: 0x03cf, 0xa4a: 0x03d3, 0xa4b: 0x03d7, + 0xa4c: 0x03db, 0xa4d: 0x03df, 0xa4e: 0x03e3, + 0xa52: 0x06bf, 0xa53: 0x071b, 0xa54: 0x06cb, 0xa55: 0x097b, 0xa56: 0x06cf, 0xa57: 0x06e7, + 0xa58: 0x06d3, 0xa59: 0x0f93, 0xa5a: 0x0707, 0xa5b: 0x06db, 0xa5c: 0x06c3, 0xa5d: 0x09ff, + 0xa5e: 0x098f, 0xa5f: 0x072f, // Block 0x2a, offset 0xa80 - 0xa80: 0x215c, 0xa81: 0x20d8, 0xa82: 0x2162, 0xa83: 0x2168, 0xa84: 0x092f, 0xa85: 0x0b03, - 0xa86: 0x0ca7, 0xa87: 0x10c7, - 0xa90: 0x1bc4, 0xa91: 0x18a9, - 0xa92: 0x18ac, 0xa93: 0x18af, 0xa94: 0x18b2, 0xa95: 0x18b5, 0xa96: 0x18b8, 0xa97: 0x18bb, - 0xa98: 0x18be, 0xa99: 0x18c1, 0xa9a: 0x18ca, 0xa9b: 0x18cd, 0xa9c: 0x18d0, 0xa9d: 0x18d3, - 0xa9e: 0x18d6, 0xa9f: 0x18d9, 0xaa0: 0x0313, 0xaa1: 0x031b, 0xaa2: 0x031f, 0xaa3: 0x0327, - 0xaa4: 0x032b, 0xaa5: 0x032f, 0xaa6: 0x0337, 0xaa7: 0x033f, 0xaa8: 0x0343, 0xaa9: 0x034b, - 0xaaa: 0x034f, 0xaab: 0x0353, 0xaac: 0x0357, 0xaad: 0x035b, 0xaae: 0x2e18, 0xaaf: 0x2e20, - 0xab0: 0x2e28, 0xab1: 0x2e30, 0xab2: 0x2e38, 0xab3: 0x2e40, 0xab4: 0x2e48, 0xab5: 0x2e50, - 0xab6: 0x2e60, 0xab7: 0x2e68, 0xab8: 0x2e70, 0xab9: 0x2e78, 0xaba: 0x2e80, 0xabb: 0x2e88, - 0xabc: 0x2ed3, 0xabd: 0x2e9b, 0xabe: 0x2e58, + 0xa80: 0x2054, 0xa81: 0x205a, 0xa82: 0x2060, 0xa83: 0x2066, 0xa84: 0x206c, 0xa85: 0x2072, + 0xa86: 0x2078, 0xa87: 0x207e, 0xa88: 0x2084, 0xa89: 0x208a, 0xa8a: 0x2090, 0xa8b: 0x2096, + 0xa8c: 0x209c, 0xa8d: 0x20a2, 0xa8e: 0x2726, 0xa8f: 0x272f, 0xa90: 0x2738, 0xa91: 0x2741, + 0xa92: 0x274a, 0xa93: 0x2753, 0xa94: 0x275c, 0xa95: 0x2765, 0xa96: 0x276e, 0xa97: 0x2780, + 0xa98: 0x2789, 0xa99: 0x2792, 0xa9a: 0x279b, 0xa9b: 0x27a4, 0xa9c: 0x2777, 0xa9d: 0x2bac, + 0xa9e: 0x2aed, 0xaa0: 0x20a8, 0xaa1: 0x20c0, 0xaa2: 0x20b4, 0xaa3: 0x2108, + 0xaa4: 0x20c6, 0xaa5: 0x20e4, 0xaa6: 0x20ae, 0xaa7: 0x20de, 0xaa8: 0x20ba, 0xaa9: 0x20f0, + 0xaaa: 0x2120, 0xaab: 0x213e, 0xaac: 0x2138, 0xaad: 0x212c, 0xaae: 0x217a, 0xaaf: 0x210e, + 0xab0: 0x211a, 0xab1: 0x2132, 0xab2: 0x2126, 0xab3: 0x2150, 0xab4: 0x20fc, 0xab5: 0x2144, + 0xab6: 0x216e, 0xab7: 0x2156, 0xab8: 0x20ea, 0xab9: 0x20cc, 0xaba: 0x2102, 0xabb: 0x2114, + 0xabc: 0x214a, 0xabd: 0x20d2, 0xabe: 0x2174, 0xabf: 0x20f6, // Block 0x2b, offset 0xac0 - 0xac0: 0x06bf, 0xac1: 0x071b, 0xac2: 0x06cb, 0xac3: 0x097b, 0xac4: 0x071f, 0xac5: 0x07af, - 0xac6: 0x06c7, 0xac7: 0x07ab, 0xac8: 0x070b, 0xac9: 0x0887, 0xaca: 0x0d07, 0xacb: 0x0e8f, - 0xacc: 0x0dd7, 0xacd: 0x0d1b, 0xace: 0x145f, 0xacf: 0x098b, 0xad0: 0x0ccf, 0xad1: 0x0d4b, - 0xad2: 0x0d0b, 0xad3: 0x104b, 0xad4: 0x08fb, 0xad5: 0x0f03, 0xad6: 0x1387, 0xad7: 0x105f, - 0xad8: 0x0843, 0xad9: 0x108f, 0xada: 0x0f9b, 0xadb: 0x0a17, 0xadc: 0x140f, 0xadd: 0x077f, - 0xade: 0x08ab, 0xadf: 0x0df7, 0xae0: 0x1527, 0xae1: 0x0743, 0xae2: 0x07d3, 0xae3: 0x0d9b, - 0xae4: 0x06cf, 0xae5: 0x06e7, 0xae6: 0x06d3, 0xae7: 0x0adb, 0xae8: 0x08ef, 0xae9: 0x087f, - 0xaea: 0x0a57, 0xaeb: 0x0a4b, 0xaec: 0x0feb, 0xaed: 0x073f, 0xaee: 0x139b, 0xaef: 0x089b, - 0xaf0: 0x09f3, 0xaf1: 0x18dc, 0xaf2: 0x18df, 0xaf3: 0x18e2, 0xaf4: 0x18e5, 0xaf5: 0x18ee, - 0xaf6: 0x18f1, 0xaf7: 0x18f4, 0xaf8: 0x18f7, 0xaf9: 0x18fa, 0xafa: 0x18fd, 0xafb: 0x1900, - 0xafc: 0x1903, 0xafd: 0x1906, 0xafe: 0x1909, 0xaff: 0x1912, + 0xac0: 0x215c, 0xac1: 0x20d8, 0xac2: 0x2162, 0xac3: 0x2168, 0xac4: 0x092f, 0xac5: 0x0b03, + 0xac6: 0x0ca7, 0xac7: 0x10c7, + 0xad0: 0x1bc4, 0xad1: 0x18a9, + 0xad2: 0x18ac, 0xad3: 0x18af, 0xad4: 0x18b2, 0xad5: 0x18b5, 0xad6: 0x18b8, 0xad7: 0x18bb, + 0xad8: 0x18be, 0xad9: 0x18c1, 0xada: 0x18ca, 0xadb: 0x18cd, 0xadc: 0x18d0, 0xadd: 0x18d3, + 0xade: 0x18d6, 0xadf: 0x18d9, 0xae0: 0x0313, 0xae1: 0x031b, 0xae2: 0x031f, 0xae3: 0x0327, + 0xae4: 0x032b, 0xae5: 0x032f, 0xae6: 0x0337, 0xae7: 0x033f, 0xae8: 0x0343, 0xae9: 0x034b, + 0xaea: 0x034f, 0xaeb: 0x0353, 0xaec: 0x0357, 0xaed: 0x035b, 0xaee: 0x2e18, 0xaef: 0x2e20, + 0xaf0: 0x2e28, 0xaf1: 0x2e30, 0xaf2: 0x2e38, 0xaf3: 0x2e40, 0xaf4: 0x2e48, 0xaf5: 0x2e50, + 0xaf6: 0x2e60, 0xaf7: 0x2e68, 0xaf8: 0x2e70, 0xaf9: 0x2e78, 0xafa: 0x2e80, 0xafb: 0x2e88, + 0xafc: 0x2ed3, 0xafd: 0x2e9b, 0xafe: 0x2e58, // Block 0x2c, offset 0xb00 - 0xb00: 0x1cc6, 0xb01: 0x1cd5, 0xb02: 0x1ce4, 0xb03: 0x1cf3, 0xb04: 0x1d02, 0xb05: 0x1d11, - 0xb06: 0x1d20, 0xb07: 0x1d2f, 0xb08: 0x1d3e, 0xb09: 0x218c, 0xb0a: 0x219e, 0xb0b: 0x21b0, - 0xb0c: 0x1954, 0xb0d: 0x1c04, 0xb0e: 0x19d2, 0xb0f: 0x1ba8, 0xb10: 0x04cb, 0xb11: 0x04d3, - 0xb12: 0x04db, 0xb13: 0x04e3, 0xb14: 0x04eb, 0xb15: 0x04ef, 0xb16: 0x04f3, 0xb17: 0x04f7, - 0xb18: 0x04fb, 0xb19: 0x04ff, 0xb1a: 0x0503, 0xb1b: 0x0507, 0xb1c: 0x050b, 0xb1d: 0x050f, - 0xb1e: 0x0513, 0xb1f: 0x0517, 0xb20: 0x051b, 0xb21: 0x0523, 0xb22: 0x0527, 0xb23: 0x052b, - 0xb24: 0x052f, 0xb25: 0x0533, 0xb26: 0x0537, 0xb27: 0x053b, 0xb28: 0x053f, 0xb29: 0x0543, - 0xb2a: 0x0547, 0xb2b: 0x054b, 0xb2c: 0x054f, 0xb2d: 0x0553, 0xb2e: 0x0557, 0xb2f: 0x055b, - 0xb30: 0x055f, 0xb31: 0x0563, 0xb32: 0x0567, 0xb33: 0x056f, 0xb34: 0x0577, 0xb35: 0x057f, - 0xb36: 0x0583, 0xb37: 0x0587, 0xb38: 0x058b, 0xb39: 0x058f, 0xb3a: 0x0593, 0xb3b: 0x0597, - 0xb3c: 0x059b, 0xb3d: 0x059f, 0xb3e: 0x05a3, + 0xb00: 0x06bf, 0xb01: 0x071b, 0xb02: 0x06cb, 0xb03: 0x097b, 0xb04: 0x071f, 0xb05: 0x07af, + 0xb06: 0x06c7, 0xb07: 0x07ab, 0xb08: 0x070b, 0xb09: 0x0887, 0xb0a: 0x0d07, 0xb0b: 0x0e8f, + 0xb0c: 0x0dd7, 0xb0d: 0x0d1b, 0xb0e: 0x145f, 0xb0f: 0x098b, 0xb10: 0x0ccf, 0xb11: 0x0d4b, + 0xb12: 0x0d0b, 0xb13: 0x104b, 0xb14: 0x08fb, 0xb15: 0x0f03, 0xb16: 0x1387, 0xb17: 0x105f, + 0xb18: 0x0843, 0xb19: 0x108f, 0xb1a: 0x0f9b, 0xb1b: 0x0a17, 0xb1c: 0x140f, 0xb1d: 0x077f, + 0xb1e: 0x08ab, 0xb1f: 0x0df7, 0xb20: 0x1527, 0xb21: 0x0743, 0xb22: 0x07d3, 0xb23: 0x0d9b, + 0xb24: 0x06cf, 0xb25: 0x06e7, 0xb26: 0x06d3, 0xb27: 0x0adb, 0xb28: 0x08ef, 0xb29: 0x087f, + 0xb2a: 0x0a57, 0xb2b: 0x0a4b, 0xb2c: 0x0feb, 0xb2d: 0x073f, 0xb2e: 0x139b, 0xb2f: 0x089b, + 0xb30: 0x09f3, 0xb31: 0x18dc, 0xb32: 0x18df, 0xb33: 0x18e2, 0xb34: 0x18e5, 0xb35: 0x18ee, + 0xb36: 0x18f1, 0xb37: 0x18f4, 0xb38: 0x18f7, 0xb39: 0x18fa, 0xb3a: 0x18fd, 0xb3b: 0x1900, + 0xb3c: 0x1903, 0xb3d: 0x1906, 0xb3e: 0x1909, 0xb3f: 0x1912, // Block 0x2d, offset 0xb40 - 0xb40: 0x2b0c, 0xb41: 0x29a8, 0xb42: 0x2b1c, 0xb43: 0x2880, 0xb44: 0x2ee4, 0xb45: 0x288a, - 0xb46: 0x2894, 0xb47: 0x2f28, 0xb48: 0x29b5, 0xb49: 0x289e, 0xb4a: 0x28a8, 0xb4b: 0x28b2, - 0xb4c: 0x29dc, 0xb4d: 0x29e9, 0xb4e: 0x29c2, 0xb4f: 0x29cf, 0xb50: 0x2ea9, 0xb51: 0x29f6, - 0xb52: 0x2a03, 0xb53: 0x2bbe, 0xb54: 0x26bb, 0xb55: 0x2bd1, 0xb56: 0x2be4, 0xb57: 0x2b2c, - 0xb58: 0x2a10, 0xb59: 0x2bf7, 0xb5a: 0x2c0a, 0xb5b: 0x2a1d, 0xb5c: 0x28bc, 0xb5d: 0x28c6, - 0xb5e: 0x2eb7, 0xb5f: 0x2a2a, 0xb60: 0x2b3c, 0xb61: 0x2ef5, 0xb62: 0x28d0, 0xb63: 0x28da, - 0xb64: 0x2a37, 0xb65: 0x28e4, 0xb66: 0x28ee, 0xb67: 0x26d0, 0xb68: 0x26d7, 0xb69: 0x28f8, - 0xb6a: 0x2902, 0xb6b: 0x2c1d, 0xb6c: 0x2a44, 0xb6d: 0x2b4c, 0xb6e: 0x2c30, 0xb6f: 0x2a51, - 0xb70: 0x2916, 0xb71: 0x290c, 0xb72: 0x2f3c, 0xb73: 0x2a5e, 0xb74: 0x2c43, 0xb75: 0x2920, - 0xb76: 0x2b5c, 0xb77: 0x292a, 0xb78: 0x2a78, 0xb79: 0x2934, 0xb7a: 0x2a85, 0xb7b: 0x2f06, - 0xb7c: 0x2a6b, 0xb7d: 0x2b6c, 0xb7e: 0x2a92, 0xb7f: 0x26de, + 0xb40: 0x1cc6, 0xb41: 0x1cd5, 0xb42: 0x1ce4, 0xb43: 0x1cf3, 0xb44: 0x1d02, 0xb45: 0x1d11, + 0xb46: 0x1d20, 0xb47: 0x1d2f, 0xb48: 0x1d3e, 0xb49: 0x218c, 0xb4a: 0x219e, 0xb4b: 0x21b0, + 0xb4c: 0x1954, 0xb4d: 0x1c04, 0xb4e: 0x19d2, 0xb4f: 0x1ba8, 0xb50: 0x04cb, 0xb51: 0x04d3, + 0xb52: 0x04db, 0xb53: 0x04e3, 0xb54: 0x04eb, 0xb55: 0x04ef, 0xb56: 0x04f3, 0xb57: 0x04f7, + 0xb58: 0x04fb, 0xb59: 0x04ff, 0xb5a: 0x0503, 0xb5b: 0x0507, 0xb5c: 0x050b, 0xb5d: 0x050f, + 0xb5e: 0x0513, 0xb5f: 0x0517, 0xb60: 0x051b, 0xb61: 0x0523, 0xb62: 0x0527, 0xb63: 0x052b, + 0xb64: 0x052f, 0xb65: 0x0533, 0xb66: 0x0537, 0xb67: 0x053b, 0xb68: 0x053f, 0xb69: 0x0543, + 0xb6a: 0x0547, 0xb6b: 0x054b, 0xb6c: 0x054f, 0xb6d: 0x0553, 0xb6e: 0x0557, 0xb6f: 0x055b, + 0xb70: 0x055f, 0xb71: 0x0563, 0xb72: 0x0567, 0xb73: 0x056f, 0xb74: 0x0577, 0xb75: 0x057f, + 0xb76: 0x0583, 0xb77: 0x0587, 0xb78: 0x058b, 0xb79: 0x058f, 0xb7a: 0x0593, 0xb7b: 0x0597, + 0xb7c: 0x059b, 0xb7d: 0x059f, 0xb7e: 0x05a3, // Block 0x2e, offset 0xb80 - 0xb80: 0x2f17, 0xb81: 0x293e, 0xb82: 0x2948, 0xb83: 0x2a9f, 0xb84: 0x2952, 0xb85: 0x295c, - 0xb86: 0x2966, 0xb87: 0x2b7c, 0xb88: 0x2aac, 0xb89: 0x26e5, 0xb8a: 0x2c56, 0xb8b: 0x2e90, - 0xb8c: 0x2b8c, 0xb8d: 0x2ab9, 0xb8e: 0x2ec5, 0xb8f: 0x2970, 0xb90: 0x297a, 0xb91: 0x2ac6, - 0xb92: 0x26ec, 0xb93: 0x2ad3, 0xb94: 0x2b9c, 0xb95: 0x26f3, 0xb96: 0x2c69, 0xb97: 0x2984, - 0xb98: 0x1cb7, 0xb99: 0x1ccb, 0xb9a: 0x1cda, 0xb9b: 0x1ce9, 0xb9c: 0x1cf8, 0xb9d: 0x1d07, - 0xb9e: 0x1d16, 0xb9f: 0x1d25, 0xba0: 0x1d34, 0xba1: 0x1d43, 0xba2: 0x2192, 0xba3: 0x21a4, - 0xba4: 0x21b6, 0xba5: 0x21c2, 0xba6: 0x21ce, 0xba7: 0x21da, 0xba8: 0x21e6, 0xba9: 0x21f2, - 0xbaa: 0x21fe, 0xbab: 0x220a, 0xbac: 0x2246, 0xbad: 0x2252, 0xbae: 0x225e, 0xbaf: 0x226a, - 0xbb0: 0x2276, 0xbb1: 0x1c14, 0xbb2: 0x19c6, 0xbb3: 0x1936, 0xbb4: 0x1be4, 0xbb5: 0x1a47, - 0xbb6: 0x1a56, 0xbb7: 0x19cc, 0xbb8: 0x1bfc, 0xbb9: 0x1c00, 0xbba: 0x1960, 0xbbb: 0x2701, - 0xbbc: 0x270f, 0xbbd: 0x26fa, 0xbbe: 0x2708, 0xbbf: 0x2ae0, + 0xb80: 0x2b0c, 0xb81: 0x29a8, 0xb82: 0x2b1c, 0xb83: 0x2880, 0xb84: 0x2ee4, 0xb85: 0x288a, + 0xb86: 0x2894, 0xb87: 0x2f28, 0xb88: 0x29b5, 0xb89: 0x289e, 0xb8a: 0x28a8, 0xb8b: 0x28b2, + 0xb8c: 0x29dc, 0xb8d: 0x29e9, 0xb8e: 0x29c2, 0xb8f: 0x29cf, 0xb90: 0x2ea9, 0xb91: 0x29f6, + 0xb92: 0x2a03, 0xb93: 0x2bbe, 0xb94: 0x26bb, 0xb95: 0x2bd1, 0xb96: 0x2be4, 0xb97: 0x2b2c, + 0xb98: 0x2a10, 0xb99: 0x2bf7, 0xb9a: 0x2c0a, 0xb9b: 0x2a1d, 0xb9c: 0x28bc, 0xb9d: 0x28c6, + 0xb9e: 0x2eb7, 0xb9f: 0x2a2a, 0xba0: 0x2b3c, 0xba1: 0x2ef5, 0xba2: 0x28d0, 0xba3: 0x28da, + 0xba4: 0x2a37, 0xba5: 0x28e4, 0xba6: 0x28ee, 0xba7: 0x26d0, 0xba8: 0x26d7, 0xba9: 0x28f8, + 0xbaa: 0x2902, 0xbab: 0x2c1d, 0xbac: 0x2a44, 0xbad: 0x2b4c, 0xbae: 0x2c30, 0xbaf: 0x2a51, + 0xbb0: 0x2916, 0xbb1: 0x290c, 0xbb2: 0x2f3c, 0xbb3: 0x2a5e, 0xbb4: 0x2c43, 0xbb5: 0x2920, + 0xbb6: 0x2b5c, 0xbb7: 0x292a, 0xbb8: 0x2a78, 0xbb9: 0x2934, 0xbba: 0x2a85, 0xbbb: 0x2f06, + 0xbbc: 0x2a6b, 0xbbd: 0x2b6c, 0xbbe: 0x2a92, 0xbbf: 0x26de, // Block 0x2f, offset 0xbc0 - 0xbc0: 0x1a4a, 0xbc1: 0x1a32, 0xbc2: 0x1c60, 0xbc3: 0x1a1a, 0xbc4: 0x19f3, 0xbc5: 0x1969, - 0xbc6: 0x1978, 0xbc7: 0x1948, 0xbc8: 0x1bf0, 0xbc9: 0x1d52, 0xbca: 0x1a4d, 0xbcb: 0x1a35, - 0xbcc: 0x1c64, 0xbcd: 0x1c70, 0xbce: 0x1a26, 0xbcf: 0x19fc, 0xbd0: 0x1957, 0xbd1: 0x1c1c, - 0xbd2: 0x1bb0, 0xbd3: 0x1b9c, 0xbd4: 0x1bcc, 0xbd5: 0x1c74, 0xbd6: 0x1a29, 0xbd7: 0x19c9, - 0xbd8: 0x19ff, 0xbd9: 0x19de, 0xbda: 0x1a41, 0xbdb: 0x1c78, 0xbdc: 0x1a2c, 0xbdd: 0x19c0, - 0xbde: 0x1a02, 0xbdf: 0x1c3c, 0xbe0: 0x1bf4, 0xbe1: 0x1a14, 0xbe2: 0x1c24, 0xbe3: 0x1c40, - 0xbe4: 0x1bf8, 0xbe5: 0x1a17, 0xbe6: 0x1c28, 0xbe7: 0x22e8, 0xbe8: 0x22fc, 0xbe9: 0x1996, - 0xbea: 0x1c20, 0xbeb: 0x1bb4, 0xbec: 0x1ba0, 0xbed: 0x1c48, 0xbee: 0x2716, 0xbef: 0x27ad, - 0xbf0: 0x1a59, 0xbf1: 0x1a44, 0xbf2: 0x1c7c, 0xbf3: 0x1a2f, 0xbf4: 0x1a50, 0xbf5: 0x1a38, - 0xbf6: 0x1c68, 0xbf7: 0x1a1d, 0xbf8: 0x19f6, 0xbf9: 0x1981, 0xbfa: 0x1a53, 0xbfb: 0x1a3b, - 0xbfc: 0x1c6c, 0xbfd: 0x1a20, 0xbfe: 0x19f9, 0xbff: 0x1984, + 0xbc0: 0x2f17, 0xbc1: 0x293e, 0xbc2: 0x2948, 0xbc3: 0x2a9f, 0xbc4: 0x2952, 0xbc5: 0x295c, + 0xbc6: 0x2966, 0xbc7: 0x2b7c, 0xbc8: 0x2aac, 0xbc9: 0x26e5, 0xbca: 0x2c56, 0xbcb: 0x2e90, + 0xbcc: 0x2b8c, 0xbcd: 0x2ab9, 0xbce: 0x2ec5, 0xbcf: 0x2970, 0xbd0: 0x297a, 0xbd1: 0x2ac6, + 0xbd2: 0x26ec, 0xbd3: 0x2ad3, 0xbd4: 0x2b9c, 0xbd5: 0x26f3, 0xbd6: 0x2c69, 0xbd7: 0x2984, + 0xbd8: 0x1cb7, 0xbd9: 0x1ccb, 0xbda: 0x1cda, 0xbdb: 0x1ce9, 0xbdc: 0x1cf8, 0xbdd: 0x1d07, + 0xbde: 0x1d16, 0xbdf: 0x1d25, 0xbe0: 0x1d34, 0xbe1: 0x1d43, 0xbe2: 0x2192, 0xbe3: 0x21a4, + 0xbe4: 0x21b6, 0xbe5: 0x21c2, 0xbe6: 0x21ce, 0xbe7: 0x21da, 0xbe8: 0x21e6, 0xbe9: 0x21f2, + 0xbea: 0x21fe, 0xbeb: 0x220a, 0xbec: 0x2246, 0xbed: 0x2252, 0xbee: 0x225e, 0xbef: 0x226a, + 0xbf0: 0x2276, 0xbf1: 0x1c14, 0xbf2: 0x19c6, 0xbf3: 0x1936, 0xbf4: 0x1be4, 0xbf5: 0x1a47, + 0xbf6: 0x1a56, 0xbf7: 0x19cc, 0xbf8: 0x1bfc, 0xbf9: 0x1c00, 0xbfa: 0x1960, 0xbfb: 0x2701, + 0xbfc: 0x270f, 0xbfd: 0x26fa, 0xbfe: 0x2708, 0xbff: 0x2ae0, // Block 0x30, offset 0xc00 - 0xc00: 0x1c2c, 0xc01: 0x1bb8, 0xc02: 0x1d4d, 0xc03: 0x1939, 0xc04: 0x19ba, 0xc05: 0x19bd, - 0xc06: 0x22f5, 0xc07: 0x1b94, 0xc08: 0x19c3, 0xc09: 0x194b, 0xc0a: 0x19e1, 0xc0b: 0x194e, - 0xc0c: 0x19ea, 0xc0d: 0x196c, 0xc0e: 0x196f, 0xc0f: 0x1a05, 0xc10: 0x1a0b, 0xc11: 0x1a0e, - 0xc12: 0x1c30, 0xc13: 0x1a11, 0xc14: 0x1a23, 0xc15: 0x1c38, 0xc16: 0x1c44, 0xc17: 0x1990, - 0xc18: 0x1d57, 0xc19: 0x1bbc, 0xc1a: 0x1993, 0xc1b: 0x1a5c, 0xc1c: 0x19a5, 0xc1d: 0x19b4, - 0xc1e: 0x22e2, 0xc1f: 0x22dc, 0xc20: 0x1cc1, 0xc21: 0x1cd0, 0xc22: 0x1cdf, 0xc23: 0x1cee, - 0xc24: 0x1cfd, 0xc25: 0x1d0c, 0xc26: 0x1d1b, 0xc27: 0x1d2a, 0xc28: 0x1d39, 0xc29: 0x2186, - 0xc2a: 0x2198, 0xc2b: 0x21aa, 0xc2c: 0x21bc, 0xc2d: 0x21c8, 0xc2e: 0x21d4, 0xc2f: 0x21e0, - 0xc30: 0x21ec, 0xc31: 0x21f8, 0xc32: 0x2204, 0xc33: 0x2240, 0xc34: 0x224c, 0xc35: 0x2258, - 0xc36: 0x2264, 0xc37: 0x2270, 0xc38: 0x227c, 0xc39: 0x2282, 0xc3a: 0x2288, 0xc3b: 0x228e, - 0xc3c: 0x2294, 0xc3d: 0x22a6, 0xc3e: 0x22ac, 0xc3f: 0x1c10, + 0xc00: 0x1a4a, 0xc01: 0x1a32, 0xc02: 0x1c60, 0xc03: 0x1a1a, 0xc04: 0x19f3, 0xc05: 0x1969, + 0xc06: 0x1978, 0xc07: 0x1948, 0xc08: 0x1bf0, 0xc09: 0x1d52, 0xc0a: 0x1a4d, 0xc0b: 0x1a35, + 0xc0c: 0x1c64, 0xc0d: 0x1c70, 0xc0e: 0x1a26, 0xc0f: 0x19fc, 0xc10: 0x1957, 0xc11: 0x1c1c, + 0xc12: 0x1bb0, 0xc13: 0x1b9c, 0xc14: 0x1bcc, 0xc15: 0x1c74, 0xc16: 0x1a29, 0xc17: 0x19c9, + 0xc18: 0x19ff, 0xc19: 0x19de, 0xc1a: 0x1a41, 0xc1b: 0x1c78, 0xc1c: 0x1a2c, 0xc1d: 0x19c0, + 0xc1e: 0x1a02, 0xc1f: 0x1c3c, 0xc20: 0x1bf4, 0xc21: 0x1a14, 0xc22: 0x1c24, 0xc23: 0x1c40, + 0xc24: 0x1bf8, 0xc25: 0x1a17, 0xc26: 0x1c28, 0xc27: 0x22e8, 0xc28: 0x22fc, 0xc29: 0x1996, + 0xc2a: 0x1c20, 0xc2b: 0x1bb4, 0xc2c: 0x1ba0, 0xc2d: 0x1c48, 0xc2e: 0x2716, 0xc2f: 0x27ad, + 0xc30: 0x1a59, 0xc31: 0x1a44, 0xc32: 0x1c7c, 0xc33: 0x1a2f, 0xc34: 0x1a50, 0xc35: 0x1a38, + 0xc36: 0x1c68, 0xc37: 0x1a1d, 0xc38: 0x19f6, 0xc39: 0x1981, 0xc3a: 0x1a53, 0xc3b: 0x1a3b, + 0xc3c: 0x1c6c, 0xc3d: 0x1a20, 0xc3e: 0x19f9, 0xc3f: 0x1984, // Block 0x31, offset 0xc40 - 0xc40: 0x1377, 0xc41: 0x0cfb, 0xc42: 0x13d3, 0xc43: 0x139f, 0xc44: 0x0e57, 0xc45: 0x06eb, - 0xc46: 0x08df, 0xc47: 0x162b, 0xc48: 0x162b, 0xc49: 0x0a0b, 0xc4a: 0x145f, 0xc4b: 0x0943, - 0xc4c: 0x0a07, 0xc4d: 0x0bef, 0xc4e: 0x0fcf, 0xc4f: 0x115f, 0xc50: 0x1297, 0xc51: 0x12d3, - 0xc52: 0x1307, 0xc53: 0x141b, 0xc54: 0x0d73, 0xc55: 0x0dff, 0xc56: 0x0eab, 0xc57: 0x0f43, - 0xc58: 0x125f, 0xc59: 0x1447, 0xc5a: 0x1573, 0xc5b: 0x070f, 0xc5c: 0x08b3, 0xc5d: 0x0d87, - 0xc5e: 0x0ecf, 0xc5f: 0x1293, 0xc60: 0x15c3, 0xc61: 0x0ab3, 0xc62: 0x0e77, 0xc63: 0x1283, - 0xc64: 0x1317, 0xc65: 0x0c23, 0xc66: 0x11bb, 0xc67: 0x12df, 0xc68: 0x0b1f, 0xc69: 0x0d0f, - 0xc6a: 0x0e17, 0xc6b: 0x0f1b, 0xc6c: 0x1427, 0xc6d: 0x074f, 0xc6e: 0x07e7, 0xc6f: 0x0853, - 0xc70: 0x0c8b, 0xc71: 0x0d7f, 0xc72: 0x0ecb, 0xc73: 0x0fef, 0xc74: 0x1177, 0xc75: 0x128b, - 0xc76: 0x12a3, 0xc77: 0x13c7, 0xc78: 0x14ef, 0xc79: 0x15a3, 0xc7a: 0x15bf, 0xc7b: 0x102b, - 0xc7c: 0x106b, 0xc7d: 0x1123, 0xc7e: 0x1243, 0xc7f: 0x147b, + 0xc40: 0x1c2c, 0xc41: 0x1bb8, 0xc42: 0x1d4d, 0xc43: 0x1939, 0xc44: 0x19ba, 0xc45: 0x19bd, + 0xc46: 0x22f5, 0xc47: 0x1b94, 0xc48: 0x19c3, 0xc49: 0x194b, 0xc4a: 0x19e1, 0xc4b: 0x194e, + 0xc4c: 0x19ea, 0xc4d: 0x196c, 0xc4e: 0x196f, 0xc4f: 0x1a05, 0xc50: 0x1a0b, 0xc51: 0x1a0e, + 0xc52: 0x1c30, 0xc53: 0x1a11, 0xc54: 0x1a23, 0xc55: 0x1c38, 0xc56: 0x1c44, 0xc57: 0x1990, + 0xc58: 0x1d57, 0xc59: 0x1bbc, 0xc5a: 0x1993, 0xc5b: 0x1a5c, 0xc5c: 0x19a5, 0xc5d: 0x19b4, + 0xc5e: 0x22e2, 0xc5f: 0x22dc, 0xc60: 0x1cc1, 0xc61: 0x1cd0, 0xc62: 0x1cdf, 0xc63: 0x1cee, + 0xc64: 0x1cfd, 0xc65: 0x1d0c, 0xc66: 0x1d1b, 0xc67: 0x1d2a, 0xc68: 0x1d39, 0xc69: 0x2186, + 0xc6a: 0x2198, 0xc6b: 0x21aa, 0xc6c: 0x21bc, 0xc6d: 0x21c8, 0xc6e: 0x21d4, 0xc6f: 0x21e0, + 0xc70: 0x21ec, 0xc71: 0x21f8, 0xc72: 0x2204, 0xc73: 0x2240, 0xc74: 0x224c, 0xc75: 0x2258, + 0xc76: 0x2264, 0xc77: 0x2270, 0xc78: 0x227c, 0xc79: 0x2282, 0xc7a: 0x2288, 0xc7b: 0x228e, + 0xc7c: 0x2294, 0xc7d: 0x22a6, 0xc7e: 0x22ac, 0xc7f: 0x1c10, // Block 0x32, offset 0xc80 - 0xc80: 0x15cb, 0xc81: 0x134b, 0xc82: 0x09c7, 0xc83: 0x0b3b, 0xc84: 0x10db, 0xc85: 0x119b, - 0xc86: 0x0eff, 0xc87: 0x1033, 0xc88: 0x1397, 0xc89: 0x14e7, 0xc8a: 0x09c3, 0xc8b: 0x0a8f, - 0xc8c: 0x0d77, 0xc8d: 0x0e2b, 0xc8e: 0x0e5f, 0xc8f: 0x1113, 0xc90: 0x113b, 0xc91: 0x14a7, - 0xc92: 0x084f, 0xc93: 0x11a7, 0xc94: 0x07f3, 0xc95: 0x07ef, 0xc96: 0x1097, 0xc97: 0x1127, - 0xc98: 0x125b, 0xc99: 0x14af, 0xc9a: 0x1367, 0xc9b: 0x0c27, 0xc9c: 0x0d73, 0xc9d: 0x1357, - 0xc9e: 0x06f7, 0xc9f: 0x0a63, 0xca0: 0x0b93, 0xca1: 0x0f2f, 0xca2: 0x0faf, 0xca3: 0x0873, - 0xca4: 0x103b, 0xca5: 0x075f, 0xca6: 0x0b77, 0xca7: 0x06d7, 0xca8: 0x0deb, 0xca9: 0x0ca3, - 0xcaa: 0x110f, 0xcab: 0x08c7, 0xcac: 0x09b3, 0xcad: 0x0ffb, 0xcae: 0x1263, 0xcaf: 0x133b, - 0xcb0: 0x0db7, 0xcb1: 0x13f7, 0xcb2: 0x0de3, 0xcb3: 0x0c37, 0xcb4: 0x121b, 0xcb5: 0x0c57, - 0xcb6: 0x0fab, 0xcb7: 0x072b, 0xcb8: 0x07a7, 0xcb9: 0x07eb, 0xcba: 0x0d53, 0xcbb: 0x10fb, - 0xcbc: 0x11f3, 0xcbd: 0x1347, 0xcbe: 0x145b, 0xcbf: 0x085b, + 0xc80: 0x1377, 0xc81: 0x0cfb, 0xc82: 0x13d3, 0xc83: 0x139f, 0xc84: 0x0e57, 0xc85: 0x06eb, + 0xc86: 0x08df, 0xc87: 0x162b, 0xc88: 0x162b, 0xc89: 0x0a0b, 0xc8a: 0x145f, 0xc8b: 0x0943, + 0xc8c: 0x0a07, 0xc8d: 0x0bef, 0xc8e: 0x0fcf, 0xc8f: 0x115f, 0xc90: 0x1297, 0xc91: 0x12d3, + 0xc92: 0x1307, 0xc93: 0x141b, 0xc94: 0x0d73, 0xc95: 0x0dff, 0xc96: 0x0eab, 0xc97: 0x0f43, + 0xc98: 0x125f, 0xc99: 0x1447, 0xc9a: 0x1573, 0xc9b: 0x070f, 0xc9c: 0x08b3, 0xc9d: 0x0d87, + 0xc9e: 0x0ecf, 0xc9f: 0x1293, 0xca0: 0x15c3, 0xca1: 0x0ab3, 0xca2: 0x0e77, 0xca3: 0x1283, + 0xca4: 0x1317, 0xca5: 0x0c23, 0xca6: 0x11bb, 0xca7: 0x12df, 0xca8: 0x0b1f, 0xca9: 0x0d0f, + 0xcaa: 0x0e17, 0xcab: 0x0f1b, 0xcac: 0x1427, 0xcad: 0x074f, 0xcae: 0x07e7, 0xcaf: 0x0853, + 0xcb0: 0x0c8b, 0xcb1: 0x0d7f, 0xcb2: 0x0ecb, 0xcb3: 0x0fef, 0xcb4: 0x1177, 0xcb5: 0x128b, + 0xcb6: 0x12a3, 0xcb7: 0x13c7, 0xcb8: 0x14ef, 0xcb9: 0x15a3, 0xcba: 0x15bf, 0xcbb: 0x102b, + 0xcbc: 0x106b, 0xcbd: 0x1123, 0xcbe: 0x1243, 0xcbf: 0x147b, // Block 0x33, offset 0xcc0 - 0xcc0: 0x090f, 0xcc1: 0x0a17, 0xcc2: 0x0b2f, 0xcc3: 0x0cbf, 0xcc4: 0x0e7b, 0xcc5: 0x103f, - 0xcc6: 0x1497, 0xcc7: 0x157b, 0xcc8: 0x15cf, 0xcc9: 0x15e7, 0xcca: 0x0837, 0xccb: 0x0cf3, - 0xccc: 0x0da3, 0xccd: 0x13eb, 0xcce: 0x0afb, 0xccf: 0x0bd7, 0xcd0: 0x0bf3, 0xcd1: 0x0c83, - 0xcd2: 0x0e6b, 0xcd3: 0x0eb7, 0xcd4: 0x0f67, 0xcd5: 0x108b, 0xcd6: 0x112f, 0xcd7: 0x1193, - 0xcd8: 0x13db, 0xcd9: 0x126b, 0xcda: 0x1403, 0xcdb: 0x147f, 0xcdc: 0x080f, 0xcdd: 0x083b, - 0xcde: 0x0923, 0xcdf: 0x0ea7, 0xce0: 0x12f3, 0xce1: 0x133b, 0xce2: 0x0b1b, 0xce3: 0x0b8b, - 0xce4: 0x0c4f, 0xce5: 0x0daf, 0xce6: 0x10d7, 0xce7: 0x0f23, 0xce8: 0x073b, 0xce9: 0x097f, - 0xcea: 0x0a63, 0xceb: 0x0ac7, 0xcec: 0x0b97, 0xced: 0x0f3f, 0xcee: 0x0f5b, 0xcef: 0x116b, - 0xcf0: 0x118b, 0xcf1: 0x1463, 0xcf2: 0x14e3, 0xcf3: 0x14f3, 0xcf4: 0x152f, 0xcf5: 0x0753, - 0xcf6: 0x107f, 0xcf7: 0x144f, 0xcf8: 0x14cb, 0xcf9: 0x0baf, 0xcfa: 0x0717, 0xcfb: 0x0777, - 0xcfc: 0x0a67, 0xcfd: 0x0a87, 0xcfe: 0x0caf, 0xcff: 0x0d73, + 0xcc0: 0x15cb, 0xcc1: 0x134b, 0xcc2: 0x09c7, 0xcc3: 0x0b3b, 0xcc4: 0x10db, 0xcc5: 0x119b, + 0xcc6: 0x0eff, 0xcc7: 0x1033, 0xcc8: 0x1397, 0xcc9: 0x14e7, 0xcca: 0x09c3, 0xccb: 0x0a8f, + 0xccc: 0x0d77, 0xccd: 0x0e2b, 0xcce: 0x0e5f, 0xccf: 0x1113, 0xcd0: 0x113b, 0xcd1: 0x14a7, + 0xcd2: 0x084f, 0xcd3: 0x11a7, 0xcd4: 0x07f3, 0xcd5: 0x07ef, 0xcd6: 0x1097, 0xcd7: 0x1127, + 0xcd8: 0x125b, 0xcd9: 0x14af, 0xcda: 0x1367, 0xcdb: 0x0c27, 0xcdc: 0x0d73, 0xcdd: 0x1357, + 0xcde: 0x06f7, 0xcdf: 0x0a63, 0xce0: 0x0b93, 0xce1: 0x0f2f, 0xce2: 0x0faf, 0xce3: 0x0873, + 0xce4: 0x103b, 0xce5: 0x075f, 0xce6: 0x0b77, 0xce7: 0x06d7, 0xce8: 0x0deb, 0xce9: 0x0ca3, + 0xcea: 0x110f, 0xceb: 0x08c7, 0xcec: 0x09b3, 0xced: 0x0ffb, 0xcee: 0x1263, 0xcef: 0x133b, + 0xcf0: 0x0db7, 0xcf1: 0x13f7, 0xcf2: 0x0de3, 0xcf3: 0x0c37, 0xcf4: 0x121b, 0xcf5: 0x0c57, + 0xcf6: 0x0fab, 0xcf7: 0x072b, 0xcf8: 0x07a7, 0xcf9: 0x07eb, 0xcfa: 0x0d53, 0xcfb: 0x10fb, + 0xcfc: 0x11f3, 0xcfd: 0x1347, 0xcfe: 0x145b, 0xcff: 0x085b, // Block 0x34, offset 0xd00 - 0xd00: 0x0ec3, 0xd01: 0x0fcb, 0xd02: 0x1277, 0xd03: 0x1417, 0xd04: 0x1623, 0xd05: 0x0ce3, - 0xd06: 0x14a3, 0xd07: 0x0833, 0xd08: 0x0d2f, 0xd09: 0x0d3b, 0xd0a: 0x0e0f, 0xd0b: 0x0e47, - 0xd0c: 0x0f4b, 0xd0d: 0x0fa7, 0xd0e: 0x1027, 0xd0f: 0x110b, 0xd10: 0x153b, 0xd11: 0x07af, - 0xd12: 0x0c03, 0xd13: 0x14b3, 0xd14: 0x0767, 0xd15: 0x0aab, 0xd16: 0x0e2f, 0xd17: 0x13df, - 0xd18: 0x0b67, 0xd19: 0x0bb7, 0xd1a: 0x0d43, 0xd1b: 0x0f2f, 0xd1c: 0x14bb, 0xd1d: 0x0817, - 0xd1e: 0x08ff, 0xd1f: 0x0a97, 0xd20: 0x0cd3, 0xd21: 0x0d1f, 0xd22: 0x0d5f, 0xd23: 0x0df3, - 0xd24: 0x0f47, 0xd25: 0x0fbb, 0xd26: 0x1157, 0xd27: 0x12f7, 0xd28: 0x1303, 0xd29: 0x1457, - 0xd2a: 0x14d7, 0xd2b: 0x0883, 0xd2c: 0x0e4b, 0xd2d: 0x0903, 0xd2e: 0x0ec7, 0xd2f: 0x0f6b, - 0xd30: 0x1287, 0xd31: 0x14bf, 0xd32: 0x15ab, 0xd33: 0x15d3, 0xd34: 0x0d37, 0xd35: 0x0e27, - 0xd36: 0x11c3, 0xd37: 0x10b7, 0xd38: 0x10c3, 0xd39: 0x10e7, 0xd3a: 0x0f17, 0xd3b: 0x0e9f, - 0xd3c: 0x1363, 0xd3d: 0x0733, 0xd3e: 0x122b, 0xd3f: 0x081b, + 0xd00: 0x090f, 0xd01: 0x0a17, 0xd02: 0x0b2f, 0xd03: 0x0cbf, 0xd04: 0x0e7b, 0xd05: 0x103f, + 0xd06: 0x1497, 0xd07: 0x157b, 0xd08: 0x15cf, 0xd09: 0x15e7, 0xd0a: 0x0837, 0xd0b: 0x0cf3, + 0xd0c: 0x0da3, 0xd0d: 0x13eb, 0xd0e: 0x0afb, 0xd0f: 0x0bd7, 0xd10: 0x0bf3, 0xd11: 0x0c83, + 0xd12: 0x0e6b, 0xd13: 0x0eb7, 0xd14: 0x0f67, 0xd15: 0x108b, 0xd16: 0x112f, 0xd17: 0x1193, + 0xd18: 0x13db, 0xd19: 0x126b, 0xd1a: 0x1403, 0xd1b: 0x147f, 0xd1c: 0x080f, 0xd1d: 0x083b, + 0xd1e: 0x0923, 0xd1f: 0x0ea7, 0xd20: 0x12f3, 0xd21: 0x133b, 0xd22: 0x0b1b, 0xd23: 0x0b8b, + 0xd24: 0x0c4f, 0xd25: 0x0daf, 0xd26: 0x10d7, 0xd27: 0x0f23, 0xd28: 0x073b, 0xd29: 0x097f, + 0xd2a: 0x0a63, 0xd2b: 0x0ac7, 0xd2c: 0x0b97, 0xd2d: 0x0f3f, 0xd2e: 0x0f5b, 0xd2f: 0x116b, + 0xd30: 0x118b, 0xd31: 0x1463, 0xd32: 0x14e3, 0xd33: 0x14f3, 0xd34: 0x152f, 0xd35: 0x0753, + 0xd36: 0x107f, 0xd37: 0x144f, 0xd38: 0x14cb, 0xd39: 0x0baf, 0xd3a: 0x0717, 0xd3b: 0x0777, + 0xd3c: 0x0a67, 0xd3d: 0x0a87, 0xd3e: 0x0caf, 0xd3f: 0x0d73, // Block 0x35, offset 0xd40 - 0xd40: 0x080b, 0xd41: 0x0b0b, 0xd42: 0x0c2b, 0xd43: 0x10f3, 0xd44: 0x0a53, 0xd45: 0x0e03, - 0xd46: 0x0cef, 0xd47: 0x13e7, 0xd48: 0x12e7, 0xd49: 0x14ab, 0xd4a: 0x1323, 0xd4b: 0x0b27, - 0xd4c: 0x0787, 0xd4d: 0x095b, 0xd50: 0x09af, - 0xd52: 0x0cdf, 0xd55: 0x07f7, 0xd56: 0x0f1f, 0xd57: 0x0fe3, - 0xd58: 0x1047, 0xd59: 0x1063, 0xd5a: 0x1067, 0xd5b: 0x107b, 0xd5c: 0x14fb, 0xd5d: 0x10eb, - 0xd5e: 0x116f, 0xd60: 0x128f, 0xd62: 0x1353, - 0xd65: 0x1407, 0xd66: 0x1433, - 0xd6a: 0x154f, 0xd6b: 0x1553, 0xd6c: 0x1557, 0xd6d: 0x15bb, 0xd6e: 0x142b, 0xd6f: 0x14c7, - 0xd70: 0x0757, 0xd71: 0x077b, 0xd72: 0x078f, 0xd73: 0x084b, 0xd74: 0x0857, 0xd75: 0x0897, - 0xd76: 0x094b, 0xd77: 0x0967, 0xd78: 0x096f, 0xd79: 0x09ab, 0xd7a: 0x09b7, 0xd7b: 0x0a93, - 0xd7c: 0x0a9b, 0xd7d: 0x0ba3, 0xd7e: 0x0bcb, 0xd7f: 0x0bd3, + 0xd40: 0x0ec3, 0xd41: 0x0fcb, 0xd42: 0x1277, 0xd43: 0x1417, 0xd44: 0x1623, 0xd45: 0x0ce3, + 0xd46: 0x14a3, 0xd47: 0x0833, 0xd48: 0x0d2f, 0xd49: 0x0d3b, 0xd4a: 0x0e0f, 0xd4b: 0x0e47, + 0xd4c: 0x0f4b, 0xd4d: 0x0fa7, 0xd4e: 0x1027, 0xd4f: 0x110b, 0xd50: 0x153b, 0xd51: 0x07af, + 0xd52: 0x0c03, 0xd53: 0x14b3, 0xd54: 0x0767, 0xd55: 0x0aab, 0xd56: 0x0e2f, 0xd57: 0x13df, + 0xd58: 0x0b67, 0xd59: 0x0bb7, 0xd5a: 0x0d43, 0xd5b: 0x0f2f, 0xd5c: 0x14bb, 0xd5d: 0x0817, + 0xd5e: 0x08ff, 0xd5f: 0x0a97, 0xd60: 0x0cd3, 0xd61: 0x0d1f, 0xd62: 0x0d5f, 0xd63: 0x0df3, + 0xd64: 0x0f47, 0xd65: 0x0fbb, 0xd66: 0x1157, 0xd67: 0x12f7, 0xd68: 0x1303, 0xd69: 0x1457, + 0xd6a: 0x14d7, 0xd6b: 0x0883, 0xd6c: 0x0e4b, 0xd6d: 0x0903, 0xd6e: 0x0ec7, 0xd6f: 0x0f6b, + 0xd70: 0x1287, 0xd71: 0x14bf, 0xd72: 0x15ab, 0xd73: 0x15d3, 0xd74: 0x0d37, 0xd75: 0x0e27, + 0xd76: 0x11c3, 0xd77: 0x10b7, 0xd78: 0x10c3, 0xd79: 0x10e7, 0xd7a: 0x0f17, 0xd7b: 0x0e9f, + 0xd7c: 0x1363, 0xd7d: 0x0733, 0xd7e: 0x122b, 0xd7f: 0x081b, // Block 0x36, offset 0xd80 - 0xd80: 0x0beb, 0xd81: 0x0c97, 0xd82: 0x0cc7, 0xd83: 0x0ce7, 0xd84: 0x0d57, 0xd85: 0x0e1b, - 0xd86: 0x0e37, 0xd87: 0x0e67, 0xd88: 0x0ebb, 0xd89: 0x0edb, 0xd8a: 0x0f4f, 0xd8b: 0x102f, - 0xd8c: 0x104b, 0xd8d: 0x1053, 0xd8e: 0x104f, 0xd8f: 0x1057, 0xd90: 0x105b, 0xd91: 0x105f, - 0xd92: 0x1073, 0xd93: 0x1077, 0xd94: 0x109b, 0xd95: 0x10af, 0xd96: 0x10cb, 0xd97: 0x112f, - 0xd98: 0x1137, 0xd99: 0x113f, 0xd9a: 0x1153, 0xd9b: 0x117b, 0xd9c: 0x11cb, 0xd9d: 0x11ff, - 0xd9e: 0x11ff, 0xd9f: 0x1267, 0xda0: 0x130f, 0xda1: 0x1327, 0xda2: 0x135b, 0xda3: 0x135f, - 0xda4: 0x13a3, 0xda5: 0x13a7, 0xda6: 0x13ff, 0xda7: 0x1407, 0xda8: 0x14db, 0xda9: 0x151f, - 0xdaa: 0x1537, 0xdab: 0x0b9b, 0xdac: 0x171e, 0xdad: 0x11e3, - 0xdb0: 0x06df, 0xdb1: 0x07e3, 0xdb2: 0x07a3, 0xdb3: 0x074b, 0xdb4: 0x078b, 0xdb5: 0x07b7, - 0xdb6: 0x0847, 0xdb7: 0x0863, 0xdb8: 0x094b, 0xdb9: 0x0937, 0xdba: 0x0947, 0xdbb: 0x0963, - 0xdbc: 0x09af, 0xdbd: 0x09bf, 0xdbe: 0x0a03, 0xdbf: 0x0a0f, + 0xd80: 0x080b, 0xd81: 0x0b0b, 0xd82: 0x0c2b, 0xd83: 0x10f3, 0xd84: 0x0a53, 0xd85: 0x0e03, + 0xd86: 0x0cef, 0xd87: 0x13e7, 0xd88: 0x12e7, 0xd89: 0x14ab, 0xd8a: 0x1323, 0xd8b: 0x0b27, + 0xd8c: 0x0787, 0xd8d: 0x095b, 0xd90: 0x09af, + 0xd92: 0x0cdf, 0xd95: 0x07f7, 0xd96: 0x0f1f, 0xd97: 0x0fe3, + 0xd98: 0x1047, 0xd99: 0x1063, 0xd9a: 0x1067, 0xd9b: 0x107b, 0xd9c: 0x14fb, 0xd9d: 0x10eb, + 0xd9e: 0x116f, 0xda0: 0x128f, 0xda2: 0x1353, + 0xda5: 0x1407, 0xda6: 0x1433, + 0xdaa: 0x154f, 0xdab: 0x1553, 0xdac: 0x1557, 0xdad: 0x15bb, 0xdae: 0x142b, 0xdaf: 0x14c7, + 0xdb0: 0x0757, 0xdb1: 0x077b, 0xdb2: 0x078f, 0xdb3: 0x084b, 0xdb4: 0x0857, 0xdb5: 0x0897, + 0xdb6: 0x094b, 0xdb7: 0x0967, 0xdb8: 0x096f, 0xdb9: 0x09ab, 0xdba: 0x09b7, 0xdbb: 0x0a93, + 0xdbc: 0x0a9b, 0xdbd: 0x0ba3, 0xdbe: 0x0bcb, 0xdbf: 0x0bd3, // Block 0x37, offset 0xdc0 - 0xdc0: 0x0a2b, 0xdc1: 0x0a3b, 0xdc2: 0x0b23, 0xdc3: 0x0b2b, 0xdc4: 0x0b5b, 0xdc5: 0x0b7b, - 0xdc6: 0x0bab, 0xdc7: 0x0bc3, 0xdc8: 0x0bb3, 0xdc9: 0x0bd3, 0xdca: 0x0bc7, 0xdcb: 0x0beb, - 0xdcc: 0x0c07, 0xdcd: 0x0c5f, 0xdce: 0x0c6b, 0xdcf: 0x0c73, 0xdd0: 0x0c9b, 0xdd1: 0x0cdf, - 0xdd2: 0x0d0f, 0xdd3: 0x0d13, 0xdd4: 0x0d27, 0xdd5: 0x0da7, 0xdd6: 0x0db7, 0xdd7: 0x0e0f, - 0xdd8: 0x0e5b, 0xdd9: 0x0e53, 0xdda: 0x0e67, 0xddb: 0x0e83, 0xddc: 0x0ebb, 0xddd: 0x1013, - 0xdde: 0x0edf, 0xddf: 0x0f13, 0xde0: 0x0f1f, 0xde1: 0x0f5f, 0xde2: 0x0f7b, 0xde3: 0x0f9f, - 0xde4: 0x0fc3, 0xde5: 0x0fc7, 0xde6: 0x0fe3, 0xde7: 0x0fe7, 0xde8: 0x0ff7, 0xde9: 0x100b, - 0xdea: 0x1007, 0xdeb: 0x1037, 0xdec: 0x10b3, 0xded: 0x10cb, 0xdee: 0x10e3, 0xdef: 0x111b, - 0xdf0: 0x112f, 0xdf1: 0x114b, 0xdf2: 0x117b, 0xdf3: 0x122f, 0xdf4: 0x1257, 0xdf5: 0x12cb, - 0xdf6: 0x1313, 0xdf7: 0x131f, 0xdf8: 0x1327, 0xdf9: 0x133f, 0xdfa: 0x1353, 0xdfb: 0x1343, - 0xdfc: 0x135b, 0xdfd: 0x1357, 0xdfe: 0x134f, 0xdff: 0x135f, + 0xdc0: 0x0beb, 0xdc1: 0x0c97, 0xdc2: 0x0cc7, 0xdc3: 0x0ce7, 0xdc4: 0x0d57, 0xdc5: 0x0e1b, + 0xdc6: 0x0e37, 0xdc7: 0x0e67, 0xdc8: 0x0ebb, 0xdc9: 0x0edb, 0xdca: 0x0f4f, 0xdcb: 0x102f, + 0xdcc: 0x104b, 0xdcd: 0x1053, 0xdce: 0x104f, 0xdcf: 0x1057, 0xdd0: 0x105b, 0xdd1: 0x105f, + 0xdd2: 0x1073, 0xdd3: 0x1077, 0xdd4: 0x109b, 0xdd5: 0x10af, 0xdd6: 0x10cb, 0xdd7: 0x112f, + 0xdd8: 0x1137, 0xdd9: 0x113f, 0xdda: 0x1153, 0xddb: 0x117b, 0xddc: 0x11cb, 0xddd: 0x11ff, + 0xdde: 0x11ff, 0xddf: 0x1267, 0xde0: 0x130f, 0xde1: 0x1327, 0xde2: 0x135b, 0xde3: 0x135f, + 0xde4: 0x13a3, 0xde5: 0x13a7, 0xde6: 0x13ff, 0xde7: 0x1407, 0xde8: 0x14db, 0xde9: 0x151f, + 0xdea: 0x1537, 0xdeb: 0x0b9b, 0xdec: 0x171e, 0xded: 0x11e3, + 0xdf0: 0x06df, 0xdf1: 0x07e3, 0xdf2: 0x07a3, 0xdf3: 0x074b, 0xdf4: 0x078b, 0xdf5: 0x07b7, + 0xdf6: 0x0847, 0xdf7: 0x0863, 0xdf8: 0x094b, 0xdf9: 0x0937, 0xdfa: 0x0947, 0xdfb: 0x0963, + 0xdfc: 0x09af, 0xdfd: 0x09bf, 0xdfe: 0x0a03, 0xdff: 0x0a0f, // Block 0x38, offset 0xe00 - 0xe00: 0x136b, 0xe01: 0x13a7, 0xe02: 0x13e3, 0xe03: 0x1413, 0xe04: 0x144b, 0xe05: 0x146b, - 0xe06: 0x14b7, 0xe07: 0x14db, 0xe08: 0x14fb, 0xe09: 0x150f, 0xe0a: 0x151f, 0xe0b: 0x152b, - 0xe0c: 0x1537, 0xe0d: 0x158b, 0xe0e: 0x162b, 0xe0f: 0x16b5, 0xe10: 0x16b0, 0xe11: 0x16e2, - 0xe12: 0x0607, 0xe13: 0x062f, 0xe14: 0x0633, 0xe15: 0x1764, 0xe16: 0x1791, 0xe17: 0x1809, - 0xe18: 0x1617, 0xe19: 0x1627, + 0xe00: 0x0a2b, 0xe01: 0x0a3b, 0xe02: 0x0b23, 0xe03: 0x0b2b, 0xe04: 0x0b5b, 0xe05: 0x0b7b, + 0xe06: 0x0bab, 0xe07: 0x0bc3, 0xe08: 0x0bb3, 0xe09: 0x0bd3, 0xe0a: 0x0bc7, 0xe0b: 0x0beb, + 0xe0c: 0x0c07, 0xe0d: 0x0c5f, 0xe0e: 0x0c6b, 0xe0f: 0x0c73, 0xe10: 0x0c9b, 0xe11: 0x0cdf, + 0xe12: 0x0d0f, 0xe13: 0x0d13, 0xe14: 0x0d27, 0xe15: 0x0da7, 0xe16: 0x0db7, 0xe17: 0x0e0f, + 0xe18: 0x0e5b, 0xe19: 0x0e53, 0xe1a: 0x0e67, 0xe1b: 0x0e83, 0xe1c: 0x0ebb, 0xe1d: 0x1013, + 0xe1e: 0x0edf, 0xe1f: 0x0f13, 0xe20: 0x0f1f, 0xe21: 0x0f5f, 0xe22: 0x0f7b, 0xe23: 0x0f9f, + 0xe24: 0x0fc3, 0xe25: 0x0fc7, 0xe26: 0x0fe3, 0xe27: 0x0fe7, 0xe28: 0x0ff7, 0xe29: 0x100b, + 0xe2a: 0x1007, 0xe2b: 0x1037, 0xe2c: 0x10b3, 0xe2d: 0x10cb, 0xe2e: 0x10e3, 0xe2f: 0x111b, + 0xe30: 0x112f, 0xe31: 0x114b, 0xe32: 0x117b, 0xe33: 0x122f, 0xe34: 0x1257, 0xe35: 0x12cb, + 0xe36: 0x1313, 0xe37: 0x131f, 0xe38: 0x1327, 0xe39: 0x133f, 0xe3a: 0x1353, 0xe3b: 0x1343, + 0xe3c: 0x135b, 0xe3d: 0x1357, 0xe3e: 0x134f, 0xe3f: 0x135f, // Block 0x39, offset 0xe40 - 0xe40: 0x19d5, 0xe41: 0x19d8, 0xe42: 0x19db, 0xe43: 0x1c08, 0xe44: 0x1c0c, 0xe45: 0x1a5f, - 0xe46: 0x1a5f, - 0xe53: 0x1d75, 0xe54: 0x1d66, 0xe55: 0x1d6b, 0xe56: 0x1d7a, 0xe57: 0x1d70, - 0xe5d: 0x4390, - 0xe5e: 0x8115, 0xe5f: 0x4402, 0xe60: 0x022d, 0xe61: 0x0215, 0xe62: 0x021e, 0xe63: 0x0221, - 0xe64: 0x0224, 0xe65: 0x0227, 0xe66: 0x022a, 0xe67: 0x0230, 0xe68: 0x0233, 0xe69: 0x0017, - 0xe6a: 0x43f0, 0xe6b: 0x43f6, 0xe6c: 0x44f4, 0xe6d: 0x44fc, 0xe6e: 0x4348, 0xe6f: 0x434e, - 0xe70: 0x4354, 0xe71: 0x435a, 0xe72: 0x4366, 0xe73: 0x436c, 0xe74: 0x4372, 0xe75: 0x437e, - 0xe76: 0x4384, 0xe78: 0x438a, 0xe79: 0x4396, 0xe7a: 0x439c, 0xe7b: 0x43a2, - 0xe7c: 0x43ae, 0xe7e: 0x43b4, + 0xe40: 0x136b, 0xe41: 0x13a7, 0xe42: 0x13e3, 0xe43: 0x1413, 0xe44: 0x144b, 0xe45: 0x146b, + 0xe46: 0x14b7, 0xe47: 0x14db, 0xe48: 0x14fb, 0xe49: 0x150f, 0xe4a: 0x151f, 0xe4b: 0x152b, + 0xe4c: 0x1537, 0xe4d: 0x158b, 0xe4e: 0x162b, 0xe4f: 0x16b5, 0xe50: 0x16b0, 0xe51: 0x16e2, + 0xe52: 0x0607, 0xe53: 0x062f, 0xe54: 0x0633, 0xe55: 0x1764, 0xe56: 0x1791, 0xe57: 0x1809, + 0xe58: 0x1617, 0xe59: 0x1627, // Block 0x3a, offset 0xe80 - 0xe80: 0x43ba, 0xe81: 0x43c0, 0xe83: 0x43c6, 0xe84: 0x43cc, - 0xe86: 0x43d8, 0xe87: 0x43de, 0xe88: 0x43e4, 0xe89: 0x43ea, 0xe8a: 0x43fc, 0xe8b: 0x4378, - 0xe8c: 0x4360, 0xe8d: 0x43a8, 0xe8e: 0x43d2, 0xe8f: 0x1d7f, 0xe90: 0x0299, 0xe91: 0x0299, - 0xe92: 0x02a2, 0xe93: 0x02a2, 0xe94: 0x02a2, 0xe95: 0x02a2, 0xe96: 0x02a5, 0xe97: 0x02a5, - 0xe98: 0x02a5, 0xe99: 0x02a5, 0xe9a: 0x02ab, 0xe9b: 0x02ab, 0xe9c: 0x02ab, 0xe9d: 0x02ab, - 0xe9e: 0x029f, 0xe9f: 0x029f, 0xea0: 0x029f, 0xea1: 0x029f, 0xea2: 0x02a8, 0xea3: 0x02a8, - 0xea4: 0x02a8, 0xea5: 0x02a8, 0xea6: 0x029c, 0xea7: 0x029c, 0xea8: 0x029c, 0xea9: 0x029c, - 0xeaa: 0x02cf, 0xeab: 0x02cf, 0xeac: 0x02cf, 0xead: 0x02cf, 0xeae: 0x02d2, 0xeaf: 0x02d2, - 0xeb0: 0x02d2, 0xeb1: 0x02d2, 0xeb2: 0x02b1, 0xeb3: 0x02b1, 0xeb4: 0x02b1, 0xeb5: 0x02b1, - 0xeb6: 0x02ae, 0xeb7: 0x02ae, 0xeb8: 0x02ae, 0xeb9: 0x02ae, 0xeba: 0x02b4, 0xebb: 0x02b4, - 0xebc: 0x02b4, 0xebd: 0x02b4, 0xebe: 0x02b7, 0xebf: 0x02b7, + 0xe80: 0x19d5, 0xe81: 0x19d8, 0xe82: 0x19db, 0xe83: 0x1c08, 0xe84: 0x1c0c, 0xe85: 0x1a5f, + 0xe86: 0x1a5f, + 0xe93: 0x1d75, 0xe94: 0x1d66, 0xe95: 0x1d6b, 0xe96: 0x1d7a, 0xe97: 0x1d70, + 0xe9d: 0x4390, + 0xe9e: 0x8115, 0xe9f: 0x4402, 0xea0: 0x022d, 0xea1: 0x0215, 0xea2: 0x021e, 0xea3: 0x0221, + 0xea4: 0x0224, 0xea5: 0x0227, 0xea6: 0x022a, 0xea7: 0x0230, 0xea8: 0x0233, 0xea9: 0x0017, + 0xeaa: 0x43f0, 0xeab: 0x43f6, 0xeac: 0x44f4, 0xead: 0x44fc, 0xeae: 0x4348, 0xeaf: 0x434e, + 0xeb0: 0x4354, 0xeb1: 0x435a, 0xeb2: 0x4366, 0xeb3: 0x436c, 0xeb4: 0x4372, 0xeb5: 0x437e, + 0xeb6: 0x4384, 0xeb8: 0x438a, 0xeb9: 0x4396, 0xeba: 0x439c, 0xebb: 0x43a2, + 0xebc: 0x43ae, 0xebe: 0x43b4, // Block 0x3b, offset 0xec0 - 0xec0: 0x02b7, 0xec1: 0x02b7, 0xec2: 0x02c0, 0xec3: 0x02c0, 0xec4: 0x02bd, 0xec5: 0x02bd, - 0xec6: 0x02c3, 0xec7: 0x02c3, 0xec8: 0x02ba, 0xec9: 0x02ba, 0xeca: 0x02c9, 0xecb: 0x02c9, - 0xecc: 0x02c6, 0xecd: 0x02c6, 0xece: 0x02d5, 0xecf: 0x02d5, 0xed0: 0x02d5, 0xed1: 0x02d5, - 0xed2: 0x02db, 0xed3: 0x02db, 0xed4: 0x02db, 0xed5: 0x02db, 0xed6: 0x02e1, 0xed7: 0x02e1, - 0xed8: 0x02e1, 0xed9: 0x02e1, 0xeda: 0x02de, 0xedb: 0x02de, 0xedc: 0x02de, 0xedd: 0x02de, - 0xede: 0x02e4, 0xedf: 0x02e4, 0xee0: 0x02e7, 0xee1: 0x02e7, 0xee2: 0x02e7, 0xee3: 0x02e7, - 0xee4: 0x446e, 0xee5: 0x446e, 0xee6: 0x02ed, 0xee7: 0x02ed, 0xee8: 0x02ed, 0xee9: 0x02ed, - 0xeea: 0x02ea, 0xeeb: 0x02ea, 0xeec: 0x02ea, 0xeed: 0x02ea, 0xeee: 0x0308, 0xeef: 0x0308, - 0xef0: 0x4468, 0xef1: 0x4468, + 0xec0: 0x43ba, 0xec1: 0x43c0, 0xec3: 0x43c6, 0xec4: 0x43cc, + 0xec6: 0x43d8, 0xec7: 0x43de, 0xec8: 0x43e4, 0xec9: 0x43ea, 0xeca: 0x43fc, 0xecb: 0x4378, + 0xecc: 0x4360, 0xecd: 0x43a8, 0xece: 0x43d2, 0xecf: 0x1d7f, 0xed0: 0x0299, 0xed1: 0x0299, + 0xed2: 0x02a2, 0xed3: 0x02a2, 0xed4: 0x02a2, 0xed5: 0x02a2, 0xed6: 0x02a5, 0xed7: 0x02a5, + 0xed8: 0x02a5, 0xed9: 0x02a5, 0xeda: 0x02ab, 0xedb: 0x02ab, 0xedc: 0x02ab, 0xedd: 0x02ab, + 0xede: 0x029f, 0xedf: 0x029f, 0xee0: 0x029f, 0xee1: 0x029f, 0xee2: 0x02a8, 0xee3: 0x02a8, + 0xee4: 0x02a8, 0xee5: 0x02a8, 0xee6: 0x029c, 0xee7: 0x029c, 0xee8: 0x029c, 0xee9: 0x029c, + 0xeea: 0x02cf, 0xeeb: 0x02cf, 0xeec: 0x02cf, 0xeed: 0x02cf, 0xeee: 0x02d2, 0xeef: 0x02d2, + 0xef0: 0x02d2, 0xef1: 0x02d2, 0xef2: 0x02b1, 0xef3: 0x02b1, 0xef4: 0x02b1, 0xef5: 0x02b1, + 0xef6: 0x02ae, 0xef7: 0x02ae, 0xef8: 0x02ae, 0xef9: 0x02ae, 0xefa: 0x02b4, 0xefb: 0x02b4, + 0xefc: 0x02b4, 0xefd: 0x02b4, 0xefe: 0x02b7, 0xeff: 0x02b7, // Block 0x3c, offset 0xf00 - 0xf13: 0x02d8, 0xf14: 0x02d8, 0xf15: 0x02d8, 0xf16: 0x02d8, 0xf17: 0x02f6, - 0xf18: 0x02f6, 0xf19: 0x02f3, 0xf1a: 0x02f3, 0xf1b: 0x02f9, 0xf1c: 0x02f9, 0xf1d: 0x204f, - 0xf1e: 0x02ff, 0xf1f: 0x02ff, 0xf20: 0x02f0, 0xf21: 0x02f0, 0xf22: 0x02fc, 0xf23: 0x02fc, - 0xf24: 0x0305, 0xf25: 0x0305, 0xf26: 0x0305, 0xf27: 0x0305, 0xf28: 0x028d, 0xf29: 0x028d, - 0xf2a: 0x25aa, 0xf2b: 0x25aa, 0xf2c: 0x261a, 0xf2d: 0x261a, 0xf2e: 0x25e9, 0xf2f: 0x25e9, - 0xf30: 0x2605, 0xf31: 0x2605, 0xf32: 0x25fe, 0xf33: 0x25fe, 0xf34: 0x260c, 0xf35: 0x260c, - 0xf36: 0x2613, 0xf37: 0x2613, 0xf38: 0x2613, 0xf39: 0x25f0, 0xf3a: 0x25f0, 0xf3b: 0x25f0, - 0xf3c: 0x0302, 0xf3d: 0x0302, 0xf3e: 0x0302, 0xf3f: 0x0302, + 0xf00: 0x02b7, 0xf01: 0x02b7, 0xf02: 0x02c0, 0xf03: 0x02c0, 0xf04: 0x02bd, 0xf05: 0x02bd, + 0xf06: 0x02c3, 0xf07: 0x02c3, 0xf08: 0x02ba, 0xf09: 0x02ba, 0xf0a: 0x02c9, 0xf0b: 0x02c9, + 0xf0c: 0x02c6, 0xf0d: 0x02c6, 0xf0e: 0x02d5, 0xf0f: 0x02d5, 0xf10: 0x02d5, 0xf11: 0x02d5, + 0xf12: 0x02db, 0xf13: 0x02db, 0xf14: 0x02db, 0xf15: 0x02db, 0xf16: 0x02e1, 0xf17: 0x02e1, + 0xf18: 0x02e1, 0xf19: 0x02e1, 0xf1a: 0x02de, 0xf1b: 0x02de, 0xf1c: 0x02de, 0xf1d: 0x02de, + 0xf1e: 0x02e4, 0xf1f: 0x02e4, 0xf20: 0x02e7, 0xf21: 0x02e7, 0xf22: 0x02e7, 0xf23: 0x02e7, + 0xf24: 0x446e, 0xf25: 0x446e, 0xf26: 0x02ed, 0xf27: 0x02ed, 0xf28: 0x02ed, 0xf29: 0x02ed, + 0xf2a: 0x02ea, 0xf2b: 0x02ea, 0xf2c: 0x02ea, 0xf2d: 0x02ea, 0xf2e: 0x0308, 0xf2f: 0x0308, + 0xf30: 0x4468, 0xf31: 0x4468, // Block 0x3d, offset 0xf40 - 0xf40: 0x25b1, 0xf41: 0x25b8, 0xf42: 0x25d4, 0xf43: 0x25f0, 0xf44: 0x25f7, 0xf45: 0x1d89, - 0xf46: 0x1d8e, 0xf47: 0x1d93, 0xf48: 0x1da2, 0xf49: 0x1db1, 0xf4a: 0x1db6, 0xf4b: 0x1dbb, - 0xf4c: 0x1dc0, 0xf4d: 0x1dc5, 0xf4e: 0x1dd4, 0xf4f: 0x1de3, 0xf50: 0x1de8, 0xf51: 0x1ded, - 0xf52: 0x1dfc, 0xf53: 0x1e0b, 0xf54: 0x1e10, 0xf55: 0x1e15, 0xf56: 0x1e1a, 0xf57: 0x1e29, - 0xf58: 0x1e2e, 0xf59: 0x1e3d, 0xf5a: 0x1e42, 0xf5b: 0x1e47, 0xf5c: 0x1e56, 0xf5d: 0x1e5b, - 0xf5e: 0x1e60, 0xf5f: 0x1e6a, 0xf60: 0x1ea6, 0xf61: 0x1eb5, 0xf62: 0x1ec4, 0xf63: 0x1ec9, - 0xf64: 0x1ece, 0xf65: 0x1ed8, 0xf66: 0x1ee7, 0xf67: 0x1eec, 0xf68: 0x1efb, 0xf69: 0x1f00, - 0xf6a: 0x1f05, 0xf6b: 0x1f14, 0xf6c: 0x1f19, 0xf6d: 0x1f28, 0xf6e: 0x1f2d, 0xf6f: 0x1f32, - 0xf70: 0x1f37, 0xf71: 0x1f3c, 0xf72: 0x1f41, 0xf73: 0x1f46, 0xf74: 0x1f4b, 0xf75: 0x1f50, - 0xf76: 0x1f55, 0xf77: 0x1f5a, 0xf78: 0x1f5f, 0xf79: 0x1f64, 0xf7a: 0x1f69, 0xf7b: 0x1f6e, - 0xf7c: 0x1f73, 0xf7d: 0x1f78, 0xf7e: 0x1f7d, 0xf7f: 0x1f87, + 0xf53: 0x02d8, 0xf54: 0x02d8, 0xf55: 0x02d8, 0xf56: 0x02d8, 0xf57: 0x02f6, + 0xf58: 0x02f6, 0xf59: 0x02f3, 0xf5a: 0x02f3, 0xf5b: 0x02f9, 0xf5c: 0x02f9, 0xf5d: 0x204f, + 0xf5e: 0x02ff, 0xf5f: 0x02ff, 0xf60: 0x02f0, 0xf61: 0x02f0, 0xf62: 0x02fc, 0xf63: 0x02fc, + 0xf64: 0x0305, 0xf65: 0x0305, 0xf66: 0x0305, 0xf67: 0x0305, 0xf68: 0x028d, 0xf69: 0x028d, + 0xf6a: 0x25aa, 0xf6b: 0x25aa, 0xf6c: 0x261a, 0xf6d: 0x261a, 0xf6e: 0x25e9, 0xf6f: 0x25e9, + 0xf70: 0x2605, 0xf71: 0x2605, 0xf72: 0x25fe, 0xf73: 0x25fe, 0xf74: 0x260c, 0xf75: 0x260c, + 0xf76: 0x2613, 0xf77: 0x2613, 0xf78: 0x2613, 0xf79: 0x25f0, 0xf7a: 0x25f0, 0xf7b: 0x25f0, + 0xf7c: 0x0302, 0xf7d: 0x0302, 0xf7e: 0x0302, 0xf7f: 0x0302, // Block 0x3e, offset 0xf80 - 0xf80: 0x1f8c, 0xf81: 0x1f91, 0xf82: 0x1f96, 0xf83: 0x1fa0, 0xf84: 0x1fa5, 0xf85: 0x1faf, - 0xf86: 0x1fb4, 0xf87: 0x1fb9, 0xf88: 0x1fbe, 0xf89: 0x1fc3, 0xf8a: 0x1fc8, 0xf8b: 0x1fcd, - 0xf8c: 0x1fd2, 0xf8d: 0x1fd7, 0xf8e: 0x1fe6, 0xf8f: 0x1ff5, 0xf90: 0x1ffa, 0xf91: 0x1fff, - 0xf92: 0x2004, 0xf93: 0x2009, 0xf94: 0x200e, 0xf95: 0x2018, 0xf96: 0x201d, 0xf97: 0x2022, - 0xf98: 0x2031, 0xf99: 0x2040, 0xf9a: 0x2045, 0xf9b: 0x4420, 0xf9c: 0x4426, 0xf9d: 0x445c, - 0xf9e: 0x44b3, 0xf9f: 0x44ba, 0xfa0: 0x44c1, 0xfa1: 0x44c8, 0xfa2: 0x44cf, 0xfa3: 0x44d6, - 0xfa4: 0x25c6, 0xfa5: 0x25cd, 0xfa6: 0x25d4, 0xfa7: 0x25db, 0xfa8: 0x25f0, 0xfa9: 0x25f7, - 0xfaa: 0x1d98, 0xfab: 0x1d9d, 0xfac: 0x1da2, 0xfad: 0x1da7, 0xfae: 0x1db1, 0xfaf: 0x1db6, - 0xfb0: 0x1dca, 0xfb1: 0x1dcf, 0xfb2: 0x1dd4, 0xfb3: 0x1dd9, 0xfb4: 0x1de3, 0xfb5: 0x1de8, - 0xfb6: 0x1df2, 0xfb7: 0x1df7, 0xfb8: 0x1dfc, 0xfb9: 0x1e01, 0xfba: 0x1e0b, 0xfbb: 0x1e10, - 0xfbc: 0x1f3c, 0xfbd: 0x1f41, 0xfbe: 0x1f50, 0xfbf: 0x1f55, + 0xf80: 0x25b1, 0xf81: 0x25b8, 0xf82: 0x25d4, 0xf83: 0x25f0, 0xf84: 0x25f7, 0xf85: 0x1d89, + 0xf86: 0x1d8e, 0xf87: 0x1d93, 0xf88: 0x1da2, 0xf89: 0x1db1, 0xf8a: 0x1db6, 0xf8b: 0x1dbb, + 0xf8c: 0x1dc0, 0xf8d: 0x1dc5, 0xf8e: 0x1dd4, 0xf8f: 0x1de3, 0xf90: 0x1de8, 0xf91: 0x1ded, + 0xf92: 0x1dfc, 0xf93: 0x1e0b, 0xf94: 0x1e10, 0xf95: 0x1e15, 0xf96: 0x1e1a, 0xf97: 0x1e29, + 0xf98: 0x1e2e, 0xf99: 0x1e3d, 0xf9a: 0x1e42, 0xf9b: 0x1e47, 0xf9c: 0x1e56, 0xf9d: 0x1e5b, + 0xf9e: 0x1e60, 0xf9f: 0x1e6a, 0xfa0: 0x1ea6, 0xfa1: 0x1eb5, 0xfa2: 0x1ec4, 0xfa3: 0x1ec9, + 0xfa4: 0x1ece, 0xfa5: 0x1ed8, 0xfa6: 0x1ee7, 0xfa7: 0x1eec, 0xfa8: 0x1efb, 0xfa9: 0x1f00, + 0xfaa: 0x1f05, 0xfab: 0x1f14, 0xfac: 0x1f19, 0xfad: 0x1f28, 0xfae: 0x1f2d, 0xfaf: 0x1f32, + 0xfb0: 0x1f37, 0xfb1: 0x1f3c, 0xfb2: 0x1f41, 0xfb3: 0x1f46, 0xfb4: 0x1f4b, 0xfb5: 0x1f50, + 0xfb6: 0x1f55, 0xfb7: 0x1f5a, 0xfb8: 0x1f5f, 0xfb9: 0x1f64, 0xfba: 0x1f69, 0xfbb: 0x1f6e, + 0xfbc: 0x1f73, 0xfbd: 0x1f78, 0xfbe: 0x1f7d, 0xfbf: 0x1f87, // Block 0x3f, offset 0xfc0 - 0xfc0: 0x1f5a, 0xfc1: 0x1f6e, 0xfc2: 0x1f73, 0xfc3: 0x1f78, 0xfc4: 0x1f7d, 0xfc5: 0x1f96, - 0xfc6: 0x1fa0, 0xfc7: 0x1fa5, 0xfc8: 0x1faa, 0xfc9: 0x1fbe, 0xfca: 0x1fdc, 0xfcb: 0x1fe1, - 0xfcc: 0x1fe6, 0xfcd: 0x1feb, 0xfce: 0x1ff5, 0xfcf: 0x1ffa, 0xfd0: 0x445c, 0xfd1: 0x2027, - 0xfd2: 0x202c, 0xfd3: 0x2031, 0xfd4: 0x2036, 0xfd5: 0x2040, 0xfd6: 0x2045, 0xfd7: 0x25b1, - 0xfd8: 0x25b8, 0xfd9: 0x25bf, 0xfda: 0x25d4, 0xfdb: 0x25e2, 0xfdc: 0x1d89, 0xfdd: 0x1d8e, - 0xfde: 0x1d93, 0xfdf: 0x1da2, 0xfe0: 0x1dac, 0xfe1: 0x1dbb, 0xfe2: 0x1dc0, 0xfe3: 0x1dc5, - 0xfe4: 0x1dd4, 0xfe5: 0x1dde, 0xfe6: 0x1dfc, 0xfe7: 0x1e15, 0xfe8: 0x1e1a, 0xfe9: 0x1e29, - 0xfea: 0x1e2e, 0xfeb: 0x1e3d, 0xfec: 0x1e47, 0xfed: 0x1e56, 0xfee: 0x1e5b, 0xfef: 0x1e60, - 0xff0: 0x1e6a, 0xff1: 0x1ea6, 0xff2: 0x1eab, 0xff3: 0x1eb5, 0xff4: 0x1ec4, 0xff5: 0x1ec9, - 0xff6: 0x1ece, 0xff7: 0x1ed8, 0xff8: 0x1ee7, 0xff9: 0x1efb, 0xffa: 0x1f00, 0xffb: 0x1f05, - 0xffc: 0x1f14, 0xffd: 0x1f19, 0xffe: 0x1f28, 0xfff: 0x1f2d, + 0xfc0: 0x1f8c, 0xfc1: 0x1f91, 0xfc2: 0x1f96, 0xfc3: 0x1fa0, 0xfc4: 0x1fa5, 0xfc5: 0x1faf, + 0xfc6: 0x1fb4, 0xfc7: 0x1fb9, 0xfc8: 0x1fbe, 0xfc9: 0x1fc3, 0xfca: 0x1fc8, 0xfcb: 0x1fcd, + 0xfcc: 0x1fd2, 0xfcd: 0x1fd7, 0xfce: 0x1fe6, 0xfcf: 0x1ff5, 0xfd0: 0x1ffa, 0xfd1: 0x1fff, + 0xfd2: 0x2004, 0xfd3: 0x2009, 0xfd4: 0x200e, 0xfd5: 0x2018, 0xfd6: 0x201d, 0xfd7: 0x2022, + 0xfd8: 0x2031, 0xfd9: 0x2040, 0xfda: 0x2045, 0xfdb: 0x4420, 0xfdc: 0x4426, 0xfdd: 0x445c, + 0xfde: 0x44b3, 0xfdf: 0x44ba, 0xfe0: 0x44c1, 0xfe1: 0x44c8, 0xfe2: 0x44cf, 0xfe3: 0x44d6, + 0xfe4: 0x25c6, 0xfe5: 0x25cd, 0xfe6: 0x25d4, 0xfe7: 0x25db, 0xfe8: 0x25f0, 0xfe9: 0x25f7, + 0xfea: 0x1d98, 0xfeb: 0x1d9d, 0xfec: 0x1da2, 0xfed: 0x1da7, 0xfee: 0x1db1, 0xfef: 0x1db6, + 0xff0: 0x1dca, 0xff1: 0x1dcf, 0xff2: 0x1dd4, 0xff3: 0x1dd9, 0xff4: 0x1de3, 0xff5: 0x1de8, + 0xff6: 0x1df2, 0xff7: 0x1df7, 0xff8: 0x1dfc, 0xff9: 0x1e01, 0xffa: 0x1e0b, 0xffb: 0x1e10, + 0xffc: 0x1f3c, 0xffd: 0x1f41, 0xffe: 0x1f50, 0xfff: 0x1f55, // Block 0x40, offset 0x1000 - 0x1000: 0x1f32, 0x1001: 0x1f37, 0x1002: 0x1f46, 0x1003: 0x1f4b, 0x1004: 0x1f5f, 0x1005: 0x1f64, - 0x1006: 0x1f69, 0x1007: 0x1f6e, 0x1008: 0x1f73, 0x1009: 0x1f87, 0x100a: 0x1f8c, 0x100b: 0x1f91, - 0x100c: 0x1f96, 0x100d: 0x1f9b, 0x100e: 0x1faf, 0x100f: 0x1fb4, 0x1010: 0x1fb9, 0x1011: 0x1fbe, - 0x1012: 0x1fcd, 0x1013: 0x1fd2, 0x1014: 0x1fd7, 0x1015: 0x1fe6, 0x1016: 0x1ff0, 0x1017: 0x1fff, - 0x1018: 0x2004, 0x1019: 0x4450, 0x101a: 0x2018, 0x101b: 0x201d, 0x101c: 0x2022, 0x101d: 0x2031, - 0x101e: 0x203b, 0x101f: 0x25d4, 0x1020: 0x25e2, 0x1021: 0x1da2, 0x1022: 0x1dac, 0x1023: 0x1dd4, - 0x1024: 0x1dde, 0x1025: 0x1dfc, 0x1026: 0x1e06, 0x1027: 0x1e6a, 0x1028: 0x1e6f, 0x1029: 0x1e92, - 0x102a: 0x1e97, 0x102b: 0x1f6e, 0x102c: 0x1f73, 0x102d: 0x1f96, 0x102e: 0x1fe6, 0x102f: 0x1ff0, - 0x1030: 0x2031, 0x1031: 0x203b, 0x1032: 0x4504, 0x1033: 0x450c, 0x1034: 0x4514, 0x1035: 0x1ef1, - 0x1036: 0x1ef6, 0x1037: 0x1f0a, 0x1038: 0x1f0f, 0x1039: 0x1f1e, 0x103a: 0x1f23, 0x103b: 0x1e74, - 0x103c: 0x1e79, 0x103d: 0x1e9c, 0x103e: 0x1ea1, 0x103f: 0x1e33, + 0x1000: 0x1f5a, 0x1001: 0x1f6e, 0x1002: 0x1f73, 0x1003: 0x1f78, 0x1004: 0x1f7d, 0x1005: 0x1f96, + 0x1006: 0x1fa0, 0x1007: 0x1fa5, 0x1008: 0x1faa, 0x1009: 0x1fbe, 0x100a: 0x1fdc, 0x100b: 0x1fe1, + 0x100c: 0x1fe6, 0x100d: 0x1feb, 0x100e: 0x1ff5, 0x100f: 0x1ffa, 0x1010: 0x445c, 0x1011: 0x2027, + 0x1012: 0x202c, 0x1013: 0x2031, 0x1014: 0x2036, 0x1015: 0x2040, 0x1016: 0x2045, 0x1017: 0x25b1, + 0x1018: 0x25b8, 0x1019: 0x25bf, 0x101a: 0x25d4, 0x101b: 0x25e2, 0x101c: 0x1d89, 0x101d: 0x1d8e, + 0x101e: 0x1d93, 0x101f: 0x1da2, 0x1020: 0x1dac, 0x1021: 0x1dbb, 0x1022: 0x1dc0, 0x1023: 0x1dc5, + 0x1024: 0x1dd4, 0x1025: 0x1dde, 0x1026: 0x1dfc, 0x1027: 0x1e15, 0x1028: 0x1e1a, 0x1029: 0x1e29, + 0x102a: 0x1e2e, 0x102b: 0x1e3d, 0x102c: 0x1e47, 0x102d: 0x1e56, 0x102e: 0x1e5b, 0x102f: 0x1e60, + 0x1030: 0x1e6a, 0x1031: 0x1ea6, 0x1032: 0x1eab, 0x1033: 0x1eb5, 0x1034: 0x1ec4, 0x1035: 0x1ec9, + 0x1036: 0x1ece, 0x1037: 0x1ed8, 0x1038: 0x1ee7, 0x1039: 0x1efb, 0x103a: 0x1f00, 0x103b: 0x1f05, + 0x103c: 0x1f14, 0x103d: 0x1f19, 0x103e: 0x1f28, 0x103f: 0x1f2d, // Block 0x41, offset 0x1040 - 0x1040: 0x1e38, 0x1041: 0x1e1f, 0x1042: 0x1e24, 0x1043: 0x1e4c, 0x1044: 0x1e51, 0x1045: 0x1eba, - 0x1046: 0x1ebf, 0x1047: 0x1edd, 0x1048: 0x1ee2, 0x1049: 0x1e7e, 0x104a: 0x1e83, 0x104b: 0x1e88, - 0x104c: 0x1e92, 0x104d: 0x1e8d, 0x104e: 0x1e65, 0x104f: 0x1eb0, 0x1050: 0x1ed3, 0x1051: 0x1ef1, - 0x1052: 0x1ef6, 0x1053: 0x1f0a, 0x1054: 0x1f0f, 0x1055: 0x1f1e, 0x1056: 0x1f23, 0x1057: 0x1e74, - 0x1058: 0x1e79, 0x1059: 0x1e9c, 0x105a: 0x1ea1, 0x105b: 0x1e33, 0x105c: 0x1e38, 0x105d: 0x1e1f, - 0x105e: 0x1e24, 0x105f: 0x1e4c, 0x1060: 0x1e51, 0x1061: 0x1eba, 0x1062: 0x1ebf, 0x1063: 0x1edd, - 0x1064: 0x1ee2, 0x1065: 0x1e7e, 0x1066: 0x1e83, 0x1067: 0x1e88, 0x1068: 0x1e92, 0x1069: 0x1e8d, - 0x106a: 0x1e65, 0x106b: 0x1eb0, 0x106c: 0x1ed3, 0x106d: 0x1e7e, 0x106e: 0x1e83, 0x106f: 0x1e88, - 0x1070: 0x1e92, 0x1071: 0x1e6f, 0x1072: 0x1e97, 0x1073: 0x1eec, 0x1074: 0x1e56, 0x1075: 0x1e5b, - 0x1076: 0x1e60, 0x1077: 0x1e7e, 0x1078: 0x1e83, 0x1079: 0x1e88, 0x107a: 0x1eec, 0x107b: 0x1efb, - 0x107c: 0x4408, 0x107d: 0x4408, + 0x1040: 0x1f32, 0x1041: 0x1f37, 0x1042: 0x1f46, 0x1043: 0x1f4b, 0x1044: 0x1f5f, 0x1045: 0x1f64, + 0x1046: 0x1f69, 0x1047: 0x1f6e, 0x1048: 0x1f73, 0x1049: 0x1f87, 0x104a: 0x1f8c, 0x104b: 0x1f91, + 0x104c: 0x1f96, 0x104d: 0x1f9b, 0x104e: 0x1faf, 0x104f: 0x1fb4, 0x1050: 0x1fb9, 0x1051: 0x1fbe, + 0x1052: 0x1fcd, 0x1053: 0x1fd2, 0x1054: 0x1fd7, 0x1055: 0x1fe6, 0x1056: 0x1ff0, 0x1057: 0x1fff, + 0x1058: 0x2004, 0x1059: 0x4450, 0x105a: 0x2018, 0x105b: 0x201d, 0x105c: 0x2022, 0x105d: 0x2031, + 0x105e: 0x203b, 0x105f: 0x25d4, 0x1060: 0x25e2, 0x1061: 0x1da2, 0x1062: 0x1dac, 0x1063: 0x1dd4, + 0x1064: 0x1dde, 0x1065: 0x1dfc, 0x1066: 0x1e06, 0x1067: 0x1e6a, 0x1068: 0x1e6f, 0x1069: 0x1e92, + 0x106a: 0x1e97, 0x106b: 0x1f6e, 0x106c: 0x1f73, 0x106d: 0x1f96, 0x106e: 0x1fe6, 0x106f: 0x1ff0, + 0x1070: 0x2031, 0x1071: 0x203b, 0x1072: 0x4504, 0x1073: 0x450c, 0x1074: 0x4514, 0x1075: 0x1ef1, + 0x1076: 0x1ef6, 0x1077: 0x1f0a, 0x1078: 0x1f0f, 0x1079: 0x1f1e, 0x107a: 0x1f23, 0x107b: 0x1e74, + 0x107c: 0x1e79, 0x107d: 0x1e9c, 0x107e: 0x1ea1, 0x107f: 0x1e33, // Block 0x42, offset 0x1080 - 0x1090: 0x2311, 0x1091: 0x2326, - 0x1092: 0x2326, 0x1093: 0x232d, 0x1094: 0x2334, 0x1095: 0x2349, 0x1096: 0x2350, 0x1097: 0x2357, - 0x1098: 0x237a, 0x1099: 0x237a, 0x109a: 0x239d, 0x109b: 0x2396, 0x109c: 0x23b2, 0x109d: 0x23a4, - 0x109e: 0x23ab, 0x109f: 0x23ce, 0x10a0: 0x23ce, 0x10a1: 0x23c7, 0x10a2: 0x23d5, 0x10a3: 0x23d5, - 0x10a4: 0x23ff, 0x10a5: 0x23ff, 0x10a6: 0x241b, 0x10a7: 0x23e3, 0x10a8: 0x23e3, 0x10a9: 0x23dc, - 0x10aa: 0x23f1, 0x10ab: 0x23f1, 0x10ac: 0x23f8, 0x10ad: 0x23f8, 0x10ae: 0x2422, 0x10af: 0x2430, - 0x10b0: 0x2430, 0x10b1: 0x2437, 0x10b2: 0x2437, 0x10b3: 0x243e, 0x10b4: 0x2445, 0x10b5: 0x244c, - 0x10b6: 0x2453, 0x10b7: 0x2453, 0x10b8: 0x245a, 0x10b9: 0x2468, 0x10ba: 0x2476, 0x10bb: 0x246f, - 0x10bc: 0x247d, 0x10bd: 0x247d, 0x10be: 0x2492, 0x10bf: 0x2499, + 0x1080: 0x1e38, 0x1081: 0x1e1f, 0x1082: 0x1e24, 0x1083: 0x1e4c, 0x1084: 0x1e51, 0x1085: 0x1eba, + 0x1086: 0x1ebf, 0x1087: 0x1edd, 0x1088: 0x1ee2, 0x1089: 0x1e7e, 0x108a: 0x1e83, 0x108b: 0x1e88, + 0x108c: 0x1e92, 0x108d: 0x1e8d, 0x108e: 0x1e65, 0x108f: 0x1eb0, 0x1090: 0x1ed3, 0x1091: 0x1ef1, + 0x1092: 0x1ef6, 0x1093: 0x1f0a, 0x1094: 0x1f0f, 0x1095: 0x1f1e, 0x1096: 0x1f23, 0x1097: 0x1e74, + 0x1098: 0x1e79, 0x1099: 0x1e9c, 0x109a: 0x1ea1, 0x109b: 0x1e33, 0x109c: 0x1e38, 0x109d: 0x1e1f, + 0x109e: 0x1e24, 0x109f: 0x1e4c, 0x10a0: 0x1e51, 0x10a1: 0x1eba, 0x10a2: 0x1ebf, 0x10a3: 0x1edd, + 0x10a4: 0x1ee2, 0x10a5: 0x1e7e, 0x10a6: 0x1e83, 0x10a7: 0x1e88, 0x10a8: 0x1e92, 0x10a9: 0x1e8d, + 0x10aa: 0x1e65, 0x10ab: 0x1eb0, 0x10ac: 0x1ed3, 0x10ad: 0x1e7e, 0x10ae: 0x1e83, 0x10af: 0x1e88, + 0x10b0: 0x1e92, 0x10b1: 0x1e6f, 0x10b2: 0x1e97, 0x10b3: 0x1eec, 0x10b4: 0x1e56, 0x10b5: 0x1e5b, + 0x10b6: 0x1e60, 0x10b7: 0x1e7e, 0x10b8: 0x1e83, 0x10b9: 0x1e88, 0x10ba: 0x1eec, 0x10bb: 0x1efb, + 0x10bc: 0x4408, 0x10bd: 0x4408, // Block 0x43, offset 0x10c0 - 0x10c0: 0x24ca, 0x10c1: 0x24d8, 0x10c2: 0x24d1, 0x10c3: 0x24b5, 0x10c4: 0x24b5, 0x10c5: 0x24df, - 0x10c6: 0x24df, 0x10c7: 0x24e6, 0x10c8: 0x24e6, 0x10c9: 0x2510, 0x10ca: 0x2517, 0x10cb: 0x251e, - 0x10cc: 0x24f4, 0x10cd: 0x2502, 0x10ce: 0x2525, 0x10cf: 0x252c, - 0x10d2: 0x24fb, 0x10d3: 0x2580, 0x10d4: 0x2587, 0x10d5: 0x255d, 0x10d6: 0x2564, 0x10d7: 0x2548, - 0x10d8: 0x2548, 0x10d9: 0x254f, 0x10da: 0x2579, 0x10db: 0x2572, 0x10dc: 0x259c, 0x10dd: 0x259c, - 0x10de: 0x230a, 0x10df: 0x231f, 0x10e0: 0x2318, 0x10e1: 0x2342, 0x10e2: 0x233b, 0x10e3: 0x2365, - 0x10e4: 0x235e, 0x10e5: 0x2388, 0x10e6: 0x236c, 0x10e7: 0x2381, 0x10e8: 0x23b9, 0x10e9: 0x2406, - 0x10ea: 0x23ea, 0x10eb: 0x2429, 0x10ec: 0x24c3, 0x10ed: 0x24ed, 0x10ee: 0x2595, 0x10ef: 0x258e, - 0x10f0: 0x25a3, 0x10f1: 0x253a, 0x10f2: 0x24a0, 0x10f3: 0x256b, 0x10f4: 0x2492, 0x10f5: 0x24ca, - 0x10f6: 0x2461, 0x10f7: 0x24ae, 0x10f8: 0x2541, 0x10f9: 0x2533, 0x10fa: 0x24bc, 0x10fb: 0x24a7, - 0x10fc: 0x24bc, 0x10fd: 0x2541, 0x10fe: 0x2373, 0x10ff: 0x238f, + 0x10d0: 0x2311, 0x10d1: 0x2326, + 0x10d2: 0x2326, 0x10d3: 0x232d, 0x10d4: 0x2334, 0x10d5: 0x2349, 0x10d6: 0x2350, 0x10d7: 0x2357, + 0x10d8: 0x237a, 0x10d9: 0x237a, 0x10da: 0x239d, 0x10db: 0x2396, 0x10dc: 0x23b2, 0x10dd: 0x23a4, + 0x10de: 0x23ab, 0x10df: 0x23ce, 0x10e0: 0x23ce, 0x10e1: 0x23c7, 0x10e2: 0x23d5, 0x10e3: 0x23d5, + 0x10e4: 0x23ff, 0x10e5: 0x23ff, 0x10e6: 0x241b, 0x10e7: 0x23e3, 0x10e8: 0x23e3, 0x10e9: 0x23dc, + 0x10ea: 0x23f1, 0x10eb: 0x23f1, 0x10ec: 0x23f8, 0x10ed: 0x23f8, 0x10ee: 0x2422, 0x10ef: 0x2430, + 0x10f0: 0x2430, 0x10f1: 0x2437, 0x10f2: 0x2437, 0x10f3: 0x243e, 0x10f4: 0x2445, 0x10f5: 0x244c, + 0x10f6: 0x2453, 0x10f7: 0x2453, 0x10f8: 0x245a, 0x10f9: 0x2468, 0x10fa: 0x2476, 0x10fb: 0x246f, + 0x10fc: 0x247d, 0x10fd: 0x247d, 0x10fe: 0x2492, 0x10ff: 0x2499, // Block 0x44, offset 0x1100 - 0x1100: 0x2509, 0x1101: 0x2484, 0x1102: 0x2303, 0x1103: 0x24a7, 0x1104: 0x244c, 0x1105: 0x241b, - 0x1106: 0x23c0, 0x1107: 0x2556, - 0x1130: 0x2414, 0x1131: 0x248b, 0x1132: 0x27bf, 0x1133: 0x27b6, 0x1134: 0x27ec, 0x1135: 0x27da, - 0x1136: 0x27c8, 0x1137: 0x27e3, 0x1138: 0x27f5, 0x1139: 0x240d, 0x113a: 0x2c7c, 0x113b: 0x2afc, - 0x113c: 0x27d1, + 0x1100: 0x24ca, 0x1101: 0x24d8, 0x1102: 0x24d1, 0x1103: 0x24b5, 0x1104: 0x24b5, 0x1105: 0x24df, + 0x1106: 0x24df, 0x1107: 0x24e6, 0x1108: 0x24e6, 0x1109: 0x2510, 0x110a: 0x2517, 0x110b: 0x251e, + 0x110c: 0x24f4, 0x110d: 0x2502, 0x110e: 0x2525, 0x110f: 0x252c, + 0x1112: 0x24fb, 0x1113: 0x2580, 0x1114: 0x2587, 0x1115: 0x255d, 0x1116: 0x2564, 0x1117: 0x2548, + 0x1118: 0x2548, 0x1119: 0x254f, 0x111a: 0x2579, 0x111b: 0x2572, 0x111c: 0x259c, 0x111d: 0x259c, + 0x111e: 0x230a, 0x111f: 0x231f, 0x1120: 0x2318, 0x1121: 0x2342, 0x1122: 0x233b, 0x1123: 0x2365, + 0x1124: 0x235e, 0x1125: 0x2388, 0x1126: 0x236c, 0x1127: 0x2381, 0x1128: 0x23b9, 0x1129: 0x2406, + 0x112a: 0x23ea, 0x112b: 0x2429, 0x112c: 0x24c3, 0x112d: 0x24ed, 0x112e: 0x2595, 0x112f: 0x258e, + 0x1130: 0x25a3, 0x1131: 0x253a, 0x1132: 0x24a0, 0x1133: 0x256b, 0x1134: 0x2492, 0x1135: 0x24ca, + 0x1136: 0x2461, 0x1137: 0x24ae, 0x1138: 0x2541, 0x1139: 0x2533, 0x113a: 0x24bc, 0x113b: 0x24a7, + 0x113c: 0x24bc, 0x113d: 0x2541, 0x113e: 0x2373, 0x113f: 0x238f, // Block 0x45, offset 0x1140 - 0x1150: 0x0019, 0x1151: 0x0483, - 0x1152: 0x0487, 0x1153: 0x0035, 0x1154: 0x0037, 0x1155: 0x0003, 0x1156: 0x003f, 0x1157: 0x04bf, - 0x1158: 0x04c3, 0x1159: 0x1b5c, - 0x1160: 0x8132, 0x1161: 0x8132, 0x1162: 0x8132, 0x1163: 0x8132, - 0x1164: 0x8132, 0x1165: 0x8132, 0x1166: 0x8132, 0x1167: 0x812d, 0x1168: 0x812d, 0x1169: 0x812d, - 0x116a: 0x812d, 0x116b: 0x812d, 0x116c: 0x812d, 0x116d: 0x812d, 0x116e: 0x8132, 0x116f: 0x8132, - 0x1170: 0x1873, 0x1171: 0x0443, 0x1172: 0x043f, 0x1173: 0x007f, 0x1174: 0x007f, 0x1175: 0x0011, - 0x1176: 0x0013, 0x1177: 0x00b7, 0x1178: 0x00bb, 0x1179: 0x04b7, 0x117a: 0x04bb, 0x117b: 0x04ab, - 0x117c: 0x04af, 0x117d: 0x0493, 0x117e: 0x0497, 0x117f: 0x048b, + 0x1140: 0x2509, 0x1141: 0x2484, 0x1142: 0x2303, 0x1143: 0x24a7, 0x1144: 0x244c, 0x1145: 0x241b, + 0x1146: 0x23c0, 0x1147: 0x2556, + 0x1170: 0x2414, 0x1171: 0x248b, 0x1172: 0x27bf, 0x1173: 0x27b6, 0x1174: 0x27ec, 0x1175: 0x27da, + 0x1176: 0x27c8, 0x1177: 0x27e3, 0x1178: 0x27f5, 0x1179: 0x240d, 0x117a: 0x2c7c, 0x117b: 0x2afc, + 0x117c: 0x27d1, // Block 0x46, offset 0x1180 - 0x1180: 0x048f, 0x1181: 0x049b, 0x1182: 0x049f, 0x1183: 0x04a3, 0x1184: 0x04a7, - 0x1187: 0x0077, 0x1188: 0x007b, 0x1189: 0x4269, 0x118a: 0x4269, 0x118b: 0x4269, - 0x118c: 0x4269, 0x118d: 0x007f, 0x118e: 0x007f, 0x118f: 0x007f, 0x1190: 0x0019, 0x1191: 0x0483, - 0x1192: 0x001d, 0x1194: 0x0037, 0x1195: 0x0035, 0x1196: 0x003f, 0x1197: 0x0003, - 0x1198: 0x0443, 0x1199: 0x0011, 0x119a: 0x0013, 0x119b: 0x00b7, 0x119c: 0x00bb, 0x119d: 0x04b7, - 0x119e: 0x04bb, 0x119f: 0x0007, 0x11a0: 0x000d, 0x11a1: 0x0015, 0x11a2: 0x0017, 0x11a3: 0x001b, - 0x11a4: 0x0039, 0x11a5: 0x003d, 0x11a6: 0x003b, 0x11a8: 0x0079, 0x11a9: 0x0009, - 0x11aa: 0x000b, 0x11ab: 0x0041, - 0x11b0: 0x42aa, 0x11b1: 0x442c, 0x11b2: 0x42af, 0x11b4: 0x42b4, - 0x11b6: 0x42b9, 0x11b7: 0x4432, 0x11b8: 0x42be, 0x11b9: 0x4438, 0x11ba: 0x42c3, 0x11bb: 0x443e, - 0x11bc: 0x42c8, 0x11bd: 0x4444, 0x11be: 0x42cd, 0x11bf: 0x444a, + 0x1190: 0x0019, 0x1191: 0x0483, + 0x1192: 0x0487, 0x1193: 0x0035, 0x1194: 0x0037, 0x1195: 0x0003, 0x1196: 0x003f, 0x1197: 0x04bf, + 0x1198: 0x04c3, 0x1199: 0x1b5c, + 0x11a0: 0x8132, 0x11a1: 0x8132, 0x11a2: 0x8132, 0x11a3: 0x8132, + 0x11a4: 0x8132, 0x11a5: 0x8132, 0x11a6: 0x8132, 0x11a7: 0x812d, 0x11a8: 0x812d, 0x11a9: 0x812d, + 0x11aa: 0x812d, 0x11ab: 0x812d, 0x11ac: 0x812d, 0x11ad: 0x812d, 0x11ae: 0x8132, 0x11af: 0x8132, + 0x11b0: 0x1873, 0x11b1: 0x0443, 0x11b2: 0x043f, 0x11b3: 0x007f, 0x11b4: 0x007f, 0x11b5: 0x0011, + 0x11b6: 0x0013, 0x11b7: 0x00b7, 0x11b8: 0x00bb, 0x11b9: 0x04b7, 0x11ba: 0x04bb, 0x11bb: 0x04ab, + 0x11bc: 0x04af, 0x11bd: 0x0493, 0x11be: 0x0497, 0x11bf: 0x048b, // Block 0x47, offset 0x11c0 - 0x11c0: 0x0236, 0x11c1: 0x440e, 0x11c2: 0x440e, 0x11c3: 0x4414, 0x11c4: 0x4414, 0x11c5: 0x4456, - 0x11c6: 0x4456, 0x11c7: 0x441a, 0x11c8: 0x441a, 0x11c9: 0x4462, 0x11ca: 0x4462, 0x11cb: 0x4462, - 0x11cc: 0x4462, 0x11cd: 0x0239, 0x11ce: 0x0239, 0x11cf: 0x023c, 0x11d0: 0x023c, 0x11d1: 0x023c, - 0x11d2: 0x023c, 0x11d3: 0x023f, 0x11d4: 0x023f, 0x11d5: 0x0242, 0x11d6: 0x0242, 0x11d7: 0x0242, - 0x11d8: 0x0242, 0x11d9: 0x0245, 0x11da: 0x0245, 0x11db: 0x0245, 0x11dc: 0x0245, 0x11dd: 0x0248, - 0x11de: 0x0248, 0x11df: 0x0248, 0x11e0: 0x0248, 0x11e1: 0x024b, 0x11e2: 0x024b, 0x11e3: 0x024b, - 0x11e4: 0x024b, 0x11e5: 0x024e, 0x11e6: 0x024e, 0x11e7: 0x024e, 0x11e8: 0x024e, 0x11e9: 0x0251, - 0x11ea: 0x0251, 0x11eb: 0x0254, 0x11ec: 0x0254, 0x11ed: 0x0257, 0x11ee: 0x0257, 0x11ef: 0x025a, - 0x11f0: 0x025a, 0x11f1: 0x025d, 0x11f2: 0x025d, 0x11f3: 0x025d, 0x11f4: 0x025d, 0x11f5: 0x0260, - 0x11f6: 0x0260, 0x11f7: 0x0260, 0x11f8: 0x0260, 0x11f9: 0x0263, 0x11fa: 0x0263, 0x11fb: 0x0263, - 0x11fc: 0x0263, 0x11fd: 0x0266, 0x11fe: 0x0266, 0x11ff: 0x0266, + 0x11c0: 0x048f, 0x11c1: 0x049b, 0x11c2: 0x049f, 0x11c3: 0x04a3, 0x11c4: 0x04a7, + 0x11c7: 0x0077, 0x11c8: 0x007b, 0x11c9: 0x4269, 0x11ca: 0x4269, 0x11cb: 0x4269, + 0x11cc: 0x4269, 0x11cd: 0x007f, 0x11ce: 0x007f, 0x11cf: 0x007f, 0x11d0: 0x0019, 0x11d1: 0x0483, + 0x11d2: 0x001d, 0x11d4: 0x0037, 0x11d5: 0x0035, 0x11d6: 0x003f, 0x11d7: 0x0003, + 0x11d8: 0x0443, 0x11d9: 0x0011, 0x11da: 0x0013, 0x11db: 0x00b7, 0x11dc: 0x00bb, 0x11dd: 0x04b7, + 0x11de: 0x04bb, 0x11df: 0x0007, 0x11e0: 0x000d, 0x11e1: 0x0015, 0x11e2: 0x0017, 0x11e3: 0x001b, + 0x11e4: 0x0039, 0x11e5: 0x003d, 0x11e6: 0x003b, 0x11e8: 0x0079, 0x11e9: 0x0009, + 0x11ea: 0x000b, 0x11eb: 0x0041, + 0x11f0: 0x42aa, 0x11f1: 0x442c, 0x11f2: 0x42af, 0x11f4: 0x42b4, + 0x11f6: 0x42b9, 0x11f7: 0x4432, 0x11f8: 0x42be, 0x11f9: 0x4438, 0x11fa: 0x42c3, 0x11fb: 0x443e, + 0x11fc: 0x42c8, 0x11fd: 0x4444, 0x11fe: 0x42cd, 0x11ff: 0x444a, // Block 0x48, offset 0x1200 - 0x1200: 0x0266, 0x1201: 0x0269, 0x1202: 0x0269, 0x1203: 0x0269, 0x1204: 0x0269, 0x1205: 0x026c, - 0x1206: 0x026c, 0x1207: 0x026c, 0x1208: 0x026c, 0x1209: 0x026f, 0x120a: 0x026f, 0x120b: 0x026f, - 0x120c: 0x026f, 0x120d: 0x0272, 0x120e: 0x0272, 0x120f: 0x0272, 0x1210: 0x0272, 0x1211: 0x0275, - 0x1212: 0x0275, 0x1213: 0x0275, 0x1214: 0x0275, 0x1215: 0x0278, 0x1216: 0x0278, 0x1217: 0x0278, - 0x1218: 0x0278, 0x1219: 0x027b, 0x121a: 0x027b, 0x121b: 0x027b, 0x121c: 0x027b, 0x121d: 0x027e, - 0x121e: 0x027e, 0x121f: 0x027e, 0x1220: 0x027e, 0x1221: 0x0281, 0x1222: 0x0281, 0x1223: 0x0281, - 0x1224: 0x0281, 0x1225: 0x0284, 0x1226: 0x0284, 0x1227: 0x0284, 0x1228: 0x0284, 0x1229: 0x0287, - 0x122a: 0x0287, 0x122b: 0x0287, 0x122c: 0x0287, 0x122d: 0x028a, 0x122e: 0x028a, 0x122f: 0x028d, - 0x1230: 0x028d, 0x1231: 0x0290, 0x1232: 0x0290, 0x1233: 0x0290, 0x1234: 0x0290, 0x1235: 0x2e00, - 0x1236: 0x2e00, 0x1237: 0x2e08, 0x1238: 0x2e08, 0x1239: 0x2e10, 0x123a: 0x2e10, 0x123b: 0x1f82, - 0x123c: 0x1f82, + 0x1200: 0x0236, 0x1201: 0x440e, 0x1202: 0x440e, 0x1203: 0x4414, 0x1204: 0x4414, 0x1205: 0x4456, + 0x1206: 0x4456, 0x1207: 0x441a, 0x1208: 0x441a, 0x1209: 0x4462, 0x120a: 0x4462, 0x120b: 0x4462, + 0x120c: 0x4462, 0x120d: 0x0239, 0x120e: 0x0239, 0x120f: 0x023c, 0x1210: 0x023c, 0x1211: 0x023c, + 0x1212: 0x023c, 0x1213: 0x023f, 0x1214: 0x023f, 0x1215: 0x0242, 0x1216: 0x0242, 0x1217: 0x0242, + 0x1218: 0x0242, 0x1219: 0x0245, 0x121a: 0x0245, 0x121b: 0x0245, 0x121c: 0x0245, 0x121d: 0x0248, + 0x121e: 0x0248, 0x121f: 0x0248, 0x1220: 0x0248, 0x1221: 0x024b, 0x1222: 0x024b, 0x1223: 0x024b, + 0x1224: 0x024b, 0x1225: 0x024e, 0x1226: 0x024e, 0x1227: 0x024e, 0x1228: 0x024e, 0x1229: 0x0251, + 0x122a: 0x0251, 0x122b: 0x0254, 0x122c: 0x0254, 0x122d: 0x0257, 0x122e: 0x0257, 0x122f: 0x025a, + 0x1230: 0x025a, 0x1231: 0x025d, 0x1232: 0x025d, 0x1233: 0x025d, 0x1234: 0x025d, 0x1235: 0x0260, + 0x1236: 0x0260, 0x1237: 0x0260, 0x1238: 0x0260, 0x1239: 0x0263, 0x123a: 0x0263, 0x123b: 0x0263, + 0x123c: 0x0263, 0x123d: 0x0266, 0x123e: 0x0266, 0x123f: 0x0266, // Block 0x49, offset 0x1240 - 0x1240: 0x0081, 0x1241: 0x0083, 0x1242: 0x0085, 0x1243: 0x0087, 0x1244: 0x0089, 0x1245: 0x008b, - 0x1246: 0x008d, 0x1247: 0x008f, 0x1248: 0x0091, 0x1249: 0x0093, 0x124a: 0x0095, 0x124b: 0x0097, - 0x124c: 0x0099, 0x124d: 0x009b, 0x124e: 0x009d, 0x124f: 0x009f, 0x1250: 0x00a1, 0x1251: 0x00a3, - 0x1252: 0x00a5, 0x1253: 0x00a7, 0x1254: 0x00a9, 0x1255: 0x00ab, 0x1256: 0x00ad, 0x1257: 0x00af, - 0x1258: 0x00b1, 0x1259: 0x00b3, 0x125a: 0x00b5, 0x125b: 0x00b7, 0x125c: 0x00b9, 0x125d: 0x00bb, - 0x125e: 0x00bd, 0x125f: 0x0477, 0x1260: 0x047b, 0x1261: 0x0487, 0x1262: 0x049b, 0x1263: 0x049f, - 0x1264: 0x0483, 0x1265: 0x05ab, 0x1266: 0x05a3, 0x1267: 0x04c7, 0x1268: 0x04cf, 0x1269: 0x04d7, - 0x126a: 0x04df, 0x126b: 0x04e7, 0x126c: 0x056b, 0x126d: 0x0573, 0x126e: 0x057b, 0x126f: 0x051f, - 0x1270: 0x05af, 0x1271: 0x04cb, 0x1272: 0x04d3, 0x1273: 0x04db, 0x1274: 0x04e3, 0x1275: 0x04eb, - 0x1276: 0x04ef, 0x1277: 0x04f3, 0x1278: 0x04f7, 0x1279: 0x04fb, 0x127a: 0x04ff, 0x127b: 0x0503, - 0x127c: 0x0507, 0x127d: 0x050b, 0x127e: 0x050f, 0x127f: 0x0513, + 0x1240: 0x0266, 0x1241: 0x0269, 0x1242: 0x0269, 0x1243: 0x0269, 0x1244: 0x0269, 0x1245: 0x026c, + 0x1246: 0x026c, 0x1247: 0x026c, 0x1248: 0x026c, 0x1249: 0x026f, 0x124a: 0x026f, 0x124b: 0x026f, + 0x124c: 0x026f, 0x124d: 0x0272, 0x124e: 0x0272, 0x124f: 0x0272, 0x1250: 0x0272, 0x1251: 0x0275, + 0x1252: 0x0275, 0x1253: 0x0275, 0x1254: 0x0275, 0x1255: 0x0278, 0x1256: 0x0278, 0x1257: 0x0278, + 0x1258: 0x0278, 0x1259: 0x027b, 0x125a: 0x027b, 0x125b: 0x027b, 0x125c: 0x027b, 0x125d: 0x027e, + 0x125e: 0x027e, 0x125f: 0x027e, 0x1260: 0x027e, 0x1261: 0x0281, 0x1262: 0x0281, 0x1263: 0x0281, + 0x1264: 0x0281, 0x1265: 0x0284, 0x1266: 0x0284, 0x1267: 0x0284, 0x1268: 0x0284, 0x1269: 0x0287, + 0x126a: 0x0287, 0x126b: 0x0287, 0x126c: 0x0287, 0x126d: 0x028a, 0x126e: 0x028a, 0x126f: 0x028d, + 0x1270: 0x028d, 0x1271: 0x0290, 0x1272: 0x0290, 0x1273: 0x0290, 0x1274: 0x0290, 0x1275: 0x2e00, + 0x1276: 0x2e00, 0x1277: 0x2e08, 0x1278: 0x2e08, 0x1279: 0x2e10, 0x127a: 0x2e10, 0x127b: 0x1f82, + 0x127c: 0x1f82, // Block 0x4a, offset 0x1280 - 0x1280: 0x0517, 0x1281: 0x051b, 0x1282: 0x0523, 0x1283: 0x0527, 0x1284: 0x052b, 0x1285: 0x052f, - 0x1286: 0x0533, 0x1287: 0x0537, 0x1288: 0x053b, 0x1289: 0x053f, 0x128a: 0x0543, 0x128b: 0x0547, - 0x128c: 0x054b, 0x128d: 0x054f, 0x128e: 0x0553, 0x128f: 0x0557, 0x1290: 0x055b, 0x1291: 0x055f, - 0x1292: 0x0563, 0x1293: 0x0567, 0x1294: 0x056f, 0x1295: 0x0577, 0x1296: 0x057f, 0x1297: 0x0583, - 0x1298: 0x0587, 0x1299: 0x058b, 0x129a: 0x058f, 0x129b: 0x0593, 0x129c: 0x0597, 0x129d: 0x05a7, - 0x129e: 0x4a78, 0x129f: 0x4a7e, 0x12a0: 0x03c3, 0x12a1: 0x0313, 0x12a2: 0x0317, 0x12a3: 0x4a3b, - 0x12a4: 0x031b, 0x12a5: 0x4a41, 0x12a6: 0x4a47, 0x12a7: 0x031f, 0x12a8: 0x0323, 0x12a9: 0x0327, - 0x12aa: 0x4a4d, 0x12ab: 0x4a53, 0x12ac: 0x4a59, 0x12ad: 0x4a5f, 0x12ae: 0x4a65, 0x12af: 0x4a6b, - 0x12b0: 0x0367, 0x12b1: 0x032b, 0x12b2: 0x032f, 0x12b3: 0x0333, 0x12b4: 0x037b, 0x12b5: 0x0337, - 0x12b6: 0x033b, 0x12b7: 0x033f, 0x12b8: 0x0343, 0x12b9: 0x0347, 0x12ba: 0x034b, 0x12bb: 0x034f, - 0x12bc: 0x0353, 0x12bd: 0x0357, 0x12be: 0x035b, + 0x1280: 0x0081, 0x1281: 0x0083, 0x1282: 0x0085, 0x1283: 0x0087, 0x1284: 0x0089, 0x1285: 0x008b, + 0x1286: 0x008d, 0x1287: 0x008f, 0x1288: 0x0091, 0x1289: 0x0093, 0x128a: 0x0095, 0x128b: 0x0097, + 0x128c: 0x0099, 0x128d: 0x009b, 0x128e: 0x009d, 0x128f: 0x009f, 0x1290: 0x00a1, 0x1291: 0x00a3, + 0x1292: 0x00a5, 0x1293: 0x00a7, 0x1294: 0x00a9, 0x1295: 0x00ab, 0x1296: 0x00ad, 0x1297: 0x00af, + 0x1298: 0x00b1, 0x1299: 0x00b3, 0x129a: 0x00b5, 0x129b: 0x00b7, 0x129c: 0x00b9, 0x129d: 0x00bb, + 0x129e: 0x00bd, 0x129f: 0x0477, 0x12a0: 0x047b, 0x12a1: 0x0487, 0x12a2: 0x049b, 0x12a3: 0x049f, + 0x12a4: 0x0483, 0x12a5: 0x05ab, 0x12a6: 0x05a3, 0x12a7: 0x04c7, 0x12a8: 0x04cf, 0x12a9: 0x04d7, + 0x12aa: 0x04df, 0x12ab: 0x04e7, 0x12ac: 0x056b, 0x12ad: 0x0573, 0x12ae: 0x057b, 0x12af: 0x051f, + 0x12b0: 0x05af, 0x12b1: 0x04cb, 0x12b2: 0x04d3, 0x12b3: 0x04db, 0x12b4: 0x04e3, 0x12b5: 0x04eb, + 0x12b6: 0x04ef, 0x12b7: 0x04f3, 0x12b8: 0x04f7, 0x12b9: 0x04fb, 0x12ba: 0x04ff, 0x12bb: 0x0503, + 0x12bc: 0x0507, 0x12bd: 0x050b, 0x12be: 0x050f, 0x12bf: 0x0513, // Block 0x4b, offset 0x12c0 - 0x12c2: 0x49bd, 0x12c3: 0x49c3, 0x12c4: 0x49c9, 0x12c5: 0x49cf, - 0x12c6: 0x49d5, 0x12c7: 0x49db, 0x12ca: 0x49e1, 0x12cb: 0x49e7, - 0x12cc: 0x49ed, 0x12cd: 0x49f3, 0x12ce: 0x49f9, 0x12cf: 0x49ff, - 0x12d2: 0x4a05, 0x12d3: 0x4a0b, 0x12d4: 0x4a11, 0x12d5: 0x4a17, 0x12d6: 0x4a1d, 0x12d7: 0x4a23, - 0x12da: 0x4a29, 0x12db: 0x4a2f, 0x12dc: 0x4a35, - 0x12e0: 0x00bf, 0x12e1: 0x00c2, 0x12e2: 0x00cb, 0x12e3: 0x4264, - 0x12e4: 0x00c8, 0x12e5: 0x00c5, 0x12e6: 0x0447, 0x12e8: 0x046b, 0x12e9: 0x044b, - 0x12ea: 0x044f, 0x12eb: 0x0453, 0x12ec: 0x0457, 0x12ed: 0x046f, 0x12ee: 0x0473, + 0x12c0: 0x0517, 0x12c1: 0x051b, 0x12c2: 0x0523, 0x12c3: 0x0527, 0x12c4: 0x052b, 0x12c5: 0x052f, + 0x12c6: 0x0533, 0x12c7: 0x0537, 0x12c8: 0x053b, 0x12c9: 0x053f, 0x12ca: 0x0543, 0x12cb: 0x0547, + 0x12cc: 0x054b, 0x12cd: 0x054f, 0x12ce: 0x0553, 0x12cf: 0x0557, 0x12d0: 0x055b, 0x12d1: 0x055f, + 0x12d2: 0x0563, 0x12d3: 0x0567, 0x12d4: 0x056f, 0x12d5: 0x0577, 0x12d6: 0x057f, 0x12d7: 0x0583, + 0x12d8: 0x0587, 0x12d9: 0x058b, 0x12da: 0x058f, 0x12db: 0x0593, 0x12dc: 0x0597, 0x12dd: 0x05a7, + 0x12de: 0x4a78, 0x12df: 0x4a7e, 0x12e0: 0x03c3, 0x12e1: 0x0313, 0x12e2: 0x0317, 0x12e3: 0x4a3b, + 0x12e4: 0x031b, 0x12e5: 0x4a41, 0x12e6: 0x4a47, 0x12e7: 0x031f, 0x12e8: 0x0323, 0x12e9: 0x0327, + 0x12ea: 0x4a4d, 0x12eb: 0x4a53, 0x12ec: 0x4a59, 0x12ed: 0x4a5f, 0x12ee: 0x4a65, 0x12ef: 0x4a6b, + 0x12f0: 0x0367, 0x12f1: 0x032b, 0x12f2: 0x032f, 0x12f3: 0x0333, 0x12f4: 0x037b, 0x12f5: 0x0337, + 0x12f6: 0x033b, 0x12f7: 0x033f, 0x12f8: 0x0343, 0x12f9: 0x0347, 0x12fa: 0x034b, 0x12fb: 0x034f, + 0x12fc: 0x0353, 0x12fd: 0x0357, 0x12fe: 0x035b, // Block 0x4c, offset 0x1300 - 0x1300: 0x0063, 0x1301: 0x0065, 0x1302: 0x0067, 0x1303: 0x0069, 0x1304: 0x006b, 0x1305: 0x006d, - 0x1306: 0x006f, 0x1307: 0x0071, 0x1308: 0x0073, 0x1309: 0x0075, 0x130a: 0x0083, 0x130b: 0x0085, - 0x130c: 0x0087, 0x130d: 0x0089, 0x130e: 0x008b, 0x130f: 0x008d, 0x1310: 0x008f, 0x1311: 0x0091, - 0x1312: 0x0093, 0x1313: 0x0095, 0x1314: 0x0097, 0x1315: 0x0099, 0x1316: 0x009b, 0x1317: 0x009d, - 0x1318: 0x009f, 0x1319: 0x00a1, 0x131a: 0x00a3, 0x131b: 0x00a5, 0x131c: 0x00a7, 0x131d: 0x00a9, - 0x131e: 0x00ab, 0x131f: 0x00ad, 0x1320: 0x00af, 0x1321: 0x00b1, 0x1322: 0x00b3, 0x1323: 0x00b5, - 0x1324: 0x00dd, 0x1325: 0x00f2, 0x1328: 0x0173, 0x1329: 0x0176, - 0x132a: 0x0179, 0x132b: 0x017c, 0x132c: 0x017f, 0x132d: 0x0182, 0x132e: 0x0185, 0x132f: 0x0188, - 0x1330: 0x018b, 0x1331: 0x018e, 0x1332: 0x0191, 0x1333: 0x0194, 0x1334: 0x0197, 0x1335: 0x019a, - 0x1336: 0x019d, 0x1337: 0x01a0, 0x1338: 0x01a3, 0x1339: 0x0188, 0x133a: 0x01a6, 0x133b: 0x01a9, - 0x133c: 0x01ac, 0x133d: 0x01af, 0x133e: 0x01b2, 0x133f: 0x01b5, + 0x1302: 0x49bd, 0x1303: 0x49c3, 0x1304: 0x49c9, 0x1305: 0x49cf, + 0x1306: 0x49d5, 0x1307: 0x49db, 0x130a: 0x49e1, 0x130b: 0x49e7, + 0x130c: 0x49ed, 0x130d: 0x49f3, 0x130e: 0x49f9, 0x130f: 0x49ff, + 0x1312: 0x4a05, 0x1313: 0x4a0b, 0x1314: 0x4a11, 0x1315: 0x4a17, 0x1316: 0x4a1d, 0x1317: 0x4a23, + 0x131a: 0x4a29, 0x131b: 0x4a2f, 0x131c: 0x4a35, + 0x1320: 0x00bf, 0x1321: 0x00c2, 0x1322: 0x00cb, 0x1323: 0x4264, + 0x1324: 0x00c8, 0x1325: 0x00c5, 0x1326: 0x0447, 0x1328: 0x046b, 0x1329: 0x044b, + 0x132a: 0x044f, 0x132b: 0x0453, 0x132c: 0x0457, 0x132d: 0x046f, 0x132e: 0x0473, // Block 0x4d, offset 0x1340 - 0x1340: 0x01fd, 0x1341: 0x0200, 0x1342: 0x0203, 0x1343: 0x045b, 0x1344: 0x01c7, 0x1345: 0x01d0, - 0x1346: 0x01d6, 0x1347: 0x01fa, 0x1348: 0x01eb, 0x1349: 0x01e8, 0x134a: 0x0206, 0x134b: 0x0209, - 0x134e: 0x0021, 0x134f: 0x0023, 0x1350: 0x0025, 0x1351: 0x0027, - 0x1352: 0x0029, 0x1353: 0x002b, 0x1354: 0x002d, 0x1355: 0x002f, 0x1356: 0x0031, 0x1357: 0x0033, - 0x1358: 0x0021, 0x1359: 0x0023, 0x135a: 0x0025, 0x135b: 0x0027, 0x135c: 0x0029, 0x135d: 0x002b, - 0x135e: 0x002d, 0x135f: 0x002f, 0x1360: 0x0031, 0x1361: 0x0033, 0x1362: 0x0021, 0x1363: 0x0023, - 0x1364: 0x0025, 0x1365: 0x0027, 0x1366: 0x0029, 0x1367: 0x002b, 0x1368: 0x002d, 0x1369: 0x002f, - 0x136a: 0x0031, 0x136b: 0x0033, 0x136c: 0x0021, 0x136d: 0x0023, 0x136e: 0x0025, 0x136f: 0x0027, - 0x1370: 0x0029, 0x1371: 0x002b, 0x1372: 0x002d, 0x1373: 0x002f, 0x1374: 0x0031, 0x1375: 0x0033, - 0x1376: 0x0021, 0x1377: 0x0023, 0x1378: 0x0025, 0x1379: 0x0027, 0x137a: 0x0029, 0x137b: 0x002b, - 0x137c: 0x002d, 0x137d: 0x002f, 0x137e: 0x0031, 0x137f: 0x0033, + 0x1340: 0x0063, 0x1341: 0x0065, 0x1342: 0x0067, 0x1343: 0x0069, 0x1344: 0x006b, 0x1345: 0x006d, + 0x1346: 0x006f, 0x1347: 0x0071, 0x1348: 0x0073, 0x1349: 0x0075, 0x134a: 0x0083, 0x134b: 0x0085, + 0x134c: 0x0087, 0x134d: 0x0089, 0x134e: 0x008b, 0x134f: 0x008d, 0x1350: 0x008f, 0x1351: 0x0091, + 0x1352: 0x0093, 0x1353: 0x0095, 0x1354: 0x0097, 0x1355: 0x0099, 0x1356: 0x009b, 0x1357: 0x009d, + 0x1358: 0x009f, 0x1359: 0x00a1, 0x135a: 0x00a3, 0x135b: 0x00a5, 0x135c: 0x00a7, 0x135d: 0x00a9, + 0x135e: 0x00ab, 0x135f: 0x00ad, 0x1360: 0x00af, 0x1361: 0x00b1, 0x1362: 0x00b3, 0x1363: 0x00b5, + 0x1364: 0x00dd, 0x1365: 0x00f2, 0x1368: 0x0173, 0x1369: 0x0176, + 0x136a: 0x0179, 0x136b: 0x017c, 0x136c: 0x017f, 0x136d: 0x0182, 0x136e: 0x0185, 0x136f: 0x0188, + 0x1370: 0x018b, 0x1371: 0x018e, 0x1372: 0x0191, 0x1373: 0x0194, 0x1374: 0x0197, 0x1375: 0x019a, + 0x1376: 0x019d, 0x1377: 0x01a0, 0x1378: 0x01a3, 0x1379: 0x0188, 0x137a: 0x01a6, 0x137b: 0x01a9, + 0x137c: 0x01ac, 0x137d: 0x01af, 0x137e: 0x01b2, 0x137f: 0x01b5, // Block 0x4e, offset 0x1380 - 0x1380: 0x0239, 0x1381: 0x023c, 0x1382: 0x0248, 0x1383: 0x0251, 0x1385: 0x028a, - 0x1386: 0x025a, 0x1387: 0x024b, 0x1388: 0x0269, 0x1389: 0x0290, 0x138a: 0x027b, 0x138b: 0x027e, - 0x138c: 0x0281, 0x138d: 0x0284, 0x138e: 0x025d, 0x138f: 0x026f, 0x1390: 0x0275, 0x1391: 0x0263, - 0x1392: 0x0278, 0x1393: 0x0257, 0x1394: 0x0260, 0x1395: 0x0242, 0x1396: 0x0245, 0x1397: 0x024e, - 0x1398: 0x0254, 0x1399: 0x0266, 0x139a: 0x026c, 0x139b: 0x0272, 0x139c: 0x0293, 0x139d: 0x02e4, - 0x139e: 0x02cc, 0x139f: 0x0296, 0x13a1: 0x023c, 0x13a2: 0x0248, - 0x13a4: 0x0287, 0x13a7: 0x024b, 0x13a9: 0x0290, - 0x13aa: 0x027b, 0x13ab: 0x027e, 0x13ac: 0x0281, 0x13ad: 0x0284, 0x13ae: 0x025d, 0x13af: 0x026f, - 0x13b0: 0x0275, 0x13b1: 0x0263, 0x13b2: 0x0278, 0x13b4: 0x0260, 0x13b5: 0x0242, - 0x13b6: 0x0245, 0x13b7: 0x024e, 0x13b9: 0x0266, 0x13bb: 0x0272, + 0x1380: 0x01fd, 0x1381: 0x0200, 0x1382: 0x0203, 0x1383: 0x045b, 0x1384: 0x01c7, 0x1385: 0x01d0, + 0x1386: 0x01d6, 0x1387: 0x01fa, 0x1388: 0x01eb, 0x1389: 0x01e8, 0x138a: 0x0206, 0x138b: 0x0209, + 0x138e: 0x0021, 0x138f: 0x0023, 0x1390: 0x0025, 0x1391: 0x0027, + 0x1392: 0x0029, 0x1393: 0x002b, 0x1394: 0x002d, 0x1395: 0x002f, 0x1396: 0x0031, 0x1397: 0x0033, + 0x1398: 0x0021, 0x1399: 0x0023, 0x139a: 0x0025, 0x139b: 0x0027, 0x139c: 0x0029, 0x139d: 0x002b, + 0x139e: 0x002d, 0x139f: 0x002f, 0x13a0: 0x0031, 0x13a1: 0x0033, 0x13a2: 0x0021, 0x13a3: 0x0023, + 0x13a4: 0x0025, 0x13a5: 0x0027, 0x13a6: 0x0029, 0x13a7: 0x002b, 0x13a8: 0x002d, 0x13a9: 0x002f, + 0x13aa: 0x0031, 0x13ab: 0x0033, 0x13ac: 0x0021, 0x13ad: 0x0023, 0x13ae: 0x0025, 0x13af: 0x0027, + 0x13b0: 0x0029, 0x13b1: 0x002b, 0x13b2: 0x002d, 0x13b3: 0x002f, 0x13b4: 0x0031, 0x13b5: 0x0033, + 0x13b6: 0x0021, 0x13b7: 0x0023, 0x13b8: 0x0025, 0x13b9: 0x0027, 0x13ba: 0x0029, 0x13bb: 0x002b, + 0x13bc: 0x002d, 0x13bd: 0x002f, 0x13be: 0x0031, 0x13bf: 0x0033, // Block 0x4f, offset 0x13c0 - 0x13c2: 0x0248, - 0x13c7: 0x024b, 0x13c9: 0x0290, 0x13cb: 0x027e, - 0x13cd: 0x0284, 0x13ce: 0x025d, 0x13cf: 0x026f, 0x13d1: 0x0263, - 0x13d2: 0x0278, 0x13d4: 0x0260, 0x13d7: 0x024e, - 0x13d9: 0x0266, 0x13db: 0x0272, 0x13dd: 0x02e4, - 0x13df: 0x0296, 0x13e1: 0x023c, 0x13e2: 0x0248, - 0x13e4: 0x0287, 0x13e7: 0x024b, 0x13e8: 0x0269, 0x13e9: 0x0290, - 0x13ea: 0x027b, 0x13ec: 0x0281, 0x13ed: 0x0284, 0x13ee: 0x025d, 0x13ef: 0x026f, + 0x13c0: 0x0239, 0x13c1: 0x023c, 0x13c2: 0x0248, 0x13c3: 0x0251, 0x13c5: 0x028a, + 0x13c6: 0x025a, 0x13c7: 0x024b, 0x13c8: 0x0269, 0x13c9: 0x0290, 0x13ca: 0x027b, 0x13cb: 0x027e, + 0x13cc: 0x0281, 0x13cd: 0x0284, 0x13ce: 0x025d, 0x13cf: 0x026f, 0x13d0: 0x0275, 0x13d1: 0x0263, + 0x13d2: 0x0278, 0x13d3: 0x0257, 0x13d4: 0x0260, 0x13d5: 0x0242, 0x13d6: 0x0245, 0x13d7: 0x024e, + 0x13d8: 0x0254, 0x13d9: 0x0266, 0x13da: 0x026c, 0x13db: 0x0272, 0x13dc: 0x0293, 0x13dd: 0x02e4, + 0x13de: 0x02cc, 0x13df: 0x0296, 0x13e1: 0x023c, 0x13e2: 0x0248, + 0x13e4: 0x0287, 0x13e7: 0x024b, 0x13e9: 0x0290, + 0x13ea: 0x027b, 0x13eb: 0x027e, 0x13ec: 0x0281, 0x13ed: 0x0284, 0x13ee: 0x025d, 0x13ef: 0x026f, 0x13f0: 0x0275, 0x13f1: 0x0263, 0x13f2: 0x0278, 0x13f4: 0x0260, 0x13f5: 0x0242, - 0x13f6: 0x0245, 0x13f7: 0x024e, 0x13f9: 0x0266, 0x13fa: 0x026c, 0x13fb: 0x0272, - 0x13fc: 0x0293, 0x13fe: 0x02cc, + 0x13f6: 0x0245, 0x13f7: 0x024e, 0x13f9: 0x0266, 0x13fb: 0x0272, // Block 0x50, offset 0x1400 - 0x1400: 0x0239, 0x1401: 0x023c, 0x1402: 0x0248, 0x1403: 0x0251, 0x1404: 0x0287, 0x1405: 0x028a, - 0x1406: 0x025a, 0x1407: 0x024b, 0x1408: 0x0269, 0x1409: 0x0290, 0x140b: 0x027e, - 0x140c: 0x0281, 0x140d: 0x0284, 0x140e: 0x025d, 0x140f: 0x026f, 0x1410: 0x0275, 0x1411: 0x0263, - 0x1412: 0x0278, 0x1413: 0x0257, 0x1414: 0x0260, 0x1415: 0x0242, 0x1416: 0x0245, 0x1417: 0x024e, - 0x1418: 0x0254, 0x1419: 0x0266, 0x141a: 0x026c, 0x141b: 0x0272, - 0x1421: 0x023c, 0x1422: 0x0248, 0x1423: 0x0251, - 0x1425: 0x028a, 0x1426: 0x025a, 0x1427: 0x024b, 0x1428: 0x0269, 0x1429: 0x0290, - 0x142b: 0x027e, 0x142c: 0x0281, 0x142d: 0x0284, 0x142e: 0x025d, 0x142f: 0x026f, - 0x1430: 0x0275, 0x1431: 0x0263, 0x1432: 0x0278, 0x1433: 0x0257, 0x1434: 0x0260, 0x1435: 0x0242, - 0x1436: 0x0245, 0x1437: 0x024e, 0x1438: 0x0254, 0x1439: 0x0266, 0x143a: 0x026c, 0x143b: 0x0272, + 0x1402: 0x0248, + 0x1407: 0x024b, 0x1409: 0x0290, 0x140b: 0x027e, + 0x140d: 0x0284, 0x140e: 0x025d, 0x140f: 0x026f, 0x1411: 0x0263, + 0x1412: 0x0278, 0x1414: 0x0260, 0x1417: 0x024e, + 0x1419: 0x0266, 0x141b: 0x0272, 0x141d: 0x02e4, + 0x141f: 0x0296, 0x1421: 0x023c, 0x1422: 0x0248, + 0x1424: 0x0287, 0x1427: 0x024b, 0x1428: 0x0269, 0x1429: 0x0290, + 0x142a: 0x027b, 0x142c: 0x0281, 0x142d: 0x0284, 0x142e: 0x025d, 0x142f: 0x026f, + 0x1430: 0x0275, 0x1431: 0x0263, 0x1432: 0x0278, 0x1434: 0x0260, 0x1435: 0x0242, + 0x1436: 0x0245, 0x1437: 0x024e, 0x1439: 0x0266, 0x143a: 0x026c, 0x143b: 0x0272, + 0x143c: 0x0293, 0x143e: 0x02cc, // Block 0x51, offset 0x1440 - 0x1440: 0x1879, 0x1441: 0x1876, 0x1442: 0x187c, 0x1443: 0x18a0, 0x1444: 0x18c4, 0x1445: 0x18e8, - 0x1446: 0x190c, 0x1447: 0x1915, 0x1448: 0x191b, 0x1449: 0x1921, 0x144a: 0x1927, - 0x1450: 0x1a8c, 0x1451: 0x1a90, - 0x1452: 0x1a94, 0x1453: 0x1a98, 0x1454: 0x1a9c, 0x1455: 0x1aa0, 0x1456: 0x1aa4, 0x1457: 0x1aa8, - 0x1458: 0x1aac, 0x1459: 0x1ab0, 0x145a: 0x1ab4, 0x145b: 0x1ab8, 0x145c: 0x1abc, 0x145d: 0x1ac0, - 0x145e: 0x1ac4, 0x145f: 0x1ac8, 0x1460: 0x1acc, 0x1461: 0x1ad0, 0x1462: 0x1ad4, 0x1463: 0x1ad8, - 0x1464: 0x1adc, 0x1465: 0x1ae0, 0x1466: 0x1ae4, 0x1467: 0x1ae8, 0x1468: 0x1aec, 0x1469: 0x1af0, - 0x146a: 0x271e, 0x146b: 0x0047, 0x146c: 0x0065, 0x146d: 0x193c, 0x146e: 0x19b1, - 0x1470: 0x0043, 0x1471: 0x0045, 0x1472: 0x0047, 0x1473: 0x0049, 0x1474: 0x004b, 0x1475: 0x004d, - 0x1476: 0x004f, 0x1477: 0x0051, 0x1478: 0x0053, 0x1479: 0x0055, 0x147a: 0x0057, 0x147b: 0x0059, - 0x147c: 0x005b, 0x147d: 0x005d, 0x147e: 0x005f, 0x147f: 0x0061, + 0x1440: 0x0239, 0x1441: 0x023c, 0x1442: 0x0248, 0x1443: 0x0251, 0x1444: 0x0287, 0x1445: 0x028a, + 0x1446: 0x025a, 0x1447: 0x024b, 0x1448: 0x0269, 0x1449: 0x0290, 0x144b: 0x027e, + 0x144c: 0x0281, 0x144d: 0x0284, 0x144e: 0x025d, 0x144f: 0x026f, 0x1450: 0x0275, 0x1451: 0x0263, + 0x1452: 0x0278, 0x1453: 0x0257, 0x1454: 0x0260, 0x1455: 0x0242, 0x1456: 0x0245, 0x1457: 0x024e, + 0x1458: 0x0254, 0x1459: 0x0266, 0x145a: 0x026c, 0x145b: 0x0272, + 0x1461: 0x023c, 0x1462: 0x0248, 0x1463: 0x0251, + 0x1465: 0x028a, 0x1466: 0x025a, 0x1467: 0x024b, 0x1468: 0x0269, 0x1469: 0x0290, + 0x146b: 0x027e, 0x146c: 0x0281, 0x146d: 0x0284, 0x146e: 0x025d, 0x146f: 0x026f, + 0x1470: 0x0275, 0x1471: 0x0263, 0x1472: 0x0278, 0x1473: 0x0257, 0x1474: 0x0260, 0x1475: 0x0242, + 0x1476: 0x0245, 0x1477: 0x024e, 0x1478: 0x0254, 0x1479: 0x0266, 0x147a: 0x026c, 0x147b: 0x0272, // Block 0x52, offset 0x1480 - 0x1480: 0x26ad, 0x1481: 0x26c2, 0x1482: 0x0503, - 0x1490: 0x0c0f, 0x1491: 0x0a47, - 0x1492: 0x08d3, 0x1493: 0x45c4, 0x1494: 0x071b, 0x1495: 0x09ef, 0x1496: 0x132f, 0x1497: 0x09ff, - 0x1498: 0x0727, 0x1499: 0x0cd7, 0x149a: 0x0eaf, 0x149b: 0x0caf, 0x149c: 0x0827, 0x149d: 0x0b6b, - 0x149e: 0x07bf, 0x149f: 0x0cb7, 0x14a0: 0x0813, 0x14a1: 0x1117, 0x14a2: 0x0f83, 0x14a3: 0x138b, - 0x14a4: 0x09d3, 0x14a5: 0x090b, 0x14a6: 0x0e63, 0x14a7: 0x0c1b, 0x14a8: 0x0c47, 0x14a9: 0x06bf, - 0x14aa: 0x06cb, 0x14ab: 0x140b, 0x14ac: 0x0adb, 0x14ad: 0x06e7, 0x14ae: 0x08ef, 0x14af: 0x0c3b, - 0x14b0: 0x13b3, 0x14b1: 0x0c13, 0x14b2: 0x106f, 0x14b3: 0x10ab, 0x14b4: 0x08f7, 0x14b5: 0x0e43, - 0x14b6: 0x0d0b, 0x14b7: 0x0d07, 0x14b8: 0x0f97, 0x14b9: 0x082b, 0x14ba: 0x0957, 0x14bb: 0x1443, + 0x1480: 0x1879, 0x1481: 0x1876, 0x1482: 0x187c, 0x1483: 0x18a0, 0x1484: 0x18c4, 0x1485: 0x18e8, + 0x1486: 0x190c, 0x1487: 0x1915, 0x1488: 0x191b, 0x1489: 0x1921, 0x148a: 0x1927, + 0x1490: 0x1a8c, 0x1491: 0x1a90, + 0x1492: 0x1a94, 0x1493: 0x1a98, 0x1494: 0x1a9c, 0x1495: 0x1aa0, 0x1496: 0x1aa4, 0x1497: 0x1aa8, + 0x1498: 0x1aac, 0x1499: 0x1ab0, 0x149a: 0x1ab4, 0x149b: 0x1ab8, 0x149c: 0x1abc, 0x149d: 0x1ac0, + 0x149e: 0x1ac4, 0x149f: 0x1ac8, 0x14a0: 0x1acc, 0x14a1: 0x1ad0, 0x14a2: 0x1ad4, 0x14a3: 0x1ad8, + 0x14a4: 0x1adc, 0x14a5: 0x1ae0, 0x14a6: 0x1ae4, 0x14a7: 0x1ae8, 0x14a8: 0x1aec, 0x14a9: 0x1af0, + 0x14aa: 0x271e, 0x14ab: 0x0047, 0x14ac: 0x0065, 0x14ad: 0x193c, 0x14ae: 0x19b1, + 0x14b0: 0x0043, 0x14b1: 0x0045, 0x14b2: 0x0047, 0x14b3: 0x0049, 0x14b4: 0x004b, 0x14b5: 0x004d, + 0x14b6: 0x004f, 0x14b7: 0x0051, 0x14b8: 0x0053, 0x14b9: 0x0055, 0x14ba: 0x0057, 0x14bb: 0x0059, + 0x14bc: 0x005b, 0x14bd: 0x005d, 0x14be: 0x005f, 0x14bf: 0x0061, // Block 0x53, offset 0x14c0 - 0x14c0: 0x06fb, 0x14c1: 0x06f3, 0x14c2: 0x0703, 0x14c3: 0x1647, 0x14c4: 0x0747, 0x14c5: 0x0757, - 0x14c6: 0x075b, 0x14c7: 0x0763, 0x14c8: 0x076b, 0x14c9: 0x076f, 0x14ca: 0x077b, 0x14cb: 0x0773, - 0x14cc: 0x05b3, 0x14cd: 0x165b, 0x14ce: 0x078f, 0x14cf: 0x0793, 0x14d0: 0x0797, 0x14d1: 0x07b3, - 0x14d2: 0x164c, 0x14d3: 0x05b7, 0x14d4: 0x079f, 0x14d5: 0x07bf, 0x14d6: 0x1656, 0x14d7: 0x07cf, - 0x14d8: 0x07d7, 0x14d9: 0x0737, 0x14da: 0x07df, 0x14db: 0x07e3, 0x14dc: 0x1831, 0x14dd: 0x07ff, - 0x14de: 0x0807, 0x14df: 0x05bf, 0x14e0: 0x081f, 0x14e1: 0x0823, 0x14e2: 0x082b, 0x14e3: 0x082f, - 0x14e4: 0x05c3, 0x14e5: 0x0847, 0x14e6: 0x084b, 0x14e7: 0x0857, 0x14e8: 0x0863, 0x14e9: 0x0867, - 0x14ea: 0x086b, 0x14eb: 0x0873, 0x14ec: 0x0893, 0x14ed: 0x0897, 0x14ee: 0x089f, 0x14ef: 0x08af, - 0x14f0: 0x08b7, 0x14f1: 0x08bb, 0x14f2: 0x08bb, 0x14f3: 0x08bb, 0x14f4: 0x166a, 0x14f5: 0x0e93, - 0x14f6: 0x08cf, 0x14f7: 0x08d7, 0x14f8: 0x166f, 0x14f9: 0x08e3, 0x14fa: 0x08eb, 0x14fb: 0x08f3, - 0x14fc: 0x091b, 0x14fd: 0x0907, 0x14fe: 0x0913, 0x14ff: 0x0917, + 0x14c0: 0x26ad, 0x14c1: 0x26c2, 0x14c2: 0x0503, + 0x14d0: 0x0c0f, 0x14d1: 0x0a47, + 0x14d2: 0x08d3, 0x14d3: 0x45c4, 0x14d4: 0x071b, 0x14d5: 0x09ef, 0x14d6: 0x132f, 0x14d7: 0x09ff, + 0x14d8: 0x0727, 0x14d9: 0x0cd7, 0x14da: 0x0eaf, 0x14db: 0x0caf, 0x14dc: 0x0827, 0x14dd: 0x0b6b, + 0x14de: 0x07bf, 0x14df: 0x0cb7, 0x14e0: 0x0813, 0x14e1: 0x1117, 0x14e2: 0x0f83, 0x14e3: 0x138b, + 0x14e4: 0x09d3, 0x14e5: 0x090b, 0x14e6: 0x0e63, 0x14e7: 0x0c1b, 0x14e8: 0x0c47, 0x14e9: 0x06bf, + 0x14ea: 0x06cb, 0x14eb: 0x140b, 0x14ec: 0x0adb, 0x14ed: 0x06e7, 0x14ee: 0x08ef, 0x14ef: 0x0c3b, + 0x14f0: 0x13b3, 0x14f1: 0x0c13, 0x14f2: 0x106f, 0x14f3: 0x10ab, 0x14f4: 0x08f7, 0x14f5: 0x0e43, + 0x14f6: 0x0d0b, 0x14f7: 0x0d07, 0x14f8: 0x0f97, 0x14f9: 0x082b, 0x14fa: 0x0957, 0x14fb: 0x1443, // Block 0x54, offset 0x1500 - 0x1500: 0x091f, 0x1501: 0x0927, 0x1502: 0x092b, 0x1503: 0x0933, 0x1504: 0x093b, 0x1505: 0x093f, - 0x1506: 0x093f, 0x1507: 0x0947, 0x1508: 0x094f, 0x1509: 0x0953, 0x150a: 0x095f, 0x150b: 0x0983, - 0x150c: 0x0967, 0x150d: 0x0987, 0x150e: 0x096b, 0x150f: 0x0973, 0x1510: 0x080b, 0x1511: 0x09cf, - 0x1512: 0x0997, 0x1513: 0x099b, 0x1514: 0x099f, 0x1515: 0x0993, 0x1516: 0x09a7, 0x1517: 0x09a3, - 0x1518: 0x09bb, 0x1519: 0x1674, 0x151a: 0x09d7, 0x151b: 0x09db, 0x151c: 0x09e3, 0x151d: 0x09ef, - 0x151e: 0x09f7, 0x151f: 0x0a13, 0x1520: 0x1679, 0x1521: 0x167e, 0x1522: 0x0a1f, 0x1523: 0x0a23, - 0x1524: 0x0a27, 0x1525: 0x0a1b, 0x1526: 0x0a2f, 0x1527: 0x05c7, 0x1528: 0x05cb, 0x1529: 0x0a37, - 0x152a: 0x0a3f, 0x152b: 0x0a3f, 0x152c: 0x1683, 0x152d: 0x0a5b, 0x152e: 0x0a5f, 0x152f: 0x0a63, - 0x1530: 0x0a6b, 0x1531: 0x1688, 0x1532: 0x0a73, 0x1533: 0x0a77, 0x1534: 0x0b4f, 0x1535: 0x0a7f, - 0x1536: 0x05cf, 0x1537: 0x0a8b, 0x1538: 0x0a9b, 0x1539: 0x0aa7, 0x153a: 0x0aa3, 0x153b: 0x1692, - 0x153c: 0x0aaf, 0x153d: 0x1697, 0x153e: 0x0abb, 0x153f: 0x0ab7, + 0x1500: 0x06fb, 0x1501: 0x06f3, 0x1502: 0x0703, 0x1503: 0x1647, 0x1504: 0x0747, 0x1505: 0x0757, + 0x1506: 0x075b, 0x1507: 0x0763, 0x1508: 0x076b, 0x1509: 0x076f, 0x150a: 0x077b, 0x150b: 0x0773, + 0x150c: 0x05b3, 0x150d: 0x165b, 0x150e: 0x078f, 0x150f: 0x0793, 0x1510: 0x0797, 0x1511: 0x07b3, + 0x1512: 0x164c, 0x1513: 0x05b7, 0x1514: 0x079f, 0x1515: 0x07bf, 0x1516: 0x1656, 0x1517: 0x07cf, + 0x1518: 0x07d7, 0x1519: 0x0737, 0x151a: 0x07df, 0x151b: 0x07e3, 0x151c: 0x1831, 0x151d: 0x07ff, + 0x151e: 0x0807, 0x151f: 0x05bf, 0x1520: 0x081f, 0x1521: 0x0823, 0x1522: 0x082b, 0x1523: 0x082f, + 0x1524: 0x05c3, 0x1525: 0x0847, 0x1526: 0x084b, 0x1527: 0x0857, 0x1528: 0x0863, 0x1529: 0x0867, + 0x152a: 0x086b, 0x152b: 0x0873, 0x152c: 0x0893, 0x152d: 0x0897, 0x152e: 0x089f, 0x152f: 0x08af, + 0x1530: 0x08b7, 0x1531: 0x08bb, 0x1532: 0x08bb, 0x1533: 0x08bb, 0x1534: 0x166a, 0x1535: 0x0e93, + 0x1536: 0x08cf, 0x1537: 0x08d7, 0x1538: 0x166f, 0x1539: 0x08e3, 0x153a: 0x08eb, 0x153b: 0x08f3, + 0x153c: 0x091b, 0x153d: 0x0907, 0x153e: 0x0913, 0x153f: 0x0917, // Block 0x55, offset 0x1540 - 0x1540: 0x0abf, 0x1541: 0x0acf, 0x1542: 0x0ad3, 0x1543: 0x05d3, 0x1544: 0x0ae3, 0x1545: 0x0aeb, - 0x1546: 0x0aef, 0x1547: 0x0af3, 0x1548: 0x05d7, 0x1549: 0x169c, 0x154a: 0x05db, 0x154b: 0x0b0f, - 0x154c: 0x0b13, 0x154d: 0x0b17, 0x154e: 0x0b1f, 0x154f: 0x1863, 0x1550: 0x0b37, 0x1551: 0x16a6, - 0x1552: 0x16a6, 0x1553: 0x11d7, 0x1554: 0x0b47, 0x1555: 0x0b47, 0x1556: 0x05df, 0x1557: 0x16c9, - 0x1558: 0x179b, 0x1559: 0x0b57, 0x155a: 0x0b5f, 0x155b: 0x05e3, 0x155c: 0x0b73, 0x155d: 0x0b83, - 0x155e: 0x0b87, 0x155f: 0x0b8f, 0x1560: 0x0b9f, 0x1561: 0x05eb, 0x1562: 0x05e7, 0x1563: 0x0ba3, - 0x1564: 0x16ab, 0x1565: 0x0ba7, 0x1566: 0x0bbb, 0x1567: 0x0bbf, 0x1568: 0x0bc3, 0x1569: 0x0bbf, - 0x156a: 0x0bcf, 0x156b: 0x0bd3, 0x156c: 0x0be3, 0x156d: 0x0bdb, 0x156e: 0x0bdf, 0x156f: 0x0be7, - 0x1570: 0x0beb, 0x1571: 0x0bef, 0x1572: 0x0bfb, 0x1573: 0x0bff, 0x1574: 0x0c17, 0x1575: 0x0c1f, - 0x1576: 0x0c2f, 0x1577: 0x0c43, 0x1578: 0x16ba, 0x1579: 0x0c3f, 0x157a: 0x0c33, 0x157b: 0x0c4b, - 0x157c: 0x0c53, 0x157d: 0x0c67, 0x157e: 0x16bf, 0x157f: 0x0c6f, + 0x1540: 0x091f, 0x1541: 0x0927, 0x1542: 0x092b, 0x1543: 0x0933, 0x1544: 0x093b, 0x1545: 0x093f, + 0x1546: 0x093f, 0x1547: 0x0947, 0x1548: 0x094f, 0x1549: 0x0953, 0x154a: 0x095f, 0x154b: 0x0983, + 0x154c: 0x0967, 0x154d: 0x0987, 0x154e: 0x096b, 0x154f: 0x0973, 0x1550: 0x080b, 0x1551: 0x09cf, + 0x1552: 0x0997, 0x1553: 0x099b, 0x1554: 0x099f, 0x1555: 0x0993, 0x1556: 0x09a7, 0x1557: 0x09a3, + 0x1558: 0x09bb, 0x1559: 0x1674, 0x155a: 0x09d7, 0x155b: 0x09db, 0x155c: 0x09e3, 0x155d: 0x09ef, + 0x155e: 0x09f7, 0x155f: 0x0a13, 0x1560: 0x1679, 0x1561: 0x167e, 0x1562: 0x0a1f, 0x1563: 0x0a23, + 0x1564: 0x0a27, 0x1565: 0x0a1b, 0x1566: 0x0a2f, 0x1567: 0x05c7, 0x1568: 0x05cb, 0x1569: 0x0a37, + 0x156a: 0x0a3f, 0x156b: 0x0a3f, 0x156c: 0x1683, 0x156d: 0x0a5b, 0x156e: 0x0a5f, 0x156f: 0x0a63, + 0x1570: 0x0a6b, 0x1571: 0x1688, 0x1572: 0x0a73, 0x1573: 0x0a77, 0x1574: 0x0b4f, 0x1575: 0x0a7f, + 0x1576: 0x05cf, 0x1577: 0x0a8b, 0x1578: 0x0a9b, 0x1579: 0x0aa7, 0x157a: 0x0aa3, 0x157b: 0x1692, + 0x157c: 0x0aaf, 0x157d: 0x1697, 0x157e: 0x0abb, 0x157f: 0x0ab7, // Block 0x56, offset 0x1580 - 0x1580: 0x0c63, 0x1581: 0x0c5b, 0x1582: 0x05ef, 0x1583: 0x0c77, 0x1584: 0x0c7f, 0x1585: 0x0c87, - 0x1586: 0x0c7b, 0x1587: 0x05f3, 0x1588: 0x0c97, 0x1589: 0x0c9f, 0x158a: 0x16c4, 0x158b: 0x0ccb, - 0x158c: 0x0cff, 0x158d: 0x0cdb, 0x158e: 0x05ff, 0x158f: 0x0ce7, 0x1590: 0x05fb, 0x1591: 0x05f7, - 0x1592: 0x07c3, 0x1593: 0x07c7, 0x1594: 0x0d03, 0x1595: 0x0ceb, 0x1596: 0x11ab, 0x1597: 0x0663, - 0x1598: 0x0d0f, 0x1599: 0x0d13, 0x159a: 0x0d17, 0x159b: 0x0d2b, 0x159c: 0x0d23, 0x159d: 0x16dd, - 0x159e: 0x0603, 0x159f: 0x0d3f, 0x15a0: 0x0d33, 0x15a1: 0x0d4f, 0x15a2: 0x0d57, 0x15a3: 0x16e7, - 0x15a4: 0x0d5b, 0x15a5: 0x0d47, 0x15a6: 0x0d63, 0x15a7: 0x0607, 0x15a8: 0x0d67, 0x15a9: 0x0d6b, - 0x15aa: 0x0d6f, 0x15ab: 0x0d7b, 0x15ac: 0x16ec, 0x15ad: 0x0d83, 0x15ae: 0x060b, 0x15af: 0x0d8f, - 0x15b0: 0x16f1, 0x15b1: 0x0d93, 0x15b2: 0x060f, 0x15b3: 0x0d9f, 0x15b4: 0x0dab, 0x15b5: 0x0db7, - 0x15b6: 0x0dbb, 0x15b7: 0x16f6, 0x15b8: 0x168d, 0x15b9: 0x16fb, 0x15ba: 0x0ddb, 0x15bb: 0x1700, - 0x15bc: 0x0de7, 0x15bd: 0x0def, 0x15be: 0x0ddf, 0x15bf: 0x0dfb, + 0x1580: 0x0abf, 0x1581: 0x0acf, 0x1582: 0x0ad3, 0x1583: 0x05d3, 0x1584: 0x0ae3, 0x1585: 0x0aeb, + 0x1586: 0x0aef, 0x1587: 0x0af3, 0x1588: 0x05d7, 0x1589: 0x169c, 0x158a: 0x05db, 0x158b: 0x0b0f, + 0x158c: 0x0b13, 0x158d: 0x0b17, 0x158e: 0x0b1f, 0x158f: 0x1863, 0x1590: 0x0b37, 0x1591: 0x16a6, + 0x1592: 0x16a6, 0x1593: 0x11d7, 0x1594: 0x0b47, 0x1595: 0x0b47, 0x1596: 0x05df, 0x1597: 0x16c9, + 0x1598: 0x179b, 0x1599: 0x0b57, 0x159a: 0x0b5f, 0x159b: 0x05e3, 0x159c: 0x0b73, 0x159d: 0x0b83, + 0x159e: 0x0b87, 0x159f: 0x0b8f, 0x15a0: 0x0b9f, 0x15a1: 0x05eb, 0x15a2: 0x05e7, 0x15a3: 0x0ba3, + 0x15a4: 0x16ab, 0x15a5: 0x0ba7, 0x15a6: 0x0bbb, 0x15a7: 0x0bbf, 0x15a8: 0x0bc3, 0x15a9: 0x0bbf, + 0x15aa: 0x0bcf, 0x15ab: 0x0bd3, 0x15ac: 0x0be3, 0x15ad: 0x0bdb, 0x15ae: 0x0bdf, 0x15af: 0x0be7, + 0x15b0: 0x0beb, 0x15b1: 0x0bef, 0x15b2: 0x0bfb, 0x15b3: 0x0bff, 0x15b4: 0x0c17, 0x15b5: 0x0c1f, + 0x15b6: 0x0c2f, 0x15b7: 0x0c43, 0x15b8: 0x16ba, 0x15b9: 0x0c3f, 0x15ba: 0x0c33, 0x15bb: 0x0c4b, + 0x15bc: 0x0c53, 0x15bd: 0x0c67, 0x15be: 0x16bf, 0x15bf: 0x0c6f, // Block 0x57, offset 0x15c0 - 0x15c0: 0x0e0b, 0x15c1: 0x0e1b, 0x15c2: 0x0e0f, 0x15c3: 0x0e13, 0x15c4: 0x0e1f, 0x15c5: 0x0e23, - 0x15c6: 0x1705, 0x15c7: 0x0e07, 0x15c8: 0x0e3b, 0x15c9: 0x0e3f, 0x15ca: 0x0613, 0x15cb: 0x0e53, - 0x15cc: 0x0e4f, 0x15cd: 0x170a, 0x15ce: 0x0e33, 0x15cf: 0x0e6f, 0x15d0: 0x170f, 0x15d1: 0x1714, - 0x15d2: 0x0e73, 0x15d3: 0x0e87, 0x15d4: 0x0e83, 0x15d5: 0x0e7f, 0x15d6: 0x0617, 0x15d7: 0x0e8b, - 0x15d8: 0x0e9b, 0x15d9: 0x0e97, 0x15da: 0x0ea3, 0x15db: 0x1651, 0x15dc: 0x0eb3, 0x15dd: 0x1719, - 0x15de: 0x0ebf, 0x15df: 0x1723, 0x15e0: 0x0ed3, 0x15e1: 0x0edf, 0x15e2: 0x0ef3, 0x15e3: 0x1728, - 0x15e4: 0x0f07, 0x15e5: 0x0f0b, 0x15e6: 0x172d, 0x15e7: 0x1732, 0x15e8: 0x0f27, 0x15e9: 0x0f37, - 0x15ea: 0x061b, 0x15eb: 0x0f3b, 0x15ec: 0x061f, 0x15ed: 0x061f, 0x15ee: 0x0f53, 0x15ef: 0x0f57, - 0x15f0: 0x0f5f, 0x15f1: 0x0f63, 0x15f2: 0x0f6f, 0x15f3: 0x0623, 0x15f4: 0x0f87, 0x15f5: 0x1737, - 0x15f6: 0x0fa3, 0x15f7: 0x173c, 0x15f8: 0x0faf, 0x15f9: 0x16a1, 0x15fa: 0x0fbf, 0x15fb: 0x1741, - 0x15fc: 0x1746, 0x15fd: 0x174b, 0x15fe: 0x0627, 0x15ff: 0x062b, + 0x15c0: 0x0c63, 0x15c1: 0x0c5b, 0x15c2: 0x05ef, 0x15c3: 0x0c77, 0x15c4: 0x0c7f, 0x15c5: 0x0c87, + 0x15c6: 0x0c7b, 0x15c7: 0x05f3, 0x15c8: 0x0c97, 0x15c9: 0x0c9f, 0x15ca: 0x16c4, 0x15cb: 0x0ccb, + 0x15cc: 0x0cff, 0x15cd: 0x0cdb, 0x15ce: 0x05ff, 0x15cf: 0x0ce7, 0x15d0: 0x05fb, 0x15d1: 0x05f7, + 0x15d2: 0x07c3, 0x15d3: 0x07c7, 0x15d4: 0x0d03, 0x15d5: 0x0ceb, 0x15d6: 0x11ab, 0x15d7: 0x0663, + 0x15d8: 0x0d0f, 0x15d9: 0x0d13, 0x15da: 0x0d17, 0x15db: 0x0d2b, 0x15dc: 0x0d23, 0x15dd: 0x16dd, + 0x15de: 0x0603, 0x15df: 0x0d3f, 0x15e0: 0x0d33, 0x15e1: 0x0d4f, 0x15e2: 0x0d57, 0x15e3: 0x16e7, + 0x15e4: 0x0d5b, 0x15e5: 0x0d47, 0x15e6: 0x0d63, 0x15e7: 0x0607, 0x15e8: 0x0d67, 0x15e9: 0x0d6b, + 0x15ea: 0x0d6f, 0x15eb: 0x0d7b, 0x15ec: 0x16ec, 0x15ed: 0x0d83, 0x15ee: 0x060b, 0x15ef: 0x0d8f, + 0x15f0: 0x16f1, 0x15f1: 0x0d93, 0x15f2: 0x060f, 0x15f3: 0x0d9f, 0x15f4: 0x0dab, 0x15f5: 0x0db7, + 0x15f6: 0x0dbb, 0x15f7: 0x16f6, 0x15f8: 0x168d, 0x15f9: 0x16fb, 0x15fa: 0x0ddb, 0x15fb: 0x1700, + 0x15fc: 0x0de7, 0x15fd: 0x0def, 0x15fe: 0x0ddf, 0x15ff: 0x0dfb, // Block 0x58, offset 0x1600 - 0x1600: 0x0ff7, 0x1601: 0x1755, 0x1602: 0x1750, 0x1603: 0x175a, 0x1604: 0x175f, 0x1605: 0x0fff, - 0x1606: 0x1003, 0x1607: 0x1003, 0x1608: 0x100b, 0x1609: 0x0633, 0x160a: 0x100f, 0x160b: 0x0637, - 0x160c: 0x063b, 0x160d: 0x1769, 0x160e: 0x1023, 0x160f: 0x102b, 0x1610: 0x1037, 0x1611: 0x063f, - 0x1612: 0x176e, 0x1613: 0x105b, 0x1614: 0x1773, 0x1615: 0x1778, 0x1616: 0x107b, 0x1617: 0x1093, - 0x1618: 0x0643, 0x1619: 0x109b, 0x161a: 0x109f, 0x161b: 0x10a3, 0x161c: 0x177d, 0x161d: 0x1782, - 0x161e: 0x1782, 0x161f: 0x10bb, 0x1620: 0x0647, 0x1621: 0x1787, 0x1622: 0x10cf, 0x1623: 0x10d3, - 0x1624: 0x064b, 0x1625: 0x178c, 0x1626: 0x10ef, 0x1627: 0x064f, 0x1628: 0x10ff, 0x1629: 0x10f7, - 0x162a: 0x1107, 0x162b: 0x1796, 0x162c: 0x111f, 0x162d: 0x0653, 0x162e: 0x112b, 0x162f: 0x1133, - 0x1630: 0x1143, 0x1631: 0x0657, 0x1632: 0x17a0, 0x1633: 0x17a5, 0x1634: 0x065b, 0x1635: 0x17aa, - 0x1636: 0x115b, 0x1637: 0x17af, 0x1638: 0x1167, 0x1639: 0x1173, 0x163a: 0x117b, 0x163b: 0x17b4, - 0x163c: 0x17b9, 0x163d: 0x118f, 0x163e: 0x17be, 0x163f: 0x1197, + 0x1600: 0x0e0b, 0x1601: 0x0e1b, 0x1602: 0x0e0f, 0x1603: 0x0e13, 0x1604: 0x0e1f, 0x1605: 0x0e23, + 0x1606: 0x1705, 0x1607: 0x0e07, 0x1608: 0x0e3b, 0x1609: 0x0e3f, 0x160a: 0x0613, 0x160b: 0x0e53, + 0x160c: 0x0e4f, 0x160d: 0x170a, 0x160e: 0x0e33, 0x160f: 0x0e6f, 0x1610: 0x170f, 0x1611: 0x1714, + 0x1612: 0x0e73, 0x1613: 0x0e87, 0x1614: 0x0e83, 0x1615: 0x0e7f, 0x1616: 0x0617, 0x1617: 0x0e8b, + 0x1618: 0x0e9b, 0x1619: 0x0e97, 0x161a: 0x0ea3, 0x161b: 0x1651, 0x161c: 0x0eb3, 0x161d: 0x1719, + 0x161e: 0x0ebf, 0x161f: 0x1723, 0x1620: 0x0ed3, 0x1621: 0x0edf, 0x1622: 0x0ef3, 0x1623: 0x1728, + 0x1624: 0x0f07, 0x1625: 0x0f0b, 0x1626: 0x172d, 0x1627: 0x1732, 0x1628: 0x0f27, 0x1629: 0x0f37, + 0x162a: 0x061b, 0x162b: 0x0f3b, 0x162c: 0x061f, 0x162d: 0x061f, 0x162e: 0x0f53, 0x162f: 0x0f57, + 0x1630: 0x0f5f, 0x1631: 0x0f63, 0x1632: 0x0f6f, 0x1633: 0x0623, 0x1634: 0x0f87, 0x1635: 0x1737, + 0x1636: 0x0fa3, 0x1637: 0x173c, 0x1638: 0x0faf, 0x1639: 0x16a1, 0x163a: 0x0fbf, 0x163b: 0x1741, + 0x163c: 0x1746, 0x163d: 0x174b, 0x163e: 0x0627, 0x163f: 0x062b, // Block 0x59, offset 0x1640 - 0x1640: 0x16ce, 0x1641: 0x065f, 0x1642: 0x11af, 0x1643: 0x11b3, 0x1644: 0x0667, 0x1645: 0x11b7, - 0x1646: 0x0a33, 0x1647: 0x17c3, 0x1648: 0x17c8, 0x1649: 0x16d3, 0x164a: 0x16d8, 0x164b: 0x11d7, - 0x164c: 0x11db, 0x164d: 0x13f3, 0x164e: 0x066b, 0x164f: 0x1207, 0x1650: 0x1203, 0x1651: 0x120b, - 0x1652: 0x083f, 0x1653: 0x120f, 0x1654: 0x1213, 0x1655: 0x1217, 0x1656: 0x121f, 0x1657: 0x17cd, - 0x1658: 0x121b, 0x1659: 0x1223, 0x165a: 0x1237, 0x165b: 0x123b, 0x165c: 0x1227, 0x165d: 0x123f, - 0x165e: 0x1253, 0x165f: 0x1267, 0x1660: 0x1233, 0x1661: 0x1247, 0x1662: 0x124b, 0x1663: 0x124f, - 0x1664: 0x17d2, 0x1665: 0x17dc, 0x1666: 0x17d7, 0x1667: 0x066f, 0x1668: 0x126f, 0x1669: 0x1273, - 0x166a: 0x127b, 0x166b: 0x17f0, 0x166c: 0x127f, 0x166d: 0x17e1, 0x166e: 0x0673, 0x166f: 0x0677, - 0x1670: 0x17e6, 0x1671: 0x17eb, 0x1672: 0x067b, 0x1673: 0x129f, 0x1674: 0x12a3, 0x1675: 0x12a7, - 0x1676: 0x12ab, 0x1677: 0x12b7, 0x1678: 0x12b3, 0x1679: 0x12bf, 0x167a: 0x12bb, 0x167b: 0x12cb, - 0x167c: 0x12c3, 0x167d: 0x12c7, 0x167e: 0x12cf, 0x167f: 0x067f, + 0x1640: 0x0ff7, 0x1641: 0x1755, 0x1642: 0x1750, 0x1643: 0x175a, 0x1644: 0x175f, 0x1645: 0x0fff, + 0x1646: 0x1003, 0x1647: 0x1003, 0x1648: 0x100b, 0x1649: 0x0633, 0x164a: 0x100f, 0x164b: 0x0637, + 0x164c: 0x063b, 0x164d: 0x1769, 0x164e: 0x1023, 0x164f: 0x102b, 0x1650: 0x1037, 0x1651: 0x063f, + 0x1652: 0x176e, 0x1653: 0x105b, 0x1654: 0x1773, 0x1655: 0x1778, 0x1656: 0x107b, 0x1657: 0x1093, + 0x1658: 0x0643, 0x1659: 0x109b, 0x165a: 0x109f, 0x165b: 0x10a3, 0x165c: 0x177d, 0x165d: 0x1782, + 0x165e: 0x1782, 0x165f: 0x10bb, 0x1660: 0x0647, 0x1661: 0x1787, 0x1662: 0x10cf, 0x1663: 0x10d3, + 0x1664: 0x064b, 0x1665: 0x178c, 0x1666: 0x10ef, 0x1667: 0x064f, 0x1668: 0x10ff, 0x1669: 0x10f7, + 0x166a: 0x1107, 0x166b: 0x1796, 0x166c: 0x111f, 0x166d: 0x0653, 0x166e: 0x112b, 0x166f: 0x1133, + 0x1670: 0x1143, 0x1671: 0x0657, 0x1672: 0x17a0, 0x1673: 0x17a5, 0x1674: 0x065b, 0x1675: 0x17aa, + 0x1676: 0x115b, 0x1677: 0x17af, 0x1678: 0x1167, 0x1679: 0x1173, 0x167a: 0x117b, 0x167b: 0x17b4, + 0x167c: 0x17b9, 0x167d: 0x118f, 0x167e: 0x17be, 0x167f: 0x1197, // Block 0x5a, offset 0x1680 - 0x1680: 0x12d7, 0x1681: 0x12db, 0x1682: 0x0683, 0x1683: 0x12eb, 0x1684: 0x12ef, 0x1685: 0x17f5, - 0x1686: 0x12fb, 0x1687: 0x12ff, 0x1688: 0x0687, 0x1689: 0x130b, 0x168a: 0x05bb, 0x168b: 0x17fa, - 0x168c: 0x17ff, 0x168d: 0x068b, 0x168e: 0x068f, 0x168f: 0x1337, 0x1690: 0x134f, 0x1691: 0x136b, - 0x1692: 0x137b, 0x1693: 0x1804, 0x1694: 0x138f, 0x1695: 0x1393, 0x1696: 0x13ab, 0x1697: 0x13b7, - 0x1698: 0x180e, 0x1699: 0x1660, 0x169a: 0x13c3, 0x169b: 0x13bf, 0x169c: 0x13cb, 0x169d: 0x1665, - 0x169e: 0x13d7, 0x169f: 0x13e3, 0x16a0: 0x1813, 0x16a1: 0x1818, 0x16a2: 0x1423, 0x16a3: 0x142f, - 0x16a4: 0x1437, 0x16a5: 0x181d, 0x16a6: 0x143b, 0x16a7: 0x1467, 0x16a8: 0x1473, 0x16a9: 0x1477, - 0x16aa: 0x146f, 0x16ab: 0x1483, 0x16ac: 0x1487, 0x16ad: 0x1822, 0x16ae: 0x1493, 0x16af: 0x0693, - 0x16b0: 0x149b, 0x16b1: 0x1827, 0x16b2: 0x0697, 0x16b3: 0x14d3, 0x16b4: 0x0ac3, 0x16b5: 0x14eb, - 0x16b6: 0x182c, 0x16b7: 0x1836, 0x16b8: 0x069b, 0x16b9: 0x069f, 0x16ba: 0x1513, 0x16bb: 0x183b, - 0x16bc: 0x06a3, 0x16bd: 0x1840, 0x16be: 0x152b, 0x16bf: 0x152b, + 0x1680: 0x16ce, 0x1681: 0x065f, 0x1682: 0x11af, 0x1683: 0x11b3, 0x1684: 0x0667, 0x1685: 0x11b7, + 0x1686: 0x0a33, 0x1687: 0x17c3, 0x1688: 0x17c8, 0x1689: 0x16d3, 0x168a: 0x16d8, 0x168b: 0x11d7, + 0x168c: 0x11db, 0x168d: 0x13f3, 0x168e: 0x066b, 0x168f: 0x1207, 0x1690: 0x1203, 0x1691: 0x120b, + 0x1692: 0x083f, 0x1693: 0x120f, 0x1694: 0x1213, 0x1695: 0x1217, 0x1696: 0x121f, 0x1697: 0x17cd, + 0x1698: 0x121b, 0x1699: 0x1223, 0x169a: 0x1237, 0x169b: 0x123b, 0x169c: 0x1227, 0x169d: 0x123f, + 0x169e: 0x1253, 0x169f: 0x1267, 0x16a0: 0x1233, 0x16a1: 0x1247, 0x16a2: 0x124b, 0x16a3: 0x124f, + 0x16a4: 0x17d2, 0x16a5: 0x17dc, 0x16a6: 0x17d7, 0x16a7: 0x066f, 0x16a8: 0x126f, 0x16a9: 0x1273, + 0x16aa: 0x127b, 0x16ab: 0x17f0, 0x16ac: 0x127f, 0x16ad: 0x17e1, 0x16ae: 0x0673, 0x16af: 0x0677, + 0x16b0: 0x17e6, 0x16b1: 0x17eb, 0x16b2: 0x067b, 0x16b3: 0x129f, 0x16b4: 0x12a3, 0x16b5: 0x12a7, + 0x16b6: 0x12ab, 0x16b7: 0x12b7, 0x16b8: 0x12b3, 0x16b9: 0x12bf, 0x16ba: 0x12bb, 0x16bb: 0x12cb, + 0x16bc: 0x12c3, 0x16bd: 0x12c7, 0x16be: 0x12cf, 0x16bf: 0x067f, // Block 0x5b, offset 0x16c0 - 0x16c0: 0x1533, 0x16c1: 0x1845, 0x16c2: 0x154b, 0x16c3: 0x06a7, 0x16c4: 0x155b, 0x16c5: 0x1567, - 0x16c6: 0x156f, 0x16c7: 0x1577, 0x16c8: 0x06ab, 0x16c9: 0x184a, 0x16ca: 0x158b, 0x16cb: 0x15a7, - 0x16cc: 0x15b3, 0x16cd: 0x06af, 0x16ce: 0x06b3, 0x16cf: 0x15b7, 0x16d0: 0x184f, 0x16d1: 0x06b7, - 0x16d2: 0x1854, 0x16d3: 0x1859, 0x16d4: 0x185e, 0x16d5: 0x15db, 0x16d6: 0x06bb, 0x16d7: 0x15ef, - 0x16d8: 0x15f7, 0x16d9: 0x15fb, 0x16da: 0x1603, 0x16db: 0x160b, 0x16dc: 0x1613, 0x16dd: 0x1868, + 0x16c0: 0x12d7, 0x16c1: 0x12db, 0x16c2: 0x0683, 0x16c3: 0x12eb, 0x16c4: 0x12ef, 0x16c5: 0x17f5, + 0x16c6: 0x12fb, 0x16c7: 0x12ff, 0x16c8: 0x0687, 0x16c9: 0x130b, 0x16ca: 0x05bb, 0x16cb: 0x17fa, + 0x16cc: 0x17ff, 0x16cd: 0x068b, 0x16ce: 0x068f, 0x16cf: 0x1337, 0x16d0: 0x134f, 0x16d1: 0x136b, + 0x16d2: 0x137b, 0x16d3: 0x1804, 0x16d4: 0x138f, 0x16d5: 0x1393, 0x16d6: 0x13ab, 0x16d7: 0x13b7, + 0x16d8: 0x180e, 0x16d9: 0x1660, 0x16da: 0x13c3, 0x16db: 0x13bf, 0x16dc: 0x13cb, 0x16dd: 0x1665, + 0x16de: 0x13d7, 0x16df: 0x13e3, 0x16e0: 0x1813, 0x16e1: 0x1818, 0x16e2: 0x1423, 0x16e3: 0x142f, + 0x16e4: 0x1437, 0x16e5: 0x181d, 0x16e6: 0x143b, 0x16e7: 0x1467, 0x16e8: 0x1473, 0x16e9: 0x1477, + 0x16ea: 0x146f, 0x16eb: 0x1483, 0x16ec: 0x1487, 0x16ed: 0x1822, 0x16ee: 0x1493, 0x16ef: 0x0693, + 0x16f0: 0x149b, 0x16f1: 0x1827, 0x16f2: 0x0697, 0x16f3: 0x14d3, 0x16f4: 0x0ac3, 0x16f5: 0x14eb, + 0x16f6: 0x182c, 0x16f7: 0x1836, 0x16f8: 0x069b, 0x16f9: 0x069f, 0x16fa: 0x1513, 0x16fb: 0x183b, + 0x16fc: 0x06a3, 0x16fd: 0x1840, 0x16fe: 0x152b, 0x16ff: 0x152b, + // Block 0x5c, offset 0x1700 + 0x1700: 0x1533, 0x1701: 0x1845, 0x1702: 0x154b, 0x1703: 0x06a7, 0x1704: 0x155b, 0x1705: 0x1567, + 0x1706: 0x156f, 0x1707: 0x1577, 0x1708: 0x06ab, 0x1709: 0x184a, 0x170a: 0x158b, 0x170b: 0x15a7, + 0x170c: 0x15b3, 0x170d: 0x06af, 0x170e: 0x06b3, 0x170f: 0x15b7, 0x1710: 0x184f, 0x1711: 0x06b7, + 0x1712: 0x1854, 0x1713: 0x1859, 0x1714: 0x185e, 0x1715: 0x15db, 0x1716: 0x06bb, 0x1717: 0x15ef, + 0x1718: 0x15f7, 0x1719: 0x15fb, 0x171a: 0x1603, 0x171b: 0x160b, 0x171c: 0x1613, 0x171d: 0x1868, } // nfkcIndex: 22 blocks, 1408 entries, 1408 bytes @@ -5548,36 +5570,36 @@ var nfkcIndex = [1408]uint8{ // Block 0x1, offset 0x40 // Block 0x2, offset 0x80 // Block 0x3, offset 0xc0 - 0xc2: 0x5a, 0xc3: 0x01, 0xc4: 0x02, 0xc5: 0x03, 0xc6: 0x5b, 0xc7: 0x04, - 0xc8: 0x05, 0xca: 0x5c, 0xcb: 0x5d, 0xcc: 0x06, 0xcd: 0x07, 0xce: 0x08, 0xcf: 0x09, - 0xd0: 0x0a, 0xd1: 0x5e, 0xd2: 0x5f, 0xd3: 0x0b, 0xd6: 0x0c, 0xd7: 0x60, - 0xd8: 0x61, 0xd9: 0x0d, 0xdb: 0x62, 0xdc: 0x63, 0xdd: 0x64, 0xdf: 0x65, + 0xc2: 0x5b, 0xc3: 0x01, 0xc4: 0x02, 0xc5: 0x03, 0xc6: 0x5c, 0xc7: 0x04, + 0xc8: 0x05, 0xca: 0x5d, 0xcb: 0x5e, 0xcc: 0x06, 0xcd: 0x07, 0xce: 0x08, 0xcf: 0x09, + 0xd0: 0x0a, 0xd1: 0x5f, 0xd2: 0x60, 0xd3: 0x0b, 0xd6: 0x0c, 0xd7: 0x61, + 0xd8: 0x62, 0xd9: 0x0d, 0xdb: 0x63, 0xdc: 0x64, 0xdd: 0x65, 0xdf: 0x66, 0xe0: 0x02, 0xe1: 0x03, 0xe2: 0x04, 0xe3: 0x05, 0xea: 0x06, 0xeb: 0x07, 0xec: 0x08, 0xed: 0x09, 0xef: 0x0a, 0xf0: 0x13, // Block 0x4, offset 0x100 - 0x120: 0x66, 0x121: 0x67, 0x123: 0x68, 0x124: 0x69, 0x125: 0x6a, 0x126: 0x6b, 0x127: 0x6c, - 0x128: 0x6d, 0x129: 0x6e, 0x12a: 0x6f, 0x12b: 0x70, 0x12c: 0x6b, 0x12d: 0x71, 0x12e: 0x72, 0x12f: 0x73, - 0x131: 0x74, 0x132: 0x75, 0x133: 0x76, 0x134: 0x77, 0x135: 0x78, 0x137: 0x79, - 0x138: 0x7a, 0x139: 0x7b, 0x13a: 0x7c, 0x13b: 0x7d, 0x13c: 0x7e, 0x13d: 0x7f, 0x13e: 0x80, 0x13f: 0x81, + 0x120: 0x67, 0x121: 0x68, 0x123: 0x69, 0x124: 0x6a, 0x125: 0x6b, 0x126: 0x6c, 0x127: 0x6d, + 0x128: 0x6e, 0x129: 0x6f, 0x12a: 0x70, 0x12b: 0x71, 0x12c: 0x6c, 0x12d: 0x72, 0x12e: 0x73, 0x12f: 0x74, + 0x131: 0x75, 0x132: 0x76, 0x133: 0x77, 0x134: 0x78, 0x135: 0x79, 0x137: 0x7a, + 0x138: 0x7b, 0x139: 0x7c, 0x13a: 0x7d, 0x13b: 0x7e, 0x13c: 0x7f, 0x13d: 0x80, 0x13e: 0x81, 0x13f: 0x82, // Block 0x5, offset 0x140 - 0x140: 0x82, 0x142: 0x83, 0x143: 0x84, 0x144: 0x85, 0x145: 0x86, 0x146: 0x87, 0x147: 0x88, - 0x14d: 0x89, - 0x15c: 0x8a, 0x15f: 0x8b, - 0x162: 0x8c, 0x164: 0x8d, - 0x168: 0x8e, 0x169: 0x8f, 0x16a: 0x90, 0x16c: 0x0e, 0x16d: 0x91, 0x16e: 0x92, 0x16f: 0x93, - 0x170: 0x94, 0x173: 0x95, 0x174: 0x96, 0x175: 0x0f, 0x176: 0x10, 0x177: 0x97, - 0x178: 0x11, 0x179: 0x12, 0x17a: 0x13, 0x17b: 0x14, 0x17c: 0x15, 0x17d: 0x16, 0x17e: 0x17, 0x17f: 0x18, + 0x140: 0x83, 0x142: 0x84, 0x143: 0x85, 0x144: 0x86, 0x145: 0x87, 0x146: 0x88, 0x147: 0x89, + 0x14d: 0x8a, + 0x15c: 0x8b, 0x15f: 0x8c, + 0x162: 0x8d, 0x164: 0x8e, + 0x168: 0x8f, 0x169: 0x90, 0x16a: 0x91, 0x16c: 0x0e, 0x16d: 0x92, 0x16e: 0x93, 0x16f: 0x94, + 0x170: 0x95, 0x173: 0x96, 0x174: 0x97, 0x175: 0x0f, 0x176: 0x10, 0x177: 0x11, + 0x178: 0x12, 0x179: 0x13, 0x17a: 0x14, 0x17b: 0x15, 0x17c: 0x16, 0x17d: 0x17, 0x17e: 0x18, 0x17f: 0x19, // Block 0x6, offset 0x180 - 0x180: 0x98, 0x181: 0x99, 0x182: 0x9a, 0x183: 0x9b, 0x184: 0x19, 0x185: 0x1a, 0x186: 0x9c, 0x187: 0x9d, - 0x188: 0x9e, 0x189: 0x1b, 0x18a: 0x1c, 0x18b: 0x9f, 0x18c: 0xa0, - 0x191: 0x1d, 0x192: 0x1e, 0x193: 0xa1, + 0x180: 0x98, 0x181: 0x99, 0x182: 0x9a, 0x183: 0x9b, 0x184: 0x1a, 0x185: 0x1b, 0x186: 0x9c, 0x187: 0x9d, + 0x188: 0x9e, 0x189: 0x1c, 0x18a: 0x1d, 0x18b: 0x9f, 0x18c: 0xa0, + 0x191: 0x1e, 0x192: 0x1f, 0x193: 0xa1, 0x1a8: 0xa2, 0x1a9: 0xa3, 0x1ab: 0xa4, 0x1b1: 0xa5, 0x1b3: 0xa6, 0x1b5: 0xa7, 0x1b7: 0xa8, - 0x1ba: 0xa9, 0x1bb: 0xaa, 0x1bc: 0x1f, 0x1bd: 0x20, 0x1be: 0x21, 0x1bf: 0xab, + 0x1ba: 0xa9, 0x1bb: 0xaa, 0x1bc: 0x20, 0x1bd: 0x21, 0x1be: 0x22, 0x1bf: 0xab, // Block 0x7, offset 0x1c0 - 0x1c0: 0xac, 0x1c1: 0x22, 0x1c2: 0x23, 0x1c3: 0x24, 0x1c4: 0xad, 0x1c5: 0x25, 0x1c6: 0x26, - 0x1c8: 0x27, 0x1c9: 0x28, 0x1ca: 0x29, 0x1cb: 0x2a, 0x1cc: 0x2b, 0x1cd: 0x2c, 0x1ce: 0x2d, 0x1cf: 0x2e, + 0x1c0: 0xac, 0x1c1: 0x23, 0x1c2: 0x24, 0x1c3: 0x25, 0x1c4: 0xad, 0x1c5: 0x26, 0x1c6: 0x27, + 0x1c8: 0x28, 0x1c9: 0x29, 0x1ca: 0x2a, 0x1cb: 0x2b, 0x1cc: 0x2c, 0x1cd: 0x2d, 0x1ce: 0x2e, 0x1cf: 0x2f, // Block 0x8, offset 0x200 0x219: 0xae, 0x21a: 0xaf, 0x21b: 0xb0, 0x21d: 0xb1, 0x21f: 0xb2, 0x220: 0xb3, 0x223: 0xb4, 0x224: 0xb5, 0x225: 0xb6, 0x226: 0xb7, 0x227: 0xb8, @@ -5608,50 +5630,51 @@ var nfkcIndex = [1408]uint8{ 0x2d0: 0xc3, 0x2d1: 0xbd, 0x2d2: 0xbe, 0x2d3: 0xbf, 0x2d4: 0xc0, 0x2d5: 0xc1, 0x2d6: 0xc2, 0x2d7: 0xc3, 0x2d8: 0xbd, 0x2d9: 0xbe, 0x2da: 0xbf, 0x2db: 0xc0, 0x2dc: 0xc1, 0x2dd: 0xc2, 0x2de: 0xc4, // Block 0xc, offset 0x300 - 0x324: 0x2f, 0x325: 0x30, 0x326: 0x31, 0x327: 0x32, - 0x328: 0x33, 0x329: 0x34, 0x32a: 0x35, 0x32b: 0x36, 0x32c: 0x37, 0x32d: 0x38, 0x32e: 0x39, 0x32f: 0x3a, - 0x330: 0x3b, 0x331: 0x3c, 0x332: 0x3d, 0x333: 0x3e, 0x334: 0x3f, 0x335: 0x40, 0x336: 0x41, 0x337: 0x42, - 0x338: 0x43, 0x339: 0x44, 0x33a: 0x45, 0x33b: 0x46, 0x33c: 0xc5, 0x33d: 0x47, 0x33e: 0x48, 0x33f: 0x49, + 0x324: 0x30, 0x325: 0x31, 0x326: 0x32, 0x327: 0x33, + 0x328: 0x34, 0x329: 0x35, 0x32a: 0x36, 0x32b: 0x37, 0x32c: 0x38, 0x32d: 0x39, 0x32e: 0x3a, 0x32f: 0x3b, + 0x330: 0x3c, 0x331: 0x3d, 0x332: 0x3e, 0x333: 0x3f, 0x334: 0x40, 0x335: 0x41, 0x336: 0x42, 0x337: 0x43, + 0x338: 0x44, 0x339: 0x45, 0x33a: 0x46, 0x33b: 0x47, 0x33c: 0xc5, 0x33d: 0x48, 0x33e: 0x49, 0x33f: 0x4a, // Block 0xd, offset 0x340 0x347: 0xc6, 0x34b: 0xc7, 0x34d: 0xc8, 0x368: 0xc9, 0x36b: 0xca, // Block 0xe, offset 0x380 0x381: 0xcb, 0x382: 0xcc, 0x384: 0xcd, 0x385: 0xb7, 0x387: 0xce, - 0x388: 0xcf, 0x38b: 0xd0, 0x38c: 0x6b, 0x38d: 0xd1, + 0x388: 0xcf, 0x38b: 0xd0, 0x38c: 0x6c, 0x38d: 0xd1, 0x391: 0xd2, 0x392: 0xd3, 0x393: 0xd4, 0x396: 0xd5, 0x397: 0xd6, 0x398: 0xd7, 0x39a: 0xd8, 0x39c: 0xd9, - 0x3b0: 0xd7, + 0x3a8: 0xda, 0x3a9: 0xdb, 0x3aa: 0xdc, + 0x3b0: 0xd7, 0x3b5: 0xdd, // Block 0xf, offset 0x3c0 - 0x3eb: 0xda, 0x3ec: 0xdb, + 0x3eb: 0xde, 0x3ec: 0xdf, // Block 0x10, offset 0x400 - 0x432: 0xdc, + 0x432: 0xe0, // Block 0x11, offset 0x440 - 0x445: 0xdd, 0x446: 0xde, 0x447: 0xdf, - 0x449: 0xe0, - 0x450: 0xe1, 0x451: 0xe2, 0x452: 0xe3, 0x453: 0xe4, 0x454: 0xe5, 0x455: 0xe6, 0x456: 0xe7, 0x457: 0xe8, - 0x458: 0xe9, 0x459: 0xea, 0x45a: 0x4a, 0x45b: 0xeb, 0x45c: 0xec, 0x45d: 0xed, 0x45e: 0xee, 0x45f: 0x4b, + 0x445: 0xe1, 0x446: 0xe2, 0x447: 0xe3, + 0x449: 0xe4, + 0x450: 0xe5, 0x451: 0xe6, 0x452: 0xe7, 0x453: 0xe8, 0x454: 0xe9, 0x455: 0xea, 0x456: 0xeb, 0x457: 0xec, + 0x458: 0xed, 0x459: 0xee, 0x45a: 0x4b, 0x45b: 0xef, 0x45c: 0xf0, 0x45d: 0xf1, 0x45e: 0xf2, 0x45f: 0x4c, // Block 0x12, offset 0x480 - 0x480: 0xef, - 0x4a3: 0xf0, 0x4a5: 0xf1, - 0x4b8: 0x4c, 0x4b9: 0x4d, 0x4ba: 0x4e, + 0x480: 0xf3, + 0x4a3: 0xf4, 0x4a5: 0xf5, + 0x4b8: 0x4d, 0x4b9: 0x4e, 0x4ba: 0x4f, // Block 0x13, offset 0x4c0 - 0x4c4: 0x4f, 0x4c5: 0xf2, 0x4c6: 0xf3, - 0x4c8: 0x50, 0x4c9: 0xf4, + 0x4c4: 0x50, 0x4c5: 0xf6, 0x4c6: 0xf7, + 0x4c8: 0x51, 0x4c9: 0xf8, // Block 0x14, offset 0x500 - 0x520: 0x51, 0x521: 0x52, 0x522: 0x53, 0x523: 0x54, 0x524: 0x55, 0x525: 0x56, 0x526: 0x57, 0x527: 0x58, - 0x528: 0x59, + 0x520: 0x52, 0x521: 0x53, 0x522: 0x54, 0x523: 0x55, 0x524: 0x56, 0x525: 0x57, 0x526: 0x58, 0x527: 0x59, + 0x528: 0x5a, // Block 0x15, offset 0x540 0x550: 0x0b, 0x551: 0x0c, 0x556: 0x0d, 0x55b: 0x0e, 0x55d: 0x0f, 0x55e: 0x10, 0x55f: 0x11, 0x56f: 0x12, } -// nfkcSparseOffset: 155 entries, 310 bytes -var nfkcSparseOffset = []uint16{0x0, 0xe, 0x12, 0x1b, 0x25, 0x35, 0x37, 0x3c, 0x47, 0x56, 0x63, 0x6b, 0x6f, 0x74, 0x76, 0x87, 0x8f, 0x96, 0x99, 0xa0, 0xa4, 0xa8, 0xaa, 0xac, 0xb5, 0xb9, 0xc0, 0xc5, 0xc8, 0xd2, 0xd4, 0xdb, 0xe3, 0xe7, 0xe9, 0xec, 0xf0, 0xf6, 0x107, 0x113, 0x115, 0x11b, 0x11d, 0x11f, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12c, 0x12f, 0x131, 0x134, 0x137, 0x13b, 0x140, 0x149, 0x14b, 0x14e, 0x150, 0x15b, 0x166, 0x176, 0x184, 0x192, 0x1a2, 0x1b0, 0x1b7, 0x1bd, 0x1cc, 0x1d0, 0x1d2, 0x1d6, 0x1d8, 0x1db, 0x1dd, 0x1e0, 0x1e2, 0x1e5, 0x1e7, 0x1e9, 0x1eb, 0x1f7, 0x201, 0x20b, 0x20e, 0x212, 0x214, 0x216, 0x218, 0x21a, 0x21d, 0x21f, 0x221, 0x223, 0x225, 0x22b, 0x22e, 0x232, 0x234, 0x23b, 0x241, 0x247, 0x24f, 0x255, 0x25b, 0x261, 0x265, 0x267, 0x269, 0x26b, 0x26d, 0x273, 0x276, 0x279, 0x281, 0x288, 0x28b, 0x28e, 0x290, 0x298, 0x29b, 0x2a2, 0x2a5, 0x2ab, 0x2ad, 0x2af, 0x2b2, 0x2b4, 0x2b6, 0x2b8, 0x2ba, 0x2c7, 0x2d1, 0x2d3, 0x2d5, 0x2d9, 0x2de, 0x2ea, 0x2ef, 0x2f8, 0x2fe, 0x303, 0x307, 0x30c, 0x310, 0x320, 0x32e, 0x33c, 0x34a, 0x350, 0x352, 0x355, 0x35f, 0x361} +// nfkcSparseOffset: 158 entries, 316 bytes +var nfkcSparseOffset = []uint16{0x0, 0xe, 0x12, 0x1b, 0x25, 0x35, 0x37, 0x3c, 0x47, 0x56, 0x63, 0x6b, 0x6f, 0x74, 0x76, 0x87, 0x8f, 0x96, 0x99, 0xa0, 0xa4, 0xa8, 0xaa, 0xac, 0xb5, 0xb9, 0xc0, 0xc5, 0xc8, 0xd2, 0xd5, 0xdc, 0xe4, 0xe8, 0xea, 0xed, 0xf1, 0xf7, 0x108, 0x114, 0x116, 0x11c, 0x11e, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12a, 0x12d, 0x130, 0x132, 0x135, 0x138, 0x13c, 0x141, 0x14a, 0x14c, 0x14f, 0x151, 0x15c, 0x167, 0x175, 0x183, 0x193, 0x1a1, 0x1a8, 0x1ae, 0x1bd, 0x1c1, 0x1c3, 0x1c7, 0x1c9, 0x1cc, 0x1ce, 0x1d1, 0x1d3, 0x1d6, 0x1d8, 0x1da, 0x1dc, 0x1e8, 0x1f2, 0x1fc, 0x1ff, 0x203, 0x205, 0x207, 0x209, 0x20b, 0x20e, 0x210, 0x212, 0x214, 0x216, 0x21c, 0x21f, 0x223, 0x225, 0x22c, 0x232, 0x238, 0x240, 0x246, 0x24c, 0x252, 0x256, 0x258, 0x25a, 0x25c, 0x25e, 0x264, 0x267, 0x26a, 0x272, 0x279, 0x27c, 0x27f, 0x281, 0x289, 0x28c, 0x293, 0x296, 0x29c, 0x29e, 0x2a0, 0x2a3, 0x2a5, 0x2a7, 0x2a9, 0x2ab, 0x2ae, 0x2b0, 0x2b2, 0x2b4, 0x2c1, 0x2cb, 0x2cd, 0x2cf, 0x2d3, 0x2d8, 0x2e4, 0x2e9, 0x2f2, 0x2f8, 0x2fd, 0x301, 0x306, 0x30a, 0x31a, 0x328, 0x336, 0x344, 0x34a, 0x34c, 0x34f, 0x359, 0x35b} -// nfkcSparseValues: 875 entries, 3500 bytes -var nfkcSparseValues = [875]valueRange{ +// nfkcSparseValues: 869 entries, 3476 bytes +var nfkcSparseValues = [869]valueRange{ // Block 0x0, offset 0x0 {value: 0x0002, lo: 0x0d}, {value: 0x0001, lo: 0xa0, hi: 0xa0}, @@ -5892,9 +5915,10 @@ var nfkcSparseValues = [875]valueRange{ {value: 0x8104, lo: 0x8d, hi: 0x8d}, {value: 0x9900, lo: 0x95, hi: 0x96}, // Block 0x1d, offset 0xd2 - {value: 0x0000, lo: 0x01}, + {value: 0x0000, lo: 0x02}, + {value: 0x8104, lo: 0xbb, hi: 0xbc}, {value: 0x9900, lo: 0xbe, hi: 0xbe}, - // Block 0x1e, offset 0xd4 + // Block 0x1e, offset 0xd5 {value: 0x0000, lo: 0x06}, {value: 0xa000, lo: 0x86, hi: 0x87}, {value: 0x2cfe, lo: 0x8a, hi: 0x8a}, @@ -5902,7 +5926,7 @@ var nfkcSparseValues = [875]valueRange{ {value: 0x2d06, lo: 0x8c, hi: 0x8c}, {value: 0x8104, lo: 0x8d, hi: 0x8d}, {value: 0x9900, lo: 0x97, hi: 0x97}, - // Block 0x1f, offset 0xdb + // Block 0x1f, offset 0xdc {value: 0x6bea, lo: 0x07}, {value: 0x9904, lo: 0x8a, hi: 0x8a}, {value: 0x9900, lo: 0x8f, hi: 0x8f}, @@ -5911,31 +5935,31 @@ var nfkcSparseValues = [875]valueRange{ {value: 0x2f58, lo: 0x9c, hi: 0x9c}, {value: 0x2de3, lo: 0x9d, hi: 0x9d}, {value: 0x2d16, lo: 0x9e, hi: 0x9f}, - // Block 0x20, offset 0xe3 + // Block 0x20, offset 0xe4 {value: 0x0000, lo: 0x03}, {value: 0x2621, lo: 0xb3, hi: 0xb3}, {value: 0x8122, lo: 0xb8, hi: 0xb9}, {value: 0x8104, lo: 0xba, hi: 0xba}, - // Block 0x21, offset 0xe7 + // Block 0x21, offset 0xe8 {value: 0x0000, lo: 0x01}, {value: 0x8123, lo: 0x88, hi: 0x8b}, - // Block 0x22, offset 0xe9 + // Block 0x22, offset 0xea {value: 0x0000, lo: 0x02}, {value: 0x2636, lo: 0xb3, hi: 0xb3}, {value: 0x8124, lo: 0xb8, hi: 0xb9}, - // Block 0x23, offset 0xec + // Block 0x23, offset 0xed {value: 0x0000, lo: 0x03}, {value: 0x8125, lo: 0x88, hi: 0x8b}, {value: 0x2628, lo: 0x9c, hi: 0x9c}, {value: 0x262f, lo: 0x9d, hi: 0x9d}, - // Block 0x24, offset 0xf0 + // Block 0x24, offset 0xf1 {value: 0x0000, lo: 0x05}, {value: 0x030b, lo: 0x8c, hi: 0x8c}, {value: 0x812d, lo: 0x98, hi: 0x99}, {value: 0x812d, lo: 0xb5, hi: 0xb5}, {value: 0x812d, lo: 0xb7, hi: 0xb7}, {value: 0x812b, lo: 0xb9, hi: 0xb9}, - // Block 0x25, offset 0xf6 + // Block 0x25, offset 0xf7 {value: 0x0000, lo: 0x10}, {value: 0x2644, lo: 0x83, hi: 0x83}, {value: 0x264b, lo: 0x8d, hi: 0x8d}, @@ -5953,7 +5977,7 @@ var nfkcSparseValues = [875]valueRange{ {value: 0x45bc, lo: 0xb8, hi: 0xb8}, {value: 0x45ff, lo: 0xb9, hi: 0xb9}, {value: 0x8127, lo: 0xba, hi: 0xbd}, - // Block 0x26, offset 0x107 + // Block 0x26, offset 0x108 {value: 0x0000, lo: 0x0b}, {value: 0x8127, lo: 0x80, hi: 0x80}, {value: 0x4a96, lo: 0x81, hi: 0x81}, @@ -5966,68 +5990,68 @@ var nfkcSparseValues = [875]valueRange{ {value: 0x2683, lo: 0xa7, hi: 0xa7}, {value: 0x268a, lo: 0xac, hi: 0xac}, {value: 0x2667, lo: 0xb9, hi: 0xb9}, - // Block 0x27, offset 0x113 + // Block 0x27, offset 0x114 {value: 0x0000, lo: 0x01}, {value: 0x812d, lo: 0x86, hi: 0x86}, - // Block 0x28, offset 0x115 + // Block 0x28, offset 0x116 {value: 0x0000, lo: 0x05}, {value: 0xa000, lo: 0xa5, hi: 0xa5}, {value: 0x2d1e, lo: 0xa6, hi: 0xa6}, {value: 0x9900, lo: 0xae, hi: 0xae}, {value: 0x8102, lo: 0xb7, hi: 0xb7}, {value: 0x8104, lo: 0xb9, hi: 0xba}, - // Block 0x29, offset 0x11b + // Block 0x29, offset 0x11c {value: 0x0000, lo: 0x01}, {value: 0x812d, lo: 0x8d, hi: 0x8d}, - // Block 0x2a, offset 0x11d + // Block 0x2a, offset 0x11e {value: 0x0000, lo: 0x01}, {value: 0x030f, lo: 0xbc, hi: 0xbc}, - // Block 0x2b, offset 0x11f + // Block 0x2b, offset 0x120 {value: 0x0000, lo: 0x01}, {value: 0xa000, lo: 0x80, hi: 0x92}, - // Block 0x2c, offset 0x121 + // Block 0x2c, offset 0x122 {value: 0x0000, lo: 0x01}, {value: 0xb900, lo: 0xa1, hi: 0xb5}, - // Block 0x2d, offset 0x123 + // Block 0x2d, offset 0x124 {value: 0x0000, lo: 0x01}, {value: 0x9900, lo: 0xa8, hi: 0xbf}, - // Block 0x2e, offset 0x125 + // Block 0x2e, offset 0x126 {value: 0x0000, lo: 0x01}, {value: 0x9900, lo: 0x80, hi: 0x82}, - // Block 0x2f, offset 0x127 + // Block 0x2f, offset 0x128 {value: 0x0000, lo: 0x01}, {value: 0x8132, lo: 0x9d, hi: 0x9f}, - // Block 0x30, offset 0x129 + // Block 0x30, offset 0x12a {value: 0x0000, lo: 0x02}, {value: 0x8104, lo: 0x94, hi: 0x94}, {value: 0x8104, lo: 0xb4, hi: 0xb4}, - // Block 0x31, offset 0x12c + // Block 0x31, offset 0x12d {value: 0x0000, lo: 0x02}, {value: 0x8104, lo: 0x92, hi: 0x92}, {value: 0x8132, lo: 0x9d, hi: 0x9d}, - // Block 0x32, offset 0x12f + // Block 0x32, offset 0x130 {value: 0x0000, lo: 0x01}, {value: 0x8131, lo: 0xa9, hi: 0xa9}, - // Block 0x33, offset 0x131 + // Block 0x33, offset 0x132 {value: 0x0004, lo: 0x02}, {value: 0x812e, lo: 0xb9, hi: 0xba}, {value: 0x812d, lo: 0xbb, hi: 0xbb}, - // Block 0x34, offset 0x134 + // Block 0x34, offset 0x135 {value: 0x0000, lo: 0x02}, {value: 0x8132, lo: 0x97, hi: 0x97}, {value: 0x812d, lo: 0x98, hi: 0x98}, - // Block 0x35, offset 0x137 + // Block 0x35, offset 0x138 {value: 0x0000, lo: 0x03}, {value: 0x8104, lo: 0xa0, hi: 0xa0}, {value: 0x8132, lo: 0xb5, hi: 0xbc}, {value: 0x812d, lo: 0xbf, hi: 0xbf}, - // Block 0x36, offset 0x13b + // Block 0x36, offset 0x13c {value: 0x0000, lo: 0x04}, {value: 0x8132, lo: 0xb0, hi: 0xb4}, {value: 0x812d, lo: 0xb5, hi: 0xba}, {value: 0x8132, lo: 0xbb, hi: 0xbc}, {value: 0x812d, lo: 0xbd, hi: 0xbd}, - // Block 0x37, offset 0x140 + // Block 0x37, offset 0x141 {value: 0x0000, lo: 0x08}, {value: 0x2d66, lo: 0x80, hi: 0x80}, {value: 0x2d6e, lo: 0x81, hi: 0x81}, @@ -6037,17 +6061,17 @@ var nfkcSparseValues = [875]valueRange{ {value: 0x8132, lo: 0xab, hi: 0xab}, {value: 0x812d, lo: 0xac, hi: 0xac}, {value: 0x8132, lo: 0xad, hi: 0xb3}, - // Block 0x38, offset 0x149 + // Block 0x38, offset 0x14a {value: 0x0000, lo: 0x01}, {value: 0x8104, lo: 0xaa, hi: 0xab}, - // Block 0x39, offset 0x14b + // Block 0x39, offset 0x14c {value: 0x0000, lo: 0x02}, {value: 0x8102, lo: 0xa6, hi: 0xa6}, {value: 0x8104, lo: 0xb2, hi: 0xb3}, - // Block 0x3a, offset 0x14e + // Block 0x3a, offset 0x14f {value: 0x0000, lo: 0x01}, {value: 0x8102, lo: 0xb7, hi: 0xb7}, - // Block 0x3b, offset 0x150 + // Block 0x3b, offset 0x151 {value: 0x0000, lo: 0x0a}, {value: 0x8132, lo: 0x90, hi: 0x92}, {value: 0x8101, lo: 0x94, hi: 0x94}, @@ -6059,7 +6083,7 @@ var nfkcSparseValues = [875]valueRange{ {value: 0x812d, lo: 0xad, hi: 0xad}, {value: 0x8132, lo: 0xb4, hi: 0xb4}, {value: 0x8132, lo: 0xb8, hi: 0xb9}, - // Block 0x3c, offset 0x15b + // Block 0x3c, offset 0x15c {value: 0x0002, lo: 0x0a}, {value: 0x0043, lo: 0xac, hi: 0xac}, {value: 0x00d1, lo: 0xad, hi: 0xad}, @@ -6071,24 +6095,7 @@ var nfkcSparseValues = [875]valueRange{ {value: 0x00ef, lo: 0xbd, hi: 0xbd}, {value: 0x0061, lo: 0xbe, hi: 0xbe}, {value: 0x0065, lo: 0xbf, hi: 0xbf}, - // Block 0x3d, offset 0x166 - {value: 0x0000, lo: 0x0f}, - {value: 0x8132, lo: 0x80, hi: 0x81}, - {value: 0x812d, lo: 0x82, hi: 0x82}, - {value: 0x8132, lo: 0x83, hi: 0x89}, - {value: 0x812d, lo: 0x8a, hi: 0x8a}, - {value: 0x8132, lo: 0x8b, hi: 0x8c}, - {value: 0x8135, lo: 0x8d, hi: 0x8d}, - {value: 0x812a, lo: 0x8e, hi: 0x8e}, - {value: 0x812d, lo: 0x8f, hi: 0x8f}, - {value: 0x8129, lo: 0x90, hi: 0x90}, - {value: 0x8132, lo: 0x91, hi: 0xb5}, - {value: 0x8132, lo: 0xbb, hi: 0xbb}, - {value: 0x8134, lo: 0xbc, hi: 0xbc}, - {value: 0x812d, lo: 0xbd, hi: 0xbd}, - {value: 0x8132, lo: 0xbe, hi: 0xbe}, - {value: 0x812d, lo: 0xbf, hi: 0xbf}, - // Block 0x3e, offset 0x176 + // Block 0x3d, offset 0x167 {value: 0x0000, lo: 0x0d}, {value: 0x0001, lo: 0x80, hi: 0x8a}, {value: 0x043b, lo: 0x91, hi: 0x91}, @@ -6103,7 +6110,7 @@ var nfkcSparseValues = [875]valueRange{ {value: 0x2808, lo: 0xb7, hi: 0xb7}, {value: 0x186d, lo: 0xbc, hi: 0xbc}, {value: 0x4269, lo: 0xbe, hi: 0xbe}, - // Block 0x3f, offset 0x184 + // Block 0x3e, offset 0x175 {value: 0x0002, lo: 0x0d}, {value: 0x1933, lo: 0x87, hi: 0x87}, {value: 0x1930, lo: 0x88, hi: 0x88}, @@ -6118,7 +6125,7 @@ var nfkcSparseValues = [875]valueRange{ {value: 0x003b, lo: 0xbc, hi: 0xbc}, {value: 0x0011, lo: 0xbd, hi: 0xbe}, {value: 0x009d, lo: 0xbf, hi: 0xbf}, - // Block 0x40, offset 0x192 + // Block 0x3f, offset 0x183 {value: 0x0002, lo: 0x0f}, {value: 0x0021, lo: 0x80, hi: 0x89}, {value: 0x0017, lo: 0x8a, hi: 0x8a}, @@ -6135,7 +6142,7 @@ var nfkcSparseValues = [875]valueRange{ {value: 0x00a1, lo: 0x9a, hi: 0x9a}, {value: 0x00a7, lo: 0x9b, hi: 0x9c}, {value: 0x1999, lo: 0xa8, hi: 0xa8}, - // Block 0x41, offset 0x1a2 + // Block 0x40, offset 0x193 {value: 0x0000, lo: 0x0d}, {value: 0x8132, lo: 0x90, hi: 0x91}, {value: 0x8101, lo: 0x92, hi: 0x93}, @@ -6150,7 +6157,7 @@ var nfkcSparseValues = [875]valueRange{ {value: 0x8101, lo: 0xaa, hi: 0xab}, {value: 0x812d, lo: 0xac, hi: 0xaf}, {value: 0x8132, lo: 0xb0, hi: 0xb0}, - // Block 0x42, offset 0x1b0 + // Block 0x41, offset 0x1a1 {value: 0x0007, lo: 0x06}, {value: 0x2180, lo: 0x89, hi: 0x89}, {value: 0xa000, lo: 0x90, hi: 0x90}, @@ -6158,14 +6165,14 @@ var nfkcSparseValues = [875]valueRange{ {value: 0xa000, lo: 0x94, hi: 0x94}, {value: 0x3bb9, lo: 0x9a, hi: 0x9b}, {value: 0x3bc7, lo: 0xae, hi: 0xae}, - // Block 0x43, offset 0x1b7 + // Block 0x42, offset 0x1a8 {value: 0x000e, lo: 0x05}, {value: 0x3bce, lo: 0x8d, hi: 0x8e}, {value: 0x3bd5, lo: 0x8f, hi: 0x8f}, {value: 0xa000, lo: 0x90, hi: 0x90}, {value: 0xa000, lo: 0x92, hi: 0x92}, {value: 0xa000, lo: 0x94, hi: 0x94}, - // Block 0x44, offset 0x1bd + // Block 0x43, offset 0x1ae {value: 0x0173, lo: 0x0e}, {value: 0xa000, lo: 0x83, hi: 0x83}, {value: 0x3be3, lo: 0x84, hi: 0x84}, @@ -6181,50 +6188,50 @@ var nfkcSparseValues = [875]valueRange{ {value: 0x26a6, lo: 0xaf, hi: 0xaf}, {value: 0x281c, lo: 0xb0, hi: 0xb0}, {value: 0xa000, lo: 0xbc, hi: 0xbc}, - // Block 0x45, offset 0x1cc + // Block 0x44, offset 0x1bd {value: 0x0007, lo: 0x03}, {value: 0x3c68, lo: 0xa0, hi: 0xa1}, {value: 0x3c92, lo: 0xa2, hi: 0xa3}, {value: 0x3cbc, lo: 0xaa, hi: 0xad}, - // Block 0x46, offset 0x1d0 + // Block 0x45, offset 0x1c1 {value: 0x0004, lo: 0x01}, {value: 0x048b, lo: 0xa9, hi: 0xaa}, - // Block 0x47, offset 0x1d2 + // Block 0x46, offset 0x1c3 {value: 0x0002, lo: 0x03}, {value: 0x0057, lo: 0x80, hi: 0x8f}, {value: 0x0083, lo: 0x90, hi: 0xa9}, {value: 0x0021, lo: 0xaa, hi: 0xaa}, - // Block 0x48, offset 0x1d6 + // Block 0x47, offset 0x1c7 {value: 0x0000, lo: 0x01}, {value: 0x299b, lo: 0x8c, hi: 0x8c}, - // Block 0x49, offset 0x1d8 + // Block 0x48, offset 0x1c9 {value: 0x0263, lo: 0x02}, {value: 0x1b8c, lo: 0xb4, hi: 0xb4}, {value: 0x192d, lo: 0xb5, hi: 0xb6}, - // Block 0x4a, offset 0x1db + // Block 0x49, offset 0x1cc {value: 0x0000, lo: 0x01}, {value: 0x44dd, lo: 0x9c, hi: 0x9c}, - // Block 0x4b, offset 0x1dd + // Block 0x4a, offset 0x1ce {value: 0x0000, lo: 0x02}, {value: 0x0095, lo: 0xbc, hi: 0xbc}, {value: 0x006d, lo: 0xbd, hi: 0xbd}, - // Block 0x4c, offset 0x1e0 + // Block 0x4b, offset 0x1d1 {value: 0x0000, lo: 0x01}, {value: 0x8132, lo: 0xaf, hi: 0xb1}, - // Block 0x4d, offset 0x1e2 + // Block 0x4c, offset 0x1d3 {value: 0x0000, lo: 0x02}, {value: 0x047f, lo: 0xaf, hi: 0xaf}, {value: 0x8104, lo: 0xbf, hi: 0xbf}, - // Block 0x4e, offset 0x1e5 + // Block 0x4d, offset 0x1d6 {value: 0x0000, lo: 0x01}, {value: 0x8132, lo: 0xa0, hi: 0xbf}, - // Block 0x4f, offset 0x1e7 + // Block 0x4e, offset 0x1d8 {value: 0x0000, lo: 0x01}, {value: 0x0dc3, lo: 0x9f, hi: 0x9f}, - // Block 0x50, offset 0x1e9 + // Block 0x4f, offset 0x1da {value: 0x0000, lo: 0x01}, {value: 0x162f, lo: 0xb3, hi: 0xb3}, - // Block 0x51, offset 0x1eb + // Block 0x50, offset 0x1dc {value: 0x0004, lo: 0x0b}, {value: 0x1597, lo: 0x80, hi: 0x82}, {value: 0x15af, lo: 0x83, hi: 0x83}, @@ -6237,7 +6244,7 @@ var nfkcSparseValues = [875]valueRange{ {value: 0x161b, lo: 0x91, hi: 0x93}, {value: 0x162b, lo: 0x94, hi: 0x94}, {value: 0x1633, lo: 0x95, hi: 0x95}, - // Block 0x52, offset 0x1f7 + // Block 0x51, offset 0x1e8 {value: 0x0004, lo: 0x09}, {value: 0x0001, lo: 0x80, hi: 0x80}, {value: 0x812c, lo: 0xaa, hi: 0xaa}, @@ -6248,7 +6255,7 @@ var nfkcSparseValues = [875]valueRange{ {value: 0x812f, lo: 0xaf, hi: 0xaf}, {value: 0x04b3, lo: 0xb6, hi: 0xb6}, {value: 0x0887, lo: 0xb8, hi: 0xba}, - // Block 0x53, offset 0x201 + // Block 0x52, offset 0x1f2 {value: 0x0006, lo: 0x09}, {value: 0x0313, lo: 0xb1, hi: 0xb1}, {value: 0x0317, lo: 0xb2, hi: 0xb2}, @@ -6259,63 +6266,63 @@ var nfkcSparseValues = [875]valueRange{ {value: 0x0323, lo: 0xb8, hi: 0xb8}, {value: 0x0327, lo: 0xb9, hi: 0xb9}, {value: 0x4a4d, lo: 0xba, hi: 0xbf}, - // Block 0x54, offset 0x20b + // Block 0x53, offset 0x1fc {value: 0x0000, lo: 0x02}, {value: 0x8132, lo: 0xaf, hi: 0xaf}, {value: 0x8132, lo: 0xb4, hi: 0xbd}, - // Block 0x55, offset 0x20e + // Block 0x54, offset 0x1ff {value: 0x0000, lo: 0x03}, {value: 0x020f, lo: 0x9c, hi: 0x9c}, {value: 0x0212, lo: 0x9d, hi: 0x9d}, {value: 0x8132, lo: 0x9e, hi: 0x9f}, - // Block 0x56, offset 0x212 + // Block 0x55, offset 0x203 {value: 0x0000, lo: 0x01}, {value: 0x8132, lo: 0xb0, hi: 0xb1}, - // Block 0x57, offset 0x214 + // Block 0x56, offset 0x205 {value: 0x0000, lo: 0x01}, {value: 0x163b, lo: 0xb0, hi: 0xb0}, - // Block 0x58, offset 0x216 + // Block 0x57, offset 0x207 {value: 0x000c, lo: 0x01}, {value: 0x00d7, lo: 0xb8, hi: 0xb9}, - // Block 0x59, offset 0x218 + // Block 0x58, offset 0x209 {value: 0x0000, lo: 0x01}, {value: 0x8104, lo: 0x86, hi: 0x86}, - // Block 0x5a, offset 0x21a + // Block 0x59, offset 0x20b {value: 0x0000, lo: 0x02}, {value: 0x8104, lo: 0x84, hi: 0x84}, {value: 0x8132, lo: 0xa0, hi: 0xb1}, - // Block 0x5b, offset 0x21d + // Block 0x5a, offset 0x20e {value: 0x0000, lo: 0x01}, {value: 0x812d, lo: 0xab, hi: 0xad}, - // Block 0x5c, offset 0x21f + // Block 0x5b, offset 0x210 {value: 0x0000, lo: 0x01}, {value: 0x8104, lo: 0x93, hi: 0x93}, - // Block 0x5d, offset 0x221 + // Block 0x5c, offset 0x212 {value: 0x0000, lo: 0x01}, {value: 0x8102, lo: 0xb3, hi: 0xb3}, - // Block 0x5e, offset 0x223 + // Block 0x5d, offset 0x214 {value: 0x0000, lo: 0x01}, {value: 0x8104, lo: 0x80, hi: 0x80}, - // Block 0x5f, offset 0x225 + // Block 0x5e, offset 0x216 {value: 0x0000, lo: 0x05}, {value: 0x8132, lo: 0xb0, hi: 0xb0}, {value: 0x8132, lo: 0xb2, hi: 0xb3}, {value: 0x812d, lo: 0xb4, hi: 0xb4}, {value: 0x8132, lo: 0xb7, hi: 0xb8}, {value: 0x8132, lo: 0xbe, hi: 0xbf}, - // Block 0x60, offset 0x22b + // Block 0x5f, offset 0x21c {value: 0x0000, lo: 0x02}, {value: 0x8132, lo: 0x81, hi: 0x81}, {value: 0x8104, lo: 0xb6, hi: 0xb6}, - // Block 0x61, offset 0x22e + // Block 0x60, offset 0x21f {value: 0x0008, lo: 0x03}, {value: 0x1637, lo: 0x9c, hi: 0x9d}, {value: 0x0125, lo: 0x9e, hi: 0x9e}, {value: 0x1643, lo: 0x9f, hi: 0x9f}, - // Block 0x62, offset 0x232 + // Block 0x61, offset 0x223 {value: 0x0000, lo: 0x01}, {value: 0x8104, lo: 0xad, hi: 0xad}, - // Block 0x63, offset 0x234 + // Block 0x62, offset 0x225 {value: 0x0000, lo: 0x06}, {value: 0xe500, lo: 0x80, hi: 0x80}, {value: 0xc600, lo: 0x81, hi: 0x9b}, @@ -6323,21 +6330,21 @@ var nfkcSparseValues = [875]valueRange{ {value: 0xc600, lo: 0x9d, hi: 0xb7}, {value: 0xe500, lo: 0xb8, hi: 0xb8}, {value: 0xc600, lo: 0xb9, hi: 0xbf}, - // Block 0x64, offset 0x23b + // Block 0x63, offset 0x22c {value: 0x0000, lo: 0x05}, {value: 0xc600, lo: 0x80, hi: 0x93}, {value: 0xe500, lo: 0x94, hi: 0x94}, {value: 0xc600, lo: 0x95, hi: 0xaf}, {value: 0xe500, lo: 0xb0, hi: 0xb0}, {value: 0xc600, lo: 0xb1, hi: 0xbf}, - // Block 0x65, offset 0x241 + // Block 0x64, offset 0x232 {value: 0x0000, lo: 0x05}, {value: 0xc600, lo: 0x80, hi: 0x8b}, {value: 0xe500, lo: 0x8c, hi: 0x8c}, {value: 0xc600, lo: 0x8d, hi: 0xa7}, {value: 0xe500, lo: 0xa8, hi: 0xa8}, {value: 0xc600, lo: 0xa9, hi: 0xbf}, - // Block 0x66, offset 0x247 + // Block 0x65, offset 0x238 {value: 0x0000, lo: 0x07}, {value: 0xc600, lo: 0x80, hi: 0x83}, {value: 0xe500, lo: 0x84, hi: 0x84}, @@ -6346,60 +6353,60 @@ var nfkcSparseValues = [875]valueRange{ {value: 0xc600, lo: 0xa1, hi: 0xbb}, {value: 0xe500, lo: 0xbc, hi: 0xbc}, {value: 0xc600, lo: 0xbd, hi: 0xbf}, - // Block 0x67, offset 0x24f + // Block 0x66, offset 0x240 {value: 0x0000, lo: 0x05}, {value: 0xc600, lo: 0x80, hi: 0x97}, {value: 0xe500, lo: 0x98, hi: 0x98}, {value: 0xc600, lo: 0x99, hi: 0xb3}, {value: 0xe500, lo: 0xb4, hi: 0xb4}, {value: 0xc600, lo: 0xb5, hi: 0xbf}, - // Block 0x68, offset 0x255 + // Block 0x67, offset 0x246 {value: 0x0000, lo: 0x05}, {value: 0xc600, lo: 0x80, hi: 0x8f}, {value: 0xe500, lo: 0x90, hi: 0x90}, {value: 0xc600, lo: 0x91, hi: 0xab}, {value: 0xe500, lo: 0xac, hi: 0xac}, {value: 0xc600, lo: 0xad, hi: 0xbf}, - // Block 0x69, offset 0x25b + // Block 0x68, offset 0x24c {value: 0x0000, lo: 0x05}, {value: 0xc600, lo: 0x80, hi: 0x87}, {value: 0xe500, lo: 0x88, hi: 0x88}, {value: 0xc600, lo: 0x89, hi: 0xa3}, {value: 0xe500, lo: 0xa4, hi: 0xa4}, {value: 0xc600, lo: 0xa5, hi: 0xbf}, - // Block 0x6a, offset 0x261 + // Block 0x69, offset 0x252 {value: 0x0000, lo: 0x03}, {value: 0xc600, lo: 0x80, hi: 0x87}, {value: 0xe500, lo: 0x88, hi: 0x88}, {value: 0xc600, lo: 0x89, hi: 0xa3}, - // Block 0x6b, offset 0x265 + // Block 0x6a, offset 0x256 {value: 0x0002, lo: 0x01}, {value: 0x0003, lo: 0x81, hi: 0xbf}, - // Block 0x6c, offset 0x267 + // Block 0x6b, offset 0x258 {value: 0x0000, lo: 0x01}, {value: 0x812d, lo: 0xbd, hi: 0xbd}, - // Block 0x6d, offset 0x269 + // Block 0x6c, offset 0x25a {value: 0x0000, lo: 0x01}, {value: 0x812d, lo: 0xa0, hi: 0xa0}, - // Block 0x6e, offset 0x26b + // Block 0x6d, offset 0x25c {value: 0x0000, lo: 0x01}, {value: 0x8132, lo: 0xb6, hi: 0xba}, - // Block 0x6f, offset 0x26d + // Block 0x6e, offset 0x25e {value: 0x002c, lo: 0x05}, {value: 0x812d, lo: 0x8d, hi: 0x8d}, {value: 0x8132, lo: 0x8f, hi: 0x8f}, {value: 0x8132, lo: 0xb8, hi: 0xb8}, {value: 0x8101, lo: 0xb9, hi: 0xba}, {value: 0x8104, lo: 0xbf, hi: 0xbf}, - // Block 0x70, offset 0x273 + // Block 0x6f, offset 0x264 {value: 0x0000, lo: 0x02}, {value: 0x8132, lo: 0xa5, hi: 0xa5}, {value: 0x812d, lo: 0xa6, hi: 0xa6}, - // Block 0x71, offset 0x276 + // Block 0x70, offset 0x267 {value: 0x0000, lo: 0x02}, {value: 0x8104, lo: 0x86, hi: 0x86}, {value: 0x8104, lo: 0xbf, hi: 0xbf}, - // Block 0x72, offset 0x279 + // Block 0x71, offset 0x26a {value: 0x17fe, lo: 0x07}, {value: 0xa000, lo: 0x99, hi: 0x99}, {value: 0x4238, lo: 0x9a, hi: 0x9a}, @@ -6408,7 +6415,7 @@ var nfkcSparseValues = [875]valueRange{ {value: 0xa000, lo: 0xa5, hi: 0xa5}, {value: 0x424c, lo: 0xab, hi: 0xab}, {value: 0x8104, lo: 0xb9, hi: 0xba}, - // Block 0x73, offset 0x281 + // Block 0x72, offset 0x272 {value: 0x0000, lo: 0x06}, {value: 0x8132, lo: 0x80, hi: 0x82}, {value: 0x9900, lo: 0xa7, hi: 0xa7}, @@ -6416,18 +6423,18 @@ var nfkcSparseValues = [875]valueRange{ {value: 0x2d88, lo: 0xaf, hi: 0xaf}, {value: 0xa000, lo: 0xb1, hi: 0xb2}, {value: 0x8104, lo: 0xb3, hi: 0xb4}, - // Block 0x74, offset 0x288 + // Block 0x73, offset 0x279 {value: 0x0000, lo: 0x02}, {value: 0x8104, lo: 0x80, hi: 0x80}, {value: 0x8102, lo: 0x8a, hi: 0x8a}, - // Block 0x75, offset 0x28b + // Block 0x74, offset 0x27c {value: 0x0000, lo: 0x02}, {value: 0x8104, lo: 0xb5, hi: 0xb5}, {value: 0x8102, lo: 0xb6, hi: 0xb6}, - // Block 0x76, offset 0x28e + // Block 0x75, offset 0x27f {value: 0x0002, lo: 0x01}, {value: 0x8102, lo: 0xa9, hi: 0xaa}, - // Block 0x77, offset 0x290 + // Block 0x76, offset 0x281 {value: 0x0000, lo: 0x07}, {value: 0xa000, lo: 0x87, hi: 0x87}, {value: 0x2d92, lo: 0x8b, hi: 0x8b}, @@ -6436,11 +6443,11 @@ var nfkcSparseValues = [875]valueRange{ {value: 0x9900, lo: 0x97, hi: 0x97}, {value: 0x8132, lo: 0xa6, hi: 0xac}, {value: 0x8132, lo: 0xb0, hi: 0xb4}, - // Block 0x78, offset 0x298 + // Block 0x77, offset 0x289 {value: 0x0000, lo: 0x02}, {value: 0x8104, lo: 0x82, hi: 0x82}, {value: 0x8102, lo: 0x86, hi: 0x86}, - // Block 0x79, offset 0x29b + // Block 0x78, offset 0x28c {value: 0x6b5a, lo: 0x06}, {value: 0x9900, lo: 0xb0, hi: 0xb0}, {value: 0xa000, lo: 0xb9, hi: 0xb9}, @@ -6448,40 +6455,53 @@ var nfkcSparseValues = [875]valueRange{ {value: 0x2db0, lo: 0xbb, hi: 0xbb}, {value: 0x2da6, lo: 0xbc, hi: 0xbd}, {value: 0x2dba, lo: 0xbe, hi: 0xbe}, - // Block 0x7a, offset 0x2a2 + // Block 0x79, offset 0x293 {value: 0x0000, lo: 0x02}, {value: 0x8104, lo: 0x82, hi: 0x82}, {value: 0x8102, lo: 0x83, hi: 0x83}, - // Block 0x7b, offset 0x2a5 + // Block 0x7a, offset 0x296 {value: 0x0000, lo: 0x05}, {value: 0x9900, lo: 0xaf, hi: 0xaf}, {value: 0xa000, lo: 0xb8, hi: 0xb9}, {value: 0x2dc4, lo: 0xba, hi: 0xba}, {value: 0x2dce, lo: 0xbb, hi: 0xbb}, {value: 0x8104, lo: 0xbf, hi: 0xbf}, - // Block 0x7c, offset 0x2ab + // Block 0x7b, offset 0x29c {value: 0x0000, lo: 0x01}, {value: 0x8102, lo: 0x80, hi: 0x80}, - // Block 0x7d, offset 0x2ad + // Block 0x7c, offset 0x29e {value: 0x0000, lo: 0x01}, {value: 0x8104, lo: 0xbf, hi: 0xbf}, - // Block 0x7e, offset 0x2af + // Block 0x7d, offset 0x2a0 {value: 0x0000, lo: 0x02}, {value: 0x8104, lo: 0xb6, hi: 0xb6}, {value: 0x8102, lo: 0xb7, hi: 0xb7}, - // Block 0x7f, offset 0x2b2 + // Block 0x7e, offset 0x2a3 {value: 0x0000, lo: 0x01}, {value: 0x8104, lo: 0xab, hi: 0xab}, - // Block 0x80, offset 0x2b4 + // Block 0x7f, offset 0x2a5 + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0xb4, hi: 0xb4}, + // Block 0x80, offset 0x2a7 + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0x87, hi: 0x87}, + // Block 0x81, offset 0x2a9 + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0x99, hi: 0x99}, + // Block 0x82, offset 0x2ab + {value: 0x0000, lo: 0x02}, + {value: 0x8102, lo: 0x82, hi: 0x82}, + {value: 0x8104, lo: 0x84, hi: 0x85}, + // Block 0x83, offset 0x2ae {value: 0x0000, lo: 0x01}, {value: 0x8101, lo: 0xb0, hi: 0xb4}, - // Block 0x81, offset 0x2b6 + // Block 0x84, offset 0x2b0 {value: 0x0000, lo: 0x01}, {value: 0x8132, lo: 0xb0, hi: 0xb6}, - // Block 0x82, offset 0x2b8 + // Block 0x85, offset 0x2b2 {value: 0x0000, lo: 0x01}, {value: 0x8101, lo: 0x9e, hi: 0x9e}, - // Block 0x83, offset 0x2ba + // Block 0x86, offset 0x2b4 {value: 0x0000, lo: 0x0c}, {value: 0x45cc, lo: 0x9e, hi: 0x9e}, {value: 0x45d6, lo: 0x9f, hi: 0x9f}, @@ -6495,7 +6515,7 @@ var nfkcSparseValues = [875]valueRange{ {value: 0x8130, lo: 0xad, hi: 0xad}, {value: 0x812b, lo: 0xae, hi: 0xb2}, {value: 0x812d, lo: 0xbb, hi: 0xbf}, - // Block 0x84, offset 0x2c7 + // Block 0x87, offset 0x2c1 {value: 0x0000, lo: 0x09}, {value: 0x812d, lo: 0x80, hi: 0x82}, {value: 0x8132, lo: 0x85, hi: 0x89}, @@ -6506,24 +6526,24 @@ var nfkcSparseValues = [875]valueRange{ {value: 0x4650, lo: 0xbd, hi: 0xbd}, {value: 0x466c, lo: 0xbe, hi: 0xbe}, {value: 0x465e, lo: 0xbf, hi: 0xbf}, - // Block 0x85, offset 0x2d1 + // Block 0x88, offset 0x2cb {value: 0x0000, lo: 0x01}, {value: 0x467a, lo: 0x80, hi: 0x80}, - // Block 0x86, offset 0x2d3 + // Block 0x89, offset 0x2cd {value: 0x0000, lo: 0x01}, {value: 0x8132, lo: 0x82, hi: 0x84}, - // Block 0x87, offset 0x2d5 + // Block 0x8a, offset 0x2cf {value: 0x0002, lo: 0x03}, {value: 0x0043, lo: 0x80, hi: 0x99}, {value: 0x0083, lo: 0x9a, hi: 0xb3}, {value: 0x0043, lo: 0xb4, hi: 0xbf}, - // Block 0x88, offset 0x2d9 + // Block 0x8b, offset 0x2d3 {value: 0x0002, lo: 0x04}, {value: 0x005b, lo: 0x80, hi: 0x8d}, {value: 0x0083, lo: 0x8e, hi: 0x94}, {value: 0x0093, lo: 0x96, hi: 0xa7}, {value: 0x0043, lo: 0xa8, hi: 0xbf}, - // Block 0x89, offset 0x2de + // Block 0x8c, offset 0x2d8 {value: 0x0002, lo: 0x0b}, {value: 0x0073, lo: 0x80, hi: 0x81}, {value: 0x0083, lo: 0x82, hi: 0x9b}, @@ -6536,13 +6556,13 @@ var nfkcSparseValues = [875]valueRange{ {value: 0x0083, lo: 0xb6, hi: 0xb9}, {value: 0x008d, lo: 0xbb, hi: 0xbb}, {value: 0x0091, lo: 0xbd, hi: 0xbf}, - // Block 0x8a, offset 0x2ea + // Block 0x8d, offset 0x2e4 {value: 0x0002, lo: 0x04}, {value: 0x0097, lo: 0x80, hi: 0x83}, {value: 0x00a1, lo: 0x85, hi: 0x8f}, {value: 0x0043, lo: 0x90, hi: 0xa9}, {value: 0x0083, lo: 0xaa, hi: 0xbf}, - // Block 0x8b, offset 0x2ef + // Block 0x8e, offset 0x2e9 {value: 0x0002, lo: 0x08}, {value: 0x00af, lo: 0x80, hi: 0x83}, {value: 0x0043, lo: 0x84, hi: 0x85}, @@ -6552,36 +6572,36 @@ var nfkcSparseValues = [875]valueRange{ {value: 0x0083, lo: 0x9e, hi: 0xb7}, {value: 0x0043, lo: 0xb8, hi: 0xb9}, {value: 0x0049, lo: 0xbb, hi: 0xbe}, - // Block 0x8c, offset 0x2f8 + // Block 0x8f, offset 0x2f2 {value: 0x0002, lo: 0x05}, {value: 0x0053, lo: 0x80, hi: 0x84}, {value: 0x005f, lo: 0x86, hi: 0x86}, {value: 0x0067, lo: 0x8a, hi: 0x90}, {value: 0x0083, lo: 0x92, hi: 0xab}, {value: 0x0043, lo: 0xac, hi: 0xbf}, - // Block 0x8d, offset 0x2fe + // Block 0x90, offset 0x2f8 {value: 0x0002, lo: 0x04}, {value: 0x006b, lo: 0x80, hi: 0x85}, {value: 0x0083, lo: 0x86, hi: 0x9f}, {value: 0x0043, lo: 0xa0, hi: 0xb9}, {value: 0x0083, lo: 0xba, hi: 0xbf}, - // Block 0x8e, offset 0x303 + // Block 0x91, offset 0x2fd {value: 0x0002, lo: 0x03}, {value: 0x008f, lo: 0x80, hi: 0x93}, {value: 0x0043, lo: 0x94, hi: 0xad}, {value: 0x0083, lo: 0xae, hi: 0xbf}, - // Block 0x8f, offset 0x307 + // Block 0x92, offset 0x301 {value: 0x0002, lo: 0x04}, {value: 0x00a7, lo: 0x80, hi: 0x87}, {value: 0x0043, lo: 0x88, hi: 0xa1}, {value: 0x0083, lo: 0xa2, hi: 0xbb}, {value: 0x0043, lo: 0xbc, hi: 0xbf}, - // Block 0x90, offset 0x30c + // Block 0x93, offset 0x306 {value: 0x0002, lo: 0x03}, {value: 0x004b, lo: 0x80, hi: 0x95}, {value: 0x0083, lo: 0x96, hi: 0xaf}, {value: 0x0043, lo: 0xb0, hi: 0xbf}, - // Block 0x91, offset 0x310 + // Block 0x94, offset 0x30a {value: 0x0003, lo: 0x0f}, {value: 0x01b8, lo: 0x80, hi: 0x80}, {value: 0x045f, lo: 0x81, hi: 0x81}, @@ -6598,7 +6618,7 @@ var nfkcSparseValues = [875]valueRange{ {value: 0x01a6, lo: 0xb4, hi: 0xba}, {value: 0x045f, lo: 0xbb, hi: 0xbb}, {value: 0x01bb, lo: 0xbc, hi: 0xbf}, - // Block 0x92, offset 0x320 + // Block 0x95, offset 0x31a {value: 0x0003, lo: 0x0d}, {value: 0x01c7, lo: 0x80, hi: 0x94}, {value: 0x045b, lo: 0x95, hi: 0x95}, @@ -6613,7 +6633,7 @@ var nfkcSparseValues = [875]valueRange{ {value: 0x01a6, lo: 0xae, hi: 0xb4}, {value: 0x045f, lo: 0xb5, hi: 0xb5}, {value: 0x01bb, lo: 0xb6, hi: 0xbf}, - // Block 0x93, offset 0x32e + // Block 0x96, offset 0x328 {value: 0x0003, lo: 0x0d}, {value: 0x01d9, lo: 0x80, hi: 0x8e}, {value: 0x045b, lo: 0x8f, hi: 0x8f}, @@ -6628,7 +6648,7 @@ var nfkcSparseValues = [875]valueRange{ {value: 0x01a6, lo: 0xa8, hi: 0xae}, {value: 0x045f, lo: 0xaf, hi: 0xaf}, {value: 0x01bb, lo: 0xb0, hi: 0xbf}, - // Block 0x94, offset 0x33c + // Block 0x97, offset 0x336 {value: 0x0003, lo: 0x0d}, {value: 0x01eb, lo: 0x80, hi: 0x88}, {value: 0x045b, lo: 0x89, hi: 0x89}, @@ -6643,21 +6663,21 @@ var nfkcSparseValues = [875]valueRange{ {value: 0x01a6, lo: 0xa2, hi: 0xa8}, {value: 0x045f, lo: 0xa9, hi: 0xa9}, {value: 0x01bb, lo: 0xaa, hi: 0xbf}, - // Block 0x95, offset 0x34a + // Block 0x98, offset 0x344 {value: 0x0000, lo: 0x05}, {value: 0x8132, lo: 0x80, hi: 0x86}, {value: 0x8132, lo: 0x88, hi: 0x98}, {value: 0x8132, lo: 0x9b, hi: 0xa1}, {value: 0x8132, lo: 0xa3, hi: 0xa4}, {value: 0x8132, lo: 0xa6, hi: 0xaa}, - // Block 0x96, offset 0x350 + // Block 0x99, offset 0x34a {value: 0x0000, lo: 0x01}, {value: 0x812d, lo: 0x90, hi: 0x96}, - // Block 0x97, offset 0x352 + // Block 0x9a, offset 0x34c {value: 0x0000, lo: 0x02}, {value: 0x8132, lo: 0x84, hi: 0x89}, {value: 0x8102, lo: 0x8a, hi: 0x8a}, - // Block 0x98, offset 0x355 + // Block 0x9b, offset 0x34f {value: 0x0002, lo: 0x09}, {value: 0x0063, lo: 0x80, hi: 0x89}, {value: 0x1951, lo: 0x8a, hi: 0x8a}, @@ -6668,10 +6688,10 @@ var nfkcSparseValues = [875]valueRange{ {value: 0x19ae, lo: 0x8f, hi: 0x8f}, {value: 0x197b, lo: 0xaa, hi: 0xaa}, {value: 0x197e, lo: 0xab, hi: 0xab}, - // Block 0x99, offset 0x35f + // Block 0x9c, offset 0x359 {value: 0x0000, lo: 0x01}, {value: 0x193f, lo: 0x90, hi: 0x90}, - // Block 0x9a, offset 0x361 + // Block 0x9d, offset 0x35b {value: 0x0028, lo: 0x09}, {value: 0x2862, lo: 0x80, hi: 0x80}, {value: 0x2826, lo: 0x81, hi: 0x81}, @@ -7628,4 +7648,4 @@ var recompMap = map[uint32]rune{ 0x15B915AF: 0x115BB, } -// Total size of tables: 53KB (54006 bytes) +// Total size of tables: 53KB (54226 bytes) diff --git a/vendor/golang.org/x/text/unicode/norm/transform.go b/vendor/golang.org/x/text/unicode/norm/transform.go index 8589067cd..9f47efbaf 100644 --- a/vendor/golang.org/x/text/unicode/norm/transform.go +++ b/vendor/golang.org/x/text/unicode/norm/transform.go @@ -40,7 +40,7 @@ func (f Form) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) } func flushTransform(rb *reorderBuffer) bool { - // Write out (must fully fit in dst, or else it is a ErrShortDst). + // Write out (must fully fit in dst, or else it is an ErrShortDst). if len(rb.out) < rb.nrune*utf8.UTFMax { return false } diff --git a/vendor/golang.org/x/text/unicode/norm/transform_test.go b/vendor/golang.org/x/text/unicode/norm/transform_test.go new file mode 100644 index 000000000..d596ff3d8 --- /dev/null +++ b/vendor/golang.org/x/text/unicode/norm/transform_test.go @@ -0,0 +1,101 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package norm + +import ( + "fmt" + "testing" + + "golang.org/x/text/transform" +) + +func TestTransform(t *testing.T) { + tests := []struct { + f Form + in, out string + eof bool + dstSize int + err error + }{ + {NFC, "ab", "ab", true, 2, nil}, + {NFC, "qx", "qx", true, 2, nil}, + {NFD, "qx", "qx", true, 2, nil}, + {NFC, "", "", true, 1, nil}, + {NFD, "", "", true, 1, nil}, + {NFC, "", "", false, 1, nil}, + {NFD, "", "", false, 1, nil}, + + // Normalized segment does not fit in destination. + {NFD, "ö", "", true, 1, transform.ErrShortDst}, + {NFD, "ö", "", true, 2, transform.ErrShortDst}, + + // As an artifact of the algorithm, only full segments are written. + // This is not strictly required, and some bytes could be written. + // In practice, for Transform to not block, the destination buffer + // should be at least MaxSegmentSize to work anyway and these edge + // conditions will be relatively rare. + {NFC, "ab", "", true, 1, transform.ErrShortDst}, + // This is even true for inert runes. + {NFC, "qx", "", true, 1, transform.ErrShortDst}, + {NFC, "a\u0300abc", "\u00e0a", true, 4, transform.ErrShortDst}, + + // We cannot write a segment if successive runes could still change the result. + {NFD, "ö", "", false, 3, transform.ErrShortSrc}, + {NFC, "a\u0300", "", false, 4, transform.ErrShortSrc}, + {NFD, "a\u0300", "", false, 4, transform.ErrShortSrc}, + {NFC, "ö", "", false, 3, transform.ErrShortSrc}, + + {NFC, "a\u0300", "", true, 1, transform.ErrShortDst}, + // Theoretically could fit, but won't due to simplified checks. + {NFC, "a\u0300", "", true, 2, transform.ErrShortDst}, + {NFC, "a\u0300", "", true, 3, transform.ErrShortDst}, + {NFC, "a\u0300", "\u00e0", true, 4, nil}, + + {NFD, "öa\u0300", "o\u0308", false, 8, transform.ErrShortSrc}, + {NFD, "öa\u0300ö", "o\u0308a\u0300", true, 8, transform.ErrShortDst}, + {NFD, "öa\u0300ö", "o\u0308a\u0300", false, 12, transform.ErrShortSrc}, + + // Illegal input is copied verbatim. + {NFD, "\xbd\xb2=\xbc ", "\xbd\xb2=\xbc ", true, 8, nil}, + } + b := make([]byte, 100) + for i, tt := range tests { + nDst, _, err := tt.f.Transform(b[:tt.dstSize], []byte(tt.in), tt.eof) + out := string(b[:nDst]) + if out != tt.out || err != tt.err { + t.Errorf("%d: was %+q (%v); want %+q (%v)", i, out, err, tt.out, tt.err) + } + if want := tt.f.String(tt.in)[:nDst]; want != out { + t.Errorf("%d: incorrect normalization: was %+q; want %+q", i, out, want) + } + } +} + +var transBufSizes = []int{ + MaxTransformChunkSize, + 3 * MaxTransformChunkSize / 2, + 2 * MaxTransformChunkSize, + 3 * MaxTransformChunkSize, + 100 * MaxTransformChunkSize, +} + +func doTransNorm(f Form, buf []byte, b []byte) []byte { + acc := []byte{} + for p := 0; p < len(b); { + nd, ns, _ := f.Transform(buf[:], b[p:], true) + p += ns + acc = append(acc, buf[:nd]...) + } + return acc +} + +func TestTransformNorm(t *testing.T) { + for _, sz := range transBufSizes { + buf := make([]byte, sz) + runNormTests(t, fmt.Sprintf("Transform:%d", sz), func(f Form, out []byte, s string) []byte { + return doTransNorm(f, buf, append(out, s...)) + }) + } +} diff --git a/vendor/golang.org/x/text/unicode/norm/ucd_test.go b/vendor/golang.org/x/text/unicode/norm/ucd_test.go new file mode 100644 index 000000000..29205a6aa --- /dev/null +++ b/vendor/golang.org/x/text/unicode/norm/ucd_test.go @@ -0,0 +1,275 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package norm + +import ( + "bufio" + "bytes" + "fmt" + "regexp" + "runtime" + "strconv" + "strings" + "sync" + "testing" + "time" + "unicode/utf8" + + "golang.org/x/text/internal/gen" + "golang.org/x/text/internal/testtext" +) + +var once sync.Once + +func skipShort(t *testing.T) { + testtext.SkipIfNotLong(t) + + once.Do(func() { loadTestData(t) }) +} + +// This regression test runs the test set in NormalizationTest.txt +// (taken from http://www.unicode.org/Public/<unicode.Version>/ucd/). +// +// NormalizationTest.txt has form: +// @Part0 # Specific cases +// # +// 1E0A;1E0A;0044 0307;1E0A;0044 0307; # (Ḋ; Ḋ; D◌̇; Ḋ; D◌̇; ) LATIN CAPITAL LETTER D WITH DOT ABOVE +// 1E0C;1E0C;0044 0323;1E0C;0044 0323; # (Ḍ; Ḍ; D◌̣; Ḍ; D◌̣; ) LATIN CAPITAL LETTER D WITH DOT BELOW +// +// Each test has 5 columns (c1, c2, c3, c4, c5), where +// (c1, c2, c3, c4, c5) == (c1, NFC(c1), NFD(c1), NFKC(c1), NFKD(c1)) +// +// CONFORMANCE: +// 1. The following invariants must be true for all conformant implementations +// +// NFC +// c2 == NFC(c1) == NFC(c2) == NFC(c3) +// c4 == NFC(c4) == NFC(c5) +// +// NFD +// c3 == NFD(c1) == NFD(c2) == NFD(c3) +// c5 == NFD(c4) == NFD(c5) +// +// NFKC +// c4 == NFKC(c1) == NFKC(c2) == NFKC(c3) == NFKC(c4) == NFKC(c5) +// +// NFKD +// c5 == NFKD(c1) == NFKD(c2) == NFKD(c3) == NFKD(c4) == NFKD(c5) +// +// 2. For every code point X assigned in this version of Unicode that is not +// specifically listed in Part 1, the following invariants must be true +// for all conformant implementations: +// +// X == NFC(X) == NFD(X) == NFKC(X) == NFKD(X) +// + +// Column types. +const ( + cRaw = iota + cNFC + cNFD + cNFKC + cNFKD + cMaxColumns +) + +// Holds data from NormalizationTest.txt +var part []Part + +type Part struct { + name string + number int + tests []Test +} + +type Test struct { + name string + partnr int + number int + r rune // used for character by character test + cols [cMaxColumns]string // Each has 5 entries, see below. +} + +func (t Test) Name() string { + if t.number < 0 { + return part[t.partnr].name + } + return fmt.Sprintf("%s:%d", part[t.partnr].name, t.number) +} + +var partRe = regexp.MustCompile(`@Part(\d) # (.*)$`) +var testRe = regexp.MustCompile(`^` + strings.Repeat(`([\dA-F ]+);`, 5) + ` # (.*)$`) + +var counter int + +// Load the data form NormalizationTest.txt +func loadTestData(t *testing.T) { + f := gen.OpenUCDFile("NormalizationTest.txt") + defer f.Close() + scanner := bufio.NewScanner(f) + for scanner.Scan() { + line := scanner.Text() + if len(line) == 0 || line[0] == '#' { + continue + } + m := partRe.FindStringSubmatch(line) + if m != nil { + if len(m) < 3 { + t.Fatal("Failed to parse Part: ", line) + } + i, err := strconv.Atoi(m[1]) + if err != nil { + t.Fatal(err) + } + name := m[2] + part = append(part, Part{name: name[:len(name)-1], number: i}) + continue + } + m = testRe.FindStringSubmatch(line) + if m == nil || len(m) < 7 { + t.Fatalf(`Failed to parse: "%s" result: %#v`, line, m) + } + test := Test{name: m[6], partnr: len(part) - 1, number: counter} + counter++ + for j := 1; j < len(m)-1; j++ { + for _, split := range strings.Split(m[j], " ") { + r, err := strconv.ParseUint(split, 16, 64) + if err != nil { + t.Fatal(err) + } + if test.r == 0 { + // save for CharacterByCharacterTests + test.r = rune(r) + } + var buf [utf8.UTFMax]byte + sz := utf8.EncodeRune(buf[:], rune(r)) + test.cols[j-1] += string(buf[:sz]) + } + } + part := &part[len(part)-1] + part.tests = append(part.tests, test) + } + if scanner.Err() != nil { + t.Fatal(scanner.Err()) + } +} + +func cmpResult(t *testing.T, tc *Test, name string, f Form, gold, test, result string) { + if gold != result { + t.Errorf("%s:%s: %s(%+q)=%+q; want %+q: %s", + tc.Name(), name, fstr[f], test, result, gold, tc.name) + } +} + +func cmpIsNormal(t *testing.T, tc *Test, name string, f Form, test string, result, want bool) { + if result != want { + t.Errorf("%s:%s: %s(%+q)=%v; want %v", tc.Name(), name, fstr[f], test, result, want) + } +} + +func doTest(t *testing.T, tc *Test, f Form, gold, test string) { + testb := []byte(test) + result := f.Bytes(testb) + cmpResult(t, tc, "Bytes", f, gold, test, string(result)) + + sresult := f.String(test) + cmpResult(t, tc, "String", f, gold, test, sresult) + + acc := []byte{} + i := Iter{} + i.InitString(f, test) + for !i.Done() { + acc = append(acc, i.Next()...) + } + cmpResult(t, tc, "Iter.Next", f, gold, test, string(acc)) + + buf := make([]byte, 128) + acc = nil + for p := 0; p < len(testb); { + nDst, nSrc, _ := f.Transform(buf, testb[p:], true) + acc = append(acc, buf[:nDst]...) + p += nSrc + } + cmpResult(t, tc, "Transform", f, gold, test, string(acc)) + + for i := range test { + out := f.Append(f.Bytes([]byte(test[:i])), []byte(test[i:])...) + cmpResult(t, tc, fmt.Sprintf(":Append:%d", i), f, gold, test, string(out)) + } + cmpIsNormal(t, tc, "IsNormal", f, test, f.IsNormal([]byte(test)), test == gold) + cmpIsNormal(t, tc, "IsNormalString", f, test, f.IsNormalString(test), test == gold) +} + +func doConformanceTests(t *testing.T, tc *Test, partn int) { + for i := 0; i <= 2; i++ { + doTest(t, tc, NFC, tc.cols[1], tc.cols[i]) + doTest(t, tc, NFD, tc.cols[2], tc.cols[i]) + doTest(t, tc, NFKC, tc.cols[3], tc.cols[i]) + doTest(t, tc, NFKD, tc.cols[4], tc.cols[i]) + } + for i := 3; i <= 4; i++ { + doTest(t, tc, NFC, tc.cols[3], tc.cols[i]) + doTest(t, tc, NFD, tc.cols[4], tc.cols[i]) + doTest(t, tc, NFKC, tc.cols[3], tc.cols[i]) + doTest(t, tc, NFKD, tc.cols[4], tc.cols[i]) + } +} + +func TestCharacterByCharacter(t *testing.T) { + skipShort(t) + tests := part[1].tests + var last rune = 0 + for i := 0; i <= len(tests); i++ { // last one is special case + var r rune + if i == len(tests) { + r = 0x2FA1E // Don't have to go to 0x10FFFF + } else { + r = tests[i].r + } + for last++; last < r; last++ { + // Check all characters that were not explicitly listed in the test. + tc := &Test{partnr: 1, number: -1} + char := string(last) + doTest(t, tc, NFC, char, char) + doTest(t, tc, NFD, char, char) + doTest(t, tc, NFKC, char, char) + doTest(t, tc, NFKD, char, char) + } + if i < len(tests) { + doConformanceTests(t, &tests[i], 1) + } + } +} + +func TestStandardTests(t *testing.T) { + skipShort(t) + for _, j := range []int{0, 2, 3} { + for _, test := range part[j].tests { + doConformanceTests(t, &test, j) + } + } +} + +// TestPerformance verifies that normalization is O(n). If any of the +// code does not properly check for maxCombiningChars, normalization +// may exhibit O(n**2) behavior. +func TestPerformance(t *testing.T) { + skipShort(t) + runtime.GOMAXPROCS(2) + success := make(chan bool, 1) + go func() { + buf := bytes.Repeat([]byte("\u035D"), 1024*1024) + buf = append(buf, "\u035B"...) + NFC.Append(nil, buf...) + success <- true + }() + timeout := time.After(1 * time.Second) + select { + case <-success: + // test completed before the timeout + case <-timeout: + t.Errorf(`unexpectedly long time to complete PerformanceTest`) + } +} diff --git a/vendor/golang.org/x/text/unicode/rangetable/gen.go b/vendor/golang.org/x/text/unicode/rangetable/gen.go new file mode 100644 index 000000000..6a64e42ab --- /dev/null +++ b/vendor/golang.org/x/text/unicode/rangetable/gen.go @@ -0,0 +1,115 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +package main + +import ( + "bytes" + "flag" + "fmt" + "io" + "log" + "reflect" + "strings" + "unicode" + + "golang.org/x/text/collate" + "golang.org/x/text/internal/gen" + "golang.org/x/text/internal/ucd" + "golang.org/x/text/language" + "golang.org/x/text/unicode/rangetable" +) + +var versionList = flag.String("versions", "", + "list of versions for which to generate RangeTables") + +const bootstrapMessage = `No versions specified. +To bootstrap the code generation, run: + go run gen.go --versions=4.1.0,5.0.0,6.0.0,6.1.0,6.2.0,6.3.0,7.0.0 + +and ensure that the latest versions are included by checking: + http://www.unicode.org/Public/` + +func getVersions() []string { + if *versionList == "" { + log.Fatal(bootstrapMessage) + } + + c := collate.New(language.Und, collate.Numeric) + versions := strings.Split(*versionList, ",") + c.SortStrings(versions) + + // Ensure that at least the current version is included. + for _, v := range versions { + if v == gen.UnicodeVersion() { + return versions + } + } + + versions = append(versions, gen.UnicodeVersion()) + c.SortStrings(versions) + return versions +} + +func main() { + gen.Init() + + versions := getVersions() + + w := &bytes.Buffer{} + + fmt.Fprintf(w, "//go:generate go run gen.go --versions=%s\n\n", strings.Join(versions, ",")) + fmt.Fprintf(w, "import \"unicode\"\n\n") + + vstr := func(s string) string { return strings.Replace(s, ".", "_", -1) } + + fmt.Fprintf(w, "var assigned = map[string]*unicode.RangeTable{\n") + for _, v := range versions { + fmt.Fprintf(w, "\t%q: assigned%s,\n", v, vstr(v)) + } + fmt.Fprintf(w, "}\n\n") + + var size int + for _, v := range versions { + assigned := []rune{} + + r := gen.Open("http://www.unicode.org/Public/", "", v+"/ucd/UnicodeData.txt") + ucd.Parse(r, func(p *ucd.Parser) { + assigned = append(assigned, p.Rune(0)) + }) + + rt := rangetable.New(assigned...) + sz := int(reflect.TypeOf(unicode.RangeTable{}).Size()) + sz += int(reflect.TypeOf(unicode.Range16{}).Size()) * len(rt.R16) + sz += int(reflect.TypeOf(unicode.Range32{}).Size()) * len(rt.R32) + + fmt.Fprintf(w, "// size %d bytes (%d KiB)\n", sz, sz/1024) + fmt.Fprintf(w, "var assigned%s = ", vstr(v)) + print(w, rt) + + size += sz + } + + fmt.Fprintf(w, "// Total size %d bytes (%d KiB)\n", size, size/1024) + + gen.WriteGoFile("tables.go", "rangetable", w.Bytes()) +} + +func print(w io.Writer, rt *unicode.RangeTable) { + fmt.Fprintln(w, "&unicode.RangeTable{") + fmt.Fprintln(w, "\tR16: []unicode.Range16{") + for _, r := range rt.R16 { + fmt.Fprintf(w, "\t\t{%#04x, %#04x, %d},\n", r.Lo, r.Hi, r.Stride) + } + fmt.Fprintln(w, "\t},") + fmt.Fprintln(w, "\tR32: []unicode.Range32{") + for _, r := range rt.R32 { + fmt.Fprintf(w, "\t\t{%#08x, %#08x, %d},\n", r.Lo, r.Hi, r.Stride) + } + fmt.Fprintln(w, "\t},") + fmt.Fprintf(w, "\tLatinOffset: %d,\n", rt.LatinOffset) + fmt.Fprintf(w, "}\n\n") +} diff --git a/vendor/golang.org/x/text/unicode/rangetable/merge.go b/vendor/golang.org/x/text/unicode/rangetable/merge.go new file mode 100644 index 000000000..ea2a0803e --- /dev/null +++ b/vendor/golang.org/x/text/unicode/rangetable/merge.go @@ -0,0 +1,260 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package rangetable + +import ( + "unicode" +) + +// atEnd is used to mark a completed iteration. +const atEnd = unicode.MaxRune + 1 + +// Merge returns a new RangeTable that is the union of the given tables. +// It can also be used to compact user-created RangeTables. The entries in +// R16 and R32 for any given RangeTable should be sorted and non-overlapping. +// +// A lookup in the resulting table can be several times faster than using In +// directly on the ranges. Merge is an expensive operation, however, and only +// makes sense if one intends to use the result for more than a couple of +// hundred lookups. +func Merge(ranges ...*unicode.RangeTable) *unicode.RangeTable { + rt := &unicode.RangeTable{} + if len(ranges) == 0 { + return rt + } + + iter := tablesIter(make([]tableIndex, len(ranges))) + + for i, t := range ranges { + iter[i] = tableIndex{t, 0, atEnd} + if len(t.R16) > 0 { + iter[i].next = rune(t.R16[0].Lo) + } + } + + if r0 := iter.next16(); r0.Stride != 0 { + for { + r1 := iter.next16() + if r1.Stride == 0 { + rt.R16 = append(rt.R16, r0) + break + } + stride := r1.Lo - r0.Hi + if (r1.Lo == r1.Hi || stride == r1.Stride) && (r0.Lo == r0.Hi || stride == r0.Stride) { + // Fully merge the next range into the previous one. + r0.Hi, r0.Stride = r1.Hi, stride + continue + } else if stride == r0.Stride { + // Move the first element of r1 to r0. This may eliminate an + // entry. + r0.Hi = r1.Lo + r0.Stride = stride + r1.Lo = r1.Lo + r1.Stride + if r1.Lo > r1.Hi { + continue + } + } + rt.R16 = append(rt.R16, r0) + r0 = r1 + } + } + + for i, t := range ranges { + iter[i] = tableIndex{t, 0, atEnd} + if len(t.R32) > 0 { + iter[i].next = rune(t.R32[0].Lo) + } + } + + if r0 := iter.next32(); r0.Stride != 0 { + for { + r1 := iter.next32() + if r1.Stride == 0 { + rt.R32 = append(rt.R32, r0) + break + } + stride := r1.Lo - r0.Hi + if (r1.Lo == r1.Hi || stride == r1.Stride) && (r0.Lo == r0.Hi || stride == r0.Stride) { + // Fully merge the next range into the previous one. + r0.Hi, r0.Stride = r1.Hi, stride + continue + } else if stride == r0.Stride { + // Move the first element of r1 to r0. This may eliminate an + // entry. + r0.Hi = r1.Lo + r1.Lo = r1.Lo + r1.Stride + if r1.Lo > r1.Hi { + continue + } + } + rt.R32 = append(rt.R32, r0) + r0 = r1 + } + } + + for i := 0; i < len(rt.R16) && rt.R16[i].Hi <= unicode.MaxLatin1; i++ { + rt.LatinOffset = i + 1 + } + + return rt +} + +type tableIndex struct { + t *unicode.RangeTable + p uint32 + next rune +} + +type tablesIter []tableIndex + +// sortIter does an insertion sort using the next field of tableIndex. Insertion +// sort is a good sorting algorithm for this case. +func sortIter(t []tableIndex) { + for i := range t { + for j := i; j > 0 && t[j-1].next > t[j].next; j-- { + t[j], t[j-1] = t[j-1], t[j] + } + } +} + +// next16 finds the ranged to be added to the table. If ranges overlap between +// multiple tables it clips the result to a non-overlapping range if the +// elements are not fully subsumed. It returns a zero range if there are no more +// ranges. +func (ti tablesIter) next16() unicode.Range16 { + sortIter(ti) + + t0 := ti[0] + if t0.next == atEnd { + return unicode.Range16{} + } + r0 := t0.t.R16[t0.p] + r0.Lo = uint16(t0.next) + + // We restrict the Hi of the current range if it overlaps with another range. + for i := range ti { + tn := ti[i] + // Since our tableIndices are sorted by next, we can break if the there + // is no overlap. The first value of a next range can always be merged + // into the current one, so we can break in case of equality as well. + if rune(r0.Hi) <= tn.next { + break + } + rn := tn.t.R16[tn.p] + rn.Lo = uint16(tn.next) + + // Limit r0.Hi based on next ranges in list, but allow it to overlap + // with ranges as long as it subsumes it. + m := (rn.Lo - r0.Lo) % r0.Stride + if m == 0 && (rn.Stride == r0.Stride || rn.Lo == rn.Hi) { + // Overlap, take the min of the two Hi values: for simplicity's sake + // we only process one range at a time. + if r0.Hi > rn.Hi { + r0.Hi = rn.Hi + } + } else { + // Not a compatible stride. Set to the last possible value before + // rn.Lo, but ensure there is at least one value. + if x := rn.Lo - m; r0.Lo <= x { + r0.Hi = x + } + break + } + } + + // Update the next values for each table. + for i := range ti { + tn := &ti[i] + if rune(r0.Hi) < tn.next { + break + } + rn := tn.t.R16[tn.p] + stride := rune(rn.Stride) + tn.next += stride * (1 + ((rune(r0.Hi) - tn.next) / stride)) + if rune(rn.Hi) < tn.next { + if tn.p++; int(tn.p) == len(tn.t.R16) { + tn.next = atEnd + } else { + tn.next = rune(tn.t.R16[tn.p].Lo) + } + } + } + + if r0.Lo == r0.Hi { + r0.Stride = 1 + } + + return r0 +} + +// next32 finds the ranged to be added to the table. If ranges overlap between +// multiple tables it clips the result to a non-overlapping range if the +// elements are not fully subsumed. It returns a zero range if there are no more +// ranges. +func (ti tablesIter) next32() unicode.Range32 { + sortIter(ti) + + t0 := ti[0] + if t0.next == atEnd { + return unicode.Range32{} + } + r0 := t0.t.R32[t0.p] + r0.Lo = uint32(t0.next) + + // We restrict the Hi of the current range if it overlaps with another range. + for i := range ti { + tn := ti[i] + // Since our tableIndices are sorted by next, we can break if the there + // is no overlap. The first value of a next range can always be merged + // into the current one, so we can break in case of equality as well. + if rune(r0.Hi) <= tn.next { + break + } + rn := tn.t.R32[tn.p] + rn.Lo = uint32(tn.next) + + // Limit r0.Hi based on next ranges in list, but allow it to overlap + // with ranges as long as it subsumes it. + m := (rn.Lo - r0.Lo) % r0.Stride + if m == 0 && (rn.Stride == r0.Stride || rn.Lo == rn.Hi) { + // Overlap, take the min of the two Hi values: for simplicity's sake + // we only process one range at a time. + if r0.Hi > rn.Hi { + r0.Hi = rn.Hi + } + } else { + // Not a compatible stride. Set to the last possible value before + // rn.Lo, but ensure there is at least one value. + if x := rn.Lo - m; r0.Lo <= x { + r0.Hi = x + } + break + } + } + + // Update the next values for each table. + for i := range ti { + tn := &ti[i] + if rune(r0.Hi) < tn.next { + break + } + rn := tn.t.R32[tn.p] + stride := rune(rn.Stride) + tn.next += stride * (1 + ((rune(r0.Hi) - tn.next) / stride)) + if rune(rn.Hi) < tn.next { + if tn.p++; int(tn.p) == len(tn.t.R32) { + tn.next = atEnd + } else { + tn.next = rune(tn.t.R32[tn.p].Lo) + } + } + } + + if r0.Lo == r0.Hi { + r0.Stride = 1 + } + + return r0 +} diff --git a/vendor/golang.org/x/text/unicode/rangetable/merge_test.go b/vendor/golang.org/x/text/unicode/rangetable/merge_test.go new file mode 100644 index 000000000..93ed0fcad --- /dev/null +++ b/vendor/golang.org/x/text/unicode/rangetable/merge_test.go @@ -0,0 +1,184 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package rangetable + +import ( + "testing" + "unicode" +) + +var ( + maxRuneTable = &unicode.RangeTable{ + R32: []unicode.Range32{ + {unicode.MaxRune, unicode.MaxRune, 1}, + }, + } + + overlap1 = &unicode.RangeTable{ + R16: []unicode.Range16{ + {0x100, 0xfffc, 4}, + }, + R32: []unicode.Range32{ + {0x100000, 0x10fffc, 4}, + }, + } + + overlap2 = &unicode.RangeTable{ + R16: []unicode.Range16{ + {0x101, 0xfffd, 4}, + }, + R32: []unicode.Range32{ + {0x100001, 0x10fffd, 3}, + }, + } + + // The following table should be compacted into two entries for R16 and R32. + optimize = &unicode.RangeTable{ + R16: []unicode.Range16{ + {0x1, 0x1, 1}, + {0x2, 0x2, 1}, + {0x3, 0x3, 1}, + {0x5, 0x5, 1}, + {0x7, 0x7, 1}, + {0x9, 0x9, 1}, + {0xb, 0xf, 2}, + }, + R32: []unicode.Range32{ + {0x10001, 0x10001, 1}, + {0x10002, 0x10002, 1}, + {0x10003, 0x10003, 1}, + {0x10005, 0x10005, 1}, + {0x10007, 0x10007, 1}, + {0x10009, 0x10009, 1}, + {0x1000b, 0x1000f, 2}, + }, + } +) + +func TestMerge(t *testing.T) { + for i, tt := range [][]*unicode.RangeTable{ + {unicode.Cc, unicode.Cf}, + {unicode.L, unicode.Ll}, + {unicode.L, unicode.Ll, unicode.Lu}, + {unicode.Ll, unicode.Lu}, + {unicode.M}, + unicode.GraphicRanges, + cased, + + // Merge R16 only and R32 only and vice versa. + {unicode.Khmer, unicode.Khudawadi}, + {unicode.Imperial_Aramaic, unicode.Radical}, + + // Merge with empty. + {&unicode.RangeTable{}}, + {&unicode.RangeTable{}, &unicode.RangeTable{}}, + {&unicode.RangeTable{}, &unicode.RangeTable{}, &unicode.RangeTable{}}, + {&unicode.RangeTable{}, unicode.Hiragana}, + {unicode.Inherited, &unicode.RangeTable{}}, + {&unicode.RangeTable{}, unicode.Hanunoo, &unicode.RangeTable{}}, + + // Hypothetical tables. + {maxRuneTable}, + {overlap1, overlap2}, + + // Optimization + {optimize}, + } { + rt := Merge(tt...) + for r := rune(0); r <= unicode.MaxRune; r++ { + if got, want := unicode.Is(rt, r), unicode.In(r, tt...); got != want { + t.Fatalf("%d:%U: got %v; want %v", i, r, got, want) + } + } + // Test optimization and correctness for R16. + for k := 0; k < len(rt.R16)-1; k++ { + if lo, hi := rt.R16[k].Lo, rt.R16[k].Hi; lo > hi { + t.Errorf("%d: Lo (%x) > Hi (%x)", i, lo, hi) + } + if hi, lo := rt.R16[k].Hi, rt.R16[k+1].Lo; hi >= lo { + t.Errorf("%d: Hi (%x) >= next Lo (%x)", i, hi, lo) + } + if rt.R16[k].Hi+rt.R16[k].Stride == rt.R16[k+1].Lo { + t.Errorf("%d: missed optimization for R16 at %d between %X and %x", + i, k, rt.R16[k], rt.R16[k+1]) + } + } + // Test optimization and correctness for R32. + for k := 0; k < len(rt.R32)-1; k++ { + if lo, hi := rt.R32[k].Lo, rt.R32[k].Hi; lo > hi { + t.Errorf("%d: Lo (%x) > Hi (%x)", i, lo, hi) + } + if hi, lo := rt.R32[k].Hi, rt.R32[k+1].Lo; hi >= lo { + t.Errorf("%d: Hi (%x) >= next Lo (%x)", i, hi, lo) + } + if rt.R32[k].Hi+rt.R32[k].Stride == rt.R32[k+1].Lo { + t.Errorf("%d: missed optimization for R32 at %d between %X and %X", + i, k, rt.R32[k], rt.R32[k+1]) + } + } + } +} + +const runes = "Hello World in 2015!,\U0010fffd" + +func BenchmarkNotMerged(t *testing.B) { + for i := 0; i < t.N; i++ { + for _, r := range runes { + unicode.In(r, unicode.GraphicRanges...) + } + } +} + +func BenchmarkMerged(t *testing.B) { + rt := Merge(unicode.GraphicRanges...) + + for i := 0; i < t.N; i++ { + for _, r := range runes { + unicode.Is(rt, r) + } + } +} + +var cased = []*unicode.RangeTable{ + unicode.Lower, + unicode.Upper, + unicode.Title, + unicode.Other_Lowercase, + unicode.Other_Uppercase, +} + +func BenchmarkNotMergedCased(t *testing.B) { + for i := 0; i < t.N; i++ { + for _, r := range runes { + unicode.In(r, cased...) + } + } +} + +func BenchmarkMergedCased(t *testing.B) { + // This reduces len(R16) from 243 to 82 and len(R32) from 65 to 35 for + // Unicode 7.0.0. + rt := Merge(cased...) + + for i := 0; i < t.N; i++ { + for _, r := range runes { + unicode.Is(rt, r) + } + } +} + +func BenchmarkInit(t *testing.B) { + for i := 0; i < t.N; i++ { + Merge(cased...) + Merge(unicode.GraphicRanges...) + } +} + +func BenchmarkInit2(t *testing.B) { + // Hypothetical near-worst-case performance. + for i := 0; i < t.N; i++ { + Merge(overlap1, overlap2) + } +} diff --git a/vendor/golang.org/x/text/unicode/rangetable/rangetable.go b/vendor/golang.org/x/text/unicode/rangetable/rangetable.go new file mode 100644 index 000000000..187882cc3 --- /dev/null +++ b/vendor/golang.org/x/text/unicode/rangetable/rangetable.go @@ -0,0 +1,70 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package rangetable provides utilities for creating and inspecting +// unicode.RangeTables. +package rangetable + +import ( + "sort" + "unicode" +) + +// New creates a RangeTable from the given runes, which may contain duplicates. +func New(r ...rune) *unicode.RangeTable { + if len(r) == 0 { + return &unicode.RangeTable{} + } + + sort.Sort(byRune(r)) + + // Remove duplicates. + k := 1 + for i := 1; i < len(r); i++ { + if r[k-1] != r[i] { + r[k] = r[i] + k++ + } + } + + var rt unicode.RangeTable + for _, r := range r[:k] { + if r <= 0xFFFF { + rt.R16 = append(rt.R16, unicode.Range16{Lo: uint16(r), Hi: uint16(r), Stride: 1}) + } else { + rt.R32 = append(rt.R32, unicode.Range32{Lo: uint32(r), Hi: uint32(r), Stride: 1}) + } + } + + // Optimize RangeTable. + return Merge(&rt) +} + +type byRune []rune + +func (r byRune) Len() int { return len(r) } +func (r byRune) Swap(i, j int) { r[i], r[j] = r[j], r[i] } +func (r byRune) Less(i, j int) bool { return r[i] < r[j] } + +// Visit visits all runes in the given RangeTable in order, calling fn for each. +func Visit(rt *unicode.RangeTable, fn func(rune)) { + for _, r16 := range rt.R16 { + for r := rune(r16.Lo); r <= rune(r16.Hi); r += rune(r16.Stride) { + fn(r) + } + } + for _, r32 := range rt.R32 { + for r := rune(r32.Lo); r <= rune(r32.Hi); r += rune(r32.Stride) { + fn(r) + } + } +} + +// Assigned returns a RangeTable with all assigned code points for a given +// Unicode version. This includes graphic, format, control, and private-use +// characters. It returns nil if the data for the given version is not +// available. +func Assigned(version string) *unicode.RangeTable { + return assigned[version] +} diff --git a/vendor/golang.org/x/text/unicode/rangetable/rangetable_test.go b/vendor/golang.org/x/text/unicode/rangetable/rangetable_test.go new file mode 100644 index 000000000..5a355aa35 --- /dev/null +++ b/vendor/golang.org/x/text/unicode/rangetable/rangetable_test.go @@ -0,0 +1,55 @@ +package rangetable + +import ( + "reflect" + "testing" + "unicode" +) + +var ( + empty = &unicode.RangeTable{} + many = &unicode.RangeTable{ + R16: []unicode.Range16{{0, 0xffff, 5}}, + R32: []unicode.Range32{{0x10004, 0x10009, 5}}, + LatinOffset: 0, + } +) + +func TestVisit(t *testing.T) { + Visit(empty, func(got rune) { + t.Error("call from empty RangeTable") + }) + + var want rune + Visit(many, func(got rune) { + if got != want { + t.Errorf("got %U; want %U", got, want) + } + want += 5 + }) + if want -= 5; want != 0x10009 { + t.Errorf("last run was %U; want U+10009", want) + } +} + +func TestNew(t *testing.T) { + for i, rt := range []*unicode.RangeTable{ + empty, + unicode.Co, + unicode.Letter, + unicode.ASCII_Hex_Digit, + many, + maxRuneTable, + } { + var got, want []rune + Visit(rt, func(r rune) { + want = append(want, r) + }) + Visit(New(want...), func(r rune) { + got = append(got, r) + }) + if !reflect.DeepEqual(got, want) { + t.Errorf("%d:\ngot %v;\nwant %v", i, got, want) + } + } +} diff --git a/vendor/golang.org/x/text/unicode/rangetable/tables.go b/vendor/golang.org/x/text/unicode/rangetable/tables.go new file mode 100644 index 000000000..73179c0e0 --- /dev/null +++ b/vendor/golang.org/x/text/unicode/rangetable/tables.go @@ -0,0 +1,6376 @@ +// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. + +package rangetable + +//go:generate go run gen.go --versions=4.1.0,5.1.0,5.2.0,5.0.0,6.1.0,6.2.0,6.3.0,6.0.0,7.0.0,8.0.0,9.0.0,10.0.0 + +import "unicode" + +var assigned = map[string]*unicode.RangeTable{ + "4.1.0": assigned4_1_0, + "5.1.0": assigned5_1_0, + "5.2.0": assigned5_2_0, + "5.0.0": assigned5_0_0, + "6.1.0": assigned6_1_0, + "6.2.0": assigned6_2_0, + "6.3.0": assigned6_3_0, + "6.0.0": assigned6_0_0, + "7.0.0": assigned7_0_0, + "8.0.0": assigned8_0_0, + "9.0.0": assigned9_0_0, + "10.0.0": assigned10_0_0, +} + +// size 2924 bytes (2 KiB) +var assigned4_1_0 = &unicode.RangeTable{ + R16: []unicode.Range16{ + {0x0000, 0x0241, 1}, + {0x0250, 0x036f, 1}, + {0x0374, 0x0375, 1}, + {0x037a, 0x037e, 4}, + {0x0384, 0x038a, 1}, + {0x038c, 0x038e, 2}, + {0x038f, 0x03a1, 1}, + {0x03a3, 0x03ce, 1}, + {0x03d0, 0x0486, 1}, + {0x0488, 0x04ce, 1}, + {0x04d0, 0x04f9, 1}, + {0x0500, 0x050f, 1}, + {0x0531, 0x0556, 1}, + {0x0559, 0x055f, 1}, + {0x0561, 0x0587, 1}, + {0x0589, 0x058a, 1}, + {0x0591, 0x05b9, 1}, + {0x05bb, 0x05c7, 1}, + {0x05d0, 0x05ea, 1}, + {0x05f0, 0x05f4, 1}, + {0x0600, 0x0603, 1}, + {0x060b, 0x0615, 1}, + {0x061b, 0x061e, 3}, + {0x061f, 0x0621, 2}, + {0x0622, 0x063a, 1}, + {0x0640, 0x065e, 1}, + {0x0660, 0x070d, 1}, + {0x070f, 0x074a, 1}, + {0x074d, 0x076d, 1}, + {0x0780, 0x07b1, 1}, + {0x0901, 0x0939, 1}, + {0x093c, 0x094d, 1}, + {0x0950, 0x0954, 1}, + {0x0958, 0x0970, 1}, + {0x097d, 0x0981, 4}, + {0x0982, 0x0983, 1}, + {0x0985, 0x098c, 1}, + {0x098f, 0x0990, 1}, + {0x0993, 0x09a8, 1}, + {0x09aa, 0x09b0, 1}, + {0x09b2, 0x09b6, 4}, + {0x09b7, 0x09b9, 1}, + {0x09bc, 0x09c4, 1}, + {0x09c7, 0x09c8, 1}, + {0x09cb, 0x09ce, 1}, + {0x09d7, 0x09dc, 5}, + {0x09dd, 0x09df, 2}, + {0x09e0, 0x09e3, 1}, + {0x09e6, 0x09fa, 1}, + {0x0a01, 0x0a03, 1}, + {0x0a05, 0x0a0a, 1}, + {0x0a0f, 0x0a10, 1}, + {0x0a13, 0x0a28, 1}, + {0x0a2a, 0x0a30, 1}, + {0x0a32, 0x0a33, 1}, + {0x0a35, 0x0a36, 1}, + {0x0a38, 0x0a39, 1}, + {0x0a3c, 0x0a3e, 2}, + {0x0a3f, 0x0a42, 1}, + {0x0a47, 0x0a48, 1}, + {0x0a4b, 0x0a4d, 1}, + {0x0a59, 0x0a5c, 1}, + {0x0a5e, 0x0a66, 8}, + {0x0a67, 0x0a74, 1}, + {0x0a81, 0x0a83, 1}, + {0x0a85, 0x0a8d, 1}, + {0x0a8f, 0x0a91, 1}, + {0x0a93, 0x0aa8, 1}, + {0x0aaa, 0x0ab0, 1}, + {0x0ab2, 0x0ab3, 1}, + {0x0ab5, 0x0ab9, 1}, + {0x0abc, 0x0ac5, 1}, + {0x0ac7, 0x0ac9, 1}, + {0x0acb, 0x0acd, 1}, + {0x0ad0, 0x0ae0, 16}, + {0x0ae1, 0x0ae3, 1}, + {0x0ae6, 0x0aef, 1}, + {0x0af1, 0x0b01, 16}, + {0x0b02, 0x0b03, 1}, + {0x0b05, 0x0b0c, 1}, + {0x0b0f, 0x0b10, 1}, + {0x0b13, 0x0b28, 1}, + {0x0b2a, 0x0b30, 1}, + {0x0b32, 0x0b33, 1}, + {0x0b35, 0x0b39, 1}, + {0x0b3c, 0x0b43, 1}, + {0x0b47, 0x0b48, 1}, + {0x0b4b, 0x0b4d, 1}, + {0x0b56, 0x0b57, 1}, + {0x0b5c, 0x0b5d, 1}, + {0x0b5f, 0x0b61, 1}, + {0x0b66, 0x0b71, 1}, + {0x0b82, 0x0b83, 1}, + {0x0b85, 0x0b8a, 1}, + {0x0b8e, 0x0b90, 1}, + {0x0b92, 0x0b95, 1}, + {0x0b99, 0x0b9a, 1}, + {0x0b9c, 0x0b9e, 2}, + {0x0b9f, 0x0ba3, 4}, + {0x0ba4, 0x0ba8, 4}, + {0x0ba9, 0x0baa, 1}, + {0x0bae, 0x0bb9, 1}, + {0x0bbe, 0x0bc2, 1}, + {0x0bc6, 0x0bc8, 1}, + {0x0bca, 0x0bcd, 1}, + {0x0bd7, 0x0be6, 15}, + {0x0be7, 0x0bfa, 1}, + {0x0c01, 0x0c03, 1}, + {0x0c05, 0x0c0c, 1}, + {0x0c0e, 0x0c10, 1}, + {0x0c12, 0x0c28, 1}, + {0x0c2a, 0x0c33, 1}, + {0x0c35, 0x0c39, 1}, + {0x0c3e, 0x0c44, 1}, + {0x0c46, 0x0c48, 1}, + {0x0c4a, 0x0c4d, 1}, + {0x0c55, 0x0c56, 1}, + {0x0c60, 0x0c61, 1}, + {0x0c66, 0x0c6f, 1}, + {0x0c82, 0x0c83, 1}, + {0x0c85, 0x0c8c, 1}, + {0x0c8e, 0x0c90, 1}, + {0x0c92, 0x0ca8, 1}, + {0x0caa, 0x0cb3, 1}, + {0x0cb5, 0x0cb9, 1}, + {0x0cbc, 0x0cc4, 1}, + {0x0cc6, 0x0cc8, 1}, + {0x0cca, 0x0ccd, 1}, + {0x0cd5, 0x0cd6, 1}, + {0x0cde, 0x0ce0, 2}, + {0x0ce1, 0x0ce6, 5}, + {0x0ce7, 0x0cef, 1}, + {0x0d02, 0x0d03, 1}, + {0x0d05, 0x0d0c, 1}, + {0x0d0e, 0x0d10, 1}, + {0x0d12, 0x0d28, 1}, + {0x0d2a, 0x0d39, 1}, + {0x0d3e, 0x0d43, 1}, + {0x0d46, 0x0d48, 1}, + {0x0d4a, 0x0d4d, 1}, + {0x0d57, 0x0d60, 9}, + {0x0d61, 0x0d66, 5}, + {0x0d67, 0x0d6f, 1}, + {0x0d82, 0x0d83, 1}, + {0x0d85, 0x0d96, 1}, + {0x0d9a, 0x0db1, 1}, + {0x0db3, 0x0dbb, 1}, + {0x0dbd, 0x0dc0, 3}, + {0x0dc1, 0x0dc6, 1}, + {0x0dca, 0x0dcf, 5}, + {0x0dd0, 0x0dd4, 1}, + {0x0dd6, 0x0dd8, 2}, + {0x0dd9, 0x0ddf, 1}, + {0x0df2, 0x0df4, 1}, + {0x0e01, 0x0e3a, 1}, + {0x0e3f, 0x0e5b, 1}, + {0x0e81, 0x0e82, 1}, + {0x0e84, 0x0e87, 3}, + {0x0e88, 0x0e8a, 2}, + {0x0e8d, 0x0e94, 7}, + {0x0e95, 0x0e97, 1}, + {0x0e99, 0x0e9f, 1}, + {0x0ea1, 0x0ea3, 1}, + {0x0ea5, 0x0ea7, 2}, + {0x0eaa, 0x0eab, 1}, + {0x0ead, 0x0eb9, 1}, + {0x0ebb, 0x0ebd, 1}, + {0x0ec0, 0x0ec4, 1}, + {0x0ec6, 0x0ec8, 2}, + {0x0ec9, 0x0ecd, 1}, + {0x0ed0, 0x0ed9, 1}, + {0x0edc, 0x0edd, 1}, + {0x0f00, 0x0f47, 1}, + {0x0f49, 0x0f6a, 1}, + {0x0f71, 0x0f8b, 1}, + {0x0f90, 0x0f97, 1}, + {0x0f99, 0x0fbc, 1}, + {0x0fbe, 0x0fcc, 1}, + {0x0fcf, 0x0fd1, 1}, + {0x1000, 0x1021, 1}, + {0x1023, 0x1027, 1}, + {0x1029, 0x102a, 1}, + {0x102c, 0x1032, 1}, + {0x1036, 0x1039, 1}, + {0x1040, 0x1059, 1}, + {0x10a0, 0x10c5, 1}, + {0x10d0, 0x10fc, 1}, + {0x1100, 0x1159, 1}, + {0x115f, 0x11a2, 1}, + {0x11a8, 0x11f9, 1}, + {0x1200, 0x1248, 1}, + {0x124a, 0x124d, 1}, + {0x1250, 0x1256, 1}, + {0x1258, 0x125a, 2}, + {0x125b, 0x125d, 1}, + {0x1260, 0x1288, 1}, + {0x128a, 0x128d, 1}, + {0x1290, 0x12b0, 1}, + {0x12b2, 0x12b5, 1}, + {0x12b8, 0x12be, 1}, + {0x12c0, 0x12c2, 2}, + {0x12c3, 0x12c5, 1}, + {0x12c8, 0x12d6, 1}, + {0x12d8, 0x1310, 1}, + {0x1312, 0x1315, 1}, + {0x1318, 0x135a, 1}, + {0x135f, 0x137c, 1}, + {0x1380, 0x1399, 1}, + {0x13a0, 0x13f4, 1}, + {0x1401, 0x1676, 1}, + {0x1680, 0x169c, 1}, + {0x16a0, 0x16f0, 1}, + {0x1700, 0x170c, 1}, + {0x170e, 0x1714, 1}, + {0x1720, 0x1736, 1}, + {0x1740, 0x1753, 1}, + {0x1760, 0x176c, 1}, + {0x176e, 0x1770, 1}, + {0x1772, 0x1773, 1}, + {0x1780, 0x17dd, 1}, + {0x17e0, 0x17e9, 1}, + {0x17f0, 0x17f9, 1}, + {0x1800, 0x180e, 1}, + {0x1810, 0x1819, 1}, + {0x1820, 0x1877, 1}, + {0x1880, 0x18a9, 1}, + {0x1900, 0x191c, 1}, + {0x1920, 0x192b, 1}, + {0x1930, 0x193b, 1}, + {0x1940, 0x1944, 4}, + {0x1945, 0x196d, 1}, + {0x1970, 0x1974, 1}, + {0x1980, 0x19a9, 1}, + {0x19b0, 0x19c9, 1}, + {0x19d0, 0x19d9, 1}, + {0x19de, 0x1a1b, 1}, + {0x1a1e, 0x1a1f, 1}, + {0x1d00, 0x1dc3, 1}, + {0x1e00, 0x1e9b, 1}, + {0x1ea0, 0x1ef9, 1}, + {0x1f00, 0x1f15, 1}, + {0x1f18, 0x1f1d, 1}, + {0x1f20, 0x1f45, 1}, + {0x1f48, 0x1f4d, 1}, + {0x1f50, 0x1f57, 1}, + {0x1f59, 0x1f5f, 2}, + {0x1f60, 0x1f7d, 1}, + {0x1f80, 0x1fb4, 1}, + {0x1fb6, 0x1fc4, 1}, + {0x1fc6, 0x1fd3, 1}, + {0x1fd6, 0x1fdb, 1}, + {0x1fdd, 0x1fef, 1}, + {0x1ff2, 0x1ff4, 1}, + {0x1ff6, 0x1ffe, 1}, + {0x2000, 0x2063, 1}, + {0x206a, 0x2071, 1}, + {0x2074, 0x208e, 1}, + {0x2090, 0x2094, 1}, + {0x20a0, 0x20b5, 1}, + {0x20d0, 0x20eb, 1}, + {0x2100, 0x214c, 1}, + {0x2153, 0x2183, 1}, + {0x2190, 0x23db, 1}, + {0x2400, 0x2426, 1}, + {0x2440, 0x244a, 1}, + {0x2460, 0x269c, 1}, + {0x26a0, 0x26b1, 1}, + {0x2701, 0x2704, 1}, + {0x2706, 0x2709, 1}, + {0x270c, 0x2727, 1}, + {0x2729, 0x274b, 1}, + {0x274d, 0x274f, 2}, + {0x2750, 0x2752, 1}, + {0x2756, 0x2758, 2}, + {0x2759, 0x275e, 1}, + {0x2761, 0x2794, 1}, + {0x2798, 0x27af, 1}, + {0x27b1, 0x27be, 1}, + {0x27c0, 0x27c6, 1}, + {0x27d0, 0x27eb, 1}, + {0x27f0, 0x2b13, 1}, + {0x2c00, 0x2c2e, 1}, + {0x2c30, 0x2c5e, 1}, + {0x2c80, 0x2cea, 1}, + {0x2cf9, 0x2d25, 1}, + {0x2d30, 0x2d65, 1}, + {0x2d6f, 0x2d80, 17}, + {0x2d81, 0x2d96, 1}, + {0x2da0, 0x2da6, 1}, + {0x2da8, 0x2dae, 1}, + {0x2db0, 0x2db6, 1}, + {0x2db8, 0x2dbe, 1}, + {0x2dc0, 0x2dc6, 1}, + {0x2dc8, 0x2dce, 1}, + {0x2dd0, 0x2dd6, 1}, + {0x2dd8, 0x2dde, 1}, + {0x2e00, 0x2e17, 1}, + {0x2e1c, 0x2e1d, 1}, + {0x2e80, 0x2e99, 1}, + {0x2e9b, 0x2ef3, 1}, + {0x2f00, 0x2fd5, 1}, + {0x2ff0, 0x2ffb, 1}, + {0x3000, 0x303f, 1}, + {0x3041, 0x3096, 1}, + {0x3099, 0x30ff, 1}, + {0x3105, 0x312c, 1}, + {0x3131, 0x318e, 1}, + {0x3190, 0x31b7, 1}, + {0x31c0, 0x31cf, 1}, + {0x31f0, 0x321e, 1}, + {0x3220, 0x3243, 1}, + {0x3250, 0x32fe, 1}, + {0x3300, 0x4db5, 1}, + {0x4dc0, 0x9fbb, 1}, + {0xa000, 0xa48c, 1}, + {0xa490, 0xa4c6, 1}, + {0xa700, 0xa716, 1}, + {0xa800, 0xa82b, 1}, + {0xac00, 0xd7a3, 1}, + {0xd800, 0xfa2d, 1}, + {0xfa30, 0xfa6a, 1}, + {0xfa70, 0xfad9, 1}, + {0xfb00, 0xfb06, 1}, + {0xfb13, 0xfb17, 1}, + {0xfb1d, 0xfb36, 1}, + {0xfb38, 0xfb3c, 1}, + {0xfb3e, 0xfb40, 2}, + {0xfb41, 0xfb43, 2}, + {0xfb44, 0xfb46, 2}, + {0xfb47, 0xfbb1, 1}, + {0xfbd3, 0xfd3f, 1}, + {0xfd50, 0xfd8f, 1}, + {0xfd92, 0xfdc7, 1}, + {0xfdf0, 0xfdfd, 1}, + {0xfe00, 0xfe19, 1}, + {0xfe20, 0xfe23, 1}, + {0xfe30, 0xfe52, 1}, + {0xfe54, 0xfe66, 1}, + {0xfe68, 0xfe6b, 1}, + {0xfe70, 0xfe74, 1}, + {0xfe76, 0xfefc, 1}, + {0xfeff, 0xff01, 2}, + {0xff02, 0xffbe, 1}, + {0xffc2, 0xffc7, 1}, + {0xffca, 0xffcf, 1}, + {0xffd2, 0xffd7, 1}, + {0xffda, 0xffdc, 1}, + {0xffe0, 0xffe6, 1}, + {0xffe8, 0xffee, 1}, + {0xfff9, 0xfffd, 1}, + }, + R32: []unicode.Range32{ + {0x00010000, 0x0001000b, 1}, + {0x0001000d, 0x00010026, 1}, + {0x00010028, 0x0001003a, 1}, + {0x0001003c, 0x0001003d, 1}, + {0x0001003f, 0x0001004d, 1}, + {0x00010050, 0x0001005d, 1}, + {0x00010080, 0x000100fa, 1}, + {0x00010100, 0x00010102, 1}, + {0x00010107, 0x00010133, 1}, + {0x00010137, 0x0001018a, 1}, + {0x00010300, 0x0001031e, 1}, + {0x00010320, 0x00010323, 1}, + {0x00010330, 0x0001034a, 1}, + {0x00010380, 0x0001039d, 1}, + {0x0001039f, 0x000103c3, 1}, + {0x000103c8, 0x000103d5, 1}, + {0x00010400, 0x0001049d, 1}, + {0x000104a0, 0x000104a9, 1}, + {0x00010800, 0x00010805, 1}, + {0x00010808, 0x0001080a, 2}, + {0x0001080b, 0x00010835, 1}, + {0x00010837, 0x00010838, 1}, + {0x0001083c, 0x0001083f, 3}, + {0x00010a00, 0x00010a03, 1}, + {0x00010a05, 0x00010a06, 1}, + {0x00010a0c, 0x00010a13, 1}, + {0x00010a15, 0x00010a17, 1}, + {0x00010a19, 0x00010a33, 1}, + {0x00010a38, 0x00010a3a, 1}, + {0x00010a3f, 0x00010a47, 1}, + {0x00010a50, 0x00010a58, 1}, + {0x0001d000, 0x0001d0f5, 1}, + {0x0001d100, 0x0001d126, 1}, + {0x0001d12a, 0x0001d1dd, 1}, + {0x0001d200, 0x0001d245, 1}, + {0x0001d300, 0x0001d356, 1}, + {0x0001d400, 0x0001d454, 1}, + {0x0001d456, 0x0001d49c, 1}, + {0x0001d49e, 0x0001d49f, 1}, + {0x0001d4a2, 0x0001d4a5, 3}, + {0x0001d4a6, 0x0001d4a9, 3}, + {0x0001d4aa, 0x0001d4ac, 1}, + {0x0001d4ae, 0x0001d4b9, 1}, + {0x0001d4bb, 0x0001d4bd, 2}, + {0x0001d4be, 0x0001d4c3, 1}, + {0x0001d4c5, 0x0001d505, 1}, + {0x0001d507, 0x0001d50a, 1}, + {0x0001d50d, 0x0001d514, 1}, + {0x0001d516, 0x0001d51c, 1}, + {0x0001d51e, 0x0001d539, 1}, + {0x0001d53b, 0x0001d53e, 1}, + {0x0001d540, 0x0001d544, 1}, + {0x0001d546, 0x0001d54a, 4}, + {0x0001d54b, 0x0001d550, 1}, + {0x0001d552, 0x0001d6a5, 1}, + {0x0001d6a8, 0x0001d7c9, 1}, + {0x0001d7ce, 0x0001d7ff, 1}, + {0x00020000, 0x0002a6d6, 1}, + {0x0002f800, 0x0002fa1d, 1}, + {0x000e0001, 0x000e0020, 31}, + {0x000e0021, 0x000e007f, 1}, + {0x000e0100, 0x000e01ef, 1}, + {0x000f0000, 0x000ffffd, 1}, + {0x00100000, 0x0010fffd, 1}, + }, + LatinOffset: 0, +} + +// size 3152 bytes (3 KiB) +var assigned5_1_0 = &unicode.RangeTable{ + R16: []unicode.Range16{ + {0x0000, 0x0377, 1}, + {0x037a, 0x037e, 1}, + {0x0384, 0x038a, 1}, + {0x038c, 0x038e, 2}, + {0x038f, 0x03a1, 1}, + {0x03a3, 0x0523, 1}, + {0x0531, 0x0556, 1}, + {0x0559, 0x055f, 1}, + {0x0561, 0x0587, 1}, + {0x0589, 0x058a, 1}, + {0x0591, 0x05c7, 1}, + {0x05d0, 0x05ea, 1}, + {0x05f0, 0x05f4, 1}, + {0x0600, 0x0603, 1}, + {0x0606, 0x061b, 1}, + {0x061e, 0x061f, 1}, + {0x0621, 0x065e, 1}, + {0x0660, 0x070d, 1}, + {0x070f, 0x074a, 1}, + {0x074d, 0x07b1, 1}, + {0x07c0, 0x07fa, 1}, + {0x0901, 0x0939, 1}, + {0x093c, 0x094d, 1}, + {0x0950, 0x0954, 1}, + {0x0958, 0x0972, 1}, + {0x097b, 0x097f, 1}, + {0x0981, 0x0983, 1}, + {0x0985, 0x098c, 1}, + {0x098f, 0x0990, 1}, + {0x0993, 0x09a8, 1}, + {0x09aa, 0x09b0, 1}, + {0x09b2, 0x09b6, 4}, + {0x09b7, 0x09b9, 1}, + {0x09bc, 0x09c4, 1}, + {0x09c7, 0x09c8, 1}, + {0x09cb, 0x09ce, 1}, + {0x09d7, 0x09dc, 5}, + {0x09dd, 0x09df, 2}, + {0x09e0, 0x09e3, 1}, + {0x09e6, 0x09fa, 1}, + {0x0a01, 0x0a03, 1}, + {0x0a05, 0x0a0a, 1}, + {0x0a0f, 0x0a10, 1}, + {0x0a13, 0x0a28, 1}, + {0x0a2a, 0x0a30, 1}, + {0x0a32, 0x0a33, 1}, + {0x0a35, 0x0a36, 1}, + {0x0a38, 0x0a39, 1}, + {0x0a3c, 0x0a3e, 2}, + {0x0a3f, 0x0a42, 1}, + {0x0a47, 0x0a48, 1}, + {0x0a4b, 0x0a4d, 1}, + {0x0a51, 0x0a59, 8}, + {0x0a5a, 0x0a5c, 1}, + {0x0a5e, 0x0a66, 8}, + {0x0a67, 0x0a75, 1}, + {0x0a81, 0x0a83, 1}, + {0x0a85, 0x0a8d, 1}, + {0x0a8f, 0x0a91, 1}, + {0x0a93, 0x0aa8, 1}, + {0x0aaa, 0x0ab0, 1}, + {0x0ab2, 0x0ab3, 1}, + {0x0ab5, 0x0ab9, 1}, + {0x0abc, 0x0ac5, 1}, + {0x0ac7, 0x0ac9, 1}, + {0x0acb, 0x0acd, 1}, + {0x0ad0, 0x0ae0, 16}, + {0x0ae1, 0x0ae3, 1}, + {0x0ae6, 0x0aef, 1}, + {0x0af1, 0x0b01, 16}, + {0x0b02, 0x0b03, 1}, + {0x0b05, 0x0b0c, 1}, + {0x0b0f, 0x0b10, 1}, + {0x0b13, 0x0b28, 1}, + {0x0b2a, 0x0b30, 1}, + {0x0b32, 0x0b33, 1}, + {0x0b35, 0x0b39, 1}, + {0x0b3c, 0x0b44, 1}, + {0x0b47, 0x0b48, 1}, + {0x0b4b, 0x0b4d, 1}, + {0x0b56, 0x0b57, 1}, + {0x0b5c, 0x0b5d, 1}, + {0x0b5f, 0x0b63, 1}, + {0x0b66, 0x0b71, 1}, + {0x0b82, 0x0b83, 1}, + {0x0b85, 0x0b8a, 1}, + {0x0b8e, 0x0b90, 1}, + {0x0b92, 0x0b95, 1}, + {0x0b99, 0x0b9a, 1}, + {0x0b9c, 0x0b9e, 2}, + {0x0b9f, 0x0ba3, 4}, + {0x0ba4, 0x0ba8, 4}, + {0x0ba9, 0x0baa, 1}, + {0x0bae, 0x0bb9, 1}, + {0x0bbe, 0x0bc2, 1}, + {0x0bc6, 0x0bc8, 1}, + {0x0bca, 0x0bcd, 1}, + {0x0bd0, 0x0bd7, 7}, + {0x0be6, 0x0bfa, 1}, + {0x0c01, 0x0c03, 1}, + {0x0c05, 0x0c0c, 1}, + {0x0c0e, 0x0c10, 1}, + {0x0c12, 0x0c28, 1}, + {0x0c2a, 0x0c33, 1}, + {0x0c35, 0x0c39, 1}, + {0x0c3d, 0x0c44, 1}, + {0x0c46, 0x0c48, 1}, + {0x0c4a, 0x0c4d, 1}, + {0x0c55, 0x0c56, 1}, + {0x0c58, 0x0c59, 1}, + {0x0c60, 0x0c63, 1}, + {0x0c66, 0x0c6f, 1}, + {0x0c78, 0x0c7f, 1}, + {0x0c82, 0x0c83, 1}, + {0x0c85, 0x0c8c, 1}, + {0x0c8e, 0x0c90, 1}, + {0x0c92, 0x0ca8, 1}, + {0x0caa, 0x0cb3, 1}, + {0x0cb5, 0x0cb9, 1}, + {0x0cbc, 0x0cc4, 1}, + {0x0cc6, 0x0cc8, 1}, + {0x0cca, 0x0ccd, 1}, + {0x0cd5, 0x0cd6, 1}, + {0x0cde, 0x0ce0, 2}, + {0x0ce1, 0x0ce3, 1}, + {0x0ce6, 0x0cef, 1}, + {0x0cf1, 0x0cf2, 1}, + {0x0d02, 0x0d03, 1}, + {0x0d05, 0x0d0c, 1}, + {0x0d0e, 0x0d10, 1}, + {0x0d12, 0x0d28, 1}, + {0x0d2a, 0x0d39, 1}, + {0x0d3d, 0x0d44, 1}, + {0x0d46, 0x0d48, 1}, + {0x0d4a, 0x0d4d, 1}, + {0x0d57, 0x0d60, 9}, + {0x0d61, 0x0d63, 1}, + {0x0d66, 0x0d75, 1}, + {0x0d79, 0x0d7f, 1}, + {0x0d82, 0x0d83, 1}, + {0x0d85, 0x0d96, 1}, + {0x0d9a, 0x0db1, 1}, + {0x0db3, 0x0dbb, 1}, + {0x0dbd, 0x0dc0, 3}, + {0x0dc1, 0x0dc6, 1}, + {0x0dca, 0x0dcf, 5}, + {0x0dd0, 0x0dd4, 1}, + {0x0dd6, 0x0dd8, 2}, + {0x0dd9, 0x0ddf, 1}, + {0x0df2, 0x0df4, 1}, + {0x0e01, 0x0e3a, 1}, + {0x0e3f, 0x0e5b, 1}, + {0x0e81, 0x0e82, 1}, + {0x0e84, 0x0e87, 3}, + {0x0e88, 0x0e8a, 2}, + {0x0e8d, 0x0e94, 7}, + {0x0e95, 0x0e97, 1}, + {0x0e99, 0x0e9f, 1}, + {0x0ea1, 0x0ea3, 1}, + {0x0ea5, 0x0ea7, 2}, + {0x0eaa, 0x0eab, 1}, + {0x0ead, 0x0eb9, 1}, + {0x0ebb, 0x0ebd, 1}, + {0x0ec0, 0x0ec4, 1}, + {0x0ec6, 0x0ec8, 2}, + {0x0ec9, 0x0ecd, 1}, + {0x0ed0, 0x0ed9, 1}, + {0x0edc, 0x0edd, 1}, + {0x0f00, 0x0f47, 1}, + {0x0f49, 0x0f6c, 1}, + {0x0f71, 0x0f8b, 1}, + {0x0f90, 0x0f97, 1}, + {0x0f99, 0x0fbc, 1}, + {0x0fbe, 0x0fcc, 1}, + {0x0fce, 0x0fd4, 1}, + {0x1000, 0x1099, 1}, + {0x109e, 0x10c5, 1}, + {0x10d0, 0x10fc, 1}, + {0x1100, 0x1159, 1}, + {0x115f, 0x11a2, 1}, + {0x11a8, 0x11f9, 1}, + {0x1200, 0x1248, 1}, + {0x124a, 0x124d, 1}, + {0x1250, 0x1256, 1}, + {0x1258, 0x125a, 2}, + {0x125b, 0x125d, 1}, + {0x1260, 0x1288, 1}, + {0x128a, 0x128d, 1}, + {0x1290, 0x12b0, 1}, + {0x12b2, 0x12b5, 1}, + {0x12b8, 0x12be, 1}, + {0x12c0, 0x12c2, 2}, + {0x12c3, 0x12c5, 1}, + {0x12c8, 0x12d6, 1}, + {0x12d8, 0x1310, 1}, + {0x1312, 0x1315, 1}, + {0x1318, 0x135a, 1}, + {0x135f, 0x137c, 1}, + {0x1380, 0x1399, 1}, + {0x13a0, 0x13f4, 1}, + {0x1401, 0x1676, 1}, + {0x1680, 0x169c, 1}, + {0x16a0, 0x16f0, 1}, + {0x1700, 0x170c, 1}, + {0x170e, 0x1714, 1}, + {0x1720, 0x1736, 1}, + {0x1740, 0x1753, 1}, + {0x1760, 0x176c, 1}, + {0x176e, 0x1770, 1}, + {0x1772, 0x1773, 1}, + {0x1780, 0x17dd, 1}, + {0x17e0, 0x17e9, 1}, + {0x17f0, 0x17f9, 1}, + {0x1800, 0x180e, 1}, + {0x1810, 0x1819, 1}, + {0x1820, 0x1877, 1}, + {0x1880, 0x18aa, 1}, + {0x1900, 0x191c, 1}, + {0x1920, 0x192b, 1}, + {0x1930, 0x193b, 1}, + {0x1940, 0x1944, 4}, + {0x1945, 0x196d, 1}, + {0x1970, 0x1974, 1}, + {0x1980, 0x19a9, 1}, + {0x19b0, 0x19c9, 1}, + {0x19d0, 0x19d9, 1}, + {0x19de, 0x1a1b, 1}, + {0x1a1e, 0x1a1f, 1}, + {0x1b00, 0x1b4b, 1}, + {0x1b50, 0x1b7c, 1}, + {0x1b80, 0x1baa, 1}, + {0x1bae, 0x1bb9, 1}, + {0x1c00, 0x1c37, 1}, + {0x1c3b, 0x1c49, 1}, + {0x1c4d, 0x1c7f, 1}, + {0x1d00, 0x1de6, 1}, + {0x1dfe, 0x1f15, 1}, + {0x1f18, 0x1f1d, 1}, + {0x1f20, 0x1f45, 1}, + {0x1f48, 0x1f4d, 1}, + {0x1f50, 0x1f57, 1}, + {0x1f59, 0x1f5f, 2}, + {0x1f60, 0x1f7d, 1}, + {0x1f80, 0x1fb4, 1}, + {0x1fb6, 0x1fc4, 1}, + {0x1fc6, 0x1fd3, 1}, + {0x1fd6, 0x1fdb, 1}, + {0x1fdd, 0x1fef, 1}, + {0x1ff2, 0x1ff4, 1}, + {0x1ff6, 0x1ffe, 1}, + {0x2000, 0x2064, 1}, + {0x206a, 0x2071, 1}, + {0x2074, 0x208e, 1}, + {0x2090, 0x2094, 1}, + {0x20a0, 0x20b5, 1}, + {0x20d0, 0x20f0, 1}, + {0x2100, 0x214f, 1}, + {0x2153, 0x2188, 1}, + {0x2190, 0x23e7, 1}, + {0x2400, 0x2426, 1}, + {0x2440, 0x244a, 1}, + {0x2460, 0x269d, 1}, + {0x26a0, 0x26bc, 1}, + {0x26c0, 0x26c3, 1}, + {0x2701, 0x2704, 1}, + {0x2706, 0x2709, 1}, + {0x270c, 0x2727, 1}, + {0x2729, 0x274b, 1}, + {0x274d, 0x274f, 2}, + {0x2750, 0x2752, 1}, + {0x2756, 0x2758, 2}, + {0x2759, 0x275e, 1}, + {0x2761, 0x2794, 1}, + {0x2798, 0x27af, 1}, + {0x27b1, 0x27be, 1}, + {0x27c0, 0x27ca, 1}, + {0x27cc, 0x27d0, 4}, + {0x27d1, 0x2b4c, 1}, + {0x2b50, 0x2b54, 1}, + {0x2c00, 0x2c2e, 1}, + {0x2c30, 0x2c5e, 1}, + {0x2c60, 0x2c6f, 1}, + {0x2c71, 0x2c7d, 1}, + {0x2c80, 0x2cea, 1}, + {0x2cf9, 0x2d25, 1}, + {0x2d30, 0x2d65, 1}, + {0x2d6f, 0x2d80, 17}, + {0x2d81, 0x2d96, 1}, + {0x2da0, 0x2da6, 1}, + {0x2da8, 0x2dae, 1}, + {0x2db0, 0x2db6, 1}, + {0x2db8, 0x2dbe, 1}, + {0x2dc0, 0x2dc6, 1}, + {0x2dc8, 0x2dce, 1}, + {0x2dd0, 0x2dd6, 1}, + {0x2dd8, 0x2dde, 1}, + {0x2de0, 0x2e30, 1}, + {0x2e80, 0x2e99, 1}, + {0x2e9b, 0x2ef3, 1}, + {0x2f00, 0x2fd5, 1}, + {0x2ff0, 0x2ffb, 1}, + {0x3000, 0x303f, 1}, + {0x3041, 0x3096, 1}, + {0x3099, 0x30ff, 1}, + {0x3105, 0x312d, 1}, + {0x3131, 0x318e, 1}, + {0x3190, 0x31b7, 1}, + {0x31c0, 0x31e3, 1}, + {0x31f0, 0x321e, 1}, + {0x3220, 0x3243, 1}, + {0x3250, 0x32fe, 1}, + {0x3300, 0x4db5, 1}, + {0x4dc0, 0x9fc3, 1}, + {0xa000, 0xa48c, 1}, + {0xa490, 0xa4c6, 1}, + {0xa500, 0xa62b, 1}, + {0xa640, 0xa65f, 1}, + {0xa662, 0xa673, 1}, + {0xa67c, 0xa697, 1}, + {0xa700, 0xa78c, 1}, + {0xa7fb, 0xa82b, 1}, + {0xa840, 0xa877, 1}, + {0xa880, 0xa8c4, 1}, + {0xa8ce, 0xa8d9, 1}, + {0xa900, 0xa953, 1}, + {0xa95f, 0xaa00, 161}, + {0xaa01, 0xaa36, 1}, + {0xaa40, 0xaa4d, 1}, + {0xaa50, 0xaa59, 1}, + {0xaa5c, 0xaa5f, 1}, + {0xac00, 0xd7a3, 1}, + {0xd800, 0xfa2d, 1}, + {0xfa30, 0xfa6a, 1}, + {0xfa70, 0xfad9, 1}, + {0xfb00, 0xfb06, 1}, + {0xfb13, 0xfb17, 1}, + {0xfb1d, 0xfb36, 1}, + {0xfb38, 0xfb3c, 1}, + {0xfb3e, 0xfb40, 2}, + {0xfb41, 0xfb43, 2}, + {0xfb44, 0xfb46, 2}, + {0xfb47, 0xfbb1, 1}, + {0xfbd3, 0xfd3f, 1}, + {0xfd50, 0xfd8f, 1}, + {0xfd92, 0xfdc7, 1}, + {0xfdf0, 0xfdfd, 1}, + {0xfe00, 0xfe19, 1}, + {0xfe20, 0xfe26, 1}, + {0xfe30, 0xfe52, 1}, + {0xfe54, 0xfe66, 1}, + {0xfe68, 0xfe6b, 1}, + {0xfe70, 0xfe74, 1}, + {0xfe76, 0xfefc, 1}, + {0xfeff, 0xff01, 2}, + {0xff02, 0xffbe, 1}, + {0xffc2, 0xffc7, 1}, + {0xffca, 0xffcf, 1}, + {0xffd2, 0xffd7, 1}, + {0xffda, 0xffdc, 1}, + {0xffe0, 0xffe6, 1}, + {0xffe8, 0xffee, 1}, + {0xfff9, 0xfffd, 1}, + }, + R32: []unicode.Range32{ + {0x00010000, 0x0001000b, 1}, + {0x0001000d, 0x00010026, 1}, + {0x00010028, 0x0001003a, 1}, + {0x0001003c, 0x0001003d, 1}, + {0x0001003f, 0x0001004d, 1}, + {0x00010050, 0x0001005d, 1}, + {0x00010080, 0x000100fa, 1}, + {0x00010100, 0x00010102, 1}, + {0x00010107, 0x00010133, 1}, + {0x00010137, 0x0001018a, 1}, + {0x00010190, 0x0001019b, 1}, + {0x000101d0, 0x000101fd, 1}, + {0x00010280, 0x0001029c, 1}, + {0x000102a0, 0x000102d0, 1}, + {0x00010300, 0x0001031e, 1}, + {0x00010320, 0x00010323, 1}, + {0x00010330, 0x0001034a, 1}, + {0x00010380, 0x0001039d, 1}, + {0x0001039f, 0x000103c3, 1}, + {0x000103c8, 0x000103d5, 1}, + {0x00010400, 0x0001049d, 1}, + {0x000104a0, 0x000104a9, 1}, + {0x00010800, 0x00010805, 1}, + {0x00010808, 0x0001080a, 2}, + {0x0001080b, 0x00010835, 1}, + {0x00010837, 0x00010838, 1}, + {0x0001083c, 0x0001083f, 3}, + {0x00010900, 0x00010919, 1}, + {0x0001091f, 0x00010939, 1}, + {0x0001093f, 0x00010a00, 193}, + {0x00010a01, 0x00010a03, 1}, + {0x00010a05, 0x00010a06, 1}, + {0x00010a0c, 0x00010a13, 1}, + {0x00010a15, 0x00010a17, 1}, + {0x00010a19, 0x00010a33, 1}, + {0x00010a38, 0x00010a3a, 1}, + {0x00010a3f, 0x00010a47, 1}, + {0x00010a50, 0x00010a58, 1}, + {0x00012000, 0x0001236e, 1}, + {0x00012400, 0x00012462, 1}, + {0x00012470, 0x00012473, 1}, + {0x0001d000, 0x0001d0f5, 1}, + {0x0001d100, 0x0001d126, 1}, + {0x0001d129, 0x0001d1dd, 1}, + {0x0001d200, 0x0001d245, 1}, + {0x0001d300, 0x0001d356, 1}, + {0x0001d360, 0x0001d371, 1}, + {0x0001d400, 0x0001d454, 1}, + {0x0001d456, 0x0001d49c, 1}, + {0x0001d49e, 0x0001d49f, 1}, + {0x0001d4a2, 0x0001d4a5, 3}, + {0x0001d4a6, 0x0001d4a9, 3}, + {0x0001d4aa, 0x0001d4ac, 1}, + {0x0001d4ae, 0x0001d4b9, 1}, + {0x0001d4bb, 0x0001d4bd, 2}, + {0x0001d4be, 0x0001d4c3, 1}, + {0x0001d4c5, 0x0001d505, 1}, + {0x0001d507, 0x0001d50a, 1}, + {0x0001d50d, 0x0001d514, 1}, + {0x0001d516, 0x0001d51c, 1}, + {0x0001d51e, 0x0001d539, 1}, + {0x0001d53b, 0x0001d53e, 1}, + {0x0001d540, 0x0001d544, 1}, + {0x0001d546, 0x0001d54a, 4}, + {0x0001d54b, 0x0001d550, 1}, + {0x0001d552, 0x0001d6a5, 1}, + {0x0001d6a8, 0x0001d7cb, 1}, + {0x0001d7ce, 0x0001d7ff, 1}, + {0x0001f000, 0x0001f02b, 1}, + {0x0001f030, 0x0001f093, 1}, + {0x00020000, 0x0002a6d6, 1}, + {0x0002f800, 0x0002fa1d, 1}, + {0x000e0001, 0x000e0020, 31}, + {0x000e0021, 0x000e007f, 1}, + {0x000e0100, 0x000e01ef, 1}, + {0x000f0000, 0x000ffffd, 1}, + {0x00100000, 0x0010fffd, 1}, + }, + LatinOffset: 0, +} + +// size 3518 bytes (3 KiB) +var assigned5_2_0 = &unicode.RangeTable{ + R16: []unicode.Range16{ + {0x0000, 0x0377, 1}, + {0x037a, 0x037e, 1}, + {0x0384, 0x038a, 1}, + {0x038c, 0x038e, 2}, + {0x038f, 0x03a1, 1}, + {0x03a3, 0x0525, 1}, + {0x0531, 0x0556, 1}, + {0x0559, 0x055f, 1}, + {0x0561, 0x0587, 1}, + {0x0589, 0x058a, 1}, + {0x0591, 0x05c7, 1}, + {0x05d0, 0x05ea, 1}, + {0x05f0, 0x05f4, 1}, + {0x0600, 0x0603, 1}, + {0x0606, 0x061b, 1}, + {0x061e, 0x061f, 1}, + {0x0621, 0x065e, 1}, + {0x0660, 0x070d, 1}, + {0x070f, 0x074a, 1}, + {0x074d, 0x07b1, 1}, + {0x07c0, 0x07fa, 1}, + {0x0800, 0x082d, 1}, + {0x0830, 0x083e, 1}, + {0x0900, 0x0939, 1}, + {0x093c, 0x094e, 1}, + {0x0950, 0x0955, 1}, + {0x0958, 0x0972, 1}, + {0x0979, 0x097f, 1}, + {0x0981, 0x0983, 1}, + {0x0985, 0x098c, 1}, + {0x098f, 0x0990, 1}, + {0x0993, 0x09a8, 1}, + {0x09aa, 0x09b0, 1}, + {0x09b2, 0x09b6, 4}, + {0x09b7, 0x09b9, 1}, + {0x09bc, 0x09c4, 1}, + {0x09c7, 0x09c8, 1}, + {0x09cb, 0x09ce, 1}, + {0x09d7, 0x09dc, 5}, + {0x09dd, 0x09df, 2}, + {0x09e0, 0x09e3, 1}, + {0x09e6, 0x09fb, 1}, + {0x0a01, 0x0a03, 1}, + {0x0a05, 0x0a0a, 1}, + {0x0a0f, 0x0a10, 1}, + {0x0a13, 0x0a28, 1}, + {0x0a2a, 0x0a30, 1}, + {0x0a32, 0x0a33, 1}, + {0x0a35, 0x0a36, 1}, + {0x0a38, 0x0a39, 1}, + {0x0a3c, 0x0a3e, 2}, + {0x0a3f, 0x0a42, 1}, + {0x0a47, 0x0a48, 1}, + {0x0a4b, 0x0a4d, 1}, + {0x0a51, 0x0a59, 8}, + {0x0a5a, 0x0a5c, 1}, + {0x0a5e, 0x0a66, 8}, + {0x0a67, 0x0a75, 1}, + {0x0a81, 0x0a83, 1}, + {0x0a85, 0x0a8d, 1}, + {0x0a8f, 0x0a91, 1}, + {0x0a93, 0x0aa8, 1}, + {0x0aaa, 0x0ab0, 1}, + {0x0ab2, 0x0ab3, 1}, + {0x0ab5, 0x0ab9, 1}, + {0x0abc, 0x0ac5, 1}, + {0x0ac7, 0x0ac9, 1}, + {0x0acb, 0x0acd, 1}, + {0x0ad0, 0x0ae0, 16}, + {0x0ae1, 0x0ae3, 1}, + {0x0ae6, 0x0aef, 1}, + {0x0af1, 0x0b01, 16}, + {0x0b02, 0x0b03, 1}, + {0x0b05, 0x0b0c, 1}, + {0x0b0f, 0x0b10, 1}, + {0x0b13, 0x0b28, 1}, + {0x0b2a, 0x0b30, 1}, + {0x0b32, 0x0b33, 1}, + {0x0b35, 0x0b39, 1}, + {0x0b3c, 0x0b44, 1}, + {0x0b47, 0x0b48, 1}, + {0x0b4b, 0x0b4d, 1}, + {0x0b56, 0x0b57, 1}, + {0x0b5c, 0x0b5d, 1}, + {0x0b5f, 0x0b63, 1}, + {0x0b66, 0x0b71, 1}, + {0x0b82, 0x0b83, 1}, + {0x0b85, 0x0b8a, 1}, + {0x0b8e, 0x0b90, 1}, + {0x0b92, 0x0b95, 1}, + {0x0b99, 0x0b9a, 1}, + {0x0b9c, 0x0b9e, 2}, + {0x0b9f, 0x0ba3, 4}, + {0x0ba4, 0x0ba8, 4}, + {0x0ba9, 0x0baa, 1}, + {0x0bae, 0x0bb9, 1}, + {0x0bbe, 0x0bc2, 1}, + {0x0bc6, 0x0bc8, 1}, + {0x0bca, 0x0bcd, 1}, + {0x0bd0, 0x0bd7, 7}, + {0x0be6, 0x0bfa, 1}, + {0x0c01, 0x0c03, 1}, + {0x0c05, 0x0c0c, 1}, + {0x0c0e, 0x0c10, 1}, + {0x0c12, 0x0c28, 1}, + {0x0c2a, 0x0c33, 1}, + {0x0c35, 0x0c39, 1}, + {0x0c3d, 0x0c44, 1}, + {0x0c46, 0x0c48, 1}, + {0x0c4a, 0x0c4d, 1}, + {0x0c55, 0x0c56, 1}, + {0x0c58, 0x0c59, 1}, + {0x0c60, 0x0c63, 1}, + {0x0c66, 0x0c6f, 1}, + {0x0c78, 0x0c7f, 1}, + {0x0c82, 0x0c83, 1}, + {0x0c85, 0x0c8c, 1}, + {0x0c8e, 0x0c90, 1}, + {0x0c92, 0x0ca8, 1}, + {0x0caa, 0x0cb3, 1}, + {0x0cb5, 0x0cb9, 1}, + {0x0cbc, 0x0cc4, 1}, + {0x0cc6, 0x0cc8, 1}, + {0x0cca, 0x0ccd, 1}, + {0x0cd5, 0x0cd6, 1}, + {0x0cde, 0x0ce0, 2}, + {0x0ce1, 0x0ce3, 1}, + {0x0ce6, 0x0cef, 1}, + {0x0cf1, 0x0cf2, 1}, + {0x0d02, 0x0d03, 1}, + {0x0d05, 0x0d0c, 1}, + {0x0d0e, 0x0d10, 1}, + {0x0d12, 0x0d28, 1}, + {0x0d2a, 0x0d39, 1}, + {0x0d3d, 0x0d44, 1}, + {0x0d46, 0x0d48, 1}, + {0x0d4a, 0x0d4d, 1}, + {0x0d57, 0x0d60, 9}, + {0x0d61, 0x0d63, 1}, + {0x0d66, 0x0d75, 1}, + {0x0d79, 0x0d7f, 1}, + {0x0d82, 0x0d83, 1}, + {0x0d85, 0x0d96, 1}, + {0x0d9a, 0x0db1, 1}, + {0x0db3, 0x0dbb, 1}, + {0x0dbd, 0x0dc0, 3}, + {0x0dc1, 0x0dc6, 1}, + {0x0dca, 0x0dcf, 5}, + {0x0dd0, 0x0dd4, 1}, + {0x0dd6, 0x0dd8, 2}, + {0x0dd9, 0x0ddf, 1}, + {0x0df2, 0x0df4, 1}, + {0x0e01, 0x0e3a, 1}, + {0x0e3f, 0x0e5b, 1}, + {0x0e81, 0x0e82, 1}, + {0x0e84, 0x0e87, 3}, + {0x0e88, 0x0e8a, 2}, + {0x0e8d, 0x0e94, 7}, + {0x0e95, 0x0e97, 1}, + {0x0e99, 0x0e9f, 1}, + {0x0ea1, 0x0ea3, 1}, + {0x0ea5, 0x0ea7, 2}, + {0x0eaa, 0x0eab, 1}, + {0x0ead, 0x0eb9, 1}, + {0x0ebb, 0x0ebd, 1}, + {0x0ec0, 0x0ec4, 1}, + {0x0ec6, 0x0ec8, 2}, + {0x0ec9, 0x0ecd, 1}, + {0x0ed0, 0x0ed9, 1}, + {0x0edc, 0x0edd, 1}, + {0x0f00, 0x0f47, 1}, + {0x0f49, 0x0f6c, 1}, + {0x0f71, 0x0f8b, 1}, + {0x0f90, 0x0f97, 1}, + {0x0f99, 0x0fbc, 1}, + {0x0fbe, 0x0fcc, 1}, + {0x0fce, 0x0fd8, 1}, + {0x1000, 0x10c5, 1}, + {0x10d0, 0x10fc, 1}, + {0x1100, 0x1248, 1}, + {0x124a, 0x124d, 1}, + {0x1250, 0x1256, 1}, + {0x1258, 0x125a, 2}, + {0x125b, 0x125d, 1}, + {0x1260, 0x1288, 1}, + {0x128a, 0x128d, 1}, + {0x1290, 0x12b0, 1}, + {0x12b2, 0x12b5, 1}, + {0x12b8, 0x12be, 1}, + {0x12c0, 0x12c2, 2}, + {0x12c3, 0x12c5, 1}, + {0x12c8, 0x12d6, 1}, + {0x12d8, 0x1310, 1}, + {0x1312, 0x1315, 1}, + {0x1318, 0x135a, 1}, + {0x135f, 0x137c, 1}, + {0x1380, 0x1399, 1}, + {0x13a0, 0x13f4, 1}, + {0x1400, 0x169c, 1}, + {0x16a0, 0x16f0, 1}, + {0x1700, 0x170c, 1}, + {0x170e, 0x1714, 1}, + {0x1720, 0x1736, 1}, + {0x1740, 0x1753, 1}, + {0x1760, 0x176c, 1}, + {0x176e, 0x1770, 1}, + {0x1772, 0x1773, 1}, + {0x1780, 0x17dd, 1}, + {0x17e0, 0x17e9, 1}, + {0x17f0, 0x17f9, 1}, + {0x1800, 0x180e, 1}, + {0x1810, 0x1819, 1}, + {0x1820, 0x1877, 1}, + {0x1880, 0x18aa, 1}, + {0x18b0, 0x18f5, 1}, + {0x1900, 0x191c, 1}, + {0x1920, 0x192b, 1}, + {0x1930, 0x193b, 1}, + {0x1940, 0x1944, 4}, + {0x1945, 0x196d, 1}, + {0x1970, 0x1974, 1}, + {0x1980, 0x19ab, 1}, + {0x19b0, 0x19c9, 1}, + {0x19d0, 0x19da, 1}, + {0x19de, 0x1a1b, 1}, + {0x1a1e, 0x1a5e, 1}, + {0x1a60, 0x1a7c, 1}, + {0x1a7f, 0x1a89, 1}, + {0x1a90, 0x1a99, 1}, + {0x1aa0, 0x1aad, 1}, + {0x1b00, 0x1b4b, 1}, + {0x1b50, 0x1b7c, 1}, + {0x1b80, 0x1baa, 1}, + {0x1bae, 0x1bb9, 1}, + {0x1c00, 0x1c37, 1}, + {0x1c3b, 0x1c49, 1}, + {0x1c4d, 0x1c7f, 1}, + {0x1cd0, 0x1cf2, 1}, + {0x1d00, 0x1de6, 1}, + {0x1dfd, 0x1f15, 1}, + {0x1f18, 0x1f1d, 1}, + {0x1f20, 0x1f45, 1}, + {0x1f48, 0x1f4d, 1}, + {0x1f50, 0x1f57, 1}, + {0x1f59, 0x1f5f, 2}, + {0x1f60, 0x1f7d, 1}, + {0x1f80, 0x1fb4, 1}, + {0x1fb6, 0x1fc4, 1}, + {0x1fc6, 0x1fd3, 1}, + {0x1fd6, 0x1fdb, 1}, + {0x1fdd, 0x1fef, 1}, + {0x1ff2, 0x1ff4, 1}, + {0x1ff6, 0x1ffe, 1}, + {0x2000, 0x2064, 1}, + {0x206a, 0x2071, 1}, + {0x2074, 0x208e, 1}, + {0x2090, 0x2094, 1}, + {0x20a0, 0x20b8, 1}, + {0x20d0, 0x20f0, 1}, + {0x2100, 0x2189, 1}, + {0x2190, 0x23e8, 1}, + {0x2400, 0x2426, 1}, + {0x2440, 0x244a, 1}, + {0x2460, 0x26cd, 1}, + {0x26cf, 0x26e1, 1}, + {0x26e3, 0x26e8, 5}, + {0x26e9, 0x26ff, 1}, + {0x2701, 0x2704, 1}, + {0x2706, 0x2709, 1}, + {0x270c, 0x2727, 1}, + {0x2729, 0x274b, 1}, + {0x274d, 0x274f, 2}, + {0x2750, 0x2752, 1}, + {0x2756, 0x275e, 1}, + {0x2761, 0x2794, 1}, + {0x2798, 0x27af, 1}, + {0x27b1, 0x27be, 1}, + {0x27c0, 0x27ca, 1}, + {0x27cc, 0x27d0, 4}, + {0x27d1, 0x2b4c, 1}, + {0x2b50, 0x2b59, 1}, + {0x2c00, 0x2c2e, 1}, + {0x2c30, 0x2c5e, 1}, + {0x2c60, 0x2cf1, 1}, + {0x2cf9, 0x2d25, 1}, + {0x2d30, 0x2d65, 1}, + {0x2d6f, 0x2d80, 17}, + {0x2d81, 0x2d96, 1}, + {0x2da0, 0x2da6, 1}, + {0x2da8, 0x2dae, 1}, + {0x2db0, 0x2db6, 1}, + {0x2db8, 0x2dbe, 1}, + {0x2dc0, 0x2dc6, 1}, + {0x2dc8, 0x2dce, 1}, + {0x2dd0, 0x2dd6, 1}, + {0x2dd8, 0x2dde, 1}, + {0x2de0, 0x2e31, 1}, + {0x2e80, 0x2e99, 1}, + {0x2e9b, 0x2ef3, 1}, + {0x2f00, 0x2fd5, 1}, + {0x2ff0, 0x2ffb, 1}, + {0x3000, 0x303f, 1}, + {0x3041, 0x3096, 1}, + {0x3099, 0x30ff, 1}, + {0x3105, 0x312d, 1}, + {0x3131, 0x318e, 1}, + {0x3190, 0x31b7, 1}, + {0x31c0, 0x31e3, 1}, + {0x31f0, 0x321e, 1}, + {0x3220, 0x32fe, 1}, + {0x3300, 0x4db5, 1}, + {0x4dc0, 0x9fcb, 1}, + {0xa000, 0xa48c, 1}, + {0xa490, 0xa4c6, 1}, + {0xa4d0, 0xa62b, 1}, + {0xa640, 0xa65f, 1}, + {0xa662, 0xa673, 1}, + {0xa67c, 0xa697, 1}, + {0xa6a0, 0xa6f7, 1}, + {0xa700, 0xa78c, 1}, + {0xa7fb, 0xa82b, 1}, + {0xa830, 0xa839, 1}, + {0xa840, 0xa877, 1}, + {0xa880, 0xa8c4, 1}, + {0xa8ce, 0xa8d9, 1}, + {0xa8e0, 0xa8fb, 1}, + {0xa900, 0xa953, 1}, + {0xa95f, 0xa97c, 1}, + {0xa980, 0xa9cd, 1}, + {0xa9cf, 0xa9d9, 1}, + {0xa9de, 0xa9df, 1}, + {0xaa00, 0xaa36, 1}, + {0xaa40, 0xaa4d, 1}, + {0xaa50, 0xaa59, 1}, + {0xaa5c, 0xaa7b, 1}, + {0xaa80, 0xaac2, 1}, + {0xaadb, 0xaadf, 1}, + {0xabc0, 0xabed, 1}, + {0xabf0, 0xabf9, 1}, + {0xac00, 0xd7a3, 1}, + {0xd7b0, 0xd7c6, 1}, + {0xd7cb, 0xd7fb, 1}, + {0xd800, 0xfa2d, 1}, + {0xfa30, 0xfa6d, 1}, + {0xfa70, 0xfad9, 1}, + {0xfb00, 0xfb06, 1}, + {0xfb13, 0xfb17, 1}, + {0xfb1d, 0xfb36, 1}, + {0xfb38, 0xfb3c, 1}, + {0xfb3e, 0xfb40, 2}, + {0xfb41, 0xfb43, 2}, + {0xfb44, 0xfb46, 2}, + {0xfb47, 0xfbb1, 1}, + {0xfbd3, 0xfd3f, 1}, + {0xfd50, 0xfd8f, 1}, + {0xfd92, 0xfdc7, 1}, + {0xfdf0, 0xfdfd, 1}, + {0xfe00, 0xfe19, 1}, + {0xfe20, 0xfe26, 1}, + {0xfe30, 0xfe52, 1}, + {0xfe54, 0xfe66, 1}, + {0xfe68, 0xfe6b, 1}, + {0xfe70, 0xfe74, 1}, + {0xfe76, 0xfefc, 1}, + {0xfeff, 0xff01, 2}, + {0xff02, 0xffbe, 1}, + {0xffc2, 0xffc7, 1}, + {0xffca, 0xffcf, 1}, + {0xffd2, 0xffd7, 1}, + {0xffda, 0xffdc, 1}, + {0xffe0, 0xffe6, 1}, + {0xffe8, 0xffee, 1}, + {0xfff9, 0xfffd, 1}, + }, + R32: []unicode.Range32{ + {0x00010000, 0x0001000b, 1}, + {0x0001000d, 0x00010026, 1}, + {0x00010028, 0x0001003a, 1}, + {0x0001003c, 0x0001003d, 1}, + {0x0001003f, 0x0001004d, 1}, + {0x00010050, 0x0001005d, 1}, + {0x00010080, 0x000100fa, 1}, + {0x00010100, 0x00010102, 1}, + {0x00010107, 0x00010133, 1}, + {0x00010137, 0x0001018a, 1}, + {0x00010190, 0x0001019b, 1}, + {0x000101d0, 0x000101fd, 1}, + {0x00010280, 0x0001029c, 1}, + {0x000102a0, 0x000102d0, 1}, + {0x00010300, 0x0001031e, 1}, + {0x00010320, 0x00010323, 1}, + {0x00010330, 0x0001034a, 1}, + {0x00010380, 0x0001039d, 1}, + {0x0001039f, 0x000103c3, 1}, + {0x000103c8, 0x000103d5, 1}, + {0x00010400, 0x0001049d, 1}, + {0x000104a0, 0x000104a9, 1}, + {0x00010800, 0x00010805, 1}, + {0x00010808, 0x0001080a, 2}, + {0x0001080b, 0x00010835, 1}, + {0x00010837, 0x00010838, 1}, + {0x0001083c, 0x0001083f, 3}, + {0x00010840, 0x00010855, 1}, + {0x00010857, 0x0001085f, 1}, + {0x00010900, 0x0001091b, 1}, + {0x0001091f, 0x00010939, 1}, + {0x0001093f, 0x00010a00, 193}, + {0x00010a01, 0x00010a03, 1}, + {0x00010a05, 0x00010a06, 1}, + {0x00010a0c, 0x00010a13, 1}, + {0x00010a15, 0x00010a17, 1}, + {0x00010a19, 0x00010a33, 1}, + {0x00010a38, 0x00010a3a, 1}, + {0x00010a3f, 0x00010a47, 1}, + {0x00010a50, 0x00010a58, 1}, + {0x00010a60, 0x00010a7f, 1}, + {0x00010b00, 0x00010b35, 1}, + {0x00010b39, 0x00010b55, 1}, + {0x00010b58, 0x00010b72, 1}, + {0x00010b78, 0x00010b7f, 1}, + {0x00010c00, 0x00010c48, 1}, + {0x00010e60, 0x00010e7e, 1}, + {0x00011080, 0x000110c1, 1}, + {0x00012000, 0x0001236e, 1}, + {0x00012400, 0x00012462, 1}, + {0x00012470, 0x00012473, 1}, + {0x00013000, 0x0001342e, 1}, + {0x0001d000, 0x0001d0f5, 1}, + {0x0001d100, 0x0001d126, 1}, + {0x0001d129, 0x0001d1dd, 1}, + {0x0001d200, 0x0001d245, 1}, + {0x0001d300, 0x0001d356, 1}, + {0x0001d360, 0x0001d371, 1}, + {0x0001d400, 0x0001d454, 1}, + {0x0001d456, 0x0001d49c, 1}, + {0x0001d49e, 0x0001d49f, 1}, + {0x0001d4a2, 0x0001d4a5, 3}, + {0x0001d4a6, 0x0001d4a9, 3}, + {0x0001d4aa, 0x0001d4ac, 1}, + {0x0001d4ae, 0x0001d4b9, 1}, + {0x0001d4bb, 0x0001d4bd, 2}, + {0x0001d4be, 0x0001d4c3, 1}, + {0x0001d4c5, 0x0001d505, 1}, + {0x0001d507, 0x0001d50a, 1}, + {0x0001d50d, 0x0001d514, 1}, + {0x0001d516, 0x0001d51c, 1}, + {0x0001d51e, 0x0001d539, 1}, + {0x0001d53b, 0x0001d53e, 1}, + {0x0001d540, 0x0001d544, 1}, + {0x0001d546, 0x0001d54a, 4}, + {0x0001d54b, 0x0001d550, 1}, + {0x0001d552, 0x0001d6a5, 1}, + {0x0001d6a8, 0x0001d7cb, 1}, + {0x0001d7ce, 0x0001d7ff, 1}, + {0x0001f000, 0x0001f02b, 1}, + {0x0001f030, 0x0001f093, 1}, + {0x0001f100, 0x0001f10a, 1}, + {0x0001f110, 0x0001f12e, 1}, + {0x0001f131, 0x0001f13d, 12}, + {0x0001f13f, 0x0001f142, 3}, + {0x0001f146, 0x0001f14a, 4}, + {0x0001f14b, 0x0001f14e, 1}, + {0x0001f157, 0x0001f15f, 8}, + {0x0001f179, 0x0001f17b, 2}, + {0x0001f17c, 0x0001f17f, 3}, + {0x0001f18a, 0x0001f18d, 1}, + {0x0001f190, 0x0001f200, 112}, + {0x0001f210, 0x0001f231, 1}, + {0x0001f240, 0x0001f248, 1}, + {0x00020000, 0x0002a6d6, 1}, + {0x0002a700, 0x0002b734, 1}, + {0x0002f800, 0x0002fa1d, 1}, + {0x000e0001, 0x000e0020, 31}, + {0x000e0021, 0x000e007f, 1}, + {0x000e0100, 0x000e01ef, 1}, + {0x000f0000, 0x000ffffd, 1}, + {0x00100000, 0x0010fffd, 1}, + }, + LatinOffset: 0, +} + +// size 3026 bytes (2 KiB) +var assigned5_0_0 = &unicode.RangeTable{ + R16: []unicode.Range16{ + {0x0000, 0x036f, 1}, + {0x0374, 0x0375, 1}, + {0x037a, 0x037e, 1}, + {0x0384, 0x038a, 1}, + {0x038c, 0x038e, 2}, + {0x038f, 0x03a1, 1}, + {0x03a3, 0x03ce, 1}, + {0x03d0, 0x0486, 1}, + {0x0488, 0x0513, 1}, + {0x0531, 0x0556, 1}, + {0x0559, 0x055f, 1}, + {0x0561, 0x0587, 1}, + {0x0589, 0x058a, 1}, + {0x0591, 0x05c7, 1}, + {0x05d0, 0x05ea, 1}, + {0x05f0, 0x05f4, 1}, + {0x0600, 0x0603, 1}, + {0x060b, 0x0615, 1}, + {0x061b, 0x061e, 3}, + {0x061f, 0x0621, 2}, + {0x0622, 0x063a, 1}, + {0x0640, 0x065e, 1}, + {0x0660, 0x070d, 1}, + {0x070f, 0x074a, 1}, + {0x074d, 0x076d, 1}, + {0x0780, 0x07b1, 1}, + {0x07c0, 0x07fa, 1}, + {0x0901, 0x0939, 1}, + {0x093c, 0x094d, 1}, + {0x0950, 0x0954, 1}, + {0x0958, 0x0970, 1}, + {0x097b, 0x097f, 1}, + {0x0981, 0x0983, 1}, + {0x0985, 0x098c, 1}, + {0x098f, 0x0990, 1}, + {0x0993, 0x09a8, 1}, + {0x09aa, 0x09b0, 1}, + {0x09b2, 0x09b6, 4}, + {0x09b7, 0x09b9, 1}, + {0x09bc, 0x09c4, 1}, + {0x09c7, 0x09c8, 1}, + {0x09cb, 0x09ce, 1}, + {0x09d7, 0x09dc, 5}, + {0x09dd, 0x09df, 2}, + {0x09e0, 0x09e3, 1}, + {0x09e6, 0x09fa, 1}, + {0x0a01, 0x0a03, 1}, + {0x0a05, 0x0a0a, 1}, + {0x0a0f, 0x0a10, 1}, + {0x0a13, 0x0a28, 1}, + {0x0a2a, 0x0a30, 1}, + {0x0a32, 0x0a33, 1}, + {0x0a35, 0x0a36, 1}, + {0x0a38, 0x0a39, 1}, + {0x0a3c, 0x0a3e, 2}, + {0x0a3f, 0x0a42, 1}, + {0x0a47, 0x0a48, 1}, + {0x0a4b, 0x0a4d, 1}, + {0x0a59, 0x0a5c, 1}, + {0x0a5e, 0x0a66, 8}, + {0x0a67, 0x0a74, 1}, + {0x0a81, 0x0a83, 1}, + {0x0a85, 0x0a8d, 1}, + {0x0a8f, 0x0a91, 1}, + {0x0a93, 0x0aa8, 1}, + {0x0aaa, 0x0ab0, 1}, + {0x0ab2, 0x0ab3, 1}, + {0x0ab5, 0x0ab9, 1}, + {0x0abc, 0x0ac5, 1}, + {0x0ac7, 0x0ac9, 1}, + {0x0acb, 0x0acd, 1}, + {0x0ad0, 0x0ae0, 16}, + {0x0ae1, 0x0ae3, 1}, + {0x0ae6, 0x0aef, 1}, + {0x0af1, 0x0b01, 16}, + {0x0b02, 0x0b03, 1}, + {0x0b05, 0x0b0c, 1}, + {0x0b0f, 0x0b10, 1}, + {0x0b13, 0x0b28, 1}, + {0x0b2a, 0x0b30, 1}, + {0x0b32, 0x0b33, 1}, + {0x0b35, 0x0b39, 1}, + {0x0b3c, 0x0b43, 1}, + {0x0b47, 0x0b48, 1}, + {0x0b4b, 0x0b4d, 1}, + {0x0b56, 0x0b57, 1}, + {0x0b5c, 0x0b5d, 1}, + {0x0b5f, 0x0b61, 1}, + {0x0b66, 0x0b71, 1}, + {0x0b82, 0x0b83, 1}, + {0x0b85, 0x0b8a, 1}, + {0x0b8e, 0x0b90, 1}, + {0x0b92, 0x0b95, 1}, + {0x0b99, 0x0b9a, 1}, + {0x0b9c, 0x0b9e, 2}, + {0x0b9f, 0x0ba3, 4}, + {0x0ba4, 0x0ba8, 4}, + {0x0ba9, 0x0baa, 1}, + {0x0bae, 0x0bb9, 1}, + {0x0bbe, 0x0bc2, 1}, + {0x0bc6, 0x0bc8, 1}, + {0x0bca, 0x0bcd, 1}, + {0x0bd7, 0x0be6, 15}, + {0x0be7, 0x0bfa, 1}, + {0x0c01, 0x0c03, 1}, + {0x0c05, 0x0c0c, 1}, + {0x0c0e, 0x0c10, 1}, + {0x0c12, 0x0c28, 1}, + {0x0c2a, 0x0c33, 1}, + {0x0c35, 0x0c39, 1}, + {0x0c3e, 0x0c44, 1}, + {0x0c46, 0x0c48, 1}, + {0x0c4a, 0x0c4d, 1}, + {0x0c55, 0x0c56, 1}, + {0x0c60, 0x0c61, 1}, + {0x0c66, 0x0c6f, 1}, + {0x0c82, 0x0c83, 1}, + {0x0c85, 0x0c8c, 1}, + {0x0c8e, 0x0c90, 1}, + {0x0c92, 0x0ca8, 1}, + {0x0caa, 0x0cb3, 1}, + {0x0cb5, 0x0cb9, 1}, + {0x0cbc, 0x0cc4, 1}, + {0x0cc6, 0x0cc8, 1}, + {0x0cca, 0x0ccd, 1}, + {0x0cd5, 0x0cd6, 1}, + {0x0cde, 0x0ce0, 2}, + {0x0ce1, 0x0ce3, 1}, + {0x0ce6, 0x0cef, 1}, + {0x0cf1, 0x0cf2, 1}, + {0x0d02, 0x0d03, 1}, + {0x0d05, 0x0d0c, 1}, + {0x0d0e, 0x0d10, 1}, + {0x0d12, 0x0d28, 1}, + {0x0d2a, 0x0d39, 1}, + {0x0d3e, 0x0d43, 1}, + {0x0d46, 0x0d48, 1}, + {0x0d4a, 0x0d4d, 1}, + {0x0d57, 0x0d60, 9}, + {0x0d61, 0x0d66, 5}, + {0x0d67, 0x0d6f, 1}, + {0x0d82, 0x0d83, 1}, + {0x0d85, 0x0d96, 1}, + {0x0d9a, 0x0db1, 1}, + {0x0db3, 0x0dbb, 1}, + {0x0dbd, 0x0dc0, 3}, + {0x0dc1, 0x0dc6, 1}, + {0x0dca, 0x0dcf, 5}, + {0x0dd0, 0x0dd4, 1}, + {0x0dd6, 0x0dd8, 2}, + {0x0dd9, 0x0ddf, 1}, + {0x0df2, 0x0df4, 1}, + {0x0e01, 0x0e3a, 1}, + {0x0e3f, 0x0e5b, 1}, + {0x0e81, 0x0e82, 1}, + {0x0e84, 0x0e87, 3}, + {0x0e88, 0x0e8a, 2}, + {0x0e8d, 0x0e94, 7}, + {0x0e95, 0x0e97, 1}, + {0x0e99, 0x0e9f, 1}, + {0x0ea1, 0x0ea3, 1}, + {0x0ea5, 0x0ea7, 2}, + {0x0eaa, 0x0eab, 1}, + {0x0ead, 0x0eb9, 1}, + {0x0ebb, 0x0ebd, 1}, + {0x0ec0, 0x0ec4, 1}, + {0x0ec6, 0x0ec8, 2}, + {0x0ec9, 0x0ecd, 1}, + {0x0ed0, 0x0ed9, 1}, + {0x0edc, 0x0edd, 1}, + {0x0f00, 0x0f47, 1}, + {0x0f49, 0x0f6a, 1}, + {0x0f71, 0x0f8b, 1}, + {0x0f90, 0x0f97, 1}, + {0x0f99, 0x0fbc, 1}, + {0x0fbe, 0x0fcc, 1}, + {0x0fcf, 0x0fd1, 1}, + {0x1000, 0x1021, 1}, + {0x1023, 0x1027, 1}, + {0x1029, 0x102a, 1}, + {0x102c, 0x1032, 1}, + {0x1036, 0x1039, 1}, + {0x1040, 0x1059, 1}, + {0x10a0, 0x10c5, 1}, + {0x10d0, 0x10fc, 1}, + {0x1100, 0x1159, 1}, + {0x115f, 0x11a2, 1}, + {0x11a8, 0x11f9, 1}, + {0x1200, 0x1248, 1}, + {0x124a, 0x124d, 1}, + {0x1250, 0x1256, 1}, + {0x1258, 0x125a, 2}, + {0x125b, 0x125d, 1}, + {0x1260, 0x1288, 1}, + {0x128a, 0x128d, 1}, + {0x1290, 0x12b0, 1}, + {0x12b2, 0x12b5, 1}, + {0x12b8, 0x12be, 1}, + {0x12c0, 0x12c2, 2}, + {0x12c3, 0x12c5, 1}, + {0x12c8, 0x12d6, 1}, + {0x12d8, 0x1310, 1}, + {0x1312, 0x1315, 1}, + {0x1318, 0x135a, 1}, + {0x135f, 0x137c, 1}, + {0x1380, 0x1399, 1}, + {0x13a0, 0x13f4, 1}, + {0x1401, 0x1676, 1}, + {0x1680, 0x169c, 1}, + {0x16a0, 0x16f0, 1}, + {0x1700, 0x170c, 1}, + {0x170e, 0x1714, 1}, + {0x1720, 0x1736, 1}, + {0x1740, 0x1753, 1}, + {0x1760, 0x176c, 1}, + {0x176e, 0x1770, 1}, + {0x1772, 0x1773, 1}, + {0x1780, 0x17dd, 1}, + {0x17e0, 0x17e9, 1}, + {0x17f0, 0x17f9, 1}, + {0x1800, 0x180e, 1}, + {0x1810, 0x1819, 1}, + {0x1820, 0x1877, 1}, + {0x1880, 0x18a9, 1}, + {0x1900, 0x191c, 1}, + {0x1920, 0x192b, 1}, + {0x1930, 0x193b, 1}, + {0x1940, 0x1944, 4}, + {0x1945, 0x196d, 1}, + {0x1970, 0x1974, 1}, + {0x1980, 0x19a9, 1}, + {0x19b0, 0x19c9, 1}, + {0x19d0, 0x19d9, 1}, + {0x19de, 0x1a1b, 1}, + {0x1a1e, 0x1a1f, 1}, + {0x1b00, 0x1b4b, 1}, + {0x1b50, 0x1b7c, 1}, + {0x1d00, 0x1dca, 1}, + {0x1dfe, 0x1e9b, 1}, + {0x1ea0, 0x1ef9, 1}, + {0x1f00, 0x1f15, 1}, + {0x1f18, 0x1f1d, 1}, + {0x1f20, 0x1f45, 1}, + {0x1f48, 0x1f4d, 1}, + {0x1f50, 0x1f57, 1}, + {0x1f59, 0x1f5f, 2}, + {0x1f60, 0x1f7d, 1}, + {0x1f80, 0x1fb4, 1}, + {0x1fb6, 0x1fc4, 1}, + {0x1fc6, 0x1fd3, 1}, + {0x1fd6, 0x1fdb, 1}, + {0x1fdd, 0x1fef, 1}, + {0x1ff2, 0x1ff4, 1}, + {0x1ff6, 0x1ffe, 1}, + {0x2000, 0x2063, 1}, + {0x206a, 0x2071, 1}, + {0x2074, 0x208e, 1}, + {0x2090, 0x2094, 1}, + {0x20a0, 0x20b5, 1}, + {0x20d0, 0x20ef, 1}, + {0x2100, 0x214e, 1}, + {0x2153, 0x2184, 1}, + {0x2190, 0x23e7, 1}, + {0x2400, 0x2426, 1}, + {0x2440, 0x244a, 1}, + {0x2460, 0x269c, 1}, + {0x26a0, 0x26b2, 1}, + {0x2701, 0x2704, 1}, + {0x2706, 0x2709, 1}, + {0x270c, 0x2727, 1}, + {0x2729, 0x274b, 1}, + {0x274d, 0x274f, 2}, + {0x2750, 0x2752, 1}, + {0x2756, 0x2758, 2}, + {0x2759, 0x275e, 1}, + {0x2761, 0x2794, 1}, + {0x2798, 0x27af, 1}, + {0x27b1, 0x27be, 1}, + {0x27c0, 0x27ca, 1}, + {0x27d0, 0x27eb, 1}, + {0x27f0, 0x2b1a, 1}, + {0x2b20, 0x2b23, 1}, + {0x2c00, 0x2c2e, 1}, + {0x2c30, 0x2c5e, 1}, + {0x2c60, 0x2c6c, 1}, + {0x2c74, 0x2c77, 1}, + {0x2c80, 0x2cea, 1}, + {0x2cf9, 0x2d25, 1}, + {0x2d30, 0x2d65, 1}, + {0x2d6f, 0x2d80, 17}, + {0x2d81, 0x2d96, 1}, + {0x2da0, 0x2da6, 1}, + {0x2da8, 0x2dae, 1}, + {0x2db0, 0x2db6, 1}, + {0x2db8, 0x2dbe, 1}, + {0x2dc0, 0x2dc6, 1}, + {0x2dc8, 0x2dce, 1}, + {0x2dd0, 0x2dd6, 1}, + {0x2dd8, 0x2dde, 1}, + {0x2e00, 0x2e17, 1}, + {0x2e1c, 0x2e1d, 1}, + {0x2e80, 0x2e99, 1}, + {0x2e9b, 0x2ef3, 1}, + {0x2f00, 0x2fd5, 1}, + {0x2ff0, 0x2ffb, 1}, + {0x3000, 0x303f, 1}, + {0x3041, 0x3096, 1}, + {0x3099, 0x30ff, 1}, + {0x3105, 0x312c, 1}, + {0x3131, 0x318e, 1}, + {0x3190, 0x31b7, 1}, + {0x31c0, 0x31cf, 1}, + {0x31f0, 0x321e, 1}, + {0x3220, 0x3243, 1}, + {0x3250, 0x32fe, 1}, + {0x3300, 0x4db5, 1}, + {0x4dc0, 0x9fbb, 1}, + {0xa000, 0xa48c, 1}, + {0xa490, 0xa4c6, 1}, + {0xa700, 0xa71a, 1}, + {0xa720, 0xa721, 1}, + {0xa800, 0xa82b, 1}, + {0xa840, 0xa877, 1}, + {0xac00, 0xd7a3, 1}, + {0xd800, 0xfa2d, 1}, + {0xfa30, 0xfa6a, 1}, + {0xfa70, 0xfad9, 1}, + {0xfb00, 0xfb06, 1}, + {0xfb13, 0xfb17, 1}, + {0xfb1d, 0xfb36, 1}, + {0xfb38, 0xfb3c, 1}, + {0xfb3e, 0xfb40, 2}, + {0xfb41, 0xfb43, 2}, + {0xfb44, 0xfb46, 2}, + {0xfb47, 0xfbb1, 1}, + {0xfbd3, 0xfd3f, 1}, + {0xfd50, 0xfd8f, 1}, + {0xfd92, 0xfdc7, 1}, + {0xfdf0, 0xfdfd, 1}, + {0xfe00, 0xfe19, 1}, + {0xfe20, 0xfe23, 1}, + {0xfe30, 0xfe52, 1}, + {0xfe54, 0xfe66, 1}, + {0xfe68, 0xfe6b, 1}, + {0xfe70, 0xfe74, 1}, + {0xfe76, 0xfefc, 1}, + {0xfeff, 0xff01, 2}, + {0xff02, 0xffbe, 1}, + {0xffc2, 0xffc7, 1}, + {0xffca, 0xffcf, 1}, + {0xffd2, 0xffd7, 1}, + {0xffda, 0xffdc, 1}, + {0xffe0, 0xffe6, 1}, + {0xffe8, 0xffee, 1}, + {0xfff9, 0xfffd, 1}, + }, + R32: []unicode.Range32{ + {0x00010000, 0x0001000b, 1}, + {0x0001000d, 0x00010026, 1}, + {0x00010028, 0x0001003a, 1}, + {0x0001003c, 0x0001003d, 1}, + {0x0001003f, 0x0001004d, 1}, + {0x00010050, 0x0001005d, 1}, + {0x00010080, 0x000100fa, 1}, + {0x00010100, 0x00010102, 1}, + {0x00010107, 0x00010133, 1}, + {0x00010137, 0x0001018a, 1}, + {0x00010300, 0x0001031e, 1}, + {0x00010320, 0x00010323, 1}, + {0x00010330, 0x0001034a, 1}, + {0x00010380, 0x0001039d, 1}, + {0x0001039f, 0x000103c3, 1}, + {0x000103c8, 0x000103d5, 1}, + {0x00010400, 0x0001049d, 1}, + {0x000104a0, 0x000104a9, 1}, + {0x00010800, 0x00010805, 1}, + {0x00010808, 0x0001080a, 2}, + {0x0001080b, 0x00010835, 1}, + {0x00010837, 0x00010838, 1}, + {0x0001083c, 0x0001083f, 3}, + {0x00010900, 0x00010919, 1}, + {0x0001091f, 0x00010a00, 225}, + {0x00010a01, 0x00010a03, 1}, + {0x00010a05, 0x00010a06, 1}, + {0x00010a0c, 0x00010a13, 1}, + {0x00010a15, 0x00010a17, 1}, + {0x00010a19, 0x00010a33, 1}, + {0x00010a38, 0x00010a3a, 1}, + {0x00010a3f, 0x00010a47, 1}, + {0x00010a50, 0x00010a58, 1}, + {0x00012000, 0x0001236e, 1}, + {0x00012400, 0x00012462, 1}, + {0x00012470, 0x00012473, 1}, + {0x0001d000, 0x0001d0f5, 1}, + {0x0001d100, 0x0001d126, 1}, + {0x0001d12a, 0x0001d1dd, 1}, + {0x0001d200, 0x0001d245, 1}, + {0x0001d300, 0x0001d356, 1}, + {0x0001d360, 0x0001d371, 1}, + {0x0001d400, 0x0001d454, 1}, + {0x0001d456, 0x0001d49c, 1}, + {0x0001d49e, 0x0001d49f, 1}, + {0x0001d4a2, 0x0001d4a5, 3}, + {0x0001d4a6, 0x0001d4a9, 3}, + {0x0001d4aa, 0x0001d4ac, 1}, + {0x0001d4ae, 0x0001d4b9, 1}, + {0x0001d4bb, 0x0001d4bd, 2}, + {0x0001d4be, 0x0001d4c3, 1}, + {0x0001d4c5, 0x0001d505, 1}, + {0x0001d507, 0x0001d50a, 1}, + {0x0001d50d, 0x0001d514, 1}, + {0x0001d516, 0x0001d51c, 1}, + {0x0001d51e, 0x0001d539, 1}, + {0x0001d53b, 0x0001d53e, 1}, + {0x0001d540, 0x0001d544, 1}, + {0x0001d546, 0x0001d54a, 4}, + {0x0001d54b, 0x0001d550, 1}, + {0x0001d552, 0x0001d6a5, 1}, + {0x0001d6a8, 0x0001d7cb, 1}, + {0x0001d7ce, 0x0001d7ff, 1}, + {0x00020000, 0x0002a6d6, 1}, + {0x0002f800, 0x0002fa1d, 1}, + {0x000e0001, 0x000e0020, 31}, + {0x000e0021, 0x000e007f, 1}, + {0x000e0100, 0x000e01ef, 1}, + {0x000f0000, 0x000ffffd, 1}, + {0x00100000, 0x0010fffd, 1}, + }, + LatinOffset: 0, +} + +// size 4160 bytes (4 KiB) +var assigned6_1_0 = &unicode.RangeTable{ + R16: []unicode.Range16{ + {0x0000, 0x0377, 1}, + {0x037a, 0x037e, 1}, + {0x0384, 0x038a, 1}, + {0x038c, 0x038e, 2}, + {0x038f, 0x03a1, 1}, + {0x03a3, 0x0527, 1}, + {0x0531, 0x0556, 1}, + {0x0559, 0x055f, 1}, + {0x0561, 0x0587, 1}, + {0x0589, 0x058a, 1}, + {0x058f, 0x0591, 2}, + {0x0592, 0x05c7, 1}, + {0x05d0, 0x05ea, 1}, + {0x05f0, 0x05f4, 1}, + {0x0600, 0x0604, 1}, + {0x0606, 0x061b, 1}, + {0x061e, 0x070d, 1}, + {0x070f, 0x074a, 1}, + {0x074d, 0x07b1, 1}, + {0x07c0, 0x07fa, 1}, + {0x0800, 0x082d, 1}, + {0x0830, 0x083e, 1}, + {0x0840, 0x085b, 1}, + {0x085e, 0x08a0, 66}, + {0x08a2, 0x08ac, 1}, + {0x08e4, 0x08fe, 1}, + {0x0900, 0x0977, 1}, + {0x0979, 0x097f, 1}, + {0x0981, 0x0983, 1}, + {0x0985, 0x098c, 1}, + {0x098f, 0x0990, 1}, + {0x0993, 0x09a8, 1}, + {0x09aa, 0x09b0, 1}, + {0x09b2, 0x09b6, 4}, + {0x09b7, 0x09b9, 1}, + {0x09bc, 0x09c4, 1}, + {0x09c7, 0x09c8, 1}, + {0x09cb, 0x09ce, 1}, + {0x09d7, 0x09dc, 5}, + {0x09dd, 0x09df, 2}, + {0x09e0, 0x09e3, 1}, + {0x09e6, 0x09fb, 1}, + {0x0a01, 0x0a03, 1}, + {0x0a05, 0x0a0a, 1}, + {0x0a0f, 0x0a10, 1}, + {0x0a13, 0x0a28, 1}, + {0x0a2a, 0x0a30, 1}, + {0x0a32, 0x0a33, 1}, + {0x0a35, 0x0a36, 1}, + {0x0a38, 0x0a39, 1}, + {0x0a3c, 0x0a3e, 2}, + {0x0a3f, 0x0a42, 1}, + {0x0a47, 0x0a48, 1}, + {0x0a4b, 0x0a4d, 1}, + {0x0a51, 0x0a59, 8}, + {0x0a5a, 0x0a5c, 1}, + {0x0a5e, 0x0a66, 8}, + {0x0a67, 0x0a75, 1}, + {0x0a81, 0x0a83, 1}, + {0x0a85, 0x0a8d, 1}, + {0x0a8f, 0x0a91, 1}, + {0x0a93, 0x0aa8, 1}, + {0x0aaa, 0x0ab0, 1}, + {0x0ab2, 0x0ab3, 1}, + {0x0ab5, 0x0ab9, 1}, + {0x0abc, 0x0ac5, 1}, + {0x0ac7, 0x0ac9, 1}, + {0x0acb, 0x0acd, 1}, + {0x0ad0, 0x0ae0, 16}, + {0x0ae1, 0x0ae3, 1}, + {0x0ae6, 0x0af1, 1}, + {0x0b01, 0x0b03, 1}, + {0x0b05, 0x0b0c, 1}, + {0x0b0f, 0x0b10, 1}, + {0x0b13, 0x0b28, 1}, + {0x0b2a, 0x0b30, 1}, + {0x0b32, 0x0b33, 1}, + {0x0b35, 0x0b39, 1}, + {0x0b3c, 0x0b44, 1}, + {0x0b47, 0x0b48, 1}, + {0x0b4b, 0x0b4d, 1}, + {0x0b56, 0x0b57, 1}, + {0x0b5c, 0x0b5d, 1}, + {0x0b5f, 0x0b63, 1}, + {0x0b66, 0x0b77, 1}, + {0x0b82, 0x0b83, 1}, + {0x0b85, 0x0b8a, 1}, + {0x0b8e, 0x0b90, 1}, + {0x0b92, 0x0b95, 1}, + {0x0b99, 0x0b9a, 1}, + {0x0b9c, 0x0b9e, 2}, + {0x0b9f, 0x0ba3, 4}, + {0x0ba4, 0x0ba8, 4}, + {0x0ba9, 0x0baa, 1}, + {0x0bae, 0x0bb9, 1}, + {0x0bbe, 0x0bc2, 1}, + {0x0bc6, 0x0bc8, 1}, + {0x0bca, 0x0bcd, 1}, + {0x0bd0, 0x0bd7, 7}, + {0x0be6, 0x0bfa, 1}, + {0x0c01, 0x0c03, 1}, + {0x0c05, 0x0c0c, 1}, + {0x0c0e, 0x0c10, 1}, + {0x0c12, 0x0c28, 1}, + {0x0c2a, 0x0c33, 1}, + {0x0c35, 0x0c39, 1}, + {0x0c3d, 0x0c44, 1}, + {0x0c46, 0x0c48, 1}, + {0x0c4a, 0x0c4d, 1}, + {0x0c55, 0x0c56, 1}, + {0x0c58, 0x0c59, 1}, + {0x0c60, 0x0c63, 1}, + {0x0c66, 0x0c6f, 1}, + {0x0c78, 0x0c7f, 1}, + {0x0c82, 0x0c83, 1}, + {0x0c85, 0x0c8c, 1}, + {0x0c8e, 0x0c90, 1}, + {0x0c92, 0x0ca8, 1}, + {0x0caa, 0x0cb3, 1}, + {0x0cb5, 0x0cb9, 1}, + {0x0cbc, 0x0cc4, 1}, + {0x0cc6, 0x0cc8, 1}, + {0x0cca, 0x0ccd, 1}, + {0x0cd5, 0x0cd6, 1}, + {0x0cde, 0x0ce0, 2}, + {0x0ce1, 0x0ce3, 1}, + {0x0ce6, 0x0cef, 1}, + {0x0cf1, 0x0cf2, 1}, + {0x0d02, 0x0d03, 1}, + {0x0d05, 0x0d0c, 1}, + {0x0d0e, 0x0d10, 1}, + {0x0d12, 0x0d3a, 1}, + {0x0d3d, 0x0d44, 1}, + {0x0d46, 0x0d48, 1}, + {0x0d4a, 0x0d4e, 1}, + {0x0d57, 0x0d60, 9}, + {0x0d61, 0x0d63, 1}, + {0x0d66, 0x0d75, 1}, + {0x0d79, 0x0d7f, 1}, + {0x0d82, 0x0d83, 1}, + {0x0d85, 0x0d96, 1}, + {0x0d9a, 0x0db1, 1}, + {0x0db3, 0x0dbb, 1}, + {0x0dbd, 0x0dc0, 3}, + {0x0dc1, 0x0dc6, 1}, + {0x0dca, 0x0dcf, 5}, + {0x0dd0, 0x0dd4, 1}, + {0x0dd6, 0x0dd8, 2}, + {0x0dd9, 0x0ddf, 1}, + {0x0df2, 0x0df4, 1}, + {0x0e01, 0x0e3a, 1}, + {0x0e3f, 0x0e5b, 1}, + {0x0e81, 0x0e82, 1}, + {0x0e84, 0x0e87, 3}, + {0x0e88, 0x0e8a, 2}, + {0x0e8d, 0x0e94, 7}, + {0x0e95, 0x0e97, 1}, + {0x0e99, 0x0e9f, 1}, + {0x0ea1, 0x0ea3, 1}, + {0x0ea5, 0x0ea7, 2}, + {0x0eaa, 0x0eab, 1}, + {0x0ead, 0x0eb9, 1}, + {0x0ebb, 0x0ebd, 1}, + {0x0ec0, 0x0ec4, 1}, + {0x0ec6, 0x0ec8, 2}, + {0x0ec9, 0x0ecd, 1}, + {0x0ed0, 0x0ed9, 1}, + {0x0edc, 0x0edf, 1}, + {0x0f00, 0x0f47, 1}, + {0x0f49, 0x0f6c, 1}, + {0x0f71, 0x0f97, 1}, + {0x0f99, 0x0fbc, 1}, + {0x0fbe, 0x0fcc, 1}, + {0x0fce, 0x0fda, 1}, + {0x1000, 0x10c5, 1}, + {0x10c7, 0x10cd, 6}, + {0x10d0, 0x1248, 1}, + {0x124a, 0x124d, 1}, + {0x1250, 0x1256, 1}, + {0x1258, 0x125a, 2}, + {0x125b, 0x125d, 1}, + {0x1260, 0x1288, 1}, + {0x128a, 0x128d, 1}, + {0x1290, 0x12b0, 1}, + {0x12b2, 0x12b5, 1}, + {0x12b8, 0x12be, 1}, + {0x12c0, 0x12c2, 2}, + {0x12c3, 0x12c5, 1}, + {0x12c8, 0x12d6, 1}, + {0x12d8, 0x1310, 1}, + {0x1312, 0x1315, 1}, + {0x1318, 0x135a, 1}, + {0x135d, 0x137c, 1}, + {0x1380, 0x1399, 1}, + {0x13a0, 0x13f4, 1}, + {0x1400, 0x169c, 1}, + {0x16a0, 0x16f0, 1}, + {0x1700, 0x170c, 1}, + {0x170e, 0x1714, 1}, + {0x1720, 0x1736, 1}, + {0x1740, 0x1753, 1}, + {0x1760, 0x176c, 1}, + {0x176e, 0x1770, 1}, + {0x1772, 0x1773, 1}, + {0x1780, 0x17dd, 1}, + {0x17e0, 0x17e9, 1}, + {0x17f0, 0x17f9, 1}, + {0x1800, 0x180e, 1}, + {0x1810, 0x1819, 1}, + {0x1820, 0x1877, 1}, + {0x1880, 0x18aa, 1}, + {0x18b0, 0x18f5, 1}, + {0x1900, 0x191c, 1}, + {0x1920, 0x192b, 1}, + {0x1930, 0x193b, 1}, + {0x1940, 0x1944, 4}, + {0x1945, 0x196d, 1}, + {0x1970, 0x1974, 1}, + {0x1980, 0x19ab, 1}, + {0x19b0, 0x19c9, 1}, + {0x19d0, 0x19da, 1}, + {0x19de, 0x1a1b, 1}, + {0x1a1e, 0x1a5e, 1}, + {0x1a60, 0x1a7c, 1}, + {0x1a7f, 0x1a89, 1}, + {0x1a90, 0x1a99, 1}, + {0x1aa0, 0x1aad, 1}, + {0x1b00, 0x1b4b, 1}, + {0x1b50, 0x1b7c, 1}, + {0x1b80, 0x1bf3, 1}, + {0x1bfc, 0x1c37, 1}, + {0x1c3b, 0x1c49, 1}, + {0x1c4d, 0x1c7f, 1}, + {0x1cc0, 0x1cc7, 1}, + {0x1cd0, 0x1cf6, 1}, + {0x1d00, 0x1de6, 1}, + {0x1dfc, 0x1f15, 1}, + {0x1f18, 0x1f1d, 1}, + {0x1f20, 0x1f45, 1}, + {0x1f48, 0x1f4d, 1}, + {0x1f50, 0x1f57, 1}, + {0x1f59, 0x1f5f, 2}, + {0x1f60, 0x1f7d, 1}, + {0x1f80, 0x1fb4, 1}, + {0x1fb6, 0x1fc4, 1}, + {0x1fc6, 0x1fd3, 1}, + {0x1fd6, 0x1fdb, 1}, + {0x1fdd, 0x1fef, 1}, + {0x1ff2, 0x1ff4, 1}, + {0x1ff6, 0x1ffe, 1}, + {0x2000, 0x2064, 1}, + {0x206a, 0x2071, 1}, + {0x2074, 0x208e, 1}, + {0x2090, 0x209c, 1}, + {0x20a0, 0x20b9, 1}, + {0x20d0, 0x20f0, 1}, + {0x2100, 0x2189, 1}, + {0x2190, 0x23f3, 1}, + {0x2400, 0x2426, 1}, + {0x2440, 0x244a, 1}, + {0x2460, 0x26ff, 1}, + {0x2701, 0x2b4c, 1}, + {0x2b50, 0x2b59, 1}, + {0x2c00, 0x2c2e, 1}, + {0x2c30, 0x2c5e, 1}, + {0x2c60, 0x2cf3, 1}, + {0x2cf9, 0x2d25, 1}, + {0x2d27, 0x2d2d, 6}, + {0x2d30, 0x2d67, 1}, + {0x2d6f, 0x2d70, 1}, + {0x2d7f, 0x2d96, 1}, + {0x2da0, 0x2da6, 1}, + {0x2da8, 0x2dae, 1}, + {0x2db0, 0x2db6, 1}, + {0x2db8, 0x2dbe, 1}, + {0x2dc0, 0x2dc6, 1}, + {0x2dc8, 0x2dce, 1}, + {0x2dd0, 0x2dd6, 1}, + {0x2dd8, 0x2dde, 1}, + {0x2de0, 0x2e3b, 1}, + {0x2e80, 0x2e99, 1}, + {0x2e9b, 0x2ef3, 1}, + {0x2f00, 0x2fd5, 1}, + {0x2ff0, 0x2ffb, 1}, + {0x3000, 0x303f, 1}, + {0x3041, 0x3096, 1}, + {0x3099, 0x30ff, 1}, + {0x3105, 0x312d, 1}, + {0x3131, 0x318e, 1}, + {0x3190, 0x31ba, 1}, + {0x31c0, 0x31e3, 1}, + {0x31f0, 0x321e, 1}, + {0x3220, 0x32fe, 1}, + {0x3300, 0x4db5, 1}, + {0x4dc0, 0x9fcc, 1}, + {0xa000, 0xa48c, 1}, + {0xa490, 0xa4c6, 1}, + {0xa4d0, 0xa62b, 1}, + {0xa640, 0xa697, 1}, + {0xa69f, 0xa6f7, 1}, + {0xa700, 0xa78e, 1}, + {0xa790, 0xa793, 1}, + {0xa7a0, 0xa7aa, 1}, + {0xa7f8, 0xa82b, 1}, + {0xa830, 0xa839, 1}, + {0xa840, 0xa877, 1}, + {0xa880, 0xa8c4, 1}, + {0xa8ce, 0xa8d9, 1}, + {0xa8e0, 0xa8fb, 1}, + {0xa900, 0xa953, 1}, + {0xa95f, 0xa97c, 1}, + {0xa980, 0xa9cd, 1}, + {0xa9cf, 0xa9d9, 1}, + {0xa9de, 0xa9df, 1}, + {0xaa00, 0xaa36, 1}, + {0xaa40, 0xaa4d, 1}, + {0xaa50, 0xaa59, 1}, + {0xaa5c, 0xaa7b, 1}, + {0xaa80, 0xaac2, 1}, + {0xaadb, 0xaaf6, 1}, + {0xab01, 0xab06, 1}, + {0xab09, 0xab0e, 1}, + {0xab11, 0xab16, 1}, + {0xab20, 0xab26, 1}, + {0xab28, 0xab2e, 1}, + {0xabc0, 0xabed, 1}, + {0xabf0, 0xabf9, 1}, + {0xac00, 0xd7a3, 1}, + {0xd7b0, 0xd7c6, 1}, + {0xd7cb, 0xd7fb, 1}, + {0xd800, 0xfa6d, 1}, + {0xfa70, 0xfad9, 1}, + {0xfb00, 0xfb06, 1}, + {0xfb13, 0xfb17, 1}, + {0xfb1d, 0xfb36, 1}, + {0xfb38, 0xfb3c, 1}, + {0xfb3e, 0xfb40, 2}, + {0xfb41, 0xfb43, 2}, + {0xfb44, 0xfb46, 2}, + {0xfb47, 0xfbc1, 1}, + {0xfbd3, 0xfd3f, 1}, + {0xfd50, 0xfd8f, 1}, + {0xfd92, 0xfdc7, 1}, + {0xfdf0, 0xfdfd, 1}, + {0xfe00, 0xfe19, 1}, + {0xfe20, 0xfe26, 1}, + {0xfe30, 0xfe52, 1}, + {0xfe54, 0xfe66, 1}, + {0xfe68, 0xfe6b, 1}, + {0xfe70, 0xfe74, 1}, + {0xfe76, 0xfefc, 1}, + {0xfeff, 0xff01, 2}, + {0xff02, 0xffbe, 1}, + {0xffc2, 0xffc7, 1}, + {0xffca, 0xffcf, 1}, + {0xffd2, 0xffd7, 1}, + {0xffda, 0xffdc, 1}, + {0xffe0, 0xffe6, 1}, + {0xffe8, 0xffee, 1}, + {0xfff9, 0xfffd, 1}, + }, + R32: []unicode.Range32{ + {0x00010000, 0x0001000b, 1}, + {0x0001000d, 0x00010026, 1}, + {0x00010028, 0x0001003a, 1}, + {0x0001003c, 0x0001003d, 1}, + {0x0001003f, 0x0001004d, 1}, + {0x00010050, 0x0001005d, 1}, + {0x00010080, 0x000100fa, 1}, + {0x00010100, 0x00010102, 1}, + {0x00010107, 0x00010133, 1}, + {0x00010137, 0x0001018a, 1}, + {0x00010190, 0x0001019b, 1}, + {0x000101d0, 0x000101fd, 1}, + {0x00010280, 0x0001029c, 1}, + {0x000102a0, 0x000102d0, 1}, + {0x00010300, 0x0001031e, 1}, + {0x00010320, 0x00010323, 1}, + {0x00010330, 0x0001034a, 1}, + {0x00010380, 0x0001039d, 1}, + {0x0001039f, 0x000103c3, 1}, + {0x000103c8, 0x000103d5, 1}, + {0x00010400, 0x0001049d, 1}, + {0x000104a0, 0x000104a9, 1}, + {0x00010800, 0x00010805, 1}, + {0x00010808, 0x0001080a, 2}, + {0x0001080b, 0x00010835, 1}, + {0x00010837, 0x00010838, 1}, + {0x0001083c, 0x0001083f, 3}, + {0x00010840, 0x00010855, 1}, + {0x00010857, 0x0001085f, 1}, + {0x00010900, 0x0001091b, 1}, + {0x0001091f, 0x00010939, 1}, + {0x0001093f, 0x00010980, 65}, + {0x00010981, 0x000109b7, 1}, + {0x000109be, 0x000109bf, 1}, + {0x00010a00, 0x00010a03, 1}, + {0x00010a05, 0x00010a06, 1}, + {0x00010a0c, 0x00010a13, 1}, + {0x00010a15, 0x00010a17, 1}, + {0x00010a19, 0x00010a33, 1}, + {0x00010a38, 0x00010a3a, 1}, + {0x00010a3f, 0x00010a47, 1}, + {0x00010a50, 0x00010a58, 1}, + {0x00010a60, 0x00010a7f, 1}, + {0x00010b00, 0x00010b35, 1}, + {0x00010b39, 0x00010b55, 1}, + {0x00010b58, 0x00010b72, 1}, + {0x00010b78, 0x00010b7f, 1}, + {0x00010c00, 0x00010c48, 1}, + {0x00010e60, 0x00010e7e, 1}, + {0x00011000, 0x0001104d, 1}, + {0x00011052, 0x0001106f, 1}, + {0x00011080, 0x000110c1, 1}, + {0x000110d0, 0x000110e8, 1}, + {0x000110f0, 0x000110f9, 1}, + {0x00011100, 0x00011134, 1}, + {0x00011136, 0x00011143, 1}, + {0x00011180, 0x000111c8, 1}, + {0x000111d0, 0x000111d9, 1}, + {0x00011680, 0x000116b7, 1}, + {0x000116c0, 0x000116c9, 1}, + {0x00012000, 0x0001236e, 1}, + {0x00012400, 0x00012462, 1}, + {0x00012470, 0x00012473, 1}, + {0x00013000, 0x0001342e, 1}, + {0x00016800, 0x00016a38, 1}, + {0x00016f00, 0x00016f44, 1}, + {0x00016f50, 0x00016f7e, 1}, + {0x00016f8f, 0x00016f9f, 1}, + {0x0001b000, 0x0001b001, 1}, + {0x0001d000, 0x0001d0f5, 1}, + {0x0001d100, 0x0001d126, 1}, + {0x0001d129, 0x0001d1dd, 1}, + {0x0001d200, 0x0001d245, 1}, + {0x0001d300, 0x0001d356, 1}, + {0x0001d360, 0x0001d371, 1}, + {0x0001d400, 0x0001d454, 1}, + {0x0001d456, 0x0001d49c, 1}, + {0x0001d49e, 0x0001d49f, 1}, + {0x0001d4a2, 0x0001d4a5, 3}, + {0x0001d4a6, 0x0001d4a9, 3}, + {0x0001d4aa, 0x0001d4ac, 1}, + {0x0001d4ae, 0x0001d4b9, 1}, + {0x0001d4bb, 0x0001d4bd, 2}, + {0x0001d4be, 0x0001d4c3, 1}, + {0x0001d4c5, 0x0001d505, 1}, + {0x0001d507, 0x0001d50a, 1}, + {0x0001d50d, 0x0001d514, 1}, + {0x0001d516, 0x0001d51c, 1}, + {0x0001d51e, 0x0001d539, 1}, + {0x0001d53b, 0x0001d53e, 1}, + {0x0001d540, 0x0001d544, 1}, + {0x0001d546, 0x0001d54a, 4}, + {0x0001d54b, 0x0001d550, 1}, + {0x0001d552, 0x0001d6a5, 1}, + {0x0001d6a8, 0x0001d7cb, 1}, + {0x0001d7ce, 0x0001d7ff, 1}, + {0x0001ee00, 0x0001ee03, 1}, + {0x0001ee05, 0x0001ee1f, 1}, + {0x0001ee21, 0x0001ee22, 1}, + {0x0001ee24, 0x0001ee27, 3}, + {0x0001ee29, 0x0001ee32, 1}, + {0x0001ee34, 0x0001ee37, 1}, + {0x0001ee39, 0x0001ee3b, 2}, + {0x0001ee42, 0x0001ee47, 5}, + {0x0001ee49, 0x0001ee4d, 2}, + {0x0001ee4e, 0x0001ee4f, 1}, + {0x0001ee51, 0x0001ee52, 1}, + {0x0001ee54, 0x0001ee57, 3}, + {0x0001ee59, 0x0001ee61, 2}, + {0x0001ee62, 0x0001ee64, 2}, + {0x0001ee67, 0x0001ee6a, 1}, + {0x0001ee6c, 0x0001ee72, 1}, + {0x0001ee74, 0x0001ee77, 1}, + {0x0001ee79, 0x0001ee7c, 1}, + {0x0001ee7e, 0x0001ee80, 2}, + {0x0001ee81, 0x0001ee89, 1}, + {0x0001ee8b, 0x0001ee9b, 1}, + {0x0001eea1, 0x0001eea3, 1}, + {0x0001eea5, 0x0001eea9, 1}, + {0x0001eeab, 0x0001eebb, 1}, + {0x0001eef0, 0x0001eef1, 1}, + {0x0001f000, 0x0001f02b, 1}, + {0x0001f030, 0x0001f093, 1}, + {0x0001f0a0, 0x0001f0ae, 1}, + {0x0001f0b1, 0x0001f0be, 1}, + {0x0001f0c1, 0x0001f0cf, 1}, + {0x0001f0d1, 0x0001f0df, 1}, + {0x0001f100, 0x0001f10a, 1}, + {0x0001f110, 0x0001f12e, 1}, + {0x0001f130, 0x0001f16b, 1}, + {0x0001f170, 0x0001f19a, 1}, + {0x0001f1e6, 0x0001f202, 1}, + {0x0001f210, 0x0001f23a, 1}, + {0x0001f240, 0x0001f248, 1}, + {0x0001f250, 0x0001f251, 1}, + {0x0001f300, 0x0001f320, 1}, + {0x0001f330, 0x0001f335, 1}, + {0x0001f337, 0x0001f37c, 1}, + {0x0001f380, 0x0001f393, 1}, + {0x0001f3a0, 0x0001f3c4, 1}, + {0x0001f3c6, 0x0001f3ca, 1}, + {0x0001f3e0, 0x0001f3f0, 1}, + {0x0001f400, 0x0001f43e, 1}, + {0x0001f440, 0x0001f442, 2}, + {0x0001f443, 0x0001f4f7, 1}, + {0x0001f4f9, 0x0001f4fc, 1}, + {0x0001f500, 0x0001f53d, 1}, + {0x0001f540, 0x0001f543, 1}, + {0x0001f550, 0x0001f567, 1}, + {0x0001f5fb, 0x0001f640, 1}, + {0x0001f645, 0x0001f64f, 1}, + {0x0001f680, 0x0001f6c5, 1}, + {0x0001f700, 0x0001f773, 1}, + {0x00020000, 0x0002a6d6, 1}, + {0x0002a700, 0x0002b734, 1}, + {0x0002b740, 0x0002b81d, 1}, + {0x0002f800, 0x0002fa1d, 1}, + {0x000e0001, 0x000e0020, 31}, + {0x000e0021, 0x000e007f, 1}, + {0x000e0100, 0x000e01ef, 1}, + {0x000f0000, 0x000ffffd, 1}, + {0x00100000, 0x0010fffd, 1}, + }, + LatinOffset: 0, +} + +// size 4160 bytes (4 KiB) +var assigned6_2_0 = &unicode.RangeTable{ + R16: []unicode.Range16{ + {0x0000, 0x0377, 1}, + {0x037a, 0x037e, 1}, + {0x0384, 0x038a, 1}, + {0x038c, 0x038e, 2}, + {0x038f, 0x03a1, 1}, + {0x03a3, 0x0527, 1}, + {0x0531, 0x0556, 1}, + {0x0559, 0x055f, 1}, + {0x0561, 0x0587, 1}, + {0x0589, 0x058a, 1}, + {0x058f, 0x0591, 2}, + {0x0592, 0x05c7, 1}, + {0x05d0, 0x05ea, 1}, + {0x05f0, 0x05f4, 1}, + {0x0600, 0x0604, 1}, + {0x0606, 0x061b, 1}, + {0x061e, 0x070d, 1}, + {0x070f, 0x074a, 1}, + {0x074d, 0x07b1, 1}, + {0x07c0, 0x07fa, 1}, + {0x0800, 0x082d, 1}, + {0x0830, 0x083e, 1}, + {0x0840, 0x085b, 1}, + {0x085e, 0x08a0, 66}, + {0x08a2, 0x08ac, 1}, + {0x08e4, 0x08fe, 1}, + {0x0900, 0x0977, 1}, + {0x0979, 0x097f, 1}, + {0x0981, 0x0983, 1}, + {0x0985, 0x098c, 1}, + {0x098f, 0x0990, 1}, + {0x0993, 0x09a8, 1}, + {0x09aa, 0x09b0, 1}, + {0x09b2, 0x09b6, 4}, + {0x09b7, 0x09b9, 1}, + {0x09bc, 0x09c4, 1}, + {0x09c7, 0x09c8, 1}, + {0x09cb, 0x09ce, 1}, + {0x09d7, 0x09dc, 5}, + {0x09dd, 0x09df, 2}, + {0x09e0, 0x09e3, 1}, + {0x09e6, 0x09fb, 1}, + {0x0a01, 0x0a03, 1}, + {0x0a05, 0x0a0a, 1}, + {0x0a0f, 0x0a10, 1}, + {0x0a13, 0x0a28, 1}, + {0x0a2a, 0x0a30, 1}, + {0x0a32, 0x0a33, 1}, + {0x0a35, 0x0a36, 1}, + {0x0a38, 0x0a39, 1}, + {0x0a3c, 0x0a3e, 2}, + {0x0a3f, 0x0a42, 1}, + {0x0a47, 0x0a48, 1}, + {0x0a4b, 0x0a4d, 1}, + {0x0a51, 0x0a59, 8}, + {0x0a5a, 0x0a5c, 1}, + {0x0a5e, 0x0a66, 8}, + {0x0a67, 0x0a75, 1}, + {0x0a81, 0x0a83, 1}, + {0x0a85, 0x0a8d, 1}, + {0x0a8f, 0x0a91, 1}, + {0x0a93, 0x0aa8, 1}, + {0x0aaa, 0x0ab0, 1}, + {0x0ab2, 0x0ab3, 1}, + {0x0ab5, 0x0ab9, 1}, + {0x0abc, 0x0ac5, 1}, + {0x0ac7, 0x0ac9, 1}, + {0x0acb, 0x0acd, 1}, + {0x0ad0, 0x0ae0, 16}, + {0x0ae1, 0x0ae3, 1}, + {0x0ae6, 0x0af1, 1}, + {0x0b01, 0x0b03, 1}, + {0x0b05, 0x0b0c, 1}, + {0x0b0f, 0x0b10, 1}, + {0x0b13, 0x0b28, 1}, + {0x0b2a, 0x0b30, 1}, + {0x0b32, 0x0b33, 1}, + {0x0b35, 0x0b39, 1}, + {0x0b3c, 0x0b44, 1}, + {0x0b47, 0x0b48, 1}, + {0x0b4b, 0x0b4d, 1}, + {0x0b56, 0x0b57, 1}, + {0x0b5c, 0x0b5d, 1}, + {0x0b5f, 0x0b63, 1}, + {0x0b66, 0x0b77, 1}, + {0x0b82, 0x0b83, 1}, + {0x0b85, 0x0b8a, 1}, + {0x0b8e, 0x0b90, 1}, + {0x0b92, 0x0b95, 1}, + {0x0b99, 0x0b9a, 1}, + {0x0b9c, 0x0b9e, 2}, + {0x0b9f, 0x0ba3, 4}, + {0x0ba4, 0x0ba8, 4}, + {0x0ba9, 0x0baa, 1}, + {0x0bae, 0x0bb9, 1}, + {0x0bbe, 0x0bc2, 1}, + {0x0bc6, 0x0bc8, 1}, + {0x0bca, 0x0bcd, 1}, + {0x0bd0, 0x0bd7, 7}, + {0x0be6, 0x0bfa, 1}, + {0x0c01, 0x0c03, 1}, + {0x0c05, 0x0c0c, 1}, + {0x0c0e, 0x0c10, 1}, + {0x0c12, 0x0c28, 1}, + {0x0c2a, 0x0c33, 1}, + {0x0c35, 0x0c39, 1}, + {0x0c3d, 0x0c44, 1}, + {0x0c46, 0x0c48, 1}, + {0x0c4a, 0x0c4d, 1}, + {0x0c55, 0x0c56, 1}, + {0x0c58, 0x0c59, 1}, + {0x0c60, 0x0c63, 1}, + {0x0c66, 0x0c6f, 1}, + {0x0c78, 0x0c7f, 1}, + {0x0c82, 0x0c83, 1}, + {0x0c85, 0x0c8c, 1}, + {0x0c8e, 0x0c90, 1}, + {0x0c92, 0x0ca8, 1}, + {0x0caa, 0x0cb3, 1}, + {0x0cb5, 0x0cb9, 1}, + {0x0cbc, 0x0cc4, 1}, + {0x0cc6, 0x0cc8, 1}, + {0x0cca, 0x0ccd, 1}, + {0x0cd5, 0x0cd6, 1}, + {0x0cde, 0x0ce0, 2}, + {0x0ce1, 0x0ce3, 1}, + {0x0ce6, 0x0cef, 1}, + {0x0cf1, 0x0cf2, 1}, + {0x0d02, 0x0d03, 1}, + {0x0d05, 0x0d0c, 1}, + {0x0d0e, 0x0d10, 1}, + {0x0d12, 0x0d3a, 1}, + {0x0d3d, 0x0d44, 1}, + {0x0d46, 0x0d48, 1}, + {0x0d4a, 0x0d4e, 1}, + {0x0d57, 0x0d60, 9}, + {0x0d61, 0x0d63, 1}, + {0x0d66, 0x0d75, 1}, + {0x0d79, 0x0d7f, 1}, + {0x0d82, 0x0d83, 1}, + {0x0d85, 0x0d96, 1}, + {0x0d9a, 0x0db1, 1}, + {0x0db3, 0x0dbb, 1}, + {0x0dbd, 0x0dc0, 3}, + {0x0dc1, 0x0dc6, 1}, + {0x0dca, 0x0dcf, 5}, + {0x0dd0, 0x0dd4, 1}, + {0x0dd6, 0x0dd8, 2}, + {0x0dd9, 0x0ddf, 1}, + {0x0df2, 0x0df4, 1}, + {0x0e01, 0x0e3a, 1}, + {0x0e3f, 0x0e5b, 1}, + {0x0e81, 0x0e82, 1}, + {0x0e84, 0x0e87, 3}, + {0x0e88, 0x0e8a, 2}, + {0x0e8d, 0x0e94, 7}, + {0x0e95, 0x0e97, 1}, + {0x0e99, 0x0e9f, 1}, + {0x0ea1, 0x0ea3, 1}, + {0x0ea5, 0x0ea7, 2}, + {0x0eaa, 0x0eab, 1}, + {0x0ead, 0x0eb9, 1}, + {0x0ebb, 0x0ebd, 1}, + {0x0ec0, 0x0ec4, 1}, + {0x0ec6, 0x0ec8, 2}, + {0x0ec9, 0x0ecd, 1}, + {0x0ed0, 0x0ed9, 1}, + {0x0edc, 0x0edf, 1}, + {0x0f00, 0x0f47, 1}, + {0x0f49, 0x0f6c, 1}, + {0x0f71, 0x0f97, 1}, + {0x0f99, 0x0fbc, 1}, + {0x0fbe, 0x0fcc, 1}, + {0x0fce, 0x0fda, 1}, + {0x1000, 0x10c5, 1}, + {0x10c7, 0x10cd, 6}, + {0x10d0, 0x1248, 1}, + {0x124a, 0x124d, 1}, + {0x1250, 0x1256, 1}, + {0x1258, 0x125a, 2}, + {0x125b, 0x125d, 1}, + {0x1260, 0x1288, 1}, + {0x128a, 0x128d, 1}, + {0x1290, 0x12b0, 1}, + {0x12b2, 0x12b5, 1}, + {0x12b8, 0x12be, 1}, + {0x12c0, 0x12c2, 2}, + {0x12c3, 0x12c5, 1}, + {0x12c8, 0x12d6, 1}, + {0x12d8, 0x1310, 1}, + {0x1312, 0x1315, 1}, + {0x1318, 0x135a, 1}, + {0x135d, 0x137c, 1}, + {0x1380, 0x1399, 1}, + {0x13a0, 0x13f4, 1}, + {0x1400, 0x169c, 1}, + {0x16a0, 0x16f0, 1}, + {0x1700, 0x170c, 1}, + {0x170e, 0x1714, 1}, + {0x1720, 0x1736, 1}, + {0x1740, 0x1753, 1}, + {0x1760, 0x176c, 1}, + {0x176e, 0x1770, 1}, + {0x1772, 0x1773, 1}, + {0x1780, 0x17dd, 1}, + {0x17e0, 0x17e9, 1}, + {0x17f0, 0x17f9, 1}, + {0x1800, 0x180e, 1}, + {0x1810, 0x1819, 1}, + {0x1820, 0x1877, 1}, + {0x1880, 0x18aa, 1}, + {0x18b0, 0x18f5, 1}, + {0x1900, 0x191c, 1}, + {0x1920, 0x192b, 1}, + {0x1930, 0x193b, 1}, + {0x1940, 0x1944, 4}, + {0x1945, 0x196d, 1}, + {0x1970, 0x1974, 1}, + {0x1980, 0x19ab, 1}, + {0x19b0, 0x19c9, 1}, + {0x19d0, 0x19da, 1}, + {0x19de, 0x1a1b, 1}, + {0x1a1e, 0x1a5e, 1}, + {0x1a60, 0x1a7c, 1}, + {0x1a7f, 0x1a89, 1}, + {0x1a90, 0x1a99, 1}, + {0x1aa0, 0x1aad, 1}, + {0x1b00, 0x1b4b, 1}, + {0x1b50, 0x1b7c, 1}, + {0x1b80, 0x1bf3, 1}, + {0x1bfc, 0x1c37, 1}, + {0x1c3b, 0x1c49, 1}, + {0x1c4d, 0x1c7f, 1}, + {0x1cc0, 0x1cc7, 1}, + {0x1cd0, 0x1cf6, 1}, + {0x1d00, 0x1de6, 1}, + {0x1dfc, 0x1f15, 1}, + {0x1f18, 0x1f1d, 1}, + {0x1f20, 0x1f45, 1}, + {0x1f48, 0x1f4d, 1}, + {0x1f50, 0x1f57, 1}, + {0x1f59, 0x1f5f, 2}, + {0x1f60, 0x1f7d, 1}, + {0x1f80, 0x1fb4, 1}, + {0x1fb6, 0x1fc4, 1}, + {0x1fc6, 0x1fd3, 1}, + {0x1fd6, 0x1fdb, 1}, + {0x1fdd, 0x1fef, 1}, + {0x1ff2, 0x1ff4, 1}, + {0x1ff6, 0x1ffe, 1}, + {0x2000, 0x2064, 1}, + {0x206a, 0x2071, 1}, + {0x2074, 0x208e, 1}, + {0x2090, 0x209c, 1}, + {0x20a0, 0x20ba, 1}, + {0x20d0, 0x20f0, 1}, + {0x2100, 0x2189, 1}, + {0x2190, 0x23f3, 1}, + {0x2400, 0x2426, 1}, + {0x2440, 0x244a, 1}, + {0x2460, 0x26ff, 1}, + {0x2701, 0x2b4c, 1}, + {0x2b50, 0x2b59, 1}, + {0x2c00, 0x2c2e, 1}, + {0x2c30, 0x2c5e, 1}, + {0x2c60, 0x2cf3, 1}, + {0x2cf9, 0x2d25, 1}, + {0x2d27, 0x2d2d, 6}, + {0x2d30, 0x2d67, 1}, + {0x2d6f, 0x2d70, 1}, + {0x2d7f, 0x2d96, 1}, + {0x2da0, 0x2da6, 1}, + {0x2da8, 0x2dae, 1}, + {0x2db0, 0x2db6, 1}, + {0x2db8, 0x2dbe, 1}, + {0x2dc0, 0x2dc6, 1}, + {0x2dc8, 0x2dce, 1}, + {0x2dd0, 0x2dd6, 1}, + {0x2dd8, 0x2dde, 1}, + {0x2de0, 0x2e3b, 1}, + {0x2e80, 0x2e99, 1}, + {0x2e9b, 0x2ef3, 1}, + {0x2f00, 0x2fd5, 1}, + {0x2ff0, 0x2ffb, 1}, + {0x3000, 0x303f, 1}, + {0x3041, 0x3096, 1}, + {0x3099, 0x30ff, 1}, + {0x3105, 0x312d, 1}, + {0x3131, 0x318e, 1}, + {0x3190, 0x31ba, 1}, + {0x31c0, 0x31e3, 1}, + {0x31f0, 0x321e, 1}, + {0x3220, 0x32fe, 1}, + {0x3300, 0x4db5, 1}, + {0x4dc0, 0x9fcc, 1}, + {0xa000, 0xa48c, 1}, + {0xa490, 0xa4c6, 1}, + {0xa4d0, 0xa62b, 1}, + {0xa640, 0xa697, 1}, + {0xa69f, 0xa6f7, 1}, + {0xa700, 0xa78e, 1}, + {0xa790, 0xa793, 1}, + {0xa7a0, 0xa7aa, 1}, + {0xa7f8, 0xa82b, 1}, + {0xa830, 0xa839, 1}, + {0xa840, 0xa877, 1}, + {0xa880, 0xa8c4, 1}, + {0xa8ce, 0xa8d9, 1}, + {0xa8e0, 0xa8fb, 1}, + {0xa900, 0xa953, 1}, + {0xa95f, 0xa97c, 1}, + {0xa980, 0xa9cd, 1}, + {0xa9cf, 0xa9d9, 1}, + {0xa9de, 0xa9df, 1}, + {0xaa00, 0xaa36, 1}, + {0xaa40, 0xaa4d, 1}, + {0xaa50, 0xaa59, 1}, + {0xaa5c, 0xaa7b, 1}, + {0xaa80, 0xaac2, 1}, + {0xaadb, 0xaaf6, 1}, + {0xab01, 0xab06, 1}, + {0xab09, 0xab0e, 1}, + {0xab11, 0xab16, 1}, + {0xab20, 0xab26, 1}, + {0xab28, 0xab2e, 1}, + {0xabc0, 0xabed, 1}, + {0xabf0, 0xabf9, 1}, + {0xac00, 0xd7a3, 1}, + {0xd7b0, 0xd7c6, 1}, + {0xd7cb, 0xd7fb, 1}, + {0xd800, 0xfa6d, 1}, + {0xfa70, 0xfad9, 1}, + {0xfb00, 0xfb06, 1}, + {0xfb13, 0xfb17, 1}, + {0xfb1d, 0xfb36, 1}, + {0xfb38, 0xfb3c, 1}, + {0xfb3e, 0xfb40, 2}, + {0xfb41, 0xfb43, 2}, + {0xfb44, 0xfb46, 2}, + {0xfb47, 0xfbc1, 1}, + {0xfbd3, 0xfd3f, 1}, + {0xfd50, 0xfd8f, 1}, + {0xfd92, 0xfdc7, 1}, + {0xfdf0, 0xfdfd, 1}, + {0xfe00, 0xfe19, 1}, + {0xfe20, 0xfe26, 1}, + {0xfe30, 0xfe52, 1}, + {0xfe54, 0xfe66, 1}, + {0xfe68, 0xfe6b, 1}, + {0xfe70, 0xfe74, 1}, + {0xfe76, 0xfefc, 1}, + {0xfeff, 0xff01, 2}, + {0xff02, 0xffbe, 1}, + {0xffc2, 0xffc7, 1}, + {0xffca, 0xffcf, 1}, + {0xffd2, 0xffd7, 1}, + {0xffda, 0xffdc, 1}, + {0xffe0, 0xffe6, 1}, + {0xffe8, 0xffee, 1}, + {0xfff9, 0xfffd, 1}, + }, + R32: []unicode.Range32{ + {0x00010000, 0x0001000b, 1}, + {0x0001000d, 0x00010026, 1}, + {0x00010028, 0x0001003a, 1}, + {0x0001003c, 0x0001003d, 1}, + {0x0001003f, 0x0001004d, 1}, + {0x00010050, 0x0001005d, 1}, + {0x00010080, 0x000100fa, 1}, + {0x00010100, 0x00010102, 1}, + {0x00010107, 0x00010133, 1}, + {0x00010137, 0x0001018a, 1}, + {0x00010190, 0x0001019b, 1}, + {0x000101d0, 0x000101fd, 1}, + {0x00010280, 0x0001029c, 1}, + {0x000102a0, 0x000102d0, 1}, + {0x00010300, 0x0001031e, 1}, + {0x00010320, 0x00010323, 1}, + {0x00010330, 0x0001034a, 1}, + {0x00010380, 0x0001039d, 1}, + {0x0001039f, 0x000103c3, 1}, + {0x000103c8, 0x000103d5, 1}, + {0x00010400, 0x0001049d, 1}, + {0x000104a0, 0x000104a9, 1}, + {0x00010800, 0x00010805, 1}, + {0x00010808, 0x0001080a, 2}, + {0x0001080b, 0x00010835, 1}, + {0x00010837, 0x00010838, 1}, + {0x0001083c, 0x0001083f, 3}, + {0x00010840, 0x00010855, 1}, + {0x00010857, 0x0001085f, 1}, + {0x00010900, 0x0001091b, 1}, + {0x0001091f, 0x00010939, 1}, + {0x0001093f, 0x00010980, 65}, + {0x00010981, 0x000109b7, 1}, + {0x000109be, 0x000109bf, 1}, + {0x00010a00, 0x00010a03, 1}, + {0x00010a05, 0x00010a06, 1}, + {0x00010a0c, 0x00010a13, 1}, + {0x00010a15, 0x00010a17, 1}, + {0x00010a19, 0x00010a33, 1}, + {0x00010a38, 0x00010a3a, 1}, + {0x00010a3f, 0x00010a47, 1}, + {0x00010a50, 0x00010a58, 1}, + {0x00010a60, 0x00010a7f, 1}, + {0x00010b00, 0x00010b35, 1}, + {0x00010b39, 0x00010b55, 1}, + {0x00010b58, 0x00010b72, 1}, + {0x00010b78, 0x00010b7f, 1}, + {0x00010c00, 0x00010c48, 1}, + {0x00010e60, 0x00010e7e, 1}, + {0x00011000, 0x0001104d, 1}, + {0x00011052, 0x0001106f, 1}, + {0x00011080, 0x000110c1, 1}, + {0x000110d0, 0x000110e8, 1}, + {0x000110f0, 0x000110f9, 1}, + {0x00011100, 0x00011134, 1}, + {0x00011136, 0x00011143, 1}, + {0x00011180, 0x000111c8, 1}, + {0x000111d0, 0x000111d9, 1}, + {0x00011680, 0x000116b7, 1}, + {0x000116c0, 0x000116c9, 1}, + {0x00012000, 0x0001236e, 1}, + {0x00012400, 0x00012462, 1}, + {0x00012470, 0x00012473, 1}, + {0x00013000, 0x0001342e, 1}, + {0x00016800, 0x00016a38, 1}, + {0x00016f00, 0x00016f44, 1}, + {0x00016f50, 0x00016f7e, 1}, + {0x00016f8f, 0x00016f9f, 1}, + {0x0001b000, 0x0001b001, 1}, + {0x0001d000, 0x0001d0f5, 1}, + {0x0001d100, 0x0001d126, 1}, + {0x0001d129, 0x0001d1dd, 1}, + {0x0001d200, 0x0001d245, 1}, + {0x0001d300, 0x0001d356, 1}, + {0x0001d360, 0x0001d371, 1}, + {0x0001d400, 0x0001d454, 1}, + {0x0001d456, 0x0001d49c, 1}, + {0x0001d49e, 0x0001d49f, 1}, + {0x0001d4a2, 0x0001d4a5, 3}, + {0x0001d4a6, 0x0001d4a9, 3}, + {0x0001d4aa, 0x0001d4ac, 1}, + {0x0001d4ae, 0x0001d4b9, 1}, + {0x0001d4bb, 0x0001d4bd, 2}, + {0x0001d4be, 0x0001d4c3, 1}, + {0x0001d4c5, 0x0001d505, 1}, + {0x0001d507, 0x0001d50a, 1}, + {0x0001d50d, 0x0001d514, 1}, + {0x0001d516, 0x0001d51c, 1}, + {0x0001d51e, 0x0001d539, 1}, + {0x0001d53b, 0x0001d53e, 1}, + {0x0001d540, 0x0001d544, 1}, + {0x0001d546, 0x0001d54a, 4}, + {0x0001d54b, 0x0001d550, 1}, + {0x0001d552, 0x0001d6a5, 1}, + {0x0001d6a8, 0x0001d7cb, 1}, + {0x0001d7ce, 0x0001d7ff, 1}, + {0x0001ee00, 0x0001ee03, 1}, + {0x0001ee05, 0x0001ee1f, 1}, + {0x0001ee21, 0x0001ee22, 1}, + {0x0001ee24, 0x0001ee27, 3}, + {0x0001ee29, 0x0001ee32, 1}, + {0x0001ee34, 0x0001ee37, 1}, + {0x0001ee39, 0x0001ee3b, 2}, + {0x0001ee42, 0x0001ee47, 5}, + {0x0001ee49, 0x0001ee4d, 2}, + {0x0001ee4e, 0x0001ee4f, 1}, + {0x0001ee51, 0x0001ee52, 1}, + {0x0001ee54, 0x0001ee57, 3}, + {0x0001ee59, 0x0001ee61, 2}, + {0x0001ee62, 0x0001ee64, 2}, + {0x0001ee67, 0x0001ee6a, 1}, + {0x0001ee6c, 0x0001ee72, 1}, + {0x0001ee74, 0x0001ee77, 1}, + {0x0001ee79, 0x0001ee7c, 1}, + {0x0001ee7e, 0x0001ee80, 2}, + {0x0001ee81, 0x0001ee89, 1}, + {0x0001ee8b, 0x0001ee9b, 1}, + {0x0001eea1, 0x0001eea3, 1}, + {0x0001eea5, 0x0001eea9, 1}, + {0x0001eeab, 0x0001eebb, 1}, + {0x0001eef0, 0x0001eef1, 1}, + {0x0001f000, 0x0001f02b, 1}, + {0x0001f030, 0x0001f093, 1}, + {0x0001f0a0, 0x0001f0ae, 1}, + {0x0001f0b1, 0x0001f0be, 1}, + {0x0001f0c1, 0x0001f0cf, 1}, + {0x0001f0d1, 0x0001f0df, 1}, + {0x0001f100, 0x0001f10a, 1}, + {0x0001f110, 0x0001f12e, 1}, + {0x0001f130, 0x0001f16b, 1}, + {0x0001f170, 0x0001f19a, 1}, + {0x0001f1e6, 0x0001f202, 1}, + {0x0001f210, 0x0001f23a, 1}, + {0x0001f240, 0x0001f248, 1}, + {0x0001f250, 0x0001f251, 1}, + {0x0001f300, 0x0001f320, 1}, + {0x0001f330, 0x0001f335, 1}, + {0x0001f337, 0x0001f37c, 1}, + {0x0001f380, 0x0001f393, 1}, + {0x0001f3a0, 0x0001f3c4, 1}, + {0x0001f3c6, 0x0001f3ca, 1}, + {0x0001f3e0, 0x0001f3f0, 1}, + {0x0001f400, 0x0001f43e, 1}, + {0x0001f440, 0x0001f442, 2}, + {0x0001f443, 0x0001f4f7, 1}, + {0x0001f4f9, 0x0001f4fc, 1}, + {0x0001f500, 0x0001f53d, 1}, + {0x0001f540, 0x0001f543, 1}, + {0x0001f550, 0x0001f567, 1}, + {0x0001f5fb, 0x0001f640, 1}, + {0x0001f645, 0x0001f64f, 1}, + {0x0001f680, 0x0001f6c5, 1}, + {0x0001f700, 0x0001f773, 1}, + {0x00020000, 0x0002a6d6, 1}, + {0x0002a700, 0x0002b734, 1}, + {0x0002b740, 0x0002b81d, 1}, + {0x0002f800, 0x0002fa1d, 1}, + {0x000e0001, 0x000e0020, 31}, + {0x000e0021, 0x000e007f, 1}, + {0x000e0100, 0x000e01ef, 1}, + {0x000f0000, 0x000ffffd, 1}, + {0x00100000, 0x0010fffd, 1}, + }, + LatinOffset: 0, +} + +// size 4160 bytes (4 KiB) +var assigned6_3_0 = &unicode.RangeTable{ + R16: []unicode.Range16{ + {0x0000, 0x0377, 1}, + {0x037a, 0x037e, 1}, + {0x0384, 0x038a, 1}, + {0x038c, 0x038e, 2}, + {0x038f, 0x03a1, 1}, + {0x03a3, 0x0527, 1}, + {0x0531, 0x0556, 1}, + {0x0559, 0x055f, 1}, + {0x0561, 0x0587, 1}, + {0x0589, 0x058a, 1}, + {0x058f, 0x0591, 2}, + {0x0592, 0x05c7, 1}, + {0x05d0, 0x05ea, 1}, + {0x05f0, 0x05f4, 1}, + {0x0600, 0x0604, 1}, + {0x0606, 0x061c, 1}, + {0x061e, 0x070d, 1}, + {0x070f, 0x074a, 1}, + {0x074d, 0x07b1, 1}, + {0x07c0, 0x07fa, 1}, + {0x0800, 0x082d, 1}, + {0x0830, 0x083e, 1}, + {0x0840, 0x085b, 1}, + {0x085e, 0x08a0, 66}, + {0x08a2, 0x08ac, 1}, + {0x08e4, 0x08fe, 1}, + {0x0900, 0x0977, 1}, + {0x0979, 0x097f, 1}, + {0x0981, 0x0983, 1}, + {0x0985, 0x098c, 1}, + {0x098f, 0x0990, 1}, + {0x0993, 0x09a8, 1}, + {0x09aa, 0x09b0, 1}, + {0x09b2, 0x09b6, 4}, + {0x09b7, 0x09b9, 1}, + {0x09bc, 0x09c4, 1}, + {0x09c7, 0x09c8, 1}, + {0x09cb, 0x09ce, 1}, + {0x09d7, 0x09dc, 5}, + {0x09dd, 0x09df, 2}, + {0x09e0, 0x09e3, 1}, + {0x09e6, 0x09fb, 1}, + {0x0a01, 0x0a03, 1}, + {0x0a05, 0x0a0a, 1}, + {0x0a0f, 0x0a10, 1}, + {0x0a13, 0x0a28, 1}, + {0x0a2a, 0x0a30, 1}, + {0x0a32, 0x0a33, 1}, + {0x0a35, 0x0a36, 1}, + {0x0a38, 0x0a39, 1}, + {0x0a3c, 0x0a3e, 2}, + {0x0a3f, 0x0a42, 1}, + {0x0a47, 0x0a48, 1}, + {0x0a4b, 0x0a4d, 1}, + {0x0a51, 0x0a59, 8}, + {0x0a5a, 0x0a5c, 1}, + {0x0a5e, 0x0a66, 8}, + {0x0a67, 0x0a75, 1}, + {0x0a81, 0x0a83, 1}, + {0x0a85, 0x0a8d, 1}, + {0x0a8f, 0x0a91, 1}, + {0x0a93, 0x0aa8, 1}, + {0x0aaa, 0x0ab0, 1}, + {0x0ab2, 0x0ab3, 1}, + {0x0ab5, 0x0ab9, 1}, + {0x0abc, 0x0ac5, 1}, + {0x0ac7, 0x0ac9, 1}, + {0x0acb, 0x0acd, 1}, + {0x0ad0, 0x0ae0, 16}, + {0x0ae1, 0x0ae3, 1}, + {0x0ae6, 0x0af1, 1}, + {0x0b01, 0x0b03, 1}, + {0x0b05, 0x0b0c, 1}, + {0x0b0f, 0x0b10, 1}, + {0x0b13, 0x0b28, 1}, + {0x0b2a, 0x0b30, 1}, + {0x0b32, 0x0b33, 1}, + {0x0b35, 0x0b39, 1}, + {0x0b3c, 0x0b44, 1}, + {0x0b47, 0x0b48, 1}, + {0x0b4b, 0x0b4d, 1}, + {0x0b56, 0x0b57, 1}, + {0x0b5c, 0x0b5d, 1}, + {0x0b5f, 0x0b63, 1}, + {0x0b66, 0x0b77, 1}, + {0x0b82, 0x0b83, 1}, + {0x0b85, 0x0b8a, 1}, + {0x0b8e, 0x0b90, 1}, + {0x0b92, 0x0b95, 1}, + {0x0b99, 0x0b9a, 1}, + {0x0b9c, 0x0b9e, 2}, + {0x0b9f, 0x0ba3, 4}, + {0x0ba4, 0x0ba8, 4}, + {0x0ba9, 0x0baa, 1}, + {0x0bae, 0x0bb9, 1}, + {0x0bbe, 0x0bc2, 1}, + {0x0bc6, 0x0bc8, 1}, + {0x0bca, 0x0bcd, 1}, + {0x0bd0, 0x0bd7, 7}, + {0x0be6, 0x0bfa, 1}, + {0x0c01, 0x0c03, 1}, + {0x0c05, 0x0c0c, 1}, + {0x0c0e, 0x0c10, 1}, + {0x0c12, 0x0c28, 1}, + {0x0c2a, 0x0c33, 1}, + {0x0c35, 0x0c39, 1}, + {0x0c3d, 0x0c44, 1}, + {0x0c46, 0x0c48, 1}, + {0x0c4a, 0x0c4d, 1}, + {0x0c55, 0x0c56, 1}, + {0x0c58, 0x0c59, 1}, + {0x0c60, 0x0c63, 1}, + {0x0c66, 0x0c6f, 1}, + {0x0c78, 0x0c7f, 1}, + {0x0c82, 0x0c83, 1}, + {0x0c85, 0x0c8c, 1}, + {0x0c8e, 0x0c90, 1}, + {0x0c92, 0x0ca8, 1}, + {0x0caa, 0x0cb3, 1}, + {0x0cb5, 0x0cb9, 1}, + {0x0cbc, 0x0cc4, 1}, + {0x0cc6, 0x0cc8, 1}, + {0x0cca, 0x0ccd, 1}, + {0x0cd5, 0x0cd6, 1}, + {0x0cde, 0x0ce0, 2}, + {0x0ce1, 0x0ce3, 1}, + {0x0ce6, 0x0cef, 1}, + {0x0cf1, 0x0cf2, 1}, + {0x0d02, 0x0d03, 1}, + {0x0d05, 0x0d0c, 1}, + {0x0d0e, 0x0d10, 1}, + {0x0d12, 0x0d3a, 1}, + {0x0d3d, 0x0d44, 1}, + {0x0d46, 0x0d48, 1}, + {0x0d4a, 0x0d4e, 1}, + {0x0d57, 0x0d60, 9}, + {0x0d61, 0x0d63, 1}, + {0x0d66, 0x0d75, 1}, + {0x0d79, 0x0d7f, 1}, + {0x0d82, 0x0d83, 1}, + {0x0d85, 0x0d96, 1}, + {0x0d9a, 0x0db1, 1}, + {0x0db3, 0x0dbb, 1}, + {0x0dbd, 0x0dc0, 3}, + {0x0dc1, 0x0dc6, 1}, + {0x0dca, 0x0dcf, 5}, + {0x0dd0, 0x0dd4, 1}, + {0x0dd6, 0x0dd8, 2}, + {0x0dd9, 0x0ddf, 1}, + {0x0df2, 0x0df4, 1}, + {0x0e01, 0x0e3a, 1}, + {0x0e3f, 0x0e5b, 1}, + {0x0e81, 0x0e82, 1}, + {0x0e84, 0x0e87, 3}, + {0x0e88, 0x0e8a, 2}, + {0x0e8d, 0x0e94, 7}, + {0x0e95, 0x0e97, 1}, + {0x0e99, 0x0e9f, 1}, + {0x0ea1, 0x0ea3, 1}, + {0x0ea5, 0x0ea7, 2}, + {0x0eaa, 0x0eab, 1}, + {0x0ead, 0x0eb9, 1}, + {0x0ebb, 0x0ebd, 1}, + {0x0ec0, 0x0ec4, 1}, + {0x0ec6, 0x0ec8, 2}, + {0x0ec9, 0x0ecd, 1}, + {0x0ed0, 0x0ed9, 1}, + {0x0edc, 0x0edf, 1}, + {0x0f00, 0x0f47, 1}, + {0x0f49, 0x0f6c, 1}, + {0x0f71, 0x0f97, 1}, + {0x0f99, 0x0fbc, 1}, + {0x0fbe, 0x0fcc, 1}, + {0x0fce, 0x0fda, 1}, + {0x1000, 0x10c5, 1}, + {0x10c7, 0x10cd, 6}, + {0x10d0, 0x1248, 1}, + {0x124a, 0x124d, 1}, + {0x1250, 0x1256, 1}, + {0x1258, 0x125a, 2}, + {0x125b, 0x125d, 1}, + {0x1260, 0x1288, 1}, + {0x128a, 0x128d, 1}, + {0x1290, 0x12b0, 1}, + {0x12b2, 0x12b5, 1}, + {0x12b8, 0x12be, 1}, + {0x12c0, 0x12c2, 2}, + {0x12c3, 0x12c5, 1}, + {0x12c8, 0x12d6, 1}, + {0x12d8, 0x1310, 1}, + {0x1312, 0x1315, 1}, + {0x1318, 0x135a, 1}, + {0x135d, 0x137c, 1}, + {0x1380, 0x1399, 1}, + {0x13a0, 0x13f4, 1}, + {0x1400, 0x169c, 1}, + {0x16a0, 0x16f0, 1}, + {0x1700, 0x170c, 1}, + {0x170e, 0x1714, 1}, + {0x1720, 0x1736, 1}, + {0x1740, 0x1753, 1}, + {0x1760, 0x176c, 1}, + {0x176e, 0x1770, 1}, + {0x1772, 0x1773, 1}, + {0x1780, 0x17dd, 1}, + {0x17e0, 0x17e9, 1}, + {0x17f0, 0x17f9, 1}, + {0x1800, 0x180e, 1}, + {0x1810, 0x1819, 1}, + {0x1820, 0x1877, 1}, + {0x1880, 0x18aa, 1}, + {0x18b0, 0x18f5, 1}, + {0x1900, 0x191c, 1}, + {0x1920, 0x192b, 1}, + {0x1930, 0x193b, 1}, + {0x1940, 0x1944, 4}, + {0x1945, 0x196d, 1}, + {0x1970, 0x1974, 1}, + {0x1980, 0x19ab, 1}, + {0x19b0, 0x19c9, 1}, + {0x19d0, 0x19da, 1}, + {0x19de, 0x1a1b, 1}, + {0x1a1e, 0x1a5e, 1}, + {0x1a60, 0x1a7c, 1}, + {0x1a7f, 0x1a89, 1}, + {0x1a90, 0x1a99, 1}, + {0x1aa0, 0x1aad, 1}, + {0x1b00, 0x1b4b, 1}, + {0x1b50, 0x1b7c, 1}, + {0x1b80, 0x1bf3, 1}, + {0x1bfc, 0x1c37, 1}, + {0x1c3b, 0x1c49, 1}, + {0x1c4d, 0x1c7f, 1}, + {0x1cc0, 0x1cc7, 1}, + {0x1cd0, 0x1cf6, 1}, + {0x1d00, 0x1de6, 1}, + {0x1dfc, 0x1f15, 1}, + {0x1f18, 0x1f1d, 1}, + {0x1f20, 0x1f45, 1}, + {0x1f48, 0x1f4d, 1}, + {0x1f50, 0x1f57, 1}, + {0x1f59, 0x1f5f, 2}, + {0x1f60, 0x1f7d, 1}, + {0x1f80, 0x1fb4, 1}, + {0x1fb6, 0x1fc4, 1}, + {0x1fc6, 0x1fd3, 1}, + {0x1fd6, 0x1fdb, 1}, + {0x1fdd, 0x1fef, 1}, + {0x1ff2, 0x1ff4, 1}, + {0x1ff6, 0x1ffe, 1}, + {0x2000, 0x2064, 1}, + {0x2066, 0x2071, 1}, + {0x2074, 0x208e, 1}, + {0x2090, 0x209c, 1}, + {0x20a0, 0x20ba, 1}, + {0x20d0, 0x20f0, 1}, + {0x2100, 0x2189, 1}, + {0x2190, 0x23f3, 1}, + {0x2400, 0x2426, 1}, + {0x2440, 0x244a, 1}, + {0x2460, 0x26ff, 1}, + {0x2701, 0x2b4c, 1}, + {0x2b50, 0x2b59, 1}, + {0x2c00, 0x2c2e, 1}, + {0x2c30, 0x2c5e, 1}, + {0x2c60, 0x2cf3, 1}, + {0x2cf9, 0x2d25, 1}, + {0x2d27, 0x2d2d, 6}, + {0x2d30, 0x2d67, 1}, + {0x2d6f, 0x2d70, 1}, + {0x2d7f, 0x2d96, 1}, + {0x2da0, 0x2da6, 1}, + {0x2da8, 0x2dae, 1}, + {0x2db0, 0x2db6, 1}, + {0x2db8, 0x2dbe, 1}, + {0x2dc0, 0x2dc6, 1}, + {0x2dc8, 0x2dce, 1}, + {0x2dd0, 0x2dd6, 1}, + {0x2dd8, 0x2dde, 1}, + {0x2de0, 0x2e3b, 1}, + {0x2e80, 0x2e99, 1}, + {0x2e9b, 0x2ef3, 1}, + {0x2f00, 0x2fd5, 1}, + {0x2ff0, 0x2ffb, 1}, + {0x3000, 0x303f, 1}, + {0x3041, 0x3096, 1}, + {0x3099, 0x30ff, 1}, + {0x3105, 0x312d, 1}, + {0x3131, 0x318e, 1}, + {0x3190, 0x31ba, 1}, + {0x31c0, 0x31e3, 1}, + {0x31f0, 0x321e, 1}, + {0x3220, 0x32fe, 1}, + {0x3300, 0x4db5, 1}, + {0x4dc0, 0x9fcc, 1}, + {0xa000, 0xa48c, 1}, + {0xa490, 0xa4c6, 1}, + {0xa4d0, 0xa62b, 1}, + {0xa640, 0xa697, 1}, + {0xa69f, 0xa6f7, 1}, + {0xa700, 0xa78e, 1}, + {0xa790, 0xa793, 1}, + {0xa7a0, 0xa7aa, 1}, + {0xa7f8, 0xa82b, 1}, + {0xa830, 0xa839, 1}, + {0xa840, 0xa877, 1}, + {0xa880, 0xa8c4, 1}, + {0xa8ce, 0xa8d9, 1}, + {0xa8e0, 0xa8fb, 1}, + {0xa900, 0xa953, 1}, + {0xa95f, 0xa97c, 1}, + {0xa980, 0xa9cd, 1}, + {0xa9cf, 0xa9d9, 1}, + {0xa9de, 0xa9df, 1}, + {0xaa00, 0xaa36, 1}, + {0xaa40, 0xaa4d, 1}, + {0xaa50, 0xaa59, 1}, + {0xaa5c, 0xaa7b, 1}, + {0xaa80, 0xaac2, 1}, + {0xaadb, 0xaaf6, 1}, + {0xab01, 0xab06, 1}, + {0xab09, 0xab0e, 1}, + {0xab11, 0xab16, 1}, + {0xab20, 0xab26, 1}, + {0xab28, 0xab2e, 1}, + {0xabc0, 0xabed, 1}, + {0xabf0, 0xabf9, 1}, + {0xac00, 0xd7a3, 1}, + {0xd7b0, 0xd7c6, 1}, + {0xd7cb, 0xd7fb, 1}, + {0xd800, 0xfa6d, 1}, + {0xfa70, 0xfad9, 1}, + {0xfb00, 0xfb06, 1}, + {0xfb13, 0xfb17, 1}, + {0xfb1d, 0xfb36, 1}, + {0xfb38, 0xfb3c, 1}, + {0xfb3e, 0xfb40, 2}, + {0xfb41, 0xfb43, 2}, + {0xfb44, 0xfb46, 2}, + {0xfb47, 0xfbc1, 1}, + {0xfbd3, 0xfd3f, 1}, + {0xfd50, 0xfd8f, 1}, + {0xfd92, 0xfdc7, 1}, + {0xfdf0, 0xfdfd, 1}, + {0xfe00, 0xfe19, 1}, + {0xfe20, 0xfe26, 1}, + {0xfe30, 0xfe52, 1}, + {0xfe54, 0xfe66, 1}, + {0xfe68, 0xfe6b, 1}, + {0xfe70, 0xfe74, 1}, + {0xfe76, 0xfefc, 1}, + {0xfeff, 0xff01, 2}, + {0xff02, 0xffbe, 1}, + {0xffc2, 0xffc7, 1}, + {0xffca, 0xffcf, 1}, + {0xffd2, 0xffd7, 1}, + {0xffda, 0xffdc, 1}, + {0xffe0, 0xffe6, 1}, + {0xffe8, 0xffee, 1}, + {0xfff9, 0xfffd, 1}, + }, + R32: []unicode.Range32{ + {0x00010000, 0x0001000b, 1}, + {0x0001000d, 0x00010026, 1}, + {0x00010028, 0x0001003a, 1}, + {0x0001003c, 0x0001003d, 1}, + {0x0001003f, 0x0001004d, 1}, + {0x00010050, 0x0001005d, 1}, + {0x00010080, 0x000100fa, 1}, + {0x00010100, 0x00010102, 1}, + {0x00010107, 0x00010133, 1}, + {0x00010137, 0x0001018a, 1}, + {0x00010190, 0x0001019b, 1}, + {0x000101d0, 0x000101fd, 1}, + {0x00010280, 0x0001029c, 1}, + {0x000102a0, 0x000102d0, 1}, + {0x00010300, 0x0001031e, 1}, + {0x00010320, 0x00010323, 1}, + {0x00010330, 0x0001034a, 1}, + {0x00010380, 0x0001039d, 1}, + {0x0001039f, 0x000103c3, 1}, + {0x000103c8, 0x000103d5, 1}, + {0x00010400, 0x0001049d, 1}, + {0x000104a0, 0x000104a9, 1}, + {0x00010800, 0x00010805, 1}, + {0x00010808, 0x0001080a, 2}, + {0x0001080b, 0x00010835, 1}, + {0x00010837, 0x00010838, 1}, + {0x0001083c, 0x0001083f, 3}, + {0x00010840, 0x00010855, 1}, + {0x00010857, 0x0001085f, 1}, + {0x00010900, 0x0001091b, 1}, + {0x0001091f, 0x00010939, 1}, + {0x0001093f, 0x00010980, 65}, + {0x00010981, 0x000109b7, 1}, + {0x000109be, 0x000109bf, 1}, + {0x00010a00, 0x00010a03, 1}, + {0x00010a05, 0x00010a06, 1}, + {0x00010a0c, 0x00010a13, 1}, + {0x00010a15, 0x00010a17, 1}, + {0x00010a19, 0x00010a33, 1}, + {0x00010a38, 0x00010a3a, 1}, + {0x00010a3f, 0x00010a47, 1}, + {0x00010a50, 0x00010a58, 1}, + {0x00010a60, 0x00010a7f, 1}, + {0x00010b00, 0x00010b35, 1}, + {0x00010b39, 0x00010b55, 1}, + {0x00010b58, 0x00010b72, 1}, + {0x00010b78, 0x00010b7f, 1}, + {0x00010c00, 0x00010c48, 1}, + {0x00010e60, 0x00010e7e, 1}, + {0x00011000, 0x0001104d, 1}, + {0x00011052, 0x0001106f, 1}, + {0x00011080, 0x000110c1, 1}, + {0x000110d0, 0x000110e8, 1}, + {0x000110f0, 0x000110f9, 1}, + {0x00011100, 0x00011134, 1}, + {0x00011136, 0x00011143, 1}, + {0x00011180, 0x000111c8, 1}, + {0x000111d0, 0x000111d9, 1}, + {0x00011680, 0x000116b7, 1}, + {0x000116c0, 0x000116c9, 1}, + {0x00012000, 0x0001236e, 1}, + {0x00012400, 0x00012462, 1}, + {0x00012470, 0x00012473, 1}, + {0x00013000, 0x0001342e, 1}, + {0x00016800, 0x00016a38, 1}, + {0x00016f00, 0x00016f44, 1}, + {0x00016f50, 0x00016f7e, 1}, + {0x00016f8f, 0x00016f9f, 1}, + {0x0001b000, 0x0001b001, 1}, + {0x0001d000, 0x0001d0f5, 1}, + {0x0001d100, 0x0001d126, 1}, + {0x0001d129, 0x0001d1dd, 1}, + {0x0001d200, 0x0001d245, 1}, + {0x0001d300, 0x0001d356, 1}, + {0x0001d360, 0x0001d371, 1}, + {0x0001d400, 0x0001d454, 1}, + {0x0001d456, 0x0001d49c, 1}, + {0x0001d49e, 0x0001d49f, 1}, + {0x0001d4a2, 0x0001d4a5, 3}, + {0x0001d4a6, 0x0001d4a9, 3}, + {0x0001d4aa, 0x0001d4ac, 1}, + {0x0001d4ae, 0x0001d4b9, 1}, + {0x0001d4bb, 0x0001d4bd, 2}, + {0x0001d4be, 0x0001d4c3, 1}, + {0x0001d4c5, 0x0001d505, 1}, + {0x0001d507, 0x0001d50a, 1}, + {0x0001d50d, 0x0001d514, 1}, + {0x0001d516, 0x0001d51c, 1}, + {0x0001d51e, 0x0001d539, 1}, + {0x0001d53b, 0x0001d53e, 1}, + {0x0001d540, 0x0001d544, 1}, + {0x0001d546, 0x0001d54a, 4}, + {0x0001d54b, 0x0001d550, 1}, + {0x0001d552, 0x0001d6a5, 1}, + {0x0001d6a8, 0x0001d7cb, 1}, + {0x0001d7ce, 0x0001d7ff, 1}, + {0x0001ee00, 0x0001ee03, 1}, + {0x0001ee05, 0x0001ee1f, 1}, + {0x0001ee21, 0x0001ee22, 1}, + {0x0001ee24, 0x0001ee27, 3}, + {0x0001ee29, 0x0001ee32, 1}, + {0x0001ee34, 0x0001ee37, 1}, + {0x0001ee39, 0x0001ee3b, 2}, + {0x0001ee42, 0x0001ee47, 5}, + {0x0001ee49, 0x0001ee4d, 2}, + {0x0001ee4e, 0x0001ee4f, 1}, + {0x0001ee51, 0x0001ee52, 1}, + {0x0001ee54, 0x0001ee57, 3}, + {0x0001ee59, 0x0001ee61, 2}, + {0x0001ee62, 0x0001ee64, 2}, + {0x0001ee67, 0x0001ee6a, 1}, + {0x0001ee6c, 0x0001ee72, 1}, + {0x0001ee74, 0x0001ee77, 1}, + {0x0001ee79, 0x0001ee7c, 1}, + {0x0001ee7e, 0x0001ee80, 2}, + {0x0001ee81, 0x0001ee89, 1}, + {0x0001ee8b, 0x0001ee9b, 1}, + {0x0001eea1, 0x0001eea3, 1}, + {0x0001eea5, 0x0001eea9, 1}, + {0x0001eeab, 0x0001eebb, 1}, + {0x0001eef0, 0x0001eef1, 1}, + {0x0001f000, 0x0001f02b, 1}, + {0x0001f030, 0x0001f093, 1}, + {0x0001f0a0, 0x0001f0ae, 1}, + {0x0001f0b1, 0x0001f0be, 1}, + {0x0001f0c1, 0x0001f0cf, 1}, + {0x0001f0d1, 0x0001f0df, 1}, + {0x0001f100, 0x0001f10a, 1}, + {0x0001f110, 0x0001f12e, 1}, + {0x0001f130, 0x0001f16b, 1}, + {0x0001f170, 0x0001f19a, 1}, + {0x0001f1e6, 0x0001f202, 1}, + {0x0001f210, 0x0001f23a, 1}, + {0x0001f240, 0x0001f248, 1}, + {0x0001f250, 0x0001f251, 1}, + {0x0001f300, 0x0001f320, 1}, + {0x0001f330, 0x0001f335, 1}, + {0x0001f337, 0x0001f37c, 1}, + {0x0001f380, 0x0001f393, 1}, + {0x0001f3a0, 0x0001f3c4, 1}, + {0x0001f3c6, 0x0001f3ca, 1}, + {0x0001f3e0, 0x0001f3f0, 1}, + {0x0001f400, 0x0001f43e, 1}, + {0x0001f440, 0x0001f442, 2}, + {0x0001f443, 0x0001f4f7, 1}, + {0x0001f4f9, 0x0001f4fc, 1}, + {0x0001f500, 0x0001f53d, 1}, + {0x0001f540, 0x0001f543, 1}, + {0x0001f550, 0x0001f567, 1}, + {0x0001f5fb, 0x0001f640, 1}, + {0x0001f645, 0x0001f64f, 1}, + {0x0001f680, 0x0001f6c5, 1}, + {0x0001f700, 0x0001f773, 1}, + {0x00020000, 0x0002a6d6, 1}, + {0x0002a700, 0x0002b734, 1}, + {0x0002b740, 0x0002b81d, 1}, + {0x0002f800, 0x0002fa1d, 1}, + {0x000e0001, 0x000e0020, 31}, + {0x000e0021, 0x000e007f, 1}, + {0x000e0100, 0x000e01ef, 1}, + {0x000f0000, 0x000ffffd, 1}, + {0x00100000, 0x0010fffd, 1}, + }, + LatinOffset: 0, +} + +// size 3812 bytes (3 KiB) +var assigned6_0_0 = &unicode.RangeTable{ + R16: []unicode.Range16{ + {0x0000, 0x0377, 1}, + {0x037a, 0x037e, 1}, + {0x0384, 0x038a, 1}, + {0x038c, 0x038e, 2}, + {0x038f, 0x03a1, 1}, + {0x03a3, 0x0527, 1}, + {0x0531, 0x0556, 1}, + {0x0559, 0x055f, 1}, + {0x0561, 0x0587, 1}, + {0x0589, 0x058a, 1}, + {0x0591, 0x05c7, 1}, + {0x05d0, 0x05ea, 1}, + {0x05f0, 0x05f4, 1}, + {0x0600, 0x0603, 1}, + {0x0606, 0x061b, 1}, + {0x061e, 0x070d, 1}, + {0x070f, 0x074a, 1}, + {0x074d, 0x07b1, 1}, + {0x07c0, 0x07fa, 1}, + {0x0800, 0x082d, 1}, + {0x0830, 0x083e, 1}, + {0x0840, 0x085b, 1}, + {0x085e, 0x0900, 162}, + {0x0901, 0x0977, 1}, + {0x0979, 0x097f, 1}, + {0x0981, 0x0983, 1}, + {0x0985, 0x098c, 1}, + {0x098f, 0x0990, 1}, + {0x0993, 0x09a8, 1}, + {0x09aa, 0x09b0, 1}, + {0x09b2, 0x09b6, 4}, + {0x09b7, 0x09b9, 1}, + {0x09bc, 0x09c4, 1}, + {0x09c7, 0x09c8, 1}, + {0x09cb, 0x09ce, 1}, + {0x09d7, 0x09dc, 5}, + {0x09dd, 0x09df, 2}, + {0x09e0, 0x09e3, 1}, + {0x09e6, 0x09fb, 1}, + {0x0a01, 0x0a03, 1}, + {0x0a05, 0x0a0a, 1}, + {0x0a0f, 0x0a10, 1}, + {0x0a13, 0x0a28, 1}, + {0x0a2a, 0x0a30, 1}, + {0x0a32, 0x0a33, 1}, + {0x0a35, 0x0a36, 1}, + {0x0a38, 0x0a39, 1}, + {0x0a3c, 0x0a3e, 2}, + {0x0a3f, 0x0a42, 1}, + {0x0a47, 0x0a48, 1}, + {0x0a4b, 0x0a4d, 1}, + {0x0a51, 0x0a59, 8}, + {0x0a5a, 0x0a5c, 1}, + {0x0a5e, 0x0a66, 8}, + {0x0a67, 0x0a75, 1}, + {0x0a81, 0x0a83, 1}, + {0x0a85, 0x0a8d, 1}, + {0x0a8f, 0x0a91, 1}, + {0x0a93, 0x0aa8, 1}, + {0x0aaa, 0x0ab0, 1}, + {0x0ab2, 0x0ab3, 1}, + {0x0ab5, 0x0ab9, 1}, + {0x0abc, 0x0ac5, 1}, + {0x0ac7, 0x0ac9, 1}, + {0x0acb, 0x0acd, 1}, + {0x0ad0, 0x0ae0, 16}, + {0x0ae1, 0x0ae3, 1}, + {0x0ae6, 0x0aef, 1}, + {0x0af1, 0x0b01, 16}, + {0x0b02, 0x0b03, 1}, + {0x0b05, 0x0b0c, 1}, + {0x0b0f, 0x0b10, 1}, + {0x0b13, 0x0b28, 1}, + {0x0b2a, 0x0b30, 1}, + {0x0b32, 0x0b33, 1}, + {0x0b35, 0x0b39, 1}, + {0x0b3c, 0x0b44, 1}, + {0x0b47, 0x0b48, 1}, + {0x0b4b, 0x0b4d, 1}, + {0x0b56, 0x0b57, 1}, + {0x0b5c, 0x0b5d, 1}, + {0x0b5f, 0x0b63, 1}, + {0x0b66, 0x0b77, 1}, + {0x0b82, 0x0b83, 1}, + {0x0b85, 0x0b8a, 1}, + {0x0b8e, 0x0b90, 1}, + {0x0b92, 0x0b95, 1}, + {0x0b99, 0x0b9a, 1}, + {0x0b9c, 0x0b9e, 2}, + {0x0b9f, 0x0ba3, 4}, + {0x0ba4, 0x0ba8, 4}, + {0x0ba9, 0x0baa, 1}, + {0x0bae, 0x0bb9, 1}, + {0x0bbe, 0x0bc2, 1}, + {0x0bc6, 0x0bc8, 1}, + {0x0bca, 0x0bcd, 1}, + {0x0bd0, 0x0bd7, 7}, + {0x0be6, 0x0bfa, 1}, + {0x0c01, 0x0c03, 1}, + {0x0c05, 0x0c0c, 1}, + {0x0c0e, 0x0c10, 1}, + {0x0c12, 0x0c28, 1}, + {0x0c2a, 0x0c33, 1}, + {0x0c35, 0x0c39, 1}, + {0x0c3d, 0x0c44, 1}, + {0x0c46, 0x0c48, 1}, + {0x0c4a, 0x0c4d, 1}, + {0x0c55, 0x0c56, 1}, + {0x0c58, 0x0c59, 1}, + {0x0c60, 0x0c63, 1}, + {0x0c66, 0x0c6f, 1}, + {0x0c78, 0x0c7f, 1}, + {0x0c82, 0x0c83, 1}, + {0x0c85, 0x0c8c, 1}, + {0x0c8e, 0x0c90, 1}, + {0x0c92, 0x0ca8, 1}, + {0x0caa, 0x0cb3, 1}, + {0x0cb5, 0x0cb9, 1}, + {0x0cbc, 0x0cc4, 1}, + {0x0cc6, 0x0cc8, 1}, + {0x0cca, 0x0ccd, 1}, + {0x0cd5, 0x0cd6, 1}, + {0x0cde, 0x0ce0, 2}, + {0x0ce1, 0x0ce3, 1}, + {0x0ce6, 0x0cef, 1}, + {0x0cf1, 0x0cf2, 1}, + {0x0d02, 0x0d03, 1}, + {0x0d05, 0x0d0c, 1}, + {0x0d0e, 0x0d10, 1}, + {0x0d12, 0x0d3a, 1}, + {0x0d3d, 0x0d44, 1}, + {0x0d46, 0x0d48, 1}, + {0x0d4a, 0x0d4e, 1}, + {0x0d57, 0x0d60, 9}, + {0x0d61, 0x0d63, 1}, + {0x0d66, 0x0d75, 1}, + {0x0d79, 0x0d7f, 1}, + {0x0d82, 0x0d83, 1}, + {0x0d85, 0x0d96, 1}, + {0x0d9a, 0x0db1, 1}, + {0x0db3, 0x0dbb, 1}, + {0x0dbd, 0x0dc0, 3}, + {0x0dc1, 0x0dc6, 1}, + {0x0dca, 0x0dcf, 5}, + {0x0dd0, 0x0dd4, 1}, + {0x0dd6, 0x0dd8, 2}, + {0x0dd9, 0x0ddf, 1}, + {0x0df2, 0x0df4, 1}, + {0x0e01, 0x0e3a, 1}, + {0x0e3f, 0x0e5b, 1}, + {0x0e81, 0x0e82, 1}, + {0x0e84, 0x0e87, 3}, + {0x0e88, 0x0e8a, 2}, + {0x0e8d, 0x0e94, 7}, + {0x0e95, 0x0e97, 1}, + {0x0e99, 0x0e9f, 1}, + {0x0ea1, 0x0ea3, 1}, + {0x0ea5, 0x0ea7, 2}, + {0x0eaa, 0x0eab, 1}, + {0x0ead, 0x0eb9, 1}, + {0x0ebb, 0x0ebd, 1}, + {0x0ec0, 0x0ec4, 1}, + {0x0ec6, 0x0ec8, 2}, + {0x0ec9, 0x0ecd, 1}, + {0x0ed0, 0x0ed9, 1}, + {0x0edc, 0x0edd, 1}, + {0x0f00, 0x0f47, 1}, + {0x0f49, 0x0f6c, 1}, + {0x0f71, 0x0f97, 1}, + {0x0f99, 0x0fbc, 1}, + {0x0fbe, 0x0fcc, 1}, + {0x0fce, 0x0fda, 1}, + {0x1000, 0x10c5, 1}, + {0x10d0, 0x10fc, 1}, + {0x1100, 0x1248, 1}, + {0x124a, 0x124d, 1}, + {0x1250, 0x1256, 1}, + {0x1258, 0x125a, 2}, + {0x125b, 0x125d, 1}, + {0x1260, 0x1288, 1}, + {0x128a, 0x128d, 1}, + {0x1290, 0x12b0, 1}, + {0x12b2, 0x12b5, 1}, + {0x12b8, 0x12be, 1}, + {0x12c0, 0x12c2, 2}, + {0x12c3, 0x12c5, 1}, + {0x12c8, 0x12d6, 1}, + {0x12d8, 0x1310, 1}, + {0x1312, 0x1315, 1}, + {0x1318, 0x135a, 1}, + {0x135d, 0x137c, 1}, + {0x1380, 0x1399, 1}, + {0x13a0, 0x13f4, 1}, + {0x1400, 0x169c, 1}, + {0x16a0, 0x16f0, 1}, + {0x1700, 0x170c, 1}, + {0x170e, 0x1714, 1}, + {0x1720, 0x1736, 1}, + {0x1740, 0x1753, 1}, + {0x1760, 0x176c, 1}, + {0x176e, 0x1770, 1}, + {0x1772, 0x1773, 1}, + {0x1780, 0x17dd, 1}, + {0x17e0, 0x17e9, 1}, + {0x17f0, 0x17f9, 1}, + {0x1800, 0x180e, 1}, + {0x1810, 0x1819, 1}, + {0x1820, 0x1877, 1}, + {0x1880, 0x18aa, 1}, + {0x18b0, 0x18f5, 1}, + {0x1900, 0x191c, 1}, + {0x1920, 0x192b, 1}, + {0x1930, 0x193b, 1}, + {0x1940, 0x1944, 4}, + {0x1945, 0x196d, 1}, + {0x1970, 0x1974, 1}, + {0x1980, 0x19ab, 1}, + {0x19b0, 0x19c9, 1}, + {0x19d0, 0x19da, 1}, + {0x19de, 0x1a1b, 1}, + {0x1a1e, 0x1a5e, 1}, + {0x1a60, 0x1a7c, 1}, + {0x1a7f, 0x1a89, 1}, + {0x1a90, 0x1a99, 1}, + {0x1aa0, 0x1aad, 1}, + {0x1b00, 0x1b4b, 1}, + {0x1b50, 0x1b7c, 1}, + {0x1b80, 0x1baa, 1}, + {0x1bae, 0x1bb9, 1}, + {0x1bc0, 0x1bf3, 1}, + {0x1bfc, 0x1c37, 1}, + {0x1c3b, 0x1c49, 1}, + {0x1c4d, 0x1c7f, 1}, + {0x1cd0, 0x1cf2, 1}, + {0x1d00, 0x1de6, 1}, + {0x1dfc, 0x1f15, 1}, + {0x1f18, 0x1f1d, 1}, + {0x1f20, 0x1f45, 1}, + {0x1f48, 0x1f4d, 1}, + {0x1f50, 0x1f57, 1}, + {0x1f59, 0x1f5f, 2}, + {0x1f60, 0x1f7d, 1}, + {0x1f80, 0x1fb4, 1}, + {0x1fb6, 0x1fc4, 1}, + {0x1fc6, 0x1fd3, 1}, + {0x1fd6, 0x1fdb, 1}, + {0x1fdd, 0x1fef, 1}, + {0x1ff2, 0x1ff4, 1}, + {0x1ff6, 0x1ffe, 1}, + {0x2000, 0x2064, 1}, + {0x206a, 0x2071, 1}, + {0x2074, 0x208e, 1}, + {0x2090, 0x209c, 1}, + {0x20a0, 0x20b9, 1}, + {0x20d0, 0x20f0, 1}, + {0x2100, 0x2189, 1}, + {0x2190, 0x23f3, 1}, + {0x2400, 0x2426, 1}, + {0x2440, 0x244a, 1}, + {0x2460, 0x26ff, 1}, + {0x2701, 0x27ca, 1}, + {0x27cc, 0x27ce, 2}, + {0x27cf, 0x2b4c, 1}, + {0x2b50, 0x2b59, 1}, + {0x2c00, 0x2c2e, 1}, + {0x2c30, 0x2c5e, 1}, + {0x2c60, 0x2cf1, 1}, + {0x2cf9, 0x2d25, 1}, + {0x2d30, 0x2d65, 1}, + {0x2d6f, 0x2d70, 1}, + {0x2d7f, 0x2d96, 1}, + {0x2da0, 0x2da6, 1}, + {0x2da8, 0x2dae, 1}, + {0x2db0, 0x2db6, 1}, + {0x2db8, 0x2dbe, 1}, + {0x2dc0, 0x2dc6, 1}, + {0x2dc8, 0x2dce, 1}, + {0x2dd0, 0x2dd6, 1}, + {0x2dd8, 0x2dde, 1}, + {0x2de0, 0x2e31, 1}, + {0x2e80, 0x2e99, 1}, + {0x2e9b, 0x2ef3, 1}, + {0x2f00, 0x2fd5, 1}, + {0x2ff0, 0x2ffb, 1}, + {0x3000, 0x303f, 1}, + {0x3041, 0x3096, 1}, + {0x3099, 0x30ff, 1}, + {0x3105, 0x312d, 1}, + {0x3131, 0x318e, 1}, + {0x3190, 0x31ba, 1}, + {0x31c0, 0x31e3, 1}, + {0x31f0, 0x321e, 1}, + {0x3220, 0x32fe, 1}, + {0x3300, 0x4db5, 1}, + {0x4dc0, 0x9fcb, 1}, + {0xa000, 0xa48c, 1}, + {0xa490, 0xa4c6, 1}, + {0xa4d0, 0xa62b, 1}, + {0xa640, 0xa673, 1}, + {0xa67c, 0xa697, 1}, + {0xa6a0, 0xa6f7, 1}, + {0xa700, 0xa78e, 1}, + {0xa790, 0xa791, 1}, + {0xa7a0, 0xa7a9, 1}, + {0xa7fa, 0xa82b, 1}, + {0xa830, 0xa839, 1}, + {0xa840, 0xa877, 1}, + {0xa880, 0xa8c4, 1}, + {0xa8ce, 0xa8d9, 1}, + {0xa8e0, 0xa8fb, 1}, + {0xa900, 0xa953, 1}, + {0xa95f, 0xa97c, 1}, + {0xa980, 0xa9cd, 1}, + {0xa9cf, 0xa9d9, 1}, + {0xa9de, 0xa9df, 1}, + {0xaa00, 0xaa36, 1}, + {0xaa40, 0xaa4d, 1}, + {0xaa50, 0xaa59, 1}, + {0xaa5c, 0xaa7b, 1}, + {0xaa80, 0xaac2, 1}, + {0xaadb, 0xaadf, 1}, + {0xab01, 0xab06, 1}, + {0xab09, 0xab0e, 1}, + {0xab11, 0xab16, 1}, + {0xab20, 0xab26, 1}, + {0xab28, 0xab2e, 1}, + {0xabc0, 0xabed, 1}, + {0xabf0, 0xabf9, 1}, + {0xac00, 0xd7a3, 1}, + {0xd7b0, 0xd7c6, 1}, + {0xd7cb, 0xd7fb, 1}, + {0xd800, 0xfa2d, 1}, + {0xfa30, 0xfa6d, 1}, + {0xfa70, 0xfad9, 1}, + {0xfb00, 0xfb06, 1}, + {0xfb13, 0xfb17, 1}, + {0xfb1d, 0xfb36, 1}, + {0xfb38, 0xfb3c, 1}, + {0xfb3e, 0xfb40, 2}, + {0xfb41, 0xfb43, 2}, + {0xfb44, 0xfb46, 2}, + {0xfb47, 0xfbc1, 1}, + {0xfbd3, 0xfd3f, 1}, + {0xfd50, 0xfd8f, 1}, + {0xfd92, 0xfdc7, 1}, + {0xfdf0, 0xfdfd, 1}, + {0xfe00, 0xfe19, 1}, + {0xfe20, 0xfe26, 1}, + {0xfe30, 0xfe52, 1}, + {0xfe54, 0xfe66, 1}, + {0xfe68, 0xfe6b, 1}, + {0xfe70, 0xfe74, 1}, + {0xfe76, 0xfefc, 1}, + {0xfeff, 0xff01, 2}, + {0xff02, 0xffbe, 1}, + {0xffc2, 0xffc7, 1}, + {0xffca, 0xffcf, 1}, + {0xffd2, 0xffd7, 1}, + {0xffda, 0xffdc, 1}, + {0xffe0, 0xffe6, 1}, + {0xffe8, 0xffee, 1}, + {0xfff9, 0xfffd, 1}, + }, + R32: []unicode.Range32{ + {0x00010000, 0x0001000b, 1}, + {0x0001000d, 0x00010026, 1}, + {0x00010028, 0x0001003a, 1}, + {0x0001003c, 0x0001003d, 1}, + {0x0001003f, 0x0001004d, 1}, + {0x00010050, 0x0001005d, 1}, + {0x00010080, 0x000100fa, 1}, + {0x00010100, 0x00010102, 1}, + {0x00010107, 0x00010133, 1}, + {0x00010137, 0x0001018a, 1}, + {0x00010190, 0x0001019b, 1}, + {0x000101d0, 0x000101fd, 1}, + {0x00010280, 0x0001029c, 1}, + {0x000102a0, 0x000102d0, 1}, + {0x00010300, 0x0001031e, 1}, + {0x00010320, 0x00010323, 1}, + {0x00010330, 0x0001034a, 1}, + {0x00010380, 0x0001039d, 1}, + {0x0001039f, 0x000103c3, 1}, + {0x000103c8, 0x000103d5, 1}, + {0x00010400, 0x0001049d, 1}, + {0x000104a0, 0x000104a9, 1}, + {0x00010800, 0x00010805, 1}, + {0x00010808, 0x0001080a, 2}, + {0x0001080b, 0x00010835, 1}, + {0x00010837, 0x00010838, 1}, + {0x0001083c, 0x0001083f, 3}, + {0x00010840, 0x00010855, 1}, + {0x00010857, 0x0001085f, 1}, + {0x00010900, 0x0001091b, 1}, + {0x0001091f, 0x00010939, 1}, + {0x0001093f, 0x00010a00, 193}, + {0x00010a01, 0x00010a03, 1}, + {0x00010a05, 0x00010a06, 1}, + {0x00010a0c, 0x00010a13, 1}, + {0x00010a15, 0x00010a17, 1}, + {0x00010a19, 0x00010a33, 1}, + {0x00010a38, 0x00010a3a, 1}, + {0x00010a3f, 0x00010a47, 1}, + {0x00010a50, 0x00010a58, 1}, + {0x00010a60, 0x00010a7f, 1}, + {0x00010b00, 0x00010b35, 1}, + {0x00010b39, 0x00010b55, 1}, + {0x00010b58, 0x00010b72, 1}, + {0x00010b78, 0x00010b7f, 1}, + {0x00010c00, 0x00010c48, 1}, + {0x00010e60, 0x00010e7e, 1}, + {0x00011000, 0x0001104d, 1}, + {0x00011052, 0x0001106f, 1}, + {0x00011080, 0x000110c1, 1}, + {0x00012000, 0x0001236e, 1}, + {0x00012400, 0x00012462, 1}, + {0x00012470, 0x00012473, 1}, + {0x00013000, 0x0001342e, 1}, + {0x00016800, 0x00016a38, 1}, + {0x0001b000, 0x0001b001, 1}, + {0x0001d000, 0x0001d0f5, 1}, + {0x0001d100, 0x0001d126, 1}, + {0x0001d129, 0x0001d1dd, 1}, + {0x0001d200, 0x0001d245, 1}, + {0x0001d300, 0x0001d356, 1}, + {0x0001d360, 0x0001d371, 1}, + {0x0001d400, 0x0001d454, 1}, + {0x0001d456, 0x0001d49c, 1}, + {0x0001d49e, 0x0001d49f, 1}, + {0x0001d4a2, 0x0001d4a5, 3}, + {0x0001d4a6, 0x0001d4a9, 3}, + {0x0001d4aa, 0x0001d4ac, 1}, + {0x0001d4ae, 0x0001d4b9, 1}, + {0x0001d4bb, 0x0001d4bd, 2}, + {0x0001d4be, 0x0001d4c3, 1}, + {0x0001d4c5, 0x0001d505, 1}, + {0x0001d507, 0x0001d50a, 1}, + {0x0001d50d, 0x0001d514, 1}, + {0x0001d516, 0x0001d51c, 1}, + {0x0001d51e, 0x0001d539, 1}, + {0x0001d53b, 0x0001d53e, 1}, + {0x0001d540, 0x0001d544, 1}, + {0x0001d546, 0x0001d54a, 4}, + {0x0001d54b, 0x0001d550, 1}, + {0x0001d552, 0x0001d6a5, 1}, + {0x0001d6a8, 0x0001d7cb, 1}, + {0x0001d7ce, 0x0001d7ff, 1}, + {0x0001f000, 0x0001f02b, 1}, + {0x0001f030, 0x0001f093, 1}, + {0x0001f0a0, 0x0001f0ae, 1}, + {0x0001f0b1, 0x0001f0be, 1}, + {0x0001f0c1, 0x0001f0cf, 1}, + {0x0001f0d1, 0x0001f0df, 1}, + {0x0001f100, 0x0001f10a, 1}, + {0x0001f110, 0x0001f12e, 1}, + {0x0001f130, 0x0001f169, 1}, + {0x0001f170, 0x0001f19a, 1}, + {0x0001f1e6, 0x0001f202, 1}, + {0x0001f210, 0x0001f23a, 1}, + {0x0001f240, 0x0001f248, 1}, + {0x0001f250, 0x0001f251, 1}, + {0x0001f300, 0x0001f320, 1}, + {0x0001f330, 0x0001f335, 1}, + {0x0001f337, 0x0001f37c, 1}, + {0x0001f380, 0x0001f393, 1}, + {0x0001f3a0, 0x0001f3c4, 1}, + {0x0001f3c6, 0x0001f3ca, 1}, + {0x0001f3e0, 0x0001f3f0, 1}, + {0x0001f400, 0x0001f43e, 1}, + {0x0001f440, 0x0001f442, 2}, + {0x0001f443, 0x0001f4f7, 1}, + {0x0001f4f9, 0x0001f4fc, 1}, + {0x0001f500, 0x0001f53d, 1}, + {0x0001f550, 0x0001f567, 1}, + {0x0001f5fb, 0x0001f5ff, 1}, + {0x0001f601, 0x0001f610, 1}, + {0x0001f612, 0x0001f614, 1}, + {0x0001f616, 0x0001f61c, 2}, + {0x0001f61d, 0x0001f61e, 1}, + {0x0001f620, 0x0001f625, 1}, + {0x0001f628, 0x0001f62b, 1}, + {0x0001f62d, 0x0001f630, 3}, + {0x0001f631, 0x0001f633, 1}, + {0x0001f635, 0x0001f640, 1}, + {0x0001f645, 0x0001f64f, 1}, + {0x0001f680, 0x0001f6c5, 1}, + {0x0001f700, 0x0001f773, 1}, + {0x00020000, 0x0002a6d6, 1}, + {0x0002a700, 0x0002b734, 1}, + {0x0002b740, 0x0002b81d, 1}, + {0x0002f800, 0x0002fa1d, 1}, + {0x000e0001, 0x000e0020, 31}, + {0x000e0021, 0x000e007f, 1}, + {0x000e0100, 0x000e01ef, 1}, + {0x000f0000, 0x000ffffd, 1}, + {0x00100000, 0x0010fffd, 1}, + }, + LatinOffset: 0, +} + +// size 4898 bytes (4 KiB) +var assigned7_0_0 = &unicode.RangeTable{ + R16: []unicode.Range16{ + {0x0000, 0x0377, 1}, + {0x037a, 0x037f, 1}, + {0x0384, 0x038a, 1}, + {0x038c, 0x038e, 2}, + {0x038f, 0x03a1, 1}, + {0x03a3, 0x052f, 1}, + {0x0531, 0x0556, 1}, + {0x0559, 0x055f, 1}, + {0x0561, 0x0587, 1}, + {0x0589, 0x058a, 1}, + {0x058d, 0x058f, 1}, + {0x0591, 0x05c7, 1}, + {0x05d0, 0x05ea, 1}, + {0x05f0, 0x05f4, 1}, + {0x0600, 0x061c, 1}, + {0x061e, 0x070d, 1}, + {0x070f, 0x074a, 1}, + {0x074d, 0x07b1, 1}, + {0x07c0, 0x07fa, 1}, + {0x0800, 0x082d, 1}, + {0x0830, 0x083e, 1}, + {0x0840, 0x085b, 1}, + {0x085e, 0x08a0, 66}, + {0x08a1, 0x08b2, 1}, + {0x08e4, 0x0983, 1}, + {0x0985, 0x098c, 1}, + {0x098f, 0x0990, 1}, + {0x0993, 0x09a8, 1}, + {0x09aa, 0x09b0, 1}, + {0x09b2, 0x09b6, 4}, + {0x09b7, 0x09b9, 1}, + {0x09bc, 0x09c4, 1}, + {0x09c7, 0x09c8, 1}, + {0x09cb, 0x09ce, 1}, + {0x09d7, 0x09dc, 5}, + {0x09dd, 0x09df, 2}, + {0x09e0, 0x09e3, 1}, + {0x09e6, 0x09fb, 1}, + {0x0a01, 0x0a03, 1}, + {0x0a05, 0x0a0a, 1}, + {0x0a0f, 0x0a10, 1}, + {0x0a13, 0x0a28, 1}, + {0x0a2a, 0x0a30, 1}, + {0x0a32, 0x0a33, 1}, + {0x0a35, 0x0a36, 1}, + {0x0a38, 0x0a39, 1}, + {0x0a3c, 0x0a3e, 2}, + {0x0a3f, 0x0a42, 1}, + {0x0a47, 0x0a48, 1}, + {0x0a4b, 0x0a4d, 1}, + {0x0a51, 0x0a59, 8}, + {0x0a5a, 0x0a5c, 1}, + {0x0a5e, 0x0a66, 8}, + {0x0a67, 0x0a75, 1}, + {0x0a81, 0x0a83, 1}, + {0x0a85, 0x0a8d, 1}, + {0x0a8f, 0x0a91, 1}, + {0x0a93, 0x0aa8, 1}, + {0x0aaa, 0x0ab0, 1}, + {0x0ab2, 0x0ab3, 1}, + {0x0ab5, 0x0ab9, 1}, + {0x0abc, 0x0ac5, 1}, + {0x0ac7, 0x0ac9, 1}, + {0x0acb, 0x0acd, 1}, + {0x0ad0, 0x0ae0, 16}, + {0x0ae1, 0x0ae3, 1}, + {0x0ae6, 0x0af1, 1}, + {0x0b01, 0x0b03, 1}, + {0x0b05, 0x0b0c, 1}, + {0x0b0f, 0x0b10, 1}, + {0x0b13, 0x0b28, 1}, + {0x0b2a, 0x0b30, 1}, + {0x0b32, 0x0b33, 1}, + {0x0b35, 0x0b39, 1}, + {0x0b3c, 0x0b44, 1}, + {0x0b47, 0x0b48, 1}, + {0x0b4b, 0x0b4d, 1}, + {0x0b56, 0x0b57, 1}, + {0x0b5c, 0x0b5d, 1}, + {0x0b5f, 0x0b63, 1}, + {0x0b66, 0x0b77, 1}, + {0x0b82, 0x0b83, 1}, + {0x0b85, 0x0b8a, 1}, + {0x0b8e, 0x0b90, 1}, + {0x0b92, 0x0b95, 1}, + {0x0b99, 0x0b9a, 1}, + {0x0b9c, 0x0b9e, 2}, + {0x0b9f, 0x0ba3, 4}, + {0x0ba4, 0x0ba8, 4}, + {0x0ba9, 0x0baa, 1}, + {0x0bae, 0x0bb9, 1}, + {0x0bbe, 0x0bc2, 1}, + {0x0bc6, 0x0bc8, 1}, + {0x0bca, 0x0bcd, 1}, + {0x0bd0, 0x0bd7, 7}, + {0x0be6, 0x0bfa, 1}, + {0x0c00, 0x0c03, 1}, + {0x0c05, 0x0c0c, 1}, + {0x0c0e, 0x0c10, 1}, + {0x0c12, 0x0c28, 1}, + {0x0c2a, 0x0c39, 1}, + {0x0c3d, 0x0c44, 1}, + {0x0c46, 0x0c48, 1}, + {0x0c4a, 0x0c4d, 1}, + {0x0c55, 0x0c56, 1}, + {0x0c58, 0x0c59, 1}, + {0x0c60, 0x0c63, 1}, + {0x0c66, 0x0c6f, 1}, + {0x0c78, 0x0c7f, 1}, + {0x0c81, 0x0c83, 1}, + {0x0c85, 0x0c8c, 1}, + {0x0c8e, 0x0c90, 1}, + {0x0c92, 0x0ca8, 1}, + {0x0caa, 0x0cb3, 1}, + {0x0cb5, 0x0cb9, 1}, + {0x0cbc, 0x0cc4, 1}, + {0x0cc6, 0x0cc8, 1}, + {0x0cca, 0x0ccd, 1}, + {0x0cd5, 0x0cd6, 1}, + {0x0cde, 0x0ce0, 2}, + {0x0ce1, 0x0ce3, 1}, + {0x0ce6, 0x0cef, 1}, + {0x0cf1, 0x0cf2, 1}, + {0x0d01, 0x0d03, 1}, + {0x0d05, 0x0d0c, 1}, + {0x0d0e, 0x0d10, 1}, + {0x0d12, 0x0d3a, 1}, + {0x0d3d, 0x0d44, 1}, + {0x0d46, 0x0d48, 1}, + {0x0d4a, 0x0d4e, 1}, + {0x0d57, 0x0d60, 9}, + {0x0d61, 0x0d63, 1}, + {0x0d66, 0x0d75, 1}, + {0x0d79, 0x0d7f, 1}, + {0x0d82, 0x0d83, 1}, + {0x0d85, 0x0d96, 1}, + {0x0d9a, 0x0db1, 1}, + {0x0db3, 0x0dbb, 1}, + {0x0dbd, 0x0dc0, 3}, + {0x0dc1, 0x0dc6, 1}, + {0x0dca, 0x0dcf, 5}, + {0x0dd0, 0x0dd4, 1}, + {0x0dd6, 0x0dd8, 2}, + {0x0dd9, 0x0ddf, 1}, + {0x0de6, 0x0def, 1}, + {0x0df2, 0x0df4, 1}, + {0x0e01, 0x0e3a, 1}, + {0x0e3f, 0x0e5b, 1}, + {0x0e81, 0x0e82, 1}, + {0x0e84, 0x0e87, 3}, + {0x0e88, 0x0e8a, 2}, + {0x0e8d, 0x0e94, 7}, + {0x0e95, 0x0e97, 1}, + {0x0e99, 0x0e9f, 1}, + {0x0ea1, 0x0ea3, 1}, + {0x0ea5, 0x0ea7, 2}, + {0x0eaa, 0x0eab, 1}, + {0x0ead, 0x0eb9, 1}, + {0x0ebb, 0x0ebd, 1}, + {0x0ec0, 0x0ec4, 1}, + {0x0ec6, 0x0ec8, 2}, + {0x0ec9, 0x0ecd, 1}, + {0x0ed0, 0x0ed9, 1}, + {0x0edc, 0x0edf, 1}, + {0x0f00, 0x0f47, 1}, + {0x0f49, 0x0f6c, 1}, + {0x0f71, 0x0f97, 1}, + {0x0f99, 0x0fbc, 1}, + {0x0fbe, 0x0fcc, 1}, + {0x0fce, 0x0fda, 1}, + {0x1000, 0x10c5, 1}, + {0x10c7, 0x10cd, 6}, + {0x10d0, 0x1248, 1}, + {0x124a, 0x124d, 1}, + {0x1250, 0x1256, 1}, + {0x1258, 0x125a, 2}, + {0x125b, 0x125d, 1}, + {0x1260, 0x1288, 1}, + {0x128a, 0x128d, 1}, + {0x1290, 0x12b0, 1}, + {0x12b2, 0x12b5, 1}, + {0x12b8, 0x12be, 1}, + {0x12c0, 0x12c2, 2}, + {0x12c3, 0x12c5, 1}, + {0x12c8, 0x12d6, 1}, + {0x12d8, 0x1310, 1}, + {0x1312, 0x1315, 1}, + {0x1318, 0x135a, 1}, + {0x135d, 0x137c, 1}, + {0x1380, 0x1399, 1}, + {0x13a0, 0x13f4, 1}, + {0x1400, 0x169c, 1}, + {0x16a0, 0x16f8, 1}, + {0x1700, 0x170c, 1}, + {0x170e, 0x1714, 1}, + {0x1720, 0x1736, 1}, + {0x1740, 0x1753, 1}, + {0x1760, 0x176c, 1}, + {0x176e, 0x1770, 1}, + {0x1772, 0x1773, 1}, + {0x1780, 0x17dd, 1}, + {0x17e0, 0x17e9, 1}, + {0x17f0, 0x17f9, 1}, + {0x1800, 0x180e, 1}, + {0x1810, 0x1819, 1}, + {0x1820, 0x1877, 1}, + {0x1880, 0x18aa, 1}, + {0x18b0, 0x18f5, 1}, + {0x1900, 0x191e, 1}, + {0x1920, 0x192b, 1}, + {0x1930, 0x193b, 1}, + {0x1940, 0x1944, 4}, + {0x1945, 0x196d, 1}, + {0x1970, 0x1974, 1}, + {0x1980, 0x19ab, 1}, + {0x19b0, 0x19c9, 1}, + {0x19d0, 0x19da, 1}, + {0x19de, 0x1a1b, 1}, + {0x1a1e, 0x1a5e, 1}, + {0x1a60, 0x1a7c, 1}, + {0x1a7f, 0x1a89, 1}, + {0x1a90, 0x1a99, 1}, + {0x1aa0, 0x1aad, 1}, + {0x1ab0, 0x1abe, 1}, + {0x1b00, 0x1b4b, 1}, + {0x1b50, 0x1b7c, 1}, + {0x1b80, 0x1bf3, 1}, + {0x1bfc, 0x1c37, 1}, + {0x1c3b, 0x1c49, 1}, + {0x1c4d, 0x1c7f, 1}, + {0x1cc0, 0x1cc7, 1}, + {0x1cd0, 0x1cf6, 1}, + {0x1cf8, 0x1cf9, 1}, + {0x1d00, 0x1df5, 1}, + {0x1dfc, 0x1f15, 1}, + {0x1f18, 0x1f1d, 1}, + {0x1f20, 0x1f45, 1}, + {0x1f48, 0x1f4d, 1}, + {0x1f50, 0x1f57, 1}, + {0x1f59, 0x1f5f, 2}, + {0x1f60, 0x1f7d, 1}, + {0x1f80, 0x1fb4, 1}, + {0x1fb6, 0x1fc4, 1}, + {0x1fc6, 0x1fd3, 1}, + {0x1fd6, 0x1fdb, 1}, + {0x1fdd, 0x1fef, 1}, + {0x1ff2, 0x1ff4, 1}, + {0x1ff6, 0x1ffe, 1}, + {0x2000, 0x2064, 1}, + {0x2066, 0x2071, 1}, + {0x2074, 0x208e, 1}, + {0x2090, 0x209c, 1}, + {0x20a0, 0x20bd, 1}, + {0x20d0, 0x20f0, 1}, + {0x2100, 0x2189, 1}, + {0x2190, 0x23fa, 1}, + {0x2400, 0x2426, 1}, + {0x2440, 0x244a, 1}, + {0x2460, 0x2b73, 1}, + {0x2b76, 0x2b95, 1}, + {0x2b98, 0x2bb9, 1}, + {0x2bbd, 0x2bc8, 1}, + {0x2bca, 0x2bd1, 1}, + {0x2c00, 0x2c2e, 1}, + {0x2c30, 0x2c5e, 1}, + {0x2c60, 0x2cf3, 1}, + {0x2cf9, 0x2d25, 1}, + {0x2d27, 0x2d2d, 6}, + {0x2d30, 0x2d67, 1}, + {0x2d6f, 0x2d70, 1}, + {0x2d7f, 0x2d96, 1}, + {0x2da0, 0x2da6, 1}, + {0x2da8, 0x2dae, 1}, + {0x2db0, 0x2db6, 1}, + {0x2db8, 0x2dbe, 1}, + {0x2dc0, 0x2dc6, 1}, + {0x2dc8, 0x2dce, 1}, + {0x2dd0, 0x2dd6, 1}, + {0x2dd8, 0x2dde, 1}, + {0x2de0, 0x2e42, 1}, + {0x2e80, 0x2e99, 1}, + {0x2e9b, 0x2ef3, 1}, + {0x2f00, 0x2fd5, 1}, + {0x2ff0, 0x2ffb, 1}, + {0x3000, 0x303f, 1}, + {0x3041, 0x3096, 1}, + {0x3099, 0x30ff, 1}, + {0x3105, 0x312d, 1}, + {0x3131, 0x318e, 1}, + {0x3190, 0x31ba, 1}, + {0x31c0, 0x31e3, 1}, + {0x31f0, 0x321e, 1}, + {0x3220, 0x32fe, 1}, + {0x3300, 0x4db5, 1}, + {0x4dc0, 0x9fcc, 1}, + {0xa000, 0xa48c, 1}, + {0xa490, 0xa4c6, 1}, + {0xa4d0, 0xa62b, 1}, + {0xa640, 0xa69d, 1}, + {0xa69f, 0xa6f7, 1}, + {0xa700, 0xa78e, 1}, + {0xa790, 0xa7ad, 1}, + {0xa7b0, 0xa7b1, 1}, + {0xa7f7, 0xa82b, 1}, + {0xa830, 0xa839, 1}, + {0xa840, 0xa877, 1}, + {0xa880, 0xa8c4, 1}, + {0xa8ce, 0xa8d9, 1}, + {0xa8e0, 0xa8fb, 1}, + {0xa900, 0xa953, 1}, + {0xa95f, 0xa97c, 1}, + {0xa980, 0xa9cd, 1}, + {0xa9cf, 0xa9d9, 1}, + {0xa9de, 0xa9fe, 1}, + {0xaa00, 0xaa36, 1}, + {0xaa40, 0xaa4d, 1}, + {0xaa50, 0xaa59, 1}, + {0xaa5c, 0xaac2, 1}, + {0xaadb, 0xaaf6, 1}, + {0xab01, 0xab06, 1}, + {0xab09, 0xab0e, 1}, + {0xab11, 0xab16, 1}, + {0xab20, 0xab26, 1}, + {0xab28, 0xab2e, 1}, + {0xab30, 0xab5f, 1}, + {0xab64, 0xab65, 1}, + {0xabc0, 0xabed, 1}, + {0xabf0, 0xabf9, 1}, + {0xac00, 0xd7a3, 1}, + {0xd7b0, 0xd7c6, 1}, + {0xd7cb, 0xd7fb, 1}, + {0xd800, 0xfa6d, 1}, + {0xfa70, 0xfad9, 1}, + {0xfb00, 0xfb06, 1}, + {0xfb13, 0xfb17, 1}, + {0xfb1d, 0xfb36, 1}, + {0xfb38, 0xfb3c, 1}, + {0xfb3e, 0xfb40, 2}, + {0xfb41, 0xfb43, 2}, + {0xfb44, 0xfb46, 2}, + {0xfb47, 0xfbc1, 1}, + {0xfbd3, 0xfd3f, 1}, + {0xfd50, 0xfd8f, 1}, + {0xfd92, 0xfdc7, 1}, + {0xfdf0, 0xfdfd, 1}, + {0xfe00, 0xfe19, 1}, + {0xfe20, 0xfe2d, 1}, + {0xfe30, 0xfe52, 1}, + {0xfe54, 0xfe66, 1}, + {0xfe68, 0xfe6b, 1}, + {0xfe70, 0xfe74, 1}, + {0xfe76, 0xfefc, 1}, + {0xfeff, 0xff01, 2}, + {0xff02, 0xffbe, 1}, + {0xffc2, 0xffc7, 1}, + {0xffca, 0xffcf, 1}, + {0xffd2, 0xffd7, 1}, + {0xffda, 0xffdc, 1}, + {0xffe0, 0xffe6, 1}, + {0xffe8, 0xffee, 1}, + {0xfff9, 0xfffd, 1}, + }, + R32: []unicode.Range32{ + {0x00010000, 0x0001000b, 1}, + {0x0001000d, 0x00010026, 1}, + {0x00010028, 0x0001003a, 1}, + {0x0001003c, 0x0001003d, 1}, + {0x0001003f, 0x0001004d, 1}, + {0x00010050, 0x0001005d, 1}, + {0x00010080, 0x000100fa, 1}, + {0x00010100, 0x00010102, 1}, + {0x00010107, 0x00010133, 1}, + {0x00010137, 0x0001018c, 1}, + {0x00010190, 0x0001019b, 1}, + {0x000101a0, 0x000101d0, 48}, + {0x000101d1, 0x000101fd, 1}, + {0x00010280, 0x0001029c, 1}, + {0x000102a0, 0x000102d0, 1}, + {0x000102e0, 0x000102fb, 1}, + {0x00010300, 0x00010323, 1}, + {0x00010330, 0x0001034a, 1}, + {0x00010350, 0x0001037a, 1}, + {0x00010380, 0x0001039d, 1}, + {0x0001039f, 0x000103c3, 1}, + {0x000103c8, 0x000103d5, 1}, + {0x00010400, 0x0001049d, 1}, + {0x000104a0, 0x000104a9, 1}, + {0x00010500, 0x00010527, 1}, + {0x00010530, 0x00010563, 1}, + {0x0001056f, 0x00010600, 145}, + {0x00010601, 0x00010736, 1}, + {0x00010740, 0x00010755, 1}, + {0x00010760, 0x00010767, 1}, + {0x00010800, 0x00010805, 1}, + {0x00010808, 0x0001080a, 2}, + {0x0001080b, 0x00010835, 1}, + {0x00010837, 0x00010838, 1}, + {0x0001083c, 0x0001083f, 3}, + {0x00010840, 0x00010855, 1}, + {0x00010857, 0x0001089e, 1}, + {0x000108a7, 0x000108af, 1}, + {0x00010900, 0x0001091b, 1}, + {0x0001091f, 0x00010939, 1}, + {0x0001093f, 0x00010980, 65}, + {0x00010981, 0x000109b7, 1}, + {0x000109be, 0x000109bf, 1}, + {0x00010a00, 0x00010a03, 1}, + {0x00010a05, 0x00010a06, 1}, + {0x00010a0c, 0x00010a13, 1}, + {0x00010a15, 0x00010a17, 1}, + {0x00010a19, 0x00010a33, 1}, + {0x00010a38, 0x00010a3a, 1}, + {0x00010a3f, 0x00010a47, 1}, + {0x00010a50, 0x00010a58, 1}, + {0x00010a60, 0x00010a9f, 1}, + {0x00010ac0, 0x00010ae6, 1}, + {0x00010aeb, 0x00010af6, 1}, + {0x00010b00, 0x00010b35, 1}, + {0x00010b39, 0x00010b55, 1}, + {0x00010b58, 0x00010b72, 1}, + {0x00010b78, 0x00010b91, 1}, + {0x00010b99, 0x00010b9c, 1}, + {0x00010ba9, 0x00010baf, 1}, + {0x00010c00, 0x00010c48, 1}, + {0x00010e60, 0x00010e7e, 1}, + {0x00011000, 0x0001104d, 1}, + {0x00011052, 0x0001106f, 1}, + {0x0001107f, 0x000110c1, 1}, + {0x000110d0, 0x000110e8, 1}, + {0x000110f0, 0x000110f9, 1}, + {0x00011100, 0x00011134, 1}, + {0x00011136, 0x00011143, 1}, + {0x00011150, 0x00011176, 1}, + {0x00011180, 0x000111c8, 1}, + {0x000111cd, 0x000111d0, 3}, + {0x000111d1, 0x000111da, 1}, + {0x000111e1, 0x000111f4, 1}, + {0x00011200, 0x00011211, 1}, + {0x00011213, 0x0001123d, 1}, + {0x000112b0, 0x000112ea, 1}, + {0x000112f0, 0x000112f9, 1}, + {0x00011301, 0x00011303, 1}, + {0x00011305, 0x0001130c, 1}, + {0x0001130f, 0x00011310, 1}, + {0x00011313, 0x00011328, 1}, + {0x0001132a, 0x00011330, 1}, + {0x00011332, 0x00011333, 1}, + {0x00011335, 0x00011339, 1}, + {0x0001133c, 0x00011344, 1}, + {0x00011347, 0x00011348, 1}, + {0x0001134b, 0x0001134d, 1}, + {0x00011357, 0x0001135d, 6}, + {0x0001135e, 0x00011363, 1}, + {0x00011366, 0x0001136c, 1}, + {0x00011370, 0x00011374, 1}, + {0x00011480, 0x000114c7, 1}, + {0x000114d0, 0x000114d9, 1}, + {0x00011580, 0x000115b5, 1}, + {0x000115b8, 0x000115c9, 1}, + {0x00011600, 0x00011644, 1}, + {0x00011650, 0x00011659, 1}, + {0x00011680, 0x000116b7, 1}, + {0x000116c0, 0x000116c9, 1}, + {0x000118a0, 0x000118f2, 1}, + {0x000118ff, 0x00011ac0, 449}, + {0x00011ac1, 0x00011af8, 1}, + {0x00012000, 0x00012398, 1}, + {0x00012400, 0x0001246e, 1}, + {0x00012470, 0x00012474, 1}, + {0x00013000, 0x0001342e, 1}, + {0x00016800, 0x00016a38, 1}, + {0x00016a40, 0x00016a5e, 1}, + {0x00016a60, 0x00016a69, 1}, + {0x00016a6e, 0x00016a6f, 1}, + {0x00016ad0, 0x00016aed, 1}, + {0x00016af0, 0x00016af5, 1}, + {0x00016b00, 0x00016b45, 1}, + {0x00016b50, 0x00016b59, 1}, + {0x00016b5b, 0x00016b61, 1}, + {0x00016b63, 0x00016b77, 1}, + {0x00016b7d, 0x00016b8f, 1}, + {0x00016f00, 0x00016f44, 1}, + {0x00016f50, 0x00016f7e, 1}, + {0x00016f8f, 0x00016f9f, 1}, + {0x0001b000, 0x0001b001, 1}, + {0x0001bc00, 0x0001bc6a, 1}, + {0x0001bc70, 0x0001bc7c, 1}, + {0x0001bc80, 0x0001bc88, 1}, + {0x0001bc90, 0x0001bc99, 1}, + {0x0001bc9c, 0x0001bca3, 1}, + {0x0001d000, 0x0001d0f5, 1}, + {0x0001d100, 0x0001d126, 1}, + {0x0001d129, 0x0001d1dd, 1}, + {0x0001d200, 0x0001d245, 1}, + {0x0001d300, 0x0001d356, 1}, + {0x0001d360, 0x0001d371, 1}, + {0x0001d400, 0x0001d454, 1}, + {0x0001d456, 0x0001d49c, 1}, + {0x0001d49e, 0x0001d49f, 1}, + {0x0001d4a2, 0x0001d4a5, 3}, + {0x0001d4a6, 0x0001d4a9, 3}, + {0x0001d4aa, 0x0001d4ac, 1}, + {0x0001d4ae, 0x0001d4b9, 1}, + {0x0001d4bb, 0x0001d4bd, 2}, + {0x0001d4be, 0x0001d4c3, 1}, + {0x0001d4c5, 0x0001d505, 1}, + {0x0001d507, 0x0001d50a, 1}, + {0x0001d50d, 0x0001d514, 1}, + {0x0001d516, 0x0001d51c, 1}, + {0x0001d51e, 0x0001d539, 1}, + {0x0001d53b, 0x0001d53e, 1}, + {0x0001d540, 0x0001d544, 1}, + {0x0001d546, 0x0001d54a, 4}, + {0x0001d54b, 0x0001d550, 1}, + {0x0001d552, 0x0001d6a5, 1}, + {0x0001d6a8, 0x0001d7cb, 1}, + {0x0001d7ce, 0x0001d7ff, 1}, + {0x0001e800, 0x0001e8c4, 1}, + {0x0001e8c7, 0x0001e8d6, 1}, + {0x0001ee00, 0x0001ee03, 1}, + {0x0001ee05, 0x0001ee1f, 1}, + {0x0001ee21, 0x0001ee22, 1}, + {0x0001ee24, 0x0001ee27, 3}, + {0x0001ee29, 0x0001ee32, 1}, + {0x0001ee34, 0x0001ee37, 1}, + {0x0001ee39, 0x0001ee3b, 2}, + {0x0001ee42, 0x0001ee47, 5}, + {0x0001ee49, 0x0001ee4d, 2}, + {0x0001ee4e, 0x0001ee4f, 1}, + {0x0001ee51, 0x0001ee52, 1}, + {0x0001ee54, 0x0001ee57, 3}, + {0x0001ee59, 0x0001ee61, 2}, + {0x0001ee62, 0x0001ee64, 2}, + {0x0001ee67, 0x0001ee6a, 1}, + {0x0001ee6c, 0x0001ee72, 1}, + {0x0001ee74, 0x0001ee77, 1}, + {0x0001ee79, 0x0001ee7c, 1}, + {0x0001ee7e, 0x0001ee80, 2}, + {0x0001ee81, 0x0001ee89, 1}, + {0x0001ee8b, 0x0001ee9b, 1}, + {0x0001eea1, 0x0001eea3, 1}, + {0x0001eea5, 0x0001eea9, 1}, + {0x0001eeab, 0x0001eebb, 1}, + {0x0001eef0, 0x0001eef1, 1}, + {0x0001f000, 0x0001f02b, 1}, + {0x0001f030, 0x0001f093, 1}, + {0x0001f0a0, 0x0001f0ae, 1}, + {0x0001f0b1, 0x0001f0bf, 1}, + {0x0001f0c1, 0x0001f0cf, 1}, + {0x0001f0d1, 0x0001f0f5, 1}, + {0x0001f100, 0x0001f10c, 1}, + {0x0001f110, 0x0001f12e, 1}, + {0x0001f130, 0x0001f16b, 1}, + {0x0001f170, 0x0001f19a, 1}, + {0x0001f1e6, 0x0001f202, 1}, + {0x0001f210, 0x0001f23a, 1}, + {0x0001f240, 0x0001f248, 1}, + {0x0001f250, 0x0001f251, 1}, + {0x0001f300, 0x0001f32c, 1}, + {0x0001f330, 0x0001f37d, 1}, + {0x0001f380, 0x0001f3ce, 1}, + {0x0001f3d4, 0x0001f3f7, 1}, + {0x0001f400, 0x0001f4fe, 1}, + {0x0001f500, 0x0001f54a, 1}, + {0x0001f550, 0x0001f579, 1}, + {0x0001f57b, 0x0001f5a3, 1}, + {0x0001f5a5, 0x0001f642, 1}, + {0x0001f645, 0x0001f6cf, 1}, + {0x0001f6e0, 0x0001f6ec, 1}, + {0x0001f6f0, 0x0001f6f3, 1}, + {0x0001f700, 0x0001f773, 1}, + {0x0001f780, 0x0001f7d4, 1}, + {0x0001f800, 0x0001f80b, 1}, + {0x0001f810, 0x0001f847, 1}, + {0x0001f850, 0x0001f859, 1}, + {0x0001f860, 0x0001f887, 1}, + {0x0001f890, 0x0001f8ad, 1}, + {0x00020000, 0x0002a6d6, 1}, + {0x0002a700, 0x0002b734, 1}, + {0x0002b740, 0x0002b81d, 1}, + {0x0002f800, 0x0002fa1d, 1}, + {0x000e0001, 0x000e0020, 31}, + {0x000e0021, 0x000e007f, 1}, + {0x000e0100, 0x000e01ef, 1}, + {0x000f0000, 0x000ffffd, 1}, + {0x00100000, 0x0010fffd, 1}, + }, + LatinOffset: 0, +} + +// size 5048 bytes (4 KiB) +var assigned8_0_0 = &unicode.RangeTable{ + R16: []unicode.Range16{ + {0x0000, 0x0377, 1}, + {0x037a, 0x037f, 1}, + {0x0384, 0x038a, 1}, + {0x038c, 0x038e, 2}, + {0x038f, 0x03a1, 1}, + {0x03a3, 0x052f, 1}, + {0x0531, 0x0556, 1}, + {0x0559, 0x055f, 1}, + {0x0561, 0x0587, 1}, + {0x0589, 0x058a, 1}, + {0x058d, 0x058f, 1}, + {0x0591, 0x05c7, 1}, + {0x05d0, 0x05ea, 1}, + {0x05f0, 0x05f4, 1}, + {0x0600, 0x061c, 1}, + {0x061e, 0x070d, 1}, + {0x070f, 0x074a, 1}, + {0x074d, 0x07b1, 1}, + {0x07c0, 0x07fa, 1}, + {0x0800, 0x082d, 1}, + {0x0830, 0x083e, 1}, + {0x0840, 0x085b, 1}, + {0x085e, 0x08a0, 66}, + {0x08a1, 0x08b4, 1}, + {0x08e3, 0x0983, 1}, + {0x0985, 0x098c, 1}, + {0x098f, 0x0990, 1}, + {0x0993, 0x09a8, 1}, + {0x09aa, 0x09b0, 1}, + {0x09b2, 0x09b6, 4}, + {0x09b7, 0x09b9, 1}, + {0x09bc, 0x09c4, 1}, + {0x09c7, 0x09c8, 1}, + {0x09cb, 0x09ce, 1}, + {0x09d7, 0x09dc, 5}, + {0x09dd, 0x09df, 2}, + {0x09e0, 0x09e3, 1}, + {0x09e6, 0x09fb, 1}, + {0x0a01, 0x0a03, 1}, + {0x0a05, 0x0a0a, 1}, + {0x0a0f, 0x0a10, 1}, + {0x0a13, 0x0a28, 1}, + {0x0a2a, 0x0a30, 1}, + {0x0a32, 0x0a33, 1}, + {0x0a35, 0x0a36, 1}, + {0x0a38, 0x0a39, 1}, + {0x0a3c, 0x0a3e, 2}, + {0x0a3f, 0x0a42, 1}, + {0x0a47, 0x0a48, 1}, + {0x0a4b, 0x0a4d, 1}, + {0x0a51, 0x0a59, 8}, + {0x0a5a, 0x0a5c, 1}, + {0x0a5e, 0x0a66, 8}, + {0x0a67, 0x0a75, 1}, + {0x0a81, 0x0a83, 1}, + {0x0a85, 0x0a8d, 1}, + {0x0a8f, 0x0a91, 1}, + {0x0a93, 0x0aa8, 1}, + {0x0aaa, 0x0ab0, 1}, + {0x0ab2, 0x0ab3, 1}, + {0x0ab5, 0x0ab9, 1}, + {0x0abc, 0x0ac5, 1}, + {0x0ac7, 0x0ac9, 1}, + {0x0acb, 0x0acd, 1}, + {0x0ad0, 0x0ae0, 16}, + {0x0ae1, 0x0ae3, 1}, + {0x0ae6, 0x0af1, 1}, + {0x0af9, 0x0b01, 8}, + {0x0b02, 0x0b03, 1}, + {0x0b05, 0x0b0c, 1}, + {0x0b0f, 0x0b10, 1}, + {0x0b13, 0x0b28, 1}, + {0x0b2a, 0x0b30, 1}, + {0x0b32, 0x0b33, 1}, + {0x0b35, 0x0b39, 1}, + {0x0b3c, 0x0b44, 1}, + {0x0b47, 0x0b48, 1}, + {0x0b4b, 0x0b4d, 1}, + {0x0b56, 0x0b57, 1}, + {0x0b5c, 0x0b5d, 1}, + {0x0b5f, 0x0b63, 1}, + {0x0b66, 0x0b77, 1}, + {0x0b82, 0x0b83, 1}, + {0x0b85, 0x0b8a, 1}, + {0x0b8e, 0x0b90, 1}, + {0x0b92, 0x0b95, 1}, + {0x0b99, 0x0b9a, 1}, + {0x0b9c, 0x0b9e, 2}, + {0x0b9f, 0x0ba3, 4}, + {0x0ba4, 0x0ba8, 4}, + {0x0ba9, 0x0baa, 1}, + {0x0bae, 0x0bb9, 1}, + {0x0bbe, 0x0bc2, 1}, + {0x0bc6, 0x0bc8, 1}, + {0x0bca, 0x0bcd, 1}, + {0x0bd0, 0x0bd7, 7}, + {0x0be6, 0x0bfa, 1}, + {0x0c00, 0x0c03, 1}, + {0x0c05, 0x0c0c, 1}, + {0x0c0e, 0x0c10, 1}, + {0x0c12, 0x0c28, 1}, + {0x0c2a, 0x0c39, 1}, + {0x0c3d, 0x0c44, 1}, + {0x0c46, 0x0c48, 1}, + {0x0c4a, 0x0c4d, 1}, + {0x0c55, 0x0c56, 1}, + {0x0c58, 0x0c5a, 1}, + {0x0c60, 0x0c63, 1}, + {0x0c66, 0x0c6f, 1}, + {0x0c78, 0x0c7f, 1}, + {0x0c81, 0x0c83, 1}, + {0x0c85, 0x0c8c, 1}, + {0x0c8e, 0x0c90, 1}, + {0x0c92, 0x0ca8, 1}, + {0x0caa, 0x0cb3, 1}, + {0x0cb5, 0x0cb9, 1}, + {0x0cbc, 0x0cc4, 1}, + {0x0cc6, 0x0cc8, 1}, + {0x0cca, 0x0ccd, 1}, + {0x0cd5, 0x0cd6, 1}, + {0x0cde, 0x0ce0, 2}, + {0x0ce1, 0x0ce3, 1}, + {0x0ce6, 0x0cef, 1}, + {0x0cf1, 0x0cf2, 1}, + {0x0d01, 0x0d03, 1}, + {0x0d05, 0x0d0c, 1}, + {0x0d0e, 0x0d10, 1}, + {0x0d12, 0x0d3a, 1}, + {0x0d3d, 0x0d44, 1}, + {0x0d46, 0x0d48, 1}, + {0x0d4a, 0x0d4e, 1}, + {0x0d57, 0x0d5f, 8}, + {0x0d60, 0x0d63, 1}, + {0x0d66, 0x0d75, 1}, + {0x0d79, 0x0d7f, 1}, + {0x0d82, 0x0d83, 1}, + {0x0d85, 0x0d96, 1}, + {0x0d9a, 0x0db1, 1}, + {0x0db3, 0x0dbb, 1}, + {0x0dbd, 0x0dc0, 3}, + {0x0dc1, 0x0dc6, 1}, + {0x0dca, 0x0dcf, 5}, + {0x0dd0, 0x0dd4, 1}, + {0x0dd6, 0x0dd8, 2}, + {0x0dd9, 0x0ddf, 1}, + {0x0de6, 0x0def, 1}, + {0x0df2, 0x0df4, 1}, + {0x0e01, 0x0e3a, 1}, + {0x0e3f, 0x0e5b, 1}, + {0x0e81, 0x0e82, 1}, + {0x0e84, 0x0e87, 3}, + {0x0e88, 0x0e8a, 2}, + {0x0e8d, 0x0e94, 7}, + {0x0e95, 0x0e97, 1}, + {0x0e99, 0x0e9f, 1}, + {0x0ea1, 0x0ea3, 1}, + {0x0ea5, 0x0ea7, 2}, + {0x0eaa, 0x0eab, 1}, + {0x0ead, 0x0eb9, 1}, + {0x0ebb, 0x0ebd, 1}, + {0x0ec0, 0x0ec4, 1}, + {0x0ec6, 0x0ec8, 2}, + {0x0ec9, 0x0ecd, 1}, + {0x0ed0, 0x0ed9, 1}, + {0x0edc, 0x0edf, 1}, + {0x0f00, 0x0f47, 1}, + {0x0f49, 0x0f6c, 1}, + {0x0f71, 0x0f97, 1}, + {0x0f99, 0x0fbc, 1}, + {0x0fbe, 0x0fcc, 1}, + {0x0fce, 0x0fda, 1}, + {0x1000, 0x10c5, 1}, + {0x10c7, 0x10cd, 6}, + {0x10d0, 0x1248, 1}, + {0x124a, 0x124d, 1}, + {0x1250, 0x1256, 1}, + {0x1258, 0x125a, 2}, + {0x125b, 0x125d, 1}, + {0x1260, 0x1288, 1}, + {0x128a, 0x128d, 1}, + {0x1290, 0x12b0, 1}, + {0x12b2, 0x12b5, 1}, + {0x12b8, 0x12be, 1}, + {0x12c0, 0x12c2, 2}, + {0x12c3, 0x12c5, 1}, + {0x12c8, 0x12d6, 1}, + {0x12d8, 0x1310, 1}, + {0x1312, 0x1315, 1}, + {0x1318, 0x135a, 1}, + {0x135d, 0x137c, 1}, + {0x1380, 0x1399, 1}, + {0x13a0, 0x13f5, 1}, + {0x13f8, 0x13fd, 1}, + {0x1400, 0x169c, 1}, + {0x16a0, 0x16f8, 1}, + {0x1700, 0x170c, 1}, + {0x170e, 0x1714, 1}, + {0x1720, 0x1736, 1}, + {0x1740, 0x1753, 1}, + {0x1760, 0x176c, 1}, + {0x176e, 0x1770, 1}, + {0x1772, 0x1773, 1}, + {0x1780, 0x17dd, 1}, + {0x17e0, 0x17e9, 1}, + {0x17f0, 0x17f9, 1}, + {0x1800, 0x180e, 1}, + {0x1810, 0x1819, 1}, + {0x1820, 0x1877, 1}, + {0x1880, 0x18aa, 1}, + {0x18b0, 0x18f5, 1}, + {0x1900, 0x191e, 1}, + {0x1920, 0x192b, 1}, + {0x1930, 0x193b, 1}, + {0x1940, 0x1944, 4}, + {0x1945, 0x196d, 1}, + {0x1970, 0x1974, 1}, + {0x1980, 0x19ab, 1}, + {0x19b0, 0x19c9, 1}, + {0x19d0, 0x19da, 1}, + {0x19de, 0x1a1b, 1}, + {0x1a1e, 0x1a5e, 1}, + {0x1a60, 0x1a7c, 1}, + {0x1a7f, 0x1a89, 1}, + {0x1a90, 0x1a99, 1}, + {0x1aa0, 0x1aad, 1}, + {0x1ab0, 0x1abe, 1}, + {0x1b00, 0x1b4b, 1}, + {0x1b50, 0x1b7c, 1}, + {0x1b80, 0x1bf3, 1}, + {0x1bfc, 0x1c37, 1}, + {0x1c3b, 0x1c49, 1}, + {0x1c4d, 0x1c7f, 1}, + {0x1cc0, 0x1cc7, 1}, + {0x1cd0, 0x1cf6, 1}, + {0x1cf8, 0x1cf9, 1}, + {0x1d00, 0x1df5, 1}, + {0x1dfc, 0x1f15, 1}, + {0x1f18, 0x1f1d, 1}, + {0x1f20, 0x1f45, 1}, + {0x1f48, 0x1f4d, 1}, + {0x1f50, 0x1f57, 1}, + {0x1f59, 0x1f5f, 2}, + {0x1f60, 0x1f7d, 1}, + {0x1f80, 0x1fb4, 1}, + {0x1fb6, 0x1fc4, 1}, + {0x1fc6, 0x1fd3, 1}, + {0x1fd6, 0x1fdb, 1}, + {0x1fdd, 0x1fef, 1}, + {0x1ff2, 0x1ff4, 1}, + {0x1ff6, 0x1ffe, 1}, + {0x2000, 0x2064, 1}, + {0x2066, 0x2071, 1}, + {0x2074, 0x208e, 1}, + {0x2090, 0x209c, 1}, + {0x20a0, 0x20be, 1}, + {0x20d0, 0x20f0, 1}, + {0x2100, 0x218b, 1}, + {0x2190, 0x23fa, 1}, + {0x2400, 0x2426, 1}, + {0x2440, 0x244a, 1}, + {0x2460, 0x2b73, 1}, + {0x2b76, 0x2b95, 1}, + {0x2b98, 0x2bb9, 1}, + {0x2bbd, 0x2bc8, 1}, + {0x2bca, 0x2bd1, 1}, + {0x2bec, 0x2bef, 1}, + {0x2c00, 0x2c2e, 1}, + {0x2c30, 0x2c5e, 1}, + {0x2c60, 0x2cf3, 1}, + {0x2cf9, 0x2d25, 1}, + {0x2d27, 0x2d2d, 6}, + {0x2d30, 0x2d67, 1}, + {0x2d6f, 0x2d70, 1}, + {0x2d7f, 0x2d96, 1}, + {0x2da0, 0x2da6, 1}, + {0x2da8, 0x2dae, 1}, + {0x2db0, 0x2db6, 1}, + {0x2db8, 0x2dbe, 1}, + {0x2dc0, 0x2dc6, 1}, + {0x2dc8, 0x2dce, 1}, + {0x2dd0, 0x2dd6, 1}, + {0x2dd8, 0x2dde, 1}, + {0x2de0, 0x2e42, 1}, + {0x2e80, 0x2e99, 1}, + {0x2e9b, 0x2ef3, 1}, + {0x2f00, 0x2fd5, 1}, + {0x2ff0, 0x2ffb, 1}, + {0x3000, 0x303f, 1}, + {0x3041, 0x3096, 1}, + {0x3099, 0x30ff, 1}, + {0x3105, 0x312d, 1}, + {0x3131, 0x318e, 1}, + {0x3190, 0x31ba, 1}, + {0x31c0, 0x31e3, 1}, + {0x31f0, 0x321e, 1}, + {0x3220, 0x32fe, 1}, + {0x3300, 0x4db5, 1}, + {0x4dc0, 0x9fd5, 1}, + {0xa000, 0xa48c, 1}, + {0xa490, 0xa4c6, 1}, + {0xa4d0, 0xa62b, 1}, + {0xa640, 0xa6f7, 1}, + {0xa700, 0xa7ad, 1}, + {0xa7b0, 0xa7b7, 1}, + {0xa7f7, 0xa82b, 1}, + {0xa830, 0xa839, 1}, + {0xa840, 0xa877, 1}, + {0xa880, 0xa8c4, 1}, + {0xa8ce, 0xa8d9, 1}, + {0xa8e0, 0xa8fd, 1}, + {0xa900, 0xa953, 1}, + {0xa95f, 0xa97c, 1}, + {0xa980, 0xa9cd, 1}, + {0xa9cf, 0xa9d9, 1}, + {0xa9de, 0xa9fe, 1}, + {0xaa00, 0xaa36, 1}, + {0xaa40, 0xaa4d, 1}, + {0xaa50, 0xaa59, 1}, + {0xaa5c, 0xaac2, 1}, + {0xaadb, 0xaaf6, 1}, + {0xab01, 0xab06, 1}, + {0xab09, 0xab0e, 1}, + {0xab11, 0xab16, 1}, + {0xab20, 0xab26, 1}, + {0xab28, 0xab2e, 1}, + {0xab30, 0xab65, 1}, + {0xab70, 0xabed, 1}, + {0xabf0, 0xabf9, 1}, + {0xac00, 0xd7a3, 1}, + {0xd7b0, 0xd7c6, 1}, + {0xd7cb, 0xd7fb, 1}, + {0xd800, 0xfa6d, 1}, + {0xfa70, 0xfad9, 1}, + {0xfb00, 0xfb06, 1}, + {0xfb13, 0xfb17, 1}, + {0xfb1d, 0xfb36, 1}, + {0xfb38, 0xfb3c, 1}, + {0xfb3e, 0xfb40, 2}, + {0xfb41, 0xfb43, 2}, + {0xfb44, 0xfb46, 2}, + {0xfb47, 0xfbc1, 1}, + {0xfbd3, 0xfd3f, 1}, + {0xfd50, 0xfd8f, 1}, + {0xfd92, 0xfdc7, 1}, + {0xfdf0, 0xfdfd, 1}, + {0xfe00, 0xfe19, 1}, + {0xfe20, 0xfe52, 1}, + {0xfe54, 0xfe66, 1}, + {0xfe68, 0xfe6b, 1}, + {0xfe70, 0xfe74, 1}, + {0xfe76, 0xfefc, 1}, + {0xfeff, 0xff01, 2}, + {0xff02, 0xffbe, 1}, + {0xffc2, 0xffc7, 1}, + {0xffca, 0xffcf, 1}, + {0xffd2, 0xffd7, 1}, + {0xffda, 0xffdc, 1}, + {0xffe0, 0xffe6, 1}, + {0xffe8, 0xffee, 1}, + {0xfff9, 0xfffd, 1}, + }, + R32: []unicode.Range32{ + {0x00010000, 0x0001000b, 1}, + {0x0001000d, 0x00010026, 1}, + {0x00010028, 0x0001003a, 1}, + {0x0001003c, 0x0001003d, 1}, + {0x0001003f, 0x0001004d, 1}, + {0x00010050, 0x0001005d, 1}, + {0x00010080, 0x000100fa, 1}, + {0x00010100, 0x00010102, 1}, + {0x00010107, 0x00010133, 1}, + {0x00010137, 0x0001018c, 1}, + {0x00010190, 0x0001019b, 1}, + {0x000101a0, 0x000101d0, 48}, + {0x000101d1, 0x000101fd, 1}, + {0x00010280, 0x0001029c, 1}, + {0x000102a0, 0x000102d0, 1}, + {0x000102e0, 0x000102fb, 1}, + {0x00010300, 0x00010323, 1}, + {0x00010330, 0x0001034a, 1}, + {0x00010350, 0x0001037a, 1}, + {0x00010380, 0x0001039d, 1}, + {0x0001039f, 0x000103c3, 1}, + {0x000103c8, 0x000103d5, 1}, + {0x00010400, 0x0001049d, 1}, + {0x000104a0, 0x000104a9, 1}, + {0x00010500, 0x00010527, 1}, + {0x00010530, 0x00010563, 1}, + {0x0001056f, 0x00010600, 145}, + {0x00010601, 0x00010736, 1}, + {0x00010740, 0x00010755, 1}, + {0x00010760, 0x00010767, 1}, + {0x00010800, 0x00010805, 1}, + {0x00010808, 0x0001080a, 2}, + {0x0001080b, 0x00010835, 1}, + {0x00010837, 0x00010838, 1}, + {0x0001083c, 0x0001083f, 3}, + {0x00010840, 0x00010855, 1}, + {0x00010857, 0x0001089e, 1}, + {0x000108a7, 0x000108af, 1}, + {0x000108e0, 0x000108f2, 1}, + {0x000108f4, 0x000108f5, 1}, + {0x000108fb, 0x0001091b, 1}, + {0x0001091f, 0x00010939, 1}, + {0x0001093f, 0x00010980, 65}, + {0x00010981, 0x000109b7, 1}, + {0x000109bc, 0x000109cf, 1}, + {0x000109d2, 0x00010a03, 1}, + {0x00010a05, 0x00010a06, 1}, + {0x00010a0c, 0x00010a13, 1}, + {0x00010a15, 0x00010a17, 1}, + {0x00010a19, 0x00010a33, 1}, + {0x00010a38, 0x00010a3a, 1}, + {0x00010a3f, 0x00010a47, 1}, + {0x00010a50, 0x00010a58, 1}, + {0x00010a60, 0x00010a9f, 1}, + {0x00010ac0, 0x00010ae6, 1}, + {0x00010aeb, 0x00010af6, 1}, + {0x00010b00, 0x00010b35, 1}, + {0x00010b39, 0x00010b55, 1}, + {0x00010b58, 0x00010b72, 1}, + {0x00010b78, 0x00010b91, 1}, + {0x00010b99, 0x00010b9c, 1}, + {0x00010ba9, 0x00010baf, 1}, + {0x00010c00, 0x00010c48, 1}, + {0x00010c80, 0x00010cb2, 1}, + {0x00010cc0, 0x00010cf2, 1}, + {0x00010cfa, 0x00010cff, 1}, + {0x00010e60, 0x00010e7e, 1}, + {0x00011000, 0x0001104d, 1}, + {0x00011052, 0x0001106f, 1}, + {0x0001107f, 0x000110c1, 1}, + {0x000110d0, 0x000110e8, 1}, + {0x000110f0, 0x000110f9, 1}, + {0x00011100, 0x00011134, 1}, + {0x00011136, 0x00011143, 1}, + {0x00011150, 0x00011176, 1}, + {0x00011180, 0x000111cd, 1}, + {0x000111d0, 0x000111df, 1}, + {0x000111e1, 0x000111f4, 1}, + {0x00011200, 0x00011211, 1}, + {0x00011213, 0x0001123d, 1}, + {0x00011280, 0x00011286, 1}, + {0x00011288, 0x0001128a, 2}, + {0x0001128b, 0x0001128d, 1}, + {0x0001128f, 0x0001129d, 1}, + {0x0001129f, 0x000112a9, 1}, + {0x000112b0, 0x000112ea, 1}, + {0x000112f0, 0x000112f9, 1}, + {0x00011300, 0x00011303, 1}, + {0x00011305, 0x0001130c, 1}, + {0x0001130f, 0x00011310, 1}, + {0x00011313, 0x00011328, 1}, + {0x0001132a, 0x00011330, 1}, + {0x00011332, 0x00011333, 1}, + {0x00011335, 0x00011339, 1}, + {0x0001133c, 0x00011344, 1}, + {0x00011347, 0x00011348, 1}, + {0x0001134b, 0x0001134d, 1}, + {0x00011350, 0x00011357, 7}, + {0x0001135d, 0x00011363, 1}, + {0x00011366, 0x0001136c, 1}, + {0x00011370, 0x00011374, 1}, + {0x00011480, 0x000114c7, 1}, + {0x000114d0, 0x000114d9, 1}, + {0x00011580, 0x000115b5, 1}, + {0x000115b8, 0x000115dd, 1}, + {0x00011600, 0x00011644, 1}, + {0x00011650, 0x00011659, 1}, + {0x00011680, 0x000116b7, 1}, + {0x000116c0, 0x000116c9, 1}, + {0x00011700, 0x00011719, 1}, + {0x0001171d, 0x0001172b, 1}, + {0x00011730, 0x0001173f, 1}, + {0x000118a0, 0x000118f2, 1}, + {0x000118ff, 0x00011ac0, 449}, + {0x00011ac1, 0x00011af8, 1}, + {0x00012000, 0x00012399, 1}, + {0x00012400, 0x0001246e, 1}, + {0x00012470, 0x00012474, 1}, + {0x00012480, 0x00012543, 1}, + {0x00013000, 0x0001342e, 1}, + {0x00014400, 0x00014646, 1}, + {0x00016800, 0x00016a38, 1}, + {0x00016a40, 0x00016a5e, 1}, + {0x00016a60, 0x00016a69, 1}, + {0x00016a6e, 0x00016a6f, 1}, + {0x00016ad0, 0x00016aed, 1}, + {0x00016af0, 0x00016af5, 1}, + {0x00016b00, 0x00016b45, 1}, + {0x00016b50, 0x00016b59, 1}, + {0x00016b5b, 0x00016b61, 1}, + {0x00016b63, 0x00016b77, 1}, + {0x00016b7d, 0x00016b8f, 1}, + {0x00016f00, 0x00016f44, 1}, + {0x00016f50, 0x00016f7e, 1}, + {0x00016f8f, 0x00016f9f, 1}, + {0x0001b000, 0x0001b001, 1}, + {0x0001bc00, 0x0001bc6a, 1}, + {0x0001bc70, 0x0001bc7c, 1}, + {0x0001bc80, 0x0001bc88, 1}, + {0x0001bc90, 0x0001bc99, 1}, + {0x0001bc9c, 0x0001bca3, 1}, + {0x0001d000, 0x0001d0f5, 1}, + {0x0001d100, 0x0001d126, 1}, + {0x0001d129, 0x0001d1e8, 1}, + {0x0001d200, 0x0001d245, 1}, + {0x0001d300, 0x0001d356, 1}, + {0x0001d360, 0x0001d371, 1}, + {0x0001d400, 0x0001d454, 1}, + {0x0001d456, 0x0001d49c, 1}, + {0x0001d49e, 0x0001d49f, 1}, + {0x0001d4a2, 0x0001d4a5, 3}, + {0x0001d4a6, 0x0001d4a9, 3}, + {0x0001d4aa, 0x0001d4ac, 1}, + {0x0001d4ae, 0x0001d4b9, 1}, + {0x0001d4bb, 0x0001d4bd, 2}, + {0x0001d4be, 0x0001d4c3, 1}, + {0x0001d4c5, 0x0001d505, 1}, + {0x0001d507, 0x0001d50a, 1}, + {0x0001d50d, 0x0001d514, 1}, + {0x0001d516, 0x0001d51c, 1}, + {0x0001d51e, 0x0001d539, 1}, + {0x0001d53b, 0x0001d53e, 1}, + {0x0001d540, 0x0001d544, 1}, + {0x0001d546, 0x0001d54a, 4}, + {0x0001d54b, 0x0001d550, 1}, + {0x0001d552, 0x0001d6a5, 1}, + {0x0001d6a8, 0x0001d7cb, 1}, + {0x0001d7ce, 0x0001da8b, 1}, + {0x0001da9b, 0x0001da9f, 1}, + {0x0001daa1, 0x0001daaf, 1}, + {0x0001e800, 0x0001e8c4, 1}, + {0x0001e8c7, 0x0001e8d6, 1}, + {0x0001ee00, 0x0001ee03, 1}, + {0x0001ee05, 0x0001ee1f, 1}, + {0x0001ee21, 0x0001ee22, 1}, + {0x0001ee24, 0x0001ee27, 3}, + {0x0001ee29, 0x0001ee32, 1}, + {0x0001ee34, 0x0001ee37, 1}, + {0x0001ee39, 0x0001ee3b, 2}, + {0x0001ee42, 0x0001ee47, 5}, + {0x0001ee49, 0x0001ee4d, 2}, + {0x0001ee4e, 0x0001ee4f, 1}, + {0x0001ee51, 0x0001ee52, 1}, + {0x0001ee54, 0x0001ee57, 3}, + {0x0001ee59, 0x0001ee61, 2}, + {0x0001ee62, 0x0001ee64, 2}, + {0x0001ee67, 0x0001ee6a, 1}, + {0x0001ee6c, 0x0001ee72, 1}, + {0x0001ee74, 0x0001ee77, 1}, + {0x0001ee79, 0x0001ee7c, 1}, + {0x0001ee7e, 0x0001ee80, 2}, + {0x0001ee81, 0x0001ee89, 1}, + {0x0001ee8b, 0x0001ee9b, 1}, + {0x0001eea1, 0x0001eea3, 1}, + {0x0001eea5, 0x0001eea9, 1}, + {0x0001eeab, 0x0001eebb, 1}, + {0x0001eef0, 0x0001eef1, 1}, + {0x0001f000, 0x0001f02b, 1}, + {0x0001f030, 0x0001f093, 1}, + {0x0001f0a0, 0x0001f0ae, 1}, + {0x0001f0b1, 0x0001f0bf, 1}, + {0x0001f0c1, 0x0001f0cf, 1}, + {0x0001f0d1, 0x0001f0f5, 1}, + {0x0001f100, 0x0001f10c, 1}, + {0x0001f110, 0x0001f12e, 1}, + {0x0001f130, 0x0001f16b, 1}, + {0x0001f170, 0x0001f19a, 1}, + {0x0001f1e6, 0x0001f202, 1}, + {0x0001f210, 0x0001f23a, 1}, + {0x0001f240, 0x0001f248, 1}, + {0x0001f250, 0x0001f251, 1}, + {0x0001f300, 0x0001f579, 1}, + {0x0001f57b, 0x0001f5a3, 1}, + {0x0001f5a5, 0x0001f6d0, 1}, + {0x0001f6e0, 0x0001f6ec, 1}, + {0x0001f6f0, 0x0001f6f3, 1}, + {0x0001f700, 0x0001f773, 1}, + {0x0001f780, 0x0001f7d4, 1}, + {0x0001f800, 0x0001f80b, 1}, + {0x0001f810, 0x0001f847, 1}, + {0x0001f850, 0x0001f859, 1}, + {0x0001f860, 0x0001f887, 1}, + {0x0001f890, 0x0001f8ad, 1}, + {0x0001f910, 0x0001f918, 1}, + {0x0001f980, 0x0001f984, 1}, + {0x0001f9c0, 0x00020000, 1600}, + {0x00020001, 0x0002a6d6, 1}, + {0x0002a700, 0x0002b734, 1}, + {0x0002b740, 0x0002b81d, 1}, + {0x0002b820, 0x0002cea1, 1}, + {0x0002f800, 0x0002fa1d, 1}, + {0x000e0001, 0x000e0020, 31}, + {0x000e0021, 0x000e007f, 1}, + {0x000e0100, 0x000e01ef, 1}, + {0x000f0000, 0x000ffffd, 1}, + {0x00100000, 0x0010fffd, 1}, + }, + LatinOffset: 0, +} + +// size 5348 bytes (5 KiB) +var assigned9_0_0 = &unicode.RangeTable{ + R16: []unicode.Range16{ + {0x0000, 0x0377, 1}, + {0x037a, 0x037f, 1}, + {0x0384, 0x038a, 1}, + {0x038c, 0x038e, 2}, + {0x038f, 0x03a1, 1}, + {0x03a3, 0x052f, 1}, + {0x0531, 0x0556, 1}, + {0x0559, 0x055f, 1}, + {0x0561, 0x0587, 1}, + {0x0589, 0x058a, 1}, + {0x058d, 0x058f, 1}, + {0x0591, 0x05c7, 1}, + {0x05d0, 0x05ea, 1}, + {0x05f0, 0x05f4, 1}, + {0x0600, 0x061c, 1}, + {0x061e, 0x070d, 1}, + {0x070f, 0x074a, 1}, + {0x074d, 0x07b1, 1}, + {0x07c0, 0x07fa, 1}, + {0x0800, 0x082d, 1}, + {0x0830, 0x083e, 1}, + {0x0840, 0x085b, 1}, + {0x085e, 0x08a0, 66}, + {0x08a1, 0x08b4, 1}, + {0x08b6, 0x08bd, 1}, + {0x08d4, 0x0983, 1}, + {0x0985, 0x098c, 1}, + {0x098f, 0x0990, 1}, + {0x0993, 0x09a8, 1}, + {0x09aa, 0x09b0, 1}, + {0x09b2, 0x09b6, 4}, + {0x09b7, 0x09b9, 1}, + {0x09bc, 0x09c4, 1}, + {0x09c7, 0x09c8, 1}, + {0x09cb, 0x09ce, 1}, + {0x09d7, 0x09dc, 5}, + {0x09dd, 0x09df, 2}, + {0x09e0, 0x09e3, 1}, + {0x09e6, 0x09fb, 1}, + {0x0a01, 0x0a03, 1}, + {0x0a05, 0x0a0a, 1}, + {0x0a0f, 0x0a10, 1}, + {0x0a13, 0x0a28, 1}, + {0x0a2a, 0x0a30, 1}, + {0x0a32, 0x0a33, 1}, + {0x0a35, 0x0a36, 1}, + {0x0a38, 0x0a39, 1}, + {0x0a3c, 0x0a3e, 2}, + {0x0a3f, 0x0a42, 1}, + {0x0a47, 0x0a48, 1}, + {0x0a4b, 0x0a4d, 1}, + {0x0a51, 0x0a59, 8}, + {0x0a5a, 0x0a5c, 1}, + {0x0a5e, 0x0a66, 8}, + {0x0a67, 0x0a75, 1}, + {0x0a81, 0x0a83, 1}, + {0x0a85, 0x0a8d, 1}, + {0x0a8f, 0x0a91, 1}, + {0x0a93, 0x0aa8, 1}, + {0x0aaa, 0x0ab0, 1}, + {0x0ab2, 0x0ab3, 1}, + {0x0ab5, 0x0ab9, 1}, + {0x0abc, 0x0ac5, 1}, + {0x0ac7, 0x0ac9, 1}, + {0x0acb, 0x0acd, 1}, + {0x0ad0, 0x0ae0, 16}, + {0x0ae1, 0x0ae3, 1}, + {0x0ae6, 0x0af1, 1}, + {0x0af9, 0x0b01, 8}, + {0x0b02, 0x0b03, 1}, + {0x0b05, 0x0b0c, 1}, + {0x0b0f, 0x0b10, 1}, + {0x0b13, 0x0b28, 1}, + {0x0b2a, 0x0b30, 1}, + {0x0b32, 0x0b33, 1}, + {0x0b35, 0x0b39, 1}, + {0x0b3c, 0x0b44, 1}, + {0x0b47, 0x0b48, 1}, + {0x0b4b, 0x0b4d, 1}, + {0x0b56, 0x0b57, 1}, + {0x0b5c, 0x0b5d, 1}, + {0x0b5f, 0x0b63, 1}, + {0x0b66, 0x0b77, 1}, + {0x0b82, 0x0b83, 1}, + {0x0b85, 0x0b8a, 1}, + {0x0b8e, 0x0b90, 1}, + {0x0b92, 0x0b95, 1}, + {0x0b99, 0x0b9a, 1}, + {0x0b9c, 0x0b9e, 2}, + {0x0b9f, 0x0ba3, 4}, + {0x0ba4, 0x0ba8, 4}, + {0x0ba9, 0x0baa, 1}, + {0x0bae, 0x0bb9, 1}, + {0x0bbe, 0x0bc2, 1}, + {0x0bc6, 0x0bc8, 1}, + {0x0bca, 0x0bcd, 1}, + {0x0bd0, 0x0bd7, 7}, + {0x0be6, 0x0bfa, 1}, + {0x0c00, 0x0c03, 1}, + {0x0c05, 0x0c0c, 1}, + {0x0c0e, 0x0c10, 1}, + {0x0c12, 0x0c28, 1}, + {0x0c2a, 0x0c39, 1}, + {0x0c3d, 0x0c44, 1}, + {0x0c46, 0x0c48, 1}, + {0x0c4a, 0x0c4d, 1}, + {0x0c55, 0x0c56, 1}, + {0x0c58, 0x0c5a, 1}, + {0x0c60, 0x0c63, 1}, + {0x0c66, 0x0c6f, 1}, + {0x0c78, 0x0c83, 1}, + {0x0c85, 0x0c8c, 1}, + {0x0c8e, 0x0c90, 1}, + {0x0c92, 0x0ca8, 1}, + {0x0caa, 0x0cb3, 1}, + {0x0cb5, 0x0cb9, 1}, + {0x0cbc, 0x0cc4, 1}, + {0x0cc6, 0x0cc8, 1}, + {0x0cca, 0x0ccd, 1}, + {0x0cd5, 0x0cd6, 1}, + {0x0cde, 0x0ce0, 2}, + {0x0ce1, 0x0ce3, 1}, + {0x0ce6, 0x0cef, 1}, + {0x0cf1, 0x0cf2, 1}, + {0x0d01, 0x0d03, 1}, + {0x0d05, 0x0d0c, 1}, + {0x0d0e, 0x0d10, 1}, + {0x0d12, 0x0d3a, 1}, + {0x0d3d, 0x0d44, 1}, + {0x0d46, 0x0d48, 1}, + {0x0d4a, 0x0d4f, 1}, + {0x0d54, 0x0d63, 1}, + {0x0d66, 0x0d7f, 1}, + {0x0d82, 0x0d83, 1}, + {0x0d85, 0x0d96, 1}, + {0x0d9a, 0x0db1, 1}, + {0x0db3, 0x0dbb, 1}, + {0x0dbd, 0x0dc0, 3}, + {0x0dc1, 0x0dc6, 1}, + {0x0dca, 0x0dcf, 5}, + {0x0dd0, 0x0dd4, 1}, + {0x0dd6, 0x0dd8, 2}, + {0x0dd9, 0x0ddf, 1}, + {0x0de6, 0x0def, 1}, + {0x0df2, 0x0df4, 1}, + {0x0e01, 0x0e3a, 1}, + {0x0e3f, 0x0e5b, 1}, + {0x0e81, 0x0e82, 1}, + {0x0e84, 0x0e87, 3}, + {0x0e88, 0x0e8a, 2}, + {0x0e8d, 0x0e94, 7}, + {0x0e95, 0x0e97, 1}, + {0x0e99, 0x0e9f, 1}, + {0x0ea1, 0x0ea3, 1}, + {0x0ea5, 0x0ea7, 2}, + {0x0eaa, 0x0eab, 1}, + {0x0ead, 0x0eb9, 1}, + {0x0ebb, 0x0ebd, 1}, + {0x0ec0, 0x0ec4, 1}, + {0x0ec6, 0x0ec8, 2}, + {0x0ec9, 0x0ecd, 1}, + {0x0ed0, 0x0ed9, 1}, + {0x0edc, 0x0edf, 1}, + {0x0f00, 0x0f47, 1}, + {0x0f49, 0x0f6c, 1}, + {0x0f71, 0x0f97, 1}, + {0x0f99, 0x0fbc, 1}, + {0x0fbe, 0x0fcc, 1}, + {0x0fce, 0x0fda, 1}, + {0x1000, 0x10c5, 1}, + {0x10c7, 0x10cd, 6}, + {0x10d0, 0x1248, 1}, + {0x124a, 0x124d, 1}, + {0x1250, 0x1256, 1}, + {0x1258, 0x125a, 2}, + {0x125b, 0x125d, 1}, + {0x1260, 0x1288, 1}, + {0x128a, 0x128d, 1}, + {0x1290, 0x12b0, 1}, + {0x12b2, 0x12b5, 1}, + {0x12b8, 0x12be, 1}, + {0x12c0, 0x12c2, 2}, + {0x12c3, 0x12c5, 1}, + {0x12c8, 0x12d6, 1}, + {0x12d8, 0x1310, 1}, + {0x1312, 0x1315, 1}, + {0x1318, 0x135a, 1}, + {0x135d, 0x137c, 1}, + {0x1380, 0x1399, 1}, + {0x13a0, 0x13f5, 1}, + {0x13f8, 0x13fd, 1}, + {0x1400, 0x169c, 1}, + {0x16a0, 0x16f8, 1}, + {0x1700, 0x170c, 1}, + {0x170e, 0x1714, 1}, + {0x1720, 0x1736, 1}, + {0x1740, 0x1753, 1}, + {0x1760, 0x176c, 1}, + {0x176e, 0x1770, 1}, + {0x1772, 0x1773, 1}, + {0x1780, 0x17dd, 1}, + {0x17e0, 0x17e9, 1}, + {0x17f0, 0x17f9, 1}, + {0x1800, 0x180e, 1}, + {0x1810, 0x1819, 1}, + {0x1820, 0x1877, 1}, + {0x1880, 0x18aa, 1}, + {0x18b0, 0x18f5, 1}, + {0x1900, 0x191e, 1}, + {0x1920, 0x192b, 1}, + {0x1930, 0x193b, 1}, + {0x1940, 0x1944, 4}, + {0x1945, 0x196d, 1}, + {0x1970, 0x1974, 1}, + {0x1980, 0x19ab, 1}, + {0x19b0, 0x19c9, 1}, + {0x19d0, 0x19da, 1}, + {0x19de, 0x1a1b, 1}, + {0x1a1e, 0x1a5e, 1}, + {0x1a60, 0x1a7c, 1}, + {0x1a7f, 0x1a89, 1}, + {0x1a90, 0x1a99, 1}, + {0x1aa0, 0x1aad, 1}, + {0x1ab0, 0x1abe, 1}, + {0x1b00, 0x1b4b, 1}, + {0x1b50, 0x1b7c, 1}, + {0x1b80, 0x1bf3, 1}, + {0x1bfc, 0x1c37, 1}, + {0x1c3b, 0x1c49, 1}, + {0x1c4d, 0x1c88, 1}, + {0x1cc0, 0x1cc7, 1}, + {0x1cd0, 0x1cf6, 1}, + {0x1cf8, 0x1cf9, 1}, + {0x1d00, 0x1df5, 1}, + {0x1dfb, 0x1f15, 1}, + {0x1f18, 0x1f1d, 1}, + {0x1f20, 0x1f45, 1}, + {0x1f48, 0x1f4d, 1}, + {0x1f50, 0x1f57, 1}, + {0x1f59, 0x1f5f, 2}, + {0x1f60, 0x1f7d, 1}, + {0x1f80, 0x1fb4, 1}, + {0x1fb6, 0x1fc4, 1}, + {0x1fc6, 0x1fd3, 1}, + {0x1fd6, 0x1fdb, 1}, + {0x1fdd, 0x1fef, 1}, + {0x1ff2, 0x1ff4, 1}, + {0x1ff6, 0x1ffe, 1}, + {0x2000, 0x2064, 1}, + {0x2066, 0x2071, 1}, + {0x2074, 0x208e, 1}, + {0x2090, 0x209c, 1}, + {0x20a0, 0x20be, 1}, + {0x20d0, 0x20f0, 1}, + {0x2100, 0x218b, 1}, + {0x2190, 0x23fe, 1}, + {0x2400, 0x2426, 1}, + {0x2440, 0x244a, 1}, + {0x2460, 0x2b73, 1}, + {0x2b76, 0x2b95, 1}, + {0x2b98, 0x2bb9, 1}, + {0x2bbd, 0x2bc8, 1}, + {0x2bca, 0x2bd1, 1}, + {0x2bec, 0x2bef, 1}, + {0x2c00, 0x2c2e, 1}, + {0x2c30, 0x2c5e, 1}, + {0x2c60, 0x2cf3, 1}, + {0x2cf9, 0x2d25, 1}, + {0x2d27, 0x2d2d, 6}, + {0x2d30, 0x2d67, 1}, + {0x2d6f, 0x2d70, 1}, + {0x2d7f, 0x2d96, 1}, + {0x2da0, 0x2da6, 1}, + {0x2da8, 0x2dae, 1}, + {0x2db0, 0x2db6, 1}, + {0x2db8, 0x2dbe, 1}, + {0x2dc0, 0x2dc6, 1}, + {0x2dc8, 0x2dce, 1}, + {0x2dd0, 0x2dd6, 1}, + {0x2dd8, 0x2dde, 1}, + {0x2de0, 0x2e44, 1}, + {0x2e80, 0x2e99, 1}, + {0x2e9b, 0x2ef3, 1}, + {0x2f00, 0x2fd5, 1}, + {0x2ff0, 0x2ffb, 1}, + {0x3000, 0x303f, 1}, + {0x3041, 0x3096, 1}, + {0x3099, 0x30ff, 1}, + {0x3105, 0x312d, 1}, + {0x3131, 0x318e, 1}, + {0x3190, 0x31ba, 1}, + {0x31c0, 0x31e3, 1}, + {0x31f0, 0x321e, 1}, + {0x3220, 0x32fe, 1}, + {0x3300, 0x4db5, 1}, + {0x4dc0, 0x9fd5, 1}, + {0xa000, 0xa48c, 1}, + {0xa490, 0xa4c6, 1}, + {0xa4d0, 0xa62b, 1}, + {0xa640, 0xa6f7, 1}, + {0xa700, 0xa7ae, 1}, + {0xa7b0, 0xa7b7, 1}, + {0xa7f7, 0xa82b, 1}, + {0xa830, 0xa839, 1}, + {0xa840, 0xa877, 1}, + {0xa880, 0xa8c5, 1}, + {0xa8ce, 0xa8d9, 1}, + {0xa8e0, 0xa8fd, 1}, + {0xa900, 0xa953, 1}, + {0xa95f, 0xa97c, 1}, + {0xa980, 0xa9cd, 1}, + {0xa9cf, 0xa9d9, 1}, + {0xa9de, 0xa9fe, 1}, + {0xaa00, 0xaa36, 1}, + {0xaa40, 0xaa4d, 1}, + {0xaa50, 0xaa59, 1}, + {0xaa5c, 0xaac2, 1}, + {0xaadb, 0xaaf6, 1}, + {0xab01, 0xab06, 1}, + {0xab09, 0xab0e, 1}, + {0xab11, 0xab16, 1}, + {0xab20, 0xab26, 1}, + {0xab28, 0xab2e, 1}, + {0xab30, 0xab65, 1}, + {0xab70, 0xabed, 1}, + {0xabf0, 0xabf9, 1}, + {0xac00, 0xd7a3, 1}, + {0xd7b0, 0xd7c6, 1}, + {0xd7cb, 0xd7fb, 1}, + {0xd800, 0xfa6d, 1}, + {0xfa70, 0xfad9, 1}, + {0xfb00, 0xfb06, 1}, + {0xfb13, 0xfb17, 1}, + {0xfb1d, 0xfb36, 1}, + {0xfb38, 0xfb3c, 1}, + {0xfb3e, 0xfb40, 2}, + {0xfb41, 0xfb43, 2}, + {0xfb44, 0xfb46, 2}, + {0xfb47, 0xfbc1, 1}, + {0xfbd3, 0xfd3f, 1}, + {0xfd50, 0xfd8f, 1}, + {0xfd92, 0xfdc7, 1}, + {0xfdf0, 0xfdfd, 1}, + {0xfe00, 0xfe19, 1}, + {0xfe20, 0xfe52, 1}, + {0xfe54, 0xfe66, 1}, + {0xfe68, 0xfe6b, 1}, + {0xfe70, 0xfe74, 1}, + {0xfe76, 0xfefc, 1}, + {0xfeff, 0xff01, 2}, + {0xff02, 0xffbe, 1}, + {0xffc2, 0xffc7, 1}, + {0xffca, 0xffcf, 1}, + {0xffd2, 0xffd7, 1}, + {0xffda, 0xffdc, 1}, + {0xffe0, 0xffe6, 1}, + {0xffe8, 0xffee, 1}, + {0xfff9, 0xfffd, 1}, + }, + R32: []unicode.Range32{ + {0x00010000, 0x0001000b, 1}, + {0x0001000d, 0x00010026, 1}, + {0x00010028, 0x0001003a, 1}, + {0x0001003c, 0x0001003d, 1}, + {0x0001003f, 0x0001004d, 1}, + {0x00010050, 0x0001005d, 1}, + {0x00010080, 0x000100fa, 1}, + {0x00010100, 0x00010102, 1}, + {0x00010107, 0x00010133, 1}, + {0x00010137, 0x0001018e, 1}, + {0x00010190, 0x0001019b, 1}, + {0x000101a0, 0x000101d0, 48}, + {0x000101d1, 0x000101fd, 1}, + {0x00010280, 0x0001029c, 1}, + {0x000102a0, 0x000102d0, 1}, + {0x000102e0, 0x000102fb, 1}, + {0x00010300, 0x00010323, 1}, + {0x00010330, 0x0001034a, 1}, + {0x00010350, 0x0001037a, 1}, + {0x00010380, 0x0001039d, 1}, + {0x0001039f, 0x000103c3, 1}, + {0x000103c8, 0x000103d5, 1}, + {0x00010400, 0x0001049d, 1}, + {0x000104a0, 0x000104a9, 1}, + {0x000104b0, 0x000104d3, 1}, + {0x000104d8, 0x000104fb, 1}, + {0x00010500, 0x00010527, 1}, + {0x00010530, 0x00010563, 1}, + {0x0001056f, 0x00010600, 145}, + {0x00010601, 0x00010736, 1}, + {0x00010740, 0x00010755, 1}, + {0x00010760, 0x00010767, 1}, + {0x00010800, 0x00010805, 1}, + {0x00010808, 0x0001080a, 2}, + {0x0001080b, 0x00010835, 1}, + {0x00010837, 0x00010838, 1}, + {0x0001083c, 0x0001083f, 3}, + {0x00010840, 0x00010855, 1}, + {0x00010857, 0x0001089e, 1}, + {0x000108a7, 0x000108af, 1}, + {0x000108e0, 0x000108f2, 1}, + {0x000108f4, 0x000108f5, 1}, + {0x000108fb, 0x0001091b, 1}, + {0x0001091f, 0x00010939, 1}, + {0x0001093f, 0x00010980, 65}, + {0x00010981, 0x000109b7, 1}, + {0x000109bc, 0x000109cf, 1}, + {0x000109d2, 0x00010a03, 1}, + {0x00010a05, 0x00010a06, 1}, + {0x00010a0c, 0x00010a13, 1}, + {0x00010a15, 0x00010a17, 1}, + {0x00010a19, 0x00010a33, 1}, + {0x00010a38, 0x00010a3a, 1}, + {0x00010a3f, 0x00010a47, 1}, + {0x00010a50, 0x00010a58, 1}, + {0x00010a60, 0x00010a9f, 1}, + {0x00010ac0, 0x00010ae6, 1}, + {0x00010aeb, 0x00010af6, 1}, + {0x00010b00, 0x00010b35, 1}, + {0x00010b39, 0x00010b55, 1}, + {0x00010b58, 0x00010b72, 1}, + {0x00010b78, 0x00010b91, 1}, + {0x00010b99, 0x00010b9c, 1}, + {0x00010ba9, 0x00010baf, 1}, + {0x00010c00, 0x00010c48, 1}, + {0x00010c80, 0x00010cb2, 1}, + {0x00010cc0, 0x00010cf2, 1}, + {0x00010cfa, 0x00010cff, 1}, + {0x00010e60, 0x00010e7e, 1}, + {0x00011000, 0x0001104d, 1}, + {0x00011052, 0x0001106f, 1}, + {0x0001107f, 0x000110c1, 1}, + {0x000110d0, 0x000110e8, 1}, + {0x000110f0, 0x000110f9, 1}, + {0x00011100, 0x00011134, 1}, + {0x00011136, 0x00011143, 1}, + {0x00011150, 0x00011176, 1}, + {0x00011180, 0x000111cd, 1}, + {0x000111d0, 0x000111df, 1}, + {0x000111e1, 0x000111f4, 1}, + {0x00011200, 0x00011211, 1}, + {0x00011213, 0x0001123e, 1}, + {0x00011280, 0x00011286, 1}, + {0x00011288, 0x0001128a, 2}, + {0x0001128b, 0x0001128d, 1}, + {0x0001128f, 0x0001129d, 1}, + {0x0001129f, 0x000112a9, 1}, + {0x000112b0, 0x000112ea, 1}, + {0x000112f0, 0x000112f9, 1}, + {0x00011300, 0x00011303, 1}, + {0x00011305, 0x0001130c, 1}, + {0x0001130f, 0x00011310, 1}, + {0x00011313, 0x00011328, 1}, + {0x0001132a, 0x00011330, 1}, + {0x00011332, 0x00011333, 1}, + {0x00011335, 0x00011339, 1}, + {0x0001133c, 0x00011344, 1}, + {0x00011347, 0x00011348, 1}, + {0x0001134b, 0x0001134d, 1}, + {0x00011350, 0x00011357, 7}, + {0x0001135d, 0x00011363, 1}, + {0x00011366, 0x0001136c, 1}, + {0x00011370, 0x00011374, 1}, + {0x00011400, 0x00011459, 1}, + {0x0001145b, 0x0001145d, 2}, + {0x00011480, 0x000114c7, 1}, + {0x000114d0, 0x000114d9, 1}, + {0x00011580, 0x000115b5, 1}, + {0x000115b8, 0x000115dd, 1}, + {0x00011600, 0x00011644, 1}, + {0x00011650, 0x00011659, 1}, + {0x00011660, 0x0001166c, 1}, + {0x00011680, 0x000116b7, 1}, + {0x000116c0, 0x000116c9, 1}, + {0x00011700, 0x00011719, 1}, + {0x0001171d, 0x0001172b, 1}, + {0x00011730, 0x0001173f, 1}, + {0x000118a0, 0x000118f2, 1}, + {0x000118ff, 0x00011ac0, 449}, + {0x00011ac1, 0x00011af8, 1}, + {0x00011c00, 0x00011c08, 1}, + {0x00011c0a, 0x00011c36, 1}, + {0x00011c38, 0x00011c45, 1}, + {0x00011c50, 0x00011c6c, 1}, + {0x00011c70, 0x00011c8f, 1}, + {0x00011c92, 0x00011ca7, 1}, + {0x00011ca9, 0x00011cb6, 1}, + {0x00012000, 0x00012399, 1}, + {0x00012400, 0x0001246e, 1}, + {0x00012470, 0x00012474, 1}, + {0x00012480, 0x00012543, 1}, + {0x00013000, 0x0001342e, 1}, + {0x00014400, 0x00014646, 1}, + {0x00016800, 0x00016a38, 1}, + {0x00016a40, 0x00016a5e, 1}, + {0x00016a60, 0x00016a69, 1}, + {0x00016a6e, 0x00016a6f, 1}, + {0x00016ad0, 0x00016aed, 1}, + {0x00016af0, 0x00016af5, 1}, + {0x00016b00, 0x00016b45, 1}, + {0x00016b50, 0x00016b59, 1}, + {0x00016b5b, 0x00016b61, 1}, + {0x00016b63, 0x00016b77, 1}, + {0x00016b7d, 0x00016b8f, 1}, + {0x00016f00, 0x00016f44, 1}, + {0x00016f50, 0x00016f7e, 1}, + {0x00016f8f, 0x00016f9f, 1}, + {0x00016fe0, 0x00017000, 32}, + {0x00017001, 0x000187ec, 1}, + {0x00018800, 0x00018af2, 1}, + {0x0001b000, 0x0001b001, 1}, + {0x0001bc00, 0x0001bc6a, 1}, + {0x0001bc70, 0x0001bc7c, 1}, + {0x0001bc80, 0x0001bc88, 1}, + {0x0001bc90, 0x0001bc99, 1}, + {0x0001bc9c, 0x0001bca3, 1}, + {0x0001d000, 0x0001d0f5, 1}, + {0x0001d100, 0x0001d126, 1}, + {0x0001d129, 0x0001d1e8, 1}, + {0x0001d200, 0x0001d245, 1}, + {0x0001d300, 0x0001d356, 1}, + {0x0001d360, 0x0001d371, 1}, + {0x0001d400, 0x0001d454, 1}, + {0x0001d456, 0x0001d49c, 1}, + {0x0001d49e, 0x0001d49f, 1}, + {0x0001d4a2, 0x0001d4a5, 3}, + {0x0001d4a6, 0x0001d4a9, 3}, + {0x0001d4aa, 0x0001d4ac, 1}, + {0x0001d4ae, 0x0001d4b9, 1}, + {0x0001d4bb, 0x0001d4bd, 2}, + {0x0001d4be, 0x0001d4c3, 1}, + {0x0001d4c5, 0x0001d505, 1}, + {0x0001d507, 0x0001d50a, 1}, + {0x0001d50d, 0x0001d514, 1}, + {0x0001d516, 0x0001d51c, 1}, + {0x0001d51e, 0x0001d539, 1}, + {0x0001d53b, 0x0001d53e, 1}, + {0x0001d540, 0x0001d544, 1}, + {0x0001d546, 0x0001d54a, 4}, + {0x0001d54b, 0x0001d550, 1}, + {0x0001d552, 0x0001d6a5, 1}, + {0x0001d6a8, 0x0001d7cb, 1}, + {0x0001d7ce, 0x0001da8b, 1}, + {0x0001da9b, 0x0001da9f, 1}, + {0x0001daa1, 0x0001daaf, 1}, + {0x0001e000, 0x0001e006, 1}, + {0x0001e008, 0x0001e018, 1}, + {0x0001e01b, 0x0001e021, 1}, + {0x0001e023, 0x0001e024, 1}, + {0x0001e026, 0x0001e02a, 1}, + {0x0001e800, 0x0001e8c4, 1}, + {0x0001e8c7, 0x0001e8d6, 1}, + {0x0001e900, 0x0001e94a, 1}, + {0x0001e950, 0x0001e959, 1}, + {0x0001e95e, 0x0001e95f, 1}, + {0x0001ee00, 0x0001ee03, 1}, + {0x0001ee05, 0x0001ee1f, 1}, + {0x0001ee21, 0x0001ee22, 1}, + {0x0001ee24, 0x0001ee27, 3}, + {0x0001ee29, 0x0001ee32, 1}, + {0x0001ee34, 0x0001ee37, 1}, + {0x0001ee39, 0x0001ee3b, 2}, + {0x0001ee42, 0x0001ee47, 5}, + {0x0001ee49, 0x0001ee4d, 2}, + {0x0001ee4e, 0x0001ee4f, 1}, + {0x0001ee51, 0x0001ee52, 1}, + {0x0001ee54, 0x0001ee57, 3}, + {0x0001ee59, 0x0001ee61, 2}, + {0x0001ee62, 0x0001ee64, 2}, + {0x0001ee67, 0x0001ee6a, 1}, + {0x0001ee6c, 0x0001ee72, 1}, + {0x0001ee74, 0x0001ee77, 1}, + {0x0001ee79, 0x0001ee7c, 1}, + {0x0001ee7e, 0x0001ee80, 2}, + {0x0001ee81, 0x0001ee89, 1}, + {0x0001ee8b, 0x0001ee9b, 1}, + {0x0001eea1, 0x0001eea3, 1}, + {0x0001eea5, 0x0001eea9, 1}, + {0x0001eeab, 0x0001eebb, 1}, + {0x0001eef0, 0x0001eef1, 1}, + {0x0001f000, 0x0001f02b, 1}, + {0x0001f030, 0x0001f093, 1}, + {0x0001f0a0, 0x0001f0ae, 1}, + {0x0001f0b1, 0x0001f0bf, 1}, + {0x0001f0c1, 0x0001f0cf, 1}, + {0x0001f0d1, 0x0001f0f5, 1}, + {0x0001f100, 0x0001f10c, 1}, + {0x0001f110, 0x0001f12e, 1}, + {0x0001f130, 0x0001f16b, 1}, + {0x0001f170, 0x0001f1ac, 1}, + {0x0001f1e6, 0x0001f202, 1}, + {0x0001f210, 0x0001f23b, 1}, + {0x0001f240, 0x0001f248, 1}, + {0x0001f250, 0x0001f251, 1}, + {0x0001f300, 0x0001f6d2, 1}, + {0x0001f6e0, 0x0001f6ec, 1}, + {0x0001f6f0, 0x0001f6f6, 1}, + {0x0001f700, 0x0001f773, 1}, + {0x0001f780, 0x0001f7d4, 1}, + {0x0001f800, 0x0001f80b, 1}, + {0x0001f810, 0x0001f847, 1}, + {0x0001f850, 0x0001f859, 1}, + {0x0001f860, 0x0001f887, 1}, + {0x0001f890, 0x0001f8ad, 1}, + {0x0001f910, 0x0001f91e, 1}, + {0x0001f920, 0x0001f927, 1}, + {0x0001f930, 0x0001f933, 3}, + {0x0001f934, 0x0001f93e, 1}, + {0x0001f940, 0x0001f94b, 1}, + {0x0001f950, 0x0001f95e, 1}, + {0x0001f980, 0x0001f991, 1}, + {0x0001f9c0, 0x00020000, 1600}, + {0x00020001, 0x0002a6d6, 1}, + {0x0002a700, 0x0002b734, 1}, + {0x0002b740, 0x0002b81d, 1}, + {0x0002b820, 0x0002cea1, 1}, + {0x0002f800, 0x0002fa1d, 1}, + {0x000e0001, 0x000e0020, 31}, + {0x000e0021, 0x000e007f, 1}, + {0x000e0100, 0x000e01ef, 1}, + {0x000f0000, 0x000ffffd, 1}, + {0x00100000, 0x0010fffd, 1}, + }, + LatinOffset: 0, +} + +// size 5492 bytes (5 KiB) +var assigned10_0_0 = &unicode.RangeTable{ + R16: []unicode.Range16{ + {0x0000, 0x0377, 1}, + {0x037a, 0x037f, 1}, + {0x0384, 0x038a, 1}, + {0x038c, 0x038e, 2}, + {0x038f, 0x03a1, 1}, + {0x03a3, 0x052f, 1}, + {0x0531, 0x0556, 1}, + {0x0559, 0x055f, 1}, + {0x0561, 0x0587, 1}, + {0x0589, 0x058a, 1}, + {0x058d, 0x058f, 1}, + {0x0591, 0x05c7, 1}, + {0x05d0, 0x05ea, 1}, + {0x05f0, 0x05f4, 1}, + {0x0600, 0x061c, 1}, + {0x061e, 0x070d, 1}, + {0x070f, 0x074a, 1}, + {0x074d, 0x07b1, 1}, + {0x07c0, 0x07fa, 1}, + {0x0800, 0x082d, 1}, + {0x0830, 0x083e, 1}, + {0x0840, 0x085b, 1}, + {0x085e, 0x0860, 2}, + {0x0861, 0x086a, 1}, + {0x08a0, 0x08b4, 1}, + {0x08b6, 0x08bd, 1}, + {0x08d4, 0x0983, 1}, + {0x0985, 0x098c, 1}, + {0x098f, 0x0990, 1}, + {0x0993, 0x09a8, 1}, + {0x09aa, 0x09b0, 1}, + {0x09b2, 0x09b6, 4}, + {0x09b7, 0x09b9, 1}, + {0x09bc, 0x09c4, 1}, + {0x09c7, 0x09c8, 1}, + {0x09cb, 0x09ce, 1}, + {0x09d7, 0x09dc, 5}, + {0x09dd, 0x09df, 2}, + {0x09e0, 0x09e3, 1}, + {0x09e6, 0x09fd, 1}, + {0x0a01, 0x0a03, 1}, + {0x0a05, 0x0a0a, 1}, + {0x0a0f, 0x0a10, 1}, + {0x0a13, 0x0a28, 1}, + {0x0a2a, 0x0a30, 1}, + {0x0a32, 0x0a33, 1}, + {0x0a35, 0x0a36, 1}, + {0x0a38, 0x0a39, 1}, + {0x0a3c, 0x0a3e, 2}, + {0x0a3f, 0x0a42, 1}, + {0x0a47, 0x0a48, 1}, + {0x0a4b, 0x0a4d, 1}, + {0x0a51, 0x0a59, 8}, + {0x0a5a, 0x0a5c, 1}, + {0x0a5e, 0x0a66, 8}, + {0x0a67, 0x0a75, 1}, + {0x0a81, 0x0a83, 1}, + {0x0a85, 0x0a8d, 1}, + {0x0a8f, 0x0a91, 1}, + {0x0a93, 0x0aa8, 1}, + {0x0aaa, 0x0ab0, 1}, + {0x0ab2, 0x0ab3, 1}, + {0x0ab5, 0x0ab9, 1}, + {0x0abc, 0x0ac5, 1}, + {0x0ac7, 0x0ac9, 1}, + {0x0acb, 0x0acd, 1}, + {0x0ad0, 0x0ae0, 16}, + {0x0ae1, 0x0ae3, 1}, + {0x0ae6, 0x0af1, 1}, + {0x0af9, 0x0aff, 1}, + {0x0b01, 0x0b03, 1}, + {0x0b05, 0x0b0c, 1}, + {0x0b0f, 0x0b10, 1}, + {0x0b13, 0x0b28, 1}, + {0x0b2a, 0x0b30, 1}, + {0x0b32, 0x0b33, 1}, + {0x0b35, 0x0b39, 1}, + {0x0b3c, 0x0b44, 1}, + {0x0b47, 0x0b48, 1}, + {0x0b4b, 0x0b4d, 1}, + {0x0b56, 0x0b57, 1}, + {0x0b5c, 0x0b5d, 1}, + {0x0b5f, 0x0b63, 1}, + {0x0b66, 0x0b77, 1}, + {0x0b82, 0x0b83, 1}, + {0x0b85, 0x0b8a, 1}, + {0x0b8e, 0x0b90, 1}, + {0x0b92, 0x0b95, 1}, + {0x0b99, 0x0b9a, 1}, + {0x0b9c, 0x0b9e, 2}, + {0x0b9f, 0x0ba3, 4}, + {0x0ba4, 0x0ba8, 4}, + {0x0ba9, 0x0baa, 1}, + {0x0bae, 0x0bb9, 1}, + {0x0bbe, 0x0bc2, 1}, + {0x0bc6, 0x0bc8, 1}, + {0x0bca, 0x0bcd, 1}, + {0x0bd0, 0x0bd7, 7}, + {0x0be6, 0x0bfa, 1}, + {0x0c00, 0x0c03, 1}, + {0x0c05, 0x0c0c, 1}, + {0x0c0e, 0x0c10, 1}, + {0x0c12, 0x0c28, 1}, + {0x0c2a, 0x0c39, 1}, + {0x0c3d, 0x0c44, 1}, + {0x0c46, 0x0c48, 1}, + {0x0c4a, 0x0c4d, 1}, + {0x0c55, 0x0c56, 1}, + {0x0c58, 0x0c5a, 1}, + {0x0c60, 0x0c63, 1}, + {0x0c66, 0x0c6f, 1}, + {0x0c78, 0x0c83, 1}, + {0x0c85, 0x0c8c, 1}, + {0x0c8e, 0x0c90, 1}, + {0x0c92, 0x0ca8, 1}, + {0x0caa, 0x0cb3, 1}, + {0x0cb5, 0x0cb9, 1}, + {0x0cbc, 0x0cc4, 1}, + {0x0cc6, 0x0cc8, 1}, + {0x0cca, 0x0ccd, 1}, + {0x0cd5, 0x0cd6, 1}, + {0x0cde, 0x0ce0, 2}, + {0x0ce1, 0x0ce3, 1}, + {0x0ce6, 0x0cef, 1}, + {0x0cf1, 0x0cf2, 1}, + {0x0d00, 0x0d03, 1}, + {0x0d05, 0x0d0c, 1}, + {0x0d0e, 0x0d10, 1}, + {0x0d12, 0x0d44, 1}, + {0x0d46, 0x0d48, 1}, + {0x0d4a, 0x0d4f, 1}, + {0x0d54, 0x0d63, 1}, + {0x0d66, 0x0d7f, 1}, + {0x0d82, 0x0d83, 1}, + {0x0d85, 0x0d96, 1}, + {0x0d9a, 0x0db1, 1}, + {0x0db3, 0x0dbb, 1}, + {0x0dbd, 0x0dc0, 3}, + {0x0dc1, 0x0dc6, 1}, + {0x0dca, 0x0dcf, 5}, + {0x0dd0, 0x0dd4, 1}, + {0x0dd6, 0x0dd8, 2}, + {0x0dd9, 0x0ddf, 1}, + {0x0de6, 0x0def, 1}, + {0x0df2, 0x0df4, 1}, + {0x0e01, 0x0e3a, 1}, + {0x0e3f, 0x0e5b, 1}, + {0x0e81, 0x0e82, 1}, + {0x0e84, 0x0e87, 3}, + {0x0e88, 0x0e8a, 2}, + {0x0e8d, 0x0e94, 7}, + {0x0e95, 0x0e97, 1}, + {0x0e99, 0x0e9f, 1}, + {0x0ea1, 0x0ea3, 1}, + {0x0ea5, 0x0ea7, 2}, + {0x0eaa, 0x0eab, 1}, + {0x0ead, 0x0eb9, 1}, + {0x0ebb, 0x0ebd, 1}, + {0x0ec0, 0x0ec4, 1}, + {0x0ec6, 0x0ec8, 2}, + {0x0ec9, 0x0ecd, 1}, + {0x0ed0, 0x0ed9, 1}, + {0x0edc, 0x0edf, 1}, + {0x0f00, 0x0f47, 1}, + {0x0f49, 0x0f6c, 1}, + {0x0f71, 0x0f97, 1}, + {0x0f99, 0x0fbc, 1}, + {0x0fbe, 0x0fcc, 1}, + {0x0fce, 0x0fda, 1}, + {0x1000, 0x10c5, 1}, + {0x10c7, 0x10cd, 6}, + {0x10d0, 0x1248, 1}, + {0x124a, 0x124d, 1}, + {0x1250, 0x1256, 1}, + {0x1258, 0x125a, 2}, + {0x125b, 0x125d, 1}, + {0x1260, 0x1288, 1}, + {0x128a, 0x128d, 1}, + {0x1290, 0x12b0, 1}, + {0x12b2, 0x12b5, 1}, + {0x12b8, 0x12be, 1}, + {0x12c0, 0x12c2, 2}, + {0x12c3, 0x12c5, 1}, + {0x12c8, 0x12d6, 1}, + {0x12d8, 0x1310, 1}, + {0x1312, 0x1315, 1}, + {0x1318, 0x135a, 1}, + {0x135d, 0x137c, 1}, + {0x1380, 0x1399, 1}, + {0x13a0, 0x13f5, 1}, + {0x13f8, 0x13fd, 1}, + {0x1400, 0x169c, 1}, + {0x16a0, 0x16f8, 1}, + {0x1700, 0x170c, 1}, + {0x170e, 0x1714, 1}, + {0x1720, 0x1736, 1}, + {0x1740, 0x1753, 1}, + {0x1760, 0x176c, 1}, + {0x176e, 0x1770, 1}, + {0x1772, 0x1773, 1}, + {0x1780, 0x17dd, 1}, + {0x17e0, 0x17e9, 1}, + {0x17f0, 0x17f9, 1}, + {0x1800, 0x180e, 1}, + {0x1810, 0x1819, 1}, + {0x1820, 0x1877, 1}, + {0x1880, 0x18aa, 1}, + {0x18b0, 0x18f5, 1}, + {0x1900, 0x191e, 1}, + {0x1920, 0x192b, 1}, + {0x1930, 0x193b, 1}, + {0x1940, 0x1944, 4}, + {0x1945, 0x196d, 1}, + {0x1970, 0x1974, 1}, + {0x1980, 0x19ab, 1}, + {0x19b0, 0x19c9, 1}, + {0x19d0, 0x19da, 1}, + {0x19de, 0x1a1b, 1}, + {0x1a1e, 0x1a5e, 1}, + {0x1a60, 0x1a7c, 1}, + {0x1a7f, 0x1a89, 1}, + {0x1a90, 0x1a99, 1}, + {0x1aa0, 0x1aad, 1}, + {0x1ab0, 0x1abe, 1}, + {0x1b00, 0x1b4b, 1}, + {0x1b50, 0x1b7c, 1}, + {0x1b80, 0x1bf3, 1}, + {0x1bfc, 0x1c37, 1}, + {0x1c3b, 0x1c49, 1}, + {0x1c4d, 0x1c88, 1}, + {0x1cc0, 0x1cc7, 1}, + {0x1cd0, 0x1cf9, 1}, + {0x1d00, 0x1df9, 1}, + {0x1dfb, 0x1f15, 1}, + {0x1f18, 0x1f1d, 1}, + {0x1f20, 0x1f45, 1}, + {0x1f48, 0x1f4d, 1}, + {0x1f50, 0x1f57, 1}, + {0x1f59, 0x1f5f, 2}, + {0x1f60, 0x1f7d, 1}, + {0x1f80, 0x1fb4, 1}, + {0x1fb6, 0x1fc4, 1}, + {0x1fc6, 0x1fd3, 1}, + {0x1fd6, 0x1fdb, 1}, + {0x1fdd, 0x1fef, 1}, + {0x1ff2, 0x1ff4, 1}, + {0x1ff6, 0x1ffe, 1}, + {0x2000, 0x2064, 1}, + {0x2066, 0x2071, 1}, + {0x2074, 0x208e, 1}, + {0x2090, 0x209c, 1}, + {0x20a0, 0x20bf, 1}, + {0x20d0, 0x20f0, 1}, + {0x2100, 0x218b, 1}, + {0x2190, 0x2426, 1}, + {0x2440, 0x244a, 1}, + {0x2460, 0x2b73, 1}, + {0x2b76, 0x2b95, 1}, + {0x2b98, 0x2bb9, 1}, + {0x2bbd, 0x2bc8, 1}, + {0x2bca, 0x2bd2, 1}, + {0x2bec, 0x2bef, 1}, + {0x2c00, 0x2c2e, 1}, + {0x2c30, 0x2c5e, 1}, + {0x2c60, 0x2cf3, 1}, + {0x2cf9, 0x2d25, 1}, + {0x2d27, 0x2d2d, 6}, + {0x2d30, 0x2d67, 1}, + {0x2d6f, 0x2d70, 1}, + {0x2d7f, 0x2d96, 1}, + {0x2da0, 0x2da6, 1}, + {0x2da8, 0x2dae, 1}, + {0x2db0, 0x2db6, 1}, + {0x2db8, 0x2dbe, 1}, + {0x2dc0, 0x2dc6, 1}, + {0x2dc8, 0x2dce, 1}, + {0x2dd0, 0x2dd6, 1}, + {0x2dd8, 0x2dde, 1}, + {0x2de0, 0x2e49, 1}, + {0x2e80, 0x2e99, 1}, + {0x2e9b, 0x2ef3, 1}, + {0x2f00, 0x2fd5, 1}, + {0x2ff0, 0x2ffb, 1}, + {0x3000, 0x303f, 1}, + {0x3041, 0x3096, 1}, + {0x3099, 0x30ff, 1}, + {0x3105, 0x312e, 1}, + {0x3131, 0x318e, 1}, + {0x3190, 0x31ba, 1}, + {0x31c0, 0x31e3, 1}, + {0x31f0, 0x321e, 1}, + {0x3220, 0x32fe, 1}, + {0x3300, 0x4db5, 1}, + {0x4dc0, 0x9fea, 1}, + {0xa000, 0xa48c, 1}, + {0xa490, 0xa4c6, 1}, + {0xa4d0, 0xa62b, 1}, + {0xa640, 0xa6f7, 1}, + {0xa700, 0xa7ae, 1}, + {0xa7b0, 0xa7b7, 1}, + {0xa7f7, 0xa82b, 1}, + {0xa830, 0xa839, 1}, + {0xa840, 0xa877, 1}, + {0xa880, 0xa8c5, 1}, + {0xa8ce, 0xa8d9, 1}, + {0xa8e0, 0xa8fd, 1}, + {0xa900, 0xa953, 1}, + {0xa95f, 0xa97c, 1}, + {0xa980, 0xa9cd, 1}, + {0xa9cf, 0xa9d9, 1}, + {0xa9de, 0xa9fe, 1}, + {0xaa00, 0xaa36, 1}, + {0xaa40, 0xaa4d, 1}, + {0xaa50, 0xaa59, 1}, + {0xaa5c, 0xaac2, 1}, + {0xaadb, 0xaaf6, 1}, + {0xab01, 0xab06, 1}, + {0xab09, 0xab0e, 1}, + {0xab11, 0xab16, 1}, + {0xab20, 0xab26, 1}, + {0xab28, 0xab2e, 1}, + {0xab30, 0xab65, 1}, + {0xab70, 0xabed, 1}, + {0xabf0, 0xabf9, 1}, + {0xac00, 0xd7a3, 1}, + {0xd7b0, 0xd7c6, 1}, + {0xd7cb, 0xd7fb, 1}, + {0xd800, 0xfa6d, 1}, + {0xfa70, 0xfad9, 1}, + {0xfb00, 0xfb06, 1}, + {0xfb13, 0xfb17, 1}, + {0xfb1d, 0xfb36, 1}, + {0xfb38, 0xfb3c, 1}, + {0xfb3e, 0xfb40, 2}, + {0xfb41, 0xfb43, 2}, + {0xfb44, 0xfb46, 2}, + {0xfb47, 0xfbc1, 1}, + {0xfbd3, 0xfd3f, 1}, + {0xfd50, 0xfd8f, 1}, + {0xfd92, 0xfdc7, 1}, + {0xfdf0, 0xfdfd, 1}, + {0xfe00, 0xfe19, 1}, + {0xfe20, 0xfe52, 1}, + {0xfe54, 0xfe66, 1}, + {0xfe68, 0xfe6b, 1}, + {0xfe70, 0xfe74, 1}, + {0xfe76, 0xfefc, 1}, + {0xfeff, 0xff01, 2}, + {0xff02, 0xffbe, 1}, + {0xffc2, 0xffc7, 1}, + {0xffca, 0xffcf, 1}, + {0xffd2, 0xffd7, 1}, + {0xffda, 0xffdc, 1}, + {0xffe0, 0xffe6, 1}, + {0xffe8, 0xffee, 1}, + {0xfff9, 0xfffd, 1}, + }, + R32: []unicode.Range32{ + {0x00010000, 0x0001000b, 1}, + {0x0001000d, 0x00010026, 1}, + {0x00010028, 0x0001003a, 1}, + {0x0001003c, 0x0001003d, 1}, + {0x0001003f, 0x0001004d, 1}, + {0x00010050, 0x0001005d, 1}, + {0x00010080, 0x000100fa, 1}, + {0x00010100, 0x00010102, 1}, + {0x00010107, 0x00010133, 1}, + {0x00010137, 0x0001018e, 1}, + {0x00010190, 0x0001019b, 1}, + {0x000101a0, 0x000101d0, 48}, + {0x000101d1, 0x000101fd, 1}, + {0x00010280, 0x0001029c, 1}, + {0x000102a0, 0x000102d0, 1}, + {0x000102e0, 0x000102fb, 1}, + {0x00010300, 0x00010323, 1}, + {0x0001032d, 0x0001034a, 1}, + {0x00010350, 0x0001037a, 1}, + {0x00010380, 0x0001039d, 1}, + {0x0001039f, 0x000103c3, 1}, + {0x000103c8, 0x000103d5, 1}, + {0x00010400, 0x0001049d, 1}, + {0x000104a0, 0x000104a9, 1}, + {0x000104b0, 0x000104d3, 1}, + {0x000104d8, 0x000104fb, 1}, + {0x00010500, 0x00010527, 1}, + {0x00010530, 0x00010563, 1}, + {0x0001056f, 0x00010600, 145}, + {0x00010601, 0x00010736, 1}, + {0x00010740, 0x00010755, 1}, + {0x00010760, 0x00010767, 1}, + {0x00010800, 0x00010805, 1}, + {0x00010808, 0x0001080a, 2}, + {0x0001080b, 0x00010835, 1}, + {0x00010837, 0x00010838, 1}, + {0x0001083c, 0x0001083f, 3}, + {0x00010840, 0x00010855, 1}, + {0x00010857, 0x0001089e, 1}, + {0x000108a7, 0x000108af, 1}, + {0x000108e0, 0x000108f2, 1}, + {0x000108f4, 0x000108f5, 1}, + {0x000108fb, 0x0001091b, 1}, + {0x0001091f, 0x00010939, 1}, + {0x0001093f, 0x00010980, 65}, + {0x00010981, 0x000109b7, 1}, + {0x000109bc, 0x000109cf, 1}, + {0x000109d2, 0x00010a03, 1}, + {0x00010a05, 0x00010a06, 1}, + {0x00010a0c, 0x00010a13, 1}, + {0x00010a15, 0x00010a17, 1}, + {0x00010a19, 0x00010a33, 1}, + {0x00010a38, 0x00010a3a, 1}, + {0x00010a3f, 0x00010a47, 1}, + {0x00010a50, 0x00010a58, 1}, + {0x00010a60, 0x00010a9f, 1}, + {0x00010ac0, 0x00010ae6, 1}, + {0x00010aeb, 0x00010af6, 1}, + {0x00010b00, 0x00010b35, 1}, + {0x00010b39, 0x00010b55, 1}, + {0x00010b58, 0x00010b72, 1}, + {0x00010b78, 0x00010b91, 1}, + {0x00010b99, 0x00010b9c, 1}, + {0x00010ba9, 0x00010baf, 1}, + {0x00010c00, 0x00010c48, 1}, + {0x00010c80, 0x00010cb2, 1}, + {0x00010cc0, 0x00010cf2, 1}, + {0x00010cfa, 0x00010cff, 1}, + {0x00010e60, 0x00010e7e, 1}, + {0x00011000, 0x0001104d, 1}, + {0x00011052, 0x0001106f, 1}, + {0x0001107f, 0x000110c1, 1}, + {0x000110d0, 0x000110e8, 1}, + {0x000110f0, 0x000110f9, 1}, + {0x00011100, 0x00011134, 1}, + {0x00011136, 0x00011143, 1}, + {0x00011150, 0x00011176, 1}, + {0x00011180, 0x000111cd, 1}, + {0x000111d0, 0x000111df, 1}, + {0x000111e1, 0x000111f4, 1}, + {0x00011200, 0x00011211, 1}, + {0x00011213, 0x0001123e, 1}, + {0x00011280, 0x00011286, 1}, + {0x00011288, 0x0001128a, 2}, + {0x0001128b, 0x0001128d, 1}, + {0x0001128f, 0x0001129d, 1}, + {0x0001129f, 0x000112a9, 1}, + {0x000112b0, 0x000112ea, 1}, + {0x000112f0, 0x000112f9, 1}, + {0x00011300, 0x00011303, 1}, + {0x00011305, 0x0001130c, 1}, + {0x0001130f, 0x00011310, 1}, + {0x00011313, 0x00011328, 1}, + {0x0001132a, 0x00011330, 1}, + {0x00011332, 0x00011333, 1}, + {0x00011335, 0x00011339, 1}, + {0x0001133c, 0x00011344, 1}, + {0x00011347, 0x00011348, 1}, + {0x0001134b, 0x0001134d, 1}, + {0x00011350, 0x00011357, 7}, + {0x0001135d, 0x00011363, 1}, + {0x00011366, 0x0001136c, 1}, + {0x00011370, 0x00011374, 1}, + {0x00011400, 0x00011459, 1}, + {0x0001145b, 0x0001145d, 2}, + {0x00011480, 0x000114c7, 1}, + {0x000114d0, 0x000114d9, 1}, + {0x00011580, 0x000115b5, 1}, + {0x000115b8, 0x000115dd, 1}, + {0x00011600, 0x00011644, 1}, + {0x00011650, 0x00011659, 1}, + {0x00011660, 0x0001166c, 1}, + {0x00011680, 0x000116b7, 1}, + {0x000116c0, 0x000116c9, 1}, + {0x00011700, 0x00011719, 1}, + {0x0001171d, 0x0001172b, 1}, + {0x00011730, 0x0001173f, 1}, + {0x000118a0, 0x000118f2, 1}, + {0x000118ff, 0x00011a00, 257}, + {0x00011a01, 0x00011a47, 1}, + {0x00011a50, 0x00011a83, 1}, + {0x00011a86, 0x00011a9c, 1}, + {0x00011a9e, 0x00011aa2, 1}, + {0x00011ac0, 0x00011af8, 1}, + {0x00011c00, 0x00011c08, 1}, + {0x00011c0a, 0x00011c36, 1}, + {0x00011c38, 0x00011c45, 1}, + {0x00011c50, 0x00011c6c, 1}, + {0x00011c70, 0x00011c8f, 1}, + {0x00011c92, 0x00011ca7, 1}, + {0x00011ca9, 0x00011cb6, 1}, + {0x00011d00, 0x00011d06, 1}, + {0x00011d08, 0x00011d09, 1}, + {0x00011d0b, 0x00011d36, 1}, + {0x00011d3a, 0x00011d3c, 2}, + {0x00011d3d, 0x00011d3f, 2}, + {0x00011d40, 0x00011d47, 1}, + {0x00011d50, 0x00011d59, 1}, + {0x00012000, 0x00012399, 1}, + {0x00012400, 0x0001246e, 1}, + {0x00012470, 0x00012474, 1}, + {0x00012480, 0x00012543, 1}, + {0x00013000, 0x0001342e, 1}, + {0x00014400, 0x00014646, 1}, + {0x00016800, 0x00016a38, 1}, + {0x00016a40, 0x00016a5e, 1}, + {0x00016a60, 0x00016a69, 1}, + {0x00016a6e, 0x00016a6f, 1}, + {0x00016ad0, 0x00016aed, 1}, + {0x00016af0, 0x00016af5, 1}, + {0x00016b00, 0x00016b45, 1}, + {0x00016b50, 0x00016b59, 1}, + {0x00016b5b, 0x00016b61, 1}, + {0x00016b63, 0x00016b77, 1}, + {0x00016b7d, 0x00016b8f, 1}, + {0x00016f00, 0x00016f44, 1}, + {0x00016f50, 0x00016f7e, 1}, + {0x00016f8f, 0x00016f9f, 1}, + {0x00016fe0, 0x00016fe1, 1}, + {0x00017000, 0x000187ec, 1}, + {0x00018800, 0x00018af2, 1}, + {0x0001b000, 0x0001b11e, 1}, + {0x0001b170, 0x0001b2fb, 1}, + {0x0001bc00, 0x0001bc6a, 1}, + {0x0001bc70, 0x0001bc7c, 1}, + {0x0001bc80, 0x0001bc88, 1}, + {0x0001bc90, 0x0001bc99, 1}, + {0x0001bc9c, 0x0001bca3, 1}, + {0x0001d000, 0x0001d0f5, 1}, + {0x0001d100, 0x0001d126, 1}, + {0x0001d129, 0x0001d1e8, 1}, + {0x0001d200, 0x0001d245, 1}, + {0x0001d300, 0x0001d356, 1}, + {0x0001d360, 0x0001d371, 1}, + {0x0001d400, 0x0001d454, 1}, + {0x0001d456, 0x0001d49c, 1}, + {0x0001d49e, 0x0001d49f, 1}, + {0x0001d4a2, 0x0001d4a5, 3}, + {0x0001d4a6, 0x0001d4a9, 3}, + {0x0001d4aa, 0x0001d4ac, 1}, + {0x0001d4ae, 0x0001d4b9, 1}, + {0x0001d4bb, 0x0001d4bd, 2}, + {0x0001d4be, 0x0001d4c3, 1}, + {0x0001d4c5, 0x0001d505, 1}, + {0x0001d507, 0x0001d50a, 1}, + {0x0001d50d, 0x0001d514, 1}, + {0x0001d516, 0x0001d51c, 1}, + {0x0001d51e, 0x0001d539, 1}, + {0x0001d53b, 0x0001d53e, 1}, + {0x0001d540, 0x0001d544, 1}, + {0x0001d546, 0x0001d54a, 4}, + {0x0001d54b, 0x0001d550, 1}, + {0x0001d552, 0x0001d6a5, 1}, + {0x0001d6a8, 0x0001d7cb, 1}, + {0x0001d7ce, 0x0001da8b, 1}, + {0x0001da9b, 0x0001da9f, 1}, + {0x0001daa1, 0x0001daaf, 1}, + {0x0001e000, 0x0001e006, 1}, + {0x0001e008, 0x0001e018, 1}, + {0x0001e01b, 0x0001e021, 1}, + {0x0001e023, 0x0001e024, 1}, + {0x0001e026, 0x0001e02a, 1}, + {0x0001e800, 0x0001e8c4, 1}, + {0x0001e8c7, 0x0001e8d6, 1}, + {0x0001e900, 0x0001e94a, 1}, + {0x0001e950, 0x0001e959, 1}, + {0x0001e95e, 0x0001e95f, 1}, + {0x0001ee00, 0x0001ee03, 1}, + {0x0001ee05, 0x0001ee1f, 1}, + {0x0001ee21, 0x0001ee22, 1}, + {0x0001ee24, 0x0001ee27, 3}, + {0x0001ee29, 0x0001ee32, 1}, + {0x0001ee34, 0x0001ee37, 1}, + {0x0001ee39, 0x0001ee3b, 2}, + {0x0001ee42, 0x0001ee47, 5}, + {0x0001ee49, 0x0001ee4d, 2}, + {0x0001ee4e, 0x0001ee4f, 1}, + {0x0001ee51, 0x0001ee52, 1}, + {0x0001ee54, 0x0001ee57, 3}, + {0x0001ee59, 0x0001ee61, 2}, + {0x0001ee62, 0x0001ee64, 2}, + {0x0001ee67, 0x0001ee6a, 1}, + {0x0001ee6c, 0x0001ee72, 1}, + {0x0001ee74, 0x0001ee77, 1}, + {0x0001ee79, 0x0001ee7c, 1}, + {0x0001ee7e, 0x0001ee80, 2}, + {0x0001ee81, 0x0001ee89, 1}, + {0x0001ee8b, 0x0001ee9b, 1}, + {0x0001eea1, 0x0001eea3, 1}, + {0x0001eea5, 0x0001eea9, 1}, + {0x0001eeab, 0x0001eebb, 1}, + {0x0001eef0, 0x0001eef1, 1}, + {0x0001f000, 0x0001f02b, 1}, + {0x0001f030, 0x0001f093, 1}, + {0x0001f0a0, 0x0001f0ae, 1}, + {0x0001f0b1, 0x0001f0bf, 1}, + {0x0001f0c1, 0x0001f0cf, 1}, + {0x0001f0d1, 0x0001f0f5, 1}, + {0x0001f100, 0x0001f10c, 1}, + {0x0001f110, 0x0001f12e, 1}, + {0x0001f130, 0x0001f16b, 1}, + {0x0001f170, 0x0001f1ac, 1}, + {0x0001f1e6, 0x0001f202, 1}, + {0x0001f210, 0x0001f23b, 1}, + {0x0001f240, 0x0001f248, 1}, + {0x0001f250, 0x0001f251, 1}, + {0x0001f260, 0x0001f265, 1}, + {0x0001f300, 0x0001f6d4, 1}, + {0x0001f6e0, 0x0001f6ec, 1}, + {0x0001f6f0, 0x0001f6f8, 1}, + {0x0001f700, 0x0001f773, 1}, + {0x0001f780, 0x0001f7d4, 1}, + {0x0001f800, 0x0001f80b, 1}, + {0x0001f810, 0x0001f847, 1}, + {0x0001f850, 0x0001f859, 1}, + {0x0001f860, 0x0001f887, 1}, + {0x0001f890, 0x0001f8ad, 1}, + {0x0001f900, 0x0001f90b, 1}, + {0x0001f910, 0x0001f93e, 1}, + {0x0001f940, 0x0001f94c, 1}, + {0x0001f950, 0x0001f96b, 1}, + {0x0001f980, 0x0001f997, 1}, + {0x0001f9c0, 0x0001f9d0, 16}, + {0x0001f9d1, 0x0001f9e6, 1}, + {0x00020000, 0x0002a6d6, 1}, + {0x0002a700, 0x0002b734, 1}, + {0x0002b740, 0x0002b81d, 1}, + {0x0002b820, 0x0002cea1, 1}, + {0x0002ceb0, 0x0002ebe0, 1}, + {0x0002f800, 0x0002fa1d, 1}, + {0x000e0001, 0x000e0020, 31}, + {0x000e0021, 0x000e007f, 1}, + {0x000e0100, 0x000e01ef, 1}, + {0x000f0000, 0x000ffffd, 1}, + {0x00100000, 0x0010fffd, 1}, + }, + LatinOffset: 0, +} + +// Total size 49698 bytes (48 KiB) diff --git a/vendor/golang.org/x/text/width/common_test.go b/vendor/golang.org/x/text/width/common_test.go new file mode 100644 index 000000000..9ebb782c0 --- /dev/null +++ b/vendor/golang.org/x/text/width/common_test.go @@ -0,0 +1,92 @@ +// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. + +package width + +// This code is shared between the main code generator and the test code. + +import ( + "flag" + "log" + "strconv" + "strings" + + "golang.org/x/text/internal/gen" + "golang.org/x/text/internal/ucd" +) + +var ( + outputFile = flag.String("out", "tables.go", "output file") +) + +var typeMap = map[string]elem{ + "A": tagAmbiguous, + "N": tagNeutral, + "Na": tagNarrow, + "W": tagWide, + "F": tagFullwidth, + "H": tagHalfwidth, +} + +// getWidthData calls f for every entry for which it is defined. +// +// f may be called multiple times for the same rune. The last call to f is the +// correct value. f is not called for all runes. The default tag type is +// Neutral. +func getWidthData(f func(r rune, tag elem, alt rune)) { + // Set the default values for Unified Ideographs. In line with Annex 11, + // we encode full ranges instead of the defined runes in Unified_Ideograph. + for _, b := range []struct{ lo, hi rune }{ + {0x4E00, 0x9FFF}, // the CJK Unified Ideographs block, + {0x3400, 0x4DBF}, // the CJK Unified Ideographs Externsion A block, + {0xF900, 0xFAFF}, // the CJK Compatibility Ideographs block, + {0x20000, 0x2FFFF}, // the Supplementary Ideographic Plane, + {0x30000, 0x3FFFF}, // the Tertiary Ideographic Plane, + } { + for r := b.lo; r <= b.hi; r++ { + f(r, tagWide, 0) + } + } + + inverse := map[rune]rune{} + maps := map[string]bool{ + "<wide>": true, + "<narrow>": true, + } + + // We cannot reuse package norm's decomposition, as we need an unexpanded + // decomposition. We make use of the opportunity to verify that the + // decomposition type is as expected. + ucd.Parse(gen.OpenUCDFile("UnicodeData.txt"), func(p *ucd.Parser) { + r := p.Rune(0) + s := strings.SplitN(p.String(ucd.DecompMapping), " ", 2) + if !maps[s[0]] { + return + } + x, err := strconv.ParseUint(s[1], 16, 32) + if err != nil { + log.Fatalf("Error parsing rune %q", s[1]) + } + if inverse[r] != 0 || inverse[rune(x)] != 0 { + log.Fatalf("Circular dependency in mapping between %U and %U", r, x) + } + inverse[r] = rune(x) + inverse[rune(x)] = r + }) + + // <rune range>;<type> + ucd.Parse(gen.OpenUCDFile("EastAsianWidth.txt"), func(p *ucd.Parser) { + tag, ok := typeMap[p.String(1)] + if !ok { + log.Fatalf("Unknown width type %q", p.String(1)) + } + r := p.Rune(0) + alt, ok := inverse[r] + if tag == tagFullwidth || tag == tagHalfwidth && r != wonSign { + tag |= tagNeedsFold + if !ok { + log.Fatalf("Narrow or wide rune %U has no decomposition", r) + } + } + f(r, tag, alt) + }) +} diff --git a/vendor/golang.org/x/text/width/example_test.go b/vendor/golang.org/x/text/width/example_test.go new file mode 100644 index 000000000..62adba660 --- /dev/null +++ b/vendor/golang.org/x/text/width/example_test.go @@ -0,0 +1,52 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package width_test + +import ( + "fmt" + + "golang.org/x/text/width" +) + +func ExampleTransformer_fold() { + s := "abヲ₩○¥A" + f := width.Fold.String(s) + fmt.Printf("%U: %s\n", []rune(s), s) + fmt.Printf("%U: %s\n", []rune(f), f) + + // Output: + // [U+0061 U+0062 U+FF66 U+FFE6 U+FFEE U+FFE5 U+FF21]: abヲ₩○¥A + // [U+0061 U+0062 U+30F2 U+20A9 U+25CB U+00A5 U+0041]: abヲ₩○¥A +} + +func ExampleTransformer_widen() { + s := "ab¥ヲ₩○" + w := width.Widen.String(s) + fmt.Printf("%U: %s\n", []rune(s), s) + fmt.Printf("%U: %s\n", []rune(w), w) + + // Output: + // [U+0061 U+0062 U+00A5 U+FF66 U+20A9 U+FFEE]: ab¥ヲ₩○ + // [U+FF41 U+FF42 U+FFE5 U+30F2 U+FFE6 U+25CB]: ab¥ヲ₩○ +} + +func ExampleTransformer_narrow() { + s := "abヲ₩○¥A" + n := width.Narrow.String(s) + fmt.Printf("%U: %s\n", []rune(s), s) + fmt.Printf("%U: %s\n", []rune(n), n) + + // Ambiguous characters with a halfwidth equivalent get mapped as well. + s = "←" + n = width.Narrow.String(s) + fmt.Printf("%U: %s\n", []rune(s), s) + fmt.Printf("%U: %s\n", []rune(n), n) + + // Output: + // [U+0061 U+0062 U+30F2 U+FFE6 U+25CB U+FFE5 U+FF21]: abヲ₩○¥A + // [U+0061 U+0062 U+FF66 U+20A9 U+FFEE U+00A5 U+0041]: abヲ₩○¥A + // [U+2190]: ← + // [U+FFE9]: ← +} diff --git a/vendor/golang.org/x/text/width/runes_test.go b/vendor/golang.org/x/text/width/runes_test.go new file mode 100644 index 000000000..587dab4ed --- /dev/null +++ b/vendor/golang.org/x/text/width/runes_test.go @@ -0,0 +1,461 @@ +// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. + +package width + +var mapRunes = map[rune]struct { + r rune + e elem +}{ + 0x20: {0x3000, 0x6000}, + 0x21: {0xFF01, 0x6000}, + 0x22: {0xFF02, 0x6000}, + 0x23: {0xFF03, 0x6000}, + 0x24: {0xFF04, 0x6000}, + 0x25: {0xFF05, 0x6000}, + 0x26: {0xFF06, 0x6000}, + 0x27: {0xFF07, 0x6000}, + 0x28: {0xFF08, 0x6000}, + 0x29: {0xFF09, 0x6000}, + 0x2A: {0xFF0A, 0x6000}, + 0x2B: {0xFF0B, 0x6000}, + 0x2C: {0xFF0C, 0x6000}, + 0x2D: {0xFF0D, 0x6000}, + 0x2E: {0xFF0E, 0x6000}, + 0x2F: {0xFF0F, 0x6000}, + 0x30: {0xFF10, 0x6000}, + 0x31: {0xFF11, 0x6000}, + 0x32: {0xFF12, 0x6000}, + 0x33: {0xFF13, 0x6000}, + 0x34: {0xFF14, 0x6000}, + 0x35: {0xFF15, 0x6000}, + 0x36: {0xFF16, 0x6000}, + 0x37: {0xFF17, 0x6000}, + 0x38: {0xFF18, 0x6000}, + 0x39: {0xFF19, 0x6000}, + 0x3A: {0xFF1A, 0x6000}, + 0x3B: {0xFF1B, 0x6000}, + 0x3C: {0xFF1C, 0x6000}, + 0x3D: {0xFF1D, 0x6000}, + 0x3E: {0xFF1E, 0x6000}, + 0x3F: {0xFF1F, 0x6000}, + 0x40: {0xFF20, 0x6000}, + 0x41: {0xFF21, 0x6000}, + 0x42: {0xFF22, 0x6000}, + 0x43: {0xFF23, 0x6000}, + 0x44: {0xFF24, 0x6000}, + 0x45: {0xFF25, 0x6000}, + 0x46: {0xFF26, 0x6000}, + 0x47: {0xFF27, 0x6000}, + 0x48: {0xFF28, 0x6000}, + 0x49: {0xFF29, 0x6000}, + 0x4A: {0xFF2A, 0x6000}, + 0x4B: {0xFF2B, 0x6000}, + 0x4C: {0xFF2C, 0x6000}, + 0x4D: {0xFF2D, 0x6000}, + 0x4E: {0xFF2E, 0x6000}, + 0x4F: {0xFF2F, 0x6000}, + 0x50: {0xFF30, 0x6000}, + 0x51: {0xFF31, 0x6000}, + 0x52: {0xFF32, 0x6000}, + 0x53: {0xFF33, 0x6000}, + 0x54: {0xFF34, 0x6000}, + 0x55: {0xFF35, 0x6000}, + 0x56: {0xFF36, 0x6000}, + 0x57: {0xFF37, 0x6000}, + 0x58: {0xFF38, 0x6000}, + 0x59: {0xFF39, 0x6000}, + 0x5A: {0xFF3A, 0x6000}, + 0x5B: {0xFF3B, 0x6000}, + 0x5C: {0xFF3C, 0x6000}, + 0x5D: {0xFF3D, 0x6000}, + 0x5E: {0xFF3E, 0x6000}, + 0x5F: {0xFF3F, 0x6000}, + 0x60: {0xFF40, 0x6000}, + 0x61: {0xFF41, 0x6000}, + 0x62: {0xFF42, 0x6000}, + 0x63: {0xFF43, 0x6000}, + 0x64: {0xFF44, 0x6000}, + 0x65: {0xFF45, 0x6000}, + 0x66: {0xFF46, 0x6000}, + 0x67: {0xFF47, 0x6000}, + 0x68: {0xFF48, 0x6000}, + 0x69: {0xFF49, 0x6000}, + 0x6A: {0xFF4A, 0x6000}, + 0x6B: {0xFF4B, 0x6000}, + 0x6C: {0xFF4C, 0x6000}, + 0x6D: {0xFF4D, 0x6000}, + 0x6E: {0xFF4E, 0x6000}, + 0x6F: {0xFF4F, 0x6000}, + 0x70: {0xFF50, 0x6000}, + 0x71: {0xFF51, 0x6000}, + 0x72: {0xFF52, 0x6000}, + 0x73: {0xFF53, 0x6000}, + 0x74: {0xFF54, 0x6000}, + 0x75: {0xFF55, 0x6000}, + 0x76: {0xFF56, 0x6000}, + 0x77: {0xFF57, 0x6000}, + 0x78: {0xFF58, 0x6000}, + 0x79: {0xFF59, 0x6000}, + 0x7A: {0xFF5A, 0x6000}, + 0x7B: {0xFF5B, 0x6000}, + 0x7C: {0xFF5C, 0x6000}, + 0x7D: {0xFF5D, 0x6000}, + 0x7E: {0xFF5E, 0x6000}, + 0xA2: {0xFFE0, 0x6000}, + 0xA3: {0xFFE1, 0x6000}, + 0xA5: {0xFFE5, 0x6000}, + 0xA6: {0xFFE4, 0x6000}, + 0xAC: {0xFFE2, 0x6000}, + 0xAF: {0xFFE3, 0x6000}, + 0x20A9: {0xFFE6, 0xA000}, + 0x2190: {0xFFE9, 0x2000}, + 0x2191: {0xFFEA, 0x2000}, + 0x2192: {0xFFEB, 0x2000}, + 0x2193: {0xFFEC, 0x2000}, + 0x2502: {0xFFE8, 0x2000}, + 0x25A0: {0xFFED, 0x2000}, + 0x25CB: {0xFFEE, 0x2000}, + 0x2985: {0xFF5F, 0x6000}, + 0x2986: {0xFF60, 0x6000}, + 0x3000: {0x20, 0x9000}, + 0x3001: {0xFF64, 0x4000}, + 0x3002: {0xFF61, 0x4000}, + 0x300C: {0xFF62, 0x4000}, + 0x300D: {0xFF63, 0x4000}, + 0x3099: {0xFF9E, 0x4000}, + 0x309A: {0xFF9F, 0x4000}, + 0x30A1: {0xFF67, 0x4000}, + 0x30A2: {0xFF71, 0x4000}, + 0x30A3: {0xFF68, 0x4000}, + 0x30A4: {0xFF72, 0x4000}, + 0x30A5: {0xFF69, 0x4000}, + 0x30A6: {0xFF73, 0x4000}, + 0x30A7: {0xFF6A, 0x4000}, + 0x30A8: {0xFF74, 0x4000}, + 0x30A9: {0xFF6B, 0x4000}, + 0x30AA: {0xFF75, 0x4000}, + 0x30AB: {0xFF76, 0x4000}, + 0x30AD: {0xFF77, 0x4000}, + 0x30AF: {0xFF78, 0x4000}, + 0x30B1: {0xFF79, 0x4000}, + 0x30B3: {0xFF7A, 0x4000}, + 0x30B5: {0xFF7B, 0x4000}, + 0x30B7: {0xFF7C, 0x4000}, + 0x30B9: {0xFF7D, 0x4000}, + 0x30BB: {0xFF7E, 0x4000}, + 0x30BD: {0xFF7F, 0x4000}, + 0x30BF: {0xFF80, 0x4000}, + 0x30C1: {0xFF81, 0x4000}, + 0x30C3: {0xFF6F, 0x4000}, + 0x30C4: {0xFF82, 0x4000}, + 0x30C6: {0xFF83, 0x4000}, + 0x30C8: {0xFF84, 0x4000}, + 0x30CA: {0xFF85, 0x4000}, + 0x30CB: {0xFF86, 0x4000}, + 0x30CC: {0xFF87, 0x4000}, + 0x30CD: {0xFF88, 0x4000}, + 0x30CE: {0xFF89, 0x4000}, + 0x30CF: {0xFF8A, 0x4000}, + 0x30D2: {0xFF8B, 0x4000}, + 0x30D5: {0xFF8C, 0x4000}, + 0x30D8: {0xFF8D, 0x4000}, + 0x30DB: {0xFF8E, 0x4000}, + 0x30DE: {0xFF8F, 0x4000}, + 0x30DF: {0xFF90, 0x4000}, + 0x30E0: {0xFF91, 0x4000}, + 0x30E1: {0xFF92, 0x4000}, + 0x30E2: {0xFF93, 0x4000}, + 0x30E3: {0xFF6C, 0x4000}, + 0x30E4: {0xFF94, 0x4000}, + 0x30E5: {0xFF6D, 0x4000}, + 0x30E6: {0xFF95, 0x4000}, + 0x30E7: {0xFF6E, 0x4000}, + 0x30E8: {0xFF96, 0x4000}, + 0x30E9: {0xFF97, 0x4000}, + 0x30EA: {0xFF98, 0x4000}, + 0x30EB: {0xFF99, 0x4000}, + 0x30EC: {0xFF9A, 0x4000}, + 0x30ED: {0xFF9B, 0x4000}, + 0x30EF: {0xFF9C, 0x4000}, + 0x30F2: {0xFF66, 0x4000}, + 0x30F3: {0xFF9D, 0x4000}, + 0x30FB: {0xFF65, 0x4000}, + 0x30FC: {0xFF70, 0x4000}, + 0x3131: {0xFFA1, 0x4000}, + 0x3132: {0xFFA2, 0x4000}, + 0x3133: {0xFFA3, 0x4000}, + 0x3134: {0xFFA4, 0x4000}, + 0x3135: {0xFFA5, 0x4000}, + 0x3136: {0xFFA6, 0x4000}, + 0x3137: {0xFFA7, 0x4000}, + 0x3138: {0xFFA8, 0x4000}, + 0x3139: {0xFFA9, 0x4000}, + 0x313A: {0xFFAA, 0x4000}, + 0x313B: {0xFFAB, 0x4000}, + 0x313C: {0xFFAC, 0x4000}, + 0x313D: {0xFFAD, 0x4000}, + 0x313E: {0xFFAE, 0x4000}, + 0x313F: {0xFFAF, 0x4000}, + 0x3140: {0xFFB0, 0x4000}, + 0x3141: {0xFFB1, 0x4000}, + 0x3142: {0xFFB2, 0x4000}, + 0x3143: {0xFFB3, 0x4000}, + 0x3144: {0xFFB4, 0x4000}, + 0x3145: {0xFFB5, 0x4000}, + 0x3146: {0xFFB6, 0x4000}, + 0x3147: {0xFFB7, 0x4000}, + 0x3148: {0xFFB8, 0x4000}, + 0x3149: {0xFFB9, 0x4000}, + 0x314A: {0xFFBA, 0x4000}, + 0x314B: {0xFFBB, 0x4000}, + 0x314C: {0xFFBC, 0x4000}, + 0x314D: {0xFFBD, 0x4000}, + 0x314E: {0xFFBE, 0x4000}, + 0x314F: {0xFFC2, 0x4000}, + 0x3150: {0xFFC3, 0x4000}, + 0x3151: {0xFFC4, 0x4000}, + 0x3152: {0xFFC5, 0x4000}, + 0x3153: {0xFFC6, 0x4000}, + 0x3154: {0xFFC7, 0x4000}, + 0x3155: {0xFFCA, 0x4000}, + 0x3156: {0xFFCB, 0x4000}, + 0x3157: {0xFFCC, 0x4000}, + 0x3158: {0xFFCD, 0x4000}, + 0x3159: {0xFFCE, 0x4000}, + 0x315A: {0xFFCF, 0x4000}, + 0x315B: {0xFFD2, 0x4000}, + 0x315C: {0xFFD3, 0x4000}, + 0x315D: {0xFFD4, 0x4000}, + 0x315E: {0xFFD5, 0x4000}, + 0x315F: {0xFFD6, 0x4000}, + 0x3160: {0xFFD7, 0x4000}, + 0x3161: {0xFFDA, 0x4000}, + 0x3162: {0xFFDB, 0x4000}, + 0x3163: {0xFFDC, 0x4000}, + 0x3164: {0xFFA0, 0x4000}, + 0xFF01: {0x21, 0x9000}, + 0xFF02: {0x22, 0x9000}, + 0xFF03: {0x23, 0x9000}, + 0xFF04: {0x24, 0x9000}, + 0xFF05: {0x25, 0x9000}, + 0xFF06: {0x26, 0x9000}, + 0xFF07: {0x27, 0x9000}, + 0xFF08: {0x28, 0x9000}, + 0xFF09: {0x29, 0x9000}, + 0xFF0A: {0x2A, 0x9000}, + 0xFF0B: {0x2B, 0x9000}, + 0xFF0C: {0x2C, 0x9000}, + 0xFF0D: {0x2D, 0x9000}, + 0xFF0E: {0x2E, 0x9000}, + 0xFF0F: {0x2F, 0x9000}, + 0xFF10: {0x30, 0x9000}, + 0xFF11: {0x31, 0x9000}, + 0xFF12: {0x32, 0x9000}, + 0xFF13: {0x33, 0x9000}, + 0xFF14: {0x34, 0x9000}, + 0xFF15: {0x35, 0x9000}, + 0xFF16: {0x36, 0x9000}, + 0xFF17: {0x37, 0x9000}, + 0xFF18: {0x38, 0x9000}, + 0xFF19: {0x39, 0x9000}, + 0xFF1A: {0x3A, 0x9000}, + 0xFF1B: {0x3B, 0x9000}, + 0xFF1C: {0x3C, 0x9000}, + 0xFF1D: {0x3D, 0x9000}, + 0xFF1E: {0x3E, 0x9000}, + 0xFF1F: {0x3F, 0x9000}, + 0xFF20: {0x40, 0x9000}, + 0xFF21: {0x41, 0x9000}, + 0xFF22: {0x42, 0x9000}, + 0xFF23: {0x43, 0x9000}, + 0xFF24: {0x44, 0x9000}, + 0xFF25: {0x45, 0x9000}, + 0xFF26: {0x46, 0x9000}, + 0xFF27: {0x47, 0x9000}, + 0xFF28: {0x48, 0x9000}, + 0xFF29: {0x49, 0x9000}, + 0xFF2A: {0x4A, 0x9000}, + 0xFF2B: {0x4B, 0x9000}, + 0xFF2C: {0x4C, 0x9000}, + 0xFF2D: {0x4D, 0x9000}, + 0xFF2E: {0x4E, 0x9000}, + 0xFF2F: {0x4F, 0x9000}, + 0xFF30: {0x50, 0x9000}, + 0xFF31: {0x51, 0x9000}, + 0xFF32: {0x52, 0x9000}, + 0xFF33: {0x53, 0x9000}, + 0xFF34: {0x54, 0x9000}, + 0xFF35: {0x55, 0x9000}, + 0xFF36: {0x56, 0x9000}, + 0xFF37: {0x57, 0x9000}, + 0xFF38: {0x58, 0x9000}, + 0xFF39: {0x59, 0x9000}, + 0xFF3A: {0x5A, 0x9000}, + 0xFF3B: {0x5B, 0x9000}, + 0xFF3C: {0x5C, 0x9000}, + 0xFF3D: {0x5D, 0x9000}, + 0xFF3E: {0x5E, 0x9000}, + 0xFF3F: {0x5F, 0x9000}, + 0xFF40: {0x60, 0x9000}, + 0xFF41: {0x61, 0x9000}, + 0xFF42: {0x62, 0x9000}, + 0xFF43: {0x63, 0x9000}, + 0xFF44: {0x64, 0x9000}, + 0xFF45: {0x65, 0x9000}, + 0xFF46: {0x66, 0x9000}, + 0xFF47: {0x67, 0x9000}, + 0xFF48: {0x68, 0x9000}, + 0xFF49: {0x69, 0x9000}, + 0xFF4A: {0x6A, 0x9000}, + 0xFF4B: {0x6B, 0x9000}, + 0xFF4C: {0x6C, 0x9000}, + 0xFF4D: {0x6D, 0x9000}, + 0xFF4E: {0x6E, 0x9000}, + 0xFF4F: {0x6F, 0x9000}, + 0xFF50: {0x70, 0x9000}, + 0xFF51: {0x71, 0x9000}, + 0xFF52: {0x72, 0x9000}, + 0xFF53: {0x73, 0x9000}, + 0xFF54: {0x74, 0x9000}, + 0xFF55: {0x75, 0x9000}, + 0xFF56: {0x76, 0x9000}, + 0xFF57: {0x77, 0x9000}, + 0xFF58: {0x78, 0x9000}, + 0xFF59: {0x79, 0x9000}, + 0xFF5A: {0x7A, 0x9000}, + 0xFF5B: {0x7B, 0x9000}, + 0xFF5C: {0x7C, 0x9000}, + 0xFF5D: {0x7D, 0x9000}, + 0xFF5E: {0x7E, 0x9000}, + 0xFF5F: {0x2985, 0x9000}, + 0xFF60: {0x2986, 0x9000}, + 0xFF61: {0x3002, 0xB000}, + 0xFF62: {0x300C, 0xB000}, + 0xFF63: {0x300D, 0xB000}, + 0xFF64: {0x3001, 0xB000}, + 0xFF65: {0x30FB, 0xB000}, + 0xFF66: {0x30F2, 0xB000}, + 0xFF67: {0x30A1, 0xB000}, + 0xFF68: {0x30A3, 0xB000}, + 0xFF69: {0x30A5, 0xB000}, + 0xFF6A: {0x30A7, 0xB000}, + 0xFF6B: {0x30A9, 0xB000}, + 0xFF6C: {0x30E3, 0xB000}, + 0xFF6D: {0x30E5, 0xB000}, + 0xFF6E: {0x30E7, 0xB000}, + 0xFF6F: {0x30C3, 0xB000}, + 0xFF70: {0x30FC, 0xB000}, + 0xFF71: {0x30A2, 0xB000}, + 0xFF72: {0x30A4, 0xB000}, + 0xFF73: {0x30A6, 0xB000}, + 0xFF74: {0x30A8, 0xB000}, + 0xFF75: {0x30AA, 0xB000}, + 0xFF76: {0x30AB, 0xB000}, + 0xFF77: {0x30AD, 0xB000}, + 0xFF78: {0x30AF, 0xB000}, + 0xFF79: {0x30B1, 0xB000}, + 0xFF7A: {0x30B3, 0xB000}, + 0xFF7B: {0x30B5, 0xB000}, + 0xFF7C: {0x30B7, 0xB000}, + 0xFF7D: {0x30B9, 0xB000}, + 0xFF7E: {0x30BB, 0xB000}, + 0xFF7F: {0x30BD, 0xB000}, + 0xFF80: {0x30BF, 0xB000}, + 0xFF81: {0x30C1, 0xB000}, + 0xFF82: {0x30C4, 0xB000}, + 0xFF83: {0x30C6, 0xB000}, + 0xFF84: {0x30C8, 0xB000}, + 0xFF85: {0x30CA, 0xB000}, + 0xFF86: {0x30CB, 0xB000}, + 0xFF87: {0x30CC, 0xB000}, + 0xFF88: {0x30CD, 0xB000}, + 0xFF89: {0x30CE, 0xB000}, + 0xFF8A: {0x30CF, 0xB000}, + 0xFF8B: {0x30D2, 0xB000}, + 0xFF8C: {0x30D5, 0xB000}, + 0xFF8D: {0x30D8, 0xB000}, + 0xFF8E: {0x30DB, 0xB000}, + 0xFF8F: {0x30DE, 0xB000}, + 0xFF90: {0x30DF, 0xB000}, + 0xFF91: {0x30E0, 0xB000}, + 0xFF92: {0x30E1, 0xB000}, + 0xFF93: {0x30E2, 0xB000}, + 0xFF94: {0x30E4, 0xB000}, + 0xFF95: {0x30E6, 0xB000}, + 0xFF96: {0x30E8, 0xB000}, + 0xFF97: {0x30E9, 0xB000}, + 0xFF98: {0x30EA, 0xB000}, + 0xFF99: {0x30EB, 0xB000}, + 0xFF9A: {0x30EC, 0xB000}, + 0xFF9B: {0x30ED, 0xB000}, + 0xFF9C: {0x30EF, 0xB000}, + 0xFF9D: {0x30F3, 0xB000}, + 0xFF9E: {0x3099, 0xB000}, + 0xFF9F: {0x309A, 0xB000}, + 0xFFA0: {0x3164, 0xB000}, + 0xFFA1: {0x3131, 0xB000}, + 0xFFA2: {0x3132, 0xB000}, + 0xFFA3: {0x3133, 0xB000}, + 0xFFA4: {0x3134, 0xB000}, + 0xFFA5: {0x3135, 0xB000}, + 0xFFA6: {0x3136, 0xB000}, + 0xFFA7: {0x3137, 0xB000}, + 0xFFA8: {0x3138, 0xB000}, + 0xFFA9: {0x3139, 0xB000}, + 0xFFAA: {0x313A, 0xB000}, + 0xFFAB: {0x313B, 0xB000}, + 0xFFAC: {0x313C, 0xB000}, + 0xFFAD: {0x313D, 0xB000}, + 0xFFAE: {0x313E, 0xB000}, + 0xFFAF: {0x313F, 0xB000}, + 0xFFB0: {0x3140, 0xB000}, + 0xFFB1: {0x3141, 0xB000}, + 0xFFB2: {0x3142, 0xB000}, + 0xFFB3: {0x3143, 0xB000}, + 0xFFB4: {0x3144, 0xB000}, + 0xFFB5: {0x3145, 0xB000}, + 0xFFB6: {0x3146, 0xB000}, + 0xFFB7: {0x3147, 0xB000}, + 0xFFB8: {0x3148, 0xB000}, + 0xFFB9: {0x3149, 0xB000}, + 0xFFBA: {0x314A, 0xB000}, + 0xFFBB: {0x314B, 0xB000}, + 0xFFBC: {0x314C, 0xB000}, + 0xFFBD: {0x314D, 0xB000}, + 0xFFBE: {0x314E, 0xB000}, + 0xFFC2: {0x314F, 0xB000}, + 0xFFC3: {0x3150, 0xB000}, + 0xFFC4: {0x3151, 0xB000}, + 0xFFC5: {0x3152, 0xB000}, + 0xFFC6: {0x3153, 0xB000}, + 0xFFC7: {0x3154, 0xB000}, + 0xFFCA: {0x3155, 0xB000}, + 0xFFCB: {0x3156, 0xB000}, + 0xFFCC: {0x3157, 0xB000}, + 0xFFCD: {0x3158, 0xB000}, + 0xFFCE: {0x3159, 0xB000}, + 0xFFCF: {0x315A, 0xB000}, + 0xFFD2: {0x315B, 0xB000}, + 0xFFD3: {0x315C, 0xB000}, + 0xFFD4: {0x315D, 0xB000}, + 0xFFD5: {0x315E, 0xB000}, + 0xFFD6: {0x315F, 0xB000}, + 0xFFD7: {0x3160, 0xB000}, + 0xFFDA: {0x3161, 0xB000}, + 0xFFDB: {0x3162, 0xB000}, + 0xFFDC: {0x3163, 0xB000}, + 0xFFE0: {0xA2, 0x9000}, + 0xFFE1: {0xA3, 0x9000}, + 0xFFE2: {0xAC, 0x9000}, + 0xFFE3: {0xAF, 0x9000}, + 0xFFE4: {0xA6, 0x9000}, + 0xFFE5: {0xA5, 0x9000}, + 0xFFE6: {0x20A9, 0x9000}, + 0xFFE8: {0x2502, 0xB000}, + 0xFFE9: {0x2190, 0xB000}, + 0xFFEA: {0x2191, 0xB000}, + 0xFFEB: {0x2192, 0xB000}, + 0xFFEC: {0x2193, 0xB000}, + 0xFFED: {0x25A0, 0xB000}, + 0xFFEE: {0x25CB, 0xB000}, +} diff --git a/vendor/golang.org/x/text/width/tables.go b/vendor/golang.org/x/text/width/tables.go index e21f0b838..710fd7525 100644 --- a/vendor/golang.org/x/text/width/tables.go +++ b/vendor/golang.org/x/text/width/tables.go @@ -3,7 +3,7 @@ package width // UnicodeVersion is the Unicode version from which the tables in this package are derived. -const UnicodeVersion = "9.0.0" +const UnicodeVersion = "10.0.0" // lookup returns the trie value for the first UTF-8 encoding in s and // the width in bytes of this encoding. The size will be 0 if s does not @@ -175,7 +175,7 @@ func (t *widthTrie) lookupStringUnsafe(s string) uint16 { return 0 } -// widthTrie. Total size: 14080 bytes (13.75 KiB). Checksum: 3b8aeb3dc03667a3. +// widthTrie. Total size: 14336 bytes (14.00 KiB). Checksum: c59df54630d3dc4a. type widthTrie struct{} func newWidthTrie(i int) *widthTrie { @@ -190,9 +190,9 @@ func (t *widthTrie) lookupValue(n uint32, b byte) uint16 { } } -// widthValues: 99 blocks, 6336 entries, 12672 bytes +// widthValues: 101 blocks, 6464 entries, 12928 bytes // The third block is the zero block. -var widthValues = [6336]uint16{ +var widthValues = [6464]uint16{ // Block 0x0, offset 0x0 0x20: 0x6001, 0x21: 0x6002, 0x22: 0x6002, 0x23: 0x6002, 0x24: 0x6002, 0x25: 0x6002, 0x26: 0x6002, 0x27: 0x6002, 0x28: 0x6002, 0x29: 0x6002, @@ -606,7 +606,7 @@ var widthValues = [6336]uint16{ 0xd98: 0x4000, 0xd99: 0x4000, 0xd9a: 0x4000, 0xd9b: 0x4000, 0xd9c: 0x4000, 0xd9d: 0x4000, 0xd9e: 0x4000, 0xd9f: 0x4000, 0xda0: 0x4000, 0xda1: 0x4000, 0xda2: 0x4000, 0xda3: 0x4000, 0xda4: 0x4000, 0xda5: 0x4000, 0xda6: 0x4000, 0xda7: 0x4000, 0xda8: 0x4000, 0xda9: 0x4000, - 0xdaa: 0x4000, 0xdab: 0x4000, 0xdac: 0x4000, 0xdad: 0x4000, + 0xdaa: 0x4000, 0xdab: 0x4000, 0xdac: 0x4000, 0xdad: 0x4000, 0xdae: 0x4000, 0xdb1: 0x403e, 0xdb2: 0x403e, 0xdb3: 0x403e, 0xdb4: 0x403e, 0xdb5: 0x403e, 0xdb6: 0x403e, 0xdb7: 0x403e, 0xdb8: 0x403e, 0xdb9: 0x403e, 0xdba: 0x403e, 0xdbb: 0x403e, 0xdbc: 0x403e, 0xdbd: 0x403e, 0xdbe: 0x403e, 0xdbf: 0x403e, @@ -773,7 +773,7 @@ var widthValues = [6336]uint16{ 0x11aa: 0xb092, 0x11ab: 0xb091, 0x11ac: 0xb093, 0x11ad: 0xb094, 0x11ae: 0xb095, 0x11bd: 0x2000, // Block 0x47, offset 0x11c0 - 0x11e0: 0x4000, + 0x11e0: 0x4000, 0x11e1: 0x4000, // Block 0x48, offset 0x1200 0x1200: 0x4000, 0x1201: 0x4000, 0x1202: 0x4000, 0x1203: 0x4000, 0x1204: 0x4000, 0x1205: 0x4000, 0x1206: 0x4000, 0x1207: 0x4000, 0x1208: 0x4000, 0x1209: 0x4000, 0x120a: 0x4000, 0x120b: 0x4000, @@ -794,109 +794,108 @@ var widthValues = [6336]uint16{ 0x126a: 0x4000, 0x126b: 0x4000, 0x126c: 0x4000, 0x126d: 0x4000, 0x126e: 0x4000, 0x126f: 0x4000, 0x1270: 0x4000, 0x1271: 0x4000, 0x1272: 0x4000, // Block 0x4a, offset 0x1280 - 0x1280: 0x4000, 0x1281: 0x4000, + 0x1280: 0x4000, 0x1281: 0x4000, 0x1282: 0x4000, 0x1283: 0x4000, 0x1284: 0x4000, 0x1285: 0x4000, + 0x1286: 0x4000, 0x1287: 0x4000, 0x1288: 0x4000, 0x1289: 0x4000, 0x128a: 0x4000, 0x128b: 0x4000, + 0x128c: 0x4000, 0x128d: 0x4000, 0x128e: 0x4000, 0x128f: 0x4000, 0x1290: 0x4000, 0x1291: 0x4000, + 0x1292: 0x4000, 0x1293: 0x4000, 0x1294: 0x4000, 0x1295: 0x4000, 0x1296: 0x4000, 0x1297: 0x4000, + 0x1298: 0x4000, 0x1299: 0x4000, 0x129a: 0x4000, 0x129b: 0x4000, 0x129c: 0x4000, 0x129d: 0x4000, + 0x129e: 0x4000, // Block 0x4b, offset 0x12c0 - 0x12c4: 0x4000, + 0x12f0: 0x4000, 0x12f1: 0x4000, 0x12f2: 0x4000, 0x12f3: 0x4000, 0x12f4: 0x4000, 0x12f5: 0x4000, + 0x12f6: 0x4000, 0x12f7: 0x4000, 0x12f8: 0x4000, 0x12f9: 0x4000, 0x12fa: 0x4000, 0x12fb: 0x4000, + 0x12fc: 0x4000, 0x12fd: 0x4000, 0x12fe: 0x4000, 0x12ff: 0x4000, // Block 0x4c, offset 0x1300 - 0x130f: 0x4000, + 0x1300: 0x4000, 0x1301: 0x4000, 0x1302: 0x4000, 0x1303: 0x4000, 0x1304: 0x4000, 0x1305: 0x4000, + 0x1306: 0x4000, 0x1307: 0x4000, 0x1308: 0x4000, 0x1309: 0x4000, 0x130a: 0x4000, 0x130b: 0x4000, + 0x130c: 0x4000, 0x130d: 0x4000, 0x130e: 0x4000, 0x130f: 0x4000, 0x1310: 0x4000, 0x1311: 0x4000, + 0x1312: 0x4000, 0x1313: 0x4000, 0x1314: 0x4000, 0x1315: 0x4000, 0x1316: 0x4000, 0x1317: 0x4000, + 0x1318: 0x4000, 0x1319: 0x4000, 0x131a: 0x4000, 0x131b: 0x4000, 0x131c: 0x4000, 0x131d: 0x4000, + 0x131e: 0x4000, 0x131f: 0x4000, 0x1320: 0x4000, 0x1321: 0x4000, 0x1322: 0x4000, 0x1323: 0x4000, + 0x1324: 0x4000, 0x1325: 0x4000, 0x1326: 0x4000, 0x1327: 0x4000, 0x1328: 0x4000, 0x1329: 0x4000, + 0x132a: 0x4000, 0x132b: 0x4000, 0x132c: 0x4000, 0x132d: 0x4000, 0x132e: 0x4000, 0x132f: 0x4000, + 0x1330: 0x4000, 0x1331: 0x4000, 0x1332: 0x4000, 0x1333: 0x4000, 0x1334: 0x4000, 0x1335: 0x4000, + 0x1336: 0x4000, 0x1337: 0x4000, 0x1338: 0x4000, 0x1339: 0x4000, 0x133a: 0x4000, 0x133b: 0x4000, // Block 0x4d, offset 0x1340 - 0x1340: 0x2000, 0x1341: 0x2000, 0x1342: 0x2000, 0x1343: 0x2000, 0x1344: 0x2000, 0x1345: 0x2000, - 0x1346: 0x2000, 0x1347: 0x2000, 0x1348: 0x2000, 0x1349: 0x2000, 0x134a: 0x2000, - 0x1350: 0x2000, 0x1351: 0x2000, - 0x1352: 0x2000, 0x1353: 0x2000, 0x1354: 0x2000, 0x1355: 0x2000, 0x1356: 0x2000, 0x1357: 0x2000, - 0x1358: 0x2000, 0x1359: 0x2000, 0x135a: 0x2000, 0x135b: 0x2000, 0x135c: 0x2000, 0x135d: 0x2000, - 0x135e: 0x2000, 0x135f: 0x2000, 0x1360: 0x2000, 0x1361: 0x2000, 0x1362: 0x2000, 0x1363: 0x2000, - 0x1364: 0x2000, 0x1365: 0x2000, 0x1366: 0x2000, 0x1367: 0x2000, 0x1368: 0x2000, 0x1369: 0x2000, - 0x136a: 0x2000, 0x136b: 0x2000, 0x136c: 0x2000, 0x136d: 0x2000, - 0x1370: 0x2000, 0x1371: 0x2000, 0x1372: 0x2000, 0x1373: 0x2000, 0x1374: 0x2000, 0x1375: 0x2000, - 0x1376: 0x2000, 0x1377: 0x2000, 0x1378: 0x2000, 0x1379: 0x2000, 0x137a: 0x2000, 0x137b: 0x2000, - 0x137c: 0x2000, 0x137d: 0x2000, 0x137e: 0x2000, 0x137f: 0x2000, + 0x1344: 0x4000, // Block 0x4e, offset 0x1380 - 0x1380: 0x2000, 0x1381: 0x2000, 0x1382: 0x2000, 0x1383: 0x2000, 0x1384: 0x2000, 0x1385: 0x2000, - 0x1386: 0x2000, 0x1387: 0x2000, 0x1388: 0x2000, 0x1389: 0x2000, 0x138a: 0x2000, 0x138b: 0x2000, - 0x138c: 0x2000, 0x138d: 0x2000, 0x138e: 0x2000, 0x138f: 0x2000, 0x1390: 0x2000, 0x1391: 0x2000, - 0x1392: 0x2000, 0x1393: 0x2000, 0x1394: 0x2000, 0x1395: 0x2000, 0x1396: 0x2000, 0x1397: 0x2000, - 0x1398: 0x2000, 0x1399: 0x2000, 0x139a: 0x2000, 0x139b: 0x2000, 0x139c: 0x2000, 0x139d: 0x2000, - 0x139e: 0x2000, 0x139f: 0x2000, 0x13a0: 0x2000, 0x13a1: 0x2000, 0x13a2: 0x2000, 0x13a3: 0x2000, - 0x13a4: 0x2000, 0x13a5: 0x2000, 0x13a6: 0x2000, 0x13a7: 0x2000, 0x13a8: 0x2000, 0x13a9: 0x2000, - 0x13b0: 0x2000, 0x13b1: 0x2000, 0x13b2: 0x2000, 0x13b3: 0x2000, 0x13b4: 0x2000, 0x13b5: 0x2000, - 0x13b6: 0x2000, 0x13b7: 0x2000, 0x13b8: 0x2000, 0x13b9: 0x2000, 0x13ba: 0x2000, 0x13bb: 0x2000, - 0x13bc: 0x2000, 0x13bd: 0x2000, 0x13be: 0x2000, 0x13bf: 0x2000, + 0x138f: 0x4000, // Block 0x4f, offset 0x13c0 0x13c0: 0x2000, 0x13c1: 0x2000, 0x13c2: 0x2000, 0x13c3: 0x2000, 0x13c4: 0x2000, 0x13c5: 0x2000, - 0x13c6: 0x2000, 0x13c7: 0x2000, 0x13c8: 0x2000, 0x13c9: 0x2000, 0x13ca: 0x2000, 0x13cb: 0x2000, - 0x13cc: 0x2000, 0x13cd: 0x2000, 0x13ce: 0x4000, 0x13cf: 0x2000, 0x13d0: 0x2000, 0x13d1: 0x4000, - 0x13d2: 0x4000, 0x13d3: 0x4000, 0x13d4: 0x4000, 0x13d5: 0x4000, 0x13d6: 0x4000, 0x13d7: 0x4000, - 0x13d8: 0x4000, 0x13d9: 0x4000, 0x13da: 0x4000, 0x13db: 0x2000, 0x13dc: 0x2000, 0x13dd: 0x2000, + 0x13c6: 0x2000, 0x13c7: 0x2000, 0x13c8: 0x2000, 0x13c9: 0x2000, 0x13ca: 0x2000, + 0x13d0: 0x2000, 0x13d1: 0x2000, + 0x13d2: 0x2000, 0x13d3: 0x2000, 0x13d4: 0x2000, 0x13d5: 0x2000, 0x13d6: 0x2000, 0x13d7: 0x2000, + 0x13d8: 0x2000, 0x13d9: 0x2000, 0x13da: 0x2000, 0x13db: 0x2000, 0x13dc: 0x2000, 0x13dd: 0x2000, 0x13de: 0x2000, 0x13df: 0x2000, 0x13e0: 0x2000, 0x13e1: 0x2000, 0x13e2: 0x2000, 0x13e3: 0x2000, 0x13e4: 0x2000, 0x13e5: 0x2000, 0x13e6: 0x2000, 0x13e7: 0x2000, 0x13e8: 0x2000, 0x13e9: 0x2000, - 0x13ea: 0x2000, 0x13eb: 0x2000, 0x13ec: 0x2000, + 0x13ea: 0x2000, 0x13eb: 0x2000, 0x13ec: 0x2000, 0x13ed: 0x2000, + 0x13f0: 0x2000, 0x13f1: 0x2000, 0x13f2: 0x2000, 0x13f3: 0x2000, 0x13f4: 0x2000, 0x13f5: 0x2000, + 0x13f6: 0x2000, 0x13f7: 0x2000, 0x13f8: 0x2000, 0x13f9: 0x2000, 0x13fa: 0x2000, 0x13fb: 0x2000, + 0x13fc: 0x2000, 0x13fd: 0x2000, 0x13fe: 0x2000, 0x13ff: 0x2000, // Block 0x50, offset 0x1400 - 0x1400: 0x4000, 0x1401: 0x4000, 0x1402: 0x4000, - 0x1410: 0x4000, 0x1411: 0x4000, - 0x1412: 0x4000, 0x1413: 0x4000, 0x1414: 0x4000, 0x1415: 0x4000, 0x1416: 0x4000, 0x1417: 0x4000, - 0x1418: 0x4000, 0x1419: 0x4000, 0x141a: 0x4000, 0x141b: 0x4000, 0x141c: 0x4000, 0x141d: 0x4000, - 0x141e: 0x4000, 0x141f: 0x4000, 0x1420: 0x4000, 0x1421: 0x4000, 0x1422: 0x4000, 0x1423: 0x4000, - 0x1424: 0x4000, 0x1425: 0x4000, 0x1426: 0x4000, 0x1427: 0x4000, 0x1428: 0x4000, 0x1429: 0x4000, - 0x142a: 0x4000, 0x142b: 0x4000, 0x142c: 0x4000, 0x142d: 0x4000, 0x142e: 0x4000, 0x142f: 0x4000, - 0x1430: 0x4000, 0x1431: 0x4000, 0x1432: 0x4000, 0x1433: 0x4000, 0x1434: 0x4000, 0x1435: 0x4000, - 0x1436: 0x4000, 0x1437: 0x4000, 0x1438: 0x4000, 0x1439: 0x4000, 0x143a: 0x4000, 0x143b: 0x4000, + 0x1400: 0x2000, 0x1401: 0x2000, 0x1402: 0x2000, 0x1403: 0x2000, 0x1404: 0x2000, 0x1405: 0x2000, + 0x1406: 0x2000, 0x1407: 0x2000, 0x1408: 0x2000, 0x1409: 0x2000, 0x140a: 0x2000, 0x140b: 0x2000, + 0x140c: 0x2000, 0x140d: 0x2000, 0x140e: 0x2000, 0x140f: 0x2000, 0x1410: 0x2000, 0x1411: 0x2000, + 0x1412: 0x2000, 0x1413: 0x2000, 0x1414: 0x2000, 0x1415: 0x2000, 0x1416: 0x2000, 0x1417: 0x2000, + 0x1418: 0x2000, 0x1419: 0x2000, 0x141a: 0x2000, 0x141b: 0x2000, 0x141c: 0x2000, 0x141d: 0x2000, + 0x141e: 0x2000, 0x141f: 0x2000, 0x1420: 0x2000, 0x1421: 0x2000, 0x1422: 0x2000, 0x1423: 0x2000, + 0x1424: 0x2000, 0x1425: 0x2000, 0x1426: 0x2000, 0x1427: 0x2000, 0x1428: 0x2000, 0x1429: 0x2000, + 0x1430: 0x2000, 0x1431: 0x2000, 0x1432: 0x2000, 0x1433: 0x2000, 0x1434: 0x2000, 0x1435: 0x2000, + 0x1436: 0x2000, 0x1437: 0x2000, 0x1438: 0x2000, 0x1439: 0x2000, 0x143a: 0x2000, 0x143b: 0x2000, + 0x143c: 0x2000, 0x143d: 0x2000, 0x143e: 0x2000, 0x143f: 0x2000, // Block 0x51, offset 0x1440 - 0x1440: 0x4000, 0x1441: 0x4000, 0x1442: 0x4000, 0x1443: 0x4000, 0x1444: 0x4000, 0x1445: 0x4000, - 0x1446: 0x4000, 0x1447: 0x4000, 0x1448: 0x4000, - 0x1450: 0x4000, 0x1451: 0x4000, + 0x1440: 0x2000, 0x1441: 0x2000, 0x1442: 0x2000, 0x1443: 0x2000, 0x1444: 0x2000, 0x1445: 0x2000, + 0x1446: 0x2000, 0x1447: 0x2000, 0x1448: 0x2000, 0x1449: 0x2000, 0x144a: 0x2000, 0x144b: 0x2000, + 0x144c: 0x2000, 0x144d: 0x2000, 0x144e: 0x4000, 0x144f: 0x2000, 0x1450: 0x2000, 0x1451: 0x4000, + 0x1452: 0x4000, 0x1453: 0x4000, 0x1454: 0x4000, 0x1455: 0x4000, 0x1456: 0x4000, 0x1457: 0x4000, + 0x1458: 0x4000, 0x1459: 0x4000, 0x145a: 0x4000, 0x145b: 0x2000, 0x145c: 0x2000, 0x145d: 0x2000, + 0x145e: 0x2000, 0x145f: 0x2000, 0x1460: 0x2000, 0x1461: 0x2000, 0x1462: 0x2000, 0x1463: 0x2000, + 0x1464: 0x2000, 0x1465: 0x2000, 0x1466: 0x2000, 0x1467: 0x2000, 0x1468: 0x2000, 0x1469: 0x2000, + 0x146a: 0x2000, 0x146b: 0x2000, 0x146c: 0x2000, // Block 0x52, offset 0x1480 - 0x1480: 0x4000, 0x1481: 0x4000, 0x1482: 0x4000, 0x1483: 0x4000, 0x1484: 0x4000, 0x1485: 0x4000, - 0x1486: 0x4000, 0x1487: 0x4000, 0x1488: 0x4000, 0x1489: 0x4000, 0x148a: 0x4000, 0x148b: 0x4000, - 0x148c: 0x4000, 0x148d: 0x4000, 0x148e: 0x4000, 0x148f: 0x4000, 0x1490: 0x4000, 0x1491: 0x4000, + 0x1480: 0x4000, 0x1481: 0x4000, 0x1482: 0x4000, + 0x1490: 0x4000, 0x1491: 0x4000, 0x1492: 0x4000, 0x1493: 0x4000, 0x1494: 0x4000, 0x1495: 0x4000, 0x1496: 0x4000, 0x1497: 0x4000, 0x1498: 0x4000, 0x1499: 0x4000, 0x149a: 0x4000, 0x149b: 0x4000, 0x149c: 0x4000, 0x149d: 0x4000, - 0x149e: 0x4000, 0x149f: 0x4000, 0x14a0: 0x4000, - 0x14ad: 0x4000, 0x14ae: 0x4000, 0x14af: 0x4000, + 0x149e: 0x4000, 0x149f: 0x4000, 0x14a0: 0x4000, 0x14a1: 0x4000, 0x14a2: 0x4000, 0x14a3: 0x4000, + 0x14a4: 0x4000, 0x14a5: 0x4000, 0x14a6: 0x4000, 0x14a7: 0x4000, 0x14a8: 0x4000, 0x14a9: 0x4000, + 0x14aa: 0x4000, 0x14ab: 0x4000, 0x14ac: 0x4000, 0x14ad: 0x4000, 0x14ae: 0x4000, 0x14af: 0x4000, 0x14b0: 0x4000, 0x14b1: 0x4000, 0x14b2: 0x4000, 0x14b3: 0x4000, 0x14b4: 0x4000, 0x14b5: 0x4000, - 0x14b7: 0x4000, 0x14b8: 0x4000, 0x14b9: 0x4000, 0x14ba: 0x4000, 0x14bb: 0x4000, - 0x14bc: 0x4000, 0x14bd: 0x4000, 0x14be: 0x4000, 0x14bf: 0x4000, + 0x14b6: 0x4000, 0x14b7: 0x4000, 0x14b8: 0x4000, 0x14b9: 0x4000, 0x14ba: 0x4000, 0x14bb: 0x4000, // Block 0x53, offset 0x14c0 0x14c0: 0x4000, 0x14c1: 0x4000, 0x14c2: 0x4000, 0x14c3: 0x4000, 0x14c4: 0x4000, 0x14c5: 0x4000, - 0x14c6: 0x4000, 0x14c7: 0x4000, 0x14c8: 0x4000, 0x14c9: 0x4000, 0x14ca: 0x4000, 0x14cb: 0x4000, - 0x14cc: 0x4000, 0x14cd: 0x4000, 0x14ce: 0x4000, 0x14cf: 0x4000, 0x14d0: 0x4000, 0x14d1: 0x4000, - 0x14d2: 0x4000, 0x14d3: 0x4000, 0x14d4: 0x4000, 0x14d5: 0x4000, 0x14d6: 0x4000, 0x14d7: 0x4000, - 0x14d8: 0x4000, 0x14d9: 0x4000, 0x14da: 0x4000, 0x14db: 0x4000, 0x14dc: 0x4000, 0x14dd: 0x4000, - 0x14de: 0x4000, 0x14df: 0x4000, 0x14e0: 0x4000, 0x14e1: 0x4000, 0x14e2: 0x4000, 0x14e3: 0x4000, - 0x14e4: 0x4000, 0x14e5: 0x4000, 0x14e6: 0x4000, 0x14e7: 0x4000, 0x14e8: 0x4000, 0x14e9: 0x4000, - 0x14ea: 0x4000, 0x14eb: 0x4000, 0x14ec: 0x4000, 0x14ed: 0x4000, 0x14ee: 0x4000, 0x14ef: 0x4000, - 0x14f0: 0x4000, 0x14f1: 0x4000, 0x14f2: 0x4000, 0x14f3: 0x4000, 0x14f4: 0x4000, 0x14f5: 0x4000, - 0x14f6: 0x4000, 0x14f7: 0x4000, 0x14f8: 0x4000, 0x14f9: 0x4000, 0x14fa: 0x4000, 0x14fb: 0x4000, - 0x14fc: 0x4000, 0x14fe: 0x4000, 0x14ff: 0x4000, + 0x14c6: 0x4000, 0x14c7: 0x4000, 0x14c8: 0x4000, + 0x14d0: 0x4000, 0x14d1: 0x4000, + 0x14e0: 0x4000, 0x14e1: 0x4000, 0x14e2: 0x4000, 0x14e3: 0x4000, + 0x14e4: 0x4000, 0x14e5: 0x4000, // Block 0x54, offset 0x1500 0x1500: 0x4000, 0x1501: 0x4000, 0x1502: 0x4000, 0x1503: 0x4000, 0x1504: 0x4000, 0x1505: 0x4000, 0x1506: 0x4000, 0x1507: 0x4000, 0x1508: 0x4000, 0x1509: 0x4000, 0x150a: 0x4000, 0x150b: 0x4000, 0x150c: 0x4000, 0x150d: 0x4000, 0x150e: 0x4000, 0x150f: 0x4000, 0x1510: 0x4000, 0x1511: 0x4000, - 0x1512: 0x4000, 0x1513: 0x4000, - 0x1520: 0x4000, 0x1521: 0x4000, 0x1522: 0x4000, 0x1523: 0x4000, - 0x1524: 0x4000, 0x1525: 0x4000, 0x1526: 0x4000, 0x1527: 0x4000, 0x1528: 0x4000, 0x1529: 0x4000, - 0x152a: 0x4000, 0x152b: 0x4000, 0x152c: 0x4000, 0x152d: 0x4000, 0x152e: 0x4000, 0x152f: 0x4000, + 0x1512: 0x4000, 0x1513: 0x4000, 0x1514: 0x4000, 0x1515: 0x4000, 0x1516: 0x4000, 0x1517: 0x4000, + 0x1518: 0x4000, 0x1519: 0x4000, 0x151a: 0x4000, 0x151b: 0x4000, 0x151c: 0x4000, 0x151d: 0x4000, + 0x151e: 0x4000, 0x151f: 0x4000, 0x1520: 0x4000, + 0x152d: 0x4000, 0x152e: 0x4000, 0x152f: 0x4000, 0x1530: 0x4000, 0x1531: 0x4000, 0x1532: 0x4000, 0x1533: 0x4000, 0x1534: 0x4000, 0x1535: 0x4000, - 0x1536: 0x4000, 0x1537: 0x4000, 0x1538: 0x4000, 0x1539: 0x4000, 0x153a: 0x4000, 0x153b: 0x4000, + 0x1537: 0x4000, 0x1538: 0x4000, 0x1539: 0x4000, 0x153a: 0x4000, 0x153b: 0x4000, 0x153c: 0x4000, 0x153d: 0x4000, 0x153e: 0x4000, 0x153f: 0x4000, // Block 0x55, offset 0x1540 0x1540: 0x4000, 0x1541: 0x4000, 0x1542: 0x4000, 0x1543: 0x4000, 0x1544: 0x4000, 0x1545: 0x4000, - 0x1546: 0x4000, 0x1547: 0x4000, 0x1548: 0x4000, 0x1549: 0x4000, 0x154a: 0x4000, - 0x154f: 0x4000, 0x1550: 0x4000, 0x1551: 0x4000, - 0x1552: 0x4000, 0x1553: 0x4000, - 0x1560: 0x4000, 0x1561: 0x4000, 0x1562: 0x4000, 0x1563: 0x4000, + 0x1546: 0x4000, 0x1547: 0x4000, 0x1548: 0x4000, 0x1549: 0x4000, 0x154a: 0x4000, 0x154b: 0x4000, + 0x154c: 0x4000, 0x154d: 0x4000, 0x154e: 0x4000, 0x154f: 0x4000, 0x1550: 0x4000, 0x1551: 0x4000, + 0x1552: 0x4000, 0x1553: 0x4000, 0x1554: 0x4000, 0x1555: 0x4000, 0x1556: 0x4000, 0x1557: 0x4000, + 0x1558: 0x4000, 0x1559: 0x4000, 0x155a: 0x4000, 0x155b: 0x4000, 0x155c: 0x4000, 0x155d: 0x4000, + 0x155e: 0x4000, 0x155f: 0x4000, 0x1560: 0x4000, 0x1561: 0x4000, 0x1562: 0x4000, 0x1563: 0x4000, 0x1564: 0x4000, 0x1565: 0x4000, 0x1566: 0x4000, 0x1567: 0x4000, 0x1568: 0x4000, 0x1569: 0x4000, 0x156a: 0x4000, 0x156b: 0x4000, 0x156c: 0x4000, 0x156d: 0x4000, 0x156e: 0x4000, 0x156f: 0x4000, - 0x1570: 0x4000, 0x1574: 0x4000, - 0x1578: 0x4000, 0x1579: 0x4000, 0x157a: 0x4000, 0x157b: 0x4000, - 0x157c: 0x4000, 0x157d: 0x4000, 0x157e: 0x4000, 0x157f: 0x4000, + 0x1570: 0x4000, 0x1571: 0x4000, 0x1572: 0x4000, 0x1573: 0x4000, 0x1574: 0x4000, 0x1575: 0x4000, + 0x1576: 0x4000, 0x1577: 0x4000, 0x1578: 0x4000, 0x1579: 0x4000, 0x157a: 0x4000, 0x157b: 0x4000, + 0x157c: 0x4000, 0x157e: 0x4000, 0x157f: 0x4000, // Block 0x56, offset 0x1580 - 0x1580: 0x4000, 0x1582: 0x4000, 0x1583: 0x4000, 0x1584: 0x4000, 0x1585: 0x4000, + 0x1580: 0x4000, 0x1581: 0x4000, 0x1582: 0x4000, 0x1583: 0x4000, 0x1584: 0x4000, 0x1585: 0x4000, 0x1586: 0x4000, 0x1587: 0x4000, 0x1588: 0x4000, 0x1589: 0x4000, 0x158a: 0x4000, 0x158b: 0x4000, 0x158c: 0x4000, 0x158d: 0x4000, 0x158e: 0x4000, 0x158f: 0x4000, 0x1590: 0x4000, 0x1591: 0x4000, - 0x1592: 0x4000, 0x1593: 0x4000, 0x1594: 0x4000, 0x1595: 0x4000, 0x1596: 0x4000, 0x1597: 0x4000, - 0x1598: 0x4000, 0x1599: 0x4000, 0x159a: 0x4000, 0x159b: 0x4000, 0x159c: 0x4000, 0x159d: 0x4000, - 0x159e: 0x4000, 0x159f: 0x4000, 0x15a0: 0x4000, 0x15a1: 0x4000, 0x15a2: 0x4000, 0x15a3: 0x4000, + 0x1592: 0x4000, 0x1593: 0x4000, + 0x15a0: 0x4000, 0x15a1: 0x4000, 0x15a2: 0x4000, 0x15a3: 0x4000, 0x15a4: 0x4000, 0x15a5: 0x4000, 0x15a6: 0x4000, 0x15a7: 0x4000, 0x15a8: 0x4000, 0x15a9: 0x4000, 0x15aa: 0x4000, 0x15ab: 0x4000, 0x15ac: 0x4000, 0x15ad: 0x4000, 0x15ae: 0x4000, 0x15af: 0x4000, 0x15b0: 0x4000, 0x15b1: 0x4000, 0x15b2: 0x4000, 0x15b3: 0x4000, 0x15b4: 0x4000, 0x15b5: 0x4000, @@ -904,18 +903,17 @@ var widthValues = [6336]uint16{ 0x15bc: 0x4000, 0x15bd: 0x4000, 0x15be: 0x4000, 0x15bf: 0x4000, // Block 0x57, offset 0x15c0 0x15c0: 0x4000, 0x15c1: 0x4000, 0x15c2: 0x4000, 0x15c3: 0x4000, 0x15c4: 0x4000, 0x15c5: 0x4000, - 0x15c6: 0x4000, 0x15c7: 0x4000, 0x15c8: 0x4000, 0x15c9: 0x4000, 0x15ca: 0x4000, 0x15cb: 0x4000, - 0x15cc: 0x4000, 0x15cd: 0x4000, 0x15ce: 0x4000, 0x15cf: 0x4000, 0x15d0: 0x4000, 0x15d1: 0x4000, - 0x15d2: 0x4000, 0x15d3: 0x4000, 0x15d4: 0x4000, 0x15d5: 0x4000, 0x15d6: 0x4000, 0x15d7: 0x4000, - 0x15d8: 0x4000, 0x15d9: 0x4000, 0x15da: 0x4000, 0x15db: 0x4000, 0x15dc: 0x4000, 0x15dd: 0x4000, - 0x15de: 0x4000, 0x15df: 0x4000, 0x15e0: 0x4000, 0x15e1: 0x4000, 0x15e2: 0x4000, 0x15e3: 0x4000, + 0x15c6: 0x4000, 0x15c7: 0x4000, 0x15c8: 0x4000, 0x15c9: 0x4000, 0x15ca: 0x4000, + 0x15cf: 0x4000, 0x15d0: 0x4000, 0x15d1: 0x4000, + 0x15d2: 0x4000, 0x15d3: 0x4000, + 0x15e0: 0x4000, 0x15e1: 0x4000, 0x15e2: 0x4000, 0x15e3: 0x4000, 0x15e4: 0x4000, 0x15e5: 0x4000, 0x15e6: 0x4000, 0x15e7: 0x4000, 0x15e8: 0x4000, 0x15e9: 0x4000, 0x15ea: 0x4000, 0x15eb: 0x4000, 0x15ec: 0x4000, 0x15ed: 0x4000, 0x15ee: 0x4000, 0x15ef: 0x4000, - 0x15f0: 0x4000, 0x15f1: 0x4000, 0x15f2: 0x4000, 0x15f3: 0x4000, 0x15f4: 0x4000, 0x15f5: 0x4000, - 0x15f6: 0x4000, 0x15f7: 0x4000, 0x15f8: 0x4000, 0x15f9: 0x4000, 0x15fa: 0x4000, 0x15fb: 0x4000, - 0x15fc: 0x4000, 0x15ff: 0x4000, + 0x15f0: 0x4000, 0x15f4: 0x4000, + 0x15f8: 0x4000, 0x15f9: 0x4000, 0x15fa: 0x4000, 0x15fb: 0x4000, + 0x15fc: 0x4000, 0x15fd: 0x4000, 0x15fe: 0x4000, 0x15ff: 0x4000, // Block 0x58, offset 0x1600 - 0x1600: 0x4000, 0x1601: 0x4000, 0x1602: 0x4000, 0x1603: 0x4000, 0x1604: 0x4000, 0x1605: 0x4000, + 0x1600: 0x4000, 0x1602: 0x4000, 0x1603: 0x4000, 0x1604: 0x4000, 0x1605: 0x4000, 0x1606: 0x4000, 0x1607: 0x4000, 0x1608: 0x4000, 0x1609: 0x4000, 0x160a: 0x4000, 0x160b: 0x4000, 0x160c: 0x4000, 0x160d: 0x4000, 0x160e: 0x4000, 0x160f: 0x4000, 0x1610: 0x4000, 0x1611: 0x4000, 0x1612: 0x4000, 0x1613: 0x4000, 0x1614: 0x4000, 0x1615: 0x4000, 0x1616: 0x4000, 0x1617: 0x4000, @@ -925,66 +923,99 @@ var widthValues = [6336]uint16{ 0x162a: 0x4000, 0x162b: 0x4000, 0x162c: 0x4000, 0x162d: 0x4000, 0x162e: 0x4000, 0x162f: 0x4000, 0x1630: 0x4000, 0x1631: 0x4000, 0x1632: 0x4000, 0x1633: 0x4000, 0x1634: 0x4000, 0x1635: 0x4000, 0x1636: 0x4000, 0x1637: 0x4000, 0x1638: 0x4000, 0x1639: 0x4000, 0x163a: 0x4000, 0x163b: 0x4000, - 0x163c: 0x4000, 0x163d: 0x4000, + 0x163c: 0x4000, 0x163d: 0x4000, 0x163e: 0x4000, 0x163f: 0x4000, // Block 0x59, offset 0x1640 - 0x164b: 0x4000, - 0x164c: 0x4000, 0x164d: 0x4000, 0x164e: 0x4000, 0x1650: 0x4000, 0x1651: 0x4000, + 0x1640: 0x4000, 0x1641: 0x4000, 0x1642: 0x4000, 0x1643: 0x4000, 0x1644: 0x4000, 0x1645: 0x4000, + 0x1646: 0x4000, 0x1647: 0x4000, 0x1648: 0x4000, 0x1649: 0x4000, 0x164a: 0x4000, 0x164b: 0x4000, + 0x164c: 0x4000, 0x164d: 0x4000, 0x164e: 0x4000, 0x164f: 0x4000, 0x1650: 0x4000, 0x1651: 0x4000, 0x1652: 0x4000, 0x1653: 0x4000, 0x1654: 0x4000, 0x1655: 0x4000, 0x1656: 0x4000, 0x1657: 0x4000, 0x1658: 0x4000, 0x1659: 0x4000, 0x165a: 0x4000, 0x165b: 0x4000, 0x165c: 0x4000, 0x165d: 0x4000, 0x165e: 0x4000, 0x165f: 0x4000, 0x1660: 0x4000, 0x1661: 0x4000, 0x1662: 0x4000, 0x1663: 0x4000, - 0x1664: 0x4000, 0x1665: 0x4000, 0x1666: 0x4000, 0x1667: 0x4000, - 0x167a: 0x4000, + 0x1664: 0x4000, 0x1665: 0x4000, 0x1666: 0x4000, 0x1667: 0x4000, 0x1668: 0x4000, 0x1669: 0x4000, + 0x166a: 0x4000, 0x166b: 0x4000, 0x166c: 0x4000, 0x166d: 0x4000, 0x166e: 0x4000, 0x166f: 0x4000, + 0x1670: 0x4000, 0x1671: 0x4000, 0x1672: 0x4000, 0x1673: 0x4000, 0x1674: 0x4000, 0x1675: 0x4000, + 0x1676: 0x4000, 0x1677: 0x4000, 0x1678: 0x4000, 0x1679: 0x4000, 0x167a: 0x4000, 0x167b: 0x4000, + 0x167c: 0x4000, 0x167f: 0x4000, // Block 0x5a, offset 0x1680 - 0x1695: 0x4000, 0x1696: 0x4000, - 0x16a4: 0x4000, + 0x1680: 0x4000, 0x1681: 0x4000, 0x1682: 0x4000, 0x1683: 0x4000, 0x1684: 0x4000, 0x1685: 0x4000, + 0x1686: 0x4000, 0x1687: 0x4000, 0x1688: 0x4000, 0x1689: 0x4000, 0x168a: 0x4000, 0x168b: 0x4000, + 0x168c: 0x4000, 0x168d: 0x4000, 0x168e: 0x4000, 0x168f: 0x4000, 0x1690: 0x4000, 0x1691: 0x4000, + 0x1692: 0x4000, 0x1693: 0x4000, 0x1694: 0x4000, 0x1695: 0x4000, 0x1696: 0x4000, 0x1697: 0x4000, + 0x1698: 0x4000, 0x1699: 0x4000, 0x169a: 0x4000, 0x169b: 0x4000, 0x169c: 0x4000, 0x169d: 0x4000, + 0x169e: 0x4000, 0x169f: 0x4000, 0x16a0: 0x4000, 0x16a1: 0x4000, 0x16a2: 0x4000, 0x16a3: 0x4000, + 0x16a4: 0x4000, 0x16a5: 0x4000, 0x16a6: 0x4000, 0x16a7: 0x4000, 0x16a8: 0x4000, 0x16a9: 0x4000, + 0x16aa: 0x4000, 0x16ab: 0x4000, 0x16ac: 0x4000, 0x16ad: 0x4000, 0x16ae: 0x4000, 0x16af: 0x4000, + 0x16b0: 0x4000, 0x16b1: 0x4000, 0x16b2: 0x4000, 0x16b3: 0x4000, 0x16b4: 0x4000, 0x16b5: 0x4000, + 0x16b6: 0x4000, 0x16b7: 0x4000, 0x16b8: 0x4000, 0x16b9: 0x4000, 0x16ba: 0x4000, 0x16bb: 0x4000, + 0x16bc: 0x4000, 0x16bd: 0x4000, // Block 0x5b, offset 0x16c0 - 0x16fb: 0x4000, - 0x16fc: 0x4000, 0x16fd: 0x4000, 0x16fe: 0x4000, 0x16ff: 0x4000, + 0x16cb: 0x4000, + 0x16cc: 0x4000, 0x16cd: 0x4000, 0x16ce: 0x4000, 0x16d0: 0x4000, 0x16d1: 0x4000, + 0x16d2: 0x4000, 0x16d3: 0x4000, 0x16d4: 0x4000, 0x16d5: 0x4000, 0x16d6: 0x4000, 0x16d7: 0x4000, + 0x16d8: 0x4000, 0x16d9: 0x4000, 0x16da: 0x4000, 0x16db: 0x4000, 0x16dc: 0x4000, 0x16dd: 0x4000, + 0x16de: 0x4000, 0x16df: 0x4000, 0x16e0: 0x4000, 0x16e1: 0x4000, 0x16e2: 0x4000, 0x16e3: 0x4000, + 0x16e4: 0x4000, 0x16e5: 0x4000, 0x16e6: 0x4000, 0x16e7: 0x4000, + 0x16fa: 0x4000, // Block 0x5c, offset 0x1700 - 0x1700: 0x4000, 0x1701: 0x4000, 0x1702: 0x4000, 0x1703: 0x4000, 0x1704: 0x4000, 0x1705: 0x4000, - 0x1706: 0x4000, 0x1707: 0x4000, 0x1708: 0x4000, 0x1709: 0x4000, 0x170a: 0x4000, 0x170b: 0x4000, - 0x170c: 0x4000, 0x170d: 0x4000, 0x170e: 0x4000, 0x170f: 0x4000, + 0x1715: 0x4000, 0x1716: 0x4000, + 0x1724: 0x4000, // Block 0x5d, offset 0x1740 - 0x1740: 0x4000, 0x1741: 0x4000, 0x1742: 0x4000, 0x1743: 0x4000, 0x1744: 0x4000, 0x1745: 0x4000, - 0x174c: 0x4000, 0x1750: 0x4000, 0x1751: 0x4000, - 0x1752: 0x4000, - 0x176b: 0x4000, 0x176c: 0x4000, - 0x1774: 0x4000, 0x1775: 0x4000, - 0x1776: 0x4000, + 0x177b: 0x4000, + 0x177c: 0x4000, 0x177d: 0x4000, 0x177e: 0x4000, 0x177f: 0x4000, // Block 0x5e, offset 0x1780 - 0x1790: 0x4000, 0x1791: 0x4000, - 0x1792: 0x4000, 0x1793: 0x4000, 0x1794: 0x4000, 0x1795: 0x4000, 0x1796: 0x4000, 0x1797: 0x4000, - 0x1798: 0x4000, 0x1799: 0x4000, 0x179a: 0x4000, 0x179b: 0x4000, 0x179c: 0x4000, 0x179d: 0x4000, - 0x179e: 0x4000, 0x17a0: 0x4000, 0x17a1: 0x4000, 0x17a2: 0x4000, 0x17a3: 0x4000, - 0x17a4: 0x4000, 0x17a5: 0x4000, 0x17a6: 0x4000, 0x17a7: 0x4000, - 0x17b0: 0x4000, 0x17b3: 0x4000, 0x17b4: 0x4000, 0x17b5: 0x4000, - 0x17b6: 0x4000, 0x17b7: 0x4000, 0x17b8: 0x4000, 0x17b9: 0x4000, 0x17ba: 0x4000, 0x17bb: 0x4000, - 0x17bc: 0x4000, 0x17bd: 0x4000, 0x17be: 0x4000, + 0x1780: 0x4000, 0x1781: 0x4000, 0x1782: 0x4000, 0x1783: 0x4000, 0x1784: 0x4000, 0x1785: 0x4000, + 0x1786: 0x4000, 0x1787: 0x4000, 0x1788: 0x4000, 0x1789: 0x4000, 0x178a: 0x4000, 0x178b: 0x4000, + 0x178c: 0x4000, 0x178d: 0x4000, 0x178e: 0x4000, 0x178f: 0x4000, // Block 0x5f, offset 0x17c0 0x17c0: 0x4000, 0x17c1: 0x4000, 0x17c2: 0x4000, 0x17c3: 0x4000, 0x17c4: 0x4000, 0x17c5: 0x4000, - 0x17c6: 0x4000, 0x17c7: 0x4000, 0x17c8: 0x4000, 0x17c9: 0x4000, 0x17ca: 0x4000, 0x17cb: 0x4000, - 0x17d0: 0x4000, 0x17d1: 0x4000, - 0x17d2: 0x4000, 0x17d3: 0x4000, 0x17d4: 0x4000, 0x17d5: 0x4000, 0x17d6: 0x4000, 0x17d7: 0x4000, - 0x17d8: 0x4000, 0x17d9: 0x4000, 0x17da: 0x4000, 0x17db: 0x4000, 0x17dc: 0x4000, 0x17dd: 0x4000, - 0x17de: 0x4000, + 0x17cc: 0x4000, 0x17d0: 0x4000, 0x17d1: 0x4000, + 0x17d2: 0x4000, + 0x17eb: 0x4000, 0x17ec: 0x4000, + 0x17f4: 0x4000, 0x17f5: 0x4000, + 0x17f6: 0x4000, 0x17f7: 0x4000, 0x17f8: 0x4000, // Block 0x60, offset 0x1800 - 0x1800: 0x4000, 0x1801: 0x4000, 0x1802: 0x4000, 0x1803: 0x4000, 0x1804: 0x4000, 0x1805: 0x4000, - 0x1806: 0x4000, 0x1807: 0x4000, 0x1808: 0x4000, 0x1809: 0x4000, 0x180a: 0x4000, 0x180b: 0x4000, - 0x180c: 0x4000, 0x180d: 0x4000, 0x180e: 0x4000, 0x180f: 0x4000, 0x1810: 0x4000, 0x1811: 0x4000, + 0x1810: 0x4000, 0x1811: 0x4000, + 0x1812: 0x4000, 0x1813: 0x4000, 0x1814: 0x4000, 0x1815: 0x4000, 0x1816: 0x4000, 0x1817: 0x4000, + 0x1818: 0x4000, 0x1819: 0x4000, 0x181a: 0x4000, 0x181b: 0x4000, 0x181c: 0x4000, 0x181d: 0x4000, + 0x181e: 0x4000, 0x181f: 0x4000, 0x1820: 0x4000, 0x1821: 0x4000, 0x1822: 0x4000, 0x1823: 0x4000, + 0x1824: 0x4000, 0x1825: 0x4000, 0x1826: 0x4000, 0x1827: 0x4000, 0x1828: 0x4000, 0x1829: 0x4000, + 0x182a: 0x4000, 0x182b: 0x4000, 0x182c: 0x4000, 0x182d: 0x4000, 0x182e: 0x4000, 0x182f: 0x4000, + 0x1830: 0x4000, 0x1831: 0x4000, 0x1832: 0x4000, 0x1833: 0x4000, 0x1834: 0x4000, 0x1835: 0x4000, + 0x1836: 0x4000, 0x1837: 0x4000, 0x1838: 0x4000, 0x1839: 0x4000, 0x183a: 0x4000, 0x183b: 0x4000, + 0x183c: 0x4000, 0x183d: 0x4000, 0x183e: 0x4000, // Block 0x61, offset 0x1840 - 0x1840: 0x4000, + 0x1840: 0x4000, 0x1841: 0x4000, 0x1842: 0x4000, 0x1843: 0x4000, 0x1844: 0x4000, 0x1845: 0x4000, + 0x1846: 0x4000, 0x1847: 0x4000, 0x1848: 0x4000, 0x1849: 0x4000, 0x184a: 0x4000, 0x184b: 0x4000, + 0x184c: 0x4000, 0x1850: 0x4000, 0x1851: 0x4000, + 0x1852: 0x4000, 0x1853: 0x4000, 0x1854: 0x4000, 0x1855: 0x4000, 0x1856: 0x4000, 0x1857: 0x4000, + 0x1858: 0x4000, 0x1859: 0x4000, 0x185a: 0x4000, 0x185b: 0x4000, 0x185c: 0x4000, 0x185d: 0x4000, + 0x185e: 0x4000, 0x185f: 0x4000, 0x1860: 0x4000, 0x1861: 0x4000, 0x1862: 0x4000, 0x1863: 0x4000, + 0x1864: 0x4000, 0x1865: 0x4000, 0x1866: 0x4000, 0x1867: 0x4000, 0x1868: 0x4000, 0x1869: 0x4000, + 0x186a: 0x4000, 0x186b: 0x4000, // Block 0x62, offset 0x1880 - 0x1880: 0x2000, 0x1881: 0x2000, 0x1882: 0x2000, 0x1883: 0x2000, 0x1884: 0x2000, 0x1885: 0x2000, - 0x1886: 0x2000, 0x1887: 0x2000, 0x1888: 0x2000, 0x1889: 0x2000, 0x188a: 0x2000, 0x188b: 0x2000, - 0x188c: 0x2000, 0x188d: 0x2000, 0x188e: 0x2000, 0x188f: 0x2000, 0x1890: 0x2000, 0x1891: 0x2000, - 0x1892: 0x2000, 0x1893: 0x2000, 0x1894: 0x2000, 0x1895: 0x2000, 0x1896: 0x2000, 0x1897: 0x2000, - 0x1898: 0x2000, 0x1899: 0x2000, 0x189a: 0x2000, 0x189b: 0x2000, 0x189c: 0x2000, 0x189d: 0x2000, - 0x189e: 0x2000, 0x189f: 0x2000, 0x18a0: 0x2000, 0x18a1: 0x2000, 0x18a2: 0x2000, 0x18a3: 0x2000, - 0x18a4: 0x2000, 0x18a5: 0x2000, 0x18a6: 0x2000, 0x18a7: 0x2000, 0x18a8: 0x2000, 0x18a9: 0x2000, - 0x18aa: 0x2000, 0x18ab: 0x2000, 0x18ac: 0x2000, 0x18ad: 0x2000, 0x18ae: 0x2000, 0x18af: 0x2000, - 0x18b0: 0x2000, 0x18b1: 0x2000, 0x18b2: 0x2000, 0x18b3: 0x2000, 0x18b4: 0x2000, 0x18b5: 0x2000, - 0x18b6: 0x2000, 0x18b7: 0x2000, 0x18b8: 0x2000, 0x18b9: 0x2000, 0x18ba: 0x2000, 0x18bb: 0x2000, - 0x18bc: 0x2000, 0x18bd: 0x2000, + 0x1880: 0x4000, 0x1881: 0x4000, 0x1882: 0x4000, 0x1883: 0x4000, 0x1884: 0x4000, 0x1885: 0x4000, + 0x1886: 0x4000, 0x1887: 0x4000, 0x1888: 0x4000, 0x1889: 0x4000, 0x188a: 0x4000, 0x188b: 0x4000, + 0x188c: 0x4000, 0x188d: 0x4000, 0x188e: 0x4000, 0x188f: 0x4000, 0x1890: 0x4000, 0x1891: 0x4000, + 0x1892: 0x4000, 0x1893: 0x4000, 0x1894: 0x4000, 0x1895: 0x4000, 0x1896: 0x4000, 0x1897: 0x4000, + // Block 0x63, offset 0x18c0 + 0x18c0: 0x4000, + 0x18d0: 0x4000, 0x18d1: 0x4000, + 0x18d2: 0x4000, 0x18d3: 0x4000, 0x18d4: 0x4000, 0x18d5: 0x4000, 0x18d6: 0x4000, 0x18d7: 0x4000, + 0x18d8: 0x4000, 0x18d9: 0x4000, 0x18da: 0x4000, 0x18db: 0x4000, 0x18dc: 0x4000, 0x18dd: 0x4000, + 0x18de: 0x4000, 0x18df: 0x4000, 0x18e0: 0x4000, 0x18e1: 0x4000, 0x18e2: 0x4000, 0x18e3: 0x4000, + 0x18e4: 0x4000, 0x18e5: 0x4000, 0x18e6: 0x4000, + // Block 0x64, offset 0x1900 + 0x1900: 0x2000, 0x1901: 0x2000, 0x1902: 0x2000, 0x1903: 0x2000, 0x1904: 0x2000, 0x1905: 0x2000, + 0x1906: 0x2000, 0x1907: 0x2000, 0x1908: 0x2000, 0x1909: 0x2000, 0x190a: 0x2000, 0x190b: 0x2000, + 0x190c: 0x2000, 0x190d: 0x2000, 0x190e: 0x2000, 0x190f: 0x2000, 0x1910: 0x2000, 0x1911: 0x2000, + 0x1912: 0x2000, 0x1913: 0x2000, 0x1914: 0x2000, 0x1915: 0x2000, 0x1916: 0x2000, 0x1917: 0x2000, + 0x1918: 0x2000, 0x1919: 0x2000, 0x191a: 0x2000, 0x191b: 0x2000, 0x191c: 0x2000, 0x191d: 0x2000, + 0x191e: 0x2000, 0x191f: 0x2000, 0x1920: 0x2000, 0x1921: 0x2000, 0x1922: 0x2000, 0x1923: 0x2000, + 0x1924: 0x2000, 0x1925: 0x2000, 0x1926: 0x2000, 0x1927: 0x2000, 0x1928: 0x2000, 0x1929: 0x2000, + 0x192a: 0x2000, 0x192b: 0x2000, 0x192c: 0x2000, 0x192d: 0x2000, 0x192e: 0x2000, 0x192f: 0x2000, + 0x1930: 0x2000, 0x1931: 0x2000, 0x1932: 0x2000, 0x1933: 0x2000, 0x1934: 0x2000, 0x1935: 0x2000, + 0x1936: 0x2000, 0x1937: 0x2000, 0x1938: 0x2000, 0x1939: 0x2000, 0x193a: 0x2000, 0x193b: 0x2000, + 0x193c: 0x2000, 0x193d: 0x2000, } // widthIndex: 22 blocks, 1408 entries, 1408 bytes @@ -1076,13 +1107,14 @@ var widthIndex = [1408]uint8{ 0x3a0: 0x0e, 0x3a1: 0x0e, 0x3a2: 0x0e, 0x3a3: 0x0e, 0x3a4: 0x0e, 0x3a5: 0x0e, 0x3a6: 0x0e, 0x3a7: 0x0e, 0x3a8: 0x0e, 0x3a9: 0x0e, 0x3aa: 0x0e, 0x3ab: 0x47, // Block 0xf, offset 0x3c0 - 0x3c0: 0x48, + 0x3c0: 0x0e, 0x3c1: 0x0e, 0x3c2: 0x0e, 0x3c3: 0x0e, 0x3c4: 0x48, 0x3c5: 0x49, 0x3c6: 0x0e, 0x3c7: 0x0e, + 0x3c8: 0x0e, 0x3c9: 0x0e, 0x3ca: 0x0e, 0x3cb: 0x4a, // Block 0x10, offset 0x400 - 0x400: 0x49, 0x403: 0x4a, 0x404: 0x4b, 0x405: 0x4c, 0x406: 0x4d, - 0x408: 0x4e, 0x409: 0x4f, 0x40c: 0x50, 0x40d: 0x51, 0x40e: 0x52, 0x40f: 0x53, - 0x410: 0x3a, 0x411: 0x54, 0x412: 0x0e, 0x413: 0x55, 0x414: 0x56, 0x415: 0x57, 0x416: 0x58, 0x417: 0x59, - 0x418: 0x0e, 0x419: 0x5a, 0x41a: 0x0e, 0x41b: 0x5b, - 0x424: 0x5c, 0x425: 0x5d, 0x426: 0x5e, 0x427: 0x5f, + 0x400: 0x4b, 0x403: 0x4c, 0x404: 0x4d, 0x405: 0x4e, 0x406: 0x4f, + 0x408: 0x50, 0x409: 0x51, 0x40c: 0x52, 0x40d: 0x53, 0x40e: 0x54, 0x40f: 0x55, + 0x410: 0x3a, 0x411: 0x56, 0x412: 0x0e, 0x413: 0x57, 0x414: 0x58, 0x415: 0x59, 0x416: 0x5a, 0x417: 0x5b, + 0x418: 0x0e, 0x419: 0x5c, 0x41a: 0x0e, 0x41b: 0x5d, + 0x424: 0x5e, 0x425: 0x5f, 0x426: 0x60, 0x427: 0x61, // Block 0x11, offset 0x440 0x456: 0x0b, 0x457: 0x06, 0x458: 0x0c, 0x45b: 0x0d, 0x45f: 0x0e, @@ -1100,7 +1132,7 @@ var widthIndex = [1408]uint8{ 0x4e0: 0x08, 0x4e1: 0x08, 0x4e2: 0x08, 0x4e3: 0x08, 0x4e4: 0x08, 0x4e5: 0x08, 0x4e6: 0x08, 0x4e7: 0x08, 0x4e8: 0x08, 0x4e9: 0x08, 0x4ea: 0x08, 0x4eb: 0x08, 0x4ec: 0x08, 0x4ed: 0x08, 0x4ee: 0x08, 0x4ef: 0x08, 0x4f0: 0x08, 0x4f1: 0x08, 0x4f2: 0x08, 0x4f3: 0x08, 0x4f4: 0x08, 0x4f5: 0x08, 0x4f6: 0x08, 0x4f7: 0x08, - 0x4f8: 0x08, 0x4f9: 0x08, 0x4fa: 0x08, 0x4fb: 0x08, 0x4fc: 0x08, 0x4fd: 0x08, 0x4fe: 0x08, 0x4ff: 0x60, + 0x4f8: 0x08, 0x4f9: 0x08, 0x4fa: 0x08, 0x4fb: 0x08, 0x4fc: 0x08, 0x4fd: 0x08, 0x4fe: 0x08, 0x4ff: 0x62, // Block 0x14, offset 0x500 0x520: 0x10, 0x530: 0x09, 0x531: 0x09, 0x532: 0x09, 0x533: 0x09, 0x534: 0x09, 0x535: 0x09, 0x536: 0x09, 0x537: 0x09, @@ -1281,4 +1313,4 @@ var inverseData = [150][4]byte{ {0x03, 0xe2, 0x97, 0x25}, } -// Total table size 14680 bytes (14KiB) +// Total table size 14936 bytes (14KiB) diff --git a/vendor/golang.org/x/text/width/tables_test.go b/vendor/golang.org/x/text/width/tables_test.go new file mode 100644 index 000000000..189febd3c --- /dev/null +++ b/vendor/golang.org/x/text/width/tables_test.go @@ -0,0 +1,59 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package width + +import ( + "testing" + + "golang.org/x/text/internal/testtext" +) + +const ( + loSurrogate = 0xD800 + hiSurrogate = 0xDFFF +) + +func TestTables(t *testing.T) { + testtext.SkipIfNotLong(t) + + runes := map[rune]Kind{} + getWidthData(func(r rune, tag elem, _ rune) { + runes[r] = tag.kind() + }) + for r := rune(0); r < 0x10FFFF; r++ { + if loSurrogate <= r && r <= hiSurrogate { + continue + } + p := LookupRune(r) + if got, want := p.Kind(), runes[r]; got != want { + t.Errorf("Kind of %U was %s; want %s.", r, got, want) + } + want, mapped := foldRune(r) + if got := p.Folded(); (got == 0) == mapped || got != 0 && got != want { + t.Errorf("Folded(%U) = %U; want %U", r, got, want) + } + want, mapped = widenRune(r) + if got := p.Wide(); (got == 0) == mapped || got != 0 && got != want { + t.Errorf("Wide(%U) = %U; want %U", r, got, want) + } + want, mapped = narrowRune(r) + if got := p.Narrow(); (got == 0) == mapped || got != 0 && got != want { + t.Errorf("Narrow(%U) = %U; want %U", r, got, want) + } + } +} + +// TestAmbiguous verifies that that ambiguous runes with a mapping always map to +// a halfwidth rune. +func TestAmbiguous(t *testing.T) { + for r, m := range mapRunes { + if m.e != tagAmbiguous { + continue + } + if k := mapRunes[m.r].e.kind(); k != EastAsianHalfwidth { + t.Errorf("Rune %U is ambiguous and maps to a rune of type %v", r, k) + } + } +} diff --git a/vendor/golang.org/x/text/width/transform_test.go b/vendor/golang.org/x/text/width/transform_test.go new file mode 100644 index 000000000..f9122d6db --- /dev/null +++ b/vendor/golang.org/x/text/width/transform_test.go @@ -0,0 +1,701 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package width + +import ( + "bytes" + "strings" + "testing" + + "golang.org/x/text/internal/testtext" + "golang.org/x/text/transform" +) + +func foldRune(r rune) (folded rune, ok bool) { + alt, ok := mapRunes[r] + if ok && alt.e&tagNeedsFold != 0 { + return alt.r, true + } + return r, false +} + +func widenRune(r rune) (wide rune, ok bool) { + alt, ok := mapRunes[r] + if k := alt.e.kind(); k == EastAsianHalfwidth || k == EastAsianNarrow { + return alt.r, true + } + return r, false +} + +func narrowRune(r rune) (narrow rune, ok bool) { + alt, ok := mapRunes[r] + if k := alt.e.kind(); k == EastAsianFullwidth || k == EastAsianWide || k == EastAsianAmbiguous { + return alt.r, true + } + return r, false +} + +func TestFoldSingleRunes(t *testing.T) { + for r := rune(0); r < 0x1FFFF; r++ { + if loSurrogate <= r && r <= hiSurrogate { + continue + } + x, _ := foldRune(r) + want := string(x) + got := Fold.String(string(r)) + if got != want { + t.Errorf("Fold().String(%U) = %+q; want %+q", r, got, want) + } + } +} + +type transformTest struct { + desc string + src string + nBuf int + nDst int + atEOF bool + dst string + nSrc int + err error + nSpan int + errSpan error +} + +func (tc *transformTest) doTest(t *testing.T, tr Transformer) { + testtext.Run(t, tc.desc, func(t *testing.T) { + b := make([]byte, tc.nBuf) + nDst, nSrc, err := tr.Transform(b, []byte(tc.src), tc.atEOF) + if got := string(b[:nDst]); got != tc.dst[:nDst] { + t.Errorf("dst was %+q; want %+q", got, tc.dst) + } + if nDst != tc.nDst { + t.Errorf("nDst was %d; want %d", nDst, tc.nDst) + } + if nSrc != tc.nSrc { + t.Errorf("nSrc was %d; want %d", nSrc, tc.nSrc) + } + if err != tc.err { + t.Errorf("error was %v; want %v", err, tc.err) + } + if got := tr.String(tc.src); got != tc.dst { + t.Errorf("String(%q) = %q; want %q", tc.src, got, tc.dst) + } + n, err := tr.Span([]byte(tc.src), tc.atEOF) + if n != tc.nSpan || err != tc.errSpan { + t.Errorf("Span: got %d, %v; want %d, %v", n, err, tc.nSpan, tc.errSpan) + } + }) +} + +func TestFold(t *testing.T) { + for _, tc := range []transformTest{{ + desc: "empty", + src: "", + nBuf: 10, + dst: "", + nDst: 0, + nSrc: 0, + atEOF: false, + err: nil, + nSpan: 0, + errSpan: nil, + }, { + desc: "short source 1", + src: "a\xc2", + nBuf: 10, + dst: "a\xc2", + nDst: 1, + nSrc: 1, + atEOF: false, + err: transform.ErrShortSrc, + nSpan: 1, + errSpan: transform.ErrShortSrc, + }, { + desc: "short source 2", + src: "a\xe0\x80", + nBuf: 10, + dst: "a\xe0\x80", + nDst: 1, + nSrc: 1, + atEOF: false, + err: transform.ErrShortSrc, + nSpan: 1, + errSpan: transform.ErrShortSrc, + }, { + desc: "incomplete but terminated source 1", + src: "a\xc2", + nBuf: 10, + dst: "a\xc2", + nDst: 2, + nSrc: 2, + atEOF: true, + err: nil, + nSpan: 2, + errSpan: nil, + }, { + desc: "incomplete but terminated source 2", + src: "a\xe0\x80", + nBuf: 10, + dst: "a\xe0\x80", + nDst: 3, + nSrc: 3, + atEOF: true, + err: nil, + nSpan: 3, + errSpan: nil, + }, { + desc: "exact fit dst", + src: "a\uff01", + nBuf: 2, + dst: "a!", + nDst: 2, + nSrc: 4, + atEOF: false, + err: nil, + nSpan: 1, + errSpan: transform.ErrEndOfSpan, + }, { + desc: "exact fit dst and src ascii", + src: "ab", + nBuf: 2, + dst: "ab", + nDst: 2, + nSrc: 2, + atEOF: true, + err: nil, + nSpan: 2, + errSpan: nil, + }, { + desc: "empty dst", + src: "\u0300", + nBuf: 0, + dst: "\u0300", + nDst: 0, + nSrc: 0, + atEOF: true, + err: transform.ErrShortDst, + nSpan: 2, + errSpan: nil, + }, { + desc: "empty dst ascii", + src: "a", + nBuf: 0, + dst: "a", + nDst: 0, + nSrc: 0, + atEOF: true, + err: transform.ErrShortDst, + nSpan: 1, + errSpan: nil, + }, { + desc: "short dst 1", + src: "a\uffe0", // ¢ + nBuf: 2, + dst: "a\u00a2", // ¢ + nDst: 1, + nSrc: 1, + atEOF: false, + err: transform.ErrShortDst, + nSpan: 1, + errSpan: transform.ErrEndOfSpan, + }, { + desc: "short dst 2", + src: "不夠", + nBuf: 3, + dst: "不夠", + nDst: 3, + nSrc: 3, + atEOF: true, + err: transform.ErrShortDst, + nSpan: 6, + errSpan: nil, + }, { + desc: "short dst fast path", + src: "fast", + nDst: 3, + dst: "fast", + nBuf: 3, + nSrc: 3, + atEOF: true, + err: transform.ErrShortDst, + nSpan: 4, + errSpan: nil, + }, { + desc: "short dst larger buffer", + src: "\uff21" + strings.Repeat("0", 127) + "B", + nBuf: 128, + dst: "A" + strings.Repeat("0", 127) + "B", + nDst: 128, + nSrc: 130, + atEOF: true, + err: transform.ErrShortDst, + nSpan: 0, + errSpan: transform.ErrEndOfSpan, + }, { + desc: "fast path alternation", + src: "fast路徑fast路徑", + nBuf: 20, + dst: "fast路徑fast路徑", + nDst: 20, + nSrc: 20, + atEOF: true, + err: nil, + nSpan: 20, + errSpan: nil, + }} { + tc.doTest(t, Fold) + } +} + +func TestWidenSingleRunes(t *testing.T) { + for r := rune(0); r < 0x1FFFF; r++ { + if loSurrogate <= r && r <= hiSurrogate { + continue + } + alt, _ := widenRune(r) + want := string(alt) + got := Widen.String(string(r)) + if got != want { + t.Errorf("Widen().String(%U) = %+q; want %+q", r, got, want) + } + } +} + +func TestWiden(t *testing.T) { + for _, tc := range []transformTest{{ + desc: "empty", + src: "", + nBuf: 10, + dst: "", + nDst: 0, + nSrc: 0, + atEOF: false, + err: nil, + nSpan: 0, + errSpan: nil, + }, { + desc: "short source 1", + src: "a\xc2", + nBuf: 10, + dst: "a\xc2", + nDst: 3, + nSrc: 1, + atEOF: false, + err: transform.ErrShortSrc, + nSpan: 0, + errSpan: transform.ErrEndOfSpan, + }, { + desc: "short source 2", + src: "a\xe0\x80", + nBuf: 10, + dst: "a\xe0\x80", + nDst: 3, + nSrc: 1, + atEOF: false, + err: transform.ErrShortSrc, + nSpan: 0, + errSpan: transform.ErrEndOfSpan, + }, { + desc: "incomplete but terminated source 1", + src: "a\xc2", + nBuf: 10, + dst: "a\xc2", + nDst: 4, + nSrc: 2, + atEOF: true, + err: nil, + nSpan: 0, + errSpan: transform.ErrEndOfSpan, + }, { + desc: "incomplete but terminated source 2", + src: "a\xe0\x80", + nBuf: 10, + dst: "a\xe0\x80", + nDst: 5, + nSrc: 3, + atEOF: true, + err: nil, + nSpan: 0, + errSpan: transform.ErrEndOfSpan, + }, { + desc: "short source 1 some span", + src: "a\xc2", + nBuf: 10, + dst: "a\xc2", + nDst: 3, + nSrc: 3, + atEOF: false, + err: transform.ErrShortSrc, + nSpan: 3, + errSpan: transform.ErrShortSrc, + }, { + desc: "short source 2 some span", + src: "a\xe0\x80", + nBuf: 10, + dst: "a\xe0\x80", + nDst: 3, + nSrc: 3, + atEOF: false, + err: transform.ErrShortSrc, + nSpan: 3, + errSpan: transform.ErrShortSrc, + }, { + desc: "incomplete but terminated source 1 some span", + src: "a\xc2", + nBuf: 10, + dst: "a\xc2", + nDst: 4, + nSrc: 4, + atEOF: true, + err: nil, + nSpan: 4, + errSpan: nil, + }, { + desc: "incomplete but terminated source 2 some span", + src: "a\xe0\x80", + nBuf: 10, + dst: "a\xe0\x80", + nDst: 5, + nSrc: 5, + atEOF: true, + err: nil, + nSpan: 5, + errSpan: nil, + }, { + desc: "exact fit dst", + src: "a!", + nBuf: 6, + dst: "a\uff01", + nDst: 6, + nSrc: 2, + atEOF: false, + err: nil, + nSpan: 0, + errSpan: transform.ErrEndOfSpan, + }, { + desc: "empty dst", + src: "\u0300", + nBuf: 0, + dst: "\u0300", + nDst: 0, + nSrc: 0, + atEOF: true, + err: transform.ErrShortDst, + nSpan: 2, + errSpan: nil, + }, { + desc: "empty dst ascii", + src: "a", + nBuf: 0, + dst: "a", + nDst: 0, + nSrc: 0, + atEOF: true, + err: transform.ErrShortDst, + nSpan: 0, + errSpan: transform.ErrEndOfSpan, + }, { + desc: "short dst 1", + src: "a\uffe0", + nBuf: 4, + dst: "a\uffe0", + nDst: 3, + nSrc: 1, + atEOF: false, + err: transform.ErrShortDst, + nSpan: 0, + errSpan: transform.ErrEndOfSpan, + }, { + desc: "short dst 2", + src: "不夠", + nBuf: 3, + dst: "不夠", + nDst: 3, + nSrc: 3, + atEOF: true, + err: transform.ErrShortDst, + nSpan: 6, + errSpan: nil, + }, { + desc: "short dst ascii", + src: "ascii", + nBuf: 3, + dst: "ascii", // U+ff41, ... + nDst: 3, + nSrc: 1, + atEOF: true, + err: transform.ErrShortDst, + nSpan: 0, + errSpan: transform.ErrEndOfSpan, + }, { + desc: "ambiguous", + src: "\uffe9", + nBuf: 4, + dst: "\u2190", + nDst: 3, + nSrc: 3, + atEOF: false, + err: nil, + nSpan: 0, + errSpan: transform.ErrEndOfSpan, + }} { + tc.doTest(t, Widen) + } +} + +func TestNarrowSingleRunes(t *testing.T) { + for r := rune(0); r < 0x1FFFF; r++ { + if loSurrogate <= r && r <= hiSurrogate { + continue + } + alt, _ := narrowRune(r) + want := string(alt) + got := Narrow.String(string(r)) + if got != want { + t.Errorf("Narrow().String(%U) = %+q; want %+q", r, got, want) + } + } +} + +func TestNarrow(t *testing.T) { + for _, tc := range []transformTest{{ + desc: "empty", + src: "", + nBuf: 10, + dst: "", + nDst: 0, + nSrc: 0, + atEOF: false, + err: nil, + nSpan: 0, + errSpan: nil, + }, { + desc: "short source 1", + src: "a\xc2", + nBuf: 10, + dst: "a\xc2", + nDst: 1, + nSrc: 1, + atEOF: false, + err: transform.ErrShortSrc, + nSpan: 1, + errSpan: transform.ErrShortSrc, + }, { + desc: "short source 2", + src: "a\xe0\x80", + nBuf: 10, + dst: "a\xe0\x80", + nDst: 1, + nSrc: 3, + atEOF: false, + err: transform.ErrShortSrc, + nSpan: 0, + errSpan: transform.ErrEndOfSpan, + }, { + desc: "incomplete but terminated source 1", + src: "a\xc2", + nBuf: 10, + dst: "a\xc2", + nDst: 2, + nSrc: 4, + atEOF: true, + err: nil, + nSpan: 0, + errSpan: transform.ErrEndOfSpan, + }, { + desc: "incomplete but terminated source 2", + src: "a\xe0\x80", + nBuf: 10, + dst: "a\xe0\x80", + nDst: 3, + nSrc: 5, + atEOF: true, + err: nil, + nSpan: 0, + errSpan: transform.ErrEndOfSpan, + }, { + desc: "exact fit dst", + src: "a\uff01", + nBuf: 2, + dst: "a!", + nDst: 2, + nSrc: 6, + atEOF: false, + err: nil, + nSpan: 0, + errSpan: transform.ErrEndOfSpan, + }, { + desc: "exact fit dst some span", + src: "a\uff01", + nBuf: 2, + dst: "a!", + nDst: 2, + nSrc: 4, + atEOF: false, + err: nil, + nSpan: 1, + errSpan: transform.ErrEndOfSpan, + }, { + desc: "empty dst", + src: "\u0300", + nBuf: 0, + dst: "\u0300", + nDst: 0, + nSrc: 0, + atEOF: true, + err: transform.ErrShortDst, + nSpan: 2, + errSpan: nil, + }, { + desc: "empty dst ascii", + src: "a", + nBuf: 0, + dst: "a", + nDst: 0, + nSrc: 0, + atEOF: true, + err: transform.ErrShortDst, + nSpan: 1, + errSpan: nil, + }, { + desc: "short dst 1", + src: "a\uffe0", // ¢ + nBuf: 2, + dst: "a\u00a2", // ¢ + nDst: 1, + nSrc: 3, + atEOF: false, + err: transform.ErrShortDst, + nSpan: 0, + errSpan: transform.ErrEndOfSpan, + }, { + desc: "short dst 2", + src: "不夠", + nBuf: 3, + dst: "不夠", + nDst: 3, + nSrc: 3, + atEOF: true, + err: transform.ErrShortDst, + nSpan: 6, + errSpan: nil, + }, { + // Create a narrow variant of ambiguous runes, if they exist. + desc: "ambiguous", + src: "\u2190", + nBuf: 4, + dst: "\uffe9", + nDst: 3, + nSrc: 3, + atEOF: false, + err: nil, + nSpan: 0, + errSpan: transform.ErrEndOfSpan, + }, { + desc: "short dst fast path", + src: "fast", + nBuf: 3, + dst: "fast", + nDst: 3, + nSrc: 3, + atEOF: true, + err: transform.ErrShortDst, + nSpan: 4, + errSpan: nil, + }, { + desc: "short dst larger buffer", + src: "\uff21" + strings.Repeat("0", 127) + "B", + nBuf: 128, + dst: "A" + strings.Repeat("0", 127) + "B", + nDst: 128, + nSrc: 130, + atEOF: true, + err: transform.ErrShortDst, + nSpan: 0, + errSpan: transform.ErrEndOfSpan, + }, { + desc: "fast path alternation", + src: "fast路徑fast路徑", + nBuf: 20, + dst: "fast路徑fast路徑", + nDst: 20, + nSrc: 20, + atEOF: true, + err: nil, + nSpan: 20, + errSpan: nil, + }} { + tc.doTest(t, Narrow) + } +} + +func bench(b *testing.B, t Transformer, s string) { + dst := make([]byte, 1024) + src := []byte(s) + b.SetBytes(int64(len(src))) + b.ResetTimer() + for i := 0; i < b.N; i++ { + t.Transform(dst, src, true) + } +} + +func changingRunes(f func(r rune) (rune, bool)) string { + buf := &bytes.Buffer{} + for r := rune(0); r <= 0xFFFF; r++ { + if _, ok := foldRune(r); ok { + buf.WriteRune(r) + } + } + return buf.String() +} + +func BenchmarkFoldASCII(b *testing.B) { + bench(b, Fold, testtext.ASCII) +} + +func BenchmarkFoldCJK(b *testing.B) { + bench(b, Fold, testtext.CJK) +} + +func BenchmarkFoldNonCanonical(b *testing.B) { + bench(b, Fold, changingRunes(foldRune)) +} + +func BenchmarkFoldOther(b *testing.B) { + bench(b, Fold, testtext.TwoByteUTF8+testtext.ThreeByteUTF8) +} + +func BenchmarkWideASCII(b *testing.B) { + bench(b, Widen, testtext.ASCII) +} + +func BenchmarkWideCJK(b *testing.B) { + bench(b, Widen, testtext.CJK) +} + +func BenchmarkWideNonCanonical(b *testing.B) { + bench(b, Widen, changingRunes(widenRune)) +} + +func BenchmarkWideOther(b *testing.B) { + bench(b, Widen, testtext.TwoByteUTF8+testtext.ThreeByteUTF8) +} + +func BenchmarkNarrowASCII(b *testing.B) { + bench(b, Narrow, testtext.ASCII) +} + +func BenchmarkNarrowCJK(b *testing.B) { + bench(b, Narrow, testtext.CJK) +} + +func BenchmarkNarrowNonCanonical(b *testing.B) { + bench(b, Narrow, changingRunes(narrowRune)) +} + +func BenchmarkNarrowOther(b *testing.B) { + bench(b, Narrow, testtext.TwoByteUTF8+testtext.ThreeByteUTF8) +} diff --git a/vendor/golang.org/x/text/width/width.go b/vendor/golang.org/x/text/width/width.go index 0c9aec474..f1639ca68 100644 --- a/vendor/golang.org/x/text/width/width.go +++ b/vendor/golang.org/x/text/width/width.go @@ -13,7 +13,7 @@ // layout. // // For more information, see http://unicode.org/reports/tr11/. -package width +package width // import "golang.org/x/text/width" import ( "unicode/utf8" diff --git a/vendor/google.golang.org/api/AUTHORS b/vendor/google.golang.org/api/AUTHORS deleted file mode 100644 index f73b72574..000000000 --- a/vendor/google.golang.org/api/AUTHORS +++ /dev/null @@ -1,10 +0,0 @@ -# This is the official list of authors for copyright purposes. -# This file is distinct from the CONTRIBUTORS files. -# See the latter for an explanation. - -# Names should be added to this file as -# Name or Organization <email address> -# The email address is not required for organizations. - -# Please keep the list sorted. -Google Inc. diff --git a/vendor/google.golang.org/api/CONTRIBUTORS b/vendor/google.golang.org/api/CONTRIBUTORS deleted file mode 100644 index bf7d94f71..000000000 --- a/vendor/google.golang.org/api/CONTRIBUTORS +++ /dev/null @@ -1,52 +0,0 @@ -# This is the official list of people who can contribute -# (and typically have contributed) code to the repository. -# The AUTHORS file lists the copyright holders; this file -# lists people. For example, Google employees are listed here -# but not in AUTHORS, because Google holds the copyright. -# -# The submission process automatically checks to make sure -# that people submitting code are listed in this file (by email address). -# -# Names should be added to this file only after verifying that -# the individual or the individual's organization has agreed to -# the appropriate Contributor License Agreement, found here: -# -# https://cla.developers.google.com/about/google-individual -# https://cla.developers.google.com/about/google-corporate -# -# The CLA can be filled out on the web: -# -# https://cla.developers.google.com/ -# -# When adding J Random Contributor's name to this file, -# either J's name or J's organization's name should be -# added to the AUTHORS file, depending on whether the -# individual or corporate CLA was used. - -# Names should be added to this file like so: -# Name <email address> -# -# An entry with two email addresses specifies that the -# first address should be used in the submit logs and -# that the second address should be recognized as the -# same person when interacting with Rietveld. - -# Please keep the list sorted. - -Alain Vongsouvanhalainv <alainv@google.com> -Andrew Gerrand <adg@golang.org> -Brad Fitzpatrick <bradfitz@golang.org> -Eric Koleda <ekoleda+devrel@googlers.com> -Francesc Campoy <campoy@golang.org> -Garrick Evans <garrick@google.com> -Glenn Lewis <gmlewis@google.com> -Ivan Krasin <krasin@golang.org> -Jason Hall <jasonhall@google.com> -Johan Euphrosine <proppy@google.com> -Kostik Shtoyk <kostik@google.com> -Michael McGreevy <mcgreevy@golang.org> -Nick Craig-Wood <nickcw@gmail.com> -Ross Light <light@google.com> -Sarah Adams <shadams@google.com> -Scott Van Woudenberg <scottvw@google.com> -Takashi Matsuo <tmatsuo@google.com> diff --git a/vendor/google.golang.org/api/cloudkms/v1/cloudkms-api.json b/vendor/google.golang.org/api/cloudkms/v1/cloudkms-api.json deleted file mode 100644 index 2ef074320..000000000 --- a/vendor/google.golang.org/api/cloudkms/v1/cloudkms-api.json +++ /dev/null @@ -1,1558 +0,0 @@ -{ - "batchPath": "batch", - "title": "Google Cloud Key Management Service (KMS) API", - "ownerName": "Google", - "resources": { - "projects": { - "resources": { - "locations": { - "resources": { - "keyRings": { - "resources": { - "cryptoKeys": { - "resources": { - "cryptoKeyVersions": { - "methods": { - "list": { - "response": { - "$ref": "ListCryptoKeyVersionsResponse" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "pageToken": { - "location": "query", - "description": "Optional pagination token, returned earlier via\nListCryptoKeyVersionsResponse.next_page_token.", - "type": "string" - }, - "pageSize": { - "format": "int32", - "description": "Optional limit on the number of CryptoKeyVersions to\ninclude in the response. Further CryptoKeyVersions can\nsubsequently be obtained by including the\nListCryptoKeyVersionsResponse.next_page_token in a subsequent request.\nIf unspecified, the server will pick an appropriate default.", - "type": "integer", - "location": "query" - }, - "parent": { - "description": "Required. The resource name of the CryptoKey to list, in the format\n`projects/*/locations/*/keyRings/*/cryptoKeys/*`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions", - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.list", - "path": "v1/{+parent}/cryptoKeyVersions", - "description": "Lists CryptoKeyVersions." - }, - "create": { - "httpMethod": "POST", - "parameterOrder": [ - "parent" - ], - "response": { - "$ref": "CryptoKeyVersion" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "parent": { - "description": "Required. The name of the CryptoKey associated with\nthe CryptoKeyVersions.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions", - "path": "v1/{+parent}/cryptoKeyVersions", - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.create", - "request": { - "$ref": "CryptoKeyVersion" - }, - "description": "Create a new CryptoKeyVersion in a CryptoKey.\n\nThe server will assign the next sequential id. If unset,\nstate will be set to\nENABLED." - }, - "destroy": { - "response": { - "$ref": "CryptoKeyVersion" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "parameters": { - "name": { - "description": "The resource name of the CryptoKeyVersion to destroy.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions/{cryptoKeyVersionsId}:destroy", - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.destroy", - "path": "v1/{+name}:destroy", - "description": "Schedule a CryptoKeyVersion for destruction.\n\nUpon calling this method, CryptoKeyVersion.state will be set to\nDESTROY_SCHEDULED\nand destroy_time will be set to a time 24\nhours in the future, at which point the state\nwill be changed to\nDESTROYED, and the key\nmaterial will be irrevocably destroyed.\n\nBefore the destroy_time is reached,\nRestoreCryptoKeyVersion may be called to reverse the process.", - "request": { - "$ref": "DestroyCryptoKeyVersionRequest" - } - }, - "restore": { - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.restore", - "path": "v1/{+name}:restore", - "description": "Restore a CryptoKeyVersion in the\nDESTROY_SCHEDULED,\nstate.\n\nUpon restoration of the CryptoKeyVersion, state\nwill be set to DISABLED,\nand destroy_time will be cleared.", - "request": { - "$ref": "RestoreCryptoKeyVersionRequest" - }, - "response": { - "$ref": "CryptoKeyVersion" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "parameters": { - "name": { - "description": "The resource name of the CryptoKeyVersion to restore.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions/{cryptoKeyVersionsId}:restore" - }, - "get": { - "response": { - "$ref": "CryptoKeyVersion" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$", - "location": "path", - "description": "The name of the CryptoKeyVersion to get.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions/{cryptoKeyVersionsId}", - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.get", - "path": "v1/{+name}", - "description": "Returns metadata for a given CryptoKeyVersion." - }, - "patch": { - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.patch", - "path": "v1/{+name}", - "description": "Update a CryptoKeyVersion's metadata.\n\nstate may be changed between\nENABLED and\nDISABLED using this\nmethod. See DestroyCryptoKeyVersion and RestoreCryptoKeyVersion to\nmove between other states.", - "request": { - "$ref": "CryptoKeyVersion" - }, - "response": { - "$ref": "CryptoKeyVersion" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "PATCH", - "parameters": { - "updateMask": { - "location": "query", - "format": "google-fieldmask", - "description": "Required list of fields to be updated in this request.", - "type": "string" - }, - "name": { - "description": "Output only. The resource name for this CryptoKeyVersion in the format\n`projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions/{cryptoKeyVersionsId}" - } - } - } - }, - "methods": { - "patch": { - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.patch", - "path": "v1/{+name}", - "description": "Update a CryptoKey.", - "request": { - "$ref": "CryptoKey" - }, - "response": { - "$ref": "CryptoKey" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "PATCH", - "parameters": { - "updateMask": { - "location": "query", - "format": "google-fieldmask", - "description": "Required list of fields to be updated in this request.", - "type": "string" - }, - "name": { - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", - "location": "path", - "description": "Output only. The resource name for this CryptoKey in the format\n`projects/*/locations/*/keyRings/*/cryptoKeys/*`.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}" - }, - "get": { - "response": { - "$ref": "CryptoKey" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "description": "The name of the CryptoKey to get.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}", - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.get", - "path": "v1/{+name}", - "description": "Returns metadata for a given CryptoKey, as well as its\nprimary CryptoKeyVersion." - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:testIamPermissions", - "path": "v1/{+resource}:testIamPermissions", - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.testIamPermissions" - }, - "decrypt": { - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.decrypt", - "path": "v1/{+name}:decrypt", - "request": { - "$ref": "DecryptRequest" - }, - "description": "Decrypts data that was protected by Encrypt.", - "response": { - "$ref": "DecryptResponse" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "description": "Required. The resource name of the CryptoKey to use for decryption.\nThe server will choose the appropriate version.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:decrypt" - }, - "list": { - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys", - "path": "v1/{+parent}/cryptoKeys", - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.list", - "description": "Lists CryptoKeys.", - "httpMethod": "GET", - "parameterOrder": [ - "parent" - ], - "response": { - "$ref": "ListCryptoKeysResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "parent": { - "location": "path", - "description": "Required. The resource name of the KeyRing to list, in the format\n`projects/*/locations/*/keyRings/*`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$" - }, - "pageToken": { - "location": "query", - "description": "Optional pagination token, returned earlier via\nListCryptoKeysResponse.next_page_token.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Optional limit on the number of CryptoKeys to include in the\nresponse. Further CryptoKeys can subsequently be obtained by\nincluding the ListCryptoKeysResponse.next_page_token in a subsequent\nrequest. If unspecified, the server will pick an appropriate default.", - "type": "integer" - } - } - }, - "encrypt": { - "response": { - "$ref": "EncryptResponse" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "parameters": { - "name": { - "description": "Required. The resource name of the CryptoKey or CryptoKeyVersion\nto use for encryption.\n\nIf a CryptoKey is specified, the server will use its\nprimary version.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/.+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:encrypt", - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.encrypt", - "path": "v1/{+name}:encrypt", - "description": "Encrypts data, so that it can only be recovered by a call to Decrypt.", - "request": { - "$ref": "EncryptRequest" - } - }, - "setIamPolicy": { - "path": "v1/{+resource}:setIamPolicy", - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.setIamPolicy", - "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "Policy" - }, - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:setIamPolicy" - }, - "create": { - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.create", - "path": "v1/{+parent}/cryptoKeys", - "description": "Create a new CryptoKey within a KeyRing.\n\nCryptoKey.purpose is required.", - "request": { - "$ref": "CryptoKey" - }, - "response": { - "$ref": "CryptoKey" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "POST", - "parameters": { - "cryptoKeyId": { - "description": "Required. It must be unique within a KeyRing and match the regular\nexpression `[a-zA-Z0-9_-]{1,63}`", - "type": "string", - "location": "query" - }, - "parent": { - "description": "Required. The name of the KeyRing associated with the\nCryptoKeys.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys" - }, - "updatePrimaryVersion": { - "response": { - "$ref": "CryptoKey" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", - "location": "path", - "description": "The resource name of the CryptoKey to update.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:updatePrimaryVersion", - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.updatePrimaryVersion", - "path": "v1/{+name}:updatePrimaryVersion", - "request": { - "$ref": "UpdateCryptoKeyPrimaryVersionRequest" - }, - "description": "Update the version of a CryptoKey that will be used in Encrypt" - }, - "getIamPolicy": { - "httpMethod": "GET", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "Policy" - }, - "parameters": { - "resource": { - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", - "location": "path", - "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:getIamPolicy", - "path": "v1/{+resource}:getIamPolicy", - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.getIamPolicy", - "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset." - } - } - } - }, - "methods": { - "list": { - "path": "v1/{+parent}/keyRings", - "id": "cloudkms.projects.locations.keyRings.list", - "description": "Lists KeyRings.", - "httpMethod": "GET", - "parameterOrder": [ - "parent" - ], - "response": { - "$ref": "ListKeyRingsResponse" - }, - "parameters": { - "pageSize": { - "format": "int32", - "description": "Optional limit on the number of KeyRings to include in the\nresponse. Further KeyRings can subsequently be obtained by\nincluding the ListKeyRingsResponse.next_page_token in a subsequent\nrequest. If unspecified, the server will pick an appropriate default.", - "type": "integer", - "location": "query" - }, - "parent": { - "location": "path", - "description": "Required. The resource name of the location associated with the\nKeyRings, in the format `projects/*/locations/*`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+$" - }, - "pageToken": { - "location": "query", - "description": "Optional pagination token, returned earlier via\nListKeyRingsResponse.next_page_token.", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings" - }, - "create": { - "httpMethod": "POST", - "parameterOrder": [ - "parent" - ], - "response": { - "$ref": "KeyRing" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "parent": { - "pattern": "^projects/[^/]+/locations/[^/]+$", - "location": "path", - "description": "Required. The resource name of the location associated with the\nKeyRings, in the format `projects/*/locations/*`.", - "type": "string", - "required": true - }, - "keyRingId": { - "description": "Required. It must be unique within a location and match the regular\nexpression `[a-zA-Z0-9_-]{1,63}`", - "type": "string", - "location": "query" - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings", - "path": "v1/{+parent}/keyRings", - "id": "cloudkms.projects.locations.keyRings.create", - "request": { - "$ref": "KeyRing" - }, - "description": "Create a new KeyRing in a given Project and Location." - }, - "setIamPolicy": { - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}:setIamPolicy", - "id": "cloudkms.projects.locations.keyRings.setIamPolicy", - "path": "v1/{+resource}:setIamPolicy", - "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", - "request": { - "$ref": "SetIamPolicyRequest" - } - }, - "getIamPolicy": { - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}:getIamPolicy", - "id": "cloudkms.projects.locations.keyRings.getIamPolicy", - "path": "v1/{+resource}:getIamPolicy", - "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset." - }, - "get": { - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "KeyRing" - }, - "parameters": { - "name": { - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", - "location": "path", - "description": "The name of the KeyRing to get.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}", - "path": "v1/{+name}", - "id": "cloudkms.projects.locations.keyRings.get", - "description": "Returns metadata for a given KeyRing." - }, - "testIamPermissions": { - "id": "cloudkms.projects.locations.keyRings.testIamPermissions", - "path": "v1/{+resource}:testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}:testIamPermissions" - } - } - } - }, - "methods": { - "get": { - "id": "cloudkms.projects.locations.get", - "path": "v1/{+name}", - "description": "Get information about a location.", - "response": { - "$ref": "Location" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "location": "path", - "description": "Resource name for the location.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}" - }, - "list": { - "description": "Lists information about the supported locations for this service.", - "response": { - "$ref": "ListLocationsResponse" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "parameters": { - "pageToken": { - "location": "query", - "description": "The standard list page token.", - "type": "string" - }, - "name": { - "pattern": "^projects/[^/]+$", - "location": "path", - "description": "The resource that owns the locations collection, if applicable.", - "type": "string", - "required": true - }, - "pageSize": { - "format": "int32", - "description": "The standard list page size.", - "type": "integer", - "location": "query" - }, - "filter": { - "description": "The standard list filter.", - "type": "string", - "location": "query" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/locations", - "id": "cloudkms.projects.locations.list", - "path": "v1/{+name}/locations" - } - } - } - } - } - }, - "parameters": { - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "$.xgafv": { - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string" - }, - "alt": { - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query", - "description": "Data format for response.", - "default": "json" - }, - "key": { - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "type": "string", - "location": "query" - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" - }, - "quotaUser": { - "location": "query", - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "type": "string" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" - } - }, - "version": "v1", - "baseUrl": "https://cloudkms.googleapis.com/", - "servicePath": "", - "description": "Manages encryption for your cloud services the same way you do on-premises. You can generate, use, rotate, and destroy AES256 encryption keys.", - "kind": "discovery#restDescription", - "basePath": "", - "id": "cloudkms:v1", - "documentationLink": "https://cloud.google.com/kms/", - "revision": "20170725", - "discoveryVersion": "v1", - "version_module": "True", - "schemas": { - "SetIamPolicyRequest": { - "properties": { - "updateMask": { - "format": "google-fieldmask", - "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only\nthe fields in the mask will be modified. If no mask is provided, the\nfollowing default mask is used:\npaths: \"bindings, etag\"\nThis field is only used by Cloud IAM.", - "type": "string" - }, - "policy": { - "$ref": "Policy", - "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them." - } - }, - "id": "SetIamPolicyRequest", - "description": "Request message for `SetIamPolicy` method.", - "type": "object" - }, - "DecryptRequest": { - "description": "Request message for KeyManagementService.Decrypt.", - "type": "object", - "properties": { - "additionalAuthenticatedData": { - "format": "byte", - "description": "Optional data that must match the data originally supplied in\nEncryptRequest.additional_authenticated_data.", - "type": "string" - }, - "ciphertext": { - "format": "byte", - "description": "Required. The encrypted data originally returned in\nEncryptResponse.ciphertext.", - "type": "string" - } - }, - "id": "DecryptRequest" - }, - "Location": { - "properties": { - "locationId": { - "description": "The canonical id for this location. For example: `\"us-east1\"`.", - "type": "string" - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Service-specific metadata. For example the available capacity at the given\nlocation.", - "type": "object" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Cross-service attributes for the location. For example\n\n {\"cloud.googleapis.com/region\": \"us-east1\"}", - "type": "object" - }, - "name": { - "description": "Resource name for the location, which may vary between implementations.\nFor example: `\"projects/example-project/locations/us-east1\"`", - "type": "string" - } - }, - "id": "Location", - "description": "A resource that represents Google Cloud Platform location.", - "type": "object" - }, - "ListCryptoKeysResponse": { - "description": "Response message for KeyManagementService.ListCryptoKeys.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "A token to retrieve next page of results. Pass this value in\nListCryptoKeysRequest.page_token to retrieve the next page of results.", - "type": "string" - }, - "totalSize": { - "format": "int32", - "description": "The total number of CryptoKeys that matched the query.", - "type": "integer" - }, - "cryptoKeys": { - "description": "The list of CryptoKeys.", - "items": { - "$ref": "CryptoKey" - }, - "type": "array" - } - }, - "id": "ListCryptoKeysResponse" - }, - "Condition": { - "description": "A condition to be met.", - "type": "object", - "properties": { - "iam": { - "enumDescriptions": [ - "Default non-attribute.", - "Either principal or (if present) authority selector.", - "The principal (even if an authority selector is present), which\nmust only be used for attribution, not authorization.", - "An approver (distinct from the requester) that has authorized this\nrequest.\nWhen used with IN, the condition indicates that one of the approvers\nassociated with the request matches the specified principal, or is a\nmember of the specified group. Approvers can only grant additional\naccess, and are thus only used in a strictly positive context\n(e.g. ALLOW/IN or DENY/NOT_IN).", - "What types of justifications have been supplied with this request.\nString values should match enum names from tech.iam.JustificationType,\ne.g. \"MANUAL_STRING\". It is not permitted to grant access based on\nthe *absence* of a justification, so justification conditions can only\nbe used in a \"positive\" context (e.g., ALLOW/IN or DENY/NOT_IN).\n\nMultiple justifications, e.g., a Buganizer ID and a manually-entered\nreason, are normal and supported." - ], - "enum": [ - "NO_ATTR", - "AUTHORITY", - "ATTRIBUTION", - "APPROVER", - "JUSTIFICATION_TYPE" - ], - "description": "Trusted attributes supplied by the IAM system.", - "type": "string" - }, - "values": { - "description": "The objects of the condition. This is mutually exclusive with 'value'.", - "items": { - "type": "string" - }, - "type": "array" - }, - "op": { - "enumDescriptions": [ - "Default no-op.", - "DEPRECATED. Use IN instead.", - "DEPRECATED. Use NOT_IN instead.", - "The condition is true if the subject (or any element of it if it is\na set) matches any of the supplied values.", - "The condition is true if the subject (or every element of it if it is\na set) matches none of the supplied values.", - "Subject is discharged" - ], - "enum": [ - "NO_OP", - "EQUALS", - "NOT_EQUALS", - "IN", - "NOT_IN", - "DISCHARGED" - ], - "description": "An operator to apply the subject with.", - "type": "string" - }, - "svc": { - "description": "Trusted attributes discharged by the service.", - "type": "string" - }, - "sys": { - "enum": [ - "NO_ATTR", - "REGION", - "SERVICE", - "NAME", - "IP" - ], - "description": "Trusted attributes supplied by any service that owns resources and uses\nthe IAM system for access control.", - "type": "string", - "enumDescriptions": [ - "Default non-attribute type", - "Region of the resource", - "Service name", - "Resource name", - "IP address of the caller" - ] - }, - "value": { - "description": "DEPRECATED. Use 'values' instead.", - "type": "string" - } - }, - "id": "Condition" - }, - "CounterOptions": { - "properties": { - "field": { - "description": "The field value to attribute.", - "type": "string" - }, - "metric": { - "description": "The metric to update.", - "type": "string" - } - }, - "id": "CounterOptions", - "description": "Options for counters", - "type": "object" - }, - "AuditLogConfig": { - "properties": { - "exemptedMembers": { - "description": "Specifies the identities that do not cause logging for this type of\npermission.\nFollows the same format of Binding.members.", - "items": { - "type": "string" - }, - "type": "array" - }, - "logType": { - "enum": [ - "LOG_TYPE_UNSPECIFIED", - "ADMIN_READ", - "DATA_WRITE", - "DATA_READ" - ], - "description": "The log type that this config enables.", - "type": "string", - "enumDescriptions": [ - "Default case. Should never be this.", - "Admin reads. Example: CloudIAM getIamPolicy", - "Data writes. Example: CloudSQL Users create", - "Data reads. Example: CloudSQL Users list" - ] - } - }, - "id": "AuditLogConfig", - "description": "Provides the configuration for logging a type of permissions.\nExample:\n\n {\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n }\n ]\n }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting\nfoo@gmail.com from DATA_READ logging.", - "type": "object" - }, - "DecryptResponse": { - "description": "Response message for KeyManagementService.Decrypt.", - "type": "object", - "properties": { - "plaintext": { - "format": "byte", - "description": "The decrypted data originally supplied in EncryptRequest.plaintext.", - "type": "string" - } - }, - "id": "DecryptResponse" - }, - "TestIamPermissionsRequest": { - "description": "Request message for `TestIamPermissions` method.", - "type": "object", - "properties": { - "permissions": { - "description": "The set of permissions to check for the `resource`. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed. For more\ninformation see\n[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "TestIamPermissionsRequest" - }, - "EncryptResponse": { - "properties": { - "ciphertext": { - "format": "byte", - "description": "The encrypted data.", - "type": "string" - }, - "name": { - "description": "The resource name of the CryptoKeyVersion used in encryption.", - "type": "string" - } - }, - "id": "EncryptResponse", - "description": "Response message for KeyManagementService.Encrypt.", - "type": "object" - }, - "KeyRing": { - "description": "A KeyRing is a toplevel logical grouping of CryptoKeys.", - "type": "object", - "properties": { - "createTime": { - "format": "google-datetime", - "description": "Output only. The time at which this KeyRing was created.", - "type": "string" - }, - "name": { - "description": "Output only. The resource name for the KeyRing in the format\n`projects/*/locations/*/keyRings/*`.", - "type": "string" - } - }, - "id": "KeyRing" - }, - "ListLocationsResponse": { - "description": "The response message for Locations.ListLocations.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - }, - "locations": { - "description": "A list of locations that matches the specified filter in the request.", - "items": { - "$ref": "Location" - }, - "type": "array" - } - }, - "id": "ListLocationsResponse" - }, - "Policy": { - "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\",\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", - "type": "object", - "properties": { - "iamOwned": { - "type": "boolean" - }, - "rules": { - "description": "If more than one rule is specified, the rules are applied in the following\nmanner:\n- All matching LOG rules are always applied.\n- If any DENY/DENY_WITH_LOG rule matches, permission is denied.\n Logging will be applied if one or more matching rule requires logging.\n- Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is\n granted.\n Logging will be applied if one or more matching rule requires logging.\n- Otherwise, if no rule applies, permission is denied.", - "items": { - "$ref": "Rule" - }, - "type": "array" - }, - "version": { - "format": "int32", - "description": "Version of the `Policy`. The default version is 0.", - "type": "integer" - }, - "auditConfigs": { - "description": "Specifies cloud audit logging configuration for this policy.", - "items": { - "$ref": "AuditConfig" - }, - "type": "array" - }, - "bindings": { - "description": "Associates a list of `members` to a `role`.\n`bindings` with no members will result in an error.", - "items": { - "$ref": "Binding" - }, - "type": "array" - }, - "etag": { - "format": "byte", - "description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing\npolicy is overwritten blindly.", - "type": "string" - } - }, - "id": "Policy" - }, - "RestoreCryptoKeyVersionRequest": { - "properties": {}, - "id": "RestoreCryptoKeyVersionRequest", - "description": "Request message for KeyManagementService.RestoreCryptoKeyVersion.", - "type": "object" - }, - "UpdateCryptoKeyPrimaryVersionRequest": { - "properties": { - "cryptoKeyVersionId": { - "description": "The id of the child CryptoKeyVersion to use as primary.", - "type": "string" - } - }, - "id": "UpdateCryptoKeyPrimaryVersionRequest", - "description": "Request message for KeyManagementService.UpdateCryptoKeyPrimaryVersion.", - "type": "object" - }, - "ListKeyRingsResponse": { - "description": "Response message for KeyManagementService.ListKeyRings.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "A token to retrieve next page of results. Pass this value in\nListKeyRingsRequest.page_token to retrieve the next page of results.", - "type": "string" - }, - "totalSize": { - "format": "int32", - "description": "The total number of KeyRings that matched the query.", - "type": "integer" - }, - "keyRings": { - "description": "The list of KeyRings.", - "items": { - "$ref": "KeyRing" - }, - "type": "array" - } - }, - "id": "ListKeyRingsResponse" - }, - "DataAccessOptions": { - "description": "Write a Data Access (Gin) log", - "type": "object", - "properties": {}, - "id": "DataAccessOptions" - }, - "AuditConfig": { - "description": "Specifies the audit configuration for a service.\nThe configuration determines which permission types are logged, and what\nidentities, if any, are exempted from logging.\nAn AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service,\nthe union of the two AuditConfigs is used for that service: the log_types\nspecified in each AuditConfig are enabled, and the exempted_members in each\nAuditConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n {\n \"audit_configs\": [\n {\n \"service\": \"allServices\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n },\n {\n \"log_type\": \"ADMIN_READ\",\n }\n ]\n },\n {\n \"service\": \"fooservice.googleapis.com\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n },\n {\n \"log_type\": \"DATA_WRITE\",\n \"exempted_members\": [\n \"user:bar@gmail.com\"\n ]\n }\n ]\n }\n ]\n }\n\nFor fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ\nlogging. It also exempts foo@gmail.com from DATA_READ logging, and\nbar@gmail.com from DATA_WRITE logging.", - "type": "object", - "properties": { - "exemptedMembers": { - "items": { - "type": "string" - }, - "type": "array" - }, - "service": { - "description": "Specifies a service that will be enabled for audit logging.\nFor example, `storage.googleapis.com`, `cloudsql.googleapis.com`.\n`allServices` is a special value that covers all services.", - "type": "string" - }, - "auditLogConfigs": { - "description": "The configuration for logging of each type of permission.\nNext ID: 4", - "items": { - "$ref": "AuditLogConfig" - }, - "type": "array" - } - }, - "id": "AuditConfig" - }, - "CryptoKeyVersion": { - "description": "A CryptoKeyVersion represents an individual cryptographic key, and the\nassociated key material.\n\nIt can be used for cryptographic operations either directly, or via its\nparent CryptoKey, in which case the server will choose the appropriate\nversion for the operation.", - "type": "object", - "properties": { - "destroyEventTime": { - "format": "google-datetime", - "description": "Output only. The time this CryptoKeyVersion's key material was\ndestroyed. Only present if state is\nDESTROYED.", - "type": "string" - }, - "destroyTime": { - "format": "google-datetime", - "description": "Output only. The time this CryptoKeyVersion's key material is scheduled\nfor destruction. Only present if state is\nDESTROY_SCHEDULED.", - "type": "string" - }, - "createTime": { - "format": "google-datetime", - "description": "Output only. The time at which this CryptoKeyVersion was created.", - "type": "string" - }, - "state": { - "description": "The current state of the CryptoKeyVersion.", - "type": "string", - "enumDescriptions": [ - "Not specified.", - "This version may be used in Encrypt and\nDecrypt requests.", - "This version may not be used, but the key material is still available,\nand the version can be placed back into the ENABLED state.", - "This version is destroyed, and the key material is no longer stored.\nA version may not leave this state once entered.", - "This version is scheduled for destruction, and will be destroyed soon.\nCall\nRestoreCryptoKeyVersion\nto put it back into the DISABLED state." - ], - "enum": [ - "CRYPTO_KEY_VERSION_STATE_UNSPECIFIED", - "ENABLED", - "DISABLED", - "DESTROYED", - "DESTROY_SCHEDULED" - ] - }, - "name": { - "description": "Output only. The resource name for this CryptoKeyVersion in the format\n`projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.", - "type": "string" - } - }, - "id": "CryptoKeyVersion" - }, - "CloudAuditOptions": { - "description": "Write a Cloud Audit log", - "type": "object", - "properties": { - "logName": { - "enumDescriptions": [ - "Default. Should not be used.", - "Corresponds to \"cloudaudit.googleapis.com/activity\"", - "Corresponds to \"cloudaudit.googleapis.com/data_access\"" - ], - "enum": [ - "UNSPECIFIED_LOG_NAME", - "ADMIN_ACTIVITY", - "DATA_ACCESS" - ], - "description": "The log_name to populate in the Cloud Audit Record.", - "type": "string" - } - }, - "id": "CloudAuditOptions" - }, - "Binding": { - "description": "Associates `members` with a `role`.", - "type": "object", - "properties": { - "condition": { - "$ref": "Expr", - "description": "The condition that is associated with this binding.\nNOTE: an unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently.\nThis field is GOOGLE_INTERNAL." - }, - "members": { - "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` or `joe@example.com`.\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", - "items": { - "type": "string" - }, - "type": "array" - }, - "role": { - "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired", - "type": "string" - } - }, - "id": "Binding" - }, - "Expr": { - "description": "Represents an expression text. Example:\n\n title: \"User account presence\"\n description: \"Determines whether the request has a user account\"\n expression: \"size(request.user) \u003e 0\"", - "type": "object", - "properties": { - "location": { - "description": "An optional string indicating the location of the expression for error\nreporting, e.g. a file name and a position in the file.", - "type": "string" - }, - "title": { - "description": "An optional title for the expression, i.e. a short string describing\nits purpose. This can be used e.g. in UIs which allow to enter the\nexpression.", - "type": "string" - }, - "description": { - "description": "An optional description of the expression. This is a longer text which\ndescribes the expression, e.g. when hovered over it in a UI.", - "type": "string" - }, - "expression": { - "description": "Textual representation of an expression in\nCommon Expression Language syntax.\n\nThe application context of the containing message determines which\nwell-known feature set of CEL is supported.", - "type": "string" - } - }, - "id": "Expr" - }, - "EncryptRequest": { - "description": "Request message for KeyManagementService.Encrypt.", - "type": "object", - "properties": { - "additionalAuthenticatedData": { - "format": "byte", - "description": "Optional data that, if specified, must also be provided during decryption\nthrough DecryptRequest.additional_authenticated_data. Must be no\nlarger than 64KiB.", - "type": "string" - }, - "plaintext": { - "format": "byte", - "description": "Required. The data to encrypt. Must be no larger than 64KiB.", - "type": "string" - } - }, - "id": "EncryptRequest" - }, - "ListCryptoKeyVersionsResponse": { - "description": "Response message for KeyManagementService.ListCryptoKeyVersions.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "A token to retrieve next page of results. Pass this value in\nListCryptoKeyVersionsRequest.page_token to retrieve the next page of\nresults.", - "type": "string" - }, - "totalSize": { - "format": "int32", - "description": "The total number of CryptoKeyVersions that matched the\nquery.", - "type": "integer" - }, - "cryptoKeyVersions": { - "description": "The list of CryptoKeyVersions.", - "items": { - "$ref": "CryptoKeyVersion" - }, - "type": "array" - } - }, - "id": "ListCryptoKeyVersionsResponse" - }, - "TestIamPermissionsResponse": { - "properties": { - "permissions": { - "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "TestIamPermissionsResponse", - "description": "Response message for `TestIamPermissions` method.", - "type": "object" - }, - "DestroyCryptoKeyVersionRequest": { - "properties": {}, - "id": "DestroyCryptoKeyVersionRequest", - "description": "Request message for KeyManagementService.DestroyCryptoKeyVersion.", - "type": "object" - }, - "Rule": { - "description": "A rule to be applied in a Policy.", - "type": "object", - "properties": { - "description": { - "description": "Human-readable description of the rule.", - "type": "string" - }, - "conditions": { - "description": "Additional restrictions that must be met", - "items": { - "$ref": "Condition" - }, - "type": "array" - }, - "logConfig": { - "description": "The config returned to callers of tech.iam.IAM.CheckPolicy for any entries\nthat match the LOG action.", - "items": { - "$ref": "LogConfig" - }, - "type": "array" - }, - "in": { - "description": "If one or more 'in' clauses are specified, the rule matches if\nthe PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.", - "items": { - "type": "string" - }, - "type": "array" - }, - "permissions": { - "description": "A permission is a string of form '\u003cservice\u003e.\u003cresource type\u003e.\u003cverb\u003e'\n(e.g., 'storage.buckets.list'). A value of '*' matches all permissions,\nand a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.", - "items": { - "type": "string" - }, - "type": "array" - }, - "action": { - "description": "Required", - "type": "string", - "enumDescriptions": [ - "Default no action.", - "Matching 'Entries' grant access.", - "Matching 'Entries' grant access and the caller promises to log\nthe request per the returned log_configs.", - "Matching 'Entries' deny access.", - "Matching 'Entries' deny access and the caller promises to log\nthe request per the returned log_configs.", - "Matching 'Entries' tell IAM.Check callers to generate logs." - ], - "enum": [ - "NO_ACTION", - "ALLOW", - "ALLOW_WITH_LOG", - "DENY", - "DENY_WITH_LOG", - "LOG" - ] - }, - "notIn": { - "description": "If one or more 'not_in' clauses are specified, the rule matches\nif the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.\nThe format for in and not_in entries is the same as for members in a\nBinding (see google/iam/v1/policy.proto).", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "Rule" - }, - "CryptoKey": { - "description": "A CryptoKey represents a logical key that can be used for cryptographic\noperations.\n\nA CryptoKey is made up of one or more versions, which\nrepresent the actual key material used in cryptographic operations.", - "type": "object", - "properties": { - "createTime": { - "format": "google-datetime", - "description": "Output only. The time at which this CryptoKey was created.", - "type": "string" - }, - "rotationPeriod": { - "format": "google-duration", - "description": "next_rotation_time will be advanced by this period when the service\nautomatically rotates a key. Must be at least one day.\n\nIf rotation_period is set, next_rotation_time must also be set.", - "type": "string" - }, - "primary": { - "$ref": "CryptoKeyVersion", - "description": "Output only. A copy of the \"primary\" CryptoKeyVersion that will be used\nby Encrypt when this CryptoKey is given\nin EncryptRequest.name.\n\nThe CryptoKey's primary version can be updated via\nUpdateCryptoKeyPrimaryVersion." - }, - "name": { - "description": "Output only. The resource name for this CryptoKey in the format\n`projects/*/locations/*/keyRings/*/cryptoKeys/*`.", - "type": "string" - }, - "purpose": { - "enum": [ - "CRYPTO_KEY_PURPOSE_UNSPECIFIED", - "ENCRYPT_DECRYPT" - ], - "description": "The immutable purpose of this CryptoKey. Currently, the only acceptable\npurpose is ENCRYPT_DECRYPT.", - "type": "string", - "enumDescriptions": [ - "Not specified.", - "CryptoKeys with this purpose may be used with\nEncrypt and\nDecrypt." - ] - }, - "nextRotationTime": { - "format": "google-datetime", - "description": "At next_rotation_time, the Key Management Service will automatically:\n\n1. Create a new version of this CryptoKey.\n2. Mark the new version as primary.\n\nKey rotations performed manually via\nCreateCryptoKeyVersion and\nUpdateCryptoKeyPrimaryVersion\ndo not affect next_rotation_time.", - "type": "string" - } - }, - "id": "CryptoKey" - }, - "LogConfig": { - "description": "Specifies what kind of log the caller must write\nIncrement a streamz counter with the specified metric and field names.\n\nMetric names should start with a '/', generally be lowercase-only,\nand end in \"_count\". Field names should not contain an initial slash.\nThe actual exported metric names will have \"/iam/policy\" prepended.\n\nField names correspond to IAM request parameters and field values are\ntheir respective values.\n\nAt present the only supported field names are\n - \"iam_principal\", corresponding to IAMContext.principal;\n - \"\" (empty string), resulting in one aggretated counter with no field.\n\nExamples:\n counter { metric: \"/debug_access_count\" field: \"iam_principal\" }\n ==\u003e increment counter /iam/policy/backend_debug_access_count\n {iam_principal=[value of IAMContext.principal]}\n\nAt this time we do not support:\n* multiple field names (though this may be supported in the future)\n* decrementing the counter\n* incrementing it by anything other than 1", - "type": "object", - "properties": { - "counter": { - "description": "Counter options.", - "$ref": "CounterOptions" - }, - "dataAccess": { - "$ref": "DataAccessOptions", - "description": "Data access options." - }, - "cloudAudit": { - "description": "Cloud audit options.", - "$ref": "CloudAuditOptions" - } - }, - "id": "LogConfig" - } - }, - "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" - }, - "protocol": "rest", - "canonicalName": "Cloud KMS", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "rootUrl": "https://cloudkms.googleapis.com/", - "ownerDomain": "google.com", - "name": "cloudkms" -} diff --git a/vendor/google.golang.org/api/cloudkms/v1/cloudkms-gen.go b/vendor/google.golang.org/api/cloudkms/v1/cloudkms-gen.go deleted file mode 100644 index cc65a01d4..000000000 --- a/vendor/google.golang.org/api/cloudkms/v1/cloudkms-gen.go +++ /dev/null @@ -1,5157 +0,0 @@ -// Package cloudkms provides access to the Google Cloud Key Management Service (KMS) API. -// -// See https://cloud.google.com/kms/ -// -// Usage example: -// -// import "google.golang.org/api/cloudkms/v1" -// ... -// cloudkmsService, err := cloudkms.New(oauthHttpClient) -package cloudkms - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" - "io" - "net/http" - "net/url" - "strconv" - "strings" -) - -// Always reference these packages, just in case the auto-generated code -// below doesn't. -var _ = bytes.NewBuffer -var _ = strconv.Itoa -var _ = fmt.Sprintf -var _ = json.NewDecoder -var _ = io.Copy -var _ = url.Parse -var _ = gensupport.MarshalJSON -var _ = googleapi.Version -var _ = errors.New -var _ = strings.Replace -var _ = context.Canceled -var _ = ctxhttp.Do - -const apiId = "cloudkms:v1" -const apiName = "cloudkms" -const apiVersion = "v1" -const basePath = "https://cloudkms.googleapis.com/" - -// OAuth2 scopes used by this API. -const ( - // View and manage your data across Google Cloud Platform services - CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" -) - -func New(client *http.Client) (*Service, error) { - if client == nil { - return nil, errors.New("client is nil") - } - s := &Service{client: client, BasePath: basePath} - s.Projects = NewProjectsService(s) - return s, nil -} - -type Service struct { - client *http.Client - BasePath string // API endpoint base URL - UserAgent string // optional additional User-Agent fragment - - Projects *ProjectsService -} - -func (s *Service) userAgent() string { - if s.UserAgent == "" { - return googleapi.UserAgent - } - return googleapi.UserAgent + " " + s.UserAgent -} - -func NewProjectsService(s *Service) *ProjectsService { - rs := &ProjectsService{s: s} - rs.Locations = NewProjectsLocationsService(s) - return rs -} - -type ProjectsService struct { - s *Service - - Locations *ProjectsLocationsService -} - -func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { - rs := &ProjectsLocationsService{s: s} - rs.KeyRings = NewProjectsLocationsKeyRingsService(s) - return rs -} - -type ProjectsLocationsService struct { - s *Service - - KeyRings *ProjectsLocationsKeyRingsService -} - -func NewProjectsLocationsKeyRingsService(s *Service) *ProjectsLocationsKeyRingsService { - rs := &ProjectsLocationsKeyRingsService{s: s} - rs.CryptoKeys = NewProjectsLocationsKeyRingsCryptoKeysService(s) - return rs -} - -type ProjectsLocationsKeyRingsService struct { - s *Service - - CryptoKeys *ProjectsLocationsKeyRingsCryptoKeysService -} - -func NewProjectsLocationsKeyRingsCryptoKeysService(s *Service) *ProjectsLocationsKeyRingsCryptoKeysService { - rs := &ProjectsLocationsKeyRingsCryptoKeysService{s: s} - rs.CryptoKeyVersions = NewProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsService(s) - return rs -} - -type ProjectsLocationsKeyRingsCryptoKeysService struct { - s *Service - - CryptoKeyVersions *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsService -} - -func NewProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsService(s *Service) *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsService { - rs := &ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsService{s: s} - return rs -} - -type ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsService struct { - s *Service -} - -// AuditConfig: Specifies the audit configuration for a service. -// The configuration determines which permission types are logged, and -// what -// identities, if any, are exempted from logging. -// An AuditConfig must have one or more AuditLogConfigs. -// -// If there are AuditConfigs for both `allServices` and a specific -// service, -// the union of the two AuditConfigs is used for that service: the -// log_types -// specified in each AuditConfig are enabled, and the exempted_members -// in each -// AuditConfig are exempted. -// -// Example Policy with multiple AuditConfigs: -// -// { -// "audit_configs": [ -// { -// "service": "allServices" -// "audit_log_configs": [ -// { -// "log_type": "DATA_READ", -// "exempted_members": [ -// "user:foo@gmail.com" -// ] -// }, -// { -// "log_type": "DATA_WRITE", -// }, -// { -// "log_type": "ADMIN_READ", -// } -// ] -// }, -// { -// "service": "fooservice.googleapis.com" -// "audit_log_configs": [ -// { -// "log_type": "DATA_READ", -// }, -// { -// "log_type": "DATA_WRITE", -// "exempted_members": [ -// "user:bar@gmail.com" -// ] -// } -// ] -// } -// ] -// } -// -// For fooservice, this policy enables DATA_READ, DATA_WRITE and -// ADMIN_READ -// logging. It also exempts foo@gmail.com from DATA_READ logging, -// and -// bar@gmail.com from DATA_WRITE logging. -type AuditConfig struct { - // AuditLogConfigs: The configuration for logging of each type of - // permission. - // Next ID: 4 - AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` - - ExemptedMembers []string `json:"exemptedMembers,omitempty"` - - // Service: Specifies a service that will be enabled for audit - // logging. - // For example, `storage.googleapis.com`, - // `cloudsql.googleapis.com`. - // `allServices` is a special value that covers all services. - Service string `json:"service,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AuditLogConfigs") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AuditConfig) MarshalJSON() ([]byte, error) { - type noMethod AuditConfig - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AuditLogConfig: Provides the configuration for logging a type of -// permissions. -// Example: -// -// { -// "audit_log_configs": [ -// { -// "log_type": "DATA_READ", -// "exempted_members": [ -// "user:foo@gmail.com" -// ] -// }, -// { -// "log_type": "DATA_WRITE", -// } -// ] -// } -// -// This enables 'DATA_READ' and 'DATA_WRITE' logging, while -// exempting -// foo@gmail.com from DATA_READ logging. -type AuditLogConfig struct { - // ExemptedMembers: Specifies the identities that do not cause logging - // for this type of - // permission. - // Follows the same format of Binding.members. - ExemptedMembers []string `json:"exemptedMembers,omitempty"` - - // LogType: The log type that this config enables. - // - // Possible values: - // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. - // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy - // "DATA_WRITE" - Data writes. Example: CloudSQL Users create - // "DATA_READ" - Data reads. Example: CloudSQL Users list - LogType string `json:"logType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ExemptedMembers") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { - type noMethod AuditLogConfig - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Binding: Associates `members` with a `role`. -type Binding struct { - // Condition: The condition that is associated with this binding. - // NOTE: an unsatisfied condition will not allow user access via - // current - // binding. Different bindings, including their conditions, are - // examined - // independently. - // This field is GOOGLE_INTERNAL. - Condition *Expr `json:"condition,omitempty"` - - // Members: Specifies the identities requesting access for a Cloud - // Platform resource. - // `members` can have the following values: - // - // * `allUsers`: A special identifier that represents anyone who is - // on the internet; with or without a Google account. - // - // * `allAuthenticatedUsers`: A special identifier that represents - // anyone - // who is authenticated with a Google account or a service - // account. - // - // * `user:{emailid}`: An email address that represents a specific - // Google - // account. For example, `alice@gmail.com` or `joe@example.com`. - // - // - // * `serviceAccount:{emailid}`: An email address that represents a - // service - // account. For example, - // `my-other-app@appspot.gserviceaccount.com`. - // - // * `group:{emailid}`: An email address that represents a Google - // group. - // For example, `admins@example.com`. - // - // - // * `domain:{domain}`: A Google Apps domain name that represents all - // the - // users of that domain. For example, `google.com` or - // `example.com`. - // - // - Members []string `json:"members,omitempty"` - - // Role: Role that is assigned to `members`. - // For example, `roles/viewer`, `roles/editor`, or - // `roles/owner`. - // Required - Role string `json:"role,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Condition") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Condition") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Binding) MarshalJSON() ([]byte, error) { - type noMethod Binding - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CloudAuditOptions: Write a Cloud Audit log -type CloudAuditOptions struct { - // LogName: The log_name to populate in the Cloud Audit Record. - // - // Possible values: - // "UNSPECIFIED_LOG_NAME" - Default. Should not be used. - // "ADMIN_ACTIVITY" - Corresponds to - // "cloudaudit.googleapis.com/activity" - // "DATA_ACCESS" - Corresponds to - // "cloudaudit.googleapis.com/data_access" - LogName string `json:"logName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LogName") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "LogName") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CloudAuditOptions) MarshalJSON() ([]byte, error) { - type noMethod CloudAuditOptions - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Condition: A condition to be met. -type Condition struct { - // Iam: Trusted attributes supplied by the IAM system. - // - // Possible values: - // "NO_ATTR" - Default non-attribute. - // "AUTHORITY" - Either principal or (if present) authority selector. - // "ATTRIBUTION" - The principal (even if an authority selector is - // present), which - // must only be used for attribution, not authorization. - // "APPROVER" - An approver (distinct from the requester) that has - // authorized this - // request. - // When used with IN, the condition indicates that one of the - // approvers - // associated with the request matches the specified principal, or is - // a - // member of the specified group. Approvers can only grant - // additional - // access, and are thus only used in a strictly positive context - // (e.g. ALLOW/IN or DENY/NOT_IN). - // "JUSTIFICATION_TYPE" - What types of justifications have been - // supplied with this request. - // String values should match enum names from - // tech.iam.JustificationType, - // e.g. "MANUAL_STRING". It is not permitted to grant access based - // on - // the *absence* of a justification, so justification conditions can - // only - // be used in a "positive" context (e.g., ALLOW/IN or - // DENY/NOT_IN). - // - // Multiple justifications, e.g., a Buganizer ID and a - // manually-entered - // reason, are normal and supported. - Iam string `json:"iam,omitempty"` - - // Op: An operator to apply the subject with. - // - // Possible values: - // "NO_OP" - Default no-op. - // "EQUALS" - DEPRECATED. Use IN instead. - // "NOT_EQUALS" - DEPRECATED. Use NOT_IN instead. - // "IN" - The condition is true if the subject (or any element of it - // if it is - // a set) matches any of the supplied values. - // "NOT_IN" - The condition is true if the subject (or every element - // of it if it is - // a set) matches none of the supplied values. - // "DISCHARGED" - Subject is discharged - Op string `json:"op,omitempty"` - - // Svc: Trusted attributes discharged by the service. - Svc string `json:"svc,omitempty"` - - // Sys: Trusted attributes supplied by any service that owns resources - // and uses - // the IAM system for access control. - // - // Possible values: - // "NO_ATTR" - Default non-attribute type - // "REGION" - Region of the resource - // "SERVICE" - Service name - // "NAME" - Resource name - // "IP" - IP address of the caller - Sys string `json:"sys,omitempty"` - - // Value: DEPRECATED. Use 'values' instead. - Value string `json:"value,omitempty"` - - // Values: The objects of the condition. This is mutually exclusive with - // 'value'. - Values []string `json:"values,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Iam") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Iam") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Condition) MarshalJSON() ([]byte, error) { - type noMethod Condition - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CounterOptions: Options for counters -type CounterOptions struct { - // Field: The field value to attribute. - Field string `json:"field,omitempty"` - - // Metric: The metric to update. - Metric string `json:"metric,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Field") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Field") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CounterOptions) MarshalJSON() ([]byte, error) { - type noMethod CounterOptions - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CryptoKey: A CryptoKey represents a logical key that can be used for -// cryptographic -// operations. -// -// A CryptoKey is made up of one or more versions, which -// represent the actual key material used in cryptographic operations. -type CryptoKey struct { - // CreateTime: Output only. The time at which this CryptoKey was - // created. - CreateTime string `json:"createTime,omitempty"` - - // Name: Output only. The resource name for this CryptoKey in the - // format - // `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - Name string `json:"name,omitempty"` - - // NextRotationTime: At next_rotation_time, the Key Management Service - // will automatically: - // - // 1. Create a new version of this CryptoKey. - // 2. Mark the new version as primary. - // - // Key rotations performed manually via - // CreateCryptoKeyVersion and - // UpdateCryptoKeyPrimaryVersion - // do not affect next_rotation_time. - NextRotationTime string `json:"nextRotationTime,omitempty"` - - // Primary: Output only. A copy of the "primary" CryptoKeyVersion that - // will be used - // by Encrypt when this CryptoKey is given - // in EncryptRequest.name. - // - // The CryptoKey's primary version can be updated - // via - // UpdateCryptoKeyPrimaryVersion. - Primary *CryptoKeyVersion `json:"primary,omitempty"` - - // Purpose: The immutable purpose of this CryptoKey. Currently, the only - // acceptable - // purpose is ENCRYPT_DECRYPT. - // - // Possible values: - // "CRYPTO_KEY_PURPOSE_UNSPECIFIED" - Not specified. - // "ENCRYPT_DECRYPT" - CryptoKeys with this purpose may be used - // with - // Encrypt and - // Decrypt. - Purpose string `json:"purpose,omitempty"` - - // RotationPeriod: next_rotation_time will be advanced by this period - // when the service - // automatically rotates a key. Must be at least one day. - // - // If rotation_period is set, next_rotation_time must also be set. - RotationPeriod string `json:"rotationPeriod,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreateTime") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreateTime") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CryptoKey) MarshalJSON() ([]byte, error) { - type noMethod CryptoKey - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CryptoKeyVersion: A CryptoKeyVersion represents an individual -// cryptographic key, and the -// associated key material. -// -// It can be used for cryptographic operations either directly, or via -// its -// parent CryptoKey, in which case the server will choose the -// appropriate -// version for the operation. -type CryptoKeyVersion struct { - // CreateTime: Output only. The time at which this CryptoKeyVersion was - // created. - CreateTime string `json:"createTime,omitempty"` - - // DestroyEventTime: Output only. The time this CryptoKeyVersion's key - // material was - // destroyed. Only present if state is - // DESTROYED. - DestroyEventTime string `json:"destroyEventTime,omitempty"` - - // DestroyTime: Output only. The time this CryptoKeyVersion's key - // material is scheduled - // for destruction. Only present if state is - // DESTROY_SCHEDULED. - DestroyTime string `json:"destroyTime,omitempty"` - - // Name: Output only. The resource name for this CryptoKeyVersion in the - // format - // `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersio - // ns/*`. - Name string `json:"name,omitempty"` - - // State: The current state of the CryptoKeyVersion. - // - // Possible values: - // "CRYPTO_KEY_VERSION_STATE_UNSPECIFIED" - Not specified. - // "ENABLED" - This version may be used in Encrypt and - // Decrypt requests. - // "DISABLED" - This version may not be used, but the key material is - // still available, - // and the version can be placed back into the ENABLED state. - // "DESTROYED" - This version is destroyed, and the key material is no - // longer stored. - // A version may not leave this state once entered. - // "DESTROY_SCHEDULED" - This version is scheduled for destruction, - // and will be destroyed soon. - // Call - // RestoreCryptoKeyVersion - // to put it back into the DISABLED state. - State string `json:"state,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreateTime") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreateTime") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CryptoKeyVersion) MarshalJSON() ([]byte, error) { - type noMethod CryptoKeyVersion - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DataAccessOptions: Write a Data Access (Gin) log -type DataAccessOptions struct { -} - -// DecryptRequest: Request message for KeyManagementService.Decrypt. -type DecryptRequest struct { - // AdditionalAuthenticatedData: Optional data that must match the data - // originally supplied in - // EncryptRequest.additional_authenticated_data. - AdditionalAuthenticatedData string `json:"additionalAuthenticatedData,omitempty"` - - // Ciphertext: Required. The encrypted data originally returned - // in - // EncryptResponse.ciphertext. - Ciphertext string `json:"ciphertext,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "AdditionalAuthenticatedData") to unconditionally include in API - // requests. By default, fields with empty values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. - // "AdditionalAuthenticatedData") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DecryptRequest) MarshalJSON() ([]byte, error) { - type noMethod DecryptRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DecryptResponse: Response message for KeyManagementService.Decrypt. -type DecryptResponse struct { - // Plaintext: The decrypted data originally supplied in - // EncryptRequest.plaintext. - Plaintext string `json:"plaintext,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Plaintext") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Plaintext") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DecryptResponse) MarshalJSON() ([]byte, error) { - type noMethod DecryptResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DestroyCryptoKeyVersionRequest: Request message for -// KeyManagementService.DestroyCryptoKeyVersion. -type DestroyCryptoKeyVersionRequest struct { -} - -// EncryptRequest: Request message for KeyManagementService.Encrypt. -type EncryptRequest struct { - // AdditionalAuthenticatedData: Optional data that, if specified, must - // also be provided during decryption - // through DecryptRequest.additional_authenticated_data. Must be - // no - // larger than 64KiB. - AdditionalAuthenticatedData string `json:"additionalAuthenticatedData,omitempty"` - - // Plaintext: Required. The data to encrypt. Must be no larger than - // 64KiB. - Plaintext string `json:"plaintext,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "AdditionalAuthenticatedData") to unconditionally include in API - // requests. By default, fields with empty values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. - // "AdditionalAuthenticatedData") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *EncryptRequest) MarshalJSON() ([]byte, error) { - type noMethod EncryptRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// EncryptResponse: Response message for KeyManagementService.Encrypt. -type EncryptResponse struct { - // Ciphertext: The encrypted data. - Ciphertext string `json:"ciphertext,omitempty"` - - // Name: The resource name of the CryptoKeyVersion used in encryption. - Name string `json:"name,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Ciphertext") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Ciphertext") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *EncryptResponse) MarshalJSON() ([]byte, error) { - type noMethod EncryptResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Expr: Represents an expression text. Example: -// -// title: "User account presence" -// description: "Determines whether the request has a user account" -// expression: "size(request.user) > 0" -type Expr struct { - // Description: An optional description of the expression. This is a - // longer text which - // describes the expression, e.g. when hovered over it in a UI. - Description string `json:"description,omitempty"` - - // Expression: Textual representation of an expression in - // Common Expression Language syntax. - // - // The application context of the containing message determines - // which - // well-known feature set of CEL is supported. - Expression string `json:"expression,omitempty"` - - // Location: An optional string indicating the location of the - // expression for error - // reporting, e.g. a file name and a position in the file. - Location string `json:"location,omitempty"` - - // Title: An optional title for the expression, i.e. a short string - // describing - // its purpose. This can be used e.g. in UIs which allow to enter - // the - // expression. - Title string `json:"title,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Expr) MarshalJSON() ([]byte, error) { - type noMethod Expr - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// KeyRing: A KeyRing is a toplevel logical grouping of CryptoKeys. -type KeyRing struct { - // CreateTime: Output only. The time at which this KeyRing was created. - CreateTime string `json:"createTime,omitempty"` - - // Name: Output only. The resource name for the KeyRing in the - // format - // `projects/*/locations/*/keyRings/*`. - Name string `json:"name,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreateTime") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreateTime") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *KeyRing) MarshalJSON() ([]byte, error) { - type noMethod KeyRing - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListCryptoKeyVersionsResponse: Response message for -// KeyManagementService.ListCryptoKeyVersions. -type ListCryptoKeyVersionsResponse struct { - // CryptoKeyVersions: The list of CryptoKeyVersions. - CryptoKeyVersions []*CryptoKeyVersion `json:"cryptoKeyVersions,omitempty"` - - // NextPageToken: A token to retrieve next page of results. Pass this - // value in - // ListCryptoKeyVersionsRequest.page_token to retrieve the next page - // of - // results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // TotalSize: The total number of CryptoKeyVersions that matched - // the - // query. - TotalSize int64 `json:"totalSize,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CryptoKeyVersions") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CryptoKeyVersions") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ListCryptoKeyVersionsResponse) MarshalJSON() ([]byte, error) { - type noMethod ListCryptoKeyVersionsResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListCryptoKeysResponse: Response message for -// KeyManagementService.ListCryptoKeys. -type ListCryptoKeysResponse struct { - // CryptoKeys: The list of CryptoKeys. - CryptoKeys []*CryptoKey `json:"cryptoKeys,omitempty"` - - // NextPageToken: A token to retrieve next page of results. Pass this - // value in - // ListCryptoKeysRequest.page_token to retrieve the next page of - // results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // TotalSize: The total number of CryptoKeys that matched the query. - TotalSize int64 `json:"totalSize,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CryptoKeys") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CryptoKeys") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ListCryptoKeysResponse) MarshalJSON() ([]byte, error) { - type noMethod ListCryptoKeysResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListKeyRingsResponse: Response message for -// KeyManagementService.ListKeyRings. -type ListKeyRingsResponse struct { - // KeyRings: The list of KeyRings. - KeyRings []*KeyRing `json:"keyRings,omitempty"` - - // NextPageToken: A token to retrieve next page of results. Pass this - // value in - // ListKeyRingsRequest.page_token to retrieve the next page of results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // TotalSize: The total number of KeyRings that matched the query. - TotalSize int64 `json:"totalSize,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "KeyRings") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "KeyRings") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ListKeyRingsResponse) MarshalJSON() ([]byte, error) { - type noMethod ListKeyRingsResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListLocationsResponse: The response message for -// Locations.ListLocations. -type ListLocationsResponse struct { - // Locations: A list of locations that matches the specified filter in - // the request. - Locations []*Location `json:"locations,omitempty"` - - // NextPageToken: The standard List next-page token. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Locations") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Locations") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { - type noMethod ListLocationsResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Location: A resource that represents Google Cloud Platform location. -type Location struct { - // Labels: Cross-service attributes for the location. For example - // - // {"cloud.googleapis.com/region": "us-east1"} - Labels map[string]string `json:"labels,omitempty"` - - // LocationId: The canonical id for this location. For example: - // "us-east1". - LocationId string `json:"locationId,omitempty"` - - // Metadata: Service-specific metadata. For example the available - // capacity at the given - // location. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` - - // Name: Resource name for the location, which may vary between - // implementations. - // For example: "projects/example-project/locations/us-east1" - Name string `json:"name,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Labels") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Labels") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Location) MarshalJSON() ([]byte, error) { - type noMethod Location - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// LogConfig: Specifies what kind of log the caller must write -// Increment a streamz counter with the specified metric and field -// names. -// -// Metric names should start with a '/', generally be -// lowercase-only, -// and end in "_count". Field names should not contain an initial -// slash. -// The actual exported metric names will have "/iam/policy" -// prepended. -// -// Field names correspond to IAM request parameters and field values -// are -// their respective values. -// -// At present the only supported field names are -// - "iam_principal", corresponding to IAMContext.principal; -// - "" (empty string), resulting in one aggretated counter with no -// field. -// -// Examples: -// counter { metric: "/debug_access_count" field: "iam_principal" } -// ==> increment counter /iam/policy/backend_debug_access_count -// {iam_principal=[value of -// IAMContext.principal]} -// -// At this time we do not support: -// * multiple field names (though this may be supported in the future) -// * decrementing the counter -// * incrementing it by anything other than 1 -type LogConfig struct { - // CloudAudit: Cloud audit options. - CloudAudit *CloudAuditOptions `json:"cloudAudit,omitempty"` - - // Counter: Counter options. - Counter *CounterOptions `json:"counter,omitempty"` - - // DataAccess: Data access options. - DataAccess *DataAccessOptions `json:"dataAccess,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CloudAudit") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CloudAudit") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *LogConfig) MarshalJSON() ([]byte, error) { - type noMethod LogConfig - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Policy: Defines an Identity and Access Management (IAM) policy. It is -// used to -// specify access control policies for Cloud Platform resources. -// -// -// A `Policy` consists of a list of `bindings`. A `Binding` binds a list -// of -// `members` to a `role`, where the members can be user accounts, Google -// groups, -// Google domains, and service accounts. A `role` is a named list of -// permissions -// defined by IAM. -// -// **Example** -// -// { -// "bindings": [ -// { -// "role": "roles/owner", -// "members": [ -// "user:mike@example.com", -// "group:admins@example.com", -// "domain:google.com", -// -// "serviceAccount:my-other-app@appspot.gserviceaccount.com", -// ] -// }, -// { -// "role": "roles/viewer", -// "members": ["user:sean@example.com"] -// } -// ] -// } -// -// For a description of IAM and its features, see the -// [IAM developer's guide](https://cloud.google.com/iam). -type Policy struct { - // AuditConfigs: Specifies cloud audit logging configuration for this - // policy. - AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` - - // Bindings: Associates a list of `members` to a `role`. - // `bindings` with no members will result in an error. - Bindings []*Binding `json:"bindings,omitempty"` - - // Etag: `etag` is used for optimistic concurrency control as a way to - // help - // prevent simultaneous updates of a policy from overwriting each - // other. - // It is strongly suggested that systems make use of the `etag` in - // the - // read-modify-write cycle to perform policy updates in order to avoid - // race - // conditions: An `etag` is returned in the response to `getIamPolicy`, - // and - // systems are expected to put that etag in the request to - // `setIamPolicy` to - // ensure that their change will be applied to the same version of the - // policy. - // - // If no `etag` is provided in the call to `setIamPolicy`, then the - // existing - // policy is overwritten blindly. - Etag string `json:"etag,omitempty"` - - IamOwned bool `json:"iamOwned,omitempty"` - - // Rules: If more than one rule is specified, the rules are applied in - // the following - // manner: - // - All matching LOG rules are always applied. - // - If any DENY/DENY_WITH_LOG rule matches, permission is denied. - // Logging will be applied if one or more matching rule requires - // logging. - // - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is - // granted. - // Logging will be applied if one or more matching rule requires - // logging. - // - Otherwise, if no rule applies, permission is denied. - Rules []*Rule `json:"rules,omitempty"` - - // Version: Version of the `Policy`. The default version is 0. - Version int64 `json:"version,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "AuditConfigs") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AuditConfigs") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Policy) MarshalJSON() ([]byte, error) { - type noMethod Policy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RestoreCryptoKeyVersionRequest: Request message for -// KeyManagementService.RestoreCryptoKeyVersion. -type RestoreCryptoKeyVersionRequest struct { -} - -// Rule: A rule to be applied in a Policy. -type Rule struct { - // Action: Required - // - // Possible values: - // "NO_ACTION" - Default no action. - // "ALLOW" - Matching 'Entries' grant access. - // "ALLOW_WITH_LOG" - Matching 'Entries' grant access and the caller - // promises to log - // the request per the returned log_configs. - // "DENY" - Matching 'Entries' deny access. - // "DENY_WITH_LOG" - Matching 'Entries' deny access and the caller - // promises to log - // the request per the returned log_configs. - // "LOG" - Matching 'Entries' tell IAM.Check callers to generate logs. - Action string `json:"action,omitempty"` - - // Conditions: Additional restrictions that must be met - Conditions []*Condition `json:"conditions,omitempty"` - - // Description: Human-readable description of the rule. - Description string `json:"description,omitempty"` - - // In: If one or more 'in' clauses are specified, the rule matches - // if - // the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. - In []string `json:"in,omitempty"` - - // LogConfig: The config returned to callers of tech.iam.IAM.CheckPolicy - // for any entries - // that match the LOG action. - LogConfig []*LogConfig `json:"logConfig,omitempty"` - - // NotIn: If one or more 'not_in' clauses are specified, the rule - // matches - // if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. - // The format for in and not_in entries is the same as for members in - // a - // Binding (see google/iam/v1/policy.proto). - NotIn []string `json:"notIn,omitempty"` - - // Permissions: A permission is a string of form '<service>.<resource - // type>.<verb>' - // (e.g., 'storage.buckets.list'). A value of '*' matches all - // permissions, - // and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. - Permissions []string `json:"permissions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Action") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Rule) MarshalJSON() ([]byte, error) { - type noMethod Rule - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SetIamPolicyRequest: Request message for `SetIamPolicy` method. -type SetIamPolicyRequest struct { - // Policy: REQUIRED: The complete policy to be applied to the - // `resource`. The size of - // the policy is limited to a few 10s of KB. An empty policy is a - // valid policy but certain Cloud Platform services (such as - // Projects) - // might reject them. - Policy *Policy `json:"policy,omitempty"` - - // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the - // policy to modify. Only - // the fields in the mask will be modified. If no mask is provided, - // the - // following default mask is used: - // paths: "bindings, etag" - // This field is only used by Cloud IAM. - UpdateMask string `json:"updateMask,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Policy") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Policy") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { - type noMethod SetIamPolicyRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TestIamPermissionsRequest: Request message for `TestIamPermissions` -// method. -type TestIamPermissionsRequest struct { - // Permissions: The set of permissions to check for the `resource`. - // Permissions with - // wildcards (such as '*' or 'storage.*') are not allowed. For - // more - // information see - // [IAM - // Overview](https://cloud.google.com/iam/docs/overview#permissions). - Permissions []string `json:"permissions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Permissions") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Permissions") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { - type noMethod TestIamPermissionsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TestIamPermissionsResponse: Response message for `TestIamPermissions` -// method. -type TestIamPermissionsResponse struct { - // Permissions: A subset of `TestPermissionsRequest.permissions` that - // the caller is - // allowed. - Permissions []string `json:"permissions,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Permissions") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Permissions") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { - type noMethod TestIamPermissionsResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// UpdateCryptoKeyPrimaryVersionRequest: Request message for -// KeyManagementService.UpdateCryptoKeyPrimaryVersion. -type UpdateCryptoKeyPrimaryVersionRequest struct { - // CryptoKeyVersionId: The id of the child CryptoKeyVersion to use as - // primary. - CryptoKeyVersionId string `json:"cryptoKeyVersionId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CryptoKeyVersionId") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CryptoKeyVersionId") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *UpdateCryptoKeyPrimaryVersionRequest) MarshalJSON() ([]byte, error) { - type noMethod UpdateCryptoKeyPrimaryVersionRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// method id "cloudkms.projects.locations.get": - -type ProjectsLocationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Get information about a location. -func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { - c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudkms.projects.locations.get" call. -// Exactly one of *Location or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Location.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Location{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Get information about a location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", - // "httpMethod": "GET", - // "id": "cloudkms.projects.locations.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Resource name for the location.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "Location" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "cloudkms.projects.locations.list": - -type ProjectsLocationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists information about the supported locations for this -// service. -func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { - c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudkms.projects.locations.list" call. -// Exactly one of *ListLocationsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListLocationsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ListLocationsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists information about the supported locations for this service.", - // "flatPath": "v1/projects/{projectsId}/locations", - // "httpMethod": "GET", - // "id": "cloudkms.projects.locations.list", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The resource that owns the locations collection, if applicable.", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1/{+name}/locations", - // "response": { - // "$ref": "ListLocationsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "cloudkms.projects.locations.keyRings.create": - -type ProjectsLocationsKeyRingsCreateCall struct { - s *Service - parent string - keyring *KeyRing - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Create a new KeyRing in a given Project and Location. -func (r *ProjectsLocationsKeyRingsService) Create(parent string, keyring *KeyRing) *ProjectsLocationsKeyRingsCreateCall { - c := &ProjectsLocationsKeyRingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.keyring = keyring - return c -} - -// KeyRingId sets the optional parameter "keyRingId": Required. It must -// be unique within a location and match the regular -// expression `[a-zA-Z0-9_-]{1,63}` -func (c *ProjectsLocationsKeyRingsCreateCall) KeyRingId(keyRingId string) *ProjectsLocationsKeyRingsCreateCall { - c.urlParams_.Set("keyRingId", keyRingId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsKeyRingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsKeyRingsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsKeyRingsCreateCall) Context(ctx context.Context) *ProjectsLocationsKeyRingsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsKeyRingsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsKeyRingsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.keyring) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/keyRings") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudkms.projects.locations.keyRings.create" call. -// Exactly one of *KeyRing or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *KeyRing.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsKeyRingsCreateCall) Do(opts ...googleapi.CallOption) (*KeyRing, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &KeyRing{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Create a new KeyRing in a given Project and Location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings", - // "httpMethod": "POST", - // "id": "cloudkms.projects.locations.keyRings.create", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "keyRingId": { - // "description": "Required. It must be unique within a location and match the regular\nexpression `[a-zA-Z0-9_-]{1,63}`", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The resource name of the location associated with the\nKeyRings, in the format `projects/*/locations/*`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+parent}/keyRings", - // "request": { - // "$ref": "KeyRing" - // }, - // "response": { - // "$ref": "KeyRing" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "cloudkms.projects.locations.keyRings.get": - -type ProjectsLocationsKeyRingsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns metadata for a given KeyRing. -func (r *ProjectsLocationsKeyRingsService) Get(name string) *ProjectsLocationsKeyRingsGetCall { - c := &ProjectsLocationsKeyRingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsKeyRingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsKeyRingsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsKeyRingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsKeyRingsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsKeyRingsGetCall) Context(ctx context.Context) *ProjectsLocationsKeyRingsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsKeyRingsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsKeyRingsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudkms.projects.locations.keyRings.get" call. -// Exactly one of *KeyRing or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *KeyRing.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsKeyRingsGetCall) Do(opts ...googleapi.CallOption) (*KeyRing, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &KeyRing{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns metadata for a given KeyRing.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}", - // "httpMethod": "GET", - // "id": "cloudkms.projects.locations.keyRings.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the KeyRing to get.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "KeyRing" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "cloudkms.projects.locations.keyRings.getIamPolicy": - -type ProjectsLocationsKeyRingsGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. -// Returns an empty policy if the resource exists and does not have a -// policy -// set. -func (r *ProjectsLocationsKeyRingsService) GetIamPolicy(resource string) *ProjectsLocationsKeyRingsGetIamPolicyCall { - c := &ProjectsLocationsKeyRingsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsKeyRingsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsKeyRingsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsKeyRingsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsKeyRingsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsKeyRingsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsKeyRingsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsKeyRingsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsKeyRingsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudkms.projects.locations.keyRings.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsKeyRingsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}:getIamPolicy", - // "httpMethod": "GET", - // "id": "cloudkms.projects.locations.keyRings.getIamPolicy", - // "parameterOrder": [ - // "resource" - // ], - // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+resource}:getIamPolicy", - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "cloudkms.projects.locations.keyRings.list": - -type ProjectsLocationsKeyRingsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists KeyRings. -func (r *ProjectsLocationsKeyRingsService) List(parent string) *ProjectsLocationsKeyRingsListCall { - c := &ProjectsLocationsKeyRingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Optional limit on -// the number of KeyRings to include in the -// response. Further KeyRings can subsequently be obtained by -// including the ListKeyRingsResponse.next_page_token in a -// subsequent -// request. If unspecified, the server will pick an appropriate -// default. -func (c *ProjectsLocationsKeyRingsListCall) PageSize(pageSize int64) *ProjectsLocationsKeyRingsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Optional -// pagination token, returned earlier -// via -// ListKeyRingsResponse.next_page_token. -func (c *ProjectsLocationsKeyRingsListCall) PageToken(pageToken string) *ProjectsLocationsKeyRingsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsKeyRingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsKeyRingsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsKeyRingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsKeyRingsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsKeyRingsListCall) Context(ctx context.Context) *ProjectsLocationsKeyRingsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsKeyRingsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsKeyRingsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/keyRings") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudkms.projects.locations.keyRings.list" call. -// Exactly one of *ListKeyRingsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListKeyRingsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsKeyRingsListCall) Do(opts ...googleapi.CallOption) (*ListKeyRingsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ListKeyRingsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists KeyRings.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings", - // "httpMethod": "GET", - // "id": "cloudkms.projects.locations.keyRings.list", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "pageSize": { - // "description": "Optional limit on the number of KeyRings to include in the\nresponse. Further KeyRings can subsequently be obtained by\nincluding the ListKeyRingsResponse.next_page_token in a subsequent\nrequest. If unspecified, the server will pick an appropriate default.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional pagination token, returned earlier via\nListKeyRingsResponse.next_page_token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The resource name of the location associated with the\nKeyRings, in the format `projects/*/locations/*`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+parent}/keyRings", - // "response": { - // "$ref": "ListKeyRingsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsKeyRingsListCall) Pages(ctx context.Context, f func(*ListKeyRingsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "cloudkms.projects.locations.keyRings.setIamPolicy": - -type ProjectsLocationsKeyRingsSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any -// existing policy. -func (r *ProjectsLocationsKeyRingsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsKeyRingsSetIamPolicyCall { - c := &ProjectsLocationsKeyRingsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setiampolicyrequest = setiampolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsKeyRingsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsKeyRingsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsKeyRingsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsKeyRingsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsKeyRingsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsKeyRingsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudkms.projects.locations.keyRings.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsKeyRingsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "cloudkms.projects.locations.keyRings.setIamPolicy", - // "parameterOrder": [ - // "resource" - // ], - // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+resource}:setIamPolicy", - // "request": { - // "$ref": "SetIamPolicyRequest" - // }, - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "cloudkms.projects.locations.keyRings.testIamPermissions": - -type ProjectsLocationsKeyRingsTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -// If the resource does not exist, this will return an empty set -// of -// permissions, not a NOT_FOUND error. -// -// Note: This operation is designed to be used for building -// permission-aware -// UIs and command-line tools, not for authorization checking. This -// operation -// may "fail open" without warning. -func (r *ProjectsLocationsKeyRingsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsKeyRingsTestIamPermissionsCall { - c := &ProjectsLocationsKeyRingsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testiampermissionsrequest = testiampermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsKeyRingsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsKeyRingsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsKeyRingsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsKeyRingsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsKeyRingsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsKeyRingsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudkms.projects.locations.keyRings.testIamPermissions" call. -// Exactly one of *TestIamPermissionsResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *TestIamPermissionsResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsKeyRingsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestIamPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "cloudkms.projects.locations.keyRings.testIamPermissions", - // "parameterOrder": [ - // "resource" - // ], - // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+resource}:testIamPermissions", - // "request": { - // "$ref": "TestIamPermissionsRequest" - // }, - // "response": { - // "$ref": "TestIamPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "cloudkms.projects.locations.keyRings.cryptoKeys.create": - -type ProjectsLocationsKeyRingsCryptoKeysCreateCall struct { - s *Service - parent string - cryptokey *CryptoKey - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Create a new CryptoKey within a KeyRing. -// -// CryptoKey.purpose is required. -func (r *ProjectsLocationsKeyRingsCryptoKeysService) Create(parent string, cryptokey *CryptoKey) *ProjectsLocationsKeyRingsCryptoKeysCreateCall { - c := &ProjectsLocationsKeyRingsCryptoKeysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.cryptokey = cryptokey - return c -} - -// CryptoKeyId sets the optional parameter "cryptoKeyId": Required. It -// must be unique within a KeyRing and match the regular -// expression `[a-zA-Z0-9_-]{1,63}` -func (c *ProjectsLocationsKeyRingsCryptoKeysCreateCall) CryptoKeyId(cryptoKeyId string) *ProjectsLocationsKeyRingsCryptoKeysCreateCall { - c.urlParams_.Set("cryptoKeyId", cryptoKeyId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsKeyRingsCryptoKeysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsKeyRingsCryptoKeysCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsKeyRingsCryptoKeysCreateCall) Context(ctx context.Context) *ProjectsLocationsKeyRingsCryptoKeysCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsKeyRingsCryptoKeysCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsKeyRingsCryptoKeysCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.cryptokey) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/cryptoKeys") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudkms.projects.locations.keyRings.cryptoKeys.create" call. -// Exactly one of *CryptoKey or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *CryptoKey.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsKeyRingsCryptoKeysCreateCall) Do(opts ...googleapi.CallOption) (*CryptoKey, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &CryptoKey{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Create a new CryptoKey within a KeyRing.\n\nCryptoKey.purpose is required.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys", - // "httpMethod": "POST", - // "id": "cloudkms.projects.locations.keyRings.cryptoKeys.create", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "cryptoKeyId": { - // "description": "Required. It must be unique within a KeyRing and match the regular\nexpression `[a-zA-Z0-9_-]{1,63}`", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The name of the KeyRing associated with the\nCryptoKeys.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+parent}/cryptoKeys", - // "request": { - // "$ref": "CryptoKey" - // }, - // "response": { - // "$ref": "CryptoKey" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "cloudkms.projects.locations.keyRings.cryptoKeys.decrypt": - -type ProjectsLocationsKeyRingsCryptoKeysDecryptCall struct { - s *Service - name string - decryptrequest *DecryptRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Decrypt: Decrypts data that was protected by Encrypt. -func (r *ProjectsLocationsKeyRingsCryptoKeysService) Decrypt(name string, decryptrequest *DecryptRequest) *ProjectsLocationsKeyRingsCryptoKeysDecryptCall { - c := &ProjectsLocationsKeyRingsCryptoKeysDecryptCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.decryptrequest = decryptrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsKeyRingsCryptoKeysDecryptCall) Fields(s ...googleapi.Field) *ProjectsLocationsKeyRingsCryptoKeysDecryptCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsKeyRingsCryptoKeysDecryptCall) Context(ctx context.Context) *ProjectsLocationsKeyRingsCryptoKeysDecryptCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsKeyRingsCryptoKeysDecryptCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsKeyRingsCryptoKeysDecryptCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.decryptrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:decrypt") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudkms.projects.locations.keyRings.cryptoKeys.decrypt" call. -// Exactly one of *DecryptResponse or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *DecryptResponse.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsKeyRingsCryptoKeysDecryptCall) Do(opts ...googleapi.CallOption) (*DecryptResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &DecryptResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Decrypts data that was protected by Encrypt.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:decrypt", - // "httpMethod": "POST", - // "id": "cloudkms.projects.locations.keyRings.cryptoKeys.decrypt", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The resource name of the CryptoKey to use for decryption.\nThe server will choose the appropriate version.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}:decrypt", - // "request": { - // "$ref": "DecryptRequest" - // }, - // "response": { - // "$ref": "DecryptResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "cloudkms.projects.locations.keyRings.cryptoKeys.encrypt": - -type ProjectsLocationsKeyRingsCryptoKeysEncryptCall struct { - s *Service - name string - encryptrequest *EncryptRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Encrypt: Encrypts data, so that it can only be recovered by a call to -// Decrypt. -func (r *ProjectsLocationsKeyRingsCryptoKeysService) Encrypt(name string, encryptrequest *EncryptRequest) *ProjectsLocationsKeyRingsCryptoKeysEncryptCall { - c := &ProjectsLocationsKeyRingsCryptoKeysEncryptCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.encryptrequest = encryptrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsKeyRingsCryptoKeysEncryptCall) Fields(s ...googleapi.Field) *ProjectsLocationsKeyRingsCryptoKeysEncryptCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsKeyRingsCryptoKeysEncryptCall) Context(ctx context.Context) *ProjectsLocationsKeyRingsCryptoKeysEncryptCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsKeyRingsCryptoKeysEncryptCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsKeyRingsCryptoKeysEncryptCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.encryptrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:encrypt") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudkms.projects.locations.keyRings.cryptoKeys.encrypt" call. -// Exactly one of *EncryptResponse or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *EncryptResponse.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsKeyRingsCryptoKeysEncryptCall) Do(opts ...googleapi.CallOption) (*EncryptResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &EncryptResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Encrypts data, so that it can only be recovered by a call to Decrypt.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:encrypt", - // "httpMethod": "POST", - // "id": "cloudkms.projects.locations.keyRings.cryptoKeys.encrypt", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The resource name of the CryptoKey or CryptoKeyVersion\nto use for encryption.\n\nIf a CryptoKey is specified, the server will use its\nprimary version.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/.+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}:encrypt", - // "request": { - // "$ref": "EncryptRequest" - // }, - // "response": { - // "$ref": "EncryptResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "cloudkms.projects.locations.keyRings.cryptoKeys.get": - -type ProjectsLocationsKeyRingsCryptoKeysGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns metadata for a given CryptoKey, as well as its -// primary CryptoKeyVersion. -func (r *ProjectsLocationsKeyRingsCryptoKeysService) Get(name string) *ProjectsLocationsKeyRingsCryptoKeysGetCall { - c := &ProjectsLocationsKeyRingsCryptoKeysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsKeyRingsCryptoKeysGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsKeyRingsCryptoKeysGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsKeyRingsCryptoKeysGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsKeyRingsCryptoKeysGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsKeyRingsCryptoKeysGetCall) Context(ctx context.Context) *ProjectsLocationsKeyRingsCryptoKeysGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsKeyRingsCryptoKeysGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsKeyRingsCryptoKeysGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudkms.projects.locations.keyRings.cryptoKeys.get" call. -// Exactly one of *CryptoKey or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *CryptoKey.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsKeyRingsCryptoKeysGetCall) Do(opts ...googleapi.CallOption) (*CryptoKey, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &CryptoKey{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns metadata for a given CryptoKey, as well as its\nprimary CryptoKeyVersion.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}", - // "httpMethod": "GET", - // "id": "cloudkms.projects.locations.keyRings.cryptoKeys.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the CryptoKey to get.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "CryptoKey" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "cloudkms.projects.locations.keyRings.cryptoKeys.getIamPolicy": - -type ProjectsLocationsKeyRingsCryptoKeysGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. -// Returns an empty policy if the resource exists and does not have a -// policy -// set. -func (r *ProjectsLocationsKeyRingsCryptoKeysService) GetIamPolicy(resource string) *ProjectsLocationsKeyRingsCryptoKeysGetIamPolicyCall { - c := &ProjectsLocationsKeyRingsCryptoKeysGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsKeyRingsCryptoKeysGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsKeyRingsCryptoKeysGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsKeyRingsCryptoKeysGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsKeyRingsCryptoKeysGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsKeyRingsCryptoKeysGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsKeyRingsCryptoKeysGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsKeyRingsCryptoKeysGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsKeyRingsCryptoKeysGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudkms.projects.locations.keyRings.cryptoKeys.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsKeyRingsCryptoKeysGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:getIamPolicy", - // "httpMethod": "GET", - // "id": "cloudkms.projects.locations.keyRings.cryptoKeys.getIamPolicy", - // "parameterOrder": [ - // "resource" - // ], - // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+resource}:getIamPolicy", - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "cloudkms.projects.locations.keyRings.cryptoKeys.list": - -type ProjectsLocationsKeyRingsCryptoKeysListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists CryptoKeys. -func (r *ProjectsLocationsKeyRingsCryptoKeysService) List(parent string) *ProjectsLocationsKeyRingsCryptoKeysListCall { - c := &ProjectsLocationsKeyRingsCryptoKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Optional limit on -// the number of CryptoKeys to include in the -// response. Further CryptoKeys can subsequently be obtained -// by -// including the ListCryptoKeysResponse.next_page_token in a -// subsequent -// request. If unspecified, the server will pick an appropriate -// default. -func (c *ProjectsLocationsKeyRingsCryptoKeysListCall) PageSize(pageSize int64) *ProjectsLocationsKeyRingsCryptoKeysListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Optional -// pagination token, returned earlier -// via -// ListCryptoKeysResponse.next_page_token. -func (c *ProjectsLocationsKeyRingsCryptoKeysListCall) PageToken(pageToken string) *ProjectsLocationsKeyRingsCryptoKeysListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsKeyRingsCryptoKeysListCall) Fields(s ...googleapi.Field) *ProjectsLocationsKeyRingsCryptoKeysListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsKeyRingsCryptoKeysListCall) IfNoneMatch(entityTag string) *ProjectsLocationsKeyRingsCryptoKeysListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsKeyRingsCryptoKeysListCall) Context(ctx context.Context) *ProjectsLocationsKeyRingsCryptoKeysListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsKeyRingsCryptoKeysListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsKeyRingsCryptoKeysListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/cryptoKeys") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudkms.projects.locations.keyRings.cryptoKeys.list" call. -// Exactly one of *ListCryptoKeysResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListCryptoKeysResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsKeyRingsCryptoKeysListCall) Do(opts ...googleapi.CallOption) (*ListCryptoKeysResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ListCryptoKeysResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists CryptoKeys.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys", - // "httpMethod": "GET", - // "id": "cloudkms.projects.locations.keyRings.cryptoKeys.list", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "pageSize": { - // "description": "Optional limit on the number of CryptoKeys to include in the\nresponse. Further CryptoKeys can subsequently be obtained by\nincluding the ListCryptoKeysResponse.next_page_token in a subsequent\nrequest. If unspecified, the server will pick an appropriate default.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional pagination token, returned earlier via\nListCryptoKeysResponse.next_page_token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The resource name of the KeyRing to list, in the format\n`projects/*/locations/*/keyRings/*`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+parent}/cryptoKeys", - // "response": { - // "$ref": "ListCryptoKeysResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsKeyRingsCryptoKeysListCall) Pages(ctx context.Context, f func(*ListCryptoKeysResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "cloudkms.projects.locations.keyRings.cryptoKeys.patch": - -type ProjectsLocationsKeyRingsCryptoKeysPatchCall struct { - s *Service - name string - cryptokey *CryptoKey - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Update a CryptoKey. -func (r *ProjectsLocationsKeyRingsCryptoKeysService) Patch(name string, cryptokey *CryptoKey) *ProjectsLocationsKeyRingsCryptoKeysPatchCall { - c := &ProjectsLocationsKeyRingsCryptoKeysPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.cryptokey = cryptokey - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required list of -// fields to be updated in this request. -func (c *ProjectsLocationsKeyRingsCryptoKeysPatchCall) UpdateMask(updateMask string) *ProjectsLocationsKeyRingsCryptoKeysPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsKeyRingsCryptoKeysPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsKeyRingsCryptoKeysPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsKeyRingsCryptoKeysPatchCall) Context(ctx context.Context) *ProjectsLocationsKeyRingsCryptoKeysPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsKeyRingsCryptoKeysPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsKeyRingsCryptoKeysPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.cryptokey) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudkms.projects.locations.keyRings.cryptoKeys.patch" call. -// Exactly one of *CryptoKey or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *CryptoKey.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsKeyRingsCryptoKeysPatchCall) Do(opts ...googleapi.CallOption) (*CryptoKey, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &CryptoKey{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Update a CryptoKey.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}", - // "httpMethod": "PATCH", - // "id": "cloudkms.projects.locations.keyRings.cryptoKeys.patch", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Output only. The resource name for this CryptoKey in the format\n`projects/*/locations/*/keyRings/*/cryptoKeys/*`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "updateMask": { - // "description": "Required list of fields to be updated in this request.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "request": { - // "$ref": "CryptoKey" - // }, - // "response": { - // "$ref": "CryptoKey" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "cloudkms.projects.locations.keyRings.cryptoKeys.setIamPolicy": - -type ProjectsLocationsKeyRingsCryptoKeysSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any -// existing policy. -func (r *ProjectsLocationsKeyRingsCryptoKeysService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsKeyRingsCryptoKeysSetIamPolicyCall { - c := &ProjectsLocationsKeyRingsCryptoKeysSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setiampolicyrequest = setiampolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsKeyRingsCryptoKeysSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsKeyRingsCryptoKeysSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsKeyRingsCryptoKeysSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsKeyRingsCryptoKeysSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsKeyRingsCryptoKeysSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsKeyRingsCryptoKeysSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudkms.projects.locations.keyRings.cryptoKeys.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsKeyRingsCryptoKeysSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "cloudkms.projects.locations.keyRings.cryptoKeys.setIamPolicy", - // "parameterOrder": [ - // "resource" - // ], - // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+resource}:setIamPolicy", - // "request": { - // "$ref": "SetIamPolicyRequest" - // }, - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "cloudkms.projects.locations.keyRings.cryptoKeys.testIamPermissions": - -type ProjectsLocationsKeyRingsCryptoKeysTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -// If the resource does not exist, this will return an empty set -// of -// permissions, not a NOT_FOUND error. -// -// Note: This operation is designed to be used for building -// permission-aware -// UIs and command-line tools, not for authorization checking. This -// operation -// may "fail open" without warning. -func (r *ProjectsLocationsKeyRingsCryptoKeysService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsKeyRingsCryptoKeysTestIamPermissionsCall { - c := &ProjectsLocationsKeyRingsCryptoKeysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testiampermissionsrequest = testiampermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsKeyRingsCryptoKeysTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsKeyRingsCryptoKeysTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsKeyRingsCryptoKeysTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsKeyRingsCryptoKeysTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsKeyRingsCryptoKeysTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsKeyRingsCryptoKeysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudkms.projects.locations.keyRings.cryptoKeys.testIamPermissions" call. -// Exactly one of *TestIamPermissionsResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *TestIamPermissionsResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsKeyRingsCryptoKeysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestIamPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "cloudkms.projects.locations.keyRings.cryptoKeys.testIamPermissions", - // "parameterOrder": [ - // "resource" - // ], - // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+resource}:testIamPermissions", - // "request": { - // "$ref": "TestIamPermissionsRequest" - // }, - // "response": { - // "$ref": "TestIamPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "cloudkms.projects.locations.keyRings.cryptoKeys.updatePrimaryVersion": - -type ProjectsLocationsKeyRingsCryptoKeysUpdatePrimaryVersionCall struct { - s *Service - name string - updatecryptokeyprimaryversionrequest *UpdateCryptoKeyPrimaryVersionRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdatePrimaryVersion: Update the version of a CryptoKey that will be -// used in Encrypt -func (r *ProjectsLocationsKeyRingsCryptoKeysService) UpdatePrimaryVersion(name string, updatecryptokeyprimaryversionrequest *UpdateCryptoKeyPrimaryVersionRequest) *ProjectsLocationsKeyRingsCryptoKeysUpdatePrimaryVersionCall { - c := &ProjectsLocationsKeyRingsCryptoKeysUpdatePrimaryVersionCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.updatecryptokeyprimaryversionrequest = updatecryptokeyprimaryversionrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsKeyRingsCryptoKeysUpdatePrimaryVersionCall) Fields(s ...googleapi.Field) *ProjectsLocationsKeyRingsCryptoKeysUpdatePrimaryVersionCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsKeyRingsCryptoKeysUpdatePrimaryVersionCall) Context(ctx context.Context) *ProjectsLocationsKeyRingsCryptoKeysUpdatePrimaryVersionCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsKeyRingsCryptoKeysUpdatePrimaryVersionCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsKeyRingsCryptoKeysUpdatePrimaryVersionCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatecryptokeyprimaryversionrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:updatePrimaryVersion") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudkms.projects.locations.keyRings.cryptoKeys.updatePrimaryVersion" call. -// Exactly one of *CryptoKey or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *CryptoKey.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsKeyRingsCryptoKeysUpdatePrimaryVersionCall) Do(opts ...googleapi.CallOption) (*CryptoKey, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &CryptoKey{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Update the version of a CryptoKey that will be used in Encrypt", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:updatePrimaryVersion", - // "httpMethod": "POST", - // "id": "cloudkms.projects.locations.keyRings.cryptoKeys.updatePrimaryVersion", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The resource name of the CryptoKey to update.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}:updatePrimaryVersion", - // "request": { - // "$ref": "UpdateCryptoKeyPrimaryVersionRequest" - // }, - // "response": { - // "$ref": "CryptoKey" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.create": - -type ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsCreateCall struct { - s *Service - parent string - cryptokeyversion *CryptoKeyVersion - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Create a new CryptoKeyVersion in a CryptoKey. -// -// The server will assign the next sequential id. If unset, -// state will be set to -// ENABLED. -func (r *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsService) Create(parent string, cryptokeyversion *CryptoKeyVersion) *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsCreateCall { - c := &ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.cryptokeyversion = cryptokeyversion - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsCreateCall) Context(ctx context.Context) *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.cryptokeyversion) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/cryptoKeyVersions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.create" call. -// Exactly one of *CryptoKeyVersion or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *CryptoKeyVersion.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsCreateCall) Do(opts ...googleapi.CallOption) (*CryptoKeyVersion, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &CryptoKeyVersion{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Create a new CryptoKeyVersion in a CryptoKey.\n\nThe server will assign the next sequential id. If unset,\nstate will be set to\nENABLED.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions", - // "httpMethod": "POST", - // "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.create", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "Required. The name of the CryptoKey associated with\nthe CryptoKeyVersions.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+parent}/cryptoKeyVersions", - // "request": { - // "$ref": "CryptoKeyVersion" - // }, - // "response": { - // "$ref": "CryptoKeyVersion" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.destroy": - -type ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsDestroyCall struct { - s *Service - name string - destroycryptokeyversionrequest *DestroyCryptoKeyVersionRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Destroy: Schedule a CryptoKeyVersion for destruction. -// -// Upon calling this method, CryptoKeyVersion.state will be set -// to -// DESTROY_SCHEDULED -// and destroy_time will be set to a time 24 -// hours in the future, at which point the state -// will be changed to -// DESTROYED, and the key -// material will be irrevocably destroyed. -// -// Before the destroy_time is reached, -// RestoreCryptoKeyVersion may be called to reverse the process. -func (r *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsService) Destroy(name string, destroycryptokeyversionrequest *DestroyCryptoKeyVersionRequest) *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsDestroyCall { - c := &ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsDestroyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.destroycryptokeyversionrequest = destroycryptokeyversionrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsDestroyCall) Fields(s ...googleapi.Field) *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsDestroyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsDestroyCall) Context(ctx context.Context) *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsDestroyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsDestroyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsDestroyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.destroycryptokeyversionrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:destroy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.destroy" call. -// Exactly one of *CryptoKeyVersion or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *CryptoKeyVersion.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsDestroyCall) Do(opts ...googleapi.CallOption) (*CryptoKeyVersion, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &CryptoKeyVersion{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Schedule a CryptoKeyVersion for destruction.\n\nUpon calling this method, CryptoKeyVersion.state will be set to\nDESTROY_SCHEDULED\nand destroy_time will be set to a time 24\nhours in the future, at which point the state\nwill be changed to\nDESTROYED, and the key\nmaterial will be irrevocably destroyed.\n\nBefore the destroy_time is reached,\nRestoreCryptoKeyVersion may be called to reverse the process.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions/{cryptoKeyVersionsId}:destroy", - // "httpMethod": "POST", - // "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.destroy", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The resource name of the CryptoKeyVersion to destroy.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}:destroy", - // "request": { - // "$ref": "DestroyCryptoKeyVersionRequest" - // }, - // "response": { - // "$ref": "CryptoKeyVersion" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.get": - -type ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns metadata for a given CryptoKeyVersion. -func (r *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsService) Get(name string) *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsGetCall { - c := &ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsGetCall) Context(ctx context.Context) *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.get" call. -// Exactly one of *CryptoKeyVersion or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *CryptoKeyVersion.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsGetCall) Do(opts ...googleapi.CallOption) (*CryptoKeyVersion, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &CryptoKeyVersion{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns metadata for a given CryptoKeyVersion.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions/{cryptoKeyVersionsId}", - // "httpMethod": "GET", - // "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the CryptoKeyVersion to get.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "CryptoKeyVersion" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.list": - -type ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists CryptoKeyVersions. -func (r *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsService) List(parent string) *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsListCall { - c := &ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Optional limit on -// the number of CryptoKeyVersions to -// include in the response. Further CryptoKeyVersions can -// subsequently be obtained by including -// the -// ListCryptoKeyVersionsResponse.next_page_token in a subsequent -// request. -// If unspecified, the server will pick an appropriate default. -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsListCall) PageSize(pageSize int64) *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Optional -// pagination token, returned earlier -// via -// ListCryptoKeyVersionsResponse.next_page_token. -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsListCall) PageToken(pageToken string) *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsListCall) Context(ctx context.Context) *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/cryptoKeyVersions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.list" call. -// Exactly one of *ListCryptoKeyVersionsResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ListCryptoKeyVersionsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsListCall) Do(opts ...googleapi.CallOption) (*ListCryptoKeyVersionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ListCryptoKeyVersionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists CryptoKeyVersions.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions", - // "httpMethod": "GET", - // "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.list", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "pageSize": { - // "description": "Optional limit on the number of CryptoKeyVersions to\ninclude in the response. Further CryptoKeyVersions can\nsubsequently be obtained by including the\nListCryptoKeyVersionsResponse.next_page_token in a subsequent request.\nIf unspecified, the server will pick an appropriate default.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional pagination token, returned earlier via\nListCryptoKeyVersionsResponse.next_page_token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The resource name of the CryptoKey to list, in the format\n`projects/*/locations/*/keyRings/*/cryptoKeys/*`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+parent}/cryptoKeyVersions", - // "response": { - // "$ref": "ListCryptoKeyVersionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsListCall) Pages(ctx context.Context, f func(*ListCryptoKeyVersionsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.patch": - -type ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsPatchCall struct { - s *Service - name string - cryptokeyversion *CryptoKeyVersion - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Update a CryptoKeyVersion's metadata. -// -// state may be changed between -// ENABLED and -// DISABLED using this -// method. See DestroyCryptoKeyVersion and RestoreCryptoKeyVersion -// to -// move between other states. -func (r *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsService) Patch(name string, cryptokeyversion *CryptoKeyVersion) *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsPatchCall { - c := &ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.cryptokeyversion = cryptokeyversion - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required list of -// fields to be updated in this request. -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsPatchCall) Context(ctx context.Context) *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.cryptokeyversion) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.patch" call. -// Exactly one of *CryptoKeyVersion or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *CryptoKeyVersion.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsPatchCall) Do(opts ...googleapi.CallOption) (*CryptoKeyVersion, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &CryptoKeyVersion{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Update a CryptoKeyVersion's metadata.\n\nstate may be changed between\nENABLED and\nDISABLED using this\nmethod. See DestroyCryptoKeyVersion and RestoreCryptoKeyVersion to\nmove between other states.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions/{cryptoKeyVersionsId}", - // "httpMethod": "PATCH", - // "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.patch", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Output only. The resource name for this CryptoKeyVersion in the format\n`projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "updateMask": { - // "description": "Required list of fields to be updated in this request.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "request": { - // "$ref": "CryptoKeyVersion" - // }, - // "response": { - // "$ref": "CryptoKeyVersion" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.restore": - -type ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsRestoreCall struct { - s *Service - name string - restorecryptokeyversionrequest *RestoreCryptoKeyVersionRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Restore: Restore a CryptoKeyVersion in -// the -// DESTROY_SCHEDULED, -// state. -// -// Upon restoration of the CryptoKeyVersion, state -// will be set to DISABLED, -// and destroy_time will be cleared. -func (r *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsService) Restore(name string, restorecryptokeyversionrequest *RestoreCryptoKeyVersionRequest) *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsRestoreCall { - c := &ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.restorecryptokeyversionrequest = restorecryptokeyversionrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsRestoreCall) Fields(s ...googleapi.Field) *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsRestoreCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsRestoreCall) Context(ctx context.Context) *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsRestoreCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsRestoreCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsRestoreCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.restorecryptokeyversionrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:restore") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.restore" call. -// Exactly one of *CryptoKeyVersion or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *CryptoKeyVersion.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsRestoreCall) Do(opts ...googleapi.CallOption) (*CryptoKeyVersion, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &CryptoKeyVersion{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Restore a CryptoKeyVersion in the\nDESTROY_SCHEDULED,\nstate.\n\nUpon restoration of the CryptoKeyVersion, state\nwill be set to DISABLED,\nand destroy_time will be cleared.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions/{cryptoKeyVersionsId}:restore", - // "httpMethod": "POST", - // "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.restore", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The resource name of the CryptoKeyVersion to restore.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}:restore", - // "request": { - // "$ref": "RestoreCryptoKeyVersionRequest" - // }, - // "response": { - // "$ref": "CryptoKeyVersion" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} diff --git a/vendor/google.golang.org/api/compute/v0.alpha/compute-api.json b/vendor/google.golang.org/api/compute/v0.alpha/compute-api.json deleted file mode 100644 index 00938eb6b..000000000 --- a/vendor/google.golang.org/api/compute/v0.alpha/compute-api.json +++ /dev/null @@ -1,31300 +0,0 @@ -{ - "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/2ZSRpzMc2ShKN_p23rokDFE50Rk\"", - "discoveryVersion": "v1", - "id": "compute:alpha", - "name": "compute", - "version": "alpha", - "revision": "20170721", - "title": "Compute Engine API", - "description": "Creates and runs virtual machines on Google Cloud Platform.", - "ownerDomain": "google.com", - "ownerName": "Google", - "icons": { - "x16": "https://www.google.com/images/icons/product/compute_engine-16.png", - "x32": "https://www.google.com/images/icons/product/compute_engine-32.png" - }, - "documentationLink": "https://developers.google.com/compute/docs/reference/latest/", - "protocol": "rest", - "baseUrl": "https://www.googleapis.com/compute/alpha/projects/", - "basePath": "/compute/alpha/projects/", - "rootUrl": "https://www.googleapis.com/", - "servicePath": "compute/alpha/projects/", - "batchPath": "batch", - "parameters": { - "alt": { - "type": "string", - "description": "Data format for the response.", - "default": "json", - "enum": [ - "json" - ], - "enumDescriptions": [ - "Responses with Content-Type of application/json" - ], - "location": "query" - }, - "fields": { - "type": "string", - "description": "Selector specifying which fields to include in a partial response.", - "location": "query" - }, - "key": { - "type": "string", - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "location": "query" - }, - "oauth_token": { - "type": "string", - "description": "OAuth 2.0 token for the current user.", - "location": "query" - }, - "prettyPrint": { - "type": "boolean", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "location": "query" - }, - "quotaUser": { - "type": "string", - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.", - "location": "query" - }, - "userIp": { - "type": "string", - "description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.", - "location": "query" - } - }, - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/compute": { - "description": "View and manage your Google Compute Engine resources" - }, - "https://www.googleapis.com/auth/compute.readonly": { - "description": "View your Google Compute Engine resources" - }, - "https://www.googleapis.com/auth/devstorage.full_control": { - "description": "Manage your data and permissions in Google Cloud Storage" - }, - "https://www.googleapis.com/auth/devstorage.read_only": { - "description": "View your data in Google Cloud Storage" - }, - "https://www.googleapis.com/auth/devstorage.read_write": { - "description": "Manage your data in Google Cloud Storage" - } - } - } - }, - "schemas": { - "AcceleratorConfig": { - "id": "AcceleratorConfig", - "type": "object", - "description": "A specification of the type and number of accelerator cards attached to the instance.", - "properties": { - "acceleratorCount": { - "type": "integer", - "description": "The number of the guest accelerator cards exposed to this instance.", - "format": "int32" - }, - "acceleratorType": { - "type": "string", - "description": "Full or partial URL of the accelerator type resource to expose to this instance." - } - } - }, - "AcceleratorType": { - "id": "AcceleratorType", - "type": "object", - "description": "An Accelerator Type resource.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "[Output Only] The deprecation status associated with this accelerator type." - }, - "description": { - "type": "string", - "description": "[Output Only] An optional textual description of the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] The type of the resource. Always compute#acceleratorType for accelerator types.", - "default": "compute#acceleratorType" - }, - "maximumCardsPerInstance": { - "type": "integer", - "description": "[Output Only] Maximum accelerator cards allowed per instance.", - "format": "int32" - }, - "name": { - "type": "string", - "description": "[Output Only] Name of the resource.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined fully-qualified URL for this resource." - }, - "zone": { - "type": "string", - "description": "[Output Only] The name of the zone where the accelerator type resides, such as us-central1-a." - } - } - }, - "AcceleratorTypeAggregatedList": { - "id": "AcceleratorTypeAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of AcceleratorTypesScopedList resources.", - "additionalProperties": { - "$ref": "AcceleratorTypesScopedList", - "description": "[Output Only] Name of the scope containing this set of accelerator types." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#acceleratorTypeAggregatedList for aggregated lists of accelerator types.", - "default": "compute#acceleratorTypeAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "AcceleratorTypeList": { - "id": "AcceleratorTypeList", - "type": "object", - "description": "Contains a list of accelerator types.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of AcceleratorType resources.", - "items": { - "$ref": "AcceleratorType" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#acceleratorTypeList for lists of accelerator types.", - "default": "compute#acceleratorTypeList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "AcceleratorTypesScopedList": { - "id": "AcceleratorTypesScopedList", - "type": "object", - "properties": { - "acceleratorTypes": { - "type": "array", - "description": "[Output Only] List of accelerator types contained in this scope.", - "items": { - "$ref": "AcceleratorType" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] An informational warning that appears when the accelerator types list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "AccessConfig": { - "id": "AccessConfig", - "type": "object", - "description": "An access configuration attached to an instance's network interface. Only one access config per instance is supported.", - "properties": { - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#accessConfig for access configs.", - "default": "compute#accessConfig" - }, - "name": { - "type": "string", - "description": "The name of this access configuration. The default and recommended name is External NAT but you can use any arbitrary string you would like. For example, My external IP or Network Access." - }, - "natIP": { - "type": "string", - "description": "An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance." - }, - "networkTier": { - "type": "string", - "description": "This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.\n\nIf an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.\n\nIf an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP.", - "enum": [ - "PREMIUM", - "SELECT", - "STANDARD" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "publicDnsName": { - "type": "string", - "description": "[Output Only] The public DNS domain name for the instance." - }, - "publicPtrDomainName": { - "type": "string", - "description": "The DNS domain name for the public PTR record. This field can only be set when the set_public_ptr field is enabled." - }, - "setPublicDns": { - "type": "boolean", - "description": "Specifies whether a public DNS ?A? record should be created for the external IP address of this access configuration." - }, - "setPublicPtr": { - "type": "boolean", - "description": "Specifies whether a public DNS ?PTR? record should be created to map the external IP address of the instance to a DNS domain name." - }, - "type": { - "type": "string", - "description": "The type of configuration. The default and only option is ONE_TO_ONE_NAT.", - "default": "ONE_TO_ONE_NAT", - "enum": [ - "ONE_TO_ONE_NAT" - ], - "enumDescriptions": [ - "" - ] - } - } - }, - "Address": { - "id": "Address", - "type": "object", - "description": "A reserved address resource.", - "properties": { - "address": { - "type": "string", - "description": "The static external IP address represented by this resource." - }, - "addressType": { - "type": "string", - "description": "The type of address to reserve. If unspecified, defaults to EXTERNAL.", - "enum": [ - "DNS_FORWARDING", - "EXTERNAL", - "INTERNAL", - "UNSPECIFIED_TYPE" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ] - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "ipVersion": { - "type": "string", - "description": "The IP Version that will be used by this address. Valid options are IPV4 or IPV6. This can only be specified for a global address.", - "enum": [ - "IPV4", - "IPV6", - "UNSPECIFIED_VERSION" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#address for addresses.", - "default": "compute#address" - }, - "labelFingerprint": { - "type": "string", - "description": "A fingerprint for the labels being applied to this Address, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve an Address.", - "format": "byte" - }, - "labels": { - "type": "object", - "description": "Labels to apply to this Address resource. These can be later modified by the setLabels method. Each label key/value must comply with RFC1035. Label values may be empty.", - "additionalProperties": { - "type": "string" - } - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.addresses.insert" - ] - } - }, - "networkTier": { - "type": "string", - "description": "This signifies the networking tier used for configuring this Address and can only take the following values: PREMIUM , STANDARD.\n\nIf this field is not specified, it is assumed to be PREMIUM.", - "enum": [ - "PREMIUM", - "SELECT", - "STANDARD" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "region": { - "type": "string", - "description": "[Output Only] URL of the region where the regional address resides. This field is not applicable to global addresses." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "status": { - "type": "string", - "description": "[Output Only] The status of the address, which can be either IN_USE or RESERVED. An address that is RESERVED is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available.", - "enum": [ - "IN_USE", - "RESERVED" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "subnetwork": { - "type": "string", - "description": "For external addresses, this field should not be used.\n\nThe URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range." - }, - "users": { - "type": "array", - "description": "[Output Only] The URLs of the resources that are using this address.", - "items": { - "type": "string" - } - } - } - }, - "AddressAggregatedList": { - "id": "AddressAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of AddressesScopedList resources.", - "additionalProperties": { - "$ref": "AddressesScopedList", - "description": "[Output Only] Name of the scope containing this set of addresses." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#addressAggregatedList for aggregated lists of addresses.", - "default": "compute#addressAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "AddressList": { - "id": "AddressList", - "type": "object", - "description": "Contains a list of addresses.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Address resources.", - "items": { - "$ref": "Address" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#addressList for lists of addresses.", - "default": "compute#addressList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "AddressesScopedList": { - "id": "AddressesScopedList", - "type": "object", - "properties": { - "addresses": { - "type": "array", - "description": "[Output Only] List of addresses contained in this scope.", - "items": { - "$ref": "Address" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] Informational warning which replaces the list of addresses when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "AliasIpRange": { - "id": "AliasIpRange", - "type": "object", - "description": "An alias IP range attached to an instance's network interface.", - "properties": { - "ipCidrRange": { - "type": "string", - "description": "The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 10.2.3.4), a netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24)." - }, - "subnetworkRangeName": { - "type": "string", - "description": "Optional subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used." - } - } - }, - "AttachedDisk": { - "id": "AttachedDisk", - "type": "object", - "description": "An instance-attached disk resource.", - "properties": { - "autoDelete": { - "type": "boolean", - "description": "Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance)." - }, - "boot": { - "type": "boolean", - "description": "Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem." - }, - "deviceName": { - "type": "string", - "description": "Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.\n\nIf not specified, the server chooses a default device name to apply to this disk, in the form persistent-disks-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks." - }, - "diskEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Encrypts or decrypts a disk using a customer-supplied encryption key.\n\nIf you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key.\n\nIf you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance.\n\nIf you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.\n\nInstance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group." - }, - "diskSizeGb": { - "type": "string", - "description": "The size of the disk in base-2 GB. This supersedes disk_size_gb in InitializeParams.", - "format": "int64" - }, - "index": { - "type": "integer", - "description": "Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value.", - "format": "int32" - }, - "initializeParams": { - "$ref": "AttachedDiskInitializeParams", - "description": "[Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.\n\nThis property is mutually exclusive with the source property; you can only define one or the other, but not both." - }, - "interface": { - "type": "string", - "description": "Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.", - "enum": [ - "NVME", - "SCSI" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#attachedDisk for attached disks.", - "default": "compute#attachedDisk" - }, - "licenses": { - "type": "array", - "description": "[Output Only] Any valid publicly visible licenses.", - "items": { - "type": "string" - } - }, - "mode": { - "type": "string", - "description": "The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.", - "enum": [ - "READ_ONLY", - "READ_WRITE" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "source": { - "type": "string", - "description": "Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.\n\nIf desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.\n\nNote that for InstanceTemplate, specify the disk name, not the URL for the disk." - }, - "type": { - "type": "string", - "description": "Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.", - "enum": [ - "PERSISTENT", - "SCRATCH" - ], - "enumDescriptions": [ - "", - "" - ] - } - } - }, - "AttachedDiskInitializeParams": { - "id": "AttachedDiskInitializeParams", - "type": "object", - "description": "[Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.\n\nThis property is mutually exclusive with the source property; you can only define one or the other, but not both.", - "properties": { - "diskName": { - "type": "string", - "description": "Specifies the disk name. If not specified, the default is to use the name of the instance." - }, - "diskSizeGb": { - "type": "string", - "description": "Specifies the size of the disk in base-2 GB.", - "format": "int64" - }, - "diskStorageType": { - "type": "string", - "description": "[Deprecated] Storage type of the disk.", - "enum": [ - "HDD", - "SSD" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "diskType": { - "type": "string", - "description": "Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:\n\nhttps://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard \n\nOther values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL. For example, the following are valid values: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType \n- projects/project/zones/zone/diskTypes/diskType \n- zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL." - }, - "sourceImage": { - "type": "string", - "description": "The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.\n\nTo create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image:\n\nprojects/debian-cloud/global/images/family/debian-8 \n\nAlternatively, use a specific version of a public operating system image:\n\nprojects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD \n\nTo create a disk with a private image that you created, specify the image name in the following format:\n\nglobal/images/my-private-image \n\nYou can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:\n\nglobal/images/family/my-private-family \n\nIf the source image is deleted later, this field will not be set." - }, - "sourceImageEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.\n\nInstance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys." - } - } - }, - "AuditConfig": { - "id": "AuditConfig", - "type": "object", - "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n{ \"audit_configs\": [ { \"service\": \"allServices\" \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:foo@gmail.com\" ] }, { \"log_type\": \"DATA_WRITE\", }, { \"log_type\": \"ADMIN_READ\", } ] }, { \"service\": \"fooservice.googleapis.com\" \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:bar@gmail.com\" ] } ] } ] }\n\nFor fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ logging, and bar@gmail.com from DATA_WRITE logging.", - "properties": { - "auditLogConfigs": { - "type": "array", - "description": "The configuration for logging of each type of permission.", - "items": { - "$ref": "AuditLogConfig" - } - }, - "exemptedMembers": { - "type": "array", - "description": "", - "items": { - "type": "string" - } - }, - "service": { - "type": "string", - "description": "Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services." - } - } - }, - "AuditLogConfig": { - "id": "AuditLogConfig", - "type": "object", - "description": "Provides the configuration for logging a type of permissions. Example:\n\n{ \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:foo@gmail.com\" ] }, { \"log_type\": \"DATA_WRITE\", } ] }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging.", - "properties": { - "exemptedMembers": { - "type": "array", - "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].", - "items": { - "type": "string" - } - }, - "logType": { - "type": "string", - "description": "The log type that this config enables.", - "enum": [ - "ADMIN_READ", - "DATA_READ", - "DATA_WRITE", - "LOG_TYPE_UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ] - } - } - }, - "AuthorizationLoggingOptions": { - "id": "AuthorizationLoggingOptions", - "type": "object", - "description": "Authorization-related information used by Cloud Audit Logging.", - "properties": { - "permissionType": { - "type": "string", - "description": "The type of the permission that was checked.", - "enum": [ - "ADMIN_READ", - "ADMIN_WRITE", - "DATA_READ", - "DATA_WRITE", - "PERMISSION_TYPE_UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ] - } - } - }, - "Autoscaler": { - "id": "Autoscaler", - "type": "object", - "description": "Represents an Autoscaler resource. Autoscalers allow you to automatically scale virtual machine instances in managed instance groups according to an autoscaling policy that you define. For more information, read Autoscaling Groups of Instances.", - "properties": { - "autoscalingPolicy": { - "$ref": "AutoscalingPolicy", - "description": "The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization.\n\nIf none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#autoscaler for autoscalers.", - "default": "compute#autoscaler" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.instanceGroups.insert" - ] - } - }, - "region": { - "type": "string", - "description": "[Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope)." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "status": { - "type": "string", - "description": "[Output Only] The status of the autoscaler configuration.", - "enum": [ - "ACTIVE", - "DELETING", - "ERROR", - "PENDING" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ] - }, - "statusDetails": { - "type": "array", - "description": "[Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter.", - "items": { - "$ref": "AutoscalerStatusDetails" - } - }, - "target": { - "type": "string", - "description": "URL of the managed instance group that this autoscaler will scale." - }, - "zone": { - "type": "string", - "description": "[Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope)." - } - } - }, - "AutoscalerAggregatedList": { - "id": "AutoscalerAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of AutoscalersScopedList resources.", - "additionalProperties": { - "$ref": "AutoscalersScopedList", - "description": "[Output Only] Name of the scope containing this set of autoscalers." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#autoscalerAggregatedList for aggregated lists of autoscalers.", - "default": "compute#autoscalerAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "AutoscalerList": { - "id": "AutoscalerList", - "type": "object", - "description": "Contains a list of Autoscaler resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Autoscaler resources.", - "items": { - "$ref": "Autoscaler" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#autoscalerList for lists of autoscalers.", - "default": "compute#autoscalerList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "AutoscalerStatusDetails": { - "id": "AutoscalerStatusDetails", - "type": "object", - "properties": { - "message": { - "type": "string", - "description": "The status message." - }, - "type": { - "type": "string", - "description": "The type of error returned.", - "enum": [ - "ALL_INSTANCES_UNHEALTHY", - "BACKEND_SERVICE_DOES_NOT_EXIST", - "CAPPED_AT_MAX_NUM_REPLICAS", - "CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE", - "CUSTOM_METRIC_INVALID", - "MIN_EQUALS_MAX", - "MISSING_CUSTOM_METRIC_DATA_POINTS", - "MISSING_LOAD_BALANCING_DATA_POINTS", - "MORE_THAN_ONE_BACKEND_SERVICE", - "NOT_ENOUGH_QUOTA_AVAILABLE", - "REGION_RESOURCE_STOCKOUT", - "SCALING_TARGET_DOES_NOT_EXIST", - "UNKNOWN", - "UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION", - "ZONE_RESOURCE_STOCKOUT" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - } - } - }, - "AutoscalersScopedList": { - "id": "AutoscalersScopedList", - "type": "object", - "properties": { - "autoscalers": { - "type": "array", - "description": "[Output Only] List of autoscalers contained in this scope.", - "items": { - "$ref": "Autoscaler" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] Informational warning which replaces the list of autoscalers when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "AutoscalingPolicy": { - "id": "AutoscalingPolicy", - "type": "object", - "description": "Cloud Autoscaler policy.", - "properties": { - "coolDownPeriodSec": { - "type": "integer", - "description": "The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds.\n\nVirtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.", - "format": "int32" - }, - "cpuUtilization": { - "$ref": "AutoscalingPolicyCpuUtilization", - "description": "Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group." - }, - "customMetricUtilizations": { - "type": "array", - "description": "Configuration parameters of autoscaling based on a custom metric.", - "items": { - "$ref": "AutoscalingPolicyCustomMetricUtilization" - } - }, - "loadBalancingUtilization": { - "$ref": "AutoscalingPolicyLoadBalancingUtilization", - "description": "Configuration parameters of autoscaling based on load balancer." - }, - "maxNumReplicas": { - "type": "integer", - "description": "The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas.", - "format": "int32" - }, - "minNumReplicas": { - "type": "integer", - "description": "The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed.", - "format": "int32" - }, - "queueBasedScaling": { - "$ref": "AutoscalingPolicyQueueBasedScaling", - "description": "Configuration parameters of autoscaling based on queuing system." - } - } - }, - "AutoscalingPolicyCpuUtilization": { - "id": "AutoscalingPolicyCpuUtilization", - "type": "object", - "description": "CPU utilization policy.", - "properties": { - "utilizationTarget": { - "type": "number", - "description": "The target CPU utilization that the autoscaler should maintain. Must be a float value in the range (0, 1]. If not specified, the default is 0.6.\n\nIf the CPU level is below the target utilization, the autoscaler scales down the number of instances until it reaches the minimum number of instances you specified or until the average CPU of your instances reaches the target utilization.\n\nIf the average CPU is above the target utilization, the autoscaler scales up until it reaches the maximum number of instances you specified or until the average utilization reaches the target utilization.", - "format": "double" - } - } - }, - "AutoscalingPolicyCustomMetricUtilization": { - "id": "AutoscalingPolicyCustomMetricUtilization", - "type": "object", - "description": "Custom utilization metric policy.", - "properties": { - "filter": { - "type": "string", - "description": "A filter string, compatible with a Stackdriver Monitoring filter string for TimeSeries.list API call. This filter is used to select a specific TimeSeries for the purpose of autoscaling and to determine whether the metric is exporting per-instance or global data.\n\nFor the filter to be valid for autoscaling purposes, the following rules apply: \n- You can only use the AND operator for joining selectors. \n- You can only use direct equality comparison operator (=) without any functions for each selector. \n- You can specify the metric in both the filter string and in the metric field. However, if specified in both places, the metric must be identical. \n- The monitored resource type determines what kind of values are expected for the metric. If it is a gce_instance, the autoscaler expects the metric to include a separate TimeSeries for each instance in a group. In such a case, you cannot filter on resource labels.\nIf the resource type is any other value, the autoscaler expects this metric to contain values that apply to the entire autoscaled instance group and resource label filtering can be performed to point autoscaler at the correct TimeSeries to scale upon. This is / called a global metric for the purpose of autoscaling.\n\nIf not specified, the type defaults to gce_instance. \n\nYou should provide a filter that is selective enough to pick just one TimeSeries for the autoscaled group or for each of the instances (if you are using gce_instance resource type). If multiple TimeSeries are returned upon the query execution, the autoscaler will sum their respective values to obtain its scaling value." - }, - "metric": { - "type": "string", - "description": "The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values and should be a utilization metric, which means that the number of virtual machines handling requests should increase or decrease proportionally to the metric.\n\nThe metric must have a value type of INT64 or DOUBLE." - }, - "singleInstanceAssignment": { - "type": "number", - "description": "If scaling is based on a global metric value that represents the total amount of work to be done or resource usage, set this value to an amount assigned for a single instance of the scaled group. Autoscaler will keep the number of instances proportional to the value of this metric, the metric itself should not change value due to group resizing.\n\nA good metric to use with the target is for example pubsub.googleapis.com/subscription/num_undelivered_messages or a custom metric exporting the total number of requests coming to your instances.\n\nA bad example would be a metric exporting an average or median latency, since this value can't include a chunk assignable to a single instance, it could be better used with utilization_target instead.", - "format": "double" - }, - "utilizationTarget": { - "type": "number", - "description": "The target value of the metric that autoscaler should maintain. This must be a positive value.\n\nFor example, a good metric to use as a utilization_target is compute.googleapis.com/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances.", - "format": "double" - }, - "utilizationTargetType": { - "type": "string", - "description": "Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not specified, the default is GAUGE.", - "enum": [ - "DELTA_PER_MINUTE", - "DELTA_PER_SECOND", - "GAUGE" - ], - "enumDescriptions": [ - "", - "", - "" - ] - } - } - }, - "AutoscalingPolicyLoadBalancingUtilization": { - "id": "AutoscalingPolicyLoadBalancingUtilization", - "type": "object", - "description": "Configuration parameters of autoscaling based on load balancing.", - "properties": { - "utilizationTarget": { - "type": "number", - "description": "Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.", - "format": "double" - } - } - }, - "AutoscalingPolicyQueueBasedScaling": { - "id": "AutoscalingPolicyQueueBasedScaling", - "type": "object", - "description": "Configuration parameters of autoscaling based on queuing system.", - "properties": { - "acceptableBacklogPerInstance": { - "type": "number", - "description": "Scaling based on the average number of tasks in the queue per each active instance. The autoscaler keeps the average number of tasks per instance below this number, based on data collected in the last couple of minutes. The autoscaler will also take into account incoming tasks when calculating when to scale.", - "format": "double" - }, - "cloudPubSub": { - "$ref": "AutoscalingPolicyQueueBasedScalingCloudPubSub", - "description": "Configuration for Cloud Pub/Sub subscription queue." - }, - "singleWorkerThroughputPerSec": { - "type": "number", - "description": "The scaling algorithm will also calculate throughput estimates on its own; if you explicitly provide this value, the autoscaler will take into account your value as well as automatic estimates when deciding how to scale.", - "format": "double" - } - } - }, - "AutoscalingPolicyQueueBasedScalingCloudPubSub": { - "id": "AutoscalingPolicyQueueBasedScalingCloudPubSub", - "type": "object", - "description": "Configuration parameters for scaling based on Cloud Pub/Sub subscription queue.", - "properties": { - "subscription": { - "type": "string", - "description": "Cloud Pub/Sub subscription used for scaling. Provide the partial URL (starting with projects/) or just the subscription name. The subscription must be assigned to the topic specified in topicName and must be in a pull configuration. The subscription must belong to the same project as the Autoscaler." - }, - "topic": { - "type": "string", - "description": "Cloud Pub/Sub topic used for scaling. Provide the partial URL or partial URL (starting with projects/) or just the topic name. The topic must belong to the same project as the Autoscaler resource." - } - } - }, - "Backend": { - "id": "Backend", - "type": "object", - "description": "Message containing information of one individual backend.", - "properties": { - "balancingMode": { - "type": "string", - "description": "Specifies the balancing mode for this backend. For global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for TCP/SSL).\n\nFor Internal Load Balancing, the default and only supported mode is CONNECTION.", - "enum": [ - "CONNECTION", - "RATE", - "UTILIZATION" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "capacityScaler": { - "type": "number", - "description": "A multiplier applied to the group's maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). Default value is 1, which means the group will serve up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available Capacity. Valid range is [0.0,1.0].\n\nThis cannot be used for internal load balancing.", - "format": "float" - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "failover": { - "type": "boolean", - "description": "This field designates whether this is a failover backend. More than one failover backend can be configured for a given BackendService." - }, - "group": { - "type": "string", - "description": "The fully-qualified URL of a Instance Group resource. This instance group defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource.\n\nNote that you must specify an Instance Group resource using the fully-qualified URL, rather than a partial URL.\n\nWhen the BackendService has load balancing scheme INTERNAL, the instance group must be within the same region as the BackendService." - }, - "maxConnections": { - "type": "integer", - "description": "The max number of simultaneous connections for the group. Can be used with either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.\n\nThis cannot be used for internal load balancing.", - "format": "int32" - }, - "maxConnectionsPerInstance": { - "type": "integer", - "description": "The max number of simultaneous connections that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.\n\nThis cannot be used for internal load balancing.", - "format": "int32" - }, - "maxRate": { - "type": "integer", - "description": "The max requests per second (RPS) of the group. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. For RATE mode, either maxRate or maxRatePerInstance must be set.\n\nThis cannot be used for internal load balancing.", - "format": "int32" - }, - "maxRatePerInstance": { - "type": "number", - "description": "The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set.\n\nThis cannot be used for internal load balancing.", - "format": "float" - }, - "maxUtilization": { - "type": "number", - "description": "Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. The default is 0.8. Valid range is [0.0, 1.0].\n\nThis cannot be used for internal load balancing.", - "format": "float" - } - } - }, - "BackendBucket": { - "id": "BackendBucket", - "type": "object", - "description": "A BackendBucket resource. This resource defines a Cloud Storage bucket.", - "properties": { - "bucketName": { - "type": "string", - "description": "Cloud Storage bucket name." - }, - "cdnPolicy": { - "$ref": "BackendBucketCdnPolicy", - "description": "Cloud CDN Coniguration for this BackendBucket." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional textual description of the resource; provided by the client when the resource is created." - }, - "enableCdn": { - "type": "boolean", - "description": "If true, enable Cloud CDN for this BackendBucket." - }, - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "Type of the resource.", - "default": "compute#backendBucket" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - } - } - }, - "BackendBucketCdnPolicy": { - "id": "BackendBucketCdnPolicy", - "type": "object", - "description": "Message containing Cloud CDN configuration for a backend bucket.", - "properties": { - "signedUrlCacheMaxAgeSec": { - "type": "string", - "description": "Number of seconds up to which the response to a signed URL request will be cached in the CDN. After this time period, the Signed URL will be revalidated before being served. Defaults to 1hr (3600s). If this field is set, Cloud CDN will internally act as though all responses from this bucket had a ?Cache-Control: public, max-age=[TTL]? header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.", - "format": "int64" - }, - "signedUrlKeyNames": { - "type": "array", - "description": "[Output Only] Names of the keys currently configured for Cloud CDN Signed URL on this backend bucket.", - "items": { - "type": "string" - } - } - } - }, - "BackendBucketList": { - "id": "BackendBucketList", - "type": "object", - "description": "Contains a list of BackendBucket resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of BackendBucket resources.", - "items": { - "$ref": "BackendBucket" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#backendBucketList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "BackendService": { - "id": "BackendService", - "type": "object", - "description": "A BackendService resource. This resource defines a group of backend virtual machines and their serving capacity.", - "properties": { - "affinityCookieTtlSec": { - "type": "integer", - "description": "Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day.\n\nWhen the load balancing scheme is INTERNAL, this field is not used.", - "format": "int32" - }, - "backends": { - "type": "array", - "description": "The list of backends that serve this BackendService.", - "items": { - "$ref": "Backend" - } - }, - "cdnPolicy": { - "$ref": "BackendServiceCdnPolicy", - "description": "Cloud CDN configuration for this BackendService." - }, - "connectionDraining": { - "$ref": "ConnectionDraining" - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "customRequestHeaders": { - "type": "array", - "description": "Headers that the HTTP/S load balancer should add to proxied requests.", - "items": { - "type": "string" - } - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "enableCDN": { - "type": "boolean", - "description": "If true, enable Cloud CDN for this BackendService.\n\nWhen the load balancing scheme is INTERNAL, this field is not used." - }, - "failoverRatio": { - "type": "number", - "description": "The value of the field must be in [0, 1]. If set, 'backends[].failover' must be set. They together define the fallback behavior of the primary backend: if the ratio of the healthy VMs in the primary backend is at or below this number, traffic arriving at the load-balanced IP will be directed to the failover backend.\n\nIn case where 'failoverRatio' is not set or all the VMs in the backup backend are unhealthy, the traffic will be directed back to the primary backend in the \"force\" mode, where traffic will be spread to the healthy VMs with the best effort, or to all VMs when no VM is healthy.\n\nThis field is only used with l4 load balancing.", - "format": "float" - }, - "fingerprint": { - "type": "string", - "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService.", - "format": "byte" - }, - "healthChecks": { - "type": "array", - "description": "The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified, and a health check is required for GCE backend services. A health check must not be specified for GAE app backend and Cloud Function backend.\n\nFor internal load balancing, a URL to a HealthCheck resource must be specified instead.", - "items": { - "type": "string" - } - }, - "iap": { - "$ref": "BackendServiceIAP" - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#backendService for backend services.", - "default": "compute#backendService" - }, - "loadBalancingScheme": { - "type": "string", - "enum": [ - "EXTERNAL", - "INTERNAL", - "INVALID_LOAD_BALANCING_SCHEME" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "port": { - "type": "integer", - "description": "Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.\n\nThis cannot be used for internal load balancing.", - "format": "int32" - }, - "portName": { - "type": "string", - "description": "Name of backend port. The same name should appear in the instance groups referenced by this service. Required when the load balancing scheme is EXTERNAL.\n\nWhen the load balancing scheme is INTERNAL, this field is not used." - }, - "protocol": { - "type": "string", - "description": "The protocol this BackendService uses to communicate with backends.\n\nPossible values are HTTP, HTTPS, TCP, and SSL. The default is HTTP.\n\nFor internal load balancing, the possible values are TCP and UDP, and the default is TCP.", - "enum": [ - "HTTP", - "HTTP2", - "HTTPS", - "SSL", - "TCP", - "UDP" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ] - }, - "region": { - "type": "string", - "description": "[Output Only] URL of the region where the regional backend service resides. This field is not applicable to global backend services." - }, - "securityPolicy": { - "type": "string", - "description": "[Output Only] The resource URL for the security policy associated with this backend service." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "sessionAffinity": { - "type": "string", - "description": "Type of session affinity to use. The default is NONE.\n\nWhen the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or GENERATED_COOKIE.\n\nWhen the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.\n\nWhen the protocol is UDP, this field is not used.", - "enum": [ - "CLIENT_IP", - "CLIENT_IP_PORT_PROTO", - "CLIENT_IP_PROTO", - "GENERATED_COOKIE", - "NONE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ] - }, - "timeoutSec": { - "type": "integer", - "description": "How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds.", - "format": "int32" - } - } - }, - "BackendServiceAggregatedList": { - "id": "BackendServiceAggregatedList", - "type": "object", - "description": "Contains a list of BackendServicesScopedList.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of BackendServicesScopedList resources.", - "additionalProperties": { - "$ref": "BackendServicesScopedList", - "description": "Name of the scope containing this set of BackendServices." - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#backendServiceAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "BackendServiceCdnPolicy": { - "id": "BackendServiceCdnPolicy", - "type": "object", - "description": "Message containing Cloud CDN configuration for a backend service.", - "properties": { - "cacheKeyPolicy": { - "$ref": "CacheKeyPolicy", - "description": "The CacheKeyPolicy for this CdnPolicy." - }, - "signedUrlCacheMaxAgeSec": { - "type": "string", - "description": "Number of seconds up to which the response to a signed URL request will be cached in the CDN. After this time period, the Signed URL will be revalidated before being served. Defaults to 1hr (3600s). If this field is set, Cloud CDN will internally act as though all responses from this backend had a ?Cache-Control: public, max-age=[TTL]? header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.", - "format": "int64" - }, - "signedUrlKeyNames": { - "type": "array", - "description": "[Output Only] Names of the keys currently configured for Cloud CDN Signed URL on this backend service.", - "items": { - "type": "string" - } - } - } - }, - "BackendServiceGroupHealth": { - "id": "BackendServiceGroupHealth", - "type": "object", - "properties": { - "healthStatus": { - "type": "array", - "items": { - "$ref": "HealthStatus" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#backendServiceGroupHealth for the health of backend services.", - "default": "compute#backendServiceGroupHealth" - } - } - }, - "BackendServiceIAP": { - "id": "BackendServiceIAP", - "type": "object", - "description": "Identity-Aware Proxy", - "properties": { - "enabled": { - "type": "boolean" - }, - "oauth2ClientId": { - "type": "string" - }, - "oauth2ClientSecret": { - "type": "string" - }, - "oauth2ClientSecretSha256": { - "type": "string", - "description": "[Output Only] SHA256 hash value for the field oauth2_client_secret above." - } - } - }, - "BackendServiceList": { - "id": "BackendServiceList", - "type": "object", - "description": "Contains a list of BackendService resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of BackendService resources.", - "items": { - "$ref": "BackendService" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#backendServiceList for lists of backend services.", - "default": "compute#backendServiceList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "BackendServicesScopedList": { - "id": "BackendServicesScopedList", - "type": "object", - "properties": { - "backendServices": { - "type": "array", - "description": "List of BackendServices contained in this scope.", - "items": { - "$ref": "BackendService" - } - }, - "warning": { - "type": "object", - "description": "Informational warning which replaces the list of backend services when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "Binding": { - "id": "Binding", - "type": "object", - "description": "Associates `members` with a `role`.", - "properties": { - "condition": { - "$ref": "Expr", - "description": "The condition that is associated with this binding. NOTE: an unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently. This field is GOOGLE_INTERNAL." - }, - "members": { - "type": "array", - "description": "Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`.\n\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.\n\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.", - "items": { - "type": "string" - } - }, - "role": { - "type": "string", - "description": "Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`." - } - } - }, - "CacheInvalidationRule": { - "id": "CacheInvalidationRule", - "type": "object", - "properties": { - "host": { - "type": "string", - "description": "If set, this invalidation rule will only apply to requests with a Host header matching host." - }, - "path": { - "type": "string" - } - } - }, - "CacheKeyPolicy": { - "id": "CacheKeyPolicy", - "type": "object", - "description": "Message containing what to include in the cache key for a request for Cloud CDN.", - "properties": { - "includeHost": { - "type": "boolean", - "description": "If true, requests to different hosts will be cached separately." - }, - "includeProtocol": { - "type": "boolean", - "description": "If true, http and https requests will be cached separately." - }, - "includeQueryString": { - "type": "boolean", - "description": "If true, include query string parameters in the cache key according to query_string_whitelist and query_string_blacklist. If neither is set, the entire query string will be included. If false, the query string will be excluded from the cache key entirely." - }, - "queryStringBlacklist": { - "type": "array", - "description": "Names of query string parameters to exclude in cache keys. All other parameters will be included. Either specify query_string_whitelist or query_string_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters.", - "items": { - "type": "string" - } - }, - "queryStringWhitelist": { - "type": "array", - "description": "Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify query_string_whitelist or query_string_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters.", - "items": { - "type": "string" - } - } - } - }, - "Commitment": { - "id": "Commitment", - "type": "object", - "description": "Represents a Commitment resource. Creating a Commitment resource means that you are purchasing a committed use contract with an explicit start and end time. You can create commitments based on vCPUs and memory usage and receive discounted rates. For full details, read Signing Up for Committed Use Discounts.\n\nCommitted use discounts are subject to Google Cloud Platform's Service Specific Terms. By purchasing a committed use discount, you agree to these terms. Committed use discounts will not renew, so you must purchase a new commitment to continue receiving discounts.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "endTimestamp": { - "type": "string", - "description": "[Output Only] Commitment end time in RFC3339 text format." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#commitment for commitments.", - "default": "compute#commitment" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "plan": { - "type": "string", - "description": "The plan for this commitment, which determines duration and discount rate. The currently supported plans are TWELVE_MONTH (1 year), and THIRTY_SIX_MONTH (3 years).", - "enum": [ - "INVALID", - "THIRTY_SIX_MONTH", - "TWELVE_MONTH" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "region": { - "type": "string", - "description": "[Output Only] URL of the region where this commitment may be used." - }, - "resources": { - "type": "array", - "description": "List of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together.", - "items": { - "$ref": "ResourceCommitment" - } - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "startTimestamp": { - "type": "string", - "description": "[Output Only] Commitment start time in RFC3339 text format." - }, - "status": { - "type": "string", - "description": "[Output Only] Status of the commitment with regards to eventual expiration (each commitment has an end date defined). One of the following values: NOT_YET_ACTIVE, ACTIVE, EXPIRED.", - "enum": [ - "ACTIVE", - "CREATING", - "EXPIRED", - "NOT_YET_ACTIVE" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ] - }, - "statusMessage": { - "type": "string", - "description": "[Output Only] An optional, human-readable explanation of the status." - } - } - }, - "CommitmentAggregatedList": { - "id": "CommitmentAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of CommitmentsScopedList resources.", - "additionalProperties": { - "$ref": "CommitmentsScopedList", - "description": "[Output Only] Name of the scope containing this set of commitments." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#commitmentAggregatedList for aggregated lists of commitments.", - "default": "compute#commitmentAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "CommitmentList": { - "id": "CommitmentList", - "type": "object", - "description": "Contains a list of Commitment resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Commitment resources.", - "items": { - "$ref": "Commitment" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#commitmentList for lists of commitments.", - "default": "compute#commitmentList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "CommitmentsScopedList": { - "id": "CommitmentsScopedList", - "type": "object", - "properties": { - "commitments": { - "type": "array", - "description": "[Output Only] List of commitments contained in this scope.", - "items": { - "$ref": "Commitment" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] Informational warning which replaces the list of commitments when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "Condition": { - "id": "Condition", - "type": "object", - "description": "A condition to be met.", - "properties": { - "iam": { - "type": "string", - "description": "Trusted attributes supplied by the IAM system.", - "enum": [ - "APPROVER", - "ATTRIBUTION", - "AUTHORITY", - "JUSTIFICATION_TYPE", - "NO_ATTR", - "SECURITY_REALM" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ] - }, - "op": { - "type": "string", - "description": "An operator to apply the subject with.", - "enum": [ - "DISCHARGED", - "EQUALS", - "IN", - "NOT_EQUALS", - "NOT_IN", - "NO_OP" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ] - }, - "svc": { - "type": "string", - "description": "Trusted attributes discharged by the service." - }, - "sys": { - "type": "string", - "description": "Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.", - "enum": [ - "IP", - "NAME", - "NO_ATTR", - "REGION", - "SERVICE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ] - }, - "value": { - "type": "string", - "description": "DEPRECATED. Use 'values' instead." - }, - "values": { - "type": "array", - "description": "The objects of the condition. This is mutually exclusive with 'value'.", - "items": { - "type": "string" - } - } - } - }, - "ConnectionDraining": { - "id": "ConnectionDraining", - "type": "object", - "description": "Message containing connection draining configuration.", - "properties": { - "drainingTimeoutSec": { - "type": "integer", - "description": "Time for which instance will be drained (not accept new connections, but still work to finish started).", - "format": "int32" - } - } - }, - "CustomerEncryptionKey": { - "id": "CustomerEncryptionKey", - "type": "object", - "description": "Represents a customer-supplied encryption key", - "properties": { - "kmsKeyName": { - "type": "string", - "description": "The name of the encryption key that is stored in Google Cloud KMS." - }, - "rawKey": { - "type": "string", - "description": "Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource." - }, - "rsaEncryptedKey": { - "type": "string", - "description": "Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.\n\nThe key must meet the following requirements before you can provide it to Compute Engine: \n- The key is wrapped using a RSA public key certificate provided by Google. \n- After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:\nhttps://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem" - }, - "sha256": { - "type": "string", - "description": "[Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource." - } - } - }, - "CustomerEncryptionKeyProtectedDisk": { - "id": "CustomerEncryptionKeyProtectedDisk", - "type": "object", - "properties": { - "diskEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Decrypts data associated with the disk with a customer-supplied encryption key." - }, - "source": { - "type": "string", - "description": "Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks." - } - } - }, - "DeprecationStatus": { - "id": "DeprecationStatus", - "type": "object", - "description": "Deprecation status for a public resource.", - "properties": { - "deleted": { - "type": "string", - "description": "An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it." - }, - "deprecated": { - "type": "string", - "description": "An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it." - }, - "obsolete": { - "type": "string", - "description": "An optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it." - }, - "replacement": { - "type": "string", - "description": "The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource." - }, - "state": { - "type": "string", - "description": "The deprecation state of this resource. This can be DEPRECATED, OBSOLETE, or DELETED. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.", - "enum": [ - "DELETED", - "DEPRECATED", - "OBSOLETE" - ], - "enumDescriptions": [ - "", - "", - "" - ] - } - } - }, - "Disk": { - "id": "Disk", - "type": "object", - "description": "A Disk resource.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "diskEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Encrypts the disk using a customer-supplied encryption key.\n\nAfter you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine).\n\nCustomer-supplied encryption keys do not protect access to metadata of the disk.\n\nIf you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#disk for disks.", - "default": "compute#disk" - }, - "labelFingerprint": { - "type": "string", - "description": "A fingerprint for the labels being applied to this disk, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve a disk.", - "format": "byte" - }, - "labels": { - "type": "object", - "description": "Labels to apply to this disk. These can be later modified by the setLabels method.", - "additionalProperties": { - "type": "string" - } - }, - "lastAttachTimestamp": { - "type": "string", - "description": "[Output Only] Last attach timestamp in RFC3339 text format." - }, - "lastDetachTimestamp": { - "type": "string", - "description": "[Output Only] Last detach timestamp in RFC3339 text format." - }, - "licenseCodes": { - "type": "array", - "description": "Integer license codes indicating which licenses are attached to this disk.", - "items": { - "type": "string", - "format": "int64" - } - }, - "licenses": { - "type": "array", - "description": "Any applicable publicly visible licenses.", - "items": { - "type": "string" - } - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.disks.insert" - ] - } - }, - "options": { - "type": "string", - "description": "Internal use only." - }, - "physicalBlockSizeBytes": { - "type": "string", - "description": "Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Initially only 4096 is supported, but other powers of two may be added. If an unsupported value is requested, the error message will list the supported values, but even a supported value may be allowed for only some projects.", - "format": "int64" - }, - "region": { - "type": "string", - "description": "[Output Only] URL of the region where the disk resides. Only applicable for regional resources." - }, - "replicaZones": { - "type": "array", - "description": "URLs of the zones where the disk should be replicated to. Only applicable for regional resources.", - "items": { - "type": "string" - } - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined fully-qualified URL for this resource." - }, - "sizeGb": { - "type": "string", - "description": "Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk.\n\nIf you specify this field along with sourceImage or sourceSnapshot, the value of sizeGb must not be less than the size of the sourceImage or the size of the snapshot. Acceptable values are 1 to 65536, inclusive.", - "format": "int64" - }, - "sourceImage": { - "type": "string", - "description": "The source image used to create this disk. If the source image is deleted, this field will not be set.\n\nTo create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image:\n\nprojects/debian-cloud/global/images/family/debian-8 \n\nAlternatively, use a specific version of a public operating system image:\n\nprojects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD \n\nTo create a disk with a private image that you created, specify the image name in the following format:\n\nglobal/images/my-private-image \n\nYou can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:\n\nglobal/images/family/my-private-family" - }, - "sourceImageEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key." - }, - "sourceImageId": { - "type": "string", - "description": "[Output Only] The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used." - }, - "sourceSnapshot": { - "type": "string", - "description": "The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: \n- https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot \n- projects/project/global/snapshots/snapshot \n- global/snapshots/snapshot" - }, - "sourceSnapshotEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key." - }, - "sourceSnapshotId": { - "type": "string", - "description": "[Output Only] The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used." - }, - "status": { - "type": "string", - "description": "[Output Only] The status of disk creation.", - "enum": [ - "CREATING", - "FAILED", - "READY", - "RESTORING" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ] - }, - "storageType": { - "type": "string", - "description": "[Deprecated] Storage type of the persistent disk.", - "enum": [ - "HDD", - "SSD" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "type": { - "type": "string", - "description": "URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk." - }, - "users": { - "type": "array", - "description": "[Output Only] Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance", - "items": { - "type": "string" - } - }, - "zone": { - "type": "string", - "description": "[Output Only] URL of the zone where the disk resides." - } - } - }, - "DiskAggregatedList": { - "id": "DiskAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of DisksScopedList resources.", - "additionalProperties": { - "$ref": "DisksScopedList", - "description": "[Output Only] Name of the scope containing this set of disks." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#diskAggregatedList for aggregated lists of persistent disks.", - "default": "compute#diskAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "DiskList": { - "id": "DiskList", - "type": "object", - "description": "A list of Disk resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Disk resources.", - "items": { - "$ref": "Disk" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#diskList for lists of disks.", - "default": "compute#diskList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "DiskMoveRequest": { - "id": "DiskMoveRequest", - "type": "object", - "properties": { - "destinationZone": { - "type": "string", - "description": "The URL of the destination zone to move the disk. This can be a full or partial URL. For example, the following are all valid URLs to a zone: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone \n- projects/project/zones/zone \n- zones/zone" - }, - "targetDisk": { - "type": "string", - "description": "The URL of the target disk to move. This can be a full or partial URL. For example, the following are all valid URLs to a disk: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk \n- projects/project/zones/zone/disks/disk \n- zones/zone/disks/disk" - } - } - }, - "DiskType": { - "id": "DiskType", - "type": "object", - "description": "A DiskType resource.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "defaultDiskSizeGb": { - "type": "string", - "description": "[Output Only] Server-defined default disk size in GB.", - "format": "int64" - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "[Output Only] The deprecation status associated with this disk type." - }, - "description": { - "type": "string", - "description": "[Output Only] An optional description of this resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#diskType for disk types.", - "default": "compute#diskType" - }, - "name": { - "type": "string", - "description": "[Output Only] Name of the resource.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "validDiskSize": { - "type": "string", - "description": "[Output Only] An optional textual description of the valid disk size, such as \"10GB-10TB\"." - }, - "zone": { - "type": "string", - "description": "[Output Only] URL of the zone where the disk type resides." - } - } - }, - "DiskTypeAggregatedList": { - "id": "DiskTypeAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of DiskTypesScopedList resources.", - "additionalProperties": { - "$ref": "DiskTypesScopedList", - "description": "[Output Only] Name of the scope containing this set of disk types." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#diskTypeAggregatedList.", - "default": "compute#diskTypeAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "DiskTypeList": { - "id": "DiskTypeList", - "type": "object", - "description": "Contains a list of disk types.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of DiskType resources.", - "items": { - "$ref": "DiskType" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#diskTypeList for disk types.", - "default": "compute#diskTypeList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "DiskTypesScopedList": { - "id": "DiskTypesScopedList", - "type": "object", - "properties": { - "diskTypes": { - "type": "array", - "description": "[Output Only] List of disk types contained in this scope.", - "items": { - "$ref": "DiskType" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] Informational warning which replaces the list of disk types when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "DisksResizeRequest": { - "id": "DisksResizeRequest", - "type": "object", - "properties": { - "sizeGb": { - "type": "string", - "description": "The new size of the persistent disk, which is specified in GB.", - "format": "int64" - } - } - }, - "DisksScopedList": { - "id": "DisksScopedList", - "type": "object", - "properties": { - "disks": { - "type": "array", - "description": "[Output Only] List of disks contained in this scope.", - "items": { - "$ref": "Disk" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] Informational warning which replaces the list of disks when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "DistributionPolicy": { - "id": "DistributionPolicy", - "type": "object", - "properties": { - "zones": { - "type": "array", - "items": { - "$ref": "DistributionPolicyZoneConfiguration" - } - } - } - }, - "DistributionPolicyZoneConfiguration": { - "id": "DistributionPolicyZoneConfiguration", - "type": "object", - "properties": { - "zone": { - "type": "string", - "description": "URL of the zone where managed instance group is spawning instances (for regional resources). Zone has to belong to the region where managed instance group is located.", - "annotations": { - "required": [ - "compute.regionInstanceGroupManagers.insert", - "compute.regionInstanceGroupManagers.update" - ] - } - } - } - }, - "Expr": { - "id": "Expr", - "type": "object", - "description": "Represents an expression text. Example:\n\ntitle: \"User account presence\" description: \"Determines whether the request has a user account\" expression: \"size(request.user) \u003e 0\"", - "properties": { - "description": { - "type": "string", - "description": "An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI." - }, - "expression": { - "type": "string", - "description": "Textual representation of an expression in Common Expression Language syntax.\n\nThe application context of the containing message determines which well-known feature set of CEL is supported." - }, - "location": { - "type": "string", - "description": "An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file." - }, - "title": { - "type": "string", - "description": "An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression." - } - } - }, - "Firewall": { - "id": "Firewall", - "type": "object", - "description": "Represents a Firewall resource.", - "properties": { - "allowed": { - "type": "array", - "description": "The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.", - "items": { - "type": "object", - "properties": { - "IPProtocol": { - "type": "string", - "description": "The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number." - }, - "ports": { - "type": "array", - "description": "An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.\n\nExample inputs include: [\"22\"], [\"80\",\"443\"], and [\"12345-12349\"].", - "items": { - "type": "string" - } - } - } - } - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "denied": { - "type": "array", - "description": "The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.", - "items": { - "type": "object", - "properties": { - "IPProtocol": { - "type": "string", - "description": "The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number." - }, - "ports": { - "type": "array", - "description": "An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.\n\nExample inputs include: [\"22\"], [\"80\",\"443\"], and [\"12345-12349\"].", - "items": { - "type": "string" - } - } - } - } - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "destinationRanges": { - "type": "array", - "description": "If destination ranges are specified, the firewall will apply only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.", - "items": { - "type": "string" - } - }, - "direction": { - "type": "string", - "description": "Direction of traffic to which this firewall applies; default is INGRESS. Note: For INGRESS traffic, it is NOT supported to specify destinationRanges; For EGRESS traffic, it is NOT supported to specify sourceRanges OR sourceTags.", - "enum": [ - "EGRESS", - "INGRESS" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "enableLogging": { - "type": "boolean", - "description": "This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported to the configured export destination for all firewall logs in the network. Logs may be exported to BigQuery or Pub/Sub." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#firewall for firewall rules.", - "default": "compute#firewall" - }, - "name": { - "type": "string", - "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.firewalls.insert", - "compute.firewalls.patch" - ] - } - }, - "network": { - "type": "string", - "description": "URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:\nglobal/networks/default\nIf you choose to specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network \n- projects/myproject/global/networks/my-network \n- global/networks/default" - }, - "priority": { - "type": "integer", - "description": "Priority for this rule. This is an integer between 0 and 65535, both inclusive. When not specified, the value assumed is 1000. Relative priorities determine precedence of conflicting rules. Lower value of priority implies higher precedence (eg, a rule with priority 0 has higher precedence than a rule with priority 1). DENY rules take precedence over ALLOW rules having equal priority.", - "format": "int32" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "sourceRanges": { - "type": "array", - "description": "If source ranges are specified, the firewall will apply only to traffic that has source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Only IPv4 is supported.", - "items": { - "type": "string" - } - }, - "sourceServiceAccounts": { - "type": "array", - "description": "If source service accounts are specified, the firewall will apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both properties for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.", - "items": { - "type": "string" - } - }, - "sourceTags": { - "type": "array", - "description": "If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply.", - "items": { - "type": "string" - } - }, - "targetServiceAccounts": { - "type": "array", - "description": "A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network.", - "items": { - "type": "string" - } - }, - "targetTags": { - "type": "array", - "description": "A list of instance tags indicating sets of instances located in the network that may make network connections as specified in allowed[]. If no targetTags are specified, the firewall rule applies to all instances on the specified network.", - "items": { - "type": "string" - } - } - } - }, - "FirewallList": { - "id": "FirewallList", - "type": "object", - "description": "Contains a list of firewalls.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Firewall resources.", - "items": { - "$ref": "Firewall" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#firewallList for lists of firewalls.", - "default": "compute#firewallList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "FixedOrPercent": { - "id": "FixedOrPercent", - "type": "object", - "description": "Encapsulates numeric value that can be either absolute or relative.", - "properties": { - "calculated": { - "type": "integer", - "description": "[Output Only] Absolute value calculated based on mode: mode = fixed -\u003e calculated = fixed = percent -\u003e calculated = ceiling(percent/100 * base_value)", - "format": "int32" - }, - "fixed": { - "type": "integer", - "description": "fixed must be non-negative.", - "format": "int32" - }, - "percent": { - "type": "integer", - "description": "percent must belong to [0, 100].", - "format": "int32" - } - } - }, - "ForwardingRule": { - "id": "ForwardingRule", - "type": "object", - "description": "A ForwardingRule resource. A ForwardingRule resource specifies which pool of target virtual machines to forward a packet to if it matches the given [IPAddress, IPProtocol, ports] tuple.", - "properties": { - "IPAddress": { - "type": "string", - "description": "The IP address that this forwarding rule is serving on behalf of.\n\nFor global forwarding rules, the address must be a global IP. For regional forwarding rules, the address must live in the same region as the forwarding rule. By default, this field is empty and an ephemeral IPv4 address from the same scope (global or regional) will be assigned. A regional forwarding rule supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6.\n\nWhen the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnetwork configured for the forwarding rule. A reserved address cannot be used. If the field is empty, the IP address will be automatically allocated from the internal IP range of the subnetwork or network configured for this forwarding rule." - }, - "IPProtocol": { - "type": "string", - "description": "The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP, AH, SCTP or ICMP.\n\nWhen the load balancing scheme is INTERNAL, only TCP and UDP are valid.", - "enum": [ - "AH", - "ESP", - "ICMP", - "SCTP", - "TCP", - "UDP" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ] - }, - "backendService": { - "type": "string", - "description": "This field is not used for external load balancing.\n\nFor internal load balancing, this field identifies the BackendService resource to receive the matched traffic." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "ipVersion": { - "type": "string", - "description": "The IP Version that will be used by this forwarding rule. Valid options are IPV4 or IPV6. This can only be specified for a global forwarding rule.", - "enum": [ - "IPV4", - "IPV6", - "UNSPECIFIED_VERSION" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#forwardingRule for Forwarding Rule resources.", - "default": "compute#forwardingRule" - }, - "labelFingerprint": { - "type": "string", - "description": "A fingerprint for the labels being applied to this resource, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve a ForwardingRule.", - "format": "byte" - }, - "labels": { - "type": "object", - "description": "Labels to apply to this resource. These can be later modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.", - "additionalProperties": { - "type": "string" - } - }, - "loadBalancingScheme": { - "type": "string", - "description": "This signifies what the ForwardingRule will be used for and can only take the following values: INTERNAL, EXTERNAL The value of INTERNAL means that this will be used for Internal Network Load Balancing (TCP, UDP). The value of EXTERNAL means that this will be used for External Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy)", - "enum": [ - "EXTERNAL", - "INTERNAL", - "INVALID" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "name": { - "type": "string", - "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "network": { - "type": "string", - "description": "This field is not used for external load balancing.\n\nFor internal load balancing, this field identifies the network that the load balanced IP should belong to for this Forwarding Rule. If this field is not specified, the default network will be used." - }, - "networkTier": { - "type": "string", - "description": "This signifies the networking tier used for configuring this load balancer and can only take the following values: PREMIUM , STANDARD.\n\nFor regional ForwardingRule, the valid values are PREMIUM and STANDARD. For GlobalForwardingRule, the valid value is PREMIUM.\n\nIf this field is not specified, it is assumed to be PREMIUM. If IPAddress is specified, this value must be equal to the networkTier of the Address.", - "enum": [ - "PREMIUM", - "SELECT", - "STANDARD" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "portRange": { - "type": "string", - "description": "This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance.\n\nApplicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges.\n\nSome types of forwarding target have constraints on the acceptable ports: \n- TargetHttpProxy: 80, 8080 \n- TargetHttpsProxy: 443 \n- TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 \n- TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 \n- TargetVpnGateway: 500, 4500\n-" - }, - "ports": { - "type": "array", - "description": "This field is used along with the backend_service field for internal load balancing.\n\nWhen the load balancing scheme is INTERNAL, a single port or a comma separated list of ports can be configured. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule.\n\nYou may specify a maximum of up to 5 ports.", - "items": { - "type": "string" - } - }, - "region": { - "type": "string", - "description": "[Output Only] URL of the region where the regional forwarding rule resides. This field is not applicable to global forwarding rules." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "serviceLabel": { - "type": "string", - "description": "An optional prefix to the service name for this Forwarding Rule. If specified, will be the first label of the fully qualified service name.\n\nThe label must be 1-63 characters long, and comply with RFC1035. Specifically, the label must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.\n\nThis field is only used for internal load balancing.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "serviceName": { - "type": "string", - "description": "[Output Only] The internal fully qualified service name for this Forwarding Rule.\n\nThis field is only used for internal load balancing." - }, - "subnetwork": { - "type": "string", - "description": "This field is not used for external load balancing.\n\nFor internal load balancing, this field identifies the subnetwork that the load balanced IP should belong to for this Forwarding Rule.\n\nIf the network specified is in auto subnet mode, this field is optional. However, if the network is in custom subnet mode, a subnetwork must be specified." - }, - "target": { - "type": "string", - "description": "The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must live in the same region as the forwarding rule. For global forwarding rules, this target must be a global load balancing resource. The forwarded traffic must be of a type appropriate to the target object.\n\nThis field is not used for internal load balancing." - } - } - }, - "ForwardingRuleAggregatedList": { - "id": "ForwardingRuleAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of ForwardingRulesScopedList resources.", - "additionalProperties": { - "$ref": "ForwardingRulesScopedList", - "description": "Name of the scope containing this set of addresses." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#forwardingRuleAggregatedList for lists of forwarding rules.", - "default": "compute#forwardingRuleAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "ForwardingRuleList": { - "id": "ForwardingRuleList", - "type": "object", - "description": "Contains a list of ForwardingRule resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of ForwardingRule resources.", - "items": { - "$ref": "ForwardingRule" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#forwardingRuleList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "ForwardingRulesScopedList": { - "id": "ForwardingRulesScopedList", - "type": "object", - "properties": { - "forwardingRules": { - "type": "array", - "description": "List of forwarding rules contained in this scope.", - "items": { - "$ref": "ForwardingRule" - } - }, - "warning": { - "type": "object", - "description": "Informational warning which replaces the list of forwarding rules when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "GlobalSetLabelsRequest": { - "id": "GlobalSetLabelsRequest", - "type": "object", - "properties": { - "labelFingerprint": { - "type": "string", - "description": "The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash when updating or changing labels. Make a get() request to the resource to get the latest fingerprint.", - "format": "byte" - }, - "labels": { - "type": "object", - "description": "A list of labels to apply for this resource. Each label key & value must comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. For example, \"webserver-frontend\": \"images\". A label value can also be empty (e.g. \"my-label\": \"\").", - "additionalProperties": { - "type": "string" - } - } - } - }, - "GuestAttributes": { - "id": "GuestAttributes", - "type": "object", - "description": "A guest attributes entry.", - "properties": { - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#guestAttributes for guest attributes entry.", - "default": "compute#guestAttributes" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - }, - "variableKey": { - "type": "string", - "description": "The key to search for." - }, - "variableValue": { - "type": "string", - "description": "[Output Only] The value found for the requested key." - } - } - }, - "GuestOsFeature": { - "id": "GuestOsFeature", - "type": "object", - "description": "Guest OS features.", - "properties": { - "type": { - "type": "string", - "description": "The type of supported feature. Currently only VIRTIO_SCSI_MULTIQUEUE is supported. For newer Windows images, the server might also populate this property with the value WINDOWS to indicate that this is a Windows image. This value is purely informational and does not enable or disable any features.", - "enum": [ - "FEATURE_TYPE_UNSPECIFIED", - "MULTI_IP_SUBNET", - "VIRTIO_SCSI_MULTIQUEUE", - "WINDOWS" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ] - } - } - }, - "HTTP2HealthCheck": { - "id": "HTTP2HealthCheck", - "type": "object", - "properties": { - "host": { - "type": "string", - "description": "The value of the host header in the HTTP/2 health check request. If left empty (default value), the IP on behalf of which this health check is performed will be used." - }, - "port": { - "type": "integer", - "description": "The TCP port number for the health check request. The default value is 443. Valid values are 1 through 65535.", - "format": "int32" - }, - "portName": { - "type": "string", - "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence." - }, - "proxyHeader": { - "type": "string", - "description": "Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "requestPath": { - "type": "string", - "description": "The request path of the HTTP/2 health check request. The default value is /." - }, - "response": { - "type": "string", - "description": "The string to match anywhere in the first 1024 bytes of the response body. If left empty (the default value), the status code determines health. The response data can only be ASCII." - } - } - }, - "HTTPHealthCheck": { - "id": "HTTPHealthCheck", - "type": "object", - "properties": { - "host": { - "type": "string", - "description": "The value of the host header in the HTTP health check request. If left empty (default value), the IP on behalf of which this health check is performed will be used." - }, - "port": { - "type": "integer", - "description": "The TCP port number for the health check request. The default value is 80. Valid values are 1 through 65535.", - "format": "int32" - }, - "portName": { - "type": "string", - "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence." - }, - "proxyHeader": { - "type": "string", - "description": "Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "requestPath": { - "type": "string", - "description": "The request path of the HTTP health check request. The default value is /." - }, - "response": { - "type": "string", - "description": "The string to match anywhere in the first 1024 bytes of the response body. If left empty (the default value), the status code determines health. The response data can only be ASCII." - } - } - }, - "HTTPSHealthCheck": { - "id": "HTTPSHealthCheck", - "type": "object", - "properties": { - "host": { - "type": "string", - "description": "The value of the host header in the HTTPS health check request. If left empty (default value), the IP on behalf of which this health check is performed will be used." - }, - "port": { - "type": "integer", - "description": "The TCP port number for the health check request. The default value is 443. Valid values are 1 through 65535.", - "format": "int32" - }, - "portName": { - "type": "string", - "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence." - }, - "proxyHeader": { - "type": "string", - "description": "Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "requestPath": { - "type": "string", - "description": "The request path of the HTTPS health check request. The default value is /." - }, - "response": { - "type": "string", - "description": "The string to match anywhere in the first 1024 bytes of the response body. If left empty (the default value), the status code determines health. The response data can only be ASCII." - } - } - }, - "HealthCheck": { - "id": "HealthCheck", - "type": "object", - "description": "An HealthCheck resource. This resource defines a template for how individual virtual machines should be checked for health, via one of the supported protocols.", - "properties": { - "checkIntervalSec": { - "type": "integer", - "description": "How often (in seconds) to send a health check. The default value is 5 seconds.", - "format": "int32" - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in 3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "healthyThreshold": { - "type": "integer", - "description": "A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.", - "format": "int32" - }, - "http2HealthCheck": { - "$ref": "HTTP2HealthCheck" - }, - "httpHealthCheck": { - "$ref": "HTTPHealthCheck" - }, - "httpsHealthCheck": { - "$ref": "HTTPSHealthCheck" - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "Type of the resource.", - "default": "compute#healthCheck" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "sslHealthCheck": { - "$ref": "SSLHealthCheck" - }, - "tcpHealthCheck": { - "$ref": "TCPHealthCheck" - }, - "timeoutSec": { - "type": "integer", - "description": "How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.", - "format": "int32" - }, - "type": { - "type": "string", - "description": "Specifies the type of the healthCheck, either TCP, SSL, HTTP or HTTPS. If not specified, the default is TCP. Exactly one of the protocol-specific health check field must be specified, which must match type field.", - "enum": [ - "HTTP", - "HTTP2", - "HTTPS", - "INVALID", - "SSL", - "TCP", - "UDP" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "" - ] - }, - "udpHealthCheck": { - "$ref": "UDPHealthCheck" - }, - "unhealthyThreshold": { - "type": "integer", - "description": "A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.", - "format": "int32" - } - } - }, - "HealthCheckList": { - "id": "HealthCheckList", - "type": "object", - "description": "Contains a list of HealthCheck resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of HealthCheck resources.", - "items": { - "$ref": "HealthCheck" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#healthCheckList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "HealthCheckReference": { - "id": "HealthCheckReference", - "type": "object", - "description": "A full or valid partial URL to a health check. For example, the following are valid URLs: \n- https://www.googleapis.com/compute/beta/projects/project-id/global/httpHealthChecks/health-check \n- projects/project-id/global/httpHealthChecks/health-check \n- global/httpHealthChecks/health-check", - "properties": { - "healthCheck": { - "type": "string" - } - } - }, - "HealthStatus": { - "id": "HealthStatus", - "type": "object", - "properties": { - "healthState": { - "type": "string", - "description": "Health state of the instance.", - "enum": [ - "HEALTHY", - "UNHEALTHY" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "instance": { - "type": "string", - "description": "URL of the instance resource." - }, - "ipAddress": { - "type": "string", - "description": "The IP address represented by this resource." - }, - "port": { - "type": "integer", - "description": "The port on the instance.", - "format": "int32" - } - } - }, - "Host": { - "id": "Host", - "type": "object", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "[Output Only] An optional textual description of the resource." - }, - "hostType": { - "type": "string", - "description": "Full or partial URL of the host type resource to use for this host, in the format: zones/zone/hostTypes/host-type. This is provided by the client when the host is created. For example, the following is a valid partial url to a predefined host type:\n\nzones/us-central1-b/hostTypes/n1-host-64-416" - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "instances": { - "type": "array", - "description": "A list of resource URLs to the virtual machine instances in this host. They must live in zones contained in the same region as this host.", - "items": { - "type": "string" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] The type of the resource. Always compute#host for host.", - "default": "compute#host" - }, - "labelFingerprint": { - "type": "string", - "description": "A fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.\n\nTo see the latest fingerprint, make get() request to the host.", - "format": "byte" - }, - "labels": { - "type": "object", - "description": "Labels to apply to this host.", - "additionalProperties": { - "type": "string" - } - }, - "name": { - "type": "string", - "description": "The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "status": { - "type": "string", - "description": "[Output Only] The status of the host. One of the following values: CREATING, READY, REPAIR, and DELETING.", - "enum": [ - "CREATING", - "DELETING", - "INVALID", - "READY", - "REPAIR" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ] - }, - "statusMessage": { - "type": "string", - "description": "[Output Only] An optional, human-readable explanation of the status." - }, - "zone": { - "type": "string", - "description": "[Output Only] The name of the zone where the host resides, such as us-central1-a." - } - } - }, - "HostAggregatedList": { - "id": "HostAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of HostsScopedList resources.", - "additionalProperties": { - "$ref": "HostsScopedList", - "description": "[Output Only] Name of the scope containing this set of hosts." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#hostAggregatedList for aggregated lists of hosts.", - "default": "compute#hostAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "HostList": { - "id": "HostList", - "type": "object", - "description": "Contains a list of hosts.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Host resources.", - "items": { - "$ref": "Host" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#hostList for lists of hosts.", - "default": "compute#hostList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "HostRule": { - "id": "HostRule", - "type": "object", - "description": "UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.", - "properties": { - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "hosts": { - "type": "array", - "description": "The list of host patterns to match. They must be valid hostnames, except * will match any string of ([a-z0-9-.]*). In that case, * must be the first character and must be followed in the pattern by either - or ..", - "items": { - "type": "string" - } - }, - "pathMatcher": { - "type": "string", - "description": "The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion." - } - } - }, - "HostType": { - "id": "HostType", - "type": "object", - "description": "A Host Type resource.", - "properties": { - "cpuPlatform": { - "type": "string", - "description": "[Output Only] The CPU platform used by this host type." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "[Output Only] The deprecation status associated with this host type." - }, - "description": { - "type": "string", - "description": "[Output Only] An optional textual description of the resource." - }, - "guestCpus": { - "type": "integer", - "description": "[Output Only] The number of virtual CPUs that are available to the host type.", - "format": "int32" - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] The type of the resource. Always compute#hostType for host types.", - "default": "compute#hostType" - }, - "localSsdGb": { - "type": "integer", - "description": "[Output Only] Local SSD available to the host type, defined in GB.", - "format": "int32" - }, - "memoryMb": { - "type": "integer", - "description": "[Output Only] The amount of physical memory available to the host type, defined in MB.", - "format": "int32" - }, - "name": { - "type": "string", - "description": "[Output Only] Name of the resource.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "zone": { - "type": "string", - "description": "[Output Only] The name of the zone where the host type resides, such as us-central1-a." - } - } - }, - "HostTypeAggregatedList": { - "id": "HostTypeAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of HostTypesScopedList resources.", - "additionalProperties": { - "$ref": "HostTypesScopedList", - "description": "[Output Only] Name of the scope containing this set of host types." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource.Always compute#hostTypeAggregatedList for aggregated lists of host types.", - "default": "compute#hostTypeAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "HostTypeList": { - "id": "HostTypeList", - "type": "object", - "description": "Contains a list of host types.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of HostType resources.", - "items": { - "$ref": "HostType" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource.Always compute#hostTypeList for lists of host types.", - "default": "compute#hostTypeList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "HostTypesScopedList": { - "id": "HostTypesScopedList", - "type": "object", - "properties": { - "hostTypes": { - "type": "array", - "description": "[Output Only] List of host types contained in this scope.", - "items": { - "$ref": "HostType" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] An informational warning that appears when the host types list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "HostsScopedList": { - "id": "HostsScopedList", - "type": "object", - "properties": { - "hosts": { - "type": "array", - "description": "[Output Only] List of hosts contained in this scope.", - "items": { - "$ref": "Host" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] An informational warning that appears when the host list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "HttpHealthCheck": { - "id": "HttpHealthCheck", - "type": "object", - "description": "An HttpHealthCheck resource. This resource defines a template for how individual instances should be checked for health, via HTTP.", - "properties": { - "checkIntervalSec": { - "type": "integer", - "description": "How often (in seconds) to send a health check. The default value is 5 seconds.", - "format": "int32" - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "healthyThreshold": { - "type": "integer", - "description": "A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.", - "format": "int32" - }, - "host": { - "type": "string", - "description": "The value of the host header in the HTTP health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#httpHealthCheck for HTTP health checks.", - "default": "compute#httpHealthCheck" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "port": { - "type": "integer", - "description": "The TCP port number for the HTTP health check request. The default value is 80.", - "format": "int32" - }, - "requestPath": { - "type": "string", - "description": "The request path of the HTTP health check request. The default value is /." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "timeoutSec": { - "type": "integer", - "description": "How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.", - "format": "int32" - }, - "unhealthyThreshold": { - "type": "integer", - "description": "A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.", - "format": "int32" - } - } - }, - "HttpHealthCheckList": { - "id": "HttpHealthCheckList", - "type": "object", - "description": "Contains a list of HttpHealthCheck resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of HttpHealthCheck resources.", - "items": { - "$ref": "HttpHealthCheck" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#httpHealthCheckList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "HttpsHealthCheck": { - "id": "HttpsHealthCheck", - "type": "object", - "description": "An HttpsHealthCheck resource. This resource defines a template for how individual instances should be checked for health, via HTTPS.", - "properties": { - "checkIntervalSec": { - "type": "integer", - "description": "How often (in seconds) to send a health check. The default value is 5 seconds.", - "format": "int32" - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "healthyThreshold": { - "type": "integer", - "description": "A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.", - "format": "int32" - }, - "host": { - "type": "string", - "description": "The value of the host header in the HTTPS health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "Type of the resource.", - "default": "compute#httpsHealthCheck" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "port": { - "type": "integer", - "description": "The TCP port number for the HTTPS health check request. The default value is 443.", - "format": "int32" - }, - "requestPath": { - "type": "string", - "description": "The request path of the HTTPS health check request. The default value is \"/\"." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "timeoutSec": { - "type": "integer", - "description": "How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have a greater value than checkIntervalSec.", - "format": "int32" - }, - "unhealthyThreshold": { - "type": "integer", - "description": "A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.", - "format": "int32" - } - } - }, - "HttpsHealthCheckList": { - "id": "HttpsHealthCheckList", - "type": "object", - "description": "Contains a list of HttpsHealthCheck resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of HttpsHealthCheck resources.", - "items": { - "$ref": "HttpsHealthCheck" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#httpsHealthCheckList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "Image": { - "id": "Image", - "type": "object", - "description": "An Image resource.", - "properties": { - "archiveSizeBytes": { - "type": "string", - "description": "Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).", - "format": "int64" - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "The deprecation status associated with this image." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "diskSizeGb": { - "type": "string", - "description": "Size of the image when restored onto a persistent disk (in GB).", - "format": "int64" - }, - "family": { - "type": "string", - "description": "The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035." - }, - "guestOsFeatures": { - "type": "array", - "description": "A list of features to enable on the guest OS. Applicable for bootable images only. Currently, only one feature can be enabled, VIRTIO_SCSI_MULTIQUEUE, which allows each virtual CPU to have its own queue. For Windows images, you can only enable VIRTIO_SCSI_MULTIQUEUE on images with driver version 1.2.0.1621 or higher. Linux images with kernel versions 3.17 and higher will support VIRTIO_SCSI_MULTIQUEUE.\n\nFor new Windows images, the server might also populate this field with the value WINDOWS, to indicate that this is a Windows image. This value is purely informational and does not enable or disable any features.", - "items": { - "$ref": "GuestOsFeature" - } - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "imageEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Encrypts the image using a customer-supplied encryption key.\n\nAfter you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image).\n\nCustomer-supplied encryption keys do not protect access to metadata of the disk.\n\nIf you do not provide an encryption key when creating the image, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the image later." - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#image for images.", - "default": "compute#image" - }, - "labelFingerprint": { - "type": "string", - "description": "A fingerprint for the labels being applied to this image, which is essentially a hash of the labels used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve an image.", - "format": "byte" - }, - "labels": { - "type": "object", - "description": "Labels to apply to this image. These can be later modified by the setLabels method.", - "additionalProperties": { - "type": "string" - } - }, - "licenseCodes": { - "type": "array", - "description": "Integer license codes indicating which licenses are attached to this image.", - "items": { - "type": "string", - "format": "int64" - } - }, - "licenses": { - "type": "array", - "description": "Any applicable license URI.", - "items": { - "type": "string" - } - }, - "name": { - "type": "string", - "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.images.insert" - ] - } - }, - "rawDisk": { - "type": "object", - "description": "The parameters of the raw disk image.", - "properties": { - "containerType": { - "type": "string", - "description": "The format used to encode and transmit the block device, which should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created.", - "enum": [ - "TAR" - ], - "enumDescriptions": [ - "" - ] - }, - "sha1Checksum": { - "type": "string", - "description": "An optional SHA1 checksum of the disk image before unpackaging; provided by the client when the disk image is created.", - "pattern": "[a-f0-9]{40}" - }, - "source": { - "type": "string", - "description": "The full Google Cloud Storage URL where the disk image is stored. You must provide either this property or the sourceDisk property but not both.", - "annotations": { - "required": [ - "compute.images.insert" - ] - } - } - } - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "sourceDisk": { - "type": "string", - "description": "URL of the source disk used to create this image. This can be a full or valid partial URL. You must provide either this property or the rawDisk.source property but not both to create an image. For example, the following are valid values: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk \n- projects/project/zones/zone/disks/disk \n- zones/zone/disks/disk" - }, - "sourceDiskEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key." - }, - "sourceDiskId": { - "type": "string", - "description": "The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name." - }, - "sourceImage": { - "type": "string", - "description": "URL of the source image used to create this image. This can be a full or valid partial URL. You must provide exactly one of: \n- this property, or \n- the rawDisk.source property, or \n- the sourceDisk property in order to create an image." - }, - "sourceImageEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key." - }, - "sourceImageId": { - "type": "string", - "description": "[Output Only] The ID value of the image used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given image name." - }, - "sourceType": { - "type": "string", - "description": "The type of the image used to create this disk. The default and only value is RAW", - "default": "RAW", - "enum": [ - "RAW" - ], - "enumDescriptions": [ - "" - ] - }, - "status": { - "type": "string", - "description": "[Output Only] The status of the image. An image can be used to create other resources, such as instances, only after the image has been successfully created and the status is set to READY. Possible values are FAILED, PENDING, or READY.", - "enum": [ - "FAILED", - "PENDING", - "READY" - ], - "enumDescriptions": [ - "", - "", - "" - ] - } - } - }, - "ImageList": { - "id": "ImageList", - "type": "object", - "description": "Contains a list of images.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Image resources.", - "items": { - "$ref": "Image" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#imageList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "Instance": { - "id": "Instance", - "type": "object", - "description": "An Instance resource.", - "properties": { - "canIpForward": { - "type": "boolean", - "description": "Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding." - }, - "cpuPlatform": { - "type": "string", - "description": "[Output Only] The CPU platform used by this instance." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "disks": { - "type": "array", - "description": "Array of disks associated with this instance. Persistent disks must be created before you can assign them.", - "items": { - "$ref": "AttachedDisk" - } - }, - "guestAccelerators": { - "type": "array", - "description": "List of the type and count of accelerator cards attached to the instance.", - "items": { - "$ref": "AcceleratorConfig" - } - }, - "host": { - "type": "string", - "description": "Full or partial URL of the host resource that the instance should be placed on, in the format: zones/zone/hosts/host.\n\nOptional, sole-tenant Host (physical machine) that the instance will be placed on when it's created. The instance is guaranteed to be placed on the same machine as other instances with the same sole-tenant host.\n\nThe request will be rejected if the sole-tenant host has run out of resources." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "instanceEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Encrypts or decrypts data for an instance with a customer-supplied encryption key.\n\nIf you are creating a new instance, this field encrypts the local SSD and in-memory contents of the instance using a key that you provide.\n\nIf you are restarting an instance protected with a customer-supplied encryption key, you must provide the correct key in order to successfully restart the instance.\n\nIf you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key and you do not need to provide a key to start the instance later.\n\nInstance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt local SSDs and in-memory content in a managed instance group." - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#instance for instances.", - "default": "compute#instance" - }, - "labelFingerprint": { - "type": "string", - "description": "A fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.\n\nTo see the latest fingerprint, make get() request to the instance.", - "format": "byte" - }, - "labels": { - "type": "object", - "description": "Labels to apply to this instance. These can be later modified by the setLabels method.", - "additionalProperties": { - "type": "string" - } - }, - "machineType": { - "type": "string", - "description": "Full or partial URL of the machine type resource to use for this instance, in the format: zones/zone/machineTypes/machine-type. This is provided by the client when the instance is created. For example, the following is a valid partial url to a predefined machine type:\n\nzones/us-central1-f/machineTypes/n1-standard-1 \n\nTo create a custom machine type, provide a URL to a machine type in the following format, where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, etc), and MEMORY is the total memory for this instance. Memory must be a multiple of 256 MB and must be supplied in MB (e.g. 5 GB of memory is 5120 MB):\n\nzones/zone/machineTypes/custom-CPUS-MEMORY \n\nFor example: zones/us-central1-f/machineTypes/custom-4-5120 \n\nFor a full list of restrictions, read the Specifications for custom machine types.", - "annotations": { - "required": [ - "compute.instances.insert" - ] - } - }, - "metadata": { - "$ref": "Metadata", - "description": "The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys." - }, - "minCpuPlatform": { - "type": "string", - "description": "Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: \"Intel Haswell\" or minCpuPlatform: \"Intel Sandy Bridge\"." - }, - "name": { - "type": "string", - "description": "The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.instances.insert" - ] - } - }, - "networkInterfaces": { - "type": "array", - "description": "An array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Only one interface is supported per instance.", - "items": { - "$ref": "NetworkInterface" - } - }, - "scheduling": { - "$ref": "Scheduling", - "description": "Sets the scheduling options for this instance." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - }, - "serviceAccounts": { - "type": "array", - "description": "A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.\n\nService accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Service Accounts for more information.", - "items": { - "$ref": "ServiceAccount" - } - }, - "startRestricted": { - "type": "boolean", - "description": "[Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity." - }, - "status": { - "type": "string", - "description": "[Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.", - "enum": [ - "PROVISIONING", - "RUNNING", - "STAGING", - "STOPPED", - "STOPPING", - "SUSPENDED", - "SUSPENDING", - "TERMINATED" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "statusMessage": { - "type": "string", - "description": "[Output Only] An optional, human-readable explanation of the status." - }, - "tags": { - "$ref": "Tags", - "description": "A list of tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035." - }, - "zone": { - "type": "string", - "description": "[Output Only] URL of the zone where the instance resides." - } - } - }, - "InstanceAggregatedList": { - "id": "InstanceAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of InstancesScopedList resources.", - "additionalProperties": { - "$ref": "InstancesScopedList", - "description": "[Output Only] Name of the scope containing this set of instances." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#instanceAggregatedList for aggregated lists of Instance resources.", - "default": "compute#instanceAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "InstanceGroup": { - "id": "InstanceGroup", - "type": "object", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] The creation timestamp for this instance group in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "fingerprint": { - "type": "string", - "description": "[Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently.", - "format": "byte" - }, - "id": { - "type": "string", - "description": "[Output Only] A unique identifier for this instance group, generated by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] The resource type, which is always compute#instanceGroup for instance groups.", - "default": "compute#instanceGroup" - }, - "name": { - "type": "string", - "description": "The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.instanceGroupManagers.insert" - ] - } - }, - "namedPorts": { - "type": "array", - "description": "Assigns a name to a port number. For example: {name: \"http\", port: 80}\n\nThis allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: \"http\", port: 80},{name: \"http\", port: 8080}] \n\nNamed ports apply to all instances in this instance group.", - "items": { - "$ref": "NamedPort" - } - }, - "network": { - "type": "string", - "description": "The URL of the network to which all instances in the instance group belong." - }, - "region": { - "type": "string", - "description": "The URL of the region where the instance group is located (for regional resources)." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] The URL for this instance group. The server generates this URL." - }, - "size": { - "type": "integer", - "description": "[Output Only] The total number of instances in the instance group.", - "format": "int32" - }, - "subnetwork": { - "type": "string", - "description": "The URL of the subnetwork to which all instances in the instance group belong." - }, - "zone": { - "type": "string", - "description": "[Output Only] The URL of the zone where the instance group is located (for zonal resources)." - } - } - }, - "InstanceGroupAggregatedList": { - "id": "InstanceGroupAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of InstanceGroupsScopedList resources.", - "additionalProperties": { - "$ref": "InstanceGroupsScopedList", - "description": "The name of the scope that contains this set of instance groups." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] The resource type, which is always compute#instanceGroupAggregatedList for aggregated lists of instance groups.", - "default": "compute#instanceGroupAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "InstanceGroupList": { - "id": "InstanceGroupList", - "type": "object", - "description": "A list of InstanceGroup resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of InstanceGroup resources.", - "items": { - "$ref": "InstanceGroup" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] The resource type, which is always compute#instanceGroupList for instance group lists.", - "default": "compute#instanceGroupList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "InstanceGroupManager": { - "id": "InstanceGroupManager", - "type": "object", - "description": "An Instance Group Manager resource.", - "properties": { - "activities": { - "$ref": "InstanceGroupManagerActivities" - }, - "autoHealingPolicies": { - "type": "array", - "description": "The autohealing policy for this managed instance group. You can specify only one value.", - "items": { - "$ref": "InstanceGroupManagerAutoHealingPolicy" - } - }, - "baseInstanceName": { - "type": "string", - "description": "The base instance name to use for instances in this group. The value must be 1-58 characters long. Instances are named by appending a hyphen and a random four-character string to the base instance name. The base instance name must comply with RFC1035.", - "pattern": "[a-z][-a-z0-9]{0,57}", - "annotations": { - "required": [ - "compute.instanceGroupManagers.insert" - ] - } - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] The creation timestamp for this managed instance group in RFC3339 text format." - }, - "currentActions": { - "$ref": "InstanceGroupManagerActionsSummary", - "description": "[Output Only] The list of instance actions and the number of instances in this managed instance group that are scheduled for each of those actions." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "distributionPolicy": { - "$ref": "DistributionPolicy", - "description": "Policy valid only for regional managed instance groups." - }, - "failoverAction": { - "type": "string", - "description": "The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.", - "enum": [ - "NO_FAILOVER", - "UNKNOWN" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "fingerprint": { - "type": "string", - "description": "[Output Only] The fingerprint of the resource data. You can use this optional field for optimistic locking when you update the resource.", - "format": "byte" - }, - "id": { - "type": "string", - "description": "[Output Only] A unique identifier for this resource type. The server generates this identifier.", - "format": "uint64" - }, - "instanceGroup": { - "type": "string", - "description": "[Output Only] The URL of the Instance Group resource." - }, - "instanceTemplate": { - "type": "string", - "description": "The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group." - }, - "kind": { - "type": "string", - "description": "[Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.", - "default": "compute#instanceGroupManager" - }, - "name": { - "type": "string", - "description": "The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.instanceGroupManagers.insert", - "compute.regionInstanceGroupManagers.insert" - ] - } - }, - "namedPorts": { - "type": "array", - "description": "Named ports configured for the Instance Groups complementary to this Instance Group Manager.", - "items": { - "$ref": "NamedPort" - } - }, - "pendingActions": { - "$ref": "InstanceGroupManagerPendingActionsSummary", - "description": "[Output Only] The list of instance actions and the number of instances in this managed instance group that are pending for each of those actions." - }, - "region": { - "type": "string", - "description": "[Output Only] The URL of the region where the managed instance group resides (for regional resources)." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] The URL for this managed instance group. The server defines this URL." - }, - "serviceAccount": { - "type": "string", - "description": "Service account will be used as credentials for all operations performed by managed instance group on instances. The service accounts needs all permissions required to create and delete instances. When not specified, the service account {projectNumber}@cloudservices.gserviceaccount.com will be used." - }, - "statefulPolicy": { - "$ref": "InstanceGroupManagerStatefulPolicy", - "description": "Stateful configuration for this Instanced Group Manager" - }, - "targetPools": { - "type": "array", - "description": "The URLs for all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group.", - "items": { - "type": "string" - } - }, - "targetSize": { - "type": "integer", - "description": "The target number of running instances for this managed instance group. Deleting or abandoning instances reduces this number. Resizing the group changes this number.", - "format": "int32", - "annotations": { - "required": [ - "compute.instanceGroupManagers.insert", - "compute.regionInstanceGroupManagers.insert" - ] - } - }, - "updatePolicy": { - "$ref": "InstanceGroupManagerUpdatePolicy", - "description": "The update policy for this managed instance group." - }, - "versions": { - "type": "array", - "description": "Versions supported by this IGM. User should set this field if they need fine-grained control over how many instances in each version are run by this IGM. Versions are keyed by instanceTemplate. Every instanceTemplate can appear at most once. This field overrides instanceTemplate field. If both instanceTemplate and versions are set, the user receives a warning. \"instanceTemplate: X\" is semantically equivalent to \"versions [ { instanceTemplate: X } ]\". Exactly one version must have targetSize field left unset. Size of such a version will be calculated automatically.", - "items": { - "$ref": "InstanceGroupManagerVersion" - } - }, - "zone": { - "type": "string", - "description": "[Output Only] The URL of the zone where the managed instance group is located (for zonal resources)." - } - } - }, - "InstanceGroupManagerActionsSummary": { - "id": "InstanceGroupManagerActionsSummary", - "type": "object", - "properties": { - "abandoning": { - "type": "integer", - "description": "[Output Only] The total number of instances in the managed instance group that are scheduled to be abandoned. Abandoning an instance removes it from the managed instance group without deleting it.", - "format": "int32" - }, - "creating": { - "type": "integer", - "description": "[Output Only] The number of instances in the managed instance group that are scheduled to be created or are currently being created. If the group fails to create any of these instances, it tries again until it creates the instance successfully.\n\nIf you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.", - "format": "int32" - }, - "creatingWithoutRetries": { - "type": "integer", - "description": "[Output Only] The number of instances that the managed instance group will attempt to create. The group attempts to create each instance only once. If the group fails to create any of these instances, it decreases the group's targetSize value accordingly.", - "format": "int32" - }, - "deleting": { - "type": "integer", - "description": "[Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.", - "format": "int32" - }, - "none": { - "type": "integer", - "description": "[Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.", - "format": "int32" - }, - "recreating": { - "type": "integer", - "description": "[Output Only] The number of instances in the managed instance group that are scheduled to be recreated or are currently being being recreated. Recreating an instance deletes the existing root persistent disk and creates a new disk from the image that is defined in the instance template.", - "format": "int32" - }, - "refreshing": { - "type": "integer", - "description": "[Output Only] The number of instances in the managed instance group that are being reconfigured with properties that do not require a restart or a recreate action. For example, setting or removing target pools for the instance.", - "format": "int32" - }, - "restarting": { - "type": "integer", - "description": "[Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.", - "format": "int32" - }, - "verifying": { - "type": "integer", - "description": "[Output Only] The number of instances in the managed instance group that are being verified. More details regarding verification process are covered in the documentation of ManagedInstance.InstanceAction.VERIFYING enum field.", - "format": "int32" - } - } - }, - "InstanceGroupManagerActivities": { - "id": "InstanceGroupManagerActivities", - "type": "object", - "properties": { - "autohealing": { - "type": "string", - "enum": [ - "PERMITTED", - "PROHIBITED" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "autohealingHealthCheckBased": { - "type": "string", - "enum": [ - "PERMITTED", - "PROHIBITED" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "autoscalingDown": { - "type": "string", - "enum": [ - "PERMITTED", - "PROHIBITED" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "autoscalingUp": { - "type": "string", - "enum": [ - "PERMITTED", - "PROHIBITED" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "creatingInstances": { - "type": "string", - "enum": [ - "PERMITTED", - "PROHIBITED" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "deletingInstances": { - "type": "string", - "enum": [ - "PERMITTED", - "PROHIBITED" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "recreatingInstances": { - "type": "string", - "enum": [ - "PERMITTED", - "PROHIBITED" - ], - "enumDescriptions": [ - "", - "" - ] - } - } - }, - "InstanceGroupManagerAggregatedList": { - "id": "InstanceGroupManagerAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of InstanceGroupManagersScopedList resources.", - "additionalProperties": { - "$ref": "InstanceGroupManagersScopedList", - "description": "[Output Only] The name of the scope that contains this set of managed instance groups." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] The resource type, which is always compute#instanceGroupManagerAggregatedList for an aggregated list of managed instance groups.", - "default": "compute#instanceGroupManagerAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "InstanceGroupManagerAutoHealingPolicy": { - "id": "InstanceGroupManagerAutoHealingPolicy", - "type": "object", - "properties": { - "healthCheck": { - "type": "string", - "description": "The URL for the health check that signals autohealing." - }, - "initialDelaySec": { - "type": "integer", - "description": "The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600].", - "format": "int32" - }, - "maxUnavailable": { - "$ref": "FixedOrPercent", - "description": "Maximum number of instances that can be unavailable when autohealing. The instance is considered available if all of the following conditions are satisfied: 1. Instance's status is RUNNING. 2. Instance's liveness health check result was observed to be HEALTHY at least once. By default, a percent value of 100% is used." - } - } - }, - "InstanceGroupManagerList": { - "id": "InstanceGroupManagerList", - "type": "object", - "description": "[Output Only] A list of managed instance groups.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of InstanceGroupManager resources.", - "items": { - "$ref": "InstanceGroupManager" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] The resource type, which is always compute#instanceGroupManagerList for a list of managed instance groups.", - "default": "compute#instanceGroupManagerList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "InstanceGroupManagerPendingActionsSummary": { - "id": "InstanceGroupManagerPendingActionsSummary", - "type": "object", - "properties": { - "creating": { - "type": "integer", - "description": "[Output Only] The number of instances in the managed instance group that are pending to be created.", - "format": "int32" - }, - "deleting": { - "type": "integer", - "description": "[Output Only] The number of instances in the managed instance group that are pending to be deleted.", - "format": "int32" - }, - "recreating": { - "type": "integer", - "description": "[Output Only] The number of instances in the managed instance group that are pending to be recreated.", - "format": "int32" - }, - "restarting": { - "type": "integer", - "description": "[Output Only] The number of instances in the managed instance group that are pending to be restarted.", - "format": "int32" - } - } - }, - "InstanceGroupManagerStatefulPolicy": { - "id": "InstanceGroupManagerStatefulPolicy", - "type": "object", - "properties": { - "preservedDisks": { - "type": "array", - "description": "Disks created on the instances that will be preserved on instance delete, resize down, etc.", - "items": { - "$ref": "InstanceGroupManagerStatefulPolicyDiskPolicy" - } - } - } - }, - "InstanceGroupManagerStatefulPolicyDiskPolicy": { - "id": "InstanceGroupManagerStatefulPolicyDiskPolicy", - "type": "object", - "properties": { - "deviceName": { - "type": "string", - "description": "Device name of the disk to be preserved" - } - } - }, - "InstanceGroupManagerUpdatePolicy": { - "id": "InstanceGroupManagerUpdatePolicy", - "type": "object", - "properties": { - "maxSurge": { - "$ref": "FixedOrPercent", - "description": "Maximum number of instances that can be created above the InstanceGroupManager.targetSize during the update process. By default, a fixed value of 1 is used. Using maxSurge \u003e 0 will cause instance names to change during the update process. At least one of { maxSurge, maxUnavailable } must be greater than 0." - }, - "maxUnavailable": { - "$ref": "FixedOrPercent", - "description": "Maximum number of instances that can be unavailable during the update process. The instance is considered available if all of the following conditions are satisfied: 1. Instance's status is RUNNING. 2. Instance's liveness health check result was observed to be HEALTHY at least once. By default, a fixed value of 1 is used. At least one of { maxSurge, maxUnavailable } must be greater than 0." - }, - "minReadySec": { - "type": "integer", - "description": "Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].", - "format": "int32" - }, - "minimalAction": { - "type": "string", - "description": "Minimal action to be taken on an instance. The order of action types is: RESTART \u003c REPLACE.", - "enum": [ - "NONE", - "REFRESH", - "REPLACE", - "RESTART" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ] - }, - "type": { - "type": "string", - "enum": [ - "OPPORTUNISTIC", - "PROACTIVE" - ], - "enumDescriptions": [ - "", - "" - ] - } - } - }, - "InstanceGroupManagerVersion": { - "id": "InstanceGroupManagerVersion", - "type": "object", - "properties": { - "instanceTemplate": { - "type": "string" - }, - "name": { - "type": "string", - "description": "Name of the version. Unique among all versions in the scope of this managed instance group." - }, - "tag": { - "type": "string", - "description": "Tag describing the version. Used to trigger rollout of a target version even if instance_template remains unchanged. Deprecated in favor of 'name'." - }, - "targetSize": { - "$ref": "FixedOrPercent", - "description": "Intended number of instances that are created from instanceTemplate. The final number of instances created from instanceTemplate will be equal to: * if expressed as fixed number: min(targetSize.fixed, instanceGroupManager.targetSize), * if expressed as percent: ceiling(targetSize.percent * InstanceGroupManager.targetSize). If unset, this version will handle all the remaining instances." - } - } - }, - "InstanceGroupManagersAbandonInstancesRequest": { - "id": "InstanceGroupManagersAbandonInstancesRequest", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "The URLs of one or more instances to abandon. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - } - } - } - }, - "InstanceGroupManagersApplyUpdatesRequest": { - "id": "InstanceGroupManagersApplyUpdatesRequest", - "type": "object", - "description": "InstanceGroupManagers.applyUpdatesToInstances", - "properties": { - "instances": { - "type": "array", - "description": "The list of URLs of one or more instances for which we want to apply updates on this managed instance group. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - } - }, - "maximalAction": { - "type": "string", - "description": "The maximal action that should be perfomed on the instances. By default REPLACE.", - "enum": [ - "NONE", - "REFRESH", - "REPLACE", - "RESTART" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ] - }, - "minimalAction": { - "type": "string", - "description": "The minimal action that should be perfomed on the instances. By default NONE.", - "enum": [ - "NONE", - "REFRESH", - "REPLACE", - "RESTART" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ] - } - } - }, - "InstanceGroupManagersDeleteInstancesRequest": { - "id": "InstanceGroupManagersDeleteInstancesRequest", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - } - } - } - }, - "InstanceGroupManagersDeletePerInstanceConfigsReq": { - "id": "InstanceGroupManagersDeletePerInstanceConfigsReq", - "type": "object", - "description": "InstanceGroupManagers.deletePerInstanceConfigs", - "properties": { - "instances": { - "type": "array", - "description": "The list of instances for which we want to delete per-instance configs on this managed instance group.", - "items": { - "type": "string" - } - } - } - }, - "InstanceGroupManagersListManagedInstancesResponse": { - "id": "InstanceGroupManagersListManagedInstancesResponse", - "type": "object", - "properties": { - "managedInstances": { - "type": "array", - "description": "[Output Only] The list of instances in the managed instance group.", - "items": { - "$ref": "ManagedInstance" - } - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - } - } - }, - "InstanceGroupManagersListPerInstanceConfigsResp": { - "id": "InstanceGroupManagersListPerInstanceConfigsResp", - "type": "object", - "properties": { - "items": { - "type": "array", - "description": "[Output Only] The list of PerInstanceConfig.", - "items": { - "$ref": "PerInstanceConfig" - } - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - } - } - }, - "InstanceGroupManagersRecreateInstancesRequest": { - "id": "InstanceGroupManagersRecreateInstancesRequest", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "The URLs of one or more instances to recreate. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - } - } - } - }, - "InstanceGroupManagersResizeAdvancedRequest": { - "id": "InstanceGroupManagersResizeAdvancedRequest", - "type": "object", - "properties": { - "noCreationRetries": { - "type": "boolean", - "description": "If this flag is true, the managed instance group attempts to create all instances initiated by this resize request only once. If there is an error during creation, the managed instance group does not retry create this instance, and we will decrease the targetSize of the request instead. If the flag is false, the group attemps to recreate each instance continuously until it succeeds.\n\nThis flag matters only in the first attempt of creation of an instance. After an instance is successfully created while this flag is enabled, the instance behaves the same way as all the other instances created with a regular resize request. In particular, if a running instance dies unexpectedly at a later time and needs to be recreated, this mode does not affect the recreation behavior in that scenario.\n\nThis flag is applicable only to the current resize request. It does not influence other resize requests in any way.\n\nYou can see which instances is being creating in which mode by calling the get or listManagedInstances API." - }, - "targetSize": { - "type": "integer", - "description": "The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter.", - "format": "int32" - } - } - }, - "InstanceGroupManagersScopedList": { - "id": "InstanceGroupManagersScopedList", - "type": "object", - "properties": { - "instanceGroupManagers": { - "type": "array", - "description": "[Output Only] The list of managed instance groups that are contained in the specified project and zone.", - "items": { - "$ref": "InstanceGroupManager" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] The warning that replaces the list of managed instance groups when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "InstanceGroupManagersSetAutoHealingRequest": { - "id": "InstanceGroupManagersSetAutoHealingRequest", - "type": "object", - "properties": { - "autoHealingPolicies": { - "type": "array", - "items": { - "$ref": "InstanceGroupManagerAutoHealingPolicy" - } - } - } - }, - "InstanceGroupManagersSetInstanceTemplateRequest": { - "id": "InstanceGroupManagersSetInstanceTemplateRequest", - "type": "object", - "properties": { - "instanceTemplate": { - "type": "string", - "description": "The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group." - } - } - }, - "InstanceGroupManagersSetTargetPoolsRequest": { - "id": "InstanceGroupManagersSetTargetPoolsRequest", - "type": "object", - "properties": { - "fingerprint": { - "type": "string", - "description": "The fingerprint of the target pools information. Use this optional property to prevent conflicts when multiple users change the target pools settings concurrently. Obtain the fingerprint with the instanceGroupManagers.get method. Then, include the fingerprint in your request to ensure that you do not overwrite changes that were applied from another concurrent request.", - "format": "byte" - }, - "targetPools": { - "type": "array", - "description": "The list of target pool URLs that instances in this managed instance group belong to. The managed instance group applies these target pools to all of the instances in the group. Existing instances and new instances in the group all receive these target pool settings.", - "items": { - "type": "string" - } - } - } - }, - "InstanceGroupManagersUpdatePerInstanceConfigsReq": { - "id": "InstanceGroupManagersUpdatePerInstanceConfigsReq", - "type": "object", - "description": "InstanceGroupManagers.updatePerInstanceConfigs", - "properties": { - "perInstanceConfigs": { - "type": "array", - "description": "The list of per-instance configs to insert or patch on this managed instance group.", - "items": { - "$ref": "PerInstanceConfig" - } - } - } - }, - "InstanceGroupsAddInstancesRequest": { - "id": "InstanceGroupsAddInstancesRequest", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "The list of instances to add to the instance group.", - "items": { - "$ref": "InstanceReference" - } - } - } - }, - "InstanceGroupsListInstances": { - "id": "InstanceGroupsListInstances", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of InstanceWithNamedPorts resources.", - "items": { - "$ref": "InstanceWithNamedPorts" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] The resource type, which is always compute#instanceGroupsListInstances for the list of instances in the specified instance group.", - "default": "compute#instanceGroupsListInstances" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "InstanceGroupsListInstancesRequest": { - "id": "InstanceGroupsListInstancesRequest", - "type": "object", - "properties": { - "instanceState": { - "type": "string", - "description": "A filter for the state of the instances in the instance group. Valid options are ALL or RUNNING. If you do not specify this parameter the list includes all instances regardless of their state.", - "enum": [ - "ALL", - "RUNNING" - ], - "enumDescriptions": [ - "", - "" - ] - } - } - }, - "InstanceGroupsRemoveInstancesRequest": { - "id": "InstanceGroupsRemoveInstancesRequest", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "The list of instances to remove from the instance group.", - "items": { - "$ref": "InstanceReference" - } - } - } - }, - "InstanceGroupsScopedList": { - "id": "InstanceGroupsScopedList", - "type": "object", - "properties": { - "instanceGroups": { - "type": "array", - "description": "[Output Only] The list of instance groups that are contained in this scope.", - "items": { - "$ref": "InstanceGroup" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] An informational warning that replaces the list of instance groups when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "InstanceGroupsSetNamedPortsRequest": { - "id": "InstanceGroupsSetNamedPortsRequest", - "type": "object", - "properties": { - "fingerprint": { - "type": "string", - "description": "The fingerprint of the named ports information for this instance group. Use this optional property to prevent conflicts when multiple users change the named ports settings concurrently. Obtain the fingerprint with the instanceGroups.get method. Then, include the fingerprint in your request to ensure that you do not overwrite changes that were applied from another concurrent request.", - "format": "byte" - }, - "namedPorts": { - "type": "array", - "description": "The list of named ports to set for this instance group.", - "items": { - "$ref": "NamedPort" - } - } - } - }, - "InstanceList": { - "id": "InstanceList", - "type": "object", - "description": "Contains a list of instances.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Instance resources.", - "items": { - "$ref": "Instance" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#instanceList for lists of Instance resources.", - "default": "compute#instanceList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "InstanceListReferrers": { - "id": "InstanceListReferrers", - "type": "object", - "description": "Contains a list of instance referrers.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Reference resources.", - "items": { - "$ref": "Reference" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#instanceListReferrers for lists of Instance referrers.", - "default": "compute#instanceListReferrers" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "InstanceMoveRequest": { - "id": "InstanceMoveRequest", - "type": "object", - "properties": { - "destinationZone": { - "type": "string", - "description": "The URL of the destination zone to move the instance. This can be a full or partial URL. For example, the following are all valid URLs to a zone: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone \n- projects/project/zones/zone \n- zones/zone" - }, - "targetInstance": { - "type": "string", - "description": "The URL of the target instance to move. This can be a full or partial URL. For example, the following are all valid URLs to an instance: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance \n- projects/project/zones/zone/instances/instance \n- zones/zone/instances/instance" - } - } - }, - "InstanceProperties": { - "id": "InstanceProperties", - "type": "object", - "description": "", - "properties": { - "canIpForward": { - "type": "boolean", - "description": "Enables instances created based on this template to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. See the Enable IP forwarding documentation for more information." - }, - "description": { - "type": "string", - "description": "An optional text description for the instances that are created from this instance template." - }, - "disks": { - "type": "array", - "description": "An array of disks that are associated with the instances that are created from this template.", - "items": { - "$ref": "AttachedDisk" - } - }, - "guestAccelerators": { - "type": "array", - "description": "A list of guest accelerator cards' type and count to use for instances created from the instance template.", - "items": { - "$ref": "AcceleratorConfig" - } - }, - "labels": { - "type": "object", - "description": "Labels to apply to instances that are created from this template.", - "additionalProperties": { - "type": "string" - } - }, - "machineType": { - "type": "string", - "description": "The machine type to use for instances that are created from this template.", - "annotations": { - "required": [ - "compute.instanceTemplates.insert" - ] - } - }, - "metadata": { - "$ref": "Metadata", - "description": "The metadata key/value pairs to assign to instances that are created from this template. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information." - }, - "minCpuPlatform": { - "type": "string", - "description": "Minimum cpu/platform to be used by this instance. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: \"Intel Haswell\" or minCpuPlatform: \"Intel Sandy Bridge\". For more information, read Specifying a Minimum CPU Platform." - }, - "networkInterfaces": { - "type": "array", - "description": "An array of network access configurations for this interface.", - "items": { - "$ref": "NetworkInterface" - } - }, - "scheduling": { - "$ref": "Scheduling", - "description": "Specifies the scheduling options for the instances that are created from this template." - }, - "serviceAccounts": { - "type": "array", - "description": "A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from this template. Use metadata queries to obtain the access tokens for these instances.", - "items": { - "$ref": "ServiceAccount" - } - }, - "tags": { - "$ref": "Tags", - "description": "A list of tags to apply to the instances that are created from this template. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035." - } - } - }, - "InstanceReference": { - "id": "InstanceReference", - "type": "object", - "properties": { - "instance": { - "type": "string", - "description": "The URL for a specific instance." - } - } - }, - "InstanceTemplate": { - "id": "InstanceTemplate", - "type": "object", - "description": "An Instance Template resource.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] The creation timestamp for this instance template in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] A unique identifier for this instance template. The server defines this identifier.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] The resource type, which is always compute#instanceTemplate for instance templates.", - "default": "compute#instanceTemplate" - }, - "name": { - "type": "string", - "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.instanceTemplates.insert" - ] - } - }, - "properties": { - "$ref": "InstanceProperties", - "description": "The instance properties for this instance template." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] The URL for this instance template. The server defines this URL." - }, - "sourceInstance": { - "type": "string", - "description": "The source instance used to create the template. You can provide this as a partial or full URL to the resource. For example, the following are valid values: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance \n- projects/project/zones/zone/instances/instance" - } - } - }, - "InstanceTemplateList": { - "id": "InstanceTemplateList", - "type": "object", - "description": "A list of instance templates.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of InstanceTemplate resources.", - "items": { - "$ref": "InstanceTemplate" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] The resource type, which is always compute#instanceTemplatesListResponse for instance template lists.", - "default": "compute#instanceTemplateList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "InstanceWithNamedPorts": { - "id": "InstanceWithNamedPorts", - "type": "object", - "properties": { - "instance": { - "type": "string", - "description": "[Output Only] The URL of the instance." - }, - "namedPorts": { - "type": "array", - "description": "[Output Only] The named ports that belong to this instance group.", - "items": { - "$ref": "NamedPort" - } - }, - "status": { - "type": "string", - "description": "[Output Only] The status of the instance.", - "enum": [ - "PROVISIONING", - "RUNNING", - "STAGING", - "STOPPED", - "STOPPING", - "SUSPENDED", - "SUSPENDING", - "TERMINATED" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "" - ] - } - } - }, - "InstancesScopedList": { - "id": "InstancesScopedList", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "[Output Only] List of instances contained in this scope.", - "items": { - "$ref": "Instance" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] Informational warning which replaces the list of instances when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "InstancesSetLabelsRequest": { - "id": "InstancesSetLabelsRequest", - "type": "object", - "properties": { - "labelFingerprint": { - "type": "string", - "description": "Fingerprint of the previous set of labels for this resource, used to prevent conflicts. Provide the latest fingerprint value when making a request to add or change labels.", - "format": "byte" - }, - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "InstancesSetMachineResourcesRequest": { - "id": "InstancesSetMachineResourcesRequest", - "type": "object", - "properties": { - "guestAccelerators": { - "type": "array", - "description": "List of the type and count of accelerator cards attached to the instance.", - "items": { - "$ref": "AcceleratorConfig" - } - } - } - }, - "InstancesSetMachineTypeRequest": { - "id": "InstancesSetMachineTypeRequest", - "type": "object", - "properties": { - "machineType": { - "type": "string", - "description": "Full or partial URL of the machine type resource. See Machine Types for a full list of machine types. For example: zones/us-central1-f/machineTypes/n1-standard-1" - } - } - }, - "InstancesSetMinCpuPlatformRequest": { - "id": "InstancesSetMinCpuPlatformRequest", - "type": "object", - "properties": { - "minCpuPlatform": { - "type": "string", - "description": "Minimum cpu/platform this instance should be started at." - } - } - }, - "InstancesSetServiceAccountRequest": { - "id": "InstancesSetServiceAccountRequest", - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "Email address of the service account." - }, - "scopes": { - "type": "array", - "description": "The list of scopes to be made available for this service account.", - "items": { - "type": "string" - } - } - } - }, - "InstancesStartWithEncryptionKeyRequest": { - "id": "InstancesStartWithEncryptionKeyRequest", - "type": "object", - "properties": { - "disks": { - "type": "array", - "description": "Array of disks associated with this instance that are protected with a customer-supplied encryption key.\n\nIn order to start the instance, the disk url and its corresponding key must be provided.\n\nIf the disk is not protected with a customer-supplied encryption key it should not be specified.", - "items": { - "$ref": "CustomerEncryptionKeyProtectedDisk" - } - }, - "instanceEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Decrypts data associated with an instance that is protected with a customer-supplied encryption key.\n\nIf the instance you are starting is protected with a customer-supplied encryption key, the correct key must be provided otherwise the instance start will not succeed." - } - } - }, - "Interconnect": { - "id": "Interconnect", - "type": "object", - "description": "Protocol definitions for Mixer API to support Interconnect. Next available tag: 23", - "properties": { - "adminEnabled": { - "type": "boolean", - "description": "Administrative status of the interconnect. When this is set to ?true?, the Interconnect is functional and may carry traffic (assuming there are functional InterconnectAttachments and other requirements are satisfied). When set to ?false?, no packets will be carried over this Interconnect and no BGP routes will be exchanged over it. By default, it is set to ?true?." - }, - "connectionAuthorization": { - "type": "string", - "description": "[Output Only] URL to retrieve the Letter Of Authority and Customer Facility Assignment (LOA-CFA) documentation relating to this Interconnect. This documentation authorizes the facility provider to connect to the specified crossconnect ports." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "customerName": { - "type": "string", - "description": "Customer name, to put in the Letter of Authorization as the party authorized to request a crossconnect." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "expectedOutages": { - "type": "array", - "description": "[Output Only] List of outages expected for this Interconnect.", - "items": { - "$ref": "InterconnectOutageNotification" - } - }, - "googleIpAddress": { - "type": "string", - "description": "[Output Only] IP address configured on the Google side of the Interconnect link. This can be used only for ping tests." - }, - "googleReferenceId": { - "type": "string", - "description": "[Output Only] Google reference ID; to be used when raising support tickets with Google or otherwise to debug backend connectivity issues." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "interconnectAttachments": { - "type": "array", - "description": "[Output Only] A list of the URLs of all InterconnectAttachments configured to use this Interconnect.", - "items": { - "type": "string" - } - }, - "interconnectType": { - "type": "string", - "enum": [ - "IT_PRIVATE" - ], - "enumDescriptions": [ - "" - ] - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#interconnect for interconnects.", - "default": "compute#interconnect" - }, - "linkType": { - "type": "string", - "enum": [ - "LINK_TYPE_ETHERNET_10G_LR" - ], - "enumDescriptions": [ - "" - ] - }, - "location": { - "type": "string", - "description": "URL of the InterconnectLocation object that represents where this connection is to be provisioned." - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.interconnects.insert" - ] - } - }, - "nocContactEmail": { - "type": "string", - "description": "Email address to contact the customer NOC for operations and maintenance notifications regarding this Interconnect. If specified, this will be used for notifications in addition to all other forms described, such as Stackdriver logs alerting and Cloud Notifications." - }, - "operationalStatus": { - "type": "string", - "description": "[Output Only] The current status of whether or not this Interconnect is functional.", - "enum": [ - "OS_ACTIVE", - "OS_UNPROVISIONED" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "peerIpAddress": { - "type": "string", - "description": "[Output Only] IP address configured on the customer side of the Interconnect link. The customer should configure this IP address during turnup when prompted by Google NOC. This can be used only for ping tests." - }, - "provisionedLinkCount": { - "type": "integer", - "description": "[Output Only] Number of links actually provisioned in this interconnect.", - "format": "int32" - }, - "requestedLinkCount": { - "type": "integer", - "description": "Target number of physical links in the link bundle, as requested by the customer.", - "format": "int32" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - } - } - }, - "InterconnectAttachment": { - "id": "InterconnectAttachment", - "type": "object", - "description": "Protocol definitions for Mixer API to support InterconnectAttachment. Next available tag: 14", - "properties": { - "cloudRouterIpAddress": { - "type": "string", - "description": "[Output Only] IPv4 address + prefix length to be configured on Cloud Router Interface for this interconnect attachment." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "customerRouterIpAddress": { - "type": "string", - "description": "[Output Only] IPv4 address + prefix length to be configured on the customer router subinterface for this interconnect attachment." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "googleReferenceId": { - "type": "string", - "description": "[Output Only] Google reference ID, to be used when raising support tickets with Google or otherwise to debug backend connectivity issues." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "interconnect": { - "type": "string", - "description": "URL of the underlying Interconnect object that this attachment's traffic will traverse through." - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#interconnectAttachment for interconnect attachments.", - "default": "compute#interconnectAttachment" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "operationalStatus": { - "type": "string", - "description": "[Output Only] The current status of whether or not this interconnect attachment is functional.", - "enum": [ - "OS_ACTIVE", - "OS_UNPROVISIONED" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "privateInterconnectInfo": { - "$ref": "InterconnectAttachmentPrivateInfo", - "description": "[Output Only] Information specific to a Private InterconnectAttachment. Only populated if the interconnect that this is attached is of type IT_PRIVATE." - }, - "region": { - "type": "string", - "description": "[Output Only] URL of the region where the regional interconnect attachment resides." - }, - "router": { - "type": "string", - "description": "URL of the cloud router to be used for dynamic routing. This router must be in the same region as this InterconnectAttachment. The InterconnectAttachment will automatically connect the Interconnect to the network & region within which the Cloud Router is configured." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - } - } - }, - "InterconnectAttachmentAggregatedList": { - "id": "InterconnectAttachmentAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of InterconnectAttachmentsScopedList resources.", - "additionalProperties": { - "$ref": "InterconnectAttachmentsScopedList", - "description": "Name of the scope containing this set of interconnect attachments." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#interconnectAttachmentAggregatedList for aggregated lists of interconnect attachments.", - "default": "compute#interconnectAttachmentAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "InterconnectAttachmentList": { - "id": "InterconnectAttachmentList", - "type": "object", - "description": "Response to the list request, and contains a list of interconnect attachments.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of InterconnectAttachment resources.", - "items": { - "$ref": "InterconnectAttachment" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#interconnectAttachmentList for lists of interconnect attachments.", - "default": "compute#interconnectAttachmentList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "InterconnectAttachmentPrivateInfo": { - "id": "InterconnectAttachmentPrivateInfo", - "type": "object", - "description": "Private information for an interconnect attachment when this belongs to an interconnect of type IT_PRIVATE.", - "properties": { - "tag8021q": { - "type": "integer", - "description": "[Output Only] 802.1q encapsulation tag to be used for traffic between Google and the customer, going to and from this network and region.", - "format": "uint32" - } - } - }, - "InterconnectAttachmentsScopedList": { - "id": "InterconnectAttachmentsScopedList", - "type": "object", - "properties": { - "interconnectAttachments": { - "type": "array", - "description": "List of interconnect attachments contained in this scope.", - "items": { - "$ref": "InterconnectAttachment" - } - }, - "warning": { - "type": "object", - "description": "Informational warning which replaces the list of addresses when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "InterconnectList": { - "id": "InterconnectList", - "type": "object", - "description": "Response to the list request, and contains a list of interconnects.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Interconnect resources.", - "items": { - "$ref": "Interconnect" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#interconnectList for lists of interconnects.", - "default": "compute#interconnectList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "InterconnectLocation": { - "id": "InterconnectLocation", - "type": "object", - "description": "Protocol definitions for Mixer API to support InterconnectLocation.", - "properties": { - "address": { - "type": "string", - "description": "[Output Only] The postal address of the Point of Presence, each line in the address is separated by a newline character." - }, - "availabilityZone": { - "type": "string", - "description": "Availability zone for this location. Within a city, maintenance will not be simultaneously scheduled in more than one availability zone. Example: \"zone1\" or \"zone2\"." - }, - "city": { - "type": "string", - "description": "City designator used by the Interconnect UI to locate this InterconnectLocation within the Continent. For example: \"Chicago, IL\", \"Amsterdam, Netherlands\"." - }, - "continent": { - "type": "string", - "description": "Continent for this location. Used by the location picker in the Interconnect UI.", - "enum": [ - "C_AFRICA", - "C_ASIA_PAC", - "C_EUROPE", - "C_NORTH_AMERICA", - "C_SOUTH_AMERICA" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ] - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "[Output Only] An optional description of the resource." - }, - "facilityProvider": { - "type": "string", - "description": "[Output Only] The name of the provider for this facility (e.g., EQUINIX)." - }, - "facilityProviderFacilityId": { - "type": "string", - "description": "[Output Only] A provider-assigned Identifier for this facility (e.g., Ashburn-DC1)." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#interconnectLocation for interconnect locations.", - "default": "compute#interconnectLocation" - }, - "name": { - "type": "string", - "description": "[Output Only] Name of the resource." - }, - "peeringdbFacilityId": { - "type": "string", - "description": "[Output Only] The peeringdb identifier for this facility (corresponding with a netfac type in peeringdb)." - }, - "regionInfos": { - "type": "array", - "description": "[Output Only] A list of InterconnectLocation.RegionInfo objects, that describe parameters pertaining to the relation between this InterconnectLocation and various Google Cloud regions.", - "items": { - "$ref": "InterconnectLocationRegionInfo" - } - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - } - } - }, - "InterconnectLocationList": { - "id": "InterconnectLocationList", - "type": "object", - "description": "Response to the list request, and contains a list of interconnect locations.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of InterconnectLocation resources.", - "items": { - "$ref": "InterconnectLocation" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#interconnectLocationList for lists of interconnect locations.", - "default": "compute#interconnectLocationList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "InterconnectLocationRegionInfo": { - "id": "InterconnectLocationRegionInfo", - "type": "object", - "description": "Information about any potential InterconnectAttachments between an Interconnect at a specific InterconnectLocation, and a specific Cloud Region.", - "properties": { - "expectedRttMs": { - "type": "string", - "description": "Expected round-trip time in milliseconds, from this InterconnectLocation to a VM in this region.", - "format": "int64" - }, - "locationPresence": { - "type": "string", - "description": "Identifies the network presence of this location.", - "enum": [ - "LP_GLOBAL", - "LP_LOCAL_REGION" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "regionKey": { - "type": "string", - "description": "Scope key for the region of this location." - } - } - }, - "InterconnectOutageNotification": { - "id": "InterconnectOutageNotification", - "type": "object", - "description": "Description of a planned outage on this Interconnect. Next id: 9", - "properties": { - "affectedCircuits": { - "type": "array", - "description": "Iff issue_type is IT_PARTIAL_OUTAGE, a list of the Google-side circuit IDs that will be affected.", - "items": { - "type": "string" - } - }, - "description": { - "type": "string", - "description": "Short user-visible description of the purpose of the outage." - }, - "endTime": { - "type": "string", - "format": "int64" - }, - "issueType": { - "type": "string", - "enum": [ - "IT_OUTAGE", - "IT_PARTIAL_OUTAGE" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "name": { - "type": "string", - "description": "Unique identifier for this outage notification." - }, - "source": { - "type": "string", - "enum": [ - "NSRC_GOOGLE" - ], - "enumDescriptions": [ - "" - ] - }, - "startTime": { - "type": "string", - "description": "Scheduled start and end times for the outage (milliseconds since Unix epoch).", - "format": "int64" - }, - "state": { - "type": "string", - "enum": [ - "NS_ACTIVE", - "NS_CANCELED" - ], - "enumDescriptions": [ - "", - "" - ] - } - } - }, - "InternalIpOwner": { - "id": "InternalIpOwner", - "type": "object", - "properties": { - "ipCidrRange": { - "type": "string", - "description": "IP CIDR range being owned." - }, - "owners": { - "type": "array", - "description": "URLs of the IP owners of the IP CIDR range.", - "items": { - "type": "string" - } - }, - "systemOwned": { - "type": "boolean", - "description": "Whether this IP CIDR range is reserved for system use." - } - } - }, - "IpOwnerList": { - "id": "IpOwnerList", - "type": "object", - "description": "Contains a list of IP owners.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of InternalIpOwner resources.", - "items": { - "$ref": "InternalIpOwner" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#ipOwnerList for lists of IP owners.", - "default": "compute#ipOwnerList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "License": { - "id": "License", - "type": "object", - "description": "A license resource.", - "properties": { - "chargesUseFee": { - "type": "boolean", - "description": "[Output Only] Deprecated. This field no longer reflects whether a license charges a usage fee." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional textual description of the resource; provided by the client when the resource is created." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#license for licenses.", - "default": "compute#license" - }, - "licenseCode": { - "type": "string", - "description": "[Output Only] The unique code used to attach this license to images, snapshots, and disks.", - "format": "uint64" - }, - "name": { - "type": "string", - "description": "[Output Only] Name of the resource. The name is 1-63 characters long and complies with RFC1035.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.images.insert" - ] - } - }, - "resourceRequirements": { - "$ref": "LicenseResourceRequirements" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "transferable": { - "type": "boolean", - "description": "If false, licenses will not be copied from the source resource when creating an image from a disk, disk from snapshot, or snapshot from disk." - } - } - }, - "LicenseResourceRequirements": { - "id": "LicenseResourceRequirements", - "type": "object", - "properties": { - "minGuestCpuCount": { - "type": "integer", - "description": "Minimum number of guest cpus required to use the Instance. Enforced at Instance creation and Instance start.", - "format": "int32" - }, - "minMemoryMb": { - "type": "integer", - "description": "Minimum memory required to use the Instance. Enforced at Instance creation and Instance start.", - "format": "int32" - } - } - }, - "LicensesListResponse": { - "id": "LicensesListResponse", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of License resources.", - "items": { - "$ref": "License" - } - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "LogConfig": { - "id": "LogConfig", - "type": "object", - "description": "Specifies what kind of log the caller must write", - "properties": { - "cloudAudit": { - "$ref": "LogConfigCloudAuditOptions", - "description": "Cloud audit options." - }, - "counter": { - "$ref": "LogConfigCounterOptions", - "description": "Counter options." - } - } - }, - "LogConfigCloudAuditOptions": { - "id": "LogConfigCloudAuditOptions", - "type": "object", - "description": "Write a Cloud Audit log", - "properties": { - "authorizationLoggingOptions": { - "$ref": "AuthorizationLoggingOptions", - "description": "Information used by the Cloud Audit Logging pipeline." - }, - "logName": { - "type": "string", - "description": "The log_name to populate in the Cloud Audit Record.", - "enum": [ - "ADMIN_ACTIVITY", - "DATA_ACCESS", - "UNSPECIFIED_LOG_NAME" - ], - "enumDescriptions": [ - "", - "", - "" - ] - } - } - }, - "LogConfigCounterOptions": { - "id": "LogConfigCounterOptions", - "type": "object", - "description": "Options for counters", - "properties": { - "field": { - "type": "string", - "description": "The field value to attribute." - }, - "metric": { - "type": "string", - "description": "The metric to update." - } - } - }, - "MachineType": { - "id": "MachineType", - "type": "object", - "description": "A Machine Type resource.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "[Output Only] The deprecation status associated with this machine type." - }, - "description": { - "type": "string", - "description": "[Output Only] An optional textual description of the resource." - }, - "guestCpus": { - "type": "integer", - "description": "[Output Only] The number of virtual CPUs that are available to the instance.", - "format": "int32" - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "isSharedCpu": { - "type": "boolean", - "description": "[Output Only] Whether this machine type has a shared CPU. See Shared-core machine types for more information." - }, - "kind": { - "type": "string", - "description": "[Output Only] The type of the resource. Always compute#machineType for machine types.", - "default": "compute#machineType" - }, - "maximumPersistentDisks": { - "type": "integer", - "description": "[Output Only] Maximum persistent disks allowed.", - "format": "int32" - }, - "maximumPersistentDisksSizeGb": { - "type": "string", - "description": "[Output Only] Maximum total persistent disks size (GB) allowed.", - "format": "int64" - }, - "memoryMb": { - "type": "integer", - "description": "[Output Only] The amount of physical memory available to the instance, defined in MB.", - "format": "int32" - }, - "name": { - "type": "string", - "description": "[Output Only] Name of the resource.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "zone": { - "type": "string", - "description": "[Output Only] The name of the zone where the machine type resides, such as us-central1-a." - } - } - }, - "MachineTypeAggregatedList": { - "id": "MachineTypeAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of MachineTypesScopedList resources.", - "additionalProperties": { - "$ref": "MachineTypesScopedList", - "description": "[Output Only] Name of the scope containing this set of machine types." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#machineTypeAggregatedList for aggregated lists of machine types.", - "default": "compute#machineTypeAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "MachineTypeList": { - "id": "MachineTypeList", - "type": "object", - "description": "Contains a list of machine types.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of MachineType resources.", - "items": { - "$ref": "MachineType" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#machineTypeList for lists of machine types.", - "default": "compute#machineTypeList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "MachineTypesScopedList": { - "id": "MachineTypesScopedList", - "type": "object", - "properties": { - "machineTypes": { - "type": "array", - "description": "[Output Only] List of machine types contained in this scope.", - "items": { - "$ref": "MachineType" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] An informational warning that appears when the machine types list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "ManagedInstance": { - "id": "ManagedInstance", - "type": "object", - "properties": { - "currentAction": { - "type": "string", - "description": "[Output Only] The current action that the managed instance group has scheduled for the instance. Possible values: \n- NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance. \n- CREATING The managed instance group is creating this instance. If the group fails to create this instance, it will try again until it is successful. \n- CREATING_WITHOUT_RETRIES The managed instance group is attempting to create this instance only once. If the group fails to create this instance, it does not try again and the group's targetSize value is decreased instead. \n- RECREATING The managed instance group is recreating this instance. \n- DELETING The managed instance group is permanently deleting this instance. \n- ABANDONING The managed instance group is abandoning this instance. The instance will be removed from the instance group and from any target pools that are associated with this group. \n- RESTARTING The managed instance group is restarting the instance. \n- REFRESHING The managed instance group is applying configuration changes to the instance without stopping it. For example, the group can update the target pool list for an instance without stopping that instance.", - "enum": [ - "ABANDONING", - "CREATING", - "CREATING_WITHOUT_RETRIES", - "DELETING", - "NONE", - "RECREATING", - "REFRESHING", - "RESTARTING", - "VERIFYING" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "id": { - "type": "string", - "description": "[Output only] The unique identifier for this resource. This field is empty when instance does not exist.", - "format": "uint64" - }, - "instance": { - "type": "string", - "description": "[Output Only] The URL of the instance. The URL can exist even if the instance has not yet been created." - }, - "instanceStatus": { - "type": "string", - "description": "[Output Only] The status of the instance. This field is empty when the instance does not exist.", - "enum": [ - "PROVISIONING", - "RUNNING", - "STAGING", - "STOPPED", - "STOPPING", - "SUSPENDED", - "SUSPENDING", - "TERMINATED" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "instanceTemplate": { - "type": "string", - "description": "[Output Only] The intended template of the instance. This field is empty when current_action is one of { DELETING, ABANDONING }." - }, - "lastAttempt": { - "$ref": "ManagedInstanceLastAttempt", - "description": "[Output Only] Information about the last attempt to create or delete the instance." - }, - "override": { - "$ref": "ManagedInstanceOverride", - "description": "[Output Only] Override defined for this instance." - }, - "standbyMode": { - "type": "string", - "description": "[Output Only] Standby mode of the instance. This field is non-empty iff the instance is a standby.", - "enum": [ - "DRAINED" - ], - "enumDescriptions": [ - "" - ] - }, - "tag": { - "type": "string", - "description": "[Output Only] Tag describing the version." - }, - "version": { - "$ref": "ManagedInstanceVersion", - "description": "[Output Only] Intended version of this instance." - } - } - }, - "ManagedInstanceLastAttempt": { - "id": "ManagedInstanceLastAttempt", - "type": "object", - "properties": { - "errors": { - "type": "object", - "description": "[Output Only] Encountered errors during the last attempt to create or delete the instance.", - "properties": { - "errors": { - "type": "array", - "description": "[Output Only] The array of errors encountered while processing this operation.", - "items": { - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] The error type identifier for this error." - }, - "location": { - "type": "string", - "description": "[Output Only] Indicates the field in the request that caused the error. This property is optional." - }, - "message": { - "type": "string", - "description": "[Output Only] An optional, human-readable error message." - } - } - } - } - } - } - } - }, - "ManagedInstanceOverride": { - "id": "ManagedInstanceOverride", - "type": "object", - "description": "Overrides of stateful properties for a given instance", - "properties": { - "disks": { - "type": "array", - "description": "Disk overrides defined for this instance", - "items": { - "$ref": "ManagedInstanceOverrideDiskOverride" - } - }, - "metadata": { - "type": "array", - "description": "Metadata overrides defined for this instance.", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.", - "pattern": "[a-zA-Z0-9-_]{1,128}", - "annotations": { - "required": [ - "compute.instances.insert", - "compute.projects.setCommonInstanceMetadata" - ] - } - }, - "value": { - "type": "string", - "description": "Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).", - "annotations": { - "required": [ - "compute.instances.insert", - "compute.projects.setCommonInstanceMetadata" - ] - } - } - } - } - }, - "origin": { - "type": "string", - "description": "[Output Only] Indicates where does the override come from.", - "enum": [ - "AUTO_GENERATED", - "USER_GENERATED" - ], - "enumDescriptions": [ - "", - "" - ] - } - } - }, - "ManagedInstanceOverrideDiskOverride": { - "id": "ManagedInstanceOverrideDiskOverride", - "type": "object", - "properties": { - "deviceName": { - "type": "string", - "description": "The name of the device on the VM" - }, - "mode": { - "type": "string", - "description": "The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.", - "enum": [ - "READ_ONLY", - "READ_WRITE" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "source": { - "type": "string", - "description": "The disk that is/will be mounted" - } - } - }, - "ManagedInstanceVersion": { - "id": "ManagedInstanceVersion", - "type": "object", - "properties": { - "instanceTemplate": { - "type": "string", - "description": "[Output Only] The intended template of the instance. This field is empty when current_action is one of { DELETING, ABANDONING }." - }, - "name": { - "type": "string", - "description": "[Output Only] Name of the version." - } - } - }, - "Metadata": { - "id": "Metadata", - "type": "object", - "description": "A metadata key/value entry.", - "properties": { - "fingerprint": { - "type": "string", - "description": "Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.", - "format": "byte" - }, - "items": { - "type": "array", - "description": "Array of key/value pairs. The total size of all keys and values must be less than 512 KB.", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.", - "pattern": "[a-zA-Z0-9-_]{1,128}", - "annotations": { - "required": [ - "compute.instances.insert", - "compute.projects.setCommonInstanceMetadata" - ] - } - }, - "value": { - "type": "string", - "description": "Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).", - "annotations": { - "required": [ - "compute.instances.insert", - "compute.projects.setCommonInstanceMetadata" - ] - } - } - } - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#metadata for metadata.", - "default": "compute#metadata" - } - } - }, - "NamedPort": { - "id": "NamedPort", - "type": "object", - "description": "The named port. For example: .", - "properties": { - "name": { - "type": "string", - "description": "The name for this named port. The name must be 1-63 characters long, and comply with RFC1035." - }, - "port": { - "type": "integer", - "description": "The port number, which can be a value between 1 and 65535.", - "format": "int32" - } - } - }, - "Network": { - "id": "Network", - "type": "object", - "description": "Represents a Network resource. Read Networks and Firewalls for more information.", - "properties": { - "IPv4Range": { - "type": "string", - "description": "The range of internal addresses that are legal on this network. This range is a CIDR specification, for example: 192.168.0.0/16. Provided by the client when the network is created.", - "pattern": "[0-9]{1,3}(?:\\.[0-9]{1,3}){3}/[0-9]{1,2}" - }, - "autoCreateSubnetworks": { - "type": "boolean", - "description": "When set to true, the network is created in \"auto subnet mode\". When set to false, the network is in \"custom subnet mode\".\n\nIn \"auto subnet mode\", a newly created network is assigned the default CIDR of 10.128.0.0/9 and it automatically creates one subnetwork per region." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "crossVmEncryption": { - "type": "string", - "description": "[Output Only] Type of VM-to-VM traffic encryption for this network.", - "enum": [ - "ENCRYPTED", - "UNENCRYPTED" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "gatewayIPv4": { - "type": "string", - "description": "A gateway address for default routing to other networks. This value is read only and is selected by the Google Compute Engine, typically as the first usable address in the IPv4Range.", - "pattern": "[0-9]{1,3}(?:\\.[0-9]{1,3}){3}" - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#network for networks.", - "default": "compute#network" - }, - "loadBalancerVmEncryption": { - "type": "string", - "description": "[Output Only] Type of LB-to-VM traffic encryption for this network.", - "enum": [ - "ENCRYPTED", - "UNENCRYPTED" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.networks.insert" - ] - } - }, - "peerings": { - "type": "array", - "description": "[Output Only] List of network peerings for the resource.", - "items": { - "$ref": "NetworkPeering" - } - }, - "routingConfig": { - "$ref": "NetworkRoutingConfig", - "description": "The network-level routing configuration for this network. Used by Cloud Router to determine what type of network-wide routing behavior to enforce." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "subnetworks": { - "type": "array", - "description": "[Output Only] Server-defined fully-qualified URLs for all subnetworks in this network.", - "items": { - "type": "string" - } - } - } - }, - "NetworkInterface": { - "id": "NetworkInterface", - "type": "object", - "description": "A network interface resource attached to an instance.", - "properties": { - "accessConfigs": { - "type": "array", - "description": "An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access.", - "items": { - "$ref": "AccessConfig" - } - }, - "aliasIpRanges": { - "type": "array", - "description": "An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks.", - "items": { - "$ref": "AliasIpRange" - } - }, - "fingerprint": { - "type": "string", - "description": "Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface.", - "format": "byte" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#networkInterface for network interfaces.", - "default": "compute#networkInterface" - }, - "name": { - "type": "string", - "description": "[Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc." - }, - "network": { - "type": "string", - "description": "URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.\n\nThis field is optional when creating a firewall rule. If not specified when creating a firewall rule, the default network global/networks/default is used.\n\nIf you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/global/networks/network \n- projects/project/global/networks/network \n- global/networks/default" - }, - "networkIP": { - "type": "string", - "description": "An IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system." - }, - "subnetwork": { - "type": "string", - "description": "The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. If you specify this property, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork \n- regions/region/subnetworks/subnetwork" - } - } - }, - "NetworkList": { - "id": "NetworkList", - "type": "object", - "description": "Contains a list of networks.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Network resources.", - "items": { - "$ref": "Network" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#networkList for lists of networks.", - "default": "compute#networkList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "NetworkPeering": { - "id": "NetworkPeering", - "type": "object", - "description": "A network peering attached to a network resource. The message includes the peering name, peer network, peering state, and a flag indicating whether Google Compute Engine should automatically create routes for the peering.", - "properties": { - "autoCreateRoutes": { - "type": "boolean", - "description": "Whether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage the routes between two networks when the state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network." - }, - "name": { - "type": "string", - "description": "Name of this peering. Provided by the client when the peering is created. The name must comply with RFC1035. Specifically, the name must be 1-63 characters long and match regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all the following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash." - }, - "network": { - "type": "string", - "description": "The URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network." - }, - "state": { - "type": "string", - "description": "[Output Only] State for the peering.", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "stateDetails": { - "type": "string", - "description": "[Output Only] Details about the current state of the peering." - } - } - }, - "NetworkRoutingConfig": { - "id": "NetworkRoutingConfig", - "type": "object", - "description": "A routing configuration attached to a network resource. The message includes the list of routers associated with the network, and a flag indicating the type of routing behavior to enforce network-wide.", - "properties": { - "routingMode": { - "type": "string", - "description": "The network-wide routing mode to use. If set to REGIONAL, this network's cloud routers will only advertise routes with subnetworks of this network in the same region as the router. If set to GLOBAL, this network's cloud routers will advertise routes with all subnetworks of this network, across regions.", - "enum": [ - "GLOBAL", - "REGIONAL" - ], - "enumDescriptions": [ - "", - "" - ] - } - } - }, - "NetworksAddPeeringRequest": { - "id": "NetworksAddPeeringRequest", - "type": "object", - "properties": { - "autoCreateRoutes": { - "type": "boolean", - "description": "Whether Google Compute Engine manages the routes automatically." - }, - "name": { - "type": "string", - "description": "Name of the peering, which should conform to RFC1035." - }, - "peerNetwork": { - "type": "string", - "description": "URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network." - } - } - }, - "NetworksRemovePeeringRequest": { - "id": "NetworksRemovePeeringRequest", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the peering, which should conform to RFC1035." - } - } - }, - "Operation": { - "id": "Operation", - "type": "object", - "description": "An Operation resource, used to manage asynchronous API requests.", - "properties": { - "clientOperationId": { - "type": "string", - "description": "[Output Only] Reserved for future use." - }, - "creationTimestamp": { - "type": "string", - "description": "[Deprecated] This field is deprecated." - }, - "description": { - "type": "string", - "description": "[Output Only] A textual description of the operation, which is set when the operation is created." - }, - "endTime": { - "type": "string", - "description": "[Output Only] The time that this operation was completed. This value is in RFC3339 text format." - }, - "error": { - "type": "object", - "description": "[Output Only] If errors are generated during processing of the operation, this field will be populated.", - "properties": { - "errors": { - "type": "array", - "description": "[Output Only] The array of errors encountered while processing this operation.", - "items": { - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] The error type identifier for this error." - }, - "location": { - "type": "string", - "description": "[Output Only] Indicates the field in the request that caused the error. This property is optional." - }, - "message": { - "type": "string", - "description": "[Output Only] An optional, human-readable error message." - } - } - } - } - } - }, - "httpErrorMessage": { - "type": "string", - "description": "[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND." - }, - "httpErrorStatusCode": { - "type": "integer", - "description": "[Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.", - "format": "int32" - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "insertTime": { - "type": "string", - "description": "[Output Only] The time that this operation was requested. This value is in RFC3339 text format." - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#operation for Operation resources.", - "default": "compute#operation" - }, - "name": { - "type": "string", - "description": "[Output Only] Name of the resource." - }, - "operationType": { - "type": "string", - "description": "[Output Only] The type of operation, such as insert, update, or delete, and so on." - }, - "progress": { - "type": "integer", - "description": "[Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.", - "format": "int32" - }, - "region": { - "type": "string", - "description": "[Output Only] The URL of the region where the operation resides. Only available when performing regional operations." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "startTime": { - "type": "string", - "description": "[Output Only] The time that this operation was started by the server. This value is in RFC3339 text format." - }, - "status": { - "type": "string", - "description": "[Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.", - "enum": [ - "DONE", - "PENDING", - "RUNNING" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "statusMessage": { - "type": "string", - "description": "[Output Only] An optional textual description of the current status of the operation." - }, - "targetId": { - "type": "string", - "description": "[Output Only] The unique target ID, which identifies a specific incarnation of the target resource.", - "format": "uint64" - }, - "targetLink": { - "type": "string", - "description": "[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from." - }, - "user": { - "type": "string", - "description": "[Output Only] User who requested the operation, for example: user@example.com." - }, - "warnings": { - "type": "array", - "description": "[Output Only] If warning messages are generated during processing of the operation, this field will be populated.", - "items": { - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - }, - "zone": { - "type": "string", - "description": "[Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations." - } - } - }, - "OperationAggregatedList": { - "id": "OperationAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." - }, - "items": { - "type": "object", - "description": "[Output Only] A map of scoped operation lists.", - "additionalProperties": { - "$ref": "OperationsScopedList", - "description": "[Output Only] Name of the scope containing this set of operations." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#operationAggregatedList for aggregated lists of operations.", - "default": "compute#operationAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "OperationList": { - "id": "OperationList", - "type": "object", - "description": "Contains a list of Operation resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." - }, - "items": { - "type": "array", - "description": "[Output Only] A list of Operation resources.", - "items": { - "$ref": "Operation" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#operations for Operations resource.", - "default": "compute#operationList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "OperationsScopedList": { - "id": "OperationsScopedList", - "type": "object", - "properties": { - "operations": { - "type": "array", - "description": "[Output Only] List of operations contained in this scope.", - "items": { - "$ref": "Operation" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] Informational warning which replaces the list of operations when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "PathMatcher": { - "id": "PathMatcher", - "type": "object", - "description": "A matcher for the path portion of the URL. The BackendService from the longest-matched rule will serve the URL. If no rule was matched, the default service will be used.", - "properties": { - "defaultService": { - "type": "string", - "description": "The full or partial URL to the BackendService resource. This will be used if none of the pathRules defined by this PathMatcher is matched by the URL's path portion. For example, the following are all valid URLs to a BackendService resource: \n- https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService \n- compute/v1/projects/project/global/backendServices/backendService \n- global/backendServices/backendService" - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "name": { - "type": "string", - "description": "The name to which this PathMatcher is referred by the HostRule." - }, - "pathRules": { - "type": "array", - "description": "The list of path rules.", - "items": { - "$ref": "PathRule" - } - } - } - }, - "PathRule": { - "id": "PathRule", - "type": "object", - "description": "A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.", - "properties": { - "paths": { - "type": "array", - "description": "The list of path patterns to match. Each must start with / and the only place a * is allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here.", - "items": { - "type": "string" - } - }, - "service": { - "type": "string", - "description": "The URL of the BackendService resource if this rule is matched." - } - } - }, - "PerInstanceConfig": { - "id": "PerInstanceConfig", - "type": "object", - "properties": { - "instance": { - "type": "string", - "description": "The URL of the instance. Serves as a merge key during UpdatePerInstanceConfigs operation." - }, - "override": { - "$ref": "ManagedInstanceOverride" - } - } - }, - "Policy": { - "id": "Policy", - "type": "object", - "description": "Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.\n\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM.\n\n**Example**\n\n{ \"bindings\": [ { \"role\": \"roles/owner\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-other-app@appspot.gserviceaccount.com\", ] }, { \"role\": \"roles/viewer\", \"members\": [\"user:sean@example.com\"] } ] }\n\nFor a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam).", - "properties": { - "auditConfigs": { - "type": "array", - "description": "Specifies cloud audit logging configuration for this policy.", - "items": { - "$ref": "AuditConfig" - } - }, - "bindings": { - "type": "array", - "description": "Associates a list of `members` to a `role`. `bindings` with no members will result in an error.", - "items": { - "$ref": "Binding" - } - }, - "etag": { - "type": "string", - "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.", - "format": "byte" - }, - "iamOwned": { - "type": "boolean", - "description": "" - }, - "rules": { - "type": "array", - "description": "If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.", - "items": { - "$ref": "Rule" - } - }, - "version": { - "type": "integer", - "description": "Version of the `Policy`. The default version is 0.", - "format": "int32" - } - } - }, - "Project": { - "id": "Project", - "type": "object", - "description": "A Project resource. Projects can only be created in the Google Cloud Platform Console. Unless marked otherwise, values can only be modified in the console.", - "properties": { - "commonInstanceMetadata": { - "$ref": "Metadata", - "description": "Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "defaultServiceAccount": { - "type": "string", - "description": "[Output Only] Default service account used by VMs running in this project." - }, - "description": { - "type": "string", - "description": "An optional textual description of the resource." - }, - "enabledFeatures": { - "type": "array", - "description": "Restricted features enabled for use on this project.", - "items": { - "type": "string" - } - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server. This is not the project ID, and is just a unique ID used by Compute Engine to identify resources.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#project for projects.", - "default": "compute#project" - }, - "name": { - "type": "string", - "description": "The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine." - }, - "quotas": { - "type": "array", - "description": "[Output Only] Quotas assigned to this project.", - "items": { - "$ref": "Quota" - } - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "usageExportLocation": { - "$ref": "UsageExportLocation", - "description": "The naming prefix for daily usage reports and the Google Cloud Storage bucket where they are stored." - }, - "xpnProjectStatus": { - "type": "string", - "description": "[Output Only] The role this project has in a shared VPC configuration. Currently only HOST projects are differentiated.", - "enum": [ - "HOST", - "UNSPECIFIED_XPN_PROJECT_STATUS" - ], - "enumDescriptions": [ - "", - "" - ] - } - } - }, - "ProjectsDisableXpnResourceRequest": { - "id": "ProjectsDisableXpnResourceRequest", - "type": "object", - "properties": { - "xpnResource": { - "$ref": "XpnResourceId", - "description": "Service resource (a.k.a service project) ID." - } - } - }, - "ProjectsEnableXpnResourceRequest": { - "id": "ProjectsEnableXpnResourceRequest", - "type": "object", - "properties": { - "xpnResource": { - "$ref": "XpnResourceId", - "description": "Service resource (a.k.a service project) ID." - } - } - }, - "ProjectsGetXpnResources": { - "id": "ProjectsGetXpnResources", - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#projectsGetXpnResources for lists of service resources (a.k.a service projects)", - "default": "compute#projectsGetXpnResources" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "resources": { - "type": "array", - "description": "Serive resources (a.k.a service projects) attached to this project as their shared VPC host.", - "items": { - "$ref": "XpnResourceId" - } - } - } - }, - "ProjectsListXpnHostsRequest": { - "id": "ProjectsListXpnHostsRequest", - "type": "object", - "properties": { - "organization": { - "type": "string", - "description": "Optional organization ID managed by Cloud Resource Manager, for which to list shared VPC host projects. If not specified, the organization will be inferred from the project." - } - } - }, - "ProjectsSetDefaultServiceAccountRequest": { - "id": "ProjectsSetDefaultServiceAccountRequest", - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "Email address of the service account." - } - } - }, - "Quota": { - "id": "Quota", - "type": "object", - "description": "A quotas entry.", - "properties": { - "limit": { - "type": "number", - "description": "[Output Only] Quota limit for this metric.", - "format": "double" - }, - "metric": { - "type": "string", - "description": "[Output Only] Name of the quota metric.", - "enum": [ - "AMD_S9300_GPUS", - "AUTOSCALERS", - "BACKEND_BUCKETS", - "BACKEND_SERVICES", - "COMMITMENTS", - "CPUS", - "CPUS_ALL_REGIONS", - "DISKS_TOTAL_GB", - "FIREWALLS", - "FORWARDING_RULES", - "HEALTH_CHECKS", - "IMAGES", - "INSTANCES", - "INSTANCE_GROUPS", - "INSTANCE_GROUP_MANAGERS", - "INSTANCE_TEMPLATES", - "IN_USE_ADDRESSES", - "LOCAL_SSD_TOTAL_GB", - "NETWORKS", - "NVIDIA_K80_GPUS", - "NVIDIA_P100_GPUS", - "PREEMPTIBLE_CPUS", - "PREEMPTIBLE_LOCAL_SSD_GB", - "REGIONAL_AUTOSCALERS", - "REGIONAL_INSTANCE_GROUP_MANAGERS", - "ROUTERS", - "ROUTES", - "SECURITY_POLICIES", - "SECURITY_POLICY_RULES", - "SNAPSHOTS", - "SSD_TOTAL_GB", - "SSL_CERTIFICATES", - "STATIC_ADDRESSES", - "SUBNETWORKS", - "TARGET_HTTPS_PROXIES", - "TARGET_HTTP_PROXIES", - "TARGET_INSTANCES", - "TARGET_POOLS", - "TARGET_SSL_PROXIES", - "TARGET_TCP_PROXIES", - "TARGET_VPN_GATEWAYS", - "URL_MAPS", - "VPN_TUNNELS" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "usage": { - "type": "number", - "description": "[Output Only] Current usage of this metric.", - "format": "double" - } - } - }, - "Reference": { - "id": "Reference", - "type": "object", - "description": "Represents a reference to a resource.", - "properties": { - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#reference for references.", - "default": "compute#reference" - }, - "referenceType": { - "type": "string", - "description": "A description of the reference type with no implied semantics. Possible values include: \n- MEMBER_OF" - }, - "referrer": { - "type": "string", - "description": "URL of the resource which refers to the target." - }, - "target": { - "type": "string", - "description": "URL of the resource to which this reference points." - } - } - }, - "Region": { - "id": "Region", - "type": "object", - "description": "Region resource.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "[Output Only] The deprecation status associated with this region." - }, - "description": { - "type": "string", - "description": "[Output Only] Textual description of the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#region for regions.", - "default": "compute#region" - }, - "name": { - "type": "string", - "description": "[Output Only] Name of the resource." - }, - "quotas": { - "type": "array", - "description": "[Output Only] Quotas assigned to this region.", - "items": { - "$ref": "Quota" - } - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "status": { - "type": "string", - "description": "[Output Only] Status of the region, either UP or DOWN.", - "enum": [ - "DOWN", - "UP" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "zones": { - "type": "array", - "description": "[Output Only] A list of zones available in this region, in the form of resource URLs.", - "items": { - "type": "string" - } - } - } - }, - "RegionAutoscalerList": { - "id": "RegionAutoscalerList", - "type": "object", - "description": "Contains a list of autoscalers.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Autoscaler resources.", - "items": { - "$ref": "Autoscaler" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#regionAutoscalerList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "RegionDiskTypeList": { - "id": "RegionDiskTypeList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of DiskType resources.", - "items": { - "$ref": "DiskType" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#regionDiskTypeList for region disk types.", - "default": "compute#regionDiskTypeList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "RegionDisksResizeRequest": { - "id": "RegionDisksResizeRequest", - "type": "object", - "properties": { - "sizeGb": { - "type": "string", - "description": "The new size of the regional persistent disk, which is specified in GB.", - "format": "int64" - } - } - }, - "RegionInstanceGroupList": { - "id": "RegionInstanceGroupList", - "type": "object", - "description": "Contains a list of InstanceGroup resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of InstanceGroup resources.", - "items": { - "$ref": "InstanceGroup" - } - }, - "kind": { - "type": "string", - "description": "The resource type.", - "default": "compute#regionInstanceGroupList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "RegionInstanceGroupManagerDeleteInstanceConfigReq": { - "id": "RegionInstanceGroupManagerDeleteInstanceConfigReq", - "type": "object", - "description": "RegionInstanceGroupManagers.deletePerInstanceConfigs", - "properties": { - "instances": { - "type": "array", - "description": "The list of instances for which we want to delete per-instance configs on this managed instance group.", - "items": { - "type": "string" - } - } - } - }, - "RegionInstanceGroupManagerList": { - "id": "RegionInstanceGroupManagerList", - "type": "object", - "description": "Contains a list of managed instance groups.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of InstanceGroupManager resources.", - "items": { - "$ref": "InstanceGroupManager" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] The resource type, which is always compute#instanceGroupManagerList for a list of managed instance groups that exist in th regional scope.", - "default": "compute#regionInstanceGroupManagerList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "RegionInstanceGroupManagerUpdateInstanceConfigReq": { - "id": "RegionInstanceGroupManagerUpdateInstanceConfigReq", - "type": "object", - "description": "RegionInstanceGroupManagers.updatePerInstanceConfigs", - "properties": { - "perInstanceConfigs": { - "type": "array", - "description": "The list of per-instance configs to insert or patch on this managed instance group.", - "items": { - "$ref": "PerInstanceConfig" - } - } - } - }, - "RegionInstanceGroupManagersAbandonInstancesRequest": { - "id": "RegionInstanceGroupManagersAbandonInstancesRequest", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "The URLs of one or more instances to abandon. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - } - } - } - }, - "RegionInstanceGroupManagersApplyUpdatesRequest": { - "id": "RegionInstanceGroupManagersApplyUpdatesRequest", - "type": "object", - "description": "InstanceGroupManagers.applyUpdatesToInstances", - "properties": { - "instances": { - "type": "array", - "description": "The list of instances for which we want to apply changes on this managed instance group.", - "items": { - "type": "string" - } - }, - "maximalAction": { - "type": "string", - "description": "The maximal action that should be perfomed on the instances. By default REPLACE.", - "enum": [ - "NONE", - "REFRESH", - "REPLACE", - "RESTART" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ] - }, - "minimalAction": { - "type": "string", - "description": "The minimal action that should be perfomed on the instances. By default NONE.", - "enum": [ - "NONE", - "REFRESH", - "REPLACE", - "RESTART" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ] - } - } - }, - "RegionInstanceGroupManagersDeleteInstancesRequest": { - "id": "RegionInstanceGroupManagersDeleteInstancesRequest", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - } - } - } - }, - "RegionInstanceGroupManagersListInstanceConfigsResp": { - "id": "RegionInstanceGroupManagersListInstanceConfigsResp", - "type": "object", - "properties": { - "items": { - "type": "array", - "description": "[Output Only] The list of PerInstanceConfig.", - "items": { - "$ref": "PerInstanceConfig" - } - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - } - } - }, - "RegionInstanceGroupManagersListInstancesResponse": { - "id": "RegionInstanceGroupManagersListInstancesResponse", - "type": "object", - "properties": { - "managedInstances": { - "type": "array", - "description": "List of managed instances.", - "items": { - "$ref": "ManagedInstance" - } - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - } - } - }, - "RegionInstanceGroupManagersRecreateRequest": { - "id": "RegionInstanceGroupManagersRecreateRequest", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "The URLs of one or more instances to recreate. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - } - } - } - }, - "RegionInstanceGroupManagersSetAutoHealingRequest": { - "id": "RegionInstanceGroupManagersSetAutoHealingRequest", - "type": "object", - "properties": { - "autoHealingPolicies": { - "type": "array", - "items": { - "$ref": "InstanceGroupManagerAutoHealingPolicy" - } - } - } - }, - "RegionInstanceGroupManagersSetTargetPoolsRequest": { - "id": "RegionInstanceGroupManagersSetTargetPoolsRequest", - "type": "object", - "properties": { - "fingerprint": { - "type": "string", - "description": "Fingerprint of the target pools information, which is a hash of the contents. This field is used for optimistic locking when you update the target pool entries. This field is optional.", - "format": "byte" - }, - "targetPools": { - "type": "array", - "description": "The URL of all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group.", - "items": { - "type": "string" - } - } - } - }, - "RegionInstanceGroupManagersSetTemplateRequest": { - "id": "RegionInstanceGroupManagersSetTemplateRequest", - "type": "object", - "properties": { - "instanceTemplate": { - "type": "string", - "description": "URL of the InstanceTemplate resource from which all new instances will be created." - } - } - }, - "RegionInstanceGroupsListInstances": { - "id": "RegionInstanceGroupsListInstances", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of InstanceWithNamedPorts resources.", - "items": { - "$ref": "InstanceWithNamedPorts" - } - }, - "kind": { - "type": "string", - "description": "The resource type.", - "default": "compute#regionInstanceGroupsListInstances" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "RegionInstanceGroupsListInstancesRequest": { - "id": "RegionInstanceGroupsListInstancesRequest", - "type": "object", - "properties": { - "instanceState": { - "type": "string", - "description": "Instances in which state should be returned. Valid options are: 'ALL', 'RUNNING'. By default, it lists all instances.", - "enum": [ - "ALL", - "RUNNING" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "portName": { - "type": "string", - "description": "Name of port user is interested in. It is optional. If it is set, only information about this ports will be returned. If it is not set, all the named ports will be returned. Always lists all instances.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - } - } - }, - "RegionInstanceGroupsSetNamedPortsRequest": { - "id": "RegionInstanceGroupsSetNamedPortsRequest", - "type": "object", - "properties": { - "fingerprint": { - "type": "string", - "description": "The fingerprint of the named ports information for this instance group. Use this optional property to prevent conflicts when multiple users change the named ports settings concurrently. Obtain the fingerprint with the instanceGroups.get method. Then, include the fingerprint in your request to ensure that you do not overwrite changes that were applied from another concurrent request.", - "format": "byte" - }, - "namedPorts": { - "type": "array", - "description": "The list of named ports to set for this instance group.", - "items": { - "$ref": "NamedPort" - } - } - } - }, - "RegionList": { - "id": "RegionList", - "type": "object", - "description": "Contains a list of region resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Region resources.", - "items": { - "$ref": "Region" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#regionList for lists of regions.", - "default": "compute#regionList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "RegionSetLabelsRequest": { - "id": "RegionSetLabelsRequest", - "type": "object", - "properties": { - "labelFingerprint": { - "type": "string", - "description": "The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels. Make a get() request to the resource to get the latest fingerprint.", - "format": "byte" - }, - "labels": { - "type": "object", - "description": "The labels to set for this resource.", - "additionalProperties": { - "type": "string" - } - } - } - }, - "ResourceCommitment": { - "id": "ResourceCommitment", - "type": "object", - "description": "Commitment for a particular resource (a Commitment is composed of one or more of these).", - "properties": { - "amount": { - "type": "string", - "description": "The amount of the resource purchased (in a type-dependent unit, such as bytes). For vCPUs, this can just be an integer. For memory, this must be provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every vCPU.", - "format": "int64" - }, - "type": { - "type": "string", - "description": "Type of resource for which this commitment applies. Possible values are VCPU and MEMORY", - "enum": [ - "LOCAL_SSD", - "MEMORY", - "UNSPECIFIED", - "VCPU" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ] - } - } - }, - "ResourceGroupReference": { - "id": "ResourceGroupReference", - "type": "object", - "properties": { - "group": { - "type": "string", - "description": "A URI referencing one of the instance groups listed in the backend service." - } - } - }, - "Route": { - "id": "Route", - "type": "object", - "description": "Represents a Route resource. A route specifies how certain packets should be handled by the network. Routes are associated with instances by tags and the set of routes for a particular instance is called its routing table.\n\nFor each packet leaving an instance, the system searches that instance's routing table for a single best matching route. Routes match packets by destination IP address, preferring smaller or more specific ranges over larger ones. If there is a tie, the system selects the route with the smallest priority value. If there is still a tie, it uses the layer three and four packet headers to select just one of the remaining matching routes. The packet is then forwarded as specified by the nextHop field of the winning route - either to another instance destination, an instance gateway, or a Google Compute Engine-operated gateway.\n\nPackets that do not match any route in the sending instance's routing table are dropped.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "destRange": { - "type": "string", - "description": "The destination range of outgoing packets that this route applies to. Only IPv4 is supported.", - "annotations": { - "required": [ - "compute.routes.insert" - ] - } - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of this resource. Always compute#routes for Route resources.", - "default": "compute#route" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.routes.insert" - ] - } - }, - "network": { - "type": "string", - "description": "Fully-qualified URL of the network that this route applies to.", - "annotations": { - "required": [ - "compute.routes.insert" - ] - } - }, - "nextHopGateway": { - "type": "string", - "description": "The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid URL: projects/\u003cproject-id\u003e/global/gateways/default-internet-gateway" - }, - "nextHopInstance": { - "type": "string", - "description": "The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example:\nhttps://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/" - }, - "nextHopIp": { - "type": "string", - "description": "The network IP address of an instance that should handle matching packets. Only IPv4 is supported." - }, - "nextHopNetwork": { - "type": "string", - "description": "The URL of the local network if it should handle matching packets." - }, - "nextHopPeering": { - "type": "string", - "description": "[Output Only] The network peering name that should handle matching packets, which should conform to RFC1035." - }, - "nextHopVpnTunnel": { - "type": "string", - "description": "The URL to a VpnTunnel that should handle matching packets." - }, - "priority": { - "type": "integer", - "description": "The priority of this route. Priority is used to break ties in cases where there is more than one matching route of equal prefix length. In the case of two routes with equal prefix length, the one with the lowest-numbered priority value wins. Default value is 1000. Valid range is 0 through 65535.", - "format": "uint32", - "annotations": { - "required": [ - "compute.routes.insert" - ] - } - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined fully-qualified URL for this resource." - }, - "tags": { - "type": "array", - "description": "A list of instance tags to which this route applies.", - "items": { - "type": "string" - }, - "annotations": { - "required": [ - "compute.routes.insert" - ] - } - }, - "warnings": { - "type": "array", - "description": "[Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.", - "items": { - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - } - }, - "RouteList": { - "id": "RouteList", - "type": "object", - "description": "Contains a list of Route resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Route resources.", - "items": { - "$ref": "Route" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#routeList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "Router": { - "id": "Router", - "type": "object", - "description": "Router resource.", - "properties": { - "bgp": { - "$ref": "RouterBgp", - "description": "BGP information specific to this router." - }, - "bgpPeers": { - "type": "array", - "description": "BGP information that needs to be configured into the routing stack to establish the BGP peering. It must specify peer ASN and either interface name, IP, or peer IP. Please refer to RFC4273.", - "items": { - "$ref": "RouterBgpPeer" - } - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "interfaces": { - "type": "array", - "description": "Router interfaces. Each interface requires either one linked resource (e.g. linkedVpnTunnel), or IP address and IP address range (e.g. ipRange), or both.", - "items": { - "$ref": "RouterInterface" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#router for routers.", - "default": "compute#router" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.routers.insert" - ] - } - }, - "network": { - "type": "string", - "description": "URI of the network to which this router belongs.", - "annotations": { - "required": [ - "compute.routers.insert" - ] - } - }, - "region": { - "type": "string", - "description": "[Output Only] URI of the region where the router resides." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - } - } - }, - "RouterAdvertisedPrefix": { - "id": "RouterAdvertisedPrefix", - "type": "object", - "description": "Description-tagged prefixes for the router to advertise.", - "properties": { - "description": { - "type": "string", - "description": "User-specified description for the prefix." - }, - "prefix": { - "type": "string", - "description": "The prefix to advertise. The value must be a CIDR-formatted string." - } - } - }, - "RouterAggregatedList": { - "id": "RouterAggregatedList", - "type": "object", - "description": "Contains a list of routers.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of Router resources.", - "additionalProperties": { - "$ref": "RoutersScopedList", - "description": "Name of the scope containing this set of routers." - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#routerAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "RouterBgp": { - "id": "RouterBgp", - "type": "object", - "properties": { - "advertiseMode": { - "type": "string", - "description": "User-specified flag to indicate which mode to use for advertisement.", - "enum": [ - "CUSTOM", - "DEFAULT" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "advertisedGroups": { - "type": "array", - "description": "User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.", - "items": { - "type": "string", - "enum": [ - "ALL_SUBNETS" - ], - "enumDescriptions": [ - "" - ] - } - }, - "advertisedPrefixs": { - "type": "array", - "description": "User-specified list of individual prefixes to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These prefixes will be advertised in addition to any specified groups. Leave this field blank to advertise no custom prefixes.", - "items": { - "$ref": "RouterAdvertisedPrefix" - } - }, - "asn": { - "type": "integer", - "description": "Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.", - "format": "uint32" - } - } - }, - "RouterBgpPeer": { - "id": "RouterBgpPeer", - "type": "object", - "properties": { - "advertiseMode": { - "type": "string", - "description": "User-specified flag to indicate which mode to use for advertisement.", - "enum": [ - "CUSTOM", - "DEFAULT" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "advertisedGroups": { - "type": "array", - "description": "User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in Bgp message). These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.", - "items": { - "type": "string", - "enum": [ - "ALL_SUBNETS" - ], - "enumDescriptions": [ - "" - ] - } - }, - "advertisedPrefixs": { - "type": "array", - "description": "User-specified list of individual prefixes to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in Bgp message). These prefixes will be advertised in addition to any specified groups. Leave this field blank to advertise no custom prefixes.", - "items": { - "$ref": "RouterAdvertisedPrefix" - } - }, - "advertisedRoutePriority": { - "type": "integer", - "description": "The priority of routes advertised to this BGP peer. In the case where there is more than one matching route of maximum length, the routes with lowest priority value win.", - "format": "uint32" - }, - "interfaceName": { - "type": "string", - "description": "Name of the interface the BGP peer is associated with." - }, - "ipAddress": { - "type": "string", - "description": "IP address of the interface inside Google Cloud Platform. Only IPv4 is supported." - }, - "name": { - "type": "string", - "description": "Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "peerAsn": { - "type": "integer", - "description": "Peer BGP Autonomous System Number (ASN). For VPN use case, this value can be different for every tunnel.", - "format": "uint32" - }, - "peerIpAddress": { - "type": "string", - "description": "IP address of the BGP interface outside Google cloud. Only IPv4 is supported." - } - } - }, - "RouterInterface": { - "id": "RouterInterface", - "type": "object", - "properties": { - "ipRange": { - "type": "string", - "description": "IP address and range of the interface. The IP range must be in the RFC3927 link-local IP space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface." - }, - "linkedInterconnectAttachment": { - "type": "string", - "description": "URI of the linked interconnect attachment. It must be in the same region as the router. Each interface can have at most one linked resource and it could either be a VPN Tunnel or an interconnect attachment." - }, - "linkedVpnTunnel": { - "type": "string", - "description": "URI of the linked VPN tunnel. It must be in the same region as the router. Each interface can have at most one linked resource and it could either be a VPN Tunnel or an interconnect attachment." - }, - "name": { - "type": "string", - "description": "Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - } - } - }, - "RouterList": { - "id": "RouterList", - "type": "object", - "description": "Contains a list of Router resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Router resources.", - "items": { - "$ref": "Router" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#router for routers.", - "default": "compute#routerList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "RouterStatus": { - "id": "RouterStatus", - "type": "object", - "properties": { - "bestRoutes": { - "type": "array", - "description": "Best routes for this router's network.", - "items": { - "$ref": "Route" - } - }, - "bestRoutesForRouter": { - "type": "array", - "description": "Best routes learned by this router.", - "items": { - "$ref": "Route" - } - }, - "bgpPeerStatus": { - "type": "array", - "items": { - "$ref": "RouterStatusBgpPeerStatus" - } - }, - "network": { - "type": "string", - "description": "URI of the network to which this router belongs." - } - } - }, - "RouterStatusBgpPeerStatus": { - "id": "RouterStatusBgpPeerStatus", - "type": "object", - "properties": { - "advertisedRoutes": { - "type": "array", - "description": "Routes that were advertised to the remote BGP peer", - "items": { - "$ref": "Route" - } - }, - "ipAddress": { - "type": "string", - "description": "IP address of the local BGP interface." - }, - "linkedVpnTunnel": { - "type": "string", - "description": "URL of the VPN tunnel that this BGP peer controls." - }, - "name": { - "type": "string", - "description": "Name of this BGP peer. Unique within the Routers resource." - }, - "numLearnedRoutes": { - "type": "integer", - "description": "Number of routes learned from the remote BGP Peer.", - "format": "uint32" - }, - "peerIpAddress": { - "type": "string", - "description": "IP address of the remote BGP interface." - }, - "state": { - "type": "string", - "description": "BGP state as specified in RFC1771." - }, - "status": { - "type": "string", - "description": "Status of the BGP peer: {UP, DOWN}", - "enum": [ - "DOWN", - "UNKNOWN", - "UP" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "uptime": { - "type": "string", - "description": "Time this session has been up. Format: 14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds" - }, - "uptimeSeconds": { - "type": "string", - "description": "Time this session has been up, in seconds. Format: 145" - } - } - }, - "RouterStatusResponse": { - "id": "RouterStatusResponse", - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#routerStatusResponse" - }, - "result": { - "$ref": "RouterStatus" - } - } - }, - "RoutersPreviewResponse": { - "id": "RoutersPreviewResponse", - "type": "object", - "properties": { - "resource": { - "$ref": "Router", - "description": "Preview of given router." - } - } - }, - "RoutersScopedList": { - "id": "RoutersScopedList", - "type": "object", - "properties": { - "routers": { - "type": "array", - "description": "List of routers contained in this scope.", - "items": { - "$ref": "Router" - } - }, - "warning": { - "type": "object", - "description": "Informational warning which replaces the list of routers when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "Rule": { - "id": "Rule", - "type": "object", - "description": "A rule to be applied in a Policy.", - "properties": { - "action": { - "type": "string", - "description": "Required", - "enum": [ - "ALLOW", - "ALLOW_WITH_LOG", - "DENY", - "DENY_WITH_LOG", - "LOG", - "NO_ACTION" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ] - }, - "conditions": { - "type": "array", - "description": "Additional restrictions that must be met", - "items": { - "$ref": "Condition" - } - }, - "description": { - "type": "string", - "description": "Human-readable description of the rule." - }, - "ins": { - "type": "array", - "description": "If one or more 'in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.", - "items": { - "type": "string" - } - }, - "logConfigs": { - "type": "array", - "description": "The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.", - "items": { - "$ref": "LogConfig" - } - }, - "notIns": { - "type": "array", - "description": "If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.", - "items": { - "type": "string" - } - }, - "permissions": { - "type": "array", - "description": "A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.", - "items": { - "type": "string" - } - } - } - }, - "SSLHealthCheck": { - "id": "SSLHealthCheck", - "type": "object", - "properties": { - "port": { - "type": "integer", - "description": "The TCP port number for the health check request. The default value is 443. Valid values are 1 through 65535.", - "format": "int32" - }, - "portName": { - "type": "string", - "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence." - }, - "proxyHeader": { - "type": "string", - "description": "Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "request": { - "type": "string", - "description": "The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII." - }, - "response": { - "type": "string", - "description": "The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII." - } - } - }, - "Scheduling": { - "id": "Scheduling", - "type": "object", - "description": "Sets the scheduling options for an Instance.", - "properties": { - "automaticRestart": { - "type": "boolean", - "description": "Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.\n\nBy default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine." - }, - "onHostMaintenance": { - "type": "string", - "description": "Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.", - "enum": [ - "MIGRATE", - "TERMINATE" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "preemptible": { - "type": "boolean", - "description": "Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created." - } - } - }, - "SecurityPoliciesList": { - "id": "SecurityPoliciesList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of SecurityPolicy resources.", - "items": { - "$ref": "SecurityPolicy" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#securityPoliciesList for listsof securityPolicies", - "default": "compute#securityPoliciesList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - } - } - }, - "SecurityPolicy": { - "id": "SecurityPolicy", - "type": "object", - "description": "A security policy is comprised of one or more rules. It can also be associated with one or more 'targets'.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "fingerprint": { - "type": "string", - "description": "Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.\n\nTo see the latest fingerprint, make get() request to the security policy.", - "format": "byte" - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output only] Type of the resource. Always compute#securityPolicyfor security policies", - "default": "compute#securityPolicy" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "rules": { - "type": "array", - "description": "List of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match \"*\"). If no rules are provided when creating a security policy, a default rule with action \"allow\" will be added.", - "items": { - "$ref": "SecurityPolicyRule" - } - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - } - } - }, - "SecurityPolicyReference": { - "id": "SecurityPolicyReference", - "type": "object", - "properties": { - "securityPolicy": { - "type": "string" - } - } - }, - "SecurityPolicyRule": { - "id": "SecurityPolicyRule", - "type": "object", - "description": "Represents a rule that describes one or more match conditions along with the action to be taken when traffic matches this condition (allow or deny).", - "properties": { - "action": { - "type": "string", - "description": "The Action to preform when the client connection triggers the rule. Can currently be either \"allow\" or \"deny()\" where valid values for status are 403, 404, and 502." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "kind": { - "type": "string", - "description": "[Output only] Type of the resource. Always compute#rulefor security policies", - "default": "compute#securityPolicyRule" - }, - "match": { - "$ref": "SecurityPolicyRuleMatcher", - "description": "A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding ?action? is enforced." - }, - "preview": { - "type": "boolean", - "description": "If set to true, the specified action is not enforced." - }, - "priority": { - "type": "integer", - "description": "An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated in the increasing order of priority.", - "format": "int32" - } - } - }, - "SecurityPolicyRuleMatcher": { - "id": "SecurityPolicyRuleMatcher", - "type": "object", - "description": "Represents a match condition that incoming traffic is evaluated against. Exactly one field must be specified.", - "properties": { - "srcIpRanges": { - "type": "array", - "description": "CIDR IP address range. Only IPv4 is supported.", - "items": { - "type": "string" - } - }, - "srcRegionCodes": { - "type": "array", - "description": "Match by country or region code.", - "items": { - "type": "string" - } - } - } - }, - "SerialPortOutput": { - "id": "SerialPortOutput", - "type": "object", - "description": "An instance's serial console output.", - "properties": { - "contents": { - "type": "string", - "description": "[Output Only] The contents of the console output." - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#serialPortOutput for serial port output.", - "default": "compute#serialPortOutput" - }, - "next": { - "type": "string", - "description": "[Output Only] The position of the next byte of content from the serial console output. Use this value in the next request as the start parameter.", - "format": "int64" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - }, - "start": { - "type": "string", - "description": "The starting byte position of the output that was returned. This should match the start parameter sent with the request. If the serial console output exceeds the size of the buffer, older output will be overwritten by newer content and the start values will be mismatched.", - "format": "int64" - } - } - }, - "ServiceAccount": { - "id": "ServiceAccount", - "type": "object", - "description": "A service account.", - "properties": { - "email": { - "type": "string", - "description": "Email address of the service account." - }, - "scopes": { - "type": "array", - "description": "The list of scopes to be made available for this service account.", - "items": { - "type": "string" - } - } - } - }, - "SignedUrlKey": { - "id": "SignedUrlKey", - "type": "object", - "description": "Represents a customer-supplied Signing Key used by Cloud CDN Signed URLs", - "properties": { - "keyName": { - "type": "string", - "description": "Name of the key. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "keyValue": { - "type": "string", - "description": "128-bit key value used for signing the URL. The key value must be a valid RFC 4648 Section 5 base64url encoded string." - } - } - }, - "Snapshot": { - "id": "Snapshot", - "type": "object", - "description": "A persistent disk snapshot resource.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "diskSizeGb": { - "type": "string", - "description": "[Output Only] Size of the snapshot, specified in GB.", - "format": "int64" - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#snapshot for Snapshot resources.", - "default": "compute#snapshot" - }, - "labelFingerprint": { - "type": "string", - "description": "A fingerprint for the labels being applied to this snapshot, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve a snapshot.", - "format": "byte" - }, - "labels": { - "type": "object", - "description": "Labels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty.", - "additionalProperties": { - "type": "string" - } - }, - "licenseCodes": { - "type": "array", - "description": "Integer license codes indicating which licenses are attached to this snapshot.", - "items": { - "type": "string", - "format": "int64" - } - }, - "licenses": { - "type": "array", - "description": "[Output Only] A list of public visible licenses that apply to this snapshot. This can be because the original image had licenses attached (such as a Windows image).", - "items": { - "type": "string" - } - }, - "name": { - "type": "string", - "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "snapshotEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Encrypts the snapshot using a customer-supplied encryption key.\n\nAfter you encrypt a snapshot using a customer-supplied key, you must provide the same key if you use the image later For example, you must provide the encryption key when you create a disk from the encrypted snapshot in a future request.\n\nCustomer-supplied encryption keys do not protect access to metadata of the disk.\n\nIf you do not provide an encryption key when creating the snapshot, then the snapshot will be encrypted using an automatically generated key and you do not need to provide a key to use the snapshot later." - }, - "sourceDisk": { - "type": "string", - "description": "[Output Only] The source disk used to create this snapshot." - }, - "sourceDiskEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key." - }, - "sourceDiskId": { - "type": "string", - "description": "[Output Only] The ID value of the disk used to create this snapshot. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given disk name." - }, - "status": { - "type": "string", - "description": "[Output Only] The status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or UPLOADING.", - "enum": [ - "CREATING", - "DELETING", - "FAILED", - "READY", - "UPLOADING" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ] - }, - "storageBytes": { - "type": "string", - "description": "[Output Only] A size of the the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot creation/deletion.", - "format": "int64" - }, - "storageBytesStatus": { - "type": "string", - "description": "[Output Only] An indicator whether storageBytes is in a stable state or it is being adjusted as a result of shared storage reallocation. This status can either be UPDATING, meaning the size of the snapshot is being updated, or UP_TO_DATE, meaning the size of the snapshot is up-to-date.", - "enum": [ - "UPDATING", - "UP_TO_DATE" - ], - "enumDescriptions": [ - "", - "" - ] - } - } - }, - "SnapshotList": { - "id": "SnapshotList", - "type": "object", - "description": "Contains a list of Snapshot resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Snapshot resources.", - "items": { - "$ref": "Snapshot" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#snapshotList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "SslCertificate": { - "id": "SslCertificate", - "type": "object", - "description": "An SslCertificate resource. This resource provides a mechanism to upload an SSL key and certificate to the load balancer to serve secure connections from the user.", - "properties": { - "certificate": { - "type": "string", - "description": "A local certificate file. The certificate must be in PEM format. The certificate chain must be no greater than 5 certs long. The chain must include at least one intermediate cert." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#sslCertificate for SSL certificates.", - "default": "compute#sslCertificate" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "privateKey": { - "type": "string", - "description": "A write-only private key in PEM format. Only insert requests will include this field." - }, - "selfLink": { - "type": "string", - "description": "[Output only] Server-defined URL for the resource." - } - } - }, - "SslCertificateList": { - "id": "SslCertificateList", - "type": "object", - "description": "Contains a list of SslCertificate resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of SslCertificate resources.", - "items": { - "$ref": "SslCertificate" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#sslCertificateList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "Subnetwork": { - "id": "Subnetwork", - "type": "object", - "description": "A Subnetwork resource.", - "properties": { - "allowSubnetCidrRoutesOverlap": { - "type": "boolean", - "description": "Whether this subnetwork can conflict with static routes. Setting this to true allows this subnetwork's primary and secondary ranges to conflict with routes that have already been configured on the corresponding network. Static routes will take precedence over the subnetwork route if the route prefix length is at least as large as the subnetwork prefix length.\n\nAlso, packets destined to IPs within subnetwork may contain private/sensitive data and are prevented from leaving the virtual network. Setting this field to true will disable this feature.\n\nThe default value is false and applies to all existing subnetworks and automatically created subnetworks.\n\nThis field cannot be set to true at resource creation time." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource. This field can be set only at resource creation time." - }, - "fingerprint": { - "type": "string", - "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a Subnetwork. An up-to-date fingerprint must be provided in order to update the Subnetwork.", - "format": "byte" - }, - "gatewayAddress": { - "type": "string", - "description": "[Output Only] The gateway address for default routes to reach destination addresses outside this subnetwork. This field can be set only at resource creation time." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "ipCidrRange": { - "type": "string", - "description": "The range of internal addresses that are owned by this subnetwork. Provide this property when you create the subnetwork. For example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and non-overlapping within a network. Only IPv4 is supported. This field can be set only at resource creation time." - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#subnetwork for Subnetwork resources.", - "default": "compute#subnetwork" - }, - "name": { - "type": "string", - "description": "The name of the resource, provided by the client when initially creating the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "network": { - "type": "string", - "description": "The URL of the network to which this subnetwork belongs, provided by the client when initially creating the subnetwork. Only networks that are in the distributed mode can have subnetworks. This field can be set only at resource creation time." - }, - "privateIpGoogleAccess": { - "type": "boolean", - "description": "Whether the VMs in this subnet can access Google services without assigned external IP addresses. This field can be both set at resource creation time and updated using setPrivateIpGoogleAccess." - }, - "region": { - "type": "string", - "description": "URL of the region where the Subnetwork resides. This field can be set only at resource creation time." - }, - "secondaryIpRanges": { - "type": "array", - "description": "An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges.", - "items": { - "$ref": "SubnetworkSecondaryRange" - } - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - } - } - }, - "SubnetworkAggregatedList": { - "id": "SubnetworkAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of SubnetworksScopedList resources.", - "additionalProperties": { - "$ref": "SubnetworksScopedList", - "description": "Name of the scope containing this set of Subnetworks." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#subnetworkAggregatedList for aggregated lists of subnetworks.", - "default": "compute#subnetworkAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "SubnetworkList": { - "id": "SubnetworkList", - "type": "object", - "description": "Contains a list of Subnetwork resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Subnetwork resources.", - "items": { - "$ref": "Subnetwork" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#subnetworkList for lists of subnetworks.", - "default": "compute#subnetworkList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "SubnetworkSecondaryRange": { - "id": "SubnetworkSecondaryRange", - "type": "object", - "description": "Represents a secondary IP range of a subnetwork.", - "properties": { - "ipCidrRange": { - "type": "string", - "description": "The range of IP addresses belonging to this subnetwork secondary range. Provide this property when you create the subnetwork. Ranges must be unique and non-overlapping with all primary and secondary IP ranges within a network. Only IPv4 is supported." - }, - "rangeName": { - "type": "string", - "description": "The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance. The name must be 1-63 characters long, and comply with RFC1035. The name must be unique within the subnetwork." - } - } - }, - "SubnetworksExpandIpCidrRangeRequest": { - "id": "SubnetworksExpandIpCidrRangeRequest", - "type": "object", - "properties": { - "ipCidrRange": { - "type": "string", - "description": "The IP (in CIDR format or netmask) of internal addresses that are legal on this Subnetwork. This range should be disjoint from other subnetworks within this network. This range can only be larger than (i.e. a superset of) the range previously defined before the update." - } - } - }, - "SubnetworksScopedList": { - "id": "SubnetworksScopedList", - "type": "object", - "properties": { - "subnetworks": { - "type": "array", - "description": "List of subnetworks contained in this scope.", - "items": { - "$ref": "Subnetwork" - } - }, - "warning": { - "type": "object", - "description": "An informational warning that appears when the list of addresses is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "SubnetworksSetPrivateIpGoogleAccessRequest": { - "id": "SubnetworksSetPrivateIpGoogleAccessRequest", - "type": "object", - "properties": { - "privateIpGoogleAccess": { - "type": "boolean" - } - } - }, - "TCPHealthCheck": { - "id": "TCPHealthCheck", - "type": "object", - "properties": { - "port": { - "type": "integer", - "description": "The TCP port number for the health check request. The default value is 80. Valid values are 1 through 65535.", - "format": "int32" - }, - "portName": { - "type": "string", - "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence." - }, - "proxyHeader": { - "type": "string", - "description": "Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "request": { - "type": "string", - "description": "The application data to send once the TCP connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII." - }, - "response": { - "type": "string", - "description": "The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII." - } - } - }, - "Tags": { - "id": "Tags", - "type": "object", - "description": "A set of instance tags.", - "properties": { - "fingerprint": { - "type": "string", - "description": "Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.\n\nTo see the latest fingerprint, make get() request to the instance.", - "format": "byte" - }, - "items": { - "type": "array", - "description": "An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.", - "items": { - "type": "string" - } - } - } - }, - "TargetHttpProxy": { - "id": "TargetHttpProxy", - "type": "object", - "description": "A TargetHttpProxy resource. This resource defines an HTTP proxy.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#targetHttpProxy for target HTTP proxies.", - "default": "compute#targetHttpProxy" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "urlMap": { - "type": "string", - "description": "URL to the UrlMap resource that defines the mapping from URL to the BackendService." - } - } - }, - "TargetHttpProxyList": { - "id": "TargetHttpProxyList", - "type": "object", - "description": "A list of TargetHttpProxy resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of TargetHttpProxy resources.", - "items": { - "$ref": "TargetHttpProxy" - } - }, - "kind": { - "type": "string", - "description": "Type of resource. Always compute#targetHttpProxyList for lists of target HTTP proxies.", - "default": "compute#targetHttpProxyList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "TargetHttpsProxiesSetQuicOverrideRequest": { - "id": "TargetHttpsProxiesSetQuicOverrideRequest", - "type": "object", - "properties": { - "quicOverride": { - "type": "string", - "description": "QUIC policy for the TargetHttpsProxy resource.", - "enum": [ - "DISABLE", - "ENABLE", - "NONE" - ], - "enumDescriptions": [ - "", - "", - "" - ] - } - } - }, - "TargetHttpsProxiesSetSslCertificatesRequest": { - "id": "TargetHttpsProxiesSetSslCertificatesRequest", - "type": "object", - "properties": { - "sslCertificates": { - "type": "array", - "description": "New set of SslCertificate resources to associate with this TargetHttpsProxy resource. Currently exactly one SslCertificate resource must be specified.", - "items": { - "type": "string" - } - } - } - }, - "TargetHttpsProxy": { - "id": "TargetHttpsProxy", - "type": "object", - "description": "A TargetHttpsProxy resource. This resource defines an HTTPS proxy.", - "properties": { - "clientSslPolicy": { - "type": "string", - "description": "URL to ClientSslPolicy resource which controls the set of allowed SSL versions and ciphers." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#targetHttpsProxy for target HTTPS proxies.", - "default": "compute#targetHttpsProxy" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "quicOverride": { - "type": "string", - "description": "Specifies the QUIC override policy for this TargetHttpsProxy resource. This determines whether the load balancer will attempt to negotiate QUIC with clients or not. Can specify one of NONE, ENABLE, or DISABLE. Specify ENABLE to always enable QUIC, Enables QUIC when set to ENABLE, and disables QUIC when set to DISABLE. If NONE is specified, uses the QUIC policy with no user overrides, which is equivalent to DISABLE. Not specifying this field is equivalent to specifying NONE.", - "enum": [ - "DISABLE", - "ENABLE", - "NONE" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "sslCertificates": { - "type": "array", - "description": "URLs to SslCertificate resources that are used to authenticate connections between users and the load balancer. Currently, exactly one SSL certificate must be specified.", - "items": { - "type": "string" - } - }, - "urlMap": { - "type": "string", - "description": "A fully-qualified or valid partial URL to the UrlMap resource that defines the mapping from URL to the BackendService. For example, the following are all valid URLs for specifying a URL map: \n- https://www.googleapis.compute/v1/projects/project/global/urlMaps/url-map \n- projects/project/global/urlMaps/url-map \n- global/urlMaps/url-map" - } - } - }, - "TargetHttpsProxyList": { - "id": "TargetHttpsProxyList", - "type": "object", - "description": "Contains a list of TargetHttpsProxy resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of TargetHttpsProxy resources.", - "items": { - "$ref": "TargetHttpsProxy" - } - }, - "kind": { - "type": "string", - "description": "Type of resource. Always compute#targetHttpsProxyList for lists of target HTTPS proxies.", - "default": "compute#targetHttpsProxyList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "TargetInstance": { - "id": "TargetInstance", - "type": "object", - "description": "A TargetInstance resource. This resource defines an endpoint instance that terminates traffic of certain protocols.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "instance": { - "type": "string", - "description": "A URL to the virtual machine instance that handles traffic for this target instance. When creating a target instance, you can provide the fully-qualified URL or a valid partial URL to the desired virtual machine. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance \n- projects/project/zones/zone/instances/instance \n- zones/zone/instances/instance" - }, - "kind": { - "type": "string", - "description": "[Output Only] The type of the resource. Always compute#targetInstance for target instances.", - "default": "compute#targetInstance" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "natPolicy": { - "type": "string", - "description": "NAT option controlling how IPs are NAT'ed to the instance. Currently only NO_NAT (default value) is supported.", - "enum": [ - "NO_NAT" - ], - "enumDescriptions": [ - "" - ] - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "zone": { - "type": "string", - "description": "[Output Only] URL of the zone where the target instance resides." - } - } - }, - "TargetInstanceAggregatedList": { - "id": "TargetInstanceAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of TargetInstance resources.", - "additionalProperties": { - "$ref": "TargetInstancesScopedList", - "description": "Name of the scope containing this set of target instances." - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#targetInstanceAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "TargetInstanceList": { - "id": "TargetInstanceList", - "type": "object", - "description": "Contains a list of TargetInstance resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of TargetInstance resources.", - "items": { - "$ref": "TargetInstance" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#targetInstanceList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "TargetInstancesScopedList": { - "id": "TargetInstancesScopedList", - "type": "object", - "properties": { - "targetInstances": { - "type": "array", - "description": "List of target instances contained in this scope.", - "items": { - "$ref": "TargetInstance" - } - }, - "warning": { - "type": "object", - "description": "Informational warning which replaces the list of addresses when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "TargetPool": { - "id": "TargetPool", - "type": "object", - "description": "A TargetPool resource. This resource defines a pool of instances, an associated HttpHealthCheck resource, and the fallback target pool.", - "properties": { - "backupPool": { - "type": "string", - "description": "This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool, and its failoverRatio field is properly set to a value between [0, 1].\n\nbackupPool and failoverRatio together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below failoverRatio, traffic arriving at the load-balanced IP will be directed to the backup pool.\n\nIn case where failoverRatio and backupPool are not set, or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the \"force\" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "failoverRatio": { - "type": "number", - "description": "This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool (i.e., not as a backup pool to some other target pool). The value of the field must be in [0, 1].\n\nIf set, backupPool must also be set. They together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below this number, traffic arriving at the load-balanced IP will be directed to the backup pool.\n\nIn case where failoverRatio is not set or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the \"force\" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy.", - "format": "float" - }, - "healthChecks": { - "type": "array", - "description": "The URL of the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. An empty list means all member instances will be considered healthy at all times. Only HttpHealthChecks are supported. Only one health check may be specified.", - "items": { - "type": "string" - } - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "instances": { - "type": "array", - "description": "A list of resource URLs to the virtual machine instances serving this pool. They must live in zones contained in the same region as this pool.", - "items": { - "type": "string" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#targetPool for target pools.", - "default": "compute#targetPool" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "region": { - "type": "string", - "description": "[Output Only] URL of the region where the target pool resides." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "sessionAffinity": { - "type": "string", - "description": "Sesssion affinity option, must be one of the following values:\nNONE: Connections from the same client IP may go to any instance in the pool.\nCLIENT_IP: Connections from the same client IP will go to the same instance in the pool while that instance remains healthy.\nCLIENT_IP_PROTO: Connections from the same client IP with the same IP protocol will go to the same instance in the pool while that instance remains healthy.", - "enum": [ - "CLIENT_IP", - "CLIENT_IP_PORT_PROTO", - "CLIENT_IP_PROTO", - "GENERATED_COOKIE", - "NONE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ] - } - } - }, - "TargetPoolAggregatedList": { - "id": "TargetPoolAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of TargetPool resources.", - "additionalProperties": { - "$ref": "TargetPoolsScopedList", - "description": "Name of the scope containing this set of target pools." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#targetPoolAggregatedList for aggregated lists of target pools.", - "default": "compute#targetPoolAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "TargetPoolInstanceHealth": { - "id": "TargetPoolInstanceHealth", - "type": "object", - "properties": { - "healthStatus": { - "type": "array", - "items": { - "$ref": "HealthStatus" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#targetPoolInstanceHealth when checking the health of an instance.", - "default": "compute#targetPoolInstanceHealth" - } - } - }, - "TargetPoolList": { - "id": "TargetPoolList", - "type": "object", - "description": "Contains a list of TargetPool resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of TargetPool resources.", - "items": { - "$ref": "TargetPool" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#targetPoolList for lists of target pools.", - "default": "compute#targetPoolList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "TargetPoolsAddHealthCheckRequest": { - "id": "TargetPoolsAddHealthCheckRequest", - "type": "object", - "properties": { - "healthChecks": { - "type": "array", - "description": "The HttpHealthCheck to add to the target pool.", - "items": { - "$ref": "HealthCheckReference" - } - } - } - }, - "TargetPoolsAddInstanceRequest": { - "id": "TargetPoolsAddInstanceRequest", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "A full or partial URL to an instance to add to this target pool. This can be a full or partial URL. For example, the following are valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project-id/zones/zone/instances/instance-name \n- projects/project-id/zones/zone/instances/instance-name \n- zones/zone/instances/instance-name", - "items": { - "$ref": "InstanceReference" - } - } - } - }, - "TargetPoolsRemoveHealthCheckRequest": { - "id": "TargetPoolsRemoveHealthCheckRequest", - "type": "object", - "properties": { - "healthChecks": { - "type": "array", - "description": "Health check URL to be removed. This can be a full or valid partial URL. For example, the following are valid URLs: \n- https://www.googleapis.com/compute/beta/projects/project/global/httpHealthChecks/health-check \n- projects/project/global/httpHealthChecks/health-check \n- global/httpHealthChecks/health-check", - "items": { - "$ref": "HealthCheckReference" - } - } - } - }, - "TargetPoolsRemoveInstanceRequest": { - "id": "TargetPoolsRemoveInstanceRequest", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "URLs of the instances to be removed from target pool.", - "items": { - "$ref": "InstanceReference" - } - } - } - }, - "TargetPoolsScopedList": { - "id": "TargetPoolsScopedList", - "type": "object", - "properties": { - "targetPools": { - "type": "array", - "description": "List of target pools contained in this scope.", - "items": { - "$ref": "TargetPool" - } - }, - "warning": { - "type": "object", - "description": "Informational warning which replaces the list of addresses when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "TargetReference": { - "id": "TargetReference", - "type": "object", - "properties": { - "target": { - "type": "string" - } - } - }, - "TargetSslProxiesSetBackendServiceRequest": { - "id": "TargetSslProxiesSetBackendServiceRequest", - "type": "object", - "properties": { - "service": { - "type": "string", - "description": "The URL of the new BackendService resource for the targetSslProxy." - } - } - }, - "TargetSslProxiesSetProxyHeaderRequest": { - "id": "TargetSslProxiesSetProxyHeaderRequest", - "type": "object", - "properties": { - "proxyHeader": { - "type": "string", - "description": "The new type of proxy header to append before sending data to the backend. NONE or PROXY_V1 are allowed.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ] - } - } - }, - "TargetSslProxiesSetSslCertificatesRequest": { - "id": "TargetSslProxiesSetSslCertificatesRequest", - "type": "object", - "properties": { - "sslCertificates": { - "type": "array", - "description": "New set of URLs to SslCertificate resources to associate with this TargetSslProxy. Currently exactly one ssl certificate must be specified.", - "items": { - "type": "string" - } - } - } - }, - "TargetSslProxy": { - "id": "TargetSslProxy", - "type": "object", - "description": "A TargetSslProxy resource. This resource defines an SSL proxy.", - "properties": { - "clientSslPolicy": { - "type": "string", - "description": "URL to ClientSslPolicy resource which controls the set of allowed SSL versions and ciphers." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#targetSslProxy for target SSL proxies.", - "default": "compute#targetSslProxy" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "proxyHeader": { - "type": "string", - "description": "Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "service": { - "type": "string", - "description": "URL to the BackendService resource." - }, - "sslCertificates": { - "type": "array", - "description": "URLs to SslCertificate resources that are used to authenticate connections to Backends. Currently exactly one SSL certificate must be specified.", - "items": { - "type": "string" - } - } - } - }, - "TargetSslProxyList": { - "id": "TargetSslProxyList", - "type": "object", - "description": "Contains a list of TargetSslProxy resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of TargetSslProxy resources.", - "items": { - "$ref": "TargetSslProxy" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#targetSslProxyList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "TargetTcpProxiesSetBackendServiceRequest": { - "id": "TargetTcpProxiesSetBackendServiceRequest", - "type": "object", - "properties": { - "service": { - "type": "string", - "description": "The URL of the new BackendService resource for the targetTcpProxy." - } - } - }, - "TargetTcpProxiesSetProxyHeaderRequest": { - "id": "TargetTcpProxiesSetProxyHeaderRequest", - "type": "object", - "properties": { - "proxyHeader": { - "type": "string", - "description": "The new type of proxy header to append before sending data to the backend. NONE or PROXY_V1 are allowed.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ] - } - } - }, - "TargetTcpProxy": { - "id": "TargetTcpProxy", - "type": "object", - "description": "A TargetTcpProxy resource. This resource defines a TCP proxy.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#targetTcpProxy for target TCP proxies.", - "default": "compute#targetTcpProxy" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "proxyHeader": { - "type": "string", - "description": "Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "service": { - "type": "string", - "description": "URL to the BackendService resource." - } - } - }, - "TargetTcpProxyList": { - "id": "TargetTcpProxyList", - "type": "object", - "description": "Contains a list of TargetTcpProxy resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of TargetTcpProxy resources.", - "items": { - "$ref": "TargetTcpProxy" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#targetTcpProxyList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "TargetVpnGateway": { - "id": "TargetVpnGateway", - "type": "object", - "description": "Represents a Target VPN gateway resource.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "forwardingRules": { - "type": "array", - "description": "[Output Only] A list of URLs to the ForwardingRule resources. ForwardingRules are created using compute.forwardingRules.insert and associated to a VPN gateway.", - "items": { - "type": "string" - } - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#targetVpnGateway for target VPN gateways.", - "default": "compute#targetVpnGateway" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.targetVpnGateways.insert" - ] - } - }, - "network": { - "type": "string", - "description": "URL of the network to which this VPN gateway is attached. Provided by the client when the VPN gateway is created.", - "annotations": { - "required": [ - "compute.targetVpnGateways.insert" - ] - } - }, - "region": { - "type": "string", - "description": "[Output Only] URL of the region where the target VPN gateway resides." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "status": { - "type": "string", - "description": "[Output Only] The status of the VPN gateway.", - "enum": [ - "CREATING", - "DELETING", - "FAILED", - "READY" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ] - }, - "tunnels": { - "type": "array", - "description": "[Output Only] A list of URLs to VpnTunnel resources. VpnTunnels are created using compute.vpntunnels.insert method and associated to a VPN gateway.", - "items": { - "type": "string" - } - } - } - }, - "TargetVpnGatewayAggregatedList": { - "id": "TargetVpnGatewayAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of TargetVpnGateway resources.", - "additionalProperties": { - "$ref": "TargetVpnGatewaysScopedList", - "description": "[Output Only] Name of the scope containing this set of target VPN gateways." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#targetVpnGateway for target VPN gateways.", - "default": "compute#targetVpnGatewayAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "TargetVpnGatewayList": { - "id": "TargetVpnGatewayList", - "type": "object", - "description": "Contains a list of TargetVpnGateway resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of TargetVpnGateway resources.", - "items": { - "$ref": "TargetVpnGateway" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#targetVpnGateway for target VPN gateways.", - "default": "compute#targetVpnGatewayList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "TargetVpnGatewaysScopedList": { - "id": "TargetVpnGatewaysScopedList", - "type": "object", - "properties": { - "targetVpnGateways": { - "type": "array", - "description": "[Output Only] List of target vpn gateways contained in this scope.", - "items": { - "$ref": "TargetVpnGateway" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] Informational warning which replaces the list of addresses when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "TestFailure": { - "id": "TestFailure", - "type": "object", - "properties": { - "actualService": { - "type": "string" - }, - "expectedService": { - "type": "string" - }, - "host": { - "type": "string" - }, - "path": { - "type": "string" - } - } - }, - "TestPermissionsRequest": { - "id": "TestPermissionsRequest", - "type": "object", - "properties": { - "permissions": { - "type": "array", - "description": "The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.", - "items": { - "type": "string" - } - } - } - }, - "TestPermissionsResponse": { - "id": "TestPermissionsResponse", - "type": "object", - "properties": { - "permissions": { - "type": "array", - "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", - "items": { - "type": "string" - } - } - } - }, - "UDPHealthCheck": { - "id": "UDPHealthCheck", - "type": "object", - "properties": { - "port": { - "type": "integer", - "description": "The UDP port number for the health check request. Valid values are 1 through 65535.", - "format": "int32" - }, - "portName": { - "type": "string", - "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence." - }, - "request": { - "type": "string", - "description": "Raw data of request to send in payload of UDP packet. It is an error if this is empty. The request data can only be ASCII." - }, - "response": { - "type": "string", - "description": "The bytes to match against the beginning of the response data. It is an error if this is empty. The response data can only be ASCII." - } - } - }, - "UrlMap": { - "id": "UrlMap", - "type": "object", - "description": "A UrlMap resource. This resource defines the mapping from URL to the BackendService resource, based on the \"longest-match\" of the URL's host and path.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "defaultService": { - "type": "string", - "description": "The URL of the BackendService resource if none of the hostRules match." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "fingerprint": { - "type": "string", - "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a UrlMap. An up-to-date fingerprint must be provided in order to update the UrlMap.", - "format": "byte" - }, - "hostRules": { - "type": "array", - "description": "The list of HostRules to use against the URL.", - "items": { - "$ref": "HostRule" - } - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#urlMaps for url maps.", - "default": "compute#urlMap" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "pathMatchers": { - "type": "array", - "description": "The list of named PathMatchers to use against the URL.", - "items": { - "$ref": "PathMatcher" - } - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "tests": { - "type": "array", - "description": "The list of expected URL mappings. Request to update this UrlMap will succeed only if all of the test cases pass.", - "items": { - "$ref": "UrlMapTest" - } - } - } - }, - "UrlMapList": { - "id": "UrlMapList", - "type": "object", - "description": "Contains a list of UrlMap resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of UrlMap resources.", - "items": { - "$ref": "UrlMap" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#urlMapList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "UrlMapReference": { - "id": "UrlMapReference", - "type": "object", - "properties": { - "urlMap": { - "type": "string" - } - } - }, - "UrlMapTest": { - "id": "UrlMapTest", - "type": "object", - "description": "Message for the expected URL mappings.", - "properties": { - "description": { - "type": "string", - "description": "Description of this test case." - }, - "host": { - "type": "string", - "description": "Host portion of the URL." - }, - "path": { - "type": "string", - "description": "Path portion of the URL." - }, - "service": { - "type": "string", - "description": "Expected BackendService resource the given URL should be mapped to." - } - } - }, - "UrlMapValidationResult": { - "id": "UrlMapValidationResult", - "type": "object", - "description": "Message representing the validation result for a UrlMap.", - "properties": { - "loadErrors": { - "type": "array", - "items": { - "type": "string" - } - }, - "loadSucceeded": { - "type": "boolean", - "description": "Whether the given UrlMap can be successfully loaded. If false, 'loadErrors' indicates the reasons." - }, - "testFailures": { - "type": "array", - "items": { - "$ref": "TestFailure" - } - }, - "testPassed": { - "type": "boolean", - "description": "If successfully loaded, this field indicates whether the test passed. If false, 'testFailures's indicate the reason of failure." - } - } - }, - "UrlMapsValidateRequest": { - "id": "UrlMapsValidateRequest", - "type": "object", - "properties": { - "resource": { - "$ref": "UrlMap", - "description": "Content of the UrlMap to be validated." - } - } - }, - "UrlMapsValidateResponse": { - "id": "UrlMapsValidateResponse", - "type": "object", - "properties": { - "result": { - "$ref": "UrlMapValidationResult" - } - } - }, - "UsageExportLocation": { - "id": "UsageExportLocation", - "type": "object", - "description": "The location in Cloud Storage and naming method of the daily usage report. Contains bucket_name and report_name prefix.", - "properties": { - "bucketName": { - "type": "string", - "description": "The name of an existing bucket in Cloud Storage where the usage report object is stored. The Google Service Account is granted write access to this bucket. This can either be the bucket name by itself, such as example-bucket, or the bucket name with gs:// or https://storage.googleapis.com/ in front of it, such as gs://example-bucket." - }, - "reportNamePrefix": { - "type": "string", - "description": "An optional prefix for the name of the usage report object stored in bucketName. If not supplied, defaults to usage. The report is stored as a CSV file named report_name_prefix_gce_YYYYMMDD.csv where YYYYMMDD is the day of the usage according to Pacific Time. If you supply a prefix, it should conform to Cloud Storage object naming conventions." - } - } - }, - "VpnTunnel": { - "id": "VpnTunnel", - "type": "object", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "detailedStatus": { - "type": "string", - "description": "[Output Only] Detailed status message for the VPN tunnel." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "ikeVersion": { - "type": "integer", - "description": "IKE protocol version to use when establishing the VPN tunnel with peer VPN gateway. Acceptable IKE versions are 1 or 2. Default version is 2.", - "format": "int32" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.", - "default": "compute#vpnTunnel" - }, - "labelFingerprint": { - "type": "string", - "description": "A fingerprint for the labels being applied to this VpnTunnel, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve a VpnTunnel.", - "format": "byte" - }, - "labels": { - "type": "object", - "description": "Labels to apply to this VpnTunnel. These can be later modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.", - "additionalProperties": { - "type": "string" - } - }, - "localTrafficSelector": { - "type": "array", - "description": "Local traffic selector to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.", - "items": { - "type": "string" - } - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.vpnTunnels.insert" - ] - } - }, - "peerIp": { - "type": "string", - "description": "IP address of the peer VPN gateway. Only IPv4 is supported." - }, - "region": { - "type": "string", - "description": "[Output Only] URL of the region where the VPN tunnel resides." - }, - "remoteTrafficSelector": { - "type": "array", - "description": "Remote traffic selectors to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.", - "items": { - "type": "string" - } - }, - "router": { - "type": "string", - "description": "URL of router resource to be used for dynamic routing." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "sharedSecret": { - "type": "string", - "description": "Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway." - }, - "sharedSecretHash": { - "type": "string", - "description": "Hash of the shared secret." - }, - "status": { - "type": "string", - "description": "[Output Only] The status of the VPN tunnel.", - "enum": [ - "ALLOCATING_RESOURCES", - "AUTHORIZATION_ERROR", - "DEPROVISIONING", - "ESTABLISHED", - "FAILED", - "FIRST_HANDSHAKE", - "NEGOTIATION_FAILURE", - "NETWORK_ERROR", - "NO_INCOMING_PACKETS", - "PROVISIONING", - "REJECTED", - "WAITING_FOR_FULL_CONFIG" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "targetVpnGateway": { - "type": "string", - "description": "URL of the VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created.", - "annotations": { - "required": [ - "compute.vpnTunnels.insert" - ] - } - } - } - }, - "VpnTunnelAggregatedList": { - "id": "VpnTunnelAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of VpnTunnelsScopedList resources.", - "additionalProperties": { - "$ref": "VpnTunnelsScopedList", - "description": "Name of the scope containing this set of vpn tunnels." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.", - "default": "compute#vpnTunnelAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "VpnTunnelList": { - "id": "VpnTunnelList", - "type": "object", - "description": "Contains a list of VpnTunnel resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of VpnTunnel resources.", - "items": { - "$ref": "VpnTunnel" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.", - "default": "compute#vpnTunnelList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "VpnTunnelsScopedList": { - "id": "VpnTunnelsScopedList", - "type": "object", - "properties": { - "vpnTunnels": { - "type": "array", - "description": "List of vpn tunnels contained in this scope.", - "items": { - "$ref": "VpnTunnel" - } - }, - "warning": { - "type": "object", - "description": "Informational warning which replaces the list of addresses when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "XpnHostList": { - "id": "XpnHostList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "[Output Only] A list of shared VPC host project URLs.", - "items": { - "$ref": "Project" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#xpnHostList for lists of shared VPC hosts.", - "default": "compute#xpnHostList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "XpnResourceId": { - "id": "XpnResourceId", - "type": "object", - "description": "Service resource (a.k.a service project) ID.", - "properties": { - "id": { - "type": "string", - "description": "The ID of the service resource. In the case of projects, this field matches the project ID (e.g., my-project), not the project number (e.g., 12345678)." - }, - "type": { - "type": "string", - "description": "The type of the service resource.", - "enum": [ - "PROJECT", - "XPN_RESOURCE_TYPE_UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "" - ] - } - } - }, - "Zone": { - "id": "Zone", - "type": "object", - "description": "A Zone resource.", - "properties": { - "availableCpuPlatforms": { - "type": "array", - "description": "[Output Only] Available cpu/platform selections for the zone.", - "items": { - "type": "string" - } - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "[Output Only] The deprecation status associated with this zone." - }, - "description": { - "type": "string", - "description": "[Output Only] Textual description of the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#zone for zones.", - "default": "compute#zone" - }, - "name": { - "type": "string", - "description": "[Output Only] Name of the resource." - }, - "region": { - "type": "string", - "description": "[Output Only] Full URL reference to the region which hosts the zone." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "status": { - "type": "string", - "description": "[Output Only] Status of the zone, either UP or DOWN.", - "enum": [ - "DOWN", - "UP" - ], - "enumDescriptions": [ - "", - "" - ] - } - } - }, - "ZoneList": { - "id": "ZoneList", - "type": "object", - "description": "Contains a list of zone resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Zone resources.", - "items": { - "$ref": "Zone" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#zoneList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "ZoneSetLabelsRequest": { - "id": "ZoneSetLabelsRequest", - "type": "object", - "properties": { - "labelFingerprint": { - "type": "string", - "description": "The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels. Make a get() request to the resource to get the latest fingerprint.", - "format": "byte" - }, - "labels": { - "type": "object", - "description": "The labels to set for this resource.", - "additionalProperties": { - "type": "string" - } - } - } - } - }, - "resources": { - "acceleratorTypes": { - "methods": { - "aggregatedList": { - "id": "compute.acceleratorTypes.aggregatedList", - "path": "{project}/aggregated/acceleratorTypes", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of accelerator types.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "AcceleratorTypeAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "get": { - "id": "compute.acceleratorTypes.get", - "path": "{project}/zones/{zone}/acceleratorTypes/{acceleratorType}", - "httpMethod": "GET", - "description": "Returns the specified accelerator type. Get a list of available accelerator types by making a list() request.", - "parameters": { - "acceleratorType": { - "type": "string", - "description": "Name of the accelerator type to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "acceleratorType" - ], - "response": { - "$ref": "AcceleratorType" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.acceleratorTypes.list", - "path": "{project}/zones/{zone}/acceleratorTypes", - "httpMethod": "GET", - "description": "Retrieves a list of accelerator types available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "AcceleratorTypeList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "addresses": { - "methods": { - "aggregatedList": { - "id": "compute.addresses.aggregatedList", - "path": "{project}/aggregated/addresses", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of addresses.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "AddressAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.addresses.delete", - "path": "{project}/regions/{region}/addresses/{address}", - "httpMethod": "DELETE", - "description": "Deletes the specified address resource.", - "parameters": { - "address": { - "type": "string", - "description": "Name of the address resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "address" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.addresses.get", - "path": "{project}/regions/{region}/addresses/{address}", - "httpMethod": "GET", - "description": "Returns the specified address resource.", - "parameters": { - "address": { - "type": "string", - "description": "Name of the address resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "address" - ], - "response": { - "$ref": "Address" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.addresses.insert", - "path": "{project}/regions/{region}/addresses", - "httpMethod": "POST", - "description": "Creates an address resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "Address" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.addresses.list", - "path": "{project}/regions/{region}/addresses", - "httpMethod": "GET", - "description": "Retrieves a list of addresses contained within the specified region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "AddressList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setLabels": { - "id": "compute.addresses.setLabels", - "path": "{project}/regions/{region}/addresses/{resource}/setLabels", - "httpMethod": "POST", - "description": "Sets the labels on an Address. To learn more about labels, read the Labeling Resources documentation.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "RegionSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.addresses.testIamPermissions", - "path": "{project}/regions/{region}/addresses/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "autoscalers": { - "methods": { - "aggregatedList": { - "id": "compute.autoscalers.aggregatedList", - "path": "{project}/aggregated/autoscalers", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of autoscalers.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "AutoscalerAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.autoscalers.delete", - "path": "{project}/zones/{zone}/autoscalers/{autoscaler}", - "httpMethod": "DELETE", - "description": "Deletes the specified autoscaler.", - "parameters": { - "autoscaler": { - "type": "string", - "description": "Name of the autoscaler to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "Name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "autoscaler" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.autoscalers.get", - "path": "{project}/zones/{zone}/autoscalers/{autoscaler}", - "httpMethod": "GET", - "description": "Returns the specified autoscaler resource. Get a list of available autoscalers by making a list() request.", - "parameters": { - "autoscaler": { - "type": "string", - "description": "Name of the autoscaler to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "autoscaler" - ], - "response": { - "$ref": "Autoscaler" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.autoscalers.insert", - "path": "{project}/zones/{zone}/autoscalers", - "httpMethod": "POST", - "description": "Creates an autoscaler in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "Name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "request": { - "$ref": "Autoscaler" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.autoscalers.list", - "path": "{project}/zones/{zone}/autoscalers", - "httpMethod": "GET", - "description": "Retrieves a list of autoscalers contained within the specified zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "AutoscalerList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.autoscalers.patch", - "path": "{project}/zones/{zone}/autoscalers", - "httpMethod": "PATCH", - "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "autoscaler": { - "type": "string", - "description": "Name of the autoscaler to patch.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "Name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "request": { - "$ref": "Autoscaler" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.autoscalers.testIamPermissions", - "path": "{project}/zones/{zone}/autoscalers/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.autoscalers.update", - "path": "{project}/zones/{zone}/autoscalers", - "httpMethod": "PUT", - "description": "Updates an autoscaler in the specified project using the data included in the request.", - "parameters": { - "autoscaler": { - "type": "string", - "description": "Name of the autoscaler to update.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "Name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "request": { - "$ref": "Autoscaler" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "backendBuckets": { - "methods": { - "addSignedUrlKey": { - "id": "compute.backendBuckets.addSignedUrlKey", - "path": "{project}/global/backendBuckets/{backendBucket}/addSignedUrlKey", - "httpMethod": "POST", - "description": "Adds the given Signed URL Key to the backend bucket.", - "parameters": { - "backendBucket": { - "type": "string", - "description": "Name of the BackendBucket resource to which the Signed URL Key should be added. The name should conform to RFC1035.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "backendBucket" - ], - "request": { - "$ref": "SignedUrlKey" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "id": "compute.backendBuckets.delete", - "path": "{project}/global/backendBuckets/{backendBucket}", - "httpMethod": "DELETE", - "description": "Deletes the specified BackendBucket resource.", - "parameters": { - "backendBucket": { - "type": "string", - "description": "Name of the BackendBucket resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "backendBucket" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deleteSignedUrlKey": { - "id": "compute.backendBuckets.deleteSignedUrlKey", - "path": "{project}/global/backendBuckets/{backendBucket}/deleteSignedUrlKey", - "httpMethod": "POST", - "description": "Deletes the given Signed URL Key from the backend bucket.", - "parameters": { - "backendBucket": { - "type": "string", - "description": "Name of the BackendBucket resource to which the Signed URL Key should be added. The name should conform to RFC1035.", - "required": true, - "location": "path" - }, - "keyName": { - "type": "string", - "description": "The name of the Signed URL Key to delete.", - "required": true, - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "backendBucket", - "keyName" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.backendBuckets.get", - "path": "{project}/global/backendBuckets/{backendBucket}", - "httpMethod": "GET", - "description": "Returns the specified BackendBucket resource. Get a list of available backend buckets by making a list() request.", - "parameters": { - "backendBucket": { - "type": "string", - "description": "Name of the BackendBucket resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "backendBucket" - ], - "response": { - "$ref": "BackendBucket" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "id": "compute.backendBuckets.getIamPolicy", - "path": "{project}/global/backendBuckets/{resource}/getIamPolicy", - "httpMethod": "GET", - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.backendBuckets.insert", - "path": "{project}/global/backendBuckets", - "httpMethod": "POST", - "description": "Creates a BackendBucket resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "BackendBucket" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.backendBuckets.list", - "path": "{project}/global/backendBuckets", - "httpMethod": "GET", - "description": "Retrieves the list of BackendBucket resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "BackendBucketList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.backendBuckets.patch", - "path": "{project}/global/backendBuckets/{backendBucket}", - "httpMethod": "PATCH", - "description": "Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "backendBucket": { - "type": "string", - "description": "Name of the BackendBucket resource to patch.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "backendBucket" - ], - "request": { - "$ref": "BackendBucket" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setIamPolicy": { - "id": "compute.backendBuckets.setIamPolicy", - "path": "{project}/global/backendBuckets/{resource}/setIamPolicy", - "httpMethod": "POST", - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "Policy" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.backendBuckets.testIamPermissions", - "path": "{project}/global/backendBuckets/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.backendBuckets.update", - "path": "{project}/global/backendBuckets/{backendBucket}", - "httpMethod": "PUT", - "description": "Updates the specified BackendBucket resource with the data included in the request.", - "parameters": { - "backendBucket": { - "type": "string", - "description": "Name of the BackendBucket resource to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "backendBucket" - ], - "request": { - "$ref": "BackendBucket" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "backendServices": { - "methods": { - "addSignedUrlKey": { - "id": "compute.backendServices.addSignedUrlKey", - "path": "{project}/global/backendServices/{backendService}/addSignedUrlKey", - "httpMethod": "POST", - "description": "Adds the given Signed URL Key to the specified backend service.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to which the Signed URL Key should be added. The name should conform to RFC1035.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "backendService" - ], - "request": { - "$ref": "SignedUrlKey" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "id": "compute.backendServices.aggregatedList", - "path": "{project}/aggregated/backendServices", - "httpMethod": "GET", - "description": "Retrieves the list of all BackendService resources, regional and global, available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Name of the project scoping this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "BackendServiceAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.backendServices.delete", - "path": "{project}/global/backendServices/{backendService}", - "httpMethod": "DELETE", - "description": "Deletes the specified BackendService resource.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "backendService" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deleteSignedUrlKey": { - "id": "compute.backendServices.deleteSignedUrlKey", - "path": "{project}/global/backendServices/{backendService}/deleteSignedUrlKey", - "httpMethod": "POST", - "description": "Deletes the given Signed URL Key from the specified backend service.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to which the Signed URL Key should be added. The name should conform to RFC1035.", - "required": true, - "location": "path" - }, - "keyName": { - "type": "string", - "description": "The name of the Signed URL Key to delete.", - "required": true, - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "backendService", - "keyName" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.backendServices.get", - "path": "{project}/global/backendServices/{backendService}", - "httpMethod": "GET", - "description": "Returns the specified BackendService resource. Get a list of available backend services by making a list() request.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "backendService" - ], - "response": { - "$ref": "BackendService" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getHealth": { - "id": "compute.backendServices.getHealth", - "path": "{project}/global/backendServices/{backendService}/getHealth", - "httpMethod": "POST", - "description": "Gets the most recent health check results for this BackendService.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to which the queried instance belongs.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "backendService" - ], - "request": { - "$ref": "ResourceGroupReference" - }, - "response": { - "$ref": "BackendServiceGroupHealth" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.backendServices.insert", - "path": "{project}/global/backendServices", - "httpMethod": "POST", - "description": "Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Restrictions and Guidelines for more information.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "BackendService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.backendServices.list", - "path": "{project}/global/backendServices", - "httpMethod": "GET", - "description": "Retrieves the list of BackendService resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "BackendServiceList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.backendServices.patch", - "path": "{project}/global/backendServices/{backendService}", - "httpMethod": "PATCH", - "description": "Patches the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to patch.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "backendService" - ], - "request": { - "$ref": "BackendService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setSecurityPolicy": { - "id": "compute.backendServices.setSecurityPolicy", - "path": "{project}/global/backendServices/{backendService}/setSecurityPolicy", - "httpMethod": "POST", - "description": "Sets the security policy for the specified backend service.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to which the security policy should be set. The name should conform to RFC1035.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "backendService" - ], - "request": { - "$ref": "SecurityPolicyReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.backendServices.testIamPermissions", - "path": "{project}/global/backendServices/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.backendServices.update", - "path": "{project}/global/backendServices/{backendService}", - "httpMethod": "PUT", - "description": "Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "backendService" - ], - "request": { - "$ref": "BackendService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "clientSslPolicies": { - "methods": { - "testIamPermissions": { - "id": "compute.clientSslPolicies.testIamPermissions", - "path": "{project}/global/clientSslPolicies/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "diskTypes": { - "methods": { - "aggregatedList": { - "id": "compute.diskTypes.aggregatedList", - "path": "{project}/aggregated/diskTypes", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of disk types.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "DiskTypeAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "get": { - "id": "compute.diskTypes.get", - "path": "{project}/zones/{zone}/diskTypes/{diskType}", - "httpMethod": "GET", - "description": "Returns the specified disk type. Get a list of available disk types by making a list() request.", - "parameters": { - "diskType": { - "type": "string", - "description": "Name of the disk type to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "diskType" - ], - "response": { - "$ref": "DiskType" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.diskTypes.list", - "path": "{project}/zones/{zone}/diskTypes", - "httpMethod": "GET", - "description": "Retrieves a list of disk types available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "DiskTypeList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "disks": { - "methods": { - "aggregatedList": { - "id": "compute.disks.aggregatedList", - "path": "{project}/aggregated/disks", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of persistent disks.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "DiskAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "createSnapshot": { - "id": "compute.disks.createSnapshot", - "path": "{project}/zones/{zone}/disks/{disk}/createSnapshot", - "httpMethod": "POST", - "description": "Creates a snapshot of a specified persistent disk.", - "parameters": { - "disk": { - "type": "string", - "description": "Name of the persistent disk to snapshot.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "guestFlush": { - "type": "boolean", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "request": { - "$ref": "Snapshot" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "id": "compute.disks.delete", - "path": "{project}/zones/{zone}/disks/{disk}", - "httpMethod": "DELETE", - "description": "Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.", - "parameters": { - "disk": { - "type": "string", - "description": "Name of the persistent disk to delete.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.disks.get", - "path": "{project}/zones/{zone}/disks/{disk}", - "httpMethod": "GET", - "description": "Returns a specified persistent disk. Get a list of available persistent disks by making a list() request.", - "parameters": { - "disk": { - "type": "string", - "description": "Name of the persistent disk to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "response": { - "$ref": "Disk" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "id": "compute.disks.getIamPolicy", - "path": "{project}/zones/{zone}/disks/{resource}/getIamPolicy", - "httpMethod": "GET", - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.disks.insert", - "path": "{project}/zones/{zone}/disks", - "httpMethod": "POST", - "description": "Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "sourceImage": { - "type": "string", - "description": "Optional. Source image to restore onto a disk.", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "request": { - "$ref": "Disk" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.disks.list", - "path": "{project}/zones/{zone}/disks", - "httpMethod": "GET", - "description": "Retrieves a list of persistent disks contained within the specified zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "DiskList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "resize": { - "id": "compute.disks.resize", - "path": "{project}/zones/{zone}/disks/{disk}/resize", - "httpMethod": "POST", - "description": "Resizes the specified persistent disk.", - "parameters": { - "disk": { - "type": "string", - "description": "The name of the persistent disk.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "request": { - "$ref": "DisksResizeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "id": "compute.disks.setIamPolicy", - "path": "{project}/zones/{zone}/disks/{resource}/setIamPolicy", - "httpMethod": "POST", - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "request": { - "$ref": "Policy" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "id": "compute.disks.setLabels", - "path": "{project}/zones/{zone}/disks/{resource}/setLabels", - "httpMethod": "POST", - "description": "Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "request": { - "$ref": "ZoneSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.disks.testIamPermissions", - "path": "{project}/zones/{zone}/disks/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "firewalls": { - "methods": { - "delete": { - "id": "compute.firewalls.delete", - "path": "{project}/global/firewalls/{firewall}", - "httpMethod": "DELETE", - "description": "Deletes the specified firewall.", - "parameters": { - "firewall": { - "type": "string", - "description": "Name of the firewall rule to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "firewall" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.firewalls.get", - "path": "{project}/global/firewalls/{firewall}", - "httpMethod": "GET", - "description": "Returns the specified firewall.", - "parameters": { - "firewall": { - "type": "string", - "description": "Name of the firewall rule to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "firewall" - ], - "response": { - "$ref": "Firewall" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.firewalls.insert", - "path": "{project}/global/firewalls", - "httpMethod": "POST", - "description": "Creates a firewall rule in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "Firewall" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.firewalls.list", - "path": "{project}/global/firewalls", - "httpMethod": "GET", - "description": "Retrieves the list of firewall rules available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "FirewallList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.firewalls.patch", - "path": "{project}/global/firewalls/{firewall}", - "httpMethod": "PATCH", - "description": "Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "firewall": { - "type": "string", - "description": "Name of the firewall rule to patch.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "firewall" - ], - "request": { - "$ref": "Firewall" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.firewalls.testIamPermissions", - "path": "{project}/global/firewalls/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.firewalls.update", - "path": "{project}/global/firewalls/{firewall}", - "httpMethod": "PUT", - "description": "Updates the specified firewall rule with the data included in the request. Using PUT method, can only update following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags.", - "parameters": { - "firewall": { - "type": "string", - "description": "Name of the firewall rule to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "firewall" - ], - "request": { - "$ref": "Firewall" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "forwardingRules": { - "methods": { - "aggregatedList": { - "id": "compute.forwardingRules.aggregatedList", - "path": "{project}/aggregated/forwardingRules", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of forwarding rules.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "ForwardingRuleAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.forwardingRules.delete", - "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}", - "httpMethod": "DELETE", - "description": "Deletes the specified ForwardingRule resource.", - "parameters": { - "forwardingRule": { - "type": "string", - "description": "Name of the ForwardingRule resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "forwardingRule" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.forwardingRules.get", - "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}", - "httpMethod": "GET", - "description": "Returns the specified ForwardingRule resource.", - "parameters": { - "forwardingRule": { - "type": "string", - "description": "Name of the ForwardingRule resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "forwardingRule" - ], - "response": { - "$ref": "ForwardingRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.forwardingRules.insert", - "path": "{project}/regions/{region}/forwardingRules", - "httpMethod": "POST", - "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "ForwardingRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.forwardingRules.list", - "path": "{project}/regions/{region}/forwardingRules", - "httpMethod": "GET", - "description": "Retrieves a list of ForwardingRule resources available to the specified project and region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "ForwardingRuleList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.forwardingRules.patch", - "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}", - "httpMethod": "PATCH", - "description": "Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.", - "parameters": { - "forwardingRule": { - "type": "string", - "description": "Name of the ForwardingRule resource to patch.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "forwardingRule" - ], - "request": { - "$ref": "ForwardingRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setLabels": { - "id": "compute.forwardingRules.setLabels", - "path": "{project}/regions/{region}/forwardingRules/{resource}/setLabels", - "httpMethod": "POST", - "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "RegionSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setTarget": { - "id": "compute.forwardingRules.setTarget", - "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget", - "httpMethod": "POST", - "description": "Changes target URL for forwarding rule. The new target should be of the same type as the old target.", - "parameters": { - "forwardingRule": { - "type": "string", - "description": "Name of the ForwardingRule resource in which target is to be set.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "forwardingRule" - ], - "request": { - "$ref": "TargetReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.forwardingRules.testIamPermissions", - "path": "{project}/regions/{region}/forwardingRules/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "globalAddresses": { - "methods": { - "delete": { - "id": "compute.globalAddresses.delete", - "path": "{project}/global/addresses/{address}", - "httpMethod": "DELETE", - "description": "Deletes the specified address resource.", - "parameters": { - "address": { - "type": "string", - "description": "Name of the address resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "address" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.globalAddresses.get", - "path": "{project}/global/addresses/{address}", - "httpMethod": "GET", - "description": "Returns the specified address resource. Get a list of available addresses by making a list() request.", - "parameters": { - "address": { - "type": "string", - "description": "Name of the address resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "address" - ], - "response": { - "$ref": "Address" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.globalAddresses.insert", - "path": "{project}/global/addresses", - "httpMethod": "POST", - "description": "Creates an address resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "Address" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.globalAddresses.list", - "path": "{project}/global/addresses", - "httpMethod": "GET", - "description": "Retrieves a list of global addresses.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "AddressList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setLabels": { - "id": "compute.globalAddresses.setLabels", - "path": "{project}/global/addresses/{resource}/setLabels", - "httpMethod": "POST", - "description": "Sets the labels on a GlobalAddress. To learn more about labels, read the Labeling Resources documentation.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "GlobalSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.globalAddresses.testIamPermissions", - "path": "{project}/global/addresses/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "globalForwardingRules": { - "methods": { - "delete": { - "id": "compute.globalForwardingRules.delete", - "path": "{project}/global/forwardingRules/{forwardingRule}", - "httpMethod": "DELETE", - "description": "Deletes the specified GlobalForwardingRule resource.", - "parameters": { - "forwardingRule": { - "type": "string", - "description": "Name of the ForwardingRule resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "forwardingRule" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.globalForwardingRules.get", - "path": "{project}/global/forwardingRules/{forwardingRule}", - "httpMethod": "GET", - "description": "Returns the specified GlobalForwardingRule resource. Get a list of available forwarding rules by making a list() request.", - "parameters": { - "forwardingRule": { - "type": "string", - "description": "Name of the ForwardingRule resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "forwardingRule" - ], - "response": { - "$ref": "ForwardingRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.globalForwardingRules.insert", - "path": "{project}/global/forwardingRules", - "httpMethod": "POST", - "description": "Creates a GlobalForwardingRule resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "ForwardingRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.globalForwardingRules.list", - "path": "{project}/global/forwardingRules", - "httpMethod": "GET", - "description": "Retrieves a list of GlobalForwardingRule resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "ForwardingRuleList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.globalForwardingRules.patch", - "path": "{project}/global/forwardingRules/{forwardingRule}", - "httpMethod": "PATCH", - "description": "Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.", - "parameters": { - "forwardingRule": { - "type": "string", - "description": "Name of the ForwardingRule resource to patch.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "forwardingRule" - ], - "request": { - "$ref": "ForwardingRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setLabels": { - "id": "compute.globalForwardingRules.setLabels", - "path": "{project}/global/forwardingRules/{resource}/setLabels", - "httpMethod": "POST", - "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "GlobalSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setTarget": { - "id": "compute.globalForwardingRules.setTarget", - "path": "{project}/global/forwardingRules/{forwardingRule}/setTarget", - "httpMethod": "POST", - "description": "Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target.", - "parameters": { - "forwardingRule": { - "type": "string", - "description": "Name of the ForwardingRule resource in which target is to be set.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "forwardingRule" - ], - "request": { - "$ref": "TargetReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.globalForwardingRules.testIamPermissions", - "path": "{project}/global/forwardingRules/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "globalOperations": { - "methods": { - "aggregatedList": { - "id": "compute.globalOperations.aggregatedList", - "path": "{project}/aggregated/operations", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of all operations.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "OperationAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.globalOperations.delete", - "path": "{project}/global/operations/{operation}", - "httpMethod": "DELETE", - "description": "Deletes the specified Operations resource.", - "parameters": { - "operation": { - "type": "string", - "description": "Name of the Operations resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "operation" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.globalOperations.get", - "path": "{project}/global/operations/{operation}", - "httpMethod": "GET", - "description": "Retrieves the specified Operations resource. Get a list of operations by making a list() request.", - "parameters": { - "operation": { - "type": "string", - "description": "Name of the Operations resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "operation" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.globalOperations.list", - "path": "{project}/global/operations", - "httpMethod": "GET", - "description": "Retrieves a list of Operation resources contained within the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "OperationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "healthChecks": { - "methods": { - "delete": { - "id": "compute.healthChecks.delete", - "path": "{project}/global/healthChecks/{healthCheck}", - "httpMethod": "DELETE", - "description": "Deletes the specified HealthCheck resource.", - "parameters": { - "healthCheck": { - "type": "string", - "description": "Name of the HealthCheck resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "healthCheck" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.healthChecks.get", - "path": "{project}/global/healthChecks/{healthCheck}", - "httpMethod": "GET", - "description": "Returns the specified HealthCheck resource. Get a list of available health checks by making a list() request.", - "parameters": { - "healthCheck": { - "type": "string", - "description": "Name of the HealthCheck resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "healthCheck" - ], - "response": { - "$ref": "HealthCheck" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.healthChecks.insert", - "path": "{project}/global/healthChecks", - "httpMethod": "POST", - "description": "Creates a HealthCheck resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "HealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.healthChecks.list", - "path": "{project}/global/healthChecks", - "httpMethod": "GET", - "description": "Retrieves the list of HealthCheck resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "HealthCheckList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.healthChecks.patch", - "path": "{project}/global/healthChecks/{healthCheck}", - "httpMethod": "PATCH", - "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "healthCheck": { - "type": "string", - "description": "Name of the HealthCheck resource to patch.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "healthCheck" - ], - "request": { - "$ref": "HealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.healthChecks.testIamPermissions", - "path": "{project}/global/healthChecks/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.healthChecks.update", - "path": "{project}/global/healthChecks/{healthCheck}", - "httpMethod": "PUT", - "description": "Updates a HealthCheck resource in the specified project using the data included in the request.", - "parameters": { - "healthCheck": { - "type": "string", - "description": "Name of the HealthCheck resource to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "healthCheck" - ], - "request": { - "$ref": "HealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "hostTypes": { - "methods": { - "aggregatedList": { - "id": "compute.hostTypes.aggregatedList", - "path": "{project}/aggregated/hostTypes", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of host types.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "HostTypeAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "get": { - "id": "compute.hostTypes.get", - "path": "{project}/zones/{zone}/hostTypes/{hostType}", - "httpMethod": "GET", - "description": "Returns the specified host type. Get a list of available host types by making a list() request.", - "parameters": { - "hostType": { - "type": "string", - "description": "Name of the host type to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "hostType" - ], - "response": { - "$ref": "HostType" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.hostTypes.list", - "path": "{project}/zones/{zone}/hostTypes", - "httpMethod": "GET", - "description": "Retrieves a list of host types available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "HostTypeList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "hosts": { - "methods": { - "aggregatedList": { - "id": "compute.hosts.aggregatedList", - "path": "{project}/aggregated/hosts", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of hosts.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "HostAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.hosts.delete", - "path": "{project}/zones/{zone}/hosts/{host}", - "httpMethod": "DELETE", - "description": "Deletes the specified Host resource.", - "parameters": { - "host": { - "type": "string", - "description": "Name of the Host resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "host" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.hosts.get", - "path": "{project}/zones/{zone}/hosts/{host}", - "httpMethod": "GET", - "description": "Returns the specified host. Get a list of available hosts by making a list() request.", - "parameters": { - "host": { - "type": "string", - "description": "Name of the host to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "host" - ], - "response": { - "$ref": "Host" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "id": "compute.hosts.getIamPolicy", - "path": "{project}/zones/{zone}/hosts/{resource}/getIamPolicy", - "httpMethod": "GET", - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.hosts.insert", - "path": "{project}/zones/{zone}/hosts", - "httpMethod": "POST", - "description": "Creates a host resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "request": { - "$ref": "Host" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.hosts.list", - "path": "{project}/zones/{zone}/hosts", - "httpMethod": "GET", - "description": "Retrieves a list of hosts available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "HostList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setIamPolicy": { - "id": "compute.hosts.setIamPolicy", - "path": "{project}/zones/{zone}/hosts/{resource}/setIamPolicy", - "httpMethod": "POST", - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "request": { - "$ref": "Policy" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.hosts.testIamPermissions", - "path": "{project}/zones/{zone}/hosts/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "httpHealthChecks": { - "methods": { - "delete": { - "id": "compute.httpHealthChecks.delete", - "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", - "httpMethod": "DELETE", - "description": "Deletes the specified HttpHealthCheck resource.", - "parameters": { - "httpHealthCheck": { - "type": "string", - "description": "Name of the HttpHealthCheck resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "httpHealthCheck" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.httpHealthChecks.get", - "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", - "httpMethod": "GET", - "description": "Returns the specified HttpHealthCheck resource. Get a list of available HTTP health checks by making a list() request.", - "parameters": { - "httpHealthCheck": { - "type": "string", - "description": "Name of the HttpHealthCheck resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "httpHealthCheck" - ], - "response": { - "$ref": "HttpHealthCheck" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.httpHealthChecks.insert", - "path": "{project}/global/httpHealthChecks", - "httpMethod": "POST", - "description": "Creates a HttpHealthCheck resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "HttpHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.httpHealthChecks.list", - "path": "{project}/global/httpHealthChecks", - "httpMethod": "GET", - "description": "Retrieves the list of HttpHealthCheck resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "HttpHealthCheckList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.httpHealthChecks.patch", - "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", - "httpMethod": "PATCH", - "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "httpHealthCheck": { - "type": "string", - "description": "Name of the HttpHealthCheck resource to patch.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "httpHealthCheck" - ], - "request": { - "$ref": "HttpHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.httpHealthChecks.testIamPermissions", - "path": "{project}/global/httpHealthChecks/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.httpHealthChecks.update", - "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", - "httpMethod": "PUT", - "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request.", - "parameters": { - "httpHealthCheck": { - "type": "string", - "description": "Name of the HttpHealthCheck resource to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "httpHealthCheck" - ], - "request": { - "$ref": "HttpHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "httpsHealthChecks": { - "methods": { - "delete": { - "id": "compute.httpsHealthChecks.delete", - "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}", - "httpMethod": "DELETE", - "description": "Deletes the specified HttpsHealthCheck resource.", - "parameters": { - "httpsHealthCheck": { - "type": "string", - "description": "Name of the HttpsHealthCheck resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "httpsHealthCheck" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.httpsHealthChecks.get", - "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}", - "httpMethod": "GET", - "description": "Returns the specified HttpsHealthCheck resource. Get a list of available HTTPS health checks by making a list() request.", - "parameters": { - "httpsHealthCheck": { - "type": "string", - "description": "Name of the HttpsHealthCheck resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "httpsHealthCheck" - ], - "response": { - "$ref": "HttpsHealthCheck" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.httpsHealthChecks.insert", - "path": "{project}/global/httpsHealthChecks", - "httpMethod": "POST", - "description": "Creates a HttpsHealthCheck resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "HttpsHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.httpsHealthChecks.list", - "path": "{project}/global/httpsHealthChecks", - "httpMethod": "GET", - "description": "Retrieves the list of HttpsHealthCheck resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "HttpsHealthCheckList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.httpsHealthChecks.patch", - "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}", - "httpMethod": "PATCH", - "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "httpsHealthCheck": { - "type": "string", - "description": "Name of the HttpsHealthCheck resource to patch.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "httpsHealthCheck" - ], - "request": { - "$ref": "HttpsHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.httpsHealthChecks.testIamPermissions", - "path": "{project}/global/httpsHealthChecks/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.httpsHealthChecks.update", - "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}", - "httpMethod": "PUT", - "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request.", - "parameters": { - "httpsHealthCheck": { - "type": "string", - "description": "Name of the HttpsHealthCheck resource to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "httpsHealthCheck" - ], - "request": { - "$ref": "HttpsHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "images": { - "methods": { - "delete": { - "id": "compute.images.delete", - "path": "{project}/global/images/{image}", - "httpMethod": "DELETE", - "description": "Deletes the specified image.", - "parameters": { - "image": { - "type": "string", - "description": "Name of the image resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "image" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deprecate": { - "id": "compute.images.deprecate", - "path": "{project}/global/images/{image}/deprecate", - "httpMethod": "POST", - "description": "Sets the deprecation status of an image.\n\nIf an empty request body is given, clears the deprecation status instead.", - "parameters": { - "image": { - "type": "string", - "description": "Image name.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and then the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "image" - ], - "request": { - "$ref": "DeprecationStatus" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.images.get", - "path": "{project}/global/images/{image}", - "httpMethod": "GET", - "description": "Returns the specified image. Get a list of available images by making a list() request.", - "parameters": { - "image": { - "type": "string", - "description": "Name of the image resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "image" - ], - "response": { - "$ref": "Image" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getFromFamily": { - "id": "compute.images.getFromFamily", - "path": "{project}/global/images/family/{family}", - "httpMethod": "GET", - "description": "Returns the latest image that is part of an image family and is not deprecated.", - "parameters": { - "family": { - "type": "string", - "description": "Name of the image family to search for.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "family" - ], - "response": { - "$ref": "Image" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "id": "compute.images.getIamPolicy", - "path": "{project}/global/images/{resource}/getIamPolicy", - "httpMethod": "GET", - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.images.insert", - "path": "{project}/global/images", - "httpMethod": "POST", - "description": "Creates an image in the specified project using the data included in the request.", - "parameters": { - "forceCreate": { - "type": "boolean", - "description": "Force image creation if true.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "Image" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_only", - "https://www.googleapis.com/auth/devstorage.read_write" - ] - }, - "list": { - "id": "compute.images.list", - "path": "{project}/global/images", - "httpMethod": "GET", - "description": "Retrieves the list of private images available to the specified project. Private images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "ImageList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setIamPolicy": { - "id": "compute.images.setIamPolicy", - "path": "{project}/global/images/{resource}/setIamPolicy", - "httpMethod": "POST", - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "Policy" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "id": "compute.images.setLabels", - "path": "{project}/global/images/{resource}/setLabels", - "httpMethod": "POST", - "description": "Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "GlobalSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.images.testIamPermissions", - "path": "{project}/global/images/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "instanceGroupManagers": { - "methods": { - "abandonInstances": { - "id": "compute.instanceGroupManagers.abandonInstances", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", - "httpMethod": "POST", - "description": "Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "request": { - "$ref": "InstanceGroupManagersAbandonInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "id": "compute.instanceGroupManagers.aggregatedList", - "path": "{project}/aggregated/instanceGroupManagers", - "httpMethod": "GET", - "description": "Retrieves the list of managed instance groups and groups them by zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "InstanceGroupManagerAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "applyUpdatesToInstances": { - "id": "compute.instanceGroupManagers.applyUpdatesToInstances", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances", - "httpMethod": "POST", - "description": "Apply changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group, should conform to RFC1035.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located. Should conform to RFC1035.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "request": { - "$ref": "InstanceGroupManagersApplyUpdatesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "id": "compute.instanceGroupManagers.delete", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "DELETE", - "description": "Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group to delete.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deleteInstances": { - "id": "compute.instanceGroupManagers.deleteInstances", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", - "httpMethod": "POST", - "description": "Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "request": { - "$ref": "InstanceGroupManagersDeleteInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deletePerInstanceConfigs": { - "id": "compute.instanceGroupManagers.deletePerInstanceConfigs", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deletePerInstanceConfigs", - "httpMethod": "POST", - "description": "Delete selected per-instance configs for the managed instance group.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group. It should conform to RFC1035.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located. It should conform to RFC1035.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "request": { - "$ref": "InstanceGroupManagersDeletePerInstanceConfigsReq" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.instanceGroupManagers.get", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "GET", - "description": "Returns all of the details about the specified managed instance group. Get a list of available managed instance groups by making a list() request.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "response": { - "$ref": "InstanceGroupManager" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.instanceGroupManagers.insert", - "path": "{project}/zones/{zone}/instanceGroupManagers", - "httpMethod": "POST", - "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where you want to create the managed instance group.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "request": { - "$ref": "InstanceGroupManager" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.instanceGroupManagers.list", - "path": "{project}/zones/{zone}/instanceGroupManagers", - "httpMethod": "GET", - "description": "Retrieves a list of managed instance groups that are contained within the specified project and zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "InstanceGroupManagerList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listManagedInstances": { - "id": "compute.instanceGroupManagers.listManagedInstances", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", - "httpMethod": "POST", - "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action.", - "parameters": { - "filter": { - "type": "string", - "location": "query" - }, - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "maxResults": { - "type": "integer", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "order_by": { - "type": "string", - "location": "query" - }, - "pageToken": { - "type": "string", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "response": { - "$ref": "InstanceGroupManagersListManagedInstancesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listPerInstanceConfigs": { - "id": "compute.instanceGroupManagers.listPerInstanceConfigs", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs", - "httpMethod": "POST", - "description": "Lists all of the per-instance configs defined for the managed instance group.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group. It should conform to RFC1035.", - "required": true, - "location": "path" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located. It should conform to RFC1035.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "response": { - "$ref": "InstanceGroupManagersListPerInstanceConfigsResp" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.instanceGroupManagers.patch", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "PATCH", - "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the instance group manager.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where you want to create the managed instance group.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "request": { - "$ref": "InstanceGroupManager" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "recreateInstances": { - "id": "compute.instanceGroupManagers.recreateInstances", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", - "httpMethod": "POST", - "description": "Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "request": { - "$ref": "InstanceGroupManagersRecreateInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "resize": { - "id": "compute.instanceGroupManagers.resize", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize", - "httpMethod": "POST", - "description": "Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "size": { - "type": "integer", - "description": "The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter.", - "required": true, - "format": "int32", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager", - "size" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "resizeAdvanced": { - "id": "compute.instanceGroupManagers.resizeAdvanced", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced", - "httpMethod": "POST", - "description": "Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method.\n\nIf you increase the size of the instance group, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating, creatingWithoutRetries, or deleting actions with the get or listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "request": { - "$ref": "InstanceGroupManagersResizeAdvancedRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setAutoHealingPolicies": { - "id": "compute.instanceGroupManagers.setAutoHealingPolicies", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies", - "httpMethod": "POST", - "description": "Modifies the autohealing policies.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the instance group manager.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "request": { - "$ref": "InstanceGroupManagersSetAutoHealingRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setInstanceTemplate": { - "id": "compute.instanceGroupManagers.setInstanceTemplate", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", - "httpMethod": "POST", - "description": "Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "request": { - "$ref": "InstanceGroupManagersSetInstanceTemplateRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setTargetPools": { - "id": "compute.instanceGroupManagers.setTargetPools", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", - "httpMethod": "POST", - "description": "Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "request": { - "$ref": "InstanceGroupManagersSetTargetPoolsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.instanceGroupManagers.testIamPermissions", - "path": "{project}/zones/{zone}/instanceGroupManagers/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.instanceGroupManagers.update", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "PUT", - "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listManagedInstances method.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the instance group manager.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where you want to create the managed instance group.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "request": { - "$ref": "InstanceGroupManager" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "updatePerInstanceConfigs": { - "id": "compute.instanceGroupManagers.updatePerInstanceConfigs", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs", - "httpMethod": "POST", - "description": "Insert or patch (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group. It should conform to RFC1035.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located. It should conform to RFC1035.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "request": { - "$ref": "InstanceGroupManagersUpdatePerInstanceConfigsReq" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "instanceGroups": { - "methods": { - "addInstances": { - "id": "compute.instanceGroups.addInstances", - "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances", - "httpMethod": "POST", - "description": "Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.", - "parameters": { - "instanceGroup": { - "type": "string", - "description": "The name of the instance group where you are adding instances.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroup" - ], - "request": { - "$ref": "InstanceGroupsAddInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "id": "compute.instanceGroups.aggregatedList", - "path": "{project}/aggregated/instanceGroups", - "httpMethod": "GET", - "description": "Retrieves the list of instance groups and sorts them by zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "InstanceGroupAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.instanceGroups.delete", - "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}", - "httpMethod": "DELETE", - "description": "Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.", - "parameters": { - "instanceGroup": { - "type": "string", - "description": "The name of the instance group to delete.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroup" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.instanceGroups.get", - "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}", - "httpMethod": "GET", - "description": "Returns the specified instance group. Get a list of available instance groups by making a list() request.", - "parameters": { - "instanceGroup": { - "type": "string", - "description": "The name of the instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroup" - ], - "response": { - "$ref": "InstanceGroup" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.instanceGroups.insert", - "path": "{project}/zones/{zone}/instanceGroups", - "httpMethod": "POST", - "description": "Creates an instance group in the specified project using the parameters that are included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where you want to create the instance group.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "request": { - "$ref": "InstanceGroup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.instanceGroups.list", - "path": "{project}/zones/{zone}/instanceGroups", - "httpMethod": "GET", - "description": "Retrieves the list of instance groups that are located in the specified project and zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "InstanceGroupList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listInstances": { - "id": "compute.instanceGroups.listInstances", - "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances", - "httpMethod": "POST", - "description": "Lists the instances in the specified instance group.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "instanceGroup": { - "type": "string", - "description": "The name of the instance group from which you want to generate a list of included instances.", - "required": true, - "location": "path" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroup" - ], - "request": { - "$ref": "InstanceGroupsListInstancesRequest" - }, - "response": { - "$ref": "InstanceGroupsListInstances" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "removeInstances": { - "id": "compute.instanceGroups.removeInstances", - "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances", - "httpMethod": "POST", - "description": "Removes one or more instances from the specified instance group, but does not delete those instances.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted.", - "parameters": { - "instanceGroup": { - "type": "string", - "description": "The name of the instance group where the specified instances will be removed.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroup" - ], - "request": { - "$ref": "InstanceGroupsRemoveInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setNamedPorts": { - "id": "compute.instanceGroups.setNamedPorts", - "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts", - "httpMethod": "POST", - "description": "Sets the named ports for the specified instance group.", - "parameters": { - "instanceGroup": { - "type": "string", - "description": "The name of the instance group where the named ports are updated.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroup" - ], - "request": { - "$ref": "InstanceGroupsSetNamedPortsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.instanceGroups.testIamPermissions", - "path": "{project}/zones/{zone}/instanceGroups/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "instanceTemplates": { - "methods": { - "delete": { - "id": "compute.instanceTemplates.delete", - "path": "{project}/global/instanceTemplates/{instanceTemplate}", - "httpMethod": "DELETE", - "description": "Deletes the specified instance template. If you delete an instance template that is being referenced from another instance group, the instance group will not be able to create or recreate virtual machine instances. Deleting an instance template is permanent and cannot be undone.", - "parameters": { - "instanceTemplate": { - "type": "string", - "description": "The name of the instance template to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "instanceTemplate" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.instanceTemplates.get", - "path": "{project}/global/instanceTemplates/{instanceTemplate}", - "httpMethod": "GET", - "description": "Returns the specified instance template. Get a list of available instance templates by making a list() request.", - "parameters": { - "instanceTemplate": { - "type": "string", - "description": "The name of the instance template.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "instanceTemplate" - ], - "response": { - "$ref": "InstanceTemplate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.instanceTemplates.insert", - "path": "{project}/global/instanceTemplates", - "httpMethod": "POST", - "description": "Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "InstanceTemplate" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.instanceTemplates.list", - "path": "{project}/global/instanceTemplates", - "httpMethod": "GET", - "description": "Retrieves a list of instance templates that are contained within the specified project and zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "InstanceTemplateList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.instanceTemplates.testIamPermissions", - "path": "{project}/global/instanceTemplates/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "instances": { - "methods": { - "addAccessConfig": { - "id": "compute.instances.addAccessConfig", - "path": "{project}/zones/{zone}/instances/{instance}/addAccessConfig", - "httpMethod": "POST", - "description": "Adds an access config to an instance's network interface.", - "parameters": { - "instance": { - "type": "string", - "description": "The instance name for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "networkInterface": { - "type": "string", - "description": "The name of the network interface to add to this instance.", - "required": true, - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance", - "networkInterface" - ], - "request": { - "$ref": "AccessConfig" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "id": "compute.instances.aggregatedList", - "path": "{project}/aggregated/instances", - "httpMethod": "GET", - "description": "Retrieves aggregated list of instances.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "InstanceAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "attachDisk": { - "id": "compute.instances.attachDisk", - "path": "{project}/zones/{zone}/instances/{instance}/attachDisk", - "httpMethod": "POST", - "description": "Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.", - "parameters": { - "forceAttach": { - "type": "boolean", - "description": "Whether to force attach the disk even if it's currently attached to another instance. This is only available for regional disks.", - "location": "query" - }, - "instance": { - "type": "string", - "description": "The instance name for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "request": { - "$ref": "AttachedDisk" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "id": "compute.instances.delete", - "path": "{project}/zones/{zone}/instances/{instance}", - "httpMethod": "DELETE", - "description": "Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deleteAccessConfig": { - "id": "compute.instances.deleteAccessConfig", - "path": "{project}/zones/{zone}/instances/{instance}/deleteAccessConfig", - "httpMethod": "POST", - "description": "Deletes an access config from an instance's network interface.", - "parameters": { - "accessConfig": { - "type": "string", - "description": "The name of the access config to delete.", - "required": true, - "location": "query" - }, - "instance": { - "type": "string", - "description": "The instance name for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "networkInterface": { - "type": "string", - "description": "The name of the network interface.", - "required": true, - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance", - "accessConfig", - "networkInterface" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "detachDisk": { - "id": "compute.instances.detachDisk", - "path": "{project}/zones/{zone}/instances/{instance}/detachDisk", - "httpMethod": "POST", - "description": "Detaches a disk from an instance.", - "parameters": { - "deviceName": { - "type": "string", - "description": "Disk device name to detach.", - "required": true, - "location": "query" - }, - "instance": { - "type": "string", - "description": "Instance name.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance", - "deviceName" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.instances.get", - "path": "{project}/zones/{zone}/instances/{instance}", - "httpMethod": "GET", - "description": "Returns the specified Instance resource. Get a list of available instances by making a list() request.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "response": { - "$ref": "Instance" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getGuestAttributes": { - "id": "compute.instances.getGuestAttributes", - "path": "{project}/zones/{zone}/instances/{instance}/getGuestAttributes", - "httpMethod": "GET", - "description": "Returns the specified guest attributes entry.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "variableKey": { - "type": "string", - "description": "Specifies the key for the guest attributes entry.", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "response": { - "$ref": "GuestAttributes" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "id": "compute.instances.getIamPolicy", - "path": "{project}/zones/{zone}/instances/{resource}/getIamPolicy", - "httpMethod": "GET", - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getSerialPortOutput": { - "id": "compute.instances.getSerialPortOutput", - "path": "{project}/zones/{zone}/instances/{instance}/serialPort", - "httpMethod": "GET", - "description": "Returns the specified instance's serial port output.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "port": { - "type": "integer", - "description": "Specifies which COM or serial port to retrieve data from.", - "default": "1", - "format": "int32", - "minimum": "1", - "maximum": "4", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "start": { - "type": "string", - "description": "Returns output starting from a specific byte position. Use this to page through output when the output is too large to return in a single request. For the initial request, leave this field unspecified. For subsequent calls, this field should be set to the next value returned in the previous call.", - "format": "int64", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "response": { - "$ref": "SerialPortOutput" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.instances.insert", - "path": "{project}/zones/{zone}/instances", - "httpMethod": "POST", - "description": "Creates an instance resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "sourceInstanceTemplate": { - "type": "string", - "description": "Specifies instance template to create the instance.\n\nThis field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: \n- https://www.googleapis.com/compute/v1/projects/project/global/global/instanceTemplates/instanceTemplate \n- projects/project/global/global/instanceTemplates/instanceTemplate \n- global/instancesTemplates/instanceTemplate", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "request": { - "$ref": "Instance" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.instances.list", - "path": "{project}/zones/{zone}/instances", - "httpMethod": "GET", - "description": "Retrieves the list of instances contained within the specified zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "InstanceList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listReferrers": { - "id": "compute.instances.listReferrers", - "path": "{project}/zones/{zone}/instances/{instance}/referrers", - "httpMethod": "GET", - "description": "Retrieves the list of referrers to instances contained within the specified zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "instance": { - "type": "string", - "description": "Name of the target instance scoping this request, or '-' if the request should span over all instances in the container.", - "required": true, - "pattern": "-|[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "response": { - "$ref": "InstanceListReferrers" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "reset": { - "id": "compute.instances.reset", - "path": "{project}/zones/{zone}/instances/{instance}/reset", - "httpMethod": "POST", - "description": "Performs a reset on the instance. For more information, see Resetting an instance.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setDiskAutoDelete": { - "id": "compute.instances.setDiskAutoDelete", - "path": "{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete", - "httpMethod": "POST", - "description": "Sets the auto-delete flag for a disk attached to an instance.", - "parameters": { - "autoDelete": { - "type": "boolean", - "description": "Whether to auto-delete the disk when the instance is deleted.", - "required": true, - "location": "query" - }, - "deviceName": { - "type": "string", - "description": "The device name of the disk to modify.", - "required": true, - "pattern": "\\w[\\w.-]{0,254}", - "location": "query" - }, - "instance": { - "type": "string", - "description": "The instance name.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance", - "autoDelete", - "deviceName" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "id": "compute.instances.setIamPolicy", - "path": "{project}/zones/{zone}/instances/{resource}/setIamPolicy", - "httpMethod": "POST", - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "request": { - "$ref": "Policy" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "id": "compute.instances.setLabels", - "path": "{project}/zones/{zone}/instances/{instance}/setLabels", - "httpMethod": "POST", - "description": "Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "request": { - "$ref": "InstancesSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setMachineResources": { - "id": "compute.instances.setMachineResources", - "path": "{project}/zones/{zone}/instances/{instance}/setMachineResources", - "httpMethod": "POST", - "description": "Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "request": { - "$ref": "InstancesSetMachineResourcesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setMachineType": { - "id": "compute.instances.setMachineType", - "path": "{project}/zones/{zone}/instances/{instance}/setMachineType", - "httpMethod": "POST", - "description": "Changes the machine type for a stopped instance to the machine type specified in the request.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "request": { - "$ref": "InstancesSetMachineTypeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setMetadata": { - "id": "compute.instances.setMetadata", - "path": "{project}/zones/{zone}/instances/{instance}/setMetadata", - "httpMethod": "POST", - "description": "Sets metadata for the specified instance to the data included in the request.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "request": { - "$ref": "Metadata" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setMinCpuPlatform": { - "id": "compute.instances.setMinCpuPlatform", - "path": "{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform", - "httpMethod": "POST", - "description": "Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "request": { - "$ref": "InstancesSetMinCpuPlatformRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setScheduling": { - "id": "compute.instances.setScheduling", - "path": "{project}/zones/{zone}/instances/{instance}/setScheduling", - "httpMethod": "POST", - "description": "Sets an instance's scheduling options.", - "parameters": { - "instance": { - "type": "string", - "description": "Instance name.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "request": { - "$ref": "Scheduling" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setServiceAccount": { - "id": "compute.instances.setServiceAccount", - "path": "{project}/zones/{zone}/instances/{instance}/setServiceAccount", - "httpMethod": "POST", - "description": "Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance resource to start.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "request": { - "$ref": "InstancesSetServiceAccountRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setTags": { - "id": "compute.instances.setTags", - "path": "{project}/zones/{zone}/instances/{instance}/setTags", - "httpMethod": "POST", - "description": "Sets tags for the specified instance to the data included in the request.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "request": { - "$ref": "Tags" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "simulateMaintenanceEvent": { - "id": "compute.instances.simulateMaintenanceEvent", - "path": "{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent", - "httpMethod": "POST", - "description": "Simulates a maintenance event on the instance.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "start": { - "id": "compute.instances.start", - "path": "{project}/zones/{zone}/instances/{instance}/start", - "httpMethod": "POST", - "description": "Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance resource to start.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "startWithEncryptionKey": { - "id": "compute.instances.startWithEncryptionKey", - "path": "{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey", - "httpMethod": "POST", - "description": "Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance resource to start.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "request": { - "$ref": "InstancesStartWithEncryptionKeyRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "stop": { - "id": "compute.instances.stop", - "path": "{project}/zones/{zone}/instances/{instance}/stop", - "httpMethod": "POST", - "description": "Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur per-minute, virtual machine usage charges while they are stopped, but any resources that the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.", - "parameters": { - "discardLocalSsd": { - "type": "boolean", - "description": "If true, discard the contents of any attached localSSD partitions. Default value is false (== preserve localSSD data).", - "location": "query" - }, - "instance": { - "type": "string", - "description": "Name of the instance resource to stop.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "suspend": { - "id": "compute.instances.suspend", - "path": "{project}/zones/{zone}/instances/{instance}/suspend", - "httpMethod": "POST", - "description": "This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time. Suspended instances incur reduced per-minute, virtual machine usage charges while they are suspended. Any resources the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted.", - "parameters": { - "discardLocalSsd": { - "type": "boolean", - "description": "If true, discard the contents of any attached localSSD partitions. Default value is false (== preserve localSSD data).", - "location": "query" - }, - "instance": { - "type": "string", - "description": "Name of the instance resource to suspend.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.instances.testIamPermissions", - "path": "{project}/zones/{zone}/instances/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "updateAccessConfig": { - "id": "compute.instances.updateAccessConfig", - "path": "{project}/zones/{zone}/instances/{instance}/updateAccessConfig", - "httpMethod": "POST", - "description": "Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "instance": { - "type": "string", - "description": "The instance name for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "networkInterface": { - "type": "string", - "description": "The name of the network interface where the access config is attached.", - "required": true, - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance", - "networkInterface" - ], - "request": { - "$ref": "AccessConfig" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "updateNetworkInterface": { - "id": "compute.instances.updateNetworkInterface", - "path": "{project}/zones/{zone}/instances/{instance}/updateNetworkInterface", - "httpMethod": "PATCH", - "description": "Updates an instance's network interface. This method follows PATCH semantics.", - "parameters": { - "instance": { - "type": "string", - "description": "The instance name for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "networkInterface": { - "type": "string", - "description": "The name of the network interface to update.", - "required": true, - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance", - "networkInterface" - ], - "request": { - "$ref": "NetworkInterface" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "interconnectAttachments": { - "methods": { - "aggregatedList": { - "id": "compute.interconnectAttachments.aggregatedList", - "path": "{project}/aggregated/interconnectAttachments", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of interconnect attachments.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "InterconnectAttachmentAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.interconnectAttachments.delete", - "path": "{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", - "httpMethod": "DELETE", - "description": "Deletes the specified interconnect attachment.", - "parameters": { - "interconnectAttachment": { - "type": "string", - "description": "Name of the interconnect attachment to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "interconnectAttachment" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.interconnectAttachments.get", - "path": "{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", - "httpMethod": "GET", - "description": "Returns the specified interconnect attachment.", - "parameters": { - "interconnectAttachment": { - "type": "string", - "description": "Name of the interconnect attachment to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "interconnectAttachment" - ], - "response": { - "$ref": "InterconnectAttachment" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "id": "compute.interconnectAttachments.getIamPolicy", - "path": "{project}/regions/{region}/interconnectAttachments/{resource}/getIamPolicy", - "httpMethod": "GET", - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.interconnectAttachments.insert", - "path": "{project}/regions/{region}/interconnectAttachments", - "httpMethod": "POST", - "description": "Creates an InterconnectAttachment in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "InterconnectAttachment" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.interconnectAttachments.list", - "path": "{project}/regions/{region}/interconnectAttachments", - "httpMethod": "GET", - "description": "Retrieves the list of interconnect attachments contained within the specified region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "InterconnectAttachmentList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.interconnectAttachments.testIamPermissions", - "path": "{project}/regions/{region}/interconnectAttachments/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "interconnectLocations": { - "methods": { - "get": { - "id": "compute.interconnectLocations.get", - "path": "{project}/global/interconnectLocations/{interconnectLocation}", - "httpMethod": "GET", - "description": "Returns the details for the specified interconnect location. Get a list of available interconnect locations by making a list() request.", - "parameters": { - "interconnectLocation": { - "type": "string", - "description": "Name of the interconnect location to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "interconnectLocation" - ], - "response": { - "$ref": "InterconnectLocation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.interconnectLocations.list", - "path": "{project}/global/interconnectLocations", - "httpMethod": "GET", - "description": "Retrieves the list of interconnect locations available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "InterconnectLocationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.interconnectLocations.testIamPermissions", - "path": "{project}/global/interconnectLocations/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "interconnects": { - "methods": { - "delete": { - "id": "compute.interconnects.delete", - "path": "{project}/global/interconnects/{interconnect}", - "httpMethod": "DELETE", - "description": "Deletes the specified interconnect.", - "parameters": { - "interconnect": { - "type": "string", - "description": "Name of the interconnect to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "interconnect" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.interconnects.get", - "path": "{project}/global/interconnects/{interconnect}", - "httpMethod": "GET", - "description": "Returns the specified interconnect. Get a list of available interconnects by making a list() request.", - "parameters": { - "interconnect": { - "type": "string", - "description": "Name of the interconnect to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "interconnect" - ], - "response": { - "$ref": "Interconnect" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.interconnects.insert", - "path": "{project}/global/interconnects", - "httpMethod": "POST", - "description": "Creates a Interconnect in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "Interconnect" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.interconnects.list", - "path": "{project}/global/interconnects", - "httpMethod": "GET", - "description": "Retrieves the list of interconnect available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "InterconnectList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.interconnects.patch", - "path": "{project}/global/interconnects/{interconnect}", - "httpMethod": "PATCH", - "description": "Updates the specified interconnect with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "interconnect": { - "type": "string", - "description": "Name of the interconnect to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "interconnect" - ], - "request": { - "$ref": "Interconnect" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.interconnects.testIamPermissions", - "path": "{project}/global/interconnects/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "licenses": { - "methods": { - "delete": { - "id": "compute.licenses.delete", - "path": "{project}/global/licenses/{license}", - "httpMethod": "DELETE", - "description": "Deletes the specified license.", - "parameters": { - "license": { - "type": "string", - "description": "Name of the license resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "license" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.licenses.get", - "path": "{project}/global/licenses/{license}", - "httpMethod": "GET", - "description": "Returns the specified License resource.", - "parameters": { - "license": { - "type": "string", - "description": "Name of the License resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "license" - ], - "response": { - "$ref": "License" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "id": "compute.licenses.getIamPolicy", - "path": "{project}/global/licenses/{resource}/getIamPolicy", - "httpMethod": "GET", - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.licenses.insert", - "path": "{project}/global/licenses", - "httpMethod": "POST", - "description": "Create a License resource in the specified project.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "License" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_only", - "https://www.googleapis.com/auth/devstorage.read_write" - ] - }, - "list": { - "id": "compute.licenses.list", - "path": "{project}/global/licenses", - "httpMethod": "GET", - "description": "Retrieves the list of licenses available in the specified project. This method does not get any licenses that belong to other projects, including licenses attached to publicly-available images, like Debian 8. If you want to get a list of publicly-available licenses, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "LicensesListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setIamPolicy": { - "id": "compute.licenses.setIamPolicy", - "path": "{project}/global/licenses/{resource}/setIamPolicy", - "httpMethod": "POST", - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "Policy" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.licenses.testIamPermissions", - "path": "{project}/global/licenses/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "machineTypes": { - "methods": { - "aggregatedList": { - "id": "compute.machineTypes.aggregatedList", - "path": "{project}/aggregated/machineTypes", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of machine types.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "MachineTypeAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "get": { - "id": "compute.machineTypes.get", - "path": "{project}/zones/{zone}/machineTypes/{machineType}", - "httpMethod": "GET", - "description": "Returns the specified machine type. Get a list of available machine types by making a list() request.", - "parameters": { - "machineType": { - "type": "string", - "description": "Name of the machine type to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "machineType" - ], - "response": { - "$ref": "MachineType" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.machineTypes.list", - "path": "{project}/zones/{zone}/machineTypes", - "httpMethod": "GET", - "description": "Retrieves a list of machine types available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "MachineTypeList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "networks": { - "methods": { - "addPeering": { - "id": "compute.networks.addPeering", - "path": "{project}/global/networks/{network}/addPeering", - "httpMethod": "POST", - "description": "Adds a peering to the specified network.", - "parameters": { - "network": { - "type": "string", - "description": "Name of the network resource to add peering to.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "network" - ], - "request": { - "$ref": "NetworksAddPeeringRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "id": "compute.networks.delete", - "path": "{project}/global/networks/{network}", - "httpMethod": "DELETE", - "description": "Deletes the specified network.", - "parameters": { - "network": { - "type": "string", - "description": "Name of the network to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "network" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.networks.get", - "path": "{project}/global/networks/{network}", - "httpMethod": "GET", - "description": "Returns the specified network. Get a list of available networks by making a list() request.", - "parameters": { - "network": { - "type": "string", - "description": "Name of the network to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "network" - ], - "response": { - "$ref": "Network" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.networks.insert", - "path": "{project}/global/networks", - "httpMethod": "POST", - "description": "Creates a network in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "Network" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.networks.list", - "path": "{project}/global/networks", - "httpMethod": "GET", - "description": "Retrieves the list of networks available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "NetworkList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listIpOwners": { - "id": "compute.networks.listIpOwners", - "path": "{project}/global/networks/{network}/listIpOwners", - "httpMethod": "GET", - "description": "List the internal IP owners in the specified network.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "ipCidrRange": { - "type": "string", - "description": "(Optional) IP CIDR range filter, example: \"10.128.10.0/30\".", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "network": { - "type": "string", - "description": "Name of the network to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "ownerProjects": { - "type": "string", - "description": "(Optional) Project IDs filter, example: \"project-1,project-2\".", - "location": "query" - }, - "ownerTypes": { - "type": "string", - "description": "(Optional) Owner types filter, example: \"instance,forwardingRule\".", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "subnetName": { - "type": "string", - "description": "(Optional) Subnetwork name filter.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "query" - }, - "subnetRegion": { - "type": "string", - "description": "(Optional) Subnetwork region filter.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "network" - ], - "response": { - "$ref": "IpOwnerList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.networks.patch", - "path": "{project}/global/networks/{network}", - "httpMethod": "PATCH", - "description": "Patches the specified network with the data included in the request.", - "parameters": { - "network": { - "type": "string", - "description": "Name of the network to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "network" - ], - "request": { - "$ref": "Network" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "removePeering": { - "id": "compute.networks.removePeering", - "path": "{project}/global/networks/{network}/removePeering", - "httpMethod": "POST", - "description": "Removes a peering from the specified network.", - "parameters": { - "network": { - "type": "string", - "description": "Name of the network resource to remove peering from.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "network" - ], - "request": { - "$ref": "NetworksRemovePeeringRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "switchToCustomMode": { - "id": "compute.networks.switchToCustomMode", - "path": "{project}/global/networks/{network}/switchToCustomMode", - "httpMethod": "POST", - "description": "Switches the network mode from auto subnet mode to custom subnet mode.", - "parameters": { - "network": { - "type": "string", - "description": "Name of the network to be updated.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "network" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.networks.testIamPermissions", - "path": "{project}/global/networks/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "projects": { - "methods": { - "disableXpnHost": { - "id": "compute.projects.disableXpnHost", - "path": "{project}/disableXpnHost", - "httpMethod": "POST", - "description": "Disable this project as a shared VPC host project.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "disableXpnResource": { - "id": "compute.projects.disableXpnResource", - "path": "{project}/disableXpnResource", - "httpMethod": "POST", - "description": "Disable a serivce resource (a.k.a service project) associated with this host project.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "ProjectsDisableXpnResourceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "enableXpnHost": { - "id": "compute.projects.enableXpnHost", - "path": "{project}/enableXpnHost", - "httpMethod": "POST", - "description": "Enable this project as a shared VPC host project.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "enableXpnResource": { - "id": "compute.projects.enableXpnResource", - "path": "{project}/enableXpnResource", - "httpMethod": "POST", - "description": "Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "ProjectsEnableXpnResourceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.projects.get", - "path": "{project}", - "httpMethod": "GET", - "description": "Returns the specified Project resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "Project" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getXpnHost": { - "id": "compute.projects.getXpnHost", - "path": "{project}/getXpnHost", - "httpMethod": "GET", - "description": "Get the shared VPC host project that this project links to. May be empty if no link exists.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "Project" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "getXpnResources": { - "id": "compute.projects.getXpnResources", - "path": "{project}/getXpnResources", - "httpMethod": "GET", - "description": "Get service resources (a.k.a service project) associated with this host project.", - "parameters": { - "filter": { - "type": "string", - "location": "query" - }, - "maxResults": { - "type": "integer", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "order_by": { - "type": "string", - "location": "query" - }, - "pageToken": { - "type": "string", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "ProjectsGetXpnResources" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "listXpnHosts": { - "id": "compute.projects.listXpnHosts", - "path": "{project}/listXpnHosts", - "httpMethod": "POST", - "description": "List all shared VPC host projects visible to the user in an organization.", - "parameters": { - "filter": { - "type": "string", - "location": "query" - }, - "maxResults": { - "type": "integer", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "order_by": { - "type": "string", - "location": "query" - }, - "pageToken": { - "type": "string", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "ProjectsListXpnHostsRequest" - }, - "response": { - "$ref": "XpnHostList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "moveDisk": { - "id": "compute.projects.moveDisk", - "path": "{project}/moveDisk", - "httpMethod": "POST", - "description": "Moves a persistent disk from one zone to another.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "DiskMoveRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "moveInstance": { - "id": "compute.projects.moveInstance", - "path": "{project}/moveInstance", - "httpMethod": "POST", - "description": "Moves an instance and its attached persistent disks from one zone to another.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "InstanceMoveRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setCommonInstanceMetadata": { - "id": "compute.projects.setCommonInstanceMetadata", - "path": "{project}/setCommonInstanceMetadata", - "httpMethod": "POST", - "description": "Sets metadata common to all instances within the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "Metadata" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setDefaultServiceAccount": { - "id": "compute.projects.setDefaultServiceAccount", - "path": "{project}/setDefaultServiceAccount", - "httpMethod": "POST", - "description": "Sets the default service account of the project. The default service account is used when a VM instance is created with the service account email address set to \"default\".", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "ProjectsSetDefaultServiceAccountRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setUsageExportBucket": { - "id": "compute.projects.setUsageExportBucket", - "path": "{project}/setUsageExportBucket", - "httpMethod": "POST", - "description": "Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "UsageExportLocation" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_only", - "https://www.googleapis.com/auth/devstorage.read_write" - ] - } - } - }, - "regionAutoscalers": { - "methods": { - "delete": { - "id": "compute.regionAutoscalers.delete", - "path": "{project}/regions/{region}/autoscalers/{autoscaler}", - "httpMethod": "DELETE", - "description": "Deletes the specified autoscaler.", - "parameters": { - "autoscaler": { - "type": "string", - "description": "Name of the autoscaler to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "autoscaler" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.regionAutoscalers.get", - "path": "{project}/regions/{region}/autoscalers/{autoscaler}", - "httpMethod": "GET", - "description": "Returns the specified autoscaler.", - "parameters": { - "autoscaler": { - "type": "string", - "description": "Name of the autoscaler to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "autoscaler" - ], - "response": { - "$ref": "Autoscaler" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.regionAutoscalers.insert", - "path": "{project}/regions/{region}/autoscalers", - "httpMethod": "POST", - "description": "Creates an autoscaler in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "Autoscaler" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.regionAutoscalers.list", - "path": "{project}/regions/{region}/autoscalers", - "httpMethod": "GET", - "description": "Retrieves a list of autoscalers contained within the specified region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "RegionAutoscalerList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.regionAutoscalers.patch", - "path": "{project}/regions/{region}/autoscalers", - "httpMethod": "PATCH", - "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "autoscaler": { - "type": "string", - "description": "Name of the autoscaler to patch.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and then the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "Autoscaler" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.regionAutoscalers.testIamPermissions", - "path": "{project}/regions/{region}/autoscalers/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.regionAutoscalers.update", - "path": "{project}/regions/{region}/autoscalers", - "httpMethod": "PUT", - "description": "Updates an autoscaler in the specified project using the data included in the request.", - "parameters": { - "autoscaler": { - "type": "string", - "description": "Name of the autoscaler to update.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and then the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "Autoscaler" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionBackendServices": { - "methods": { - "delete": { - "id": "compute.regionBackendServices.delete", - "path": "{project}/regions/{region}/backendServices/{backendService}", - "httpMethod": "DELETE", - "description": "Deletes the specified regional BackendService resource.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "backendService" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.regionBackendServices.get", - "path": "{project}/regions/{region}/backendServices/{backendService}", - "httpMethod": "GET", - "description": "Returns the specified regional BackendService resource.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "backendService" - ], - "response": { - "$ref": "BackendService" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getHealth": { - "id": "compute.regionBackendServices.getHealth", - "path": "{project}/regions/{region}/backendServices/{backendService}/getHealth", - "httpMethod": "POST", - "description": "Gets the most recent health check results for this regional BackendService.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to which the queried instance belongs.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "backendService" - ], - "request": { - "$ref": "ResourceGroupReference" - }, - "response": { - "$ref": "BackendServiceGroupHealth" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.regionBackendServices.insert", - "path": "{project}/regions/{region}/backendServices", - "httpMethod": "POST", - "description": "Creates a regional BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a regional backend service. Read Restrictions and Guidelines for more information.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "BackendService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.regionBackendServices.list", - "path": "{project}/regions/{region}/backendServices", - "httpMethod": "GET", - "description": "Retrieves the list of regional BackendService resources available to the specified project in the given region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "BackendServiceList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.regionBackendServices.patch", - "path": "{project}/regions/{region}/backendServices/{backendService}", - "httpMethod": "PATCH", - "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to patch.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "backendService" - ], - "request": { - "$ref": "BackendService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.regionBackendServices.testIamPermissions", - "path": "{project}/regions/{region}/backendServices/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.regionBackendServices.update", - "path": "{project}/regions/{region}/backendServices/{backendService}", - "httpMethod": "PUT", - "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "backendService" - ], - "request": { - "$ref": "BackendService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionCommitments": { - "methods": { - "aggregatedList": { - "id": "compute.regionCommitments.aggregatedList", - "path": "{project}/aggregated/commitments", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of commitments.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "CommitmentAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "get": { - "id": "compute.regionCommitments.get", - "path": "{project}/regions/{region}/commitments/{commitment}", - "httpMethod": "GET", - "description": "Returns the specified commitment resource. Get a list of available commitments by making a list() request.", - "parameters": { - "commitment": { - "type": "string", - "description": "Name of the commitment to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "commitment" - ], - "response": { - "$ref": "Commitment" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.regionCommitments.insert", - "path": "{project}/regions/{region}/commitments", - "httpMethod": "POST", - "description": "Creates a commitment in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "Commitment" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.regionCommitments.list", - "path": "{project}/regions/{region}/commitments", - "httpMethod": "GET", - "description": "Retrieves a list of commitments contained within the specified region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "CommitmentList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.regionCommitments.testIamPermissions", - "path": "{project}/regions/{region}/commitments/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionDiskTypes": { - "methods": { - "get": { - "id": "compute.regionDiskTypes.get", - "path": "{project}/regions/{region}/diskTypes/{diskType}", - "httpMethod": "GET", - "description": "Returns the specified regional disk type. Get a list of available disk types by making a list() request.", - "parameters": { - "diskType": { - "type": "string", - "description": "Name of the disk type to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "diskType" - ], - "response": { - "$ref": "DiskType" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.regionDiskTypes.list", - "path": "{project}/regions/{region}/diskTypes", - "httpMethod": "GET", - "description": "Retrieves a list of regional disk types available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "RegionDiskTypeList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionDisks": { - "methods": { - "createSnapshot": { - "id": "compute.regionDisks.createSnapshot", - "path": "{project}/regions/{region}/disks/{disk}/createSnapshot", - "httpMethod": "POST", - "description": "Creates a snapshot of this regional disk.", - "parameters": { - "disk": { - "type": "string", - "description": "Name of the regional persistent disk to snapshot.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "guestFlush": { - "type": "boolean", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "disk" - ], - "request": { - "$ref": "Snapshot" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "id": "compute.regionDisks.delete", - "path": "{project}/regions/{region}/disks/{disk}", - "httpMethod": "DELETE", - "description": "Deletes the specified regional persistent disk. Deleting a regional disk removes all the replicas of its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.", - "parameters": { - "disk": { - "type": "string", - "description": "Name of the regional persistent disk to delete.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "disk" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.regionDisks.get", - "path": "{project}/regions/{region}/disks/{disk}", - "httpMethod": "GET", - "description": "Returns a specified regional persistent disk.", - "parameters": { - "disk": { - "type": "string", - "description": "Name of the regional persistent disk to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "disk" - ], - "response": { - "$ref": "Disk" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.regionDisks.insert", - "path": "{project}/regions/{region}/disks", - "httpMethod": "POST", - "description": "Creates a persistent regional disk in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and then the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.", - "location": "query" - }, - "sourceImage": { - "type": "string", - "description": "Optional. Source image to restore onto a disk.", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "Disk" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.regionDisks.list", - "path": "{project}/regions/{region}/disks", - "httpMethod": "GET", - "description": "Retrieves the list of persistent disks contained within the specified region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "DiskList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "resize": { - "id": "compute.regionDisks.resize", - "path": "{project}/regions/{region}/disks/{disk}/resize", - "httpMethod": "POST", - "description": "Resizes the specified regional persistent disk.", - "parameters": { - "disk": { - "type": "string", - "description": "Name of the regional persistent disk.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "The project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "disk" - ], - "request": { - "$ref": "RegionDisksResizeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "id": "compute.regionDisks.setLabels", - "path": "{project}/regions/{region}/disks/{resource}/setLabels", - "httpMethod": "POST", - "description": "Sets the labels on the target regional disk.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "RegionSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.regionDisks.testIamPermissions", - "path": "{project}/regions/{region}/disks/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionInstanceGroupManagers": { - "methods": { - "abandonInstances": { - "id": "compute.regionInstanceGroupManagers.abandonInstances", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", - "httpMethod": "POST", - "description": "Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "Name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "request": { - "$ref": "RegionInstanceGroupManagersAbandonInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "applyUpdatesToInstances": { - "id": "compute.regionInstanceGroupManagers.applyUpdatesToInstances", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances", - "httpMethod": "POST", - "description": "Apply updates to selected instances the managed instance group.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group, should conform to RFC1035.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request, should conform to RFC1035.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "request": { - "$ref": "RegionInstanceGroupManagersApplyUpdatesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "id": "compute.regionInstanceGroupManagers.delete", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "DELETE", - "description": "Deletes the specified managed instance group and all of the instances in that group.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "Name of the managed instance group to delete.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deleteInstances": { - "id": "compute.regionInstanceGroupManagers.deleteInstances", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", - "httpMethod": "POST", - "description": "Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "Name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "request": { - "$ref": "RegionInstanceGroupManagersDeleteInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deletePerInstanceConfigs": { - "id": "compute.regionInstanceGroupManagers.deletePerInstanceConfigs", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deletePerInstanceConfigs", - "httpMethod": "POST", - "description": "Delete selected per-instance configs for the managed instance group.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group. It should conform to RFC1035.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request, should conform to RFC1035.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "request": { - "$ref": "RegionInstanceGroupManagerDeleteInstanceConfigReq" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.regionInstanceGroupManagers.get", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "GET", - "description": "Returns all of the details about the specified managed instance group.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "Name of the managed instance group to return.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "response": { - "$ref": "InstanceGroupManager" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.regionInstanceGroupManagers.insert", - "path": "{project}/regions/{region}/instanceGroupManagers", - "httpMethod": "POST", - "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA regional managed instance group can contain up to 2000 instances.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "InstanceGroupManager" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.regionInstanceGroupManagers.list", - "path": "{project}/regions/{region}/instanceGroupManagers", - "httpMethod": "GET", - "description": "Retrieves the list of managed instance groups that are contained within the specified region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "RegionInstanceGroupManagerList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listManagedInstances": { - "id": "compute.regionInstanceGroupManagers.listManagedInstances", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", - "httpMethod": "POST", - "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances.", - "parameters": { - "filter": { - "type": "string", - "location": "query" - }, - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "maxResults": { - "type": "integer", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "order_by": { - "type": "string", - "location": "query" - }, - "pageToken": { - "type": "string", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "response": { - "$ref": "RegionInstanceGroupManagersListInstancesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listPerInstanceConfigs": { - "id": "compute.regionInstanceGroupManagers.listPerInstanceConfigs", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs", - "httpMethod": "POST", - "description": "Lists all of the per-instance configs defined for the managed instance group.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group. It should conform to RFC1035.", - "required": true, - "location": "path" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request, should conform to RFC1035.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "response": { - "$ref": "RegionInstanceGroupManagersListInstanceConfigsResp" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.regionInstanceGroupManagers.patch", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "PATCH", - "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the instance group manager.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "request": { - "$ref": "InstanceGroupManager" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "recreateInstances": { - "id": "compute.regionInstanceGroupManagers.recreateInstances", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", - "httpMethod": "POST", - "description": "Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "Name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "request": { - "$ref": "RegionInstanceGroupManagersRecreateRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "resize": { - "id": "compute.regionInstanceGroupManagers.resize", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resize", - "httpMethod": "POST", - "description": "Changes the intended size for the managed instance group. If you increase the size, the group schedules actions to create new instances using the current instance template. If you decrease the size, the group schedules delete actions on one or more instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "Name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "size": { - "type": "integer", - "description": "Number of instances that should exist in this instance group manager.", - "required": true, - "format": "int32", - "minimum": "0", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager", - "size" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setAutoHealingPolicies": { - "id": "compute.regionInstanceGroupManagers.setAutoHealingPolicies", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies", - "httpMethod": "POST", - "description": "Modifies the autohealing policy for the instances in this managed instance group.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "Name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "request": { - "$ref": "RegionInstanceGroupManagersSetAutoHealingRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setInstanceTemplate": { - "id": "compute.regionInstanceGroupManagers.setInstanceTemplate", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", - "httpMethod": "POST", - "description": "Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "request": { - "$ref": "RegionInstanceGroupManagersSetTemplateRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setTargetPools": { - "id": "compute.regionInstanceGroupManagers.setTargetPools", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", - "httpMethod": "POST", - "description": "Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "Name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "request": { - "$ref": "RegionInstanceGroupManagersSetTargetPoolsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.regionInstanceGroupManagers.testIamPermissions", - "path": "{project}/regions/{region}/instanceGroupManagers/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.regionInstanceGroupManagers.update", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "PUT", - "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listmanagedinstances method.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the instance group manager.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "request": { - "$ref": "InstanceGroupManager" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "updatePerInstanceConfigs": { - "id": "compute.regionInstanceGroupManagers.updatePerInstanceConfigs", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs", - "httpMethod": "POST", - "description": "Insert or patch (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group. It should conform to RFC1035.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request, should conform to RFC1035.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "request": { - "$ref": "RegionInstanceGroupManagerUpdateInstanceConfigReq" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionInstanceGroups": { - "methods": { - "get": { - "id": "compute.regionInstanceGroups.get", - "path": "{project}/regions/{region}/instanceGroups/{instanceGroup}", - "httpMethod": "GET", - "description": "Returns the specified instance group resource.", - "parameters": { - "instanceGroup": { - "type": "string", - "description": "Name of the instance group resource to return.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroup" - ], - "response": { - "$ref": "InstanceGroup" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.regionInstanceGroups.list", - "path": "{project}/regions/{region}/instanceGroups", - "httpMethod": "GET", - "description": "Retrieves the list of instance group resources contained within the specified region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "RegionInstanceGroupList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listInstances": { - "id": "compute.regionInstanceGroups.listInstances", - "path": "{project}/regions/{region}/instanceGroups/{instanceGroup}/listInstances", - "httpMethod": "POST", - "description": "Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "instanceGroup": { - "type": "string", - "description": "Name of the regional instance group for which we want to list the instances.", - "required": true, - "location": "path" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroup" - ], - "request": { - "$ref": "RegionInstanceGroupsListInstancesRequest" - }, - "response": { - "$ref": "RegionInstanceGroupsListInstances" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setNamedPorts": { - "id": "compute.regionInstanceGroups.setNamedPorts", - "path": "{project}/regions/{region}/instanceGroups/{instanceGroup}/setNamedPorts", - "httpMethod": "POST", - "description": "Sets the named ports for the specified regional instance group.", - "parameters": { - "instanceGroup": { - "type": "string", - "description": "The name of the regional instance group where the named ports are updated.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroup" - ], - "request": { - "$ref": "RegionInstanceGroupsSetNamedPortsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.regionInstanceGroups.testIamPermissions", - "path": "{project}/regions/{region}/instanceGroups/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionOperations": { - "methods": { - "delete": { - "id": "compute.regionOperations.delete", - "path": "{project}/regions/{region}/operations/{operation}", - "httpMethod": "DELETE", - "description": "Deletes the specified region-specific Operations resource.", - "parameters": { - "operation": { - "type": "string", - "description": "Name of the Operations resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "operation" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.regionOperations.get", - "path": "{project}/regions/{region}/operations/{operation}", - "httpMethod": "GET", - "description": "Retrieves the specified region-specific Operations resource.", - "parameters": { - "operation": { - "type": "string", - "description": "Name of the Operations resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "operation" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.regionOperations.list", - "path": "{project}/regions/{region}/operations", - "httpMethod": "GET", - "description": "Retrieves a list of Operation resources contained within the specified region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "OperationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regions": { - "methods": { - "get": { - "id": "compute.regions.get", - "path": "{project}/regions/{region}", - "httpMethod": "GET", - "description": "Returns the specified Region resource. Get a list of available regions by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "Region" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.regions.list", - "path": "{project}/regions", - "httpMethod": "GET", - "description": "Retrieves the list of region resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "RegionList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "routers": { - "methods": { - "aggregatedList": { - "id": "compute.routers.aggregatedList", - "path": "{project}/aggregated/routers", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of routers.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "RouterAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.routers.delete", - "path": "{project}/regions/{region}/routers/{router}", - "httpMethod": "DELETE", - "description": "Deletes the specified Router resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "router": { - "type": "string", - "description": "Name of the Router resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "router" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.routers.get", - "path": "{project}/regions/{region}/routers/{router}", - "httpMethod": "GET", - "description": "Returns the specified Router resource. Get a list of available routers by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "router": { - "type": "string", - "description": "Name of the Router resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "router" - ], - "response": { - "$ref": "Router" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getRouterStatus": { - "id": "compute.routers.getRouterStatus", - "path": "{project}/regions/{region}/routers/{router}/getRouterStatus", - "httpMethod": "GET", - "description": "Retrieves runtime information of the specified router.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "router": { - "type": "string", - "description": "Name of the Router resource to query.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "router" - ], - "response": { - "$ref": "RouterStatusResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.routers.insert", - "path": "{project}/regions/{region}/routers", - "httpMethod": "POST", - "description": "Creates a Router resource in the specified project and region using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "Router" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.routers.list", - "path": "{project}/regions/{region}/routers", - "httpMethod": "GET", - "description": "Retrieves a list of Router resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "RouterList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.routers.patch", - "path": "{project}/regions/{region}/routers/{router}", - "httpMethod": "PATCH", - "description": "Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "router": { - "type": "string", - "description": "Name of the Router resource to patch.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "router" - ], - "request": { - "$ref": "Router" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "preview": { - "id": "compute.routers.preview", - "path": "{project}/regions/{region}/routers/{router}/preview", - "httpMethod": "POST", - "description": "Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "router": { - "type": "string", - "description": "Name of the Router resource to query.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "router" - ], - "request": { - "$ref": "Router" - }, - "response": { - "$ref": "RoutersPreviewResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.routers.testIamPermissions", - "path": "{project}/regions/{region}/routers/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.routers.update", - "path": "{project}/regions/{region}/routers/{router}", - "httpMethod": "PUT", - "description": "Updates the specified Router resource with the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "router": { - "type": "string", - "description": "Name of the Router resource to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "router" - ], - "request": { - "$ref": "Router" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "routes": { - "methods": { - "delete": { - "id": "compute.routes.delete", - "path": "{project}/global/routes/{route}", - "httpMethod": "DELETE", - "description": "Deletes the specified Route resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "route": { - "type": "string", - "description": "Name of the Route resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "route" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.routes.get", - "path": "{project}/global/routes/{route}", - "httpMethod": "GET", - "description": "Returns the specified Route resource. Get a list of available routes by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "route": { - "type": "string", - "description": "Name of the Route resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "route" - ], - "response": { - "$ref": "Route" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.routes.insert", - "path": "{project}/global/routes", - "httpMethod": "POST", - "description": "Creates a Route resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "Route" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.routes.list", - "path": "{project}/global/routes", - "httpMethod": "GET", - "description": "Retrieves the list of Route resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "RouteList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.routes.testIamPermissions", - "path": "{project}/global/routes/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "securityPolicies": { - "methods": { - "delete": { - "id": "compute.securityPolicies.delete", - "path": "{project}/global/securityPolicies/{securityPolicy}", - "httpMethod": "DELETE", - "description": "Deletes the specified policy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "securityPolicy": { - "type": "string", - "description": "Name of the security policy to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "securityPolicy" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.securityPolicies.get", - "path": "{project}/global/securityPolicies/{securityPolicy}", - "httpMethod": "GET", - "description": "List all of the ordered rules present in a single specified policy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "securityPolicy": { - "type": "string", - "description": "Name of the security policy to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "securityPolicy" - ], - "response": { - "$ref": "SecurityPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.securityPolicies.insert", - "path": "{project}/global/securityPolicies", - "httpMethod": "POST", - "description": "Creates a new policy in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "SecurityPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.securityPolicies.list", - "path": "{project}/global/securityPolicies", - "httpMethod": "GET", - "description": "List all the policies that have been configured for the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "SecurityPoliciesList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.securityPolicies.patch", - "path": "{project}/global/securityPolicies/{securityPolicy}", - "httpMethod": "PATCH", - "description": "Patches the specified policy with the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "securityPolicy": { - "type": "string", - "description": "Name of the security policy to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "securityPolicy" - ], - "request": { - "$ref": "SecurityPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.securityPolicies.testIamPermissions", - "path": "{project}/global/securityPolicies/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "snapshots": { - "methods": { - "delete": { - "id": "compute.snapshots.delete", - "path": "{project}/global/snapshots/{snapshot}", - "httpMethod": "DELETE", - "description": "Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.\n\nFor more information, see Deleting snaphots.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "snapshot": { - "type": "string", - "description": "Name of the Snapshot resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "snapshot" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.snapshots.get", - "path": "{project}/global/snapshots/{snapshot}", - "httpMethod": "GET", - "description": "Returns the specified Snapshot resource. Get a list of available snapshots by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "snapshot": { - "type": "string", - "description": "Name of the Snapshot resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "snapshot" - ], - "response": { - "$ref": "Snapshot" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "id": "compute.snapshots.getIamPolicy", - "path": "{project}/global/snapshots/{resource}/getIamPolicy", - "httpMethod": "GET", - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.snapshots.list", - "path": "{project}/global/snapshots", - "httpMethod": "GET", - "description": "Retrieves the list of Snapshot resources contained within the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "SnapshotList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setIamPolicy": { - "id": "compute.snapshots.setIamPolicy", - "path": "{project}/global/snapshots/{resource}/setIamPolicy", - "httpMethod": "POST", - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "Policy" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "id": "compute.snapshots.setLabels", - "path": "{project}/global/snapshots/{resource}/setLabels", - "httpMethod": "POST", - "description": "Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "GlobalSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.snapshots.testIamPermissions", - "path": "{project}/global/snapshots/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "sslCertificates": { - "methods": { - "delete": { - "id": "compute.sslCertificates.delete", - "path": "{project}/global/sslCertificates/{sslCertificate}", - "httpMethod": "DELETE", - "description": "Deletes the specified SslCertificate resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "sslCertificate": { - "type": "string", - "description": "Name of the SslCertificate resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "sslCertificate" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.sslCertificates.get", - "path": "{project}/global/sslCertificates/{sslCertificate}", - "httpMethod": "GET", - "description": "Returns the specified SslCertificate resource. Get a list of available SSL certificates by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "sslCertificate": { - "type": "string", - "description": "Name of the SslCertificate resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "sslCertificate" - ], - "response": { - "$ref": "SslCertificate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.sslCertificates.insert", - "path": "{project}/global/sslCertificates", - "httpMethod": "POST", - "description": "Creates a SslCertificate resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "SslCertificate" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.sslCertificates.list", - "path": "{project}/global/sslCertificates", - "httpMethod": "GET", - "description": "Retrieves the list of SslCertificate resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "SslCertificateList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.sslCertificates.testIamPermissions", - "path": "{project}/global/sslCertificates/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "subnetworks": { - "methods": { - "aggregatedList": { - "id": "compute.subnetworks.aggregatedList", - "path": "{project}/aggregated/subnetworks", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of subnetworks.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "SubnetworkAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.subnetworks.delete", - "path": "{project}/regions/{region}/subnetworks/{subnetwork}", - "httpMethod": "DELETE", - "description": "Deletes the specified subnetwork.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "subnetwork": { - "type": "string", - "description": "Name of the Subnetwork resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "subnetwork" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "expandIpCidrRange": { - "id": "compute.subnetworks.expandIpCidrRange", - "path": "{project}/regions/{region}/subnetworks/{subnetwork}/expandIpCidrRange", - "httpMethod": "POST", - "description": "Expands the IP CIDR range of the subnetwork to a specified value.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "subnetwork": { - "type": "string", - "description": "Name of the Subnetwork resource to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "subnetwork" - ], - "request": { - "$ref": "SubnetworksExpandIpCidrRangeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.subnetworks.get", - "path": "{project}/regions/{region}/subnetworks/{subnetwork}", - "httpMethod": "GET", - "description": "Returns the specified subnetwork. Get a list of available subnetworks list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "subnetwork": { - "type": "string", - "description": "Name of the Subnetwork resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "subnetwork" - ], - "response": { - "$ref": "Subnetwork" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "id": "compute.subnetworks.getIamPolicy", - "path": "{project}/regions/{region}/subnetworks/{resource}/getIamPolicy", - "httpMethod": "GET", - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.subnetworks.insert", - "path": "{project}/regions/{region}/subnetworks", - "httpMethod": "POST", - "description": "Creates a subnetwork in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "Subnetwork" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.subnetworks.list", - "path": "{project}/regions/{region}/subnetworks", - "httpMethod": "GET", - "description": "Retrieves a list of subnetworks available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "SubnetworkList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.subnetworks.patch", - "path": "{project}/regions/{region}/subnetworks/{subnetwork}", - "httpMethod": "PATCH", - "description": "Patches the specified subnetwork with the data included in the request. Only the following fields within the subnetwork resource can be specified in the request: secondary_ip_range and allow_subnet_cidr_routes_overlap. It is also mandatory to specify the current fingeprint of the subnetwork resource being patched.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "subnetwork": { - "type": "string", - "description": "Name of the Subnetwork resource to patch.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "subnetwork" - ], - "request": { - "$ref": "Subnetwork" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setIamPolicy": { - "id": "compute.subnetworks.setIamPolicy", - "path": "{project}/regions/{region}/subnetworks/{resource}/setIamPolicy", - "httpMethod": "POST", - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "Policy" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setPrivateIpGoogleAccess": { - "id": "compute.subnetworks.setPrivateIpGoogleAccess", - "path": "{project}/regions/{region}/subnetworks/{subnetwork}/setPrivateIpGoogleAccess", - "httpMethod": "POST", - "description": "Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "subnetwork": { - "type": "string", - "description": "Name of the Subnetwork resource.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "subnetwork" - ], - "request": { - "$ref": "SubnetworksSetPrivateIpGoogleAccessRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.subnetworks.testIamPermissions", - "path": "{project}/regions/{region}/subnetworks/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "targetHttpProxies": { - "methods": { - "delete": { - "id": "compute.targetHttpProxies.delete", - "path": "{project}/global/targetHttpProxies/{targetHttpProxy}", - "httpMethod": "DELETE", - "description": "Deletes the specified TargetHttpProxy resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetHttpProxy": { - "type": "string", - "description": "Name of the TargetHttpProxy resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetHttpProxy" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.targetHttpProxies.get", - "path": "{project}/global/targetHttpProxies/{targetHttpProxy}", - "httpMethod": "GET", - "description": "Returns the specified TargetHttpProxy resource. Get a list of available target HTTP proxies by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "targetHttpProxy": { - "type": "string", - "description": "Name of the TargetHttpProxy resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetHttpProxy" - ], - "response": { - "$ref": "TargetHttpProxy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.targetHttpProxies.insert", - "path": "{project}/global/targetHttpProxies", - "httpMethod": "POST", - "description": "Creates a TargetHttpProxy resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "TargetHttpProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.targetHttpProxies.list", - "path": "{project}/global/targetHttpProxies", - "httpMethod": "GET", - "description": "Retrieves the list of TargetHttpProxy resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "TargetHttpProxyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setUrlMap": { - "id": "compute.targetHttpProxies.setUrlMap", - "path": "{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap", - "httpMethod": "POST", - "description": "Changes the URL map for TargetHttpProxy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetHttpProxy": { - "type": "string", - "description": "Name of the TargetHttpProxy to set a URL map for.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetHttpProxy" - ], - "request": { - "$ref": "UrlMapReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.targetHttpProxies.testIamPermissions", - "path": "{project}/global/targetHttpProxies/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "targetHttpsProxies": { - "methods": { - "delete": { - "id": "compute.targetHttpsProxies.delete", - "path": "{project}/global/targetHttpsProxies/{targetHttpsProxy}", - "httpMethod": "DELETE", - "description": "Deletes the specified TargetHttpsProxy resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetHttpsProxy": { - "type": "string", - "description": "Name of the TargetHttpsProxy resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetHttpsProxy" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.targetHttpsProxies.get", - "path": "{project}/global/targetHttpsProxies/{targetHttpsProxy}", - "httpMethod": "GET", - "description": "Returns the specified TargetHttpsProxy resource. Get a list of available target HTTPS proxies by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "targetHttpsProxy": { - "type": "string", - "description": "Name of the TargetHttpsProxy resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetHttpsProxy" - ], - "response": { - "$ref": "TargetHttpsProxy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.targetHttpsProxies.insert", - "path": "{project}/global/targetHttpsProxies", - "httpMethod": "POST", - "description": "Creates a TargetHttpsProxy resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "TargetHttpsProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.targetHttpsProxies.list", - "path": "{project}/global/targetHttpsProxies", - "httpMethod": "GET", - "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "TargetHttpsProxyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setQuicOverride": { - "id": "compute.targetHttpsProxies.setQuicOverride", - "path": "{project}/global/targetHttpsProxies/{targetHttpsProxy}/setQuicOverride", - "httpMethod": "POST", - "description": "Sets the QUIC override policy for TargetHttpsProxy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "targetHttpsProxy": { - "type": "string", - "description": "Name of the TargetHttpsProxy resource to set the QUIC override policy for. The name should conform to RFC1035.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetHttpsProxy" - ], - "request": { - "$ref": "TargetHttpsProxiesSetQuicOverrideRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setSslCertificates": { - "id": "compute.targetHttpsProxies.setSslCertificates", - "path": "{project}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates", - "httpMethod": "POST", - "description": "Replaces SslCertificates for TargetHttpsProxy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetHttpsProxy": { - "type": "string", - "description": "Name of the TargetHttpsProxy resource to set an SslCertificates resource for.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetHttpsProxy" - ], - "request": { - "$ref": "TargetHttpsProxiesSetSslCertificatesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setUrlMap": { - "id": "compute.targetHttpsProxies.setUrlMap", - "path": "{project}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap", - "httpMethod": "POST", - "description": "Changes the URL map for TargetHttpsProxy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetHttpsProxy": { - "type": "string", - "description": "Name of the TargetHttpsProxy resource whose URL map is to be set.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetHttpsProxy" - ], - "request": { - "$ref": "UrlMapReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.targetHttpsProxies.testIamPermissions", - "path": "{project}/global/targetHttpsProxies/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "targetInstances": { - "methods": { - "aggregatedList": { - "id": "compute.targetInstances.aggregatedList", - "path": "{project}/aggregated/targetInstances", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of target instances.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "TargetInstanceAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.targetInstances.delete", - "path": "{project}/zones/{zone}/targetInstances/{targetInstance}", - "httpMethod": "DELETE", - "description": "Deletes the specified TargetInstance resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetInstance": { - "type": "string", - "description": "Name of the TargetInstance resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "targetInstance" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.targetInstances.get", - "path": "{project}/zones/{zone}/targetInstances/{targetInstance}", - "httpMethod": "GET", - "description": "Returns the specified TargetInstance resource. Get a list of available target instances by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "targetInstance": { - "type": "string", - "description": "Name of the TargetInstance resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "targetInstance" - ], - "response": { - "$ref": "TargetInstance" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.targetInstances.insert", - "path": "{project}/zones/{zone}/targetInstances", - "httpMethod": "POST", - "description": "Creates a TargetInstance resource in the specified project and zone using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "Name of the zone scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "request": { - "$ref": "TargetInstance" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.targetInstances.list", - "path": "{project}/zones/{zone}/targetInstances", - "httpMethod": "GET", - "description": "Retrieves a list of TargetInstance resources available to the specified project and zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "TargetInstanceList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.targetInstances.testIamPermissions", - "path": "{project}/zones/{zone}/targetInstances/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "targetPools": { - "methods": { - "addHealthCheck": { - "id": "compute.targetPools.addHealthCheck", - "path": "{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck", - "httpMethod": "POST", - "description": "Adds health check URLs to a target pool.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetPool": { - "type": "string", - "description": "Name of the target pool to add a health check to.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "request": { - "$ref": "TargetPoolsAddHealthCheckRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "addInstance": { - "id": "compute.targetPools.addInstance", - "path": "{project}/regions/{region}/targetPools/{targetPool}/addInstance", - "httpMethod": "POST", - "description": "Adds an instance to a target pool.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetPool": { - "type": "string", - "description": "Name of the TargetPool resource to add instances to.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "request": { - "$ref": "TargetPoolsAddInstanceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "id": "compute.targetPools.aggregatedList", - "path": "{project}/aggregated/targetPools", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of target pools.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "TargetPoolAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.targetPools.delete", - "path": "{project}/regions/{region}/targetPools/{targetPool}", - "httpMethod": "DELETE", - "description": "Deletes the specified target pool.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetPool": { - "type": "string", - "description": "Name of the TargetPool resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.targetPools.get", - "path": "{project}/regions/{region}/targetPools/{targetPool}", - "httpMethod": "GET", - "description": "Returns the specified target pool. Get a list of available target pools by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "targetPool": { - "type": "string", - "description": "Name of the TargetPool resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "response": { - "$ref": "TargetPool" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getHealth": { - "id": "compute.targetPools.getHealth", - "path": "{project}/regions/{region}/targetPools/{targetPool}/getHealth", - "httpMethod": "POST", - "description": "Gets the most recent health check results for each IP for the instance that is referenced by the given target pool.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "targetPool": { - "type": "string", - "description": "Name of the TargetPool resource to which the queried instance belongs.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "request": { - "$ref": "InstanceReference" - }, - "response": { - "$ref": "TargetPoolInstanceHealth" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.targetPools.insert", - "path": "{project}/regions/{region}/targetPools", - "httpMethod": "POST", - "description": "Creates a target pool in the specified project and region using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "TargetPool" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.targetPools.list", - "path": "{project}/regions/{region}/targetPools", - "httpMethod": "GET", - "description": "Retrieves a list of target pools available to the specified project and region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "TargetPoolList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "removeHealthCheck": { - "id": "compute.targetPools.removeHealthCheck", - "path": "{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck", - "httpMethod": "POST", - "description": "Removes health check URL from a target pool.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetPool": { - "type": "string", - "description": "Name of the target pool to remove health checks from.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "request": { - "$ref": "TargetPoolsRemoveHealthCheckRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removeInstance": { - "id": "compute.targetPools.removeInstance", - "path": "{project}/regions/{region}/targetPools/{targetPool}/removeInstance", - "httpMethod": "POST", - "description": "Removes instance URL from a target pool.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetPool": { - "type": "string", - "description": "Name of the TargetPool resource to remove instances from.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "request": { - "$ref": "TargetPoolsRemoveInstanceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setBackup": { - "id": "compute.targetPools.setBackup", - "path": "{project}/regions/{region}/targetPools/{targetPool}/setBackup", - "httpMethod": "POST", - "description": "Changes a backup target pool's configurations.", - "parameters": { - "failoverRatio": { - "type": "number", - "description": "New failoverRatio value for the target pool.", - "format": "float", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetPool": { - "type": "string", - "description": "Name of the TargetPool resource to set a backup pool for.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "request": { - "$ref": "TargetReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.targetPools.testIamPermissions", - "path": "{project}/regions/{region}/targetPools/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "targetSslProxies": { - "methods": { - "delete": { - "id": "compute.targetSslProxies.delete", - "path": "{project}/global/targetSslProxies/{targetSslProxy}", - "httpMethod": "DELETE", - "description": "Deletes the specified TargetSslProxy resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetSslProxy": { - "type": "string", - "description": "Name of the TargetSslProxy resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetSslProxy" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.targetSslProxies.get", - "path": "{project}/global/targetSslProxies/{targetSslProxy}", - "httpMethod": "GET", - "description": "Returns the specified TargetSslProxy resource. Get a list of available target SSL proxies by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "targetSslProxy": { - "type": "string", - "description": "Name of the TargetSslProxy resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetSslProxy" - ], - "response": { - "$ref": "TargetSslProxy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.targetSslProxies.insert", - "path": "{project}/global/targetSslProxies", - "httpMethod": "POST", - "description": "Creates a TargetSslProxy resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "TargetSslProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.targetSslProxies.list", - "path": "{project}/global/targetSslProxies", - "httpMethod": "GET", - "description": "Retrieves the list of TargetSslProxy resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "TargetSslProxyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setBackendService": { - "id": "compute.targetSslProxies.setBackendService", - "path": "{project}/global/targetSslProxies/{targetSslProxy}/setBackendService", - "httpMethod": "POST", - "description": "Changes the BackendService for TargetSslProxy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetSslProxy": { - "type": "string", - "description": "Name of the TargetSslProxy resource whose BackendService resource is to be set.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetSslProxy" - ], - "request": { - "$ref": "TargetSslProxiesSetBackendServiceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setProxyHeader": { - "id": "compute.targetSslProxies.setProxyHeader", - "path": "{project}/global/targetSslProxies/{targetSslProxy}/setProxyHeader", - "httpMethod": "POST", - "description": "Changes the ProxyHeaderType for TargetSslProxy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetSslProxy": { - "type": "string", - "description": "Name of the TargetSslProxy resource whose ProxyHeader is to be set.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetSslProxy" - ], - "request": { - "$ref": "TargetSslProxiesSetProxyHeaderRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setSslCertificates": { - "id": "compute.targetSslProxies.setSslCertificates", - "path": "{project}/global/targetSslProxies/{targetSslProxy}/setSslCertificates", - "httpMethod": "POST", - "description": "Changes SslCertificates for TargetSslProxy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetSslProxy": { - "type": "string", - "description": "Name of the TargetSslProxy resource whose SslCertificate resource is to be set.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetSslProxy" - ], - "request": { - "$ref": "TargetSslProxiesSetSslCertificatesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.targetSslProxies.testIamPermissions", - "path": "{project}/global/targetSslProxies/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "targetTcpProxies": { - "methods": { - "delete": { - "id": "compute.targetTcpProxies.delete", - "path": "{project}/global/targetTcpProxies/{targetTcpProxy}", - "httpMethod": "DELETE", - "description": "Deletes the specified TargetTcpProxy resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetTcpProxy": { - "type": "string", - "description": "Name of the TargetTcpProxy resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetTcpProxy" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.targetTcpProxies.get", - "path": "{project}/global/targetTcpProxies/{targetTcpProxy}", - "httpMethod": "GET", - "description": "Returns the specified TargetTcpProxy resource. Get a list of available target TCP proxies by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "targetTcpProxy": { - "type": "string", - "description": "Name of the TargetTcpProxy resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetTcpProxy" - ], - "response": { - "$ref": "TargetTcpProxy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.targetTcpProxies.insert", - "path": "{project}/global/targetTcpProxies", - "httpMethod": "POST", - "description": "Creates a TargetTcpProxy resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "TargetTcpProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.targetTcpProxies.list", - "path": "{project}/global/targetTcpProxies", - "httpMethod": "GET", - "description": "Retrieves the list of TargetTcpProxy resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "TargetTcpProxyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setBackendService": { - "id": "compute.targetTcpProxies.setBackendService", - "path": "{project}/global/targetTcpProxies/{targetTcpProxy}/setBackendService", - "httpMethod": "POST", - "description": "Changes the BackendService for TargetTcpProxy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetTcpProxy": { - "type": "string", - "description": "Name of the TargetTcpProxy resource whose BackendService resource is to be set.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetTcpProxy" - ], - "request": { - "$ref": "TargetTcpProxiesSetBackendServiceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setProxyHeader": { - "id": "compute.targetTcpProxies.setProxyHeader", - "path": "{project}/global/targetTcpProxies/{targetTcpProxy}/setProxyHeader", - "httpMethod": "POST", - "description": "Changes the ProxyHeaderType for TargetTcpProxy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetTcpProxy": { - "type": "string", - "description": "Name of the TargetTcpProxy resource whose ProxyHeader is to be set.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetTcpProxy" - ], - "request": { - "$ref": "TargetTcpProxiesSetProxyHeaderRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.targetTcpProxies.testIamPermissions", - "path": "{project}/global/targetTcpProxies/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "targetVpnGateways": { - "methods": { - "aggregatedList": { - "id": "compute.targetVpnGateways.aggregatedList", - "path": "{project}/aggregated/targetVpnGateways", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of target VPN gateways.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "TargetVpnGatewayAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.targetVpnGateways.delete", - "path": "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}", - "httpMethod": "DELETE", - "description": "Deletes the specified target VPN gateway.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetVpnGateway": { - "type": "string", - "description": "Name of the target VPN gateway to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "targetVpnGateway" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.targetVpnGateways.get", - "path": "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}", - "httpMethod": "GET", - "description": "Returns the specified target VPN gateway. Get a list of available target VPN gateways by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "targetVpnGateway": { - "type": "string", - "description": "Name of the target VPN gateway to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "targetVpnGateway" - ], - "response": { - "$ref": "TargetVpnGateway" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.targetVpnGateways.insert", - "path": "{project}/regions/{region}/targetVpnGateways", - "httpMethod": "POST", - "description": "Creates a target VPN gateway in the specified project and region using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "TargetVpnGateway" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.targetVpnGateways.list", - "path": "{project}/regions/{region}/targetVpnGateways", - "httpMethod": "GET", - "description": "Retrieves a list of target VPN gateways available to the specified project and region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "TargetVpnGatewayList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.targetVpnGateways.testIamPermissions", - "path": "{project}/regions/{region}/targetVpnGateways/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "urlMaps": { - "methods": { - "delete": { - "id": "compute.urlMaps.delete", - "path": "{project}/global/urlMaps/{urlMap}", - "httpMethod": "DELETE", - "description": "Deletes the specified UrlMap resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "urlMap": { - "type": "string", - "description": "Name of the UrlMap resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "urlMap" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.urlMaps.get", - "path": "{project}/global/urlMaps/{urlMap}", - "httpMethod": "GET", - "description": "Returns the specified UrlMap resource. Get a list of available URL maps by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "urlMap": { - "type": "string", - "description": "Name of the UrlMap resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "urlMap" - ], - "response": { - "$ref": "UrlMap" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.urlMaps.insert", - "path": "{project}/global/urlMaps", - "httpMethod": "POST", - "description": "Creates a UrlMap resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "UrlMap" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "invalidateCache": { - "id": "compute.urlMaps.invalidateCache", - "path": "{project}/global/urlMaps/{urlMap}/invalidateCache", - "httpMethod": "POST", - "description": "Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "urlMap": { - "type": "string", - "description": "Name of the UrlMap scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "urlMap" - ], - "request": { - "$ref": "CacheInvalidationRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.urlMaps.list", - "path": "{project}/global/urlMaps", - "httpMethod": "GET", - "description": "Retrieves the list of UrlMap resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "UrlMapList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.urlMaps.patch", - "path": "{project}/global/urlMaps/{urlMap}", - "httpMethod": "PATCH", - "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "urlMap": { - "type": "string", - "description": "Name of the UrlMap resource to patch.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "urlMap" - ], - "request": { - "$ref": "UrlMap" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.urlMaps.testIamPermissions", - "path": "{project}/global/urlMaps/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.urlMaps.update", - "path": "{project}/global/urlMaps/{urlMap}", - "httpMethod": "PUT", - "description": "Updates the specified UrlMap resource with the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "urlMap": { - "type": "string", - "description": "Name of the UrlMap resource to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "urlMap" - ], - "request": { - "$ref": "UrlMap" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "validate": { - "id": "compute.urlMaps.validate", - "path": "{project}/global/urlMaps/{urlMap}/validate", - "httpMethod": "POST", - "description": "Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "urlMap": { - "type": "string", - "description": "Name of the UrlMap resource to be validated as.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "urlMap" - ], - "request": { - "$ref": "UrlMapsValidateRequest" - }, - "response": { - "$ref": "UrlMapsValidateResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "vpnTunnels": { - "methods": { - "aggregatedList": { - "id": "compute.vpnTunnels.aggregatedList", - "path": "{project}/aggregated/vpnTunnels", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of VPN tunnels.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "VpnTunnelAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.vpnTunnels.delete", - "path": "{project}/regions/{region}/vpnTunnels/{vpnTunnel}", - "httpMethod": "DELETE", - "description": "Deletes the specified VpnTunnel resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "vpnTunnel": { - "type": "string", - "description": "Name of the VpnTunnel resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "vpnTunnel" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.vpnTunnels.get", - "path": "{project}/regions/{region}/vpnTunnels/{vpnTunnel}", - "httpMethod": "GET", - "description": "Returns the specified VpnTunnel resource. Get a list of available VPN tunnels by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "vpnTunnel": { - "type": "string", - "description": "Name of the VpnTunnel resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "vpnTunnel" - ], - "response": { - "$ref": "VpnTunnel" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.vpnTunnels.insert", - "path": "{project}/regions/{region}/vpnTunnels", - "httpMethod": "POST", - "description": "Creates a VpnTunnel resource in the specified project and region using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "VpnTunnel" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.vpnTunnels.list", - "path": "{project}/regions/{region}/vpnTunnels", - "httpMethod": "GET", - "description": "Retrieves a list of VpnTunnel resources contained in the specified project and region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "VpnTunnelList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setLabels": { - "id": "compute.vpnTunnels.setLabels", - "path": "{project}/regions/{region}/vpnTunnels/{resource}/setLabels", - "httpMethod": "POST", - "description": "Sets the labels on a VpnTunnel. To learn more about labels, read the Labeling Resources documentation.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "RegionSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.vpnTunnels.testIamPermissions", - "path": "{project}/regions/{region}/vpnTunnels/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "zoneOperations": { - "methods": { - "delete": { - "id": "compute.zoneOperations.delete", - "path": "{project}/zones/{zone}/operations/{operation}", - "httpMethod": "DELETE", - "description": "Deletes the specified zone-specific Operations resource.", - "parameters": { - "operation": { - "type": "string", - "description": "Name of the Operations resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "operation" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.zoneOperations.get", - "path": "{project}/zones/{zone}/operations/{operation}", - "httpMethod": "GET", - "description": "Retrieves the specified zone-specific Operations resource.", - "parameters": { - "operation": { - "type": "string", - "description": "Name of the Operations resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "operation" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.zoneOperations.list", - "path": "{project}/zones/{zone}/operations", - "httpMethod": "GET", - "description": "Retrieves a list of Operation resources contained within the specified zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone for request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "OperationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "zones": { - "methods": { - "get": { - "id": "compute.zones.get", - "path": "{project}/zones/{zone}", - "httpMethod": "GET", - "description": "Returns the specified Zone resource. Get a list of available zones by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "Zone" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.zones.list", - "path": "{project}/zones", - "httpMethod": "GET", - "description": "Retrieves the list of Zone resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "ZoneList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - } - } -} diff --git a/vendor/google.golang.org/api/compute/v0.alpha/compute-gen.go b/vendor/google.golang.org/api/compute/v0.alpha/compute-gen.go deleted file mode 100644 index f44bc995f..000000000 --- a/vendor/google.golang.org/api/compute/v0.alpha/compute-gen.go +++ /dev/null @@ -1,98380 +0,0 @@ -// Package compute provides access to the Compute Engine API. -// -// See https://developers.google.com/compute/docs/reference/latest/ -// -// Usage example: -// -// import "google.golang.org/api/compute/v0.alpha" -// ... -// computeService, err := compute.New(oauthHttpClient) -package compute - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" - "io" - "net/http" - "net/url" - "strconv" - "strings" -) - -// Always reference these packages, just in case the auto-generated code -// below doesn't. -var _ = bytes.NewBuffer -var _ = strconv.Itoa -var _ = fmt.Sprintf -var _ = json.NewDecoder -var _ = io.Copy -var _ = url.Parse -var _ = gensupport.MarshalJSON -var _ = googleapi.Version -var _ = errors.New -var _ = strings.Replace -var _ = context.Canceled -var _ = ctxhttp.Do - -const apiId = "compute:alpha" -const apiName = "compute" -const apiVersion = "alpha" -const basePath = "https://www.googleapis.com/compute/alpha/projects/" - -// OAuth2 scopes used by this API. -const ( - // View and manage your data across Google Cloud Platform services - CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" - - // View and manage your Google Compute Engine resources - ComputeScope = "https://www.googleapis.com/auth/compute" - - // View your Google Compute Engine resources - ComputeReadonlyScope = "https://www.googleapis.com/auth/compute.readonly" - - // Manage your data and permissions in Google Cloud Storage - DevstorageFullControlScope = "https://www.googleapis.com/auth/devstorage.full_control" - - // View your data in Google Cloud Storage - DevstorageReadOnlyScope = "https://www.googleapis.com/auth/devstorage.read_only" - - // Manage your data in Google Cloud Storage - DevstorageReadWriteScope = "https://www.googleapis.com/auth/devstorage.read_write" -) - -func New(client *http.Client) (*Service, error) { - if client == nil { - return nil, errors.New("client is nil") - } - s := &Service{client: client, BasePath: basePath} - s.AcceleratorTypes = NewAcceleratorTypesService(s) - s.Addresses = NewAddressesService(s) - s.Autoscalers = NewAutoscalersService(s) - s.BackendBuckets = NewBackendBucketsService(s) - s.BackendServices = NewBackendServicesService(s) - s.ClientSslPolicies = NewClientSslPoliciesService(s) - s.DiskTypes = NewDiskTypesService(s) - s.Disks = NewDisksService(s) - s.Firewalls = NewFirewallsService(s) - s.ForwardingRules = NewForwardingRulesService(s) - s.GlobalAddresses = NewGlobalAddressesService(s) - s.GlobalForwardingRules = NewGlobalForwardingRulesService(s) - s.GlobalOperations = NewGlobalOperationsService(s) - s.HealthChecks = NewHealthChecksService(s) - s.HostTypes = NewHostTypesService(s) - s.Hosts = NewHostsService(s) - s.HttpHealthChecks = NewHttpHealthChecksService(s) - s.HttpsHealthChecks = NewHttpsHealthChecksService(s) - s.Images = NewImagesService(s) - s.InstanceGroupManagers = NewInstanceGroupManagersService(s) - s.InstanceGroups = NewInstanceGroupsService(s) - s.InstanceTemplates = NewInstanceTemplatesService(s) - s.Instances = NewInstancesService(s) - s.InterconnectAttachments = NewInterconnectAttachmentsService(s) - s.InterconnectLocations = NewInterconnectLocationsService(s) - s.Interconnects = NewInterconnectsService(s) - s.Licenses = NewLicensesService(s) - s.MachineTypes = NewMachineTypesService(s) - s.Networks = NewNetworksService(s) - s.Projects = NewProjectsService(s) - s.RegionAutoscalers = NewRegionAutoscalersService(s) - s.RegionBackendServices = NewRegionBackendServicesService(s) - s.RegionCommitments = NewRegionCommitmentsService(s) - s.RegionDiskTypes = NewRegionDiskTypesService(s) - s.RegionDisks = NewRegionDisksService(s) - s.RegionInstanceGroupManagers = NewRegionInstanceGroupManagersService(s) - s.RegionInstanceGroups = NewRegionInstanceGroupsService(s) - s.RegionOperations = NewRegionOperationsService(s) - s.Regions = NewRegionsService(s) - s.Routers = NewRoutersService(s) - s.Routes = NewRoutesService(s) - s.SecurityPolicies = NewSecurityPoliciesService(s) - s.Snapshots = NewSnapshotsService(s) - s.SslCertificates = NewSslCertificatesService(s) - s.Subnetworks = NewSubnetworksService(s) - s.TargetHttpProxies = NewTargetHttpProxiesService(s) - s.TargetHttpsProxies = NewTargetHttpsProxiesService(s) - s.TargetInstances = NewTargetInstancesService(s) - s.TargetPools = NewTargetPoolsService(s) - s.TargetSslProxies = NewTargetSslProxiesService(s) - s.TargetTcpProxies = NewTargetTcpProxiesService(s) - s.TargetVpnGateways = NewTargetVpnGatewaysService(s) - s.UrlMaps = NewUrlMapsService(s) - s.VpnTunnels = NewVpnTunnelsService(s) - s.ZoneOperations = NewZoneOperationsService(s) - s.Zones = NewZonesService(s) - return s, nil -} - -type Service struct { - client *http.Client - BasePath string // API endpoint base URL - UserAgent string // optional additional User-Agent fragment - - AcceleratorTypes *AcceleratorTypesService - - Addresses *AddressesService - - Autoscalers *AutoscalersService - - BackendBuckets *BackendBucketsService - - BackendServices *BackendServicesService - - ClientSslPolicies *ClientSslPoliciesService - - DiskTypes *DiskTypesService - - Disks *DisksService - - Firewalls *FirewallsService - - ForwardingRules *ForwardingRulesService - - GlobalAddresses *GlobalAddressesService - - GlobalForwardingRules *GlobalForwardingRulesService - - GlobalOperations *GlobalOperationsService - - HealthChecks *HealthChecksService - - HostTypes *HostTypesService - - Hosts *HostsService - - HttpHealthChecks *HttpHealthChecksService - - HttpsHealthChecks *HttpsHealthChecksService - - Images *ImagesService - - InstanceGroupManagers *InstanceGroupManagersService - - InstanceGroups *InstanceGroupsService - - InstanceTemplates *InstanceTemplatesService - - Instances *InstancesService - - InterconnectAttachments *InterconnectAttachmentsService - - InterconnectLocations *InterconnectLocationsService - - Interconnects *InterconnectsService - - Licenses *LicensesService - - MachineTypes *MachineTypesService - - Networks *NetworksService - - Projects *ProjectsService - - RegionAutoscalers *RegionAutoscalersService - - RegionBackendServices *RegionBackendServicesService - - RegionCommitments *RegionCommitmentsService - - RegionDiskTypes *RegionDiskTypesService - - RegionDisks *RegionDisksService - - RegionInstanceGroupManagers *RegionInstanceGroupManagersService - - RegionInstanceGroups *RegionInstanceGroupsService - - RegionOperations *RegionOperationsService - - Regions *RegionsService - - Routers *RoutersService - - Routes *RoutesService - - SecurityPolicies *SecurityPoliciesService - - Snapshots *SnapshotsService - - SslCertificates *SslCertificatesService - - Subnetworks *SubnetworksService - - TargetHttpProxies *TargetHttpProxiesService - - TargetHttpsProxies *TargetHttpsProxiesService - - TargetInstances *TargetInstancesService - - TargetPools *TargetPoolsService - - TargetSslProxies *TargetSslProxiesService - - TargetTcpProxies *TargetTcpProxiesService - - TargetVpnGateways *TargetVpnGatewaysService - - UrlMaps *UrlMapsService - - VpnTunnels *VpnTunnelsService - - ZoneOperations *ZoneOperationsService - - Zones *ZonesService -} - -func (s *Service) userAgent() string { - if s.UserAgent == "" { - return googleapi.UserAgent - } - return googleapi.UserAgent + " " + s.UserAgent -} - -func NewAcceleratorTypesService(s *Service) *AcceleratorTypesService { - rs := &AcceleratorTypesService{s: s} - return rs -} - -type AcceleratorTypesService struct { - s *Service -} - -func NewAddressesService(s *Service) *AddressesService { - rs := &AddressesService{s: s} - return rs -} - -type AddressesService struct { - s *Service -} - -func NewAutoscalersService(s *Service) *AutoscalersService { - rs := &AutoscalersService{s: s} - return rs -} - -type AutoscalersService struct { - s *Service -} - -func NewBackendBucketsService(s *Service) *BackendBucketsService { - rs := &BackendBucketsService{s: s} - return rs -} - -type BackendBucketsService struct { - s *Service -} - -func NewBackendServicesService(s *Service) *BackendServicesService { - rs := &BackendServicesService{s: s} - return rs -} - -type BackendServicesService struct { - s *Service -} - -func NewClientSslPoliciesService(s *Service) *ClientSslPoliciesService { - rs := &ClientSslPoliciesService{s: s} - return rs -} - -type ClientSslPoliciesService struct { - s *Service -} - -func NewDiskTypesService(s *Service) *DiskTypesService { - rs := &DiskTypesService{s: s} - return rs -} - -type DiskTypesService struct { - s *Service -} - -func NewDisksService(s *Service) *DisksService { - rs := &DisksService{s: s} - return rs -} - -type DisksService struct { - s *Service -} - -func NewFirewallsService(s *Service) *FirewallsService { - rs := &FirewallsService{s: s} - return rs -} - -type FirewallsService struct { - s *Service -} - -func NewForwardingRulesService(s *Service) *ForwardingRulesService { - rs := &ForwardingRulesService{s: s} - return rs -} - -type ForwardingRulesService struct { - s *Service -} - -func NewGlobalAddressesService(s *Service) *GlobalAddressesService { - rs := &GlobalAddressesService{s: s} - return rs -} - -type GlobalAddressesService struct { - s *Service -} - -func NewGlobalForwardingRulesService(s *Service) *GlobalForwardingRulesService { - rs := &GlobalForwardingRulesService{s: s} - return rs -} - -type GlobalForwardingRulesService struct { - s *Service -} - -func NewGlobalOperationsService(s *Service) *GlobalOperationsService { - rs := &GlobalOperationsService{s: s} - return rs -} - -type GlobalOperationsService struct { - s *Service -} - -func NewHealthChecksService(s *Service) *HealthChecksService { - rs := &HealthChecksService{s: s} - return rs -} - -type HealthChecksService struct { - s *Service -} - -func NewHostTypesService(s *Service) *HostTypesService { - rs := &HostTypesService{s: s} - return rs -} - -type HostTypesService struct { - s *Service -} - -func NewHostsService(s *Service) *HostsService { - rs := &HostsService{s: s} - return rs -} - -type HostsService struct { - s *Service -} - -func NewHttpHealthChecksService(s *Service) *HttpHealthChecksService { - rs := &HttpHealthChecksService{s: s} - return rs -} - -type HttpHealthChecksService struct { - s *Service -} - -func NewHttpsHealthChecksService(s *Service) *HttpsHealthChecksService { - rs := &HttpsHealthChecksService{s: s} - return rs -} - -type HttpsHealthChecksService struct { - s *Service -} - -func NewImagesService(s *Service) *ImagesService { - rs := &ImagesService{s: s} - return rs -} - -type ImagesService struct { - s *Service -} - -func NewInstanceGroupManagersService(s *Service) *InstanceGroupManagersService { - rs := &InstanceGroupManagersService{s: s} - return rs -} - -type InstanceGroupManagersService struct { - s *Service -} - -func NewInstanceGroupsService(s *Service) *InstanceGroupsService { - rs := &InstanceGroupsService{s: s} - return rs -} - -type InstanceGroupsService struct { - s *Service -} - -func NewInstanceTemplatesService(s *Service) *InstanceTemplatesService { - rs := &InstanceTemplatesService{s: s} - return rs -} - -type InstanceTemplatesService struct { - s *Service -} - -func NewInstancesService(s *Service) *InstancesService { - rs := &InstancesService{s: s} - return rs -} - -type InstancesService struct { - s *Service -} - -func NewInterconnectAttachmentsService(s *Service) *InterconnectAttachmentsService { - rs := &InterconnectAttachmentsService{s: s} - return rs -} - -type InterconnectAttachmentsService struct { - s *Service -} - -func NewInterconnectLocationsService(s *Service) *InterconnectLocationsService { - rs := &InterconnectLocationsService{s: s} - return rs -} - -type InterconnectLocationsService struct { - s *Service -} - -func NewInterconnectsService(s *Service) *InterconnectsService { - rs := &InterconnectsService{s: s} - return rs -} - -type InterconnectsService struct { - s *Service -} - -func NewLicensesService(s *Service) *LicensesService { - rs := &LicensesService{s: s} - return rs -} - -type LicensesService struct { - s *Service -} - -func NewMachineTypesService(s *Service) *MachineTypesService { - rs := &MachineTypesService{s: s} - return rs -} - -type MachineTypesService struct { - s *Service -} - -func NewNetworksService(s *Service) *NetworksService { - rs := &NetworksService{s: s} - return rs -} - -type NetworksService struct { - s *Service -} - -func NewProjectsService(s *Service) *ProjectsService { - rs := &ProjectsService{s: s} - return rs -} - -type ProjectsService struct { - s *Service -} - -func NewRegionAutoscalersService(s *Service) *RegionAutoscalersService { - rs := &RegionAutoscalersService{s: s} - return rs -} - -type RegionAutoscalersService struct { - s *Service -} - -func NewRegionBackendServicesService(s *Service) *RegionBackendServicesService { - rs := &RegionBackendServicesService{s: s} - return rs -} - -type RegionBackendServicesService struct { - s *Service -} - -func NewRegionCommitmentsService(s *Service) *RegionCommitmentsService { - rs := &RegionCommitmentsService{s: s} - return rs -} - -type RegionCommitmentsService struct { - s *Service -} - -func NewRegionDiskTypesService(s *Service) *RegionDiskTypesService { - rs := &RegionDiskTypesService{s: s} - return rs -} - -type RegionDiskTypesService struct { - s *Service -} - -func NewRegionDisksService(s *Service) *RegionDisksService { - rs := &RegionDisksService{s: s} - return rs -} - -type RegionDisksService struct { - s *Service -} - -func NewRegionInstanceGroupManagersService(s *Service) *RegionInstanceGroupManagersService { - rs := &RegionInstanceGroupManagersService{s: s} - return rs -} - -type RegionInstanceGroupManagersService struct { - s *Service -} - -func NewRegionInstanceGroupsService(s *Service) *RegionInstanceGroupsService { - rs := &RegionInstanceGroupsService{s: s} - return rs -} - -type RegionInstanceGroupsService struct { - s *Service -} - -func NewRegionOperationsService(s *Service) *RegionOperationsService { - rs := &RegionOperationsService{s: s} - return rs -} - -type RegionOperationsService struct { - s *Service -} - -func NewRegionsService(s *Service) *RegionsService { - rs := &RegionsService{s: s} - return rs -} - -type RegionsService struct { - s *Service -} - -func NewRoutersService(s *Service) *RoutersService { - rs := &RoutersService{s: s} - return rs -} - -type RoutersService struct { - s *Service -} - -func NewRoutesService(s *Service) *RoutesService { - rs := &RoutesService{s: s} - return rs -} - -type RoutesService struct { - s *Service -} - -func NewSecurityPoliciesService(s *Service) *SecurityPoliciesService { - rs := &SecurityPoliciesService{s: s} - return rs -} - -type SecurityPoliciesService struct { - s *Service -} - -func NewSnapshotsService(s *Service) *SnapshotsService { - rs := &SnapshotsService{s: s} - return rs -} - -type SnapshotsService struct { - s *Service -} - -func NewSslCertificatesService(s *Service) *SslCertificatesService { - rs := &SslCertificatesService{s: s} - return rs -} - -type SslCertificatesService struct { - s *Service -} - -func NewSubnetworksService(s *Service) *SubnetworksService { - rs := &SubnetworksService{s: s} - return rs -} - -type SubnetworksService struct { - s *Service -} - -func NewTargetHttpProxiesService(s *Service) *TargetHttpProxiesService { - rs := &TargetHttpProxiesService{s: s} - return rs -} - -type TargetHttpProxiesService struct { - s *Service -} - -func NewTargetHttpsProxiesService(s *Service) *TargetHttpsProxiesService { - rs := &TargetHttpsProxiesService{s: s} - return rs -} - -type TargetHttpsProxiesService struct { - s *Service -} - -func NewTargetInstancesService(s *Service) *TargetInstancesService { - rs := &TargetInstancesService{s: s} - return rs -} - -type TargetInstancesService struct { - s *Service -} - -func NewTargetPoolsService(s *Service) *TargetPoolsService { - rs := &TargetPoolsService{s: s} - return rs -} - -type TargetPoolsService struct { - s *Service -} - -func NewTargetSslProxiesService(s *Service) *TargetSslProxiesService { - rs := &TargetSslProxiesService{s: s} - return rs -} - -type TargetSslProxiesService struct { - s *Service -} - -func NewTargetTcpProxiesService(s *Service) *TargetTcpProxiesService { - rs := &TargetTcpProxiesService{s: s} - return rs -} - -type TargetTcpProxiesService struct { - s *Service -} - -func NewTargetVpnGatewaysService(s *Service) *TargetVpnGatewaysService { - rs := &TargetVpnGatewaysService{s: s} - return rs -} - -type TargetVpnGatewaysService struct { - s *Service -} - -func NewUrlMapsService(s *Service) *UrlMapsService { - rs := &UrlMapsService{s: s} - return rs -} - -type UrlMapsService struct { - s *Service -} - -func NewVpnTunnelsService(s *Service) *VpnTunnelsService { - rs := &VpnTunnelsService{s: s} - return rs -} - -type VpnTunnelsService struct { - s *Service -} - -func NewZoneOperationsService(s *Service) *ZoneOperationsService { - rs := &ZoneOperationsService{s: s} - return rs -} - -type ZoneOperationsService struct { - s *Service -} - -func NewZonesService(s *Service) *ZonesService { - rs := &ZonesService{s: s} - return rs -} - -type ZonesService struct { - s *Service -} - -// AcceleratorConfig: A specification of the type and number of -// accelerator cards attached to the instance. -type AcceleratorConfig struct { - // AcceleratorCount: The number of the guest accelerator cards exposed - // to this instance. - AcceleratorCount int64 `json:"acceleratorCount,omitempty"` - - // AcceleratorType: Full or partial URL of the accelerator type resource - // to expose to this instance. - AcceleratorType string `json:"acceleratorType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AcceleratorCount") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AcceleratorCount") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AcceleratorConfig) MarshalJSON() ([]byte, error) { - type noMethod AcceleratorConfig - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AcceleratorType: An Accelerator Type resource. -type AcceleratorType struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Deprecated: [Output Only] The deprecation status associated with this - // accelerator type. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - - // Description: [Output Only] An optional textual description of the - // resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] The type of the resource. Always - // compute#acceleratorType for accelerator types. - Kind string `json:"kind,omitempty"` - - // MaximumCardsPerInstance: [Output Only] Maximum accelerator cards - // allowed per instance. - MaximumCardsPerInstance int64 `json:"maximumCardsPerInstance,omitempty"` - - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - - // Zone: [Output Only] The name of the zone where the accelerator type - // resides, such as us-central1-a. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AcceleratorType) MarshalJSON() ([]byte, error) { - type noMethod AcceleratorType - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AcceleratorTypeAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of AcceleratorTypesScopedList resources. - Items map[string]AcceleratorTypesScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#acceleratorTypeAggregatedList for aggregated lists of - // accelerator types. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AcceleratorTypeAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod AcceleratorTypeAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AcceleratorTypeList: Contains a list of accelerator types. -type AcceleratorTypeList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of AcceleratorType resources. - Items []*AcceleratorType `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#acceleratorTypeList for lists of accelerator types. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AcceleratorTypeList) MarshalJSON() ([]byte, error) { - type noMethod AcceleratorTypeList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AcceleratorTypesScopedList struct { - // AcceleratorTypes: [Output Only] List of accelerator types contained - // in this scope. - AcceleratorTypes []*AcceleratorType `json:"acceleratorTypes,omitempty"` - - // Warning: [Output Only] An informational warning that appears when the - // accelerator types list is empty. - Warning *AcceleratorTypesScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AcceleratorTypes") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AcceleratorTypes") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AcceleratorTypesScopedList) MarshalJSON() ([]byte, error) { - type noMethod AcceleratorTypesScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AcceleratorTypesScopedListWarning: [Output Only] An informational -// warning that appears when the accelerator types list is empty. -type AcceleratorTypesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*AcceleratorTypesScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AcceleratorTypesScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod AcceleratorTypesScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AcceleratorTypesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AcceleratorTypesScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod AcceleratorTypesScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AccessConfig: An access configuration attached to an instance's -// network interface. Only one access config per instance is supported. -type AccessConfig struct { - // Kind: [Output Only] Type of the resource. Always compute#accessConfig - // for access configs. - Kind string `json:"kind,omitempty"` - - // Name: The name of this access configuration. The default and - // recommended name is External NAT but you can use any arbitrary string - // you would like. For example, My external IP or Network Access. - Name string `json:"name,omitempty"` - - // NatIP: An external IP address associated with this instance. Specify - // an unused static external IP address available to the project or - // leave this field undefined to use an IP from a shared ephemeral IP - // address pool. If you specify a static external IP address, it must - // live in the same region as the zone of the instance. - NatIP string `json:"natIP,omitempty"` - - // NetworkTier: This signifies the networking tier used for configuring - // this access configuration and can only take the following values: - // PREMIUM, STANDARD. - // - // If an AccessConfig is specified without a valid external IP address, - // an ephemeral IP will be created with this networkTier. - // - // If an AccessConfig with a valid external IP address is specified, it - // must match that of the networkTier associated with the Address - // resource owning that IP. - // - // Possible values: - // "PREMIUM" - // "SELECT" - // "STANDARD" - NetworkTier string `json:"networkTier,omitempty"` - - // PublicDnsName: [Output Only] The public DNS domain name for the - // instance. - PublicDnsName string `json:"publicDnsName,omitempty"` - - // PublicPtrDomainName: The DNS domain name for the public PTR record. - // This field can only be set when the set_public_ptr field is enabled. - PublicPtrDomainName string `json:"publicPtrDomainName,omitempty"` - - // SetPublicDns: Specifies whether a public DNS ?A? record should be - // created for the external IP address of this access configuration. - SetPublicDns bool `json:"setPublicDns,omitempty"` - - // SetPublicPtr: Specifies whether a public DNS ?PTR? record should be - // created to map the external IP address of the instance to a DNS - // domain name. - SetPublicPtr bool `json:"setPublicPtr,omitempty"` - - // Type: The type of configuration. The default and only option is - // ONE_TO_ONE_NAT. - // - // Possible values: - // "ONE_TO_ONE_NAT" (default) - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Kind") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Kind") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AccessConfig) MarshalJSON() ([]byte, error) { - type noMethod AccessConfig - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Address: A reserved address resource. -type Address struct { - // Address: The static external IP address represented by this resource. - Address string `json:"address,omitempty"` - - // AddressType: The type of address to reserve. If unspecified, defaults - // to EXTERNAL. - // - // Possible values: - // "DNS_FORWARDING" - // "EXTERNAL" - // "INTERNAL" - // "UNSPECIFIED_TYPE" - AddressType string `json:"addressType,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // IpVersion: The IP Version that will be used by this address. Valid - // options are IPV4 or IPV6. This can only be specified for a global - // address. - // - // Possible values: - // "IPV4" - // "IPV6" - // "UNSPECIFIED_VERSION" - IpVersion string `json:"ipVersion,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#address for - // addresses. - Kind string `json:"kind,omitempty"` - - // LabelFingerprint: A fingerprint for the labels being applied to this - // Address, which is essentially a hash of the labels set used for - // optimistic locking. The fingerprint is initially generated by Compute - // Engine and changes after every request to modify or update labels. - // You must always provide an up-to-date fingerprint hash in order to - // update or change labels. - // - // To see the latest fingerprint, make a get() request to retrieve an - // Address. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // Labels: Labels to apply to this Address resource. These can be later - // modified by the setLabels method. Each label key/value must comply - // with RFC1035. Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // NetworkTier: This signifies the networking tier used for configuring - // this Address and can only take the following values: PREMIUM , - // STANDARD. - // - // If this field is not specified, it is assumed to be PREMIUM. - // - // Possible values: - // "PREMIUM" - // "SELECT" - // "STANDARD" - NetworkTier string `json:"networkTier,omitempty"` - - // Region: [Output Only] URL of the region where the regional address - // resides. This field is not applicable to global addresses. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Status: [Output Only] The status of the address, which can be either - // IN_USE or RESERVED. An address that is RESERVED is currently reserved - // and available to use. An IN_USE address is currently being used by - // another resource and is not available. - // - // Possible values: - // "IN_USE" - // "RESERVED" - Status string `json:"status,omitempty"` - - // Subnetwork: For external addresses, this field should not be - // used. - // - // The URL of the subnetwork in which to reserve the address. If an IP - // address is specified, it must be within the subnetwork's IP range. - Subnetwork string `json:"subnetwork,omitempty"` - - // Users: [Output Only] The URLs of the resources that are using this - // address. - Users []string `json:"users,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Address") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Address") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Address) MarshalJSON() ([]byte, error) { - type noMethod Address - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AddressAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of AddressesScopedList resources. - Items map[string]AddressesScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#addressAggregatedList for aggregated lists of addresses. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AddressAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod AddressAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AddressList: Contains a list of addresses. -type AddressList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Address resources. - Items []*Address `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#addressList for - // lists of addresses. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AddressList) MarshalJSON() ([]byte, error) { - type noMethod AddressList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AddressesScopedList struct { - // Addresses: [Output Only] List of addresses contained in this scope. - Addresses []*Address `json:"addresses,omitempty"` - - // Warning: [Output Only] Informational warning which replaces the list - // of addresses when the list is empty. - Warning *AddressesScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Addresses") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Addresses") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AddressesScopedList) MarshalJSON() ([]byte, error) { - type noMethod AddressesScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AddressesScopedListWarning: [Output Only] Informational warning which -// replaces the list of addresses when the list is empty. -type AddressesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*AddressesScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AddressesScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod AddressesScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AddressesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AddressesScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod AddressesScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AliasIpRange: An alias IP range attached to an instance's network -// interface. -type AliasIpRange struct { - // IpCidrRange: The IP CIDR range represented by this alias IP range. - // This IP CIDR range must belong to the specified subnetwork and cannot - // contain IP addresses reserved by system or used by other network - // interfaces. This range may be a single IP address (e.g. 10.2.3.4), a - // netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24). - IpCidrRange string `json:"ipCidrRange,omitempty"` - - // SubnetworkRangeName: Optional subnetwork secondary range name - // specifying the secondary range from which to allocate the IP CIDR - // range for this alias IP range. If left unspecified, the primary range - // of the subnetwork will be used. - SubnetworkRangeName string `json:"subnetworkRangeName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IpCidrRange") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IpCidrRange") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AliasIpRange) MarshalJSON() ([]byte, error) { - type noMethod AliasIpRange - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AttachedDisk: An instance-attached disk resource. -type AttachedDisk struct { - // AutoDelete: Specifies whether the disk will be auto-deleted when the - // instance is deleted (but not when the disk is detached from the - // instance). - AutoDelete bool `json:"autoDelete,omitempty"` - - // Boot: Indicates that this is a boot disk. The virtual machine will - // use the first partition of the disk for its root filesystem. - Boot bool `json:"boot,omitempty"` - - // DeviceName: Specifies a unique device name of your choice that is - // reflected into the /dev/disk/by-id/google-* tree of a Linux operating - // system running within the instance. This name can be used to - // reference the device for mounting, resizing, and so on, from within - // the instance. - // - // If not specified, the server chooses a default device name to apply - // to this disk, in the form persistent-disks-x, where x is a number - // assigned by Google Compute Engine. This field is only applicable for - // persistent disks. - DeviceName string `json:"deviceName,omitempty"` - - // DiskEncryptionKey: Encrypts or decrypts a disk using a - // customer-supplied encryption key. - // - // If you are creating a new disk, this field encrypts the new disk - // using an encryption key that you provide. If you are attaching an - // existing disk that is already encrypted, this field decrypts the disk - // using the customer-supplied encryption key. - // - // If you encrypt a disk using a customer-supplied key, you must provide - // the same key again when you attempt to use this resource at a later - // time. For example, you must provide the key when you create a - // snapshot or an image from the disk or when you attach the disk to a - // virtual machine instance. - // - // If you do not provide an encryption key, then the disk will be - // encrypted using an automatically generated key and you do not need to - // provide a key to use the disk later. - // - // Instance templates do not store customer-supplied encryption keys, so - // you cannot use your own keys to encrypt disks in a managed instance - // group. - DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"` - - // DiskSizeGb: The size of the disk in base-2 GB. This supersedes - // disk_size_gb in InitializeParams. - DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - - // Index: Assigns a zero-based index to this disk, where 0 is reserved - // for the boot disk. For example, if you have many disks attached to an - // instance, each disk would have a unique index number. If not - // specified, the server will choose an appropriate value. - Index int64 `json:"index,omitempty"` - - // InitializeParams: [Input Only] Specifies the parameters for a new - // disk that will be created alongside the new instance. Use - // initialization parameters to create boot disks or local SSDs attached - // to the new instance. - // - // This property is mutually exclusive with the source property; you can - // only define one or the other, but not both. - InitializeParams *AttachedDiskInitializeParams `json:"initializeParams,omitempty"` - - // Interface: Specifies the disk interface to use for attaching this - // disk, which is either SCSI or NVME. The default is SCSI. Persistent - // disks must always use SCSI and the request will fail if you attempt - // to attach a persistent disk in any other format than SCSI. Local SSDs - // can use either NVME or SCSI. For performance characteristics of SCSI - // over NVMe, see Local SSD performance. - // - // Possible values: - // "NVME" - // "SCSI" - Interface string `json:"interface,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#attachedDisk - // for attached disks. - Kind string `json:"kind,omitempty"` - - // Licenses: [Output Only] Any valid publicly visible licenses. - Licenses []string `json:"licenses,omitempty"` - - // Mode: The mode in which to attach this disk, either READ_WRITE or - // READ_ONLY. If not specified, the default is to attach the disk in - // READ_WRITE mode. - // - // Possible values: - // "READ_ONLY" - // "READ_WRITE" - Mode string `json:"mode,omitempty"` - - // Source: Specifies a valid partial or full URL to an existing - // Persistent Disk resource. When creating a new instance, one of - // initializeParams.sourceImage or disks.source is required. - // - // If desired, you can also attach existing non-root persistent disks - // using this property. This field is only applicable for persistent - // disks. - // - // Note that for InstanceTemplate, specify the disk name, not the URL - // for the disk. - Source string `json:"source,omitempty"` - - // Type: Specifies the type of the disk, either SCRATCH or PERSISTENT. - // If not specified, the default is PERSISTENT. - // - // Possible values: - // "PERSISTENT" - // "SCRATCH" - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AutoDelete") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AutoDelete") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AttachedDisk) MarshalJSON() ([]byte, error) { - type noMethod AttachedDisk - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AttachedDiskInitializeParams: [Input Only] Specifies the parameters -// for a new disk that will be created alongside the new instance. Use -// initialization parameters to create boot disks or local SSDs attached -// to the new instance. -// -// This property is mutually exclusive with the source property; you can -// only define one or the other, but not both. -type AttachedDiskInitializeParams struct { - // DiskName: Specifies the disk name. If not specified, the default is - // to use the name of the instance. - DiskName string `json:"diskName,omitempty"` - - // DiskSizeGb: Specifies the size of the disk in base-2 GB. - DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - - // DiskStorageType: [Deprecated] Storage type of the disk. - // - // Possible values: - // "HDD" - // "SSD" - DiskStorageType string `json:"diskStorageType,omitempty"` - - // DiskType: Specifies the disk type to use to create the instance. If - // not specified, the default is pd-standard, specified using the full - // URL. For - // example: - // - // https://www.googleapis.com/compute/v1/projects/project/zones - // /zone/diskTypes/pd-standard - // - // Other values include pd-ssd and local-ssd. If you define this field, - // you can provide either the full or partial URL. For example, the - // following are valid values: - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType - // - projects/project/zones/zone/diskTypes/diskType - // - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this - // is the name of the disk type, not URL. - DiskType string `json:"diskType,omitempty"` - - // SourceImage: The source image to create this disk. When creating a - // new instance, one of initializeParams.sourceImage or disks.source is - // required. - // - // To create a disk with one of the public operating system images, - // specify the image by its family name. For example, specify - // family/debian-8 to use the latest Debian 8 - // image: - // - // projects/debian-cloud/global/images/family/debian-8 - // - // Alternatively, use a specific version of a public operating system - // image: - // - // projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD - // - // To create a disk with a private image that you created, specify the - // image name in the following format: - // - // global/images/my-private-image - // - // You can also specify a private image by its image family, which - // returns the latest version of the image in that family. Replace the - // image name with - // family/family-name: - // - // global/images/family/my-private-family - // - // If the source image is deleted later, this field will not be set. - SourceImage string `json:"sourceImage,omitempty"` - - // SourceImageEncryptionKey: The customer-supplied encryption key of the - // source image. Required if the source image is protected by a - // customer-supplied encryption key. - // - // Instance templates do not store customer-supplied encryption keys, so - // you cannot create disks for instances in a managed instance group if - // the source images are encrypted with your own keys. - SourceImageEncryptionKey *CustomerEncryptionKey `json:"sourceImageEncryptionKey,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DiskName") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DiskName") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AttachedDiskInitializeParams) MarshalJSON() ([]byte, error) { - type noMethod AttachedDiskInitializeParams - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AuditConfig: Specifies the audit configuration for a service. The -// configuration determines which permission types are logged, and what -// identities, if any, are exempted from logging. An AuditConfig must -// have one or more AuditLogConfigs. -// -// If there are AuditConfigs for both `allServices` and a specific -// service, the union of the two AuditConfigs is used for that service: -// the log_types specified in each AuditConfig are enabled, and the -// exempted_members in each AuditConfig are exempted. -// -// Example Policy with multiple AuditConfigs: -// -// { "audit_configs": [ { "service": "allServices" "audit_log_configs": -// [ { "log_type": "DATA_READ", "exempted_members": [ -// "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", }, { -// "log_type": "ADMIN_READ", } ] }, { "service": -// "fooservice.googleapis.com" "audit_log_configs": [ { "log_type": -// "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ -// "user:bar@gmail.com" ] } ] } ] } -// -// For fooservice, this policy enables DATA_READ, DATA_WRITE and -// ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ -// logging, and bar@gmail.com from DATA_WRITE logging. -type AuditConfig struct { - // AuditLogConfigs: The configuration for logging of each type of - // permission. - AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` - - ExemptedMembers []string `json:"exemptedMembers,omitempty"` - - // Service: Specifies a service that will be enabled for audit logging. - // For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - // `allServices` is a special value that covers all services. - Service string `json:"service,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AuditLogConfigs") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AuditConfig) MarshalJSON() ([]byte, error) { - type noMethod AuditConfig - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AuditLogConfig: Provides the configuration for logging a type of -// permissions. Example: -// -// { "audit_log_configs": [ { "log_type": "DATA_READ", -// "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": -// "DATA_WRITE", } ] } -// -// This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting -// foo@gmail.com from DATA_READ logging. -type AuditLogConfig struct { - // ExemptedMembers: Specifies the identities that do not cause logging - // for this type of permission. Follows the same format of - // [Binding.members][]. - ExemptedMembers []string `json:"exemptedMembers,omitempty"` - - // LogType: The log type that this config enables. - // - // Possible values: - // "ADMIN_READ" - // "DATA_READ" - // "DATA_WRITE" - // "LOG_TYPE_UNSPECIFIED" - LogType string `json:"logType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ExemptedMembers") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { - type noMethod AuditLogConfig - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AuthorizationLoggingOptions: Authorization-related information used -// by Cloud Audit Logging. -type AuthorizationLoggingOptions struct { - // PermissionType: The type of the permission that was checked. - // - // Possible values: - // "ADMIN_READ" - // "ADMIN_WRITE" - // "DATA_READ" - // "DATA_WRITE" - // "PERMISSION_TYPE_UNSPECIFIED" - PermissionType string `json:"permissionType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "PermissionType") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "PermissionType") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AuthorizationLoggingOptions) MarshalJSON() ([]byte, error) { - type noMethod AuthorizationLoggingOptions - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Autoscaler: Represents an Autoscaler resource. Autoscalers allow you -// to automatically scale virtual machine instances in managed instance -// groups according to an autoscaling policy that you define. For more -// information, read Autoscaling Groups of Instances. -type Autoscaler struct { - // AutoscalingPolicy: The configuration parameters for the autoscaling - // algorithm. You can define one or more of the policies for an - // autoscaler: cpuUtilization, customMetricUtilizations, and - // loadBalancingUtilization. - // - // If none of these are specified, the default will be to autoscale - // based on cpuUtilization to 0.6 or 60%. - AutoscalingPolicy *AutoscalingPolicy `json:"autoscalingPolicy,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#autoscaler - // for autoscalers. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Region: [Output Only] URL of the region where the instance group - // resides (for autoscalers living in regional scope). - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Status: [Output Only] The status of the autoscaler configuration. - // - // Possible values: - // "ACTIVE" - // "DELETING" - // "ERROR" - // "PENDING" - Status string `json:"status,omitempty"` - - // StatusDetails: [Output Only] Human-readable details about the current - // state of the autoscaler. Read the documentation for Commonly returned - // status messages for examples of status messages you might encounter. - StatusDetails []*AutoscalerStatusDetails `json:"statusDetails,omitempty"` - - // Target: URL of the managed instance group that this autoscaler will - // scale. - Target string `json:"target,omitempty"` - - // Zone: [Output Only] URL of the zone where the instance group resides - // (for autoscalers living in zonal scope). - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "AutoscalingPolicy") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AutoscalingPolicy") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Autoscaler) MarshalJSON() ([]byte, error) { - type noMethod Autoscaler - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AutoscalerAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of AutoscalersScopedList resources. - Items map[string]AutoscalersScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#autoscalerAggregatedList for aggregated lists of autoscalers. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalerAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod AutoscalerAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AutoscalerList: Contains a list of Autoscaler resources. -type AutoscalerList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Autoscaler resources. - Items []*Autoscaler `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#autoscalerList - // for lists of autoscalers. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalerList) MarshalJSON() ([]byte, error) { - type noMethod AutoscalerList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AutoscalerStatusDetails struct { - // Message: The status message. - Message string `json:"message,omitempty"` - - // Type: The type of error returned. - // - // Possible values: - // "ALL_INSTANCES_UNHEALTHY" - // "BACKEND_SERVICE_DOES_NOT_EXIST" - // "CAPPED_AT_MAX_NUM_REPLICAS" - // "CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE" - // "CUSTOM_METRIC_INVALID" - // "MIN_EQUALS_MAX" - // "MISSING_CUSTOM_METRIC_DATA_POINTS" - // "MISSING_LOAD_BALANCING_DATA_POINTS" - // "MORE_THAN_ONE_BACKEND_SERVICE" - // "NOT_ENOUGH_QUOTA_AVAILABLE" - // "REGION_RESOURCE_STOCKOUT" - // "SCALING_TARGET_DOES_NOT_EXIST" - // "UNKNOWN" - // "UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION" - // "ZONE_RESOURCE_STOCKOUT" - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Message") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Message") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalerStatusDetails) MarshalJSON() ([]byte, error) { - type noMethod AutoscalerStatusDetails - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AutoscalersScopedList struct { - // Autoscalers: [Output Only] List of autoscalers contained in this - // scope. - Autoscalers []*Autoscaler `json:"autoscalers,omitempty"` - - // Warning: [Output Only] Informational warning which replaces the list - // of autoscalers when the list is empty. - Warning *AutoscalersScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Autoscalers") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Autoscalers") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalersScopedList) MarshalJSON() ([]byte, error) { - type noMethod AutoscalersScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AutoscalersScopedListWarning: [Output Only] Informational warning -// which replaces the list of autoscalers when the list is empty. -type AutoscalersScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*AutoscalersScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalersScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod AutoscalersScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AutoscalersScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalersScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod AutoscalersScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AutoscalingPolicy: Cloud Autoscaler policy. -type AutoscalingPolicy struct { - // CoolDownPeriodSec: The number of seconds that the autoscaler should - // wait before it starts collecting information from a new instance. - // This prevents the autoscaler from collecting information when the - // instance is initializing, during which the collected usage would not - // be reliable. The default time autoscaler waits is 60 - // seconds. - // - // Virtual machine initialization times might vary because of numerous - // factors. We recommend that you test how long an instance may take to - // initialize. To do this, create an instance and time the startup - // process. - CoolDownPeriodSec int64 `json:"coolDownPeriodSec,omitempty"` - - // CpuUtilization: Defines the CPU utilization policy that allows the - // autoscaler to scale based on the average CPU utilization of a managed - // instance group. - CpuUtilization *AutoscalingPolicyCpuUtilization `json:"cpuUtilization,omitempty"` - - // CustomMetricUtilizations: Configuration parameters of autoscaling - // based on a custom metric. - CustomMetricUtilizations []*AutoscalingPolicyCustomMetricUtilization `json:"customMetricUtilizations,omitempty"` - - // LoadBalancingUtilization: Configuration parameters of autoscaling - // based on load balancer. - LoadBalancingUtilization *AutoscalingPolicyLoadBalancingUtilization `json:"loadBalancingUtilization,omitempty"` - - // MaxNumReplicas: The maximum number of instances that the autoscaler - // can scale up to. This is required when creating or updating an - // autoscaler. The maximum number of replicas should not be lower than - // minimal number of replicas. - MaxNumReplicas int64 `json:"maxNumReplicas,omitempty"` - - // MinNumReplicas: The minimum number of replicas that the autoscaler - // can scale down to. This cannot be less than 0. If not provided, - // autoscaler will choose a default value depending on maximum number of - // instances allowed. - MinNumReplicas int64 `json:"minNumReplicas,omitempty"` - - // QueueBasedScaling: Configuration parameters of autoscaling based on - // queuing system. - QueueBasedScaling *AutoscalingPolicyQueueBasedScaling `json:"queueBasedScaling,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CoolDownPeriodSec") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CoolDownPeriodSec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalingPolicy) MarshalJSON() ([]byte, error) { - type noMethod AutoscalingPolicy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AutoscalingPolicyCpuUtilization: CPU utilization policy. -type AutoscalingPolicyCpuUtilization struct { - // UtilizationTarget: The target CPU utilization that the autoscaler - // should maintain. Must be a float value in the range (0, 1]. If not - // specified, the default is 0.6. - // - // If the CPU level is below the target utilization, the autoscaler - // scales down the number of instances until it reaches the minimum - // number of instances you specified or until the average CPU of your - // instances reaches the target utilization. - // - // If the average CPU is above the target utilization, the autoscaler - // scales up until it reaches the maximum number of instances you - // specified or until the average utilization reaches the target - // utilization. - UtilizationTarget float64 `json:"utilizationTarget,omitempty"` - - // ForceSendFields is a list of field names (e.g. "UtilizationTarget") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "UtilizationTarget") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalingPolicyCpuUtilization) MarshalJSON() ([]byte, error) { - type noMethod AutoscalingPolicyCpuUtilization - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *AutoscalingPolicyCpuUtilization) UnmarshalJSON(data []byte) error { - type noMethod AutoscalingPolicyCpuUtilization - var s1 struct { - UtilizationTarget gensupport.JSONFloat64 `json:"utilizationTarget"` - *noMethod - } - s1.noMethod = (*noMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.UtilizationTarget = float64(s1.UtilizationTarget) - return nil -} - -// AutoscalingPolicyCustomMetricUtilization: Custom utilization metric -// policy. -type AutoscalingPolicyCustomMetricUtilization struct { - // Filter: A filter string, compatible with a Stackdriver Monitoring - // filter string for TimeSeries.list API call. This filter is used to - // select a specific TimeSeries for the purpose of autoscaling and to - // determine whether the metric is exporting per-instance or global - // data. - // - // For the filter to be valid for autoscaling purposes, the following - // rules apply: - // - You can only use the AND operator for joining selectors. - // - You can only use direct equality comparison operator (=) without - // any functions for each selector. - // - You can specify the metric in both the filter string and in the - // metric field. However, if specified in both places, the metric must - // be identical. - // - The monitored resource type determines what kind of values are - // expected for the metric. If it is a gce_instance, the autoscaler - // expects the metric to include a separate TimeSeries for each instance - // in a group. In such a case, you cannot filter on resource labels. - // If the resource type is any other value, the autoscaler expects this - // metric to contain values that apply to the entire autoscaled instance - // group and resource label filtering can be performed to point - // autoscaler at the correct TimeSeries to scale upon. This is / called - // a global metric for the purpose of autoscaling. - // - // If not specified, the type defaults to gce_instance. - // - // You should provide a filter that is selective enough to pick just one - // TimeSeries for the autoscaled group or for each of the instances (if - // you are using gce_instance resource type). If multiple TimeSeries are - // returned upon the query execution, the autoscaler will sum their - // respective values to obtain its scaling value. - Filter string `json:"filter,omitempty"` - - // Metric: The identifier (type) of the Stackdriver Monitoring metric. - // The metric cannot have negative values and should be a utilization - // metric, which means that the number of virtual machines handling - // requests should increase or decrease proportionally to the - // metric. - // - // The metric must have a value type of INT64 or DOUBLE. - Metric string `json:"metric,omitempty"` - - // SingleInstanceAssignment: If scaling is based on a global metric - // value that represents the total amount of work to be done or resource - // usage, set this value to an amount assigned for a single instance of - // the scaled group. Autoscaler will keep the number of instances - // proportional to the value of this metric, the metric itself should - // not change value due to group resizing. - // - // A good metric to use with the target is for example - // pubsub.googleapis.com/subscription/num_undelivered_messages or a - // custom metric exporting the total number of requests coming to your - // instances. - // - // A bad example would be a metric exporting an average or median - // latency, since this value can't include a chunk assignable to a - // single instance, it could be better used with utilization_target - // instead. - SingleInstanceAssignment float64 `json:"singleInstanceAssignment,omitempty"` - - // UtilizationTarget: The target value of the metric that autoscaler - // should maintain. This must be a positive value. - // - // For example, a good metric to use as a utilization_target is - // compute.googleapis.com/instance/network/received_bytes_count. The - // autoscaler will work to keep this value constant for each of the - // instances. - UtilizationTarget float64 `json:"utilizationTarget,omitempty"` - - // UtilizationTargetType: Defines how target utilization value is - // expressed for a Stackdriver Monitoring metric. Either GAUGE, - // DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not specified, the default - // is GAUGE. - // - // Possible values: - // "DELTA_PER_MINUTE" - // "DELTA_PER_SECOND" - // "GAUGE" - UtilizationTargetType string `json:"utilizationTargetType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Filter") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Filter") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalingPolicyCustomMetricUtilization) MarshalJSON() ([]byte, error) { - type noMethod AutoscalingPolicyCustomMetricUtilization - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *AutoscalingPolicyCustomMetricUtilization) UnmarshalJSON(data []byte) error { - type noMethod AutoscalingPolicyCustomMetricUtilization - var s1 struct { - SingleInstanceAssignment gensupport.JSONFloat64 `json:"singleInstanceAssignment"` - UtilizationTarget gensupport.JSONFloat64 `json:"utilizationTarget"` - *noMethod - } - s1.noMethod = (*noMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.SingleInstanceAssignment = float64(s1.SingleInstanceAssignment) - s.UtilizationTarget = float64(s1.UtilizationTarget) - return nil -} - -// AutoscalingPolicyLoadBalancingUtilization: Configuration parameters -// of autoscaling based on load balancing. -type AutoscalingPolicyLoadBalancingUtilization struct { - // UtilizationTarget: Fraction of backend capacity utilization (set in - // HTTP(s) load balancing configuration) that autoscaler should - // maintain. Must be a positive float value. If not defined, the default - // is 0.8. - UtilizationTarget float64 `json:"utilizationTarget,omitempty"` - - // ForceSendFields is a list of field names (e.g. "UtilizationTarget") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "UtilizationTarget") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalingPolicyLoadBalancingUtilization) MarshalJSON() ([]byte, error) { - type noMethod AutoscalingPolicyLoadBalancingUtilization - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *AutoscalingPolicyLoadBalancingUtilization) UnmarshalJSON(data []byte) error { - type noMethod AutoscalingPolicyLoadBalancingUtilization - var s1 struct { - UtilizationTarget gensupport.JSONFloat64 `json:"utilizationTarget"` - *noMethod - } - s1.noMethod = (*noMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.UtilizationTarget = float64(s1.UtilizationTarget) - return nil -} - -// AutoscalingPolicyQueueBasedScaling: Configuration parameters of -// autoscaling based on queuing system. -type AutoscalingPolicyQueueBasedScaling struct { - // AcceptableBacklogPerInstance: Scaling based on the average number of - // tasks in the queue per each active instance. The autoscaler keeps the - // average number of tasks per instance below this number, based on data - // collected in the last couple of minutes. The autoscaler will also - // take into account incoming tasks when calculating when to scale. - AcceptableBacklogPerInstance float64 `json:"acceptableBacklogPerInstance,omitempty"` - - // CloudPubSub: Configuration for Cloud Pub/Sub subscription queue. - CloudPubSub *AutoscalingPolicyQueueBasedScalingCloudPubSub `json:"cloudPubSub,omitempty"` - - // SingleWorkerThroughputPerSec: The scaling algorithm will also - // calculate throughput estimates on its own; if you explicitly provide - // this value, the autoscaler will take into account your value as well - // as automatic estimates when deciding how to scale. - SingleWorkerThroughputPerSec float64 `json:"singleWorkerThroughputPerSec,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "AcceptableBacklogPerInstance") to unconditionally include in API - // requests. By default, fields with empty values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. - // "AcceptableBacklogPerInstance") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalingPolicyQueueBasedScaling) MarshalJSON() ([]byte, error) { - type noMethod AutoscalingPolicyQueueBasedScaling - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *AutoscalingPolicyQueueBasedScaling) UnmarshalJSON(data []byte) error { - type noMethod AutoscalingPolicyQueueBasedScaling - var s1 struct { - AcceptableBacklogPerInstance gensupport.JSONFloat64 `json:"acceptableBacklogPerInstance"` - SingleWorkerThroughputPerSec gensupport.JSONFloat64 `json:"singleWorkerThroughputPerSec"` - *noMethod - } - s1.noMethod = (*noMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.AcceptableBacklogPerInstance = float64(s1.AcceptableBacklogPerInstance) - s.SingleWorkerThroughputPerSec = float64(s1.SingleWorkerThroughputPerSec) - return nil -} - -// AutoscalingPolicyQueueBasedScalingCloudPubSub: Configuration -// parameters for scaling based on Cloud Pub/Sub subscription queue. -type AutoscalingPolicyQueueBasedScalingCloudPubSub struct { - // Subscription: Cloud Pub/Sub subscription used for scaling. Provide - // the partial URL (starting with projects/) or just the subscription - // name. The subscription must be assigned to the topic specified in - // topicName and must be in a pull configuration. The subscription must - // belong to the same project as the Autoscaler. - Subscription string `json:"subscription,omitempty"` - - // Topic: Cloud Pub/Sub topic used for scaling. Provide the partial URL - // or partial URL (starting with projects/) or just the topic name. The - // topic must belong to the same project as the Autoscaler resource. - Topic string `json:"topic,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Subscription") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Subscription") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalingPolicyQueueBasedScalingCloudPubSub) MarshalJSON() ([]byte, error) { - type noMethod AutoscalingPolicyQueueBasedScalingCloudPubSub - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Backend: Message containing information of one individual backend. -type Backend struct { - // BalancingMode: Specifies the balancing mode for this backend. For - // global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. - // Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for - // TCP/SSL). - // - // For Internal Load Balancing, the default and only supported mode is - // CONNECTION. - // - // Possible values: - // "CONNECTION" - // "RATE" - // "UTILIZATION" - BalancingMode string `json:"balancingMode,omitempty"` - - // CapacityScaler: A multiplier applied to the group's maximum servicing - // capacity (based on UTILIZATION, RATE or CONNECTION). Default value is - // 1, which means the group will serve up to 100% of its configured - // capacity (depending on balancingMode). A setting of 0 means the group - // is completely drained, offering 0% of its available Capacity. Valid - // range is [0.0,1.0]. - // - // This cannot be used for internal load balancing. - CapacityScaler float64 `json:"capacityScaler,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Failover: This field designates whether this is a failover backend. - // More than one failover backend can be configured for a given - // BackendService. - Failover bool `json:"failover,omitempty"` - - // Group: The fully-qualified URL of a Instance Group resource. This - // instance group defines the list of instances that serve traffic. - // Member virtual machine instances from each instance group must live - // in the same zone as the instance group itself. No two backends in a - // backend service are allowed to use same Instance Group - // resource. - // - // Note that you must specify an Instance Group resource using the - // fully-qualified URL, rather than a partial URL. - // - // When the BackendService has load balancing scheme INTERNAL, the - // instance group must be within the same region as the BackendService. - Group string `json:"group,omitempty"` - - // MaxConnections: The max number of simultaneous connections for the - // group. Can be used with either CONNECTION or UTILIZATION balancing - // modes. For CONNECTION mode, either maxConnections or - // maxConnectionsPerInstance must be set. - // - // This cannot be used for internal load balancing. - MaxConnections int64 `json:"maxConnections,omitempty"` - - // MaxConnectionsPerInstance: The max number of simultaneous connections - // that a single backend instance can handle. This is used to calculate - // the capacity of the group. Can be used in either CONNECTION or - // UTILIZATION balancing modes. For CONNECTION mode, either - // maxConnections or maxConnectionsPerInstance must be set. - // - // This cannot be used for internal load balancing. - MaxConnectionsPerInstance int64 `json:"maxConnectionsPerInstance,omitempty"` - - // MaxRate: The max requests per second (RPS) of the group. Can be used - // with either RATE or UTILIZATION balancing modes, but required if RATE - // mode. For RATE mode, either maxRate or maxRatePerInstance must be - // set. - // - // This cannot be used for internal load balancing. - MaxRate int64 `json:"maxRate,omitempty"` - - // MaxRatePerInstance: The max requests per second (RPS) that a single - // backend instance can handle. This is used to calculate the capacity - // of the group. Can be used in either balancing mode. For RATE mode, - // either maxRate or maxRatePerInstance must be set. - // - // This cannot be used for internal load balancing. - MaxRatePerInstance float64 `json:"maxRatePerInstance,omitempty"` - - // MaxUtilization: Used when balancingMode is UTILIZATION. This ratio - // defines the CPU utilization target for the group. The default is 0.8. - // Valid range is [0.0, 1.0]. - // - // This cannot be used for internal load balancing. - MaxUtilization float64 `json:"maxUtilization,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BalancingMode") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BalancingMode") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Backend) MarshalJSON() ([]byte, error) { - type noMethod Backend - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *Backend) UnmarshalJSON(data []byte) error { - type noMethod Backend - var s1 struct { - CapacityScaler gensupport.JSONFloat64 `json:"capacityScaler"` - MaxRatePerInstance gensupport.JSONFloat64 `json:"maxRatePerInstance"` - MaxUtilization gensupport.JSONFloat64 `json:"maxUtilization"` - *noMethod - } - s1.noMethod = (*noMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.CapacityScaler = float64(s1.CapacityScaler) - s.MaxRatePerInstance = float64(s1.MaxRatePerInstance) - s.MaxUtilization = float64(s1.MaxUtilization) - return nil -} - -// BackendBucket: A BackendBucket resource. This resource defines a -// Cloud Storage bucket. -type BackendBucket struct { - // BucketName: Cloud Storage bucket name. - BucketName string `json:"bucketName,omitempty"` - - // CdnPolicy: Cloud CDN Coniguration for this BackendBucket. - CdnPolicy *BackendBucketCdnPolicy `json:"cdnPolicy,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional textual description of the resource; - // provided by the client when the resource is created. - Description string `json:"description,omitempty"` - - // EnableCdn: If true, enable Cloud CDN for this BackendBucket. - EnableCdn bool `json:"enableCdn,omitempty"` - - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: Type of the resource. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "BucketName") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BucketName") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *BackendBucket) MarshalJSON() ([]byte, error) { - type noMethod BackendBucket - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// BackendBucketCdnPolicy: Message containing Cloud CDN configuration -// for a backend bucket. -type BackendBucketCdnPolicy struct { - // SignedUrlCacheMaxAgeSec: Number of seconds up to which the response - // to a signed URL request will be cached in the CDN. After this time - // period, the Signed URL will be revalidated before being served. - // Defaults to 1hr (3600s). If this field is set, Cloud CDN will - // internally act as though all responses from this bucket had a - // ?Cache-Control: public, max-age=[TTL]? header, regardless of any - // existing Cache-Control header. The actual headers served in responses - // will not be altered. - SignedUrlCacheMaxAgeSec int64 `json:"signedUrlCacheMaxAgeSec,omitempty,string"` - - // SignedUrlKeyNames: [Output Only] Names of the keys currently - // configured for Cloud CDN Signed URL on this backend bucket. - SignedUrlKeyNames []string `json:"signedUrlKeyNames,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "SignedUrlCacheMaxAgeSec") to unconditionally include in API - // requests. By default, fields with empty values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "SignedUrlCacheMaxAgeSec") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *BackendBucketCdnPolicy) MarshalJSON() ([]byte, error) { - type noMethod BackendBucketCdnPolicy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// BackendBucketList: Contains a list of BackendBucket resources. -type BackendBucketList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of BackendBucket resources. - Items []*BackendBucket `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *BackendBucketList) MarshalJSON() ([]byte, error) { - type noMethod BackendBucketList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// BackendService: A BackendService resource. This resource defines a -// group of backend virtual machines and their serving capacity. -type BackendService struct { - // AffinityCookieTtlSec: Lifetime of cookies in seconds if - // session_affinity is GENERATED_COOKIE. If set to 0, the cookie is - // non-persistent and lasts only until the end of the browser session - // (or equivalent). The maximum allowed value for TTL is one day. - // - // When the load balancing scheme is INTERNAL, this field is not used. - AffinityCookieTtlSec int64 `json:"affinityCookieTtlSec,omitempty"` - - // Backends: The list of backends that serve this BackendService. - Backends []*Backend `json:"backends,omitempty"` - - // CdnPolicy: Cloud CDN configuration for this BackendService. - CdnPolicy *BackendServiceCdnPolicy `json:"cdnPolicy,omitempty"` - - ConnectionDraining *ConnectionDraining `json:"connectionDraining,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // CustomRequestHeaders: Headers that the HTTP/S load balancer should - // add to proxied requests. - CustomRequestHeaders []string `json:"customRequestHeaders,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // EnableCDN: If true, enable Cloud CDN for this BackendService. - // - // When the load balancing scheme is INTERNAL, this field is not used. - EnableCDN bool `json:"enableCDN,omitempty"` - - // FailoverRatio: The value of the field must be in [0, 1]. If set, - // 'backends[].failover' must be set. They together define the fallback - // behavior of the primary backend: if the ratio of the healthy VMs in - // the primary backend is at or below this number, traffic arriving at - // the load-balanced IP will be directed to the failover backend. - // - // In case where 'failoverRatio' is not set or all the VMs in the backup - // backend are unhealthy, the traffic will be directed back to the - // primary backend in the "force" mode, where traffic will be spread to - // the healthy VMs with the best effort, or to all VMs when no VM is - // healthy. - // - // This field is only used with l4 load balancing. - FailoverRatio float64 `json:"failoverRatio,omitempty"` - - // Fingerprint: Fingerprint of this resource. A hash of the contents - // stored in this object. This field is used in optimistic locking. This - // field will be ignored when inserting a BackendService. An up-to-date - // fingerprint must be provided in order to update the BackendService. - Fingerprint string `json:"fingerprint,omitempty"` - - // HealthChecks: The list of URLs to the HttpHealthCheck or - // HttpsHealthCheck resource for health checking this BackendService. - // Currently at most one health check can be specified, and a health - // check is required for GCE backend services. A health check must not - // be specified for GAE app backend and Cloud Function backend. - // - // For internal load balancing, a URL to a HealthCheck resource must be - // specified instead. - HealthChecks []string `json:"healthChecks,omitempty"` - - Iap *BackendServiceIAP `json:"iap,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of resource. Always compute#backendService - // for backend services. - Kind string `json:"kind,omitempty"` - - // Possible values: - // "EXTERNAL" - // "INTERNAL" - // "INVALID_LOAD_BALANCING_SCHEME" - LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Port: Deprecated in favor of portName. The TCP port to connect on the - // backend. The default value is 80. - // - // This cannot be used for internal load balancing. - Port int64 `json:"port,omitempty"` - - // PortName: Name of backend port. The same name should appear in the - // instance groups referenced by this service. Required when the load - // balancing scheme is EXTERNAL. - // - // When the load balancing scheme is INTERNAL, this field is not used. - PortName string `json:"portName,omitempty"` - - // Protocol: The protocol this BackendService uses to communicate with - // backends. - // - // Possible values are HTTP, HTTPS, TCP, and SSL. The default is - // HTTP. - // - // For internal load balancing, the possible values are TCP and UDP, and - // the default is TCP. - // - // Possible values: - // "HTTP" - // "HTTP2" - // "HTTPS" - // "SSL" - // "TCP" - // "UDP" - Protocol string `json:"protocol,omitempty"` - - // Region: [Output Only] URL of the region where the regional backend - // service resides. This field is not applicable to global backend - // services. - Region string `json:"region,omitempty"` - - // SecurityPolicy: [Output Only] The resource URL for the security - // policy associated with this backend service. - SecurityPolicy string `json:"securityPolicy,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // SessionAffinity: Type of session affinity to use. The default is - // NONE. - // - // When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, - // or GENERATED_COOKIE. - // - // When the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, - // CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO. - // - // When the protocol is UDP, this field is not used. - // - // Possible values: - // "CLIENT_IP" - // "CLIENT_IP_PORT_PROTO" - // "CLIENT_IP_PROTO" - // "GENERATED_COOKIE" - // "NONE" - SessionAffinity string `json:"sessionAffinity,omitempty"` - - // TimeoutSec: How many seconds to wait for the backend before - // considering it a failed request. Default is 30 seconds. - TimeoutSec int64 `json:"timeoutSec,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. - // "AffinityCookieTtlSec") to unconditionally include in API requests. - // By default, fields with empty values are omitted from API requests. - // However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AffinityCookieTtlSec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *BackendService) MarshalJSON() ([]byte, error) { - type noMethod BackendService - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *BackendService) UnmarshalJSON(data []byte) error { - type noMethod BackendService - var s1 struct { - FailoverRatio gensupport.JSONFloat64 `json:"failoverRatio"` - *noMethod - } - s1.noMethod = (*noMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FailoverRatio = float64(s1.FailoverRatio) - return nil -} - -// BackendServiceAggregatedList: Contains a list of -// BackendServicesScopedList. -type BackendServiceAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of BackendServicesScopedList resources. - Items map[string]BackendServicesScopedList `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *BackendServiceAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod BackendServiceAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// BackendServiceCdnPolicy: Message containing Cloud CDN configuration -// for a backend service. -type BackendServiceCdnPolicy struct { - // CacheKeyPolicy: The CacheKeyPolicy for this CdnPolicy. - CacheKeyPolicy *CacheKeyPolicy `json:"cacheKeyPolicy,omitempty"` - - // SignedUrlCacheMaxAgeSec: Number of seconds up to which the response - // to a signed URL request will be cached in the CDN. After this time - // period, the Signed URL will be revalidated before being served. - // Defaults to 1hr (3600s). If this field is set, Cloud CDN will - // internally act as though all responses from this backend had a - // ?Cache-Control: public, max-age=[TTL]? header, regardless of any - // existing Cache-Control header. The actual headers served in responses - // will not be altered. - SignedUrlCacheMaxAgeSec int64 `json:"signedUrlCacheMaxAgeSec,omitempty,string"` - - // SignedUrlKeyNames: [Output Only] Names of the keys currently - // configured for Cloud CDN Signed URL on this backend service. - SignedUrlKeyNames []string `json:"signedUrlKeyNames,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CacheKeyPolicy") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CacheKeyPolicy") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *BackendServiceCdnPolicy) MarshalJSON() ([]byte, error) { - type noMethod BackendServiceCdnPolicy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type BackendServiceGroupHealth struct { - HealthStatus []*HealthStatus `json:"healthStatus,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#backendServiceGroupHealth for the health of backend services. - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "HealthStatus") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "HealthStatus") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *BackendServiceGroupHealth) MarshalJSON() ([]byte, error) { - type noMethod BackendServiceGroupHealth - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// BackendServiceIAP: Identity-Aware Proxy -type BackendServiceIAP struct { - Enabled bool `json:"enabled,omitempty"` - - Oauth2ClientId string `json:"oauth2ClientId,omitempty"` - - Oauth2ClientSecret string `json:"oauth2ClientSecret,omitempty"` - - // Oauth2ClientSecretSha256: [Output Only] SHA256 hash value for the - // field oauth2_client_secret above. - Oauth2ClientSecretSha256 string `json:"oauth2ClientSecretSha256,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Enabled") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Enabled") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *BackendServiceIAP) MarshalJSON() ([]byte, error) { - type noMethod BackendServiceIAP - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// BackendServiceList: Contains a list of BackendService resources. -type BackendServiceList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of BackendService resources. - Items []*BackendService `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#backendServiceList for lists of backend services. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *BackendServiceList) MarshalJSON() ([]byte, error) { - type noMethod BackendServiceList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type BackendServicesScopedList struct { - // BackendServices: List of BackendServices contained in this scope. - BackendServices []*BackendService `json:"backendServices,omitempty"` - - // Warning: Informational warning which replaces the list of backend - // services when the list is empty. - Warning *BackendServicesScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BackendServices") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BackendServices") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *BackendServicesScopedList) MarshalJSON() ([]byte, error) { - type noMethod BackendServicesScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// BackendServicesScopedListWarning: Informational warning which -// replaces the list of backend services when the list is empty. -type BackendServicesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*BackendServicesScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *BackendServicesScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod BackendServicesScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type BackendServicesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *BackendServicesScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod BackendServicesScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Binding: Associates `members` with a `role`. -type Binding struct { - // Condition: The condition that is associated with this binding. NOTE: - // an unsatisfied condition will not allow user access via current - // binding. Different bindings, including their conditions, are examined - // independently. This field is GOOGLE_INTERNAL. - Condition *Expr `json:"condition,omitempty"` - - // Members: Specifies the identities requesting access for a Cloud - // Platform resource. `members` can have the following values: - // - // * `allUsers`: A special identifier that represents anyone who is on - // the internet; with or without a Google account. - // - // * `allAuthenticatedUsers`: A special identifier that represents - // anyone who is authenticated with a Google account or a service - // account. - // - // * `user:{emailid}`: An email address that represents a specific - // Google account. For example, `alice@gmail.com` or - // `joe@example.com`. - // - // - // - // * `serviceAccount:{emailid}`: An email address that represents a - // service account. For example, - // `my-other-app@appspot.gserviceaccount.com`. - // - // * `group:{emailid}`: An email address that represents a Google group. - // For example, `admins@example.com`. - // - // - // - // * `domain:{domain}`: A Google Apps domain name that represents all - // the users of that domain. For example, `google.com` or `example.com`. - Members []string `json:"members,omitempty"` - - // Role: Role that is assigned to `members`. For example, - // `roles/viewer`, `roles/editor`, or `roles/owner`. - Role string `json:"role,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Condition") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Condition") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Binding) MarshalJSON() ([]byte, error) { - type noMethod Binding - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type CacheInvalidationRule struct { - // Host: If set, this invalidation rule will only apply to requests with - // a Host header matching host. - Host string `json:"host,omitempty"` - - Path string `json:"path,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Host") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Host") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CacheInvalidationRule) MarshalJSON() ([]byte, error) { - type noMethod CacheInvalidationRule - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CacheKeyPolicy: Message containing what to include in the cache key -// for a request for Cloud CDN. -type CacheKeyPolicy struct { - // IncludeHost: If true, requests to different hosts will be cached - // separately. - IncludeHost bool `json:"includeHost,omitempty"` - - // IncludeProtocol: If true, http and https requests will be cached - // separately. - IncludeProtocol bool `json:"includeProtocol,omitempty"` - - // IncludeQueryString: If true, include query string parameters in the - // cache key according to query_string_whitelist and - // query_string_blacklist. If neither is set, the entire query string - // will be included. If false, the query string will be excluded from - // the cache key entirely. - IncludeQueryString bool `json:"includeQueryString,omitempty"` - - // QueryStringBlacklist: Names of query string parameters to exclude in - // cache keys. All other parameters will be included. Either specify - // query_string_whitelist or query_string_blacklist, not both. '&' and - // '=' will be percent encoded and not treated as delimiters. - QueryStringBlacklist []string `json:"queryStringBlacklist,omitempty"` - - // QueryStringWhitelist: Names of query string parameters to include in - // cache keys. All other parameters will be excluded. Either specify - // query_string_whitelist or query_string_blacklist, not both. '&' and - // '=' will be percent encoded and not treated as delimiters. - QueryStringWhitelist []string `json:"queryStringWhitelist,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IncludeHost") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IncludeHost") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CacheKeyPolicy) MarshalJSON() ([]byte, error) { - type noMethod CacheKeyPolicy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Commitment: Represents a Commitment resource. Creating a Commitment -// resource means that you are purchasing a committed use contract with -// an explicit start and end time. You can create commitments based on -// vCPUs and memory usage and receive discounted rates. For full -// details, read Signing Up for Committed Use Discounts. -// -// Committed use discounts are subject to Google Cloud Platform's -// Service Specific Terms. By purchasing a committed use discount, you -// agree to these terms. Committed use discounts will not renew, so you -// must purchase a new commitment to continue receiving discounts. -type Commitment struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // EndTimestamp: [Output Only] Commitment end time in RFC3339 text - // format. - EndTimestamp string `json:"endTimestamp,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#commitment - // for commitments. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Plan: The plan for this commitment, which determines duration and - // discount rate. The currently supported plans are TWELVE_MONTH (1 - // year), and THIRTY_SIX_MONTH (3 years). - // - // Possible values: - // "INVALID" - // "THIRTY_SIX_MONTH" - // "TWELVE_MONTH" - Plan string `json:"plan,omitempty"` - - // Region: [Output Only] URL of the region where this commitment may be - // used. - Region string `json:"region,omitempty"` - - // Resources: List of commitment amounts for particular resources. Note - // that VCPU and MEMORY resource commitments must occur together. - Resources []*ResourceCommitment `json:"resources,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // StartTimestamp: [Output Only] Commitment start time in RFC3339 text - // format. - StartTimestamp string `json:"startTimestamp,omitempty"` - - // Status: [Output Only] Status of the commitment with regards to - // eventual expiration (each commitment has an end date defined). One of - // the following values: NOT_YET_ACTIVE, ACTIVE, EXPIRED. - // - // Possible values: - // "ACTIVE" - // "CREATING" - // "EXPIRED" - // "NOT_YET_ACTIVE" - Status string `json:"status,omitempty"` - - // StatusMessage: [Output Only] An optional, human-readable explanation - // of the status. - StatusMessage string `json:"statusMessage,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Commitment) MarshalJSON() ([]byte, error) { - type noMethod Commitment - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type CommitmentAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of CommitmentsScopedList resources. - Items map[string]CommitmentsScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#commitmentAggregatedList for aggregated lists of commitments. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CommitmentAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod CommitmentAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CommitmentList: Contains a list of Commitment resources. -type CommitmentList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Commitment resources. - Items []*Commitment `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#commitmentList - // for lists of commitments. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CommitmentList) MarshalJSON() ([]byte, error) { - type noMethod CommitmentList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type CommitmentsScopedList struct { - // Commitments: [Output Only] List of commitments contained in this - // scope. - Commitments []*Commitment `json:"commitments,omitempty"` - - // Warning: [Output Only] Informational warning which replaces the list - // of commitments when the list is empty. - Warning *CommitmentsScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Commitments") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Commitments") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CommitmentsScopedList) MarshalJSON() ([]byte, error) { - type noMethod CommitmentsScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CommitmentsScopedListWarning: [Output Only] Informational warning -// which replaces the list of commitments when the list is empty. -type CommitmentsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*CommitmentsScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CommitmentsScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod CommitmentsScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type CommitmentsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CommitmentsScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod CommitmentsScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Condition: A condition to be met. -type Condition struct { - // Iam: Trusted attributes supplied by the IAM system. - // - // Possible values: - // "APPROVER" - // "ATTRIBUTION" - // "AUTHORITY" - // "JUSTIFICATION_TYPE" - // "NO_ATTR" - // "SECURITY_REALM" - Iam string `json:"iam,omitempty"` - - // Op: An operator to apply the subject with. - // - // Possible values: - // "DISCHARGED" - // "EQUALS" - // "IN" - // "NOT_EQUALS" - // "NOT_IN" - // "NO_OP" - Op string `json:"op,omitempty"` - - // Svc: Trusted attributes discharged by the service. - Svc string `json:"svc,omitempty"` - - // Sys: Trusted attributes supplied by any service that owns resources - // and uses the IAM system for access control. - // - // Possible values: - // "IP" - // "NAME" - // "NO_ATTR" - // "REGION" - // "SERVICE" - Sys string `json:"sys,omitempty"` - - // Value: DEPRECATED. Use 'values' instead. - Value string `json:"value,omitempty"` - - // Values: The objects of the condition. This is mutually exclusive with - // 'value'. - Values []string `json:"values,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Iam") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Iam") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Condition) MarshalJSON() ([]byte, error) { - type noMethod Condition - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ConnectionDraining: Message containing connection draining -// configuration. -type ConnectionDraining struct { - // DrainingTimeoutSec: Time for which instance will be drained (not - // accept new connections, but still work to finish started). - DrainingTimeoutSec int64 `json:"drainingTimeoutSec,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DrainingTimeoutSec") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DrainingTimeoutSec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ConnectionDraining) MarshalJSON() ([]byte, error) { - type noMethod ConnectionDraining - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CustomerEncryptionKey: Represents a customer-supplied encryption key -type CustomerEncryptionKey struct { - // KmsKeyName: The name of the encryption key that is stored in Google - // Cloud KMS. - KmsKeyName string `json:"kmsKeyName,omitempty"` - - // RawKey: Specifies a 256-bit customer-supplied encryption key, encoded - // in RFC 4648 base64 to either encrypt or decrypt this resource. - RawKey string `json:"rawKey,omitempty"` - - // RsaEncryptedKey: Specifies an RFC 4648 base64 encoded, RSA-wrapped - // 2048-bit customer-supplied encryption key to either encrypt or - // decrypt this resource. - // - // The key must meet the following requirements before you can provide - // it to Compute Engine: - // - The key is wrapped using a RSA public key certificate provided by - // Google. - // - After being wrapped, the key must be encoded in RFC 4648 base64 - // encoding. Get the RSA public key certificate provided by Google - // at: - // https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingre - // ss.pem - RsaEncryptedKey string `json:"rsaEncryptedKey,omitempty"` - - // Sha256: [Output only] The RFC 4648 base64 encoded SHA-256 hash of the - // customer-supplied encryption key that protects this resource. - Sha256 string `json:"sha256,omitempty"` - - // ForceSendFields is a list of field names (e.g. "KmsKeyName") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "KmsKeyName") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CustomerEncryptionKey) MarshalJSON() ([]byte, error) { - type noMethod CustomerEncryptionKey - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type CustomerEncryptionKeyProtectedDisk struct { - // DiskEncryptionKey: Decrypts data associated with the disk with a - // customer-supplied encryption key. - DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"` - - // Source: Specifies a valid partial or full URL to an existing - // Persistent Disk resource. This field is only applicable for - // persistent disks. - Source string `json:"source,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DiskEncryptionKey") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DiskEncryptionKey") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *CustomerEncryptionKeyProtectedDisk) MarshalJSON() ([]byte, error) { - type noMethod CustomerEncryptionKeyProtectedDisk - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DeprecationStatus: Deprecation status for a public resource. -type DeprecationStatus struct { - // Deleted: An optional RFC3339 timestamp on or after which the state of - // this resource is intended to change to DELETED. This is only - // informational and the status will not change unless the client - // explicitly changes it. - Deleted string `json:"deleted,omitempty"` - - // Deprecated: An optional RFC3339 timestamp on or after which the state - // of this resource is intended to change to DEPRECATED. This is only - // informational and the status will not change unless the client - // explicitly changes it. - Deprecated string `json:"deprecated,omitempty"` - - // Obsolete: An optional RFC3339 timestamp on or after which the state - // of this resource is intended to change to OBSOLETE. This is only - // informational and the status will not change unless the client - // explicitly changes it. - Obsolete string `json:"obsolete,omitempty"` - - // Replacement: The URL of the suggested replacement for a deprecated - // resource. The suggested replacement resource must be the same kind of - // resource as the deprecated resource. - Replacement string `json:"replacement,omitempty"` - - // State: The deprecation state of this resource. This can be - // DEPRECATED, OBSOLETE, or DELETED. Operations which create a new - // resource using a DEPRECATED resource will return successfully, but - // with a warning indicating the deprecated resource and recommending - // its replacement. Operations which use OBSOLETE or DELETED resources - // will be rejected and result in an error. - // - // Possible values: - // "DELETED" - // "DEPRECATED" - // "OBSOLETE" - State string `json:"state,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Deleted") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Deleted") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DeprecationStatus) MarshalJSON() ([]byte, error) { - type noMethod DeprecationStatus - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Disk: A Disk resource. -type Disk struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // DiskEncryptionKey: Encrypts the disk using a customer-supplied - // encryption key. - // - // After you encrypt a disk with a customer-supplied key, you must - // provide the same key if you use the disk later (e.g. to create a disk - // snapshot or an image, or to attach the disk to a virtual - // machine). - // - // Customer-supplied encryption keys do not protect access to metadata - // of the disk. - // - // If you do not provide an encryption key when creating the disk, then - // the disk will be encrypted using an automatically generated key and - // you do not need to provide a key to use the disk later. - DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#disk for - // disks. - Kind string `json:"kind,omitempty"` - - // LabelFingerprint: A fingerprint for the labels being applied to this - // disk, which is essentially a hash of the labels set used for - // optimistic locking. The fingerprint is initially generated by Compute - // Engine and changes after every request to modify or update labels. - // You must always provide an up-to-date fingerprint hash in order to - // update or change labels. - // - // To see the latest fingerprint, make a get() request to retrieve a - // disk. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // Labels: Labels to apply to this disk. These can be later modified by - // the setLabels method. - Labels map[string]string `json:"labels,omitempty"` - - // LastAttachTimestamp: [Output Only] Last attach timestamp in RFC3339 - // text format. - LastAttachTimestamp string `json:"lastAttachTimestamp,omitempty"` - - // LastDetachTimestamp: [Output Only] Last detach timestamp in RFC3339 - // text format. - LastDetachTimestamp string `json:"lastDetachTimestamp,omitempty"` - - // LicenseCodes: Integer license codes indicating which licenses are - // attached to this disk. - LicenseCodes googleapi.Int64s `json:"licenseCodes,omitempty"` - - // Licenses: Any applicable publicly visible licenses. - Licenses []string `json:"licenses,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Options: Internal use only. - Options string `json:"options,omitempty"` - - // PhysicalBlockSizeBytes: Physical block size of the persistent disk, - // in bytes. If not present in a request, a default value is used. - // Initially only 4096 is supported, but other powers of two may be - // added. If an unsupported value is requested, the error message will - // list the supported values, but even a supported value may be allowed - // for only some projects. - PhysicalBlockSizeBytes int64 `json:"physicalBlockSizeBytes,omitempty,string"` - - // Region: [Output Only] URL of the region where the disk resides. Only - // applicable for regional resources. - Region string `json:"region,omitempty"` - - // ReplicaZones: URLs of the zones where the disk should be replicated - // to. Only applicable for regional resources. - ReplicaZones []string `json:"replicaZones,omitempty"` - - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - - // SizeGb: Size of the persistent disk, specified in GB. You can specify - // this field when creating a persistent disk using the sourceImage or - // sourceSnapshot parameter, or specify it alone to create an empty - // persistent disk. - // - // If you specify this field along with sourceImage or sourceSnapshot, - // the value of sizeGb must not be less than the size of the sourceImage - // or the size of the snapshot. Acceptable values are 1 to 65536, - // inclusive. - SizeGb int64 `json:"sizeGb,omitempty,string"` - - // SourceImage: The source image used to create this disk. If the source - // image is deleted, this field will not be set. - // - // To create a disk with one of the public operating system images, - // specify the image by its family name. For example, specify - // family/debian-8 to use the latest Debian 8 - // image: - // - // projects/debian-cloud/global/images/family/debian-8 - // - // Alternatively, use a specific version of a public operating system - // image: - // - // projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD - // - // To create a disk with a private image that you created, specify the - // image name in the following format: - // - // global/images/my-private-image - // - // You can also specify a private image by its image family, which - // returns the latest version of the image in that family. Replace the - // image name with - // family/family-name: - // - // global/images/family/my-private-family - SourceImage string `json:"sourceImage,omitempty"` - - // SourceImageEncryptionKey: The customer-supplied encryption key of the - // source image. Required if the source image is protected by a - // customer-supplied encryption key. - SourceImageEncryptionKey *CustomerEncryptionKey `json:"sourceImageEncryptionKey,omitempty"` - - // SourceImageId: [Output Only] The ID value of the image used to create - // this disk. This value identifies the exact image that was used to - // create this persistent disk. For example, if you created the - // persistent disk from an image that was later deleted and recreated - // under the same name, the source image ID would identify the exact - // version of the image that was used. - SourceImageId string `json:"sourceImageId,omitempty"` - - // SourceSnapshot: The source snapshot used to create this disk. You can - // provide this as a partial or full URL to the resource. For example, - // the following are valid values: - // - - // https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot - // - projects/project/global/snapshots/snapshot - // - global/snapshots/snapshot - SourceSnapshot string `json:"sourceSnapshot,omitempty"` - - // SourceSnapshotEncryptionKey: The customer-supplied encryption key of - // the source snapshot. Required if the source snapshot is protected by - // a customer-supplied encryption key. - SourceSnapshotEncryptionKey *CustomerEncryptionKey `json:"sourceSnapshotEncryptionKey,omitempty"` - - // SourceSnapshotId: [Output Only] The unique ID of the snapshot used to - // create this disk. This value identifies the exact snapshot that was - // used to create this persistent disk. For example, if you created the - // persistent disk from a snapshot that was later deleted and recreated - // under the same name, the source snapshot ID would identify the exact - // version of the snapshot that was used. - SourceSnapshotId string `json:"sourceSnapshotId,omitempty"` - - // Status: [Output Only] The status of disk creation. - // - // Possible values: - // "CREATING" - // "FAILED" - // "READY" - // "RESTORING" - Status string `json:"status,omitempty"` - - // StorageType: [Deprecated] Storage type of the persistent disk. - // - // Possible values: - // "HDD" - // "SSD" - StorageType string `json:"storageType,omitempty"` - - // Type: URL of the disk type resource describing which disk type to use - // to create the disk. Provide this when creating the disk. - Type string `json:"type,omitempty"` - - // Users: [Output Only] Links to the users of the disk (attached - // instances) in form: project/zones/zone/instances/instance - Users []string `json:"users,omitempty"` - - // Zone: [Output Only] URL of the zone where the disk resides. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Disk) MarshalJSON() ([]byte, error) { - type noMethod Disk - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type DiskAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of DisksScopedList resources. - Items map[string]DisksScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#diskAggregatedList for aggregated lists of persistent disks. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DiskAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod DiskAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DiskList: A list of Disk resources. -type DiskList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Disk resources. - Items []*Disk `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#diskList for - // lists of disks. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DiskList) MarshalJSON() ([]byte, error) { - type noMethod DiskList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type DiskMoveRequest struct { - // DestinationZone: The URL of the destination zone to move the disk. - // This can be a full or partial URL. For example, the following are all - // valid URLs to a zone: - // - https://www.googleapis.com/compute/v1/projects/project/zones/zone - // - // - projects/project/zones/zone - // - zones/zone - DestinationZone string `json:"destinationZone,omitempty"` - - // TargetDisk: The URL of the target disk to move. This can be a full or - // partial URL. For example, the following are all valid URLs to a disk: - // - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk - // - projects/project/zones/zone/disks/disk - // - zones/zone/disks/disk - TargetDisk string `json:"targetDisk,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DestinationZone") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DestinationZone") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *DiskMoveRequest) MarshalJSON() ([]byte, error) { - type noMethod DiskMoveRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DiskType: A DiskType resource. -type DiskType struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // DefaultDiskSizeGb: [Output Only] Server-defined default disk size in - // GB. - DefaultDiskSizeGb int64 `json:"defaultDiskSizeGb,omitempty,string"` - - // Deprecated: [Output Only] The deprecation status associated with this - // disk type. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - - // Description: [Output Only] An optional description of this resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#diskType for - // disk types. - Kind string `json:"kind,omitempty"` - - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ValidDiskSize: [Output Only] An optional textual description of the - // valid disk size, such as "10GB-10TB". - ValidDiskSize string `json:"validDiskSize,omitempty"` - - // Zone: [Output Only] URL of the zone where the disk type resides. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *DiskType) MarshalJSON() ([]byte, error) { - type noMethod DiskType - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type DiskTypeAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of DiskTypesScopedList resources. - Items map[string]DiskTypesScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#diskTypeAggregatedList. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DiskTypeAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod DiskTypeAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DiskTypeList: Contains a list of disk types. -type DiskTypeList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of DiskType resources. - Items []*DiskType `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#diskTypeList for - // disk types. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DiskTypeList) MarshalJSON() ([]byte, error) { - type noMethod DiskTypeList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type DiskTypesScopedList struct { - // DiskTypes: [Output Only] List of disk types contained in this scope. - DiskTypes []*DiskType `json:"diskTypes,omitempty"` - - // Warning: [Output Only] Informational warning which replaces the list - // of disk types when the list is empty. - Warning *DiskTypesScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DiskTypes") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DiskTypes") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DiskTypesScopedList) MarshalJSON() ([]byte, error) { - type noMethod DiskTypesScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DiskTypesScopedListWarning: [Output Only] Informational warning which -// replaces the list of disk types when the list is empty. -type DiskTypesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*DiskTypesScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DiskTypesScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod DiskTypesScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type DiskTypesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DiskTypesScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod DiskTypesScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type DisksResizeRequest struct { - // SizeGb: The new size of the persistent disk, which is specified in - // GB. - SizeGb int64 `json:"sizeGb,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "SizeGb") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "SizeGb") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DisksResizeRequest) MarshalJSON() ([]byte, error) { - type noMethod DisksResizeRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type DisksScopedList struct { - // Disks: [Output Only] List of disks contained in this scope. - Disks []*Disk `json:"disks,omitempty"` - - // Warning: [Output Only] Informational warning which replaces the list - // of disks when the list is empty. - Warning *DisksScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Disks") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Disks") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DisksScopedList) MarshalJSON() ([]byte, error) { - type noMethod DisksScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DisksScopedListWarning: [Output Only] Informational warning which -// replaces the list of disks when the list is empty. -type DisksScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*DisksScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DisksScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod DisksScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type DisksScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DisksScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod DisksScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type DistributionPolicy struct { - Zones []*DistributionPolicyZoneConfiguration `json:"zones,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Zones") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Zones") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DistributionPolicy) MarshalJSON() ([]byte, error) { - type noMethod DistributionPolicy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type DistributionPolicyZoneConfiguration struct { - // Zone: URL of the zone where managed instance group is spawning - // instances (for regional resources). Zone has to belong to the region - // where managed instance group is located. - Zone string `json:"zone,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Zone") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Zone") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DistributionPolicyZoneConfiguration) MarshalJSON() ([]byte, error) { - type noMethod DistributionPolicyZoneConfiguration - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Expr: Represents an expression text. Example: -// -// title: "User account presence" description: "Determines whether the -// request has a user account" expression: "size(request.user) > 0" -type Expr struct { - // Description: An optional description of the expression. This is a - // longer text which describes the expression, e.g. when hovered over it - // in a UI. - Description string `json:"description,omitempty"` - - // Expression: Textual representation of an expression in Common - // Expression Language syntax. - // - // The application context of the containing message determines which - // well-known feature set of CEL is supported. - Expression string `json:"expression,omitempty"` - - // Location: An optional string indicating the location of the - // expression for error reporting, e.g. a file name and a position in - // the file. - Location string `json:"location,omitempty"` - - // Title: An optional title for the expression, i.e. a short string - // describing its purpose. This can be used e.g. in UIs which allow to - // enter the expression. - Title string `json:"title,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Expr) MarshalJSON() ([]byte, error) { - type noMethod Expr - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Firewall: Represents a Firewall resource. -type Firewall struct { - // Allowed: The list of ALLOW rules specified by this firewall. Each - // rule specifies a protocol and port-range tuple that describes a - // permitted connection. - Allowed []*FirewallAllowed `json:"allowed,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Denied: The list of DENY rules specified by this firewall. Each rule - // specifies a protocol and port-range tuple that describes a permitted - // connection. - Denied []*FirewallDenied `json:"denied,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // DestinationRanges: If destination ranges are specified, the firewall - // will apply only to traffic that has destination IP address in these - // ranges. These ranges must be expressed in CIDR format. Only IPv4 is - // supported. - DestinationRanges []string `json:"destinationRanges,omitempty"` - - // Direction: Direction of traffic to which this firewall applies; - // default is INGRESS. Note: For INGRESS traffic, it is NOT supported to - // specify destinationRanges; For EGRESS traffic, it is NOT supported to - // specify sourceRanges OR sourceTags. - // - // Possible values: - // "EGRESS" - // "INGRESS" - Direction string `json:"direction,omitempty"` - - // EnableLogging: This field denotes whether to enable logging for a - // particular firewall rule. If logging is enabled, logs will be - // exported to the configured export destination for all firewall logs - // in the network. Logs may be exported to BigQuery or Pub/Sub. - EnableLogging bool `json:"enableLogging,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#firewall for - // firewall rules. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource; provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Network: URL of the network resource for this firewall rule. If not - // specified when creating a firewall rule, the default network is - // used: - // global/networks/default - // If you choose to specify this property, you can specify the network - // as a full or partial URL. For example, the following are all valid - // URLs: - // - - // https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network - // - projects/myproject/global/networks/my-network - // - global/networks/default - Network string `json:"network,omitempty"` - - // Priority: Priority for this rule. This is an integer between 0 and - // 65535, both inclusive. When not specified, the value assumed is 1000. - // Relative priorities determine precedence of conflicting rules. Lower - // value of priority implies higher precedence (eg, a rule with priority - // 0 has higher precedence than a rule with priority 1). DENY rules take - // precedence over ALLOW rules having equal priority. - Priority int64 `json:"priority,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // SourceRanges: If source ranges are specified, the firewall will apply - // only to traffic that has source IP address in these ranges. These - // ranges must be expressed in CIDR format. One or both of sourceRanges - // and sourceTags may be set. If both properties are set, the firewall - // will apply to traffic that has source IP address within sourceRanges - // OR the source IP that belongs to a tag listed in the sourceTags - // property. The connection does not need to match both properties for - // the firewall to apply. Only IPv4 is supported. - SourceRanges []string `json:"sourceRanges,omitempty"` - - // SourceServiceAccounts: If source service accounts are specified, the - // firewall will apply only to traffic originating from an instance with - // a service account in this list. Source service accounts cannot be - // used to control traffic to an instance's external IP address because - // service accounts are associated with an instance, not an IP address. - // sourceRanges can be set at the same time as sourceServiceAccounts. If - // both are set, the firewall will apply to traffic that has source IP - // address within sourceRanges OR the source IP belongs to an instance - // with service account listed in sourceServiceAccount. The connection - // does not need to match both properties for the firewall to apply. - // sourceServiceAccounts cannot be used at the same time as sourceTags - // or targetTags. - SourceServiceAccounts []string `json:"sourceServiceAccounts,omitempty"` - - // SourceTags: If source tags are specified, the firewall rule applies - // only to traffic with source IPs that match the primary network - // interfaces of VM instances that have the tag and are in the same VPC - // network. Source tags cannot be used to control traffic to an - // instance's external IP address, it only applies to traffic between - // instances in the same virtual network. Because tags are associated - // with instances, not IP addresses. One or both of sourceRanges and - // sourceTags may be set. If both properties are set, the firewall will - // apply to traffic that has source IP address within sourceRanges OR - // the source IP that belongs to a tag listed in the sourceTags - // property. The connection does not need to match both properties for - // the firewall to apply. - SourceTags []string `json:"sourceTags,omitempty"` - - // TargetServiceAccounts: A list of service accounts indicating sets of - // instances located in the network that may make network connections as - // specified in allowed[]. targetServiceAccounts cannot be used at the - // same time as targetTags or sourceTags. If neither - // targetServiceAccounts nor targetTags are specified, the firewall rule - // applies to all instances on the specified network. - TargetServiceAccounts []string `json:"targetServiceAccounts,omitempty"` - - // TargetTags: A list of instance tags indicating sets of instances - // located in the network that may make network connections as specified - // in allowed[]. If no targetTags are specified, the firewall rule - // applies to all instances on the specified network. - TargetTags []string `json:"targetTags,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Allowed") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Allowed") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Firewall) MarshalJSON() ([]byte, error) { - type noMethod Firewall - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type FirewallAllowed struct { - // IPProtocol: The IP protocol to which this rule applies. The protocol - // type is required when creating a firewall rule. This value can either - // be one of the following well known protocol strings (tcp, udp, icmp, - // esp, ah, ipip, sctp), or the IP protocol number. - IPProtocol string `json:"IPProtocol,omitempty"` - - // Ports: An optional list of ports to which this rule applies. This - // field is only applicable for UDP or TCP protocol. Each entry must be - // either an integer or a range. If not specified, this rule applies to - // connections through any port. - // - // Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. - Ports []string `json:"ports,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IPProtocol") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IPProtocol") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *FirewallAllowed) MarshalJSON() ([]byte, error) { - type noMethod FirewallAllowed - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type FirewallDenied struct { - // IPProtocol: The IP protocol to which this rule applies. The protocol - // type is required when creating a firewall rule. This value can either - // be one of the following well known protocol strings (tcp, udp, icmp, - // esp, ah, ipip, sctp), or the IP protocol number. - IPProtocol string `json:"IPProtocol,omitempty"` - - // Ports: An optional list of ports to which this rule applies. This - // field is only applicable for UDP or TCP protocol. Each entry must be - // either an integer or a range. If not specified, this rule applies to - // connections through any port. - // - // Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. - Ports []string `json:"ports,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IPProtocol") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IPProtocol") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *FirewallDenied) MarshalJSON() ([]byte, error) { - type noMethod FirewallDenied - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// FirewallList: Contains a list of firewalls. -type FirewallList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Firewall resources. - Items []*Firewall `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#firewallList for - // lists of firewalls. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *FirewallList) MarshalJSON() ([]byte, error) { - type noMethod FirewallList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// FixedOrPercent: Encapsulates numeric value that can be either -// absolute or relative. -type FixedOrPercent struct { - // Calculated: [Output Only] Absolute value calculated based on mode: - // mode = fixed -> calculated = fixed = percent -> calculated = - // ceiling(percent/100 * base_value) - Calculated int64 `json:"calculated,omitempty"` - - // Fixed: fixed must be non-negative. - Fixed int64 `json:"fixed,omitempty"` - - // Percent: percent must belong to [0, 100]. - Percent int64 `json:"percent,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Calculated") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Calculated") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *FixedOrPercent) MarshalJSON() ([]byte, error) { - type noMethod FixedOrPercent - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ForwardingRule: A ForwardingRule resource. A ForwardingRule resource -// specifies which pool of target virtual machines to forward a packet -// to if it matches the given [IPAddress, IPProtocol, ports] tuple. -type ForwardingRule struct { - // IPAddress: The IP address that this forwarding rule is serving on - // behalf of. - // - // For global forwarding rules, the address must be a global IP. For - // regional forwarding rules, the address must live in the same region - // as the forwarding rule. By default, this field is empty and an - // ephemeral IPv4 address from the same scope (global or regional) will - // be assigned. A regional forwarding rule supports IPv4 only. A global - // forwarding rule supports either IPv4 or IPv6. - // - // When the load balancing scheme is INTERNAL, this can only be an RFC - // 1918 IP address belonging to the network/subnetwork configured for - // the forwarding rule. A reserved address cannot be used. If the field - // is empty, the IP address will be automatically allocated from the - // internal IP range of the subnetwork or network configured for this - // forwarding rule. - IPAddress string `json:"IPAddress,omitempty"` - - // IPProtocol: The IP protocol to which this rule applies. Valid options - // are TCP, UDP, ESP, AH, SCTP or ICMP. - // - // When the load balancing scheme is INTERNAL, only TCP and UDP are - // valid. - // - // Possible values: - // "AH" - // "ESP" - // "ICMP" - // "SCTP" - // "TCP" - // "UDP" - IPProtocol string `json:"IPProtocol,omitempty"` - - // BackendService: This field is not used for external load - // balancing. - // - // For internal load balancing, this field identifies the BackendService - // resource to receive the matched traffic. - BackendService string `json:"backendService,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // IpVersion: The IP Version that will be used by this forwarding rule. - // Valid options are IPV4 or IPV6. This can only be specified for a - // global forwarding rule. - // - // Possible values: - // "IPV4" - // "IPV6" - // "UNSPECIFIED_VERSION" - IpVersion string `json:"ipVersion,omitempty"` - - // Kind: [Output Only] Type of the resource. Always - // compute#forwardingRule for Forwarding Rule resources. - Kind string `json:"kind,omitempty"` - - // LabelFingerprint: A fingerprint for the labels being applied to this - // resource, which is essentially a hash of the labels set used for - // optimistic locking. The fingerprint is initially generated by Compute - // Engine and changes after every request to modify or update labels. - // You must always provide an up-to-date fingerprint hash in order to - // update or change labels. - // - // To see the latest fingerprint, make a get() request to retrieve a - // ForwardingRule. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // Labels: Labels to apply to this resource. These can be later modified - // by the setLabels method. Each label key/value pair must comply with - // RFC1035. Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - - // LoadBalancingScheme: This signifies what the ForwardingRule will be - // used for and can only take the following values: INTERNAL, EXTERNAL - // The value of INTERNAL means that this will be used for Internal - // Network Load Balancing (TCP, UDP). The value of EXTERNAL means that - // this will be used for External Load Balancing (HTTP(S) LB, External - // TCP/UDP LB, SSL Proxy) - // - // Possible values: - // "EXTERNAL" - // "INTERNAL" - // "INVALID" - LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"` - - // Name: Name of the resource; provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Network: This field is not used for external load balancing. - // - // For internal load balancing, this field identifies the network that - // the load balanced IP should belong to for this Forwarding Rule. If - // this field is not specified, the default network will be used. - Network string `json:"network,omitempty"` - - // NetworkTier: This signifies the networking tier used for configuring - // this load balancer and can only take the following values: PREMIUM , - // STANDARD. - // - // For regional ForwardingRule, the valid values are PREMIUM and - // STANDARD. For GlobalForwardingRule, the valid value is PREMIUM. - // - // If this field is not specified, it is assumed to be PREMIUM. If - // IPAddress is specified, this value must be equal to the networkTier - // of the Address. - // - // Possible values: - // "PREMIUM" - // "SELECT" - // "STANDARD" - NetworkTier string `json:"networkTier,omitempty"` - - // PortRange: This field is used along with the target field for - // TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, - // TargetVpnGateway, TargetPool, TargetInstance. - // - // Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets - // addressed to ports in the specified range will be forwarded to - // target. Forwarding rules with the same [IPAddress, IPProtocol] pair - // must have disjoint port ranges. - // - // Some types of forwarding target have constraints on the acceptable - // ports: - // - TargetHttpProxy: 80, 8080 - // - TargetHttpsProxy: 443 - // - TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, - // 995, 1883, 5222 - // - TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, - // 995, 1883, 5222 - // - TargetVpnGateway: 500, 4500 - // - - PortRange string `json:"portRange,omitempty"` - - // Ports: This field is used along with the backend_service field for - // internal load balancing. - // - // When the load balancing scheme is INTERNAL, a single port or a comma - // separated list of ports can be configured. Only packets addressed to - // these ports will be forwarded to the backends configured with this - // forwarding rule. - // - // You may specify a maximum of up to 5 ports. - Ports []string `json:"ports,omitempty"` - - // Region: [Output Only] URL of the region where the regional forwarding - // rule resides. This field is not applicable to global forwarding - // rules. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServiceLabel: An optional prefix to the service name for this - // Forwarding Rule. If specified, will be the first label of the fully - // qualified service name. - // - // The label must be 1-63 characters long, and comply with RFC1035. - // Specifically, the label must be 1-63 characters long and match the - // regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first - // character must be a lowercase letter, and all following characters - // must be a dash, lowercase letter, or digit, except the last - // character, which cannot be a dash. - // - // This field is only used for internal load balancing. - ServiceLabel string `json:"serviceLabel,omitempty"` - - // ServiceName: [Output Only] The internal fully qualified service name - // for this Forwarding Rule. - // - // This field is only used for internal load balancing. - ServiceName string `json:"serviceName,omitempty"` - - // Subnetwork: This field is not used for external load balancing. - // - // For internal load balancing, this field identifies the subnetwork - // that the load balanced IP should belong to for this Forwarding - // Rule. - // - // If the network specified is in auto subnet mode, this field is - // optional. However, if the network is in custom subnet mode, a - // subnetwork must be specified. - Subnetwork string `json:"subnetwork,omitempty"` - - // Target: The URL of the target resource to receive the matched - // traffic. For regional forwarding rules, this target must live in the - // same region as the forwarding rule. For global forwarding rules, this - // target must be a global load balancing resource. The forwarded - // traffic must be of a type appropriate to the target object. - // - // This field is not used for internal load balancing. - Target string `json:"target,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "IPAddress") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IPAddress") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ForwardingRule) MarshalJSON() ([]byte, error) { - type noMethod ForwardingRule - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ForwardingRuleAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of ForwardingRulesScopedList resources. - Items map[string]ForwardingRulesScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#forwardingRuleAggregatedList for lists of forwarding rules. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ForwardingRuleAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod ForwardingRuleAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ForwardingRuleList: Contains a list of ForwardingRule resources. -type ForwardingRuleList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of ForwardingRule resources. - Items []*ForwardingRule `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ForwardingRuleList) MarshalJSON() ([]byte, error) { - type noMethod ForwardingRuleList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ForwardingRulesScopedList struct { - // ForwardingRules: List of forwarding rules contained in this scope. - ForwardingRules []*ForwardingRule `json:"forwardingRules,omitempty"` - - // Warning: Informational warning which replaces the list of forwarding - // rules when the list is empty. - Warning *ForwardingRulesScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ForwardingRules") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ForwardingRules") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ForwardingRulesScopedList) MarshalJSON() ([]byte, error) { - type noMethod ForwardingRulesScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ForwardingRulesScopedListWarning: Informational warning which -// replaces the list of forwarding rules when the list is empty. -type ForwardingRulesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*ForwardingRulesScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ForwardingRulesScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod ForwardingRulesScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ForwardingRulesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ForwardingRulesScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod ForwardingRulesScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type GlobalSetLabelsRequest struct { - // LabelFingerprint: The fingerprint of the previous set of labels for - // this resource, used to detect conflicts. The fingerprint is initially - // generated by Compute Engine and changes after every request to modify - // or update labels. You must always provide an up-to-date fingerprint - // hash when updating or changing labels. Make a get() request to the - // resource to get the latest fingerprint. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // Labels: A list of labels to apply for this resource. Each label key & - // value must comply with RFC1035. Specifically, the name must be 1-63 - // characters long and match the regular expression - // [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a - // lowercase letter, and all following characters must be a dash, - // lowercase letter, or digit, except the last character, which cannot - // be a dash. For example, "webserver-frontend": "images". A label value - // can also be empty (e.g. "my-label": ""). - Labels map[string]string `json:"labels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LabelFingerprint") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "LabelFingerprint") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GlobalSetLabelsRequest) MarshalJSON() ([]byte, error) { - type noMethod GlobalSetLabelsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GuestAttributes: A guest attributes entry. -type GuestAttributes struct { - // Kind: [Output Only] Type of the resource. Always - // compute#guestAttributes for guest attributes entry. - Kind string `json:"kind,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // VariableKey: The key to search for. - VariableKey string `json:"variableKey,omitempty"` - - // VariableValue: [Output Only] The value found for the requested key. - VariableValue string `json:"variableValue,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Kind") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Kind") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GuestAttributes) MarshalJSON() ([]byte, error) { - type noMethod GuestAttributes - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GuestOsFeature: Guest OS features. -type GuestOsFeature struct { - // Type: The type of supported feature. Currently only - // VIRTIO_SCSI_MULTIQUEUE is supported. For newer Windows images, the - // server might also populate this property with the value WINDOWS to - // indicate that this is a Windows image. This value is purely - // informational and does not enable or disable any features. - // - // Possible values: - // "FEATURE_TYPE_UNSPECIFIED" - // "MULTI_IP_SUBNET" - // "VIRTIO_SCSI_MULTIQUEUE" - // "WINDOWS" - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Type") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Type") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GuestOsFeature) MarshalJSON() ([]byte, error) { - type noMethod GuestOsFeature - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type HTTP2HealthCheck struct { - // Host: The value of the host header in the HTTP/2 health check - // request. If left empty (default value), the IP on behalf of which - // this health check is performed will be used. - Host string `json:"host,omitempty"` - - // Port: The TCP port number for the health check request. The default - // value is 443. Valid values are 1 through 65535. - Port int64 `json:"port,omitempty"` - - // PortName: Port name as defined in InstanceGroup#NamedPort#name. If - // both port and port_name are defined, port takes precedence. - PortName string `json:"portName,omitempty"` - - // ProxyHeader: Specifies the type of proxy header to append before - // sending data to the backend, either NONE or PROXY_V1. The default is - // NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - - // RequestPath: The request path of the HTTP/2 health check request. The - // default value is /. - RequestPath string `json:"requestPath,omitempty"` - - // Response: The string to match anywhere in the first 1024 bytes of the - // response body. If left empty (the default value), the status code - // determines health. The response data can only be ASCII. - Response string `json:"response,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Host") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Host") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HTTP2HealthCheck) MarshalJSON() ([]byte, error) { - type noMethod HTTP2HealthCheck - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type HTTPHealthCheck struct { - // Host: The value of the host header in the HTTP health check request. - // If left empty (default value), the IP on behalf of which this health - // check is performed will be used. - Host string `json:"host,omitempty"` - - // Port: The TCP port number for the health check request. The default - // value is 80. Valid values are 1 through 65535. - Port int64 `json:"port,omitempty"` - - // PortName: Port name as defined in InstanceGroup#NamedPort#name. If - // both port and port_name are defined, port takes precedence. - PortName string `json:"portName,omitempty"` - - // ProxyHeader: Specifies the type of proxy header to append before - // sending data to the backend, either NONE or PROXY_V1. The default is - // NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - - // RequestPath: The request path of the HTTP health check request. The - // default value is /. - RequestPath string `json:"requestPath,omitempty"` - - // Response: The string to match anywhere in the first 1024 bytes of the - // response body. If left empty (the default value), the status code - // determines health. The response data can only be ASCII. - Response string `json:"response,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Host") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Host") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HTTPHealthCheck) MarshalJSON() ([]byte, error) { - type noMethod HTTPHealthCheck - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type HTTPSHealthCheck struct { - // Host: The value of the host header in the HTTPS health check request. - // If left empty (default value), the IP on behalf of which this health - // check is performed will be used. - Host string `json:"host,omitempty"` - - // Port: The TCP port number for the health check request. The default - // value is 443. Valid values are 1 through 65535. - Port int64 `json:"port,omitempty"` - - // PortName: Port name as defined in InstanceGroup#NamedPort#name. If - // both port and port_name are defined, port takes precedence. - PortName string `json:"portName,omitempty"` - - // ProxyHeader: Specifies the type of proxy header to append before - // sending data to the backend, either NONE or PROXY_V1. The default is - // NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - - // RequestPath: The request path of the HTTPS health check request. The - // default value is /. - RequestPath string `json:"requestPath,omitempty"` - - // Response: The string to match anywhere in the first 1024 bytes of the - // response body. If left empty (the default value), the status code - // determines health. The response data can only be ASCII. - Response string `json:"response,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Host") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Host") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HTTPSHealthCheck) MarshalJSON() ([]byte, error) { - type noMethod HTTPSHealthCheck - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HealthCheck: An HealthCheck resource. This resource defines a -// template for how individual virtual machines should be checked for -// health, via one of the supported protocols. -type HealthCheck struct { - // CheckIntervalSec: How often (in seconds) to send a health check. The - // default value is 5 seconds. - CheckIntervalSec int64 `json:"checkIntervalSec,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in 3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // HealthyThreshold: A so-far unhealthy instance will be marked healthy - // after this many consecutive successes. The default value is 2. - HealthyThreshold int64 `json:"healthyThreshold,omitempty"` - - Http2HealthCheck *HTTP2HealthCheck `json:"http2HealthCheck,omitempty"` - - HttpHealthCheck *HTTPHealthCheck `json:"httpHealthCheck,omitempty"` - - HttpsHealthCheck *HTTPSHealthCheck `json:"httpsHealthCheck,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: Type of the resource. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - SslHealthCheck *SSLHealthCheck `json:"sslHealthCheck,omitempty"` - - TcpHealthCheck *TCPHealthCheck `json:"tcpHealthCheck,omitempty"` - - // TimeoutSec: How long (in seconds) to wait before claiming failure. - // The default value is 5 seconds. It is invalid for timeoutSec to have - // greater value than checkIntervalSec. - TimeoutSec int64 `json:"timeoutSec,omitempty"` - - // Type: Specifies the type of the healthCheck, either TCP, SSL, HTTP or - // HTTPS. If not specified, the default is TCP. Exactly one of the - // protocol-specific health check field must be specified, which must - // match type field. - // - // Possible values: - // "HTTP" - // "HTTP2" - // "HTTPS" - // "INVALID" - // "SSL" - // "TCP" - // "UDP" - Type string `json:"type,omitempty"` - - UdpHealthCheck *UDPHealthCheck `json:"udpHealthCheck,omitempty"` - - // UnhealthyThreshold: A so-far healthy instance will be marked - // unhealthy after this many consecutive failures. The default value is - // 2. - UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CheckIntervalSec") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CheckIntervalSec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *HealthCheck) MarshalJSON() ([]byte, error) { - type noMethod HealthCheck - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HealthCheckList: Contains a list of HealthCheck resources. -type HealthCheckList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of HealthCheck resources. - Items []*HealthCheck `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HealthCheckList) MarshalJSON() ([]byte, error) { - type noMethod HealthCheckList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HealthCheckReference: A full or valid partial URL to a health check. -// For example, the following are valid URLs: -// - -// https://www.googleapis.com/compute/beta/projects/project-id/global/httpHealthChecks/health-check -// - projects/project-id/global/httpHealthChecks/health-check -// - global/httpHealthChecks/health-check -type HealthCheckReference struct { - HealthCheck string `json:"healthCheck,omitempty"` - - // ForceSendFields is a list of field names (e.g. "HealthCheck") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "HealthCheck") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HealthCheckReference) MarshalJSON() ([]byte, error) { - type noMethod HealthCheckReference - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type HealthStatus struct { - // HealthState: Health state of the instance. - // - // Possible values: - // "HEALTHY" - // "UNHEALTHY" - HealthState string `json:"healthState,omitempty"` - - // Instance: URL of the instance resource. - Instance string `json:"instance,omitempty"` - - // IpAddress: The IP address represented by this resource. - IpAddress string `json:"ipAddress,omitempty"` - - // Port: The port on the instance. - Port int64 `json:"port,omitempty"` - - // ForceSendFields is a list of field names (e.g. "HealthState") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "HealthState") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HealthStatus) MarshalJSON() ([]byte, error) { - type noMethod HealthStatus - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type Host struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: [Output Only] An optional textual description of the - // resource. - Description string `json:"description,omitempty"` - - // HostType: Full or partial URL of the host type resource to use for - // this host, in the format: zones/zone/hostTypes/host-type. This is - // provided by the client when the host is created. For example, the - // following is a valid partial url to a predefined host - // type: - // - // zones/us-central1-b/hostTypes/n1-host-64-416 - HostType string `json:"hostType,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Instances: A list of resource URLs to the virtual machine instances - // in this host. They must live in zones contained in the same region as - // this host. - Instances []string `json:"instances,omitempty"` - - // Kind: [Output Only] The type of the resource. Always compute#host for - // host. - Kind string `json:"kind,omitempty"` - - // LabelFingerprint: A fingerprint for this request, which is - // essentially a hash of the metadata's contents and used for optimistic - // locking. The fingerprint is initially generated by Compute Engine and - // changes after every request to modify or update metadata. You must - // always provide an up-to-date fingerprint hash in order to update or - // change metadata. - // - // To see the latest fingerprint, make get() request to the host. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // Labels: Labels to apply to this host. - Labels map[string]string `json:"labels,omitempty"` - - // Name: The name of the resource, provided by the client when initially - // creating the resource. The resource name must be 1-63 characters - // long, and comply with RFC1035. Specifically, the name must be 1-63 - // characters long and match the regular expression - // [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a - // lowercase letter, and all following characters must be a dash, - // lowercase letter, or digit, except the last character, which cannot - // be a dash. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Status: [Output Only] The status of the host. One of the following - // values: CREATING, READY, REPAIR, and DELETING. - // - // Possible values: - // "CREATING" - // "DELETING" - // "INVALID" - // "READY" - // "REPAIR" - Status string `json:"status,omitempty"` - - // StatusMessage: [Output Only] An optional, human-readable explanation - // of the status. - StatusMessage string `json:"statusMessage,omitempty"` - - // Zone: [Output Only] The name of the zone where the host resides, such - // as us-central1-a. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Host) MarshalJSON() ([]byte, error) { - type noMethod Host - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type HostAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of HostsScopedList resources. - Items map[string]HostsScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#hostAggregatedList for aggregated lists of hosts. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HostAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod HostAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HostList: Contains a list of hosts. -type HostList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Host resources. - Items []*Host `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#hostList for - // lists of hosts. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HostList) MarshalJSON() ([]byte, error) { - type noMethod HostList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HostRule: UrlMaps A host-matching rule for a URL. If matched, will -// use the named PathMatcher to select the BackendService. -type HostRule struct { - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Hosts: The list of host patterns to match. They must be valid - // hostnames, except * will match any string of ([a-z0-9-.]*). In that - // case, * must be the first character and must be followed in the - // pattern by either - or .. - Hosts []string `json:"hosts,omitempty"` - - // PathMatcher: The name of the PathMatcher to use to match the path - // portion of the URL if the hostRule matches the URL's host portion. - PathMatcher string `json:"pathMatcher,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HostRule) MarshalJSON() ([]byte, error) { - type noMethod HostRule - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HostType: A Host Type resource. -type HostType struct { - // CpuPlatform: [Output Only] The CPU platform used by this host type. - CpuPlatform string `json:"cpuPlatform,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Deprecated: [Output Only] The deprecation status associated with this - // host type. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - - // Description: [Output Only] An optional textual description of the - // resource. - Description string `json:"description,omitempty"` - - // GuestCpus: [Output Only] The number of virtual CPUs that are - // available to the host type. - GuestCpus int64 `json:"guestCpus,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] The type of the resource. Always compute#hostType - // for host types. - Kind string `json:"kind,omitempty"` - - // LocalSsdGb: [Output Only] Local SSD available to the host type, - // defined in GB. - LocalSsdGb int64 `json:"localSsdGb,omitempty"` - - // MemoryMb: [Output Only] The amount of physical memory available to - // the host type, defined in MB. - MemoryMb int64 `json:"memoryMb,omitempty"` - - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Zone: [Output Only] The name of the zone where the host type resides, - // such as us-central1-a. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CpuPlatform") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CpuPlatform") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HostType) MarshalJSON() ([]byte, error) { - type noMethod HostType - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type HostTypeAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of HostTypesScopedList resources. - Items map[string]HostTypesScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource.Always - // compute#hostTypeAggregatedList for aggregated lists of host types. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HostTypeAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod HostTypeAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HostTypeList: Contains a list of host types. -type HostTypeList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of HostType resources. - Items []*HostType `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource.Always compute#hostTypeList for - // lists of host types. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HostTypeList) MarshalJSON() ([]byte, error) { - type noMethod HostTypeList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type HostTypesScopedList struct { - // HostTypes: [Output Only] List of host types contained in this scope. - HostTypes []*HostType `json:"hostTypes,omitempty"` - - // Warning: [Output Only] An informational warning that appears when the - // host types list is empty. - Warning *HostTypesScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "HostTypes") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "HostTypes") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HostTypesScopedList) MarshalJSON() ([]byte, error) { - type noMethod HostTypesScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HostTypesScopedListWarning: [Output Only] An informational warning -// that appears when the host types list is empty. -type HostTypesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*HostTypesScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HostTypesScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod HostTypesScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type HostTypesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HostTypesScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod HostTypesScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type HostsScopedList struct { - // Hosts: [Output Only] List of hosts contained in this scope. - Hosts []*Host `json:"hosts,omitempty"` - - // Warning: [Output Only] An informational warning that appears when the - // host list is empty. - Warning *HostsScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Hosts") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Hosts") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HostsScopedList) MarshalJSON() ([]byte, error) { - type noMethod HostsScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HostsScopedListWarning: [Output Only] An informational warning that -// appears when the host list is empty. -type HostsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*HostsScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HostsScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod HostsScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type HostsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HostsScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod HostsScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HttpHealthCheck: An HttpHealthCheck resource. This resource defines a -// template for how individual instances should be checked for health, -// via HTTP. -type HttpHealthCheck struct { - // CheckIntervalSec: How often (in seconds) to send a health check. The - // default value is 5 seconds. - CheckIntervalSec int64 `json:"checkIntervalSec,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // HealthyThreshold: A so-far unhealthy instance will be marked healthy - // after this many consecutive successes. The default value is 2. - HealthyThreshold int64 `json:"healthyThreshold,omitempty"` - - // Host: The value of the host header in the HTTP health check request. - // If left empty (default value), the public IP on behalf of which this - // health check is performed will be used. - Host string `json:"host,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always - // compute#httpHealthCheck for HTTP health checks. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Port: The TCP port number for the HTTP health check request. The - // default value is 80. - Port int64 `json:"port,omitempty"` - - // RequestPath: The request path of the HTTP health check request. The - // default value is /. - RequestPath string `json:"requestPath,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // TimeoutSec: How long (in seconds) to wait before claiming failure. - // The default value is 5 seconds. It is invalid for timeoutSec to have - // greater value than checkIntervalSec. - TimeoutSec int64 `json:"timeoutSec,omitempty"` - - // UnhealthyThreshold: A so-far healthy instance will be marked - // unhealthy after this many consecutive failures. The default value is - // 2. - UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CheckIntervalSec") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CheckIntervalSec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *HttpHealthCheck) MarshalJSON() ([]byte, error) { - type noMethod HttpHealthCheck - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HttpHealthCheckList: Contains a list of HttpHealthCheck resources. -type HttpHealthCheckList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of HttpHealthCheck resources. - Items []*HttpHealthCheck `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HttpHealthCheckList) MarshalJSON() ([]byte, error) { - type noMethod HttpHealthCheckList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HttpsHealthCheck: An HttpsHealthCheck resource. This resource defines -// a template for how individual instances should be checked for health, -// via HTTPS. -type HttpsHealthCheck struct { - // CheckIntervalSec: How often (in seconds) to send a health check. The - // default value is 5 seconds. - CheckIntervalSec int64 `json:"checkIntervalSec,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // HealthyThreshold: A so-far unhealthy instance will be marked healthy - // after this many consecutive successes. The default value is 2. - HealthyThreshold int64 `json:"healthyThreshold,omitempty"` - - // Host: The value of the host header in the HTTPS health check request. - // If left empty (default value), the public IP on behalf of which this - // health check is performed will be used. - Host string `json:"host,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: Type of the resource. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Port: The TCP port number for the HTTPS health check request. The - // default value is 443. - Port int64 `json:"port,omitempty"` - - // RequestPath: The request path of the HTTPS health check request. The - // default value is "/". - RequestPath string `json:"requestPath,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // TimeoutSec: How long (in seconds) to wait before claiming failure. - // The default value is 5 seconds. It is invalid for timeoutSec to have - // a greater value than checkIntervalSec. - TimeoutSec int64 `json:"timeoutSec,omitempty"` - - // UnhealthyThreshold: A so-far healthy instance will be marked - // unhealthy after this many consecutive failures. The default value is - // 2. - UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CheckIntervalSec") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CheckIntervalSec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *HttpsHealthCheck) MarshalJSON() ([]byte, error) { - type noMethod HttpsHealthCheck - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HttpsHealthCheckList: Contains a list of HttpsHealthCheck resources. -type HttpsHealthCheckList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of HttpsHealthCheck resources. - Items []*HttpsHealthCheck `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HttpsHealthCheckList) MarshalJSON() ([]byte, error) { - type noMethod HttpsHealthCheckList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Image: An Image resource. -type Image struct { - // ArchiveSizeBytes: Size of the image tar.gz archive stored in Google - // Cloud Storage (in bytes). - ArchiveSizeBytes int64 `json:"archiveSizeBytes,omitempty,string"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Deprecated: The deprecation status associated with this image. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // DiskSizeGb: Size of the image when restored onto a persistent disk - // (in GB). - DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - - // Family: The name of the image family to which this image belongs. You - // can create disks by specifying an image family instead of a specific - // image name. The image family always returns its latest image that is - // not deprecated. The name of the image family must comply with - // RFC1035. - Family string `json:"family,omitempty"` - - // GuestOsFeatures: A list of features to enable on the guest OS. - // Applicable for bootable images only. Currently, only one feature can - // be enabled, VIRTIO_SCSI_MULTIQUEUE, which allows each virtual CPU to - // have its own queue. For Windows images, you can only enable - // VIRTIO_SCSI_MULTIQUEUE on images with driver version 1.2.0.1621 or - // higher. Linux images with kernel versions 3.17 and higher will - // support VIRTIO_SCSI_MULTIQUEUE. - // - // For new Windows images, the server might also populate this field - // with the value WINDOWS, to indicate that this is a Windows image. - // This value is purely informational and does not enable or disable any - // features. - GuestOsFeatures []*GuestOsFeature `json:"guestOsFeatures,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // ImageEncryptionKey: Encrypts the image using a customer-supplied - // encryption key. - // - // After you encrypt an image with a customer-supplied key, you must - // provide the same key if you use the image later (e.g. to create a - // disk from the image). - // - // Customer-supplied encryption keys do not protect access to metadata - // of the disk. - // - // If you do not provide an encryption key when creating the image, then - // the disk will be encrypted using an automatically generated key and - // you do not need to provide a key to use the image later. - ImageEncryptionKey *CustomerEncryptionKey `json:"imageEncryptionKey,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#image for - // images. - Kind string `json:"kind,omitempty"` - - // LabelFingerprint: A fingerprint for the labels being applied to this - // image, which is essentially a hash of the labels used for optimistic - // locking. The fingerprint is initially generated by Compute Engine and - // changes after every request to modify or update labels. You must - // always provide an up-to-date fingerprint hash in order to update or - // change labels. - // - // To see the latest fingerprint, make a get() request to retrieve an - // image. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // Labels: Labels to apply to this image. These can be later modified by - // the setLabels method. - Labels map[string]string `json:"labels,omitempty"` - - // LicenseCodes: Integer license codes indicating which licenses are - // attached to this image. - LicenseCodes googleapi.Int64s `json:"licenseCodes,omitempty"` - - // Licenses: Any applicable license URI. - Licenses []string `json:"licenses,omitempty"` - - // Name: Name of the resource; provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // RawDisk: The parameters of the raw disk image. - RawDisk *ImageRawDisk `json:"rawDisk,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // SourceDisk: URL of the source disk used to create this image. This - // can be a full or valid partial URL. You must provide either this - // property or the rawDisk.source property but not both to create an - // image. For example, the following are valid values: - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk - // - projects/project/zones/zone/disks/disk - // - zones/zone/disks/disk - SourceDisk string `json:"sourceDisk,omitempty"` - - // SourceDiskEncryptionKey: The customer-supplied encryption key of the - // source disk. Required if the source disk is protected by a - // customer-supplied encryption key. - SourceDiskEncryptionKey *CustomerEncryptionKey `json:"sourceDiskEncryptionKey,omitempty"` - - // SourceDiskId: The ID value of the disk used to create this image. - // This value may be used to determine whether the image was taken from - // the current or a previous instance of a given disk name. - SourceDiskId string `json:"sourceDiskId,omitempty"` - - // SourceImage: URL of the source image used to create this image. This - // can be a full or valid partial URL. You must provide exactly one of: - // - // - this property, or - // - the rawDisk.source property, or - // - the sourceDisk property in order to create an image. - SourceImage string `json:"sourceImage,omitempty"` - - // SourceImageEncryptionKey: The customer-supplied encryption key of the - // source image. Required if the source image is protected by a - // customer-supplied encryption key. - SourceImageEncryptionKey *CustomerEncryptionKey `json:"sourceImageEncryptionKey,omitempty"` - - // SourceImageId: [Output Only] The ID value of the image used to create - // this image. This value may be used to determine whether the image was - // taken from the current or a previous instance of a given image name. - SourceImageId string `json:"sourceImageId,omitempty"` - - // SourceType: The type of the image used to create this disk. The - // default and only value is RAW - // - // Possible values: - // "RAW" (default) - SourceType string `json:"sourceType,omitempty"` - - // Status: [Output Only] The status of the image. An image can be used - // to create other resources, such as instances, only after the image - // has been successfully created and the status is set to READY. - // Possible values are FAILED, PENDING, or READY. - // - // Possible values: - // "FAILED" - // "PENDING" - // "READY" - Status string `json:"status,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ArchiveSizeBytes") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ArchiveSizeBytes") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Image) MarshalJSON() ([]byte, error) { - type noMethod Image - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ImageRawDisk: The parameters of the raw disk image. -type ImageRawDisk struct { - // ContainerType: The format used to encode and transmit the block - // device, which should be TAR. This is just a container and - // transmission format and not a runtime format. Provided by the client - // when the disk image is created. - // - // Possible values: - // "TAR" - ContainerType string `json:"containerType,omitempty"` - - // Sha1Checksum: An optional SHA1 checksum of the disk image before - // unpackaging; provided by the client when the disk image is created. - Sha1Checksum string `json:"sha1Checksum,omitempty"` - - // Source: The full Google Cloud Storage URL where the disk image is - // stored. You must provide either this property or the sourceDisk - // property but not both. - Source string `json:"source,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ContainerType") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ContainerType") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ImageRawDisk) MarshalJSON() ([]byte, error) { - type noMethod ImageRawDisk - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ImageList: Contains a list of images. -type ImageList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Image resources. - Items []*Image `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ImageList) MarshalJSON() ([]byte, error) { - type noMethod ImageList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Instance: An Instance resource. -type Instance struct { - // CanIpForward: Allows this instance to send and receive packets with - // non-matching destination or source IPs. This is required if you plan - // to use this instance to forward routes. For more information, see - // Enabling IP Forwarding. - CanIpForward bool `json:"canIpForward,omitempty"` - - // CpuPlatform: [Output Only] The CPU platform used by this instance. - CpuPlatform string `json:"cpuPlatform,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Disks: Array of disks associated with this instance. Persistent disks - // must be created before you can assign them. - Disks []*AttachedDisk `json:"disks,omitempty"` - - // GuestAccelerators: List of the type and count of accelerator cards - // attached to the instance. - GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` - - // Host: Full or partial URL of the host resource that the instance - // should be placed on, in the format: zones/zone/hosts/host. - // - // Optional, sole-tenant Host (physical machine) that the instance will - // be placed on when it's created. The instance is guaranteed to be - // placed on the same machine as other instances with the same - // sole-tenant host. - // - // The request will be rejected if the sole-tenant host has run out of - // resources. - Host string `json:"host,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // InstanceEncryptionKey: Encrypts or decrypts data for an instance with - // a customer-supplied encryption key. - // - // If you are creating a new instance, this field encrypts the local SSD - // and in-memory contents of the instance using a key that you - // provide. - // - // If you are restarting an instance protected with a customer-supplied - // encryption key, you must provide the correct key in order to - // successfully restart the instance. - // - // If you do not provide an encryption key when creating the instance, - // then the local SSD and in-memory contents will be encrypted using an - // automatically generated key and you do not need to provide a key to - // start the instance later. - // - // Instance templates do not store customer-supplied encryption keys, so - // you cannot use your own keys to encrypt local SSDs and in-memory - // content in a managed instance group. - InstanceEncryptionKey *CustomerEncryptionKey `json:"instanceEncryptionKey,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#instance for - // instances. - Kind string `json:"kind,omitempty"` - - // LabelFingerprint: A fingerprint for this request, which is - // essentially a hash of the metadata's contents and used for optimistic - // locking. The fingerprint is initially generated by Compute Engine and - // changes after every request to modify or update metadata. You must - // always provide an up-to-date fingerprint hash in order to update or - // change metadata. - // - // To see the latest fingerprint, make get() request to the instance. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // Labels: Labels to apply to this instance. These can be later modified - // by the setLabels method. - Labels map[string]string `json:"labels,omitempty"` - - // MachineType: Full or partial URL of the machine type resource to use - // for this instance, in the format: - // zones/zone/machineTypes/machine-type. This is provided by the client - // when the instance is created. For example, the following is a valid - // partial url to a predefined machine - // type: - // - // zones/us-central1-f/machineTypes/n1-standard-1 - // - // To create a custom machine type, provide a URL to a machine type in - // the following format, where CPUS is 1 or an even number up to 32 (2, - // 4, 6, ... 24, etc), and MEMORY is the total memory for this instance. - // Memory must be a multiple of 256 MB and must be supplied in MB (e.g. - // 5 GB of memory is 5120 - // MB): - // - // zones/zone/machineTypes/custom-CPUS-MEMORY - // - // For example: zones/us-central1-f/machineTypes/custom-4-5120 - // - // For a full list of restrictions, read the Specifications for custom - // machine types. - MachineType string `json:"machineType,omitempty"` - - // Metadata: The metadata key/value pairs assigned to this instance. - // This includes custom metadata and predefined keys. - Metadata *Metadata `json:"metadata,omitempty"` - - // MinCpuPlatform: Specifies a minimum CPU platform for the VM instance. - // Applicable values are the friendly names of CPU platforms, such as - // minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy - // Bridge". - MinCpuPlatform string `json:"minCpuPlatform,omitempty"` - - // Name: The name of the resource, provided by the client when initially - // creating the resource. The resource name must be 1-63 characters - // long, and comply with RFC1035. Specifically, the name must be 1-63 - // characters long and match the regular expression - // [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a - // lowercase letter, and all following characters must be a dash, - // lowercase letter, or digit, except the last character, which cannot - // be a dash. - Name string `json:"name,omitempty"` - - // NetworkInterfaces: An array of configurations for this interface. - // This specifies how this interface is configured to interact with - // other network services, such as connecting to the internet. Only one - // interface is supported per instance. - NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` - - // Scheduling: Sets the scheduling options for this instance. - Scheduling *Scheduling `json:"scheduling,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServiceAccounts: A list of service accounts, with their specified - // scopes, authorized for this instance. Only one service account per VM - // instance is supported. - // - // Service accounts generate access tokens that can be accessed through - // the metadata server and used to authenticate applications on the - // instance. See Service Accounts for more information. - ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"` - - // StartRestricted: [Output Only] Whether a VM has been restricted for - // start because Compute Engine has detected suspicious activity. - StartRestricted bool `json:"startRestricted,omitempty"` - - // Status: [Output Only] The status of the instance. One of the - // following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, - // SUSPENDING, SUSPENDED, and TERMINATED. - // - // Possible values: - // "PROVISIONING" - // "RUNNING" - // "STAGING" - // "STOPPED" - // "STOPPING" - // "SUSPENDED" - // "SUSPENDING" - // "TERMINATED" - Status string `json:"status,omitempty"` - - // StatusMessage: [Output Only] An optional, human-readable explanation - // of the status. - StatusMessage string `json:"statusMessage,omitempty"` - - // Tags: A list of tags to apply to this instance. Tags are used to - // identify valid sources or targets for network firewalls and are - // specified by the client during instance creation. The tags can be - // later modified by the setTags method. Each tag within the list must - // comply with RFC1035. - Tags *Tags `json:"tags,omitempty"` - - // Zone: [Output Only] URL of the zone where the instance resides. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CanIpForward") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CanIpForward") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Instance) MarshalJSON() ([]byte, error) { - type noMethod Instance - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InstancesScopedList resources. - Items map[string]InstancesScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#instanceAggregatedList for aggregated lists of Instance - // resources. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod InstanceAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroup struct { - // CreationTimestamp: [Output Only] The creation timestamp for this - // instance group in RFC3339 text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Fingerprint: [Output Only] The fingerprint of the named ports. The - // system uses this fingerprint to detect conflicts when multiple users - // change the named ports concurrently. - Fingerprint string `json:"fingerprint,omitempty"` - - // Id: [Output Only] A unique identifier for this instance group, - // generated by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] The resource type, which is always - // compute#instanceGroup for instance groups. - Kind string `json:"kind,omitempty"` - - // Name: The name of the instance group. The name must be 1-63 - // characters long, and comply with RFC1035. - Name string `json:"name,omitempty"` - - // NamedPorts: Assigns a name to a port number. For example: {name: - // "http", port: 80} - // - // This allows the system to reference ports by the assigned name - // instead of a port number. Named ports can also contain multiple - // ports. For example: [{name: "http", port: 80},{name: "http", port: - // 8080}] - // - // Named ports apply to all instances in this instance group. - NamedPorts []*NamedPort `json:"namedPorts,omitempty"` - - // Network: The URL of the network to which all instances in the - // instance group belong. - Network string `json:"network,omitempty"` - - // Region: The URL of the region where the instance group is located - // (for regional resources). - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] The URL for this instance group. The server - // generates this URL. - SelfLink string `json:"selfLink,omitempty"` - - // Size: [Output Only] The total number of instances in the instance - // group. - Size int64 `json:"size,omitempty"` - - // Subnetwork: The URL of the subnetwork to which all instances in the - // instance group belong. - Subnetwork string `json:"subnetwork,omitempty"` - - // Zone: [Output Only] The URL of the zone where the instance group is - // located (for zonal resources). - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroup) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroup - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InstanceGroupsScopedList resources. - Items map[string]InstanceGroupsScopedList `json:"items,omitempty"` - - // Kind: [Output Only] The resource type, which is always - // compute#instanceGroupAggregatedList for aggregated lists of instance - // groups. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceGroupList: A list of InstanceGroup resources. -type InstanceGroupList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InstanceGroup resources. - Items []*InstanceGroup `json:"items,omitempty"` - - // Kind: [Output Only] The resource type, which is always - // compute#instanceGroupList for instance group lists. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupList) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManager: An Instance Group Manager resource. -type InstanceGroupManager struct { - Activities *InstanceGroupManagerActivities `json:"activities,omitempty"` - - // AutoHealingPolicies: The autohealing policy for this managed instance - // group. You can specify only one value. - AutoHealingPolicies []*InstanceGroupManagerAutoHealingPolicy `json:"autoHealingPolicies,omitempty"` - - // BaseInstanceName: The base instance name to use for instances in this - // group. The value must be 1-58 characters long. Instances are named by - // appending a hyphen and a random four-character string to the base - // instance name. The base instance name must comply with RFC1035. - BaseInstanceName string `json:"baseInstanceName,omitempty"` - - // CreationTimestamp: [Output Only] The creation timestamp for this - // managed instance group in RFC3339 text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // CurrentActions: [Output Only] The list of instance actions and the - // number of instances in this managed instance group that are scheduled - // for each of those actions. - CurrentActions *InstanceGroupManagerActionsSummary `json:"currentActions,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // DistributionPolicy: Policy valid only for regional managed instance - // groups. - DistributionPolicy *DistributionPolicy `json:"distributionPolicy,omitempty"` - - // FailoverAction: The action to perform in case of zone failure. Only - // one value is supported, NO_FAILOVER. The default is NO_FAILOVER. - // - // Possible values: - // "NO_FAILOVER" - // "UNKNOWN" - FailoverAction string `json:"failoverAction,omitempty"` - - // Fingerprint: [Output Only] The fingerprint of the resource data. You - // can use this optional field for optimistic locking when you update - // the resource. - Fingerprint string `json:"fingerprint,omitempty"` - - // Id: [Output Only] A unique identifier for this resource type. The - // server generates this identifier. - Id uint64 `json:"id,omitempty,string"` - - // InstanceGroup: [Output Only] The URL of the Instance Group resource. - InstanceGroup string `json:"instanceGroup,omitempty"` - - // InstanceTemplate: The URL of the instance template that is specified - // for this managed instance group. The group uses this template to - // create all new instances in the managed instance group. - InstanceTemplate string `json:"instanceTemplate,omitempty"` - - // Kind: [Output Only] The resource type, which is always - // compute#instanceGroupManager for managed instance groups. - Kind string `json:"kind,omitempty"` - - // Name: The name of the managed instance group. The name must be 1-63 - // characters long, and comply with RFC1035. - Name string `json:"name,omitempty"` - - // NamedPorts: Named ports configured for the Instance Groups - // complementary to this Instance Group Manager. - NamedPorts []*NamedPort `json:"namedPorts,omitempty"` - - // PendingActions: [Output Only] The list of instance actions and the - // number of instances in this managed instance group that are pending - // for each of those actions. - PendingActions *InstanceGroupManagerPendingActionsSummary `json:"pendingActions,omitempty"` - - // Region: [Output Only] The URL of the region where the managed - // instance group resides (for regional resources). - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] The URL for this managed instance group. The - // server defines this URL. - SelfLink string `json:"selfLink,omitempty"` - - // ServiceAccount: Service account will be used as credentials for all - // operations performed by managed instance group on instances. The - // service accounts needs all permissions required to create and delete - // instances. When not specified, the service account - // {projectNumber}@cloudservices.gserviceaccount.com will be used. - ServiceAccount string `json:"serviceAccount,omitempty"` - - // StatefulPolicy: Stateful configuration for this Instanced Group - // Manager - StatefulPolicy *InstanceGroupManagerStatefulPolicy `json:"statefulPolicy,omitempty"` - - // TargetPools: The URLs for all TargetPool resources to which instances - // in the instanceGroup field are added. The target pools automatically - // apply to all of the instances in the managed instance group. - TargetPools []string `json:"targetPools,omitempty"` - - // TargetSize: The target number of running instances for this managed - // instance group. Deleting or abandoning instances reduces this number. - // Resizing the group changes this number. - TargetSize int64 `json:"targetSize,omitempty"` - - // UpdatePolicy: The update policy for this managed instance group. - UpdatePolicy *InstanceGroupManagerUpdatePolicy `json:"updatePolicy,omitempty"` - - // Versions: Versions supported by this IGM. User should set this field - // if they need fine-grained control over how many instances in each - // version are run by this IGM. Versions are keyed by instanceTemplate. - // Every instanceTemplate can appear at most once. This field overrides - // instanceTemplate field. If both instanceTemplate and versions are - // set, the user receives a warning. "instanceTemplate: X" is - // semantically equivalent to "versions [ { instanceTemplate: X } ]". - // Exactly one version must have targetSize field left unset. Size of - // such a version will be calculated automatically. - Versions []*InstanceGroupManagerVersion `json:"versions,omitempty"` - - // Zone: [Output Only] The URL of the zone where the managed instance - // group is located (for zonal resources). - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Activities") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Activities") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManager) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManager - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerActionsSummary struct { - // Abandoning: [Output Only] The total number of instances in the - // managed instance group that are scheduled to be abandoned. Abandoning - // an instance removes it from the managed instance group without - // deleting it. - Abandoning int64 `json:"abandoning,omitempty"` - - // Creating: [Output Only] The number of instances in the managed - // instance group that are scheduled to be created or are currently - // being created. If the group fails to create any of these instances, - // it tries again until it creates the instance successfully. - // - // If you have disabled creation retries, this field will not be - // populated; instead, the creatingWithoutRetries field will be - // populated. - Creating int64 `json:"creating,omitempty"` - - // CreatingWithoutRetries: [Output Only] The number of instances that - // the managed instance group will attempt to create. The group attempts - // to create each instance only once. If the group fails to create any - // of these instances, it decreases the group's targetSize value - // accordingly. - CreatingWithoutRetries int64 `json:"creatingWithoutRetries,omitempty"` - - // Deleting: [Output Only] The number of instances in the managed - // instance group that are scheduled to be deleted or are currently - // being deleted. - Deleting int64 `json:"deleting,omitempty"` - - // None: [Output Only] The number of instances in the managed instance - // group that are running and have no scheduled actions. - None int64 `json:"none,omitempty"` - - // Recreating: [Output Only] The number of instances in the managed - // instance group that are scheduled to be recreated or are currently - // being being recreated. Recreating an instance deletes the existing - // root persistent disk and creates a new disk from the image that is - // defined in the instance template. - Recreating int64 `json:"recreating,omitempty"` - - // Refreshing: [Output Only] The number of instances in the managed - // instance group that are being reconfigured with properties that do - // not require a restart or a recreate action. For example, setting or - // removing target pools for the instance. - Refreshing int64 `json:"refreshing,omitempty"` - - // Restarting: [Output Only] The number of instances in the managed - // instance group that are scheduled to be restarted or are currently - // being restarted. - Restarting int64 `json:"restarting,omitempty"` - - // Verifying: [Output Only] The number of instances in the managed - // instance group that are being verified. More details regarding - // verification process are covered in the documentation of - // ManagedInstance.InstanceAction.VERIFYING enum field. - Verifying int64 `json:"verifying,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Abandoning") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Abandoning") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagerActionsSummary) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagerActionsSummary - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerActivities struct { - // Possible values: - // "PERMITTED" - // "PROHIBITED" - Autohealing string `json:"autohealing,omitempty"` - - // Possible values: - // "PERMITTED" - // "PROHIBITED" - AutohealingHealthCheckBased string `json:"autohealingHealthCheckBased,omitempty"` - - // Possible values: - // "PERMITTED" - // "PROHIBITED" - AutoscalingDown string `json:"autoscalingDown,omitempty"` - - // Possible values: - // "PERMITTED" - // "PROHIBITED" - AutoscalingUp string `json:"autoscalingUp,omitempty"` - - // Possible values: - // "PERMITTED" - // "PROHIBITED" - CreatingInstances string `json:"creatingInstances,omitempty"` - - // Possible values: - // "PERMITTED" - // "PROHIBITED" - DeletingInstances string `json:"deletingInstances,omitempty"` - - // Possible values: - // "PERMITTED" - // "PROHIBITED" - RecreatingInstances string `json:"recreatingInstances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Autohealing") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Autohealing") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagerActivities) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagerActivities - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InstanceGroupManagersScopedList resources. - Items map[string]InstanceGroupManagersScopedList `json:"items,omitempty"` - - // Kind: [Output Only] The resource type, which is always - // compute#instanceGroupManagerAggregatedList for an aggregated list of - // managed instance groups. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagerAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagerAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerAutoHealingPolicy struct { - // HealthCheck: The URL for the health check that signals autohealing. - HealthCheck string `json:"healthCheck,omitempty"` - - // InitialDelaySec: The number of seconds that the managed instance - // group waits before it applies autohealing policies to new instances - // or recently recreated instances. This initial delay allows instances - // to initialize and run their startup scripts before the instance group - // determines that they are UNHEALTHY. This prevents the managed - // instance group from recreating its instances prematurely. This value - // must be from range [0, 3600]. - InitialDelaySec int64 `json:"initialDelaySec,omitempty"` - - // MaxUnavailable: Maximum number of instances that can be unavailable - // when autohealing. The instance is considered available if all of the - // following conditions are satisfied: 1. Instance's status is RUNNING. - // 2. Instance's liveness health check result was observed to be HEALTHY - // at least once. By default, a percent value of 100% is used. - MaxUnavailable *FixedOrPercent `json:"maxUnavailable,omitempty"` - - // ForceSendFields is a list of field names (e.g. "HealthCheck") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "HealthCheck") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagerAutoHealingPolicy) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagerAutoHealingPolicy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagerList: [Output Only] A list of managed instance -// groups. -type InstanceGroupManagerList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InstanceGroupManager resources. - Items []*InstanceGroupManager `json:"items,omitempty"` - - // Kind: [Output Only] The resource type, which is always - // compute#instanceGroupManagerList for a list of managed instance - // groups. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagerList) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagerList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerPendingActionsSummary struct { - // Creating: [Output Only] The number of instances in the managed - // instance group that are pending to be created. - Creating int64 `json:"creating,omitempty"` - - // Deleting: [Output Only] The number of instances in the managed - // instance group that are pending to be deleted. - Deleting int64 `json:"deleting,omitempty"` - - // Recreating: [Output Only] The number of instances in the managed - // instance group that are pending to be recreated. - Recreating int64 `json:"recreating,omitempty"` - - // Restarting: [Output Only] The number of instances in the managed - // instance group that are pending to be restarted. - Restarting int64 `json:"restarting,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Creating") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Creating") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagerPendingActionsSummary) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagerPendingActionsSummary - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerStatefulPolicy struct { - // PreservedDisks: Disks created on the instances that will be preserved - // on instance delete, resize down, etc. - PreservedDisks []*InstanceGroupManagerStatefulPolicyDiskPolicy `json:"preservedDisks,omitempty"` - - // ForceSendFields is a list of field names (e.g. "PreservedDisks") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "PreservedDisks") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagerStatefulPolicy) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagerStatefulPolicy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerStatefulPolicyDiskPolicy struct { - // DeviceName: Device name of the disk to be preserved - DeviceName string `json:"deviceName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DeviceName") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DeviceName") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagerStatefulPolicyDiskPolicy) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagerStatefulPolicyDiskPolicy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerUpdatePolicy struct { - // MaxSurge: Maximum number of instances that can be created above the - // InstanceGroupManager.targetSize during the update process. By - // default, a fixed value of 1 is used. Using maxSurge > 0 will cause - // instance names to change during the update process. At least one of { - // maxSurge, maxUnavailable } must be greater than 0. - MaxSurge *FixedOrPercent `json:"maxSurge,omitempty"` - - // MaxUnavailable: Maximum number of instances that can be unavailable - // during the update process. The instance is considered available if - // all of the following conditions are satisfied: 1. Instance's status - // is RUNNING. 2. Instance's liveness health check result was observed - // to be HEALTHY at least once. By default, a fixed value of 1 is used. - // At least one of { maxSurge, maxUnavailable } must be greater than 0. - MaxUnavailable *FixedOrPercent `json:"maxUnavailable,omitempty"` - - // MinReadySec: Minimum number of seconds to wait for after a newly - // created instance becomes available. This value must be from range [0, - // 3600]. - MinReadySec int64 `json:"minReadySec,omitempty"` - - // MinimalAction: Minimal action to be taken on an instance. The order - // of action types is: RESTART < REPLACE. - // - // Possible values: - // "NONE" - // "REFRESH" - // "REPLACE" - // "RESTART" - MinimalAction string `json:"minimalAction,omitempty"` - - // Possible values: - // "OPPORTUNISTIC" - // "PROACTIVE" - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MaxSurge") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "MaxSurge") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagerUpdatePolicy) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagerUpdatePolicy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerVersion struct { - InstanceTemplate string `json:"instanceTemplate,omitempty"` - - // Name: Name of the version. Unique among all versions in the scope of - // this managed instance group. - Name string `json:"name,omitempty"` - - // Tag: Tag describing the version. Used to trigger rollout of a target - // version even if instance_template remains unchanged. Deprecated in - // favor of 'name'. - Tag string `json:"tag,omitempty"` - - // TargetSize: Intended number of instances that are created from - // instanceTemplate. The final number of instances created from - // instanceTemplate will be equal to: * if expressed as fixed number: - // min(targetSize.fixed, instanceGroupManager.targetSize), * if - // expressed as percent: ceiling(targetSize.percent * - // InstanceGroupManager.targetSize). If unset, this version will handle - // all the remaining instances. - TargetSize *FixedOrPercent `json:"targetSize,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InstanceTemplate") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "InstanceTemplate") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagerVersion) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagerVersion - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersAbandonInstancesRequest struct { - // Instances: The URLs of one or more instances to abandon. This can be - // a full URL or a partial URL, such as - // zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersAbandonInstancesRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersAbandonInstancesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagersApplyUpdatesRequest: -// InstanceGroupManagers.applyUpdatesToInstances -type InstanceGroupManagersApplyUpdatesRequest struct { - // Instances: The list of URLs of one or more instances for which we - // want to apply updates on this managed instance group. This can be a - // full URL or a partial URL, such as - // zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - - // MaximalAction: The maximal action that should be perfomed on the - // instances. By default REPLACE. - // - // Possible values: - // "NONE" - // "REFRESH" - // "REPLACE" - // "RESTART" - MaximalAction string `json:"maximalAction,omitempty"` - - // MinimalAction: The minimal action that should be perfomed on the - // instances. By default NONE. - // - // Possible values: - // "NONE" - // "REFRESH" - // "REPLACE" - // "RESTART" - MinimalAction string `json:"minimalAction,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersApplyUpdatesRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersApplyUpdatesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersDeleteInstancesRequest struct { - // Instances: The URLs of one or more instances to delete. This can be a - // full URL or a partial URL, such as - // zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersDeleteInstancesRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersDeleteInstancesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagersDeletePerInstanceConfigsReq: -// InstanceGroupManagers.deletePerInstanceConfigs -type InstanceGroupManagersDeletePerInstanceConfigsReq struct { - // Instances: The list of instances for which we want to delete - // per-instance configs on this managed instance group. - Instances []string `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersDeletePerInstanceConfigsReq) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersDeletePerInstanceConfigsReq - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersListManagedInstancesResponse struct { - // ManagedInstances: [Output Only] The list of instances in the managed - // instance group. - ManagedInstances []*ManagedInstance `json:"managedInstances,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ManagedInstances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ManagedInstances") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersListManagedInstancesResponse) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersListManagedInstancesResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersListPerInstanceConfigsResp struct { - // Items: [Output Only] The list of PerInstanceConfig. - Items []*PerInstanceConfig `json:"items,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Items") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersListPerInstanceConfigsResp) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersListPerInstanceConfigsResp - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersRecreateInstancesRequest struct { - // Instances: The URLs of one or more instances to recreate. This can be - // a full URL or a partial URL, such as - // zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersRecreateInstancesRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersRecreateInstancesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersResizeAdvancedRequest struct { - // NoCreationRetries: If this flag is true, the managed instance group - // attempts to create all instances initiated by this resize request - // only once. If there is an error during creation, the managed instance - // group does not retry create this instance, and we will decrease the - // targetSize of the request instead. If the flag is false, the group - // attemps to recreate each instance continuously until it - // succeeds. - // - // This flag matters only in the first attempt of creation of an - // instance. After an instance is successfully created while this flag - // is enabled, the instance behaves the same way as all the other - // instances created with a regular resize request. In particular, if a - // running instance dies unexpectedly at a later time and needs to be - // recreated, this mode does not affect the recreation behavior in that - // scenario. - // - // This flag is applicable only to the current resize request. It does - // not influence other resize requests in any way. - // - // You can see which instances is being creating in which mode by - // calling the get or listManagedInstances API. - NoCreationRetries bool `json:"noCreationRetries,omitempty"` - - // TargetSize: The number of running instances that the managed instance - // group should maintain at any given time. The group automatically adds - // or removes instances to maintain the number of instances specified by - // this parameter. - TargetSize int64 `json:"targetSize,omitempty"` - - // ForceSendFields is a list of field names (e.g. "NoCreationRetries") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "NoCreationRetries") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersResizeAdvancedRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersResizeAdvancedRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersScopedList struct { - // InstanceGroupManagers: [Output Only] The list of managed instance - // groups that are contained in the specified project and zone. - InstanceGroupManagers []*InstanceGroupManager `json:"instanceGroupManagers,omitempty"` - - // Warning: [Output Only] The warning that replaces the list of managed - // instance groups when the list is empty. - Warning *InstanceGroupManagersScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "InstanceGroupManagers") to unconditionally include in API requests. - // By default, fields with empty values are omitted from API requests. - // However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "InstanceGroupManagers") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersScopedList) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagersScopedListWarning: [Output Only] The warning -// that replaces the list of managed instance groups when the list is -// empty. -type InstanceGroupManagersScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*InstanceGroupManagersScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersSetAutoHealingRequest struct { - AutoHealingPolicies []*InstanceGroupManagerAutoHealingPolicy `json:"autoHealingPolicies,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AutoHealingPolicies") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AutoHealingPolicies") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersSetAutoHealingRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersSetAutoHealingRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersSetInstanceTemplateRequest struct { - // InstanceTemplate: The URL of the instance template that is specified - // for this managed instance group. The group uses this template to - // create all new instances in the managed instance group. - InstanceTemplate string `json:"instanceTemplate,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InstanceTemplate") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "InstanceTemplate") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersSetInstanceTemplateRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersSetInstanceTemplateRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersSetTargetPoolsRequest struct { - // Fingerprint: The fingerprint of the target pools information. Use - // this optional property to prevent conflicts when multiple users - // change the target pools settings concurrently. Obtain the fingerprint - // with the instanceGroupManagers.get method. Then, include the - // fingerprint in your request to ensure that you do not overwrite - // changes that were applied from another concurrent request. - Fingerprint string `json:"fingerprint,omitempty"` - - // TargetPools: The list of target pool URLs that instances in this - // managed instance group belong to. The managed instance group applies - // these target pools to all of the instances in the group. Existing - // instances and new instances in the group all receive these target - // pool settings. - TargetPools []string `json:"targetPools,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Fingerprint") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersSetTargetPoolsRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersSetTargetPoolsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagersUpdatePerInstanceConfigsReq: -// InstanceGroupManagers.updatePerInstanceConfigs -type InstanceGroupManagersUpdatePerInstanceConfigsReq struct { - // PerInstanceConfigs: The list of per-instance configs to insert or - // patch on this managed instance group. - PerInstanceConfigs []*PerInstanceConfig `json:"perInstanceConfigs,omitempty"` - - // ForceSendFields is a list of field names (e.g. "PerInstanceConfigs") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "PerInstanceConfigs") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersUpdatePerInstanceConfigsReq) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersUpdatePerInstanceConfigsReq - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsAddInstancesRequest struct { - // Instances: The list of instances to add to the instance group. - Instances []*InstanceReference `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupsAddInstancesRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupsAddInstancesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsListInstances struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InstanceWithNamedPorts resources. - Items []*InstanceWithNamedPorts `json:"items,omitempty"` - - // Kind: [Output Only] The resource type, which is always - // compute#instanceGroupsListInstances for the list of instances in the - // specified instance group. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupsListInstances) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupsListInstances - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsListInstancesRequest struct { - // InstanceState: A filter for the state of the instances in the - // instance group. Valid options are ALL or RUNNING. If you do not - // specify this parameter the list includes all instances regardless of - // their state. - // - // Possible values: - // "ALL" - // "RUNNING" - InstanceState string `json:"instanceState,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InstanceState") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "InstanceState") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupsListInstancesRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupsListInstancesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsRemoveInstancesRequest struct { - // Instances: The list of instances to remove from the instance group. - Instances []*InstanceReference `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupsRemoveInstancesRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupsRemoveInstancesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsScopedList struct { - // InstanceGroups: [Output Only] The list of instance groups that are - // contained in this scope. - InstanceGroups []*InstanceGroup `json:"instanceGroups,omitempty"` - - // Warning: [Output Only] An informational warning that replaces the - // list of instance groups when the list is empty. - Warning *InstanceGroupsScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InstanceGroups") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "InstanceGroups") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupsScopedList) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupsScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceGroupsScopedListWarning: [Output Only] An informational -// warning that replaces the list of instance groups when the list is -// empty. -type InstanceGroupsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*InstanceGroupsScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupsScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupsScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupsScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupsScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsSetNamedPortsRequest struct { - // Fingerprint: The fingerprint of the named ports information for this - // instance group. Use this optional property to prevent conflicts when - // multiple users change the named ports settings concurrently. Obtain - // the fingerprint with the instanceGroups.get method. Then, include the - // fingerprint in your request to ensure that you do not overwrite - // changes that were applied from another concurrent request. - Fingerprint string `json:"fingerprint,omitempty"` - - // NamedPorts: The list of named ports to set for this instance group. - NamedPorts []*NamedPort `json:"namedPorts,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Fingerprint") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupsSetNamedPortsRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupsSetNamedPortsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceList: Contains a list of instances. -type InstanceList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Instance resources. - Items []*Instance `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#instanceList for - // lists of Instance resources. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceList) MarshalJSON() ([]byte, error) { - type noMethod InstanceList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceListReferrers: Contains a list of instance referrers. -type InstanceListReferrers struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Reference resources. - Items []*Reference `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#instanceListReferrers for lists of Instance referrers. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceListReferrers) MarshalJSON() ([]byte, error) { - type noMethod InstanceListReferrers - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceMoveRequest struct { - // DestinationZone: The URL of the destination zone to move the - // instance. This can be a full or partial URL. For example, the - // following are all valid URLs to a zone: - // - https://www.googleapis.com/compute/v1/projects/project/zones/zone - // - // - projects/project/zones/zone - // - zones/zone - DestinationZone string `json:"destinationZone,omitempty"` - - // TargetInstance: The URL of the target instance to move. This can be a - // full or partial URL. For example, the following are all valid URLs to - // an instance: - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance - // - projects/project/zones/zone/instances/instance - // - zones/zone/instances/instance - TargetInstance string `json:"targetInstance,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DestinationZone") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DestinationZone") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstanceMoveRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceMoveRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceProperties struct { - // CanIpForward: Enables instances created based on this template to - // send packets with source IP addresses other than their own and - // receive packets with destination IP addresses other than their own. - // If these instances will be used as an IP gateway or it will be set as - // the next-hop in a Route resource, specify true. If unsure, leave this - // set to false. See the Enable IP forwarding documentation for more - // information. - CanIpForward bool `json:"canIpForward,omitempty"` - - // Description: An optional text description for the instances that are - // created from this instance template. - Description string `json:"description,omitempty"` - - // Disks: An array of disks that are associated with the instances that - // are created from this template. - Disks []*AttachedDisk `json:"disks,omitempty"` - - // GuestAccelerators: A list of guest accelerator cards' type and count - // to use for instances created from the instance template. - GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` - - // Labels: Labels to apply to instances that are created from this - // template. - Labels map[string]string `json:"labels,omitempty"` - - // MachineType: The machine type to use for instances that are created - // from this template. - MachineType string `json:"machineType,omitempty"` - - // Metadata: The metadata key/value pairs to assign to instances that - // are created from this template. These pairs can consist of custom - // metadata or predefined keys. See Project and instance metadata for - // more information. - Metadata *Metadata `json:"metadata,omitempty"` - - // MinCpuPlatform: Minimum cpu/platform to be used by this instance. The - // instance may be scheduled on the specified or newer cpu/platform. - // Applicable values are the friendly names of CPU platforms, such as - // minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy - // Bridge". For more information, read Specifying a Minimum CPU - // Platform. - MinCpuPlatform string `json:"minCpuPlatform,omitempty"` - - // NetworkInterfaces: An array of network access configurations for this - // interface. - NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` - - // Scheduling: Specifies the scheduling options for the instances that - // are created from this template. - Scheduling *Scheduling `json:"scheduling,omitempty"` - - // ServiceAccounts: A list of service accounts with specified scopes. - // Access tokens for these service accounts are available to the - // instances that are created from this template. Use metadata queries - // to obtain the access tokens for these instances. - ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"` - - // Tags: A list of tags to apply to the instances that are created from - // this template. The tags identify valid sources or targets for network - // firewalls. The setTags method can modify this list of tags. Each tag - // within the list must comply with RFC1035. - Tags *Tags `json:"tags,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CanIpForward") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CanIpForward") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceProperties) MarshalJSON() ([]byte, error) { - type noMethod InstanceProperties - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceReference struct { - // Instance: The URL for a specific instance. - Instance string `json:"instance,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instance") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instance") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceReference) MarshalJSON() ([]byte, error) { - type noMethod InstanceReference - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceTemplate: An Instance Template resource. -type InstanceTemplate struct { - // CreationTimestamp: [Output Only] The creation timestamp for this - // instance template in RFC3339 text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] A unique identifier for this instance template. The - // server defines this identifier. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] The resource type, which is always - // compute#instanceTemplate for instance templates. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource; provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Properties: The instance properties for this instance template. - Properties *InstanceProperties `json:"properties,omitempty"` - - // SelfLink: [Output Only] The URL for this instance template. The - // server defines this URL. - SelfLink string `json:"selfLink,omitempty"` - - // SourceInstance: The source instance used to create the template. You - // can provide this as a partial or full URL to the resource. For - // example, the following are valid values: - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance - // - projects/project/zones/zone/instances/instance - SourceInstance string `json:"sourceInstance,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstanceTemplate) MarshalJSON() ([]byte, error) { - type noMethod InstanceTemplate - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceTemplateList: A list of instance templates. -type InstanceTemplateList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InstanceTemplate resources. - Items []*InstanceTemplate `json:"items,omitempty"` - - // Kind: [Output Only] The resource type, which is always - // compute#instanceTemplatesListResponse for instance template lists. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceTemplateList) MarshalJSON() ([]byte, error) { - type noMethod InstanceTemplateList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceWithNamedPorts struct { - // Instance: [Output Only] The URL of the instance. - Instance string `json:"instance,omitempty"` - - // NamedPorts: [Output Only] The named ports that belong to this - // instance group. - NamedPorts []*NamedPort `json:"namedPorts,omitempty"` - - // Status: [Output Only] The status of the instance. - // - // Possible values: - // "PROVISIONING" - // "RUNNING" - // "STAGING" - // "STOPPED" - // "STOPPING" - // "SUSPENDED" - // "SUSPENDING" - // "TERMINATED" - Status string `json:"status,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instance") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instance") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceWithNamedPorts) MarshalJSON() ([]byte, error) { - type noMethod InstanceWithNamedPorts - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstancesScopedList struct { - // Instances: [Output Only] List of instances contained in this scope. - Instances []*Instance `json:"instances,omitempty"` - - // Warning: [Output Only] Informational warning which replaces the list - // of instances when the list is empty. - Warning *InstancesScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstancesScopedList) MarshalJSON() ([]byte, error) { - type noMethod InstancesScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstancesScopedListWarning: [Output Only] Informational warning which -// replaces the list of instances when the list is empty. -type InstancesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*InstancesScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstancesScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod InstancesScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstancesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstancesScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod InstancesScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstancesSetLabelsRequest struct { - // LabelFingerprint: Fingerprint of the previous set of labels for this - // resource, used to prevent conflicts. Provide the latest fingerprint - // value when making a request to add or change labels. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - Labels map[string]string `json:"labels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LabelFingerprint") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "LabelFingerprint") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstancesSetLabelsRequest) MarshalJSON() ([]byte, error) { - type noMethod InstancesSetLabelsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstancesSetMachineResourcesRequest struct { - // GuestAccelerators: List of the type and count of accelerator cards - // attached to the instance. - GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` - - // ForceSendFields is a list of field names (e.g. "GuestAccelerators") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "GuestAccelerators") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstancesSetMachineResourcesRequest) MarshalJSON() ([]byte, error) { - type noMethod InstancesSetMachineResourcesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstancesSetMachineTypeRequest struct { - // MachineType: Full or partial URL of the machine type resource. See - // Machine Types for a full list of machine types. For example: - // zones/us-central1-f/machineTypes/n1-standard-1 - MachineType string `json:"machineType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MachineType") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "MachineType") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstancesSetMachineTypeRequest) MarshalJSON() ([]byte, error) { - type noMethod InstancesSetMachineTypeRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstancesSetMinCpuPlatformRequest struct { - // MinCpuPlatform: Minimum cpu/platform this instance should be started - // at. - MinCpuPlatform string `json:"minCpuPlatform,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MinCpuPlatform") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "MinCpuPlatform") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstancesSetMinCpuPlatformRequest) MarshalJSON() ([]byte, error) { - type noMethod InstancesSetMinCpuPlatformRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstancesSetServiceAccountRequest struct { - // Email: Email address of the service account. - Email string `json:"email,omitempty"` - - // Scopes: The list of scopes to be made available for this service - // account. - Scopes []string `json:"scopes,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Email") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Email") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstancesSetServiceAccountRequest) MarshalJSON() ([]byte, error) { - type noMethod InstancesSetServiceAccountRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstancesStartWithEncryptionKeyRequest struct { - // Disks: Array of disks associated with this instance that are - // protected with a customer-supplied encryption key. - // - // In order to start the instance, the disk url and its corresponding - // key must be provided. - // - // If the disk is not protected with a customer-supplied encryption key - // it should not be specified. - Disks []*CustomerEncryptionKeyProtectedDisk `json:"disks,omitempty"` - - // InstanceEncryptionKey: Decrypts data associated with an instance that - // is protected with a customer-supplied encryption key. - // - // If the instance you are starting is protected with a - // customer-supplied encryption key, the correct key must be provided - // otherwise the instance start will not succeed. - InstanceEncryptionKey *CustomerEncryptionKey `json:"instanceEncryptionKey,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Disks") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Disks") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstancesStartWithEncryptionKeyRequest) MarshalJSON() ([]byte, error) { - type noMethod InstancesStartWithEncryptionKeyRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Interconnect: Protocol definitions for Mixer API to support -// Interconnect. Next available tag: 23 -type Interconnect struct { - // AdminEnabled: Administrative status of the interconnect. When this is - // set to ?true?, the Interconnect is functional and may carry traffic - // (assuming there are functional InterconnectAttachments and other - // requirements are satisfied). When set to ?false?, no packets will be - // carried over this Interconnect and no BGP routes will be exchanged - // over it. By default, it is set to ?true?. - AdminEnabled bool `json:"adminEnabled,omitempty"` - - // ConnectionAuthorization: [Output Only] URL to retrieve the Letter Of - // Authority and Customer Facility Assignment (LOA-CFA) documentation - // relating to this Interconnect. This documentation authorizes the - // facility provider to connect to the specified crossconnect ports. - ConnectionAuthorization string `json:"connectionAuthorization,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // CustomerName: Customer name, to put in the Letter of Authorization as - // the party authorized to request a crossconnect. - CustomerName string `json:"customerName,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // ExpectedOutages: [Output Only] List of outages expected for this - // Interconnect. - ExpectedOutages []*InterconnectOutageNotification `json:"expectedOutages,omitempty"` - - // GoogleIpAddress: [Output Only] IP address configured on the Google - // side of the Interconnect link. This can be used only for ping tests. - GoogleIpAddress string `json:"googleIpAddress,omitempty"` - - // GoogleReferenceId: [Output Only] Google reference ID; to be used when - // raising support tickets with Google or otherwise to debug backend - // connectivity issues. - GoogleReferenceId string `json:"googleReferenceId,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // InterconnectAttachments: [Output Only] A list of the URLs of all - // InterconnectAttachments configured to use this Interconnect. - InterconnectAttachments []string `json:"interconnectAttachments,omitempty"` - - // Possible values: - // "IT_PRIVATE" - InterconnectType string `json:"interconnectType,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#interconnect - // for interconnects. - Kind string `json:"kind,omitempty"` - - // Possible values: - // "LINK_TYPE_ETHERNET_10G_LR" - LinkType string `json:"linkType,omitempty"` - - // Location: URL of the InterconnectLocation object that represents - // where this connection is to be provisioned. - Location string `json:"location,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // NocContactEmail: Email address to contact the customer NOC for - // operations and maintenance notifications regarding this Interconnect. - // If specified, this will be used for notifications in addition to all - // other forms described, such as Stackdriver logs alerting and Cloud - // Notifications. - NocContactEmail string `json:"nocContactEmail,omitempty"` - - // OperationalStatus: [Output Only] The current status of whether or not - // this Interconnect is functional. - // - // Possible values: - // "OS_ACTIVE" - // "OS_UNPROVISIONED" - OperationalStatus string `json:"operationalStatus,omitempty"` - - // PeerIpAddress: [Output Only] IP address configured on the customer - // side of the Interconnect link. The customer should configure this IP - // address during turnup when prompted by Google NOC. This can be used - // only for ping tests. - PeerIpAddress string `json:"peerIpAddress,omitempty"` - - // ProvisionedLinkCount: [Output Only] Number of links actually - // provisioned in this interconnect. - ProvisionedLinkCount int64 `json:"provisionedLinkCount,omitempty"` - - // RequestedLinkCount: Target number of physical links in the link - // bundle, as requested by the customer. - RequestedLinkCount int64 `json:"requestedLinkCount,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "AdminEnabled") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AdminEnabled") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Interconnect) MarshalJSON() ([]byte, error) { - type noMethod Interconnect - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachment: Protocol definitions for Mixer API to support -// InterconnectAttachment. Next available tag: 14 -type InterconnectAttachment struct { - // CloudRouterIpAddress: [Output Only] IPv4 address + prefix length to - // be configured on Cloud Router Interface for this interconnect - // attachment. - CloudRouterIpAddress string `json:"cloudRouterIpAddress,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // CustomerRouterIpAddress: [Output Only] IPv4 address + prefix length - // to be configured on the customer router subinterface for this - // interconnect attachment. - CustomerRouterIpAddress string `json:"customerRouterIpAddress,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // GoogleReferenceId: [Output Only] Google reference ID, to be used when - // raising support tickets with Google or otherwise to debug backend - // connectivity issues. - GoogleReferenceId string `json:"googleReferenceId,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Interconnect: URL of the underlying Interconnect object that this - // attachment's traffic will traverse through. - Interconnect string `json:"interconnect,omitempty"` - - // Kind: [Output Only] Type of the resource. Always - // compute#interconnectAttachment for interconnect attachments. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // OperationalStatus: [Output Only] The current status of whether or not - // this interconnect attachment is functional. - // - // Possible values: - // "OS_ACTIVE" - // "OS_UNPROVISIONED" - OperationalStatus string `json:"operationalStatus,omitempty"` - - // PrivateInterconnectInfo: [Output Only] Information specific to a - // Private InterconnectAttachment. Only populated if the interconnect - // that this is attached is of type IT_PRIVATE. - PrivateInterconnectInfo *InterconnectAttachmentPrivateInfo `json:"privateInterconnectInfo,omitempty"` - - // Region: [Output Only] URL of the region where the regional - // interconnect attachment resides. - Region string `json:"region,omitempty"` - - // Router: URL of the cloud router to be used for dynamic routing. This - // router must be in the same region as this InterconnectAttachment. The - // InterconnectAttachment will automatically connect the Interconnect to - // the network & region within which the Cloud Router is configured. - Router string `json:"router,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. - // "CloudRouterIpAddress") to unconditionally include in API requests. - // By default, fields with empty values are omitted from API requests. - // However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CloudRouterIpAddress") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InterconnectAttachment) MarshalJSON() ([]byte, error) { - type noMethod InterconnectAttachment - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InterconnectAttachmentAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InterconnectAttachmentsScopedList resources. - Items map[string]InterconnectAttachmentsScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#interconnectAttachmentAggregatedList for aggregated lists of - // interconnect attachments. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InterconnectAttachmentAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod InterconnectAttachmentAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentList: Response to the list request, and -// contains a list of interconnect attachments. -type InterconnectAttachmentList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InterconnectAttachment resources. - Items []*InterconnectAttachment `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#interconnectAttachmentList for lists of interconnect - // attachments. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InterconnectAttachmentList) MarshalJSON() ([]byte, error) { - type noMethod InterconnectAttachmentList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentPrivateInfo: Private information for an -// interconnect attachment when this belongs to an interconnect of type -// IT_PRIVATE. -type InterconnectAttachmentPrivateInfo struct { - // Tag8021q: [Output Only] 802.1q encapsulation tag to be used for - // traffic between Google and the customer, going to and from this - // network and region. - Tag8021q int64 `json:"tag8021q,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Tag8021q") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Tag8021q") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InterconnectAttachmentPrivateInfo) MarshalJSON() ([]byte, error) { - type noMethod InterconnectAttachmentPrivateInfo - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InterconnectAttachmentsScopedList struct { - // InterconnectAttachments: List of interconnect attachments contained - // in this scope. - InterconnectAttachments []*InterconnectAttachment `json:"interconnectAttachments,omitempty"` - - // Warning: Informational warning which replaces the list of addresses - // when the list is empty. - Warning *InterconnectAttachmentsScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "InterconnectAttachments") to unconditionally include in API - // requests. By default, fields with empty values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "InterconnectAttachments") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InterconnectAttachmentsScopedList) MarshalJSON() ([]byte, error) { - type noMethod InterconnectAttachmentsScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentsScopedListWarning: Informational warning which -// replaces the list of addresses when the list is empty. -type InterconnectAttachmentsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*InterconnectAttachmentsScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InterconnectAttachmentsScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod InterconnectAttachmentsScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InterconnectAttachmentsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InterconnectAttachmentsScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod InterconnectAttachmentsScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InterconnectList: Response to the list request, and contains a list -// of interconnects. -type InterconnectList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Interconnect resources. - Items []*Interconnect `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#interconnectList - // for lists of interconnects. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InterconnectList) MarshalJSON() ([]byte, error) { - type noMethod InterconnectList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InterconnectLocation: Protocol definitions for Mixer API to support -// InterconnectLocation. -type InterconnectLocation struct { - // Address: [Output Only] The postal address of the Point of Presence, - // each line in the address is separated by a newline character. - Address string `json:"address,omitempty"` - - // AvailabilityZone: Availability zone for this location. Within a city, - // maintenance will not be simultaneously scheduled in more than one - // availability zone. Example: "zone1" or "zone2". - AvailabilityZone string `json:"availabilityZone,omitempty"` - - // City: City designator used by the Interconnect UI to locate this - // InterconnectLocation within the Continent. For example: "Chicago, - // IL", "Amsterdam, Netherlands". - City string `json:"city,omitempty"` - - // Continent: Continent for this location. Used by the location picker - // in the Interconnect UI. - // - // Possible values: - // "C_AFRICA" - // "C_ASIA_PAC" - // "C_EUROPE" - // "C_NORTH_AMERICA" - // "C_SOUTH_AMERICA" - Continent string `json:"continent,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: [Output Only] An optional description of the resource. - Description string `json:"description,omitempty"` - - // FacilityProvider: [Output Only] The name of the provider for this - // facility (e.g., EQUINIX). - FacilityProvider string `json:"facilityProvider,omitempty"` - - // FacilityProviderFacilityId: [Output Only] A provider-assigned - // Identifier for this facility (e.g., Ashburn-DC1). - FacilityProviderFacilityId string `json:"facilityProviderFacilityId,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always - // compute#interconnectLocation for interconnect locations. - Kind string `json:"kind,omitempty"` - - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - - // PeeringdbFacilityId: [Output Only] The peeringdb identifier for this - // facility (corresponding with a netfac type in peeringdb). - PeeringdbFacilityId string `json:"peeringdbFacilityId,omitempty"` - - // RegionInfos: [Output Only] A list of InterconnectLocation.RegionInfo - // objects, that describe parameters pertaining to the relation between - // this InterconnectLocation and various Google Cloud regions. - RegionInfos []*InterconnectLocationRegionInfo `json:"regionInfos,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Address") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Address") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InterconnectLocation) MarshalJSON() ([]byte, error) { - type noMethod InterconnectLocation - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InterconnectLocationList: Response to the list request, and contains -// a list of interconnect locations. -type InterconnectLocationList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InterconnectLocation resources. - Items []*InterconnectLocation `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#interconnectLocationList for lists of interconnect locations. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InterconnectLocationList) MarshalJSON() ([]byte, error) { - type noMethod InterconnectLocationList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InterconnectLocationRegionInfo: Information about any potential -// InterconnectAttachments between an Interconnect at a specific -// InterconnectLocation, and a specific Cloud Region. -type InterconnectLocationRegionInfo struct { - // ExpectedRttMs: Expected round-trip time in milliseconds, from this - // InterconnectLocation to a VM in this region. - ExpectedRttMs int64 `json:"expectedRttMs,omitempty,string"` - - // LocationPresence: Identifies the network presence of this location. - // - // Possible values: - // "LP_GLOBAL" - // "LP_LOCAL_REGION" - LocationPresence string `json:"locationPresence,omitempty"` - - // RegionKey: Scope key for the region of this location. - RegionKey string `json:"regionKey,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExpectedRttMs") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ExpectedRttMs") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InterconnectLocationRegionInfo) MarshalJSON() ([]byte, error) { - type noMethod InterconnectLocationRegionInfo - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InterconnectOutageNotification: Description of a planned outage on -// this Interconnect. Next id: 9 -type InterconnectOutageNotification struct { - // AffectedCircuits: Iff issue_type is IT_PARTIAL_OUTAGE, a list of the - // Google-side circuit IDs that will be affected. - AffectedCircuits []string `json:"affectedCircuits,omitempty"` - - // Description: Short user-visible description of the purpose of the - // outage. - Description string `json:"description,omitempty"` - - EndTime int64 `json:"endTime,omitempty,string"` - - // Possible values: - // "IT_OUTAGE" - // "IT_PARTIAL_OUTAGE" - IssueType string `json:"issueType,omitempty"` - - // Name: Unique identifier for this outage notification. - Name string `json:"name,omitempty"` - - // Possible values: - // "NSRC_GOOGLE" - Source string `json:"source,omitempty"` - - // StartTime: Scheduled start and end times for the outage (milliseconds - // since Unix epoch). - StartTime int64 `json:"startTime,omitempty,string"` - - // Possible values: - // "NS_ACTIVE" - // "NS_CANCELED" - State string `json:"state,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AffectedCircuits") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AffectedCircuits") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InterconnectOutageNotification) MarshalJSON() ([]byte, error) { - type noMethod InterconnectOutageNotification - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InternalIpOwner struct { - // IpCidrRange: IP CIDR range being owned. - IpCidrRange string `json:"ipCidrRange,omitempty"` - - // Owners: URLs of the IP owners of the IP CIDR range. - Owners []string `json:"owners,omitempty"` - - // SystemOwned: Whether this IP CIDR range is reserved for system use. - SystemOwned bool `json:"systemOwned,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IpCidrRange") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IpCidrRange") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InternalIpOwner) MarshalJSON() ([]byte, error) { - type noMethod InternalIpOwner - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// IpOwnerList: Contains a list of IP owners. -type IpOwnerList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InternalIpOwner resources. - Items []*InternalIpOwner `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#ipOwnerList for - // lists of IP owners. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *IpOwnerList) MarshalJSON() ([]byte, error) { - type noMethod IpOwnerList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// License: A license resource. -type License struct { - // ChargesUseFee: [Output Only] Deprecated. This field no longer - // reflects whether a license charges a usage fee. - ChargesUseFee bool `json:"chargesUseFee,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional textual description of the resource; - // provided by the client when the resource is created. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of resource. Always compute#license for - // licenses. - Kind string `json:"kind,omitempty"` - - // LicenseCode: [Output Only] The unique code used to attach this - // license to images, snapshots, and disks. - LicenseCode uint64 `json:"licenseCode,omitempty,string"` - - // Name: [Output Only] Name of the resource. The name is 1-63 characters - // long and complies with RFC1035. - Name string `json:"name,omitempty"` - - ResourceRequirements *LicenseResourceRequirements `json:"resourceRequirements,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Transferable: If false, licenses will not be copied from the source - // resource when creating an image from a disk, disk from snapshot, or - // snapshot from disk. - Transferable bool `json:"transferable,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ChargesUseFee") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ChargesUseFee") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *License) MarshalJSON() ([]byte, error) { - type noMethod License - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type LicenseResourceRequirements struct { - // MinGuestCpuCount: Minimum number of guest cpus required to use the - // Instance. Enforced at Instance creation and Instance start. - MinGuestCpuCount int64 `json:"minGuestCpuCount,omitempty"` - - // MinMemoryMb: Minimum memory required to use the Instance. Enforced at - // Instance creation and Instance start. - MinMemoryMb int64 `json:"minMemoryMb,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MinGuestCpuCount") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "MinGuestCpuCount") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *LicenseResourceRequirements) MarshalJSON() ([]byte, error) { - type noMethod LicenseResourceRequirements - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type LicensesListResponse struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of License resources. - Items []*License `json:"items,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *LicensesListResponse) MarshalJSON() ([]byte, error) { - type noMethod LicensesListResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// LogConfig: Specifies what kind of log the caller must write -type LogConfig struct { - // CloudAudit: Cloud audit options. - CloudAudit *LogConfigCloudAuditOptions `json:"cloudAudit,omitempty"` - - // Counter: Counter options. - Counter *LogConfigCounterOptions `json:"counter,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CloudAudit") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CloudAudit") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *LogConfig) MarshalJSON() ([]byte, error) { - type noMethod LogConfig - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// LogConfigCloudAuditOptions: Write a Cloud Audit log -type LogConfigCloudAuditOptions struct { - // AuthorizationLoggingOptions: Information used by the Cloud Audit - // Logging pipeline. - AuthorizationLoggingOptions *AuthorizationLoggingOptions `json:"authorizationLoggingOptions,omitempty"` - - // LogName: The log_name to populate in the Cloud Audit Record. - // - // Possible values: - // "ADMIN_ACTIVITY" - // "DATA_ACCESS" - // "UNSPECIFIED_LOG_NAME" - LogName string `json:"logName,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "AuthorizationLoggingOptions") to unconditionally include in API - // requests. By default, fields with empty values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. - // "AuthorizationLoggingOptions") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *LogConfigCloudAuditOptions) MarshalJSON() ([]byte, error) { - type noMethod LogConfigCloudAuditOptions - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// LogConfigCounterOptions: Options for counters -type LogConfigCounterOptions struct { - // Field: The field value to attribute. - Field string `json:"field,omitempty"` - - // Metric: The metric to update. - Metric string `json:"metric,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Field") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Field") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *LogConfigCounterOptions) MarshalJSON() ([]byte, error) { - type noMethod LogConfigCounterOptions - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// MachineType: A Machine Type resource. -type MachineType struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Deprecated: [Output Only] The deprecation status associated with this - // machine type. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - - // Description: [Output Only] An optional textual description of the - // resource. - Description string `json:"description,omitempty"` - - // GuestCpus: [Output Only] The number of virtual CPUs that are - // available to the instance. - GuestCpus int64 `json:"guestCpus,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // IsSharedCpu: [Output Only] Whether this machine type has a shared - // CPU. See Shared-core machine types for more information. - IsSharedCpu bool `json:"isSharedCpu,omitempty"` - - // Kind: [Output Only] The type of the resource. Always - // compute#machineType for machine types. - Kind string `json:"kind,omitempty"` - - // MaximumPersistentDisks: [Output Only] Maximum persistent disks - // allowed. - MaximumPersistentDisks int64 `json:"maximumPersistentDisks,omitempty"` - - // MaximumPersistentDisksSizeGb: [Output Only] Maximum total persistent - // disks size (GB) allowed. - MaximumPersistentDisksSizeGb int64 `json:"maximumPersistentDisksSizeGb,omitempty,string"` - - // MemoryMb: [Output Only] The amount of physical memory available to - // the instance, defined in MB. - MemoryMb int64 `json:"memoryMb,omitempty"` - - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Zone: [Output Only] The name of the zone where the machine type - // resides, such as us-central1-a. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *MachineType) MarshalJSON() ([]byte, error) { - type noMethod MachineType - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type MachineTypeAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of MachineTypesScopedList resources. - Items map[string]MachineTypesScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#machineTypeAggregatedList for aggregated lists of machine - // types. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *MachineTypeAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod MachineTypeAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// MachineTypeList: Contains a list of machine types. -type MachineTypeList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of MachineType resources. - Items []*MachineType `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#machineTypeList - // for lists of machine types. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *MachineTypeList) MarshalJSON() ([]byte, error) { - type noMethod MachineTypeList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type MachineTypesScopedList struct { - // MachineTypes: [Output Only] List of machine types contained in this - // scope. - MachineTypes []*MachineType `json:"machineTypes,omitempty"` - - // Warning: [Output Only] An informational warning that appears when the - // machine types list is empty. - Warning *MachineTypesScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MachineTypes") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "MachineTypes") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *MachineTypesScopedList) MarshalJSON() ([]byte, error) { - type noMethod MachineTypesScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// MachineTypesScopedListWarning: [Output Only] An informational warning -// that appears when the machine types list is empty. -type MachineTypesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*MachineTypesScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *MachineTypesScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod MachineTypesScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type MachineTypesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *MachineTypesScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod MachineTypesScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ManagedInstance struct { - // CurrentAction: [Output Only] The current action that the managed - // instance group has scheduled for the instance. Possible values: - // - NONE The instance is running, and the managed instance group does - // not have any scheduled actions for this instance. - // - CREATING The managed instance group is creating this instance. If - // the group fails to create this instance, it will try again until it - // is successful. - // - CREATING_WITHOUT_RETRIES The managed instance group is attempting - // to create this instance only once. If the group fails to create this - // instance, it does not try again and the group's targetSize value is - // decreased instead. - // - RECREATING The managed instance group is recreating this instance. - // - // - DELETING The managed instance group is permanently deleting this - // instance. - // - ABANDONING The managed instance group is abandoning this instance. - // The instance will be removed from the instance group and from any - // target pools that are associated with this group. - // - RESTARTING The managed instance group is restarting the instance. - // - // - REFRESHING The managed instance group is applying configuration - // changes to the instance without stopping it. For example, the group - // can update the target pool list for an instance without stopping that - // instance. - // - // Possible values: - // "ABANDONING" - // "CREATING" - // "CREATING_WITHOUT_RETRIES" - // "DELETING" - // "NONE" - // "RECREATING" - // "REFRESHING" - // "RESTARTING" - // "VERIFYING" - CurrentAction string `json:"currentAction,omitempty"` - - // Id: [Output only] The unique identifier for this resource. This field - // is empty when instance does not exist. - Id uint64 `json:"id,omitempty,string"` - - // Instance: [Output Only] The URL of the instance. The URL can exist - // even if the instance has not yet been created. - Instance string `json:"instance,omitempty"` - - // InstanceStatus: [Output Only] The status of the instance. This field - // is empty when the instance does not exist. - // - // Possible values: - // "PROVISIONING" - // "RUNNING" - // "STAGING" - // "STOPPED" - // "STOPPING" - // "SUSPENDED" - // "SUSPENDING" - // "TERMINATED" - InstanceStatus string `json:"instanceStatus,omitempty"` - - // InstanceTemplate: [Output Only] The intended template of the - // instance. This field is empty when current_action is one of { - // DELETING, ABANDONING }. - InstanceTemplate string `json:"instanceTemplate,omitempty"` - - // LastAttempt: [Output Only] Information about the last attempt to - // create or delete the instance. - LastAttempt *ManagedInstanceLastAttempt `json:"lastAttempt,omitempty"` - - // Override: [Output Only] Override defined for this instance. - Override *ManagedInstanceOverride `json:"override,omitempty"` - - // StandbyMode: [Output Only] Standby mode of the instance. This field - // is non-empty iff the instance is a standby. - // - // Possible values: - // "DRAINED" - StandbyMode string `json:"standbyMode,omitempty"` - - // Tag: [Output Only] Tag describing the version. - Tag string `json:"tag,omitempty"` - - // Version: [Output Only] Intended version of this instance. - Version *ManagedInstanceVersion `json:"version,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CurrentAction") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CurrentAction") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ManagedInstance) MarshalJSON() ([]byte, error) { - type noMethod ManagedInstance - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ManagedInstanceLastAttempt struct { - // Errors: [Output Only] Encountered errors during the last attempt to - // create or delete the instance. - Errors *ManagedInstanceLastAttemptErrors `json:"errors,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Errors") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ManagedInstanceLastAttempt) MarshalJSON() ([]byte, error) { - type noMethod ManagedInstanceLastAttempt - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ManagedInstanceLastAttemptErrors: [Output Only] Encountered errors -// during the last attempt to create or delete the instance. -type ManagedInstanceLastAttemptErrors struct { - // Errors: [Output Only] The array of errors encountered while - // processing this operation. - Errors []*ManagedInstanceLastAttemptErrorsErrors `json:"errors,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Errors") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ManagedInstanceLastAttemptErrors) MarshalJSON() ([]byte, error) { - type noMethod ManagedInstanceLastAttemptErrors - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ManagedInstanceLastAttemptErrorsErrors struct { - // Code: [Output Only] The error type identifier for this error. - Code string `json:"code,omitempty"` - - // Location: [Output Only] Indicates the field in the request that - // caused the error. This property is optional. - Location string `json:"location,omitempty"` - - // Message: [Output Only] An optional, human-readable error message. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ManagedInstanceLastAttemptErrorsErrors) MarshalJSON() ([]byte, error) { - type noMethod ManagedInstanceLastAttemptErrorsErrors - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ManagedInstanceOverride: Overrides of stateful properties for a given -// instance -type ManagedInstanceOverride struct { - // Disks: Disk overrides defined for this instance - Disks []*ManagedInstanceOverrideDiskOverride `json:"disks,omitempty"` - - // Metadata: Metadata overrides defined for this instance. - Metadata []*ManagedInstanceOverrideMetadata `json:"metadata,omitempty"` - - // Origin: [Output Only] Indicates where does the override come from. - // - // Possible values: - // "AUTO_GENERATED" - // "USER_GENERATED" - Origin string `json:"origin,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Disks") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Disks") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ManagedInstanceOverride) MarshalJSON() ([]byte, error) { - type noMethod ManagedInstanceOverride - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ManagedInstanceOverrideMetadata struct { - // Key: Key for the metadata entry. Keys must conform to the following - // regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is - // reflected as part of a URL in the metadata server. Additionally, to - // avoid ambiguity, keys must not conflict with any other metadata keys - // for the project. - Key string `json:"key,omitempty"` - - // Value: Value for the metadata entry. These are free-form strings, and - // only have meaning as interpreted by the image running in the - // instance. The only restriction placed on values is that their size - // must be less than or equal to 262144 bytes (256 KiB). - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ManagedInstanceOverrideMetadata) MarshalJSON() ([]byte, error) { - type noMethod ManagedInstanceOverrideMetadata - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ManagedInstanceOverrideDiskOverride struct { - // DeviceName: The name of the device on the VM - DeviceName string `json:"deviceName,omitempty"` - - // Mode: The mode in which to attach this disk, either READ_WRITE or - // READ_ONLY. If not specified, the default is to attach the disk in - // READ_WRITE mode. - // - // Possible values: - // "READ_ONLY" - // "READ_WRITE" - Mode string `json:"mode,omitempty"` - - // Source: The disk that is/will be mounted - Source string `json:"source,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DeviceName") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DeviceName") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ManagedInstanceOverrideDiskOverride) MarshalJSON() ([]byte, error) { - type noMethod ManagedInstanceOverrideDiskOverride - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ManagedInstanceVersion struct { - // InstanceTemplate: [Output Only] The intended template of the - // instance. This field is empty when current_action is one of { - // DELETING, ABANDONING }. - InstanceTemplate string `json:"instanceTemplate,omitempty"` - - // Name: [Output Only] Name of the version. - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InstanceTemplate") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "InstanceTemplate") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ManagedInstanceVersion) MarshalJSON() ([]byte, error) { - type noMethod ManagedInstanceVersion - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Metadata: A metadata key/value entry. -type Metadata struct { - // Fingerprint: Specifies a fingerprint for this request, which is - // essentially a hash of the metadata's contents and used for optimistic - // locking. The fingerprint is initially generated by Compute Engine and - // changes after every request to modify or update metadata. You must - // always provide an up-to-date fingerprint hash in order to update or - // change metadata. - Fingerprint string `json:"fingerprint,omitempty"` - - // Items: Array of key/value pairs. The total size of all keys and - // values must be less than 512 KB. - Items []*MetadataItems `json:"items,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#metadata for - // metadata. - Kind string `json:"kind,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Fingerprint") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Metadata) MarshalJSON() ([]byte, error) { - type noMethod Metadata - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type MetadataItems struct { - // Key: Key for the metadata entry. Keys must conform to the following - // regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is - // reflected as part of a URL in the metadata server. Additionally, to - // avoid ambiguity, keys must not conflict with any other metadata keys - // for the project. - Key string `json:"key,omitempty"` - - // Value: Value for the metadata entry. These are free-form strings, and - // only have meaning as interpreted by the image running in the - // instance. The only restriction placed on values is that their size - // must be less than or equal to 262144 bytes (256 KiB). - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *MetadataItems) MarshalJSON() ([]byte, error) { - type noMethod MetadataItems - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// NamedPort: The named port. For example: . -type NamedPort struct { - // Name: The name for this named port. The name must be 1-63 characters - // long, and comply with RFC1035. - Name string `json:"name,omitempty"` - - // Port: The port number, which can be a value between 1 and 65535. - Port int64 `json:"port,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Name") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *NamedPort) MarshalJSON() ([]byte, error) { - type noMethod NamedPort - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Network: Represents a Network resource. Read Networks and Firewalls -// for more information. -type Network struct { - // IPv4Range: The range of internal addresses that are legal on this - // network. This range is a CIDR specification, for example: - // 192.168.0.0/16. Provided by the client when the network is created. - IPv4Range string `json:"IPv4Range,omitempty"` - - // AutoCreateSubnetworks: When set to true, the network is created in - // "auto subnet mode". When set to false, the network is in "custom - // subnet mode". - // - // In "auto subnet mode", a newly created network is assigned the - // default CIDR of 10.128.0.0/9 and it automatically creates one - // subnetwork per region. - AutoCreateSubnetworks bool `json:"autoCreateSubnetworks,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // CrossVmEncryption: [Output Only] Type of VM-to-VM traffic encryption - // for this network. - // - // Possible values: - // "ENCRYPTED" - // "UNENCRYPTED" - CrossVmEncryption string `json:"crossVmEncryption,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // GatewayIPv4: A gateway address for default routing to other networks. - // This value is read only and is selected by the Google Compute Engine, - // typically as the first usable address in the IPv4Range. - GatewayIPv4 string `json:"gatewayIPv4,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#network for - // networks. - Kind string `json:"kind,omitempty"` - - // LoadBalancerVmEncryption: [Output Only] Type of LB-to-VM traffic - // encryption for this network. - // - // Possible values: - // "ENCRYPTED" - // "UNENCRYPTED" - LoadBalancerVmEncryption string `json:"loadBalancerVmEncryption,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Peerings: [Output Only] List of network peerings for the resource. - Peerings []*NetworkPeering `json:"peerings,omitempty"` - - // RoutingConfig: The network-level routing configuration for this - // network. Used by Cloud Router to determine what type of network-wide - // routing behavior to enforce. - RoutingConfig *NetworkRoutingConfig `json:"routingConfig,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Subnetworks: [Output Only] Server-defined fully-qualified URLs for - // all subnetworks in this network. - Subnetworks []string `json:"subnetworks,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "IPv4Range") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IPv4Range") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Network) MarshalJSON() ([]byte, error) { - type noMethod Network - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// NetworkInterface: A network interface resource attached to an -// instance. -type NetworkInterface struct { - // AccessConfigs: An array of configurations for this interface. - // Currently, only one access config, ONE_TO_ONE_NAT, is supported. If - // there are no accessConfigs specified, then this instance will have no - // external internet access. - AccessConfigs []*AccessConfig `json:"accessConfigs,omitempty"` - - // AliasIpRanges: An array of alias IP ranges for this network - // interface. Can only be specified for network interfaces on - // subnet-mode networks. - AliasIpRanges []*AliasIpRange `json:"aliasIpRanges,omitempty"` - - // Fingerprint: Fingerprint hash of contents stored in this network - // interface. This field will be ignored when inserting an Instance or - // adding a NetworkInterface. An up-to-date fingerprint must be provided - // in order to update the NetworkInterface. - Fingerprint string `json:"fingerprint,omitempty"` - - // Kind: [Output Only] Type of the resource. Always - // compute#networkInterface for network interfaces. - Kind string `json:"kind,omitempty"` - - // Name: [Output Only] The name of the network interface, generated by - // the server. For network devices, these are eth0, eth1, etc. - Name string `json:"name,omitempty"` - - // Network: URL of the network resource for this instance. When creating - // an instance, if neither the network nor the subnetwork is specified, - // the default network global/networks/default is used; if the network - // is not specified but the subnetwork is specified, the network is - // inferred. - // - // This field is optional when creating a firewall rule. If not - // specified when creating a firewall rule, the default network - // global/networks/default is used. - // - // If you specify this property, you can specify the network as a full - // or partial URL. For example, the following are all valid URLs: - // - - // https://www.googleapis.com/compute/v1/projects/project/global/networks/network - // - projects/project/global/networks/network - // - global/networks/default - Network string `json:"network,omitempty"` - - // NetworkIP: An IPv4 internal network address to assign to the instance - // for this network interface. If not specified by the user, an unused - // internal IP is assigned by the system. - NetworkIP string `json:"networkIP,omitempty"` - - // Subnetwork: The URL of the Subnetwork resource for this instance. If - // the network resource is in legacy mode, do not provide this property. - // If the network is in auto subnet mode, providing the subnetwork is - // optional. If the network is in custom subnet mode, then this field - // should be specified. If you specify this property, you can specify - // the subnetwork as a full or partial URL. For example, the following - // are all valid URLs: - // - - // https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork - // - regions/region/subnetworks/subnetwork - Subnetwork string `json:"subnetwork,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AccessConfigs") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AccessConfigs") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *NetworkInterface) MarshalJSON() ([]byte, error) { - type noMethod NetworkInterface - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// NetworkList: Contains a list of networks. -type NetworkList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Network resources. - Items []*Network `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#networkList for - // lists of networks. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *NetworkList) MarshalJSON() ([]byte, error) { - type noMethod NetworkList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// NetworkPeering: A network peering attached to a network resource. The -// message includes the peering name, peer network, peering state, and a -// flag indicating whether Google Compute Engine should automatically -// create routes for the peering. -type NetworkPeering struct { - // AutoCreateRoutes: Whether full mesh connectivity is created and - // managed automatically. When it is set to true, Google Compute Engine - // will automatically create and manage the routes between two networks - // when the state is ACTIVE. Otherwise, user needs to create routes - // manually to route packets to peer network. - AutoCreateRoutes bool `json:"autoCreateRoutes,omitempty"` - - // Name: Name of this peering. Provided by the client when the peering - // is created. The name must comply with RFC1035. Specifically, the name - // must be 1-63 characters long and match regular expression - // [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a - // lowercase letter, and all the following characters must be a dash, - // lowercase letter, or digit, except the last character, which cannot - // be a dash. - Name string `json:"name,omitempty"` - - // Network: The URL of the peer network. It can be either full URL or - // partial URL. The peer network may belong to a different project. If - // the partial URL does not contain project, it is assumed that the peer - // network is in the same project as the current network. - Network string `json:"network,omitempty"` - - // State: [Output Only] State for the peering. - // - // Possible values: - // "ACTIVE" - // "INACTIVE" - State string `json:"state,omitempty"` - - // StateDetails: [Output Only] Details about the current state of the - // peering. - StateDetails string `json:"stateDetails,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AutoCreateRoutes") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AutoCreateRoutes") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *NetworkPeering) MarshalJSON() ([]byte, error) { - type noMethod NetworkPeering - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// NetworkRoutingConfig: A routing configuration attached to a network -// resource. The message includes the list of routers associated with -// the network, and a flag indicating the type of routing behavior to -// enforce network-wide. -type NetworkRoutingConfig struct { - // RoutingMode: The network-wide routing mode to use. If set to - // REGIONAL, this network's cloud routers will only advertise routes - // with subnetworks of this network in the same region as the router. If - // set to GLOBAL, this network's cloud routers will advertise routes - // with all subnetworks of this network, across regions. - // - // Possible values: - // "GLOBAL" - // "REGIONAL" - RoutingMode string `json:"routingMode,omitempty"` - - // ForceSendFields is a list of field names (e.g. "RoutingMode") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "RoutingMode") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *NetworkRoutingConfig) MarshalJSON() ([]byte, error) { - type noMethod NetworkRoutingConfig - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type NetworksAddPeeringRequest struct { - // AutoCreateRoutes: Whether Google Compute Engine manages the routes - // automatically. - AutoCreateRoutes bool `json:"autoCreateRoutes,omitempty"` - - // Name: Name of the peering, which should conform to RFC1035. - Name string `json:"name,omitempty"` - - // PeerNetwork: URL of the peer network. It can be either full URL or - // partial URL. The peer network may belong to a different project. If - // the partial URL does not contain project, it is assumed that the peer - // network is in the same project as the current network. - PeerNetwork string `json:"peerNetwork,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AutoCreateRoutes") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AutoCreateRoutes") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *NetworksAddPeeringRequest) MarshalJSON() ([]byte, error) { - type noMethod NetworksAddPeeringRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type NetworksRemovePeeringRequest struct { - // Name: Name of the peering, which should conform to RFC1035. - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Name") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *NetworksRemovePeeringRequest) MarshalJSON() ([]byte, error) { - type noMethod NetworksRemovePeeringRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Operation: An Operation resource, used to manage asynchronous API -// requests. -type Operation struct { - // ClientOperationId: [Output Only] Reserved for future use. - ClientOperationId string `json:"clientOperationId,omitempty"` - - // CreationTimestamp: [Deprecated] This field is deprecated. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: [Output Only] A textual description of the operation, - // which is set when the operation is created. - Description string `json:"description,omitempty"` - - // EndTime: [Output Only] The time that this operation was completed. - // This value is in RFC3339 text format. - EndTime string `json:"endTime,omitempty"` - - // Error: [Output Only] If errors are generated during processing of the - // operation, this field will be populated. - Error *OperationError `json:"error,omitempty"` - - // HttpErrorMessage: [Output Only] If the operation fails, this field - // contains the HTTP error message that was returned, such as NOT FOUND. - HttpErrorMessage string `json:"httpErrorMessage,omitempty"` - - // HttpErrorStatusCode: [Output Only] If the operation fails, this field - // contains the HTTP error status code that was returned. For example, a - // 404 means the resource was not found. - HttpErrorStatusCode int64 `json:"httpErrorStatusCode,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // InsertTime: [Output Only] The time that this operation was requested. - // This value is in RFC3339 text format. - InsertTime string `json:"insertTime,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#operation - // for Operation resources. - Kind string `json:"kind,omitempty"` - - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - - // OperationType: [Output Only] The type of operation, such as insert, - // update, or delete, and so on. - OperationType string `json:"operationType,omitempty"` - - // Progress: [Output Only] An optional progress indicator that ranges - // from 0 to 100. There is no requirement that this be linear or support - // any granularity of operations. This should not be used to guess when - // the operation will be complete. This number should monotonically - // increase as the operation progresses. - Progress int64 `json:"progress,omitempty"` - - // Region: [Output Only] The URL of the region where the operation - // resides. Only available when performing regional operations. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // StartTime: [Output Only] The time that this operation was started by - // the server. This value is in RFC3339 text format. - StartTime string `json:"startTime,omitempty"` - - // Status: [Output Only] The status of the operation, which can be one - // of the following: PENDING, RUNNING, or DONE. - // - // Possible values: - // "DONE" - // "PENDING" - // "RUNNING" - Status string `json:"status,omitempty"` - - // StatusMessage: [Output Only] An optional textual description of the - // current status of the operation. - StatusMessage string `json:"statusMessage,omitempty"` - - // TargetId: [Output Only] The unique target ID, which identifies a - // specific incarnation of the target resource. - TargetId uint64 `json:"targetId,omitempty,string"` - - // TargetLink: [Output Only] The URL of the resource that the operation - // modifies. For operations related to creating a snapshot, this points - // to the persistent disk that the snapshot was created from. - TargetLink string `json:"targetLink,omitempty"` - - // User: [Output Only] User who requested the operation, for example: - // user@example.com. - User string `json:"user,omitempty"` - - // Warnings: [Output Only] If warning messages are generated during - // processing of the operation, this field will be populated. - Warnings []*OperationWarnings `json:"warnings,omitempty"` - - // Zone: [Output Only] The URL of the zone where the operation resides. - // Only available when performing per-zone operations. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ClientOperationId") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ClientOperationId") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Operation) MarshalJSON() ([]byte, error) { - type noMethod Operation - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// OperationError: [Output Only] If errors are generated during -// processing of the operation, this field will be populated. -type OperationError struct { - // Errors: [Output Only] The array of errors encountered while - // processing this operation. - Errors []*OperationErrorErrors `json:"errors,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Errors") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationError) MarshalJSON() ([]byte, error) { - type noMethod OperationError - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationErrorErrors struct { - // Code: [Output Only] The error type identifier for this error. - Code string `json:"code,omitempty"` - - // Location: [Output Only] Indicates the field in the request that - // caused the error. This property is optional. - Location string `json:"location,omitempty"` - - // Message: [Output Only] An optional, human-readable error message. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationErrorErrors) MarshalJSON() ([]byte, error) { - type noMethod OperationErrorErrors - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationWarnings struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*OperationWarningsData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationWarnings) MarshalJSON() ([]byte, error) { - type noMethod OperationWarnings - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationWarningsData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationWarningsData) MarshalJSON() ([]byte, error) { - type noMethod OperationWarningsData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationAggregatedList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id string `json:"id,omitempty"` - - // Items: [Output Only] A map of scoped operation lists. - Items map[string]OperationsScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#operationAggregatedList for aggregated lists of operations. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod OperationAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// OperationList: Contains a list of Operation resources. -type OperationList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id string `json:"id,omitempty"` - - // Items: [Output Only] A list of Operation resources. - Items []*Operation `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#operations for - // Operations resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationList) MarshalJSON() ([]byte, error) { - type noMethod OperationList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationsScopedList struct { - // Operations: [Output Only] List of operations contained in this scope. - Operations []*Operation `json:"operations,omitempty"` - - // Warning: [Output Only] Informational warning which replaces the list - // of operations when the list is empty. - Warning *OperationsScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Operations") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Operations") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationsScopedList) MarshalJSON() ([]byte, error) { - type noMethod OperationsScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// OperationsScopedListWarning: [Output Only] Informational warning -// which replaces the list of operations when the list is empty. -type OperationsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*OperationsScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationsScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod OperationsScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationsScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod OperationsScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PathMatcher: A matcher for the path portion of the URL. The -// BackendService from the longest-matched rule will serve the URL. If -// no rule was matched, the default service will be used. -type PathMatcher struct { - // DefaultService: The full or partial URL to the BackendService - // resource. This will be used if none of the pathRules defined by this - // PathMatcher is matched by the URL's path portion. For example, the - // following are all valid URLs to a BackendService resource: - // - - // https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService - // - compute/v1/projects/project/global/backendServices/backendService - // - // - global/backendServices/backendService - DefaultService string `json:"defaultService,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Name: The name to which this PathMatcher is referred by the HostRule. - Name string `json:"name,omitempty"` - - // PathRules: The list of path rules. - PathRules []*PathRule `json:"pathRules,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DefaultService") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DefaultService") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *PathMatcher) MarshalJSON() ([]byte, error) { - type noMethod PathMatcher - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PathRule: A path-matching rule for a URL. If matched, will use the -// specified BackendService to handle the traffic arriving at this URL. -type PathRule struct { - // Paths: The list of path patterns to match. Each must start with / and - // the only place a * is allowed is at the end following a /. The string - // fed to the path matcher does not include any text after the first ? - // or #, and those chars are not allowed here. - Paths []string `json:"paths,omitempty"` - - // Service: The URL of the BackendService resource if this rule is - // matched. - Service string `json:"service,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Paths") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Paths") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *PathRule) MarshalJSON() ([]byte, error) { - type noMethod PathRule - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type PerInstanceConfig struct { - // Instance: The URL of the instance. Serves as a merge key during - // UpdatePerInstanceConfigs operation. - Instance string `json:"instance,omitempty"` - - Override *ManagedInstanceOverride `json:"override,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instance") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instance") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *PerInstanceConfig) MarshalJSON() ([]byte, error) { - type noMethod PerInstanceConfig - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Policy: Defines an Identity and Access Management (IAM) policy. It is -// used to specify access control policies for Cloud Platform -// resources. -// -// -// -// A `Policy` consists of a list of `bindings`. A `Binding` binds a list -// of `members` to a `role`, where the members can be user accounts, -// Google groups, Google domains, and service accounts. A `role` is a -// named list of permissions defined by IAM. -// -// **Example** -// -// { "bindings": [ { "role": "roles/owner", "members": [ -// "user:mike@example.com", "group:admins@example.com", -// "domain:google.com", -// "serviceAccount:my-other-app@appspot.gserviceaccount.com", ] }, { -// "role": "roles/viewer", "members": ["user:sean@example.com"] } ] -// } -// -// For a description of IAM and its features, see the [IAM developer's -// guide](https://cloud.google.com/iam). -type Policy struct { - // AuditConfigs: Specifies cloud audit logging configuration for this - // policy. - AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` - - // Bindings: Associates a list of `members` to a `role`. `bindings` with - // no members will result in an error. - Bindings []*Binding `json:"bindings,omitempty"` - - // Etag: `etag` is used for optimistic concurrency control as a way to - // help prevent simultaneous updates of a policy from overwriting each - // other. It is strongly suggested that systems make use of the `etag` - // in the read-modify-write cycle to perform policy updates in order to - // avoid race conditions: An `etag` is returned in the response to - // `getIamPolicy`, and systems are expected to put that etag in the - // request to `setIamPolicy` to ensure that their change will be applied - // to the same version of the policy. - // - // If no `etag` is provided in the call to `setIamPolicy`, then the - // existing policy is overwritten blindly. - Etag string `json:"etag,omitempty"` - - IamOwned bool `json:"iamOwned,omitempty"` - - // Rules: If more than one rule is specified, the rules are applied in - // the following manner: - All matching LOG rules are always applied. - - // If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging - // will be applied if one or more matching rule requires logging. - - // Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is - // granted. Logging will be applied if one or more matching rule - // requires logging. - Otherwise, if no rule applies, permission is - // denied. - Rules []*Rule `json:"rules,omitempty"` - - // Version: Version of the `Policy`. The default version is 0. - Version int64 `json:"version,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "AuditConfigs") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AuditConfigs") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Policy) MarshalJSON() ([]byte, error) { - type noMethod Policy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Project: A Project resource. Projects can only be created in the -// Google Cloud Platform Console. Unless marked otherwise, values can -// only be modified in the console. -type Project struct { - // CommonInstanceMetadata: Metadata key/value pairs available to all - // instances contained in this project. See Custom metadata for more - // information. - CommonInstanceMetadata *Metadata `json:"commonInstanceMetadata,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // DefaultServiceAccount: [Output Only] Default service account used by - // VMs running in this project. - DefaultServiceAccount string `json:"defaultServiceAccount,omitempty"` - - // Description: An optional textual description of the resource. - Description string `json:"description,omitempty"` - - // EnabledFeatures: Restricted features enabled for use on this project. - EnabledFeatures []string `json:"enabledFeatures,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. This is not the project ID, and - // is just a unique ID used by Compute Engine to identify resources. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#project for - // projects. - Kind string `json:"kind,omitempty"` - - // Name: The project ID. For example: my-example-project. Use the - // project ID to make requests to Compute Engine. - Name string `json:"name,omitempty"` - - // Quotas: [Output Only] Quotas assigned to this project. - Quotas []*Quota `json:"quotas,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // UsageExportLocation: The naming prefix for daily usage reports and - // the Google Cloud Storage bucket where they are stored. - UsageExportLocation *UsageExportLocation `json:"usageExportLocation,omitempty"` - - // XpnProjectStatus: [Output Only] The role this project has in a shared - // VPC configuration. Currently only HOST projects are differentiated. - // - // Possible values: - // "HOST" - // "UNSPECIFIED_XPN_PROJECT_STATUS" - XpnProjectStatus string `json:"xpnProjectStatus,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. - // "CommonInstanceMetadata") to unconditionally include in API requests. - // By default, fields with empty values are omitted from API requests. - // However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CommonInstanceMetadata") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Project) MarshalJSON() ([]byte, error) { - type noMethod Project - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ProjectsDisableXpnResourceRequest struct { - // XpnResource: Service resource (a.k.a service project) ID. - XpnResource *XpnResourceId `json:"xpnResource,omitempty"` - - // ForceSendFields is a list of field names (e.g. "XpnResource") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "XpnResource") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ProjectsDisableXpnResourceRequest) MarshalJSON() ([]byte, error) { - type noMethod ProjectsDisableXpnResourceRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ProjectsEnableXpnResourceRequest struct { - // XpnResource: Service resource (a.k.a service project) ID. - XpnResource *XpnResourceId `json:"xpnResource,omitempty"` - - // ForceSendFields is a list of field names (e.g. "XpnResource") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "XpnResource") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ProjectsEnableXpnResourceRequest) MarshalJSON() ([]byte, error) { - type noMethod ProjectsEnableXpnResourceRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ProjectsGetXpnResources struct { - // Kind: [Output Only] Type of resource. Always - // compute#projectsGetXpnResources for lists of service resources (a.k.a - // service projects) - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Resources: Serive resources (a.k.a service projects) attached to this - // project as their shared VPC host. - Resources []*XpnResourceId `json:"resources,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Kind") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Kind") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ProjectsGetXpnResources) MarshalJSON() ([]byte, error) { - type noMethod ProjectsGetXpnResources - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ProjectsListXpnHostsRequest struct { - // Organization: Optional organization ID managed by Cloud Resource - // Manager, for which to list shared VPC host projects. If not - // specified, the organization will be inferred from the project. - Organization string `json:"organization,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Organization") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Organization") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ProjectsListXpnHostsRequest) MarshalJSON() ([]byte, error) { - type noMethod ProjectsListXpnHostsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ProjectsSetDefaultServiceAccountRequest struct { - // Email: Email address of the service account. - Email string `json:"email,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Email") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Email") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ProjectsSetDefaultServiceAccountRequest) MarshalJSON() ([]byte, error) { - type noMethod ProjectsSetDefaultServiceAccountRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Quota: A quotas entry. -type Quota struct { - // Limit: [Output Only] Quota limit for this metric. - Limit float64 `json:"limit,omitempty"` - - // Metric: [Output Only] Name of the quota metric. - // - // Possible values: - // "AMD_S9300_GPUS" - // "AUTOSCALERS" - // "BACKEND_BUCKETS" - // "BACKEND_SERVICES" - // "COMMITMENTS" - // "CPUS" - // "CPUS_ALL_REGIONS" - // "DISKS_TOTAL_GB" - // "FIREWALLS" - // "FORWARDING_RULES" - // "HEALTH_CHECKS" - // "IMAGES" - // "INSTANCES" - // "INSTANCE_GROUPS" - // "INSTANCE_GROUP_MANAGERS" - // "INSTANCE_TEMPLATES" - // "IN_USE_ADDRESSES" - // "LOCAL_SSD_TOTAL_GB" - // "NETWORKS" - // "NVIDIA_K80_GPUS" - // "NVIDIA_P100_GPUS" - // "PREEMPTIBLE_CPUS" - // "PREEMPTIBLE_LOCAL_SSD_GB" - // "REGIONAL_AUTOSCALERS" - // "REGIONAL_INSTANCE_GROUP_MANAGERS" - // "ROUTERS" - // "ROUTES" - // "SECURITY_POLICIES" - // "SECURITY_POLICY_RULES" - // "SNAPSHOTS" - // "SSD_TOTAL_GB" - // "SSL_CERTIFICATES" - // "STATIC_ADDRESSES" - // "SUBNETWORKS" - // "TARGET_HTTPS_PROXIES" - // "TARGET_HTTP_PROXIES" - // "TARGET_INSTANCES" - // "TARGET_POOLS" - // "TARGET_SSL_PROXIES" - // "TARGET_TCP_PROXIES" - // "TARGET_VPN_GATEWAYS" - // "URL_MAPS" - // "VPN_TUNNELS" - Metric string `json:"metric,omitempty"` - - // Usage: [Output Only] Current usage of this metric. - Usage float64 `json:"usage,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Limit") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Limit") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Quota) MarshalJSON() ([]byte, error) { - type noMethod Quota - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *Quota) UnmarshalJSON(data []byte) error { - type noMethod Quota - var s1 struct { - Limit gensupport.JSONFloat64 `json:"limit"` - Usage gensupport.JSONFloat64 `json:"usage"` - *noMethod - } - s1.noMethod = (*noMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Limit = float64(s1.Limit) - s.Usage = float64(s1.Usage) - return nil -} - -// Reference: Represents a reference to a resource. -type Reference struct { - // Kind: [Output Only] Type of the resource. Always compute#reference - // for references. - Kind string `json:"kind,omitempty"` - - // ReferenceType: A description of the reference type with no implied - // semantics. Possible values include: - // - MEMBER_OF - ReferenceType string `json:"referenceType,omitempty"` - - // Referrer: URL of the resource which refers to the target. - Referrer string `json:"referrer,omitempty"` - - // Target: URL of the resource to which this reference points. - Target string `json:"target,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Kind") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Kind") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Reference) MarshalJSON() ([]byte, error) { - type noMethod Reference - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Region: Region resource. -type Region struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Deprecated: [Output Only] The deprecation status associated with this - // region. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - - // Description: [Output Only] Textual description of the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#region for - // regions. - Kind string `json:"kind,omitempty"` - - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - - // Quotas: [Output Only] Quotas assigned to this region. - Quotas []*Quota `json:"quotas,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Status: [Output Only] Status of the region, either UP or DOWN. - // - // Possible values: - // "DOWN" - // "UP" - Status string `json:"status,omitempty"` - - // Zones: [Output Only] A list of zones available in this region, in the - // form of resource URLs. - Zones []string `json:"zones,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Region) MarshalJSON() ([]byte, error) { - type noMethod Region - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RegionAutoscalerList: Contains a list of autoscalers. -type RegionAutoscalerList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Autoscaler resources. - Items []*Autoscaler `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionAutoscalerList) MarshalJSON() ([]byte, error) { - type noMethod RegionAutoscalerList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionDiskTypeList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of DiskType resources. - Items []*DiskType `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#regionDiskTypeList for region disk types. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionDiskTypeList) MarshalJSON() ([]byte, error) { - type noMethod RegionDiskTypeList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionDisksResizeRequest struct { - // SizeGb: The new size of the regional persistent disk, which is - // specified in GB. - SizeGb int64 `json:"sizeGb,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "SizeGb") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "SizeGb") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionDisksResizeRequest) MarshalJSON() ([]byte, error) { - type noMethod RegionDisksResizeRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupList: Contains a list of InstanceGroup resources. -type RegionInstanceGroupList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InstanceGroup resources. - Items []*InstanceGroup `json:"items,omitempty"` - - // Kind: The resource type. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupList) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupManagerDeleteInstanceConfigReq: -// RegionInstanceGroupManagers.deletePerInstanceConfigs -type RegionInstanceGroupManagerDeleteInstanceConfigReq struct { - // Instances: The list of instances for which we want to delete - // per-instance configs on this managed instance group. - Instances []string `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagerDeleteInstanceConfigReq) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupManagerDeleteInstanceConfigReq - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupManagerList: Contains a list of managed instance -// groups. -type RegionInstanceGroupManagerList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InstanceGroupManager resources. - Items []*InstanceGroupManager `json:"items,omitempty"` - - // Kind: [Output Only] The resource type, which is always - // compute#instanceGroupManagerList for a list of managed instance - // groups that exist in th regional scope. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagerList) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupManagerList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupManagerUpdateInstanceConfigReq: -// RegionInstanceGroupManagers.updatePerInstanceConfigs -type RegionInstanceGroupManagerUpdateInstanceConfigReq struct { - // PerInstanceConfigs: The list of per-instance configs to insert or - // patch on this managed instance group. - PerInstanceConfigs []*PerInstanceConfig `json:"perInstanceConfigs,omitempty"` - - // ForceSendFields is a list of field names (e.g. "PerInstanceConfigs") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "PerInstanceConfigs") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagerUpdateInstanceConfigReq) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupManagerUpdateInstanceConfigReq - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersAbandonInstancesRequest struct { - // Instances: The URLs of one or more instances to abandon. This can be - // a full URL or a partial URL, such as - // zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagersAbandonInstancesRequest) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupManagersAbandonInstancesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupManagersApplyUpdatesRequest: -// InstanceGroupManagers.applyUpdatesToInstances -type RegionInstanceGroupManagersApplyUpdatesRequest struct { - // Instances: The list of instances for which we want to apply changes - // on this managed instance group. - Instances []string `json:"instances,omitempty"` - - // MaximalAction: The maximal action that should be perfomed on the - // instances. By default REPLACE. - // - // Possible values: - // "NONE" - // "REFRESH" - // "REPLACE" - // "RESTART" - MaximalAction string `json:"maximalAction,omitempty"` - - // MinimalAction: The minimal action that should be perfomed on the - // instances. By default NONE. - // - // Possible values: - // "NONE" - // "REFRESH" - // "REPLACE" - // "RESTART" - MinimalAction string `json:"minimalAction,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagersApplyUpdatesRequest) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupManagersApplyUpdatesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersDeleteInstancesRequest struct { - // Instances: The URLs of one or more instances to delete. This can be a - // full URL or a partial URL, such as - // zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagersDeleteInstancesRequest) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupManagersDeleteInstancesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersListInstanceConfigsResp struct { - // Items: [Output Only] The list of PerInstanceConfig. - Items []*PerInstanceConfig `json:"items,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Items") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagersListInstanceConfigsResp) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupManagersListInstanceConfigsResp - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersListInstancesResponse struct { - // ManagedInstances: List of managed instances. - ManagedInstances []*ManagedInstance `json:"managedInstances,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ManagedInstances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ManagedInstances") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagersListInstancesResponse) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupManagersListInstancesResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersRecreateRequest struct { - // Instances: The URLs of one or more instances to recreate. This can be - // a full URL or a partial URL, such as - // zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagersRecreateRequest) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupManagersRecreateRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersSetAutoHealingRequest struct { - AutoHealingPolicies []*InstanceGroupManagerAutoHealingPolicy `json:"autoHealingPolicies,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AutoHealingPolicies") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AutoHealingPolicies") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagersSetAutoHealingRequest) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupManagersSetAutoHealingRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersSetTargetPoolsRequest struct { - // Fingerprint: Fingerprint of the target pools information, which is a - // hash of the contents. This field is used for optimistic locking when - // you update the target pool entries. This field is optional. - Fingerprint string `json:"fingerprint,omitempty"` - - // TargetPools: The URL of all TargetPool resources to which instances - // in the instanceGroup field are added. The target pools automatically - // apply to all of the instances in the managed instance group. - TargetPools []string `json:"targetPools,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Fingerprint") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagersSetTargetPoolsRequest) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupManagersSetTargetPoolsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersSetTemplateRequest struct { - // InstanceTemplate: URL of the InstanceTemplate resource from which all - // new instances will be created. - InstanceTemplate string `json:"instanceTemplate,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InstanceTemplate") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "InstanceTemplate") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagersSetTemplateRequest) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupManagersSetTemplateRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupsListInstances struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InstanceWithNamedPorts resources. - Items []*InstanceWithNamedPorts `json:"items,omitempty"` - - // Kind: The resource type. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupsListInstances) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupsListInstances - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupsListInstancesRequest struct { - // InstanceState: Instances in which state should be returned. Valid - // options are: 'ALL', 'RUNNING'. By default, it lists all instances. - // - // Possible values: - // "ALL" - // "RUNNING" - InstanceState string `json:"instanceState,omitempty"` - - // PortName: Name of port user is interested in. It is optional. If it - // is set, only information about this ports will be returned. If it is - // not set, all the named ports will be returned. Always lists all - // instances. - PortName string `json:"portName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InstanceState") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "InstanceState") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupsListInstancesRequest) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupsListInstancesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupsSetNamedPortsRequest struct { - // Fingerprint: The fingerprint of the named ports information for this - // instance group. Use this optional property to prevent conflicts when - // multiple users change the named ports settings concurrently. Obtain - // the fingerprint with the instanceGroups.get method. Then, include the - // fingerprint in your request to ensure that you do not overwrite - // changes that were applied from another concurrent request. - Fingerprint string `json:"fingerprint,omitempty"` - - // NamedPorts: The list of named ports to set for this instance group. - NamedPorts []*NamedPort `json:"namedPorts,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Fingerprint") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupsSetNamedPortsRequest) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupsSetNamedPortsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RegionList: Contains a list of region resources. -type RegionList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Region resources. - Items []*Region `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#regionList for - // lists of regions. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionList) MarshalJSON() ([]byte, error) { - type noMethod RegionList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionSetLabelsRequest struct { - // LabelFingerprint: The fingerprint of the previous set of labels for - // this resource, used to detect conflicts. The fingerprint is initially - // generated by Compute Engine and changes after every request to modify - // or update labels. You must always provide an up-to-date fingerprint - // hash in order to update or change labels. Make a get() request to the - // resource to get the latest fingerprint. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // Labels: The labels to set for this resource. - Labels map[string]string `json:"labels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LabelFingerprint") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "LabelFingerprint") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *RegionSetLabelsRequest) MarshalJSON() ([]byte, error) { - type noMethod RegionSetLabelsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ResourceCommitment: Commitment for a particular resource (a -// Commitment is composed of one or more of these). -type ResourceCommitment struct { - // Amount: The amount of the resource purchased (in a type-dependent - // unit, such as bytes). For vCPUs, this can just be an integer. For - // memory, this must be provided in MB. Memory must be a multiple of 256 - // MB, with up to 6.5GB of memory per every vCPU. - Amount int64 `json:"amount,omitempty,string"` - - // Type: Type of resource for which this commitment applies. Possible - // values are VCPU and MEMORY - // - // Possible values: - // "LOCAL_SSD" - // "MEMORY" - // "UNSPECIFIED" - // "VCPU" - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Amount") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Amount") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ResourceCommitment) MarshalJSON() ([]byte, error) { - type noMethod ResourceCommitment - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ResourceGroupReference struct { - // Group: A URI referencing one of the instance groups listed in the - // backend service. - Group string `json:"group,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Group") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Group") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ResourceGroupReference) MarshalJSON() ([]byte, error) { - type noMethod ResourceGroupReference - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Route: Represents a Route resource. A route specifies how certain -// packets should be handled by the network. Routes are associated with -// instances by tags and the set of routes for a particular instance is -// called its routing table. -// -// For each packet leaving an instance, the system searches that -// instance's routing table for a single best matching route. Routes -// match packets by destination IP address, preferring smaller or more -// specific ranges over larger ones. If there is a tie, the system -// selects the route with the smallest priority value. If there is still -// a tie, it uses the layer three and four packet headers to select just -// one of the remaining matching routes. The packet is then forwarded as -// specified by the nextHop field of the winning route - either to -// another instance destination, an instance gateway, or a Google -// Compute Engine-operated gateway. -// -// Packets that do not match any route in the sending instance's routing -// table are dropped. -type Route struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // DestRange: The destination range of outgoing packets that this route - // applies to. Only IPv4 is supported. - DestRange string `json:"destRange,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of this resource. Always compute#routes for - // Route resources. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Network: Fully-qualified URL of the network that this route applies - // to. - Network string `json:"network,omitempty"` - - // NextHopGateway: The URL to a gateway that should handle matching - // packets. You can only specify the internet gateway using a full or - // partial valid URL: - // projects/<project-id>/global/gateways/default-internet-gateway - NextHopGateway string `json:"nextHopGateway,omitempty"` - - // NextHopInstance: The URL to an instance that should handle matching - // packets. You can specify this as a full or partial URL. For - // example: - // https://www.googleapis.com/compute/v1/projects/project/zones/ - // zone/instances/ - NextHopInstance string `json:"nextHopInstance,omitempty"` - - // NextHopIp: The network IP address of an instance that should handle - // matching packets. Only IPv4 is supported. - NextHopIp string `json:"nextHopIp,omitempty"` - - // NextHopNetwork: The URL of the local network if it should handle - // matching packets. - NextHopNetwork string `json:"nextHopNetwork,omitempty"` - - // NextHopPeering: [Output Only] The network peering name that should - // handle matching packets, which should conform to RFC1035. - NextHopPeering string `json:"nextHopPeering,omitempty"` - - // NextHopVpnTunnel: The URL to a VpnTunnel that should handle matching - // packets. - NextHopVpnTunnel string `json:"nextHopVpnTunnel,omitempty"` - - // Priority: The priority of this route. Priority is used to break ties - // in cases where there is more than one matching route of equal prefix - // length. In the case of two routes with equal prefix length, the one - // with the lowest-numbered priority value wins. Default value is 1000. - // Valid range is 0 through 65535. - Priority int64 `json:"priority,omitempty"` - - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - - // Tags: A list of instance tags to which this route applies. - Tags []string `json:"tags,omitempty"` - - // Warnings: [Output Only] If potential misconfigurations are detected - // for this route, this field will be populated with warning messages. - Warnings []*RouteWarnings `json:"warnings,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Route) MarshalJSON() ([]byte, error) { - type noMethod Route - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RouteWarnings struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*RouteWarningsData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RouteWarnings) MarshalJSON() ([]byte, error) { - type noMethod RouteWarnings - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RouteWarningsData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RouteWarningsData) MarshalJSON() ([]byte, error) { - type noMethod RouteWarningsData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RouteList: Contains a list of Route resources. -type RouteList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Route resources. - Items []*Route `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RouteList) MarshalJSON() ([]byte, error) { - type noMethod RouteList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Router: Router resource. -type Router struct { - // Bgp: BGP information specific to this router. - Bgp *RouterBgp `json:"bgp,omitempty"` - - // BgpPeers: BGP information that needs to be configured into the - // routing stack to establish the BGP peering. It must specify peer ASN - // and either interface name, IP, or peer IP. Please refer to RFC4273. - BgpPeers []*RouterBgpPeer `json:"bgpPeers,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Interfaces: Router interfaces. Each interface requires either one - // linked resource (e.g. linkedVpnTunnel), or IP address and IP address - // range (e.g. ipRange), or both. - Interfaces []*RouterInterface `json:"interfaces,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#router for - // routers. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Network: URI of the network to which this router belongs. - Network string `json:"network,omitempty"` - - // Region: [Output Only] URI of the region where the router resides. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Bgp") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Bgp") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Router) MarshalJSON() ([]byte, error) { - type noMethod Router - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RouterAdvertisedPrefix: Description-tagged prefixes for the router to -// advertise. -type RouterAdvertisedPrefix struct { - // Description: User-specified description for the prefix. - Description string `json:"description,omitempty"` - - // Prefix: The prefix to advertise. The value must be a CIDR-formatted - // string. - Prefix string `json:"prefix,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RouterAdvertisedPrefix) MarshalJSON() ([]byte, error) { - type noMethod RouterAdvertisedPrefix - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RouterAggregatedList: Contains a list of routers. -type RouterAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Router resources. - Items map[string]RoutersScopedList `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RouterAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod RouterAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RouterBgp struct { - // AdvertiseMode: User-specified flag to indicate which mode to use for - // advertisement. - // - // Possible values: - // "CUSTOM" - // "DEFAULT" - AdvertiseMode string `json:"advertiseMode,omitempty"` - - // AdvertisedGroups: User-specified list of prefix groups to advertise - // in custom mode. This field can only be populated if advertise_mode is - // CUSTOM and is advertised to all peers of the router. These groups - // will be advertised in addition to any specified prefixes. Leave this - // field blank to advertise no custom groups. - // - // Possible values: - // "ALL_SUBNETS" - AdvertisedGroups []string `json:"advertisedGroups,omitempty"` - - // AdvertisedPrefixs: User-specified list of individual prefixes to - // advertise in custom mode. This field can only be populated if - // advertise_mode is CUSTOM and is advertised to all peers of the - // router. These prefixes will be advertised in addition to any - // specified groups. Leave this field blank to advertise no custom - // prefixes. - AdvertisedPrefixs []*RouterAdvertisedPrefix `json:"advertisedPrefixs,omitempty"` - - // Asn: Local BGP Autonomous System Number (ASN). Must be an RFC6996 - // private ASN, either 16-bit or 32-bit. The value will be fixed for - // this router resource. All VPN tunnels that link to this router will - // have the same local ASN. - Asn int64 `json:"asn,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AdvertiseMode") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AdvertiseMode") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RouterBgp) MarshalJSON() ([]byte, error) { - type noMethod RouterBgp - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RouterBgpPeer struct { - // AdvertiseMode: User-specified flag to indicate which mode to use for - // advertisement. - // - // Possible values: - // "CUSTOM" - // "DEFAULT" - AdvertiseMode string `json:"advertiseMode,omitempty"` - - // AdvertisedGroups: User-specified list of prefix groups to advertise - // in custom mode. This field can only be populated if advertise_mode is - // CUSTOM and overrides the list defined for the router (in Bgp - // message). These groups will be advertised in addition to any - // specified prefixes. Leave this field blank to advertise no custom - // groups. - // - // Possible values: - // "ALL_SUBNETS" - AdvertisedGroups []string `json:"advertisedGroups,omitempty"` - - // AdvertisedPrefixs: User-specified list of individual prefixes to - // advertise in custom mode. This field can only be populated if - // advertise_mode is CUSTOM and overrides the list defined for the - // router (in Bgp message). These prefixes will be advertised in - // addition to any specified groups. Leave this field blank to advertise - // no custom prefixes. - AdvertisedPrefixs []*RouterAdvertisedPrefix `json:"advertisedPrefixs,omitempty"` - - // AdvertisedRoutePriority: The priority of routes advertised to this - // BGP peer. In the case where there is more than one matching route of - // maximum length, the routes with lowest priority value win. - AdvertisedRoutePriority int64 `json:"advertisedRoutePriority,omitempty"` - - // InterfaceName: Name of the interface the BGP peer is associated with. - InterfaceName string `json:"interfaceName,omitempty"` - - // IpAddress: IP address of the interface inside Google Cloud Platform. - // Only IPv4 is supported. - IpAddress string `json:"ipAddress,omitempty"` - - // Name: Name of this BGP peer. The name must be 1-63 characters long - // and comply with RFC1035. - Name string `json:"name,omitempty"` - - // PeerAsn: Peer BGP Autonomous System Number (ASN). For VPN use case, - // this value can be different for every tunnel. - PeerAsn int64 `json:"peerAsn,omitempty"` - - // PeerIpAddress: IP address of the BGP interface outside Google cloud. - // Only IPv4 is supported. - PeerIpAddress string `json:"peerIpAddress,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AdvertiseMode") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AdvertiseMode") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RouterBgpPeer) MarshalJSON() ([]byte, error) { - type noMethod RouterBgpPeer - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RouterInterface struct { - // IpRange: IP address and range of the interface. The IP range must be - // in the RFC3927 link-local IP space. The value must be a - // CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not - // truncate the address as it represents the IP address of the - // interface. - IpRange string `json:"ipRange,omitempty"` - - // LinkedInterconnectAttachment: URI of the linked interconnect - // attachment. It must be in the same region as the router. Each - // interface can have at most one linked resource and it could either be - // a VPN Tunnel or an interconnect attachment. - LinkedInterconnectAttachment string `json:"linkedInterconnectAttachment,omitempty"` - - // LinkedVpnTunnel: URI of the linked VPN tunnel. It must be in the same - // region as the router. Each interface can have at most one linked - // resource and it could either be a VPN Tunnel or an interconnect - // attachment. - LinkedVpnTunnel string `json:"linkedVpnTunnel,omitempty"` - - // Name: Name of this interface entry. The name must be 1-63 characters - // long and comply with RFC1035. - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IpRange") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IpRange") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RouterInterface) MarshalJSON() ([]byte, error) { - type noMethod RouterInterface - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RouterList: Contains a list of Router resources. -type RouterList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Router resources. - Items []*Router `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#router for - // routers. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RouterList) MarshalJSON() ([]byte, error) { - type noMethod RouterList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RouterStatus struct { - // BestRoutes: Best routes for this router's network. - BestRoutes []*Route `json:"bestRoutes,omitempty"` - - // BestRoutesForRouter: Best routes learned by this router. - BestRoutesForRouter []*Route `json:"bestRoutesForRouter,omitempty"` - - BgpPeerStatus []*RouterStatusBgpPeerStatus `json:"bgpPeerStatus,omitempty"` - - // Network: URI of the network to which this router belongs. - Network string `json:"network,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BestRoutes") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BestRoutes") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RouterStatus) MarshalJSON() ([]byte, error) { - type noMethod RouterStatus - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RouterStatusBgpPeerStatus struct { - // AdvertisedRoutes: Routes that were advertised to the remote BGP peer - AdvertisedRoutes []*Route `json:"advertisedRoutes,omitempty"` - - // IpAddress: IP address of the local BGP interface. - IpAddress string `json:"ipAddress,omitempty"` - - // LinkedVpnTunnel: URL of the VPN tunnel that this BGP peer controls. - LinkedVpnTunnel string `json:"linkedVpnTunnel,omitempty"` - - // Name: Name of this BGP peer. Unique within the Routers resource. - Name string `json:"name,omitempty"` - - // NumLearnedRoutes: Number of routes learned from the remote BGP Peer. - NumLearnedRoutes int64 `json:"numLearnedRoutes,omitempty"` - - // PeerIpAddress: IP address of the remote BGP interface. - PeerIpAddress string `json:"peerIpAddress,omitempty"` - - // State: BGP state as specified in RFC1771. - State string `json:"state,omitempty"` - - // Status: Status of the BGP peer: {UP, DOWN} - // - // Possible values: - // "DOWN" - // "UNKNOWN" - // "UP" - Status string `json:"status,omitempty"` - - // Uptime: Time this session has been up. Format: 14 years, 51 weeks, 6 - // days, 23 hours, 59 minutes, 59 seconds - Uptime string `json:"uptime,omitempty"` - - // UptimeSeconds: Time this session has been up, in seconds. Format: 145 - UptimeSeconds string `json:"uptimeSeconds,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AdvertisedRoutes") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AdvertisedRoutes") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *RouterStatusBgpPeerStatus) MarshalJSON() ([]byte, error) { - type noMethod RouterStatusBgpPeerStatus - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RouterStatusResponse struct { - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - Result *RouterStatus `json:"result,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Kind") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Kind") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RouterStatusResponse) MarshalJSON() ([]byte, error) { - type noMethod RouterStatusResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RoutersPreviewResponse struct { - // Resource: Preview of given router. - Resource *Router `json:"resource,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Resource") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Resource") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RoutersPreviewResponse) MarshalJSON() ([]byte, error) { - type noMethod RoutersPreviewResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RoutersScopedList struct { - // Routers: List of routers contained in this scope. - Routers []*Router `json:"routers,omitempty"` - - // Warning: Informational warning which replaces the list of routers - // when the list is empty. - Warning *RoutersScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Routers") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Routers") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RoutersScopedList) MarshalJSON() ([]byte, error) { - type noMethod RoutersScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RoutersScopedListWarning: Informational warning which replaces the -// list of routers when the list is empty. -type RoutersScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*RoutersScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RoutersScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod RoutersScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RoutersScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RoutersScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod RoutersScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Rule: A rule to be applied in a Policy. -type Rule struct { - // Action: Required - // - // Possible values: - // "ALLOW" - // "ALLOW_WITH_LOG" - // "DENY" - // "DENY_WITH_LOG" - // "LOG" - // "NO_ACTION" - Action string `json:"action,omitempty"` - - // Conditions: Additional restrictions that must be met - Conditions []*Condition `json:"conditions,omitempty"` - - // Description: Human-readable description of the rule. - Description string `json:"description,omitempty"` - - // Ins: If one or more 'in' clauses are specified, the rule matches if - // the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. - Ins []string `json:"ins,omitempty"` - - // LogConfigs: The config returned to callers of - // tech.iam.IAM.CheckPolicy for any entries that match the LOG action. - LogConfigs []*LogConfig `json:"logConfigs,omitempty"` - - // NotIns: If one or more 'not_in' clauses are specified, the rule - // matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the - // entries. - NotIns []string `json:"notIns,omitempty"` - - // Permissions: A permission is a string of form '..' (e.g., - // 'storage.buckets.list'). A value of '*' matches all permissions, and - // a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. - Permissions []string `json:"permissions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Action") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Rule) MarshalJSON() ([]byte, error) { - type noMethod Rule - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type SSLHealthCheck struct { - // Port: The TCP port number for the health check request. The default - // value is 443. Valid values are 1 through 65535. - Port int64 `json:"port,omitempty"` - - // PortName: Port name as defined in InstanceGroup#NamedPort#name. If - // both port and port_name are defined, port takes precedence. - PortName string `json:"portName,omitempty"` - - // ProxyHeader: Specifies the type of proxy header to append before - // sending data to the backend, either NONE or PROXY_V1. The default is - // NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - - // Request: The application data to send once the SSL connection has - // been established (default value is empty). If both request and - // response are empty, the connection establishment alone will indicate - // health. The request data can only be ASCII. - Request string `json:"request,omitempty"` - - // Response: The bytes to match against the beginning of the response - // data. If left empty (the default value), any response will indicate - // health. The response data can only be ASCII. - Response string `json:"response,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Port") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Port") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SSLHealthCheck) MarshalJSON() ([]byte, error) { - type noMethod SSLHealthCheck - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Scheduling: Sets the scheduling options for an Instance. -type Scheduling struct { - // AutomaticRestart: Specifies whether the instance should be - // automatically restarted if it is terminated by Compute Engine (not - // terminated by a user). You can only set the automatic restart option - // for standard instances. Preemptible instances cannot be automatically - // restarted. - // - // By default, this is set to true so an instance is automatically - // restarted if it is terminated by Compute Engine. - AutomaticRestart *bool `json:"automaticRestart,omitempty"` - - // OnHostMaintenance: Defines the maintenance behavior for this - // instance. For standard instances, the default behavior is MIGRATE. - // For preemptible instances, the default and only possible behavior is - // TERMINATE. For more information, see Setting Instance Scheduling - // Options. - // - // Possible values: - // "MIGRATE" - // "TERMINATE" - OnHostMaintenance string `json:"onHostMaintenance,omitempty"` - - // Preemptible: Defines whether the instance is preemptible. This can - // only be set during instance creation, it cannot be set or changed - // after the instance has been created. - Preemptible bool `json:"preemptible,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AutomaticRestart") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AutomaticRestart") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Scheduling) MarshalJSON() ([]byte, error) { - type noMethod Scheduling - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type SecurityPoliciesList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of SecurityPolicy resources. - Items []*SecurityPolicy `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#securityPoliciesList for listsof securityPolicies - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SecurityPoliciesList) MarshalJSON() ([]byte, error) { - type noMethod SecurityPoliciesList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SecurityPolicy: A security policy is comprised of one or more rules. -// It can also be associated with one or more 'targets'. -type SecurityPolicy struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Fingerprint: Specifies a fingerprint for this resource, which is - // essentially a hash of the metadata's contents and used for optimistic - // locking. The fingerprint is initially generated by Compute Engine and - // changes after every request to modify or update metadata. You must - // always provide an up-to-date fingerprint hash in order to update or - // change metadata. - // - // To see the latest fingerprint, make get() request to the security - // policy. - Fingerprint string `json:"fingerprint,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output only] Type of the resource. Always - // compute#securityPolicyfor security policies - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Rules: List of rules that belong to this policy. There must always be - // a default rule (rule with priority 2147483647 and match "*"). If no - // rules are provided when creating a security policy, a default rule - // with action "allow" will be added. - Rules []*SecurityPolicyRule `json:"rules,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *SecurityPolicy) MarshalJSON() ([]byte, error) { - type noMethod SecurityPolicy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyReference struct { - SecurityPolicy string `json:"securityPolicy,omitempty"` - - // ForceSendFields is a list of field names (e.g. "SecurityPolicy") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "SecurityPolicy") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *SecurityPolicyReference) MarshalJSON() ([]byte, error) { - type noMethod SecurityPolicyReference - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SecurityPolicyRule: Represents a rule that describes one or more -// match conditions along with the action to be taken when traffic -// matches this condition (allow or deny). -type SecurityPolicyRule struct { - // Action: The Action to preform when the client connection triggers the - // rule. Can currently be either "allow" or "deny()" where valid values - // for status are 403, 404, and 502. - Action string `json:"action,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Kind: [Output only] Type of the resource. Always compute#rulefor - // security policies - Kind string `json:"kind,omitempty"` - - // Match: A match condition that incoming traffic is evaluated against. - // If it evaluates to true, the corresponding ?action? is enforced. - Match *SecurityPolicyRuleMatcher `json:"match,omitempty"` - - // Preview: If set to true, the specified action is not enforced. - Preview bool `json:"preview,omitempty"` - - // Priority: An integer indicating the priority of a rule in the list. - // The priority must be a positive value between 0 and 2147483647. Rules - // are evaluated in the increasing order of priority. - Priority int64 `json:"priority,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Action") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SecurityPolicyRule) MarshalJSON() ([]byte, error) { - type noMethod SecurityPolicyRule - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SecurityPolicyRuleMatcher: Represents a match condition that incoming -// traffic is evaluated against. Exactly one field must be specified. -type SecurityPolicyRuleMatcher struct { - // SrcIpRanges: CIDR IP address range. Only IPv4 is supported. - SrcIpRanges []string `json:"srcIpRanges,omitempty"` - - // SrcRegionCodes: Match by country or region code. - SrcRegionCodes []string `json:"srcRegionCodes,omitempty"` - - // ForceSendFields is a list of field names (e.g. "SrcIpRanges") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "SrcIpRanges") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SecurityPolicyRuleMatcher) MarshalJSON() ([]byte, error) { - type noMethod SecurityPolicyRuleMatcher - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SerialPortOutput: An instance's serial console output. -type SerialPortOutput struct { - // Contents: [Output Only] The contents of the console output. - Contents string `json:"contents,omitempty"` - - // Kind: [Output Only] Type of the resource. Always - // compute#serialPortOutput for serial port output. - Kind string `json:"kind,omitempty"` - - // Next: [Output Only] The position of the next byte of content from the - // serial console output. Use this value in the next request as the - // start parameter. - Next int64 `json:"next,omitempty,string"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // Start: The starting byte position of the output that was returned. - // This should match the start parameter sent with the request. If the - // serial console output exceeds the size of the buffer, older output - // will be overwritten by newer content and the start values will be - // mismatched. - Start int64 `json:"start,omitempty,string"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Contents") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Contents") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SerialPortOutput) MarshalJSON() ([]byte, error) { - type noMethod SerialPortOutput - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ServiceAccount: A service account. -type ServiceAccount struct { - // Email: Email address of the service account. - Email string `json:"email,omitempty"` - - // Scopes: The list of scopes to be made available for this service - // account. - Scopes []string `json:"scopes,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Email") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Email") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ServiceAccount) MarshalJSON() ([]byte, error) { - type noMethod ServiceAccount - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SignedUrlKey: Represents a customer-supplied Signing Key used by -// Cloud CDN Signed URLs -type SignedUrlKey struct { - // KeyName: Name of the key. The name must be 1-63 characters long, and - // comply with RFC1035. Specifically, the name must be 1-63 characters - // long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? - // which means the first character must be a lowercase letter, and all - // following characters must be a dash, lowercase letter, or digit, - // except the last character, which cannot be a dash. - KeyName string `json:"keyName,omitempty"` - - // KeyValue: 128-bit key value used for signing the URL. The key value - // must be a valid RFC 4648 Section 5 base64url encoded string. - KeyValue string `json:"keyValue,omitempty"` - - // ForceSendFields is a list of field names (e.g. "KeyName") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "KeyName") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SignedUrlKey) MarshalJSON() ([]byte, error) { - type noMethod SignedUrlKey - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Snapshot: A persistent disk snapshot resource. -type Snapshot struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // DiskSizeGb: [Output Only] Size of the snapshot, specified in GB. - DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#snapshot for - // Snapshot resources. - Kind string `json:"kind,omitempty"` - - // LabelFingerprint: A fingerprint for the labels being applied to this - // snapshot, which is essentially a hash of the labels set used for - // optimistic locking. The fingerprint is initially generated by Compute - // Engine and changes after every request to modify or update labels. - // You must always provide an up-to-date fingerprint hash in order to - // update or change labels. - // - // To see the latest fingerprint, make a get() request to retrieve a - // snapshot. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // Labels: Labels to apply to this snapshot. These can be later modified - // by the setLabels method. Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - - // LicenseCodes: Integer license codes indicating which licenses are - // attached to this snapshot. - LicenseCodes googleapi.Int64s `json:"licenseCodes,omitempty"` - - // Licenses: [Output Only] A list of public visible licenses that apply - // to this snapshot. This can be because the original image had licenses - // attached (such as a Windows image). - Licenses []string `json:"licenses,omitempty"` - - // Name: Name of the resource; provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // SnapshotEncryptionKey: Encrypts the snapshot using a - // customer-supplied encryption key. - // - // After you encrypt a snapshot using a customer-supplied key, you must - // provide the same key if you use the image later For example, you must - // provide the encryption key when you create a disk from the encrypted - // snapshot in a future request. - // - // Customer-supplied encryption keys do not protect access to metadata - // of the disk. - // - // If you do not provide an encryption key when creating the snapshot, - // then the snapshot will be encrypted using an automatically generated - // key and you do not need to provide a key to use the snapshot later. - SnapshotEncryptionKey *CustomerEncryptionKey `json:"snapshotEncryptionKey,omitempty"` - - // SourceDisk: [Output Only] The source disk used to create this - // snapshot. - SourceDisk string `json:"sourceDisk,omitempty"` - - // SourceDiskEncryptionKey: The customer-supplied encryption key of the - // source disk. Required if the source disk is protected by a - // customer-supplied encryption key. - SourceDiskEncryptionKey *CustomerEncryptionKey `json:"sourceDiskEncryptionKey,omitempty"` - - // SourceDiskId: [Output Only] The ID value of the disk used to create - // this snapshot. This value may be used to determine whether the - // snapshot was taken from the current or a previous instance of a given - // disk name. - SourceDiskId string `json:"sourceDiskId,omitempty"` - - // Status: [Output Only] The status of the snapshot. This can be - // CREATING, DELETING, FAILED, READY, or UPLOADING. - // - // Possible values: - // "CREATING" - // "DELETING" - // "FAILED" - // "READY" - // "UPLOADING" - Status string `json:"status,omitempty"` - - // StorageBytes: [Output Only] A size of the the storage used by the - // snapshot. As snapshots share storage, this number is expected to - // change with snapshot creation/deletion. - StorageBytes int64 `json:"storageBytes,omitempty,string"` - - // StorageBytesStatus: [Output Only] An indicator whether storageBytes - // is in a stable state or it is being adjusted as a result of shared - // storage reallocation. This status can either be UPDATING, meaning the - // size of the snapshot is being updated, or UP_TO_DATE, meaning the - // size of the snapshot is up-to-date. - // - // Possible values: - // "UPDATING" - // "UP_TO_DATE" - StorageBytesStatus string `json:"storageBytesStatus,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Snapshot) MarshalJSON() ([]byte, error) { - type noMethod Snapshot - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SnapshotList: Contains a list of Snapshot resources. -type SnapshotList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Snapshot resources. - Items []*Snapshot `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SnapshotList) MarshalJSON() ([]byte, error) { - type noMethod SnapshotList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SslCertificate: An SslCertificate resource. This resource provides a -// mechanism to upload an SSL key and certificate to the load balancer -// to serve secure connections from the user. -type SslCertificate struct { - // Certificate: A local certificate file. The certificate must be in PEM - // format. The certificate chain must be no greater than 5 certs long. - // The chain must include at least one intermediate cert. - Certificate string `json:"certificate,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always - // compute#sslCertificate for SSL certificates. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // PrivateKey: A write-only private key in PEM format. Only insert - // requests will include this field. - PrivateKey string `json:"privateKey,omitempty"` - - // SelfLink: [Output only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Certificate") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Certificate") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SslCertificate) MarshalJSON() ([]byte, error) { - type noMethod SslCertificate - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SslCertificateList: Contains a list of SslCertificate resources. -type SslCertificateList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of SslCertificate resources. - Items []*SslCertificate `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SslCertificateList) MarshalJSON() ([]byte, error) { - type noMethod SslCertificateList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Subnetwork: A Subnetwork resource. -type Subnetwork struct { - // AllowSubnetCidrRoutesOverlap: Whether this subnetwork can conflict - // with static routes. Setting this to true allows this subnetwork's - // primary and secondary ranges to conflict with routes that have - // already been configured on the corresponding network. Static routes - // will take precedence over the subnetwork route if the route prefix - // length is at least as large as the subnetwork prefix length. - // - // Also, packets destined to IPs within subnetwork may contain - // private/sensitive data and are prevented from leaving the virtual - // network. Setting this field to true will disable this feature. - // - // The default value is false and applies to all existing subnetworks - // and automatically created subnetworks. - // - // This field cannot be set to true at resource creation time. - AllowSubnetCidrRoutesOverlap bool `json:"allowSubnetCidrRoutesOverlap,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. This field can be set only at - // resource creation time. - Description string `json:"description,omitempty"` - - // Fingerprint: Fingerprint of this resource. A hash of the contents - // stored in this object. This field is used in optimistic locking. This - // field will be ignored when inserting a Subnetwork. An up-to-date - // fingerprint must be provided in order to update the Subnetwork. - Fingerprint string `json:"fingerprint,omitempty"` - - // GatewayAddress: [Output Only] The gateway address for default routes - // to reach destination addresses outside this subnetwork. This field - // can be set only at resource creation time. - GatewayAddress string `json:"gatewayAddress,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // IpCidrRange: The range of internal addresses that are owned by this - // subnetwork. Provide this property when you create the subnetwork. For - // example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and - // non-overlapping within a network. Only IPv4 is supported. This field - // can be set only at resource creation time. - IpCidrRange string `json:"ipCidrRange,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#subnetwork - // for Subnetwork resources. - Kind string `json:"kind,omitempty"` - - // Name: The name of the resource, provided by the client when initially - // creating the resource. The name must be 1-63 characters long, and - // comply with RFC1035. Specifically, the name must be 1-63 characters - // long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? - // which means the first character must be a lowercase letter, and all - // following characters must be a dash, lowercase letter, or digit, - // except the last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Network: The URL of the network to which this subnetwork belongs, - // provided by the client when initially creating the subnetwork. Only - // networks that are in the distributed mode can have subnetworks. This - // field can be set only at resource creation time. - Network string `json:"network,omitempty"` - - // PrivateIpGoogleAccess: Whether the VMs in this subnet can access - // Google services without assigned external IP addresses. This field - // can be both set at resource creation time and updated using - // setPrivateIpGoogleAccess. - PrivateIpGoogleAccess bool `json:"privateIpGoogleAccess,omitempty"` - - // Region: URL of the region where the Subnetwork resides. This field - // can be set only at resource creation time. - Region string `json:"region,omitempty"` - - // SecondaryIpRanges: An array of configurations for secondary IP ranges - // for VM instances contained in this subnetwork. The primary IP of such - // VM must belong to the primary ipCidrRange of the subnetwork. The - // alias IPs may belong to either primary or secondary ranges. - SecondaryIpRanges []*SubnetworkSecondaryRange `json:"secondaryIpRanges,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. - // "AllowSubnetCidrRoutesOverlap") to unconditionally include in API - // requests. By default, fields with empty values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. - // "AllowSubnetCidrRoutesOverlap") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Subnetwork) MarshalJSON() ([]byte, error) { - type noMethod Subnetwork - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type SubnetworkAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of SubnetworksScopedList resources. - Items map[string]SubnetworksScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#subnetworkAggregatedList for aggregated lists of subnetworks. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SubnetworkAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod SubnetworkAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SubnetworkList: Contains a list of Subnetwork resources. -type SubnetworkList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Subnetwork resources. - Items []*Subnetwork `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#subnetworkList - // for lists of subnetworks. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SubnetworkList) MarshalJSON() ([]byte, error) { - type noMethod SubnetworkList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SubnetworkSecondaryRange: Represents a secondary IP range of a -// subnetwork. -type SubnetworkSecondaryRange struct { - // IpCidrRange: The range of IP addresses belonging to this subnetwork - // secondary range. Provide this property when you create the - // subnetwork. Ranges must be unique and non-overlapping with all - // primary and secondary IP ranges within a network. Only IPv4 is - // supported. - IpCidrRange string `json:"ipCidrRange,omitempty"` - - // RangeName: The name associated with this subnetwork secondary range, - // used when adding an alias IP range to a VM instance. The name must be - // 1-63 characters long, and comply with RFC1035. The name must be - // unique within the subnetwork. - RangeName string `json:"rangeName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IpCidrRange") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IpCidrRange") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SubnetworkSecondaryRange) MarshalJSON() ([]byte, error) { - type noMethod SubnetworkSecondaryRange - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type SubnetworksExpandIpCidrRangeRequest struct { - // IpCidrRange: The IP (in CIDR format or netmask) of internal addresses - // that are legal on this Subnetwork. This range should be disjoint from - // other subnetworks within this network. This range can only be larger - // than (i.e. a superset of) the range previously defined before the - // update. - IpCidrRange string `json:"ipCidrRange,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IpCidrRange") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IpCidrRange") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SubnetworksExpandIpCidrRangeRequest) MarshalJSON() ([]byte, error) { - type noMethod SubnetworksExpandIpCidrRangeRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type SubnetworksScopedList struct { - // Subnetworks: List of subnetworks contained in this scope. - Subnetworks []*Subnetwork `json:"subnetworks,omitempty"` - - // Warning: An informational warning that appears when the list of - // addresses is empty. - Warning *SubnetworksScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Subnetworks") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Subnetworks") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SubnetworksScopedList) MarshalJSON() ([]byte, error) { - type noMethod SubnetworksScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SubnetworksScopedListWarning: An informational warning that appears -// when the list of addresses is empty. -type SubnetworksScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*SubnetworksScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SubnetworksScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod SubnetworksScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type SubnetworksScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SubnetworksScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod SubnetworksScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type SubnetworksSetPrivateIpGoogleAccessRequest struct { - PrivateIpGoogleAccess bool `json:"privateIpGoogleAccess,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "PrivateIpGoogleAccess") to unconditionally include in API requests. - // By default, fields with empty values are omitted from API requests. - // However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "PrivateIpGoogleAccess") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *SubnetworksSetPrivateIpGoogleAccessRequest) MarshalJSON() ([]byte, error) { - type noMethod SubnetworksSetPrivateIpGoogleAccessRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TCPHealthCheck struct { - // Port: The TCP port number for the health check request. The default - // value is 80. Valid values are 1 through 65535. - Port int64 `json:"port,omitempty"` - - // PortName: Port name as defined in InstanceGroup#NamedPort#name. If - // both port and port_name are defined, port takes precedence. - PortName string `json:"portName,omitempty"` - - // ProxyHeader: Specifies the type of proxy header to append before - // sending data to the backend, either NONE or PROXY_V1. The default is - // NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - - // Request: The application data to send once the TCP connection has - // been established (default value is empty). If both request and - // response are empty, the connection establishment alone will indicate - // health. The request data can only be ASCII. - Request string `json:"request,omitempty"` - - // Response: The bytes to match against the beginning of the response - // data. If left empty (the default value), any response will indicate - // health. The response data can only be ASCII. - Response string `json:"response,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Port") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Port") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TCPHealthCheck) MarshalJSON() ([]byte, error) { - type noMethod TCPHealthCheck - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Tags: A set of instance tags. -type Tags struct { - // Fingerprint: Specifies a fingerprint for this request, which is - // essentially a hash of the metadata's contents and used for optimistic - // locking. The fingerprint is initially generated by Compute Engine and - // changes after every request to modify or update metadata. You must - // always provide an up-to-date fingerprint hash in order to update or - // change metadata. - // - // To see the latest fingerprint, make get() request to the instance. - Fingerprint string `json:"fingerprint,omitempty"` - - // Items: An array of tags. Each tag must be 1-63 characters long, and - // comply with RFC1035. - Items []string `json:"items,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Fingerprint") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Tags) MarshalJSON() ([]byte, error) { - type noMethod Tags - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetHttpProxy: A TargetHttpProxy resource. This resource defines an -// HTTP proxy. -type TargetHttpProxy struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of resource. Always compute#targetHttpProxy - // for target HTTP proxies. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // UrlMap: URL to the UrlMap resource that defines the mapping from URL - // to the BackendService. - UrlMap string `json:"urlMap,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetHttpProxy) MarshalJSON() ([]byte, error) { - type noMethod TargetHttpProxy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetHttpProxyList: A list of TargetHttpProxy resources. -type TargetHttpProxyList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetHttpProxy resources. - Items []*TargetHttpProxy `json:"items,omitempty"` - - // Kind: Type of resource. Always compute#targetHttpProxyList for lists - // of target HTTP proxies. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetHttpProxyList) MarshalJSON() ([]byte, error) { - type noMethod TargetHttpProxyList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetHttpsProxiesSetQuicOverrideRequest struct { - // QuicOverride: QUIC policy for the TargetHttpsProxy resource. - // - // Possible values: - // "DISABLE" - // "ENABLE" - // "NONE" - QuicOverride string `json:"quicOverride,omitempty"` - - // ForceSendFields is a list of field names (e.g. "QuicOverride") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "QuicOverride") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetHttpsProxiesSetQuicOverrideRequest) MarshalJSON() ([]byte, error) { - type noMethod TargetHttpsProxiesSetQuicOverrideRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetHttpsProxiesSetSslCertificatesRequest struct { - // SslCertificates: New set of SslCertificate resources to associate - // with this TargetHttpsProxy resource. Currently exactly one - // SslCertificate resource must be specified. - SslCertificates []string `json:"sslCertificates,omitempty"` - - // ForceSendFields is a list of field names (e.g. "SslCertificates") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "SslCertificates") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetHttpsProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, error) { - type noMethod TargetHttpsProxiesSetSslCertificatesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetHttpsProxy: A TargetHttpsProxy resource. This resource defines -// an HTTPS proxy. -type TargetHttpsProxy struct { - // ClientSslPolicy: URL to ClientSslPolicy resource which controls the - // set of allowed SSL versions and ciphers. - ClientSslPolicy string `json:"clientSslPolicy,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of resource. Always compute#targetHttpsProxy - // for target HTTPS proxies. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // QuicOverride: Specifies the QUIC override policy for this - // TargetHttpsProxy resource. This determines whether the load balancer - // will attempt to negotiate QUIC with clients or not. Can specify one - // of NONE, ENABLE, or DISABLE. Specify ENABLE to always enable QUIC, - // Enables QUIC when set to ENABLE, and disables QUIC when set to - // DISABLE. If NONE is specified, uses the QUIC policy with no user - // overrides, which is equivalent to DISABLE. Not specifying this field - // is equivalent to specifying NONE. - // - // Possible values: - // "DISABLE" - // "ENABLE" - // "NONE" - QuicOverride string `json:"quicOverride,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // SslCertificates: URLs to SslCertificate resources that are used to - // authenticate connections between users and the load balancer. - // Currently, exactly one SSL certificate must be specified. - SslCertificates []string `json:"sslCertificates,omitempty"` - - // UrlMap: A fully-qualified or valid partial URL to the UrlMap resource - // that defines the mapping from URL to the BackendService. For example, - // the following are all valid URLs for specifying a URL map: - // - - // https://www.googleapis.compute/v1/projects/project/global/urlMaps/url-map - // - projects/project/global/urlMaps/url-map - // - global/urlMaps/url-map - UrlMap string `json:"urlMap,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ClientSslPolicy") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ClientSslPolicy") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetHttpsProxy) MarshalJSON() ([]byte, error) { - type noMethod TargetHttpsProxy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetHttpsProxyList: Contains a list of TargetHttpsProxy resources. -type TargetHttpsProxyList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetHttpsProxy resources. - Items []*TargetHttpsProxy `json:"items,omitempty"` - - // Kind: Type of resource. Always compute#targetHttpsProxyList for lists - // of target HTTPS proxies. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetHttpsProxyList) MarshalJSON() ([]byte, error) { - type noMethod TargetHttpsProxyList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetInstance: A TargetInstance resource. This resource defines an -// endpoint instance that terminates traffic of certain protocols. -type TargetInstance struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Instance: A URL to the virtual machine instance that handles traffic - // for this target instance. When creating a target instance, you can - // provide the fully-qualified URL or a valid partial URL to the desired - // virtual machine. For example, the following are all valid URLs: - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance - // - projects/project/zones/zone/instances/instance - // - zones/zone/instances/instance - Instance string `json:"instance,omitempty"` - - // Kind: [Output Only] The type of the resource. Always - // compute#targetInstance for target instances. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // NatPolicy: NAT option controlling how IPs are NAT'ed to the instance. - // Currently only NO_NAT (default value) is supported. - // - // Possible values: - // "NO_NAT" - NatPolicy string `json:"natPolicy,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Zone: [Output Only] URL of the zone where the target instance - // resides. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetInstance) MarshalJSON() ([]byte, error) { - type noMethod TargetInstance - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetInstanceAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetInstance resources. - Items map[string]TargetInstancesScopedList `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetInstanceAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod TargetInstanceAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetInstanceList: Contains a list of TargetInstance resources. -type TargetInstanceList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetInstance resources. - Items []*TargetInstance `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetInstanceList) MarshalJSON() ([]byte, error) { - type noMethod TargetInstanceList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetInstancesScopedList struct { - // TargetInstances: List of target instances contained in this scope. - TargetInstances []*TargetInstance `json:"targetInstances,omitempty"` - - // Warning: Informational warning which replaces the list of addresses - // when the list is empty. - Warning *TargetInstancesScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "TargetInstances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "TargetInstances") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetInstancesScopedList) MarshalJSON() ([]byte, error) { - type noMethod TargetInstancesScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetInstancesScopedListWarning: Informational warning which -// replaces the list of addresses when the list is empty. -type TargetInstancesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*TargetInstancesScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetInstancesScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod TargetInstancesScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetInstancesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetInstancesScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod TargetInstancesScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetPool: A TargetPool resource. This resource defines a pool of -// instances, an associated HttpHealthCheck resource, and the fallback -// target pool. -type TargetPool struct { - // BackupPool: This field is applicable only when the containing target - // pool is serving a forwarding rule as the primary pool, and its - // failoverRatio field is properly set to a value between [0, - // 1]. - // - // backupPool and failoverRatio together define the fallback behavior of - // the primary target pool: if the ratio of the healthy instances in the - // primary pool is at or below failoverRatio, traffic arriving at the - // load-balanced IP will be directed to the backup pool. - // - // In case where failoverRatio and backupPool are not set, or all the - // instances in the backup pool are unhealthy, the traffic will be - // directed back to the primary pool in the "force" mode, where traffic - // will be spread to the healthy instances with the best effort, or to - // all instances when no instance is healthy. - BackupPool string `json:"backupPool,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // FailoverRatio: This field is applicable only when the containing - // target pool is serving a forwarding rule as the primary pool (i.e., - // not as a backup pool to some other target pool). The value of the - // field must be in [0, 1]. - // - // If set, backupPool must also be set. They together define the - // fallback behavior of the primary target pool: if the ratio of the - // healthy instances in the primary pool is at or below this number, - // traffic arriving at the load-balanced IP will be directed to the - // backup pool. - // - // In case where failoverRatio is not set or all the instances in the - // backup pool are unhealthy, the traffic will be directed back to the - // primary pool in the "force" mode, where traffic will be spread to the - // healthy instances with the best effort, or to all instances when no - // instance is healthy. - FailoverRatio float64 `json:"failoverRatio,omitempty"` - - // HealthChecks: The URL of the HttpHealthCheck resource. A member - // instance in this pool is considered healthy if and only if the health - // checks pass. An empty list means all member instances will be - // considered healthy at all times. Only HttpHealthChecks are supported. - // Only one health check may be specified. - HealthChecks []string `json:"healthChecks,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Instances: A list of resource URLs to the virtual machine instances - // serving this pool. They must live in zones contained in the same - // region as this pool. - Instances []string `json:"instances,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#targetPool - // for target pools. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Region: [Output Only] URL of the region where the target pool - // resides. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // SessionAffinity: Sesssion affinity option, must be one of the - // following values: - // NONE: Connections from the same client IP may go to any instance in - // the pool. - // CLIENT_IP: Connections from the same client IP will go to the same - // instance in the pool while that instance remains - // healthy. - // CLIENT_IP_PROTO: Connections from the same client IP with the same IP - // protocol will go to the same instance in the pool while that instance - // remains healthy. - // - // Possible values: - // "CLIENT_IP" - // "CLIENT_IP_PORT_PROTO" - // "CLIENT_IP_PROTO" - // "GENERATED_COOKIE" - // "NONE" - SessionAffinity string `json:"sessionAffinity,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "BackupPool") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BackupPool") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPool) MarshalJSON() ([]byte, error) { - type noMethod TargetPool - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *TargetPool) UnmarshalJSON(data []byte) error { - type noMethod TargetPool - var s1 struct { - FailoverRatio gensupport.JSONFloat64 `json:"failoverRatio"` - *noMethod - } - s1.noMethod = (*noMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FailoverRatio = float64(s1.FailoverRatio) - return nil -} - -type TargetPoolAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetPool resources. - Items map[string]TargetPoolsScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#targetPoolAggregatedList for aggregated lists of target - // pools. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPoolAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod TargetPoolAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetPoolInstanceHealth struct { - HealthStatus []*HealthStatus `json:"healthStatus,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#targetPoolInstanceHealth when checking the health of an - // instance. - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "HealthStatus") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "HealthStatus") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPoolInstanceHealth) MarshalJSON() ([]byte, error) { - type noMethod TargetPoolInstanceHealth - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetPoolList: Contains a list of TargetPool resources. -type TargetPoolList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetPool resources. - Items []*TargetPool `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#targetPoolList - // for lists of target pools. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPoolList) MarshalJSON() ([]byte, error) { - type noMethod TargetPoolList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetPoolsAddHealthCheckRequest struct { - // HealthChecks: The HttpHealthCheck to add to the target pool. - HealthChecks []*HealthCheckReference `json:"healthChecks,omitempty"` - - // ForceSendFields is a list of field names (e.g. "HealthChecks") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "HealthChecks") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPoolsAddHealthCheckRequest) MarshalJSON() ([]byte, error) { - type noMethod TargetPoolsAddHealthCheckRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetPoolsAddInstanceRequest struct { - // Instances: A full or partial URL to an instance to add to this target - // pool. This can be a full or partial URL. For example, the following - // are valid URLs: - // - - // https://www.googleapis.com/compute/v1/projects/project-id/zones/zone/instances/instance-name - // - projects/project-id/zones/zone/instances/instance-name - // - zones/zone/instances/instance-name - Instances []*InstanceReference `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPoolsAddInstanceRequest) MarshalJSON() ([]byte, error) { - type noMethod TargetPoolsAddInstanceRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetPoolsRemoveHealthCheckRequest struct { - // HealthChecks: Health check URL to be removed. This can be a full or - // valid partial URL. For example, the following are valid URLs: - // - - // https://www.googleapis.com/compute/beta/projects/project/global/httpHealthChecks/health-check - // - projects/project/global/httpHealthChecks/health-check - // - global/httpHealthChecks/health-check - HealthChecks []*HealthCheckReference `json:"healthChecks,omitempty"` - - // ForceSendFields is a list of field names (e.g. "HealthChecks") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "HealthChecks") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPoolsRemoveHealthCheckRequest) MarshalJSON() ([]byte, error) { - type noMethod TargetPoolsRemoveHealthCheckRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetPoolsRemoveInstanceRequest struct { - // Instances: URLs of the instances to be removed from target pool. - Instances []*InstanceReference `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPoolsRemoveInstanceRequest) MarshalJSON() ([]byte, error) { - type noMethod TargetPoolsRemoveInstanceRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetPoolsScopedList struct { - // TargetPools: List of target pools contained in this scope. - TargetPools []*TargetPool `json:"targetPools,omitempty"` - - // Warning: Informational warning which replaces the list of addresses - // when the list is empty. - Warning *TargetPoolsScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "TargetPools") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "TargetPools") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPoolsScopedList) MarshalJSON() ([]byte, error) { - type noMethod TargetPoolsScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetPoolsScopedListWarning: Informational warning which replaces -// the list of addresses when the list is empty. -type TargetPoolsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*TargetPoolsScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPoolsScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod TargetPoolsScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetPoolsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPoolsScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod TargetPoolsScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetReference struct { - Target string `json:"target,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Target") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Target") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetReference) MarshalJSON() ([]byte, error) { - type noMethod TargetReference - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetSslProxiesSetBackendServiceRequest struct { - // Service: The URL of the new BackendService resource for the - // targetSslProxy. - Service string `json:"service,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Service") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Service") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetSslProxiesSetBackendServiceRequest) MarshalJSON() ([]byte, error) { - type noMethod TargetSslProxiesSetBackendServiceRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetSslProxiesSetProxyHeaderRequest struct { - // ProxyHeader: The new type of proxy header to append before sending - // data to the backend. NONE or PROXY_V1 are allowed. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ProxyHeader") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ProxyHeader") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetSslProxiesSetProxyHeaderRequest) MarshalJSON() ([]byte, error) { - type noMethod TargetSslProxiesSetProxyHeaderRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetSslProxiesSetSslCertificatesRequest struct { - // SslCertificates: New set of URLs to SslCertificate resources to - // associate with this TargetSslProxy. Currently exactly one ssl - // certificate must be specified. - SslCertificates []string `json:"sslCertificates,omitempty"` - - // ForceSendFields is a list of field names (e.g. "SslCertificates") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "SslCertificates") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetSslProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, error) { - type noMethod TargetSslProxiesSetSslCertificatesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetSslProxy: A TargetSslProxy resource. This resource defines an -// SSL proxy. -type TargetSslProxy struct { - // ClientSslPolicy: URL to ClientSslPolicy resource which controls the - // set of allowed SSL versions and ciphers. - ClientSslPolicy string `json:"clientSslPolicy,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always - // compute#targetSslProxy for target SSL proxies. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // ProxyHeader: Specifies the type of proxy header to append before - // sending data to the backend, either NONE or PROXY_V1. The default is - // NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Service: URL to the BackendService resource. - Service string `json:"service,omitempty"` - - // SslCertificates: URLs to SslCertificate resources that are used to - // authenticate connections to Backends. Currently exactly one SSL - // certificate must be specified. - SslCertificates []string `json:"sslCertificates,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ClientSslPolicy") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ClientSslPolicy") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetSslProxy) MarshalJSON() ([]byte, error) { - type noMethod TargetSslProxy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetSslProxyList: Contains a list of TargetSslProxy resources. -type TargetSslProxyList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetSslProxy resources. - Items []*TargetSslProxy `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetSslProxyList) MarshalJSON() ([]byte, error) { - type noMethod TargetSslProxyList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetTcpProxiesSetBackendServiceRequest struct { - // Service: The URL of the new BackendService resource for the - // targetTcpProxy. - Service string `json:"service,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Service") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Service") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetTcpProxiesSetBackendServiceRequest) MarshalJSON() ([]byte, error) { - type noMethod TargetTcpProxiesSetBackendServiceRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetTcpProxiesSetProxyHeaderRequest struct { - // ProxyHeader: The new type of proxy header to append before sending - // data to the backend. NONE or PROXY_V1 are allowed. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ProxyHeader") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ProxyHeader") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetTcpProxiesSetProxyHeaderRequest) MarshalJSON() ([]byte, error) { - type noMethod TargetTcpProxiesSetProxyHeaderRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetTcpProxy: A TargetTcpProxy resource. This resource defines a -// TCP proxy. -type TargetTcpProxy struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always - // compute#targetTcpProxy for target TCP proxies. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // ProxyHeader: Specifies the type of proxy header to append before - // sending data to the backend, either NONE or PROXY_V1. The default is - // NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Service: URL to the BackendService resource. - Service string `json:"service,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetTcpProxy) MarshalJSON() ([]byte, error) { - type noMethod TargetTcpProxy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetTcpProxyList: Contains a list of TargetTcpProxy resources. -type TargetTcpProxyList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetTcpProxy resources. - Items []*TargetTcpProxy `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetTcpProxyList) MarshalJSON() ([]byte, error) { - type noMethod TargetTcpProxyList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetVpnGateway: Represents a Target VPN gateway resource. -type TargetVpnGateway struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // ForwardingRules: [Output Only] A list of URLs to the ForwardingRule - // resources. ForwardingRules are created using - // compute.forwardingRules.insert and associated to a VPN gateway. - ForwardingRules []string `json:"forwardingRules,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of resource. Always compute#targetVpnGateway - // for target VPN gateways. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Network: URL of the network to which this VPN gateway is attached. - // Provided by the client when the VPN gateway is created. - Network string `json:"network,omitempty"` - - // Region: [Output Only] URL of the region where the target VPN gateway - // resides. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Status: [Output Only] The status of the VPN gateway. - // - // Possible values: - // "CREATING" - // "DELETING" - // "FAILED" - // "READY" - Status string `json:"status,omitempty"` - - // Tunnels: [Output Only] A list of URLs to VpnTunnel resources. - // VpnTunnels are created using compute.vpntunnels.insert method and - // associated to a VPN gateway. - Tunnels []string `json:"tunnels,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetVpnGateway) MarshalJSON() ([]byte, error) { - type noMethod TargetVpnGateway - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetVpnGatewayAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetVpnGateway resources. - Items map[string]TargetVpnGatewaysScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#targetVpnGateway - // for target VPN gateways. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetVpnGatewayAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod TargetVpnGatewayAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetVpnGatewayList: Contains a list of TargetVpnGateway resources. -type TargetVpnGatewayList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetVpnGateway resources. - Items []*TargetVpnGateway `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#targetVpnGateway - // for target VPN gateways. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetVpnGatewayList) MarshalJSON() ([]byte, error) { - type noMethod TargetVpnGatewayList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetVpnGatewaysScopedList struct { - // TargetVpnGateways: [Output Only] List of target vpn gateways - // contained in this scope. - TargetVpnGateways []*TargetVpnGateway `json:"targetVpnGateways,omitempty"` - - // Warning: [Output Only] Informational warning which replaces the list - // of addresses when the list is empty. - Warning *TargetVpnGatewaysScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "TargetVpnGateways") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "TargetVpnGateways") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetVpnGatewaysScopedList) MarshalJSON() ([]byte, error) { - type noMethod TargetVpnGatewaysScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetVpnGatewaysScopedListWarning: [Output Only] Informational -// warning which replaces the list of addresses when the list is empty. -type TargetVpnGatewaysScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*TargetVpnGatewaysScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetVpnGatewaysScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod TargetVpnGatewaysScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetVpnGatewaysScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetVpnGatewaysScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod TargetVpnGatewaysScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TestFailure struct { - ActualService string `json:"actualService,omitempty"` - - ExpectedService string `json:"expectedService,omitempty"` - - Host string `json:"host,omitempty"` - - Path string `json:"path,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ActualService") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ActualService") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TestFailure) MarshalJSON() ([]byte, error) { - type noMethod TestFailure - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TestPermissionsRequest struct { - // Permissions: The set of permissions to check for the 'resource'. - // Permissions with wildcards (such as '*' or 'storage.*') are not - // allowed. - Permissions []string `json:"permissions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Permissions") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Permissions") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TestPermissionsRequest) MarshalJSON() ([]byte, error) { - type noMethod TestPermissionsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TestPermissionsResponse struct { - // Permissions: A subset of `TestPermissionsRequest.permissions` that - // the caller is allowed. - Permissions []string `json:"permissions,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Permissions") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Permissions") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TestPermissionsResponse) MarshalJSON() ([]byte, error) { - type noMethod TestPermissionsResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type UDPHealthCheck struct { - // Port: The UDP port number for the health check request. Valid values - // are 1 through 65535. - Port int64 `json:"port,omitempty"` - - // PortName: Port name as defined in InstanceGroup#NamedPort#name. If - // both port and port_name are defined, port takes precedence. - PortName string `json:"portName,omitempty"` - - // Request: Raw data of request to send in payload of UDP packet. It is - // an error if this is empty. The request data can only be ASCII. - Request string `json:"request,omitempty"` - - // Response: The bytes to match against the beginning of the response - // data. It is an error if this is empty. The response data can only be - // ASCII. - Response string `json:"response,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Port") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Port") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UDPHealthCheck) MarshalJSON() ([]byte, error) { - type noMethod UDPHealthCheck - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// UrlMap: A UrlMap resource. This resource defines the mapping from URL -// to the BackendService resource, based on the "longest-match" of the -// URL's host and path. -type UrlMap struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // DefaultService: The URL of the BackendService resource if none of the - // hostRules match. - DefaultService string `json:"defaultService,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Fingerprint: Fingerprint of this resource. A hash of the contents - // stored in this object. This field is used in optimistic locking. This - // field will be ignored when inserting a UrlMap. An up-to-date - // fingerprint must be provided in order to update the UrlMap. - Fingerprint string `json:"fingerprint,omitempty"` - - // HostRules: The list of HostRules to use against the URL. - HostRules []*HostRule `json:"hostRules,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#urlMaps for - // url maps. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // PathMatchers: The list of named PathMatchers to use against the URL. - PathMatchers []*PathMatcher `json:"pathMatchers,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Tests: The list of expected URL mappings. Request to update this - // UrlMap will succeed only if all of the test cases pass. - Tests []*UrlMapTest `json:"tests,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *UrlMap) MarshalJSON() ([]byte, error) { - type noMethod UrlMap - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// UrlMapList: Contains a list of UrlMap resources. -type UrlMapList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of UrlMap resources. - Items []*UrlMap `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UrlMapList) MarshalJSON() ([]byte, error) { - type noMethod UrlMapList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type UrlMapReference struct { - UrlMap string `json:"urlMap,omitempty"` - - // ForceSendFields is a list of field names (e.g. "UrlMap") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "UrlMap") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UrlMapReference) MarshalJSON() ([]byte, error) { - type noMethod UrlMapReference - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// UrlMapTest: Message for the expected URL mappings. -type UrlMapTest struct { - // Description: Description of this test case. - Description string `json:"description,omitempty"` - - // Host: Host portion of the URL. - Host string `json:"host,omitempty"` - - // Path: Path portion of the URL. - Path string `json:"path,omitempty"` - - // Service: Expected BackendService resource the given URL should be - // mapped to. - Service string `json:"service,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UrlMapTest) MarshalJSON() ([]byte, error) { - type noMethod UrlMapTest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// UrlMapValidationResult: Message representing the validation result -// for a UrlMap. -type UrlMapValidationResult struct { - LoadErrors []string `json:"loadErrors,omitempty"` - - // LoadSucceeded: Whether the given UrlMap can be successfully loaded. - // If false, 'loadErrors' indicates the reasons. - LoadSucceeded bool `json:"loadSucceeded,omitempty"` - - TestFailures []*TestFailure `json:"testFailures,omitempty"` - - // TestPassed: If successfully loaded, this field indicates whether the - // test passed. If false, 'testFailures's indicate the reason of - // failure. - TestPassed bool `json:"testPassed,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LoadErrors") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "LoadErrors") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UrlMapValidationResult) MarshalJSON() ([]byte, error) { - type noMethod UrlMapValidationResult - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type UrlMapsValidateRequest struct { - // Resource: Content of the UrlMap to be validated. - Resource *UrlMap `json:"resource,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Resource") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Resource") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UrlMapsValidateRequest) MarshalJSON() ([]byte, error) { - type noMethod UrlMapsValidateRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type UrlMapsValidateResponse struct { - Result *UrlMapValidationResult `json:"result,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Result") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Result") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UrlMapsValidateResponse) MarshalJSON() ([]byte, error) { - type noMethod UrlMapsValidateResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// UsageExportLocation: The location in Cloud Storage and naming method -// of the daily usage report. Contains bucket_name and report_name -// prefix. -type UsageExportLocation struct { - // BucketName: The name of an existing bucket in Cloud Storage where the - // usage report object is stored. The Google Service Account is granted - // write access to this bucket. This can either be the bucket name by - // itself, such as example-bucket, or the bucket name with gs:// or - // https://storage.googleapis.com/ in front of it, such as - // gs://example-bucket. - BucketName string `json:"bucketName,omitempty"` - - // ReportNamePrefix: An optional prefix for the name of the usage report - // object stored in bucketName. If not supplied, defaults to usage. The - // report is stored as a CSV file named - // report_name_prefix_gce_YYYYMMDD.csv where YYYYMMDD is the day of the - // usage according to Pacific Time. If you supply a prefix, it should - // conform to Cloud Storage object naming conventions. - ReportNamePrefix string `json:"reportNamePrefix,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BucketName") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BucketName") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UsageExportLocation) MarshalJSON() ([]byte, error) { - type noMethod UsageExportLocation - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type VpnTunnel struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // DetailedStatus: [Output Only] Detailed status message for the VPN - // tunnel. - DetailedStatus string `json:"detailedStatus,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // IkeVersion: IKE protocol version to use when establishing the VPN - // tunnel with peer VPN gateway. Acceptable IKE versions are 1 or 2. - // Default version is 2. - IkeVersion int64 `json:"ikeVersion,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#vpnTunnel for - // VPN tunnels. - Kind string `json:"kind,omitempty"` - - // LabelFingerprint: A fingerprint for the labels being applied to this - // VpnTunnel, which is essentially a hash of the labels set used for - // optimistic locking. The fingerprint is initially generated by Compute - // Engine and changes after every request to modify or update labels. - // You must always provide an up-to-date fingerprint hash in order to - // update or change labels. - // - // To see the latest fingerprint, make a get() request to retrieve a - // VpnTunnel. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // Labels: Labels to apply to this VpnTunnel. These can be later - // modified by the setLabels method. Each label key/value pair must - // comply with RFC1035. Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - - // LocalTrafficSelector: Local traffic selector to use when establishing - // the VPN tunnel with peer VPN gateway. The value should be a CIDR - // formatted string, for example: 192.168.0.0/16. The ranges should be - // disjoint. Only IPv4 is supported. - LocalTrafficSelector []string `json:"localTrafficSelector,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // PeerIp: IP address of the peer VPN gateway. Only IPv4 is supported. - PeerIp string `json:"peerIp,omitempty"` - - // Region: [Output Only] URL of the region where the VPN tunnel resides. - Region string `json:"region,omitempty"` - - // RemoteTrafficSelector: Remote traffic selectors to use when - // establishing the VPN tunnel with peer VPN gateway. The value should - // be a CIDR formatted string, for example: 192.168.0.0/16. The ranges - // should be disjoint. Only IPv4 is supported. - RemoteTrafficSelector []string `json:"remoteTrafficSelector,omitempty"` - - // Router: URL of router resource to be used for dynamic routing. - Router string `json:"router,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // SharedSecret: Shared secret used to set the secure session between - // the Cloud VPN gateway and the peer VPN gateway. - SharedSecret string `json:"sharedSecret,omitempty"` - - // SharedSecretHash: Hash of the shared secret. - SharedSecretHash string `json:"sharedSecretHash,omitempty"` - - // Status: [Output Only] The status of the VPN tunnel. - // - // Possible values: - // "ALLOCATING_RESOURCES" - // "AUTHORIZATION_ERROR" - // "DEPROVISIONING" - // "ESTABLISHED" - // "FAILED" - // "FIRST_HANDSHAKE" - // "NEGOTIATION_FAILURE" - // "NETWORK_ERROR" - // "NO_INCOMING_PACKETS" - // "PROVISIONING" - // "REJECTED" - // "WAITING_FOR_FULL_CONFIG" - Status string `json:"status,omitempty"` - - // TargetVpnGateway: URL of the VPN gateway with which this VPN tunnel - // is associated. Provided by the client when the VPN tunnel is created. - TargetVpnGateway string `json:"targetVpnGateway,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *VpnTunnel) MarshalJSON() ([]byte, error) { - type noMethod VpnTunnel - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type VpnTunnelAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of VpnTunnelsScopedList resources. - Items map[string]VpnTunnelsScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#vpnTunnel for - // VPN tunnels. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *VpnTunnelAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod VpnTunnelAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// VpnTunnelList: Contains a list of VpnTunnel resources. -type VpnTunnelList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of VpnTunnel resources. - Items []*VpnTunnel `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#vpnTunnel for - // VPN tunnels. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *VpnTunnelList) MarshalJSON() ([]byte, error) { - type noMethod VpnTunnelList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type VpnTunnelsScopedList struct { - // VpnTunnels: List of vpn tunnels contained in this scope. - VpnTunnels []*VpnTunnel `json:"vpnTunnels,omitempty"` - - // Warning: Informational warning which replaces the list of addresses - // when the list is empty. - Warning *VpnTunnelsScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "VpnTunnels") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "VpnTunnels") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *VpnTunnelsScopedList) MarshalJSON() ([]byte, error) { - type noMethod VpnTunnelsScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// VpnTunnelsScopedListWarning: Informational warning which replaces the -// list of addresses when the list is empty. -type VpnTunnelsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*VpnTunnelsScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *VpnTunnelsScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod VpnTunnelsScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type VpnTunnelsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *VpnTunnelsScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod VpnTunnelsScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XpnHostList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: [Output Only] A list of shared VPC host project URLs. - Items []*Project `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#xpnHostList for - // lists of shared VPC hosts. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XpnHostList) MarshalJSON() ([]byte, error) { - type noMethod XpnHostList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XpnResourceId: Service resource (a.k.a service project) ID. -type XpnResourceId struct { - // Id: The ID of the service resource. In the case of projects, this - // field matches the project ID (e.g., my-project), not the project - // number (e.g., 12345678). - Id string `json:"id,omitempty"` - - // Type: The type of the service resource. - // - // Possible values: - // "PROJECT" - // "XPN_RESOURCE_TYPE_UNSPECIFIED" - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XpnResourceId) MarshalJSON() ([]byte, error) { - type noMethod XpnResourceId - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Zone: A Zone resource. -type Zone struct { - // AvailableCpuPlatforms: [Output Only] Available cpu/platform - // selections for the zone. - AvailableCpuPlatforms []string `json:"availableCpuPlatforms,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Deprecated: [Output Only] The deprecation status associated with this - // zone. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - - // Description: [Output Only] Textual description of the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#zone for - // zones. - Kind string `json:"kind,omitempty"` - - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - - // Region: [Output Only] Full URL reference to the region which hosts - // the zone. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Status: [Output Only] Status of the zone, either UP or DOWN. - // - // Possible values: - // "DOWN" - // "UP" - Status string `json:"status,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. - // "AvailableCpuPlatforms") to unconditionally include in API requests. - // By default, fields with empty values are omitted from API requests. - // However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AvailableCpuPlatforms") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Zone) MarshalJSON() ([]byte, error) { - type noMethod Zone - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ZoneList: Contains a list of zone resources. -type ZoneList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Zone resources. - Items []*Zone `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ZoneList) MarshalJSON() ([]byte, error) { - type noMethod ZoneList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ZoneSetLabelsRequest struct { - // LabelFingerprint: The fingerprint of the previous set of labels for - // this resource, used to detect conflicts. The fingerprint is initially - // generated by Compute Engine and changes after every request to modify - // or update labels. You must always provide an up-to-date fingerprint - // hash in order to update or change labels. Make a get() request to the - // resource to get the latest fingerprint. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // Labels: The labels to set for this resource. - Labels map[string]string `json:"labels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LabelFingerprint") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "LabelFingerprint") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ZoneSetLabelsRequest) MarshalJSON() ([]byte, error) { - type noMethod ZoneSetLabelsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// method id "compute.acceleratorTypes.aggregatedList": - -type AcceleratorTypesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of accelerator types. -func (r *AcceleratorTypesService) AggregatedList(project string) *AcceleratorTypesAggregatedListCall { - c := &AcceleratorTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *AcceleratorTypesAggregatedListCall) Filter(filter string) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *AcceleratorTypesAggregatedListCall) MaxResults(maxResults int64) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *AcceleratorTypesAggregatedListCall) OrderBy(orderBy string) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *AcceleratorTypesAggregatedListCall) PageToken(pageToken string) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AcceleratorTypesAggregatedListCall) Fields(s ...googleapi.Field) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AcceleratorTypesAggregatedListCall) IfNoneMatch(entityTag string) *AcceleratorTypesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AcceleratorTypesAggregatedListCall) Context(ctx context.Context) *AcceleratorTypesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AcceleratorTypesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AcceleratorTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/acceleratorTypes") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.acceleratorTypes.aggregatedList" call. -// Exactly one of *AcceleratorTypeAggregatedList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *AcceleratorTypeAggregatedList.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AcceleratorTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*AcceleratorTypeAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AcceleratorTypeAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of accelerator types.", - // "httpMethod": "GET", - // "id": "compute.acceleratorTypes.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/acceleratorTypes", - // "response": { - // "$ref": "AcceleratorTypeAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AcceleratorTypesAggregatedListCall) Pages(ctx context.Context, f func(*AcceleratorTypeAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.acceleratorTypes.get": - -type AcceleratorTypesGetCall struct { - s *Service - project string - zone string - acceleratorType string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified accelerator type. Get a list of available -// accelerator types by making a list() request. -func (r *AcceleratorTypesService) Get(project string, zone string, acceleratorType string) *AcceleratorTypesGetCall { - c := &AcceleratorTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.acceleratorType = acceleratorType - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AcceleratorTypesGetCall) Fields(s ...googleapi.Field) *AcceleratorTypesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AcceleratorTypesGetCall) IfNoneMatch(entityTag string) *AcceleratorTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AcceleratorTypesGetCall) Context(ctx context.Context) *AcceleratorTypesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AcceleratorTypesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AcceleratorTypesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/acceleratorTypes/{acceleratorType}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "acceleratorType": c.acceleratorType, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.acceleratorTypes.get" call. -// Exactly one of *AcceleratorType or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *AcceleratorType.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AcceleratorTypesGetCall) Do(opts ...googleapi.CallOption) (*AcceleratorType, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AcceleratorType{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified accelerator type. Get a list of available accelerator types by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.acceleratorTypes.get", - // "parameterOrder": [ - // "project", - // "zone", - // "acceleratorType" - // ], - // "parameters": { - // "acceleratorType": { - // "description": "Name of the accelerator type to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/acceleratorTypes/{acceleratorType}", - // "response": { - // "$ref": "AcceleratorType" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.acceleratorTypes.list": - -type AcceleratorTypesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of accelerator types available to the -// specified project. -func (r *AcceleratorTypesService) List(project string, zone string) *AcceleratorTypesListCall { - c := &AcceleratorTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *AcceleratorTypesListCall) Filter(filter string) *AcceleratorTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *AcceleratorTypesListCall) MaxResults(maxResults int64) *AcceleratorTypesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *AcceleratorTypesListCall) OrderBy(orderBy string) *AcceleratorTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *AcceleratorTypesListCall) PageToken(pageToken string) *AcceleratorTypesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AcceleratorTypesListCall) Fields(s ...googleapi.Field) *AcceleratorTypesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AcceleratorTypesListCall) IfNoneMatch(entityTag string) *AcceleratorTypesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AcceleratorTypesListCall) Context(ctx context.Context) *AcceleratorTypesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AcceleratorTypesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AcceleratorTypesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/acceleratorTypes") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.acceleratorTypes.list" call. -// Exactly one of *AcceleratorTypeList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *AcceleratorTypeList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AcceleratorTypesListCall) Do(opts ...googleapi.CallOption) (*AcceleratorTypeList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AcceleratorTypeList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of accelerator types available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.acceleratorTypes.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/acceleratorTypes", - // "response": { - // "$ref": "AcceleratorTypeList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AcceleratorTypesListCall) Pages(ctx context.Context, f func(*AcceleratorTypeList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.addresses.aggregatedList": - -type AddressesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of addresses. -// For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/aggregatedList -func (r *AddressesService) AggregatedList(project string) *AddressesAggregatedListCall { - c := &AddressesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *AddressesAggregatedListCall) Filter(filter string) *AddressesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *AddressesAggregatedListCall) MaxResults(maxResults int64) *AddressesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *AddressesAggregatedListCall) OrderBy(orderBy string) *AddressesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *AddressesAggregatedListCall) PageToken(pageToken string) *AddressesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AddressesAggregatedListCall) Fields(s ...googleapi.Field) *AddressesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AddressesAggregatedListCall) IfNoneMatch(entityTag string) *AddressesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AddressesAggregatedListCall) Context(ctx context.Context) *AddressesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AddressesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/addresses") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.aggregatedList" call. -// Exactly one of *AddressAggregatedList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *AddressAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AddressesAggregatedListCall) Do(opts ...googleapi.CallOption) (*AddressAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AddressAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of addresses.", - // "httpMethod": "GET", - // "id": "compute.addresses.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/addresses", - // "response": { - // "$ref": "AddressAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AddressesAggregatedListCall) Pages(ctx context.Context, f func(*AddressAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.addresses.delete": - -type AddressesDeleteCall struct { - s *Service - project string - region string - address string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified address resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/delete -func (r *AddressesService) Delete(project string, region string, address string) *AddressesDeleteCall { - c := &AddressesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.address = address - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *AddressesDeleteCall) RequestId(requestId string) *AddressesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AddressesDeleteCall) Fields(s ...googleapi.Field) *AddressesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AddressesDeleteCall) Context(ctx context.Context) *AddressesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AddressesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses/{address}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "address": c.address, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified address resource.", - // "httpMethod": "DELETE", - // "id": "compute.addresses.delete", - // "parameterOrder": [ - // "project", - // "region", - // "address" - // ], - // "parameters": { - // "address": { - // "description": "Name of the address resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/addresses/{address}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.addresses.get": - -type AddressesGetCall struct { - s *Service - project string - region string - address string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified address resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/get -func (r *AddressesService) Get(project string, region string, address string) *AddressesGetCall { - c := &AddressesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.address = address - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AddressesGetCall) Fields(s ...googleapi.Field) *AddressesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AddressesGetCall) IfNoneMatch(entityTag string) *AddressesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AddressesGetCall) Context(ctx context.Context) *AddressesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AddressesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses/{address}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "address": c.address, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.get" call. -// Exactly one of *Address or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Address.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *AddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Address{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified address resource.", - // "httpMethod": "GET", - // "id": "compute.addresses.get", - // "parameterOrder": [ - // "project", - // "region", - // "address" - // ], - // "parameters": { - // "address": { - // "description": "Name of the address resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/addresses/{address}", - // "response": { - // "$ref": "Address" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.addresses.insert": - -type AddressesInsertCall struct { - s *Service - project string - region string - address *Address - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an address resource in the specified project using -// the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/insert -func (r *AddressesService) Insert(project string, region string, address *Address) *AddressesInsertCall { - c := &AddressesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.address = address - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *AddressesInsertCall) RequestId(requestId string) *AddressesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AddressesInsertCall) Fields(s ...googleapi.Field) *AddressesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AddressesInsertCall) Context(ctx context.Context) *AddressesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AddressesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.address) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates an address resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.addresses.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/addresses", - // "request": { - // "$ref": "Address" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.addresses.list": - -type AddressesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of addresses contained within the specified -// region. -// For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/list -func (r *AddressesService) List(project string, region string) *AddressesListCall { - c := &AddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *AddressesListCall) Filter(filter string) *AddressesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *AddressesListCall) MaxResults(maxResults int64) *AddressesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *AddressesListCall) OrderBy(orderBy string) *AddressesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *AddressesListCall) PageToken(pageToken string) *AddressesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AddressesListCall) Fields(s ...googleapi.Field) *AddressesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AddressesListCall) IfNoneMatch(entityTag string) *AddressesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AddressesListCall) Context(ctx context.Context) *AddressesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AddressesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.list" call. -// Exactly one of *AddressList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *AddressList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AddressList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of addresses contained within the specified region.", - // "httpMethod": "GET", - // "id": "compute.addresses.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/addresses", - // "response": { - // "$ref": "AddressList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AddressesListCall) Pages(ctx context.Context, f func(*AddressList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.addresses.setLabels": - -type AddressesSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on an Address. To learn more about labels, -// read the Labeling Resources documentation. -func (r *AddressesService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *AddressesSetLabelsCall { - c := &AddressesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *AddressesSetLabelsCall) RequestId(requestId string) *AddressesSetLabelsCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AddressesSetLabelsCall) Fields(s ...googleapi.Field) *AddressesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AddressesSetLabelsCall) Context(ctx context.Context) *AddressesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AddressesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetlabelsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses/{resource}/setLabels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.setLabels" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AddressesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the labels on an Address. To learn more about labels, read the Labeling Resources documentation.", - // "httpMethod": "POST", - // "id": "compute.addresses.setLabels", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/addresses/{resource}/setLabels", - // "request": { - // "$ref": "RegionSetLabelsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.addresses.testIamPermissions": - -type AddressesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *AddressesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *AddressesTestIamPermissionsCall { - c := &AddressesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AddressesTestIamPermissionsCall) Fields(s ...googleapi.Field) *AddressesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AddressesTestIamPermissionsCall) Context(ctx context.Context) *AddressesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AddressesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AddressesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.addresses.testIamPermissions", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/addresses/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.autoscalers.aggregatedList": - -type AutoscalersAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of autoscalers. -func (r *AutoscalersService) AggregatedList(project string) *AutoscalersAggregatedListCall { - c := &AutoscalersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *AutoscalersAggregatedListCall) Filter(filter string) *AutoscalersAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *AutoscalersAggregatedListCall) MaxResults(maxResults int64) *AutoscalersAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *AutoscalersAggregatedListCall) OrderBy(orderBy string) *AutoscalersAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *AutoscalersAggregatedListCall) PageToken(pageToken string) *AutoscalersAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AutoscalersAggregatedListCall) Fields(s ...googleapi.Field) *AutoscalersAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AutoscalersAggregatedListCall) IfNoneMatch(entityTag string) *AutoscalersAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AutoscalersAggregatedListCall) Context(ctx context.Context) *AutoscalersAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AutoscalersAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.aggregatedList" call. -// Exactly one of *AutoscalerAggregatedList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *AutoscalerAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AutoscalersAggregatedListCall) Do(opts ...googleapi.CallOption) (*AutoscalerAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AutoscalerAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of autoscalers.", - // "httpMethod": "GET", - // "id": "compute.autoscalers.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/autoscalers", - // "response": { - // "$ref": "AutoscalerAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AutoscalersAggregatedListCall) Pages(ctx context.Context, f func(*AutoscalerAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.autoscalers.delete": - -type AutoscalersDeleteCall struct { - s *Service - project string - zone string - autoscaler string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified autoscaler. -func (r *AutoscalersService) Delete(project string, zone string, autoscaler string) *AutoscalersDeleteCall { - c := &AutoscalersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.autoscaler = autoscaler - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *AutoscalersDeleteCall) RequestId(requestId string) *AutoscalersDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AutoscalersDeleteCall) Fields(s ...googleapi.Field) *AutoscalersDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AutoscalersDeleteCall) Context(ctx context.Context) *AutoscalersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AutoscalersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers/{autoscaler}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "autoscaler": c.autoscaler, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified autoscaler.", - // "httpMethod": "DELETE", - // "id": "compute.autoscalers.delete", - // "parameterOrder": [ - // "project", - // "zone", - // "autoscaler" - // ], - // "parameters": { - // "autoscaler": { - // "description": "Name of the autoscaler to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/autoscalers/{autoscaler}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.autoscalers.get": - -type AutoscalersGetCall struct { - s *Service - project string - zone string - autoscaler string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified autoscaler resource. Get a list of -// available autoscalers by making a list() request. -func (r *AutoscalersService) Get(project string, zone string, autoscaler string) *AutoscalersGetCall { - c := &AutoscalersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.autoscaler = autoscaler - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AutoscalersGetCall) Fields(s ...googleapi.Field) *AutoscalersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AutoscalersGetCall) IfNoneMatch(entityTag string) *AutoscalersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AutoscalersGetCall) Context(ctx context.Context) *AutoscalersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AutoscalersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers/{autoscaler}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "autoscaler": c.autoscaler, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.get" call. -// Exactly one of *Autoscaler or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Autoscaler.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Autoscaler{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified autoscaler resource. Get a list of available autoscalers by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.autoscalers.get", - // "parameterOrder": [ - // "project", - // "zone", - // "autoscaler" - // ], - // "parameters": { - // "autoscaler": { - // "description": "Name of the autoscaler to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/autoscalers/{autoscaler}", - // "response": { - // "$ref": "Autoscaler" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.autoscalers.insert": - -type AutoscalersInsertCall struct { - s *Service - project string - zone string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an autoscaler in the specified project using the data -// included in the request. -func (r *AutoscalersService) Insert(project string, zone string, autoscaler *Autoscaler) *AutoscalersInsertCall { - c := &AutoscalersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.autoscaler = autoscaler - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *AutoscalersInsertCall) RequestId(requestId string) *AutoscalersInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AutoscalersInsertCall) Fields(s ...googleapi.Field) *AutoscalersInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AutoscalersInsertCall) Context(ctx context.Context) *AutoscalersInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AutoscalersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates an autoscaler in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.autoscalers.insert", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/autoscalers", - // "request": { - // "$ref": "Autoscaler" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.autoscalers.list": - -type AutoscalersListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of autoscalers contained within the specified -// zone. -func (r *AutoscalersService) List(project string, zone string) *AutoscalersListCall { - c := &AutoscalersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *AutoscalersListCall) Filter(filter string) *AutoscalersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *AutoscalersListCall) MaxResults(maxResults int64) *AutoscalersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *AutoscalersListCall) OrderBy(orderBy string) *AutoscalersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *AutoscalersListCall) PageToken(pageToken string) *AutoscalersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AutoscalersListCall) Fields(s ...googleapi.Field) *AutoscalersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AutoscalersListCall) IfNoneMatch(entityTag string) *AutoscalersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AutoscalersListCall) Context(ctx context.Context) *AutoscalersListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AutoscalersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.list" call. -// Exactly one of *AutoscalerList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *AutoscalerList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AutoscalersListCall) Do(opts ...googleapi.CallOption) (*AutoscalerList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AutoscalerList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of autoscalers contained within the specified zone.", - // "httpMethod": "GET", - // "id": "compute.autoscalers.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/autoscalers", - // "response": { - // "$ref": "AutoscalerList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AutoscalersListCall) Pages(ctx context.Context, f func(*AutoscalerList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.autoscalers.patch": - -type AutoscalersPatchCall struct { - s *Service - project string - zone string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates an autoscaler in the specified project using the data -// included in the request. This method supports PATCH semantics and -// uses the JSON merge patch format and processing rules. -func (r *AutoscalersService) Patch(project string, zone string, autoscaler *Autoscaler) *AutoscalersPatchCall { - c := &AutoscalersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.autoscaler = autoscaler - return c -} - -// Autoscaler sets the optional parameter "autoscaler": Name of the -// autoscaler to patch. -func (c *AutoscalersPatchCall) Autoscaler(autoscaler string) *AutoscalersPatchCall { - c.urlParams_.Set("autoscaler", autoscaler) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *AutoscalersPatchCall) RequestId(requestId string) *AutoscalersPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AutoscalersPatchCall) Fields(s ...googleapi.Field) *AutoscalersPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AutoscalersPatchCall) Context(ctx context.Context) *AutoscalersPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AutoscalersPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.autoscalers.patch", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "autoscaler": { - // "description": "Name of the autoscaler to patch.", - // "location": "query", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/autoscalers", - // "request": { - // "$ref": "Autoscaler" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.autoscalers.testIamPermissions": - -type AutoscalersTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *AutoscalersService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *AutoscalersTestIamPermissionsCall { - c := &AutoscalersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AutoscalersTestIamPermissionsCall) Fields(s ...googleapi.Field) *AutoscalersTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AutoscalersTestIamPermissionsCall) Context(ctx context.Context) *AutoscalersTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AutoscalersTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AutoscalersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.autoscalers.testIamPermissions", - // "parameterOrder": [ - // "project", - // "zone", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/autoscalers/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.autoscalers.update": - -type AutoscalersUpdateCall struct { - s *Service - project string - zone string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates an autoscaler in the specified project using the data -// included in the request. -func (r *AutoscalersService) Update(project string, zone string, autoscaler *Autoscaler) *AutoscalersUpdateCall { - c := &AutoscalersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.autoscaler = autoscaler - return c -} - -// Autoscaler sets the optional parameter "autoscaler": Name of the -// autoscaler to update. -func (c *AutoscalersUpdateCall) Autoscaler(autoscaler string) *AutoscalersUpdateCall { - c.urlParams_.Set("autoscaler", autoscaler) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *AutoscalersUpdateCall) RequestId(requestId string) *AutoscalersUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AutoscalersUpdateCall) Fields(s ...googleapi.Field) *AutoscalersUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AutoscalersUpdateCall) Context(ctx context.Context) *AutoscalersUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AutoscalersUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates an autoscaler in the specified project using the data included in the request.", - // "httpMethod": "PUT", - // "id": "compute.autoscalers.update", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "autoscaler": { - // "description": "Name of the autoscaler to update.", - // "location": "query", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/autoscalers", - // "request": { - // "$ref": "Autoscaler" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.backendBuckets.addSignedUrlKey": - -type BackendBucketsAddSignedUrlKeyCall struct { - s *Service - project string - backendBucket string - signedurlkey *SignedUrlKey - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddSignedUrlKey: Adds the given Signed URL Key to the backend bucket. -func (r *BackendBucketsService) AddSignedUrlKey(project string, backendBucket string, signedurlkey *SignedUrlKey) *BackendBucketsAddSignedUrlKeyCall { - c := &BackendBucketsAddSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendBucket = backendBucket - c.signedurlkey = signedurlkey - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *BackendBucketsAddSignedUrlKeyCall) RequestId(requestId string) *BackendBucketsAddSignedUrlKeyCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendBucketsAddSignedUrlKeyCall) Fields(s ...googleapi.Field) *BackendBucketsAddSignedUrlKeyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendBucketsAddSignedUrlKeyCall) Context(ctx context.Context) *BackendBucketsAddSignedUrlKeyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendBucketsAddSignedUrlKeyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsAddSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.signedurlkey) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets/{backendBucket}/addSignedUrlKey") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendBucket": c.backendBucket, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.addSignedUrlKey" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendBucketsAddSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Adds the given Signed URL Key to the backend bucket.", - // "httpMethod": "POST", - // "id": "compute.backendBuckets.addSignedUrlKey", - // "parameterOrder": [ - // "project", - // "backendBucket" - // ], - // "parameters": { - // "backendBucket": { - // "description": "Name of the BackendBucket resource to which the Signed URL Key should be added. The name should conform to RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/backendBuckets/{backendBucket}/addSignedUrlKey", - // "request": { - // "$ref": "SignedUrlKey" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.backendBuckets.delete": - -type BackendBucketsDeleteCall struct { - s *Service - project string - backendBucket string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified BackendBucket resource. -func (r *BackendBucketsService) Delete(project string, backendBucket string) *BackendBucketsDeleteCall { - c := &BackendBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendBucket = backendBucket - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *BackendBucketsDeleteCall) RequestId(requestId string) *BackendBucketsDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendBucketsDeleteCall) Fields(s ...googleapi.Field) *BackendBucketsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendBucketsDeleteCall) Context(ctx context.Context) *BackendBucketsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendBucketsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets/{backendBucket}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendBucket": c.backendBucket, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified BackendBucket resource.", - // "httpMethod": "DELETE", - // "id": "compute.backendBuckets.delete", - // "parameterOrder": [ - // "project", - // "backendBucket" - // ], - // "parameters": { - // "backendBucket": { - // "description": "Name of the BackendBucket resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/backendBuckets/{backendBucket}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.backendBuckets.deleteSignedUrlKey": - -type BackendBucketsDeleteSignedUrlKeyCall struct { - s *Service - project string - backendBucket string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteSignedUrlKey: Deletes the given Signed URL Key from the backend -// bucket. -func (r *BackendBucketsService) DeleteSignedUrlKey(project string, backendBucket string, keyName string) *BackendBucketsDeleteSignedUrlKeyCall { - c := &BackendBucketsDeleteSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendBucket = backendBucket - c.urlParams_.Set("keyName", keyName) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *BackendBucketsDeleteSignedUrlKeyCall) RequestId(requestId string) *BackendBucketsDeleteSignedUrlKeyCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendBucketsDeleteSignedUrlKeyCall) Fields(s ...googleapi.Field) *BackendBucketsDeleteSignedUrlKeyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendBucketsDeleteSignedUrlKeyCall) Context(ctx context.Context) *BackendBucketsDeleteSignedUrlKeyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendBucketsDeleteSignedUrlKeyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsDeleteSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets/{backendBucket}/deleteSignedUrlKey") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendBucket": c.backendBucket, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.deleteSignedUrlKey" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendBucketsDeleteSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the given Signed URL Key from the backend bucket.", - // "httpMethod": "POST", - // "id": "compute.backendBuckets.deleteSignedUrlKey", - // "parameterOrder": [ - // "project", - // "backendBucket", - // "keyName" - // ], - // "parameters": { - // "backendBucket": { - // "description": "Name of the BackendBucket resource to which the Signed URL Key should be added. The name should conform to RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "keyName": { - // "description": "The name of the Signed URL Key to delete.", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/backendBuckets/{backendBucket}/deleteSignedUrlKey", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.backendBuckets.get": - -type BackendBucketsGetCall struct { - s *Service - project string - backendBucket string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified BackendBucket resource. Get a list of -// available backend buckets by making a list() request. -func (r *BackendBucketsService) Get(project string, backendBucket string) *BackendBucketsGetCall { - c := &BackendBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendBucket = backendBucket - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendBucketsGetCall) Fields(s ...googleapi.Field) *BackendBucketsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *BackendBucketsGetCall) IfNoneMatch(entityTag string) *BackendBucketsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendBucketsGetCall) Context(ctx context.Context) *BackendBucketsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendBucketsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets/{backendBucket}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendBucket": c.backendBucket, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.get" call. -// Exactly one of *BackendBucket or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *BackendBucket.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *BackendBucketsGetCall) Do(opts ...googleapi.CallOption) (*BackendBucket, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &BackendBucket{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified BackendBucket resource. Get a list of available backend buckets by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.backendBuckets.get", - // "parameterOrder": [ - // "project", - // "backendBucket" - // ], - // "parameters": { - // "backendBucket": { - // "description": "Name of the BackendBucket resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/backendBuckets/{backendBucket}", - // "response": { - // "$ref": "BackendBucket" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.backendBuckets.getIamPolicy": - -type BackendBucketsGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. -func (r *BackendBucketsService) GetIamPolicy(project string, resource string) *BackendBucketsGetIamPolicyCall { - c := &BackendBucketsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendBucketsGetIamPolicyCall) Fields(s ...googleapi.Field) *BackendBucketsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *BackendBucketsGetIamPolicyCall) IfNoneMatch(entityTag string) *BackendBucketsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendBucketsGetIamPolicyCall) Context(ctx context.Context) *BackendBucketsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendBucketsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *BackendBucketsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - // "httpMethod": "GET", - // "id": "compute.backendBuckets.getIamPolicy", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/backendBuckets/{resource}/getIamPolicy", - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.backendBuckets.insert": - -type BackendBucketsInsertCall struct { - s *Service - project string - backendbucket *BackendBucket - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a BackendBucket resource in the specified project -// using the data included in the request. -func (r *BackendBucketsService) Insert(project string, backendbucket *BackendBucket) *BackendBucketsInsertCall { - c := &BackendBucketsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendbucket = backendbucket - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *BackendBucketsInsertCall) RequestId(requestId string) *BackendBucketsInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendBucketsInsertCall) Fields(s ...googleapi.Field) *BackendBucketsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendBucketsInsertCall) Context(ctx context.Context) *BackendBucketsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendBucketsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendbucket) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendBucketsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a BackendBucket resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.backendBuckets.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/backendBuckets", - // "request": { - // "$ref": "BackendBucket" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.backendBuckets.list": - -type BackendBucketsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of BackendBucket resources available to the -// specified project. -func (r *BackendBucketsService) List(project string) *BackendBucketsListCall { - c := &BackendBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *BackendBucketsListCall) Filter(filter string) *BackendBucketsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *BackendBucketsListCall) MaxResults(maxResults int64) *BackendBucketsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *BackendBucketsListCall) OrderBy(orderBy string) *BackendBucketsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *BackendBucketsListCall) PageToken(pageToken string) *BackendBucketsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendBucketsListCall) Fields(s ...googleapi.Field) *BackendBucketsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *BackendBucketsListCall) IfNoneMatch(entityTag string) *BackendBucketsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendBucketsListCall) Context(ctx context.Context) *BackendBucketsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendBucketsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.list" call. -// Exactly one of *BackendBucketList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *BackendBucketList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *BackendBucketsListCall) Do(opts ...googleapi.CallOption) (*BackendBucketList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &BackendBucketList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of BackendBucket resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.backendBuckets.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/backendBuckets", - // "response": { - // "$ref": "BackendBucketList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *BackendBucketsListCall) Pages(ctx context.Context, f func(*BackendBucketList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.backendBuckets.patch": - -type BackendBucketsPatchCall struct { - s *Service - project string - backendBucket string - backendbucket *BackendBucket - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified BackendBucket resource with the data -// included in the request. This method supports PATCH semantics and -// uses the JSON merge patch format and processing rules. -func (r *BackendBucketsService) Patch(project string, backendBucket string, backendbucket *BackendBucket) *BackendBucketsPatchCall { - c := &BackendBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendBucket = backendBucket - c.backendbucket = backendbucket - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *BackendBucketsPatchCall) RequestId(requestId string) *BackendBucketsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendBucketsPatchCall) Fields(s ...googleapi.Field) *BackendBucketsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendBucketsPatchCall) Context(ctx context.Context) *BackendBucketsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendBucketsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendbucket) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets/{backendBucket}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendBucket": c.backendBucket, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendBucketsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.backendBuckets.patch", - // "parameterOrder": [ - // "project", - // "backendBucket" - // ], - // "parameters": { - // "backendBucket": { - // "description": "Name of the BackendBucket resource to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/backendBuckets/{backendBucket}", - // "request": { - // "$ref": "BackendBucket" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.backendBuckets.setIamPolicy": - -type BackendBucketsSetIamPolicyCall struct { - s *Service - project string - resource string - policy *Policy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. -func (r *BackendBucketsService) SetIamPolicy(project string, resource string, policy *Policy) *BackendBucketsSetIamPolicyCall { - c := &BackendBucketsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.policy = policy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendBucketsSetIamPolicyCall) Fields(s ...googleapi.Field) *BackendBucketsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendBucketsSetIamPolicyCall) Context(ctx context.Context) *BackendBucketsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendBucketsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets/{resource}/setIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *BackendBucketsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - // "httpMethod": "POST", - // "id": "compute.backendBuckets.setIamPolicy", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/backendBuckets/{resource}/setIamPolicy", - // "request": { - // "$ref": "Policy" - // }, - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.backendBuckets.testIamPermissions": - -type BackendBucketsTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *BackendBucketsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *BackendBucketsTestIamPermissionsCall { - c := &BackendBucketsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendBucketsTestIamPermissionsCall) Fields(s ...googleapi.Field) *BackendBucketsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendBucketsTestIamPermissionsCall) Context(ctx context.Context) *BackendBucketsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendBucketsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *BackendBucketsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.backendBuckets.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/backendBuckets/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.backendBuckets.update": - -type BackendBucketsUpdateCall struct { - s *Service - project string - backendBucket string - backendbucket *BackendBucket - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified BackendBucket resource with the data -// included in the request. -func (r *BackendBucketsService) Update(project string, backendBucket string, backendbucket *BackendBucket) *BackendBucketsUpdateCall { - c := &BackendBucketsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendBucket = backendBucket - c.backendbucket = backendbucket - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *BackendBucketsUpdateCall) RequestId(requestId string) *BackendBucketsUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendBucketsUpdateCall) Fields(s ...googleapi.Field) *BackendBucketsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendBucketsUpdateCall) Context(ctx context.Context) *BackendBucketsUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendBucketsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendbucket) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets/{backendBucket}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendBucket": c.backendBucket, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendBucketsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the specified BackendBucket resource with the data included in the request.", - // "httpMethod": "PUT", - // "id": "compute.backendBuckets.update", - // "parameterOrder": [ - // "project", - // "backendBucket" - // ], - // "parameters": { - // "backendBucket": { - // "description": "Name of the BackendBucket resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/backendBuckets/{backendBucket}", - // "request": { - // "$ref": "BackendBucket" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.backendServices.addSignedUrlKey": - -type BackendServicesAddSignedUrlKeyCall struct { - s *Service - project string - backendService string - signedurlkey *SignedUrlKey - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddSignedUrlKey: Adds the given Signed URL Key to the specified -// backend service. -func (r *BackendServicesService) AddSignedUrlKey(project string, backendService string, signedurlkey *SignedUrlKey) *BackendServicesAddSignedUrlKeyCall { - c := &BackendServicesAddSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - c.signedurlkey = signedurlkey - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *BackendServicesAddSignedUrlKeyCall) RequestId(requestId string) *BackendServicesAddSignedUrlKeyCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendServicesAddSignedUrlKeyCall) Fields(s ...googleapi.Field) *BackendServicesAddSignedUrlKeyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendServicesAddSignedUrlKeyCall) Context(ctx context.Context) *BackendServicesAddSignedUrlKeyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendServicesAddSignedUrlKeyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesAddSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.signedurlkey) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}/addSignedUrlKey") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.addSignedUrlKey" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendServicesAddSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Adds the given Signed URL Key to the specified backend service.", - // "httpMethod": "POST", - // "id": "compute.backendServices.addSignedUrlKey", - // "parameterOrder": [ - // "project", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to which the Signed URL Key should be added. The name should conform to RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/backendServices/{backendService}/addSignedUrlKey", - // "request": { - // "$ref": "SignedUrlKey" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.backendServices.aggregatedList": - -type BackendServicesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all BackendService resources, -// regional and global, available to the specified project. -func (r *BackendServicesService) AggregatedList(project string) *BackendServicesAggregatedListCall { - c := &BackendServicesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *BackendServicesAggregatedListCall) Filter(filter string) *BackendServicesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *BackendServicesAggregatedListCall) MaxResults(maxResults int64) *BackendServicesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *BackendServicesAggregatedListCall) OrderBy(orderBy string) *BackendServicesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *BackendServicesAggregatedListCall) PageToken(pageToken string) *BackendServicesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendServicesAggregatedListCall) Fields(s ...googleapi.Field) *BackendServicesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *BackendServicesAggregatedListCall) IfNoneMatch(entityTag string) *BackendServicesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendServicesAggregatedListCall) Context(ctx context.Context) *BackendServicesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendServicesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/backendServices") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.aggregatedList" call. -// Exactly one of *BackendServiceAggregatedList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *BackendServiceAggregatedList.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *BackendServicesAggregatedListCall) Do(opts ...googleapi.CallOption) (*BackendServiceAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &BackendServiceAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of all BackendService resources, regional and global, available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.backendServices.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Name of the project scoping this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/backendServices", - // "response": { - // "$ref": "BackendServiceAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *BackendServicesAggregatedListCall) Pages(ctx context.Context, f func(*BackendServiceAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.backendServices.delete": - -type BackendServicesDeleteCall struct { - s *Service - project string - backendService string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified BackendService resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/delete -func (r *BackendServicesService) Delete(project string, backendService string) *BackendServicesDeleteCall { - c := &BackendServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *BackendServicesDeleteCall) RequestId(requestId string) *BackendServicesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendServicesDeleteCall) Fields(s ...googleapi.Field) *BackendServicesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendServicesDeleteCall) Context(ctx context.Context) *BackendServicesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendServicesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified BackendService resource.", - // "httpMethod": "DELETE", - // "id": "compute.backendServices.delete", - // "parameterOrder": [ - // "project", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/backendServices/{backendService}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.backendServices.deleteSignedUrlKey": - -type BackendServicesDeleteSignedUrlKeyCall struct { - s *Service - project string - backendService string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteSignedUrlKey: Deletes the given Signed URL Key from the -// specified backend service. -func (r *BackendServicesService) DeleteSignedUrlKey(project string, backendService string, keyName string) *BackendServicesDeleteSignedUrlKeyCall { - c := &BackendServicesDeleteSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - c.urlParams_.Set("keyName", keyName) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *BackendServicesDeleteSignedUrlKeyCall) RequestId(requestId string) *BackendServicesDeleteSignedUrlKeyCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendServicesDeleteSignedUrlKeyCall) Fields(s ...googleapi.Field) *BackendServicesDeleteSignedUrlKeyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendServicesDeleteSignedUrlKeyCall) Context(ctx context.Context) *BackendServicesDeleteSignedUrlKeyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendServicesDeleteSignedUrlKeyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesDeleteSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}/deleteSignedUrlKey") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.deleteSignedUrlKey" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendServicesDeleteSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the given Signed URL Key from the specified backend service.", - // "httpMethod": "POST", - // "id": "compute.backendServices.deleteSignedUrlKey", - // "parameterOrder": [ - // "project", - // "backendService", - // "keyName" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to which the Signed URL Key should be added. The name should conform to RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "keyName": { - // "description": "The name of the Signed URL Key to delete.", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/backendServices/{backendService}/deleteSignedUrlKey", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.backendServices.get": - -type BackendServicesGetCall struct { - s *Service - project string - backendService string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified BackendService resource. Get a list of -// available backend services by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/get -func (r *BackendServicesService) Get(project string, backendService string) *BackendServicesGetCall { - c := &BackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendServicesGetCall) Fields(s ...googleapi.Field) *BackendServicesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *BackendServicesGetCall) IfNoneMatch(entityTag string) *BackendServicesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendServicesGetCall) Context(ctx context.Context) *BackendServicesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendServicesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.get" call. -// Exactly one of *BackendService or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *BackendService.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *BackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendService, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &BackendService{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified BackendService resource. Get a list of available backend services by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.backendServices.get", - // "parameterOrder": [ - // "project", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/backendServices/{backendService}", - // "response": { - // "$ref": "BackendService" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.backendServices.getHealth": - -type BackendServicesGetHealthCall struct { - s *Service - project string - backendService string - resourcegroupreference *ResourceGroupReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetHealth: Gets the most recent health check results for this -// BackendService. -// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/getHealth -func (r *BackendServicesService) GetHealth(project string, backendService string, resourcegroupreference *ResourceGroupReference) *BackendServicesGetHealthCall { - c := &BackendServicesGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - c.resourcegroupreference = resourcegroupreference - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendServicesGetHealthCall) Fields(s ...googleapi.Field) *BackendServicesGetHealthCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendServicesGetHealthCall) Context(ctx context.Context) *BackendServicesGetHealthCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendServicesGetHealthCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesGetHealthCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourcegroupreference) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}/getHealth") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.getHealth" call. -// Exactly one of *BackendServiceGroupHealth or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *BackendServiceGroupHealth.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *BackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*BackendServiceGroupHealth, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &BackendServiceGroupHealth{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the most recent health check results for this BackendService.", - // "httpMethod": "POST", - // "id": "compute.backendServices.getHealth", - // "parameterOrder": [ - // "project", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to which the queried instance belongs.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/backendServices/{backendService}/getHealth", - // "request": { - // "$ref": "ResourceGroupReference" - // }, - // "response": { - // "$ref": "BackendServiceGroupHealth" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.backendServices.insert": - -type BackendServicesInsertCall struct { - s *Service - project string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a BackendService resource in the specified project -// using the data included in the request. There are several -// restrictions and guidelines to keep in mind when creating a backend -// service. Read Restrictions and Guidelines for more information. -// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/insert -func (r *BackendServicesService) Insert(project string, backendservice *BackendService) *BackendServicesInsertCall { - c := &BackendServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendservice = backendservice - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *BackendServicesInsertCall) RequestId(requestId string) *BackendServicesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendServicesInsertCall) Fields(s ...googleapi.Field) *BackendServicesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendServicesInsertCall) Context(ctx context.Context) *BackendServicesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendServicesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Restrictions and Guidelines for more information.", - // "httpMethod": "POST", - // "id": "compute.backendServices.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/backendServices", - // "request": { - // "$ref": "BackendService" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.backendServices.list": - -type BackendServicesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of BackendService resources available to the -// specified project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/list -func (r *BackendServicesService) List(project string) *BackendServicesListCall { - c := &BackendServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *BackendServicesListCall) Filter(filter string) *BackendServicesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *BackendServicesListCall) MaxResults(maxResults int64) *BackendServicesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *BackendServicesListCall) OrderBy(orderBy string) *BackendServicesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *BackendServicesListCall) PageToken(pageToken string) *BackendServicesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendServicesListCall) Fields(s ...googleapi.Field) *BackendServicesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *BackendServicesListCall) IfNoneMatch(entityTag string) *BackendServicesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendServicesListCall) Context(ctx context.Context) *BackendServicesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendServicesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.list" call. -// Exactly one of *BackendServiceList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *BackendServiceList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *BackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServiceList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &BackendServiceList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of BackendService resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.backendServices.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/backendServices", - // "response": { - // "$ref": "BackendServiceList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *BackendServicesListCall) Pages(ctx context.Context, f func(*BackendServiceList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.backendServices.patch": - -type BackendServicesPatchCall struct { - s *Service - project string - backendService string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified BackendService resource with the data -// included in the request. There are several restrictions and -// guidelines to keep in mind when updating a backend service. Read -// Restrictions and Guidelines for more information. This method -// supports PATCH semantics and uses the JSON merge patch format and -// processing rules. -// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/patch -func (r *BackendServicesService) Patch(project string, backendService string, backendservice *BackendService) *BackendServicesPatchCall { - c := &BackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - c.backendservice = backendservice - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *BackendServicesPatchCall) RequestId(requestId string) *BackendServicesPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendServicesPatchCall) Fields(s ...googleapi.Field) *BackendServicesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendServicesPatchCall) Context(ctx context.Context) *BackendServicesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendServicesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Patches the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.backendServices.patch", - // "parameterOrder": [ - // "project", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/backendServices/{backendService}", - // "request": { - // "$ref": "BackendService" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.backendServices.setSecurityPolicy": - -type BackendServicesSetSecurityPolicyCall struct { - s *Service - project string - backendService string - securitypolicyreference *SecurityPolicyReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSecurityPolicy: Sets the security policy for the specified backend -// service. -func (r *BackendServicesService) SetSecurityPolicy(project string, backendService string, securitypolicyreference *SecurityPolicyReference) *BackendServicesSetSecurityPolicyCall { - c := &BackendServicesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - c.securitypolicyreference = securitypolicyreference - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *BackendServicesSetSecurityPolicyCall) RequestId(requestId string) *BackendServicesSetSecurityPolicyCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendServicesSetSecurityPolicyCall) Fields(s ...googleapi.Field) *BackendServicesSetSecurityPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendServicesSetSecurityPolicyCall) Context(ctx context.Context) *BackendServicesSetSecurityPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendServicesSetSecurityPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesSetSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.securitypolicyreference) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}/setSecurityPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.setSecurityPolicy" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendServicesSetSecurityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the security policy for the specified backend service.", - // "httpMethod": "POST", - // "id": "compute.backendServices.setSecurityPolicy", - // "parameterOrder": [ - // "project", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to which the security policy should be set. The name should conform to RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/backendServices/{backendService}/setSecurityPolicy", - // "request": { - // "$ref": "SecurityPolicyReference" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.backendServices.testIamPermissions": - -type BackendServicesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *BackendServicesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *BackendServicesTestIamPermissionsCall { - c := &BackendServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *BackendServicesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendServicesTestIamPermissionsCall) Context(ctx context.Context) *BackendServicesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendServicesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *BackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.backendServices.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/backendServices/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.backendServices.update": - -type BackendServicesUpdateCall struct { - s *Service - project string - backendService string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified BackendService resource with the data -// included in the request. There are several restrictions and -// guidelines to keep in mind when updating a backend service. Read -// Restrictions and Guidelines for more information. -// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/update -func (r *BackendServicesService) Update(project string, backendService string, backendservice *BackendService) *BackendServicesUpdateCall { - c := &BackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - c.backendservice = backendservice - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *BackendServicesUpdateCall) RequestId(requestId string) *BackendServicesUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendServicesUpdateCall) Fields(s ...googleapi.Field) *BackendServicesUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendServicesUpdateCall) Context(ctx context.Context) *BackendServicesUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendServicesUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information.", - // "httpMethod": "PUT", - // "id": "compute.backendServices.update", - // "parameterOrder": [ - // "project", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/backendServices/{backendService}", - // "request": { - // "$ref": "BackendService" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.clientSslPolicies.testIamPermissions": - -type ClientSslPoliciesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *ClientSslPoliciesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *ClientSslPoliciesTestIamPermissionsCall { - c := &ClientSslPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ClientSslPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ClientSslPoliciesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ClientSslPoliciesTestIamPermissionsCall) Context(ctx context.Context) *ClientSslPoliciesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ClientSslPoliciesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ClientSslPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/clientSslPolicies/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.clientSslPolicies.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ClientSslPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.clientSslPolicies.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/clientSslPolicies/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.diskTypes.aggregatedList": - -type DiskTypesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of disk types. -// For details, see https://cloud.google.com/compute/docs/reference/latest/diskTypes/aggregatedList -func (r *DiskTypesService) AggregatedList(project string) *DiskTypesAggregatedListCall { - c := &DiskTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *DiskTypesAggregatedListCall) Filter(filter string) *DiskTypesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *DiskTypesAggregatedListCall) MaxResults(maxResults int64) *DiskTypesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *DiskTypesAggregatedListCall) OrderBy(orderBy string) *DiskTypesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *DiskTypesAggregatedListCall) PageToken(pageToken string) *DiskTypesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DiskTypesAggregatedListCall) Fields(s ...googleapi.Field) *DiskTypesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *DiskTypesAggregatedListCall) IfNoneMatch(entityTag string) *DiskTypesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DiskTypesAggregatedListCall) Context(ctx context.Context) *DiskTypesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DiskTypesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DiskTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/diskTypes") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.diskTypes.aggregatedList" call. -// Exactly one of *DiskTypeAggregatedList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *DiskTypeAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *DiskTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskTypeAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &DiskTypeAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of disk types.", - // "httpMethod": "GET", - // "id": "compute.diskTypes.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/diskTypes", - // "response": { - // "$ref": "DiskTypeAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *DiskTypesAggregatedListCall) Pages(ctx context.Context, f func(*DiskTypeAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.diskTypes.get": - -type DiskTypesGetCall struct { - s *Service - project string - zone string - diskType string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified disk type. Get a list of available disk -// types by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/diskTypes/get -func (r *DiskTypesService) Get(project string, zone string, diskType string) *DiskTypesGetCall { - c := &DiskTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.diskType = diskType - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DiskTypesGetCall) Fields(s ...googleapi.Field) *DiskTypesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *DiskTypesGetCall) IfNoneMatch(entityTag string) *DiskTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DiskTypesGetCall) Context(ctx context.Context) *DiskTypesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DiskTypesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DiskTypesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/diskTypes/{diskType}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "diskType": c.diskType, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.diskTypes.get" call. -// Exactly one of *DiskType or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *DiskType.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &DiskType{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified disk type. Get a list of available disk types by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.diskTypes.get", - // "parameterOrder": [ - // "project", - // "zone", - // "diskType" - // ], - // "parameters": { - // "diskType": { - // "description": "Name of the disk type to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/diskTypes/{diskType}", - // "response": { - // "$ref": "DiskType" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.diskTypes.list": - -type DiskTypesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of disk types available to the specified -// project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/diskTypes/list -func (r *DiskTypesService) List(project string, zone string) *DiskTypesListCall { - c := &DiskTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *DiskTypesListCall) Filter(filter string) *DiskTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *DiskTypesListCall) MaxResults(maxResults int64) *DiskTypesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *DiskTypesListCall) OrderBy(orderBy string) *DiskTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *DiskTypesListCall) PageToken(pageToken string) *DiskTypesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DiskTypesListCall) Fields(s ...googleapi.Field) *DiskTypesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *DiskTypesListCall) IfNoneMatch(entityTag string) *DiskTypesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DiskTypesListCall) Context(ctx context.Context) *DiskTypesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DiskTypesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DiskTypesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/diskTypes") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.diskTypes.list" call. -// Exactly one of *DiskTypeList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *DiskTypeList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DiskTypesListCall) Do(opts ...googleapi.CallOption) (*DiskTypeList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &DiskTypeList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of disk types available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.diskTypes.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/diskTypes", - // "response": { - // "$ref": "DiskTypeList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *DiskTypesListCall) Pages(ctx context.Context, f func(*DiskTypeList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.disks.aggregatedList": - -type DisksAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of persistent disks. -// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/aggregatedList -func (r *DisksService) AggregatedList(project string) *DisksAggregatedListCall { - c := &DisksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *DisksAggregatedListCall) Filter(filter string) *DisksAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *DisksAggregatedListCall) MaxResults(maxResults int64) *DisksAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *DisksAggregatedListCall) OrderBy(orderBy string) *DisksAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *DisksAggregatedListCall) PageToken(pageToken string) *DisksAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DisksAggregatedListCall) Fields(s ...googleapi.Field) *DisksAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *DisksAggregatedListCall) IfNoneMatch(entityTag string) *DisksAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DisksAggregatedListCall) Context(ctx context.Context) *DisksAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DisksAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/disks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.aggregatedList" call. -// Exactly one of *DiskAggregatedList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *DiskAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *DisksAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &DiskAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of persistent disks.", - // "httpMethod": "GET", - // "id": "compute.disks.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/disks", - // "response": { - // "$ref": "DiskAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *DisksAggregatedListCall) Pages(ctx context.Context, f func(*DiskAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.disks.createSnapshot": - -type DisksCreateSnapshotCall struct { - s *Service - project string - zone string - disk string - snapshot *Snapshot - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CreateSnapshot: Creates a snapshot of a specified persistent disk. -// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/createSnapshot -func (r *DisksService) CreateSnapshot(project string, zone string, disk string, snapshot *Snapshot) *DisksCreateSnapshotCall { - c := &DisksCreateSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - c.snapshot = snapshot - return c -} - -// GuestFlush sets the optional parameter "guestFlush": -func (c *DisksCreateSnapshotCall) GuestFlush(guestFlush bool) *DisksCreateSnapshotCall { - c.urlParams_.Set("guestFlush", fmt.Sprint(guestFlush)) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *DisksCreateSnapshotCall) RequestId(requestId string) *DisksCreateSnapshotCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DisksCreateSnapshotCall) Fields(s ...googleapi.Field) *DisksCreateSnapshotCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DisksCreateSnapshotCall) Context(ctx context.Context) *DisksCreateSnapshotCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DisksCreateSnapshotCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.snapshot) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}/createSnapshot") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.createSnapshot" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a snapshot of a specified persistent disk.", - // "httpMethod": "POST", - // "id": "compute.disks.createSnapshot", - // "parameterOrder": [ - // "project", - // "zone", - // "disk" - // ], - // "parameters": { - // "disk": { - // "description": "Name of the persistent disk to snapshot.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "guestFlush": { - // "location": "query", - // "type": "boolean" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/disks/{disk}/createSnapshot", - // "request": { - // "$ref": "Snapshot" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.disks.delete": - -type DisksDeleteCall struct { - s *Service - project string - zone string - disk string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified persistent disk. Deleting a disk -// removes its data permanently and is irreversible. However, deleting a -// disk does not delete any snapshots previously made from the disk. You -// must separately delete snapshots. -// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/delete -func (r *DisksService) Delete(project string, zone string, disk string) *DisksDeleteCall { - c := &DisksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *DisksDeleteCall) RequestId(requestId string) *DisksDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DisksDeleteCall) Fields(s ...googleapi.Field) *DisksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DisksDeleteCall) Context(ctx context.Context) *DisksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DisksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.", - // "httpMethod": "DELETE", - // "id": "compute.disks.delete", - // "parameterOrder": [ - // "project", - // "zone", - // "disk" - // ], - // "parameters": { - // "disk": { - // "description": "Name of the persistent disk to delete.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/disks/{disk}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.disks.get": - -type DisksGetCall struct { - s *Service - project string - zone string - disk string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns a specified persistent disk. Get a list of available -// persistent disks by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/get -func (r *DisksService) Get(project string, zone string, disk string) *DisksGetCall { - c := &DisksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DisksGetCall) Fields(s ...googleapi.Field) *DisksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *DisksGetCall) IfNoneMatch(entityTag string) *DisksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DisksGetCall) Context(ctx context.Context) *DisksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DisksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.get" call. -// Exactly one of *Disk or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Disk.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *DisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Disk{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns a specified persistent disk. Get a list of available persistent disks by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.disks.get", - // "parameterOrder": [ - // "project", - // "zone", - // "disk" - // ], - // "parameters": { - // "disk": { - // "description": "Name of the persistent disk to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/disks/{disk}", - // "response": { - // "$ref": "Disk" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.disks.getIamPolicy": - -type DisksGetIamPolicyCall struct { - s *Service - project string - zone string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. -func (r *DisksService) GetIamPolicy(project string, zone string, resource string) *DisksGetIamPolicyCall { - c := &DisksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DisksGetIamPolicyCall) Fields(s ...googleapi.Field) *DisksGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *DisksGetIamPolicyCall) IfNoneMatch(entityTag string) *DisksGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DisksGetIamPolicyCall) Context(ctx context.Context) *DisksGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DisksGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *DisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - // "httpMethod": "GET", - // "id": "compute.disks.getIamPolicy", - // "parameterOrder": [ - // "project", - // "zone", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/disks/{resource}/getIamPolicy", - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.disks.insert": - -type DisksInsertCall struct { - s *Service - project string - zone string - disk *Disk - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a persistent disk in the specified project using the -// data in the request. You can create a disk with a sourceImage, a -// sourceSnapshot, or create an empty 500 GB data disk by omitting all -// properties. You can also create a disk that is larger than the -// default size by specifying the sizeGb property. -// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/insert -func (r *DisksService) Insert(project string, zone string, disk *Disk) *DisksInsertCall { - c := &DisksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *DisksInsertCall) RequestId(requestId string) *DisksInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// SourceImage sets the optional parameter "sourceImage": Source image -// to restore onto a disk. -func (c *DisksInsertCall) SourceImage(sourceImage string) *DisksInsertCall { - c.urlParams_.Set("sourceImage", sourceImage) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DisksInsertCall) Fields(s ...googleapi.Field) *DisksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DisksInsertCall) Context(ctx context.Context) *DisksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DisksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.disk) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.", - // "httpMethod": "POST", - // "id": "compute.disks.insert", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "sourceImage": { - // "description": "Optional. Source image to restore onto a disk.", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/disks", - // "request": { - // "$ref": "Disk" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.disks.list": - -type DisksListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of persistent disks contained within the -// specified zone. -// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/list -func (r *DisksService) List(project string, zone string) *DisksListCall { - c := &DisksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *DisksListCall) Filter(filter string) *DisksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *DisksListCall) MaxResults(maxResults int64) *DisksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *DisksListCall) OrderBy(orderBy string) *DisksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *DisksListCall) PageToken(pageToken string) *DisksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DisksListCall) Fields(s ...googleapi.Field) *DisksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *DisksListCall) IfNoneMatch(entityTag string) *DisksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DisksListCall) Context(ctx context.Context) *DisksListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DisksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.list" call. -// Exactly one of *DiskList or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *DiskList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &DiskList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of persistent disks contained within the specified zone.", - // "httpMethod": "GET", - // "id": "compute.disks.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/disks", - // "response": { - // "$ref": "DiskList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *DisksListCall) Pages(ctx context.Context, f func(*DiskList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.disks.resize": - -type DisksResizeCall struct { - s *Service - project string - zone string - disk string - disksresizerequest *DisksResizeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Resize: Resizes the specified persistent disk. -func (r *DisksService) Resize(project string, zone string, disk string, disksresizerequest *DisksResizeRequest) *DisksResizeCall { - c := &DisksResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - c.disksresizerequest = disksresizerequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *DisksResizeCall) RequestId(requestId string) *DisksResizeCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DisksResizeCall) Fields(s ...googleapi.Field) *DisksResizeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DisksResizeCall) Context(ctx context.Context) *DisksResizeCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DisksResizeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksResizeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.disksresizerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}/resize") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.resize" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Resizes the specified persistent disk.", - // "httpMethod": "POST", - // "id": "compute.disks.resize", - // "parameterOrder": [ - // "project", - // "zone", - // "disk" - // ], - // "parameters": { - // "disk": { - // "description": "The name of the persistent disk.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/disks/{disk}/resize", - // "request": { - // "$ref": "DisksResizeRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.disks.setIamPolicy": - -type DisksSetIamPolicyCall struct { - s *Service - project string - zone string - resource string - policy *Policy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. -func (r *DisksService) SetIamPolicy(project string, zone string, resource string, policy *Policy) *DisksSetIamPolicyCall { - c := &DisksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.policy = policy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DisksSetIamPolicyCall) Fields(s ...googleapi.Field) *DisksSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DisksSetIamPolicyCall) Context(ctx context.Context) *DisksSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DisksSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{resource}/setIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *DisksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - // "httpMethod": "POST", - // "id": "compute.disks.setIamPolicy", - // "parameterOrder": [ - // "project", - // "zone", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/disks/{resource}/setIamPolicy", - // "request": { - // "$ref": "Policy" - // }, - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.disks.setLabels": - -type DisksSetLabelsCall struct { - s *Service - project string - zone string - resource string - zonesetlabelsrequest *ZoneSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a disk. To learn more about labels, -// read the Labeling Resources documentation. -func (r *DisksService) SetLabels(project string, zone string, resource string, zonesetlabelsrequest *ZoneSetLabelsRequest) *DisksSetLabelsCall { - c := &DisksSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.zonesetlabelsrequest = zonesetlabelsrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *DisksSetLabelsCall) RequestId(requestId string) *DisksSetLabelsCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DisksSetLabelsCall) Fields(s ...googleapi.Field) *DisksSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DisksSetLabelsCall) Context(ctx context.Context) *DisksSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DisksSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.zonesetlabelsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{resource}/setLabels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.setLabels" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation.", - // "httpMethod": "POST", - // "id": "compute.disks.setLabels", - // "parameterOrder": [ - // "project", - // "zone", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/disks/{resource}/setLabels", - // "request": { - // "$ref": "ZoneSetLabelsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.disks.testIamPermissions": - -type DisksTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *DisksService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *DisksTestIamPermissionsCall { - c := &DisksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DisksTestIamPermissionsCall) Fields(s ...googleapi.Field) *DisksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DisksTestIamPermissionsCall) Context(ctx context.Context) *DisksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DisksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *DisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.disks.testIamPermissions", - // "parameterOrder": [ - // "project", - // "zone", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/disks/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.firewalls.delete": - -type FirewallsDeleteCall struct { - s *Service - project string - firewall string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified firewall. -// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/delete -func (r *FirewallsService) Delete(project string, firewall string) *FirewallsDeleteCall { - c := &FirewallsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewall = firewall - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *FirewallsDeleteCall) RequestId(requestId string) *FirewallsDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *FirewallsDeleteCall) Fields(s ...googleapi.Field) *FirewallsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *FirewallsDeleteCall) Context(ctx context.Context) *FirewallsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *FirewallsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewall": c.firewall, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *FirewallsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified firewall.", - // "httpMethod": "DELETE", - // "id": "compute.firewalls.delete", - // "parameterOrder": [ - // "project", - // "firewall" - // ], - // "parameters": { - // "firewall": { - // "description": "Name of the firewall rule to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/firewalls/{firewall}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.firewalls.get": - -type FirewallsGetCall struct { - s *Service - project string - firewall string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified firewall. -// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/get -func (r *FirewallsService) Get(project string, firewall string) *FirewallsGetCall { - c := &FirewallsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewall = firewall - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *FirewallsGetCall) Fields(s ...googleapi.Field) *FirewallsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *FirewallsGetCall) IfNoneMatch(entityTag string) *FirewallsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *FirewallsGetCall) Context(ctx context.Context) *FirewallsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *FirewallsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewall": c.firewall, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.get" call. -// Exactly one of *Firewall or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Firewall.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *FirewallsGetCall) Do(opts ...googleapi.CallOption) (*Firewall, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Firewall{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified firewall.", - // "httpMethod": "GET", - // "id": "compute.firewalls.get", - // "parameterOrder": [ - // "project", - // "firewall" - // ], - // "parameters": { - // "firewall": { - // "description": "Name of the firewall rule to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/firewalls/{firewall}", - // "response": { - // "$ref": "Firewall" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.firewalls.insert": - -type FirewallsInsertCall struct { - s *Service - project string - firewall *Firewall - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a firewall rule in the specified project using the -// data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/insert -func (r *FirewallsService) Insert(project string, firewall *Firewall) *FirewallsInsertCall { - c := &FirewallsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewall = firewall - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *FirewallsInsertCall) RequestId(requestId string) *FirewallsInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *FirewallsInsertCall) Fields(s ...googleapi.Field) *FirewallsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *FirewallsInsertCall) Context(ctx context.Context) *FirewallsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *FirewallsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *FirewallsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a firewall rule in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.firewalls.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/firewalls", - // "request": { - // "$ref": "Firewall" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.firewalls.list": - -type FirewallsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of firewall rules available to the specified -// project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/list -func (r *FirewallsService) List(project string) *FirewallsListCall { - c := &FirewallsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *FirewallsListCall) Filter(filter string) *FirewallsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *FirewallsListCall) MaxResults(maxResults int64) *FirewallsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *FirewallsListCall) OrderBy(orderBy string) *FirewallsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *FirewallsListCall) PageToken(pageToken string) *FirewallsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *FirewallsListCall) Fields(s ...googleapi.Field) *FirewallsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *FirewallsListCall) IfNoneMatch(entityTag string) *FirewallsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *FirewallsListCall) Context(ctx context.Context) *FirewallsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *FirewallsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.list" call. -// Exactly one of *FirewallList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *FirewallList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *FirewallsListCall) Do(opts ...googleapi.CallOption) (*FirewallList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &FirewallList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of firewall rules available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.firewalls.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/firewalls", - // "response": { - // "$ref": "FirewallList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *FirewallsListCall) Pages(ctx context.Context, f func(*FirewallList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.firewalls.patch": - -type FirewallsPatchCall struct { - s *Service - project string - firewall string - firewall2 *Firewall - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified firewall rule with the data included in -// the request. This method supports PATCH semantics and uses the JSON -// merge patch format and processing rules. -// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/patch -func (r *FirewallsService) Patch(project string, firewall string, firewall2 *Firewall) *FirewallsPatchCall { - c := &FirewallsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewall = firewall - c.firewall2 = firewall2 - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *FirewallsPatchCall) RequestId(requestId string) *FirewallsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *FirewallsPatchCall) Fields(s ...googleapi.Field) *FirewallsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *FirewallsPatchCall) Context(ctx context.Context) *FirewallsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *FirewallsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall2) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewall": c.firewall, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *FirewallsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.firewalls.patch", - // "parameterOrder": [ - // "project", - // "firewall" - // ], - // "parameters": { - // "firewall": { - // "description": "Name of the firewall rule to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/firewalls/{firewall}", - // "request": { - // "$ref": "Firewall" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.firewalls.testIamPermissions": - -type FirewallsTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *FirewallsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *FirewallsTestIamPermissionsCall { - c := &FirewallsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *FirewallsTestIamPermissionsCall) Fields(s ...googleapi.Field) *FirewallsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *FirewallsTestIamPermissionsCall) Context(ctx context.Context) *FirewallsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *FirewallsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *FirewallsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.firewalls.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/firewalls/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.firewalls.update": - -type FirewallsUpdateCall struct { - s *Service - project string - firewall string - firewall2 *Firewall - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified firewall rule with the data included in -// the request. Using PUT method, can only update following fields of -// firewall rule: allowed, description, sourceRanges, sourceTags, -// targetTags. -// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/update -func (r *FirewallsService) Update(project string, firewall string, firewall2 *Firewall) *FirewallsUpdateCall { - c := &FirewallsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewall = firewall - c.firewall2 = firewall2 - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *FirewallsUpdateCall) RequestId(requestId string) *FirewallsUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *FirewallsUpdateCall) Fields(s ...googleapi.Field) *FirewallsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *FirewallsUpdateCall) Context(ctx context.Context) *FirewallsUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *FirewallsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall2) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewall": c.firewall, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *FirewallsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the specified firewall rule with the data included in the request. Using PUT method, can only update following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags.", - // "httpMethod": "PUT", - // "id": "compute.firewalls.update", - // "parameterOrder": [ - // "project", - // "firewall" - // ], - // "parameters": { - // "firewall": { - // "description": "Name of the firewall rule to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/firewalls/{firewall}", - // "request": { - // "$ref": "Firewall" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.forwardingRules.aggregatedList": - -type ForwardingRulesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of forwarding rules. -// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/aggregatedList -func (r *ForwardingRulesService) AggregatedList(project string) *ForwardingRulesAggregatedListCall { - c := &ForwardingRulesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *ForwardingRulesAggregatedListCall) Filter(filter string) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *ForwardingRulesAggregatedListCall) MaxResults(maxResults int64) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *ForwardingRulesAggregatedListCall) OrderBy(orderBy string) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *ForwardingRulesAggregatedListCall) PageToken(pageToken string) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ForwardingRulesAggregatedListCall) Fields(s ...googleapi.Field) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ForwardingRulesAggregatedListCall) IfNoneMatch(entityTag string) *ForwardingRulesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ForwardingRulesAggregatedListCall) Context(ctx context.Context) *ForwardingRulesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ForwardingRulesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/forwardingRules") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.aggregatedList" call. -// Exactly one of *ForwardingRuleAggregatedList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ForwardingRuleAggregatedList.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ForwardingRulesAggregatedListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ForwardingRuleAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of forwarding rules.", - // "httpMethod": "GET", - // "id": "compute.forwardingRules.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/forwardingRules", - // "response": { - // "$ref": "ForwardingRuleAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ForwardingRulesAggregatedListCall) Pages(ctx context.Context, f func(*ForwardingRuleAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.forwardingRules.delete": - -type ForwardingRulesDeleteCall struct { - s *Service - project string - region string - forwardingRule string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified ForwardingRule resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/delete -func (r *ForwardingRulesService) Delete(project string, region string, forwardingRule string) *ForwardingRulesDeleteCall { - c := &ForwardingRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.forwardingRule = forwardingRule - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *ForwardingRulesDeleteCall) RequestId(requestId string) *ForwardingRulesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ForwardingRulesDeleteCall) Fields(s ...googleapi.Field) *ForwardingRulesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ForwardingRulesDeleteCall) Context(ctx context.Context) *ForwardingRulesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ForwardingRulesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{forwardingRule}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "forwardingRule": c.forwardingRule, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified ForwardingRule resource.", - // "httpMethod": "DELETE", - // "id": "compute.forwardingRules.delete", - // "parameterOrder": [ - // "project", - // "region", - // "forwardingRule" - // ], - // "parameters": { - // "forwardingRule": { - // "description": "Name of the ForwardingRule resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.forwardingRules.get": - -type ForwardingRulesGetCall struct { - s *Service - project string - region string - forwardingRule string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified ForwardingRule resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/get -func (r *ForwardingRulesService) Get(project string, region string, forwardingRule string) *ForwardingRulesGetCall { - c := &ForwardingRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.forwardingRule = forwardingRule - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ForwardingRulesGetCall) Fields(s ...googleapi.Field) *ForwardingRulesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ForwardingRulesGetCall) IfNoneMatch(entityTag string) *ForwardingRulesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ForwardingRulesGetCall) Context(ctx context.Context) *ForwardingRulesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ForwardingRulesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{forwardingRule}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "forwardingRule": c.forwardingRule, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.get" call. -// Exactly one of *ForwardingRule or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *ForwardingRule.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRule, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ForwardingRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified ForwardingRule resource.", - // "httpMethod": "GET", - // "id": "compute.forwardingRules.get", - // "parameterOrder": [ - // "project", - // "region", - // "forwardingRule" - // ], - // "parameters": { - // "forwardingRule": { - // "description": "Name of the ForwardingRule resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}", - // "response": { - // "$ref": "ForwardingRule" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.forwardingRules.insert": - -type ForwardingRulesInsertCall struct { - s *Service - project string - region string - forwardingrule *ForwardingRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a ForwardingRule resource in the specified project -// and region using the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/insert -func (r *ForwardingRulesService) Insert(project string, region string, forwardingrule *ForwardingRule) *ForwardingRulesInsertCall { - c := &ForwardingRulesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.forwardingrule = forwardingrule - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *ForwardingRulesInsertCall) RequestId(requestId string) *ForwardingRulesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ForwardingRulesInsertCall) Fields(s ...googleapi.Field) *ForwardingRulesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ForwardingRulesInsertCall) Context(ctx context.Context) *ForwardingRulesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ForwardingRulesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.forwardingRules.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/forwardingRules", - // "request": { - // "$ref": "ForwardingRule" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.forwardingRules.list": - -type ForwardingRulesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of ForwardingRule resources available to the -// specified project and region. -// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/list -func (r *ForwardingRulesService) List(project string, region string) *ForwardingRulesListCall { - c := &ForwardingRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *ForwardingRulesListCall) Filter(filter string) *ForwardingRulesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *ForwardingRulesListCall) MaxResults(maxResults int64) *ForwardingRulesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *ForwardingRulesListCall) OrderBy(orderBy string) *ForwardingRulesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *ForwardingRulesListCall) PageToken(pageToken string) *ForwardingRulesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ForwardingRulesListCall) Fields(s ...googleapi.Field) *ForwardingRulesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ForwardingRulesListCall) IfNoneMatch(entityTag string) *ForwardingRulesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ForwardingRulesListCall) Context(ctx context.Context) *ForwardingRulesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ForwardingRulesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.list" call. -// Exactly one of *ForwardingRuleList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ForwardingRuleList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ForwardingRuleList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of ForwardingRule resources available to the specified project and region.", - // "httpMethod": "GET", - // "id": "compute.forwardingRules.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/forwardingRules", - // "response": { - // "$ref": "ForwardingRuleList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ForwardingRulesListCall) Pages(ctx context.Context, f func(*ForwardingRuleList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.forwardingRules.patch": - -type ForwardingRulesPatchCall struct { - s *Service - project string - region string - forwardingRule string - forwardingrule *ForwardingRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified forwarding rule with the data included -// in the request. This method supports PATCH semantics and uses the -// JSON merge patch format and processing rules. Currently, you can only -// patch the network_tier field. -func (r *ForwardingRulesService) Patch(project string, region string, forwardingRule string, forwardingrule *ForwardingRule) *ForwardingRulesPatchCall { - c := &ForwardingRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.forwardingRule = forwardingRule - c.forwardingrule = forwardingrule - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *ForwardingRulesPatchCall) RequestId(requestId string) *ForwardingRulesPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ForwardingRulesPatchCall) Fields(s ...googleapi.Field) *ForwardingRulesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ForwardingRulesPatchCall) Context(ctx context.Context) *ForwardingRulesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ForwardingRulesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{forwardingRule}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "forwardingRule": c.forwardingRule, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ForwardingRulesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.", - // "httpMethod": "PATCH", - // "id": "compute.forwardingRules.patch", - // "parameterOrder": [ - // "project", - // "region", - // "forwardingRule" - // ], - // "parameters": { - // "forwardingRule": { - // "description": "Name of the ForwardingRule resource to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}", - // "request": { - // "$ref": "ForwardingRule" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.forwardingRules.setLabels": - -type ForwardingRulesSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on the specified resource. To learn more -// about labels, read the Labeling Resources documentation. -func (r *ForwardingRulesService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *ForwardingRulesSetLabelsCall { - c := &ForwardingRulesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *ForwardingRulesSetLabelsCall) RequestId(requestId string) *ForwardingRulesSetLabelsCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ForwardingRulesSetLabelsCall) Fields(s ...googleapi.Field) *ForwardingRulesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ForwardingRulesSetLabelsCall) Context(ctx context.Context) *ForwardingRulesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ForwardingRulesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetlabelsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{resource}/setLabels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.setLabels" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ForwardingRulesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.", - // "httpMethod": "POST", - // "id": "compute.forwardingRules.setLabels", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/forwardingRules/{resource}/setLabels", - // "request": { - // "$ref": "RegionSetLabelsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.forwardingRules.setTarget": - -type ForwardingRulesSetTargetCall struct { - s *Service - project string - region string - forwardingRule string - targetreference *TargetReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetTarget: Changes target URL for forwarding rule. The new target -// should be of the same type as the old target. -// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/setTarget -func (r *ForwardingRulesService) SetTarget(project string, region string, forwardingRule string, targetreference *TargetReference) *ForwardingRulesSetTargetCall { - c := &ForwardingRulesSetTargetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.forwardingRule = forwardingRule - c.targetreference = targetreference - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *ForwardingRulesSetTargetCall) RequestId(requestId string) *ForwardingRulesSetTargetCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ForwardingRulesSetTargetCall) Fields(s ...googleapi.Field) *ForwardingRulesSetTargetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ForwardingRulesSetTargetCall) Context(ctx context.Context) *ForwardingRulesSetTargetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ForwardingRulesSetTargetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "forwardingRule": c.forwardingRule, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.setTarget" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes target URL for forwarding rule. The new target should be of the same type as the old target.", - // "httpMethod": "POST", - // "id": "compute.forwardingRules.setTarget", - // "parameterOrder": [ - // "project", - // "region", - // "forwardingRule" - // ], - // "parameters": { - // "forwardingRule": { - // "description": "Name of the ForwardingRule resource in which target is to be set.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget", - // "request": { - // "$ref": "TargetReference" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.forwardingRules.testIamPermissions": - -type ForwardingRulesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *ForwardingRulesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *ForwardingRulesTestIamPermissionsCall { - c := &ForwardingRulesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ForwardingRulesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ForwardingRulesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ForwardingRulesTestIamPermissionsCall) Context(ctx context.Context) *ForwardingRulesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ForwardingRulesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ForwardingRulesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.forwardingRules.testIamPermissions", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/forwardingRules/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.globalAddresses.delete": - -type GlobalAddressesDeleteCall struct { - s *Service - project string - address string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified address resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/delete -func (r *GlobalAddressesService) Delete(project string, address string) *GlobalAddressesDeleteCall { - c := &GlobalAddressesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.address = address - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *GlobalAddressesDeleteCall) RequestId(requestId string) *GlobalAddressesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalAddressesDeleteCall) Fields(s ...googleapi.Field) *GlobalAddressesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalAddressesDeleteCall) Context(ctx context.Context) *GlobalAddressesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalAddressesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses/{address}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "address": c.address, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalAddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified address resource.", - // "httpMethod": "DELETE", - // "id": "compute.globalAddresses.delete", - // "parameterOrder": [ - // "project", - // "address" - // ], - // "parameters": { - // "address": { - // "description": "Name of the address resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/addresses/{address}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.globalAddresses.get": - -type GlobalAddressesGetCall struct { - s *Service - project string - address string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified address resource. Get a list of available -// addresses by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/get -func (r *GlobalAddressesService) Get(project string, address string) *GlobalAddressesGetCall { - c := &GlobalAddressesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.address = address - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalAddressesGetCall) Fields(s ...googleapi.Field) *GlobalAddressesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *GlobalAddressesGetCall) IfNoneMatch(entityTag string) *GlobalAddressesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalAddressesGetCall) Context(ctx context.Context) *GlobalAddressesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalAddressesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses/{address}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "address": c.address, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.get" call. -// Exactly one of *Address or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Address.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *GlobalAddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Address{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified address resource. Get a list of available addresses by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.globalAddresses.get", - // "parameterOrder": [ - // "project", - // "address" - // ], - // "parameters": { - // "address": { - // "description": "Name of the address resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/addresses/{address}", - // "response": { - // "$ref": "Address" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.globalAddresses.insert": - -type GlobalAddressesInsertCall struct { - s *Service - project string - address *Address - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an address resource in the specified project using -// the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/insert -func (r *GlobalAddressesService) Insert(project string, address *Address) *GlobalAddressesInsertCall { - c := &GlobalAddressesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.address = address - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *GlobalAddressesInsertCall) RequestId(requestId string) *GlobalAddressesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalAddressesInsertCall) Fields(s ...googleapi.Field) *GlobalAddressesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalAddressesInsertCall) Context(ctx context.Context) *GlobalAddressesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalAddressesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.address) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalAddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates an address resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.globalAddresses.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/addresses", - // "request": { - // "$ref": "Address" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.globalAddresses.list": - -type GlobalAddressesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of global addresses. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/list -func (r *GlobalAddressesService) List(project string) *GlobalAddressesListCall { - c := &GlobalAddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *GlobalAddressesListCall) Filter(filter string) *GlobalAddressesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *GlobalAddressesListCall) MaxResults(maxResults int64) *GlobalAddressesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *GlobalAddressesListCall) OrderBy(orderBy string) *GlobalAddressesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *GlobalAddressesListCall) PageToken(pageToken string) *GlobalAddressesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalAddressesListCall) Fields(s ...googleapi.Field) *GlobalAddressesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *GlobalAddressesListCall) IfNoneMatch(entityTag string) *GlobalAddressesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalAddressesListCall) Context(ctx context.Context) *GlobalAddressesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalAddressesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.list" call. -// Exactly one of *AddressList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *AddressList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalAddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AddressList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of global addresses.", - // "httpMethod": "GET", - // "id": "compute.globalAddresses.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/addresses", - // "response": { - // "$ref": "AddressList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *GlobalAddressesListCall) Pages(ctx context.Context, f func(*AddressList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.globalAddresses.setLabels": - -type GlobalAddressesSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a GlobalAddress. To learn more about -// labels, read the Labeling Resources documentation. -func (r *GlobalAddressesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *GlobalAddressesSetLabelsCall { - c := &GlobalAddressesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalAddressesSetLabelsCall) Fields(s ...googleapi.Field) *GlobalAddressesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalAddressesSetLabelsCall) Context(ctx context.Context) *GlobalAddressesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalAddressesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetlabelsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses/{resource}/setLabels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.setLabels" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalAddressesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the labels on a GlobalAddress. To learn more about labels, read the Labeling Resources documentation.", - // "httpMethod": "POST", - // "id": "compute.globalAddresses.setLabels", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/addresses/{resource}/setLabels", - // "request": { - // "$ref": "GlobalSetLabelsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.globalAddresses.testIamPermissions": - -type GlobalAddressesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *GlobalAddressesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *GlobalAddressesTestIamPermissionsCall { - c := &GlobalAddressesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalAddressesTestIamPermissionsCall) Fields(s ...googleapi.Field) *GlobalAddressesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalAddressesTestIamPermissionsCall) Context(ctx context.Context) *GlobalAddressesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalAddressesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *GlobalAddressesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.globalAddresses.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/addresses/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.globalForwardingRules.delete": - -type GlobalForwardingRulesDeleteCall struct { - s *Service - project string - forwardingRule string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified GlobalForwardingRule resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/delete -func (r *GlobalForwardingRulesService) Delete(project string, forwardingRule string) *GlobalForwardingRulesDeleteCall { - c := &GlobalForwardingRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.forwardingRule = forwardingRule - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *GlobalForwardingRulesDeleteCall) RequestId(requestId string) *GlobalForwardingRulesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalForwardingRulesDeleteCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalForwardingRulesDeleteCall) Context(ctx context.Context) *GlobalForwardingRulesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalForwardingRulesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{forwardingRule}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "forwardingRule": c.forwardingRule, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified GlobalForwardingRule resource.", - // "httpMethod": "DELETE", - // "id": "compute.globalForwardingRules.delete", - // "parameterOrder": [ - // "project", - // "forwardingRule" - // ], - // "parameters": { - // "forwardingRule": { - // "description": "Name of the ForwardingRule resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/forwardingRules/{forwardingRule}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.globalForwardingRules.get": - -type GlobalForwardingRulesGetCall struct { - s *Service - project string - forwardingRule string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified GlobalForwardingRule resource. Get a list -// of available forwarding rules by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/get -func (r *GlobalForwardingRulesService) Get(project string, forwardingRule string) *GlobalForwardingRulesGetCall { - c := &GlobalForwardingRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.forwardingRule = forwardingRule - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalForwardingRulesGetCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *GlobalForwardingRulesGetCall) IfNoneMatch(entityTag string) *GlobalForwardingRulesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalForwardingRulesGetCall) Context(ctx context.Context) *GlobalForwardingRulesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalForwardingRulesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{forwardingRule}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "forwardingRule": c.forwardingRule, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.get" call. -// Exactly one of *ForwardingRule or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *ForwardingRule.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *GlobalForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRule, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ForwardingRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified GlobalForwardingRule resource. Get a list of available forwarding rules by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.globalForwardingRules.get", - // "parameterOrder": [ - // "project", - // "forwardingRule" - // ], - // "parameters": { - // "forwardingRule": { - // "description": "Name of the ForwardingRule resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/forwardingRules/{forwardingRule}", - // "response": { - // "$ref": "ForwardingRule" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.globalForwardingRules.insert": - -type GlobalForwardingRulesInsertCall struct { - s *Service - project string - forwardingrule *ForwardingRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a GlobalForwardingRule resource in the specified -// project using the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/insert -func (r *GlobalForwardingRulesService) Insert(project string, forwardingrule *ForwardingRule) *GlobalForwardingRulesInsertCall { - c := &GlobalForwardingRulesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.forwardingrule = forwardingrule - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *GlobalForwardingRulesInsertCall) RequestId(requestId string) *GlobalForwardingRulesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalForwardingRulesInsertCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalForwardingRulesInsertCall) Context(ctx context.Context) *GlobalForwardingRulesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalForwardingRulesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a GlobalForwardingRule resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.globalForwardingRules.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/forwardingRules", - // "request": { - // "$ref": "ForwardingRule" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.globalForwardingRules.list": - -type GlobalForwardingRulesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of GlobalForwardingRule resources available to -// the specified project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/list -func (r *GlobalForwardingRulesService) List(project string) *GlobalForwardingRulesListCall { - c := &GlobalForwardingRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *GlobalForwardingRulesListCall) Filter(filter string) *GlobalForwardingRulesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *GlobalForwardingRulesListCall) MaxResults(maxResults int64) *GlobalForwardingRulesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *GlobalForwardingRulesListCall) OrderBy(orderBy string) *GlobalForwardingRulesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *GlobalForwardingRulesListCall) PageToken(pageToken string) *GlobalForwardingRulesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalForwardingRulesListCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *GlobalForwardingRulesListCall) IfNoneMatch(entityTag string) *GlobalForwardingRulesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalForwardingRulesListCall) Context(ctx context.Context) *GlobalForwardingRulesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalForwardingRulesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.list" call. -// Exactly one of *ForwardingRuleList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ForwardingRuleList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *GlobalForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ForwardingRuleList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of GlobalForwardingRule resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.globalForwardingRules.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/forwardingRules", - // "response": { - // "$ref": "ForwardingRuleList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *GlobalForwardingRulesListCall) Pages(ctx context.Context, f func(*ForwardingRuleList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.globalForwardingRules.patch": - -type GlobalForwardingRulesPatchCall struct { - s *Service - project string - forwardingRule string - forwardingrule *ForwardingRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified forwarding rule with the data included -// in the request. This method supports PATCH semantics and uses the -// JSON merge patch format and processing rules. Currently, you can only -// patch the network_tier field. -func (r *GlobalForwardingRulesService) Patch(project string, forwardingRule string, forwardingrule *ForwardingRule) *GlobalForwardingRulesPatchCall { - c := &GlobalForwardingRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.forwardingRule = forwardingRule - c.forwardingrule = forwardingrule - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *GlobalForwardingRulesPatchCall) RequestId(requestId string) *GlobalForwardingRulesPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalForwardingRulesPatchCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalForwardingRulesPatchCall) Context(ctx context.Context) *GlobalForwardingRulesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalForwardingRulesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{forwardingRule}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "forwardingRule": c.forwardingRule, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalForwardingRulesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.", - // "httpMethod": "PATCH", - // "id": "compute.globalForwardingRules.patch", - // "parameterOrder": [ - // "project", - // "forwardingRule" - // ], - // "parameters": { - // "forwardingRule": { - // "description": "Name of the ForwardingRule resource to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/forwardingRules/{forwardingRule}", - // "request": { - // "$ref": "ForwardingRule" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.globalForwardingRules.setLabels": - -type GlobalForwardingRulesSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on the specified resource. To learn more -// about labels, read the Labeling Resources documentation. -func (r *GlobalForwardingRulesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *GlobalForwardingRulesSetLabelsCall { - c := &GlobalForwardingRulesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalForwardingRulesSetLabelsCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalForwardingRulesSetLabelsCall) Context(ctx context.Context) *GlobalForwardingRulesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalForwardingRulesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetlabelsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{resource}/setLabels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.setLabels" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalForwardingRulesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.", - // "httpMethod": "POST", - // "id": "compute.globalForwardingRules.setLabels", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/forwardingRules/{resource}/setLabels", - // "request": { - // "$ref": "GlobalSetLabelsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.globalForwardingRules.setTarget": - -type GlobalForwardingRulesSetTargetCall struct { - s *Service - project string - forwardingRule string - targetreference *TargetReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetTarget: Changes target URL for the GlobalForwardingRule resource. -// The new target should be of the same type as the old target. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/setTarget -func (r *GlobalForwardingRulesService) SetTarget(project string, forwardingRule string, targetreference *TargetReference) *GlobalForwardingRulesSetTargetCall { - c := &GlobalForwardingRulesSetTargetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.forwardingRule = forwardingRule - c.targetreference = targetreference - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *GlobalForwardingRulesSetTargetCall) RequestId(requestId string) *GlobalForwardingRulesSetTargetCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalForwardingRulesSetTargetCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesSetTargetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalForwardingRulesSetTargetCall) Context(ctx context.Context) *GlobalForwardingRulesSetTargetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalForwardingRulesSetTargetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{forwardingRule}/setTarget") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "forwardingRule": c.forwardingRule, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.setTarget" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target.", - // "httpMethod": "POST", - // "id": "compute.globalForwardingRules.setTarget", - // "parameterOrder": [ - // "project", - // "forwardingRule" - // ], - // "parameters": { - // "forwardingRule": { - // "description": "Name of the ForwardingRule resource in which target is to be set.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/forwardingRules/{forwardingRule}/setTarget", - // "request": { - // "$ref": "TargetReference" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.globalForwardingRules.testIamPermissions": - -type GlobalForwardingRulesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *GlobalForwardingRulesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *GlobalForwardingRulesTestIamPermissionsCall { - c := &GlobalForwardingRulesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalForwardingRulesTestIamPermissionsCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalForwardingRulesTestIamPermissionsCall) Context(ctx context.Context) *GlobalForwardingRulesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalForwardingRulesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *GlobalForwardingRulesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.globalForwardingRules.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/forwardingRules/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.globalOperations.aggregatedList": - -type GlobalOperationsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of all operations. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/aggregatedList -func (r *GlobalOperationsService) AggregatedList(project string) *GlobalOperationsAggregatedListCall { - c := &GlobalOperationsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *GlobalOperationsAggregatedListCall) Filter(filter string) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *GlobalOperationsAggregatedListCall) MaxResults(maxResults int64) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *GlobalOperationsAggregatedListCall) OrderBy(orderBy string) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *GlobalOperationsAggregatedListCall) PageToken(pageToken string) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalOperationsAggregatedListCall) Fields(s ...googleapi.Field) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *GlobalOperationsAggregatedListCall) IfNoneMatch(entityTag string) *GlobalOperationsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalOperationsAggregatedListCall) Context(ctx context.Context) *GlobalOperationsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalOperationsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalOperationsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/operations") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalOperations.aggregatedList" call. -// Exactly one of *OperationAggregatedList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *OperationAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *GlobalOperationsAggregatedListCall) Do(opts ...googleapi.CallOption) (*OperationAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &OperationAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of all operations.", - // "httpMethod": "GET", - // "id": "compute.globalOperations.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/operations", - // "response": { - // "$ref": "OperationAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *GlobalOperationsAggregatedListCall) Pages(ctx context.Context, f func(*OperationAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.globalOperations.delete": - -type GlobalOperationsDeleteCall struct { - s *Service - project string - operation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Operations resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/delete -func (r *GlobalOperationsService) Delete(project string, operation string) *GlobalOperationsDeleteCall { - c := &GlobalOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.operation = operation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalOperationsDeleteCall) Fields(s ...googleapi.Field) *GlobalOperationsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalOperationsDeleteCall) Context(ctx context.Context) *GlobalOperationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalOperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "operation": c.operation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalOperations.delete" call. -func (c *GlobalOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return err - } - return nil - // { - // "description": "Deletes the specified Operations resource.", - // "httpMethod": "DELETE", - // "id": "compute.globalOperations.delete", - // "parameterOrder": [ - // "project", - // "operation" - // ], - // "parameters": { - // "operation": { - // "description": "Name of the Operations resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/operations/{operation}", - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.globalOperations.get": - -type GlobalOperationsGetCall struct { - s *Service - project string - operation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves the specified Operations resource. Get a list of -// operations by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/get -func (r *GlobalOperationsService) Get(project string, operation string) *GlobalOperationsGetCall { - c := &GlobalOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.operation = operation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalOperationsGetCall) Fields(s ...googleapi.Field) *GlobalOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *GlobalOperationsGetCall) IfNoneMatch(entityTag string) *GlobalOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalOperationsGetCall) Context(ctx context.Context) *GlobalOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "operation": c.operation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalOperations.get" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the specified Operations resource. Get a list of operations by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.globalOperations.get", - // "parameterOrder": [ - // "project", - // "operation" - // ], - // "parameters": { - // "operation": { - // "description": "Name of the Operations resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/operations/{operation}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.globalOperations.list": - -type GlobalOperationsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of Operation resources contained within the -// specified project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/list -func (r *GlobalOperationsService) List(project string) *GlobalOperationsListCall { - c := &GlobalOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *GlobalOperationsListCall) Filter(filter string) *GlobalOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *GlobalOperationsListCall) MaxResults(maxResults int64) *GlobalOperationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *GlobalOperationsListCall) OrderBy(orderBy string) *GlobalOperationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *GlobalOperationsListCall) PageToken(pageToken string) *GlobalOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalOperationsListCall) Fields(s ...googleapi.Field) *GlobalOperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *GlobalOperationsListCall) IfNoneMatch(entityTag string) *GlobalOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalOperationsListCall) Context(ctx context.Context) *GlobalOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalOperations.list" call. -// Exactly one of *OperationList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *OperationList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *GlobalOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &OperationList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of Operation resources contained within the specified project.", - // "httpMethod": "GET", - // "id": "compute.globalOperations.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/operations", - // "response": { - // "$ref": "OperationList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *GlobalOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.healthChecks.delete": - -type HealthChecksDeleteCall struct { - s *Service - project string - healthCheck string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified HealthCheck resource. -func (r *HealthChecksService) Delete(project string, healthCheck string) *HealthChecksDeleteCall { - c := &HealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.healthCheck = healthCheck - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *HealthChecksDeleteCall) RequestId(requestId string) *HealthChecksDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HealthChecksDeleteCall) Fields(s ...googleapi.Field) *HealthChecksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HealthChecksDeleteCall) Context(ctx context.Context) *HealthChecksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HealthChecksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks/{healthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "healthCheck": c.healthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified HealthCheck resource.", - // "httpMethod": "DELETE", - // "id": "compute.healthChecks.delete", - // "parameterOrder": [ - // "project", - // "healthCheck" - // ], - // "parameters": { - // "healthCheck": { - // "description": "Name of the HealthCheck resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/healthChecks/{healthCheck}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.healthChecks.get": - -type HealthChecksGetCall struct { - s *Service - project string - healthCheck string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified HealthCheck resource. Get a list of -// available health checks by making a list() request. -func (r *HealthChecksService) Get(project string, healthCheck string) *HealthChecksGetCall { - c := &HealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.healthCheck = healthCheck - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HealthChecksGetCall) Fields(s ...googleapi.Field) *HealthChecksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *HealthChecksGetCall) IfNoneMatch(entityTag string) *HealthChecksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HealthChecksGetCall) Context(ctx context.Context) *HealthChecksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HealthChecksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks/{healthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "healthCheck": c.healthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.get" call. -// Exactly one of *HealthCheck or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *HealthCheck.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthCheck, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &HealthCheck{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified HealthCheck resource. Get a list of available health checks by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.healthChecks.get", - // "parameterOrder": [ - // "project", - // "healthCheck" - // ], - // "parameters": { - // "healthCheck": { - // "description": "Name of the HealthCheck resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/healthChecks/{healthCheck}", - // "response": { - // "$ref": "HealthCheck" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.healthChecks.insert": - -type HealthChecksInsertCall struct { - s *Service - project string - healthcheck *HealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a HealthCheck resource in the specified project using -// the data included in the request. -func (r *HealthChecksService) Insert(project string, healthcheck *HealthCheck) *HealthChecksInsertCall { - c := &HealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.healthcheck = healthcheck - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *HealthChecksInsertCall) RequestId(requestId string) *HealthChecksInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HealthChecksInsertCall) Fields(s ...googleapi.Field) *HealthChecksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HealthChecksInsertCall) Context(ctx context.Context) *HealthChecksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HealthChecksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.healthcheck) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a HealthCheck resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.healthChecks.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/healthChecks", - // "request": { - // "$ref": "HealthCheck" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.healthChecks.list": - -type HealthChecksListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of HealthCheck resources available to the -// specified project. -func (r *HealthChecksService) List(project string) *HealthChecksListCall { - c := &HealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *HealthChecksListCall) Filter(filter string) *HealthChecksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *HealthChecksListCall) MaxResults(maxResults int64) *HealthChecksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *HealthChecksListCall) OrderBy(orderBy string) *HealthChecksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *HealthChecksListCall) PageToken(pageToken string) *HealthChecksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HealthChecksListCall) Fields(s ...googleapi.Field) *HealthChecksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *HealthChecksListCall) IfNoneMatch(entityTag string) *HealthChecksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HealthChecksListCall) Context(ctx context.Context) *HealthChecksListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HealthChecksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.list" call. -// Exactly one of *HealthCheckList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *HealthCheckList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *HealthChecksListCall) Do(opts ...googleapi.CallOption) (*HealthCheckList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &HealthCheckList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of HealthCheck resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.healthChecks.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/healthChecks", - // "response": { - // "$ref": "HealthCheckList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *HealthChecksListCall) Pages(ctx context.Context, f func(*HealthCheckList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.healthChecks.patch": - -type HealthChecksPatchCall struct { - s *Service - project string - healthCheck string - healthcheck *HealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a HealthCheck resource in the specified project using -// the data included in the request. This method supports PATCH -// semantics and uses the JSON merge patch format and processing rules. -func (r *HealthChecksService) Patch(project string, healthCheck string, healthcheck *HealthCheck) *HealthChecksPatchCall { - c := &HealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.healthCheck = healthCheck - c.healthcheck = healthcheck - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *HealthChecksPatchCall) RequestId(requestId string) *HealthChecksPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HealthChecksPatchCall) Fields(s ...googleapi.Field) *HealthChecksPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HealthChecksPatchCall) Context(ctx context.Context) *HealthChecksPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HealthChecksPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.healthcheck) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks/{healthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "healthCheck": c.healthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.healthChecks.patch", - // "parameterOrder": [ - // "project", - // "healthCheck" - // ], - // "parameters": { - // "healthCheck": { - // "description": "Name of the HealthCheck resource to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/healthChecks/{healthCheck}", - // "request": { - // "$ref": "HealthCheck" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.healthChecks.testIamPermissions": - -type HealthChecksTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *HealthChecksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *HealthChecksTestIamPermissionsCall { - c := &HealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *HealthChecksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HealthChecksTestIamPermissionsCall) Context(ctx context.Context) *HealthChecksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HealthChecksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *HealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.healthChecks.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/healthChecks/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.healthChecks.update": - -type HealthChecksUpdateCall struct { - s *Service - project string - healthCheck string - healthcheck *HealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a HealthCheck resource in the specified project using -// the data included in the request. -func (r *HealthChecksService) Update(project string, healthCheck string, healthcheck *HealthCheck) *HealthChecksUpdateCall { - c := &HealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.healthCheck = healthCheck - c.healthcheck = healthcheck - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *HealthChecksUpdateCall) RequestId(requestId string) *HealthChecksUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HealthChecksUpdateCall) Fields(s ...googleapi.Field) *HealthChecksUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HealthChecksUpdateCall) Context(ctx context.Context) *HealthChecksUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HealthChecksUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.healthcheck) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks/{healthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "healthCheck": c.healthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates a HealthCheck resource in the specified project using the data included in the request.", - // "httpMethod": "PUT", - // "id": "compute.healthChecks.update", - // "parameterOrder": [ - // "project", - // "healthCheck" - // ], - // "parameters": { - // "healthCheck": { - // "description": "Name of the HealthCheck resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/healthChecks/{healthCheck}", - // "request": { - // "$ref": "HealthCheck" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.hostTypes.aggregatedList": - -type HostTypesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of host types. -func (r *HostTypesService) AggregatedList(project string) *HostTypesAggregatedListCall { - c := &HostTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *HostTypesAggregatedListCall) Filter(filter string) *HostTypesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *HostTypesAggregatedListCall) MaxResults(maxResults int64) *HostTypesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *HostTypesAggregatedListCall) OrderBy(orderBy string) *HostTypesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *HostTypesAggregatedListCall) PageToken(pageToken string) *HostTypesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HostTypesAggregatedListCall) Fields(s ...googleapi.Field) *HostTypesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *HostTypesAggregatedListCall) IfNoneMatch(entityTag string) *HostTypesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HostTypesAggregatedListCall) Context(ctx context.Context) *HostTypesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HostTypesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HostTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/hostTypes") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.hostTypes.aggregatedList" call. -// Exactly one of *HostTypeAggregatedList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *HostTypeAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *HostTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*HostTypeAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &HostTypeAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of host types.", - // "httpMethod": "GET", - // "id": "compute.hostTypes.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/hostTypes", - // "response": { - // "$ref": "HostTypeAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *HostTypesAggregatedListCall) Pages(ctx context.Context, f func(*HostTypeAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.hostTypes.get": - -type HostTypesGetCall struct { - s *Service - project string - zone string - hostType string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified host type. Get a list of available host -// types by making a list() request. -func (r *HostTypesService) Get(project string, zone string, hostType string) *HostTypesGetCall { - c := &HostTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.hostType = hostType - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HostTypesGetCall) Fields(s ...googleapi.Field) *HostTypesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *HostTypesGetCall) IfNoneMatch(entityTag string) *HostTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HostTypesGetCall) Context(ctx context.Context) *HostTypesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HostTypesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HostTypesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/hostTypes/{hostType}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "hostType": c.hostType, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.hostTypes.get" call. -// Exactly one of *HostType or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *HostType.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HostTypesGetCall) Do(opts ...googleapi.CallOption) (*HostType, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &HostType{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified host type. Get a list of available host types by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.hostTypes.get", - // "parameterOrder": [ - // "project", - // "zone", - // "hostType" - // ], - // "parameters": { - // "hostType": { - // "description": "Name of the host type to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/hostTypes/{hostType}", - // "response": { - // "$ref": "HostType" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.hostTypes.list": - -type HostTypesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of host types available to the specified -// project. -func (r *HostTypesService) List(project string, zone string) *HostTypesListCall { - c := &HostTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *HostTypesListCall) Filter(filter string) *HostTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *HostTypesListCall) MaxResults(maxResults int64) *HostTypesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *HostTypesListCall) OrderBy(orderBy string) *HostTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *HostTypesListCall) PageToken(pageToken string) *HostTypesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HostTypesListCall) Fields(s ...googleapi.Field) *HostTypesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *HostTypesListCall) IfNoneMatch(entityTag string) *HostTypesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HostTypesListCall) Context(ctx context.Context) *HostTypesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HostTypesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HostTypesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/hostTypes") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.hostTypes.list" call. -// Exactly one of *HostTypeList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *HostTypeList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HostTypesListCall) Do(opts ...googleapi.CallOption) (*HostTypeList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &HostTypeList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of host types available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.hostTypes.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/hostTypes", - // "response": { - // "$ref": "HostTypeList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *HostTypesListCall) Pages(ctx context.Context, f func(*HostTypeList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.hosts.aggregatedList": - -type HostsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of hosts. -func (r *HostsService) AggregatedList(project string) *HostsAggregatedListCall { - c := &HostsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *HostsAggregatedListCall) Filter(filter string) *HostsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *HostsAggregatedListCall) MaxResults(maxResults int64) *HostsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *HostsAggregatedListCall) OrderBy(orderBy string) *HostsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *HostsAggregatedListCall) PageToken(pageToken string) *HostsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HostsAggregatedListCall) Fields(s ...googleapi.Field) *HostsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *HostsAggregatedListCall) IfNoneMatch(entityTag string) *HostsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HostsAggregatedListCall) Context(ctx context.Context) *HostsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HostsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HostsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/hosts") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.hosts.aggregatedList" call. -// Exactly one of *HostAggregatedList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *HostAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *HostsAggregatedListCall) Do(opts ...googleapi.CallOption) (*HostAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &HostAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of hosts.", - // "httpMethod": "GET", - // "id": "compute.hosts.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/hosts", - // "response": { - // "$ref": "HostAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *HostsAggregatedListCall) Pages(ctx context.Context, f func(*HostAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.hosts.delete": - -type HostsDeleteCall struct { - s *Service - project string - zone string - host string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Host resource. -func (r *HostsService) Delete(project string, zone string, host string) *HostsDeleteCall { - c := &HostsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.host = host - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *HostsDeleteCall) RequestId(requestId string) *HostsDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HostsDeleteCall) Fields(s ...googleapi.Field) *HostsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HostsDeleteCall) Context(ctx context.Context) *HostsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HostsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HostsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/hosts/{host}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "host": c.host, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.hosts.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HostsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified Host resource.", - // "httpMethod": "DELETE", - // "id": "compute.hosts.delete", - // "parameterOrder": [ - // "project", - // "zone", - // "host" - // ], - // "parameters": { - // "host": { - // "description": "Name of the Host resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/hosts/{host}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.hosts.get": - -type HostsGetCall struct { - s *Service - project string - zone string - host string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified host. Get a list of available hosts by -// making a list() request. -func (r *HostsService) Get(project string, zone string, host string) *HostsGetCall { - c := &HostsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.host = host - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HostsGetCall) Fields(s ...googleapi.Field) *HostsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *HostsGetCall) IfNoneMatch(entityTag string) *HostsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HostsGetCall) Context(ctx context.Context) *HostsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HostsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HostsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/hosts/{host}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "host": c.host, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.hosts.get" call. -// Exactly one of *Host or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Host.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *HostsGetCall) Do(opts ...googleapi.CallOption) (*Host, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Host{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified host. Get a list of available hosts by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.hosts.get", - // "parameterOrder": [ - // "project", - // "zone", - // "host" - // ], - // "parameters": { - // "host": { - // "description": "Name of the host to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/hosts/{host}", - // "response": { - // "$ref": "Host" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.hosts.getIamPolicy": - -type HostsGetIamPolicyCall struct { - s *Service - project string - zone string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. -func (r *HostsService) GetIamPolicy(project string, zone string, resource string) *HostsGetIamPolicyCall { - c := &HostsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HostsGetIamPolicyCall) Fields(s ...googleapi.Field) *HostsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *HostsGetIamPolicyCall) IfNoneMatch(entityTag string) *HostsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HostsGetIamPolicyCall) Context(ctx context.Context) *HostsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HostsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HostsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/hosts/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.hosts.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *HostsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - // "httpMethod": "GET", - // "id": "compute.hosts.getIamPolicy", - // "parameterOrder": [ - // "project", - // "zone", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/hosts/{resource}/getIamPolicy", - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.hosts.insert": - -type HostsInsertCall struct { - s *Service - project string - zone string - host *Host - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a host resource in the specified project using the -// data included in the request. -func (r *HostsService) Insert(project string, zone string, host *Host) *HostsInsertCall { - c := &HostsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.host = host - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *HostsInsertCall) RequestId(requestId string) *HostsInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HostsInsertCall) Fields(s ...googleapi.Field) *HostsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HostsInsertCall) Context(ctx context.Context) *HostsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HostsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HostsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.host) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/hosts") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.hosts.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HostsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a host resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.hosts.insert", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/hosts", - // "request": { - // "$ref": "Host" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.hosts.list": - -type HostsListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of hosts available to the specified project. -func (r *HostsService) List(project string, zone string) *HostsListCall { - c := &HostsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *HostsListCall) Filter(filter string) *HostsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *HostsListCall) MaxResults(maxResults int64) *HostsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *HostsListCall) OrderBy(orderBy string) *HostsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *HostsListCall) PageToken(pageToken string) *HostsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HostsListCall) Fields(s ...googleapi.Field) *HostsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *HostsListCall) IfNoneMatch(entityTag string) *HostsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HostsListCall) Context(ctx context.Context) *HostsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HostsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HostsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/hosts") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.hosts.list" call. -// Exactly one of *HostList or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *HostList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HostsListCall) Do(opts ...googleapi.CallOption) (*HostList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &HostList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of hosts available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.hosts.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/hosts", - // "response": { - // "$ref": "HostList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *HostsListCall) Pages(ctx context.Context, f func(*HostList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.hosts.setIamPolicy": - -type HostsSetIamPolicyCall struct { - s *Service - project string - zone string - resource string - policy *Policy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. -func (r *HostsService) SetIamPolicy(project string, zone string, resource string, policy *Policy) *HostsSetIamPolicyCall { - c := &HostsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.policy = policy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HostsSetIamPolicyCall) Fields(s ...googleapi.Field) *HostsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HostsSetIamPolicyCall) Context(ctx context.Context) *HostsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HostsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HostsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/hosts/{resource}/setIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.hosts.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *HostsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - // "httpMethod": "POST", - // "id": "compute.hosts.setIamPolicy", - // "parameterOrder": [ - // "project", - // "zone", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/hosts/{resource}/setIamPolicy", - // "request": { - // "$ref": "Policy" - // }, - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.hosts.testIamPermissions": - -type HostsTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *HostsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *HostsTestIamPermissionsCall { - c := &HostsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HostsTestIamPermissionsCall) Fields(s ...googleapi.Field) *HostsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HostsTestIamPermissionsCall) Context(ctx context.Context) *HostsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HostsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HostsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/hosts/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.hosts.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *HostsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.hosts.testIamPermissions", - // "parameterOrder": [ - // "project", - // "zone", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/hosts/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.httpHealthChecks.delete": - -type HttpHealthChecksDeleteCall struct { - s *Service - project string - httpHealthCheck string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified HttpHealthCheck resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/delete -func (r *HttpHealthChecksService) Delete(project string, httpHealthCheck string) *HttpHealthChecksDeleteCall { - c := &HttpHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpHealthCheck = httpHealthCheck - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *HttpHealthChecksDeleteCall) RequestId(requestId string) *HttpHealthChecksDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpHealthChecksDeleteCall) Fields(s ...googleapi.Field) *HttpHealthChecksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpHealthChecksDeleteCall) Context(ctx context.Context) *HttpHealthChecksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpHealthChecksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpHealthCheck": c.httpHealthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HttpHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified HttpHealthCheck resource.", - // "httpMethod": "DELETE", - // "id": "compute.httpHealthChecks.delete", - // "parameterOrder": [ - // "project", - // "httpHealthCheck" - // ], - // "parameters": { - // "httpHealthCheck": { - // "description": "Name of the HttpHealthCheck resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.httpHealthChecks.get": - -type HttpHealthChecksGetCall struct { - s *Service - project string - httpHealthCheck string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified HttpHealthCheck resource. Get a list of -// available HTTP health checks by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/get -func (r *HttpHealthChecksService) Get(project string, httpHealthCheck string) *HttpHealthChecksGetCall { - c := &HttpHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpHealthCheck = httpHealthCheck - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpHealthChecksGetCall) Fields(s ...googleapi.Field) *HttpHealthChecksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *HttpHealthChecksGetCall) IfNoneMatch(entityTag string) *HttpHealthChecksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpHealthChecksGetCall) Context(ctx context.Context) *HttpHealthChecksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpHealthChecksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpHealthCheck": c.httpHealthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.get" call. -// Exactly one of *HttpHealthCheck or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *HttpHealthCheck.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *HttpHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpHealthCheck, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &HttpHealthCheck{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified HttpHealthCheck resource. Get a list of available HTTP health checks by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.httpHealthChecks.get", - // "parameterOrder": [ - // "project", - // "httpHealthCheck" - // ], - // "parameters": { - // "httpHealthCheck": { - // "description": "Name of the HttpHealthCheck resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", - // "response": { - // "$ref": "HttpHealthCheck" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.httpHealthChecks.insert": - -type HttpHealthChecksInsertCall struct { - s *Service - project string - httphealthcheck *HttpHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a HttpHealthCheck resource in the specified project -// using the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/insert -func (r *HttpHealthChecksService) Insert(project string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksInsertCall { - c := &HttpHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httphealthcheck = httphealthcheck - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *HttpHealthChecksInsertCall) RequestId(requestId string) *HttpHealthChecksInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpHealthChecksInsertCall) Fields(s ...googleapi.Field) *HttpHealthChecksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpHealthChecksInsertCall) Context(ctx context.Context) *HttpHealthChecksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpHealthChecksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HttpHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a HttpHealthCheck resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.httpHealthChecks.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/httpHealthChecks", - // "request": { - // "$ref": "HttpHealthCheck" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.httpHealthChecks.list": - -type HttpHealthChecksListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of HttpHealthCheck resources available to -// the specified project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/list -func (r *HttpHealthChecksService) List(project string) *HttpHealthChecksListCall { - c := &HttpHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *HttpHealthChecksListCall) Filter(filter string) *HttpHealthChecksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *HttpHealthChecksListCall) MaxResults(maxResults int64) *HttpHealthChecksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *HttpHealthChecksListCall) OrderBy(orderBy string) *HttpHealthChecksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *HttpHealthChecksListCall) PageToken(pageToken string) *HttpHealthChecksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpHealthChecksListCall) Fields(s ...googleapi.Field) *HttpHealthChecksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *HttpHealthChecksListCall) IfNoneMatch(entityTag string) *HttpHealthChecksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpHealthChecksListCall) Context(ctx context.Context) *HttpHealthChecksListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpHealthChecksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.list" call. -// Exactly one of *HttpHealthCheckList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *HttpHealthCheckList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *HttpHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpHealthCheckList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &HttpHealthCheckList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of HttpHealthCheck resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.httpHealthChecks.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/httpHealthChecks", - // "response": { - // "$ref": "HttpHealthCheckList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *HttpHealthChecksListCall) Pages(ctx context.Context, f func(*HttpHealthCheckList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.httpHealthChecks.patch": - -type HttpHealthChecksPatchCall struct { - s *Service - project string - httpHealthCheck string - httphealthcheck *HttpHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a HttpHealthCheck resource in the specified project -// using the data included in the request. This method supports PATCH -// semantics and uses the JSON merge patch format and processing rules. -// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/patch -func (r *HttpHealthChecksService) Patch(project string, httpHealthCheck string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksPatchCall { - c := &HttpHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpHealthCheck = httpHealthCheck - c.httphealthcheck = httphealthcheck - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *HttpHealthChecksPatchCall) RequestId(requestId string) *HttpHealthChecksPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpHealthChecksPatchCall) Fields(s ...googleapi.Field) *HttpHealthChecksPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpHealthChecksPatchCall) Context(ctx context.Context) *HttpHealthChecksPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpHealthChecksPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpHealthCheck": c.httpHealthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HttpHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.httpHealthChecks.patch", - // "parameterOrder": [ - // "project", - // "httpHealthCheck" - // ], - // "parameters": { - // "httpHealthCheck": { - // "description": "Name of the HttpHealthCheck resource to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", - // "request": { - // "$ref": "HttpHealthCheck" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.httpHealthChecks.testIamPermissions": - -type HttpHealthChecksTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *HttpHealthChecksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *HttpHealthChecksTestIamPermissionsCall { - c := &HttpHealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpHealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *HttpHealthChecksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpHealthChecksTestIamPermissionsCall) Context(ctx context.Context) *HttpHealthChecksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpHealthChecksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *HttpHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.httpHealthChecks.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/httpHealthChecks/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.httpHealthChecks.update": - -type HttpHealthChecksUpdateCall struct { - s *Service - project string - httpHealthCheck string - httphealthcheck *HttpHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a HttpHealthCheck resource in the specified project -// using the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/update -func (r *HttpHealthChecksService) Update(project string, httpHealthCheck string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksUpdateCall { - c := &HttpHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpHealthCheck = httpHealthCheck - c.httphealthcheck = httphealthcheck - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *HttpHealthChecksUpdateCall) RequestId(requestId string) *HttpHealthChecksUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpHealthChecksUpdateCall) Fields(s ...googleapi.Field) *HttpHealthChecksUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpHealthChecksUpdateCall) Context(ctx context.Context) *HttpHealthChecksUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpHealthChecksUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpHealthCheck": c.httpHealthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HttpHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request.", - // "httpMethod": "PUT", - // "id": "compute.httpHealthChecks.update", - // "parameterOrder": [ - // "project", - // "httpHealthCheck" - // ], - // "parameters": { - // "httpHealthCheck": { - // "description": "Name of the HttpHealthCheck resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", - // "request": { - // "$ref": "HttpHealthCheck" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.httpsHealthChecks.delete": - -type HttpsHealthChecksDeleteCall struct { - s *Service - project string - httpsHealthCheck string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified HttpsHealthCheck resource. -func (r *HttpsHealthChecksService) Delete(project string, httpsHealthCheck string) *HttpsHealthChecksDeleteCall { - c := &HttpsHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpsHealthCheck = httpsHealthCheck - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *HttpsHealthChecksDeleteCall) RequestId(requestId string) *HttpsHealthChecksDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpsHealthChecksDeleteCall) Fields(s ...googleapi.Field) *HttpsHealthChecksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpsHealthChecksDeleteCall) Context(ctx context.Context) *HttpsHealthChecksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpsHealthChecksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks/{httpsHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpsHealthCheck": c.httpsHealthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HttpsHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified HttpsHealthCheck resource.", - // "httpMethod": "DELETE", - // "id": "compute.httpsHealthChecks.delete", - // "parameterOrder": [ - // "project", - // "httpsHealthCheck" - // ], - // "parameters": { - // "httpsHealthCheck": { - // "description": "Name of the HttpsHealthCheck resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.httpsHealthChecks.get": - -type HttpsHealthChecksGetCall struct { - s *Service - project string - httpsHealthCheck string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified HttpsHealthCheck resource. Get a list of -// available HTTPS health checks by making a list() request. -func (r *HttpsHealthChecksService) Get(project string, httpsHealthCheck string) *HttpsHealthChecksGetCall { - c := &HttpsHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpsHealthCheck = httpsHealthCheck - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpsHealthChecksGetCall) Fields(s ...googleapi.Field) *HttpsHealthChecksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *HttpsHealthChecksGetCall) IfNoneMatch(entityTag string) *HttpsHealthChecksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpsHealthChecksGetCall) Context(ctx context.Context) *HttpsHealthChecksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpsHealthChecksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks/{httpsHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpsHealthCheck": c.httpsHealthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.get" call. -// Exactly one of *HttpsHealthCheck or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *HttpsHealthCheck.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *HttpsHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpsHealthCheck, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &HttpsHealthCheck{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified HttpsHealthCheck resource. Get a list of available HTTPS health checks by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.httpsHealthChecks.get", - // "parameterOrder": [ - // "project", - // "httpsHealthCheck" - // ], - // "parameters": { - // "httpsHealthCheck": { - // "description": "Name of the HttpsHealthCheck resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}", - // "response": { - // "$ref": "HttpsHealthCheck" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.httpsHealthChecks.insert": - -type HttpsHealthChecksInsertCall struct { - s *Service - project string - httpshealthcheck *HttpsHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a HttpsHealthCheck resource in the specified project -// using the data included in the request. -func (r *HttpsHealthChecksService) Insert(project string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksInsertCall { - c := &HttpsHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpshealthcheck = httpshealthcheck - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *HttpsHealthChecksInsertCall) RequestId(requestId string) *HttpsHealthChecksInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpsHealthChecksInsertCall) Fields(s ...googleapi.Field) *HttpsHealthChecksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpsHealthChecksInsertCall) Context(ctx context.Context) *HttpsHealthChecksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpsHealthChecksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpshealthcheck) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HttpsHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a HttpsHealthCheck resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.httpsHealthChecks.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/httpsHealthChecks", - // "request": { - // "$ref": "HttpsHealthCheck" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.httpsHealthChecks.list": - -type HttpsHealthChecksListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of HttpsHealthCheck resources available to -// the specified project. -func (r *HttpsHealthChecksService) List(project string) *HttpsHealthChecksListCall { - c := &HttpsHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *HttpsHealthChecksListCall) Filter(filter string) *HttpsHealthChecksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *HttpsHealthChecksListCall) MaxResults(maxResults int64) *HttpsHealthChecksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *HttpsHealthChecksListCall) OrderBy(orderBy string) *HttpsHealthChecksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *HttpsHealthChecksListCall) PageToken(pageToken string) *HttpsHealthChecksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpsHealthChecksListCall) Fields(s ...googleapi.Field) *HttpsHealthChecksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *HttpsHealthChecksListCall) IfNoneMatch(entityTag string) *HttpsHealthChecksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpsHealthChecksListCall) Context(ctx context.Context) *HttpsHealthChecksListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpsHealthChecksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.list" call. -// Exactly one of *HttpsHealthCheckList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *HttpsHealthCheckList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *HttpsHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpsHealthCheckList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &HttpsHealthCheckList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of HttpsHealthCheck resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.httpsHealthChecks.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/httpsHealthChecks", - // "response": { - // "$ref": "HttpsHealthCheckList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *HttpsHealthChecksListCall) Pages(ctx context.Context, f func(*HttpsHealthCheckList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.httpsHealthChecks.patch": - -type HttpsHealthChecksPatchCall struct { - s *Service - project string - httpsHealthCheck string - httpshealthcheck *HttpsHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a HttpsHealthCheck resource in the specified project -// using the data included in the request. This method supports PATCH -// semantics and uses the JSON merge patch format and processing rules. -func (r *HttpsHealthChecksService) Patch(project string, httpsHealthCheck string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksPatchCall { - c := &HttpsHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpsHealthCheck = httpsHealthCheck - c.httpshealthcheck = httpshealthcheck - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *HttpsHealthChecksPatchCall) RequestId(requestId string) *HttpsHealthChecksPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpsHealthChecksPatchCall) Fields(s ...googleapi.Field) *HttpsHealthChecksPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpsHealthChecksPatchCall) Context(ctx context.Context) *HttpsHealthChecksPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpsHealthChecksPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpshealthcheck) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks/{httpsHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpsHealthCheck": c.httpsHealthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HttpsHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.httpsHealthChecks.patch", - // "parameterOrder": [ - // "project", - // "httpsHealthCheck" - // ], - // "parameters": { - // "httpsHealthCheck": { - // "description": "Name of the HttpsHealthCheck resource to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}", - // "request": { - // "$ref": "HttpsHealthCheck" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.httpsHealthChecks.testIamPermissions": - -type HttpsHealthChecksTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *HttpsHealthChecksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *HttpsHealthChecksTestIamPermissionsCall { - c := &HttpsHealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpsHealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *HttpsHealthChecksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpsHealthChecksTestIamPermissionsCall) Context(ctx context.Context) *HttpsHealthChecksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpsHealthChecksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *HttpsHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.httpsHealthChecks.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/httpsHealthChecks/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.httpsHealthChecks.update": - -type HttpsHealthChecksUpdateCall struct { - s *Service - project string - httpsHealthCheck string - httpshealthcheck *HttpsHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a HttpsHealthCheck resource in the specified project -// using the data included in the request. -func (r *HttpsHealthChecksService) Update(project string, httpsHealthCheck string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksUpdateCall { - c := &HttpsHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpsHealthCheck = httpsHealthCheck - c.httpshealthcheck = httpshealthcheck - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *HttpsHealthChecksUpdateCall) RequestId(requestId string) *HttpsHealthChecksUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpsHealthChecksUpdateCall) Fields(s ...googleapi.Field) *HttpsHealthChecksUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpsHealthChecksUpdateCall) Context(ctx context.Context) *HttpsHealthChecksUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpsHealthChecksUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpshealthcheck) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks/{httpsHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpsHealthCheck": c.httpsHealthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HttpsHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request.", - // "httpMethod": "PUT", - // "id": "compute.httpsHealthChecks.update", - // "parameterOrder": [ - // "project", - // "httpsHealthCheck" - // ], - // "parameters": { - // "httpsHealthCheck": { - // "description": "Name of the HttpsHealthCheck resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}", - // "request": { - // "$ref": "HttpsHealthCheck" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.images.delete": - -type ImagesDeleteCall struct { - s *Service - project string - image string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified image. -// For details, see https://cloud.google.com/compute/docs/reference/latest/images/delete -func (r *ImagesService) Delete(project string, image string) *ImagesDeleteCall { - c := &ImagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.image = image - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *ImagesDeleteCall) RequestId(requestId string) *ImagesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ImagesDeleteCall) Fields(s ...googleapi.Field) *ImagesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ImagesDeleteCall) Context(ctx context.Context) *ImagesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ImagesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{image}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "image": c.image, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ImagesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified image.", - // "httpMethod": "DELETE", - // "id": "compute.images.delete", - // "parameterOrder": [ - // "project", - // "image" - // ], - // "parameters": { - // "image": { - // "description": "Name of the image resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/images/{image}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.images.deprecate": - -type ImagesDeprecateCall struct { - s *Service - project string - image string - deprecationstatus *DeprecationStatus - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Deprecate: Sets the deprecation status of an image. -// -// If an empty request body is given, clears the deprecation status -// instead. -// For details, see https://cloud.google.com/compute/docs/reference/latest/images/deprecate -func (r *ImagesService) Deprecate(project string, image string, deprecationstatus *DeprecationStatus) *ImagesDeprecateCall { - c := &ImagesDeprecateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.image = image - c.deprecationstatus = deprecationstatus - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and then the request times out. If you make the request again with -// the same request ID, the server can check if original operation with -// the same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -func (c *ImagesDeprecateCall) RequestId(requestId string) *ImagesDeprecateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ImagesDeprecateCall) Fields(s ...googleapi.Field) *ImagesDeprecateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ImagesDeprecateCall) Context(ctx context.Context) *ImagesDeprecateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ImagesDeprecateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesDeprecateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.deprecationstatus) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{image}/deprecate") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "image": c.image, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.deprecate" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ImagesDeprecateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the deprecation status of an image.\n\nIf an empty request body is given, clears the deprecation status instead.", - // "httpMethod": "POST", - // "id": "compute.images.deprecate", - // "parameterOrder": [ - // "project", - // "image" - // ], - // "parameters": { - // "image": { - // "description": "Image name.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and then the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/images/{image}/deprecate", - // "request": { - // "$ref": "DeprecationStatus" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.images.get": - -type ImagesGetCall struct { - s *Service - project string - image string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified image. Get a list of available images by -// making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/images/get -func (r *ImagesService) Get(project string, image string) *ImagesGetCall { - c := &ImagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.image = image - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ImagesGetCall) Fields(s ...googleapi.Field) *ImagesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ImagesGetCall) IfNoneMatch(entityTag string) *ImagesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ImagesGetCall) Context(ctx context.Context) *ImagesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ImagesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{image}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "image": c.image, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.get" call. -// Exactly one of *Image or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Image.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ImagesGetCall) Do(opts ...googleapi.CallOption) (*Image, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Image{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified image. Get a list of available images by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.images.get", - // "parameterOrder": [ - // "project", - // "image" - // ], - // "parameters": { - // "image": { - // "description": "Name of the image resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/images/{image}", - // "response": { - // "$ref": "Image" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.images.getFromFamily": - -type ImagesGetFromFamilyCall struct { - s *Service - project string - family string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetFromFamily: Returns the latest image that is part of an image -// family and is not deprecated. -func (r *ImagesService) GetFromFamily(project string, family string) *ImagesGetFromFamilyCall { - c := &ImagesGetFromFamilyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.family = family - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ImagesGetFromFamilyCall) Fields(s ...googleapi.Field) *ImagesGetFromFamilyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ImagesGetFromFamilyCall) IfNoneMatch(entityTag string) *ImagesGetFromFamilyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ImagesGetFromFamilyCall) Context(ctx context.Context) *ImagesGetFromFamilyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ImagesGetFromFamilyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesGetFromFamilyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/family/{family}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "family": c.family, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.getFromFamily" call. -// Exactly one of *Image or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Image.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ImagesGetFromFamilyCall) Do(opts ...googleapi.CallOption) (*Image, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Image{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the latest image that is part of an image family and is not deprecated.", - // "httpMethod": "GET", - // "id": "compute.images.getFromFamily", - // "parameterOrder": [ - // "project", - // "family" - // ], - // "parameters": { - // "family": { - // "description": "Name of the image family to search for.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/images/family/{family}", - // "response": { - // "$ref": "Image" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.images.getIamPolicy": - -type ImagesGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. -func (r *ImagesService) GetIamPolicy(project string, resource string) *ImagesGetIamPolicyCall { - c := &ImagesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ImagesGetIamPolicyCall) Fields(s ...googleapi.Field) *ImagesGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ImagesGetIamPolicyCall) IfNoneMatch(entityTag string) *ImagesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ImagesGetIamPolicyCall) Context(ctx context.Context) *ImagesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ImagesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ImagesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - // "httpMethod": "GET", - // "id": "compute.images.getIamPolicy", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/images/{resource}/getIamPolicy", - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.images.insert": - -type ImagesInsertCall struct { - s *Service - project string - image *Image - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an image in the specified project using the data -// included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/images/insert -func (r *ImagesService) Insert(project string, image *Image) *ImagesInsertCall { - c := &ImagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.image = image - return c -} - -// ForceCreate sets the optional parameter "forceCreate": Force image -// creation if true. -func (c *ImagesInsertCall) ForceCreate(forceCreate bool) *ImagesInsertCall { - c.urlParams_.Set("forceCreate", fmt.Sprint(forceCreate)) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *ImagesInsertCall) RequestId(requestId string) *ImagesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ImagesInsertCall) Fields(s ...googleapi.Field) *ImagesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ImagesInsertCall) Context(ctx context.Context) *ImagesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ImagesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.image) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ImagesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates an image in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.images.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "forceCreate": { - // "description": "Force image creation if true.", - // "location": "query", - // "type": "boolean" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/images", - // "request": { - // "$ref": "Image" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "compute.images.list": - -type ImagesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of private images available to the specified -// project. Private images are images you create that belong to your -// project. This method does not get any images that belong to other -// projects, including publicly-available images, like Debian 8. If you -// want to get a list of publicly-available images, use this method to -// make a request to the respective image project, such as debian-cloud -// or windows-cloud. -// For details, see https://cloud.google.com/compute/docs/reference/latest/images/list -func (r *ImagesService) List(project string) *ImagesListCall { - c := &ImagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *ImagesListCall) Filter(filter string) *ImagesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *ImagesListCall) MaxResults(maxResults int64) *ImagesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *ImagesListCall) OrderBy(orderBy string) *ImagesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *ImagesListCall) PageToken(pageToken string) *ImagesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ImagesListCall) Fields(s ...googleapi.Field) *ImagesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ImagesListCall) IfNoneMatch(entityTag string) *ImagesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ImagesListCall) Context(ctx context.Context) *ImagesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ImagesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.list" call. -// Exactly one of *ImageList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *ImageList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ImagesListCall) Do(opts ...googleapi.CallOption) (*ImageList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ImageList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of private images available to the specified project. Private images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.", - // "httpMethod": "GET", - // "id": "compute.images.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/images", - // "response": { - // "$ref": "ImageList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ImagesListCall) Pages(ctx context.Context, f func(*ImageList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.images.setIamPolicy": - -type ImagesSetIamPolicyCall struct { - s *Service - project string - resource string - policy *Policy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. -func (r *ImagesService) SetIamPolicy(project string, resource string, policy *Policy) *ImagesSetIamPolicyCall { - c := &ImagesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.policy = policy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ImagesSetIamPolicyCall) Fields(s ...googleapi.Field) *ImagesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ImagesSetIamPolicyCall) Context(ctx context.Context) *ImagesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ImagesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{resource}/setIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ImagesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - // "httpMethod": "POST", - // "id": "compute.images.setIamPolicy", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/images/{resource}/setIamPolicy", - // "request": { - // "$ref": "Policy" - // }, - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.images.setLabels": - -type ImagesSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on an image. To learn more about labels, -// read the Labeling Resources documentation. -func (r *ImagesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *ImagesSetLabelsCall { - c := &ImagesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ImagesSetLabelsCall) Fields(s ...googleapi.Field) *ImagesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ImagesSetLabelsCall) Context(ctx context.Context) *ImagesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ImagesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetlabelsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{resource}/setLabels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.setLabels" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ImagesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.", - // "httpMethod": "POST", - // "id": "compute.images.setLabels", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/images/{resource}/setLabels", - // "request": { - // "$ref": "GlobalSetLabelsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.images.testIamPermissions": - -type ImagesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *ImagesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *ImagesTestIamPermissionsCall { - c := &ImagesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ImagesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ImagesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ImagesTestIamPermissionsCall) Context(ctx context.Context) *ImagesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ImagesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ImagesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.images.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/images/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.abandonInstances": - -type InstanceGroupManagersAbandonInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersabandoninstancesrequest *InstanceGroupManagersAbandonInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AbandonInstances: Schedules a group action to remove the specified -// instances from the managed instance group. Abandoning an instance -// does not delete the instance, but it does remove the instance from -// any target pools that are applied by the managed instance group. This -// method reduces the targetSize of the managed instance group by the -// number of instances that you abandon. This operation is marked as -// DONE when the action is scheduled even if the instances have not yet -// been removed from the group. You must separately verify the status of -// the abandoning action with the listmanagedinstances method. -// -// If the group is part of a backend service that has enabled connection -// draining, it can take up to 60 seconds after the connection draining -// duration has elapsed before the VM instance is removed or -// deleted. -// -// You can specify a maximum of 1000 instances with this method per -// request. -func (r *InstanceGroupManagersService) AbandonInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersabandoninstancesrequest *InstanceGroupManagersAbandonInstancesRequest) *InstanceGroupManagersAbandonInstancesCall { - c := &InstanceGroupManagersAbandonInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersabandoninstancesrequest = instancegroupmanagersabandoninstancesrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersAbandonInstancesCall) RequestId(requestId string) *InstanceGroupManagersAbandonInstancesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersAbandonInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersAbandonInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersAbandonInstancesCall) Context(ctx context.Context) *InstanceGroupManagersAbandonInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersAbandonInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersabandoninstancesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.abandonInstances" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersAbandonInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.abandonInstances", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", - // "request": { - // "$ref": "InstanceGroupManagersAbandonInstancesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.aggregatedList": - -type InstanceGroupManagersAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of managed instance groups and -// groups them by zone. -func (r *InstanceGroupManagersService) AggregatedList(project string) *InstanceGroupManagersAggregatedListCall { - c := &InstanceGroupManagersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *InstanceGroupManagersAggregatedListCall) Filter(filter string) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *InstanceGroupManagersAggregatedListCall) MaxResults(maxResults int64) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *InstanceGroupManagersAggregatedListCall) OrderBy(orderBy string) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *InstanceGroupManagersAggregatedListCall) PageToken(pageToken string) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersAggregatedListCall) Fields(s ...googleapi.Field) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstanceGroupManagersAggregatedListCall) IfNoneMatch(entityTag string) *InstanceGroupManagersAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersAggregatedListCall) Context(ctx context.Context) *InstanceGroupManagersAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/instanceGroupManagers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.aggregatedList" call. -// Exactly one of *InstanceGroupManagerAggregatedList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *InstanceGroupManagerAggregatedList.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *InstanceGroupManagersAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagerAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceGroupManagerAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of managed instance groups and groups them by zone.", - // "httpMethod": "GET", - // "id": "compute.instanceGroupManagers.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/instanceGroupManagers", - // "response": { - // "$ref": "InstanceGroupManagerAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstanceGroupManagersAggregatedListCall) Pages(ctx context.Context, f func(*InstanceGroupManagerAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.instanceGroupManagers.applyUpdatesToInstances": - -type InstanceGroupManagersApplyUpdatesToInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersapplyupdatesrequest *InstanceGroupManagersApplyUpdatesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ApplyUpdatesToInstances: Apply changes to selected instances on the -// managed instance group. This method can be used to apply new -// overrides and/or new versions. -func (r *InstanceGroupManagersService) ApplyUpdatesToInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersapplyupdatesrequest *InstanceGroupManagersApplyUpdatesRequest) *InstanceGroupManagersApplyUpdatesToInstancesCall { - c := &InstanceGroupManagersApplyUpdatesToInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersapplyupdatesrequest = instancegroupmanagersapplyupdatesrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersApplyUpdatesToInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) Context(ctx context.Context) *InstanceGroupManagersApplyUpdatesToInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersapplyupdatesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.applyUpdatesToInstances" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Apply changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.applyUpdatesToInstances", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group, should conform to RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located. Should conform to RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances", - // "request": { - // "$ref": "InstanceGroupManagersApplyUpdatesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.delete": - -type InstanceGroupManagersDeleteCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified managed instance group and all of the -// instances in that group. Note that the instance group must not belong -// to a backend service. Read Deleting an instance group for more -// information. -func (r *InstanceGroupManagersService) Delete(project string, zone string, instanceGroupManager string) *InstanceGroupManagersDeleteCall { - c := &InstanceGroupManagersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersDeleteCall) RequestId(requestId string) *InstanceGroupManagersDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersDeleteCall) Fields(s ...googleapi.Field) *InstanceGroupManagersDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersDeleteCall) Context(ctx context.Context) *InstanceGroupManagersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.", - // "httpMethod": "DELETE", - // "id": "compute.instanceGroupManagers.delete", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group to delete.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.deleteInstances": - -type InstanceGroupManagersDeleteInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersdeleteinstancesrequest *InstanceGroupManagersDeleteInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteInstances: Schedules a group action to delete the specified -// instances in the managed instance group. The instances are also -// removed from any target pools of which they were a member. This -// method reduces the targetSize of the managed instance group by the -// number of instances that you delete. This operation is marked as DONE -// when the action is scheduled even if the instances are still being -// deleted. You must separately verify the status of the deleting action -// with the listmanagedinstances method. -// -// If the group is part of a backend service that has enabled connection -// draining, it can take up to 60 seconds after the connection draining -// duration has elapsed before the VM instance is removed or -// deleted. -// -// You can specify a maximum of 1000 instances with this method per -// request. -func (r *InstanceGroupManagersService) DeleteInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersdeleteinstancesrequest *InstanceGroupManagersDeleteInstancesRequest) *InstanceGroupManagersDeleteInstancesCall { - c := &InstanceGroupManagersDeleteInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersdeleteinstancesrequest = instancegroupmanagersdeleteinstancesrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersDeleteInstancesCall) RequestId(requestId string) *InstanceGroupManagersDeleteInstancesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersDeleteInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersDeleteInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersDeleteInstancesCall) Context(ctx context.Context) *InstanceGroupManagersDeleteInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersDeleteInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersdeleteinstancesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.deleteInstances" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersDeleteInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.deleteInstances", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", - // "request": { - // "$ref": "InstanceGroupManagersDeleteInstancesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.deletePerInstanceConfigs": - -type InstanceGroupManagersDeletePerInstanceConfigsCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersdeleteperinstanceconfigsreq *InstanceGroupManagersDeletePerInstanceConfigsReq - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeletePerInstanceConfigs: Delete selected per-instance configs for -// the managed instance group. -func (r *InstanceGroupManagersService) DeletePerInstanceConfigs(project string, zone string, instanceGroupManager string, instancegroupmanagersdeleteperinstanceconfigsreq *InstanceGroupManagersDeletePerInstanceConfigsReq) *InstanceGroupManagersDeletePerInstanceConfigsCall { - c := &InstanceGroupManagersDeletePerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersdeleteperinstanceconfigsreq = instancegroupmanagersdeleteperinstanceconfigsreq - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersDeletePerInstanceConfigsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) Context(ctx context.Context) *InstanceGroupManagersDeletePerInstanceConfigsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersdeleteperinstanceconfigsreq) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deletePerInstanceConfigs") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.deletePerInstanceConfigs" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Delete selected per-instance configs for the managed instance group.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.deletePerInstanceConfigs", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group. It should conform to RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located. It should conform to RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deletePerInstanceConfigs", - // "request": { - // "$ref": "InstanceGroupManagersDeletePerInstanceConfigsReq" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.get": - -type InstanceGroupManagersGetCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns all of the details about the specified managed instance -// group. Get a list of available managed instance groups by making a -// list() request. -func (r *InstanceGroupManagersService) Get(project string, zone string, instanceGroupManager string) *InstanceGroupManagersGetCall { - c := &InstanceGroupManagersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersGetCall) Fields(s ...googleapi.Field) *InstanceGroupManagersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstanceGroupManagersGetCall) IfNoneMatch(entityTag string) *InstanceGroupManagersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersGetCall) Context(ctx context.Context) *InstanceGroupManagersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.get" call. -// Exactly one of *InstanceGroupManager or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstanceGroupManager.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceGroupManagersGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManager, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceGroupManager{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns all of the details about the specified managed instance group. Get a list of available managed instance groups by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.instanceGroupManagers.get", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - // "response": { - // "$ref": "InstanceGroupManager" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.insert": - -type InstanceGroupManagersInsertCall struct { - s *Service - project string - zone string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a managed instance group using the information that -// you specify in the request. After the group is created, it schedules -// an action to create instances in the group using the specified -// instance template. This operation is marked as DONE when the group is -// created even if the instances in the group have not yet been created. -// You must separately verify the status of the individual instances -// with the listmanagedinstances method. -// -// A managed instance group can have up to 1000 VM instances per group. -// Please contact Cloud Support if you need an increase in this limit. -func (r *InstanceGroupManagersService) Insert(project string, zone string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersInsertCall { - c := &InstanceGroupManagersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instancegroupmanager = instancegroupmanager - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersInsertCall) RequestId(requestId string) *InstanceGroupManagersInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersInsertCall) Fields(s ...googleapi.Field) *InstanceGroupManagersInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersInsertCall) Context(ctx context.Context) *InstanceGroupManagersInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.insert", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where you want to create the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers", - // "request": { - // "$ref": "InstanceGroupManager" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.list": - -type InstanceGroupManagersListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of managed instance groups that are contained -// within the specified project and zone. -func (r *InstanceGroupManagersService) List(project string, zone string) *InstanceGroupManagersListCall { - c := &InstanceGroupManagersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *InstanceGroupManagersListCall) Filter(filter string) *InstanceGroupManagersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *InstanceGroupManagersListCall) MaxResults(maxResults int64) *InstanceGroupManagersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *InstanceGroupManagersListCall) OrderBy(orderBy string) *InstanceGroupManagersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *InstanceGroupManagersListCall) PageToken(pageToken string) *InstanceGroupManagersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersListCall) Fields(s ...googleapi.Field) *InstanceGroupManagersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstanceGroupManagersListCall) IfNoneMatch(entityTag string) *InstanceGroupManagersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersListCall) Context(ctx context.Context) *InstanceGroupManagersListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.list" call. -// Exactly one of *InstanceGroupManagerList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupManagerList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceGroupManagersListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagerList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceGroupManagerList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of managed instance groups that are contained within the specified project and zone.", - // "httpMethod": "GET", - // "id": "compute.instanceGroupManagers.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers", - // "response": { - // "$ref": "InstanceGroupManagerList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstanceGroupManagersListCall) Pages(ctx context.Context, f func(*InstanceGroupManagerList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.instanceGroupManagers.listManagedInstances": - -type InstanceGroupManagersListManagedInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListManagedInstances: Lists all of the instances in the managed -// instance group. Each instance in the list has a currentAction, which -// indicates the action that the managed instance group is performing on -// the instance. For example, if the group is still creating an -// instance, the currentAction is CREATING. If a previous action failed, -// the list displays the errors for that failed action. -func (r *InstanceGroupManagersService) ListManagedInstances(project string, zone string, instanceGroupManager string) *InstanceGroupManagersListManagedInstancesCall { - c := &InstanceGroupManagersListManagedInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - return c -} - -// Filter sets the optional parameter "filter": -func (c *InstanceGroupManagersListManagedInstancesCall) Filter(filter string) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": -func (c *InstanceGroupManagersListManagedInstancesCall) MaxResults(maxResults int64) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "order_by": -func (c *InstanceGroupManagersListManagedInstancesCall) OrderBy(orderBy string) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("order_by", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": -func (c *InstanceGroupManagersListManagedInstancesCall) PageToken(pageToken string) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersListManagedInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersListManagedInstancesCall) Context(ctx context.Context) *InstanceGroupManagersListManagedInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersListManagedInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.listManagedInstances" call. -// Exactly one of *InstanceGroupManagersListManagedInstancesResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *InstanceGroupManagersListManagedInstancesResponse.ServerResponse.Head -// er or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *InstanceGroupManagersListManagedInstancesCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagersListManagedInstancesResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceGroupManagersListManagedInstancesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.listManagedInstances", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "filter": { - // "location": "query", - // "type": "string" - // }, - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "order_by": { - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", - // "response": { - // "$ref": "InstanceGroupManagersListManagedInstancesResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstanceGroupManagersListManagedInstancesCall) Pages(ctx context.Context, f func(*InstanceGroupManagersListManagedInstancesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.instanceGroupManagers.listPerInstanceConfigs": - -type InstanceGroupManagersListPerInstanceConfigsCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListPerInstanceConfigs: Lists all of the per-instance configs defined -// for the managed instance group. -func (r *InstanceGroupManagersService) ListPerInstanceConfigs(project string, zone string, instanceGroupManager string) *InstanceGroupManagersListPerInstanceConfigsCall { - c := &InstanceGroupManagersListPerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *InstanceGroupManagersListPerInstanceConfigsCall) Filter(filter string) *InstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *InstanceGroupManagersListPerInstanceConfigsCall) MaxResults(maxResults int64) *InstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *InstanceGroupManagersListPerInstanceConfigsCall) OrderBy(orderBy string) *InstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *InstanceGroupManagersListPerInstanceConfigsCall) PageToken(pageToken string) *InstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersListPerInstanceConfigsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersListPerInstanceConfigsCall) Context(ctx context.Context) *InstanceGroupManagersListPerInstanceConfigsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersListPerInstanceConfigsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersListPerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.listPerInstanceConfigs" call. -// Exactly one of *InstanceGroupManagersListPerInstanceConfigsResp or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *InstanceGroupManagersListPerInstanceConfigsResp.ServerResponse.Header -// or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *InstanceGroupManagersListPerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagersListPerInstanceConfigsResp, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceGroupManagersListPerInstanceConfigsResp{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists all of the per-instance configs defined for the managed instance group.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.listPerInstanceConfigs", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "instanceGroupManager": { - // "description": "The name of the managed instance group. It should conform to RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located. It should conform to RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs", - // "response": { - // "$ref": "InstanceGroupManagersListPerInstanceConfigsResp" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstanceGroupManagersListPerInstanceConfigsCall) Pages(ctx context.Context, f func(*InstanceGroupManagersListPerInstanceConfigsResp) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.instanceGroupManagers.patch": - -type InstanceGroupManagersPatchCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a managed instance group using the information that -// you specify in the request. This operation is marked as DONE when the -// group is patched even if the instances in the group are still in the -// process of being patched. You must separately verify the status of -// the individual instances with the listManagedInstances method. This -// method supports PATCH semantics and uses the JSON merge patch format -// and processing rules. -func (r *InstanceGroupManagersService) Patch(project string, zone string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersPatchCall { - c := &InstanceGroupManagersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanager = instancegroupmanager - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersPatchCall) RequestId(requestId string) *InstanceGroupManagersPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersPatchCall) Fields(s ...googleapi.Field) *InstanceGroupManagersPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersPatchCall) Context(ctx context.Context) *InstanceGroupManagersPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.instanceGroupManagers.patch", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the instance group manager.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where you want to create the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - // "request": { - // "$ref": "InstanceGroupManager" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.recreateInstances": - -type InstanceGroupManagersRecreateInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersrecreateinstancesrequest *InstanceGroupManagersRecreateInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RecreateInstances: Schedules a group action to recreate the specified -// instances in the managed instance group. The instances are deleted -// and recreated using the current instance template for the managed -// instance group. This operation is marked as DONE when the action is -// scheduled even if the instances have not yet been recreated. You must -// separately verify the status of the recreating action with the -// listmanagedinstances method. -// -// If the group is part of a backend service that has enabled connection -// draining, it can take up to 60 seconds after the connection draining -// duration has elapsed before the VM instance is removed or -// deleted. -// -// You can specify a maximum of 1000 instances with this method per -// request. -func (r *InstanceGroupManagersService) RecreateInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersrecreateinstancesrequest *InstanceGroupManagersRecreateInstancesRequest) *InstanceGroupManagersRecreateInstancesCall { - c := &InstanceGroupManagersRecreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersrecreateinstancesrequest = instancegroupmanagersrecreateinstancesrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersRecreateInstancesCall) RequestId(requestId string) *InstanceGroupManagersRecreateInstancesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersRecreateInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersRecreateInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersRecreateInstancesCall) Context(ctx context.Context) *InstanceGroupManagersRecreateInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersRecreateInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersrecreateinstancesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.recreateInstances" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.recreateInstances", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", - // "request": { - // "$ref": "InstanceGroupManagersRecreateInstancesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.resize": - -type InstanceGroupManagersResizeCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Resize: Resizes the managed instance group. If you increase the size, -// the group creates new instances using the current instance template. -// If you decrease the size, the group deletes instances. The resize -// operation is marked DONE when the resize actions are scheduled even -// if the group has not yet added or deleted any instances. You must -// separately verify the status of the creating or deleting actions with -// the listmanagedinstances method. -// -// If the group is part of a backend service that has enabled connection -// draining, it can take up to 60 seconds after the connection draining -// duration has elapsed before the VM instance is removed or deleted. -func (r *InstanceGroupManagersService) Resize(project string, zone string, instanceGroupManager string, size int64) *InstanceGroupManagersResizeCall { - c := &InstanceGroupManagersResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.urlParams_.Set("size", fmt.Sprint(size)) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersResizeCall) RequestId(requestId string) *InstanceGroupManagersResizeCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersResizeCall) Fields(s ...googleapi.Field) *InstanceGroupManagersResizeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersResizeCall) Context(ctx context.Context) *InstanceGroupManagersResizeCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersResizeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.resize" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.resize", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager", - // "size" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "size": { - // "description": "The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter.", - // "format": "int32", - // "location": "query", - // "required": true, - // "type": "integer" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.resizeAdvanced": - -type InstanceGroupManagersResizeAdvancedCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersresizeadvancedrequest *InstanceGroupManagersResizeAdvancedRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ResizeAdvanced: Resizes the managed instance group with advanced -// configuration options like disabling creation retries. This is an -// extended version of the resize method. -// -// If you increase the size of the instance group, the group creates new -// instances using the current instance template. If you decrease the -// size, the group deletes instances. The resize operation is marked -// DONE when the resize actions are scheduled even if the group has not -// yet added or deleted any instances. You must separately verify the -// status of the creating, creatingWithoutRetries, or deleting actions -// with the get or listmanagedinstances method. -// -// If the group is part of a backend service that has enabled connection -// draining, it can take up to 60 seconds after the connection draining -// duration has elapsed before the VM instance is removed or deleted. -func (r *InstanceGroupManagersService) ResizeAdvanced(project string, zone string, instanceGroupManager string, instancegroupmanagersresizeadvancedrequest *InstanceGroupManagersResizeAdvancedRequest) *InstanceGroupManagersResizeAdvancedCall { - c := &InstanceGroupManagersResizeAdvancedCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersresizeadvancedrequest = instancegroupmanagersresizeadvancedrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersResizeAdvancedCall) RequestId(requestId string) *InstanceGroupManagersResizeAdvancedCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersResizeAdvancedCall) Fields(s ...googleapi.Field) *InstanceGroupManagersResizeAdvancedCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersResizeAdvancedCall) Context(ctx context.Context) *InstanceGroupManagersResizeAdvancedCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersResizeAdvancedCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersResizeAdvancedCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersresizeadvancedrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.resizeAdvanced" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersResizeAdvancedCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method.\n\nIf you increase the size of the instance group, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating, creatingWithoutRetries, or deleting actions with the get or listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.resizeAdvanced", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced", - // "request": { - // "$ref": "InstanceGroupManagersResizeAdvancedRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.setAutoHealingPolicies": - -type InstanceGroupManagersSetAutoHealingPoliciesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagerssetautohealingrequest *InstanceGroupManagersSetAutoHealingRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetAutoHealingPolicies: Modifies the autohealing policies. -func (r *InstanceGroupManagersService) SetAutoHealingPolicies(project string, zone string, instanceGroupManager string, instancegroupmanagerssetautohealingrequest *InstanceGroupManagersSetAutoHealingRequest) *InstanceGroupManagersSetAutoHealingPoliciesCall { - c := &InstanceGroupManagersSetAutoHealingPoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagerssetautohealingrequest = instancegroupmanagerssetautohealingrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) RequestId(requestId string) *InstanceGroupManagersSetAutoHealingPoliciesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSetAutoHealingPoliciesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Context(ctx context.Context) *InstanceGroupManagersSetAutoHealingPoliciesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerssetautohealingrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.setAutoHealingPolicies" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Modifies the autohealing policies.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.setAutoHealingPolicies", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the instance group manager.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies", - // "request": { - // "$ref": "InstanceGroupManagersSetAutoHealingRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.setInstanceTemplate": - -type InstanceGroupManagersSetInstanceTemplateCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagerssetinstancetemplaterequest *InstanceGroupManagersSetInstanceTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetInstanceTemplate: Specifies the instance template to use when -// creating new instances in this group. The templates for existing -// instances in the group do not change unless you recreate them. -func (r *InstanceGroupManagersService) SetInstanceTemplate(project string, zone string, instanceGroupManager string, instancegroupmanagerssetinstancetemplaterequest *InstanceGroupManagersSetInstanceTemplateRequest) *InstanceGroupManagersSetInstanceTemplateCall { - c := &InstanceGroupManagersSetInstanceTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagerssetinstancetemplaterequest = instancegroupmanagerssetinstancetemplaterequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersSetInstanceTemplateCall) RequestId(requestId string) *InstanceGroupManagersSetInstanceTemplateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersSetInstanceTemplateCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSetInstanceTemplateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersSetInstanceTemplateCall) Context(ctx context.Context) *InstanceGroupManagersSetInstanceTemplateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersSetInstanceTemplateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerssetinstancetemplaterequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.setInstanceTemplate" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.setInstanceTemplate", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", - // "request": { - // "$ref": "InstanceGroupManagersSetInstanceTemplateRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.setTargetPools": - -type InstanceGroupManagersSetTargetPoolsCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagerssettargetpoolsrequest *InstanceGroupManagersSetTargetPoolsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetTargetPools: Modifies the target pools to which all instances in -// this managed instance group are assigned. The target pools -// automatically apply to all of the instances in the managed instance -// group. This operation is marked DONE when you make the request even -// if the instances have not yet been added to their target pools. The -// change might take some time to apply to all of the instances in the -// group depending on the size of the group. -func (r *InstanceGroupManagersService) SetTargetPools(project string, zone string, instanceGroupManager string, instancegroupmanagerssettargetpoolsrequest *InstanceGroupManagersSetTargetPoolsRequest) *InstanceGroupManagersSetTargetPoolsCall { - c := &InstanceGroupManagersSetTargetPoolsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagerssettargetpoolsrequest = instancegroupmanagerssettargetpoolsrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersSetTargetPoolsCall) RequestId(requestId string) *InstanceGroupManagersSetTargetPoolsCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersSetTargetPoolsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSetTargetPoolsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersSetTargetPoolsCall) Context(ctx context.Context) *InstanceGroupManagersSetTargetPoolsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersSetTargetPoolsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerssettargetpoolsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.setTargetPools" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.setTargetPools", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", - // "request": { - // "$ref": "InstanceGroupManagersSetTargetPoolsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.testIamPermissions": - -type InstanceGroupManagersTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *InstanceGroupManagersService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceGroupManagersTestIamPermissionsCall { - c := &InstanceGroupManagersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersTestIamPermissionsCall) Context(ctx context.Context) *InstanceGroupManagersTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceGroupManagersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.testIamPermissions", - // "parameterOrder": [ - // "project", - // "zone", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.update": - -type InstanceGroupManagersUpdateCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a managed instance group using the information that -// you specify in the request. This operation is marked as DONE when the -// group is updated even if the instances in the group have not yet been -// updated. You must separately verify the status of the individual -// instances with the listManagedInstances method. -func (r *InstanceGroupManagersService) Update(project string, zone string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersUpdateCall { - c := &InstanceGroupManagersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanager = instancegroupmanager - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersUpdateCall) RequestId(requestId string) *InstanceGroupManagersUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersUpdateCall) Fields(s ...googleapi.Field) *InstanceGroupManagersUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersUpdateCall) Context(ctx context.Context) *InstanceGroupManagersUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listManagedInstances method.", - // "httpMethod": "PUT", - // "id": "compute.instanceGroupManagers.update", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the instance group manager.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where you want to create the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - // "request": { - // "$ref": "InstanceGroupManager" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.updatePerInstanceConfigs": - -type InstanceGroupManagersUpdatePerInstanceConfigsCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersupdateperinstanceconfigsreq *InstanceGroupManagersUpdatePerInstanceConfigsReq - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdatePerInstanceConfigs: Insert or patch (for the ones that already -// exist) per-instance configs for the managed instance group. -// perInstanceConfig.instance serves as a key used to distinguish -// whether to perform insert or patch. -func (r *InstanceGroupManagersService) UpdatePerInstanceConfigs(project string, zone string, instanceGroupManager string, instancegroupmanagersupdateperinstanceconfigsreq *InstanceGroupManagersUpdatePerInstanceConfigsReq) *InstanceGroupManagersUpdatePerInstanceConfigsCall { - c := &InstanceGroupManagersUpdatePerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersupdateperinstanceconfigsreq = instancegroupmanagersupdateperinstanceconfigsreq - return c -} - -// RequestId sets the optional parameter "requestId": begin_interface: -// MixerMutationRequestBuilder Request ID to support idempotency. -func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) RequestId(requestId string) *InstanceGroupManagersUpdatePerInstanceConfigsCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersUpdatePerInstanceConfigsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Context(ctx context.Context) *InstanceGroupManagersUpdatePerInstanceConfigsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersupdateperinstanceconfigsreq) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.updatePerInstanceConfigs" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Insert or patch (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.updatePerInstanceConfigs", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group. It should conform to RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located. It should conform to RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs", - // "request": { - // "$ref": "InstanceGroupManagersUpdatePerInstanceConfigsReq" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroups.addInstances": - -type InstanceGroupsAddInstancesCall struct { - s *Service - project string - zone string - instanceGroup string - instancegroupsaddinstancesrequest *InstanceGroupsAddInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddInstances: Adds a list of instances to the specified instance -// group. All of the instances in the instance group must be in the same -// network/subnetwork. Read Adding instances for more information. -func (r *InstanceGroupsService) AddInstances(project string, zone string, instanceGroup string, instancegroupsaddinstancesrequest *InstanceGroupsAddInstancesRequest) *InstanceGroupsAddInstancesCall { - c := &InstanceGroupsAddInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - c.instancegroupsaddinstancesrequest = instancegroupsaddinstancesrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupsAddInstancesCall) RequestId(requestId string) *InstanceGroupsAddInstancesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupsAddInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsAddInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupsAddInstancesCall) Context(ctx context.Context) *InstanceGroupsAddInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupsAddInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsAddInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupsaddinstancesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.addInstances" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupsAddInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.", - // "httpMethod": "POST", - // "id": "compute.instanceGroups.addInstances", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroup" - // ], - // "parameters": { - // "instanceGroup": { - // "description": "The name of the instance group where you are adding instances.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances", - // "request": { - // "$ref": "InstanceGroupsAddInstancesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroups.aggregatedList": - -type InstanceGroupsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of instance groups and sorts them -// by zone. -func (r *InstanceGroupsService) AggregatedList(project string) *InstanceGroupsAggregatedListCall { - c := &InstanceGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *InstanceGroupsAggregatedListCall) Filter(filter string) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *InstanceGroupsAggregatedListCall) MaxResults(maxResults int64) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *InstanceGroupsAggregatedListCall) OrderBy(orderBy string) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *InstanceGroupsAggregatedListCall) PageToken(pageToken string) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupsAggregatedListCall) Fields(s ...googleapi.Field) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstanceGroupsAggregatedListCall) IfNoneMatch(entityTag string) *InstanceGroupsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupsAggregatedListCall) Context(ctx context.Context) *InstanceGroupsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/instanceGroups") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.aggregatedList" call. -// Exactly one of *InstanceGroupAggregatedList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupAggregatedList.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceGroupAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of instance groups and sorts them by zone.", - // "httpMethod": "GET", - // "id": "compute.instanceGroups.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/instanceGroups", - // "response": { - // "$ref": "InstanceGroupAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstanceGroupsAggregatedListCall) Pages(ctx context.Context, f func(*InstanceGroupAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.instanceGroups.delete": - -type InstanceGroupsDeleteCall struct { - s *Service - project string - zone string - instanceGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified instance group. The instances in the -// group are not deleted. Note that instance group must not belong to a -// backend service. Read Deleting an instance group for more -// information. -func (r *InstanceGroupsService) Delete(project string, zone string, instanceGroup string) *InstanceGroupsDeleteCall { - c := &InstanceGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupsDeleteCall) RequestId(requestId string) *InstanceGroupsDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupsDeleteCall) Fields(s ...googleapi.Field) *InstanceGroupsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupsDeleteCall) Context(ctx context.Context) *InstanceGroupsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.", - // "httpMethod": "DELETE", - // "id": "compute.instanceGroups.delete", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroup" - // ], - // "parameters": { - // "instanceGroup": { - // "description": "The name of the instance group to delete.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroups.get": - -type InstanceGroupsGetCall struct { - s *Service - project string - zone string - instanceGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified instance group. Get a list of available -// instance groups by making a list() request. -func (r *InstanceGroupsService) Get(project string, zone string, instanceGroup string) *InstanceGroupsGetCall { - c := &InstanceGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupsGetCall) Fields(s ...googleapi.Field) *InstanceGroupsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstanceGroupsGetCall) IfNoneMatch(entityTag string) *InstanceGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupsGetCall) Context(ctx context.Context) *InstanceGroupsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.get" call. -// Exactly one of *InstanceGroup or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *InstanceGroup.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroup, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceGroup{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified instance group. Get a list of available instance groups by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.instanceGroups.get", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroup" - // ], - // "parameters": { - // "instanceGroup": { - // "description": "The name of the instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}", - // "response": { - // "$ref": "InstanceGroup" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.instanceGroups.insert": - -type InstanceGroupsInsertCall struct { - s *Service - project string - zone string - instancegroup *InstanceGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an instance group in the specified project using the -// parameters that are included in the request. -func (r *InstanceGroupsService) Insert(project string, zone string, instancegroup *InstanceGroup) *InstanceGroupsInsertCall { - c := &InstanceGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instancegroup = instancegroup - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupsInsertCall) RequestId(requestId string) *InstanceGroupsInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupsInsertCall) Fields(s ...googleapi.Field) *InstanceGroupsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupsInsertCall) Context(ctx context.Context) *InstanceGroupsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroup) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates an instance group in the specified project using the parameters that are included in the request.", - // "httpMethod": "POST", - // "id": "compute.instanceGroups.insert", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where you want to create the instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroups", - // "request": { - // "$ref": "InstanceGroup" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroups.list": - -type InstanceGroupsListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of instance groups that are located in the -// specified project and zone. -func (r *InstanceGroupsService) List(project string, zone string) *InstanceGroupsListCall { - c := &InstanceGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *InstanceGroupsListCall) Filter(filter string) *InstanceGroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *InstanceGroupsListCall) MaxResults(maxResults int64) *InstanceGroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *InstanceGroupsListCall) OrderBy(orderBy string) *InstanceGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *InstanceGroupsListCall) PageToken(pageToken string) *InstanceGroupsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupsListCall) Fields(s ...googleapi.Field) *InstanceGroupsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstanceGroupsListCall) IfNoneMatch(entityTag string) *InstanceGroupsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupsListCall) Context(ctx context.Context) *InstanceGroupsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.list" call. -// Exactly one of *InstanceGroupList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstanceGroupList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceGroupList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of instance groups that are located in the specified project and zone.", - // "httpMethod": "GET", - // "id": "compute.instanceGroups.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroups", - // "response": { - // "$ref": "InstanceGroupList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstanceGroupsListCall) Pages(ctx context.Context, f func(*InstanceGroupList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.instanceGroups.listInstances": - -type InstanceGroupsListInstancesCall struct { - s *Service - project string - zone string - instanceGroup string - instancegroupslistinstancesrequest *InstanceGroupsListInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListInstances: Lists the instances in the specified instance group. -func (r *InstanceGroupsService) ListInstances(project string, zone string, instanceGroup string, instancegroupslistinstancesrequest *InstanceGroupsListInstancesRequest) *InstanceGroupsListInstancesCall { - c := &InstanceGroupsListInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - c.instancegroupslistinstancesrequest = instancegroupslistinstancesrequest - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *InstanceGroupsListInstancesCall) Filter(filter string) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *InstanceGroupsListInstancesCall) MaxResults(maxResults int64) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *InstanceGroupsListInstancesCall) OrderBy(orderBy string) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *InstanceGroupsListInstancesCall) PageToken(pageToken string) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupsListInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupsListInstancesCall) Context(ctx context.Context) *InstanceGroupsListInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupsListInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupslistinstancesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.listInstances" call. -// Exactly one of *InstanceGroupsListInstances or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupsListInstances.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) (*InstanceGroupsListInstances, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceGroupsListInstances{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists the instances in the specified instance group.", - // "httpMethod": "POST", - // "id": "compute.instanceGroups.listInstances", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroup" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "instanceGroup": { - // "description": "The name of the instance group from which you want to generate a list of included instances.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances", - // "request": { - // "$ref": "InstanceGroupsListInstancesRequest" - // }, - // "response": { - // "$ref": "InstanceGroupsListInstances" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstanceGroupsListInstancesCall) Pages(ctx context.Context, f func(*InstanceGroupsListInstances) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.instanceGroups.removeInstances": - -type InstanceGroupsRemoveInstancesCall struct { - s *Service - project string - zone string - instanceGroup string - instancegroupsremoveinstancesrequest *InstanceGroupsRemoveInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveInstances: Removes one or more instances from the specified -// instance group, but does not delete those instances. -// -// If the group is part of a backend service that has enabled connection -// draining, it can take up to 60 seconds after the connection draining -// duration before the VM instance is removed or deleted. -func (r *InstanceGroupsService) RemoveInstances(project string, zone string, instanceGroup string, instancegroupsremoveinstancesrequest *InstanceGroupsRemoveInstancesRequest) *InstanceGroupsRemoveInstancesCall { - c := &InstanceGroupsRemoveInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - c.instancegroupsremoveinstancesrequest = instancegroupsremoveinstancesrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupsRemoveInstancesCall) RequestId(requestId string) *InstanceGroupsRemoveInstancesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupsRemoveInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsRemoveInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupsRemoveInstancesCall) Context(ctx context.Context) *InstanceGroupsRemoveInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupsRemoveInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsRemoveInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupsremoveinstancesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.removeInstances" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupsRemoveInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Removes one or more instances from the specified instance group, but does not delete those instances.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted.", - // "httpMethod": "POST", - // "id": "compute.instanceGroups.removeInstances", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroup" - // ], - // "parameters": { - // "instanceGroup": { - // "description": "The name of the instance group where the specified instances will be removed.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances", - // "request": { - // "$ref": "InstanceGroupsRemoveInstancesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroups.setNamedPorts": - -type InstanceGroupsSetNamedPortsCall struct { - s *Service - project string - zone string - instanceGroup string - instancegroupssetnamedportsrequest *InstanceGroupsSetNamedPortsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetNamedPorts: Sets the named ports for the specified instance group. -func (r *InstanceGroupsService) SetNamedPorts(project string, zone string, instanceGroup string, instancegroupssetnamedportsrequest *InstanceGroupsSetNamedPortsRequest) *InstanceGroupsSetNamedPortsCall { - c := &InstanceGroupsSetNamedPortsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - c.instancegroupssetnamedportsrequest = instancegroupssetnamedportsrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupsSetNamedPortsCall) RequestId(requestId string) *InstanceGroupsSetNamedPortsCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupsSetNamedPortsCall) Fields(s ...googleapi.Field) *InstanceGroupsSetNamedPortsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupsSetNamedPortsCall) Context(ctx context.Context) *InstanceGroupsSetNamedPortsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupsSetNamedPortsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupssetnamedportsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.setNamedPorts" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the named ports for the specified instance group.", - // "httpMethod": "POST", - // "id": "compute.instanceGroups.setNamedPorts", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroup" - // ], - // "parameters": { - // "instanceGroup": { - // "description": "The name of the instance group where the named ports are updated.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts", - // "request": { - // "$ref": "InstanceGroupsSetNamedPortsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroups.testIamPermissions": - -type InstanceGroupsTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *InstanceGroupsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceGroupsTestIamPermissionsCall { - c := &InstanceGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstanceGroupsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupsTestIamPermissionsCall) Context(ctx context.Context) *InstanceGroupsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.instanceGroups.testIamPermissions", - // "parameterOrder": [ - // "project", - // "zone", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroups/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.instanceTemplates.delete": - -type InstanceTemplatesDeleteCall struct { - s *Service - project string - instanceTemplate string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified instance template. If you delete an -// instance template that is being referenced from another instance -// group, the instance group will not be able to create or recreate -// virtual machine instances. Deleting an instance template is permanent -// and cannot be undone. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/delete -func (r *InstanceTemplatesService) Delete(project string, instanceTemplate string) *InstanceTemplatesDeleteCall { - c := &InstanceTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instanceTemplate = instanceTemplate - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceTemplatesDeleteCall) RequestId(requestId string) *InstanceTemplatesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceTemplatesDeleteCall) Fields(s ...googleapi.Field) *InstanceTemplatesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceTemplatesDeleteCall) Context(ctx context.Context) *InstanceTemplatesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceTemplatesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates/{instanceTemplate}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instanceTemplate": c.instanceTemplate, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceTemplates.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified instance template. If you delete an instance template that is being referenced from another instance group, the instance group will not be able to create or recreate virtual machine instances. Deleting an instance template is permanent and cannot be undone.", - // "httpMethod": "DELETE", - // "id": "compute.instanceTemplates.delete", - // "parameterOrder": [ - // "project", - // "instanceTemplate" - // ], - // "parameters": { - // "instanceTemplate": { - // "description": "The name of the instance template to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/instanceTemplates/{instanceTemplate}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceTemplates.get": - -type InstanceTemplatesGetCall struct { - s *Service - project string - instanceTemplate string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified instance template. Get a list of available -// instance templates by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/get -func (r *InstanceTemplatesService) Get(project string, instanceTemplate string) *InstanceTemplatesGetCall { - c := &InstanceTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instanceTemplate = instanceTemplate - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceTemplatesGetCall) Fields(s ...googleapi.Field) *InstanceTemplatesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstanceTemplatesGetCall) IfNoneMatch(entityTag string) *InstanceTemplatesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceTemplatesGetCall) Context(ctx context.Context) *InstanceTemplatesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceTemplatesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceTemplatesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates/{instanceTemplate}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instanceTemplate": c.instanceTemplate, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceTemplates.get" call. -// Exactly one of *InstanceTemplate or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstanceTemplate.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*InstanceTemplate, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceTemplate{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified instance template. Get a list of available instance templates by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.instanceTemplates.get", - // "parameterOrder": [ - // "project", - // "instanceTemplate" - // ], - // "parameters": { - // "instanceTemplate": { - // "description": "The name of the instance template.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/instanceTemplates/{instanceTemplate}", - // "response": { - // "$ref": "InstanceTemplate" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.instanceTemplates.insert": - -type InstanceTemplatesInsertCall struct { - s *Service - project string - instancetemplate *InstanceTemplate - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an instance template in the specified project using -// the data that is included in the request. If you are creating a new -// template to update an existing instance group, your new instance -// template must use the same network or, if applicable, the same -// subnetwork as the original template. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/insert -func (r *InstanceTemplatesService) Insert(project string, instancetemplate *InstanceTemplate) *InstanceTemplatesInsertCall { - c := &InstanceTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instancetemplate = instancetemplate - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceTemplatesInsertCall) RequestId(requestId string) *InstanceTemplatesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceTemplatesInsertCall) Fields(s ...googleapi.Field) *InstanceTemplatesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceTemplatesInsertCall) Context(ctx context.Context) *InstanceTemplatesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceTemplatesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceTemplatesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancetemplate) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceTemplates.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.", - // "httpMethod": "POST", - // "id": "compute.instanceTemplates.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/instanceTemplates", - // "request": { - // "$ref": "InstanceTemplate" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceTemplates.list": - -type InstanceTemplatesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of instance templates that are contained -// within the specified project and zone. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/list -func (r *InstanceTemplatesService) List(project string) *InstanceTemplatesListCall { - c := &InstanceTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *InstanceTemplatesListCall) Filter(filter string) *InstanceTemplatesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *InstanceTemplatesListCall) MaxResults(maxResults int64) *InstanceTemplatesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *InstanceTemplatesListCall) OrderBy(orderBy string) *InstanceTemplatesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *InstanceTemplatesListCall) PageToken(pageToken string) *InstanceTemplatesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceTemplatesListCall) Fields(s ...googleapi.Field) *InstanceTemplatesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstanceTemplatesListCall) IfNoneMatch(entityTag string) *InstanceTemplatesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceTemplatesListCall) Context(ctx context.Context) *InstanceTemplatesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceTemplatesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceTemplatesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceTemplates.list" call. -// Exactly one of *InstanceTemplateList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstanceTemplateList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*InstanceTemplateList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceTemplateList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of instance templates that are contained within the specified project and zone.", - // "httpMethod": "GET", - // "id": "compute.instanceTemplates.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/instanceTemplates", - // "response": { - // "$ref": "InstanceTemplateList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstanceTemplatesListCall) Pages(ctx context.Context, f func(*InstanceTemplateList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.instanceTemplates.testIamPermissions": - -type InstanceTemplatesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *InstanceTemplatesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceTemplatesTestIamPermissionsCall { - c := &InstanceTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceTemplatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstanceTemplatesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceTemplatesTestIamPermissionsCall) Context(ctx context.Context) *InstanceTemplatesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceTemplatesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceTemplates.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.instanceTemplates.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/instanceTemplates/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.instances.addAccessConfig": - -type InstancesAddAccessConfigCall struct { - s *Service - project string - zone string - instance string - accessconfig *AccessConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddAccessConfig: Adds an access config to an instance's network -// interface. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/addAccessConfig -func (r *InstancesService) AddAccessConfig(project string, zone string, instance string, networkInterface string, accessconfig *AccessConfig) *InstancesAddAccessConfigCall { - c := &InstancesAddAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("networkInterface", networkInterface) - c.accessconfig = accessconfig - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesAddAccessConfigCall) RequestId(requestId string) *InstancesAddAccessConfigCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesAddAccessConfigCall) Fields(s ...googleapi.Field) *InstancesAddAccessConfigCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesAddAccessConfigCall) Context(ctx context.Context) *InstancesAddAccessConfigCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesAddAccessConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesAddAccessConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.accessconfig) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/addAccessConfig") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.addAccessConfig" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesAddAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Adds an access config to an instance's network interface.", - // "httpMethod": "POST", - // "id": "compute.instances.addAccessConfig", - // "parameterOrder": [ - // "project", - // "zone", - // "instance", - // "networkInterface" - // ], - // "parameters": { - // "instance": { - // "description": "The instance name for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "networkInterface": { - // "description": "The name of the network interface to add to this instance.", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/addAccessConfig", - // "request": { - // "$ref": "AccessConfig" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.aggregatedList": - -type InstancesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves aggregated list of instances. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/aggregatedList -func (r *InstancesService) AggregatedList(project string) *InstancesAggregatedListCall { - c := &InstancesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *InstancesAggregatedListCall) Filter(filter string) *InstancesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *InstancesAggregatedListCall) MaxResults(maxResults int64) *InstancesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *InstancesAggregatedListCall) OrderBy(orderBy string) *InstancesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *InstancesAggregatedListCall) PageToken(pageToken string) *InstancesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesAggregatedListCall) Fields(s ...googleapi.Field) *InstancesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstancesAggregatedListCall) IfNoneMatch(entityTag string) *InstancesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesAggregatedListCall) Context(ctx context.Context) *InstancesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/instances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.aggregatedList" call. -// Exactly one of *InstanceAggregatedList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstanceAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves aggregated list of instances.", - // "httpMethod": "GET", - // "id": "compute.instances.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/instances", - // "response": { - // "$ref": "InstanceAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstancesAggregatedListCall) Pages(ctx context.Context, f func(*InstanceAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.instances.attachDisk": - -type InstancesAttachDiskCall struct { - s *Service - project string - zone string - instance string - attacheddisk *AttachedDisk - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AttachDisk: Attaches an existing Disk resource to an instance. You -// must first create the disk before you can attach it. It is not -// possible to create and attach a disk at the same time. For more -// information, read Adding a persistent disk to your instance. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/attachDisk -func (r *InstancesService) AttachDisk(project string, zone string, instance string, attacheddisk *AttachedDisk) *InstancesAttachDiskCall { - c := &InstancesAttachDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.attacheddisk = attacheddisk - return c -} - -// ForceAttach sets the optional parameter "forceAttach": Whether to -// force attach the disk even if it's currently attached to another -// instance. This is only available for regional disks. -func (c *InstancesAttachDiskCall) ForceAttach(forceAttach bool) *InstancesAttachDiskCall { - c.urlParams_.Set("forceAttach", fmt.Sprint(forceAttach)) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesAttachDiskCall) RequestId(requestId string) *InstancesAttachDiskCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesAttachDiskCall) Fields(s ...googleapi.Field) *InstancesAttachDiskCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesAttachDiskCall) Context(ctx context.Context) *InstancesAttachDiskCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesAttachDiskCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesAttachDiskCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.attacheddisk) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/attachDisk") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.attachDisk" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesAttachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.", - // "httpMethod": "POST", - // "id": "compute.instances.attachDisk", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "forceAttach": { - // "description": "Whether to force attach the disk even if it's currently attached to another instance. This is only available for regional disks.", - // "location": "query", - // "type": "boolean" - // }, - // "instance": { - // "description": "The instance name for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/attachDisk", - // "request": { - // "$ref": "AttachedDisk" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.delete": - -type InstancesDeleteCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Instance resource. For more -// information, see Stopping or Deleting an Instance. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/delete -func (r *InstancesService) Delete(project string, zone string, instance string) *InstancesDeleteCall { - c := &InstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesDeleteCall) RequestId(requestId string) *InstancesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesDeleteCall) Fields(s ...googleapi.Field) *InstancesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesDeleteCall) Context(ctx context.Context) *InstancesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.", - // "httpMethod": "DELETE", - // "id": "compute.instances.delete", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.deleteAccessConfig": - -type InstancesDeleteAccessConfigCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteAccessConfig: Deletes an access config from an instance's -// network interface. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/deleteAccessConfig -func (r *InstancesService) DeleteAccessConfig(project string, zone string, instance string, accessConfig string, networkInterface string) *InstancesDeleteAccessConfigCall { - c := &InstancesDeleteAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("accessConfig", accessConfig) - c.urlParams_.Set("networkInterface", networkInterface) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesDeleteAccessConfigCall) RequestId(requestId string) *InstancesDeleteAccessConfigCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesDeleteAccessConfigCall) Fields(s ...googleapi.Field) *InstancesDeleteAccessConfigCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesDeleteAccessConfigCall) Context(ctx context.Context) *InstancesDeleteAccessConfigCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesDeleteAccessConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesDeleteAccessConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/deleteAccessConfig") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.deleteAccessConfig" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesDeleteAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes an access config from an instance's network interface.", - // "httpMethod": "POST", - // "id": "compute.instances.deleteAccessConfig", - // "parameterOrder": [ - // "project", - // "zone", - // "instance", - // "accessConfig", - // "networkInterface" - // ], - // "parameters": { - // "accessConfig": { - // "description": "The name of the access config to delete.", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "instance": { - // "description": "The instance name for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "networkInterface": { - // "description": "The name of the network interface.", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/deleteAccessConfig", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.detachDisk": - -type InstancesDetachDiskCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DetachDisk: Detaches a disk from an instance. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/detachDisk -func (r *InstancesService) DetachDisk(project string, zone string, instance string, deviceName string) *InstancesDetachDiskCall { - c := &InstancesDetachDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("deviceName", deviceName) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesDetachDiskCall) RequestId(requestId string) *InstancesDetachDiskCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesDetachDiskCall) Fields(s ...googleapi.Field) *InstancesDetachDiskCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesDetachDiskCall) Context(ctx context.Context) *InstancesDetachDiskCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesDetachDiskCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesDetachDiskCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/detachDisk") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.detachDisk" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesDetachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Detaches a disk from an instance.", - // "httpMethod": "POST", - // "id": "compute.instances.detachDisk", - // "parameterOrder": [ - // "project", - // "zone", - // "instance", - // "deviceName" - // ], - // "parameters": { - // "deviceName": { - // "description": "Disk device name to detach.", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "instance": { - // "description": "Instance name.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/detachDisk", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.get": - -type InstancesGetCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Instance resource. Get a list of available -// instances by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/get -func (r *InstancesService) Get(project string, zone string, instance string) *InstancesGetCall { - c := &InstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesGetCall) Fields(s ...googleapi.Field) *InstancesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstancesGetCall) IfNoneMatch(entityTag string) *InstancesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesGetCall) Context(ctx context.Context) *InstancesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.get" call. -// Exactly one of *Instance or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Instance.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Instance{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified Instance resource. Get a list of available instances by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.instances.get", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}", - // "response": { - // "$ref": "Instance" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.instances.getGuestAttributes": - -type InstancesGetGuestAttributesCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetGuestAttributes: Returns the specified guest attributes entry. -func (r *InstancesService) GetGuestAttributes(project string, zone string, instance string) *InstancesGetGuestAttributesCall { - c := &InstancesGetGuestAttributesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// VariableKey sets the optional parameter "variableKey": Specifies the -// key for the guest attributes entry. -func (c *InstancesGetGuestAttributesCall) VariableKey(variableKey string) *InstancesGetGuestAttributesCall { - c.urlParams_.Set("variableKey", variableKey) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesGetGuestAttributesCall) Fields(s ...googleapi.Field) *InstancesGetGuestAttributesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstancesGetGuestAttributesCall) IfNoneMatch(entityTag string) *InstancesGetGuestAttributesCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesGetGuestAttributesCall) Context(ctx context.Context) *InstancesGetGuestAttributesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesGetGuestAttributesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetGuestAttributesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/getGuestAttributes") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.getGuestAttributes" call. -// Exactly one of *GuestAttributes or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *GuestAttributes.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstancesGetGuestAttributesCall) Do(opts ...googleapi.CallOption) (*GuestAttributes, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &GuestAttributes{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified guest attributes entry.", - // "httpMethod": "GET", - // "id": "compute.instances.getGuestAttributes", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "variableKey": { - // "description": "Specifies the key for the guest attributes entry.", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/getGuestAttributes", - // "response": { - // "$ref": "GuestAttributes" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.instances.getIamPolicy": - -type InstancesGetIamPolicyCall struct { - s *Service - project string - zone string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. -func (r *InstancesService) GetIamPolicy(project string, zone string, resource string) *InstancesGetIamPolicyCall { - c := &InstancesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesGetIamPolicyCall) Fields(s ...googleapi.Field) *InstancesGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstancesGetIamPolicyCall) IfNoneMatch(entityTag string) *InstancesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesGetIamPolicyCall) Context(ctx context.Context) *InstancesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *InstancesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - // "httpMethod": "GET", - // "id": "compute.instances.getIamPolicy", - // "parameterOrder": [ - // "project", - // "zone", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{resource}/getIamPolicy", - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.instances.getSerialPortOutput": - -type InstancesGetSerialPortOutputCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetSerialPortOutput: Returns the specified instance's serial port -// output. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/getSerialPortOutput -func (r *InstancesService) GetSerialPortOutput(project string, zone string, instance string) *InstancesGetSerialPortOutputCall { - c := &InstancesGetSerialPortOutputCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// Port sets the optional parameter "port": Specifies which COM or -// serial port to retrieve data from. -func (c *InstancesGetSerialPortOutputCall) Port(port int64) *InstancesGetSerialPortOutputCall { - c.urlParams_.Set("port", fmt.Sprint(port)) - return c -} - -// Start sets the optional parameter "start": Returns output starting -// from a specific byte position. Use this to page through output when -// the output is too large to return in a single request. For the -// initial request, leave this field unspecified. For subsequent calls, -// this field should be set to the next value returned in the previous -// call. -func (c *InstancesGetSerialPortOutputCall) Start(start int64) *InstancesGetSerialPortOutputCall { - c.urlParams_.Set("start", fmt.Sprint(start)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesGetSerialPortOutputCall) Fields(s ...googleapi.Field) *InstancesGetSerialPortOutputCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstancesGetSerialPortOutputCall) IfNoneMatch(entityTag string) *InstancesGetSerialPortOutputCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesGetSerialPortOutputCall) Context(ctx context.Context) *InstancesGetSerialPortOutputCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesGetSerialPortOutputCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetSerialPortOutputCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/serialPort") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.getSerialPortOutput" call. -// Exactly one of *SerialPortOutput or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *SerialPortOutput.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstancesGetSerialPortOutputCall) Do(opts ...googleapi.CallOption) (*SerialPortOutput, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &SerialPortOutput{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified instance's serial port output.", - // "httpMethod": "GET", - // "id": "compute.instances.getSerialPortOutput", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "port": { - // "default": "1", - // "description": "Specifies which COM or serial port to retrieve data from.", - // "format": "int32", - // "location": "query", - // "maximum": "4", - // "minimum": "1", - // "type": "integer" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "start": { - // "description": "Returns output starting from a specific byte position. Use this to page through output when the output is too large to return in a single request. For the initial request, leave this field unspecified. For subsequent calls, this field should be set to the next value returned in the previous call.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/serialPort", - // "response": { - // "$ref": "SerialPortOutput" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.instances.insert": - -type InstancesInsertCall struct { - s *Service - project string - zone string - instance *Instance - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an instance resource in the specified project using -// the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/insert -func (r *InstancesService) Insert(project string, zone string, instance *Instance) *InstancesInsertCall { - c := &InstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesInsertCall) RequestId(requestId string) *InstancesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// SourceInstanceTemplate sets the optional parameter -// "sourceInstanceTemplate": Specifies instance template to create the -// instance. -// -// This field is optional. It can be a full or partial URL. For example, -// the following are all valid URLs to an instance template: -// - -// https://www.googleapis.com/compute/v1/projects/project/global/global/instanceTemplates/instanceTemplate -// - projects/project/global/global/instanceTemplates/instanceTemplate -// -// - global/instancesTemplates/instanceTemplate -func (c *InstancesInsertCall) SourceInstanceTemplate(sourceInstanceTemplate string) *InstancesInsertCall { - c.urlParams_.Set("sourceInstanceTemplate", sourceInstanceTemplate) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesInsertCall) Fields(s ...googleapi.Field) *InstancesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesInsertCall) Context(ctx context.Context) *InstancesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates an instance resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.instances.insert", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "sourceInstanceTemplate": { - // "description": "Specifies instance template to create the instance.\n\nThis field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: \n- https://www.googleapis.com/compute/v1/projects/project/global/global/instanceTemplates/instanceTemplate \n- projects/project/global/global/instanceTemplates/instanceTemplate \n- global/instancesTemplates/instanceTemplate", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances", - // "request": { - // "$ref": "Instance" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.list": - -type InstancesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of instances contained within the specified -// zone. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/list -func (r *InstancesService) List(project string, zone string) *InstancesListCall { - c := &InstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *InstancesListCall) Filter(filter string) *InstancesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *InstancesListCall) MaxResults(maxResults int64) *InstancesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *InstancesListCall) OrderBy(orderBy string) *InstancesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *InstancesListCall) PageToken(pageToken string) *InstancesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesListCall) Fields(s ...googleapi.Field) *InstancesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstancesListCall) IfNoneMatch(entityTag string) *InstancesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesListCall) Context(ctx context.Context) *InstancesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.list" call. -// Exactly one of *InstanceList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *InstanceList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstanceList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of instances contained within the specified zone.", - // "httpMethod": "GET", - // "id": "compute.instances.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances", - // "response": { - // "$ref": "InstanceList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstancesListCall) Pages(ctx context.Context, f func(*InstanceList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.instances.listReferrers": - -type InstancesListReferrersCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListReferrers: Retrieves the list of referrers to instances contained -// within the specified zone. -func (r *InstancesService) ListReferrers(project string, zone string, instance string) *InstancesListReferrersCall { - c := &InstancesListReferrersCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *InstancesListReferrersCall) Filter(filter string) *InstancesListReferrersCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *InstancesListReferrersCall) MaxResults(maxResults int64) *InstancesListReferrersCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *InstancesListReferrersCall) OrderBy(orderBy string) *InstancesListReferrersCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *InstancesListReferrersCall) PageToken(pageToken string) *InstancesListReferrersCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesListReferrersCall) Fields(s ...googleapi.Field) *InstancesListReferrersCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstancesListReferrersCall) IfNoneMatch(entityTag string) *InstancesListReferrersCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesListReferrersCall) Context(ctx context.Context) *InstancesListReferrersCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesListReferrersCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesListReferrersCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/referrers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.listReferrers" call. -// Exactly one of *InstanceListReferrers or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstanceListReferrers.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstancesListReferrersCall) Do(opts ...googleapi.CallOption) (*InstanceListReferrers, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceListReferrers{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of referrers to instances contained within the specified zone.", - // "httpMethod": "GET", - // "id": "compute.instances.listReferrers", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "instance": { - // "description": "Name of the target instance scoping this request, or '-' if the request should span over all instances in the container.", - // "location": "path", - // "pattern": "-|[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/referrers", - // "response": { - // "$ref": "InstanceListReferrers" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstancesListReferrersCall) Pages(ctx context.Context, f func(*InstanceListReferrers) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.instances.reset": - -type InstancesResetCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Reset: Performs a reset on the instance. For more information, see -// Resetting an instance. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/reset -func (r *InstancesService) Reset(project string, zone string, instance string) *InstancesResetCall { - c := &InstancesResetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesResetCall) RequestId(requestId string) *InstancesResetCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesResetCall) Fields(s ...googleapi.Field) *InstancesResetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesResetCall) Context(ctx context.Context) *InstancesResetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesResetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesResetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/reset") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.reset" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesResetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Performs a reset on the instance. For more information, see Resetting an instance.", - // "httpMethod": "POST", - // "id": "compute.instances.reset", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/reset", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.setDiskAutoDelete": - -type InstancesSetDiskAutoDeleteCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetDiskAutoDelete: Sets the auto-delete flag for a disk attached to -// an instance. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setDiskAutoDelete -func (r *InstancesService) SetDiskAutoDelete(project string, zone string, instance string, autoDelete bool, deviceName string) *InstancesSetDiskAutoDeleteCall { - c := &InstancesSetDiskAutoDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("autoDelete", fmt.Sprint(autoDelete)) - c.urlParams_.Set("deviceName", deviceName) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesSetDiskAutoDeleteCall) RequestId(requestId string) *InstancesSetDiskAutoDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesSetDiskAutoDeleteCall) Fields(s ...googleapi.Field) *InstancesSetDiskAutoDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesSetDiskAutoDeleteCall) Context(ctx context.Context) *InstancesSetDiskAutoDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesSetDiskAutoDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetDiskAutoDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setDiskAutoDelete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesSetDiskAutoDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the auto-delete flag for a disk attached to an instance.", - // "httpMethod": "POST", - // "id": "compute.instances.setDiskAutoDelete", - // "parameterOrder": [ - // "project", - // "zone", - // "instance", - // "autoDelete", - // "deviceName" - // ], - // "parameters": { - // "autoDelete": { - // "description": "Whether to auto-delete the disk when the instance is deleted.", - // "location": "query", - // "required": true, - // "type": "boolean" - // }, - // "deviceName": { - // "description": "The device name of the disk to modify.", - // "location": "query", - // "pattern": "\\w[\\w.-]{0,254}", - // "required": true, - // "type": "string" - // }, - // "instance": { - // "description": "The instance name.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.setIamPolicy": - -type InstancesSetIamPolicyCall struct { - s *Service - project string - zone string - resource string - policy *Policy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. -func (r *InstancesService) SetIamPolicy(project string, zone string, resource string, policy *Policy) *InstancesSetIamPolicyCall { - c := &InstancesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.policy = policy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesSetIamPolicyCall) Fields(s ...googleapi.Field) *InstancesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesSetIamPolicyCall) Context(ctx context.Context) *InstancesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{resource}/setIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *InstancesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - // "httpMethod": "POST", - // "id": "compute.instances.setIamPolicy", - // "parameterOrder": [ - // "project", - // "zone", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{resource}/setIamPolicy", - // "request": { - // "$ref": "Policy" - // }, - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.setLabels": - -type InstancesSetLabelsCall struct { - s *Service - project string - zone string - instance string - instancessetlabelsrequest *InstancesSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets labels on an instance. To learn more about labels, -// read the Labeling Resources documentation. -func (r *InstancesService) SetLabels(project string, zone string, instance string, instancessetlabelsrequest *InstancesSetLabelsRequest) *InstancesSetLabelsCall { - c := &InstancesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancessetlabelsrequest = instancessetlabelsrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesSetLabelsCall) RequestId(requestId string) *InstancesSetLabelsCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesSetLabelsCall) Fields(s ...googleapi.Field) *InstancesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesSetLabelsCall) Context(ctx context.Context) *InstancesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetlabelsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setLabels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setLabels" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.", - // "httpMethod": "POST", - // "id": "compute.instances.setLabels", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/setLabels", - // "request": { - // "$ref": "InstancesSetLabelsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.setMachineResources": - -type InstancesSetMachineResourcesCall struct { - s *Service - project string - zone string - instance string - instancessetmachineresourcesrequest *InstancesSetMachineResourcesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetMachineResources: Changes the number and/or type of accelerator -// for a stopped instance to the values specified in the request. -func (r *InstancesService) SetMachineResources(project string, zone string, instance string, instancessetmachineresourcesrequest *InstancesSetMachineResourcesRequest) *InstancesSetMachineResourcesCall { - c := &InstancesSetMachineResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancessetmachineresourcesrequest = instancessetmachineresourcesrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesSetMachineResourcesCall) RequestId(requestId string) *InstancesSetMachineResourcesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesSetMachineResourcesCall) Fields(s ...googleapi.Field) *InstancesSetMachineResourcesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesSetMachineResourcesCall) Context(ctx context.Context) *InstancesSetMachineResourcesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesSetMachineResourcesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetMachineResourcesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetmachineresourcesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setMachineResources") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setMachineResources" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesSetMachineResourcesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.", - // "httpMethod": "POST", - // "id": "compute.instances.setMachineResources", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/setMachineResources", - // "request": { - // "$ref": "InstancesSetMachineResourcesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.setMachineType": - -type InstancesSetMachineTypeCall struct { - s *Service - project string - zone string - instance string - instancessetmachinetyperequest *InstancesSetMachineTypeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetMachineType: Changes the machine type for a stopped instance to -// the machine type specified in the request. -func (r *InstancesService) SetMachineType(project string, zone string, instance string, instancessetmachinetyperequest *InstancesSetMachineTypeRequest) *InstancesSetMachineTypeCall { - c := &InstancesSetMachineTypeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancessetmachinetyperequest = instancessetmachinetyperequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesSetMachineTypeCall) RequestId(requestId string) *InstancesSetMachineTypeCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesSetMachineTypeCall) Fields(s ...googleapi.Field) *InstancesSetMachineTypeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesSetMachineTypeCall) Context(ctx context.Context) *InstancesSetMachineTypeCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesSetMachineTypeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetMachineTypeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetmachinetyperequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setMachineType") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setMachineType" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesSetMachineTypeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes the machine type for a stopped instance to the machine type specified in the request.", - // "httpMethod": "POST", - // "id": "compute.instances.setMachineType", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/setMachineType", - // "request": { - // "$ref": "InstancesSetMachineTypeRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.setMetadata": - -type InstancesSetMetadataCall struct { - s *Service - project string - zone string - instance string - metadata *Metadata - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetMetadata: Sets metadata for the specified instance to the data -// included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setMetadata -func (r *InstancesService) SetMetadata(project string, zone string, instance string, metadata *Metadata) *InstancesSetMetadataCall { - c := &InstancesSetMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.metadata = metadata - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesSetMetadataCall) RequestId(requestId string) *InstancesSetMetadataCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesSetMetadataCall) Fields(s ...googleapi.Field) *InstancesSetMetadataCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesSetMetadataCall) Context(ctx context.Context) *InstancesSetMetadataCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesSetMetadataCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetMetadataCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.metadata) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setMetadata") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setMetadata" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesSetMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets metadata for the specified instance to the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.instances.setMetadata", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/setMetadata", - // "request": { - // "$ref": "Metadata" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.setMinCpuPlatform": - -type InstancesSetMinCpuPlatformCall struct { - s *Service - project string - zone string - instance string - instancessetmincpuplatformrequest *InstancesSetMinCpuPlatformRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetMinCpuPlatform: Changes the minimum CPU platform that this -// instance should use. This method can only be called on a stopped -// instance. For more information, read Specifying a Minimum CPU -// Platform. -func (r *InstancesService) SetMinCpuPlatform(project string, zone string, instance string, instancessetmincpuplatformrequest *InstancesSetMinCpuPlatformRequest) *InstancesSetMinCpuPlatformCall { - c := &InstancesSetMinCpuPlatformCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancessetmincpuplatformrequest = instancessetmincpuplatformrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesSetMinCpuPlatformCall) RequestId(requestId string) *InstancesSetMinCpuPlatformCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesSetMinCpuPlatformCall) Fields(s ...googleapi.Field) *InstancesSetMinCpuPlatformCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesSetMinCpuPlatformCall) Context(ctx context.Context) *InstancesSetMinCpuPlatformCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesSetMinCpuPlatformCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetMinCpuPlatformCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetmincpuplatformrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setMinCpuPlatform" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesSetMinCpuPlatformCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.", - // "httpMethod": "POST", - // "id": "compute.instances.setMinCpuPlatform", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform", - // "request": { - // "$ref": "InstancesSetMinCpuPlatformRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.setScheduling": - -type InstancesSetSchedulingCall struct { - s *Service - project string - zone string - instance string - scheduling *Scheduling - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetScheduling: Sets an instance's scheduling options. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setScheduling -func (r *InstancesService) SetScheduling(project string, zone string, instance string, scheduling *Scheduling) *InstancesSetSchedulingCall { - c := &InstancesSetSchedulingCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.scheduling = scheduling - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesSetSchedulingCall) RequestId(requestId string) *InstancesSetSchedulingCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesSetSchedulingCall) Fields(s ...googleapi.Field) *InstancesSetSchedulingCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesSetSchedulingCall) Context(ctx context.Context) *InstancesSetSchedulingCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesSetSchedulingCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetSchedulingCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.scheduling) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setScheduling") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setScheduling" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesSetSchedulingCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets an instance's scheduling options.", - // "httpMethod": "POST", - // "id": "compute.instances.setScheduling", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Instance name.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/setScheduling", - // "request": { - // "$ref": "Scheduling" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.setServiceAccount": - -type InstancesSetServiceAccountCall struct { - s *Service - project string - zone string - instance string - instancessetserviceaccountrequest *InstancesSetServiceAccountRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetServiceAccount: Sets the service account on the instance. For more -// information, read Changing the service account and access scopes for -// an instance. -func (r *InstancesService) SetServiceAccount(project string, zone string, instance string, instancessetserviceaccountrequest *InstancesSetServiceAccountRequest) *InstancesSetServiceAccountCall { - c := &InstancesSetServiceAccountCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancessetserviceaccountrequest = instancessetserviceaccountrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesSetServiceAccountCall) RequestId(requestId string) *InstancesSetServiceAccountCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesSetServiceAccountCall) Fields(s ...googleapi.Field) *InstancesSetServiceAccountCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesSetServiceAccountCall) Context(ctx context.Context) *InstancesSetServiceAccountCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesSetServiceAccountCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetServiceAccountCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetserviceaccountrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setServiceAccount") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setServiceAccount" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesSetServiceAccountCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.", - // "httpMethod": "POST", - // "id": "compute.instances.setServiceAccount", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance resource to start.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/setServiceAccount", - // "request": { - // "$ref": "InstancesSetServiceAccountRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.setTags": - -type InstancesSetTagsCall struct { - s *Service - project string - zone string - instance string - tags *Tags - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetTags: Sets tags for the specified instance to the data included in -// the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setTags -func (r *InstancesService) SetTags(project string, zone string, instance string, tags *Tags) *InstancesSetTagsCall { - c := &InstancesSetTagsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.tags = tags - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesSetTagsCall) RequestId(requestId string) *InstancesSetTagsCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesSetTagsCall) Fields(s ...googleapi.Field) *InstancesSetTagsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesSetTagsCall) Context(ctx context.Context) *InstancesSetTagsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesSetTagsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetTagsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.tags) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setTags") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setTags" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesSetTagsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets tags for the specified instance to the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.instances.setTags", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/setTags", - // "request": { - // "$ref": "Tags" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.simulateMaintenanceEvent": - -type InstancesSimulateMaintenanceEventCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SimulateMaintenanceEvent: Simulates a maintenance event on the -// instance. -func (r *InstancesService) SimulateMaintenanceEvent(project string, zone string, instance string) *InstancesSimulateMaintenanceEventCall { - c := &InstancesSimulateMaintenanceEventCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesSimulateMaintenanceEventCall) Fields(s ...googleapi.Field) *InstancesSimulateMaintenanceEventCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesSimulateMaintenanceEventCall) Context(ctx context.Context) *InstancesSimulateMaintenanceEventCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesSimulateMaintenanceEventCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSimulateMaintenanceEventCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.simulateMaintenanceEvent" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesSimulateMaintenanceEventCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Simulates a maintenance event on the instance.", - // "httpMethod": "POST", - // "id": "compute.instances.simulateMaintenanceEvent", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.start": - -type InstancesStartCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Start: Starts an instance that was stopped using the using the -// instances().stop method. For more information, see Restart an -// instance. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/start -func (r *InstancesService) Start(project string, zone string, instance string) *InstancesStartCall { - c := &InstancesStartCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesStartCall) RequestId(requestId string) *InstancesStartCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesStartCall) Fields(s ...googleapi.Field) *InstancesStartCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesStartCall) Context(ctx context.Context) *InstancesStartCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesStartCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesStartCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/start") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.start" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.", - // "httpMethod": "POST", - // "id": "compute.instances.start", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance resource to start.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/start", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.startWithEncryptionKey": - -type InstancesStartWithEncryptionKeyCall struct { - s *Service - project string - zone string - instance string - instancesstartwithencryptionkeyrequest *InstancesStartWithEncryptionKeyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StartWithEncryptionKey: Starts an instance that was stopped using the -// using the instances().stop method. For more information, see Restart -// an instance. -func (r *InstancesService) StartWithEncryptionKey(project string, zone string, instance string, instancesstartwithencryptionkeyrequest *InstancesStartWithEncryptionKeyRequest) *InstancesStartWithEncryptionKeyCall { - c := &InstancesStartWithEncryptionKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancesstartwithencryptionkeyrequest = instancesstartwithencryptionkeyrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesStartWithEncryptionKeyCall) RequestId(requestId string) *InstancesStartWithEncryptionKeyCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesStartWithEncryptionKeyCall) Fields(s ...googleapi.Field) *InstancesStartWithEncryptionKeyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesStartWithEncryptionKeyCall) Context(ctx context.Context) *InstancesStartWithEncryptionKeyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesStartWithEncryptionKeyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesStartWithEncryptionKeyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesstartwithencryptionkeyrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.startWithEncryptionKey" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesStartWithEncryptionKeyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.", - // "httpMethod": "POST", - // "id": "compute.instances.startWithEncryptionKey", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance resource to start.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey", - // "request": { - // "$ref": "InstancesStartWithEncryptionKeyRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.stop": - -type InstancesStopCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Stop: Stops a running instance, shutting it down cleanly, and allows -// you to restart the instance at a later time. Stopped instances do not -// incur per-minute, virtual machine usage charges while they are -// stopped, but any resources that the virtual machine is using, such as -// persistent disks and static IP addresses, will continue to be charged -// until they are deleted. For more information, see Stopping an -// instance. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/stop -func (r *InstancesService) Stop(project string, zone string, instance string) *InstancesStopCall { - c := &InstancesStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// DiscardLocalSsd sets the optional parameter "discardLocalSsd": If -// true, discard the contents of any attached localSSD partitions. -// Default value is false (== preserve localSSD data). -func (c *InstancesStopCall) DiscardLocalSsd(discardLocalSsd bool) *InstancesStopCall { - c.urlParams_.Set("discardLocalSsd", fmt.Sprint(discardLocalSsd)) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesStopCall) RequestId(requestId string) *InstancesStopCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesStopCall) Fields(s ...googleapi.Field) *InstancesStopCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesStopCall) Context(ctx context.Context) *InstancesStopCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesStopCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesStopCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/stop") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.stop" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur per-minute, virtual machine usage charges while they are stopped, but any resources that the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.", - // "httpMethod": "POST", - // "id": "compute.instances.stop", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "discardLocalSsd": { - // "description": "If true, discard the contents of any attached localSSD partitions. Default value is false (== preserve localSSD data).", - // "location": "query", - // "type": "boolean" - // }, - // "instance": { - // "description": "Name of the instance resource to stop.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/stop", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.suspend": - -type InstancesSuspendCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Suspend: This method suspends a running instance, saving its state to -// persistent storage, and allows you to resume the instance at a later -// time. Suspended instances incur reduced per-minute, virtual machine -// usage charges while they are suspended. Any resources the virtual -// machine is using, such as persistent disks and static IP addresses, -// will continue to be charged until they are deleted. -func (r *InstancesService) Suspend(project string, zone string, instance string) *InstancesSuspendCall { - c := &InstancesSuspendCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// DiscardLocalSsd sets the optional parameter "discardLocalSsd": If -// true, discard the contents of any attached localSSD partitions. -// Default value is false (== preserve localSSD data). -func (c *InstancesSuspendCall) DiscardLocalSsd(discardLocalSsd bool) *InstancesSuspendCall { - c.urlParams_.Set("discardLocalSsd", fmt.Sprint(discardLocalSsd)) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesSuspendCall) RequestId(requestId string) *InstancesSuspendCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesSuspendCall) Fields(s ...googleapi.Field) *InstancesSuspendCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesSuspendCall) Context(ctx context.Context) *InstancesSuspendCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesSuspendCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSuspendCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/suspend") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.suspend" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesSuspendCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time. Suspended instances incur reduced per-minute, virtual machine usage charges while they are suspended. Any resources the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted.", - // "httpMethod": "POST", - // "id": "compute.instances.suspend", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "discardLocalSsd": { - // "description": "If true, discard the contents of any attached localSSD partitions. Default value is false (== preserve localSSD data).", - // "location": "query", - // "type": "boolean" - // }, - // "instance": { - // "description": "Name of the instance resource to suspend.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/suspend", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.testIamPermissions": - -type InstancesTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *InstancesService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstancesTestIamPermissionsCall { - c := &InstancesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstancesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesTestIamPermissionsCall) Context(ctx context.Context) *InstancesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.instances.testIamPermissions", - // "parameterOrder": [ - // "project", - // "zone", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.instances.updateAccessConfig": - -type InstancesUpdateAccessConfigCall struct { - s *Service - project string - zone string - instance string - accessconfig *AccessConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateAccessConfig: Updates the specified access config from an -// instance's network interface with the data included in the request. -// This method supports PATCH semantics and uses the JSON merge patch -// format and processing rules. -func (r *InstancesService) UpdateAccessConfig(project string, zone string, instance string, networkInterface string, accessconfig *AccessConfig) *InstancesUpdateAccessConfigCall { - c := &InstancesUpdateAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("networkInterface", networkInterface) - c.accessconfig = accessconfig - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesUpdateAccessConfigCall) RequestId(requestId string) *InstancesUpdateAccessConfigCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesUpdateAccessConfigCall) Fields(s ...googleapi.Field) *InstancesUpdateAccessConfigCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesUpdateAccessConfigCall) Context(ctx context.Context) *InstancesUpdateAccessConfigCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesUpdateAccessConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesUpdateAccessConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.accessconfig) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/updateAccessConfig") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.updateAccessConfig" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesUpdateAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "POST", - // "id": "compute.instances.updateAccessConfig", - // "parameterOrder": [ - // "project", - // "zone", - // "instance", - // "networkInterface" - // ], - // "parameters": { - // "instance": { - // "description": "The instance name for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "networkInterface": { - // "description": "The name of the network interface where the access config is attached.", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/updateAccessConfig", - // "request": { - // "$ref": "AccessConfig" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.updateNetworkInterface": - -type InstancesUpdateNetworkInterfaceCall struct { - s *Service - project string - zone string - instance string - networkinterface *NetworkInterface - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateNetworkInterface: Updates an instance's network interface. This -// method follows PATCH semantics. -func (r *InstancesService) UpdateNetworkInterface(project string, zone string, instance string, networkInterface string, networkinterface *NetworkInterface) *InstancesUpdateNetworkInterfaceCall { - c := &InstancesUpdateNetworkInterfaceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("networkInterface", networkInterface) - c.networkinterface = networkinterface - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesUpdateNetworkInterfaceCall) RequestId(requestId string) *InstancesUpdateNetworkInterfaceCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesUpdateNetworkInterfaceCall) Fields(s ...googleapi.Field) *InstancesUpdateNetworkInterfaceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesUpdateNetworkInterfaceCall) Context(ctx context.Context) *InstancesUpdateNetworkInterfaceCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesUpdateNetworkInterfaceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesUpdateNetworkInterfaceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.networkinterface) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/updateNetworkInterface") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.updateNetworkInterface" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesUpdateNetworkInterfaceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates an instance's network interface. This method follows PATCH semantics.", - // "httpMethod": "PATCH", - // "id": "compute.instances.updateNetworkInterface", - // "parameterOrder": [ - // "project", - // "zone", - // "instance", - // "networkInterface" - // ], - // "parameters": { - // "instance": { - // "description": "The instance name for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "networkInterface": { - // "description": "The name of the network interface to update.", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/updateNetworkInterface", - // "request": { - // "$ref": "NetworkInterface" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.interconnectAttachments.aggregatedList": - -type InterconnectAttachmentsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of interconnect -// attachments. -func (r *InterconnectAttachmentsService) AggregatedList(project string) *InterconnectAttachmentsAggregatedListCall { - c := &InterconnectAttachmentsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *InterconnectAttachmentsAggregatedListCall) Filter(filter string) *InterconnectAttachmentsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *InterconnectAttachmentsAggregatedListCall) MaxResults(maxResults int64) *InterconnectAttachmentsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *InterconnectAttachmentsAggregatedListCall) OrderBy(orderBy string) *InterconnectAttachmentsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *InterconnectAttachmentsAggregatedListCall) PageToken(pageToken string) *InterconnectAttachmentsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InterconnectAttachmentsAggregatedListCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InterconnectAttachmentsAggregatedListCall) IfNoneMatch(entityTag string) *InterconnectAttachmentsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InterconnectAttachmentsAggregatedListCall) Context(ctx context.Context) *InterconnectAttachmentsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InterconnectAttachmentsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/interconnectAttachments") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachments.aggregatedList" call. -// Exactly one of *InterconnectAttachmentAggregatedList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *InterconnectAttachmentAggregatedList.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *InterconnectAttachmentsAggregatedListCall) Do(opts ...googleapi.CallOption) (*InterconnectAttachmentAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InterconnectAttachmentAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of interconnect attachments.", - // "httpMethod": "GET", - // "id": "compute.interconnectAttachments.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/interconnectAttachments", - // "response": { - // "$ref": "InterconnectAttachmentAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InterconnectAttachmentsAggregatedListCall) Pages(ctx context.Context, f func(*InterconnectAttachmentAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.interconnectAttachments.delete": - -type InterconnectAttachmentsDeleteCall struct { - s *Service - project string - region string - interconnectAttachment string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified interconnect attachment. -func (r *InterconnectAttachmentsService) Delete(project string, region string, interconnectAttachment string) *InterconnectAttachmentsDeleteCall { - c := &InterconnectAttachmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.interconnectAttachment = interconnectAttachment - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InterconnectAttachmentsDeleteCall) RequestId(requestId string) *InterconnectAttachmentsDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InterconnectAttachmentsDeleteCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InterconnectAttachmentsDeleteCall) Context(ctx context.Context) *InterconnectAttachmentsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InterconnectAttachmentsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "interconnectAttachment": c.interconnectAttachment, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachments.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InterconnectAttachmentsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified interconnect attachment.", - // "httpMethod": "DELETE", - // "id": "compute.interconnectAttachments.delete", - // "parameterOrder": [ - // "project", - // "region", - // "interconnectAttachment" - // ], - // "parameters": { - // "interconnectAttachment": { - // "description": "Name of the interconnect attachment to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.interconnectAttachments.get": - -type InterconnectAttachmentsGetCall struct { - s *Service - project string - region string - interconnectAttachment string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified interconnect attachment. -func (r *InterconnectAttachmentsService) Get(project string, region string, interconnectAttachment string) *InterconnectAttachmentsGetCall { - c := &InterconnectAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.interconnectAttachment = interconnectAttachment - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InterconnectAttachmentsGetCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InterconnectAttachmentsGetCall) IfNoneMatch(entityTag string) *InterconnectAttachmentsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InterconnectAttachmentsGetCall) Context(ctx context.Context) *InterconnectAttachmentsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InterconnectAttachmentsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "interconnectAttachment": c.interconnectAttachment, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachments.get" call. -// Exactly one of *InterconnectAttachment or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InterconnectAttachment.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InterconnectAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*InterconnectAttachment, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InterconnectAttachment{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified interconnect attachment.", - // "httpMethod": "GET", - // "id": "compute.interconnectAttachments.get", - // "parameterOrder": [ - // "project", - // "region", - // "interconnectAttachment" - // ], - // "parameters": { - // "interconnectAttachment": { - // "description": "Name of the interconnect attachment to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", - // "response": { - // "$ref": "InterconnectAttachment" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.interconnectAttachments.getIamPolicy": - -type InterconnectAttachmentsGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. -func (r *InterconnectAttachmentsService) GetIamPolicy(project string, region string, resource string) *InterconnectAttachmentsGetIamPolicyCall { - c := &InterconnectAttachmentsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InterconnectAttachmentsGetIamPolicyCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InterconnectAttachmentsGetIamPolicyCall) IfNoneMatch(entityTag string) *InterconnectAttachmentsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InterconnectAttachmentsGetIamPolicyCall) Context(ctx context.Context) *InterconnectAttachmentsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InterconnectAttachmentsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/interconnectAttachments/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachments.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *InterconnectAttachmentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - // "httpMethod": "GET", - // "id": "compute.interconnectAttachments.getIamPolicy", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/interconnectAttachments/{resource}/getIamPolicy", - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.interconnectAttachments.insert": - -type InterconnectAttachmentsInsertCall struct { - s *Service - project string - region string - interconnectattachment *InterconnectAttachment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an InterconnectAttachment in the specified project -// using the data included in the request. -func (r *InterconnectAttachmentsService) Insert(project string, region string, interconnectattachment *InterconnectAttachment) *InterconnectAttachmentsInsertCall { - c := &InterconnectAttachmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.interconnectattachment = interconnectattachment - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InterconnectAttachmentsInsertCall) RequestId(requestId string) *InterconnectAttachmentsInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InterconnectAttachmentsInsertCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InterconnectAttachmentsInsertCall) Context(ctx context.Context) *InterconnectAttachmentsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InterconnectAttachmentsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.interconnectattachment) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/interconnectAttachments") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachments.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InterconnectAttachmentsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates an InterconnectAttachment in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.interconnectAttachments.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/interconnectAttachments", - // "request": { - // "$ref": "InterconnectAttachment" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.interconnectAttachments.list": - -type InterconnectAttachmentsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of interconnect attachments contained within -// the specified region. -func (r *InterconnectAttachmentsService) List(project string, region string) *InterconnectAttachmentsListCall { - c := &InterconnectAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *InterconnectAttachmentsListCall) Filter(filter string) *InterconnectAttachmentsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *InterconnectAttachmentsListCall) MaxResults(maxResults int64) *InterconnectAttachmentsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *InterconnectAttachmentsListCall) OrderBy(orderBy string) *InterconnectAttachmentsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *InterconnectAttachmentsListCall) PageToken(pageToken string) *InterconnectAttachmentsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InterconnectAttachmentsListCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InterconnectAttachmentsListCall) IfNoneMatch(entityTag string) *InterconnectAttachmentsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InterconnectAttachmentsListCall) Context(ctx context.Context) *InterconnectAttachmentsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InterconnectAttachmentsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/interconnectAttachments") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachments.list" call. -// Exactly one of *InterconnectAttachmentList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectAttachmentList.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InterconnectAttachmentsListCall) Do(opts ...googleapi.CallOption) (*InterconnectAttachmentList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InterconnectAttachmentList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of interconnect attachments contained within the specified region.", - // "httpMethod": "GET", - // "id": "compute.interconnectAttachments.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/interconnectAttachments", - // "response": { - // "$ref": "InterconnectAttachmentList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InterconnectAttachmentsListCall) Pages(ctx context.Context, f func(*InterconnectAttachmentList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.interconnectAttachments.testIamPermissions": - -type InterconnectAttachmentsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *InterconnectAttachmentsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *InterconnectAttachmentsTestIamPermissionsCall { - c := &InterconnectAttachmentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InterconnectAttachmentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InterconnectAttachmentsTestIamPermissionsCall) Context(ctx context.Context) *InterconnectAttachmentsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InterconnectAttachmentsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/interconnectAttachments/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachments.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InterconnectAttachmentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.interconnectAttachments.testIamPermissions", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/interconnectAttachments/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.interconnectLocations.get": - -type InterconnectLocationsGetCall struct { - s *Service - project string - interconnectLocation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the details for the specified interconnect location. Get -// a list of available interconnect locations by making a list() -// request. -func (r *InterconnectLocationsService) Get(project string, interconnectLocation string) *InterconnectLocationsGetCall { - c := &InterconnectLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnectLocation = interconnectLocation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InterconnectLocationsGetCall) Fields(s ...googleapi.Field) *InterconnectLocationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InterconnectLocationsGetCall) IfNoneMatch(entityTag string) *InterconnectLocationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InterconnectLocationsGetCall) Context(ctx context.Context) *InterconnectLocationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InterconnectLocationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectLocationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnectLocations/{interconnectLocation}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "interconnectLocation": c.interconnectLocation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectLocations.get" call. -// Exactly one of *InterconnectLocation or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InterconnectLocation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InterconnectLocationsGetCall) Do(opts ...googleapi.CallOption) (*InterconnectLocation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InterconnectLocation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the details for the specified interconnect location. Get a list of available interconnect locations by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.interconnectLocations.get", - // "parameterOrder": [ - // "project", - // "interconnectLocation" - // ], - // "parameters": { - // "interconnectLocation": { - // "description": "Name of the interconnect location to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/interconnectLocations/{interconnectLocation}", - // "response": { - // "$ref": "InterconnectLocation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.interconnectLocations.list": - -type InterconnectLocationsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of interconnect locations available to the -// specified project. -func (r *InterconnectLocationsService) List(project string) *InterconnectLocationsListCall { - c := &InterconnectLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *InterconnectLocationsListCall) Filter(filter string) *InterconnectLocationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *InterconnectLocationsListCall) MaxResults(maxResults int64) *InterconnectLocationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *InterconnectLocationsListCall) OrderBy(orderBy string) *InterconnectLocationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *InterconnectLocationsListCall) PageToken(pageToken string) *InterconnectLocationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InterconnectLocationsListCall) Fields(s ...googleapi.Field) *InterconnectLocationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InterconnectLocationsListCall) IfNoneMatch(entityTag string) *InterconnectLocationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InterconnectLocationsListCall) Context(ctx context.Context) *InterconnectLocationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InterconnectLocationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectLocationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnectLocations") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectLocations.list" call. -// Exactly one of *InterconnectLocationList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectLocationList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InterconnectLocationsListCall) Do(opts ...googleapi.CallOption) (*InterconnectLocationList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InterconnectLocationList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of interconnect locations available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.interconnectLocations.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/interconnectLocations", - // "response": { - // "$ref": "InterconnectLocationList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InterconnectLocationsListCall) Pages(ctx context.Context, f func(*InterconnectLocationList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.interconnectLocations.testIamPermissions": - -type InterconnectLocationsTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *InterconnectLocationsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *InterconnectLocationsTestIamPermissionsCall { - c := &InterconnectLocationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InterconnectLocationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *InterconnectLocationsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InterconnectLocationsTestIamPermissionsCall) Context(ctx context.Context) *InterconnectLocationsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InterconnectLocationsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectLocationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnectLocations/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectLocations.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InterconnectLocationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.interconnectLocations.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/interconnectLocations/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.interconnects.delete": - -type InterconnectsDeleteCall struct { - s *Service - project string - interconnect string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified interconnect. -func (r *InterconnectsService) Delete(project string, interconnect string) *InterconnectsDeleteCall { - c := &InterconnectsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnect = interconnect - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InterconnectsDeleteCall) RequestId(requestId string) *InterconnectsDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InterconnectsDeleteCall) Fields(s ...googleapi.Field) *InterconnectsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InterconnectsDeleteCall) Context(ctx context.Context) *InterconnectsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InterconnectsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnects/{interconnect}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "interconnect": c.interconnect, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnects.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InterconnectsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified interconnect.", - // "httpMethod": "DELETE", - // "id": "compute.interconnects.delete", - // "parameterOrder": [ - // "project", - // "interconnect" - // ], - // "parameters": { - // "interconnect": { - // "description": "Name of the interconnect to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/interconnects/{interconnect}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.interconnects.get": - -type InterconnectsGetCall struct { - s *Service - project string - interconnect string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified interconnect. Get a list of available -// interconnects by making a list() request. -func (r *InterconnectsService) Get(project string, interconnect string) *InterconnectsGetCall { - c := &InterconnectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnect = interconnect - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InterconnectsGetCall) Fields(s ...googleapi.Field) *InterconnectsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InterconnectsGetCall) IfNoneMatch(entityTag string) *InterconnectsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InterconnectsGetCall) Context(ctx context.Context) *InterconnectsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InterconnectsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnects/{interconnect}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "interconnect": c.interconnect, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnects.get" call. -// Exactly one of *Interconnect or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Interconnect.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InterconnectsGetCall) Do(opts ...googleapi.CallOption) (*Interconnect, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Interconnect{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified interconnect. Get a list of available interconnects by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.interconnects.get", - // "parameterOrder": [ - // "project", - // "interconnect" - // ], - // "parameters": { - // "interconnect": { - // "description": "Name of the interconnect to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/interconnects/{interconnect}", - // "response": { - // "$ref": "Interconnect" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.interconnects.insert": - -type InterconnectsInsertCall struct { - s *Service - project string - interconnect *Interconnect - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a Interconnect in the specified project using the -// data included in the request. -func (r *InterconnectsService) Insert(project string, interconnect *Interconnect) *InterconnectsInsertCall { - c := &InterconnectsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnect = interconnect - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InterconnectsInsertCall) RequestId(requestId string) *InterconnectsInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InterconnectsInsertCall) Fields(s ...googleapi.Field) *InterconnectsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InterconnectsInsertCall) Context(ctx context.Context) *InterconnectsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InterconnectsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.interconnect) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnects") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnects.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InterconnectsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a Interconnect in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.interconnects.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/interconnects", - // "request": { - // "$ref": "Interconnect" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.interconnects.list": - -type InterconnectsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of interconnect available to the specified -// project. -func (r *InterconnectsService) List(project string) *InterconnectsListCall { - c := &InterconnectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *InterconnectsListCall) Filter(filter string) *InterconnectsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *InterconnectsListCall) MaxResults(maxResults int64) *InterconnectsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *InterconnectsListCall) OrderBy(orderBy string) *InterconnectsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *InterconnectsListCall) PageToken(pageToken string) *InterconnectsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InterconnectsListCall) Fields(s ...googleapi.Field) *InterconnectsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InterconnectsListCall) IfNoneMatch(entityTag string) *InterconnectsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InterconnectsListCall) Context(ctx context.Context) *InterconnectsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InterconnectsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnects") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnects.list" call. -// Exactly one of *InterconnectList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InterconnectList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InterconnectsListCall) Do(opts ...googleapi.CallOption) (*InterconnectList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InterconnectList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of interconnect available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.interconnects.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/interconnects", - // "response": { - // "$ref": "InterconnectList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InterconnectsListCall) Pages(ctx context.Context, f func(*InterconnectList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.interconnects.patch": - -type InterconnectsPatchCall struct { - s *Service - project string - interconnect string - interconnect2 *Interconnect - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified interconnect with the data included in -// the request. This method supports PATCH semantics and uses the JSON -// merge patch format and processing rules. -func (r *InterconnectsService) Patch(project string, interconnect string, interconnect2 *Interconnect) *InterconnectsPatchCall { - c := &InterconnectsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnect = interconnect - c.interconnect2 = interconnect2 - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InterconnectsPatchCall) RequestId(requestId string) *InterconnectsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InterconnectsPatchCall) Fields(s ...googleapi.Field) *InterconnectsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InterconnectsPatchCall) Context(ctx context.Context) *InterconnectsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InterconnectsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.interconnect2) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnects/{interconnect}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "interconnect": c.interconnect, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnects.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InterconnectsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the specified interconnect with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.interconnects.patch", - // "parameterOrder": [ - // "project", - // "interconnect" - // ], - // "parameters": { - // "interconnect": { - // "description": "Name of the interconnect to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/interconnects/{interconnect}", - // "request": { - // "$ref": "Interconnect" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.interconnects.testIamPermissions": - -type InterconnectsTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *InterconnectsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *InterconnectsTestIamPermissionsCall { - c := &InterconnectsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InterconnectsTestIamPermissionsCall) Fields(s ...googleapi.Field) *InterconnectsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InterconnectsTestIamPermissionsCall) Context(ctx context.Context) *InterconnectsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InterconnectsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnects/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnects.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InterconnectsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.interconnects.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/interconnects/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.licenses.delete": - -type LicensesDeleteCall struct { - s *Service - project string - license string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified license. -func (r *LicensesService) Delete(project string, license string) *LicensesDeleteCall { - c := &LicensesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.license = license - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *LicensesDeleteCall) Fields(s ...googleapi.Field) *LicensesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *LicensesDeleteCall) Context(ctx context.Context) *LicensesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *LicensesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicensesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/licenses/{license}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "license": c.license, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.licenses.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *LicensesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified license.", - // "httpMethod": "DELETE", - // "id": "compute.licenses.delete", - // "parameterOrder": [ - // "project", - // "license" - // ], - // "parameters": { - // "license": { - // "description": "Name of the license resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/licenses/{license}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.licenses.get": - -type LicensesGetCall struct { - s *Service - project string - license string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified License resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/licenses/get -func (r *LicensesService) Get(project string, license string) *LicensesGetCall { - c := &LicensesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.license = license - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *LicensesGetCall) Fields(s ...googleapi.Field) *LicensesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *LicensesGetCall) IfNoneMatch(entityTag string) *LicensesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *LicensesGetCall) Context(ctx context.Context) *LicensesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *LicensesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicensesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/licenses/{license}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "license": c.license, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.licenses.get" call. -// Exactly one of *License or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *License.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *LicensesGetCall) Do(opts ...googleapi.CallOption) (*License, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &License{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified License resource.", - // "httpMethod": "GET", - // "id": "compute.licenses.get", - // "parameterOrder": [ - // "project", - // "license" - // ], - // "parameters": { - // "license": { - // "description": "Name of the License resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/licenses/{license}", - // "response": { - // "$ref": "License" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.licenses.getIamPolicy": - -type LicensesGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. -func (r *LicensesService) GetIamPolicy(project string, resource string) *LicensesGetIamPolicyCall { - c := &LicensesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *LicensesGetIamPolicyCall) Fields(s ...googleapi.Field) *LicensesGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *LicensesGetIamPolicyCall) IfNoneMatch(entityTag string) *LicensesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *LicensesGetIamPolicyCall) Context(ctx context.Context) *LicensesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *LicensesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicensesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/licenses/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.licenses.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *LicensesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - // "httpMethod": "GET", - // "id": "compute.licenses.getIamPolicy", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/licenses/{resource}/getIamPolicy", - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.licenses.insert": - -type LicensesInsertCall struct { - s *Service - project string - license *License - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Create a License resource in the specified project. -func (r *LicensesService) Insert(project string, license *License) *LicensesInsertCall { - c := &LicensesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.license = license - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *LicensesInsertCall) RequestId(requestId string) *LicensesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *LicensesInsertCall) Fields(s ...googleapi.Field) *LicensesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *LicensesInsertCall) Context(ctx context.Context) *LicensesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *LicensesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicensesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.license) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/licenses") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.licenses.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *LicensesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Create a License resource in the specified project.", - // "httpMethod": "POST", - // "id": "compute.licenses.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/licenses", - // "request": { - // "$ref": "License" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "compute.licenses.list": - -type LicensesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of licenses available in the specified -// project. This method does not get any licenses that belong to other -// projects, including licenses attached to publicly-available images, -// like Debian 8. If you want to get a list of publicly-available -// licenses, use this method to make a request to the respective image -// project, such as debian-cloud or windows-cloud. -func (r *LicensesService) List(project string) *LicensesListCall { - c := &LicensesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *LicensesListCall) Filter(filter string) *LicensesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *LicensesListCall) MaxResults(maxResults int64) *LicensesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *LicensesListCall) OrderBy(orderBy string) *LicensesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *LicensesListCall) PageToken(pageToken string) *LicensesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *LicensesListCall) Fields(s ...googleapi.Field) *LicensesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *LicensesListCall) IfNoneMatch(entityTag string) *LicensesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *LicensesListCall) Context(ctx context.Context) *LicensesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *LicensesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicensesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/licenses") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.licenses.list" call. -// Exactly one of *LicensesListResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *LicensesListResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *LicensesListCall) Do(opts ...googleapi.CallOption) (*LicensesListResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &LicensesListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of licenses available in the specified project. This method does not get any licenses that belong to other projects, including licenses attached to publicly-available images, like Debian 8. If you want to get a list of publicly-available licenses, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.", - // "httpMethod": "GET", - // "id": "compute.licenses.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/licenses", - // "response": { - // "$ref": "LicensesListResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *LicensesListCall) Pages(ctx context.Context, f func(*LicensesListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.licenses.setIamPolicy": - -type LicensesSetIamPolicyCall struct { - s *Service - project string - resource string - policy *Policy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. -func (r *LicensesService) SetIamPolicy(project string, resource string, policy *Policy) *LicensesSetIamPolicyCall { - c := &LicensesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.policy = policy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *LicensesSetIamPolicyCall) Fields(s ...googleapi.Field) *LicensesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *LicensesSetIamPolicyCall) Context(ctx context.Context) *LicensesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *LicensesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicensesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/licenses/{resource}/setIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.licenses.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *LicensesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - // "httpMethod": "POST", - // "id": "compute.licenses.setIamPolicy", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/licenses/{resource}/setIamPolicy", - // "request": { - // "$ref": "Policy" - // }, - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.licenses.testIamPermissions": - -type LicensesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *LicensesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *LicensesTestIamPermissionsCall { - c := &LicensesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *LicensesTestIamPermissionsCall) Fields(s ...googleapi.Field) *LicensesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *LicensesTestIamPermissionsCall) Context(ctx context.Context) *LicensesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *LicensesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicensesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/licenses/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.licenses.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *LicensesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.licenses.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/licenses/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.machineTypes.aggregatedList": - -type MachineTypesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of machine types. -// For details, see https://cloud.google.com/compute/docs/reference/latest/machineTypes/aggregatedList -func (r *MachineTypesService) AggregatedList(project string) *MachineTypesAggregatedListCall { - c := &MachineTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *MachineTypesAggregatedListCall) Filter(filter string) *MachineTypesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *MachineTypesAggregatedListCall) MaxResults(maxResults int64) *MachineTypesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *MachineTypesAggregatedListCall) OrderBy(orderBy string) *MachineTypesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *MachineTypesAggregatedListCall) PageToken(pageToken string) *MachineTypesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *MachineTypesAggregatedListCall) Fields(s ...googleapi.Field) *MachineTypesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *MachineTypesAggregatedListCall) IfNoneMatch(entityTag string) *MachineTypesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *MachineTypesAggregatedListCall) Context(ctx context.Context) *MachineTypesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *MachineTypesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MachineTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/machineTypes") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.machineTypes.aggregatedList" call. -// Exactly one of *MachineTypeAggregatedList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *MachineTypeAggregatedList.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *MachineTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*MachineTypeAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &MachineTypeAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of machine types.", - // "httpMethod": "GET", - // "id": "compute.machineTypes.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/machineTypes", - // "response": { - // "$ref": "MachineTypeAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *MachineTypesAggregatedListCall) Pages(ctx context.Context, f func(*MachineTypeAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.machineTypes.get": - -type MachineTypesGetCall struct { - s *Service - project string - zone string - machineType string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified machine type. Get a list of available -// machine types by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/machineTypes/get -func (r *MachineTypesService) Get(project string, zone string, machineType string) *MachineTypesGetCall { - c := &MachineTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.machineType = machineType - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *MachineTypesGetCall) Fields(s ...googleapi.Field) *MachineTypesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *MachineTypesGetCall) IfNoneMatch(entityTag string) *MachineTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *MachineTypesGetCall) Context(ctx context.Context) *MachineTypesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *MachineTypesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MachineTypesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/machineTypes/{machineType}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "machineType": c.machineType, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.machineTypes.get" call. -// Exactly one of *MachineType or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *MachineType.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *MachineTypesGetCall) Do(opts ...googleapi.CallOption) (*MachineType, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &MachineType{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified machine type. Get a list of available machine types by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.machineTypes.get", - // "parameterOrder": [ - // "project", - // "zone", - // "machineType" - // ], - // "parameters": { - // "machineType": { - // "description": "Name of the machine type to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/machineTypes/{machineType}", - // "response": { - // "$ref": "MachineType" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.machineTypes.list": - -type MachineTypesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of machine types available to the specified -// project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/machineTypes/list -func (r *MachineTypesService) List(project string, zone string) *MachineTypesListCall { - c := &MachineTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *MachineTypesListCall) Filter(filter string) *MachineTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *MachineTypesListCall) MaxResults(maxResults int64) *MachineTypesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *MachineTypesListCall) OrderBy(orderBy string) *MachineTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *MachineTypesListCall) PageToken(pageToken string) *MachineTypesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *MachineTypesListCall) Fields(s ...googleapi.Field) *MachineTypesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *MachineTypesListCall) IfNoneMatch(entityTag string) *MachineTypesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *MachineTypesListCall) Context(ctx context.Context) *MachineTypesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *MachineTypesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MachineTypesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/machineTypes") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.machineTypes.list" call. -// Exactly one of *MachineTypeList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *MachineTypeList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *MachineTypesListCall) Do(opts ...googleapi.CallOption) (*MachineTypeList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &MachineTypeList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of machine types available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.machineTypes.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/machineTypes", - // "response": { - // "$ref": "MachineTypeList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *MachineTypesListCall) Pages(ctx context.Context, f func(*MachineTypeList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.networks.addPeering": - -type NetworksAddPeeringCall struct { - s *Service - project string - network string - networksaddpeeringrequest *NetworksAddPeeringRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddPeering: Adds a peering to the specified network. -func (r *NetworksService) AddPeering(project string, network string, networksaddpeeringrequest *NetworksAddPeeringRequest) *NetworksAddPeeringCall { - c := &NetworksAddPeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - c.networksaddpeeringrequest = networksaddpeeringrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *NetworksAddPeeringCall) RequestId(requestId string) *NetworksAddPeeringCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *NetworksAddPeeringCall) Fields(s ...googleapi.Field) *NetworksAddPeeringCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *NetworksAddPeeringCall) Context(ctx context.Context) *NetworksAddPeeringCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *NetworksAddPeeringCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksAddPeeringCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.networksaddpeeringrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}/addPeering") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "network": c.network, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.addPeering" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NetworksAddPeeringCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Adds a peering to the specified network.", - // "httpMethod": "POST", - // "id": "compute.networks.addPeering", - // "parameterOrder": [ - // "project", - // "network" - // ], - // "parameters": { - // "network": { - // "description": "Name of the network resource to add peering to.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/networks/{network}/addPeering", - // "request": { - // "$ref": "NetworksAddPeeringRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.networks.delete": - -type NetworksDeleteCall struct { - s *Service - project string - network string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified network. -// For details, see https://cloud.google.com/compute/docs/reference/latest/networks/delete -func (r *NetworksService) Delete(project string, network string) *NetworksDeleteCall { - c := &NetworksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *NetworksDeleteCall) RequestId(requestId string) *NetworksDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *NetworksDeleteCall) Fields(s ...googleapi.Field) *NetworksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *NetworksDeleteCall) Context(ctx context.Context) *NetworksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *NetworksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "network": c.network, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NetworksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified network.", - // "httpMethod": "DELETE", - // "id": "compute.networks.delete", - // "parameterOrder": [ - // "project", - // "network" - // ], - // "parameters": { - // "network": { - // "description": "Name of the network to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/networks/{network}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.networks.get": - -type NetworksGetCall struct { - s *Service - project string - network string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified network. Get a list of available networks -// by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/networks/get -func (r *NetworksService) Get(project string, network string) *NetworksGetCall { - c := &NetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *NetworksGetCall) Fields(s ...googleapi.Field) *NetworksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *NetworksGetCall) IfNoneMatch(entityTag string) *NetworksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *NetworksGetCall) Context(ctx context.Context) *NetworksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *NetworksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "network": c.network, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.get" call. -// Exactly one of *Network or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Network.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *NetworksGetCall) Do(opts ...googleapi.CallOption) (*Network, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Network{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified network. Get a list of available networks by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.networks.get", - // "parameterOrder": [ - // "project", - // "network" - // ], - // "parameters": { - // "network": { - // "description": "Name of the network to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/networks/{network}", - // "response": { - // "$ref": "Network" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.networks.insert": - -type NetworksInsertCall struct { - s *Service - project string - network *Network - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a network in the specified project using the data -// included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/networks/insert -func (r *NetworksService) Insert(project string, network *Network) *NetworksInsertCall { - c := &NetworksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *NetworksInsertCall) RequestId(requestId string) *NetworksInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *NetworksInsertCall) Fields(s ...googleapi.Field) *NetworksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *NetworksInsertCall) Context(ctx context.Context) *NetworksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *NetworksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.network) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NetworksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a network in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.networks.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/networks", - // "request": { - // "$ref": "Network" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.networks.list": - -type NetworksListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of networks available to the specified -// project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/networks/list -func (r *NetworksService) List(project string) *NetworksListCall { - c := &NetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *NetworksListCall) Filter(filter string) *NetworksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *NetworksListCall) MaxResults(maxResults int64) *NetworksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *NetworksListCall) OrderBy(orderBy string) *NetworksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *NetworksListCall) PageToken(pageToken string) *NetworksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *NetworksListCall) Fields(s ...googleapi.Field) *NetworksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *NetworksListCall) IfNoneMatch(entityTag string) *NetworksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *NetworksListCall) Context(ctx context.Context) *NetworksListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *NetworksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.list" call. -// Exactly one of *NetworkList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *NetworkList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NetworksListCall) Do(opts ...googleapi.CallOption) (*NetworkList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &NetworkList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of networks available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.networks.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/networks", - // "response": { - // "$ref": "NetworkList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *NetworksListCall) Pages(ctx context.Context, f func(*NetworkList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.networks.listIpOwners": - -type NetworksListIpOwnersCall struct { - s *Service - project string - network string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListIpOwners: List the internal IP owners in the specified network. -func (r *NetworksService) ListIpOwners(project string, network string) *NetworksListIpOwnersCall { - c := &NetworksListIpOwnersCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *NetworksListIpOwnersCall) Filter(filter string) *NetworksListIpOwnersCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IpCidrRange sets the optional parameter "ipCidrRange": (Optional) IP -// CIDR range filter, example: "10.128.10.0/30". -func (c *NetworksListIpOwnersCall) IpCidrRange(ipCidrRange string) *NetworksListIpOwnersCall { - c.urlParams_.Set("ipCidrRange", ipCidrRange) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *NetworksListIpOwnersCall) MaxResults(maxResults int64) *NetworksListIpOwnersCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *NetworksListIpOwnersCall) OrderBy(orderBy string) *NetworksListIpOwnersCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// OwnerProjects sets the optional parameter "ownerProjects": (Optional) -// Project IDs filter, example: "project-1,project-2". -func (c *NetworksListIpOwnersCall) OwnerProjects(ownerProjects string) *NetworksListIpOwnersCall { - c.urlParams_.Set("ownerProjects", ownerProjects) - return c -} - -// OwnerTypes sets the optional parameter "ownerTypes": (Optional) Owner -// types filter, example: "instance,forwardingRule". -func (c *NetworksListIpOwnersCall) OwnerTypes(ownerTypes string) *NetworksListIpOwnersCall { - c.urlParams_.Set("ownerTypes", ownerTypes) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *NetworksListIpOwnersCall) PageToken(pageToken string) *NetworksListIpOwnersCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// SubnetName sets the optional parameter "subnetName": (Optional) -// Subnetwork name filter. -func (c *NetworksListIpOwnersCall) SubnetName(subnetName string) *NetworksListIpOwnersCall { - c.urlParams_.Set("subnetName", subnetName) - return c -} - -// SubnetRegion sets the optional parameter "subnetRegion": (Optional) -// Subnetwork region filter. -func (c *NetworksListIpOwnersCall) SubnetRegion(subnetRegion string) *NetworksListIpOwnersCall { - c.urlParams_.Set("subnetRegion", subnetRegion) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *NetworksListIpOwnersCall) Fields(s ...googleapi.Field) *NetworksListIpOwnersCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *NetworksListIpOwnersCall) IfNoneMatch(entityTag string) *NetworksListIpOwnersCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *NetworksListIpOwnersCall) Context(ctx context.Context) *NetworksListIpOwnersCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *NetworksListIpOwnersCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksListIpOwnersCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}/listIpOwners") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "network": c.network, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.listIpOwners" call. -// Exactly one of *IpOwnerList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *IpOwnerList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NetworksListIpOwnersCall) Do(opts ...googleapi.CallOption) (*IpOwnerList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &IpOwnerList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "List the internal IP owners in the specified network.", - // "httpMethod": "GET", - // "id": "compute.networks.listIpOwners", - // "parameterOrder": [ - // "project", - // "network" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "ipCidrRange": { - // "description": "(Optional) IP CIDR range filter, example: \"10.128.10.0/30\".", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "network": { - // "description": "Name of the network to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "ownerProjects": { - // "description": "(Optional) Project IDs filter, example: \"project-1,project-2\".", - // "location": "query", - // "type": "string" - // }, - // "ownerTypes": { - // "description": "(Optional) Owner types filter, example: \"instance,forwardingRule\".", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "subnetName": { - // "description": "(Optional) Subnetwork name filter.", - // "location": "query", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "type": "string" - // }, - // "subnetRegion": { - // "description": "(Optional) Subnetwork region filter.", - // "location": "query", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "type": "string" - // } - // }, - // "path": "{project}/global/networks/{network}/listIpOwners", - // "response": { - // "$ref": "IpOwnerList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *NetworksListIpOwnersCall) Pages(ctx context.Context, f func(*IpOwnerList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.networks.patch": - -type NetworksPatchCall struct { - s *Service - project string - network string - network2 *Network - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified network with the data included in the -// request. -func (r *NetworksService) Patch(project string, network string, network2 *Network) *NetworksPatchCall { - c := &NetworksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - c.network2 = network2 - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *NetworksPatchCall) RequestId(requestId string) *NetworksPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *NetworksPatchCall) Fields(s ...googleapi.Field) *NetworksPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *NetworksPatchCall) Context(ctx context.Context) *NetworksPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *NetworksPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.network2) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "network": c.network, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NetworksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Patches the specified network with the data included in the request.", - // "httpMethod": "PATCH", - // "id": "compute.networks.patch", - // "parameterOrder": [ - // "project", - // "network" - // ], - // "parameters": { - // "network": { - // "description": "Name of the network to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/networks/{network}", - // "request": { - // "$ref": "Network" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.networks.removePeering": - -type NetworksRemovePeeringCall struct { - s *Service - project string - network string - networksremovepeeringrequest *NetworksRemovePeeringRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemovePeering: Removes a peering from the specified network. -func (r *NetworksService) RemovePeering(project string, network string, networksremovepeeringrequest *NetworksRemovePeeringRequest) *NetworksRemovePeeringCall { - c := &NetworksRemovePeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - c.networksremovepeeringrequest = networksremovepeeringrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *NetworksRemovePeeringCall) RequestId(requestId string) *NetworksRemovePeeringCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *NetworksRemovePeeringCall) Fields(s ...googleapi.Field) *NetworksRemovePeeringCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *NetworksRemovePeeringCall) Context(ctx context.Context) *NetworksRemovePeeringCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *NetworksRemovePeeringCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksRemovePeeringCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.networksremovepeeringrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}/removePeering") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "network": c.network, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.removePeering" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NetworksRemovePeeringCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Removes a peering from the specified network.", - // "httpMethod": "POST", - // "id": "compute.networks.removePeering", - // "parameterOrder": [ - // "project", - // "network" - // ], - // "parameters": { - // "network": { - // "description": "Name of the network resource to remove peering from.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/networks/{network}/removePeering", - // "request": { - // "$ref": "NetworksRemovePeeringRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.networks.switchToCustomMode": - -type NetworksSwitchToCustomModeCall struct { - s *Service - project string - network string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SwitchToCustomMode: Switches the network mode from auto subnet mode -// to custom subnet mode. -func (r *NetworksService) SwitchToCustomMode(project string, network string) *NetworksSwitchToCustomModeCall { - c := &NetworksSwitchToCustomModeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *NetworksSwitchToCustomModeCall) RequestId(requestId string) *NetworksSwitchToCustomModeCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *NetworksSwitchToCustomModeCall) Fields(s ...googleapi.Field) *NetworksSwitchToCustomModeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *NetworksSwitchToCustomModeCall) Context(ctx context.Context) *NetworksSwitchToCustomModeCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *NetworksSwitchToCustomModeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksSwitchToCustomModeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}/switchToCustomMode") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "network": c.network, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.switchToCustomMode" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NetworksSwitchToCustomModeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Switches the network mode from auto subnet mode to custom subnet mode.", - // "httpMethod": "POST", - // "id": "compute.networks.switchToCustomMode", - // "parameterOrder": [ - // "project", - // "network" - // ], - // "parameters": { - // "network": { - // "description": "Name of the network to be updated.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/networks/{network}/switchToCustomMode", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.networks.testIamPermissions": - -type NetworksTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *NetworksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *NetworksTestIamPermissionsCall { - c := &NetworksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *NetworksTestIamPermissionsCall) Fields(s ...googleapi.Field) *NetworksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *NetworksTestIamPermissionsCall) Context(ctx context.Context) *NetworksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *NetworksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *NetworksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.networks.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/networks/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.projects.disableXpnHost": - -type ProjectsDisableXpnHostCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DisableXpnHost: Disable this project as a shared VPC host project. -func (r *ProjectsService) DisableXpnHost(project string) *ProjectsDisableXpnHostCall { - c := &ProjectsDisableXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *ProjectsDisableXpnHostCall) RequestId(requestId string) *ProjectsDisableXpnHostCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsDisableXpnHostCall) Fields(s ...googleapi.Field) *ProjectsDisableXpnHostCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsDisableXpnHostCall) Context(ctx context.Context) *ProjectsDisableXpnHostCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsDisableXpnHostCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsDisableXpnHostCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/disableXpnHost") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.disableXpnHost" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsDisableXpnHostCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Disable this project as a shared VPC host project.", - // "httpMethod": "POST", - // "id": "compute.projects.disableXpnHost", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/disableXpnHost", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.projects.disableXpnResource": - -type ProjectsDisableXpnResourceCall struct { - s *Service - project string - projectsdisablexpnresourcerequest *ProjectsDisableXpnResourceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DisableXpnResource: Disable a serivce resource (a.k.a service -// project) associated with this host project. -func (r *ProjectsService) DisableXpnResource(project string, projectsdisablexpnresourcerequest *ProjectsDisableXpnResourceRequest) *ProjectsDisableXpnResourceCall { - c := &ProjectsDisableXpnResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.projectsdisablexpnresourcerequest = projectsdisablexpnresourcerequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *ProjectsDisableXpnResourceCall) RequestId(requestId string) *ProjectsDisableXpnResourceCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsDisableXpnResourceCall) Fields(s ...googleapi.Field) *ProjectsDisableXpnResourceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsDisableXpnResourceCall) Context(ctx context.Context) *ProjectsDisableXpnResourceCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsDisableXpnResourceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsDisableXpnResourceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.projectsdisablexpnresourcerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/disableXpnResource") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.disableXpnResource" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsDisableXpnResourceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Disable a serivce resource (a.k.a service project) associated with this host project.", - // "httpMethod": "POST", - // "id": "compute.projects.disableXpnResource", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/disableXpnResource", - // "request": { - // "$ref": "ProjectsDisableXpnResourceRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.projects.enableXpnHost": - -type ProjectsEnableXpnHostCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// EnableXpnHost: Enable this project as a shared VPC host project. -func (r *ProjectsService) EnableXpnHost(project string) *ProjectsEnableXpnHostCall { - c := &ProjectsEnableXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *ProjectsEnableXpnHostCall) RequestId(requestId string) *ProjectsEnableXpnHostCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsEnableXpnHostCall) Fields(s ...googleapi.Field) *ProjectsEnableXpnHostCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsEnableXpnHostCall) Context(ctx context.Context) *ProjectsEnableXpnHostCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsEnableXpnHostCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsEnableXpnHostCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/enableXpnHost") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.enableXpnHost" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsEnableXpnHostCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Enable this project as a shared VPC host project.", - // "httpMethod": "POST", - // "id": "compute.projects.enableXpnHost", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/enableXpnHost", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.projects.enableXpnResource": - -type ProjectsEnableXpnResourceCall struct { - s *Service - project string - projectsenablexpnresourcerequest *ProjectsEnableXpnResourceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// EnableXpnResource: Enable service resource (a.k.a service project) -// for a host project, so that subnets in the host project can be used -// by instances in the service project. -func (r *ProjectsService) EnableXpnResource(project string, projectsenablexpnresourcerequest *ProjectsEnableXpnResourceRequest) *ProjectsEnableXpnResourceCall { - c := &ProjectsEnableXpnResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.projectsenablexpnresourcerequest = projectsenablexpnresourcerequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *ProjectsEnableXpnResourceCall) RequestId(requestId string) *ProjectsEnableXpnResourceCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsEnableXpnResourceCall) Fields(s ...googleapi.Field) *ProjectsEnableXpnResourceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsEnableXpnResourceCall) Context(ctx context.Context) *ProjectsEnableXpnResourceCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsEnableXpnResourceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsEnableXpnResourceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.projectsenablexpnresourcerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/enableXpnResource") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.enableXpnResource" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsEnableXpnResourceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.", - // "httpMethod": "POST", - // "id": "compute.projects.enableXpnResource", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/enableXpnResource", - // "request": { - // "$ref": "ProjectsEnableXpnResourceRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.projects.get": - -type ProjectsGetCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Project resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/projects/get -func (r *ProjectsService) Get(project string) *ProjectsGetCall { - c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.get" call. -// Exactly one of *Project or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Project.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Project{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified Project resource.", - // "httpMethod": "GET", - // "id": "compute.projects.get", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}", - // "response": { - // "$ref": "Project" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.projects.getXpnHost": - -type ProjectsGetXpnHostCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetXpnHost: Get the shared VPC host project that this project links -// to. May be empty if no link exists. -func (r *ProjectsService) GetXpnHost(project string) *ProjectsGetXpnHostCall { - c := &ProjectsGetXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsGetXpnHostCall) Fields(s ...googleapi.Field) *ProjectsGetXpnHostCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsGetXpnHostCall) IfNoneMatch(entityTag string) *ProjectsGetXpnHostCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsGetXpnHostCall) Context(ctx context.Context) *ProjectsGetXpnHostCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsGetXpnHostCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsGetXpnHostCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/getXpnHost") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.getXpnHost" call. -// Exactly one of *Project or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Project.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsGetXpnHostCall) Do(opts ...googleapi.CallOption) (*Project, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Project{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Get the shared VPC host project that this project links to. May be empty if no link exists.", - // "httpMethod": "GET", - // "id": "compute.projects.getXpnHost", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/getXpnHost", - // "response": { - // "$ref": "Project" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.projects.getXpnResources": - -type ProjectsGetXpnResourcesCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetXpnResources: Get service resources (a.k.a service project) -// associated with this host project. -func (r *ProjectsService) GetXpnResources(project string) *ProjectsGetXpnResourcesCall { - c := &ProjectsGetXpnResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": -func (c *ProjectsGetXpnResourcesCall) Filter(filter string) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": -func (c *ProjectsGetXpnResourcesCall) MaxResults(maxResults int64) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "order_by": -func (c *ProjectsGetXpnResourcesCall) OrderBy(orderBy string) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("order_by", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": -func (c *ProjectsGetXpnResourcesCall) PageToken(pageToken string) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsGetXpnResourcesCall) Fields(s ...googleapi.Field) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsGetXpnResourcesCall) IfNoneMatch(entityTag string) *ProjectsGetXpnResourcesCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsGetXpnResourcesCall) Context(ctx context.Context) *ProjectsGetXpnResourcesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsGetXpnResourcesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsGetXpnResourcesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/getXpnResources") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.getXpnResources" call. -// Exactly one of *ProjectsGetXpnResources or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ProjectsGetXpnResources.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsGetXpnResourcesCall) Do(opts ...googleapi.CallOption) (*ProjectsGetXpnResources, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ProjectsGetXpnResources{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Get service resources (a.k.a service project) associated with this host project.", - // "httpMethod": "GET", - // "id": "compute.projects.getXpnResources", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "order_by": { - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/getXpnResources", - // "response": { - // "$ref": "ProjectsGetXpnResources" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsGetXpnResourcesCall) Pages(ctx context.Context, f func(*ProjectsGetXpnResources) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.projects.listXpnHosts": - -type ProjectsListXpnHostsCall struct { - s *Service - project string - projectslistxpnhostsrequest *ProjectsListXpnHostsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListXpnHosts: List all shared VPC host projects visible to the user -// in an organization. -func (r *ProjectsService) ListXpnHosts(project string, projectslistxpnhostsrequest *ProjectsListXpnHostsRequest) *ProjectsListXpnHostsCall { - c := &ProjectsListXpnHostsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.projectslistxpnhostsrequest = projectslistxpnhostsrequest - return c -} - -// Filter sets the optional parameter "filter": -func (c *ProjectsListXpnHostsCall) Filter(filter string) *ProjectsListXpnHostsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": -func (c *ProjectsListXpnHostsCall) MaxResults(maxResults int64) *ProjectsListXpnHostsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "order_by": -func (c *ProjectsListXpnHostsCall) OrderBy(orderBy string) *ProjectsListXpnHostsCall { - c.urlParams_.Set("order_by", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": -func (c *ProjectsListXpnHostsCall) PageToken(pageToken string) *ProjectsListXpnHostsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsListXpnHostsCall) Fields(s ...googleapi.Field) *ProjectsListXpnHostsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsListXpnHostsCall) Context(ctx context.Context) *ProjectsListXpnHostsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsListXpnHostsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsListXpnHostsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.projectslistxpnhostsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/listXpnHosts") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.listXpnHosts" call. -// Exactly one of *XpnHostList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *XpnHostList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsListXpnHostsCall) Do(opts ...googleapi.CallOption) (*XpnHostList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &XpnHostList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "List all shared VPC host projects visible to the user in an organization.", - // "httpMethod": "POST", - // "id": "compute.projects.listXpnHosts", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "order_by": { - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/listXpnHosts", - // "request": { - // "$ref": "ProjectsListXpnHostsRequest" - // }, - // "response": { - // "$ref": "XpnHostList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsListXpnHostsCall) Pages(ctx context.Context, f func(*XpnHostList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.projects.moveDisk": - -type ProjectsMoveDiskCall struct { - s *Service - project string - diskmoverequest *DiskMoveRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// MoveDisk: Moves a persistent disk from one zone to another. -func (r *ProjectsService) MoveDisk(project string, diskmoverequest *DiskMoveRequest) *ProjectsMoveDiskCall { - c := &ProjectsMoveDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.diskmoverequest = diskmoverequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *ProjectsMoveDiskCall) RequestId(requestId string) *ProjectsMoveDiskCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsMoveDiskCall) Fields(s ...googleapi.Field) *ProjectsMoveDiskCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsMoveDiskCall) Context(ctx context.Context) *ProjectsMoveDiskCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsMoveDiskCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsMoveDiskCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.diskmoverequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/moveDisk") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.moveDisk" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsMoveDiskCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Moves a persistent disk from one zone to another.", - // "httpMethod": "POST", - // "id": "compute.projects.moveDisk", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/moveDisk", - // "request": { - // "$ref": "DiskMoveRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.projects.moveInstance": - -type ProjectsMoveInstanceCall struct { - s *Service - project string - instancemoverequest *InstanceMoveRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// MoveInstance: Moves an instance and its attached persistent disks -// from one zone to another. -func (r *ProjectsService) MoveInstance(project string, instancemoverequest *InstanceMoveRequest) *ProjectsMoveInstanceCall { - c := &ProjectsMoveInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instancemoverequest = instancemoverequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *ProjectsMoveInstanceCall) RequestId(requestId string) *ProjectsMoveInstanceCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsMoveInstanceCall) Fields(s ...googleapi.Field) *ProjectsMoveInstanceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsMoveInstanceCall) Context(ctx context.Context) *ProjectsMoveInstanceCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsMoveInstanceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsMoveInstanceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancemoverequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/moveInstance") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.moveInstance" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsMoveInstanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Moves an instance and its attached persistent disks from one zone to another.", - // "httpMethod": "POST", - // "id": "compute.projects.moveInstance", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/moveInstance", - // "request": { - // "$ref": "InstanceMoveRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.projects.setCommonInstanceMetadata": - -type ProjectsSetCommonInstanceMetadataCall struct { - s *Service - project string - metadata *Metadata - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetCommonInstanceMetadata: Sets metadata common to all instances -// within the specified project using the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/projects/setCommonInstanceMetadata -func (r *ProjectsService) SetCommonInstanceMetadata(project string, metadata *Metadata) *ProjectsSetCommonInstanceMetadataCall { - c := &ProjectsSetCommonInstanceMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.metadata = metadata - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *ProjectsSetCommonInstanceMetadataCall) RequestId(requestId string) *ProjectsSetCommonInstanceMetadataCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsSetCommonInstanceMetadataCall) Fields(s ...googleapi.Field) *ProjectsSetCommonInstanceMetadataCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsSetCommonInstanceMetadataCall) Context(ctx context.Context) *ProjectsSetCommonInstanceMetadataCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsSetCommonInstanceMetadataCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsSetCommonInstanceMetadataCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.metadata) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/setCommonInstanceMetadata") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.setCommonInstanceMetadata" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsSetCommonInstanceMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets metadata common to all instances within the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.projects.setCommonInstanceMetadata", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/setCommonInstanceMetadata", - // "request": { - // "$ref": "Metadata" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.projects.setDefaultServiceAccount": - -type ProjectsSetDefaultServiceAccountCall struct { - s *Service - project string - projectssetdefaultserviceaccountrequest *ProjectsSetDefaultServiceAccountRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetDefaultServiceAccount: Sets the default service account of the -// project. The default service account is used when a VM instance is -// created with the service account email address set to "default". -func (r *ProjectsService) SetDefaultServiceAccount(project string, projectssetdefaultserviceaccountrequest *ProjectsSetDefaultServiceAccountRequest) *ProjectsSetDefaultServiceAccountCall { - c := &ProjectsSetDefaultServiceAccountCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.projectssetdefaultserviceaccountrequest = projectssetdefaultserviceaccountrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *ProjectsSetDefaultServiceAccountCall) RequestId(requestId string) *ProjectsSetDefaultServiceAccountCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsSetDefaultServiceAccountCall) Fields(s ...googleapi.Field) *ProjectsSetDefaultServiceAccountCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsSetDefaultServiceAccountCall) Context(ctx context.Context) *ProjectsSetDefaultServiceAccountCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsSetDefaultServiceAccountCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsSetDefaultServiceAccountCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.projectssetdefaultserviceaccountrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/setDefaultServiceAccount") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.setDefaultServiceAccount" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsSetDefaultServiceAccountCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the default service account of the project. The default service account is used when a VM instance is created with the service account email address set to \"default\".", - // "httpMethod": "POST", - // "id": "compute.projects.setDefaultServiceAccount", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/setDefaultServiceAccount", - // "request": { - // "$ref": "ProjectsSetDefaultServiceAccountRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.projects.setUsageExportBucket": - -type ProjectsSetUsageExportBucketCall struct { - s *Service - project string - usageexportlocation *UsageExportLocation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetUsageExportBucket: Enables the usage export feature and sets the -// usage export bucket where reports are stored. If you provide an empty -// request body using this method, the usage export feature will be -// disabled. -// For details, see https://cloud.google.com/compute/docs/reference/latest/projects/setUsageExportBucket -func (r *ProjectsService) SetUsageExportBucket(project string, usageexportlocation *UsageExportLocation) *ProjectsSetUsageExportBucketCall { - c := &ProjectsSetUsageExportBucketCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.usageexportlocation = usageexportlocation - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *ProjectsSetUsageExportBucketCall) RequestId(requestId string) *ProjectsSetUsageExportBucketCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsSetUsageExportBucketCall) Fields(s ...googleapi.Field) *ProjectsSetUsageExportBucketCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsSetUsageExportBucketCall) Context(ctx context.Context) *ProjectsSetUsageExportBucketCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsSetUsageExportBucketCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsSetUsageExportBucketCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.usageexportlocation) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/setUsageExportBucket") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.setUsageExportBucket" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsSetUsageExportBucketCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.", - // "httpMethod": "POST", - // "id": "compute.projects.setUsageExportBucket", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/setUsageExportBucket", - // "request": { - // "$ref": "UsageExportLocation" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "compute.regionAutoscalers.delete": - -type RegionAutoscalersDeleteCall struct { - s *Service - project string - region string - autoscaler string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified autoscaler. -func (r *RegionAutoscalersService) Delete(project string, region string, autoscaler string) *RegionAutoscalersDeleteCall { - c := &RegionAutoscalersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.autoscaler = autoscaler - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionAutoscalersDeleteCall) RequestId(requestId string) *RegionAutoscalersDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionAutoscalersDeleteCall) Fields(s ...googleapi.Field) *RegionAutoscalersDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionAutoscalersDeleteCall) Context(ctx context.Context) *RegionAutoscalersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionAutoscalersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers/{autoscaler}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "autoscaler": c.autoscaler, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionAutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified autoscaler.", - // "httpMethod": "DELETE", - // "id": "compute.regionAutoscalers.delete", - // "parameterOrder": [ - // "project", - // "region", - // "autoscaler" - // ], - // "parameters": { - // "autoscaler": { - // "description": "Name of the autoscaler to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/autoscalers/{autoscaler}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionAutoscalers.get": - -type RegionAutoscalersGetCall struct { - s *Service - project string - region string - autoscaler string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified autoscaler. -func (r *RegionAutoscalersService) Get(project string, region string, autoscaler string) *RegionAutoscalersGetCall { - c := &RegionAutoscalersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.autoscaler = autoscaler - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionAutoscalersGetCall) Fields(s ...googleapi.Field) *RegionAutoscalersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionAutoscalersGetCall) IfNoneMatch(entityTag string) *RegionAutoscalersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionAutoscalersGetCall) Context(ctx context.Context) *RegionAutoscalersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionAutoscalersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers/{autoscaler}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "autoscaler": c.autoscaler, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.get" call. -// Exactly one of *Autoscaler or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Autoscaler.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionAutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Autoscaler{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified autoscaler.", - // "httpMethod": "GET", - // "id": "compute.regionAutoscalers.get", - // "parameterOrder": [ - // "project", - // "region", - // "autoscaler" - // ], - // "parameters": { - // "autoscaler": { - // "description": "Name of the autoscaler to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/autoscalers/{autoscaler}", - // "response": { - // "$ref": "Autoscaler" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionAutoscalers.insert": - -type RegionAutoscalersInsertCall struct { - s *Service - project string - region string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an autoscaler in the specified project using the data -// included in the request. -func (r *RegionAutoscalersService) Insert(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersInsertCall { - c := &RegionAutoscalersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.autoscaler = autoscaler - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionAutoscalersInsertCall) RequestId(requestId string) *RegionAutoscalersInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionAutoscalersInsertCall) Fields(s ...googleapi.Field) *RegionAutoscalersInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionAutoscalersInsertCall) Context(ctx context.Context) *RegionAutoscalersInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionAutoscalersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionAutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates an autoscaler in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.regionAutoscalers.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/autoscalers", - // "request": { - // "$ref": "Autoscaler" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionAutoscalers.list": - -type RegionAutoscalersListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of autoscalers contained within the specified -// region. -func (r *RegionAutoscalersService) List(project string, region string) *RegionAutoscalersListCall { - c := &RegionAutoscalersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RegionAutoscalersListCall) Filter(filter string) *RegionAutoscalersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RegionAutoscalersListCall) MaxResults(maxResults int64) *RegionAutoscalersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RegionAutoscalersListCall) OrderBy(orderBy string) *RegionAutoscalersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RegionAutoscalersListCall) PageToken(pageToken string) *RegionAutoscalersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionAutoscalersListCall) Fields(s ...googleapi.Field) *RegionAutoscalersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionAutoscalersListCall) IfNoneMatch(entityTag string) *RegionAutoscalersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionAutoscalersListCall) Context(ctx context.Context) *RegionAutoscalersListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionAutoscalersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.list" call. -// Exactly one of *RegionAutoscalerList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *RegionAutoscalerList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionAutoscalersListCall) Do(opts ...googleapi.CallOption) (*RegionAutoscalerList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RegionAutoscalerList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of autoscalers contained within the specified region.", - // "httpMethod": "GET", - // "id": "compute.regionAutoscalers.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/autoscalers", - // "response": { - // "$ref": "RegionAutoscalerList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionAutoscalersListCall) Pages(ctx context.Context, f func(*RegionAutoscalerList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.regionAutoscalers.patch": - -type RegionAutoscalersPatchCall struct { - s *Service - project string - region string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates an autoscaler in the specified project using the data -// included in the request. This method supports PATCH semantics and -// uses the JSON merge patch format and processing rules. -func (r *RegionAutoscalersService) Patch(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersPatchCall { - c := &RegionAutoscalersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.autoscaler = autoscaler - return c -} - -// Autoscaler sets the optional parameter "autoscaler": Name of the -// autoscaler to patch. -func (c *RegionAutoscalersPatchCall) Autoscaler(autoscaler string) *RegionAutoscalersPatchCall { - c.urlParams_.Set("autoscaler", autoscaler) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and then the request times out. If you make the request again with -// the same request ID, the server can check if original operation with -// the same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionAutoscalersPatchCall) RequestId(requestId string) *RegionAutoscalersPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionAutoscalersPatchCall) Fields(s ...googleapi.Field) *RegionAutoscalersPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionAutoscalersPatchCall) Context(ctx context.Context) *RegionAutoscalersPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionAutoscalersPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionAutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.regionAutoscalers.patch", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "autoscaler": { - // "description": "Name of the autoscaler to patch.", - // "location": "query", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and then the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/autoscalers", - // "request": { - // "$ref": "Autoscaler" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionAutoscalers.testIamPermissions": - -type RegionAutoscalersTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *RegionAutoscalersService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionAutoscalersTestIamPermissionsCall { - c := &RegionAutoscalersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionAutoscalersTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionAutoscalersTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionAutoscalersTestIamPermissionsCall) Context(ctx context.Context) *RegionAutoscalersTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionAutoscalersTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionAutoscalersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.regionAutoscalers.testIamPermissions", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/autoscalers/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionAutoscalers.update": - -type RegionAutoscalersUpdateCall struct { - s *Service - project string - region string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates an autoscaler in the specified project using the data -// included in the request. -func (r *RegionAutoscalersService) Update(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersUpdateCall { - c := &RegionAutoscalersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.autoscaler = autoscaler - return c -} - -// Autoscaler sets the optional parameter "autoscaler": Name of the -// autoscaler to update. -func (c *RegionAutoscalersUpdateCall) Autoscaler(autoscaler string) *RegionAutoscalersUpdateCall { - c.urlParams_.Set("autoscaler", autoscaler) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and then the request times out. If you make the request again with -// the same request ID, the server can check if original operation with -// the same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -func (c *RegionAutoscalersUpdateCall) RequestId(requestId string) *RegionAutoscalersUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionAutoscalersUpdateCall) Fields(s ...googleapi.Field) *RegionAutoscalersUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionAutoscalersUpdateCall) Context(ctx context.Context) *RegionAutoscalersUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionAutoscalersUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionAutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates an autoscaler in the specified project using the data included in the request.", - // "httpMethod": "PUT", - // "id": "compute.regionAutoscalers.update", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "autoscaler": { - // "description": "Name of the autoscaler to update.", - // "location": "query", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and then the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/autoscalers", - // "request": { - // "$ref": "Autoscaler" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionBackendServices.delete": - -type RegionBackendServicesDeleteCall struct { - s *Service - project string - region string - backendService string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified regional BackendService resource. -func (r *RegionBackendServicesService) Delete(project string, region string, backendService string) *RegionBackendServicesDeleteCall { - c := &RegionBackendServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionBackendServicesDeleteCall) RequestId(requestId string) *RegionBackendServicesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionBackendServicesDeleteCall) Fields(s ...googleapi.Field) *RegionBackendServicesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionBackendServicesDeleteCall) Context(ctx context.Context) *RegionBackendServicesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionBackendServicesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionBackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified regional BackendService resource.", - // "httpMethod": "DELETE", - // "id": "compute.regionBackendServices.delete", - // "parameterOrder": [ - // "project", - // "region", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/backendServices/{backendService}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionBackendServices.get": - -type RegionBackendServicesGetCall struct { - s *Service - project string - region string - backendService string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified regional BackendService resource. -func (r *RegionBackendServicesService) Get(project string, region string, backendService string) *RegionBackendServicesGetCall { - c := &RegionBackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionBackendServicesGetCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionBackendServicesGetCall) IfNoneMatch(entityTag string) *RegionBackendServicesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionBackendServicesGetCall) Context(ctx context.Context) *RegionBackendServicesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionBackendServicesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.get" call. -// Exactly one of *BackendService or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *BackendService.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionBackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendService, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &BackendService{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified regional BackendService resource.", - // "httpMethod": "GET", - // "id": "compute.regionBackendServices.get", - // "parameterOrder": [ - // "project", - // "region", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/backendServices/{backendService}", - // "response": { - // "$ref": "BackendService" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionBackendServices.getHealth": - -type RegionBackendServicesGetHealthCall struct { - s *Service - project string - region string - backendService string - resourcegroupreference *ResourceGroupReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetHealth: Gets the most recent health check results for this -// regional BackendService. -func (r *RegionBackendServicesService) GetHealth(project string, region string, backendService string, resourcegroupreference *ResourceGroupReference) *RegionBackendServicesGetHealthCall { - c := &RegionBackendServicesGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - c.resourcegroupreference = resourcegroupreference - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionBackendServicesGetHealthCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetHealthCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionBackendServicesGetHealthCall) Context(ctx context.Context) *RegionBackendServicesGetHealthCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionBackendServicesGetHealthCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesGetHealthCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourcegroupreference) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{backendService}/getHealth") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.getHealth" call. -// Exactly one of *BackendServiceGroupHealth or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *BackendServiceGroupHealth.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionBackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*BackendServiceGroupHealth, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &BackendServiceGroupHealth{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the most recent health check results for this regional BackendService.", - // "httpMethod": "POST", - // "id": "compute.regionBackendServices.getHealth", - // "parameterOrder": [ - // "project", - // "region", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to which the queried instance belongs.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/backendServices/{backendService}/getHealth", - // "request": { - // "$ref": "ResourceGroupReference" - // }, - // "response": { - // "$ref": "BackendServiceGroupHealth" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionBackendServices.insert": - -type RegionBackendServicesInsertCall struct { - s *Service - project string - region string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a regional BackendService resource in the specified -// project using the data included in the request. There are several -// restrictions and guidelines to keep in mind when creating a regional -// backend service. Read Restrictions and Guidelines for more -// information. -func (r *RegionBackendServicesService) Insert(project string, region string, backendservice *BackendService) *RegionBackendServicesInsertCall { - c := &RegionBackendServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendservice = backendservice - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionBackendServicesInsertCall) RequestId(requestId string) *RegionBackendServicesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionBackendServicesInsertCall) Fields(s ...googleapi.Field) *RegionBackendServicesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionBackendServicesInsertCall) Context(ctx context.Context) *RegionBackendServicesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionBackendServicesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionBackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a regional BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a regional backend service. Read Restrictions and Guidelines for more information.", - // "httpMethod": "POST", - // "id": "compute.regionBackendServices.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/backendServices", - // "request": { - // "$ref": "BackendService" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionBackendServices.list": - -type RegionBackendServicesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of regional BackendService resources -// available to the specified project in the given region. -func (r *RegionBackendServicesService) List(project string, region string) *RegionBackendServicesListCall { - c := &RegionBackendServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RegionBackendServicesListCall) Filter(filter string) *RegionBackendServicesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RegionBackendServicesListCall) MaxResults(maxResults int64) *RegionBackendServicesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RegionBackendServicesListCall) OrderBy(orderBy string) *RegionBackendServicesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RegionBackendServicesListCall) PageToken(pageToken string) *RegionBackendServicesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionBackendServicesListCall) Fields(s ...googleapi.Field) *RegionBackendServicesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionBackendServicesListCall) IfNoneMatch(entityTag string) *RegionBackendServicesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionBackendServicesListCall) Context(ctx context.Context) *RegionBackendServicesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionBackendServicesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.list" call. -// Exactly one of *BackendServiceList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *BackendServiceList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionBackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServiceList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &BackendServiceList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of regional BackendService resources available to the specified project in the given region.", - // "httpMethod": "GET", - // "id": "compute.regionBackendServices.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/backendServices", - // "response": { - // "$ref": "BackendServiceList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionBackendServicesListCall) Pages(ctx context.Context, f func(*BackendServiceList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.regionBackendServices.patch": - -type RegionBackendServicesPatchCall struct { - s *Service - project string - region string - backendService string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified regional BackendService resource with -// the data included in the request. There are several restrictions and -// guidelines to keep in mind when updating a backend service. Read -// Restrictions and Guidelines for more information. This method -// supports PATCH semantics and uses the JSON merge patch format and -// processing rules. -func (r *RegionBackendServicesService) Patch(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesPatchCall { - c := &RegionBackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - c.backendservice = backendservice - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionBackendServicesPatchCall) RequestId(requestId string) *RegionBackendServicesPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionBackendServicesPatchCall) Fields(s ...googleapi.Field) *RegionBackendServicesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionBackendServicesPatchCall) Context(ctx context.Context) *RegionBackendServicesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionBackendServicesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionBackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.regionBackendServices.patch", - // "parameterOrder": [ - // "project", - // "region", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/backendServices/{backendService}", - // "request": { - // "$ref": "BackendService" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionBackendServices.testIamPermissions": - -type RegionBackendServicesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *RegionBackendServicesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionBackendServicesTestIamPermissionsCall { - c := &RegionBackendServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionBackendServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionBackendServicesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionBackendServicesTestIamPermissionsCall) Context(ctx context.Context) *RegionBackendServicesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionBackendServicesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionBackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.regionBackendServices.testIamPermissions", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/backendServices/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionBackendServices.update": - -type RegionBackendServicesUpdateCall struct { - s *Service - project string - region string - backendService string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified regional BackendService resource with -// the data included in the request. There are several restrictions and -// guidelines to keep in mind when updating a backend service. Read -// Restrictions and Guidelines for more information. -func (r *RegionBackendServicesService) Update(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesUpdateCall { - c := &RegionBackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - c.backendservice = backendservice - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionBackendServicesUpdateCall) RequestId(requestId string) *RegionBackendServicesUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionBackendServicesUpdateCall) Fields(s ...googleapi.Field) *RegionBackendServicesUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionBackendServicesUpdateCall) Context(ctx context.Context) *RegionBackendServicesUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionBackendServicesUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionBackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information.", - // "httpMethod": "PUT", - // "id": "compute.regionBackendServices.update", - // "parameterOrder": [ - // "project", - // "region", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/backendServices/{backendService}", - // "request": { - // "$ref": "BackendService" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionCommitments.aggregatedList": - -type RegionCommitmentsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of commitments. -func (r *RegionCommitmentsService) AggregatedList(project string) *RegionCommitmentsAggregatedListCall { - c := &RegionCommitmentsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RegionCommitmentsAggregatedListCall) Filter(filter string) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RegionCommitmentsAggregatedListCall) MaxResults(maxResults int64) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RegionCommitmentsAggregatedListCall) OrderBy(orderBy string) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RegionCommitmentsAggregatedListCall) PageToken(pageToken string) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionCommitmentsAggregatedListCall) Fields(s ...googleapi.Field) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionCommitmentsAggregatedListCall) IfNoneMatch(entityTag string) *RegionCommitmentsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionCommitmentsAggregatedListCall) Context(ctx context.Context) *RegionCommitmentsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionCommitmentsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCommitmentsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/commitments") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCommitments.aggregatedList" call. -// Exactly one of *CommitmentAggregatedList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *CommitmentAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionCommitmentsAggregatedListCall) Do(opts ...googleapi.CallOption) (*CommitmentAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &CommitmentAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of commitments.", - // "httpMethod": "GET", - // "id": "compute.regionCommitments.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/commitments", - // "response": { - // "$ref": "CommitmentAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionCommitmentsAggregatedListCall) Pages(ctx context.Context, f func(*CommitmentAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.regionCommitments.get": - -type RegionCommitmentsGetCall struct { - s *Service - project string - region string - commitment string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified commitment resource. Get a list of -// available commitments by making a list() request. -func (r *RegionCommitmentsService) Get(project string, region string, commitment string) *RegionCommitmentsGetCall { - c := &RegionCommitmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.commitment = commitment - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionCommitmentsGetCall) Fields(s ...googleapi.Field) *RegionCommitmentsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionCommitmentsGetCall) IfNoneMatch(entityTag string) *RegionCommitmentsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionCommitmentsGetCall) Context(ctx context.Context) *RegionCommitmentsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionCommitmentsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCommitmentsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/commitments/{commitment}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "commitment": c.commitment, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCommitments.get" call. -// Exactly one of *Commitment or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Commitment.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionCommitmentsGetCall) Do(opts ...googleapi.CallOption) (*Commitment, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Commitment{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified commitment resource. Get a list of available commitments by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.regionCommitments.get", - // "parameterOrder": [ - // "project", - // "region", - // "commitment" - // ], - // "parameters": { - // "commitment": { - // "description": "Name of the commitment to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/commitments/{commitment}", - // "response": { - // "$ref": "Commitment" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionCommitments.insert": - -type RegionCommitmentsInsertCall struct { - s *Service - project string - region string - commitment *Commitment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a commitment in the specified project using the data -// included in the request. -func (r *RegionCommitmentsService) Insert(project string, region string, commitment *Commitment) *RegionCommitmentsInsertCall { - c := &RegionCommitmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.commitment = commitment - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionCommitmentsInsertCall) RequestId(requestId string) *RegionCommitmentsInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionCommitmentsInsertCall) Fields(s ...googleapi.Field) *RegionCommitmentsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionCommitmentsInsertCall) Context(ctx context.Context) *RegionCommitmentsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionCommitmentsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCommitmentsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.commitment) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/commitments") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCommitments.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionCommitmentsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a commitment in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.regionCommitments.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/commitments", - // "request": { - // "$ref": "Commitment" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionCommitments.list": - -type RegionCommitmentsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of commitments contained within the specified -// region. -func (r *RegionCommitmentsService) List(project string, region string) *RegionCommitmentsListCall { - c := &RegionCommitmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RegionCommitmentsListCall) Filter(filter string) *RegionCommitmentsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RegionCommitmentsListCall) MaxResults(maxResults int64) *RegionCommitmentsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RegionCommitmentsListCall) OrderBy(orderBy string) *RegionCommitmentsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RegionCommitmentsListCall) PageToken(pageToken string) *RegionCommitmentsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionCommitmentsListCall) Fields(s ...googleapi.Field) *RegionCommitmentsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionCommitmentsListCall) IfNoneMatch(entityTag string) *RegionCommitmentsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionCommitmentsListCall) Context(ctx context.Context) *RegionCommitmentsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionCommitmentsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCommitmentsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/commitments") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCommitments.list" call. -// Exactly one of *CommitmentList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *CommitmentList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionCommitmentsListCall) Do(opts ...googleapi.CallOption) (*CommitmentList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &CommitmentList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of commitments contained within the specified region.", - // "httpMethod": "GET", - // "id": "compute.regionCommitments.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/commitments", - // "response": { - // "$ref": "CommitmentList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionCommitmentsListCall) Pages(ctx context.Context, f func(*CommitmentList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.regionCommitments.testIamPermissions": - -type RegionCommitmentsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *RegionCommitmentsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionCommitmentsTestIamPermissionsCall { - c := &RegionCommitmentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionCommitmentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionCommitmentsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionCommitmentsTestIamPermissionsCall) Context(ctx context.Context) *RegionCommitmentsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionCommitmentsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCommitmentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/commitments/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCommitments.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionCommitmentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.regionCommitments.testIamPermissions", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/commitments/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionDiskTypes.get": - -type RegionDiskTypesGetCall struct { - s *Service - project string - region string - diskType string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified regional disk type. Get a list of -// available disk types by making a list() request. -func (r *RegionDiskTypesService) Get(project string, region string, diskType string) *RegionDiskTypesGetCall { - c := &RegionDiskTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.diskType = diskType - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionDiskTypesGetCall) Fields(s ...googleapi.Field) *RegionDiskTypesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionDiskTypesGetCall) IfNoneMatch(entityTag string) *RegionDiskTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionDiskTypesGetCall) Context(ctx context.Context) *RegionDiskTypesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionDiskTypesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDiskTypesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/diskTypes/{diskType}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "diskType": c.diskType, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDiskTypes.get" call. -// Exactly one of *DiskType or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *DiskType.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionDiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &DiskType{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified regional disk type. Get a list of available disk types by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.regionDiskTypes.get", - // "parameterOrder": [ - // "project", - // "region", - // "diskType" - // ], - // "parameters": { - // "diskType": { - // "description": "Name of the disk type to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/diskTypes/{diskType}", - // "response": { - // "$ref": "DiskType" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionDiskTypes.list": - -type RegionDiskTypesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of regional disk types available to the -// specified project. -func (r *RegionDiskTypesService) List(project string, region string) *RegionDiskTypesListCall { - c := &RegionDiskTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RegionDiskTypesListCall) Filter(filter string) *RegionDiskTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RegionDiskTypesListCall) MaxResults(maxResults int64) *RegionDiskTypesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RegionDiskTypesListCall) OrderBy(orderBy string) *RegionDiskTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RegionDiskTypesListCall) PageToken(pageToken string) *RegionDiskTypesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionDiskTypesListCall) Fields(s ...googleapi.Field) *RegionDiskTypesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionDiskTypesListCall) IfNoneMatch(entityTag string) *RegionDiskTypesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionDiskTypesListCall) Context(ctx context.Context) *RegionDiskTypesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionDiskTypesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDiskTypesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/diskTypes") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDiskTypes.list" call. -// Exactly one of *RegionDiskTypeList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *RegionDiskTypeList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionDiskTypesListCall) Do(opts ...googleapi.CallOption) (*RegionDiskTypeList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RegionDiskTypeList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of regional disk types available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.regionDiskTypes.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/diskTypes", - // "response": { - // "$ref": "RegionDiskTypeList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionDiskTypesListCall) Pages(ctx context.Context, f func(*RegionDiskTypeList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.regionDisks.createSnapshot": - -type RegionDisksCreateSnapshotCall struct { - s *Service - project string - region string - disk string - snapshot *Snapshot - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CreateSnapshot: Creates a snapshot of this regional disk. -func (r *RegionDisksService) CreateSnapshot(project string, region string, disk string, snapshot *Snapshot) *RegionDisksCreateSnapshotCall { - c := &RegionDisksCreateSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - c.snapshot = snapshot - return c -} - -// GuestFlush sets the optional parameter "guestFlush": -func (c *RegionDisksCreateSnapshotCall) GuestFlush(guestFlush bool) *RegionDisksCreateSnapshotCall { - c.urlParams_.Set("guestFlush", fmt.Sprint(guestFlush)) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionDisksCreateSnapshotCall) RequestId(requestId string) *RegionDisksCreateSnapshotCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionDisksCreateSnapshotCall) Fields(s ...googleapi.Field) *RegionDisksCreateSnapshotCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionDisksCreateSnapshotCall) Context(ctx context.Context) *RegionDisksCreateSnapshotCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionDisksCreateSnapshotCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.snapshot) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/disks/{disk}/createSnapshot") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "disk": c.disk, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.createSnapshot" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionDisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a snapshot of this regional disk.", - // "httpMethod": "POST", - // "id": "compute.regionDisks.createSnapshot", - // "parameterOrder": [ - // "project", - // "region", - // "disk" - // ], - // "parameters": { - // "disk": { - // "description": "Name of the regional persistent disk to snapshot.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "guestFlush": { - // "location": "query", - // "type": "boolean" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/disks/{disk}/createSnapshot", - // "request": { - // "$ref": "Snapshot" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionDisks.delete": - -type RegionDisksDeleteCall struct { - s *Service - project string - region string - disk string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified regional persistent disk. Deleting a -// regional disk removes all the replicas of its data permanently and is -// irreversible. However, deleting a disk does not delete any snapshots -// previously made from the disk. You must separately delete snapshots. -func (r *RegionDisksService) Delete(project string, region string, disk string) *RegionDisksDeleteCall { - c := &RegionDisksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionDisksDeleteCall) RequestId(requestId string) *RegionDisksDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionDisksDeleteCall) Fields(s ...googleapi.Field) *RegionDisksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionDisksDeleteCall) Context(ctx context.Context) *RegionDisksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionDisksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/disks/{disk}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "disk": c.disk, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionDisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified regional persistent disk. Deleting a regional disk removes all the replicas of its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.", - // "httpMethod": "DELETE", - // "id": "compute.regionDisks.delete", - // "parameterOrder": [ - // "project", - // "region", - // "disk" - // ], - // "parameters": { - // "disk": { - // "description": "Name of the regional persistent disk to delete.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/disks/{disk}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionDisks.get": - -type RegionDisksGetCall struct { - s *Service - project string - region string - disk string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns a specified regional persistent disk. -func (r *RegionDisksService) Get(project string, region string, disk string) *RegionDisksGetCall { - c := &RegionDisksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionDisksGetCall) Fields(s ...googleapi.Field) *RegionDisksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionDisksGetCall) IfNoneMatch(entityTag string) *RegionDisksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionDisksGetCall) Context(ctx context.Context) *RegionDisksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionDisksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/disks/{disk}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "disk": c.disk, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.get" call. -// Exactly one of *Disk or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Disk.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *RegionDisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Disk{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns a specified regional persistent disk.", - // "httpMethod": "GET", - // "id": "compute.regionDisks.get", - // "parameterOrder": [ - // "project", - // "region", - // "disk" - // ], - // "parameters": { - // "disk": { - // "description": "Name of the regional persistent disk to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/disks/{disk}", - // "response": { - // "$ref": "Disk" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionDisks.insert": - -type RegionDisksInsertCall struct { - s *Service - project string - region string - disk *Disk - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a persistent regional disk in the specified project -// using the data included in the request. -func (r *RegionDisksService) Insert(project string, region string, disk *Disk) *RegionDisksInsertCall { - c := &RegionDisksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and then the request times out. If you make the request again with -// the same request ID, the server can check if original operation with -// the same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -func (c *RegionDisksInsertCall) RequestId(requestId string) *RegionDisksInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// SourceImage sets the optional parameter "sourceImage": Source image -// to restore onto a disk. -func (c *RegionDisksInsertCall) SourceImage(sourceImage string) *RegionDisksInsertCall { - c.urlParams_.Set("sourceImage", sourceImage) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionDisksInsertCall) Fields(s ...googleapi.Field) *RegionDisksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionDisksInsertCall) Context(ctx context.Context) *RegionDisksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionDisksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.disk) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/disks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionDisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a persistent regional disk in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.regionDisks.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and then the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.", - // "location": "query", - // "type": "string" - // }, - // "sourceImage": { - // "description": "Optional. Source image to restore onto a disk.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/disks", - // "request": { - // "$ref": "Disk" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionDisks.list": - -type RegionDisksListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of persistent disks contained within the -// specified region. -func (r *RegionDisksService) List(project string, region string) *RegionDisksListCall { - c := &RegionDisksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RegionDisksListCall) Filter(filter string) *RegionDisksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RegionDisksListCall) MaxResults(maxResults int64) *RegionDisksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RegionDisksListCall) OrderBy(orderBy string) *RegionDisksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RegionDisksListCall) PageToken(pageToken string) *RegionDisksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionDisksListCall) Fields(s ...googleapi.Field) *RegionDisksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionDisksListCall) IfNoneMatch(entityTag string) *RegionDisksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionDisksListCall) Context(ctx context.Context) *RegionDisksListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionDisksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/disks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.list" call. -// Exactly one of *DiskList or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *DiskList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionDisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &DiskList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of persistent disks contained within the specified region.", - // "httpMethod": "GET", - // "id": "compute.regionDisks.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/disks", - // "response": { - // "$ref": "DiskList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionDisksListCall) Pages(ctx context.Context, f func(*DiskList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.regionDisks.resize": - -type RegionDisksResizeCall struct { - s *Service - project string - region string - disk string - regiondisksresizerequest *RegionDisksResizeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Resize: Resizes the specified regional persistent disk. -func (r *RegionDisksService) Resize(project string, region string, disk string, regiondisksresizerequest *RegionDisksResizeRequest) *RegionDisksResizeCall { - c := &RegionDisksResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - c.regiondisksresizerequest = regiondisksresizerequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionDisksResizeCall) RequestId(requestId string) *RegionDisksResizeCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionDisksResizeCall) Fields(s ...googleapi.Field) *RegionDisksResizeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionDisksResizeCall) Context(ctx context.Context) *RegionDisksResizeCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionDisksResizeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksResizeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regiondisksresizerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/disks/{disk}/resize") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "disk": c.disk, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.resize" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionDisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Resizes the specified regional persistent disk.", - // "httpMethod": "POST", - // "id": "compute.regionDisks.resize", - // "parameterOrder": [ - // "project", - // "region", - // "disk" - // ], - // "parameters": { - // "disk": { - // "description": "Name of the regional persistent disk.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "The project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/disks/{disk}/resize", - // "request": { - // "$ref": "RegionDisksResizeRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionDisks.setLabels": - -type RegionDisksSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on the target regional disk. -func (r *RegionDisksService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *RegionDisksSetLabelsCall { - c := &RegionDisksSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionDisksSetLabelsCall) RequestId(requestId string) *RegionDisksSetLabelsCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionDisksSetLabelsCall) Fields(s ...googleapi.Field) *RegionDisksSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionDisksSetLabelsCall) Context(ctx context.Context) *RegionDisksSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionDisksSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetlabelsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/disks/{resource}/setLabels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.setLabels" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionDisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the labels on the target regional disk.", - // "httpMethod": "POST", - // "id": "compute.regionDisks.setLabels", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/disks/{resource}/setLabels", - // "request": { - // "$ref": "RegionSetLabelsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionDisks.testIamPermissions": - -type RegionDisksTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *RegionDisksService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionDisksTestIamPermissionsCall { - c := &RegionDisksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionDisksTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionDisksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionDisksTestIamPermissionsCall) Context(ctx context.Context) *RegionDisksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionDisksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/disks/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionDisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.regionDisks.testIamPermissions", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/disks/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.abandonInstances": - -type RegionInstanceGroupManagersAbandonInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersabandoninstancesrequest *RegionInstanceGroupManagersAbandonInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AbandonInstances: Schedules a group action to remove the specified -// instances from the managed instance group. Abandoning an instance -// does not delete the instance, but it does remove the instance from -// any target pools that are applied by the managed instance group. This -// method reduces the targetSize of the managed instance group by the -// number of instances that you abandon. This operation is marked as -// DONE when the action is scheduled even if the instances have not yet -// been removed from the group. You must separately verify the status of -// the abandoning action with the listmanagedinstances method. -// -// If the group is part of a backend service that has enabled connection -// draining, it can take up to 60 seconds after the connection draining -// duration has elapsed before the VM instance is removed or -// deleted. -// -// You can specify a maximum of 1000 instances with this method per -// request. -func (r *RegionInstanceGroupManagersService) AbandonInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersabandoninstancesrequest *RegionInstanceGroupManagersAbandonInstancesRequest) *RegionInstanceGroupManagersAbandonInstancesCall { - c := &RegionInstanceGroupManagersAbandonInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersabandoninstancesrequest = regioninstancegroupmanagersabandoninstancesrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersAbandonInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersAbandonInstancesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersAbandonInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersAbandonInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersAbandonInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersAbandonInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersAbandonInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagersabandoninstancesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/abandonInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.abandonInstances" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersAbandonInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.abandonInstances", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "Name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", - // "request": { - // "$ref": "RegionInstanceGroupManagersAbandonInstancesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.applyUpdatesToInstances": - -type RegionInstanceGroupManagersApplyUpdatesToInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersapplyupdatesrequest *RegionInstanceGroupManagersApplyUpdatesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ApplyUpdatesToInstances: Apply updates to selected instances the -// managed instance group. -func (r *RegionInstanceGroupManagersService) ApplyUpdatesToInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersapplyupdatesrequest *RegionInstanceGroupManagersApplyUpdatesRequest) *RegionInstanceGroupManagersApplyUpdatesToInstancesCall { - c := &RegionInstanceGroupManagersApplyUpdatesToInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersapplyupdatesrequest = regioninstancegroupmanagersapplyupdatesrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersApplyUpdatesToInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersApplyUpdatesToInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagersapplyupdatesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.applyUpdatesToInstances" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Apply updates to selected instances the managed instance group.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.applyUpdatesToInstances", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group, should conform to RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request, should conform to RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances", - // "request": { - // "$ref": "RegionInstanceGroupManagersApplyUpdatesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.delete": - -type RegionInstanceGroupManagersDeleteCall struct { - s *Service - project string - region string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified managed instance group and all of the -// instances in that group. -func (r *RegionInstanceGroupManagersService) Delete(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersDeleteCall { - c := &RegionInstanceGroupManagersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersDeleteCall) RequestId(requestId string) *RegionInstanceGroupManagersDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersDeleteCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersDeleteCall) Context(ctx context.Context) *RegionInstanceGroupManagersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified managed instance group and all of the instances in that group.", - // "httpMethod": "DELETE", - // "id": "compute.regionInstanceGroupManagers.delete", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "Name of the managed instance group to delete.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.deleteInstances": - -type RegionInstanceGroupManagersDeleteInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersdeleteinstancesrequest *RegionInstanceGroupManagersDeleteInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteInstances: Schedules a group action to delete the specified -// instances in the managed instance group. The instances are also -// removed from any target pools of which they were a member. This -// method reduces the targetSize of the managed instance group by the -// number of instances that you delete. This operation is marked as DONE -// when the action is scheduled even if the instances are still being -// deleted. You must separately verify the status of the deleting action -// with the listmanagedinstances method. -// -// If the group is part of a backend service that has enabled connection -// draining, it can take up to 60 seconds after the connection draining -// duration has elapsed before the VM instance is removed or -// deleted. -// -// You can specify a maximum of 1000 instances with this method per -// request. -func (r *RegionInstanceGroupManagersService) DeleteInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersdeleteinstancesrequest *RegionInstanceGroupManagersDeleteInstancesRequest) *RegionInstanceGroupManagersDeleteInstancesCall { - c := &RegionInstanceGroupManagersDeleteInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersdeleteinstancesrequest = regioninstancegroupmanagersdeleteinstancesrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersDeleteInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersDeleteInstancesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersDeleteInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersDeleteInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersDeleteInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersDeleteInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersDeleteInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagersdeleteinstancesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deleteInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.deleteInstances" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersDeleteInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.deleteInstances", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "Name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", - // "request": { - // "$ref": "RegionInstanceGroupManagersDeleteInstancesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.deletePerInstanceConfigs": - -type RegionInstanceGroupManagersDeletePerInstanceConfigsCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerdeleteinstanceconfigreq *RegionInstanceGroupManagerDeleteInstanceConfigReq - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeletePerInstanceConfigs: Delete selected per-instance configs for -// the managed instance group. -func (r *RegionInstanceGroupManagersService) DeletePerInstanceConfigs(project string, region string, instanceGroupManager string, regioninstancegroupmanagerdeleteinstanceconfigreq *RegionInstanceGroupManagerDeleteInstanceConfigReq) *RegionInstanceGroupManagersDeletePerInstanceConfigsCall { - c := &RegionInstanceGroupManagersDeletePerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerdeleteinstanceconfigreq = regioninstancegroupmanagerdeleteinstanceconfigreq - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersDeletePerInstanceConfigsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersDeletePerInstanceConfigsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersDeletePerInstanceConfigsCall) Context(ctx context.Context) *RegionInstanceGroupManagersDeletePerInstanceConfigsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersDeletePerInstanceConfigsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersDeletePerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerdeleteinstanceconfigreq) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deletePerInstanceConfigs") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.deletePerInstanceConfigs" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersDeletePerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Delete selected per-instance configs for the managed instance group.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.deletePerInstanceConfigs", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group. It should conform to RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request, should conform to RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deletePerInstanceConfigs", - // "request": { - // "$ref": "RegionInstanceGroupManagerDeleteInstanceConfigReq" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.get": - -type RegionInstanceGroupManagersGetCall struct { - s *Service - project string - region string - instanceGroupManager string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns all of the details about the specified managed instance -// group. -func (r *RegionInstanceGroupManagersService) Get(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersGetCall { - c := &RegionInstanceGroupManagersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersGetCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionInstanceGroupManagersGetCall) IfNoneMatch(entityTag string) *RegionInstanceGroupManagersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersGetCall) Context(ctx context.Context) *RegionInstanceGroupManagersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.get" call. -// Exactly one of *InstanceGroupManager or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstanceGroupManager.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManager, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceGroupManager{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns all of the details about the specified managed instance group.", - // "httpMethod": "GET", - // "id": "compute.regionInstanceGroupManagers.get", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "Name of the managed instance group to return.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - // "response": { - // "$ref": "InstanceGroupManager" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.insert": - -type RegionInstanceGroupManagersInsertCall struct { - s *Service - project string - region string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a managed instance group using the information that -// you specify in the request. After the group is created, it schedules -// an action to create instances in the group using the specified -// instance template. This operation is marked as DONE when the group is -// created even if the instances in the group have not yet been created. -// You must separately verify the status of the individual instances -// with the listmanagedinstances method. -// -// A regional managed instance group can contain up to 2000 instances. -func (r *RegionInstanceGroupManagersService) Insert(project string, region string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersInsertCall { - c := &RegionInstanceGroupManagersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instancegroupmanager = instancegroupmanager - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersInsertCall) RequestId(requestId string) *RegionInstanceGroupManagersInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersInsertCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersInsertCall) Context(ctx context.Context) *RegionInstanceGroupManagersInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA regional managed instance group can contain up to 2000 instances.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers", - // "request": { - // "$ref": "InstanceGroupManager" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.list": - -type RegionInstanceGroupManagersListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of managed instance groups that are -// contained within the specified region. -func (r *RegionInstanceGroupManagersService) List(project string, region string) *RegionInstanceGroupManagersListCall { - c := &RegionInstanceGroupManagersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RegionInstanceGroupManagersListCall) Filter(filter string) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RegionInstanceGroupManagersListCall) MaxResults(maxResults int64) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RegionInstanceGroupManagersListCall) OrderBy(orderBy string) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RegionInstanceGroupManagersListCall) PageToken(pageToken string) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersListCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionInstanceGroupManagersListCall) IfNoneMatch(entityTag string) *RegionInstanceGroupManagersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersListCall) Context(ctx context.Context) *RegionInstanceGroupManagersListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.list" call. -// Exactly one of *RegionInstanceGroupManagerList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *RegionInstanceGroupManagerList.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersListCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupManagerList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RegionInstanceGroupManagerList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of managed instance groups that are contained within the specified region.", - // "httpMethod": "GET", - // "id": "compute.regionInstanceGroupManagers.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers", - // "response": { - // "$ref": "RegionInstanceGroupManagerList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionInstanceGroupManagersListCall) Pages(ctx context.Context, f func(*RegionInstanceGroupManagerList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.regionInstanceGroupManagers.listManagedInstances": - -type RegionInstanceGroupManagersListManagedInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListManagedInstances: Lists the instances in the managed instance -// group and instances that are scheduled to be created. The list -// includes any current actions that the group has scheduled for its -// instances. -func (r *RegionInstanceGroupManagersService) ListManagedInstances(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersListManagedInstancesCall { - c := &RegionInstanceGroupManagersListManagedInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - return c -} - -// Filter sets the optional parameter "filter": -func (c *RegionInstanceGroupManagersListManagedInstancesCall) Filter(filter string) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": -func (c *RegionInstanceGroupManagersListManagedInstancesCall) MaxResults(maxResults int64) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "order_by": -func (c *RegionInstanceGroupManagersListManagedInstancesCall) OrderBy(orderBy string) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("order_by", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": -func (c *RegionInstanceGroupManagersListManagedInstancesCall) PageToken(pageToken string) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersListManagedInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.listManagedInstances" call. -// Exactly one of *RegionInstanceGroupManagersListInstancesResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *RegionInstanceGroupManagersListInstancesResponse.ServerResponse.Heade -// r or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupManagersListInstancesResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RegionInstanceGroupManagersListInstancesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.listManagedInstances", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "filter": { - // "location": "query", - // "type": "string" - // }, - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "order_by": { - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", - // "response": { - // "$ref": "RegionInstanceGroupManagersListInstancesResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) Pages(ctx context.Context, f func(*RegionInstanceGroupManagersListInstancesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.regionInstanceGroupManagers.listPerInstanceConfigs": - -type RegionInstanceGroupManagersListPerInstanceConfigsCall struct { - s *Service - project string - region string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListPerInstanceConfigs: Lists all of the per-instance configs defined -// for the managed instance group. -func (r *RegionInstanceGroupManagersService) ListPerInstanceConfigs(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersListPerInstanceConfigsCall { - c := &RegionInstanceGroupManagersListPerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Filter(filter string) *RegionInstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) MaxResults(maxResults int64) *RegionInstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) OrderBy(orderBy string) *RegionInstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) PageToken(pageToken string) *RegionInstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Context(ctx context.Context) *RegionInstanceGroupManagersListPerInstanceConfigsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.listPerInstanceConfigs" call. -// Exactly one of *RegionInstanceGroupManagersListInstanceConfigsResp or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *RegionInstanceGroupManagersListInstanceConfigsResp.ServerResponse.Hea -// der or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupManagersListInstanceConfigsResp, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RegionInstanceGroupManagersListInstanceConfigsResp{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists all of the per-instance configs defined for the managed instance group.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.listPerInstanceConfigs", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "instanceGroupManager": { - // "description": "The name of the managed instance group. It should conform to RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request, should conform to RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs", - // "response": { - // "$ref": "RegionInstanceGroupManagersListInstanceConfigsResp" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Pages(ctx context.Context, f func(*RegionInstanceGroupManagersListInstanceConfigsResp) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.regionInstanceGroupManagers.patch": - -type RegionInstanceGroupManagersPatchCall struct { - s *Service - project string - region string - instanceGroupManager string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a managed instance group using the information that -// you specify in the request. This operation is marked as DONE when the -// group is patched even if the instances in the group are still in the -// process of being patched. You must separately verify the status of -// the individual instances with the listmanagedinstances method. This -// method supports PATCH semantics and uses the JSON merge patch format -// and processing rules. -func (r *RegionInstanceGroupManagersService) Patch(project string, region string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersPatchCall { - c := &RegionInstanceGroupManagersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanager = instancegroupmanager - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersPatchCall) RequestId(requestId string) *RegionInstanceGroupManagersPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersPatchCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersPatchCall) Context(ctx context.Context) *RegionInstanceGroupManagersPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.regionInstanceGroupManagers.patch", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the instance group manager.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - // "request": { - // "$ref": "InstanceGroupManager" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.recreateInstances": - -type RegionInstanceGroupManagersRecreateInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersrecreaterequest *RegionInstanceGroupManagersRecreateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RecreateInstances: Schedules a group action to recreate the specified -// instances in the managed instance group. The instances are deleted -// and recreated using the current instance template for the managed -// instance group. This operation is marked as DONE when the action is -// scheduled even if the instances have not yet been recreated. You must -// separately verify the status of the recreating action with the -// listmanagedinstances method. -// -// If the group is part of a backend service that has enabled connection -// draining, it can take up to 60 seconds after the connection draining -// duration has elapsed before the VM instance is removed or -// deleted. -// -// You can specify a maximum of 1000 instances with this method per -// request. -func (r *RegionInstanceGroupManagersService) RecreateInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersrecreaterequest *RegionInstanceGroupManagersRecreateRequest) *RegionInstanceGroupManagersRecreateInstancesCall { - c := &RegionInstanceGroupManagersRecreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersrecreaterequest = regioninstancegroupmanagersrecreaterequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersRecreateInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersRecreateInstancesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersRecreateInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersRecreateInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersRecreateInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersRecreateInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersRecreateInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagersrecreaterequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.recreateInstances" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.recreateInstances", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "Name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", - // "request": { - // "$ref": "RegionInstanceGroupManagersRecreateRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.resize": - -type RegionInstanceGroupManagersResizeCall struct { - s *Service - project string - region string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Resize: Changes the intended size for the managed instance group. If -// you increase the size, the group schedules actions to create new -// instances using the current instance template. If you decrease the -// size, the group schedules delete actions on one or more instances. -// The resize operation is marked DONE when the resize actions are -// scheduled even if the group has not yet added or deleted any -// instances. You must separately verify the status of the creating or -// deleting actions with the listmanagedinstances method. -// -// If the group is part of a backend service that has enabled connection -// draining, it can take up to 60 seconds after the connection draining -// duration has elapsed before the VM instance is removed or deleted. -func (r *RegionInstanceGroupManagersService) Resize(project string, region string, instanceGroupManager string, size int64) *RegionInstanceGroupManagersResizeCall { - c := &RegionInstanceGroupManagersResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.urlParams_.Set("size", fmt.Sprint(size)) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersResizeCall) RequestId(requestId string) *RegionInstanceGroupManagersResizeCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersResizeCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersResizeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersResizeCall) Context(ctx context.Context) *RegionInstanceGroupManagersResizeCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersResizeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resize") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.resize" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes the intended size for the managed instance group. If you increase the size, the group schedules actions to create new instances using the current instance template. If you decrease the size, the group schedules delete actions on one or more instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.resize", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager", - // "size" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "Name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "size": { - // "description": "Number of instances that should exist in this instance group manager.", - // "format": "int32", - // "location": "query", - // "minimum": "0", - // "required": true, - // "type": "integer" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resize", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.setAutoHealingPolicies": - -type RegionInstanceGroupManagersSetAutoHealingPoliciesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerssetautohealingrequest *RegionInstanceGroupManagersSetAutoHealingRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetAutoHealingPolicies: Modifies the autohealing policy for the -// instances in this managed instance group. -func (r *RegionInstanceGroupManagersService) SetAutoHealingPolicies(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssetautohealingrequest *RegionInstanceGroupManagersSetAutoHealingRequest) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall { - c := &RegionInstanceGroupManagersSetAutoHealingPoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerssetautohealingrequest = regioninstancegroupmanagerssetautohealingrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) RequestId(requestId string) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Context(ctx context.Context) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerssetautohealingrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.setAutoHealingPolicies" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Modifies the autohealing policy for the instances in this managed instance group.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.setAutoHealingPolicies", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "Name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies", - // "request": { - // "$ref": "RegionInstanceGroupManagersSetAutoHealingRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.setInstanceTemplate": - -type RegionInstanceGroupManagersSetInstanceTemplateCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerssettemplaterequest *RegionInstanceGroupManagersSetTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetInstanceTemplate: Sets the instance template to use when creating -// new instances or recreating instances in this group. Existing -// instances are not affected. -func (r *RegionInstanceGroupManagersService) SetInstanceTemplate(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssettemplaterequest *RegionInstanceGroupManagersSetTemplateRequest) *RegionInstanceGroupManagersSetInstanceTemplateCall { - c := &RegionInstanceGroupManagersSetInstanceTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerssettemplaterequest = regioninstancegroupmanagerssettemplaterequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) RequestId(requestId string) *RegionInstanceGroupManagersSetInstanceTemplateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersSetInstanceTemplateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Context(ctx context.Context) *RegionInstanceGroupManagersSetInstanceTemplateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerssettemplaterequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.setInstanceTemplate" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.setInstanceTemplate", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", - // "request": { - // "$ref": "RegionInstanceGroupManagersSetTemplateRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.setTargetPools": - -type RegionInstanceGroupManagersSetTargetPoolsCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerssettargetpoolsrequest *RegionInstanceGroupManagersSetTargetPoolsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetTargetPools: Modifies the target pools to which all new instances -// in this group are assigned. Existing instances in the group are not -// affected. -func (r *RegionInstanceGroupManagersService) SetTargetPools(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssettargetpoolsrequest *RegionInstanceGroupManagersSetTargetPoolsRequest) *RegionInstanceGroupManagersSetTargetPoolsCall { - c := &RegionInstanceGroupManagersSetTargetPoolsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerssettargetpoolsrequest = regioninstancegroupmanagerssettargetpoolsrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) RequestId(requestId string) *RegionInstanceGroupManagersSetTargetPoolsCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersSetTargetPoolsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Context(ctx context.Context) *RegionInstanceGroupManagersSetTargetPoolsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerssettargetpoolsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.setTargetPools" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.setTargetPools", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "Name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", - // "request": { - // "$ref": "RegionInstanceGroupManagersSetTargetPoolsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.testIamPermissions": - -type RegionInstanceGroupManagersTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *RegionInstanceGroupManagersService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionInstanceGroupManagersTestIamPermissionsCall { - c := &RegionInstanceGroupManagersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersTestIamPermissionsCall) Context(ctx context.Context) *RegionInstanceGroupManagersTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.testIamPermissions", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.update": - -type RegionInstanceGroupManagersUpdateCall struct { - s *Service - project string - region string - instanceGroupManager string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a managed instance group using the information that -// you specify in the request. This operation is marked as DONE when the -// group is updated even if the instances in the group have not yet been -// updated. You must separately verify the status of the individual -// instances with the listmanagedinstances method. -func (r *RegionInstanceGroupManagersService) Update(project string, region string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersUpdateCall { - c := &RegionInstanceGroupManagersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanager = instancegroupmanager - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersUpdateCall) RequestId(requestId string) *RegionInstanceGroupManagersUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersUpdateCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersUpdateCall) Context(ctx context.Context) *RegionInstanceGroupManagersUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listmanagedinstances method.", - // "httpMethod": "PUT", - // "id": "compute.regionInstanceGroupManagers.update", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the instance group manager.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - // "request": { - // "$ref": "InstanceGroupManager" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.updatePerInstanceConfigs": - -type RegionInstanceGroupManagersUpdatePerInstanceConfigsCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerupdateinstanceconfigreq *RegionInstanceGroupManagerUpdateInstanceConfigReq - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdatePerInstanceConfigs: Insert or patch (for the ones that already -// exist) per-instance configs for the managed instance group. -// perInstanceConfig.instance serves as a key used to distinguish -// whether to perform insert or patch. -func (r *RegionInstanceGroupManagersService) UpdatePerInstanceConfigs(project string, region string, instanceGroupManager string, regioninstancegroupmanagerupdateinstanceconfigreq *RegionInstanceGroupManagerUpdateInstanceConfigReq) *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall { - c := &RegionInstanceGroupManagersUpdatePerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerupdateinstanceconfigreq = regioninstancegroupmanagerupdateinstanceconfigreq - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) Context(ctx context.Context) *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerupdateinstanceconfigreq) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.updatePerInstanceConfigs" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Insert or patch (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.updatePerInstanceConfigs", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group. It should conform to RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request, should conform to RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs", - // "request": { - // "$ref": "RegionInstanceGroupManagerUpdateInstanceConfigReq" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroups.get": - -type RegionInstanceGroupsGetCall struct { - s *Service - project string - region string - instanceGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified instance group resource. -func (r *RegionInstanceGroupsService) Get(project string, region string, instanceGroup string) *RegionInstanceGroupsGetCall { - c := &RegionInstanceGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroup = instanceGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupsGetCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionInstanceGroupsGetCall) IfNoneMatch(entityTag string) *RegionInstanceGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupsGetCall) Context(ctx context.Context) *RegionInstanceGroupsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroups/{instanceGroup}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroup": c.instanceGroup, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroups.get" call. -// Exactly one of *InstanceGroup or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *InstanceGroup.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionInstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroup, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceGroup{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified instance group resource.", - // "httpMethod": "GET", - // "id": "compute.regionInstanceGroups.get", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroup" - // ], - // "parameters": { - // "instanceGroup": { - // "description": "Name of the instance group resource to return.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroups/{instanceGroup}", - // "response": { - // "$ref": "InstanceGroup" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionInstanceGroups.list": - -type RegionInstanceGroupsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of instance group resources contained within -// the specified region. -func (r *RegionInstanceGroupsService) List(project string, region string) *RegionInstanceGroupsListCall { - c := &RegionInstanceGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RegionInstanceGroupsListCall) Filter(filter string) *RegionInstanceGroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RegionInstanceGroupsListCall) MaxResults(maxResults int64) *RegionInstanceGroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RegionInstanceGroupsListCall) OrderBy(orderBy string) *RegionInstanceGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RegionInstanceGroupsListCall) PageToken(pageToken string) *RegionInstanceGroupsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupsListCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionInstanceGroupsListCall) IfNoneMatch(entityTag string) *RegionInstanceGroupsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupsListCall) Context(ctx context.Context) *RegionInstanceGroupsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroups") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroups.list" call. -// Exactly one of *RegionInstanceGroupList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *RegionInstanceGroupList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionInstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RegionInstanceGroupList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of instance group resources contained within the specified region.", - // "httpMethod": "GET", - // "id": "compute.regionInstanceGroups.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroups", - // "response": { - // "$ref": "RegionInstanceGroupList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionInstanceGroupsListCall) Pages(ctx context.Context, f func(*RegionInstanceGroupList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.regionInstanceGroups.listInstances": - -type RegionInstanceGroupsListInstancesCall struct { - s *Service - project string - region string - instanceGroup string - regioninstancegroupslistinstancesrequest *RegionInstanceGroupsListInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListInstances: Lists the instances in the specified instance group -// and displays information about the named ports. Depending on the -// specified options, this method can list all instances or only the -// instances that are running. -func (r *RegionInstanceGroupsService) ListInstances(project string, region string, instanceGroup string, regioninstancegroupslistinstancesrequest *RegionInstanceGroupsListInstancesRequest) *RegionInstanceGroupsListInstancesCall { - c := &RegionInstanceGroupsListInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroup = instanceGroup - c.regioninstancegroupslistinstancesrequest = regioninstancegroupslistinstancesrequest - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RegionInstanceGroupsListInstancesCall) Filter(filter string) *RegionInstanceGroupsListInstancesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RegionInstanceGroupsListInstancesCall) MaxResults(maxResults int64) *RegionInstanceGroupsListInstancesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RegionInstanceGroupsListInstancesCall) OrderBy(orderBy string) *RegionInstanceGroupsListInstancesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RegionInstanceGroupsListInstancesCall) PageToken(pageToken string) *RegionInstanceGroupsListInstancesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupsListInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsListInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupsListInstancesCall) Context(ctx context.Context) *RegionInstanceGroupsListInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupsListInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupslistinstancesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroups/{instanceGroup}/listInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroup": c.instanceGroup, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroups.listInstances" call. -// Exactly one of *RegionInstanceGroupsListInstances or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *RegionInstanceGroupsListInstances.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *RegionInstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupsListInstances, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RegionInstanceGroupsListInstances{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroups.listInstances", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroup" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "instanceGroup": { - // "description": "Name of the regional instance group for which we want to list the instances.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroups/{instanceGroup}/listInstances", - // "request": { - // "$ref": "RegionInstanceGroupsListInstancesRequest" - // }, - // "response": { - // "$ref": "RegionInstanceGroupsListInstances" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionInstanceGroupsListInstancesCall) Pages(ctx context.Context, f func(*RegionInstanceGroupsListInstances) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.regionInstanceGroups.setNamedPorts": - -type RegionInstanceGroupsSetNamedPortsCall struct { - s *Service - project string - region string - instanceGroup string - regioninstancegroupssetnamedportsrequest *RegionInstanceGroupsSetNamedPortsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetNamedPorts: Sets the named ports for the specified regional -// instance group. -func (r *RegionInstanceGroupsService) SetNamedPorts(project string, region string, instanceGroup string, regioninstancegroupssetnamedportsrequest *RegionInstanceGroupsSetNamedPortsRequest) *RegionInstanceGroupsSetNamedPortsCall { - c := &RegionInstanceGroupsSetNamedPortsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroup = instanceGroup - c.regioninstancegroupssetnamedportsrequest = regioninstancegroupssetnamedportsrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupsSetNamedPortsCall) RequestId(requestId string) *RegionInstanceGroupsSetNamedPortsCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupsSetNamedPortsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsSetNamedPortsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupsSetNamedPortsCall) Context(ctx context.Context) *RegionInstanceGroupsSetNamedPortsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupsSetNamedPortsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupssetnamedportsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroups/{instanceGroup}/setNamedPorts") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroup": c.instanceGroup, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroups.setNamedPorts" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the named ports for the specified regional instance group.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroups.setNamedPorts", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroup" - // ], - // "parameters": { - // "instanceGroup": { - // "description": "The name of the regional instance group where the named ports are updated.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroups/{instanceGroup}/setNamedPorts", - // "request": { - // "$ref": "RegionInstanceGroupsSetNamedPortsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroups.testIamPermissions": - -type RegionInstanceGroupsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *RegionInstanceGroupsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionInstanceGroupsTestIamPermissionsCall { - c := &RegionInstanceGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupsTestIamPermissionsCall) Context(ctx context.Context) *RegionInstanceGroupsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroups/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroups.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionInstanceGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroups.testIamPermissions", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroups/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionOperations.delete": - -type RegionOperationsDeleteCall struct { - s *Service - project string - region string - operation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified region-specific Operations resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/regionOperations/delete -func (r *RegionOperationsService) Delete(project string, region string, operation string) *RegionOperationsDeleteCall { - c := &RegionOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.operation = operation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionOperationsDeleteCall) Fields(s ...googleapi.Field) *RegionOperationsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionOperationsDeleteCall) Context(ctx context.Context) *RegionOperationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionOperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "operation": c.operation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionOperations.delete" call. -func (c *RegionOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return err - } - return nil - // { - // "description": "Deletes the specified region-specific Operations resource.", - // "httpMethod": "DELETE", - // "id": "compute.regionOperations.delete", - // "parameterOrder": [ - // "project", - // "region", - // "operation" - // ], - // "parameters": { - // "operation": { - // "description": "Name of the Operations resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/operations/{operation}", - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionOperations.get": - -type RegionOperationsGetCall struct { - s *Service - project string - region string - operation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves the specified region-specific Operations resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/regionOperations/get -func (r *RegionOperationsService) Get(project string, region string, operation string) *RegionOperationsGetCall { - c := &RegionOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.operation = operation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionOperationsGetCall) Fields(s ...googleapi.Field) *RegionOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionOperationsGetCall) IfNoneMatch(entityTag string) *RegionOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionOperationsGetCall) Context(ctx context.Context) *RegionOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "operation": c.operation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionOperations.get" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the specified region-specific Operations resource.", - // "httpMethod": "GET", - // "id": "compute.regionOperations.get", - // "parameterOrder": [ - // "project", - // "region", - // "operation" - // ], - // "parameters": { - // "operation": { - // "description": "Name of the Operations resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/operations/{operation}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionOperations.list": - -type RegionOperationsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of Operation resources contained within the -// specified region. -// For details, see https://cloud.google.com/compute/docs/reference/latest/regionOperations/list -func (r *RegionOperationsService) List(project string, region string) *RegionOperationsListCall { - c := &RegionOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RegionOperationsListCall) Filter(filter string) *RegionOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RegionOperationsListCall) MaxResults(maxResults int64) *RegionOperationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RegionOperationsListCall) OrderBy(orderBy string) *RegionOperationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RegionOperationsListCall) PageToken(pageToken string) *RegionOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionOperationsListCall) Fields(s ...googleapi.Field) *RegionOperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionOperationsListCall) IfNoneMatch(entityTag string) *RegionOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionOperationsListCall) Context(ctx context.Context) *RegionOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/operations") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionOperations.list" call. -// Exactly one of *OperationList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *OperationList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &OperationList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of Operation resources contained within the specified region.", - // "httpMethod": "GET", - // "id": "compute.regionOperations.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/operations", - // "response": { - // "$ref": "OperationList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.regions.get": - -type RegionsGetCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Region resource. Get a list of available -// regions by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/regions/get -func (r *RegionsService) Get(project string, region string) *RegionsGetCall { - c := &RegionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionsGetCall) Fields(s ...googleapi.Field) *RegionsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionsGetCall) IfNoneMatch(entityTag string) *RegionsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionsGetCall) Context(ctx context.Context) *RegionsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regions.get" call. -// Exactly one of *Region or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Region.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *RegionsGetCall) Do(opts ...googleapi.CallOption) (*Region, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Region{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified Region resource. Get a list of available regions by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.regions.get", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}", - // "response": { - // "$ref": "Region" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regions.list": - -type RegionsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of region resources available to the -// specified project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/regions/list -func (r *RegionsService) List(project string) *RegionsListCall { - c := &RegionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RegionsListCall) Filter(filter string) *RegionsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RegionsListCall) MaxResults(maxResults int64) *RegionsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RegionsListCall) OrderBy(orderBy string) *RegionsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RegionsListCall) PageToken(pageToken string) *RegionsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionsListCall) Fields(s ...googleapi.Field) *RegionsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionsListCall) IfNoneMatch(entityTag string) *RegionsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionsListCall) Context(ctx context.Context) *RegionsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regions.list" call. -// Exactly one of *RegionList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *RegionList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionsListCall) Do(opts ...googleapi.CallOption) (*RegionList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RegionList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of region resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.regions.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions", - // "response": { - // "$ref": "RegionList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionsListCall) Pages(ctx context.Context, f func(*RegionList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.routers.aggregatedList": - -type RoutersAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of routers. -func (r *RoutersService) AggregatedList(project string) *RoutersAggregatedListCall { - c := &RoutersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RoutersAggregatedListCall) Filter(filter string) *RoutersAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RoutersAggregatedListCall) MaxResults(maxResults int64) *RoutersAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RoutersAggregatedListCall) OrderBy(orderBy string) *RoutersAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RoutersAggregatedListCall) PageToken(pageToken string) *RoutersAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutersAggregatedListCall) Fields(s ...googleapi.Field) *RoutersAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RoutersAggregatedListCall) IfNoneMatch(entityTag string) *RoutersAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutersAggregatedListCall) Context(ctx context.Context) *RoutersAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutersAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/routers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.aggregatedList" call. -// Exactly one of *RouterAggregatedList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *RouterAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RoutersAggregatedListCall) Do(opts ...googleapi.CallOption) (*RouterAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RouterAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of routers.", - // "httpMethod": "GET", - // "id": "compute.routers.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/routers", - // "response": { - // "$ref": "RouterAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RoutersAggregatedListCall) Pages(ctx context.Context, f func(*RouterAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.routers.delete": - -type RoutersDeleteCall struct { - s *Service - project string - region string - router string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Router resource. -func (r *RoutersService) Delete(project string, region string, router string) *RoutersDeleteCall { - c := &RoutersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RoutersDeleteCall) RequestId(requestId string) *RoutersDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutersDeleteCall) Fields(s ...googleapi.Field) *RoutersDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutersDeleteCall) Context(ctx context.Context) *RoutersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RoutersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified Router resource.", - // "httpMethod": "DELETE", - // "id": "compute.routers.delete", - // "parameterOrder": [ - // "project", - // "region", - // "router" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "router": { - // "description": "Name of the Router resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/routers/{router}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.routers.get": - -type RoutersGetCall struct { - s *Service - project string - region string - router string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Router resource. Get a list of available -// routers by making a list() request. -func (r *RoutersService) Get(project string, region string, router string) *RoutersGetCall { - c := &RoutersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutersGetCall) Fields(s ...googleapi.Field) *RoutersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RoutersGetCall) IfNoneMatch(entityTag string) *RoutersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutersGetCall) Context(ctx context.Context) *RoutersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.get" call. -// Exactly one of *Router or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Router.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *RoutersGetCall) Do(opts ...googleapi.CallOption) (*Router, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Router{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified Router resource. Get a list of available routers by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.routers.get", - // "parameterOrder": [ - // "project", - // "region", - // "router" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "router": { - // "description": "Name of the Router resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/routers/{router}", - // "response": { - // "$ref": "Router" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.routers.getRouterStatus": - -type RoutersGetRouterStatusCall struct { - s *Service - project string - region string - router string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetRouterStatus: Retrieves runtime information of the specified -// router. -func (r *RoutersService) GetRouterStatus(project string, region string, router string) *RoutersGetRouterStatusCall { - c := &RoutersGetRouterStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutersGetRouterStatusCall) Fields(s ...googleapi.Field) *RoutersGetRouterStatusCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RoutersGetRouterStatusCall) IfNoneMatch(entityTag string) *RoutersGetRouterStatusCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutersGetRouterStatusCall) Context(ctx context.Context) *RoutersGetRouterStatusCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutersGetRouterStatusCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersGetRouterStatusCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}/getRouterStatus") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.getRouterStatus" call. -// Exactly one of *RouterStatusResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *RouterStatusResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RoutersGetRouterStatusCall) Do(opts ...googleapi.CallOption) (*RouterStatusResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RouterStatusResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves runtime information of the specified router.", - // "httpMethod": "GET", - // "id": "compute.routers.getRouterStatus", - // "parameterOrder": [ - // "project", - // "region", - // "router" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "router": { - // "description": "Name of the Router resource to query.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/routers/{router}/getRouterStatus", - // "response": { - // "$ref": "RouterStatusResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.routers.insert": - -type RoutersInsertCall struct { - s *Service - project string - region string - router *Router - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a Router resource in the specified project and region -// using the data included in the request. -func (r *RoutersService) Insert(project string, region string, router *Router) *RoutersInsertCall { - c := &RoutersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RoutersInsertCall) RequestId(requestId string) *RoutersInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutersInsertCall) Fields(s ...googleapi.Field) *RoutersInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutersInsertCall) Context(ctx context.Context) *RoutersInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.router) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RoutersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a Router resource in the specified project and region using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.routers.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/routers", - // "request": { - // "$ref": "Router" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.routers.list": - -type RoutersListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of Router resources available to the specified -// project. -func (r *RoutersService) List(project string, region string) *RoutersListCall { - c := &RoutersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RoutersListCall) Filter(filter string) *RoutersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RoutersListCall) MaxResults(maxResults int64) *RoutersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RoutersListCall) OrderBy(orderBy string) *RoutersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RoutersListCall) PageToken(pageToken string) *RoutersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutersListCall) Fields(s ...googleapi.Field) *RoutersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RoutersListCall) IfNoneMatch(entityTag string) *RoutersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutersListCall) Context(ctx context.Context) *RoutersListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.list" call. -// Exactly one of *RouterList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *RouterList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RoutersListCall) Do(opts ...googleapi.CallOption) (*RouterList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RouterList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of Router resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.routers.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/routers", - // "response": { - // "$ref": "RouterList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RoutersListCall) Pages(ctx context.Context, f func(*RouterList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.routers.patch": - -type RoutersPatchCall struct { - s *Service - project string - region string - router string - router2 *Router - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified Router resource with the data included -// in the request. This method supports PATCH semantics and uses JSON -// merge patch format and processing rules. -func (r *RoutersService) Patch(project string, region string, router string, router2 *Router) *RoutersPatchCall { - c := &RoutersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - c.router2 = router2 - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RoutersPatchCall) RequestId(requestId string) *RoutersPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutersPatchCall) Fields(s ...googleapi.Field) *RoutersPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutersPatchCall) Context(ctx context.Context) *RoutersPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutersPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.router2) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RoutersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.routers.patch", - // "parameterOrder": [ - // "project", - // "region", - // "router" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "router": { - // "description": "Name of the Router resource to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/routers/{router}", - // "request": { - // "$ref": "Router" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.routers.preview": - -type RoutersPreviewCall struct { - s *Service - project string - region string - router string - router2 *Router - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Preview: Preview fields auto-generated during router create and -// update operations. Calling this method does NOT create or update the -// router. -func (r *RoutersService) Preview(project string, region string, router string, router2 *Router) *RoutersPreviewCall { - c := &RoutersPreviewCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - c.router2 = router2 - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutersPreviewCall) Fields(s ...googleapi.Field) *RoutersPreviewCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutersPreviewCall) Context(ctx context.Context) *RoutersPreviewCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutersPreviewCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersPreviewCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.router2) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}/preview") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.preview" call. -// Exactly one of *RoutersPreviewResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *RoutersPreviewResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RoutersPreviewCall) Do(opts ...googleapi.CallOption) (*RoutersPreviewResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RoutersPreviewResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.", - // "httpMethod": "POST", - // "id": "compute.routers.preview", - // "parameterOrder": [ - // "project", - // "region", - // "router" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "router": { - // "description": "Name of the Router resource to query.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/routers/{router}/preview", - // "request": { - // "$ref": "Router" - // }, - // "response": { - // "$ref": "RoutersPreviewResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.routers.testIamPermissions": - -type RoutersTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *RoutersService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RoutersTestIamPermissionsCall { - c := &RoutersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutersTestIamPermissionsCall) Fields(s ...googleapi.Field) *RoutersTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutersTestIamPermissionsCall) Context(ctx context.Context) *RoutersTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutersTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RoutersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.routers.testIamPermissions", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/routers/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.routers.update": - -type RoutersUpdateCall struct { - s *Service - project string - region string - router string - router2 *Router - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified Router resource with the data included -// in the request. -func (r *RoutersService) Update(project string, region string, router string, router2 *Router) *RoutersUpdateCall { - c := &RoutersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - c.router2 = router2 - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RoutersUpdateCall) RequestId(requestId string) *RoutersUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutersUpdateCall) Fields(s ...googleapi.Field) *RoutersUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutersUpdateCall) Context(ctx context.Context) *RoutersUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutersUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.router2) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RoutersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the specified Router resource with the data included in the request.", - // "httpMethod": "PUT", - // "id": "compute.routers.update", - // "parameterOrder": [ - // "project", - // "region", - // "router" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "router": { - // "description": "Name of the Router resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/routers/{router}", - // "request": { - // "$ref": "Router" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.routes.delete": - -type RoutesDeleteCall struct { - s *Service - project string - route string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Route resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/routes/delete -func (r *RoutesService) Delete(project string, route string) *RoutesDeleteCall { - c := &RoutesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.route = route - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RoutesDeleteCall) RequestId(requestId string) *RoutesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutesDeleteCall) Fields(s ...googleapi.Field) *RoutesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutesDeleteCall) Context(ctx context.Context) *RoutesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes/{route}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "route": c.route, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routes.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RoutesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified Route resource.", - // "httpMethod": "DELETE", - // "id": "compute.routes.delete", - // "parameterOrder": [ - // "project", - // "route" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "route": { - // "description": "Name of the Route resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/routes/{route}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.routes.get": - -type RoutesGetCall struct { - s *Service - project string - route string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Route resource. Get a list of available -// routes by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/routes/get -func (r *RoutesService) Get(project string, route string) *RoutesGetCall { - c := &RoutesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.route = route - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutesGetCall) Fields(s ...googleapi.Field) *RoutesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RoutesGetCall) IfNoneMatch(entityTag string) *RoutesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutesGetCall) Context(ctx context.Context) *RoutesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes/{route}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "route": c.route, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routes.get" call. -// Exactly one of *Route or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Route.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *RoutesGetCall) Do(opts ...googleapi.CallOption) (*Route, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Route{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified Route resource. Get a list of available routes by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.routes.get", - // "parameterOrder": [ - // "project", - // "route" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "route": { - // "description": "Name of the Route resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/routes/{route}", - // "response": { - // "$ref": "Route" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.routes.insert": - -type RoutesInsertCall struct { - s *Service - project string - route *Route - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a Route resource in the specified project using the -// data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/routes/insert -func (r *RoutesService) Insert(project string, route *Route) *RoutesInsertCall { - c := &RoutesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.route = route - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RoutesInsertCall) RequestId(requestId string) *RoutesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutesInsertCall) Fields(s ...googleapi.Field) *RoutesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutesInsertCall) Context(ctx context.Context) *RoutesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.route) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routes.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RoutesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a Route resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.routes.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/routes", - // "request": { - // "$ref": "Route" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.routes.list": - -type RoutesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of Route resources available to the -// specified project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/routes/list -func (r *RoutesService) List(project string) *RoutesListCall { - c := &RoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RoutesListCall) Filter(filter string) *RoutesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RoutesListCall) MaxResults(maxResults int64) *RoutesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RoutesListCall) OrderBy(orderBy string) *RoutesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RoutesListCall) PageToken(pageToken string) *RoutesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutesListCall) Fields(s ...googleapi.Field) *RoutesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RoutesListCall) IfNoneMatch(entityTag string) *RoutesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutesListCall) Context(ctx context.Context) *RoutesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routes.list" call. -// Exactly one of *RouteList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *RouteList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RoutesListCall) Do(opts ...googleapi.CallOption) (*RouteList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RouteList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of Route resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.routes.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/routes", - // "response": { - // "$ref": "RouteList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RoutesListCall) Pages(ctx context.Context, f func(*RouteList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.routes.testIamPermissions": - -type RoutesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *RoutesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *RoutesTestIamPermissionsCall { - c := &RoutesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RoutesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutesTestIamPermissionsCall) Context(ctx context.Context) *RoutesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routes.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RoutesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.routes.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/routes/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.securityPolicies.delete": - -type SecurityPoliciesDeleteCall struct { - s *Service - project string - securityPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified policy. -func (r *SecurityPoliciesService) Delete(project string, securityPolicy string) *SecurityPoliciesDeleteCall { - c := &SecurityPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.securityPolicy = securityPolicy - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *SecurityPoliciesDeleteCall) RequestId(requestId string) *SecurityPoliciesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SecurityPoliciesDeleteCall) Fields(s ...googleapi.Field) *SecurityPoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SecurityPoliciesDeleteCall) Context(ctx context.Context) *SecurityPoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SecurityPoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/securityPolicies/{securityPolicy}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "securityPolicy": c.securityPolicy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SecurityPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified policy.", - // "httpMethod": "DELETE", - // "id": "compute.securityPolicies.delete", - // "parameterOrder": [ - // "project", - // "securityPolicy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "securityPolicy": { - // "description": "Name of the security policy to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/securityPolicies/{securityPolicy}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.securityPolicies.get": - -type SecurityPoliciesGetCall struct { - s *Service - project string - securityPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: List all of the ordered rules present in a single specified -// policy. -func (r *SecurityPoliciesService) Get(project string, securityPolicy string) *SecurityPoliciesGetCall { - c := &SecurityPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.securityPolicy = securityPolicy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SecurityPoliciesGetCall) Fields(s ...googleapi.Field) *SecurityPoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *SecurityPoliciesGetCall) IfNoneMatch(entityTag string) *SecurityPoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SecurityPoliciesGetCall) Context(ctx context.Context) *SecurityPoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SecurityPoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/securityPolicies/{securityPolicy}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "securityPolicy": c.securityPolicy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.get" call. -// Exactly one of *SecurityPolicy or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *SecurityPolicy.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *SecurityPoliciesGetCall) Do(opts ...googleapi.CallOption) (*SecurityPolicy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &SecurityPolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "List all of the ordered rules present in a single specified policy.", - // "httpMethod": "GET", - // "id": "compute.securityPolicies.get", - // "parameterOrder": [ - // "project", - // "securityPolicy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "securityPolicy": { - // "description": "Name of the security policy to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/securityPolicies/{securityPolicy}", - // "response": { - // "$ref": "SecurityPolicy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.securityPolicies.insert": - -type SecurityPoliciesInsertCall struct { - s *Service - project string - securitypolicy *SecurityPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new policy in the specified project using the data -// included in the request. -func (r *SecurityPoliciesService) Insert(project string, securitypolicy *SecurityPolicy) *SecurityPoliciesInsertCall { - c := &SecurityPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.securitypolicy = securitypolicy - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *SecurityPoliciesInsertCall) RequestId(requestId string) *SecurityPoliciesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SecurityPoliciesInsertCall) Fields(s ...googleapi.Field) *SecurityPoliciesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SecurityPoliciesInsertCall) Context(ctx context.Context) *SecurityPoliciesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SecurityPoliciesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.securitypolicy) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/securityPolicies") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SecurityPoliciesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a new policy in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.securityPolicies.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/securityPolicies", - // "request": { - // "$ref": "SecurityPolicy" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.securityPolicies.list": - -type SecurityPoliciesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: List all the policies that have been configured for the -// specified project. -func (r *SecurityPoliciesService) List(project string) *SecurityPoliciesListCall { - c := &SecurityPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *SecurityPoliciesListCall) Filter(filter string) *SecurityPoliciesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *SecurityPoliciesListCall) MaxResults(maxResults int64) *SecurityPoliciesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *SecurityPoliciesListCall) OrderBy(orderBy string) *SecurityPoliciesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *SecurityPoliciesListCall) PageToken(pageToken string) *SecurityPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SecurityPoliciesListCall) Fields(s ...googleapi.Field) *SecurityPoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *SecurityPoliciesListCall) IfNoneMatch(entityTag string) *SecurityPoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SecurityPoliciesListCall) Context(ctx context.Context) *SecurityPoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SecurityPoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/securityPolicies") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.list" call. -// Exactly one of *SecurityPoliciesList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *SecurityPoliciesList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *SecurityPoliciesListCall) Do(opts ...googleapi.CallOption) (*SecurityPoliciesList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &SecurityPoliciesList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "List all the policies that have been configured for the specified project.", - // "httpMethod": "GET", - // "id": "compute.securityPolicies.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/securityPolicies", - // "response": { - // "$ref": "SecurityPoliciesList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *SecurityPoliciesListCall) Pages(ctx context.Context, f func(*SecurityPoliciesList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.securityPolicies.patch": - -type SecurityPoliciesPatchCall struct { - s *Service - project string - securityPolicy string - securitypolicy *SecurityPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified policy with the data included in the -// request. -func (r *SecurityPoliciesService) Patch(project string, securityPolicy string, securitypolicy *SecurityPolicy) *SecurityPoliciesPatchCall { - c := &SecurityPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.securityPolicy = securityPolicy - c.securitypolicy = securitypolicy - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *SecurityPoliciesPatchCall) RequestId(requestId string) *SecurityPoliciesPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SecurityPoliciesPatchCall) Fields(s ...googleapi.Field) *SecurityPoliciesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SecurityPoliciesPatchCall) Context(ctx context.Context) *SecurityPoliciesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SecurityPoliciesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.securitypolicy) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/securityPolicies/{securityPolicy}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "securityPolicy": c.securityPolicy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SecurityPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Patches the specified policy with the data included in the request.", - // "httpMethod": "PATCH", - // "id": "compute.securityPolicies.patch", - // "parameterOrder": [ - // "project", - // "securityPolicy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "securityPolicy": { - // "description": "Name of the security policy to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/securityPolicies/{securityPolicy}", - // "request": { - // "$ref": "SecurityPolicy" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.securityPolicies.testIamPermissions": - -type SecurityPoliciesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *SecurityPoliciesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *SecurityPoliciesTestIamPermissionsCall { - c := &SecurityPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SecurityPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *SecurityPoliciesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SecurityPoliciesTestIamPermissionsCall) Context(ctx context.Context) *SecurityPoliciesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SecurityPoliciesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/securityPolicies/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *SecurityPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.securityPolicies.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/securityPolicies/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.snapshots.delete": - -type SnapshotsDeleteCall struct { - s *Service - project string - snapshot string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Snapshot resource. Keep in mind that -// deleting a single snapshot might not necessarily delete all the data -// on that snapshot. If any data on the snapshot that is marked for -// deletion is needed for subsequent snapshots, the data will be moved -// to the next corresponding snapshot. -// -// For more information, see Deleting snaphots. -// For details, see https://cloud.google.com/compute/docs/reference/latest/snapshots/delete -func (r *SnapshotsService) Delete(project string, snapshot string) *SnapshotsDeleteCall { - c := &SnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.snapshot = snapshot - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *SnapshotsDeleteCall) RequestId(requestId string) *SnapshotsDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SnapshotsDeleteCall) Fields(s ...googleapi.Field) *SnapshotsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SnapshotsDeleteCall) Context(ctx context.Context) *SnapshotsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SnapshotsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{snapshot}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "snapshot": c.snapshot, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SnapshotsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.\n\nFor more information, see Deleting snaphots.", - // "httpMethod": "DELETE", - // "id": "compute.snapshots.delete", - // "parameterOrder": [ - // "project", - // "snapshot" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "snapshot": { - // "description": "Name of the Snapshot resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/snapshots/{snapshot}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.snapshots.get": - -type SnapshotsGetCall struct { - s *Service - project string - snapshot string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Snapshot resource. Get a list of available -// snapshots by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/snapshots/get -func (r *SnapshotsService) Get(project string, snapshot string) *SnapshotsGetCall { - c := &SnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.snapshot = snapshot - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SnapshotsGetCall) Fields(s ...googleapi.Field) *SnapshotsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *SnapshotsGetCall) IfNoneMatch(entityTag string) *SnapshotsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SnapshotsGetCall) Context(ctx context.Context) *SnapshotsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SnapshotsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{snapshot}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "snapshot": c.snapshot, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.get" call. -// Exactly one of *Snapshot or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Snapshot.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SnapshotsGetCall) Do(opts ...googleapi.CallOption) (*Snapshot, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Snapshot{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified Snapshot resource. Get a list of available snapshots by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.snapshots.get", - // "parameterOrder": [ - // "project", - // "snapshot" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "snapshot": { - // "description": "Name of the Snapshot resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/snapshots/{snapshot}", - // "response": { - // "$ref": "Snapshot" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.snapshots.getIamPolicy": - -type SnapshotsGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. -func (r *SnapshotsService) GetIamPolicy(project string, resource string) *SnapshotsGetIamPolicyCall { - c := &SnapshotsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SnapshotsGetIamPolicyCall) Fields(s ...googleapi.Field) *SnapshotsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *SnapshotsGetIamPolicyCall) IfNoneMatch(entityTag string) *SnapshotsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SnapshotsGetIamPolicyCall) Context(ctx context.Context) *SnapshotsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SnapshotsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *SnapshotsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - // "httpMethod": "GET", - // "id": "compute.snapshots.getIamPolicy", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/snapshots/{resource}/getIamPolicy", - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.snapshots.list": - -type SnapshotsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of Snapshot resources contained within the -// specified project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/snapshots/list -func (r *SnapshotsService) List(project string) *SnapshotsListCall { - c := &SnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *SnapshotsListCall) Filter(filter string) *SnapshotsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *SnapshotsListCall) MaxResults(maxResults int64) *SnapshotsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *SnapshotsListCall) OrderBy(orderBy string) *SnapshotsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *SnapshotsListCall) PageToken(pageToken string) *SnapshotsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SnapshotsListCall) Fields(s ...googleapi.Field) *SnapshotsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *SnapshotsListCall) IfNoneMatch(entityTag string) *SnapshotsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SnapshotsListCall) Context(ctx context.Context) *SnapshotsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SnapshotsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.list" call. -// Exactly one of *SnapshotList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *SnapshotList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SnapshotsListCall) Do(opts ...googleapi.CallOption) (*SnapshotList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &SnapshotList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of Snapshot resources contained within the specified project.", - // "httpMethod": "GET", - // "id": "compute.snapshots.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/snapshots", - // "response": { - // "$ref": "SnapshotList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *SnapshotsListCall) Pages(ctx context.Context, f func(*SnapshotList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.snapshots.setIamPolicy": - -type SnapshotsSetIamPolicyCall struct { - s *Service - project string - resource string - policy *Policy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. -func (r *SnapshotsService) SetIamPolicy(project string, resource string, policy *Policy) *SnapshotsSetIamPolicyCall { - c := &SnapshotsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.policy = policy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SnapshotsSetIamPolicyCall) Fields(s ...googleapi.Field) *SnapshotsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SnapshotsSetIamPolicyCall) Context(ctx context.Context) *SnapshotsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SnapshotsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{resource}/setIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *SnapshotsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - // "httpMethod": "POST", - // "id": "compute.snapshots.setIamPolicy", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/snapshots/{resource}/setIamPolicy", - // "request": { - // "$ref": "Policy" - // }, - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.snapshots.setLabels": - -type SnapshotsSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a snapshot. To learn more about labels, -// read the Labeling Resources documentation. -func (r *SnapshotsService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *SnapshotsSetLabelsCall { - c := &SnapshotsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SnapshotsSetLabelsCall) Fields(s ...googleapi.Field) *SnapshotsSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SnapshotsSetLabelsCall) Context(ctx context.Context) *SnapshotsSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SnapshotsSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetlabelsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{resource}/setLabels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.setLabels" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SnapshotsSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation.", - // "httpMethod": "POST", - // "id": "compute.snapshots.setLabels", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/snapshots/{resource}/setLabels", - // "request": { - // "$ref": "GlobalSetLabelsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.snapshots.testIamPermissions": - -type SnapshotsTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *SnapshotsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *SnapshotsTestIamPermissionsCall { - c := &SnapshotsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SnapshotsTestIamPermissionsCall) Fields(s ...googleapi.Field) *SnapshotsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SnapshotsTestIamPermissionsCall) Context(ctx context.Context) *SnapshotsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SnapshotsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *SnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.snapshots.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/snapshots/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.sslCertificates.delete": - -type SslCertificatesDeleteCall struct { - s *Service - project string - sslCertificate string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified SslCertificate resource. -func (r *SslCertificatesService) Delete(project string, sslCertificate string) *SslCertificatesDeleteCall { - c := &SslCertificatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.sslCertificate = sslCertificate - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *SslCertificatesDeleteCall) RequestId(requestId string) *SslCertificatesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SslCertificatesDeleteCall) Fields(s ...googleapi.Field) *SslCertificatesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SslCertificatesDeleteCall) Context(ctx context.Context) *SslCertificatesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SslCertificatesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertificatesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslCertificates/{sslCertificate}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "sslCertificate": c.sslCertificate, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslCertificates.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SslCertificatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified SslCertificate resource.", - // "httpMethod": "DELETE", - // "id": "compute.sslCertificates.delete", - // "parameterOrder": [ - // "project", - // "sslCertificate" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "sslCertificate": { - // "description": "Name of the SslCertificate resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/sslCertificates/{sslCertificate}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.sslCertificates.get": - -type SslCertificatesGetCall struct { - s *Service - project string - sslCertificate string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified SslCertificate resource. Get a list of -// available SSL certificates by making a list() request. -func (r *SslCertificatesService) Get(project string, sslCertificate string) *SslCertificatesGetCall { - c := &SslCertificatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.sslCertificate = sslCertificate - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SslCertificatesGetCall) Fields(s ...googleapi.Field) *SslCertificatesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *SslCertificatesGetCall) IfNoneMatch(entityTag string) *SslCertificatesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SslCertificatesGetCall) Context(ctx context.Context) *SslCertificatesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SslCertificatesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertificatesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslCertificates/{sslCertificate}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "sslCertificate": c.sslCertificate, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslCertificates.get" call. -// Exactly one of *SslCertificate or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *SslCertificate.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *SslCertificatesGetCall) Do(opts ...googleapi.CallOption) (*SslCertificate, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &SslCertificate{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified SslCertificate resource. Get a list of available SSL certificates by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.sslCertificates.get", - // "parameterOrder": [ - // "project", - // "sslCertificate" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "sslCertificate": { - // "description": "Name of the SslCertificate resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/sslCertificates/{sslCertificate}", - // "response": { - // "$ref": "SslCertificate" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.sslCertificates.insert": - -type SslCertificatesInsertCall struct { - s *Service - project string - sslcertificate *SslCertificate - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a SslCertificate resource in the specified project -// using the data included in the request. -func (r *SslCertificatesService) Insert(project string, sslcertificate *SslCertificate) *SslCertificatesInsertCall { - c := &SslCertificatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.sslcertificate = sslcertificate - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *SslCertificatesInsertCall) RequestId(requestId string) *SslCertificatesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SslCertificatesInsertCall) Fields(s ...googleapi.Field) *SslCertificatesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SslCertificatesInsertCall) Context(ctx context.Context) *SslCertificatesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SslCertificatesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertificatesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.sslcertificate) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslCertificates") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslCertificates.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SslCertificatesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a SslCertificate resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.sslCertificates.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/sslCertificates", - // "request": { - // "$ref": "SslCertificate" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.sslCertificates.list": - -type SslCertificatesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of SslCertificate resources available to the -// specified project. -func (r *SslCertificatesService) List(project string) *SslCertificatesListCall { - c := &SslCertificatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *SslCertificatesListCall) Filter(filter string) *SslCertificatesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *SslCertificatesListCall) MaxResults(maxResults int64) *SslCertificatesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *SslCertificatesListCall) OrderBy(orderBy string) *SslCertificatesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *SslCertificatesListCall) PageToken(pageToken string) *SslCertificatesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SslCertificatesListCall) Fields(s ...googleapi.Field) *SslCertificatesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *SslCertificatesListCall) IfNoneMatch(entityTag string) *SslCertificatesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SslCertificatesListCall) Context(ctx context.Context) *SslCertificatesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SslCertificatesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertificatesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslCertificates") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslCertificates.list" call. -// Exactly one of *SslCertificateList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *SslCertificateList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *SslCertificatesListCall) Do(opts ...googleapi.CallOption) (*SslCertificateList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &SslCertificateList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of SslCertificate resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.sslCertificates.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/sslCertificates", - // "response": { - // "$ref": "SslCertificateList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *SslCertificatesListCall) Pages(ctx context.Context, f func(*SslCertificateList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.sslCertificates.testIamPermissions": - -type SslCertificatesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *SslCertificatesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *SslCertificatesTestIamPermissionsCall { - c := &SslCertificatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SslCertificatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *SslCertificatesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SslCertificatesTestIamPermissionsCall) Context(ctx context.Context) *SslCertificatesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SslCertificatesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertificatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslCertificates/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslCertificates.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *SslCertificatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.sslCertificates.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/sslCertificates/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.subnetworks.aggregatedList": - -type SubnetworksAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of subnetworks. -func (r *SubnetworksService) AggregatedList(project string) *SubnetworksAggregatedListCall { - c := &SubnetworksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *SubnetworksAggregatedListCall) Filter(filter string) *SubnetworksAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *SubnetworksAggregatedListCall) MaxResults(maxResults int64) *SubnetworksAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *SubnetworksAggregatedListCall) OrderBy(orderBy string) *SubnetworksAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *SubnetworksAggregatedListCall) PageToken(pageToken string) *SubnetworksAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SubnetworksAggregatedListCall) Fields(s ...googleapi.Field) *SubnetworksAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *SubnetworksAggregatedListCall) IfNoneMatch(entityTag string) *SubnetworksAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SubnetworksAggregatedListCall) Context(ctx context.Context) *SubnetworksAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SubnetworksAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/subnetworks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.aggregatedList" call. -// Exactly one of *SubnetworkAggregatedList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *SubnetworkAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *SubnetworksAggregatedListCall) Do(opts ...googleapi.CallOption) (*SubnetworkAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &SubnetworkAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of subnetworks.", - // "httpMethod": "GET", - // "id": "compute.subnetworks.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/subnetworks", - // "response": { - // "$ref": "SubnetworkAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *SubnetworksAggregatedListCall) Pages(ctx context.Context, f func(*SubnetworkAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.subnetworks.delete": - -type SubnetworksDeleteCall struct { - s *Service - project string - region string - subnetwork string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified subnetwork. -func (r *SubnetworksService) Delete(project string, region string, subnetwork string) *SubnetworksDeleteCall { - c := &SubnetworksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.subnetwork = subnetwork - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *SubnetworksDeleteCall) RequestId(requestId string) *SubnetworksDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SubnetworksDeleteCall) Fields(s ...googleapi.Field) *SubnetworksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SubnetworksDeleteCall) Context(ctx context.Context) *SubnetworksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SubnetworksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{subnetwork}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "subnetwork": c.subnetwork, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SubnetworksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified subnetwork.", - // "httpMethod": "DELETE", - // "id": "compute.subnetworks.delete", - // "parameterOrder": [ - // "project", - // "region", - // "subnetwork" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "subnetwork": { - // "description": "Name of the Subnetwork resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/subnetworks/{subnetwork}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.subnetworks.expandIpCidrRange": - -type SubnetworksExpandIpCidrRangeCall struct { - s *Service - project string - region string - subnetwork string - subnetworksexpandipcidrrangerequest *SubnetworksExpandIpCidrRangeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ExpandIpCidrRange: Expands the IP CIDR range of the subnetwork to a -// specified value. -func (r *SubnetworksService) ExpandIpCidrRange(project string, region string, subnetwork string, subnetworksexpandipcidrrangerequest *SubnetworksExpandIpCidrRangeRequest) *SubnetworksExpandIpCidrRangeCall { - c := &SubnetworksExpandIpCidrRangeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.subnetwork = subnetwork - c.subnetworksexpandipcidrrangerequest = subnetworksexpandipcidrrangerequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *SubnetworksExpandIpCidrRangeCall) RequestId(requestId string) *SubnetworksExpandIpCidrRangeCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SubnetworksExpandIpCidrRangeCall) Fields(s ...googleapi.Field) *SubnetworksExpandIpCidrRangeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SubnetworksExpandIpCidrRangeCall) Context(ctx context.Context) *SubnetworksExpandIpCidrRangeCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SubnetworksExpandIpCidrRangeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksExpandIpCidrRangeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.subnetworksexpandipcidrrangerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{subnetwork}/expandIpCidrRange") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "subnetwork": c.subnetwork, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.expandIpCidrRange" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SubnetworksExpandIpCidrRangeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Expands the IP CIDR range of the subnetwork to a specified value.", - // "httpMethod": "POST", - // "id": "compute.subnetworks.expandIpCidrRange", - // "parameterOrder": [ - // "project", - // "region", - // "subnetwork" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "subnetwork": { - // "description": "Name of the Subnetwork resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/subnetworks/{subnetwork}/expandIpCidrRange", - // "request": { - // "$ref": "SubnetworksExpandIpCidrRangeRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.subnetworks.get": - -type SubnetworksGetCall struct { - s *Service - project string - region string - subnetwork string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified subnetwork. Get a list of available -// subnetworks list() request. -func (r *SubnetworksService) Get(project string, region string, subnetwork string) *SubnetworksGetCall { - c := &SubnetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.subnetwork = subnetwork - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SubnetworksGetCall) Fields(s ...googleapi.Field) *SubnetworksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *SubnetworksGetCall) IfNoneMatch(entityTag string) *SubnetworksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SubnetworksGetCall) Context(ctx context.Context) *SubnetworksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SubnetworksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{subnetwork}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "subnetwork": c.subnetwork, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.get" call. -// Exactly one of *Subnetwork or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Subnetwork.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SubnetworksGetCall) Do(opts ...googleapi.CallOption) (*Subnetwork, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Subnetwork{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified subnetwork. Get a list of available subnetworks list() request.", - // "httpMethod": "GET", - // "id": "compute.subnetworks.get", - // "parameterOrder": [ - // "project", - // "region", - // "subnetwork" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "subnetwork": { - // "description": "Name of the Subnetwork resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/subnetworks/{subnetwork}", - // "response": { - // "$ref": "Subnetwork" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.subnetworks.getIamPolicy": - -type SubnetworksGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. -func (r *SubnetworksService) GetIamPolicy(project string, region string, resource string) *SubnetworksGetIamPolicyCall { - c := &SubnetworksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SubnetworksGetIamPolicyCall) Fields(s ...googleapi.Field) *SubnetworksGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *SubnetworksGetIamPolicyCall) IfNoneMatch(entityTag string) *SubnetworksGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SubnetworksGetIamPolicyCall) Context(ctx context.Context) *SubnetworksGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SubnetworksGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *SubnetworksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - // "httpMethod": "GET", - // "id": "compute.subnetworks.getIamPolicy", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/subnetworks/{resource}/getIamPolicy", - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.subnetworks.insert": - -type SubnetworksInsertCall struct { - s *Service - project string - region string - subnetwork *Subnetwork - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a subnetwork in the specified project using the data -// included in the request. -func (r *SubnetworksService) Insert(project string, region string, subnetwork *Subnetwork) *SubnetworksInsertCall { - c := &SubnetworksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.subnetwork = subnetwork - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *SubnetworksInsertCall) RequestId(requestId string) *SubnetworksInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SubnetworksInsertCall) Fields(s ...googleapi.Field) *SubnetworksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SubnetworksInsertCall) Context(ctx context.Context) *SubnetworksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SubnetworksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.subnetwork) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SubnetworksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a subnetwork in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.subnetworks.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/subnetworks", - // "request": { - // "$ref": "Subnetwork" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.subnetworks.list": - -type SubnetworksListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of subnetworks available to the specified -// project. -func (r *SubnetworksService) List(project string, region string) *SubnetworksListCall { - c := &SubnetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *SubnetworksListCall) Filter(filter string) *SubnetworksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *SubnetworksListCall) MaxResults(maxResults int64) *SubnetworksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *SubnetworksListCall) OrderBy(orderBy string) *SubnetworksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *SubnetworksListCall) PageToken(pageToken string) *SubnetworksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SubnetworksListCall) Fields(s ...googleapi.Field) *SubnetworksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *SubnetworksListCall) IfNoneMatch(entityTag string) *SubnetworksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SubnetworksListCall) Context(ctx context.Context) *SubnetworksListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SubnetworksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.list" call. -// Exactly one of *SubnetworkList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *SubnetworkList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *SubnetworksListCall) Do(opts ...googleapi.CallOption) (*SubnetworkList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &SubnetworkList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of subnetworks available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.subnetworks.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/subnetworks", - // "response": { - // "$ref": "SubnetworkList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *SubnetworksListCall) Pages(ctx context.Context, f func(*SubnetworkList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.subnetworks.patch": - -type SubnetworksPatchCall struct { - s *Service - project string - region string - subnetwork string - subnetwork2 *Subnetwork - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified subnetwork with the data included in the -// request. Only the following fields within the subnetwork resource can -// be specified in the request: secondary_ip_range and -// allow_subnet_cidr_routes_overlap. It is also mandatory to specify the -// current fingeprint of the subnetwork resource being patched. -func (r *SubnetworksService) Patch(project string, region string, subnetwork string, subnetwork2 *Subnetwork) *SubnetworksPatchCall { - c := &SubnetworksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.subnetwork = subnetwork - c.subnetwork2 = subnetwork2 - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *SubnetworksPatchCall) RequestId(requestId string) *SubnetworksPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SubnetworksPatchCall) Fields(s ...googleapi.Field) *SubnetworksPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SubnetworksPatchCall) Context(ctx context.Context) *SubnetworksPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SubnetworksPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.subnetwork2) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{subnetwork}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "subnetwork": c.subnetwork, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SubnetworksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Patches the specified subnetwork with the data included in the request. Only the following fields within the subnetwork resource can be specified in the request: secondary_ip_range and allow_subnet_cidr_routes_overlap. It is also mandatory to specify the current fingeprint of the subnetwork resource being patched.", - // "httpMethod": "PATCH", - // "id": "compute.subnetworks.patch", - // "parameterOrder": [ - // "project", - // "region", - // "subnetwork" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "subnetwork": { - // "description": "Name of the Subnetwork resource to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/subnetworks/{subnetwork}", - // "request": { - // "$ref": "Subnetwork" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.subnetworks.setIamPolicy": - -type SubnetworksSetIamPolicyCall struct { - s *Service - project string - region string - resource string - policy *Policy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. -func (r *SubnetworksService) SetIamPolicy(project string, region string, resource string, policy *Policy) *SubnetworksSetIamPolicyCall { - c := &SubnetworksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.policy = policy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SubnetworksSetIamPolicyCall) Fields(s ...googleapi.Field) *SubnetworksSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SubnetworksSetIamPolicyCall) Context(ctx context.Context) *SubnetworksSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SubnetworksSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{resource}/setIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *SubnetworksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - // "httpMethod": "POST", - // "id": "compute.subnetworks.setIamPolicy", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/subnetworks/{resource}/setIamPolicy", - // "request": { - // "$ref": "Policy" - // }, - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.subnetworks.setPrivateIpGoogleAccess": - -type SubnetworksSetPrivateIpGoogleAccessCall struct { - s *Service - project string - region string - subnetwork string - subnetworkssetprivateipgoogleaccessrequest *SubnetworksSetPrivateIpGoogleAccessRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetPrivateIpGoogleAccess: Set whether VMs in this subnet can access -// Google services without assigning external IP addresses through -// Private Google Access. -func (r *SubnetworksService) SetPrivateIpGoogleAccess(project string, region string, subnetwork string, subnetworkssetprivateipgoogleaccessrequest *SubnetworksSetPrivateIpGoogleAccessRequest) *SubnetworksSetPrivateIpGoogleAccessCall { - c := &SubnetworksSetPrivateIpGoogleAccessCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.subnetwork = subnetwork - c.subnetworkssetprivateipgoogleaccessrequest = subnetworkssetprivateipgoogleaccessrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *SubnetworksSetPrivateIpGoogleAccessCall) RequestId(requestId string) *SubnetworksSetPrivateIpGoogleAccessCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SubnetworksSetPrivateIpGoogleAccessCall) Fields(s ...googleapi.Field) *SubnetworksSetPrivateIpGoogleAccessCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SubnetworksSetPrivateIpGoogleAccessCall) Context(ctx context.Context) *SubnetworksSetPrivateIpGoogleAccessCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SubnetworksSetPrivateIpGoogleAccessCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksSetPrivateIpGoogleAccessCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.subnetworkssetprivateipgoogleaccessrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{subnetwork}/setPrivateIpGoogleAccess") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "subnetwork": c.subnetwork, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.setPrivateIpGoogleAccess" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SubnetworksSetPrivateIpGoogleAccessCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access.", - // "httpMethod": "POST", - // "id": "compute.subnetworks.setPrivateIpGoogleAccess", - // "parameterOrder": [ - // "project", - // "region", - // "subnetwork" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "subnetwork": { - // "description": "Name of the Subnetwork resource.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/subnetworks/{subnetwork}/setPrivateIpGoogleAccess", - // "request": { - // "$ref": "SubnetworksSetPrivateIpGoogleAccessRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.subnetworks.testIamPermissions": - -type SubnetworksTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *SubnetworksService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *SubnetworksTestIamPermissionsCall { - c := &SubnetworksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SubnetworksTestIamPermissionsCall) Fields(s ...googleapi.Field) *SubnetworksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SubnetworksTestIamPermissionsCall) Context(ctx context.Context) *SubnetworksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SubnetworksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *SubnetworksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.subnetworks.testIamPermissions", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/subnetworks/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetHttpProxies.delete": - -type TargetHttpProxiesDeleteCall struct { - s *Service - project string - targetHttpProxy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetHttpProxy resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/delete -func (r *TargetHttpProxiesService) Delete(project string, targetHttpProxy string) *TargetHttpProxiesDeleteCall { - c := &TargetHttpProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpProxy = targetHttpProxy - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetHttpProxiesDeleteCall) RequestId(requestId string) *TargetHttpProxiesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetHttpProxiesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpProxiesDeleteCall) Context(ctx context.Context) *TargetHttpProxiesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpProxiesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies/{targetHttpProxy}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetHttpProxy": c.targetHttpProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetHttpProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified TargetHttpProxy resource.", - // "httpMethod": "DELETE", - // "id": "compute.targetHttpProxies.delete", - // "parameterOrder": [ - // "project", - // "targetHttpProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetHttpProxy": { - // "description": "Name of the TargetHttpProxy resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetHttpProxies/{targetHttpProxy}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetHttpProxies.get": - -type TargetHttpProxiesGetCall struct { - s *Service - project string - targetHttpProxy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetHttpProxy resource. Get a list of -// available target HTTP proxies by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/get -func (r *TargetHttpProxiesService) Get(project string, targetHttpProxy string) *TargetHttpProxiesGetCall { - c := &TargetHttpProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpProxy = targetHttpProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpProxiesGetCall) Fields(s ...googleapi.Field) *TargetHttpProxiesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetHttpProxiesGetCall) IfNoneMatch(entityTag string) *TargetHttpProxiesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpProxiesGetCall) Context(ctx context.Context) *TargetHttpProxiesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpProxiesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies/{targetHttpProxy}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetHttpProxy": c.targetHttpProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.get" call. -// Exactly one of *TargetHttpProxy or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *TargetHttpProxy.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetHttpProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHttpProxy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetHttpProxy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified TargetHttpProxy resource. Get a list of available target HTTP proxies by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.targetHttpProxies.get", - // "parameterOrder": [ - // "project", - // "targetHttpProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "targetHttpProxy": { - // "description": "Name of the TargetHttpProxy resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetHttpProxies/{targetHttpProxy}", - // "response": { - // "$ref": "TargetHttpProxy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetHttpProxies.insert": - -type TargetHttpProxiesInsertCall struct { - s *Service - project string - targethttpproxy *TargetHttpProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetHttpProxy resource in the specified project -// using the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/insert -func (r *TargetHttpProxiesService) Insert(project string, targethttpproxy *TargetHttpProxy) *TargetHttpProxiesInsertCall { - c := &TargetHttpProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targethttpproxy = targethttpproxy - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetHttpProxiesInsertCall) RequestId(requestId string) *TargetHttpProxiesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpProxiesInsertCall) Fields(s ...googleapi.Field) *TargetHttpProxiesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpProxiesInsertCall) Context(ctx context.Context) *TargetHttpProxiesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpProxiesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targethttpproxy) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetHttpProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a TargetHttpProxy resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.targetHttpProxies.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/targetHttpProxies", - // "request": { - // "$ref": "TargetHttpProxy" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetHttpProxies.list": - -type TargetHttpProxiesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of TargetHttpProxy resources available to -// the specified project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/list -func (r *TargetHttpProxiesService) List(project string) *TargetHttpProxiesListCall { - c := &TargetHttpProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *TargetHttpProxiesListCall) Filter(filter string) *TargetHttpProxiesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *TargetHttpProxiesListCall) MaxResults(maxResults int64) *TargetHttpProxiesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *TargetHttpProxiesListCall) OrderBy(orderBy string) *TargetHttpProxiesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *TargetHttpProxiesListCall) PageToken(pageToken string) *TargetHttpProxiesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpProxiesListCall) Fields(s ...googleapi.Field) *TargetHttpProxiesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetHttpProxiesListCall) IfNoneMatch(entityTag string) *TargetHttpProxiesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpProxiesListCall) Context(ctx context.Context) *TargetHttpProxiesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpProxiesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.list" call. -// Exactly one of *TargetHttpProxyList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TargetHttpProxyList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetHttpProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHttpProxyList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetHttpProxyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of TargetHttpProxy resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.targetHttpProxies.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetHttpProxies", - // "response": { - // "$ref": "TargetHttpProxyList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *TargetHttpProxiesListCall) Pages(ctx context.Context, f func(*TargetHttpProxyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.targetHttpProxies.setUrlMap": - -type TargetHttpProxiesSetUrlMapCall struct { - s *Service - project string - targetHttpProxy string - urlmapreference *UrlMapReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetUrlMap: Changes the URL map for TargetHttpProxy. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/setUrlMap -func (r *TargetHttpProxiesService) SetUrlMap(project string, targetHttpProxy string, urlmapreference *UrlMapReference) *TargetHttpProxiesSetUrlMapCall { - c := &TargetHttpProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpProxy = targetHttpProxy - c.urlmapreference = urlmapreference - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetHttpProxiesSetUrlMapCall) RequestId(requestId string) *TargetHttpProxiesSetUrlMapCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpProxiesSetUrlMapCall) Fields(s ...googleapi.Field) *TargetHttpProxiesSetUrlMapCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpProxiesSetUrlMapCall) Context(ctx context.Context) *TargetHttpProxiesSetUrlMapCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpProxiesSetUrlMapCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapreference) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetHttpProxy": c.targetHttpProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.setUrlMap" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetHttpProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes the URL map for TargetHttpProxy.", - // "httpMethod": "POST", - // "id": "compute.targetHttpProxies.setUrlMap", - // "parameterOrder": [ - // "project", - // "targetHttpProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetHttpProxy": { - // "description": "Name of the TargetHttpProxy to set a URL map for.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap", - // "request": { - // "$ref": "UrlMapReference" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetHttpProxies.testIamPermissions": - -type TargetHttpProxiesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *TargetHttpProxiesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetHttpProxiesTestIamPermissionsCall { - c := &TargetHttpProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpProxiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetHttpProxiesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpProxiesTestIamPermissionsCall) Context(ctx context.Context) *TargetHttpProxiesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpProxiesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetHttpProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.targetHttpProxies.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetHttpProxies/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetHttpsProxies.delete": - -type TargetHttpsProxiesDeleteCall struct { - s *Service - project string - targetHttpsProxy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetHttpsProxy resource. -func (r *TargetHttpsProxiesService) Delete(project string, targetHttpsProxy string) *TargetHttpsProxiesDeleteCall { - c := &TargetHttpsProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpsProxy = targetHttpsProxy - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetHttpsProxiesDeleteCall) RequestId(requestId string) *TargetHttpsProxiesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpsProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpsProxiesDeleteCall) Context(ctx context.Context) *TargetHttpsProxiesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpsProxiesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies/{targetHttpsProxy}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetHttpsProxy": c.targetHttpsProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetHttpsProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified TargetHttpsProxy resource.", - // "httpMethod": "DELETE", - // "id": "compute.targetHttpsProxies.delete", - // "parameterOrder": [ - // "project", - // "targetHttpsProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetHttpsProxy": { - // "description": "Name of the TargetHttpsProxy resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetHttpsProxies/{targetHttpsProxy}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetHttpsProxies.get": - -type TargetHttpsProxiesGetCall struct { - s *Service - project string - targetHttpsProxy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetHttpsProxy resource. Get a list of -// available target HTTPS proxies by making a list() request. -func (r *TargetHttpsProxiesService) Get(project string, targetHttpsProxy string) *TargetHttpsProxiesGetCall { - c := &TargetHttpsProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpsProxy = targetHttpsProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpsProxiesGetCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetHttpsProxiesGetCall) IfNoneMatch(entityTag string) *TargetHttpsProxiesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpsProxiesGetCall) Context(ctx context.Context) *TargetHttpsProxiesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpsProxiesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies/{targetHttpsProxy}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetHttpsProxy": c.targetHttpsProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.get" call. -// Exactly one of *TargetHttpsProxy or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TargetHttpsProxy.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetHttpsProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHttpsProxy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetHttpsProxy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified TargetHttpsProxy resource. Get a list of available target HTTPS proxies by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.targetHttpsProxies.get", - // "parameterOrder": [ - // "project", - // "targetHttpsProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "targetHttpsProxy": { - // "description": "Name of the TargetHttpsProxy resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetHttpsProxies/{targetHttpsProxy}", - // "response": { - // "$ref": "TargetHttpsProxy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetHttpsProxies.insert": - -type TargetHttpsProxiesInsertCall struct { - s *Service - project string - targethttpsproxy *TargetHttpsProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetHttpsProxy resource in the specified project -// using the data included in the request. -func (r *TargetHttpsProxiesService) Insert(project string, targethttpsproxy *TargetHttpsProxy) *TargetHttpsProxiesInsertCall { - c := &TargetHttpsProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targethttpsproxy = targethttpsproxy - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetHttpsProxiesInsertCall) RequestId(requestId string) *TargetHttpsProxiesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpsProxiesInsertCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpsProxiesInsertCall) Context(ctx context.Context) *TargetHttpsProxiesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpsProxiesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targethttpsproxy) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetHttpsProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a TargetHttpsProxy resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.targetHttpsProxies.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/targetHttpsProxies", - // "request": { - // "$ref": "TargetHttpsProxy" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetHttpsProxies.list": - -type TargetHttpsProxiesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of TargetHttpsProxy resources available to -// the specified project. -func (r *TargetHttpsProxiesService) List(project string) *TargetHttpsProxiesListCall { - c := &TargetHttpsProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *TargetHttpsProxiesListCall) Filter(filter string) *TargetHttpsProxiesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *TargetHttpsProxiesListCall) MaxResults(maxResults int64) *TargetHttpsProxiesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *TargetHttpsProxiesListCall) OrderBy(orderBy string) *TargetHttpsProxiesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *TargetHttpsProxiesListCall) PageToken(pageToken string) *TargetHttpsProxiesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpsProxiesListCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetHttpsProxiesListCall) IfNoneMatch(entityTag string) *TargetHttpsProxiesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpsProxiesListCall) Context(ctx context.Context) *TargetHttpsProxiesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpsProxiesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.list" call. -// Exactly one of *TargetHttpsProxyList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TargetHttpsProxyList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetHttpsProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHttpsProxyList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetHttpsProxyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.targetHttpsProxies.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetHttpsProxies", - // "response": { - // "$ref": "TargetHttpsProxyList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *TargetHttpsProxiesListCall) Pages(ctx context.Context, f func(*TargetHttpsProxyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.targetHttpsProxies.setQuicOverride": - -type TargetHttpsProxiesSetQuicOverrideCall struct { - s *Service - project string - targetHttpsProxy string - targethttpsproxiessetquicoverriderequest *TargetHttpsProxiesSetQuicOverrideRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetQuicOverride: Sets the QUIC override policy for TargetHttpsProxy. -func (r *TargetHttpsProxiesService) SetQuicOverride(project string, targetHttpsProxy string, targethttpsproxiessetquicoverriderequest *TargetHttpsProxiesSetQuicOverrideRequest) *TargetHttpsProxiesSetQuicOverrideCall { - c := &TargetHttpsProxiesSetQuicOverrideCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpsProxy = targetHttpsProxy - c.targethttpsproxiessetquicoverriderequest = targethttpsproxiessetquicoverriderequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpsProxiesSetQuicOverrideCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesSetQuicOverrideCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpsProxiesSetQuicOverrideCall) Context(ctx context.Context) *TargetHttpsProxiesSetQuicOverrideCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpsProxiesSetQuicOverrideCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesSetQuicOverrideCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targethttpsproxiessetquicoverriderequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies/{targetHttpsProxy}/setQuicOverride") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetHttpsProxy": c.targetHttpsProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.setQuicOverride" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetHttpsProxiesSetQuicOverrideCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the QUIC override policy for TargetHttpsProxy.", - // "httpMethod": "POST", - // "id": "compute.targetHttpsProxies.setQuicOverride", - // "parameterOrder": [ - // "project", - // "targetHttpsProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "targetHttpsProxy": { - // "description": "Name of the TargetHttpsProxy resource to set the QUIC override policy for. The name should conform to RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetHttpsProxies/{targetHttpsProxy}/setQuicOverride", - // "request": { - // "$ref": "TargetHttpsProxiesSetQuicOverrideRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetHttpsProxies.setSslCertificates": - -type TargetHttpsProxiesSetSslCertificatesCall struct { - s *Service - project string - targetHttpsProxy string - targethttpsproxiessetsslcertificatesrequest *TargetHttpsProxiesSetSslCertificatesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSslCertificates: Replaces SslCertificates for TargetHttpsProxy. -func (r *TargetHttpsProxiesService) SetSslCertificates(project string, targetHttpsProxy string, targethttpsproxiessetsslcertificatesrequest *TargetHttpsProxiesSetSslCertificatesRequest) *TargetHttpsProxiesSetSslCertificatesCall { - c := &TargetHttpsProxiesSetSslCertificatesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpsProxy = targetHttpsProxy - c.targethttpsproxiessetsslcertificatesrequest = targethttpsproxiessetsslcertificatesrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetHttpsProxiesSetSslCertificatesCall) RequestId(requestId string) *TargetHttpsProxiesSetSslCertificatesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpsProxiesSetSslCertificatesCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesSetSslCertificatesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpsProxiesSetSslCertificatesCall) Context(ctx context.Context) *TargetHttpsProxiesSetSslCertificatesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpsProxiesSetSslCertificatesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targethttpsproxiessetsslcertificatesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetHttpsProxy": c.targetHttpsProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.setSslCertificates" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetHttpsProxiesSetSslCertificatesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Replaces SslCertificates for TargetHttpsProxy.", - // "httpMethod": "POST", - // "id": "compute.targetHttpsProxies.setSslCertificates", - // "parameterOrder": [ - // "project", - // "targetHttpsProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetHttpsProxy": { - // "description": "Name of the TargetHttpsProxy resource to set an SslCertificates resource for.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates", - // "request": { - // "$ref": "TargetHttpsProxiesSetSslCertificatesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetHttpsProxies.setUrlMap": - -type TargetHttpsProxiesSetUrlMapCall struct { - s *Service - project string - targetHttpsProxy string - urlmapreference *UrlMapReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetUrlMap: Changes the URL map for TargetHttpsProxy. -func (r *TargetHttpsProxiesService) SetUrlMap(project string, targetHttpsProxy string, urlmapreference *UrlMapReference) *TargetHttpsProxiesSetUrlMapCall { - c := &TargetHttpsProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpsProxy = targetHttpsProxy - c.urlmapreference = urlmapreference - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetHttpsProxiesSetUrlMapCall) RequestId(requestId string) *TargetHttpsProxiesSetUrlMapCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpsProxiesSetUrlMapCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesSetUrlMapCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpsProxiesSetUrlMapCall) Context(ctx context.Context) *TargetHttpsProxiesSetUrlMapCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpsProxiesSetUrlMapCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapreference) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetHttpsProxy": c.targetHttpsProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.setUrlMap" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetHttpsProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes the URL map for TargetHttpsProxy.", - // "httpMethod": "POST", - // "id": "compute.targetHttpsProxies.setUrlMap", - // "parameterOrder": [ - // "project", - // "targetHttpsProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetHttpsProxy": { - // "description": "Name of the TargetHttpsProxy resource whose URL map is to be set.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap", - // "request": { - // "$ref": "UrlMapReference" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetHttpsProxies.testIamPermissions": - -type TargetHttpsProxiesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *TargetHttpsProxiesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetHttpsProxiesTestIamPermissionsCall { - c := &TargetHttpsProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpsProxiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpsProxiesTestIamPermissionsCall) Context(ctx context.Context) *TargetHttpsProxiesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpsProxiesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetHttpsProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.targetHttpsProxies.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetHttpsProxies/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetInstances.aggregatedList": - -type TargetInstancesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of target instances. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/aggregatedList -func (r *TargetInstancesService) AggregatedList(project string) *TargetInstancesAggregatedListCall { - c := &TargetInstancesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *TargetInstancesAggregatedListCall) Filter(filter string) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *TargetInstancesAggregatedListCall) MaxResults(maxResults int64) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *TargetInstancesAggregatedListCall) OrderBy(orderBy string) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *TargetInstancesAggregatedListCall) PageToken(pageToken string) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetInstancesAggregatedListCall) Fields(s ...googleapi.Field) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetInstancesAggregatedListCall) IfNoneMatch(entityTag string) *TargetInstancesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetInstancesAggregatedListCall) Context(ctx context.Context) *TargetInstancesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetInstancesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetInstancesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/targetInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetInstances.aggregatedList" call. -// Exactly one of *TargetInstanceAggregatedList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *TargetInstanceAggregatedList.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetInstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetInstanceAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetInstanceAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of target instances.", - // "httpMethod": "GET", - // "id": "compute.targetInstances.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/targetInstances", - // "response": { - // "$ref": "TargetInstanceAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *TargetInstancesAggregatedListCall) Pages(ctx context.Context, f func(*TargetInstanceAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.targetInstances.delete": - -type TargetInstancesDeleteCall struct { - s *Service - project string - zone string - targetInstance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetInstance resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/delete -func (r *TargetInstancesService) Delete(project string, zone string, targetInstance string) *TargetInstancesDeleteCall { - c := &TargetInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.targetInstance = targetInstance - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetInstancesDeleteCall) RequestId(requestId string) *TargetInstancesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetInstancesDeleteCall) Fields(s ...googleapi.Field) *TargetInstancesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetInstancesDeleteCall) Context(ctx context.Context) *TargetInstancesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetInstancesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetInstancesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances/{targetInstance}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "targetInstance": c.targetInstance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetInstances.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified TargetInstance resource.", - // "httpMethod": "DELETE", - // "id": "compute.targetInstances.delete", - // "parameterOrder": [ - // "project", - // "zone", - // "targetInstance" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetInstance": { - // "description": "Name of the TargetInstance resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/targetInstances/{targetInstance}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetInstances.get": - -type TargetInstancesGetCall struct { - s *Service - project string - zone string - targetInstance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetInstance resource. Get a list of -// available target instances by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/get -func (r *TargetInstancesService) Get(project string, zone string, targetInstance string) *TargetInstancesGetCall { - c := &TargetInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.targetInstance = targetInstance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetInstancesGetCall) Fields(s ...googleapi.Field) *TargetInstancesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetInstancesGetCall) IfNoneMatch(entityTag string) *TargetInstancesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetInstancesGetCall) Context(ctx context.Context) *TargetInstancesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetInstancesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetInstancesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances/{targetInstance}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "targetInstance": c.targetInstance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetInstances.get" call. -// Exactly one of *TargetInstance or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *TargetInstance.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetInstancesGetCall) Do(opts ...googleapi.CallOption) (*TargetInstance, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetInstance{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified TargetInstance resource. Get a list of available target instances by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.targetInstances.get", - // "parameterOrder": [ - // "project", - // "zone", - // "targetInstance" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "targetInstance": { - // "description": "Name of the TargetInstance resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/targetInstances/{targetInstance}", - // "response": { - // "$ref": "TargetInstance" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetInstances.insert": - -type TargetInstancesInsertCall struct { - s *Service - project string - zone string - targetinstance *TargetInstance - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetInstance resource in the specified project -// and zone using the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/insert -func (r *TargetInstancesService) Insert(project string, zone string, targetinstance *TargetInstance) *TargetInstancesInsertCall { - c := &TargetInstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.targetinstance = targetinstance - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetInstancesInsertCall) RequestId(requestId string) *TargetInstancesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetInstancesInsertCall) Fields(s ...googleapi.Field) *TargetInstancesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetInstancesInsertCall) Context(ctx context.Context) *TargetInstancesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetInstancesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetInstancesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetinstance) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetInstances.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetInstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a TargetInstance resource in the specified project and zone using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.targetInstances.insert", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/targetInstances", - // "request": { - // "$ref": "TargetInstance" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetInstances.list": - -type TargetInstancesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of TargetInstance resources available to the -// specified project and zone. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/list -func (r *TargetInstancesService) List(project string, zone string) *TargetInstancesListCall { - c := &TargetInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *TargetInstancesListCall) Filter(filter string) *TargetInstancesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *TargetInstancesListCall) MaxResults(maxResults int64) *TargetInstancesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *TargetInstancesListCall) OrderBy(orderBy string) *TargetInstancesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *TargetInstancesListCall) PageToken(pageToken string) *TargetInstancesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetInstancesListCall) Fields(s ...googleapi.Field) *TargetInstancesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetInstancesListCall) IfNoneMatch(entityTag string) *TargetInstancesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetInstancesListCall) Context(ctx context.Context) *TargetInstancesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetInstancesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetInstancesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetInstances.list" call. -// Exactly one of *TargetInstanceList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TargetInstanceList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetInstancesListCall) Do(opts ...googleapi.CallOption) (*TargetInstanceList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetInstanceList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of TargetInstance resources available to the specified project and zone.", - // "httpMethod": "GET", - // "id": "compute.targetInstances.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/targetInstances", - // "response": { - // "$ref": "TargetInstanceList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *TargetInstancesListCall) Pages(ctx context.Context, f func(*TargetInstanceList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.targetInstances.testIamPermissions": - -type TargetInstancesTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *TargetInstancesService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetInstancesTestIamPermissionsCall { - c := &TargetInstancesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetInstancesTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetInstancesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetInstancesTestIamPermissionsCall) Context(ctx context.Context) *TargetInstancesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetInstancesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetInstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetInstances.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetInstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.targetInstances.testIamPermissions", - // "parameterOrder": [ - // "project", - // "zone", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/targetInstances/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetPools.addHealthCheck": - -type TargetPoolsAddHealthCheckCall struct { - s *Service - project string - region string - targetPool string - targetpoolsaddhealthcheckrequest *TargetPoolsAddHealthCheckRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddHealthCheck: Adds health check URLs to a target pool. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/addHealthCheck -func (r *TargetPoolsService) AddHealthCheck(project string, region string, targetPool string, targetpoolsaddhealthcheckrequest *TargetPoolsAddHealthCheckRequest) *TargetPoolsAddHealthCheckCall { - c := &TargetPoolsAddHealthCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.targetpoolsaddhealthcheckrequest = targetpoolsaddhealthcheckrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetPoolsAddHealthCheckCall) RequestId(requestId string) *TargetPoolsAddHealthCheckCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsAddHealthCheckCall) Fields(s ...googleapi.Field) *TargetPoolsAddHealthCheckCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsAddHealthCheckCall) Context(ctx context.Context) *TargetPoolsAddHealthCheckCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsAddHealthCheckCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsAddHealthCheckCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsaddhealthcheckrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.addHealthCheck" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetPoolsAddHealthCheckCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Adds health check URLs to a target pool.", - // "httpMethod": "POST", - // "id": "compute.targetPools.addHealthCheck", - // "parameterOrder": [ - // "project", - // "region", - // "targetPool" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetPool": { - // "description": "Name of the target pool to add a health check to.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck", - // "request": { - // "$ref": "TargetPoolsAddHealthCheckRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetPools.addInstance": - -type TargetPoolsAddInstanceCall struct { - s *Service - project string - region string - targetPool string - targetpoolsaddinstancerequest *TargetPoolsAddInstanceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddInstance: Adds an instance to a target pool. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/addInstance -func (r *TargetPoolsService) AddInstance(project string, region string, targetPool string, targetpoolsaddinstancerequest *TargetPoolsAddInstanceRequest) *TargetPoolsAddInstanceCall { - c := &TargetPoolsAddInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.targetpoolsaddinstancerequest = targetpoolsaddinstancerequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetPoolsAddInstanceCall) RequestId(requestId string) *TargetPoolsAddInstanceCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsAddInstanceCall) Fields(s ...googleapi.Field) *TargetPoolsAddInstanceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsAddInstanceCall) Context(ctx context.Context) *TargetPoolsAddInstanceCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsAddInstanceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsAddInstanceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsaddinstancerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/addInstance") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.addInstance" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetPoolsAddInstanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Adds an instance to a target pool.", - // "httpMethod": "POST", - // "id": "compute.targetPools.addInstance", - // "parameterOrder": [ - // "project", - // "region", - // "targetPool" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetPool": { - // "description": "Name of the TargetPool resource to add instances to.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools/{targetPool}/addInstance", - // "request": { - // "$ref": "TargetPoolsAddInstanceRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetPools.aggregatedList": - -type TargetPoolsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of target pools. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/aggregatedList -func (r *TargetPoolsService) AggregatedList(project string) *TargetPoolsAggregatedListCall { - c := &TargetPoolsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *TargetPoolsAggregatedListCall) Filter(filter string) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *TargetPoolsAggregatedListCall) MaxResults(maxResults int64) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *TargetPoolsAggregatedListCall) OrderBy(orderBy string) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *TargetPoolsAggregatedListCall) PageToken(pageToken string) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsAggregatedListCall) Fields(s ...googleapi.Field) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetPoolsAggregatedListCall) IfNoneMatch(entityTag string) *TargetPoolsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsAggregatedListCall) Context(ctx context.Context) *TargetPoolsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/targetPools") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.aggregatedList" call. -// Exactly one of *TargetPoolAggregatedList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *TargetPoolAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetPoolsAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetPoolAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetPoolAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of target pools.", - // "httpMethod": "GET", - // "id": "compute.targetPools.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/targetPools", - // "response": { - // "$ref": "TargetPoolAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *TargetPoolsAggregatedListCall) Pages(ctx context.Context, f func(*TargetPoolAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.targetPools.delete": - -type TargetPoolsDeleteCall struct { - s *Service - project string - region string - targetPool string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified target pool. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/delete -func (r *TargetPoolsService) Delete(project string, region string, targetPool string) *TargetPoolsDeleteCall { - c := &TargetPoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetPoolsDeleteCall) RequestId(requestId string) *TargetPoolsDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsDeleteCall) Fields(s ...googleapi.Field) *TargetPoolsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsDeleteCall) Context(ctx context.Context) *TargetPoolsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetPoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified target pool.", - // "httpMethod": "DELETE", - // "id": "compute.targetPools.delete", - // "parameterOrder": [ - // "project", - // "region", - // "targetPool" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetPool": { - // "description": "Name of the TargetPool resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools/{targetPool}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetPools.get": - -type TargetPoolsGetCall struct { - s *Service - project string - region string - targetPool string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified target pool. Get a list of available -// target pools by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/get -func (r *TargetPoolsService) Get(project string, region string, targetPool string) *TargetPoolsGetCall { - c := &TargetPoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsGetCall) Fields(s ...googleapi.Field) *TargetPoolsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetPoolsGetCall) IfNoneMatch(entityTag string) *TargetPoolsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsGetCall) Context(ctx context.Context) *TargetPoolsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.get" call. -// Exactly one of *TargetPool or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *TargetPool.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetPoolsGetCall) Do(opts ...googleapi.CallOption) (*TargetPool, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetPool{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified target pool. Get a list of available target pools by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.targetPools.get", - // "parameterOrder": [ - // "project", - // "region", - // "targetPool" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "targetPool": { - // "description": "Name of the TargetPool resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools/{targetPool}", - // "response": { - // "$ref": "TargetPool" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetPools.getHealth": - -type TargetPoolsGetHealthCall struct { - s *Service - project string - region string - targetPool string - instancereference *InstanceReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetHealth: Gets the most recent health check results for each IP for -// the instance that is referenced by the given target pool. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/getHealth -func (r *TargetPoolsService) GetHealth(project string, region string, targetPool string, instancereference *InstanceReference) *TargetPoolsGetHealthCall { - c := &TargetPoolsGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.instancereference = instancereference - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsGetHealthCall) Fields(s ...googleapi.Field) *TargetPoolsGetHealthCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsGetHealthCall) Context(ctx context.Context) *TargetPoolsGetHealthCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsGetHealthCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsGetHealthCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancereference) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/getHealth") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.getHealth" call. -// Exactly one of *TargetPoolInstanceHealth or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *TargetPoolInstanceHealth.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetPoolsGetHealthCall) Do(opts ...googleapi.CallOption) (*TargetPoolInstanceHealth, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetPoolInstanceHealth{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the most recent health check results for each IP for the instance that is referenced by the given target pool.", - // "httpMethod": "POST", - // "id": "compute.targetPools.getHealth", - // "parameterOrder": [ - // "project", - // "region", - // "targetPool" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "targetPool": { - // "description": "Name of the TargetPool resource to which the queried instance belongs.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools/{targetPool}/getHealth", - // "request": { - // "$ref": "InstanceReference" - // }, - // "response": { - // "$ref": "TargetPoolInstanceHealth" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetPools.insert": - -type TargetPoolsInsertCall struct { - s *Service - project string - region string - targetpool *TargetPool - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a target pool in the specified project and region -// using the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/insert -func (r *TargetPoolsService) Insert(project string, region string, targetpool *TargetPool) *TargetPoolsInsertCall { - c := &TargetPoolsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetpool = targetpool - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetPoolsInsertCall) RequestId(requestId string) *TargetPoolsInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsInsertCall) Fields(s ...googleapi.Field) *TargetPoolsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsInsertCall) Context(ctx context.Context) *TargetPoolsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpool) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetPoolsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a target pool in the specified project and region using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.targetPools.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools", - // "request": { - // "$ref": "TargetPool" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetPools.list": - -type TargetPoolsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of target pools available to the specified -// project and region. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/list -func (r *TargetPoolsService) List(project string, region string) *TargetPoolsListCall { - c := &TargetPoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *TargetPoolsListCall) Filter(filter string) *TargetPoolsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *TargetPoolsListCall) MaxResults(maxResults int64) *TargetPoolsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *TargetPoolsListCall) OrderBy(orderBy string) *TargetPoolsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *TargetPoolsListCall) PageToken(pageToken string) *TargetPoolsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsListCall) Fields(s ...googleapi.Field) *TargetPoolsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetPoolsListCall) IfNoneMatch(entityTag string) *TargetPoolsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsListCall) Context(ctx context.Context) *TargetPoolsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.list" call. -// Exactly one of *TargetPoolList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *TargetPoolList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetPoolsListCall) Do(opts ...googleapi.CallOption) (*TargetPoolList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetPoolList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of target pools available to the specified project and region.", - // "httpMethod": "GET", - // "id": "compute.targetPools.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools", - // "response": { - // "$ref": "TargetPoolList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *TargetPoolsListCall) Pages(ctx context.Context, f func(*TargetPoolList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.targetPools.removeHealthCheck": - -type TargetPoolsRemoveHealthCheckCall struct { - s *Service - project string - region string - targetPool string - targetpoolsremovehealthcheckrequest *TargetPoolsRemoveHealthCheckRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveHealthCheck: Removes health check URL from a target pool. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/removeHealthCheck -func (r *TargetPoolsService) RemoveHealthCheck(project string, region string, targetPool string, targetpoolsremovehealthcheckrequest *TargetPoolsRemoveHealthCheckRequest) *TargetPoolsRemoveHealthCheckCall { - c := &TargetPoolsRemoveHealthCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.targetpoolsremovehealthcheckrequest = targetpoolsremovehealthcheckrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetPoolsRemoveHealthCheckCall) RequestId(requestId string) *TargetPoolsRemoveHealthCheckCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsRemoveHealthCheckCall) Fields(s ...googleapi.Field) *TargetPoolsRemoveHealthCheckCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsRemoveHealthCheckCall) Context(ctx context.Context) *TargetPoolsRemoveHealthCheckCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsRemoveHealthCheckCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsRemoveHealthCheckCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsremovehealthcheckrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.removeHealthCheck" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetPoolsRemoveHealthCheckCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Removes health check URL from a target pool.", - // "httpMethod": "POST", - // "id": "compute.targetPools.removeHealthCheck", - // "parameterOrder": [ - // "project", - // "region", - // "targetPool" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetPool": { - // "description": "Name of the target pool to remove health checks from.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck", - // "request": { - // "$ref": "TargetPoolsRemoveHealthCheckRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetPools.removeInstance": - -type TargetPoolsRemoveInstanceCall struct { - s *Service - project string - region string - targetPool string - targetpoolsremoveinstancerequest *TargetPoolsRemoveInstanceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveInstance: Removes instance URL from a target pool. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/removeInstance -func (r *TargetPoolsService) RemoveInstance(project string, region string, targetPool string, targetpoolsremoveinstancerequest *TargetPoolsRemoveInstanceRequest) *TargetPoolsRemoveInstanceCall { - c := &TargetPoolsRemoveInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.targetpoolsremoveinstancerequest = targetpoolsremoveinstancerequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetPoolsRemoveInstanceCall) RequestId(requestId string) *TargetPoolsRemoveInstanceCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsRemoveInstanceCall) Fields(s ...googleapi.Field) *TargetPoolsRemoveInstanceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsRemoveInstanceCall) Context(ctx context.Context) *TargetPoolsRemoveInstanceCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsRemoveInstanceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsRemoveInstanceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsremoveinstancerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/removeInstance") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.removeInstance" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetPoolsRemoveInstanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Removes instance URL from a target pool.", - // "httpMethod": "POST", - // "id": "compute.targetPools.removeInstance", - // "parameterOrder": [ - // "project", - // "region", - // "targetPool" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetPool": { - // "description": "Name of the TargetPool resource to remove instances from.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools/{targetPool}/removeInstance", - // "request": { - // "$ref": "TargetPoolsRemoveInstanceRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetPools.setBackup": - -type TargetPoolsSetBackupCall struct { - s *Service - project string - region string - targetPool string - targetreference *TargetReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetBackup: Changes a backup target pool's configurations. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/setBackup -func (r *TargetPoolsService) SetBackup(project string, region string, targetPool string, targetreference *TargetReference) *TargetPoolsSetBackupCall { - c := &TargetPoolsSetBackupCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.targetreference = targetreference - return c -} - -// FailoverRatio sets the optional parameter "failoverRatio": New -// failoverRatio value for the target pool. -func (c *TargetPoolsSetBackupCall) FailoverRatio(failoverRatio float64) *TargetPoolsSetBackupCall { - c.urlParams_.Set("failoverRatio", fmt.Sprint(failoverRatio)) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetPoolsSetBackupCall) RequestId(requestId string) *TargetPoolsSetBackupCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsSetBackupCall) Fields(s ...googleapi.Field) *TargetPoolsSetBackupCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsSetBackupCall) Context(ctx context.Context) *TargetPoolsSetBackupCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsSetBackupCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsSetBackupCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/setBackup") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.setBackup" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetPoolsSetBackupCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes a backup target pool's configurations.", - // "httpMethod": "POST", - // "id": "compute.targetPools.setBackup", - // "parameterOrder": [ - // "project", - // "region", - // "targetPool" - // ], - // "parameters": { - // "failoverRatio": { - // "description": "New failoverRatio value for the target pool.", - // "format": "float", - // "location": "query", - // "type": "number" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetPool": { - // "description": "Name of the TargetPool resource to set a backup pool for.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools/{targetPool}/setBackup", - // "request": { - // "$ref": "TargetReference" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetPools.testIamPermissions": - -type TargetPoolsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *TargetPoolsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetPoolsTestIamPermissionsCall { - c := &TargetPoolsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetPoolsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsTestIamPermissionsCall) Context(ctx context.Context) *TargetPoolsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetPoolsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.targetPools.testIamPermissions", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetSslProxies.delete": - -type TargetSslProxiesDeleteCall struct { - s *Service - project string - targetSslProxy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetSslProxy resource. -func (r *TargetSslProxiesService) Delete(project string, targetSslProxy string) *TargetSslProxiesDeleteCall { - c := &TargetSslProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetSslProxy = targetSslProxy - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetSslProxiesDeleteCall) RequestId(requestId string) *TargetSslProxiesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetSslProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetSslProxiesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetSslProxiesDeleteCall) Context(ctx context.Context) *TargetSslProxiesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetSslProxiesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetSslProxy": c.targetSslProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetSslProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified TargetSslProxy resource.", - // "httpMethod": "DELETE", - // "id": "compute.targetSslProxies.delete", - // "parameterOrder": [ - // "project", - // "targetSslProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetSslProxy": { - // "description": "Name of the TargetSslProxy resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetSslProxies/{targetSslProxy}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetSslProxies.get": - -type TargetSslProxiesGetCall struct { - s *Service - project string - targetSslProxy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetSslProxy resource. Get a list of -// available target SSL proxies by making a list() request. -func (r *TargetSslProxiesService) Get(project string, targetSslProxy string) *TargetSslProxiesGetCall { - c := &TargetSslProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetSslProxy = targetSslProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetSslProxiesGetCall) Fields(s ...googleapi.Field) *TargetSslProxiesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetSslProxiesGetCall) IfNoneMatch(entityTag string) *TargetSslProxiesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetSslProxiesGetCall) Context(ctx context.Context) *TargetSslProxiesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetSslProxiesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetSslProxy": c.targetSslProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.get" call. -// Exactly one of *TargetSslProxy or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *TargetSslProxy.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetSslProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetSslProxy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetSslProxy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified TargetSslProxy resource. Get a list of available target SSL proxies by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.targetSslProxies.get", - // "parameterOrder": [ - // "project", - // "targetSslProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "targetSslProxy": { - // "description": "Name of the TargetSslProxy resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetSslProxies/{targetSslProxy}", - // "response": { - // "$ref": "TargetSslProxy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetSslProxies.insert": - -type TargetSslProxiesInsertCall struct { - s *Service - project string - targetsslproxy *TargetSslProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetSslProxy resource in the specified project -// using the data included in the request. -func (r *TargetSslProxiesService) Insert(project string, targetsslproxy *TargetSslProxy) *TargetSslProxiesInsertCall { - c := &TargetSslProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetsslproxy = targetsslproxy - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetSslProxiesInsertCall) RequestId(requestId string) *TargetSslProxiesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetSslProxiesInsertCall) Fields(s ...googleapi.Field) *TargetSslProxiesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetSslProxiesInsertCall) Context(ctx context.Context) *TargetSslProxiesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetSslProxiesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetsslproxy) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetSslProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a TargetSslProxy resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.targetSslProxies.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/targetSslProxies", - // "request": { - // "$ref": "TargetSslProxy" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetSslProxies.list": - -type TargetSslProxiesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of TargetSslProxy resources available to the -// specified project. -func (r *TargetSslProxiesService) List(project string) *TargetSslProxiesListCall { - c := &TargetSslProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *TargetSslProxiesListCall) Filter(filter string) *TargetSslProxiesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *TargetSslProxiesListCall) MaxResults(maxResults int64) *TargetSslProxiesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *TargetSslProxiesListCall) OrderBy(orderBy string) *TargetSslProxiesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *TargetSslProxiesListCall) PageToken(pageToken string) *TargetSslProxiesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetSslProxiesListCall) Fields(s ...googleapi.Field) *TargetSslProxiesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetSslProxiesListCall) IfNoneMatch(entityTag string) *TargetSslProxiesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetSslProxiesListCall) Context(ctx context.Context) *TargetSslProxiesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetSslProxiesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.list" call. -// Exactly one of *TargetSslProxyList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TargetSslProxyList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetSslProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetSslProxyList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetSslProxyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of TargetSslProxy resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.targetSslProxies.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetSslProxies", - // "response": { - // "$ref": "TargetSslProxyList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *TargetSslProxiesListCall) Pages(ctx context.Context, f func(*TargetSslProxyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.targetSslProxies.setBackendService": - -type TargetSslProxiesSetBackendServiceCall struct { - s *Service - project string - targetSslProxy string - targetsslproxiessetbackendservicerequest *TargetSslProxiesSetBackendServiceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetBackendService: Changes the BackendService for TargetSslProxy. -func (r *TargetSslProxiesService) SetBackendService(project string, targetSslProxy string, targetsslproxiessetbackendservicerequest *TargetSslProxiesSetBackendServiceRequest) *TargetSslProxiesSetBackendServiceCall { - c := &TargetSslProxiesSetBackendServiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetSslProxy = targetSslProxy - c.targetsslproxiessetbackendservicerequest = targetsslproxiessetbackendservicerequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetSslProxiesSetBackendServiceCall) RequestId(requestId string) *TargetSslProxiesSetBackendServiceCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetSslProxiesSetBackendServiceCall) Fields(s ...googleapi.Field) *TargetSslProxiesSetBackendServiceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetSslProxiesSetBackendServiceCall) Context(ctx context.Context) *TargetSslProxiesSetBackendServiceCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetSslProxiesSetBackendServiceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesSetBackendServiceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetsslproxiessetbackendservicerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}/setBackendService") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetSslProxy": c.targetSslProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.setBackendService" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetSslProxiesSetBackendServiceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes the BackendService for TargetSslProxy.", - // "httpMethod": "POST", - // "id": "compute.targetSslProxies.setBackendService", - // "parameterOrder": [ - // "project", - // "targetSslProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetSslProxy": { - // "description": "Name of the TargetSslProxy resource whose BackendService resource is to be set.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetSslProxies/{targetSslProxy}/setBackendService", - // "request": { - // "$ref": "TargetSslProxiesSetBackendServiceRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetSslProxies.setProxyHeader": - -type TargetSslProxiesSetProxyHeaderCall struct { - s *Service - project string - targetSslProxy string - targetsslproxiessetproxyheaderrequest *TargetSslProxiesSetProxyHeaderRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetProxyHeader: Changes the ProxyHeaderType for TargetSslProxy. -func (r *TargetSslProxiesService) SetProxyHeader(project string, targetSslProxy string, targetsslproxiessetproxyheaderrequest *TargetSslProxiesSetProxyHeaderRequest) *TargetSslProxiesSetProxyHeaderCall { - c := &TargetSslProxiesSetProxyHeaderCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetSslProxy = targetSslProxy - c.targetsslproxiessetproxyheaderrequest = targetsslproxiessetproxyheaderrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetSslProxiesSetProxyHeaderCall) RequestId(requestId string) *TargetSslProxiesSetProxyHeaderCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetSslProxiesSetProxyHeaderCall) Fields(s ...googleapi.Field) *TargetSslProxiesSetProxyHeaderCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetSslProxiesSetProxyHeaderCall) Context(ctx context.Context) *TargetSslProxiesSetProxyHeaderCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetSslProxiesSetProxyHeaderCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesSetProxyHeaderCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetsslproxiessetproxyheaderrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}/setProxyHeader") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetSslProxy": c.targetSslProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.setProxyHeader" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetSslProxiesSetProxyHeaderCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes the ProxyHeaderType for TargetSslProxy.", - // "httpMethod": "POST", - // "id": "compute.targetSslProxies.setProxyHeader", - // "parameterOrder": [ - // "project", - // "targetSslProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetSslProxy": { - // "description": "Name of the TargetSslProxy resource whose ProxyHeader is to be set.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetSslProxies/{targetSslProxy}/setProxyHeader", - // "request": { - // "$ref": "TargetSslProxiesSetProxyHeaderRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetSslProxies.setSslCertificates": - -type TargetSslProxiesSetSslCertificatesCall struct { - s *Service - project string - targetSslProxy string - targetsslproxiessetsslcertificatesrequest *TargetSslProxiesSetSslCertificatesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSslCertificates: Changes SslCertificates for TargetSslProxy. -func (r *TargetSslProxiesService) SetSslCertificates(project string, targetSslProxy string, targetsslproxiessetsslcertificatesrequest *TargetSslProxiesSetSslCertificatesRequest) *TargetSslProxiesSetSslCertificatesCall { - c := &TargetSslProxiesSetSslCertificatesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetSslProxy = targetSslProxy - c.targetsslproxiessetsslcertificatesrequest = targetsslproxiessetsslcertificatesrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetSslProxiesSetSslCertificatesCall) RequestId(requestId string) *TargetSslProxiesSetSslCertificatesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetSslProxiesSetSslCertificatesCall) Fields(s ...googleapi.Field) *TargetSslProxiesSetSslCertificatesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetSslProxiesSetSslCertificatesCall) Context(ctx context.Context) *TargetSslProxiesSetSslCertificatesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetSslProxiesSetSslCertificatesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetsslproxiessetsslcertificatesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}/setSslCertificates") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetSslProxy": c.targetSslProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.setSslCertificates" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetSslProxiesSetSslCertificatesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes SslCertificates for TargetSslProxy.", - // "httpMethod": "POST", - // "id": "compute.targetSslProxies.setSslCertificates", - // "parameterOrder": [ - // "project", - // "targetSslProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetSslProxy": { - // "description": "Name of the TargetSslProxy resource whose SslCertificate resource is to be set.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetSslProxies/{targetSslProxy}/setSslCertificates", - // "request": { - // "$ref": "TargetSslProxiesSetSslCertificatesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetSslProxies.testIamPermissions": - -type TargetSslProxiesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *TargetSslProxiesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetSslProxiesTestIamPermissionsCall { - c := &TargetSslProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetSslProxiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetSslProxiesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetSslProxiesTestIamPermissionsCall) Context(ctx context.Context) *TargetSslProxiesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetSslProxiesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetSslProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.targetSslProxies.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetSslProxies/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetTcpProxies.delete": - -type TargetTcpProxiesDeleteCall struct { - s *Service - project string - targetTcpProxy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetTcpProxy resource. -func (r *TargetTcpProxiesService) Delete(project string, targetTcpProxy string) *TargetTcpProxiesDeleteCall { - c := &TargetTcpProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetTcpProxy = targetTcpProxy - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetTcpProxiesDeleteCall) RequestId(requestId string) *TargetTcpProxiesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetTcpProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetTcpProxiesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetTcpProxiesDeleteCall) Context(ctx context.Context) *TargetTcpProxiesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetTcpProxiesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies/{targetTcpProxy}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetTcpProxy": c.targetTcpProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetTcpProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified TargetTcpProxy resource.", - // "httpMethod": "DELETE", - // "id": "compute.targetTcpProxies.delete", - // "parameterOrder": [ - // "project", - // "targetTcpProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetTcpProxy": { - // "description": "Name of the TargetTcpProxy resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetTcpProxies/{targetTcpProxy}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetTcpProxies.get": - -type TargetTcpProxiesGetCall struct { - s *Service - project string - targetTcpProxy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetTcpProxy resource. Get a list of -// available target TCP proxies by making a list() request. -func (r *TargetTcpProxiesService) Get(project string, targetTcpProxy string) *TargetTcpProxiesGetCall { - c := &TargetTcpProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetTcpProxy = targetTcpProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetTcpProxiesGetCall) Fields(s ...googleapi.Field) *TargetTcpProxiesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetTcpProxiesGetCall) IfNoneMatch(entityTag string) *TargetTcpProxiesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetTcpProxiesGetCall) Context(ctx context.Context) *TargetTcpProxiesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetTcpProxiesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies/{targetTcpProxy}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetTcpProxy": c.targetTcpProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.get" call. -// Exactly one of *TargetTcpProxy or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *TargetTcpProxy.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetTcpProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetTcpProxy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetTcpProxy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified TargetTcpProxy resource. Get a list of available target TCP proxies by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.targetTcpProxies.get", - // "parameterOrder": [ - // "project", - // "targetTcpProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "targetTcpProxy": { - // "description": "Name of the TargetTcpProxy resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetTcpProxies/{targetTcpProxy}", - // "response": { - // "$ref": "TargetTcpProxy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetTcpProxies.insert": - -type TargetTcpProxiesInsertCall struct { - s *Service - project string - targettcpproxy *TargetTcpProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetTcpProxy resource in the specified project -// using the data included in the request. -func (r *TargetTcpProxiesService) Insert(project string, targettcpproxy *TargetTcpProxy) *TargetTcpProxiesInsertCall { - c := &TargetTcpProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targettcpproxy = targettcpproxy - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetTcpProxiesInsertCall) RequestId(requestId string) *TargetTcpProxiesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetTcpProxiesInsertCall) Fields(s ...googleapi.Field) *TargetTcpProxiesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetTcpProxiesInsertCall) Context(ctx context.Context) *TargetTcpProxiesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetTcpProxiesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targettcpproxy) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetTcpProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a TargetTcpProxy resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.targetTcpProxies.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/targetTcpProxies", - // "request": { - // "$ref": "TargetTcpProxy" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetTcpProxies.list": - -type TargetTcpProxiesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of TargetTcpProxy resources available to the -// specified project. -func (r *TargetTcpProxiesService) List(project string) *TargetTcpProxiesListCall { - c := &TargetTcpProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *TargetTcpProxiesListCall) Filter(filter string) *TargetTcpProxiesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *TargetTcpProxiesListCall) MaxResults(maxResults int64) *TargetTcpProxiesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *TargetTcpProxiesListCall) OrderBy(orderBy string) *TargetTcpProxiesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *TargetTcpProxiesListCall) PageToken(pageToken string) *TargetTcpProxiesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetTcpProxiesListCall) Fields(s ...googleapi.Field) *TargetTcpProxiesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetTcpProxiesListCall) IfNoneMatch(entityTag string) *TargetTcpProxiesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetTcpProxiesListCall) Context(ctx context.Context) *TargetTcpProxiesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetTcpProxiesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.list" call. -// Exactly one of *TargetTcpProxyList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TargetTcpProxyList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetTcpProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetTcpProxyList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetTcpProxyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of TargetTcpProxy resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.targetTcpProxies.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetTcpProxies", - // "response": { - // "$ref": "TargetTcpProxyList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *TargetTcpProxiesListCall) Pages(ctx context.Context, f func(*TargetTcpProxyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.targetTcpProxies.setBackendService": - -type TargetTcpProxiesSetBackendServiceCall struct { - s *Service - project string - targetTcpProxy string - targettcpproxiessetbackendservicerequest *TargetTcpProxiesSetBackendServiceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetBackendService: Changes the BackendService for TargetTcpProxy. -func (r *TargetTcpProxiesService) SetBackendService(project string, targetTcpProxy string, targettcpproxiessetbackendservicerequest *TargetTcpProxiesSetBackendServiceRequest) *TargetTcpProxiesSetBackendServiceCall { - c := &TargetTcpProxiesSetBackendServiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetTcpProxy = targetTcpProxy - c.targettcpproxiessetbackendservicerequest = targettcpproxiessetbackendservicerequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetTcpProxiesSetBackendServiceCall) RequestId(requestId string) *TargetTcpProxiesSetBackendServiceCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetTcpProxiesSetBackendServiceCall) Fields(s ...googleapi.Field) *TargetTcpProxiesSetBackendServiceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetTcpProxiesSetBackendServiceCall) Context(ctx context.Context) *TargetTcpProxiesSetBackendServiceCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetTcpProxiesSetBackendServiceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesSetBackendServiceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targettcpproxiessetbackendservicerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies/{targetTcpProxy}/setBackendService") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetTcpProxy": c.targetTcpProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.setBackendService" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetTcpProxiesSetBackendServiceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes the BackendService for TargetTcpProxy.", - // "httpMethod": "POST", - // "id": "compute.targetTcpProxies.setBackendService", - // "parameterOrder": [ - // "project", - // "targetTcpProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetTcpProxy": { - // "description": "Name of the TargetTcpProxy resource whose BackendService resource is to be set.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetTcpProxies/{targetTcpProxy}/setBackendService", - // "request": { - // "$ref": "TargetTcpProxiesSetBackendServiceRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetTcpProxies.setProxyHeader": - -type TargetTcpProxiesSetProxyHeaderCall struct { - s *Service - project string - targetTcpProxy string - targettcpproxiessetproxyheaderrequest *TargetTcpProxiesSetProxyHeaderRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetProxyHeader: Changes the ProxyHeaderType for TargetTcpProxy. -func (r *TargetTcpProxiesService) SetProxyHeader(project string, targetTcpProxy string, targettcpproxiessetproxyheaderrequest *TargetTcpProxiesSetProxyHeaderRequest) *TargetTcpProxiesSetProxyHeaderCall { - c := &TargetTcpProxiesSetProxyHeaderCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetTcpProxy = targetTcpProxy - c.targettcpproxiessetproxyheaderrequest = targettcpproxiessetproxyheaderrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetTcpProxiesSetProxyHeaderCall) RequestId(requestId string) *TargetTcpProxiesSetProxyHeaderCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetTcpProxiesSetProxyHeaderCall) Fields(s ...googleapi.Field) *TargetTcpProxiesSetProxyHeaderCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetTcpProxiesSetProxyHeaderCall) Context(ctx context.Context) *TargetTcpProxiesSetProxyHeaderCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetTcpProxiesSetProxyHeaderCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesSetProxyHeaderCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targettcpproxiessetproxyheaderrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies/{targetTcpProxy}/setProxyHeader") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetTcpProxy": c.targetTcpProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.setProxyHeader" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetTcpProxiesSetProxyHeaderCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes the ProxyHeaderType for TargetTcpProxy.", - // "httpMethod": "POST", - // "id": "compute.targetTcpProxies.setProxyHeader", - // "parameterOrder": [ - // "project", - // "targetTcpProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetTcpProxy": { - // "description": "Name of the TargetTcpProxy resource whose ProxyHeader is to be set.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetTcpProxies/{targetTcpProxy}/setProxyHeader", - // "request": { - // "$ref": "TargetTcpProxiesSetProxyHeaderRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetTcpProxies.testIamPermissions": - -type TargetTcpProxiesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *TargetTcpProxiesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetTcpProxiesTestIamPermissionsCall { - c := &TargetTcpProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetTcpProxiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetTcpProxiesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetTcpProxiesTestIamPermissionsCall) Context(ctx context.Context) *TargetTcpProxiesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetTcpProxiesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetTcpProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.targetTcpProxies.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetTcpProxies/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetVpnGateways.aggregatedList": - -type TargetVpnGatewaysAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of target VPN gateways. -func (r *TargetVpnGatewaysService) AggregatedList(project string) *TargetVpnGatewaysAggregatedListCall { - c := &TargetVpnGatewaysAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *TargetVpnGatewaysAggregatedListCall) Filter(filter string) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *TargetVpnGatewaysAggregatedListCall) MaxResults(maxResults int64) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *TargetVpnGatewaysAggregatedListCall) OrderBy(orderBy string) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *TargetVpnGatewaysAggregatedListCall) PageToken(pageToken string) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetVpnGatewaysAggregatedListCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetVpnGatewaysAggregatedListCall) IfNoneMatch(entityTag string) *TargetVpnGatewaysAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetVpnGatewaysAggregatedListCall) Context(ctx context.Context) *TargetVpnGatewaysAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetVpnGatewaysAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetVpnGatewaysAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/targetVpnGateways") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetVpnGateways.aggregatedList" call. -// Exactly one of *TargetVpnGatewayAggregatedList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *TargetVpnGatewayAggregatedList.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetVpnGatewaysAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetVpnGatewayAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetVpnGatewayAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of target VPN gateways.", - // "httpMethod": "GET", - // "id": "compute.targetVpnGateways.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/targetVpnGateways", - // "response": { - // "$ref": "TargetVpnGatewayAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *TargetVpnGatewaysAggregatedListCall) Pages(ctx context.Context, f func(*TargetVpnGatewayAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.targetVpnGateways.delete": - -type TargetVpnGatewaysDeleteCall struct { - s *Service - project string - region string - targetVpnGateway string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified target VPN gateway. -func (r *TargetVpnGatewaysService) Delete(project string, region string, targetVpnGateway string) *TargetVpnGatewaysDeleteCall { - c := &TargetVpnGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetVpnGateway = targetVpnGateway - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetVpnGatewaysDeleteCall) RequestId(requestId string) *TargetVpnGatewaysDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetVpnGatewaysDeleteCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetVpnGatewaysDeleteCall) Context(ctx context.Context) *TargetVpnGatewaysDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetVpnGatewaysDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetVpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetVpnGateway": c.targetVpnGateway, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetVpnGateways.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetVpnGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified target VPN gateway.", - // "httpMethod": "DELETE", - // "id": "compute.targetVpnGateways.delete", - // "parameterOrder": [ - // "project", - // "region", - // "targetVpnGateway" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetVpnGateway": { - // "description": "Name of the target VPN gateway to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetVpnGateways.get": - -type TargetVpnGatewaysGetCall struct { - s *Service - project string - region string - targetVpnGateway string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified target VPN gateway. Get a list of -// available target VPN gateways by making a list() request. -func (r *TargetVpnGatewaysService) Get(project string, region string, targetVpnGateway string) *TargetVpnGatewaysGetCall { - c := &TargetVpnGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetVpnGateway = targetVpnGateway - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetVpnGatewaysGetCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetVpnGatewaysGetCall) IfNoneMatch(entityTag string) *TargetVpnGatewaysGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetVpnGatewaysGetCall) Context(ctx context.Context) *TargetVpnGatewaysGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetVpnGatewaysGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetVpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetVpnGateway": c.targetVpnGateway, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetVpnGateways.get" call. -// Exactly one of *TargetVpnGateway or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TargetVpnGateway.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetVpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*TargetVpnGateway, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetVpnGateway{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified target VPN gateway. Get a list of available target VPN gateways by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.targetVpnGateways.get", - // "parameterOrder": [ - // "project", - // "region", - // "targetVpnGateway" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "targetVpnGateway": { - // "description": "Name of the target VPN gateway to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}", - // "response": { - // "$ref": "TargetVpnGateway" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetVpnGateways.insert": - -type TargetVpnGatewaysInsertCall struct { - s *Service - project string - region string - targetvpngateway *TargetVpnGateway - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a target VPN gateway in the specified project and -// region using the data included in the request. -func (r *TargetVpnGatewaysService) Insert(project string, region string, targetvpngateway *TargetVpnGateway) *TargetVpnGatewaysInsertCall { - c := &TargetVpnGatewaysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetvpngateway = targetvpngateway - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetVpnGatewaysInsertCall) RequestId(requestId string) *TargetVpnGatewaysInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetVpnGatewaysInsertCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetVpnGatewaysInsertCall) Context(ctx context.Context) *TargetVpnGatewaysInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetVpnGatewaysInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetVpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetvpngateway) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetVpnGateways.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetVpnGatewaysInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a target VPN gateway in the specified project and region using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.targetVpnGateways.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetVpnGateways", - // "request": { - // "$ref": "TargetVpnGateway" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetVpnGateways.list": - -type TargetVpnGatewaysListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of target VPN gateways available to the -// specified project and region. -func (r *TargetVpnGatewaysService) List(project string, region string) *TargetVpnGatewaysListCall { - c := &TargetVpnGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *TargetVpnGatewaysListCall) Filter(filter string) *TargetVpnGatewaysListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *TargetVpnGatewaysListCall) MaxResults(maxResults int64) *TargetVpnGatewaysListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *TargetVpnGatewaysListCall) OrderBy(orderBy string) *TargetVpnGatewaysListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *TargetVpnGatewaysListCall) PageToken(pageToken string) *TargetVpnGatewaysListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetVpnGatewaysListCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetVpnGatewaysListCall) IfNoneMatch(entityTag string) *TargetVpnGatewaysListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetVpnGatewaysListCall) Context(ctx context.Context) *TargetVpnGatewaysListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetVpnGatewaysListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetVpnGatewaysListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetVpnGateways.list" call. -// Exactly one of *TargetVpnGatewayList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TargetVpnGatewayList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetVpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*TargetVpnGatewayList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetVpnGatewayList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of target VPN gateways available to the specified project and region.", - // "httpMethod": "GET", - // "id": "compute.targetVpnGateways.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetVpnGateways", - // "response": { - // "$ref": "TargetVpnGatewayList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *TargetVpnGatewaysListCall) Pages(ctx context.Context, f func(*TargetVpnGatewayList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.targetVpnGateways.testIamPermissions": - -type TargetVpnGatewaysTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *TargetVpnGatewaysService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetVpnGatewaysTestIamPermissionsCall { - c := &TargetVpnGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetVpnGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetVpnGatewaysTestIamPermissionsCall) Context(ctx context.Context) *TargetVpnGatewaysTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetVpnGatewaysTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetVpnGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetVpnGateways.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetVpnGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.targetVpnGateways.testIamPermissions", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetVpnGateways/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.urlMaps.delete": - -type UrlMapsDeleteCall struct { - s *Service - project string - urlMap string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified UrlMap resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/delete -func (r *UrlMapsService) Delete(project string, urlMap string) *UrlMapsDeleteCall { - c := &UrlMapsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlMap = urlMap - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *UrlMapsDeleteCall) RequestId(requestId string) *UrlMapsDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *UrlMapsDeleteCall) Fields(s ...googleapi.Field) *UrlMapsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *UrlMapsDeleteCall) Context(ctx context.Context) *UrlMapsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *UrlMapsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "urlMap": c.urlMap, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *UrlMapsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified UrlMap resource.", - // "httpMethod": "DELETE", - // "id": "compute.urlMaps.delete", - // "parameterOrder": [ - // "project", - // "urlMap" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "urlMap": { - // "description": "Name of the UrlMap resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/urlMaps/{urlMap}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.urlMaps.get": - -type UrlMapsGetCall struct { - s *Service - project string - urlMap string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified UrlMap resource. Get a list of available -// URL maps by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/get -func (r *UrlMapsService) Get(project string, urlMap string) *UrlMapsGetCall { - c := &UrlMapsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlMap = urlMap - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *UrlMapsGetCall) Fields(s ...googleapi.Field) *UrlMapsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *UrlMapsGetCall) IfNoneMatch(entityTag string) *UrlMapsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *UrlMapsGetCall) Context(ctx context.Context) *UrlMapsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *UrlMapsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "urlMap": c.urlMap, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.get" call. -// Exactly one of *UrlMap or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *UrlMap.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *UrlMapsGetCall) Do(opts ...googleapi.CallOption) (*UrlMap, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &UrlMap{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified UrlMap resource. Get a list of available URL maps by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.urlMaps.get", - // "parameterOrder": [ - // "project", - // "urlMap" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "urlMap": { - // "description": "Name of the UrlMap resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/urlMaps/{urlMap}", - // "response": { - // "$ref": "UrlMap" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.urlMaps.insert": - -type UrlMapsInsertCall struct { - s *Service - project string - urlmap *UrlMap - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a UrlMap resource in the specified project using the -// data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/insert -func (r *UrlMapsService) Insert(project string, urlmap *UrlMap) *UrlMapsInsertCall { - c := &UrlMapsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlmap = urlmap - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *UrlMapsInsertCall) RequestId(requestId string) *UrlMapsInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *UrlMapsInsertCall) Fields(s ...googleapi.Field) *UrlMapsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *UrlMapsInsertCall) Context(ctx context.Context) *UrlMapsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *UrlMapsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *UrlMapsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a UrlMap resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.urlMaps.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/urlMaps", - // "request": { - // "$ref": "UrlMap" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.urlMaps.invalidateCache": - -type UrlMapsInvalidateCacheCall struct { - s *Service - project string - urlMap string - cacheinvalidationrule *CacheInvalidationRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// InvalidateCache: Initiates a cache invalidation operation, -// invalidating the specified path, scoped to the specified UrlMap. -func (r *UrlMapsService) InvalidateCache(project string, urlMap string, cacheinvalidationrule *CacheInvalidationRule) *UrlMapsInvalidateCacheCall { - c := &UrlMapsInvalidateCacheCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlMap = urlMap - c.cacheinvalidationrule = cacheinvalidationrule - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *UrlMapsInvalidateCacheCall) RequestId(requestId string) *UrlMapsInvalidateCacheCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *UrlMapsInvalidateCacheCall) Fields(s ...googleapi.Field) *UrlMapsInvalidateCacheCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *UrlMapsInvalidateCacheCall) Context(ctx context.Context) *UrlMapsInvalidateCacheCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *UrlMapsInvalidateCacheCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsInvalidateCacheCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.cacheinvalidationrule) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}/invalidateCache") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "urlMap": c.urlMap, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.invalidateCache" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *UrlMapsInvalidateCacheCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.", - // "httpMethod": "POST", - // "id": "compute.urlMaps.invalidateCache", - // "parameterOrder": [ - // "project", - // "urlMap" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "urlMap": { - // "description": "Name of the UrlMap scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/urlMaps/{urlMap}/invalidateCache", - // "request": { - // "$ref": "CacheInvalidationRule" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.urlMaps.list": - -type UrlMapsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of UrlMap resources available to the -// specified project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/list -func (r *UrlMapsService) List(project string) *UrlMapsListCall { - c := &UrlMapsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *UrlMapsListCall) Filter(filter string) *UrlMapsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *UrlMapsListCall) MaxResults(maxResults int64) *UrlMapsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *UrlMapsListCall) OrderBy(orderBy string) *UrlMapsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *UrlMapsListCall) PageToken(pageToken string) *UrlMapsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *UrlMapsListCall) Fields(s ...googleapi.Field) *UrlMapsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *UrlMapsListCall) IfNoneMatch(entityTag string) *UrlMapsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *UrlMapsListCall) Context(ctx context.Context) *UrlMapsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *UrlMapsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.list" call. -// Exactly one of *UrlMapList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *UrlMapList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *UrlMapsListCall) Do(opts ...googleapi.CallOption) (*UrlMapList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &UrlMapList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of UrlMap resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.urlMaps.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/urlMaps", - // "response": { - // "$ref": "UrlMapList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *UrlMapsListCall) Pages(ctx context.Context, f func(*UrlMapList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.urlMaps.patch": - -type UrlMapsPatchCall struct { - s *Service - project string - urlMap string - urlmap *UrlMap - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified UrlMap resource with the data included -// in the request. This method supports PATCH semantics and uses the -// JSON merge patch format and processing rules. -// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/patch -func (r *UrlMapsService) Patch(project string, urlMap string, urlmap *UrlMap) *UrlMapsPatchCall { - c := &UrlMapsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlMap = urlMap - c.urlmap = urlmap - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *UrlMapsPatchCall) RequestId(requestId string) *UrlMapsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *UrlMapsPatchCall) Fields(s ...googleapi.Field) *UrlMapsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *UrlMapsPatchCall) Context(ctx context.Context) *UrlMapsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *UrlMapsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "urlMap": c.urlMap, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *UrlMapsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.urlMaps.patch", - // "parameterOrder": [ - // "project", - // "urlMap" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "urlMap": { - // "description": "Name of the UrlMap resource to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/urlMaps/{urlMap}", - // "request": { - // "$ref": "UrlMap" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.urlMaps.testIamPermissions": - -type UrlMapsTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *UrlMapsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *UrlMapsTestIamPermissionsCall { - c := &UrlMapsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *UrlMapsTestIamPermissionsCall) Fields(s ...googleapi.Field) *UrlMapsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *UrlMapsTestIamPermissionsCall) Context(ctx context.Context) *UrlMapsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *UrlMapsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *UrlMapsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.urlMaps.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/urlMaps/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.urlMaps.update": - -type UrlMapsUpdateCall struct { - s *Service - project string - urlMap string - urlmap *UrlMap - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified UrlMap resource with the data included -// in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/update -func (r *UrlMapsService) Update(project string, urlMap string, urlmap *UrlMap) *UrlMapsUpdateCall { - c := &UrlMapsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlMap = urlMap - c.urlmap = urlmap - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *UrlMapsUpdateCall) RequestId(requestId string) *UrlMapsUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *UrlMapsUpdateCall) Fields(s ...googleapi.Field) *UrlMapsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *UrlMapsUpdateCall) Context(ctx context.Context) *UrlMapsUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *UrlMapsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "urlMap": c.urlMap, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *UrlMapsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the specified UrlMap resource with the data included in the request.", - // "httpMethod": "PUT", - // "id": "compute.urlMaps.update", - // "parameterOrder": [ - // "project", - // "urlMap" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "urlMap": { - // "description": "Name of the UrlMap resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/urlMaps/{urlMap}", - // "request": { - // "$ref": "UrlMap" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.urlMaps.validate": - -type UrlMapsValidateCall struct { - s *Service - project string - urlMap string - urlmapsvalidaterequest *UrlMapsValidateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Validate: Runs static validation for the UrlMap. In particular, the -// tests of the provided UrlMap will be run. Calling this method does -// NOT create the UrlMap. -// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/validate -func (r *UrlMapsService) Validate(project string, urlMap string, urlmapsvalidaterequest *UrlMapsValidateRequest) *UrlMapsValidateCall { - c := &UrlMapsValidateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlMap = urlMap - c.urlmapsvalidaterequest = urlmapsvalidaterequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *UrlMapsValidateCall) Fields(s ...googleapi.Field) *UrlMapsValidateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *UrlMapsValidateCall) Context(ctx context.Context) *UrlMapsValidateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *UrlMapsValidateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsValidateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapsvalidaterequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}/validate") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "urlMap": c.urlMap, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.validate" call. -// Exactly one of *UrlMapsValidateResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *UrlMapsValidateResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *UrlMapsValidateCall) Do(opts ...googleapi.CallOption) (*UrlMapsValidateResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &UrlMapsValidateResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.", - // "httpMethod": "POST", - // "id": "compute.urlMaps.validate", - // "parameterOrder": [ - // "project", - // "urlMap" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "urlMap": { - // "description": "Name of the UrlMap resource to be validated as.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/urlMaps/{urlMap}/validate", - // "request": { - // "$ref": "UrlMapsValidateRequest" - // }, - // "response": { - // "$ref": "UrlMapsValidateResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.vpnTunnels.aggregatedList": - -type VpnTunnelsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of VPN tunnels. -func (r *VpnTunnelsService) AggregatedList(project string) *VpnTunnelsAggregatedListCall { - c := &VpnTunnelsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *VpnTunnelsAggregatedListCall) Filter(filter string) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *VpnTunnelsAggregatedListCall) MaxResults(maxResults int64) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *VpnTunnelsAggregatedListCall) OrderBy(orderBy string) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *VpnTunnelsAggregatedListCall) PageToken(pageToken string) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *VpnTunnelsAggregatedListCall) Fields(s ...googleapi.Field) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *VpnTunnelsAggregatedListCall) IfNoneMatch(entityTag string) *VpnTunnelsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *VpnTunnelsAggregatedListCall) Context(ctx context.Context) *VpnTunnelsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *VpnTunnelsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/vpnTunnels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.aggregatedList" call. -// Exactly one of *VpnTunnelAggregatedList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *VpnTunnelAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *VpnTunnelsAggregatedListCall) Do(opts ...googleapi.CallOption) (*VpnTunnelAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &VpnTunnelAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of VPN tunnels.", - // "httpMethod": "GET", - // "id": "compute.vpnTunnels.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/vpnTunnels", - // "response": { - // "$ref": "VpnTunnelAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *VpnTunnelsAggregatedListCall) Pages(ctx context.Context, f func(*VpnTunnelAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.vpnTunnels.delete": - -type VpnTunnelsDeleteCall struct { - s *Service - project string - region string - vpnTunnel string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified VpnTunnel resource. -func (r *VpnTunnelsService) Delete(project string, region string, vpnTunnel string) *VpnTunnelsDeleteCall { - c := &VpnTunnelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.vpnTunnel = vpnTunnel - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *VpnTunnelsDeleteCall) RequestId(requestId string) *VpnTunnelsDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *VpnTunnelsDeleteCall) Fields(s ...googleapi.Field) *VpnTunnelsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *VpnTunnelsDeleteCall) Context(ctx context.Context) *VpnTunnelsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *VpnTunnelsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels/{vpnTunnel}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "vpnTunnel": c.vpnTunnel, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *VpnTunnelsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified VpnTunnel resource.", - // "httpMethod": "DELETE", - // "id": "compute.vpnTunnels.delete", - // "parameterOrder": [ - // "project", - // "region", - // "vpnTunnel" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "vpnTunnel": { - // "description": "Name of the VpnTunnel resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/vpnTunnels/{vpnTunnel}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.vpnTunnels.get": - -type VpnTunnelsGetCall struct { - s *Service - project string - region string - vpnTunnel string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified VpnTunnel resource. Get a list of -// available VPN tunnels by making a list() request. -func (r *VpnTunnelsService) Get(project string, region string, vpnTunnel string) *VpnTunnelsGetCall { - c := &VpnTunnelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.vpnTunnel = vpnTunnel - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *VpnTunnelsGetCall) Fields(s ...googleapi.Field) *VpnTunnelsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *VpnTunnelsGetCall) IfNoneMatch(entityTag string) *VpnTunnelsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *VpnTunnelsGetCall) Context(ctx context.Context) *VpnTunnelsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *VpnTunnelsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels/{vpnTunnel}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "vpnTunnel": c.vpnTunnel, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.get" call. -// Exactly one of *VpnTunnel or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *VpnTunnel.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *VpnTunnelsGetCall) Do(opts ...googleapi.CallOption) (*VpnTunnel, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &VpnTunnel{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified VpnTunnel resource. Get a list of available VPN tunnels by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.vpnTunnels.get", - // "parameterOrder": [ - // "project", - // "region", - // "vpnTunnel" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "vpnTunnel": { - // "description": "Name of the VpnTunnel resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/vpnTunnels/{vpnTunnel}", - // "response": { - // "$ref": "VpnTunnel" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.vpnTunnels.insert": - -type VpnTunnelsInsertCall struct { - s *Service - project string - region string - vpntunnel *VpnTunnel - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a VpnTunnel resource in the specified project and -// region using the data included in the request. -func (r *VpnTunnelsService) Insert(project string, region string, vpntunnel *VpnTunnel) *VpnTunnelsInsertCall { - c := &VpnTunnelsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.vpntunnel = vpntunnel - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *VpnTunnelsInsertCall) RequestId(requestId string) *VpnTunnelsInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *VpnTunnelsInsertCall) Fields(s ...googleapi.Field) *VpnTunnelsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *VpnTunnelsInsertCall) Context(ctx context.Context) *VpnTunnelsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *VpnTunnelsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.vpntunnel) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *VpnTunnelsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a VpnTunnel resource in the specified project and region using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.vpnTunnels.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/vpnTunnels", - // "request": { - // "$ref": "VpnTunnel" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.vpnTunnels.list": - -type VpnTunnelsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of VpnTunnel resources contained in the -// specified project and region. -func (r *VpnTunnelsService) List(project string, region string) *VpnTunnelsListCall { - c := &VpnTunnelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *VpnTunnelsListCall) Filter(filter string) *VpnTunnelsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *VpnTunnelsListCall) MaxResults(maxResults int64) *VpnTunnelsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *VpnTunnelsListCall) OrderBy(orderBy string) *VpnTunnelsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *VpnTunnelsListCall) PageToken(pageToken string) *VpnTunnelsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *VpnTunnelsListCall) Fields(s ...googleapi.Field) *VpnTunnelsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *VpnTunnelsListCall) IfNoneMatch(entityTag string) *VpnTunnelsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *VpnTunnelsListCall) Context(ctx context.Context) *VpnTunnelsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *VpnTunnelsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.list" call. -// Exactly one of *VpnTunnelList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *VpnTunnelList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *VpnTunnelsListCall) Do(opts ...googleapi.CallOption) (*VpnTunnelList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &VpnTunnelList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of VpnTunnel resources contained in the specified project and region.", - // "httpMethod": "GET", - // "id": "compute.vpnTunnels.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/vpnTunnels", - // "response": { - // "$ref": "VpnTunnelList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *VpnTunnelsListCall) Pages(ctx context.Context, f func(*VpnTunnelList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.vpnTunnels.setLabels": - -type VpnTunnelsSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a VpnTunnel. To learn more about -// labels, read the Labeling Resources documentation. -func (r *VpnTunnelsService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *VpnTunnelsSetLabelsCall { - c := &VpnTunnelsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *VpnTunnelsSetLabelsCall) RequestId(requestId string) *VpnTunnelsSetLabelsCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *VpnTunnelsSetLabelsCall) Fields(s ...googleapi.Field) *VpnTunnelsSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *VpnTunnelsSetLabelsCall) Context(ctx context.Context) *VpnTunnelsSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *VpnTunnelsSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetlabelsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels/{resource}/setLabels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.setLabels" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *VpnTunnelsSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the labels on a VpnTunnel. To learn more about labels, read the Labeling Resources documentation.", - // "httpMethod": "POST", - // "id": "compute.vpnTunnels.setLabels", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/vpnTunnels/{resource}/setLabels", - // "request": { - // "$ref": "RegionSetLabelsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.vpnTunnels.testIamPermissions": - -type VpnTunnelsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *VpnTunnelsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *VpnTunnelsTestIamPermissionsCall { - c := &VpnTunnelsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *VpnTunnelsTestIamPermissionsCall) Fields(s ...googleapi.Field) *VpnTunnelsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *VpnTunnelsTestIamPermissionsCall) Context(ctx context.Context) *VpnTunnelsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *VpnTunnelsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *VpnTunnelsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.vpnTunnels.testIamPermissions", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/vpnTunnels/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.zoneOperations.delete": - -type ZoneOperationsDeleteCall struct { - s *Service - project string - zone string - operation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified zone-specific Operations resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/zoneOperations/delete -func (r *ZoneOperationsService) Delete(project string, zone string, operation string) *ZoneOperationsDeleteCall { - c := &ZoneOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.operation = operation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ZoneOperationsDeleteCall) Fields(s ...googleapi.Field) *ZoneOperationsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ZoneOperationsDeleteCall) Context(ctx context.Context) *ZoneOperationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ZoneOperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "operation": c.operation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneOperations.delete" call. -func (c *ZoneOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return err - } - return nil - // { - // "description": "Deletes the specified zone-specific Operations resource.", - // "httpMethod": "DELETE", - // "id": "compute.zoneOperations.delete", - // "parameterOrder": [ - // "project", - // "zone", - // "operation" - // ], - // "parameters": { - // "operation": { - // "description": "Name of the Operations resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/operations/{operation}", - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.zoneOperations.get": - -type ZoneOperationsGetCall struct { - s *Service - project string - zone string - operation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves the specified zone-specific Operations resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/zoneOperations/get -func (r *ZoneOperationsService) Get(project string, zone string, operation string) *ZoneOperationsGetCall { - c := &ZoneOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.operation = operation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ZoneOperationsGetCall) Fields(s ...googleapi.Field) *ZoneOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ZoneOperationsGetCall) IfNoneMatch(entityTag string) *ZoneOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ZoneOperationsGetCall) Context(ctx context.Context) *ZoneOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ZoneOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "operation": c.operation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneOperations.get" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ZoneOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the specified zone-specific Operations resource.", - // "httpMethod": "GET", - // "id": "compute.zoneOperations.get", - // "parameterOrder": [ - // "project", - // "zone", - // "operation" - // ], - // "parameters": { - // "operation": { - // "description": "Name of the Operations resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/operations/{operation}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.zoneOperations.list": - -type ZoneOperationsListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of Operation resources contained within the -// specified zone. -// For details, see https://cloud.google.com/compute/docs/reference/latest/zoneOperations/list -func (r *ZoneOperationsService) List(project string, zone string) *ZoneOperationsListCall { - c := &ZoneOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *ZoneOperationsListCall) Filter(filter string) *ZoneOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *ZoneOperationsListCall) MaxResults(maxResults int64) *ZoneOperationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *ZoneOperationsListCall) OrderBy(orderBy string) *ZoneOperationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *ZoneOperationsListCall) PageToken(pageToken string) *ZoneOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ZoneOperationsListCall) Fields(s ...googleapi.Field) *ZoneOperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ZoneOperationsListCall) IfNoneMatch(entityTag string) *ZoneOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ZoneOperationsListCall) Context(ctx context.Context) *ZoneOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ZoneOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/operations") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneOperations.list" call. -// Exactly one of *OperationList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *OperationList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ZoneOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &OperationList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of Operation resources contained within the specified zone.", - // "httpMethod": "GET", - // "id": "compute.zoneOperations.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/operations", - // "response": { - // "$ref": "OperationList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ZoneOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.zones.get": - -type ZonesGetCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Zone resource. Get a list of available -// zones by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/zones/get -func (r *ZonesService) Get(project string, zone string) *ZonesGetCall { - c := &ZonesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ZonesGetCall) Fields(s ...googleapi.Field) *ZonesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ZonesGetCall) IfNoneMatch(entityTag string) *ZonesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ZonesGetCall) Context(ctx context.Context) *ZonesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ZonesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZonesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zones.get" call. -// Exactly one of *Zone or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Zone.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ZonesGetCall) Do(opts ...googleapi.CallOption) (*Zone, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Zone{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified Zone resource. Get a list of available zones by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.zones.get", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}", - // "response": { - // "$ref": "Zone" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.zones.list": - -type ZonesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of Zone resources available to the specified -// project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/zones/list -func (r *ZonesService) List(project string) *ZonesListCall { - c := &ZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *ZonesListCall) Filter(filter string) *ZonesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *ZonesListCall) MaxResults(maxResults int64) *ZonesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *ZonesListCall) OrderBy(orderBy string) *ZonesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *ZonesListCall) PageToken(pageToken string) *ZonesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ZonesListCall) Fields(s ...googleapi.Field) *ZonesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ZonesListCall) IfNoneMatch(entityTag string) *ZonesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ZonesListCall) Context(ctx context.Context) *ZonesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ZonesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZonesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zones.list" call. -// Exactly one of *ZoneList or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *ZoneList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ZonesListCall) Do(opts ...googleapi.CallOption) (*ZoneList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ZoneList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of Zone resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.zones.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones", - // "response": { - // "$ref": "ZoneList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ZonesListCall) Pages(ctx context.Context, f func(*ZoneList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} diff --git a/vendor/google.golang.org/api/compute/v0.beta/compute-api.json b/vendor/google.golang.org/api/compute/v0.beta/compute-api.json deleted file mode 100644 index 626b31832..000000000 --- a/vendor/google.golang.org/api/compute/v0.beta/compute-api.json +++ /dev/null @@ -1,25049 +0,0 @@ -{ - "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/gfBEnRRtVgnVgbcTDcEDV6LmQ_A\"", - "discoveryVersion": "v1", - "id": "compute:beta", - "name": "compute", - "version": "beta", - "revision": "20170721", - "title": "Compute Engine API", - "description": "Creates and runs virtual machines on Google Cloud Platform.", - "ownerDomain": "google.com", - "ownerName": "Google", - "icons": { - "x16": "https://www.google.com/images/icons/product/compute_engine-16.png", - "x32": "https://www.google.com/images/icons/product/compute_engine-32.png" - }, - "documentationLink": "https://developers.google.com/compute/docs/reference/latest/", - "protocol": "rest", - "baseUrl": "https://www.googleapis.com/compute/beta/projects/", - "basePath": "/compute/beta/projects/", - "rootUrl": "https://www.googleapis.com/", - "servicePath": "compute/beta/projects/", - "batchPath": "batch", - "parameters": { - "alt": { - "type": "string", - "description": "Data format for the response.", - "default": "json", - "enum": [ - "json" - ], - "enumDescriptions": [ - "Responses with Content-Type of application/json" - ], - "location": "query" - }, - "fields": { - "type": "string", - "description": "Selector specifying which fields to include in a partial response.", - "location": "query" - }, - "key": { - "type": "string", - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "location": "query" - }, - "oauth_token": { - "type": "string", - "description": "OAuth 2.0 token for the current user.", - "location": "query" - }, - "prettyPrint": { - "type": "boolean", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "location": "query" - }, - "quotaUser": { - "type": "string", - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.", - "location": "query" - }, - "userIp": { - "type": "string", - "description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.", - "location": "query" - } - }, - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/compute": { - "description": "View and manage your Google Compute Engine resources" - }, - "https://www.googleapis.com/auth/compute.readonly": { - "description": "View your Google Compute Engine resources" - }, - "https://www.googleapis.com/auth/devstorage.full_control": { - "description": "Manage your data and permissions in Google Cloud Storage" - }, - "https://www.googleapis.com/auth/devstorage.read_only": { - "description": "View your data in Google Cloud Storage" - }, - "https://www.googleapis.com/auth/devstorage.read_write": { - "description": "Manage your data in Google Cloud Storage" - } - } - } - }, - "schemas": { - "AcceleratorConfig": { - "id": "AcceleratorConfig", - "type": "object", - "description": "A specification of the type and number of accelerator cards attached to the instance.", - "properties": { - "acceleratorCount": { - "type": "integer", - "description": "The number of the guest accelerator cards exposed to this instance.", - "format": "int32" - }, - "acceleratorType": { - "type": "string", - "description": "Full or partial URL of the accelerator type resource to expose to this instance." - } - } - }, - "AcceleratorType": { - "id": "AcceleratorType", - "type": "object", - "description": "An Accelerator Type resource.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "[Output Only] The deprecation status associated with this accelerator type." - }, - "description": { - "type": "string", - "description": "[Output Only] An optional textual description of the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] The type of the resource. Always compute#acceleratorType for accelerator types.", - "default": "compute#acceleratorType" - }, - "maximumCardsPerInstance": { - "type": "integer", - "description": "[Output Only] Maximum accelerator cards allowed per instance.", - "format": "int32" - }, - "name": { - "type": "string", - "description": "[Output Only] Name of the resource.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined fully-qualified URL for this resource." - }, - "zone": { - "type": "string", - "description": "[Output Only] The name of the zone where the accelerator type resides, such as us-central1-a." - } - } - }, - "AcceleratorTypeAggregatedList": { - "id": "AcceleratorTypeAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of AcceleratorTypesScopedList resources.", - "additionalProperties": { - "$ref": "AcceleratorTypesScopedList", - "description": "[Output Only] Name of the scope containing this set of accelerator types." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#acceleratorTypeAggregatedList for aggregated lists of accelerator types.", - "default": "compute#acceleratorTypeAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "AcceleratorTypeList": { - "id": "AcceleratorTypeList", - "type": "object", - "description": "Contains a list of accelerator types.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of AcceleratorType resources.", - "items": { - "$ref": "AcceleratorType" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#acceleratorTypeList for lists of accelerator types.", - "default": "compute#acceleratorTypeList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "AcceleratorTypesScopedList": { - "id": "AcceleratorTypesScopedList", - "type": "object", - "properties": { - "acceleratorTypes": { - "type": "array", - "description": "[Output Only] List of accelerator types contained in this scope.", - "items": { - "$ref": "AcceleratorType" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] An informational warning that appears when the accelerator types list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "AccessConfig": { - "id": "AccessConfig", - "type": "object", - "description": "An access configuration attached to an instance's network interface. Only one access config per instance is supported.", - "properties": { - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#accessConfig for access configs.", - "default": "compute#accessConfig" - }, - "name": { - "type": "string", - "description": "The name of this access configuration. The default and recommended name is External NAT but you can use any arbitrary string you would like. For example, My external IP or Network Access." - }, - "natIP": { - "type": "string", - "description": "An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance." - }, - "type": { - "type": "string", - "description": "The type of configuration. The default and only option is ONE_TO_ONE_NAT.", - "default": "ONE_TO_ONE_NAT", - "enum": [ - "ONE_TO_ONE_NAT" - ], - "enumDescriptions": [ - "" - ] - } - } - }, - "Address": { - "id": "Address", - "type": "object", - "description": "A reserved address resource.", - "properties": { - "address": { - "type": "string", - "description": "The static external IP address represented by this resource." - }, - "addressType": { - "type": "string", - "description": "The type of address to reserve. If unspecified, defaults to EXTERNAL.", - "enum": [ - "EXTERNAL", - "INTERNAL", - "UNSPECIFIED_TYPE" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "ipVersion": { - "type": "string", - "description": "The IP Version that will be used by this address. Valid options are IPV4 or IPV6. This can only be specified for a global address.", - "enum": [ - "IPV4", - "IPV6", - "UNSPECIFIED_VERSION" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#address for addresses.", - "default": "compute#address" - }, - "labelFingerprint": { - "type": "string", - "description": "A fingerprint for the labels being applied to this Address, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve an Address.", - "format": "byte" - }, - "labels": { - "type": "object", - "description": "Labels to apply to this Address resource. These can be later modified by the setLabels method. Each label key/value must comply with RFC1035. Label values may be empty.", - "additionalProperties": { - "type": "string" - } - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.addresses.insert" - ] - } - }, - "region": { - "type": "string", - "description": "[Output Only] URL of the region where the regional address resides. This field is not applicable to global addresses." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "status": { - "type": "string", - "description": "[Output Only] The status of the address, which can be either IN_USE or RESERVED. An address that is RESERVED is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available.", - "enum": [ - "IN_USE", - "RESERVED" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "subnetwork": { - "type": "string", - "description": "For external addresses, this field should not be used.\n\nThe URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range." - }, - "users": { - "type": "array", - "description": "[Output Only] The URLs of the resources that are using this address.", - "items": { - "type": "string" - } - } - } - }, - "AddressAggregatedList": { - "id": "AddressAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of AddressesScopedList resources.", - "additionalProperties": { - "$ref": "AddressesScopedList", - "description": "[Output Only] Name of the scope containing this set of addresses." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#addressAggregatedList for aggregated lists of addresses.", - "default": "compute#addressAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "AddressList": { - "id": "AddressList", - "type": "object", - "description": "Contains a list of addresses.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Address resources.", - "items": { - "$ref": "Address" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#addressList for lists of addresses.", - "default": "compute#addressList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "AddressesScopedList": { - "id": "AddressesScopedList", - "type": "object", - "properties": { - "addresses": { - "type": "array", - "description": "[Output Only] List of addresses contained in this scope.", - "items": { - "$ref": "Address" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] Informational warning which replaces the list of addresses when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "AliasIpRange": { - "id": "AliasIpRange", - "type": "object", - "description": "An alias IP range attached to an instance's network interface.", - "properties": { - "ipCidrRange": { - "type": "string", - "description": "The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 10.2.3.4), a netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24)." - }, - "subnetworkRangeName": { - "type": "string", - "description": "Optional subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used." - } - } - }, - "AttachedDisk": { - "id": "AttachedDisk", - "type": "object", - "description": "An instance-attached disk resource.", - "properties": { - "autoDelete": { - "type": "boolean", - "description": "Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance)." - }, - "boot": { - "type": "boolean", - "description": "Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem." - }, - "deviceName": { - "type": "string", - "description": "Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.\n\nIf not specified, the server chooses a default device name to apply to this disk, in the form persistent-disks-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks." - }, - "diskEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Encrypts or decrypts a disk using a customer-supplied encryption key.\n\nIf you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key.\n\nIf you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance.\n\nIf you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.\n\nInstance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group." - }, - "index": { - "type": "integer", - "description": "Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value.", - "format": "int32" - }, - "initializeParams": { - "$ref": "AttachedDiskInitializeParams", - "description": "[Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.\n\nThis property is mutually exclusive with the source property; you can only define one or the other, but not both." - }, - "interface": { - "type": "string", - "description": "Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.", - "enum": [ - "NVME", - "SCSI" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#attachedDisk for attached disks.", - "default": "compute#attachedDisk" - }, - "licenses": { - "type": "array", - "description": "[Output Only] Any valid publicly visible licenses.", - "items": { - "type": "string" - } - }, - "mode": { - "type": "string", - "description": "The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.", - "enum": [ - "READ_ONLY", - "READ_WRITE" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "source": { - "type": "string", - "description": "Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.\n\nIf desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.\n\nNote that for InstanceTemplate, specify the disk name, not the URL for the disk." - }, - "type": { - "type": "string", - "description": "Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.", - "enum": [ - "PERSISTENT", - "SCRATCH" - ], - "enumDescriptions": [ - "", - "" - ] - } - } - }, - "AttachedDiskInitializeParams": { - "id": "AttachedDiskInitializeParams", - "type": "object", - "description": "[Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.\n\nThis property is mutually exclusive with the source property; you can only define one or the other, but not both.", - "properties": { - "diskName": { - "type": "string", - "description": "Specifies the disk name. If not specified, the default is to use the name of the instance." - }, - "diskSizeGb": { - "type": "string", - "description": "Specifies the size of the disk in base-2 GB.", - "format": "int64" - }, - "diskStorageType": { - "type": "string", - "description": "[Deprecated] Storage type of the disk.", - "enum": [ - "HDD", - "SSD" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "diskType": { - "type": "string", - "description": "Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:\n\nhttps://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard \n\nOther values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL. For example, the following are valid values: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType \n- projects/project/zones/zone/diskTypes/diskType \n- zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL." - }, - "sourceImage": { - "type": "string", - "description": "The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.\n\nTo create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image:\n\nprojects/debian-cloud/global/images/family/debian-8 \n\nAlternatively, use a specific version of a public operating system image:\n\nprojects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD \n\nTo create a disk with a private image that you created, specify the image name in the following format:\n\nglobal/images/my-private-image \n\nYou can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:\n\nglobal/images/family/my-private-family \n\nIf the source image is deleted later, this field will not be set." - }, - "sourceImageEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.\n\nInstance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys." - } - } - }, - "AuditConfig": { - "id": "AuditConfig", - "type": "object", - "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n{ \"audit_configs\": [ { \"service\": \"allServices\" \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:foo@gmail.com\" ] }, { \"log_type\": \"DATA_WRITE\", }, { \"log_type\": \"ADMIN_READ\", } ] }, { \"service\": \"fooservice.googleapis.com\" \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:bar@gmail.com\" ] } ] } ] }\n\nFor fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ logging, and bar@gmail.com from DATA_WRITE logging.", - "properties": { - "auditLogConfigs": { - "type": "array", - "description": "The configuration for logging of each type of permission.", - "items": { - "$ref": "AuditLogConfig" - } - }, - "exemptedMembers": { - "type": "array", - "description": "", - "items": { - "type": "string" - } - }, - "service": { - "type": "string", - "description": "Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services." - } - } - }, - "AuditLogConfig": { - "id": "AuditLogConfig", - "type": "object", - "description": "Provides the configuration for logging a type of permissions. Example:\n\n{ \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:foo@gmail.com\" ] }, { \"log_type\": \"DATA_WRITE\", } ] }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging.", - "properties": { - "exemptedMembers": { - "type": "array", - "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].", - "items": { - "type": "string" - } - }, - "logType": { - "type": "string", - "description": "The log type that this config enables.", - "enum": [ - "ADMIN_READ", - "DATA_READ", - "DATA_WRITE", - "LOG_TYPE_UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ] - } - } - }, - "AuthorizationLoggingOptions": { - "id": "AuthorizationLoggingOptions", - "type": "object", - "description": "Authorization-related information used by Cloud Audit Logging.", - "properties": { - "permissionType": { - "type": "string", - "description": "The type of the permission that was checked.", - "enum": [ - "ADMIN_READ", - "ADMIN_WRITE", - "DATA_READ", - "DATA_WRITE", - "PERMISSION_TYPE_UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ] - } - } - }, - "Autoscaler": { - "id": "Autoscaler", - "type": "object", - "description": "Represents an Autoscaler resource. Autoscalers allow you to automatically scale virtual machine instances in managed instance groups according to an autoscaling policy that you define. For more information, read Autoscaling Groups of Instances.", - "properties": { - "autoscalingPolicy": { - "$ref": "AutoscalingPolicy", - "description": "The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization.\n\nIf none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#autoscaler for autoscalers.", - "default": "compute#autoscaler" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.instanceGroups.insert" - ] - } - }, - "region": { - "type": "string", - "description": "[Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope)." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "status": { - "type": "string", - "description": "[Output Only] The status of the autoscaler configuration.", - "enum": [ - "ACTIVE", - "DELETING", - "ERROR", - "PENDING" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ] - }, - "statusDetails": { - "type": "array", - "description": "[Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter.", - "items": { - "$ref": "AutoscalerStatusDetails" - } - }, - "target": { - "type": "string", - "description": "URL of the managed instance group that this autoscaler will scale." - }, - "zone": { - "type": "string", - "description": "[Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope)." - } - } - }, - "AutoscalerAggregatedList": { - "id": "AutoscalerAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of AutoscalersScopedList resources.", - "additionalProperties": { - "$ref": "AutoscalersScopedList", - "description": "[Output Only] Name of the scope containing this set of autoscalers." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#autoscalerAggregatedList for aggregated lists of autoscalers.", - "default": "compute#autoscalerAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "AutoscalerList": { - "id": "AutoscalerList", - "type": "object", - "description": "Contains a list of Autoscaler resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Autoscaler resources.", - "items": { - "$ref": "Autoscaler" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#autoscalerList for lists of autoscalers.", - "default": "compute#autoscalerList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "AutoscalerStatusDetails": { - "id": "AutoscalerStatusDetails", - "type": "object", - "properties": { - "message": { - "type": "string", - "description": "The status message." - }, - "type": { - "type": "string", - "description": "The type of error returned.", - "enum": [ - "ALL_INSTANCES_UNHEALTHY", - "BACKEND_SERVICE_DOES_NOT_EXIST", - "CAPPED_AT_MAX_NUM_REPLICAS", - "CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE", - "CUSTOM_METRIC_INVALID", - "MIN_EQUALS_MAX", - "MISSING_CUSTOM_METRIC_DATA_POINTS", - "MISSING_LOAD_BALANCING_DATA_POINTS", - "MORE_THAN_ONE_BACKEND_SERVICE", - "NOT_ENOUGH_QUOTA_AVAILABLE", - "REGION_RESOURCE_STOCKOUT", - "SCALING_TARGET_DOES_NOT_EXIST", - "UNKNOWN", - "UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION", - "ZONE_RESOURCE_STOCKOUT" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - } - } - }, - "AutoscalersScopedList": { - "id": "AutoscalersScopedList", - "type": "object", - "properties": { - "autoscalers": { - "type": "array", - "description": "[Output Only] List of autoscalers contained in this scope.", - "items": { - "$ref": "Autoscaler" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] Informational warning which replaces the list of autoscalers when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "AutoscalingPolicy": { - "id": "AutoscalingPolicy", - "type": "object", - "description": "Cloud Autoscaler policy.", - "properties": { - "coolDownPeriodSec": { - "type": "integer", - "description": "The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds.\n\nVirtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.", - "format": "int32" - }, - "cpuUtilization": { - "$ref": "AutoscalingPolicyCpuUtilization", - "description": "Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group." - }, - "customMetricUtilizations": { - "type": "array", - "description": "Configuration parameters of autoscaling based on a custom metric.", - "items": { - "$ref": "AutoscalingPolicyCustomMetricUtilization" - } - }, - "loadBalancingUtilization": { - "$ref": "AutoscalingPolicyLoadBalancingUtilization", - "description": "Configuration parameters of autoscaling based on load balancer." - }, - "maxNumReplicas": { - "type": "integer", - "description": "The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas.", - "format": "int32" - }, - "minNumReplicas": { - "type": "integer", - "description": "The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed.", - "format": "int32" - } - } - }, - "AutoscalingPolicyCpuUtilization": { - "id": "AutoscalingPolicyCpuUtilization", - "type": "object", - "description": "CPU utilization policy.", - "properties": { - "utilizationTarget": { - "type": "number", - "description": "The target CPU utilization that the autoscaler should maintain. Must be a float value in the range (0, 1]. If not specified, the default is 0.6.\n\nIf the CPU level is below the target utilization, the autoscaler scales down the number of instances until it reaches the minimum number of instances you specified or until the average CPU of your instances reaches the target utilization.\n\nIf the average CPU is above the target utilization, the autoscaler scales up until it reaches the maximum number of instances you specified or until the average utilization reaches the target utilization.", - "format": "double" - } - } - }, - "AutoscalingPolicyCustomMetricUtilization": { - "id": "AutoscalingPolicyCustomMetricUtilization", - "type": "object", - "description": "Custom utilization metric policy.", - "properties": { - "filter": { - "type": "string", - "description": "A filter string, compatible with a Stackdriver Monitoring filter string for TimeSeries.list API call. This filter is used to select a specific TimeSeries for the purpose of autoscaling and to determine whether the metric is exporting per-instance or global data.\n\nFor the filter to be valid for autoscaling purposes, the following rules apply: \n- You can only use the AND operator for joining selectors. \n- You can only use direct equality comparison operator (=) without any functions for each selector. \n- You can specify the metric in both the filter string and in the metric field. However, if specified in both places, the metric must be identical. \n- The monitored resource type determines what kind of values are expected for the metric. If it is a gce_instance, the autoscaler expects the metric to include a separate TimeSeries for each instance in a group. In such a case, you cannot filter on resource labels.\nIf the resource type is any other value, the autoscaler expects this metric to contain values that apply to the entire autoscaled instance group and resource label filtering can be performed to point autoscaler at the correct TimeSeries to scale upon. This is / called a global metric for the purpose of autoscaling.\n\nIf not specified, the type defaults to gce_instance. \n\nYou should provide a filter that is selective enough to pick just one TimeSeries for the autoscaled group or for each of the instances (if you are using gce_instance resource type). If multiple TimeSeries are returned upon the query execution, the autoscaler will sum their respective values to obtain its scaling value." - }, - "metric": { - "type": "string", - "description": "The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values and should be a utilization metric, which means that the number of virtual machines handling requests should increase or decrease proportionally to the metric.\n\nThe metric must have a value type of INT64 or DOUBLE." - }, - "singleInstanceAssignment": { - "type": "number", - "description": "If scaling is based on a global metric value that represents the total amount of work to be done or resource usage, set this value to an amount assigned for a single instance of the scaled group. Autoscaler will keep the number of instances proportional to the value of this metric, the metric itself should not change value due to group resizing.\n\nA good metric to use with the target is for example pubsub.googleapis.com/subscription/num_undelivered_messages or a custom metric exporting the total number of requests coming to your instances.\n\nA bad example would be a metric exporting an average or median latency, since this value can't include a chunk assignable to a single instance, it could be better used with utilization_target instead.", - "format": "double" - }, - "utilizationTarget": { - "type": "number", - "description": "The target value of the metric that autoscaler should maintain. This must be a positive value.\n\nFor example, a good metric to use as a utilization_target is compute.googleapis.com/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances.", - "format": "double" - }, - "utilizationTargetType": { - "type": "string", - "description": "Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not specified, the default is GAUGE.", - "enum": [ - "DELTA_PER_MINUTE", - "DELTA_PER_SECOND", - "GAUGE" - ], - "enumDescriptions": [ - "", - "", - "" - ] - } - } - }, - "AutoscalingPolicyLoadBalancingUtilization": { - "id": "AutoscalingPolicyLoadBalancingUtilization", - "type": "object", - "description": "Configuration parameters of autoscaling based on load balancing.", - "properties": { - "utilizationTarget": { - "type": "number", - "description": "Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.", - "format": "double" - } - } - }, - "Backend": { - "id": "Backend", - "type": "object", - "description": "Message containing information of one individual backend.", - "properties": { - "balancingMode": { - "type": "string", - "description": "Specifies the balancing mode for this backend. For global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for TCP/SSL).\n\nFor Internal Load Balancing, the default and only supported mode is CONNECTION.", - "enum": [ - "CONNECTION", - "RATE", - "UTILIZATION" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "capacityScaler": { - "type": "number", - "description": "A multiplier applied to the group's maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). Default value is 1, which means the group will serve up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available Capacity. Valid range is [0.0,1.0].\n\nThis cannot be used for internal load balancing.", - "format": "float" - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "group": { - "type": "string", - "description": "The fully-qualified URL of a Instance Group resource. This instance group defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource.\n\nNote that you must specify an Instance Group resource using the fully-qualified URL, rather than a partial URL.\n\nWhen the BackendService has load balancing scheme INTERNAL, the instance group must be within the same region as the BackendService." - }, - "maxConnections": { - "type": "integer", - "description": "The max number of simultaneous connections for the group. Can be used with either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.\n\nThis cannot be used for internal load balancing.", - "format": "int32" - }, - "maxConnectionsPerInstance": { - "type": "integer", - "description": "The max number of simultaneous connections that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.\n\nThis cannot be used for internal load balancing.", - "format": "int32" - }, - "maxRate": { - "type": "integer", - "description": "The max requests per second (RPS) of the group. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. For RATE mode, either maxRate or maxRatePerInstance must be set.\n\nThis cannot be used for internal load balancing.", - "format": "int32" - }, - "maxRatePerInstance": { - "type": "number", - "description": "The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set.\n\nThis cannot be used for internal load balancing.", - "format": "float" - }, - "maxUtilization": { - "type": "number", - "description": "Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. The default is 0.8. Valid range is [0.0, 1.0].\n\nThis cannot be used for internal load balancing.", - "format": "float" - } - } - }, - "BackendBucket": { - "id": "BackendBucket", - "type": "object", - "description": "A BackendBucket resource. This resource defines a Cloud Storage bucket.", - "properties": { - "bucketName": { - "type": "string", - "description": "Cloud Storage bucket name." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional textual description of the resource; provided by the client when the resource is created." - }, - "enableCdn": { - "type": "boolean", - "description": "If true, enable Cloud CDN for this BackendBucket." - }, - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "Type of the resource.", - "default": "compute#backendBucket" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - } - } - }, - "BackendBucketList": { - "id": "BackendBucketList", - "type": "object", - "description": "Contains a list of BackendBucket resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of BackendBucket resources.", - "items": { - "$ref": "BackendBucket" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#backendBucketList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "BackendService": { - "id": "BackendService", - "type": "object", - "description": "A BackendService resource. This resource defines a group of backend virtual machines and their serving capacity.", - "properties": { - "affinityCookieTtlSec": { - "type": "integer", - "description": "Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day.\n\nWhen the load balancing scheme is INTERNAL, this field is not used.", - "format": "int32" - }, - "backends": { - "type": "array", - "description": "The list of backends that serve this BackendService.", - "items": { - "$ref": "Backend" - } - }, - "cdnPolicy": { - "$ref": "BackendServiceCdnPolicy", - "description": "Cloud CDN configuration for this BackendService." - }, - "connectionDraining": { - "$ref": "ConnectionDraining" - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "enableCDN": { - "type": "boolean", - "description": "If true, enable Cloud CDN for this BackendService.\n\nWhen the load balancing scheme is INTERNAL, this field is not used." - }, - "fingerprint": { - "type": "string", - "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService.", - "format": "byte" - }, - "healthChecks": { - "type": "array", - "description": "The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified, and a health check is required for GCE backend services. A health check must not be specified for GAE app backend and Cloud Function backend.\n\nFor internal load balancing, a URL to a HealthCheck resource must be specified instead.", - "items": { - "type": "string" - } - }, - "iap": { - "$ref": "BackendServiceIAP" - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#backendService for backend services.", - "default": "compute#backendService" - }, - "loadBalancingScheme": { - "type": "string", - "enum": [ - "EXTERNAL", - "INTERNAL", - "INVALID_LOAD_BALANCING_SCHEME" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "port": { - "type": "integer", - "description": "Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.\n\nThis cannot be used for internal load balancing.", - "format": "int32" - }, - "portName": { - "type": "string", - "description": "Name of backend port. The same name should appear in the instance groups referenced by this service. Required when the load balancing scheme is EXTERNAL.\n\nWhen the load balancing scheme is INTERNAL, this field is not used." - }, - "protocol": { - "type": "string", - "description": "The protocol this BackendService uses to communicate with backends.\n\nPossible values are HTTP, HTTPS, TCP, and SSL. The default is HTTP.\n\nFor internal load balancing, the possible values are TCP and UDP, and the default is TCP.", - "enum": [ - "HTTP", - "HTTPS", - "SSL", - "TCP", - "UDP" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ] - }, - "region": { - "type": "string", - "description": "[Output Only] URL of the region where the regional backend service resides. This field is not applicable to global backend services." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "sessionAffinity": { - "type": "string", - "description": "Type of session affinity to use. The default is NONE.\n\nWhen the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or GENERATED_COOKIE.\n\nWhen the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.\n\nWhen the protocol is UDP, this field is not used.", - "enum": [ - "CLIENT_IP", - "CLIENT_IP_PORT_PROTO", - "CLIENT_IP_PROTO", - "GENERATED_COOKIE", - "NONE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ] - }, - "timeoutSec": { - "type": "integer", - "description": "How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds.", - "format": "int32" - } - } - }, - "BackendServiceAggregatedList": { - "id": "BackendServiceAggregatedList", - "type": "object", - "description": "Contains a list of BackendServicesScopedList.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of BackendServicesScopedList resources.", - "additionalProperties": { - "$ref": "BackendServicesScopedList", - "description": "Name of the scope containing this set of BackendServices." - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#backendServiceAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "BackendServiceCdnPolicy": { - "id": "BackendServiceCdnPolicy", - "type": "object", - "description": "Message containing Cloud CDN configuration for a backend service.", - "properties": { - "cacheKeyPolicy": { - "$ref": "CacheKeyPolicy", - "description": "The CacheKeyPolicy for this CdnPolicy." - } - } - }, - "BackendServiceGroupHealth": { - "id": "BackendServiceGroupHealth", - "type": "object", - "properties": { - "healthStatus": { - "type": "array", - "items": { - "$ref": "HealthStatus" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#backendServiceGroupHealth for the health of backend services.", - "default": "compute#backendServiceGroupHealth" - } - } - }, - "BackendServiceIAP": { - "id": "BackendServiceIAP", - "type": "object", - "description": "Identity-Aware Proxy", - "properties": { - "enabled": { - "type": "boolean" - }, - "oauth2ClientId": { - "type": "string" - }, - "oauth2ClientSecret": { - "type": "string" - }, - "oauth2ClientSecretSha256": { - "type": "string", - "description": "[Output Only] SHA256 hash value for the field oauth2_client_secret above." - } - } - }, - "BackendServiceList": { - "id": "BackendServiceList", - "type": "object", - "description": "Contains a list of BackendService resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of BackendService resources.", - "items": { - "$ref": "BackendService" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#backendServiceList for lists of backend services.", - "default": "compute#backendServiceList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "BackendServicesScopedList": { - "id": "BackendServicesScopedList", - "type": "object", - "properties": { - "backendServices": { - "type": "array", - "description": "List of BackendServices contained in this scope.", - "items": { - "$ref": "BackendService" - } - }, - "warning": { - "type": "object", - "description": "Informational warning which replaces the list of backend services when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "Binding": { - "id": "Binding", - "type": "object", - "description": "Associates `members` with a `role`.", - "properties": { - "condition": { - "$ref": "Expr", - "description": "The condition that is associated with this binding. NOTE: an unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently. This field is GOOGLE_INTERNAL." - }, - "members": { - "type": "array", - "description": "Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`.\n\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.\n\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.", - "items": { - "type": "string" - } - }, - "role": { - "type": "string", - "description": "Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`." - } - } - }, - "CacheInvalidationRule": { - "id": "CacheInvalidationRule", - "type": "object", - "properties": { - "host": { - "type": "string", - "description": "If set, this invalidation rule will only apply to requests with a Host header matching host." - }, - "path": { - "type": "string" - } - } - }, - "CacheKeyPolicy": { - "id": "CacheKeyPolicy", - "type": "object", - "description": "Message containing what to include in the cache key for a request for Cloud CDN.", - "properties": { - "includeHost": { - "type": "boolean", - "description": "If true, requests to different hosts will be cached separately." - }, - "includeProtocol": { - "type": "boolean", - "description": "If true, http and https requests will be cached separately." - }, - "includeQueryString": { - "type": "boolean", - "description": "If true, include query string parameters in the cache key according to query_string_whitelist and query_string_blacklist. If neither is set, the entire query string will be included. If false, the query string will be excluded from the cache key entirely." - }, - "queryStringBlacklist": { - "type": "array", - "description": "Names of query string parameters to exclude in cache keys. All other parameters will be included. Either specify query_string_whitelist or query_string_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters.", - "items": { - "type": "string" - } - }, - "queryStringWhitelist": { - "type": "array", - "description": "Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify query_string_whitelist or query_string_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters.", - "items": { - "type": "string" - } - } - } - }, - "Commitment": { - "id": "Commitment", - "type": "object", - "description": "Represents a Commitment resource. Creating a Commitment resource means that you are purchasing a committed use contract with an explicit start and end time. You can create commitments based on vCPUs and memory usage and receive discounted rates. For full details, read Signing Up for Committed Use Discounts.\n\nCommitted use discounts are subject to Google Cloud Platform's Service Specific Terms. By purchasing a committed use discount, you agree to these terms. Committed use discounts will not renew, so you must purchase a new commitment to continue receiving discounts.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "endTimestamp": { - "type": "string", - "description": "[Output Only] Commitment end time in RFC3339 text format." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#commitment for commitments.", - "default": "compute#commitment" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "plan": { - "type": "string", - "description": "The plan for this commitment, which determines duration and discount rate. The currently supported plans are TWELVE_MONTH (1 year), and THIRTY_SIX_MONTH (3 years).", - "enum": [ - "INVALID", - "THIRTY_SIX_MONTH", - "TWELVE_MONTH" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "region": { - "type": "string", - "description": "[Output Only] URL of the region where this commitment may be used." - }, - "resources": { - "type": "array", - "description": "List of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together.", - "items": { - "$ref": "ResourceCommitment" - } - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "startTimestamp": { - "type": "string", - "description": "[Output Only] Commitment start time in RFC3339 text format." - }, - "status": { - "type": "string", - "description": "[Output Only] Status of the commitment with regards to eventual expiration (each commitment has an end date defined). One of the following values: NOT_YET_ACTIVE, ACTIVE, EXPIRED.", - "enum": [ - "ACTIVE", - "CREATING", - "EXPIRED", - "NOT_YET_ACTIVE" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ] - }, - "statusMessage": { - "type": "string", - "description": "[Output Only] An optional, human-readable explanation of the status." - } - } - }, - "CommitmentAggregatedList": { - "id": "CommitmentAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of CommitmentsScopedList resources.", - "additionalProperties": { - "$ref": "CommitmentsScopedList", - "description": "[Output Only] Name of the scope containing this set of commitments." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#commitmentAggregatedList for aggregated lists of commitments.", - "default": "compute#commitmentAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "CommitmentList": { - "id": "CommitmentList", - "type": "object", - "description": "Contains a list of Commitment resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Commitment resources.", - "items": { - "$ref": "Commitment" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#commitmentList for lists of commitments.", - "default": "compute#commitmentList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "CommitmentsScopedList": { - "id": "CommitmentsScopedList", - "type": "object", - "properties": { - "commitments": { - "type": "array", - "description": "[Output Only] List of commitments contained in this scope.", - "items": { - "$ref": "Commitment" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] Informational warning which replaces the list of commitments when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "Condition": { - "id": "Condition", - "type": "object", - "description": "A condition to be met.", - "properties": { - "iam": { - "type": "string", - "description": "Trusted attributes supplied by the IAM system.", - "enum": [ - "APPROVER", - "ATTRIBUTION", - "AUTHORITY", - "JUSTIFICATION_TYPE", - "NO_ATTR", - "SECURITY_REALM" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ] - }, - "op": { - "type": "string", - "description": "An operator to apply the subject with.", - "enum": [ - "DISCHARGED", - "EQUALS", - "IN", - "NOT_EQUALS", - "NOT_IN", - "NO_OP" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ] - }, - "svc": { - "type": "string", - "description": "Trusted attributes discharged by the service." - }, - "sys": { - "type": "string", - "description": "Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.", - "enum": [ - "IP", - "NAME", - "NO_ATTR", - "REGION", - "SERVICE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ] - }, - "value": { - "type": "string", - "description": "DEPRECATED. Use 'values' instead." - }, - "values": { - "type": "array", - "description": "The objects of the condition. This is mutually exclusive with 'value'.", - "items": { - "type": "string" - } - } - } - }, - "ConnectionDraining": { - "id": "ConnectionDraining", - "type": "object", - "description": "Message containing connection draining configuration.", - "properties": { - "drainingTimeoutSec": { - "type": "integer", - "description": "Time for which instance will be drained (not accept new connections, but still work to finish started).", - "format": "int32" - } - } - }, - "CustomerEncryptionKey": { - "id": "CustomerEncryptionKey", - "type": "object", - "description": "Represents a customer-supplied encryption key", - "properties": { - "rawKey": { - "type": "string", - "description": "Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource." - }, - "rsaEncryptedKey": { - "type": "string", - "description": "Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.\n\nThe key must meet the following requirements before you can provide it to Compute Engine: \n- The key is wrapped using a RSA public key certificate provided by Google. \n- After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:\nhttps://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem" - }, - "sha256": { - "type": "string", - "description": "[Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource." - } - } - }, - "CustomerEncryptionKeyProtectedDisk": { - "id": "CustomerEncryptionKeyProtectedDisk", - "type": "object", - "properties": { - "diskEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Decrypts data associated with the disk with a customer-supplied encryption key." - }, - "source": { - "type": "string", - "description": "Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks." - } - } - }, - "DeprecationStatus": { - "id": "DeprecationStatus", - "type": "object", - "description": "Deprecation status for a public resource.", - "properties": { - "deleted": { - "type": "string", - "description": "An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it." - }, - "deprecated": { - "type": "string", - "description": "An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it." - }, - "obsolete": { - "type": "string", - "description": "An optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it." - }, - "replacement": { - "type": "string", - "description": "The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource." - }, - "state": { - "type": "string", - "description": "The deprecation state of this resource. This can be DEPRECATED, OBSOLETE, or DELETED. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.", - "enum": [ - "DELETED", - "DEPRECATED", - "OBSOLETE" - ], - "enumDescriptions": [ - "", - "", - "" - ] - } - } - }, - "Disk": { - "id": "Disk", - "type": "object", - "description": "A Disk resource.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "diskEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Encrypts the disk using a customer-supplied encryption key.\n\nAfter you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine).\n\nCustomer-supplied encryption keys do not protect access to metadata of the disk.\n\nIf you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#disk for disks.", - "default": "compute#disk" - }, - "labelFingerprint": { - "type": "string", - "description": "A fingerprint for the labels being applied to this disk, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve a disk.", - "format": "byte" - }, - "labels": { - "type": "object", - "description": "Labels to apply to this disk. These can be later modified by the setLabels method.", - "additionalProperties": { - "type": "string" - } - }, - "lastAttachTimestamp": { - "type": "string", - "description": "[Output Only] Last attach timestamp in RFC3339 text format." - }, - "lastDetachTimestamp": { - "type": "string", - "description": "[Output Only] Last detach timestamp in RFC3339 text format." - }, - "licenses": { - "type": "array", - "description": "Any applicable publicly visible licenses.", - "items": { - "type": "string" - } - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.disks.insert" - ] - } - }, - "options": { - "type": "string", - "description": "Internal use only." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined fully-qualified URL for this resource." - }, - "sizeGb": { - "type": "string", - "description": "Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk.\n\nIf you specify this field along with sourceImage or sourceSnapshot, the value of sizeGb must not be less than the size of the sourceImage or the size of the snapshot. Acceptable values are 1 to 65536, inclusive.", - "format": "int64" - }, - "sourceImage": { - "type": "string", - "description": "The source image used to create this disk. If the source image is deleted, this field will not be set.\n\nTo create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image:\n\nprojects/debian-cloud/global/images/family/debian-8 \n\nAlternatively, use a specific version of a public operating system image:\n\nprojects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD \n\nTo create a disk with a private image that you created, specify the image name in the following format:\n\nglobal/images/my-private-image \n\nYou can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:\n\nglobal/images/family/my-private-family" - }, - "sourceImageEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key." - }, - "sourceImageId": { - "type": "string", - "description": "[Output Only] The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used." - }, - "sourceSnapshot": { - "type": "string", - "description": "The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: \n- https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot \n- projects/project/global/snapshots/snapshot \n- global/snapshots/snapshot" - }, - "sourceSnapshotEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key." - }, - "sourceSnapshotId": { - "type": "string", - "description": "[Output Only] The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used." - }, - "status": { - "type": "string", - "description": "[Output Only] The status of disk creation.", - "enum": [ - "CREATING", - "FAILED", - "READY", - "RESTORING" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ] - }, - "storageType": { - "type": "string", - "description": "[Deprecated] Storage type of the persistent disk.", - "enum": [ - "HDD", - "SSD" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "type": { - "type": "string", - "description": "URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk." - }, - "users": { - "type": "array", - "description": "[Output Only] Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance", - "items": { - "type": "string" - } - }, - "zone": { - "type": "string", - "description": "[Output Only] URL of the zone where the disk resides." - } - } - }, - "DiskAggregatedList": { - "id": "DiskAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of DisksScopedList resources.", - "additionalProperties": { - "$ref": "DisksScopedList", - "description": "[Output Only] Name of the scope containing this set of disks." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#diskAggregatedList for aggregated lists of persistent disks.", - "default": "compute#diskAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "DiskList": { - "id": "DiskList", - "type": "object", - "description": "A list of Disk resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Disk resources.", - "items": { - "$ref": "Disk" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#diskList for lists of disks.", - "default": "compute#diskList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "DiskMoveRequest": { - "id": "DiskMoveRequest", - "type": "object", - "properties": { - "destinationZone": { - "type": "string", - "description": "The URL of the destination zone to move the disk. This can be a full or partial URL. For example, the following are all valid URLs to a zone: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone \n- projects/project/zones/zone \n- zones/zone" - }, - "targetDisk": { - "type": "string", - "description": "The URL of the target disk to move. This can be a full or partial URL. For example, the following are all valid URLs to a disk: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk \n- projects/project/zones/zone/disks/disk \n- zones/zone/disks/disk" - } - } - }, - "DiskType": { - "id": "DiskType", - "type": "object", - "description": "A DiskType resource.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "defaultDiskSizeGb": { - "type": "string", - "description": "[Output Only] Server-defined default disk size in GB.", - "format": "int64" - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "[Output Only] The deprecation status associated with this disk type." - }, - "description": { - "type": "string", - "description": "[Output Only] An optional description of this resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#diskType for disk types.", - "default": "compute#diskType" - }, - "name": { - "type": "string", - "description": "[Output Only] Name of the resource.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "validDiskSize": { - "type": "string", - "description": "[Output Only] An optional textual description of the valid disk size, such as \"10GB-10TB\"." - }, - "zone": { - "type": "string", - "description": "[Output Only] URL of the zone where the disk type resides." - } - } - }, - "DiskTypeAggregatedList": { - "id": "DiskTypeAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of DiskTypesScopedList resources.", - "additionalProperties": { - "$ref": "DiskTypesScopedList", - "description": "[Output Only] Name of the scope containing this set of disk types." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#diskTypeAggregatedList.", - "default": "compute#diskTypeAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "DiskTypeList": { - "id": "DiskTypeList", - "type": "object", - "description": "Contains a list of disk types.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of DiskType resources.", - "items": { - "$ref": "DiskType" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#diskTypeList for disk types.", - "default": "compute#diskTypeList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "DiskTypesScopedList": { - "id": "DiskTypesScopedList", - "type": "object", - "properties": { - "diskTypes": { - "type": "array", - "description": "[Output Only] List of disk types contained in this scope.", - "items": { - "$ref": "DiskType" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] Informational warning which replaces the list of disk types when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "DisksResizeRequest": { - "id": "DisksResizeRequest", - "type": "object", - "properties": { - "sizeGb": { - "type": "string", - "description": "The new size of the persistent disk, which is specified in GB.", - "format": "int64" - } - } - }, - "DisksScopedList": { - "id": "DisksScopedList", - "type": "object", - "properties": { - "disks": { - "type": "array", - "description": "[Output Only] List of disks contained in this scope.", - "items": { - "$ref": "Disk" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] Informational warning which replaces the list of disks when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "Expr": { - "id": "Expr", - "type": "object", - "description": "Represents an expression text. Example:\n\ntitle: \"User account presence\" description: \"Determines whether the request has a user account\" expression: \"size(request.user) \u003e 0\"", - "properties": { - "description": { - "type": "string", - "description": "An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI." - }, - "expression": { - "type": "string", - "description": "Textual representation of an expression in Common Expression Language syntax.\n\nThe application context of the containing message determines which well-known feature set of CEL is supported." - }, - "location": { - "type": "string", - "description": "An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file." - }, - "title": { - "type": "string", - "description": "An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression." - } - } - }, - "Firewall": { - "id": "Firewall", - "type": "object", - "description": "Represents a Firewall resource.", - "properties": { - "allowed": { - "type": "array", - "description": "The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.", - "items": { - "type": "object", - "properties": { - "IPProtocol": { - "type": "string", - "description": "The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number." - }, - "ports": { - "type": "array", - "description": "An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.\n\nExample inputs include: [\"22\"], [\"80\",\"443\"], and [\"12345-12349\"].", - "items": { - "type": "string" - } - } - } - } - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "denied": { - "type": "array", - "description": "The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.", - "items": { - "type": "object", - "properties": { - "IPProtocol": { - "type": "string", - "description": "The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number." - }, - "ports": { - "type": "array", - "description": "An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.\n\nExample inputs include: [\"22\"], [\"80\",\"443\"], and [\"12345-12349\"].", - "items": { - "type": "string" - } - } - } - } - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "destinationRanges": { - "type": "array", - "description": "If destination ranges are specified, the firewall will apply only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.", - "items": { - "type": "string" - } - }, - "direction": { - "type": "string", - "description": "Direction of traffic to which this firewall applies; default is INGRESS. Note: For INGRESS traffic, it is NOT supported to specify destinationRanges; For EGRESS traffic, it is NOT supported to specify sourceRanges OR sourceTags.", - "enum": [ - "EGRESS", - "INGRESS" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#firewall for firewall rules.", - "default": "compute#firewall" - }, - "name": { - "type": "string", - "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.firewalls.insert", - "compute.firewalls.patch" - ] - } - }, - "network": { - "type": "string", - "description": "URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:\nglobal/networks/default\nIf you choose to specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network \n- projects/myproject/global/networks/my-network \n- global/networks/default" - }, - "priority": { - "type": "integer", - "description": "Priority for this rule. This is an integer between 0 and 65535, both inclusive. When not specified, the value assumed is 1000. Relative priorities determine precedence of conflicting rules. Lower value of priority implies higher precedence (eg, a rule with priority 0 has higher precedence than a rule with priority 1). DENY rules take precedence over ALLOW rules having equal priority.", - "format": "int32" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "sourceRanges": { - "type": "array", - "description": "If source ranges are specified, the firewall will apply only to traffic that has source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Only IPv4 is supported.", - "items": { - "type": "string" - } - }, - "sourceServiceAccounts": { - "type": "array", - "description": "If source service accounts are specified, the firewall will apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both properties for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.", - "items": { - "type": "string" - } - }, - "sourceTags": { - "type": "array", - "description": "If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply.", - "items": { - "type": "string" - } - }, - "targetServiceAccounts": { - "type": "array", - "description": "A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network.", - "items": { - "type": "string" - } - }, - "targetTags": { - "type": "array", - "description": "A list of instance tags indicating sets of instances located in the network that may make network connections as specified in allowed[]. If no targetTags are specified, the firewall rule applies to all instances on the specified network.", - "items": { - "type": "string" - } - } - } - }, - "FirewallList": { - "id": "FirewallList", - "type": "object", - "description": "Contains a list of firewalls.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Firewall resources.", - "items": { - "$ref": "Firewall" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#firewallList for lists of firewalls.", - "default": "compute#firewallList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "FixedOrPercent": { - "id": "FixedOrPercent", - "type": "object", - "description": "Encapsulates numeric value that can be either absolute or relative.", - "properties": { - "calculated": { - "type": "integer", - "description": "[Output Only] Absolute value calculated based on mode: mode = fixed -\u003e calculated = fixed = percent -\u003e calculated = ceiling(percent/100 * base_value)", - "format": "int32" - }, - "fixed": { - "type": "integer", - "description": "fixed must be non-negative.", - "format": "int32" - }, - "percent": { - "type": "integer", - "description": "percent must belong to [0, 100].", - "format": "int32" - } - } - }, - "ForwardingRule": { - "id": "ForwardingRule", - "type": "object", - "description": "A ForwardingRule resource. A ForwardingRule resource specifies which pool of target virtual machines to forward a packet to if it matches the given [IPAddress, IPProtocol, ports] tuple.", - "properties": { - "IPAddress": { - "type": "string", - "description": "The IP address that this forwarding rule is serving on behalf of.\n\nFor global forwarding rules, the address must be a global IP. For regional forwarding rules, the address must live in the same region as the forwarding rule. By default, this field is empty and an ephemeral IPv4 address from the same scope (global or regional) will be assigned. A regional forwarding rule supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6.\n\nWhen the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnetwork configured for the forwarding rule. A reserved address cannot be used. If the field is empty, the IP address will be automatically allocated from the internal IP range of the subnetwork or network configured for this forwarding rule." - }, - "IPProtocol": { - "type": "string", - "description": "The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP, AH, SCTP or ICMP.\n\nWhen the load balancing scheme is INTERNAL, only TCP and UDP are valid.", - "enum": [ - "AH", - "ESP", - "ICMP", - "SCTP", - "TCP", - "UDP" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ] - }, - "backendService": { - "type": "string", - "description": "This field is not used for external load balancing.\n\nFor internal load balancing, this field identifies the BackendService resource to receive the matched traffic." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "ipVersion": { - "type": "string", - "description": "The IP Version that will be used by this forwarding rule. Valid options are IPV4 or IPV6. This can only be specified for a global forwarding rule.", - "enum": [ - "IPV4", - "IPV6", - "UNSPECIFIED_VERSION" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#forwardingRule for Forwarding Rule resources.", - "default": "compute#forwardingRule" - }, - "labelFingerprint": { - "type": "string", - "description": "A fingerprint for the labels being applied to this resource, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve a ForwardingRule.", - "format": "byte" - }, - "labels": { - "type": "object", - "description": "Labels to apply to this resource. These can be later modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.", - "additionalProperties": { - "type": "string" - } - }, - "loadBalancingScheme": { - "type": "string", - "description": "This signifies what the ForwardingRule will be used for and can only take the following values: INTERNAL, EXTERNAL The value of INTERNAL means that this will be used for Internal Network Load Balancing (TCP, UDP). The value of EXTERNAL means that this will be used for External Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy)", - "enum": [ - "EXTERNAL", - "INTERNAL", - "INVALID" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "name": { - "type": "string", - "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "network": { - "type": "string", - "description": "This field is not used for external load balancing.\n\nFor internal load balancing, this field identifies the network that the load balanced IP should belong to for this Forwarding Rule. If this field is not specified, the default network will be used." - }, - "portRange": { - "type": "string", - "description": "This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance.\n\nApplicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges.\n\nSome types of forwarding target have constraints on the acceptable ports: \n- TargetHttpProxy: 80, 8080 \n- TargetHttpsProxy: 443 \n- TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 \n- TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 \n- TargetVpnGateway: 500, 4500\n-" - }, - "ports": { - "type": "array", - "description": "This field is used along with the backend_service field for internal load balancing.\n\nWhen the load balancing scheme is INTERNAL, a single port or a comma separated list of ports can be configured. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule.\n\nYou may specify a maximum of up to 5 ports.", - "items": { - "type": "string" - } - }, - "region": { - "type": "string", - "description": "[Output Only] URL of the region where the regional forwarding rule resides. This field is not applicable to global forwarding rules." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "serviceLabel": { - "type": "string", - "description": "An optional prefix to the service name for this Forwarding Rule. If specified, will be the first label of the fully qualified service name.\n\nThe label must be 1-63 characters long, and comply with RFC1035. Specifically, the label must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.\n\nThis field is only used for internal load balancing.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "serviceName": { - "type": "string", - "description": "[Output Only] The internal fully qualified service name for this Forwarding Rule.\n\nThis field is only used for internal load balancing." - }, - "subnetwork": { - "type": "string", - "description": "This field is not used for external load balancing.\n\nFor internal load balancing, this field identifies the subnetwork that the load balanced IP should belong to for this Forwarding Rule.\n\nIf the network specified is in auto subnet mode, this field is optional. However, if the network is in custom subnet mode, a subnetwork must be specified." - }, - "target": { - "type": "string", - "description": "The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must live in the same region as the forwarding rule. For global forwarding rules, this target must be a global load balancing resource. The forwarded traffic must be of a type appropriate to the target object.\n\nThis field is not used for internal load balancing." - } - } - }, - "ForwardingRuleAggregatedList": { - "id": "ForwardingRuleAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of ForwardingRulesScopedList resources.", - "additionalProperties": { - "$ref": "ForwardingRulesScopedList", - "description": "Name of the scope containing this set of addresses." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#forwardingRuleAggregatedList for lists of forwarding rules.", - "default": "compute#forwardingRuleAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "ForwardingRuleList": { - "id": "ForwardingRuleList", - "type": "object", - "description": "Contains a list of ForwardingRule resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of ForwardingRule resources.", - "items": { - "$ref": "ForwardingRule" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#forwardingRuleList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "ForwardingRulesScopedList": { - "id": "ForwardingRulesScopedList", - "type": "object", - "properties": { - "forwardingRules": { - "type": "array", - "description": "List of forwarding rules contained in this scope.", - "items": { - "$ref": "ForwardingRule" - } - }, - "warning": { - "type": "object", - "description": "Informational warning which replaces the list of forwarding rules when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "GlobalSetLabelsRequest": { - "id": "GlobalSetLabelsRequest", - "type": "object", - "properties": { - "labelFingerprint": { - "type": "string", - "description": "The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash when updating or changing labels. Make a get() request to the resource to get the latest fingerprint.", - "format": "byte" - }, - "labels": { - "type": "object", - "description": "A list of labels to apply for this resource. Each label key & value must comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. For example, \"webserver-frontend\": \"images\". A label value can also be empty (e.g. \"my-label\": \"\").", - "additionalProperties": { - "type": "string" - } - } - } - }, - "GuestOsFeature": { - "id": "GuestOsFeature", - "type": "object", - "description": "Guest OS features.", - "properties": { - "type": { - "type": "string", - "description": "The type of supported feature. Currently only VIRTIO_SCSI_MULTIQUEUE is supported. For newer Windows images, the server might also populate this property with the value WINDOWS to indicate that this is a Windows image. This value is purely informational and does not enable or disable any features.", - "enum": [ - "FEATURE_TYPE_UNSPECIFIED", - "MULTI_IP_SUBNET", - "VIRTIO_SCSI_MULTIQUEUE", - "WINDOWS" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ] - } - } - }, - "HTTPHealthCheck": { - "id": "HTTPHealthCheck", - "type": "object", - "properties": { - "host": { - "type": "string", - "description": "The value of the host header in the HTTP health check request. If left empty (default value), the IP on behalf of which this health check is performed will be used." - }, - "port": { - "type": "integer", - "description": "The TCP port number for the health check request. The default value is 80. Valid values are 1 through 65535.", - "format": "int32" - }, - "portName": { - "type": "string", - "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence." - }, - "proxyHeader": { - "type": "string", - "description": "Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "requestPath": { - "type": "string", - "description": "The request path of the HTTP health check request. The default value is /." - } - } - }, - "HTTPSHealthCheck": { - "id": "HTTPSHealthCheck", - "type": "object", - "properties": { - "host": { - "type": "string", - "description": "The value of the host header in the HTTPS health check request. If left empty (default value), the IP on behalf of which this health check is performed will be used." - }, - "port": { - "type": "integer", - "description": "The TCP port number for the health check request. The default value is 443. Valid values are 1 through 65535.", - "format": "int32" - }, - "portName": { - "type": "string", - "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence." - }, - "proxyHeader": { - "type": "string", - "description": "Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "requestPath": { - "type": "string", - "description": "The request path of the HTTPS health check request. The default value is /." - } - } - }, - "HealthCheck": { - "id": "HealthCheck", - "type": "object", - "description": "An HealthCheck resource. This resource defines a template for how individual virtual machines should be checked for health, via one of the supported protocols.", - "properties": { - "checkIntervalSec": { - "type": "integer", - "description": "How often (in seconds) to send a health check. The default value is 5 seconds.", - "format": "int32" - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in 3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "healthyThreshold": { - "type": "integer", - "description": "A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.", - "format": "int32" - }, - "httpHealthCheck": { - "$ref": "HTTPHealthCheck" - }, - "httpsHealthCheck": { - "$ref": "HTTPSHealthCheck" - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "Type of the resource.", - "default": "compute#healthCheck" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "sslHealthCheck": { - "$ref": "SSLHealthCheck" - }, - "tcpHealthCheck": { - "$ref": "TCPHealthCheck" - }, - "timeoutSec": { - "type": "integer", - "description": "How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.", - "format": "int32" - }, - "type": { - "type": "string", - "description": "Specifies the type of the healthCheck, either TCP, SSL, HTTP or HTTPS. If not specified, the default is TCP. Exactly one of the protocol-specific health check field must be specified, which must match type field.", - "enum": [ - "HTTP", - "HTTPS", - "INVALID", - "SSL", - "TCP", - "UDP" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ] - }, - "udpHealthCheck": { - "$ref": "UDPHealthCheck" - }, - "unhealthyThreshold": { - "type": "integer", - "description": "A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.", - "format": "int32" - } - } - }, - "HealthCheckList": { - "id": "HealthCheckList", - "type": "object", - "description": "Contains a list of HealthCheck resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of HealthCheck resources.", - "items": { - "$ref": "HealthCheck" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#healthCheckList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "HealthCheckReference": { - "id": "HealthCheckReference", - "type": "object", - "description": "A full or valid partial URL to a health check. For example, the following are valid URLs: \n- https://www.googleapis.com/compute/beta/projects/project-id/global/httpHealthChecks/health-check \n- projects/project-id/global/httpHealthChecks/health-check \n- global/httpHealthChecks/health-check", - "properties": { - "healthCheck": { - "type": "string" - } - } - }, - "HealthStatus": { - "id": "HealthStatus", - "type": "object", - "properties": { - "healthState": { - "type": "string", - "description": "Health state of the instance.", - "enum": [ - "HEALTHY", - "UNHEALTHY" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "instance": { - "type": "string", - "description": "URL of the instance resource." - }, - "ipAddress": { - "type": "string", - "description": "The IP address represented by this resource." - }, - "port": { - "type": "integer", - "description": "The port on the instance.", - "format": "int32" - } - } - }, - "HostRule": { - "id": "HostRule", - "type": "object", - "description": "UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.", - "properties": { - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "hosts": { - "type": "array", - "description": "The list of host patterns to match. They must be valid hostnames, except * will match any string of ([a-z0-9-.]*). In that case, * must be the first character and must be followed in the pattern by either - or ..", - "items": { - "type": "string" - } - }, - "pathMatcher": { - "type": "string", - "description": "The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion." - } - } - }, - "HttpHealthCheck": { - "id": "HttpHealthCheck", - "type": "object", - "description": "An HttpHealthCheck resource. This resource defines a template for how individual instances should be checked for health, via HTTP.", - "properties": { - "checkIntervalSec": { - "type": "integer", - "description": "How often (in seconds) to send a health check. The default value is 5 seconds.", - "format": "int32" - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "healthyThreshold": { - "type": "integer", - "description": "A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.", - "format": "int32" - }, - "host": { - "type": "string", - "description": "The value of the host header in the HTTP health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#httpHealthCheck for HTTP health checks.", - "default": "compute#httpHealthCheck" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "port": { - "type": "integer", - "description": "The TCP port number for the HTTP health check request. The default value is 80.", - "format": "int32" - }, - "requestPath": { - "type": "string", - "description": "The request path of the HTTP health check request. The default value is /." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "timeoutSec": { - "type": "integer", - "description": "How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.", - "format": "int32" - }, - "unhealthyThreshold": { - "type": "integer", - "description": "A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.", - "format": "int32" - } - } - }, - "HttpHealthCheckList": { - "id": "HttpHealthCheckList", - "type": "object", - "description": "Contains a list of HttpHealthCheck resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of HttpHealthCheck resources.", - "items": { - "$ref": "HttpHealthCheck" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#httpHealthCheckList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "HttpsHealthCheck": { - "id": "HttpsHealthCheck", - "type": "object", - "description": "An HttpsHealthCheck resource. This resource defines a template for how individual instances should be checked for health, via HTTPS.", - "properties": { - "checkIntervalSec": { - "type": "integer", - "description": "How often (in seconds) to send a health check. The default value is 5 seconds.", - "format": "int32" - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "healthyThreshold": { - "type": "integer", - "description": "A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.", - "format": "int32" - }, - "host": { - "type": "string", - "description": "The value of the host header in the HTTPS health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "Type of the resource.", - "default": "compute#httpsHealthCheck" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "port": { - "type": "integer", - "description": "The TCP port number for the HTTPS health check request. The default value is 443.", - "format": "int32" - }, - "requestPath": { - "type": "string", - "description": "The request path of the HTTPS health check request. The default value is \"/\"." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "timeoutSec": { - "type": "integer", - "description": "How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have a greater value than checkIntervalSec.", - "format": "int32" - }, - "unhealthyThreshold": { - "type": "integer", - "description": "A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.", - "format": "int32" - } - } - }, - "HttpsHealthCheckList": { - "id": "HttpsHealthCheckList", - "type": "object", - "description": "Contains a list of HttpsHealthCheck resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of HttpsHealthCheck resources.", - "items": { - "$ref": "HttpsHealthCheck" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#httpsHealthCheckList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "Image": { - "id": "Image", - "type": "object", - "description": "An Image resource.", - "properties": { - "archiveSizeBytes": { - "type": "string", - "description": "Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).", - "format": "int64" - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "The deprecation status associated with this image." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "diskSizeGb": { - "type": "string", - "description": "Size of the image when restored onto a persistent disk (in GB).", - "format": "int64" - }, - "family": { - "type": "string", - "description": "The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035." - }, - "guestOsFeatures": { - "type": "array", - "description": "A list of features to enable on the guest OS. Applicable for bootable images only. Currently, only one feature can be enabled, VIRTIO_SCSI_MULTIQUEUE, which allows each virtual CPU to have its own queue. For Windows images, you can only enable VIRTIO_SCSI_MULTIQUEUE on images with driver version 1.2.0.1621 or higher. Linux images with kernel versions 3.17 and higher will support VIRTIO_SCSI_MULTIQUEUE.\n\nFor new Windows images, the server might also populate this field with the value WINDOWS, to indicate that this is a Windows image. This value is purely informational and does not enable or disable any features.", - "items": { - "$ref": "GuestOsFeature" - } - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "imageEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Encrypts the image using a customer-supplied encryption key.\n\nAfter you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image).\n\nCustomer-supplied encryption keys do not protect access to metadata of the disk.\n\nIf you do not provide an encryption key when creating the image, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the image later." - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#image for images.", - "default": "compute#image" - }, - "labelFingerprint": { - "type": "string", - "description": "A fingerprint for the labels being applied to this image, which is essentially a hash of the labels used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve an image.", - "format": "byte" - }, - "labels": { - "type": "object", - "description": "Labels to apply to this image. These can be later modified by the setLabels method.", - "additionalProperties": { - "type": "string" - } - }, - "licenses": { - "type": "array", - "description": "Any applicable license URI.", - "items": { - "type": "string" - } - }, - "name": { - "type": "string", - "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.images.insert" - ] - } - }, - "rawDisk": { - "type": "object", - "description": "The parameters of the raw disk image.", - "properties": { - "containerType": { - "type": "string", - "description": "The format used to encode and transmit the block device, which should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created.", - "enum": [ - "TAR" - ], - "enumDescriptions": [ - "" - ] - }, - "sha1Checksum": { - "type": "string", - "description": "An optional SHA1 checksum of the disk image before unpackaging; provided by the client when the disk image is created.", - "pattern": "[a-f0-9]{40}" - }, - "source": { - "type": "string", - "description": "The full Google Cloud Storage URL where the disk image is stored. You must provide either this property or the sourceDisk property but not both.", - "annotations": { - "required": [ - "compute.images.insert" - ] - } - } - } - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "sourceDisk": { - "type": "string", - "description": "URL of the source disk used to create this image. This can be a full or valid partial URL. You must provide either this property or the rawDisk.source property but not both to create an image. For example, the following are valid values: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk \n- projects/project/zones/zone/disks/disk \n- zones/zone/disks/disk" - }, - "sourceDiskEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key." - }, - "sourceDiskId": { - "type": "string", - "description": "The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name." - }, - "sourceImage": { - "type": "string", - "description": "URL of the source image used to create this image. This can be a full or valid partial URL. You must provide exactly one of: \n- this property, or \n- the rawDisk.source property, or \n- the sourceDisk property in order to create an image." - }, - "sourceImageEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key." - }, - "sourceImageId": { - "type": "string", - "description": "[Output Only] The ID value of the image used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given image name." - }, - "sourceType": { - "type": "string", - "description": "The type of the image used to create this disk. The default and only value is RAW", - "default": "RAW", - "enum": [ - "RAW" - ], - "enumDescriptions": [ - "" - ] - }, - "status": { - "type": "string", - "description": "[Output Only] The status of the image. An image can be used to create other resources, such as instances, only after the image has been successfully created and the status is set to READY. Possible values are FAILED, PENDING, or READY.", - "enum": [ - "FAILED", - "PENDING", - "READY" - ], - "enumDescriptions": [ - "", - "", - "" - ] - } - } - }, - "ImageList": { - "id": "ImageList", - "type": "object", - "description": "Contains a list of images.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Image resources.", - "items": { - "$ref": "Image" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#imageList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "Instance": { - "id": "Instance", - "type": "object", - "description": "An Instance resource.", - "properties": { - "canIpForward": { - "type": "boolean", - "description": "Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding." - }, - "cpuPlatform": { - "type": "string", - "description": "[Output Only] The CPU platform used by this instance." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "disks": { - "type": "array", - "description": "Array of disks associated with this instance. Persistent disks must be created before you can assign them.", - "items": { - "$ref": "AttachedDisk" - } - }, - "guestAccelerators": { - "type": "array", - "description": "List of the type and count of accelerator cards attached to the instance.", - "items": { - "$ref": "AcceleratorConfig" - } - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#instance for instances.", - "default": "compute#instance" - }, - "labelFingerprint": { - "type": "string", - "description": "A fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.\n\nTo see the latest fingerprint, make get() request to the instance.", - "format": "byte" - }, - "labels": { - "type": "object", - "description": "Labels to apply to this instance. These can be later modified by the setLabels method.", - "additionalProperties": { - "type": "string" - } - }, - "machineType": { - "type": "string", - "description": "Full or partial URL of the machine type resource to use for this instance, in the format: zones/zone/machineTypes/machine-type. This is provided by the client when the instance is created. For example, the following is a valid partial url to a predefined machine type:\n\nzones/us-central1-f/machineTypes/n1-standard-1 \n\nTo create a custom machine type, provide a URL to a machine type in the following format, where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, etc), and MEMORY is the total memory for this instance. Memory must be a multiple of 256 MB and must be supplied in MB (e.g. 5 GB of memory is 5120 MB):\n\nzones/zone/machineTypes/custom-CPUS-MEMORY \n\nFor example: zones/us-central1-f/machineTypes/custom-4-5120 \n\nFor a full list of restrictions, read the Specifications for custom machine types.", - "annotations": { - "required": [ - "compute.instances.insert" - ] - } - }, - "metadata": { - "$ref": "Metadata", - "description": "The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys." - }, - "minCpuPlatform": { - "type": "string", - "description": "Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: \"Intel Haswell\" or minCpuPlatform: \"Intel Sandy Bridge\"." - }, - "name": { - "type": "string", - "description": "The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.instances.insert" - ] - } - }, - "networkInterfaces": { - "type": "array", - "description": "An array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Only one interface is supported per instance.", - "items": { - "$ref": "NetworkInterface" - } - }, - "scheduling": { - "$ref": "Scheduling", - "description": "Sets the scheduling options for this instance." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - }, - "serviceAccounts": { - "type": "array", - "description": "A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.\n\nService accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Service Accounts for more information.", - "items": { - "$ref": "ServiceAccount" - } - }, - "startRestricted": { - "type": "boolean", - "description": "[Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity." - }, - "status": { - "type": "string", - "description": "[Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.", - "enum": [ - "PROVISIONING", - "RUNNING", - "STAGING", - "STOPPED", - "STOPPING", - "SUSPENDED", - "SUSPENDING", - "TERMINATED" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "statusMessage": { - "type": "string", - "description": "[Output Only] An optional, human-readable explanation of the status." - }, - "tags": { - "$ref": "Tags", - "description": "A list of tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035." - }, - "zone": { - "type": "string", - "description": "[Output Only] URL of the zone where the instance resides." - } - } - }, - "InstanceAggregatedList": { - "id": "InstanceAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of InstancesScopedList resources.", - "additionalProperties": { - "$ref": "InstancesScopedList", - "description": "[Output Only] Name of the scope containing this set of instances." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#instanceAggregatedList for aggregated lists of Instance resources.", - "default": "compute#instanceAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "InstanceGroup": { - "id": "InstanceGroup", - "type": "object", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] The creation timestamp for this instance group in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "fingerprint": { - "type": "string", - "description": "[Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently.", - "format": "byte" - }, - "id": { - "type": "string", - "description": "[Output Only] A unique identifier for this instance group, generated by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] The resource type, which is always compute#instanceGroup for instance groups.", - "default": "compute#instanceGroup" - }, - "name": { - "type": "string", - "description": "The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.instanceGroupManagers.insert" - ] - } - }, - "namedPorts": { - "type": "array", - "description": "Assigns a name to a port number. For example: {name: \"http\", port: 80}\n\nThis allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: \"http\", port: 80},{name: \"http\", port: 8080}] \n\nNamed ports apply to all instances in this instance group.", - "items": { - "$ref": "NamedPort" - } - }, - "network": { - "type": "string", - "description": "The URL of the network to which all instances in the instance group belong." - }, - "region": { - "type": "string", - "description": "The URL of the region where the instance group is located (for regional resources)." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] The URL for this instance group. The server generates this URL." - }, - "size": { - "type": "integer", - "description": "[Output Only] The total number of instances in the instance group.", - "format": "int32" - }, - "subnetwork": { - "type": "string", - "description": "The URL of the subnetwork to which all instances in the instance group belong." - }, - "zone": { - "type": "string", - "description": "[Output Only] The URL of the zone where the instance group is located (for zonal resources)." - } - } - }, - "InstanceGroupAggregatedList": { - "id": "InstanceGroupAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of InstanceGroupsScopedList resources.", - "additionalProperties": { - "$ref": "InstanceGroupsScopedList", - "description": "The name of the scope that contains this set of instance groups." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] The resource type, which is always compute#instanceGroupAggregatedList for aggregated lists of instance groups.", - "default": "compute#instanceGroupAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "InstanceGroupList": { - "id": "InstanceGroupList", - "type": "object", - "description": "A list of InstanceGroup resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of InstanceGroup resources.", - "items": { - "$ref": "InstanceGroup" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] The resource type, which is always compute#instanceGroupList for instance group lists.", - "default": "compute#instanceGroupList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "InstanceGroupManager": { - "id": "InstanceGroupManager", - "type": "object", - "description": "An Instance Group Manager resource.", - "properties": { - "autoHealingPolicies": { - "type": "array", - "description": "The autohealing policy for this managed instance group. You can specify only one value.", - "items": { - "$ref": "InstanceGroupManagerAutoHealingPolicy" - } - }, - "baseInstanceName": { - "type": "string", - "description": "The base instance name to use for instances in this group. The value must be 1-58 characters long. Instances are named by appending a hyphen and a random four-character string to the base instance name. The base instance name must comply with RFC1035.", - "pattern": "[a-z][-a-z0-9]{0,57}", - "annotations": { - "required": [ - "compute.instanceGroupManagers.insert" - ] - } - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] The creation timestamp for this managed instance group in RFC3339 text format." - }, - "currentActions": { - "$ref": "InstanceGroupManagerActionsSummary", - "description": "[Output Only] The list of instance actions and the number of instances in this managed instance group that are scheduled for each of those actions." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "failoverAction": { - "type": "string", - "description": "The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.", - "enum": [ - "NO_FAILOVER", - "UNKNOWN" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "fingerprint": { - "type": "string", - "description": "[Output Only] The fingerprint of the resource data. You can use this optional field for optimistic locking when you update the resource.", - "format": "byte" - }, - "id": { - "type": "string", - "description": "[Output Only] A unique identifier for this resource type. The server generates this identifier.", - "format": "uint64" - }, - "instanceGroup": { - "type": "string", - "description": "[Output Only] The URL of the Instance Group resource." - }, - "instanceTemplate": { - "type": "string", - "description": "The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group." - }, - "kind": { - "type": "string", - "description": "[Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.", - "default": "compute#instanceGroupManager" - }, - "name": { - "type": "string", - "description": "The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.instanceGroupManagers.insert", - "compute.regionInstanceGroupManagers.insert" - ] - } - }, - "namedPorts": { - "type": "array", - "description": "Named ports configured for the Instance Groups complementary to this Instance Group Manager.", - "items": { - "$ref": "NamedPort" - } - }, - "pendingActions": { - "$ref": "InstanceGroupManagerPendingActionsSummary", - "description": "[Output Only] The list of instance actions and the number of instances in this managed instance group that are pending for each of those actions." - }, - "region": { - "type": "string", - "description": "[Output Only] The URL of the region where the managed instance group resides (for regional resources)." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] The URL for this managed instance group. The server defines this URL." - }, - "serviceAccount": { - "type": "string", - "description": "Service account will be used as credentials for all operations performed by managed instance group on instances. The service accounts needs all permissions required to create and delete instances. When not specified, the service account {projectNumber}@cloudservices.gserviceaccount.com will be used." - }, - "targetPools": { - "type": "array", - "description": "The URLs for all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group.", - "items": { - "type": "string" - } - }, - "targetSize": { - "type": "integer", - "description": "The target number of running instances for this managed instance group. Deleting or abandoning instances reduces this number. Resizing the group changes this number.", - "format": "int32", - "annotations": { - "required": [ - "compute.instanceGroupManagers.insert", - "compute.regionInstanceGroupManagers.insert" - ] - } - }, - "updatePolicy": { - "$ref": "InstanceGroupManagerUpdatePolicy", - "description": "The update policy for this managed instance group." - }, - "versions": { - "type": "array", - "description": "Versions supported by this IGM. User should set this field if they need fine-grained control over how many instances in each version are run by this IGM. Versions are keyed by instanceTemplate. Every instanceTemplate can appear at most once. This field overrides instanceTemplate field. If both instanceTemplate and versions are set, the user receives a warning. \"instanceTemplate: X\" is semantically equivalent to \"versions [ { instanceTemplate: X } ]\". Exactly one version must have targetSize field left unset. Size of such a version will be calculated automatically.", - "items": { - "$ref": "InstanceGroupManagerVersion" - } - }, - "zone": { - "type": "string", - "description": "[Output Only] The URL of the zone where the managed instance group is located (for zonal resources)." - } - } - }, - "InstanceGroupManagerActionsSummary": { - "id": "InstanceGroupManagerActionsSummary", - "type": "object", - "properties": { - "abandoning": { - "type": "integer", - "description": "[Output Only] The total number of instances in the managed instance group that are scheduled to be abandoned. Abandoning an instance removes it from the managed instance group without deleting it.", - "format": "int32" - }, - "creating": { - "type": "integer", - "description": "[Output Only] The number of instances in the managed instance group that are scheduled to be created or are currently being created. If the group fails to create any of these instances, it tries again until it creates the instance successfully.\n\nIf you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.", - "format": "int32" - }, - "creatingWithoutRetries": { - "type": "integer", - "description": "[Output Only] The number of instances that the managed instance group will attempt to create. The group attempts to create each instance only once. If the group fails to create any of these instances, it decreases the group's targetSize value accordingly.", - "format": "int32" - }, - "deleting": { - "type": "integer", - "description": "[Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.", - "format": "int32" - }, - "none": { - "type": "integer", - "description": "[Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.", - "format": "int32" - }, - "recreating": { - "type": "integer", - "description": "[Output Only] The number of instances in the managed instance group that are scheduled to be recreated or are currently being being recreated. Recreating an instance deletes the existing root persistent disk and creates a new disk from the image that is defined in the instance template.", - "format": "int32" - }, - "refreshing": { - "type": "integer", - "description": "[Output Only] The number of instances in the managed instance group that are being reconfigured with properties that do not require a restart or a recreate action. For example, setting or removing target pools for the instance.", - "format": "int32" - }, - "restarting": { - "type": "integer", - "description": "[Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.", - "format": "int32" - }, - "verifying": { - "type": "integer", - "description": "[Output Only] The number of instances in the managed instance group that are being verified. More details regarding verification process are covered in the documentation of ManagedInstance.InstanceAction.VERIFYING enum field.", - "format": "int32" - } - } - }, - "InstanceGroupManagerAggregatedList": { - "id": "InstanceGroupManagerAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of InstanceGroupManagersScopedList resources.", - "additionalProperties": { - "$ref": "InstanceGroupManagersScopedList", - "description": "[Output Only] The name of the scope that contains this set of managed instance groups." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] The resource type, which is always compute#instanceGroupManagerAggregatedList for an aggregated list of managed instance groups.", - "default": "compute#instanceGroupManagerAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "InstanceGroupManagerAutoHealingPolicy": { - "id": "InstanceGroupManagerAutoHealingPolicy", - "type": "object", - "properties": { - "healthCheck": { - "type": "string", - "description": "The URL for the health check that signals autohealing." - }, - "initialDelaySec": { - "type": "integer", - "description": "The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600].", - "format": "int32" - } - } - }, - "InstanceGroupManagerList": { - "id": "InstanceGroupManagerList", - "type": "object", - "description": "[Output Only] A list of managed instance groups.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of InstanceGroupManager resources.", - "items": { - "$ref": "InstanceGroupManager" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] The resource type, which is always compute#instanceGroupManagerList for a list of managed instance groups.", - "default": "compute#instanceGroupManagerList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "InstanceGroupManagerPendingActionsSummary": { - "id": "InstanceGroupManagerPendingActionsSummary", - "type": "object", - "properties": { - "creating": { - "type": "integer", - "description": "[Output Only] The number of instances in the managed instance group that are pending to be created.", - "format": "int32" - }, - "deleting": { - "type": "integer", - "description": "[Output Only] The number of instances in the managed instance group that are pending to be deleted.", - "format": "int32" - }, - "recreating": { - "type": "integer", - "description": "[Output Only] The number of instances in the managed instance group that are pending to be recreated.", - "format": "int32" - }, - "restarting": { - "type": "integer", - "description": "[Output Only] The number of instances in the managed instance group that are pending to be restarted.", - "format": "int32" - } - } - }, - "InstanceGroupManagerUpdatePolicy": { - "id": "InstanceGroupManagerUpdatePolicy", - "type": "object", - "properties": { - "maxSurge": { - "$ref": "FixedOrPercent", - "description": "Maximum number of instances that can be created above the InstanceGroupManager.targetSize during the update process. By default, a fixed value of 1 is used. Using maxSurge \u003e 0 will cause instance names to change during the update process. At least one of { maxSurge, maxUnavailable } must be greater than 0." - }, - "maxUnavailable": { - "$ref": "FixedOrPercent", - "description": "Maximum number of instances that can be unavailable during the update process. The instance is considered available if all of the following conditions are satisfied: 1. Instance's status is RUNNING. 2. Instance's liveness health check result was observed to be HEALTHY at least once. By default, a fixed value of 1 is used. At least one of { maxSurge, maxUnavailable } must be greater than 0." - }, - "minReadySec": { - "type": "integer", - "description": "Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].", - "format": "int32" - }, - "minimalAction": { - "type": "string", - "description": "Minimal action to be taken on an instance. The order of action types is: RESTART \u003c REPLACE.", - "enum": [ - "REPLACE", - "RESTART" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "type": { - "type": "string", - "enum": [ - "OPPORTUNISTIC", - "PROACTIVE" - ], - "enumDescriptions": [ - "", - "" - ] - } - } - }, - "InstanceGroupManagerVersion": { - "id": "InstanceGroupManagerVersion", - "type": "object", - "properties": { - "instanceTemplate": { - "type": "string" - }, - "name": { - "type": "string", - "description": "Name of the version. Unique among all versions in the scope of this managed instance group." - }, - "targetSize": { - "$ref": "FixedOrPercent", - "description": "Intended number of instances that are created from instanceTemplate. The final number of instances created from instanceTemplate will be equal to: * if expressed as fixed number: min(targetSize.fixed, instanceGroupManager.targetSize), * if expressed as percent: ceiling(targetSize.percent * InstanceGroupManager.targetSize). If unset, this version will handle all the remaining instances." - } - } - }, - "InstanceGroupManagersAbandonInstancesRequest": { - "id": "InstanceGroupManagersAbandonInstancesRequest", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "The URLs of one or more instances to abandon. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - } - } - } - }, - "InstanceGroupManagersDeleteInstancesRequest": { - "id": "InstanceGroupManagersDeleteInstancesRequest", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - } - } - } - }, - "InstanceGroupManagersListManagedInstancesResponse": { - "id": "InstanceGroupManagersListManagedInstancesResponse", - "type": "object", - "properties": { - "managedInstances": { - "type": "array", - "description": "[Output Only] The list of instances in the managed instance group.", - "items": { - "$ref": "ManagedInstance" - } - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - } - } - }, - "InstanceGroupManagersRecreateInstancesRequest": { - "id": "InstanceGroupManagersRecreateInstancesRequest", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "The URLs of one or more instances to recreate. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - } - } - } - }, - "InstanceGroupManagersResizeAdvancedRequest": { - "id": "InstanceGroupManagersResizeAdvancedRequest", - "type": "object", - "properties": { - "noCreationRetries": { - "type": "boolean", - "description": "If this flag is true, the managed instance group attempts to create all instances initiated by this resize request only once. If there is an error during creation, the managed instance group does not retry create this instance, and we will decrease the targetSize of the request instead. If the flag is false, the group attemps to recreate each instance continuously until it succeeds.\n\nThis flag matters only in the first attempt of creation of an instance. After an instance is successfully created while this flag is enabled, the instance behaves the same way as all the other instances created with a regular resize request. In particular, if a running instance dies unexpectedly at a later time and needs to be recreated, this mode does not affect the recreation behavior in that scenario.\n\nThis flag is applicable only to the current resize request. It does not influence other resize requests in any way.\n\nYou can see which instances is being creating in which mode by calling the get or listManagedInstances API." - }, - "targetSize": { - "type": "integer", - "description": "The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter.", - "format": "int32" - } - } - }, - "InstanceGroupManagersScopedList": { - "id": "InstanceGroupManagersScopedList", - "type": "object", - "properties": { - "instanceGroupManagers": { - "type": "array", - "description": "[Output Only] The list of managed instance groups that are contained in the specified project and zone.", - "items": { - "$ref": "InstanceGroupManager" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] The warning that replaces the list of managed instance groups when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "InstanceGroupManagersSetAutoHealingRequest": { - "id": "InstanceGroupManagersSetAutoHealingRequest", - "type": "object", - "properties": { - "autoHealingPolicies": { - "type": "array", - "items": { - "$ref": "InstanceGroupManagerAutoHealingPolicy" - } - } - } - }, - "InstanceGroupManagersSetInstanceTemplateRequest": { - "id": "InstanceGroupManagersSetInstanceTemplateRequest", - "type": "object", - "properties": { - "instanceTemplate": { - "type": "string", - "description": "The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group." - } - } - }, - "InstanceGroupManagersSetTargetPoolsRequest": { - "id": "InstanceGroupManagersSetTargetPoolsRequest", - "type": "object", - "properties": { - "fingerprint": { - "type": "string", - "description": "The fingerprint of the target pools information. Use this optional property to prevent conflicts when multiple users change the target pools settings concurrently. Obtain the fingerprint with the instanceGroupManagers.get method. Then, include the fingerprint in your request to ensure that you do not overwrite changes that were applied from another concurrent request.", - "format": "byte" - }, - "targetPools": { - "type": "array", - "description": "The list of target pool URLs that instances in this managed instance group belong to. The managed instance group applies these target pools to all of the instances in the group. Existing instances and new instances in the group all receive these target pool settings.", - "items": { - "type": "string" - } - } - } - }, - "InstanceGroupsAddInstancesRequest": { - "id": "InstanceGroupsAddInstancesRequest", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "The list of instances to add to the instance group.", - "items": { - "$ref": "InstanceReference" - } - } - } - }, - "InstanceGroupsListInstances": { - "id": "InstanceGroupsListInstances", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of InstanceWithNamedPorts resources.", - "items": { - "$ref": "InstanceWithNamedPorts" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] The resource type, which is always compute#instanceGroupsListInstances for the list of instances in the specified instance group.", - "default": "compute#instanceGroupsListInstances" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "InstanceGroupsListInstancesRequest": { - "id": "InstanceGroupsListInstancesRequest", - "type": "object", - "properties": { - "instanceState": { - "type": "string", - "description": "A filter for the state of the instances in the instance group. Valid options are ALL or RUNNING. If you do not specify this parameter the list includes all instances regardless of their state.", - "enum": [ - "ALL", - "RUNNING" - ], - "enumDescriptions": [ - "", - "" - ] - } - } - }, - "InstanceGroupsRemoveInstancesRequest": { - "id": "InstanceGroupsRemoveInstancesRequest", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "The list of instances to remove from the instance group.", - "items": { - "$ref": "InstanceReference" - } - } - } - }, - "InstanceGroupsScopedList": { - "id": "InstanceGroupsScopedList", - "type": "object", - "properties": { - "instanceGroups": { - "type": "array", - "description": "[Output Only] The list of instance groups that are contained in this scope.", - "items": { - "$ref": "InstanceGroup" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] An informational warning that replaces the list of instance groups when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "InstanceGroupsSetNamedPortsRequest": { - "id": "InstanceGroupsSetNamedPortsRequest", - "type": "object", - "properties": { - "fingerprint": { - "type": "string", - "description": "The fingerprint of the named ports information for this instance group. Use this optional property to prevent conflicts when multiple users change the named ports settings concurrently. Obtain the fingerprint with the instanceGroups.get method. Then, include the fingerprint in your request to ensure that you do not overwrite changes that were applied from another concurrent request.", - "format": "byte" - }, - "namedPorts": { - "type": "array", - "description": "The list of named ports to set for this instance group.", - "items": { - "$ref": "NamedPort" - } - } - } - }, - "InstanceList": { - "id": "InstanceList", - "type": "object", - "description": "Contains a list of instances.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Instance resources.", - "items": { - "$ref": "Instance" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#instanceList for lists of Instance resources.", - "default": "compute#instanceList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "InstanceListReferrers": { - "id": "InstanceListReferrers", - "type": "object", - "description": "Contains a list of instance referrers.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Reference resources.", - "items": { - "$ref": "Reference" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#instanceListReferrers for lists of Instance referrers.", - "default": "compute#instanceListReferrers" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "InstanceMoveRequest": { - "id": "InstanceMoveRequest", - "type": "object", - "properties": { - "destinationZone": { - "type": "string", - "description": "The URL of the destination zone to move the instance. This can be a full or partial URL. For example, the following are all valid URLs to a zone: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone \n- projects/project/zones/zone \n- zones/zone" - }, - "targetInstance": { - "type": "string", - "description": "The URL of the target instance to move. This can be a full or partial URL. For example, the following are all valid URLs to an instance: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance \n- projects/project/zones/zone/instances/instance \n- zones/zone/instances/instance" - } - } - }, - "InstanceProperties": { - "id": "InstanceProperties", - "type": "object", - "description": "", - "properties": { - "canIpForward": { - "type": "boolean", - "description": "Enables instances created based on this template to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. See the Enable IP forwarding documentation for more information." - }, - "description": { - "type": "string", - "description": "An optional text description for the instances that are created from this instance template." - }, - "disks": { - "type": "array", - "description": "An array of disks that are associated with the instances that are created from this template.", - "items": { - "$ref": "AttachedDisk" - } - }, - "guestAccelerators": { - "type": "array", - "description": "A list of guest accelerator cards' type and count to use for instances created from the instance template.", - "items": { - "$ref": "AcceleratorConfig" - } - }, - "labels": { - "type": "object", - "description": "Labels to apply to instances that are created from this template.", - "additionalProperties": { - "type": "string" - } - }, - "machineType": { - "type": "string", - "description": "The machine type to use for instances that are created from this template.", - "annotations": { - "required": [ - "compute.instanceTemplates.insert" - ] - } - }, - "metadata": { - "$ref": "Metadata", - "description": "The metadata key/value pairs to assign to instances that are created from this template. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information." - }, - "minCpuPlatform": { - "type": "string", - "description": "Minimum cpu/platform to be used by this instance. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: \"Intel Haswell\" or minCpuPlatform: \"Intel Sandy Bridge\". For more information, read Specifying a Minimum CPU Platform." - }, - "networkInterfaces": { - "type": "array", - "description": "An array of network access configurations for this interface.", - "items": { - "$ref": "NetworkInterface" - } - }, - "scheduling": { - "$ref": "Scheduling", - "description": "Specifies the scheduling options for the instances that are created from this template." - }, - "serviceAccounts": { - "type": "array", - "description": "A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from this template. Use metadata queries to obtain the access tokens for these instances.", - "items": { - "$ref": "ServiceAccount" - } - }, - "tags": { - "$ref": "Tags", - "description": "A list of tags to apply to the instances that are created from this template. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035." - } - } - }, - "InstanceReference": { - "id": "InstanceReference", - "type": "object", - "properties": { - "instance": { - "type": "string", - "description": "The URL for a specific instance." - } - } - }, - "InstanceTemplate": { - "id": "InstanceTemplate", - "type": "object", - "description": "An Instance Template resource.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] The creation timestamp for this instance template in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] A unique identifier for this instance template. The server defines this identifier.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] The resource type, which is always compute#instanceTemplate for instance templates.", - "default": "compute#instanceTemplate" - }, - "name": { - "type": "string", - "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.instanceTemplates.insert" - ] - } - }, - "properties": { - "$ref": "InstanceProperties", - "description": "The instance properties for this instance template." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] The URL for this instance template. The server defines this URL." - } - } - }, - "InstanceTemplateList": { - "id": "InstanceTemplateList", - "type": "object", - "description": "A list of instance templates.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of InstanceTemplate resources.", - "items": { - "$ref": "InstanceTemplate" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] The resource type, which is always compute#instanceTemplatesListResponse for instance template lists.", - "default": "compute#instanceTemplateList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "InstanceWithNamedPorts": { - "id": "InstanceWithNamedPorts", - "type": "object", - "properties": { - "instance": { - "type": "string", - "description": "[Output Only] The URL of the instance." - }, - "namedPorts": { - "type": "array", - "description": "[Output Only] The named ports that belong to this instance group.", - "items": { - "$ref": "NamedPort" - } - }, - "status": { - "type": "string", - "description": "[Output Only] The status of the instance.", - "enum": [ - "PROVISIONING", - "RUNNING", - "STAGING", - "STOPPED", - "STOPPING", - "SUSPENDED", - "SUSPENDING", - "TERMINATED" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "" - ] - } - } - }, - "InstancesScopedList": { - "id": "InstancesScopedList", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "[Output Only] List of instances contained in this scope.", - "items": { - "$ref": "Instance" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] Informational warning which replaces the list of instances when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "InstancesSetLabelsRequest": { - "id": "InstancesSetLabelsRequest", - "type": "object", - "properties": { - "labelFingerprint": { - "type": "string", - "description": "Fingerprint of the previous set of labels for this resource, used to prevent conflicts. Provide the latest fingerprint value when making a request to add or change labels.", - "format": "byte" - }, - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "InstancesSetMachineResourcesRequest": { - "id": "InstancesSetMachineResourcesRequest", - "type": "object", - "properties": { - "guestAccelerators": { - "type": "array", - "description": "List of the type and count of accelerator cards attached to the instance.", - "items": { - "$ref": "AcceleratorConfig" - } - } - } - }, - "InstancesSetMachineTypeRequest": { - "id": "InstancesSetMachineTypeRequest", - "type": "object", - "properties": { - "machineType": { - "type": "string", - "description": "Full or partial URL of the machine type resource. See Machine Types for a full list of machine types. For example: zones/us-central1-f/machineTypes/n1-standard-1" - } - } - }, - "InstancesSetMinCpuPlatformRequest": { - "id": "InstancesSetMinCpuPlatformRequest", - "type": "object", - "properties": { - "minCpuPlatform": { - "type": "string", - "description": "Minimum cpu/platform this instance should be started at." - } - } - }, - "InstancesSetServiceAccountRequest": { - "id": "InstancesSetServiceAccountRequest", - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "Email address of the service account." - }, - "scopes": { - "type": "array", - "description": "The list of scopes to be made available for this service account.", - "items": { - "type": "string" - } - } - } - }, - "InstancesStartWithEncryptionKeyRequest": { - "id": "InstancesStartWithEncryptionKeyRequest", - "type": "object", - "properties": { - "disks": { - "type": "array", - "description": "Array of disks associated with this instance that are protected with a customer-supplied encryption key.\n\nIn order to start the instance, the disk url and its corresponding key must be provided.\n\nIf the disk is not protected with a customer-supplied encryption key it should not be specified.", - "items": { - "$ref": "CustomerEncryptionKeyProtectedDisk" - } - } - } - }, - "License": { - "id": "License", - "type": "object", - "description": "A license resource.", - "properties": { - "chargesUseFee": { - "type": "boolean", - "description": "[Output Only] Deprecated. This field no longer reflects whether a license charges a usage fee." - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#license for licenses.", - "default": "compute#license" - }, - "name": { - "type": "string", - "description": "[Output Only] Name of the resource. The name is 1-63 characters long and complies with RFC1035.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.images.insert" - ] - } - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - } - } - }, - "LogConfig": { - "id": "LogConfig", - "type": "object", - "description": "Specifies what kind of log the caller must write", - "properties": { - "cloudAudit": { - "$ref": "LogConfigCloudAuditOptions", - "description": "Cloud audit options." - }, - "counter": { - "$ref": "LogConfigCounterOptions", - "description": "Counter options." - } - } - }, - "LogConfigCloudAuditOptions": { - "id": "LogConfigCloudAuditOptions", - "type": "object", - "description": "Write a Cloud Audit log", - "properties": { - "authorizationLoggingOptions": { - "$ref": "AuthorizationLoggingOptions", - "description": "Information used by the Cloud Audit Logging pipeline." - }, - "logName": { - "type": "string", - "description": "The log_name to populate in the Cloud Audit Record.", - "enum": [ - "ADMIN_ACTIVITY", - "DATA_ACCESS", - "UNSPECIFIED_LOG_NAME" - ], - "enumDescriptions": [ - "", - "", - "" - ] - } - } - }, - "LogConfigCounterOptions": { - "id": "LogConfigCounterOptions", - "type": "object", - "description": "Options for counters", - "properties": { - "field": { - "type": "string", - "description": "The field value to attribute." - }, - "metric": { - "type": "string", - "description": "The metric to update." - } - } - }, - "MachineType": { - "id": "MachineType", - "type": "object", - "description": "A Machine Type resource.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "[Output Only] The deprecation status associated with this machine type." - }, - "description": { - "type": "string", - "description": "[Output Only] An optional textual description of the resource." - }, - "guestCpus": { - "type": "integer", - "description": "[Output Only] The number of virtual CPUs that are available to the instance.", - "format": "int32" - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "isSharedCpu": { - "type": "boolean", - "description": "[Output Only] Whether this machine type has a shared CPU. See Shared-core machine types for more information." - }, - "kind": { - "type": "string", - "description": "[Output Only] The type of the resource. Always compute#machineType for machine types.", - "default": "compute#machineType" - }, - "maximumPersistentDisks": { - "type": "integer", - "description": "[Output Only] Maximum persistent disks allowed.", - "format": "int32" - }, - "maximumPersistentDisksSizeGb": { - "type": "string", - "description": "[Output Only] Maximum total persistent disks size (GB) allowed.", - "format": "int64" - }, - "memoryMb": { - "type": "integer", - "description": "[Output Only] The amount of physical memory available to the instance, defined in MB.", - "format": "int32" - }, - "name": { - "type": "string", - "description": "[Output Only] Name of the resource.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "zone": { - "type": "string", - "description": "[Output Only] The name of the zone where the machine type resides, such as us-central1-a." - } - } - }, - "MachineTypeAggregatedList": { - "id": "MachineTypeAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of MachineTypesScopedList resources.", - "additionalProperties": { - "$ref": "MachineTypesScopedList", - "description": "[Output Only] Name of the scope containing this set of machine types." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#machineTypeAggregatedList for aggregated lists of machine types.", - "default": "compute#machineTypeAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "MachineTypeList": { - "id": "MachineTypeList", - "type": "object", - "description": "Contains a list of machine types.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of MachineType resources.", - "items": { - "$ref": "MachineType" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#machineTypeList for lists of machine types.", - "default": "compute#machineTypeList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "MachineTypesScopedList": { - "id": "MachineTypesScopedList", - "type": "object", - "properties": { - "machineTypes": { - "type": "array", - "description": "[Output Only] List of machine types contained in this scope.", - "items": { - "$ref": "MachineType" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] An informational warning that appears when the machine types list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "ManagedInstance": { - "id": "ManagedInstance", - "type": "object", - "properties": { - "currentAction": { - "type": "string", - "description": "[Output Only] The current action that the managed instance group has scheduled for the instance. Possible values: \n- NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance. \n- CREATING The managed instance group is creating this instance. If the group fails to create this instance, it will try again until it is successful. \n- CREATING_WITHOUT_RETRIES The managed instance group is attempting to create this instance only once. If the group fails to create this instance, it does not try again and the group's targetSize value is decreased instead. \n- RECREATING The managed instance group is recreating this instance. \n- DELETING The managed instance group is permanently deleting this instance. \n- ABANDONING The managed instance group is abandoning this instance. The instance will be removed from the instance group and from any target pools that are associated with this group. \n- RESTARTING The managed instance group is restarting the instance. \n- REFRESHING The managed instance group is applying configuration changes to the instance without stopping it. For example, the group can update the target pool list for an instance without stopping that instance.", - "enum": [ - "ABANDONING", - "CREATING", - "CREATING_WITHOUT_RETRIES", - "DELETING", - "NONE", - "RECREATING", - "REFRESHING", - "RESTARTING", - "VERIFYING" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "id": { - "type": "string", - "description": "[Output only] The unique identifier for this resource. This field is empty when instance does not exist.", - "format": "uint64" - }, - "instance": { - "type": "string", - "description": "[Output Only] The URL of the instance. The URL can exist even if the instance has not yet been created." - }, - "instanceStatus": { - "type": "string", - "description": "[Output Only] The status of the instance. This field is empty when the instance does not exist.", - "enum": [ - "PROVISIONING", - "RUNNING", - "STAGING", - "STOPPED", - "STOPPING", - "SUSPENDED", - "SUSPENDING", - "TERMINATED" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "lastAttempt": { - "$ref": "ManagedInstanceLastAttempt", - "description": "[Output Only] Information about the last attempt to create or delete the instance." - }, - "version": { - "$ref": "ManagedInstanceVersion", - "description": "[Output Only] Intended version of this instance." - } - } - }, - "ManagedInstanceLastAttempt": { - "id": "ManagedInstanceLastAttempt", - "type": "object", - "properties": { - "errors": { - "type": "object", - "description": "[Output Only] Encountered errors during the last attempt to create or delete the instance.", - "properties": { - "errors": { - "type": "array", - "description": "[Output Only] The array of errors encountered while processing this operation.", - "items": { - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] The error type identifier for this error." - }, - "location": { - "type": "string", - "description": "[Output Only] Indicates the field in the request that caused the error. This property is optional." - }, - "message": { - "type": "string", - "description": "[Output Only] An optional, human-readable error message." - } - } - } - } - } - } - } - }, - "ManagedInstanceVersion": { - "id": "ManagedInstanceVersion", - "type": "object", - "properties": { - "instanceTemplate": { - "type": "string", - "description": "[Output Only] The intended template of the instance. This field is empty when current_action is one of { DELETING, ABANDONING }." - }, - "name": { - "type": "string", - "description": "[Output Only] Name of the version." - } - } - }, - "Metadata": { - "id": "Metadata", - "type": "object", - "description": "A metadata key/value entry.", - "properties": { - "fingerprint": { - "type": "string", - "description": "Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.", - "format": "byte" - }, - "items": { - "type": "array", - "description": "Array of key/value pairs. The total size of all keys and values must be less than 512 KB.", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.", - "pattern": "[a-zA-Z0-9-_]{1,128}", - "annotations": { - "required": [ - "compute.instances.insert", - "compute.projects.setCommonInstanceMetadata" - ] - } - }, - "value": { - "type": "string", - "description": "Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).", - "annotations": { - "required": [ - "compute.instances.insert", - "compute.projects.setCommonInstanceMetadata" - ] - } - } - } - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#metadata for metadata.", - "default": "compute#metadata" - } - } - }, - "NamedPort": { - "id": "NamedPort", - "type": "object", - "description": "The named port. For example: .", - "properties": { - "name": { - "type": "string", - "description": "The name for this named port. The name must be 1-63 characters long, and comply with RFC1035." - }, - "port": { - "type": "integer", - "description": "The port number, which can be a value between 1 and 65535.", - "format": "int32" - } - } - }, - "Network": { - "id": "Network", - "type": "object", - "description": "Represents a Network resource. Read Networks and Firewalls for more information.", - "properties": { - "IPv4Range": { - "type": "string", - "description": "The range of internal addresses that are legal on this network. This range is a CIDR specification, for example: 192.168.0.0/16. Provided by the client when the network is created.", - "pattern": "[0-9]{1,3}(?:\\.[0-9]{1,3}){3}/[0-9]{1,2}" - }, - "autoCreateSubnetworks": { - "type": "boolean", - "description": "When set to true, the network is created in \"auto subnet mode\". When set to false, the network is in \"custom subnet mode\".\n\nIn \"auto subnet mode\", a newly created network is assigned the default CIDR of 10.128.0.0/9 and it automatically creates one subnetwork per region." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "gatewayIPv4": { - "type": "string", - "description": "A gateway address for default routing to other networks. This value is read only and is selected by the Google Compute Engine, typically as the first usable address in the IPv4Range.", - "pattern": "[0-9]{1,3}(?:\\.[0-9]{1,3}){3}" - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#network for networks.", - "default": "compute#network" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.networks.insert" - ] - } - }, - "peerings": { - "type": "array", - "description": "[Output Only] List of network peerings for the resource.", - "items": { - "$ref": "NetworkPeering" - } - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "subnetworks": { - "type": "array", - "description": "[Output Only] Server-defined fully-qualified URLs for all subnetworks in this network.", - "items": { - "type": "string" - } - } - } - }, - "NetworkInterface": { - "id": "NetworkInterface", - "type": "object", - "description": "A network interface resource attached to an instance.", - "properties": { - "accessConfigs": { - "type": "array", - "description": "An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access.", - "items": { - "$ref": "AccessConfig" - } - }, - "aliasIpRanges": { - "type": "array", - "description": "An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks.", - "items": { - "$ref": "AliasIpRange" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#networkInterface for network interfaces.", - "default": "compute#networkInterface" - }, - "name": { - "type": "string", - "description": "[Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc." - }, - "network": { - "type": "string", - "description": "URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.\n\nThis field is optional when creating a firewall rule. If not specified when creating a firewall rule, the default network global/networks/default is used.\n\nIf you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/global/networks/network \n- projects/project/global/networks/network \n- global/networks/default" - }, - "networkIP": { - "type": "string", - "description": "An IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system." - }, - "subnetwork": { - "type": "string", - "description": "The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. If you specify this property, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork \n- regions/region/subnetworks/subnetwork" - } - } - }, - "NetworkList": { - "id": "NetworkList", - "type": "object", - "description": "Contains a list of networks.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Network resources.", - "items": { - "$ref": "Network" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#networkList for lists of networks.", - "default": "compute#networkList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "NetworkPeering": { - "id": "NetworkPeering", - "type": "object", - "description": "A network peering attached to a network resource. The message includes the peering name, peer network, peering state, and a flag indicating whether Google Compute Engine should automatically create routes for the peering.", - "properties": { - "autoCreateRoutes": { - "type": "boolean", - "description": "Whether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage the routes between two networks when the state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network." - }, - "name": { - "type": "string", - "description": "Name of this peering. Provided by the client when the peering is created. The name must comply with RFC1035. Specifically, the name must be 1-63 characters long and match regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all the following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash." - }, - "network": { - "type": "string", - "description": "The URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network." - }, - "state": { - "type": "string", - "description": "[Output Only] State for the peering.", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "stateDetails": { - "type": "string", - "description": "[Output Only] Details about the current state of the peering." - } - } - }, - "NetworksAddPeeringRequest": { - "id": "NetworksAddPeeringRequest", - "type": "object", - "properties": { - "autoCreateRoutes": { - "type": "boolean", - "description": "Whether Google Compute Engine manages the routes automatically." - }, - "name": { - "type": "string", - "description": "Name of the peering, which should conform to RFC1035." - }, - "peerNetwork": { - "type": "string", - "description": "URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network." - } - } - }, - "NetworksRemovePeeringRequest": { - "id": "NetworksRemovePeeringRequest", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the peering, which should conform to RFC1035." - } - } - }, - "Operation": { - "id": "Operation", - "type": "object", - "description": "An Operation resource, used to manage asynchronous API requests.", - "properties": { - "clientOperationId": { - "type": "string", - "description": "[Output Only] Reserved for future use." - }, - "creationTimestamp": { - "type": "string", - "description": "[Deprecated] This field is deprecated." - }, - "description": { - "type": "string", - "description": "[Output Only] A textual description of the operation, which is set when the operation is created." - }, - "endTime": { - "type": "string", - "description": "[Output Only] The time that this operation was completed. This value is in RFC3339 text format." - }, - "error": { - "type": "object", - "description": "[Output Only] If errors are generated during processing of the operation, this field will be populated.", - "properties": { - "errors": { - "type": "array", - "description": "[Output Only] The array of errors encountered while processing this operation.", - "items": { - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] The error type identifier for this error." - }, - "location": { - "type": "string", - "description": "[Output Only] Indicates the field in the request that caused the error. This property is optional." - }, - "message": { - "type": "string", - "description": "[Output Only] An optional, human-readable error message." - } - } - } - } - } - }, - "httpErrorMessage": { - "type": "string", - "description": "[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND." - }, - "httpErrorStatusCode": { - "type": "integer", - "description": "[Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.", - "format": "int32" - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "insertTime": { - "type": "string", - "description": "[Output Only] The time that this operation was requested. This value is in RFC3339 text format." - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#operation for Operation resources.", - "default": "compute#operation" - }, - "name": { - "type": "string", - "description": "[Output Only] Name of the resource." - }, - "operationType": { - "type": "string", - "description": "[Output Only] The type of operation, such as insert, update, or delete, and so on." - }, - "progress": { - "type": "integer", - "description": "[Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.", - "format": "int32" - }, - "region": { - "type": "string", - "description": "[Output Only] The URL of the region where the operation resides. Only available when performing regional operations." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "startTime": { - "type": "string", - "description": "[Output Only] The time that this operation was started by the server. This value is in RFC3339 text format." - }, - "status": { - "type": "string", - "description": "[Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.", - "enum": [ - "DONE", - "PENDING", - "RUNNING" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "statusMessage": { - "type": "string", - "description": "[Output Only] An optional textual description of the current status of the operation." - }, - "targetId": { - "type": "string", - "description": "[Output Only] The unique target ID, which identifies a specific incarnation of the target resource.", - "format": "uint64" - }, - "targetLink": { - "type": "string", - "description": "[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from." - }, - "user": { - "type": "string", - "description": "[Output Only] User who requested the operation, for example: user@example.com." - }, - "warnings": { - "type": "array", - "description": "[Output Only] If warning messages are generated during processing of the operation, this field will be populated.", - "items": { - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - }, - "zone": { - "type": "string", - "description": "[Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations." - } - } - }, - "OperationAggregatedList": { - "id": "OperationAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." - }, - "items": { - "type": "object", - "description": "[Output Only] A map of scoped operation lists.", - "additionalProperties": { - "$ref": "OperationsScopedList", - "description": "[Output Only] Name of the scope containing this set of operations." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#operationAggregatedList for aggregated lists of operations.", - "default": "compute#operationAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "OperationList": { - "id": "OperationList", - "type": "object", - "description": "Contains a list of Operation resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." - }, - "items": { - "type": "array", - "description": "[Output Only] A list of Operation resources.", - "items": { - "$ref": "Operation" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#operations for Operations resource.", - "default": "compute#operationList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "OperationsScopedList": { - "id": "OperationsScopedList", - "type": "object", - "properties": { - "operations": { - "type": "array", - "description": "[Output Only] List of operations contained in this scope.", - "items": { - "$ref": "Operation" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] Informational warning which replaces the list of operations when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "PathMatcher": { - "id": "PathMatcher", - "type": "object", - "description": "A matcher for the path portion of the URL. The BackendService from the longest-matched rule will serve the URL. If no rule was matched, the default service will be used.", - "properties": { - "defaultService": { - "type": "string", - "description": "The full or partial URL to the BackendService resource. This will be used if none of the pathRules defined by this PathMatcher is matched by the URL's path portion. For example, the following are all valid URLs to a BackendService resource: \n- https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService \n- compute/v1/projects/project/global/backendServices/backendService \n- global/backendServices/backendService" - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "name": { - "type": "string", - "description": "The name to which this PathMatcher is referred by the HostRule." - }, - "pathRules": { - "type": "array", - "description": "The list of path rules.", - "items": { - "$ref": "PathRule" - } - } - } - }, - "PathRule": { - "id": "PathRule", - "type": "object", - "description": "A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.", - "properties": { - "paths": { - "type": "array", - "description": "The list of path patterns to match. Each must start with / and the only place a * is allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here.", - "items": { - "type": "string" - } - }, - "service": { - "type": "string", - "description": "The URL of the BackendService resource if this rule is matched." - } - } - }, - "Policy": { - "id": "Policy", - "type": "object", - "description": "Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.\n\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM.\n\n**Example**\n\n{ \"bindings\": [ { \"role\": \"roles/owner\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-other-app@appspot.gserviceaccount.com\", ] }, { \"role\": \"roles/viewer\", \"members\": [\"user:sean@example.com\"] } ] }\n\nFor a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam).", - "properties": { - "auditConfigs": { - "type": "array", - "description": "Specifies cloud audit logging configuration for this policy.", - "items": { - "$ref": "AuditConfig" - } - }, - "bindings": { - "type": "array", - "description": "Associates a list of `members` to a `role`. `bindings` with no members will result in an error.", - "items": { - "$ref": "Binding" - } - }, - "etag": { - "type": "string", - "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.", - "format": "byte" - }, - "iamOwned": { - "type": "boolean", - "description": "" - }, - "rules": { - "type": "array", - "description": "If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.", - "items": { - "$ref": "Rule" - } - }, - "version": { - "type": "integer", - "description": "Version of the `Policy`. The default version is 0.", - "format": "int32" - } - } - }, - "Project": { - "id": "Project", - "type": "object", - "description": "A Project resource. Projects can only be created in the Google Cloud Platform Console. Unless marked otherwise, values can only be modified in the console.", - "properties": { - "commonInstanceMetadata": { - "$ref": "Metadata", - "description": "Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "defaultServiceAccount": { - "type": "string", - "description": "[Output Only] Default service account used by VMs running in this project." - }, - "description": { - "type": "string", - "description": "An optional textual description of the resource." - }, - "enabledFeatures": { - "type": "array", - "description": "Restricted features enabled for use on this project.", - "items": { - "type": "string" - } - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server. This is not the project ID, and is just a unique ID used by Compute Engine to identify resources.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#project for projects.", - "default": "compute#project" - }, - "name": { - "type": "string", - "description": "The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine." - }, - "quotas": { - "type": "array", - "description": "[Output Only] Quotas assigned to this project.", - "items": { - "$ref": "Quota" - } - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "usageExportLocation": { - "$ref": "UsageExportLocation", - "description": "The naming prefix for daily usage reports and the Google Cloud Storage bucket where they are stored." - }, - "xpnProjectStatus": { - "type": "string", - "description": "[Output Only] The role this project has in a shared VPC configuration. Currently only HOST projects are differentiated.", - "enum": [ - "HOST", - "UNSPECIFIED_XPN_PROJECT_STATUS" - ], - "enumDescriptions": [ - "", - "" - ] - } - } - }, - "ProjectsDisableXpnResourceRequest": { - "id": "ProjectsDisableXpnResourceRequest", - "type": "object", - "properties": { - "xpnResource": { - "$ref": "XpnResourceId", - "description": "Service resource (a.k.a service project) ID." - } - } - }, - "ProjectsEnableXpnResourceRequest": { - "id": "ProjectsEnableXpnResourceRequest", - "type": "object", - "properties": { - "xpnResource": { - "$ref": "XpnResourceId", - "description": "Service resource (a.k.a service project) ID." - } - } - }, - "ProjectsGetXpnResources": { - "id": "ProjectsGetXpnResources", - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#projectsGetXpnResources for lists of service resources (a.k.a service projects)", - "default": "compute#projectsGetXpnResources" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "resources": { - "type": "array", - "description": "Serive resources (a.k.a service projects) attached to this project as their shared VPC host.", - "items": { - "$ref": "XpnResourceId" - } - } - } - }, - "ProjectsListXpnHostsRequest": { - "id": "ProjectsListXpnHostsRequest", - "type": "object", - "properties": { - "organization": { - "type": "string", - "description": "Optional organization ID managed by Cloud Resource Manager, for which to list shared VPC host projects. If not specified, the organization will be inferred from the project." - } - } - }, - "Quota": { - "id": "Quota", - "type": "object", - "description": "A quotas entry.", - "properties": { - "limit": { - "type": "number", - "description": "[Output Only] Quota limit for this metric.", - "format": "double" - }, - "metric": { - "type": "string", - "description": "[Output Only] Name of the quota metric.", - "enum": [ - "AUTOSCALERS", - "BACKEND_BUCKETS", - "BACKEND_SERVICES", - "COMMITMENTS", - "CPUS", - "CPUS_ALL_REGIONS", - "DISKS_TOTAL_GB", - "FIREWALLS", - "FORWARDING_RULES", - "HEALTH_CHECKS", - "IMAGES", - "INSTANCES", - "INSTANCE_GROUPS", - "INSTANCE_GROUP_MANAGERS", - "INSTANCE_TEMPLATES", - "IN_USE_ADDRESSES", - "LOCAL_SSD_TOTAL_GB", - "NETWORKS", - "NVIDIA_K80_GPUS", - "PREEMPTIBLE_CPUS", - "PREEMPTIBLE_LOCAL_SSD_GB", - "REGIONAL_AUTOSCALERS", - "REGIONAL_INSTANCE_GROUP_MANAGERS", - "ROUTERS", - "ROUTES", - "SECURITY_POLICIES", - "SECURITY_POLICY_RULES", - "SNAPSHOTS", - "SSD_TOTAL_GB", - "SSL_CERTIFICATES", - "STATIC_ADDRESSES", - "SUBNETWORKS", - "TARGET_HTTPS_PROXIES", - "TARGET_HTTP_PROXIES", - "TARGET_INSTANCES", - "TARGET_POOLS", - "TARGET_SSL_PROXIES", - "TARGET_VPN_GATEWAYS", - "URL_MAPS", - "VPN_TUNNELS" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "usage": { - "type": "number", - "description": "[Output Only] Current usage of this metric.", - "format": "double" - } - } - }, - "Reference": { - "id": "Reference", - "type": "object", - "description": "Represents a reference to a resource.", - "properties": { - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#reference for references.", - "default": "compute#reference" - }, - "referenceType": { - "type": "string", - "description": "A description of the reference type with no implied semantics. Possible values include: \n- MEMBER_OF" - }, - "referrer": { - "type": "string", - "description": "URL of the resource which refers to the target." - }, - "target": { - "type": "string", - "description": "URL of the resource to which this reference points." - } - } - }, - "Region": { - "id": "Region", - "type": "object", - "description": "Region resource.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "[Output Only] The deprecation status associated with this region." - }, - "description": { - "type": "string", - "description": "[Output Only] Textual description of the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#region for regions.", - "default": "compute#region" - }, - "name": { - "type": "string", - "description": "[Output Only] Name of the resource." - }, - "quotas": { - "type": "array", - "description": "[Output Only] Quotas assigned to this region.", - "items": { - "$ref": "Quota" - } - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "status": { - "type": "string", - "description": "[Output Only] Status of the region, either UP or DOWN.", - "enum": [ - "DOWN", - "UP" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "zones": { - "type": "array", - "description": "[Output Only] A list of zones available in this region, in the form of resource URLs.", - "items": { - "type": "string" - } - } - } - }, - "RegionAutoscalerList": { - "id": "RegionAutoscalerList", - "type": "object", - "description": "Contains a list of autoscalers.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Autoscaler resources.", - "items": { - "$ref": "Autoscaler" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#regionAutoscalerList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "RegionInstanceGroupList": { - "id": "RegionInstanceGroupList", - "type": "object", - "description": "Contains a list of InstanceGroup resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of InstanceGroup resources.", - "items": { - "$ref": "InstanceGroup" - } - }, - "kind": { - "type": "string", - "description": "The resource type.", - "default": "compute#regionInstanceGroupList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "RegionInstanceGroupManagerList": { - "id": "RegionInstanceGroupManagerList", - "type": "object", - "description": "Contains a list of managed instance groups.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of InstanceGroupManager resources.", - "items": { - "$ref": "InstanceGroupManager" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] The resource type, which is always compute#instanceGroupManagerList for a list of managed instance groups that exist in th regional scope.", - "default": "compute#regionInstanceGroupManagerList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "RegionInstanceGroupManagersAbandonInstancesRequest": { - "id": "RegionInstanceGroupManagersAbandonInstancesRequest", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "The URLs of one or more instances to abandon. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - } - } - } - }, - "RegionInstanceGroupManagersDeleteInstancesRequest": { - "id": "RegionInstanceGroupManagersDeleteInstancesRequest", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - } - } - } - }, - "RegionInstanceGroupManagersListInstancesResponse": { - "id": "RegionInstanceGroupManagersListInstancesResponse", - "type": "object", - "properties": { - "managedInstances": { - "type": "array", - "description": "List of managed instances.", - "items": { - "$ref": "ManagedInstance" - } - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - } - } - }, - "RegionInstanceGroupManagersRecreateRequest": { - "id": "RegionInstanceGroupManagersRecreateRequest", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "The URLs of one or more instances to recreate. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - } - } - } - }, - "RegionInstanceGroupManagersSetAutoHealingRequest": { - "id": "RegionInstanceGroupManagersSetAutoHealingRequest", - "type": "object", - "properties": { - "autoHealingPolicies": { - "type": "array", - "items": { - "$ref": "InstanceGroupManagerAutoHealingPolicy" - } - } - } - }, - "RegionInstanceGroupManagersSetTargetPoolsRequest": { - "id": "RegionInstanceGroupManagersSetTargetPoolsRequest", - "type": "object", - "properties": { - "fingerprint": { - "type": "string", - "description": "Fingerprint of the target pools information, which is a hash of the contents. This field is used for optimistic locking when you update the target pool entries. This field is optional.", - "format": "byte" - }, - "targetPools": { - "type": "array", - "description": "The URL of all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group.", - "items": { - "type": "string" - } - } - } - }, - "RegionInstanceGroupManagersSetTemplateRequest": { - "id": "RegionInstanceGroupManagersSetTemplateRequest", - "type": "object", - "properties": { - "instanceTemplate": { - "type": "string", - "description": "URL of the InstanceTemplate resource from which all new instances will be created." - } - } - }, - "RegionInstanceGroupsListInstances": { - "id": "RegionInstanceGroupsListInstances", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of InstanceWithNamedPorts resources.", - "items": { - "$ref": "InstanceWithNamedPorts" - } - }, - "kind": { - "type": "string", - "description": "The resource type.", - "default": "compute#regionInstanceGroupsListInstances" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "RegionInstanceGroupsListInstancesRequest": { - "id": "RegionInstanceGroupsListInstancesRequest", - "type": "object", - "properties": { - "instanceState": { - "type": "string", - "description": "Instances in which state should be returned. Valid options are: 'ALL', 'RUNNING'. By default, it lists all instances.", - "enum": [ - "ALL", - "RUNNING" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "portName": { - "type": "string", - "description": "Name of port user is interested in. It is optional. If it is set, only information about this ports will be returned. If it is not set, all the named ports will be returned. Always lists all instances.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - } - } - }, - "RegionInstanceGroupsSetNamedPortsRequest": { - "id": "RegionInstanceGroupsSetNamedPortsRequest", - "type": "object", - "properties": { - "fingerprint": { - "type": "string", - "description": "The fingerprint of the named ports information for this instance group. Use this optional property to prevent conflicts when multiple users change the named ports settings concurrently. Obtain the fingerprint with the instanceGroups.get method. Then, include the fingerprint in your request to ensure that you do not overwrite changes that were applied from another concurrent request.", - "format": "byte" - }, - "namedPorts": { - "type": "array", - "description": "The list of named ports to set for this instance group.", - "items": { - "$ref": "NamedPort" - } - } - } - }, - "RegionList": { - "id": "RegionList", - "type": "object", - "description": "Contains a list of region resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Region resources.", - "items": { - "$ref": "Region" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#regionList for lists of regions.", - "default": "compute#regionList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "RegionSetLabelsRequest": { - "id": "RegionSetLabelsRequest", - "type": "object", - "properties": { - "labelFingerprint": { - "type": "string", - "description": "The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels. Make a get() request to the resource to get the latest fingerprint.", - "format": "byte" - }, - "labels": { - "type": "object", - "description": "The labels to set for this resource.", - "additionalProperties": { - "type": "string" - } - } - } - }, - "ResourceCommitment": { - "id": "ResourceCommitment", - "type": "object", - "description": "Commitment for a particular resource (a Commitment is composed of one or more of these).", - "properties": { - "amount": { - "type": "string", - "description": "The amount of the resource purchased (in a type-dependent unit, such as bytes). For vCPUs, this can just be an integer. For memory, this must be provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every vCPU.", - "format": "int64" - }, - "type": { - "type": "string", - "description": "Type of resource for which this commitment applies. Possible values are VCPU and MEMORY", - "enum": [ - "MEMORY", - "UNSPECIFIED", - "VCPU" - ], - "enumDescriptions": [ - "", - "", - "" - ] - } - } - }, - "ResourceGroupReference": { - "id": "ResourceGroupReference", - "type": "object", - "properties": { - "group": { - "type": "string", - "description": "A URI referencing one of the instance groups listed in the backend service." - } - } - }, - "Route": { - "id": "Route", - "type": "object", - "description": "Represents a Route resource. A route specifies how certain packets should be handled by the network. Routes are associated with instances by tags and the set of routes for a particular instance is called its routing table.\n\nFor each packet leaving an instance, the system searches that instance's routing table for a single best matching route. Routes match packets by destination IP address, preferring smaller or more specific ranges over larger ones. If there is a tie, the system selects the route with the smallest priority value. If there is still a tie, it uses the layer three and four packet headers to select just one of the remaining matching routes. The packet is then forwarded as specified by the nextHop field of the winning route - either to another instance destination, an instance gateway, or a Google Compute Engine-operated gateway.\n\nPackets that do not match any route in the sending instance's routing table are dropped.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "destRange": { - "type": "string", - "description": "The destination range of outgoing packets that this route applies to. Only IPv4 is supported.", - "annotations": { - "required": [ - "compute.routes.insert" - ] - } - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of this resource. Always compute#routes for Route resources.", - "default": "compute#route" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.routes.insert" - ] - } - }, - "network": { - "type": "string", - "description": "Fully-qualified URL of the network that this route applies to.", - "annotations": { - "required": [ - "compute.routes.insert" - ] - } - }, - "nextHopGateway": { - "type": "string", - "description": "The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid URL: projects/\u003cproject-id\u003e/global/gateways/default-internet-gateway" - }, - "nextHopInstance": { - "type": "string", - "description": "The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example:\nhttps://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/" - }, - "nextHopIp": { - "type": "string", - "description": "The network IP address of an instance that should handle matching packets. Only IPv4 is supported." - }, - "nextHopNetwork": { - "type": "string", - "description": "The URL of the local network if it should handle matching packets." - }, - "nextHopPeering": { - "type": "string", - "description": "[Output Only] The network peering name that should handle matching packets, which should conform to RFC1035." - }, - "nextHopVpnTunnel": { - "type": "string", - "description": "The URL to a VpnTunnel that should handle matching packets." - }, - "priority": { - "type": "integer", - "description": "The priority of this route. Priority is used to break ties in cases where there is more than one matching route of equal prefix length. In the case of two routes with equal prefix length, the one with the lowest-numbered priority value wins. Default value is 1000. Valid range is 0 through 65535.", - "format": "uint32", - "annotations": { - "required": [ - "compute.routes.insert" - ] - } - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined fully-qualified URL for this resource." - }, - "tags": { - "type": "array", - "description": "A list of instance tags to which this route applies.", - "items": { - "type": "string" - }, - "annotations": { - "required": [ - "compute.routes.insert" - ] - } - }, - "warnings": { - "type": "array", - "description": "[Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.", - "items": { - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - } - }, - "RouteList": { - "id": "RouteList", - "type": "object", - "description": "Contains a list of Route resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Route resources.", - "items": { - "$ref": "Route" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#routeList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "Router": { - "id": "Router", - "type": "object", - "description": "Router resource.", - "properties": { - "bgp": { - "$ref": "RouterBgp", - "description": "BGP information specific to this router." - }, - "bgpPeers": { - "type": "array", - "description": "BGP information that needs to be configured into the routing stack to establish the BGP peering. It must specify peer ASN and either interface name, IP, or peer IP. Please refer to RFC4273.", - "items": { - "$ref": "RouterBgpPeer" - } - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "interfaces": { - "type": "array", - "description": "Router interfaces. Each interface requires either one linked resource (e.g. linkedVpnTunnel), or IP address and IP address range (e.g. ipRange), or both.", - "items": { - "$ref": "RouterInterface" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#router for routers.", - "default": "compute#router" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.routers.insert" - ] - } - }, - "network": { - "type": "string", - "description": "URI of the network to which this router belongs.", - "annotations": { - "required": [ - "compute.routers.insert" - ] - } - }, - "region": { - "type": "string", - "description": "[Output Only] URI of the region where the router resides." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - } - } - }, - "RouterAggregatedList": { - "id": "RouterAggregatedList", - "type": "object", - "description": "Contains a list of routers.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of Router resources.", - "additionalProperties": { - "$ref": "RoutersScopedList", - "description": "Name of the scope containing this set of routers." - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#routerAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "RouterBgp": { - "id": "RouterBgp", - "type": "object", - "properties": { - "asn": { - "type": "integer", - "description": "Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.", - "format": "uint32" - } - } - }, - "RouterBgpPeer": { - "id": "RouterBgpPeer", - "type": "object", - "properties": { - "advertisedRoutePriority": { - "type": "integer", - "description": "The priority of routes advertised to this BGP peer. In the case where there is more than one matching route of maximum length, the routes with lowest priority value win.", - "format": "uint32" - }, - "interfaceName": { - "type": "string", - "description": "Name of the interface the BGP peer is associated with." - }, - "ipAddress": { - "type": "string", - "description": "IP address of the interface inside Google Cloud Platform. Only IPv4 is supported." - }, - "name": { - "type": "string", - "description": "Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "peerAsn": { - "type": "integer", - "description": "Peer BGP Autonomous System Number (ASN). For VPN use case, this value can be different for every tunnel.", - "format": "uint32" - }, - "peerIpAddress": { - "type": "string", - "description": "IP address of the BGP interface outside Google cloud. Only IPv4 is supported." - } - } - }, - "RouterInterface": { - "id": "RouterInterface", - "type": "object", - "properties": { - "ipRange": { - "type": "string", - "description": "IP address and range of the interface. The IP range must be in the RFC3927 link-local IP space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface." - }, - "linkedVpnTunnel": { - "type": "string", - "description": "URI of the linked VPN tunnel. It must be in the same region as the router. Each interface can have at most one linked resource and it could either be a VPN Tunnel or an interconnect attachment." - }, - "name": { - "type": "string", - "description": "Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - } - } - }, - "RouterList": { - "id": "RouterList", - "type": "object", - "description": "Contains a list of Router resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Router resources.", - "items": { - "$ref": "Router" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#router for routers.", - "default": "compute#routerList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "RouterStatus": { - "id": "RouterStatus", - "type": "object", - "properties": { - "bestRoutes": { - "type": "array", - "description": "Best routes for this router's network.", - "items": { - "$ref": "Route" - } - }, - "bestRoutesForRouter": { - "type": "array", - "description": "Best routes learned by this router.", - "items": { - "$ref": "Route" - } - }, - "bgpPeerStatus": { - "type": "array", - "items": { - "$ref": "RouterStatusBgpPeerStatus" - } - }, - "network": { - "type": "string", - "description": "URI of the network to which this router belongs." - } - } - }, - "RouterStatusBgpPeerStatus": { - "id": "RouterStatusBgpPeerStatus", - "type": "object", - "properties": { - "advertisedRoutes": { - "type": "array", - "description": "Routes that were advertised to the remote BGP peer", - "items": { - "$ref": "Route" - } - }, - "ipAddress": { - "type": "string", - "description": "IP address of the local BGP interface." - }, - "linkedVpnTunnel": { - "type": "string", - "description": "URL of the VPN tunnel that this BGP peer controls." - }, - "name": { - "type": "string", - "description": "Name of this BGP peer. Unique within the Routers resource." - }, - "numLearnedRoutes": { - "type": "integer", - "description": "Number of routes learned from the remote BGP Peer.", - "format": "uint32" - }, - "peerIpAddress": { - "type": "string", - "description": "IP address of the remote BGP interface." - }, - "state": { - "type": "string", - "description": "BGP state as specified in RFC1771." - }, - "status": { - "type": "string", - "description": "Status of the BGP peer: {UP, DOWN}", - "enum": [ - "DOWN", - "UNKNOWN", - "UP" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "uptime": { - "type": "string", - "description": "Time this session has been up. Format: 14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds" - }, - "uptimeSeconds": { - "type": "string", - "description": "Time this session has been up, in seconds. Format: 145" - } - } - }, - "RouterStatusResponse": { - "id": "RouterStatusResponse", - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#routerStatusResponse" - }, - "result": { - "$ref": "RouterStatus" - } - } - }, - "RoutersPreviewResponse": { - "id": "RoutersPreviewResponse", - "type": "object", - "properties": { - "resource": { - "$ref": "Router", - "description": "Preview of given router." - } - } - }, - "RoutersScopedList": { - "id": "RoutersScopedList", - "type": "object", - "properties": { - "routers": { - "type": "array", - "description": "List of routers contained in this scope.", - "items": { - "$ref": "Router" - } - }, - "warning": { - "type": "object", - "description": "Informational warning which replaces the list of routers when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "Rule": { - "id": "Rule", - "type": "object", - "description": "A rule to be applied in a Policy.", - "properties": { - "action": { - "type": "string", - "description": "Required", - "enum": [ - "ALLOW", - "ALLOW_WITH_LOG", - "DENY", - "DENY_WITH_LOG", - "LOG", - "NO_ACTION" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ] - }, - "conditions": { - "type": "array", - "description": "Additional restrictions that must be met", - "items": { - "$ref": "Condition" - } - }, - "description": { - "type": "string", - "description": "Human-readable description of the rule." - }, - "ins": { - "type": "array", - "description": "If one or more 'in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.", - "items": { - "type": "string" - } - }, - "logConfigs": { - "type": "array", - "description": "The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.", - "items": { - "$ref": "LogConfig" - } - }, - "notIns": { - "type": "array", - "description": "If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.", - "items": { - "type": "string" - } - }, - "permissions": { - "type": "array", - "description": "A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.", - "items": { - "type": "string" - } - } - } - }, - "SSLHealthCheck": { - "id": "SSLHealthCheck", - "type": "object", - "properties": { - "port": { - "type": "integer", - "description": "The TCP port number for the health check request. The default value is 443. Valid values are 1 through 65535.", - "format": "int32" - }, - "portName": { - "type": "string", - "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence." - }, - "proxyHeader": { - "type": "string", - "description": "Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "request": { - "type": "string", - "description": "The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII." - }, - "response": { - "type": "string", - "description": "The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII." - } - } - }, - "Scheduling": { - "id": "Scheduling", - "type": "object", - "description": "Sets the scheduling options for an Instance.", - "properties": { - "automaticRestart": { - "type": "boolean", - "description": "Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.\n\nBy default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine." - }, - "onHostMaintenance": { - "type": "string", - "description": "Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.", - "enum": [ - "MIGRATE", - "TERMINATE" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "preemptible": { - "type": "boolean", - "description": "Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created." - } - } - }, - "SerialPortOutput": { - "id": "SerialPortOutput", - "type": "object", - "description": "An instance's serial console output.", - "properties": { - "contents": { - "type": "string", - "description": "[Output Only] The contents of the console output." - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#serialPortOutput for serial port output.", - "default": "compute#serialPortOutput" - }, - "next": { - "type": "string", - "description": "[Output Only] The position of the next byte of content from the serial console output. Use this value in the next request as the start parameter.", - "format": "int64" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - }, - "start": { - "type": "string", - "description": "The starting byte position of the output that was returned. This should match the start parameter sent with the request. If the serial console output exceeds the size of the buffer, older output will be overwritten by newer content and the start values will be mismatched.", - "format": "int64" - } - } - }, - "ServiceAccount": { - "id": "ServiceAccount", - "type": "object", - "description": "A service account.", - "properties": { - "email": { - "type": "string", - "description": "Email address of the service account." - }, - "scopes": { - "type": "array", - "description": "The list of scopes to be made available for this service account.", - "items": { - "type": "string" - } - } - } - }, - "Snapshot": { - "id": "Snapshot", - "type": "object", - "description": "A persistent disk snapshot resource.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "diskSizeGb": { - "type": "string", - "description": "[Output Only] Size of the snapshot, specified in GB.", - "format": "int64" - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#snapshot for Snapshot resources.", - "default": "compute#snapshot" - }, - "labelFingerprint": { - "type": "string", - "description": "A fingerprint for the labels being applied to this snapshot, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve a snapshot.", - "format": "byte" - }, - "labels": { - "type": "object", - "description": "Labels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty.", - "additionalProperties": { - "type": "string" - } - }, - "licenses": { - "type": "array", - "description": "[Output Only] A list of public visible licenses that apply to this snapshot. This can be because the original image had licenses attached (such as a Windows image).", - "items": { - "type": "string" - } - }, - "name": { - "type": "string", - "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "snapshotEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Encrypts the snapshot using a customer-supplied encryption key.\n\nAfter you encrypt a snapshot using a customer-supplied key, you must provide the same key if you use the image later For example, you must provide the encryption key when you create a disk from the encrypted snapshot in a future request.\n\nCustomer-supplied encryption keys do not protect access to metadata of the disk.\n\nIf you do not provide an encryption key when creating the snapshot, then the snapshot will be encrypted using an automatically generated key and you do not need to provide a key to use the snapshot later." - }, - "sourceDisk": { - "type": "string", - "description": "[Output Only] The source disk used to create this snapshot." - }, - "sourceDiskEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key." - }, - "sourceDiskId": { - "type": "string", - "description": "[Output Only] The ID value of the disk used to create this snapshot. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given disk name." - }, - "status": { - "type": "string", - "description": "[Output Only] The status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or UPLOADING.", - "enum": [ - "CREATING", - "DELETING", - "FAILED", - "READY", - "UPLOADING" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ] - }, - "storageBytes": { - "type": "string", - "description": "[Output Only] A size of the the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot creation/deletion.", - "format": "int64" - }, - "storageBytesStatus": { - "type": "string", - "description": "[Output Only] An indicator whether storageBytes is in a stable state or it is being adjusted as a result of shared storage reallocation. This status can either be UPDATING, meaning the size of the snapshot is being updated, or UP_TO_DATE, meaning the size of the snapshot is up-to-date.", - "enum": [ - "UPDATING", - "UP_TO_DATE" - ], - "enumDescriptions": [ - "", - "" - ] - } - } - }, - "SnapshotList": { - "id": "SnapshotList", - "type": "object", - "description": "Contains a list of Snapshot resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Snapshot resources.", - "items": { - "$ref": "Snapshot" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#snapshotList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "SslCertificate": { - "id": "SslCertificate", - "type": "object", - "description": "An SslCertificate resource. This resource provides a mechanism to upload an SSL key and certificate to the load balancer to serve secure connections from the user.", - "properties": { - "certificate": { - "type": "string", - "description": "A local certificate file. The certificate must be in PEM format. The certificate chain must be no greater than 5 certs long. The chain must include at least one intermediate cert." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#sslCertificate for SSL certificates.", - "default": "compute#sslCertificate" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "privateKey": { - "type": "string", - "description": "A write-only private key in PEM format. Only insert requests will include this field." - }, - "selfLink": { - "type": "string", - "description": "[Output only] Server-defined URL for the resource." - } - } - }, - "SslCertificateList": { - "id": "SslCertificateList", - "type": "object", - "description": "Contains a list of SslCertificate resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of SslCertificate resources.", - "items": { - "$ref": "SslCertificate" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#sslCertificateList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "Subnetwork": { - "id": "Subnetwork", - "type": "object", - "description": "A Subnetwork resource.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource. This field can be set only at resource creation time." - }, - "gatewayAddress": { - "type": "string", - "description": "[Output Only] The gateway address for default routes to reach destination addresses outside this subnetwork. This field can be set only at resource creation time." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "ipCidrRange": { - "type": "string", - "description": "The range of internal addresses that are owned by this subnetwork. Provide this property when you create the subnetwork. For example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and non-overlapping within a network. Only IPv4 is supported. This field can be set only at resource creation time." - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#subnetwork for Subnetwork resources.", - "default": "compute#subnetwork" - }, - "name": { - "type": "string", - "description": "The name of the resource, provided by the client when initially creating the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "network": { - "type": "string", - "description": "The URL of the network to which this subnetwork belongs, provided by the client when initially creating the subnetwork. Only networks that are in the distributed mode can have subnetworks. This field can be set only at resource creation time." - }, - "privateIpGoogleAccess": { - "type": "boolean", - "description": "Whether the VMs in this subnet can access Google services without assigned external IP addresses. This field can be both set at resource creation time and updated using setPrivateIpGoogleAccess." - }, - "region": { - "type": "string", - "description": "URL of the region where the Subnetwork resides. This field can be set only at resource creation time." - }, - "secondaryIpRanges": { - "type": "array", - "description": "An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges.", - "items": { - "$ref": "SubnetworkSecondaryRange" - } - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - } - } - }, - "SubnetworkAggregatedList": { - "id": "SubnetworkAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of SubnetworksScopedList resources.", - "additionalProperties": { - "$ref": "SubnetworksScopedList", - "description": "Name of the scope containing this set of Subnetworks." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#subnetworkAggregatedList for aggregated lists of subnetworks.", - "default": "compute#subnetworkAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "SubnetworkList": { - "id": "SubnetworkList", - "type": "object", - "description": "Contains a list of Subnetwork resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Subnetwork resources.", - "items": { - "$ref": "Subnetwork" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#subnetworkList for lists of subnetworks.", - "default": "compute#subnetworkList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "SubnetworkSecondaryRange": { - "id": "SubnetworkSecondaryRange", - "type": "object", - "description": "Represents a secondary IP range of a subnetwork.", - "properties": { - "ipCidrRange": { - "type": "string", - "description": "The range of IP addresses belonging to this subnetwork secondary range. Provide this property when you create the subnetwork. Ranges must be unique and non-overlapping with all primary and secondary IP ranges within a network. Only IPv4 is supported." - }, - "rangeName": { - "type": "string", - "description": "The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance. The name must be 1-63 characters long, and comply with RFC1035. The name must be unique within the subnetwork." - } - } - }, - "SubnetworksExpandIpCidrRangeRequest": { - "id": "SubnetworksExpandIpCidrRangeRequest", - "type": "object", - "properties": { - "ipCidrRange": { - "type": "string", - "description": "The IP (in CIDR format or netmask) of internal addresses that are legal on this Subnetwork. This range should be disjoint from other subnetworks within this network. This range can only be larger than (i.e. a superset of) the range previously defined before the update." - } - } - }, - "SubnetworksScopedList": { - "id": "SubnetworksScopedList", - "type": "object", - "properties": { - "subnetworks": { - "type": "array", - "description": "List of subnetworks contained in this scope.", - "items": { - "$ref": "Subnetwork" - } - }, - "warning": { - "type": "object", - "description": "An informational warning that appears when the list of addresses is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "SubnetworksSetPrivateIpGoogleAccessRequest": { - "id": "SubnetworksSetPrivateIpGoogleAccessRequest", - "type": "object", - "properties": { - "privateIpGoogleAccess": { - "type": "boolean" - } - } - }, - "TCPHealthCheck": { - "id": "TCPHealthCheck", - "type": "object", - "properties": { - "port": { - "type": "integer", - "description": "The TCP port number for the health check request. The default value is 80. Valid values are 1 through 65535.", - "format": "int32" - }, - "portName": { - "type": "string", - "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence." - }, - "proxyHeader": { - "type": "string", - "description": "Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "request": { - "type": "string", - "description": "The application data to send once the TCP connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII." - }, - "response": { - "type": "string", - "description": "The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII." - } - } - }, - "Tags": { - "id": "Tags", - "type": "object", - "description": "A set of instance tags.", - "properties": { - "fingerprint": { - "type": "string", - "description": "Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.\n\nTo see the latest fingerprint, make get() request to the instance.", - "format": "byte" - }, - "items": { - "type": "array", - "description": "An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.", - "items": { - "type": "string" - } - } - } - }, - "TargetHttpProxy": { - "id": "TargetHttpProxy", - "type": "object", - "description": "A TargetHttpProxy resource. This resource defines an HTTP proxy.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#targetHttpProxy for target HTTP proxies.", - "default": "compute#targetHttpProxy" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "urlMap": { - "type": "string", - "description": "URL to the UrlMap resource that defines the mapping from URL to the BackendService." - } - } - }, - "TargetHttpProxyList": { - "id": "TargetHttpProxyList", - "type": "object", - "description": "A list of TargetHttpProxy resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of TargetHttpProxy resources.", - "items": { - "$ref": "TargetHttpProxy" - } - }, - "kind": { - "type": "string", - "description": "Type of resource. Always compute#targetHttpProxyList for lists of target HTTP proxies.", - "default": "compute#targetHttpProxyList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "TargetHttpsProxiesSetSslCertificatesRequest": { - "id": "TargetHttpsProxiesSetSslCertificatesRequest", - "type": "object", - "properties": { - "sslCertificates": { - "type": "array", - "description": "New set of SslCertificate resources to associate with this TargetHttpsProxy resource. Currently exactly one SslCertificate resource must be specified.", - "items": { - "type": "string" - } - } - } - }, - "TargetHttpsProxy": { - "id": "TargetHttpsProxy", - "type": "object", - "description": "A TargetHttpsProxy resource. This resource defines an HTTPS proxy.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#targetHttpsProxy for target HTTPS proxies.", - "default": "compute#targetHttpsProxy" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "sslCertificates": { - "type": "array", - "description": "URLs to SslCertificate resources that are used to authenticate connections between users and the load balancer. Currently, exactly one SSL certificate must be specified.", - "items": { - "type": "string" - } - }, - "urlMap": { - "type": "string", - "description": "A fully-qualified or valid partial URL to the UrlMap resource that defines the mapping from URL to the BackendService. For example, the following are all valid URLs for specifying a URL map: \n- https://www.googleapis.compute/v1/projects/project/global/urlMaps/url-map \n- projects/project/global/urlMaps/url-map \n- global/urlMaps/url-map" - } - } - }, - "TargetHttpsProxyList": { - "id": "TargetHttpsProxyList", - "type": "object", - "description": "Contains a list of TargetHttpsProxy resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of TargetHttpsProxy resources.", - "items": { - "$ref": "TargetHttpsProxy" - } - }, - "kind": { - "type": "string", - "description": "Type of resource. Always compute#targetHttpsProxyList for lists of target HTTPS proxies.", - "default": "compute#targetHttpsProxyList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "TargetInstance": { - "id": "TargetInstance", - "type": "object", - "description": "A TargetInstance resource. This resource defines an endpoint instance that terminates traffic of certain protocols.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "instance": { - "type": "string", - "description": "A URL to the virtual machine instance that handles traffic for this target instance. When creating a target instance, you can provide the fully-qualified URL or a valid partial URL to the desired virtual machine. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance \n- projects/project/zones/zone/instances/instance \n- zones/zone/instances/instance" - }, - "kind": { - "type": "string", - "description": "[Output Only] The type of the resource. Always compute#targetInstance for target instances.", - "default": "compute#targetInstance" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "natPolicy": { - "type": "string", - "description": "NAT option controlling how IPs are NAT'ed to the instance. Currently only NO_NAT (default value) is supported.", - "enum": [ - "NO_NAT" - ], - "enumDescriptions": [ - "" - ] - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "zone": { - "type": "string", - "description": "[Output Only] URL of the zone where the target instance resides." - } - } - }, - "TargetInstanceAggregatedList": { - "id": "TargetInstanceAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of TargetInstance resources.", - "additionalProperties": { - "$ref": "TargetInstancesScopedList", - "description": "Name of the scope containing this set of target instances." - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#targetInstanceAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "TargetInstanceList": { - "id": "TargetInstanceList", - "type": "object", - "description": "Contains a list of TargetInstance resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of TargetInstance resources.", - "items": { - "$ref": "TargetInstance" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#targetInstanceList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "TargetInstancesScopedList": { - "id": "TargetInstancesScopedList", - "type": "object", - "properties": { - "targetInstances": { - "type": "array", - "description": "List of target instances contained in this scope.", - "items": { - "$ref": "TargetInstance" - } - }, - "warning": { - "type": "object", - "description": "Informational warning which replaces the list of addresses when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "TargetPool": { - "id": "TargetPool", - "type": "object", - "description": "A TargetPool resource. This resource defines a pool of instances, an associated HttpHealthCheck resource, and the fallback target pool.", - "properties": { - "backupPool": { - "type": "string", - "description": "This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool, and its failoverRatio field is properly set to a value between [0, 1].\n\nbackupPool and failoverRatio together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below failoverRatio, traffic arriving at the load-balanced IP will be directed to the backup pool.\n\nIn case where failoverRatio and backupPool are not set, or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the \"force\" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "failoverRatio": { - "type": "number", - "description": "This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool (i.e., not as a backup pool to some other target pool). The value of the field must be in [0, 1].\n\nIf set, backupPool must also be set. They together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below this number, traffic arriving at the load-balanced IP will be directed to the backup pool.\n\nIn case where failoverRatio is not set or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the \"force\" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy.", - "format": "float" - }, - "healthChecks": { - "type": "array", - "description": "The URL of the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. An empty list means all member instances will be considered healthy at all times. Only HttpHealthChecks are supported. Only one health check may be specified.", - "items": { - "type": "string" - } - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "instances": { - "type": "array", - "description": "A list of resource URLs to the virtual machine instances serving this pool. They must live in zones contained in the same region as this pool.", - "items": { - "type": "string" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#targetPool for target pools.", - "default": "compute#targetPool" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "region": { - "type": "string", - "description": "[Output Only] URL of the region where the target pool resides." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "sessionAffinity": { - "type": "string", - "description": "Sesssion affinity option, must be one of the following values:\nNONE: Connections from the same client IP may go to any instance in the pool.\nCLIENT_IP: Connections from the same client IP will go to the same instance in the pool while that instance remains healthy.\nCLIENT_IP_PROTO: Connections from the same client IP with the same IP protocol will go to the same instance in the pool while that instance remains healthy.", - "enum": [ - "CLIENT_IP", - "CLIENT_IP_PORT_PROTO", - "CLIENT_IP_PROTO", - "GENERATED_COOKIE", - "NONE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ] - } - } - }, - "TargetPoolAggregatedList": { - "id": "TargetPoolAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of TargetPool resources.", - "additionalProperties": { - "$ref": "TargetPoolsScopedList", - "description": "Name of the scope containing this set of target pools." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#targetPoolAggregatedList for aggregated lists of target pools.", - "default": "compute#targetPoolAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "TargetPoolInstanceHealth": { - "id": "TargetPoolInstanceHealth", - "type": "object", - "properties": { - "healthStatus": { - "type": "array", - "items": { - "$ref": "HealthStatus" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#targetPoolInstanceHealth when checking the health of an instance.", - "default": "compute#targetPoolInstanceHealth" - } - } - }, - "TargetPoolList": { - "id": "TargetPoolList", - "type": "object", - "description": "Contains a list of TargetPool resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of TargetPool resources.", - "items": { - "$ref": "TargetPool" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#targetPoolList for lists of target pools.", - "default": "compute#targetPoolList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "TargetPoolsAddHealthCheckRequest": { - "id": "TargetPoolsAddHealthCheckRequest", - "type": "object", - "properties": { - "healthChecks": { - "type": "array", - "description": "The HttpHealthCheck to add to the target pool.", - "items": { - "$ref": "HealthCheckReference" - } - } - } - }, - "TargetPoolsAddInstanceRequest": { - "id": "TargetPoolsAddInstanceRequest", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "A full or partial URL to an instance to add to this target pool. This can be a full or partial URL. For example, the following are valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project-id/zones/zone/instances/instance-name \n- projects/project-id/zones/zone/instances/instance-name \n- zones/zone/instances/instance-name", - "items": { - "$ref": "InstanceReference" - } - } - } - }, - "TargetPoolsRemoveHealthCheckRequest": { - "id": "TargetPoolsRemoveHealthCheckRequest", - "type": "object", - "properties": { - "healthChecks": { - "type": "array", - "description": "Health check URL to be removed. This can be a full or valid partial URL. For example, the following are valid URLs: \n- https://www.googleapis.com/compute/beta/projects/project/global/httpHealthChecks/health-check \n- projects/project/global/httpHealthChecks/health-check \n- global/httpHealthChecks/health-check", - "items": { - "$ref": "HealthCheckReference" - } - } - } - }, - "TargetPoolsRemoveInstanceRequest": { - "id": "TargetPoolsRemoveInstanceRequest", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "URLs of the instances to be removed from target pool.", - "items": { - "$ref": "InstanceReference" - } - } - } - }, - "TargetPoolsScopedList": { - "id": "TargetPoolsScopedList", - "type": "object", - "properties": { - "targetPools": { - "type": "array", - "description": "List of target pools contained in this scope.", - "items": { - "$ref": "TargetPool" - } - }, - "warning": { - "type": "object", - "description": "Informational warning which replaces the list of addresses when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "TargetReference": { - "id": "TargetReference", - "type": "object", - "properties": { - "target": { - "type": "string" - } - } - }, - "TargetSslProxiesSetBackendServiceRequest": { - "id": "TargetSslProxiesSetBackendServiceRequest", - "type": "object", - "properties": { - "service": { - "type": "string", - "description": "The URL of the new BackendService resource for the targetSslProxy." - } - } - }, - "TargetSslProxiesSetProxyHeaderRequest": { - "id": "TargetSslProxiesSetProxyHeaderRequest", - "type": "object", - "properties": { - "proxyHeader": { - "type": "string", - "description": "The new type of proxy header to append before sending data to the backend. NONE or PROXY_V1 are allowed.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ] - } - } - }, - "TargetSslProxiesSetSslCertificatesRequest": { - "id": "TargetSslProxiesSetSslCertificatesRequest", - "type": "object", - "properties": { - "sslCertificates": { - "type": "array", - "description": "New set of URLs to SslCertificate resources to associate with this TargetSslProxy. Currently exactly one ssl certificate must be specified.", - "items": { - "type": "string" - } - } - } - }, - "TargetSslProxy": { - "id": "TargetSslProxy", - "type": "object", - "description": "A TargetSslProxy resource. This resource defines an SSL proxy.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#targetSslProxy for target SSL proxies.", - "default": "compute#targetSslProxy" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "proxyHeader": { - "type": "string", - "description": "Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "service": { - "type": "string", - "description": "URL to the BackendService resource." - }, - "sslCertificates": { - "type": "array", - "description": "URLs to SslCertificate resources that are used to authenticate connections to Backends. Currently exactly one SSL certificate must be specified.", - "items": { - "type": "string" - } - } - } - }, - "TargetSslProxyList": { - "id": "TargetSslProxyList", - "type": "object", - "description": "Contains a list of TargetSslProxy resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of TargetSslProxy resources.", - "items": { - "$ref": "TargetSslProxy" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#targetSslProxyList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "TargetTcpProxiesSetBackendServiceRequest": { - "id": "TargetTcpProxiesSetBackendServiceRequest", - "type": "object", - "properties": { - "service": { - "type": "string", - "description": "The URL of the new BackendService resource for the targetTcpProxy." - } - } - }, - "TargetTcpProxiesSetProxyHeaderRequest": { - "id": "TargetTcpProxiesSetProxyHeaderRequest", - "type": "object", - "properties": { - "proxyHeader": { - "type": "string", - "description": "The new type of proxy header to append before sending data to the backend. NONE or PROXY_V1 are allowed.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ] - } - } - }, - "TargetTcpProxy": { - "id": "TargetTcpProxy", - "type": "object", - "description": "A TargetTcpProxy resource. This resource defines a TCP proxy.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#targetTcpProxy for target TCP proxies.", - "default": "compute#targetTcpProxy" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "proxyHeader": { - "type": "string", - "description": "Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "service": { - "type": "string", - "description": "URL to the BackendService resource." - } - } - }, - "TargetTcpProxyList": { - "id": "TargetTcpProxyList", - "type": "object", - "description": "Contains a list of TargetTcpProxy resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of TargetTcpProxy resources.", - "items": { - "$ref": "TargetTcpProxy" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#targetTcpProxyList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "TargetVpnGateway": { - "id": "TargetVpnGateway", - "type": "object", - "description": "Represents a Target VPN gateway resource.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "forwardingRules": { - "type": "array", - "description": "[Output Only] A list of URLs to the ForwardingRule resources. ForwardingRules are created using compute.forwardingRules.insert and associated to a VPN gateway.", - "items": { - "type": "string" - } - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#targetVpnGateway for target VPN gateways.", - "default": "compute#targetVpnGateway" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.targetVpnGateways.insert" - ] - } - }, - "network": { - "type": "string", - "description": "URL of the network to which this VPN gateway is attached. Provided by the client when the VPN gateway is created.", - "annotations": { - "required": [ - "compute.targetVpnGateways.insert" - ] - } - }, - "region": { - "type": "string", - "description": "[Output Only] URL of the region where the target VPN gateway resides." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "status": { - "type": "string", - "description": "[Output Only] The status of the VPN gateway.", - "enum": [ - "CREATING", - "DELETING", - "FAILED", - "READY" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ] - }, - "tunnels": { - "type": "array", - "description": "[Output Only] A list of URLs to VpnTunnel resources. VpnTunnels are created using compute.vpntunnels.insert method and associated to a VPN gateway.", - "items": { - "type": "string" - } - } - } - }, - "TargetVpnGatewayAggregatedList": { - "id": "TargetVpnGatewayAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of TargetVpnGateway resources.", - "additionalProperties": { - "$ref": "TargetVpnGatewaysScopedList", - "description": "[Output Only] Name of the scope containing this set of target VPN gateways." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#targetVpnGateway for target VPN gateways.", - "default": "compute#targetVpnGatewayAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "TargetVpnGatewayList": { - "id": "TargetVpnGatewayList", - "type": "object", - "description": "Contains a list of TargetVpnGateway resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of TargetVpnGateway resources.", - "items": { - "$ref": "TargetVpnGateway" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#targetVpnGateway for target VPN gateways.", - "default": "compute#targetVpnGatewayList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "TargetVpnGatewaysScopedList": { - "id": "TargetVpnGatewaysScopedList", - "type": "object", - "properties": { - "targetVpnGateways": { - "type": "array", - "description": "[Output Only] List of target vpn gateways contained in this scope.", - "items": { - "$ref": "TargetVpnGateway" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] Informational warning which replaces the list of addresses when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "TestFailure": { - "id": "TestFailure", - "type": "object", - "properties": { - "actualService": { - "type": "string" - }, - "expectedService": { - "type": "string" - }, - "host": { - "type": "string" - }, - "path": { - "type": "string" - } - } - }, - "TestPermissionsRequest": { - "id": "TestPermissionsRequest", - "type": "object", - "properties": { - "permissions": { - "type": "array", - "description": "The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.", - "items": { - "type": "string" - } - } - } - }, - "TestPermissionsResponse": { - "id": "TestPermissionsResponse", - "type": "object", - "properties": { - "permissions": { - "type": "array", - "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", - "items": { - "type": "string" - } - } - } - }, - "UDPHealthCheck": { - "id": "UDPHealthCheck", - "type": "object", - "properties": { - "port": { - "type": "integer", - "description": "The UDP port number for the health check request. Valid values are 1 through 65535.", - "format": "int32" - }, - "portName": { - "type": "string", - "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence." - }, - "request": { - "type": "string", - "description": "Raw data of request to send in payload of UDP packet. It is an error if this is empty. The request data can only be ASCII." - }, - "response": { - "type": "string", - "description": "The bytes to match against the beginning of the response data. It is an error if this is empty. The response data can only be ASCII." - } - } - }, - "UrlMap": { - "id": "UrlMap", - "type": "object", - "description": "A UrlMap resource. This resource defines the mapping from URL to the BackendService resource, based on the \"longest-match\" of the URL's host and path.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "defaultService": { - "type": "string", - "description": "The URL of the BackendService resource if none of the hostRules match." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "fingerprint": { - "type": "string", - "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a UrlMap. An up-to-date fingerprint must be provided in order to update the UrlMap.", - "format": "byte" - }, - "hostRules": { - "type": "array", - "description": "The list of HostRules to use against the URL.", - "items": { - "$ref": "HostRule" - } - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#urlMaps for url maps.", - "default": "compute#urlMap" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "pathMatchers": { - "type": "array", - "description": "The list of named PathMatchers to use against the URL.", - "items": { - "$ref": "PathMatcher" - } - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "tests": { - "type": "array", - "description": "The list of expected URL mappings. Request to update this UrlMap will succeed only if all of the test cases pass.", - "items": { - "$ref": "UrlMapTest" - } - } - } - }, - "UrlMapList": { - "id": "UrlMapList", - "type": "object", - "description": "Contains a list of UrlMap resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of UrlMap resources.", - "items": { - "$ref": "UrlMap" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#urlMapList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "UrlMapReference": { - "id": "UrlMapReference", - "type": "object", - "properties": { - "urlMap": { - "type": "string" - } - } - }, - "UrlMapTest": { - "id": "UrlMapTest", - "type": "object", - "description": "Message for the expected URL mappings.", - "properties": { - "description": { - "type": "string", - "description": "Description of this test case." - }, - "host": { - "type": "string", - "description": "Host portion of the URL." - }, - "path": { - "type": "string", - "description": "Path portion of the URL." - }, - "service": { - "type": "string", - "description": "Expected BackendService resource the given URL should be mapped to." - } - } - }, - "UrlMapValidationResult": { - "id": "UrlMapValidationResult", - "type": "object", - "description": "Message representing the validation result for a UrlMap.", - "properties": { - "loadErrors": { - "type": "array", - "items": { - "type": "string" - } - }, - "loadSucceeded": { - "type": "boolean", - "description": "Whether the given UrlMap can be successfully loaded. If false, 'loadErrors' indicates the reasons." - }, - "testFailures": { - "type": "array", - "items": { - "$ref": "TestFailure" - } - }, - "testPassed": { - "type": "boolean", - "description": "If successfully loaded, this field indicates whether the test passed. If false, 'testFailures's indicate the reason of failure." - } - } - }, - "UrlMapsValidateRequest": { - "id": "UrlMapsValidateRequest", - "type": "object", - "properties": { - "resource": { - "$ref": "UrlMap", - "description": "Content of the UrlMap to be validated." - } - } - }, - "UrlMapsValidateResponse": { - "id": "UrlMapsValidateResponse", - "type": "object", - "properties": { - "result": { - "$ref": "UrlMapValidationResult" - } - } - }, - "UsageExportLocation": { - "id": "UsageExportLocation", - "type": "object", - "description": "The location in Cloud Storage and naming method of the daily usage report. Contains bucket_name and report_name prefix.", - "properties": { - "bucketName": { - "type": "string", - "description": "The name of an existing bucket in Cloud Storage where the usage report object is stored. The Google Service Account is granted write access to this bucket. This can either be the bucket name by itself, such as example-bucket, or the bucket name with gs:// or https://storage.googleapis.com/ in front of it, such as gs://example-bucket." - }, - "reportNamePrefix": { - "type": "string", - "description": "An optional prefix for the name of the usage report object stored in bucketName. If not supplied, defaults to usage. The report is stored as a CSV file named report_name_prefix_gce_YYYYMMDD.csv where YYYYMMDD is the day of the usage according to Pacific Time. If you supply a prefix, it should conform to Cloud Storage object naming conventions." - } - } - }, - "VpnTunnel": { - "id": "VpnTunnel", - "type": "object", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "detailedStatus": { - "type": "string", - "description": "[Output Only] Detailed status message for the VPN tunnel." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "ikeVersion": { - "type": "integer", - "description": "IKE protocol version to use when establishing the VPN tunnel with peer VPN gateway. Acceptable IKE versions are 1 or 2. Default version is 2.", - "format": "int32" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.", - "default": "compute#vpnTunnel" - }, - "localTrafficSelector": { - "type": "array", - "description": "Local traffic selector to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.", - "items": { - "type": "string" - } - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.vpnTunnels.insert" - ] - } - }, - "peerIp": { - "type": "string", - "description": "IP address of the peer VPN gateway. Only IPv4 is supported." - }, - "region": { - "type": "string", - "description": "[Output Only] URL of the region where the VPN tunnel resides." - }, - "remoteTrafficSelector": { - "type": "array", - "description": "Remote traffic selectors to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.", - "items": { - "type": "string" - } - }, - "router": { - "type": "string", - "description": "URL of router resource to be used for dynamic routing." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "sharedSecret": { - "type": "string", - "description": "Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway." - }, - "sharedSecretHash": { - "type": "string", - "description": "Hash of the shared secret." - }, - "status": { - "type": "string", - "description": "[Output Only] The status of the VPN tunnel.", - "enum": [ - "ALLOCATING_RESOURCES", - "AUTHORIZATION_ERROR", - "DEPROVISIONING", - "ESTABLISHED", - "FAILED", - "FIRST_HANDSHAKE", - "NEGOTIATION_FAILURE", - "NETWORK_ERROR", - "NO_INCOMING_PACKETS", - "PROVISIONING", - "REJECTED", - "WAITING_FOR_FULL_CONFIG" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "targetVpnGateway": { - "type": "string", - "description": "URL of the VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created.", - "annotations": { - "required": [ - "compute.vpnTunnels.insert" - ] - } - } - } - }, - "VpnTunnelAggregatedList": { - "id": "VpnTunnelAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of VpnTunnelsScopedList resources.", - "additionalProperties": { - "$ref": "VpnTunnelsScopedList", - "description": "Name of the scope containing this set of vpn tunnels." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.", - "default": "compute#vpnTunnelAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "VpnTunnelList": { - "id": "VpnTunnelList", - "type": "object", - "description": "Contains a list of VpnTunnel resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of VpnTunnel resources.", - "items": { - "$ref": "VpnTunnel" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.", - "default": "compute#vpnTunnelList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "VpnTunnelsScopedList": { - "id": "VpnTunnelsScopedList", - "type": "object", - "properties": { - "vpnTunnels": { - "type": "array", - "description": "List of vpn tunnels contained in this scope.", - "items": { - "$ref": "VpnTunnel" - } - }, - "warning": { - "type": "object", - "description": "Informational warning which replaces the list of addresses when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "XpnHostList": { - "id": "XpnHostList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "[Output Only] A list of shared VPC host project URLs.", - "items": { - "$ref": "Project" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#xpnHostList for lists of shared VPC hosts.", - "default": "compute#xpnHostList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "XpnResourceId": { - "id": "XpnResourceId", - "type": "object", - "description": "Service resource (a.k.a service project) ID.", - "properties": { - "id": { - "type": "string", - "description": "The ID of the service resource. In the case of projects, this field matches the project ID (e.g., my-project), not the project number (e.g., 12345678)." - }, - "type": { - "type": "string", - "description": "The type of the service resource.", - "enum": [ - "PROJECT", - "XPN_RESOURCE_TYPE_UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "" - ] - } - } - }, - "Zone": { - "id": "Zone", - "type": "object", - "description": "A Zone resource.", - "properties": { - "availableCpuPlatforms": { - "type": "array", - "description": "[Output Only] Available cpu/platform selections for the zone.", - "items": { - "type": "string" - } - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "[Output Only] The deprecation status associated with this zone." - }, - "description": { - "type": "string", - "description": "[Output Only] Textual description of the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#zone for zones.", - "default": "compute#zone" - }, - "name": { - "type": "string", - "description": "[Output Only] Name of the resource." - }, - "region": { - "type": "string", - "description": "[Output Only] Full URL reference to the region which hosts the zone." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "status": { - "type": "string", - "description": "[Output Only] Status of the zone, either UP or DOWN.", - "enum": [ - "DOWN", - "UP" - ], - "enumDescriptions": [ - "", - "" - ] - } - } - }, - "ZoneList": { - "id": "ZoneList", - "type": "object", - "description": "Contains a list of zone resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Zone resources.", - "items": { - "$ref": "Zone" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#zoneList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "ZoneSetLabelsRequest": { - "id": "ZoneSetLabelsRequest", - "type": "object", - "properties": { - "labelFingerprint": { - "type": "string", - "description": "The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels. Make a get() request to the resource to get the latest fingerprint.", - "format": "byte" - }, - "labels": { - "type": "object", - "description": "The labels to set for this resource.", - "additionalProperties": { - "type": "string" - } - } - } - } - }, - "resources": { - "acceleratorTypes": { - "methods": { - "aggregatedList": { - "id": "compute.acceleratorTypes.aggregatedList", - "path": "{project}/aggregated/acceleratorTypes", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of accelerator types.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "AcceleratorTypeAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "get": { - "id": "compute.acceleratorTypes.get", - "path": "{project}/zones/{zone}/acceleratorTypes/{acceleratorType}", - "httpMethod": "GET", - "description": "Returns the specified accelerator type. Get a list of available accelerator types by making a list() request.", - "parameters": { - "acceleratorType": { - "type": "string", - "description": "Name of the accelerator type to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "acceleratorType" - ], - "response": { - "$ref": "AcceleratorType" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.acceleratorTypes.list", - "path": "{project}/zones/{zone}/acceleratorTypes", - "httpMethod": "GET", - "description": "Retrieves a list of accelerator types available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "AcceleratorTypeList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "addresses": { - "methods": { - "aggregatedList": { - "id": "compute.addresses.aggregatedList", - "path": "{project}/aggregated/addresses", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of addresses.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "AddressAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.addresses.delete", - "path": "{project}/regions/{region}/addresses/{address}", - "httpMethod": "DELETE", - "description": "Deletes the specified address resource.", - "parameters": { - "address": { - "type": "string", - "description": "Name of the address resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "address" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.addresses.get", - "path": "{project}/regions/{region}/addresses/{address}", - "httpMethod": "GET", - "description": "Returns the specified address resource.", - "parameters": { - "address": { - "type": "string", - "description": "Name of the address resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "address" - ], - "response": { - "$ref": "Address" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.addresses.insert", - "path": "{project}/regions/{region}/addresses", - "httpMethod": "POST", - "description": "Creates an address resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "Address" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.addresses.list", - "path": "{project}/regions/{region}/addresses", - "httpMethod": "GET", - "description": "Retrieves a list of addresses contained within the specified region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "AddressList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setLabels": { - "id": "compute.addresses.setLabels", - "path": "{project}/regions/{region}/addresses/{resource}/setLabels", - "httpMethod": "POST", - "description": "Sets the labels on an Address. To learn more about labels, read the Labeling Resources documentation.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "RegionSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.addresses.testIamPermissions", - "path": "{project}/regions/{region}/addresses/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "autoscalers": { - "methods": { - "aggregatedList": { - "id": "compute.autoscalers.aggregatedList", - "path": "{project}/aggregated/autoscalers", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of autoscalers.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "AutoscalerAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.autoscalers.delete", - "path": "{project}/zones/{zone}/autoscalers/{autoscaler}", - "httpMethod": "DELETE", - "description": "Deletes the specified autoscaler.", - "parameters": { - "autoscaler": { - "type": "string", - "description": "Name of the autoscaler to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "Name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "autoscaler" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.autoscalers.get", - "path": "{project}/zones/{zone}/autoscalers/{autoscaler}", - "httpMethod": "GET", - "description": "Returns the specified autoscaler resource. Get a list of available autoscalers by making a list() request.", - "parameters": { - "autoscaler": { - "type": "string", - "description": "Name of the autoscaler to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "autoscaler" - ], - "response": { - "$ref": "Autoscaler" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.autoscalers.insert", - "path": "{project}/zones/{zone}/autoscalers", - "httpMethod": "POST", - "description": "Creates an autoscaler in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "Name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "request": { - "$ref": "Autoscaler" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.autoscalers.list", - "path": "{project}/zones/{zone}/autoscalers", - "httpMethod": "GET", - "description": "Retrieves a list of autoscalers contained within the specified zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "AutoscalerList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.autoscalers.patch", - "path": "{project}/zones/{zone}/autoscalers", - "httpMethod": "PATCH", - "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "autoscaler": { - "type": "string", - "description": "Name of the autoscaler to patch.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "Name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "request": { - "$ref": "Autoscaler" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.autoscalers.testIamPermissions", - "path": "{project}/zones/{zone}/autoscalers/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.autoscalers.update", - "path": "{project}/zones/{zone}/autoscalers", - "httpMethod": "PUT", - "description": "Updates an autoscaler in the specified project using the data included in the request.", - "parameters": { - "autoscaler": { - "type": "string", - "description": "Name of the autoscaler to update.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "Name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "request": { - "$ref": "Autoscaler" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "backendBuckets": { - "methods": { - "delete": { - "id": "compute.backendBuckets.delete", - "path": "{project}/global/backendBuckets/{backendBucket}", - "httpMethod": "DELETE", - "description": "Deletes the specified BackendBucket resource.", - "parameters": { - "backendBucket": { - "type": "string", - "description": "Name of the BackendBucket resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "backendBucket" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.backendBuckets.get", - "path": "{project}/global/backendBuckets/{backendBucket}", - "httpMethod": "GET", - "description": "Returns the specified BackendBucket resource. Get a list of available backend buckets by making a list() request.", - "parameters": { - "backendBucket": { - "type": "string", - "description": "Name of the BackendBucket resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "backendBucket" - ], - "response": { - "$ref": "BackendBucket" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.backendBuckets.insert", - "path": "{project}/global/backendBuckets", - "httpMethod": "POST", - "description": "Creates a BackendBucket resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "BackendBucket" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.backendBuckets.list", - "path": "{project}/global/backendBuckets", - "httpMethod": "GET", - "description": "Retrieves the list of BackendBucket resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "BackendBucketList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.backendBuckets.patch", - "path": "{project}/global/backendBuckets/{backendBucket}", - "httpMethod": "PATCH", - "description": "Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "backendBucket": { - "type": "string", - "description": "Name of the BackendBucket resource to patch.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "backendBucket" - ], - "request": { - "$ref": "BackendBucket" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.backendBuckets.update", - "path": "{project}/global/backendBuckets/{backendBucket}", - "httpMethod": "PUT", - "description": "Updates the specified BackendBucket resource with the data included in the request.", - "parameters": { - "backendBucket": { - "type": "string", - "description": "Name of the BackendBucket resource to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "backendBucket" - ], - "request": { - "$ref": "BackendBucket" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "backendServices": { - "methods": { - "aggregatedList": { - "id": "compute.backendServices.aggregatedList", - "path": "{project}/aggregated/backendServices", - "httpMethod": "GET", - "description": "Retrieves the list of all BackendService resources, regional and global, available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Name of the project scoping this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "BackendServiceAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.backendServices.delete", - "path": "{project}/global/backendServices/{backendService}", - "httpMethod": "DELETE", - "description": "Deletes the specified BackendService resource.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "backendService" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.backendServices.get", - "path": "{project}/global/backendServices/{backendService}", - "httpMethod": "GET", - "description": "Returns the specified BackendService resource. Get a list of available backend services by making a list() request.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "backendService" - ], - "response": { - "$ref": "BackendService" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getHealth": { - "id": "compute.backendServices.getHealth", - "path": "{project}/global/backendServices/{backendService}/getHealth", - "httpMethod": "POST", - "description": "Gets the most recent health check results for this BackendService.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to which the queried instance belongs.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "backendService" - ], - "request": { - "$ref": "ResourceGroupReference" - }, - "response": { - "$ref": "BackendServiceGroupHealth" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.backendServices.insert", - "path": "{project}/global/backendServices", - "httpMethod": "POST", - "description": "Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Restrictions and Guidelines for more information.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "BackendService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.backendServices.list", - "path": "{project}/global/backendServices", - "httpMethod": "GET", - "description": "Retrieves the list of BackendService resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "BackendServiceList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.backendServices.patch", - "path": "{project}/global/backendServices/{backendService}", - "httpMethod": "PATCH", - "description": "Patches the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to patch.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "backendService" - ], - "request": { - "$ref": "BackendService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.backendServices.testIamPermissions", - "path": "{project}/global/backendServices/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.backendServices.update", - "path": "{project}/global/backendServices/{backendService}", - "httpMethod": "PUT", - "description": "Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "backendService" - ], - "request": { - "$ref": "BackendService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "diskTypes": { - "methods": { - "aggregatedList": { - "id": "compute.diskTypes.aggregatedList", - "path": "{project}/aggregated/diskTypes", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of disk types.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "DiskTypeAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "get": { - "id": "compute.diskTypes.get", - "path": "{project}/zones/{zone}/diskTypes/{diskType}", - "httpMethod": "GET", - "description": "Returns the specified disk type. Get a list of available disk types by making a list() request.", - "parameters": { - "diskType": { - "type": "string", - "description": "Name of the disk type to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "diskType" - ], - "response": { - "$ref": "DiskType" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.diskTypes.list", - "path": "{project}/zones/{zone}/diskTypes", - "httpMethod": "GET", - "description": "Retrieves a list of disk types available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "DiskTypeList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "disks": { - "methods": { - "aggregatedList": { - "id": "compute.disks.aggregatedList", - "path": "{project}/aggregated/disks", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of persistent disks.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "DiskAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "createSnapshot": { - "id": "compute.disks.createSnapshot", - "path": "{project}/zones/{zone}/disks/{disk}/createSnapshot", - "httpMethod": "POST", - "description": "Creates a snapshot of a specified persistent disk.", - "parameters": { - "disk": { - "type": "string", - "description": "Name of the persistent disk to snapshot.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "guestFlush": { - "type": "boolean", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "request": { - "$ref": "Snapshot" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "id": "compute.disks.delete", - "path": "{project}/zones/{zone}/disks/{disk}", - "httpMethod": "DELETE", - "description": "Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.", - "parameters": { - "disk": { - "type": "string", - "description": "Name of the persistent disk to delete.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.disks.get", - "path": "{project}/zones/{zone}/disks/{disk}", - "httpMethod": "GET", - "description": "Returns a specified persistent disk. Get a list of available persistent disks by making a list() request.", - "parameters": { - "disk": { - "type": "string", - "description": "Name of the persistent disk to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "response": { - "$ref": "Disk" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.disks.insert", - "path": "{project}/zones/{zone}/disks", - "httpMethod": "POST", - "description": "Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "sourceImage": { - "type": "string", - "description": "Optional. Source image to restore onto a disk.", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "request": { - "$ref": "Disk" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.disks.list", - "path": "{project}/zones/{zone}/disks", - "httpMethod": "GET", - "description": "Retrieves a list of persistent disks contained within the specified zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "DiskList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "resize": { - "id": "compute.disks.resize", - "path": "{project}/zones/{zone}/disks/{disk}/resize", - "httpMethod": "POST", - "description": "Resizes the specified persistent disk.", - "parameters": { - "disk": { - "type": "string", - "description": "The name of the persistent disk.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "request": { - "$ref": "DisksResizeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "id": "compute.disks.setLabels", - "path": "{project}/zones/{zone}/disks/{resource}/setLabels", - "httpMethod": "POST", - "description": "Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "request": { - "$ref": "ZoneSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.disks.testIamPermissions", - "path": "{project}/zones/{zone}/disks/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "firewalls": { - "methods": { - "delete": { - "id": "compute.firewalls.delete", - "path": "{project}/global/firewalls/{firewall}", - "httpMethod": "DELETE", - "description": "Deletes the specified firewall.", - "parameters": { - "firewall": { - "type": "string", - "description": "Name of the firewall rule to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "firewall" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.firewalls.get", - "path": "{project}/global/firewalls/{firewall}", - "httpMethod": "GET", - "description": "Returns the specified firewall.", - "parameters": { - "firewall": { - "type": "string", - "description": "Name of the firewall rule to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "firewall" - ], - "response": { - "$ref": "Firewall" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.firewalls.insert", - "path": "{project}/global/firewalls", - "httpMethod": "POST", - "description": "Creates a firewall rule in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "Firewall" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.firewalls.list", - "path": "{project}/global/firewalls", - "httpMethod": "GET", - "description": "Retrieves the list of firewall rules available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "FirewallList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.firewalls.patch", - "path": "{project}/global/firewalls/{firewall}", - "httpMethod": "PATCH", - "description": "Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "firewall": { - "type": "string", - "description": "Name of the firewall rule to patch.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "firewall" - ], - "request": { - "$ref": "Firewall" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.firewalls.testIamPermissions", - "path": "{project}/global/firewalls/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.firewalls.update", - "path": "{project}/global/firewalls/{firewall}", - "httpMethod": "PUT", - "description": "Updates the specified firewall rule with the data included in the request. Using PUT method, can only update following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags.", - "parameters": { - "firewall": { - "type": "string", - "description": "Name of the firewall rule to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "firewall" - ], - "request": { - "$ref": "Firewall" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "forwardingRules": { - "methods": { - "aggregatedList": { - "id": "compute.forwardingRules.aggregatedList", - "path": "{project}/aggregated/forwardingRules", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of forwarding rules.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "ForwardingRuleAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.forwardingRules.delete", - "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}", - "httpMethod": "DELETE", - "description": "Deletes the specified ForwardingRule resource.", - "parameters": { - "forwardingRule": { - "type": "string", - "description": "Name of the ForwardingRule resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "forwardingRule" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.forwardingRules.get", - "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}", - "httpMethod": "GET", - "description": "Returns the specified ForwardingRule resource.", - "parameters": { - "forwardingRule": { - "type": "string", - "description": "Name of the ForwardingRule resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "forwardingRule" - ], - "response": { - "$ref": "ForwardingRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.forwardingRules.insert", - "path": "{project}/regions/{region}/forwardingRules", - "httpMethod": "POST", - "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "ForwardingRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.forwardingRules.list", - "path": "{project}/regions/{region}/forwardingRules", - "httpMethod": "GET", - "description": "Retrieves a list of ForwardingRule resources available to the specified project and region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "ForwardingRuleList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setLabels": { - "id": "compute.forwardingRules.setLabels", - "path": "{project}/regions/{region}/forwardingRules/{resource}/setLabels", - "httpMethod": "POST", - "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "RegionSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setTarget": { - "id": "compute.forwardingRules.setTarget", - "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget", - "httpMethod": "POST", - "description": "Changes target URL for forwarding rule. The new target should be of the same type as the old target.", - "parameters": { - "forwardingRule": { - "type": "string", - "description": "Name of the ForwardingRule resource in which target is to be set.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "forwardingRule" - ], - "request": { - "$ref": "TargetReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.forwardingRules.testIamPermissions", - "path": "{project}/regions/{region}/forwardingRules/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "globalAddresses": { - "methods": { - "delete": { - "id": "compute.globalAddresses.delete", - "path": "{project}/global/addresses/{address}", - "httpMethod": "DELETE", - "description": "Deletes the specified address resource.", - "parameters": { - "address": { - "type": "string", - "description": "Name of the address resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "address" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.globalAddresses.get", - "path": "{project}/global/addresses/{address}", - "httpMethod": "GET", - "description": "Returns the specified address resource. Get a list of available addresses by making a list() request.", - "parameters": { - "address": { - "type": "string", - "description": "Name of the address resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "address" - ], - "response": { - "$ref": "Address" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.globalAddresses.insert", - "path": "{project}/global/addresses", - "httpMethod": "POST", - "description": "Creates an address resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "Address" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.globalAddresses.list", - "path": "{project}/global/addresses", - "httpMethod": "GET", - "description": "Retrieves a list of global addresses.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "AddressList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setLabels": { - "id": "compute.globalAddresses.setLabels", - "path": "{project}/global/addresses/{resource}/setLabels", - "httpMethod": "POST", - "description": "Sets the labels on a GlobalAddress. To learn more about labels, read the Labeling Resources documentation.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "GlobalSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.globalAddresses.testIamPermissions", - "path": "{project}/global/addresses/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "globalForwardingRules": { - "methods": { - "delete": { - "id": "compute.globalForwardingRules.delete", - "path": "{project}/global/forwardingRules/{forwardingRule}", - "httpMethod": "DELETE", - "description": "Deletes the specified GlobalForwardingRule resource.", - "parameters": { - "forwardingRule": { - "type": "string", - "description": "Name of the ForwardingRule resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "forwardingRule" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.globalForwardingRules.get", - "path": "{project}/global/forwardingRules/{forwardingRule}", - "httpMethod": "GET", - "description": "Returns the specified GlobalForwardingRule resource. Get a list of available forwarding rules by making a list() request.", - "parameters": { - "forwardingRule": { - "type": "string", - "description": "Name of the ForwardingRule resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "forwardingRule" - ], - "response": { - "$ref": "ForwardingRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.globalForwardingRules.insert", - "path": "{project}/global/forwardingRules", - "httpMethod": "POST", - "description": "Creates a GlobalForwardingRule resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "ForwardingRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.globalForwardingRules.list", - "path": "{project}/global/forwardingRules", - "httpMethod": "GET", - "description": "Retrieves a list of GlobalForwardingRule resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "ForwardingRuleList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setLabels": { - "id": "compute.globalForwardingRules.setLabels", - "path": "{project}/global/forwardingRules/{resource}/setLabels", - "httpMethod": "POST", - "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "GlobalSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setTarget": { - "id": "compute.globalForwardingRules.setTarget", - "path": "{project}/global/forwardingRules/{forwardingRule}/setTarget", - "httpMethod": "POST", - "description": "Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target.", - "parameters": { - "forwardingRule": { - "type": "string", - "description": "Name of the ForwardingRule resource in which target is to be set.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "forwardingRule" - ], - "request": { - "$ref": "TargetReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.globalForwardingRules.testIamPermissions", - "path": "{project}/global/forwardingRules/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "globalOperations": { - "methods": { - "aggregatedList": { - "id": "compute.globalOperations.aggregatedList", - "path": "{project}/aggregated/operations", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of all operations.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "OperationAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.globalOperations.delete", - "path": "{project}/global/operations/{operation}", - "httpMethod": "DELETE", - "description": "Deletes the specified Operations resource.", - "parameters": { - "operation": { - "type": "string", - "description": "Name of the Operations resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "operation" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.globalOperations.get", - "path": "{project}/global/operations/{operation}", - "httpMethod": "GET", - "description": "Retrieves the specified Operations resource. Get a list of operations by making a list() request.", - "parameters": { - "operation": { - "type": "string", - "description": "Name of the Operations resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "operation" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.globalOperations.list", - "path": "{project}/global/operations", - "httpMethod": "GET", - "description": "Retrieves a list of Operation resources contained within the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "OperationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "healthChecks": { - "methods": { - "delete": { - "id": "compute.healthChecks.delete", - "path": "{project}/global/healthChecks/{healthCheck}", - "httpMethod": "DELETE", - "description": "Deletes the specified HealthCheck resource.", - "parameters": { - "healthCheck": { - "type": "string", - "description": "Name of the HealthCheck resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "healthCheck" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.healthChecks.get", - "path": "{project}/global/healthChecks/{healthCheck}", - "httpMethod": "GET", - "description": "Returns the specified HealthCheck resource. Get a list of available health checks by making a list() request.", - "parameters": { - "healthCheck": { - "type": "string", - "description": "Name of the HealthCheck resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "healthCheck" - ], - "response": { - "$ref": "HealthCheck" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.healthChecks.insert", - "path": "{project}/global/healthChecks", - "httpMethod": "POST", - "description": "Creates a HealthCheck resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "HealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.healthChecks.list", - "path": "{project}/global/healthChecks", - "httpMethod": "GET", - "description": "Retrieves the list of HealthCheck resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "HealthCheckList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.healthChecks.patch", - "path": "{project}/global/healthChecks/{healthCheck}", - "httpMethod": "PATCH", - "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "healthCheck": { - "type": "string", - "description": "Name of the HealthCheck resource to patch.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "healthCheck" - ], - "request": { - "$ref": "HealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.healthChecks.testIamPermissions", - "path": "{project}/global/healthChecks/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.healthChecks.update", - "path": "{project}/global/healthChecks/{healthCheck}", - "httpMethod": "PUT", - "description": "Updates a HealthCheck resource in the specified project using the data included in the request.", - "parameters": { - "healthCheck": { - "type": "string", - "description": "Name of the HealthCheck resource to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "healthCheck" - ], - "request": { - "$ref": "HealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "httpHealthChecks": { - "methods": { - "delete": { - "id": "compute.httpHealthChecks.delete", - "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", - "httpMethod": "DELETE", - "description": "Deletes the specified HttpHealthCheck resource.", - "parameters": { - "httpHealthCheck": { - "type": "string", - "description": "Name of the HttpHealthCheck resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "httpHealthCheck" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.httpHealthChecks.get", - "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", - "httpMethod": "GET", - "description": "Returns the specified HttpHealthCheck resource. Get a list of available HTTP health checks by making a list() request.", - "parameters": { - "httpHealthCheck": { - "type": "string", - "description": "Name of the HttpHealthCheck resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "httpHealthCheck" - ], - "response": { - "$ref": "HttpHealthCheck" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.httpHealthChecks.insert", - "path": "{project}/global/httpHealthChecks", - "httpMethod": "POST", - "description": "Creates a HttpHealthCheck resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "HttpHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.httpHealthChecks.list", - "path": "{project}/global/httpHealthChecks", - "httpMethod": "GET", - "description": "Retrieves the list of HttpHealthCheck resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "HttpHealthCheckList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.httpHealthChecks.patch", - "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", - "httpMethod": "PATCH", - "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "httpHealthCheck": { - "type": "string", - "description": "Name of the HttpHealthCheck resource to patch.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "httpHealthCheck" - ], - "request": { - "$ref": "HttpHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.httpHealthChecks.testIamPermissions", - "path": "{project}/global/httpHealthChecks/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.httpHealthChecks.update", - "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", - "httpMethod": "PUT", - "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request.", - "parameters": { - "httpHealthCheck": { - "type": "string", - "description": "Name of the HttpHealthCheck resource to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "httpHealthCheck" - ], - "request": { - "$ref": "HttpHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "httpsHealthChecks": { - "methods": { - "delete": { - "id": "compute.httpsHealthChecks.delete", - "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}", - "httpMethod": "DELETE", - "description": "Deletes the specified HttpsHealthCheck resource.", - "parameters": { - "httpsHealthCheck": { - "type": "string", - "description": "Name of the HttpsHealthCheck resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "httpsHealthCheck" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.httpsHealthChecks.get", - "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}", - "httpMethod": "GET", - "description": "Returns the specified HttpsHealthCheck resource. Get a list of available HTTPS health checks by making a list() request.", - "parameters": { - "httpsHealthCheck": { - "type": "string", - "description": "Name of the HttpsHealthCheck resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "httpsHealthCheck" - ], - "response": { - "$ref": "HttpsHealthCheck" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.httpsHealthChecks.insert", - "path": "{project}/global/httpsHealthChecks", - "httpMethod": "POST", - "description": "Creates a HttpsHealthCheck resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "HttpsHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.httpsHealthChecks.list", - "path": "{project}/global/httpsHealthChecks", - "httpMethod": "GET", - "description": "Retrieves the list of HttpsHealthCheck resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "HttpsHealthCheckList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.httpsHealthChecks.patch", - "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}", - "httpMethod": "PATCH", - "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "httpsHealthCheck": { - "type": "string", - "description": "Name of the HttpsHealthCheck resource to patch.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "httpsHealthCheck" - ], - "request": { - "$ref": "HttpsHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.httpsHealthChecks.testIamPermissions", - "path": "{project}/global/httpsHealthChecks/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.httpsHealthChecks.update", - "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}", - "httpMethod": "PUT", - "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request.", - "parameters": { - "httpsHealthCheck": { - "type": "string", - "description": "Name of the HttpsHealthCheck resource to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "httpsHealthCheck" - ], - "request": { - "$ref": "HttpsHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "images": { - "methods": { - "delete": { - "id": "compute.images.delete", - "path": "{project}/global/images/{image}", - "httpMethod": "DELETE", - "description": "Deletes the specified image.", - "parameters": { - "image": { - "type": "string", - "description": "Name of the image resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "image" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deprecate": { - "id": "compute.images.deprecate", - "path": "{project}/global/images/{image}/deprecate", - "httpMethod": "POST", - "description": "Sets the deprecation status of an image.\n\nIf an empty request body is given, clears the deprecation status instead.", - "parameters": { - "image": { - "type": "string", - "description": "Image name.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and then the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "image" - ], - "request": { - "$ref": "DeprecationStatus" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.images.get", - "path": "{project}/global/images/{image}", - "httpMethod": "GET", - "description": "Returns the specified image. Get a list of available images by making a list() request.", - "parameters": { - "image": { - "type": "string", - "description": "Name of the image resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "image" - ], - "response": { - "$ref": "Image" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getFromFamily": { - "id": "compute.images.getFromFamily", - "path": "{project}/global/images/family/{family}", - "httpMethod": "GET", - "description": "Returns the latest image that is part of an image family and is not deprecated.", - "parameters": { - "family": { - "type": "string", - "description": "Name of the image family to search for.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "family" - ], - "response": { - "$ref": "Image" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.images.insert", - "path": "{project}/global/images", - "httpMethod": "POST", - "description": "Creates an image in the specified project using the data included in the request.", - "parameters": { - "forceCreate": { - "type": "boolean", - "description": "Force image creation if true.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "Image" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_only", - "https://www.googleapis.com/auth/devstorage.read_write" - ] - }, - "list": { - "id": "compute.images.list", - "path": "{project}/global/images", - "httpMethod": "GET", - "description": "Retrieves the list of private images available to the specified project. Private images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "ImageList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setLabels": { - "id": "compute.images.setLabels", - "path": "{project}/global/images/{resource}/setLabels", - "httpMethod": "POST", - "description": "Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "GlobalSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.images.testIamPermissions", - "path": "{project}/global/images/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "instanceGroupManagers": { - "methods": { - "abandonInstances": { - "id": "compute.instanceGroupManagers.abandonInstances", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", - "httpMethod": "POST", - "description": "Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "request": { - "$ref": "InstanceGroupManagersAbandonInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "id": "compute.instanceGroupManagers.aggregatedList", - "path": "{project}/aggregated/instanceGroupManagers", - "httpMethod": "GET", - "description": "Retrieves the list of managed instance groups and groups them by zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "InstanceGroupManagerAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.instanceGroupManagers.delete", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "DELETE", - "description": "Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group to delete.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deleteInstances": { - "id": "compute.instanceGroupManagers.deleteInstances", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", - "httpMethod": "POST", - "description": "Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "request": { - "$ref": "InstanceGroupManagersDeleteInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.instanceGroupManagers.get", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "GET", - "description": "Returns all of the details about the specified managed instance group. Get a list of available managed instance groups by making a list() request.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "response": { - "$ref": "InstanceGroupManager" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.instanceGroupManagers.insert", - "path": "{project}/zones/{zone}/instanceGroupManagers", - "httpMethod": "POST", - "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where you want to create the managed instance group.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "request": { - "$ref": "InstanceGroupManager" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.instanceGroupManagers.list", - "path": "{project}/zones/{zone}/instanceGroupManagers", - "httpMethod": "GET", - "description": "Retrieves a list of managed instance groups that are contained within the specified project and zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "InstanceGroupManagerList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listManagedInstances": { - "id": "compute.instanceGroupManagers.listManagedInstances", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", - "httpMethod": "POST", - "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action.", - "parameters": { - "filter": { - "type": "string", - "location": "query" - }, - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "maxResults": { - "type": "integer", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "order_by": { - "type": "string", - "location": "query" - }, - "pageToken": { - "type": "string", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "response": { - "$ref": "InstanceGroupManagersListManagedInstancesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.instanceGroupManagers.patch", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "PATCH", - "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the instance group manager.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where you want to create the managed instance group.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "request": { - "$ref": "InstanceGroupManager" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "recreateInstances": { - "id": "compute.instanceGroupManagers.recreateInstances", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", - "httpMethod": "POST", - "description": "Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "request": { - "$ref": "InstanceGroupManagersRecreateInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "resize": { - "id": "compute.instanceGroupManagers.resize", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize", - "httpMethod": "POST", - "description": "Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "size": { - "type": "integer", - "description": "The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter.", - "required": true, - "format": "int32", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager", - "size" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "resizeAdvanced": { - "id": "compute.instanceGroupManagers.resizeAdvanced", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced", - "httpMethod": "POST", - "description": "Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method.\n\nIf you increase the size of the instance group, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating, creatingWithoutRetries, or deleting actions with the get or listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "request": { - "$ref": "InstanceGroupManagersResizeAdvancedRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setAutoHealingPolicies": { - "id": "compute.instanceGroupManagers.setAutoHealingPolicies", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies", - "httpMethod": "POST", - "description": "Modifies the autohealing policies.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the instance group manager.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "request": { - "$ref": "InstanceGroupManagersSetAutoHealingRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setInstanceTemplate": { - "id": "compute.instanceGroupManagers.setInstanceTemplate", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", - "httpMethod": "POST", - "description": "Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "request": { - "$ref": "InstanceGroupManagersSetInstanceTemplateRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setTargetPools": { - "id": "compute.instanceGroupManagers.setTargetPools", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", - "httpMethod": "POST", - "description": "Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "request": { - "$ref": "InstanceGroupManagersSetTargetPoolsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.instanceGroupManagers.testIamPermissions", - "path": "{project}/zones/{zone}/instanceGroupManagers/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.instanceGroupManagers.update", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "PUT", - "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listManagedInstances method.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the instance group manager.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where you want to create the managed instance group.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "request": { - "$ref": "InstanceGroupManager" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "instanceGroups": { - "methods": { - "addInstances": { - "id": "compute.instanceGroups.addInstances", - "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances", - "httpMethod": "POST", - "description": "Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.", - "parameters": { - "instanceGroup": { - "type": "string", - "description": "The name of the instance group where you are adding instances.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroup" - ], - "request": { - "$ref": "InstanceGroupsAddInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "id": "compute.instanceGroups.aggregatedList", - "path": "{project}/aggregated/instanceGroups", - "httpMethod": "GET", - "description": "Retrieves the list of instance groups and sorts them by zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "InstanceGroupAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.instanceGroups.delete", - "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}", - "httpMethod": "DELETE", - "description": "Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.", - "parameters": { - "instanceGroup": { - "type": "string", - "description": "The name of the instance group to delete.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroup" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.instanceGroups.get", - "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}", - "httpMethod": "GET", - "description": "Returns the specified instance group. Get a list of available instance groups by making a list() request.", - "parameters": { - "instanceGroup": { - "type": "string", - "description": "The name of the instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroup" - ], - "response": { - "$ref": "InstanceGroup" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.instanceGroups.insert", - "path": "{project}/zones/{zone}/instanceGroups", - "httpMethod": "POST", - "description": "Creates an instance group in the specified project using the parameters that are included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where you want to create the instance group.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "request": { - "$ref": "InstanceGroup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.instanceGroups.list", - "path": "{project}/zones/{zone}/instanceGroups", - "httpMethod": "GET", - "description": "Retrieves the list of instance groups that are located in the specified project and zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "InstanceGroupList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listInstances": { - "id": "compute.instanceGroups.listInstances", - "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances", - "httpMethod": "POST", - "description": "Lists the instances in the specified instance group.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "instanceGroup": { - "type": "string", - "description": "The name of the instance group from which you want to generate a list of included instances.", - "required": true, - "location": "path" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroup" - ], - "request": { - "$ref": "InstanceGroupsListInstancesRequest" - }, - "response": { - "$ref": "InstanceGroupsListInstances" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "removeInstances": { - "id": "compute.instanceGroups.removeInstances", - "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances", - "httpMethod": "POST", - "description": "Removes one or more instances from the specified instance group, but does not delete those instances.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted.", - "parameters": { - "instanceGroup": { - "type": "string", - "description": "The name of the instance group where the specified instances will be removed.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroup" - ], - "request": { - "$ref": "InstanceGroupsRemoveInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setNamedPorts": { - "id": "compute.instanceGroups.setNamedPorts", - "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts", - "httpMethod": "POST", - "description": "Sets the named ports for the specified instance group.", - "parameters": { - "instanceGroup": { - "type": "string", - "description": "The name of the instance group where the named ports are updated.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroup" - ], - "request": { - "$ref": "InstanceGroupsSetNamedPortsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.instanceGroups.testIamPermissions", - "path": "{project}/zones/{zone}/instanceGroups/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "instanceTemplates": { - "methods": { - "delete": { - "id": "compute.instanceTemplates.delete", - "path": "{project}/global/instanceTemplates/{instanceTemplate}", - "httpMethod": "DELETE", - "description": "Deletes the specified instance template. If you delete an instance template that is being referenced from another instance group, the instance group will not be able to create or recreate virtual machine instances. Deleting an instance template is permanent and cannot be undone.", - "parameters": { - "instanceTemplate": { - "type": "string", - "description": "The name of the instance template to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "instanceTemplate" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.instanceTemplates.get", - "path": "{project}/global/instanceTemplates/{instanceTemplate}", - "httpMethod": "GET", - "description": "Returns the specified instance template. Get a list of available instance templates by making a list() request.", - "parameters": { - "instanceTemplate": { - "type": "string", - "description": "The name of the instance template.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "instanceTemplate" - ], - "response": { - "$ref": "InstanceTemplate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.instanceTemplates.insert", - "path": "{project}/global/instanceTemplates", - "httpMethod": "POST", - "description": "Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "InstanceTemplate" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.instanceTemplates.list", - "path": "{project}/global/instanceTemplates", - "httpMethod": "GET", - "description": "Retrieves a list of instance templates that are contained within the specified project and zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "InstanceTemplateList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.instanceTemplates.testIamPermissions", - "path": "{project}/global/instanceTemplates/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "instances": { - "methods": { - "addAccessConfig": { - "id": "compute.instances.addAccessConfig", - "path": "{project}/zones/{zone}/instances/{instance}/addAccessConfig", - "httpMethod": "POST", - "description": "Adds an access config to an instance's network interface.", - "parameters": { - "instance": { - "type": "string", - "description": "The instance name for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "networkInterface": { - "type": "string", - "description": "The name of the network interface to add to this instance.", - "required": true, - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance", - "networkInterface" - ], - "request": { - "$ref": "AccessConfig" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "id": "compute.instances.aggregatedList", - "path": "{project}/aggregated/instances", - "httpMethod": "GET", - "description": "Retrieves aggregated list of instances.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "InstanceAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "attachDisk": { - "id": "compute.instances.attachDisk", - "path": "{project}/zones/{zone}/instances/{instance}/attachDisk", - "httpMethod": "POST", - "description": "Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.", - "parameters": { - "instance": { - "type": "string", - "description": "The instance name for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "request": { - "$ref": "AttachedDisk" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "id": "compute.instances.delete", - "path": "{project}/zones/{zone}/instances/{instance}", - "httpMethod": "DELETE", - "description": "Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deleteAccessConfig": { - "id": "compute.instances.deleteAccessConfig", - "path": "{project}/zones/{zone}/instances/{instance}/deleteAccessConfig", - "httpMethod": "POST", - "description": "Deletes an access config from an instance's network interface.", - "parameters": { - "accessConfig": { - "type": "string", - "description": "The name of the access config to delete.", - "required": true, - "location": "query" - }, - "instance": { - "type": "string", - "description": "The instance name for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "networkInterface": { - "type": "string", - "description": "The name of the network interface.", - "required": true, - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance", - "accessConfig", - "networkInterface" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "detachDisk": { - "id": "compute.instances.detachDisk", - "path": "{project}/zones/{zone}/instances/{instance}/detachDisk", - "httpMethod": "POST", - "description": "Detaches a disk from an instance.", - "parameters": { - "deviceName": { - "type": "string", - "description": "Disk device name to detach.", - "required": true, - "location": "query" - }, - "instance": { - "type": "string", - "description": "Instance name.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance", - "deviceName" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.instances.get", - "path": "{project}/zones/{zone}/instances/{instance}", - "httpMethod": "GET", - "description": "Returns the specified Instance resource. Get a list of available instances by making a list() request.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "response": { - "$ref": "Instance" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getSerialPortOutput": { - "id": "compute.instances.getSerialPortOutput", - "path": "{project}/zones/{zone}/instances/{instance}/serialPort", - "httpMethod": "GET", - "description": "Returns the specified instance's serial port output.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "port": { - "type": "integer", - "description": "Specifies which COM or serial port to retrieve data from.", - "default": "1", - "format": "int32", - "minimum": "1", - "maximum": "4", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "start": { - "type": "string", - "description": "Returns output starting from a specific byte position. Use this to page through output when the output is too large to return in a single request. For the initial request, leave this field unspecified. For subsequent calls, this field should be set to the next value returned in the previous call.", - "format": "int64", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "response": { - "$ref": "SerialPortOutput" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.instances.insert", - "path": "{project}/zones/{zone}/instances", - "httpMethod": "POST", - "description": "Creates an instance resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "request": { - "$ref": "Instance" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.instances.list", - "path": "{project}/zones/{zone}/instances", - "httpMethod": "GET", - "description": "Retrieves the list of instances contained within the specified zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "InstanceList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listReferrers": { - "id": "compute.instances.listReferrers", - "path": "{project}/zones/{zone}/instances/{instance}/referrers", - "httpMethod": "GET", - "description": "Retrieves the list of referrers to instances contained within the specified zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "instance": { - "type": "string", - "description": "Name of the target instance scoping this request, or '-' if the request should span over all instances in the container.", - "required": true, - "pattern": "-|[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "response": { - "$ref": "InstanceListReferrers" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "reset": { - "id": "compute.instances.reset", - "path": "{project}/zones/{zone}/instances/{instance}/reset", - "httpMethod": "POST", - "description": "Performs a reset on the instance. For more information, see Resetting an instance.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setDiskAutoDelete": { - "id": "compute.instances.setDiskAutoDelete", - "path": "{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete", - "httpMethod": "POST", - "description": "Sets the auto-delete flag for a disk attached to an instance.", - "parameters": { - "autoDelete": { - "type": "boolean", - "description": "Whether to auto-delete the disk when the instance is deleted.", - "required": true, - "location": "query" - }, - "deviceName": { - "type": "string", - "description": "The device name of the disk to modify.", - "required": true, - "pattern": "\\w[\\w.-]{0,254}", - "location": "query" - }, - "instance": { - "type": "string", - "description": "The instance name.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance", - "autoDelete", - "deviceName" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "id": "compute.instances.setLabels", - "path": "{project}/zones/{zone}/instances/{instance}/setLabels", - "httpMethod": "POST", - "description": "Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "request": { - "$ref": "InstancesSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setMachineResources": { - "id": "compute.instances.setMachineResources", - "path": "{project}/zones/{zone}/instances/{instance}/setMachineResources", - "httpMethod": "POST", - "description": "Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "request": { - "$ref": "InstancesSetMachineResourcesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setMachineType": { - "id": "compute.instances.setMachineType", - "path": "{project}/zones/{zone}/instances/{instance}/setMachineType", - "httpMethod": "POST", - "description": "Changes the machine type for a stopped instance to the machine type specified in the request.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "request": { - "$ref": "InstancesSetMachineTypeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setMetadata": { - "id": "compute.instances.setMetadata", - "path": "{project}/zones/{zone}/instances/{instance}/setMetadata", - "httpMethod": "POST", - "description": "Sets metadata for the specified instance to the data included in the request.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "request": { - "$ref": "Metadata" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setMinCpuPlatform": { - "id": "compute.instances.setMinCpuPlatform", - "path": "{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform", - "httpMethod": "POST", - "description": "Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "request": { - "$ref": "InstancesSetMinCpuPlatformRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setScheduling": { - "id": "compute.instances.setScheduling", - "path": "{project}/zones/{zone}/instances/{instance}/setScheduling", - "httpMethod": "POST", - "description": "Sets an instance's scheduling options.", - "parameters": { - "instance": { - "type": "string", - "description": "Instance name.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "request": { - "$ref": "Scheduling" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setServiceAccount": { - "id": "compute.instances.setServiceAccount", - "path": "{project}/zones/{zone}/instances/{instance}/setServiceAccount", - "httpMethod": "POST", - "description": "Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance resource to start.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "request": { - "$ref": "InstancesSetServiceAccountRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setTags": { - "id": "compute.instances.setTags", - "path": "{project}/zones/{zone}/instances/{instance}/setTags", - "httpMethod": "POST", - "description": "Sets tags for the specified instance to the data included in the request.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "request": { - "$ref": "Tags" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "start": { - "id": "compute.instances.start", - "path": "{project}/zones/{zone}/instances/{instance}/start", - "httpMethod": "POST", - "description": "Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance resource to start.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "startWithEncryptionKey": { - "id": "compute.instances.startWithEncryptionKey", - "path": "{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey", - "httpMethod": "POST", - "description": "Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance resource to start.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "request": { - "$ref": "InstancesStartWithEncryptionKeyRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "stop": { - "id": "compute.instances.stop", - "path": "{project}/zones/{zone}/instances/{instance}/stop", - "httpMethod": "POST", - "description": "Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur per-minute, virtual machine usage charges while they are stopped, but any resources that the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance resource to stop.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.instances.testIamPermissions", - "path": "{project}/zones/{zone}/instances/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "licenses": { - "methods": { - "get": { - "id": "compute.licenses.get", - "path": "{project}/global/licenses/{license}", - "httpMethod": "GET", - "description": "Returns the specified License resource.", - "parameters": { - "license": { - "type": "string", - "description": "Name of the License resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "license" - ], - "response": { - "$ref": "License" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "machineTypes": { - "methods": { - "aggregatedList": { - "id": "compute.machineTypes.aggregatedList", - "path": "{project}/aggregated/machineTypes", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of machine types.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "MachineTypeAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "get": { - "id": "compute.machineTypes.get", - "path": "{project}/zones/{zone}/machineTypes/{machineType}", - "httpMethod": "GET", - "description": "Returns the specified machine type. Get a list of available machine types by making a list() request.", - "parameters": { - "machineType": { - "type": "string", - "description": "Name of the machine type to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "machineType" - ], - "response": { - "$ref": "MachineType" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.machineTypes.list", - "path": "{project}/zones/{zone}/machineTypes", - "httpMethod": "GET", - "description": "Retrieves a list of machine types available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "MachineTypeList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "networks": { - "methods": { - "addPeering": { - "id": "compute.networks.addPeering", - "path": "{project}/global/networks/{network}/addPeering", - "httpMethod": "POST", - "description": "Adds a peering to the specified network.", - "parameters": { - "network": { - "type": "string", - "description": "Name of the network resource to add peering to.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "network" - ], - "request": { - "$ref": "NetworksAddPeeringRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "id": "compute.networks.delete", - "path": "{project}/global/networks/{network}", - "httpMethod": "DELETE", - "description": "Deletes the specified network.", - "parameters": { - "network": { - "type": "string", - "description": "Name of the network to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "network" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.networks.get", - "path": "{project}/global/networks/{network}", - "httpMethod": "GET", - "description": "Returns the specified network. Get a list of available networks by making a list() request.", - "parameters": { - "network": { - "type": "string", - "description": "Name of the network to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "network" - ], - "response": { - "$ref": "Network" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.networks.insert", - "path": "{project}/global/networks", - "httpMethod": "POST", - "description": "Creates a network in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "Network" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.networks.list", - "path": "{project}/global/networks", - "httpMethod": "GET", - "description": "Retrieves the list of networks available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "NetworkList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "removePeering": { - "id": "compute.networks.removePeering", - "path": "{project}/global/networks/{network}/removePeering", - "httpMethod": "POST", - "description": "Removes a peering from the specified network.", - "parameters": { - "network": { - "type": "string", - "description": "Name of the network resource to remove peering from.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "network" - ], - "request": { - "$ref": "NetworksRemovePeeringRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "switchToCustomMode": { - "id": "compute.networks.switchToCustomMode", - "path": "{project}/global/networks/{network}/switchToCustomMode", - "httpMethod": "POST", - "description": "Switches the network mode from auto subnet mode to custom subnet mode.", - "parameters": { - "network": { - "type": "string", - "description": "Name of the network to be updated.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "network" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.networks.testIamPermissions", - "path": "{project}/global/networks/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "projects": { - "methods": { - "disableXpnHost": { - "id": "compute.projects.disableXpnHost", - "path": "{project}/disableXpnHost", - "httpMethod": "POST", - "description": "Disable this project as a shared VPC host project.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "disableXpnResource": { - "id": "compute.projects.disableXpnResource", - "path": "{project}/disableXpnResource", - "httpMethod": "POST", - "description": "Disable a serivce resource (a.k.a service project) associated with this host project.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "ProjectsDisableXpnResourceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "enableXpnHost": { - "id": "compute.projects.enableXpnHost", - "path": "{project}/enableXpnHost", - "httpMethod": "POST", - "description": "Enable this project as a shared VPC host project.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "enableXpnResource": { - "id": "compute.projects.enableXpnResource", - "path": "{project}/enableXpnResource", - "httpMethod": "POST", - "description": "Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "ProjectsEnableXpnResourceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.projects.get", - "path": "{project}", - "httpMethod": "GET", - "description": "Returns the specified Project resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "Project" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getXpnHost": { - "id": "compute.projects.getXpnHost", - "path": "{project}/getXpnHost", - "httpMethod": "GET", - "description": "Get the shared VPC host project that this project links to. May be empty if no link exists.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "Project" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "getXpnResources": { - "id": "compute.projects.getXpnResources", - "path": "{project}/getXpnResources", - "httpMethod": "GET", - "description": "Get service resources (a.k.a service project) associated with this host project.", - "parameters": { - "filter": { - "type": "string", - "location": "query" - }, - "maxResults": { - "type": "integer", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "order_by": { - "type": "string", - "location": "query" - }, - "pageToken": { - "type": "string", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "ProjectsGetXpnResources" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "listXpnHosts": { - "id": "compute.projects.listXpnHosts", - "path": "{project}/listXpnHosts", - "httpMethod": "POST", - "description": "List all shared VPC host projects visible to the user in an organization.", - "parameters": { - "filter": { - "type": "string", - "location": "query" - }, - "maxResults": { - "type": "integer", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "order_by": { - "type": "string", - "location": "query" - }, - "pageToken": { - "type": "string", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "ProjectsListXpnHostsRequest" - }, - "response": { - "$ref": "XpnHostList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "moveDisk": { - "id": "compute.projects.moveDisk", - "path": "{project}/moveDisk", - "httpMethod": "POST", - "description": "Moves a persistent disk from one zone to another.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "DiskMoveRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "moveInstance": { - "id": "compute.projects.moveInstance", - "path": "{project}/moveInstance", - "httpMethod": "POST", - "description": "Moves an instance and its attached persistent disks from one zone to another.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "InstanceMoveRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setCommonInstanceMetadata": { - "id": "compute.projects.setCommonInstanceMetadata", - "path": "{project}/setCommonInstanceMetadata", - "httpMethod": "POST", - "description": "Sets metadata common to all instances within the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "Metadata" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setUsageExportBucket": { - "id": "compute.projects.setUsageExportBucket", - "path": "{project}/setUsageExportBucket", - "httpMethod": "POST", - "description": "Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "UsageExportLocation" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_only", - "https://www.googleapis.com/auth/devstorage.read_write" - ] - } - } - }, - "regionAutoscalers": { - "methods": { - "delete": { - "id": "compute.regionAutoscalers.delete", - "path": "{project}/regions/{region}/autoscalers/{autoscaler}", - "httpMethod": "DELETE", - "description": "Deletes the specified autoscaler.", - "parameters": { - "autoscaler": { - "type": "string", - "description": "Name of the autoscaler to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "autoscaler" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.regionAutoscalers.get", - "path": "{project}/regions/{region}/autoscalers/{autoscaler}", - "httpMethod": "GET", - "description": "Returns the specified autoscaler.", - "parameters": { - "autoscaler": { - "type": "string", - "description": "Name of the autoscaler to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "autoscaler" - ], - "response": { - "$ref": "Autoscaler" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.regionAutoscalers.insert", - "path": "{project}/regions/{region}/autoscalers", - "httpMethod": "POST", - "description": "Creates an autoscaler in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "Autoscaler" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.regionAutoscalers.list", - "path": "{project}/regions/{region}/autoscalers", - "httpMethod": "GET", - "description": "Retrieves a list of autoscalers contained within the specified region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "RegionAutoscalerList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.regionAutoscalers.patch", - "path": "{project}/regions/{region}/autoscalers", - "httpMethod": "PATCH", - "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "autoscaler": { - "type": "string", - "description": "Name of the autoscaler to patch.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and then the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "Autoscaler" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.regionAutoscalers.testIamPermissions", - "path": "{project}/regions/{region}/autoscalers/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.regionAutoscalers.update", - "path": "{project}/regions/{region}/autoscalers", - "httpMethod": "PUT", - "description": "Updates an autoscaler in the specified project using the data included in the request.", - "parameters": { - "autoscaler": { - "type": "string", - "description": "Name of the autoscaler to update.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and then the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "Autoscaler" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionBackendServices": { - "methods": { - "delete": { - "id": "compute.regionBackendServices.delete", - "path": "{project}/regions/{region}/backendServices/{backendService}", - "httpMethod": "DELETE", - "description": "Deletes the specified regional BackendService resource.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "backendService" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.regionBackendServices.get", - "path": "{project}/regions/{region}/backendServices/{backendService}", - "httpMethod": "GET", - "description": "Returns the specified regional BackendService resource.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "backendService" - ], - "response": { - "$ref": "BackendService" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getHealth": { - "id": "compute.regionBackendServices.getHealth", - "path": "{project}/regions/{region}/backendServices/{backendService}/getHealth", - "httpMethod": "POST", - "description": "Gets the most recent health check results for this regional BackendService.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to which the queried instance belongs.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "backendService" - ], - "request": { - "$ref": "ResourceGroupReference" - }, - "response": { - "$ref": "BackendServiceGroupHealth" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.regionBackendServices.insert", - "path": "{project}/regions/{region}/backendServices", - "httpMethod": "POST", - "description": "Creates a regional BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a regional backend service. Read Restrictions and Guidelines for more information.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "BackendService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.regionBackendServices.list", - "path": "{project}/regions/{region}/backendServices", - "httpMethod": "GET", - "description": "Retrieves the list of regional BackendService resources available to the specified project in the given region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "BackendServiceList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.regionBackendServices.patch", - "path": "{project}/regions/{region}/backendServices/{backendService}", - "httpMethod": "PATCH", - "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to patch.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "backendService" - ], - "request": { - "$ref": "BackendService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.regionBackendServices.testIamPermissions", - "path": "{project}/regions/{region}/backendServices/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.regionBackendServices.update", - "path": "{project}/regions/{region}/backendServices/{backendService}", - "httpMethod": "PUT", - "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "backendService" - ], - "request": { - "$ref": "BackendService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionCommitments": { - "methods": { - "aggregatedList": { - "id": "compute.regionCommitments.aggregatedList", - "path": "{project}/aggregated/commitments", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of commitments.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "CommitmentAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "get": { - "id": "compute.regionCommitments.get", - "path": "{project}/regions/{region}/commitments/{commitment}", - "httpMethod": "GET", - "description": "Returns the specified commitment resource. Get a list of available commitments by making a list() request.", - "parameters": { - "commitment": { - "type": "string", - "description": "Name of the commitment to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "commitment" - ], - "response": { - "$ref": "Commitment" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.regionCommitments.insert", - "path": "{project}/regions/{region}/commitments", - "httpMethod": "POST", - "description": "Creates a commitment in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "Commitment" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.regionCommitments.list", - "path": "{project}/regions/{region}/commitments", - "httpMethod": "GET", - "description": "Retrieves a list of commitments contained within the specified region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "CommitmentList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionInstanceGroupManagers": { - "methods": { - "abandonInstances": { - "id": "compute.regionInstanceGroupManagers.abandonInstances", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", - "httpMethod": "POST", - "description": "Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "Name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "request": { - "$ref": "RegionInstanceGroupManagersAbandonInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "id": "compute.regionInstanceGroupManagers.delete", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "DELETE", - "description": "Deletes the specified managed instance group and all of the instances in that group.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "Name of the managed instance group to delete.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deleteInstances": { - "id": "compute.regionInstanceGroupManagers.deleteInstances", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", - "httpMethod": "POST", - "description": "Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "Name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "request": { - "$ref": "RegionInstanceGroupManagersDeleteInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.regionInstanceGroupManagers.get", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "GET", - "description": "Returns all of the details about the specified managed instance group.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "Name of the managed instance group to return.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "response": { - "$ref": "InstanceGroupManager" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.regionInstanceGroupManagers.insert", - "path": "{project}/regions/{region}/instanceGroupManagers", - "httpMethod": "POST", - "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA regional managed instance group can contain up to 2000 instances.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "InstanceGroupManager" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.regionInstanceGroupManagers.list", - "path": "{project}/regions/{region}/instanceGroupManagers", - "httpMethod": "GET", - "description": "Retrieves the list of managed instance groups that are contained within the specified region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "RegionInstanceGroupManagerList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listManagedInstances": { - "id": "compute.regionInstanceGroupManagers.listManagedInstances", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", - "httpMethod": "POST", - "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances.", - "parameters": { - "filter": { - "type": "string", - "location": "query" - }, - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "maxResults": { - "type": "integer", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "order_by": { - "type": "string", - "location": "query" - }, - "pageToken": { - "type": "string", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "response": { - "$ref": "RegionInstanceGroupManagersListInstancesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.regionInstanceGroupManagers.patch", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "PATCH", - "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the instance group manager.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "request": { - "$ref": "InstanceGroupManager" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "recreateInstances": { - "id": "compute.regionInstanceGroupManagers.recreateInstances", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", - "httpMethod": "POST", - "description": "Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "Name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "request": { - "$ref": "RegionInstanceGroupManagersRecreateRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "resize": { - "id": "compute.regionInstanceGroupManagers.resize", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resize", - "httpMethod": "POST", - "description": "Changes the intended size for the managed instance group. If you increase the size, the group schedules actions to create new instances using the current instance template. If you decrease the size, the group schedules delete actions on one or more instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "Name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "size": { - "type": "integer", - "description": "Number of instances that should exist in this instance group manager.", - "required": true, - "format": "int32", - "minimum": "0", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager", - "size" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setAutoHealingPolicies": { - "id": "compute.regionInstanceGroupManagers.setAutoHealingPolicies", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies", - "httpMethod": "POST", - "description": "Modifies the autohealing policy for the instances in this managed instance group.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "Name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "request": { - "$ref": "RegionInstanceGroupManagersSetAutoHealingRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setInstanceTemplate": { - "id": "compute.regionInstanceGroupManagers.setInstanceTemplate", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", - "httpMethod": "POST", - "description": "Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "request": { - "$ref": "RegionInstanceGroupManagersSetTemplateRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setTargetPools": { - "id": "compute.regionInstanceGroupManagers.setTargetPools", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", - "httpMethod": "POST", - "description": "Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "Name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "request": { - "$ref": "RegionInstanceGroupManagersSetTargetPoolsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.regionInstanceGroupManagers.testIamPermissions", - "path": "{project}/regions/{region}/instanceGroupManagers/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.regionInstanceGroupManagers.update", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "PUT", - "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listmanagedinstances method.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the instance group manager.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "request": { - "$ref": "InstanceGroupManager" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionInstanceGroups": { - "methods": { - "get": { - "id": "compute.regionInstanceGroups.get", - "path": "{project}/regions/{region}/instanceGroups/{instanceGroup}", - "httpMethod": "GET", - "description": "Returns the specified instance group resource.", - "parameters": { - "instanceGroup": { - "type": "string", - "description": "Name of the instance group resource to return.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroup" - ], - "response": { - "$ref": "InstanceGroup" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.regionInstanceGroups.list", - "path": "{project}/regions/{region}/instanceGroups", - "httpMethod": "GET", - "description": "Retrieves the list of instance group resources contained within the specified region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "RegionInstanceGroupList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listInstances": { - "id": "compute.regionInstanceGroups.listInstances", - "path": "{project}/regions/{region}/instanceGroups/{instanceGroup}/listInstances", - "httpMethod": "POST", - "description": "Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "instanceGroup": { - "type": "string", - "description": "Name of the regional instance group for which we want to list the instances.", - "required": true, - "location": "path" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroup" - ], - "request": { - "$ref": "RegionInstanceGroupsListInstancesRequest" - }, - "response": { - "$ref": "RegionInstanceGroupsListInstances" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setNamedPorts": { - "id": "compute.regionInstanceGroups.setNamedPorts", - "path": "{project}/regions/{region}/instanceGroups/{instanceGroup}/setNamedPorts", - "httpMethod": "POST", - "description": "Sets the named ports for the specified regional instance group.", - "parameters": { - "instanceGroup": { - "type": "string", - "description": "The name of the regional instance group where the named ports are updated.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroup" - ], - "request": { - "$ref": "RegionInstanceGroupsSetNamedPortsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.regionInstanceGroups.testIamPermissions", - "path": "{project}/regions/{region}/instanceGroups/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionOperations": { - "methods": { - "delete": { - "id": "compute.regionOperations.delete", - "path": "{project}/regions/{region}/operations/{operation}", - "httpMethod": "DELETE", - "description": "Deletes the specified region-specific Operations resource.", - "parameters": { - "operation": { - "type": "string", - "description": "Name of the Operations resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "operation" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.regionOperations.get", - "path": "{project}/regions/{region}/operations/{operation}", - "httpMethod": "GET", - "description": "Retrieves the specified region-specific Operations resource.", - "parameters": { - "operation": { - "type": "string", - "description": "Name of the Operations resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "operation" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.regionOperations.list", - "path": "{project}/regions/{region}/operations", - "httpMethod": "GET", - "description": "Retrieves a list of Operation resources contained within the specified region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "OperationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regions": { - "methods": { - "get": { - "id": "compute.regions.get", - "path": "{project}/regions/{region}", - "httpMethod": "GET", - "description": "Returns the specified Region resource. Get a list of available regions by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "Region" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.regions.list", - "path": "{project}/regions", - "httpMethod": "GET", - "description": "Retrieves the list of region resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "RegionList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "routers": { - "methods": { - "aggregatedList": { - "id": "compute.routers.aggregatedList", - "path": "{project}/aggregated/routers", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of routers.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "RouterAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.routers.delete", - "path": "{project}/regions/{region}/routers/{router}", - "httpMethod": "DELETE", - "description": "Deletes the specified Router resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "router": { - "type": "string", - "description": "Name of the Router resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "router" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.routers.get", - "path": "{project}/regions/{region}/routers/{router}", - "httpMethod": "GET", - "description": "Returns the specified Router resource. Get a list of available routers by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "router": { - "type": "string", - "description": "Name of the Router resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "router" - ], - "response": { - "$ref": "Router" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getRouterStatus": { - "id": "compute.routers.getRouterStatus", - "path": "{project}/regions/{region}/routers/{router}/getRouterStatus", - "httpMethod": "GET", - "description": "Retrieves runtime information of the specified router.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "router": { - "type": "string", - "description": "Name of the Router resource to query.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "router" - ], - "response": { - "$ref": "RouterStatusResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.routers.insert", - "path": "{project}/regions/{region}/routers", - "httpMethod": "POST", - "description": "Creates a Router resource in the specified project and region using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "Router" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.routers.list", - "path": "{project}/regions/{region}/routers", - "httpMethod": "GET", - "description": "Retrieves a list of Router resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "RouterList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.routers.patch", - "path": "{project}/regions/{region}/routers/{router}", - "httpMethod": "PATCH", - "description": "Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "router": { - "type": "string", - "description": "Name of the Router resource to patch.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "router" - ], - "request": { - "$ref": "Router" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "preview": { - "id": "compute.routers.preview", - "path": "{project}/regions/{region}/routers/{router}/preview", - "httpMethod": "POST", - "description": "Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "router": { - "type": "string", - "description": "Name of the Router resource to query.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "router" - ], - "request": { - "$ref": "Router" - }, - "response": { - "$ref": "RoutersPreviewResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.routers.testIamPermissions", - "path": "{project}/regions/{region}/routers/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.routers.update", - "path": "{project}/regions/{region}/routers/{router}", - "httpMethod": "PUT", - "description": "Updates the specified Router resource with the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "router": { - "type": "string", - "description": "Name of the Router resource to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "router" - ], - "request": { - "$ref": "Router" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "routes": { - "methods": { - "delete": { - "id": "compute.routes.delete", - "path": "{project}/global/routes/{route}", - "httpMethod": "DELETE", - "description": "Deletes the specified Route resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "route": { - "type": "string", - "description": "Name of the Route resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "route" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.routes.get", - "path": "{project}/global/routes/{route}", - "httpMethod": "GET", - "description": "Returns the specified Route resource. Get a list of available routes by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "route": { - "type": "string", - "description": "Name of the Route resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "route" - ], - "response": { - "$ref": "Route" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.routes.insert", - "path": "{project}/global/routes", - "httpMethod": "POST", - "description": "Creates a Route resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "Route" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.routes.list", - "path": "{project}/global/routes", - "httpMethod": "GET", - "description": "Retrieves the list of Route resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "RouteList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.routes.testIamPermissions", - "path": "{project}/global/routes/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "snapshots": { - "methods": { - "delete": { - "id": "compute.snapshots.delete", - "path": "{project}/global/snapshots/{snapshot}", - "httpMethod": "DELETE", - "description": "Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.\n\nFor more information, see Deleting snaphots.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "snapshot": { - "type": "string", - "description": "Name of the Snapshot resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "snapshot" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.snapshots.get", - "path": "{project}/global/snapshots/{snapshot}", - "httpMethod": "GET", - "description": "Returns the specified Snapshot resource. Get a list of available snapshots by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "snapshot": { - "type": "string", - "description": "Name of the Snapshot resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "snapshot" - ], - "response": { - "$ref": "Snapshot" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.snapshots.list", - "path": "{project}/global/snapshots", - "httpMethod": "GET", - "description": "Retrieves the list of Snapshot resources contained within the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "SnapshotList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setLabels": { - "id": "compute.snapshots.setLabels", - "path": "{project}/global/snapshots/{resource}/setLabels", - "httpMethod": "POST", - "description": "Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "GlobalSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.snapshots.testIamPermissions", - "path": "{project}/global/snapshots/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "sslCertificates": { - "methods": { - "delete": { - "id": "compute.sslCertificates.delete", - "path": "{project}/global/sslCertificates/{sslCertificate}", - "httpMethod": "DELETE", - "description": "Deletes the specified SslCertificate resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "sslCertificate": { - "type": "string", - "description": "Name of the SslCertificate resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "sslCertificate" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.sslCertificates.get", - "path": "{project}/global/sslCertificates/{sslCertificate}", - "httpMethod": "GET", - "description": "Returns the specified SslCertificate resource. Get a list of available SSL certificates by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "sslCertificate": { - "type": "string", - "description": "Name of the SslCertificate resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "sslCertificate" - ], - "response": { - "$ref": "SslCertificate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.sslCertificates.insert", - "path": "{project}/global/sslCertificates", - "httpMethod": "POST", - "description": "Creates a SslCertificate resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "SslCertificate" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.sslCertificates.list", - "path": "{project}/global/sslCertificates", - "httpMethod": "GET", - "description": "Retrieves the list of SslCertificate resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "SslCertificateList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.sslCertificates.testIamPermissions", - "path": "{project}/global/sslCertificates/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "subnetworks": { - "methods": { - "aggregatedList": { - "id": "compute.subnetworks.aggregatedList", - "path": "{project}/aggregated/subnetworks", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of subnetworks.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "SubnetworkAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.subnetworks.delete", - "path": "{project}/regions/{region}/subnetworks/{subnetwork}", - "httpMethod": "DELETE", - "description": "Deletes the specified subnetwork.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "subnetwork": { - "type": "string", - "description": "Name of the Subnetwork resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "subnetwork" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "expandIpCidrRange": { - "id": "compute.subnetworks.expandIpCidrRange", - "path": "{project}/regions/{region}/subnetworks/{subnetwork}/expandIpCidrRange", - "httpMethod": "POST", - "description": "Expands the IP CIDR range of the subnetwork to a specified value.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "subnetwork": { - "type": "string", - "description": "Name of the Subnetwork resource to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "subnetwork" - ], - "request": { - "$ref": "SubnetworksExpandIpCidrRangeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.subnetworks.get", - "path": "{project}/regions/{region}/subnetworks/{subnetwork}", - "httpMethod": "GET", - "description": "Returns the specified subnetwork. Get a list of available subnetworks list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "subnetwork": { - "type": "string", - "description": "Name of the Subnetwork resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "subnetwork" - ], - "response": { - "$ref": "Subnetwork" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "id": "compute.subnetworks.getIamPolicy", - "path": "{project}/regions/{region}/subnetworks/{resource}/getIamPolicy", - "httpMethod": "GET", - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.subnetworks.insert", - "path": "{project}/regions/{region}/subnetworks", - "httpMethod": "POST", - "description": "Creates a subnetwork in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "Subnetwork" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.subnetworks.list", - "path": "{project}/regions/{region}/subnetworks", - "httpMethod": "GET", - "description": "Retrieves a list of subnetworks available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "SubnetworkList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setIamPolicy": { - "id": "compute.subnetworks.setIamPolicy", - "path": "{project}/regions/{region}/subnetworks/{resource}/setIamPolicy", - "httpMethod": "POST", - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "Policy" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setPrivateIpGoogleAccess": { - "id": "compute.subnetworks.setPrivateIpGoogleAccess", - "path": "{project}/regions/{region}/subnetworks/{subnetwork}/setPrivateIpGoogleAccess", - "httpMethod": "POST", - "description": "Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "subnetwork": { - "type": "string", - "description": "Name of the Subnetwork resource.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "subnetwork" - ], - "request": { - "$ref": "SubnetworksSetPrivateIpGoogleAccessRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.subnetworks.testIamPermissions", - "path": "{project}/regions/{region}/subnetworks/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "targetHttpProxies": { - "methods": { - "delete": { - "id": "compute.targetHttpProxies.delete", - "path": "{project}/global/targetHttpProxies/{targetHttpProxy}", - "httpMethod": "DELETE", - "description": "Deletes the specified TargetHttpProxy resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetHttpProxy": { - "type": "string", - "description": "Name of the TargetHttpProxy resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetHttpProxy" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.targetHttpProxies.get", - "path": "{project}/global/targetHttpProxies/{targetHttpProxy}", - "httpMethod": "GET", - "description": "Returns the specified TargetHttpProxy resource. Get a list of available target HTTP proxies by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "targetHttpProxy": { - "type": "string", - "description": "Name of the TargetHttpProxy resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetHttpProxy" - ], - "response": { - "$ref": "TargetHttpProxy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.targetHttpProxies.insert", - "path": "{project}/global/targetHttpProxies", - "httpMethod": "POST", - "description": "Creates a TargetHttpProxy resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "TargetHttpProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.targetHttpProxies.list", - "path": "{project}/global/targetHttpProxies", - "httpMethod": "GET", - "description": "Retrieves the list of TargetHttpProxy resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "TargetHttpProxyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setUrlMap": { - "id": "compute.targetHttpProxies.setUrlMap", - "path": "{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap", - "httpMethod": "POST", - "description": "Changes the URL map for TargetHttpProxy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetHttpProxy": { - "type": "string", - "description": "Name of the TargetHttpProxy to set a URL map for.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetHttpProxy" - ], - "request": { - "$ref": "UrlMapReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.targetHttpProxies.testIamPermissions", - "path": "{project}/global/targetHttpProxies/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "targetHttpsProxies": { - "methods": { - "delete": { - "id": "compute.targetHttpsProxies.delete", - "path": "{project}/global/targetHttpsProxies/{targetHttpsProxy}", - "httpMethod": "DELETE", - "description": "Deletes the specified TargetHttpsProxy resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetHttpsProxy": { - "type": "string", - "description": "Name of the TargetHttpsProxy resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetHttpsProxy" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.targetHttpsProxies.get", - "path": "{project}/global/targetHttpsProxies/{targetHttpsProxy}", - "httpMethod": "GET", - "description": "Returns the specified TargetHttpsProxy resource. Get a list of available target HTTPS proxies by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "targetHttpsProxy": { - "type": "string", - "description": "Name of the TargetHttpsProxy resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetHttpsProxy" - ], - "response": { - "$ref": "TargetHttpsProxy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.targetHttpsProxies.insert", - "path": "{project}/global/targetHttpsProxies", - "httpMethod": "POST", - "description": "Creates a TargetHttpsProxy resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "TargetHttpsProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.targetHttpsProxies.list", - "path": "{project}/global/targetHttpsProxies", - "httpMethod": "GET", - "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "TargetHttpsProxyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setSslCertificates": { - "id": "compute.targetHttpsProxies.setSslCertificates", - "path": "{project}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates", - "httpMethod": "POST", - "description": "Replaces SslCertificates for TargetHttpsProxy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetHttpsProxy": { - "type": "string", - "description": "Name of the TargetHttpsProxy resource to set an SslCertificates resource for.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetHttpsProxy" - ], - "request": { - "$ref": "TargetHttpsProxiesSetSslCertificatesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setUrlMap": { - "id": "compute.targetHttpsProxies.setUrlMap", - "path": "{project}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap", - "httpMethod": "POST", - "description": "Changes the URL map for TargetHttpsProxy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetHttpsProxy": { - "type": "string", - "description": "Name of the TargetHttpsProxy resource whose URL map is to be set.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetHttpsProxy" - ], - "request": { - "$ref": "UrlMapReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.targetHttpsProxies.testIamPermissions", - "path": "{project}/global/targetHttpsProxies/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "targetInstances": { - "methods": { - "aggregatedList": { - "id": "compute.targetInstances.aggregatedList", - "path": "{project}/aggregated/targetInstances", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of target instances.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "TargetInstanceAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.targetInstances.delete", - "path": "{project}/zones/{zone}/targetInstances/{targetInstance}", - "httpMethod": "DELETE", - "description": "Deletes the specified TargetInstance resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetInstance": { - "type": "string", - "description": "Name of the TargetInstance resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "targetInstance" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.targetInstances.get", - "path": "{project}/zones/{zone}/targetInstances/{targetInstance}", - "httpMethod": "GET", - "description": "Returns the specified TargetInstance resource. Get a list of available target instances by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "targetInstance": { - "type": "string", - "description": "Name of the TargetInstance resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "targetInstance" - ], - "response": { - "$ref": "TargetInstance" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.targetInstances.insert", - "path": "{project}/zones/{zone}/targetInstances", - "httpMethod": "POST", - "description": "Creates a TargetInstance resource in the specified project and zone using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "zone": { - "type": "string", - "description": "Name of the zone scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "request": { - "$ref": "TargetInstance" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.targetInstances.list", - "path": "{project}/zones/{zone}/targetInstances", - "httpMethod": "GET", - "description": "Retrieves a list of TargetInstance resources available to the specified project and zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "TargetInstanceList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.targetInstances.testIamPermissions", - "path": "{project}/zones/{zone}/targetInstances/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "targetPools": { - "methods": { - "addHealthCheck": { - "id": "compute.targetPools.addHealthCheck", - "path": "{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck", - "httpMethod": "POST", - "description": "Adds health check URLs to a target pool.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetPool": { - "type": "string", - "description": "Name of the target pool to add a health check to.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "request": { - "$ref": "TargetPoolsAddHealthCheckRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "addInstance": { - "id": "compute.targetPools.addInstance", - "path": "{project}/regions/{region}/targetPools/{targetPool}/addInstance", - "httpMethod": "POST", - "description": "Adds an instance to a target pool.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetPool": { - "type": "string", - "description": "Name of the TargetPool resource to add instances to.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "request": { - "$ref": "TargetPoolsAddInstanceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "id": "compute.targetPools.aggregatedList", - "path": "{project}/aggregated/targetPools", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of target pools.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "TargetPoolAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.targetPools.delete", - "path": "{project}/regions/{region}/targetPools/{targetPool}", - "httpMethod": "DELETE", - "description": "Deletes the specified target pool.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetPool": { - "type": "string", - "description": "Name of the TargetPool resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.targetPools.get", - "path": "{project}/regions/{region}/targetPools/{targetPool}", - "httpMethod": "GET", - "description": "Returns the specified target pool. Get a list of available target pools by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "targetPool": { - "type": "string", - "description": "Name of the TargetPool resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "response": { - "$ref": "TargetPool" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getHealth": { - "id": "compute.targetPools.getHealth", - "path": "{project}/regions/{region}/targetPools/{targetPool}/getHealth", - "httpMethod": "POST", - "description": "Gets the most recent health check results for each IP for the instance that is referenced by the given target pool.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "targetPool": { - "type": "string", - "description": "Name of the TargetPool resource to which the queried instance belongs.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "request": { - "$ref": "InstanceReference" - }, - "response": { - "$ref": "TargetPoolInstanceHealth" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.targetPools.insert", - "path": "{project}/regions/{region}/targetPools", - "httpMethod": "POST", - "description": "Creates a target pool in the specified project and region using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "TargetPool" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.targetPools.list", - "path": "{project}/regions/{region}/targetPools", - "httpMethod": "GET", - "description": "Retrieves a list of target pools available to the specified project and region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "TargetPoolList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "removeHealthCheck": { - "id": "compute.targetPools.removeHealthCheck", - "path": "{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck", - "httpMethod": "POST", - "description": "Removes health check URL from a target pool.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetPool": { - "type": "string", - "description": "Name of the target pool to remove health checks from.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "request": { - "$ref": "TargetPoolsRemoveHealthCheckRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removeInstance": { - "id": "compute.targetPools.removeInstance", - "path": "{project}/regions/{region}/targetPools/{targetPool}/removeInstance", - "httpMethod": "POST", - "description": "Removes instance URL from a target pool.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetPool": { - "type": "string", - "description": "Name of the TargetPool resource to remove instances from.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "request": { - "$ref": "TargetPoolsRemoveInstanceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setBackup": { - "id": "compute.targetPools.setBackup", - "path": "{project}/regions/{region}/targetPools/{targetPool}/setBackup", - "httpMethod": "POST", - "description": "Changes a backup target pool's configurations.", - "parameters": { - "failoverRatio": { - "type": "number", - "description": "New failoverRatio value for the target pool.", - "format": "float", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetPool": { - "type": "string", - "description": "Name of the TargetPool resource to set a backup pool for.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "request": { - "$ref": "TargetReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.targetPools.testIamPermissions", - "path": "{project}/regions/{region}/targetPools/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "targetSslProxies": { - "methods": { - "delete": { - "id": "compute.targetSslProxies.delete", - "path": "{project}/global/targetSslProxies/{targetSslProxy}", - "httpMethod": "DELETE", - "description": "Deletes the specified TargetSslProxy resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetSslProxy": { - "type": "string", - "description": "Name of the TargetSslProxy resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetSslProxy" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.targetSslProxies.get", - "path": "{project}/global/targetSslProxies/{targetSslProxy}", - "httpMethod": "GET", - "description": "Returns the specified TargetSslProxy resource. Get a list of available target SSL proxies by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "targetSslProxy": { - "type": "string", - "description": "Name of the TargetSslProxy resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetSslProxy" - ], - "response": { - "$ref": "TargetSslProxy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.targetSslProxies.insert", - "path": "{project}/global/targetSslProxies", - "httpMethod": "POST", - "description": "Creates a TargetSslProxy resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "TargetSslProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.targetSslProxies.list", - "path": "{project}/global/targetSslProxies", - "httpMethod": "GET", - "description": "Retrieves the list of TargetSslProxy resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "TargetSslProxyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setBackendService": { - "id": "compute.targetSslProxies.setBackendService", - "path": "{project}/global/targetSslProxies/{targetSslProxy}/setBackendService", - "httpMethod": "POST", - "description": "Changes the BackendService for TargetSslProxy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetSslProxy": { - "type": "string", - "description": "Name of the TargetSslProxy resource whose BackendService resource is to be set.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetSslProxy" - ], - "request": { - "$ref": "TargetSslProxiesSetBackendServiceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setProxyHeader": { - "id": "compute.targetSslProxies.setProxyHeader", - "path": "{project}/global/targetSslProxies/{targetSslProxy}/setProxyHeader", - "httpMethod": "POST", - "description": "Changes the ProxyHeaderType for TargetSslProxy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetSslProxy": { - "type": "string", - "description": "Name of the TargetSslProxy resource whose ProxyHeader is to be set.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetSslProxy" - ], - "request": { - "$ref": "TargetSslProxiesSetProxyHeaderRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setSslCertificates": { - "id": "compute.targetSslProxies.setSslCertificates", - "path": "{project}/global/targetSslProxies/{targetSslProxy}/setSslCertificates", - "httpMethod": "POST", - "description": "Changes SslCertificates for TargetSslProxy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetSslProxy": { - "type": "string", - "description": "Name of the TargetSslProxy resource whose SslCertificate resource is to be set.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetSslProxy" - ], - "request": { - "$ref": "TargetSslProxiesSetSslCertificatesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "id": "compute.targetSslProxies.testIamPermissions", - "path": "{project}/global/targetSslProxies/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "targetTcpProxies": { - "methods": { - "delete": { - "id": "compute.targetTcpProxies.delete", - "path": "{project}/global/targetTcpProxies/{targetTcpProxy}", - "httpMethod": "DELETE", - "description": "Deletes the specified TargetTcpProxy resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetTcpProxy": { - "type": "string", - "description": "Name of the TargetTcpProxy resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetTcpProxy" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.targetTcpProxies.get", - "path": "{project}/global/targetTcpProxies/{targetTcpProxy}", - "httpMethod": "GET", - "description": "Returns the specified TargetTcpProxy resource. Get a list of available target TCP proxies by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "targetTcpProxy": { - "type": "string", - "description": "Name of the TargetTcpProxy resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetTcpProxy" - ], - "response": { - "$ref": "TargetTcpProxy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.targetTcpProxies.insert", - "path": "{project}/global/targetTcpProxies", - "httpMethod": "POST", - "description": "Creates a TargetTcpProxy resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "TargetTcpProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.targetTcpProxies.list", - "path": "{project}/global/targetTcpProxies", - "httpMethod": "GET", - "description": "Retrieves the list of TargetTcpProxy resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "TargetTcpProxyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setBackendService": { - "id": "compute.targetTcpProxies.setBackendService", - "path": "{project}/global/targetTcpProxies/{targetTcpProxy}/setBackendService", - "httpMethod": "POST", - "description": "Changes the BackendService for TargetTcpProxy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetTcpProxy": { - "type": "string", - "description": "Name of the TargetTcpProxy resource whose BackendService resource is to be set.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetTcpProxy" - ], - "request": { - "$ref": "TargetTcpProxiesSetBackendServiceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setProxyHeader": { - "id": "compute.targetTcpProxies.setProxyHeader", - "path": "{project}/global/targetTcpProxies/{targetTcpProxy}/setProxyHeader", - "httpMethod": "POST", - "description": "Changes the ProxyHeaderType for TargetTcpProxy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetTcpProxy": { - "type": "string", - "description": "Name of the TargetTcpProxy resource whose ProxyHeader is to be set.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetTcpProxy" - ], - "request": { - "$ref": "TargetTcpProxiesSetProxyHeaderRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "targetVpnGateways": { - "methods": { - "aggregatedList": { - "id": "compute.targetVpnGateways.aggregatedList", - "path": "{project}/aggregated/targetVpnGateways", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of target VPN gateways.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "TargetVpnGatewayAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.targetVpnGateways.delete", - "path": "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}", - "httpMethod": "DELETE", - "description": "Deletes the specified target VPN gateway.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "targetVpnGateway": { - "type": "string", - "description": "Name of the target VPN gateway to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "targetVpnGateway" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.targetVpnGateways.get", - "path": "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}", - "httpMethod": "GET", - "description": "Returns the specified target VPN gateway. Get a list of available target VPN gateways by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "targetVpnGateway": { - "type": "string", - "description": "Name of the target VPN gateway to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "targetVpnGateway" - ], - "response": { - "$ref": "TargetVpnGateway" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.targetVpnGateways.insert", - "path": "{project}/regions/{region}/targetVpnGateways", - "httpMethod": "POST", - "description": "Creates a target VPN gateway in the specified project and region using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "TargetVpnGateway" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.targetVpnGateways.list", - "path": "{project}/regions/{region}/targetVpnGateways", - "httpMethod": "GET", - "description": "Retrieves a list of target VPN gateways available to the specified project and region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "TargetVpnGatewayList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.targetVpnGateways.testIamPermissions", - "path": "{project}/regions/{region}/targetVpnGateways/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "urlMaps": { - "methods": { - "delete": { - "id": "compute.urlMaps.delete", - "path": "{project}/global/urlMaps/{urlMap}", - "httpMethod": "DELETE", - "description": "Deletes the specified UrlMap resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "urlMap": { - "type": "string", - "description": "Name of the UrlMap resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "urlMap" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.urlMaps.get", - "path": "{project}/global/urlMaps/{urlMap}", - "httpMethod": "GET", - "description": "Returns the specified UrlMap resource. Get a list of available URL maps by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "urlMap": { - "type": "string", - "description": "Name of the UrlMap resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "urlMap" - ], - "response": { - "$ref": "UrlMap" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.urlMaps.insert", - "path": "{project}/global/urlMaps", - "httpMethod": "POST", - "description": "Creates a UrlMap resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "UrlMap" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "invalidateCache": { - "id": "compute.urlMaps.invalidateCache", - "path": "{project}/global/urlMaps/{urlMap}/invalidateCache", - "httpMethod": "POST", - "description": "Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "urlMap": { - "type": "string", - "description": "Name of the UrlMap scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "urlMap" - ], - "request": { - "$ref": "CacheInvalidationRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.urlMaps.list", - "path": "{project}/global/urlMaps", - "httpMethod": "GET", - "description": "Retrieves the list of UrlMap resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "UrlMapList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.urlMaps.patch", - "path": "{project}/global/urlMaps/{urlMap}", - "httpMethod": "PATCH", - "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "urlMap": { - "type": "string", - "description": "Name of the UrlMap resource to patch.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "urlMap" - ], - "request": { - "$ref": "UrlMap" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.urlMaps.testIamPermissions", - "path": "{project}/global/urlMaps/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.urlMaps.update", - "path": "{project}/global/urlMaps/{urlMap}", - "httpMethod": "PUT", - "description": "Updates the specified UrlMap resource with the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "urlMap": { - "type": "string", - "description": "Name of the UrlMap resource to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "urlMap" - ], - "request": { - "$ref": "UrlMap" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "validate": { - "id": "compute.urlMaps.validate", - "path": "{project}/global/urlMaps/{urlMap}/validate", - "httpMethod": "POST", - "description": "Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "urlMap": { - "type": "string", - "description": "Name of the UrlMap resource to be validated as.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "urlMap" - ], - "request": { - "$ref": "UrlMapsValidateRequest" - }, - "response": { - "$ref": "UrlMapsValidateResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "vpnTunnels": { - "methods": { - "aggregatedList": { - "id": "compute.vpnTunnels.aggregatedList", - "path": "{project}/aggregated/vpnTunnels", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of VPN tunnels.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "VpnTunnelAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.vpnTunnels.delete", - "path": "{project}/regions/{region}/vpnTunnels/{vpnTunnel}", - "httpMethod": "DELETE", - "description": "Deletes the specified VpnTunnel resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - }, - "vpnTunnel": { - "type": "string", - "description": "Name of the VpnTunnel resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "vpnTunnel" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.vpnTunnels.get", - "path": "{project}/regions/{region}/vpnTunnels/{vpnTunnel}", - "httpMethod": "GET", - "description": "Returns the specified VpnTunnel resource. Get a list of available VPN tunnels by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "vpnTunnel": { - "type": "string", - "description": "Name of the VpnTunnel resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "vpnTunnel" - ], - "response": { - "$ref": "VpnTunnel" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.vpnTunnels.insert", - "path": "{project}/regions/{region}/vpnTunnels", - "httpMethod": "POST", - "description": "Creates a VpnTunnel resource in the specified project and region using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "requestId": { - "type": "string", - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "VpnTunnel" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.vpnTunnels.list", - "path": "{project}/regions/{region}/vpnTunnels", - "httpMethod": "GET", - "description": "Retrieves a list of VpnTunnel resources contained in the specified project and region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "VpnTunnelList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "id": "compute.vpnTunnels.testIamPermissions", - "path": "{project}/regions/{region}/vpnTunnels/{resource}/testIamPermissions", - "httpMethod": "POST", - "description": "Returns permissions that a caller has on the specified resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "The name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "resource" - ], - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "zoneOperations": { - "methods": { - "delete": { - "id": "compute.zoneOperations.delete", - "path": "{project}/zones/{zone}/operations/{operation}", - "httpMethod": "DELETE", - "description": "Deletes the specified zone-specific Operations resource.", - "parameters": { - "operation": { - "type": "string", - "description": "Name of the Operations resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "operation" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.zoneOperations.get", - "path": "{project}/zones/{zone}/operations/{operation}", - "httpMethod": "GET", - "description": "Retrieves the specified zone-specific Operations resource.", - "parameters": { - "operation": { - "type": "string", - "description": "Name of the Operations resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "operation" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.zoneOperations.list", - "path": "{project}/zones/{zone}/operations", - "httpMethod": "GET", - "description": "Retrieves a list of Operation resources contained within the specified zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone for request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "OperationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "zones": { - "methods": { - "get": { - "id": "compute.zones.get", - "path": "{project}/zones/{zone}", - "httpMethod": "GET", - "description": "Returns the specified Zone resource. Get a list of available zones by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "Zone" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.zones.list", - "path": "{project}/zones", - "httpMethod": "GET", - "description": "Retrieves the list of Zone resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "ZoneList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - } - } -} diff --git a/vendor/google.golang.org/api/compute/v0.beta/compute-gen.go b/vendor/google.golang.org/api/compute/v0.beta/compute-gen.go deleted file mode 100644 index 2e9cc07ed..000000000 --- a/vendor/google.golang.org/api/compute/v0.beta/compute-gen.go +++ /dev/null @@ -1,78890 +0,0 @@ -// Package compute provides access to the Compute Engine API. -// -// See https://developers.google.com/compute/docs/reference/latest/ -// -// Usage example: -// -// import "google.golang.org/api/compute/v0.beta" -// ... -// computeService, err := compute.New(oauthHttpClient) -package compute - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" - "io" - "net/http" - "net/url" - "strconv" - "strings" -) - -// Always reference these packages, just in case the auto-generated code -// below doesn't. -var _ = bytes.NewBuffer -var _ = strconv.Itoa -var _ = fmt.Sprintf -var _ = json.NewDecoder -var _ = io.Copy -var _ = url.Parse -var _ = gensupport.MarshalJSON -var _ = googleapi.Version -var _ = errors.New -var _ = strings.Replace -var _ = context.Canceled -var _ = ctxhttp.Do - -const apiId = "compute:beta" -const apiName = "compute" -const apiVersion = "beta" -const basePath = "https://www.googleapis.com/compute/beta/projects/" - -// OAuth2 scopes used by this API. -const ( - // View and manage your data across Google Cloud Platform services - CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" - - // View and manage your Google Compute Engine resources - ComputeScope = "https://www.googleapis.com/auth/compute" - - // View your Google Compute Engine resources - ComputeReadonlyScope = "https://www.googleapis.com/auth/compute.readonly" - - // Manage your data and permissions in Google Cloud Storage - DevstorageFullControlScope = "https://www.googleapis.com/auth/devstorage.full_control" - - // View your data in Google Cloud Storage - DevstorageReadOnlyScope = "https://www.googleapis.com/auth/devstorage.read_only" - - // Manage your data in Google Cloud Storage - DevstorageReadWriteScope = "https://www.googleapis.com/auth/devstorage.read_write" -) - -func New(client *http.Client) (*Service, error) { - if client == nil { - return nil, errors.New("client is nil") - } - s := &Service{client: client, BasePath: basePath} - s.AcceleratorTypes = NewAcceleratorTypesService(s) - s.Addresses = NewAddressesService(s) - s.Autoscalers = NewAutoscalersService(s) - s.BackendBuckets = NewBackendBucketsService(s) - s.BackendServices = NewBackendServicesService(s) - s.DiskTypes = NewDiskTypesService(s) - s.Disks = NewDisksService(s) - s.Firewalls = NewFirewallsService(s) - s.ForwardingRules = NewForwardingRulesService(s) - s.GlobalAddresses = NewGlobalAddressesService(s) - s.GlobalForwardingRules = NewGlobalForwardingRulesService(s) - s.GlobalOperations = NewGlobalOperationsService(s) - s.HealthChecks = NewHealthChecksService(s) - s.HttpHealthChecks = NewHttpHealthChecksService(s) - s.HttpsHealthChecks = NewHttpsHealthChecksService(s) - s.Images = NewImagesService(s) - s.InstanceGroupManagers = NewInstanceGroupManagersService(s) - s.InstanceGroups = NewInstanceGroupsService(s) - s.InstanceTemplates = NewInstanceTemplatesService(s) - s.Instances = NewInstancesService(s) - s.Licenses = NewLicensesService(s) - s.MachineTypes = NewMachineTypesService(s) - s.Networks = NewNetworksService(s) - s.Projects = NewProjectsService(s) - s.RegionAutoscalers = NewRegionAutoscalersService(s) - s.RegionBackendServices = NewRegionBackendServicesService(s) - s.RegionCommitments = NewRegionCommitmentsService(s) - s.RegionInstanceGroupManagers = NewRegionInstanceGroupManagersService(s) - s.RegionInstanceGroups = NewRegionInstanceGroupsService(s) - s.RegionOperations = NewRegionOperationsService(s) - s.Regions = NewRegionsService(s) - s.Routers = NewRoutersService(s) - s.Routes = NewRoutesService(s) - s.Snapshots = NewSnapshotsService(s) - s.SslCertificates = NewSslCertificatesService(s) - s.Subnetworks = NewSubnetworksService(s) - s.TargetHttpProxies = NewTargetHttpProxiesService(s) - s.TargetHttpsProxies = NewTargetHttpsProxiesService(s) - s.TargetInstances = NewTargetInstancesService(s) - s.TargetPools = NewTargetPoolsService(s) - s.TargetSslProxies = NewTargetSslProxiesService(s) - s.TargetTcpProxies = NewTargetTcpProxiesService(s) - s.TargetVpnGateways = NewTargetVpnGatewaysService(s) - s.UrlMaps = NewUrlMapsService(s) - s.VpnTunnels = NewVpnTunnelsService(s) - s.ZoneOperations = NewZoneOperationsService(s) - s.Zones = NewZonesService(s) - return s, nil -} - -type Service struct { - client *http.Client - BasePath string // API endpoint base URL - UserAgent string // optional additional User-Agent fragment - - AcceleratorTypes *AcceleratorTypesService - - Addresses *AddressesService - - Autoscalers *AutoscalersService - - BackendBuckets *BackendBucketsService - - BackendServices *BackendServicesService - - DiskTypes *DiskTypesService - - Disks *DisksService - - Firewalls *FirewallsService - - ForwardingRules *ForwardingRulesService - - GlobalAddresses *GlobalAddressesService - - GlobalForwardingRules *GlobalForwardingRulesService - - GlobalOperations *GlobalOperationsService - - HealthChecks *HealthChecksService - - HttpHealthChecks *HttpHealthChecksService - - HttpsHealthChecks *HttpsHealthChecksService - - Images *ImagesService - - InstanceGroupManagers *InstanceGroupManagersService - - InstanceGroups *InstanceGroupsService - - InstanceTemplates *InstanceTemplatesService - - Instances *InstancesService - - Licenses *LicensesService - - MachineTypes *MachineTypesService - - Networks *NetworksService - - Projects *ProjectsService - - RegionAutoscalers *RegionAutoscalersService - - RegionBackendServices *RegionBackendServicesService - - RegionCommitments *RegionCommitmentsService - - RegionInstanceGroupManagers *RegionInstanceGroupManagersService - - RegionInstanceGroups *RegionInstanceGroupsService - - RegionOperations *RegionOperationsService - - Regions *RegionsService - - Routers *RoutersService - - Routes *RoutesService - - Snapshots *SnapshotsService - - SslCertificates *SslCertificatesService - - Subnetworks *SubnetworksService - - TargetHttpProxies *TargetHttpProxiesService - - TargetHttpsProxies *TargetHttpsProxiesService - - TargetInstances *TargetInstancesService - - TargetPools *TargetPoolsService - - TargetSslProxies *TargetSslProxiesService - - TargetTcpProxies *TargetTcpProxiesService - - TargetVpnGateways *TargetVpnGatewaysService - - UrlMaps *UrlMapsService - - VpnTunnels *VpnTunnelsService - - ZoneOperations *ZoneOperationsService - - Zones *ZonesService -} - -func (s *Service) userAgent() string { - if s.UserAgent == "" { - return googleapi.UserAgent - } - return googleapi.UserAgent + " " + s.UserAgent -} - -func NewAcceleratorTypesService(s *Service) *AcceleratorTypesService { - rs := &AcceleratorTypesService{s: s} - return rs -} - -type AcceleratorTypesService struct { - s *Service -} - -func NewAddressesService(s *Service) *AddressesService { - rs := &AddressesService{s: s} - return rs -} - -type AddressesService struct { - s *Service -} - -func NewAutoscalersService(s *Service) *AutoscalersService { - rs := &AutoscalersService{s: s} - return rs -} - -type AutoscalersService struct { - s *Service -} - -func NewBackendBucketsService(s *Service) *BackendBucketsService { - rs := &BackendBucketsService{s: s} - return rs -} - -type BackendBucketsService struct { - s *Service -} - -func NewBackendServicesService(s *Service) *BackendServicesService { - rs := &BackendServicesService{s: s} - return rs -} - -type BackendServicesService struct { - s *Service -} - -func NewDiskTypesService(s *Service) *DiskTypesService { - rs := &DiskTypesService{s: s} - return rs -} - -type DiskTypesService struct { - s *Service -} - -func NewDisksService(s *Service) *DisksService { - rs := &DisksService{s: s} - return rs -} - -type DisksService struct { - s *Service -} - -func NewFirewallsService(s *Service) *FirewallsService { - rs := &FirewallsService{s: s} - return rs -} - -type FirewallsService struct { - s *Service -} - -func NewForwardingRulesService(s *Service) *ForwardingRulesService { - rs := &ForwardingRulesService{s: s} - return rs -} - -type ForwardingRulesService struct { - s *Service -} - -func NewGlobalAddressesService(s *Service) *GlobalAddressesService { - rs := &GlobalAddressesService{s: s} - return rs -} - -type GlobalAddressesService struct { - s *Service -} - -func NewGlobalForwardingRulesService(s *Service) *GlobalForwardingRulesService { - rs := &GlobalForwardingRulesService{s: s} - return rs -} - -type GlobalForwardingRulesService struct { - s *Service -} - -func NewGlobalOperationsService(s *Service) *GlobalOperationsService { - rs := &GlobalOperationsService{s: s} - return rs -} - -type GlobalOperationsService struct { - s *Service -} - -func NewHealthChecksService(s *Service) *HealthChecksService { - rs := &HealthChecksService{s: s} - return rs -} - -type HealthChecksService struct { - s *Service -} - -func NewHttpHealthChecksService(s *Service) *HttpHealthChecksService { - rs := &HttpHealthChecksService{s: s} - return rs -} - -type HttpHealthChecksService struct { - s *Service -} - -func NewHttpsHealthChecksService(s *Service) *HttpsHealthChecksService { - rs := &HttpsHealthChecksService{s: s} - return rs -} - -type HttpsHealthChecksService struct { - s *Service -} - -func NewImagesService(s *Service) *ImagesService { - rs := &ImagesService{s: s} - return rs -} - -type ImagesService struct { - s *Service -} - -func NewInstanceGroupManagersService(s *Service) *InstanceGroupManagersService { - rs := &InstanceGroupManagersService{s: s} - return rs -} - -type InstanceGroupManagersService struct { - s *Service -} - -func NewInstanceGroupsService(s *Service) *InstanceGroupsService { - rs := &InstanceGroupsService{s: s} - return rs -} - -type InstanceGroupsService struct { - s *Service -} - -func NewInstanceTemplatesService(s *Service) *InstanceTemplatesService { - rs := &InstanceTemplatesService{s: s} - return rs -} - -type InstanceTemplatesService struct { - s *Service -} - -func NewInstancesService(s *Service) *InstancesService { - rs := &InstancesService{s: s} - return rs -} - -type InstancesService struct { - s *Service -} - -func NewLicensesService(s *Service) *LicensesService { - rs := &LicensesService{s: s} - return rs -} - -type LicensesService struct { - s *Service -} - -func NewMachineTypesService(s *Service) *MachineTypesService { - rs := &MachineTypesService{s: s} - return rs -} - -type MachineTypesService struct { - s *Service -} - -func NewNetworksService(s *Service) *NetworksService { - rs := &NetworksService{s: s} - return rs -} - -type NetworksService struct { - s *Service -} - -func NewProjectsService(s *Service) *ProjectsService { - rs := &ProjectsService{s: s} - return rs -} - -type ProjectsService struct { - s *Service -} - -func NewRegionAutoscalersService(s *Service) *RegionAutoscalersService { - rs := &RegionAutoscalersService{s: s} - return rs -} - -type RegionAutoscalersService struct { - s *Service -} - -func NewRegionBackendServicesService(s *Service) *RegionBackendServicesService { - rs := &RegionBackendServicesService{s: s} - return rs -} - -type RegionBackendServicesService struct { - s *Service -} - -func NewRegionCommitmentsService(s *Service) *RegionCommitmentsService { - rs := &RegionCommitmentsService{s: s} - return rs -} - -type RegionCommitmentsService struct { - s *Service -} - -func NewRegionInstanceGroupManagersService(s *Service) *RegionInstanceGroupManagersService { - rs := &RegionInstanceGroupManagersService{s: s} - return rs -} - -type RegionInstanceGroupManagersService struct { - s *Service -} - -func NewRegionInstanceGroupsService(s *Service) *RegionInstanceGroupsService { - rs := &RegionInstanceGroupsService{s: s} - return rs -} - -type RegionInstanceGroupsService struct { - s *Service -} - -func NewRegionOperationsService(s *Service) *RegionOperationsService { - rs := &RegionOperationsService{s: s} - return rs -} - -type RegionOperationsService struct { - s *Service -} - -func NewRegionsService(s *Service) *RegionsService { - rs := &RegionsService{s: s} - return rs -} - -type RegionsService struct { - s *Service -} - -func NewRoutersService(s *Service) *RoutersService { - rs := &RoutersService{s: s} - return rs -} - -type RoutersService struct { - s *Service -} - -func NewRoutesService(s *Service) *RoutesService { - rs := &RoutesService{s: s} - return rs -} - -type RoutesService struct { - s *Service -} - -func NewSnapshotsService(s *Service) *SnapshotsService { - rs := &SnapshotsService{s: s} - return rs -} - -type SnapshotsService struct { - s *Service -} - -func NewSslCertificatesService(s *Service) *SslCertificatesService { - rs := &SslCertificatesService{s: s} - return rs -} - -type SslCertificatesService struct { - s *Service -} - -func NewSubnetworksService(s *Service) *SubnetworksService { - rs := &SubnetworksService{s: s} - return rs -} - -type SubnetworksService struct { - s *Service -} - -func NewTargetHttpProxiesService(s *Service) *TargetHttpProxiesService { - rs := &TargetHttpProxiesService{s: s} - return rs -} - -type TargetHttpProxiesService struct { - s *Service -} - -func NewTargetHttpsProxiesService(s *Service) *TargetHttpsProxiesService { - rs := &TargetHttpsProxiesService{s: s} - return rs -} - -type TargetHttpsProxiesService struct { - s *Service -} - -func NewTargetInstancesService(s *Service) *TargetInstancesService { - rs := &TargetInstancesService{s: s} - return rs -} - -type TargetInstancesService struct { - s *Service -} - -func NewTargetPoolsService(s *Service) *TargetPoolsService { - rs := &TargetPoolsService{s: s} - return rs -} - -type TargetPoolsService struct { - s *Service -} - -func NewTargetSslProxiesService(s *Service) *TargetSslProxiesService { - rs := &TargetSslProxiesService{s: s} - return rs -} - -type TargetSslProxiesService struct { - s *Service -} - -func NewTargetTcpProxiesService(s *Service) *TargetTcpProxiesService { - rs := &TargetTcpProxiesService{s: s} - return rs -} - -type TargetTcpProxiesService struct { - s *Service -} - -func NewTargetVpnGatewaysService(s *Service) *TargetVpnGatewaysService { - rs := &TargetVpnGatewaysService{s: s} - return rs -} - -type TargetVpnGatewaysService struct { - s *Service -} - -func NewUrlMapsService(s *Service) *UrlMapsService { - rs := &UrlMapsService{s: s} - return rs -} - -type UrlMapsService struct { - s *Service -} - -func NewVpnTunnelsService(s *Service) *VpnTunnelsService { - rs := &VpnTunnelsService{s: s} - return rs -} - -type VpnTunnelsService struct { - s *Service -} - -func NewZoneOperationsService(s *Service) *ZoneOperationsService { - rs := &ZoneOperationsService{s: s} - return rs -} - -type ZoneOperationsService struct { - s *Service -} - -func NewZonesService(s *Service) *ZonesService { - rs := &ZonesService{s: s} - return rs -} - -type ZonesService struct { - s *Service -} - -// AcceleratorConfig: A specification of the type and number of -// accelerator cards attached to the instance. -type AcceleratorConfig struct { - // AcceleratorCount: The number of the guest accelerator cards exposed - // to this instance. - AcceleratorCount int64 `json:"acceleratorCount,omitempty"` - - // AcceleratorType: Full or partial URL of the accelerator type resource - // to expose to this instance. - AcceleratorType string `json:"acceleratorType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AcceleratorCount") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AcceleratorCount") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AcceleratorConfig) MarshalJSON() ([]byte, error) { - type noMethod AcceleratorConfig - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AcceleratorType: An Accelerator Type resource. -type AcceleratorType struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Deprecated: [Output Only] The deprecation status associated with this - // accelerator type. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - - // Description: [Output Only] An optional textual description of the - // resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] The type of the resource. Always - // compute#acceleratorType for accelerator types. - Kind string `json:"kind,omitempty"` - - // MaximumCardsPerInstance: [Output Only] Maximum accelerator cards - // allowed per instance. - MaximumCardsPerInstance int64 `json:"maximumCardsPerInstance,omitempty"` - - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - - // Zone: [Output Only] The name of the zone where the accelerator type - // resides, such as us-central1-a. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AcceleratorType) MarshalJSON() ([]byte, error) { - type noMethod AcceleratorType - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AcceleratorTypeAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of AcceleratorTypesScopedList resources. - Items map[string]AcceleratorTypesScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#acceleratorTypeAggregatedList for aggregated lists of - // accelerator types. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AcceleratorTypeAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod AcceleratorTypeAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AcceleratorTypeList: Contains a list of accelerator types. -type AcceleratorTypeList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of AcceleratorType resources. - Items []*AcceleratorType `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#acceleratorTypeList for lists of accelerator types. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AcceleratorTypeList) MarshalJSON() ([]byte, error) { - type noMethod AcceleratorTypeList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AcceleratorTypesScopedList struct { - // AcceleratorTypes: [Output Only] List of accelerator types contained - // in this scope. - AcceleratorTypes []*AcceleratorType `json:"acceleratorTypes,omitempty"` - - // Warning: [Output Only] An informational warning that appears when the - // accelerator types list is empty. - Warning *AcceleratorTypesScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AcceleratorTypes") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AcceleratorTypes") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AcceleratorTypesScopedList) MarshalJSON() ([]byte, error) { - type noMethod AcceleratorTypesScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AcceleratorTypesScopedListWarning: [Output Only] An informational -// warning that appears when the accelerator types list is empty. -type AcceleratorTypesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*AcceleratorTypesScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AcceleratorTypesScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod AcceleratorTypesScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AcceleratorTypesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AcceleratorTypesScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod AcceleratorTypesScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AccessConfig: An access configuration attached to an instance's -// network interface. Only one access config per instance is supported. -type AccessConfig struct { - // Kind: [Output Only] Type of the resource. Always compute#accessConfig - // for access configs. - Kind string `json:"kind,omitempty"` - - // Name: The name of this access configuration. The default and - // recommended name is External NAT but you can use any arbitrary string - // you would like. For example, My external IP or Network Access. - Name string `json:"name,omitempty"` - - // NatIP: An external IP address associated with this instance. Specify - // an unused static external IP address available to the project or - // leave this field undefined to use an IP from a shared ephemeral IP - // address pool. If you specify a static external IP address, it must - // live in the same region as the zone of the instance. - NatIP string `json:"natIP,omitempty"` - - // Type: The type of configuration. The default and only option is - // ONE_TO_ONE_NAT. - // - // Possible values: - // "ONE_TO_ONE_NAT" (default) - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Kind") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Kind") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AccessConfig) MarshalJSON() ([]byte, error) { - type noMethod AccessConfig - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Address: A reserved address resource. -type Address struct { - // Address: The static external IP address represented by this resource. - Address string `json:"address,omitempty"` - - // AddressType: The type of address to reserve. If unspecified, defaults - // to EXTERNAL. - // - // Possible values: - // "EXTERNAL" - // "INTERNAL" - // "UNSPECIFIED_TYPE" - AddressType string `json:"addressType,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // IpVersion: The IP Version that will be used by this address. Valid - // options are IPV4 or IPV6. This can only be specified for a global - // address. - // - // Possible values: - // "IPV4" - // "IPV6" - // "UNSPECIFIED_VERSION" - IpVersion string `json:"ipVersion,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#address for - // addresses. - Kind string `json:"kind,omitempty"` - - // LabelFingerprint: A fingerprint for the labels being applied to this - // Address, which is essentially a hash of the labels set used for - // optimistic locking. The fingerprint is initially generated by Compute - // Engine and changes after every request to modify or update labels. - // You must always provide an up-to-date fingerprint hash in order to - // update or change labels. - // - // To see the latest fingerprint, make a get() request to retrieve an - // Address. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // Labels: Labels to apply to this Address resource. These can be later - // modified by the setLabels method. Each label key/value must comply - // with RFC1035. Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Region: [Output Only] URL of the region where the regional address - // resides. This field is not applicable to global addresses. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Status: [Output Only] The status of the address, which can be either - // IN_USE or RESERVED. An address that is RESERVED is currently reserved - // and available to use. An IN_USE address is currently being used by - // another resource and is not available. - // - // Possible values: - // "IN_USE" - // "RESERVED" - Status string `json:"status,omitempty"` - - // Subnetwork: For external addresses, this field should not be - // used. - // - // The URL of the subnetwork in which to reserve the address. If an IP - // address is specified, it must be within the subnetwork's IP range. - Subnetwork string `json:"subnetwork,omitempty"` - - // Users: [Output Only] The URLs of the resources that are using this - // address. - Users []string `json:"users,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Address") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Address") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Address) MarshalJSON() ([]byte, error) { - type noMethod Address - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AddressAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of AddressesScopedList resources. - Items map[string]AddressesScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#addressAggregatedList for aggregated lists of addresses. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AddressAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod AddressAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AddressList: Contains a list of addresses. -type AddressList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Address resources. - Items []*Address `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#addressList for - // lists of addresses. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AddressList) MarshalJSON() ([]byte, error) { - type noMethod AddressList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AddressesScopedList struct { - // Addresses: [Output Only] List of addresses contained in this scope. - Addresses []*Address `json:"addresses,omitempty"` - - // Warning: [Output Only] Informational warning which replaces the list - // of addresses when the list is empty. - Warning *AddressesScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Addresses") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Addresses") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AddressesScopedList) MarshalJSON() ([]byte, error) { - type noMethod AddressesScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AddressesScopedListWarning: [Output Only] Informational warning which -// replaces the list of addresses when the list is empty. -type AddressesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*AddressesScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AddressesScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod AddressesScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AddressesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AddressesScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod AddressesScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AliasIpRange: An alias IP range attached to an instance's network -// interface. -type AliasIpRange struct { - // IpCidrRange: The IP CIDR range represented by this alias IP range. - // This IP CIDR range must belong to the specified subnetwork and cannot - // contain IP addresses reserved by system or used by other network - // interfaces. This range may be a single IP address (e.g. 10.2.3.4), a - // netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24). - IpCidrRange string `json:"ipCidrRange,omitempty"` - - // SubnetworkRangeName: Optional subnetwork secondary range name - // specifying the secondary range from which to allocate the IP CIDR - // range for this alias IP range. If left unspecified, the primary range - // of the subnetwork will be used. - SubnetworkRangeName string `json:"subnetworkRangeName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IpCidrRange") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IpCidrRange") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AliasIpRange) MarshalJSON() ([]byte, error) { - type noMethod AliasIpRange - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AttachedDisk: An instance-attached disk resource. -type AttachedDisk struct { - // AutoDelete: Specifies whether the disk will be auto-deleted when the - // instance is deleted (but not when the disk is detached from the - // instance). - AutoDelete bool `json:"autoDelete,omitempty"` - - // Boot: Indicates that this is a boot disk. The virtual machine will - // use the first partition of the disk for its root filesystem. - Boot bool `json:"boot,omitempty"` - - // DeviceName: Specifies a unique device name of your choice that is - // reflected into the /dev/disk/by-id/google-* tree of a Linux operating - // system running within the instance. This name can be used to - // reference the device for mounting, resizing, and so on, from within - // the instance. - // - // If not specified, the server chooses a default device name to apply - // to this disk, in the form persistent-disks-x, where x is a number - // assigned by Google Compute Engine. This field is only applicable for - // persistent disks. - DeviceName string `json:"deviceName,omitempty"` - - // DiskEncryptionKey: Encrypts or decrypts a disk using a - // customer-supplied encryption key. - // - // If you are creating a new disk, this field encrypts the new disk - // using an encryption key that you provide. If you are attaching an - // existing disk that is already encrypted, this field decrypts the disk - // using the customer-supplied encryption key. - // - // If you encrypt a disk using a customer-supplied key, you must provide - // the same key again when you attempt to use this resource at a later - // time. For example, you must provide the key when you create a - // snapshot or an image from the disk or when you attach the disk to a - // virtual machine instance. - // - // If you do not provide an encryption key, then the disk will be - // encrypted using an automatically generated key and you do not need to - // provide a key to use the disk later. - // - // Instance templates do not store customer-supplied encryption keys, so - // you cannot use your own keys to encrypt disks in a managed instance - // group. - DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"` - - // Index: Assigns a zero-based index to this disk, where 0 is reserved - // for the boot disk. For example, if you have many disks attached to an - // instance, each disk would have a unique index number. If not - // specified, the server will choose an appropriate value. - Index int64 `json:"index,omitempty"` - - // InitializeParams: [Input Only] Specifies the parameters for a new - // disk that will be created alongside the new instance. Use - // initialization parameters to create boot disks or local SSDs attached - // to the new instance. - // - // This property is mutually exclusive with the source property; you can - // only define one or the other, but not both. - InitializeParams *AttachedDiskInitializeParams `json:"initializeParams,omitempty"` - - // Interface: Specifies the disk interface to use for attaching this - // disk, which is either SCSI or NVME. The default is SCSI. Persistent - // disks must always use SCSI and the request will fail if you attempt - // to attach a persistent disk in any other format than SCSI. Local SSDs - // can use either NVME or SCSI. For performance characteristics of SCSI - // over NVMe, see Local SSD performance. - // - // Possible values: - // "NVME" - // "SCSI" - Interface string `json:"interface,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#attachedDisk - // for attached disks. - Kind string `json:"kind,omitempty"` - - // Licenses: [Output Only] Any valid publicly visible licenses. - Licenses []string `json:"licenses,omitempty"` - - // Mode: The mode in which to attach this disk, either READ_WRITE or - // READ_ONLY. If not specified, the default is to attach the disk in - // READ_WRITE mode. - // - // Possible values: - // "READ_ONLY" - // "READ_WRITE" - Mode string `json:"mode,omitempty"` - - // Source: Specifies a valid partial or full URL to an existing - // Persistent Disk resource. When creating a new instance, one of - // initializeParams.sourceImage or disks.source is required. - // - // If desired, you can also attach existing non-root persistent disks - // using this property. This field is only applicable for persistent - // disks. - // - // Note that for InstanceTemplate, specify the disk name, not the URL - // for the disk. - Source string `json:"source,omitempty"` - - // Type: Specifies the type of the disk, either SCRATCH or PERSISTENT. - // If not specified, the default is PERSISTENT. - // - // Possible values: - // "PERSISTENT" - // "SCRATCH" - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AutoDelete") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AutoDelete") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AttachedDisk) MarshalJSON() ([]byte, error) { - type noMethod AttachedDisk - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AttachedDiskInitializeParams: [Input Only] Specifies the parameters -// for a new disk that will be created alongside the new instance. Use -// initialization parameters to create boot disks or local SSDs attached -// to the new instance. -// -// This property is mutually exclusive with the source property; you can -// only define one or the other, but not both. -type AttachedDiskInitializeParams struct { - // DiskName: Specifies the disk name. If not specified, the default is - // to use the name of the instance. - DiskName string `json:"diskName,omitempty"` - - // DiskSizeGb: Specifies the size of the disk in base-2 GB. - DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - - // DiskStorageType: [Deprecated] Storage type of the disk. - // - // Possible values: - // "HDD" - // "SSD" - DiskStorageType string `json:"diskStorageType,omitempty"` - - // DiskType: Specifies the disk type to use to create the instance. If - // not specified, the default is pd-standard, specified using the full - // URL. For - // example: - // - // https://www.googleapis.com/compute/v1/projects/project/zones - // /zone/diskTypes/pd-standard - // - // Other values include pd-ssd and local-ssd. If you define this field, - // you can provide either the full or partial URL. For example, the - // following are valid values: - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType - // - projects/project/zones/zone/diskTypes/diskType - // - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this - // is the name of the disk type, not URL. - DiskType string `json:"diskType,omitempty"` - - // SourceImage: The source image to create this disk. When creating a - // new instance, one of initializeParams.sourceImage or disks.source is - // required. - // - // To create a disk with one of the public operating system images, - // specify the image by its family name. For example, specify - // family/debian-8 to use the latest Debian 8 - // image: - // - // projects/debian-cloud/global/images/family/debian-8 - // - // Alternatively, use a specific version of a public operating system - // image: - // - // projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD - // - // To create a disk with a private image that you created, specify the - // image name in the following format: - // - // global/images/my-private-image - // - // You can also specify a private image by its image family, which - // returns the latest version of the image in that family. Replace the - // image name with - // family/family-name: - // - // global/images/family/my-private-family - // - // If the source image is deleted later, this field will not be set. - SourceImage string `json:"sourceImage,omitempty"` - - // SourceImageEncryptionKey: The customer-supplied encryption key of the - // source image. Required if the source image is protected by a - // customer-supplied encryption key. - // - // Instance templates do not store customer-supplied encryption keys, so - // you cannot create disks for instances in a managed instance group if - // the source images are encrypted with your own keys. - SourceImageEncryptionKey *CustomerEncryptionKey `json:"sourceImageEncryptionKey,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DiskName") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DiskName") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AttachedDiskInitializeParams) MarshalJSON() ([]byte, error) { - type noMethod AttachedDiskInitializeParams - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AuditConfig: Specifies the audit configuration for a service. The -// configuration determines which permission types are logged, and what -// identities, if any, are exempted from logging. An AuditConfig must -// have one or more AuditLogConfigs. -// -// If there are AuditConfigs for both `allServices` and a specific -// service, the union of the two AuditConfigs is used for that service: -// the log_types specified in each AuditConfig are enabled, and the -// exempted_members in each AuditConfig are exempted. -// -// Example Policy with multiple AuditConfigs: -// -// { "audit_configs": [ { "service": "allServices" "audit_log_configs": -// [ { "log_type": "DATA_READ", "exempted_members": [ -// "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", }, { -// "log_type": "ADMIN_READ", } ] }, { "service": -// "fooservice.googleapis.com" "audit_log_configs": [ { "log_type": -// "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ -// "user:bar@gmail.com" ] } ] } ] } -// -// For fooservice, this policy enables DATA_READ, DATA_WRITE and -// ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ -// logging, and bar@gmail.com from DATA_WRITE logging. -type AuditConfig struct { - // AuditLogConfigs: The configuration for logging of each type of - // permission. - AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` - - ExemptedMembers []string `json:"exemptedMembers,omitempty"` - - // Service: Specifies a service that will be enabled for audit logging. - // For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - // `allServices` is a special value that covers all services. - Service string `json:"service,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AuditLogConfigs") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AuditConfig) MarshalJSON() ([]byte, error) { - type noMethod AuditConfig - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AuditLogConfig: Provides the configuration for logging a type of -// permissions. Example: -// -// { "audit_log_configs": [ { "log_type": "DATA_READ", -// "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": -// "DATA_WRITE", } ] } -// -// This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting -// foo@gmail.com from DATA_READ logging. -type AuditLogConfig struct { - // ExemptedMembers: Specifies the identities that do not cause logging - // for this type of permission. Follows the same format of - // [Binding.members][]. - ExemptedMembers []string `json:"exemptedMembers,omitempty"` - - // LogType: The log type that this config enables. - // - // Possible values: - // "ADMIN_READ" - // "DATA_READ" - // "DATA_WRITE" - // "LOG_TYPE_UNSPECIFIED" - LogType string `json:"logType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ExemptedMembers") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { - type noMethod AuditLogConfig - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AuthorizationLoggingOptions: Authorization-related information used -// by Cloud Audit Logging. -type AuthorizationLoggingOptions struct { - // PermissionType: The type of the permission that was checked. - // - // Possible values: - // "ADMIN_READ" - // "ADMIN_WRITE" - // "DATA_READ" - // "DATA_WRITE" - // "PERMISSION_TYPE_UNSPECIFIED" - PermissionType string `json:"permissionType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "PermissionType") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "PermissionType") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AuthorizationLoggingOptions) MarshalJSON() ([]byte, error) { - type noMethod AuthorizationLoggingOptions - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Autoscaler: Represents an Autoscaler resource. Autoscalers allow you -// to automatically scale virtual machine instances in managed instance -// groups according to an autoscaling policy that you define. For more -// information, read Autoscaling Groups of Instances. -type Autoscaler struct { - // AutoscalingPolicy: The configuration parameters for the autoscaling - // algorithm. You can define one or more of the policies for an - // autoscaler: cpuUtilization, customMetricUtilizations, and - // loadBalancingUtilization. - // - // If none of these are specified, the default will be to autoscale - // based on cpuUtilization to 0.6 or 60%. - AutoscalingPolicy *AutoscalingPolicy `json:"autoscalingPolicy,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#autoscaler - // for autoscalers. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Region: [Output Only] URL of the region where the instance group - // resides (for autoscalers living in regional scope). - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Status: [Output Only] The status of the autoscaler configuration. - // - // Possible values: - // "ACTIVE" - // "DELETING" - // "ERROR" - // "PENDING" - Status string `json:"status,omitempty"` - - // StatusDetails: [Output Only] Human-readable details about the current - // state of the autoscaler. Read the documentation for Commonly returned - // status messages for examples of status messages you might encounter. - StatusDetails []*AutoscalerStatusDetails `json:"statusDetails,omitempty"` - - // Target: URL of the managed instance group that this autoscaler will - // scale. - Target string `json:"target,omitempty"` - - // Zone: [Output Only] URL of the zone where the instance group resides - // (for autoscalers living in zonal scope). - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "AutoscalingPolicy") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AutoscalingPolicy") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Autoscaler) MarshalJSON() ([]byte, error) { - type noMethod Autoscaler - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AutoscalerAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of AutoscalersScopedList resources. - Items map[string]AutoscalersScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#autoscalerAggregatedList for aggregated lists of autoscalers. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalerAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod AutoscalerAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AutoscalerList: Contains a list of Autoscaler resources. -type AutoscalerList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Autoscaler resources. - Items []*Autoscaler `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#autoscalerList - // for lists of autoscalers. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalerList) MarshalJSON() ([]byte, error) { - type noMethod AutoscalerList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AutoscalerStatusDetails struct { - // Message: The status message. - Message string `json:"message,omitempty"` - - // Type: The type of error returned. - // - // Possible values: - // "ALL_INSTANCES_UNHEALTHY" - // "BACKEND_SERVICE_DOES_NOT_EXIST" - // "CAPPED_AT_MAX_NUM_REPLICAS" - // "CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE" - // "CUSTOM_METRIC_INVALID" - // "MIN_EQUALS_MAX" - // "MISSING_CUSTOM_METRIC_DATA_POINTS" - // "MISSING_LOAD_BALANCING_DATA_POINTS" - // "MORE_THAN_ONE_BACKEND_SERVICE" - // "NOT_ENOUGH_QUOTA_AVAILABLE" - // "REGION_RESOURCE_STOCKOUT" - // "SCALING_TARGET_DOES_NOT_EXIST" - // "UNKNOWN" - // "UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION" - // "ZONE_RESOURCE_STOCKOUT" - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Message") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Message") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalerStatusDetails) MarshalJSON() ([]byte, error) { - type noMethod AutoscalerStatusDetails - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AutoscalersScopedList struct { - // Autoscalers: [Output Only] List of autoscalers contained in this - // scope. - Autoscalers []*Autoscaler `json:"autoscalers,omitempty"` - - // Warning: [Output Only] Informational warning which replaces the list - // of autoscalers when the list is empty. - Warning *AutoscalersScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Autoscalers") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Autoscalers") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalersScopedList) MarshalJSON() ([]byte, error) { - type noMethod AutoscalersScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AutoscalersScopedListWarning: [Output Only] Informational warning -// which replaces the list of autoscalers when the list is empty. -type AutoscalersScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*AutoscalersScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalersScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod AutoscalersScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AutoscalersScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalersScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod AutoscalersScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AutoscalingPolicy: Cloud Autoscaler policy. -type AutoscalingPolicy struct { - // CoolDownPeriodSec: The number of seconds that the autoscaler should - // wait before it starts collecting information from a new instance. - // This prevents the autoscaler from collecting information when the - // instance is initializing, during which the collected usage would not - // be reliable. The default time autoscaler waits is 60 - // seconds. - // - // Virtual machine initialization times might vary because of numerous - // factors. We recommend that you test how long an instance may take to - // initialize. To do this, create an instance and time the startup - // process. - CoolDownPeriodSec int64 `json:"coolDownPeriodSec,omitempty"` - - // CpuUtilization: Defines the CPU utilization policy that allows the - // autoscaler to scale based on the average CPU utilization of a managed - // instance group. - CpuUtilization *AutoscalingPolicyCpuUtilization `json:"cpuUtilization,omitempty"` - - // CustomMetricUtilizations: Configuration parameters of autoscaling - // based on a custom metric. - CustomMetricUtilizations []*AutoscalingPolicyCustomMetricUtilization `json:"customMetricUtilizations,omitempty"` - - // LoadBalancingUtilization: Configuration parameters of autoscaling - // based on load balancer. - LoadBalancingUtilization *AutoscalingPolicyLoadBalancingUtilization `json:"loadBalancingUtilization,omitempty"` - - // MaxNumReplicas: The maximum number of instances that the autoscaler - // can scale up to. This is required when creating or updating an - // autoscaler. The maximum number of replicas should not be lower than - // minimal number of replicas. - MaxNumReplicas int64 `json:"maxNumReplicas,omitempty"` - - // MinNumReplicas: The minimum number of replicas that the autoscaler - // can scale down to. This cannot be less than 0. If not provided, - // autoscaler will choose a default value depending on maximum number of - // instances allowed. - MinNumReplicas int64 `json:"minNumReplicas,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CoolDownPeriodSec") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CoolDownPeriodSec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalingPolicy) MarshalJSON() ([]byte, error) { - type noMethod AutoscalingPolicy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AutoscalingPolicyCpuUtilization: CPU utilization policy. -type AutoscalingPolicyCpuUtilization struct { - // UtilizationTarget: The target CPU utilization that the autoscaler - // should maintain. Must be a float value in the range (0, 1]. If not - // specified, the default is 0.6. - // - // If the CPU level is below the target utilization, the autoscaler - // scales down the number of instances until it reaches the minimum - // number of instances you specified or until the average CPU of your - // instances reaches the target utilization. - // - // If the average CPU is above the target utilization, the autoscaler - // scales up until it reaches the maximum number of instances you - // specified or until the average utilization reaches the target - // utilization. - UtilizationTarget float64 `json:"utilizationTarget,omitempty"` - - // ForceSendFields is a list of field names (e.g. "UtilizationTarget") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "UtilizationTarget") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalingPolicyCpuUtilization) MarshalJSON() ([]byte, error) { - type noMethod AutoscalingPolicyCpuUtilization - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *AutoscalingPolicyCpuUtilization) UnmarshalJSON(data []byte) error { - type noMethod AutoscalingPolicyCpuUtilization - var s1 struct { - UtilizationTarget gensupport.JSONFloat64 `json:"utilizationTarget"` - *noMethod - } - s1.noMethod = (*noMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.UtilizationTarget = float64(s1.UtilizationTarget) - return nil -} - -// AutoscalingPolicyCustomMetricUtilization: Custom utilization metric -// policy. -type AutoscalingPolicyCustomMetricUtilization struct { - // Filter: A filter string, compatible with a Stackdriver Monitoring - // filter string for TimeSeries.list API call. This filter is used to - // select a specific TimeSeries for the purpose of autoscaling and to - // determine whether the metric is exporting per-instance or global - // data. - // - // For the filter to be valid for autoscaling purposes, the following - // rules apply: - // - You can only use the AND operator for joining selectors. - // - You can only use direct equality comparison operator (=) without - // any functions for each selector. - // - You can specify the metric in both the filter string and in the - // metric field. However, if specified in both places, the metric must - // be identical. - // - The monitored resource type determines what kind of values are - // expected for the metric. If it is a gce_instance, the autoscaler - // expects the metric to include a separate TimeSeries for each instance - // in a group. In such a case, you cannot filter on resource labels. - // If the resource type is any other value, the autoscaler expects this - // metric to contain values that apply to the entire autoscaled instance - // group and resource label filtering can be performed to point - // autoscaler at the correct TimeSeries to scale upon. This is / called - // a global metric for the purpose of autoscaling. - // - // If not specified, the type defaults to gce_instance. - // - // You should provide a filter that is selective enough to pick just one - // TimeSeries for the autoscaled group or for each of the instances (if - // you are using gce_instance resource type). If multiple TimeSeries are - // returned upon the query execution, the autoscaler will sum their - // respective values to obtain its scaling value. - Filter string `json:"filter,omitempty"` - - // Metric: The identifier (type) of the Stackdriver Monitoring metric. - // The metric cannot have negative values and should be a utilization - // metric, which means that the number of virtual machines handling - // requests should increase or decrease proportionally to the - // metric. - // - // The metric must have a value type of INT64 or DOUBLE. - Metric string `json:"metric,omitempty"` - - // SingleInstanceAssignment: If scaling is based on a global metric - // value that represents the total amount of work to be done or resource - // usage, set this value to an amount assigned for a single instance of - // the scaled group. Autoscaler will keep the number of instances - // proportional to the value of this metric, the metric itself should - // not change value due to group resizing. - // - // A good metric to use with the target is for example - // pubsub.googleapis.com/subscription/num_undelivered_messages or a - // custom metric exporting the total number of requests coming to your - // instances. - // - // A bad example would be a metric exporting an average or median - // latency, since this value can't include a chunk assignable to a - // single instance, it could be better used with utilization_target - // instead. - SingleInstanceAssignment float64 `json:"singleInstanceAssignment,omitempty"` - - // UtilizationTarget: The target value of the metric that autoscaler - // should maintain. This must be a positive value. - // - // For example, a good metric to use as a utilization_target is - // compute.googleapis.com/instance/network/received_bytes_count. The - // autoscaler will work to keep this value constant for each of the - // instances. - UtilizationTarget float64 `json:"utilizationTarget,omitempty"` - - // UtilizationTargetType: Defines how target utilization value is - // expressed for a Stackdriver Monitoring metric. Either GAUGE, - // DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not specified, the default - // is GAUGE. - // - // Possible values: - // "DELTA_PER_MINUTE" - // "DELTA_PER_SECOND" - // "GAUGE" - UtilizationTargetType string `json:"utilizationTargetType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Filter") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Filter") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalingPolicyCustomMetricUtilization) MarshalJSON() ([]byte, error) { - type noMethod AutoscalingPolicyCustomMetricUtilization - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *AutoscalingPolicyCustomMetricUtilization) UnmarshalJSON(data []byte) error { - type noMethod AutoscalingPolicyCustomMetricUtilization - var s1 struct { - SingleInstanceAssignment gensupport.JSONFloat64 `json:"singleInstanceAssignment"` - UtilizationTarget gensupport.JSONFloat64 `json:"utilizationTarget"` - *noMethod - } - s1.noMethod = (*noMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.SingleInstanceAssignment = float64(s1.SingleInstanceAssignment) - s.UtilizationTarget = float64(s1.UtilizationTarget) - return nil -} - -// AutoscalingPolicyLoadBalancingUtilization: Configuration parameters -// of autoscaling based on load balancing. -type AutoscalingPolicyLoadBalancingUtilization struct { - // UtilizationTarget: Fraction of backend capacity utilization (set in - // HTTP(s) load balancing configuration) that autoscaler should - // maintain. Must be a positive float value. If not defined, the default - // is 0.8. - UtilizationTarget float64 `json:"utilizationTarget,omitempty"` - - // ForceSendFields is a list of field names (e.g. "UtilizationTarget") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "UtilizationTarget") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalingPolicyLoadBalancingUtilization) MarshalJSON() ([]byte, error) { - type noMethod AutoscalingPolicyLoadBalancingUtilization - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *AutoscalingPolicyLoadBalancingUtilization) UnmarshalJSON(data []byte) error { - type noMethod AutoscalingPolicyLoadBalancingUtilization - var s1 struct { - UtilizationTarget gensupport.JSONFloat64 `json:"utilizationTarget"` - *noMethod - } - s1.noMethod = (*noMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.UtilizationTarget = float64(s1.UtilizationTarget) - return nil -} - -// Backend: Message containing information of one individual backend. -type Backend struct { - // BalancingMode: Specifies the balancing mode for this backend. For - // global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. - // Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for - // TCP/SSL). - // - // For Internal Load Balancing, the default and only supported mode is - // CONNECTION. - // - // Possible values: - // "CONNECTION" - // "RATE" - // "UTILIZATION" - BalancingMode string `json:"balancingMode,omitempty"` - - // CapacityScaler: A multiplier applied to the group's maximum servicing - // capacity (based on UTILIZATION, RATE or CONNECTION). Default value is - // 1, which means the group will serve up to 100% of its configured - // capacity (depending on balancingMode). A setting of 0 means the group - // is completely drained, offering 0% of its available Capacity. Valid - // range is [0.0,1.0]. - // - // This cannot be used for internal load balancing. - CapacityScaler float64 `json:"capacityScaler,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Group: The fully-qualified URL of a Instance Group resource. This - // instance group defines the list of instances that serve traffic. - // Member virtual machine instances from each instance group must live - // in the same zone as the instance group itself. No two backends in a - // backend service are allowed to use same Instance Group - // resource. - // - // Note that you must specify an Instance Group resource using the - // fully-qualified URL, rather than a partial URL. - // - // When the BackendService has load balancing scheme INTERNAL, the - // instance group must be within the same region as the BackendService. - Group string `json:"group,omitempty"` - - // MaxConnections: The max number of simultaneous connections for the - // group. Can be used with either CONNECTION or UTILIZATION balancing - // modes. For CONNECTION mode, either maxConnections or - // maxConnectionsPerInstance must be set. - // - // This cannot be used for internal load balancing. - MaxConnections int64 `json:"maxConnections,omitempty"` - - // MaxConnectionsPerInstance: The max number of simultaneous connections - // that a single backend instance can handle. This is used to calculate - // the capacity of the group. Can be used in either CONNECTION or - // UTILIZATION balancing modes. For CONNECTION mode, either - // maxConnections or maxConnectionsPerInstance must be set. - // - // This cannot be used for internal load balancing. - MaxConnectionsPerInstance int64 `json:"maxConnectionsPerInstance,omitempty"` - - // MaxRate: The max requests per second (RPS) of the group. Can be used - // with either RATE or UTILIZATION balancing modes, but required if RATE - // mode. For RATE mode, either maxRate or maxRatePerInstance must be - // set. - // - // This cannot be used for internal load balancing. - MaxRate int64 `json:"maxRate,omitempty"` - - // MaxRatePerInstance: The max requests per second (RPS) that a single - // backend instance can handle. This is used to calculate the capacity - // of the group. Can be used in either balancing mode. For RATE mode, - // either maxRate or maxRatePerInstance must be set. - // - // This cannot be used for internal load balancing. - MaxRatePerInstance float64 `json:"maxRatePerInstance,omitempty"` - - // MaxUtilization: Used when balancingMode is UTILIZATION. This ratio - // defines the CPU utilization target for the group. The default is 0.8. - // Valid range is [0.0, 1.0]. - // - // This cannot be used for internal load balancing. - MaxUtilization float64 `json:"maxUtilization,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BalancingMode") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BalancingMode") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Backend) MarshalJSON() ([]byte, error) { - type noMethod Backend - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *Backend) UnmarshalJSON(data []byte) error { - type noMethod Backend - var s1 struct { - CapacityScaler gensupport.JSONFloat64 `json:"capacityScaler"` - MaxRatePerInstance gensupport.JSONFloat64 `json:"maxRatePerInstance"` - MaxUtilization gensupport.JSONFloat64 `json:"maxUtilization"` - *noMethod - } - s1.noMethod = (*noMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.CapacityScaler = float64(s1.CapacityScaler) - s.MaxRatePerInstance = float64(s1.MaxRatePerInstance) - s.MaxUtilization = float64(s1.MaxUtilization) - return nil -} - -// BackendBucket: A BackendBucket resource. This resource defines a -// Cloud Storage bucket. -type BackendBucket struct { - // BucketName: Cloud Storage bucket name. - BucketName string `json:"bucketName,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional textual description of the resource; - // provided by the client when the resource is created. - Description string `json:"description,omitempty"` - - // EnableCdn: If true, enable Cloud CDN for this BackendBucket. - EnableCdn bool `json:"enableCdn,omitempty"` - - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: Type of the resource. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "BucketName") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BucketName") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *BackendBucket) MarshalJSON() ([]byte, error) { - type noMethod BackendBucket - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// BackendBucketList: Contains a list of BackendBucket resources. -type BackendBucketList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of BackendBucket resources. - Items []*BackendBucket `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *BackendBucketList) MarshalJSON() ([]byte, error) { - type noMethod BackendBucketList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// BackendService: A BackendService resource. This resource defines a -// group of backend virtual machines and their serving capacity. -type BackendService struct { - // AffinityCookieTtlSec: Lifetime of cookies in seconds if - // session_affinity is GENERATED_COOKIE. If set to 0, the cookie is - // non-persistent and lasts only until the end of the browser session - // (or equivalent). The maximum allowed value for TTL is one day. - // - // When the load balancing scheme is INTERNAL, this field is not used. - AffinityCookieTtlSec int64 `json:"affinityCookieTtlSec,omitempty"` - - // Backends: The list of backends that serve this BackendService. - Backends []*Backend `json:"backends,omitempty"` - - // CdnPolicy: Cloud CDN configuration for this BackendService. - CdnPolicy *BackendServiceCdnPolicy `json:"cdnPolicy,omitempty"` - - ConnectionDraining *ConnectionDraining `json:"connectionDraining,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // EnableCDN: If true, enable Cloud CDN for this BackendService. - // - // When the load balancing scheme is INTERNAL, this field is not used. - EnableCDN bool `json:"enableCDN,omitempty"` - - // Fingerprint: Fingerprint of this resource. A hash of the contents - // stored in this object. This field is used in optimistic locking. This - // field will be ignored when inserting a BackendService. An up-to-date - // fingerprint must be provided in order to update the BackendService. - Fingerprint string `json:"fingerprint,omitempty"` - - // HealthChecks: The list of URLs to the HttpHealthCheck or - // HttpsHealthCheck resource for health checking this BackendService. - // Currently at most one health check can be specified, and a health - // check is required for GCE backend services. A health check must not - // be specified for GAE app backend and Cloud Function backend. - // - // For internal load balancing, a URL to a HealthCheck resource must be - // specified instead. - HealthChecks []string `json:"healthChecks,omitempty"` - - Iap *BackendServiceIAP `json:"iap,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of resource. Always compute#backendService - // for backend services. - Kind string `json:"kind,omitempty"` - - // Possible values: - // "EXTERNAL" - // "INTERNAL" - // "INVALID_LOAD_BALANCING_SCHEME" - LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Port: Deprecated in favor of portName. The TCP port to connect on the - // backend. The default value is 80. - // - // This cannot be used for internal load balancing. - Port int64 `json:"port,omitempty"` - - // PortName: Name of backend port. The same name should appear in the - // instance groups referenced by this service. Required when the load - // balancing scheme is EXTERNAL. - // - // When the load balancing scheme is INTERNAL, this field is not used. - PortName string `json:"portName,omitempty"` - - // Protocol: The protocol this BackendService uses to communicate with - // backends. - // - // Possible values are HTTP, HTTPS, TCP, and SSL. The default is - // HTTP. - // - // For internal load balancing, the possible values are TCP and UDP, and - // the default is TCP. - // - // Possible values: - // "HTTP" - // "HTTPS" - // "SSL" - // "TCP" - // "UDP" - Protocol string `json:"protocol,omitempty"` - - // Region: [Output Only] URL of the region where the regional backend - // service resides. This field is not applicable to global backend - // services. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // SessionAffinity: Type of session affinity to use. The default is - // NONE. - // - // When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, - // or GENERATED_COOKIE. - // - // When the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, - // CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO. - // - // When the protocol is UDP, this field is not used. - // - // Possible values: - // "CLIENT_IP" - // "CLIENT_IP_PORT_PROTO" - // "CLIENT_IP_PROTO" - // "GENERATED_COOKIE" - // "NONE" - SessionAffinity string `json:"sessionAffinity,omitempty"` - - // TimeoutSec: How many seconds to wait for the backend before - // considering it a failed request. Default is 30 seconds. - TimeoutSec int64 `json:"timeoutSec,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. - // "AffinityCookieTtlSec") to unconditionally include in API requests. - // By default, fields with empty values are omitted from API requests. - // However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AffinityCookieTtlSec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *BackendService) MarshalJSON() ([]byte, error) { - type noMethod BackendService - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// BackendServiceAggregatedList: Contains a list of -// BackendServicesScopedList. -type BackendServiceAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of BackendServicesScopedList resources. - Items map[string]BackendServicesScopedList `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *BackendServiceAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod BackendServiceAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// BackendServiceCdnPolicy: Message containing Cloud CDN configuration -// for a backend service. -type BackendServiceCdnPolicy struct { - // CacheKeyPolicy: The CacheKeyPolicy for this CdnPolicy. - CacheKeyPolicy *CacheKeyPolicy `json:"cacheKeyPolicy,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CacheKeyPolicy") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CacheKeyPolicy") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *BackendServiceCdnPolicy) MarshalJSON() ([]byte, error) { - type noMethod BackendServiceCdnPolicy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type BackendServiceGroupHealth struct { - HealthStatus []*HealthStatus `json:"healthStatus,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#backendServiceGroupHealth for the health of backend services. - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "HealthStatus") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "HealthStatus") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *BackendServiceGroupHealth) MarshalJSON() ([]byte, error) { - type noMethod BackendServiceGroupHealth - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// BackendServiceIAP: Identity-Aware Proxy -type BackendServiceIAP struct { - Enabled bool `json:"enabled,omitempty"` - - Oauth2ClientId string `json:"oauth2ClientId,omitempty"` - - Oauth2ClientSecret string `json:"oauth2ClientSecret,omitempty"` - - // Oauth2ClientSecretSha256: [Output Only] SHA256 hash value for the - // field oauth2_client_secret above. - Oauth2ClientSecretSha256 string `json:"oauth2ClientSecretSha256,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Enabled") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Enabled") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *BackendServiceIAP) MarshalJSON() ([]byte, error) { - type noMethod BackendServiceIAP - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// BackendServiceList: Contains a list of BackendService resources. -type BackendServiceList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of BackendService resources. - Items []*BackendService `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#backendServiceList for lists of backend services. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *BackendServiceList) MarshalJSON() ([]byte, error) { - type noMethod BackendServiceList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type BackendServicesScopedList struct { - // BackendServices: List of BackendServices contained in this scope. - BackendServices []*BackendService `json:"backendServices,omitempty"` - - // Warning: Informational warning which replaces the list of backend - // services when the list is empty. - Warning *BackendServicesScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BackendServices") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BackendServices") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *BackendServicesScopedList) MarshalJSON() ([]byte, error) { - type noMethod BackendServicesScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// BackendServicesScopedListWarning: Informational warning which -// replaces the list of backend services when the list is empty. -type BackendServicesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*BackendServicesScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *BackendServicesScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod BackendServicesScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type BackendServicesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *BackendServicesScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod BackendServicesScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Binding: Associates `members` with a `role`. -type Binding struct { - // Condition: The condition that is associated with this binding. NOTE: - // an unsatisfied condition will not allow user access via current - // binding. Different bindings, including their conditions, are examined - // independently. This field is GOOGLE_INTERNAL. - Condition *Expr `json:"condition,omitempty"` - - // Members: Specifies the identities requesting access for a Cloud - // Platform resource. `members` can have the following values: - // - // * `allUsers`: A special identifier that represents anyone who is on - // the internet; with or without a Google account. - // - // * `allAuthenticatedUsers`: A special identifier that represents - // anyone who is authenticated with a Google account or a service - // account. - // - // * `user:{emailid}`: An email address that represents a specific - // Google account. For example, `alice@gmail.com` or - // `joe@example.com`. - // - // - // - // * `serviceAccount:{emailid}`: An email address that represents a - // service account. For example, - // `my-other-app@appspot.gserviceaccount.com`. - // - // * `group:{emailid}`: An email address that represents a Google group. - // For example, `admins@example.com`. - // - // - // - // * `domain:{domain}`: A Google Apps domain name that represents all - // the users of that domain. For example, `google.com` or `example.com`. - Members []string `json:"members,omitempty"` - - // Role: Role that is assigned to `members`. For example, - // `roles/viewer`, `roles/editor`, or `roles/owner`. - Role string `json:"role,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Condition") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Condition") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Binding) MarshalJSON() ([]byte, error) { - type noMethod Binding - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type CacheInvalidationRule struct { - // Host: If set, this invalidation rule will only apply to requests with - // a Host header matching host. - Host string `json:"host,omitempty"` - - Path string `json:"path,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Host") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Host") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CacheInvalidationRule) MarshalJSON() ([]byte, error) { - type noMethod CacheInvalidationRule - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CacheKeyPolicy: Message containing what to include in the cache key -// for a request for Cloud CDN. -type CacheKeyPolicy struct { - // IncludeHost: If true, requests to different hosts will be cached - // separately. - IncludeHost bool `json:"includeHost,omitempty"` - - // IncludeProtocol: If true, http and https requests will be cached - // separately. - IncludeProtocol bool `json:"includeProtocol,omitempty"` - - // IncludeQueryString: If true, include query string parameters in the - // cache key according to query_string_whitelist and - // query_string_blacklist. If neither is set, the entire query string - // will be included. If false, the query string will be excluded from - // the cache key entirely. - IncludeQueryString bool `json:"includeQueryString,omitempty"` - - // QueryStringBlacklist: Names of query string parameters to exclude in - // cache keys. All other parameters will be included. Either specify - // query_string_whitelist or query_string_blacklist, not both. '&' and - // '=' will be percent encoded and not treated as delimiters. - QueryStringBlacklist []string `json:"queryStringBlacklist,omitempty"` - - // QueryStringWhitelist: Names of query string parameters to include in - // cache keys. All other parameters will be excluded. Either specify - // query_string_whitelist or query_string_blacklist, not both. '&' and - // '=' will be percent encoded and not treated as delimiters. - QueryStringWhitelist []string `json:"queryStringWhitelist,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IncludeHost") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IncludeHost") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CacheKeyPolicy) MarshalJSON() ([]byte, error) { - type noMethod CacheKeyPolicy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Commitment: Represents a Commitment resource. Creating a Commitment -// resource means that you are purchasing a committed use contract with -// an explicit start and end time. You can create commitments based on -// vCPUs and memory usage and receive discounted rates. For full -// details, read Signing Up for Committed Use Discounts. -// -// Committed use discounts are subject to Google Cloud Platform's -// Service Specific Terms. By purchasing a committed use discount, you -// agree to these terms. Committed use discounts will not renew, so you -// must purchase a new commitment to continue receiving discounts. -type Commitment struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // EndTimestamp: [Output Only] Commitment end time in RFC3339 text - // format. - EndTimestamp string `json:"endTimestamp,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#commitment - // for commitments. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Plan: The plan for this commitment, which determines duration and - // discount rate. The currently supported plans are TWELVE_MONTH (1 - // year), and THIRTY_SIX_MONTH (3 years). - // - // Possible values: - // "INVALID" - // "THIRTY_SIX_MONTH" - // "TWELVE_MONTH" - Plan string `json:"plan,omitempty"` - - // Region: [Output Only] URL of the region where this commitment may be - // used. - Region string `json:"region,omitempty"` - - // Resources: List of commitment amounts for particular resources. Note - // that VCPU and MEMORY resource commitments must occur together. - Resources []*ResourceCommitment `json:"resources,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // StartTimestamp: [Output Only] Commitment start time in RFC3339 text - // format. - StartTimestamp string `json:"startTimestamp,omitempty"` - - // Status: [Output Only] Status of the commitment with regards to - // eventual expiration (each commitment has an end date defined). One of - // the following values: NOT_YET_ACTIVE, ACTIVE, EXPIRED. - // - // Possible values: - // "ACTIVE" - // "CREATING" - // "EXPIRED" - // "NOT_YET_ACTIVE" - Status string `json:"status,omitempty"` - - // StatusMessage: [Output Only] An optional, human-readable explanation - // of the status. - StatusMessage string `json:"statusMessage,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Commitment) MarshalJSON() ([]byte, error) { - type noMethod Commitment - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type CommitmentAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of CommitmentsScopedList resources. - Items map[string]CommitmentsScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#commitmentAggregatedList for aggregated lists of commitments. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CommitmentAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod CommitmentAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CommitmentList: Contains a list of Commitment resources. -type CommitmentList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Commitment resources. - Items []*Commitment `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#commitmentList - // for lists of commitments. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CommitmentList) MarshalJSON() ([]byte, error) { - type noMethod CommitmentList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type CommitmentsScopedList struct { - // Commitments: [Output Only] List of commitments contained in this - // scope. - Commitments []*Commitment `json:"commitments,omitempty"` - - // Warning: [Output Only] Informational warning which replaces the list - // of commitments when the list is empty. - Warning *CommitmentsScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Commitments") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Commitments") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CommitmentsScopedList) MarshalJSON() ([]byte, error) { - type noMethod CommitmentsScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CommitmentsScopedListWarning: [Output Only] Informational warning -// which replaces the list of commitments when the list is empty. -type CommitmentsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*CommitmentsScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CommitmentsScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod CommitmentsScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type CommitmentsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CommitmentsScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod CommitmentsScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Condition: A condition to be met. -type Condition struct { - // Iam: Trusted attributes supplied by the IAM system. - // - // Possible values: - // "APPROVER" - // "ATTRIBUTION" - // "AUTHORITY" - // "JUSTIFICATION_TYPE" - // "NO_ATTR" - // "SECURITY_REALM" - Iam string `json:"iam,omitempty"` - - // Op: An operator to apply the subject with. - // - // Possible values: - // "DISCHARGED" - // "EQUALS" - // "IN" - // "NOT_EQUALS" - // "NOT_IN" - // "NO_OP" - Op string `json:"op,omitempty"` - - // Svc: Trusted attributes discharged by the service. - Svc string `json:"svc,omitempty"` - - // Sys: Trusted attributes supplied by any service that owns resources - // and uses the IAM system for access control. - // - // Possible values: - // "IP" - // "NAME" - // "NO_ATTR" - // "REGION" - // "SERVICE" - Sys string `json:"sys,omitempty"` - - // Value: DEPRECATED. Use 'values' instead. - Value string `json:"value,omitempty"` - - // Values: The objects of the condition. This is mutually exclusive with - // 'value'. - Values []string `json:"values,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Iam") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Iam") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Condition) MarshalJSON() ([]byte, error) { - type noMethod Condition - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ConnectionDraining: Message containing connection draining -// configuration. -type ConnectionDraining struct { - // DrainingTimeoutSec: Time for which instance will be drained (not - // accept new connections, but still work to finish started). - DrainingTimeoutSec int64 `json:"drainingTimeoutSec,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DrainingTimeoutSec") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DrainingTimeoutSec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ConnectionDraining) MarshalJSON() ([]byte, error) { - type noMethod ConnectionDraining - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CustomerEncryptionKey: Represents a customer-supplied encryption key -type CustomerEncryptionKey struct { - // RawKey: Specifies a 256-bit customer-supplied encryption key, encoded - // in RFC 4648 base64 to either encrypt or decrypt this resource. - RawKey string `json:"rawKey,omitempty"` - - // RsaEncryptedKey: Specifies an RFC 4648 base64 encoded, RSA-wrapped - // 2048-bit customer-supplied encryption key to either encrypt or - // decrypt this resource. - // - // The key must meet the following requirements before you can provide - // it to Compute Engine: - // - The key is wrapped using a RSA public key certificate provided by - // Google. - // - After being wrapped, the key must be encoded in RFC 4648 base64 - // encoding. Get the RSA public key certificate provided by Google - // at: - // https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingre - // ss.pem - RsaEncryptedKey string `json:"rsaEncryptedKey,omitempty"` - - // Sha256: [Output only] The RFC 4648 base64 encoded SHA-256 hash of the - // customer-supplied encryption key that protects this resource. - Sha256 string `json:"sha256,omitempty"` - - // ForceSendFields is a list of field names (e.g. "RawKey") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "RawKey") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CustomerEncryptionKey) MarshalJSON() ([]byte, error) { - type noMethod CustomerEncryptionKey - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type CustomerEncryptionKeyProtectedDisk struct { - // DiskEncryptionKey: Decrypts data associated with the disk with a - // customer-supplied encryption key. - DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"` - - // Source: Specifies a valid partial or full URL to an existing - // Persistent Disk resource. This field is only applicable for - // persistent disks. - Source string `json:"source,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DiskEncryptionKey") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DiskEncryptionKey") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *CustomerEncryptionKeyProtectedDisk) MarshalJSON() ([]byte, error) { - type noMethod CustomerEncryptionKeyProtectedDisk - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DeprecationStatus: Deprecation status for a public resource. -type DeprecationStatus struct { - // Deleted: An optional RFC3339 timestamp on or after which the state of - // this resource is intended to change to DELETED. This is only - // informational and the status will not change unless the client - // explicitly changes it. - Deleted string `json:"deleted,omitempty"` - - // Deprecated: An optional RFC3339 timestamp on or after which the state - // of this resource is intended to change to DEPRECATED. This is only - // informational and the status will not change unless the client - // explicitly changes it. - Deprecated string `json:"deprecated,omitempty"` - - // Obsolete: An optional RFC3339 timestamp on or after which the state - // of this resource is intended to change to OBSOLETE. This is only - // informational and the status will not change unless the client - // explicitly changes it. - Obsolete string `json:"obsolete,omitempty"` - - // Replacement: The URL of the suggested replacement for a deprecated - // resource. The suggested replacement resource must be the same kind of - // resource as the deprecated resource. - Replacement string `json:"replacement,omitempty"` - - // State: The deprecation state of this resource. This can be - // DEPRECATED, OBSOLETE, or DELETED. Operations which create a new - // resource using a DEPRECATED resource will return successfully, but - // with a warning indicating the deprecated resource and recommending - // its replacement. Operations which use OBSOLETE or DELETED resources - // will be rejected and result in an error. - // - // Possible values: - // "DELETED" - // "DEPRECATED" - // "OBSOLETE" - State string `json:"state,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Deleted") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Deleted") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DeprecationStatus) MarshalJSON() ([]byte, error) { - type noMethod DeprecationStatus - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Disk: A Disk resource. -type Disk struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // DiskEncryptionKey: Encrypts the disk using a customer-supplied - // encryption key. - // - // After you encrypt a disk with a customer-supplied key, you must - // provide the same key if you use the disk later (e.g. to create a disk - // snapshot or an image, or to attach the disk to a virtual - // machine). - // - // Customer-supplied encryption keys do not protect access to metadata - // of the disk. - // - // If you do not provide an encryption key when creating the disk, then - // the disk will be encrypted using an automatically generated key and - // you do not need to provide a key to use the disk later. - DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#disk for - // disks. - Kind string `json:"kind,omitempty"` - - // LabelFingerprint: A fingerprint for the labels being applied to this - // disk, which is essentially a hash of the labels set used for - // optimistic locking. The fingerprint is initially generated by Compute - // Engine and changes after every request to modify or update labels. - // You must always provide an up-to-date fingerprint hash in order to - // update or change labels. - // - // To see the latest fingerprint, make a get() request to retrieve a - // disk. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // Labels: Labels to apply to this disk. These can be later modified by - // the setLabels method. - Labels map[string]string `json:"labels,omitempty"` - - // LastAttachTimestamp: [Output Only] Last attach timestamp in RFC3339 - // text format. - LastAttachTimestamp string `json:"lastAttachTimestamp,omitempty"` - - // LastDetachTimestamp: [Output Only] Last detach timestamp in RFC3339 - // text format. - LastDetachTimestamp string `json:"lastDetachTimestamp,omitempty"` - - // Licenses: Any applicable publicly visible licenses. - Licenses []string `json:"licenses,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Options: Internal use only. - Options string `json:"options,omitempty"` - - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - - // SizeGb: Size of the persistent disk, specified in GB. You can specify - // this field when creating a persistent disk using the sourceImage or - // sourceSnapshot parameter, or specify it alone to create an empty - // persistent disk. - // - // If you specify this field along with sourceImage or sourceSnapshot, - // the value of sizeGb must not be less than the size of the sourceImage - // or the size of the snapshot. Acceptable values are 1 to 65536, - // inclusive. - SizeGb int64 `json:"sizeGb,omitempty,string"` - - // SourceImage: The source image used to create this disk. If the source - // image is deleted, this field will not be set. - // - // To create a disk with one of the public operating system images, - // specify the image by its family name. For example, specify - // family/debian-8 to use the latest Debian 8 - // image: - // - // projects/debian-cloud/global/images/family/debian-8 - // - // Alternatively, use a specific version of a public operating system - // image: - // - // projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD - // - // To create a disk with a private image that you created, specify the - // image name in the following format: - // - // global/images/my-private-image - // - // You can also specify a private image by its image family, which - // returns the latest version of the image in that family. Replace the - // image name with - // family/family-name: - // - // global/images/family/my-private-family - SourceImage string `json:"sourceImage,omitempty"` - - // SourceImageEncryptionKey: The customer-supplied encryption key of the - // source image. Required if the source image is protected by a - // customer-supplied encryption key. - SourceImageEncryptionKey *CustomerEncryptionKey `json:"sourceImageEncryptionKey,omitempty"` - - // SourceImageId: [Output Only] The ID value of the image used to create - // this disk. This value identifies the exact image that was used to - // create this persistent disk. For example, if you created the - // persistent disk from an image that was later deleted and recreated - // under the same name, the source image ID would identify the exact - // version of the image that was used. - SourceImageId string `json:"sourceImageId,omitempty"` - - // SourceSnapshot: The source snapshot used to create this disk. You can - // provide this as a partial or full URL to the resource. For example, - // the following are valid values: - // - - // https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot - // - projects/project/global/snapshots/snapshot - // - global/snapshots/snapshot - SourceSnapshot string `json:"sourceSnapshot,omitempty"` - - // SourceSnapshotEncryptionKey: The customer-supplied encryption key of - // the source snapshot. Required if the source snapshot is protected by - // a customer-supplied encryption key. - SourceSnapshotEncryptionKey *CustomerEncryptionKey `json:"sourceSnapshotEncryptionKey,omitempty"` - - // SourceSnapshotId: [Output Only] The unique ID of the snapshot used to - // create this disk. This value identifies the exact snapshot that was - // used to create this persistent disk. For example, if you created the - // persistent disk from a snapshot that was later deleted and recreated - // under the same name, the source snapshot ID would identify the exact - // version of the snapshot that was used. - SourceSnapshotId string `json:"sourceSnapshotId,omitempty"` - - // Status: [Output Only] The status of disk creation. - // - // Possible values: - // "CREATING" - // "FAILED" - // "READY" - // "RESTORING" - Status string `json:"status,omitempty"` - - // StorageType: [Deprecated] Storage type of the persistent disk. - // - // Possible values: - // "HDD" - // "SSD" - StorageType string `json:"storageType,omitempty"` - - // Type: URL of the disk type resource describing which disk type to use - // to create the disk. Provide this when creating the disk. - Type string `json:"type,omitempty"` - - // Users: [Output Only] Links to the users of the disk (attached - // instances) in form: project/zones/zone/instances/instance - Users []string `json:"users,omitempty"` - - // Zone: [Output Only] URL of the zone where the disk resides. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Disk) MarshalJSON() ([]byte, error) { - type noMethod Disk - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type DiskAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of DisksScopedList resources. - Items map[string]DisksScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#diskAggregatedList for aggregated lists of persistent disks. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DiskAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod DiskAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DiskList: A list of Disk resources. -type DiskList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Disk resources. - Items []*Disk `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#diskList for - // lists of disks. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DiskList) MarshalJSON() ([]byte, error) { - type noMethod DiskList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type DiskMoveRequest struct { - // DestinationZone: The URL of the destination zone to move the disk. - // This can be a full or partial URL. For example, the following are all - // valid URLs to a zone: - // - https://www.googleapis.com/compute/v1/projects/project/zones/zone - // - // - projects/project/zones/zone - // - zones/zone - DestinationZone string `json:"destinationZone,omitempty"` - - // TargetDisk: The URL of the target disk to move. This can be a full or - // partial URL. For example, the following are all valid URLs to a disk: - // - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk - // - projects/project/zones/zone/disks/disk - // - zones/zone/disks/disk - TargetDisk string `json:"targetDisk,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DestinationZone") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DestinationZone") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *DiskMoveRequest) MarshalJSON() ([]byte, error) { - type noMethod DiskMoveRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DiskType: A DiskType resource. -type DiskType struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // DefaultDiskSizeGb: [Output Only] Server-defined default disk size in - // GB. - DefaultDiskSizeGb int64 `json:"defaultDiskSizeGb,omitempty,string"` - - // Deprecated: [Output Only] The deprecation status associated with this - // disk type. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - - // Description: [Output Only] An optional description of this resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#diskType for - // disk types. - Kind string `json:"kind,omitempty"` - - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ValidDiskSize: [Output Only] An optional textual description of the - // valid disk size, such as "10GB-10TB". - ValidDiskSize string `json:"validDiskSize,omitempty"` - - // Zone: [Output Only] URL of the zone where the disk type resides. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *DiskType) MarshalJSON() ([]byte, error) { - type noMethod DiskType - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type DiskTypeAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of DiskTypesScopedList resources. - Items map[string]DiskTypesScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#diskTypeAggregatedList. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DiskTypeAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod DiskTypeAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DiskTypeList: Contains a list of disk types. -type DiskTypeList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of DiskType resources. - Items []*DiskType `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#diskTypeList for - // disk types. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DiskTypeList) MarshalJSON() ([]byte, error) { - type noMethod DiskTypeList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type DiskTypesScopedList struct { - // DiskTypes: [Output Only] List of disk types contained in this scope. - DiskTypes []*DiskType `json:"diskTypes,omitempty"` - - // Warning: [Output Only] Informational warning which replaces the list - // of disk types when the list is empty. - Warning *DiskTypesScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DiskTypes") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DiskTypes") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DiskTypesScopedList) MarshalJSON() ([]byte, error) { - type noMethod DiskTypesScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DiskTypesScopedListWarning: [Output Only] Informational warning which -// replaces the list of disk types when the list is empty. -type DiskTypesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*DiskTypesScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DiskTypesScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod DiskTypesScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type DiskTypesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DiskTypesScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod DiskTypesScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type DisksResizeRequest struct { - // SizeGb: The new size of the persistent disk, which is specified in - // GB. - SizeGb int64 `json:"sizeGb,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "SizeGb") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "SizeGb") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DisksResizeRequest) MarshalJSON() ([]byte, error) { - type noMethod DisksResizeRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type DisksScopedList struct { - // Disks: [Output Only] List of disks contained in this scope. - Disks []*Disk `json:"disks,omitempty"` - - // Warning: [Output Only] Informational warning which replaces the list - // of disks when the list is empty. - Warning *DisksScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Disks") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Disks") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DisksScopedList) MarshalJSON() ([]byte, error) { - type noMethod DisksScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DisksScopedListWarning: [Output Only] Informational warning which -// replaces the list of disks when the list is empty. -type DisksScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*DisksScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DisksScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod DisksScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type DisksScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DisksScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod DisksScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Expr: Represents an expression text. Example: -// -// title: "User account presence" description: "Determines whether the -// request has a user account" expression: "size(request.user) > 0" -type Expr struct { - // Description: An optional description of the expression. This is a - // longer text which describes the expression, e.g. when hovered over it - // in a UI. - Description string `json:"description,omitempty"` - - // Expression: Textual representation of an expression in Common - // Expression Language syntax. - // - // The application context of the containing message determines which - // well-known feature set of CEL is supported. - Expression string `json:"expression,omitempty"` - - // Location: An optional string indicating the location of the - // expression for error reporting, e.g. a file name and a position in - // the file. - Location string `json:"location,omitempty"` - - // Title: An optional title for the expression, i.e. a short string - // describing its purpose. This can be used e.g. in UIs which allow to - // enter the expression. - Title string `json:"title,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Expr) MarshalJSON() ([]byte, error) { - type noMethod Expr - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Firewall: Represents a Firewall resource. -type Firewall struct { - // Allowed: The list of ALLOW rules specified by this firewall. Each - // rule specifies a protocol and port-range tuple that describes a - // permitted connection. - Allowed []*FirewallAllowed `json:"allowed,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Denied: The list of DENY rules specified by this firewall. Each rule - // specifies a protocol and port-range tuple that describes a permitted - // connection. - Denied []*FirewallDenied `json:"denied,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // DestinationRanges: If destination ranges are specified, the firewall - // will apply only to traffic that has destination IP address in these - // ranges. These ranges must be expressed in CIDR format. Only IPv4 is - // supported. - DestinationRanges []string `json:"destinationRanges,omitempty"` - - // Direction: Direction of traffic to which this firewall applies; - // default is INGRESS. Note: For INGRESS traffic, it is NOT supported to - // specify destinationRanges; For EGRESS traffic, it is NOT supported to - // specify sourceRanges OR sourceTags. - // - // Possible values: - // "EGRESS" - // "INGRESS" - Direction string `json:"direction,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#firewall for - // firewall rules. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource; provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Network: URL of the network resource for this firewall rule. If not - // specified when creating a firewall rule, the default network is - // used: - // global/networks/default - // If you choose to specify this property, you can specify the network - // as a full or partial URL. For example, the following are all valid - // URLs: - // - - // https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network - // - projects/myproject/global/networks/my-network - // - global/networks/default - Network string `json:"network,omitempty"` - - // Priority: Priority for this rule. This is an integer between 0 and - // 65535, both inclusive. When not specified, the value assumed is 1000. - // Relative priorities determine precedence of conflicting rules. Lower - // value of priority implies higher precedence (eg, a rule with priority - // 0 has higher precedence than a rule with priority 1). DENY rules take - // precedence over ALLOW rules having equal priority. - Priority int64 `json:"priority,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // SourceRanges: If source ranges are specified, the firewall will apply - // only to traffic that has source IP address in these ranges. These - // ranges must be expressed in CIDR format. One or both of sourceRanges - // and sourceTags may be set. If both properties are set, the firewall - // will apply to traffic that has source IP address within sourceRanges - // OR the source IP that belongs to a tag listed in the sourceTags - // property. The connection does not need to match both properties for - // the firewall to apply. Only IPv4 is supported. - SourceRanges []string `json:"sourceRanges,omitempty"` - - // SourceServiceAccounts: If source service accounts are specified, the - // firewall will apply only to traffic originating from an instance with - // a service account in this list. Source service accounts cannot be - // used to control traffic to an instance's external IP address because - // service accounts are associated with an instance, not an IP address. - // sourceRanges can be set at the same time as sourceServiceAccounts. If - // both are set, the firewall will apply to traffic that has source IP - // address within sourceRanges OR the source IP belongs to an instance - // with service account listed in sourceServiceAccount. The connection - // does not need to match both properties for the firewall to apply. - // sourceServiceAccounts cannot be used at the same time as sourceTags - // or targetTags. - SourceServiceAccounts []string `json:"sourceServiceAccounts,omitempty"` - - // SourceTags: If source tags are specified, the firewall rule applies - // only to traffic with source IPs that match the primary network - // interfaces of VM instances that have the tag and are in the same VPC - // network. Source tags cannot be used to control traffic to an - // instance's external IP address, it only applies to traffic between - // instances in the same virtual network. Because tags are associated - // with instances, not IP addresses. One or both of sourceRanges and - // sourceTags may be set. If both properties are set, the firewall will - // apply to traffic that has source IP address within sourceRanges OR - // the source IP that belongs to a tag listed in the sourceTags - // property. The connection does not need to match both properties for - // the firewall to apply. - SourceTags []string `json:"sourceTags,omitempty"` - - // TargetServiceAccounts: A list of service accounts indicating sets of - // instances located in the network that may make network connections as - // specified in allowed[]. targetServiceAccounts cannot be used at the - // same time as targetTags or sourceTags. If neither - // targetServiceAccounts nor targetTags are specified, the firewall rule - // applies to all instances on the specified network. - TargetServiceAccounts []string `json:"targetServiceAccounts,omitempty"` - - // TargetTags: A list of instance tags indicating sets of instances - // located in the network that may make network connections as specified - // in allowed[]. If no targetTags are specified, the firewall rule - // applies to all instances on the specified network. - TargetTags []string `json:"targetTags,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Allowed") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Allowed") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Firewall) MarshalJSON() ([]byte, error) { - type noMethod Firewall - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type FirewallAllowed struct { - // IPProtocol: The IP protocol to which this rule applies. The protocol - // type is required when creating a firewall rule. This value can either - // be one of the following well known protocol strings (tcp, udp, icmp, - // esp, ah, ipip, sctp), or the IP protocol number. - IPProtocol string `json:"IPProtocol,omitempty"` - - // Ports: An optional list of ports to which this rule applies. This - // field is only applicable for UDP or TCP protocol. Each entry must be - // either an integer or a range. If not specified, this rule applies to - // connections through any port. - // - // Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. - Ports []string `json:"ports,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IPProtocol") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IPProtocol") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *FirewallAllowed) MarshalJSON() ([]byte, error) { - type noMethod FirewallAllowed - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type FirewallDenied struct { - // IPProtocol: The IP protocol to which this rule applies. The protocol - // type is required when creating a firewall rule. This value can either - // be one of the following well known protocol strings (tcp, udp, icmp, - // esp, ah, ipip, sctp), or the IP protocol number. - IPProtocol string `json:"IPProtocol,omitempty"` - - // Ports: An optional list of ports to which this rule applies. This - // field is only applicable for UDP or TCP protocol. Each entry must be - // either an integer or a range. If not specified, this rule applies to - // connections through any port. - // - // Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. - Ports []string `json:"ports,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IPProtocol") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IPProtocol") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *FirewallDenied) MarshalJSON() ([]byte, error) { - type noMethod FirewallDenied - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// FirewallList: Contains a list of firewalls. -type FirewallList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Firewall resources. - Items []*Firewall `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#firewallList for - // lists of firewalls. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *FirewallList) MarshalJSON() ([]byte, error) { - type noMethod FirewallList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// FixedOrPercent: Encapsulates numeric value that can be either -// absolute or relative. -type FixedOrPercent struct { - // Calculated: [Output Only] Absolute value calculated based on mode: - // mode = fixed -> calculated = fixed = percent -> calculated = - // ceiling(percent/100 * base_value) - Calculated int64 `json:"calculated,omitempty"` - - // Fixed: fixed must be non-negative. - Fixed int64 `json:"fixed,omitempty"` - - // Percent: percent must belong to [0, 100]. - Percent int64 `json:"percent,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Calculated") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Calculated") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *FixedOrPercent) MarshalJSON() ([]byte, error) { - type noMethod FixedOrPercent - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ForwardingRule: A ForwardingRule resource. A ForwardingRule resource -// specifies which pool of target virtual machines to forward a packet -// to if it matches the given [IPAddress, IPProtocol, ports] tuple. -type ForwardingRule struct { - // IPAddress: The IP address that this forwarding rule is serving on - // behalf of. - // - // For global forwarding rules, the address must be a global IP. For - // regional forwarding rules, the address must live in the same region - // as the forwarding rule. By default, this field is empty and an - // ephemeral IPv4 address from the same scope (global or regional) will - // be assigned. A regional forwarding rule supports IPv4 only. A global - // forwarding rule supports either IPv4 or IPv6. - // - // When the load balancing scheme is INTERNAL, this can only be an RFC - // 1918 IP address belonging to the network/subnetwork configured for - // the forwarding rule. A reserved address cannot be used. If the field - // is empty, the IP address will be automatically allocated from the - // internal IP range of the subnetwork or network configured for this - // forwarding rule. - IPAddress string `json:"IPAddress,omitempty"` - - // IPProtocol: The IP protocol to which this rule applies. Valid options - // are TCP, UDP, ESP, AH, SCTP or ICMP. - // - // When the load balancing scheme is INTERNAL, only TCP and UDP are - // valid. - // - // Possible values: - // "AH" - // "ESP" - // "ICMP" - // "SCTP" - // "TCP" - // "UDP" - IPProtocol string `json:"IPProtocol,omitempty"` - - // BackendService: This field is not used for external load - // balancing. - // - // For internal load balancing, this field identifies the BackendService - // resource to receive the matched traffic. - BackendService string `json:"backendService,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // IpVersion: The IP Version that will be used by this forwarding rule. - // Valid options are IPV4 or IPV6. This can only be specified for a - // global forwarding rule. - // - // Possible values: - // "IPV4" - // "IPV6" - // "UNSPECIFIED_VERSION" - IpVersion string `json:"ipVersion,omitempty"` - - // Kind: [Output Only] Type of the resource. Always - // compute#forwardingRule for Forwarding Rule resources. - Kind string `json:"kind,omitempty"` - - // LabelFingerprint: A fingerprint for the labels being applied to this - // resource, which is essentially a hash of the labels set used for - // optimistic locking. The fingerprint is initially generated by Compute - // Engine and changes after every request to modify or update labels. - // You must always provide an up-to-date fingerprint hash in order to - // update or change labels. - // - // To see the latest fingerprint, make a get() request to retrieve a - // ForwardingRule. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // Labels: Labels to apply to this resource. These can be later modified - // by the setLabels method. Each label key/value pair must comply with - // RFC1035. Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - - // LoadBalancingScheme: This signifies what the ForwardingRule will be - // used for and can only take the following values: INTERNAL, EXTERNAL - // The value of INTERNAL means that this will be used for Internal - // Network Load Balancing (TCP, UDP). The value of EXTERNAL means that - // this will be used for External Load Balancing (HTTP(S) LB, External - // TCP/UDP LB, SSL Proxy) - // - // Possible values: - // "EXTERNAL" - // "INTERNAL" - // "INVALID" - LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"` - - // Name: Name of the resource; provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Network: This field is not used for external load balancing. - // - // For internal load balancing, this field identifies the network that - // the load balanced IP should belong to for this Forwarding Rule. If - // this field is not specified, the default network will be used. - Network string `json:"network,omitempty"` - - // PortRange: This field is used along with the target field for - // TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, - // TargetVpnGateway, TargetPool, TargetInstance. - // - // Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets - // addressed to ports in the specified range will be forwarded to - // target. Forwarding rules with the same [IPAddress, IPProtocol] pair - // must have disjoint port ranges. - // - // Some types of forwarding target have constraints on the acceptable - // ports: - // - TargetHttpProxy: 80, 8080 - // - TargetHttpsProxy: 443 - // - TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, - // 995, 1883, 5222 - // - TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, - // 995, 1883, 5222 - // - TargetVpnGateway: 500, 4500 - // - - PortRange string `json:"portRange,omitempty"` - - // Ports: This field is used along with the backend_service field for - // internal load balancing. - // - // When the load balancing scheme is INTERNAL, a single port or a comma - // separated list of ports can be configured. Only packets addressed to - // these ports will be forwarded to the backends configured with this - // forwarding rule. - // - // You may specify a maximum of up to 5 ports. - Ports []string `json:"ports,omitempty"` - - // Region: [Output Only] URL of the region where the regional forwarding - // rule resides. This field is not applicable to global forwarding - // rules. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServiceLabel: An optional prefix to the service name for this - // Forwarding Rule. If specified, will be the first label of the fully - // qualified service name. - // - // The label must be 1-63 characters long, and comply with RFC1035. - // Specifically, the label must be 1-63 characters long and match the - // regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first - // character must be a lowercase letter, and all following characters - // must be a dash, lowercase letter, or digit, except the last - // character, which cannot be a dash. - // - // This field is only used for internal load balancing. - ServiceLabel string `json:"serviceLabel,omitempty"` - - // ServiceName: [Output Only] The internal fully qualified service name - // for this Forwarding Rule. - // - // This field is only used for internal load balancing. - ServiceName string `json:"serviceName,omitempty"` - - // Subnetwork: This field is not used for external load balancing. - // - // For internal load balancing, this field identifies the subnetwork - // that the load balanced IP should belong to for this Forwarding - // Rule. - // - // If the network specified is in auto subnet mode, this field is - // optional. However, if the network is in custom subnet mode, a - // subnetwork must be specified. - Subnetwork string `json:"subnetwork,omitempty"` - - // Target: The URL of the target resource to receive the matched - // traffic. For regional forwarding rules, this target must live in the - // same region as the forwarding rule. For global forwarding rules, this - // target must be a global load balancing resource. The forwarded - // traffic must be of a type appropriate to the target object. - // - // This field is not used for internal load balancing. - Target string `json:"target,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "IPAddress") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IPAddress") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ForwardingRule) MarshalJSON() ([]byte, error) { - type noMethod ForwardingRule - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ForwardingRuleAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of ForwardingRulesScopedList resources. - Items map[string]ForwardingRulesScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#forwardingRuleAggregatedList for lists of forwarding rules. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ForwardingRuleAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod ForwardingRuleAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ForwardingRuleList: Contains a list of ForwardingRule resources. -type ForwardingRuleList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of ForwardingRule resources. - Items []*ForwardingRule `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ForwardingRuleList) MarshalJSON() ([]byte, error) { - type noMethod ForwardingRuleList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ForwardingRulesScopedList struct { - // ForwardingRules: List of forwarding rules contained in this scope. - ForwardingRules []*ForwardingRule `json:"forwardingRules,omitempty"` - - // Warning: Informational warning which replaces the list of forwarding - // rules when the list is empty. - Warning *ForwardingRulesScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ForwardingRules") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ForwardingRules") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ForwardingRulesScopedList) MarshalJSON() ([]byte, error) { - type noMethod ForwardingRulesScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ForwardingRulesScopedListWarning: Informational warning which -// replaces the list of forwarding rules when the list is empty. -type ForwardingRulesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*ForwardingRulesScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ForwardingRulesScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod ForwardingRulesScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ForwardingRulesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ForwardingRulesScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod ForwardingRulesScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type GlobalSetLabelsRequest struct { - // LabelFingerprint: The fingerprint of the previous set of labels for - // this resource, used to detect conflicts. The fingerprint is initially - // generated by Compute Engine and changes after every request to modify - // or update labels. You must always provide an up-to-date fingerprint - // hash when updating or changing labels. Make a get() request to the - // resource to get the latest fingerprint. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // Labels: A list of labels to apply for this resource. Each label key & - // value must comply with RFC1035. Specifically, the name must be 1-63 - // characters long and match the regular expression - // [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a - // lowercase letter, and all following characters must be a dash, - // lowercase letter, or digit, except the last character, which cannot - // be a dash. For example, "webserver-frontend": "images". A label value - // can also be empty (e.g. "my-label": ""). - Labels map[string]string `json:"labels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LabelFingerprint") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "LabelFingerprint") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GlobalSetLabelsRequest) MarshalJSON() ([]byte, error) { - type noMethod GlobalSetLabelsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GuestOsFeature: Guest OS features. -type GuestOsFeature struct { - // Type: The type of supported feature. Currently only - // VIRTIO_SCSI_MULTIQUEUE is supported. For newer Windows images, the - // server might also populate this property with the value WINDOWS to - // indicate that this is a Windows image. This value is purely - // informational and does not enable or disable any features. - // - // Possible values: - // "FEATURE_TYPE_UNSPECIFIED" - // "MULTI_IP_SUBNET" - // "VIRTIO_SCSI_MULTIQUEUE" - // "WINDOWS" - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Type") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Type") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GuestOsFeature) MarshalJSON() ([]byte, error) { - type noMethod GuestOsFeature - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type HTTPHealthCheck struct { - // Host: The value of the host header in the HTTP health check request. - // If left empty (default value), the IP on behalf of which this health - // check is performed will be used. - Host string `json:"host,omitempty"` - - // Port: The TCP port number for the health check request. The default - // value is 80. Valid values are 1 through 65535. - Port int64 `json:"port,omitempty"` - - // PortName: Port name as defined in InstanceGroup#NamedPort#name. If - // both port and port_name are defined, port takes precedence. - PortName string `json:"portName,omitempty"` - - // ProxyHeader: Specifies the type of proxy header to append before - // sending data to the backend, either NONE or PROXY_V1. The default is - // NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - - // RequestPath: The request path of the HTTP health check request. The - // default value is /. - RequestPath string `json:"requestPath,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Host") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Host") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HTTPHealthCheck) MarshalJSON() ([]byte, error) { - type noMethod HTTPHealthCheck - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type HTTPSHealthCheck struct { - // Host: The value of the host header in the HTTPS health check request. - // If left empty (default value), the IP on behalf of which this health - // check is performed will be used. - Host string `json:"host,omitempty"` - - // Port: The TCP port number for the health check request. The default - // value is 443. Valid values are 1 through 65535. - Port int64 `json:"port,omitempty"` - - // PortName: Port name as defined in InstanceGroup#NamedPort#name. If - // both port and port_name are defined, port takes precedence. - PortName string `json:"portName,omitempty"` - - // ProxyHeader: Specifies the type of proxy header to append before - // sending data to the backend, either NONE or PROXY_V1. The default is - // NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - - // RequestPath: The request path of the HTTPS health check request. The - // default value is /. - RequestPath string `json:"requestPath,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Host") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Host") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HTTPSHealthCheck) MarshalJSON() ([]byte, error) { - type noMethod HTTPSHealthCheck - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HealthCheck: An HealthCheck resource. This resource defines a -// template for how individual virtual machines should be checked for -// health, via one of the supported protocols. -type HealthCheck struct { - // CheckIntervalSec: How often (in seconds) to send a health check. The - // default value is 5 seconds. - CheckIntervalSec int64 `json:"checkIntervalSec,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in 3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // HealthyThreshold: A so-far unhealthy instance will be marked healthy - // after this many consecutive successes. The default value is 2. - HealthyThreshold int64 `json:"healthyThreshold,omitempty"` - - HttpHealthCheck *HTTPHealthCheck `json:"httpHealthCheck,omitempty"` - - HttpsHealthCheck *HTTPSHealthCheck `json:"httpsHealthCheck,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: Type of the resource. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - SslHealthCheck *SSLHealthCheck `json:"sslHealthCheck,omitempty"` - - TcpHealthCheck *TCPHealthCheck `json:"tcpHealthCheck,omitempty"` - - // TimeoutSec: How long (in seconds) to wait before claiming failure. - // The default value is 5 seconds. It is invalid for timeoutSec to have - // greater value than checkIntervalSec. - TimeoutSec int64 `json:"timeoutSec,omitempty"` - - // Type: Specifies the type of the healthCheck, either TCP, SSL, HTTP or - // HTTPS. If not specified, the default is TCP. Exactly one of the - // protocol-specific health check field must be specified, which must - // match type field. - // - // Possible values: - // "HTTP" - // "HTTPS" - // "INVALID" - // "SSL" - // "TCP" - // "UDP" - Type string `json:"type,omitempty"` - - UdpHealthCheck *UDPHealthCheck `json:"udpHealthCheck,omitempty"` - - // UnhealthyThreshold: A so-far healthy instance will be marked - // unhealthy after this many consecutive failures. The default value is - // 2. - UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CheckIntervalSec") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CheckIntervalSec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *HealthCheck) MarshalJSON() ([]byte, error) { - type noMethod HealthCheck - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HealthCheckList: Contains a list of HealthCheck resources. -type HealthCheckList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of HealthCheck resources. - Items []*HealthCheck `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HealthCheckList) MarshalJSON() ([]byte, error) { - type noMethod HealthCheckList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HealthCheckReference: A full or valid partial URL to a health check. -// For example, the following are valid URLs: -// - -// https://www.googleapis.com/compute/beta/projects/project-id/global/httpHealthChecks/health-check -// - projects/project-id/global/httpHealthChecks/health-check -// - global/httpHealthChecks/health-check -type HealthCheckReference struct { - HealthCheck string `json:"healthCheck,omitempty"` - - // ForceSendFields is a list of field names (e.g. "HealthCheck") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "HealthCheck") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HealthCheckReference) MarshalJSON() ([]byte, error) { - type noMethod HealthCheckReference - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type HealthStatus struct { - // HealthState: Health state of the instance. - // - // Possible values: - // "HEALTHY" - // "UNHEALTHY" - HealthState string `json:"healthState,omitempty"` - - // Instance: URL of the instance resource. - Instance string `json:"instance,omitempty"` - - // IpAddress: The IP address represented by this resource. - IpAddress string `json:"ipAddress,omitempty"` - - // Port: The port on the instance. - Port int64 `json:"port,omitempty"` - - // ForceSendFields is a list of field names (e.g. "HealthState") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "HealthState") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HealthStatus) MarshalJSON() ([]byte, error) { - type noMethod HealthStatus - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HostRule: UrlMaps A host-matching rule for a URL. If matched, will -// use the named PathMatcher to select the BackendService. -type HostRule struct { - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Hosts: The list of host patterns to match. They must be valid - // hostnames, except * will match any string of ([a-z0-9-.]*). In that - // case, * must be the first character and must be followed in the - // pattern by either - or .. - Hosts []string `json:"hosts,omitempty"` - - // PathMatcher: The name of the PathMatcher to use to match the path - // portion of the URL if the hostRule matches the URL's host portion. - PathMatcher string `json:"pathMatcher,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HostRule) MarshalJSON() ([]byte, error) { - type noMethod HostRule - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HttpHealthCheck: An HttpHealthCheck resource. This resource defines a -// template for how individual instances should be checked for health, -// via HTTP. -type HttpHealthCheck struct { - // CheckIntervalSec: How often (in seconds) to send a health check. The - // default value is 5 seconds. - CheckIntervalSec int64 `json:"checkIntervalSec,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // HealthyThreshold: A so-far unhealthy instance will be marked healthy - // after this many consecutive successes. The default value is 2. - HealthyThreshold int64 `json:"healthyThreshold,omitempty"` - - // Host: The value of the host header in the HTTP health check request. - // If left empty (default value), the public IP on behalf of which this - // health check is performed will be used. - Host string `json:"host,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always - // compute#httpHealthCheck for HTTP health checks. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Port: The TCP port number for the HTTP health check request. The - // default value is 80. - Port int64 `json:"port,omitempty"` - - // RequestPath: The request path of the HTTP health check request. The - // default value is /. - RequestPath string `json:"requestPath,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // TimeoutSec: How long (in seconds) to wait before claiming failure. - // The default value is 5 seconds. It is invalid for timeoutSec to have - // greater value than checkIntervalSec. - TimeoutSec int64 `json:"timeoutSec,omitempty"` - - // UnhealthyThreshold: A so-far healthy instance will be marked - // unhealthy after this many consecutive failures. The default value is - // 2. - UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CheckIntervalSec") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CheckIntervalSec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *HttpHealthCheck) MarshalJSON() ([]byte, error) { - type noMethod HttpHealthCheck - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HttpHealthCheckList: Contains a list of HttpHealthCheck resources. -type HttpHealthCheckList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of HttpHealthCheck resources. - Items []*HttpHealthCheck `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HttpHealthCheckList) MarshalJSON() ([]byte, error) { - type noMethod HttpHealthCheckList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HttpsHealthCheck: An HttpsHealthCheck resource. This resource defines -// a template for how individual instances should be checked for health, -// via HTTPS. -type HttpsHealthCheck struct { - // CheckIntervalSec: How often (in seconds) to send a health check. The - // default value is 5 seconds. - CheckIntervalSec int64 `json:"checkIntervalSec,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // HealthyThreshold: A so-far unhealthy instance will be marked healthy - // after this many consecutive successes. The default value is 2. - HealthyThreshold int64 `json:"healthyThreshold,omitempty"` - - // Host: The value of the host header in the HTTPS health check request. - // If left empty (default value), the public IP on behalf of which this - // health check is performed will be used. - Host string `json:"host,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: Type of the resource. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Port: The TCP port number for the HTTPS health check request. The - // default value is 443. - Port int64 `json:"port,omitempty"` - - // RequestPath: The request path of the HTTPS health check request. The - // default value is "/". - RequestPath string `json:"requestPath,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // TimeoutSec: How long (in seconds) to wait before claiming failure. - // The default value is 5 seconds. It is invalid for timeoutSec to have - // a greater value than checkIntervalSec. - TimeoutSec int64 `json:"timeoutSec,omitempty"` - - // UnhealthyThreshold: A so-far healthy instance will be marked - // unhealthy after this many consecutive failures. The default value is - // 2. - UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CheckIntervalSec") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CheckIntervalSec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *HttpsHealthCheck) MarshalJSON() ([]byte, error) { - type noMethod HttpsHealthCheck - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HttpsHealthCheckList: Contains a list of HttpsHealthCheck resources. -type HttpsHealthCheckList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of HttpsHealthCheck resources. - Items []*HttpsHealthCheck `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HttpsHealthCheckList) MarshalJSON() ([]byte, error) { - type noMethod HttpsHealthCheckList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Image: An Image resource. -type Image struct { - // ArchiveSizeBytes: Size of the image tar.gz archive stored in Google - // Cloud Storage (in bytes). - ArchiveSizeBytes int64 `json:"archiveSizeBytes,omitempty,string"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Deprecated: The deprecation status associated with this image. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // DiskSizeGb: Size of the image when restored onto a persistent disk - // (in GB). - DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - - // Family: The name of the image family to which this image belongs. You - // can create disks by specifying an image family instead of a specific - // image name. The image family always returns its latest image that is - // not deprecated. The name of the image family must comply with - // RFC1035. - Family string `json:"family,omitempty"` - - // GuestOsFeatures: A list of features to enable on the guest OS. - // Applicable for bootable images only. Currently, only one feature can - // be enabled, VIRTIO_SCSI_MULTIQUEUE, which allows each virtual CPU to - // have its own queue. For Windows images, you can only enable - // VIRTIO_SCSI_MULTIQUEUE on images with driver version 1.2.0.1621 or - // higher. Linux images with kernel versions 3.17 and higher will - // support VIRTIO_SCSI_MULTIQUEUE. - // - // For new Windows images, the server might also populate this field - // with the value WINDOWS, to indicate that this is a Windows image. - // This value is purely informational and does not enable or disable any - // features. - GuestOsFeatures []*GuestOsFeature `json:"guestOsFeatures,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // ImageEncryptionKey: Encrypts the image using a customer-supplied - // encryption key. - // - // After you encrypt an image with a customer-supplied key, you must - // provide the same key if you use the image later (e.g. to create a - // disk from the image). - // - // Customer-supplied encryption keys do not protect access to metadata - // of the disk. - // - // If you do not provide an encryption key when creating the image, then - // the disk will be encrypted using an automatically generated key and - // you do not need to provide a key to use the image later. - ImageEncryptionKey *CustomerEncryptionKey `json:"imageEncryptionKey,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#image for - // images. - Kind string `json:"kind,omitempty"` - - // LabelFingerprint: A fingerprint for the labels being applied to this - // image, which is essentially a hash of the labels used for optimistic - // locking. The fingerprint is initially generated by Compute Engine and - // changes after every request to modify or update labels. You must - // always provide an up-to-date fingerprint hash in order to update or - // change labels. - // - // To see the latest fingerprint, make a get() request to retrieve an - // image. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // Labels: Labels to apply to this image. These can be later modified by - // the setLabels method. - Labels map[string]string `json:"labels,omitempty"` - - // Licenses: Any applicable license URI. - Licenses []string `json:"licenses,omitempty"` - - // Name: Name of the resource; provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // RawDisk: The parameters of the raw disk image. - RawDisk *ImageRawDisk `json:"rawDisk,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // SourceDisk: URL of the source disk used to create this image. This - // can be a full or valid partial URL. You must provide either this - // property or the rawDisk.source property but not both to create an - // image. For example, the following are valid values: - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk - // - projects/project/zones/zone/disks/disk - // - zones/zone/disks/disk - SourceDisk string `json:"sourceDisk,omitempty"` - - // SourceDiskEncryptionKey: The customer-supplied encryption key of the - // source disk. Required if the source disk is protected by a - // customer-supplied encryption key. - SourceDiskEncryptionKey *CustomerEncryptionKey `json:"sourceDiskEncryptionKey,omitempty"` - - // SourceDiskId: The ID value of the disk used to create this image. - // This value may be used to determine whether the image was taken from - // the current or a previous instance of a given disk name. - SourceDiskId string `json:"sourceDiskId,omitempty"` - - // SourceImage: URL of the source image used to create this image. This - // can be a full or valid partial URL. You must provide exactly one of: - // - // - this property, or - // - the rawDisk.source property, or - // - the sourceDisk property in order to create an image. - SourceImage string `json:"sourceImage,omitempty"` - - // SourceImageEncryptionKey: The customer-supplied encryption key of the - // source image. Required if the source image is protected by a - // customer-supplied encryption key. - SourceImageEncryptionKey *CustomerEncryptionKey `json:"sourceImageEncryptionKey,omitempty"` - - // SourceImageId: [Output Only] The ID value of the image used to create - // this image. This value may be used to determine whether the image was - // taken from the current or a previous instance of a given image name. - SourceImageId string `json:"sourceImageId,omitempty"` - - // SourceType: The type of the image used to create this disk. The - // default and only value is RAW - // - // Possible values: - // "RAW" (default) - SourceType string `json:"sourceType,omitempty"` - - // Status: [Output Only] The status of the image. An image can be used - // to create other resources, such as instances, only after the image - // has been successfully created and the status is set to READY. - // Possible values are FAILED, PENDING, or READY. - // - // Possible values: - // "FAILED" - // "PENDING" - // "READY" - Status string `json:"status,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ArchiveSizeBytes") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ArchiveSizeBytes") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Image) MarshalJSON() ([]byte, error) { - type noMethod Image - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ImageRawDisk: The parameters of the raw disk image. -type ImageRawDisk struct { - // ContainerType: The format used to encode and transmit the block - // device, which should be TAR. This is just a container and - // transmission format and not a runtime format. Provided by the client - // when the disk image is created. - // - // Possible values: - // "TAR" - ContainerType string `json:"containerType,omitempty"` - - // Sha1Checksum: An optional SHA1 checksum of the disk image before - // unpackaging; provided by the client when the disk image is created. - Sha1Checksum string `json:"sha1Checksum,omitempty"` - - // Source: The full Google Cloud Storage URL where the disk image is - // stored. You must provide either this property or the sourceDisk - // property but not both. - Source string `json:"source,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ContainerType") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ContainerType") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ImageRawDisk) MarshalJSON() ([]byte, error) { - type noMethod ImageRawDisk - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ImageList: Contains a list of images. -type ImageList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Image resources. - Items []*Image `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ImageList) MarshalJSON() ([]byte, error) { - type noMethod ImageList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Instance: An Instance resource. -type Instance struct { - // CanIpForward: Allows this instance to send and receive packets with - // non-matching destination or source IPs. This is required if you plan - // to use this instance to forward routes. For more information, see - // Enabling IP Forwarding. - CanIpForward bool `json:"canIpForward,omitempty"` - - // CpuPlatform: [Output Only] The CPU platform used by this instance. - CpuPlatform string `json:"cpuPlatform,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Disks: Array of disks associated with this instance. Persistent disks - // must be created before you can assign them. - Disks []*AttachedDisk `json:"disks,omitempty"` - - // GuestAccelerators: List of the type and count of accelerator cards - // attached to the instance. - GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#instance for - // instances. - Kind string `json:"kind,omitempty"` - - // LabelFingerprint: A fingerprint for this request, which is - // essentially a hash of the metadata's contents and used for optimistic - // locking. The fingerprint is initially generated by Compute Engine and - // changes after every request to modify or update metadata. You must - // always provide an up-to-date fingerprint hash in order to update or - // change metadata. - // - // To see the latest fingerprint, make get() request to the instance. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // Labels: Labels to apply to this instance. These can be later modified - // by the setLabels method. - Labels map[string]string `json:"labels,omitempty"` - - // MachineType: Full or partial URL of the machine type resource to use - // for this instance, in the format: - // zones/zone/machineTypes/machine-type. This is provided by the client - // when the instance is created. For example, the following is a valid - // partial url to a predefined machine - // type: - // - // zones/us-central1-f/machineTypes/n1-standard-1 - // - // To create a custom machine type, provide a URL to a machine type in - // the following format, where CPUS is 1 or an even number up to 32 (2, - // 4, 6, ... 24, etc), and MEMORY is the total memory for this instance. - // Memory must be a multiple of 256 MB and must be supplied in MB (e.g. - // 5 GB of memory is 5120 - // MB): - // - // zones/zone/machineTypes/custom-CPUS-MEMORY - // - // For example: zones/us-central1-f/machineTypes/custom-4-5120 - // - // For a full list of restrictions, read the Specifications for custom - // machine types. - MachineType string `json:"machineType,omitempty"` - - // Metadata: The metadata key/value pairs assigned to this instance. - // This includes custom metadata and predefined keys. - Metadata *Metadata `json:"metadata,omitempty"` - - // MinCpuPlatform: Specifies a minimum CPU platform for the VM instance. - // Applicable values are the friendly names of CPU platforms, such as - // minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy - // Bridge". - MinCpuPlatform string `json:"minCpuPlatform,omitempty"` - - // Name: The name of the resource, provided by the client when initially - // creating the resource. The resource name must be 1-63 characters - // long, and comply with RFC1035. Specifically, the name must be 1-63 - // characters long and match the regular expression - // [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a - // lowercase letter, and all following characters must be a dash, - // lowercase letter, or digit, except the last character, which cannot - // be a dash. - Name string `json:"name,omitempty"` - - // NetworkInterfaces: An array of configurations for this interface. - // This specifies how this interface is configured to interact with - // other network services, such as connecting to the internet. Only one - // interface is supported per instance. - NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` - - // Scheduling: Sets the scheduling options for this instance. - Scheduling *Scheduling `json:"scheduling,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServiceAccounts: A list of service accounts, with their specified - // scopes, authorized for this instance. Only one service account per VM - // instance is supported. - // - // Service accounts generate access tokens that can be accessed through - // the metadata server and used to authenticate applications on the - // instance. See Service Accounts for more information. - ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"` - - // StartRestricted: [Output Only] Whether a VM has been restricted for - // start because Compute Engine has detected suspicious activity. - StartRestricted bool `json:"startRestricted,omitempty"` - - // Status: [Output Only] The status of the instance. One of the - // following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, - // SUSPENDING, SUSPENDED, and TERMINATED. - // - // Possible values: - // "PROVISIONING" - // "RUNNING" - // "STAGING" - // "STOPPED" - // "STOPPING" - // "SUSPENDED" - // "SUSPENDING" - // "TERMINATED" - Status string `json:"status,omitempty"` - - // StatusMessage: [Output Only] An optional, human-readable explanation - // of the status. - StatusMessage string `json:"statusMessage,omitempty"` - - // Tags: A list of tags to apply to this instance. Tags are used to - // identify valid sources or targets for network firewalls and are - // specified by the client during instance creation. The tags can be - // later modified by the setTags method. Each tag within the list must - // comply with RFC1035. - Tags *Tags `json:"tags,omitempty"` - - // Zone: [Output Only] URL of the zone where the instance resides. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CanIpForward") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CanIpForward") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Instance) MarshalJSON() ([]byte, error) { - type noMethod Instance - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InstancesScopedList resources. - Items map[string]InstancesScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#instanceAggregatedList for aggregated lists of Instance - // resources. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod InstanceAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroup struct { - // CreationTimestamp: [Output Only] The creation timestamp for this - // instance group in RFC3339 text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Fingerprint: [Output Only] The fingerprint of the named ports. The - // system uses this fingerprint to detect conflicts when multiple users - // change the named ports concurrently. - Fingerprint string `json:"fingerprint,omitempty"` - - // Id: [Output Only] A unique identifier for this instance group, - // generated by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] The resource type, which is always - // compute#instanceGroup for instance groups. - Kind string `json:"kind,omitempty"` - - // Name: The name of the instance group. The name must be 1-63 - // characters long, and comply with RFC1035. - Name string `json:"name,omitempty"` - - // NamedPorts: Assigns a name to a port number. For example: {name: - // "http", port: 80} - // - // This allows the system to reference ports by the assigned name - // instead of a port number. Named ports can also contain multiple - // ports. For example: [{name: "http", port: 80},{name: "http", port: - // 8080}] - // - // Named ports apply to all instances in this instance group. - NamedPorts []*NamedPort `json:"namedPorts,omitempty"` - - // Network: The URL of the network to which all instances in the - // instance group belong. - Network string `json:"network,omitempty"` - - // Region: The URL of the region where the instance group is located - // (for regional resources). - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] The URL for this instance group. The server - // generates this URL. - SelfLink string `json:"selfLink,omitempty"` - - // Size: [Output Only] The total number of instances in the instance - // group. - Size int64 `json:"size,omitempty"` - - // Subnetwork: The URL of the subnetwork to which all instances in the - // instance group belong. - Subnetwork string `json:"subnetwork,omitempty"` - - // Zone: [Output Only] The URL of the zone where the instance group is - // located (for zonal resources). - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroup) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroup - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InstanceGroupsScopedList resources. - Items map[string]InstanceGroupsScopedList `json:"items,omitempty"` - - // Kind: [Output Only] The resource type, which is always - // compute#instanceGroupAggregatedList for aggregated lists of instance - // groups. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceGroupList: A list of InstanceGroup resources. -type InstanceGroupList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InstanceGroup resources. - Items []*InstanceGroup `json:"items,omitempty"` - - // Kind: [Output Only] The resource type, which is always - // compute#instanceGroupList for instance group lists. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupList) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManager: An Instance Group Manager resource. -type InstanceGroupManager struct { - // AutoHealingPolicies: The autohealing policy for this managed instance - // group. You can specify only one value. - AutoHealingPolicies []*InstanceGroupManagerAutoHealingPolicy `json:"autoHealingPolicies,omitempty"` - - // BaseInstanceName: The base instance name to use for instances in this - // group. The value must be 1-58 characters long. Instances are named by - // appending a hyphen and a random four-character string to the base - // instance name. The base instance name must comply with RFC1035. - BaseInstanceName string `json:"baseInstanceName,omitempty"` - - // CreationTimestamp: [Output Only] The creation timestamp for this - // managed instance group in RFC3339 text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // CurrentActions: [Output Only] The list of instance actions and the - // number of instances in this managed instance group that are scheduled - // for each of those actions. - CurrentActions *InstanceGroupManagerActionsSummary `json:"currentActions,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // FailoverAction: The action to perform in case of zone failure. Only - // one value is supported, NO_FAILOVER. The default is NO_FAILOVER. - // - // Possible values: - // "NO_FAILOVER" - // "UNKNOWN" - FailoverAction string `json:"failoverAction,omitempty"` - - // Fingerprint: [Output Only] The fingerprint of the resource data. You - // can use this optional field for optimistic locking when you update - // the resource. - Fingerprint string `json:"fingerprint,omitempty"` - - // Id: [Output Only] A unique identifier for this resource type. The - // server generates this identifier. - Id uint64 `json:"id,omitempty,string"` - - // InstanceGroup: [Output Only] The URL of the Instance Group resource. - InstanceGroup string `json:"instanceGroup,omitempty"` - - // InstanceTemplate: The URL of the instance template that is specified - // for this managed instance group. The group uses this template to - // create all new instances in the managed instance group. - InstanceTemplate string `json:"instanceTemplate,omitempty"` - - // Kind: [Output Only] The resource type, which is always - // compute#instanceGroupManager for managed instance groups. - Kind string `json:"kind,omitempty"` - - // Name: The name of the managed instance group. The name must be 1-63 - // characters long, and comply with RFC1035. - Name string `json:"name,omitempty"` - - // NamedPorts: Named ports configured for the Instance Groups - // complementary to this Instance Group Manager. - NamedPorts []*NamedPort `json:"namedPorts,omitempty"` - - // PendingActions: [Output Only] The list of instance actions and the - // number of instances in this managed instance group that are pending - // for each of those actions. - PendingActions *InstanceGroupManagerPendingActionsSummary `json:"pendingActions,omitempty"` - - // Region: [Output Only] The URL of the region where the managed - // instance group resides (for regional resources). - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] The URL for this managed instance group. The - // server defines this URL. - SelfLink string `json:"selfLink,omitempty"` - - // ServiceAccount: Service account will be used as credentials for all - // operations performed by managed instance group on instances. The - // service accounts needs all permissions required to create and delete - // instances. When not specified, the service account - // {projectNumber}@cloudservices.gserviceaccount.com will be used. - ServiceAccount string `json:"serviceAccount,omitempty"` - - // TargetPools: The URLs for all TargetPool resources to which instances - // in the instanceGroup field are added. The target pools automatically - // apply to all of the instances in the managed instance group. - TargetPools []string `json:"targetPools,omitempty"` - - // TargetSize: The target number of running instances for this managed - // instance group. Deleting or abandoning instances reduces this number. - // Resizing the group changes this number. - TargetSize int64 `json:"targetSize,omitempty"` - - // UpdatePolicy: The update policy for this managed instance group. - UpdatePolicy *InstanceGroupManagerUpdatePolicy `json:"updatePolicy,omitempty"` - - // Versions: Versions supported by this IGM. User should set this field - // if they need fine-grained control over how many instances in each - // version are run by this IGM. Versions are keyed by instanceTemplate. - // Every instanceTemplate can appear at most once. This field overrides - // instanceTemplate field. If both instanceTemplate and versions are - // set, the user receives a warning. "instanceTemplate: X" is - // semantically equivalent to "versions [ { instanceTemplate: X } ]". - // Exactly one version must have targetSize field left unset. Size of - // such a version will be calculated automatically. - Versions []*InstanceGroupManagerVersion `json:"versions,omitempty"` - - // Zone: [Output Only] The URL of the zone where the managed instance - // group is located (for zonal resources). - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "AutoHealingPolicies") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AutoHealingPolicies") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManager) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManager - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerActionsSummary struct { - // Abandoning: [Output Only] The total number of instances in the - // managed instance group that are scheduled to be abandoned. Abandoning - // an instance removes it from the managed instance group without - // deleting it. - Abandoning int64 `json:"abandoning,omitempty"` - - // Creating: [Output Only] The number of instances in the managed - // instance group that are scheduled to be created or are currently - // being created. If the group fails to create any of these instances, - // it tries again until it creates the instance successfully. - // - // If you have disabled creation retries, this field will not be - // populated; instead, the creatingWithoutRetries field will be - // populated. - Creating int64 `json:"creating,omitempty"` - - // CreatingWithoutRetries: [Output Only] The number of instances that - // the managed instance group will attempt to create. The group attempts - // to create each instance only once. If the group fails to create any - // of these instances, it decreases the group's targetSize value - // accordingly. - CreatingWithoutRetries int64 `json:"creatingWithoutRetries,omitempty"` - - // Deleting: [Output Only] The number of instances in the managed - // instance group that are scheduled to be deleted or are currently - // being deleted. - Deleting int64 `json:"deleting,omitempty"` - - // None: [Output Only] The number of instances in the managed instance - // group that are running and have no scheduled actions. - None int64 `json:"none,omitempty"` - - // Recreating: [Output Only] The number of instances in the managed - // instance group that are scheduled to be recreated or are currently - // being being recreated. Recreating an instance deletes the existing - // root persistent disk and creates a new disk from the image that is - // defined in the instance template. - Recreating int64 `json:"recreating,omitempty"` - - // Refreshing: [Output Only] The number of instances in the managed - // instance group that are being reconfigured with properties that do - // not require a restart or a recreate action. For example, setting or - // removing target pools for the instance. - Refreshing int64 `json:"refreshing,omitempty"` - - // Restarting: [Output Only] The number of instances in the managed - // instance group that are scheduled to be restarted or are currently - // being restarted. - Restarting int64 `json:"restarting,omitempty"` - - // Verifying: [Output Only] The number of instances in the managed - // instance group that are being verified. More details regarding - // verification process are covered in the documentation of - // ManagedInstance.InstanceAction.VERIFYING enum field. - Verifying int64 `json:"verifying,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Abandoning") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Abandoning") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagerActionsSummary) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagerActionsSummary - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InstanceGroupManagersScopedList resources. - Items map[string]InstanceGroupManagersScopedList `json:"items,omitempty"` - - // Kind: [Output Only] The resource type, which is always - // compute#instanceGroupManagerAggregatedList for an aggregated list of - // managed instance groups. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagerAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagerAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerAutoHealingPolicy struct { - // HealthCheck: The URL for the health check that signals autohealing. - HealthCheck string `json:"healthCheck,omitempty"` - - // InitialDelaySec: The number of seconds that the managed instance - // group waits before it applies autohealing policies to new instances - // or recently recreated instances. This initial delay allows instances - // to initialize and run their startup scripts before the instance group - // determines that they are UNHEALTHY. This prevents the managed - // instance group from recreating its instances prematurely. This value - // must be from range [0, 3600]. - InitialDelaySec int64 `json:"initialDelaySec,omitempty"` - - // ForceSendFields is a list of field names (e.g. "HealthCheck") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "HealthCheck") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagerAutoHealingPolicy) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagerAutoHealingPolicy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagerList: [Output Only] A list of managed instance -// groups. -type InstanceGroupManagerList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InstanceGroupManager resources. - Items []*InstanceGroupManager `json:"items,omitempty"` - - // Kind: [Output Only] The resource type, which is always - // compute#instanceGroupManagerList for a list of managed instance - // groups. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagerList) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagerList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerPendingActionsSummary struct { - // Creating: [Output Only] The number of instances in the managed - // instance group that are pending to be created. - Creating int64 `json:"creating,omitempty"` - - // Deleting: [Output Only] The number of instances in the managed - // instance group that are pending to be deleted. - Deleting int64 `json:"deleting,omitempty"` - - // Recreating: [Output Only] The number of instances in the managed - // instance group that are pending to be recreated. - Recreating int64 `json:"recreating,omitempty"` - - // Restarting: [Output Only] The number of instances in the managed - // instance group that are pending to be restarted. - Restarting int64 `json:"restarting,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Creating") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Creating") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagerPendingActionsSummary) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagerPendingActionsSummary - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerUpdatePolicy struct { - // MaxSurge: Maximum number of instances that can be created above the - // InstanceGroupManager.targetSize during the update process. By - // default, a fixed value of 1 is used. Using maxSurge > 0 will cause - // instance names to change during the update process. At least one of { - // maxSurge, maxUnavailable } must be greater than 0. - MaxSurge *FixedOrPercent `json:"maxSurge,omitempty"` - - // MaxUnavailable: Maximum number of instances that can be unavailable - // during the update process. The instance is considered available if - // all of the following conditions are satisfied: 1. Instance's status - // is RUNNING. 2. Instance's liveness health check result was observed - // to be HEALTHY at least once. By default, a fixed value of 1 is used. - // At least one of { maxSurge, maxUnavailable } must be greater than 0. - MaxUnavailable *FixedOrPercent `json:"maxUnavailable,omitempty"` - - // MinReadySec: Minimum number of seconds to wait for after a newly - // created instance becomes available. This value must be from range [0, - // 3600]. - MinReadySec int64 `json:"minReadySec,omitempty"` - - // MinimalAction: Minimal action to be taken on an instance. The order - // of action types is: RESTART < REPLACE. - // - // Possible values: - // "REPLACE" - // "RESTART" - MinimalAction string `json:"minimalAction,omitempty"` - - // Possible values: - // "OPPORTUNISTIC" - // "PROACTIVE" - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MaxSurge") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "MaxSurge") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagerUpdatePolicy) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagerUpdatePolicy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerVersion struct { - InstanceTemplate string `json:"instanceTemplate,omitempty"` - - // Name: Name of the version. Unique among all versions in the scope of - // this managed instance group. - Name string `json:"name,omitempty"` - - // TargetSize: Intended number of instances that are created from - // instanceTemplate. The final number of instances created from - // instanceTemplate will be equal to: * if expressed as fixed number: - // min(targetSize.fixed, instanceGroupManager.targetSize), * if - // expressed as percent: ceiling(targetSize.percent * - // InstanceGroupManager.targetSize). If unset, this version will handle - // all the remaining instances. - TargetSize *FixedOrPercent `json:"targetSize,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InstanceTemplate") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "InstanceTemplate") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagerVersion) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagerVersion - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersAbandonInstancesRequest struct { - // Instances: The URLs of one or more instances to abandon. This can be - // a full URL or a partial URL, such as - // zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersAbandonInstancesRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersAbandonInstancesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersDeleteInstancesRequest struct { - // Instances: The URLs of one or more instances to delete. This can be a - // full URL or a partial URL, such as - // zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersDeleteInstancesRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersDeleteInstancesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersListManagedInstancesResponse struct { - // ManagedInstances: [Output Only] The list of instances in the managed - // instance group. - ManagedInstances []*ManagedInstance `json:"managedInstances,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ManagedInstances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ManagedInstances") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersListManagedInstancesResponse) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersListManagedInstancesResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersRecreateInstancesRequest struct { - // Instances: The URLs of one or more instances to recreate. This can be - // a full URL or a partial URL, such as - // zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersRecreateInstancesRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersRecreateInstancesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersResizeAdvancedRequest struct { - // NoCreationRetries: If this flag is true, the managed instance group - // attempts to create all instances initiated by this resize request - // only once. If there is an error during creation, the managed instance - // group does not retry create this instance, and we will decrease the - // targetSize of the request instead. If the flag is false, the group - // attemps to recreate each instance continuously until it - // succeeds. - // - // This flag matters only in the first attempt of creation of an - // instance. After an instance is successfully created while this flag - // is enabled, the instance behaves the same way as all the other - // instances created with a regular resize request. In particular, if a - // running instance dies unexpectedly at a later time and needs to be - // recreated, this mode does not affect the recreation behavior in that - // scenario. - // - // This flag is applicable only to the current resize request. It does - // not influence other resize requests in any way. - // - // You can see which instances is being creating in which mode by - // calling the get or listManagedInstances API. - NoCreationRetries bool `json:"noCreationRetries,omitempty"` - - // TargetSize: The number of running instances that the managed instance - // group should maintain at any given time. The group automatically adds - // or removes instances to maintain the number of instances specified by - // this parameter. - TargetSize int64 `json:"targetSize,omitempty"` - - // ForceSendFields is a list of field names (e.g. "NoCreationRetries") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "NoCreationRetries") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersResizeAdvancedRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersResizeAdvancedRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersScopedList struct { - // InstanceGroupManagers: [Output Only] The list of managed instance - // groups that are contained in the specified project and zone. - InstanceGroupManagers []*InstanceGroupManager `json:"instanceGroupManagers,omitempty"` - - // Warning: [Output Only] The warning that replaces the list of managed - // instance groups when the list is empty. - Warning *InstanceGroupManagersScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "InstanceGroupManagers") to unconditionally include in API requests. - // By default, fields with empty values are omitted from API requests. - // However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "InstanceGroupManagers") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersScopedList) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagersScopedListWarning: [Output Only] The warning -// that replaces the list of managed instance groups when the list is -// empty. -type InstanceGroupManagersScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*InstanceGroupManagersScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersSetAutoHealingRequest struct { - AutoHealingPolicies []*InstanceGroupManagerAutoHealingPolicy `json:"autoHealingPolicies,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AutoHealingPolicies") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AutoHealingPolicies") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersSetAutoHealingRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersSetAutoHealingRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersSetInstanceTemplateRequest struct { - // InstanceTemplate: The URL of the instance template that is specified - // for this managed instance group. The group uses this template to - // create all new instances in the managed instance group. - InstanceTemplate string `json:"instanceTemplate,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InstanceTemplate") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "InstanceTemplate") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersSetInstanceTemplateRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersSetInstanceTemplateRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersSetTargetPoolsRequest struct { - // Fingerprint: The fingerprint of the target pools information. Use - // this optional property to prevent conflicts when multiple users - // change the target pools settings concurrently. Obtain the fingerprint - // with the instanceGroupManagers.get method. Then, include the - // fingerprint in your request to ensure that you do not overwrite - // changes that were applied from another concurrent request. - Fingerprint string `json:"fingerprint,omitempty"` - - // TargetPools: The list of target pool URLs that instances in this - // managed instance group belong to. The managed instance group applies - // these target pools to all of the instances in the group. Existing - // instances and new instances in the group all receive these target - // pool settings. - TargetPools []string `json:"targetPools,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Fingerprint") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersSetTargetPoolsRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersSetTargetPoolsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsAddInstancesRequest struct { - // Instances: The list of instances to add to the instance group. - Instances []*InstanceReference `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupsAddInstancesRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupsAddInstancesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsListInstances struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InstanceWithNamedPorts resources. - Items []*InstanceWithNamedPorts `json:"items,omitempty"` - - // Kind: [Output Only] The resource type, which is always - // compute#instanceGroupsListInstances for the list of instances in the - // specified instance group. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupsListInstances) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupsListInstances - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsListInstancesRequest struct { - // InstanceState: A filter for the state of the instances in the - // instance group. Valid options are ALL or RUNNING. If you do not - // specify this parameter the list includes all instances regardless of - // their state. - // - // Possible values: - // "ALL" - // "RUNNING" - InstanceState string `json:"instanceState,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InstanceState") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "InstanceState") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupsListInstancesRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupsListInstancesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsRemoveInstancesRequest struct { - // Instances: The list of instances to remove from the instance group. - Instances []*InstanceReference `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupsRemoveInstancesRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupsRemoveInstancesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsScopedList struct { - // InstanceGroups: [Output Only] The list of instance groups that are - // contained in this scope. - InstanceGroups []*InstanceGroup `json:"instanceGroups,omitempty"` - - // Warning: [Output Only] An informational warning that replaces the - // list of instance groups when the list is empty. - Warning *InstanceGroupsScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InstanceGroups") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "InstanceGroups") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupsScopedList) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupsScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceGroupsScopedListWarning: [Output Only] An informational -// warning that replaces the list of instance groups when the list is -// empty. -type InstanceGroupsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*InstanceGroupsScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupsScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupsScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupsScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupsScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsSetNamedPortsRequest struct { - // Fingerprint: The fingerprint of the named ports information for this - // instance group. Use this optional property to prevent conflicts when - // multiple users change the named ports settings concurrently. Obtain - // the fingerprint with the instanceGroups.get method. Then, include the - // fingerprint in your request to ensure that you do not overwrite - // changes that were applied from another concurrent request. - Fingerprint string `json:"fingerprint,omitempty"` - - // NamedPorts: The list of named ports to set for this instance group. - NamedPorts []*NamedPort `json:"namedPorts,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Fingerprint") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupsSetNamedPortsRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupsSetNamedPortsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceList: Contains a list of instances. -type InstanceList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Instance resources. - Items []*Instance `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#instanceList for - // lists of Instance resources. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceList) MarshalJSON() ([]byte, error) { - type noMethod InstanceList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceListReferrers: Contains a list of instance referrers. -type InstanceListReferrers struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Reference resources. - Items []*Reference `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#instanceListReferrers for lists of Instance referrers. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceListReferrers) MarshalJSON() ([]byte, error) { - type noMethod InstanceListReferrers - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceMoveRequest struct { - // DestinationZone: The URL of the destination zone to move the - // instance. This can be a full or partial URL. For example, the - // following are all valid URLs to a zone: - // - https://www.googleapis.com/compute/v1/projects/project/zones/zone - // - // - projects/project/zones/zone - // - zones/zone - DestinationZone string `json:"destinationZone,omitempty"` - - // TargetInstance: The URL of the target instance to move. This can be a - // full or partial URL. For example, the following are all valid URLs to - // an instance: - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance - // - projects/project/zones/zone/instances/instance - // - zones/zone/instances/instance - TargetInstance string `json:"targetInstance,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DestinationZone") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DestinationZone") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstanceMoveRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceMoveRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceProperties struct { - // CanIpForward: Enables instances created based on this template to - // send packets with source IP addresses other than their own and - // receive packets with destination IP addresses other than their own. - // If these instances will be used as an IP gateway or it will be set as - // the next-hop in a Route resource, specify true. If unsure, leave this - // set to false. See the Enable IP forwarding documentation for more - // information. - CanIpForward bool `json:"canIpForward,omitempty"` - - // Description: An optional text description for the instances that are - // created from this instance template. - Description string `json:"description,omitempty"` - - // Disks: An array of disks that are associated with the instances that - // are created from this template. - Disks []*AttachedDisk `json:"disks,omitempty"` - - // GuestAccelerators: A list of guest accelerator cards' type and count - // to use for instances created from the instance template. - GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` - - // Labels: Labels to apply to instances that are created from this - // template. - Labels map[string]string `json:"labels,omitempty"` - - // MachineType: The machine type to use for instances that are created - // from this template. - MachineType string `json:"machineType,omitempty"` - - // Metadata: The metadata key/value pairs to assign to instances that - // are created from this template. These pairs can consist of custom - // metadata or predefined keys. See Project and instance metadata for - // more information. - Metadata *Metadata `json:"metadata,omitempty"` - - // MinCpuPlatform: Minimum cpu/platform to be used by this instance. The - // instance may be scheduled on the specified or newer cpu/platform. - // Applicable values are the friendly names of CPU platforms, such as - // minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy - // Bridge". For more information, read Specifying a Minimum CPU - // Platform. - MinCpuPlatform string `json:"minCpuPlatform,omitempty"` - - // NetworkInterfaces: An array of network access configurations for this - // interface. - NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` - - // Scheduling: Specifies the scheduling options for the instances that - // are created from this template. - Scheduling *Scheduling `json:"scheduling,omitempty"` - - // ServiceAccounts: A list of service accounts with specified scopes. - // Access tokens for these service accounts are available to the - // instances that are created from this template. Use metadata queries - // to obtain the access tokens for these instances. - ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"` - - // Tags: A list of tags to apply to the instances that are created from - // this template. The tags identify valid sources or targets for network - // firewalls. The setTags method can modify this list of tags. Each tag - // within the list must comply with RFC1035. - Tags *Tags `json:"tags,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CanIpForward") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CanIpForward") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceProperties) MarshalJSON() ([]byte, error) { - type noMethod InstanceProperties - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceReference struct { - // Instance: The URL for a specific instance. - Instance string `json:"instance,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instance") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instance") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceReference) MarshalJSON() ([]byte, error) { - type noMethod InstanceReference - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceTemplate: An Instance Template resource. -type InstanceTemplate struct { - // CreationTimestamp: [Output Only] The creation timestamp for this - // instance template in RFC3339 text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] A unique identifier for this instance template. The - // server defines this identifier. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] The resource type, which is always - // compute#instanceTemplate for instance templates. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource; provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Properties: The instance properties for this instance template. - Properties *InstanceProperties `json:"properties,omitempty"` - - // SelfLink: [Output Only] The URL for this instance template. The - // server defines this URL. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstanceTemplate) MarshalJSON() ([]byte, error) { - type noMethod InstanceTemplate - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceTemplateList: A list of instance templates. -type InstanceTemplateList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InstanceTemplate resources. - Items []*InstanceTemplate `json:"items,omitempty"` - - // Kind: [Output Only] The resource type, which is always - // compute#instanceTemplatesListResponse for instance template lists. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceTemplateList) MarshalJSON() ([]byte, error) { - type noMethod InstanceTemplateList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceWithNamedPorts struct { - // Instance: [Output Only] The URL of the instance. - Instance string `json:"instance,omitempty"` - - // NamedPorts: [Output Only] The named ports that belong to this - // instance group. - NamedPorts []*NamedPort `json:"namedPorts,omitempty"` - - // Status: [Output Only] The status of the instance. - // - // Possible values: - // "PROVISIONING" - // "RUNNING" - // "STAGING" - // "STOPPED" - // "STOPPING" - // "SUSPENDED" - // "SUSPENDING" - // "TERMINATED" - Status string `json:"status,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instance") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instance") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceWithNamedPorts) MarshalJSON() ([]byte, error) { - type noMethod InstanceWithNamedPorts - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstancesScopedList struct { - // Instances: [Output Only] List of instances contained in this scope. - Instances []*Instance `json:"instances,omitempty"` - - // Warning: [Output Only] Informational warning which replaces the list - // of instances when the list is empty. - Warning *InstancesScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstancesScopedList) MarshalJSON() ([]byte, error) { - type noMethod InstancesScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstancesScopedListWarning: [Output Only] Informational warning which -// replaces the list of instances when the list is empty. -type InstancesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*InstancesScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstancesScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod InstancesScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstancesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstancesScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod InstancesScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstancesSetLabelsRequest struct { - // LabelFingerprint: Fingerprint of the previous set of labels for this - // resource, used to prevent conflicts. Provide the latest fingerprint - // value when making a request to add or change labels. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - Labels map[string]string `json:"labels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LabelFingerprint") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "LabelFingerprint") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstancesSetLabelsRequest) MarshalJSON() ([]byte, error) { - type noMethod InstancesSetLabelsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstancesSetMachineResourcesRequest struct { - // GuestAccelerators: List of the type and count of accelerator cards - // attached to the instance. - GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` - - // ForceSendFields is a list of field names (e.g. "GuestAccelerators") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "GuestAccelerators") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstancesSetMachineResourcesRequest) MarshalJSON() ([]byte, error) { - type noMethod InstancesSetMachineResourcesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstancesSetMachineTypeRequest struct { - // MachineType: Full or partial URL of the machine type resource. See - // Machine Types for a full list of machine types. For example: - // zones/us-central1-f/machineTypes/n1-standard-1 - MachineType string `json:"machineType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MachineType") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "MachineType") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstancesSetMachineTypeRequest) MarshalJSON() ([]byte, error) { - type noMethod InstancesSetMachineTypeRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstancesSetMinCpuPlatformRequest struct { - // MinCpuPlatform: Minimum cpu/platform this instance should be started - // at. - MinCpuPlatform string `json:"minCpuPlatform,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MinCpuPlatform") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "MinCpuPlatform") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstancesSetMinCpuPlatformRequest) MarshalJSON() ([]byte, error) { - type noMethod InstancesSetMinCpuPlatformRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstancesSetServiceAccountRequest struct { - // Email: Email address of the service account. - Email string `json:"email,omitempty"` - - // Scopes: The list of scopes to be made available for this service - // account. - Scopes []string `json:"scopes,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Email") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Email") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstancesSetServiceAccountRequest) MarshalJSON() ([]byte, error) { - type noMethod InstancesSetServiceAccountRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstancesStartWithEncryptionKeyRequest struct { - // Disks: Array of disks associated with this instance that are - // protected with a customer-supplied encryption key. - // - // In order to start the instance, the disk url and its corresponding - // key must be provided. - // - // If the disk is not protected with a customer-supplied encryption key - // it should not be specified. - Disks []*CustomerEncryptionKeyProtectedDisk `json:"disks,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Disks") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Disks") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstancesStartWithEncryptionKeyRequest) MarshalJSON() ([]byte, error) { - type noMethod InstancesStartWithEncryptionKeyRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// License: A license resource. -type License struct { - // ChargesUseFee: [Output Only] Deprecated. This field no longer - // reflects whether a license charges a usage fee. - ChargesUseFee bool `json:"chargesUseFee,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#license for - // licenses. - Kind string `json:"kind,omitempty"` - - // Name: [Output Only] Name of the resource. The name is 1-63 characters - // long and complies with RFC1035. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ChargesUseFee") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ChargesUseFee") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *License) MarshalJSON() ([]byte, error) { - type noMethod License - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// LogConfig: Specifies what kind of log the caller must write -type LogConfig struct { - // CloudAudit: Cloud audit options. - CloudAudit *LogConfigCloudAuditOptions `json:"cloudAudit,omitempty"` - - // Counter: Counter options. - Counter *LogConfigCounterOptions `json:"counter,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CloudAudit") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CloudAudit") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *LogConfig) MarshalJSON() ([]byte, error) { - type noMethod LogConfig - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// LogConfigCloudAuditOptions: Write a Cloud Audit log -type LogConfigCloudAuditOptions struct { - // AuthorizationLoggingOptions: Information used by the Cloud Audit - // Logging pipeline. - AuthorizationLoggingOptions *AuthorizationLoggingOptions `json:"authorizationLoggingOptions,omitempty"` - - // LogName: The log_name to populate in the Cloud Audit Record. - // - // Possible values: - // "ADMIN_ACTIVITY" - // "DATA_ACCESS" - // "UNSPECIFIED_LOG_NAME" - LogName string `json:"logName,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "AuthorizationLoggingOptions") to unconditionally include in API - // requests. By default, fields with empty values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. - // "AuthorizationLoggingOptions") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *LogConfigCloudAuditOptions) MarshalJSON() ([]byte, error) { - type noMethod LogConfigCloudAuditOptions - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// LogConfigCounterOptions: Options for counters -type LogConfigCounterOptions struct { - // Field: The field value to attribute. - Field string `json:"field,omitempty"` - - // Metric: The metric to update. - Metric string `json:"metric,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Field") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Field") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *LogConfigCounterOptions) MarshalJSON() ([]byte, error) { - type noMethod LogConfigCounterOptions - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// MachineType: A Machine Type resource. -type MachineType struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Deprecated: [Output Only] The deprecation status associated with this - // machine type. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - - // Description: [Output Only] An optional textual description of the - // resource. - Description string `json:"description,omitempty"` - - // GuestCpus: [Output Only] The number of virtual CPUs that are - // available to the instance. - GuestCpus int64 `json:"guestCpus,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // IsSharedCpu: [Output Only] Whether this machine type has a shared - // CPU. See Shared-core machine types for more information. - IsSharedCpu bool `json:"isSharedCpu,omitempty"` - - // Kind: [Output Only] The type of the resource. Always - // compute#machineType for machine types. - Kind string `json:"kind,omitempty"` - - // MaximumPersistentDisks: [Output Only] Maximum persistent disks - // allowed. - MaximumPersistentDisks int64 `json:"maximumPersistentDisks,omitempty"` - - // MaximumPersistentDisksSizeGb: [Output Only] Maximum total persistent - // disks size (GB) allowed. - MaximumPersistentDisksSizeGb int64 `json:"maximumPersistentDisksSizeGb,omitempty,string"` - - // MemoryMb: [Output Only] The amount of physical memory available to - // the instance, defined in MB. - MemoryMb int64 `json:"memoryMb,omitempty"` - - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Zone: [Output Only] The name of the zone where the machine type - // resides, such as us-central1-a. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *MachineType) MarshalJSON() ([]byte, error) { - type noMethod MachineType - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type MachineTypeAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of MachineTypesScopedList resources. - Items map[string]MachineTypesScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#machineTypeAggregatedList for aggregated lists of machine - // types. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *MachineTypeAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod MachineTypeAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// MachineTypeList: Contains a list of machine types. -type MachineTypeList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of MachineType resources. - Items []*MachineType `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#machineTypeList - // for lists of machine types. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *MachineTypeList) MarshalJSON() ([]byte, error) { - type noMethod MachineTypeList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type MachineTypesScopedList struct { - // MachineTypes: [Output Only] List of machine types contained in this - // scope. - MachineTypes []*MachineType `json:"machineTypes,omitempty"` - - // Warning: [Output Only] An informational warning that appears when the - // machine types list is empty. - Warning *MachineTypesScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MachineTypes") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "MachineTypes") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *MachineTypesScopedList) MarshalJSON() ([]byte, error) { - type noMethod MachineTypesScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// MachineTypesScopedListWarning: [Output Only] An informational warning -// that appears when the machine types list is empty. -type MachineTypesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*MachineTypesScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *MachineTypesScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod MachineTypesScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type MachineTypesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *MachineTypesScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod MachineTypesScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ManagedInstance struct { - // CurrentAction: [Output Only] The current action that the managed - // instance group has scheduled for the instance. Possible values: - // - NONE The instance is running, and the managed instance group does - // not have any scheduled actions for this instance. - // - CREATING The managed instance group is creating this instance. If - // the group fails to create this instance, it will try again until it - // is successful. - // - CREATING_WITHOUT_RETRIES The managed instance group is attempting - // to create this instance only once. If the group fails to create this - // instance, it does not try again and the group's targetSize value is - // decreased instead. - // - RECREATING The managed instance group is recreating this instance. - // - // - DELETING The managed instance group is permanently deleting this - // instance. - // - ABANDONING The managed instance group is abandoning this instance. - // The instance will be removed from the instance group and from any - // target pools that are associated with this group. - // - RESTARTING The managed instance group is restarting the instance. - // - // - REFRESHING The managed instance group is applying configuration - // changes to the instance without stopping it. For example, the group - // can update the target pool list for an instance without stopping that - // instance. - // - // Possible values: - // "ABANDONING" - // "CREATING" - // "CREATING_WITHOUT_RETRIES" - // "DELETING" - // "NONE" - // "RECREATING" - // "REFRESHING" - // "RESTARTING" - // "VERIFYING" - CurrentAction string `json:"currentAction,omitempty"` - - // Id: [Output only] The unique identifier for this resource. This field - // is empty when instance does not exist. - Id uint64 `json:"id,omitempty,string"` - - // Instance: [Output Only] The URL of the instance. The URL can exist - // even if the instance has not yet been created. - Instance string `json:"instance,omitempty"` - - // InstanceStatus: [Output Only] The status of the instance. This field - // is empty when the instance does not exist. - // - // Possible values: - // "PROVISIONING" - // "RUNNING" - // "STAGING" - // "STOPPED" - // "STOPPING" - // "SUSPENDED" - // "SUSPENDING" - // "TERMINATED" - InstanceStatus string `json:"instanceStatus,omitempty"` - - // LastAttempt: [Output Only] Information about the last attempt to - // create or delete the instance. - LastAttempt *ManagedInstanceLastAttempt `json:"lastAttempt,omitempty"` - - // Version: [Output Only] Intended version of this instance. - Version *ManagedInstanceVersion `json:"version,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CurrentAction") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CurrentAction") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ManagedInstance) MarshalJSON() ([]byte, error) { - type noMethod ManagedInstance - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ManagedInstanceLastAttempt struct { - // Errors: [Output Only] Encountered errors during the last attempt to - // create or delete the instance. - Errors *ManagedInstanceLastAttemptErrors `json:"errors,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Errors") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ManagedInstanceLastAttempt) MarshalJSON() ([]byte, error) { - type noMethod ManagedInstanceLastAttempt - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ManagedInstanceLastAttemptErrors: [Output Only] Encountered errors -// during the last attempt to create or delete the instance. -type ManagedInstanceLastAttemptErrors struct { - // Errors: [Output Only] The array of errors encountered while - // processing this operation. - Errors []*ManagedInstanceLastAttemptErrorsErrors `json:"errors,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Errors") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ManagedInstanceLastAttemptErrors) MarshalJSON() ([]byte, error) { - type noMethod ManagedInstanceLastAttemptErrors - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ManagedInstanceLastAttemptErrorsErrors struct { - // Code: [Output Only] The error type identifier for this error. - Code string `json:"code,omitempty"` - - // Location: [Output Only] Indicates the field in the request that - // caused the error. This property is optional. - Location string `json:"location,omitempty"` - - // Message: [Output Only] An optional, human-readable error message. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ManagedInstanceLastAttemptErrorsErrors) MarshalJSON() ([]byte, error) { - type noMethod ManagedInstanceLastAttemptErrorsErrors - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ManagedInstanceVersion struct { - // InstanceTemplate: [Output Only] The intended template of the - // instance. This field is empty when current_action is one of { - // DELETING, ABANDONING }. - InstanceTemplate string `json:"instanceTemplate,omitempty"` - - // Name: [Output Only] Name of the version. - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InstanceTemplate") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "InstanceTemplate") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ManagedInstanceVersion) MarshalJSON() ([]byte, error) { - type noMethod ManagedInstanceVersion - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Metadata: A metadata key/value entry. -type Metadata struct { - // Fingerprint: Specifies a fingerprint for this request, which is - // essentially a hash of the metadata's contents and used for optimistic - // locking. The fingerprint is initially generated by Compute Engine and - // changes after every request to modify or update metadata. You must - // always provide an up-to-date fingerprint hash in order to update or - // change metadata. - Fingerprint string `json:"fingerprint,omitempty"` - - // Items: Array of key/value pairs. The total size of all keys and - // values must be less than 512 KB. - Items []*MetadataItems `json:"items,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#metadata for - // metadata. - Kind string `json:"kind,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Fingerprint") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Metadata) MarshalJSON() ([]byte, error) { - type noMethod Metadata - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type MetadataItems struct { - // Key: Key for the metadata entry. Keys must conform to the following - // regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is - // reflected as part of a URL in the metadata server. Additionally, to - // avoid ambiguity, keys must not conflict with any other metadata keys - // for the project. - Key string `json:"key,omitempty"` - - // Value: Value for the metadata entry. These are free-form strings, and - // only have meaning as interpreted by the image running in the - // instance. The only restriction placed on values is that their size - // must be less than or equal to 262144 bytes (256 KiB). - Value *string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *MetadataItems) MarshalJSON() ([]byte, error) { - type noMethod MetadataItems - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// NamedPort: The named port. For example: . -type NamedPort struct { - // Name: The name for this named port. The name must be 1-63 characters - // long, and comply with RFC1035. - Name string `json:"name,omitempty"` - - // Port: The port number, which can be a value between 1 and 65535. - Port int64 `json:"port,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Name") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *NamedPort) MarshalJSON() ([]byte, error) { - type noMethod NamedPort - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Network: Represents a Network resource. Read Networks and Firewalls -// for more information. -type Network struct { - // IPv4Range: The range of internal addresses that are legal on this - // network. This range is a CIDR specification, for example: - // 192.168.0.0/16. Provided by the client when the network is created. - IPv4Range string `json:"IPv4Range,omitempty"` - - // AutoCreateSubnetworks: When set to true, the network is created in - // "auto subnet mode". When set to false, the network is in "custom - // subnet mode". - // - // In "auto subnet mode", a newly created network is assigned the - // default CIDR of 10.128.0.0/9 and it automatically creates one - // subnetwork per region. - AutoCreateSubnetworks bool `json:"autoCreateSubnetworks,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // GatewayIPv4: A gateway address for default routing to other networks. - // This value is read only and is selected by the Google Compute Engine, - // typically as the first usable address in the IPv4Range. - GatewayIPv4 string `json:"gatewayIPv4,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#network for - // networks. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Peerings: [Output Only] List of network peerings for the resource. - Peerings []*NetworkPeering `json:"peerings,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Subnetworks: [Output Only] Server-defined fully-qualified URLs for - // all subnetworks in this network. - Subnetworks []string `json:"subnetworks,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "IPv4Range") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IPv4Range") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Network) MarshalJSON() ([]byte, error) { - type noMethod Network - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// NetworkInterface: A network interface resource attached to an -// instance. -type NetworkInterface struct { - // AccessConfigs: An array of configurations for this interface. - // Currently, only one access config, ONE_TO_ONE_NAT, is supported. If - // there are no accessConfigs specified, then this instance will have no - // external internet access. - AccessConfigs []*AccessConfig `json:"accessConfigs,omitempty"` - - // AliasIpRanges: An array of alias IP ranges for this network - // interface. Can only be specified for network interfaces on - // subnet-mode networks. - AliasIpRanges []*AliasIpRange `json:"aliasIpRanges,omitempty"` - - // Kind: [Output Only] Type of the resource. Always - // compute#networkInterface for network interfaces. - Kind string `json:"kind,omitempty"` - - // Name: [Output Only] The name of the network interface, generated by - // the server. For network devices, these are eth0, eth1, etc. - Name string `json:"name,omitempty"` - - // Network: URL of the network resource for this instance. When creating - // an instance, if neither the network nor the subnetwork is specified, - // the default network global/networks/default is used; if the network - // is not specified but the subnetwork is specified, the network is - // inferred. - // - // This field is optional when creating a firewall rule. If not - // specified when creating a firewall rule, the default network - // global/networks/default is used. - // - // If you specify this property, you can specify the network as a full - // or partial URL. For example, the following are all valid URLs: - // - - // https://www.googleapis.com/compute/v1/projects/project/global/networks/network - // - projects/project/global/networks/network - // - global/networks/default - Network string `json:"network,omitempty"` - - // NetworkIP: An IPv4 internal network address to assign to the instance - // for this network interface. If not specified by the user, an unused - // internal IP is assigned by the system. - NetworkIP string `json:"networkIP,omitempty"` - - // Subnetwork: The URL of the Subnetwork resource for this instance. If - // the network resource is in legacy mode, do not provide this property. - // If the network is in auto subnet mode, providing the subnetwork is - // optional. If the network is in custom subnet mode, then this field - // should be specified. If you specify this property, you can specify - // the subnetwork as a full or partial URL. For example, the following - // are all valid URLs: - // - - // https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork - // - regions/region/subnetworks/subnetwork - Subnetwork string `json:"subnetwork,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AccessConfigs") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AccessConfigs") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *NetworkInterface) MarshalJSON() ([]byte, error) { - type noMethod NetworkInterface - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// NetworkList: Contains a list of networks. -type NetworkList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Network resources. - Items []*Network `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#networkList for - // lists of networks. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *NetworkList) MarshalJSON() ([]byte, error) { - type noMethod NetworkList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// NetworkPeering: A network peering attached to a network resource. The -// message includes the peering name, peer network, peering state, and a -// flag indicating whether Google Compute Engine should automatically -// create routes for the peering. -type NetworkPeering struct { - // AutoCreateRoutes: Whether full mesh connectivity is created and - // managed automatically. When it is set to true, Google Compute Engine - // will automatically create and manage the routes between two networks - // when the state is ACTIVE. Otherwise, user needs to create routes - // manually to route packets to peer network. - AutoCreateRoutes bool `json:"autoCreateRoutes,omitempty"` - - // Name: Name of this peering. Provided by the client when the peering - // is created. The name must comply with RFC1035. Specifically, the name - // must be 1-63 characters long and match regular expression - // [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a - // lowercase letter, and all the following characters must be a dash, - // lowercase letter, or digit, except the last character, which cannot - // be a dash. - Name string `json:"name,omitempty"` - - // Network: The URL of the peer network. It can be either full URL or - // partial URL. The peer network may belong to a different project. If - // the partial URL does not contain project, it is assumed that the peer - // network is in the same project as the current network. - Network string `json:"network,omitempty"` - - // State: [Output Only] State for the peering. - // - // Possible values: - // "ACTIVE" - // "INACTIVE" - State string `json:"state,omitempty"` - - // StateDetails: [Output Only] Details about the current state of the - // peering. - StateDetails string `json:"stateDetails,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AutoCreateRoutes") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AutoCreateRoutes") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *NetworkPeering) MarshalJSON() ([]byte, error) { - type noMethod NetworkPeering - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type NetworksAddPeeringRequest struct { - // AutoCreateRoutes: Whether Google Compute Engine manages the routes - // automatically. - AutoCreateRoutes bool `json:"autoCreateRoutes,omitempty"` - - // Name: Name of the peering, which should conform to RFC1035. - Name string `json:"name,omitempty"` - - // PeerNetwork: URL of the peer network. It can be either full URL or - // partial URL. The peer network may belong to a different project. If - // the partial URL does not contain project, it is assumed that the peer - // network is in the same project as the current network. - PeerNetwork string `json:"peerNetwork,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AutoCreateRoutes") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AutoCreateRoutes") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *NetworksAddPeeringRequest) MarshalJSON() ([]byte, error) { - type noMethod NetworksAddPeeringRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type NetworksRemovePeeringRequest struct { - // Name: Name of the peering, which should conform to RFC1035. - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Name") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *NetworksRemovePeeringRequest) MarshalJSON() ([]byte, error) { - type noMethod NetworksRemovePeeringRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Operation: An Operation resource, used to manage asynchronous API -// requests. -type Operation struct { - // ClientOperationId: [Output Only] Reserved for future use. - ClientOperationId string `json:"clientOperationId,omitempty"` - - // CreationTimestamp: [Deprecated] This field is deprecated. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: [Output Only] A textual description of the operation, - // which is set when the operation is created. - Description string `json:"description,omitempty"` - - // EndTime: [Output Only] The time that this operation was completed. - // This value is in RFC3339 text format. - EndTime string `json:"endTime,omitempty"` - - // Error: [Output Only] If errors are generated during processing of the - // operation, this field will be populated. - Error *OperationError `json:"error,omitempty"` - - // HttpErrorMessage: [Output Only] If the operation fails, this field - // contains the HTTP error message that was returned, such as NOT FOUND. - HttpErrorMessage string `json:"httpErrorMessage,omitempty"` - - // HttpErrorStatusCode: [Output Only] If the operation fails, this field - // contains the HTTP error status code that was returned. For example, a - // 404 means the resource was not found. - HttpErrorStatusCode int64 `json:"httpErrorStatusCode,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // InsertTime: [Output Only] The time that this operation was requested. - // This value is in RFC3339 text format. - InsertTime string `json:"insertTime,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#operation - // for Operation resources. - Kind string `json:"kind,omitempty"` - - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - - // OperationType: [Output Only] The type of operation, such as insert, - // update, or delete, and so on. - OperationType string `json:"operationType,omitempty"` - - // Progress: [Output Only] An optional progress indicator that ranges - // from 0 to 100. There is no requirement that this be linear or support - // any granularity of operations. This should not be used to guess when - // the operation will be complete. This number should monotonically - // increase as the operation progresses. - Progress int64 `json:"progress,omitempty"` - - // Region: [Output Only] The URL of the region where the operation - // resides. Only available when performing regional operations. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // StartTime: [Output Only] The time that this operation was started by - // the server. This value is in RFC3339 text format. - StartTime string `json:"startTime,omitempty"` - - // Status: [Output Only] The status of the operation, which can be one - // of the following: PENDING, RUNNING, or DONE. - // - // Possible values: - // "DONE" - // "PENDING" - // "RUNNING" - Status string `json:"status,omitempty"` - - // StatusMessage: [Output Only] An optional textual description of the - // current status of the operation. - StatusMessage string `json:"statusMessage,omitempty"` - - // TargetId: [Output Only] The unique target ID, which identifies a - // specific incarnation of the target resource. - TargetId uint64 `json:"targetId,omitempty,string"` - - // TargetLink: [Output Only] The URL of the resource that the operation - // modifies. For operations related to creating a snapshot, this points - // to the persistent disk that the snapshot was created from. - TargetLink string `json:"targetLink,omitempty"` - - // User: [Output Only] User who requested the operation, for example: - // user@example.com. - User string `json:"user,omitempty"` - - // Warnings: [Output Only] If warning messages are generated during - // processing of the operation, this field will be populated. - Warnings []*OperationWarnings `json:"warnings,omitempty"` - - // Zone: [Output Only] The URL of the zone where the operation resides. - // Only available when performing per-zone operations. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ClientOperationId") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ClientOperationId") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Operation) MarshalJSON() ([]byte, error) { - type noMethod Operation - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// OperationError: [Output Only] If errors are generated during -// processing of the operation, this field will be populated. -type OperationError struct { - // Errors: [Output Only] The array of errors encountered while - // processing this operation. - Errors []*OperationErrorErrors `json:"errors,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Errors") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationError) MarshalJSON() ([]byte, error) { - type noMethod OperationError - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationErrorErrors struct { - // Code: [Output Only] The error type identifier for this error. - Code string `json:"code,omitempty"` - - // Location: [Output Only] Indicates the field in the request that - // caused the error. This property is optional. - Location string `json:"location,omitempty"` - - // Message: [Output Only] An optional, human-readable error message. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationErrorErrors) MarshalJSON() ([]byte, error) { - type noMethod OperationErrorErrors - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationWarnings struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*OperationWarningsData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationWarnings) MarshalJSON() ([]byte, error) { - type noMethod OperationWarnings - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationWarningsData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationWarningsData) MarshalJSON() ([]byte, error) { - type noMethod OperationWarningsData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationAggregatedList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id string `json:"id,omitempty"` - - // Items: [Output Only] A map of scoped operation lists. - Items map[string]OperationsScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#operationAggregatedList for aggregated lists of operations. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod OperationAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// OperationList: Contains a list of Operation resources. -type OperationList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id string `json:"id,omitempty"` - - // Items: [Output Only] A list of Operation resources. - Items []*Operation `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#operations for - // Operations resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationList) MarshalJSON() ([]byte, error) { - type noMethod OperationList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationsScopedList struct { - // Operations: [Output Only] List of operations contained in this scope. - Operations []*Operation `json:"operations,omitempty"` - - // Warning: [Output Only] Informational warning which replaces the list - // of operations when the list is empty. - Warning *OperationsScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Operations") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Operations") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationsScopedList) MarshalJSON() ([]byte, error) { - type noMethod OperationsScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// OperationsScopedListWarning: [Output Only] Informational warning -// which replaces the list of operations when the list is empty. -type OperationsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*OperationsScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationsScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod OperationsScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationsScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod OperationsScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PathMatcher: A matcher for the path portion of the URL. The -// BackendService from the longest-matched rule will serve the URL. If -// no rule was matched, the default service will be used. -type PathMatcher struct { - // DefaultService: The full or partial URL to the BackendService - // resource. This will be used if none of the pathRules defined by this - // PathMatcher is matched by the URL's path portion. For example, the - // following are all valid URLs to a BackendService resource: - // - - // https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService - // - compute/v1/projects/project/global/backendServices/backendService - // - // - global/backendServices/backendService - DefaultService string `json:"defaultService,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Name: The name to which this PathMatcher is referred by the HostRule. - Name string `json:"name,omitempty"` - - // PathRules: The list of path rules. - PathRules []*PathRule `json:"pathRules,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DefaultService") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DefaultService") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *PathMatcher) MarshalJSON() ([]byte, error) { - type noMethod PathMatcher - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PathRule: A path-matching rule for a URL. If matched, will use the -// specified BackendService to handle the traffic arriving at this URL. -type PathRule struct { - // Paths: The list of path patterns to match. Each must start with / and - // the only place a * is allowed is at the end following a /. The string - // fed to the path matcher does not include any text after the first ? - // or #, and those chars are not allowed here. - Paths []string `json:"paths,omitempty"` - - // Service: The URL of the BackendService resource if this rule is - // matched. - Service string `json:"service,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Paths") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Paths") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *PathRule) MarshalJSON() ([]byte, error) { - type noMethod PathRule - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Policy: Defines an Identity and Access Management (IAM) policy. It is -// used to specify access control policies for Cloud Platform -// resources. -// -// -// -// A `Policy` consists of a list of `bindings`. A `Binding` binds a list -// of `members` to a `role`, where the members can be user accounts, -// Google groups, Google domains, and service accounts. A `role` is a -// named list of permissions defined by IAM. -// -// **Example** -// -// { "bindings": [ { "role": "roles/owner", "members": [ -// "user:mike@example.com", "group:admins@example.com", -// "domain:google.com", -// "serviceAccount:my-other-app@appspot.gserviceaccount.com", ] }, { -// "role": "roles/viewer", "members": ["user:sean@example.com"] } ] -// } -// -// For a description of IAM and its features, see the [IAM developer's -// guide](https://cloud.google.com/iam). -type Policy struct { - // AuditConfigs: Specifies cloud audit logging configuration for this - // policy. - AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` - - // Bindings: Associates a list of `members` to a `role`. `bindings` with - // no members will result in an error. - Bindings []*Binding `json:"bindings,omitempty"` - - // Etag: `etag` is used for optimistic concurrency control as a way to - // help prevent simultaneous updates of a policy from overwriting each - // other. It is strongly suggested that systems make use of the `etag` - // in the read-modify-write cycle to perform policy updates in order to - // avoid race conditions: An `etag` is returned in the response to - // `getIamPolicy`, and systems are expected to put that etag in the - // request to `setIamPolicy` to ensure that their change will be applied - // to the same version of the policy. - // - // If no `etag` is provided in the call to `setIamPolicy`, then the - // existing policy is overwritten blindly. - Etag string `json:"etag,omitempty"` - - IamOwned bool `json:"iamOwned,omitempty"` - - // Rules: If more than one rule is specified, the rules are applied in - // the following manner: - All matching LOG rules are always applied. - - // If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging - // will be applied if one or more matching rule requires logging. - - // Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is - // granted. Logging will be applied if one or more matching rule - // requires logging. - Otherwise, if no rule applies, permission is - // denied. - Rules []*Rule `json:"rules,omitempty"` - - // Version: Version of the `Policy`. The default version is 0. - Version int64 `json:"version,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "AuditConfigs") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AuditConfigs") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Policy) MarshalJSON() ([]byte, error) { - type noMethod Policy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Project: A Project resource. Projects can only be created in the -// Google Cloud Platform Console. Unless marked otherwise, values can -// only be modified in the console. -type Project struct { - // CommonInstanceMetadata: Metadata key/value pairs available to all - // instances contained in this project. See Custom metadata for more - // information. - CommonInstanceMetadata *Metadata `json:"commonInstanceMetadata,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // DefaultServiceAccount: [Output Only] Default service account used by - // VMs running in this project. - DefaultServiceAccount string `json:"defaultServiceAccount,omitempty"` - - // Description: An optional textual description of the resource. - Description string `json:"description,omitempty"` - - // EnabledFeatures: Restricted features enabled for use on this project. - EnabledFeatures []string `json:"enabledFeatures,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. This is not the project ID, and - // is just a unique ID used by Compute Engine to identify resources. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#project for - // projects. - Kind string `json:"kind,omitempty"` - - // Name: The project ID. For example: my-example-project. Use the - // project ID to make requests to Compute Engine. - Name string `json:"name,omitempty"` - - // Quotas: [Output Only] Quotas assigned to this project. - Quotas []*Quota `json:"quotas,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // UsageExportLocation: The naming prefix for daily usage reports and - // the Google Cloud Storage bucket where they are stored. - UsageExportLocation *UsageExportLocation `json:"usageExportLocation,omitempty"` - - // XpnProjectStatus: [Output Only] The role this project has in a shared - // VPC configuration. Currently only HOST projects are differentiated. - // - // Possible values: - // "HOST" - // "UNSPECIFIED_XPN_PROJECT_STATUS" - XpnProjectStatus string `json:"xpnProjectStatus,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. - // "CommonInstanceMetadata") to unconditionally include in API requests. - // By default, fields with empty values are omitted from API requests. - // However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CommonInstanceMetadata") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Project) MarshalJSON() ([]byte, error) { - type noMethod Project - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ProjectsDisableXpnResourceRequest struct { - // XpnResource: Service resource (a.k.a service project) ID. - XpnResource *XpnResourceId `json:"xpnResource,omitempty"` - - // ForceSendFields is a list of field names (e.g. "XpnResource") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "XpnResource") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ProjectsDisableXpnResourceRequest) MarshalJSON() ([]byte, error) { - type noMethod ProjectsDisableXpnResourceRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ProjectsEnableXpnResourceRequest struct { - // XpnResource: Service resource (a.k.a service project) ID. - XpnResource *XpnResourceId `json:"xpnResource,omitempty"` - - // ForceSendFields is a list of field names (e.g. "XpnResource") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "XpnResource") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ProjectsEnableXpnResourceRequest) MarshalJSON() ([]byte, error) { - type noMethod ProjectsEnableXpnResourceRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ProjectsGetXpnResources struct { - // Kind: [Output Only] Type of resource. Always - // compute#projectsGetXpnResources for lists of service resources (a.k.a - // service projects) - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Resources: Serive resources (a.k.a service projects) attached to this - // project as their shared VPC host. - Resources []*XpnResourceId `json:"resources,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Kind") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Kind") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ProjectsGetXpnResources) MarshalJSON() ([]byte, error) { - type noMethod ProjectsGetXpnResources - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ProjectsListXpnHostsRequest struct { - // Organization: Optional organization ID managed by Cloud Resource - // Manager, for which to list shared VPC host projects. If not - // specified, the organization will be inferred from the project. - Organization string `json:"organization,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Organization") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Organization") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ProjectsListXpnHostsRequest) MarshalJSON() ([]byte, error) { - type noMethod ProjectsListXpnHostsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Quota: A quotas entry. -type Quota struct { - // Limit: [Output Only] Quota limit for this metric. - Limit float64 `json:"limit,omitempty"` - - // Metric: [Output Only] Name of the quota metric. - // - // Possible values: - // "AUTOSCALERS" - // "BACKEND_BUCKETS" - // "BACKEND_SERVICES" - // "COMMITMENTS" - // "CPUS" - // "CPUS_ALL_REGIONS" - // "DISKS_TOTAL_GB" - // "FIREWALLS" - // "FORWARDING_RULES" - // "HEALTH_CHECKS" - // "IMAGES" - // "INSTANCES" - // "INSTANCE_GROUPS" - // "INSTANCE_GROUP_MANAGERS" - // "INSTANCE_TEMPLATES" - // "IN_USE_ADDRESSES" - // "LOCAL_SSD_TOTAL_GB" - // "NETWORKS" - // "NVIDIA_K80_GPUS" - // "PREEMPTIBLE_CPUS" - // "PREEMPTIBLE_LOCAL_SSD_GB" - // "REGIONAL_AUTOSCALERS" - // "REGIONAL_INSTANCE_GROUP_MANAGERS" - // "ROUTERS" - // "ROUTES" - // "SECURITY_POLICIES" - // "SECURITY_POLICY_RULES" - // "SNAPSHOTS" - // "SSD_TOTAL_GB" - // "SSL_CERTIFICATES" - // "STATIC_ADDRESSES" - // "SUBNETWORKS" - // "TARGET_HTTPS_PROXIES" - // "TARGET_HTTP_PROXIES" - // "TARGET_INSTANCES" - // "TARGET_POOLS" - // "TARGET_SSL_PROXIES" - // "TARGET_VPN_GATEWAYS" - // "URL_MAPS" - // "VPN_TUNNELS" - Metric string `json:"metric,omitempty"` - - // Usage: [Output Only] Current usage of this metric. - Usage float64 `json:"usage,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Limit") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Limit") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Quota) MarshalJSON() ([]byte, error) { - type noMethod Quota - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *Quota) UnmarshalJSON(data []byte) error { - type noMethod Quota - var s1 struct { - Limit gensupport.JSONFloat64 `json:"limit"` - Usage gensupport.JSONFloat64 `json:"usage"` - *noMethod - } - s1.noMethod = (*noMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Limit = float64(s1.Limit) - s.Usage = float64(s1.Usage) - return nil -} - -// Reference: Represents a reference to a resource. -type Reference struct { - // Kind: [Output Only] Type of the resource. Always compute#reference - // for references. - Kind string `json:"kind,omitempty"` - - // ReferenceType: A description of the reference type with no implied - // semantics. Possible values include: - // - MEMBER_OF - ReferenceType string `json:"referenceType,omitempty"` - - // Referrer: URL of the resource which refers to the target. - Referrer string `json:"referrer,omitempty"` - - // Target: URL of the resource to which this reference points. - Target string `json:"target,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Kind") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Kind") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Reference) MarshalJSON() ([]byte, error) { - type noMethod Reference - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Region: Region resource. -type Region struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Deprecated: [Output Only] The deprecation status associated with this - // region. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - - // Description: [Output Only] Textual description of the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#region for - // regions. - Kind string `json:"kind,omitempty"` - - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - - // Quotas: [Output Only] Quotas assigned to this region. - Quotas []*Quota `json:"quotas,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Status: [Output Only] Status of the region, either UP or DOWN. - // - // Possible values: - // "DOWN" - // "UP" - Status string `json:"status,omitempty"` - - // Zones: [Output Only] A list of zones available in this region, in the - // form of resource URLs. - Zones []string `json:"zones,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Region) MarshalJSON() ([]byte, error) { - type noMethod Region - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RegionAutoscalerList: Contains a list of autoscalers. -type RegionAutoscalerList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Autoscaler resources. - Items []*Autoscaler `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionAutoscalerList) MarshalJSON() ([]byte, error) { - type noMethod RegionAutoscalerList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupList: Contains a list of InstanceGroup resources. -type RegionInstanceGroupList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InstanceGroup resources. - Items []*InstanceGroup `json:"items,omitempty"` - - // Kind: The resource type. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupList) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupManagerList: Contains a list of managed instance -// groups. -type RegionInstanceGroupManagerList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InstanceGroupManager resources. - Items []*InstanceGroupManager `json:"items,omitempty"` - - // Kind: [Output Only] The resource type, which is always - // compute#instanceGroupManagerList for a list of managed instance - // groups that exist in th regional scope. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagerList) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupManagerList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersAbandonInstancesRequest struct { - // Instances: The URLs of one or more instances to abandon. This can be - // a full URL or a partial URL, such as - // zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagersAbandonInstancesRequest) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupManagersAbandonInstancesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersDeleteInstancesRequest struct { - // Instances: The URLs of one or more instances to delete. This can be a - // full URL or a partial URL, such as - // zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagersDeleteInstancesRequest) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupManagersDeleteInstancesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersListInstancesResponse struct { - // ManagedInstances: List of managed instances. - ManagedInstances []*ManagedInstance `json:"managedInstances,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ManagedInstances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ManagedInstances") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagersListInstancesResponse) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupManagersListInstancesResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersRecreateRequest struct { - // Instances: The URLs of one or more instances to recreate. This can be - // a full URL or a partial URL, such as - // zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagersRecreateRequest) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupManagersRecreateRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersSetAutoHealingRequest struct { - AutoHealingPolicies []*InstanceGroupManagerAutoHealingPolicy `json:"autoHealingPolicies,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AutoHealingPolicies") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AutoHealingPolicies") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagersSetAutoHealingRequest) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupManagersSetAutoHealingRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersSetTargetPoolsRequest struct { - // Fingerprint: Fingerprint of the target pools information, which is a - // hash of the contents. This field is used for optimistic locking when - // you update the target pool entries. This field is optional. - Fingerprint string `json:"fingerprint,omitempty"` - - // TargetPools: The URL of all TargetPool resources to which instances - // in the instanceGroup field are added. The target pools automatically - // apply to all of the instances in the managed instance group. - TargetPools []string `json:"targetPools,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Fingerprint") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagersSetTargetPoolsRequest) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupManagersSetTargetPoolsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersSetTemplateRequest struct { - // InstanceTemplate: URL of the InstanceTemplate resource from which all - // new instances will be created. - InstanceTemplate string `json:"instanceTemplate,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InstanceTemplate") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "InstanceTemplate") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagersSetTemplateRequest) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupManagersSetTemplateRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupsListInstances struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InstanceWithNamedPorts resources. - Items []*InstanceWithNamedPorts `json:"items,omitempty"` - - // Kind: The resource type. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupsListInstances) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupsListInstances - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupsListInstancesRequest struct { - // InstanceState: Instances in which state should be returned. Valid - // options are: 'ALL', 'RUNNING'. By default, it lists all instances. - // - // Possible values: - // "ALL" - // "RUNNING" - InstanceState string `json:"instanceState,omitempty"` - - // PortName: Name of port user is interested in. It is optional. If it - // is set, only information about this ports will be returned. If it is - // not set, all the named ports will be returned. Always lists all - // instances. - PortName string `json:"portName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InstanceState") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "InstanceState") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupsListInstancesRequest) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupsListInstancesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupsSetNamedPortsRequest struct { - // Fingerprint: The fingerprint of the named ports information for this - // instance group. Use this optional property to prevent conflicts when - // multiple users change the named ports settings concurrently. Obtain - // the fingerprint with the instanceGroups.get method. Then, include the - // fingerprint in your request to ensure that you do not overwrite - // changes that were applied from another concurrent request. - Fingerprint string `json:"fingerprint,omitempty"` - - // NamedPorts: The list of named ports to set for this instance group. - NamedPorts []*NamedPort `json:"namedPorts,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Fingerprint") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupsSetNamedPortsRequest) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupsSetNamedPortsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RegionList: Contains a list of region resources. -type RegionList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Region resources. - Items []*Region `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#regionList for - // lists of regions. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionList) MarshalJSON() ([]byte, error) { - type noMethod RegionList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionSetLabelsRequest struct { - // LabelFingerprint: The fingerprint of the previous set of labels for - // this resource, used to detect conflicts. The fingerprint is initially - // generated by Compute Engine and changes after every request to modify - // or update labels. You must always provide an up-to-date fingerprint - // hash in order to update or change labels. Make a get() request to the - // resource to get the latest fingerprint. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // Labels: The labels to set for this resource. - Labels map[string]string `json:"labels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LabelFingerprint") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "LabelFingerprint") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *RegionSetLabelsRequest) MarshalJSON() ([]byte, error) { - type noMethod RegionSetLabelsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ResourceCommitment: Commitment for a particular resource (a -// Commitment is composed of one or more of these). -type ResourceCommitment struct { - // Amount: The amount of the resource purchased (in a type-dependent - // unit, such as bytes). For vCPUs, this can just be an integer. For - // memory, this must be provided in MB. Memory must be a multiple of 256 - // MB, with up to 6.5GB of memory per every vCPU. - Amount int64 `json:"amount,omitempty,string"` - - // Type: Type of resource for which this commitment applies. Possible - // values are VCPU and MEMORY - // - // Possible values: - // "MEMORY" - // "UNSPECIFIED" - // "VCPU" - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Amount") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Amount") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ResourceCommitment) MarshalJSON() ([]byte, error) { - type noMethod ResourceCommitment - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ResourceGroupReference struct { - // Group: A URI referencing one of the instance groups listed in the - // backend service. - Group string `json:"group,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Group") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Group") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ResourceGroupReference) MarshalJSON() ([]byte, error) { - type noMethod ResourceGroupReference - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Route: Represents a Route resource. A route specifies how certain -// packets should be handled by the network. Routes are associated with -// instances by tags and the set of routes for a particular instance is -// called its routing table. -// -// For each packet leaving an instance, the system searches that -// instance's routing table for a single best matching route. Routes -// match packets by destination IP address, preferring smaller or more -// specific ranges over larger ones. If there is a tie, the system -// selects the route with the smallest priority value. If there is still -// a tie, it uses the layer three and four packet headers to select just -// one of the remaining matching routes. The packet is then forwarded as -// specified by the nextHop field of the winning route - either to -// another instance destination, an instance gateway, or a Google -// Compute Engine-operated gateway. -// -// Packets that do not match any route in the sending instance's routing -// table are dropped. -type Route struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // DestRange: The destination range of outgoing packets that this route - // applies to. Only IPv4 is supported. - DestRange string `json:"destRange,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of this resource. Always compute#routes for - // Route resources. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Network: Fully-qualified URL of the network that this route applies - // to. - Network string `json:"network,omitempty"` - - // NextHopGateway: The URL to a gateway that should handle matching - // packets. You can only specify the internet gateway using a full or - // partial valid URL: - // projects/<project-id>/global/gateways/default-internet-gateway - NextHopGateway string `json:"nextHopGateway,omitempty"` - - // NextHopInstance: The URL to an instance that should handle matching - // packets. You can specify this as a full or partial URL. For - // example: - // https://www.googleapis.com/compute/v1/projects/project/zones/ - // zone/instances/ - NextHopInstance string `json:"nextHopInstance,omitempty"` - - // NextHopIp: The network IP address of an instance that should handle - // matching packets. Only IPv4 is supported. - NextHopIp string `json:"nextHopIp,omitempty"` - - // NextHopNetwork: The URL of the local network if it should handle - // matching packets. - NextHopNetwork string `json:"nextHopNetwork,omitempty"` - - // NextHopPeering: [Output Only] The network peering name that should - // handle matching packets, which should conform to RFC1035. - NextHopPeering string `json:"nextHopPeering,omitempty"` - - // NextHopVpnTunnel: The URL to a VpnTunnel that should handle matching - // packets. - NextHopVpnTunnel string `json:"nextHopVpnTunnel,omitempty"` - - // Priority: The priority of this route. Priority is used to break ties - // in cases where there is more than one matching route of equal prefix - // length. In the case of two routes with equal prefix length, the one - // with the lowest-numbered priority value wins. Default value is 1000. - // Valid range is 0 through 65535. - Priority int64 `json:"priority,omitempty"` - - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - - // Tags: A list of instance tags to which this route applies. - Tags []string `json:"tags,omitempty"` - - // Warnings: [Output Only] If potential misconfigurations are detected - // for this route, this field will be populated with warning messages. - Warnings []*RouteWarnings `json:"warnings,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Route) MarshalJSON() ([]byte, error) { - type noMethod Route - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RouteWarnings struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*RouteWarningsData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RouteWarnings) MarshalJSON() ([]byte, error) { - type noMethod RouteWarnings - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RouteWarningsData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RouteWarningsData) MarshalJSON() ([]byte, error) { - type noMethod RouteWarningsData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RouteList: Contains a list of Route resources. -type RouteList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Route resources. - Items []*Route `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RouteList) MarshalJSON() ([]byte, error) { - type noMethod RouteList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Router: Router resource. -type Router struct { - // Bgp: BGP information specific to this router. - Bgp *RouterBgp `json:"bgp,omitempty"` - - // BgpPeers: BGP information that needs to be configured into the - // routing stack to establish the BGP peering. It must specify peer ASN - // and either interface name, IP, or peer IP. Please refer to RFC4273. - BgpPeers []*RouterBgpPeer `json:"bgpPeers,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Interfaces: Router interfaces. Each interface requires either one - // linked resource (e.g. linkedVpnTunnel), or IP address and IP address - // range (e.g. ipRange), or both. - Interfaces []*RouterInterface `json:"interfaces,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#router for - // routers. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Network: URI of the network to which this router belongs. - Network string `json:"network,omitempty"` - - // Region: [Output Only] URI of the region where the router resides. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Bgp") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Bgp") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Router) MarshalJSON() ([]byte, error) { - type noMethod Router - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RouterAggregatedList: Contains a list of routers. -type RouterAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Router resources. - Items map[string]RoutersScopedList `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RouterAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod RouterAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RouterBgp struct { - // Asn: Local BGP Autonomous System Number (ASN). Must be an RFC6996 - // private ASN, either 16-bit or 32-bit. The value will be fixed for - // this router resource. All VPN tunnels that link to this router will - // have the same local ASN. - Asn int64 `json:"asn,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Asn") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Asn") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RouterBgp) MarshalJSON() ([]byte, error) { - type noMethod RouterBgp - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RouterBgpPeer struct { - // AdvertisedRoutePriority: The priority of routes advertised to this - // BGP peer. In the case where there is more than one matching route of - // maximum length, the routes with lowest priority value win. - AdvertisedRoutePriority int64 `json:"advertisedRoutePriority,omitempty"` - - // InterfaceName: Name of the interface the BGP peer is associated with. - InterfaceName string `json:"interfaceName,omitempty"` - - // IpAddress: IP address of the interface inside Google Cloud Platform. - // Only IPv4 is supported. - IpAddress string `json:"ipAddress,omitempty"` - - // Name: Name of this BGP peer. The name must be 1-63 characters long - // and comply with RFC1035. - Name string `json:"name,omitempty"` - - // PeerAsn: Peer BGP Autonomous System Number (ASN). For VPN use case, - // this value can be different for every tunnel. - PeerAsn int64 `json:"peerAsn,omitempty"` - - // PeerIpAddress: IP address of the BGP interface outside Google cloud. - // Only IPv4 is supported. - PeerIpAddress string `json:"peerIpAddress,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "AdvertisedRoutePriority") to unconditionally include in API - // requests. By default, fields with empty values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AdvertisedRoutePriority") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *RouterBgpPeer) MarshalJSON() ([]byte, error) { - type noMethod RouterBgpPeer - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RouterInterface struct { - // IpRange: IP address and range of the interface. The IP range must be - // in the RFC3927 link-local IP space. The value must be a - // CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not - // truncate the address as it represents the IP address of the - // interface. - IpRange string `json:"ipRange,omitempty"` - - // LinkedVpnTunnel: URI of the linked VPN tunnel. It must be in the same - // region as the router. Each interface can have at most one linked - // resource and it could either be a VPN Tunnel or an interconnect - // attachment. - LinkedVpnTunnel string `json:"linkedVpnTunnel,omitempty"` - - // Name: Name of this interface entry. The name must be 1-63 characters - // long and comply with RFC1035. - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IpRange") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IpRange") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RouterInterface) MarshalJSON() ([]byte, error) { - type noMethod RouterInterface - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RouterList: Contains a list of Router resources. -type RouterList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Router resources. - Items []*Router `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#router for - // routers. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RouterList) MarshalJSON() ([]byte, error) { - type noMethod RouterList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RouterStatus struct { - // BestRoutes: Best routes for this router's network. - BestRoutes []*Route `json:"bestRoutes,omitempty"` - - // BestRoutesForRouter: Best routes learned by this router. - BestRoutesForRouter []*Route `json:"bestRoutesForRouter,omitempty"` - - BgpPeerStatus []*RouterStatusBgpPeerStatus `json:"bgpPeerStatus,omitempty"` - - // Network: URI of the network to which this router belongs. - Network string `json:"network,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BestRoutes") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BestRoutes") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RouterStatus) MarshalJSON() ([]byte, error) { - type noMethod RouterStatus - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RouterStatusBgpPeerStatus struct { - // AdvertisedRoutes: Routes that were advertised to the remote BGP peer - AdvertisedRoutes []*Route `json:"advertisedRoutes,omitempty"` - - // IpAddress: IP address of the local BGP interface. - IpAddress string `json:"ipAddress,omitempty"` - - // LinkedVpnTunnel: URL of the VPN tunnel that this BGP peer controls. - LinkedVpnTunnel string `json:"linkedVpnTunnel,omitempty"` - - // Name: Name of this BGP peer. Unique within the Routers resource. - Name string `json:"name,omitempty"` - - // NumLearnedRoutes: Number of routes learned from the remote BGP Peer. - NumLearnedRoutes int64 `json:"numLearnedRoutes,omitempty"` - - // PeerIpAddress: IP address of the remote BGP interface. - PeerIpAddress string `json:"peerIpAddress,omitempty"` - - // State: BGP state as specified in RFC1771. - State string `json:"state,omitempty"` - - // Status: Status of the BGP peer: {UP, DOWN} - // - // Possible values: - // "DOWN" - // "UNKNOWN" - // "UP" - Status string `json:"status,omitempty"` - - // Uptime: Time this session has been up. Format: 14 years, 51 weeks, 6 - // days, 23 hours, 59 minutes, 59 seconds - Uptime string `json:"uptime,omitempty"` - - // UptimeSeconds: Time this session has been up, in seconds. Format: 145 - UptimeSeconds string `json:"uptimeSeconds,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AdvertisedRoutes") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AdvertisedRoutes") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *RouterStatusBgpPeerStatus) MarshalJSON() ([]byte, error) { - type noMethod RouterStatusBgpPeerStatus - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RouterStatusResponse struct { - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - Result *RouterStatus `json:"result,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Kind") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Kind") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RouterStatusResponse) MarshalJSON() ([]byte, error) { - type noMethod RouterStatusResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RoutersPreviewResponse struct { - // Resource: Preview of given router. - Resource *Router `json:"resource,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Resource") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Resource") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RoutersPreviewResponse) MarshalJSON() ([]byte, error) { - type noMethod RoutersPreviewResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RoutersScopedList struct { - // Routers: List of routers contained in this scope. - Routers []*Router `json:"routers,omitempty"` - - // Warning: Informational warning which replaces the list of routers - // when the list is empty. - Warning *RoutersScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Routers") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Routers") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RoutersScopedList) MarshalJSON() ([]byte, error) { - type noMethod RoutersScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RoutersScopedListWarning: Informational warning which replaces the -// list of routers when the list is empty. -type RoutersScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*RoutersScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RoutersScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod RoutersScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RoutersScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RoutersScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod RoutersScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Rule: A rule to be applied in a Policy. -type Rule struct { - // Action: Required - // - // Possible values: - // "ALLOW" - // "ALLOW_WITH_LOG" - // "DENY" - // "DENY_WITH_LOG" - // "LOG" - // "NO_ACTION" - Action string `json:"action,omitempty"` - - // Conditions: Additional restrictions that must be met - Conditions []*Condition `json:"conditions,omitempty"` - - // Description: Human-readable description of the rule. - Description string `json:"description,omitempty"` - - // Ins: If one or more 'in' clauses are specified, the rule matches if - // the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. - Ins []string `json:"ins,omitempty"` - - // LogConfigs: The config returned to callers of - // tech.iam.IAM.CheckPolicy for any entries that match the LOG action. - LogConfigs []*LogConfig `json:"logConfigs,omitempty"` - - // NotIns: If one or more 'not_in' clauses are specified, the rule - // matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the - // entries. - NotIns []string `json:"notIns,omitempty"` - - // Permissions: A permission is a string of form '..' (e.g., - // 'storage.buckets.list'). A value of '*' matches all permissions, and - // a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. - Permissions []string `json:"permissions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Action") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Rule) MarshalJSON() ([]byte, error) { - type noMethod Rule - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type SSLHealthCheck struct { - // Port: The TCP port number for the health check request. The default - // value is 443. Valid values are 1 through 65535. - Port int64 `json:"port,omitempty"` - - // PortName: Port name as defined in InstanceGroup#NamedPort#name. If - // both port and port_name are defined, port takes precedence. - PortName string `json:"portName,omitempty"` - - // ProxyHeader: Specifies the type of proxy header to append before - // sending data to the backend, either NONE or PROXY_V1. The default is - // NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - - // Request: The application data to send once the SSL connection has - // been established (default value is empty). If both request and - // response are empty, the connection establishment alone will indicate - // health. The request data can only be ASCII. - Request string `json:"request,omitempty"` - - // Response: The bytes to match against the beginning of the response - // data. If left empty (the default value), any response will indicate - // health. The response data can only be ASCII. - Response string `json:"response,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Port") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Port") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SSLHealthCheck) MarshalJSON() ([]byte, error) { - type noMethod SSLHealthCheck - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Scheduling: Sets the scheduling options for an Instance. -type Scheduling struct { - // AutomaticRestart: Specifies whether the instance should be - // automatically restarted if it is terminated by Compute Engine (not - // terminated by a user). You can only set the automatic restart option - // for standard instances. Preemptible instances cannot be automatically - // restarted. - // - // By default, this is set to true so an instance is automatically - // restarted if it is terminated by Compute Engine. - AutomaticRestart *bool `json:"automaticRestart,omitempty"` - - // OnHostMaintenance: Defines the maintenance behavior for this - // instance. For standard instances, the default behavior is MIGRATE. - // For preemptible instances, the default and only possible behavior is - // TERMINATE. For more information, see Setting Instance Scheduling - // Options. - // - // Possible values: - // "MIGRATE" - // "TERMINATE" - OnHostMaintenance string `json:"onHostMaintenance,omitempty"` - - // Preemptible: Defines whether the instance is preemptible. This can - // only be set during instance creation, it cannot be set or changed - // after the instance has been created. - Preemptible bool `json:"preemptible,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AutomaticRestart") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AutomaticRestart") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Scheduling) MarshalJSON() ([]byte, error) { - type noMethod Scheduling - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SerialPortOutput: An instance's serial console output. -type SerialPortOutput struct { - // Contents: [Output Only] The contents of the console output. - Contents string `json:"contents,omitempty"` - - // Kind: [Output Only] Type of the resource. Always - // compute#serialPortOutput for serial port output. - Kind string `json:"kind,omitempty"` - - // Next: [Output Only] The position of the next byte of content from the - // serial console output. Use this value in the next request as the - // start parameter. - Next int64 `json:"next,omitempty,string"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // Start: The starting byte position of the output that was returned. - // This should match the start parameter sent with the request. If the - // serial console output exceeds the size of the buffer, older output - // will be overwritten by newer content and the start values will be - // mismatched. - Start int64 `json:"start,omitempty,string"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Contents") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Contents") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SerialPortOutput) MarshalJSON() ([]byte, error) { - type noMethod SerialPortOutput - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ServiceAccount: A service account. -type ServiceAccount struct { - // Email: Email address of the service account. - Email string `json:"email,omitempty"` - - // Scopes: The list of scopes to be made available for this service - // account. - Scopes []string `json:"scopes,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Email") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Email") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ServiceAccount) MarshalJSON() ([]byte, error) { - type noMethod ServiceAccount - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Snapshot: A persistent disk snapshot resource. -type Snapshot struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // DiskSizeGb: [Output Only] Size of the snapshot, specified in GB. - DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#snapshot for - // Snapshot resources. - Kind string `json:"kind,omitempty"` - - // LabelFingerprint: A fingerprint for the labels being applied to this - // snapshot, which is essentially a hash of the labels set used for - // optimistic locking. The fingerprint is initially generated by Compute - // Engine and changes after every request to modify or update labels. - // You must always provide an up-to-date fingerprint hash in order to - // update or change labels. - // - // To see the latest fingerprint, make a get() request to retrieve a - // snapshot. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // Labels: Labels to apply to this snapshot. These can be later modified - // by the setLabels method. Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - - // Licenses: [Output Only] A list of public visible licenses that apply - // to this snapshot. This can be because the original image had licenses - // attached (such as a Windows image). - Licenses []string `json:"licenses,omitempty"` - - // Name: Name of the resource; provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // SnapshotEncryptionKey: Encrypts the snapshot using a - // customer-supplied encryption key. - // - // After you encrypt a snapshot using a customer-supplied key, you must - // provide the same key if you use the image later For example, you must - // provide the encryption key when you create a disk from the encrypted - // snapshot in a future request. - // - // Customer-supplied encryption keys do not protect access to metadata - // of the disk. - // - // If you do not provide an encryption key when creating the snapshot, - // then the snapshot will be encrypted using an automatically generated - // key and you do not need to provide a key to use the snapshot later. - SnapshotEncryptionKey *CustomerEncryptionKey `json:"snapshotEncryptionKey,omitempty"` - - // SourceDisk: [Output Only] The source disk used to create this - // snapshot. - SourceDisk string `json:"sourceDisk,omitempty"` - - // SourceDiskEncryptionKey: The customer-supplied encryption key of the - // source disk. Required if the source disk is protected by a - // customer-supplied encryption key. - SourceDiskEncryptionKey *CustomerEncryptionKey `json:"sourceDiskEncryptionKey,omitempty"` - - // SourceDiskId: [Output Only] The ID value of the disk used to create - // this snapshot. This value may be used to determine whether the - // snapshot was taken from the current or a previous instance of a given - // disk name. - SourceDiskId string `json:"sourceDiskId,omitempty"` - - // Status: [Output Only] The status of the snapshot. This can be - // CREATING, DELETING, FAILED, READY, or UPLOADING. - // - // Possible values: - // "CREATING" - // "DELETING" - // "FAILED" - // "READY" - // "UPLOADING" - Status string `json:"status,omitempty"` - - // StorageBytes: [Output Only] A size of the the storage used by the - // snapshot. As snapshots share storage, this number is expected to - // change with snapshot creation/deletion. - StorageBytes int64 `json:"storageBytes,omitempty,string"` - - // StorageBytesStatus: [Output Only] An indicator whether storageBytes - // is in a stable state or it is being adjusted as a result of shared - // storage reallocation. This status can either be UPDATING, meaning the - // size of the snapshot is being updated, or UP_TO_DATE, meaning the - // size of the snapshot is up-to-date. - // - // Possible values: - // "UPDATING" - // "UP_TO_DATE" - StorageBytesStatus string `json:"storageBytesStatus,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Snapshot) MarshalJSON() ([]byte, error) { - type noMethod Snapshot - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SnapshotList: Contains a list of Snapshot resources. -type SnapshotList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Snapshot resources. - Items []*Snapshot `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SnapshotList) MarshalJSON() ([]byte, error) { - type noMethod SnapshotList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SslCertificate: An SslCertificate resource. This resource provides a -// mechanism to upload an SSL key and certificate to the load balancer -// to serve secure connections from the user. -type SslCertificate struct { - // Certificate: A local certificate file. The certificate must be in PEM - // format. The certificate chain must be no greater than 5 certs long. - // The chain must include at least one intermediate cert. - Certificate string `json:"certificate,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always - // compute#sslCertificate for SSL certificates. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // PrivateKey: A write-only private key in PEM format. Only insert - // requests will include this field. - PrivateKey string `json:"privateKey,omitempty"` - - // SelfLink: [Output only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Certificate") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Certificate") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SslCertificate) MarshalJSON() ([]byte, error) { - type noMethod SslCertificate - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SslCertificateList: Contains a list of SslCertificate resources. -type SslCertificateList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of SslCertificate resources. - Items []*SslCertificate `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SslCertificateList) MarshalJSON() ([]byte, error) { - type noMethod SslCertificateList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Subnetwork: A Subnetwork resource. -type Subnetwork struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. This field can be set only at - // resource creation time. - Description string `json:"description,omitempty"` - - // GatewayAddress: [Output Only] The gateway address for default routes - // to reach destination addresses outside this subnetwork. This field - // can be set only at resource creation time. - GatewayAddress string `json:"gatewayAddress,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // IpCidrRange: The range of internal addresses that are owned by this - // subnetwork. Provide this property when you create the subnetwork. For - // example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and - // non-overlapping within a network. Only IPv4 is supported. This field - // can be set only at resource creation time. - IpCidrRange string `json:"ipCidrRange,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#subnetwork - // for Subnetwork resources. - Kind string `json:"kind,omitempty"` - - // Name: The name of the resource, provided by the client when initially - // creating the resource. The name must be 1-63 characters long, and - // comply with RFC1035. Specifically, the name must be 1-63 characters - // long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? - // which means the first character must be a lowercase letter, and all - // following characters must be a dash, lowercase letter, or digit, - // except the last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Network: The URL of the network to which this subnetwork belongs, - // provided by the client when initially creating the subnetwork. Only - // networks that are in the distributed mode can have subnetworks. This - // field can be set only at resource creation time. - Network string `json:"network,omitempty"` - - // PrivateIpGoogleAccess: Whether the VMs in this subnet can access - // Google services without assigned external IP addresses. This field - // can be both set at resource creation time and updated using - // setPrivateIpGoogleAccess. - PrivateIpGoogleAccess bool `json:"privateIpGoogleAccess,omitempty"` - - // Region: URL of the region where the Subnetwork resides. This field - // can be set only at resource creation time. - Region string `json:"region,omitempty"` - - // SecondaryIpRanges: An array of configurations for secondary IP ranges - // for VM instances contained in this subnetwork. The primary IP of such - // VM must belong to the primary ipCidrRange of the subnetwork. The - // alias IPs may belong to either primary or secondary ranges. - SecondaryIpRanges []*SubnetworkSecondaryRange `json:"secondaryIpRanges,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Subnetwork) MarshalJSON() ([]byte, error) { - type noMethod Subnetwork - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type SubnetworkAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of SubnetworksScopedList resources. - Items map[string]SubnetworksScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#subnetworkAggregatedList for aggregated lists of subnetworks. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SubnetworkAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod SubnetworkAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SubnetworkList: Contains a list of Subnetwork resources. -type SubnetworkList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Subnetwork resources. - Items []*Subnetwork `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#subnetworkList - // for lists of subnetworks. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SubnetworkList) MarshalJSON() ([]byte, error) { - type noMethod SubnetworkList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SubnetworkSecondaryRange: Represents a secondary IP range of a -// subnetwork. -type SubnetworkSecondaryRange struct { - // IpCidrRange: The range of IP addresses belonging to this subnetwork - // secondary range. Provide this property when you create the - // subnetwork. Ranges must be unique and non-overlapping with all - // primary and secondary IP ranges within a network. Only IPv4 is - // supported. - IpCidrRange string `json:"ipCidrRange,omitempty"` - - // RangeName: The name associated with this subnetwork secondary range, - // used when adding an alias IP range to a VM instance. The name must be - // 1-63 characters long, and comply with RFC1035. The name must be - // unique within the subnetwork. - RangeName string `json:"rangeName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IpCidrRange") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IpCidrRange") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SubnetworkSecondaryRange) MarshalJSON() ([]byte, error) { - type noMethod SubnetworkSecondaryRange - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type SubnetworksExpandIpCidrRangeRequest struct { - // IpCidrRange: The IP (in CIDR format or netmask) of internal addresses - // that are legal on this Subnetwork. This range should be disjoint from - // other subnetworks within this network. This range can only be larger - // than (i.e. a superset of) the range previously defined before the - // update. - IpCidrRange string `json:"ipCidrRange,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IpCidrRange") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IpCidrRange") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SubnetworksExpandIpCidrRangeRequest) MarshalJSON() ([]byte, error) { - type noMethod SubnetworksExpandIpCidrRangeRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type SubnetworksScopedList struct { - // Subnetworks: List of subnetworks contained in this scope. - Subnetworks []*Subnetwork `json:"subnetworks,omitempty"` - - // Warning: An informational warning that appears when the list of - // addresses is empty. - Warning *SubnetworksScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Subnetworks") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Subnetworks") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SubnetworksScopedList) MarshalJSON() ([]byte, error) { - type noMethod SubnetworksScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SubnetworksScopedListWarning: An informational warning that appears -// when the list of addresses is empty. -type SubnetworksScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*SubnetworksScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SubnetworksScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod SubnetworksScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type SubnetworksScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SubnetworksScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod SubnetworksScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type SubnetworksSetPrivateIpGoogleAccessRequest struct { - PrivateIpGoogleAccess bool `json:"privateIpGoogleAccess,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "PrivateIpGoogleAccess") to unconditionally include in API requests. - // By default, fields with empty values are omitted from API requests. - // However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "PrivateIpGoogleAccess") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *SubnetworksSetPrivateIpGoogleAccessRequest) MarshalJSON() ([]byte, error) { - type noMethod SubnetworksSetPrivateIpGoogleAccessRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TCPHealthCheck struct { - // Port: The TCP port number for the health check request. The default - // value is 80. Valid values are 1 through 65535. - Port int64 `json:"port,omitempty"` - - // PortName: Port name as defined in InstanceGroup#NamedPort#name. If - // both port and port_name are defined, port takes precedence. - PortName string `json:"portName,omitempty"` - - // ProxyHeader: Specifies the type of proxy header to append before - // sending data to the backend, either NONE or PROXY_V1. The default is - // NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - - // Request: The application data to send once the TCP connection has - // been established (default value is empty). If both request and - // response are empty, the connection establishment alone will indicate - // health. The request data can only be ASCII. - Request string `json:"request,omitempty"` - - // Response: The bytes to match against the beginning of the response - // data. If left empty (the default value), any response will indicate - // health. The response data can only be ASCII. - Response string `json:"response,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Port") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Port") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TCPHealthCheck) MarshalJSON() ([]byte, error) { - type noMethod TCPHealthCheck - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Tags: A set of instance tags. -type Tags struct { - // Fingerprint: Specifies a fingerprint for this request, which is - // essentially a hash of the metadata's contents and used for optimistic - // locking. The fingerprint is initially generated by Compute Engine and - // changes after every request to modify or update metadata. You must - // always provide an up-to-date fingerprint hash in order to update or - // change metadata. - // - // To see the latest fingerprint, make get() request to the instance. - Fingerprint string `json:"fingerprint,omitempty"` - - // Items: An array of tags. Each tag must be 1-63 characters long, and - // comply with RFC1035. - Items []string `json:"items,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Fingerprint") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Tags) MarshalJSON() ([]byte, error) { - type noMethod Tags - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetHttpProxy: A TargetHttpProxy resource. This resource defines an -// HTTP proxy. -type TargetHttpProxy struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of resource. Always compute#targetHttpProxy - // for target HTTP proxies. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // UrlMap: URL to the UrlMap resource that defines the mapping from URL - // to the BackendService. - UrlMap string `json:"urlMap,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetHttpProxy) MarshalJSON() ([]byte, error) { - type noMethod TargetHttpProxy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetHttpProxyList: A list of TargetHttpProxy resources. -type TargetHttpProxyList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetHttpProxy resources. - Items []*TargetHttpProxy `json:"items,omitempty"` - - // Kind: Type of resource. Always compute#targetHttpProxyList for lists - // of target HTTP proxies. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetHttpProxyList) MarshalJSON() ([]byte, error) { - type noMethod TargetHttpProxyList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetHttpsProxiesSetSslCertificatesRequest struct { - // SslCertificates: New set of SslCertificate resources to associate - // with this TargetHttpsProxy resource. Currently exactly one - // SslCertificate resource must be specified. - SslCertificates []string `json:"sslCertificates,omitempty"` - - // ForceSendFields is a list of field names (e.g. "SslCertificates") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "SslCertificates") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetHttpsProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, error) { - type noMethod TargetHttpsProxiesSetSslCertificatesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetHttpsProxy: A TargetHttpsProxy resource. This resource defines -// an HTTPS proxy. -type TargetHttpsProxy struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of resource. Always compute#targetHttpsProxy - // for target HTTPS proxies. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // SslCertificates: URLs to SslCertificate resources that are used to - // authenticate connections between users and the load balancer. - // Currently, exactly one SSL certificate must be specified. - SslCertificates []string `json:"sslCertificates,omitempty"` - - // UrlMap: A fully-qualified or valid partial URL to the UrlMap resource - // that defines the mapping from URL to the BackendService. For example, - // the following are all valid URLs for specifying a URL map: - // - - // https://www.googleapis.compute/v1/projects/project/global/urlMaps/url-map - // - projects/project/global/urlMaps/url-map - // - global/urlMaps/url-map - UrlMap string `json:"urlMap,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetHttpsProxy) MarshalJSON() ([]byte, error) { - type noMethod TargetHttpsProxy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetHttpsProxyList: Contains a list of TargetHttpsProxy resources. -type TargetHttpsProxyList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetHttpsProxy resources. - Items []*TargetHttpsProxy `json:"items,omitempty"` - - // Kind: Type of resource. Always compute#targetHttpsProxyList for lists - // of target HTTPS proxies. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetHttpsProxyList) MarshalJSON() ([]byte, error) { - type noMethod TargetHttpsProxyList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetInstance: A TargetInstance resource. This resource defines an -// endpoint instance that terminates traffic of certain protocols. -type TargetInstance struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Instance: A URL to the virtual machine instance that handles traffic - // for this target instance. When creating a target instance, you can - // provide the fully-qualified URL or a valid partial URL to the desired - // virtual machine. For example, the following are all valid URLs: - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance - // - projects/project/zones/zone/instances/instance - // - zones/zone/instances/instance - Instance string `json:"instance,omitempty"` - - // Kind: [Output Only] The type of the resource. Always - // compute#targetInstance for target instances. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // NatPolicy: NAT option controlling how IPs are NAT'ed to the instance. - // Currently only NO_NAT (default value) is supported. - // - // Possible values: - // "NO_NAT" - NatPolicy string `json:"natPolicy,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Zone: [Output Only] URL of the zone where the target instance - // resides. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetInstance) MarshalJSON() ([]byte, error) { - type noMethod TargetInstance - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetInstanceAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetInstance resources. - Items map[string]TargetInstancesScopedList `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetInstanceAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod TargetInstanceAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetInstanceList: Contains a list of TargetInstance resources. -type TargetInstanceList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetInstance resources. - Items []*TargetInstance `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetInstanceList) MarshalJSON() ([]byte, error) { - type noMethod TargetInstanceList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetInstancesScopedList struct { - // TargetInstances: List of target instances contained in this scope. - TargetInstances []*TargetInstance `json:"targetInstances,omitempty"` - - // Warning: Informational warning which replaces the list of addresses - // when the list is empty. - Warning *TargetInstancesScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "TargetInstances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "TargetInstances") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetInstancesScopedList) MarshalJSON() ([]byte, error) { - type noMethod TargetInstancesScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetInstancesScopedListWarning: Informational warning which -// replaces the list of addresses when the list is empty. -type TargetInstancesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*TargetInstancesScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetInstancesScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod TargetInstancesScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetInstancesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetInstancesScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod TargetInstancesScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetPool: A TargetPool resource. This resource defines a pool of -// instances, an associated HttpHealthCheck resource, and the fallback -// target pool. -type TargetPool struct { - // BackupPool: This field is applicable only when the containing target - // pool is serving a forwarding rule as the primary pool, and its - // failoverRatio field is properly set to a value between [0, - // 1]. - // - // backupPool and failoverRatio together define the fallback behavior of - // the primary target pool: if the ratio of the healthy instances in the - // primary pool is at or below failoverRatio, traffic arriving at the - // load-balanced IP will be directed to the backup pool. - // - // In case where failoverRatio and backupPool are not set, or all the - // instances in the backup pool are unhealthy, the traffic will be - // directed back to the primary pool in the "force" mode, where traffic - // will be spread to the healthy instances with the best effort, or to - // all instances when no instance is healthy. - BackupPool string `json:"backupPool,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // FailoverRatio: This field is applicable only when the containing - // target pool is serving a forwarding rule as the primary pool (i.e., - // not as a backup pool to some other target pool). The value of the - // field must be in [0, 1]. - // - // If set, backupPool must also be set. They together define the - // fallback behavior of the primary target pool: if the ratio of the - // healthy instances in the primary pool is at or below this number, - // traffic arriving at the load-balanced IP will be directed to the - // backup pool. - // - // In case where failoverRatio is not set or all the instances in the - // backup pool are unhealthy, the traffic will be directed back to the - // primary pool in the "force" mode, where traffic will be spread to the - // healthy instances with the best effort, or to all instances when no - // instance is healthy. - FailoverRatio float64 `json:"failoverRatio,omitempty"` - - // HealthChecks: The URL of the HttpHealthCheck resource. A member - // instance in this pool is considered healthy if and only if the health - // checks pass. An empty list means all member instances will be - // considered healthy at all times. Only HttpHealthChecks are supported. - // Only one health check may be specified. - HealthChecks []string `json:"healthChecks,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Instances: A list of resource URLs to the virtual machine instances - // serving this pool. They must live in zones contained in the same - // region as this pool. - Instances []string `json:"instances,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#targetPool - // for target pools. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Region: [Output Only] URL of the region where the target pool - // resides. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // SessionAffinity: Sesssion affinity option, must be one of the - // following values: - // NONE: Connections from the same client IP may go to any instance in - // the pool. - // CLIENT_IP: Connections from the same client IP will go to the same - // instance in the pool while that instance remains - // healthy. - // CLIENT_IP_PROTO: Connections from the same client IP with the same IP - // protocol will go to the same instance in the pool while that instance - // remains healthy. - // - // Possible values: - // "CLIENT_IP" - // "CLIENT_IP_PORT_PROTO" - // "CLIENT_IP_PROTO" - // "GENERATED_COOKIE" - // "NONE" - SessionAffinity string `json:"sessionAffinity,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "BackupPool") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BackupPool") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPool) MarshalJSON() ([]byte, error) { - type noMethod TargetPool - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *TargetPool) UnmarshalJSON(data []byte) error { - type noMethod TargetPool - var s1 struct { - FailoverRatio gensupport.JSONFloat64 `json:"failoverRatio"` - *noMethod - } - s1.noMethod = (*noMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FailoverRatio = float64(s1.FailoverRatio) - return nil -} - -type TargetPoolAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetPool resources. - Items map[string]TargetPoolsScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#targetPoolAggregatedList for aggregated lists of target - // pools. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPoolAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod TargetPoolAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetPoolInstanceHealth struct { - HealthStatus []*HealthStatus `json:"healthStatus,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#targetPoolInstanceHealth when checking the health of an - // instance. - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "HealthStatus") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "HealthStatus") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPoolInstanceHealth) MarshalJSON() ([]byte, error) { - type noMethod TargetPoolInstanceHealth - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetPoolList: Contains a list of TargetPool resources. -type TargetPoolList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetPool resources. - Items []*TargetPool `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#targetPoolList - // for lists of target pools. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPoolList) MarshalJSON() ([]byte, error) { - type noMethod TargetPoolList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetPoolsAddHealthCheckRequest struct { - // HealthChecks: The HttpHealthCheck to add to the target pool. - HealthChecks []*HealthCheckReference `json:"healthChecks,omitempty"` - - // ForceSendFields is a list of field names (e.g. "HealthChecks") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "HealthChecks") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPoolsAddHealthCheckRequest) MarshalJSON() ([]byte, error) { - type noMethod TargetPoolsAddHealthCheckRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetPoolsAddInstanceRequest struct { - // Instances: A full or partial URL to an instance to add to this target - // pool. This can be a full or partial URL. For example, the following - // are valid URLs: - // - - // https://www.googleapis.com/compute/v1/projects/project-id/zones/zone/instances/instance-name - // - projects/project-id/zones/zone/instances/instance-name - // - zones/zone/instances/instance-name - Instances []*InstanceReference `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPoolsAddInstanceRequest) MarshalJSON() ([]byte, error) { - type noMethod TargetPoolsAddInstanceRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetPoolsRemoveHealthCheckRequest struct { - // HealthChecks: Health check URL to be removed. This can be a full or - // valid partial URL. For example, the following are valid URLs: - // - - // https://www.googleapis.com/compute/beta/projects/project/global/httpHealthChecks/health-check - // - projects/project/global/httpHealthChecks/health-check - // - global/httpHealthChecks/health-check - HealthChecks []*HealthCheckReference `json:"healthChecks,omitempty"` - - // ForceSendFields is a list of field names (e.g. "HealthChecks") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "HealthChecks") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPoolsRemoveHealthCheckRequest) MarshalJSON() ([]byte, error) { - type noMethod TargetPoolsRemoveHealthCheckRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetPoolsRemoveInstanceRequest struct { - // Instances: URLs of the instances to be removed from target pool. - Instances []*InstanceReference `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPoolsRemoveInstanceRequest) MarshalJSON() ([]byte, error) { - type noMethod TargetPoolsRemoveInstanceRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetPoolsScopedList struct { - // TargetPools: List of target pools contained in this scope. - TargetPools []*TargetPool `json:"targetPools,omitempty"` - - // Warning: Informational warning which replaces the list of addresses - // when the list is empty. - Warning *TargetPoolsScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "TargetPools") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "TargetPools") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPoolsScopedList) MarshalJSON() ([]byte, error) { - type noMethod TargetPoolsScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetPoolsScopedListWarning: Informational warning which replaces -// the list of addresses when the list is empty. -type TargetPoolsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*TargetPoolsScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPoolsScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod TargetPoolsScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetPoolsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPoolsScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod TargetPoolsScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetReference struct { - Target string `json:"target,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Target") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Target") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetReference) MarshalJSON() ([]byte, error) { - type noMethod TargetReference - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetSslProxiesSetBackendServiceRequest struct { - // Service: The URL of the new BackendService resource for the - // targetSslProxy. - Service string `json:"service,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Service") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Service") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetSslProxiesSetBackendServiceRequest) MarshalJSON() ([]byte, error) { - type noMethod TargetSslProxiesSetBackendServiceRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetSslProxiesSetProxyHeaderRequest struct { - // ProxyHeader: The new type of proxy header to append before sending - // data to the backend. NONE or PROXY_V1 are allowed. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ProxyHeader") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ProxyHeader") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetSslProxiesSetProxyHeaderRequest) MarshalJSON() ([]byte, error) { - type noMethod TargetSslProxiesSetProxyHeaderRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetSslProxiesSetSslCertificatesRequest struct { - // SslCertificates: New set of URLs to SslCertificate resources to - // associate with this TargetSslProxy. Currently exactly one ssl - // certificate must be specified. - SslCertificates []string `json:"sslCertificates,omitempty"` - - // ForceSendFields is a list of field names (e.g. "SslCertificates") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "SslCertificates") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetSslProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, error) { - type noMethod TargetSslProxiesSetSslCertificatesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetSslProxy: A TargetSslProxy resource. This resource defines an -// SSL proxy. -type TargetSslProxy struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always - // compute#targetSslProxy for target SSL proxies. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // ProxyHeader: Specifies the type of proxy header to append before - // sending data to the backend, either NONE or PROXY_V1. The default is - // NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Service: URL to the BackendService resource. - Service string `json:"service,omitempty"` - - // SslCertificates: URLs to SslCertificate resources that are used to - // authenticate connections to Backends. Currently exactly one SSL - // certificate must be specified. - SslCertificates []string `json:"sslCertificates,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetSslProxy) MarshalJSON() ([]byte, error) { - type noMethod TargetSslProxy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetSslProxyList: Contains a list of TargetSslProxy resources. -type TargetSslProxyList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetSslProxy resources. - Items []*TargetSslProxy `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetSslProxyList) MarshalJSON() ([]byte, error) { - type noMethod TargetSslProxyList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetTcpProxiesSetBackendServiceRequest struct { - // Service: The URL of the new BackendService resource for the - // targetTcpProxy. - Service string `json:"service,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Service") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Service") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetTcpProxiesSetBackendServiceRequest) MarshalJSON() ([]byte, error) { - type noMethod TargetTcpProxiesSetBackendServiceRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetTcpProxiesSetProxyHeaderRequest struct { - // ProxyHeader: The new type of proxy header to append before sending - // data to the backend. NONE or PROXY_V1 are allowed. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ProxyHeader") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ProxyHeader") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetTcpProxiesSetProxyHeaderRequest) MarshalJSON() ([]byte, error) { - type noMethod TargetTcpProxiesSetProxyHeaderRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetTcpProxy: A TargetTcpProxy resource. This resource defines a -// TCP proxy. -type TargetTcpProxy struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always - // compute#targetTcpProxy for target TCP proxies. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // ProxyHeader: Specifies the type of proxy header to append before - // sending data to the backend, either NONE or PROXY_V1. The default is - // NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Service: URL to the BackendService resource. - Service string `json:"service,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetTcpProxy) MarshalJSON() ([]byte, error) { - type noMethod TargetTcpProxy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetTcpProxyList: Contains a list of TargetTcpProxy resources. -type TargetTcpProxyList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetTcpProxy resources. - Items []*TargetTcpProxy `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetTcpProxyList) MarshalJSON() ([]byte, error) { - type noMethod TargetTcpProxyList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetVpnGateway: Represents a Target VPN gateway resource. -type TargetVpnGateway struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // ForwardingRules: [Output Only] A list of URLs to the ForwardingRule - // resources. ForwardingRules are created using - // compute.forwardingRules.insert and associated to a VPN gateway. - ForwardingRules []string `json:"forwardingRules,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of resource. Always compute#targetVpnGateway - // for target VPN gateways. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Network: URL of the network to which this VPN gateway is attached. - // Provided by the client when the VPN gateway is created. - Network string `json:"network,omitempty"` - - // Region: [Output Only] URL of the region where the target VPN gateway - // resides. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Status: [Output Only] The status of the VPN gateway. - // - // Possible values: - // "CREATING" - // "DELETING" - // "FAILED" - // "READY" - Status string `json:"status,omitempty"` - - // Tunnels: [Output Only] A list of URLs to VpnTunnel resources. - // VpnTunnels are created using compute.vpntunnels.insert method and - // associated to a VPN gateway. - Tunnels []string `json:"tunnels,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetVpnGateway) MarshalJSON() ([]byte, error) { - type noMethod TargetVpnGateway - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetVpnGatewayAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetVpnGateway resources. - Items map[string]TargetVpnGatewaysScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#targetVpnGateway - // for target VPN gateways. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetVpnGatewayAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod TargetVpnGatewayAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetVpnGatewayList: Contains a list of TargetVpnGateway resources. -type TargetVpnGatewayList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetVpnGateway resources. - Items []*TargetVpnGateway `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#targetVpnGateway - // for target VPN gateways. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetVpnGatewayList) MarshalJSON() ([]byte, error) { - type noMethod TargetVpnGatewayList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetVpnGatewaysScopedList struct { - // TargetVpnGateways: [Output Only] List of target vpn gateways - // contained in this scope. - TargetVpnGateways []*TargetVpnGateway `json:"targetVpnGateways,omitempty"` - - // Warning: [Output Only] Informational warning which replaces the list - // of addresses when the list is empty. - Warning *TargetVpnGatewaysScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "TargetVpnGateways") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "TargetVpnGateways") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetVpnGatewaysScopedList) MarshalJSON() ([]byte, error) { - type noMethod TargetVpnGatewaysScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetVpnGatewaysScopedListWarning: [Output Only] Informational -// warning which replaces the list of addresses when the list is empty. -type TargetVpnGatewaysScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*TargetVpnGatewaysScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetVpnGatewaysScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod TargetVpnGatewaysScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetVpnGatewaysScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetVpnGatewaysScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod TargetVpnGatewaysScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TestFailure struct { - ActualService string `json:"actualService,omitempty"` - - ExpectedService string `json:"expectedService,omitempty"` - - Host string `json:"host,omitempty"` - - Path string `json:"path,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ActualService") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ActualService") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TestFailure) MarshalJSON() ([]byte, error) { - type noMethod TestFailure - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TestPermissionsRequest struct { - // Permissions: The set of permissions to check for the 'resource'. - // Permissions with wildcards (such as '*' or 'storage.*') are not - // allowed. - Permissions []string `json:"permissions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Permissions") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Permissions") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TestPermissionsRequest) MarshalJSON() ([]byte, error) { - type noMethod TestPermissionsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TestPermissionsResponse struct { - // Permissions: A subset of `TestPermissionsRequest.permissions` that - // the caller is allowed. - Permissions []string `json:"permissions,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Permissions") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Permissions") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TestPermissionsResponse) MarshalJSON() ([]byte, error) { - type noMethod TestPermissionsResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type UDPHealthCheck struct { - // Port: The UDP port number for the health check request. Valid values - // are 1 through 65535. - Port int64 `json:"port,omitempty"` - - // PortName: Port name as defined in InstanceGroup#NamedPort#name. If - // both port and port_name are defined, port takes precedence. - PortName string `json:"portName,omitempty"` - - // Request: Raw data of request to send in payload of UDP packet. It is - // an error if this is empty. The request data can only be ASCII. - Request string `json:"request,omitempty"` - - // Response: The bytes to match against the beginning of the response - // data. It is an error if this is empty. The response data can only be - // ASCII. - Response string `json:"response,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Port") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Port") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UDPHealthCheck) MarshalJSON() ([]byte, error) { - type noMethod UDPHealthCheck - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// UrlMap: A UrlMap resource. This resource defines the mapping from URL -// to the BackendService resource, based on the "longest-match" of the -// URL's host and path. -type UrlMap struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // DefaultService: The URL of the BackendService resource if none of the - // hostRules match. - DefaultService string `json:"defaultService,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Fingerprint: Fingerprint of this resource. A hash of the contents - // stored in this object. This field is used in optimistic locking. This - // field will be ignored when inserting a UrlMap. An up-to-date - // fingerprint must be provided in order to update the UrlMap. - Fingerprint string `json:"fingerprint,omitempty"` - - // HostRules: The list of HostRules to use against the URL. - HostRules []*HostRule `json:"hostRules,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#urlMaps for - // url maps. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // PathMatchers: The list of named PathMatchers to use against the URL. - PathMatchers []*PathMatcher `json:"pathMatchers,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Tests: The list of expected URL mappings. Request to update this - // UrlMap will succeed only if all of the test cases pass. - Tests []*UrlMapTest `json:"tests,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *UrlMap) MarshalJSON() ([]byte, error) { - type noMethod UrlMap - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// UrlMapList: Contains a list of UrlMap resources. -type UrlMapList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of UrlMap resources. - Items []*UrlMap `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UrlMapList) MarshalJSON() ([]byte, error) { - type noMethod UrlMapList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type UrlMapReference struct { - UrlMap string `json:"urlMap,omitempty"` - - // ForceSendFields is a list of field names (e.g. "UrlMap") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "UrlMap") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UrlMapReference) MarshalJSON() ([]byte, error) { - type noMethod UrlMapReference - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// UrlMapTest: Message for the expected URL mappings. -type UrlMapTest struct { - // Description: Description of this test case. - Description string `json:"description,omitempty"` - - // Host: Host portion of the URL. - Host string `json:"host,omitempty"` - - // Path: Path portion of the URL. - Path string `json:"path,omitempty"` - - // Service: Expected BackendService resource the given URL should be - // mapped to. - Service string `json:"service,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UrlMapTest) MarshalJSON() ([]byte, error) { - type noMethod UrlMapTest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// UrlMapValidationResult: Message representing the validation result -// for a UrlMap. -type UrlMapValidationResult struct { - LoadErrors []string `json:"loadErrors,omitempty"` - - // LoadSucceeded: Whether the given UrlMap can be successfully loaded. - // If false, 'loadErrors' indicates the reasons. - LoadSucceeded bool `json:"loadSucceeded,omitempty"` - - TestFailures []*TestFailure `json:"testFailures,omitempty"` - - // TestPassed: If successfully loaded, this field indicates whether the - // test passed. If false, 'testFailures's indicate the reason of - // failure. - TestPassed bool `json:"testPassed,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LoadErrors") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "LoadErrors") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UrlMapValidationResult) MarshalJSON() ([]byte, error) { - type noMethod UrlMapValidationResult - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type UrlMapsValidateRequest struct { - // Resource: Content of the UrlMap to be validated. - Resource *UrlMap `json:"resource,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Resource") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Resource") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UrlMapsValidateRequest) MarshalJSON() ([]byte, error) { - type noMethod UrlMapsValidateRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type UrlMapsValidateResponse struct { - Result *UrlMapValidationResult `json:"result,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Result") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Result") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UrlMapsValidateResponse) MarshalJSON() ([]byte, error) { - type noMethod UrlMapsValidateResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// UsageExportLocation: The location in Cloud Storage and naming method -// of the daily usage report. Contains bucket_name and report_name -// prefix. -type UsageExportLocation struct { - // BucketName: The name of an existing bucket in Cloud Storage where the - // usage report object is stored. The Google Service Account is granted - // write access to this bucket. This can either be the bucket name by - // itself, such as example-bucket, or the bucket name with gs:// or - // https://storage.googleapis.com/ in front of it, such as - // gs://example-bucket. - BucketName string `json:"bucketName,omitempty"` - - // ReportNamePrefix: An optional prefix for the name of the usage report - // object stored in bucketName. If not supplied, defaults to usage. The - // report is stored as a CSV file named - // report_name_prefix_gce_YYYYMMDD.csv where YYYYMMDD is the day of the - // usage according to Pacific Time. If you supply a prefix, it should - // conform to Cloud Storage object naming conventions. - ReportNamePrefix string `json:"reportNamePrefix,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BucketName") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BucketName") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UsageExportLocation) MarshalJSON() ([]byte, error) { - type noMethod UsageExportLocation - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type VpnTunnel struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // DetailedStatus: [Output Only] Detailed status message for the VPN - // tunnel. - DetailedStatus string `json:"detailedStatus,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // IkeVersion: IKE protocol version to use when establishing the VPN - // tunnel with peer VPN gateway. Acceptable IKE versions are 1 or 2. - // Default version is 2. - IkeVersion int64 `json:"ikeVersion,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#vpnTunnel for - // VPN tunnels. - Kind string `json:"kind,omitempty"` - - // LocalTrafficSelector: Local traffic selector to use when establishing - // the VPN tunnel with peer VPN gateway. The value should be a CIDR - // formatted string, for example: 192.168.0.0/16. The ranges should be - // disjoint. Only IPv4 is supported. - LocalTrafficSelector []string `json:"localTrafficSelector,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // PeerIp: IP address of the peer VPN gateway. Only IPv4 is supported. - PeerIp string `json:"peerIp,omitempty"` - - // Region: [Output Only] URL of the region where the VPN tunnel resides. - Region string `json:"region,omitempty"` - - // RemoteTrafficSelector: Remote traffic selectors to use when - // establishing the VPN tunnel with peer VPN gateway. The value should - // be a CIDR formatted string, for example: 192.168.0.0/16. The ranges - // should be disjoint. Only IPv4 is supported. - RemoteTrafficSelector []string `json:"remoteTrafficSelector,omitempty"` - - // Router: URL of router resource to be used for dynamic routing. - Router string `json:"router,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // SharedSecret: Shared secret used to set the secure session between - // the Cloud VPN gateway and the peer VPN gateway. - SharedSecret string `json:"sharedSecret,omitempty"` - - // SharedSecretHash: Hash of the shared secret. - SharedSecretHash string `json:"sharedSecretHash,omitempty"` - - // Status: [Output Only] The status of the VPN tunnel. - // - // Possible values: - // "ALLOCATING_RESOURCES" - // "AUTHORIZATION_ERROR" - // "DEPROVISIONING" - // "ESTABLISHED" - // "FAILED" - // "FIRST_HANDSHAKE" - // "NEGOTIATION_FAILURE" - // "NETWORK_ERROR" - // "NO_INCOMING_PACKETS" - // "PROVISIONING" - // "REJECTED" - // "WAITING_FOR_FULL_CONFIG" - Status string `json:"status,omitempty"` - - // TargetVpnGateway: URL of the VPN gateway with which this VPN tunnel - // is associated. Provided by the client when the VPN tunnel is created. - TargetVpnGateway string `json:"targetVpnGateway,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *VpnTunnel) MarshalJSON() ([]byte, error) { - type noMethod VpnTunnel - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type VpnTunnelAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of VpnTunnelsScopedList resources. - Items map[string]VpnTunnelsScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#vpnTunnel for - // VPN tunnels. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *VpnTunnelAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod VpnTunnelAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// VpnTunnelList: Contains a list of VpnTunnel resources. -type VpnTunnelList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of VpnTunnel resources. - Items []*VpnTunnel `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#vpnTunnel for - // VPN tunnels. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *VpnTunnelList) MarshalJSON() ([]byte, error) { - type noMethod VpnTunnelList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type VpnTunnelsScopedList struct { - // VpnTunnels: List of vpn tunnels contained in this scope. - VpnTunnels []*VpnTunnel `json:"vpnTunnels,omitempty"` - - // Warning: Informational warning which replaces the list of addresses - // when the list is empty. - Warning *VpnTunnelsScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "VpnTunnels") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "VpnTunnels") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *VpnTunnelsScopedList) MarshalJSON() ([]byte, error) { - type noMethod VpnTunnelsScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// VpnTunnelsScopedListWarning: Informational warning which replaces the -// list of addresses when the list is empty. -type VpnTunnelsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*VpnTunnelsScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *VpnTunnelsScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod VpnTunnelsScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type VpnTunnelsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *VpnTunnelsScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod VpnTunnelsScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XpnHostList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: [Output Only] A list of shared VPC host project URLs. - Items []*Project `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#xpnHostList for - // lists of shared VPC hosts. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XpnHostList) MarshalJSON() ([]byte, error) { - type noMethod XpnHostList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XpnResourceId: Service resource (a.k.a service project) ID. -type XpnResourceId struct { - // Id: The ID of the service resource. In the case of projects, this - // field matches the project ID (e.g., my-project), not the project - // number (e.g., 12345678). - Id string `json:"id,omitempty"` - - // Type: The type of the service resource. - // - // Possible values: - // "PROJECT" - // "XPN_RESOURCE_TYPE_UNSPECIFIED" - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XpnResourceId) MarshalJSON() ([]byte, error) { - type noMethod XpnResourceId - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Zone: A Zone resource. -type Zone struct { - // AvailableCpuPlatforms: [Output Only] Available cpu/platform - // selections for the zone. - AvailableCpuPlatforms []string `json:"availableCpuPlatforms,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Deprecated: [Output Only] The deprecation status associated with this - // zone. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - - // Description: [Output Only] Textual description of the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#zone for - // zones. - Kind string `json:"kind,omitempty"` - - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - - // Region: [Output Only] Full URL reference to the region which hosts - // the zone. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Status: [Output Only] Status of the zone, either UP or DOWN. - // - // Possible values: - // "DOWN" - // "UP" - Status string `json:"status,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. - // "AvailableCpuPlatforms") to unconditionally include in API requests. - // By default, fields with empty values are omitted from API requests. - // However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AvailableCpuPlatforms") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Zone) MarshalJSON() ([]byte, error) { - type noMethod Zone - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ZoneList: Contains a list of zone resources. -type ZoneList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Zone resources. - Items []*Zone `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ZoneList) MarshalJSON() ([]byte, error) { - type noMethod ZoneList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ZoneSetLabelsRequest struct { - // LabelFingerprint: The fingerprint of the previous set of labels for - // this resource, used to detect conflicts. The fingerprint is initially - // generated by Compute Engine and changes after every request to modify - // or update labels. You must always provide an up-to-date fingerprint - // hash in order to update or change labels. Make a get() request to the - // resource to get the latest fingerprint. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // Labels: The labels to set for this resource. - Labels map[string]string `json:"labels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LabelFingerprint") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "LabelFingerprint") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ZoneSetLabelsRequest) MarshalJSON() ([]byte, error) { - type noMethod ZoneSetLabelsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// method id "compute.acceleratorTypes.aggregatedList": - -type AcceleratorTypesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of accelerator types. -func (r *AcceleratorTypesService) AggregatedList(project string) *AcceleratorTypesAggregatedListCall { - c := &AcceleratorTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *AcceleratorTypesAggregatedListCall) Filter(filter string) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *AcceleratorTypesAggregatedListCall) MaxResults(maxResults int64) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *AcceleratorTypesAggregatedListCall) OrderBy(orderBy string) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *AcceleratorTypesAggregatedListCall) PageToken(pageToken string) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AcceleratorTypesAggregatedListCall) Fields(s ...googleapi.Field) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AcceleratorTypesAggregatedListCall) IfNoneMatch(entityTag string) *AcceleratorTypesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AcceleratorTypesAggregatedListCall) Context(ctx context.Context) *AcceleratorTypesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AcceleratorTypesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AcceleratorTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/acceleratorTypes") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.acceleratorTypes.aggregatedList" call. -// Exactly one of *AcceleratorTypeAggregatedList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *AcceleratorTypeAggregatedList.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AcceleratorTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*AcceleratorTypeAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AcceleratorTypeAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of accelerator types.", - // "httpMethod": "GET", - // "id": "compute.acceleratorTypes.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/acceleratorTypes", - // "response": { - // "$ref": "AcceleratorTypeAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AcceleratorTypesAggregatedListCall) Pages(ctx context.Context, f func(*AcceleratorTypeAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.acceleratorTypes.get": - -type AcceleratorTypesGetCall struct { - s *Service - project string - zone string - acceleratorType string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified accelerator type. Get a list of available -// accelerator types by making a list() request. -func (r *AcceleratorTypesService) Get(project string, zone string, acceleratorType string) *AcceleratorTypesGetCall { - c := &AcceleratorTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.acceleratorType = acceleratorType - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AcceleratorTypesGetCall) Fields(s ...googleapi.Field) *AcceleratorTypesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AcceleratorTypesGetCall) IfNoneMatch(entityTag string) *AcceleratorTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AcceleratorTypesGetCall) Context(ctx context.Context) *AcceleratorTypesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AcceleratorTypesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AcceleratorTypesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/acceleratorTypes/{acceleratorType}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "acceleratorType": c.acceleratorType, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.acceleratorTypes.get" call. -// Exactly one of *AcceleratorType or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *AcceleratorType.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AcceleratorTypesGetCall) Do(opts ...googleapi.CallOption) (*AcceleratorType, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AcceleratorType{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified accelerator type. Get a list of available accelerator types by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.acceleratorTypes.get", - // "parameterOrder": [ - // "project", - // "zone", - // "acceleratorType" - // ], - // "parameters": { - // "acceleratorType": { - // "description": "Name of the accelerator type to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/acceleratorTypes/{acceleratorType}", - // "response": { - // "$ref": "AcceleratorType" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.acceleratorTypes.list": - -type AcceleratorTypesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of accelerator types available to the -// specified project. -func (r *AcceleratorTypesService) List(project string, zone string) *AcceleratorTypesListCall { - c := &AcceleratorTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *AcceleratorTypesListCall) Filter(filter string) *AcceleratorTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *AcceleratorTypesListCall) MaxResults(maxResults int64) *AcceleratorTypesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *AcceleratorTypesListCall) OrderBy(orderBy string) *AcceleratorTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *AcceleratorTypesListCall) PageToken(pageToken string) *AcceleratorTypesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AcceleratorTypesListCall) Fields(s ...googleapi.Field) *AcceleratorTypesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AcceleratorTypesListCall) IfNoneMatch(entityTag string) *AcceleratorTypesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AcceleratorTypesListCall) Context(ctx context.Context) *AcceleratorTypesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AcceleratorTypesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AcceleratorTypesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/acceleratorTypes") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.acceleratorTypes.list" call. -// Exactly one of *AcceleratorTypeList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *AcceleratorTypeList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AcceleratorTypesListCall) Do(opts ...googleapi.CallOption) (*AcceleratorTypeList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AcceleratorTypeList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of accelerator types available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.acceleratorTypes.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/acceleratorTypes", - // "response": { - // "$ref": "AcceleratorTypeList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AcceleratorTypesListCall) Pages(ctx context.Context, f func(*AcceleratorTypeList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.addresses.aggregatedList": - -type AddressesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of addresses. -// For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/aggregatedList -func (r *AddressesService) AggregatedList(project string) *AddressesAggregatedListCall { - c := &AddressesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *AddressesAggregatedListCall) Filter(filter string) *AddressesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *AddressesAggregatedListCall) MaxResults(maxResults int64) *AddressesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *AddressesAggregatedListCall) OrderBy(orderBy string) *AddressesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *AddressesAggregatedListCall) PageToken(pageToken string) *AddressesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AddressesAggregatedListCall) Fields(s ...googleapi.Field) *AddressesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AddressesAggregatedListCall) IfNoneMatch(entityTag string) *AddressesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AddressesAggregatedListCall) Context(ctx context.Context) *AddressesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AddressesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/addresses") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.aggregatedList" call. -// Exactly one of *AddressAggregatedList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *AddressAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AddressesAggregatedListCall) Do(opts ...googleapi.CallOption) (*AddressAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AddressAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of addresses.", - // "httpMethod": "GET", - // "id": "compute.addresses.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/addresses", - // "response": { - // "$ref": "AddressAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AddressesAggregatedListCall) Pages(ctx context.Context, f func(*AddressAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.addresses.delete": - -type AddressesDeleteCall struct { - s *Service - project string - region string - address string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified address resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/delete -func (r *AddressesService) Delete(project string, region string, address string) *AddressesDeleteCall { - c := &AddressesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.address = address - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *AddressesDeleteCall) RequestId(requestId string) *AddressesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AddressesDeleteCall) Fields(s ...googleapi.Field) *AddressesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AddressesDeleteCall) Context(ctx context.Context) *AddressesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AddressesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses/{address}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "address": c.address, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified address resource.", - // "httpMethod": "DELETE", - // "id": "compute.addresses.delete", - // "parameterOrder": [ - // "project", - // "region", - // "address" - // ], - // "parameters": { - // "address": { - // "description": "Name of the address resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/addresses/{address}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.addresses.get": - -type AddressesGetCall struct { - s *Service - project string - region string - address string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified address resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/get -func (r *AddressesService) Get(project string, region string, address string) *AddressesGetCall { - c := &AddressesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.address = address - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AddressesGetCall) Fields(s ...googleapi.Field) *AddressesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AddressesGetCall) IfNoneMatch(entityTag string) *AddressesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AddressesGetCall) Context(ctx context.Context) *AddressesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AddressesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses/{address}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "address": c.address, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.get" call. -// Exactly one of *Address or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Address.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *AddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Address{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified address resource.", - // "httpMethod": "GET", - // "id": "compute.addresses.get", - // "parameterOrder": [ - // "project", - // "region", - // "address" - // ], - // "parameters": { - // "address": { - // "description": "Name of the address resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/addresses/{address}", - // "response": { - // "$ref": "Address" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.addresses.insert": - -type AddressesInsertCall struct { - s *Service - project string - region string - address *Address - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an address resource in the specified project using -// the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/insert -func (r *AddressesService) Insert(project string, region string, address *Address) *AddressesInsertCall { - c := &AddressesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.address = address - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *AddressesInsertCall) RequestId(requestId string) *AddressesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AddressesInsertCall) Fields(s ...googleapi.Field) *AddressesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AddressesInsertCall) Context(ctx context.Context) *AddressesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AddressesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.address) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates an address resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.addresses.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/addresses", - // "request": { - // "$ref": "Address" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.addresses.list": - -type AddressesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of addresses contained within the specified -// region. -// For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/list -func (r *AddressesService) List(project string, region string) *AddressesListCall { - c := &AddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *AddressesListCall) Filter(filter string) *AddressesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *AddressesListCall) MaxResults(maxResults int64) *AddressesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *AddressesListCall) OrderBy(orderBy string) *AddressesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *AddressesListCall) PageToken(pageToken string) *AddressesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AddressesListCall) Fields(s ...googleapi.Field) *AddressesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AddressesListCall) IfNoneMatch(entityTag string) *AddressesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AddressesListCall) Context(ctx context.Context) *AddressesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AddressesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.list" call. -// Exactly one of *AddressList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *AddressList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AddressList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of addresses contained within the specified region.", - // "httpMethod": "GET", - // "id": "compute.addresses.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/addresses", - // "response": { - // "$ref": "AddressList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AddressesListCall) Pages(ctx context.Context, f func(*AddressList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.addresses.setLabels": - -type AddressesSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on an Address. To learn more about labels, -// read the Labeling Resources documentation. -func (r *AddressesService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *AddressesSetLabelsCall { - c := &AddressesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *AddressesSetLabelsCall) RequestId(requestId string) *AddressesSetLabelsCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AddressesSetLabelsCall) Fields(s ...googleapi.Field) *AddressesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AddressesSetLabelsCall) Context(ctx context.Context) *AddressesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AddressesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetlabelsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses/{resource}/setLabels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.setLabels" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AddressesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the labels on an Address. To learn more about labels, read the Labeling Resources documentation.", - // "httpMethod": "POST", - // "id": "compute.addresses.setLabels", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/addresses/{resource}/setLabels", - // "request": { - // "$ref": "RegionSetLabelsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.addresses.testIamPermissions": - -type AddressesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *AddressesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *AddressesTestIamPermissionsCall { - c := &AddressesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AddressesTestIamPermissionsCall) Fields(s ...googleapi.Field) *AddressesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AddressesTestIamPermissionsCall) Context(ctx context.Context) *AddressesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AddressesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AddressesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.addresses.testIamPermissions", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/addresses/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.autoscalers.aggregatedList": - -type AutoscalersAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of autoscalers. -func (r *AutoscalersService) AggregatedList(project string) *AutoscalersAggregatedListCall { - c := &AutoscalersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *AutoscalersAggregatedListCall) Filter(filter string) *AutoscalersAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *AutoscalersAggregatedListCall) MaxResults(maxResults int64) *AutoscalersAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *AutoscalersAggregatedListCall) OrderBy(orderBy string) *AutoscalersAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *AutoscalersAggregatedListCall) PageToken(pageToken string) *AutoscalersAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AutoscalersAggregatedListCall) Fields(s ...googleapi.Field) *AutoscalersAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AutoscalersAggregatedListCall) IfNoneMatch(entityTag string) *AutoscalersAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AutoscalersAggregatedListCall) Context(ctx context.Context) *AutoscalersAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AutoscalersAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.aggregatedList" call. -// Exactly one of *AutoscalerAggregatedList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *AutoscalerAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AutoscalersAggregatedListCall) Do(opts ...googleapi.CallOption) (*AutoscalerAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AutoscalerAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of autoscalers.", - // "httpMethod": "GET", - // "id": "compute.autoscalers.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/autoscalers", - // "response": { - // "$ref": "AutoscalerAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AutoscalersAggregatedListCall) Pages(ctx context.Context, f func(*AutoscalerAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.autoscalers.delete": - -type AutoscalersDeleteCall struct { - s *Service - project string - zone string - autoscaler string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified autoscaler. -func (r *AutoscalersService) Delete(project string, zone string, autoscaler string) *AutoscalersDeleteCall { - c := &AutoscalersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.autoscaler = autoscaler - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *AutoscalersDeleteCall) RequestId(requestId string) *AutoscalersDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AutoscalersDeleteCall) Fields(s ...googleapi.Field) *AutoscalersDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AutoscalersDeleteCall) Context(ctx context.Context) *AutoscalersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AutoscalersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers/{autoscaler}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "autoscaler": c.autoscaler, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified autoscaler.", - // "httpMethod": "DELETE", - // "id": "compute.autoscalers.delete", - // "parameterOrder": [ - // "project", - // "zone", - // "autoscaler" - // ], - // "parameters": { - // "autoscaler": { - // "description": "Name of the autoscaler to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/autoscalers/{autoscaler}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.autoscalers.get": - -type AutoscalersGetCall struct { - s *Service - project string - zone string - autoscaler string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified autoscaler resource. Get a list of -// available autoscalers by making a list() request. -func (r *AutoscalersService) Get(project string, zone string, autoscaler string) *AutoscalersGetCall { - c := &AutoscalersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.autoscaler = autoscaler - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AutoscalersGetCall) Fields(s ...googleapi.Field) *AutoscalersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AutoscalersGetCall) IfNoneMatch(entityTag string) *AutoscalersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AutoscalersGetCall) Context(ctx context.Context) *AutoscalersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AutoscalersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers/{autoscaler}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "autoscaler": c.autoscaler, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.get" call. -// Exactly one of *Autoscaler or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Autoscaler.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Autoscaler{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified autoscaler resource. Get a list of available autoscalers by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.autoscalers.get", - // "parameterOrder": [ - // "project", - // "zone", - // "autoscaler" - // ], - // "parameters": { - // "autoscaler": { - // "description": "Name of the autoscaler to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/autoscalers/{autoscaler}", - // "response": { - // "$ref": "Autoscaler" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.autoscalers.insert": - -type AutoscalersInsertCall struct { - s *Service - project string - zone string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an autoscaler in the specified project using the data -// included in the request. -func (r *AutoscalersService) Insert(project string, zone string, autoscaler *Autoscaler) *AutoscalersInsertCall { - c := &AutoscalersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.autoscaler = autoscaler - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *AutoscalersInsertCall) RequestId(requestId string) *AutoscalersInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AutoscalersInsertCall) Fields(s ...googleapi.Field) *AutoscalersInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AutoscalersInsertCall) Context(ctx context.Context) *AutoscalersInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AutoscalersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates an autoscaler in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.autoscalers.insert", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/autoscalers", - // "request": { - // "$ref": "Autoscaler" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.autoscalers.list": - -type AutoscalersListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of autoscalers contained within the specified -// zone. -func (r *AutoscalersService) List(project string, zone string) *AutoscalersListCall { - c := &AutoscalersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *AutoscalersListCall) Filter(filter string) *AutoscalersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *AutoscalersListCall) MaxResults(maxResults int64) *AutoscalersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *AutoscalersListCall) OrderBy(orderBy string) *AutoscalersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *AutoscalersListCall) PageToken(pageToken string) *AutoscalersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AutoscalersListCall) Fields(s ...googleapi.Field) *AutoscalersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AutoscalersListCall) IfNoneMatch(entityTag string) *AutoscalersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AutoscalersListCall) Context(ctx context.Context) *AutoscalersListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AutoscalersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.list" call. -// Exactly one of *AutoscalerList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *AutoscalerList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AutoscalersListCall) Do(opts ...googleapi.CallOption) (*AutoscalerList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AutoscalerList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of autoscalers contained within the specified zone.", - // "httpMethod": "GET", - // "id": "compute.autoscalers.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/autoscalers", - // "response": { - // "$ref": "AutoscalerList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AutoscalersListCall) Pages(ctx context.Context, f func(*AutoscalerList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.autoscalers.patch": - -type AutoscalersPatchCall struct { - s *Service - project string - zone string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates an autoscaler in the specified project using the data -// included in the request. This method supports PATCH semantics and -// uses the JSON merge patch format and processing rules. -func (r *AutoscalersService) Patch(project string, zone string, autoscaler *Autoscaler) *AutoscalersPatchCall { - c := &AutoscalersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.autoscaler = autoscaler - return c -} - -// Autoscaler sets the optional parameter "autoscaler": Name of the -// autoscaler to patch. -func (c *AutoscalersPatchCall) Autoscaler(autoscaler string) *AutoscalersPatchCall { - c.urlParams_.Set("autoscaler", autoscaler) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *AutoscalersPatchCall) RequestId(requestId string) *AutoscalersPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AutoscalersPatchCall) Fields(s ...googleapi.Field) *AutoscalersPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AutoscalersPatchCall) Context(ctx context.Context) *AutoscalersPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AutoscalersPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.autoscalers.patch", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "autoscaler": { - // "description": "Name of the autoscaler to patch.", - // "location": "query", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/autoscalers", - // "request": { - // "$ref": "Autoscaler" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.autoscalers.testIamPermissions": - -type AutoscalersTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *AutoscalersService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *AutoscalersTestIamPermissionsCall { - c := &AutoscalersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AutoscalersTestIamPermissionsCall) Fields(s ...googleapi.Field) *AutoscalersTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AutoscalersTestIamPermissionsCall) Context(ctx context.Context) *AutoscalersTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AutoscalersTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AutoscalersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.autoscalers.testIamPermissions", - // "parameterOrder": [ - // "project", - // "zone", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/autoscalers/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.autoscalers.update": - -type AutoscalersUpdateCall struct { - s *Service - project string - zone string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates an autoscaler in the specified project using the data -// included in the request. -func (r *AutoscalersService) Update(project string, zone string, autoscaler *Autoscaler) *AutoscalersUpdateCall { - c := &AutoscalersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.autoscaler = autoscaler - return c -} - -// Autoscaler sets the optional parameter "autoscaler": Name of the -// autoscaler to update. -func (c *AutoscalersUpdateCall) Autoscaler(autoscaler string) *AutoscalersUpdateCall { - c.urlParams_.Set("autoscaler", autoscaler) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *AutoscalersUpdateCall) RequestId(requestId string) *AutoscalersUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AutoscalersUpdateCall) Fields(s ...googleapi.Field) *AutoscalersUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AutoscalersUpdateCall) Context(ctx context.Context) *AutoscalersUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AutoscalersUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates an autoscaler in the specified project using the data included in the request.", - // "httpMethod": "PUT", - // "id": "compute.autoscalers.update", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "autoscaler": { - // "description": "Name of the autoscaler to update.", - // "location": "query", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/autoscalers", - // "request": { - // "$ref": "Autoscaler" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.backendBuckets.delete": - -type BackendBucketsDeleteCall struct { - s *Service - project string - backendBucket string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified BackendBucket resource. -func (r *BackendBucketsService) Delete(project string, backendBucket string) *BackendBucketsDeleteCall { - c := &BackendBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendBucket = backendBucket - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *BackendBucketsDeleteCall) RequestId(requestId string) *BackendBucketsDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendBucketsDeleteCall) Fields(s ...googleapi.Field) *BackendBucketsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendBucketsDeleteCall) Context(ctx context.Context) *BackendBucketsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendBucketsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets/{backendBucket}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendBucket": c.backendBucket, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified BackendBucket resource.", - // "httpMethod": "DELETE", - // "id": "compute.backendBuckets.delete", - // "parameterOrder": [ - // "project", - // "backendBucket" - // ], - // "parameters": { - // "backendBucket": { - // "description": "Name of the BackendBucket resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/backendBuckets/{backendBucket}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.backendBuckets.get": - -type BackendBucketsGetCall struct { - s *Service - project string - backendBucket string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified BackendBucket resource. Get a list of -// available backend buckets by making a list() request. -func (r *BackendBucketsService) Get(project string, backendBucket string) *BackendBucketsGetCall { - c := &BackendBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendBucket = backendBucket - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendBucketsGetCall) Fields(s ...googleapi.Field) *BackendBucketsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *BackendBucketsGetCall) IfNoneMatch(entityTag string) *BackendBucketsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendBucketsGetCall) Context(ctx context.Context) *BackendBucketsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendBucketsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets/{backendBucket}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendBucket": c.backendBucket, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.get" call. -// Exactly one of *BackendBucket or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *BackendBucket.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *BackendBucketsGetCall) Do(opts ...googleapi.CallOption) (*BackendBucket, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &BackendBucket{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified BackendBucket resource. Get a list of available backend buckets by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.backendBuckets.get", - // "parameterOrder": [ - // "project", - // "backendBucket" - // ], - // "parameters": { - // "backendBucket": { - // "description": "Name of the BackendBucket resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/backendBuckets/{backendBucket}", - // "response": { - // "$ref": "BackendBucket" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.backendBuckets.insert": - -type BackendBucketsInsertCall struct { - s *Service - project string - backendbucket *BackendBucket - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a BackendBucket resource in the specified project -// using the data included in the request. -func (r *BackendBucketsService) Insert(project string, backendbucket *BackendBucket) *BackendBucketsInsertCall { - c := &BackendBucketsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendbucket = backendbucket - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *BackendBucketsInsertCall) RequestId(requestId string) *BackendBucketsInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendBucketsInsertCall) Fields(s ...googleapi.Field) *BackendBucketsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendBucketsInsertCall) Context(ctx context.Context) *BackendBucketsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendBucketsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendbucket) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendBucketsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a BackendBucket resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.backendBuckets.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/backendBuckets", - // "request": { - // "$ref": "BackendBucket" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.backendBuckets.list": - -type BackendBucketsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of BackendBucket resources available to the -// specified project. -func (r *BackendBucketsService) List(project string) *BackendBucketsListCall { - c := &BackendBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *BackendBucketsListCall) Filter(filter string) *BackendBucketsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *BackendBucketsListCall) MaxResults(maxResults int64) *BackendBucketsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *BackendBucketsListCall) OrderBy(orderBy string) *BackendBucketsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *BackendBucketsListCall) PageToken(pageToken string) *BackendBucketsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendBucketsListCall) Fields(s ...googleapi.Field) *BackendBucketsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *BackendBucketsListCall) IfNoneMatch(entityTag string) *BackendBucketsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendBucketsListCall) Context(ctx context.Context) *BackendBucketsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendBucketsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.list" call. -// Exactly one of *BackendBucketList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *BackendBucketList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *BackendBucketsListCall) Do(opts ...googleapi.CallOption) (*BackendBucketList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &BackendBucketList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of BackendBucket resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.backendBuckets.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/backendBuckets", - // "response": { - // "$ref": "BackendBucketList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *BackendBucketsListCall) Pages(ctx context.Context, f func(*BackendBucketList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.backendBuckets.patch": - -type BackendBucketsPatchCall struct { - s *Service - project string - backendBucket string - backendbucket *BackendBucket - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified BackendBucket resource with the data -// included in the request. This method supports PATCH semantics and -// uses the JSON merge patch format and processing rules. -func (r *BackendBucketsService) Patch(project string, backendBucket string, backendbucket *BackendBucket) *BackendBucketsPatchCall { - c := &BackendBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendBucket = backendBucket - c.backendbucket = backendbucket - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *BackendBucketsPatchCall) RequestId(requestId string) *BackendBucketsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendBucketsPatchCall) Fields(s ...googleapi.Field) *BackendBucketsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendBucketsPatchCall) Context(ctx context.Context) *BackendBucketsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendBucketsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendbucket) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets/{backendBucket}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendBucket": c.backendBucket, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendBucketsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.backendBuckets.patch", - // "parameterOrder": [ - // "project", - // "backendBucket" - // ], - // "parameters": { - // "backendBucket": { - // "description": "Name of the BackendBucket resource to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/backendBuckets/{backendBucket}", - // "request": { - // "$ref": "BackendBucket" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.backendBuckets.update": - -type BackendBucketsUpdateCall struct { - s *Service - project string - backendBucket string - backendbucket *BackendBucket - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified BackendBucket resource with the data -// included in the request. -func (r *BackendBucketsService) Update(project string, backendBucket string, backendbucket *BackendBucket) *BackendBucketsUpdateCall { - c := &BackendBucketsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendBucket = backendBucket - c.backendbucket = backendbucket - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *BackendBucketsUpdateCall) RequestId(requestId string) *BackendBucketsUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendBucketsUpdateCall) Fields(s ...googleapi.Field) *BackendBucketsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendBucketsUpdateCall) Context(ctx context.Context) *BackendBucketsUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendBucketsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendbucket) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets/{backendBucket}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendBucket": c.backendBucket, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendBucketsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the specified BackendBucket resource with the data included in the request.", - // "httpMethod": "PUT", - // "id": "compute.backendBuckets.update", - // "parameterOrder": [ - // "project", - // "backendBucket" - // ], - // "parameters": { - // "backendBucket": { - // "description": "Name of the BackendBucket resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/backendBuckets/{backendBucket}", - // "request": { - // "$ref": "BackendBucket" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.backendServices.aggregatedList": - -type BackendServicesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all BackendService resources, -// regional and global, available to the specified project. -func (r *BackendServicesService) AggregatedList(project string) *BackendServicesAggregatedListCall { - c := &BackendServicesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *BackendServicesAggregatedListCall) Filter(filter string) *BackendServicesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *BackendServicesAggregatedListCall) MaxResults(maxResults int64) *BackendServicesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *BackendServicesAggregatedListCall) OrderBy(orderBy string) *BackendServicesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *BackendServicesAggregatedListCall) PageToken(pageToken string) *BackendServicesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendServicesAggregatedListCall) Fields(s ...googleapi.Field) *BackendServicesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *BackendServicesAggregatedListCall) IfNoneMatch(entityTag string) *BackendServicesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendServicesAggregatedListCall) Context(ctx context.Context) *BackendServicesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendServicesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/backendServices") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.aggregatedList" call. -// Exactly one of *BackendServiceAggregatedList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *BackendServiceAggregatedList.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *BackendServicesAggregatedListCall) Do(opts ...googleapi.CallOption) (*BackendServiceAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &BackendServiceAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of all BackendService resources, regional and global, available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.backendServices.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Name of the project scoping this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/backendServices", - // "response": { - // "$ref": "BackendServiceAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *BackendServicesAggregatedListCall) Pages(ctx context.Context, f func(*BackendServiceAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.backendServices.delete": - -type BackendServicesDeleteCall struct { - s *Service - project string - backendService string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified BackendService resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/delete -func (r *BackendServicesService) Delete(project string, backendService string) *BackendServicesDeleteCall { - c := &BackendServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *BackendServicesDeleteCall) RequestId(requestId string) *BackendServicesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendServicesDeleteCall) Fields(s ...googleapi.Field) *BackendServicesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendServicesDeleteCall) Context(ctx context.Context) *BackendServicesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendServicesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified BackendService resource.", - // "httpMethod": "DELETE", - // "id": "compute.backendServices.delete", - // "parameterOrder": [ - // "project", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/backendServices/{backendService}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.backendServices.get": - -type BackendServicesGetCall struct { - s *Service - project string - backendService string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified BackendService resource. Get a list of -// available backend services by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/get -func (r *BackendServicesService) Get(project string, backendService string) *BackendServicesGetCall { - c := &BackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendServicesGetCall) Fields(s ...googleapi.Field) *BackendServicesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *BackendServicesGetCall) IfNoneMatch(entityTag string) *BackendServicesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendServicesGetCall) Context(ctx context.Context) *BackendServicesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendServicesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.get" call. -// Exactly one of *BackendService or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *BackendService.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *BackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendService, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &BackendService{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified BackendService resource. Get a list of available backend services by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.backendServices.get", - // "parameterOrder": [ - // "project", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/backendServices/{backendService}", - // "response": { - // "$ref": "BackendService" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.backendServices.getHealth": - -type BackendServicesGetHealthCall struct { - s *Service - project string - backendService string - resourcegroupreference *ResourceGroupReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetHealth: Gets the most recent health check results for this -// BackendService. -// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/getHealth -func (r *BackendServicesService) GetHealth(project string, backendService string, resourcegroupreference *ResourceGroupReference) *BackendServicesGetHealthCall { - c := &BackendServicesGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - c.resourcegroupreference = resourcegroupreference - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendServicesGetHealthCall) Fields(s ...googleapi.Field) *BackendServicesGetHealthCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendServicesGetHealthCall) Context(ctx context.Context) *BackendServicesGetHealthCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendServicesGetHealthCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesGetHealthCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourcegroupreference) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}/getHealth") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.getHealth" call. -// Exactly one of *BackendServiceGroupHealth or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *BackendServiceGroupHealth.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *BackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*BackendServiceGroupHealth, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &BackendServiceGroupHealth{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the most recent health check results for this BackendService.", - // "httpMethod": "POST", - // "id": "compute.backendServices.getHealth", - // "parameterOrder": [ - // "project", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to which the queried instance belongs.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/backendServices/{backendService}/getHealth", - // "request": { - // "$ref": "ResourceGroupReference" - // }, - // "response": { - // "$ref": "BackendServiceGroupHealth" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.backendServices.insert": - -type BackendServicesInsertCall struct { - s *Service - project string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a BackendService resource in the specified project -// using the data included in the request. There are several -// restrictions and guidelines to keep in mind when creating a backend -// service. Read Restrictions and Guidelines for more information. -// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/insert -func (r *BackendServicesService) Insert(project string, backendservice *BackendService) *BackendServicesInsertCall { - c := &BackendServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendservice = backendservice - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *BackendServicesInsertCall) RequestId(requestId string) *BackendServicesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendServicesInsertCall) Fields(s ...googleapi.Field) *BackendServicesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendServicesInsertCall) Context(ctx context.Context) *BackendServicesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendServicesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Restrictions and Guidelines for more information.", - // "httpMethod": "POST", - // "id": "compute.backendServices.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/backendServices", - // "request": { - // "$ref": "BackendService" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.backendServices.list": - -type BackendServicesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of BackendService resources available to the -// specified project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/list -func (r *BackendServicesService) List(project string) *BackendServicesListCall { - c := &BackendServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *BackendServicesListCall) Filter(filter string) *BackendServicesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *BackendServicesListCall) MaxResults(maxResults int64) *BackendServicesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *BackendServicesListCall) OrderBy(orderBy string) *BackendServicesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *BackendServicesListCall) PageToken(pageToken string) *BackendServicesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendServicesListCall) Fields(s ...googleapi.Field) *BackendServicesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *BackendServicesListCall) IfNoneMatch(entityTag string) *BackendServicesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendServicesListCall) Context(ctx context.Context) *BackendServicesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendServicesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.list" call. -// Exactly one of *BackendServiceList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *BackendServiceList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *BackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServiceList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &BackendServiceList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of BackendService resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.backendServices.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/backendServices", - // "response": { - // "$ref": "BackendServiceList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *BackendServicesListCall) Pages(ctx context.Context, f func(*BackendServiceList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.backendServices.patch": - -type BackendServicesPatchCall struct { - s *Service - project string - backendService string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified BackendService resource with the data -// included in the request. There are several restrictions and -// guidelines to keep in mind when updating a backend service. Read -// Restrictions and Guidelines for more information. This method -// supports PATCH semantics and uses the JSON merge patch format and -// processing rules. -// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/patch -func (r *BackendServicesService) Patch(project string, backendService string, backendservice *BackendService) *BackendServicesPatchCall { - c := &BackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - c.backendservice = backendservice - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *BackendServicesPatchCall) RequestId(requestId string) *BackendServicesPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendServicesPatchCall) Fields(s ...googleapi.Field) *BackendServicesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendServicesPatchCall) Context(ctx context.Context) *BackendServicesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendServicesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Patches the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.backendServices.patch", - // "parameterOrder": [ - // "project", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/backendServices/{backendService}", - // "request": { - // "$ref": "BackendService" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.backendServices.testIamPermissions": - -type BackendServicesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *BackendServicesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *BackendServicesTestIamPermissionsCall { - c := &BackendServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *BackendServicesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendServicesTestIamPermissionsCall) Context(ctx context.Context) *BackendServicesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendServicesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *BackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.backendServices.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/backendServices/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.backendServices.update": - -type BackendServicesUpdateCall struct { - s *Service - project string - backendService string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified BackendService resource with the data -// included in the request. There are several restrictions and -// guidelines to keep in mind when updating a backend service. Read -// Restrictions and Guidelines for more information. -// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/update -func (r *BackendServicesService) Update(project string, backendService string, backendservice *BackendService) *BackendServicesUpdateCall { - c := &BackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - c.backendservice = backendservice - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *BackendServicesUpdateCall) RequestId(requestId string) *BackendServicesUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendServicesUpdateCall) Fields(s ...googleapi.Field) *BackendServicesUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendServicesUpdateCall) Context(ctx context.Context) *BackendServicesUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendServicesUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information.", - // "httpMethod": "PUT", - // "id": "compute.backendServices.update", - // "parameterOrder": [ - // "project", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/backendServices/{backendService}", - // "request": { - // "$ref": "BackendService" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.diskTypes.aggregatedList": - -type DiskTypesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of disk types. -// For details, see https://cloud.google.com/compute/docs/reference/latest/diskTypes/aggregatedList -func (r *DiskTypesService) AggregatedList(project string) *DiskTypesAggregatedListCall { - c := &DiskTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *DiskTypesAggregatedListCall) Filter(filter string) *DiskTypesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *DiskTypesAggregatedListCall) MaxResults(maxResults int64) *DiskTypesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *DiskTypesAggregatedListCall) OrderBy(orderBy string) *DiskTypesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *DiskTypesAggregatedListCall) PageToken(pageToken string) *DiskTypesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DiskTypesAggregatedListCall) Fields(s ...googleapi.Field) *DiskTypesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *DiskTypesAggregatedListCall) IfNoneMatch(entityTag string) *DiskTypesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DiskTypesAggregatedListCall) Context(ctx context.Context) *DiskTypesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DiskTypesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DiskTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/diskTypes") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.diskTypes.aggregatedList" call. -// Exactly one of *DiskTypeAggregatedList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *DiskTypeAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *DiskTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskTypeAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &DiskTypeAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of disk types.", - // "httpMethod": "GET", - // "id": "compute.diskTypes.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/diskTypes", - // "response": { - // "$ref": "DiskTypeAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *DiskTypesAggregatedListCall) Pages(ctx context.Context, f func(*DiskTypeAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.diskTypes.get": - -type DiskTypesGetCall struct { - s *Service - project string - zone string - diskType string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified disk type. Get a list of available disk -// types by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/diskTypes/get -func (r *DiskTypesService) Get(project string, zone string, diskType string) *DiskTypesGetCall { - c := &DiskTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.diskType = diskType - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DiskTypesGetCall) Fields(s ...googleapi.Field) *DiskTypesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *DiskTypesGetCall) IfNoneMatch(entityTag string) *DiskTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DiskTypesGetCall) Context(ctx context.Context) *DiskTypesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DiskTypesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DiskTypesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/diskTypes/{diskType}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "diskType": c.diskType, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.diskTypes.get" call. -// Exactly one of *DiskType or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *DiskType.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &DiskType{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified disk type. Get a list of available disk types by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.diskTypes.get", - // "parameterOrder": [ - // "project", - // "zone", - // "diskType" - // ], - // "parameters": { - // "diskType": { - // "description": "Name of the disk type to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/diskTypes/{diskType}", - // "response": { - // "$ref": "DiskType" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.diskTypes.list": - -type DiskTypesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of disk types available to the specified -// project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/diskTypes/list -func (r *DiskTypesService) List(project string, zone string) *DiskTypesListCall { - c := &DiskTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *DiskTypesListCall) Filter(filter string) *DiskTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *DiskTypesListCall) MaxResults(maxResults int64) *DiskTypesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *DiskTypesListCall) OrderBy(orderBy string) *DiskTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *DiskTypesListCall) PageToken(pageToken string) *DiskTypesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DiskTypesListCall) Fields(s ...googleapi.Field) *DiskTypesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *DiskTypesListCall) IfNoneMatch(entityTag string) *DiskTypesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DiskTypesListCall) Context(ctx context.Context) *DiskTypesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DiskTypesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DiskTypesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/diskTypes") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.diskTypes.list" call. -// Exactly one of *DiskTypeList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *DiskTypeList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DiskTypesListCall) Do(opts ...googleapi.CallOption) (*DiskTypeList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &DiskTypeList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of disk types available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.diskTypes.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/diskTypes", - // "response": { - // "$ref": "DiskTypeList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *DiskTypesListCall) Pages(ctx context.Context, f func(*DiskTypeList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.disks.aggregatedList": - -type DisksAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of persistent disks. -// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/aggregatedList -func (r *DisksService) AggregatedList(project string) *DisksAggregatedListCall { - c := &DisksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *DisksAggregatedListCall) Filter(filter string) *DisksAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *DisksAggregatedListCall) MaxResults(maxResults int64) *DisksAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *DisksAggregatedListCall) OrderBy(orderBy string) *DisksAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *DisksAggregatedListCall) PageToken(pageToken string) *DisksAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DisksAggregatedListCall) Fields(s ...googleapi.Field) *DisksAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *DisksAggregatedListCall) IfNoneMatch(entityTag string) *DisksAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DisksAggregatedListCall) Context(ctx context.Context) *DisksAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DisksAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/disks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.aggregatedList" call. -// Exactly one of *DiskAggregatedList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *DiskAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *DisksAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &DiskAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of persistent disks.", - // "httpMethod": "GET", - // "id": "compute.disks.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/disks", - // "response": { - // "$ref": "DiskAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *DisksAggregatedListCall) Pages(ctx context.Context, f func(*DiskAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.disks.createSnapshot": - -type DisksCreateSnapshotCall struct { - s *Service - project string - zone string - disk string - snapshot *Snapshot - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CreateSnapshot: Creates a snapshot of a specified persistent disk. -// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/createSnapshot -func (r *DisksService) CreateSnapshot(project string, zone string, disk string, snapshot *Snapshot) *DisksCreateSnapshotCall { - c := &DisksCreateSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - c.snapshot = snapshot - return c -} - -// GuestFlush sets the optional parameter "guestFlush": -func (c *DisksCreateSnapshotCall) GuestFlush(guestFlush bool) *DisksCreateSnapshotCall { - c.urlParams_.Set("guestFlush", fmt.Sprint(guestFlush)) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *DisksCreateSnapshotCall) RequestId(requestId string) *DisksCreateSnapshotCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DisksCreateSnapshotCall) Fields(s ...googleapi.Field) *DisksCreateSnapshotCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DisksCreateSnapshotCall) Context(ctx context.Context) *DisksCreateSnapshotCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DisksCreateSnapshotCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.snapshot) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}/createSnapshot") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.createSnapshot" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a snapshot of a specified persistent disk.", - // "httpMethod": "POST", - // "id": "compute.disks.createSnapshot", - // "parameterOrder": [ - // "project", - // "zone", - // "disk" - // ], - // "parameters": { - // "disk": { - // "description": "Name of the persistent disk to snapshot.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "guestFlush": { - // "location": "query", - // "type": "boolean" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/disks/{disk}/createSnapshot", - // "request": { - // "$ref": "Snapshot" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.disks.delete": - -type DisksDeleteCall struct { - s *Service - project string - zone string - disk string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified persistent disk. Deleting a disk -// removes its data permanently and is irreversible. However, deleting a -// disk does not delete any snapshots previously made from the disk. You -// must separately delete snapshots. -// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/delete -func (r *DisksService) Delete(project string, zone string, disk string) *DisksDeleteCall { - c := &DisksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *DisksDeleteCall) RequestId(requestId string) *DisksDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DisksDeleteCall) Fields(s ...googleapi.Field) *DisksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DisksDeleteCall) Context(ctx context.Context) *DisksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DisksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.", - // "httpMethod": "DELETE", - // "id": "compute.disks.delete", - // "parameterOrder": [ - // "project", - // "zone", - // "disk" - // ], - // "parameters": { - // "disk": { - // "description": "Name of the persistent disk to delete.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/disks/{disk}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.disks.get": - -type DisksGetCall struct { - s *Service - project string - zone string - disk string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns a specified persistent disk. Get a list of available -// persistent disks by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/get -func (r *DisksService) Get(project string, zone string, disk string) *DisksGetCall { - c := &DisksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DisksGetCall) Fields(s ...googleapi.Field) *DisksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *DisksGetCall) IfNoneMatch(entityTag string) *DisksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DisksGetCall) Context(ctx context.Context) *DisksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DisksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.get" call. -// Exactly one of *Disk or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Disk.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *DisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Disk{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns a specified persistent disk. Get a list of available persistent disks by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.disks.get", - // "parameterOrder": [ - // "project", - // "zone", - // "disk" - // ], - // "parameters": { - // "disk": { - // "description": "Name of the persistent disk to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/disks/{disk}", - // "response": { - // "$ref": "Disk" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.disks.insert": - -type DisksInsertCall struct { - s *Service - project string - zone string - disk *Disk - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a persistent disk in the specified project using the -// data in the request. You can create a disk with a sourceImage, a -// sourceSnapshot, or create an empty 500 GB data disk by omitting all -// properties. You can also create a disk that is larger than the -// default size by specifying the sizeGb property. -// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/insert -func (r *DisksService) Insert(project string, zone string, disk *Disk) *DisksInsertCall { - c := &DisksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *DisksInsertCall) RequestId(requestId string) *DisksInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// SourceImage sets the optional parameter "sourceImage": Source image -// to restore onto a disk. -func (c *DisksInsertCall) SourceImage(sourceImage string) *DisksInsertCall { - c.urlParams_.Set("sourceImage", sourceImage) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DisksInsertCall) Fields(s ...googleapi.Field) *DisksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DisksInsertCall) Context(ctx context.Context) *DisksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DisksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.disk) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.", - // "httpMethod": "POST", - // "id": "compute.disks.insert", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "sourceImage": { - // "description": "Optional. Source image to restore onto a disk.", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/disks", - // "request": { - // "$ref": "Disk" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.disks.list": - -type DisksListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of persistent disks contained within the -// specified zone. -// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/list -func (r *DisksService) List(project string, zone string) *DisksListCall { - c := &DisksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *DisksListCall) Filter(filter string) *DisksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *DisksListCall) MaxResults(maxResults int64) *DisksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *DisksListCall) OrderBy(orderBy string) *DisksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *DisksListCall) PageToken(pageToken string) *DisksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DisksListCall) Fields(s ...googleapi.Field) *DisksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *DisksListCall) IfNoneMatch(entityTag string) *DisksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DisksListCall) Context(ctx context.Context) *DisksListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DisksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.list" call. -// Exactly one of *DiskList or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *DiskList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &DiskList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of persistent disks contained within the specified zone.", - // "httpMethod": "GET", - // "id": "compute.disks.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/disks", - // "response": { - // "$ref": "DiskList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *DisksListCall) Pages(ctx context.Context, f func(*DiskList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.disks.resize": - -type DisksResizeCall struct { - s *Service - project string - zone string - disk string - disksresizerequest *DisksResizeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Resize: Resizes the specified persistent disk. -func (r *DisksService) Resize(project string, zone string, disk string, disksresizerequest *DisksResizeRequest) *DisksResizeCall { - c := &DisksResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - c.disksresizerequest = disksresizerequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *DisksResizeCall) RequestId(requestId string) *DisksResizeCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DisksResizeCall) Fields(s ...googleapi.Field) *DisksResizeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DisksResizeCall) Context(ctx context.Context) *DisksResizeCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DisksResizeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksResizeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.disksresizerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}/resize") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.resize" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Resizes the specified persistent disk.", - // "httpMethod": "POST", - // "id": "compute.disks.resize", - // "parameterOrder": [ - // "project", - // "zone", - // "disk" - // ], - // "parameters": { - // "disk": { - // "description": "The name of the persistent disk.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/disks/{disk}/resize", - // "request": { - // "$ref": "DisksResizeRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.disks.setLabels": - -type DisksSetLabelsCall struct { - s *Service - project string - zone string - resource string - zonesetlabelsrequest *ZoneSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a disk. To learn more about labels, -// read the Labeling Resources documentation. -func (r *DisksService) SetLabels(project string, zone string, resource string, zonesetlabelsrequest *ZoneSetLabelsRequest) *DisksSetLabelsCall { - c := &DisksSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.zonesetlabelsrequest = zonesetlabelsrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *DisksSetLabelsCall) RequestId(requestId string) *DisksSetLabelsCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DisksSetLabelsCall) Fields(s ...googleapi.Field) *DisksSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DisksSetLabelsCall) Context(ctx context.Context) *DisksSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DisksSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.zonesetlabelsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{resource}/setLabels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.setLabels" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation.", - // "httpMethod": "POST", - // "id": "compute.disks.setLabels", - // "parameterOrder": [ - // "project", - // "zone", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/disks/{resource}/setLabels", - // "request": { - // "$ref": "ZoneSetLabelsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.disks.testIamPermissions": - -type DisksTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *DisksService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *DisksTestIamPermissionsCall { - c := &DisksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DisksTestIamPermissionsCall) Fields(s ...googleapi.Field) *DisksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DisksTestIamPermissionsCall) Context(ctx context.Context) *DisksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DisksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *DisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.disks.testIamPermissions", - // "parameterOrder": [ - // "project", - // "zone", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/disks/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.firewalls.delete": - -type FirewallsDeleteCall struct { - s *Service - project string - firewall string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified firewall. -// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/delete -func (r *FirewallsService) Delete(project string, firewall string) *FirewallsDeleteCall { - c := &FirewallsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewall = firewall - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *FirewallsDeleteCall) RequestId(requestId string) *FirewallsDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *FirewallsDeleteCall) Fields(s ...googleapi.Field) *FirewallsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *FirewallsDeleteCall) Context(ctx context.Context) *FirewallsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *FirewallsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewall": c.firewall, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *FirewallsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified firewall.", - // "httpMethod": "DELETE", - // "id": "compute.firewalls.delete", - // "parameterOrder": [ - // "project", - // "firewall" - // ], - // "parameters": { - // "firewall": { - // "description": "Name of the firewall rule to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/firewalls/{firewall}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.firewalls.get": - -type FirewallsGetCall struct { - s *Service - project string - firewall string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified firewall. -// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/get -func (r *FirewallsService) Get(project string, firewall string) *FirewallsGetCall { - c := &FirewallsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewall = firewall - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *FirewallsGetCall) Fields(s ...googleapi.Field) *FirewallsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *FirewallsGetCall) IfNoneMatch(entityTag string) *FirewallsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *FirewallsGetCall) Context(ctx context.Context) *FirewallsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *FirewallsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewall": c.firewall, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.get" call. -// Exactly one of *Firewall or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Firewall.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *FirewallsGetCall) Do(opts ...googleapi.CallOption) (*Firewall, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Firewall{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified firewall.", - // "httpMethod": "GET", - // "id": "compute.firewalls.get", - // "parameterOrder": [ - // "project", - // "firewall" - // ], - // "parameters": { - // "firewall": { - // "description": "Name of the firewall rule to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/firewalls/{firewall}", - // "response": { - // "$ref": "Firewall" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.firewalls.insert": - -type FirewallsInsertCall struct { - s *Service - project string - firewall *Firewall - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a firewall rule in the specified project using the -// data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/insert -func (r *FirewallsService) Insert(project string, firewall *Firewall) *FirewallsInsertCall { - c := &FirewallsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewall = firewall - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *FirewallsInsertCall) RequestId(requestId string) *FirewallsInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *FirewallsInsertCall) Fields(s ...googleapi.Field) *FirewallsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *FirewallsInsertCall) Context(ctx context.Context) *FirewallsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *FirewallsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *FirewallsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a firewall rule in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.firewalls.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/firewalls", - // "request": { - // "$ref": "Firewall" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.firewalls.list": - -type FirewallsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of firewall rules available to the specified -// project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/list -func (r *FirewallsService) List(project string) *FirewallsListCall { - c := &FirewallsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *FirewallsListCall) Filter(filter string) *FirewallsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *FirewallsListCall) MaxResults(maxResults int64) *FirewallsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *FirewallsListCall) OrderBy(orderBy string) *FirewallsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *FirewallsListCall) PageToken(pageToken string) *FirewallsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *FirewallsListCall) Fields(s ...googleapi.Field) *FirewallsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *FirewallsListCall) IfNoneMatch(entityTag string) *FirewallsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *FirewallsListCall) Context(ctx context.Context) *FirewallsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *FirewallsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.list" call. -// Exactly one of *FirewallList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *FirewallList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *FirewallsListCall) Do(opts ...googleapi.CallOption) (*FirewallList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &FirewallList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of firewall rules available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.firewalls.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/firewalls", - // "response": { - // "$ref": "FirewallList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *FirewallsListCall) Pages(ctx context.Context, f func(*FirewallList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.firewalls.patch": - -type FirewallsPatchCall struct { - s *Service - project string - firewall string - firewall2 *Firewall - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified firewall rule with the data included in -// the request. This method supports PATCH semantics and uses the JSON -// merge patch format and processing rules. -// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/patch -func (r *FirewallsService) Patch(project string, firewall string, firewall2 *Firewall) *FirewallsPatchCall { - c := &FirewallsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewall = firewall - c.firewall2 = firewall2 - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *FirewallsPatchCall) RequestId(requestId string) *FirewallsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *FirewallsPatchCall) Fields(s ...googleapi.Field) *FirewallsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *FirewallsPatchCall) Context(ctx context.Context) *FirewallsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *FirewallsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall2) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewall": c.firewall, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *FirewallsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.firewalls.patch", - // "parameterOrder": [ - // "project", - // "firewall" - // ], - // "parameters": { - // "firewall": { - // "description": "Name of the firewall rule to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/firewalls/{firewall}", - // "request": { - // "$ref": "Firewall" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.firewalls.testIamPermissions": - -type FirewallsTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *FirewallsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *FirewallsTestIamPermissionsCall { - c := &FirewallsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *FirewallsTestIamPermissionsCall) Fields(s ...googleapi.Field) *FirewallsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *FirewallsTestIamPermissionsCall) Context(ctx context.Context) *FirewallsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *FirewallsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *FirewallsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.firewalls.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/firewalls/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.firewalls.update": - -type FirewallsUpdateCall struct { - s *Service - project string - firewall string - firewall2 *Firewall - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified firewall rule with the data included in -// the request. Using PUT method, can only update following fields of -// firewall rule: allowed, description, sourceRanges, sourceTags, -// targetTags. -// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/update -func (r *FirewallsService) Update(project string, firewall string, firewall2 *Firewall) *FirewallsUpdateCall { - c := &FirewallsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewall = firewall - c.firewall2 = firewall2 - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *FirewallsUpdateCall) RequestId(requestId string) *FirewallsUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *FirewallsUpdateCall) Fields(s ...googleapi.Field) *FirewallsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *FirewallsUpdateCall) Context(ctx context.Context) *FirewallsUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *FirewallsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall2) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewall": c.firewall, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *FirewallsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the specified firewall rule with the data included in the request. Using PUT method, can only update following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags.", - // "httpMethod": "PUT", - // "id": "compute.firewalls.update", - // "parameterOrder": [ - // "project", - // "firewall" - // ], - // "parameters": { - // "firewall": { - // "description": "Name of the firewall rule to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/firewalls/{firewall}", - // "request": { - // "$ref": "Firewall" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.forwardingRules.aggregatedList": - -type ForwardingRulesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of forwarding rules. -// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/aggregatedList -func (r *ForwardingRulesService) AggregatedList(project string) *ForwardingRulesAggregatedListCall { - c := &ForwardingRulesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *ForwardingRulesAggregatedListCall) Filter(filter string) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *ForwardingRulesAggregatedListCall) MaxResults(maxResults int64) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *ForwardingRulesAggregatedListCall) OrderBy(orderBy string) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *ForwardingRulesAggregatedListCall) PageToken(pageToken string) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ForwardingRulesAggregatedListCall) Fields(s ...googleapi.Field) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ForwardingRulesAggregatedListCall) IfNoneMatch(entityTag string) *ForwardingRulesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ForwardingRulesAggregatedListCall) Context(ctx context.Context) *ForwardingRulesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ForwardingRulesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/forwardingRules") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.aggregatedList" call. -// Exactly one of *ForwardingRuleAggregatedList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ForwardingRuleAggregatedList.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ForwardingRulesAggregatedListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ForwardingRuleAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of forwarding rules.", - // "httpMethod": "GET", - // "id": "compute.forwardingRules.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/forwardingRules", - // "response": { - // "$ref": "ForwardingRuleAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ForwardingRulesAggregatedListCall) Pages(ctx context.Context, f func(*ForwardingRuleAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.forwardingRules.delete": - -type ForwardingRulesDeleteCall struct { - s *Service - project string - region string - forwardingRule string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified ForwardingRule resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/delete -func (r *ForwardingRulesService) Delete(project string, region string, forwardingRule string) *ForwardingRulesDeleteCall { - c := &ForwardingRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.forwardingRule = forwardingRule - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *ForwardingRulesDeleteCall) RequestId(requestId string) *ForwardingRulesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ForwardingRulesDeleteCall) Fields(s ...googleapi.Field) *ForwardingRulesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ForwardingRulesDeleteCall) Context(ctx context.Context) *ForwardingRulesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ForwardingRulesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{forwardingRule}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "forwardingRule": c.forwardingRule, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified ForwardingRule resource.", - // "httpMethod": "DELETE", - // "id": "compute.forwardingRules.delete", - // "parameterOrder": [ - // "project", - // "region", - // "forwardingRule" - // ], - // "parameters": { - // "forwardingRule": { - // "description": "Name of the ForwardingRule resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.forwardingRules.get": - -type ForwardingRulesGetCall struct { - s *Service - project string - region string - forwardingRule string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified ForwardingRule resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/get -func (r *ForwardingRulesService) Get(project string, region string, forwardingRule string) *ForwardingRulesGetCall { - c := &ForwardingRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.forwardingRule = forwardingRule - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ForwardingRulesGetCall) Fields(s ...googleapi.Field) *ForwardingRulesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ForwardingRulesGetCall) IfNoneMatch(entityTag string) *ForwardingRulesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ForwardingRulesGetCall) Context(ctx context.Context) *ForwardingRulesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ForwardingRulesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{forwardingRule}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "forwardingRule": c.forwardingRule, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.get" call. -// Exactly one of *ForwardingRule or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *ForwardingRule.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRule, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ForwardingRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified ForwardingRule resource.", - // "httpMethod": "GET", - // "id": "compute.forwardingRules.get", - // "parameterOrder": [ - // "project", - // "region", - // "forwardingRule" - // ], - // "parameters": { - // "forwardingRule": { - // "description": "Name of the ForwardingRule resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}", - // "response": { - // "$ref": "ForwardingRule" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.forwardingRules.insert": - -type ForwardingRulesInsertCall struct { - s *Service - project string - region string - forwardingrule *ForwardingRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a ForwardingRule resource in the specified project -// and region using the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/insert -func (r *ForwardingRulesService) Insert(project string, region string, forwardingrule *ForwardingRule) *ForwardingRulesInsertCall { - c := &ForwardingRulesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.forwardingrule = forwardingrule - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *ForwardingRulesInsertCall) RequestId(requestId string) *ForwardingRulesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ForwardingRulesInsertCall) Fields(s ...googleapi.Field) *ForwardingRulesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ForwardingRulesInsertCall) Context(ctx context.Context) *ForwardingRulesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ForwardingRulesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.forwardingRules.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/forwardingRules", - // "request": { - // "$ref": "ForwardingRule" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.forwardingRules.list": - -type ForwardingRulesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of ForwardingRule resources available to the -// specified project and region. -// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/list -func (r *ForwardingRulesService) List(project string, region string) *ForwardingRulesListCall { - c := &ForwardingRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *ForwardingRulesListCall) Filter(filter string) *ForwardingRulesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *ForwardingRulesListCall) MaxResults(maxResults int64) *ForwardingRulesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *ForwardingRulesListCall) OrderBy(orderBy string) *ForwardingRulesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *ForwardingRulesListCall) PageToken(pageToken string) *ForwardingRulesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ForwardingRulesListCall) Fields(s ...googleapi.Field) *ForwardingRulesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ForwardingRulesListCall) IfNoneMatch(entityTag string) *ForwardingRulesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ForwardingRulesListCall) Context(ctx context.Context) *ForwardingRulesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ForwardingRulesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.list" call. -// Exactly one of *ForwardingRuleList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ForwardingRuleList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ForwardingRuleList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of ForwardingRule resources available to the specified project and region.", - // "httpMethod": "GET", - // "id": "compute.forwardingRules.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/forwardingRules", - // "response": { - // "$ref": "ForwardingRuleList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ForwardingRulesListCall) Pages(ctx context.Context, f func(*ForwardingRuleList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.forwardingRules.setLabels": - -type ForwardingRulesSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on the specified resource. To learn more -// about labels, read the Labeling Resources documentation. -func (r *ForwardingRulesService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *ForwardingRulesSetLabelsCall { - c := &ForwardingRulesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *ForwardingRulesSetLabelsCall) RequestId(requestId string) *ForwardingRulesSetLabelsCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ForwardingRulesSetLabelsCall) Fields(s ...googleapi.Field) *ForwardingRulesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ForwardingRulesSetLabelsCall) Context(ctx context.Context) *ForwardingRulesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ForwardingRulesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetlabelsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{resource}/setLabels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.setLabels" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ForwardingRulesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.", - // "httpMethod": "POST", - // "id": "compute.forwardingRules.setLabels", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/forwardingRules/{resource}/setLabels", - // "request": { - // "$ref": "RegionSetLabelsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.forwardingRules.setTarget": - -type ForwardingRulesSetTargetCall struct { - s *Service - project string - region string - forwardingRule string - targetreference *TargetReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetTarget: Changes target URL for forwarding rule. The new target -// should be of the same type as the old target. -// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/setTarget -func (r *ForwardingRulesService) SetTarget(project string, region string, forwardingRule string, targetreference *TargetReference) *ForwardingRulesSetTargetCall { - c := &ForwardingRulesSetTargetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.forwardingRule = forwardingRule - c.targetreference = targetreference - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *ForwardingRulesSetTargetCall) RequestId(requestId string) *ForwardingRulesSetTargetCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ForwardingRulesSetTargetCall) Fields(s ...googleapi.Field) *ForwardingRulesSetTargetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ForwardingRulesSetTargetCall) Context(ctx context.Context) *ForwardingRulesSetTargetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ForwardingRulesSetTargetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "forwardingRule": c.forwardingRule, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.setTarget" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes target URL for forwarding rule. The new target should be of the same type as the old target.", - // "httpMethod": "POST", - // "id": "compute.forwardingRules.setTarget", - // "parameterOrder": [ - // "project", - // "region", - // "forwardingRule" - // ], - // "parameters": { - // "forwardingRule": { - // "description": "Name of the ForwardingRule resource in which target is to be set.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget", - // "request": { - // "$ref": "TargetReference" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.forwardingRules.testIamPermissions": - -type ForwardingRulesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *ForwardingRulesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *ForwardingRulesTestIamPermissionsCall { - c := &ForwardingRulesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ForwardingRulesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ForwardingRulesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ForwardingRulesTestIamPermissionsCall) Context(ctx context.Context) *ForwardingRulesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ForwardingRulesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ForwardingRulesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.forwardingRules.testIamPermissions", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/forwardingRules/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.globalAddresses.delete": - -type GlobalAddressesDeleteCall struct { - s *Service - project string - address string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified address resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/delete -func (r *GlobalAddressesService) Delete(project string, address string) *GlobalAddressesDeleteCall { - c := &GlobalAddressesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.address = address - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *GlobalAddressesDeleteCall) RequestId(requestId string) *GlobalAddressesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalAddressesDeleteCall) Fields(s ...googleapi.Field) *GlobalAddressesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalAddressesDeleteCall) Context(ctx context.Context) *GlobalAddressesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalAddressesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses/{address}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "address": c.address, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalAddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified address resource.", - // "httpMethod": "DELETE", - // "id": "compute.globalAddresses.delete", - // "parameterOrder": [ - // "project", - // "address" - // ], - // "parameters": { - // "address": { - // "description": "Name of the address resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/addresses/{address}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.globalAddresses.get": - -type GlobalAddressesGetCall struct { - s *Service - project string - address string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified address resource. Get a list of available -// addresses by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/get -func (r *GlobalAddressesService) Get(project string, address string) *GlobalAddressesGetCall { - c := &GlobalAddressesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.address = address - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalAddressesGetCall) Fields(s ...googleapi.Field) *GlobalAddressesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *GlobalAddressesGetCall) IfNoneMatch(entityTag string) *GlobalAddressesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalAddressesGetCall) Context(ctx context.Context) *GlobalAddressesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalAddressesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses/{address}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "address": c.address, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.get" call. -// Exactly one of *Address or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Address.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *GlobalAddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Address{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified address resource. Get a list of available addresses by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.globalAddresses.get", - // "parameterOrder": [ - // "project", - // "address" - // ], - // "parameters": { - // "address": { - // "description": "Name of the address resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/addresses/{address}", - // "response": { - // "$ref": "Address" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.globalAddresses.insert": - -type GlobalAddressesInsertCall struct { - s *Service - project string - address *Address - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an address resource in the specified project using -// the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/insert -func (r *GlobalAddressesService) Insert(project string, address *Address) *GlobalAddressesInsertCall { - c := &GlobalAddressesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.address = address - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *GlobalAddressesInsertCall) RequestId(requestId string) *GlobalAddressesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalAddressesInsertCall) Fields(s ...googleapi.Field) *GlobalAddressesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalAddressesInsertCall) Context(ctx context.Context) *GlobalAddressesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalAddressesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.address) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalAddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates an address resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.globalAddresses.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/addresses", - // "request": { - // "$ref": "Address" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.globalAddresses.list": - -type GlobalAddressesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of global addresses. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/list -func (r *GlobalAddressesService) List(project string) *GlobalAddressesListCall { - c := &GlobalAddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *GlobalAddressesListCall) Filter(filter string) *GlobalAddressesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *GlobalAddressesListCall) MaxResults(maxResults int64) *GlobalAddressesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *GlobalAddressesListCall) OrderBy(orderBy string) *GlobalAddressesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *GlobalAddressesListCall) PageToken(pageToken string) *GlobalAddressesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalAddressesListCall) Fields(s ...googleapi.Field) *GlobalAddressesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *GlobalAddressesListCall) IfNoneMatch(entityTag string) *GlobalAddressesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalAddressesListCall) Context(ctx context.Context) *GlobalAddressesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalAddressesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.list" call. -// Exactly one of *AddressList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *AddressList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalAddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AddressList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of global addresses.", - // "httpMethod": "GET", - // "id": "compute.globalAddresses.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/addresses", - // "response": { - // "$ref": "AddressList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *GlobalAddressesListCall) Pages(ctx context.Context, f func(*AddressList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.globalAddresses.setLabels": - -type GlobalAddressesSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a GlobalAddress. To learn more about -// labels, read the Labeling Resources documentation. -func (r *GlobalAddressesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *GlobalAddressesSetLabelsCall { - c := &GlobalAddressesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalAddressesSetLabelsCall) Fields(s ...googleapi.Field) *GlobalAddressesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalAddressesSetLabelsCall) Context(ctx context.Context) *GlobalAddressesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalAddressesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetlabelsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses/{resource}/setLabels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.setLabels" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalAddressesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the labels on a GlobalAddress. To learn more about labels, read the Labeling Resources documentation.", - // "httpMethod": "POST", - // "id": "compute.globalAddresses.setLabels", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/addresses/{resource}/setLabels", - // "request": { - // "$ref": "GlobalSetLabelsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.globalAddresses.testIamPermissions": - -type GlobalAddressesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *GlobalAddressesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *GlobalAddressesTestIamPermissionsCall { - c := &GlobalAddressesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalAddressesTestIamPermissionsCall) Fields(s ...googleapi.Field) *GlobalAddressesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalAddressesTestIamPermissionsCall) Context(ctx context.Context) *GlobalAddressesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalAddressesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *GlobalAddressesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.globalAddresses.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/addresses/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.globalForwardingRules.delete": - -type GlobalForwardingRulesDeleteCall struct { - s *Service - project string - forwardingRule string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified GlobalForwardingRule resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/delete -func (r *GlobalForwardingRulesService) Delete(project string, forwardingRule string) *GlobalForwardingRulesDeleteCall { - c := &GlobalForwardingRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.forwardingRule = forwardingRule - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *GlobalForwardingRulesDeleteCall) RequestId(requestId string) *GlobalForwardingRulesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalForwardingRulesDeleteCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalForwardingRulesDeleteCall) Context(ctx context.Context) *GlobalForwardingRulesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalForwardingRulesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{forwardingRule}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "forwardingRule": c.forwardingRule, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified GlobalForwardingRule resource.", - // "httpMethod": "DELETE", - // "id": "compute.globalForwardingRules.delete", - // "parameterOrder": [ - // "project", - // "forwardingRule" - // ], - // "parameters": { - // "forwardingRule": { - // "description": "Name of the ForwardingRule resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/forwardingRules/{forwardingRule}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.globalForwardingRules.get": - -type GlobalForwardingRulesGetCall struct { - s *Service - project string - forwardingRule string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified GlobalForwardingRule resource. Get a list -// of available forwarding rules by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/get -func (r *GlobalForwardingRulesService) Get(project string, forwardingRule string) *GlobalForwardingRulesGetCall { - c := &GlobalForwardingRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.forwardingRule = forwardingRule - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalForwardingRulesGetCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *GlobalForwardingRulesGetCall) IfNoneMatch(entityTag string) *GlobalForwardingRulesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalForwardingRulesGetCall) Context(ctx context.Context) *GlobalForwardingRulesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalForwardingRulesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{forwardingRule}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "forwardingRule": c.forwardingRule, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.get" call. -// Exactly one of *ForwardingRule or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *ForwardingRule.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *GlobalForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRule, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ForwardingRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified GlobalForwardingRule resource. Get a list of available forwarding rules by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.globalForwardingRules.get", - // "parameterOrder": [ - // "project", - // "forwardingRule" - // ], - // "parameters": { - // "forwardingRule": { - // "description": "Name of the ForwardingRule resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/forwardingRules/{forwardingRule}", - // "response": { - // "$ref": "ForwardingRule" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.globalForwardingRules.insert": - -type GlobalForwardingRulesInsertCall struct { - s *Service - project string - forwardingrule *ForwardingRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a GlobalForwardingRule resource in the specified -// project using the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/insert -func (r *GlobalForwardingRulesService) Insert(project string, forwardingrule *ForwardingRule) *GlobalForwardingRulesInsertCall { - c := &GlobalForwardingRulesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.forwardingrule = forwardingrule - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *GlobalForwardingRulesInsertCall) RequestId(requestId string) *GlobalForwardingRulesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalForwardingRulesInsertCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalForwardingRulesInsertCall) Context(ctx context.Context) *GlobalForwardingRulesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalForwardingRulesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a GlobalForwardingRule resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.globalForwardingRules.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/forwardingRules", - // "request": { - // "$ref": "ForwardingRule" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.globalForwardingRules.list": - -type GlobalForwardingRulesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of GlobalForwardingRule resources available to -// the specified project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/list -func (r *GlobalForwardingRulesService) List(project string) *GlobalForwardingRulesListCall { - c := &GlobalForwardingRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *GlobalForwardingRulesListCall) Filter(filter string) *GlobalForwardingRulesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *GlobalForwardingRulesListCall) MaxResults(maxResults int64) *GlobalForwardingRulesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *GlobalForwardingRulesListCall) OrderBy(orderBy string) *GlobalForwardingRulesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *GlobalForwardingRulesListCall) PageToken(pageToken string) *GlobalForwardingRulesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalForwardingRulesListCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *GlobalForwardingRulesListCall) IfNoneMatch(entityTag string) *GlobalForwardingRulesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalForwardingRulesListCall) Context(ctx context.Context) *GlobalForwardingRulesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalForwardingRulesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.list" call. -// Exactly one of *ForwardingRuleList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ForwardingRuleList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *GlobalForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ForwardingRuleList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of GlobalForwardingRule resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.globalForwardingRules.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/forwardingRules", - // "response": { - // "$ref": "ForwardingRuleList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *GlobalForwardingRulesListCall) Pages(ctx context.Context, f func(*ForwardingRuleList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.globalForwardingRules.setLabels": - -type GlobalForwardingRulesSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on the specified resource. To learn more -// about labels, read the Labeling Resources documentation. -func (r *GlobalForwardingRulesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *GlobalForwardingRulesSetLabelsCall { - c := &GlobalForwardingRulesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalForwardingRulesSetLabelsCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalForwardingRulesSetLabelsCall) Context(ctx context.Context) *GlobalForwardingRulesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalForwardingRulesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetlabelsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{resource}/setLabels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.setLabels" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalForwardingRulesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.", - // "httpMethod": "POST", - // "id": "compute.globalForwardingRules.setLabels", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/forwardingRules/{resource}/setLabels", - // "request": { - // "$ref": "GlobalSetLabelsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.globalForwardingRules.setTarget": - -type GlobalForwardingRulesSetTargetCall struct { - s *Service - project string - forwardingRule string - targetreference *TargetReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetTarget: Changes target URL for the GlobalForwardingRule resource. -// The new target should be of the same type as the old target. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/setTarget -func (r *GlobalForwardingRulesService) SetTarget(project string, forwardingRule string, targetreference *TargetReference) *GlobalForwardingRulesSetTargetCall { - c := &GlobalForwardingRulesSetTargetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.forwardingRule = forwardingRule - c.targetreference = targetreference - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *GlobalForwardingRulesSetTargetCall) RequestId(requestId string) *GlobalForwardingRulesSetTargetCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalForwardingRulesSetTargetCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesSetTargetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalForwardingRulesSetTargetCall) Context(ctx context.Context) *GlobalForwardingRulesSetTargetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalForwardingRulesSetTargetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{forwardingRule}/setTarget") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "forwardingRule": c.forwardingRule, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.setTarget" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target.", - // "httpMethod": "POST", - // "id": "compute.globalForwardingRules.setTarget", - // "parameterOrder": [ - // "project", - // "forwardingRule" - // ], - // "parameters": { - // "forwardingRule": { - // "description": "Name of the ForwardingRule resource in which target is to be set.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/forwardingRules/{forwardingRule}/setTarget", - // "request": { - // "$ref": "TargetReference" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.globalForwardingRules.testIamPermissions": - -type GlobalForwardingRulesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *GlobalForwardingRulesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *GlobalForwardingRulesTestIamPermissionsCall { - c := &GlobalForwardingRulesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalForwardingRulesTestIamPermissionsCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalForwardingRulesTestIamPermissionsCall) Context(ctx context.Context) *GlobalForwardingRulesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalForwardingRulesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *GlobalForwardingRulesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.globalForwardingRules.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/forwardingRules/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.globalOperations.aggregatedList": - -type GlobalOperationsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of all operations. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/aggregatedList -func (r *GlobalOperationsService) AggregatedList(project string) *GlobalOperationsAggregatedListCall { - c := &GlobalOperationsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *GlobalOperationsAggregatedListCall) Filter(filter string) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *GlobalOperationsAggregatedListCall) MaxResults(maxResults int64) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *GlobalOperationsAggregatedListCall) OrderBy(orderBy string) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *GlobalOperationsAggregatedListCall) PageToken(pageToken string) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalOperationsAggregatedListCall) Fields(s ...googleapi.Field) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *GlobalOperationsAggregatedListCall) IfNoneMatch(entityTag string) *GlobalOperationsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalOperationsAggregatedListCall) Context(ctx context.Context) *GlobalOperationsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalOperationsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalOperationsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/operations") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalOperations.aggregatedList" call. -// Exactly one of *OperationAggregatedList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *OperationAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *GlobalOperationsAggregatedListCall) Do(opts ...googleapi.CallOption) (*OperationAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &OperationAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of all operations.", - // "httpMethod": "GET", - // "id": "compute.globalOperations.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/operations", - // "response": { - // "$ref": "OperationAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *GlobalOperationsAggregatedListCall) Pages(ctx context.Context, f func(*OperationAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.globalOperations.delete": - -type GlobalOperationsDeleteCall struct { - s *Service - project string - operation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Operations resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/delete -func (r *GlobalOperationsService) Delete(project string, operation string) *GlobalOperationsDeleteCall { - c := &GlobalOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.operation = operation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalOperationsDeleteCall) Fields(s ...googleapi.Field) *GlobalOperationsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalOperationsDeleteCall) Context(ctx context.Context) *GlobalOperationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalOperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "operation": c.operation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalOperations.delete" call. -func (c *GlobalOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return err - } - return nil - // { - // "description": "Deletes the specified Operations resource.", - // "httpMethod": "DELETE", - // "id": "compute.globalOperations.delete", - // "parameterOrder": [ - // "project", - // "operation" - // ], - // "parameters": { - // "operation": { - // "description": "Name of the Operations resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/operations/{operation}", - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.globalOperations.get": - -type GlobalOperationsGetCall struct { - s *Service - project string - operation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves the specified Operations resource. Get a list of -// operations by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/get -func (r *GlobalOperationsService) Get(project string, operation string) *GlobalOperationsGetCall { - c := &GlobalOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.operation = operation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalOperationsGetCall) Fields(s ...googleapi.Field) *GlobalOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *GlobalOperationsGetCall) IfNoneMatch(entityTag string) *GlobalOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalOperationsGetCall) Context(ctx context.Context) *GlobalOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "operation": c.operation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalOperations.get" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the specified Operations resource. Get a list of operations by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.globalOperations.get", - // "parameterOrder": [ - // "project", - // "operation" - // ], - // "parameters": { - // "operation": { - // "description": "Name of the Operations resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/operations/{operation}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.globalOperations.list": - -type GlobalOperationsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of Operation resources contained within the -// specified project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/list -func (r *GlobalOperationsService) List(project string) *GlobalOperationsListCall { - c := &GlobalOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *GlobalOperationsListCall) Filter(filter string) *GlobalOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *GlobalOperationsListCall) MaxResults(maxResults int64) *GlobalOperationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *GlobalOperationsListCall) OrderBy(orderBy string) *GlobalOperationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *GlobalOperationsListCall) PageToken(pageToken string) *GlobalOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalOperationsListCall) Fields(s ...googleapi.Field) *GlobalOperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *GlobalOperationsListCall) IfNoneMatch(entityTag string) *GlobalOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalOperationsListCall) Context(ctx context.Context) *GlobalOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalOperations.list" call. -// Exactly one of *OperationList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *OperationList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *GlobalOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &OperationList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of Operation resources contained within the specified project.", - // "httpMethod": "GET", - // "id": "compute.globalOperations.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/operations", - // "response": { - // "$ref": "OperationList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *GlobalOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.healthChecks.delete": - -type HealthChecksDeleteCall struct { - s *Service - project string - healthCheck string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified HealthCheck resource. -func (r *HealthChecksService) Delete(project string, healthCheck string) *HealthChecksDeleteCall { - c := &HealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.healthCheck = healthCheck - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *HealthChecksDeleteCall) RequestId(requestId string) *HealthChecksDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HealthChecksDeleteCall) Fields(s ...googleapi.Field) *HealthChecksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HealthChecksDeleteCall) Context(ctx context.Context) *HealthChecksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HealthChecksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks/{healthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "healthCheck": c.healthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified HealthCheck resource.", - // "httpMethod": "DELETE", - // "id": "compute.healthChecks.delete", - // "parameterOrder": [ - // "project", - // "healthCheck" - // ], - // "parameters": { - // "healthCheck": { - // "description": "Name of the HealthCheck resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/healthChecks/{healthCheck}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.healthChecks.get": - -type HealthChecksGetCall struct { - s *Service - project string - healthCheck string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified HealthCheck resource. Get a list of -// available health checks by making a list() request. -func (r *HealthChecksService) Get(project string, healthCheck string) *HealthChecksGetCall { - c := &HealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.healthCheck = healthCheck - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HealthChecksGetCall) Fields(s ...googleapi.Field) *HealthChecksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *HealthChecksGetCall) IfNoneMatch(entityTag string) *HealthChecksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HealthChecksGetCall) Context(ctx context.Context) *HealthChecksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HealthChecksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks/{healthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "healthCheck": c.healthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.get" call. -// Exactly one of *HealthCheck or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *HealthCheck.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthCheck, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &HealthCheck{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified HealthCheck resource. Get a list of available health checks by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.healthChecks.get", - // "parameterOrder": [ - // "project", - // "healthCheck" - // ], - // "parameters": { - // "healthCheck": { - // "description": "Name of the HealthCheck resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/healthChecks/{healthCheck}", - // "response": { - // "$ref": "HealthCheck" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.healthChecks.insert": - -type HealthChecksInsertCall struct { - s *Service - project string - healthcheck *HealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a HealthCheck resource in the specified project using -// the data included in the request. -func (r *HealthChecksService) Insert(project string, healthcheck *HealthCheck) *HealthChecksInsertCall { - c := &HealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.healthcheck = healthcheck - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *HealthChecksInsertCall) RequestId(requestId string) *HealthChecksInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HealthChecksInsertCall) Fields(s ...googleapi.Field) *HealthChecksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HealthChecksInsertCall) Context(ctx context.Context) *HealthChecksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HealthChecksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.healthcheck) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a HealthCheck resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.healthChecks.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/healthChecks", - // "request": { - // "$ref": "HealthCheck" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.healthChecks.list": - -type HealthChecksListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of HealthCheck resources available to the -// specified project. -func (r *HealthChecksService) List(project string) *HealthChecksListCall { - c := &HealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *HealthChecksListCall) Filter(filter string) *HealthChecksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *HealthChecksListCall) MaxResults(maxResults int64) *HealthChecksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *HealthChecksListCall) OrderBy(orderBy string) *HealthChecksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *HealthChecksListCall) PageToken(pageToken string) *HealthChecksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HealthChecksListCall) Fields(s ...googleapi.Field) *HealthChecksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *HealthChecksListCall) IfNoneMatch(entityTag string) *HealthChecksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HealthChecksListCall) Context(ctx context.Context) *HealthChecksListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HealthChecksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.list" call. -// Exactly one of *HealthCheckList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *HealthCheckList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *HealthChecksListCall) Do(opts ...googleapi.CallOption) (*HealthCheckList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &HealthCheckList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of HealthCheck resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.healthChecks.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/healthChecks", - // "response": { - // "$ref": "HealthCheckList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *HealthChecksListCall) Pages(ctx context.Context, f func(*HealthCheckList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.healthChecks.patch": - -type HealthChecksPatchCall struct { - s *Service - project string - healthCheck string - healthcheck *HealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a HealthCheck resource in the specified project using -// the data included in the request. This method supports PATCH -// semantics and uses the JSON merge patch format and processing rules. -func (r *HealthChecksService) Patch(project string, healthCheck string, healthcheck *HealthCheck) *HealthChecksPatchCall { - c := &HealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.healthCheck = healthCheck - c.healthcheck = healthcheck - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *HealthChecksPatchCall) RequestId(requestId string) *HealthChecksPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HealthChecksPatchCall) Fields(s ...googleapi.Field) *HealthChecksPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HealthChecksPatchCall) Context(ctx context.Context) *HealthChecksPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HealthChecksPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.healthcheck) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks/{healthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "healthCheck": c.healthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.healthChecks.patch", - // "parameterOrder": [ - // "project", - // "healthCheck" - // ], - // "parameters": { - // "healthCheck": { - // "description": "Name of the HealthCheck resource to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/healthChecks/{healthCheck}", - // "request": { - // "$ref": "HealthCheck" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.healthChecks.testIamPermissions": - -type HealthChecksTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *HealthChecksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *HealthChecksTestIamPermissionsCall { - c := &HealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *HealthChecksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HealthChecksTestIamPermissionsCall) Context(ctx context.Context) *HealthChecksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HealthChecksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *HealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.healthChecks.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/healthChecks/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.healthChecks.update": - -type HealthChecksUpdateCall struct { - s *Service - project string - healthCheck string - healthcheck *HealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a HealthCheck resource in the specified project using -// the data included in the request. -func (r *HealthChecksService) Update(project string, healthCheck string, healthcheck *HealthCheck) *HealthChecksUpdateCall { - c := &HealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.healthCheck = healthCheck - c.healthcheck = healthcheck - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *HealthChecksUpdateCall) RequestId(requestId string) *HealthChecksUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HealthChecksUpdateCall) Fields(s ...googleapi.Field) *HealthChecksUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HealthChecksUpdateCall) Context(ctx context.Context) *HealthChecksUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HealthChecksUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.healthcheck) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks/{healthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "healthCheck": c.healthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates a HealthCheck resource in the specified project using the data included in the request.", - // "httpMethod": "PUT", - // "id": "compute.healthChecks.update", - // "parameterOrder": [ - // "project", - // "healthCheck" - // ], - // "parameters": { - // "healthCheck": { - // "description": "Name of the HealthCheck resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/healthChecks/{healthCheck}", - // "request": { - // "$ref": "HealthCheck" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.httpHealthChecks.delete": - -type HttpHealthChecksDeleteCall struct { - s *Service - project string - httpHealthCheck string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified HttpHealthCheck resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/delete -func (r *HttpHealthChecksService) Delete(project string, httpHealthCheck string) *HttpHealthChecksDeleteCall { - c := &HttpHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpHealthCheck = httpHealthCheck - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *HttpHealthChecksDeleteCall) RequestId(requestId string) *HttpHealthChecksDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpHealthChecksDeleteCall) Fields(s ...googleapi.Field) *HttpHealthChecksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpHealthChecksDeleteCall) Context(ctx context.Context) *HttpHealthChecksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpHealthChecksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpHealthCheck": c.httpHealthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HttpHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified HttpHealthCheck resource.", - // "httpMethod": "DELETE", - // "id": "compute.httpHealthChecks.delete", - // "parameterOrder": [ - // "project", - // "httpHealthCheck" - // ], - // "parameters": { - // "httpHealthCheck": { - // "description": "Name of the HttpHealthCheck resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.httpHealthChecks.get": - -type HttpHealthChecksGetCall struct { - s *Service - project string - httpHealthCheck string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified HttpHealthCheck resource. Get a list of -// available HTTP health checks by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/get -func (r *HttpHealthChecksService) Get(project string, httpHealthCheck string) *HttpHealthChecksGetCall { - c := &HttpHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpHealthCheck = httpHealthCheck - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpHealthChecksGetCall) Fields(s ...googleapi.Field) *HttpHealthChecksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *HttpHealthChecksGetCall) IfNoneMatch(entityTag string) *HttpHealthChecksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpHealthChecksGetCall) Context(ctx context.Context) *HttpHealthChecksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpHealthChecksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpHealthCheck": c.httpHealthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.get" call. -// Exactly one of *HttpHealthCheck or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *HttpHealthCheck.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *HttpHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpHealthCheck, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &HttpHealthCheck{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified HttpHealthCheck resource. Get a list of available HTTP health checks by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.httpHealthChecks.get", - // "parameterOrder": [ - // "project", - // "httpHealthCheck" - // ], - // "parameters": { - // "httpHealthCheck": { - // "description": "Name of the HttpHealthCheck resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", - // "response": { - // "$ref": "HttpHealthCheck" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.httpHealthChecks.insert": - -type HttpHealthChecksInsertCall struct { - s *Service - project string - httphealthcheck *HttpHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a HttpHealthCheck resource in the specified project -// using the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/insert -func (r *HttpHealthChecksService) Insert(project string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksInsertCall { - c := &HttpHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httphealthcheck = httphealthcheck - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *HttpHealthChecksInsertCall) RequestId(requestId string) *HttpHealthChecksInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpHealthChecksInsertCall) Fields(s ...googleapi.Field) *HttpHealthChecksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpHealthChecksInsertCall) Context(ctx context.Context) *HttpHealthChecksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpHealthChecksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HttpHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a HttpHealthCheck resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.httpHealthChecks.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/httpHealthChecks", - // "request": { - // "$ref": "HttpHealthCheck" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.httpHealthChecks.list": - -type HttpHealthChecksListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of HttpHealthCheck resources available to -// the specified project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/list -func (r *HttpHealthChecksService) List(project string) *HttpHealthChecksListCall { - c := &HttpHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *HttpHealthChecksListCall) Filter(filter string) *HttpHealthChecksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *HttpHealthChecksListCall) MaxResults(maxResults int64) *HttpHealthChecksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *HttpHealthChecksListCall) OrderBy(orderBy string) *HttpHealthChecksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *HttpHealthChecksListCall) PageToken(pageToken string) *HttpHealthChecksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpHealthChecksListCall) Fields(s ...googleapi.Field) *HttpHealthChecksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *HttpHealthChecksListCall) IfNoneMatch(entityTag string) *HttpHealthChecksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpHealthChecksListCall) Context(ctx context.Context) *HttpHealthChecksListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpHealthChecksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.list" call. -// Exactly one of *HttpHealthCheckList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *HttpHealthCheckList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *HttpHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpHealthCheckList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &HttpHealthCheckList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of HttpHealthCheck resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.httpHealthChecks.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/httpHealthChecks", - // "response": { - // "$ref": "HttpHealthCheckList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *HttpHealthChecksListCall) Pages(ctx context.Context, f func(*HttpHealthCheckList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.httpHealthChecks.patch": - -type HttpHealthChecksPatchCall struct { - s *Service - project string - httpHealthCheck string - httphealthcheck *HttpHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a HttpHealthCheck resource in the specified project -// using the data included in the request. This method supports PATCH -// semantics and uses the JSON merge patch format and processing rules. -// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/patch -func (r *HttpHealthChecksService) Patch(project string, httpHealthCheck string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksPatchCall { - c := &HttpHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpHealthCheck = httpHealthCheck - c.httphealthcheck = httphealthcheck - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *HttpHealthChecksPatchCall) RequestId(requestId string) *HttpHealthChecksPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpHealthChecksPatchCall) Fields(s ...googleapi.Field) *HttpHealthChecksPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpHealthChecksPatchCall) Context(ctx context.Context) *HttpHealthChecksPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpHealthChecksPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpHealthCheck": c.httpHealthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HttpHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.httpHealthChecks.patch", - // "parameterOrder": [ - // "project", - // "httpHealthCheck" - // ], - // "parameters": { - // "httpHealthCheck": { - // "description": "Name of the HttpHealthCheck resource to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", - // "request": { - // "$ref": "HttpHealthCheck" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.httpHealthChecks.testIamPermissions": - -type HttpHealthChecksTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *HttpHealthChecksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *HttpHealthChecksTestIamPermissionsCall { - c := &HttpHealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpHealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *HttpHealthChecksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpHealthChecksTestIamPermissionsCall) Context(ctx context.Context) *HttpHealthChecksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpHealthChecksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *HttpHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.httpHealthChecks.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/httpHealthChecks/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.httpHealthChecks.update": - -type HttpHealthChecksUpdateCall struct { - s *Service - project string - httpHealthCheck string - httphealthcheck *HttpHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a HttpHealthCheck resource in the specified project -// using the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/update -func (r *HttpHealthChecksService) Update(project string, httpHealthCheck string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksUpdateCall { - c := &HttpHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpHealthCheck = httpHealthCheck - c.httphealthcheck = httphealthcheck - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *HttpHealthChecksUpdateCall) RequestId(requestId string) *HttpHealthChecksUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpHealthChecksUpdateCall) Fields(s ...googleapi.Field) *HttpHealthChecksUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpHealthChecksUpdateCall) Context(ctx context.Context) *HttpHealthChecksUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpHealthChecksUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpHealthCheck": c.httpHealthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HttpHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request.", - // "httpMethod": "PUT", - // "id": "compute.httpHealthChecks.update", - // "parameterOrder": [ - // "project", - // "httpHealthCheck" - // ], - // "parameters": { - // "httpHealthCheck": { - // "description": "Name of the HttpHealthCheck resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", - // "request": { - // "$ref": "HttpHealthCheck" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.httpsHealthChecks.delete": - -type HttpsHealthChecksDeleteCall struct { - s *Service - project string - httpsHealthCheck string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified HttpsHealthCheck resource. -func (r *HttpsHealthChecksService) Delete(project string, httpsHealthCheck string) *HttpsHealthChecksDeleteCall { - c := &HttpsHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpsHealthCheck = httpsHealthCheck - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *HttpsHealthChecksDeleteCall) RequestId(requestId string) *HttpsHealthChecksDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpsHealthChecksDeleteCall) Fields(s ...googleapi.Field) *HttpsHealthChecksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpsHealthChecksDeleteCall) Context(ctx context.Context) *HttpsHealthChecksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpsHealthChecksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks/{httpsHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpsHealthCheck": c.httpsHealthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HttpsHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified HttpsHealthCheck resource.", - // "httpMethod": "DELETE", - // "id": "compute.httpsHealthChecks.delete", - // "parameterOrder": [ - // "project", - // "httpsHealthCheck" - // ], - // "parameters": { - // "httpsHealthCheck": { - // "description": "Name of the HttpsHealthCheck resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.httpsHealthChecks.get": - -type HttpsHealthChecksGetCall struct { - s *Service - project string - httpsHealthCheck string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified HttpsHealthCheck resource. Get a list of -// available HTTPS health checks by making a list() request. -func (r *HttpsHealthChecksService) Get(project string, httpsHealthCheck string) *HttpsHealthChecksGetCall { - c := &HttpsHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpsHealthCheck = httpsHealthCheck - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpsHealthChecksGetCall) Fields(s ...googleapi.Field) *HttpsHealthChecksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *HttpsHealthChecksGetCall) IfNoneMatch(entityTag string) *HttpsHealthChecksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpsHealthChecksGetCall) Context(ctx context.Context) *HttpsHealthChecksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpsHealthChecksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks/{httpsHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpsHealthCheck": c.httpsHealthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.get" call. -// Exactly one of *HttpsHealthCheck or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *HttpsHealthCheck.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *HttpsHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpsHealthCheck, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &HttpsHealthCheck{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified HttpsHealthCheck resource. Get a list of available HTTPS health checks by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.httpsHealthChecks.get", - // "parameterOrder": [ - // "project", - // "httpsHealthCheck" - // ], - // "parameters": { - // "httpsHealthCheck": { - // "description": "Name of the HttpsHealthCheck resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}", - // "response": { - // "$ref": "HttpsHealthCheck" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.httpsHealthChecks.insert": - -type HttpsHealthChecksInsertCall struct { - s *Service - project string - httpshealthcheck *HttpsHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a HttpsHealthCheck resource in the specified project -// using the data included in the request. -func (r *HttpsHealthChecksService) Insert(project string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksInsertCall { - c := &HttpsHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpshealthcheck = httpshealthcheck - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *HttpsHealthChecksInsertCall) RequestId(requestId string) *HttpsHealthChecksInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpsHealthChecksInsertCall) Fields(s ...googleapi.Field) *HttpsHealthChecksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpsHealthChecksInsertCall) Context(ctx context.Context) *HttpsHealthChecksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpsHealthChecksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpshealthcheck) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HttpsHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a HttpsHealthCheck resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.httpsHealthChecks.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/httpsHealthChecks", - // "request": { - // "$ref": "HttpsHealthCheck" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.httpsHealthChecks.list": - -type HttpsHealthChecksListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of HttpsHealthCheck resources available to -// the specified project. -func (r *HttpsHealthChecksService) List(project string) *HttpsHealthChecksListCall { - c := &HttpsHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *HttpsHealthChecksListCall) Filter(filter string) *HttpsHealthChecksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *HttpsHealthChecksListCall) MaxResults(maxResults int64) *HttpsHealthChecksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *HttpsHealthChecksListCall) OrderBy(orderBy string) *HttpsHealthChecksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *HttpsHealthChecksListCall) PageToken(pageToken string) *HttpsHealthChecksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpsHealthChecksListCall) Fields(s ...googleapi.Field) *HttpsHealthChecksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *HttpsHealthChecksListCall) IfNoneMatch(entityTag string) *HttpsHealthChecksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpsHealthChecksListCall) Context(ctx context.Context) *HttpsHealthChecksListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpsHealthChecksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.list" call. -// Exactly one of *HttpsHealthCheckList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *HttpsHealthCheckList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *HttpsHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpsHealthCheckList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &HttpsHealthCheckList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of HttpsHealthCheck resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.httpsHealthChecks.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/httpsHealthChecks", - // "response": { - // "$ref": "HttpsHealthCheckList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *HttpsHealthChecksListCall) Pages(ctx context.Context, f func(*HttpsHealthCheckList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.httpsHealthChecks.patch": - -type HttpsHealthChecksPatchCall struct { - s *Service - project string - httpsHealthCheck string - httpshealthcheck *HttpsHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a HttpsHealthCheck resource in the specified project -// using the data included in the request. This method supports PATCH -// semantics and uses the JSON merge patch format and processing rules. -func (r *HttpsHealthChecksService) Patch(project string, httpsHealthCheck string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksPatchCall { - c := &HttpsHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpsHealthCheck = httpsHealthCheck - c.httpshealthcheck = httpshealthcheck - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *HttpsHealthChecksPatchCall) RequestId(requestId string) *HttpsHealthChecksPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpsHealthChecksPatchCall) Fields(s ...googleapi.Field) *HttpsHealthChecksPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpsHealthChecksPatchCall) Context(ctx context.Context) *HttpsHealthChecksPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpsHealthChecksPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpshealthcheck) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks/{httpsHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpsHealthCheck": c.httpsHealthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HttpsHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.httpsHealthChecks.patch", - // "parameterOrder": [ - // "project", - // "httpsHealthCheck" - // ], - // "parameters": { - // "httpsHealthCheck": { - // "description": "Name of the HttpsHealthCheck resource to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}", - // "request": { - // "$ref": "HttpsHealthCheck" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.httpsHealthChecks.testIamPermissions": - -type HttpsHealthChecksTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *HttpsHealthChecksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *HttpsHealthChecksTestIamPermissionsCall { - c := &HttpsHealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpsHealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *HttpsHealthChecksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpsHealthChecksTestIamPermissionsCall) Context(ctx context.Context) *HttpsHealthChecksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpsHealthChecksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *HttpsHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.httpsHealthChecks.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/httpsHealthChecks/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.httpsHealthChecks.update": - -type HttpsHealthChecksUpdateCall struct { - s *Service - project string - httpsHealthCheck string - httpshealthcheck *HttpsHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a HttpsHealthCheck resource in the specified project -// using the data included in the request. -func (r *HttpsHealthChecksService) Update(project string, httpsHealthCheck string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksUpdateCall { - c := &HttpsHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpsHealthCheck = httpsHealthCheck - c.httpshealthcheck = httpshealthcheck - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *HttpsHealthChecksUpdateCall) RequestId(requestId string) *HttpsHealthChecksUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpsHealthChecksUpdateCall) Fields(s ...googleapi.Field) *HttpsHealthChecksUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpsHealthChecksUpdateCall) Context(ctx context.Context) *HttpsHealthChecksUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpsHealthChecksUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpshealthcheck) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks/{httpsHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpsHealthCheck": c.httpsHealthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HttpsHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request.", - // "httpMethod": "PUT", - // "id": "compute.httpsHealthChecks.update", - // "parameterOrder": [ - // "project", - // "httpsHealthCheck" - // ], - // "parameters": { - // "httpsHealthCheck": { - // "description": "Name of the HttpsHealthCheck resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}", - // "request": { - // "$ref": "HttpsHealthCheck" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.images.delete": - -type ImagesDeleteCall struct { - s *Service - project string - image string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified image. -// For details, see https://cloud.google.com/compute/docs/reference/latest/images/delete -func (r *ImagesService) Delete(project string, image string) *ImagesDeleteCall { - c := &ImagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.image = image - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *ImagesDeleteCall) RequestId(requestId string) *ImagesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ImagesDeleteCall) Fields(s ...googleapi.Field) *ImagesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ImagesDeleteCall) Context(ctx context.Context) *ImagesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ImagesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{image}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "image": c.image, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ImagesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified image.", - // "httpMethod": "DELETE", - // "id": "compute.images.delete", - // "parameterOrder": [ - // "project", - // "image" - // ], - // "parameters": { - // "image": { - // "description": "Name of the image resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/images/{image}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.images.deprecate": - -type ImagesDeprecateCall struct { - s *Service - project string - image string - deprecationstatus *DeprecationStatus - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Deprecate: Sets the deprecation status of an image. -// -// If an empty request body is given, clears the deprecation status -// instead. -// For details, see https://cloud.google.com/compute/docs/reference/latest/images/deprecate -func (r *ImagesService) Deprecate(project string, image string, deprecationstatus *DeprecationStatus) *ImagesDeprecateCall { - c := &ImagesDeprecateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.image = image - c.deprecationstatus = deprecationstatus - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and then the request times out. If you make the request again with -// the same request ID, the server can check if original operation with -// the same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -func (c *ImagesDeprecateCall) RequestId(requestId string) *ImagesDeprecateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ImagesDeprecateCall) Fields(s ...googleapi.Field) *ImagesDeprecateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ImagesDeprecateCall) Context(ctx context.Context) *ImagesDeprecateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ImagesDeprecateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesDeprecateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.deprecationstatus) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{image}/deprecate") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "image": c.image, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.deprecate" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ImagesDeprecateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the deprecation status of an image.\n\nIf an empty request body is given, clears the deprecation status instead.", - // "httpMethod": "POST", - // "id": "compute.images.deprecate", - // "parameterOrder": [ - // "project", - // "image" - // ], - // "parameters": { - // "image": { - // "description": "Image name.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and then the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/images/{image}/deprecate", - // "request": { - // "$ref": "DeprecationStatus" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.images.get": - -type ImagesGetCall struct { - s *Service - project string - image string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified image. Get a list of available images by -// making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/images/get -func (r *ImagesService) Get(project string, image string) *ImagesGetCall { - c := &ImagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.image = image - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ImagesGetCall) Fields(s ...googleapi.Field) *ImagesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ImagesGetCall) IfNoneMatch(entityTag string) *ImagesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ImagesGetCall) Context(ctx context.Context) *ImagesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ImagesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{image}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "image": c.image, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.get" call. -// Exactly one of *Image or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Image.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ImagesGetCall) Do(opts ...googleapi.CallOption) (*Image, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Image{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified image. Get a list of available images by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.images.get", - // "parameterOrder": [ - // "project", - // "image" - // ], - // "parameters": { - // "image": { - // "description": "Name of the image resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/images/{image}", - // "response": { - // "$ref": "Image" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.images.getFromFamily": - -type ImagesGetFromFamilyCall struct { - s *Service - project string - family string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetFromFamily: Returns the latest image that is part of an image -// family and is not deprecated. -func (r *ImagesService) GetFromFamily(project string, family string) *ImagesGetFromFamilyCall { - c := &ImagesGetFromFamilyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.family = family - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ImagesGetFromFamilyCall) Fields(s ...googleapi.Field) *ImagesGetFromFamilyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ImagesGetFromFamilyCall) IfNoneMatch(entityTag string) *ImagesGetFromFamilyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ImagesGetFromFamilyCall) Context(ctx context.Context) *ImagesGetFromFamilyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ImagesGetFromFamilyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesGetFromFamilyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/family/{family}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "family": c.family, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.getFromFamily" call. -// Exactly one of *Image or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Image.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ImagesGetFromFamilyCall) Do(opts ...googleapi.CallOption) (*Image, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Image{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the latest image that is part of an image family and is not deprecated.", - // "httpMethod": "GET", - // "id": "compute.images.getFromFamily", - // "parameterOrder": [ - // "project", - // "family" - // ], - // "parameters": { - // "family": { - // "description": "Name of the image family to search for.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/images/family/{family}", - // "response": { - // "$ref": "Image" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.images.insert": - -type ImagesInsertCall struct { - s *Service - project string - image *Image - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an image in the specified project using the data -// included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/images/insert -func (r *ImagesService) Insert(project string, image *Image) *ImagesInsertCall { - c := &ImagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.image = image - return c -} - -// ForceCreate sets the optional parameter "forceCreate": Force image -// creation if true. -func (c *ImagesInsertCall) ForceCreate(forceCreate bool) *ImagesInsertCall { - c.urlParams_.Set("forceCreate", fmt.Sprint(forceCreate)) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *ImagesInsertCall) RequestId(requestId string) *ImagesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ImagesInsertCall) Fields(s ...googleapi.Field) *ImagesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ImagesInsertCall) Context(ctx context.Context) *ImagesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ImagesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.image) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ImagesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates an image in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.images.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "forceCreate": { - // "description": "Force image creation if true.", - // "location": "query", - // "type": "boolean" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/images", - // "request": { - // "$ref": "Image" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "compute.images.list": - -type ImagesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of private images available to the specified -// project. Private images are images you create that belong to your -// project. This method does not get any images that belong to other -// projects, including publicly-available images, like Debian 8. If you -// want to get a list of publicly-available images, use this method to -// make a request to the respective image project, such as debian-cloud -// or windows-cloud. -// For details, see https://cloud.google.com/compute/docs/reference/latest/images/list -func (r *ImagesService) List(project string) *ImagesListCall { - c := &ImagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *ImagesListCall) Filter(filter string) *ImagesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *ImagesListCall) MaxResults(maxResults int64) *ImagesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *ImagesListCall) OrderBy(orderBy string) *ImagesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *ImagesListCall) PageToken(pageToken string) *ImagesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ImagesListCall) Fields(s ...googleapi.Field) *ImagesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ImagesListCall) IfNoneMatch(entityTag string) *ImagesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ImagesListCall) Context(ctx context.Context) *ImagesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ImagesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.list" call. -// Exactly one of *ImageList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *ImageList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ImagesListCall) Do(opts ...googleapi.CallOption) (*ImageList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ImageList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of private images available to the specified project. Private images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.", - // "httpMethod": "GET", - // "id": "compute.images.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/images", - // "response": { - // "$ref": "ImageList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ImagesListCall) Pages(ctx context.Context, f func(*ImageList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.images.setLabels": - -type ImagesSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on an image. To learn more about labels, -// read the Labeling Resources documentation. -func (r *ImagesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *ImagesSetLabelsCall { - c := &ImagesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ImagesSetLabelsCall) Fields(s ...googleapi.Field) *ImagesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ImagesSetLabelsCall) Context(ctx context.Context) *ImagesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ImagesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetlabelsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{resource}/setLabels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.setLabels" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ImagesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.", - // "httpMethod": "POST", - // "id": "compute.images.setLabels", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/images/{resource}/setLabels", - // "request": { - // "$ref": "GlobalSetLabelsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.images.testIamPermissions": - -type ImagesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *ImagesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *ImagesTestIamPermissionsCall { - c := &ImagesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ImagesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ImagesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ImagesTestIamPermissionsCall) Context(ctx context.Context) *ImagesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ImagesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ImagesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.images.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/images/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.abandonInstances": - -type InstanceGroupManagersAbandonInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersabandoninstancesrequest *InstanceGroupManagersAbandonInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AbandonInstances: Schedules a group action to remove the specified -// instances from the managed instance group. Abandoning an instance -// does not delete the instance, but it does remove the instance from -// any target pools that are applied by the managed instance group. This -// method reduces the targetSize of the managed instance group by the -// number of instances that you abandon. This operation is marked as -// DONE when the action is scheduled even if the instances have not yet -// been removed from the group. You must separately verify the status of -// the abandoning action with the listmanagedinstances method. -// -// If the group is part of a backend service that has enabled connection -// draining, it can take up to 60 seconds after the connection draining -// duration has elapsed before the VM instance is removed or -// deleted. -// -// You can specify a maximum of 1000 instances with this method per -// request. -func (r *InstanceGroupManagersService) AbandonInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersabandoninstancesrequest *InstanceGroupManagersAbandonInstancesRequest) *InstanceGroupManagersAbandonInstancesCall { - c := &InstanceGroupManagersAbandonInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersabandoninstancesrequest = instancegroupmanagersabandoninstancesrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersAbandonInstancesCall) RequestId(requestId string) *InstanceGroupManagersAbandonInstancesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersAbandonInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersAbandonInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersAbandonInstancesCall) Context(ctx context.Context) *InstanceGroupManagersAbandonInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersAbandonInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersabandoninstancesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.abandonInstances" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersAbandonInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.abandonInstances", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", - // "request": { - // "$ref": "InstanceGroupManagersAbandonInstancesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.aggregatedList": - -type InstanceGroupManagersAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of managed instance groups and -// groups them by zone. -func (r *InstanceGroupManagersService) AggregatedList(project string) *InstanceGroupManagersAggregatedListCall { - c := &InstanceGroupManagersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *InstanceGroupManagersAggregatedListCall) Filter(filter string) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *InstanceGroupManagersAggregatedListCall) MaxResults(maxResults int64) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *InstanceGroupManagersAggregatedListCall) OrderBy(orderBy string) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *InstanceGroupManagersAggregatedListCall) PageToken(pageToken string) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersAggregatedListCall) Fields(s ...googleapi.Field) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstanceGroupManagersAggregatedListCall) IfNoneMatch(entityTag string) *InstanceGroupManagersAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersAggregatedListCall) Context(ctx context.Context) *InstanceGroupManagersAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/instanceGroupManagers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.aggregatedList" call. -// Exactly one of *InstanceGroupManagerAggregatedList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *InstanceGroupManagerAggregatedList.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *InstanceGroupManagersAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagerAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceGroupManagerAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of managed instance groups and groups them by zone.", - // "httpMethod": "GET", - // "id": "compute.instanceGroupManagers.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/instanceGroupManagers", - // "response": { - // "$ref": "InstanceGroupManagerAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstanceGroupManagersAggregatedListCall) Pages(ctx context.Context, f func(*InstanceGroupManagerAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.instanceGroupManagers.delete": - -type InstanceGroupManagersDeleteCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified managed instance group and all of the -// instances in that group. Note that the instance group must not belong -// to a backend service. Read Deleting an instance group for more -// information. -func (r *InstanceGroupManagersService) Delete(project string, zone string, instanceGroupManager string) *InstanceGroupManagersDeleteCall { - c := &InstanceGroupManagersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersDeleteCall) RequestId(requestId string) *InstanceGroupManagersDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersDeleteCall) Fields(s ...googleapi.Field) *InstanceGroupManagersDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersDeleteCall) Context(ctx context.Context) *InstanceGroupManagersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.", - // "httpMethod": "DELETE", - // "id": "compute.instanceGroupManagers.delete", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group to delete.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.deleteInstances": - -type InstanceGroupManagersDeleteInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersdeleteinstancesrequest *InstanceGroupManagersDeleteInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteInstances: Schedules a group action to delete the specified -// instances in the managed instance group. The instances are also -// removed from any target pools of which they were a member. This -// method reduces the targetSize of the managed instance group by the -// number of instances that you delete. This operation is marked as DONE -// when the action is scheduled even if the instances are still being -// deleted. You must separately verify the status of the deleting action -// with the listmanagedinstances method. -// -// If the group is part of a backend service that has enabled connection -// draining, it can take up to 60 seconds after the connection draining -// duration has elapsed before the VM instance is removed or -// deleted. -// -// You can specify a maximum of 1000 instances with this method per -// request. -func (r *InstanceGroupManagersService) DeleteInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersdeleteinstancesrequest *InstanceGroupManagersDeleteInstancesRequest) *InstanceGroupManagersDeleteInstancesCall { - c := &InstanceGroupManagersDeleteInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersdeleteinstancesrequest = instancegroupmanagersdeleteinstancesrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersDeleteInstancesCall) RequestId(requestId string) *InstanceGroupManagersDeleteInstancesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersDeleteInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersDeleteInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersDeleteInstancesCall) Context(ctx context.Context) *InstanceGroupManagersDeleteInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersDeleteInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersdeleteinstancesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.deleteInstances" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersDeleteInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.deleteInstances", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", - // "request": { - // "$ref": "InstanceGroupManagersDeleteInstancesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.get": - -type InstanceGroupManagersGetCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns all of the details about the specified managed instance -// group. Get a list of available managed instance groups by making a -// list() request. -func (r *InstanceGroupManagersService) Get(project string, zone string, instanceGroupManager string) *InstanceGroupManagersGetCall { - c := &InstanceGroupManagersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersGetCall) Fields(s ...googleapi.Field) *InstanceGroupManagersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstanceGroupManagersGetCall) IfNoneMatch(entityTag string) *InstanceGroupManagersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersGetCall) Context(ctx context.Context) *InstanceGroupManagersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.get" call. -// Exactly one of *InstanceGroupManager or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstanceGroupManager.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceGroupManagersGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManager, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceGroupManager{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns all of the details about the specified managed instance group. Get a list of available managed instance groups by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.instanceGroupManagers.get", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - // "response": { - // "$ref": "InstanceGroupManager" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.insert": - -type InstanceGroupManagersInsertCall struct { - s *Service - project string - zone string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a managed instance group using the information that -// you specify in the request. After the group is created, it schedules -// an action to create instances in the group using the specified -// instance template. This operation is marked as DONE when the group is -// created even if the instances in the group have not yet been created. -// You must separately verify the status of the individual instances -// with the listmanagedinstances method. -// -// A managed instance group can have up to 1000 VM instances per group. -// Please contact Cloud Support if you need an increase in this limit. -func (r *InstanceGroupManagersService) Insert(project string, zone string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersInsertCall { - c := &InstanceGroupManagersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instancegroupmanager = instancegroupmanager - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersInsertCall) RequestId(requestId string) *InstanceGroupManagersInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersInsertCall) Fields(s ...googleapi.Field) *InstanceGroupManagersInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersInsertCall) Context(ctx context.Context) *InstanceGroupManagersInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.insert", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where you want to create the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers", - // "request": { - // "$ref": "InstanceGroupManager" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.list": - -type InstanceGroupManagersListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of managed instance groups that are contained -// within the specified project and zone. -func (r *InstanceGroupManagersService) List(project string, zone string) *InstanceGroupManagersListCall { - c := &InstanceGroupManagersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *InstanceGroupManagersListCall) Filter(filter string) *InstanceGroupManagersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *InstanceGroupManagersListCall) MaxResults(maxResults int64) *InstanceGroupManagersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *InstanceGroupManagersListCall) OrderBy(orderBy string) *InstanceGroupManagersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *InstanceGroupManagersListCall) PageToken(pageToken string) *InstanceGroupManagersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersListCall) Fields(s ...googleapi.Field) *InstanceGroupManagersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstanceGroupManagersListCall) IfNoneMatch(entityTag string) *InstanceGroupManagersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersListCall) Context(ctx context.Context) *InstanceGroupManagersListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.list" call. -// Exactly one of *InstanceGroupManagerList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupManagerList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceGroupManagersListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagerList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceGroupManagerList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of managed instance groups that are contained within the specified project and zone.", - // "httpMethod": "GET", - // "id": "compute.instanceGroupManagers.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers", - // "response": { - // "$ref": "InstanceGroupManagerList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstanceGroupManagersListCall) Pages(ctx context.Context, f func(*InstanceGroupManagerList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.instanceGroupManagers.listManagedInstances": - -type InstanceGroupManagersListManagedInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListManagedInstances: Lists all of the instances in the managed -// instance group. Each instance in the list has a currentAction, which -// indicates the action that the managed instance group is performing on -// the instance. For example, if the group is still creating an -// instance, the currentAction is CREATING. If a previous action failed, -// the list displays the errors for that failed action. -func (r *InstanceGroupManagersService) ListManagedInstances(project string, zone string, instanceGroupManager string) *InstanceGroupManagersListManagedInstancesCall { - c := &InstanceGroupManagersListManagedInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - return c -} - -// Filter sets the optional parameter "filter": -func (c *InstanceGroupManagersListManagedInstancesCall) Filter(filter string) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": -func (c *InstanceGroupManagersListManagedInstancesCall) MaxResults(maxResults int64) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "order_by": -func (c *InstanceGroupManagersListManagedInstancesCall) OrderBy(orderBy string) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("order_by", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": -func (c *InstanceGroupManagersListManagedInstancesCall) PageToken(pageToken string) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersListManagedInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersListManagedInstancesCall) Context(ctx context.Context) *InstanceGroupManagersListManagedInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersListManagedInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.listManagedInstances" call. -// Exactly one of *InstanceGroupManagersListManagedInstancesResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *InstanceGroupManagersListManagedInstancesResponse.ServerResponse.Head -// er or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *InstanceGroupManagersListManagedInstancesCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagersListManagedInstancesResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceGroupManagersListManagedInstancesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.listManagedInstances", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "filter": { - // "location": "query", - // "type": "string" - // }, - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "order_by": { - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", - // "response": { - // "$ref": "InstanceGroupManagersListManagedInstancesResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstanceGroupManagersListManagedInstancesCall) Pages(ctx context.Context, f func(*InstanceGroupManagersListManagedInstancesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.instanceGroupManagers.patch": - -type InstanceGroupManagersPatchCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a managed instance group using the information that -// you specify in the request. This operation is marked as DONE when the -// group is patched even if the instances in the group are still in the -// process of being patched. You must separately verify the status of -// the individual instances with the listManagedInstances method. This -// method supports PATCH semantics and uses the JSON merge patch format -// and processing rules. -func (r *InstanceGroupManagersService) Patch(project string, zone string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersPatchCall { - c := &InstanceGroupManagersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanager = instancegroupmanager - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersPatchCall) RequestId(requestId string) *InstanceGroupManagersPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersPatchCall) Fields(s ...googleapi.Field) *InstanceGroupManagersPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersPatchCall) Context(ctx context.Context) *InstanceGroupManagersPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.instanceGroupManagers.patch", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the instance group manager.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where you want to create the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - // "request": { - // "$ref": "InstanceGroupManager" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.recreateInstances": - -type InstanceGroupManagersRecreateInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersrecreateinstancesrequest *InstanceGroupManagersRecreateInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RecreateInstances: Schedules a group action to recreate the specified -// instances in the managed instance group. The instances are deleted -// and recreated using the current instance template for the managed -// instance group. This operation is marked as DONE when the action is -// scheduled even if the instances have not yet been recreated. You must -// separately verify the status of the recreating action with the -// listmanagedinstances method. -// -// If the group is part of a backend service that has enabled connection -// draining, it can take up to 60 seconds after the connection draining -// duration has elapsed before the VM instance is removed or -// deleted. -// -// You can specify a maximum of 1000 instances with this method per -// request. -func (r *InstanceGroupManagersService) RecreateInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersrecreateinstancesrequest *InstanceGroupManagersRecreateInstancesRequest) *InstanceGroupManagersRecreateInstancesCall { - c := &InstanceGroupManagersRecreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersrecreateinstancesrequest = instancegroupmanagersrecreateinstancesrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersRecreateInstancesCall) RequestId(requestId string) *InstanceGroupManagersRecreateInstancesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersRecreateInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersRecreateInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersRecreateInstancesCall) Context(ctx context.Context) *InstanceGroupManagersRecreateInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersRecreateInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersrecreateinstancesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.recreateInstances" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.recreateInstances", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", - // "request": { - // "$ref": "InstanceGroupManagersRecreateInstancesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.resize": - -type InstanceGroupManagersResizeCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Resize: Resizes the managed instance group. If you increase the size, -// the group creates new instances using the current instance template. -// If you decrease the size, the group deletes instances. The resize -// operation is marked DONE when the resize actions are scheduled even -// if the group has not yet added or deleted any instances. You must -// separately verify the status of the creating or deleting actions with -// the listmanagedinstances method. -// -// If the group is part of a backend service that has enabled connection -// draining, it can take up to 60 seconds after the connection draining -// duration has elapsed before the VM instance is removed or deleted. -func (r *InstanceGroupManagersService) Resize(project string, zone string, instanceGroupManager string, size int64) *InstanceGroupManagersResizeCall { - c := &InstanceGroupManagersResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.urlParams_.Set("size", fmt.Sprint(size)) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersResizeCall) RequestId(requestId string) *InstanceGroupManagersResizeCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersResizeCall) Fields(s ...googleapi.Field) *InstanceGroupManagersResizeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersResizeCall) Context(ctx context.Context) *InstanceGroupManagersResizeCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersResizeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.resize" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.resize", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager", - // "size" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "size": { - // "description": "The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter.", - // "format": "int32", - // "location": "query", - // "required": true, - // "type": "integer" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.resizeAdvanced": - -type InstanceGroupManagersResizeAdvancedCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersresizeadvancedrequest *InstanceGroupManagersResizeAdvancedRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ResizeAdvanced: Resizes the managed instance group with advanced -// configuration options like disabling creation retries. This is an -// extended version of the resize method. -// -// If you increase the size of the instance group, the group creates new -// instances using the current instance template. If you decrease the -// size, the group deletes instances. The resize operation is marked -// DONE when the resize actions are scheduled even if the group has not -// yet added or deleted any instances. You must separately verify the -// status of the creating, creatingWithoutRetries, or deleting actions -// with the get or listmanagedinstances method. -// -// If the group is part of a backend service that has enabled connection -// draining, it can take up to 60 seconds after the connection draining -// duration has elapsed before the VM instance is removed or deleted. -func (r *InstanceGroupManagersService) ResizeAdvanced(project string, zone string, instanceGroupManager string, instancegroupmanagersresizeadvancedrequest *InstanceGroupManagersResizeAdvancedRequest) *InstanceGroupManagersResizeAdvancedCall { - c := &InstanceGroupManagersResizeAdvancedCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersresizeadvancedrequest = instancegroupmanagersresizeadvancedrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersResizeAdvancedCall) RequestId(requestId string) *InstanceGroupManagersResizeAdvancedCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersResizeAdvancedCall) Fields(s ...googleapi.Field) *InstanceGroupManagersResizeAdvancedCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersResizeAdvancedCall) Context(ctx context.Context) *InstanceGroupManagersResizeAdvancedCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersResizeAdvancedCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersResizeAdvancedCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersresizeadvancedrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.resizeAdvanced" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersResizeAdvancedCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method.\n\nIf you increase the size of the instance group, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating, creatingWithoutRetries, or deleting actions with the get or listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.resizeAdvanced", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced", - // "request": { - // "$ref": "InstanceGroupManagersResizeAdvancedRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.setAutoHealingPolicies": - -type InstanceGroupManagersSetAutoHealingPoliciesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagerssetautohealingrequest *InstanceGroupManagersSetAutoHealingRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetAutoHealingPolicies: Modifies the autohealing policies. -func (r *InstanceGroupManagersService) SetAutoHealingPolicies(project string, zone string, instanceGroupManager string, instancegroupmanagerssetautohealingrequest *InstanceGroupManagersSetAutoHealingRequest) *InstanceGroupManagersSetAutoHealingPoliciesCall { - c := &InstanceGroupManagersSetAutoHealingPoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagerssetautohealingrequest = instancegroupmanagerssetautohealingrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) RequestId(requestId string) *InstanceGroupManagersSetAutoHealingPoliciesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSetAutoHealingPoliciesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Context(ctx context.Context) *InstanceGroupManagersSetAutoHealingPoliciesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerssetautohealingrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.setAutoHealingPolicies" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Modifies the autohealing policies.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.setAutoHealingPolicies", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the instance group manager.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies", - // "request": { - // "$ref": "InstanceGroupManagersSetAutoHealingRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.setInstanceTemplate": - -type InstanceGroupManagersSetInstanceTemplateCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagerssetinstancetemplaterequest *InstanceGroupManagersSetInstanceTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetInstanceTemplate: Specifies the instance template to use when -// creating new instances in this group. The templates for existing -// instances in the group do not change unless you recreate them. -func (r *InstanceGroupManagersService) SetInstanceTemplate(project string, zone string, instanceGroupManager string, instancegroupmanagerssetinstancetemplaterequest *InstanceGroupManagersSetInstanceTemplateRequest) *InstanceGroupManagersSetInstanceTemplateCall { - c := &InstanceGroupManagersSetInstanceTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagerssetinstancetemplaterequest = instancegroupmanagerssetinstancetemplaterequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersSetInstanceTemplateCall) RequestId(requestId string) *InstanceGroupManagersSetInstanceTemplateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersSetInstanceTemplateCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSetInstanceTemplateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersSetInstanceTemplateCall) Context(ctx context.Context) *InstanceGroupManagersSetInstanceTemplateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersSetInstanceTemplateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerssetinstancetemplaterequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.setInstanceTemplate" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.setInstanceTemplate", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", - // "request": { - // "$ref": "InstanceGroupManagersSetInstanceTemplateRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.setTargetPools": - -type InstanceGroupManagersSetTargetPoolsCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagerssettargetpoolsrequest *InstanceGroupManagersSetTargetPoolsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetTargetPools: Modifies the target pools to which all instances in -// this managed instance group are assigned. The target pools -// automatically apply to all of the instances in the managed instance -// group. This operation is marked DONE when you make the request even -// if the instances have not yet been added to their target pools. The -// change might take some time to apply to all of the instances in the -// group depending on the size of the group. -func (r *InstanceGroupManagersService) SetTargetPools(project string, zone string, instanceGroupManager string, instancegroupmanagerssettargetpoolsrequest *InstanceGroupManagersSetTargetPoolsRequest) *InstanceGroupManagersSetTargetPoolsCall { - c := &InstanceGroupManagersSetTargetPoolsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagerssettargetpoolsrequest = instancegroupmanagerssettargetpoolsrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersSetTargetPoolsCall) RequestId(requestId string) *InstanceGroupManagersSetTargetPoolsCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersSetTargetPoolsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSetTargetPoolsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersSetTargetPoolsCall) Context(ctx context.Context) *InstanceGroupManagersSetTargetPoolsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersSetTargetPoolsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerssettargetpoolsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.setTargetPools" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.setTargetPools", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", - // "request": { - // "$ref": "InstanceGroupManagersSetTargetPoolsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.testIamPermissions": - -type InstanceGroupManagersTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *InstanceGroupManagersService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceGroupManagersTestIamPermissionsCall { - c := &InstanceGroupManagersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersTestIamPermissionsCall) Context(ctx context.Context) *InstanceGroupManagersTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceGroupManagersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.testIamPermissions", - // "parameterOrder": [ - // "project", - // "zone", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.update": - -type InstanceGroupManagersUpdateCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a managed instance group using the information that -// you specify in the request. This operation is marked as DONE when the -// group is updated even if the instances in the group have not yet been -// updated. You must separately verify the status of the individual -// instances with the listManagedInstances method. -func (r *InstanceGroupManagersService) Update(project string, zone string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersUpdateCall { - c := &InstanceGroupManagersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanager = instancegroupmanager - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersUpdateCall) RequestId(requestId string) *InstanceGroupManagersUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersUpdateCall) Fields(s ...googleapi.Field) *InstanceGroupManagersUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersUpdateCall) Context(ctx context.Context) *InstanceGroupManagersUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listManagedInstances method.", - // "httpMethod": "PUT", - // "id": "compute.instanceGroupManagers.update", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the instance group manager.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where you want to create the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - // "request": { - // "$ref": "InstanceGroupManager" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroups.addInstances": - -type InstanceGroupsAddInstancesCall struct { - s *Service - project string - zone string - instanceGroup string - instancegroupsaddinstancesrequest *InstanceGroupsAddInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddInstances: Adds a list of instances to the specified instance -// group. All of the instances in the instance group must be in the same -// network/subnetwork. Read Adding instances for more information. -func (r *InstanceGroupsService) AddInstances(project string, zone string, instanceGroup string, instancegroupsaddinstancesrequest *InstanceGroupsAddInstancesRequest) *InstanceGroupsAddInstancesCall { - c := &InstanceGroupsAddInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - c.instancegroupsaddinstancesrequest = instancegroupsaddinstancesrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupsAddInstancesCall) RequestId(requestId string) *InstanceGroupsAddInstancesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupsAddInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsAddInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupsAddInstancesCall) Context(ctx context.Context) *InstanceGroupsAddInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupsAddInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsAddInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupsaddinstancesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.addInstances" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupsAddInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.", - // "httpMethod": "POST", - // "id": "compute.instanceGroups.addInstances", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroup" - // ], - // "parameters": { - // "instanceGroup": { - // "description": "The name of the instance group where you are adding instances.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances", - // "request": { - // "$ref": "InstanceGroupsAddInstancesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroups.aggregatedList": - -type InstanceGroupsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of instance groups and sorts them -// by zone. -func (r *InstanceGroupsService) AggregatedList(project string) *InstanceGroupsAggregatedListCall { - c := &InstanceGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *InstanceGroupsAggregatedListCall) Filter(filter string) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *InstanceGroupsAggregatedListCall) MaxResults(maxResults int64) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *InstanceGroupsAggregatedListCall) OrderBy(orderBy string) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *InstanceGroupsAggregatedListCall) PageToken(pageToken string) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupsAggregatedListCall) Fields(s ...googleapi.Field) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstanceGroupsAggregatedListCall) IfNoneMatch(entityTag string) *InstanceGroupsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupsAggregatedListCall) Context(ctx context.Context) *InstanceGroupsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/instanceGroups") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.aggregatedList" call. -// Exactly one of *InstanceGroupAggregatedList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupAggregatedList.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceGroupAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of instance groups and sorts them by zone.", - // "httpMethod": "GET", - // "id": "compute.instanceGroups.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/instanceGroups", - // "response": { - // "$ref": "InstanceGroupAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstanceGroupsAggregatedListCall) Pages(ctx context.Context, f func(*InstanceGroupAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.instanceGroups.delete": - -type InstanceGroupsDeleteCall struct { - s *Service - project string - zone string - instanceGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified instance group. The instances in the -// group are not deleted. Note that instance group must not belong to a -// backend service. Read Deleting an instance group for more -// information. -func (r *InstanceGroupsService) Delete(project string, zone string, instanceGroup string) *InstanceGroupsDeleteCall { - c := &InstanceGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupsDeleteCall) RequestId(requestId string) *InstanceGroupsDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupsDeleteCall) Fields(s ...googleapi.Field) *InstanceGroupsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupsDeleteCall) Context(ctx context.Context) *InstanceGroupsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.", - // "httpMethod": "DELETE", - // "id": "compute.instanceGroups.delete", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroup" - // ], - // "parameters": { - // "instanceGroup": { - // "description": "The name of the instance group to delete.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroups.get": - -type InstanceGroupsGetCall struct { - s *Service - project string - zone string - instanceGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified instance group. Get a list of available -// instance groups by making a list() request. -func (r *InstanceGroupsService) Get(project string, zone string, instanceGroup string) *InstanceGroupsGetCall { - c := &InstanceGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupsGetCall) Fields(s ...googleapi.Field) *InstanceGroupsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstanceGroupsGetCall) IfNoneMatch(entityTag string) *InstanceGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupsGetCall) Context(ctx context.Context) *InstanceGroupsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.get" call. -// Exactly one of *InstanceGroup or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *InstanceGroup.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroup, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceGroup{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified instance group. Get a list of available instance groups by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.instanceGroups.get", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroup" - // ], - // "parameters": { - // "instanceGroup": { - // "description": "The name of the instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}", - // "response": { - // "$ref": "InstanceGroup" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.instanceGroups.insert": - -type InstanceGroupsInsertCall struct { - s *Service - project string - zone string - instancegroup *InstanceGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an instance group in the specified project using the -// parameters that are included in the request. -func (r *InstanceGroupsService) Insert(project string, zone string, instancegroup *InstanceGroup) *InstanceGroupsInsertCall { - c := &InstanceGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instancegroup = instancegroup - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupsInsertCall) RequestId(requestId string) *InstanceGroupsInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupsInsertCall) Fields(s ...googleapi.Field) *InstanceGroupsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupsInsertCall) Context(ctx context.Context) *InstanceGroupsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroup) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates an instance group in the specified project using the parameters that are included in the request.", - // "httpMethod": "POST", - // "id": "compute.instanceGroups.insert", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where you want to create the instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroups", - // "request": { - // "$ref": "InstanceGroup" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroups.list": - -type InstanceGroupsListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of instance groups that are located in the -// specified project and zone. -func (r *InstanceGroupsService) List(project string, zone string) *InstanceGroupsListCall { - c := &InstanceGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *InstanceGroupsListCall) Filter(filter string) *InstanceGroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *InstanceGroupsListCall) MaxResults(maxResults int64) *InstanceGroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *InstanceGroupsListCall) OrderBy(orderBy string) *InstanceGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *InstanceGroupsListCall) PageToken(pageToken string) *InstanceGroupsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupsListCall) Fields(s ...googleapi.Field) *InstanceGroupsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstanceGroupsListCall) IfNoneMatch(entityTag string) *InstanceGroupsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupsListCall) Context(ctx context.Context) *InstanceGroupsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.list" call. -// Exactly one of *InstanceGroupList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstanceGroupList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceGroupList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of instance groups that are located in the specified project and zone.", - // "httpMethod": "GET", - // "id": "compute.instanceGroups.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroups", - // "response": { - // "$ref": "InstanceGroupList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstanceGroupsListCall) Pages(ctx context.Context, f func(*InstanceGroupList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.instanceGroups.listInstances": - -type InstanceGroupsListInstancesCall struct { - s *Service - project string - zone string - instanceGroup string - instancegroupslistinstancesrequest *InstanceGroupsListInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListInstances: Lists the instances in the specified instance group. -func (r *InstanceGroupsService) ListInstances(project string, zone string, instanceGroup string, instancegroupslistinstancesrequest *InstanceGroupsListInstancesRequest) *InstanceGroupsListInstancesCall { - c := &InstanceGroupsListInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - c.instancegroupslistinstancesrequest = instancegroupslistinstancesrequest - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *InstanceGroupsListInstancesCall) Filter(filter string) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *InstanceGroupsListInstancesCall) MaxResults(maxResults int64) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *InstanceGroupsListInstancesCall) OrderBy(orderBy string) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *InstanceGroupsListInstancesCall) PageToken(pageToken string) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupsListInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupsListInstancesCall) Context(ctx context.Context) *InstanceGroupsListInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupsListInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupslistinstancesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.listInstances" call. -// Exactly one of *InstanceGroupsListInstances or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupsListInstances.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) (*InstanceGroupsListInstances, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceGroupsListInstances{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists the instances in the specified instance group.", - // "httpMethod": "POST", - // "id": "compute.instanceGroups.listInstances", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroup" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "instanceGroup": { - // "description": "The name of the instance group from which you want to generate a list of included instances.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances", - // "request": { - // "$ref": "InstanceGroupsListInstancesRequest" - // }, - // "response": { - // "$ref": "InstanceGroupsListInstances" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstanceGroupsListInstancesCall) Pages(ctx context.Context, f func(*InstanceGroupsListInstances) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.instanceGroups.removeInstances": - -type InstanceGroupsRemoveInstancesCall struct { - s *Service - project string - zone string - instanceGroup string - instancegroupsremoveinstancesrequest *InstanceGroupsRemoveInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveInstances: Removes one or more instances from the specified -// instance group, but does not delete those instances. -// -// If the group is part of a backend service that has enabled connection -// draining, it can take up to 60 seconds after the connection draining -// duration before the VM instance is removed or deleted. -func (r *InstanceGroupsService) RemoveInstances(project string, zone string, instanceGroup string, instancegroupsremoveinstancesrequest *InstanceGroupsRemoveInstancesRequest) *InstanceGroupsRemoveInstancesCall { - c := &InstanceGroupsRemoveInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - c.instancegroupsremoveinstancesrequest = instancegroupsremoveinstancesrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupsRemoveInstancesCall) RequestId(requestId string) *InstanceGroupsRemoveInstancesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupsRemoveInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsRemoveInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupsRemoveInstancesCall) Context(ctx context.Context) *InstanceGroupsRemoveInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupsRemoveInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsRemoveInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupsremoveinstancesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.removeInstances" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupsRemoveInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Removes one or more instances from the specified instance group, but does not delete those instances.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted.", - // "httpMethod": "POST", - // "id": "compute.instanceGroups.removeInstances", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroup" - // ], - // "parameters": { - // "instanceGroup": { - // "description": "The name of the instance group where the specified instances will be removed.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances", - // "request": { - // "$ref": "InstanceGroupsRemoveInstancesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroups.setNamedPorts": - -type InstanceGroupsSetNamedPortsCall struct { - s *Service - project string - zone string - instanceGroup string - instancegroupssetnamedportsrequest *InstanceGroupsSetNamedPortsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetNamedPorts: Sets the named ports for the specified instance group. -func (r *InstanceGroupsService) SetNamedPorts(project string, zone string, instanceGroup string, instancegroupssetnamedportsrequest *InstanceGroupsSetNamedPortsRequest) *InstanceGroupsSetNamedPortsCall { - c := &InstanceGroupsSetNamedPortsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - c.instancegroupssetnamedportsrequest = instancegroupssetnamedportsrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupsSetNamedPortsCall) RequestId(requestId string) *InstanceGroupsSetNamedPortsCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupsSetNamedPortsCall) Fields(s ...googleapi.Field) *InstanceGroupsSetNamedPortsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupsSetNamedPortsCall) Context(ctx context.Context) *InstanceGroupsSetNamedPortsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupsSetNamedPortsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupssetnamedportsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.setNamedPorts" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the named ports for the specified instance group.", - // "httpMethod": "POST", - // "id": "compute.instanceGroups.setNamedPorts", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroup" - // ], - // "parameters": { - // "instanceGroup": { - // "description": "The name of the instance group where the named ports are updated.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts", - // "request": { - // "$ref": "InstanceGroupsSetNamedPortsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroups.testIamPermissions": - -type InstanceGroupsTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *InstanceGroupsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceGroupsTestIamPermissionsCall { - c := &InstanceGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstanceGroupsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupsTestIamPermissionsCall) Context(ctx context.Context) *InstanceGroupsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.instanceGroups.testIamPermissions", - // "parameterOrder": [ - // "project", - // "zone", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroups/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.instanceTemplates.delete": - -type InstanceTemplatesDeleteCall struct { - s *Service - project string - instanceTemplate string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified instance template. If you delete an -// instance template that is being referenced from another instance -// group, the instance group will not be able to create or recreate -// virtual machine instances. Deleting an instance template is permanent -// and cannot be undone. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/delete -func (r *InstanceTemplatesService) Delete(project string, instanceTemplate string) *InstanceTemplatesDeleteCall { - c := &InstanceTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instanceTemplate = instanceTemplate - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceTemplatesDeleteCall) RequestId(requestId string) *InstanceTemplatesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceTemplatesDeleteCall) Fields(s ...googleapi.Field) *InstanceTemplatesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceTemplatesDeleteCall) Context(ctx context.Context) *InstanceTemplatesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceTemplatesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates/{instanceTemplate}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instanceTemplate": c.instanceTemplate, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceTemplates.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified instance template. If you delete an instance template that is being referenced from another instance group, the instance group will not be able to create or recreate virtual machine instances. Deleting an instance template is permanent and cannot be undone.", - // "httpMethod": "DELETE", - // "id": "compute.instanceTemplates.delete", - // "parameterOrder": [ - // "project", - // "instanceTemplate" - // ], - // "parameters": { - // "instanceTemplate": { - // "description": "The name of the instance template to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/instanceTemplates/{instanceTemplate}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceTemplates.get": - -type InstanceTemplatesGetCall struct { - s *Service - project string - instanceTemplate string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified instance template. Get a list of available -// instance templates by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/get -func (r *InstanceTemplatesService) Get(project string, instanceTemplate string) *InstanceTemplatesGetCall { - c := &InstanceTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instanceTemplate = instanceTemplate - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceTemplatesGetCall) Fields(s ...googleapi.Field) *InstanceTemplatesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstanceTemplatesGetCall) IfNoneMatch(entityTag string) *InstanceTemplatesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceTemplatesGetCall) Context(ctx context.Context) *InstanceTemplatesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceTemplatesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceTemplatesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates/{instanceTemplate}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instanceTemplate": c.instanceTemplate, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceTemplates.get" call. -// Exactly one of *InstanceTemplate or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstanceTemplate.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*InstanceTemplate, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceTemplate{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified instance template. Get a list of available instance templates by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.instanceTemplates.get", - // "parameterOrder": [ - // "project", - // "instanceTemplate" - // ], - // "parameters": { - // "instanceTemplate": { - // "description": "The name of the instance template.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/instanceTemplates/{instanceTemplate}", - // "response": { - // "$ref": "InstanceTemplate" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.instanceTemplates.insert": - -type InstanceTemplatesInsertCall struct { - s *Service - project string - instancetemplate *InstanceTemplate - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an instance template in the specified project using -// the data that is included in the request. If you are creating a new -// template to update an existing instance group, your new instance -// template must use the same network or, if applicable, the same -// subnetwork as the original template. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/insert -func (r *InstanceTemplatesService) Insert(project string, instancetemplate *InstanceTemplate) *InstanceTemplatesInsertCall { - c := &InstanceTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instancetemplate = instancetemplate - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstanceTemplatesInsertCall) RequestId(requestId string) *InstanceTemplatesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceTemplatesInsertCall) Fields(s ...googleapi.Field) *InstanceTemplatesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceTemplatesInsertCall) Context(ctx context.Context) *InstanceTemplatesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceTemplatesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceTemplatesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancetemplate) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceTemplates.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.", - // "httpMethod": "POST", - // "id": "compute.instanceTemplates.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/instanceTemplates", - // "request": { - // "$ref": "InstanceTemplate" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceTemplates.list": - -type InstanceTemplatesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of instance templates that are contained -// within the specified project and zone. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/list -func (r *InstanceTemplatesService) List(project string) *InstanceTemplatesListCall { - c := &InstanceTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *InstanceTemplatesListCall) Filter(filter string) *InstanceTemplatesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *InstanceTemplatesListCall) MaxResults(maxResults int64) *InstanceTemplatesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *InstanceTemplatesListCall) OrderBy(orderBy string) *InstanceTemplatesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *InstanceTemplatesListCall) PageToken(pageToken string) *InstanceTemplatesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceTemplatesListCall) Fields(s ...googleapi.Field) *InstanceTemplatesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstanceTemplatesListCall) IfNoneMatch(entityTag string) *InstanceTemplatesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceTemplatesListCall) Context(ctx context.Context) *InstanceTemplatesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceTemplatesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceTemplatesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceTemplates.list" call. -// Exactly one of *InstanceTemplateList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstanceTemplateList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*InstanceTemplateList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceTemplateList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of instance templates that are contained within the specified project and zone.", - // "httpMethod": "GET", - // "id": "compute.instanceTemplates.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/instanceTemplates", - // "response": { - // "$ref": "InstanceTemplateList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstanceTemplatesListCall) Pages(ctx context.Context, f func(*InstanceTemplateList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.instanceTemplates.testIamPermissions": - -type InstanceTemplatesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *InstanceTemplatesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceTemplatesTestIamPermissionsCall { - c := &InstanceTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceTemplatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstanceTemplatesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceTemplatesTestIamPermissionsCall) Context(ctx context.Context) *InstanceTemplatesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceTemplatesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceTemplates.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.instanceTemplates.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/instanceTemplates/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.instances.addAccessConfig": - -type InstancesAddAccessConfigCall struct { - s *Service - project string - zone string - instance string - accessconfig *AccessConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddAccessConfig: Adds an access config to an instance's network -// interface. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/addAccessConfig -func (r *InstancesService) AddAccessConfig(project string, zone string, instance string, networkInterface string, accessconfig *AccessConfig) *InstancesAddAccessConfigCall { - c := &InstancesAddAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("networkInterface", networkInterface) - c.accessconfig = accessconfig - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesAddAccessConfigCall) RequestId(requestId string) *InstancesAddAccessConfigCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesAddAccessConfigCall) Fields(s ...googleapi.Field) *InstancesAddAccessConfigCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesAddAccessConfigCall) Context(ctx context.Context) *InstancesAddAccessConfigCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesAddAccessConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesAddAccessConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.accessconfig) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/addAccessConfig") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.addAccessConfig" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesAddAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Adds an access config to an instance's network interface.", - // "httpMethod": "POST", - // "id": "compute.instances.addAccessConfig", - // "parameterOrder": [ - // "project", - // "zone", - // "instance", - // "networkInterface" - // ], - // "parameters": { - // "instance": { - // "description": "The instance name for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "networkInterface": { - // "description": "The name of the network interface to add to this instance.", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/addAccessConfig", - // "request": { - // "$ref": "AccessConfig" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.aggregatedList": - -type InstancesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves aggregated list of instances. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/aggregatedList -func (r *InstancesService) AggregatedList(project string) *InstancesAggregatedListCall { - c := &InstancesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *InstancesAggregatedListCall) Filter(filter string) *InstancesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *InstancesAggregatedListCall) MaxResults(maxResults int64) *InstancesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *InstancesAggregatedListCall) OrderBy(orderBy string) *InstancesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *InstancesAggregatedListCall) PageToken(pageToken string) *InstancesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesAggregatedListCall) Fields(s ...googleapi.Field) *InstancesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstancesAggregatedListCall) IfNoneMatch(entityTag string) *InstancesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesAggregatedListCall) Context(ctx context.Context) *InstancesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/instances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.aggregatedList" call. -// Exactly one of *InstanceAggregatedList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstanceAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves aggregated list of instances.", - // "httpMethod": "GET", - // "id": "compute.instances.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/instances", - // "response": { - // "$ref": "InstanceAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstancesAggregatedListCall) Pages(ctx context.Context, f func(*InstanceAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.instances.attachDisk": - -type InstancesAttachDiskCall struct { - s *Service - project string - zone string - instance string - attacheddisk *AttachedDisk - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AttachDisk: Attaches an existing Disk resource to an instance. You -// must first create the disk before you can attach it. It is not -// possible to create and attach a disk at the same time. For more -// information, read Adding a persistent disk to your instance. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/attachDisk -func (r *InstancesService) AttachDisk(project string, zone string, instance string, attacheddisk *AttachedDisk) *InstancesAttachDiskCall { - c := &InstancesAttachDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.attacheddisk = attacheddisk - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesAttachDiskCall) RequestId(requestId string) *InstancesAttachDiskCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesAttachDiskCall) Fields(s ...googleapi.Field) *InstancesAttachDiskCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesAttachDiskCall) Context(ctx context.Context) *InstancesAttachDiskCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesAttachDiskCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesAttachDiskCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.attacheddisk) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/attachDisk") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.attachDisk" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesAttachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.", - // "httpMethod": "POST", - // "id": "compute.instances.attachDisk", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "The instance name for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/attachDisk", - // "request": { - // "$ref": "AttachedDisk" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.delete": - -type InstancesDeleteCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Instance resource. For more -// information, see Stopping or Deleting an Instance. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/delete -func (r *InstancesService) Delete(project string, zone string, instance string) *InstancesDeleteCall { - c := &InstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesDeleteCall) RequestId(requestId string) *InstancesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesDeleteCall) Fields(s ...googleapi.Field) *InstancesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesDeleteCall) Context(ctx context.Context) *InstancesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.", - // "httpMethod": "DELETE", - // "id": "compute.instances.delete", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.deleteAccessConfig": - -type InstancesDeleteAccessConfigCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteAccessConfig: Deletes an access config from an instance's -// network interface. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/deleteAccessConfig -func (r *InstancesService) DeleteAccessConfig(project string, zone string, instance string, accessConfig string, networkInterface string) *InstancesDeleteAccessConfigCall { - c := &InstancesDeleteAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("accessConfig", accessConfig) - c.urlParams_.Set("networkInterface", networkInterface) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesDeleteAccessConfigCall) RequestId(requestId string) *InstancesDeleteAccessConfigCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesDeleteAccessConfigCall) Fields(s ...googleapi.Field) *InstancesDeleteAccessConfigCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesDeleteAccessConfigCall) Context(ctx context.Context) *InstancesDeleteAccessConfigCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesDeleteAccessConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesDeleteAccessConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/deleteAccessConfig") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.deleteAccessConfig" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesDeleteAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes an access config from an instance's network interface.", - // "httpMethod": "POST", - // "id": "compute.instances.deleteAccessConfig", - // "parameterOrder": [ - // "project", - // "zone", - // "instance", - // "accessConfig", - // "networkInterface" - // ], - // "parameters": { - // "accessConfig": { - // "description": "The name of the access config to delete.", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "instance": { - // "description": "The instance name for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "networkInterface": { - // "description": "The name of the network interface.", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/deleteAccessConfig", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.detachDisk": - -type InstancesDetachDiskCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DetachDisk: Detaches a disk from an instance. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/detachDisk -func (r *InstancesService) DetachDisk(project string, zone string, instance string, deviceName string) *InstancesDetachDiskCall { - c := &InstancesDetachDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("deviceName", deviceName) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesDetachDiskCall) RequestId(requestId string) *InstancesDetachDiskCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesDetachDiskCall) Fields(s ...googleapi.Field) *InstancesDetachDiskCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesDetachDiskCall) Context(ctx context.Context) *InstancesDetachDiskCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesDetachDiskCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesDetachDiskCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/detachDisk") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.detachDisk" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesDetachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Detaches a disk from an instance.", - // "httpMethod": "POST", - // "id": "compute.instances.detachDisk", - // "parameterOrder": [ - // "project", - // "zone", - // "instance", - // "deviceName" - // ], - // "parameters": { - // "deviceName": { - // "description": "Disk device name to detach.", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "instance": { - // "description": "Instance name.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/detachDisk", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.get": - -type InstancesGetCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Instance resource. Get a list of available -// instances by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/get -func (r *InstancesService) Get(project string, zone string, instance string) *InstancesGetCall { - c := &InstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesGetCall) Fields(s ...googleapi.Field) *InstancesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstancesGetCall) IfNoneMatch(entityTag string) *InstancesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesGetCall) Context(ctx context.Context) *InstancesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.get" call. -// Exactly one of *Instance or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Instance.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Instance{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified Instance resource. Get a list of available instances by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.instances.get", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}", - // "response": { - // "$ref": "Instance" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.instances.getSerialPortOutput": - -type InstancesGetSerialPortOutputCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetSerialPortOutput: Returns the specified instance's serial port -// output. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/getSerialPortOutput -func (r *InstancesService) GetSerialPortOutput(project string, zone string, instance string) *InstancesGetSerialPortOutputCall { - c := &InstancesGetSerialPortOutputCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// Port sets the optional parameter "port": Specifies which COM or -// serial port to retrieve data from. -func (c *InstancesGetSerialPortOutputCall) Port(port int64) *InstancesGetSerialPortOutputCall { - c.urlParams_.Set("port", fmt.Sprint(port)) - return c -} - -// Start sets the optional parameter "start": Returns output starting -// from a specific byte position. Use this to page through output when -// the output is too large to return in a single request. For the -// initial request, leave this field unspecified. For subsequent calls, -// this field should be set to the next value returned in the previous -// call. -func (c *InstancesGetSerialPortOutputCall) Start(start int64) *InstancesGetSerialPortOutputCall { - c.urlParams_.Set("start", fmt.Sprint(start)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesGetSerialPortOutputCall) Fields(s ...googleapi.Field) *InstancesGetSerialPortOutputCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstancesGetSerialPortOutputCall) IfNoneMatch(entityTag string) *InstancesGetSerialPortOutputCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesGetSerialPortOutputCall) Context(ctx context.Context) *InstancesGetSerialPortOutputCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesGetSerialPortOutputCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetSerialPortOutputCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/serialPort") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.getSerialPortOutput" call. -// Exactly one of *SerialPortOutput or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *SerialPortOutput.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstancesGetSerialPortOutputCall) Do(opts ...googleapi.CallOption) (*SerialPortOutput, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &SerialPortOutput{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified instance's serial port output.", - // "httpMethod": "GET", - // "id": "compute.instances.getSerialPortOutput", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "port": { - // "default": "1", - // "description": "Specifies which COM or serial port to retrieve data from.", - // "format": "int32", - // "location": "query", - // "maximum": "4", - // "minimum": "1", - // "type": "integer" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "start": { - // "description": "Returns output starting from a specific byte position. Use this to page through output when the output is too large to return in a single request. For the initial request, leave this field unspecified. For subsequent calls, this field should be set to the next value returned in the previous call.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/serialPort", - // "response": { - // "$ref": "SerialPortOutput" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.instances.insert": - -type InstancesInsertCall struct { - s *Service - project string - zone string - instance *Instance - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an instance resource in the specified project using -// the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/insert -func (r *InstancesService) Insert(project string, zone string, instance *Instance) *InstancesInsertCall { - c := &InstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesInsertCall) RequestId(requestId string) *InstancesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesInsertCall) Fields(s ...googleapi.Field) *InstancesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesInsertCall) Context(ctx context.Context) *InstancesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates an instance resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.instances.insert", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances", - // "request": { - // "$ref": "Instance" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.list": - -type InstancesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of instances contained within the specified -// zone. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/list -func (r *InstancesService) List(project string, zone string) *InstancesListCall { - c := &InstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *InstancesListCall) Filter(filter string) *InstancesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *InstancesListCall) MaxResults(maxResults int64) *InstancesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *InstancesListCall) OrderBy(orderBy string) *InstancesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *InstancesListCall) PageToken(pageToken string) *InstancesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesListCall) Fields(s ...googleapi.Field) *InstancesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstancesListCall) IfNoneMatch(entityTag string) *InstancesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesListCall) Context(ctx context.Context) *InstancesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.list" call. -// Exactly one of *InstanceList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *InstanceList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstanceList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of instances contained within the specified zone.", - // "httpMethod": "GET", - // "id": "compute.instances.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances", - // "response": { - // "$ref": "InstanceList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstancesListCall) Pages(ctx context.Context, f func(*InstanceList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.instances.listReferrers": - -type InstancesListReferrersCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListReferrers: Retrieves the list of referrers to instances contained -// within the specified zone. -func (r *InstancesService) ListReferrers(project string, zone string, instance string) *InstancesListReferrersCall { - c := &InstancesListReferrersCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *InstancesListReferrersCall) Filter(filter string) *InstancesListReferrersCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *InstancesListReferrersCall) MaxResults(maxResults int64) *InstancesListReferrersCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *InstancesListReferrersCall) OrderBy(orderBy string) *InstancesListReferrersCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *InstancesListReferrersCall) PageToken(pageToken string) *InstancesListReferrersCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesListReferrersCall) Fields(s ...googleapi.Field) *InstancesListReferrersCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstancesListReferrersCall) IfNoneMatch(entityTag string) *InstancesListReferrersCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesListReferrersCall) Context(ctx context.Context) *InstancesListReferrersCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesListReferrersCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesListReferrersCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/referrers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.listReferrers" call. -// Exactly one of *InstanceListReferrers or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstanceListReferrers.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstancesListReferrersCall) Do(opts ...googleapi.CallOption) (*InstanceListReferrers, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceListReferrers{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of referrers to instances contained within the specified zone.", - // "httpMethod": "GET", - // "id": "compute.instances.listReferrers", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "instance": { - // "description": "Name of the target instance scoping this request, or '-' if the request should span over all instances in the container.", - // "location": "path", - // "pattern": "-|[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/referrers", - // "response": { - // "$ref": "InstanceListReferrers" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstancesListReferrersCall) Pages(ctx context.Context, f func(*InstanceListReferrers) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.instances.reset": - -type InstancesResetCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Reset: Performs a reset on the instance. For more information, see -// Resetting an instance. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/reset -func (r *InstancesService) Reset(project string, zone string, instance string) *InstancesResetCall { - c := &InstancesResetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesResetCall) RequestId(requestId string) *InstancesResetCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesResetCall) Fields(s ...googleapi.Field) *InstancesResetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesResetCall) Context(ctx context.Context) *InstancesResetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesResetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesResetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/reset") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.reset" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesResetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Performs a reset on the instance. For more information, see Resetting an instance.", - // "httpMethod": "POST", - // "id": "compute.instances.reset", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/reset", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.setDiskAutoDelete": - -type InstancesSetDiskAutoDeleteCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetDiskAutoDelete: Sets the auto-delete flag for a disk attached to -// an instance. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setDiskAutoDelete -func (r *InstancesService) SetDiskAutoDelete(project string, zone string, instance string, autoDelete bool, deviceName string) *InstancesSetDiskAutoDeleteCall { - c := &InstancesSetDiskAutoDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("autoDelete", fmt.Sprint(autoDelete)) - c.urlParams_.Set("deviceName", deviceName) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesSetDiskAutoDeleteCall) RequestId(requestId string) *InstancesSetDiskAutoDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesSetDiskAutoDeleteCall) Fields(s ...googleapi.Field) *InstancesSetDiskAutoDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesSetDiskAutoDeleteCall) Context(ctx context.Context) *InstancesSetDiskAutoDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesSetDiskAutoDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetDiskAutoDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setDiskAutoDelete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesSetDiskAutoDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the auto-delete flag for a disk attached to an instance.", - // "httpMethod": "POST", - // "id": "compute.instances.setDiskAutoDelete", - // "parameterOrder": [ - // "project", - // "zone", - // "instance", - // "autoDelete", - // "deviceName" - // ], - // "parameters": { - // "autoDelete": { - // "description": "Whether to auto-delete the disk when the instance is deleted.", - // "location": "query", - // "required": true, - // "type": "boolean" - // }, - // "deviceName": { - // "description": "The device name of the disk to modify.", - // "location": "query", - // "pattern": "\\w[\\w.-]{0,254}", - // "required": true, - // "type": "string" - // }, - // "instance": { - // "description": "The instance name.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.setLabels": - -type InstancesSetLabelsCall struct { - s *Service - project string - zone string - instance string - instancessetlabelsrequest *InstancesSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets labels on an instance. To learn more about labels, -// read the Labeling Resources documentation. -func (r *InstancesService) SetLabels(project string, zone string, instance string, instancessetlabelsrequest *InstancesSetLabelsRequest) *InstancesSetLabelsCall { - c := &InstancesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancessetlabelsrequest = instancessetlabelsrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesSetLabelsCall) RequestId(requestId string) *InstancesSetLabelsCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesSetLabelsCall) Fields(s ...googleapi.Field) *InstancesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesSetLabelsCall) Context(ctx context.Context) *InstancesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetlabelsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setLabels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setLabels" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.", - // "httpMethod": "POST", - // "id": "compute.instances.setLabels", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/setLabels", - // "request": { - // "$ref": "InstancesSetLabelsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.setMachineResources": - -type InstancesSetMachineResourcesCall struct { - s *Service - project string - zone string - instance string - instancessetmachineresourcesrequest *InstancesSetMachineResourcesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetMachineResources: Changes the number and/or type of accelerator -// for a stopped instance to the values specified in the request. -func (r *InstancesService) SetMachineResources(project string, zone string, instance string, instancessetmachineresourcesrequest *InstancesSetMachineResourcesRequest) *InstancesSetMachineResourcesCall { - c := &InstancesSetMachineResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancessetmachineresourcesrequest = instancessetmachineresourcesrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesSetMachineResourcesCall) RequestId(requestId string) *InstancesSetMachineResourcesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesSetMachineResourcesCall) Fields(s ...googleapi.Field) *InstancesSetMachineResourcesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesSetMachineResourcesCall) Context(ctx context.Context) *InstancesSetMachineResourcesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesSetMachineResourcesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetMachineResourcesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetmachineresourcesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setMachineResources") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setMachineResources" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesSetMachineResourcesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.", - // "httpMethod": "POST", - // "id": "compute.instances.setMachineResources", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/setMachineResources", - // "request": { - // "$ref": "InstancesSetMachineResourcesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.setMachineType": - -type InstancesSetMachineTypeCall struct { - s *Service - project string - zone string - instance string - instancessetmachinetyperequest *InstancesSetMachineTypeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetMachineType: Changes the machine type for a stopped instance to -// the machine type specified in the request. -func (r *InstancesService) SetMachineType(project string, zone string, instance string, instancessetmachinetyperequest *InstancesSetMachineTypeRequest) *InstancesSetMachineTypeCall { - c := &InstancesSetMachineTypeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancessetmachinetyperequest = instancessetmachinetyperequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesSetMachineTypeCall) RequestId(requestId string) *InstancesSetMachineTypeCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesSetMachineTypeCall) Fields(s ...googleapi.Field) *InstancesSetMachineTypeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesSetMachineTypeCall) Context(ctx context.Context) *InstancesSetMachineTypeCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesSetMachineTypeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetMachineTypeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetmachinetyperequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setMachineType") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setMachineType" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesSetMachineTypeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes the machine type for a stopped instance to the machine type specified in the request.", - // "httpMethod": "POST", - // "id": "compute.instances.setMachineType", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/setMachineType", - // "request": { - // "$ref": "InstancesSetMachineTypeRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.setMetadata": - -type InstancesSetMetadataCall struct { - s *Service - project string - zone string - instance string - metadata *Metadata - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetMetadata: Sets metadata for the specified instance to the data -// included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setMetadata -func (r *InstancesService) SetMetadata(project string, zone string, instance string, metadata *Metadata) *InstancesSetMetadataCall { - c := &InstancesSetMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.metadata = metadata - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesSetMetadataCall) RequestId(requestId string) *InstancesSetMetadataCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesSetMetadataCall) Fields(s ...googleapi.Field) *InstancesSetMetadataCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesSetMetadataCall) Context(ctx context.Context) *InstancesSetMetadataCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesSetMetadataCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetMetadataCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.metadata) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setMetadata") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setMetadata" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesSetMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets metadata for the specified instance to the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.instances.setMetadata", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/setMetadata", - // "request": { - // "$ref": "Metadata" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.setMinCpuPlatform": - -type InstancesSetMinCpuPlatformCall struct { - s *Service - project string - zone string - instance string - instancessetmincpuplatformrequest *InstancesSetMinCpuPlatformRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetMinCpuPlatform: Changes the minimum CPU platform that this -// instance should use. This method can only be called on a stopped -// instance. For more information, read Specifying a Minimum CPU -// Platform. -func (r *InstancesService) SetMinCpuPlatform(project string, zone string, instance string, instancessetmincpuplatformrequest *InstancesSetMinCpuPlatformRequest) *InstancesSetMinCpuPlatformCall { - c := &InstancesSetMinCpuPlatformCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancessetmincpuplatformrequest = instancessetmincpuplatformrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesSetMinCpuPlatformCall) RequestId(requestId string) *InstancesSetMinCpuPlatformCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesSetMinCpuPlatformCall) Fields(s ...googleapi.Field) *InstancesSetMinCpuPlatformCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesSetMinCpuPlatformCall) Context(ctx context.Context) *InstancesSetMinCpuPlatformCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesSetMinCpuPlatformCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetMinCpuPlatformCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetmincpuplatformrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setMinCpuPlatform" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesSetMinCpuPlatformCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.", - // "httpMethod": "POST", - // "id": "compute.instances.setMinCpuPlatform", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform", - // "request": { - // "$ref": "InstancesSetMinCpuPlatformRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.setScheduling": - -type InstancesSetSchedulingCall struct { - s *Service - project string - zone string - instance string - scheduling *Scheduling - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetScheduling: Sets an instance's scheduling options. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setScheduling -func (r *InstancesService) SetScheduling(project string, zone string, instance string, scheduling *Scheduling) *InstancesSetSchedulingCall { - c := &InstancesSetSchedulingCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.scheduling = scheduling - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesSetSchedulingCall) RequestId(requestId string) *InstancesSetSchedulingCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesSetSchedulingCall) Fields(s ...googleapi.Field) *InstancesSetSchedulingCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesSetSchedulingCall) Context(ctx context.Context) *InstancesSetSchedulingCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesSetSchedulingCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetSchedulingCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.scheduling) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setScheduling") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setScheduling" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesSetSchedulingCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets an instance's scheduling options.", - // "httpMethod": "POST", - // "id": "compute.instances.setScheduling", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Instance name.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/setScheduling", - // "request": { - // "$ref": "Scheduling" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.setServiceAccount": - -type InstancesSetServiceAccountCall struct { - s *Service - project string - zone string - instance string - instancessetserviceaccountrequest *InstancesSetServiceAccountRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetServiceAccount: Sets the service account on the instance. For more -// information, read Changing the service account and access scopes for -// an instance. -func (r *InstancesService) SetServiceAccount(project string, zone string, instance string, instancessetserviceaccountrequest *InstancesSetServiceAccountRequest) *InstancesSetServiceAccountCall { - c := &InstancesSetServiceAccountCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancessetserviceaccountrequest = instancessetserviceaccountrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesSetServiceAccountCall) RequestId(requestId string) *InstancesSetServiceAccountCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesSetServiceAccountCall) Fields(s ...googleapi.Field) *InstancesSetServiceAccountCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesSetServiceAccountCall) Context(ctx context.Context) *InstancesSetServiceAccountCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesSetServiceAccountCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetServiceAccountCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetserviceaccountrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setServiceAccount") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setServiceAccount" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesSetServiceAccountCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.", - // "httpMethod": "POST", - // "id": "compute.instances.setServiceAccount", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance resource to start.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/setServiceAccount", - // "request": { - // "$ref": "InstancesSetServiceAccountRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.setTags": - -type InstancesSetTagsCall struct { - s *Service - project string - zone string - instance string - tags *Tags - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetTags: Sets tags for the specified instance to the data included in -// the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setTags -func (r *InstancesService) SetTags(project string, zone string, instance string, tags *Tags) *InstancesSetTagsCall { - c := &InstancesSetTagsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.tags = tags - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesSetTagsCall) RequestId(requestId string) *InstancesSetTagsCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesSetTagsCall) Fields(s ...googleapi.Field) *InstancesSetTagsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesSetTagsCall) Context(ctx context.Context) *InstancesSetTagsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesSetTagsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetTagsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.tags) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setTags") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setTags" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesSetTagsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets tags for the specified instance to the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.instances.setTags", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/setTags", - // "request": { - // "$ref": "Tags" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.start": - -type InstancesStartCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Start: Starts an instance that was stopped using the using the -// instances().stop method. For more information, see Restart an -// instance. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/start -func (r *InstancesService) Start(project string, zone string, instance string) *InstancesStartCall { - c := &InstancesStartCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesStartCall) RequestId(requestId string) *InstancesStartCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesStartCall) Fields(s ...googleapi.Field) *InstancesStartCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesStartCall) Context(ctx context.Context) *InstancesStartCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesStartCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesStartCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/start") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.start" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.", - // "httpMethod": "POST", - // "id": "compute.instances.start", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance resource to start.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/start", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.startWithEncryptionKey": - -type InstancesStartWithEncryptionKeyCall struct { - s *Service - project string - zone string - instance string - instancesstartwithencryptionkeyrequest *InstancesStartWithEncryptionKeyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StartWithEncryptionKey: Starts an instance that was stopped using the -// using the instances().stop method. For more information, see Restart -// an instance. -func (r *InstancesService) StartWithEncryptionKey(project string, zone string, instance string, instancesstartwithencryptionkeyrequest *InstancesStartWithEncryptionKeyRequest) *InstancesStartWithEncryptionKeyCall { - c := &InstancesStartWithEncryptionKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancesstartwithencryptionkeyrequest = instancesstartwithencryptionkeyrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesStartWithEncryptionKeyCall) RequestId(requestId string) *InstancesStartWithEncryptionKeyCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesStartWithEncryptionKeyCall) Fields(s ...googleapi.Field) *InstancesStartWithEncryptionKeyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesStartWithEncryptionKeyCall) Context(ctx context.Context) *InstancesStartWithEncryptionKeyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesStartWithEncryptionKeyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesStartWithEncryptionKeyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesstartwithencryptionkeyrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.startWithEncryptionKey" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesStartWithEncryptionKeyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.", - // "httpMethod": "POST", - // "id": "compute.instances.startWithEncryptionKey", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance resource to start.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey", - // "request": { - // "$ref": "InstancesStartWithEncryptionKeyRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.stop": - -type InstancesStopCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Stop: Stops a running instance, shutting it down cleanly, and allows -// you to restart the instance at a later time. Stopped instances do not -// incur per-minute, virtual machine usage charges while they are -// stopped, but any resources that the virtual machine is using, such as -// persistent disks and static IP addresses, will continue to be charged -// until they are deleted. For more information, see Stopping an -// instance. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/stop -func (r *InstancesService) Stop(project string, zone string, instance string) *InstancesStopCall { - c := &InstancesStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *InstancesStopCall) RequestId(requestId string) *InstancesStopCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesStopCall) Fields(s ...googleapi.Field) *InstancesStopCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesStopCall) Context(ctx context.Context) *InstancesStopCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesStopCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesStopCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/stop") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.stop" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur per-minute, virtual machine usage charges while they are stopped, but any resources that the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.", - // "httpMethod": "POST", - // "id": "compute.instances.stop", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance resource to stop.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/stop", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.testIamPermissions": - -type InstancesTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *InstancesService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstancesTestIamPermissionsCall { - c := &InstancesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstancesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesTestIamPermissionsCall) Context(ctx context.Context) *InstancesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.instances.testIamPermissions", - // "parameterOrder": [ - // "project", - // "zone", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.licenses.get": - -type LicensesGetCall struct { - s *Service - project string - license string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified License resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/licenses/get -func (r *LicensesService) Get(project string, license string) *LicensesGetCall { - c := &LicensesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.license = license - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *LicensesGetCall) Fields(s ...googleapi.Field) *LicensesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *LicensesGetCall) IfNoneMatch(entityTag string) *LicensesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *LicensesGetCall) Context(ctx context.Context) *LicensesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *LicensesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicensesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/licenses/{license}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "license": c.license, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.licenses.get" call. -// Exactly one of *License or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *License.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *LicensesGetCall) Do(opts ...googleapi.CallOption) (*License, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &License{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified License resource.", - // "httpMethod": "GET", - // "id": "compute.licenses.get", - // "parameterOrder": [ - // "project", - // "license" - // ], - // "parameters": { - // "license": { - // "description": "Name of the License resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/licenses/{license}", - // "response": { - // "$ref": "License" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.machineTypes.aggregatedList": - -type MachineTypesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of machine types. -// For details, see https://cloud.google.com/compute/docs/reference/latest/machineTypes/aggregatedList -func (r *MachineTypesService) AggregatedList(project string) *MachineTypesAggregatedListCall { - c := &MachineTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *MachineTypesAggregatedListCall) Filter(filter string) *MachineTypesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *MachineTypesAggregatedListCall) MaxResults(maxResults int64) *MachineTypesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *MachineTypesAggregatedListCall) OrderBy(orderBy string) *MachineTypesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *MachineTypesAggregatedListCall) PageToken(pageToken string) *MachineTypesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *MachineTypesAggregatedListCall) Fields(s ...googleapi.Field) *MachineTypesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *MachineTypesAggregatedListCall) IfNoneMatch(entityTag string) *MachineTypesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *MachineTypesAggregatedListCall) Context(ctx context.Context) *MachineTypesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *MachineTypesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MachineTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/machineTypes") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.machineTypes.aggregatedList" call. -// Exactly one of *MachineTypeAggregatedList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *MachineTypeAggregatedList.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *MachineTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*MachineTypeAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &MachineTypeAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of machine types.", - // "httpMethod": "GET", - // "id": "compute.machineTypes.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/machineTypes", - // "response": { - // "$ref": "MachineTypeAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *MachineTypesAggregatedListCall) Pages(ctx context.Context, f func(*MachineTypeAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.machineTypes.get": - -type MachineTypesGetCall struct { - s *Service - project string - zone string - machineType string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified machine type. Get a list of available -// machine types by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/machineTypes/get -func (r *MachineTypesService) Get(project string, zone string, machineType string) *MachineTypesGetCall { - c := &MachineTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.machineType = machineType - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *MachineTypesGetCall) Fields(s ...googleapi.Field) *MachineTypesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *MachineTypesGetCall) IfNoneMatch(entityTag string) *MachineTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *MachineTypesGetCall) Context(ctx context.Context) *MachineTypesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *MachineTypesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MachineTypesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/machineTypes/{machineType}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "machineType": c.machineType, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.machineTypes.get" call. -// Exactly one of *MachineType or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *MachineType.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *MachineTypesGetCall) Do(opts ...googleapi.CallOption) (*MachineType, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &MachineType{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified machine type. Get a list of available machine types by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.machineTypes.get", - // "parameterOrder": [ - // "project", - // "zone", - // "machineType" - // ], - // "parameters": { - // "machineType": { - // "description": "Name of the machine type to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/machineTypes/{machineType}", - // "response": { - // "$ref": "MachineType" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.machineTypes.list": - -type MachineTypesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of machine types available to the specified -// project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/machineTypes/list -func (r *MachineTypesService) List(project string, zone string) *MachineTypesListCall { - c := &MachineTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *MachineTypesListCall) Filter(filter string) *MachineTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *MachineTypesListCall) MaxResults(maxResults int64) *MachineTypesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *MachineTypesListCall) OrderBy(orderBy string) *MachineTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *MachineTypesListCall) PageToken(pageToken string) *MachineTypesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *MachineTypesListCall) Fields(s ...googleapi.Field) *MachineTypesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *MachineTypesListCall) IfNoneMatch(entityTag string) *MachineTypesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *MachineTypesListCall) Context(ctx context.Context) *MachineTypesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *MachineTypesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MachineTypesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/machineTypes") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.machineTypes.list" call. -// Exactly one of *MachineTypeList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *MachineTypeList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *MachineTypesListCall) Do(opts ...googleapi.CallOption) (*MachineTypeList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &MachineTypeList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of machine types available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.machineTypes.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/machineTypes", - // "response": { - // "$ref": "MachineTypeList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *MachineTypesListCall) Pages(ctx context.Context, f func(*MachineTypeList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.networks.addPeering": - -type NetworksAddPeeringCall struct { - s *Service - project string - network string - networksaddpeeringrequest *NetworksAddPeeringRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddPeering: Adds a peering to the specified network. -func (r *NetworksService) AddPeering(project string, network string, networksaddpeeringrequest *NetworksAddPeeringRequest) *NetworksAddPeeringCall { - c := &NetworksAddPeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - c.networksaddpeeringrequest = networksaddpeeringrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *NetworksAddPeeringCall) RequestId(requestId string) *NetworksAddPeeringCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *NetworksAddPeeringCall) Fields(s ...googleapi.Field) *NetworksAddPeeringCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *NetworksAddPeeringCall) Context(ctx context.Context) *NetworksAddPeeringCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *NetworksAddPeeringCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksAddPeeringCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.networksaddpeeringrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}/addPeering") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "network": c.network, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.addPeering" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NetworksAddPeeringCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Adds a peering to the specified network.", - // "httpMethod": "POST", - // "id": "compute.networks.addPeering", - // "parameterOrder": [ - // "project", - // "network" - // ], - // "parameters": { - // "network": { - // "description": "Name of the network resource to add peering to.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/networks/{network}/addPeering", - // "request": { - // "$ref": "NetworksAddPeeringRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.networks.delete": - -type NetworksDeleteCall struct { - s *Service - project string - network string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified network. -// For details, see https://cloud.google.com/compute/docs/reference/latest/networks/delete -func (r *NetworksService) Delete(project string, network string) *NetworksDeleteCall { - c := &NetworksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *NetworksDeleteCall) RequestId(requestId string) *NetworksDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *NetworksDeleteCall) Fields(s ...googleapi.Field) *NetworksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *NetworksDeleteCall) Context(ctx context.Context) *NetworksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *NetworksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "network": c.network, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NetworksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified network.", - // "httpMethod": "DELETE", - // "id": "compute.networks.delete", - // "parameterOrder": [ - // "project", - // "network" - // ], - // "parameters": { - // "network": { - // "description": "Name of the network to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/networks/{network}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.networks.get": - -type NetworksGetCall struct { - s *Service - project string - network string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified network. Get a list of available networks -// by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/networks/get -func (r *NetworksService) Get(project string, network string) *NetworksGetCall { - c := &NetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *NetworksGetCall) Fields(s ...googleapi.Field) *NetworksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *NetworksGetCall) IfNoneMatch(entityTag string) *NetworksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *NetworksGetCall) Context(ctx context.Context) *NetworksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *NetworksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "network": c.network, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.get" call. -// Exactly one of *Network or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Network.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *NetworksGetCall) Do(opts ...googleapi.CallOption) (*Network, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Network{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified network. Get a list of available networks by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.networks.get", - // "parameterOrder": [ - // "project", - // "network" - // ], - // "parameters": { - // "network": { - // "description": "Name of the network to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/networks/{network}", - // "response": { - // "$ref": "Network" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.networks.insert": - -type NetworksInsertCall struct { - s *Service - project string - network *Network - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a network in the specified project using the data -// included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/networks/insert -func (r *NetworksService) Insert(project string, network *Network) *NetworksInsertCall { - c := &NetworksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *NetworksInsertCall) RequestId(requestId string) *NetworksInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *NetworksInsertCall) Fields(s ...googleapi.Field) *NetworksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *NetworksInsertCall) Context(ctx context.Context) *NetworksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *NetworksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.network) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NetworksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a network in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.networks.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/networks", - // "request": { - // "$ref": "Network" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.networks.list": - -type NetworksListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of networks available to the specified -// project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/networks/list -func (r *NetworksService) List(project string) *NetworksListCall { - c := &NetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *NetworksListCall) Filter(filter string) *NetworksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *NetworksListCall) MaxResults(maxResults int64) *NetworksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *NetworksListCall) OrderBy(orderBy string) *NetworksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *NetworksListCall) PageToken(pageToken string) *NetworksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *NetworksListCall) Fields(s ...googleapi.Field) *NetworksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *NetworksListCall) IfNoneMatch(entityTag string) *NetworksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *NetworksListCall) Context(ctx context.Context) *NetworksListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *NetworksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.list" call. -// Exactly one of *NetworkList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *NetworkList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NetworksListCall) Do(opts ...googleapi.CallOption) (*NetworkList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &NetworkList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of networks available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.networks.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/networks", - // "response": { - // "$ref": "NetworkList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *NetworksListCall) Pages(ctx context.Context, f func(*NetworkList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.networks.removePeering": - -type NetworksRemovePeeringCall struct { - s *Service - project string - network string - networksremovepeeringrequest *NetworksRemovePeeringRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemovePeering: Removes a peering from the specified network. -func (r *NetworksService) RemovePeering(project string, network string, networksremovepeeringrequest *NetworksRemovePeeringRequest) *NetworksRemovePeeringCall { - c := &NetworksRemovePeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - c.networksremovepeeringrequest = networksremovepeeringrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *NetworksRemovePeeringCall) RequestId(requestId string) *NetworksRemovePeeringCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *NetworksRemovePeeringCall) Fields(s ...googleapi.Field) *NetworksRemovePeeringCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *NetworksRemovePeeringCall) Context(ctx context.Context) *NetworksRemovePeeringCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *NetworksRemovePeeringCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksRemovePeeringCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.networksremovepeeringrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}/removePeering") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "network": c.network, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.removePeering" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NetworksRemovePeeringCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Removes a peering from the specified network.", - // "httpMethod": "POST", - // "id": "compute.networks.removePeering", - // "parameterOrder": [ - // "project", - // "network" - // ], - // "parameters": { - // "network": { - // "description": "Name of the network resource to remove peering from.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/networks/{network}/removePeering", - // "request": { - // "$ref": "NetworksRemovePeeringRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.networks.switchToCustomMode": - -type NetworksSwitchToCustomModeCall struct { - s *Service - project string - network string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SwitchToCustomMode: Switches the network mode from auto subnet mode -// to custom subnet mode. -func (r *NetworksService) SwitchToCustomMode(project string, network string) *NetworksSwitchToCustomModeCall { - c := &NetworksSwitchToCustomModeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *NetworksSwitchToCustomModeCall) RequestId(requestId string) *NetworksSwitchToCustomModeCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *NetworksSwitchToCustomModeCall) Fields(s ...googleapi.Field) *NetworksSwitchToCustomModeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *NetworksSwitchToCustomModeCall) Context(ctx context.Context) *NetworksSwitchToCustomModeCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *NetworksSwitchToCustomModeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksSwitchToCustomModeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}/switchToCustomMode") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "network": c.network, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.switchToCustomMode" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NetworksSwitchToCustomModeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Switches the network mode from auto subnet mode to custom subnet mode.", - // "httpMethod": "POST", - // "id": "compute.networks.switchToCustomMode", - // "parameterOrder": [ - // "project", - // "network" - // ], - // "parameters": { - // "network": { - // "description": "Name of the network to be updated.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/networks/{network}/switchToCustomMode", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.networks.testIamPermissions": - -type NetworksTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *NetworksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *NetworksTestIamPermissionsCall { - c := &NetworksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *NetworksTestIamPermissionsCall) Fields(s ...googleapi.Field) *NetworksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *NetworksTestIamPermissionsCall) Context(ctx context.Context) *NetworksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *NetworksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *NetworksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.networks.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/networks/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.projects.disableXpnHost": - -type ProjectsDisableXpnHostCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DisableXpnHost: Disable this project as a shared VPC host project. -func (r *ProjectsService) DisableXpnHost(project string) *ProjectsDisableXpnHostCall { - c := &ProjectsDisableXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *ProjectsDisableXpnHostCall) RequestId(requestId string) *ProjectsDisableXpnHostCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsDisableXpnHostCall) Fields(s ...googleapi.Field) *ProjectsDisableXpnHostCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsDisableXpnHostCall) Context(ctx context.Context) *ProjectsDisableXpnHostCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsDisableXpnHostCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsDisableXpnHostCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/disableXpnHost") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.disableXpnHost" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsDisableXpnHostCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Disable this project as a shared VPC host project.", - // "httpMethod": "POST", - // "id": "compute.projects.disableXpnHost", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/disableXpnHost", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.projects.disableXpnResource": - -type ProjectsDisableXpnResourceCall struct { - s *Service - project string - projectsdisablexpnresourcerequest *ProjectsDisableXpnResourceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DisableXpnResource: Disable a serivce resource (a.k.a service -// project) associated with this host project. -func (r *ProjectsService) DisableXpnResource(project string, projectsdisablexpnresourcerequest *ProjectsDisableXpnResourceRequest) *ProjectsDisableXpnResourceCall { - c := &ProjectsDisableXpnResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.projectsdisablexpnresourcerequest = projectsdisablexpnresourcerequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *ProjectsDisableXpnResourceCall) RequestId(requestId string) *ProjectsDisableXpnResourceCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsDisableXpnResourceCall) Fields(s ...googleapi.Field) *ProjectsDisableXpnResourceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsDisableXpnResourceCall) Context(ctx context.Context) *ProjectsDisableXpnResourceCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsDisableXpnResourceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsDisableXpnResourceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.projectsdisablexpnresourcerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/disableXpnResource") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.disableXpnResource" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsDisableXpnResourceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Disable a serivce resource (a.k.a service project) associated with this host project.", - // "httpMethod": "POST", - // "id": "compute.projects.disableXpnResource", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/disableXpnResource", - // "request": { - // "$ref": "ProjectsDisableXpnResourceRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.projects.enableXpnHost": - -type ProjectsEnableXpnHostCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// EnableXpnHost: Enable this project as a shared VPC host project. -func (r *ProjectsService) EnableXpnHost(project string) *ProjectsEnableXpnHostCall { - c := &ProjectsEnableXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *ProjectsEnableXpnHostCall) RequestId(requestId string) *ProjectsEnableXpnHostCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsEnableXpnHostCall) Fields(s ...googleapi.Field) *ProjectsEnableXpnHostCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsEnableXpnHostCall) Context(ctx context.Context) *ProjectsEnableXpnHostCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsEnableXpnHostCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsEnableXpnHostCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/enableXpnHost") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.enableXpnHost" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsEnableXpnHostCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Enable this project as a shared VPC host project.", - // "httpMethod": "POST", - // "id": "compute.projects.enableXpnHost", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/enableXpnHost", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.projects.enableXpnResource": - -type ProjectsEnableXpnResourceCall struct { - s *Service - project string - projectsenablexpnresourcerequest *ProjectsEnableXpnResourceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// EnableXpnResource: Enable service resource (a.k.a service project) -// for a host project, so that subnets in the host project can be used -// by instances in the service project. -func (r *ProjectsService) EnableXpnResource(project string, projectsenablexpnresourcerequest *ProjectsEnableXpnResourceRequest) *ProjectsEnableXpnResourceCall { - c := &ProjectsEnableXpnResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.projectsenablexpnresourcerequest = projectsenablexpnresourcerequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *ProjectsEnableXpnResourceCall) RequestId(requestId string) *ProjectsEnableXpnResourceCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsEnableXpnResourceCall) Fields(s ...googleapi.Field) *ProjectsEnableXpnResourceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsEnableXpnResourceCall) Context(ctx context.Context) *ProjectsEnableXpnResourceCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsEnableXpnResourceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsEnableXpnResourceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.projectsenablexpnresourcerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/enableXpnResource") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.enableXpnResource" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsEnableXpnResourceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.", - // "httpMethod": "POST", - // "id": "compute.projects.enableXpnResource", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/enableXpnResource", - // "request": { - // "$ref": "ProjectsEnableXpnResourceRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.projects.get": - -type ProjectsGetCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Project resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/projects/get -func (r *ProjectsService) Get(project string) *ProjectsGetCall { - c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.get" call. -// Exactly one of *Project or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Project.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Project{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified Project resource.", - // "httpMethod": "GET", - // "id": "compute.projects.get", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}", - // "response": { - // "$ref": "Project" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.projects.getXpnHost": - -type ProjectsGetXpnHostCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetXpnHost: Get the shared VPC host project that this project links -// to. May be empty if no link exists. -func (r *ProjectsService) GetXpnHost(project string) *ProjectsGetXpnHostCall { - c := &ProjectsGetXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsGetXpnHostCall) Fields(s ...googleapi.Field) *ProjectsGetXpnHostCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsGetXpnHostCall) IfNoneMatch(entityTag string) *ProjectsGetXpnHostCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsGetXpnHostCall) Context(ctx context.Context) *ProjectsGetXpnHostCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsGetXpnHostCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsGetXpnHostCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/getXpnHost") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.getXpnHost" call. -// Exactly one of *Project or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Project.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsGetXpnHostCall) Do(opts ...googleapi.CallOption) (*Project, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Project{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Get the shared VPC host project that this project links to. May be empty if no link exists.", - // "httpMethod": "GET", - // "id": "compute.projects.getXpnHost", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/getXpnHost", - // "response": { - // "$ref": "Project" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.projects.getXpnResources": - -type ProjectsGetXpnResourcesCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetXpnResources: Get service resources (a.k.a service project) -// associated with this host project. -func (r *ProjectsService) GetXpnResources(project string) *ProjectsGetXpnResourcesCall { - c := &ProjectsGetXpnResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": -func (c *ProjectsGetXpnResourcesCall) Filter(filter string) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": -func (c *ProjectsGetXpnResourcesCall) MaxResults(maxResults int64) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "order_by": -func (c *ProjectsGetXpnResourcesCall) OrderBy(orderBy string) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("order_by", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": -func (c *ProjectsGetXpnResourcesCall) PageToken(pageToken string) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsGetXpnResourcesCall) Fields(s ...googleapi.Field) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsGetXpnResourcesCall) IfNoneMatch(entityTag string) *ProjectsGetXpnResourcesCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsGetXpnResourcesCall) Context(ctx context.Context) *ProjectsGetXpnResourcesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsGetXpnResourcesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsGetXpnResourcesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/getXpnResources") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.getXpnResources" call. -// Exactly one of *ProjectsGetXpnResources or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ProjectsGetXpnResources.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsGetXpnResourcesCall) Do(opts ...googleapi.CallOption) (*ProjectsGetXpnResources, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ProjectsGetXpnResources{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Get service resources (a.k.a service project) associated with this host project.", - // "httpMethod": "GET", - // "id": "compute.projects.getXpnResources", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "order_by": { - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/getXpnResources", - // "response": { - // "$ref": "ProjectsGetXpnResources" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsGetXpnResourcesCall) Pages(ctx context.Context, f func(*ProjectsGetXpnResources) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.projects.listXpnHosts": - -type ProjectsListXpnHostsCall struct { - s *Service - project string - projectslistxpnhostsrequest *ProjectsListXpnHostsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListXpnHosts: List all shared VPC host projects visible to the user -// in an organization. -func (r *ProjectsService) ListXpnHosts(project string, projectslistxpnhostsrequest *ProjectsListXpnHostsRequest) *ProjectsListXpnHostsCall { - c := &ProjectsListXpnHostsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.projectslistxpnhostsrequest = projectslistxpnhostsrequest - return c -} - -// Filter sets the optional parameter "filter": -func (c *ProjectsListXpnHostsCall) Filter(filter string) *ProjectsListXpnHostsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": -func (c *ProjectsListXpnHostsCall) MaxResults(maxResults int64) *ProjectsListXpnHostsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "order_by": -func (c *ProjectsListXpnHostsCall) OrderBy(orderBy string) *ProjectsListXpnHostsCall { - c.urlParams_.Set("order_by", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": -func (c *ProjectsListXpnHostsCall) PageToken(pageToken string) *ProjectsListXpnHostsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsListXpnHostsCall) Fields(s ...googleapi.Field) *ProjectsListXpnHostsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsListXpnHostsCall) Context(ctx context.Context) *ProjectsListXpnHostsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsListXpnHostsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsListXpnHostsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.projectslistxpnhostsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/listXpnHosts") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.listXpnHosts" call. -// Exactly one of *XpnHostList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *XpnHostList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsListXpnHostsCall) Do(opts ...googleapi.CallOption) (*XpnHostList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &XpnHostList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "List all shared VPC host projects visible to the user in an organization.", - // "httpMethod": "POST", - // "id": "compute.projects.listXpnHosts", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "order_by": { - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/listXpnHosts", - // "request": { - // "$ref": "ProjectsListXpnHostsRequest" - // }, - // "response": { - // "$ref": "XpnHostList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsListXpnHostsCall) Pages(ctx context.Context, f func(*XpnHostList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.projects.moveDisk": - -type ProjectsMoveDiskCall struct { - s *Service - project string - diskmoverequest *DiskMoveRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// MoveDisk: Moves a persistent disk from one zone to another. -func (r *ProjectsService) MoveDisk(project string, diskmoverequest *DiskMoveRequest) *ProjectsMoveDiskCall { - c := &ProjectsMoveDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.diskmoverequest = diskmoverequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *ProjectsMoveDiskCall) RequestId(requestId string) *ProjectsMoveDiskCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsMoveDiskCall) Fields(s ...googleapi.Field) *ProjectsMoveDiskCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsMoveDiskCall) Context(ctx context.Context) *ProjectsMoveDiskCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsMoveDiskCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsMoveDiskCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.diskmoverequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/moveDisk") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.moveDisk" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsMoveDiskCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Moves a persistent disk from one zone to another.", - // "httpMethod": "POST", - // "id": "compute.projects.moveDisk", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/moveDisk", - // "request": { - // "$ref": "DiskMoveRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.projects.moveInstance": - -type ProjectsMoveInstanceCall struct { - s *Service - project string - instancemoverequest *InstanceMoveRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// MoveInstance: Moves an instance and its attached persistent disks -// from one zone to another. -func (r *ProjectsService) MoveInstance(project string, instancemoverequest *InstanceMoveRequest) *ProjectsMoveInstanceCall { - c := &ProjectsMoveInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instancemoverequest = instancemoverequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *ProjectsMoveInstanceCall) RequestId(requestId string) *ProjectsMoveInstanceCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsMoveInstanceCall) Fields(s ...googleapi.Field) *ProjectsMoveInstanceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsMoveInstanceCall) Context(ctx context.Context) *ProjectsMoveInstanceCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsMoveInstanceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsMoveInstanceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancemoverequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/moveInstance") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.moveInstance" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsMoveInstanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Moves an instance and its attached persistent disks from one zone to another.", - // "httpMethod": "POST", - // "id": "compute.projects.moveInstance", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/moveInstance", - // "request": { - // "$ref": "InstanceMoveRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.projects.setCommonInstanceMetadata": - -type ProjectsSetCommonInstanceMetadataCall struct { - s *Service - project string - metadata *Metadata - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetCommonInstanceMetadata: Sets metadata common to all instances -// within the specified project using the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/projects/setCommonInstanceMetadata -func (r *ProjectsService) SetCommonInstanceMetadata(project string, metadata *Metadata) *ProjectsSetCommonInstanceMetadataCall { - c := &ProjectsSetCommonInstanceMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.metadata = metadata - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *ProjectsSetCommonInstanceMetadataCall) RequestId(requestId string) *ProjectsSetCommonInstanceMetadataCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsSetCommonInstanceMetadataCall) Fields(s ...googleapi.Field) *ProjectsSetCommonInstanceMetadataCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsSetCommonInstanceMetadataCall) Context(ctx context.Context) *ProjectsSetCommonInstanceMetadataCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsSetCommonInstanceMetadataCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsSetCommonInstanceMetadataCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.metadata) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/setCommonInstanceMetadata") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.setCommonInstanceMetadata" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsSetCommonInstanceMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets metadata common to all instances within the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.projects.setCommonInstanceMetadata", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/setCommonInstanceMetadata", - // "request": { - // "$ref": "Metadata" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.projects.setUsageExportBucket": - -type ProjectsSetUsageExportBucketCall struct { - s *Service - project string - usageexportlocation *UsageExportLocation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetUsageExportBucket: Enables the usage export feature and sets the -// usage export bucket where reports are stored. If you provide an empty -// request body using this method, the usage export feature will be -// disabled. -// For details, see https://cloud.google.com/compute/docs/reference/latest/projects/setUsageExportBucket -func (r *ProjectsService) SetUsageExportBucket(project string, usageexportlocation *UsageExportLocation) *ProjectsSetUsageExportBucketCall { - c := &ProjectsSetUsageExportBucketCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.usageexportlocation = usageexportlocation - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *ProjectsSetUsageExportBucketCall) RequestId(requestId string) *ProjectsSetUsageExportBucketCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsSetUsageExportBucketCall) Fields(s ...googleapi.Field) *ProjectsSetUsageExportBucketCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsSetUsageExportBucketCall) Context(ctx context.Context) *ProjectsSetUsageExportBucketCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsSetUsageExportBucketCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsSetUsageExportBucketCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.usageexportlocation) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/setUsageExportBucket") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.setUsageExportBucket" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsSetUsageExportBucketCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.", - // "httpMethod": "POST", - // "id": "compute.projects.setUsageExportBucket", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/setUsageExportBucket", - // "request": { - // "$ref": "UsageExportLocation" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "compute.regionAutoscalers.delete": - -type RegionAutoscalersDeleteCall struct { - s *Service - project string - region string - autoscaler string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified autoscaler. -func (r *RegionAutoscalersService) Delete(project string, region string, autoscaler string) *RegionAutoscalersDeleteCall { - c := &RegionAutoscalersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.autoscaler = autoscaler - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionAutoscalersDeleteCall) RequestId(requestId string) *RegionAutoscalersDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionAutoscalersDeleteCall) Fields(s ...googleapi.Field) *RegionAutoscalersDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionAutoscalersDeleteCall) Context(ctx context.Context) *RegionAutoscalersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionAutoscalersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers/{autoscaler}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "autoscaler": c.autoscaler, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionAutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified autoscaler.", - // "httpMethod": "DELETE", - // "id": "compute.regionAutoscalers.delete", - // "parameterOrder": [ - // "project", - // "region", - // "autoscaler" - // ], - // "parameters": { - // "autoscaler": { - // "description": "Name of the autoscaler to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/autoscalers/{autoscaler}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionAutoscalers.get": - -type RegionAutoscalersGetCall struct { - s *Service - project string - region string - autoscaler string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified autoscaler. -func (r *RegionAutoscalersService) Get(project string, region string, autoscaler string) *RegionAutoscalersGetCall { - c := &RegionAutoscalersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.autoscaler = autoscaler - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionAutoscalersGetCall) Fields(s ...googleapi.Field) *RegionAutoscalersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionAutoscalersGetCall) IfNoneMatch(entityTag string) *RegionAutoscalersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionAutoscalersGetCall) Context(ctx context.Context) *RegionAutoscalersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionAutoscalersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers/{autoscaler}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "autoscaler": c.autoscaler, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.get" call. -// Exactly one of *Autoscaler or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Autoscaler.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionAutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Autoscaler{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified autoscaler.", - // "httpMethod": "GET", - // "id": "compute.regionAutoscalers.get", - // "parameterOrder": [ - // "project", - // "region", - // "autoscaler" - // ], - // "parameters": { - // "autoscaler": { - // "description": "Name of the autoscaler to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/autoscalers/{autoscaler}", - // "response": { - // "$ref": "Autoscaler" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionAutoscalers.insert": - -type RegionAutoscalersInsertCall struct { - s *Service - project string - region string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an autoscaler in the specified project using the data -// included in the request. -func (r *RegionAutoscalersService) Insert(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersInsertCall { - c := &RegionAutoscalersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.autoscaler = autoscaler - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionAutoscalersInsertCall) RequestId(requestId string) *RegionAutoscalersInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionAutoscalersInsertCall) Fields(s ...googleapi.Field) *RegionAutoscalersInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionAutoscalersInsertCall) Context(ctx context.Context) *RegionAutoscalersInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionAutoscalersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionAutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates an autoscaler in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.regionAutoscalers.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/autoscalers", - // "request": { - // "$ref": "Autoscaler" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionAutoscalers.list": - -type RegionAutoscalersListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of autoscalers contained within the specified -// region. -func (r *RegionAutoscalersService) List(project string, region string) *RegionAutoscalersListCall { - c := &RegionAutoscalersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RegionAutoscalersListCall) Filter(filter string) *RegionAutoscalersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RegionAutoscalersListCall) MaxResults(maxResults int64) *RegionAutoscalersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RegionAutoscalersListCall) OrderBy(orderBy string) *RegionAutoscalersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RegionAutoscalersListCall) PageToken(pageToken string) *RegionAutoscalersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionAutoscalersListCall) Fields(s ...googleapi.Field) *RegionAutoscalersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionAutoscalersListCall) IfNoneMatch(entityTag string) *RegionAutoscalersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionAutoscalersListCall) Context(ctx context.Context) *RegionAutoscalersListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionAutoscalersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.list" call. -// Exactly one of *RegionAutoscalerList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *RegionAutoscalerList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionAutoscalersListCall) Do(opts ...googleapi.CallOption) (*RegionAutoscalerList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RegionAutoscalerList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of autoscalers contained within the specified region.", - // "httpMethod": "GET", - // "id": "compute.regionAutoscalers.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/autoscalers", - // "response": { - // "$ref": "RegionAutoscalerList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionAutoscalersListCall) Pages(ctx context.Context, f func(*RegionAutoscalerList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.regionAutoscalers.patch": - -type RegionAutoscalersPatchCall struct { - s *Service - project string - region string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates an autoscaler in the specified project using the data -// included in the request. This method supports PATCH semantics and -// uses the JSON merge patch format and processing rules. -func (r *RegionAutoscalersService) Patch(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersPatchCall { - c := &RegionAutoscalersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.autoscaler = autoscaler - return c -} - -// Autoscaler sets the optional parameter "autoscaler": Name of the -// autoscaler to patch. -func (c *RegionAutoscalersPatchCall) Autoscaler(autoscaler string) *RegionAutoscalersPatchCall { - c.urlParams_.Set("autoscaler", autoscaler) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and then the request times out. If you make the request again with -// the same request ID, the server can check if original operation with -// the same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionAutoscalersPatchCall) RequestId(requestId string) *RegionAutoscalersPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionAutoscalersPatchCall) Fields(s ...googleapi.Field) *RegionAutoscalersPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionAutoscalersPatchCall) Context(ctx context.Context) *RegionAutoscalersPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionAutoscalersPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionAutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.regionAutoscalers.patch", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "autoscaler": { - // "description": "Name of the autoscaler to patch.", - // "location": "query", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and then the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/autoscalers", - // "request": { - // "$ref": "Autoscaler" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionAutoscalers.testIamPermissions": - -type RegionAutoscalersTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *RegionAutoscalersService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionAutoscalersTestIamPermissionsCall { - c := &RegionAutoscalersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionAutoscalersTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionAutoscalersTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionAutoscalersTestIamPermissionsCall) Context(ctx context.Context) *RegionAutoscalersTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionAutoscalersTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionAutoscalersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.regionAutoscalers.testIamPermissions", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/autoscalers/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionAutoscalers.update": - -type RegionAutoscalersUpdateCall struct { - s *Service - project string - region string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates an autoscaler in the specified project using the data -// included in the request. -func (r *RegionAutoscalersService) Update(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersUpdateCall { - c := &RegionAutoscalersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.autoscaler = autoscaler - return c -} - -// Autoscaler sets the optional parameter "autoscaler": Name of the -// autoscaler to update. -func (c *RegionAutoscalersUpdateCall) Autoscaler(autoscaler string) *RegionAutoscalersUpdateCall { - c.urlParams_.Set("autoscaler", autoscaler) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and then the request times out. If you make the request again with -// the same request ID, the server can check if original operation with -// the same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -func (c *RegionAutoscalersUpdateCall) RequestId(requestId string) *RegionAutoscalersUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionAutoscalersUpdateCall) Fields(s ...googleapi.Field) *RegionAutoscalersUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionAutoscalersUpdateCall) Context(ctx context.Context) *RegionAutoscalersUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionAutoscalersUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionAutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates an autoscaler in the specified project using the data included in the request.", - // "httpMethod": "PUT", - // "id": "compute.regionAutoscalers.update", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "autoscaler": { - // "description": "Name of the autoscaler to update.", - // "location": "query", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and then the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/autoscalers", - // "request": { - // "$ref": "Autoscaler" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionBackendServices.delete": - -type RegionBackendServicesDeleteCall struct { - s *Service - project string - region string - backendService string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified regional BackendService resource. -func (r *RegionBackendServicesService) Delete(project string, region string, backendService string) *RegionBackendServicesDeleteCall { - c := &RegionBackendServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionBackendServicesDeleteCall) RequestId(requestId string) *RegionBackendServicesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionBackendServicesDeleteCall) Fields(s ...googleapi.Field) *RegionBackendServicesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionBackendServicesDeleteCall) Context(ctx context.Context) *RegionBackendServicesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionBackendServicesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionBackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified regional BackendService resource.", - // "httpMethod": "DELETE", - // "id": "compute.regionBackendServices.delete", - // "parameterOrder": [ - // "project", - // "region", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/backendServices/{backendService}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionBackendServices.get": - -type RegionBackendServicesGetCall struct { - s *Service - project string - region string - backendService string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified regional BackendService resource. -func (r *RegionBackendServicesService) Get(project string, region string, backendService string) *RegionBackendServicesGetCall { - c := &RegionBackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionBackendServicesGetCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionBackendServicesGetCall) IfNoneMatch(entityTag string) *RegionBackendServicesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionBackendServicesGetCall) Context(ctx context.Context) *RegionBackendServicesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionBackendServicesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.get" call. -// Exactly one of *BackendService or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *BackendService.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionBackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendService, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &BackendService{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified regional BackendService resource.", - // "httpMethod": "GET", - // "id": "compute.regionBackendServices.get", - // "parameterOrder": [ - // "project", - // "region", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/backendServices/{backendService}", - // "response": { - // "$ref": "BackendService" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionBackendServices.getHealth": - -type RegionBackendServicesGetHealthCall struct { - s *Service - project string - region string - backendService string - resourcegroupreference *ResourceGroupReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetHealth: Gets the most recent health check results for this -// regional BackendService. -func (r *RegionBackendServicesService) GetHealth(project string, region string, backendService string, resourcegroupreference *ResourceGroupReference) *RegionBackendServicesGetHealthCall { - c := &RegionBackendServicesGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - c.resourcegroupreference = resourcegroupreference - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionBackendServicesGetHealthCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetHealthCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionBackendServicesGetHealthCall) Context(ctx context.Context) *RegionBackendServicesGetHealthCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionBackendServicesGetHealthCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesGetHealthCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourcegroupreference) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{backendService}/getHealth") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.getHealth" call. -// Exactly one of *BackendServiceGroupHealth or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *BackendServiceGroupHealth.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionBackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*BackendServiceGroupHealth, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &BackendServiceGroupHealth{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the most recent health check results for this regional BackendService.", - // "httpMethod": "POST", - // "id": "compute.regionBackendServices.getHealth", - // "parameterOrder": [ - // "project", - // "region", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to which the queried instance belongs.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/backendServices/{backendService}/getHealth", - // "request": { - // "$ref": "ResourceGroupReference" - // }, - // "response": { - // "$ref": "BackendServiceGroupHealth" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionBackendServices.insert": - -type RegionBackendServicesInsertCall struct { - s *Service - project string - region string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a regional BackendService resource in the specified -// project using the data included in the request. There are several -// restrictions and guidelines to keep in mind when creating a regional -// backend service. Read Restrictions and Guidelines for more -// information. -func (r *RegionBackendServicesService) Insert(project string, region string, backendservice *BackendService) *RegionBackendServicesInsertCall { - c := &RegionBackendServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendservice = backendservice - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionBackendServicesInsertCall) RequestId(requestId string) *RegionBackendServicesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionBackendServicesInsertCall) Fields(s ...googleapi.Field) *RegionBackendServicesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionBackendServicesInsertCall) Context(ctx context.Context) *RegionBackendServicesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionBackendServicesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionBackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a regional BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a regional backend service. Read Restrictions and Guidelines for more information.", - // "httpMethod": "POST", - // "id": "compute.regionBackendServices.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/backendServices", - // "request": { - // "$ref": "BackendService" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionBackendServices.list": - -type RegionBackendServicesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of regional BackendService resources -// available to the specified project in the given region. -func (r *RegionBackendServicesService) List(project string, region string) *RegionBackendServicesListCall { - c := &RegionBackendServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RegionBackendServicesListCall) Filter(filter string) *RegionBackendServicesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RegionBackendServicesListCall) MaxResults(maxResults int64) *RegionBackendServicesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RegionBackendServicesListCall) OrderBy(orderBy string) *RegionBackendServicesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RegionBackendServicesListCall) PageToken(pageToken string) *RegionBackendServicesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionBackendServicesListCall) Fields(s ...googleapi.Field) *RegionBackendServicesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionBackendServicesListCall) IfNoneMatch(entityTag string) *RegionBackendServicesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionBackendServicesListCall) Context(ctx context.Context) *RegionBackendServicesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionBackendServicesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.list" call. -// Exactly one of *BackendServiceList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *BackendServiceList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionBackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServiceList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &BackendServiceList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of regional BackendService resources available to the specified project in the given region.", - // "httpMethod": "GET", - // "id": "compute.regionBackendServices.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/backendServices", - // "response": { - // "$ref": "BackendServiceList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionBackendServicesListCall) Pages(ctx context.Context, f func(*BackendServiceList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.regionBackendServices.patch": - -type RegionBackendServicesPatchCall struct { - s *Service - project string - region string - backendService string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified regional BackendService resource with -// the data included in the request. There are several restrictions and -// guidelines to keep in mind when updating a backend service. Read -// Restrictions and Guidelines for more information. This method -// supports PATCH semantics and uses the JSON merge patch format and -// processing rules. -func (r *RegionBackendServicesService) Patch(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesPatchCall { - c := &RegionBackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - c.backendservice = backendservice - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionBackendServicesPatchCall) RequestId(requestId string) *RegionBackendServicesPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionBackendServicesPatchCall) Fields(s ...googleapi.Field) *RegionBackendServicesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionBackendServicesPatchCall) Context(ctx context.Context) *RegionBackendServicesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionBackendServicesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionBackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.regionBackendServices.patch", - // "parameterOrder": [ - // "project", - // "region", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/backendServices/{backendService}", - // "request": { - // "$ref": "BackendService" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionBackendServices.testIamPermissions": - -type RegionBackendServicesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *RegionBackendServicesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionBackendServicesTestIamPermissionsCall { - c := &RegionBackendServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionBackendServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionBackendServicesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionBackendServicesTestIamPermissionsCall) Context(ctx context.Context) *RegionBackendServicesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionBackendServicesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionBackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.regionBackendServices.testIamPermissions", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/backendServices/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionBackendServices.update": - -type RegionBackendServicesUpdateCall struct { - s *Service - project string - region string - backendService string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified regional BackendService resource with -// the data included in the request. There are several restrictions and -// guidelines to keep in mind when updating a backend service. Read -// Restrictions and Guidelines for more information. -func (r *RegionBackendServicesService) Update(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesUpdateCall { - c := &RegionBackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - c.backendservice = backendservice - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionBackendServicesUpdateCall) RequestId(requestId string) *RegionBackendServicesUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionBackendServicesUpdateCall) Fields(s ...googleapi.Field) *RegionBackendServicesUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionBackendServicesUpdateCall) Context(ctx context.Context) *RegionBackendServicesUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionBackendServicesUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionBackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information.", - // "httpMethod": "PUT", - // "id": "compute.regionBackendServices.update", - // "parameterOrder": [ - // "project", - // "region", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/backendServices/{backendService}", - // "request": { - // "$ref": "BackendService" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionCommitments.aggregatedList": - -type RegionCommitmentsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of commitments. -func (r *RegionCommitmentsService) AggregatedList(project string) *RegionCommitmentsAggregatedListCall { - c := &RegionCommitmentsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RegionCommitmentsAggregatedListCall) Filter(filter string) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RegionCommitmentsAggregatedListCall) MaxResults(maxResults int64) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RegionCommitmentsAggregatedListCall) OrderBy(orderBy string) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RegionCommitmentsAggregatedListCall) PageToken(pageToken string) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionCommitmentsAggregatedListCall) Fields(s ...googleapi.Field) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionCommitmentsAggregatedListCall) IfNoneMatch(entityTag string) *RegionCommitmentsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionCommitmentsAggregatedListCall) Context(ctx context.Context) *RegionCommitmentsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionCommitmentsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCommitmentsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/commitments") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCommitments.aggregatedList" call. -// Exactly one of *CommitmentAggregatedList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *CommitmentAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionCommitmentsAggregatedListCall) Do(opts ...googleapi.CallOption) (*CommitmentAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &CommitmentAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of commitments.", - // "httpMethod": "GET", - // "id": "compute.regionCommitments.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/commitments", - // "response": { - // "$ref": "CommitmentAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionCommitmentsAggregatedListCall) Pages(ctx context.Context, f func(*CommitmentAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.regionCommitments.get": - -type RegionCommitmentsGetCall struct { - s *Service - project string - region string - commitment string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified commitment resource. Get a list of -// available commitments by making a list() request. -func (r *RegionCommitmentsService) Get(project string, region string, commitment string) *RegionCommitmentsGetCall { - c := &RegionCommitmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.commitment = commitment - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionCommitmentsGetCall) Fields(s ...googleapi.Field) *RegionCommitmentsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionCommitmentsGetCall) IfNoneMatch(entityTag string) *RegionCommitmentsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionCommitmentsGetCall) Context(ctx context.Context) *RegionCommitmentsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionCommitmentsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCommitmentsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/commitments/{commitment}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "commitment": c.commitment, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCommitments.get" call. -// Exactly one of *Commitment or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Commitment.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionCommitmentsGetCall) Do(opts ...googleapi.CallOption) (*Commitment, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Commitment{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified commitment resource. Get a list of available commitments by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.regionCommitments.get", - // "parameterOrder": [ - // "project", - // "region", - // "commitment" - // ], - // "parameters": { - // "commitment": { - // "description": "Name of the commitment to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/commitments/{commitment}", - // "response": { - // "$ref": "Commitment" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionCommitments.insert": - -type RegionCommitmentsInsertCall struct { - s *Service - project string - region string - commitment *Commitment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a commitment in the specified project using the data -// included in the request. -func (r *RegionCommitmentsService) Insert(project string, region string, commitment *Commitment) *RegionCommitmentsInsertCall { - c := &RegionCommitmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.commitment = commitment - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionCommitmentsInsertCall) RequestId(requestId string) *RegionCommitmentsInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionCommitmentsInsertCall) Fields(s ...googleapi.Field) *RegionCommitmentsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionCommitmentsInsertCall) Context(ctx context.Context) *RegionCommitmentsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionCommitmentsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCommitmentsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.commitment) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/commitments") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCommitments.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionCommitmentsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a commitment in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.regionCommitments.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/commitments", - // "request": { - // "$ref": "Commitment" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionCommitments.list": - -type RegionCommitmentsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of commitments contained within the specified -// region. -func (r *RegionCommitmentsService) List(project string, region string) *RegionCommitmentsListCall { - c := &RegionCommitmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RegionCommitmentsListCall) Filter(filter string) *RegionCommitmentsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RegionCommitmentsListCall) MaxResults(maxResults int64) *RegionCommitmentsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RegionCommitmentsListCall) OrderBy(orderBy string) *RegionCommitmentsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RegionCommitmentsListCall) PageToken(pageToken string) *RegionCommitmentsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionCommitmentsListCall) Fields(s ...googleapi.Field) *RegionCommitmentsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionCommitmentsListCall) IfNoneMatch(entityTag string) *RegionCommitmentsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionCommitmentsListCall) Context(ctx context.Context) *RegionCommitmentsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionCommitmentsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCommitmentsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/commitments") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCommitments.list" call. -// Exactly one of *CommitmentList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *CommitmentList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionCommitmentsListCall) Do(opts ...googleapi.CallOption) (*CommitmentList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &CommitmentList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of commitments contained within the specified region.", - // "httpMethod": "GET", - // "id": "compute.regionCommitments.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/commitments", - // "response": { - // "$ref": "CommitmentList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionCommitmentsListCall) Pages(ctx context.Context, f func(*CommitmentList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.regionInstanceGroupManagers.abandonInstances": - -type RegionInstanceGroupManagersAbandonInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersabandoninstancesrequest *RegionInstanceGroupManagersAbandonInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AbandonInstances: Schedules a group action to remove the specified -// instances from the managed instance group. Abandoning an instance -// does not delete the instance, but it does remove the instance from -// any target pools that are applied by the managed instance group. This -// method reduces the targetSize of the managed instance group by the -// number of instances that you abandon. This operation is marked as -// DONE when the action is scheduled even if the instances have not yet -// been removed from the group. You must separately verify the status of -// the abandoning action with the listmanagedinstances method. -// -// If the group is part of a backend service that has enabled connection -// draining, it can take up to 60 seconds after the connection draining -// duration has elapsed before the VM instance is removed or -// deleted. -// -// You can specify a maximum of 1000 instances with this method per -// request. -func (r *RegionInstanceGroupManagersService) AbandonInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersabandoninstancesrequest *RegionInstanceGroupManagersAbandonInstancesRequest) *RegionInstanceGroupManagersAbandonInstancesCall { - c := &RegionInstanceGroupManagersAbandonInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersabandoninstancesrequest = regioninstancegroupmanagersabandoninstancesrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersAbandonInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersAbandonInstancesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersAbandonInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersAbandonInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersAbandonInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersAbandonInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersAbandonInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagersabandoninstancesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/abandonInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.abandonInstances" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersAbandonInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.abandonInstances", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "Name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", - // "request": { - // "$ref": "RegionInstanceGroupManagersAbandonInstancesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.delete": - -type RegionInstanceGroupManagersDeleteCall struct { - s *Service - project string - region string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified managed instance group and all of the -// instances in that group. -func (r *RegionInstanceGroupManagersService) Delete(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersDeleteCall { - c := &RegionInstanceGroupManagersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersDeleteCall) RequestId(requestId string) *RegionInstanceGroupManagersDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersDeleteCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersDeleteCall) Context(ctx context.Context) *RegionInstanceGroupManagersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified managed instance group and all of the instances in that group.", - // "httpMethod": "DELETE", - // "id": "compute.regionInstanceGroupManagers.delete", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "Name of the managed instance group to delete.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.deleteInstances": - -type RegionInstanceGroupManagersDeleteInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersdeleteinstancesrequest *RegionInstanceGroupManagersDeleteInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteInstances: Schedules a group action to delete the specified -// instances in the managed instance group. The instances are also -// removed from any target pools of which they were a member. This -// method reduces the targetSize of the managed instance group by the -// number of instances that you delete. This operation is marked as DONE -// when the action is scheduled even if the instances are still being -// deleted. You must separately verify the status of the deleting action -// with the listmanagedinstances method. -// -// If the group is part of a backend service that has enabled connection -// draining, it can take up to 60 seconds after the connection draining -// duration has elapsed before the VM instance is removed or -// deleted. -// -// You can specify a maximum of 1000 instances with this method per -// request. -func (r *RegionInstanceGroupManagersService) DeleteInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersdeleteinstancesrequest *RegionInstanceGroupManagersDeleteInstancesRequest) *RegionInstanceGroupManagersDeleteInstancesCall { - c := &RegionInstanceGroupManagersDeleteInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersdeleteinstancesrequest = regioninstancegroupmanagersdeleteinstancesrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersDeleteInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersDeleteInstancesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersDeleteInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersDeleteInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersDeleteInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersDeleteInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersDeleteInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagersdeleteinstancesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deleteInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.deleteInstances" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersDeleteInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.deleteInstances", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "Name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", - // "request": { - // "$ref": "RegionInstanceGroupManagersDeleteInstancesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.get": - -type RegionInstanceGroupManagersGetCall struct { - s *Service - project string - region string - instanceGroupManager string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns all of the details about the specified managed instance -// group. -func (r *RegionInstanceGroupManagersService) Get(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersGetCall { - c := &RegionInstanceGroupManagersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersGetCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionInstanceGroupManagersGetCall) IfNoneMatch(entityTag string) *RegionInstanceGroupManagersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersGetCall) Context(ctx context.Context) *RegionInstanceGroupManagersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.get" call. -// Exactly one of *InstanceGroupManager or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstanceGroupManager.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManager, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceGroupManager{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns all of the details about the specified managed instance group.", - // "httpMethod": "GET", - // "id": "compute.regionInstanceGroupManagers.get", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "Name of the managed instance group to return.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - // "response": { - // "$ref": "InstanceGroupManager" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.insert": - -type RegionInstanceGroupManagersInsertCall struct { - s *Service - project string - region string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a managed instance group using the information that -// you specify in the request. After the group is created, it schedules -// an action to create instances in the group using the specified -// instance template. This operation is marked as DONE when the group is -// created even if the instances in the group have not yet been created. -// You must separately verify the status of the individual instances -// with the listmanagedinstances method. -// -// A regional managed instance group can contain up to 2000 instances. -func (r *RegionInstanceGroupManagersService) Insert(project string, region string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersInsertCall { - c := &RegionInstanceGroupManagersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instancegroupmanager = instancegroupmanager - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersInsertCall) RequestId(requestId string) *RegionInstanceGroupManagersInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersInsertCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersInsertCall) Context(ctx context.Context) *RegionInstanceGroupManagersInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA regional managed instance group can contain up to 2000 instances.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers", - // "request": { - // "$ref": "InstanceGroupManager" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.list": - -type RegionInstanceGroupManagersListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of managed instance groups that are -// contained within the specified region. -func (r *RegionInstanceGroupManagersService) List(project string, region string) *RegionInstanceGroupManagersListCall { - c := &RegionInstanceGroupManagersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RegionInstanceGroupManagersListCall) Filter(filter string) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RegionInstanceGroupManagersListCall) MaxResults(maxResults int64) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RegionInstanceGroupManagersListCall) OrderBy(orderBy string) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RegionInstanceGroupManagersListCall) PageToken(pageToken string) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersListCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionInstanceGroupManagersListCall) IfNoneMatch(entityTag string) *RegionInstanceGroupManagersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersListCall) Context(ctx context.Context) *RegionInstanceGroupManagersListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.list" call. -// Exactly one of *RegionInstanceGroupManagerList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *RegionInstanceGroupManagerList.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersListCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupManagerList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RegionInstanceGroupManagerList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of managed instance groups that are contained within the specified region.", - // "httpMethod": "GET", - // "id": "compute.regionInstanceGroupManagers.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers", - // "response": { - // "$ref": "RegionInstanceGroupManagerList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionInstanceGroupManagersListCall) Pages(ctx context.Context, f func(*RegionInstanceGroupManagerList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.regionInstanceGroupManagers.listManagedInstances": - -type RegionInstanceGroupManagersListManagedInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListManagedInstances: Lists the instances in the managed instance -// group and instances that are scheduled to be created. The list -// includes any current actions that the group has scheduled for its -// instances. -func (r *RegionInstanceGroupManagersService) ListManagedInstances(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersListManagedInstancesCall { - c := &RegionInstanceGroupManagersListManagedInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - return c -} - -// Filter sets the optional parameter "filter": -func (c *RegionInstanceGroupManagersListManagedInstancesCall) Filter(filter string) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": -func (c *RegionInstanceGroupManagersListManagedInstancesCall) MaxResults(maxResults int64) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "order_by": -func (c *RegionInstanceGroupManagersListManagedInstancesCall) OrderBy(orderBy string) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("order_by", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": -func (c *RegionInstanceGroupManagersListManagedInstancesCall) PageToken(pageToken string) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersListManagedInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.listManagedInstances" call. -// Exactly one of *RegionInstanceGroupManagersListInstancesResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *RegionInstanceGroupManagersListInstancesResponse.ServerResponse.Heade -// r or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupManagersListInstancesResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RegionInstanceGroupManagersListInstancesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.listManagedInstances", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "filter": { - // "location": "query", - // "type": "string" - // }, - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "order_by": { - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", - // "response": { - // "$ref": "RegionInstanceGroupManagersListInstancesResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) Pages(ctx context.Context, f func(*RegionInstanceGroupManagersListInstancesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.regionInstanceGroupManagers.patch": - -type RegionInstanceGroupManagersPatchCall struct { - s *Service - project string - region string - instanceGroupManager string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a managed instance group using the information that -// you specify in the request. This operation is marked as DONE when the -// group is patched even if the instances in the group are still in the -// process of being patched. You must separately verify the status of -// the individual instances with the listmanagedinstances method. This -// method supports PATCH semantics and uses the JSON merge patch format -// and processing rules. -func (r *RegionInstanceGroupManagersService) Patch(project string, region string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersPatchCall { - c := &RegionInstanceGroupManagersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanager = instancegroupmanager - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersPatchCall) RequestId(requestId string) *RegionInstanceGroupManagersPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersPatchCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersPatchCall) Context(ctx context.Context) *RegionInstanceGroupManagersPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.regionInstanceGroupManagers.patch", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the instance group manager.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - // "request": { - // "$ref": "InstanceGroupManager" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.recreateInstances": - -type RegionInstanceGroupManagersRecreateInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersrecreaterequest *RegionInstanceGroupManagersRecreateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RecreateInstances: Schedules a group action to recreate the specified -// instances in the managed instance group. The instances are deleted -// and recreated using the current instance template for the managed -// instance group. This operation is marked as DONE when the action is -// scheduled even if the instances have not yet been recreated. You must -// separately verify the status of the recreating action with the -// listmanagedinstances method. -// -// If the group is part of a backend service that has enabled connection -// draining, it can take up to 60 seconds after the connection draining -// duration has elapsed before the VM instance is removed or -// deleted. -// -// You can specify a maximum of 1000 instances with this method per -// request. -func (r *RegionInstanceGroupManagersService) RecreateInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersrecreaterequest *RegionInstanceGroupManagersRecreateRequest) *RegionInstanceGroupManagersRecreateInstancesCall { - c := &RegionInstanceGroupManagersRecreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersrecreaterequest = regioninstancegroupmanagersrecreaterequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersRecreateInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersRecreateInstancesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersRecreateInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersRecreateInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersRecreateInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersRecreateInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersRecreateInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagersrecreaterequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.recreateInstances" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.recreateInstances", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "Name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", - // "request": { - // "$ref": "RegionInstanceGroupManagersRecreateRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.resize": - -type RegionInstanceGroupManagersResizeCall struct { - s *Service - project string - region string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Resize: Changes the intended size for the managed instance group. If -// you increase the size, the group schedules actions to create new -// instances using the current instance template. If you decrease the -// size, the group schedules delete actions on one or more instances. -// The resize operation is marked DONE when the resize actions are -// scheduled even if the group has not yet added or deleted any -// instances. You must separately verify the status of the creating or -// deleting actions with the listmanagedinstances method. -// -// If the group is part of a backend service that has enabled connection -// draining, it can take up to 60 seconds after the connection draining -// duration has elapsed before the VM instance is removed or deleted. -func (r *RegionInstanceGroupManagersService) Resize(project string, region string, instanceGroupManager string, size int64) *RegionInstanceGroupManagersResizeCall { - c := &RegionInstanceGroupManagersResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.urlParams_.Set("size", fmt.Sprint(size)) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersResizeCall) RequestId(requestId string) *RegionInstanceGroupManagersResizeCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersResizeCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersResizeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersResizeCall) Context(ctx context.Context) *RegionInstanceGroupManagersResizeCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersResizeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resize") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.resize" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes the intended size for the managed instance group. If you increase the size, the group schedules actions to create new instances using the current instance template. If you decrease the size, the group schedules delete actions on one or more instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.resize", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager", - // "size" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "Name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "size": { - // "description": "Number of instances that should exist in this instance group manager.", - // "format": "int32", - // "location": "query", - // "minimum": "0", - // "required": true, - // "type": "integer" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resize", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.setAutoHealingPolicies": - -type RegionInstanceGroupManagersSetAutoHealingPoliciesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerssetautohealingrequest *RegionInstanceGroupManagersSetAutoHealingRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetAutoHealingPolicies: Modifies the autohealing policy for the -// instances in this managed instance group. -func (r *RegionInstanceGroupManagersService) SetAutoHealingPolicies(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssetautohealingrequest *RegionInstanceGroupManagersSetAutoHealingRequest) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall { - c := &RegionInstanceGroupManagersSetAutoHealingPoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerssetautohealingrequest = regioninstancegroupmanagerssetautohealingrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) RequestId(requestId string) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Context(ctx context.Context) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerssetautohealingrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.setAutoHealingPolicies" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Modifies the autohealing policy for the instances in this managed instance group.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.setAutoHealingPolicies", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "Name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies", - // "request": { - // "$ref": "RegionInstanceGroupManagersSetAutoHealingRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.setInstanceTemplate": - -type RegionInstanceGroupManagersSetInstanceTemplateCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerssettemplaterequest *RegionInstanceGroupManagersSetTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetInstanceTemplate: Sets the instance template to use when creating -// new instances or recreating instances in this group. Existing -// instances are not affected. -func (r *RegionInstanceGroupManagersService) SetInstanceTemplate(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssettemplaterequest *RegionInstanceGroupManagersSetTemplateRequest) *RegionInstanceGroupManagersSetInstanceTemplateCall { - c := &RegionInstanceGroupManagersSetInstanceTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerssettemplaterequest = regioninstancegroupmanagerssettemplaterequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) RequestId(requestId string) *RegionInstanceGroupManagersSetInstanceTemplateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersSetInstanceTemplateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Context(ctx context.Context) *RegionInstanceGroupManagersSetInstanceTemplateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerssettemplaterequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.setInstanceTemplate" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.setInstanceTemplate", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", - // "request": { - // "$ref": "RegionInstanceGroupManagersSetTemplateRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.setTargetPools": - -type RegionInstanceGroupManagersSetTargetPoolsCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerssettargetpoolsrequest *RegionInstanceGroupManagersSetTargetPoolsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetTargetPools: Modifies the target pools to which all new instances -// in this group are assigned. Existing instances in the group are not -// affected. -func (r *RegionInstanceGroupManagersService) SetTargetPools(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssettargetpoolsrequest *RegionInstanceGroupManagersSetTargetPoolsRequest) *RegionInstanceGroupManagersSetTargetPoolsCall { - c := &RegionInstanceGroupManagersSetTargetPoolsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerssettargetpoolsrequest = regioninstancegroupmanagerssettargetpoolsrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) RequestId(requestId string) *RegionInstanceGroupManagersSetTargetPoolsCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersSetTargetPoolsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Context(ctx context.Context) *RegionInstanceGroupManagersSetTargetPoolsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerssettargetpoolsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.setTargetPools" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.setTargetPools", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "Name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", - // "request": { - // "$ref": "RegionInstanceGroupManagersSetTargetPoolsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.testIamPermissions": - -type RegionInstanceGroupManagersTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *RegionInstanceGroupManagersService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionInstanceGroupManagersTestIamPermissionsCall { - c := &RegionInstanceGroupManagersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersTestIamPermissionsCall) Context(ctx context.Context) *RegionInstanceGroupManagersTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.testIamPermissions", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.update": - -type RegionInstanceGroupManagersUpdateCall struct { - s *Service - project string - region string - instanceGroupManager string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a managed instance group using the information that -// you specify in the request. This operation is marked as DONE when the -// group is updated even if the instances in the group have not yet been -// updated. You must separately verify the status of the individual -// instances with the listmanagedinstances method. -func (r *RegionInstanceGroupManagersService) Update(project string, region string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersUpdateCall { - c := &RegionInstanceGroupManagersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanager = instancegroupmanager - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersUpdateCall) RequestId(requestId string) *RegionInstanceGroupManagersUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersUpdateCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersUpdateCall) Context(ctx context.Context) *RegionInstanceGroupManagersUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listmanagedinstances method.", - // "httpMethod": "PUT", - // "id": "compute.regionInstanceGroupManagers.update", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the instance group manager.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - // "request": { - // "$ref": "InstanceGroupManager" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroups.get": - -type RegionInstanceGroupsGetCall struct { - s *Service - project string - region string - instanceGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified instance group resource. -func (r *RegionInstanceGroupsService) Get(project string, region string, instanceGroup string) *RegionInstanceGroupsGetCall { - c := &RegionInstanceGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroup = instanceGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupsGetCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionInstanceGroupsGetCall) IfNoneMatch(entityTag string) *RegionInstanceGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupsGetCall) Context(ctx context.Context) *RegionInstanceGroupsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroups/{instanceGroup}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroup": c.instanceGroup, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroups.get" call. -// Exactly one of *InstanceGroup or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *InstanceGroup.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionInstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroup, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceGroup{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified instance group resource.", - // "httpMethod": "GET", - // "id": "compute.regionInstanceGroups.get", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroup" - // ], - // "parameters": { - // "instanceGroup": { - // "description": "Name of the instance group resource to return.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroups/{instanceGroup}", - // "response": { - // "$ref": "InstanceGroup" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionInstanceGroups.list": - -type RegionInstanceGroupsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of instance group resources contained within -// the specified region. -func (r *RegionInstanceGroupsService) List(project string, region string) *RegionInstanceGroupsListCall { - c := &RegionInstanceGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RegionInstanceGroupsListCall) Filter(filter string) *RegionInstanceGroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RegionInstanceGroupsListCall) MaxResults(maxResults int64) *RegionInstanceGroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RegionInstanceGroupsListCall) OrderBy(orderBy string) *RegionInstanceGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RegionInstanceGroupsListCall) PageToken(pageToken string) *RegionInstanceGroupsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupsListCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionInstanceGroupsListCall) IfNoneMatch(entityTag string) *RegionInstanceGroupsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupsListCall) Context(ctx context.Context) *RegionInstanceGroupsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroups") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroups.list" call. -// Exactly one of *RegionInstanceGroupList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *RegionInstanceGroupList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionInstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RegionInstanceGroupList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of instance group resources contained within the specified region.", - // "httpMethod": "GET", - // "id": "compute.regionInstanceGroups.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroups", - // "response": { - // "$ref": "RegionInstanceGroupList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionInstanceGroupsListCall) Pages(ctx context.Context, f func(*RegionInstanceGroupList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.regionInstanceGroups.listInstances": - -type RegionInstanceGroupsListInstancesCall struct { - s *Service - project string - region string - instanceGroup string - regioninstancegroupslistinstancesrequest *RegionInstanceGroupsListInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListInstances: Lists the instances in the specified instance group -// and displays information about the named ports. Depending on the -// specified options, this method can list all instances or only the -// instances that are running. -func (r *RegionInstanceGroupsService) ListInstances(project string, region string, instanceGroup string, regioninstancegroupslistinstancesrequest *RegionInstanceGroupsListInstancesRequest) *RegionInstanceGroupsListInstancesCall { - c := &RegionInstanceGroupsListInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroup = instanceGroup - c.regioninstancegroupslistinstancesrequest = regioninstancegroupslistinstancesrequest - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RegionInstanceGroupsListInstancesCall) Filter(filter string) *RegionInstanceGroupsListInstancesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RegionInstanceGroupsListInstancesCall) MaxResults(maxResults int64) *RegionInstanceGroupsListInstancesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RegionInstanceGroupsListInstancesCall) OrderBy(orderBy string) *RegionInstanceGroupsListInstancesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RegionInstanceGroupsListInstancesCall) PageToken(pageToken string) *RegionInstanceGroupsListInstancesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupsListInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsListInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupsListInstancesCall) Context(ctx context.Context) *RegionInstanceGroupsListInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupsListInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupslistinstancesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroups/{instanceGroup}/listInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroup": c.instanceGroup, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroups.listInstances" call. -// Exactly one of *RegionInstanceGroupsListInstances or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *RegionInstanceGroupsListInstances.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *RegionInstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupsListInstances, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RegionInstanceGroupsListInstances{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroups.listInstances", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroup" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "instanceGroup": { - // "description": "Name of the regional instance group for which we want to list the instances.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroups/{instanceGroup}/listInstances", - // "request": { - // "$ref": "RegionInstanceGroupsListInstancesRequest" - // }, - // "response": { - // "$ref": "RegionInstanceGroupsListInstances" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionInstanceGroupsListInstancesCall) Pages(ctx context.Context, f func(*RegionInstanceGroupsListInstances) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.regionInstanceGroups.setNamedPorts": - -type RegionInstanceGroupsSetNamedPortsCall struct { - s *Service - project string - region string - instanceGroup string - regioninstancegroupssetnamedportsrequest *RegionInstanceGroupsSetNamedPortsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetNamedPorts: Sets the named ports for the specified regional -// instance group. -func (r *RegionInstanceGroupsService) SetNamedPorts(project string, region string, instanceGroup string, regioninstancegroupssetnamedportsrequest *RegionInstanceGroupsSetNamedPortsRequest) *RegionInstanceGroupsSetNamedPortsCall { - c := &RegionInstanceGroupsSetNamedPortsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroup = instanceGroup - c.regioninstancegroupssetnamedportsrequest = regioninstancegroupssetnamedportsrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupsSetNamedPortsCall) RequestId(requestId string) *RegionInstanceGroupsSetNamedPortsCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupsSetNamedPortsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsSetNamedPortsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupsSetNamedPortsCall) Context(ctx context.Context) *RegionInstanceGroupsSetNamedPortsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupsSetNamedPortsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupssetnamedportsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroups/{instanceGroup}/setNamedPorts") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroup": c.instanceGroup, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroups.setNamedPorts" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the named ports for the specified regional instance group.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroups.setNamedPorts", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroup" - // ], - // "parameters": { - // "instanceGroup": { - // "description": "The name of the regional instance group where the named ports are updated.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroups/{instanceGroup}/setNamedPorts", - // "request": { - // "$ref": "RegionInstanceGroupsSetNamedPortsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroups.testIamPermissions": - -type RegionInstanceGroupsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *RegionInstanceGroupsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionInstanceGroupsTestIamPermissionsCall { - c := &RegionInstanceGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupsTestIamPermissionsCall) Context(ctx context.Context) *RegionInstanceGroupsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroups/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroups.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionInstanceGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroups.testIamPermissions", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroups/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionOperations.delete": - -type RegionOperationsDeleteCall struct { - s *Service - project string - region string - operation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified region-specific Operations resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/regionOperations/delete -func (r *RegionOperationsService) Delete(project string, region string, operation string) *RegionOperationsDeleteCall { - c := &RegionOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.operation = operation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionOperationsDeleteCall) Fields(s ...googleapi.Field) *RegionOperationsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionOperationsDeleteCall) Context(ctx context.Context) *RegionOperationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionOperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "operation": c.operation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionOperations.delete" call. -func (c *RegionOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return err - } - return nil - // { - // "description": "Deletes the specified region-specific Operations resource.", - // "httpMethod": "DELETE", - // "id": "compute.regionOperations.delete", - // "parameterOrder": [ - // "project", - // "region", - // "operation" - // ], - // "parameters": { - // "operation": { - // "description": "Name of the Operations resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/operations/{operation}", - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionOperations.get": - -type RegionOperationsGetCall struct { - s *Service - project string - region string - operation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves the specified region-specific Operations resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/regionOperations/get -func (r *RegionOperationsService) Get(project string, region string, operation string) *RegionOperationsGetCall { - c := &RegionOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.operation = operation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionOperationsGetCall) Fields(s ...googleapi.Field) *RegionOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionOperationsGetCall) IfNoneMatch(entityTag string) *RegionOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionOperationsGetCall) Context(ctx context.Context) *RegionOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "operation": c.operation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionOperations.get" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the specified region-specific Operations resource.", - // "httpMethod": "GET", - // "id": "compute.regionOperations.get", - // "parameterOrder": [ - // "project", - // "region", - // "operation" - // ], - // "parameters": { - // "operation": { - // "description": "Name of the Operations resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/operations/{operation}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionOperations.list": - -type RegionOperationsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of Operation resources contained within the -// specified region. -// For details, see https://cloud.google.com/compute/docs/reference/latest/regionOperations/list -func (r *RegionOperationsService) List(project string, region string) *RegionOperationsListCall { - c := &RegionOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RegionOperationsListCall) Filter(filter string) *RegionOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RegionOperationsListCall) MaxResults(maxResults int64) *RegionOperationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RegionOperationsListCall) OrderBy(orderBy string) *RegionOperationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RegionOperationsListCall) PageToken(pageToken string) *RegionOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionOperationsListCall) Fields(s ...googleapi.Field) *RegionOperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionOperationsListCall) IfNoneMatch(entityTag string) *RegionOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionOperationsListCall) Context(ctx context.Context) *RegionOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/operations") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionOperations.list" call. -// Exactly one of *OperationList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *OperationList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &OperationList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of Operation resources contained within the specified region.", - // "httpMethod": "GET", - // "id": "compute.regionOperations.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/operations", - // "response": { - // "$ref": "OperationList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.regions.get": - -type RegionsGetCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Region resource. Get a list of available -// regions by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/regions/get -func (r *RegionsService) Get(project string, region string) *RegionsGetCall { - c := &RegionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionsGetCall) Fields(s ...googleapi.Field) *RegionsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionsGetCall) IfNoneMatch(entityTag string) *RegionsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionsGetCall) Context(ctx context.Context) *RegionsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regions.get" call. -// Exactly one of *Region or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Region.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *RegionsGetCall) Do(opts ...googleapi.CallOption) (*Region, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Region{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified Region resource. Get a list of available regions by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.regions.get", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}", - // "response": { - // "$ref": "Region" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regions.list": - -type RegionsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of region resources available to the -// specified project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/regions/list -func (r *RegionsService) List(project string) *RegionsListCall { - c := &RegionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RegionsListCall) Filter(filter string) *RegionsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RegionsListCall) MaxResults(maxResults int64) *RegionsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RegionsListCall) OrderBy(orderBy string) *RegionsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RegionsListCall) PageToken(pageToken string) *RegionsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionsListCall) Fields(s ...googleapi.Field) *RegionsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionsListCall) IfNoneMatch(entityTag string) *RegionsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionsListCall) Context(ctx context.Context) *RegionsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regions.list" call. -// Exactly one of *RegionList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *RegionList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionsListCall) Do(opts ...googleapi.CallOption) (*RegionList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RegionList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of region resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.regions.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions", - // "response": { - // "$ref": "RegionList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionsListCall) Pages(ctx context.Context, f func(*RegionList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.routers.aggregatedList": - -type RoutersAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of routers. -func (r *RoutersService) AggregatedList(project string) *RoutersAggregatedListCall { - c := &RoutersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RoutersAggregatedListCall) Filter(filter string) *RoutersAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RoutersAggregatedListCall) MaxResults(maxResults int64) *RoutersAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RoutersAggregatedListCall) OrderBy(orderBy string) *RoutersAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RoutersAggregatedListCall) PageToken(pageToken string) *RoutersAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutersAggregatedListCall) Fields(s ...googleapi.Field) *RoutersAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RoutersAggregatedListCall) IfNoneMatch(entityTag string) *RoutersAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutersAggregatedListCall) Context(ctx context.Context) *RoutersAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutersAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/routers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.aggregatedList" call. -// Exactly one of *RouterAggregatedList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *RouterAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RoutersAggregatedListCall) Do(opts ...googleapi.CallOption) (*RouterAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RouterAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of routers.", - // "httpMethod": "GET", - // "id": "compute.routers.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/routers", - // "response": { - // "$ref": "RouterAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RoutersAggregatedListCall) Pages(ctx context.Context, f func(*RouterAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.routers.delete": - -type RoutersDeleteCall struct { - s *Service - project string - region string - router string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Router resource. -func (r *RoutersService) Delete(project string, region string, router string) *RoutersDeleteCall { - c := &RoutersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RoutersDeleteCall) RequestId(requestId string) *RoutersDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutersDeleteCall) Fields(s ...googleapi.Field) *RoutersDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutersDeleteCall) Context(ctx context.Context) *RoutersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RoutersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified Router resource.", - // "httpMethod": "DELETE", - // "id": "compute.routers.delete", - // "parameterOrder": [ - // "project", - // "region", - // "router" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "router": { - // "description": "Name of the Router resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/routers/{router}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.routers.get": - -type RoutersGetCall struct { - s *Service - project string - region string - router string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Router resource. Get a list of available -// routers by making a list() request. -func (r *RoutersService) Get(project string, region string, router string) *RoutersGetCall { - c := &RoutersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutersGetCall) Fields(s ...googleapi.Field) *RoutersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RoutersGetCall) IfNoneMatch(entityTag string) *RoutersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutersGetCall) Context(ctx context.Context) *RoutersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.get" call. -// Exactly one of *Router or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Router.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *RoutersGetCall) Do(opts ...googleapi.CallOption) (*Router, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Router{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified Router resource. Get a list of available routers by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.routers.get", - // "parameterOrder": [ - // "project", - // "region", - // "router" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "router": { - // "description": "Name of the Router resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/routers/{router}", - // "response": { - // "$ref": "Router" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.routers.getRouterStatus": - -type RoutersGetRouterStatusCall struct { - s *Service - project string - region string - router string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetRouterStatus: Retrieves runtime information of the specified -// router. -func (r *RoutersService) GetRouterStatus(project string, region string, router string) *RoutersGetRouterStatusCall { - c := &RoutersGetRouterStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutersGetRouterStatusCall) Fields(s ...googleapi.Field) *RoutersGetRouterStatusCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RoutersGetRouterStatusCall) IfNoneMatch(entityTag string) *RoutersGetRouterStatusCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutersGetRouterStatusCall) Context(ctx context.Context) *RoutersGetRouterStatusCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutersGetRouterStatusCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersGetRouterStatusCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}/getRouterStatus") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.getRouterStatus" call. -// Exactly one of *RouterStatusResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *RouterStatusResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RoutersGetRouterStatusCall) Do(opts ...googleapi.CallOption) (*RouterStatusResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RouterStatusResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves runtime information of the specified router.", - // "httpMethod": "GET", - // "id": "compute.routers.getRouterStatus", - // "parameterOrder": [ - // "project", - // "region", - // "router" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "router": { - // "description": "Name of the Router resource to query.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/routers/{router}/getRouterStatus", - // "response": { - // "$ref": "RouterStatusResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.routers.insert": - -type RoutersInsertCall struct { - s *Service - project string - region string - router *Router - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a Router resource in the specified project and region -// using the data included in the request. -func (r *RoutersService) Insert(project string, region string, router *Router) *RoutersInsertCall { - c := &RoutersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RoutersInsertCall) RequestId(requestId string) *RoutersInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutersInsertCall) Fields(s ...googleapi.Field) *RoutersInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutersInsertCall) Context(ctx context.Context) *RoutersInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.router) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RoutersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a Router resource in the specified project and region using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.routers.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/routers", - // "request": { - // "$ref": "Router" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.routers.list": - -type RoutersListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of Router resources available to the specified -// project. -func (r *RoutersService) List(project string, region string) *RoutersListCall { - c := &RoutersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RoutersListCall) Filter(filter string) *RoutersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RoutersListCall) MaxResults(maxResults int64) *RoutersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RoutersListCall) OrderBy(orderBy string) *RoutersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RoutersListCall) PageToken(pageToken string) *RoutersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutersListCall) Fields(s ...googleapi.Field) *RoutersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RoutersListCall) IfNoneMatch(entityTag string) *RoutersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutersListCall) Context(ctx context.Context) *RoutersListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.list" call. -// Exactly one of *RouterList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *RouterList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RoutersListCall) Do(opts ...googleapi.CallOption) (*RouterList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RouterList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of Router resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.routers.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/routers", - // "response": { - // "$ref": "RouterList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RoutersListCall) Pages(ctx context.Context, f func(*RouterList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.routers.patch": - -type RoutersPatchCall struct { - s *Service - project string - region string - router string - router2 *Router - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified Router resource with the data included -// in the request. This method supports PATCH semantics and uses JSON -// merge patch format and processing rules. -func (r *RoutersService) Patch(project string, region string, router string, router2 *Router) *RoutersPatchCall { - c := &RoutersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - c.router2 = router2 - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RoutersPatchCall) RequestId(requestId string) *RoutersPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutersPatchCall) Fields(s ...googleapi.Field) *RoutersPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutersPatchCall) Context(ctx context.Context) *RoutersPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutersPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.router2) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RoutersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.routers.patch", - // "parameterOrder": [ - // "project", - // "region", - // "router" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "router": { - // "description": "Name of the Router resource to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/routers/{router}", - // "request": { - // "$ref": "Router" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.routers.preview": - -type RoutersPreviewCall struct { - s *Service - project string - region string - router string - router2 *Router - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Preview: Preview fields auto-generated during router create and -// update operations. Calling this method does NOT create or update the -// router. -func (r *RoutersService) Preview(project string, region string, router string, router2 *Router) *RoutersPreviewCall { - c := &RoutersPreviewCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - c.router2 = router2 - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutersPreviewCall) Fields(s ...googleapi.Field) *RoutersPreviewCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutersPreviewCall) Context(ctx context.Context) *RoutersPreviewCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutersPreviewCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersPreviewCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.router2) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}/preview") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.preview" call. -// Exactly one of *RoutersPreviewResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *RoutersPreviewResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RoutersPreviewCall) Do(opts ...googleapi.CallOption) (*RoutersPreviewResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RoutersPreviewResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.", - // "httpMethod": "POST", - // "id": "compute.routers.preview", - // "parameterOrder": [ - // "project", - // "region", - // "router" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "router": { - // "description": "Name of the Router resource to query.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/routers/{router}/preview", - // "request": { - // "$ref": "Router" - // }, - // "response": { - // "$ref": "RoutersPreviewResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.routers.testIamPermissions": - -type RoutersTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *RoutersService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RoutersTestIamPermissionsCall { - c := &RoutersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutersTestIamPermissionsCall) Fields(s ...googleapi.Field) *RoutersTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutersTestIamPermissionsCall) Context(ctx context.Context) *RoutersTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutersTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RoutersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.routers.testIamPermissions", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/routers/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.routers.update": - -type RoutersUpdateCall struct { - s *Service - project string - region string - router string - router2 *Router - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified Router resource with the data included -// in the request. -func (r *RoutersService) Update(project string, region string, router string, router2 *Router) *RoutersUpdateCall { - c := &RoutersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - c.router2 = router2 - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RoutersUpdateCall) RequestId(requestId string) *RoutersUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutersUpdateCall) Fields(s ...googleapi.Field) *RoutersUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutersUpdateCall) Context(ctx context.Context) *RoutersUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutersUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.router2) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RoutersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the specified Router resource with the data included in the request.", - // "httpMethod": "PUT", - // "id": "compute.routers.update", - // "parameterOrder": [ - // "project", - // "region", - // "router" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "router": { - // "description": "Name of the Router resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/routers/{router}", - // "request": { - // "$ref": "Router" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.routes.delete": - -type RoutesDeleteCall struct { - s *Service - project string - route string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Route resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/routes/delete -func (r *RoutesService) Delete(project string, route string) *RoutesDeleteCall { - c := &RoutesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.route = route - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RoutesDeleteCall) RequestId(requestId string) *RoutesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutesDeleteCall) Fields(s ...googleapi.Field) *RoutesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutesDeleteCall) Context(ctx context.Context) *RoutesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes/{route}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "route": c.route, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routes.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RoutesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified Route resource.", - // "httpMethod": "DELETE", - // "id": "compute.routes.delete", - // "parameterOrder": [ - // "project", - // "route" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "route": { - // "description": "Name of the Route resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/routes/{route}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.routes.get": - -type RoutesGetCall struct { - s *Service - project string - route string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Route resource. Get a list of available -// routes by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/routes/get -func (r *RoutesService) Get(project string, route string) *RoutesGetCall { - c := &RoutesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.route = route - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutesGetCall) Fields(s ...googleapi.Field) *RoutesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RoutesGetCall) IfNoneMatch(entityTag string) *RoutesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutesGetCall) Context(ctx context.Context) *RoutesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes/{route}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "route": c.route, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routes.get" call. -// Exactly one of *Route or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Route.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *RoutesGetCall) Do(opts ...googleapi.CallOption) (*Route, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Route{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified Route resource. Get a list of available routes by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.routes.get", - // "parameterOrder": [ - // "project", - // "route" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "route": { - // "description": "Name of the Route resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/routes/{route}", - // "response": { - // "$ref": "Route" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.routes.insert": - -type RoutesInsertCall struct { - s *Service - project string - route *Route - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a Route resource in the specified project using the -// data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/routes/insert -func (r *RoutesService) Insert(project string, route *Route) *RoutesInsertCall { - c := &RoutesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.route = route - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *RoutesInsertCall) RequestId(requestId string) *RoutesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutesInsertCall) Fields(s ...googleapi.Field) *RoutesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutesInsertCall) Context(ctx context.Context) *RoutesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.route) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routes.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RoutesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a Route resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.routes.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/routes", - // "request": { - // "$ref": "Route" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.routes.list": - -type RoutesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of Route resources available to the -// specified project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/routes/list -func (r *RoutesService) List(project string) *RoutesListCall { - c := &RoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RoutesListCall) Filter(filter string) *RoutesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RoutesListCall) MaxResults(maxResults int64) *RoutesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RoutesListCall) OrderBy(orderBy string) *RoutesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RoutesListCall) PageToken(pageToken string) *RoutesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutesListCall) Fields(s ...googleapi.Field) *RoutesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RoutesListCall) IfNoneMatch(entityTag string) *RoutesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutesListCall) Context(ctx context.Context) *RoutesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routes.list" call. -// Exactly one of *RouteList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *RouteList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RoutesListCall) Do(opts ...googleapi.CallOption) (*RouteList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RouteList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of Route resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.routes.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/routes", - // "response": { - // "$ref": "RouteList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RoutesListCall) Pages(ctx context.Context, f func(*RouteList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.routes.testIamPermissions": - -type RoutesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *RoutesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *RoutesTestIamPermissionsCall { - c := &RoutesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RoutesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutesTestIamPermissionsCall) Context(ctx context.Context) *RoutesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routes.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RoutesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.routes.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/routes/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.snapshots.delete": - -type SnapshotsDeleteCall struct { - s *Service - project string - snapshot string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Snapshot resource. Keep in mind that -// deleting a single snapshot might not necessarily delete all the data -// on that snapshot. If any data on the snapshot that is marked for -// deletion is needed for subsequent snapshots, the data will be moved -// to the next corresponding snapshot. -// -// For more information, see Deleting snaphots. -// For details, see https://cloud.google.com/compute/docs/reference/latest/snapshots/delete -func (r *SnapshotsService) Delete(project string, snapshot string) *SnapshotsDeleteCall { - c := &SnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.snapshot = snapshot - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *SnapshotsDeleteCall) RequestId(requestId string) *SnapshotsDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SnapshotsDeleteCall) Fields(s ...googleapi.Field) *SnapshotsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SnapshotsDeleteCall) Context(ctx context.Context) *SnapshotsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SnapshotsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{snapshot}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "snapshot": c.snapshot, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SnapshotsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.\n\nFor more information, see Deleting snaphots.", - // "httpMethod": "DELETE", - // "id": "compute.snapshots.delete", - // "parameterOrder": [ - // "project", - // "snapshot" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "snapshot": { - // "description": "Name of the Snapshot resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/snapshots/{snapshot}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.snapshots.get": - -type SnapshotsGetCall struct { - s *Service - project string - snapshot string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Snapshot resource. Get a list of available -// snapshots by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/snapshots/get -func (r *SnapshotsService) Get(project string, snapshot string) *SnapshotsGetCall { - c := &SnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.snapshot = snapshot - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SnapshotsGetCall) Fields(s ...googleapi.Field) *SnapshotsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *SnapshotsGetCall) IfNoneMatch(entityTag string) *SnapshotsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SnapshotsGetCall) Context(ctx context.Context) *SnapshotsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SnapshotsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{snapshot}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "snapshot": c.snapshot, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.get" call. -// Exactly one of *Snapshot or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Snapshot.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SnapshotsGetCall) Do(opts ...googleapi.CallOption) (*Snapshot, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Snapshot{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified Snapshot resource. Get a list of available snapshots by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.snapshots.get", - // "parameterOrder": [ - // "project", - // "snapshot" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "snapshot": { - // "description": "Name of the Snapshot resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/snapshots/{snapshot}", - // "response": { - // "$ref": "Snapshot" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.snapshots.list": - -type SnapshotsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of Snapshot resources contained within the -// specified project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/snapshots/list -func (r *SnapshotsService) List(project string) *SnapshotsListCall { - c := &SnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *SnapshotsListCall) Filter(filter string) *SnapshotsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *SnapshotsListCall) MaxResults(maxResults int64) *SnapshotsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *SnapshotsListCall) OrderBy(orderBy string) *SnapshotsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *SnapshotsListCall) PageToken(pageToken string) *SnapshotsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SnapshotsListCall) Fields(s ...googleapi.Field) *SnapshotsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *SnapshotsListCall) IfNoneMatch(entityTag string) *SnapshotsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SnapshotsListCall) Context(ctx context.Context) *SnapshotsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SnapshotsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.list" call. -// Exactly one of *SnapshotList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *SnapshotList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SnapshotsListCall) Do(opts ...googleapi.CallOption) (*SnapshotList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &SnapshotList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of Snapshot resources contained within the specified project.", - // "httpMethod": "GET", - // "id": "compute.snapshots.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/snapshots", - // "response": { - // "$ref": "SnapshotList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *SnapshotsListCall) Pages(ctx context.Context, f func(*SnapshotList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.snapshots.setLabels": - -type SnapshotsSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a snapshot. To learn more about labels, -// read the Labeling Resources documentation. -func (r *SnapshotsService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *SnapshotsSetLabelsCall { - c := &SnapshotsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SnapshotsSetLabelsCall) Fields(s ...googleapi.Field) *SnapshotsSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SnapshotsSetLabelsCall) Context(ctx context.Context) *SnapshotsSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SnapshotsSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetlabelsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{resource}/setLabels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.setLabels" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SnapshotsSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation.", - // "httpMethod": "POST", - // "id": "compute.snapshots.setLabels", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/snapshots/{resource}/setLabels", - // "request": { - // "$ref": "GlobalSetLabelsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.snapshots.testIamPermissions": - -type SnapshotsTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *SnapshotsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *SnapshotsTestIamPermissionsCall { - c := &SnapshotsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SnapshotsTestIamPermissionsCall) Fields(s ...googleapi.Field) *SnapshotsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SnapshotsTestIamPermissionsCall) Context(ctx context.Context) *SnapshotsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SnapshotsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *SnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.snapshots.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/snapshots/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.sslCertificates.delete": - -type SslCertificatesDeleteCall struct { - s *Service - project string - sslCertificate string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified SslCertificate resource. -func (r *SslCertificatesService) Delete(project string, sslCertificate string) *SslCertificatesDeleteCall { - c := &SslCertificatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.sslCertificate = sslCertificate - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *SslCertificatesDeleteCall) RequestId(requestId string) *SslCertificatesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SslCertificatesDeleteCall) Fields(s ...googleapi.Field) *SslCertificatesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SslCertificatesDeleteCall) Context(ctx context.Context) *SslCertificatesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SslCertificatesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertificatesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslCertificates/{sslCertificate}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "sslCertificate": c.sslCertificate, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslCertificates.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SslCertificatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified SslCertificate resource.", - // "httpMethod": "DELETE", - // "id": "compute.sslCertificates.delete", - // "parameterOrder": [ - // "project", - // "sslCertificate" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "sslCertificate": { - // "description": "Name of the SslCertificate resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/sslCertificates/{sslCertificate}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.sslCertificates.get": - -type SslCertificatesGetCall struct { - s *Service - project string - sslCertificate string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified SslCertificate resource. Get a list of -// available SSL certificates by making a list() request. -func (r *SslCertificatesService) Get(project string, sslCertificate string) *SslCertificatesGetCall { - c := &SslCertificatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.sslCertificate = sslCertificate - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SslCertificatesGetCall) Fields(s ...googleapi.Field) *SslCertificatesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *SslCertificatesGetCall) IfNoneMatch(entityTag string) *SslCertificatesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SslCertificatesGetCall) Context(ctx context.Context) *SslCertificatesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SslCertificatesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertificatesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslCertificates/{sslCertificate}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "sslCertificate": c.sslCertificate, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslCertificates.get" call. -// Exactly one of *SslCertificate or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *SslCertificate.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *SslCertificatesGetCall) Do(opts ...googleapi.CallOption) (*SslCertificate, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &SslCertificate{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified SslCertificate resource. Get a list of available SSL certificates by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.sslCertificates.get", - // "parameterOrder": [ - // "project", - // "sslCertificate" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "sslCertificate": { - // "description": "Name of the SslCertificate resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/sslCertificates/{sslCertificate}", - // "response": { - // "$ref": "SslCertificate" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.sslCertificates.insert": - -type SslCertificatesInsertCall struct { - s *Service - project string - sslcertificate *SslCertificate - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a SslCertificate resource in the specified project -// using the data included in the request. -func (r *SslCertificatesService) Insert(project string, sslcertificate *SslCertificate) *SslCertificatesInsertCall { - c := &SslCertificatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.sslcertificate = sslcertificate - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *SslCertificatesInsertCall) RequestId(requestId string) *SslCertificatesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SslCertificatesInsertCall) Fields(s ...googleapi.Field) *SslCertificatesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SslCertificatesInsertCall) Context(ctx context.Context) *SslCertificatesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SslCertificatesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertificatesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.sslcertificate) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslCertificates") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslCertificates.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SslCertificatesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a SslCertificate resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.sslCertificates.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/sslCertificates", - // "request": { - // "$ref": "SslCertificate" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.sslCertificates.list": - -type SslCertificatesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of SslCertificate resources available to the -// specified project. -func (r *SslCertificatesService) List(project string) *SslCertificatesListCall { - c := &SslCertificatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *SslCertificatesListCall) Filter(filter string) *SslCertificatesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *SslCertificatesListCall) MaxResults(maxResults int64) *SslCertificatesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *SslCertificatesListCall) OrderBy(orderBy string) *SslCertificatesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *SslCertificatesListCall) PageToken(pageToken string) *SslCertificatesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SslCertificatesListCall) Fields(s ...googleapi.Field) *SslCertificatesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *SslCertificatesListCall) IfNoneMatch(entityTag string) *SslCertificatesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SslCertificatesListCall) Context(ctx context.Context) *SslCertificatesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SslCertificatesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertificatesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslCertificates") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslCertificates.list" call. -// Exactly one of *SslCertificateList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *SslCertificateList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *SslCertificatesListCall) Do(opts ...googleapi.CallOption) (*SslCertificateList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &SslCertificateList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of SslCertificate resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.sslCertificates.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/sslCertificates", - // "response": { - // "$ref": "SslCertificateList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *SslCertificatesListCall) Pages(ctx context.Context, f func(*SslCertificateList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.sslCertificates.testIamPermissions": - -type SslCertificatesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *SslCertificatesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *SslCertificatesTestIamPermissionsCall { - c := &SslCertificatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SslCertificatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *SslCertificatesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SslCertificatesTestIamPermissionsCall) Context(ctx context.Context) *SslCertificatesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SslCertificatesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertificatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslCertificates/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslCertificates.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *SslCertificatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.sslCertificates.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/sslCertificates/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.subnetworks.aggregatedList": - -type SubnetworksAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of subnetworks. -func (r *SubnetworksService) AggregatedList(project string) *SubnetworksAggregatedListCall { - c := &SubnetworksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *SubnetworksAggregatedListCall) Filter(filter string) *SubnetworksAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *SubnetworksAggregatedListCall) MaxResults(maxResults int64) *SubnetworksAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *SubnetworksAggregatedListCall) OrderBy(orderBy string) *SubnetworksAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *SubnetworksAggregatedListCall) PageToken(pageToken string) *SubnetworksAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SubnetworksAggregatedListCall) Fields(s ...googleapi.Field) *SubnetworksAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *SubnetworksAggregatedListCall) IfNoneMatch(entityTag string) *SubnetworksAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SubnetworksAggregatedListCall) Context(ctx context.Context) *SubnetworksAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SubnetworksAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/subnetworks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.aggregatedList" call. -// Exactly one of *SubnetworkAggregatedList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *SubnetworkAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *SubnetworksAggregatedListCall) Do(opts ...googleapi.CallOption) (*SubnetworkAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &SubnetworkAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of subnetworks.", - // "httpMethod": "GET", - // "id": "compute.subnetworks.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/subnetworks", - // "response": { - // "$ref": "SubnetworkAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *SubnetworksAggregatedListCall) Pages(ctx context.Context, f func(*SubnetworkAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.subnetworks.delete": - -type SubnetworksDeleteCall struct { - s *Service - project string - region string - subnetwork string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified subnetwork. -func (r *SubnetworksService) Delete(project string, region string, subnetwork string) *SubnetworksDeleteCall { - c := &SubnetworksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.subnetwork = subnetwork - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *SubnetworksDeleteCall) RequestId(requestId string) *SubnetworksDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SubnetworksDeleteCall) Fields(s ...googleapi.Field) *SubnetworksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SubnetworksDeleteCall) Context(ctx context.Context) *SubnetworksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SubnetworksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{subnetwork}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "subnetwork": c.subnetwork, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SubnetworksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified subnetwork.", - // "httpMethod": "DELETE", - // "id": "compute.subnetworks.delete", - // "parameterOrder": [ - // "project", - // "region", - // "subnetwork" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "subnetwork": { - // "description": "Name of the Subnetwork resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/subnetworks/{subnetwork}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.subnetworks.expandIpCidrRange": - -type SubnetworksExpandIpCidrRangeCall struct { - s *Service - project string - region string - subnetwork string - subnetworksexpandipcidrrangerequest *SubnetworksExpandIpCidrRangeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ExpandIpCidrRange: Expands the IP CIDR range of the subnetwork to a -// specified value. -func (r *SubnetworksService) ExpandIpCidrRange(project string, region string, subnetwork string, subnetworksexpandipcidrrangerequest *SubnetworksExpandIpCidrRangeRequest) *SubnetworksExpandIpCidrRangeCall { - c := &SubnetworksExpandIpCidrRangeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.subnetwork = subnetwork - c.subnetworksexpandipcidrrangerequest = subnetworksexpandipcidrrangerequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *SubnetworksExpandIpCidrRangeCall) RequestId(requestId string) *SubnetworksExpandIpCidrRangeCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SubnetworksExpandIpCidrRangeCall) Fields(s ...googleapi.Field) *SubnetworksExpandIpCidrRangeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SubnetworksExpandIpCidrRangeCall) Context(ctx context.Context) *SubnetworksExpandIpCidrRangeCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SubnetworksExpandIpCidrRangeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksExpandIpCidrRangeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.subnetworksexpandipcidrrangerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{subnetwork}/expandIpCidrRange") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "subnetwork": c.subnetwork, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.expandIpCidrRange" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SubnetworksExpandIpCidrRangeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Expands the IP CIDR range of the subnetwork to a specified value.", - // "httpMethod": "POST", - // "id": "compute.subnetworks.expandIpCidrRange", - // "parameterOrder": [ - // "project", - // "region", - // "subnetwork" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "subnetwork": { - // "description": "Name of the Subnetwork resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/subnetworks/{subnetwork}/expandIpCidrRange", - // "request": { - // "$ref": "SubnetworksExpandIpCidrRangeRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.subnetworks.get": - -type SubnetworksGetCall struct { - s *Service - project string - region string - subnetwork string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified subnetwork. Get a list of available -// subnetworks list() request. -func (r *SubnetworksService) Get(project string, region string, subnetwork string) *SubnetworksGetCall { - c := &SubnetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.subnetwork = subnetwork - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SubnetworksGetCall) Fields(s ...googleapi.Field) *SubnetworksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *SubnetworksGetCall) IfNoneMatch(entityTag string) *SubnetworksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SubnetworksGetCall) Context(ctx context.Context) *SubnetworksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SubnetworksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{subnetwork}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "subnetwork": c.subnetwork, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.get" call. -// Exactly one of *Subnetwork or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Subnetwork.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SubnetworksGetCall) Do(opts ...googleapi.CallOption) (*Subnetwork, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Subnetwork{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified subnetwork. Get a list of available subnetworks list() request.", - // "httpMethod": "GET", - // "id": "compute.subnetworks.get", - // "parameterOrder": [ - // "project", - // "region", - // "subnetwork" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "subnetwork": { - // "description": "Name of the Subnetwork resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/subnetworks/{subnetwork}", - // "response": { - // "$ref": "Subnetwork" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.subnetworks.getIamPolicy": - -type SubnetworksGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. -func (r *SubnetworksService) GetIamPolicy(project string, region string, resource string) *SubnetworksGetIamPolicyCall { - c := &SubnetworksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SubnetworksGetIamPolicyCall) Fields(s ...googleapi.Field) *SubnetworksGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *SubnetworksGetIamPolicyCall) IfNoneMatch(entityTag string) *SubnetworksGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SubnetworksGetIamPolicyCall) Context(ctx context.Context) *SubnetworksGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SubnetworksGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *SubnetworksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - // "httpMethod": "GET", - // "id": "compute.subnetworks.getIamPolicy", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/subnetworks/{resource}/getIamPolicy", - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.subnetworks.insert": - -type SubnetworksInsertCall struct { - s *Service - project string - region string - subnetwork *Subnetwork - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a subnetwork in the specified project using the data -// included in the request. -func (r *SubnetworksService) Insert(project string, region string, subnetwork *Subnetwork) *SubnetworksInsertCall { - c := &SubnetworksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.subnetwork = subnetwork - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *SubnetworksInsertCall) RequestId(requestId string) *SubnetworksInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SubnetworksInsertCall) Fields(s ...googleapi.Field) *SubnetworksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SubnetworksInsertCall) Context(ctx context.Context) *SubnetworksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SubnetworksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.subnetwork) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SubnetworksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a subnetwork in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.subnetworks.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/subnetworks", - // "request": { - // "$ref": "Subnetwork" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.subnetworks.list": - -type SubnetworksListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of subnetworks available to the specified -// project. -func (r *SubnetworksService) List(project string, region string) *SubnetworksListCall { - c := &SubnetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *SubnetworksListCall) Filter(filter string) *SubnetworksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *SubnetworksListCall) MaxResults(maxResults int64) *SubnetworksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *SubnetworksListCall) OrderBy(orderBy string) *SubnetworksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *SubnetworksListCall) PageToken(pageToken string) *SubnetworksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SubnetworksListCall) Fields(s ...googleapi.Field) *SubnetworksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *SubnetworksListCall) IfNoneMatch(entityTag string) *SubnetworksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SubnetworksListCall) Context(ctx context.Context) *SubnetworksListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SubnetworksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.list" call. -// Exactly one of *SubnetworkList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *SubnetworkList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *SubnetworksListCall) Do(opts ...googleapi.CallOption) (*SubnetworkList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &SubnetworkList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of subnetworks available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.subnetworks.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/subnetworks", - // "response": { - // "$ref": "SubnetworkList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *SubnetworksListCall) Pages(ctx context.Context, f func(*SubnetworkList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.subnetworks.setIamPolicy": - -type SubnetworksSetIamPolicyCall struct { - s *Service - project string - region string - resource string - policy *Policy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. -func (r *SubnetworksService) SetIamPolicy(project string, region string, resource string, policy *Policy) *SubnetworksSetIamPolicyCall { - c := &SubnetworksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.policy = policy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SubnetworksSetIamPolicyCall) Fields(s ...googleapi.Field) *SubnetworksSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SubnetworksSetIamPolicyCall) Context(ctx context.Context) *SubnetworksSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SubnetworksSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{resource}/setIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *SubnetworksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - // "httpMethod": "POST", - // "id": "compute.subnetworks.setIamPolicy", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/subnetworks/{resource}/setIamPolicy", - // "request": { - // "$ref": "Policy" - // }, - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.subnetworks.setPrivateIpGoogleAccess": - -type SubnetworksSetPrivateIpGoogleAccessCall struct { - s *Service - project string - region string - subnetwork string - subnetworkssetprivateipgoogleaccessrequest *SubnetworksSetPrivateIpGoogleAccessRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetPrivateIpGoogleAccess: Set whether VMs in this subnet can access -// Google services without assigning external IP addresses through -// Private Google Access. -func (r *SubnetworksService) SetPrivateIpGoogleAccess(project string, region string, subnetwork string, subnetworkssetprivateipgoogleaccessrequest *SubnetworksSetPrivateIpGoogleAccessRequest) *SubnetworksSetPrivateIpGoogleAccessCall { - c := &SubnetworksSetPrivateIpGoogleAccessCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.subnetwork = subnetwork - c.subnetworkssetprivateipgoogleaccessrequest = subnetworkssetprivateipgoogleaccessrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *SubnetworksSetPrivateIpGoogleAccessCall) RequestId(requestId string) *SubnetworksSetPrivateIpGoogleAccessCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SubnetworksSetPrivateIpGoogleAccessCall) Fields(s ...googleapi.Field) *SubnetworksSetPrivateIpGoogleAccessCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SubnetworksSetPrivateIpGoogleAccessCall) Context(ctx context.Context) *SubnetworksSetPrivateIpGoogleAccessCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SubnetworksSetPrivateIpGoogleAccessCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksSetPrivateIpGoogleAccessCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.subnetworkssetprivateipgoogleaccessrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{subnetwork}/setPrivateIpGoogleAccess") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "subnetwork": c.subnetwork, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.setPrivateIpGoogleAccess" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SubnetworksSetPrivateIpGoogleAccessCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access.", - // "httpMethod": "POST", - // "id": "compute.subnetworks.setPrivateIpGoogleAccess", - // "parameterOrder": [ - // "project", - // "region", - // "subnetwork" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "subnetwork": { - // "description": "Name of the Subnetwork resource.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/subnetworks/{subnetwork}/setPrivateIpGoogleAccess", - // "request": { - // "$ref": "SubnetworksSetPrivateIpGoogleAccessRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.subnetworks.testIamPermissions": - -type SubnetworksTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *SubnetworksService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *SubnetworksTestIamPermissionsCall { - c := &SubnetworksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SubnetworksTestIamPermissionsCall) Fields(s ...googleapi.Field) *SubnetworksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SubnetworksTestIamPermissionsCall) Context(ctx context.Context) *SubnetworksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SubnetworksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *SubnetworksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.subnetworks.testIamPermissions", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/subnetworks/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetHttpProxies.delete": - -type TargetHttpProxiesDeleteCall struct { - s *Service - project string - targetHttpProxy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetHttpProxy resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/delete -func (r *TargetHttpProxiesService) Delete(project string, targetHttpProxy string) *TargetHttpProxiesDeleteCall { - c := &TargetHttpProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpProxy = targetHttpProxy - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetHttpProxiesDeleteCall) RequestId(requestId string) *TargetHttpProxiesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetHttpProxiesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpProxiesDeleteCall) Context(ctx context.Context) *TargetHttpProxiesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpProxiesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies/{targetHttpProxy}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetHttpProxy": c.targetHttpProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetHttpProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified TargetHttpProxy resource.", - // "httpMethod": "DELETE", - // "id": "compute.targetHttpProxies.delete", - // "parameterOrder": [ - // "project", - // "targetHttpProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetHttpProxy": { - // "description": "Name of the TargetHttpProxy resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetHttpProxies/{targetHttpProxy}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetHttpProxies.get": - -type TargetHttpProxiesGetCall struct { - s *Service - project string - targetHttpProxy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetHttpProxy resource. Get a list of -// available target HTTP proxies by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/get -func (r *TargetHttpProxiesService) Get(project string, targetHttpProxy string) *TargetHttpProxiesGetCall { - c := &TargetHttpProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpProxy = targetHttpProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpProxiesGetCall) Fields(s ...googleapi.Field) *TargetHttpProxiesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetHttpProxiesGetCall) IfNoneMatch(entityTag string) *TargetHttpProxiesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpProxiesGetCall) Context(ctx context.Context) *TargetHttpProxiesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpProxiesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies/{targetHttpProxy}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetHttpProxy": c.targetHttpProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.get" call. -// Exactly one of *TargetHttpProxy or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *TargetHttpProxy.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetHttpProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHttpProxy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetHttpProxy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified TargetHttpProxy resource. Get a list of available target HTTP proxies by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.targetHttpProxies.get", - // "parameterOrder": [ - // "project", - // "targetHttpProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "targetHttpProxy": { - // "description": "Name of the TargetHttpProxy resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetHttpProxies/{targetHttpProxy}", - // "response": { - // "$ref": "TargetHttpProxy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetHttpProxies.insert": - -type TargetHttpProxiesInsertCall struct { - s *Service - project string - targethttpproxy *TargetHttpProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetHttpProxy resource in the specified project -// using the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/insert -func (r *TargetHttpProxiesService) Insert(project string, targethttpproxy *TargetHttpProxy) *TargetHttpProxiesInsertCall { - c := &TargetHttpProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targethttpproxy = targethttpproxy - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetHttpProxiesInsertCall) RequestId(requestId string) *TargetHttpProxiesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpProxiesInsertCall) Fields(s ...googleapi.Field) *TargetHttpProxiesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpProxiesInsertCall) Context(ctx context.Context) *TargetHttpProxiesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpProxiesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targethttpproxy) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetHttpProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a TargetHttpProxy resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.targetHttpProxies.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/targetHttpProxies", - // "request": { - // "$ref": "TargetHttpProxy" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetHttpProxies.list": - -type TargetHttpProxiesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of TargetHttpProxy resources available to -// the specified project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/list -func (r *TargetHttpProxiesService) List(project string) *TargetHttpProxiesListCall { - c := &TargetHttpProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *TargetHttpProxiesListCall) Filter(filter string) *TargetHttpProxiesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *TargetHttpProxiesListCall) MaxResults(maxResults int64) *TargetHttpProxiesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *TargetHttpProxiesListCall) OrderBy(orderBy string) *TargetHttpProxiesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *TargetHttpProxiesListCall) PageToken(pageToken string) *TargetHttpProxiesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpProxiesListCall) Fields(s ...googleapi.Field) *TargetHttpProxiesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetHttpProxiesListCall) IfNoneMatch(entityTag string) *TargetHttpProxiesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpProxiesListCall) Context(ctx context.Context) *TargetHttpProxiesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpProxiesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.list" call. -// Exactly one of *TargetHttpProxyList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TargetHttpProxyList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetHttpProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHttpProxyList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetHttpProxyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of TargetHttpProxy resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.targetHttpProxies.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetHttpProxies", - // "response": { - // "$ref": "TargetHttpProxyList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *TargetHttpProxiesListCall) Pages(ctx context.Context, f func(*TargetHttpProxyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.targetHttpProxies.setUrlMap": - -type TargetHttpProxiesSetUrlMapCall struct { - s *Service - project string - targetHttpProxy string - urlmapreference *UrlMapReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetUrlMap: Changes the URL map for TargetHttpProxy. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/setUrlMap -func (r *TargetHttpProxiesService) SetUrlMap(project string, targetHttpProxy string, urlmapreference *UrlMapReference) *TargetHttpProxiesSetUrlMapCall { - c := &TargetHttpProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpProxy = targetHttpProxy - c.urlmapreference = urlmapreference - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetHttpProxiesSetUrlMapCall) RequestId(requestId string) *TargetHttpProxiesSetUrlMapCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpProxiesSetUrlMapCall) Fields(s ...googleapi.Field) *TargetHttpProxiesSetUrlMapCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpProxiesSetUrlMapCall) Context(ctx context.Context) *TargetHttpProxiesSetUrlMapCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpProxiesSetUrlMapCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapreference) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetHttpProxy": c.targetHttpProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.setUrlMap" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetHttpProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes the URL map for TargetHttpProxy.", - // "httpMethod": "POST", - // "id": "compute.targetHttpProxies.setUrlMap", - // "parameterOrder": [ - // "project", - // "targetHttpProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetHttpProxy": { - // "description": "Name of the TargetHttpProxy to set a URL map for.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap", - // "request": { - // "$ref": "UrlMapReference" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetHttpProxies.testIamPermissions": - -type TargetHttpProxiesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *TargetHttpProxiesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetHttpProxiesTestIamPermissionsCall { - c := &TargetHttpProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpProxiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetHttpProxiesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpProxiesTestIamPermissionsCall) Context(ctx context.Context) *TargetHttpProxiesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpProxiesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetHttpProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.targetHttpProxies.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetHttpProxies/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetHttpsProxies.delete": - -type TargetHttpsProxiesDeleteCall struct { - s *Service - project string - targetHttpsProxy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetHttpsProxy resource. -func (r *TargetHttpsProxiesService) Delete(project string, targetHttpsProxy string) *TargetHttpsProxiesDeleteCall { - c := &TargetHttpsProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpsProxy = targetHttpsProxy - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetHttpsProxiesDeleteCall) RequestId(requestId string) *TargetHttpsProxiesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpsProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpsProxiesDeleteCall) Context(ctx context.Context) *TargetHttpsProxiesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpsProxiesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies/{targetHttpsProxy}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetHttpsProxy": c.targetHttpsProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetHttpsProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified TargetHttpsProxy resource.", - // "httpMethod": "DELETE", - // "id": "compute.targetHttpsProxies.delete", - // "parameterOrder": [ - // "project", - // "targetHttpsProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetHttpsProxy": { - // "description": "Name of the TargetHttpsProxy resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetHttpsProxies/{targetHttpsProxy}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetHttpsProxies.get": - -type TargetHttpsProxiesGetCall struct { - s *Service - project string - targetHttpsProxy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetHttpsProxy resource. Get a list of -// available target HTTPS proxies by making a list() request. -func (r *TargetHttpsProxiesService) Get(project string, targetHttpsProxy string) *TargetHttpsProxiesGetCall { - c := &TargetHttpsProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpsProxy = targetHttpsProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpsProxiesGetCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetHttpsProxiesGetCall) IfNoneMatch(entityTag string) *TargetHttpsProxiesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpsProxiesGetCall) Context(ctx context.Context) *TargetHttpsProxiesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpsProxiesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies/{targetHttpsProxy}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetHttpsProxy": c.targetHttpsProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.get" call. -// Exactly one of *TargetHttpsProxy or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TargetHttpsProxy.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetHttpsProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHttpsProxy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetHttpsProxy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified TargetHttpsProxy resource. Get a list of available target HTTPS proxies by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.targetHttpsProxies.get", - // "parameterOrder": [ - // "project", - // "targetHttpsProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "targetHttpsProxy": { - // "description": "Name of the TargetHttpsProxy resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetHttpsProxies/{targetHttpsProxy}", - // "response": { - // "$ref": "TargetHttpsProxy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetHttpsProxies.insert": - -type TargetHttpsProxiesInsertCall struct { - s *Service - project string - targethttpsproxy *TargetHttpsProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetHttpsProxy resource in the specified project -// using the data included in the request. -func (r *TargetHttpsProxiesService) Insert(project string, targethttpsproxy *TargetHttpsProxy) *TargetHttpsProxiesInsertCall { - c := &TargetHttpsProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targethttpsproxy = targethttpsproxy - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetHttpsProxiesInsertCall) RequestId(requestId string) *TargetHttpsProxiesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpsProxiesInsertCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpsProxiesInsertCall) Context(ctx context.Context) *TargetHttpsProxiesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpsProxiesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targethttpsproxy) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetHttpsProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a TargetHttpsProxy resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.targetHttpsProxies.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/targetHttpsProxies", - // "request": { - // "$ref": "TargetHttpsProxy" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetHttpsProxies.list": - -type TargetHttpsProxiesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of TargetHttpsProxy resources available to -// the specified project. -func (r *TargetHttpsProxiesService) List(project string) *TargetHttpsProxiesListCall { - c := &TargetHttpsProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *TargetHttpsProxiesListCall) Filter(filter string) *TargetHttpsProxiesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *TargetHttpsProxiesListCall) MaxResults(maxResults int64) *TargetHttpsProxiesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *TargetHttpsProxiesListCall) OrderBy(orderBy string) *TargetHttpsProxiesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *TargetHttpsProxiesListCall) PageToken(pageToken string) *TargetHttpsProxiesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpsProxiesListCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetHttpsProxiesListCall) IfNoneMatch(entityTag string) *TargetHttpsProxiesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpsProxiesListCall) Context(ctx context.Context) *TargetHttpsProxiesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpsProxiesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.list" call. -// Exactly one of *TargetHttpsProxyList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TargetHttpsProxyList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetHttpsProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHttpsProxyList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetHttpsProxyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.targetHttpsProxies.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetHttpsProxies", - // "response": { - // "$ref": "TargetHttpsProxyList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *TargetHttpsProxiesListCall) Pages(ctx context.Context, f func(*TargetHttpsProxyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.targetHttpsProxies.setSslCertificates": - -type TargetHttpsProxiesSetSslCertificatesCall struct { - s *Service - project string - targetHttpsProxy string - targethttpsproxiessetsslcertificatesrequest *TargetHttpsProxiesSetSslCertificatesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSslCertificates: Replaces SslCertificates for TargetHttpsProxy. -func (r *TargetHttpsProxiesService) SetSslCertificates(project string, targetHttpsProxy string, targethttpsproxiessetsslcertificatesrequest *TargetHttpsProxiesSetSslCertificatesRequest) *TargetHttpsProxiesSetSslCertificatesCall { - c := &TargetHttpsProxiesSetSslCertificatesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpsProxy = targetHttpsProxy - c.targethttpsproxiessetsslcertificatesrequest = targethttpsproxiessetsslcertificatesrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetHttpsProxiesSetSslCertificatesCall) RequestId(requestId string) *TargetHttpsProxiesSetSslCertificatesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpsProxiesSetSslCertificatesCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesSetSslCertificatesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpsProxiesSetSslCertificatesCall) Context(ctx context.Context) *TargetHttpsProxiesSetSslCertificatesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpsProxiesSetSslCertificatesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targethttpsproxiessetsslcertificatesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetHttpsProxy": c.targetHttpsProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.setSslCertificates" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetHttpsProxiesSetSslCertificatesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Replaces SslCertificates for TargetHttpsProxy.", - // "httpMethod": "POST", - // "id": "compute.targetHttpsProxies.setSslCertificates", - // "parameterOrder": [ - // "project", - // "targetHttpsProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetHttpsProxy": { - // "description": "Name of the TargetHttpsProxy resource to set an SslCertificates resource for.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates", - // "request": { - // "$ref": "TargetHttpsProxiesSetSslCertificatesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetHttpsProxies.setUrlMap": - -type TargetHttpsProxiesSetUrlMapCall struct { - s *Service - project string - targetHttpsProxy string - urlmapreference *UrlMapReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetUrlMap: Changes the URL map for TargetHttpsProxy. -func (r *TargetHttpsProxiesService) SetUrlMap(project string, targetHttpsProxy string, urlmapreference *UrlMapReference) *TargetHttpsProxiesSetUrlMapCall { - c := &TargetHttpsProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpsProxy = targetHttpsProxy - c.urlmapreference = urlmapreference - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetHttpsProxiesSetUrlMapCall) RequestId(requestId string) *TargetHttpsProxiesSetUrlMapCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpsProxiesSetUrlMapCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesSetUrlMapCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpsProxiesSetUrlMapCall) Context(ctx context.Context) *TargetHttpsProxiesSetUrlMapCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpsProxiesSetUrlMapCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapreference) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetHttpsProxy": c.targetHttpsProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.setUrlMap" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetHttpsProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes the URL map for TargetHttpsProxy.", - // "httpMethod": "POST", - // "id": "compute.targetHttpsProxies.setUrlMap", - // "parameterOrder": [ - // "project", - // "targetHttpsProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetHttpsProxy": { - // "description": "Name of the TargetHttpsProxy resource whose URL map is to be set.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap", - // "request": { - // "$ref": "UrlMapReference" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetHttpsProxies.testIamPermissions": - -type TargetHttpsProxiesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *TargetHttpsProxiesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetHttpsProxiesTestIamPermissionsCall { - c := &TargetHttpsProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpsProxiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpsProxiesTestIamPermissionsCall) Context(ctx context.Context) *TargetHttpsProxiesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpsProxiesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetHttpsProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.targetHttpsProxies.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetHttpsProxies/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetInstances.aggregatedList": - -type TargetInstancesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of target instances. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/aggregatedList -func (r *TargetInstancesService) AggregatedList(project string) *TargetInstancesAggregatedListCall { - c := &TargetInstancesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *TargetInstancesAggregatedListCall) Filter(filter string) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *TargetInstancesAggregatedListCall) MaxResults(maxResults int64) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *TargetInstancesAggregatedListCall) OrderBy(orderBy string) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *TargetInstancesAggregatedListCall) PageToken(pageToken string) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetInstancesAggregatedListCall) Fields(s ...googleapi.Field) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetInstancesAggregatedListCall) IfNoneMatch(entityTag string) *TargetInstancesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetInstancesAggregatedListCall) Context(ctx context.Context) *TargetInstancesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetInstancesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetInstancesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/targetInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetInstances.aggregatedList" call. -// Exactly one of *TargetInstanceAggregatedList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *TargetInstanceAggregatedList.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetInstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetInstanceAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetInstanceAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of target instances.", - // "httpMethod": "GET", - // "id": "compute.targetInstances.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/targetInstances", - // "response": { - // "$ref": "TargetInstanceAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *TargetInstancesAggregatedListCall) Pages(ctx context.Context, f func(*TargetInstanceAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.targetInstances.delete": - -type TargetInstancesDeleteCall struct { - s *Service - project string - zone string - targetInstance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetInstance resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/delete -func (r *TargetInstancesService) Delete(project string, zone string, targetInstance string) *TargetInstancesDeleteCall { - c := &TargetInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.targetInstance = targetInstance - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetInstancesDeleteCall) RequestId(requestId string) *TargetInstancesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetInstancesDeleteCall) Fields(s ...googleapi.Field) *TargetInstancesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetInstancesDeleteCall) Context(ctx context.Context) *TargetInstancesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetInstancesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetInstancesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances/{targetInstance}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "targetInstance": c.targetInstance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetInstances.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified TargetInstance resource.", - // "httpMethod": "DELETE", - // "id": "compute.targetInstances.delete", - // "parameterOrder": [ - // "project", - // "zone", - // "targetInstance" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetInstance": { - // "description": "Name of the TargetInstance resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/targetInstances/{targetInstance}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetInstances.get": - -type TargetInstancesGetCall struct { - s *Service - project string - zone string - targetInstance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetInstance resource. Get a list of -// available target instances by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/get -func (r *TargetInstancesService) Get(project string, zone string, targetInstance string) *TargetInstancesGetCall { - c := &TargetInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.targetInstance = targetInstance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetInstancesGetCall) Fields(s ...googleapi.Field) *TargetInstancesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetInstancesGetCall) IfNoneMatch(entityTag string) *TargetInstancesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetInstancesGetCall) Context(ctx context.Context) *TargetInstancesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetInstancesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetInstancesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances/{targetInstance}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "targetInstance": c.targetInstance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetInstances.get" call. -// Exactly one of *TargetInstance or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *TargetInstance.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetInstancesGetCall) Do(opts ...googleapi.CallOption) (*TargetInstance, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetInstance{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified TargetInstance resource. Get a list of available target instances by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.targetInstances.get", - // "parameterOrder": [ - // "project", - // "zone", - // "targetInstance" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "targetInstance": { - // "description": "Name of the TargetInstance resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/targetInstances/{targetInstance}", - // "response": { - // "$ref": "TargetInstance" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetInstances.insert": - -type TargetInstancesInsertCall struct { - s *Service - project string - zone string - targetinstance *TargetInstance - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetInstance resource in the specified project -// and zone using the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/insert -func (r *TargetInstancesService) Insert(project string, zone string, targetinstance *TargetInstance) *TargetInstancesInsertCall { - c := &TargetInstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.targetinstance = targetinstance - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetInstancesInsertCall) RequestId(requestId string) *TargetInstancesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetInstancesInsertCall) Fields(s ...googleapi.Field) *TargetInstancesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetInstancesInsertCall) Context(ctx context.Context) *TargetInstancesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetInstancesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetInstancesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetinstance) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetInstances.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetInstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a TargetInstance resource in the specified project and zone using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.targetInstances.insert", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/targetInstances", - // "request": { - // "$ref": "TargetInstance" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetInstances.list": - -type TargetInstancesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of TargetInstance resources available to the -// specified project and zone. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/list -func (r *TargetInstancesService) List(project string, zone string) *TargetInstancesListCall { - c := &TargetInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *TargetInstancesListCall) Filter(filter string) *TargetInstancesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *TargetInstancesListCall) MaxResults(maxResults int64) *TargetInstancesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *TargetInstancesListCall) OrderBy(orderBy string) *TargetInstancesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *TargetInstancesListCall) PageToken(pageToken string) *TargetInstancesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetInstancesListCall) Fields(s ...googleapi.Field) *TargetInstancesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetInstancesListCall) IfNoneMatch(entityTag string) *TargetInstancesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetInstancesListCall) Context(ctx context.Context) *TargetInstancesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetInstancesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetInstancesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetInstances.list" call. -// Exactly one of *TargetInstanceList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TargetInstanceList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetInstancesListCall) Do(opts ...googleapi.CallOption) (*TargetInstanceList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetInstanceList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of TargetInstance resources available to the specified project and zone.", - // "httpMethod": "GET", - // "id": "compute.targetInstances.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/targetInstances", - // "response": { - // "$ref": "TargetInstanceList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *TargetInstancesListCall) Pages(ctx context.Context, f func(*TargetInstanceList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.targetInstances.testIamPermissions": - -type TargetInstancesTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *TargetInstancesService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetInstancesTestIamPermissionsCall { - c := &TargetInstancesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetInstancesTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetInstancesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetInstancesTestIamPermissionsCall) Context(ctx context.Context) *TargetInstancesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetInstancesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetInstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetInstances.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetInstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.targetInstances.testIamPermissions", - // "parameterOrder": [ - // "project", - // "zone", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/targetInstances/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetPools.addHealthCheck": - -type TargetPoolsAddHealthCheckCall struct { - s *Service - project string - region string - targetPool string - targetpoolsaddhealthcheckrequest *TargetPoolsAddHealthCheckRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddHealthCheck: Adds health check URLs to a target pool. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/addHealthCheck -func (r *TargetPoolsService) AddHealthCheck(project string, region string, targetPool string, targetpoolsaddhealthcheckrequest *TargetPoolsAddHealthCheckRequest) *TargetPoolsAddHealthCheckCall { - c := &TargetPoolsAddHealthCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.targetpoolsaddhealthcheckrequest = targetpoolsaddhealthcheckrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetPoolsAddHealthCheckCall) RequestId(requestId string) *TargetPoolsAddHealthCheckCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsAddHealthCheckCall) Fields(s ...googleapi.Field) *TargetPoolsAddHealthCheckCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsAddHealthCheckCall) Context(ctx context.Context) *TargetPoolsAddHealthCheckCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsAddHealthCheckCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsAddHealthCheckCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsaddhealthcheckrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.addHealthCheck" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetPoolsAddHealthCheckCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Adds health check URLs to a target pool.", - // "httpMethod": "POST", - // "id": "compute.targetPools.addHealthCheck", - // "parameterOrder": [ - // "project", - // "region", - // "targetPool" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetPool": { - // "description": "Name of the target pool to add a health check to.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck", - // "request": { - // "$ref": "TargetPoolsAddHealthCheckRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetPools.addInstance": - -type TargetPoolsAddInstanceCall struct { - s *Service - project string - region string - targetPool string - targetpoolsaddinstancerequest *TargetPoolsAddInstanceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddInstance: Adds an instance to a target pool. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/addInstance -func (r *TargetPoolsService) AddInstance(project string, region string, targetPool string, targetpoolsaddinstancerequest *TargetPoolsAddInstanceRequest) *TargetPoolsAddInstanceCall { - c := &TargetPoolsAddInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.targetpoolsaddinstancerequest = targetpoolsaddinstancerequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetPoolsAddInstanceCall) RequestId(requestId string) *TargetPoolsAddInstanceCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsAddInstanceCall) Fields(s ...googleapi.Field) *TargetPoolsAddInstanceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsAddInstanceCall) Context(ctx context.Context) *TargetPoolsAddInstanceCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsAddInstanceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsAddInstanceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsaddinstancerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/addInstance") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.addInstance" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetPoolsAddInstanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Adds an instance to a target pool.", - // "httpMethod": "POST", - // "id": "compute.targetPools.addInstance", - // "parameterOrder": [ - // "project", - // "region", - // "targetPool" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetPool": { - // "description": "Name of the TargetPool resource to add instances to.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools/{targetPool}/addInstance", - // "request": { - // "$ref": "TargetPoolsAddInstanceRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetPools.aggregatedList": - -type TargetPoolsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of target pools. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/aggregatedList -func (r *TargetPoolsService) AggregatedList(project string) *TargetPoolsAggregatedListCall { - c := &TargetPoolsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *TargetPoolsAggregatedListCall) Filter(filter string) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *TargetPoolsAggregatedListCall) MaxResults(maxResults int64) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *TargetPoolsAggregatedListCall) OrderBy(orderBy string) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *TargetPoolsAggregatedListCall) PageToken(pageToken string) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsAggregatedListCall) Fields(s ...googleapi.Field) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetPoolsAggregatedListCall) IfNoneMatch(entityTag string) *TargetPoolsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsAggregatedListCall) Context(ctx context.Context) *TargetPoolsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/targetPools") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.aggregatedList" call. -// Exactly one of *TargetPoolAggregatedList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *TargetPoolAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetPoolsAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetPoolAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetPoolAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of target pools.", - // "httpMethod": "GET", - // "id": "compute.targetPools.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/targetPools", - // "response": { - // "$ref": "TargetPoolAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *TargetPoolsAggregatedListCall) Pages(ctx context.Context, f func(*TargetPoolAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.targetPools.delete": - -type TargetPoolsDeleteCall struct { - s *Service - project string - region string - targetPool string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified target pool. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/delete -func (r *TargetPoolsService) Delete(project string, region string, targetPool string) *TargetPoolsDeleteCall { - c := &TargetPoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetPoolsDeleteCall) RequestId(requestId string) *TargetPoolsDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsDeleteCall) Fields(s ...googleapi.Field) *TargetPoolsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsDeleteCall) Context(ctx context.Context) *TargetPoolsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetPoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified target pool.", - // "httpMethod": "DELETE", - // "id": "compute.targetPools.delete", - // "parameterOrder": [ - // "project", - // "region", - // "targetPool" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetPool": { - // "description": "Name of the TargetPool resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools/{targetPool}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetPools.get": - -type TargetPoolsGetCall struct { - s *Service - project string - region string - targetPool string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified target pool. Get a list of available -// target pools by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/get -func (r *TargetPoolsService) Get(project string, region string, targetPool string) *TargetPoolsGetCall { - c := &TargetPoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsGetCall) Fields(s ...googleapi.Field) *TargetPoolsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetPoolsGetCall) IfNoneMatch(entityTag string) *TargetPoolsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsGetCall) Context(ctx context.Context) *TargetPoolsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.get" call. -// Exactly one of *TargetPool or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *TargetPool.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetPoolsGetCall) Do(opts ...googleapi.CallOption) (*TargetPool, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetPool{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified target pool. Get a list of available target pools by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.targetPools.get", - // "parameterOrder": [ - // "project", - // "region", - // "targetPool" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "targetPool": { - // "description": "Name of the TargetPool resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools/{targetPool}", - // "response": { - // "$ref": "TargetPool" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetPools.getHealth": - -type TargetPoolsGetHealthCall struct { - s *Service - project string - region string - targetPool string - instancereference *InstanceReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetHealth: Gets the most recent health check results for each IP for -// the instance that is referenced by the given target pool. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/getHealth -func (r *TargetPoolsService) GetHealth(project string, region string, targetPool string, instancereference *InstanceReference) *TargetPoolsGetHealthCall { - c := &TargetPoolsGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.instancereference = instancereference - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsGetHealthCall) Fields(s ...googleapi.Field) *TargetPoolsGetHealthCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsGetHealthCall) Context(ctx context.Context) *TargetPoolsGetHealthCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsGetHealthCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsGetHealthCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancereference) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/getHealth") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.getHealth" call. -// Exactly one of *TargetPoolInstanceHealth or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *TargetPoolInstanceHealth.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetPoolsGetHealthCall) Do(opts ...googleapi.CallOption) (*TargetPoolInstanceHealth, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetPoolInstanceHealth{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the most recent health check results for each IP for the instance that is referenced by the given target pool.", - // "httpMethod": "POST", - // "id": "compute.targetPools.getHealth", - // "parameterOrder": [ - // "project", - // "region", - // "targetPool" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "targetPool": { - // "description": "Name of the TargetPool resource to which the queried instance belongs.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools/{targetPool}/getHealth", - // "request": { - // "$ref": "InstanceReference" - // }, - // "response": { - // "$ref": "TargetPoolInstanceHealth" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetPools.insert": - -type TargetPoolsInsertCall struct { - s *Service - project string - region string - targetpool *TargetPool - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a target pool in the specified project and region -// using the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/insert -func (r *TargetPoolsService) Insert(project string, region string, targetpool *TargetPool) *TargetPoolsInsertCall { - c := &TargetPoolsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetpool = targetpool - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetPoolsInsertCall) RequestId(requestId string) *TargetPoolsInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsInsertCall) Fields(s ...googleapi.Field) *TargetPoolsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsInsertCall) Context(ctx context.Context) *TargetPoolsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpool) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetPoolsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a target pool in the specified project and region using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.targetPools.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools", - // "request": { - // "$ref": "TargetPool" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetPools.list": - -type TargetPoolsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of target pools available to the specified -// project and region. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/list -func (r *TargetPoolsService) List(project string, region string) *TargetPoolsListCall { - c := &TargetPoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *TargetPoolsListCall) Filter(filter string) *TargetPoolsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *TargetPoolsListCall) MaxResults(maxResults int64) *TargetPoolsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *TargetPoolsListCall) OrderBy(orderBy string) *TargetPoolsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *TargetPoolsListCall) PageToken(pageToken string) *TargetPoolsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsListCall) Fields(s ...googleapi.Field) *TargetPoolsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetPoolsListCall) IfNoneMatch(entityTag string) *TargetPoolsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsListCall) Context(ctx context.Context) *TargetPoolsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.list" call. -// Exactly one of *TargetPoolList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *TargetPoolList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetPoolsListCall) Do(opts ...googleapi.CallOption) (*TargetPoolList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetPoolList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of target pools available to the specified project and region.", - // "httpMethod": "GET", - // "id": "compute.targetPools.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools", - // "response": { - // "$ref": "TargetPoolList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *TargetPoolsListCall) Pages(ctx context.Context, f func(*TargetPoolList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.targetPools.removeHealthCheck": - -type TargetPoolsRemoveHealthCheckCall struct { - s *Service - project string - region string - targetPool string - targetpoolsremovehealthcheckrequest *TargetPoolsRemoveHealthCheckRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveHealthCheck: Removes health check URL from a target pool. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/removeHealthCheck -func (r *TargetPoolsService) RemoveHealthCheck(project string, region string, targetPool string, targetpoolsremovehealthcheckrequest *TargetPoolsRemoveHealthCheckRequest) *TargetPoolsRemoveHealthCheckCall { - c := &TargetPoolsRemoveHealthCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.targetpoolsremovehealthcheckrequest = targetpoolsremovehealthcheckrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetPoolsRemoveHealthCheckCall) RequestId(requestId string) *TargetPoolsRemoveHealthCheckCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsRemoveHealthCheckCall) Fields(s ...googleapi.Field) *TargetPoolsRemoveHealthCheckCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsRemoveHealthCheckCall) Context(ctx context.Context) *TargetPoolsRemoveHealthCheckCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsRemoveHealthCheckCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsRemoveHealthCheckCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsremovehealthcheckrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.removeHealthCheck" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetPoolsRemoveHealthCheckCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Removes health check URL from a target pool.", - // "httpMethod": "POST", - // "id": "compute.targetPools.removeHealthCheck", - // "parameterOrder": [ - // "project", - // "region", - // "targetPool" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetPool": { - // "description": "Name of the target pool to remove health checks from.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck", - // "request": { - // "$ref": "TargetPoolsRemoveHealthCheckRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetPools.removeInstance": - -type TargetPoolsRemoveInstanceCall struct { - s *Service - project string - region string - targetPool string - targetpoolsremoveinstancerequest *TargetPoolsRemoveInstanceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveInstance: Removes instance URL from a target pool. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/removeInstance -func (r *TargetPoolsService) RemoveInstance(project string, region string, targetPool string, targetpoolsremoveinstancerequest *TargetPoolsRemoveInstanceRequest) *TargetPoolsRemoveInstanceCall { - c := &TargetPoolsRemoveInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.targetpoolsremoveinstancerequest = targetpoolsremoveinstancerequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetPoolsRemoveInstanceCall) RequestId(requestId string) *TargetPoolsRemoveInstanceCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsRemoveInstanceCall) Fields(s ...googleapi.Field) *TargetPoolsRemoveInstanceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsRemoveInstanceCall) Context(ctx context.Context) *TargetPoolsRemoveInstanceCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsRemoveInstanceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsRemoveInstanceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsremoveinstancerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/removeInstance") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.removeInstance" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetPoolsRemoveInstanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Removes instance URL from a target pool.", - // "httpMethod": "POST", - // "id": "compute.targetPools.removeInstance", - // "parameterOrder": [ - // "project", - // "region", - // "targetPool" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetPool": { - // "description": "Name of the TargetPool resource to remove instances from.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools/{targetPool}/removeInstance", - // "request": { - // "$ref": "TargetPoolsRemoveInstanceRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetPools.setBackup": - -type TargetPoolsSetBackupCall struct { - s *Service - project string - region string - targetPool string - targetreference *TargetReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetBackup: Changes a backup target pool's configurations. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/setBackup -func (r *TargetPoolsService) SetBackup(project string, region string, targetPool string, targetreference *TargetReference) *TargetPoolsSetBackupCall { - c := &TargetPoolsSetBackupCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.targetreference = targetreference - return c -} - -// FailoverRatio sets the optional parameter "failoverRatio": New -// failoverRatio value for the target pool. -func (c *TargetPoolsSetBackupCall) FailoverRatio(failoverRatio float64) *TargetPoolsSetBackupCall { - c.urlParams_.Set("failoverRatio", fmt.Sprint(failoverRatio)) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetPoolsSetBackupCall) RequestId(requestId string) *TargetPoolsSetBackupCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsSetBackupCall) Fields(s ...googleapi.Field) *TargetPoolsSetBackupCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsSetBackupCall) Context(ctx context.Context) *TargetPoolsSetBackupCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsSetBackupCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsSetBackupCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/setBackup") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.setBackup" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetPoolsSetBackupCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes a backup target pool's configurations.", - // "httpMethod": "POST", - // "id": "compute.targetPools.setBackup", - // "parameterOrder": [ - // "project", - // "region", - // "targetPool" - // ], - // "parameters": { - // "failoverRatio": { - // "description": "New failoverRatio value for the target pool.", - // "format": "float", - // "location": "query", - // "type": "number" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetPool": { - // "description": "Name of the TargetPool resource to set a backup pool for.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools/{targetPool}/setBackup", - // "request": { - // "$ref": "TargetReference" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetPools.testIamPermissions": - -type TargetPoolsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *TargetPoolsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetPoolsTestIamPermissionsCall { - c := &TargetPoolsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetPoolsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsTestIamPermissionsCall) Context(ctx context.Context) *TargetPoolsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetPoolsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.targetPools.testIamPermissions", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetSslProxies.delete": - -type TargetSslProxiesDeleteCall struct { - s *Service - project string - targetSslProxy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetSslProxy resource. -func (r *TargetSslProxiesService) Delete(project string, targetSslProxy string) *TargetSslProxiesDeleteCall { - c := &TargetSslProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetSslProxy = targetSslProxy - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetSslProxiesDeleteCall) RequestId(requestId string) *TargetSslProxiesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetSslProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetSslProxiesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetSslProxiesDeleteCall) Context(ctx context.Context) *TargetSslProxiesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetSslProxiesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetSslProxy": c.targetSslProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetSslProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified TargetSslProxy resource.", - // "httpMethod": "DELETE", - // "id": "compute.targetSslProxies.delete", - // "parameterOrder": [ - // "project", - // "targetSslProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetSslProxy": { - // "description": "Name of the TargetSslProxy resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetSslProxies/{targetSslProxy}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetSslProxies.get": - -type TargetSslProxiesGetCall struct { - s *Service - project string - targetSslProxy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetSslProxy resource. Get a list of -// available target SSL proxies by making a list() request. -func (r *TargetSslProxiesService) Get(project string, targetSslProxy string) *TargetSslProxiesGetCall { - c := &TargetSslProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetSslProxy = targetSslProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetSslProxiesGetCall) Fields(s ...googleapi.Field) *TargetSslProxiesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetSslProxiesGetCall) IfNoneMatch(entityTag string) *TargetSslProxiesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetSslProxiesGetCall) Context(ctx context.Context) *TargetSslProxiesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetSslProxiesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetSslProxy": c.targetSslProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.get" call. -// Exactly one of *TargetSslProxy or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *TargetSslProxy.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetSslProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetSslProxy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetSslProxy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified TargetSslProxy resource. Get a list of available target SSL proxies by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.targetSslProxies.get", - // "parameterOrder": [ - // "project", - // "targetSslProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "targetSslProxy": { - // "description": "Name of the TargetSslProxy resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetSslProxies/{targetSslProxy}", - // "response": { - // "$ref": "TargetSslProxy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetSslProxies.insert": - -type TargetSslProxiesInsertCall struct { - s *Service - project string - targetsslproxy *TargetSslProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetSslProxy resource in the specified project -// using the data included in the request. -func (r *TargetSslProxiesService) Insert(project string, targetsslproxy *TargetSslProxy) *TargetSslProxiesInsertCall { - c := &TargetSslProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetsslproxy = targetsslproxy - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetSslProxiesInsertCall) RequestId(requestId string) *TargetSslProxiesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetSslProxiesInsertCall) Fields(s ...googleapi.Field) *TargetSslProxiesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetSslProxiesInsertCall) Context(ctx context.Context) *TargetSslProxiesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetSslProxiesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetsslproxy) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetSslProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a TargetSslProxy resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.targetSslProxies.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/targetSslProxies", - // "request": { - // "$ref": "TargetSslProxy" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetSslProxies.list": - -type TargetSslProxiesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of TargetSslProxy resources available to the -// specified project. -func (r *TargetSslProxiesService) List(project string) *TargetSslProxiesListCall { - c := &TargetSslProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *TargetSslProxiesListCall) Filter(filter string) *TargetSslProxiesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *TargetSslProxiesListCall) MaxResults(maxResults int64) *TargetSslProxiesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *TargetSslProxiesListCall) OrderBy(orderBy string) *TargetSslProxiesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *TargetSslProxiesListCall) PageToken(pageToken string) *TargetSslProxiesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetSslProxiesListCall) Fields(s ...googleapi.Field) *TargetSslProxiesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetSslProxiesListCall) IfNoneMatch(entityTag string) *TargetSslProxiesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetSslProxiesListCall) Context(ctx context.Context) *TargetSslProxiesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetSslProxiesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.list" call. -// Exactly one of *TargetSslProxyList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TargetSslProxyList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetSslProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetSslProxyList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetSslProxyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of TargetSslProxy resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.targetSslProxies.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetSslProxies", - // "response": { - // "$ref": "TargetSslProxyList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *TargetSslProxiesListCall) Pages(ctx context.Context, f func(*TargetSslProxyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.targetSslProxies.setBackendService": - -type TargetSslProxiesSetBackendServiceCall struct { - s *Service - project string - targetSslProxy string - targetsslproxiessetbackendservicerequest *TargetSslProxiesSetBackendServiceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetBackendService: Changes the BackendService for TargetSslProxy. -func (r *TargetSslProxiesService) SetBackendService(project string, targetSslProxy string, targetsslproxiessetbackendservicerequest *TargetSslProxiesSetBackendServiceRequest) *TargetSslProxiesSetBackendServiceCall { - c := &TargetSslProxiesSetBackendServiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetSslProxy = targetSslProxy - c.targetsslproxiessetbackendservicerequest = targetsslproxiessetbackendservicerequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetSslProxiesSetBackendServiceCall) RequestId(requestId string) *TargetSslProxiesSetBackendServiceCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetSslProxiesSetBackendServiceCall) Fields(s ...googleapi.Field) *TargetSslProxiesSetBackendServiceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetSslProxiesSetBackendServiceCall) Context(ctx context.Context) *TargetSslProxiesSetBackendServiceCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetSslProxiesSetBackendServiceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesSetBackendServiceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetsslproxiessetbackendservicerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}/setBackendService") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetSslProxy": c.targetSslProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.setBackendService" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetSslProxiesSetBackendServiceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes the BackendService for TargetSslProxy.", - // "httpMethod": "POST", - // "id": "compute.targetSslProxies.setBackendService", - // "parameterOrder": [ - // "project", - // "targetSslProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetSslProxy": { - // "description": "Name of the TargetSslProxy resource whose BackendService resource is to be set.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetSslProxies/{targetSslProxy}/setBackendService", - // "request": { - // "$ref": "TargetSslProxiesSetBackendServiceRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetSslProxies.setProxyHeader": - -type TargetSslProxiesSetProxyHeaderCall struct { - s *Service - project string - targetSslProxy string - targetsslproxiessetproxyheaderrequest *TargetSslProxiesSetProxyHeaderRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetProxyHeader: Changes the ProxyHeaderType for TargetSslProxy. -func (r *TargetSslProxiesService) SetProxyHeader(project string, targetSslProxy string, targetsslproxiessetproxyheaderrequest *TargetSslProxiesSetProxyHeaderRequest) *TargetSslProxiesSetProxyHeaderCall { - c := &TargetSslProxiesSetProxyHeaderCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetSslProxy = targetSslProxy - c.targetsslproxiessetproxyheaderrequest = targetsslproxiessetproxyheaderrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetSslProxiesSetProxyHeaderCall) RequestId(requestId string) *TargetSslProxiesSetProxyHeaderCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetSslProxiesSetProxyHeaderCall) Fields(s ...googleapi.Field) *TargetSslProxiesSetProxyHeaderCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetSslProxiesSetProxyHeaderCall) Context(ctx context.Context) *TargetSslProxiesSetProxyHeaderCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetSslProxiesSetProxyHeaderCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesSetProxyHeaderCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetsslproxiessetproxyheaderrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}/setProxyHeader") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetSslProxy": c.targetSslProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.setProxyHeader" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetSslProxiesSetProxyHeaderCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes the ProxyHeaderType for TargetSslProxy.", - // "httpMethod": "POST", - // "id": "compute.targetSslProxies.setProxyHeader", - // "parameterOrder": [ - // "project", - // "targetSslProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetSslProxy": { - // "description": "Name of the TargetSslProxy resource whose ProxyHeader is to be set.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetSslProxies/{targetSslProxy}/setProxyHeader", - // "request": { - // "$ref": "TargetSslProxiesSetProxyHeaderRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetSslProxies.setSslCertificates": - -type TargetSslProxiesSetSslCertificatesCall struct { - s *Service - project string - targetSslProxy string - targetsslproxiessetsslcertificatesrequest *TargetSslProxiesSetSslCertificatesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSslCertificates: Changes SslCertificates for TargetSslProxy. -func (r *TargetSslProxiesService) SetSslCertificates(project string, targetSslProxy string, targetsslproxiessetsslcertificatesrequest *TargetSslProxiesSetSslCertificatesRequest) *TargetSslProxiesSetSslCertificatesCall { - c := &TargetSslProxiesSetSslCertificatesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetSslProxy = targetSslProxy - c.targetsslproxiessetsslcertificatesrequest = targetsslproxiessetsslcertificatesrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetSslProxiesSetSslCertificatesCall) RequestId(requestId string) *TargetSslProxiesSetSslCertificatesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetSslProxiesSetSslCertificatesCall) Fields(s ...googleapi.Field) *TargetSslProxiesSetSslCertificatesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetSslProxiesSetSslCertificatesCall) Context(ctx context.Context) *TargetSslProxiesSetSslCertificatesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetSslProxiesSetSslCertificatesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetsslproxiessetsslcertificatesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}/setSslCertificates") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetSslProxy": c.targetSslProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.setSslCertificates" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetSslProxiesSetSslCertificatesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes SslCertificates for TargetSslProxy.", - // "httpMethod": "POST", - // "id": "compute.targetSslProxies.setSslCertificates", - // "parameterOrder": [ - // "project", - // "targetSslProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetSslProxy": { - // "description": "Name of the TargetSslProxy resource whose SslCertificate resource is to be set.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetSslProxies/{targetSslProxy}/setSslCertificates", - // "request": { - // "$ref": "TargetSslProxiesSetSslCertificatesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetSslProxies.testIamPermissions": - -type TargetSslProxiesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *TargetSslProxiesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetSslProxiesTestIamPermissionsCall { - c := &TargetSslProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetSslProxiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetSslProxiesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetSslProxiesTestIamPermissionsCall) Context(ctx context.Context) *TargetSslProxiesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetSslProxiesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetSslProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.targetSslProxies.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetSslProxies/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetTcpProxies.delete": - -type TargetTcpProxiesDeleteCall struct { - s *Service - project string - targetTcpProxy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetTcpProxy resource. -func (r *TargetTcpProxiesService) Delete(project string, targetTcpProxy string) *TargetTcpProxiesDeleteCall { - c := &TargetTcpProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetTcpProxy = targetTcpProxy - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetTcpProxiesDeleteCall) RequestId(requestId string) *TargetTcpProxiesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetTcpProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetTcpProxiesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetTcpProxiesDeleteCall) Context(ctx context.Context) *TargetTcpProxiesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetTcpProxiesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies/{targetTcpProxy}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetTcpProxy": c.targetTcpProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetTcpProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified TargetTcpProxy resource.", - // "httpMethod": "DELETE", - // "id": "compute.targetTcpProxies.delete", - // "parameterOrder": [ - // "project", - // "targetTcpProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetTcpProxy": { - // "description": "Name of the TargetTcpProxy resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetTcpProxies/{targetTcpProxy}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetTcpProxies.get": - -type TargetTcpProxiesGetCall struct { - s *Service - project string - targetTcpProxy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetTcpProxy resource. Get a list of -// available target TCP proxies by making a list() request. -func (r *TargetTcpProxiesService) Get(project string, targetTcpProxy string) *TargetTcpProxiesGetCall { - c := &TargetTcpProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetTcpProxy = targetTcpProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetTcpProxiesGetCall) Fields(s ...googleapi.Field) *TargetTcpProxiesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetTcpProxiesGetCall) IfNoneMatch(entityTag string) *TargetTcpProxiesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetTcpProxiesGetCall) Context(ctx context.Context) *TargetTcpProxiesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetTcpProxiesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies/{targetTcpProxy}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetTcpProxy": c.targetTcpProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.get" call. -// Exactly one of *TargetTcpProxy or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *TargetTcpProxy.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetTcpProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetTcpProxy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetTcpProxy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified TargetTcpProxy resource. Get a list of available target TCP proxies by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.targetTcpProxies.get", - // "parameterOrder": [ - // "project", - // "targetTcpProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "targetTcpProxy": { - // "description": "Name of the TargetTcpProxy resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetTcpProxies/{targetTcpProxy}", - // "response": { - // "$ref": "TargetTcpProxy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetTcpProxies.insert": - -type TargetTcpProxiesInsertCall struct { - s *Service - project string - targettcpproxy *TargetTcpProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetTcpProxy resource in the specified project -// using the data included in the request. -func (r *TargetTcpProxiesService) Insert(project string, targettcpproxy *TargetTcpProxy) *TargetTcpProxiesInsertCall { - c := &TargetTcpProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targettcpproxy = targettcpproxy - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetTcpProxiesInsertCall) RequestId(requestId string) *TargetTcpProxiesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetTcpProxiesInsertCall) Fields(s ...googleapi.Field) *TargetTcpProxiesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetTcpProxiesInsertCall) Context(ctx context.Context) *TargetTcpProxiesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetTcpProxiesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targettcpproxy) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetTcpProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a TargetTcpProxy resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.targetTcpProxies.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/targetTcpProxies", - // "request": { - // "$ref": "TargetTcpProxy" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetTcpProxies.list": - -type TargetTcpProxiesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of TargetTcpProxy resources available to the -// specified project. -func (r *TargetTcpProxiesService) List(project string) *TargetTcpProxiesListCall { - c := &TargetTcpProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *TargetTcpProxiesListCall) Filter(filter string) *TargetTcpProxiesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *TargetTcpProxiesListCall) MaxResults(maxResults int64) *TargetTcpProxiesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *TargetTcpProxiesListCall) OrderBy(orderBy string) *TargetTcpProxiesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *TargetTcpProxiesListCall) PageToken(pageToken string) *TargetTcpProxiesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetTcpProxiesListCall) Fields(s ...googleapi.Field) *TargetTcpProxiesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetTcpProxiesListCall) IfNoneMatch(entityTag string) *TargetTcpProxiesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetTcpProxiesListCall) Context(ctx context.Context) *TargetTcpProxiesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetTcpProxiesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.list" call. -// Exactly one of *TargetTcpProxyList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TargetTcpProxyList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetTcpProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetTcpProxyList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetTcpProxyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of TargetTcpProxy resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.targetTcpProxies.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetTcpProxies", - // "response": { - // "$ref": "TargetTcpProxyList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *TargetTcpProxiesListCall) Pages(ctx context.Context, f func(*TargetTcpProxyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.targetTcpProxies.setBackendService": - -type TargetTcpProxiesSetBackendServiceCall struct { - s *Service - project string - targetTcpProxy string - targettcpproxiessetbackendservicerequest *TargetTcpProxiesSetBackendServiceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetBackendService: Changes the BackendService for TargetTcpProxy. -func (r *TargetTcpProxiesService) SetBackendService(project string, targetTcpProxy string, targettcpproxiessetbackendservicerequest *TargetTcpProxiesSetBackendServiceRequest) *TargetTcpProxiesSetBackendServiceCall { - c := &TargetTcpProxiesSetBackendServiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetTcpProxy = targetTcpProxy - c.targettcpproxiessetbackendservicerequest = targettcpproxiessetbackendservicerequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetTcpProxiesSetBackendServiceCall) RequestId(requestId string) *TargetTcpProxiesSetBackendServiceCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetTcpProxiesSetBackendServiceCall) Fields(s ...googleapi.Field) *TargetTcpProxiesSetBackendServiceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetTcpProxiesSetBackendServiceCall) Context(ctx context.Context) *TargetTcpProxiesSetBackendServiceCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetTcpProxiesSetBackendServiceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesSetBackendServiceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targettcpproxiessetbackendservicerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies/{targetTcpProxy}/setBackendService") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetTcpProxy": c.targetTcpProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.setBackendService" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetTcpProxiesSetBackendServiceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes the BackendService for TargetTcpProxy.", - // "httpMethod": "POST", - // "id": "compute.targetTcpProxies.setBackendService", - // "parameterOrder": [ - // "project", - // "targetTcpProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetTcpProxy": { - // "description": "Name of the TargetTcpProxy resource whose BackendService resource is to be set.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetTcpProxies/{targetTcpProxy}/setBackendService", - // "request": { - // "$ref": "TargetTcpProxiesSetBackendServiceRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetTcpProxies.setProxyHeader": - -type TargetTcpProxiesSetProxyHeaderCall struct { - s *Service - project string - targetTcpProxy string - targettcpproxiessetproxyheaderrequest *TargetTcpProxiesSetProxyHeaderRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetProxyHeader: Changes the ProxyHeaderType for TargetTcpProxy. -func (r *TargetTcpProxiesService) SetProxyHeader(project string, targetTcpProxy string, targettcpproxiessetproxyheaderrequest *TargetTcpProxiesSetProxyHeaderRequest) *TargetTcpProxiesSetProxyHeaderCall { - c := &TargetTcpProxiesSetProxyHeaderCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetTcpProxy = targetTcpProxy - c.targettcpproxiessetproxyheaderrequest = targettcpproxiessetproxyheaderrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetTcpProxiesSetProxyHeaderCall) RequestId(requestId string) *TargetTcpProxiesSetProxyHeaderCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetTcpProxiesSetProxyHeaderCall) Fields(s ...googleapi.Field) *TargetTcpProxiesSetProxyHeaderCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetTcpProxiesSetProxyHeaderCall) Context(ctx context.Context) *TargetTcpProxiesSetProxyHeaderCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetTcpProxiesSetProxyHeaderCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesSetProxyHeaderCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targettcpproxiessetproxyheaderrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies/{targetTcpProxy}/setProxyHeader") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetTcpProxy": c.targetTcpProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.setProxyHeader" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetTcpProxiesSetProxyHeaderCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes the ProxyHeaderType for TargetTcpProxy.", - // "httpMethod": "POST", - // "id": "compute.targetTcpProxies.setProxyHeader", - // "parameterOrder": [ - // "project", - // "targetTcpProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetTcpProxy": { - // "description": "Name of the TargetTcpProxy resource whose ProxyHeader is to be set.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetTcpProxies/{targetTcpProxy}/setProxyHeader", - // "request": { - // "$ref": "TargetTcpProxiesSetProxyHeaderRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetVpnGateways.aggregatedList": - -type TargetVpnGatewaysAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of target VPN gateways. -func (r *TargetVpnGatewaysService) AggregatedList(project string) *TargetVpnGatewaysAggregatedListCall { - c := &TargetVpnGatewaysAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *TargetVpnGatewaysAggregatedListCall) Filter(filter string) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *TargetVpnGatewaysAggregatedListCall) MaxResults(maxResults int64) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *TargetVpnGatewaysAggregatedListCall) OrderBy(orderBy string) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *TargetVpnGatewaysAggregatedListCall) PageToken(pageToken string) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetVpnGatewaysAggregatedListCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetVpnGatewaysAggregatedListCall) IfNoneMatch(entityTag string) *TargetVpnGatewaysAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetVpnGatewaysAggregatedListCall) Context(ctx context.Context) *TargetVpnGatewaysAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetVpnGatewaysAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetVpnGatewaysAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/targetVpnGateways") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetVpnGateways.aggregatedList" call. -// Exactly one of *TargetVpnGatewayAggregatedList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *TargetVpnGatewayAggregatedList.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetVpnGatewaysAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetVpnGatewayAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetVpnGatewayAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of target VPN gateways.", - // "httpMethod": "GET", - // "id": "compute.targetVpnGateways.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/targetVpnGateways", - // "response": { - // "$ref": "TargetVpnGatewayAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *TargetVpnGatewaysAggregatedListCall) Pages(ctx context.Context, f func(*TargetVpnGatewayAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.targetVpnGateways.delete": - -type TargetVpnGatewaysDeleteCall struct { - s *Service - project string - region string - targetVpnGateway string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified target VPN gateway. -func (r *TargetVpnGatewaysService) Delete(project string, region string, targetVpnGateway string) *TargetVpnGatewaysDeleteCall { - c := &TargetVpnGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetVpnGateway = targetVpnGateway - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetVpnGatewaysDeleteCall) RequestId(requestId string) *TargetVpnGatewaysDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetVpnGatewaysDeleteCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetVpnGatewaysDeleteCall) Context(ctx context.Context) *TargetVpnGatewaysDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetVpnGatewaysDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetVpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetVpnGateway": c.targetVpnGateway, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetVpnGateways.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetVpnGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified target VPN gateway.", - // "httpMethod": "DELETE", - // "id": "compute.targetVpnGateways.delete", - // "parameterOrder": [ - // "project", - // "region", - // "targetVpnGateway" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "targetVpnGateway": { - // "description": "Name of the target VPN gateway to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetVpnGateways.get": - -type TargetVpnGatewaysGetCall struct { - s *Service - project string - region string - targetVpnGateway string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified target VPN gateway. Get a list of -// available target VPN gateways by making a list() request. -func (r *TargetVpnGatewaysService) Get(project string, region string, targetVpnGateway string) *TargetVpnGatewaysGetCall { - c := &TargetVpnGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetVpnGateway = targetVpnGateway - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetVpnGatewaysGetCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetVpnGatewaysGetCall) IfNoneMatch(entityTag string) *TargetVpnGatewaysGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetVpnGatewaysGetCall) Context(ctx context.Context) *TargetVpnGatewaysGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetVpnGatewaysGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetVpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetVpnGateway": c.targetVpnGateway, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetVpnGateways.get" call. -// Exactly one of *TargetVpnGateway or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TargetVpnGateway.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetVpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*TargetVpnGateway, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetVpnGateway{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified target VPN gateway. Get a list of available target VPN gateways by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.targetVpnGateways.get", - // "parameterOrder": [ - // "project", - // "region", - // "targetVpnGateway" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "targetVpnGateway": { - // "description": "Name of the target VPN gateway to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}", - // "response": { - // "$ref": "TargetVpnGateway" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetVpnGateways.insert": - -type TargetVpnGatewaysInsertCall struct { - s *Service - project string - region string - targetvpngateway *TargetVpnGateway - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a target VPN gateway in the specified project and -// region using the data included in the request. -func (r *TargetVpnGatewaysService) Insert(project string, region string, targetvpngateway *TargetVpnGateway) *TargetVpnGatewaysInsertCall { - c := &TargetVpnGatewaysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetvpngateway = targetvpngateway - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *TargetVpnGatewaysInsertCall) RequestId(requestId string) *TargetVpnGatewaysInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetVpnGatewaysInsertCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetVpnGatewaysInsertCall) Context(ctx context.Context) *TargetVpnGatewaysInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetVpnGatewaysInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetVpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetvpngateway) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetVpnGateways.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetVpnGatewaysInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a target VPN gateway in the specified project and region using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.targetVpnGateways.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetVpnGateways", - // "request": { - // "$ref": "TargetVpnGateway" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetVpnGateways.list": - -type TargetVpnGatewaysListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of target VPN gateways available to the -// specified project and region. -func (r *TargetVpnGatewaysService) List(project string, region string) *TargetVpnGatewaysListCall { - c := &TargetVpnGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *TargetVpnGatewaysListCall) Filter(filter string) *TargetVpnGatewaysListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *TargetVpnGatewaysListCall) MaxResults(maxResults int64) *TargetVpnGatewaysListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *TargetVpnGatewaysListCall) OrderBy(orderBy string) *TargetVpnGatewaysListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *TargetVpnGatewaysListCall) PageToken(pageToken string) *TargetVpnGatewaysListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetVpnGatewaysListCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetVpnGatewaysListCall) IfNoneMatch(entityTag string) *TargetVpnGatewaysListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetVpnGatewaysListCall) Context(ctx context.Context) *TargetVpnGatewaysListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetVpnGatewaysListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetVpnGatewaysListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetVpnGateways.list" call. -// Exactly one of *TargetVpnGatewayList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TargetVpnGatewayList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetVpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*TargetVpnGatewayList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetVpnGatewayList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of target VPN gateways available to the specified project and region.", - // "httpMethod": "GET", - // "id": "compute.targetVpnGateways.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetVpnGateways", - // "response": { - // "$ref": "TargetVpnGatewayList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *TargetVpnGatewaysListCall) Pages(ctx context.Context, f func(*TargetVpnGatewayList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.targetVpnGateways.testIamPermissions": - -type TargetVpnGatewaysTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *TargetVpnGatewaysService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetVpnGatewaysTestIamPermissionsCall { - c := &TargetVpnGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetVpnGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetVpnGatewaysTestIamPermissionsCall) Context(ctx context.Context) *TargetVpnGatewaysTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetVpnGatewaysTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetVpnGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetVpnGateways.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetVpnGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.targetVpnGateways.testIamPermissions", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetVpnGateways/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.urlMaps.delete": - -type UrlMapsDeleteCall struct { - s *Service - project string - urlMap string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified UrlMap resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/delete -func (r *UrlMapsService) Delete(project string, urlMap string) *UrlMapsDeleteCall { - c := &UrlMapsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlMap = urlMap - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *UrlMapsDeleteCall) RequestId(requestId string) *UrlMapsDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *UrlMapsDeleteCall) Fields(s ...googleapi.Field) *UrlMapsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *UrlMapsDeleteCall) Context(ctx context.Context) *UrlMapsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *UrlMapsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "urlMap": c.urlMap, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *UrlMapsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified UrlMap resource.", - // "httpMethod": "DELETE", - // "id": "compute.urlMaps.delete", - // "parameterOrder": [ - // "project", - // "urlMap" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "urlMap": { - // "description": "Name of the UrlMap resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/urlMaps/{urlMap}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.urlMaps.get": - -type UrlMapsGetCall struct { - s *Service - project string - urlMap string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified UrlMap resource. Get a list of available -// URL maps by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/get -func (r *UrlMapsService) Get(project string, urlMap string) *UrlMapsGetCall { - c := &UrlMapsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlMap = urlMap - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *UrlMapsGetCall) Fields(s ...googleapi.Field) *UrlMapsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *UrlMapsGetCall) IfNoneMatch(entityTag string) *UrlMapsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *UrlMapsGetCall) Context(ctx context.Context) *UrlMapsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *UrlMapsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "urlMap": c.urlMap, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.get" call. -// Exactly one of *UrlMap or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *UrlMap.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *UrlMapsGetCall) Do(opts ...googleapi.CallOption) (*UrlMap, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &UrlMap{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified UrlMap resource. Get a list of available URL maps by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.urlMaps.get", - // "parameterOrder": [ - // "project", - // "urlMap" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "urlMap": { - // "description": "Name of the UrlMap resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/urlMaps/{urlMap}", - // "response": { - // "$ref": "UrlMap" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.urlMaps.insert": - -type UrlMapsInsertCall struct { - s *Service - project string - urlmap *UrlMap - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a UrlMap resource in the specified project using the -// data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/insert -func (r *UrlMapsService) Insert(project string, urlmap *UrlMap) *UrlMapsInsertCall { - c := &UrlMapsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlmap = urlmap - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *UrlMapsInsertCall) RequestId(requestId string) *UrlMapsInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *UrlMapsInsertCall) Fields(s ...googleapi.Field) *UrlMapsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *UrlMapsInsertCall) Context(ctx context.Context) *UrlMapsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *UrlMapsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *UrlMapsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a UrlMap resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.urlMaps.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/global/urlMaps", - // "request": { - // "$ref": "UrlMap" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.urlMaps.invalidateCache": - -type UrlMapsInvalidateCacheCall struct { - s *Service - project string - urlMap string - cacheinvalidationrule *CacheInvalidationRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// InvalidateCache: Initiates a cache invalidation operation, -// invalidating the specified path, scoped to the specified UrlMap. -func (r *UrlMapsService) InvalidateCache(project string, urlMap string, cacheinvalidationrule *CacheInvalidationRule) *UrlMapsInvalidateCacheCall { - c := &UrlMapsInvalidateCacheCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlMap = urlMap - c.cacheinvalidationrule = cacheinvalidationrule - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *UrlMapsInvalidateCacheCall) RequestId(requestId string) *UrlMapsInvalidateCacheCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *UrlMapsInvalidateCacheCall) Fields(s ...googleapi.Field) *UrlMapsInvalidateCacheCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *UrlMapsInvalidateCacheCall) Context(ctx context.Context) *UrlMapsInvalidateCacheCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *UrlMapsInvalidateCacheCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsInvalidateCacheCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.cacheinvalidationrule) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}/invalidateCache") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "urlMap": c.urlMap, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.invalidateCache" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *UrlMapsInvalidateCacheCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.", - // "httpMethod": "POST", - // "id": "compute.urlMaps.invalidateCache", - // "parameterOrder": [ - // "project", - // "urlMap" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "urlMap": { - // "description": "Name of the UrlMap scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/urlMaps/{urlMap}/invalidateCache", - // "request": { - // "$ref": "CacheInvalidationRule" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.urlMaps.list": - -type UrlMapsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of UrlMap resources available to the -// specified project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/list -func (r *UrlMapsService) List(project string) *UrlMapsListCall { - c := &UrlMapsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *UrlMapsListCall) Filter(filter string) *UrlMapsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *UrlMapsListCall) MaxResults(maxResults int64) *UrlMapsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *UrlMapsListCall) OrderBy(orderBy string) *UrlMapsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *UrlMapsListCall) PageToken(pageToken string) *UrlMapsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *UrlMapsListCall) Fields(s ...googleapi.Field) *UrlMapsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *UrlMapsListCall) IfNoneMatch(entityTag string) *UrlMapsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *UrlMapsListCall) Context(ctx context.Context) *UrlMapsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *UrlMapsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.list" call. -// Exactly one of *UrlMapList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *UrlMapList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *UrlMapsListCall) Do(opts ...googleapi.CallOption) (*UrlMapList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &UrlMapList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of UrlMap resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.urlMaps.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/urlMaps", - // "response": { - // "$ref": "UrlMapList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *UrlMapsListCall) Pages(ctx context.Context, f func(*UrlMapList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.urlMaps.patch": - -type UrlMapsPatchCall struct { - s *Service - project string - urlMap string - urlmap *UrlMap - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified UrlMap resource with the data included -// in the request. This method supports PATCH semantics and uses the -// JSON merge patch format and processing rules. -// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/patch -func (r *UrlMapsService) Patch(project string, urlMap string, urlmap *UrlMap) *UrlMapsPatchCall { - c := &UrlMapsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlMap = urlMap - c.urlmap = urlmap - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *UrlMapsPatchCall) RequestId(requestId string) *UrlMapsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *UrlMapsPatchCall) Fields(s ...googleapi.Field) *UrlMapsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *UrlMapsPatchCall) Context(ctx context.Context) *UrlMapsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *UrlMapsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "urlMap": c.urlMap, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *UrlMapsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.urlMaps.patch", - // "parameterOrder": [ - // "project", - // "urlMap" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "urlMap": { - // "description": "Name of the UrlMap resource to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/urlMaps/{urlMap}", - // "request": { - // "$ref": "UrlMap" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.urlMaps.testIamPermissions": - -type UrlMapsTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *UrlMapsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *UrlMapsTestIamPermissionsCall { - c := &UrlMapsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *UrlMapsTestIamPermissionsCall) Fields(s ...googleapi.Field) *UrlMapsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *UrlMapsTestIamPermissionsCall) Context(ctx context.Context) *UrlMapsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *UrlMapsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *UrlMapsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.urlMaps.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/urlMaps/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.urlMaps.update": - -type UrlMapsUpdateCall struct { - s *Service - project string - urlMap string - urlmap *UrlMap - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified UrlMap resource with the data included -// in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/update -func (r *UrlMapsService) Update(project string, urlMap string, urlmap *UrlMap) *UrlMapsUpdateCall { - c := &UrlMapsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlMap = urlMap - c.urlmap = urlmap - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *UrlMapsUpdateCall) RequestId(requestId string) *UrlMapsUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *UrlMapsUpdateCall) Fields(s ...googleapi.Field) *UrlMapsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *UrlMapsUpdateCall) Context(ctx context.Context) *UrlMapsUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *UrlMapsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "urlMap": c.urlMap, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *UrlMapsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the specified UrlMap resource with the data included in the request.", - // "httpMethod": "PUT", - // "id": "compute.urlMaps.update", - // "parameterOrder": [ - // "project", - // "urlMap" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "urlMap": { - // "description": "Name of the UrlMap resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/urlMaps/{urlMap}", - // "request": { - // "$ref": "UrlMap" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.urlMaps.validate": - -type UrlMapsValidateCall struct { - s *Service - project string - urlMap string - urlmapsvalidaterequest *UrlMapsValidateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Validate: Runs static validation for the UrlMap. In particular, the -// tests of the provided UrlMap will be run. Calling this method does -// NOT create the UrlMap. -// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/validate -func (r *UrlMapsService) Validate(project string, urlMap string, urlmapsvalidaterequest *UrlMapsValidateRequest) *UrlMapsValidateCall { - c := &UrlMapsValidateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlMap = urlMap - c.urlmapsvalidaterequest = urlmapsvalidaterequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *UrlMapsValidateCall) Fields(s ...googleapi.Field) *UrlMapsValidateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *UrlMapsValidateCall) Context(ctx context.Context) *UrlMapsValidateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *UrlMapsValidateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsValidateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapsvalidaterequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}/validate") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "urlMap": c.urlMap, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.validate" call. -// Exactly one of *UrlMapsValidateResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *UrlMapsValidateResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *UrlMapsValidateCall) Do(opts ...googleapi.CallOption) (*UrlMapsValidateResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &UrlMapsValidateResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.", - // "httpMethod": "POST", - // "id": "compute.urlMaps.validate", - // "parameterOrder": [ - // "project", - // "urlMap" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "urlMap": { - // "description": "Name of the UrlMap resource to be validated as.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/urlMaps/{urlMap}/validate", - // "request": { - // "$ref": "UrlMapsValidateRequest" - // }, - // "response": { - // "$ref": "UrlMapsValidateResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.vpnTunnels.aggregatedList": - -type VpnTunnelsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of VPN tunnels. -func (r *VpnTunnelsService) AggregatedList(project string) *VpnTunnelsAggregatedListCall { - c := &VpnTunnelsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *VpnTunnelsAggregatedListCall) Filter(filter string) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *VpnTunnelsAggregatedListCall) MaxResults(maxResults int64) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *VpnTunnelsAggregatedListCall) OrderBy(orderBy string) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *VpnTunnelsAggregatedListCall) PageToken(pageToken string) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *VpnTunnelsAggregatedListCall) Fields(s ...googleapi.Field) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *VpnTunnelsAggregatedListCall) IfNoneMatch(entityTag string) *VpnTunnelsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *VpnTunnelsAggregatedListCall) Context(ctx context.Context) *VpnTunnelsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *VpnTunnelsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/vpnTunnels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.aggregatedList" call. -// Exactly one of *VpnTunnelAggregatedList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *VpnTunnelAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *VpnTunnelsAggregatedListCall) Do(opts ...googleapi.CallOption) (*VpnTunnelAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &VpnTunnelAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of VPN tunnels.", - // "httpMethod": "GET", - // "id": "compute.vpnTunnels.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/vpnTunnels", - // "response": { - // "$ref": "VpnTunnelAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *VpnTunnelsAggregatedListCall) Pages(ctx context.Context, f func(*VpnTunnelAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.vpnTunnels.delete": - -type VpnTunnelsDeleteCall struct { - s *Service - project string - region string - vpnTunnel string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified VpnTunnel resource. -func (r *VpnTunnelsService) Delete(project string, region string, vpnTunnel string) *VpnTunnelsDeleteCall { - c := &VpnTunnelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.vpnTunnel = vpnTunnel - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *VpnTunnelsDeleteCall) RequestId(requestId string) *VpnTunnelsDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *VpnTunnelsDeleteCall) Fields(s ...googleapi.Field) *VpnTunnelsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *VpnTunnelsDeleteCall) Context(ctx context.Context) *VpnTunnelsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *VpnTunnelsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels/{vpnTunnel}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "vpnTunnel": c.vpnTunnel, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *VpnTunnelsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified VpnTunnel resource.", - // "httpMethod": "DELETE", - // "id": "compute.vpnTunnels.delete", - // "parameterOrder": [ - // "project", - // "region", - // "vpnTunnel" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "vpnTunnel": { - // "description": "Name of the VpnTunnel resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/vpnTunnels/{vpnTunnel}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.vpnTunnels.get": - -type VpnTunnelsGetCall struct { - s *Service - project string - region string - vpnTunnel string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified VpnTunnel resource. Get a list of -// available VPN tunnels by making a list() request. -func (r *VpnTunnelsService) Get(project string, region string, vpnTunnel string) *VpnTunnelsGetCall { - c := &VpnTunnelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.vpnTunnel = vpnTunnel - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *VpnTunnelsGetCall) Fields(s ...googleapi.Field) *VpnTunnelsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *VpnTunnelsGetCall) IfNoneMatch(entityTag string) *VpnTunnelsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *VpnTunnelsGetCall) Context(ctx context.Context) *VpnTunnelsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *VpnTunnelsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels/{vpnTunnel}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "vpnTunnel": c.vpnTunnel, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.get" call. -// Exactly one of *VpnTunnel or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *VpnTunnel.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *VpnTunnelsGetCall) Do(opts ...googleapi.CallOption) (*VpnTunnel, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &VpnTunnel{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified VpnTunnel resource. Get a list of available VPN tunnels by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.vpnTunnels.get", - // "parameterOrder": [ - // "project", - // "region", - // "vpnTunnel" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "vpnTunnel": { - // "description": "Name of the VpnTunnel resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/vpnTunnels/{vpnTunnel}", - // "response": { - // "$ref": "VpnTunnel" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.vpnTunnels.insert": - -type VpnTunnelsInsertCall struct { - s *Service - project string - region string - vpntunnel *VpnTunnel - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a VpnTunnel resource in the specified project and -// region using the data included in the request. -func (r *VpnTunnelsService) Insert(project string, region string, vpntunnel *VpnTunnel) *VpnTunnelsInsertCall { - c := &VpnTunnelsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.vpntunnel = vpntunnel - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. -// -// For example, consider a situation where you make an initial request -// and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the -// same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. -// -// The request ID must be a valid UUID with the exception that zero UUID -// is not supported (00000000-0000-0000-0000-000000000000). -func (c *VpnTunnelsInsertCall) RequestId(requestId string) *VpnTunnelsInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *VpnTunnelsInsertCall) Fields(s ...googleapi.Field) *VpnTunnelsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *VpnTunnelsInsertCall) Context(ctx context.Context) *VpnTunnelsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *VpnTunnelsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.vpntunnel) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *VpnTunnelsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a VpnTunnel resource in the specified project and region using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.vpnTunnels.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/vpnTunnels", - // "request": { - // "$ref": "VpnTunnel" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.vpnTunnels.list": - -type VpnTunnelsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of VpnTunnel resources contained in the -// specified project and region. -func (r *VpnTunnelsService) List(project string, region string) *VpnTunnelsListCall { - c := &VpnTunnelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *VpnTunnelsListCall) Filter(filter string) *VpnTunnelsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *VpnTunnelsListCall) MaxResults(maxResults int64) *VpnTunnelsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *VpnTunnelsListCall) OrderBy(orderBy string) *VpnTunnelsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *VpnTunnelsListCall) PageToken(pageToken string) *VpnTunnelsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *VpnTunnelsListCall) Fields(s ...googleapi.Field) *VpnTunnelsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *VpnTunnelsListCall) IfNoneMatch(entityTag string) *VpnTunnelsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *VpnTunnelsListCall) Context(ctx context.Context) *VpnTunnelsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *VpnTunnelsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.list" call. -// Exactly one of *VpnTunnelList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *VpnTunnelList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *VpnTunnelsListCall) Do(opts ...googleapi.CallOption) (*VpnTunnelList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &VpnTunnelList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of VpnTunnel resources contained in the specified project and region.", - // "httpMethod": "GET", - // "id": "compute.vpnTunnels.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/vpnTunnels", - // "response": { - // "$ref": "VpnTunnelList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *VpnTunnelsListCall) Pages(ctx context.Context, f func(*VpnTunnelList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.vpnTunnels.testIamPermissions": - -type VpnTunnelsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -func (r *VpnTunnelsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *VpnTunnelsTestIamPermissionsCall { - c := &VpnTunnelsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *VpnTunnelsTestIamPermissionsCall) Fields(s ...googleapi.Field) *VpnTunnelsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *VpnTunnelsTestIamPermissionsCall) Context(ctx context.Context) *VpnTunnelsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *VpnTunnelsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *VpnTunnelsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "httpMethod": "POST", - // "id": "compute.vpnTunnels.testIamPermissions", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/vpnTunnels/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.zoneOperations.delete": - -type ZoneOperationsDeleteCall struct { - s *Service - project string - zone string - operation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified zone-specific Operations resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/zoneOperations/delete -func (r *ZoneOperationsService) Delete(project string, zone string, operation string) *ZoneOperationsDeleteCall { - c := &ZoneOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.operation = operation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ZoneOperationsDeleteCall) Fields(s ...googleapi.Field) *ZoneOperationsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ZoneOperationsDeleteCall) Context(ctx context.Context) *ZoneOperationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ZoneOperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "operation": c.operation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneOperations.delete" call. -func (c *ZoneOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return err - } - return nil - // { - // "description": "Deletes the specified zone-specific Operations resource.", - // "httpMethod": "DELETE", - // "id": "compute.zoneOperations.delete", - // "parameterOrder": [ - // "project", - // "zone", - // "operation" - // ], - // "parameters": { - // "operation": { - // "description": "Name of the Operations resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/operations/{operation}", - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.zoneOperations.get": - -type ZoneOperationsGetCall struct { - s *Service - project string - zone string - operation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves the specified zone-specific Operations resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/zoneOperations/get -func (r *ZoneOperationsService) Get(project string, zone string, operation string) *ZoneOperationsGetCall { - c := &ZoneOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.operation = operation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ZoneOperationsGetCall) Fields(s ...googleapi.Field) *ZoneOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ZoneOperationsGetCall) IfNoneMatch(entityTag string) *ZoneOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ZoneOperationsGetCall) Context(ctx context.Context) *ZoneOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ZoneOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "operation": c.operation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneOperations.get" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ZoneOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the specified zone-specific Operations resource.", - // "httpMethod": "GET", - // "id": "compute.zoneOperations.get", - // "parameterOrder": [ - // "project", - // "zone", - // "operation" - // ], - // "parameters": { - // "operation": { - // "description": "Name of the Operations resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/operations/{operation}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.zoneOperations.list": - -type ZoneOperationsListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of Operation resources contained within the -// specified zone. -// For details, see https://cloud.google.com/compute/docs/reference/latest/zoneOperations/list -func (r *ZoneOperationsService) List(project string, zone string) *ZoneOperationsListCall { - c := &ZoneOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *ZoneOperationsListCall) Filter(filter string) *ZoneOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *ZoneOperationsListCall) MaxResults(maxResults int64) *ZoneOperationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *ZoneOperationsListCall) OrderBy(orderBy string) *ZoneOperationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *ZoneOperationsListCall) PageToken(pageToken string) *ZoneOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ZoneOperationsListCall) Fields(s ...googleapi.Field) *ZoneOperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ZoneOperationsListCall) IfNoneMatch(entityTag string) *ZoneOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ZoneOperationsListCall) Context(ctx context.Context) *ZoneOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ZoneOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/operations") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneOperations.list" call. -// Exactly one of *OperationList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *OperationList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ZoneOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &OperationList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of Operation resources contained within the specified zone.", - // "httpMethod": "GET", - // "id": "compute.zoneOperations.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/operations", - // "response": { - // "$ref": "OperationList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ZoneOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.zones.get": - -type ZonesGetCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Zone resource. Get a list of available -// zones by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/zones/get -func (r *ZonesService) Get(project string, zone string) *ZonesGetCall { - c := &ZonesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ZonesGetCall) Fields(s ...googleapi.Field) *ZonesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ZonesGetCall) IfNoneMatch(entityTag string) *ZonesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ZonesGetCall) Context(ctx context.Context) *ZonesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ZonesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZonesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zones.get" call. -// Exactly one of *Zone or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Zone.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ZonesGetCall) Do(opts ...googleapi.CallOption) (*Zone, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Zone{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified Zone resource. Get a list of available zones by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.zones.get", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}", - // "response": { - // "$ref": "Zone" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.zones.list": - -type ZonesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of Zone resources available to the specified -// project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/zones/list -func (r *ZonesService) List(project string) *ZonesListCall { - c := &ZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *ZonesListCall) Filter(filter string) *ZonesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *ZonesListCall) MaxResults(maxResults int64) *ZonesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *ZonesListCall) OrderBy(orderBy string) *ZonesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *ZonesListCall) PageToken(pageToken string) *ZonesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ZonesListCall) Fields(s ...googleapi.Field) *ZonesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ZonesListCall) IfNoneMatch(entityTag string) *ZonesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ZonesListCall) Context(ctx context.Context) *ZonesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ZonesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZonesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zones.list" call. -// Exactly one of *ZoneList or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *ZoneList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ZonesListCall) Do(opts ...googleapi.CallOption) (*ZoneList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ZoneList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of Zone resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.zones.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones", - // "response": { - // "$ref": "ZoneList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ZonesListCall) Pages(ctx context.Context, f func(*ZoneList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} diff --git a/vendor/google.golang.org/api/compute/v1/compute-api.json b/vendor/google.golang.org/api/compute/v1/compute-api.json deleted file mode 100644 index 9b169bb56..000000000 --- a/vendor/google.golang.org/api/compute/v1/compute-api.json +++ /dev/null @@ -1,21275 +0,0 @@ -{ - "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/dXJ6H81YhcA1IB55do9QrvoIsEc\"", - "discoveryVersion": "v1", - "id": "compute:v1", - "name": "compute", - "version": "v1", - "revision": "20170721", - "title": "Compute Engine API", - "description": "Creates and runs virtual machines on Google Cloud Platform.", - "ownerDomain": "google.com", - "ownerName": "Google", - "icons": { - "x16": "https://www.google.com/images/icons/product/compute_engine-16.png", - "x32": "https://www.google.com/images/icons/product/compute_engine-32.png" - }, - "documentationLink": "https://developers.google.com/compute/docs/reference/latest/", - "protocol": "rest", - "baseUrl": "https://www.googleapis.com/compute/v1/projects/", - "basePath": "/compute/v1/projects/", - "rootUrl": "https://www.googleapis.com/", - "servicePath": "compute/v1/projects/", - "batchPath": "batch", - "parameters": { - "alt": { - "type": "string", - "description": "Data format for the response.", - "default": "json", - "enum": [ - "json" - ], - "enumDescriptions": [ - "Responses with Content-Type of application/json" - ], - "location": "query" - }, - "fields": { - "type": "string", - "description": "Selector specifying which fields to include in a partial response.", - "location": "query" - }, - "key": { - "type": "string", - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "location": "query" - }, - "oauth_token": { - "type": "string", - "description": "OAuth 2.0 token for the current user.", - "location": "query" - }, - "prettyPrint": { - "type": "boolean", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "location": "query" - }, - "quotaUser": { - "type": "string", - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.", - "location": "query" - }, - "userIp": { - "type": "string", - "description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.", - "location": "query" - } - }, - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/compute": { - "description": "View and manage your Google Compute Engine resources" - }, - "https://www.googleapis.com/auth/compute.readonly": { - "description": "View your Google Compute Engine resources" - }, - "https://www.googleapis.com/auth/devstorage.full_control": { - "description": "Manage your data and permissions in Google Cloud Storage" - }, - "https://www.googleapis.com/auth/devstorage.read_only": { - "description": "View your data in Google Cloud Storage" - }, - "https://www.googleapis.com/auth/devstorage.read_write": { - "description": "Manage your data in Google Cloud Storage" - } - } - } - }, - "schemas": { - "AcceleratorConfig": { - "id": "AcceleratorConfig", - "type": "object", - "description": "A specification of the type and number of accelerator cards attached to the instance.", - "properties": { - "acceleratorCount": { - "type": "integer", - "description": "The number of the guest accelerator cards exposed to this instance.", - "format": "int32" - }, - "acceleratorType": { - "type": "string", - "description": "Full or partial URL of the accelerator type resource to expose to this instance." - } - } - }, - "AcceleratorType": { - "id": "AcceleratorType", - "type": "object", - "description": "An Accelerator Type resource.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "[Output Only] The deprecation status associated with this accelerator type." - }, - "description": { - "type": "string", - "description": "[Output Only] An optional textual description of the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] The type of the resource. Always compute#acceleratorType for accelerator types.", - "default": "compute#acceleratorType" - }, - "maximumCardsPerInstance": { - "type": "integer", - "description": "[Output Only] Maximum accelerator cards allowed per instance.", - "format": "int32" - }, - "name": { - "type": "string", - "description": "[Output Only] Name of the resource.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined fully-qualified URL for this resource." - }, - "zone": { - "type": "string", - "description": "[Output Only] The name of the zone where the accelerator type resides, such as us-central1-a." - } - } - }, - "AcceleratorTypeAggregatedList": { - "id": "AcceleratorTypeAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of AcceleratorTypesScopedList resources.", - "additionalProperties": { - "$ref": "AcceleratorTypesScopedList", - "description": "[Output Only] Name of the scope containing this set of accelerator types." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#acceleratorTypeAggregatedList for aggregated lists of accelerator types.", - "default": "compute#acceleratorTypeAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "AcceleratorTypeList": { - "id": "AcceleratorTypeList", - "type": "object", - "description": "Contains a list of accelerator types.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of AcceleratorType resources.", - "items": { - "$ref": "AcceleratorType" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#acceleratorTypeList for lists of accelerator types.", - "default": "compute#acceleratorTypeList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "AcceleratorTypesScopedList": { - "id": "AcceleratorTypesScopedList", - "type": "object", - "properties": { - "acceleratorTypes": { - "type": "array", - "description": "[Output Only] List of accelerator types contained in this scope.", - "items": { - "$ref": "AcceleratorType" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] An informational warning that appears when the accelerator types list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "AccessConfig": { - "id": "AccessConfig", - "type": "object", - "description": "An access configuration attached to an instance's network interface. Only one access config per instance is supported.", - "properties": { - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#accessConfig for access configs.", - "default": "compute#accessConfig" - }, - "name": { - "type": "string", - "description": "The name of this access configuration. The default and recommended name is External NAT but you can use any arbitrary string you would like. For example, My external IP or Network Access." - }, - "natIP": { - "type": "string", - "description": "An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance." - }, - "type": { - "type": "string", - "description": "The type of configuration. The default and only option is ONE_TO_ONE_NAT.", - "default": "ONE_TO_ONE_NAT", - "enum": [ - "ONE_TO_ONE_NAT" - ], - "enumDescriptions": [ - "" - ] - } - } - }, - "Address": { - "id": "Address", - "type": "object", - "description": "A reserved address resource.", - "properties": { - "address": { - "type": "string", - "description": "The static external IP address represented by this resource." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "ipVersion": { - "type": "string", - "description": "The IP Version that will be used by this address. Valid options are IPV4 or IPV6. This can only be specified for a global address.", - "enum": [ - "IPV4", - "IPV6", - "UNSPECIFIED_VERSION" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#address for addresses.", - "default": "compute#address" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.addresses.insert" - ] - } - }, - "region": { - "type": "string", - "description": "[Output Only] URL of the region where the regional address resides. This field is not applicable to global addresses." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "status": { - "type": "string", - "description": "[Output Only] The status of the address, which can be either IN_USE or RESERVED. An address that is RESERVED is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available.", - "enum": [ - "IN_USE", - "RESERVED" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "users": { - "type": "array", - "description": "[Output Only] The URLs of the resources that are using this address.", - "items": { - "type": "string" - } - } - } - }, - "AddressAggregatedList": { - "id": "AddressAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of AddressesScopedList resources.", - "additionalProperties": { - "$ref": "AddressesScopedList", - "description": "[Output Only] Name of the scope containing this set of addresses." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#addressAggregatedList for aggregated lists of addresses.", - "default": "compute#addressAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "AddressList": { - "id": "AddressList", - "type": "object", - "description": "Contains a list of addresses.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Address resources.", - "items": { - "$ref": "Address" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#addressList for lists of addresses.", - "default": "compute#addressList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "AddressesScopedList": { - "id": "AddressesScopedList", - "type": "object", - "properties": { - "addresses": { - "type": "array", - "description": "[Output Only] List of addresses contained in this scope.", - "items": { - "$ref": "Address" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] Informational warning which replaces the list of addresses when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "AliasIpRange": { - "id": "AliasIpRange", - "type": "object", - "description": "An alias IP range attached to an instance's network interface.", - "properties": { - "ipCidrRange": { - "type": "string", - "description": "The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 10.2.3.4), a netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24)." - }, - "subnetworkRangeName": { - "type": "string", - "description": "Optional subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used." - } - } - }, - "AttachedDisk": { - "id": "AttachedDisk", - "type": "object", - "description": "An instance-attached disk resource.", - "properties": { - "autoDelete": { - "type": "boolean", - "description": "Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance)." - }, - "boot": { - "type": "boolean", - "description": "Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem." - }, - "deviceName": { - "type": "string", - "description": "Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.\n\nIf not specified, the server chooses a default device name to apply to this disk, in the form persistent-disks-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks." - }, - "diskEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Encrypts or decrypts a disk using a customer-supplied encryption key.\n\nIf you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key.\n\nIf you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance.\n\nIf you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.\n\nInstance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group." - }, - "index": { - "type": "integer", - "description": "Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value.", - "format": "int32" - }, - "initializeParams": { - "$ref": "AttachedDiskInitializeParams", - "description": "[Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.\n\nThis property is mutually exclusive with the source property; you can only define one or the other, but not both." - }, - "interface": { - "type": "string", - "description": "Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.", - "enum": [ - "NVME", - "SCSI" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#attachedDisk for attached disks.", - "default": "compute#attachedDisk" - }, - "licenses": { - "type": "array", - "description": "[Output Only] Any valid publicly visible licenses.", - "items": { - "type": "string" - } - }, - "mode": { - "type": "string", - "description": "The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.", - "enum": [ - "READ_ONLY", - "READ_WRITE" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "source": { - "type": "string", - "description": "Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.\n\nIf desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.\n\nNote that for InstanceTemplate, specify the disk name, not the URL for the disk." - }, - "type": { - "type": "string", - "description": "Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.", - "enum": [ - "PERSISTENT", - "SCRATCH" - ], - "enumDescriptions": [ - "", - "" - ] - } - } - }, - "AttachedDiskInitializeParams": { - "id": "AttachedDiskInitializeParams", - "type": "object", - "description": "[Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.\n\nThis property is mutually exclusive with the source property; you can only define one or the other, but not both.", - "properties": { - "diskName": { - "type": "string", - "description": "Specifies the disk name. If not specified, the default is to use the name of the instance." - }, - "diskSizeGb": { - "type": "string", - "description": "Specifies the size of the disk in base-2 GB.", - "format": "int64" - }, - "diskType": { - "type": "string", - "description": "Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:\n\nhttps://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard \n\nOther values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL. For example, the following are valid values: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType \n- projects/project/zones/zone/diskTypes/diskType \n- zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL." - }, - "sourceImage": { - "type": "string", - "description": "The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.\n\nTo create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image:\n\nprojects/debian-cloud/global/images/family/debian-8 \n\nAlternatively, use a specific version of a public operating system image:\n\nprojects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD \n\nTo create a disk with a private image that you created, specify the image name in the following format:\n\nglobal/images/my-private-image \n\nYou can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:\n\nglobal/images/family/my-private-family \n\nIf the source image is deleted later, this field will not be set." - }, - "sourceImageEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.\n\nInstance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys." - } - } - }, - "Autoscaler": { - "id": "Autoscaler", - "type": "object", - "description": "Represents an Autoscaler resource. Autoscalers allow you to automatically scale virtual machine instances in managed instance groups according to an autoscaling policy that you define. For more information, read Autoscaling Groups of Instances.", - "properties": { - "autoscalingPolicy": { - "$ref": "AutoscalingPolicy", - "description": "The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization.\n\nIf none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#autoscaler for autoscalers.", - "default": "compute#autoscaler" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.instanceGroups.insert" - ] - } - }, - "region": { - "type": "string", - "description": "[Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope)." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "status": { - "type": "string", - "description": "[Output Only] The status of the autoscaler configuration.", - "enum": [ - "ACTIVE", - "DELETING", - "ERROR", - "PENDING" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ] - }, - "statusDetails": { - "type": "array", - "description": "[Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter.", - "items": { - "$ref": "AutoscalerStatusDetails" - } - }, - "target": { - "type": "string", - "description": "URL of the managed instance group that this autoscaler will scale." - }, - "zone": { - "type": "string", - "description": "[Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope)." - } - } - }, - "AutoscalerAggregatedList": { - "id": "AutoscalerAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of AutoscalersScopedList resources.", - "additionalProperties": { - "$ref": "AutoscalersScopedList", - "description": "[Output Only] Name of the scope containing this set of autoscalers." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#autoscalerAggregatedList for aggregated lists of autoscalers.", - "default": "compute#autoscalerAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "AutoscalerList": { - "id": "AutoscalerList", - "type": "object", - "description": "Contains a list of Autoscaler resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Autoscaler resources.", - "items": { - "$ref": "Autoscaler" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#autoscalerList for lists of autoscalers.", - "default": "compute#autoscalerList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "AutoscalerStatusDetails": { - "id": "AutoscalerStatusDetails", - "type": "object", - "properties": { - "message": { - "type": "string", - "description": "The status message." - }, - "type": { - "type": "string", - "description": "The type of error returned.", - "enum": [ - "ALL_INSTANCES_UNHEALTHY", - "BACKEND_SERVICE_DOES_NOT_EXIST", - "CAPPED_AT_MAX_NUM_REPLICAS", - "CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE", - "CUSTOM_METRIC_INVALID", - "MIN_EQUALS_MAX", - "MISSING_CUSTOM_METRIC_DATA_POINTS", - "MISSING_LOAD_BALANCING_DATA_POINTS", - "MORE_THAN_ONE_BACKEND_SERVICE", - "NOT_ENOUGH_QUOTA_AVAILABLE", - "REGION_RESOURCE_STOCKOUT", - "SCALING_TARGET_DOES_NOT_EXIST", - "UNKNOWN", - "UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION", - "ZONE_RESOURCE_STOCKOUT" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - } - } - }, - "AutoscalersScopedList": { - "id": "AutoscalersScopedList", - "type": "object", - "properties": { - "autoscalers": { - "type": "array", - "description": "[Output Only] List of autoscalers contained in this scope.", - "items": { - "$ref": "Autoscaler" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] Informational warning which replaces the list of autoscalers when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "AutoscalingPolicy": { - "id": "AutoscalingPolicy", - "type": "object", - "description": "Cloud Autoscaler policy.", - "properties": { - "coolDownPeriodSec": { - "type": "integer", - "description": "The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds.\n\nVirtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.", - "format": "int32" - }, - "cpuUtilization": { - "$ref": "AutoscalingPolicyCpuUtilization", - "description": "Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group." - }, - "customMetricUtilizations": { - "type": "array", - "description": "Configuration parameters of autoscaling based on a custom metric.", - "items": { - "$ref": "AutoscalingPolicyCustomMetricUtilization" - } - }, - "loadBalancingUtilization": { - "$ref": "AutoscalingPolicyLoadBalancingUtilization", - "description": "Configuration parameters of autoscaling based on load balancer." - }, - "maxNumReplicas": { - "type": "integer", - "description": "The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas.", - "format": "int32" - }, - "minNumReplicas": { - "type": "integer", - "description": "The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed.", - "format": "int32" - } - } - }, - "AutoscalingPolicyCpuUtilization": { - "id": "AutoscalingPolicyCpuUtilization", - "type": "object", - "description": "CPU utilization policy.", - "properties": { - "utilizationTarget": { - "type": "number", - "description": "The target CPU utilization that the autoscaler should maintain. Must be a float value in the range (0, 1]. If not specified, the default is 0.6.\n\nIf the CPU level is below the target utilization, the autoscaler scales down the number of instances until it reaches the minimum number of instances you specified or until the average CPU of your instances reaches the target utilization.\n\nIf the average CPU is above the target utilization, the autoscaler scales up until it reaches the maximum number of instances you specified or until the average utilization reaches the target utilization.", - "format": "double" - } - } - }, - "AutoscalingPolicyCustomMetricUtilization": { - "id": "AutoscalingPolicyCustomMetricUtilization", - "type": "object", - "description": "Custom utilization metric policy.", - "properties": { - "metric": { - "type": "string", - "description": "The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values and should be a utilization metric, which means that the number of virtual machines handling requests should increase or decrease proportionally to the metric.\n\nThe metric must have a value type of INT64 or DOUBLE." - }, - "utilizationTarget": { - "type": "number", - "description": "The target value of the metric that autoscaler should maintain. This must be a positive value.\n\nFor example, a good metric to use as a utilization_target is compute.googleapis.com/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances.", - "format": "double" - }, - "utilizationTargetType": { - "type": "string", - "description": "Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not specified, the default is GAUGE.", - "enum": [ - "DELTA_PER_MINUTE", - "DELTA_PER_SECOND", - "GAUGE" - ], - "enumDescriptions": [ - "", - "", - "" - ] - } - } - }, - "AutoscalingPolicyLoadBalancingUtilization": { - "id": "AutoscalingPolicyLoadBalancingUtilization", - "type": "object", - "description": "Configuration parameters of autoscaling based on load balancing.", - "properties": { - "utilizationTarget": { - "type": "number", - "description": "Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.", - "format": "double" - } - } - }, - "Backend": { - "id": "Backend", - "type": "object", - "description": "Message containing information of one individual backend.", - "properties": { - "balancingMode": { - "type": "string", - "description": "Specifies the balancing mode for this backend. For global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for TCP/SSL).\n\nFor Internal Load Balancing, the default and only supported mode is CONNECTION.", - "enum": [ - "CONNECTION", - "RATE", - "UTILIZATION" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "capacityScaler": { - "type": "number", - "description": "A multiplier applied to the group's maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). Default value is 1, which means the group will serve up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available Capacity. Valid range is [0.0,1.0].\n\nThis cannot be used for internal load balancing.", - "format": "float" - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "group": { - "type": "string", - "description": "The fully-qualified URL of a Instance Group resource. This instance group defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource.\n\nNote that you must specify an Instance Group resource using the fully-qualified URL, rather than a partial URL.\n\nWhen the BackendService has load balancing scheme INTERNAL, the instance group must be within the same region as the BackendService." - }, - "maxConnections": { - "type": "integer", - "description": "The max number of simultaneous connections for the group. Can be used with either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.\n\nThis cannot be used for internal load balancing.", - "format": "int32" - }, - "maxConnectionsPerInstance": { - "type": "integer", - "description": "The max number of simultaneous connections that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.\n\nThis cannot be used for internal load balancing.", - "format": "int32" - }, - "maxRate": { - "type": "integer", - "description": "The max requests per second (RPS) of the group. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. For RATE mode, either maxRate or maxRatePerInstance must be set.\n\nThis cannot be used for internal load balancing.", - "format": "int32" - }, - "maxRatePerInstance": { - "type": "number", - "description": "The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set.\n\nThis cannot be used for internal load balancing.", - "format": "float" - }, - "maxUtilization": { - "type": "number", - "description": "Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. The default is 0.8. Valid range is [0.0, 1.0].\n\nThis cannot be used for internal load balancing.", - "format": "float" - } - } - }, - "BackendBucket": { - "id": "BackendBucket", - "type": "object", - "description": "A BackendBucket resource. This resource defines a Cloud Storage bucket.", - "properties": { - "bucketName": { - "type": "string", - "description": "Cloud Storage bucket name." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional textual description of the resource; provided by the client when the resource is created." - }, - "enableCdn": { - "type": "boolean", - "description": "If true, enable Cloud CDN for this BackendBucket." - }, - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "Type of the resource.", - "default": "compute#backendBucket" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - } - } - }, - "BackendBucketList": { - "id": "BackendBucketList", - "type": "object", - "description": "Contains a list of BackendBucket resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of BackendBucket resources.", - "items": { - "$ref": "BackendBucket" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#backendBucketList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "BackendService": { - "id": "BackendService", - "type": "object", - "description": "A BackendService resource. This resource defines a group of backend virtual machines and their serving capacity.", - "properties": { - "affinityCookieTtlSec": { - "type": "integer", - "description": "Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day.\n\nWhen the load balancing scheme is INTERNAL, this field is not used.", - "format": "int32" - }, - "backends": { - "type": "array", - "description": "The list of backends that serve this BackendService.", - "items": { - "$ref": "Backend" - } - }, - "cdnPolicy": { - "$ref": "BackendServiceCdnPolicy", - "description": "Cloud CDN configuration for this BackendService." - }, - "connectionDraining": { - "$ref": "ConnectionDraining" - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "enableCDN": { - "type": "boolean", - "description": "If true, enable Cloud CDN for this BackendService.\n\nWhen the load balancing scheme is INTERNAL, this field is not used." - }, - "fingerprint": { - "type": "string", - "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService.", - "format": "byte" - }, - "healthChecks": { - "type": "array", - "description": "The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified, and a health check is required for GCE backend services. A health check must not be specified for GAE app backend and Cloud Function backend.\n\nFor internal load balancing, a URL to a HealthCheck resource must be specified instead.", - "items": { - "type": "string" - } - }, - "iap": { - "$ref": "BackendServiceIAP" - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#backendService for backend services.", - "default": "compute#backendService" - }, - "loadBalancingScheme": { - "type": "string", - "enum": [ - "EXTERNAL", - "INTERNAL", - "INVALID_LOAD_BALANCING_SCHEME" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "port": { - "type": "integer", - "description": "Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.\n\nThis cannot be used for internal load balancing.", - "format": "int32" - }, - "portName": { - "type": "string", - "description": "Name of backend port. The same name should appear in the instance groups referenced by this service. Required when the load balancing scheme is EXTERNAL.\n\nWhen the load balancing scheme is INTERNAL, this field is not used." - }, - "protocol": { - "type": "string", - "description": "The protocol this BackendService uses to communicate with backends.\n\nPossible values are HTTP, HTTPS, TCP, and SSL. The default is HTTP.\n\nFor internal load balancing, the possible values are TCP and UDP, and the default is TCP.", - "enum": [ - "HTTP", - "HTTPS", - "SSL", - "TCP", - "UDP" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ] - }, - "region": { - "type": "string", - "description": "[Output Only] URL of the region where the regional backend service resides. This field is not applicable to global backend services." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "sessionAffinity": { - "type": "string", - "description": "Type of session affinity to use. The default is NONE.\n\nWhen the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or GENERATED_COOKIE.\n\nWhen the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.\n\nWhen the protocol is UDP, this field is not used.", - "enum": [ - "CLIENT_IP", - "CLIENT_IP_PORT_PROTO", - "CLIENT_IP_PROTO", - "GENERATED_COOKIE", - "NONE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ] - }, - "timeoutSec": { - "type": "integer", - "description": "How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds.", - "format": "int32" - } - } - }, - "BackendServiceAggregatedList": { - "id": "BackendServiceAggregatedList", - "type": "object", - "description": "Contains a list of BackendServicesScopedList.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of BackendServicesScopedList resources.", - "additionalProperties": { - "$ref": "BackendServicesScopedList", - "description": "Name of the scope containing this set of BackendServices." - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#backendServiceAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "BackendServiceCdnPolicy": { - "id": "BackendServiceCdnPolicy", - "type": "object", - "description": "Message containing Cloud CDN configuration for a backend service.", - "properties": { - "cacheKeyPolicy": { - "$ref": "CacheKeyPolicy", - "description": "The CacheKeyPolicy for this CdnPolicy." - } - } - }, - "BackendServiceGroupHealth": { - "id": "BackendServiceGroupHealth", - "type": "object", - "properties": { - "healthStatus": { - "type": "array", - "items": { - "$ref": "HealthStatus" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#backendServiceGroupHealth for the health of backend services.", - "default": "compute#backendServiceGroupHealth" - } - } - }, - "BackendServiceIAP": { - "id": "BackendServiceIAP", - "type": "object", - "description": "Identity-Aware Proxy", - "properties": { - "enabled": { - "type": "boolean" - }, - "oauth2ClientId": { - "type": "string" - }, - "oauth2ClientSecret": { - "type": "string" - }, - "oauth2ClientSecretSha256": { - "type": "string", - "description": "[Output Only] SHA256 hash value for the field oauth2_client_secret above." - } - } - }, - "BackendServiceList": { - "id": "BackendServiceList", - "type": "object", - "description": "Contains a list of BackendService resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of BackendService resources.", - "items": { - "$ref": "BackendService" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#backendServiceList for lists of backend services.", - "default": "compute#backendServiceList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "BackendServicesScopedList": { - "id": "BackendServicesScopedList", - "type": "object", - "properties": { - "backendServices": { - "type": "array", - "description": "List of BackendServices contained in this scope.", - "items": { - "$ref": "BackendService" - } - }, - "warning": { - "type": "object", - "description": "Informational warning which replaces the list of backend services when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "CacheInvalidationRule": { - "id": "CacheInvalidationRule", - "type": "object", - "properties": { - "host": { - "type": "string", - "description": "If set, this invalidation rule will only apply to requests with a Host header matching host." - }, - "path": { - "type": "string" - } - } - }, - "CacheKeyPolicy": { - "id": "CacheKeyPolicy", - "type": "object", - "description": "Message containing what to include in the cache key for a request for Cloud CDN.", - "properties": { - "includeHost": { - "type": "boolean", - "description": "If true, requests to different hosts will be cached separately." - }, - "includeProtocol": { - "type": "boolean", - "description": "If true, http and https requests will be cached separately." - }, - "includeQueryString": { - "type": "boolean", - "description": "If true, include query string parameters in the cache key according to query_string_whitelist and query_string_blacklist. If neither is set, the entire query string will be included. If false, the query string will be excluded from the cache key entirely." - }, - "queryStringBlacklist": { - "type": "array", - "description": "Names of query string parameters to exclude in cache keys. All other parameters will be included. Either specify query_string_whitelist or query_string_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters.", - "items": { - "type": "string" - } - }, - "queryStringWhitelist": { - "type": "array", - "description": "Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify query_string_whitelist or query_string_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters.", - "items": { - "type": "string" - } - } - } - }, - "Commitment": { - "id": "Commitment", - "type": "object", - "description": "Represents a Commitment resource. Creating a Commitment resource means that you are purchasing a committed use contract with an explicit start and end time. You can create commitments based on vCPUs and memory usage and receive discounted rates. For full details, read Signing Up for Committed Use Discounts.\n\nCommitted use discounts are subject to Google Cloud Platform's Service Specific Terms. By purchasing a committed use discount, you agree to these terms. Committed use discounts will not renew, so you must purchase a new commitment to continue receiving discounts.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "endTimestamp": { - "type": "string", - "description": "[Output Only] Commitment end time in RFC3339 text format." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#commitment for commitments.", - "default": "compute#commitment" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "plan": { - "type": "string", - "description": "The plan for this commitment, which determines duration and discount rate. The currently supported plans are TWELVE_MONTH (1 year), and THIRTY_SIX_MONTH (3 years).", - "enum": [ - "INVALID", - "THIRTY_SIX_MONTH", - "TWELVE_MONTH" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "region": { - "type": "string", - "description": "[Output Only] URL of the region where this commitment may be used." - }, - "resources": { - "type": "array", - "description": "List of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together.", - "items": { - "$ref": "ResourceCommitment" - } - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "startTimestamp": { - "type": "string", - "description": "[Output Only] Commitment start time in RFC3339 text format." - }, - "status": { - "type": "string", - "description": "[Output Only] Status of the commitment with regards to eventual expiration (each commitment has an end date defined). One of the following values: NOT_YET_ACTIVE, ACTIVE, EXPIRED.", - "enum": [ - "ACTIVE", - "CREATING", - "EXPIRED", - "NOT_YET_ACTIVE" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ] - }, - "statusMessage": { - "type": "string", - "description": "[Output Only] An optional, human-readable explanation of the status." - } - } - }, - "CommitmentAggregatedList": { - "id": "CommitmentAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of CommitmentsScopedList resources.", - "additionalProperties": { - "$ref": "CommitmentsScopedList", - "description": "[Output Only] Name of the scope containing this set of commitments." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#commitmentAggregatedList for aggregated lists of commitments.", - "default": "compute#commitmentAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "CommitmentList": { - "id": "CommitmentList", - "type": "object", - "description": "Contains a list of Commitment resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Commitment resources.", - "items": { - "$ref": "Commitment" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#commitmentList for lists of commitments.", - "default": "compute#commitmentList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "CommitmentsScopedList": { - "id": "CommitmentsScopedList", - "type": "object", - "properties": { - "commitments": { - "type": "array", - "description": "[Output Only] List of commitments contained in this scope.", - "items": { - "$ref": "Commitment" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] Informational warning which replaces the list of commitments when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "ConnectionDraining": { - "id": "ConnectionDraining", - "type": "object", - "description": "Message containing connection draining configuration.", - "properties": { - "drainingTimeoutSec": { - "type": "integer", - "description": "Time for which instance will be drained (not accept new connections, but still work to finish started).", - "format": "int32" - } - } - }, - "CustomerEncryptionKey": { - "id": "CustomerEncryptionKey", - "type": "object", - "description": "Represents a customer-supplied encryption key", - "properties": { - "rawKey": { - "type": "string", - "description": "Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource." - }, - "sha256": { - "type": "string", - "description": "[Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource." - } - } - }, - "CustomerEncryptionKeyProtectedDisk": { - "id": "CustomerEncryptionKeyProtectedDisk", - "type": "object", - "properties": { - "diskEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Decrypts data associated with the disk with a customer-supplied encryption key." - }, - "source": { - "type": "string", - "description": "Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks." - } - } - }, - "DeprecationStatus": { - "id": "DeprecationStatus", - "type": "object", - "description": "Deprecation status for a public resource.", - "properties": { - "deleted": { - "type": "string", - "description": "An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it." - }, - "deprecated": { - "type": "string", - "description": "An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it." - }, - "obsolete": { - "type": "string", - "description": "An optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it." - }, - "replacement": { - "type": "string", - "description": "The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource." - }, - "state": { - "type": "string", - "description": "The deprecation state of this resource. This can be DEPRECATED, OBSOLETE, or DELETED. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.", - "enum": [ - "DELETED", - "DEPRECATED", - "OBSOLETE" - ], - "enumDescriptions": [ - "", - "", - "" - ] - } - } - }, - "Disk": { - "id": "Disk", - "type": "object", - "description": "A Disk resource.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "diskEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Encrypts the disk using a customer-supplied encryption key.\n\nAfter you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine).\n\nCustomer-supplied encryption keys do not protect access to metadata of the disk.\n\nIf you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#disk for disks.", - "default": "compute#disk" - }, - "labelFingerprint": { - "type": "string", - "description": "A fingerprint for the labels being applied to this disk, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve a disk.", - "format": "byte" - }, - "labels": { - "type": "object", - "description": "Labels to apply to this disk. These can be later modified by the setLabels method.", - "additionalProperties": { - "type": "string" - } - }, - "lastAttachTimestamp": { - "type": "string", - "description": "[Output Only] Last attach timestamp in RFC3339 text format." - }, - "lastDetachTimestamp": { - "type": "string", - "description": "[Output Only] Last detach timestamp in RFC3339 text format." - }, - "licenses": { - "type": "array", - "description": "Any applicable publicly visible licenses.", - "items": { - "type": "string" - } - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.disks.insert" - ] - } - }, - "options": { - "type": "string", - "description": "Internal use only." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined fully-qualified URL for this resource." - }, - "sizeGb": { - "type": "string", - "description": "Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk.\n\nIf you specify this field along with sourceImage or sourceSnapshot, the value of sizeGb must not be less than the size of the sourceImage or the size of the snapshot. Acceptable values are 1 to 65536, inclusive.", - "format": "int64" - }, - "sourceImage": { - "type": "string", - "description": "The source image used to create this disk. If the source image is deleted, this field will not be set.\n\nTo create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image:\n\nprojects/debian-cloud/global/images/family/debian-8 \n\nAlternatively, use a specific version of a public operating system image:\n\nprojects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD \n\nTo create a disk with a private image that you created, specify the image name in the following format:\n\nglobal/images/my-private-image \n\nYou can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:\n\nglobal/images/family/my-private-family" - }, - "sourceImageEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key." - }, - "sourceImageId": { - "type": "string", - "description": "[Output Only] The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used." - }, - "sourceSnapshot": { - "type": "string", - "description": "The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: \n- https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot \n- projects/project/global/snapshots/snapshot \n- global/snapshots/snapshot" - }, - "sourceSnapshotEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key." - }, - "sourceSnapshotId": { - "type": "string", - "description": "[Output Only] The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used." - }, - "status": { - "type": "string", - "description": "[Output Only] The status of disk creation.", - "enum": [ - "CREATING", - "FAILED", - "READY", - "RESTORING" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ] - }, - "type": { - "type": "string", - "description": "URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk." - }, - "users": { - "type": "array", - "description": "[Output Only] Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance", - "items": { - "type": "string" - } - }, - "zone": { - "type": "string", - "description": "[Output Only] URL of the zone where the disk resides." - } - } - }, - "DiskAggregatedList": { - "id": "DiskAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of DisksScopedList resources.", - "additionalProperties": { - "$ref": "DisksScopedList", - "description": "[Output Only] Name of the scope containing this set of disks." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#diskAggregatedList for aggregated lists of persistent disks.", - "default": "compute#diskAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "DiskList": { - "id": "DiskList", - "type": "object", - "description": "A list of Disk resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Disk resources.", - "items": { - "$ref": "Disk" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#diskList for lists of disks.", - "default": "compute#diskList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "DiskMoveRequest": { - "id": "DiskMoveRequest", - "type": "object", - "properties": { - "destinationZone": { - "type": "string", - "description": "The URL of the destination zone to move the disk. This can be a full or partial URL. For example, the following are all valid URLs to a zone: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone \n- projects/project/zones/zone \n- zones/zone" - }, - "targetDisk": { - "type": "string", - "description": "The URL of the target disk to move. This can be a full or partial URL. For example, the following are all valid URLs to a disk: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk \n- projects/project/zones/zone/disks/disk \n- zones/zone/disks/disk" - } - } - }, - "DiskType": { - "id": "DiskType", - "type": "object", - "description": "A DiskType resource.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "defaultDiskSizeGb": { - "type": "string", - "description": "[Output Only] Server-defined default disk size in GB.", - "format": "int64" - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "[Output Only] The deprecation status associated with this disk type." - }, - "description": { - "type": "string", - "description": "[Output Only] An optional description of this resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#diskType for disk types.", - "default": "compute#diskType" - }, - "name": { - "type": "string", - "description": "[Output Only] Name of the resource.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "validDiskSize": { - "type": "string", - "description": "[Output Only] An optional textual description of the valid disk size, such as \"10GB-10TB\"." - }, - "zone": { - "type": "string", - "description": "[Output Only] URL of the zone where the disk type resides." - } - } - }, - "DiskTypeAggregatedList": { - "id": "DiskTypeAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of DiskTypesScopedList resources.", - "additionalProperties": { - "$ref": "DiskTypesScopedList", - "description": "[Output Only] Name of the scope containing this set of disk types." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#diskTypeAggregatedList.", - "default": "compute#diskTypeAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "DiskTypeList": { - "id": "DiskTypeList", - "type": "object", - "description": "Contains a list of disk types.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of DiskType resources.", - "items": { - "$ref": "DiskType" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#diskTypeList for disk types.", - "default": "compute#diskTypeList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "DiskTypesScopedList": { - "id": "DiskTypesScopedList", - "type": "object", - "properties": { - "diskTypes": { - "type": "array", - "description": "[Output Only] List of disk types contained in this scope.", - "items": { - "$ref": "DiskType" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] Informational warning which replaces the list of disk types when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "DisksResizeRequest": { - "id": "DisksResizeRequest", - "type": "object", - "properties": { - "sizeGb": { - "type": "string", - "description": "The new size of the persistent disk, which is specified in GB.", - "format": "int64" - } - } - }, - "DisksScopedList": { - "id": "DisksScopedList", - "type": "object", - "properties": { - "disks": { - "type": "array", - "description": "[Output Only] List of disks contained in this scope.", - "items": { - "$ref": "Disk" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] Informational warning which replaces the list of disks when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "Firewall": { - "id": "Firewall", - "type": "object", - "description": "Represents a Firewall resource.", - "properties": { - "allowed": { - "type": "array", - "description": "The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.", - "items": { - "type": "object", - "properties": { - "IPProtocol": { - "type": "string", - "description": "The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number." - }, - "ports": { - "type": "array", - "description": "An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.\n\nExample inputs include: [\"22\"], [\"80\",\"443\"], and [\"12345-12349\"].", - "items": { - "type": "string" - } - } - } - } - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#firewall for firewall rules.", - "default": "compute#firewall" - }, - "name": { - "type": "string", - "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.firewalls.insert", - "compute.firewalls.patch" - ] - } - }, - "network": { - "type": "string", - "description": "URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:\nglobal/networks/default\nIf you choose to specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network \n- projects/myproject/global/networks/my-network \n- global/networks/default" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "sourceRanges": { - "type": "array", - "description": "If source ranges are specified, the firewall will apply only to traffic that has source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Only IPv4 is supported.", - "items": { - "type": "string" - } - }, - "sourceTags": { - "type": "array", - "description": "If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply.", - "items": { - "type": "string" - } - }, - "targetTags": { - "type": "array", - "description": "A list of instance tags indicating sets of instances located in the network that may make network connections as specified in allowed[]. If no targetTags are specified, the firewall rule applies to all instances on the specified network.", - "items": { - "type": "string" - } - } - } - }, - "FirewallList": { - "id": "FirewallList", - "type": "object", - "description": "Contains a list of firewalls.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Firewall resources.", - "items": { - "$ref": "Firewall" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#firewallList for lists of firewalls.", - "default": "compute#firewallList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "ForwardingRule": { - "id": "ForwardingRule", - "type": "object", - "description": "A ForwardingRule resource. A ForwardingRule resource specifies which pool of target virtual machines to forward a packet to if it matches the given [IPAddress, IPProtocol, ports] tuple.", - "properties": { - "IPAddress": { - "type": "string", - "description": "The IP address that this forwarding rule is serving on behalf of.\n\nFor global forwarding rules, the address must be a global IP. For regional forwarding rules, the address must live in the same region as the forwarding rule. By default, this field is empty and an ephemeral IPv4 address from the same scope (global or regional) will be assigned. A regional forwarding rule supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6.\n\nWhen the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnetwork configured for the forwarding rule. A reserved address cannot be used. If the field is empty, the IP address will be automatically allocated from the internal IP range of the subnetwork or network configured for this forwarding rule." - }, - "IPProtocol": { - "type": "string", - "description": "The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP, AH, SCTP or ICMP.\n\nWhen the load balancing scheme is INTERNAL, only TCP and UDP are valid.", - "enum": [ - "AH", - "ESP", - "ICMP", - "SCTP", - "TCP", - "UDP" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ] - }, - "backendService": { - "type": "string", - "description": "This field is not used for external load balancing.\n\nFor internal load balancing, this field identifies the BackendService resource to receive the matched traffic." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "ipVersion": { - "type": "string", - "description": "The IP Version that will be used by this forwarding rule. Valid options are IPV4 or IPV6. This can only be specified for a global forwarding rule.", - "enum": [ - "IPV4", - "IPV6", - "UNSPECIFIED_VERSION" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#forwardingRule for Forwarding Rule resources.", - "default": "compute#forwardingRule" - }, - "loadBalancingScheme": { - "type": "string", - "description": "This signifies what the ForwardingRule will be used for and can only take the following values: INTERNAL, EXTERNAL The value of INTERNAL means that this will be used for Internal Network Load Balancing (TCP, UDP). The value of EXTERNAL means that this will be used for External Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy)", - "enum": [ - "EXTERNAL", - "INTERNAL", - "INVALID" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "name": { - "type": "string", - "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "network": { - "type": "string", - "description": "This field is not used for external load balancing.\n\nFor internal load balancing, this field identifies the network that the load balanced IP should belong to for this Forwarding Rule. If this field is not specified, the default network will be used." - }, - "portRange": { - "type": "string", - "description": "This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance.\n\nApplicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges.\n\nSome types of forwarding target have constraints on the acceptable ports: \n- TargetHttpProxy: 80, 8080 \n- TargetHttpsProxy: 443 \n- TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 \n- TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 \n- TargetVpnGateway: 500, 4500\n-" - }, - "ports": { - "type": "array", - "description": "This field is used along with the backend_service field for internal load balancing.\n\nWhen the load balancing scheme is INTERNAL, a single port or a comma separated list of ports can be configured. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule.\n\nYou may specify a maximum of up to 5 ports.", - "items": { - "type": "string" - } - }, - "region": { - "type": "string", - "description": "[Output Only] URL of the region where the regional forwarding rule resides. This field is not applicable to global forwarding rules." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "subnetwork": { - "type": "string", - "description": "This field is not used for external load balancing.\n\nFor internal load balancing, this field identifies the subnetwork that the load balanced IP should belong to for this Forwarding Rule.\n\nIf the network specified is in auto subnet mode, this field is optional. However, if the network is in custom subnet mode, a subnetwork must be specified." - }, - "target": { - "type": "string", - "description": "The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must live in the same region as the forwarding rule. For global forwarding rules, this target must be a global load balancing resource. The forwarded traffic must be of a type appropriate to the target object.\n\nThis field is not used for internal load balancing." - } - } - }, - "ForwardingRuleAggregatedList": { - "id": "ForwardingRuleAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of ForwardingRulesScopedList resources.", - "additionalProperties": { - "$ref": "ForwardingRulesScopedList", - "description": "Name of the scope containing this set of addresses." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#forwardingRuleAggregatedList for lists of forwarding rules.", - "default": "compute#forwardingRuleAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "ForwardingRuleList": { - "id": "ForwardingRuleList", - "type": "object", - "description": "Contains a list of ForwardingRule resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of ForwardingRule resources.", - "items": { - "$ref": "ForwardingRule" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#forwardingRuleList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "ForwardingRulesScopedList": { - "id": "ForwardingRulesScopedList", - "type": "object", - "properties": { - "forwardingRules": { - "type": "array", - "description": "List of forwarding rules contained in this scope.", - "items": { - "$ref": "ForwardingRule" - } - }, - "warning": { - "type": "object", - "description": "Informational warning which replaces the list of forwarding rules when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "GlobalSetLabelsRequest": { - "id": "GlobalSetLabelsRequest", - "type": "object", - "properties": { - "labelFingerprint": { - "type": "string", - "description": "The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash when updating or changing labels. Make a get() request to the resource to get the latest fingerprint.", - "format": "byte" - }, - "labels": { - "type": "object", - "description": "A list of labels to apply for this resource. Each label key & value must comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. For example, \"webserver-frontend\": \"images\". A label value can also be empty (e.g. \"my-label\": \"\").", - "additionalProperties": { - "type": "string" - } - } - } - }, - "GuestOsFeature": { - "id": "GuestOsFeature", - "type": "object", - "description": "Guest OS features.", - "properties": { - "type": { - "type": "string", - "description": "The type of supported feature. Currently only VIRTIO_SCSI_MULTIQUEUE is supported. For newer Windows images, the server might also populate this property with the value WINDOWS to indicate that this is a Windows image. This value is purely informational and does not enable or disable any features.", - "enum": [ - "FEATURE_TYPE_UNSPECIFIED", - "VIRTIO_SCSI_MULTIQUEUE", - "WINDOWS" - ], - "enumDescriptions": [ - "", - "", - "" - ] - } - } - }, - "HTTPHealthCheck": { - "id": "HTTPHealthCheck", - "type": "object", - "properties": { - "host": { - "type": "string", - "description": "The value of the host header in the HTTP health check request. If left empty (default value), the IP on behalf of which this health check is performed will be used." - }, - "port": { - "type": "integer", - "description": "The TCP port number for the health check request. The default value is 80. Valid values are 1 through 65535.", - "format": "int32" - }, - "portName": { - "type": "string", - "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence." - }, - "proxyHeader": { - "type": "string", - "description": "Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "requestPath": { - "type": "string", - "description": "The request path of the HTTP health check request. The default value is /." - } - } - }, - "HTTPSHealthCheck": { - "id": "HTTPSHealthCheck", - "type": "object", - "properties": { - "host": { - "type": "string", - "description": "The value of the host header in the HTTPS health check request. If left empty (default value), the IP on behalf of which this health check is performed will be used." - }, - "port": { - "type": "integer", - "description": "The TCP port number for the health check request. The default value is 443. Valid values are 1 through 65535.", - "format": "int32" - }, - "portName": { - "type": "string", - "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence." - }, - "proxyHeader": { - "type": "string", - "description": "Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "requestPath": { - "type": "string", - "description": "The request path of the HTTPS health check request. The default value is /." - } - } - }, - "HealthCheck": { - "id": "HealthCheck", - "type": "object", - "description": "An HealthCheck resource. This resource defines a template for how individual virtual machines should be checked for health, via one of the supported protocols.", - "properties": { - "checkIntervalSec": { - "type": "integer", - "description": "How often (in seconds) to send a health check. The default value is 5 seconds.", - "format": "int32" - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in 3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "healthyThreshold": { - "type": "integer", - "description": "A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.", - "format": "int32" - }, - "httpHealthCheck": { - "$ref": "HTTPHealthCheck" - }, - "httpsHealthCheck": { - "$ref": "HTTPSHealthCheck" - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "Type of the resource.", - "default": "compute#healthCheck" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "sslHealthCheck": { - "$ref": "SSLHealthCheck" - }, - "tcpHealthCheck": { - "$ref": "TCPHealthCheck" - }, - "timeoutSec": { - "type": "integer", - "description": "How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.", - "format": "int32" - }, - "type": { - "type": "string", - "description": "Specifies the type of the healthCheck, either TCP, SSL, HTTP or HTTPS. If not specified, the default is TCP. Exactly one of the protocol-specific health check field must be specified, which must match type field.", - "enum": [ - "HTTP", - "HTTPS", - "INVALID", - "SSL", - "TCP" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ] - }, - "unhealthyThreshold": { - "type": "integer", - "description": "A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.", - "format": "int32" - } - } - }, - "HealthCheckList": { - "id": "HealthCheckList", - "type": "object", - "description": "Contains a list of HealthCheck resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of HealthCheck resources.", - "items": { - "$ref": "HealthCheck" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#healthCheckList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "HealthCheckReference": { - "id": "HealthCheckReference", - "type": "object", - "description": "A full or valid partial URL to a health check. For example, the following are valid URLs: \n- https://www.googleapis.com/compute/beta/projects/project-id/global/httpHealthChecks/health-check \n- projects/project-id/global/httpHealthChecks/health-check \n- global/httpHealthChecks/health-check", - "properties": { - "healthCheck": { - "type": "string" - } - } - }, - "HealthStatus": { - "id": "HealthStatus", - "type": "object", - "properties": { - "healthState": { - "type": "string", - "description": "Health state of the instance.", - "enum": [ - "HEALTHY", - "UNHEALTHY" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "instance": { - "type": "string", - "description": "URL of the instance resource." - }, - "ipAddress": { - "type": "string", - "description": "The IP address represented by this resource." - }, - "port": { - "type": "integer", - "description": "The port on the instance.", - "format": "int32" - } - } - }, - "HostRule": { - "id": "HostRule", - "type": "object", - "description": "UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.", - "properties": { - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "hosts": { - "type": "array", - "description": "The list of host patterns to match. They must be valid hostnames, except * will match any string of ([a-z0-9-.]*). In that case, * must be the first character and must be followed in the pattern by either - or ..", - "items": { - "type": "string" - } - }, - "pathMatcher": { - "type": "string", - "description": "The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion." - } - } - }, - "HttpHealthCheck": { - "id": "HttpHealthCheck", - "type": "object", - "description": "An HttpHealthCheck resource. This resource defines a template for how individual instances should be checked for health, via HTTP.", - "properties": { - "checkIntervalSec": { - "type": "integer", - "description": "How often (in seconds) to send a health check. The default value is 5 seconds.", - "format": "int32" - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "healthyThreshold": { - "type": "integer", - "description": "A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.", - "format": "int32" - }, - "host": { - "type": "string", - "description": "The value of the host header in the HTTP health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#httpHealthCheck for HTTP health checks.", - "default": "compute#httpHealthCheck" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "port": { - "type": "integer", - "description": "The TCP port number for the HTTP health check request. The default value is 80.", - "format": "int32" - }, - "requestPath": { - "type": "string", - "description": "The request path of the HTTP health check request. The default value is /." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "timeoutSec": { - "type": "integer", - "description": "How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.", - "format": "int32" - }, - "unhealthyThreshold": { - "type": "integer", - "description": "A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.", - "format": "int32" - } - } - }, - "HttpHealthCheckList": { - "id": "HttpHealthCheckList", - "type": "object", - "description": "Contains a list of HttpHealthCheck resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of HttpHealthCheck resources.", - "items": { - "$ref": "HttpHealthCheck" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#httpHealthCheckList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "HttpsHealthCheck": { - "id": "HttpsHealthCheck", - "type": "object", - "description": "An HttpsHealthCheck resource. This resource defines a template for how individual instances should be checked for health, via HTTPS.", - "properties": { - "checkIntervalSec": { - "type": "integer", - "description": "How often (in seconds) to send a health check. The default value is 5 seconds.", - "format": "int32" - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "healthyThreshold": { - "type": "integer", - "description": "A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.", - "format": "int32" - }, - "host": { - "type": "string", - "description": "The value of the host header in the HTTPS health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "Type of the resource.", - "default": "compute#httpsHealthCheck" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "port": { - "type": "integer", - "description": "The TCP port number for the HTTPS health check request. The default value is 443.", - "format": "int32" - }, - "requestPath": { - "type": "string", - "description": "The request path of the HTTPS health check request. The default value is \"/\"." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "timeoutSec": { - "type": "integer", - "description": "How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have a greater value than checkIntervalSec.", - "format": "int32" - }, - "unhealthyThreshold": { - "type": "integer", - "description": "A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.", - "format": "int32" - } - } - }, - "HttpsHealthCheckList": { - "id": "HttpsHealthCheckList", - "type": "object", - "description": "Contains a list of HttpsHealthCheck resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of HttpsHealthCheck resources.", - "items": { - "$ref": "HttpsHealthCheck" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#httpsHealthCheckList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "Image": { - "id": "Image", - "type": "object", - "description": "An Image resource.", - "properties": { - "archiveSizeBytes": { - "type": "string", - "description": "Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).", - "format": "int64" - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "The deprecation status associated with this image." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "diskSizeGb": { - "type": "string", - "description": "Size of the image when restored onto a persistent disk (in GB).", - "format": "int64" - }, - "family": { - "type": "string", - "description": "The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035." - }, - "guestOsFeatures": { - "type": "array", - "description": "A list of features to enable on the guest OS. Applicable for bootable images only. Currently, only one feature can be enabled, VIRTIO_SCSI_MULTIQUEUE, which allows each virtual CPU to have its own queue. For Windows images, you can only enable VIRTIO_SCSI_MULTIQUEUE on images with driver version 1.2.0.1621 or higher. Linux images with kernel versions 3.17 and higher will support VIRTIO_SCSI_MULTIQUEUE.\n\nFor new Windows images, the server might also populate this field with the value WINDOWS, to indicate that this is a Windows image. This value is purely informational and does not enable or disable any features.", - "items": { - "$ref": "GuestOsFeature" - } - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "imageEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Encrypts the image using a customer-supplied encryption key.\n\nAfter you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image).\n\nCustomer-supplied encryption keys do not protect access to metadata of the disk.\n\nIf you do not provide an encryption key when creating the image, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the image later." - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#image for images.", - "default": "compute#image" - }, - "labelFingerprint": { - "type": "string", - "description": "A fingerprint for the labels being applied to this image, which is essentially a hash of the labels used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve an image.", - "format": "byte" - }, - "labels": { - "type": "object", - "description": "Labels to apply to this image. These can be later modified by the setLabels method.", - "additionalProperties": { - "type": "string" - } - }, - "licenses": { - "type": "array", - "description": "Any applicable license URI.", - "items": { - "type": "string" - } - }, - "name": { - "type": "string", - "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.images.insert" - ] - } - }, - "rawDisk": { - "type": "object", - "description": "The parameters of the raw disk image.", - "properties": { - "containerType": { - "type": "string", - "description": "The format used to encode and transmit the block device, which should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created.", - "enum": [ - "TAR" - ], - "enumDescriptions": [ - "" - ] - }, - "sha1Checksum": { - "type": "string", - "description": "An optional SHA1 checksum of the disk image before unpackaging; provided by the client when the disk image is created.", - "pattern": "[a-f0-9]{40}" - }, - "source": { - "type": "string", - "description": "The full Google Cloud Storage URL where the disk image is stored. You must provide either this property or the sourceDisk property but not both.", - "annotations": { - "required": [ - "compute.images.insert" - ] - } - } - } - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "sourceDisk": { - "type": "string", - "description": "URL of the source disk used to create this image. This can be a full or valid partial URL. You must provide either this property or the rawDisk.source property but not both to create an image. For example, the following are valid values: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk \n- projects/project/zones/zone/disks/disk \n- zones/zone/disks/disk" - }, - "sourceDiskEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key." - }, - "sourceDiskId": { - "type": "string", - "description": "The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name." - }, - "sourceType": { - "type": "string", - "description": "The type of the image used to create this disk. The default and only value is RAW", - "default": "RAW", - "enum": [ - "RAW" - ], - "enumDescriptions": [ - "" - ] - }, - "status": { - "type": "string", - "description": "[Output Only] The status of the image. An image can be used to create other resources, such as instances, only after the image has been successfully created and the status is set to READY. Possible values are FAILED, PENDING, or READY.", - "enum": [ - "FAILED", - "PENDING", - "READY" - ], - "enumDescriptions": [ - "", - "", - "" - ] - } - } - }, - "ImageList": { - "id": "ImageList", - "type": "object", - "description": "Contains a list of images.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Image resources.", - "items": { - "$ref": "Image" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#imageList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "Instance": { - "id": "Instance", - "type": "object", - "description": "An Instance resource.", - "properties": { - "canIpForward": { - "type": "boolean", - "description": "Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding." - }, - "cpuPlatform": { - "type": "string", - "description": "[Output Only] The CPU platform used by this instance." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "disks": { - "type": "array", - "description": "Array of disks associated with this instance. Persistent disks must be created before you can assign them.", - "items": { - "$ref": "AttachedDisk" - } - }, - "guestAccelerators": { - "type": "array", - "description": "List of the type and count of accelerator cards attached to the instance.", - "items": { - "$ref": "AcceleratorConfig" - } - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#instance for instances.", - "default": "compute#instance" - }, - "labelFingerprint": { - "type": "string", - "description": "A fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.\n\nTo see the latest fingerprint, make get() request to the instance.", - "format": "byte" - }, - "labels": { - "type": "object", - "description": "Labels to apply to this instance. These can be later modified by the setLabels method.", - "additionalProperties": { - "type": "string" - } - }, - "machineType": { - "type": "string", - "description": "Full or partial URL of the machine type resource to use for this instance, in the format: zones/zone/machineTypes/machine-type. This is provided by the client when the instance is created. For example, the following is a valid partial url to a predefined machine type:\n\nzones/us-central1-f/machineTypes/n1-standard-1 \n\nTo create a custom machine type, provide a URL to a machine type in the following format, where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, etc), and MEMORY is the total memory for this instance. Memory must be a multiple of 256 MB and must be supplied in MB (e.g. 5 GB of memory is 5120 MB):\n\nzones/zone/machineTypes/custom-CPUS-MEMORY \n\nFor example: zones/us-central1-f/machineTypes/custom-4-5120 \n\nFor a full list of restrictions, read the Specifications for custom machine types.", - "annotations": { - "required": [ - "compute.instances.insert" - ] - } - }, - "metadata": { - "$ref": "Metadata", - "description": "The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys." - }, - "name": { - "type": "string", - "description": "The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.instances.insert" - ] - } - }, - "networkInterfaces": { - "type": "array", - "description": "An array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Only one interface is supported per instance.", - "items": { - "$ref": "NetworkInterface" - } - }, - "scheduling": { - "$ref": "Scheduling", - "description": "Sets the scheduling options for this instance." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - }, - "serviceAccounts": { - "type": "array", - "description": "A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.\n\nService accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Service Accounts for more information.", - "items": { - "$ref": "ServiceAccount" - } - }, - "startRestricted": { - "type": "boolean", - "description": "[Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity." - }, - "status": { - "type": "string", - "description": "[Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.", - "enum": [ - "PROVISIONING", - "RUNNING", - "STAGING", - "STOPPED", - "STOPPING", - "SUSPENDED", - "SUSPENDING", - "TERMINATED" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "statusMessage": { - "type": "string", - "description": "[Output Only] An optional, human-readable explanation of the status." - }, - "tags": { - "$ref": "Tags", - "description": "A list of tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035." - }, - "zone": { - "type": "string", - "description": "[Output Only] URL of the zone where the instance resides." - } - } - }, - "InstanceAggregatedList": { - "id": "InstanceAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of InstancesScopedList resources.", - "additionalProperties": { - "$ref": "InstancesScopedList", - "description": "[Output Only] Name of the scope containing this set of instances." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#instanceAggregatedList for aggregated lists of Instance resources.", - "default": "compute#instanceAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "InstanceGroup": { - "id": "InstanceGroup", - "type": "object", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] The creation timestamp for this instance group in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "fingerprint": { - "type": "string", - "description": "[Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently.", - "format": "byte" - }, - "id": { - "type": "string", - "description": "[Output Only] A unique identifier for this instance group, generated by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] The resource type, which is always compute#instanceGroup for instance groups.", - "default": "compute#instanceGroup" - }, - "name": { - "type": "string", - "description": "The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.instanceGroupManagers.insert" - ] - } - }, - "namedPorts": { - "type": "array", - "description": "Assigns a name to a port number. For example: {name: \"http\", port: 80}\n\nThis allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: \"http\", port: 80},{name: \"http\", port: 8080}] \n\nNamed ports apply to all instances in this instance group.", - "items": { - "$ref": "NamedPort" - } - }, - "network": { - "type": "string", - "description": "The URL of the network to which all instances in the instance group belong." - }, - "region": { - "type": "string", - "description": "The URL of the region where the instance group is located (for regional resources)." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] The URL for this instance group. The server generates this URL." - }, - "size": { - "type": "integer", - "description": "[Output Only] The total number of instances in the instance group.", - "format": "int32" - }, - "subnetwork": { - "type": "string", - "description": "The URL of the subnetwork to which all instances in the instance group belong." - }, - "zone": { - "type": "string", - "description": "[Output Only] The URL of the zone where the instance group is located (for zonal resources)." - } - } - }, - "InstanceGroupAggregatedList": { - "id": "InstanceGroupAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of InstanceGroupsScopedList resources.", - "additionalProperties": { - "$ref": "InstanceGroupsScopedList", - "description": "The name of the scope that contains this set of instance groups." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] The resource type, which is always compute#instanceGroupAggregatedList for aggregated lists of instance groups.", - "default": "compute#instanceGroupAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "InstanceGroupList": { - "id": "InstanceGroupList", - "type": "object", - "description": "A list of InstanceGroup resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of InstanceGroup resources.", - "items": { - "$ref": "InstanceGroup" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] The resource type, which is always compute#instanceGroupList for instance group lists.", - "default": "compute#instanceGroupList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "InstanceGroupManager": { - "id": "InstanceGroupManager", - "type": "object", - "description": "An Instance Group Manager resource.", - "properties": { - "baseInstanceName": { - "type": "string", - "description": "The base instance name to use for instances in this group. The value must be 1-58 characters long. Instances are named by appending a hyphen and a random four-character string to the base instance name. The base instance name must comply with RFC1035.", - "pattern": "[a-z][-a-z0-9]{0,57}", - "annotations": { - "required": [ - "compute.instanceGroupManagers.insert" - ] - } - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] The creation timestamp for this managed instance group in RFC3339 text format." - }, - "currentActions": { - "$ref": "InstanceGroupManagerActionsSummary", - "description": "[Output Only] The list of instance actions and the number of instances in this managed instance group that are scheduled for each of those actions." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "fingerprint": { - "type": "string", - "description": "[Output Only] The fingerprint of the resource data. You can use this optional field for optimistic locking when you update the resource.", - "format": "byte" - }, - "id": { - "type": "string", - "description": "[Output Only] A unique identifier for this resource type. The server generates this identifier.", - "format": "uint64" - }, - "instanceGroup": { - "type": "string", - "description": "[Output Only] The URL of the Instance Group resource." - }, - "instanceTemplate": { - "type": "string", - "description": "The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group." - }, - "kind": { - "type": "string", - "description": "[Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.", - "default": "compute#instanceGroupManager" - }, - "name": { - "type": "string", - "description": "The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.instanceGroupManagers.insert", - "compute.regionInstanceGroupManagers.insert" - ] - } - }, - "namedPorts": { - "type": "array", - "description": "Named ports configured for the Instance Groups complementary to this Instance Group Manager.", - "items": { - "$ref": "NamedPort" - } - }, - "region": { - "type": "string", - "description": "[Output Only] The URL of the region where the managed instance group resides (for regional resources)." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] The URL for this managed instance group. The server defines this URL." - }, - "targetPools": { - "type": "array", - "description": "The URLs for all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group.", - "items": { - "type": "string" - } - }, - "targetSize": { - "type": "integer", - "description": "The target number of running instances for this managed instance group. Deleting or abandoning instances reduces this number. Resizing the group changes this number.", - "format": "int32", - "annotations": { - "required": [ - "compute.instanceGroupManagers.insert", - "compute.regionInstanceGroupManagers.insert" - ] - } - }, - "zone": { - "type": "string", - "description": "[Output Only] The URL of the zone where the managed instance group is located (for zonal resources)." - } - } - }, - "InstanceGroupManagerActionsSummary": { - "id": "InstanceGroupManagerActionsSummary", - "type": "object", - "properties": { - "abandoning": { - "type": "integer", - "description": "[Output Only] The total number of instances in the managed instance group that are scheduled to be abandoned. Abandoning an instance removes it from the managed instance group without deleting it.", - "format": "int32" - }, - "creating": { - "type": "integer", - "description": "[Output Only] The number of instances in the managed instance group that are scheduled to be created or are currently being created. If the group fails to create any of these instances, it tries again until it creates the instance successfully.\n\nIf you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.", - "format": "int32" - }, - "creatingWithoutRetries": { - "type": "integer", - "description": "[Output Only] The number of instances that the managed instance group will attempt to create. The group attempts to create each instance only once. If the group fails to create any of these instances, it decreases the group's targetSize value accordingly.", - "format": "int32" - }, - "deleting": { - "type": "integer", - "description": "[Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.", - "format": "int32" - }, - "none": { - "type": "integer", - "description": "[Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.", - "format": "int32" - }, - "recreating": { - "type": "integer", - "description": "[Output Only] The number of instances in the managed instance group that are scheduled to be recreated or are currently being being recreated. Recreating an instance deletes the existing root persistent disk and creates a new disk from the image that is defined in the instance template.", - "format": "int32" - }, - "refreshing": { - "type": "integer", - "description": "[Output Only] The number of instances in the managed instance group that are being reconfigured with properties that do not require a restart or a recreate action. For example, setting or removing target pools for the instance.", - "format": "int32" - }, - "restarting": { - "type": "integer", - "description": "[Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.", - "format": "int32" - } - } - }, - "InstanceGroupManagerAggregatedList": { - "id": "InstanceGroupManagerAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of InstanceGroupManagersScopedList resources.", - "additionalProperties": { - "$ref": "InstanceGroupManagersScopedList", - "description": "[Output Only] The name of the scope that contains this set of managed instance groups." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] The resource type, which is always compute#instanceGroupManagerAggregatedList for an aggregated list of managed instance groups.", - "default": "compute#instanceGroupManagerAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "InstanceGroupManagerList": { - "id": "InstanceGroupManagerList", - "type": "object", - "description": "[Output Only] A list of managed instance groups.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of InstanceGroupManager resources.", - "items": { - "$ref": "InstanceGroupManager" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] The resource type, which is always compute#instanceGroupManagerList for a list of managed instance groups.", - "default": "compute#instanceGroupManagerList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "InstanceGroupManagersAbandonInstancesRequest": { - "id": "InstanceGroupManagersAbandonInstancesRequest", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "The URLs of one or more instances to abandon. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - } - } - } - }, - "InstanceGroupManagersDeleteInstancesRequest": { - "id": "InstanceGroupManagersDeleteInstancesRequest", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - } - } - } - }, - "InstanceGroupManagersListManagedInstancesResponse": { - "id": "InstanceGroupManagersListManagedInstancesResponse", - "type": "object", - "properties": { - "managedInstances": { - "type": "array", - "description": "[Output Only] The list of instances in the managed instance group.", - "items": { - "$ref": "ManagedInstance" - } - } - } - }, - "InstanceGroupManagersRecreateInstancesRequest": { - "id": "InstanceGroupManagersRecreateInstancesRequest", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "The URLs of one or more instances to recreate. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - } - } - } - }, - "InstanceGroupManagersScopedList": { - "id": "InstanceGroupManagersScopedList", - "type": "object", - "properties": { - "instanceGroupManagers": { - "type": "array", - "description": "[Output Only] The list of managed instance groups that are contained in the specified project and zone.", - "items": { - "$ref": "InstanceGroupManager" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] The warning that replaces the list of managed instance groups when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "InstanceGroupManagersSetInstanceTemplateRequest": { - "id": "InstanceGroupManagersSetInstanceTemplateRequest", - "type": "object", - "properties": { - "instanceTemplate": { - "type": "string", - "description": "The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group." - } - } - }, - "InstanceGroupManagersSetTargetPoolsRequest": { - "id": "InstanceGroupManagersSetTargetPoolsRequest", - "type": "object", - "properties": { - "fingerprint": { - "type": "string", - "description": "The fingerprint of the target pools information. Use this optional property to prevent conflicts when multiple users change the target pools settings concurrently. Obtain the fingerprint with the instanceGroupManagers.get method. Then, include the fingerprint in your request to ensure that you do not overwrite changes that were applied from another concurrent request.", - "format": "byte" - }, - "targetPools": { - "type": "array", - "description": "The list of target pool URLs that instances in this managed instance group belong to. The managed instance group applies these target pools to all of the instances in the group. Existing instances and new instances in the group all receive these target pool settings.", - "items": { - "type": "string" - } - } - } - }, - "InstanceGroupsAddInstancesRequest": { - "id": "InstanceGroupsAddInstancesRequest", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "The list of instances to add to the instance group.", - "items": { - "$ref": "InstanceReference" - } - } - } - }, - "InstanceGroupsListInstances": { - "id": "InstanceGroupsListInstances", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of InstanceWithNamedPorts resources.", - "items": { - "$ref": "InstanceWithNamedPorts" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] The resource type, which is always compute#instanceGroupsListInstances for the list of instances in the specified instance group.", - "default": "compute#instanceGroupsListInstances" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "InstanceGroupsListInstancesRequest": { - "id": "InstanceGroupsListInstancesRequest", - "type": "object", - "properties": { - "instanceState": { - "type": "string", - "description": "A filter for the state of the instances in the instance group. Valid options are ALL or RUNNING. If you do not specify this parameter the list includes all instances regardless of their state.", - "enum": [ - "ALL", - "RUNNING" - ], - "enumDescriptions": [ - "", - "" - ] - } - } - }, - "InstanceGroupsRemoveInstancesRequest": { - "id": "InstanceGroupsRemoveInstancesRequest", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "The list of instances to remove from the instance group.", - "items": { - "$ref": "InstanceReference" - } - } - } - }, - "InstanceGroupsScopedList": { - "id": "InstanceGroupsScopedList", - "type": "object", - "properties": { - "instanceGroups": { - "type": "array", - "description": "[Output Only] The list of instance groups that are contained in this scope.", - "items": { - "$ref": "InstanceGroup" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] An informational warning that replaces the list of instance groups when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "InstanceGroupsSetNamedPortsRequest": { - "id": "InstanceGroupsSetNamedPortsRequest", - "type": "object", - "properties": { - "fingerprint": { - "type": "string", - "description": "The fingerprint of the named ports information for this instance group. Use this optional property to prevent conflicts when multiple users change the named ports settings concurrently. Obtain the fingerprint with the instanceGroups.get method. Then, include the fingerprint in your request to ensure that you do not overwrite changes that were applied from another concurrent request.", - "format": "byte" - }, - "namedPorts": { - "type": "array", - "description": "The list of named ports to set for this instance group.", - "items": { - "$ref": "NamedPort" - } - } - } - }, - "InstanceList": { - "id": "InstanceList", - "type": "object", - "description": "Contains a list of instances.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Instance resources.", - "items": { - "$ref": "Instance" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#instanceList for lists of Instance resources.", - "default": "compute#instanceList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "InstanceMoveRequest": { - "id": "InstanceMoveRequest", - "type": "object", - "properties": { - "destinationZone": { - "type": "string", - "description": "The URL of the destination zone to move the instance. This can be a full or partial URL. For example, the following are all valid URLs to a zone: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone \n- projects/project/zones/zone \n- zones/zone" - }, - "targetInstance": { - "type": "string", - "description": "The URL of the target instance to move. This can be a full or partial URL. For example, the following are all valid URLs to an instance: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance \n- projects/project/zones/zone/instances/instance \n- zones/zone/instances/instance" - } - } - }, - "InstanceProperties": { - "id": "InstanceProperties", - "type": "object", - "description": "", - "properties": { - "canIpForward": { - "type": "boolean", - "description": "Enables instances created based on this template to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. See the Enable IP forwarding documentation for more information." - }, - "description": { - "type": "string", - "description": "An optional text description for the instances that are created from this instance template." - }, - "disks": { - "type": "array", - "description": "An array of disks that are associated with the instances that are created from this template.", - "items": { - "$ref": "AttachedDisk" - } - }, - "guestAccelerators": { - "type": "array", - "description": "A list of guest accelerator cards' type and count to use for instances created from the instance template.", - "items": { - "$ref": "AcceleratorConfig" - } - }, - "labels": { - "type": "object", - "description": "Labels to apply to instances that are created from this template.", - "additionalProperties": { - "type": "string" - } - }, - "machineType": { - "type": "string", - "description": "The machine type to use for instances that are created from this template.", - "annotations": { - "required": [ - "compute.instanceTemplates.insert" - ] - } - }, - "metadata": { - "$ref": "Metadata", - "description": "The metadata key/value pairs to assign to instances that are created from this template. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information." - }, - "networkInterfaces": { - "type": "array", - "description": "An array of network access configurations for this interface.", - "items": { - "$ref": "NetworkInterface" - } - }, - "scheduling": { - "$ref": "Scheduling", - "description": "Specifies the scheduling options for the instances that are created from this template." - }, - "serviceAccounts": { - "type": "array", - "description": "A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from this template. Use metadata queries to obtain the access tokens for these instances.", - "items": { - "$ref": "ServiceAccount" - } - }, - "tags": { - "$ref": "Tags", - "description": "A list of tags to apply to the instances that are created from this template. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035." - } - } - }, - "InstanceReference": { - "id": "InstanceReference", - "type": "object", - "properties": { - "instance": { - "type": "string", - "description": "The URL for a specific instance." - } - } - }, - "InstanceTemplate": { - "id": "InstanceTemplate", - "type": "object", - "description": "An Instance Template resource.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] The creation timestamp for this instance template in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] A unique identifier for this instance template. The server defines this identifier.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] The resource type, which is always compute#instanceTemplate for instance templates.", - "default": "compute#instanceTemplate" - }, - "name": { - "type": "string", - "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.instanceTemplates.insert" - ] - } - }, - "properties": { - "$ref": "InstanceProperties", - "description": "The instance properties for this instance template." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] The URL for this instance template. The server defines this URL." - } - } - }, - "InstanceTemplateList": { - "id": "InstanceTemplateList", - "type": "object", - "description": "A list of instance templates.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of InstanceTemplate resources.", - "items": { - "$ref": "InstanceTemplate" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] The resource type, which is always compute#instanceTemplatesListResponse for instance template lists.", - "default": "compute#instanceTemplateList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "InstanceWithNamedPorts": { - "id": "InstanceWithNamedPorts", - "type": "object", - "properties": { - "instance": { - "type": "string", - "description": "[Output Only] The URL of the instance." - }, - "namedPorts": { - "type": "array", - "description": "[Output Only] The named ports that belong to this instance group.", - "items": { - "$ref": "NamedPort" - } - }, - "status": { - "type": "string", - "description": "[Output Only] The status of the instance.", - "enum": [ - "PROVISIONING", - "RUNNING", - "STAGING", - "STOPPED", - "STOPPING", - "SUSPENDED", - "SUSPENDING", - "TERMINATED" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "" - ] - } - } - }, - "InstancesScopedList": { - "id": "InstancesScopedList", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "[Output Only] List of instances contained in this scope.", - "items": { - "$ref": "Instance" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] Informational warning which replaces the list of instances when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "InstancesSetLabelsRequest": { - "id": "InstancesSetLabelsRequest", - "type": "object", - "properties": { - "labelFingerprint": { - "type": "string", - "description": "Fingerprint of the previous set of labels for this resource, used to prevent conflicts. Provide the latest fingerprint value when making a request to add or change labels.", - "format": "byte" - }, - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "InstancesSetMachineResourcesRequest": { - "id": "InstancesSetMachineResourcesRequest", - "type": "object", - "properties": { - "guestAccelerators": { - "type": "array", - "description": "List of the type and count of accelerator cards attached to the instance.", - "items": { - "$ref": "AcceleratorConfig" - } - } - } - }, - "InstancesSetMachineTypeRequest": { - "id": "InstancesSetMachineTypeRequest", - "type": "object", - "properties": { - "machineType": { - "type": "string", - "description": "Full or partial URL of the machine type resource. See Machine Types for a full list of machine types. For example: zones/us-central1-f/machineTypes/n1-standard-1" - } - } - }, - "InstancesSetServiceAccountRequest": { - "id": "InstancesSetServiceAccountRequest", - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "Email address of the service account." - }, - "scopes": { - "type": "array", - "description": "The list of scopes to be made available for this service account.", - "items": { - "type": "string" - } - } - } - }, - "InstancesStartWithEncryptionKeyRequest": { - "id": "InstancesStartWithEncryptionKeyRequest", - "type": "object", - "properties": { - "disks": { - "type": "array", - "description": "Array of disks associated with this instance that are protected with a customer-supplied encryption key.\n\nIn order to start the instance, the disk url and its corresponding key must be provided.\n\nIf the disk is not protected with a customer-supplied encryption key it should not be specified.", - "items": { - "$ref": "CustomerEncryptionKeyProtectedDisk" - } - } - } - }, - "License": { - "id": "License", - "type": "object", - "description": "A license resource.", - "properties": { - "chargesUseFee": { - "type": "boolean", - "description": "[Output Only] Deprecated. This field no longer reflects whether a license charges a usage fee." - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#license for licenses.", - "default": "compute#license" - }, - "name": { - "type": "string", - "description": "[Output Only] Name of the resource. The name is 1-63 characters long and complies with RFC1035.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.images.insert" - ] - } - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - } - } - }, - "MachineType": { - "id": "MachineType", - "type": "object", - "description": "A Machine Type resource.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "[Output Only] The deprecation status associated with this machine type." - }, - "description": { - "type": "string", - "description": "[Output Only] An optional textual description of the resource." - }, - "guestCpus": { - "type": "integer", - "description": "[Output Only] The number of virtual CPUs that are available to the instance.", - "format": "int32" - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "imageSpaceGb": { - "type": "integer", - "description": "[Deprecated] This property is deprecated and will never be populated with any relevant values.", - "format": "int32" - }, - "isSharedCpu": { - "type": "boolean", - "description": "[Output Only] Whether this machine type has a shared CPU. See Shared-core machine types for more information." - }, - "kind": { - "type": "string", - "description": "[Output Only] The type of the resource. Always compute#machineType for machine types.", - "default": "compute#machineType" - }, - "maximumPersistentDisks": { - "type": "integer", - "description": "[Output Only] Maximum persistent disks allowed.", - "format": "int32" - }, - "maximumPersistentDisksSizeGb": { - "type": "string", - "description": "[Output Only] Maximum total persistent disks size (GB) allowed.", - "format": "int64" - }, - "memoryMb": { - "type": "integer", - "description": "[Output Only] The amount of physical memory available to the instance, defined in MB.", - "format": "int32" - }, - "name": { - "type": "string", - "description": "[Output Only] Name of the resource.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "scratchDisks": { - "type": "array", - "description": "[Output Only] List of extended scratch disks assigned to the instance.", - "items": { - "type": "object", - "properties": { - "diskGb": { - "type": "integer", - "description": "Size of the scratch disk, defined in GB.", - "format": "int32" - } - } - } - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "zone": { - "type": "string", - "description": "[Output Only] The name of the zone where the machine type resides, such as us-central1-a." - } - } - }, - "MachineTypeAggregatedList": { - "id": "MachineTypeAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of MachineTypesScopedList resources.", - "additionalProperties": { - "$ref": "MachineTypesScopedList", - "description": "[Output Only] Name of the scope containing this set of machine types." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#machineTypeAggregatedList for aggregated lists of machine types.", - "default": "compute#machineTypeAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "MachineTypeList": { - "id": "MachineTypeList", - "type": "object", - "description": "Contains a list of machine types.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of MachineType resources.", - "items": { - "$ref": "MachineType" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#machineTypeList for lists of machine types.", - "default": "compute#machineTypeList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "MachineTypesScopedList": { - "id": "MachineTypesScopedList", - "type": "object", - "properties": { - "machineTypes": { - "type": "array", - "description": "[Output Only] List of machine types contained in this scope.", - "items": { - "$ref": "MachineType" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] An informational warning that appears when the machine types list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "ManagedInstance": { - "id": "ManagedInstance", - "type": "object", - "properties": { - "currentAction": { - "type": "string", - "description": "[Output Only] The current action that the managed instance group has scheduled for the instance. Possible values: \n- NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance. \n- CREATING The managed instance group is creating this instance. If the group fails to create this instance, it will try again until it is successful. \n- CREATING_WITHOUT_RETRIES The managed instance group is attempting to create this instance only once. If the group fails to create this instance, it does not try again and the group's targetSize value is decreased instead. \n- RECREATING The managed instance group is recreating this instance. \n- DELETING The managed instance group is permanently deleting this instance. \n- ABANDONING The managed instance group is abandoning this instance. The instance will be removed from the instance group and from any target pools that are associated with this group. \n- RESTARTING The managed instance group is restarting the instance. \n- REFRESHING The managed instance group is applying configuration changes to the instance without stopping it. For example, the group can update the target pool list for an instance without stopping that instance.", - "enum": [ - "ABANDONING", - "CREATING", - "CREATING_WITHOUT_RETRIES", - "DELETING", - "NONE", - "RECREATING", - "REFRESHING", - "RESTARTING" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "id": { - "type": "string", - "description": "[Output only] The unique identifier for this resource. This field is empty when instance does not exist.", - "format": "uint64" - }, - "instance": { - "type": "string", - "description": "[Output Only] The URL of the instance. The URL can exist even if the instance has not yet been created." - }, - "instanceStatus": { - "type": "string", - "description": "[Output Only] The status of the instance. This field is empty when the instance does not exist.", - "enum": [ - "PROVISIONING", - "RUNNING", - "STAGING", - "STOPPED", - "STOPPING", - "SUSPENDED", - "SUSPENDING", - "TERMINATED" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "lastAttempt": { - "$ref": "ManagedInstanceLastAttempt", - "description": "[Output Only] Information about the last attempt to create or delete the instance." - } - } - }, - "ManagedInstanceLastAttempt": { - "id": "ManagedInstanceLastAttempt", - "type": "object", - "properties": { - "errors": { - "type": "object", - "description": "[Output Only] Encountered errors during the last attempt to create or delete the instance.", - "properties": { - "errors": { - "type": "array", - "description": "[Output Only] The array of errors encountered while processing this operation.", - "items": { - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] The error type identifier for this error." - }, - "location": { - "type": "string", - "description": "[Output Only] Indicates the field in the request that caused the error. This property is optional." - }, - "message": { - "type": "string", - "description": "[Output Only] An optional, human-readable error message." - } - } - } - } - } - } - } - }, - "Metadata": { - "id": "Metadata", - "type": "object", - "description": "A metadata key/value entry.", - "properties": { - "fingerprint": { - "type": "string", - "description": "Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.", - "format": "byte" - }, - "items": { - "type": "array", - "description": "Array of key/value pairs. The total size of all keys and values must be less than 512 KB.", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.", - "pattern": "[a-zA-Z0-9-_]{1,128}", - "annotations": { - "required": [ - "compute.instances.insert", - "compute.projects.setCommonInstanceMetadata" - ] - } - }, - "value": { - "type": "string", - "description": "Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).", - "annotations": { - "required": [ - "compute.instances.insert", - "compute.projects.setCommonInstanceMetadata" - ] - } - } - } - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#metadata for metadata.", - "default": "compute#metadata" - } - } - }, - "NamedPort": { - "id": "NamedPort", - "type": "object", - "description": "The named port. For example: .", - "properties": { - "name": { - "type": "string", - "description": "The name for this named port. The name must be 1-63 characters long, and comply with RFC1035." - }, - "port": { - "type": "integer", - "description": "The port number, which can be a value between 1 and 65535.", - "format": "int32" - } - } - }, - "Network": { - "id": "Network", - "type": "object", - "description": "Represents a Network resource. Read Networks and Firewalls for more information.", - "properties": { - "IPv4Range": { - "type": "string", - "description": "The range of internal addresses that are legal on this network. This range is a CIDR specification, for example: 192.168.0.0/16. Provided by the client when the network is created.", - "pattern": "[0-9]{1,3}(?:\\.[0-9]{1,3}){3}/[0-9]{1,2}" - }, - "autoCreateSubnetworks": { - "type": "boolean", - "description": "When set to true, the network is created in \"auto subnet mode\". When set to false, the network is in \"custom subnet mode\".\n\nIn \"auto subnet mode\", a newly created network is assigned the default CIDR of 10.128.0.0/9 and it automatically creates one subnetwork per region." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "gatewayIPv4": { - "type": "string", - "description": "A gateway address for default routing to other networks. This value is read only and is selected by the Google Compute Engine, typically as the first usable address in the IPv4Range.", - "pattern": "[0-9]{1,3}(?:\\.[0-9]{1,3}){3}" - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#network for networks.", - "default": "compute#network" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.networks.insert" - ] - } - }, - "peerings": { - "type": "array", - "description": "[Output Only] List of network peerings for the resource.", - "items": { - "$ref": "NetworkPeering" - } - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "subnetworks": { - "type": "array", - "description": "[Output Only] Server-defined fully-qualified URLs for all subnetworks in this network.", - "items": { - "type": "string" - } - } - } - }, - "NetworkInterface": { - "id": "NetworkInterface", - "type": "object", - "description": "A network interface resource attached to an instance.", - "properties": { - "accessConfigs": { - "type": "array", - "description": "An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access.", - "items": { - "$ref": "AccessConfig" - } - }, - "aliasIpRanges": { - "type": "array", - "description": "An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks.", - "items": { - "$ref": "AliasIpRange" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#networkInterface for network interfaces.", - "default": "compute#networkInterface" - }, - "name": { - "type": "string", - "description": "[Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc." - }, - "network": { - "type": "string", - "description": "URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.\n\nThis field is optional when creating a firewall rule. If not specified when creating a firewall rule, the default network global/networks/default is used.\n\nIf you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/global/networks/network \n- projects/project/global/networks/network \n- global/networks/default" - }, - "networkIP": { - "type": "string", - "description": "An IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system." - }, - "subnetwork": { - "type": "string", - "description": "The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. If you specify this property, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork \n- regions/region/subnetworks/subnetwork" - } - } - }, - "NetworkList": { - "id": "NetworkList", - "type": "object", - "description": "Contains a list of networks.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Network resources.", - "items": { - "$ref": "Network" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#networkList for lists of networks.", - "default": "compute#networkList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "NetworkPeering": { - "id": "NetworkPeering", - "type": "object", - "description": "A network peering attached to a network resource. The message includes the peering name, peer network, peering state, and a flag indicating whether Google Compute Engine should automatically create routes for the peering.", - "properties": { - "autoCreateRoutes": { - "type": "boolean", - "description": "Whether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage the routes between two networks when the state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network." - }, - "name": { - "type": "string", - "description": "Name of this peering. Provided by the client when the peering is created. The name must comply with RFC1035. Specifically, the name must be 1-63 characters long and match regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all the following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash." - }, - "network": { - "type": "string", - "description": "The URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network." - }, - "state": { - "type": "string", - "description": "[Output Only] State for the peering.", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "stateDetails": { - "type": "string", - "description": "[Output Only] Details about the current state of the peering." - } - } - }, - "NetworksAddPeeringRequest": { - "id": "NetworksAddPeeringRequest", - "type": "object", - "properties": { - "autoCreateRoutes": { - "type": "boolean", - "description": "Whether Google Compute Engine manages the routes automatically." - }, - "name": { - "type": "string", - "description": "Name of the peering, which should conform to RFC1035." - }, - "peerNetwork": { - "type": "string", - "description": "URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network." - } - } - }, - "NetworksRemovePeeringRequest": { - "id": "NetworksRemovePeeringRequest", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the peering, which should conform to RFC1035." - } - } - }, - "Operation": { - "id": "Operation", - "type": "object", - "description": "An Operation resource, used to manage asynchronous API requests.", - "properties": { - "clientOperationId": { - "type": "string", - "description": "[Output Only] Reserved for future use." - }, - "creationTimestamp": { - "type": "string", - "description": "[Deprecated] This field is deprecated." - }, - "description": { - "type": "string", - "description": "[Output Only] A textual description of the operation, which is set when the operation is created." - }, - "endTime": { - "type": "string", - "description": "[Output Only] The time that this operation was completed. This value is in RFC3339 text format." - }, - "error": { - "type": "object", - "description": "[Output Only] If errors are generated during processing of the operation, this field will be populated.", - "properties": { - "errors": { - "type": "array", - "description": "[Output Only] The array of errors encountered while processing this operation.", - "items": { - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] The error type identifier for this error." - }, - "location": { - "type": "string", - "description": "[Output Only] Indicates the field in the request that caused the error. This property is optional." - }, - "message": { - "type": "string", - "description": "[Output Only] An optional, human-readable error message." - } - } - } - } - } - }, - "httpErrorMessage": { - "type": "string", - "description": "[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND." - }, - "httpErrorStatusCode": { - "type": "integer", - "description": "[Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.", - "format": "int32" - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "insertTime": { - "type": "string", - "description": "[Output Only] The time that this operation was requested. This value is in RFC3339 text format." - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#operation for Operation resources.", - "default": "compute#operation" - }, - "name": { - "type": "string", - "description": "[Output Only] Name of the resource." - }, - "operationType": { - "type": "string", - "description": "[Output Only] The type of operation, such as insert, update, or delete, and so on." - }, - "progress": { - "type": "integer", - "description": "[Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.", - "format": "int32" - }, - "region": { - "type": "string", - "description": "[Output Only] The URL of the region where the operation resides. Only available when performing regional operations." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "startTime": { - "type": "string", - "description": "[Output Only] The time that this operation was started by the server. This value is in RFC3339 text format." - }, - "status": { - "type": "string", - "description": "[Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.", - "enum": [ - "DONE", - "PENDING", - "RUNNING" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "statusMessage": { - "type": "string", - "description": "[Output Only] An optional textual description of the current status of the operation." - }, - "targetId": { - "type": "string", - "description": "[Output Only] The unique target ID, which identifies a specific incarnation of the target resource.", - "format": "uint64" - }, - "targetLink": { - "type": "string", - "description": "[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from." - }, - "user": { - "type": "string", - "description": "[Output Only] User who requested the operation, for example: user@example.com." - }, - "warnings": { - "type": "array", - "description": "[Output Only] If warning messages are generated during processing of the operation, this field will be populated.", - "items": { - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - }, - "zone": { - "type": "string", - "description": "[Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations." - } - } - }, - "OperationAggregatedList": { - "id": "OperationAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." - }, - "items": { - "type": "object", - "description": "[Output Only] A map of scoped operation lists.", - "additionalProperties": { - "$ref": "OperationsScopedList", - "description": "[Output Only] Name of the scope containing this set of operations." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#operationAggregatedList for aggregated lists of operations.", - "default": "compute#operationAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "OperationList": { - "id": "OperationList", - "type": "object", - "description": "Contains a list of Operation resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." - }, - "items": { - "type": "array", - "description": "[Output Only] A list of Operation resources.", - "items": { - "$ref": "Operation" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#operations for Operations resource.", - "default": "compute#operationList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "OperationsScopedList": { - "id": "OperationsScopedList", - "type": "object", - "properties": { - "operations": { - "type": "array", - "description": "[Output Only] List of operations contained in this scope.", - "items": { - "$ref": "Operation" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] Informational warning which replaces the list of operations when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "PathMatcher": { - "id": "PathMatcher", - "type": "object", - "description": "A matcher for the path portion of the URL. The BackendService from the longest-matched rule will serve the URL. If no rule was matched, the default service will be used.", - "properties": { - "defaultService": { - "type": "string", - "description": "The full or partial URL to the BackendService resource. This will be used if none of the pathRules defined by this PathMatcher is matched by the URL's path portion. For example, the following are all valid URLs to a BackendService resource: \n- https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService \n- compute/v1/projects/project/global/backendServices/backendService \n- global/backendServices/backendService" - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "name": { - "type": "string", - "description": "The name to which this PathMatcher is referred by the HostRule." - }, - "pathRules": { - "type": "array", - "description": "The list of path rules.", - "items": { - "$ref": "PathRule" - } - } - } - }, - "PathRule": { - "id": "PathRule", - "type": "object", - "description": "A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.", - "properties": { - "paths": { - "type": "array", - "description": "The list of path patterns to match. Each must start with / and the only place a * is allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here.", - "items": { - "type": "string" - } - }, - "service": { - "type": "string", - "description": "The URL of the BackendService resource if this rule is matched." - } - } - }, - "Project": { - "id": "Project", - "type": "object", - "description": "A Project resource. Projects can only be created in the Google Cloud Platform Console. Unless marked otherwise, values can only be modified in the console.", - "properties": { - "commonInstanceMetadata": { - "$ref": "Metadata", - "description": "Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "defaultServiceAccount": { - "type": "string", - "description": "[Output Only] Default service account used by VMs running in this project." - }, - "description": { - "type": "string", - "description": "An optional textual description of the resource." - }, - "enabledFeatures": { - "type": "array", - "description": "Restricted features enabled for use on this project.", - "items": { - "type": "string" - } - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server. This is not the project ID, and is just a unique ID used by Compute Engine to identify resources.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#project for projects.", - "default": "compute#project" - }, - "name": { - "type": "string", - "description": "The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine." - }, - "quotas": { - "type": "array", - "description": "[Output Only] Quotas assigned to this project.", - "items": { - "$ref": "Quota" - } - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "usageExportLocation": { - "$ref": "UsageExportLocation", - "description": "The naming prefix for daily usage reports and the Google Cloud Storage bucket where they are stored." - }, - "xpnProjectStatus": { - "type": "string", - "description": "[Output Only] The role this project has in a shared VPC configuration. Currently only HOST projects are differentiated.", - "enum": [ - "HOST", - "UNSPECIFIED_XPN_PROJECT_STATUS" - ], - "enumDescriptions": [ - "", - "" - ] - } - } - }, - "ProjectsDisableXpnResourceRequest": { - "id": "ProjectsDisableXpnResourceRequest", - "type": "object", - "properties": { - "xpnResource": { - "$ref": "XpnResourceId", - "description": "Service resource (a.k.a service project) ID." - } - } - }, - "ProjectsEnableXpnResourceRequest": { - "id": "ProjectsEnableXpnResourceRequest", - "type": "object", - "properties": { - "xpnResource": { - "$ref": "XpnResourceId", - "description": "Service resource (a.k.a service project) ID." - } - } - }, - "ProjectsGetXpnResources": { - "id": "ProjectsGetXpnResources", - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#projectsGetXpnResources for lists of service resources (a.k.a service projects)", - "default": "compute#projectsGetXpnResources" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "resources": { - "type": "array", - "description": "Serive resources (a.k.a service projects) attached to this project as their shared VPC host.", - "items": { - "$ref": "XpnResourceId" - } - } - } - }, - "ProjectsListXpnHostsRequest": { - "id": "ProjectsListXpnHostsRequest", - "type": "object", - "properties": { - "organization": { - "type": "string", - "description": "Optional organization ID managed by Cloud Resource Manager, for which to list shared VPC host projects. If not specified, the organization will be inferred from the project." - } - } - }, - "Quota": { - "id": "Quota", - "type": "object", - "description": "A quotas entry.", - "properties": { - "limit": { - "type": "number", - "description": "[Output Only] Quota limit for this metric.", - "format": "double" - }, - "metric": { - "type": "string", - "description": "[Output Only] Name of the quota metric.", - "enum": [ - "AUTOSCALERS", - "BACKEND_BUCKETS", - "BACKEND_SERVICES", - "COMMITMENTS", - "CPUS", - "CPUS_ALL_REGIONS", - "DISKS_TOTAL_GB", - "FIREWALLS", - "FORWARDING_RULES", - "HEALTH_CHECKS", - "IMAGES", - "INSTANCES", - "INSTANCE_GROUPS", - "INSTANCE_GROUP_MANAGERS", - "INSTANCE_TEMPLATES", - "IN_USE_ADDRESSES", - "LOCAL_SSD_TOTAL_GB", - "NETWORKS", - "NVIDIA_K80_GPUS", - "PREEMPTIBLE_CPUS", - "PREEMPTIBLE_LOCAL_SSD_GB", - "REGIONAL_AUTOSCALERS", - "REGIONAL_INSTANCE_GROUP_MANAGERS", - "ROUTERS", - "ROUTES", - "SECURITY_POLICIES", - "SECURITY_POLICY_RULES", - "SNAPSHOTS", - "SSD_TOTAL_GB", - "SSL_CERTIFICATES", - "STATIC_ADDRESSES", - "SUBNETWORKS", - "TARGET_HTTPS_PROXIES", - "TARGET_HTTP_PROXIES", - "TARGET_INSTANCES", - "TARGET_POOLS", - "TARGET_SSL_PROXIES", - "TARGET_VPN_GATEWAYS", - "URL_MAPS", - "VPN_TUNNELS" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "usage": { - "type": "number", - "description": "[Output Only] Current usage of this metric.", - "format": "double" - } - } - }, - "Region": { - "id": "Region", - "type": "object", - "description": "Region resource.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "[Output Only] The deprecation status associated with this region." - }, - "description": { - "type": "string", - "description": "[Output Only] Textual description of the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#region for regions.", - "default": "compute#region" - }, - "name": { - "type": "string", - "description": "[Output Only] Name of the resource." - }, - "quotas": { - "type": "array", - "description": "[Output Only] Quotas assigned to this region.", - "items": { - "$ref": "Quota" - } - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "status": { - "type": "string", - "description": "[Output Only] Status of the region, either UP or DOWN.", - "enum": [ - "DOWN", - "UP" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "zones": { - "type": "array", - "description": "[Output Only] A list of zones available in this region, in the form of resource URLs.", - "items": { - "type": "string" - } - } - } - }, - "RegionAutoscalerList": { - "id": "RegionAutoscalerList", - "type": "object", - "description": "Contains a list of autoscalers.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Autoscaler resources.", - "items": { - "$ref": "Autoscaler" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#regionAutoscalerList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "RegionInstanceGroupList": { - "id": "RegionInstanceGroupList", - "type": "object", - "description": "Contains a list of InstanceGroup resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of InstanceGroup resources.", - "items": { - "$ref": "InstanceGroup" - } - }, - "kind": { - "type": "string", - "description": "The resource type.", - "default": "compute#regionInstanceGroupList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "RegionInstanceGroupManagerList": { - "id": "RegionInstanceGroupManagerList", - "type": "object", - "description": "Contains a list of managed instance groups.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of InstanceGroupManager resources.", - "items": { - "$ref": "InstanceGroupManager" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] The resource type, which is always compute#instanceGroupManagerList for a list of managed instance groups that exist in th regional scope.", - "default": "compute#regionInstanceGroupManagerList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "RegionInstanceGroupManagersAbandonInstancesRequest": { - "id": "RegionInstanceGroupManagersAbandonInstancesRequest", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "The URLs of one or more instances to abandon. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - } - } - } - }, - "RegionInstanceGroupManagersDeleteInstancesRequest": { - "id": "RegionInstanceGroupManagersDeleteInstancesRequest", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - } - } - } - }, - "RegionInstanceGroupManagersListInstancesResponse": { - "id": "RegionInstanceGroupManagersListInstancesResponse", - "type": "object", - "properties": { - "managedInstances": { - "type": "array", - "description": "List of managed instances.", - "items": { - "$ref": "ManagedInstance" - } - } - } - }, - "RegionInstanceGroupManagersRecreateRequest": { - "id": "RegionInstanceGroupManagersRecreateRequest", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "The URLs of one or more instances to recreate. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - } - } - } - }, - "RegionInstanceGroupManagersSetTargetPoolsRequest": { - "id": "RegionInstanceGroupManagersSetTargetPoolsRequest", - "type": "object", - "properties": { - "fingerprint": { - "type": "string", - "description": "Fingerprint of the target pools information, which is a hash of the contents. This field is used for optimistic locking when you update the target pool entries. This field is optional.", - "format": "byte" - }, - "targetPools": { - "type": "array", - "description": "The URL of all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group.", - "items": { - "type": "string" - } - } - } - }, - "RegionInstanceGroupManagersSetTemplateRequest": { - "id": "RegionInstanceGroupManagersSetTemplateRequest", - "type": "object", - "properties": { - "instanceTemplate": { - "type": "string", - "description": "URL of the InstanceTemplate resource from which all new instances will be created." - } - } - }, - "RegionInstanceGroupsListInstances": { - "id": "RegionInstanceGroupsListInstances", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of InstanceWithNamedPorts resources.", - "items": { - "$ref": "InstanceWithNamedPorts" - } - }, - "kind": { - "type": "string", - "description": "The resource type.", - "default": "compute#regionInstanceGroupsListInstances" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "RegionInstanceGroupsListInstancesRequest": { - "id": "RegionInstanceGroupsListInstancesRequest", - "type": "object", - "properties": { - "instanceState": { - "type": "string", - "description": "Instances in which state should be returned. Valid options are: 'ALL', 'RUNNING'. By default, it lists all instances.", - "enum": [ - "ALL", - "RUNNING" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "portName": { - "type": "string", - "description": "Name of port user is interested in. It is optional. If it is set, only information about this ports will be returned. If it is not set, all the named ports will be returned. Always lists all instances.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - } - } - }, - "RegionInstanceGroupsSetNamedPortsRequest": { - "id": "RegionInstanceGroupsSetNamedPortsRequest", - "type": "object", - "properties": { - "fingerprint": { - "type": "string", - "description": "The fingerprint of the named ports information for this instance group. Use this optional property to prevent conflicts when multiple users change the named ports settings concurrently. Obtain the fingerprint with the instanceGroups.get method. Then, include the fingerprint in your request to ensure that you do not overwrite changes that were applied from another concurrent request.", - "format": "byte" - }, - "namedPorts": { - "type": "array", - "description": "The list of named ports to set for this instance group.", - "items": { - "$ref": "NamedPort" - } - } - } - }, - "RegionList": { - "id": "RegionList", - "type": "object", - "description": "Contains a list of region resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Region resources.", - "items": { - "$ref": "Region" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#regionList for lists of regions.", - "default": "compute#regionList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "ResourceCommitment": { - "id": "ResourceCommitment", - "type": "object", - "description": "Commitment for a particular resource (a Commitment is composed of one or more of these).", - "properties": { - "amount": { - "type": "string", - "description": "The amount of the resource purchased (in a type-dependent unit, such as bytes). For vCPUs, this can just be an integer. For memory, this must be provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every vCPU.", - "format": "int64" - }, - "type": { - "type": "string", - "description": "Type of resource for which this commitment applies. Possible values are VCPU and MEMORY", - "enum": [ - "MEMORY", - "UNSPECIFIED", - "VCPU" - ], - "enumDescriptions": [ - "", - "", - "" - ] - } - } - }, - "ResourceGroupReference": { - "id": "ResourceGroupReference", - "type": "object", - "properties": { - "group": { - "type": "string", - "description": "A URI referencing one of the instance groups listed in the backend service." - } - } - }, - "Route": { - "id": "Route", - "type": "object", - "description": "Represents a Route resource. A route specifies how certain packets should be handled by the network. Routes are associated with instances by tags and the set of routes for a particular instance is called its routing table.\n\nFor each packet leaving an instance, the system searches that instance's routing table for a single best matching route. Routes match packets by destination IP address, preferring smaller or more specific ranges over larger ones. If there is a tie, the system selects the route with the smallest priority value. If there is still a tie, it uses the layer three and four packet headers to select just one of the remaining matching routes. The packet is then forwarded as specified by the nextHop field of the winning route - either to another instance destination, an instance gateway, or a Google Compute Engine-operated gateway.\n\nPackets that do not match any route in the sending instance's routing table are dropped.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "destRange": { - "type": "string", - "description": "The destination range of outgoing packets that this route applies to. Only IPv4 is supported.", - "annotations": { - "required": [ - "compute.routes.insert" - ] - } - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of this resource. Always compute#routes for Route resources.", - "default": "compute#route" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.routes.insert" - ] - } - }, - "network": { - "type": "string", - "description": "Fully-qualified URL of the network that this route applies to.", - "annotations": { - "required": [ - "compute.routes.insert" - ] - } - }, - "nextHopGateway": { - "type": "string", - "description": "The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid URL: projects/\u003cproject-id\u003e/global/gateways/default-internet-gateway" - }, - "nextHopInstance": { - "type": "string", - "description": "The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example:\nhttps://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/" - }, - "nextHopIp": { - "type": "string", - "description": "The network IP address of an instance that should handle matching packets. Only IPv4 is supported." - }, - "nextHopNetwork": { - "type": "string", - "description": "The URL of the local network if it should handle matching packets." - }, - "nextHopPeering": { - "type": "string", - "description": "[Output Only] The network peering name that should handle matching packets, which should conform to RFC1035." - }, - "nextHopVpnTunnel": { - "type": "string", - "description": "The URL to a VpnTunnel that should handle matching packets." - }, - "priority": { - "type": "integer", - "description": "The priority of this route. Priority is used to break ties in cases where there is more than one matching route of equal prefix length. In the case of two routes with equal prefix length, the one with the lowest-numbered priority value wins. Default value is 1000. Valid range is 0 through 65535.", - "format": "uint32", - "annotations": { - "required": [ - "compute.routes.insert" - ] - } - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined fully-qualified URL for this resource." - }, - "tags": { - "type": "array", - "description": "A list of instance tags to which this route applies.", - "items": { - "type": "string" - }, - "annotations": { - "required": [ - "compute.routes.insert" - ] - } - }, - "warnings": { - "type": "array", - "description": "[Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.", - "items": { - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - } - }, - "RouteList": { - "id": "RouteList", - "type": "object", - "description": "Contains a list of Route resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Route resources.", - "items": { - "$ref": "Route" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#routeList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "Router": { - "id": "Router", - "type": "object", - "description": "Router resource.", - "properties": { - "bgp": { - "$ref": "RouterBgp", - "description": "BGP information specific to this router." - }, - "bgpPeers": { - "type": "array", - "description": "BGP information that needs to be configured into the routing stack to establish the BGP peering. It must specify peer ASN and either interface name, IP, or peer IP. Please refer to RFC4273.", - "items": { - "$ref": "RouterBgpPeer" - } - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "interfaces": { - "type": "array", - "description": "Router interfaces. Each interface requires either one linked resource (e.g. linkedVpnTunnel), or IP address and IP address range (e.g. ipRange), or both.", - "items": { - "$ref": "RouterInterface" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#router for routers.", - "default": "compute#router" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.routers.insert" - ] - } - }, - "network": { - "type": "string", - "description": "URI of the network to which this router belongs.", - "annotations": { - "required": [ - "compute.routers.insert" - ] - } - }, - "region": { - "type": "string", - "description": "[Output Only] URI of the region where the router resides." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - } - } - }, - "RouterAggregatedList": { - "id": "RouterAggregatedList", - "type": "object", - "description": "Contains a list of routers.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of Router resources.", - "additionalProperties": { - "$ref": "RoutersScopedList", - "description": "Name of the scope containing this set of routers." - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#routerAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "RouterBgp": { - "id": "RouterBgp", - "type": "object", - "properties": { - "asn": { - "type": "integer", - "description": "Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.", - "format": "uint32" - } - } - }, - "RouterBgpPeer": { - "id": "RouterBgpPeer", - "type": "object", - "properties": { - "advertisedRoutePriority": { - "type": "integer", - "description": "The priority of routes advertised to this BGP peer. In the case where there is more than one matching route of maximum length, the routes with lowest priority value win.", - "format": "uint32" - }, - "interfaceName": { - "type": "string", - "description": "Name of the interface the BGP peer is associated with." - }, - "ipAddress": { - "type": "string", - "description": "IP address of the interface inside Google Cloud Platform. Only IPv4 is supported." - }, - "name": { - "type": "string", - "description": "Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "peerAsn": { - "type": "integer", - "description": "Peer BGP Autonomous System Number (ASN). For VPN use case, this value can be different for every tunnel.", - "format": "uint32" - }, - "peerIpAddress": { - "type": "string", - "description": "IP address of the BGP interface outside Google cloud. Only IPv4 is supported." - } - } - }, - "RouterInterface": { - "id": "RouterInterface", - "type": "object", - "properties": { - "ipRange": { - "type": "string", - "description": "IP address and range of the interface. The IP range must be in the RFC3927 link-local IP space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface." - }, - "linkedVpnTunnel": { - "type": "string", - "description": "URI of the linked VPN tunnel. It must be in the same region as the router. Each interface can have at most one linked resource and it could either be a VPN Tunnel or an interconnect attachment." - }, - "name": { - "type": "string", - "description": "Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - } - } - }, - "RouterList": { - "id": "RouterList", - "type": "object", - "description": "Contains a list of Router resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Router resources.", - "items": { - "$ref": "Router" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#router for routers.", - "default": "compute#routerList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "RouterStatus": { - "id": "RouterStatus", - "type": "object", - "properties": { - "bestRoutes": { - "type": "array", - "description": "Best routes for this router's network.", - "items": { - "$ref": "Route" - } - }, - "bestRoutesForRouter": { - "type": "array", - "description": "Best routes learned by this router.", - "items": { - "$ref": "Route" - } - }, - "bgpPeerStatus": { - "type": "array", - "items": { - "$ref": "RouterStatusBgpPeerStatus" - } - }, - "network": { - "type": "string", - "description": "URI of the network to which this router belongs." - } - } - }, - "RouterStatusBgpPeerStatus": { - "id": "RouterStatusBgpPeerStatus", - "type": "object", - "properties": { - "advertisedRoutes": { - "type": "array", - "description": "Routes that were advertised to the remote BGP peer", - "items": { - "$ref": "Route" - } - }, - "ipAddress": { - "type": "string", - "description": "IP address of the local BGP interface." - }, - "linkedVpnTunnel": { - "type": "string", - "description": "URL of the VPN tunnel that this BGP peer controls." - }, - "name": { - "type": "string", - "description": "Name of this BGP peer. Unique within the Routers resource." - }, - "numLearnedRoutes": { - "type": "integer", - "description": "Number of routes learned from the remote BGP Peer.", - "format": "uint32" - }, - "peerIpAddress": { - "type": "string", - "description": "IP address of the remote BGP interface." - }, - "state": { - "type": "string", - "description": "BGP state as specified in RFC1771." - }, - "status": { - "type": "string", - "description": "Status of the BGP peer: {UP, DOWN}", - "enum": [ - "DOWN", - "UNKNOWN", - "UP" - ], - "enumDescriptions": [ - "", - "", - "" - ] - }, - "uptime": { - "type": "string", - "description": "Time this session has been up. Format: 14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds" - }, - "uptimeSeconds": { - "type": "string", - "description": "Time this session has been up, in seconds. Format: 145" - } - } - }, - "RouterStatusResponse": { - "id": "RouterStatusResponse", - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#routerStatusResponse" - }, - "result": { - "$ref": "RouterStatus" - } - } - }, - "RoutersPreviewResponse": { - "id": "RoutersPreviewResponse", - "type": "object", - "properties": { - "resource": { - "$ref": "Router", - "description": "Preview of given router." - } - } - }, - "RoutersScopedList": { - "id": "RoutersScopedList", - "type": "object", - "properties": { - "routers": { - "type": "array", - "description": "List of routers contained in this scope.", - "items": { - "$ref": "Router" - } - }, - "warning": { - "type": "object", - "description": "Informational warning which replaces the list of routers when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "SSLHealthCheck": { - "id": "SSLHealthCheck", - "type": "object", - "properties": { - "port": { - "type": "integer", - "description": "The TCP port number for the health check request. The default value is 443. Valid values are 1 through 65535.", - "format": "int32" - }, - "portName": { - "type": "string", - "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence." - }, - "proxyHeader": { - "type": "string", - "description": "Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "request": { - "type": "string", - "description": "The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII." - }, - "response": { - "type": "string", - "description": "The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII." - } - } - }, - "Scheduling": { - "id": "Scheduling", - "type": "object", - "description": "Sets the scheduling options for an Instance.", - "properties": { - "automaticRestart": { - "type": "boolean", - "description": "Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.\n\nBy default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine." - }, - "onHostMaintenance": { - "type": "string", - "description": "Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.", - "enum": [ - "MIGRATE", - "TERMINATE" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "preemptible": { - "type": "boolean", - "description": "Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created." - } - } - }, - "SerialPortOutput": { - "id": "SerialPortOutput", - "type": "object", - "description": "An instance's serial console output.", - "properties": { - "contents": { - "type": "string", - "description": "[Output Only] The contents of the console output." - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#serialPortOutput for serial port output.", - "default": "compute#serialPortOutput" - }, - "next": { - "type": "string", - "description": "[Output Only] The position of the next byte of content from the serial console output. Use this value in the next request as the start parameter.", - "format": "int64" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - }, - "start": { - "type": "string", - "description": "The starting byte position of the output that was returned. This should match the start parameter sent with the request. If the serial console output exceeds the size of the buffer, older output will be overwritten by newer content and the start values will be mismatched.", - "format": "int64" - } - } - }, - "ServiceAccount": { - "id": "ServiceAccount", - "type": "object", - "description": "A service account.", - "properties": { - "email": { - "type": "string", - "description": "Email address of the service account." - }, - "scopes": { - "type": "array", - "description": "The list of scopes to be made available for this service account.", - "items": { - "type": "string" - } - } - } - }, - "Snapshot": { - "id": "Snapshot", - "type": "object", - "description": "A persistent disk snapshot resource.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "diskSizeGb": { - "type": "string", - "description": "[Output Only] Size of the snapshot, specified in GB.", - "format": "int64" - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#snapshot for Snapshot resources.", - "default": "compute#snapshot" - }, - "labelFingerprint": { - "type": "string", - "description": "A fingerprint for the labels being applied to this snapshot, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make a get() request to retrieve a snapshot.", - "format": "byte" - }, - "labels": { - "type": "object", - "description": "Labels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty.", - "additionalProperties": { - "type": "string" - } - }, - "licenses": { - "type": "array", - "description": "[Output Only] A list of public visible licenses that apply to this snapshot. This can be because the original image had licenses attached (such as a Windows image).", - "items": { - "type": "string" - } - }, - "name": { - "type": "string", - "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "snapshotEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Encrypts the snapshot using a customer-supplied encryption key.\n\nAfter you encrypt a snapshot using a customer-supplied key, you must provide the same key if you use the image later For example, you must provide the encryption key when you create a disk from the encrypted snapshot in a future request.\n\nCustomer-supplied encryption keys do not protect access to metadata of the disk.\n\nIf you do not provide an encryption key when creating the snapshot, then the snapshot will be encrypted using an automatically generated key and you do not need to provide a key to use the snapshot later." - }, - "sourceDisk": { - "type": "string", - "description": "[Output Only] The source disk used to create this snapshot." - }, - "sourceDiskEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key." - }, - "sourceDiskId": { - "type": "string", - "description": "[Output Only] The ID value of the disk used to create this snapshot. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given disk name." - }, - "status": { - "type": "string", - "description": "[Output Only] The status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or UPLOADING.", - "enum": [ - "CREATING", - "DELETING", - "FAILED", - "READY", - "UPLOADING" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ] - }, - "storageBytes": { - "type": "string", - "description": "[Output Only] A size of the the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot creation/deletion.", - "format": "int64" - }, - "storageBytesStatus": { - "type": "string", - "description": "[Output Only] An indicator whether storageBytes is in a stable state or it is being adjusted as a result of shared storage reallocation. This status can either be UPDATING, meaning the size of the snapshot is being updated, or UP_TO_DATE, meaning the size of the snapshot is up-to-date.", - "enum": [ - "UPDATING", - "UP_TO_DATE" - ], - "enumDescriptions": [ - "", - "" - ] - } - } - }, - "SnapshotList": { - "id": "SnapshotList", - "type": "object", - "description": "Contains a list of Snapshot resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Snapshot resources.", - "items": { - "$ref": "Snapshot" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#snapshotList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "SslCertificate": { - "id": "SslCertificate", - "type": "object", - "description": "An SslCertificate resource. This resource provides a mechanism to upload an SSL key and certificate to the load balancer to serve secure connections from the user.", - "properties": { - "certificate": { - "type": "string", - "description": "A local certificate file. The certificate must be in PEM format. The certificate chain must be no greater than 5 certs long. The chain must include at least one intermediate cert." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#sslCertificate for SSL certificates.", - "default": "compute#sslCertificate" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "privateKey": { - "type": "string", - "description": "A write-only private key in PEM format. Only insert requests will include this field." - }, - "selfLink": { - "type": "string", - "description": "[Output only] Server-defined URL for the resource." - } - } - }, - "SslCertificateList": { - "id": "SslCertificateList", - "type": "object", - "description": "Contains a list of SslCertificate resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of SslCertificate resources.", - "items": { - "$ref": "SslCertificate" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#sslCertificateList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "Subnetwork": { - "id": "Subnetwork", - "type": "object", - "description": "A Subnetwork resource.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource. This field can be set only at resource creation time." - }, - "gatewayAddress": { - "type": "string", - "description": "[Output Only] The gateway address for default routes to reach destination addresses outside this subnetwork. This field can be set only at resource creation time." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "ipCidrRange": { - "type": "string", - "description": "The range of internal addresses that are owned by this subnetwork. Provide this property when you create the subnetwork. For example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and non-overlapping within a network. Only IPv4 is supported. This field can be set only at resource creation time." - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#subnetwork for Subnetwork resources.", - "default": "compute#subnetwork" - }, - "name": { - "type": "string", - "description": "The name of the resource, provided by the client when initially creating the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "network": { - "type": "string", - "description": "The URL of the network to which this subnetwork belongs, provided by the client when initially creating the subnetwork. Only networks that are in the distributed mode can have subnetworks. This field can be set only at resource creation time." - }, - "privateIpGoogleAccess": { - "type": "boolean", - "description": "Whether the VMs in this subnet can access Google services without assigned external IP addresses. This field can be both set at resource creation time and updated using setPrivateIpGoogleAccess." - }, - "region": { - "type": "string", - "description": "URL of the region where the Subnetwork resides. This field can be set only at resource creation time." - }, - "secondaryIpRanges": { - "type": "array", - "description": "An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges.", - "items": { - "$ref": "SubnetworkSecondaryRange" - } - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - } - } - }, - "SubnetworkAggregatedList": { - "id": "SubnetworkAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of SubnetworksScopedList resources.", - "additionalProperties": { - "$ref": "SubnetworksScopedList", - "description": "Name of the scope containing this set of Subnetworks." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#subnetworkAggregatedList for aggregated lists of subnetworks.", - "default": "compute#subnetworkAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "SubnetworkList": { - "id": "SubnetworkList", - "type": "object", - "description": "Contains a list of Subnetwork resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Subnetwork resources.", - "items": { - "$ref": "Subnetwork" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#subnetworkList for lists of subnetworks.", - "default": "compute#subnetworkList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "SubnetworkSecondaryRange": { - "id": "SubnetworkSecondaryRange", - "type": "object", - "description": "Represents a secondary IP range of a subnetwork.", - "properties": { - "ipCidrRange": { - "type": "string", - "description": "The range of IP addresses belonging to this subnetwork secondary range. Provide this property when you create the subnetwork. Ranges must be unique and non-overlapping with all primary and secondary IP ranges within a network. Only IPv4 is supported." - }, - "rangeName": { - "type": "string", - "description": "The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance. The name must be 1-63 characters long, and comply with RFC1035. The name must be unique within the subnetwork." - } - } - }, - "SubnetworksExpandIpCidrRangeRequest": { - "id": "SubnetworksExpandIpCidrRangeRequest", - "type": "object", - "properties": { - "ipCidrRange": { - "type": "string", - "description": "The IP (in CIDR format or netmask) of internal addresses that are legal on this Subnetwork. This range should be disjoint from other subnetworks within this network. This range can only be larger than (i.e. a superset of) the range previously defined before the update." - } - } - }, - "SubnetworksScopedList": { - "id": "SubnetworksScopedList", - "type": "object", - "properties": { - "subnetworks": { - "type": "array", - "description": "List of subnetworks contained in this scope.", - "items": { - "$ref": "Subnetwork" - } - }, - "warning": { - "type": "object", - "description": "An informational warning that appears when the list of addresses is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "SubnetworksSetPrivateIpGoogleAccessRequest": { - "id": "SubnetworksSetPrivateIpGoogleAccessRequest", - "type": "object", - "properties": { - "privateIpGoogleAccess": { - "type": "boolean" - } - } - }, - "TCPHealthCheck": { - "id": "TCPHealthCheck", - "type": "object", - "properties": { - "port": { - "type": "integer", - "description": "The TCP port number for the health check request. The default value is 80. Valid values are 1 through 65535.", - "format": "int32" - }, - "portName": { - "type": "string", - "description": "Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence." - }, - "proxyHeader": { - "type": "string", - "description": "Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "request": { - "type": "string", - "description": "The application data to send once the TCP connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII." - }, - "response": { - "type": "string", - "description": "The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII." - } - } - }, - "Tags": { - "id": "Tags", - "type": "object", - "description": "A set of instance tags.", - "properties": { - "fingerprint": { - "type": "string", - "description": "Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.\n\nTo see the latest fingerprint, make get() request to the instance.", - "format": "byte" - }, - "items": { - "type": "array", - "description": "An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.", - "items": { - "type": "string" - } - } - } - }, - "TargetHttpProxy": { - "id": "TargetHttpProxy", - "type": "object", - "description": "A TargetHttpProxy resource. This resource defines an HTTP proxy.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#targetHttpProxy for target HTTP proxies.", - "default": "compute#targetHttpProxy" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "urlMap": { - "type": "string", - "description": "URL to the UrlMap resource that defines the mapping from URL to the BackendService." - } - } - }, - "TargetHttpProxyList": { - "id": "TargetHttpProxyList", - "type": "object", - "description": "A list of TargetHttpProxy resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of TargetHttpProxy resources.", - "items": { - "$ref": "TargetHttpProxy" - } - }, - "kind": { - "type": "string", - "description": "Type of resource. Always compute#targetHttpProxyList for lists of target HTTP proxies.", - "default": "compute#targetHttpProxyList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "TargetHttpsProxiesSetSslCertificatesRequest": { - "id": "TargetHttpsProxiesSetSslCertificatesRequest", - "type": "object", - "properties": { - "sslCertificates": { - "type": "array", - "description": "New set of SslCertificate resources to associate with this TargetHttpsProxy resource. Currently exactly one SslCertificate resource must be specified.", - "items": { - "type": "string" - } - } - } - }, - "TargetHttpsProxy": { - "id": "TargetHttpsProxy", - "type": "object", - "description": "A TargetHttpsProxy resource. This resource defines an HTTPS proxy.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#targetHttpsProxy for target HTTPS proxies.", - "default": "compute#targetHttpsProxy" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "sslCertificates": { - "type": "array", - "description": "URLs to SslCertificate resources that are used to authenticate connections between users and the load balancer. Currently, exactly one SSL certificate must be specified.", - "items": { - "type": "string" - } - }, - "urlMap": { - "type": "string", - "description": "A fully-qualified or valid partial URL to the UrlMap resource that defines the mapping from URL to the BackendService. For example, the following are all valid URLs for specifying a URL map: \n- https://www.googleapis.compute/v1/projects/project/global/urlMaps/url-map \n- projects/project/global/urlMaps/url-map \n- global/urlMaps/url-map" - } - } - }, - "TargetHttpsProxyList": { - "id": "TargetHttpsProxyList", - "type": "object", - "description": "Contains a list of TargetHttpsProxy resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of TargetHttpsProxy resources.", - "items": { - "$ref": "TargetHttpsProxy" - } - }, - "kind": { - "type": "string", - "description": "Type of resource. Always compute#targetHttpsProxyList for lists of target HTTPS proxies.", - "default": "compute#targetHttpsProxyList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "TargetInstance": { - "id": "TargetInstance", - "type": "object", - "description": "A TargetInstance resource. This resource defines an endpoint instance that terminates traffic of certain protocols.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "instance": { - "type": "string", - "description": "A URL to the virtual machine instance that handles traffic for this target instance. When creating a target instance, you can provide the fully-qualified URL or a valid partial URL to the desired virtual machine. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance \n- projects/project/zones/zone/instances/instance \n- zones/zone/instances/instance" - }, - "kind": { - "type": "string", - "description": "[Output Only] The type of the resource. Always compute#targetInstance for target instances.", - "default": "compute#targetInstance" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "natPolicy": { - "type": "string", - "description": "NAT option controlling how IPs are NAT'ed to the instance. Currently only NO_NAT (default value) is supported.", - "enum": [ - "NO_NAT" - ], - "enumDescriptions": [ - "" - ] - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "zone": { - "type": "string", - "description": "[Output Only] URL of the zone where the target instance resides." - } - } - }, - "TargetInstanceAggregatedList": { - "id": "TargetInstanceAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of TargetInstance resources.", - "additionalProperties": { - "$ref": "TargetInstancesScopedList", - "description": "Name of the scope containing this set of target instances." - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#targetInstanceAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "TargetInstanceList": { - "id": "TargetInstanceList", - "type": "object", - "description": "Contains a list of TargetInstance resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of TargetInstance resources.", - "items": { - "$ref": "TargetInstance" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#targetInstanceList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "TargetInstancesScopedList": { - "id": "TargetInstancesScopedList", - "type": "object", - "properties": { - "targetInstances": { - "type": "array", - "description": "List of target instances contained in this scope.", - "items": { - "$ref": "TargetInstance" - } - }, - "warning": { - "type": "object", - "description": "Informational warning which replaces the list of addresses when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "TargetPool": { - "id": "TargetPool", - "type": "object", - "description": "A TargetPool resource. This resource defines a pool of instances, an associated HttpHealthCheck resource, and the fallback target pool.", - "properties": { - "backupPool": { - "type": "string", - "description": "This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool, and its failoverRatio field is properly set to a value between [0, 1].\n\nbackupPool and failoverRatio together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below failoverRatio, traffic arriving at the load-balanced IP will be directed to the backup pool.\n\nIn case where failoverRatio and backupPool are not set, or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the \"force\" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy." - }, - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "failoverRatio": { - "type": "number", - "description": "This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool (i.e., not as a backup pool to some other target pool). The value of the field must be in [0, 1].\n\nIf set, backupPool must also be set. They together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below this number, traffic arriving at the load-balanced IP will be directed to the backup pool.\n\nIn case where failoverRatio is not set or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the \"force\" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy.", - "format": "float" - }, - "healthChecks": { - "type": "array", - "description": "The URL of the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. An empty list means all member instances will be considered healthy at all times. Only HttpHealthChecks are supported. Only one health check may be specified.", - "items": { - "type": "string" - } - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "instances": { - "type": "array", - "description": "A list of resource URLs to the virtual machine instances serving this pool. They must live in zones contained in the same region as this pool.", - "items": { - "type": "string" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#targetPool for target pools.", - "default": "compute#targetPool" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "region": { - "type": "string", - "description": "[Output Only] URL of the region where the target pool resides." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "sessionAffinity": { - "type": "string", - "description": "Sesssion affinity option, must be one of the following values:\nNONE: Connections from the same client IP may go to any instance in the pool.\nCLIENT_IP: Connections from the same client IP will go to the same instance in the pool while that instance remains healthy.\nCLIENT_IP_PROTO: Connections from the same client IP with the same IP protocol will go to the same instance in the pool while that instance remains healthy.", - "enum": [ - "CLIENT_IP", - "CLIENT_IP_PORT_PROTO", - "CLIENT_IP_PROTO", - "GENERATED_COOKIE", - "NONE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ] - } - } - }, - "TargetPoolAggregatedList": { - "id": "TargetPoolAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of TargetPool resources.", - "additionalProperties": { - "$ref": "TargetPoolsScopedList", - "description": "Name of the scope containing this set of target pools." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#targetPoolAggregatedList for aggregated lists of target pools.", - "default": "compute#targetPoolAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "TargetPoolInstanceHealth": { - "id": "TargetPoolInstanceHealth", - "type": "object", - "properties": { - "healthStatus": { - "type": "array", - "items": { - "$ref": "HealthStatus" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#targetPoolInstanceHealth when checking the health of an instance.", - "default": "compute#targetPoolInstanceHealth" - } - } - }, - "TargetPoolList": { - "id": "TargetPoolList", - "type": "object", - "description": "Contains a list of TargetPool resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of TargetPool resources.", - "items": { - "$ref": "TargetPool" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#targetPoolList for lists of target pools.", - "default": "compute#targetPoolList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "TargetPoolsAddHealthCheckRequest": { - "id": "TargetPoolsAddHealthCheckRequest", - "type": "object", - "properties": { - "healthChecks": { - "type": "array", - "description": "The HttpHealthCheck to add to the target pool.", - "items": { - "$ref": "HealthCheckReference" - } - } - } - }, - "TargetPoolsAddInstanceRequest": { - "id": "TargetPoolsAddInstanceRequest", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "A full or partial URL to an instance to add to this target pool. This can be a full or partial URL. For example, the following are valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project-id/zones/zone/instances/instance-name \n- projects/project-id/zones/zone/instances/instance-name \n- zones/zone/instances/instance-name", - "items": { - "$ref": "InstanceReference" - } - } - } - }, - "TargetPoolsRemoveHealthCheckRequest": { - "id": "TargetPoolsRemoveHealthCheckRequest", - "type": "object", - "properties": { - "healthChecks": { - "type": "array", - "description": "Health check URL to be removed. This can be a full or valid partial URL. For example, the following are valid URLs: \n- https://www.googleapis.com/compute/beta/projects/project/global/httpHealthChecks/health-check \n- projects/project/global/httpHealthChecks/health-check \n- global/httpHealthChecks/health-check", - "items": { - "$ref": "HealthCheckReference" - } - } - } - }, - "TargetPoolsRemoveInstanceRequest": { - "id": "TargetPoolsRemoveInstanceRequest", - "type": "object", - "properties": { - "instances": { - "type": "array", - "description": "URLs of the instances to be removed from target pool.", - "items": { - "$ref": "InstanceReference" - } - } - } - }, - "TargetPoolsScopedList": { - "id": "TargetPoolsScopedList", - "type": "object", - "properties": { - "targetPools": { - "type": "array", - "description": "List of target pools contained in this scope.", - "items": { - "$ref": "TargetPool" - } - }, - "warning": { - "type": "object", - "description": "Informational warning which replaces the list of addresses when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "TargetReference": { - "id": "TargetReference", - "type": "object", - "properties": { - "target": { - "type": "string" - } - } - }, - "TargetSslProxiesSetBackendServiceRequest": { - "id": "TargetSslProxiesSetBackendServiceRequest", - "type": "object", - "properties": { - "service": { - "type": "string", - "description": "The URL of the new BackendService resource for the targetSslProxy." - } - } - }, - "TargetSslProxiesSetProxyHeaderRequest": { - "id": "TargetSslProxiesSetProxyHeaderRequest", - "type": "object", - "properties": { - "proxyHeader": { - "type": "string", - "description": "The new type of proxy header to append before sending data to the backend. NONE or PROXY_V1 are allowed.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ] - } - } - }, - "TargetSslProxiesSetSslCertificatesRequest": { - "id": "TargetSslProxiesSetSslCertificatesRequest", - "type": "object", - "properties": { - "sslCertificates": { - "type": "array", - "description": "New set of URLs to SslCertificate resources to associate with this TargetSslProxy. Currently exactly one ssl certificate must be specified.", - "items": { - "type": "string" - } - } - } - }, - "TargetSslProxy": { - "id": "TargetSslProxy", - "type": "object", - "description": "A TargetSslProxy resource. This resource defines an SSL proxy.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#targetSslProxy for target SSL proxies.", - "default": "compute#targetSslProxy" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "proxyHeader": { - "type": "string", - "description": "Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "service": { - "type": "string", - "description": "URL to the BackendService resource." - }, - "sslCertificates": { - "type": "array", - "description": "URLs to SslCertificate resources that are used to authenticate connections to Backends. Currently exactly one SSL certificate must be specified.", - "items": { - "type": "string" - } - } - } - }, - "TargetSslProxyList": { - "id": "TargetSslProxyList", - "type": "object", - "description": "Contains a list of TargetSslProxy resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of TargetSslProxy resources.", - "items": { - "$ref": "TargetSslProxy" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#targetSslProxyList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "TargetTcpProxiesSetBackendServiceRequest": { - "id": "TargetTcpProxiesSetBackendServiceRequest", - "type": "object", - "properties": { - "service": { - "type": "string", - "description": "The URL of the new BackendService resource for the targetTcpProxy." - } - } - }, - "TargetTcpProxiesSetProxyHeaderRequest": { - "id": "TargetTcpProxiesSetProxyHeaderRequest", - "type": "object", - "properties": { - "proxyHeader": { - "type": "string", - "description": "The new type of proxy header to append before sending data to the backend. NONE or PROXY_V1 are allowed.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ] - } - } - }, - "TargetTcpProxy": { - "id": "TargetTcpProxy", - "type": "object", - "description": "A TargetTcpProxy resource. This resource defines a TCP proxy.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#targetTcpProxy for target TCP proxies.", - "default": "compute#targetTcpProxy" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "proxyHeader": { - "type": "string", - "description": "Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ] - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "service": { - "type": "string", - "description": "URL to the BackendService resource." - } - } - }, - "TargetTcpProxyList": { - "id": "TargetTcpProxyList", - "type": "object", - "description": "Contains a list of TargetTcpProxy resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of TargetTcpProxy resources.", - "items": { - "$ref": "TargetTcpProxy" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#targetTcpProxyList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "TargetVpnGateway": { - "id": "TargetVpnGateway", - "type": "object", - "description": "Represents a Target VPN gateway resource.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "forwardingRules": { - "type": "array", - "description": "[Output Only] A list of URLs to the ForwardingRule resources. ForwardingRules are created using compute.forwardingRules.insert and associated to a VPN gateway.", - "items": { - "type": "string" - } - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#targetVpnGateway for target VPN gateways.", - "default": "compute#targetVpnGateway" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.targetVpnGateways.insert" - ] - } - }, - "network": { - "type": "string", - "description": "URL of the network to which this VPN gateway is attached. Provided by the client when the VPN gateway is created.", - "annotations": { - "required": [ - "compute.targetVpnGateways.insert" - ] - } - }, - "region": { - "type": "string", - "description": "[Output Only] URL of the region where the target VPN gateway resides." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "status": { - "type": "string", - "description": "[Output Only] The status of the VPN gateway.", - "enum": [ - "CREATING", - "DELETING", - "FAILED", - "READY" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ] - }, - "tunnels": { - "type": "array", - "description": "[Output Only] A list of URLs to VpnTunnel resources. VpnTunnels are created using compute.vpntunnels.insert method and associated to a VPN gateway.", - "items": { - "type": "string" - } - } - } - }, - "TargetVpnGatewayAggregatedList": { - "id": "TargetVpnGatewayAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of TargetVpnGateway resources.", - "additionalProperties": { - "$ref": "TargetVpnGatewaysScopedList", - "description": "[Output Only] Name of the scope containing this set of target VPN gateways." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#targetVpnGateway for target VPN gateways.", - "default": "compute#targetVpnGatewayAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "TargetVpnGatewayList": { - "id": "TargetVpnGatewayList", - "type": "object", - "description": "Contains a list of TargetVpnGateway resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of TargetVpnGateway resources.", - "items": { - "$ref": "TargetVpnGateway" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#targetVpnGateway for target VPN gateways.", - "default": "compute#targetVpnGatewayList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "TargetVpnGatewaysScopedList": { - "id": "TargetVpnGatewaysScopedList", - "type": "object", - "properties": { - "targetVpnGateways": { - "type": "array", - "description": "[Output Only] List of target vpn gateways contained in this scope.", - "items": { - "$ref": "TargetVpnGateway" - } - }, - "warning": { - "type": "object", - "description": "[Output Only] Informational warning which replaces the list of addresses when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "TestFailure": { - "id": "TestFailure", - "type": "object", - "properties": { - "actualService": { - "type": "string" - }, - "expectedService": { - "type": "string" - }, - "host": { - "type": "string" - }, - "path": { - "type": "string" - } - } - }, - "UrlMap": { - "id": "UrlMap", - "type": "object", - "description": "A UrlMap resource. This resource defines the mapping from URL to the BackendService resource, based on the \"longest-match\" of the URL's host and path.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "defaultService": { - "type": "string", - "description": "The URL of the BackendService resource if none of the hostRules match." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "fingerprint": { - "type": "string", - "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a UrlMap. An up-to-date fingerprint must be provided in order to update the UrlMap.", - "format": "byte" - }, - "hostRules": { - "type": "array", - "description": "The list of HostRules to use against the URL.", - "items": { - "$ref": "HostRule" - } - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#urlMaps for url maps.", - "default": "compute#urlMap" - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" - }, - "pathMatchers": { - "type": "array", - "description": "The list of named PathMatchers to use against the URL.", - "items": { - "$ref": "PathMatcher" - } - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "tests": { - "type": "array", - "description": "The list of expected URL mappings. Request to update this UrlMap will succeed only if all of the test cases pass.", - "items": { - "$ref": "UrlMapTest" - } - } - } - }, - "UrlMapList": { - "id": "UrlMapList", - "type": "object", - "description": "Contains a list of UrlMap resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of UrlMap resources.", - "items": { - "$ref": "UrlMap" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#urlMapList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "UrlMapReference": { - "id": "UrlMapReference", - "type": "object", - "properties": { - "urlMap": { - "type": "string" - } - } - }, - "UrlMapTest": { - "id": "UrlMapTest", - "type": "object", - "description": "Message for the expected URL mappings.", - "properties": { - "description": { - "type": "string", - "description": "Description of this test case." - }, - "host": { - "type": "string", - "description": "Host portion of the URL." - }, - "path": { - "type": "string", - "description": "Path portion of the URL." - }, - "service": { - "type": "string", - "description": "Expected BackendService resource the given URL should be mapped to." - } - } - }, - "UrlMapValidationResult": { - "id": "UrlMapValidationResult", - "type": "object", - "description": "Message representing the validation result for a UrlMap.", - "properties": { - "loadErrors": { - "type": "array", - "items": { - "type": "string" - } - }, - "loadSucceeded": { - "type": "boolean", - "description": "Whether the given UrlMap can be successfully loaded. If false, 'loadErrors' indicates the reasons." - }, - "testFailures": { - "type": "array", - "items": { - "$ref": "TestFailure" - } - }, - "testPassed": { - "type": "boolean", - "description": "If successfully loaded, this field indicates whether the test passed. If false, 'testFailures's indicate the reason of failure." - } - } - }, - "UrlMapsValidateRequest": { - "id": "UrlMapsValidateRequest", - "type": "object", - "properties": { - "resource": { - "$ref": "UrlMap", - "description": "Content of the UrlMap to be validated." - } - } - }, - "UrlMapsValidateResponse": { - "id": "UrlMapsValidateResponse", - "type": "object", - "properties": { - "result": { - "$ref": "UrlMapValidationResult" - } - } - }, - "UsageExportLocation": { - "id": "UsageExportLocation", - "type": "object", - "description": "The location in Cloud Storage and naming method of the daily usage report. Contains bucket_name and report_name prefix.", - "properties": { - "bucketName": { - "type": "string", - "description": "The name of an existing bucket in Cloud Storage where the usage report object is stored. The Google Service Account is granted write access to this bucket. This can either be the bucket name by itself, such as example-bucket, or the bucket name with gs:// or https://storage.googleapis.com/ in front of it, such as gs://example-bucket." - }, - "reportNamePrefix": { - "type": "string", - "description": "An optional prefix for the name of the usage report object stored in bucketName. If not supplied, defaults to usage. The report is stored as a CSV file named report_name_prefix_gce_YYYYMMDD.csv where YYYYMMDD is the day of the usage according to Pacific Time. If you supply a prefix, it should conform to Cloud Storage object naming conventions." - } - } - }, - "VpnTunnel": { - "id": "VpnTunnel", - "type": "object", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "description": { - "type": "string", - "description": "An optional description of this resource. Provide this property when you create the resource." - }, - "detailedStatus": { - "type": "string", - "description": "[Output Only] Detailed status message for the VPN tunnel." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "ikeVersion": { - "type": "integer", - "description": "IKE protocol version to use when establishing the VPN tunnel with peer VPN gateway. Acceptable IKE versions are 1 or 2. Default version is 2.", - "format": "int32" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.", - "default": "compute#vpnTunnel" - }, - "localTrafficSelector": { - "type": "array", - "description": "Local traffic selector to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.", - "items": { - "type": "string" - } - }, - "name": { - "type": "string", - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.vpnTunnels.insert" - ] - } - }, - "peerIp": { - "type": "string", - "description": "IP address of the peer VPN gateway. Only IPv4 is supported." - }, - "region": { - "type": "string", - "description": "[Output Only] URL of the region where the VPN tunnel resides." - }, - "remoteTrafficSelector": { - "type": "array", - "description": "Remote traffic selectors to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.", - "items": { - "type": "string" - } - }, - "router": { - "type": "string", - "description": "URL of router resource to be used for dynamic routing." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "sharedSecret": { - "type": "string", - "description": "Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway." - }, - "sharedSecretHash": { - "type": "string", - "description": "Hash of the shared secret." - }, - "status": { - "type": "string", - "description": "[Output Only] The status of the VPN tunnel.", - "enum": [ - "ALLOCATING_RESOURCES", - "AUTHORIZATION_ERROR", - "DEPROVISIONING", - "ESTABLISHED", - "FAILED", - "FIRST_HANDSHAKE", - "NEGOTIATION_FAILURE", - "NETWORK_ERROR", - "NO_INCOMING_PACKETS", - "PROVISIONING", - "REJECTED", - "WAITING_FOR_FULL_CONFIG" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "targetVpnGateway": { - "type": "string", - "description": "URL of the VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created.", - "annotations": { - "required": [ - "compute.vpnTunnels.insert" - ] - } - } - } - }, - "VpnTunnelAggregatedList": { - "id": "VpnTunnelAggregatedList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "object", - "description": "A list of VpnTunnelsScopedList resources.", - "additionalProperties": { - "$ref": "VpnTunnelsScopedList", - "description": "Name of the scope containing this set of vpn tunnels." - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.", - "default": "compute#vpnTunnelAggregatedList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "VpnTunnelList": { - "id": "VpnTunnelList", - "type": "object", - "description": "Contains a list of VpnTunnel resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of VpnTunnel resources.", - "items": { - "$ref": "VpnTunnel" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.", - "default": "compute#vpnTunnelList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "VpnTunnelsScopedList": { - "id": "VpnTunnelsScopedList", - "type": "object", - "properties": { - "vpnTunnels": { - "type": "array", - "description": "List of vpn tunnels contained in this scope.", - "items": { - "$ref": "VpnTunnel" - } - }, - "warning": { - "type": "object", - "description": "Informational warning which replaces the list of addresses when the list is empty.", - "properties": { - "code": { - "type": "string", - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "data": { - "type": "array", - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." - }, - "value": { - "type": "string", - "description": "[Output Only] A warning data value corresponding to the key." - } - } - } - }, - "message": { - "type": "string", - "description": "[Output Only] A human-readable description of the warning code." - } - } - } - } - }, - "XpnHostList": { - "id": "XpnHostList", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "[Output Only] A list of shared VPC host project URLs.", - "items": { - "$ref": "Project" - } - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of resource. Always compute#xpnHostList for lists of shared VPC hosts.", - "default": "compute#xpnHostList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "XpnResourceId": { - "id": "XpnResourceId", - "type": "object", - "description": "Service resource (a.k.a service project) ID.", - "properties": { - "id": { - "type": "string", - "description": "The ID of the service resource. In the case of projects, this field matches the project ID (e.g., my-project), not the project number (e.g., 12345678)." - }, - "type": { - "type": "string", - "description": "The type of the service resource.", - "enum": [ - "PROJECT", - "XPN_RESOURCE_TYPE_UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "" - ] - } - } - }, - "Zone": { - "id": "Zone", - "type": "object", - "description": "A Zone resource.", - "properties": { - "creationTimestamp": { - "type": "string", - "description": "[Output Only] Creation timestamp in RFC3339 text format." - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "[Output Only] The deprecation status associated with this zone." - }, - "description": { - "type": "string", - "description": "[Output Only] Textual description of the resource." - }, - "id": { - "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64" - }, - "kind": { - "type": "string", - "description": "[Output Only] Type of the resource. Always compute#zone for zones.", - "default": "compute#zone" - }, - "name": { - "type": "string", - "description": "[Output Only] Name of the resource." - }, - "region": { - "type": "string", - "description": "[Output Only] Full URL reference to the region which hosts the zone." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for the resource." - }, - "status": { - "type": "string", - "description": "[Output Only] Status of the zone, either UP or DOWN.", - "enum": [ - "DOWN", - "UP" - ], - "enumDescriptions": [ - "", - "" - ] - } - } - }, - "ZoneList": { - "id": "ZoneList", - "type": "object", - "description": "Contains a list of zone resources.", - "properties": { - "id": { - "type": "string", - "description": "[Output Only] Unique identifier for the resource; defined by the server." - }, - "items": { - "type": "array", - "description": "A list of Zone resources.", - "items": { - "$ref": "Zone" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "compute#zoneList" - }, - "nextPageToken": { - "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." - }, - "selfLink": { - "type": "string", - "description": "[Output Only] Server-defined URL for this resource." - } - } - }, - "ZoneSetLabelsRequest": { - "id": "ZoneSetLabelsRequest", - "type": "object", - "properties": { - "labelFingerprint": { - "type": "string", - "description": "The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels. Make a get() request to the resource to get the latest fingerprint.", - "format": "byte" - }, - "labels": { - "type": "object", - "description": "The labels to set for this resource.", - "additionalProperties": { - "type": "string" - } - } - } - } - }, - "resources": { - "acceleratorTypes": { - "methods": { - "aggregatedList": { - "id": "compute.acceleratorTypes.aggregatedList", - "path": "{project}/aggregated/acceleratorTypes", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of accelerator types.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "AcceleratorTypeAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "get": { - "id": "compute.acceleratorTypes.get", - "path": "{project}/zones/{zone}/acceleratorTypes/{acceleratorType}", - "httpMethod": "GET", - "description": "Returns the specified accelerator type. Get a list of available accelerator types by making a list() request.", - "parameters": { - "acceleratorType": { - "type": "string", - "description": "Name of the accelerator type to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "acceleratorType" - ], - "response": { - "$ref": "AcceleratorType" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.acceleratorTypes.list", - "path": "{project}/zones/{zone}/acceleratorTypes", - "httpMethod": "GET", - "description": "Retrieves a list of accelerator types available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "AcceleratorTypeList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "addresses": { - "methods": { - "aggregatedList": { - "id": "compute.addresses.aggregatedList", - "path": "{project}/aggregated/addresses", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of addresses.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "AddressAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.addresses.delete", - "path": "{project}/regions/{region}/addresses/{address}", - "httpMethod": "DELETE", - "description": "Deletes the specified address resource.", - "parameters": { - "address": { - "type": "string", - "description": "Name of the address resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "address" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.addresses.get", - "path": "{project}/regions/{region}/addresses/{address}", - "httpMethod": "GET", - "description": "Returns the specified address resource.", - "parameters": { - "address": { - "type": "string", - "description": "Name of the address resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "address" - ], - "response": { - "$ref": "Address" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.addresses.insert", - "path": "{project}/regions/{region}/addresses", - "httpMethod": "POST", - "description": "Creates an address resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "Address" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.addresses.list", - "path": "{project}/regions/{region}/addresses", - "httpMethod": "GET", - "description": "Retrieves a list of addresses contained within the specified region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "AddressList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "autoscalers": { - "methods": { - "aggregatedList": { - "id": "compute.autoscalers.aggregatedList", - "path": "{project}/aggregated/autoscalers", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of autoscalers.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "AutoscalerAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.autoscalers.delete", - "path": "{project}/zones/{zone}/autoscalers/{autoscaler}", - "httpMethod": "DELETE", - "description": "Deletes the specified autoscaler.", - "parameters": { - "autoscaler": { - "type": "string", - "description": "Name of the autoscaler to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "autoscaler" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.autoscalers.get", - "path": "{project}/zones/{zone}/autoscalers/{autoscaler}", - "httpMethod": "GET", - "description": "Returns the specified autoscaler resource. Get a list of available autoscalers by making a list() request.", - "parameters": { - "autoscaler": { - "type": "string", - "description": "Name of the autoscaler to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "autoscaler" - ], - "response": { - "$ref": "Autoscaler" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.autoscalers.insert", - "path": "{project}/zones/{zone}/autoscalers", - "httpMethod": "POST", - "description": "Creates an autoscaler in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "request": { - "$ref": "Autoscaler" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.autoscalers.list", - "path": "{project}/zones/{zone}/autoscalers", - "httpMethod": "GET", - "description": "Retrieves a list of autoscalers contained within the specified zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "AutoscalerList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.autoscalers.patch", - "path": "{project}/zones/{zone}/autoscalers", - "httpMethod": "PATCH", - "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "autoscaler": { - "type": "string", - "description": "Name of the autoscaler to patch.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "request": { - "$ref": "Autoscaler" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.autoscalers.update", - "path": "{project}/zones/{zone}/autoscalers", - "httpMethod": "PUT", - "description": "Updates an autoscaler in the specified project using the data included in the request.", - "parameters": { - "autoscaler": { - "type": "string", - "description": "Name of the autoscaler to update.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "request": { - "$ref": "Autoscaler" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "backendBuckets": { - "methods": { - "delete": { - "id": "compute.backendBuckets.delete", - "path": "{project}/global/backendBuckets/{backendBucket}", - "httpMethod": "DELETE", - "description": "Deletes the specified BackendBucket resource.", - "parameters": { - "backendBucket": { - "type": "string", - "description": "Name of the BackendBucket resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "backendBucket" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.backendBuckets.get", - "path": "{project}/global/backendBuckets/{backendBucket}", - "httpMethod": "GET", - "description": "Returns the specified BackendBucket resource. Get a list of available backend buckets by making a list() request.", - "parameters": { - "backendBucket": { - "type": "string", - "description": "Name of the BackendBucket resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "backendBucket" - ], - "response": { - "$ref": "BackendBucket" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.backendBuckets.insert", - "path": "{project}/global/backendBuckets", - "httpMethod": "POST", - "description": "Creates a BackendBucket resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "BackendBucket" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.backendBuckets.list", - "path": "{project}/global/backendBuckets", - "httpMethod": "GET", - "description": "Retrieves the list of BackendBucket resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "BackendBucketList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.backendBuckets.patch", - "path": "{project}/global/backendBuckets/{backendBucket}", - "httpMethod": "PATCH", - "description": "Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "backendBucket": { - "type": "string", - "description": "Name of the BackendBucket resource to patch.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "backendBucket" - ], - "request": { - "$ref": "BackendBucket" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.backendBuckets.update", - "path": "{project}/global/backendBuckets/{backendBucket}", - "httpMethod": "PUT", - "description": "Updates the specified BackendBucket resource with the data included in the request.", - "parameters": { - "backendBucket": { - "type": "string", - "description": "Name of the BackendBucket resource to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "backendBucket" - ], - "request": { - "$ref": "BackendBucket" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "backendServices": { - "methods": { - "aggregatedList": { - "id": "compute.backendServices.aggregatedList", - "path": "{project}/aggregated/backendServices", - "httpMethod": "GET", - "description": "Retrieves the list of all BackendService resources, regional and global, available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Name of the project scoping this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "BackendServiceAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.backendServices.delete", - "path": "{project}/global/backendServices/{backendService}", - "httpMethod": "DELETE", - "description": "Deletes the specified BackendService resource.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "backendService" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.backendServices.get", - "path": "{project}/global/backendServices/{backendService}", - "httpMethod": "GET", - "description": "Returns the specified BackendService resource. Get a list of available backend services by making a list() request.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "backendService" - ], - "response": { - "$ref": "BackendService" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getHealth": { - "id": "compute.backendServices.getHealth", - "path": "{project}/global/backendServices/{backendService}/getHealth", - "httpMethod": "POST", - "description": "Gets the most recent health check results for this BackendService.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to which the queried instance belongs.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "backendService" - ], - "request": { - "$ref": "ResourceGroupReference" - }, - "response": { - "$ref": "BackendServiceGroupHealth" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.backendServices.insert", - "path": "{project}/global/backendServices", - "httpMethod": "POST", - "description": "Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Restrictions and Guidelines for more information.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "BackendService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.backendServices.list", - "path": "{project}/global/backendServices", - "httpMethod": "GET", - "description": "Retrieves the list of BackendService resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "BackendServiceList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.backendServices.patch", - "path": "{project}/global/backendServices/{backendService}", - "httpMethod": "PATCH", - "description": "Patches the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to patch.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "backendService" - ], - "request": { - "$ref": "BackendService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.backendServices.update", - "path": "{project}/global/backendServices/{backendService}", - "httpMethod": "PUT", - "description": "Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "backendService" - ], - "request": { - "$ref": "BackendService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "diskTypes": { - "methods": { - "aggregatedList": { - "id": "compute.diskTypes.aggregatedList", - "path": "{project}/aggregated/diskTypes", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of disk types.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "DiskTypeAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "get": { - "id": "compute.diskTypes.get", - "path": "{project}/zones/{zone}/diskTypes/{diskType}", - "httpMethod": "GET", - "description": "Returns the specified disk type. Get a list of available disk types by making a list() request.", - "parameters": { - "diskType": { - "type": "string", - "description": "Name of the disk type to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "diskType" - ], - "response": { - "$ref": "DiskType" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.diskTypes.list", - "path": "{project}/zones/{zone}/diskTypes", - "httpMethod": "GET", - "description": "Retrieves a list of disk types available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "DiskTypeList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "disks": { - "methods": { - "aggregatedList": { - "id": "compute.disks.aggregatedList", - "path": "{project}/aggregated/disks", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of persistent disks.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "DiskAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "createSnapshot": { - "id": "compute.disks.createSnapshot", - "path": "{project}/zones/{zone}/disks/{disk}/createSnapshot", - "httpMethod": "POST", - "description": "Creates a snapshot of a specified persistent disk.", - "parameters": { - "disk": { - "type": "string", - "description": "Name of the persistent disk to snapshot.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "guestFlush": { - "type": "boolean", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "request": { - "$ref": "Snapshot" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "id": "compute.disks.delete", - "path": "{project}/zones/{zone}/disks/{disk}", - "httpMethod": "DELETE", - "description": "Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.", - "parameters": { - "disk": { - "type": "string", - "description": "Name of the persistent disk to delete.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.disks.get", - "path": "{project}/zones/{zone}/disks/{disk}", - "httpMethod": "GET", - "description": "Returns a specified persistent disk. Get a list of available persistent disks by making a list() request.", - "parameters": { - "disk": { - "type": "string", - "description": "Name of the persistent disk to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "response": { - "$ref": "Disk" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.disks.insert", - "path": "{project}/zones/{zone}/disks", - "httpMethod": "POST", - "description": "Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "sourceImage": { - "type": "string", - "description": "Optional. Source image to restore onto a disk.", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "request": { - "$ref": "Disk" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.disks.list", - "path": "{project}/zones/{zone}/disks", - "httpMethod": "GET", - "description": "Retrieves a list of persistent disks contained within the specified zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "DiskList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "resize": { - "id": "compute.disks.resize", - "path": "{project}/zones/{zone}/disks/{disk}/resize", - "httpMethod": "POST", - "description": "Resizes the specified persistent disk.", - "parameters": { - "disk": { - "type": "string", - "description": "The name of the persistent disk.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "request": { - "$ref": "DisksResizeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "id": "compute.disks.setLabels", - "path": "{project}/zones/{zone}/disks/{resource}/setLabels", - "httpMethod": "POST", - "description": "Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "request": { - "$ref": "ZoneSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "firewalls": { - "methods": { - "delete": { - "id": "compute.firewalls.delete", - "path": "{project}/global/firewalls/{firewall}", - "httpMethod": "DELETE", - "description": "Deletes the specified firewall.", - "parameters": { - "firewall": { - "type": "string", - "description": "Name of the firewall rule to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "firewall" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.firewalls.get", - "path": "{project}/global/firewalls/{firewall}", - "httpMethod": "GET", - "description": "Returns the specified firewall.", - "parameters": { - "firewall": { - "type": "string", - "description": "Name of the firewall rule to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "firewall" - ], - "response": { - "$ref": "Firewall" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.firewalls.insert", - "path": "{project}/global/firewalls", - "httpMethod": "POST", - "description": "Creates a firewall rule in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "Firewall" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.firewalls.list", - "path": "{project}/global/firewalls", - "httpMethod": "GET", - "description": "Retrieves the list of firewall rules available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "FirewallList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.firewalls.patch", - "path": "{project}/global/firewalls/{firewall}", - "httpMethod": "PATCH", - "description": "Updates the specified firewall rule with the data included in the request. Using PUT method, can only update following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags. This method supports patch semantics.", - "parameters": { - "firewall": { - "type": "string", - "description": "Name of the firewall rule to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "firewall" - ], - "request": { - "$ref": "Firewall" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "update": { - "id": "compute.firewalls.update", - "path": "{project}/global/firewalls/{firewall}", - "httpMethod": "PUT", - "description": "Updates the specified firewall rule with the data included in the request. Using PUT method, can only update following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags.", - "parameters": { - "firewall": { - "type": "string", - "description": "Name of the firewall rule to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "firewall" - ], - "request": { - "$ref": "Firewall" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "forwardingRules": { - "methods": { - "aggregatedList": { - "id": "compute.forwardingRules.aggregatedList", - "path": "{project}/aggregated/forwardingRules", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of forwarding rules.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "ForwardingRuleAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.forwardingRules.delete", - "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}", - "httpMethod": "DELETE", - "description": "Deletes the specified ForwardingRule resource.", - "parameters": { - "forwardingRule": { - "type": "string", - "description": "Name of the ForwardingRule resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "forwardingRule" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.forwardingRules.get", - "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}", - "httpMethod": "GET", - "description": "Returns the specified ForwardingRule resource.", - "parameters": { - "forwardingRule": { - "type": "string", - "description": "Name of the ForwardingRule resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "forwardingRule" - ], - "response": { - "$ref": "ForwardingRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.forwardingRules.insert", - "path": "{project}/regions/{region}/forwardingRules", - "httpMethod": "POST", - "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "ForwardingRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.forwardingRules.list", - "path": "{project}/regions/{region}/forwardingRules", - "httpMethod": "GET", - "description": "Retrieves a list of ForwardingRule resources available to the specified project and region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "ForwardingRuleList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setTarget": { - "id": "compute.forwardingRules.setTarget", - "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget", - "httpMethod": "POST", - "description": "Changes target URL for forwarding rule. The new target should be of the same type as the old target.", - "parameters": { - "forwardingRule": { - "type": "string", - "description": "Name of the ForwardingRule resource in which target is to be set.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "forwardingRule" - ], - "request": { - "$ref": "TargetReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "globalAddresses": { - "methods": { - "delete": { - "id": "compute.globalAddresses.delete", - "path": "{project}/global/addresses/{address}", - "httpMethod": "DELETE", - "description": "Deletes the specified address resource.", - "parameters": { - "address": { - "type": "string", - "description": "Name of the address resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "address" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.globalAddresses.get", - "path": "{project}/global/addresses/{address}", - "httpMethod": "GET", - "description": "Returns the specified address resource. Get a list of available addresses by making a list() request.", - "parameters": { - "address": { - "type": "string", - "description": "Name of the address resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "address" - ], - "response": { - "$ref": "Address" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.globalAddresses.insert", - "path": "{project}/global/addresses", - "httpMethod": "POST", - "description": "Creates an address resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "Address" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.globalAddresses.list", - "path": "{project}/global/addresses", - "httpMethod": "GET", - "description": "Retrieves a list of global addresses.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "AddressList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "globalForwardingRules": { - "methods": { - "delete": { - "id": "compute.globalForwardingRules.delete", - "path": "{project}/global/forwardingRules/{forwardingRule}", - "httpMethod": "DELETE", - "description": "Deletes the specified GlobalForwardingRule resource.", - "parameters": { - "forwardingRule": { - "type": "string", - "description": "Name of the ForwardingRule resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "forwardingRule" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.globalForwardingRules.get", - "path": "{project}/global/forwardingRules/{forwardingRule}", - "httpMethod": "GET", - "description": "Returns the specified GlobalForwardingRule resource. Get a list of available forwarding rules by making a list() request.", - "parameters": { - "forwardingRule": { - "type": "string", - "description": "Name of the ForwardingRule resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "forwardingRule" - ], - "response": { - "$ref": "ForwardingRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.globalForwardingRules.insert", - "path": "{project}/global/forwardingRules", - "httpMethod": "POST", - "description": "Creates a GlobalForwardingRule resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "ForwardingRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.globalForwardingRules.list", - "path": "{project}/global/forwardingRules", - "httpMethod": "GET", - "description": "Retrieves a list of GlobalForwardingRule resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "ForwardingRuleList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setTarget": { - "id": "compute.globalForwardingRules.setTarget", - "path": "{project}/global/forwardingRules/{forwardingRule}/setTarget", - "httpMethod": "POST", - "description": "Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target.", - "parameters": { - "forwardingRule": { - "type": "string", - "description": "Name of the ForwardingRule resource in which target is to be set.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "forwardingRule" - ], - "request": { - "$ref": "TargetReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "globalOperations": { - "methods": { - "aggregatedList": { - "id": "compute.globalOperations.aggregatedList", - "path": "{project}/aggregated/operations", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of all operations.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "OperationAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.globalOperations.delete", - "path": "{project}/global/operations/{operation}", - "httpMethod": "DELETE", - "description": "Deletes the specified Operations resource.", - "parameters": { - "operation": { - "type": "string", - "description": "Name of the Operations resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "operation" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.globalOperations.get", - "path": "{project}/global/operations/{operation}", - "httpMethod": "GET", - "description": "Retrieves the specified Operations resource. Get a list of operations by making a list() request.", - "parameters": { - "operation": { - "type": "string", - "description": "Name of the Operations resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "operation" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.globalOperations.list", - "path": "{project}/global/operations", - "httpMethod": "GET", - "description": "Retrieves a list of Operation resources contained within the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "OperationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "healthChecks": { - "methods": { - "delete": { - "id": "compute.healthChecks.delete", - "path": "{project}/global/healthChecks/{healthCheck}", - "httpMethod": "DELETE", - "description": "Deletes the specified HealthCheck resource.", - "parameters": { - "healthCheck": { - "type": "string", - "description": "Name of the HealthCheck resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "healthCheck" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.healthChecks.get", - "path": "{project}/global/healthChecks/{healthCheck}", - "httpMethod": "GET", - "description": "Returns the specified HealthCheck resource. Get a list of available health checks by making a list() request.", - "parameters": { - "healthCheck": { - "type": "string", - "description": "Name of the HealthCheck resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "healthCheck" - ], - "response": { - "$ref": "HealthCheck" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.healthChecks.insert", - "path": "{project}/global/healthChecks", - "httpMethod": "POST", - "description": "Creates a HealthCheck resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "HealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.healthChecks.list", - "path": "{project}/global/healthChecks", - "httpMethod": "GET", - "description": "Retrieves the list of HealthCheck resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "HealthCheckList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.healthChecks.patch", - "path": "{project}/global/healthChecks/{healthCheck}", - "httpMethod": "PATCH", - "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "healthCheck": { - "type": "string", - "description": "Name of the HealthCheck resource to patch.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "healthCheck" - ], - "request": { - "$ref": "HealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.healthChecks.update", - "path": "{project}/global/healthChecks/{healthCheck}", - "httpMethod": "PUT", - "description": "Updates a HealthCheck resource in the specified project using the data included in the request.", - "parameters": { - "healthCheck": { - "type": "string", - "description": "Name of the HealthCheck resource to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "healthCheck" - ], - "request": { - "$ref": "HealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "httpHealthChecks": { - "methods": { - "delete": { - "id": "compute.httpHealthChecks.delete", - "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", - "httpMethod": "DELETE", - "description": "Deletes the specified HttpHealthCheck resource.", - "parameters": { - "httpHealthCheck": { - "type": "string", - "description": "Name of the HttpHealthCheck resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "httpHealthCheck" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.httpHealthChecks.get", - "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", - "httpMethod": "GET", - "description": "Returns the specified HttpHealthCheck resource. Get a list of available HTTP health checks by making a list() request.", - "parameters": { - "httpHealthCheck": { - "type": "string", - "description": "Name of the HttpHealthCheck resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "httpHealthCheck" - ], - "response": { - "$ref": "HttpHealthCheck" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.httpHealthChecks.insert", - "path": "{project}/global/httpHealthChecks", - "httpMethod": "POST", - "description": "Creates a HttpHealthCheck resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "HttpHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.httpHealthChecks.list", - "path": "{project}/global/httpHealthChecks", - "httpMethod": "GET", - "description": "Retrieves the list of HttpHealthCheck resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "HttpHealthCheckList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.httpHealthChecks.patch", - "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", - "httpMethod": "PATCH", - "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "httpHealthCheck": { - "type": "string", - "description": "Name of the HttpHealthCheck resource to patch.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "httpHealthCheck" - ], - "request": { - "$ref": "HttpHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.httpHealthChecks.update", - "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", - "httpMethod": "PUT", - "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request.", - "parameters": { - "httpHealthCheck": { - "type": "string", - "description": "Name of the HttpHealthCheck resource to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "httpHealthCheck" - ], - "request": { - "$ref": "HttpHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "httpsHealthChecks": { - "methods": { - "delete": { - "id": "compute.httpsHealthChecks.delete", - "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}", - "httpMethod": "DELETE", - "description": "Deletes the specified HttpsHealthCheck resource.", - "parameters": { - "httpsHealthCheck": { - "type": "string", - "description": "Name of the HttpsHealthCheck resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "httpsHealthCheck" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.httpsHealthChecks.get", - "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}", - "httpMethod": "GET", - "description": "Returns the specified HttpsHealthCheck resource. Get a list of available HTTPS health checks by making a list() request.", - "parameters": { - "httpsHealthCheck": { - "type": "string", - "description": "Name of the HttpsHealthCheck resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "httpsHealthCheck" - ], - "response": { - "$ref": "HttpsHealthCheck" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.httpsHealthChecks.insert", - "path": "{project}/global/httpsHealthChecks", - "httpMethod": "POST", - "description": "Creates a HttpsHealthCheck resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "HttpsHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.httpsHealthChecks.list", - "path": "{project}/global/httpsHealthChecks", - "httpMethod": "GET", - "description": "Retrieves the list of HttpsHealthCheck resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "HttpsHealthCheckList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.httpsHealthChecks.patch", - "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}", - "httpMethod": "PATCH", - "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "httpsHealthCheck": { - "type": "string", - "description": "Name of the HttpsHealthCheck resource to patch.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "httpsHealthCheck" - ], - "request": { - "$ref": "HttpsHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.httpsHealthChecks.update", - "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}", - "httpMethod": "PUT", - "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request.", - "parameters": { - "httpsHealthCheck": { - "type": "string", - "description": "Name of the HttpsHealthCheck resource to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "httpsHealthCheck" - ], - "request": { - "$ref": "HttpsHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "images": { - "methods": { - "delete": { - "id": "compute.images.delete", - "path": "{project}/global/images/{image}", - "httpMethod": "DELETE", - "description": "Deletes the specified image.", - "parameters": { - "image": { - "type": "string", - "description": "Name of the image resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "image" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deprecate": { - "id": "compute.images.deprecate", - "path": "{project}/global/images/{image}/deprecate", - "httpMethod": "POST", - "description": "Sets the deprecation status of an image.\n\nIf an empty request body is given, clears the deprecation status instead.", - "parameters": { - "image": { - "type": "string", - "description": "Image name.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "image" - ], - "request": { - "$ref": "DeprecationStatus" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.images.get", - "path": "{project}/global/images/{image}", - "httpMethod": "GET", - "description": "Returns the specified image. Get a list of available images by making a list() request.", - "parameters": { - "image": { - "type": "string", - "description": "Name of the image resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "image" - ], - "response": { - "$ref": "Image" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getFromFamily": { - "id": "compute.images.getFromFamily", - "path": "{project}/global/images/family/{family}", - "httpMethod": "GET", - "description": "Returns the latest image that is part of an image family and is not deprecated.", - "parameters": { - "family": { - "type": "string", - "description": "Name of the image family to search for.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "family" - ], - "response": { - "$ref": "Image" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.images.insert", - "path": "{project}/global/images", - "httpMethod": "POST", - "description": "Creates an image in the specified project using the data included in the request.", - "parameters": { - "forceCreate": { - "type": "boolean", - "description": "Force image creation if true.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "Image" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_only", - "https://www.googleapis.com/auth/devstorage.read_write" - ] - }, - "list": { - "id": "compute.images.list", - "path": "{project}/global/images", - "httpMethod": "GET", - "description": "Retrieves the list of private images available to the specified project. Private images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "ImageList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setLabels": { - "id": "compute.images.setLabels", - "path": "{project}/global/images/{resource}/setLabels", - "httpMethod": "POST", - "description": "Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "GlobalSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "instanceGroupManagers": { - "methods": { - "abandonInstances": { - "id": "compute.instanceGroupManagers.abandonInstances", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", - "httpMethod": "POST", - "description": "Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "request": { - "$ref": "InstanceGroupManagersAbandonInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "id": "compute.instanceGroupManagers.aggregatedList", - "path": "{project}/aggregated/instanceGroupManagers", - "httpMethod": "GET", - "description": "Retrieves the list of managed instance groups and groups them by zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "InstanceGroupManagerAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.instanceGroupManagers.delete", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "DELETE", - "description": "Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group to delete.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deleteInstances": { - "id": "compute.instanceGroupManagers.deleteInstances", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", - "httpMethod": "POST", - "description": "Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "request": { - "$ref": "InstanceGroupManagersDeleteInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.instanceGroupManagers.get", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "GET", - "description": "Returns all of the details about the specified managed instance group. Get a list of available managed instance groups by making a list() request.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "response": { - "$ref": "InstanceGroupManager" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.instanceGroupManagers.insert", - "path": "{project}/zones/{zone}/instanceGroupManagers", - "httpMethod": "POST", - "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where you want to create the managed instance group.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "request": { - "$ref": "InstanceGroupManager" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.instanceGroupManagers.list", - "path": "{project}/zones/{zone}/instanceGroupManagers", - "httpMethod": "GET", - "description": "Retrieves a list of managed instance groups that are contained within the specified project and zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "InstanceGroupManagerList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listManagedInstances": { - "id": "compute.instanceGroupManagers.listManagedInstances", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", - "httpMethod": "POST", - "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action.", - "parameters": { - "filter": { - "type": "string", - "location": "query" - }, - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "maxResults": { - "type": "integer", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "order_by": { - "type": "string", - "location": "query" - }, - "pageToken": { - "type": "string", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "response": { - "$ref": "InstanceGroupManagersListManagedInstancesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "recreateInstances": { - "id": "compute.instanceGroupManagers.recreateInstances", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", - "httpMethod": "POST", - "description": "Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "request": { - "$ref": "InstanceGroupManagersRecreateInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "resize": { - "id": "compute.instanceGroupManagers.resize", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize", - "httpMethod": "POST", - "description": "Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "size": { - "type": "integer", - "description": "The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter.", - "required": true, - "format": "int32", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager", - "size" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setInstanceTemplate": { - "id": "compute.instanceGroupManagers.setInstanceTemplate", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", - "httpMethod": "POST", - "description": "Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "request": { - "$ref": "InstanceGroupManagersSetInstanceTemplateRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setTargetPools": { - "id": "compute.instanceGroupManagers.setTargetPools", - "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", - "httpMethod": "POST", - "description": "Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the managed instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "request": { - "$ref": "InstanceGroupManagersSetTargetPoolsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "instanceGroups": { - "methods": { - "addInstances": { - "id": "compute.instanceGroups.addInstances", - "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances", - "httpMethod": "POST", - "description": "Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.", - "parameters": { - "instanceGroup": { - "type": "string", - "description": "The name of the instance group where you are adding instances.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroup" - ], - "request": { - "$ref": "InstanceGroupsAddInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "id": "compute.instanceGroups.aggregatedList", - "path": "{project}/aggregated/instanceGroups", - "httpMethod": "GET", - "description": "Retrieves the list of instance groups and sorts them by zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "InstanceGroupAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.instanceGroups.delete", - "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}", - "httpMethod": "DELETE", - "description": "Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.", - "parameters": { - "instanceGroup": { - "type": "string", - "description": "The name of the instance group to delete.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroup" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.instanceGroups.get", - "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}", - "httpMethod": "GET", - "description": "Returns the specified instance group. Get a list of available instance groups by making a list() request.", - "parameters": { - "instanceGroup": { - "type": "string", - "description": "The name of the instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroup" - ], - "response": { - "$ref": "InstanceGroup" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.instanceGroups.insert", - "path": "{project}/zones/{zone}/instanceGroups", - "httpMethod": "POST", - "description": "Creates an instance group in the specified project using the parameters that are included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where you want to create the instance group.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "request": { - "$ref": "InstanceGroup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.instanceGroups.list", - "path": "{project}/zones/{zone}/instanceGroups", - "httpMethod": "GET", - "description": "Retrieves the list of instance groups that are located in the specified project and zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "InstanceGroupList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listInstances": { - "id": "compute.instanceGroups.listInstances", - "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances", - "httpMethod": "POST", - "description": "Lists the instances in the specified instance group.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "instanceGroup": { - "type": "string", - "description": "The name of the instance group from which you want to generate a list of included instances.", - "required": true, - "location": "path" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroup" - ], - "request": { - "$ref": "InstanceGroupsListInstancesRequest" - }, - "response": { - "$ref": "InstanceGroupsListInstances" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "removeInstances": { - "id": "compute.instanceGroups.removeInstances", - "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances", - "httpMethod": "POST", - "description": "Removes one or more instances from the specified instance group, but does not delete those instances.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted.", - "parameters": { - "instanceGroup": { - "type": "string", - "description": "The name of the instance group where the specified instances will be removed.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroup" - ], - "request": { - "$ref": "InstanceGroupsRemoveInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setNamedPorts": { - "id": "compute.instanceGroups.setNamedPorts", - "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts", - "httpMethod": "POST", - "description": "Sets the named ports for the specified instance group.", - "parameters": { - "instanceGroup": { - "type": "string", - "description": "The name of the instance group where the named ports are updated.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone where the instance group is located.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instanceGroup" - ], - "request": { - "$ref": "InstanceGroupsSetNamedPortsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "instanceTemplates": { - "methods": { - "delete": { - "id": "compute.instanceTemplates.delete", - "path": "{project}/global/instanceTemplates/{instanceTemplate}", - "httpMethod": "DELETE", - "description": "Deletes the specified instance template. If you delete an instance template that is being referenced from another instance group, the instance group will not be able to create or recreate virtual machine instances. Deleting an instance template is permanent and cannot be undone.", - "parameters": { - "instanceTemplate": { - "type": "string", - "description": "The name of the instance template to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "instanceTemplate" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.instanceTemplates.get", - "path": "{project}/global/instanceTemplates/{instanceTemplate}", - "httpMethod": "GET", - "description": "Returns the specified instance template. Get a list of available instance templates by making a list() request.", - "parameters": { - "instanceTemplate": { - "type": "string", - "description": "The name of the instance template.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "instanceTemplate" - ], - "response": { - "$ref": "InstanceTemplate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.instanceTemplates.insert", - "path": "{project}/global/instanceTemplates", - "httpMethod": "POST", - "description": "Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "InstanceTemplate" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.instanceTemplates.list", - "path": "{project}/global/instanceTemplates", - "httpMethod": "GET", - "description": "Retrieves a list of instance templates that are contained within the specified project and zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "InstanceTemplateList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "instances": { - "methods": { - "addAccessConfig": { - "id": "compute.instances.addAccessConfig", - "path": "{project}/zones/{zone}/instances/{instance}/addAccessConfig", - "httpMethod": "POST", - "description": "Adds an access config to an instance's network interface.", - "parameters": { - "instance": { - "type": "string", - "description": "The instance name for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "networkInterface": { - "type": "string", - "description": "The name of the network interface to add to this instance.", - "required": true, - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance", - "networkInterface" - ], - "request": { - "$ref": "AccessConfig" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "id": "compute.instances.aggregatedList", - "path": "{project}/aggregated/instances", - "httpMethod": "GET", - "description": "Retrieves aggregated list of instances.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "InstanceAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "attachDisk": { - "id": "compute.instances.attachDisk", - "path": "{project}/zones/{zone}/instances/{instance}/attachDisk", - "httpMethod": "POST", - "description": "Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.", - "parameters": { - "instance": { - "type": "string", - "description": "The instance name for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "request": { - "$ref": "AttachedDisk" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "id": "compute.instances.delete", - "path": "{project}/zones/{zone}/instances/{instance}", - "httpMethod": "DELETE", - "description": "Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deleteAccessConfig": { - "id": "compute.instances.deleteAccessConfig", - "path": "{project}/zones/{zone}/instances/{instance}/deleteAccessConfig", - "httpMethod": "POST", - "description": "Deletes an access config from an instance's network interface.", - "parameters": { - "accessConfig": { - "type": "string", - "description": "The name of the access config to delete.", - "required": true, - "location": "query" - }, - "instance": { - "type": "string", - "description": "The instance name for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "networkInterface": { - "type": "string", - "description": "The name of the network interface.", - "required": true, - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance", - "accessConfig", - "networkInterface" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "detachDisk": { - "id": "compute.instances.detachDisk", - "path": "{project}/zones/{zone}/instances/{instance}/detachDisk", - "httpMethod": "POST", - "description": "Detaches a disk from an instance.", - "parameters": { - "deviceName": { - "type": "string", - "description": "Disk device name to detach.", - "required": true, - "location": "query" - }, - "instance": { - "type": "string", - "description": "Instance name.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance", - "deviceName" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.instances.get", - "path": "{project}/zones/{zone}/instances/{instance}", - "httpMethod": "GET", - "description": "Returns the specified Instance resource. Get a list of available instances by making a list() request.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "response": { - "$ref": "Instance" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getSerialPortOutput": { - "id": "compute.instances.getSerialPortOutput", - "path": "{project}/zones/{zone}/instances/{instance}/serialPort", - "httpMethod": "GET", - "description": "Returns the specified instance's serial port output.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "port": { - "type": "integer", - "description": "Specifies which COM or serial port to retrieve data from.", - "default": "1", - "format": "int32", - "minimum": "1", - "maximum": "4", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "start": { - "type": "string", - "description": "Returns output starting from a specific byte position. Use this to page through output when the output is too large to return in a single request. For the initial request, leave this field unspecified. For subsequent calls, this field should be set to the next value returned in the previous call.", - "format": "int64", - "location": "query" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "response": { - "$ref": "SerialPortOutput" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.instances.insert", - "path": "{project}/zones/{zone}/instances", - "httpMethod": "POST", - "description": "Creates an instance resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "request": { - "$ref": "Instance" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.instances.list", - "path": "{project}/zones/{zone}/instances", - "httpMethod": "GET", - "description": "Retrieves the list of instances contained within the specified zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "InstanceList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "reset": { - "id": "compute.instances.reset", - "path": "{project}/zones/{zone}/instances/{instance}/reset", - "httpMethod": "POST", - "description": "Performs a reset on the instance. For more information, see Resetting an instance.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setDiskAutoDelete": { - "id": "compute.instances.setDiskAutoDelete", - "path": "{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete", - "httpMethod": "POST", - "description": "Sets the auto-delete flag for a disk attached to an instance.", - "parameters": { - "autoDelete": { - "type": "boolean", - "description": "Whether to auto-delete the disk when the instance is deleted.", - "required": true, - "location": "query" - }, - "deviceName": { - "type": "string", - "description": "The device name of the disk to modify.", - "required": true, - "pattern": "\\w[\\w.-]{0,254}", - "location": "query" - }, - "instance": { - "type": "string", - "description": "The instance name.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance", - "autoDelete", - "deviceName" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "id": "compute.instances.setLabels", - "path": "{project}/zones/{zone}/instances/{instance}/setLabels", - "httpMethod": "POST", - "description": "Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "request": { - "$ref": "InstancesSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setMachineResources": { - "id": "compute.instances.setMachineResources", - "path": "{project}/zones/{zone}/instances/{instance}/setMachineResources", - "httpMethod": "POST", - "description": "Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "request": { - "$ref": "InstancesSetMachineResourcesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setMachineType": { - "id": "compute.instances.setMachineType", - "path": "{project}/zones/{zone}/instances/{instance}/setMachineType", - "httpMethod": "POST", - "description": "Changes the machine type for a stopped instance to the machine type specified in the request.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "request": { - "$ref": "InstancesSetMachineTypeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setMetadata": { - "id": "compute.instances.setMetadata", - "path": "{project}/zones/{zone}/instances/{instance}/setMetadata", - "httpMethod": "POST", - "description": "Sets metadata for the specified instance to the data included in the request.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "request": { - "$ref": "Metadata" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setScheduling": { - "id": "compute.instances.setScheduling", - "path": "{project}/zones/{zone}/instances/{instance}/setScheduling", - "httpMethod": "POST", - "description": "Sets an instance's scheduling options.", - "parameters": { - "instance": { - "type": "string", - "description": "Instance name.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "request": { - "$ref": "Scheduling" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setServiceAccount": { - "id": "compute.instances.setServiceAccount", - "path": "{project}/zones/{zone}/instances/{instance}/setServiceAccount", - "httpMethod": "POST", - "description": "Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance resource to start.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "request": { - "$ref": "InstancesSetServiceAccountRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setTags": { - "id": "compute.instances.setTags", - "path": "{project}/zones/{zone}/instances/{instance}/setTags", - "httpMethod": "POST", - "description": "Sets tags for the specified instance to the data included in the request.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "request": { - "$ref": "Tags" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "start": { - "id": "compute.instances.start", - "path": "{project}/zones/{zone}/instances/{instance}/start", - "httpMethod": "POST", - "description": "Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance resource to start.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "startWithEncryptionKey": { - "id": "compute.instances.startWithEncryptionKey", - "path": "{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey", - "httpMethod": "POST", - "description": "Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance resource to start.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "request": { - "$ref": "InstancesStartWithEncryptionKeyRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "stop": { - "id": "compute.instances.stop", - "path": "{project}/zones/{zone}/instances/{instance}/stop", - "httpMethod": "POST", - "description": "Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur per-minute, virtual machine usage charges while they are stopped, but any resources that the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.", - "parameters": { - "instance": { - "type": "string", - "description": "Name of the instance resource to stop.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "licenses": { - "methods": { - "get": { - "id": "compute.licenses.get", - "path": "{project}/global/licenses/{license}", - "httpMethod": "GET", - "description": "Returns the specified License resource.", - "parameters": { - "license": { - "type": "string", - "description": "Name of the License resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "license" - ], - "response": { - "$ref": "License" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "machineTypes": { - "methods": { - "aggregatedList": { - "id": "compute.machineTypes.aggregatedList", - "path": "{project}/aggregated/machineTypes", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of machine types.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "MachineTypeAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "get": { - "id": "compute.machineTypes.get", - "path": "{project}/zones/{zone}/machineTypes/{machineType}", - "httpMethod": "GET", - "description": "Returns the specified machine type. Get a list of available machine types by making a list() request.", - "parameters": { - "machineType": { - "type": "string", - "description": "Name of the machine type to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "machineType" - ], - "response": { - "$ref": "MachineType" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.machineTypes.list", - "path": "{project}/zones/{zone}/machineTypes", - "httpMethod": "GET", - "description": "Retrieves a list of machine types available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "The name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "MachineTypeList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "networks": { - "methods": { - "addPeering": { - "id": "compute.networks.addPeering", - "path": "{project}/global/networks/{network}/addPeering", - "httpMethod": "POST", - "description": "Adds a peering to the specified network.", - "parameters": { - "network": { - "type": "string", - "description": "Name of the network resource to add peering to.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "network" - ], - "request": { - "$ref": "NetworksAddPeeringRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "id": "compute.networks.delete", - "path": "{project}/global/networks/{network}", - "httpMethod": "DELETE", - "description": "Deletes the specified network.", - "parameters": { - "network": { - "type": "string", - "description": "Name of the network to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "network" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.networks.get", - "path": "{project}/global/networks/{network}", - "httpMethod": "GET", - "description": "Returns the specified network. Get a list of available networks by making a list() request.", - "parameters": { - "network": { - "type": "string", - "description": "Name of the network to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "network" - ], - "response": { - "$ref": "Network" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.networks.insert", - "path": "{project}/global/networks", - "httpMethod": "POST", - "description": "Creates a network in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "Network" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.networks.list", - "path": "{project}/global/networks", - "httpMethod": "GET", - "description": "Retrieves the list of networks available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "NetworkList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "removePeering": { - "id": "compute.networks.removePeering", - "path": "{project}/global/networks/{network}/removePeering", - "httpMethod": "POST", - "description": "Removes a peering from the specified network.", - "parameters": { - "network": { - "type": "string", - "description": "Name of the network resource to remove peering from.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "network" - ], - "request": { - "$ref": "NetworksRemovePeeringRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "switchToCustomMode": { - "id": "compute.networks.switchToCustomMode", - "path": "{project}/global/networks/{network}/switchToCustomMode", - "httpMethod": "POST", - "description": "Switches the network mode from auto subnet mode to custom subnet mode.", - "parameters": { - "network": { - "type": "string", - "description": "Name of the network to be updated.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "network" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "projects": { - "methods": { - "disableXpnHost": { - "id": "compute.projects.disableXpnHost", - "path": "{project}/disableXpnHost", - "httpMethod": "POST", - "description": "Disable this project as a shared VPC host project.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "disableXpnResource": { - "id": "compute.projects.disableXpnResource", - "path": "{project}/disableXpnResource", - "httpMethod": "POST", - "description": "Disable a serivce resource (a.k.a service project) associated with this host project.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "ProjectsDisableXpnResourceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "enableXpnHost": { - "id": "compute.projects.enableXpnHost", - "path": "{project}/enableXpnHost", - "httpMethod": "POST", - "description": "Enable this project as a shared VPC host project.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "enableXpnResource": { - "id": "compute.projects.enableXpnResource", - "path": "{project}/enableXpnResource", - "httpMethod": "POST", - "description": "Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "ProjectsEnableXpnResourceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.projects.get", - "path": "{project}", - "httpMethod": "GET", - "description": "Returns the specified Project resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "Project" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getXpnHost": { - "id": "compute.projects.getXpnHost", - "path": "{project}/getXpnHost", - "httpMethod": "GET", - "description": "Get the shared VPC host project that this project links to. May be empty if no link exists.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "Project" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "getXpnResources": { - "id": "compute.projects.getXpnResources", - "path": "{project}/getXpnResources", - "httpMethod": "GET", - "description": "Get service resources (a.k.a service project) associated with this host project.", - "parameters": { - "filter": { - "type": "string", - "location": "query" - }, - "maxResults": { - "type": "integer", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "order_by": { - "type": "string", - "location": "query" - }, - "pageToken": { - "type": "string", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "ProjectsGetXpnResources" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "listXpnHosts": { - "id": "compute.projects.listXpnHosts", - "path": "{project}/listXpnHosts", - "httpMethod": "POST", - "description": "List all shared VPC host projects visible to the user in an organization.", - "parameters": { - "filter": { - "type": "string", - "location": "query" - }, - "maxResults": { - "type": "integer", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "order_by": { - "type": "string", - "location": "query" - }, - "pageToken": { - "type": "string", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "ProjectsListXpnHostsRequest" - }, - "response": { - "$ref": "XpnHostList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "moveDisk": { - "id": "compute.projects.moveDisk", - "path": "{project}/moveDisk", - "httpMethod": "POST", - "description": "Moves a persistent disk from one zone to another.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "DiskMoveRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "moveInstance": { - "id": "compute.projects.moveInstance", - "path": "{project}/moveInstance", - "httpMethod": "POST", - "description": "Moves an instance and its attached persistent disks from one zone to another.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "InstanceMoveRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setCommonInstanceMetadata": { - "id": "compute.projects.setCommonInstanceMetadata", - "path": "{project}/setCommonInstanceMetadata", - "httpMethod": "POST", - "description": "Sets metadata common to all instances within the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "Metadata" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setUsageExportBucket": { - "id": "compute.projects.setUsageExportBucket", - "path": "{project}/setUsageExportBucket", - "httpMethod": "POST", - "description": "Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "UsageExportLocation" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_only", - "https://www.googleapis.com/auth/devstorage.read_write" - ] - } - } - }, - "regionAutoscalers": { - "methods": { - "delete": { - "id": "compute.regionAutoscalers.delete", - "path": "{project}/regions/{region}/autoscalers/{autoscaler}", - "httpMethod": "DELETE", - "description": "Deletes the specified autoscaler.", - "parameters": { - "autoscaler": { - "type": "string", - "description": "Name of the autoscaler to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "autoscaler" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.regionAutoscalers.get", - "path": "{project}/regions/{region}/autoscalers/{autoscaler}", - "httpMethod": "GET", - "description": "Returns the specified autoscaler.", - "parameters": { - "autoscaler": { - "type": "string", - "description": "Name of the autoscaler to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "autoscaler" - ], - "response": { - "$ref": "Autoscaler" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.regionAutoscalers.insert", - "path": "{project}/regions/{region}/autoscalers", - "httpMethod": "POST", - "description": "Creates an autoscaler in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "Autoscaler" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.regionAutoscalers.list", - "path": "{project}/regions/{region}/autoscalers", - "httpMethod": "GET", - "description": "Retrieves a list of autoscalers contained within the specified region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "RegionAutoscalerList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.regionAutoscalers.patch", - "path": "{project}/regions/{region}/autoscalers", - "httpMethod": "PATCH", - "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "autoscaler": { - "type": "string", - "description": "Name of the autoscaler to patch.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "Autoscaler" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.regionAutoscalers.update", - "path": "{project}/regions/{region}/autoscalers", - "httpMethod": "PUT", - "description": "Updates an autoscaler in the specified project using the data included in the request.", - "parameters": { - "autoscaler": { - "type": "string", - "description": "Name of the autoscaler to update.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "Autoscaler" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionBackendServices": { - "methods": { - "delete": { - "id": "compute.regionBackendServices.delete", - "path": "{project}/regions/{region}/backendServices/{backendService}", - "httpMethod": "DELETE", - "description": "Deletes the specified regional BackendService resource.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "backendService" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.regionBackendServices.get", - "path": "{project}/regions/{region}/backendServices/{backendService}", - "httpMethod": "GET", - "description": "Returns the specified regional BackendService resource.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "backendService" - ], - "response": { - "$ref": "BackendService" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getHealth": { - "id": "compute.regionBackendServices.getHealth", - "path": "{project}/regions/{region}/backendServices/{backendService}/getHealth", - "httpMethod": "POST", - "description": "Gets the most recent health check results for this regional BackendService.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to which the queried instance belongs.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "backendService" - ], - "request": { - "$ref": "ResourceGroupReference" - }, - "response": { - "$ref": "BackendServiceGroupHealth" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.regionBackendServices.insert", - "path": "{project}/regions/{region}/backendServices", - "httpMethod": "POST", - "description": "Creates a regional BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a regional backend service. Read Restrictions and Guidelines for more information.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "BackendService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.regionBackendServices.list", - "path": "{project}/regions/{region}/backendServices", - "httpMethod": "GET", - "description": "Retrieves the list of regional BackendService resources available to the specified project in the given region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "BackendServiceList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.regionBackendServices.patch", - "path": "{project}/regions/{region}/backendServices/{backendService}", - "httpMethod": "PATCH", - "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to patch.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "backendService" - ], - "request": { - "$ref": "BackendService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.regionBackendServices.update", - "path": "{project}/regions/{region}/backendServices/{backendService}", - "httpMethod": "PUT", - "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information.", - "parameters": { - "backendService": { - "type": "string", - "description": "Name of the BackendService resource to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "backendService" - ], - "request": { - "$ref": "BackendService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionCommitments": { - "methods": { - "aggregatedList": { - "id": "compute.regionCommitments.aggregatedList", - "path": "{project}/aggregated/commitments", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of commitments.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "CommitmentAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "get": { - "id": "compute.regionCommitments.get", - "path": "{project}/regions/{region}/commitments/{commitment}", - "httpMethod": "GET", - "description": "Returns the specified commitment resource. Get a list of available commitments by making a list() request.", - "parameters": { - "commitment": { - "type": "string", - "description": "Name of the commitment to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "commitment" - ], - "response": { - "$ref": "Commitment" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.regionCommitments.insert", - "path": "{project}/regions/{region}/commitments", - "httpMethod": "POST", - "description": "Creates a commitment in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "Commitment" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.regionCommitments.list", - "path": "{project}/regions/{region}/commitments", - "httpMethod": "GET", - "description": "Retrieves a list of commitments contained within the specified region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "CommitmentList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionInstanceGroupManagers": { - "methods": { - "abandonInstances": { - "id": "compute.regionInstanceGroupManagers.abandonInstances", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", - "httpMethod": "POST", - "description": "Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "Name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "request": { - "$ref": "RegionInstanceGroupManagersAbandonInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "id": "compute.regionInstanceGroupManagers.delete", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "DELETE", - "description": "Deletes the specified managed instance group and all of the instances in that group.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "Name of the managed instance group to delete.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deleteInstances": { - "id": "compute.regionInstanceGroupManagers.deleteInstances", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", - "httpMethod": "POST", - "description": "Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "Name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "request": { - "$ref": "RegionInstanceGroupManagersDeleteInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.regionInstanceGroupManagers.get", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "GET", - "description": "Returns all of the details about the specified managed instance group.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "Name of the managed instance group to return.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "response": { - "$ref": "InstanceGroupManager" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.regionInstanceGroupManagers.insert", - "path": "{project}/regions/{region}/instanceGroupManagers", - "httpMethod": "POST", - "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA regional managed instance group can contain up to 2000 instances.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "InstanceGroupManager" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.regionInstanceGroupManagers.list", - "path": "{project}/regions/{region}/instanceGroupManagers", - "httpMethod": "GET", - "description": "Retrieves the list of managed instance groups that are contained within the specified region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "RegionInstanceGroupManagerList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listManagedInstances": { - "id": "compute.regionInstanceGroupManagers.listManagedInstances", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", - "httpMethod": "POST", - "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances.", - "parameters": { - "filter": { - "type": "string", - "location": "query" - }, - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "maxResults": { - "type": "integer", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "order_by": { - "type": "string", - "location": "query" - }, - "pageToken": { - "type": "string", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "response": { - "$ref": "RegionInstanceGroupManagersListInstancesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "recreateInstances": { - "id": "compute.regionInstanceGroupManagers.recreateInstances", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", - "httpMethod": "POST", - "description": "Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "Name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "request": { - "$ref": "RegionInstanceGroupManagersRecreateRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "resize": { - "id": "compute.regionInstanceGroupManagers.resize", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resize", - "httpMethod": "POST", - "description": "Changes the intended size for the managed instance group. If you increase the size, the group schedules actions to create new instances using the current instance template. If you decrease the size, the group schedules delete actions on one or more instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "Name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - }, - "size": { - "type": "integer", - "description": "Number of instances that should exist in this instance group manager.", - "required": true, - "format": "int32", - "minimum": "0", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager", - "size" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setInstanceTemplate": { - "id": "compute.regionInstanceGroupManagers.setInstanceTemplate", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", - "httpMethod": "POST", - "description": "Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "The name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "request": { - "$ref": "RegionInstanceGroupManagersSetTemplateRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setTargetPools": { - "id": "compute.regionInstanceGroupManagers.setTargetPools", - "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", - "httpMethod": "POST", - "description": "Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.", - "parameters": { - "instanceGroupManager": { - "type": "string", - "description": "Name of the managed instance group.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "request": { - "$ref": "RegionInstanceGroupManagersSetTargetPoolsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionInstanceGroups": { - "methods": { - "get": { - "id": "compute.regionInstanceGroups.get", - "path": "{project}/regions/{region}/instanceGroups/{instanceGroup}", - "httpMethod": "GET", - "description": "Returns the specified instance group resource.", - "parameters": { - "instanceGroup": { - "type": "string", - "description": "Name of the instance group resource to return.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroup" - ], - "response": { - "$ref": "InstanceGroup" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.regionInstanceGroups.list", - "path": "{project}/regions/{region}/instanceGroups", - "httpMethod": "GET", - "description": "Retrieves the list of instance group resources contained within the specified region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "RegionInstanceGroupList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listInstances": { - "id": "compute.regionInstanceGroups.listInstances", - "path": "{project}/regions/{region}/instanceGroups/{instanceGroup}/listInstances", - "httpMethod": "POST", - "description": "Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "instanceGroup": { - "type": "string", - "description": "Name of the regional instance group for which we want to list the instances.", - "required": true, - "location": "path" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroup" - ], - "request": { - "$ref": "RegionInstanceGroupsListInstancesRequest" - }, - "response": { - "$ref": "RegionInstanceGroupsListInstances" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setNamedPorts": { - "id": "compute.regionInstanceGroups.setNamedPorts", - "path": "{project}/regions/{region}/instanceGroups/{instanceGroup}/setNamedPorts", - "httpMethod": "POST", - "description": "Sets the named ports for the specified regional instance group.", - "parameters": { - "instanceGroup": { - "type": "string", - "description": "The name of the regional instance group where the named ports are updated.", - "required": true, - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "instanceGroup" - ], - "request": { - "$ref": "RegionInstanceGroupsSetNamedPortsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionOperations": { - "methods": { - "delete": { - "id": "compute.regionOperations.delete", - "path": "{project}/regions/{region}/operations/{operation}", - "httpMethod": "DELETE", - "description": "Deletes the specified region-specific Operations resource.", - "parameters": { - "operation": { - "type": "string", - "description": "Name of the Operations resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "operation" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.regionOperations.get", - "path": "{project}/regions/{region}/operations/{operation}", - "httpMethod": "GET", - "description": "Retrieves the specified region-specific Operations resource.", - "parameters": { - "operation": { - "type": "string", - "description": "Name of the Operations resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "operation" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.regionOperations.list", - "path": "{project}/regions/{region}/operations", - "httpMethod": "GET", - "description": "Retrieves a list of Operation resources contained within the specified region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "OperationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regions": { - "methods": { - "get": { - "id": "compute.regions.get", - "path": "{project}/regions/{region}", - "httpMethod": "GET", - "description": "Returns the specified Region resource. Get a list of available regions by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "Region" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.regions.list", - "path": "{project}/regions", - "httpMethod": "GET", - "description": "Retrieves the list of region resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "RegionList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "routers": { - "methods": { - "aggregatedList": { - "id": "compute.routers.aggregatedList", - "path": "{project}/aggregated/routers", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of routers.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "RouterAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.routers.delete", - "path": "{project}/regions/{region}/routers/{router}", - "httpMethod": "DELETE", - "description": "Deletes the specified Router resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "router": { - "type": "string", - "description": "Name of the Router resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "router" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.routers.get", - "path": "{project}/regions/{region}/routers/{router}", - "httpMethod": "GET", - "description": "Returns the specified Router resource. Get a list of available routers by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "router": { - "type": "string", - "description": "Name of the Router resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "router" - ], - "response": { - "$ref": "Router" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getRouterStatus": { - "id": "compute.routers.getRouterStatus", - "path": "{project}/regions/{region}/routers/{router}/getRouterStatus", - "httpMethod": "GET", - "description": "Retrieves runtime information of the specified router.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "router": { - "type": "string", - "description": "Name of the Router resource to query.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "router" - ], - "response": { - "$ref": "RouterStatusResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.routers.insert", - "path": "{project}/regions/{region}/routers", - "httpMethod": "POST", - "description": "Creates a Router resource in the specified project and region using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "Router" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.routers.list", - "path": "{project}/regions/{region}/routers", - "httpMethod": "GET", - "description": "Retrieves a list of Router resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "RouterList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.routers.patch", - "path": "{project}/regions/{region}/routers/{router}", - "httpMethod": "PATCH", - "description": "Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "router": { - "type": "string", - "description": "Name of the Router resource to patch.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "router" - ], - "request": { - "$ref": "Router" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "preview": { - "id": "compute.routers.preview", - "path": "{project}/regions/{region}/routers/{router}/preview", - "httpMethod": "POST", - "description": "Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "router": { - "type": "string", - "description": "Name of the Router resource to query.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "router" - ], - "request": { - "$ref": "Router" - }, - "response": { - "$ref": "RoutersPreviewResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.routers.update", - "path": "{project}/regions/{region}/routers/{router}", - "httpMethod": "PUT", - "description": "Updates the specified Router resource with the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "router": { - "type": "string", - "description": "Name of the Router resource to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "router" - ], - "request": { - "$ref": "Router" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "routes": { - "methods": { - "delete": { - "id": "compute.routes.delete", - "path": "{project}/global/routes/{route}", - "httpMethod": "DELETE", - "description": "Deletes the specified Route resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "route": { - "type": "string", - "description": "Name of the Route resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "route" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.routes.get", - "path": "{project}/global/routes/{route}", - "httpMethod": "GET", - "description": "Returns the specified Route resource. Get a list of available routes by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "route": { - "type": "string", - "description": "Name of the Route resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "route" - ], - "response": { - "$ref": "Route" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.routes.insert", - "path": "{project}/global/routes", - "httpMethod": "POST", - "description": "Creates a Route resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "Route" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.routes.list", - "path": "{project}/global/routes", - "httpMethod": "GET", - "description": "Retrieves the list of Route resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "RouteList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "snapshots": { - "methods": { - "delete": { - "id": "compute.snapshots.delete", - "path": "{project}/global/snapshots/{snapshot}", - "httpMethod": "DELETE", - "description": "Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.\n\nFor more information, see Deleting snaphots.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "snapshot": { - "type": "string", - "description": "Name of the Snapshot resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "snapshot" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.snapshots.get", - "path": "{project}/global/snapshots/{snapshot}", - "httpMethod": "GET", - "description": "Returns the specified Snapshot resource. Get a list of available snapshots by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "snapshot": { - "type": "string", - "description": "Name of the Snapshot resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "snapshot" - ], - "response": { - "$ref": "Snapshot" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.snapshots.list", - "path": "{project}/global/snapshots", - "httpMethod": "GET", - "description": "Retrieves the list of Snapshot resources contained within the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "SnapshotList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setLabels": { - "id": "compute.snapshots.setLabels", - "path": "{project}/global/snapshots/{resource}/setLabels", - "httpMethod": "POST", - "description": "Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "resource": { - "type": "string", - "description": "Name of the resource for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "resource" - ], - "request": { - "$ref": "GlobalSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "sslCertificates": { - "methods": { - "delete": { - "id": "compute.sslCertificates.delete", - "path": "{project}/global/sslCertificates/{sslCertificate}", - "httpMethod": "DELETE", - "description": "Deletes the specified SslCertificate resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "sslCertificate": { - "type": "string", - "description": "Name of the SslCertificate resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "sslCertificate" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.sslCertificates.get", - "path": "{project}/global/sslCertificates/{sslCertificate}", - "httpMethod": "GET", - "description": "Returns the specified SslCertificate resource. Get a list of available SSL certificates by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "sslCertificate": { - "type": "string", - "description": "Name of the SslCertificate resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "sslCertificate" - ], - "response": { - "$ref": "SslCertificate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.sslCertificates.insert", - "path": "{project}/global/sslCertificates", - "httpMethod": "POST", - "description": "Creates a SslCertificate resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "SslCertificate" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.sslCertificates.list", - "path": "{project}/global/sslCertificates", - "httpMethod": "GET", - "description": "Retrieves the list of SslCertificate resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "SslCertificateList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "subnetworks": { - "methods": { - "aggregatedList": { - "id": "compute.subnetworks.aggregatedList", - "path": "{project}/aggregated/subnetworks", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of subnetworks.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "SubnetworkAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.subnetworks.delete", - "path": "{project}/regions/{region}/subnetworks/{subnetwork}", - "httpMethod": "DELETE", - "description": "Deletes the specified subnetwork.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "subnetwork": { - "type": "string", - "description": "Name of the Subnetwork resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "subnetwork" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "expandIpCidrRange": { - "id": "compute.subnetworks.expandIpCidrRange", - "path": "{project}/regions/{region}/subnetworks/{subnetwork}/expandIpCidrRange", - "httpMethod": "POST", - "description": "Expands the IP CIDR range of the subnetwork to a specified value.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "subnetwork": { - "type": "string", - "description": "Name of the Subnetwork resource to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "subnetwork" - ], - "request": { - "$ref": "SubnetworksExpandIpCidrRangeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.subnetworks.get", - "path": "{project}/regions/{region}/subnetworks/{subnetwork}", - "httpMethod": "GET", - "description": "Returns the specified subnetwork. Get a list of available subnetworks list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "subnetwork": { - "type": "string", - "description": "Name of the Subnetwork resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "subnetwork" - ], - "response": { - "$ref": "Subnetwork" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.subnetworks.insert", - "path": "{project}/regions/{region}/subnetworks", - "httpMethod": "POST", - "description": "Creates a subnetwork in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "Subnetwork" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.subnetworks.list", - "path": "{project}/regions/{region}/subnetworks", - "httpMethod": "GET", - "description": "Retrieves a list of subnetworks available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "SubnetworkList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setPrivateIpGoogleAccess": { - "id": "compute.subnetworks.setPrivateIpGoogleAccess", - "path": "{project}/regions/{region}/subnetworks/{subnetwork}/setPrivateIpGoogleAccess", - "httpMethod": "POST", - "description": "Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "subnetwork": { - "type": "string", - "description": "Name of the Subnetwork resource.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "subnetwork" - ], - "request": { - "$ref": "SubnetworksSetPrivateIpGoogleAccessRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "targetHttpProxies": { - "methods": { - "delete": { - "id": "compute.targetHttpProxies.delete", - "path": "{project}/global/targetHttpProxies/{targetHttpProxy}", - "httpMethod": "DELETE", - "description": "Deletes the specified TargetHttpProxy resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "targetHttpProxy": { - "type": "string", - "description": "Name of the TargetHttpProxy resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetHttpProxy" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.targetHttpProxies.get", - "path": "{project}/global/targetHttpProxies/{targetHttpProxy}", - "httpMethod": "GET", - "description": "Returns the specified TargetHttpProxy resource. Get a list of available target HTTP proxies by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "targetHttpProxy": { - "type": "string", - "description": "Name of the TargetHttpProxy resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetHttpProxy" - ], - "response": { - "$ref": "TargetHttpProxy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.targetHttpProxies.insert", - "path": "{project}/global/targetHttpProxies", - "httpMethod": "POST", - "description": "Creates a TargetHttpProxy resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "TargetHttpProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.targetHttpProxies.list", - "path": "{project}/global/targetHttpProxies", - "httpMethod": "GET", - "description": "Retrieves the list of TargetHttpProxy resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "TargetHttpProxyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setUrlMap": { - "id": "compute.targetHttpProxies.setUrlMap", - "path": "{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap", - "httpMethod": "POST", - "description": "Changes the URL map for TargetHttpProxy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "targetHttpProxy": { - "type": "string", - "description": "Name of the TargetHttpProxy to set a URL map for.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetHttpProxy" - ], - "request": { - "$ref": "UrlMapReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "targetHttpsProxies": { - "methods": { - "delete": { - "id": "compute.targetHttpsProxies.delete", - "path": "{project}/global/targetHttpsProxies/{targetHttpsProxy}", - "httpMethod": "DELETE", - "description": "Deletes the specified TargetHttpsProxy resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "targetHttpsProxy": { - "type": "string", - "description": "Name of the TargetHttpsProxy resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetHttpsProxy" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.targetHttpsProxies.get", - "path": "{project}/global/targetHttpsProxies/{targetHttpsProxy}", - "httpMethod": "GET", - "description": "Returns the specified TargetHttpsProxy resource. Get a list of available target HTTPS proxies by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "targetHttpsProxy": { - "type": "string", - "description": "Name of the TargetHttpsProxy resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetHttpsProxy" - ], - "response": { - "$ref": "TargetHttpsProxy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.targetHttpsProxies.insert", - "path": "{project}/global/targetHttpsProxies", - "httpMethod": "POST", - "description": "Creates a TargetHttpsProxy resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "TargetHttpsProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.targetHttpsProxies.list", - "path": "{project}/global/targetHttpsProxies", - "httpMethod": "GET", - "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "TargetHttpsProxyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setSslCertificates": { - "id": "compute.targetHttpsProxies.setSslCertificates", - "path": "{project}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates", - "httpMethod": "POST", - "description": "Replaces SslCertificates for TargetHttpsProxy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "targetHttpsProxy": { - "type": "string", - "description": "Name of the TargetHttpsProxy resource to set an SslCertificates resource for.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetHttpsProxy" - ], - "request": { - "$ref": "TargetHttpsProxiesSetSslCertificatesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setUrlMap": { - "id": "compute.targetHttpsProxies.setUrlMap", - "path": "{project}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap", - "httpMethod": "POST", - "description": "Changes the URL map for TargetHttpsProxy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "targetHttpsProxy": { - "type": "string", - "description": "Name of the TargetHttpsProxy resource whose URL map is to be set.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetHttpsProxy" - ], - "request": { - "$ref": "UrlMapReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "targetInstances": { - "methods": { - "aggregatedList": { - "id": "compute.targetInstances.aggregatedList", - "path": "{project}/aggregated/targetInstances", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of target instances.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "TargetInstanceAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.targetInstances.delete", - "path": "{project}/zones/{zone}/targetInstances/{targetInstance}", - "httpMethod": "DELETE", - "description": "Deletes the specified TargetInstance resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "targetInstance": { - "type": "string", - "description": "Name of the TargetInstance resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "targetInstance" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.targetInstances.get", - "path": "{project}/zones/{zone}/targetInstances/{targetInstance}", - "httpMethod": "GET", - "description": "Returns the specified TargetInstance resource. Get a list of available target instances by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "targetInstance": { - "type": "string", - "description": "Name of the TargetInstance resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "targetInstance" - ], - "response": { - "$ref": "TargetInstance" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.targetInstances.insert", - "path": "{project}/zones/{zone}/targetInstances", - "httpMethod": "POST", - "description": "Creates a TargetInstance resource in the specified project and zone using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "request": { - "$ref": "TargetInstance" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.targetInstances.list", - "path": "{project}/zones/{zone}/targetInstances", - "httpMethod": "GET", - "description": "Retrieves a list of TargetInstance resources available to the specified project and zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "TargetInstanceList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "targetPools": { - "methods": { - "addHealthCheck": { - "id": "compute.targetPools.addHealthCheck", - "path": "{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck", - "httpMethod": "POST", - "description": "Adds health check URLs to a target pool.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "targetPool": { - "type": "string", - "description": "Name of the target pool to add a health check to.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "request": { - "$ref": "TargetPoolsAddHealthCheckRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "addInstance": { - "id": "compute.targetPools.addInstance", - "path": "{project}/regions/{region}/targetPools/{targetPool}/addInstance", - "httpMethod": "POST", - "description": "Adds an instance to a target pool.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "targetPool": { - "type": "string", - "description": "Name of the TargetPool resource to add instances to.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "request": { - "$ref": "TargetPoolsAddInstanceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "id": "compute.targetPools.aggregatedList", - "path": "{project}/aggregated/targetPools", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of target pools.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "TargetPoolAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.targetPools.delete", - "path": "{project}/regions/{region}/targetPools/{targetPool}", - "httpMethod": "DELETE", - "description": "Deletes the specified target pool.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "targetPool": { - "type": "string", - "description": "Name of the TargetPool resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.targetPools.get", - "path": "{project}/regions/{region}/targetPools/{targetPool}", - "httpMethod": "GET", - "description": "Returns the specified target pool. Get a list of available target pools by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "targetPool": { - "type": "string", - "description": "Name of the TargetPool resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "response": { - "$ref": "TargetPool" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getHealth": { - "id": "compute.targetPools.getHealth", - "path": "{project}/regions/{region}/targetPools/{targetPool}/getHealth", - "httpMethod": "POST", - "description": "Gets the most recent health check results for each IP for the instance that is referenced by the given target pool.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "targetPool": { - "type": "string", - "description": "Name of the TargetPool resource to which the queried instance belongs.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "request": { - "$ref": "InstanceReference" - }, - "response": { - "$ref": "TargetPoolInstanceHealth" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.targetPools.insert", - "path": "{project}/regions/{region}/targetPools", - "httpMethod": "POST", - "description": "Creates a target pool in the specified project and region using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "TargetPool" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.targetPools.list", - "path": "{project}/regions/{region}/targetPools", - "httpMethod": "GET", - "description": "Retrieves a list of target pools available to the specified project and region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "TargetPoolList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "removeHealthCheck": { - "id": "compute.targetPools.removeHealthCheck", - "path": "{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck", - "httpMethod": "POST", - "description": "Removes health check URL from a target pool.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "targetPool": { - "type": "string", - "description": "Name of the target pool to remove health checks from.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "request": { - "$ref": "TargetPoolsRemoveHealthCheckRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removeInstance": { - "id": "compute.targetPools.removeInstance", - "path": "{project}/regions/{region}/targetPools/{targetPool}/removeInstance", - "httpMethod": "POST", - "description": "Removes instance URL from a target pool.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "targetPool": { - "type": "string", - "description": "Name of the TargetPool resource to remove instances from.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "request": { - "$ref": "TargetPoolsRemoveInstanceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setBackup": { - "id": "compute.targetPools.setBackup", - "path": "{project}/regions/{region}/targetPools/{targetPool}/setBackup", - "httpMethod": "POST", - "description": "Changes a backup target pool's configurations.", - "parameters": { - "failoverRatio": { - "type": "number", - "description": "New failoverRatio value for the target pool.", - "format": "float", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "targetPool": { - "type": "string", - "description": "Name of the TargetPool resource to set a backup pool for.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "request": { - "$ref": "TargetReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "targetSslProxies": { - "methods": { - "delete": { - "id": "compute.targetSslProxies.delete", - "path": "{project}/global/targetSslProxies/{targetSslProxy}", - "httpMethod": "DELETE", - "description": "Deletes the specified TargetSslProxy resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "targetSslProxy": { - "type": "string", - "description": "Name of the TargetSslProxy resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetSslProxy" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.targetSslProxies.get", - "path": "{project}/global/targetSslProxies/{targetSslProxy}", - "httpMethod": "GET", - "description": "Returns the specified TargetSslProxy resource. Get a list of available target SSL proxies by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "targetSslProxy": { - "type": "string", - "description": "Name of the TargetSslProxy resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetSslProxy" - ], - "response": { - "$ref": "TargetSslProxy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.targetSslProxies.insert", - "path": "{project}/global/targetSslProxies", - "httpMethod": "POST", - "description": "Creates a TargetSslProxy resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "TargetSslProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.targetSslProxies.list", - "path": "{project}/global/targetSslProxies", - "httpMethod": "GET", - "description": "Retrieves the list of TargetSslProxy resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "TargetSslProxyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setBackendService": { - "id": "compute.targetSslProxies.setBackendService", - "path": "{project}/global/targetSslProxies/{targetSslProxy}/setBackendService", - "httpMethod": "POST", - "description": "Changes the BackendService for TargetSslProxy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "targetSslProxy": { - "type": "string", - "description": "Name of the TargetSslProxy resource whose BackendService resource is to be set.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetSslProxy" - ], - "request": { - "$ref": "TargetSslProxiesSetBackendServiceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setProxyHeader": { - "id": "compute.targetSslProxies.setProxyHeader", - "path": "{project}/global/targetSslProxies/{targetSslProxy}/setProxyHeader", - "httpMethod": "POST", - "description": "Changes the ProxyHeaderType for TargetSslProxy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "targetSslProxy": { - "type": "string", - "description": "Name of the TargetSslProxy resource whose ProxyHeader is to be set.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetSslProxy" - ], - "request": { - "$ref": "TargetSslProxiesSetProxyHeaderRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setSslCertificates": { - "id": "compute.targetSslProxies.setSslCertificates", - "path": "{project}/global/targetSslProxies/{targetSslProxy}/setSslCertificates", - "httpMethod": "POST", - "description": "Changes SslCertificates for TargetSslProxy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "targetSslProxy": { - "type": "string", - "description": "Name of the TargetSslProxy resource whose SslCertificate resource is to be set.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetSslProxy" - ], - "request": { - "$ref": "TargetSslProxiesSetSslCertificatesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "targetTcpProxies": { - "methods": { - "delete": { - "id": "compute.targetTcpProxies.delete", - "path": "{project}/global/targetTcpProxies/{targetTcpProxy}", - "httpMethod": "DELETE", - "description": "Deletes the specified TargetTcpProxy resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "targetTcpProxy": { - "type": "string", - "description": "Name of the TargetTcpProxy resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetTcpProxy" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.targetTcpProxies.get", - "path": "{project}/global/targetTcpProxies/{targetTcpProxy}", - "httpMethod": "GET", - "description": "Returns the specified TargetTcpProxy resource. Get a list of available target TCP proxies by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "targetTcpProxy": { - "type": "string", - "description": "Name of the TargetTcpProxy resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetTcpProxy" - ], - "response": { - "$ref": "TargetTcpProxy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.targetTcpProxies.insert", - "path": "{project}/global/targetTcpProxies", - "httpMethod": "POST", - "description": "Creates a TargetTcpProxy resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "TargetTcpProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.targetTcpProxies.list", - "path": "{project}/global/targetTcpProxies", - "httpMethod": "GET", - "description": "Retrieves the list of TargetTcpProxy resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "TargetTcpProxyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setBackendService": { - "id": "compute.targetTcpProxies.setBackendService", - "path": "{project}/global/targetTcpProxies/{targetTcpProxy}/setBackendService", - "httpMethod": "POST", - "description": "Changes the BackendService for TargetTcpProxy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "targetTcpProxy": { - "type": "string", - "description": "Name of the TargetTcpProxy resource whose BackendService resource is to be set.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetTcpProxy" - ], - "request": { - "$ref": "TargetTcpProxiesSetBackendServiceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setProxyHeader": { - "id": "compute.targetTcpProxies.setProxyHeader", - "path": "{project}/global/targetTcpProxies/{targetTcpProxy}/setProxyHeader", - "httpMethod": "POST", - "description": "Changes the ProxyHeaderType for TargetTcpProxy.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "targetTcpProxy": { - "type": "string", - "description": "Name of the TargetTcpProxy resource whose ProxyHeader is to be set.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "targetTcpProxy" - ], - "request": { - "$ref": "TargetTcpProxiesSetProxyHeaderRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "targetVpnGateways": { - "methods": { - "aggregatedList": { - "id": "compute.targetVpnGateways.aggregatedList", - "path": "{project}/aggregated/targetVpnGateways", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of target VPN gateways.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "TargetVpnGatewayAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.targetVpnGateways.delete", - "path": "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}", - "httpMethod": "DELETE", - "description": "Deletes the specified target VPN gateway.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "targetVpnGateway": { - "type": "string", - "description": "Name of the target VPN gateway to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "targetVpnGateway" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.targetVpnGateways.get", - "path": "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}", - "httpMethod": "GET", - "description": "Returns the specified target VPN gateway. Get a list of available target VPN gateways by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "targetVpnGateway": { - "type": "string", - "description": "Name of the target VPN gateway to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "targetVpnGateway" - ], - "response": { - "$ref": "TargetVpnGateway" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.targetVpnGateways.insert", - "path": "{project}/regions/{region}/targetVpnGateways", - "httpMethod": "POST", - "description": "Creates a target VPN gateway in the specified project and region using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "TargetVpnGateway" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.targetVpnGateways.list", - "path": "{project}/regions/{region}/targetVpnGateways", - "httpMethod": "GET", - "description": "Retrieves a list of target VPN gateways available to the specified project and region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "TargetVpnGatewayList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "urlMaps": { - "methods": { - "delete": { - "id": "compute.urlMaps.delete", - "path": "{project}/global/urlMaps/{urlMap}", - "httpMethod": "DELETE", - "description": "Deletes the specified UrlMap resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "urlMap": { - "type": "string", - "description": "Name of the UrlMap resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "urlMap" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.urlMaps.get", - "path": "{project}/global/urlMaps/{urlMap}", - "httpMethod": "GET", - "description": "Returns the specified UrlMap resource. Get a list of available URL maps by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "urlMap": { - "type": "string", - "description": "Name of the UrlMap resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "urlMap" - ], - "response": { - "$ref": "UrlMap" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.urlMaps.insert", - "path": "{project}/global/urlMaps", - "httpMethod": "POST", - "description": "Creates a UrlMap resource in the specified project using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "UrlMap" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "invalidateCache": { - "id": "compute.urlMaps.invalidateCache", - "path": "{project}/global/urlMaps/{urlMap}/invalidateCache", - "httpMethod": "POST", - "description": "Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "urlMap": { - "type": "string", - "description": "Name of the UrlMap scoping this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "urlMap" - ], - "request": { - "$ref": "CacheInvalidationRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.urlMaps.list", - "path": "{project}/global/urlMaps", - "httpMethod": "GET", - "description": "Retrieves the list of UrlMap resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "UrlMapList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "id": "compute.urlMaps.patch", - "path": "{project}/global/urlMaps/{urlMap}", - "httpMethod": "PATCH", - "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "urlMap": { - "type": "string", - "description": "Name of the UrlMap resource to patch.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "urlMap" - ], - "request": { - "$ref": "UrlMap" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "id": "compute.urlMaps.update", - "path": "{project}/global/urlMaps/{urlMap}", - "httpMethod": "PUT", - "description": "Updates the specified UrlMap resource with the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "urlMap": { - "type": "string", - "description": "Name of the UrlMap resource to update.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "urlMap" - ], - "request": { - "$ref": "UrlMap" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "validate": { - "id": "compute.urlMaps.validate", - "path": "{project}/global/urlMaps/{urlMap}/validate", - "httpMethod": "POST", - "description": "Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "urlMap": { - "type": "string", - "description": "Name of the UrlMap resource to be validated as.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "urlMap" - ], - "request": { - "$ref": "UrlMapsValidateRequest" - }, - "response": { - "$ref": "UrlMapsValidateResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "vpnTunnels": { - "methods": { - "aggregatedList": { - "id": "compute.vpnTunnels.aggregatedList", - "path": "{project}/aggregated/vpnTunnels", - "httpMethod": "GET", - "description": "Retrieves an aggregated list of VPN tunnels.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "VpnTunnelAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "id": "compute.vpnTunnels.delete", - "path": "{project}/regions/{region}/vpnTunnels/{vpnTunnel}", - "httpMethod": "DELETE", - "description": "Deletes the specified VpnTunnel resource.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "vpnTunnel": { - "type": "string", - "description": "Name of the VpnTunnel resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "vpnTunnel" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.vpnTunnels.get", - "path": "{project}/regions/{region}/vpnTunnels/{vpnTunnel}", - "httpMethod": "GET", - "description": "Returns the specified VpnTunnel resource. Get a list of available VPN tunnels by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "vpnTunnel": { - "type": "string", - "description": "Name of the VpnTunnel resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region", - "vpnTunnel" - ], - "response": { - "$ref": "VpnTunnel" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "id": "compute.vpnTunnels.insert", - "path": "{project}/regions/{region}/vpnTunnels", - "httpMethod": "POST", - "description": "Creates a VpnTunnel resource in the specified project and region using the data included in the request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "request": { - "$ref": "VpnTunnel" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "id": "compute.vpnTunnels.list", - "path": "{project}/regions/{region}/vpnTunnels", - "httpMethod": "GET", - "description": "Retrieves a list of VpnTunnel resources contained in the specified project and region.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "region": { - "type": "string", - "description": "Name of the region for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "region" - ], - "response": { - "$ref": "VpnTunnelList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "zoneOperations": { - "methods": { - "delete": { - "id": "compute.zoneOperations.delete", - "path": "{project}/zones/{zone}/operations/{operation}", - "httpMethod": "DELETE", - "description": "Deletes the specified zone-specific Operations resource.", - "parameters": { - "operation": { - "type": "string", - "description": "Name of the Operations resource to delete.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "operation" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "id": "compute.zoneOperations.get", - "path": "{project}/zones/{zone}/operations/{operation}", - "httpMethod": "GET", - "description": "Retrieves the specified zone-specific Operations resource.", - "parameters": { - "operation": { - "type": "string", - "description": "Name of the Operations resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone for this request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone", - "operation" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.zoneOperations.list", - "path": "{project}/zones/{zone}/operations", - "httpMethod": "GET", - "description": "Retrieves a list of Operation resources contained within the specified zone.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone for request.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "OperationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "zones": { - "methods": { - "get": { - "id": "compute.zones.get", - "path": "{project}/zones/{zone}", - "httpMethod": "GET", - "description": "Returns the specified Zone resource. Get a list of available zones by making a list() request.", - "parameters": { - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - }, - "zone": { - "type": "string", - "description": "Name of the zone resource to return.", - "required": true, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "location": "path" - } - }, - "parameterOrder": [ - "project", - "zone" - ], - "response": { - "$ref": "Zone" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "id": "compute.zones.list", - "path": "{project}/zones", - "httpMethod": "GET", - "description": "Retrieves the list of Zone resources available to the specified project.", - "parameters": { - "filter": { - "type": "string", - "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "default": "500", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "orderBy": { - "type": "string", - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Project ID for this request.", - "required": true, - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "ZoneList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - } - } -} diff --git a/vendor/google.golang.org/api/compute/v1/compute-gen.go b/vendor/google.golang.org/api/compute/v1/compute-gen.go deleted file mode 100644 index 8a7df317a..000000000 --- a/vendor/google.golang.org/api/compute/v1/compute-gen.go +++ /dev/null @@ -1,65649 +0,0 @@ -// Package compute provides access to the Compute Engine API. -// -// See https://developers.google.com/compute/docs/reference/latest/ -// -// Usage example: -// -// import "google.golang.org/api/compute/v1" -// ... -// computeService, err := compute.New(oauthHttpClient) -package compute - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" - "io" - "net/http" - "net/url" - "strconv" - "strings" -) - -// Always reference these packages, just in case the auto-generated code -// below doesn't. -var _ = bytes.NewBuffer -var _ = strconv.Itoa -var _ = fmt.Sprintf -var _ = json.NewDecoder -var _ = io.Copy -var _ = url.Parse -var _ = gensupport.MarshalJSON -var _ = googleapi.Version -var _ = errors.New -var _ = strings.Replace -var _ = context.Canceled -var _ = ctxhttp.Do - -const apiId = "compute:v1" -const apiName = "compute" -const apiVersion = "v1" -const basePath = "https://www.googleapis.com/compute/v1/projects/" - -// OAuth2 scopes used by this API. -const ( - // View and manage your data across Google Cloud Platform services - CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" - - // View and manage your Google Compute Engine resources - ComputeScope = "https://www.googleapis.com/auth/compute" - - // View your Google Compute Engine resources - ComputeReadonlyScope = "https://www.googleapis.com/auth/compute.readonly" - - // Manage your data and permissions in Google Cloud Storage - DevstorageFullControlScope = "https://www.googleapis.com/auth/devstorage.full_control" - - // View your data in Google Cloud Storage - DevstorageReadOnlyScope = "https://www.googleapis.com/auth/devstorage.read_only" - - // Manage your data in Google Cloud Storage - DevstorageReadWriteScope = "https://www.googleapis.com/auth/devstorage.read_write" -) - -func New(client *http.Client) (*Service, error) { - if client == nil { - return nil, errors.New("client is nil") - } - s := &Service{client: client, BasePath: basePath} - s.AcceleratorTypes = NewAcceleratorTypesService(s) - s.Addresses = NewAddressesService(s) - s.Autoscalers = NewAutoscalersService(s) - s.BackendBuckets = NewBackendBucketsService(s) - s.BackendServices = NewBackendServicesService(s) - s.DiskTypes = NewDiskTypesService(s) - s.Disks = NewDisksService(s) - s.Firewalls = NewFirewallsService(s) - s.ForwardingRules = NewForwardingRulesService(s) - s.GlobalAddresses = NewGlobalAddressesService(s) - s.GlobalForwardingRules = NewGlobalForwardingRulesService(s) - s.GlobalOperations = NewGlobalOperationsService(s) - s.HealthChecks = NewHealthChecksService(s) - s.HttpHealthChecks = NewHttpHealthChecksService(s) - s.HttpsHealthChecks = NewHttpsHealthChecksService(s) - s.Images = NewImagesService(s) - s.InstanceGroupManagers = NewInstanceGroupManagersService(s) - s.InstanceGroups = NewInstanceGroupsService(s) - s.InstanceTemplates = NewInstanceTemplatesService(s) - s.Instances = NewInstancesService(s) - s.Licenses = NewLicensesService(s) - s.MachineTypes = NewMachineTypesService(s) - s.Networks = NewNetworksService(s) - s.Projects = NewProjectsService(s) - s.RegionAutoscalers = NewRegionAutoscalersService(s) - s.RegionBackendServices = NewRegionBackendServicesService(s) - s.RegionCommitments = NewRegionCommitmentsService(s) - s.RegionInstanceGroupManagers = NewRegionInstanceGroupManagersService(s) - s.RegionInstanceGroups = NewRegionInstanceGroupsService(s) - s.RegionOperations = NewRegionOperationsService(s) - s.Regions = NewRegionsService(s) - s.Routers = NewRoutersService(s) - s.Routes = NewRoutesService(s) - s.Snapshots = NewSnapshotsService(s) - s.SslCertificates = NewSslCertificatesService(s) - s.Subnetworks = NewSubnetworksService(s) - s.TargetHttpProxies = NewTargetHttpProxiesService(s) - s.TargetHttpsProxies = NewTargetHttpsProxiesService(s) - s.TargetInstances = NewTargetInstancesService(s) - s.TargetPools = NewTargetPoolsService(s) - s.TargetSslProxies = NewTargetSslProxiesService(s) - s.TargetTcpProxies = NewTargetTcpProxiesService(s) - s.TargetVpnGateways = NewTargetVpnGatewaysService(s) - s.UrlMaps = NewUrlMapsService(s) - s.VpnTunnels = NewVpnTunnelsService(s) - s.ZoneOperations = NewZoneOperationsService(s) - s.Zones = NewZonesService(s) - return s, nil -} - -type Service struct { - client *http.Client - BasePath string // API endpoint base URL - UserAgent string // optional additional User-Agent fragment - - AcceleratorTypes *AcceleratorTypesService - - Addresses *AddressesService - - Autoscalers *AutoscalersService - - BackendBuckets *BackendBucketsService - - BackendServices *BackendServicesService - - DiskTypes *DiskTypesService - - Disks *DisksService - - Firewalls *FirewallsService - - ForwardingRules *ForwardingRulesService - - GlobalAddresses *GlobalAddressesService - - GlobalForwardingRules *GlobalForwardingRulesService - - GlobalOperations *GlobalOperationsService - - HealthChecks *HealthChecksService - - HttpHealthChecks *HttpHealthChecksService - - HttpsHealthChecks *HttpsHealthChecksService - - Images *ImagesService - - InstanceGroupManagers *InstanceGroupManagersService - - InstanceGroups *InstanceGroupsService - - InstanceTemplates *InstanceTemplatesService - - Instances *InstancesService - - Licenses *LicensesService - - MachineTypes *MachineTypesService - - Networks *NetworksService - - Projects *ProjectsService - - RegionAutoscalers *RegionAutoscalersService - - RegionBackendServices *RegionBackendServicesService - - RegionCommitments *RegionCommitmentsService - - RegionInstanceGroupManagers *RegionInstanceGroupManagersService - - RegionInstanceGroups *RegionInstanceGroupsService - - RegionOperations *RegionOperationsService - - Regions *RegionsService - - Routers *RoutersService - - Routes *RoutesService - - Snapshots *SnapshotsService - - SslCertificates *SslCertificatesService - - Subnetworks *SubnetworksService - - TargetHttpProxies *TargetHttpProxiesService - - TargetHttpsProxies *TargetHttpsProxiesService - - TargetInstances *TargetInstancesService - - TargetPools *TargetPoolsService - - TargetSslProxies *TargetSslProxiesService - - TargetTcpProxies *TargetTcpProxiesService - - TargetVpnGateways *TargetVpnGatewaysService - - UrlMaps *UrlMapsService - - VpnTunnels *VpnTunnelsService - - ZoneOperations *ZoneOperationsService - - Zones *ZonesService -} - -func (s *Service) userAgent() string { - if s.UserAgent == "" { - return googleapi.UserAgent - } - return googleapi.UserAgent + " " + s.UserAgent -} - -func NewAcceleratorTypesService(s *Service) *AcceleratorTypesService { - rs := &AcceleratorTypesService{s: s} - return rs -} - -type AcceleratorTypesService struct { - s *Service -} - -func NewAddressesService(s *Service) *AddressesService { - rs := &AddressesService{s: s} - return rs -} - -type AddressesService struct { - s *Service -} - -func NewAutoscalersService(s *Service) *AutoscalersService { - rs := &AutoscalersService{s: s} - return rs -} - -type AutoscalersService struct { - s *Service -} - -func NewBackendBucketsService(s *Service) *BackendBucketsService { - rs := &BackendBucketsService{s: s} - return rs -} - -type BackendBucketsService struct { - s *Service -} - -func NewBackendServicesService(s *Service) *BackendServicesService { - rs := &BackendServicesService{s: s} - return rs -} - -type BackendServicesService struct { - s *Service -} - -func NewDiskTypesService(s *Service) *DiskTypesService { - rs := &DiskTypesService{s: s} - return rs -} - -type DiskTypesService struct { - s *Service -} - -func NewDisksService(s *Service) *DisksService { - rs := &DisksService{s: s} - return rs -} - -type DisksService struct { - s *Service -} - -func NewFirewallsService(s *Service) *FirewallsService { - rs := &FirewallsService{s: s} - return rs -} - -type FirewallsService struct { - s *Service -} - -func NewForwardingRulesService(s *Service) *ForwardingRulesService { - rs := &ForwardingRulesService{s: s} - return rs -} - -type ForwardingRulesService struct { - s *Service -} - -func NewGlobalAddressesService(s *Service) *GlobalAddressesService { - rs := &GlobalAddressesService{s: s} - return rs -} - -type GlobalAddressesService struct { - s *Service -} - -func NewGlobalForwardingRulesService(s *Service) *GlobalForwardingRulesService { - rs := &GlobalForwardingRulesService{s: s} - return rs -} - -type GlobalForwardingRulesService struct { - s *Service -} - -func NewGlobalOperationsService(s *Service) *GlobalOperationsService { - rs := &GlobalOperationsService{s: s} - return rs -} - -type GlobalOperationsService struct { - s *Service -} - -func NewHealthChecksService(s *Service) *HealthChecksService { - rs := &HealthChecksService{s: s} - return rs -} - -type HealthChecksService struct { - s *Service -} - -func NewHttpHealthChecksService(s *Service) *HttpHealthChecksService { - rs := &HttpHealthChecksService{s: s} - return rs -} - -type HttpHealthChecksService struct { - s *Service -} - -func NewHttpsHealthChecksService(s *Service) *HttpsHealthChecksService { - rs := &HttpsHealthChecksService{s: s} - return rs -} - -type HttpsHealthChecksService struct { - s *Service -} - -func NewImagesService(s *Service) *ImagesService { - rs := &ImagesService{s: s} - return rs -} - -type ImagesService struct { - s *Service -} - -func NewInstanceGroupManagersService(s *Service) *InstanceGroupManagersService { - rs := &InstanceGroupManagersService{s: s} - return rs -} - -type InstanceGroupManagersService struct { - s *Service -} - -func NewInstanceGroupsService(s *Service) *InstanceGroupsService { - rs := &InstanceGroupsService{s: s} - return rs -} - -type InstanceGroupsService struct { - s *Service -} - -func NewInstanceTemplatesService(s *Service) *InstanceTemplatesService { - rs := &InstanceTemplatesService{s: s} - return rs -} - -type InstanceTemplatesService struct { - s *Service -} - -func NewInstancesService(s *Service) *InstancesService { - rs := &InstancesService{s: s} - return rs -} - -type InstancesService struct { - s *Service -} - -func NewLicensesService(s *Service) *LicensesService { - rs := &LicensesService{s: s} - return rs -} - -type LicensesService struct { - s *Service -} - -func NewMachineTypesService(s *Service) *MachineTypesService { - rs := &MachineTypesService{s: s} - return rs -} - -type MachineTypesService struct { - s *Service -} - -func NewNetworksService(s *Service) *NetworksService { - rs := &NetworksService{s: s} - return rs -} - -type NetworksService struct { - s *Service -} - -func NewProjectsService(s *Service) *ProjectsService { - rs := &ProjectsService{s: s} - return rs -} - -type ProjectsService struct { - s *Service -} - -func NewRegionAutoscalersService(s *Service) *RegionAutoscalersService { - rs := &RegionAutoscalersService{s: s} - return rs -} - -type RegionAutoscalersService struct { - s *Service -} - -func NewRegionBackendServicesService(s *Service) *RegionBackendServicesService { - rs := &RegionBackendServicesService{s: s} - return rs -} - -type RegionBackendServicesService struct { - s *Service -} - -func NewRegionCommitmentsService(s *Service) *RegionCommitmentsService { - rs := &RegionCommitmentsService{s: s} - return rs -} - -type RegionCommitmentsService struct { - s *Service -} - -func NewRegionInstanceGroupManagersService(s *Service) *RegionInstanceGroupManagersService { - rs := &RegionInstanceGroupManagersService{s: s} - return rs -} - -type RegionInstanceGroupManagersService struct { - s *Service -} - -func NewRegionInstanceGroupsService(s *Service) *RegionInstanceGroupsService { - rs := &RegionInstanceGroupsService{s: s} - return rs -} - -type RegionInstanceGroupsService struct { - s *Service -} - -func NewRegionOperationsService(s *Service) *RegionOperationsService { - rs := &RegionOperationsService{s: s} - return rs -} - -type RegionOperationsService struct { - s *Service -} - -func NewRegionsService(s *Service) *RegionsService { - rs := &RegionsService{s: s} - return rs -} - -type RegionsService struct { - s *Service -} - -func NewRoutersService(s *Service) *RoutersService { - rs := &RoutersService{s: s} - return rs -} - -type RoutersService struct { - s *Service -} - -func NewRoutesService(s *Service) *RoutesService { - rs := &RoutesService{s: s} - return rs -} - -type RoutesService struct { - s *Service -} - -func NewSnapshotsService(s *Service) *SnapshotsService { - rs := &SnapshotsService{s: s} - return rs -} - -type SnapshotsService struct { - s *Service -} - -func NewSslCertificatesService(s *Service) *SslCertificatesService { - rs := &SslCertificatesService{s: s} - return rs -} - -type SslCertificatesService struct { - s *Service -} - -func NewSubnetworksService(s *Service) *SubnetworksService { - rs := &SubnetworksService{s: s} - return rs -} - -type SubnetworksService struct { - s *Service -} - -func NewTargetHttpProxiesService(s *Service) *TargetHttpProxiesService { - rs := &TargetHttpProxiesService{s: s} - return rs -} - -type TargetHttpProxiesService struct { - s *Service -} - -func NewTargetHttpsProxiesService(s *Service) *TargetHttpsProxiesService { - rs := &TargetHttpsProxiesService{s: s} - return rs -} - -type TargetHttpsProxiesService struct { - s *Service -} - -func NewTargetInstancesService(s *Service) *TargetInstancesService { - rs := &TargetInstancesService{s: s} - return rs -} - -type TargetInstancesService struct { - s *Service -} - -func NewTargetPoolsService(s *Service) *TargetPoolsService { - rs := &TargetPoolsService{s: s} - return rs -} - -type TargetPoolsService struct { - s *Service -} - -func NewTargetSslProxiesService(s *Service) *TargetSslProxiesService { - rs := &TargetSslProxiesService{s: s} - return rs -} - -type TargetSslProxiesService struct { - s *Service -} - -func NewTargetTcpProxiesService(s *Service) *TargetTcpProxiesService { - rs := &TargetTcpProxiesService{s: s} - return rs -} - -type TargetTcpProxiesService struct { - s *Service -} - -func NewTargetVpnGatewaysService(s *Service) *TargetVpnGatewaysService { - rs := &TargetVpnGatewaysService{s: s} - return rs -} - -type TargetVpnGatewaysService struct { - s *Service -} - -func NewUrlMapsService(s *Service) *UrlMapsService { - rs := &UrlMapsService{s: s} - return rs -} - -type UrlMapsService struct { - s *Service -} - -func NewVpnTunnelsService(s *Service) *VpnTunnelsService { - rs := &VpnTunnelsService{s: s} - return rs -} - -type VpnTunnelsService struct { - s *Service -} - -func NewZoneOperationsService(s *Service) *ZoneOperationsService { - rs := &ZoneOperationsService{s: s} - return rs -} - -type ZoneOperationsService struct { - s *Service -} - -func NewZonesService(s *Service) *ZonesService { - rs := &ZonesService{s: s} - return rs -} - -type ZonesService struct { - s *Service -} - -// AcceleratorConfig: A specification of the type and number of -// accelerator cards attached to the instance. -type AcceleratorConfig struct { - // AcceleratorCount: The number of the guest accelerator cards exposed - // to this instance. - AcceleratorCount int64 `json:"acceleratorCount,omitempty"` - - // AcceleratorType: Full or partial URL of the accelerator type resource - // to expose to this instance. - AcceleratorType string `json:"acceleratorType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AcceleratorCount") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AcceleratorCount") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AcceleratorConfig) MarshalJSON() ([]byte, error) { - type noMethod AcceleratorConfig - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AcceleratorType: An Accelerator Type resource. -type AcceleratorType struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Deprecated: [Output Only] The deprecation status associated with this - // accelerator type. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - - // Description: [Output Only] An optional textual description of the - // resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] The type of the resource. Always - // compute#acceleratorType for accelerator types. - Kind string `json:"kind,omitempty"` - - // MaximumCardsPerInstance: [Output Only] Maximum accelerator cards - // allowed per instance. - MaximumCardsPerInstance int64 `json:"maximumCardsPerInstance,omitempty"` - - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - - // Zone: [Output Only] The name of the zone where the accelerator type - // resides, such as us-central1-a. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AcceleratorType) MarshalJSON() ([]byte, error) { - type noMethod AcceleratorType - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AcceleratorTypeAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of AcceleratorTypesScopedList resources. - Items map[string]AcceleratorTypesScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#acceleratorTypeAggregatedList for aggregated lists of - // accelerator types. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AcceleratorTypeAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod AcceleratorTypeAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AcceleratorTypeList: Contains a list of accelerator types. -type AcceleratorTypeList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of AcceleratorType resources. - Items []*AcceleratorType `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#acceleratorTypeList for lists of accelerator types. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AcceleratorTypeList) MarshalJSON() ([]byte, error) { - type noMethod AcceleratorTypeList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AcceleratorTypesScopedList struct { - // AcceleratorTypes: [Output Only] List of accelerator types contained - // in this scope. - AcceleratorTypes []*AcceleratorType `json:"acceleratorTypes,omitempty"` - - // Warning: [Output Only] An informational warning that appears when the - // accelerator types list is empty. - Warning *AcceleratorTypesScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AcceleratorTypes") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AcceleratorTypes") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AcceleratorTypesScopedList) MarshalJSON() ([]byte, error) { - type noMethod AcceleratorTypesScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AcceleratorTypesScopedListWarning: [Output Only] An informational -// warning that appears when the accelerator types list is empty. -type AcceleratorTypesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*AcceleratorTypesScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AcceleratorTypesScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod AcceleratorTypesScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AcceleratorTypesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AcceleratorTypesScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod AcceleratorTypesScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AccessConfig: An access configuration attached to an instance's -// network interface. Only one access config per instance is supported. -type AccessConfig struct { - // Kind: [Output Only] Type of the resource. Always compute#accessConfig - // for access configs. - Kind string `json:"kind,omitempty"` - - // Name: The name of this access configuration. The default and - // recommended name is External NAT but you can use any arbitrary string - // you would like. For example, My external IP or Network Access. - Name string `json:"name,omitempty"` - - // NatIP: An external IP address associated with this instance. Specify - // an unused static external IP address available to the project or - // leave this field undefined to use an IP from a shared ephemeral IP - // address pool. If you specify a static external IP address, it must - // live in the same region as the zone of the instance. - NatIP string `json:"natIP,omitempty"` - - // Type: The type of configuration. The default and only option is - // ONE_TO_ONE_NAT. - // - // Possible values: - // "ONE_TO_ONE_NAT" (default) - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Kind") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Kind") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AccessConfig) MarshalJSON() ([]byte, error) { - type noMethod AccessConfig - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Address: A reserved address resource. -type Address struct { - // Address: The static external IP address represented by this resource. - Address string `json:"address,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // IpVersion: The IP Version that will be used by this address. Valid - // options are IPV4 or IPV6. This can only be specified for a global - // address. - // - // Possible values: - // "IPV4" - // "IPV6" - // "UNSPECIFIED_VERSION" - IpVersion string `json:"ipVersion,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#address for - // addresses. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Region: [Output Only] URL of the region where the regional address - // resides. This field is not applicable to global addresses. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Status: [Output Only] The status of the address, which can be either - // IN_USE or RESERVED. An address that is RESERVED is currently reserved - // and available to use. An IN_USE address is currently being used by - // another resource and is not available. - // - // Possible values: - // "IN_USE" - // "RESERVED" - Status string `json:"status,omitempty"` - - // Users: [Output Only] The URLs of the resources that are using this - // address. - Users []string `json:"users,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Address") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Address") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Address) MarshalJSON() ([]byte, error) { - type noMethod Address - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AddressAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of AddressesScopedList resources. - Items map[string]AddressesScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#addressAggregatedList for aggregated lists of addresses. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AddressAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod AddressAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AddressList: Contains a list of addresses. -type AddressList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Address resources. - Items []*Address `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#addressList for - // lists of addresses. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AddressList) MarshalJSON() ([]byte, error) { - type noMethod AddressList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AddressesScopedList struct { - // Addresses: [Output Only] List of addresses contained in this scope. - Addresses []*Address `json:"addresses,omitempty"` - - // Warning: [Output Only] Informational warning which replaces the list - // of addresses when the list is empty. - Warning *AddressesScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Addresses") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Addresses") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AddressesScopedList) MarshalJSON() ([]byte, error) { - type noMethod AddressesScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AddressesScopedListWarning: [Output Only] Informational warning which -// replaces the list of addresses when the list is empty. -type AddressesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*AddressesScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AddressesScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod AddressesScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AddressesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AddressesScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod AddressesScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AliasIpRange: An alias IP range attached to an instance's network -// interface. -type AliasIpRange struct { - // IpCidrRange: The IP CIDR range represented by this alias IP range. - // This IP CIDR range must belong to the specified subnetwork and cannot - // contain IP addresses reserved by system or used by other network - // interfaces. This range may be a single IP address (e.g. 10.2.3.4), a - // netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24). - IpCidrRange string `json:"ipCidrRange,omitempty"` - - // SubnetworkRangeName: Optional subnetwork secondary range name - // specifying the secondary range from which to allocate the IP CIDR - // range for this alias IP range. If left unspecified, the primary range - // of the subnetwork will be used. - SubnetworkRangeName string `json:"subnetworkRangeName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IpCidrRange") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IpCidrRange") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AliasIpRange) MarshalJSON() ([]byte, error) { - type noMethod AliasIpRange - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AttachedDisk: An instance-attached disk resource. -type AttachedDisk struct { - // AutoDelete: Specifies whether the disk will be auto-deleted when the - // instance is deleted (but not when the disk is detached from the - // instance). - AutoDelete bool `json:"autoDelete,omitempty"` - - // Boot: Indicates that this is a boot disk. The virtual machine will - // use the first partition of the disk for its root filesystem. - Boot bool `json:"boot,omitempty"` - - // DeviceName: Specifies a unique device name of your choice that is - // reflected into the /dev/disk/by-id/google-* tree of a Linux operating - // system running within the instance. This name can be used to - // reference the device for mounting, resizing, and so on, from within - // the instance. - // - // If not specified, the server chooses a default device name to apply - // to this disk, in the form persistent-disks-x, where x is a number - // assigned by Google Compute Engine. This field is only applicable for - // persistent disks. - DeviceName string `json:"deviceName,omitempty"` - - // DiskEncryptionKey: Encrypts or decrypts a disk using a - // customer-supplied encryption key. - // - // If you are creating a new disk, this field encrypts the new disk - // using an encryption key that you provide. If you are attaching an - // existing disk that is already encrypted, this field decrypts the disk - // using the customer-supplied encryption key. - // - // If you encrypt a disk using a customer-supplied key, you must provide - // the same key again when you attempt to use this resource at a later - // time. For example, you must provide the key when you create a - // snapshot or an image from the disk or when you attach the disk to a - // virtual machine instance. - // - // If you do not provide an encryption key, then the disk will be - // encrypted using an automatically generated key and you do not need to - // provide a key to use the disk later. - // - // Instance templates do not store customer-supplied encryption keys, so - // you cannot use your own keys to encrypt disks in a managed instance - // group. - DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"` - - // Index: Assigns a zero-based index to this disk, where 0 is reserved - // for the boot disk. For example, if you have many disks attached to an - // instance, each disk would have a unique index number. If not - // specified, the server will choose an appropriate value. - Index int64 `json:"index,omitempty"` - - // InitializeParams: [Input Only] Specifies the parameters for a new - // disk that will be created alongside the new instance. Use - // initialization parameters to create boot disks or local SSDs attached - // to the new instance. - // - // This property is mutually exclusive with the source property; you can - // only define one or the other, but not both. - InitializeParams *AttachedDiskInitializeParams `json:"initializeParams,omitempty"` - - // Interface: Specifies the disk interface to use for attaching this - // disk, which is either SCSI or NVME. The default is SCSI. Persistent - // disks must always use SCSI and the request will fail if you attempt - // to attach a persistent disk in any other format than SCSI. Local SSDs - // can use either NVME or SCSI. For performance characteristics of SCSI - // over NVMe, see Local SSD performance. - // - // Possible values: - // "NVME" - // "SCSI" - Interface string `json:"interface,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#attachedDisk - // for attached disks. - Kind string `json:"kind,omitempty"` - - // Licenses: [Output Only] Any valid publicly visible licenses. - Licenses []string `json:"licenses,omitempty"` - - // Mode: The mode in which to attach this disk, either READ_WRITE or - // READ_ONLY. If not specified, the default is to attach the disk in - // READ_WRITE mode. - // - // Possible values: - // "READ_ONLY" - // "READ_WRITE" - Mode string `json:"mode,omitempty"` - - // Source: Specifies a valid partial or full URL to an existing - // Persistent Disk resource. When creating a new instance, one of - // initializeParams.sourceImage or disks.source is required. - // - // If desired, you can also attach existing non-root persistent disks - // using this property. This field is only applicable for persistent - // disks. - // - // Note that for InstanceTemplate, specify the disk name, not the URL - // for the disk. - Source string `json:"source,omitempty"` - - // Type: Specifies the type of the disk, either SCRATCH or PERSISTENT. - // If not specified, the default is PERSISTENT. - // - // Possible values: - // "PERSISTENT" - // "SCRATCH" - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AutoDelete") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AutoDelete") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AttachedDisk) MarshalJSON() ([]byte, error) { - type noMethod AttachedDisk - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AttachedDiskInitializeParams: [Input Only] Specifies the parameters -// for a new disk that will be created alongside the new instance. Use -// initialization parameters to create boot disks or local SSDs attached -// to the new instance. -// -// This property is mutually exclusive with the source property; you can -// only define one or the other, but not both. -type AttachedDiskInitializeParams struct { - // DiskName: Specifies the disk name. If not specified, the default is - // to use the name of the instance. - DiskName string `json:"diskName,omitempty"` - - // DiskSizeGb: Specifies the size of the disk in base-2 GB. - DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - - // DiskType: Specifies the disk type to use to create the instance. If - // not specified, the default is pd-standard, specified using the full - // URL. For - // example: - // - // https://www.googleapis.com/compute/v1/projects/project/zones - // /zone/diskTypes/pd-standard - // - // Other values include pd-ssd and local-ssd. If you define this field, - // you can provide either the full or partial URL. For example, the - // following are valid values: - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType - // - projects/project/zones/zone/diskTypes/diskType - // - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this - // is the name of the disk type, not URL. - DiskType string `json:"diskType,omitempty"` - - // SourceImage: The source image to create this disk. When creating a - // new instance, one of initializeParams.sourceImage or disks.source is - // required. - // - // To create a disk with one of the public operating system images, - // specify the image by its family name. For example, specify - // family/debian-8 to use the latest Debian 8 - // image: - // - // projects/debian-cloud/global/images/family/debian-8 - // - // Alternatively, use a specific version of a public operating system - // image: - // - // projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD - // - // To create a disk with a private image that you created, specify the - // image name in the following format: - // - // global/images/my-private-image - // - // You can also specify a private image by its image family, which - // returns the latest version of the image in that family. Replace the - // image name with - // family/family-name: - // - // global/images/family/my-private-family - // - // If the source image is deleted later, this field will not be set. - SourceImage string `json:"sourceImage,omitempty"` - - // SourceImageEncryptionKey: The customer-supplied encryption key of the - // source image. Required if the source image is protected by a - // customer-supplied encryption key. - // - // Instance templates do not store customer-supplied encryption keys, so - // you cannot create disks for instances in a managed instance group if - // the source images are encrypted with your own keys. - SourceImageEncryptionKey *CustomerEncryptionKey `json:"sourceImageEncryptionKey,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DiskName") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DiskName") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AttachedDiskInitializeParams) MarshalJSON() ([]byte, error) { - type noMethod AttachedDiskInitializeParams - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Autoscaler: Represents an Autoscaler resource. Autoscalers allow you -// to automatically scale virtual machine instances in managed instance -// groups according to an autoscaling policy that you define. For more -// information, read Autoscaling Groups of Instances. -type Autoscaler struct { - // AutoscalingPolicy: The configuration parameters for the autoscaling - // algorithm. You can define one or more of the policies for an - // autoscaler: cpuUtilization, customMetricUtilizations, and - // loadBalancingUtilization. - // - // If none of these are specified, the default will be to autoscale - // based on cpuUtilization to 0.6 or 60%. - AutoscalingPolicy *AutoscalingPolicy `json:"autoscalingPolicy,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#autoscaler - // for autoscalers. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Region: [Output Only] URL of the region where the instance group - // resides (for autoscalers living in regional scope). - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Status: [Output Only] The status of the autoscaler configuration. - // - // Possible values: - // "ACTIVE" - // "DELETING" - // "ERROR" - // "PENDING" - Status string `json:"status,omitempty"` - - // StatusDetails: [Output Only] Human-readable details about the current - // state of the autoscaler. Read the documentation for Commonly returned - // status messages for examples of status messages you might encounter. - StatusDetails []*AutoscalerStatusDetails `json:"statusDetails,omitempty"` - - // Target: URL of the managed instance group that this autoscaler will - // scale. - Target string `json:"target,omitempty"` - - // Zone: [Output Only] URL of the zone where the instance group resides - // (for autoscalers living in zonal scope). - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "AutoscalingPolicy") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AutoscalingPolicy") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Autoscaler) MarshalJSON() ([]byte, error) { - type noMethod Autoscaler - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AutoscalerAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of AutoscalersScopedList resources. - Items map[string]AutoscalersScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#autoscalerAggregatedList for aggregated lists of autoscalers. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalerAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod AutoscalerAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AutoscalerList: Contains a list of Autoscaler resources. -type AutoscalerList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Autoscaler resources. - Items []*Autoscaler `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#autoscalerList - // for lists of autoscalers. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalerList) MarshalJSON() ([]byte, error) { - type noMethod AutoscalerList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AutoscalerStatusDetails struct { - // Message: The status message. - Message string `json:"message,omitempty"` - - // Type: The type of error returned. - // - // Possible values: - // "ALL_INSTANCES_UNHEALTHY" - // "BACKEND_SERVICE_DOES_NOT_EXIST" - // "CAPPED_AT_MAX_NUM_REPLICAS" - // "CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE" - // "CUSTOM_METRIC_INVALID" - // "MIN_EQUALS_MAX" - // "MISSING_CUSTOM_METRIC_DATA_POINTS" - // "MISSING_LOAD_BALANCING_DATA_POINTS" - // "MORE_THAN_ONE_BACKEND_SERVICE" - // "NOT_ENOUGH_QUOTA_AVAILABLE" - // "REGION_RESOURCE_STOCKOUT" - // "SCALING_TARGET_DOES_NOT_EXIST" - // "UNKNOWN" - // "UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION" - // "ZONE_RESOURCE_STOCKOUT" - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Message") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Message") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalerStatusDetails) MarshalJSON() ([]byte, error) { - type noMethod AutoscalerStatusDetails - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AutoscalersScopedList struct { - // Autoscalers: [Output Only] List of autoscalers contained in this - // scope. - Autoscalers []*Autoscaler `json:"autoscalers,omitempty"` - - // Warning: [Output Only] Informational warning which replaces the list - // of autoscalers when the list is empty. - Warning *AutoscalersScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Autoscalers") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Autoscalers") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalersScopedList) MarshalJSON() ([]byte, error) { - type noMethod AutoscalersScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AutoscalersScopedListWarning: [Output Only] Informational warning -// which replaces the list of autoscalers when the list is empty. -type AutoscalersScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*AutoscalersScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalersScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod AutoscalersScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type AutoscalersScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalersScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod AutoscalersScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AutoscalingPolicy: Cloud Autoscaler policy. -type AutoscalingPolicy struct { - // CoolDownPeriodSec: The number of seconds that the autoscaler should - // wait before it starts collecting information from a new instance. - // This prevents the autoscaler from collecting information when the - // instance is initializing, during which the collected usage would not - // be reliable. The default time autoscaler waits is 60 - // seconds. - // - // Virtual machine initialization times might vary because of numerous - // factors. We recommend that you test how long an instance may take to - // initialize. To do this, create an instance and time the startup - // process. - CoolDownPeriodSec int64 `json:"coolDownPeriodSec,omitempty"` - - // CpuUtilization: Defines the CPU utilization policy that allows the - // autoscaler to scale based on the average CPU utilization of a managed - // instance group. - CpuUtilization *AutoscalingPolicyCpuUtilization `json:"cpuUtilization,omitempty"` - - // CustomMetricUtilizations: Configuration parameters of autoscaling - // based on a custom metric. - CustomMetricUtilizations []*AutoscalingPolicyCustomMetricUtilization `json:"customMetricUtilizations,omitempty"` - - // LoadBalancingUtilization: Configuration parameters of autoscaling - // based on load balancer. - LoadBalancingUtilization *AutoscalingPolicyLoadBalancingUtilization `json:"loadBalancingUtilization,omitempty"` - - // MaxNumReplicas: The maximum number of instances that the autoscaler - // can scale up to. This is required when creating or updating an - // autoscaler. The maximum number of replicas should not be lower than - // minimal number of replicas. - MaxNumReplicas int64 `json:"maxNumReplicas,omitempty"` - - // MinNumReplicas: The minimum number of replicas that the autoscaler - // can scale down to. This cannot be less than 0. If not provided, - // autoscaler will choose a default value depending on maximum number of - // instances allowed. - MinNumReplicas int64 `json:"minNumReplicas,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CoolDownPeriodSec") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CoolDownPeriodSec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalingPolicy) MarshalJSON() ([]byte, error) { - type noMethod AutoscalingPolicy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AutoscalingPolicyCpuUtilization: CPU utilization policy. -type AutoscalingPolicyCpuUtilization struct { - // UtilizationTarget: The target CPU utilization that the autoscaler - // should maintain. Must be a float value in the range (0, 1]. If not - // specified, the default is 0.6. - // - // If the CPU level is below the target utilization, the autoscaler - // scales down the number of instances until it reaches the minimum - // number of instances you specified or until the average CPU of your - // instances reaches the target utilization. - // - // If the average CPU is above the target utilization, the autoscaler - // scales up until it reaches the maximum number of instances you - // specified or until the average utilization reaches the target - // utilization. - UtilizationTarget float64 `json:"utilizationTarget,omitempty"` - - // ForceSendFields is a list of field names (e.g. "UtilizationTarget") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "UtilizationTarget") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalingPolicyCpuUtilization) MarshalJSON() ([]byte, error) { - type noMethod AutoscalingPolicyCpuUtilization - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *AutoscalingPolicyCpuUtilization) UnmarshalJSON(data []byte) error { - type noMethod AutoscalingPolicyCpuUtilization - var s1 struct { - UtilizationTarget gensupport.JSONFloat64 `json:"utilizationTarget"` - *noMethod - } - s1.noMethod = (*noMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.UtilizationTarget = float64(s1.UtilizationTarget) - return nil -} - -// AutoscalingPolicyCustomMetricUtilization: Custom utilization metric -// policy. -type AutoscalingPolicyCustomMetricUtilization struct { - // Metric: The identifier (type) of the Stackdriver Monitoring metric. - // The metric cannot have negative values and should be a utilization - // metric, which means that the number of virtual machines handling - // requests should increase or decrease proportionally to the - // metric. - // - // The metric must have a value type of INT64 or DOUBLE. - Metric string `json:"metric,omitempty"` - - // UtilizationTarget: The target value of the metric that autoscaler - // should maintain. This must be a positive value. - // - // For example, a good metric to use as a utilization_target is - // compute.googleapis.com/instance/network/received_bytes_count. The - // autoscaler will work to keep this value constant for each of the - // instances. - UtilizationTarget float64 `json:"utilizationTarget,omitempty"` - - // UtilizationTargetType: Defines how target utilization value is - // expressed for a Stackdriver Monitoring metric. Either GAUGE, - // DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not specified, the default - // is GAUGE. - // - // Possible values: - // "DELTA_PER_MINUTE" - // "DELTA_PER_SECOND" - // "GAUGE" - UtilizationTargetType string `json:"utilizationTargetType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Metric") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Metric") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalingPolicyCustomMetricUtilization) MarshalJSON() ([]byte, error) { - type noMethod AutoscalingPolicyCustomMetricUtilization - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *AutoscalingPolicyCustomMetricUtilization) UnmarshalJSON(data []byte) error { - type noMethod AutoscalingPolicyCustomMetricUtilization - var s1 struct { - UtilizationTarget gensupport.JSONFloat64 `json:"utilizationTarget"` - *noMethod - } - s1.noMethod = (*noMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.UtilizationTarget = float64(s1.UtilizationTarget) - return nil -} - -// AutoscalingPolicyLoadBalancingUtilization: Configuration parameters -// of autoscaling based on load balancing. -type AutoscalingPolicyLoadBalancingUtilization struct { - // UtilizationTarget: Fraction of backend capacity utilization (set in - // HTTP(s) load balancing configuration) that autoscaler should - // maintain. Must be a positive float value. If not defined, the default - // is 0.8. - UtilizationTarget float64 `json:"utilizationTarget,omitempty"` - - // ForceSendFields is a list of field names (e.g. "UtilizationTarget") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "UtilizationTarget") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AutoscalingPolicyLoadBalancingUtilization) MarshalJSON() ([]byte, error) { - type noMethod AutoscalingPolicyLoadBalancingUtilization - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *AutoscalingPolicyLoadBalancingUtilization) UnmarshalJSON(data []byte) error { - type noMethod AutoscalingPolicyLoadBalancingUtilization - var s1 struct { - UtilizationTarget gensupport.JSONFloat64 `json:"utilizationTarget"` - *noMethod - } - s1.noMethod = (*noMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.UtilizationTarget = float64(s1.UtilizationTarget) - return nil -} - -// Backend: Message containing information of one individual backend. -type Backend struct { - // BalancingMode: Specifies the balancing mode for this backend. For - // global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. - // Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for - // TCP/SSL). - // - // For Internal Load Balancing, the default and only supported mode is - // CONNECTION. - // - // Possible values: - // "CONNECTION" - // "RATE" - // "UTILIZATION" - BalancingMode string `json:"balancingMode,omitempty"` - - // CapacityScaler: A multiplier applied to the group's maximum servicing - // capacity (based on UTILIZATION, RATE or CONNECTION). Default value is - // 1, which means the group will serve up to 100% of its configured - // capacity (depending on balancingMode). A setting of 0 means the group - // is completely drained, offering 0% of its available Capacity. Valid - // range is [0.0,1.0]. - // - // This cannot be used for internal load balancing. - CapacityScaler float64 `json:"capacityScaler,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Group: The fully-qualified URL of a Instance Group resource. This - // instance group defines the list of instances that serve traffic. - // Member virtual machine instances from each instance group must live - // in the same zone as the instance group itself. No two backends in a - // backend service are allowed to use same Instance Group - // resource. - // - // Note that you must specify an Instance Group resource using the - // fully-qualified URL, rather than a partial URL. - // - // When the BackendService has load balancing scheme INTERNAL, the - // instance group must be within the same region as the BackendService. - Group string `json:"group,omitempty"` - - // MaxConnections: The max number of simultaneous connections for the - // group. Can be used with either CONNECTION or UTILIZATION balancing - // modes. For CONNECTION mode, either maxConnections or - // maxConnectionsPerInstance must be set. - // - // This cannot be used for internal load balancing. - MaxConnections int64 `json:"maxConnections,omitempty"` - - // MaxConnectionsPerInstance: The max number of simultaneous connections - // that a single backend instance can handle. This is used to calculate - // the capacity of the group. Can be used in either CONNECTION or - // UTILIZATION balancing modes. For CONNECTION mode, either - // maxConnections or maxConnectionsPerInstance must be set. - // - // This cannot be used for internal load balancing. - MaxConnectionsPerInstance int64 `json:"maxConnectionsPerInstance,omitempty"` - - // MaxRate: The max requests per second (RPS) of the group. Can be used - // with either RATE or UTILIZATION balancing modes, but required if RATE - // mode. For RATE mode, either maxRate or maxRatePerInstance must be - // set. - // - // This cannot be used for internal load balancing. - MaxRate int64 `json:"maxRate,omitempty"` - - // MaxRatePerInstance: The max requests per second (RPS) that a single - // backend instance can handle. This is used to calculate the capacity - // of the group. Can be used in either balancing mode. For RATE mode, - // either maxRate or maxRatePerInstance must be set. - // - // This cannot be used for internal load balancing. - MaxRatePerInstance float64 `json:"maxRatePerInstance,omitempty"` - - // MaxUtilization: Used when balancingMode is UTILIZATION. This ratio - // defines the CPU utilization target for the group. The default is 0.8. - // Valid range is [0.0, 1.0]. - // - // This cannot be used for internal load balancing. - MaxUtilization float64 `json:"maxUtilization,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BalancingMode") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BalancingMode") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Backend) MarshalJSON() ([]byte, error) { - type noMethod Backend - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *Backend) UnmarshalJSON(data []byte) error { - type noMethod Backend - var s1 struct { - CapacityScaler gensupport.JSONFloat64 `json:"capacityScaler"` - MaxRatePerInstance gensupport.JSONFloat64 `json:"maxRatePerInstance"` - MaxUtilization gensupport.JSONFloat64 `json:"maxUtilization"` - *noMethod - } - s1.noMethod = (*noMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.CapacityScaler = float64(s1.CapacityScaler) - s.MaxRatePerInstance = float64(s1.MaxRatePerInstance) - s.MaxUtilization = float64(s1.MaxUtilization) - return nil -} - -// BackendBucket: A BackendBucket resource. This resource defines a -// Cloud Storage bucket. -type BackendBucket struct { - // BucketName: Cloud Storage bucket name. - BucketName string `json:"bucketName,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional textual description of the resource; - // provided by the client when the resource is created. - Description string `json:"description,omitempty"` - - // EnableCdn: If true, enable Cloud CDN for this BackendBucket. - EnableCdn bool `json:"enableCdn,omitempty"` - - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: Type of the resource. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "BucketName") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BucketName") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *BackendBucket) MarshalJSON() ([]byte, error) { - type noMethod BackendBucket - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// BackendBucketList: Contains a list of BackendBucket resources. -type BackendBucketList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of BackendBucket resources. - Items []*BackendBucket `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *BackendBucketList) MarshalJSON() ([]byte, error) { - type noMethod BackendBucketList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// BackendService: A BackendService resource. This resource defines a -// group of backend virtual machines and their serving capacity. -type BackendService struct { - // AffinityCookieTtlSec: Lifetime of cookies in seconds if - // session_affinity is GENERATED_COOKIE. If set to 0, the cookie is - // non-persistent and lasts only until the end of the browser session - // (or equivalent). The maximum allowed value for TTL is one day. - // - // When the load balancing scheme is INTERNAL, this field is not used. - AffinityCookieTtlSec int64 `json:"affinityCookieTtlSec,omitempty"` - - // Backends: The list of backends that serve this BackendService. - Backends []*Backend `json:"backends,omitempty"` - - // CdnPolicy: Cloud CDN configuration for this BackendService. - CdnPolicy *BackendServiceCdnPolicy `json:"cdnPolicy,omitempty"` - - ConnectionDraining *ConnectionDraining `json:"connectionDraining,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // EnableCDN: If true, enable Cloud CDN for this BackendService. - // - // When the load balancing scheme is INTERNAL, this field is not used. - EnableCDN bool `json:"enableCDN,omitempty"` - - // Fingerprint: Fingerprint of this resource. A hash of the contents - // stored in this object. This field is used in optimistic locking. This - // field will be ignored when inserting a BackendService. An up-to-date - // fingerprint must be provided in order to update the BackendService. - Fingerprint string `json:"fingerprint,omitempty"` - - // HealthChecks: The list of URLs to the HttpHealthCheck or - // HttpsHealthCheck resource for health checking this BackendService. - // Currently at most one health check can be specified, and a health - // check is required for GCE backend services. A health check must not - // be specified for GAE app backend and Cloud Function backend. - // - // For internal load balancing, a URL to a HealthCheck resource must be - // specified instead. - HealthChecks []string `json:"healthChecks,omitempty"` - - Iap *BackendServiceIAP `json:"iap,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of resource. Always compute#backendService - // for backend services. - Kind string `json:"kind,omitempty"` - - // Possible values: - // "EXTERNAL" - // "INTERNAL" - // "INVALID_LOAD_BALANCING_SCHEME" - LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Port: Deprecated in favor of portName. The TCP port to connect on the - // backend. The default value is 80. - // - // This cannot be used for internal load balancing. - Port int64 `json:"port,omitempty"` - - // PortName: Name of backend port. The same name should appear in the - // instance groups referenced by this service. Required when the load - // balancing scheme is EXTERNAL. - // - // When the load balancing scheme is INTERNAL, this field is not used. - PortName string `json:"portName,omitempty"` - - // Protocol: The protocol this BackendService uses to communicate with - // backends. - // - // Possible values are HTTP, HTTPS, TCP, and SSL. The default is - // HTTP. - // - // For internal load balancing, the possible values are TCP and UDP, and - // the default is TCP. - // - // Possible values: - // "HTTP" - // "HTTPS" - // "SSL" - // "TCP" - // "UDP" - Protocol string `json:"protocol,omitempty"` - - // Region: [Output Only] URL of the region where the regional backend - // service resides. This field is not applicable to global backend - // services. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // SessionAffinity: Type of session affinity to use. The default is - // NONE. - // - // When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, - // or GENERATED_COOKIE. - // - // When the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, - // CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO. - // - // When the protocol is UDP, this field is not used. - // - // Possible values: - // "CLIENT_IP" - // "CLIENT_IP_PORT_PROTO" - // "CLIENT_IP_PROTO" - // "GENERATED_COOKIE" - // "NONE" - SessionAffinity string `json:"sessionAffinity,omitempty"` - - // TimeoutSec: How many seconds to wait for the backend before - // considering it a failed request. Default is 30 seconds. - TimeoutSec int64 `json:"timeoutSec,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. - // "AffinityCookieTtlSec") to unconditionally include in API requests. - // By default, fields with empty values are omitted from API requests. - // However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AffinityCookieTtlSec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *BackendService) MarshalJSON() ([]byte, error) { - type noMethod BackendService - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// BackendServiceAggregatedList: Contains a list of -// BackendServicesScopedList. -type BackendServiceAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of BackendServicesScopedList resources. - Items map[string]BackendServicesScopedList `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *BackendServiceAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod BackendServiceAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// BackendServiceCdnPolicy: Message containing Cloud CDN configuration -// for a backend service. -type BackendServiceCdnPolicy struct { - // CacheKeyPolicy: The CacheKeyPolicy for this CdnPolicy. - CacheKeyPolicy *CacheKeyPolicy `json:"cacheKeyPolicy,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CacheKeyPolicy") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CacheKeyPolicy") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *BackendServiceCdnPolicy) MarshalJSON() ([]byte, error) { - type noMethod BackendServiceCdnPolicy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type BackendServiceGroupHealth struct { - HealthStatus []*HealthStatus `json:"healthStatus,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#backendServiceGroupHealth for the health of backend services. - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "HealthStatus") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "HealthStatus") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *BackendServiceGroupHealth) MarshalJSON() ([]byte, error) { - type noMethod BackendServiceGroupHealth - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// BackendServiceIAP: Identity-Aware Proxy -type BackendServiceIAP struct { - Enabled bool `json:"enabled,omitempty"` - - Oauth2ClientId string `json:"oauth2ClientId,omitempty"` - - Oauth2ClientSecret string `json:"oauth2ClientSecret,omitempty"` - - // Oauth2ClientSecretSha256: [Output Only] SHA256 hash value for the - // field oauth2_client_secret above. - Oauth2ClientSecretSha256 string `json:"oauth2ClientSecretSha256,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Enabled") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Enabled") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *BackendServiceIAP) MarshalJSON() ([]byte, error) { - type noMethod BackendServiceIAP - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// BackendServiceList: Contains a list of BackendService resources. -type BackendServiceList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of BackendService resources. - Items []*BackendService `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#backendServiceList for lists of backend services. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *BackendServiceList) MarshalJSON() ([]byte, error) { - type noMethod BackendServiceList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type BackendServicesScopedList struct { - // BackendServices: List of BackendServices contained in this scope. - BackendServices []*BackendService `json:"backendServices,omitempty"` - - // Warning: Informational warning which replaces the list of backend - // services when the list is empty. - Warning *BackendServicesScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BackendServices") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BackendServices") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *BackendServicesScopedList) MarshalJSON() ([]byte, error) { - type noMethod BackendServicesScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// BackendServicesScopedListWarning: Informational warning which -// replaces the list of backend services when the list is empty. -type BackendServicesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*BackendServicesScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *BackendServicesScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod BackendServicesScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type BackendServicesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *BackendServicesScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod BackendServicesScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type CacheInvalidationRule struct { - // Host: If set, this invalidation rule will only apply to requests with - // a Host header matching host. - Host string `json:"host,omitempty"` - - Path string `json:"path,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Host") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Host") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CacheInvalidationRule) MarshalJSON() ([]byte, error) { - type noMethod CacheInvalidationRule - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CacheKeyPolicy: Message containing what to include in the cache key -// for a request for Cloud CDN. -type CacheKeyPolicy struct { - // IncludeHost: If true, requests to different hosts will be cached - // separately. - IncludeHost bool `json:"includeHost,omitempty"` - - // IncludeProtocol: If true, http and https requests will be cached - // separately. - IncludeProtocol bool `json:"includeProtocol,omitempty"` - - // IncludeQueryString: If true, include query string parameters in the - // cache key according to query_string_whitelist and - // query_string_blacklist. If neither is set, the entire query string - // will be included. If false, the query string will be excluded from - // the cache key entirely. - IncludeQueryString bool `json:"includeQueryString,omitempty"` - - // QueryStringBlacklist: Names of query string parameters to exclude in - // cache keys. All other parameters will be included. Either specify - // query_string_whitelist or query_string_blacklist, not both. '&' and - // '=' will be percent encoded and not treated as delimiters. - QueryStringBlacklist []string `json:"queryStringBlacklist,omitempty"` - - // QueryStringWhitelist: Names of query string parameters to include in - // cache keys. All other parameters will be excluded. Either specify - // query_string_whitelist or query_string_blacklist, not both. '&' and - // '=' will be percent encoded and not treated as delimiters. - QueryStringWhitelist []string `json:"queryStringWhitelist,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IncludeHost") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IncludeHost") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CacheKeyPolicy) MarshalJSON() ([]byte, error) { - type noMethod CacheKeyPolicy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Commitment: Represents a Commitment resource. Creating a Commitment -// resource means that you are purchasing a committed use contract with -// an explicit start and end time. You can create commitments based on -// vCPUs and memory usage and receive discounted rates. For full -// details, read Signing Up for Committed Use Discounts. -// -// Committed use discounts are subject to Google Cloud Platform's -// Service Specific Terms. By purchasing a committed use discount, you -// agree to these terms. Committed use discounts will not renew, so you -// must purchase a new commitment to continue receiving discounts. -type Commitment struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // EndTimestamp: [Output Only] Commitment end time in RFC3339 text - // format. - EndTimestamp string `json:"endTimestamp,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#commitment - // for commitments. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Plan: The plan for this commitment, which determines duration and - // discount rate. The currently supported plans are TWELVE_MONTH (1 - // year), and THIRTY_SIX_MONTH (3 years). - // - // Possible values: - // "INVALID" - // "THIRTY_SIX_MONTH" - // "TWELVE_MONTH" - Plan string `json:"plan,omitempty"` - - // Region: [Output Only] URL of the region where this commitment may be - // used. - Region string `json:"region,omitempty"` - - // Resources: List of commitment amounts for particular resources. Note - // that VCPU and MEMORY resource commitments must occur together. - Resources []*ResourceCommitment `json:"resources,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // StartTimestamp: [Output Only] Commitment start time in RFC3339 text - // format. - StartTimestamp string `json:"startTimestamp,omitempty"` - - // Status: [Output Only] Status of the commitment with regards to - // eventual expiration (each commitment has an end date defined). One of - // the following values: NOT_YET_ACTIVE, ACTIVE, EXPIRED. - // - // Possible values: - // "ACTIVE" - // "CREATING" - // "EXPIRED" - // "NOT_YET_ACTIVE" - Status string `json:"status,omitempty"` - - // StatusMessage: [Output Only] An optional, human-readable explanation - // of the status. - StatusMessage string `json:"statusMessage,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Commitment) MarshalJSON() ([]byte, error) { - type noMethod Commitment - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type CommitmentAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of CommitmentsScopedList resources. - Items map[string]CommitmentsScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#commitmentAggregatedList for aggregated lists of commitments. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CommitmentAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod CommitmentAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CommitmentList: Contains a list of Commitment resources. -type CommitmentList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Commitment resources. - Items []*Commitment `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#commitmentList - // for lists of commitments. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CommitmentList) MarshalJSON() ([]byte, error) { - type noMethod CommitmentList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type CommitmentsScopedList struct { - // Commitments: [Output Only] List of commitments contained in this - // scope. - Commitments []*Commitment `json:"commitments,omitempty"` - - // Warning: [Output Only] Informational warning which replaces the list - // of commitments when the list is empty. - Warning *CommitmentsScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Commitments") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Commitments") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CommitmentsScopedList) MarshalJSON() ([]byte, error) { - type noMethod CommitmentsScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CommitmentsScopedListWarning: [Output Only] Informational warning -// which replaces the list of commitments when the list is empty. -type CommitmentsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*CommitmentsScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CommitmentsScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod CommitmentsScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type CommitmentsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CommitmentsScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod CommitmentsScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ConnectionDraining: Message containing connection draining -// configuration. -type ConnectionDraining struct { - // DrainingTimeoutSec: Time for which instance will be drained (not - // accept new connections, but still work to finish started). - DrainingTimeoutSec int64 `json:"drainingTimeoutSec,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DrainingTimeoutSec") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DrainingTimeoutSec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ConnectionDraining) MarshalJSON() ([]byte, error) { - type noMethod ConnectionDraining - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CustomerEncryptionKey: Represents a customer-supplied encryption key -type CustomerEncryptionKey struct { - // RawKey: Specifies a 256-bit customer-supplied encryption key, encoded - // in RFC 4648 base64 to either encrypt or decrypt this resource. - RawKey string `json:"rawKey,omitempty"` - - // Sha256: [Output only] The RFC 4648 base64 encoded SHA-256 hash of the - // customer-supplied encryption key that protects this resource. - Sha256 string `json:"sha256,omitempty"` - - // ForceSendFields is a list of field names (e.g. "RawKey") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "RawKey") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CustomerEncryptionKey) MarshalJSON() ([]byte, error) { - type noMethod CustomerEncryptionKey - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type CustomerEncryptionKeyProtectedDisk struct { - // DiskEncryptionKey: Decrypts data associated with the disk with a - // customer-supplied encryption key. - DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"` - - // Source: Specifies a valid partial or full URL to an existing - // Persistent Disk resource. This field is only applicable for - // persistent disks. - Source string `json:"source,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DiskEncryptionKey") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DiskEncryptionKey") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *CustomerEncryptionKeyProtectedDisk) MarshalJSON() ([]byte, error) { - type noMethod CustomerEncryptionKeyProtectedDisk - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DeprecationStatus: Deprecation status for a public resource. -type DeprecationStatus struct { - // Deleted: An optional RFC3339 timestamp on or after which the state of - // this resource is intended to change to DELETED. This is only - // informational and the status will not change unless the client - // explicitly changes it. - Deleted string `json:"deleted,omitempty"` - - // Deprecated: An optional RFC3339 timestamp on or after which the state - // of this resource is intended to change to DEPRECATED. This is only - // informational and the status will not change unless the client - // explicitly changes it. - Deprecated string `json:"deprecated,omitempty"` - - // Obsolete: An optional RFC3339 timestamp on or after which the state - // of this resource is intended to change to OBSOLETE. This is only - // informational and the status will not change unless the client - // explicitly changes it. - Obsolete string `json:"obsolete,omitempty"` - - // Replacement: The URL of the suggested replacement for a deprecated - // resource. The suggested replacement resource must be the same kind of - // resource as the deprecated resource. - Replacement string `json:"replacement,omitempty"` - - // State: The deprecation state of this resource. This can be - // DEPRECATED, OBSOLETE, or DELETED. Operations which create a new - // resource using a DEPRECATED resource will return successfully, but - // with a warning indicating the deprecated resource and recommending - // its replacement. Operations which use OBSOLETE or DELETED resources - // will be rejected and result in an error. - // - // Possible values: - // "DELETED" - // "DEPRECATED" - // "OBSOLETE" - State string `json:"state,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Deleted") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Deleted") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DeprecationStatus) MarshalJSON() ([]byte, error) { - type noMethod DeprecationStatus - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Disk: A Disk resource. -type Disk struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // DiskEncryptionKey: Encrypts the disk using a customer-supplied - // encryption key. - // - // After you encrypt a disk with a customer-supplied key, you must - // provide the same key if you use the disk later (e.g. to create a disk - // snapshot or an image, or to attach the disk to a virtual - // machine). - // - // Customer-supplied encryption keys do not protect access to metadata - // of the disk. - // - // If you do not provide an encryption key when creating the disk, then - // the disk will be encrypted using an automatically generated key and - // you do not need to provide a key to use the disk later. - DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#disk for - // disks. - Kind string `json:"kind,omitempty"` - - // LabelFingerprint: A fingerprint for the labels being applied to this - // disk, which is essentially a hash of the labels set used for - // optimistic locking. The fingerprint is initially generated by Compute - // Engine and changes after every request to modify or update labels. - // You must always provide an up-to-date fingerprint hash in order to - // update or change labels. - // - // To see the latest fingerprint, make a get() request to retrieve a - // disk. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // Labels: Labels to apply to this disk. These can be later modified by - // the setLabels method. - Labels map[string]string `json:"labels,omitempty"` - - // LastAttachTimestamp: [Output Only] Last attach timestamp in RFC3339 - // text format. - LastAttachTimestamp string `json:"lastAttachTimestamp,omitempty"` - - // LastDetachTimestamp: [Output Only] Last detach timestamp in RFC3339 - // text format. - LastDetachTimestamp string `json:"lastDetachTimestamp,omitempty"` - - // Licenses: Any applicable publicly visible licenses. - Licenses []string `json:"licenses,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Options: Internal use only. - Options string `json:"options,omitempty"` - - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - - // SizeGb: Size of the persistent disk, specified in GB. You can specify - // this field when creating a persistent disk using the sourceImage or - // sourceSnapshot parameter, or specify it alone to create an empty - // persistent disk. - // - // If you specify this field along with sourceImage or sourceSnapshot, - // the value of sizeGb must not be less than the size of the sourceImage - // or the size of the snapshot. Acceptable values are 1 to 65536, - // inclusive. - SizeGb int64 `json:"sizeGb,omitempty,string"` - - // SourceImage: The source image used to create this disk. If the source - // image is deleted, this field will not be set. - // - // To create a disk with one of the public operating system images, - // specify the image by its family name. For example, specify - // family/debian-8 to use the latest Debian 8 - // image: - // - // projects/debian-cloud/global/images/family/debian-8 - // - // Alternatively, use a specific version of a public operating system - // image: - // - // projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD - // - // To create a disk with a private image that you created, specify the - // image name in the following format: - // - // global/images/my-private-image - // - // You can also specify a private image by its image family, which - // returns the latest version of the image in that family. Replace the - // image name with - // family/family-name: - // - // global/images/family/my-private-family - SourceImage string `json:"sourceImage,omitempty"` - - // SourceImageEncryptionKey: The customer-supplied encryption key of the - // source image. Required if the source image is protected by a - // customer-supplied encryption key. - SourceImageEncryptionKey *CustomerEncryptionKey `json:"sourceImageEncryptionKey,omitempty"` - - // SourceImageId: [Output Only] The ID value of the image used to create - // this disk. This value identifies the exact image that was used to - // create this persistent disk. For example, if you created the - // persistent disk from an image that was later deleted and recreated - // under the same name, the source image ID would identify the exact - // version of the image that was used. - SourceImageId string `json:"sourceImageId,omitempty"` - - // SourceSnapshot: The source snapshot used to create this disk. You can - // provide this as a partial or full URL to the resource. For example, - // the following are valid values: - // - - // https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot - // - projects/project/global/snapshots/snapshot - // - global/snapshots/snapshot - SourceSnapshot string `json:"sourceSnapshot,omitempty"` - - // SourceSnapshotEncryptionKey: The customer-supplied encryption key of - // the source snapshot. Required if the source snapshot is protected by - // a customer-supplied encryption key. - SourceSnapshotEncryptionKey *CustomerEncryptionKey `json:"sourceSnapshotEncryptionKey,omitempty"` - - // SourceSnapshotId: [Output Only] The unique ID of the snapshot used to - // create this disk. This value identifies the exact snapshot that was - // used to create this persistent disk. For example, if you created the - // persistent disk from a snapshot that was later deleted and recreated - // under the same name, the source snapshot ID would identify the exact - // version of the snapshot that was used. - SourceSnapshotId string `json:"sourceSnapshotId,omitempty"` - - // Status: [Output Only] The status of disk creation. - // - // Possible values: - // "CREATING" - // "FAILED" - // "READY" - // "RESTORING" - Status string `json:"status,omitempty"` - - // Type: URL of the disk type resource describing which disk type to use - // to create the disk. Provide this when creating the disk. - Type string `json:"type,omitempty"` - - // Users: [Output Only] Links to the users of the disk (attached - // instances) in form: project/zones/zone/instances/instance - Users []string `json:"users,omitempty"` - - // Zone: [Output Only] URL of the zone where the disk resides. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Disk) MarshalJSON() ([]byte, error) { - type noMethod Disk - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type DiskAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of DisksScopedList resources. - Items map[string]DisksScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#diskAggregatedList for aggregated lists of persistent disks. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DiskAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod DiskAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DiskList: A list of Disk resources. -type DiskList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Disk resources. - Items []*Disk `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#diskList for - // lists of disks. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DiskList) MarshalJSON() ([]byte, error) { - type noMethod DiskList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type DiskMoveRequest struct { - // DestinationZone: The URL of the destination zone to move the disk. - // This can be a full or partial URL. For example, the following are all - // valid URLs to a zone: - // - https://www.googleapis.com/compute/v1/projects/project/zones/zone - // - // - projects/project/zones/zone - // - zones/zone - DestinationZone string `json:"destinationZone,omitempty"` - - // TargetDisk: The URL of the target disk to move. This can be a full or - // partial URL. For example, the following are all valid URLs to a disk: - // - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk - // - projects/project/zones/zone/disks/disk - // - zones/zone/disks/disk - TargetDisk string `json:"targetDisk,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DestinationZone") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DestinationZone") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *DiskMoveRequest) MarshalJSON() ([]byte, error) { - type noMethod DiskMoveRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DiskType: A DiskType resource. -type DiskType struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // DefaultDiskSizeGb: [Output Only] Server-defined default disk size in - // GB. - DefaultDiskSizeGb int64 `json:"defaultDiskSizeGb,omitempty,string"` - - // Deprecated: [Output Only] The deprecation status associated with this - // disk type. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - - // Description: [Output Only] An optional description of this resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#diskType for - // disk types. - Kind string `json:"kind,omitempty"` - - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ValidDiskSize: [Output Only] An optional textual description of the - // valid disk size, such as "10GB-10TB". - ValidDiskSize string `json:"validDiskSize,omitempty"` - - // Zone: [Output Only] URL of the zone where the disk type resides. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *DiskType) MarshalJSON() ([]byte, error) { - type noMethod DiskType - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type DiskTypeAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of DiskTypesScopedList resources. - Items map[string]DiskTypesScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#diskTypeAggregatedList. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DiskTypeAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod DiskTypeAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DiskTypeList: Contains a list of disk types. -type DiskTypeList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of DiskType resources. - Items []*DiskType `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#diskTypeList for - // disk types. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DiskTypeList) MarshalJSON() ([]byte, error) { - type noMethod DiskTypeList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type DiskTypesScopedList struct { - // DiskTypes: [Output Only] List of disk types contained in this scope. - DiskTypes []*DiskType `json:"diskTypes,omitempty"` - - // Warning: [Output Only] Informational warning which replaces the list - // of disk types when the list is empty. - Warning *DiskTypesScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DiskTypes") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DiskTypes") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DiskTypesScopedList) MarshalJSON() ([]byte, error) { - type noMethod DiskTypesScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DiskTypesScopedListWarning: [Output Only] Informational warning which -// replaces the list of disk types when the list is empty. -type DiskTypesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*DiskTypesScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DiskTypesScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod DiskTypesScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type DiskTypesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DiskTypesScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod DiskTypesScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type DisksResizeRequest struct { - // SizeGb: The new size of the persistent disk, which is specified in - // GB. - SizeGb int64 `json:"sizeGb,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "SizeGb") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "SizeGb") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DisksResizeRequest) MarshalJSON() ([]byte, error) { - type noMethod DisksResizeRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type DisksScopedList struct { - // Disks: [Output Only] List of disks contained in this scope. - Disks []*Disk `json:"disks,omitempty"` - - // Warning: [Output Only] Informational warning which replaces the list - // of disks when the list is empty. - Warning *DisksScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Disks") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Disks") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DisksScopedList) MarshalJSON() ([]byte, error) { - type noMethod DisksScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DisksScopedListWarning: [Output Only] Informational warning which -// replaces the list of disks when the list is empty. -type DisksScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*DisksScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DisksScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod DisksScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type DisksScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DisksScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod DisksScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Firewall: Represents a Firewall resource. -type Firewall struct { - // Allowed: The list of ALLOW rules specified by this firewall. Each - // rule specifies a protocol and port-range tuple that describes a - // permitted connection. - Allowed []*FirewallAllowed `json:"allowed,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#firewall for - // firewall rules. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource; provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Network: URL of the network resource for this firewall rule. If not - // specified when creating a firewall rule, the default network is - // used: - // global/networks/default - // If you choose to specify this property, you can specify the network - // as a full or partial URL. For example, the following are all valid - // URLs: - // - - // https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network - // - projects/myproject/global/networks/my-network - // - global/networks/default - Network string `json:"network,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // SourceRanges: If source ranges are specified, the firewall will apply - // only to traffic that has source IP address in these ranges. These - // ranges must be expressed in CIDR format. One or both of sourceRanges - // and sourceTags may be set. If both properties are set, the firewall - // will apply to traffic that has source IP address within sourceRanges - // OR the source IP that belongs to a tag listed in the sourceTags - // property. The connection does not need to match both properties for - // the firewall to apply. Only IPv4 is supported. - SourceRanges []string `json:"sourceRanges,omitempty"` - - // SourceTags: If source tags are specified, the firewall rule applies - // only to traffic with source IPs that match the primary network - // interfaces of VM instances that have the tag and are in the same VPC - // network. Source tags cannot be used to control traffic to an - // instance's external IP address, it only applies to traffic between - // instances in the same virtual network. Because tags are associated - // with instances, not IP addresses. One or both of sourceRanges and - // sourceTags may be set. If both properties are set, the firewall will - // apply to traffic that has source IP address within sourceRanges OR - // the source IP that belongs to a tag listed in the sourceTags - // property. The connection does not need to match both properties for - // the firewall to apply. - SourceTags []string `json:"sourceTags,omitempty"` - - // TargetTags: A list of instance tags indicating sets of instances - // located in the network that may make network connections as specified - // in allowed[]. If no targetTags are specified, the firewall rule - // applies to all instances on the specified network. - TargetTags []string `json:"targetTags,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Allowed") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Allowed") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Firewall) MarshalJSON() ([]byte, error) { - type noMethod Firewall - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type FirewallAllowed struct { - // IPProtocol: The IP protocol to which this rule applies. The protocol - // type is required when creating a firewall rule. This value can either - // be one of the following well known protocol strings (tcp, udp, icmp, - // esp, ah, ipip, sctp), or the IP protocol number. - IPProtocol string `json:"IPProtocol,omitempty"` - - // Ports: An optional list of ports to which this rule applies. This - // field is only applicable for UDP or TCP protocol. Each entry must be - // either an integer or a range. If not specified, this rule applies to - // connections through any port. - // - // Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. - Ports []string `json:"ports,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IPProtocol") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IPProtocol") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *FirewallAllowed) MarshalJSON() ([]byte, error) { - type noMethod FirewallAllowed - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// FirewallList: Contains a list of firewalls. -type FirewallList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Firewall resources. - Items []*Firewall `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#firewallList for - // lists of firewalls. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *FirewallList) MarshalJSON() ([]byte, error) { - type noMethod FirewallList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ForwardingRule: A ForwardingRule resource. A ForwardingRule resource -// specifies which pool of target virtual machines to forward a packet -// to if it matches the given [IPAddress, IPProtocol, ports] tuple. -type ForwardingRule struct { - // IPAddress: The IP address that this forwarding rule is serving on - // behalf of. - // - // For global forwarding rules, the address must be a global IP. For - // regional forwarding rules, the address must live in the same region - // as the forwarding rule. By default, this field is empty and an - // ephemeral IPv4 address from the same scope (global or regional) will - // be assigned. A regional forwarding rule supports IPv4 only. A global - // forwarding rule supports either IPv4 or IPv6. - // - // When the load balancing scheme is INTERNAL, this can only be an RFC - // 1918 IP address belonging to the network/subnetwork configured for - // the forwarding rule. A reserved address cannot be used. If the field - // is empty, the IP address will be automatically allocated from the - // internal IP range of the subnetwork or network configured for this - // forwarding rule. - IPAddress string `json:"IPAddress,omitempty"` - - // IPProtocol: The IP protocol to which this rule applies. Valid options - // are TCP, UDP, ESP, AH, SCTP or ICMP. - // - // When the load balancing scheme is INTERNAL, only TCP and UDP are - // valid. - // - // Possible values: - // "AH" - // "ESP" - // "ICMP" - // "SCTP" - // "TCP" - // "UDP" - IPProtocol string `json:"IPProtocol,omitempty"` - - // BackendService: This field is not used for external load - // balancing. - // - // For internal load balancing, this field identifies the BackendService - // resource to receive the matched traffic. - BackendService string `json:"backendService,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // IpVersion: The IP Version that will be used by this forwarding rule. - // Valid options are IPV4 or IPV6. This can only be specified for a - // global forwarding rule. - // - // Possible values: - // "IPV4" - // "IPV6" - // "UNSPECIFIED_VERSION" - IpVersion string `json:"ipVersion,omitempty"` - - // Kind: [Output Only] Type of the resource. Always - // compute#forwardingRule for Forwarding Rule resources. - Kind string `json:"kind,omitempty"` - - // LoadBalancingScheme: This signifies what the ForwardingRule will be - // used for and can only take the following values: INTERNAL, EXTERNAL - // The value of INTERNAL means that this will be used for Internal - // Network Load Balancing (TCP, UDP). The value of EXTERNAL means that - // this will be used for External Load Balancing (HTTP(S) LB, External - // TCP/UDP LB, SSL Proxy) - // - // Possible values: - // "EXTERNAL" - // "INTERNAL" - // "INVALID" - LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"` - - // Name: Name of the resource; provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Network: This field is not used for external load balancing. - // - // For internal load balancing, this field identifies the network that - // the load balanced IP should belong to for this Forwarding Rule. If - // this field is not specified, the default network will be used. - Network string `json:"network,omitempty"` - - // PortRange: This field is used along with the target field for - // TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, - // TargetVpnGateway, TargetPool, TargetInstance. - // - // Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets - // addressed to ports in the specified range will be forwarded to - // target. Forwarding rules with the same [IPAddress, IPProtocol] pair - // must have disjoint port ranges. - // - // Some types of forwarding target have constraints on the acceptable - // ports: - // - TargetHttpProxy: 80, 8080 - // - TargetHttpsProxy: 443 - // - TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, - // 995, 1883, 5222 - // - TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, - // 995, 1883, 5222 - // - TargetVpnGateway: 500, 4500 - // - - PortRange string `json:"portRange,omitempty"` - - // Ports: This field is used along with the backend_service field for - // internal load balancing. - // - // When the load balancing scheme is INTERNAL, a single port or a comma - // separated list of ports can be configured. Only packets addressed to - // these ports will be forwarded to the backends configured with this - // forwarding rule. - // - // You may specify a maximum of up to 5 ports. - Ports []string `json:"ports,omitempty"` - - // Region: [Output Only] URL of the region where the regional forwarding - // rule resides. This field is not applicable to global forwarding - // rules. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Subnetwork: This field is not used for external load balancing. - // - // For internal load balancing, this field identifies the subnetwork - // that the load balanced IP should belong to for this Forwarding - // Rule. - // - // If the network specified is in auto subnet mode, this field is - // optional. However, if the network is in custom subnet mode, a - // subnetwork must be specified. - Subnetwork string `json:"subnetwork,omitempty"` - - // Target: The URL of the target resource to receive the matched - // traffic. For regional forwarding rules, this target must live in the - // same region as the forwarding rule. For global forwarding rules, this - // target must be a global load balancing resource. The forwarded - // traffic must be of a type appropriate to the target object. - // - // This field is not used for internal load balancing. - Target string `json:"target,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "IPAddress") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IPAddress") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ForwardingRule) MarshalJSON() ([]byte, error) { - type noMethod ForwardingRule - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ForwardingRuleAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of ForwardingRulesScopedList resources. - Items map[string]ForwardingRulesScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#forwardingRuleAggregatedList for lists of forwarding rules. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ForwardingRuleAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod ForwardingRuleAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ForwardingRuleList: Contains a list of ForwardingRule resources. -type ForwardingRuleList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of ForwardingRule resources. - Items []*ForwardingRule `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ForwardingRuleList) MarshalJSON() ([]byte, error) { - type noMethod ForwardingRuleList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ForwardingRulesScopedList struct { - // ForwardingRules: List of forwarding rules contained in this scope. - ForwardingRules []*ForwardingRule `json:"forwardingRules,omitempty"` - - // Warning: Informational warning which replaces the list of forwarding - // rules when the list is empty. - Warning *ForwardingRulesScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ForwardingRules") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ForwardingRules") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ForwardingRulesScopedList) MarshalJSON() ([]byte, error) { - type noMethod ForwardingRulesScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ForwardingRulesScopedListWarning: Informational warning which -// replaces the list of forwarding rules when the list is empty. -type ForwardingRulesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*ForwardingRulesScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ForwardingRulesScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod ForwardingRulesScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ForwardingRulesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ForwardingRulesScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod ForwardingRulesScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type GlobalSetLabelsRequest struct { - // LabelFingerprint: The fingerprint of the previous set of labels for - // this resource, used to detect conflicts. The fingerprint is initially - // generated by Compute Engine and changes after every request to modify - // or update labels. You must always provide an up-to-date fingerprint - // hash when updating or changing labels. Make a get() request to the - // resource to get the latest fingerprint. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // Labels: A list of labels to apply for this resource. Each label key & - // value must comply with RFC1035. Specifically, the name must be 1-63 - // characters long and match the regular expression - // [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a - // lowercase letter, and all following characters must be a dash, - // lowercase letter, or digit, except the last character, which cannot - // be a dash. For example, "webserver-frontend": "images". A label value - // can also be empty (e.g. "my-label": ""). - Labels map[string]string `json:"labels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LabelFingerprint") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "LabelFingerprint") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GlobalSetLabelsRequest) MarshalJSON() ([]byte, error) { - type noMethod GlobalSetLabelsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GuestOsFeature: Guest OS features. -type GuestOsFeature struct { - // Type: The type of supported feature. Currently only - // VIRTIO_SCSI_MULTIQUEUE is supported. For newer Windows images, the - // server might also populate this property with the value WINDOWS to - // indicate that this is a Windows image. This value is purely - // informational and does not enable or disable any features. - // - // Possible values: - // "FEATURE_TYPE_UNSPECIFIED" - // "VIRTIO_SCSI_MULTIQUEUE" - // "WINDOWS" - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Type") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Type") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GuestOsFeature) MarshalJSON() ([]byte, error) { - type noMethod GuestOsFeature - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type HTTPHealthCheck struct { - // Host: The value of the host header in the HTTP health check request. - // If left empty (default value), the IP on behalf of which this health - // check is performed will be used. - Host string `json:"host,omitempty"` - - // Port: The TCP port number for the health check request. The default - // value is 80. Valid values are 1 through 65535. - Port int64 `json:"port,omitempty"` - - // PortName: Port name as defined in InstanceGroup#NamedPort#name. If - // both port and port_name are defined, port takes precedence. - PortName string `json:"portName,omitempty"` - - // ProxyHeader: Specifies the type of proxy header to append before - // sending data to the backend, either NONE or PROXY_V1. The default is - // NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - - // RequestPath: The request path of the HTTP health check request. The - // default value is /. - RequestPath string `json:"requestPath,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Host") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Host") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HTTPHealthCheck) MarshalJSON() ([]byte, error) { - type noMethod HTTPHealthCheck - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type HTTPSHealthCheck struct { - // Host: The value of the host header in the HTTPS health check request. - // If left empty (default value), the IP on behalf of which this health - // check is performed will be used. - Host string `json:"host,omitempty"` - - // Port: The TCP port number for the health check request. The default - // value is 443. Valid values are 1 through 65535. - Port int64 `json:"port,omitempty"` - - // PortName: Port name as defined in InstanceGroup#NamedPort#name. If - // both port and port_name are defined, port takes precedence. - PortName string `json:"portName,omitempty"` - - // ProxyHeader: Specifies the type of proxy header to append before - // sending data to the backend, either NONE or PROXY_V1. The default is - // NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - - // RequestPath: The request path of the HTTPS health check request. The - // default value is /. - RequestPath string `json:"requestPath,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Host") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Host") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HTTPSHealthCheck) MarshalJSON() ([]byte, error) { - type noMethod HTTPSHealthCheck - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HealthCheck: An HealthCheck resource. This resource defines a -// template for how individual virtual machines should be checked for -// health, via one of the supported protocols. -type HealthCheck struct { - // CheckIntervalSec: How often (in seconds) to send a health check. The - // default value is 5 seconds. - CheckIntervalSec int64 `json:"checkIntervalSec,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in 3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // HealthyThreshold: A so-far unhealthy instance will be marked healthy - // after this many consecutive successes. The default value is 2. - HealthyThreshold int64 `json:"healthyThreshold,omitempty"` - - HttpHealthCheck *HTTPHealthCheck `json:"httpHealthCheck,omitempty"` - - HttpsHealthCheck *HTTPSHealthCheck `json:"httpsHealthCheck,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: Type of the resource. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - SslHealthCheck *SSLHealthCheck `json:"sslHealthCheck,omitempty"` - - TcpHealthCheck *TCPHealthCheck `json:"tcpHealthCheck,omitempty"` - - // TimeoutSec: How long (in seconds) to wait before claiming failure. - // The default value is 5 seconds. It is invalid for timeoutSec to have - // greater value than checkIntervalSec. - TimeoutSec int64 `json:"timeoutSec,omitempty"` - - // Type: Specifies the type of the healthCheck, either TCP, SSL, HTTP or - // HTTPS. If not specified, the default is TCP. Exactly one of the - // protocol-specific health check field must be specified, which must - // match type field. - // - // Possible values: - // "HTTP" - // "HTTPS" - // "INVALID" - // "SSL" - // "TCP" - Type string `json:"type,omitempty"` - - // UnhealthyThreshold: A so-far healthy instance will be marked - // unhealthy after this many consecutive failures. The default value is - // 2. - UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CheckIntervalSec") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CheckIntervalSec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *HealthCheck) MarshalJSON() ([]byte, error) { - type noMethod HealthCheck - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HealthCheckList: Contains a list of HealthCheck resources. -type HealthCheckList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of HealthCheck resources. - Items []*HealthCheck `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HealthCheckList) MarshalJSON() ([]byte, error) { - type noMethod HealthCheckList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HealthCheckReference: A full or valid partial URL to a health check. -// For example, the following are valid URLs: -// - -// https://www.googleapis.com/compute/beta/projects/project-id/global/httpHealthChecks/health-check -// - projects/project-id/global/httpHealthChecks/health-check -// - global/httpHealthChecks/health-check -type HealthCheckReference struct { - HealthCheck string `json:"healthCheck,omitempty"` - - // ForceSendFields is a list of field names (e.g. "HealthCheck") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "HealthCheck") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HealthCheckReference) MarshalJSON() ([]byte, error) { - type noMethod HealthCheckReference - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type HealthStatus struct { - // HealthState: Health state of the instance. - // - // Possible values: - // "HEALTHY" - // "UNHEALTHY" - HealthState string `json:"healthState,omitempty"` - - // Instance: URL of the instance resource. - Instance string `json:"instance,omitempty"` - - // IpAddress: The IP address represented by this resource. - IpAddress string `json:"ipAddress,omitempty"` - - // Port: The port on the instance. - Port int64 `json:"port,omitempty"` - - // ForceSendFields is a list of field names (e.g. "HealthState") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "HealthState") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HealthStatus) MarshalJSON() ([]byte, error) { - type noMethod HealthStatus - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HostRule: UrlMaps A host-matching rule for a URL. If matched, will -// use the named PathMatcher to select the BackendService. -type HostRule struct { - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Hosts: The list of host patterns to match. They must be valid - // hostnames, except * will match any string of ([a-z0-9-.]*). In that - // case, * must be the first character and must be followed in the - // pattern by either - or .. - Hosts []string `json:"hosts,omitempty"` - - // PathMatcher: The name of the PathMatcher to use to match the path - // portion of the URL if the hostRule matches the URL's host portion. - PathMatcher string `json:"pathMatcher,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HostRule) MarshalJSON() ([]byte, error) { - type noMethod HostRule - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HttpHealthCheck: An HttpHealthCheck resource. This resource defines a -// template for how individual instances should be checked for health, -// via HTTP. -type HttpHealthCheck struct { - // CheckIntervalSec: How often (in seconds) to send a health check. The - // default value is 5 seconds. - CheckIntervalSec int64 `json:"checkIntervalSec,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // HealthyThreshold: A so-far unhealthy instance will be marked healthy - // after this many consecutive successes. The default value is 2. - HealthyThreshold int64 `json:"healthyThreshold,omitempty"` - - // Host: The value of the host header in the HTTP health check request. - // If left empty (default value), the public IP on behalf of which this - // health check is performed will be used. - Host string `json:"host,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always - // compute#httpHealthCheck for HTTP health checks. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Port: The TCP port number for the HTTP health check request. The - // default value is 80. - Port int64 `json:"port,omitempty"` - - // RequestPath: The request path of the HTTP health check request. The - // default value is /. - RequestPath string `json:"requestPath,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // TimeoutSec: How long (in seconds) to wait before claiming failure. - // The default value is 5 seconds. It is invalid for timeoutSec to have - // greater value than checkIntervalSec. - TimeoutSec int64 `json:"timeoutSec,omitempty"` - - // UnhealthyThreshold: A so-far healthy instance will be marked - // unhealthy after this many consecutive failures. The default value is - // 2. - UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CheckIntervalSec") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CheckIntervalSec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *HttpHealthCheck) MarshalJSON() ([]byte, error) { - type noMethod HttpHealthCheck - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HttpHealthCheckList: Contains a list of HttpHealthCheck resources. -type HttpHealthCheckList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of HttpHealthCheck resources. - Items []*HttpHealthCheck `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HttpHealthCheckList) MarshalJSON() ([]byte, error) { - type noMethod HttpHealthCheckList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HttpsHealthCheck: An HttpsHealthCheck resource. This resource defines -// a template for how individual instances should be checked for health, -// via HTTPS. -type HttpsHealthCheck struct { - // CheckIntervalSec: How often (in seconds) to send a health check. The - // default value is 5 seconds. - CheckIntervalSec int64 `json:"checkIntervalSec,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // HealthyThreshold: A so-far unhealthy instance will be marked healthy - // after this many consecutive successes. The default value is 2. - HealthyThreshold int64 `json:"healthyThreshold,omitempty"` - - // Host: The value of the host header in the HTTPS health check request. - // If left empty (default value), the public IP on behalf of which this - // health check is performed will be used. - Host string `json:"host,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: Type of the resource. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Port: The TCP port number for the HTTPS health check request. The - // default value is 443. - Port int64 `json:"port,omitempty"` - - // RequestPath: The request path of the HTTPS health check request. The - // default value is "/". - RequestPath string `json:"requestPath,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // TimeoutSec: How long (in seconds) to wait before claiming failure. - // The default value is 5 seconds. It is invalid for timeoutSec to have - // a greater value than checkIntervalSec. - TimeoutSec int64 `json:"timeoutSec,omitempty"` - - // UnhealthyThreshold: A so-far healthy instance will be marked - // unhealthy after this many consecutive failures. The default value is - // 2. - UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CheckIntervalSec") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CheckIntervalSec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *HttpsHealthCheck) MarshalJSON() ([]byte, error) { - type noMethod HttpsHealthCheck - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HttpsHealthCheckList: Contains a list of HttpsHealthCheck resources. -type HttpsHealthCheckList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of HttpsHealthCheck resources. - Items []*HttpsHealthCheck `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HttpsHealthCheckList) MarshalJSON() ([]byte, error) { - type noMethod HttpsHealthCheckList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Image: An Image resource. -type Image struct { - // ArchiveSizeBytes: Size of the image tar.gz archive stored in Google - // Cloud Storage (in bytes). - ArchiveSizeBytes int64 `json:"archiveSizeBytes,omitempty,string"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Deprecated: The deprecation status associated with this image. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // DiskSizeGb: Size of the image when restored onto a persistent disk - // (in GB). - DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - - // Family: The name of the image family to which this image belongs. You - // can create disks by specifying an image family instead of a specific - // image name. The image family always returns its latest image that is - // not deprecated. The name of the image family must comply with - // RFC1035. - Family string `json:"family,omitempty"` - - // GuestOsFeatures: A list of features to enable on the guest OS. - // Applicable for bootable images only. Currently, only one feature can - // be enabled, VIRTIO_SCSI_MULTIQUEUE, which allows each virtual CPU to - // have its own queue. For Windows images, you can only enable - // VIRTIO_SCSI_MULTIQUEUE on images with driver version 1.2.0.1621 or - // higher. Linux images with kernel versions 3.17 and higher will - // support VIRTIO_SCSI_MULTIQUEUE. - // - // For new Windows images, the server might also populate this field - // with the value WINDOWS, to indicate that this is a Windows image. - // This value is purely informational and does not enable or disable any - // features. - GuestOsFeatures []*GuestOsFeature `json:"guestOsFeatures,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // ImageEncryptionKey: Encrypts the image using a customer-supplied - // encryption key. - // - // After you encrypt an image with a customer-supplied key, you must - // provide the same key if you use the image later (e.g. to create a - // disk from the image). - // - // Customer-supplied encryption keys do not protect access to metadata - // of the disk. - // - // If you do not provide an encryption key when creating the image, then - // the disk will be encrypted using an automatically generated key and - // you do not need to provide a key to use the image later. - ImageEncryptionKey *CustomerEncryptionKey `json:"imageEncryptionKey,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#image for - // images. - Kind string `json:"kind,omitempty"` - - // LabelFingerprint: A fingerprint for the labels being applied to this - // image, which is essentially a hash of the labels used for optimistic - // locking. The fingerprint is initially generated by Compute Engine and - // changes after every request to modify or update labels. You must - // always provide an up-to-date fingerprint hash in order to update or - // change labels. - // - // To see the latest fingerprint, make a get() request to retrieve an - // image. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // Labels: Labels to apply to this image. These can be later modified by - // the setLabels method. - Labels map[string]string `json:"labels,omitempty"` - - // Licenses: Any applicable license URI. - Licenses []string `json:"licenses,omitempty"` - - // Name: Name of the resource; provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // RawDisk: The parameters of the raw disk image. - RawDisk *ImageRawDisk `json:"rawDisk,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // SourceDisk: URL of the source disk used to create this image. This - // can be a full or valid partial URL. You must provide either this - // property or the rawDisk.source property but not both to create an - // image. For example, the following are valid values: - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk - // - projects/project/zones/zone/disks/disk - // - zones/zone/disks/disk - SourceDisk string `json:"sourceDisk,omitempty"` - - // SourceDiskEncryptionKey: The customer-supplied encryption key of the - // source disk. Required if the source disk is protected by a - // customer-supplied encryption key. - SourceDiskEncryptionKey *CustomerEncryptionKey `json:"sourceDiskEncryptionKey,omitempty"` - - // SourceDiskId: The ID value of the disk used to create this image. - // This value may be used to determine whether the image was taken from - // the current or a previous instance of a given disk name. - SourceDiskId string `json:"sourceDiskId,omitempty"` - - // SourceType: The type of the image used to create this disk. The - // default and only value is RAW - // - // Possible values: - // "RAW" (default) - SourceType string `json:"sourceType,omitempty"` - - // Status: [Output Only] The status of the image. An image can be used - // to create other resources, such as instances, only after the image - // has been successfully created and the status is set to READY. - // Possible values are FAILED, PENDING, or READY. - // - // Possible values: - // "FAILED" - // "PENDING" - // "READY" - Status string `json:"status,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ArchiveSizeBytes") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ArchiveSizeBytes") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Image) MarshalJSON() ([]byte, error) { - type noMethod Image - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ImageRawDisk: The parameters of the raw disk image. -type ImageRawDisk struct { - // ContainerType: The format used to encode and transmit the block - // device, which should be TAR. This is just a container and - // transmission format and not a runtime format. Provided by the client - // when the disk image is created. - // - // Possible values: - // "TAR" - ContainerType string `json:"containerType,omitempty"` - - // Sha1Checksum: An optional SHA1 checksum of the disk image before - // unpackaging; provided by the client when the disk image is created. - Sha1Checksum string `json:"sha1Checksum,omitempty"` - - // Source: The full Google Cloud Storage URL where the disk image is - // stored. You must provide either this property or the sourceDisk - // property but not both. - Source string `json:"source,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ContainerType") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ContainerType") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ImageRawDisk) MarshalJSON() ([]byte, error) { - type noMethod ImageRawDisk - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ImageList: Contains a list of images. -type ImageList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Image resources. - Items []*Image `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ImageList) MarshalJSON() ([]byte, error) { - type noMethod ImageList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Instance: An Instance resource. -type Instance struct { - // CanIpForward: Allows this instance to send and receive packets with - // non-matching destination or source IPs. This is required if you plan - // to use this instance to forward routes. For more information, see - // Enabling IP Forwarding. - CanIpForward bool `json:"canIpForward,omitempty"` - - // CpuPlatform: [Output Only] The CPU platform used by this instance. - CpuPlatform string `json:"cpuPlatform,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Disks: Array of disks associated with this instance. Persistent disks - // must be created before you can assign them. - Disks []*AttachedDisk `json:"disks,omitempty"` - - // GuestAccelerators: List of the type and count of accelerator cards - // attached to the instance. - GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#instance for - // instances. - Kind string `json:"kind,omitempty"` - - // LabelFingerprint: A fingerprint for this request, which is - // essentially a hash of the metadata's contents and used for optimistic - // locking. The fingerprint is initially generated by Compute Engine and - // changes after every request to modify or update metadata. You must - // always provide an up-to-date fingerprint hash in order to update or - // change metadata. - // - // To see the latest fingerprint, make get() request to the instance. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // Labels: Labels to apply to this instance. These can be later modified - // by the setLabels method. - Labels map[string]string `json:"labels,omitempty"` - - // MachineType: Full or partial URL of the machine type resource to use - // for this instance, in the format: - // zones/zone/machineTypes/machine-type. This is provided by the client - // when the instance is created. For example, the following is a valid - // partial url to a predefined machine - // type: - // - // zones/us-central1-f/machineTypes/n1-standard-1 - // - // To create a custom machine type, provide a URL to a machine type in - // the following format, where CPUS is 1 or an even number up to 32 (2, - // 4, 6, ... 24, etc), and MEMORY is the total memory for this instance. - // Memory must be a multiple of 256 MB and must be supplied in MB (e.g. - // 5 GB of memory is 5120 - // MB): - // - // zones/zone/machineTypes/custom-CPUS-MEMORY - // - // For example: zones/us-central1-f/machineTypes/custom-4-5120 - // - // For a full list of restrictions, read the Specifications for custom - // machine types. - MachineType string `json:"machineType,omitempty"` - - // Metadata: The metadata key/value pairs assigned to this instance. - // This includes custom metadata and predefined keys. - Metadata *Metadata `json:"metadata,omitempty"` - - // Name: The name of the resource, provided by the client when initially - // creating the resource. The resource name must be 1-63 characters - // long, and comply with RFC1035. Specifically, the name must be 1-63 - // characters long and match the regular expression - // [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a - // lowercase letter, and all following characters must be a dash, - // lowercase letter, or digit, except the last character, which cannot - // be a dash. - Name string `json:"name,omitempty"` - - // NetworkInterfaces: An array of configurations for this interface. - // This specifies how this interface is configured to interact with - // other network services, such as connecting to the internet. Only one - // interface is supported per instance. - NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` - - // Scheduling: Sets the scheduling options for this instance. - Scheduling *Scheduling `json:"scheduling,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServiceAccounts: A list of service accounts, with their specified - // scopes, authorized for this instance. Only one service account per VM - // instance is supported. - // - // Service accounts generate access tokens that can be accessed through - // the metadata server and used to authenticate applications on the - // instance. See Service Accounts for more information. - ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"` - - // StartRestricted: [Output Only] Whether a VM has been restricted for - // start because Compute Engine has detected suspicious activity. - StartRestricted bool `json:"startRestricted,omitempty"` - - // Status: [Output Only] The status of the instance. One of the - // following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, - // SUSPENDING, SUSPENDED, and TERMINATED. - // - // Possible values: - // "PROVISIONING" - // "RUNNING" - // "STAGING" - // "STOPPED" - // "STOPPING" - // "SUSPENDED" - // "SUSPENDING" - // "TERMINATED" - Status string `json:"status,omitempty"` - - // StatusMessage: [Output Only] An optional, human-readable explanation - // of the status. - StatusMessage string `json:"statusMessage,omitempty"` - - // Tags: A list of tags to apply to this instance. Tags are used to - // identify valid sources or targets for network firewalls and are - // specified by the client during instance creation. The tags can be - // later modified by the setTags method. Each tag within the list must - // comply with RFC1035. - Tags *Tags `json:"tags,omitempty"` - - // Zone: [Output Only] URL of the zone where the instance resides. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CanIpForward") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CanIpForward") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Instance) MarshalJSON() ([]byte, error) { - type noMethod Instance - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InstancesScopedList resources. - Items map[string]InstancesScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#instanceAggregatedList for aggregated lists of Instance - // resources. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod InstanceAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroup struct { - // CreationTimestamp: [Output Only] The creation timestamp for this - // instance group in RFC3339 text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Fingerprint: [Output Only] The fingerprint of the named ports. The - // system uses this fingerprint to detect conflicts when multiple users - // change the named ports concurrently. - Fingerprint string `json:"fingerprint,omitempty"` - - // Id: [Output Only] A unique identifier for this instance group, - // generated by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] The resource type, which is always - // compute#instanceGroup for instance groups. - Kind string `json:"kind,omitempty"` - - // Name: The name of the instance group. The name must be 1-63 - // characters long, and comply with RFC1035. - Name string `json:"name,omitempty"` - - // NamedPorts: Assigns a name to a port number. For example: {name: - // "http", port: 80} - // - // This allows the system to reference ports by the assigned name - // instead of a port number. Named ports can also contain multiple - // ports. For example: [{name: "http", port: 80},{name: "http", port: - // 8080}] - // - // Named ports apply to all instances in this instance group. - NamedPorts []*NamedPort `json:"namedPorts,omitempty"` - - // Network: The URL of the network to which all instances in the - // instance group belong. - Network string `json:"network,omitempty"` - - // Region: The URL of the region where the instance group is located - // (for regional resources). - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] The URL for this instance group. The server - // generates this URL. - SelfLink string `json:"selfLink,omitempty"` - - // Size: [Output Only] The total number of instances in the instance - // group. - Size int64 `json:"size,omitempty"` - - // Subnetwork: The URL of the subnetwork to which all instances in the - // instance group belong. - Subnetwork string `json:"subnetwork,omitempty"` - - // Zone: [Output Only] The URL of the zone where the instance group is - // located (for zonal resources). - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroup) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroup - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InstanceGroupsScopedList resources. - Items map[string]InstanceGroupsScopedList `json:"items,omitempty"` - - // Kind: [Output Only] The resource type, which is always - // compute#instanceGroupAggregatedList for aggregated lists of instance - // groups. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceGroupList: A list of InstanceGroup resources. -type InstanceGroupList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InstanceGroup resources. - Items []*InstanceGroup `json:"items,omitempty"` - - // Kind: [Output Only] The resource type, which is always - // compute#instanceGroupList for instance group lists. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupList) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManager: An Instance Group Manager resource. -type InstanceGroupManager struct { - // BaseInstanceName: The base instance name to use for instances in this - // group. The value must be 1-58 characters long. Instances are named by - // appending a hyphen and a random four-character string to the base - // instance name. The base instance name must comply with RFC1035. - BaseInstanceName string `json:"baseInstanceName,omitempty"` - - // CreationTimestamp: [Output Only] The creation timestamp for this - // managed instance group in RFC3339 text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // CurrentActions: [Output Only] The list of instance actions and the - // number of instances in this managed instance group that are scheduled - // for each of those actions. - CurrentActions *InstanceGroupManagerActionsSummary `json:"currentActions,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Fingerprint: [Output Only] The fingerprint of the resource data. You - // can use this optional field for optimistic locking when you update - // the resource. - Fingerprint string `json:"fingerprint,omitempty"` - - // Id: [Output Only] A unique identifier for this resource type. The - // server generates this identifier. - Id uint64 `json:"id,omitempty,string"` - - // InstanceGroup: [Output Only] The URL of the Instance Group resource. - InstanceGroup string `json:"instanceGroup,omitempty"` - - // InstanceTemplate: The URL of the instance template that is specified - // for this managed instance group. The group uses this template to - // create all new instances in the managed instance group. - InstanceTemplate string `json:"instanceTemplate,omitempty"` - - // Kind: [Output Only] The resource type, which is always - // compute#instanceGroupManager for managed instance groups. - Kind string `json:"kind,omitempty"` - - // Name: The name of the managed instance group. The name must be 1-63 - // characters long, and comply with RFC1035. - Name string `json:"name,omitempty"` - - // NamedPorts: Named ports configured for the Instance Groups - // complementary to this Instance Group Manager. - NamedPorts []*NamedPort `json:"namedPorts,omitempty"` - - // Region: [Output Only] The URL of the region where the managed - // instance group resides (for regional resources). - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] The URL for this managed instance group. The - // server defines this URL. - SelfLink string `json:"selfLink,omitempty"` - - // TargetPools: The URLs for all TargetPool resources to which instances - // in the instanceGroup field are added. The target pools automatically - // apply to all of the instances in the managed instance group. - TargetPools []string `json:"targetPools,omitempty"` - - // TargetSize: The target number of running instances for this managed - // instance group. Deleting or abandoning instances reduces this number. - // Resizing the group changes this number. - TargetSize int64 `json:"targetSize,omitempty"` - - // Zone: [Output Only] The URL of the zone where the managed instance - // group is located (for zonal resources). - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "BaseInstanceName") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BaseInstanceName") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManager) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManager - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerActionsSummary struct { - // Abandoning: [Output Only] The total number of instances in the - // managed instance group that are scheduled to be abandoned. Abandoning - // an instance removes it from the managed instance group without - // deleting it. - Abandoning int64 `json:"abandoning,omitempty"` - - // Creating: [Output Only] The number of instances in the managed - // instance group that are scheduled to be created or are currently - // being created. If the group fails to create any of these instances, - // it tries again until it creates the instance successfully. - // - // If you have disabled creation retries, this field will not be - // populated; instead, the creatingWithoutRetries field will be - // populated. - Creating int64 `json:"creating,omitempty"` - - // CreatingWithoutRetries: [Output Only] The number of instances that - // the managed instance group will attempt to create. The group attempts - // to create each instance only once. If the group fails to create any - // of these instances, it decreases the group's targetSize value - // accordingly. - CreatingWithoutRetries int64 `json:"creatingWithoutRetries,omitempty"` - - // Deleting: [Output Only] The number of instances in the managed - // instance group that are scheduled to be deleted or are currently - // being deleted. - Deleting int64 `json:"deleting,omitempty"` - - // None: [Output Only] The number of instances in the managed instance - // group that are running and have no scheduled actions. - None int64 `json:"none,omitempty"` - - // Recreating: [Output Only] The number of instances in the managed - // instance group that are scheduled to be recreated or are currently - // being being recreated. Recreating an instance deletes the existing - // root persistent disk and creates a new disk from the image that is - // defined in the instance template. - Recreating int64 `json:"recreating,omitempty"` - - // Refreshing: [Output Only] The number of instances in the managed - // instance group that are being reconfigured with properties that do - // not require a restart or a recreate action. For example, setting or - // removing target pools for the instance. - Refreshing int64 `json:"refreshing,omitempty"` - - // Restarting: [Output Only] The number of instances in the managed - // instance group that are scheduled to be restarted or are currently - // being restarted. - Restarting int64 `json:"restarting,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Abandoning") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Abandoning") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagerActionsSummary) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagerActionsSummary - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InstanceGroupManagersScopedList resources. - Items map[string]InstanceGroupManagersScopedList `json:"items,omitempty"` - - // Kind: [Output Only] The resource type, which is always - // compute#instanceGroupManagerAggregatedList for an aggregated list of - // managed instance groups. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagerAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagerAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagerList: [Output Only] A list of managed instance -// groups. -type InstanceGroupManagerList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InstanceGroupManager resources. - Items []*InstanceGroupManager `json:"items,omitempty"` - - // Kind: [Output Only] The resource type, which is always - // compute#instanceGroupManagerList for a list of managed instance - // groups. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagerList) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagerList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersAbandonInstancesRequest struct { - // Instances: The URLs of one or more instances to abandon. This can be - // a full URL or a partial URL, such as - // zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersAbandonInstancesRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersAbandonInstancesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersDeleteInstancesRequest struct { - // Instances: The URLs of one or more instances to delete. This can be a - // full URL or a partial URL, such as - // zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersDeleteInstancesRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersDeleteInstancesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersListManagedInstancesResponse struct { - // ManagedInstances: [Output Only] The list of instances in the managed - // instance group. - ManagedInstances []*ManagedInstance `json:"managedInstances,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ManagedInstances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ManagedInstances") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersListManagedInstancesResponse) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersListManagedInstancesResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersRecreateInstancesRequest struct { - // Instances: The URLs of one or more instances to recreate. This can be - // a full URL or a partial URL, such as - // zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersRecreateInstancesRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersRecreateInstancesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersScopedList struct { - // InstanceGroupManagers: [Output Only] The list of managed instance - // groups that are contained in the specified project and zone. - InstanceGroupManagers []*InstanceGroupManager `json:"instanceGroupManagers,omitempty"` - - // Warning: [Output Only] The warning that replaces the list of managed - // instance groups when the list is empty. - Warning *InstanceGroupManagersScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "InstanceGroupManagers") to unconditionally include in API requests. - // By default, fields with empty values are omitted from API requests. - // However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "InstanceGroupManagers") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersScopedList) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagersScopedListWarning: [Output Only] The warning -// that replaces the list of managed instance groups when the list is -// empty. -type InstanceGroupManagersScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*InstanceGroupManagersScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersSetInstanceTemplateRequest struct { - // InstanceTemplate: The URL of the instance template that is specified - // for this managed instance group. The group uses this template to - // create all new instances in the managed instance group. - InstanceTemplate string `json:"instanceTemplate,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InstanceTemplate") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "InstanceTemplate") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersSetInstanceTemplateRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersSetInstanceTemplateRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersSetTargetPoolsRequest struct { - // Fingerprint: The fingerprint of the target pools information. Use - // this optional property to prevent conflicts when multiple users - // change the target pools settings concurrently. Obtain the fingerprint - // with the instanceGroupManagers.get method. Then, include the - // fingerprint in your request to ensure that you do not overwrite - // changes that were applied from another concurrent request. - Fingerprint string `json:"fingerprint,omitempty"` - - // TargetPools: The list of target pool URLs that instances in this - // managed instance group belong to. The managed instance group applies - // these target pools to all of the instances in the group. Existing - // instances and new instances in the group all receive these target - // pool settings. - TargetPools []string `json:"targetPools,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Fingerprint") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupManagersSetTargetPoolsRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupManagersSetTargetPoolsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsAddInstancesRequest struct { - // Instances: The list of instances to add to the instance group. - Instances []*InstanceReference `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupsAddInstancesRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupsAddInstancesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsListInstances struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InstanceWithNamedPorts resources. - Items []*InstanceWithNamedPorts `json:"items,omitempty"` - - // Kind: [Output Only] The resource type, which is always - // compute#instanceGroupsListInstances for the list of instances in the - // specified instance group. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupsListInstances) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupsListInstances - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsListInstancesRequest struct { - // InstanceState: A filter for the state of the instances in the - // instance group. Valid options are ALL or RUNNING. If you do not - // specify this parameter the list includes all instances regardless of - // their state. - // - // Possible values: - // "ALL" - // "RUNNING" - InstanceState string `json:"instanceState,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InstanceState") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "InstanceState") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupsListInstancesRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupsListInstancesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsRemoveInstancesRequest struct { - // Instances: The list of instances to remove from the instance group. - Instances []*InstanceReference `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupsRemoveInstancesRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupsRemoveInstancesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsScopedList struct { - // InstanceGroups: [Output Only] The list of instance groups that are - // contained in this scope. - InstanceGroups []*InstanceGroup `json:"instanceGroups,omitempty"` - - // Warning: [Output Only] An informational warning that replaces the - // list of instance groups when the list is empty. - Warning *InstanceGroupsScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InstanceGroups") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "InstanceGroups") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupsScopedList) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupsScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceGroupsScopedListWarning: [Output Only] An informational -// warning that replaces the list of instance groups when the list is -// empty. -type InstanceGroupsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*InstanceGroupsScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupsScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupsScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupsScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupsScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsSetNamedPortsRequest struct { - // Fingerprint: The fingerprint of the named ports information for this - // instance group. Use this optional property to prevent conflicts when - // multiple users change the named ports settings concurrently. Obtain - // the fingerprint with the instanceGroups.get method. Then, include the - // fingerprint in your request to ensure that you do not overwrite - // changes that were applied from another concurrent request. - Fingerprint string `json:"fingerprint,omitempty"` - - // NamedPorts: The list of named ports to set for this instance group. - NamedPorts []*NamedPort `json:"namedPorts,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Fingerprint") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceGroupsSetNamedPortsRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceGroupsSetNamedPortsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceList: Contains a list of instances. -type InstanceList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Instance resources. - Items []*Instance `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#instanceList for - // lists of Instance resources. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceList) MarshalJSON() ([]byte, error) { - type noMethod InstanceList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceMoveRequest struct { - // DestinationZone: The URL of the destination zone to move the - // instance. This can be a full or partial URL. For example, the - // following are all valid URLs to a zone: - // - https://www.googleapis.com/compute/v1/projects/project/zones/zone - // - // - projects/project/zones/zone - // - zones/zone - DestinationZone string `json:"destinationZone,omitempty"` - - // TargetInstance: The URL of the target instance to move. This can be a - // full or partial URL. For example, the following are all valid URLs to - // an instance: - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance - // - projects/project/zones/zone/instances/instance - // - zones/zone/instances/instance - TargetInstance string `json:"targetInstance,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DestinationZone") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DestinationZone") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstanceMoveRequest) MarshalJSON() ([]byte, error) { - type noMethod InstanceMoveRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceProperties struct { - // CanIpForward: Enables instances created based on this template to - // send packets with source IP addresses other than their own and - // receive packets with destination IP addresses other than their own. - // If these instances will be used as an IP gateway or it will be set as - // the next-hop in a Route resource, specify true. If unsure, leave this - // set to false. See the Enable IP forwarding documentation for more - // information. - CanIpForward bool `json:"canIpForward,omitempty"` - - // Description: An optional text description for the instances that are - // created from this instance template. - Description string `json:"description,omitempty"` - - // Disks: An array of disks that are associated with the instances that - // are created from this template. - Disks []*AttachedDisk `json:"disks,omitempty"` - - // GuestAccelerators: A list of guest accelerator cards' type and count - // to use for instances created from the instance template. - GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` - - // Labels: Labels to apply to instances that are created from this - // template. - Labels map[string]string `json:"labels,omitempty"` - - // MachineType: The machine type to use for instances that are created - // from this template. - MachineType string `json:"machineType,omitempty"` - - // Metadata: The metadata key/value pairs to assign to instances that - // are created from this template. These pairs can consist of custom - // metadata or predefined keys. See Project and instance metadata for - // more information. - Metadata *Metadata `json:"metadata,omitempty"` - - // NetworkInterfaces: An array of network access configurations for this - // interface. - NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` - - // Scheduling: Specifies the scheduling options for the instances that - // are created from this template. - Scheduling *Scheduling `json:"scheduling,omitempty"` - - // ServiceAccounts: A list of service accounts with specified scopes. - // Access tokens for these service accounts are available to the - // instances that are created from this template. Use metadata queries - // to obtain the access tokens for these instances. - ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"` - - // Tags: A list of tags to apply to the instances that are created from - // this template. The tags identify valid sources or targets for network - // firewalls. The setTags method can modify this list of tags. Each tag - // within the list must comply with RFC1035. - Tags *Tags `json:"tags,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CanIpForward") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CanIpForward") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceProperties) MarshalJSON() ([]byte, error) { - type noMethod InstanceProperties - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceReference struct { - // Instance: The URL for a specific instance. - Instance string `json:"instance,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instance") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instance") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceReference) MarshalJSON() ([]byte, error) { - type noMethod InstanceReference - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceTemplate: An Instance Template resource. -type InstanceTemplate struct { - // CreationTimestamp: [Output Only] The creation timestamp for this - // instance template in RFC3339 text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] A unique identifier for this instance template. The - // server defines this identifier. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] The resource type, which is always - // compute#instanceTemplate for instance templates. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource; provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Properties: The instance properties for this instance template. - Properties *InstanceProperties `json:"properties,omitempty"` - - // SelfLink: [Output Only] The URL for this instance template. The - // server defines this URL. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstanceTemplate) MarshalJSON() ([]byte, error) { - type noMethod InstanceTemplate - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstanceTemplateList: A list of instance templates. -type InstanceTemplateList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InstanceTemplate resources. - Items []*InstanceTemplate `json:"items,omitempty"` - - // Kind: [Output Only] The resource type, which is always - // compute#instanceTemplatesListResponse for instance template lists. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceTemplateList) MarshalJSON() ([]byte, error) { - type noMethod InstanceTemplateList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceWithNamedPorts struct { - // Instance: [Output Only] The URL of the instance. - Instance string `json:"instance,omitempty"` - - // NamedPorts: [Output Only] The named ports that belong to this - // instance group. - NamedPorts []*NamedPort `json:"namedPorts,omitempty"` - - // Status: [Output Only] The status of the instance. - // - // Possible values: - // "PROVISIONING" - // "RUNNING" - // "STAGING" - // "STOPPED" - // "STOPPING" - // "SUSPENDED" - // "SUSPENDING" - // "TERMINATED" - Status string `json:"status,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instance") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instance") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstanceWithNamedPorts) MarshalJSON() ([]byte, error) { - type noMethod InstanceWithNamedPorts - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstancesScopedList struct { - // Instances: [Output Only] List of instances contained in this scope. - Instances []*Instance `json:"instances,omitempty"` - - // Warning: [Output Only] Informational warning which replaces the list - // of instances when the list is empty. - Warning *InstancesScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstancesScopedList) MarshalJSON() ([]byte, error) { - type noMethod InstancesScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InstancesScopedListWarning: [Output Only] Informational warning which -// replaces the list of instances when the list is empty. -type InstancesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*InstancesScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstancesScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod InstancesScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstancesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstancesScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod InstancesScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstancesSetLabelsRequest struct { - // LabelFingerprint: Fingerprint of the previous set of labels for this - // resource, used to prevent conflicts. Provide the latest fingerprint - // value when making a request to add or change labels. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - Labels map[string]string `json:"labels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LabelFingerprint") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "LabelFingerprint") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstancesSetLabelsRequest) MarshalJSON() ([]byte, error) { - type noMethod InstancesSetLabelsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstancesSetMachineResourcesRequest struct { - // GuestAccelerators: List of the type and count of accelerator cards - // attached to the instance. - GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` - - // ForceSendFields is a list of field names (e.g. "GuestAccelerators") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "GuestAccelerators") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InstancesSetMachineResourcesRequest) MarshalJSON() ([]byte, error) { - type noMethod InstancesSetMachineResourcesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstancesSetMachineTypeRequest struct { - // MachineType: Full or partial URL of the machine type resource. See - // Machine Types for a full list of machine types. For example: - // zones/us-central1-f/machineTypes/n1-standard-1 - MachineType string `json:"machineType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MachineType") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "MachineType") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstancesSetMachineTypeRequest) MarshalJSON() ([]byte, error) { - type noMethod InstancesSetMachineTypeRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstancesSetServiceAccountRequest struct { - // Email: Email address of the service account. - Email string `json:"email,omitempty"` - - // Scopes: The list of scopes to be made available for this service - // account. - Scopes []string `json:"scopes,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Email") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Email") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstancesSetServiceAccountRequest) MarshalJSON() ([]byte, error) { - type noMethod InstancesSetServiceAccountRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstancesStartWithEncryptionKeyRequest struct { - // Disks: Array of disks associated with this instance that are - // protected with a customer-supplied encryption key. - // - // In order to start the instance, the disk url and its corresponding - // key must be provided. - // - // If the disk is not protected with a customer-supplied encryption key - // it should not be specified. - Disks []*CustomerEncryptionKeyProtectedDisk `json:"disks,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Disks") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Disks") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InstancesStartWithEncryptionKeyRequest) MarshalJSON() ([]byte, error) { - type noMethod InstancesStartWithEncryptionKeyRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// License: A license resource. -type License struct { - // ChargesUseFee: [Output Only] Deprecated. This field no longer - // reflects whether a license charges a usage fee. - ChargesUseFee bool `json:"chargesUseFee,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#license for - // licenses. - Kind string `json:"kind,omitempty"` - - // Name: [Output Only] Name of the resource. The name is 1-63 characters - // long and complies with RFC1035. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ChargesUseFee") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ChargesUseFee") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *License) MarshalJSON() ([]byte, error) { - type noMethod License - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// MachineType: A Machine Type resource. -type MachineType struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Deprecated: [Output Only] The deprecation status associated with this - // machine type. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - - // Description: [Output Only] An optional textual description of the - // resource. - Description string `json:"description,omitempty"` - - // GuestCpus: [Output Only] The number of virtual CPUs that are - // available to the instance. - GuestCpus int64 `json:"guestCpus,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // ImageSpaceGb: [Deprecated] This property is deprecated and will never - // be populated with any relevant values. - ImageSpaceGb int64 `json:"imageSpaceGb,omitempty"` - - // IsSharedCpu: [Output Only] Whether this machine type has a shared - // CPU. See Shared-core machine types for more information. - IsSharedCpu bool `json:"isSharedCpu,omitempty"` - - // Kind: [Output Only] The type of the resource. Always - // compute#machineType for machine types. - Kind string `json:"kind,omitempty"` - - // MaximumPersistentDisks: [Output Only] Maximum persistent disks - // allowed. - MaximumPersistentDisks int64 `json:"maximumPersistentDisks,omitempty"` - - // MaximumPersistentDisksSizeGb: [Output Only] Maximum total persistent - // disks size (GB) allowed. - MaximumPersistentDisksSizeGb int64 `json:"maximumPersistentDisksSizeGb,omitempty,string"` - - // MemoryMb: [Output Only] The amount of physical memory available to - // the instance, defined in MB. - MemoryMb int64 `json:"memoryMb,omitempty"` - - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - - // ScratchDisks: [Output Only] List of extended scratch disks assigned - // to the instance. - ScratchDisks []*MachineTypeScratchDisks `json:"scratchDisks,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Zone: [Output Only] The name of the zone where the machine type - // resides, such as us-central1-a. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *MachineType) MarshalJSON() ([]byte, error) { - type noMethod MachineType - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type MachineTypeScratchDisks struct { - // DiskGb: Size of the scratch disk, defined in GB. - DiskGb int64 `json:"diskGb,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DiskGb") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DiskGb") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *MachineTypeScratchDisks) MarshalJSON() ([]byte, error) { - type noMethod MachineTypeScratchDisks - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type MachineTypeAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of MachineTypesScopedList resources. - Items map[string]MachineTypesScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#machineTypeAggregatedList for aggregated lists of machine - // types. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *MachineTypeAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod MachineTypeAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// MachineTypeList: Contains a list of machine types. -type MachineTypeList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of MachineType resources. - Items []*MachineType `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#machineTypeList - // for lists of machine types. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *MachineTypeList) MarshalJSON() ([]byte, error) { - type noMethod MachineTypeList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type MachineTypesScopedList struct { - // MachineTypes: [Output Only] List of machine types contained in this - // scope. - MachineTypes []*MachineType `json:"machineTypes,omitempty"` - - // Warning: [Output Only] An informational warning that appears when the - // machine types list is empty. - Warning *MachineTypesScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MachineTypes") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "MachineTypes") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *MachineTypesScopedList) MarshalJSON() ([]byte, error) { - type noMethod MachineTypesScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// MachineTypesScopedListWarning: [Output Only] An informational warning -// that appears when the machine types list is empty. -type MachineTypesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*MachineTypesScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *MachineTypesScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod MachineTypesScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type MachineTypesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *MachineTypesScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod MachineTypesScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ManagedInstance struct { - // CurrentAction: [Output Only] The current action that the managed - // instance group has scheduled for the instance. Possible values: - // - NONE The instance is running, and the managed instance group does - // not have any scheduled actions for this instance. - // - CREATING The managed instance group is creating this instance. If - // the group fails to create this instance, it will try again until it - // is successful. - // - CREATING_WITHOUT_RETRIES The managed instance group is attempting - // to create this instance only once. If the group fails to create this - // instance, it does not try again and the group's targetSize value is - // decreased instead. - // - RECREATING The managed instance group is recreating this instance. - // - // - DELETING The managed instance group is permanently deleting this - // instance. - // - ABANDONING The managed instance group is abandoning this instance. - // The instance will be removed from the instance group and from any - // target pools that are associated with this group. - // - RESTARTING The managed instance group is restarting the instance. - // - // - REFRESHING The managed instance group is applying configuration - // changes to the instance without stopping it. For example, the group - // can update the target pool list for an instance without stopping that - // instance. - // - // Possible values: - // "ABANDONING" - // "CREATING" - // "CREATING_WITHOUT_RETRIES" - // "DELETING" - // "NONE" - // "RECREATING" - // "REFRESHING" - // "RESTARTING" - CurrentAction string `json:"currentAction,omitempty"` - - // Id: [Output only] The unique identifier for this resource. This field - // is empty when instance does not exist. - Id uint64 `json:"id,omitempty,string"` - - // Instance: [Output Only] The URL of the instance. The URL can exist - // even if the instance has not yet been created. - Instance string `json:"instance,omitempty"` - - // InstanceStatus: [Output Only] The status of the instance. This field - // is empty when the instance does not exist. - // - // Possible values: - // "PROVISIONING" - // "RUNNING" - // "STAGING" - // "STOPPED" - // "STOPPING" - // "SUSPENDED" - // "SUSPENDING" - // "TERMINATED" - InstanceStatus string `json:"instanceStatus,omitempty"` - - // LastAttempt: [Output Only] Information about the last attempt to - // create or delete the instance. - LastAttempt *ManagedInstanceLastAttempt `json:"lastAttempt,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CurrentAction") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CurrentAction") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ManagedInstance) MarshalJSON() ([]byte, error) { - type noMethod ManagedInstance - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ManagedInstanceLastAttempt struct { - // Errors: [Output Only] Encountered errors during the last attempt to - // create or delete the instance. - Errors *ManagedInstanceLastAttemptErrors `json:"errors,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Errors") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ManagedInstanceLastAttempt) MarshalJSON() ([]byte, error) { - type noMethod ManagedInstanceLastAttempt - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ManagedInstanceLastAttemptErrors: [Output Only] Encountered errors -// during the last attempt to create or delete the instance. -type ManagedInstanceLastAttemptErrors struct { - // Errors: [Output Only] The array of errors encountered while - // processing this operation. - Errors []*ManagedInstanceLastAttemptErrorsErrors `json:"errors,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Errors") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ManagedInstanceLastAttemptErrors) MarshalJSON() ([]byte, error) { - type noMethod ManagedInstanceLastAttemptErrors - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ManagedInstanceLastAttemptErrorsErrors struct { - // Code: [Output Only] The error type identifier for this error. - Code string `json:"code,omitempty"` - - // Location: [Output Only] Indicates the field in the request that - // caused the error. This property is optional. - Location string `json:"location,omitempty"` - - // Message: [Output Only] An optional, human-readable error message. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ManagedInstanceLastAttemptErrorsErrors) MarshalJSON() ([]byte, error) { - type noMethod ManagedInstanceLastAttemptErrorsErrors - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Metadata: A metadata key/value entry. -type Metadata struct { - // Fingerprint: Specifies a fingerprint for this request, which is - // essentially a hash of the metadata's contents and used for optimistic - // locking. The fingerprint is initially generated by Compute Engine and - // changes after every request to modify or update metadata. You must - // always provide an up-to-date fingerprint hash in order to update or - // change metadata. - Fingerprint string `json:"fingerprint,omitempty"` - - // Items: Array of key/value pairs. The total size of all keys and - // values must be less than 512 KB. - Items []*MetadataItems `json:"items,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#metadata for - // metadata. - Kind string `json:"kind,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Fingerprint") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Metadata) MarshalJSON() ([]byte, error) { - type noMethod Metadata - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type MetadataItems struct { - // Key: Key for the metadata entry. Keys must conform to the following - // regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is - // reflected as part of a URL in the metadata server. Additionally, to - // avoid ambiguity, keys must not conflict with any other metadata keys - // for the project. - Key string `json:"key,omitempty"` - - // Value: Value for the metadata entry. These are free-form strings, and - // only have meaning as interpreted by the image running in the - // instance. The only restriction placed on values is that their size - // must be less than or equal to 262144 bytes (256 KiB). - Value *string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *MetadataItems) MarshalJSON() ([]byte, error) { - type noMethod MetadataItems - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// NamedPort: The named port. For example: . -type NamedPort struct { - // Name: The name for this named port. The name must be 1-63 characters - // long, and comply with RFC1035. - Name string `json:"name,omitempty"` - - // Port: The port number, which can be a value between 1 and 65535. - Port int64 `json:"port,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Name") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *NamedPort) MarshalJSON() ([]byte, error) { - type noMethod NamedPort - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Network: Represents a Network resource. Read Networks and Firewalls -// for more information. -type Network struct { - // IPv4Range: The range of internal addresses that are legal on this - // network. This range is a CIDR specification, for example: - // 192.168.0.0/16. Provided by the client when the network is created. - IPv4Range string `json:"IPv4Range,omitempty"` - - // AutoCreateSubnetworks: When set to true, the network is created in - // "auto subnet mode". When set to false, the network is in "custom - // subnet mode". - // - // In "auto subnet mode", a newly created network is assigned the - // default CIDR of 10.128.0.0/9 and it automatically creates one - // subnetwork per region. - AutoCreateSubnetworks bool `json:"autoCreateSubnetworks,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // GatewayIPv4: A gateway address for default routing to other networks. - // This value is read only and is selected by the Google Compute Engine, - // typically as the first usable address in the IPv4Range. - GatewayIPv4 string `json:"gatewayIPv4,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#network for - // networks. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Peerings: [Output Only] List of network peerings for the resource. - Peerings []*NetworkPeering `json:"peerings,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Subnetworks: [Output Only] Server-defined fully-qualified URLs for - // all subnetworks in this network. - Subnetworks []string `json:"subnetworks,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "IPv4Range") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IPv4Range") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Network) MarshalJSON() ([]byte, error) { - type noMethod Network - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// NetworkInterface: A network interface resource attached to an -// instance. -type NetworkInterface struct { - // AccessConfigs: An array of configurations for this interface. - // Currently, only one access config, ONE_TO_ONE_NAT, is supported. If - // there are no accessConfigs specified, then this instance will have no - // external internet access. - AccessConfigs []*AccessConfig `json:"accessConfigs,omitempty"` - - // AliasIpRanges: An array of alias IP ranges for this network - // interface. Can only be specified for network interfaces on - // subnet-mode networks. - AliasIpRanges []*AliasIpRange `json:"aliasIpRanges,omitempty"` - - // Kind: [Output Only] Type of the resource. Always - // compute#networkInterface for network interfaces. - Kind string `json:"kind,omitempty"` - - // Name: [Output Only] The name of the network interface, generated by - // the server. For network devices, these are eth0, eth1, etc. - Name string `json:"name,omitempty"` - - // Network: URL of the network resource for this instance. When creating - // an instance, if neither the network nor the subnetwork is specified, - // the default network global/networks/default is used; if the network - // is not specified but the subnetwork is specified, the network is - // inferred. - // - // This field is optional when creating a firewall rule. If not - // specified when creating a firewall rule, the default network - // global/networks/default is used. - // - // If you specify this property, you can specify the network as a full - // or partial URL. For example, the following are all valid URLs: - // - - // https://www.googleapis.com/compute/v1/projects/project/global/networks/network - // - projects/project/global/networks/network - // - global/networks/default - Network string `json:"network,omitempty"` - - // NetworkIP: An IPv4 internal network address to assign to the instance - // for this network interface. If not specified by the user, an unused - // internal IP is assigned by the system. - NetworkIP string `json:"networkIP,omitempty"` - - // Subnetwork: The URL of the Subnetwork resource for this instance. If - // the network resource is in legacy mode, do not provide this property. - // If the network is in auto subnet mode, providing the subnetwork is - // optional. If the network is in custom subnet mode, then this field - // should be specified. If you specify this property, you can specify - // the subnetwork as a full or partial URL. For example, the following - // are all valid URLs: - // - - // https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork - // - regions/region/subnetworks/subnetwork - Subnetwork string `json:"subnetwork,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AccessConfigs") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AccessConfigs") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *NetworkInterface) MarshalJSON() ([]byte, error) { - type noMethod NetworkInterface - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// NetworkList: Contains a list of networks. -type NetworkList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Network resources. - Items []*Network `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#networkList for - // lists of networks. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *NetworkList) MarshalJSON() ([]byte, error) { - type noMethod NetworkList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// NetworkPeering: A network peering attached to a network resource. The -// message includes the peering name, peer network, peering state, and a -// flag indicating whether Google Compute Engine should automatically -// create routes for the peering. -type NetworkPeering struct { - // AutoCreateRoutes: Whether full mesh connectivity is created and - // managed automatically. When it is set to true, Google Compute Engine - // will automatically create and manage the routes between two networks - // when the state is ACTIVE. Otherwise, user needs to create routes - // manually to route packets to peer network. - AutoCreateRoutes bool `json:"autoCreateRoutes,omitempty"` - - // Name: Name of this peering. Provided by the client when the peering - // is created. The name must comply with RFC1035. Specifically, the name - // must be 1-63 characters long and match regular expression - // [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a - // lowercase letter, and all the following characters must be a dash, - // lowercase letter, or digit, except the last character, which cannot - // be a dash. - Name string `json:"name,omitempty"` - - // Network: The URL of the peer network. It can be either full URL or - // partial URL. The peer network may belong to a different project. If - // the partial URL does not contain project, it is assumed that the peer - // network is in the same project as the current network. - Network string `json:"network,omitempty"` - - // State: [Output Only] State for the peering. - // - // Possible values: - // "ACTIVE" - // "INACTIVE" - State string `json:"state,omitempty"` - - // StateDetails: [Output Only] Details about the current state of the - // peering. - StateDetails string `json:"stateDetails,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AutoCreateRoutes") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AutoCreateRoutes") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *NetworkPeering) MarshalJSON() ([]byte, error) { - type noMethod NetworkPeering - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type NetworksAddPeeringRequest struct { - // AutoCreateRoutes: Whether Google Compute Engine manages the routes - // automatically. - AutoCreateRoutes bool `json:"autoCreateRoutes,omitempty"` - - // Name: Name of the peering, which should conform to RFC1035. - Name string `json:"name,omitempty"` - - // PeerNetwork: URL of the peer network. It can be either full URL or - // partial URL. The peer network may belong to a different project. If - // the partial URL does not contain project, it is assumed that the peer - // network is in the same project as the current network. - PeerNetwork string `json:"peerNetwork,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AutoCreateRoutes") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AutoCreateRoutes") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *NetworksAddPeeringRequest) MarshalJSON() ([]byte, error) { - type noMethod NetworksAddPeeringRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type NetworksRemovePeeringRequest struct { - // Name: Name of the peering, which should conform to RFC1035. - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Name") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *NetworksRemovePeeringRequest) MarshalJSON() ([]byte, error) { - type noMethod NetworksRemovePeeringRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Operation: An Operation resource, used to manage asynchronous API -// requests. -type Operation struct { - // ClientOperationId: [Output Only] Reserved for future use. - ClientOperationId string `json:"clientOperationId,omitempty"` - - // CreationTimestamp: [Deprecated] This field is deprecated. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: [Output Only] A textual description of the operation, - // which is set when the operation is created. - Description string `json:"description,omitempty"` - - // EndTime: [Output Only] The time that this operation was completed. - // This value is in RFC3339 text format. - EndTime string `json:"endTime,omitempty"` - - // Error: [Output Only] If errors are generated during processing of the - // operation, this field will be populated. - Error *OperationError `json:"error,omitempty"` - - // HttpErrorMessage: [Output Only] If the operation fails, this field - // contains the HTTP error message that was returned, such as NOT FOUND. - HttpErrorMessage string `json:"httpErrorMessage,omitempty"` - - // HttpErrorStatusCode: [Output Only] If the operation fails, this field - // contains the HTTP error status code that was returned. For example, a - // 404 means the resource was not found. - HttpErrorStatusCode int64 `json:"httpErrorStatusCode,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // InsertTime: [Output Only] The time that this operation was requested. - // This value is in RFC3339 text format. - InsertTime string `json:"insertTime,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#operation - // for Operation resources. - Kind string `json:"kind,omitempty"` - - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - - // OperationType: [Output Only] The type of operation, such as insert, - // update, or delete, and so on. - OperationType string `json:"operationType,omitempty"` - - // Progress: [Output Only] An optional progress indicator that ranges - // from 0 to 100. There is no requirement that this be linear or support - // any granularity of operations. This should not be used to guess when - // the operation will be complete. This number should monotonically - // increase as the operation progresses. - Progress int64 `json:"progress,omitempty"` - - // Region: [Output Only] The URL of the region where the operation - // resides. Only available when performing regional operations. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // StartTime: [Output Only] The time that this operation was started by - // the server. This value is in RFC3339 text format. - StartTime string `json:"startTime,omitempty"` - - // Status: [Output Only] The status of the operation, which can be one - // of the following: PENDING, RUNNING, or DONE. - // - // Possible values: - // "DONE" - // "PENDING" - // "RUNNING" - Status string `json:"status,omitempty"` - - // StatusMessage: [Output Only] An optional textual description of the - // current status of the operation. - StatusMessage string `json:"statusMessage,omitempty"` - - // TargetId: [Output Only] The unique target ID, which identifies a - // specific incarnation of the target resource. - TargetId uint64 `json:"targetId,omitempty,string"` - - // TargetLink: [Output Only] The URL of the resource that the operation - // modifies. For operations related to creating a snapshot, this points - // to the persistent disk that the snapshot was created from. - TargetLink string `json:"targetLink,omitempty"` - - // User: [Output Only] User who requested the operation, for example: - // user@example.com. - User string `json:"user,omitempty"` - - // Warnings: [Output Only] If warning messages are generated during - // processing of the operation, this field will be populated. - Warnings []*OperationWarnings `json:"warnings,omitempty"` - - // Zone: [Output Only] The URL of the zone where the operation resides. - // Only available when performing per-zone operations. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ClientOperationId") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ClientOperationId") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Operation) MarshalJSON() ([]byte, error) { - type noMethod Operation - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// OperationError: [Output Only] If errors are generated during -// processing of the operation, this field will be populated. -type OperationError struct { - // Errors: [Output Only] The array of errors encountered while - // processing this operation. - Errors []*OperationErrorErrors `json:"errors,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Errors") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationError) MarshalJSON() ([]byte, error) { - type noMethod OperationError - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationErrorErrors struct { - // Code: [Output Only] The error type identifier for this error. - Code string `json:"code,omitempty"` - - // Location: [Output Only] Indicates the field in the request that - // caused the error. This property is optional. - Location string `json:"location,omitempty"` - - // Message: [Output Only] An optional, human-readable error message. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationErrorErrors) MarshalJSON() ([]byte, error) { - type noMethod OperationErrorErrors - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationWarnings struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*OperationWarningsData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationWarnings) MarshalJSON() ([]byte, error) { - type noMethod OperationWarnings - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationWarningsData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationWarningsData) MarshalJSON() ([]byte, error) { - type noMethod OperationWarningsData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationAggregatedList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id string `json:"id,omitempty"` - - // Items: [Output Only] A map of scoped operation lists. - Items map[string]OperationsScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#operationAggregatedList for aggregated lists of operations. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod OperationAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// OperationList: Contains a list of Operation resources. -type OperationList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id string `json:"id,omitempty"` - - // Items: [Output Only] A list of Operation resources. - Items []*Operation `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#operations for - // Operations resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationList) MarshalJSON() ([]byte, error) { - type noMethod OperationList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationsScopedList struct { - // Operations: [Output Only] List of operations contained in this scope. - Operations []*Operation `json:"operations,omitempty"` - - // Warning: [Output Only] Informational warning which replaces the list - // of operations when the list is empty. - Warning *OperationsScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Operations") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Operations") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationsScopedList) MarshalJSON() ([]byte, error) { - type noMethod OperationsScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// OperationsScopedListWarning: [Output Only] Informational warning -// which replaces the list of operations when the list is empty. -type OperationsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*OperationsScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationsScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod OperationsScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationsScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod OperationsScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PathMatcher: A matcher for the path portion of the URL. The -// BackendService from the longest-matched rule will serve the URL. If -// no rule was matched, the default service will be used. -type PathMatcher struct { - // DefaultService: The full or partial URL to the BackendService - // resource. This will be used if none of the pathRules defined by this - // PathMatcher is matched by the URL's path portion. For example, the - // following are all valid URLs to a BackendService resource: - // - - // https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService - // - compute/v1/projects/project/global/backendServices/backendService - // - // - global/backendServices/backendService - DefaultService string `json:"defaultService,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Name: The name to which this PathMatcher is referred by the HostRule. - Name string `json:"name,omitempty"` - - // PathRules: The list of path rules. - PathRules []*PathRule `json:"pathRules,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DefaultService") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DefaultService") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *PathMatcher) MarshalJSON() ([]byte, error) { - type noMethod PathMatcher - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PathRule: A path-matching rule for a URL. If matched, will use the -// specified BackendService to handle the traffic arriving at this URL. -type PathRule struct { - // Paths: The list of path patterns to match. Each must start with / and - // the only place a * is allowed is at the end following a /. The string - // fed to the path matcher does not include any text after the first ? - // or #, and those chars are not allowed here. - Paths []string `json:"paths,omitempty"` - - // Service: The URL of the BackendService resource if this rule is - // matched. - Service string `json:"service,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Paths") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Paths") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *PathRule) MarshalJSON() ([]byte, error) { - type noMethod PathRule - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Project: A Project resource. Projects can only be created in the -// Google Cloud Platform Console. Unless marked otherwise, values can -// only be modified in the console. -type Project struct { - // CommonInstanceMetadata: Metadata key/value pairs available to all - // instances contained in this project. See Custom metadata for more - // information. - CommonInstanceMetadata *Metadata `json:"commonInstanceMetadata,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // DefaultServiceAccount: [Output Only] Default service account used by - // VMs running in this project. - DefaultServiceAccount string `json:"defaultServiceAccount,omitempty"` - - // Description: An optional textual description of the resource. - Description string `json:"description,omitempty"` - - // EnabledFeatures: Restricted features enabled for use on this project. - EnabledFeatures []string `json:"enabledFeatures,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. This is not the project ID, and - // is just a unique ID used by Compute Engine to identify resources. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#project for - // projects. - Kind string `json:"kind,omitempty"` - - // Name: The project ID. For example: my-example-project. Use the - // project ID to make requests to Compute Engine. - Name string `json:"name,omitempty"` - - // Quotas: [Output Only] Quotas assigned to this project. - Quotas []*Quota `json:"quotas,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // UsageExportLocation: The naming prefix for daily usage reports and - // the Google Cloud Storage bucket where they are stored. - UsageExportLocation *UsageExportLocation `json:"usageExportLocation,omitempty"` - - // XpnProjectStatus: [Output Only] The role this project has in a shared - // VPC configuration. Currently only HOST projects are differentiated. - // - // Possible values: - // "HOST" - // "UNSPECIFIED_XPN_PROJECT_STATUS" - XpnProjectStatus string `json:"xpnProjectStatus,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. - // "CommonInstanceMetadata") to unconditionally include in API requests. - // By default, fields with empty values are omitted from API requests. - // However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CommonInstanceMetadata") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Project) MarshalJSON() ([]byte, error) { - type noMethod Project - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ProjectsDisableXpnResourceRequest struct { - // XpnResource: Service resource (a.k.a service project) ID. - XpnResource *XpnResourceId `json:"xpnResource,omitempty"` - - // ForceSendFields is a list of field names (e.g. "XpnResource") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "XpnResource") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ProjectsDisableXpnResourceRequest) MarshalJSON() ([]byte, error) { - type noMethod ProjectsDisableXpnResourceRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ProjectsEnableXpnResourceRequest struct { - // XpnResource: Service resource (a.k.a service project) ID. - XpnResource *XpnResourceId `json:"xpnResource,omitempty"` - - // ForceSendFields is a list of field names (e.g. "XpnResource") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "XpnResource") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ProjectsEnableXpnResourceRequest) MarshalJSON() ([]byte, error) { - type noMethod ProjectsEnableXpnResourceRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ProjectsGetXpnResources struct { - // Kind: [Output Only] Type of resource. Always - // compute#projectsGetXpnResources for lists of service resources (a.k.a - // service projects) - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Resources: Serive resources (a.k.a service projects) attached to this - // project as their shared VPC host. - Resources []*XpnResourceId `json:"resources,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Kind") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Kind") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ProjectsGetXpnResources) MarshalJSON() ([]byte, error) { - type noMethod ProjectsGetXpnResources - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ProjectsListXpnHostsRequest struct { - // Organization: Optional organization ID managed by Cloud Resource - // Manager, for which to list shared VPC host projects. If not - // specified, the organization will be inferred from the project. - Organization string `json:"organization,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Organization") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Organization") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ProjectsListXpnHostsRequest) MarshalJSON() ([]byte, error) { - type noMethod ProjectsListXpnHostsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Quota: A quotas entry. -type Quota struct { - // Limit: [Output Only] Quota limit for this metric. - Limit float64 `json:"limit,omitempty"` - - // Metric: [Output Only] Name of the quota metric. - // - // Possible values: - // "AUTOSCALERS" - // "BACKEND_BUCKETS" - // "BACKEND_SERVICES" - // "COMMITMENTS" - // "CPUS" - // "CPUS_ALL_REGIONS" - // "DISKS_TOTAL_GB" - // "FIREWALLS" - // "FORWARDING_RULES" - // "HEALTH_CHECKS" - // "IMAGES" - // "INSTANCES" - // "INSTANCE_GROUPS" - // "INSTANCE_GROUP_MANAGERS" - // "INSTANCE_TEMPLATES" - // "IN_USE_ADDRESSES" - // "LOCAL_SSD_TOTAL_GB" - // "NETWORKS" - // "NVIDIA_K80_GPUS" - // "PREEMPTIBLE_CPUS" - // "PREEMPTIBLE_LOCAL_SSD_GB" - // "REGIONAL_AUTOSCALERS" - // "REGIONAL_INSTANCE_GROUP_MANAGERS" - // "ROUTERS" - // "ROUTES" - // "SECURITY_POLICIES" - // "SECURITY_POLICY_RULES" - // "SNAPSHOTS" - // "SSD_TOTAL_GB" - // "SSL_CERTIFICATES" - // "STATIC_ADDRESSES" - // "SUBNETWORKS" - // "TARGET_HTTPS_PROXIES" - // "TARGET_HTTP_PROXIES" - // "TARGET_INSTANCES" - // "TARGET_POOLS" - // "TARGET_SSL_PROXIES" - // "TARGET_VPN_GATEWAYS" - // "URL_MAPS" - // "VPN_TUNNELS" - Metric string `json:"metric,omitempty"` - - // Usage: [Output Only] Current usage of this metric. - Usage float64 `json:"usage,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Limit") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Limit") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Quota) MarshalJSON() ([]byte, error) { - type noMethod Quota - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *Quota) UnmarshalJSON(data []byte) error { - type noMethod Quota - var s1 struct { - Limit gensupport.JSONFloat64 `json:"limit"` - Usage gensupport.JSONFloat64 `json:"usage"` - *noMethod - } - s1.noMethod = (*noMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Limit = float64(s1.Limit) - s.Usage = float64(s1.Usage) - return nil -} - -// Region: Region resource. -type Region struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Deprecated: [Output Only] The deprecation status associated with this - // region. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - - // Description: [Output Only] Textual description of the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#region for - // regions. - Kind string `json:"kind,omitempty"` - - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - - // Quotas: [Output Only] Quotas assigned to this region. - Quotas []*Quota `json:"quotas,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Status: [Output Only] Status of the region, either UP or DOWN. - // - // Possible values: - // "DOWN" - // "UP" - Status string `json:"status,omitempty"` - - // Zones: [Output Only] A list of zones available in this region, in the - // form of resource URLs. - Zones []string `json:"zones,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Region) MarshalJSON() ([]byte, error) { - type noMethod Region - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RegionAutoscalerList: Contains a list of autoscalers. -type RegionAutoscalerList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Autoscaler resources. - Items []*Autoscaler `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionAutoscalerList) MarshalJSON() ([]byte, error) { - type noMethod RegionAutoscalerList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupList: Contains a list of InstanceGroup resources. -type RegionInstanceGroupList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InstanceGroup resources. - Items []*InstanceGroup `json:"items,omitempty"` - - // Kind: The resource type. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupList) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupManagerList: Contains a list of managed instance -// groups. -type RegionInstanceGroupManagerList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InstanceGroupManager resources. - Items []*InstanceGroupManager `json:"items,omitempty"` - - // Kind: [Output Only] The resource type, which is always - // compute#instanceGroupManagerList for a list of managed instance - // groups that exist in th regional scope. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagerList) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupManagerList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersAbandonInstancesRequest struct { - // Instances: The URLs of one or more instances to abandon. This can be - // a full URL or a partial URL, such as - // zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagersAbandonInstancesRequest) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupManagersAbandonInstancesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersDeleteInstancesRequest struct { - // Instances: The URLs of one or more instances to delete. This can be a - // full URL or a partial URL, such as - // zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagersDeleteInstancesRequest) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupManagersDeleteInstancesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersListInstancesResponse struct { - // ManagedInstances: List of managed instances. - ManagedInstances []*ManagedInstance `json:"managedInstances,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ManagedInstances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ManagedInstances") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagersListInstancesResponse) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupManagersListInstancesResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersRecreateRequest struct { - // Instances: The URLs of one or more instances to recreate. This can be - // a full URL or a partial URL, such as - // zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagersRecreateRequest) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupManagersRecreateRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersSetTargetPoolsRequest struct { - // Fingerprint: Fingerprint of the target pools information, which is a - // hash of the contents. This field is used for optimistic locking when - // you update the target pool entries. This field is optional. - Fingerprint string `json:"fingerprint,omitempty"` - - // TargetPools: The URL of all TargetPool resources to which instances - // in the instanceGroup field are added. The target pools automatically - // apply to all of the instances in the managed instance group. - TargetPools []string `json:"targetPools,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Fingerprint") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagersSetTargetPoolsRequest) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupManagersSetTargetPoolsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersSetTemplateRequest struct { - // InstanceTemplate: URL of the InstanceTemplate resource from which all - // new instances will be created. - InstanceTemplate string `json:"instanceTemplate,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InstanceTemplate") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "InstanceTemplate") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagersSetTemplateRequest) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupManagersSetTemplateRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupsListInstances struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InstanceWithNamedPorts resources. - Items []*InstanceWithNamedPorts `json:"items,omitempty"` - - // Kind: The resource type. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupsListInstances) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupsListInstances - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupsListInstancesRequest struct { - // InstanceState: Instances in which state should be returned. Valid - // options are: 'ALL', 'RUNNING'. By default, it lists all instances. - // - // Possible values: - // "ALL" - // "RUNNING" - InstanceState string `json:"instanceState,omitempty"` - - // PortName: Name of port user is interested in. It is optional. If it - // is set, only information about this ports will be returned. If it is - // not set, all the named ports will be returned. Always lists all - // instances. - PortName string `json:"portName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InstanceState") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "InstanceState") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupsListInstancesRequest) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupsListInstancesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupsSetNamedPortsRequest struct { - // Fingerprint: The fingerprint of the named ports information for this - // instance group. Use this optional property to prevent conflicts when - // multiple users change the named ports settings concurrently. Obtain - // the fingerprint with the instanceGroups.get method. Then, include the - // fingerprint in your request to ensure that you do not overwrite - // changes that were applied from another concurrent request. - Fingerprint string `json:"fingerprint,omitempty"` - - // NamedPorts: The list of named ports to set for this instance group. - NamedPorts []*NamedPort `json:"namedPorts,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Fingerprint") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupsSetNamedPortsRequest) MarshalJSON() ([]byte, error) { - type noMethod RegionInstanceGroupsSetNamedPortsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RegionList: Contains a list of region resources. -type RegionList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Region resources. - Items []*Region `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#regionList for - // lists of regions. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionList) MarshalJSON() ([]byte, error) { - type noMethod RegionList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ResourceCommitment: Commitment for a particular resource (a -// Commitment is composed of one or more of these). -type ResourceCommitment struct { - // Amount: The amount of the resource purchased (in a type-dependent - // unit, such as bytes). For vCPUs, this can just be an integer. For - // memory, this must be provided in MB. Memory must be a multiple of 256 - // MB, with up to 6.5GB of memory per every vCPU. - Amount int64 `json:"amount,omitempty,string"` - - // Type: Type of resource for which this commitment applies. Possible - // values are VCPU and MEMORY - // - // Possible values: - // "MEMORY" - // "UNSPECIFIED" - // "VCPU" - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Amount") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Amount") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ResourceCommitment) MarshalJSON() ([]byte, error) { - type noMethod ResourceCommitment - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ResourceGroupReference struct { - // Group: A URI referencing one of the instance groups listed in the - // backend service. - Group string `json:"group,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Group") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Group") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ResourceGroupReference) MarshalJSON() ([]byte, error) { - type noMethod ResourceGroupReference - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Route: Represents a Route resource. A route specifies how certain -// packets should be handled by the network. Routes are associated with -// instances by tags and the set of routes for a particular instance is -// called its routing table. -// -// For each packet leaving an instance, the system searches that -// instance's routing table for a single best matching route. Routes -// match packets by destination IP address, preferring smaller or more -// specific ranges over larger ones. If there is a tie, the system -// selects the route with the smallest priority value. If there is still -// a tie, it uses the layer three and four packet headers to select just -// one of the remaining matching routes. The packet is then forwarded as -// specified by the nextHop field of the winning route - either to -// another instance destination, an instance gateway, or a Google -// Compute Engine-operated gateway. -// -// Packets that do not match any route in the sending instance's routing -// table are dropped. -type Route struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // DestRange: The destination range of outgoing packets that this route - // applies to. Only IPv4 is supported. - DestRange string `json:"destRange,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of this resource. Always compute#routes for - // Route resources. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Network: Fully-qualified URL of the network that this route applies - // to. - Network string `json:"network,omitempty"` - - // NextHopGateway: The URL to a gateway that should handle matching - // packets. You can only specify the internet gateway using a full or - // partial valid URL: - // projects/<project-id>/global/gateways/default-internet-gateway - NextHopGateway string `json:"nextHopGateway,omitempty"` - - // NextHopInstance: The URL to an instance that should handle matching - // packets. You can specify this as a full or partial URL. For - // example: - // https://www.googleapis.com/compute/v1/projects/project/zones/ - // zone/instances/ - NextHopInstance string `json:"nextHopInstance,omitempty"` - - // NextHopIp: The network IP address of an instance that should handle - // matching packets. Only IPv4 is supported. - NextHopIp string `json:"nextHopIp,omitempty"` - - // NextHopNetwork: The URL of the local network if it should handle - // matching packets. - NextHopNetwork string `json:"nextHopNetwork,omitempty"` - - // NextHopPeering: [Output Only] The network peering name that should - // handle matching packets, which should conform to RFC1035. - NextHopPeering string `json:"nextHopPeering,omitempty"` - - // NextHopVpnTunnel: The URL to a VpnTunnel that should handle matching - // packets. - NextHopVpnTunnel string `json:"nextHopVpnTunnel,omitempty"` - - // Priority: The priority of this route. Priority is used to break ties - // in cases where there is more than one matching route of equal prefix - // length. In the case of two routes with equal prefix length, the one - // with the lowest-numbered priority value wins. Default value is 1000. - // Valid range is 0 through 65535. - Priority int64 `json:"priority,omitempty"` - - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - - // Tags: A list of instance tags to which this route applies. - Tags []string `json:"tags,omitempty"` - - // Warnings: [Output Only] If potential misconfigurations are detected - // for this route, this field will be populated with warning messages. - Warnings []*RouteWarnings `json:"warnings,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Route) MarshalJSON() ([]byte, error) { - type noMethod Route - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RouteWarnings struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*RouteWarningsData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RouteWarnings) MarshalJSON() ([]byte, error) { - type noMethod RouteWarnings - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RouteWarningsData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RouteWarningsData) MarshalJSON() ([]byte, error) { - type noMethod RouteWarningsData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RouteList: Contains a list of Route resources. -type RouteList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Route resources. - Items []*Route `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RouteList) MarshalJSON() ([]byte, error) { - type noMethod RouteList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Router: Router resource. -type Router struct { - // Bgp: BGP information specific to this router. - Bgp *RouterBgp `json:"bgp,omitempty"` - - // BgpPeers: BGP information that needs to be configured into the - // routing stack to establish the BGP peering. It must specify peer ASN - // and either interface name, IP, or peer IP. Please refer to RFC4273. - BgpPeers []*RouterBgpPeer `json:"bgpPeers,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Interfaces: Router interfaces. Each interface requires either one - // linked resource (e.g. linkedVpnTunnel), or IP address and IP address - // range (e.g. ipRange), or both. - Interfaces []*RouterInterface `json:"interfaces,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#router for - // routers. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Network: URI of the network to which this router belongs. - Network string `json:"network,omitempty"` - - // Region: [Output Only] URI of the region where the router resides. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Bgp") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Bgp") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Router) MarshalJSON() ([]byte, error) { - type noMethod Router - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RouterAggregatedList: Contains a list of routers. -type RouterAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Router resources. - Items map[string]RoutersScopedList `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RouterAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod RouterAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RouterBgp struct { - // Asn: Local BGP Autonomous System Number (ASN). Must be an RFC6996 - // private ASN, either 16-bit or 32-bit. The value will be fixed for - // this router resource. All VPN tunnels that link to this router will - // have the same local ASN. - Asn int64 `json:"asn,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Asn") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Asn") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RouterBgp) MarshalJSON() ([]byte, error) { - type noMethod RouterBgp - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RouterBgpPeer struct { - // AdvertisedRoutePriority: The priority of routes advertised to this - // BGP peer. In the case where there is more than one matching route of - // maximum length, the routes with lowest priority value win. - AdvertisedRoutePriority int64 `json:"advertisedRoutePriority,omitempty"` - - // InterfaceName: Name of the interface the BGP peer is associated with. - InterfaceName string `json:"interfaceName,omitempty"` - - // IpAddress: IP address of the interface inside Google Cloud Platform. - // Only IPv4 is supported. - IpAddress string `json:"ipAddress,omitempty"` - - // Name: Name of this BGP peer. The name must be 1-63 characters long - // and comply with RFC1035. - Name string `json:"name,omitempty"` - - // PeerAsn: Peer BGP Autonomous System Number (ASN). For VPN use case, - // this value can be different for every tunnel. - PeerAsn int64 `json:"peerAsn,omitempty"` - - // PeerIpAddress: IP address of the BGP interface outside Google cloud. - // Only IPv4 is supported. - PeerIpAddress string `json:"peerIpAddress,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "AdvertisedRoutePriority") to unconditionally include in API - // requests. By default, fields with empty values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AdvertisedRoutePriority") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *RouterBgpPeer) MarshalJSON() ([]byte, error) { - type noMethod RouterBgpPeer - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RouterInterface struct { - // IpRange: IP address and range of the interface. The IP range must be - // in the RFC3927 link-local IP space. The value must be a - // CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not - // truncate the address as it represents the IP address of the - // interface. - IpRange string `json:"ipRange,omitempty"` - - // LinkedVpnTunnel: URI of the linked VPN tunnel. It must be in the same - // region as the router. Each interface can have at most one linked - // resource and it could either be a VPN Tunnel or an interconnect - // attachment. - LinkedVpnTunnel string `json:"linkedVpnTunnel,omitempty"` - - // Name: Name of this interface entry. The name must be 1-63 characters - // long and comply with RFC1035. - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IpRange") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IpRange") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RouterInterface) MarshalJSON() ([]byte, error) { - type noMethod RouterInterface - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RouterList: Contains a list of Router resources. -type RouterList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Router resources. - Items []*Router `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#router for - // routers. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RouterList) MarshalJSON() ([]byte, error) { - type noMethod RouterList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RouterStatus struct { - // BestRoutes: Best routes for this router's network. - BestRoutes []*Route `json:"bestRoutes,omitempty"` - - // BestRoutesForRouter: Best routes learned by this router. - BestRoutesForRouter []*Route `json:"bestRoutesForRouter,omitempty"` - - BgpPeerStatus []*RouterStatusBgpPeerStatus `json:"bgpPeerStatus,omitempty"` - - // Network: URI of the network to which this router belongs. - Network string `json:"network,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BestRoutes") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BestRoutes") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RouterStatus) MarshalJSON() ([]byte, error) { - type noMethod RouterStatus - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RouterStatusBgpPeerStatus struct { - // AdvertisedRoutes: Routes that were advertised to the remote BGP peer - AdvertisedRoutes []*Route `json:"advertisedRoutes,omitempty"` - - // IpAddress: IP address of the local BGP interface. - IpAddress string `json:"ipAddress,omitempty"` - - // LinkedVpnTunnel: URL of the VPN tunnel that this BGP peer controls. - LinkedVpnTunnel string `json:"linkedVpnTunnel,omitempty"` - - // Name: Name of this BGP peer. Unique within the Routers resource. - Name string `json:"name,omitempty"` - - // NumLearnedRoutes: Number of routes learned from the remote BGP Peer. - NumLearnedRoutes int64 `json:"numLearnedRoutes,omitempty"` - - // PeerIpAddress: IP address of the remote BGP interface. - PeerIpAddress string `json:"peerIpAddress,omitempty"` - - // State: BGP state as specified in RFC1771. - State string `json:"state,omitempty"` - - // Status: Status of the BGP peer: {UP, DOWN} - // - // Possible values: - // "DOWN" - // "UNKNOWN" - // "UP" - Status string `json:"status,omitempty"` - - // Uptime: Time this session has been up. Format: 14 years, 51 weeks, 6 - // days, 23 hours, 59 minutes, 59 seconds - Uptime string `json:"uptime,omitempty"` - - // UptimeSeconds: Time this session has been up, in seconds. Format: 145 - UptimeSeconds string `json:"uptimeSeconds,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AdvertisedRoutes") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AdvertisedRoutes") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *RouterStatusBgpPeerStatus) MarshalJSON() ([]byte, error) { - type noMethod RouterStatusBgpPeerStatus - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RouterStatusResponse struct { - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - Result *RouterStatus `json:"result,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Kind") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Kind") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RouterStatusResponse) MarshalJSON() ([]byte, error) { - type noMethod RouterStatusResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RoutersPreviewResponse struct { - // Resource: Preview of given router. - Resource *Router `json:"resource,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Resource") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Resource") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RoutersPreviewResponse) MarshalJSON() ([]byte, error) { - type noMethod RoutersPreviewResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RoutersScopedList struct { - // Routers: List of routers contained in this scope. - Routers []*Router `json:"routers,omitempty"` - - // Warning: Informational warning which replaces the list of routers - // when the list is empty. - Warning *RoutersScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Routers") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Routers") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RoutersScopedList) MarshalJSON() ([]byte, error) { - type noMethod RoutersScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RoutersScopedListWarning: Informational warning which replaces the -// list of routers when the list is empty. -type RoutersScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*RoutersScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RoutersScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod RoutersScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RoutersScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RoutersScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod RoutersScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type SSLHealthCheck struct { - // Port: The TCP port number for the health check request. The default - // value is 443. Valid values are 1 through 65535. - Port int64 `json:"port,omitempty"` - - // PortName: Port name as defined in InstanceGroup#NamedPort#name. If - // both port and port_name are defined, port takes precedence. - PortName string `json:"portName,omitempty"` - - // ProxyHeader: Specifies the type of proxy header to append before - // sending data to the backend, either NONE or PROXY_V1. The default is - // NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - - // Request: The application data to send once the SSL connection has - // been established (default value is empty). If both request and - // response are empty, the connection establishment alone will indicate - // health. The request data can only be ASCII. - Request string `json:"request,omitempty"` - - // Response: The bytes to match against the beginning of the response - // data. If left empty (the default value), any response will indicate - // health. The response data can only be ASCII. - Response string `json:"response,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Port") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Port") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SSLHealthCheck) MarshalJSON() ([]byte, error) { - type noMethod SSLHealthCheck - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Scheduling: Sets the scheduling options for an Instance. -type Scheduling struct { - // AutomaticRestart: Specifies whether the instance should be - // automatically restarted if it is terminated by Compute Engine (not - // terminated by a user). You can only set the automatic restart option - // for standard instances. Preemptible instances cannot be automatically - // restarted. - // - // By default, this is set to true so an instance is automatically - // restarted if it is terminated by Compute Engine. - AutomaticRestart *bool `json:"automaticRestart,omitempty"` - - // OnHostMaintenance: Defines the maintenance behavior for this - // instance. For standard instances, the default behavior is MIGRATE. - // For preemptible instances, the default and only possible behavior is - // TERMINATE. For more information, see Setting Instance Scheduling - // Options. - // - // Possible values: - // "MIGRATE" - // "TERMINATE" - OnHostMaintenance string `json:"onHostMaintenance,omitempty"` - - // Preemptible: Defines whether the instance is preemptible. This can - // only be set during instance creation, it cannot be set or changed - // after the instance has been created. - Preemptible bool `json:"preemptible,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AutomaticRestart") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AutomaticRestart") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Scheduling) MarshalJSON() ([]byte, error) { - type noMethod Scheduling - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SerialPortOutput: An instance's serial console output. -type SerialPortOutput struct { - // Contents: [Output Only] The contents of the console output. - Contents string `json:"contents,omitempty"` - - // Kind: [Output Only] Type of the resource. Always - // compute#serialPortOutput for serial port output. - Kind string `json:"kind,omitempty"` - - // Next: [Output Only] The position of the next byte of content from the - // serial console output. Use this value in the next request as the - // start parameter. - Next int64 `json:"next,omitempty,string"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // Start: The starting byte position of the output that was returned. - // This should match the start parameter sent with the request. If the - // serial console output exceeds the size of the buffer, older output - // will be overwritten by newer content and the start values will be - // mismatched. - Start int64 `json:"start,omitempty,string"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Contents") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Contents") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SerialPortOutput) MarshalJSON() ([]byte, error) { - type noMethod SerialPortOutput - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ServiceAccount: A service account. -type ServiceAccount struct { - // Email: Email address of the service account. - Email string `json:"email,omitempty"` - - // Scopes: The list of scopes to be made available for this service - // account. - Scopes []string `json:"scopes,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Email") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Email") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ServiceAccount) MarshalJSON() ([]byte, error) { - type noMethod ServiceAccount - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Snapshot: A persistent disk snapshot resource. -type Snapshot struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // DiskSizeGb: [Output Only] Size of the snapshot, specified in GB. - DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#snapshot for - // Snapshot resources. - Kind string `json:"kind,omitempty"` - - // LabelFingerprint: A fingerprint for the labels being applied to this - // snapshot, which is essentially a hash of the labels set used for - // optimistic locking. The fingerprint is initially generated by Compute - // Engine and changes after every request to modify or update labels. - // You must always provide an up-to-date fingerprint hash in order to - // update or change labels. - // - // To see the latest fingerprint, make a get() request to retrieve a - // snapshot. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // Labels: Labels to apply to this snapshot. These can be later modified - // by the setLabels method. Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - - // Licenses: [Output Only] A list of public visible licenses that apply - // to this snapshot. This can be because the original image had licenses - // attached (such as a Windows image). - Licenses []string `json:"licenses,omitempty"` - - // Name: Name of the resource; provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // SnapshotEncryptionKey: Encrypts the snapshot using a - // customer-supplied encryption key. - // - // After you encrypt a snapshot using a customer-supplied key, you must - // provide the same key if you use the image later For example, you must - // provide the encryption key when you create a disk from the encrypted - // snapshot in a future request. - // - // Customer-supplied encryption keys do not protect access to metadata - // of the disk. - // - // If you do not provide an encryption key when creating the snapshot, - // then the snapshot will be encrypted using an automatically generated - // key and you do not need to provide a key to use the snapshot later. - SnapshotEncryptionKey *CustomerEncryptionKey `json:"snapshotEncryptionKey,omitempty"` - - // SourceDisk: [Output Only] The source disk used to create this - // snapshot. - SourceDisk string `json:"sourceDisk,omitempty"` - - // SourceDiskEncryptionKey: The customer-supplied encryption key of the - // source disk. Required if the source disk is protected by a - // customer-supplied encryption key. - SourceDiskEncryptionKey *CustomerEncryptionKey `json:"sourceDiskEncryptionKey,omitempty"` - - // SourceDiskId: [Output Only] The ID value of the disk used to create - // this snapshot. This value may be used to determine whether the - // snapshot was taken from the current or a previous instance of a given - // disk name. - SourceDiskId string `json:"sourceDiskId,omitempty"` - - // Status: [Output Only] The status of the snapshot. This can be - // CREATING, DELETING, FAILED, READY, or UPLOADING. - // - // Possible values: - // "CREATING" - // "DELETING" - // "FAILED" - // "READY" - // "UPLOADING" - Status string `json:"status,omitempty"` - - // StorageBytes: [Output Only] A size of the the storage used by the - // snapshot. As snapshots share storage, this number is expected to - // change with snapshot creation/deletion. - StorageBytes int64 `json:"storageBytes,omitempty,string"` - - // StorageBytesStatus: [Output Only] An indicator whether storageBytes - // is in a stable state or it is being adjusted as a result of shared - // storage reallocation. This status can either be UPDATING, meaning the - // size of the snapshot is being updated, or UP_TO_DATE, meaning the - // size of the snapshot is up-to-date. - // - // Possible values: - // "UPDATING" - // "UP_TO_DATE" - StorageBytesStatus string `json:"storageBytesStatus,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Snapshot) MarshalJSON() ([]byte, error) { - type noMethod Snapshot - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SnapshotList: Contains a list of Snapshot resources. -type SnapshotList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Snapshot resources. - Items []*Snapshot `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SnapshotList) MarshalJSON() ([]byte, error) { - type noMethod SnapshotList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SslCertificate: An SslCertificate resource. This resource provides a -// mechanism to upload an SSL key and certificate to the load balancer -// to serve secure connections from the user. -type SslCertificate struct { - // Certificate: A local certificate file. The certificate must be in PEM - // format. The certificate chain must be no greater than 5 certs long. - // The chain must include at least one intermediate cert. - Certificate string `json:"certificate,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always - // compute#sslCertificate for SSL certificates. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // PrivateKey: A write-only private key in PEM format. Only insert - // requests will include this field. - PrivateKey string `json:"privateKey,omitempty"` - - // SelfLink: [Output only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Certificate") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Certificate") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SslCertificate) MarshalJSON() ([]byte, error) { - type noMethod SslCertificate - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SslCertificateList: Contains a list of SslCertificate resources. -type SslCertificateList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of SslCertificate resources. - Items []*SslCertificate `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SslCertificateList) MarshalJSON() ([]byte, error) { - type noMethod SslCertificateList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Subnetwork: A Subnetwork resource. -type Subnetwork struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. This field can be set only at - // resource creation time. - Description string `json:"description,omitempty"` - - // GatewayAddress: [Output Only] The gateway address for default routes - // to reach destination addresses outside this subnetwork. This field - // can be set only at resource creation time. - GatewayAddress string `json:"gatewayAddress,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // IpCidrRange: The range of internal addresses that are owned by this - // subnetwork. Provide this property when you create the subnetwork. For - // example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and - // non-overlapping within a network. Only IPv4 is supported. This field - // can be set only at resource creation time. - IpCidrRange string `json:"ipCidrRange,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#subnetwork - // for Subnetwork resources. - Kind string `json:"kind,omitempty"` - - // Name: The name of the resource, provided by the client when initially - // creating the resource. The name must be 1-63 characters long, and - // comply with RFC1035. Specifically, the name must be 1-63 characters - // long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? - // which means the first character must be a lowercase letter, and all - // following characters must be a dash, lowercase letter, or digit, - // except the last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Network: The URL of the network to which this subnetwork belongs, - // provided by the client when initially creating the subnetwork. Only - // networks that are in the distributed mode can have subnetworks. This - // field can be set only at resource creation time. - Network string `json:"network,omitempty"` - - // PrivateIpGoogleAccess: Whether the VMs in this subnet can access - // Google services without assigned external IP addresses. This field - // can be both set at resource creation time and updated using - // setPrivateIpGoogleAccess. - PrivateIpGoogleAccess bool `json:"privateIpGoogleAccess,omitempty"` - - // Region: URL of the region where the Subnetwork resides. This field - // can be set only at resource creation time. - Region string `json:"region,omitempty"` - - // SecondaryIpRanges: An array of configurations for secondary IP ranges - // for VM instances contained in this subnetwork. The primary IP of such - // VM must belong to the primary ipCidrRange of the subnetwork. The - // alias IPs may belong to either primary or secondary ranges. - SecondaryIpRanges []*SubnetworkSecondaryRange `json:"secondaryIpRanges,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Subnetwork) MarshalJSON() ([]byte, error) { - type noMethod Subnetwork - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type SubnetworkAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of SubnetworksScopedList resources. - Items map[string]SubnetworksScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#subnetworkAggregatedList for aggregated lists of subnetworks. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SubnetworkAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod SubnetworkAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SubnetworkList: Contains a list of Subnetwork resources. -type SubnetworkList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Subnetwork resources. - Items []*Subnetwork `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#subnetworkList - // for lists of subnetworks. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SubnetworkList) MarshalJSON() ([]byte, error) { - type noMethod SubnetworkList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SubnetworkSecondaryRange: Represents a secondary IP range of a -// subnetwork. -type SubnetworkSecondaryRange struct { - // IpCidrRange: The range of IP addresses belonging to this subnetwork - // secondary range. Provide this property when you create the - // subnetwork. Ranges must be unique and non-overlapping with all - // primary and secondary IP ranges within a network. Only IPv4 is - // supported. - IpCidrRange string `json:"ipCidrRange,omitempty"` - - // RangeName: The name associated with this subnetwork secondary range, - // used when adding an alias IP range to a VM instance. The name must be - // 1-63 characters long, and comply with RFC1035. The name must be - // unique within the subnetwork. - RangeName string `json:"rangeName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IpCidrRange") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IpCidrRange") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SubnetworkSecondaryRange) MarshalJSON() ([]byte, error) { - type noMethod SubnetworkSecondaryRange - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type SubnetworksExpandIpCidrRangeRequest struct { - // IpCidrRange: The IP (in CIDR format or netmask) of internal addresses - // that are legal on this Subnetwork. This range should be disjoint from - // other subnetworks within this network. This range can only be larger - // than (i.e. a superset of) the range previously defined before the - // update. - IpCidrRange string `json:"ipCidrRange,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IpCidrRange") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IpCidrRange") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SubnetworksExpandIpCidrRangeRequest) MarshalJSON() ([]byte, error) { - type noMethod SubnetworksExpandIpCidrRangeRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type SubnetworksScopedList struct { - // Subnetworks: List of subnetworks contained in this scope. - Subnetworks []*Subnetwork `json:"subnetworks,omitempty"` - - // Warning: An informational warning that appears when the list of - // addresses is empty. - Warning *SubnetworksScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Subnetworks") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Subnetworks") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SubnetworksScopedList) MarshalJSON() ([]byte, error) { - type noMethod SubnetworksScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SubnetworksScopedListWarning: An informational warning that appears -// when the list of addresses is empty. -type SubnetworksScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*SubnetworksScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SubnetworksScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod SubnetworksScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type SubnetworksScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SubnetworksScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod SubnetworksScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type SubnetworksSetPrivateIpGoogleAccessRequest struct { - PrivateIpGoogleAccess bool `json:"privateIpGoogleAccess,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "PrivateIpGoogleAccess") to unconditionally include in API requests. - // By default, fields with empty values are omitted from API requests. - // However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "PrivateIpGoogleAccess") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *SubnetworksSetPrivateIpGoogleAccessRequest) MarshalJSON() ([]byte, error) { - type noMethod SubnetworksSetPrivateIpGoogleAccessRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TCPHealthCheck struct { - // Port: The TCP port number for the health check request. The default - // value is 80. Valid values are 1 through 65535. - Port int64 `json:"port,omitempty"` - - // PortName: Port name as defined in InstanceGroup#NamedPort#name. If - // both port and port_name are defined, port takes precedence. - PortName string `json:"portName,omitempty"` - - // ProxyHeader: Specifies the type of proxy header to append before - // sending data to the backend, either NONE or PROXY_V1. The default is - // NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - - // Request: The application data to send once the TCP connection has - // been established (default value is empty). If both request and - // response are empty, the connection establishment alone will indicate - // health. The request data can only be ASCII. - Request string `json:"request,omitempty"` - - // Response: The bytes to match against the beginning of the response - // data. If left empty (the default value), any response will indicate - // health. The response data can only be ASCII. - Response string `json:"response,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Port") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Port") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TCPHealthCheck) MarshalJSON() ([]byte, error) { - type noMethod TCPHealthCheck - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Tags: A set of instance tags. -type Tags struct { - // Fingerprint: Specifies a fingerprint for this request, which is - // essentially a hash of the metadata's contents and used for optimistic - // locking. The fingerprint is initially generated by Compute Engine and - // changes after every request to modify or update metadata. You must - // always provide an up-to-date fingerprint hash in order to update or - // change metadata. - // - // To see the latest fingerprint, make get() request to the instance. - Fingerprint string `json:"fingerprint,omitempty"` - - // Items: An array of tags. Each tag must be 1-63 characters long, and - // comply with RFC1035. - Items []string `json:"items,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Fingerprint") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Tags) MarshalJSON() ([]byte, error) { - type noMethod Tags - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetHttpProxy: A TargetHttpProxy resource. This resource defines an -// HTTP proxy. -type TargetHttpProxy struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of resource. Always compute#targetHttpProxy - // for target HTTP proxies. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // UrlMap: URL to the UrlMap resource that defines the mapping from URL - // to the BackendService. - UrlMap string `json:"urlMap,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetHttpProxy) MarshalJSON() ([]byte, error) { - type noMethod TargetHttpProxy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetHttpProxyList: A list of TargetHttpProxy resources. -type TargetHttpProxyList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetHttpProxy resources. - Items []*TargetHttpProxy `json:"items,omitempty"` - - // Kind: Type of resource. Always compute#targetHttpProxyList for lists - // of target HTTP proxies. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetHttpProxyList) MarshalJSON() ([]byte, error) { - type noMethod TargetHttpProxyList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetHttpsProxiesSetSslCertificatesRequest struct { - // SslCertificates: New set of SslCertificate resources to associate - // with this TargetHttpsProxy resource. Currently exactly one - // SslCertificate resource must be specified. - SslCertificates []string `json:"sslCertificates,omitempty"` - - // ForceSendFields is a list of field names (e.g. "SslCertificates") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "SslCertificates") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetHttpsProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, error) { - type noMethod TargetHttpsProxiesSetSslCertificatesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetHttpsProxy: A TargetHttpsProxy resource. This resource defines -// an HTTPS proxy. -type TargetHttpsProxy struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of resource. Always compute#targetHttpsProxy - // for target HTTPS proxies. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // SslCertificates: URLs to SslCertificate resources that are used to - // authenticate connections between users and the load balancer. - // Currently, exactly one SSL certificate must be specified. - SslCertificates []string `json:"sslCertificates,omitempty"` - - // UrlMap: A fully-qualified or valid partial URL to the UrlMap resource - // that defines the mapping from URL to the BackendService. For example, - // the following are all valid URLs for specifying a URL map: - // - - // https://www.googleapis.compute/v1/projects/project/global/urlMaps/url-map - // - projects/project/global/urlMaps/url-map - // - global/urlMaps/url-map - UrlMap string `json:"urlMap,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetHttpsProxy) MarshalJSON() ([]byte, error) { - type noMethod TargetHttpsProxy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetHttpsProxyList: Contains a list of TargetHttpsProxy resources. -type TargetHttpsProxyList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetHttpsProxy resources. - Items []*TargetHttpsProxy `json:"items,omitempty"` - - // Kind: Type of resource. Always compute#targetHttpsProxyList for lists - // of target HTTPS proxies. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetHttpsProxyList) MarshalJSON() ([]byte, error) { - type noMethod TargetHttpsProxyList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetInstance: A TargetInstance resource. This resource defines an -// endpoint instance that terminates traffic of certain protocols. -type TargetInstance struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Instance: A URL to the virtual machine instance that handles traffic - // for this target instance. When creating a target instance, you can - // provide the fully-qualified URL or a valid partial URL to the desired - // virtual machine. For example, the following are all valid URLs: - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance - // - projects/project/zones/zone/instances/instance - // - zones/zone/instances/instance - Instance string `json:"instance,omitempty"` - - // Kind: [Output Only] The type of the resource. Always - // compute#targetInstance for target instances. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // NatPolicy: NAT option controlling how IPs are NAT'ed to the instance. - // Currently only NO_NAT (default value) is supported. - // - // Possible values: - // "NO_NAT" - NatPolicy string `json:"natPolicy,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Zone: [Output Only] URL of the zone where the target instance - // resides. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetInstance) MarshalJSON() ([]byte, error) { - type noMethod TargetInstance - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetInstanceAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetInstance resources. - Items map[string]TargetInstancesScopedList `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetInstanceAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod TargetInstanceAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetInstanceList: Contains a list of TargetInstance resources. -type TargetInstanceList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetInstance resources. - Items []*TargetInstance `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetInstanceList) MarshalJSON() ([]byte, error) { - type noMethod TargetInstanceList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetInstancesScopedList struct { - // TargetInstances: List of target instances contained in this scope. - TargetInstances []*TargetInstance `json:"targetInstances,omitempty"` - - // Warning: Informational warning which replaces the list of addresses - // when the list is empty. - Warning *TargetInstancesScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "TargetInstances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "TargetInstances") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetInstancesScopedList) MarshalJSON() ([]byte, error) { - type noMethod TargetInstancesScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetInstancesScopedListWarning: Informational warning which -// replaces the list of addresses when the list is empty. -type TargetInstancesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*TargetInstancesScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetInstancesScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod TargetInstancesScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetInstancesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetInstancesScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod TargetInstancesScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetPool: A TargetPool resource. This resource defines a pool of -// instances, an associated HttpHealthCheck resource, and the fallback -// target pool. -type TargetPool struct { - // BackupPool: This field is applicable only when the containing target - // pool is serving a forwarding rule as the primary pool, and its - // failoverRatio field is properly set to a value between [0, - // 1]. - // - // backupPool and failoverRatio together define the fallback behavior of - // the primary target pool: if the ratio of the healthy instances in the - // primary pool is at or below failoverRatio, traffic arriving at the - // load-balanced IP will be directed to the backup pool. - // - // In case where failoverRatio and backupPool are not set, or all the - // instances in the backup pool are unhealthy, the traffic will be - // directed back to the primary pool in the "force" mode, where traffic - // will be spread to the healthy instances with the best effort, or to - // all instances when no instance is healthy. - BackupPool string `json:"backupPool,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // FailoverRatio: This field is applicable only when the containing - // target pool is serving a forwarding rule as the primary pool (i.e., - // not as a backup pool to some other target pool). The value of the - // field must be in [0, 1]. - // - // If set, backupPool must also be set. They together define the - // fallback behavior of the primary target pool: if the ratio of the - // healthy instances in the primary pool is at or below this number, - // traffic arriving at the load-balanced IP will be directed to the - // backup pool. - // - // In case where failoverRatio is not set or all the instances in the - // backup pool are unhealthy, the traffic will be directed back to the - // primary pool in the "force" mode, where traffic will be spread to the - // healthy instances with the best effort, or to all instances when no - // instance is healthy. - FailoverRatio float64 `json:"failoverRatio,omitempty"` - - // HealthChecks: The URL of the HttpHealthCheck resource. A member - // instance in this pool is considered healthy if and only if the health - // checks pass. An empty list means all member instances will be - // considered healthy at all times. Only HttpHealthChecks are supported. - // Only one health check may be specified. - HealthChecks []string `json:"healthChecks,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Instances: A list of resource URLs to the virtual machine instances - // serving this pool. They must live in zones contained in the same - // region as this pool. - Instances []string `json:"instances,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#targetPool - // for target pools. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Region: [Output Only] URL of the region where the target pool - // resides. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // SessionAffinity: Sesssion affinity option, must be one of the - // following values: - // NONE: Connections from the same client IP may go to any instance in - // the pool. - // CLIENT_IP: Connections from the same client IP will go to the same - // instance in the pool while that instance remains - // healthy. - // CLIENT_IP_PROTO: Connections from the same client IP with the same IP - // protocol will go to the same instance in the pool while that instance - // remains healthy. - // - // Possible values: - // "CLIENT_IP" - // "CLIENT_IP_PORT_PROTO" - // "CLIENT_IP_PROTO" - // "GENERATED_COOKIE" - // "NONE" - SessionAffinity string `json:"sessionAffinity,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "BackupPool") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BackupPool") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPool) MarshalJSON() ([]byte, error) { - type noMethod TargetPool - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *TargetPool) UnmarshalJSON(data []byte) error { - type noMethod TargetPool - var s1 struct { - FailoverRatio gensupport.JSONFloat64 `json:"failoverRatio"` - *noMethod - } - s1.noMethod = (*noMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FailoverRatio = float64(s1.FailoverRatio) - return nil -} - -type TargetPoolAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetPool resources. - Items map[string]TargetPoolsScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#targetPoolAggregatedList for aggregated lists of target - // pools. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPoolAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod TargetPoolAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetPoolInstanceHealth struct { - HealthStatus []*HealthStatus `json:"healthStatus,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#targetPoolInstanceHealth when checking the health of an - // instance. - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "HealthStatus") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "HealthStatus") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPoolInstanceHealth) MarshalJSON() ([]byte, error) { - type noMethod TargetPoolInstanceHealth - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetPoolList: Contains a list of TargetPool resources. -type TargetPoolList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetPool resources. - Items []*TargetPool `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#targetPoolList - // for lists of target pools. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPoolList) MarshalJSON() ([]byte, error) { - type noMethod TargetPoolList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetPoolsAddHealthCheckRequest struct { - // HealthChecks: The HttpHealthCheck to add to the target pool. - HealthChecks []*HealthCheckReference `json:"healthChecks,omitempty"` - - // ForceSendFields is a list of field names (e.g. "HealthChecks") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "HealthChecks") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPoolsAddHealthCheckRequest) MarshalJSON() ([]byte, error) { - type noMethod TargetPoolsAddHealthCheckRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetPoolsAddInstanceRequest struct { - // Instances: A full or partial URL to an instance to add to this target - // pool. This can be a full or partial URL. For example, the following - // are valid URLs: - // - - // https://www.googleapis.com/compute/v1/projects/project-id/zones/zone/instances/instance-name - // - projects/project-id/zones/zone/instances/instance-name - // - zones/zone/instances/instance-name - Instances []*InstanceReference `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPoolsAddInstanceRequest) MarshalJSON() ([]byte, error) { - type noMethod TargetPoolsAddInstanceRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetPoolsRemoveHealthCheckRequest struct { - // HealthChecks: Health check URL to be removed. This can be a full or - // valid partial URL. For example, the following are valid URLs: - // - - // https://www.googleapis.com/compute/beta/projects/project/global/httpHealthChecks/health-check - // - projects/project/global/httpHealthChecks/health-check - // - global/httpHealthChecks/health-check - HealthChecks []*HealthCheckReference `json:"healthChecks,omitempty"` - - // ForceSendFields is a list of field names (e.g. "HealthChecks") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "HealthChecks") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPoolsRemoveHealthCheckRequest) MarshalJSON() ([]byte, error) { - type noMethod TargetPoolsRemoveHealthCheckRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetPoolsRemoveInstanceRequest struct { - // Instances: URLs of the instances to be removed from target pool. - Instances []*InstanceReference `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPoolsRemoveInstanceRequest) MarshalJSON() ([]byte, error) { - type noMethod TargetPoolsRemoveInstanceRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetPoolsScopedList struct { - // TargetPools: List of target pools contained in this scope. - TargetPools []*TargetPool `json:"targetPools,omitempty"` - - // Warning: Informational warning which replaces the list of addresses - // when the list is empty. - Warning *TargetPoolsScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "TargetPools") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "TargetPools") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPoolsScopedList) MarshalJSON() ([]byte, error) { - type noMethod TargetPoolsScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetPoolsScopedListWarning: Informational warning which replaces -// the list of addresses when the list is empty. -type TargetPoolsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*TargetPoolsScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPoolsScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod TargetPoolsScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetPoolsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPoolsScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod TargetPoolsScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetReference struct { - Target string `json:"target,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Target") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Target") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetReference) MarshalJSON() ([]byte, error) { - type noMethod TargetReference - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetSslProxiesSetBackendServiceRequest struct { - // Service: The URL of the new BackendService resource for the - // targetSslProxy. - Service string `json:"service,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Service") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Service") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetSslProxiesSetBackendServiceRequest) MarshalJSON() ([]byte, error) { - type noMethod TargetSslProxiesSetBackendServiceRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetSslProxiesSetProxyHeaderRequest struct { - // ProxyHeader: The new type of proxy header to append before sending - // data to the backend. NONE or PROXY_V1 are allowed. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ProxyHeader") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ProxyHeader") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetSslProxiesSetProxyHeaderRequest) MarshalJSON() ([]byte, error) { - type noMethod TargetSslProxiesSetProxyHeaderRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetSslProxiesSetSslCertificatesRequest struct { - // SslCertificates: New set of URLs to SslCertificate resources to - // associate with this TargetSslProxy. Currently exactly one ssl - // certificate must be specified. - SslCertificates []string `json:"sslCertificates,omitempty"` - - // ForceSendFields is a list of field names (e.g. "SslCertificates") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "SslCertificates") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetSslProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, error) { - type noMethod TargetSslProxiesSetSslCertificatesRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetSslProxy: A TargetSslProxy resource. This resource defines an -// SSL proxy. -type TargetSslProxy struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always - // compute#targetSslProxy for target SSL proxies. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // ProxyHeader: Specifies the type of proxy header to append before - // sending data to the backend, either NONE or PROXY_V1. The default is - // NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Service: URL to the BackendService resource. - Service string `json:"service,omitempty"` - - // SslCertificates: URLs to SslCertificate resources that are used to - // authenticate connections to Backends. Currently exactly one SSL - // certificate must be specified. - SslCertificates []string `json:"sslCertificates,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetSslProxy) MarshalJSON() ([]byte, error) { - type noMethod TargetSslProxy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetSslProxyList: Contains a list of TargetSslProxy resources. -type TargetSslProxyList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetSslProxy resources. - Items []*TargetSslProxy `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetSslProxyList) MarshalJSON() ([]byte, error) { - type noMethod TargetSslProxyList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetTcpProxiesSetBackendServiceRequest struct { - // Service: The URL of the new BackendService resource for the - // targetTcpProxy. - Service string `json:"service,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Service") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Service") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetTcpProxiesSetBackendServiceRequest) MarshalJSON() ([]byte, error) { - type noMethod TargetTcpProxiesSetBackendServiceRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetTcpProxiesSetProxyHeaderRequest struct { - // ProxyHeader: The new type of proxy header to append before sending - // data to the backend. NONE or PROXY_V1 are allowed. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ProxyHeader") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ProxyHeader") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetTcpProxiesSetProxyHeaderRequest) MarshalJSON() ([]byte, error) { - type noMethod TargetTcpProxiesSetProxyHeaderRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetTcpProxy: A TargetTcpProxy resource. This resource defines a -// TCP proxy. -type TargetTcpProxy struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always - // compute#targetTcpProxy for target TCP proxies. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // ProxyHeader: Specifies the type of proxy header to append before - // sending data to the backend, either NONE or PROXY_V1. The default is - // NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Service: URL to the BackendService resource. - Service string `json:"service,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetTcpProxy) MarshalJSON() ([]byte, error) { - type noMethod TargetTcpProxy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetTcpProxyList: Contains a list of TargetTcpProxy resources. -type TargetTcpProxyList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetTcpProxy resources. - Items []*TargetTcpProxy `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetTcpProxyList) MarshalJSON() ([]byte, error) { - type noMethod TargetTcpProxyList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetVpnGateway: Represents a Target VPN gateway resource. -type TargetVpnGateway struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // ForwardingRules: [Output Only] A list of URLs to the ForwardingRule - // resources. ForwardingRules are created using - // compute.forwardingRules.insert and associated to a VPN gateway. - ForwardingRules []string `json:"forwardingRules,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of resource. Always compute#targetVpnGateway - // for target VPN gateways. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Network: URL of the network to which this VPN gateway is attached. - // Provided by the client when the VPN gateway is created. - Network string `json:"network,omitempty"` - - // Region: [Output Only] URL of the region where the target VPN gateway - // resides. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Status: [Output Only] The status of the VPN gateway. - // - // Possible values: - // "CREATING" - // "DELETING" - // "FAILED" - // "READY" - Status string `json:"status,omitempty"` - - // Tunnels: [Output Only] A list of URLs to VpnTunnel resources. - // VpnTunnels are created using compute.vpntunnels.insert method and - // associated to a VPN gateway. - Tunnels []string `json:"tunnels,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetVpnGateway) MarshalJSON() ([]byte, error) { - type noMethod TargetVpnGateway - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetVpnGatewayAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetVpnGateway resources. - Items map[string]TargetVpnGatewaysScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#targetVpnGateway - // for target VPN gateways. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetVpnGatewayAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod TargetVpnGatewayAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetVpnGatewayList: Contains a list of TargetVpnGateway resources. -type TargetVpnGatewayList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetVpnGateway resources. - Items []*TargetVpnGateway `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#targetVpnGateway - // for target VPN gateways. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetVpnGatewayList) MarshalJSON() ([]byte, error) { - type noMethod TargetVpnGatewayList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetVpnGatewaysScopedList struct { - // TargetVpnGateways: [Output Only] List of target vpn gateways - // contained in this scope. - TargetVpnGateways []*TargetVpnGateway `json:"targetVpnGateways,omitempty"` - - // Warning: [Output Only] Informational warning which replaces the list - // of addresses when the list is empty. - Warning *TargetVpnGatewaysScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "TargetVpnGateways") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "TargetVpnGateways") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetVpnGatewaysScopedList) MarshalJSON() ([]byte, error) { - type noMethod TargetVpnGatewaysScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetVpnGatewaysScopedListWarning: [Output Only] Informational -// warning which replaces the list of addresses when the list is empty. -type TargetVpnGatewaysScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*TargetVpnGatewaysScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetVpnGatewaysScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod TargetVpnGatewaysScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetVpnGatewaysScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetVpnGatewaysScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod TargetVpnGatewaysScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TestFailure struct { - ActualService string `json:"actualService,omitempty"` - - ExpectedService string `json:"expectedService,omitempty"` - - Host string `json:"host,omitempty"` - - Path string `json:"path,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ActualService") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ActualService") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TestFailure) MarshalJSON() ([]byte, error) { - type noMethod TestFailure - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// UrlMap: A UrlMap resource. This resource defines the mapping from URL -// to the BackendService resource, based on the "longest-match" of the -// URL's host and path. -type UrlMap struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // DefaultService: The URL of the BackendService resource if none of the - // hostRules match. - DefaultService string `json:"defaultService,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Fingerprint: Fingerprint of this resource. A hash of the contents - // stored in this object. This field is used in optimistic locking. This - // field will be ignored when inserting a UrlMap. An up-to-date - // fingerprint must be provided in order to update the UrlMap. - Fingerprint string `json:"fingerprint,omitempty"` - - // HostRules: The list of HostRules to use against the URL. - HostRules []*HostRule `json:"hostRules,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#urlMaps for - // url maps. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // PathMatchers: The list of named PathMatchers to use against the URL. - PathMatchers []*PathMatcher `json:"pathMatchers,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Tests: The list of expected URL mappings. Request to update this - // UrlMap will succeed only if all of the test cases pass. - Tests []*UrlMapTest `json:"tests,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *UrlMap) MarshalJSON() ([]byte, error) { - type noMethod UrlMap - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// UrlMapList: Contains a list of UrlMap resources. -type UrlMapList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of UrlMap resources. - Items []*UrlMap `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UrlMapList) MarshalJSON() ([]byte, error) { - type noMethod UrlMapList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type UrlMapReference struct { - UrlMap string `json:"urlMap,omitempty"` - - // ForceSendFields is a list of field names (e.g. "UrlMap") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "UrlMap") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UrlMapReference) MarshalJSON() ([]byte, error) { - type noMethod UrlMapReference - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// UrlMapTest: Message for the expected URL mappings. -type UrlMapTest struct { - // Description: Description of this test case. - Description string `json:"description,omitempty"` - - // Host: Host portion of the URL. - Host string `json:"host,omitempty"` - - // Path: Path portion of the URL. - Path string `json:"path,omitempty"` - - // Service: Expected BackendService resource the given URL should be - // mapped to. - Service string `json:"service,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UrlMapTest) MarshalJSON() ([]byte, error) { - type noMethod UrlMapTest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// UrlMapValidationResult: Message representing the validation result -// for a UrlMap. -type UrlMapValidationResult struct { - LoadErrors []string `json:"loadErrors,omitempty"` - - // LoadSucceeded: Whether the given UrlMap can be successfully loaded. - // If false, 'loadErrors' indicates the reasons. - LoadSucceeded bool `json:"loadSucceeded,omitempty"` - - TestFailures []*TestFailure `json:"testFailures,omitempty"` - - // TestPassed: If successfully loaded, this field indicates whether the - // test passed. If false, 'testFailures's indicate the reason of - // failure. - TestPassed bool `json:"testPassed,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LoadErrors") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "LoadErrors") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UrlMapValidationResult) MarshalJSON() ([]byte, error) { - type noMethod UrlMapValidationResult - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type UrlMapsValidateRequest struct { - // Resource: Content of the UrlMap to be validated. - Resource *UrlMap `json:"resource,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Resource") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Resource") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UrlMapsValidateRequest) MarshalJSON() ([]byte, error) { - type noMethod UrlMapsValidateRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type UrlMapsValidateResponse struct { - Result *UrlMapValidationResult `json:"result,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Result") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Result") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UrlMapsValidateResponse) MarshalJSON() ([]byte, error) { - type noMethod UrlMapsValidateResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// UsageExportLocation: The location in Cloud Storage and naming method -// of the daily usage report. Contains bucket_name and report_name -// prefix. -type UsageExportLocation struct { - // BucketName: The name of an existing bucket in Cloud Storage where the - // usage report object is stored. The Google Service Account is granted - // write access to this bucket. This can either be the bucket name by - // itself, such as example-bucket, or the bucket name with gs:// or - // https://storage.googleapis.com/ in front of it, such as - // gs://example-bucket. - BucketName string `json:"bucketName,omitempty"` - - // ReportNamePrefix: An optional prefix for the name of the usage report - // object stored in bucketName. If not supplied, defaults to usage. The - // report is stored as a CSV file named - // report_name_prefix_gce_YYYYMMDD.csv where YYYYMMDD is the day of the - // usage according to Pacific Time. If you supply a prefix, it should - // conform to Cloud Storage object naming conventions. - ReportNamePrefix string `json:"reportNamePrefix,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BucketName") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BucketName") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UsageExportLocation) MarshalJSON() ([]byte, error) { - type noMethod UsageExportLocation - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type VpnTunnel struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // DetailedStatus: [Output Only] Detailed status message for the VPN - // tunnel. - DetailedStatus string `json:"detailedStatus,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // IkeVersion: IKE protocol version to use when establishing the VPN - // tunnel with peer VPN gateway. Acceptable IKE versions are 1 or 2. - // Default version is 2. - IkeVersion int64 `json:"ikeVersion,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#vpnTunnel for - // VPN tunnels. - Kind string `json:"kind,omitempty"` - - // LocalTrafficSelector: Local traffic selector to use when establishing - // the VPN tunnel with peer VPN gateway. The value should be a CIDR - // formatted string, for example: 192.168.0.0/16. The ranges should be - // disjoint. Only IPv4 is supported. - LocalTrafficSelector []string `json:"localTrafficSelector,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // PeerIp: IP address of the peer VPN gateway. Only IPv4 is supported. - PeerIp string `json:"peerIp,omitempty"` - - // Region: [Output Only] URL of the region where the VPN tunnel resides. - Region string `json:"region,omitempty"` - - // RemoteTrafficSelector: Remote traffic selectors to use when - // establishing the VPN tunnel with peer VPN gateway. The value should - // be a CIDR formatted string, for example: 192.168.0.0/16. The ranges - // should be disjoint. Only IPv4 is supported. - RemoteTrafficSelector []string `json:"remoteTrafficSelector,omitempty"` - - // Router: URL of router resource to be used for dynamic routing. - Router string `json:"router,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // SharedSecret: Shared secret used to set the secure session between - // the Cloud VPN gateway and the peer VPN gateway. - SharedSecret string `json:"sharedSecret,omitempty"` - - // SharedSecretHash: Hash of the shared secret. - SharedSecretHash string `json:"sharedSecretHash,omitempty"` - - // Status: [Output Only] The status of the VPN tunnel. - // - // Possible values: - // "ALLOCATING_RESOURCES" - // "AUTHORIZATION_ERROR" - // "DEPROVISIONING" - // "ESTABLISHED" - // "FAILED" - // "FIRST_HANDSHAKE" - // "NEGOTIATION_FAILURE" - // "NETWORK_ERROR" - // "NO_INCOMING_PACKETS" - // "PROVISIONING" - // "REJECTED" - // "WAITING_FOR_FULL_CONFIG" - Status string `json:"status,omitempty"` - - // TargetVpnGateway: URL of the VPN gateway with which this VPN tunnel - // is associated. Provided by the client when the VPN tunnel is created. - TargetVpnGateway string `json:"targetVpnGateway,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *VpnTunnel) MarshalJSON() ([]byte, error) { - type noMethod VpnTunnel - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type VpnTunnelAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of VpnTunnelsScopedList resources. - Items map[string]VpnTunnelsScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#vpnTunnel for - // VPN tunnels. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *VpnTunnelAggregatedList) MarshalJSON() ([]byte, error) { - type noMethod VpnTunnelAggregatedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// VpnTunnelList: Contains a list of VpnTunnel resources. -type VpnTunnelList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of VpnTunnel resources. - Items []*VpnTunnel `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#vpnTunnel for - // VPN tunnels. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *VpnTunnelList) MarshalJSON() ([]byte, error) { - type noMethod VpnTunnelList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type VpnTunnelsScopedList struct { - // VpnTunnels: List of vpn tunnels contained in this scope. - VpnTunnels []*VpnTunnel `json:"vpnTunnels,omitempty"` - - // Warning: Informational warning which replaces the list of addresses - // when the list is empty. - Warning *VpnTunnelsScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "VpnTunnels") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "VpnTunnels") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *VpnTunnelsScopedList) MarshalJSON() ([]byte, error) { - type noMethod VpnTunnelsScopedList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// VpnTunnelsScopedListWarning: Informational warning which replaces the -// list of addresses when the list is empty. -type VpnTunnelsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - // "DEPRECATED_RESOURCE_USED" - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - // "FIELD_VALUE_OVERRIDEN" - // "INJECTED_KERNELS_DEPRECATED" - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - // "NEXT_HOP_CANNOT_IP_FORWARD" - // "NEXT_HOP_INSTANCE_NOT_FOUND" - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - // "NEXT_HOP_NOT_RUNNING" - // "NOT_CRITICAL_ERROR" - // "NO_RESULTS_ON_PAGE" - // "REQUIRED_TOS_AGREEMENT" - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - // "RESOURCE_NOT_DELETED" - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - // "UNREACHABLE" - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: - // "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*VpnTunnelsScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *VpnTunnelsScopedListWarning) MarshalJSON() ([]byte, error) { - type noMethod VpnTunnelsScopedListWarning - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type VpnTunnelsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *VpnTunnelsScopedListWarningData) MarshalJSON() ([]byte, error) { - type noMethod VpnTunnelsScopedListWarningData - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type XpnHostList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: [Output Only] A list of shared VPC host project URLs. - Items []*Project `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#xpnHostList for - // lists of shared VPC hosts. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XpnHostList) MarshalJSON() ([]byte, error) { - type noMethod XpnHostList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// XpnResourceId: Service resource (a.k.a service project) ID. -type XpnResourceId struct { - // Id: The ID of the service resource. In the case of projects, this - // field matches the project ID (e.g., my-project), not the project - // number (e.g., 12345678). - Id string `json:"id,omitempty"` - - // Type: The type of the service resource. - // - // Possible values: - // "PROJECT" - // "XPN_RESOURCE_TYPE_UNSPECIFIED" - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *XpnResourceId) MarshalJSON() ([]byte, error) { - type noMethod XpnResourceId - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Zone: A Zone resource. -type Zone struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Deprecated: [Output Only] The deprecation status associated with this - // zone. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - - // Description: [Output Only] Textual description of the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#zone for - // zones. - Kind string `json:"kind,omitempty"` - - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - - // Region: [Output Only] Full URL reference to the region which hosts - // the zone. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Status: [Output Only] Status of the zone, either UP or DOWN. - // - // Possible values: - // "DOWN" - // "UP" - Status string `json:"status,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Zone) MarshalJSON() ([]byte, error) { - type noMethod Zone - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ZoneList: Contains a list of zone resources. -type ZoneList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Zone resources. - Items []*Zone `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ZoneList) MarshalJSON() ([]byte, error) { - type noMethod ZoneList - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ZoneSetLabelsRequest struct { - // LabelFingerprint: The fingerprint of the previous set of labels for - // this resource, used to detect conflicts. The fingerprint is initially - // generated by Compute Engine and changes after every request to modify - // or update labels. You must always provide an up-to-date fingerprint - // hash in order to update or change labels. Make a get() request to the - // resource to get the latest fingerprint. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // Labels: The labels to set for this resource. - Labels map[string]string `json:"labels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LabelFingerprint") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "LabelFingerprint") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ZoneSetLabelsRequest) MarshalJSON() ([]byte, error) { - type noMethod ZoneSetLabelsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// method id "compute.acceleratorTypes.aggregatedList": - -type AcceleratorTypesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of accelerator types. -func (r *AcceleratorTypesService) AggregatedList(project string) *AcceleratorTypesAggregatedListCall { - c := &AcceleratorTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *AcceleratorTypesAggregatedListCall) Filter(filter string) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *AcceleratorTypesAggregatedListCall) MaxResults(maxResults int64) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *AcceleratorTypesAggregatedListCall) OrderBy(orderBy string) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *AcceleratorTypesAggregatedListCall) PageToken(pageToken string) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AcceleratorTypesAggregatedListCall) Fields(s ...googleapi.Field) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AcceleratorTypesAggregatedListCall) IfNoneMatch(entityTag string) *AcceleratorTypesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AcceleratorTypesAggregatedListCall) Context(ctx context.Context) *AcceleratorTypesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AcceleratorTypesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AcceleratorTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/acceleratorTypes") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.acceleratorTypes.aggregatedList" call. -// Exactly one of *AcceleratorTypeAggregatedList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *AcceleratorTypeAggregatedList.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AcceleratorTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*AcceleratorTypeAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AcceleratorTypeAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of accelerator types.", - // "httpMethod": "GET", - // "id": "compute.acceleratorTypes.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/acceleratorTypes", - // "response": { - // "$ref": "AcceleratorTypeAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AcceleratorTypesAggregatedListCall) Pages(ctx context.Context, f func(*AcceleratorTypeAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.acceleratorTypes.get": - -type AcceleratorTypesGetCall struct { - s *Service - project string - zone string - acceleratorType string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified accelerator type. Get a list of available -// accelerator types by making a list() request. -func (r *AcceleratorTypesService) Get(project string, zone string, acceleratorType string) *AcceleratorTypesGetCall { - c := &AcceleratorTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.acceleratorType = acceleratorType - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AcceleratorTypesGetCall) Fields(s ...googleapi.Field) *AcceleratorTypesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AcceleratorTypesGetCall) IfNoneMatch(entityTag string) *AcceleratorTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AcceleratorTypesGetCall) Context(ctx context.Context) *AcceleratorTypesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AcceleratorTypesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AcceleratorTypesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/acceleratorTypes/{acceleratorType}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "acceleratorType": c.acceleratorType, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.acceleratorTypes.get" call. -// Exactly one of *AcceleratorType or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *AcceleratorType.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AcceleratorTypesGetCall) Do(opts ...googleapi.CallOption) (*AcceleratorType, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AcceleratorType{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified accelerator type. Get a list of available accelerator types by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.acceleratorTypes.get", - // "parameterOrder": [ - // "project", - // "zone", - // "acceleratorType" - // ], - // "parameters": { - // "acceleratorType": { - // "description": "Name of the accelerator type to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/acceleratorTypes/{acceleratorType}", - // "response": { - // "$ref": "AcceleratorType" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.acceleratorTypes.list": - -type AcceleratorTypesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of accelerator types available to the -// specified project. -func (r *AcceleratorTypesService) List(project string, zone string) *AcceleratorTypesListCall { - c := &AcceleratorTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *AcceleratorTypesListCall) Filter(filter string) *AcceleratorTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *AcceleratorTypesListCall) MaxResults(maxResults int64) *AcceleratorTypesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *AcceleratorTypesListCall) OrderBy(orderBy string) *AcceleratorTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *AcceleratorTypesListCall) PageToken(pageToken string) *AcceleratorTypesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AcceleratorTypesListCall) Fields(s ...googleapi.Field) *AcceleratorTypesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AcceleratorTypesListCall) IfNoneMatch(entityTag string) *AcceleratorTypesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AcceleratorTypesListCall) Context(ctx context.Context) *AcceleratorTypesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AcceleratorTypesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AcceleratorTypesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/acceleratorTypes") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.acceleratorTypes.list" call. -// Exactly one of *AcceleratorTypeList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *AcceleratorTypeList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AcceleratorTypesListCall) Do(opts ...googleapi.CallOption) (*AcceleratorTypeList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AcceleratorTypeList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of accelerator types available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.acceleratorTypes.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/acceleratorTypes", - // "response": { - // "$ref": "AcceleratorTypeList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AcceleratorTypesListCall) Pages(ctx context.Context, f func(*AcceleratorTypeList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.addresses.aggregatedList": - -type AddressesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of addresses. -// For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/aggregatedList -func (r *AddressesService) AggregatedList(project string) *AddressesAggregatedListCall { - c := &AddressesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *AddressesAggregatedListCall) Filter(filter string) *AddressesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *AddressesAggregatedListCall) MaxResults(maxResults int64) *AddressesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *AddressesAggregatedListCall) OrderBy(orderBy string) *AddressesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *AddressesAggregatedListCall) PageToken(pageToken string) *AddressesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AddressesAggregatedListCall) Fields(s ...googleapi.Field) *AddressesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AddressesAggregatedListCall) IfNoneMatch(entityTag string) *AddressesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AddressesAggregatedListCall) Context(ctx context.Context) *AddressesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AddressesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/addresses") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.aggregatedList" call. -// Exactly one of *AddressAggregatedList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *AddressAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AddressesAggregatedListCall) Do(opts ...googleapi.CallOption) (*AddressAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AddressAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of addresses.", - // "httpMethod": "GET", - // "id": "compute.addresses.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/addresses", - // "response": { - // "$ref": "AddressAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AddressesAggregatedListCall) Pages(ctx context.Context, f func(*AddressAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.addresses.delete": - -type AddressesDeleteCall struct { - s *Service - project string - region string - address string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified address resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/delete -func (r *AddressesService) Delete(project string, region string, address string) *AddressesDeleteCall { - c := &AddressesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.address = address - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AddressesDeleteCall) Fields(s ...googleapi.Field) *AddressesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AddressesDeleteCall) Context(ctx context.Context) *AddressesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AddressesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses/{address}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "address": c.address, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified address resource.", - // "httpMethod": "DELETE", - // "id": "compute.addresses.delete", - // "parameterOrder": [ - // "project", - // "region", - // "address" - // ], - // "parameters": { - // "address": { - // "description": "Name of the address resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/addresses/{address}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.addresses.get": - -type AddressesGetCall struct { - s *Service - project string - region string - address string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified address resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/get -func (r *AddressesService) Get(project string, region string, address string) *AddressesGetCall { - c := &AddressesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.address = address - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AddressesGetCall) Fields(s ...googleapi.Field) *AddressesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AddressesGetCall) IfNoneMatch(entityTag string) *AddressesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AddressesGetCall) Context(ctx context.Context) *AddressesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AddressesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses/{address}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "address": c.address, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.get" call. -// Exactly one of *Address or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Address.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *AddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Address{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified address resource.", - // "httpMethod": "GET", - // "id": "compute.addresses.get", - // "parameterOrder": [ - // "project", - // "region", - // "address" - // ], - // "parameters": { - // "address": { - // "description": "Name of the address resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/addresses/{address}", - // "response": { - // "$ref": "Address" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.addresses.insert": - -type AddressesInsertCall struct { - s *Service - project string - region string - address *Address - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an address resource in the specified project using -// the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/insert -func (r *AddressesService) Insert(project string, region string, address *Address) *AddressesInsertCall { - c := &AddressesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.address = address - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AddressesInsertCall) Fields(s ...googleapi.Field) *AddressesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AddressesInsertCall) Context(ctx context.Context) *AddressesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AddressesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.address) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates an address resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.addresses.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/addresses", - // "request": { - // "$ref": "Address" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.addresses.list": - -type AddressesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of addresses contained within the specified -// region. -// For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/list -func (r *AddressesService) List(project string, region string) *AddressesListCall { - c := &AddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *AddressesListCall) Filter(filter string) *AddressesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *AddressesListCall) MaxResults(maxResults int64) *AddressesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *AddressesListCall) OrderBy(orderBy string) *AddressesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *AddressesListCall) PageToken(pageToken string) *AddressesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AddressesListCall) Fields(s ...googleapi.Field) *AddressesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AddressesListCall) IfNoneMatch(entityTag string) *AddressesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AddressesListCall) Context(ctx context.Context) *AddressesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AddressesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.list" call. -// Exactly one of *AddressList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *AddressList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AddressList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of addresses contained within the specified region.", - // "httpMethod": "GET", - // "id": "compute.addresses.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/addresses", - // "response": { - // "$ref": "AddressList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AddressesListCall) Pages(ctx context.Context, f func(*AddressList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.autoscalers.aggregatedList": - -type AutoscalersAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of autoscalers. -func (r *AutoscalersService) AggregatedList(project string) *AutoscalersAggregatedListCall { - c := &AutoscalersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *AutoscalersAggregatedListCall) Filter(filter string) *AutoscalersAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *AutoscalersAggregatedListCall) MaxResults(maxResults int64) *AutoscalersAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *AutoscalersAggregatedListCall) OrderBy(orderBy string) *AutoscalersAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *AutoscalersAggregatedListCall) PageToken(pageToken string) *AutoscalersAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AutoscalersAggregatedListCall) Fields(s ...googleapi.Field) *AutoscalersAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AutoscalersAggregatedListCall) IfNoneMatch(entityTag string) *AutoscalersAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AutoscalersAggregatedListCall) Context(ctx context.Context) *AutoscalersAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AutoscalersAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.aggregatedList" call. -// Exactly one of *AutoscalerAggregatedList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *AutoscalerAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AutoscalersAggregatedListCall) Do(opts ...googleapi.CallOption) (*AutoscalerAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AutoscalerAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of autoscalers.", - // "httpMethod": "GET", - // "id": "compute.autoscalers.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/autoscalers", - // "response": { - // "$ref": "AutoscalerAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AutoscalersAggregatedListCall) Pages(ctx context.Context, f func(*AutoscalerAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.autoscalers.delete": - -type AutoscalersDeleteCall struct { - s *Service - project string - zone string - autoscaler string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified autoscaler. -func (r *AutoscalersService) Delete(project string, zone string, autoscaler string) *AutoscalersDeleteCall { - c := &AutoscalersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.autoscaler = autoscaler - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AutoscalersDeleteCall) Fields(s ...googleapi.Field) *AutoscalersDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AutoscalersDeleteCall) Context(ctx context.Context) *AutoscalersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AutoscalersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers/{autoscaler}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "autoscaler": c.autoscaler, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified autoscaler.", - // "httpMethod": "DELETE", - // "id": "compute.autoscalers.delete", - // "parameterOrder": [ - // "project", - // "zone", - // "autoscaler" - // ], - // "parameters": { - // "autoscaler": { - // "description": "Name of the autoscaler to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/autoscalers/{autoscaler}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.autoscalers.get": - -type AutoscalersGetCall struct { - s *Service - project string - zone string - autoscaler string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified autoscaler resource. Get a list of -// available autoscalers by making a list() request. -func (r *AutoscalersService) Get(project string, zone string, autoscaler string) *AutoscalersGetCall { - c := &AutoscalersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.autoscaler = autoscaler - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AutoscalersGetCall) Fields(s ...googleapi.Field) *AutoscalersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AutoscalersGetCall) IfNoneMatch(entityTag string) *AutoscalersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AutoscalersGetCall) Context(ctx context.Context) *AutoscalersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AutoscalersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers/{autoscaler}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "autoscaler": c.autoscaler, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.get" call. -// Exactly one of *Autoscaler or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Autoscaler.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Autoscaler{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified autoscaler resource. Get a list of available autoscalers by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.autoscalers.get", - // "parameterOrder": [ - // "project", - // "zone", - // "autoscaler" - // ], - // "parameters": { - // "autoscaler": { - // "description": "Name of the autoscaler to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/autoscalers/{autoscaler}", - // "response": { - // "$ref": "Autoscaler" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.autoscalers.insert": - -type AutoscalersInsertCall struct { - s *Service - project string - zone string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an autoscaler in the specified project using the data -// included in the request. -func (r *AutoscalersService) Insert(project string, zone string, autoscaler *Autoscaler) *AutoscalersInsertCall { - c := &AutoscalersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.autoscaler = autoscaler - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AutoscalersInsertCall) Fields(s ...googleapi.Field) *AutoscalersInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AutoscalersInsertCall) Context(ctx context.Context) *AutoscalersInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AutoscalersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates an autoscaler in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.autoscalers.insert", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/autoscalers", - // "request": { - // "$ref": "Autoscaler" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.autoscalers.list": - -type AutoscalersListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of autoscalers contained within the specified -// zone. -func (r *AutoscalersService) List(project string, zone string) *AutoscalersListCall { - c := &AutoscalersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *AutoscalersListCall) Filter(filter string) *AutoscalersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *AutoscalersListCall) MaxResults(maxResults int64) *AutoscalersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *AutoscalersListCall) OrderBy(orderBy string) *AutoscalersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *AutoscalersListCall) PageToken(pageToken string) *AutoscalersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AutoscalersListCall) Fields(s ...googleapi.Field) *AutoscalersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AutoscalersListCall) IfNoneMatch(entityTag string) *AutoscalersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AutoscalersListCall) Context(ctx context.Context) *AutoscalersListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AutoscalersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.list" call. -// Exactly one of *AutoscalerList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *AutoscalerList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AutoscalersListCall) Do(opts ...googleapi.CallOption) (*AutoscalerList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AutoscalerList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of autoscalers contained within the specified zone.", - // "httpMethod": "GET", - // "id": "compute.autoscalers.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/autoscalers", - // "response": { - // "$ref": "AutoscalerList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AutoscalersListCall) Pages(ctx context.Context, f func(*AutoscalerList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.autoscalers.patch": - -type AutoscalersPatchCall struct { - s *Service - project string - zone string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates an autoscaler in the specified project using the data -// included in the request. This method supports PATCH semantics and -// uses the JSON merge patch format and processing rules. -func (r *AutoscalersService) Patch(project string, zone string, autoscaler *Autoscaler) *AutoscalersPatchCall { - c := &AutoscalersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.autoscaler = autoscaler - return c -} - -// Autoscaler sets the optional parameter "autoscaler": Name of the -// autoscaler to patch. -func (c *AutoscalersPatchCall) Autoscaler(autoscaler string) *AutoscalersPatchCall { - c.urlParams_.Set("autoscaler", autoscaler) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AutoscalersPatchCall) Fields(s ...googleapi.Field) *AutoscalersPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AutoscalersPatchCall) Context(ctx context.Context) *AutoscalersPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AutoscalersPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.autoscalers.patch", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "autoscaler": { - // "description": "Name of the autoscaler to patch.", - // "location": "query", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/autoscalers", - // "request": { - // "$ref": "Autoscaler" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.autoscalers.update": - -type AutoscalersUpdateCall struct { - s *Service - project string - zone string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates an autoscaler in the specified project using the data -// included in the request. -func (r *AutoscalersService) Update(project string, zone string, autoscaler *Autoscaler) *AutoscalersUpdateCall { - c := &AutoscalersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.autoscaler = autoscaler - return c -} - -// Autoscaler sets the optional parameter "autoscaler": Name of the -// autoscaler to update. -func (c *AutoscalersUpdateCall) Autoscaler(autoscaler string) *AutoscalersUpdateCall { - c.urlParams_.Set("autoscaler", autoscaler) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AutoscalersUpdateCall) Fields(s ...googleapi.Field) *AutoscalersUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AutoscalersUpdateCall) Context(ctx context.Context) *AutoscalersUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AutoscalersUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates an autoscaler in the specified project using the data included in the request.", - // "httpMethod": "PUT", - // "id": "compute.autoscalers.update", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "autoscaler": { - // "description": "Name of the autoscaler to update.", - // "location": "query", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/autoscalers", - // "request": { - // "$ref": "Autoscaler" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.backendBuckets.delete": - -type BackendBucketsDeleteCall struct { - s *Service - project string - backendBucket string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified BackendBucket resource. -func (r *BackendBucketsService) Delete(project string, backendBucket string) *BackendBucketsDeleteCall { - c := &BackendBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendBucket = backendBucket - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendBucketsDeleteCall) Fields(s ...googleapi.Field) *BackendBucketsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendBucketsDeleteCall) Context(ctx context.Context) *BackendBucketsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendBucketsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets/{backendBucket}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendBucket": c.backendBucket, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified BackendBucket resource.", - // "httpMethod": "DELETE", - // "id": "compute.backendBuckets.delete", - // "parameterOrder": [ - // "project", - // "backendBucket" - // ], - // "parameters": { - // "backendBucket": { - // "description": "Name of the BackendBucket resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/backendBuckets/{backendBucket}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.backendBuckets.get": - -type BackendBucketsGetCall struct { - s *Service - project string - backendBucket string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified BackendBucket resource. Get a list of -// available backend buckets by making a list() request. -func (r *BackendBucketsService) Get(project string, backendBucket string) *BackendBucketsGetCall { - c := &BackendBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendBucket = backendBucket - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendBucketsGetCall) Fields(s ...googleapi.Field) *BackendBucketsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *BackendBucketsGetCall) IfNoneMatch(entityTag string) *BackendBucketsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendBucketsGetCall) Context(ctx context.Context) *BackendBucketsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendBucketsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets/{backendBucket}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendBucket": c.backendBucket, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.get" call. -// Exactly one of *BackendBucket or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *BackendBucket.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *BackendBucketsGetCall) Do(opts ...googleapi.CallOption) (*BackendBucket, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &BackendBucket{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified BackendBucket resource. Get a list of available backend buckets by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.backendBuckets.get", - // "parameterOrder": [ - // "project", - // "backendBucket" - // ], - // "parameters": { - // "backendBucket": { - // "description": "Name of the BackendBucket resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/backendBuckets/{backendBucket}", - // "response": { - // "$ref": "BackendBucket" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.backendBuckets.insert": - -type BackendBucketsInsertCall struct { - s *Service - project string - backendbucket *BackendBucket - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a BackendBucket resource in the specified project -// using the data included in the request. -func (r *BackendBucketsService) Insert(project string, backendbucket *BackendBucket) *BackendBucketsInsertCall { - c := &BackendBucketsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendbucket = backendbucket - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendBucketsInsertCall) Fields(s ...googleapi.Field) *BackendBucketsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendBucketsInsertCall) Context(ctx context.Context) *BackendBucketsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendBucketsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendbucket) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendBucketsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a BackendBucket resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.backendBuckets.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/backendBuckets", - // "request": { - // "$ref": "BackendBucket" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.backendBuckets.list": - -type BackendBucketsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of BackendBucket resources available to the -// specified project. -func (r *BackendBucketsService) List(project string) *BackendBucketsListCall { - c := &BackendBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *BackendBucketsListCall) Filter(filter string) *BackendBucketsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *BackendBucketsListCall) MaxResults(maxResults int64) *BackendBucketsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *BackendBucketsListCall) OrderBy(orderBy string) *BackendBucketsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *BackendBucketsListCall) PageToken(pageToken string) *BackendBucketsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendBucketsListCall) Fields(s ...googleapi.Field) *BackendBucketsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *BackendBucketsListCall) IfNoneMatch(entityTag string) *BackendBucketsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendBucketsListCall) Context(ctx context.Context) *BackendBucketsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendBucketsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.list" call. -// Exactly one of *BackendBucketList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *BackendBucketList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *BackendBucketsListCall) Do(opts ...googleapi.CallOption) (*BackendBucketList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &BackendBucketList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of BackendBucket resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.backendBuckets.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/backendBuckets", - // "response": { - // "$ref": "BackendBucketList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *BackendBucketsListCall) Pages(ctx context.Context, f func(*BackendBucketList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.backendBuckets.patch": - -type BackendBucketsPatchCall struct { - s *Service - project string - backendBucket string - backendbucket *BackendBucket - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified BackendBucket resource with the data -// included in the request. This method supports PATCH semantics and -// uses the JSON merge patch format and processing rules. -func (r *BackendBucketsService) Patch(project string, backendBucket string, backendbucket *BackendBucket) *BackendBucketsPatchCall { - c := &BackendBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendBucket = backendBucket - c.backendbucket = backendbucket - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendBucketsPatchCall) Fields(s ...googleapi.Field) *BackendBucketsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendBucketsPatchCall) Context(ctx context.Context) *BackendBucketsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendBucketsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendbucket) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets/{backendBucket}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendBucket": c.backendBucket, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendBucketsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.backendBuckets.patch", - // "parameterOrder": [ - // "project", - // "backendBucket" - // ], - // "parameters": { - // "backendBucket": { - // "description": "Name of the BackendBucket resource to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/backendBuckets/{backendBucket}", - // "request": { - // "$ref": "BackendBucket" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.backendBuckets.update": - -type BackendBucketsUpdateCall struct { - s *Service - project string - backendBucket string - backendbucket *BackendBucket - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified BackendBucket resource with the data -// included in the request. -func (r *BackendBucketsService) Update(project string, backendBucket string, backendbucket *BackendBucket) *BackendBucketsUpdateCall { - c := &BackendBucketsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendBucket = backendBucket - c.backendbucket = backendbucket - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendBucketsUpdateCall) Fields(s ...googleapi.Field) *BackendBucketsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendBucketsUpdateCall) Context(ctx context.Context) *BackendBucketsUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendBucketsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendbucket) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets/{backendBucket}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendBucket": c.backendBucket, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendBucketsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the specified BackendBucket resource with the data included in the request.", - // "httpMethod": "PUT", - // "id": "compute.backendBuckets.update", - // "parameterOrder": [ - // "project", - // "backendBucket" - // ], - // "parameters": { - // "backendBucket": { - // "description": "Name of the BackendBucket resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/backendBuckets/{backendBucket}", - // "request": { - // "$ref": "BackendBucket" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.backendServices.aggregatedList": - -type BackendServicesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all BackendService resources, -// regional and global, available to the specified project. -func (r *BackendServicesService) AggregatedList(project string) *BackendServicesAggregatedListCall { - c := &BackendServicesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *BackendServicesAggregatedListCall) Filter(filter string) *BackendServicesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *BackendServicesAggregatedListCall) MaxResults(maxResults int64) *BackendServicesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *BackendServicesAggregatedListCall) OrderBy(orderBy string) *BackendServicesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *BackendServicesAggregatedListCall) PageToken(pageToken string) *BackendServicesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendServicesAggregatedListCall) Fields(s ...googleapi.Field) *BackendServicesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *BackendServicesAggregatedListCall) IfNoneMatch(entityTag string) *BackendServicesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendServicesAggregatedListCall) Context(ctx context.Context) *BackendServicesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendServicesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/backendServices") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.aggregatedList" call. -// Exactly one of *BackendServiceAggregatedList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *BackendServiceAggregatedList.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *BackendServicesAggregatedListCall) Do(opts ...googleapi.CallOption) (*BackendServiceAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &BackendServiceAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of all BackendService resources, regional and global, available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.backendServices.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Name of the project scoping this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/backendServices", - // "response": { - // "$ref": "BackendServiceAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *BackendServicesAggregatedListCall) Pages(ctx context.Context, f func(*BackendServiceAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.backendServices.delete": - -type BackendServicesDeleteCall struct { - s *Service - project string - backendService string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified BackendService resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/delete -func (r *BackendServicesService) Delete(project string, backendService string) *BackendServicesDeleteCall { - c := &BackendServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendServicesDeleteCall) Fields(s ...googleapi.Field) *BackendServicesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendServicesDeleteCall) Context(ctx context.Context) *BackendServicesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendServicesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified BackendService resource.", - // "httpMethod": "DELETE", - // "id": "compute.backendServices.delete", - // "parameterOrder": [ - // "project", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/backendServices/{backendService}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.backendServices.get": - -type BackendServicesGetCall struct { - s *Service - project string - backendService string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified BackendService resource. Get a list of -// available backend services by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/get -func (r *BackendServicesService) Get(project string, backendService string) *BackendServicesGetCall { - c := &BackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendServicesGetCall) Fields(s ...googleapi.Field) *BackendServicesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *BackendServicesGetCall) IfNoneMatch(entityTag string) *BackendServicesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendServicesGetCall) Context(ctx context.Context) *BackendServicesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendServicesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.get" call. -// Exactly one of *BackendService or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *BackendService.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *BackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendService, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &BackendService{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified BackendService resource. Get a list of available backend services by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.backendServices.get", - // "parameterOrder": [ - // "project", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/backendServices/{backendService}", - // "response": { - // "$ref": "BackendService" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.backendServices.getHealth": - -type BackendServicesGetHealthCall struct { - s *Service - project string - backendService string - resourcegroupreference *ResourceGroupReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetHealth: Gets the most recent health check results for this -// BackendService. -// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/getHealth -func (r *BackendServicesService) GetHealth(project string, backendService string, resourcegroupreference *ResourceGroupReference) *BackendServicesGetHealthCall { - c := &BackendServicesGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - c.resourcegroupreference = resourcegroupreference - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendServicesGetHealthCall) Fields(s ...googleapi.Field) *BackendServicesGetHealthCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendServicesGetHealthCall) Context(ctx context.Context) *BackendServicesGetHealthCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendServicesGetHealthCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesGetHealthCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourcegroupreference) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}/getHealth") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.getHealth" call. -// Exactly one of *BackendServiceGroupHealth or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *BackendServiceGroupHealth.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *BackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*BackendServiceGroupHealth, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &BackendServiceGroupHealth{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the most recent health check results for this BackendService.", - // "httpMethod": "POST", - // "id": "compute.backendServices.getHealth", - // "parameterOrder": [ - // "project", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to which the queried instance belongs.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/backendServices/{backendService}/getHealth", - // "request": { - // "$ref": "ResourceGroupReference" - // }, - // "response": { - // "$ref": "BackendServiceGroupHealth" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.backendServices.insert": - -type BackendServicesInsertCall struct { - s *Service - project string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a BackendService resource in the specified project -// using the data included in the request. There are several -// restrictions and guidelines to keep in mind when creating a backend -// service. Read Restrictions and Guidelines for more information. -// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/insert -func (r *BackendServicesService) Insert(project string, backendservice *BackendService) *BackendServicesInsertCall { - c := &BackendServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendservice = backendservice - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendServicesInsertCall) Fields(s ...googleapi.Field) *BackendServicesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendServicesInsertCall) Context(ctx context.Context) *BackendServicesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendServicesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Restrictions and Guidelines for more information.", - // "httpMethod": "POST", - // "id": "compute.backendServices.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/backendServices", - // "request": { - // "$ref": "BackendService" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.backendServices.list": - -type BackendServicesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of BackendService resources available to the -// specified project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/list -func (r *BackendServicesService) List(project string) *BackendServicesListCall { - c := &BackendServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *BackendServicesListCall) Filter(filter string) *BackendServicesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *BackendServicesListCall) MaxResults(maxResults int64) *BackendServicesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *BackendServicesListCall) OrderBy(orderBy string) *BackendServicesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *BackendServicesListCall) PageToken(pageToken string) *BackendServicesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendServicesListCall) Fields(s ...googleapi.Field) *BackendServicesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *BackendServicesListCall) IfNoneMatch(entityTag string) *BackendServicesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendServicesListCall) Context(ctx context.Context) *BackendServicesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendServicesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.list" call. -// Exactly one of *BackendServiceList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *BackendServiceList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *BackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServiceList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &BackendServiceList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of BackendService resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.backendServices.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/backendServices", - // "response": { - // "$ref": "BackendServiceList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *BackendServicesListCall) Pages(ctx context.Context, f func(*BackendServiceList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.backendServices.patch": - -type BackendServicesPatchCall struct { - s *Service - project string - backendService string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified BackendService resource with the data -// included in the request. There are several restrictions and -// guidelines to keep in mind when updating a backend service. Read -// Restrictions and Guidelines for more information. This method -// supports PATCH semantics and uses the JSON merge patch format and -// processing rules. -// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/patch -func (r *BackendServicesService) Patch(project string, backendService string, backendservice *BackendService) *BackendServicesPatchCall { - c := &BackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - c.backendservice = backendservice - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendServicesPatchCall) Fields(s ...googleapi.Field) *BackendServicesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendServicesPatchCall) Context(ctx context.Context) *BackendServicesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendServicesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Patches the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.backendServices.patch", - // "parameterOrder": [ - // "project", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/backendServices/{backendService}", - // "request": { - // "$ref": "BackendService" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.backendServices.update": - -type BackendServicesUpdateCall struct { - s *Service - project string - backendService string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified BackendService resource with the data -// included in the request. There are several restrictions and -// guidelines to keep in mind when updating a backend service. Read -// Restrictions and Guidelines for more information. -// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/update -func (r *BackendServicesService) Update(project string, backendService string, backendservice *BackendService) *BackendServicesUpdateCall { - c := &BackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - c.backendservice = backendservice - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendServicesUpdateCall) Fields(s ...googleapi.Field) *BackendServicesUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *BackendServicesUpdateCall) Context(ctx context.Context) *BackendServicesUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendServicesUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information.", - // "httpMethod": "PUT", - // "id": "compute.backendServices.update", - // "parameterOrder": [ - // "project", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/backendServices/{backendService}", - // "request": { - // "$ref": "BackendService" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.diskTypes.aggregatedList": - -type DiskTypesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of disk types. -// For details, see https://cloud.google.com/compute/docs/reference/latest/diskTypes/aggregatedList -func (r *DiskTypesService) AggregatedList(project string) *DiskTypesAggregatedListCall { - c := &DiskTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *DiskTypesAggregatedListCall) Filter(filter string) *DiskTypesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *DiskTypesAggregatedListCall) MaxResults(maxResults int64) *DiskTypesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *DiskTypesAggregatedListCall) OrderBy(orderBy string) *DiskTypesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *DiskTypesAggregatedListCall) PageToken(pageToken string) *DiskTypesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DiskTypesAggregatedListCall) Fields(s ...googleapi.Field) *DiskTypesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *DiskTypesAggregatedListCall) IfNoneMatch(entityTag string) *DiskTypesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DiskTypesAggregatedListCall) Context(ctx context.Context) *DiskTypesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DiskTypesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DiskTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/diskTypes") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.diskTypes.aggregatedList" call. -// Exactly one of *DiskTypeAggregatedList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *DiskTypeAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *DiskTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskTypeAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &DiskTypeAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of disk types.", - // "httpMethod": "GET", - // "id": "compute.diskTypes.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/diskTypes", - // "response": { - // "$ref": "DiskTypeAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *DiskTypesAggregatedListCall) Pages(ctx context.Context, f func(*DiskTypeAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.diskTypes.get": - -type DiskTypesGetCall struct { - s *Service - project string - zone string - diskType string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified disk type. Get a list of available disk -// types by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/diskTypes/get -func (r *DiskTypesService) Get(project string, zone string, diskType string) *DiskTypesGetCall { - c := &DiskTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.diskType = diskType - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DiskTypesGetCall) Fields(s ...googleapi.Field) *DiskTypesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *DiskTypesGetCall) IfNoneMatch(entityTag string) *DiskTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DiskTypesGetCall) Context(ctx context.Context) *DiskTypesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DiskTypesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DiskTypesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/diskTypes/{diskType}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "diskType": c.diskType, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.diskTypes.get" call. -// Exactly one of *DiskType or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *DiskType.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &DiskType{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified disk type. Get a list of available disk types by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.diskTypes.get", - // "parameterOrder": [ - // "project", - // "zone", - // "diskType" - // ], - // "parameters": { - // "diskType": { - // "description": "Name of the disk type to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/diskTypes/{diskType}", - // "response": { - // "$ref": "DiskType" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.diskTypes.list": - -type DiskTypesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of disk types available to the specified -// project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/diskTypes/list -func (r *DiskTypesService) List(project string, zone string) *DiskTypesListCall { - c := &DiskTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *DiskTypesListCall) Filter(filter string) *DiskTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *DiskTypesListCall) MaxResults(maxResults int64) *DiskTypesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *DiskTypesListCall) OrderBy(orderBy string) *DiskTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *DiskTypesListCall) PageToken(pageToken string) *DiskTypesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DiskTypesListCall) Fields(s ...googleapi.Field) *DiskTypesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *DiskTypesListCall) IfNoneMatch(entityTag string) *DiskTypesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DiskTypesListCall) Context(ctx context.Context) *DiskTypesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DiskTypesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DiskTypesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/diskTypes") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.diskTypes.list" call. -// Exactly one of *DiskTypeList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *DiskTypeList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DiskTypesListCall) Do(opts ...googleapi.CallOption) (*DiskTypeList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &DiskTypeList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of disk types available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.diskTypes.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/diskTypes", - // "response": { - // "$ref": "DiskTypeList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *DiskTypesListCall) Pages(ctx context.Context, f func(*DiskTypeList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.disks.aggregatedList": - -type DisksAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of persistent disks. -// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/aggregatedList -func (r *DisksService) AggregatedList(project string) *DisksAggregatedListCall { - c := &DisksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *DisksAggregatedListCall) Filter(filter string) *DisksAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *DisksAggregatedListCall) MaxResults(maxResults int64) *DisksAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *DisksAggregatedListCall) OrderBy(orderBy string) *DisksAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *DisksAggregatedListCall) PageToken(pageToken string) *DisksAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DisksAggregatedListCall) Fields(s ...googleapi.Field) *DisksAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *DisksAggregatedListCall) IfNoneMatch(entityTag string) *DisksAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DisksAggregatedListCall) Context(ctx context.Context) *DisksAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DisksAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/disks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.aggregatedList" call. -// Exactly one of *DiskAggregatedList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *DiskAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *DisksAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &DiskAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of persistent disks.", - // "httpMethod": "GET", - // "id": "compute.disks.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/disks", - // "response": { - // "$ref": "DiskAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *DisksAggregatedListCall) Pages(ctx context.Context, f func(*DiskAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.disks.createSnapshot": - -type DisksCreateSnapshotCall struct { - s *Service - project string - zone string - disk string - snapshot *Snapshot - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CreateSnapshot: Creates a snapshot of a specified persistent disk. -// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/createSnapshot -func (r *DisksService) CreateSnapshot(project string, zone string, disk string, snapshot *Snapshot) *DisksCreateSnapshotCall { - c := &DisksCreateSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - c.snapshot = snapshot - return c -} - -// GuestFlush sets the optional parameter "guestFlush": -func (c *DisksCreateSnapshotCall) GuestFlush(guestFlush bool) *DisksCreateSnapshotCall { - c.urlParams_.Set("guestFlush", fmt.Sprint(guestFlush)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DisksCreateSnapshotCall) Fields(s ...googleapi.Field) *DisksCreateSnapshotCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DisksCreateSnapshotCall) Context(ctx context.Context) *DisksCreateSnapshotCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DisksCreateSnapshotCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.snapshot) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}/createSnapshot") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.createSnapshot" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a snapshot of a specified persistent disk.", - // "httpMethod": "POST", - // "id": "compute.disks.createSnapshot", - // "parameterOrder": [ - // "project", - // "zone", - // "disk" - // ], - // "parameters": { - // "disk": { - // "description": "Name of the persistent disk to snapshot.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "guestFlush": { - // "location": "query", - // "type": "boolean" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/disks/{disk}/createSnapshot", - // "request": { - // "$ref": "Snapshot" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.disks.delete": - -type DisksDeleteCall struct { - s *Service - project string - zone string - disk string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified persistent disk. Deleting a disk -// removes its data permanently and is irreversible. However, deleting a -// disk does not delete any snapshots previously made from the disk. You -// must separately delete snapshots. -// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/delete -func (r *DisksService) Delete(project string, zone string, disk string) *DisksDeleteCall { - c := &DisksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DisksDeleteCall) Fields(s ...googleapi.Field) *DisksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DisksDeleteCall) Context(ctx context.Context) *DisksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DisksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.", - // "httpMethod": "DELETE", - // "id": "compute.disks.delete", - // "parameterOrder": [ - // "project", - // "zone", - // "disk" - // ], - // "parameters": { - // "disk": { - // "description": "Name of the persistent disk to delete.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/disks/{disk}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.disks.get": - -type DisksGetCall struct { - s *Service - project string - zone string - disk string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns a specified persistent disk. Get a list of available -// persistent disks by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/get -func (r *DisksService) Get(project string, zone string, disk string) *DisksGetCall { - c := &DisksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DisksGetCall) Fields(s ...googleapi.Field) *DisksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *DisksGetCall) IfNoneMatch(entityTag string) *DisksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DisksGetCall) Context(ctx context.Context) *DisksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DisksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.get" call. -// Exactly one of *Disk or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Disk.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *DisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Disk{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns a specified persistent disk. Get a list of available persistent disks by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.disks.get", - // "parameterOrder": [ - // "project", - // "zone", - // "disk" - // ], - // "parameters": { - // "disk": { - // "description": "Name of the persistent disk to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/disks/{disk}", - // "response": { - // "$ref": "Disk" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.disks.insert": - -type DisksInsertCall struct { - s *Service - project string - zone string - disk *Disk - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a persistent disk in the specified project using the -// data in the request. You can create a disk with a sourceImage, a -// sourceSnapshot, or create an empty 500 GB data disk by omitting all -// properties. You can also create a disk that is larger than the -// default size by specifying the sizeGb property. -// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/insert -func (r *DisksService) Insert(project string, zone string, disk *Disk) *DisksInsertCall { - c := &DisksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - return c -} - -// SourceImage sets the optional parameter "sourceImage": Source image -// to restore onto a disk. -func (c *DisksInsertCall) SourceImage(sourceImage string) *DisksInsertCall { - c.urlParams_.Set("sourceImage", sourceImage) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DisksInsertCall) Fields(s ...googleapi.Field) *DisksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DisksInsertCall) Context(ctx context.Context) *DisksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DisksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.disk) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.", - // "httpMethod": "POST", - // "id": "compute.disks.insert", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "sourceImage": { - // "description": "Optional. Source image to restore onto a disk.", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/disks", - // "request": { - // "$ref": "Disk" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.disks.list": - -type DisksListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of persistent disks contained within the -// specified zone. -// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/list -func (r *DisksService) List(project string, zone string) *DisksListCall { - c := &DisksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *DisksListCall) Filter(filter string) *DisksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *DisksListCall) MaxResults(maxResults int64) *DisksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *DisksListCall) OrderBy(orderBy string) *DisksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *DisksListCall) PageToken(pageToken string) *DisksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DisksListCall) Fields(s ...googleapi.Field) *DisksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *DisksListCall) IfNoneMatch(entityTag string) *DisksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DisksListCall) Context(ctx context.Context) *DisksListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DisksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.list" call. -// Exactly one of *DiskList or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *DiskList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &DiskList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of persistent disks contained within the specified zone.", - // "httpMethod": "GET", - // "id": "compute.disks.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/disks", - // "response": { - // "$ref": "DiskList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *DisksListCall) Pages(ctx context.Context, f func(*DiskList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.disks.resize": - -type DisksResizeCall struct { - s *Service - project string - zone string - disk string - disksresizerequest *DisksResizeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Resize: Resizes the specified persistent disk. -func (r *DisksService) Resize(project string, zone string, disk string, disksresizerequest *DisksResizeRequest) *DisksResizeCall { - c := &DisksResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - c.disksresizerequest = disksresizerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DisksResizeCall) Fields(s ...googleapi.Field) *DisksResizeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DisksResizeCall) Context(ctx context.Context) *DisksResizeCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DisksResizeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksResizeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.disksresizerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}/resize") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.resize" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Resizes the specified persistent disk.", - // "httpMethod": "POST", - // "id": "compute.disks.resize", - // "parameterOrder": [ - // "project", - // "zone", - // "disk" - // ], - // "parameters": { - // "disk": { - // "description": "The name of the persistent disk.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/disks/{disk}/resize", - // "request": { - // "$ref": "DisksResizeRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.disks.setLabels": - -type DisksSetLabelsCall struct { - s *Service - project string - zone string - resource string - zonesetlabelsrequest *ZoneSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a disk. To learn more about labels, -// read the Labeling Resources documentation. -func (r *DisksService) SetLabels(project string, zone string, resource string, zonesetlabelsrequest *ZoneSetLabelsRequest) *DisksSetLabelsCall { - c := &DisksSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.zonesetlabelsrequest = zonesetlabelsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *DisksSetLabelsCall) Fields(s ...googleapi.Field) *DisksSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *DisksSetLabelsCall) Context(ctx context.Context) *DisksSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *DisksSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.zonesetlabelsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{resource}/setLabels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.setLabels" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation.", - // "httpMethod": "POST", - // "id": "compute.disks.setLabels", - // "parameterOrder": [ - // "project", - // "zone", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/disks/{resource}/setLabels", - // "request": { - // "$ref": "ZoneSetLabelsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.firewalls.delete": - -type FirewallsDeleteCall struct { - s *Service - project string - firewall string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified firewall. -// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/delete -func (r *FirewallsService) Delete(project string, firewall string) *FirewallsDeleteCall { - c := &FirewallsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewall = firewall - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *FirewallsDeleteCall) Fields(s ...googleapi.Field) *FirewallsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *FirewallsDeleteCall) Context(ctx context.Context) *FirewallsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *FirewallsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewall": c.firewall, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *FirewallsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified firewall.", - // "httpMethod": "DELETE", - // "id": "compute.firewalls.delete", - // "parameterOrder": [ - // "project", - // "firewall" - // ], - // "parameters": { - // "firewall": { - // "description": "Name of the firewall rule to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/firewalls/{firewall}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.firewalls.get": - -type FirewallsGetCall struct { - s *Service - project string - firewall string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified firewall. -// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/get -func (r *FirewallsService) Get(project string, firewall string) *FirewallsGetCall { - c := &FirewallsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewall = firewall - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *FirewallsGetCall) Fields(s ...googleapi.Field) *FirewallsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *FirewallsGetCall) IfNoneMatch(entityTag string) *FirewallsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *FirewallsGetCall) Context(ctx context.Context) *FirewallsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *FirewallsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewall": c.firewall, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.get" call. -// Exactly one of *Firewall or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Firewall.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *FirewallsGetCall) Do(opts ...googleapi.CallOption) (*Firewall, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Firewall{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified firewall.", - // "httpMethod": "GET", - // "id": "compute.firewalls.get", - // "parameterOrder": [ - // "project", - // "firewall" - // ], - // "parameters": { - // "firewall": { - // "description": "Name of the firewall rule to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/firewalls/{firewall}", - // "response": { - // "$ref": "Firewall" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.firewalls.insert": - -type FirewallsInsertCall struct { - s *Service - project string - firewall *Firewall - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a firewall rule in the specified project using the -// data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/insert -func (r *FirewallsService) Insert(project string, firewall *Firewall) *FirewallsInsertCall { - c := &FirewallsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewall = firewall - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *FirewallsInsertCall) Fields(s ...googleapi.Field) *FirewallsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *FirewallsInsertCall) Context(ctx context.Context) *FirewallsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *FirewallsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *FirewallsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a firewall rule in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.firewalls.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/firewalls", - // "request": { - // "$ref": "Firewall" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.firewalls.list": - -type FirewallsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of firewall rules available to the specified -// project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/list -func (r *FirewallsService) List(project string) *FirewallsListCall { - c := &FirewallsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *FirewallsListCall) Filter(filter string) *FirewallsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *FirewallsListCall) MaxResults(maxResults int64) *FirewallsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *FirewallsListCall) OrderBy(orderBy string) *FirewallsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *FirewallsListCall) PageToken(pageToken string) *FirewallsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *FirewallsListCall) Fields(s ...googleapi.Field) *FirewallsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *FirewallsListCall) IfNoneMatch(entityTag string) *FirewallsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *FirewallsListCall) Context(ctx context.Context) *FirewallsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *FirewallsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.list" call. -// Exactly one of *FirewallList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *FirewallList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *FirewallsListCall) Do(opts ...googleapi.CallOption) (*FirewallList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &FirewallList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of firewall rules available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.firewalls.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/firewalls", - // "response": { - // "$ref": "FirewallList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *FirewallsListCall) Pages(ctx context.Context, f func(*FirewallList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.firewalls.patch": - -type FirewallsPatchCall struct { - s *Service - project string - firewall string - firewall2 *Firewall - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified firewall rule with the data included in -// the request. Using PUT method, can only update following fields of -// firewall rule: allowed, description, sourceRanges, sourceTags, -// targetTags. This method supports patch semantics. -// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/patch -func (r *FirewallsService) Patch(project string, firewall string, firewall2 *Firewall) *FirewallsPatchCall { - c := &FirewallsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewall = firewall - c.firewall2 = firewall2 - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *FirewallsPatchCall) Fields(s ...googleapi.Field) *FirewallsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *FirewallsPatchCall) Context(ctx context.Context) *FirewallsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *FirewallsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall2) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewall": c.firewall, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *FirewallsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the specified firewall rule with the data included in the request. Using PUT method, can only update following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags. This method supports patch semantics.", - // "httpMethod": "PATCH", - // "id": "compute.firewalls.patch", - // "parameterOrder": [ - // "project", - // "firewall" - // ], - // "parameters": { - // "firewall": { - // "description": "Name of the firewall rule to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/firewalls/{firewall}", - // "request": { - // "$ref": "Firewall" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.firewalls.update": - -type FirewallsUpdateCall struct { - s *Service - project string - firewall string - firewall2 *Firewall - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified firewall rule with the data included in -// the request. Using PUT method, can only update following fields of -// firewall rule: allowed, description, sourceRanges, sourceTags, -// targetTags. -// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/update -func (r *FirewallsService) Update(project string, firewall string, firewall2 *Firewall) *FirewallsUpdateCall { - c := &FirewallsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewall = firewall - c.firewall2 = firewall2 - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *FirewallsUpdateCall) Fields(s ...googleapi.Field) *FirewallsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *FirewallsUpdateCall) Context(ctx context.Context) *FirewallsUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *FirewallsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall2) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewall": c.firewall, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *FirewallsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the specified firewall rule with the data included in the request. Using PUT method, can only update following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags.", - // "httpMethod": "PUT", - // "id": "compute.firewalls.update", - // "parameterOrder": [ - // "project", - // "firewall" - // ], - // "parameters": { - // "firewall": { - // "description": "Name of the firewall rule to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/firewalls/{firewall}", - // "request": { - // "$ref": "Firewall" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.forwardingRules.aggregatedList": - -type ForwardingRulesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of forwarding rules. -// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/aggregatedList -func (r *ForwardingRulesService) AggregatedList(project string) *ForwardingRulesAggregatedListCall { - c := &ForwardingRulesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *ForwardingRulesAggregatedListCall) Filter(filter string) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *ForwardingRulesAggregatedListCall) MaxResults(maxResults int64) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *ForwardingRulesAggregatedListCall) OrderBy(orderBy string) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *ForwardingRulesAggregatedListCall) PageToken(pageToken string) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ForwardingRulesAggregatedListCall) Fields(s ...googleapi.Field) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ForwardingRulesAggregatedListCall) IfNoneMatch(entityTag string) *ForwardingRulesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ForwardingRulesAggregatedListCall) Context(ctx context.Context) *ForwardingRulesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ForwardingRulesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/forwardingRules") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.aggregatedList" call. -// Exactly one of *ForwardingRuleAggregatedList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ForwardingRuleAggregatedList.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ForwardingRulesAggregatedListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ForwardingRuleAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of forwarding rules.", - // "httpMethod": "GET", - // "id": "compute.forwardingRules.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/forwardingRules", - // "response": { - // "$ref": "ForwardingRuleAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ForwardingRulesAggregatedListCall) Pages(ctx context.Context, f func(*ForwardingRuleAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.forwardingRules.delete": - -type ForwardingRulesDeleteCall struct { - s *Service - project string - region string - forwardingRule string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified ForwardingRule resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/delete -func (r *ForwardingRulesService) Delete(project string, region string, forwardingRule string) *ForwardingRulesDeleteCall { - c := &ForwardingRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.forwardingRule = forwardingRule - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ForwardingRulesDeleteCall) Fields(s ...googleapi.Field) *ForwardingRulesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ForwardingRulesDeleteCall) Context(ctx context.Context) *ForwardingRulesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ForwardingRulesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{forwardingRule}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "forwardingRule": c.forwardingRule, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified ForwardingRule resource.", - // "httpMethod": "DELETE", - // "id": "compute.forwardingRules.delete", - // "parameterOrder": [ - // "project", - // "region", - // "forwardingRule" - // ], - // "parameters": { - // "forwardingRule": { - // "description": "Name of the ForwardingRule resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.forwardingRules.get": - -type ForwardingRulesGetCall struct { - s *Service - project string - region string - forwardingRule string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified ForwardingRule resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/get -func (r *ForwardingRulesService) Get(project string, region string, forwardingRule string) *ForwardingRulesGetCall { - c := &ForwardingRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.forwardingRule = forwardingRule - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ForwardingRulesGetCall) Fields(s ...googleapi.Field) *ForwardingRulesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ForwardingRulesGetCall) IfNoneMatch(entityTag string) *ForwardingRulesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ForwardingRulesGetCall) Context(ctx context.Context) *ForwardingRulesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ForwardingRulesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{forwardingRule}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "forwardingRule": c.forwardingRule, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.get" call. -// Exactly one of *ForwardingRule or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *ForwardingRule.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRule, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ForwardingRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified ForwardingRule resource.", - // "httpMethod": "GET", - // "id": "compute.forwardingRules.get", - // "parameterOrder": [ - // "project", - // "region", - // "forwardingRule" - // ], - // "parameters": { - // "forwardingRule": { - // "description": "Name of the ForwardingRule resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}", - // "response": { - // "$ref": "ForwardingRule" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.forwardingRules.insert": - -type ForwardingRulesInsertCall struct { - s *Service - project string - region string - forwardingrule *ForwardingRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a ForwardingRule resource in the specified project -// and region using the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/insert -func (r *ForwardingRulesService) Insert(project string, region string, forwardingrule *ForwardingRule) *ForwardingRulesInsertCall { - c := &ForwardingRulesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.forwardingrule = forwardingrule - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ForwardingRulesInsertCall) Fields(s ...googleapi.Field) *ForwardingRulesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ForwardingRulesInsertCall) Context(ctx context.Context) *ForwardingRulesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ForwardingRulesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.forwardingRules.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/forwardingRules", - // "request": { - // "$ref": "ForwardingRule" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.forwardingRules.list": - -type ForwardingRulesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of ForwardingRule resources available to the -// specified project and region. -// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/list -func (r *ForwardingRulesService) List(project string, region string) *ForwardingRulesListCall { - c := &ForwardingRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *ForwardingRulesListCall) Filter(filter string) *ForwardingRulesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *ForwardingRulesListCall) MaxResults(maxResults int64) *ForwardingRulesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *ForwardingRulesListCall) OrderBy(orderBy string) *ForwardingRulesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *ForwardingRulesListCall) PageToken(pageToken string) *ForwardingRulesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ForwardingRulesListCall) Fields(s ...googleapi.Field) *ForwardingRulesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ForwardingRulesListCall) IfNoneMatch(entityTag string) *ForwardingRulesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ForwardingRulesListCall) Context(ctx context.Context) *ForwardingRulesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ForwardingRulesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.list" call. -// Exactly one of *ForwardingRuleList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ForwardingRuleList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ForwardingRuleList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of ForwardingRule resources available to the specified project and region.", - // "httpMethod": "GET", - // "id": "compute.forwardingRules.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/forwardingRules", - // "response": { - // "$ref": "ForwardingRuleList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ForwardingRulesListCall) Pages(ctx context.Context, f func(*ForwardingRuleList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.forwardingRules.setTarget": - -type ForwardingRulesSetTargetCall struct { - s *Service - project string - region string - forwardingRule string - targetreference *TargetReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetTarget: Changes target URL for forwarding rule. The new target -// should be of the same type as the old target. -// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/setTarget -func (r *ForwardingRulesService) SetTarget(project string, region string, forwardingRule string, targetreference *TargetReference) *ForwardingRulesSetTargetCall { - c := &ForwardingRulesSetTargetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.forwardingRule = forwardingRule - c.targetreference = targetreference - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ForwardingRulesSetTargetCall) Fields(s ...googleapi.Field) *ForwardingRulesSetTargetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ForwardingRulesSetTargetCall) Context(ctx context.Context) *ForwardingRulesSetTargetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ForwardingRulesSetTargetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "forwardingRule": c.forwardingRule, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.setTarget" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes target URL for forwarding rule. The new target should be of the same type as the old target.", - // "httpMethod": "POST", - // "id": "compute.forwardingRules.setTarget", - // "parameterOrder": [ - // "project", - // "region", - // "forwardingRule" - // ], - // "parameters": { - // "forwardingRule": { - // "description": "Name of the ForwardingRule resource in which target is to be set.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget", - // "request": { - // "$ref": "TargetReference" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.globalAddresses.delete": - -type GlobalAddressesDeleteCall struct { - s *Service - project string - address string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified address resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/delete -func (r *GlobalAddressesService) Delete(project string, address string) *GlobalAddressesDeleteCall { - c := &GlobalAddressesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.address = address - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalAddressesDeleteCall) Fields(s ...googleapi.Field) *GlobalAddressesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalAddressesDeleteCall) Context(ctx context.Context) *GlobalAddressesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalAddressesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses/{address}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "address": c.address, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalAddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified address resource.", - // "httpMethod": "DELETE", - // "id": "compute.globalAddresses.delete", - // "parameterOrder": [ - // "project", - // "address" - // ], - // "parameters": { - // "address": { - // "description": "Name of the address resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/addresses/{address}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.globalAddresses.get": - -type GlobalAddressesGetCall struct { - s *Service - project string - address string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified address resource. Get a list of available -// addresses by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/get -func (r *GlobalAddressesService) Get(project string, address string) *GlobalAddressesGetCall { - c := &GlobalAddressesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.address = address - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalAddressesGetCall) Fields(s ...googleapi.Field) *GlobalAddressesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *GlobalAddressesGetCall) IfNoneMatch(entityTag string) *GlobalAddressesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalAddressesGetCall) Context(ctx context.Context) *GlobalAddressesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalAddressesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses/{address}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "address": c.address, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.get" call. -// Exactly one of *Address or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Address.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *GlobalAddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Address{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified address resource. Get a list of available addresses by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.globalAddresses.get", - // "parameterOrder": [ - // "project", - // "address" - // ], - // "parameters": { - // "address": { - // "description": "Name of the address resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/addresses/{address}", - // "response": { - // "$ref": "Address" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.globalAddresses.insert": - -type GlobalAddressesInsertCall struct { - s *Service - project string - address *Address - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an address resource in the specified project using -// the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/insert -func (r *GlobalAddressesService) Insert(project string, address *Address) *GlobalAddressesInsertCall { - c := &GlobalAddressesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.address = address - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalAddressesInsertCall) Fields(s ...googleapi.Field) *GlobalAddressesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalAddressesInsertCall) Context(ctx context.Context) *GlobalAddressesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalAddressesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.address) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalAddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates an address resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.globalAddresses.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/addresses", - // "request": { - // "$ref": "Address" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.globalAddresses.list": - -type GlobalAddressesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of global addresses. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/list -func (r *GlobalAddressesService) List(project string) *GlobalAddressesListCall { - c := &GlobalAddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *GlobalAddressesListCall) Filter(filter string) *GlobalAddressesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *GlobalAddressesListCall) MaxResults(maxResults int64) *GlobalAddressesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *GlobalAddressesListCall) OrderBy(orderBy string) *GlobalAddressesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *GlobalAddressesListCall) PageToken(pageToken string) *GlobalAddressesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalAddressesListCall) Fields(s ...googleapi.Field) *GlobalAddressesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *GlobalAddressesListCall) IfNoneMatch(entityTag string) *GlobalAddressesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalAddressesListCall) Context(ctx context.Context) *GlobalAddressesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalAddressesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.list" call. -// Exactly one of *AddressList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *AddressList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalAddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AddressList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of global addresses.", - // "httpMethod": "GET", - // "id": "compute.globalAddresses.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/addresses", - // "response": { - // "$ref": "AddressList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *GlobalAddressesListCall) Pages(ctx context.Context, f func(*AddressList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.globalForwardingRules.delete": - -type GlobalForwardingRulesDeleteCall struct { - s *Service - project string - forwardingRule string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified GlobalForwardingRule resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/delete -func (r *GlobalForwardingRulesService) Delete(project string, forwardingRule string) *GlobalForwardingRulesDeleteCall { - c := &GlobalForwardingRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.forwardingRule = forwardingRule - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalForwardingRulesDeleteCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalForwardingRulesDeleteCall) Context(ctx context.Context) *GlobalForwardingRulesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalForwardingRulesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{forwardingRule}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "forwardingRule": c.forwardingRule, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified GlobalForwardingRule resource.", - // "httpMethod": "DELETE", - // "id": "compute.globalForwardingRules.delete", - // "parameterOrder": [ - // "project", - // "forwardingRule" - // ], - // "parameters": { - // "forwardingRule": { - // "description": "Name of the ForwardingRule resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/forwardingRules/{forwardingRule}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.globalForwardingRules.get": - -type GlobalForwardingRulesGetCall struct { - s *Service - project string - forwardingRule string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified GlobalForwardingRule resource. Get a list -// of available forwarding rules by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/get -func (r *GlobalForwardingRulesService) Get(project string, forwardingRule string) *GlobalForwardingRulesGetCall { - c := &GlobalForwardingRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.forwardingRule = forwardingRule - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalForwardingRulesGetCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *GlobalForwardingRulesGetCall) IfNoneMatch(entityTag string) *GlobalForwardingRulesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalForwardingRulesGetCall) Context(ctx context.Context) *GlobalForwardingRulesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalForwardingRulesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{forwardingRule}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "forwardingRule": c.forwardingRule, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.get" call. -// Exactly one of *ForwardingRule or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *ForwardingRule.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *GlobalForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRule, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ForwardingRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified GlobalForwardingRule resource. Get a list of available forwarding rules by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.globalForwardingRules.get", - // "parameterOrder": [ - // "project", - // "forwardingRule" - // ], - // "parameters": { - // "forwardingRule": { - // "description": "Name of the ForwardingRule resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/forwardingRules/{forwardingRule}", - // "response": { - // "$ref": "ForwardingRule" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.globalForwardingRules.insert": - -type GlobalForwardingRulesInsertCall struct { - s *Service - project string - forwardingrule *ForwardingRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a GlobalForwardingRule resource in the specified -// project using the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/insert -func (r *GlobalForwardingRulesService) Insert(project string, forwardingrule *ForwardingRule) *GlobalForwardingRulesInsertCall { - c := &GlobalForwardingRulesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.forwardingrule = forwardingrule - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalForwardingRulesInsertCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalForwardingRulesInsertCall) Context(ctx context.Context) *GlobalForwardingRulesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalForwardingRulesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a GlobalForwardingRule resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.globalForwardingRules.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/forwardingRules", - // "request": { - // "$ref": "ForwardingRule" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.globalForwardingRules.list": - -type GlobalForwardingRulesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of GlobalForwardingRule resources available to -// the specified project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/list -func (r *GlobalForwardingRulesService) List(project string) *GlobalForwardingRulesListCall { - c := &GlobalForwardingRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *GlobalForwardingRulesListCall) Filter(filter string) *GlobalForwardingRulesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *GlobalForwardingRulesListCall) MaxResults(maxResults int64) *GlobalForwardingRulesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *GlobalForwardingRulesListCall) OrderBy(orderBy string) *GlobalForwardingRulesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *GlobalForwardingRulesListCall) PageToken(pageToken string) *GlobalForwardingRulesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalForwardingRulesListCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *GlobalForwardingRulesListCall) IfNoneMatch(entityTag string) *GlobalForwardingRulesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalForwardingRulesListCall) Context(ctx context.Context) *GlobalForwardingRulesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalForwardingRulesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.list" call. -// Exactly one of *ForwardingRuleList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ForwardingRuleList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *GlobalForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ForwardingRuleList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of GlobalForwardingRule resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.globalForwardingRules.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/forwardingRules", - // "response": { - // "$ref": "ForwardingRuleList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *GlobalForwardingRulesListCall) Pages(ctx context.Context, f func(*ForwardingRuleList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.globalForwardingRules.setTarget": - -type GlobalForwardingRulesSetTargetCall struct { - s *Service - project string - forwardingRule string - targetreference *TargetReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetTarget: Changes target URL for the GlobalForwardingRule resource. -// The new target should be of the same type as the old target. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/setTarget -func (r *GlobalForwardingRulesService) SetTarget(project string, forwardingRule string, targetreference *TargetReference) *GlobalForwardingRulesSetTargetCall { - c := &GlobalForwardingRulesSetTargetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.forwardingRule = forwardingRule - c.targetreference = targetreference - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalForwardingRulesSetTargetCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesSetTargetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalForwardingRulesSetTargetCall) Context(ctx context.Context) *GlobalForwardingRulesSetTargetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalForwardingRulesSetTargetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{forwardingRule}/setTarget") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "forwardingRule": c.forwardingRule, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.setTarget" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target.", - // "httpMethod": "POST", - // "id": "compute.globalForwardingRules.setTarget", - // "parameterOrder": [ - // "project", - // "forwardingRule" - // ], - // "parameters": { - // "forwardingRule": { - // "description": "Name of the ForwardingRule resource in which target is to be set.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/forwardingRules/{forwardingRule}/setTarget", - // "request": { - // "$ref": "TargetReference" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.globalOperations.aggregatedList": - -type GlobalOperationsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of all operations. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/aggregatedList -func (r *GlobalOperationsService) AggregatedList(project string) *GlobalOperationsAggregatedListCall { - c := &GlobalOperationsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *GlobalOperationsAggregatedListCall) Filter(filter string) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *GlobalOperationsAggregatedListCall) MaxResults(maxResults int64) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *GlobalOperationsAggregatedListCall) OrderBy(orderBy string) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *GlobalOperationsAggregatedListCall) PageToken(pageToken string) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalOperationsAggregatedListCall) Fields(s ...googleapi.Field) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *GlobalOperationsAggregatedListCall) IfNoneMatch(entityTag string) *GlobalOperationsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalOperationsAggregatedListCall) Context(ctx context.Context) *GlobalOperationsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalOperationsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalOperationsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/operations") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalOperations.aggregatedList" call. -// Exactly one of *OperationAggregatedList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *OperationAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *GlobalOperationsAggregatedListCall) Do(opts ...googleapi.CallOption) (*OperationAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &OperationAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of all operations.", - // "httpMethod": "GET", - // "id": "compute.globalOperations.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/operations", - // "response": { - // "$ref": "OperationAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *GlobalOperationsAggregatedListCall) Pages(ctx context.Context, f func(*OperationAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.globalOperations.delete": - -type GlobalOperationsDeleteCall struct { - s *Service - project string - operation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Operations resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/delete -func (r *GlobalOperationsService) Delete(project string, operation string) *GlobalOperationsDeleteCall { - c := &GlobalOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.operation = operation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalOperationsDeleteCall) Fields(s ...googleapi.Field) *GlobalOperationsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalOperationsDeleteCall) Context(ctx context.Context) *GlobalOperationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalOperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "operation": c.operation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalOperations.delete" call. -func (c *GlobalOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return err - } - return nil - // { - // "description": "Deletes the specified Operations resource.", - // "httpMethod": "DELETE", - // "id": "compute.globalOperations.delete", - // "parameterOrder": [ - // "project", - // "operation" - // ], - // "parameters": { - // "operation": { - // "description": "Name of the Operations resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/operations/{operation}", - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.globalOperations.get": - -type GlobalOperationsGetCall struct { - s *Service - project string - operation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves the specified Operations resource. Get a list of -// operations by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/get -func (r *GlobalOperationsService) Get(project string, operation string) *GlobalOperationsGetCall { - c := &GlobalOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.operation = operation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalOperationsGetCall) Fields(s ...googleapi.Field) *GlobalOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *GlobalOperationsGetCall) IfNoneMatch(entityTag string) *GlobalOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalOperationsGetCall) Context(ctx context.Context) *GlobalOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "operation": c.operation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalOperations.get" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the specified Operations resource. Get a list of operations by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.globalOperations.get", - // "parameterOrder": [ - // "project", - // "operation" - // ], - // "parameters": { - // "operation": { - // "description": "Name of the Operations resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/operations/{operation}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.globalOperations.list": - -type GlobalOperationsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of Operation resources contained within the -// specified project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/list -func (r *GlobalOperationsService) List(project string) *GlobalOperationsListCall { - c := &GlobalOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *GlobalOperationsListCall) Filter(filter string) *GlobalOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *GlobalOperationsListCall) MaxResults(maxResults int64) *GlobalOperationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *GlobalOperationsListCall) OrderBy(orderBy string) *GlobalOperationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *GlobalOperationsListCall) PageToken(pageToken string) *GlobalOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalOperationsListCall) Fields(s ...googleapi.Field) *GlobalOperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *GlobalOperationsListCall) IfNoneMatch(entityTag string) *GlobalOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalOperationsListCall) Context(ctx context.Context) *GlobalOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalOperations.list" call. -// Exactly one of *OperationList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *OperationList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *GlobalOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &OperationList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of Operation resources contained within the specified project.", - // "httpMethod": "GET", - // "id": "compute.globalOperations.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/operations", - // "response": { - // "$ref": "OperationList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *GlobalOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.healthChecks.delete": - -type HealthChecksDeleteCall struct { - s *Service - project string - healthCheck string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified HealthCheck resource. -func (r *HealthChecksService) Delete(project string, healthCheck string) *HealthChecksDeleteCall { - c := &HealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.healthCheck = healthCheck - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HealthChecksDeleteCall) Fields(s ...googleapi.Field) *HealthChecksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HealthChecksDeleteCall) Context(ctx context.Context) *HealthChecksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HealthChecksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks/{healthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "healthCheck": c.healthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified HealthCheck resource.", - // "httpMethod": "DELETE", - // "id": "compute.healthChecks.delete", - // "parameterOrder": [ - // "project", - // "healthCheck" - // ], - // "parameters": { - // "healthCheck": { - // "description": "Name of the HealthCheck resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/healthChecks/{healthCheck}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.healthChecks.get": - -type HealthChecksGetCall struct { - s *Service - project string - healthCheck string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified HealthCheck resource. Get a list of -// available health checks by making a list() request. -func (r *HealthChecksService) Get(project string, healthCheck string) *HealthChecksGetCall { - c := &HealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.healthCheck = healthCheck - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HealthChecksGetCall) Fields(s ...googleapi.Field) *HealthChecksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *HealthChecksGetCall) IfNoneMatch(entityTag string) *HealthChecksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HealthChecksGetCall) Context(ctx context.Context) *HealthChecksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HealthChecksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks/{healthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "healthCheck": c.healthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.get" call. -// Exactly one of *HealthCheck or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *HealthCheck.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthCheck, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &HealthCheck{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified HealthCheck resource. Get a list of available health checks by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.healthChecks.get", - // "parameterOrder": [ - // "project", - // "healthCheck" - // ], - // "parameters": { - // "healthCheck": { - // "description": "Name of the HealthCheck resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/healthChecks/{healthCheck}", - // "response": { - // "$ref": "HealthCheck" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.healthChecks.insert": - -type HealthChecksInsertCall struct { - s *Service - project string - healthcheck *HealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a HealthCheck resource in the specified project using -// the data included in the request. -func (r *HealthChecksService) Insert(project string, healthcheck *HealthCheck) *HealthChecksInsertCall { - c := &HealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.healthcheck = healthcheck - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HealthChecksInsertCall) Fields(s ...googleapi.Field) *HealthChecksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HealthChecksInsertCall) Context(ctx context.Context) *HealthChecksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HealthChecksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.healthcheck) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a HealthCheck resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.healthChecks.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/healthChecks", - // "request": { - // "$ref": "HealthCheck" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.healthChecks.list": - -type HealthChecksListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of HealthCheck resources available to the -// specified project. -func (r *HealthChecksService) List(project string) *HealthChecksListCall { - c := &HealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *HealthChecksListCall) Filter(filter string) *HealthChecksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *HealthChecksListCall) MaxResults(maxResults int64) *HealthChecksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *HealthChecksListCall) OrderBy(orderBy string) *HealthChecksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *HealthChecksListCall) PageToken(pageToken string) *HealthChecksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HealthChecksListCall) Fields(s ...googleapi.Field) *HealthChecksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *HealthChecksListCall) IfNoneMatch(entityTag string) *HealthChecksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HealthChecksListCall) Context(ctx context.Context) *HealthChecksListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HealthChecksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.list" call. -// Exactly one of *HealthCheckList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *HealthCheckList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *HealthChecksListCall) Do(opts ...googleapi.CallOption) (*HealthCheckList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &HealthCheckList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of HealthCheck resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.healthChecks.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/healthChecks", - // "response": { - // "$ref": "HealthCheckList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *HealthChecksListCall) Pages(ctx context.Context, f func(*HealthCheckList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.healthChecks.patch": - -type HealthChecksPatchCall struct { - s *Service - project string - healthCheck string - healthcheck *HealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a HealthCheck resource in the specified project using -// the data included in the request. This method supports PATCH -// semantics and uses the JSON merge patch format and processing rules. -func (r *HealthChecksService) Patch(project string, healthCheck string, healthcheck *HealthCheck) *HealthChecksPatchCall { - c := &HealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.healthCheck = healthCheck - c.healthcheck = healthcheck - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HealthChecksPatchCall) Fields(s ...googleapi.Field) *HealthChecksPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HealthChecksPatchCall) Context(ctx context.Context) *HealthChecksPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HealthChecksPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.healthcheck) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks/{healthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "healthCheck": c.healthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.healthChecks.patch", - // "parameterOrder": [ - // "project", - // "healthCheck" - // ], - // "parameters": { - // "healthCheck": { - // "description": "Name of the HealthCheck resource to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/healthChecks/{healthCheck}", - // "request": { - // "$ref": "HealthCheck" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.healthChecks.update": - -type HealthChecksUpdateCall struct { - s *Service - project string - healthCheck string - healthcheck *HealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a HealthCheck resource in the specified project using -// the data included in the request. -func (r *HealthChecksService) Update(project string, healthCheck string, healthcheck *HealthCheck) *HealthChecksUpdateCall { - c := &HealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.healthCheck = healthCheck - c.healthcheck = healthcheck - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HealthChecksUpdateCall) Fields(s ...googleapi.Field) *HealthChecksUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HealthChecksUpdateCall) Context(ctx context.Context) *HealthChecksUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HealthChecksUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.healthcheck) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks/{healthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "healthCheck": c.healthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates a HealthCheck resource in the specified project using the data included in the request.", - // "httpMethod": "PUT", - // "id": "compute.healthChecks.update", - // "parameterOrder": [ - // "project", - // "healthCheck" - // ], - // "parameters": { - // "healthCheck": { - // "description": "Name of the HealthCheck resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/healthChecks/{healthCheck}", - // "request": { - // "$ref": "HealthCheck" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.httpHealthChecks.delete": - -type HttpHealthChecksDeleteCall struct { - s *Service - project string - httpHealthCheck string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified HttpHealthCheck resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/delete -func (r *HttpHealthChecksService) Delete(project string, httpHealthCheck string) *HttpHealthChecksDeleteCall { - c := &HttpHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpHealthCheck = httpHealthCheck - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpHealthChecksDeleteCall) Fields(s ...googleapi.Field) *HttpHealthChecksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpHealthChecksDeleteCall) Context(ctx context.Context) *HttpHealthChecksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpHealthChecksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpHealthCheck": c.httpHealthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HttpHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified HttpHealthCheck resource.", - // "httpMethod": "DELETE", - // "id": "compute.httpHealthChecks.delete", - // "parameterOrder": [ - // "project", - // "httpHealthCheck" - // ], - // "parameters": { - // "httpHealthCheck": { - // "description": "Name of the HttpHealthCheck resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.httpHealthChecks.get": - -type HttpHealthChecksGetCall struct { - s *Service - project string - httpHealthCheck string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified HttpHealthCheck resource. Get a list of -// available HTTP health checks by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/get -func (r *HttpHealthChecksService) Get(project string, httpHealthCheck string) *HttpHealthChecksGetCall { - c := &HttpHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpHealthCheck = httpHealthCheck - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpHealthChecksGetCall) Fields(s ...googleapi.Field) *HttpHealthChecksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *HttpHealthChecksGetCall) IfNoneMatch(entityTag string) *HttpHealthChecksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpHealthChecksGetCall) Context(ctx context.Context) *HttpHealthChecksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpHealthChecksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpHealthCheck": c.httpHealthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.get" call. -// Exactly one of *HttpHealthCheck or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *HttpHealthCheck.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *HttpHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpHealthCheck, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &HttpHealthCheck{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified HttpHealthCheck resource. Get a list of available HTTP health checks by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.httpHealthChecks.get", - // "parameterOrder": [ - // "project", - // "httpHealthCheck" - // ], - // "parameters": { - // "httpHealthCheck": { - // "description": "Name of the HttpHealthCheck resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", - // "response": { - // "$ref": "HttpHealthCheck" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.httpHealthChecks.insert": - -type HttpHealthChecksInsertCall struct { - s *Service - project string - httphealthcheck *HttpHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a HttpHealthCheck resource in the specified project -// using the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/insert -func (r *HttpHealthChecksService) Insert(project string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksInsertCall { - c := &HttpHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httphealthcheck = httphealthcheck - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpHealthChecksInsertCall) Fields(s ...googleapi.Field) *HttpHealthChecksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpHealthChecksInsertCall) Context(ctx context.Context) *HttpHealthChecksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpHealthChecksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HttpHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a HttpHealthCheck resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.httpHealthChecks.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/httpHealthChecks", - // "request": { - // "$ref": "HttpHealthCheck" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.httpHealthChecks.list": - -type HttpHealthChecksListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of HttpHealthCheck resources available to -// the specified project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/list -func (r *HttpHealthChecksService) List(project string) *HttpHealthChecksListCall { - c := &HttpHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *HttpHealthChecksListCall) Filter(filter string) *HttpHealthChecksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *HttpHealthChecksListCall) MaxResults(maxResults int64) *HttpHealthChecksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *HttpHealthChecksListCall) OrderBy(orderBy string) *HttpHealthChecksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *HttpHealthChecksListCall) PageToken(pageToken string) *HttpHealthChecksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpHealthChecksListCall) Fields(s ...googleapi.Field) *HttpHealthChecksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *HttpHealthChecksListCall) IfNoneMatch(entityTag string) *HttpHealthChecksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpHealthChecksListCall) Context(ctx context.Context) *HttpHealthChecksListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpHealthChecksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.list" call. -// Exactly one of *HttpHealthCheckList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *HttpHealthCheckList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *HttpHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpHealthCheckList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &HttpHealthCheckList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of HttpHealthCheck resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.httpHealthChecks.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/httpHealthChecks", - // "response": { - // "$ref": "HttpHealthCheckList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *HttpHealthChecksListCall) Pages(ctx context.Context, f func(*HttpHealthCheckList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.httpHealthChecks.patch": - -type HttpHealthChecksPatchCall struct { - s *Service - project string - httpHealthCheck string - httphealthcheck *HttpHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a HttpHealthCheck resource in the specified project -// using the data included in the request. This method supports PATCH -// semantics and uses the JSON merge patch format and processing rules. -// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/patch -func (r *HttpHealthChecksService) Patch(project string, httpHealthCheck string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksPatchCall { - c := &HttpHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpHealthCheck = httpHealthCheck - c.httphealthcheck = httphealthcheck - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpHealthChecksPatchCall) Fields(s ...googleapi.Field) *HttpHealthChecksPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpHealthChecksPatchCall) Context(ctx context.Context) *HttpHealthChecksPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpHealthChecksPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpHealthCheck": c.httpHealthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HttpHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.httpHealthChecks.patch", - // "parameterOrder": [ - // "project", - // "httpHealthCheck" - // ], - // "parameters": { - // "httpHealthCheck": { - // "description": "Name of the HttpHealthCheck resource to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", - // "request": { - // "$ref": "HttpHealthCheck" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.httpHealthChecks.update": - -type HttpHealthChecksUpdateCall struct { - s *Service - project string - httpHealthCheck string - httphealthcheck *HttpHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a HttpHealthCheck resource in the specified project -// using the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/update -func (r *HttpHealthChecksService) Update(project string, httpHealthCheck string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksUpdateCall { - c := &HttpHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpHealthCheck = httpHealthCheck - c.httphealthcheck = httphealthcheck - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpHealthChecksUpdateCall) Fields(s ...googleapi.Field) *HttpHealthChecksUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpHealthChecksUpdateCall) Context(ctx context.Context) *HttpHealthChecksUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpHealthChecksUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpHealthCheck": c.httpHealthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HttpHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request.", - // "httpMethod": "PUT", - // "id": "compute.httpHealthChecks.update", - // "parameterOrder": [ - // "project", - // "httpHealthCheck" - // ], - // "parameters": { - // "httpHealthCheck": { - // "description": "Name of the HttpHealthCheck resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", - // "request": { - // "$ref": "HttpHealthCheck" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.httpsHealthChecks.delete": - -type HttpsHealthChecksDeleteCall struct { - s *Service - project string - httpsHealthCheck string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified HttpsHealthCheck resource. -func (r *HttpsHealthChecksService) Delete(project string, httpsHealthCheck string) *HttpsHealthChecksDeleteCall { - c := &HttpsHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpsHealthCheck = httpsHealthCheck - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpsHealthChecksDeleteCall) Fields(s ...googleapi.Field) *HttpsHealthChecksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpsHealthChecksDeleteCall) Context(ctx context.Context) *HttpsHealthChecksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpsHealthChecksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks/{httpsHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpsHealthCheck": c.httpsHealthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HttpsHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified HttpsHealthCheck resource.", - // "httpMethod": "DELETE", - // "id": "compute.httpsHealthChecks.delete", - // "parameterOrder": [ - // "project", - // "httpsHealthCheck" - // ], - // "parameters": { - // "httpsHealthCheck": { - // "description": "Name of the HttpsHealthCheck resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.httpsHealthChecks.get": - -type HttpsHealthChecksGetCall struct { - s *Service - project string - httpsHealthCheck string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified HttpsHealthCheck resource. Get a list of -// available HTTPS health checks by making a list() request. -func (r *HttpsHealthChecksService) Get(project string, httpsHealthCheck string) *HttpsHealthChecksGetCall { - c := &HttpsHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpsHealthCheck = httpsHealthCheck - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpsHealthChecksGetCall) Fields(s ...googleapi.Field) *HttpsHealthChecksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *HttpsHealthChecksGetCall) IfNoneMatch(entityTag string) *HttpsHealthChecksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpsHealthChecksGetCall) Context(ctx context.Context) *HttpsHealthChecksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpsHealthChecksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks/{httpsHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpsHealthCheck": c.httpsHealthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.get" call. -// Exactly one of *HttpsHealthCheck or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *HttpsHealthCheck.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *HttpsHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpsHealthCheck, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &HttpsHealthCheck{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified HttpsHealthCheck resource. Get a list of available HTTPS health checks by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.httpsHealthChecks.get", - // "parameterOrder": [ - // "project", - // "httpsHealthCheck" - // ], - // "parameters": { - // "httpsHealthCheck": { - // "description": "Name of the HttpsHealthCheck resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}", - // "response": { - // "$ref": "HttpsHealthCheck" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.httpsHealthChecks.insert": - -type HttpsHealthChecksInsertCall struct { - s *Service - project string - httpshealthcheck *HttpsHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a HttpsHealthCheck resource in the specified project -// using the data included in the request. -func (r *HttpsHealthChecksService) Insert(project string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksInsertCall { - c := &HttpsHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpshealthcheck = httpshealthcheck - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpsHealthChecksInsertCall) Fields(s ...googleapi.Field) *HttpsHealthChecksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpsHealthChecksInsertCall) Context(ctx context.Context) *HttpsHealthChecksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpsHealthChecksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpshealthcheck) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HttpsHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a HttpsHealthCheck resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.httpsHealthChecks.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/httpsHealthChecks", - // "request": { - // "$ref": "HttpsHealthCheck" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.httpsHealthChecks.list": - -type HttpsHealthChecksListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of HttpsHealthCheck resources available to -// the specified project. -func (r *HttpsHealthChecksService) List(project string) *HttpsHealthChecksListCall { - c := &HttpsHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *HttpsHealthChecksListCall) Filter(filter string) *HttpsHealthChecksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *HttpsHealthChecksListCall) MaxResults(maxResults int64) *HttpsHealthChecksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *HttpsHealthChecksListCall) OrderBy(orderBy string) *HttpsHealthChecksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *HttpsHealthChecksListCall) PageToken(pageToken string) *HttpsHealthChecksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpsHealthChecksListCall) Fields(s ...googleapi.Field) *HttpsHealthChecksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *HttpsHealthChecksListCall) IfNoneMatch(entityTag string) *HttpsHealthChecksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpsHealthChecksListCall) Context(ctx context.Context) *HttpsHealthChecksListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpsHealthChecksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.list" call. -// Exactly one of *HttpsHealthCheckList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *HttpsHealthCheckList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *HttpsHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpsHealthCheckList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &HttpsHealthCheckList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of HttpsHealthCheck resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.httpsHealthChecks.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/httpsHealthChecks", - // "response": { - // "$ref": "HttpsHealthCheckList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *HttpsHealthChecksListCall) Pages(ctx context.Context, f func(*HttpsHealthCheckList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.httpsHealthChecks.patch": - -type HttpsHealthChecksPatchCall struct { - s *Service - project string - httpsHealthCheck string - httpshealthcheck *HttpsHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a HttpsHealthCheck resource in the specified project -// using the data included in the request. This method supports PATCH -// semantics and uses the JSON merge patch format and processing rules. -func (r *HttpsHealthChecksService) Patch(project string, httpsHealthCheck string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksPatchCall { - c := &HttpsHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpsHealthCheck = httpsHealthCheck - c.httpshealthcheck = httpshealthcheck - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpsHealthChecksPatchCall) Fields(s ...googleapi.Field) *HttpsHealthChecksPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpsHealthChecksPatchCall) Context(ctx context.Context) *HttpsHealthChecksPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpsHealthChecksPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpshealthcheck) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks/{httpsHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpsHealthCheck": c.httpsHealthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HttpsHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.httpsHealthChecks.patch", - // "parameterOrder": [ - // "project", - // "httpsHealthCheck" - // ], - // "parameters": { - // "httpsHealthCheck": { - // "description": "Name of the HttpsHealthCheck resource to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}", - // "request": { - // "$ref": "HttpsHealthCheck" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.httpsHealthChecks.update": - -type HttpsHealthChecksUpdateCall struct { - s *Service - project string - httpsHealthCheck string - httpshealthcheck *HttpsHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a HttpsHealthCheck resource in the specified project -// using the data included in the request. -func (r *HttpsHealthChecksService) Update(project string, httpsHealthCheck string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksUpdateCall { - c := &HttpsHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpsHealthCheck = httpsHealthCheck - c.httpshealthcheck = httpshealthcheck - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *HttpsHealthChecksUpdateCall) Fields(s ...googleapi.Field) *HttpsHealthChecksUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *HttpsHealthChecksUpdateCall) Context(ctx context.Context) *HttpsHealthChecksUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *HttpsHealthChecksUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpshealthcheck) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks/{httpsHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpsHealthCheck": c.httpsHealthCheck, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HttpsHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request.", - // "httpMethod": "PUT", - // "id": "compute.httpsHealthChecks.update", - // "parameterOrder": [ - // "project", - // "httpsHealthCheck" - // ], - // "parameters": { - // "httpsHealthCheck": { - // "description": "Name of the HttpsHealthCheck resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}", - // "request": { - // "$ref": "HttpsHealthCheck" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.images.delete": - -type ImagesDeleteCall struct { - s *Service - project string - image string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified image. -// For details, see https://cloud.google.com/compute/docs/reference/latest/images/delete -func (r *ImagesService) Delete(project string, image string) *ImagesDeleteCall { - c := &ImagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.image = image - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ImagesDeleteCall) Fields(s ...googleapi.Field) *ImagesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ImagesDeleteCall) Context(ctx context.Context) *ImagesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ImagesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{image}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "image": c.image, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ImagesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified image.", - // "httpMethod": "DELETE", - // "id": "compute.images.delete", - // "parameterOrder": [ - // "project", - // "image" - // ], - // "parameters": { - // "image": { - // "description": "Name of the image resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/images/{image}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.images.deprecate": - -type ImagesDeprecateCall struct { - s *Service - project string - image string - deprecationstatus *DeprecationStatus - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Deprecate: Sets the deprecation status of an image. -// -// If an empty request body is given, clears the deprecation status -// instead. -// For details, see https://cloud.google.com/compute/docs/reference/latest/images/deprecate -func (r *ImagesService) Deprecate(project string, image string, deprecationstatus *DeprecationStatus) *ImagesDeprecateCall { - c := &ImagesDeprecateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.image = image - c.deprecationstatus = deprecationstatus - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ImagesDeprecateCall) Fields(s ...googleapi.Field) *ImagesDeprecateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ImagesDeprecateCall) Context(ctx context.Context) *ImagesDeprecateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ImagesDeprecateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesDeprecateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.deprecationstatus) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{image}/deprecate") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "image": c.image, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.deprecate" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ImagesDeprecateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the deprecation status of an image.\n\nIf an empty request body is given, clears the deprecation status instead.", - // "httpMethod": "POST", - // "id": "compute.images.deprecate", - // "parameterOrder": [ - // "project", - // "image" - // ], - // "parameters": { - // "image": { - // "description": "Image name.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/images/{image}/deprecate", - // "request": { - // "$ref": "DeprecationStatus" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.images.get": - -type ImagesGetCall struct { - s *Service - project string - image string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified image. Get a list of available images by -// making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/images/get -func (r *ImagesService) Get(project string, image string) *ImagesGetCall { - c := &ImagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.image = image - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ImagesGetCall) Fields(s ...googleapi.Field) *ImagesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ImagesGetCall) IfNoneMatch(entityTag string) *ImagesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ImagesGetCall) Context(ctx context.Context) *ImagesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ImagesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{image}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "image": c.image, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.get" call. -// Exactly one of *Image or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Image.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ImagesGetCall) Do(opts ...googleapi.CallOption) (*Image, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Image{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified image. Get a list of available images by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.images.get", - // "parameterOrder": [ - // "project", - // "image" - // ], - // "parameters": { - // "image": { - // "description": "Name of the image resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/images/{image}", - // "response": { - // "$ref": "Image" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.images.getFromFamily": - -type ImagesGetFromFamilyCall struct { - s *Service - project string - family string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetFromFamily: Returns the latest image that is part of an image -// family and is not deprecated. -func (r *ImagesService) GetFromFamily(project string, family string) *ImagesGetFromFamilyCall { - c := &ImagesGetFromFamilyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.family = family - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ImagesGetFromFamilyCall) Fields(s ...googleapi.Field) *ImagesGetFromFamilyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ImagesGetFromFamilyCall) IfNoneMatch(entityTag string) *ImagesGetFromFamilyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ImagesGetFromFamilyCall) Context(ctx context.Context) *ImagesGetFromFamilyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ImagesGetFromFamilyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesGetFromFamilyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/family/{family}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "family": c.family, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.getFromFamily" call. -// Exactly one of *Image or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Image.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ImagesGetFromFamilyCall) Do(opts ...googleapi.CallOption) (*Image, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Image{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the latest image that is part of an image family and is not deprecated.", - // "httpMethod": "GET", - // "id": "compute.images.getFromFamily", - // "parameterOrder": [ - // "project", - // "family" - // ], - // "parameters": { - // "family": { - // "description": "Name of the image family to search for.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/images/family/{family}", - // "response": { - // "$ref": "Image" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.images.insert": - -type ImagesInsertCall struct { - s *Service - project string - image *Image - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an image in the specified project using the data -// included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/images/insert -func (r *ImagesService) Insert(project string, image *Image) *ImagesInsertCall { - c := &ImagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.image = image - return c -} - -// ForceCreate sets the optional parameter "forceCreate": Force image -// creation if true. -func (c *ImagesInsertCall) ForceCreate(forceCreate bool) *ImagesInsertCall { - c.urlParams_.Set("forceCreate", fmt.Sprint(forceCreate)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ImagesInsertCall) Fields(s ...googleapi.Field) *ImagesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ImagesInsertCall) Context(ctx context.Context) *ImagesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ImagesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.image) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ImagesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates an image in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.images.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "forceCreate": { - // "description": "Force image creation if true.", - // "location": "query", - // "type": "boolean" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/images", - // "request": { - // "$ref": "Image" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "compute.images.list": - -type ImagesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of private images available to the specified -// project. Private images are images you create that belong to your -// project. This method does not get any images that belong to other -// projects, including publicly-available images, like Debian 8. If you -// want to get a list of publicly-available images, use this method to -// make a request to the respective image project, such as debian-cloud -// or windows-cloud. -// For details, see https://cloud.google.com/compute/docs/reference/latest/images/list -func (r *ImagesService) List(project string) *ImagesListCall { - c := &ImagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *ImagesListCall) Filter(filter string) *ImagesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *ImagesListCall) MaxResults(maxResults int64) *ImagesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *ImagesListCall) OrderBy(orderBy string) *ImagesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *ImagesListCall) PageToken(pageToken string) *ImagesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ImagesListCall) Fields(s ...googleapi.Field) *ImagesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ImagesListCall) IfNoneMatch(entityTag string) *ImagesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ImagesListCall) Context(ctx context.Context) *ImagesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ImagesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.list" call. -// Exactly one of *ImageList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *ImageList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ImagesListCall) Do(opts ...googleapi.CallOption) (*ImageList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ImageList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of private images available to the specified project. Private images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.", - // "httpMethod": "GET", - // "id": "compute.images.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/images", - // "response": { - // "$ref": "ImageList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ImagesListCall) Pages(ctx context.Context, f func(*ImageList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.images.setLabels": - -type ImagesSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on an image. To learn more about labels, -// read the Labeling Resources documentation. -func (r *ImagesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *ImagesSetLabelsCall { - c := &ImagesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ImagesSetLabelsCall) Fields(s ...googleapi.Field) *ImagesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ImagesSetLabelsCall) Context(ctx context.Context) *ImagesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ImagesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetlabelsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{resource}/setLabels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.setLabels" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ImagesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.", - // "httpMethod": "POST", - // "id": "compute.images.setLabels", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/images/{resource}/setLabels", - // "request": { - // "$ref": "GlobalSetLabelsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.abandonInstances": - -type InstanceGroupManagersAbandonInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersabandoninstancesrequest *InstanceGroupManagersAbandonInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AbandonInstances: Schedules a group action to remove the specified -// instances from the managed instance group. Abandoning an instance -// does not delete the instance, but it does remove the instance from -// any target pools that are applied by the managed instance group. This -// method reduces the targetSize of the managed instance group by the -// number of instances that you abandon. This operation is marked as -// DONE when the action is scheduled even if the instances have not yet -// been removed from the group. You must separately verify the status of -// the abandoning action with the listmanagedinstances method. -// -// If the group is part of a backend service that has enabled connection -// draining, it can take up to 60 seconds after the connection draining -// duration has elapsed before the VM instance is removed or -// deleted. -// -// You can specify a maximum of 1000 instances with this method per -// request. -func (r *InstanceGroupManagersService) AbandonInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersabandoninstancesrequest *InstanceGroupManagersAbandonInstancesRequest) *InstanceGroupManagersAbandonInstancesCall { - c := &InstanceGroupManagersAbandonInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersabandoninstancesrequest = instancegroupmanagersabandoninstancesrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersAbandonInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersAbandonInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersAbandonInstancesCall) Context(ctx context.Context) *InstanceGroupManagersAbandonInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersAbandonInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersabandoninstancesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.abandonInstances" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersAbandonInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.abandonInstances", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", - // "request": { - // "$ref": "InstanceGroupManagersAbandonInstancesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.aggregatedList": - -type InstanceGroupManagersAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of managed instance groups and -// groups them by zone. -func (r *InstanceGroupManagersService) AggregatedList(project string) *InstanceGroupManagersAggregatedListCall { - c := &InstanceGroupManagersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *InstanceGroupManagersAggregatedListCall) Filter(filter string) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *InstanceGroupManagersAggregatedListCall) MaxResults(maxResults int64) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *InstanceGroupManagersAggregatedListCall) OrderBy(orderBy string) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *InstanceGroupManagersAggregatedListCall) PageToken(pageToken string) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersAggregatedListCall) Fields(s ...googleapi.Field) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstanceGroupManagersAggregatedListCall) IfNoneMatch(entityTag string) *InstanceGroupManagersAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersAggregatedListCall) Context(ctx context.Context) *InstanceGroupManagersAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/instanceGroupManagers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.aggregatedList" call. -// Exactly one of *InstanceGroupManagerAggregatedList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *InstanceGroupManagerAggregatedList.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *InstanceGroupManagersAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagerAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceGroupManagerAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of managed instance groups and groups them by zone.", - // "httpMethod": "GET", - // "id": "compute.instanceGroupManagers.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/instanceGroupManagers", - // "response": { - // "$ref": "InstanceGroupManagerAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstanceGroupManagersAggregatedListCall) Pages(ctx context.Context, f func(*InstanceGroupManagerAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.instanceGroupManagers.delete": - -type InstanceGroupManagersDeleteCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified managed instance group and all of the -// instances in that group. Note that the instance group must not belong -// to a backend service. Read Deleting an instance group for more -// information. -func (r *InstanceGroupManagersService) Delete(project string, zone string, instanceGroupManager string) *InstanceGroupManagersDeleteCall { - c := &InstanceGroupManagersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersDeleteCall) Fields(s ...googleapi.Field) *InstanceGroupManagersDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersDeleteCall) Context(ctx context.Context) *InstanceGroupManagersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.", - // "httpMethod": "DELETE", - // "id": "compute.instanceGroupManagers.delete", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group to delete.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.deleteInstances": - -type InstanceGroupManagersDeleteInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersdeleteinstancesrequest *InstanceGroupManagersDeleteInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteInstances: Schedules a group action to delete the specified -// instances in the managed instance group. The instances are also -// removed from any target pools of which they were a member. This -// method reduces the targetSize of the managed instance group by the -// number of instances that you delete. This operation is marked as DONE -// when the action is scheduled even if the instances are still being -// deleted. You must separately verify the status of the deleting action -// with the listmanagedinstances method. -// -// If the group is part of a backend service that has enabled connection -// draining, it can take up to 60 seconds after the connection draining -// duration has elapsed before the VM instance is removed or -// deleted. -// -// You can specify a maximum of 1000 instances with this method per -// request. -func (r *InstanceGroupManagersService) DeleteInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersdeleteinstancesrequest *InstanceGroupManagersDeleteInstancesRequest) *InstanceGroupManagersDeleteInstancesCall { - c := &InstanceGroupManagersDeleteInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersdeleteinstancesrequest = instancegroupmanagersdeleteinstancesrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersDeleteInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersDeleteInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersDeleteInstancesCall) Context(ctx context.Context) *InstanceGroupManagersDeleteInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersDeleteInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersdeleteinstancesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.deleteInstances" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersDeleteInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.deleteInstances", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", - // "request": { - // "$ref": "InstanceGroupManagersDeleteInstancesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.get": - -type InstanceGroupManagersGetCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns all of the details about the specified managed instance -// group. Get a list of available managed instance groups by making a -// list() request. -func (r *InstanceGroupManagersService) Get(project string, zone string, instanceGroupManager string) *InstanceGroupManagersGetCall { - c := &InstanceGroupManagersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersGetCall) Fields(s ...googleapi.Field) *InstanceGroupManagersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstanceGroupManagersGetCall) IfNoneMatch(entityTag string) *InstanceGroupManagersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersGetCall) Context(ctx context.Context) *InstanceGroupManagersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.get" call. -// Exactly one of *InstanceGroupManager or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstanceGroupManager.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceGroupManagersGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManager, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceGroupManager{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns all of the details about the specified managed instance group. Get a list of available managed instance groups by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.instanceGroupManagers.get", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - // "response": { - // "$ref": "InstanceGroupManager" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.insert": - -type InstanceGroupManagersInsertCall struct { - s *Service - project string - zone string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a managed instance group using the information that -// you specify in the request. After the group is created, it schedules -// an action to create instances in the group using the specified -// instance template. This operation is marked as DONE when the group is -// created even if the instances in the group have not yet been created. -// You must separately verify the status of the individual instances -// with the listmanagedinstances method. -// -// A managed instance group can have up to 1000 VM instances per group. -// Please contact Cloud Support if you need an increase in this limit. -func (r *InstanceGroupManagersService) Insert(project string, zone string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersInsertCall { - c := &InstanceGroupManagersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instancegroupmanager = instancegroupmanager - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersInsertCall) Fields(s ...googleapi.Field) *InstanceGroupManagersInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersInsertCall) Context(ctx context.Context) *InstanceGroupManagersInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.insert", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where you want to create the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers", - // "request": { - // "$ref": "InstanceGroupManager" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.list": - -type InstanceGroupManagersListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of managed instance groups that are contained -// within the specified project and zone. -func (r *InstanceGroupManagersService) List(project string, zone string) *InstanceGroupManagersListCall { - c := &InstanceGroupManagersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *InstanceGroupManagersListCall) Filter(filter string) *InstanceGroupManagersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *InstanceGroupManagersListCall) MaxResults(maxResults int64) *InstanceGroupManagersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *InstanceGroupManagersListCall) OrderBy(orderBy string) *InstanceGroupManagersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *InstanceGroupManagersListCall) PageToken(pageToken string) *InstanceGroupManagersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersListCall) Fields(s ...googleapi.Field) *InstanceGroupManagersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstanceGroupManagersListCall) IfNoneMatch(entityTag string) *InstanceGroupManagersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersListCall) Context(ctx context.Context) *InstanceGroupManagersListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.list" call. -// Exactly one of *InstanceGroupManagerList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupManagerList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceGroupManagersListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagerList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceGroupManagerList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of managed instance groups that are contained within the specified project and zone.", - // "httpMethod": "GET", - // "id": "compute.instanceGroupManagers.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers", - // "response": { - // "$ref": "InstanceGroupManagerList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstanceGroupManagersListCall) Pages(ctx context.Context, f func(*InstanceGroupManagerList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.instanceGroupManagers.listManagedInstances": - -type InstanceGroupManagersListManagedInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListManagedInstances: Lists all of the instances in the managed -// instance group. Each instance in the list has a currentAction, which -// indicates the action that the managed instance group is performing on -// the instance. For example, if the group is still creating an -// instance, the currentAction is CREATING. If a previous action failed, -// the list displays the errors for that failed action. -func (r *InstanceGroupManagersService) ListManagedInstances(project string, zone string, instanceGroupManager string) *InstanceGroupManagersListManagedInstancesCall { - c := &InstanceGroupManagersListManagedInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - return c -} - -// Filter sets the optional parameter "filter": -func (c *InstanceGroupManagersListManagedInstancesCall) Filter(filter string) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": -func (c *InstanceGroupManagersListManagedInstancesCall) MaxResults(maxResults int64) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "order_by": -func (c *InstanceGroupManagersListManagedInstancesCall) OrderBy(orderBy string) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("order_by", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": -func (c *InstanceGroupManagersListManagedInstancesCall) PageToken(pageToken string) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersListManagedInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersListManagedInstancesCall) Context(ctx context.Context) *InstanceGroupManagersListManagedInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersListManagedInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.listManagedInstances" call. -// Exactly one of *InstanceGroupManagersListManagedInstancesResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *InstanceGroupManagersListManagedInstancesResponse.ServerResponse.Head -// er or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *InstanceGroupManagersListManagedInstancesCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagersListManagedInstancesResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceGroupManagersListManagedInstancesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.listManagedInstances", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "filter": { - // "location": "query", - // "type": "string" - // }, - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "order_by": { - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", - // "response": { - // "$ref": "InstanceGroupManagersListManagedInstancesResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.recreateInstances": - -type InstanceGroupManagersRecreateInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersrecreateinstancesrequest *InstanceGroupManagersRecreateInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RecreateInstances: Schedules a group action to recreate the specified -// instances in the managed instance group. The instances are deleted -// and recreated using the current instance template for the managed -// instance group. This operation is marked as DONE when the action is -// scheduled even if the instances have not yet been recreated. You must -// separately verify the status of the recreating action with the -// listmanagedinstances method. -// -// If the group is part of a backend service that has enabled connection -// draining, it can take up to 60 seconds after the connection draining -// duration has elapsed before the VM instance is removed or -// deleted. -// -// You can specify a maximum of 1000 instances with this method per -// request. -func (r *InstanceGroupManagersService) RecreateInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersrecreateinstancesrequest *InstanceGroupManagersRecreateInstancesRequest) *InstanceGroupManagersRecreateInstancesCall { - c := &InstanceGroupManagersRecreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersrecreateinstancesrequest = instancegroupmanagersrecreateinstancesrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersRecreateInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersRecreateInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersRecreateInstancesCall) Context(ctx context.Context) *InstanceGroupManagersRecreateInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersRecreateInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersrecreateinstancesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.recreateInstances" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.recreateInstances", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", - // "request": { - // "$ref": "InstanceGroupManagersRecreateInstancesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.resize": - -type InstanceGroupManagersResizeCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Resize: Resizes the managed instance group. If you increase the size, -// the group creates new instances using the current instance template. -// If you decrease the size, the group deletes instances. The resize -// operation is marked DONE when the resize actions are scheduled even -// if the group has not yet added or deleted any instances. You must -// separately verify the status of the creating or deleting actions with -// the listmanagedinstances method. -// -// If the group is part of a backend service that has enabled connection -// draining, it can take up to 60 seconds after the connection draining -// duration has elapsed before the VM instance is removed or deleted. -func (r *InstanceGroupManagersService) Resize(project string, zone string, instanceGroupManager string, size int64) *InstanceGroupManagersResizeCall { - c := &InstanceGroupManagersResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.urlParams_.Set("size", fmt.Sprint(size)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersResizeCall) Fields(s ...googleapi.Field) *InstanceGroupManagersResizeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersResizeCall) Context(ctx context.Context) *InstanceGroupManagersResizeCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersResizeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.resize" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.resize", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager", - // "size" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "size": { - // "description": "The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter.", - // "format": "int32", - // "location": "query", - // "required": true, - // "type": "integer" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.setInstanceTemplate": - -type InstanceGroupManagersSetInstanceTemplateCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagerssetinstancetemplaterequest *InstanceGroupManagersSetInstanceTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetInstanceTemplate: Specifies the instance template to use when -// creating new instances in this group. The templates for existing -// instances in the group do not change unless you recreate them. -func (r *InstanceGroupManagersService) SetInstanceTemplate(project string, zone string, instanceGroupManager string, instancegroupmanagerssetinstancetemplaterequest *InstanceGroupManagersSetInstanceTemplateRequest) *InstanceGroupManagersSetInstanceTemplateCall { - c := &InstanceGroupManagersSetInstanceTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagerssetinstancetemplaterequest = instancegroupmanagerssetinstancetemplaterequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersSetInstanceTemplateCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSetInstanceTemplateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersSetInstanceTemplateCall) Context(ctx context.Context) *InstanceGroupManagersSetInstanceTemplateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersSetInstanceTemplateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerssetinstancetemplaterequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.setInstanceTemplate" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.setInstanceTemplate", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", - // "request": { - // "$ref": "InstanceGroupManagersSetInstanceTemplateRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroupManagers.setTargetPools": - -type InstanceGroupManagersSetTargetPoolsCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagerssettargetpoolsrequest *InstanceGroupManagersSetTargetPoolsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetTargetPools: Modifies the target pools to which all instances in -// this managed instance group are assigned. The target pools -// automatically apply to all of the instances in the managed instance -// group. This operation is marked DONE when you make the request even -// if the instances have not yet been added to their target pools. The -// change might take some time to apply to all of the instances in the -// group depending on the size of the group. -func (r *InstanceGroupManagersService) SetTargetPools(project string, zone string, instanceGroupManager string, instancegroupmanagerssettargetpoolsrequest *InstanceGroupManagersSetTargetPoolsRequest) *InstanceGroupManagersSetTargetPoolsCall { - c := &InstanceGroupManagersSetTargetPoolsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagerssettargetpoolsrequest = instancegroupmanagerssettargetpoolsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupManagersSetTargetPoolsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSetTargetPoolsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupManagersSetTargetPoolsCall) Context(ctx context.Context) *InstanceGroupManagersSetTargetPoolsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupManagersSetTargetPoolsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerssettargetpoolsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.setTargetPools" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.setTargetPools", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", - // "request": { - // "$ref": "InstanceGroupManagersSetTargetPoolsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroups.addInstances": - -type InstanceGroupsAddInstancesCall struct { - s *Service - project string - zone string - instanceGroup string - instancegroupsaddinstancesrequest *InstanceGroupsAddInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddInstances: Adds a list of instances to the specified instance -// group. All of the instances in the instance group must be in the same -// network/subnetwork. Read Adding instances for more information. -func (r *InstanceGroupsService) AddInstances(project string, zone string, instanceGroup string, instancegroupsaddinstancesrequest *InstanceGroupsAddInstancesRequest) *InstanceGroupsAddInstancesCall { - c := &InstanceGroupsAddInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - c.instancegroupsaddinstancesrequest = instancegroupsaddinstancesrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupsAddInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsAddInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupsAddInstancesCall) Context(ctx context.Context) *InstanceGroupsAddInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupsAddInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsAddInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupsaddinstancesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.addInstances" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupsAddInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.", - // "httpMethod": "POST", - // "id": "compute.instanceGroups.addInstances", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroup" - // ], - // "parameters": { - // "instanceGroup": { - // "description": "The name of the instance group where you are adding instances.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances", - // "request": { - // "$ref": "InstanceGroupsAddInstancesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroups.aggregatedList": - -type InstanceGroupsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of instance groups and sorts them -// by zone. -func (r *InstanceGroupsService) AggregatedList(project string) *InstanceGroupsAggregatedListCall { - c := &InstanceGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *InstanceGroupsAggregatedListCall) Filter(filter string) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *InstanceGroupsAggregatedListCall) MaxResults(maxResults int64) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *InstanceGroupsAggregatedListCall) OrderBy(orderBy string) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *InstanceGroupsAggregatedListCall) PageToken(pageToken string) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupsAggregatedListCall) Fields(s ...googleapi.Field) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstanceGroupsAggregatedListCall) IfNoneMatch(entityTag string) *InstanceGroupsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupsAggregatedListCall) Context(ctx context.Context) *InstanceGroupsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/instanceGroups") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.aggregatedList" call. -// Exactly one of *InstanceGroupAggregatedList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupAggregatedList.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceGroupAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of instance groups and sorts them by zone.", - // "httpMethod": "GET", - // "id": "compute.instanceGroups.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/instanceGroups", - // "response": { - // "$ref": "InstanceGroupAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstanceGroupsAggregatedListCall) Pages(ctx context.Context, f func(*InstanceGroupAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.instanceGroups.delete": - -type InstanceGroupsDeleteCall struct { - s *Service - project string - zone string - instanceGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified instance group. The instances in the -// group are not deleted. Note that instance group must not belong to a -// backend service. Read Deleting an instance group for more -// information. -func (r *InstanceGroupsService) Delete(project string, zone string, instanceGroup string) *InstanceGroupsDeleteCall { - c := &InstanceGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupsDeleteCall) Fields(s ...googleapi.Field) *InstanceGroupsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupsDeleteCall) Context(ctx context.Context) *InstanceGroupsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.", - // "httpMethod": "DELETE", - // "id": "compute.instanceGroups.delete", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroup" - // ], - // "parameters": { - // "instanceGroup": { - // "description": "The name of the instance group to delete.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroups.get": - -type InstanceGroupsGetCall struct { - s *Service - project string - zone string - instanceGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified instance group. Get a list of available -// instance groups by making a list() request. -func (r *InstanceGroupsService) Get(project string, zone string, instanceGroup string) *InstanceGroupsGetCall { - c := &InstanceGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupsGetCall) Fields(s ...googleapi.Field) *InstanceGroupsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstanceGroupsGetCall) IfNoneMatch(entityTag string) *InstanceGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupsGetCall) Context(ctx context.Context) *InstanceGroupsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.get" call. -// Exactly one of *InstanceGroup or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *InstanceGroup.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroup, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceGroup{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified instance group. Get a list of available instance groups by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.instanceGroups.get", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroup" - // ], - // "parameters": { - // "instanceGroup": { - // "description": "The name of the instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}", - // "response": { - // "$ref": "InstanceGroup" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.instanceGroups.insert": - -type InstanceGroupsInsertCall struct { - s *Service - project string - zone string - instancegroup *InstanceGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an instance group in the specified project using the -// parameters that are included in the request. -func (r *InstanceGroupsService) Insert(project string, zone string, instancegroup *InstanceGroup) *InstanceGroupsInsertCall { - c := &InstanceGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instancegroup = instancegroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupsInsertCall) Fields(s ...googleapi.Field) *InstanceGroupsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupsInsertCall) Context(ctx context.Context) *InstanceGroupsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroup) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates an instance group in the specified project using the parameters that are included in the request.", - // "httpMethod": "POST", - // "id": "compute.instanceGroups.insert", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where you want to create the instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroups", - // "request": { - // "$ref": "InstanceGroup" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroups.list": - -type InstanceGroupsListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of instance groups that are located in the -// specified project and zone. -func (r *InstanceGroupsService) List(project string, zone string) *InstanceGroupsListCall { - c := &InstanceGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *InstanceGroupsListCall) Filter(filter string) *InstanceGroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *InstanceGroupsListCall) MaxResults(maxResults int64) *InstanceGroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *InstanceGroupsListCall) OrderBy(orderBy string) *InstanceGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *InstanceGroupsListCall) PageToken(pageToken string) *InstanceGroupsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupsListCall) Fields(s ...googleapi.Field) *InstanceGroupsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstanceGroupsListCall) IfNoneMatch(entityTag string) *InstanceGroupsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupsListCall) Context(ctx context.Context) *InstanceGroupsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.list" call. -// Exactly one of *InstanceGroupList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstanceGroupList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceGroupList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of instance groups that are located in the specified project and zone.", - // "httpMethod": "GET", - // "id": "compute.instanceGroups.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroups", - // "response": { - // "$ref": "InstanceGroupList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstanceGroupsListCall) Pages(ctx context.Context, f func(*InstanceGroupList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.instanceGroups.listInstances": - -type InstanceGroupsListInstancesCall struct { - s *Service - project string - zone string - instanceGroup string - instancegroupslistinstancesrequest *InstanceGroupsListInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListInstances: Lists the instances in the specified instance group. -func (r *InstanceGroupsService) ListInstances(project string, zone string, instanceGroup string, instancegroupslistinstancesrequest *InstanceGroupsListInstancesRequest) *InstanceGroupsListInstancesCall { - c := &InstanceGroupsListInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - c.instancegroupslistinstancesrequest = instancegroupslistinstancesrequest - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *InstanceGroupsListInstancesCall) Filter(filter string) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *InstanceGroupsListInstancesCall) MaxResults(maxResults int64) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *InstanceGroupsListInstancesCall) OrderBy(orderBy string) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *InstanceGroupsListInstancesCall) PageToken(pageToken string) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupsListInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupsListInstancesCall) Context(ctx context.Context) *InstanceGroupsListInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupsListInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupslistinstancesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.listInstances" call. -// Exactly one of *InstanceGroupsListInstances or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupsListInstances.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) (*InstanceGroupsListInstances, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceGroupsListInstances{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists the instances in the specified instance group.", - // "httpMethod": "POST", - // "id": "compute.instanceGroups.listInstances", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroup" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "instanceGroup": { - // "description": "The name of the instance group from which you want to generate a list of included instances.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances", - // "request": { - // "$ref": "InstanceGroupsListInstancesRequest" - // }, - // "response": { - // "$ref": "InstanceGroupsListInstances" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstanceGroupsListInstancesCall) Pages(ctx context.Context, f func(*InstanceGroupsListInstances) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.instanceGroups.removeInstances": - -type InstanceGroupsRemoveInstancesCall struct { - s *Service - project string - zone string - instanceGroup string - instancegroupsremoveinstancesrequest *InstanceGroupsRemoveInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveInstances: Removes one or more instances from the specified -// instance group, but does not delete those instances. -// -// If the group is part of a backend service that has enabled connection -// draining, it can take up to 60 seconds after the connection draining -// duration before the VM instance is removed or deleted. -func (r *InstanceGroupsService) RemoveInstances(project string, zone string, instanceGroup string, instancegroupsremoveinstancesrequest *InstanceGroupsRemoveInstancesRequest) *InstanceGroupsRemoveInstancesCall { - c := &InstanceGroupsRemoveInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - c.instancegroupsremoveinstancesrequest = instancegroupsremoveinstancesrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupsRemoveInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsRemoveInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupsRemoveInstancesCall) Context(ctx context.Context) *InstanceGroupsRemoveInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupsRemoveInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsRemoveInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupsremoveinstancesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.removeInstances" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupsRemoveInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Removes one or more instances from the specified instance group, but does not delete those instances.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted.", - // "httpMethod": "POST", - // "id": "compute.instanceGroups.removeInstances", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroup" - // ], - // "parameters": { - // "instanceGroup": { - // "description": "The name of the instance group where the specified instances will be removed.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances", - // "request": { - // "$ref": "InstanceGroupsRemoveInstancesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceGroups.setNamedPorts": - -type InstanceGroupsSetNamedPortsCall struct { - s *Service - project string - zone string - instanceGroup string - instancegroupssetnamedportsrequest *InstanceGroupsSetNamedPortsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetNamedPorts: Sets the named ports for the specified instance group. -func (r *InstanceGroupsService) SetNamedPorts(project string, zone string, instanceGroup string, instancegroupssetnamedportsrequest *InstanceGroupsSetNamedPortsRequest) *InstanceGroupsSetNamedPortsCall { - c := &InstanceGroupsSetNamedPortsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - c.instancegroupssetnamedportsrequest = instancegroupssetnamedportsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceGroupsSetNamedPortsCall) Fields(s ...googleapi.Field) *InstanceGroupsSetNamedPortsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceGroupsSetNamedPortsCall) Context(ctx context.Context) *InstanceGroupsSetNamedPortsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceGroupsSetNamedPortsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupssetnamedportsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.setNamedPorts" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the named ports for the specified instance group.", - // "httpMethod": "POST", - // "id": "compute.instanceGroups.setNamedPorts", - // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroup" - // ], - // "parameters": { - // "instanceGroup": { - // "description": "The name of the instance group where the named ports are updated.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts", - // "request": { - // "$ref": "InstanceGroupsSetNamedPortsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceTemplates.delete": - -type InstanceTemplatesDeleteCall struct { - s *Service - project string - instanceTemplate string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified instance template. If you delete an -// instance template that is being referenced from another instance -// group, the instance group will not be able to create or recreate -// virtual machine instances. Deleting an instance template is permanent -// and cannot be undone. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/delete -func (r *InstanceTemplatesService) Delete(project string, instanceTemplate string) *InstanceTemplatesDeleteCall { - c := &InstanceTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instanceTemplate = instanceTemplate - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceTemplatesDeleteCall) Fields(s ...googleapi.Field) *InstanceTemplatesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceTemplatesDeleteCall) Context(ctx context.Context) *InstanceTemplatesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceTemplatesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates/{instanceTemplate}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instanceTemplate": c.instanceTemplate, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceTemplates.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified instance template. If you delete an instance template that is being referenced from another instance group, the instance group will not be able to create or recreate virtual machine instances. Deleting an instance template is permanent and cannot be undone.", - // "httpMethod": "DELETE", - // "id": "compute.instanceTemplates.delete", - // "parameterOrder": [ - // "project", - // "instanceTemplate" - // ], - // "parameters": { - // "instanceTemplate": { - // "description": "The name of the instance template to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/instanceTemplates/{instanceTemplate}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceTemplates.get": - -type InstanceTemplatesGetCall struct { - s *Service - project string - instanceTemplate string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified instance template. Get a list of available -// instance templates by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/get -func (r *InstanceTemplatesService) Get(project string, instanceTemplate string) *InstanceTemplatesGetCall { - c := &InstanceTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instanceTemplate = instanceTemplate - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceTemplatesGetCall) Fields(s ...googleapi.Field) *InstanceTemplatesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstanceTemplatesGetCall) IfNoneMatch(entityTag string) *InstanceTemplatesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceTemplatesGetCall) Context(ctx context.Context) *InstanceTemplatesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceTemplatesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceTemplatesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates/{instanceTemplate}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instanceTemplate": c.instanceTemplate, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceTemplates.get" call. -// Exactly one of *InstanceTemplate or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstanceTemplate.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*InstanceTemplate, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceTemplate{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified instance template. Get a list of available instance templates by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.instanceTemplates.get", - // "parameterOrder": [ - // "project", - // "instanceTemplate" - // ], - // "parameters": { - // "instanceTemplate": { - // "description": "The name of the instance template.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/instanceTemplates/{instanceTemplate}", - // "response": { - // "$ref": "InstanceTemplate" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.instanceTemplates.insert": - -type InstanceTemplatesInsertCall struct { - s *Service - project string - instancetemplate *InstanceTemplate - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an instance template in the specified project using -// the data that is included in the request. If you are creating a new -// template to update an existing instance group, your new instance -// template must use the same network or, if applicable, the same -// subnetwork as the original template. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/insert -func (r *InstanceTemplatesService) Insert(project string, instancetemplate *InstanceTemplate) *InstanceTemplatesInsertCall { - c := &InstanceTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instancetemplate = instancetemplate - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceTemplatesInsertCall) Fields(s ...googleapi.Field) *InstanceTemplatesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceTemplatesInsertCall) Context(ctx context.Context) *InstanceTemplatesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceTemplatesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceTemplatesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancetemplate) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceTemplates.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.", - // "httpMethod": "POST", - // "id": "compute.instanceTemplates.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/instanceTemplates", - // "request": { - // "$ref": "InstanceTemplate" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instanceTemplates.list": - -type InstanceTemplatesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of instance templates that are contained -// within the specified project and zone. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/list -func (r *InstanceTemplatesService) List(project string) *InstanceTemplatesListCall { - c := &InstanceTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *InstanceTemplatesListCall) Filter(filter string) *InstanceTemplatesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *InstanceTemplatesListCall) MaxResults(maxResults int64) *InstanceTemplatesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *InstanceTemplatesListCall) OrderBy(orderBy string) *InstanceTemplatesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *InstanceTemplatesListCall) PageToken(pageToken string) *InstanceTemplatesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstanceTemplatesListCall) Fields(s ...googleapi.Field) *InstanceTemplatesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstanceTemplatesListCall) IfNoneMatch(entityTag string) *InstanceTemplatesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstanceTemplatesListCall) Context(ctx context.Context) *InstanceTemplatesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstanceTemplatesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceTemplatesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceTemplates.list" call. -// Exactly one of *InstanceTemplateList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstanceTemplateList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*InstanceTemplateList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceTemplateList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of instance templates that are contained within the specified project and zone.", - // "httpMethod": "GET", - // "id": "compute.instanceTemplates.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/instanceTemplates", - // "response": { - // "$ref": "InstanceTemplateList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstanceTemplatesListCall) Pages(ctx context.Context, f func(*InstanceTemplateList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.instances.addAccessConfig": - -type InstancesAddAccessConfigCall struct { - s *Service - project string - zone string - instance string - accessconfig *AccessConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddAccessConfig: Adds an access config to an instance's network -// interface. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/addAccessConfig -func (r *InstancesService) AddAccessConfig(project string, zone string, instance string, networkInterface string, accessconfig *AccessConfig) *InstancesAddAccessConfigCall { - c := &InstancesAddAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("networkInterface", networkInterface) - c.accessconfig = accessconfig - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesAddAccessConfigCall) Fields(s ...googleapi.Field) *InstancesAddAccessConfigCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesAddAccessConfigCall) Context(ctx context.Context) *InstancesAddAccessConfigCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesAddAccessConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesAddAccessConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.accessconfig) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/addAccessConfig") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.addAccessConfig" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesAddAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Adds an access config to an instance's network interface.", - // "httpMethod": "POST", - // "id": "compute.instances.addAccessConfig", - // "parameterOrder": [ - // "project", - // "zone", - // "instance", - // "networkInterface" - // ], - // "parameters": { - // "instance": { - // "description": "The instance name for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "networkInterface": { - // "description": "The name of the network interface to add to this instance.", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/addAccessConfig", - // "request": { - // "$ref": "AccessConfig" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.aggregatedList": - -type InstancesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves aggregated list of instances. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/aggregatedList -func (r *InstancesService) AggregatedList(project string) *InstancesAggregatedListCall { - c := &InstancesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *InstancesAggregatedListCall) Filter(filter string) *InstancesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *InstancesAggregatedListCall) MaxResults(maxResults int64) *InstancesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *InstancesAggregatedListCall) OrderBy(orderBy string) *InstancesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *InstancesAggregatedListCall) PageToken(pageToken string) *InstancesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesAggregatedListCall) Fields(s ...googleapi.Field) *InstancesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstancesAggregatedListCall) IfNoneMatch(entityTag string) *InstancesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesAggregatedListCall) Context(ctx context.Context) *InstancesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/instances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.aggregatedList" call. -// Exactly one of *InstanceAggregatedList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstanceAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves aggregated list of instances.", - // "httpMethod": "GET", - // "id": "compute.instances.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/instances", - // "response": { - // "$ref": "InstanceAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstancesAggregatedListCall) Pages(ctx context.Context, f func(*InstanceAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.instances.attachDisk": - -type InstancesAttachDiskCall struct { - s *Service - project string - zone string - instance string - attacheddisk *AttachedDisk - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AttachDisk: Attaches an existing Disk resource to an instance. You -// must first create the disk before you can attach it. It is not -// possible to create and attach a disk at the same time. For more -// information, read Adding a persistent disk to your instance. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/attachDisk -func (r *InstancesService) AttachDisk(project string, zone string, instance string, attacheddisk *AttachedDisk) *InstancesAttachDiskCall { - c := &InstancesAttachDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.attacheddisk = attacheddisk - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesAttachDiskCall) Fields(s ...googleapi.Field) *InstancesAttachDiskCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesAttachDiskCall) Context(ctx context.Context) *InstancesAttachDiskCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesAttachDiskCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesAttachDiskCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.attacheddisk) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/attachDisk") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.attachDisk" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesAttachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.", - // "httpMethod": "POST", - // "id": "compute.instances.attachDisk", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "The instance name for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/attachDisk", - // "request": { - // "$ref": "AttachedDisk" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.delete": - -type InstancesDeleteCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Instance resource. For more -// information, see Stopping or Deleting an Instance. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/delete -func (r *InstancesService) Delete(project string, zone string, instance string) *InstancesDeleteCall { - c := &InstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesDeleteCall) Fields(s ...googleapi.Field) *InstancesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesDeleteCall) Context(ctx context.Context) *InstancesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.", - // "httpMethod": "DELETE", - // "id": "compute.instances.delete", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.deleteAccessConfig": - -type InstancesDeleteAccessConfigCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteAccessConfig: Deletes an access config from an instance's -// network interface. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/deleteAccessConfig -func (r *InstancesService) DeleteAccessConfig(project string, zone string, instance string, accessConfig string, networkInterface string) *InstancesDeleteAccessConfigCall { - c := &InstancesDeleteAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("accessConfig", accessConfig) - c.urlParams_.Set("networkInterface", networkInterface) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesDeleteAccessConfigCall) Fields(s ...googleapi.Field) *InstancesDeleteAccessConfigCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesDeleteAccessConfigCall) Context(ctx context.Context) *InstancesDeleteAccessConfigCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesDeleteAccessConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesDeleteAccessConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/deleteAccessConfig") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.deleteAccessConfig" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesDeleteAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes an access config from an instance's network interface.", - // "httpMethod": "POST", - // "id": "compute.instances.deleteAccessConfig", - // "parameterOrder": [ - // "project", - // "zone", - // "instance", - // "accessConfig", - // "networkInterface" - // ], - // "parameters": { - // "accessConfig": { - // "description": "The name of the access config to delete.", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "instance": { - // "description": "The instance name for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "networkInterface": { - // "description": "The name of the network interface.", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/deleteAccessConfig", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.detachDisk": - -type InstancesDetachDiskCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DetachDisk: Detaches a disk from an instance. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/detachDisk -func (r *InstancesService) DetachDisk(project string, zone string, instance string, deviceName string) *InstancesDetachDiskCall { - c := &InstancesDetachDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("deviceName", deviceName) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesDetachDiskCall) Fields(s ...googleapi.Field) *InstancesDetachDiskCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesDetachDiskCall) Context(ctx context.Context) *InstancesDetachDiskCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesDetachDiskCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesDetachDiskCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/detachDisk") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.detachDisk" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesDetachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Detaches a disk from an instance.", - // "httpMethod": "POST", - // "id": "compute.instances.detachDisk", - // "parameterOrder": [ - // "project", - // "zone", - // "instance", - // "deviceName" - // ], - // "parameters": { - // "deviceName": { - // "description": "Disk device name to detach.", - // "location": "query", - // "required": true, - // "type": "string" - // }, - // "instance": { - // "description": "Instance name.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/detachDisk", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.get": - -type InstancesGetCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Instance resource. Get a list of available -// instances by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/get -func (r *InstancesService) Get(project string, zone string, instance string) *InstancesGetCall { - c := &InstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesGetCall) Fields(s ...googleapi.Field) *InstancesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstancesGetCall) IfNoneMatch(entityTag string) *InstancesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesGetCall) Context(ctx context.Context) *InstancesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.get" call. -// Exactly one of *Instance or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Instance.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Instance{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified Instance resource. Get a list of available instances by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.instances.get", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}", - // "response": { - // "$ref": "Instance" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.instances.getSerialPortOutput": - -type InstancesGetSerialPortOutputCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetSerialPortOutput: Returns the specified instance's serial port -// output. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/getSerialPortOutput -func (r *InstancesService) GetSerialPortOutput(project string, zone string, instance string) *InstancesGetSerialPortOutputCall { - c := &InstancesGetSerialPortOutputCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// Port sets the optional parameter "port": Specifies which COM or -// serial port to retrieve data from. -func (c *InstancesGetSerialPortOutputCall) Port(port int64) *InstancesGetSerialPortOutputCall { - c.urlParams_.Set("port", fmt.Sprint(port)) - return c -} - -// Start sets the optional parameter "start": Returns output starting -// from a specific byte position. Use this to page through output when -// the output is too large to return in a single request. For the -// initial request, leave this field unspecified. For subsequent calls, -// this field should be set to the next value returned in the previous -// call. -func (c *InstancesGetSerialPortOutputCall) Start(start int64) *InstancesGetSerialPortOutputCall { - c.urlParams_.Set("start", fmt.Sprint(start)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesGetSerialPortOutputCall) Fields(s ...googleapi.Field) *InstancesGetSerialPortOutputCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstancesGetSerialPortOutputCall) IfNoneMatch(entityTag string) *InstancesGetSerialPortOutputCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesGetSerialPortOutputCall) Context(ctx context.Context) *InstancesGetSerialPortOutputCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesGetSerialPortOutputCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetSerialPortOutputCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/serialPort") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.getSerialPortOutput" call. -// Exactly one of *SerialPortOutput or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *SerialPortOutput.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstancesGetSerialPortOutputCall) Do(opts ...googleapi.CallOption) (*SerialPortOutput, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &SerialPortOutput{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified instance's serial port output.", - // "httpMethod": "GET", - // "id": "compute.instances.getSerialPortOutput", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "port": { - // "default": "1", - // "description": "Specifies which COM or serial port to retrieve data from.", - // "format": "int32", - // "location": "query", - // "maximum": "4", - // "minimum": "1", - // "type": "integer" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "start": { - // "description": "Returns output starting from a specific byte position. Use this to page through output when the output is too large to return in a single request. For the initial request, leave this field unspecified. For subsequent calls, this field should be set to the next value returned in the previous call.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/serialPort", - // "response": { - // "$ref": "SerialPortOutput" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.instances.insert": - -type InstancesInsertCall struct { - s *Service - project string - zone string - instance *Instance - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an instance resource in the specified project using -// the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/insert -func (r *InstancesService) Insert(project string, zone string, instance *Instance) *InstancesInsertCall { - c := &InstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesInsertCall) Fields(s ...googleapi.Field) *InstancesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesInsertCall) Context(ctx context.Context) *InstancesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates an instance resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.instances.insert", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances", - // "request": { - // "$ref": "Instance" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.list": - -type InstancesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of instances contained within the specified -// zone. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/list -func (r *InstancesService) List(project string, zone string) *InstancesListCall { - c := &InstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *InstancesListCall) Filter(filter string) *InstancesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *InstancesListCall) MaxResults(maxResults int64) *InstancesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *InstancesListCall) OrderBy(orderBy string) *InstancesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *InstancesListCall) PageToken(pageToken string) *InstancesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesListCall) Fields(s ...googleapi.Field) *InstancesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstancesListCall) IfNoneMatch(entityTag string) *InstancesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesListCall) Context(ctx context.Context) *InstancesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.list" call. -// Exactly one of *InstanceList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *InstanceList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstanceList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of instances contained within the specified zone.", - // "httpMethod": "GET", - // "id": "compute.instances.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances", - // "response": { - // "$ref": "InstanceList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstancesListCall) Pages(ctx context.Context, f func(*InstanceList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.instances.reset": - -type InstancesResetCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Reset: Performs a reset on the instance. For more information, see -// Resetting an instance. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/reset -func (r *InstancesService) Reset(project string, zone string, instance string) *InstancesResetCall { - c := &InstancesResetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesResetCall) Fields(s ...googleapi.Field) *InstancesResetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesResetCall) Context(ctx context.Context) *InstancesResetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesResetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesResetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/reset") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.reset" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesResetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Performs a reset on the instance. For more information, see Resetting an instance.", - // "httpMethod": "POST", - // "id": "compute.instances.reset", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/reset", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.setDiskAutoDelete": - -type InstancesSetDiskAutoDeleteCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetDiskAutoDelete: Sets the auto-delete flag for a disk attached to -// an instance. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setDiskAutoDelete -func (r *InstancesService) SetDiskAutoDelete(project string, zone string, instance string, autoDelete bool, deviceName string) *InstancesSetDiskAutoDeleteCall { - c := &InstancesSetDiskAutoDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("autoDelete", fmt.Sprint(autoDelete)) - c.urlParams_.Set("deviceName", deviceName) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesSetDiskAutoDeleteCall) Fields(s ...googleapi.Field) *InstancesSetDiskAutoDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesSetDiskAutoDeleteCall) Context(ctx context.Context) *InstancesSetDiskAutoDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesSetDiskAutoDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetDiskAutoDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setDiskAutoDelete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesSetDiskAutoDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the auto-delete flag for a disk attached to an instance.", - // "httpMethod": "POST", - // "id": "compute.instances.setDiskAutoDelete", - // "parameterOrder": [ - // "project", - // "zone", - // "instance", - // "autoDelete", - // "deviceName" - // ], - // "parameters": { - // "autoDelete": { - // "description": "Whether to auto-delete the disk when the instance is deleted.", - // "location": "query", - // "required": true, - // "type": "boolean" - // }, - // "deviceName": { - // "description": "The device name of the disk to modify.", - // "location": "query", - // "pattern": "\\w[\\w.-]{0,254}", - // "required": true, - // "type": "string" - // }, - // "instance": { - // "description": "The instance name.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.setLabels": - -type InstancesSetLabelsCall struct { - s *Service - project string - zone string - instance string - instancessetlabelsrequest *InstancesSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets labels on an instance. To learn more about labels, -// read the Labeling Resources documentation. -func (r *InstancesService) SetLabels(project string, zone string, instance string, instancessetlabelsrequest *InstancesSetLabelsRequest) *InstancesSetLabelsCall { - c := &InstancesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancessetlabelsrequest = instancessetlabelsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesSetLabelsCall) Fields(s ...googleapi.Field) *InstancesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesSetLabelsCall) Context(ctx context.Context) *InstancesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetlabelsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setLabels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setLabels" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.", - // "httpMethod": "POST", - // "id": "compute.instances.setLabels", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/setLabels", - // "request": { - // "$ref": "InstancesSetLabelsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.setMachineResources": - -type InstancesSetMachineResourcesCall struct { - s *Service - project string - zone string - instance string - instancessetmachineresourcesrequest *InstancesSetMachineResourcesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetMachineResources: Changes the number and/or type of accelerator -// for a stopped instance to the values specified in the request. -func (r *InstancesService) SetMachineResources(project string, zone string, instance string, instancessetmachineresourcesrequest *InstancesSetMachineResourcesRequest) *InstancesSetMachineResourcesCall { - c := &InstancesSetMachineResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancessetmachineresourcesrequest = instancessetmachineresourcesrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesSetMachineResourcesCall) Fields(s ...googleapi.Field) *InstancesSetMachineResourcesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesSetMachineResourcesCall) Context(ctx context.Context) *InstancesSetMachineResourcesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesSetMachineResourcesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetMachineResourcesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetmachineresourcesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setMachineResources") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setMachineResources" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesSetMachineResourcesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.", - // "httpMethod": "POST", - // "id": "compute.instances.setMachineResources", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/setMachineResources", - // "request": { - // "$ref": "InstancesSetMachineResourcesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.setMachineType": - -type InstancesSetMachineTypeCall struct { - s *Service - project string - zone string - instance string - instancessetmachinetyperequest *InstancesSetMachineTypeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetMachineType: Changes the machine type for a stopped instance to -// the machine type specified in the request. -func (r *InstancesService) SetMachineType(project string, zone string, instance string, instancessetmachinetyperequest *InstancesSetMachineTypeRequest) *InstancesSetMachineTypeCall { - c := &InstancesSetMachineTypeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancessetmachinetyperequest = instancessetmachinetyperequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesSetMachineTypeCall) Fields(s ...googleapi.Field) *InstancesSetMachineTypeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesSetMachineTypeCall) Context(ctx context.Context) *InstancesSetMachineTypeCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesSetMachineTypeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetMachineTypeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetmachinetyperequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setMachineType") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setMachineType" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesSetMachineTypeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes the machine type for a stopped instance to the machine type specified in the request.", - // "httpMethod": "POST", - // "id": "compute.instances.setMachineType", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/setMachineType", - // "request": { - // "$ref": "InstancesSetMachineTypeRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.setMetadata": - -type InstancesSetMetadataCall struct { - s *Service - project string - zone string - instance string - metadata *Metadata - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetMetadata: Sets metadata for the specified instance to the data -// included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setMetadata -func (r *InstancesService) SetMetadata(project string, zone string, instance string, metadata *Metadata) *InstancesSetMetadataCall { - c := &InstancesSetMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.metadata = metadata - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesSetMetadataCall) Fields(s ...googleapi.Field) *InstancesSetMetadataCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesSetMetadataCall) Context(ctx context.Context) *InstancesSetMetadataCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesSetMetadataCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetMetadataCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.metadata) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setMetadata") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setMetadata" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesSetMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets metadata for the specified instance to the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.instances.setMetadata", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/setMetadata", - // "request": { - // "$ref": "Metadata" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.setScheduling": - -type InstancesSetSchedulingCall struct { - s *Service - project string - zone string - instance string - scheduling *Scheduling - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetScheduling: Sets an instance's scheduling options. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setScheduling -func (r *InstancesService) SetScheduling(project string, zone string, instance string, scheduling *Scheduling) *InstancesSetSchedulingCall { - c := &InstancesSetSchedulingCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.scheduling = scheduling - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesSetSchedulingCall) Fields(s ...googleapi.Field) *InstancesSetSchedulingCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesSetSchedulingCall) Context(ctx context.Context) *InstancesSetSchedulingCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesSetSchedulingCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetSchedulingCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.scheduling) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setScheduling") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setScheduling" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesSetSchedulingCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets an instance's scheduling options.", - // "httpMethod": "POST", - // "id": "compute.instances.setScheduling", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Instance name.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/setScheduling", - // "request": { - // "$ref": "Scheduling" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.setServiceAccount": - -type InstancesSetServiceAccountCall struct { - s *Service - project string - zone string - instance string - instancessetserviceaccountrequest *InstancesSetServiceAccountRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetServiceAccount: Sets the service account on the instance. For more -// information, read Changing the service account and access scopes for -// an instance. -func (r *InstancesService) SetServiceAccount(project string, zone string, instance string, instancessetserviceaccountrequest *InstancesSetServiceAccountRequest) *InstancesSetServiceAccountCall { - c := &InstancesSetServiceAccountCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancessetserviceaccountrequest = instancessetserviceaccountrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesSetServiceAccountCall) Fields(s ...googleapi.Field) *InstancesSetServiceAccountCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesSetServiceAccountCall) Context(ctx context.Context) *InstancesSetServiceAccountCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesSetServiceAccountCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetServiceAccountCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetserviceaccountrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setServiceAccount") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setServiceAccount" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesSetServiceAccountCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.", - // "httpMethod": "POST", - // "id": "compute.instances.setServiceAccount", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance resource to start.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/setServiceAccount", - // "request": { - // "$ref": "InstancesSetServiceAccountRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.setTags": - -type InstancesSetTagsCall struct { - s *Service - project string - zone string - instance string - tags *Tags - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetTags: Sets tags for the specified instance to the data included in -// the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setTags -func (r *InstancesService) SetTags(project string, zone string, instance string, tags *Tags) *InstancesSetTagsCall { - c := &InstancesSetTagsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.tags = tags - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesSetTagsCall) Fields(s ...googleapi.Field) *InstancesSetTagsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesSetTagsCall) Context(ctx context.Context) *InstancesSetTagsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesSetTagsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetTagsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.tags) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setTags") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setTags" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesSetTagsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets tags for the specified instance to the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.instances.setTags", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/setTags", - // "request": { - // "$ref": "Tags" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.start": - -type InstancesStartCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Start: Starts an instance that was stopped using the using the -// instances().stop method. For more information, see Restart an -// instance. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/start -func (r *InstancesService) Start(project string, zone string, instance string) *InstancesStartCall { - c := &InstancesStartCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesStartCall) Fields(s ...googleapi.Field) *InstancesStartCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesStartCall) Context(ctx context.Context) *InstancesStartCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesStartCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesStartCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/start") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.start" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.", - // "httpMethod": "POST", - // "id": "compute.instances.start", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance resource to start.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/start", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.startWithEncryptionKey": - -type InstancesStartWithEncryptionKeyCall struct { - s *Service - project string - zone string - instance string - instancesstartwithencryptionkeyrequest *InstancesStartWithEncryptionKeyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StartWithEncryptionKey: Starts an instance that was stopped using the -// using the instances().stop method. For more information, see Restart -// an instance. -func (r *InstancesService) StartWithEncryptionKey(project string, zone string, instance string, instancesstartwithencryptionkeyrequest *InstancesStartWithEncryptionKeyRequest) *InstancesStartWithEncryptionKeyCall { - c := &InstancesStartWithEncryptionKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancesstartwithencryptionkeyrequest = instancesstartwithencryptionkeyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesStartWithEncryptionKeyCall) Fields(s ...googleapi.Field) *InstancesStartWithEncryptionKeyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesStartWithEncryptionKeyCall) Context(ctx context.Context) *InstancesStartWithEncryptionKeyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesStartWithEncryptionKeyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesStartWithEncryptionKeyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesstartwithencryptionkeyrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.startWithEncryptionKey" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesStartWithEncryptionKeyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.", - // "httpMethod": "POST", - // "id": "compute.instances.startWithEncryptionKey", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance resource to start.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey", - // "request": { - // "$ref": "InstancesStartWithEncryptionKeyRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.stop": - -type InstancesStopCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Stop: Stops a running instance, shutting it down cleanly, and allows -// you to restart the instance at a later time. Stopped instances do not -// incur per-minute, virtual machine usage charges while they are -// stopped, but any resources that the virtual machine is using, such as -// persistent disks and static IP addresses, will continue to be charged -// until they are deleted. For more information, see Stopping an -// instance. -// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/stop -func (r *InstancesService) Stop(project string, zone string, instance string) *InstancesStopCall { - c := &InstancesStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesStopCall) Fields(s ...googleapi.Field) *InstancesStopCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesStopCall) Context(ctx context.Context) *InstancesStopCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesStopCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesStopCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/stop") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.stop" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur per-minute, virtual machine usage charges while they are stopped, but any resources that the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.", - // "httpMethod": "POST", - // "id": "compute.instances.stop", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance resource to stop.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/instances/{instance}/stop", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.licenses.get": - -type LicensesGetCall struct { - s *Service - project string - license string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified License resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/licenses/get -func (r *LicensesService) Get(project string, license string) *LicensesGetCall { - c := &LicensesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.license = license - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *LicensesGetCall) Fields(s ...googleapi.Field) *LicensesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *LicensesGetCall) IfNoneMatch(entityTag string) *LicensesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *LicensesGetCall) Context(ctx context.Context) *LicensesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *LicensesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicensesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/licenses/{license}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "license": c.license, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.licenses.get" call. -// Exactly one of *License or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *License.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *LicensesGetCall) Do(opts ...googleapi.CallOption) (*License, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &License{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified License resource.", - // "httpMethod": "GET", - // "id": "compute.licenses.get", - // "parameterOrder": [ - // "project", - // "license" - // ], - // "parameters": { - // "license": { - // "description": "Name of the License resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/licenses/{license}", - // "response": { - // "$ref": "License" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.machineTypes.aggregatedList": - -type MachineTypesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of machine types. -// For details, see https://cloud.google.com/compute/docs/reference/latest/machineTypes/aggregatedList -func (r *MachineTypesService) AggregatedList(project string) *MachineTypesAggregatedListCall { - c := &MachineTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *MachineTypesAggregatedListCall) Filter(filter string) *MachineTypesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *MachineTypesAggregatedListCall) MaxResults(maxResults int64) *MachineTypesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *MachineTypesAggregatedListCall) OrderBy(orderBy string) *MachineTypesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *MachineTypesAggregatedListCall) PageToken(pageToken string) *MachineTypesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *MachineTypesAggregatedListCall) Fields(s ...googleapi.Field) *MachineTypesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *MachineTypesAggregatedListCall) IfNoneMatch(entityTag string) *MachineTypesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *MachineTypesAggregatedListCall) Context(ctx context.Context) *MachineTypesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *MachineTypesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MachineTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/machineTypes") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.machineTypes.aggregatedList" call. -// Exactly one of *MachineTypeAggregatedList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *MachineTypeAggregatedList.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *MachineTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*MachineTypeAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &MachineTypeAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of machine types.", - // "httpMethod": "GET", - // "id": "compute.machineTypes.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/machineTypes", - // "response": { - // "$ref": "MachineTypeAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *MachineTypesAggregatedListCall) Pages(ctx context.Context, f func(*MachineTypeAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.machineTypes.get": - -type MachineTypesGetCall struct { - s *Service - project string - zone string - machineType string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified machine type. Get a list of available -// machine types by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/machineTypes/get -func (r *MachineTypesService) Get(project string, zone string, machineType string) *MachineTypesGetCall { - c := &MachineTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.machineType = machineType - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *MachineTypesGetCall) Fields(s ...googleapi.Field) *MachineTypesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *MachineTypesGetCall) IfNoneMatch(entityTag string) *MachineTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *MachineTypesGetCall) Context(ctx context.Context) *MachineTypesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *MachineTypesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MachineTypesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/machineTypes/{machineType}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "machineType": c.machineType, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.machineTypes.get" call. -// Exactly one of *MachineType or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *MachineType.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *MachineTypesGetCall) Do(opts ...googleapi.CallOption) (*MachineType, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &MachineType{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified machine type. Get a list of available machine types by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.machineTypes.get", - // "parameterOrder": [ - // "project", - // "zone", - // "machineType" - // ], - // "parameters": { - // "machineType": { - // "description": "Name of the machine type to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/machineTypes/{machineType}", - // "response": { - // "$ref": "MachineType" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.machineTypes.list": - -type MachineTypesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of machine types available to the specified -// project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/machineTypes/list -func (r *MachineTypesService) List(project string, zone string) *MachineTypesListCall { - c := &MachineTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *MachineTypesListCall) Filter(filter string) *MachineTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *MachineTypesListCall) MaxResults(maxResults int64) *MachineTypesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *MachineTypesListCall) OrderBy(orderBy string) *MachineTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *MachineTypesListCall) PageToken(pageToken string) *MachineTypesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *MachineTypesListCall) Fields(s ...googleapi.Field) *MachineTypesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *MachineTypesListCall) IfNoneMatch(entityTag string) *MachineTypesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *MachineTypesListCall) Context(ctx context.Context) *MachineTypesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *MachineTypesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MachineTypesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/machineTypes") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.machineTypes.list" call. -// Exactly one of *MachineTypeList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *MachineTypeList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *MachineTypesListCall) Do(opts ...googleapi.CallOption) (*MachineTypeList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &MachineTypeList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of machine types available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.machineTypes.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/machineTypes", - // "response": { - // "$ref": "MachineTypeList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *MachineTypesListCall) Pages(ctx context.Context, f func(*MachineTypeList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.networks.addPeering": - -type NetworksAddPeeringCall struct { - s *Service - project string - network string - networksaddpeeringrequest *NetworksAddPeeringRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddPeering: Adds a peering to the specified network. -func (r *NetworksService) AddPeering(project string, network string, networksaddpeeringrequest *NetworksAddPeeringRequest) *NetworksAddPeeringCall { - c := &NetworksAddPeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - c.networksaddpeeringrequest = networksaddpeeringrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *NetworksAddPeeringCall) Fields(s ...googleapi.Field) *NetworksAddPeeringCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *NetworksAddPeeringCall) Context(ctx context.Context) *NetworksAddPeeringCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *NetworksAddPeeringCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksAddPeeringCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.networksaddpeeringrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}/addPeering") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "network": c.network, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.addPeering" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NetworksAddPeeringCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Adds a peering to the specified network.", - // "httpMethod": "POST", - // "id": "compute.networks.addPeering", - // "parameterOrder": [ - // "project", - // "network" - // ], - // "parameters": { - // "network": { - // "description": "Name of the network resource to add peering to.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/networks/{network}/addPeering", - // "request": { - // "$ref": "NetworksAddPeeringRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.networks.delete": - -type NetworksDeleteCall struct { - s *Service - project string - network string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified network. -// For details, see https://cloud.google.com/compute/docs/reference/latest/networks/delete -func (r *NetworksService) Delete(project string, network string) *NetworksDeleteCall { - c := &NetworksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *NetworksDeleteCall) Fields(s ...googleapi.Field) *NetworksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *NetworksDeleteCall) Context(ctx context.Context) *NetworksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *NetworksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "network": c.network, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NetworksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified network.", - // "httpMethod": "DELETE", - // "id": "compute.networks.delete", - // "parameterOrder": [ - // "project", - // "network" - // ], - // "parameters": { - // "network": { - // "description": "Name of the network to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/networks/{network}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.networks.get": - -type NetworksGetCall struct { - s *Service - project string - network string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified network. Get a list of available networks -// by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/networks/get -func (r *NetworksService) Get(project string, network string) *NetworksGetCall { - c := &NetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *NetworksGetCall) Fields(s ...googleapi.Field) *NetworksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *NetworksGetCall) IfNoneMatch(entityTag string) *NetworksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *NetworksGetCall) Context(ctx context.Context) *NetworksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *NetworksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "network": c.network, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.get" call. -// Exactly one of *Network or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Network.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *NetworksGetCall) Do(opts ...googleapi.CallOption) (*Network, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Network{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified network. Get a list of available networks by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.networks.get", - // "parameterOrder": [ - // "project", - // "network" - // ], - // "parameters": { - // "network": { - // "description": "Name of the network to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/networks/{network}", - // "response": { - // "$ref": "Network" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.networks.insert": - -type NetworksInsertCall struct { - s *Service - project string - network *Network - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a network in the specified project using the data -// included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/networks/insert -func (r *NetworksService) Insert(project string, network *Network) *NetworksInsertCall { - c := &NetworksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *NetworksInsertCall) Fields(s ...googleapi.Field) *NetworksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *NetworksInsertCall) Context(ctx context.Context) *NetworksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *NetworksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.network) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NetworksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a network in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.networks.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/networks", - // "request": { - // "$ref": "Network" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.networks.list": - -type NetworksListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of networks available to the specified -// project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/networks/list -func (r *NetworksService) List(project string) *NetworksListCall { - c := &NetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *NetworksListCall) Filter(filter string) *NetworksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *NetworksListCall) MaxResults(maxResults int64) *NetworksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *NetworksListCall) OrderBy(orderBy string) *NetworksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *NetworksListCall) PageToken(pageToken string) *NetworksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *NetworksListCall) Fields(s ...googleapi.Field) *NetworksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *NetworksListCall) IfNoneMatch(entityTag string) *NetworksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *NetworksListCall) Context(ctx context.Context) *NetworksListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *NetworksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.list" call. -// Exactly one of *NetworkList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *NetworkList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NetworksListCall) Do(opts ...googleapi.CallOption) (*NetworkList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &NetworkList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of networks available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.networks.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/networks", - // "response": { - // "$ref": "NetworkList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *NetworksListCall) Pages(ctx context.Context, f func(*NetworkList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.networks.removePeering": - -type NetworksRemovePeeringCall struct { - s *Service - project string - network string - networksremovepeeringrequest *NetworksRemovePeeringRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemovePeering: Removes a peering from the specified network. -func (r *NetworksService) RemovePeering(project string, network string, networksremovepeeringrequest *NetworksRemovePeeringRequest) *NetworksRemovePeeringCall { - c := &NetworksRemovePeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - c.networksremovepeeringrequest = networksremovepeeringrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *NetworksRemovePeeringCall) Fields(s ...googleapi.Field) *NetworksRemovePeeringCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *NetworksRemovePeeringCall) Context(ctx context.Context) *NetworksRemovePeeringCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *NetworksRemovePeeringCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksRemovePeeringCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.networksremovepeeringrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}/removePeering") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "network": c.network, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.removePeering" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NetworksRemovePeeringCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Removes a peering from the specified network.", - // "httpMethod": "POST", - // "id": "compute.networks.removePeering", - // "parameterOrder": [ - // "project", - // "network" - // ], - // "parameters": { - // "network": { - // "description": "Name of the network resource to remove peering from.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/networks/{network}/removePeering", - // "request": { - // "$ref": "NetworksRemovePeeringRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.networks.switchToCustomMode": - -type NetworksSwitchToCustomModeCall struct { - s *Service - project string - network string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SwitchToCustomMode: Switches the network mode from auto subnet mode -// to custom subnet mode. -func (r *NetworksService) SwitchToCustomMode(project string, network string) *NetworksSwitchToCustomModeCall { - c := &NetworksSwitchToCustomModeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *NetworksSwitchToCustomModeCall) Fields(s ...googleapi.Field) *NetworksSwitchToCustomModeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *NetworksSwitchToCustomModeCall) Context(ctx context.Context) *NetworksSwitchToCustomModeCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *NetworksSwitchToCustomModeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksSwitchToCustomModeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}/switchToCustomMode") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "network": c.network, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.switchToCustomMode" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NetworksSwitchToCustomModeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Switches the network mode from auto subnet mode to custom subnet mode.", - // "httpMethod": "POST", - // "id": "compute.networks.switchToCustomMode", - // "parameterOrder": [ - // "project", - // "network" - // ], - // "parameters": { - // "network": { - // "description": "Name of the network to be updated.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/networks/{network}/switchToCustomMode", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.projects.disableXpnHost": - -type ProjectsDisableXpnHostCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DisableXpnHost: Disable this project as a shared VPC host project. -func (r *ProjectsService) DisableXpnHost(project string) *ProjectsDisableXpnHostCall { - c := &ProjectsDisableXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsDisableXpnHostCall) Fields(s ...googleapi.Field) *ProjectsDisableXpnHostCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsDisableXpnHostCall) Context(ctx context.Context) *ProjectsDisableXpnHostCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsDisableXpnHostCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsDisableXpnHostCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/disableXpnHost") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.disableXpnHost" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsDisableXpnHostCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Disable this project as a shared VPC host project.", - // "httpMethod": "POST", - // "id": "compute.projects.disableXpnHost", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/disableXpnHost", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.projects.disableXpnResource": - -type ProjectsDisableXpnResourceCall struct { - s *Service - project string - projectsdisablexpnresourcerequest *ProjectsDisableXpnResourceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DisableXpnResource: Disable a serivce resource (a.k.a service -// project) associated with this host project. -func (r *ProjectsService) DisableXpnResource(project string, projectsdisablexpnresourcerequest *ProjectsDisableXpnResourceRequest) *ProjectsDisableXpnResourceCall { - c := &ProjectsDisableXpnResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.projectsdisablexpnresourcerequest = projectsdisablexpnresourcerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsDisableXpnResourceCall) Fields(s ...googleapi.Field) *ProjectsDisableXpnResourceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsDisableXpnResourceCall) Context(ctx context.Context) *ProjectsDisableXpnResourceCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsDisableXpnResourceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsDisableXpnResourceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.projectsdisablexpnresourcerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/disableXpnResource") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.disableXpnResource" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsDisableXpnResourceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Disable a serivce resource (a.k.a service project) associated with this host project.", - // "httpMethod": "POST", - // "id": "compute.projects.disableXpnResource", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/disableXpnResource", - // "request": { - // "$ref": "ProjectsDisableXpnResourceRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.projects.enableXpnHost": - -type ProjectsEnableXpnHostCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// EnableXpnHost: Enable this project as a shared VPC host project. -func (r *ProjectsService) EnableXpnHost(project string) *ProjectsEnableXpnHostCall { - c := &ProjectsEnableXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsEnableXpnHostCall) Fields(s ...googleapi.Field) *ProjectsEnableXpnHostCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsEnableXpnHostCall) Context(ctx context.Context) *ProjectsEnableXpnHostCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsEnableXpnHostCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsEnableXpnHostCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/enableXpnHost") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.enableXpnHost" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsEnableXpnHostCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Enable this project as a shared VPC host project.", - // "httpMethod": "POST", - // "id": "compute.projects.enableXpnHost", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/enableXpnHost", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.projects.enableXpnResource": - -type ProjectsEnableXpnResourceCall struct { - s *Service - project string - projectsenablexpnresourcerequest *ProjectsEnableXpnResourceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// EnableXpnResource: Enable service resource (a.k.a service project) -// for a host project, so that subnets in the host project can be used -// by instances in the service project. -func (r *ProjectsService) EnableXpnResource(project string, projectsenablexpnresourcerequest *ProjectsEnableXpnResourceRequest) *ProjectsEnableXpnResourceCall { - c := &ProjectsEnableXpnResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.projectsenablexpnresourcerequest = projectsenablexpnresourcerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsEnableXpnResourceCall) Fields(s ...googleapi.Field) *ProjectsEnableXpnResourceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsEnableXpnResourceCall) Context(ctx context.Context) *ProjectsEnableXpnResourceCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsEnableXpnResourceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsEnableXpnResourceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.projectsenablexpnresourcerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/enableXpnResource") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.enableXpnResource" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsEnableXpnResourceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.", - // "httpMethod": "POST", - // "id": "compute.projects.enableXpnResource", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/enableXpnResource", - // "request": { - // "$ref": "ProjectsEnableXpnResourceRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.projects.get": - -type ProjectsGetCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Project resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/projects/get -func (r *ProjectsService) Get(project string) *ProjectsGetCall { - c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.get" call. -// Exactly one of *Project or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Project.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Project{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified Project resource.", - // "httpMethod": "GET", - // "id": "compute.projects.get", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}", - // "response": { - // "$ref": "Project" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.projects.getXpnHost": - -type ProjectsGetXpnHostCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetXpnHost: Get the shared VPC host project that this project links -// to. May be empty if no link exists. -func (r *ProjectsService) GetXpnHost(project string) *ProjectsGetXpnHostCall { - c := &ProjectsGetXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsGetXpnHostCall) Fields(s ...googleapi.Field) *ProjectsGetXpnHostCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsGetXpnHostCall) IfNoneMatch(entityTag string) *ProjectsGetXpnHostCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsGetXpnHostCall) Context(ctx context.Context) *ProjectsGetXpnHostCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsGetXpnHostCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsGetXpnHostCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/getXpnHost") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.getXpnHost" call. -// Exactly one of *Project or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Project.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsGetXpnHostCall) Do(opts ...googleapi.CallOption) (*Project, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Project{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Get the shared VPC host project that this project links to. May be empty if no link exists.", - // "httpMethod": "GET", - // "id": "compute.projects.getXpnHost", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/getXpnHost", - // "response": { - // "$ref": "Project" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.projects.getXpnResources": - -type ProjectsGetXpnResourcesCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetXpnResources: Get service resources (a.k.a service project) -// associated with this host project. -func (r *ProjectsService) GetXpnResources(project string) *ProjectsGetXpnResourcesCall { - c := &ProjectsGetXpnResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": -func (c *ProjectsGetXpnResourcesCall) Filter(filter string) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": -func (c *ProjectsGetXpnResourcesCall) MaxResults(maxResults int64) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "order_by": -func (c *ProjectsGetXpnResourcesCall) OrderBy(orderBy string) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("order_by", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": -func (c *ProjectsGetXpnResourcesCall) PageToken(pageToken string) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsGetXpnResourcesCall) Fields(s ...googleapi.Field) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsGetXpnResourcesCall) IfNoneMatch(entityTag string) *ProjectsGetXpnResourcesCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsGetXpnResourcesCall) Context(ctx context.Context) *ProjectsGetXpnResourcesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsGetXpnResourcesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsGetXpnResourcesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/getXpnResources") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.getXpnResources" call. -// Exactly one of *ProjectsGetXpnResources or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ProjectsGetXpnResources.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsGetXpnResourcesCall) Do(opts ...googleapi.CallOption) (*ProjectsGetXpnResources, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ProjectsGetXpnResources{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Get service resources (a.k.a service project) associated with this host project.", - // "httpMethod": "GET", - // "id": "compute.projects.getXpnResources", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "order_by": { - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/getXpnResources", - // "response": { - // "$ref": "ProjectsGetXpnResources" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsGetXpnResourcesCall) Pages(ctx context.Context, f func(*ProjectsGetXpnResources) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.projects.listXpnHosts": - -type ProjectsListXpnHostsCall struct { - s *Service - project string - projectslistxpnhostsrequest *ProjectsListXpnHostsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListXpnHosts: List all shared VPC host projects visible to the user -// in an organization. -func (r *ProjectsService) ListXpnHosts(project string, projectslistxpnhostsrequest *ProjectsListXpnHostsRequest) *ProjectsListXpnHostsCall { - c := &ProjectsListXpnHostsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.projectslistxpnhostsrequest = projectslistxpnhostsrequest - return c -} - -// Filter sets the optional parameter "filter": -func (c *ProjectsListXpnHostsCall) Filter(filter string) *ProjectsListXpnHostsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": -func (c *ProjectsListXpnHostsCall) MaxResults(maxResults int64) *ProjectsListXpnHostsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "order_by": -func (c *ProjectsListXpnHostsCall) OrderBy(orderBy string) *ProjectsListXpnHostsCall { - c.urlParams_.Set("order_by", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": -func (c *ProjectsListXpnHostsCall) PageToken(pageToken string) *ProjectsListXpnHostsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsListXpnHostsCall) Fields(s ...googleapi.Field) *ProjectsListXpnHostsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsListXpnHostsCall) Context(ctx context.Context) *ProjectsListXpnHostsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsListXpnHostsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsListXpnHostsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.projectslistxpnhostsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/listXpnHosts") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.listXpnHosts" call. -// Exactly one of *XpnHostList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *XpnHostList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsListXpnHostsCall) Do(opts ...googleapi.CallOption) (*XpnHostList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &XpnHostList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "List all shared VPC host projects visible to the user in an organization.", - // "httpMethod": "POST", - // "id": "compute.projects.listXpnHosts", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "order_by": { - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/listXpnHosts", - // "request": { - // "$ref": "ProjectsListXpnHostsRequest" - // }, - // "response": { - // "$ref": "XpnHostList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsListXpnHostsCall) Pages(ctx context.Context, f func(*XpnHostList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.projects.moveDisk": - -type ProjectsMoveDiskCall struct { - s *Service - project string - diskmoverequest *DiskMoveRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// MoveDisk: Moves a persistent disk from one zone to another. -func (r *ProjectsService) MoveDisk(project string, diskmoverequest *DiskMoveRequest) *ProjectsMoveDiskCall { - c := &ProjectsMoveDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.diskmoverequest = diskmoverequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsMoveDiskCall) Fields(s ...googleapi.Field) *ProjectsMoveDiskCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsMoveDiskCall) Context(ctx context.Context) *ProjectsMoveDiskCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsMoveDiskCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsMoveDiskCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.diskmoverequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/moveDisk") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.moveDisk" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsMoveDiskCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Moves a persistent disk from one zone to another.", - // "httpMethod": "POST", - // "id": "compute.projects.moveDisk", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/moveDisk", - // "request": { - // "$ref": "DiskMoveRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.projects.moveInstance": - -type ProjectsMoveInstanceCall struct { - s *Service - project string - instancemoverequest *InstanceMoveRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// MoveInstance: Moves an instance and its attached persistent disks -// from one zone to another. -func (r *ProjectsService) MoveInstance(project string, instancemoverequest *InstanceMoveRequest) *ProjectsMoveInstanceCall { - c := &ProjectsMoveInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instancemoverequest = instancemoverequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsMoveInstanceCall) Fields(s ...googleapi.Field) *ProjectsMoveInstanceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsMoveInstanceCall) Context(ctx context.Context) *ProjectsMoveInstanceCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsMoveInstanceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsMoveInstanceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancemoverequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/moveInstance") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.moveInstance" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsMoveInstanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Moves an instance and its attached persistent disks from one zone to another.", - // "httpMethod": "POST", - // "id": "compute.projects.moveInstance", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/moveInstance", - // "request": { - // "$ref": "InstanceMoveRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.projects.setCommonInstanceMetadata": - -type ProjectsSetCommonInstanceMetadataCall struct { - s *Service - project string - metadata *Metadata - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetCommonInstanceMetadata: Sets metadata common to all instances -// within the specified project using the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/projects/setCommonInstanceMetadata -func (r *ProjectsService) SetCommonInstanceMetadata(project string, metadata *Metadata) *ProjectsSetCommonInstanceMetadataCall { - c := &ProjectsSetCommonInstanceMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.metadata = metadata - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsSetCommonInstanceMetadataCall) Fields(s ...googleapi.Field) *ProjectsSetCommonInstanceMetadataCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsSetCommonInstanceMetadataCall) Context(ctx context.Context) *ProjectsSetCommonInstanceMetadataCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsSetCommonInstanceMetadataCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsSetCommonInstanceMetadataCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.metadata) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/setCommonInstanceMetadata") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.setCommonInstanceMetadata" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsSetCommonInstanceMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets metadata common to all instances within the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.projects.setCommonInstanceMetadata", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/setCommonInstanceMetadata", - // "request": { - // "$ref": "Metadata" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.projects.setUsageExportBucket": - -type ProjectsSetUsageExportBucketCall struct { - s *Service - project string - usageexportlocation *UsageExportLocation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetUsageExportBucket: Enables the usage export feature and sets the -// usage export bucket where reports are stored. If you provide an empty -// request body using this method, the usage export feature will be -// disabled. -// For details, see https://cloud.google.com/compute/docs/reference/latest/projects/setUsageExportBucket -func (r *ProjectsService) SetUsageExportBucket(project string, usageexportlocation *UsageExportLocation) *ProjectsSetUsageExportBucketCall { - c := &ProjectsSetUsageExportBucketCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.usageexportlocation = usageexportlocation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsSetUsageExportBucketCall) Fields(s ...googleapi.Field) *ProjectsSetUsageExportBucketCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsSetUsageExportBucketCall) Context(ctx context.Context) *ProjectsSetUsageExportBucketCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsSetUsageExportBucketCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsSetUsageExportBucketCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.usageexportlocation) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/setUsageExportBucket") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.setUsageExportBucket" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsSetUsageExportBucketCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.", - // "httpMethod": "POST", - // "id": "compute.projects.setUsageExportBucket", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/setUsageExportBucket", - // "request": { - // "$ref": "UsageExportLocation" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only", - // "https://www.googleapis.com/auth/devstorage.read_write" - // ] - // } - -} - -// method id "compute.regionAutoscalers.delete": - -type RegionAutoscalersDeleteCall struct { - s *Service - project string - region string - autoscaler string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified autoscaler. -func (r *RegionAutoscalersService) Delete(project string, region string, autoscaler string) *RegionAutoscalersDeleteCall { - c := &RegionAutoscalersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.autoscaler = autoscaler - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionAutoscalersDeleteCall) Fields(s ...googleapi.Field) *RegionAutoscalersDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionAutoscalersDeleteCall) Context(ctx context.Context) *RegionAutoscalersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionAutoscalersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers/{autoscaler}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "autoscaler": c.autoscaler, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionAutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified autoscaler.", - // "httpMethod": "DELETE", - // "id": "compute.regionAutoscalers.delete", - // "parameterOrder": [ - // "project", - // "region", - // "autoscaler" - // ], - // "parameters": { - // "autoscaler": { - // "description": "Name of the autoscaler to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/autoscalers/{autoscaler}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionAutoscalers.get": - -type RegionAutoscalersGetCall struct { - s *Service - project string - region string - autoscaler string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified autoscaler. -func (r *RegionAutoscalersService) Get(project string, region string, autoscaler string) *RegionAutoscalersGetCall { - c := &RegionAutoscalersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.autoscaler = autoscaler - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionAutoscalersGetCall) Fields(s ...googleapi.Field) *RegionAutoscalersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionAutoscalersGetCall) IfNoneMatch(entityTag string) *RegionAutoscalersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionAutoscalersGetCall) Context(ctx context.Context) *RegionAutoscalersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionAutoscalersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers/{autoscaler}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "autoscaler": c.autoscaler, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.get" call. -// Exactly one of *Autoscaler or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Autoscaler.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionAutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Autoscaler{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified autoscaler.", - // "httpMethod": "GET", - // "id": "compute.regionAutoscalers.get", - // "parameterOrder": [ - // "project", - // "region", - // "autoscaler" - // ], - // "parameters": { - // "autoscaler": { - // "description": "Name of the autoscaler to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/autoscalers/{autoscaler}", - // "response": { - // "$ref": "Autoscaler" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionAutoscalers.insert": - -type RegionAutoscalersInsertCall struct { - s *Service - project string - region string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an autoscaler in the specified project using the data -// included in the request. -func (r *RegionAutoscalersService) Insert(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersInsertCall { - c := &RegionAutoscalersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.autoscaler = autoscaler - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionAutoscalersInsertCall) Fields(s ...googleapi.Field) *RegionAutoscalersInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionAutoscalersInsertCall) Context(ctx context.Context) *RegionAutoscalersInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionAutoscalersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionAutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates an autoscaler in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.regionAutoscalers.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/autoscalers", - // "request": { - // "$ref": "Autoscaler" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionAutoscalers.list": - -type RegionAutoscalersListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of autoscalers contained within the specified -// region. -func (r *RegionAutoscalersService) List(project string, region string) *RegionAutoscalersListCall { - c := &RegionAutoscalersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RegionAutoscalersListCall) Filter(filter string) *RegionAutoscalersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RegionAutoscalersListCall) MaxResults(maxResults int64) *RegionAutoscalersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RegionAutoscalersListCall) OrderBy(orderBy string) *RegionAutoscalersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RegionAutoscalersListCall) PageToken(pageToken string) *RegionAutoscalersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionAutoscalersListCall) Fields(s ...googleapi.Field) *RegionAutoscalersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionAutoscalersListCall) IfNoneMatch(entityTag string) *RegionAutoscalersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionAutoscalersListCall) Context(ctx context.Context) *RegionAutoscalersListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionAutoscalersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.list" call. -// Exactly one of *RegionAutoscalerList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *RegionAutoscalerList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionAutoscalersListCall) Do(opts ...googleapi.CallOption) (*RegionAutoscalerList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RegionAutoscalerList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of autoscalers contained within the specified region.", - // "httpMethod": "GET", - // "id": "compute.regionAutoscalers.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/autoscalers", - // "response": { - // "$ref": "RegionAutoscalerList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionAutoscalersListCall) Pages(ctx context.Context, f func(*RegionAutoscalerList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.regionAutoscalers.patch": - -type RegionAutoscalersPatchCall struct { - s *Service - project string - region string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates an autoscaler in the specified project using the data -// included in the request. This method supports PATCH semantics and -// uses the JSON merge patch format and processing rules. -func (r *RegionAutoscalersService) Patch(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersPatchCall { - c := &RegionAutoscalersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.autoscaler = autoscaler - return c -} - -// Autoscaler sets the optional parameter "autoscaler": Name of the -// autoscaler to patch. -func (c *RegionAutoscalersPatchCall) Autoscaler(autoscaler string) *RegionAutoscalersPatchCall { - c.urlParams_.Set("autoscaler", autoscaler) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionAutoscalersPatchCall) Fields(s ...googleapi.Field) *RegionAutoscalersPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionAutoscalersPatchCall) Context(ctx context.Context) *RegionAutoscalersPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionAutoscalersPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionAutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.regionAutoscalers.patch", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "autoscaler": { - // "description": "Name of the autoscaler to patch.", - // "location": "query", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/autoscalers", - // "request": { - // "$ref": "Autoscaler" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionAutoscalers.update": - -type RegionAutoscalersUpdateCall struct { - s *Service - project string - region string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates an autoscaler in the specified project using the data -// included in the request. -func (r *RegionAutoscalersService) Update(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersUpdateCall { - c := &RegionAutoscalersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.autoscaler = autoscaler - return c -} - -// Autoscaler sets the optional parameter "autoscaler": Name of the -// autoscaler to update. -func (c *RegionAutoscalersUpdateCall) Autoscaler(autoscaler string) *RegionAutoscalersUpdateCall { - c.urlParams_.Set("autoscaler", autoscaler) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionAutoscalersUpdateCall) Fields(s ...googleapi.Field) *RegionAutoscalersUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionAutoscalersUpdateCall) Context(ctx context.Context) *RegionAutoscalersUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionAutoscalersUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionAutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates an autoscaler in the specified project using the data included in the request.", - // "httpMethod": "PUT", - // "id": "compute.regionAutoscalers.update", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "autoscaler": { - // "description": "Name of the autoscaler to update.", - // "location": "query", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/autoscalers", - // "request": { - // "$ref": "Autoscaler" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionBackendServices.delete": - -type RegionBackendServicesDeleteCall struct { - s *Service - project string - region string - backendService string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified regional BackendService resource. -func (r *RegionBackendServicesService) Delete(project string, region string, backendService string) *RegionBackendServicesDeleteCall { - c := &RegionBackendServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionBackendServicesDeleteCall) Fields(s ...googleapi.Field) *RegionBackendServicesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionBackendServicesDeleteCall) Context(ctx context.Context) *RegionBackendServicesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionBackendServicesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionBackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified regional BackendService resource.", - // "httpMethod": "DELETE", - // "id": "compute.regionBackendServices.delete", - // "parameterOrder": [ - // "project", - // "region", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/backendServices/{backendService}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionBackendServices.get": - -type RegionBackendServicesGetCall struct { - s *Service - project string - region string - backendService string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified regional BackendService resource. -func (r *RegionBackendServicesService) Get(project string, region string, backendService string) *RegionBackendServicesGetCall { - c := &RegionBackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionBackendServicesGetCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionBackendServicesGetCall) IfNoneMatch(entityTag string) *RegionBackendServicesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionBackendServicesGetCall) Context(ctx context.Context) *RegionBackendServicesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionBackendServicesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.get" call. -// Exactly one of *BackendService or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *BackendService.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionBackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendService, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &BackendService{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified regional BackendService resource.", - // "httpMethod": "GET", - // "id": "compute.regionBackendServices.get", - // "parameterOrder": [ - // "project", - // "region", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/backendServices/{backendService}", - // "response": { - // "$ref": "BackendService" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionBackendServices.getHealth": - -type RegionBackendServicesGetHealthCall struct { - s *Service - project string - region string - backendService string - resourcegroupreference *ResourceGroupReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetHealth: Gets the most recent health check results for this -// regional BackendService. -func (r *RegionBackendServicesService) GetHealth(project string, region string, backendService string, resourcegroupreference *ResourceGroupReference) *RegionBackendServicesGetHealthCall { - c := &RegionBackendServicesGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - c.resourcegroupreference = resourcegroupreference - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionBackendServicesGetHealthCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetHealthCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionBackendServicesGetHealthCall) Context(ctx context.Context) *RegionBackendServicesGetHealthCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionBackendServicesGetHealthCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesGetHealthCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourcegroupreference) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{backendService}/getHealth") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.getHealth" call. -// Exactly one of *BackendServiceGroupHealth or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *BackendServiceGroupHealth.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionBackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*BackendServiceGroupHealth, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &BackendServiceGroupHealth{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the most recent health check results for this regional BackendService.", - // "httpMethod": "POST", - // "id": "compute.regionBackendServices.getHealth", - // "parameterOrder": [ - // "project", - // "region", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to which the queried instance belongs.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/backendServices/{backendService}/getHealth", - // "request": { - // "$ref": "ResourceGroupReference" - // }, - // "response": { - // "$ref": "BackendServiceGroupHealth" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionBackendServices.insert": - -type RegionBackendServicesInsertCall struct { - s *Service - project string - region string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a regional BackendService resource in the specified -// project using the data included in the request. There are several -// restrictions and guidelines to keep in mind when creating a regional -// backend service. Read Restrictions and Guidelines for more -// information. -func (r *RegionBackendServicesService) Insert(project string, region string, backendservice *BackendService) *RegionBackendServicesInsertCall { - c := &RegionBackendServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendservice = backendservice - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionBackendServicesInsertCall) Fields(s ...googleapi.Field) *RegionBackendServicesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionBackendServicesInsertCall) Context(ctx context.Context) *RegionBackendServicesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionBackendServicesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionBackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a regional BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a regional backend service. Read Restrictions and Guidelines for more information.", - // "httpMethod": "POST", - // "id": "compute.regionBackendServices.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/backendServices", - // "request": { - // "$ref": "BackendService" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionBackendServices.list": - -type RegionBackendServicesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of regional BackendService resources -// available to the specified project in the given region. -func (r *RegionBackendServicesService) List(project string, region string) *RegionBackendServicesListCall { - c := &RegionBackendServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RegionBackendServicesListCall) Filter(filter string) *RegionBackendServicesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RegionBackendServicesListCall) MaxResults(maxResults int64) *RegionBackendServicesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RegionBackendServicesListCall) OrderBy(orderBy string) *RegionBackendServicesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RegionBackendServicesListCall) PageToken(pageToken string) *RegionBackendServicesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionBackendServicesListCall) Fields(s ...googleapi.Field) *RegionBackendServicesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionBackendServicesListCall) IfNoneMatch(entityTag string) *RegionBackendServicesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionBackendServicesListCall) Context(ctx context.Context) *RegionBackendServicesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionBackendServicesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.list" call. -// Exactly one of *BackendServiceList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *BackendServiceList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionBackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServiceList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &BackendServiceList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of regional BackendService resources available to the specified project in the given region.", - // "httpMethod": "GET", - // "id": "compute.regionBackendServices.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/backendServices", - // "response": { - // "$ref": "BackendServiceList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionBackendServicesListCall) Pages(ctx context.Context, f func(*BackendServiceList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.regionBackendServices.patch": - -type RegionBackendServicesPatchCall struct { - s *Service - project string - region string - backendService string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified regional BackendService resource with -// the data included in the request. There are several restrictions and -// guidelines to keep in mind when updating a backend service. Read -// Restrictions and Guidelines for more information. This method -// supports PATCH semantics and uses the JSON merge patch format and -// processing rules. -func (r *RegionBackendServicesService) Patch(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesPatchCall { - c := &RegionBackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - c.backendservice = backendservice - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionBackendServicesPatchCall) Fields(s ...googleapi.Field) *RegionBackendServicesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionBackendServicesPatchCall) Context(ctx context.Context) *RegionBackendServicesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionBackendServicesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionBackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.regionBackendServices.patch", - // "parameterOrder": [ - // "project", - // "region", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/backendServices/{backendService}", - // "request": { - // "$ref": "BackendService" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionBackendServices.update": - -type RegionBackendServicesUpdateCall struct { - s *Service - project string - region string - backendService string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified regional BackendService resource with -// the data included in the request. There are several restrictions and -// guidelines to keep in mind when updating a backend service. Read -// Restrictions and Guidelines for more information. -func (r *RegionBackendServicesService) Update(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesUpdateCall { - c := &RegionBackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - c.backendservice = backendservice - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionBackendServicesUpdateCall) Fields(s ...googleapi.Field) *RegionBackendServicesUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionBackendServicesUpdateCall) Context(ctx context.Context) *RegionBackendServicesUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionBackendServicesUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionBackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information.", - // "httpMethod": "PUT", - // "id": "compute.regionBackendServices.update", - // "parameterOrder": [ - // "project", - // "region", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/backendServices/{backendService}", - // "request": { - // "$ref": "BackendService" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionCommitments.aggregatedList": - -type RegionCommitmentsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of commitments. -func (r *RegionCommitmentsService) AggregatedList(project string) *RegionCommitmentsAggregatedListCall { - c := &RegionCommitmentsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RegionCommitmentsAggregatedListCall) Filter(filter string) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RegionCommitmentsAggregatedListCall) MaxResults(maxResults int64) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RegionCommitmentsAggregatedListCall) OrderBy(orderBy string) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RegionCommitmentsAggregatedListCall) PageToken(pageToken string) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionCommitmentsAggregatedListCall) Fields(s ...googleapi.Field) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionCommitmentsAggregatedListCall) IfNoneMatch(entityTag string) *RegionCommitmentsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionCommitmentsAggregatedListCall) Context(ctx context.Context) *RegionCommitmentsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionCommitmentsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCommitmentsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/commitments") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCommitments.aggregatedList" call. -// Exactly one of *CommitmentAggregatedList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *CommitmentAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionCommitmentsAggregatedListCall) Do(opts ...googleapi.CallOption) (*CommitmentAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &CommitmentAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of commitments.", - // "httpMethod": "GET", - // "id": "compute.regionCommitments.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/commitments", - // "response": { - // "$ref": "CommitmentAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionCommitmentsAggregatedListCall) Pages(ctx context.Context, f func(*CommitmentAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.regionCommitments.get": - -type RegionCommitmentsGetCall struct { - s *Service - project string - region string - commitment string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified commitment resource. Get a list of -// available commitments by making a list() request. -func (r *RegionCommitmentsService) Get(project string, region string, commitment string) *RegionCommitmentsGetCall { - c := &RegionCommitmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.commitment = commitment - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionCommitmentsGetCall) Fields(s ...googleapi.Field) *RegionCommitmentsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionCommitmentsGetCall) IfNoneMatch(entityTag string) *RegionCommitmentsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionCommitmentsGetCall) Context(ctx context.Context) *RegionCommitmentsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionCommitmentsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCommitmentsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/commitments/{commitment}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "commitment": c.commitment, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCommitments.get" call. -// Exactly one of *Commitment or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Commitment.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionCommitmentsGetCall) Do(opts ...googleapi.CallOption) (*Commitment, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Commitment{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified commitment resource. Get a list of available commitments by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.regionCommitments.get", - // "parameterOrder": [ - // "project", - // "region", - // "commitment" - // ], - // "parameters": { - // "commitment": { - // "description": "Name of the commitment to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/commitments/{commitment}", - // "response": { - // "$ref": "Commitment" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionCommitments.insert": - -type RegionCommitmentsInsertCall struct { - s *Service - project string - region string - commitment *Commitment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a commitment in the specified project using the data -// included in the request. -func (r *RegionCommitmentsService) Insert(project string, region string, commitment *Commitment) *RegionCommitmentsInsertCall { - c := &RegionCommitmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.commitment = commitment - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionCommitmentsInsertCall) Fields(s ...googleapi.Field) *RegionCommitmentsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionCommitmentsInsertCall) Context(ctx context.Context) *RegionCommitmentsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionCommitmentsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCommitmentsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.commitment) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/commitments") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCommitments.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionCommitmentsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a commitment in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.regionCommitments.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/commitments", - // "request": { - // "$ref": "Commitment" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionCommitments.list": - -type RegionCommitmentsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of commitments contained within the specified -// region. -func (r *RegionCommitmentsService) List(project string, region string) *RegionCommitmentsListCall { - c := &RegionCommitmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RegionCommitmentsListCall) Filter(filter string) *RegionCommitmentsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RegionCommitmentsListCall) MaxResults(maxResults int64) *RegionCommitmentsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RegionCommitmentsListCall) OrderBy(orderBy string) *RegionCommitmentsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RegionCommitmentsListCall) PageToken(pageToken string) *RegionCommitmentsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionCommitmentsListCall) Fields(s ...googleapi.Field) *RegionCommitmentsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionCommitmentsListCall) IfNoneMatch(entityTag string) *RegionCommitmentsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionCommitmentsListCall) Context(ctx context.Context) *RegionCommitmentsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionCommitmentsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCommitmentsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/commitments") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCommitments.list" call. -// Exactly one of *CommitmentList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *CommitmentList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionCommitmentsListCall) Do(opts ...googleapi.CallOption) (*CommitmentList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &CommitmentList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of commitments contained within the specified region.", - // "httpMethod": "GET", - // "id": "compute.regionCommitments.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/commitments", - // "response": { - // "$ref": "CommitmentList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionCommitmentsListCall) Pages(ctx context.Context, f func(*CommitmentList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.regionInstanceGroupManagers.abandonInstances": - -type RegionInstanceGroupManagersAbandonInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersabandoninstancesrequest *RegionInstanceGroupManagersAbandonInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AbandonInstances: Schedules a group action to remove the specified -// instances from the managed instance group. Abandoning an instance -// does not delete the instance, but it does remove the instance from -// any target pools that are applied by the managed instance group. This -// method reduces the targetSize of the managed instance group by the -// number of instances that you abandon. This operation is marked as -// DONE when the action is scheduled even if the instances have not yet -// been removed from the group. You must separately verify the status of -// the abandoning action with the listmanagedinstances method. -// -// If the group is part of a backend service that has enabled connection -// draining, it can take up to 60 seconds after the connection draining -// duration has elapsed before the VM instance is removed or -// deleted. -// -// You can specify a maximum of 1000 instances with this method per -// request. -func (r *RegionInstanceGroupManagersService) AbandonInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersabandoninstancesrequest *RegionInstanceGroupManagersAbandonInstancesRequest) *RegionInstanceGroupManagersAbandonInstancesCall { - c := &RegionInstanceGroupManagersAbandonInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersabandoninstancesrequest = regioninstancegroupmanagersabandoninstancesrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersAbandonInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersAbandonInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersAbandonInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersAbandonInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersAbandonInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagersabandoninstancesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/abandonInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.abandonInstances" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersAbandonInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.abandonInstances", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "Name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", - // "request": { - // "$ref": "RegionInstanceGroupManagersAbandonInstancesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.delete": - -type RegionInstanceGroupManagersDeleteCall struct { - s *Service - project string - region string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified managed instance group and all of the -// instances in that group. -func (r *RegionInstanceGroupManagersService) Delete(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersDeleteCall { - c := &RegionInstanceGroupManagersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersDeleteCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersDeleteCall) Context(ctx context.Context) *RegionInstanceGroupManagersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified managed instance group and all of the instances in that group.", - // "httpMethod": "DELETE", - // "id": "compute.regionInstanceGroupManagers.delete", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "Name of the managed instance group to delete.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.deleteInstances": - -type RegionInstanceGroupManagersDeleteInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersdeleteinstancesrequest *RegionInstanceGroupManagersDeleteInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteInstances: Schedules a group action to delete the specified -// instances in the managed instance group. The instances are also -// removed from any target pools of which they were a member. This -// method reduces the targetSize of the managed instance group by the -// number of instances that you delete. This operation is marked as DONE -// when the action is scheduled even if the instances are still being -// deleted. You must separately verify the status of the deleting action -// with the listmanagedinstances method. -// -// If the group is part of a backend service that has enabled connection -// draining, it can take up to 60 seconds after the connection draining -// duration has elapsed before the VM instance is removed or -// deleted. -// -// You can specify a maximum of 1000 instances with this method per -// request. -func (r *RegionInstanceGroupManagersService) DeleteInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersdeleteinstancesrequest *RegionInstanceGroupManagersDeleteInstancesRequest) *RegionInstanceGroupManagersDeleteInstancesCall { - c := &RegionInstanceGroupManagersDeleteInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersdeleteinstancesrequest = regioninstancegroupmanagersdeleteinstancesrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersDeleteInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersDeleteInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersDeleteInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersDeleteInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersDeleteInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagersdeleteinstancesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deleteInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.deleteInstances" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersDeleteInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.deleteInstances", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "Name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", - // "request": { - // "$ref": "RegionInstanceGroupManagersDeleteInstancesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.get": - -type RegionInstanceGroupManagersGetCall struct { - s *Service - project string - region string - instanceGroupManager string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns all of the details about the specified managed instance -// group. -func (r *RegionInstanceGroupManagersService) Get(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersGetCall { - c := &RegionInstanceGroupManagersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersGetCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionInstanceGroupManagersGetCall) IfNoneMatch(entityTag string) *RegionInstanceGroupManagersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersGetCall) Context(ctx context.Context) *RegionInstanceGroupManagersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.get" call. -// Exactly one of *InstanceGroupManager or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstanceGroupManager.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManager, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceGroupManager{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns all of the details about the specified managed instance group.", - // "httpMethod": "GET", - // "id": "compute.regionInstanceGroupManagers.get", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "Name of the managed instance group to return.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - // "response": { - // "$ref": "InstanceGroupManager" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.insert": - -type RegionInstanceGroupManagersInsertCall struct { - s *Service - project string - region string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a managed instance group using the information that -// you specify in the request. After the group is created, it schedules -// an action to create instances in the group using the specified -// instance template. This operation is marked as DONE when the group is -// created even if the instances in the group have not yet been created. -// You must separately verify the status of the individual instances -// with the listmanagedinstances method. -// -// A regional managed instance group can contain up to 2000 instances. -func (r *RegionInstanceGroupManagersService) Insert(project string, region string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersInsertCall { - c := &RegionInstanceGroupManagersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instancegroupmanager = instancegroupmanager - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersInsertCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersInsertCall) Context(ctx context.Context) *RegionInstanceGroupManagersInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA regional managed instance group can contain up to 2000 instances.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers", - // "request": { - // "$ref": "InstanceGroupManager" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.list": - -type RegionInstanceGroupManagersListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of managed instance groups that are -// contained within the specified region. -func (r *RegionInstanceGroupManagersService) List(project string, region string) *RegionInstanceGroupManagersListCall { - c := &RegionInstanceGroupManagersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RegionInstanceGroupManagersListCall) Filter(filter string) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RegionInstanceGroupManagersListCall) MaxResults(maxResults int64) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RegionInstanceGroupManagersListCall) OrderBy(orderBy string) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RegionInstanceGroupManagersListCall) PageToken(pageToken string) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersListCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionInstanceGroupManagersListCall) IfNoneMatch(entityTag string) *RegionInstanceGroupManagersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersListCall) Context(ctx context.Context) *RegionInstanceGroupManagersListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.list" call. -// Exactly one of *RegionInstanceGroupManagerList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *RegionInstanceGroupManagerList.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersListCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupManagerList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RegionInstanceGroupManagerList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of managed instance groups that are contained within the specified region.", - // "httpMethod": "GET", - // "id": "compute.regionInstanceGroupManagers.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers", - // "response": { - // "$ref": "RegionInstanceGroupManagerList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionInstanceGroupManagersListCall) Pages(ctx context.Context, f func(*RegionInstanceGroupManagerList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.regionInstanceGroupManagers.listManagedInstances": - -type RegionInstanceGroupManagersListManagedInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListManagedInstances: Lists the instances in the managed instance -// group and instances that are scheduled to be created. The list -// includes any current actions that the group has scheduled for its -// instances. -func (r *RegionInstanceGroupManagersService) ListManagedInstances(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersListManagedInstancesCall { - c := &RegionInstanceGroupManagersListManagedInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - return c -} - -// Filter sets the optional parameter "filter": -func (c *RegionInstanceGroupManagersListManagedInstancesCall) Filter(filter string) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": -func (c *RegionInstanceGroupManagersListManagedInstancesCall) MaxResults(maxResults int64) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "order_by": -func (c *RegionInstanceGroupManagersListManagedInstancesCall) OrderBy(orderBy string) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("order_by", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": -func (c *RegionInstanceGroupManagersListManagedInstancesCall) PageToken(pageToken string) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersListManagedInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.listManagedInstances" call. -// Exactly one of *RegionInstanceGroupManagersListInstancesResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *RegionInstanceGroupManagersListInstancesResponse.ServerResponse.Heade -// r or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupManagersListInstancesResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RegionInstanceGroupManagersListInstancesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.listManagedInstances", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "filter": { - // "location": "query", - // "type": "string" - // }, - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "order_by": { - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", - // "response": { - // "$ref": "RegionInstanceGroupManagersListInstancesResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.recreateInstances": - -type RegionInstanceGroupManagersRecreateInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersrecreaterequest *RegionInstanceGroupManagersRecreateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RecreateInstances: Schedules a group action to recreate the specified -// instances in the managed instance group. The instances are deleted -// and recreated using the current instance template for the managed -// instance group. This operation is marked as DONE when the action is -// scheduled even if the instances have not yet been recreated. You must -// separately verify the status of the recreating action with the -// listmanagedinstances method. -// -// If the group is part of a backend service that has enabled connection -// draining, it can take up to 60 seconds after the connection draining -// duration has elapsed before the VM instance is removed or -// deleted. -// -// You can specify a maximum of 1000 instances with this method per -// request. -func (r *RegionInstanceGroupManagersService) RecreateInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersrecreaterequest *RegionInstanceGroupManagersRecreateRequest) *RegionInstanceGroupManagersRecreateInstancesCall { - c := &RegionInstanceGroupManagersRecreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersrecreaterequest = regioninstancegroupmanagersrecreaterequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersRecreateInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersRecreateInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersRecreateInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersRecreateInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersRecreateInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagersrecreaterequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.recreateInstances" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.recreateInstances", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "Name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", - // "request": { - // "$ref": "RegionInstanceGroupManagersRecreateRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.resize": - -type RegionInstanceGroupManagersResizeCall struct { - s *Service - project string - region string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Resize: Changes the intended size for the managed instance group. If -// you increase the size, the group schedules actions to create new -// instances using the current instance template. If you decrease the -// size, the group schedules delete actions on one or more instances. -// The resize operation is marked DONE when the resize actions are -// scheduled even if the group has not yet added or deleted any -// instances. You must separately verify the status of the creating or -// deleting actions with the listmanagedinstances method. -// -// If the group is part of a backend service that has enabled connection -// draining, it can take up to 60 seconds after the connection draining -// duration has elapsed before the VM instance is removed or deleted. -func (r *RegionInstanceGroupManagersService) Resize(project string, region string, instanceGroupManager string, size int64) *RegionInstanceGroupManagersResizeCall { - c := &RegionInstanceGroupManagersResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.urlParams_.Set("size", fmt.Sprint(size)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersResizeCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersResizeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersResizeCall) Context(ctx context.Context) *RegionInstanceGroupManagersResizeCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersResizeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resize") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.resize" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes the intended size for the managed instance group. If you increase the size, the group schedules actions to create new instances using the current instance template. If you decrease the size, the group schedules delete actions on one or more instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.resize", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager", - // "size" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "Name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "size": { - // "description": "Number of instances that should exist in this instance group manager.", - // "format": "int32", - // "location": "query", - // "minimum": "0", - // "required": true, - // "type": "integer" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resize", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.setInstanceTemplate": - -type RegionInstanceGroupManagersSetInstanceTemplateCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerssettemplaterequest *RegionInstanceGroupManagersSetTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetInstanceTemplate: Sets the instance template to use when creating -// new instances or recreating instances in this group. Existing -// instances are not affected. -func (r *RegionInstanceGroupManagersService) SetInstanceTemplate(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssettemplaterequest *RegionInstanceGroupManagersSetTemplateRequest) *RegionInstanceGroupManagersSetInstanceTemplateCall { - c := &RegionInstanceGroupManagersSetInstanceTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerssettemplaterequest = regioninstancegroupmanagerssettemplaterequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersSetInstanceTemplateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Context(ctx context.Context) *RegionInstanceGroupManagersSetInstanceTemplateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerssettemplaterequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.setInstanceTemplate" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.setInstanceTemplate", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", - // "request": { - // "$ref": "RegionInstanceGroupManagersSetTemplateRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.setTargetPools": - -type RegionInstanceGroupManagersSetTargetPoolsCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerssettargetpoolsrequest *RegionInstanceGroupManagersSetTargetPoolsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetTargetPools: Modifies the target pools to which all new instances -// in this group are assigned. Existing instances in the group are not -// affected. -func (r *RegionInstanceGroupManagersService) SetTargetPools(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssettargetpoolsrequest *RegionInstanceGroupManagersSetTargetPoolsRequest) *RegionInstanceGroupManagersSetTargetPoolsCall { - c := &RegionInstanceGroupManagersSetTargetPoolsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerssettargetpoolsrequest = regioninstancegroupmanagerssettargetpoolsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersSetTargetPoolsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Context(ctx context.Context) *RegionInstanceGroupManagersSetTargetPoolsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerssettargetpoolsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.setTargetPools" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.setTargetPools", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "Name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", - // "request": { - // "$ref": "RegionInstanceGroupManagersSetTargetPoolsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroups.get": - -type RegionInstanceGroupsGetCall struct { - s *Service - project string - region string - instanceGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified instance group resource. -func (r *RegionInstanceGroupsService) Get(project string, region string, instanceGroup string) *RegionInstanceGroupsGetCall { - c := &RegionInstanceGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroup = instanceGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupsGetCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionInstanceGroupsGetCall) IfNoneMatch(entityTag string) *RegionInstanceGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupsGetCall) Context(ctx context.Context) *RegionInstanceGroupsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroups/{instanceGroup}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroup": c.instanceGroup, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroups.get" call. -// Exactly one of *InstanceGroup or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *InstanceGroup.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionInstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroup, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &InstanceGroup{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified instance group resource.", - // "httpMethod": "GET", - // "id": "compute.regionInstanceGroups.get", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroup" - // ], - // "parameters": { - // "instanceGroup": { - // "description": "Name of the instance group resource to return.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroups/{instanceGroup}", - // "response": { - // "$ref": "InstanceGroup" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionInstanceGroups.list": - -type RegionInstanceGroupsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of instance group resources contained within -// the specified region. -func (r *RegionInstanceGroupsService) List(project string, region string) *RegionInstanceGroupsListCall { - c := &RegionInstanceGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RegionInstanceGroupsListCall) Filter(filter string) *RegionInstanceGroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RegionInstanceGroupsListCall) MaxResults(maxResults int64) *RegionInstanceGroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RegionInstanceGroupsListCall) OrderBy(orderBy string) *RegionInstanceGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RegionInstanceGroupsListCall) PageToken(pageToken string) *RegionInstanceGroupsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupsListCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionInstanceGroupsListCall) IfNoneMatch(entityTag string) *RegionInstanceGroupsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupsListCall) Context(ctx context.Context) *RegionInstanceGroupsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroups") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroups.list" call. -// Exactly one of *RegionInstanceGroupList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *RegionInstanceGroupList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionInstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RegionInstanceGroupList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of instance group resources contained within the specified region.", - // "httpMethod": "GET", - // "id": "compute.regionInstanceGroups.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroups", - // "response": { - // "$ref": "RegionInstanceGroupList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionInstanceGroupsListCall) Pages(ctx context.Context, f func(*RegionInstanceGroupList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.regionInstanceGroups.listInstances": - -type RegionInstanceGroupsListInstancesCall struct { - s *Service - project string - region string - instanceGroup string - regioninstancegroupslistinstancesrequest *RegionInstanceGroupsListInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListInstances: Lists the instances in the specified instance group -// and displays information about the named ports. Depending on the -// specified options, this method can list all instances or only the -// instances that are running. -func (r *RegionInstanceGroupsService) ListInstances(project string, region string, instanceGroup string, regioninstancegroupslistinstancesrequest *RegionInstanceGroupsListInstancesRequest) *RegionInstanceGroupsListInstancesCall { - c := &RegionInstanceGroupsListInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroup = instanceGroup - c.regioninstancegroupslistinstancesrequest = regioninstancegroupslistinstancesrequest - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RegionInstanceGroupsListInstancesCall) Filter(filter string) *RegionInstanceGroupsListInstancesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RegionInstanceGroupsListInstancesCall) MaxResults(maxResults int64) *RegionInstanceGroupsListInstancesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RegionInstanceGroupsListInstancesCall) OrderBy(orderBy string) *RegionInstanceGroupsListInstancesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RegionInstanceGroupsListInstancesCall) PageToken(pageToken string) *RegionInstanceGroupsListInstancesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupsListInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsListInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupsListInstancesCall) Context(ctx context.Context) *RegionInstanceGroupsListInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupsListInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupslistinstancesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroups/{instanceGroup}/listInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroup": c.instanceGroup, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroups.listInstances" call. -// Exactly one of *RegionInstanceGroupsListInstances or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *RegionInstanceGroupsListInstances.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *RegionInstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupsListInstances, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RegionInstanceGroupsListInstances{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroups.listInstances", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroup" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "instanceGroup": { - // "description": "Name of the regional instance group for which we want to list the instances.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroups/{instanceGroup}/listInstances", - // "request": { - // "$ref": "RegionInstanceGroupsListInstancesRequest" - // }, - // "response": { - // "$ref": "RegionInstanceGroupsListInstances" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionInstanceGroupsListInstancesCall) Pages(ctx context.Context, f func(*RegionInstanceGroupsListInstances) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.regionInstanceGroups.setNamedPorts": - -type RegionInstanceGroupsSetNamedPortsCall struct { - s *Service - project string - region string - instanceGroup string - regioninstancegroupssetnamedportsrequest *RegionInstanceGroupsSetNamedPortsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetNamedPorts: Sets the named ports for the specified regional -// instance group. -func (r *RegionInstanceGroupsService) SetNamedPorts(project string, region string, instanceGroup string, regioninstancegroupssetnamedportsrequest *RegionInstanceGroupsSetNamedPortsRequest) *RegionInstanceGroupsSetNamedPortsCall { - c := &RegionInstanceGroupsSetNamedPortsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroup = instanceGroup - c.regioninstancegroupssetnamedportsrequest = regioninstancegroupssetnamedportsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupsSetNamedPortsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsSetNamedPortsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionInstanceGroupsSetNamedPortsCall) Context(ctx context.Context) *RegionInstanceGroupsSetNamedPortsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupsSetNamedPortsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupssetnamedportsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroups/{instanceGroup}/setNamedPorts") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroup": c.instanceGroup, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroups.setNamedPorts" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the named ports for the specified regional instance group.", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroups.setNamedPorts", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroup" - // ], - // "parameters": { - // "instanceGroup": { - // "description": "The name of the regional instance group where the named ports are updated.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/instanceGroups/{instanceGroup}/setNamedPorts", - // "request": { - // "$ref": "RegionInstanceGroupsSetNamedPortsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionOperations.delete": - -type RegionOperationsDeleteCall struct { - s *Service - project string - region string - operation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified region-specific Operations resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/regionOperations/delete -func (r *RegionOperationsService) Delete(project string, region string, operation string) *RegionOperationsDeleteCall { - c := &RegionOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.operation = operation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionOperationsDeleteCall) Fields(s ...googleapi.Field) *RegionOperationsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionOperationsDeleteCall) Context(ctx context.Context) *RegionOperationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionOperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "operation": c.operation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionOperations.delete" call. -func (c *RegionOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return err - } - return nil - // { - // "description": "Deletes the specified region-specific Operations resource.", - // "httpMethod": "DELETE", - // "id": "compute.regionOperations.delete", - // "parameterOrder": [ - // "project", - // "region", - // "operation" - // ], - // "parameters": { - // "operation": { - // "description": "Name of the Operations resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/operations/{operation}", - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionOperations.get": - -type RegionOperationsGetCall struct { - s *Service - project string - region string - operation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves the specified region-specific Operations resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/regionOperations/get -func (r *RegionOperationsService) Get(project string, region string, operation string) *RegionOperationsGetCall { - c := &RegionOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.operation = operation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionOperationsGetCall) Fields(s ...googleapi.Field) *RegionOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionOperationsGetCall) IfNoneMatch(entityTag string) *RegionOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionOperationsGetCall) Context(ctx context.Context) *RegionOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "operation": c.operation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionOperations.get" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the specified region-specific Operations resource.", - // "httpMethod": "GET", - // "id": "compute.regionOperations.get", - // "parameterOrder": [ - // "project", - // "region", - // "operation" - // ], - // "parameters": { - // "operation": { - // "description": "Name of the Operations resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/operations/{operation}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regionOperations.list": - -type RegionOperationsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of Operation resources contained within the -// specified region. -// For details, see https://cloud.google.com/compute/docs/reference/latest/regionOperations/list -func (r *RegionOperationsService) List(project string, region string) *RegionOperationsListCall { - c := &RegionOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RegionOperationsListCall) Filter(filter string) *RegionOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RegionOperationsListCall) MaxResults(maxResults int64) *RegionOperationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RegionOperationsListCall) OrderBy(orderBy string) *RegionOperationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RegionOperationsListCall) PageToken(pageToken string) *RegionOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionOperationsListCall) Fields(s ...googleapi.Field) *RegionOperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionOperationsListCall) IfNoneMatch(entityTag string) *RegionOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionOperationsListCall) Context(ctx context.Context) *RegionOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/operations") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionOperations.list" call. -// Exactly one of *OperationList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *OperationList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &OperationList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of Operation resources contained within the specified region.", - // "httpMethod": "GET", - // "id": "compute.regionOperations.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/operations", - // "response": { - // "$ref": "OperationList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.regions.get": - -type RegionsGetCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Region resource. Get a list of available -// regions by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/regions/get -func (r *RegionsService) Get(project string, region string) *RegionsGetCall { - c := &RegionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionsGetCall) Fields(s ...googleapi.Field) *RegionsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionsGetCall) IfNoneMatch(entityTag string) *RegionsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionsGetCall) Context(ctx context.Context) *RegionsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regions.get" call. -// Exactly one of *Region or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Region.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *RegionsGetCall) Do(opts ...googleapi.CallOption) (*Region, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Region{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified Region resource. Get a list of available regions by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.regions.get", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}", - // "response": { - // "$ref": "Region" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.regions.list": - -type RegionsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of region resources available to the -// specified project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/regions/list -func (r *RegionsService) List(project string) *RegionsListCall { - c := &RegionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RegionsListCall) Filter(filter string) *RegionsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RegionsListCall) MaxResults(maxResults int64) *RegionsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RegionsListCall) OrderBy(orderBy string) *RegionsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RegionsListCall) PageToken(pageToken string) *RegionsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionsListCall) Fields(s ...googleapi.Field) *RegionsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionsListCall) IfNoneMatch(entityTag string) *RegionsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RegionsListCall) Context(ctx context.Context) *RegionsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regions.list" call. -// Exactly one of *RegionList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *RegionList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionsListCall) Do(opts ...googleapi.CallOption) (*RegionList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RegionList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of region resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.regions.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions", - // "response": { - // "$ref": "RegionList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionsListCall) Pages(ctx context.Context, f func(*RegionList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.routers.aggregatedList": - -type RoutersAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of routers. -func (r *RoutersService) AggregatedList(project string) *RoutersAggregatedListCall { - c := &RoutersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RoutersAggregatedListCall) Filter(filter string) *RoutersAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RoutersAggregatedListCall) MaxResults(maxResults int64) *RoutersAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RoutersAggregatedListCall) OrderBy(orderBy string) *RoutersAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RoutersAggregatedListCall) PageToken(pageToken string) *RoutersAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutersAggregatedListCall) Fields(s ...googleapi.Field) *RoutersAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RoutersAggregatedListCall) IfNoneMatch(entityTag string) *RoutersAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutersAggregatedListCall) Context(ctx context.Context) *RoutersAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutersAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/routers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.aggregatedList" call. -// Exactly one of *RouterAggregatedList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *RouterAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RoutersAggregatedListCall) Do(opts ...googleapi.CallOption) (*RouterAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RouterAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of routers.", - // "httpMethod": "GET", - // "id": "compute.routers.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/routers", - // "response": { - // "$ref": "RouterAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RoutersAggregatedListCall) Pages(ctx context.Context, f func(*RouterAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.routers.delete": - -type RoutersDeleteCall struct { - s *Service - project string - region string - router string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Router resource. -func (r *RoutersService) Delete(project string, region string, router string) *RoutersDeleteCall { - c := &RoutersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutersDeleteCall) Fields(s ...googleapi.Field) *RoutersDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutersDeleteCall) Context(ctx context.Context) *RoutersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RoutersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified Router resource.", - // "httpMethod": "DELETE", - // "id": "compute.routers.delete", - // "parameterOrder": [ - // "project", - // "region", - // "router" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "router": { - // "description": "Name of the Router resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/routers/{router}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.routers.get": - -type RoutersGetCall struct { - s *Service - project string - region string - router string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Router resource. Get a list of available -// routers by making a list() request. -func (r *RoutersService) Get(project string, region string, router string) *RoutersGetCall { - c := &RoutersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutersGetCall) Fields(s ...googleapi.Field) *RoutersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RoutersGetCall) IfNoneMatch(entityTag string) *RoutersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutersGetCall) Context(ctx context.Context) *RoutersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.get" call. -// Exactly one of *Router or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Router.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *RoutersGetCall) Do(opts ...googleapi.CallOption) (*Router, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Router{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified Router resource. Get a list of available routers by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.routers.get", - // "parameterOrder": [ - // "project", - // "region", - // "router" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "router": { - // "description": "Name of the Router resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/routers/{router}", - // "response": { - // "$ref": "Router" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.routers.getRouterStatus": - -type RoutersGetRouterStatusCall struct { - s *Service - project string - region string - router string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetRouterStatus: Retrieves runtime information of the specified -// router. -func (r *RoutersService) GetRouterStatus(project string, region string, router string) *RoutersGetRouterStatusCall { - c := &RoutersGetRouterStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutersGetRouterStatusCall) Fields(s ...googleapi.Field) *RoutersGetRouterStatusCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RoutersGetRouterStatusCall) IfNoneMatch(entityTag string) *RoutersGetRouterStatusCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutersGetRouterStatusCall) Context(ctx context.Context) *RoutersGetRouterStatusCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutersGetRouterStatusCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersGetRouterStatusCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}/getRouterStatus") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.getRouterStatus" call. -// Exactly one of *RouterStatusResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *RouterStatusResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RoutersGetRouterStatusCall) Do(opts ...googleapi.CallOption) (*RouterStatusResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RouterStatusResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves runtime information of the specified router.", - // "httpMethod": "GET", - // "id": "compute.routers.getRouterStatus", - // "parameterOrder": [ - // "project", - // "region", - // "router" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "router": { - // "description": "Name of the Router resource to query.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/routers/{router}/getRouterStatus", - // "response": { - // "$ref": "RouterStatusResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.routers.insert": - -type RoutersInsertCall struct { - s *Service - project string - region string - router *Router - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a Router resource in the specified project and region -// using the data included in the request. -func (r *RoutersService) Insert(project string, region string, router *Router) *RoutersInsertCall { - c := &RoutersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutersInsertCall) Fields(s ...googleapi.Field) *RoutersInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutersInsertCall) Context(ctx context.Context) *RoutersInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.router) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RoutersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a Router resource in the specified project and region using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.routers.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/routers", - // "request": { - // "$ref": "Router" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.routers.list": - -type RoutersListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of Router resources available to the specified -// project. -func (r *RoutersService) List(project string, region string) *RoutersListCall { - c := &RoutersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RoutersListCall) Filter(filter string) *RoutersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RoutersListCall) MaxResults(maxResults int64) *RoutersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RoutersListCall) OrderBy(orderBy string) *RoutersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RoutersListCall) PageToken(pageToken string) *RoutersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutersListCall) Fields(s ...googleapi.Field) *RoutersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RoutersListCall) IfNoneMatch(entityTag string) *RoutersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutersListCall) Context(ctx context.Context) *RoutersListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.list" call. -// Exactly one of *RouterList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *RouterList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RoutersListCall) Do(opts ...googleapi.CallOption) (*RouterList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RouterList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of Router resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.routers.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/routers", - // "response": { - // "$ref": "RouterList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RoutersListCall) Pages(ctx context.Context, f func(*RouterList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.routers.patch": - -type RoutersPatchCall struct { - s *Service - project string - region string - router string - router2 *Router - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified Router resource with the data included -// in the request. This method supports PATCH semantics and uses JSON -// merge patch format and processing rules. -func (r *RoutersService) Patch(project string, region string, router string, router2 *Router) *RoutersPatchCall { - c := &RoutersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - c.router2 = router2 - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutersPatchCall) Fields(s ...googleapi.Field) *RoutersPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutersPatchCall) Context(ctx context.Context) *RoutersPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutersPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.router2) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RoutersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.routers.patch", - // "parameterOrder": [ - // "project", - // "region", - // "router" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "router": { - // "description": "Name of the Router resource to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/routers/{router}", - // "request": { - // "$ref": "Router" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.routers.preview": - -type RoutersPreviewCall struct { - s *Service - project string - region string - router string - router2 *Router - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Preview: Preview fields auto-generated during router create and -// update operations. Calling this method does NOT create or update the -// router. -func (r *RoutersService) Preview(project string, region string, router string, router2 *Router) *RoutersPreviewCall { - c := &RoutersPreviewCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - c.router2 = router2 - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutersPreviewCall) Fields(s ...googleapi.Field) *RoutersPreviewCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutersPreviewCall) Context(ctx context.Context) *RoutersPreviewCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutersPreviewCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersPreviewCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.router2) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}/preview") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.preview" call. -// Exactly one of *RoutersPreviewResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *RoutersPreviewResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RoutersPreviewCall) Do(opts ...googleapi.CallOption) (*RoutersPreviewResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RoutersPreviewResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.", - // "httpMethod": "POST", - // "id": "compute.routers.preview", - // "parameterOrder": [ - // "project", - // "region", - // "router" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "router": { - // "description": "Name of the Router resource to query.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/routers/{router}/preview", - // "request": { - // "$ref": "Router" - // }, - // "response": { - // "$ref": "RoutersPreviewResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.routers.update": - -type RoutersUpdateCall struct { - s *Service - project string - region string - router string - router2 *Router - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified Router resource with the data included -// in the request. -func (r *RoutersService) Update(project string, region string, router string, router2 *Router) *RoutersUpdateCall { - c := &RoutersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - c.router2 = router2 - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutersUpdateCall) Fields(s ...googleapi.Field) *RoutersUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutersUpdateCall) Context(ctx context.Context) *RoutersUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutersUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.router2) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RoutersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the specified Router resource with the data included in the request.", - // "httpMethod": "PUT", - // "id": "compute.routers.update", - // "parameterOrder": [ - // "project", - // "region", - // "router" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "router": { - // "description": "Name of the Router resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/routers/{router}", - // "request": { - // "$ref": "Router" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.routes.delete": - -type RoutesDeleteCall struct { - s *Service - project string - route string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Route resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/routes/delete -func (r *RoutesService) Delete(project string, route string) *RoutesDeleteCall { - c := &RoutesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.route = route - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutesDeleteCall) Fields(s ...googleapi.Field) *RoutesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutesDeleteCall) Context(ctx context.Context) *RoutesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes/{route}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "route": c.route, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routes.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RoutesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified Route resource.", - // "httpMethod": "DELETE", - // "id": "compute.routes.delete", - // "parameterOrder": [ - // "project", - // "route" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "route": { - // "description": "Name of the Route resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/routes/{route}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.routes.get": - -type RoutesGetCall struct { - s *Service - project string - route string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Route resource. Get a list of available -// routes by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/routes/get -func (r *RoutesService) Get(project string, route string) *RoutesGetCall { - c := &RoutesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.route = route - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutesGetCall) Fields(s ...googleapi.Field) *RoutesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RoutesGetCall) IfNoneMatch(entityTag string) *RoutesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutesGetCall) Context(ctx context.Context) *RoutesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes/{route}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "route": c.route, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routes.get" call. -// Exactly one of *Route or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Route.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *RoutesGetCall) Do(opts ...googleapi.CallOption) (*Route, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Route{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified Route resource. Get a list of available routes by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.routes.get", - // "parameterOrder": [ - // "project", - // "route" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "route": { - // "description": "Name of the Route resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/routes/{route}", - // "response": { - // "$ref": "Route" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.routes.insert": - -type RoutesInsertCall struct { - s *Service - project string - route *Route - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a Route resource in the specified project using the -// data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/routes/insert -func (r *RoutesService) Insert(project string, route *Route) *RoutesInsertCall { - c := &RoutesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.route = route - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutesInsertCall) Fields(s ...googleapi.Field) *RoutesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutesInsertCall) Context(ctx context.Context) *RoutesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.route) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routes.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RoutesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a Route resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.routes.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/routes", - // "request": { - // "$ref": "Route" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.routes.list": - -type RoutesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of Route resources available to the -// specified project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/routes/list -func (r *RoutesService) List(project string) *RoutesListCall { - c := &RoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *RoutesListCall) Filter(filter string) *RoutesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *RoutesListCall) MaxResults(maxResults int64) *RoutesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *RoutesListCall) OrderBy(orderBy string) *RoutesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *RoutesListCall) PageToken(pageToken string) *RoutesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RoutesListCall) Fields(s ...googleapi.Field) *RoutesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RoutesListCall) IfNoneMatch(entityTag string) *RoutesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *RoutesListCall) Context(ctx context.Context) *RoutesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RoutesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routes.list" call. -// Exactly one of *RouteList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *RouteList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RoutesListCall) Do(opts ...googleapi.CallOption) (*RouteList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &RouteList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of Route resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.routes.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/routes", - // "response": { - // "$ref": "RouteList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RoutesListCall) Pages(ctx context.Context, f func(*RouteList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.snapshots.delete": - -type SnapshotsDeleteCall struct { - s *Service - project string - snapshot string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Snapshot resource. Keep in mind that -// deleting a single snapshot might not necessarily delete all the data -// on that snapshot. If any data on the snapshot that is marked for -// deletion is needed for subsequent snapshots, the data will be moved -// to the next corresponding snapshot. -// -// For more information, see Deleting snaphots. -// For details, see https://cloud.google.com/compute/docs/reference/latest/snapshots/delete -func (r *SnapshotsService) Delete(project string, snapshot string) *SnapshotsDeleteCall { - c := &SnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.snapshot = snapshot - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SnapshotsDeleteCall) Fields(s ...googleapi.Field) *SnapshotsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SnapshotsDeleteCall) Context(ctx context.Context) *SnapshotsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SnapshotsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{snapshot}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "snapshot": c.snapshot, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SnapshotsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.\n\nFor more information, see Deleting snaphots.", - // "httpMethod": "DELETE", - // "id": "compute.snapshots.delete", - // "parameterOrder": [ - // "project", - // "snapshot" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "snapshot": { - // "description": "Name of the Snapshot resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/snapshots/{snapshot}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.snapshots.get": - -type SnapshotsGetCall struct { - s *Service - project string - snapshot string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Snapshot resource. Get a list of available -// snapshots by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/snapshots/get -func (r *SnapshotsService) Get(project string, snapshot string) *SnapshotsGetCall { - c := &SnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.snapshot = snapshot - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SnapshotsGetCall) Fields(s ...googleapi.Field) *SnapshotsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *SnapshotsGetCall) IfNoneMatch(entityTag string) *SnapshotsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SnapshotsGetCall) Context(ctx context.Context) *SnapshotsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SnapshotsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{snapshot}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "snapshot": c.snapshot, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.get" call. -// Exactly one of *Snapshot or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Snapshot.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SnapshotsGetCall) Do(opts ...googleapi.CallOption) (*Snapshot, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Snapshot{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified Snapshot resource. Get a list of available snapshots by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.snapshots.get", - // "parameterOrder": [ - // "project", - // "snapshot" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "snapshot": { - // "description": "Name of the Snapshot resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/snapshots/{snapshot}", - // "response": { - // "$ref": "Snapshot" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.snapshots.list": - -type SnapshotsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of Snapshot resources contained within the -// specified project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/snapshots/list -func (r *SnapshotsService) List(project string) *SnapshotsListCall { - c := &SnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *SnapshotsListCall) Filter(filter string) *SnapshotsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *SnapshotsListCall) MaxResults(maxResults int64) *SnapshotsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *SnapshotsListCall) OrderBy(orderBy string) *SnapshotsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *SnapshotsListCall) PageToken(pageToken string) *SnapshotsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SnapshotsListCall) Fields(s ...googleapi.Field) *SnapshotsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *SnapshotsListCall) IfNoneMatch(entityTag string) *SnapshotsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SnapshotsListCall) Context(ctx context.Context) *SnapshotsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SnapshotsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.list" call. -// Exactly one of *SnapshotList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *SnapshotList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SnapshotsListCall) Do(opts ...googleapi.CallOption) (*SnapshotList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &SnapshotList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of Snapshot resources contained within the specified project.", - // "httpMethod": "GET", - // "id": "compute.snapshots.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/snapshots", - // "response": { - // "$ref": "SnapshotList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *SnapshotsListCall) Pages(ctx context.Context, f func(*SnapshotList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.snapshots.setLabels": - -type SnapshotsSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a snapshot. To learn more about labels, -// read the Labeling Resources documentation. -func (r *SnapshotsService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *SnapshotsSetLabelsCall { - c := &SnapshotsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SnapshotsSetLabelsCall) Fields(s ...googleapi.Field) *SnapshotsSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SnapshotsSetLabelsCall) Context(ctx context.Context) *SnapshotsSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SnapshotsSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetlabelsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{resource}/setLabels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.setLabels" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SnapshotsSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation.", - // "httpMethod": "POST", - // "id": "compute.snapshots.setLabels", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/snapshots/{resource}/setLabels", - // "request": { - // "$ref": "GlobalSetLabelsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.sslCertificates.delete": - -type SslCertificatesDeleteCall struct { - s *Service - project string - sslCertificate string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified SslCertificate resource. -func (r *SslCertificatesService) Delete(project string, sslCertificate string) *SslCertificatesDeleteCall { - c := &SslCertificatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.sslCertificate = sslCertificate - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SslCertificatesDeleteCall) Fields(s ...googleapi.Field) *SslCertificatesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SslCertificatesDeleteCall) Context(ctx context.Context) *SslCertificatesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SslCertificatesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertificatesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslCertificates/{sslCertificate}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "sslCertificate": c.sslCertificate, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslCertificates.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SslCertificatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified SslCertificate resource.", - // "httpMethod": "DELETE", - // "id": "compute.sslCertificates.delete", - // "parameterOrder": [ - // "project", - // "sslCertificate" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "sslCertificate": { - // "description": "Name of the SslCertificate resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/sslCertificates/{sslCertificate}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.sslCertificates.get": - -type SslCertificatesGetCall struct { - s *Service - project string - sslCertificate string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified SslCertificate resource. Get a list of -// available SSL certificates by making a list() request. -func (r *SslCertificatesService) Get(project string, sslCertificate string) *SslCertificatesGetCall { - c := &SslCertificatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.sslCertificate = sslCertificate - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SslCertificatesGetCall) Fields(s ...googleapi.Field) *SslCertificatesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *SslCertificatesGetCall) IfNoneMatch(entityTag string) *SslCertificatesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SslCertificatesGetCall) Context(ctx context.Context) *SslCertificatesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SslCertificatesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertificatesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslCertificates/{sslCertificate}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "sslCertificate": c.sslCertificate, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslCertificates.get" call. -// Exactly one of *SslCertificate or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *SslCertificate.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *SslCertificatesGetCall) Do(opts ...googleapi.CallOption) (*SslCertificate, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &SslCertificate{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified SslCertificate resource. Get a list of available SSL certificates by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.sslCertificates.get", - // "parameterOrder": [ - // "project", - // "sslCertificate" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "sslCertificate": { - // "description": "Name of the SslCertificate resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/sslCertificates/{sslCertificate}", - // "response": { - // "$ref": "SslCertificate" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.sslCertificates.insert": - -type SslCertificatesInsertCall struct { - s *Service - project string - sslcertificate *SslCertificate - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a SslCertificate resource in the specified project -// using the data included in the request. -func (r *SslCertificatesService) Insert(project string, sslcertificate *SslCertificate) *SslCertificatesInsertCall { - c := &SslCertificatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.sslcertificate = sslcertificate - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SslCertificatesInsertCall) Fields(s ...googleapi.Field) *SslCertificatesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SslCertificatesInsertCall) Context(ctx context.Context) *SslCertificatesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SslCertificatesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertificatesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.sslcertificate) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslCertificates") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslCertificates.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SslCertificatesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a SslCertificate resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.sslCertificates.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/sslCertificates", - // "request": { - // "$ref": "SslCertificate" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.sslCertificates.list": - -type SslCertificatesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of SslCertificate resources available to the -// specified project. -func (r *SslCertificatesService) List(project string) *SslCertificatesListCall { - c := &SslCertificatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *SslCertificatesListCall) Filter(filter string) *SslCertificatesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *SslCertificatesListCall) MaxResults(maxResults int64) *SslCertificatesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *SslCertificatesListCall) OrderBy(orderBy string) *SslCertificatesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *SslCertificatesListCall) PageToken(pageToken string) *SslCertificatesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SslCertificatesListCall) Fields(s ...googleapi.Field) *SslCertificatesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *SslCertificatesListCall) IfNoneMatch(entityTag string) *SslCertificatesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SslCertificatesListCall) Context(ctx context.Context) *SslCertificatesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SslCertificatesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertificatesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslCertificates") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslCertificates.list" call. -// Exactly one of *SslCertificateList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *SslCertificateList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *SslCertificatesListCall) Do(opts ...googleapi.CallOption) (*SslCertificateList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &SslCertificateList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of SslCertificate resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.sslCertificates.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/sslCertificates", - // "response": { - // "$ref": "SslCertificateList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *SslCertificatesListCall) Pages(ctx context.Context, f func(*SslCertificateList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.subnetworks.aggregatedList": - -type SubnetworksAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of subnetworks. -func (r *SubnetworksService) AggregatedList(project string) *SubnetworksAggregatedListCall { - c := &SubnetworksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *SubnetworksAggregatedListCall) Filter(filter string) *SubnetworksAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *SubnetworksAggregatedListCall) MaxResults(maxResults int64) *SubnetworksAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *SubnetworksAggregatedListCall) OrderBy(orderBy string) *SubnetworksAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *SubnetworksAggregatedListCall) PageToken(pageToken string) *SubnetworksAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SubnetworksAggregatedListCall) Fields(s ...googleapi.Field) *SubnetworksAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *SubnetworksAggregatedListCall) IfNoneMatch(entityTag string) *SubnetworksAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SubnetworksAggregatedListCall) Context(ctx context.Context) *SubnetworksAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SubnetworksAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/subnetworks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.aggregatedList" call. -// Exactly one of *SubnetworkAggregatedList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *SubnetworkAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *SubnetworksAggregatedListCall) Do(opts ...googleapi.CallOption) (*SubnetworkAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &SubnetworkAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of subnetworks.", - // "httpMethod": "GET", - // "id": "compute.subnetworks.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/subnetworks", - // "response": { - // "$ref": "SubnetworkAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *SubnetworksAggregatedListCall) Pages(ctx context.Context, f func(*SubnetworkAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.subnetworks.delete": - -type SubnetworksDeleteCall struct { - s *Service - project string - region string - subnetwork string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified subnetwork. -func (r *SubnetworksService) Delete(project string, region string, subnetwork string) *SubnetworksDeleteCall { - c := &SubnetworksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.subnetwork = subnetwork - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SubnetworksDeleteCall) Fields(s ...googleapi.Field) *SubnetworksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SubnetworksDeleteCall) Context(ctx context.Context) *SubnetworksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SubnetworksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{subnetwork}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "subnetwork": c.subnetwork, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SubnetworksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified subnetwork.", - // "httpMethod": "DELETE", - // "id": "compute.subnetworks.delete", - // "parameterOrder": [ - // "project", - // "region", - // "subnetwork" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "subnetwork": { - // "description": "Name of the Subnetwork resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/subnetworks/{subnetwork}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.subnetworks.expandIpCidrRange": - -type SubnetworksExpandIpCidrRangeCall struct { - s *Service - project string - region string - subnetwork string - subnetworksexpandipcidrrangerequest *SubnetworksExpandIpCidrRangeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ExpandIpCidrRange: Expands the IP CIDR range of the subnetwork to a -// specified value. -func (r *SubnetworksService) ExpandIpCidrRange(project string, region string, subnetwork string, subnetworksexpandipcidrrangerequest *SubnetworksExpandIpCidrRangeRequest) *SubnetworksExpandIpCidrRangeCall { - c := &SubnetworksExpandIpCidrRangeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.subnetwork = subnetwork - c.subnetworksexpandipcidrrangerequest = subnetworksexpandipcidrrangerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SubnetworksExpandIpCidrRangeCall) Fields(s ...googleapi.Field) *SubnetworksExpandIpCidrRangeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SubnetworksExpandIpCidrRangeCall) Context(ctx context.Context) *SubnetworksExpandIpCidrRangeCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SubnetworksExpandIpCidrRangeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksExpandIpCidrRangeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.subnetworksexpandipcidrrangerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{subnetwork}/expandIpCidrRange") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "subnetwork": c.subnetwork, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.expandIpCidrRange" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SubnetworksExpandIpCidrRangeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Expands the IP CIDR range of the subnetwork to a specified value.", - // "httpMethod": "POST", - // "id": "compute.subnetworks.expandIpCidrRange", - // "parameterOrder": [ - // "project", - // "region", - // "subnetwork" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "subnetwork": { - // "description": "Name of the Subnetwork resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/subnetworks/{subnetwork}/expandIpCidrRange", - // "request": { - // "$ref": "SubnetworksExpandIpCidrRangeRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.subnetworks.get": - -type SubnetworksGetCall struct { - s *Service - project string - region string - subnetwork string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified subnetwork. Get a list of available -// subnetworks list() request. -func (r *SubnetworksService) Get(project string, region string, subnetwork string) *SubnetworksGetCall { - c := &SubnetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.subnetwork = subnetwork - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SubnetworksGetCall) Fields(s ...googleapi.Field) *SubnetworksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *SubnetworksGetCall) IfNoneMatch(entityTag string) *SubnetworksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SubnetworksGetCall) Context(ctx context.Context) *SubnetworksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SubnetworksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{subnetwork}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "subnetwork": c.subnetwork, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.get" call. -// Exactly one of *Subnetwork or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Subnetwork.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SubnetworksGetCall) Do(opts ...googleapi.CallOption) (*Subnetwork, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Subnetwork{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified subnetwork. Get a list of available subnetworks list() request.", - // "httpMethod": "GET", - // "id": "compute.subnetworks.get", - // "parameterOrder": [ - // "project", - // "region", - // "subnetwork" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "subnetwork": { - // "description": "Name of the Subnetwork resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/subnetworks/{subnetwork}", - // "response": { - // "$ref": "Subnetwork" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.subnetworks.insert": - -type SubnetworksInsertCall struct { - s *Service - project string - region string - subnetwork *Subnetwork - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a subnetwork in the specified project using the data -// included in the request. -func (r *SubnetworksService) Insert(project string, region string, subnetwork *Subnetwork) *SubnetworksInsertCall { - c := &SubnetworksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.subnetwork = subnetwork - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SubnetworksInsertCall) Fields(s ...googleapi.Field) *SubnetworksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SubnetworksInsertCall) Context(ctx context.Context) *SubnetworksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SubnetworksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.subnetwork) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SubnetworksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a subnetwork in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.subnetworks.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/subnetworks", - // "request": { - // "$ref": "Subnetwork" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.subnetworks.list": - -type SubnetworksListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of subnetworks available to the specified -// project. -func (r *SubnetworksService) List(project string, region string) *SubnetworksListCall { - c := &SubnetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *SubnetworksListCall) Filter(filter string) *SubnetworksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *SubnetworksListCall) MaxResults(maxResults int64) *SubnetworksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *SubnetworksListCall) OrderBy(orderBy string) *SubnetworksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *SubnetworksListCall) PageToken(pageToken string) *SubnetworksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SubnetworksListCall) Fields(s ...googleapi.Field) *SubnetworksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *SubnetworksListCall) IfNoneMatch(entityTag string) *SubnetworksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SubnetworksListCall) Context(ctx context.Context) *SubnetworksListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SubnetworksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.list" call. -// Exactly one of *SubnetworkList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *SubnetworkList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *SubnetworksListCall) Do(opts ...googleapi.CallOption) (*SubnetworkList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &SubnetworkList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of subnetworks available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.subnetworks.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/subnetworks", - // "response": { - // "$ref": "SubnetworkList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *SubnetworksListCall) Pages(ctx context.Context, f func(*SubnetworkList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.subnetworks.setPrivateIpGoogleAccess": - -type SubnetworksSetPrivateIpGoogleAccessCall struct { - s *Service - project string - region string - subnetwork string - subnetworkssetprivateipgoogleaccessrequest *SubnetworksSetPrivateIpGoogleAccessRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetPrivateIpGoogleAccess: Set whether VMs in this subnet can access -// Google services without assigning external IP addresses through -// Private Google Access. -func (r *SubnetworksService) SetPrivateIpGoogleAccess(project string, region string, subnetwork string, subnetworkssetprivateipgoogleaccessrequest *SubnetworksSetPrivateIpGoogleAccessRequest) *SubnetworksSetPrivateIpGoogleAccessCall { - c := &SubnetworksSetPrivateIpGoogleAccessCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.subnetwork = subnetwork - c.subnetworkssetprivateipgoogleaccessrequest = subnetworkssetprivateipgoogleaccessrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *SubnetworksSetPrivateIpGoogleAccessCall) Fields(s ...googleapi.Field) *SubnetworksSetPrivateIpGoogleAccessCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *SubnetworksSetPrivateIpGoogleAccessCall) Context(ctx context.Context) *SubnetworksSetPrivateIpGoogleAccessCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *SubnetworksSetPrivateIpGoogleAccessCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksSetPrivateIpGoogleAccessCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.subnetworkssetprivateipgoogleaccessrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{subnetwork}/setPrivateIpGoogleAccess") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "subnetwork": c.subnetwork, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.setPrivateIpGoogleAccess" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SubnetworksSetPrivateIpGoogleAccessCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access.", - // "httpMethod": "POST", - // "id": "compute.subnetworks.setPrivateIpGoogleAccess", - // "parameterOrder": [ - // "project", - // "region", - // "subnetwork" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "subnetwork": { - // "description": "Name of the Subnetwork resource.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/subnetworks/{subnetwork}/setPrivateIpGoogleAccess", - // "request": { - // "$ref": "SubnetworksSetPrivateIpGoogleAccessRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetHttpProxies.delete": - -type TargetHttpProxiesDeleteCall struct { - s *Service - project string - targetHttpProxy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetHttpProxy resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/delete -func (r *TargetHttpProxiesService) Delete(project string, targetHttpProxy string) *TargetHttpProxiesDeleteCall { - c := &TargetHttpProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpProxy = targetHttpProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetHttpProxiesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpProxiesDeleteCall) Context(ctx context.Context) *TargetHttpProxiesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpProxiesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies/{targetHttpProxy}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetHttpProxy": c.targetHttpProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetHttpProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified TargetHttpProxy resource.", - // "httpMethod": "DELETE", - // "id": "compute.targetHttpProxies.delete", - // "parameterOrder": [ - // "project", - // "targetHttpProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "targetHttpProxy": { - // "description": "Name of the TargetHttpProxy resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetHttpProxies/{targetHttpProxy}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetHttpProxies.get": - -type TargetHttpProxiesGetCall struct { - s *Service - project string - targetHttpProxy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetHttpProxy resource. Get a list of -// available target HTTP proxies by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/get -func (r *TargetHttpProxiesService) Get(project string, targetHttpProxy string) *TargetHttpProxiesGetCall { - c := &TargetHttpProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpProxy = targetHttpProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpProxiesGetCall) Fields(s ...googleapi.Field) *TargetHttpProxiesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetHttpProxiesGetCall) IfNoneMatch(entityTag string) *TargetHttpProxiesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpProxiesGetCall) Context(ctx context.Context) *TargetHttpProxiesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpProxiesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies/{targetHttpProxy}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetHttpProxy": c.targetHttpProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.get" call. -// Exactly one of *TargetHttpProxy or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *TargetHttpProxy.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetHttpProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHttpProxy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetHttpProxy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified TargetHttpProxy resource. Get a list of available target HTTP proxies by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.targetHttpProxies.get", - // "parameterOrder": [ - // "project", - // "targetHttpProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "targetHttpProxy": { - // "description": "Name of the TargetHttpProxy resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetHttpProxies/{targetHttpProxy}", - // "response": { - // "$ref": "TargetHttpProxy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetHttpProxies.insert": - -type TargetHttpProxiesInsertCall struct { - s *Service - project string - targethttpproxy *TargetHttpProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetHttpProxy resource in the specified project -// using the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/insert -func (r *TargetHttpProxiesService) Insert(project string, targethttpproxy *TargetHttpProxy) *TargetHttpProxiesInsertCall { - c := &TargetHttpProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targethttpproxy = targethttpproxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpProxiesInsertCall) Fields(s ...googleapi.Field) *TargetHttpProxiesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpProxiesInsertCall) Context(ctx context.Context) *TargetHttpProxiesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpProxiesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targethttpproxy) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetHttpProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a TargetHttpProxy resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.targetHttpProxies.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetHttpProxies", - // "request": { - // "$ref": "TargetHttpProxy" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetHttpProxies.list": - -type TargetHttpProxiesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of TargetHttpProxy resources available to -// the specified project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/list -func (r *TargetHttpProxiesService) List(project string) *TargetHttpProxiesListCall { - c := &TargetHttpProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *TargetHttpProxiesListCall) Filter(filter string) *TargetHttpProxiesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *TargetHttpProxiesListCall) MaxResults(maxResults int64) *TargetHttpProxiesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *TargetHttpProxiesListCall) OrderBy(orderBy string) *TargetHttpProxiesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *TargetHttpProxiesListCall) PageToken(pageToken string) *TargetHttpProxiesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpProxiesListCall) Fields(s ...googleapi.Field) *TargetHttpProxiesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetHttpProxiesListCall) IfNoneMatch(entityTag string) *TargetHttpProxiesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpProxiesListCall) Context(ctx context.Context) *TargetHttpProxiesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpProxiesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.list" call. -// Exactly one of *TargetHttpProxyList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TargetHttpProxyList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetHttpProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHttpProxyList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetHttpProxyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of TargetHttpProxy resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.targetHttpProxies.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetHttpProxies", - // "response": { - // "$ref": "TargetHttpProxyList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *TargetHttpProxiesListCall) Pages(ctx context.Context, f func(*TargetHttpProxyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.targetHttpProxies.setUrlMap": - -type TargetHttpProxiesSetUrlMapCall struct { - s *Service - project string - targetHttpProxy string - urlmapreference *UrlMapReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetUrlMap: Changes the URL map for TargetHttpProxy. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/setUrlMap -func (r *TargetHttpProxiesService) SetUrlMap(project string, targetHttpProxy string, urlmapreference *UrlMapReference) *TargetHttpProxiesSetUrlMapCall { - c := &TargetHttpProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpProxy = targetHttpProxy - c.urlmapreference = urlmapreference - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpProxiesSetUrlMapCall) Fields(s ...googleapi.Field) *TargetHttpProxiesSetUrlMapCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpProxiesSetUrlMapCall) Context(ctx context.Context) *TargetHttpProxiesSetUrlMapCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpProxiesSetUrlMapCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapreference) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetHttpProxy": c.targetHttpProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.setUrlMap" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetHttpProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes the URL map for TargetHttpProxy.", - // "httpMethod": "POST", - // "id": "compute.targetHttpProxies.setUrlMap", - // "parameterOrder": [ - // "project", - // "targetHttpProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "targetHttpProxy": { - // "description": "Name of the TargetHttpProxy to set a URL map for.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap", - // "request": { - // "$ref": "UrlMapReference" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetHttpsProxies.delete": - -type TargetHttpsProxiesDeleteCall struct { - s *Service - project string - targetHttpsProxy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetHttpsProxy resource. -func (r *TargetHttpsProxiesService) Delete(project string, targetHttpsProxy string) *TargetHttpsProxiesDeleteCall { - c := &TargetHttpsProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpsProxy = targetHttpsProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpsProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpsProxiesDeleteCall) Context(ctx context.Context) *TargetHttpsProxiesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpsProxiesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies/{targetHttpsProxy}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetHttpsProxy": c.targetHttpsProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetHttpsProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified TargetHttpsProxy resource.", - // "httpMethod": "DELETE", - // "id": "compute.targetHttpsProxies.delete", - // "parameterOrder": [ - // "project", - // "targetHttpsProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "targetHttpsProxy": { - // "description": "Name of the TargetHttpsProxy resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetHttpsProxies/{targetHttpsProxy}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetHttpsProxies.get": - -type TargetHttpsProxiesGetCall struct { - s *Service - project string - targetHttpsProxy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetHttpsProxy resource. Get a list of -// available target HTTPS proxies by making a list() request. -func (r *TargetHttpsProxiesService) Get(project string, targetHttpsProxy string) *TargetHttpsProxiesGetCall { - c := &TargetHttpsProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpsProxy = targetHttpsProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpsProxiesGetCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetHttpsProxiesGetCall) IfNoneMatch(entityTag string) *TargetHttpsProxiesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpsProxiesGetCall) Context(ctx context.Context) *TargetHttpsProxiesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpsProxiesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies/{targetHttpsProxy}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetHttpsProxy": c.targetHttpsProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.get" call. -// Exactly one of *TargetHttpsProxy or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TargetHttpsProxy.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetHttpsProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHttpsProxy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetHttpsProxy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified TargetHttpsProxy resource. Get a list of available target HTTPS proxies by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.targetHttpsProxies.get", - // "parameterOrder": [ - // "project", - // "targetHttpsProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "targetHttpsProxy": { - // "description": "Name of the TargetHttpsProxy resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetHttpsProxies/{targetHttpsProxy}", - // "response": { - // "$ref": "TargetHttpsProxy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetHttpsProxies.insert": - -type TargetHttpsProxiesInsertCall struct { - s *Service - project string - targethttpsproxy *TargetHttpsProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetHttpsProxy resource in the specified project -// using the data included in the request. -func (r *TargetHttpsProxiesService) Insert(project string, targethttpsproxy *TargetHttpsProxy) *TargetHttpsProxiesInsertCall { - c := &TargetHttpsProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targethttpsproxy = targethttpsproxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpsProxiesInsertCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpsProxiesInsertCall) Context(ctx context.Context) *TargetHttpsProxiesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpsProxiesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targethttpsproxy) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetHttpsProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a TargetHttpsProxy resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.targetHttpsProxies.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetHttpsProxies", - // "request": { - // "$ref": "TargetHttpsProxy" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetHttpsProxies.list": - -type TargetHttpsProxiesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of TargetHttpsProxy resources available to -// the specified project. -func (r *TargetHttpsProxiesService) List(project string) *TargetHttpsProxiesListCall { - c := &TargetHttpsProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *TargetHttpsProxiesListCall) Filter(filter string) *TargetHttpsProxiesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *TargetHttpsProxiesListCall) MaxResults(maxResults int64) *TargetHttpsProxiesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *TargetHttpsProxiesListCall) OrderBy(orderBy string) *TargetHttpsProxiesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *TargetHttpsProxiesListCall) PageToken(pageToken string) *TargetHttpsProxiesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpsProxiesListCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetHttpsProxiesListCall) IfNoneMatch(entityTag string) *TargetHttpsProxiesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpsProxiesListCall) Context(ctx context.Context) *TargetHttpsProxiesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpsProxiesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.list" call. -// Exactly one of *TargetHttpsProxyList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TargetHttpsProxyList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetHttpsProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHttpsProxyList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetHttpsProxyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.targetHttpsProxies.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetHttpsProxies", - // "response": { - // "$ref": "TargetHttpsProxyList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *TargetHttpsProxiesListCall) Pages(ctx context.Context, f func(*TargetHttpsProxyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.targetHttpsProxies.setSslCertificates": - -type TargetHttpsProxiesSetSslCertificatesCall struct { - s *Service - project string - targetHttpsProxy string - targethttpsproxiessetsslcertificatesrequest *TargetHttpsProxiesSetSslCertificatesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSslCertificates: Replaces SslCertificates for TargetHttpsProxy. -func (r *TargetHttpsProxiesService) SetSslCertificates(project string, targetHttpsProxy string, targethttpsproxiessetsslcertificatesrequest *TargetHttpsProxiesSetSslCertificatesRequest) *TargetHttpsProxiesSetSslCertificatesCall { - c := &TargetHttpsProxiesSetSslCertificatesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpsProxy = targetHttpsProxy - c.targethttpsproxiessetsslcertificatesrequest = targethttpsproxiessetsslcertificatesrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpsProxiesSetSslCertificatesCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesSetSslCertificatesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpsProxiesSetSslCertificatesCall) Context(ctx context.Context) *TargetHttpsProxiesSetSslCertificatesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpsProxiesSetSslCertificatesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targethttpsproxiessetsslcertificatesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetHttpsProxy": c.targetHttpsProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.setSslCertificates" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetHttpsProxiesSetSslCertificatesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Replaces SslCertificates for TargetHttpsProxy.", - // "httpMethod": "POST", - // "id": "compute.targetHttpsProxies.setSslCertificates", - // "parameterOrder": [ - // "project", - // "targetHttpsProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "targetHttpsProxy": { - // "description": "Name of the TargetHttpsProxy resource to set an SslCertificates resource for.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates", - // "request": { - // "$ref": "TargetHttpsProxiesSetSslCertificatesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetHttpsProxies.setUrlMap": - -type TargetHttpsProxiesSetUrlMapCall struct { - s *Service - project string - targetHttpsProxy string - urlmapreference *UrlMapReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetUrlMap: Changes the URL map for TargetHttpsProxy. -func (r *TargetHttpsProxiesService) SetUrlMap(project string, targetHttpsProxy string, urlmapreference *UrlMapReference) *TargetHttpsProxiesSetUrlMapCall { - c := &TargetHttpsProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpsProxy = targetHttpsProxy - c.urlmapreference = urlmapreference - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetHttpsProxiesSetUrlMapCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesSetUrlMapCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetHttpsProxiesSetUrlMapCall) Context(ctx context.Context) *TargetHttpsProxiesSetUrlMapCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetHttpsProxiesSetUrlMapCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapreference) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetHttpsProxy": c.targetHttpsProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.setUrlMap" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetHttpsProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes the URL map for TargetHttpsProxy.", - // "httpMethod": "POST", - // "id": "compute.targetHttpsProxies.setUrlMap", - // "parameterOrder": [ - // "project", - // "targetHttpsProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "targetHttpsProxy": { - // "description": "Name of the TargetHttpsProxy resource whose URL map is to be set.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap", - // "request": { - // "$ref": "UrlMapReference" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetInstances.aggregatedList": - -type TargetInstancesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of target instances. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/aggregatedList -func (r *TargetInstancesService) AggregatedList(project string) *TargetInstancesAggregatedListCall { - c := &TargetInstancesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *TargetInstancesAggregatedListCall) Filter(filter string) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *TargetInstancesAggregatedListCall) MaxResults(maxResults int64) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *TargetInstancesAggregatedListCall) OrderBy(orderBy string) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *TargetInstancesAggregatedListCall) PageToken(pageToken string) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetInstancesAggregatedListCall) Fields(s ...googleapi.Field) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetInstancesAggregatedListCall) IfNoneMatch(entityTag string) *TargetInstancesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetInstancesAggregatedListCall) Context(ctx context.Context) *TargetInstancesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetInstancesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetInstancesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/targetInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetInstances.aggregatedList" call. -// Exactly one of *TargetInstanceAggregatedList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *TargetInstanceAggregatedList.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetInstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetInstanceAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetInstanceAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of target instances.", - // "httpMethod": "GET", - // "id": "compute.targetInstances.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/targetInstances", - // "response": { - // "$ref": "TargetInstanceAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *TargetInstancesAggregatedListCall) Pages(ctx context.Context, f func(*TargetInstanceAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.targetInstances.delete": - -type TargetInstancesDeleteCall struct { - s *Service - project string - zone string - targetInstance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetInstance resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/delete -func (r *TargetInstancesService) Delete(project string, zone string, targetInstance string) *TargetInstancesDeleteCall { - c := &TargetInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.targetInstance = targetInstance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetInstancesDeleteCall) Fields(s ...googleapi.Field) *TargetInstancesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetInstancesDeleteCall) Context(ctx context.Context) *TargetInstancesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetInstancesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetInstancesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances/{targetInstance}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "targetInstance": c.targetInstance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetInstances.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified TargetInstance resource.", - // "httpMethod": "DELETE", - // "id": "compute.targetInstances.delete", - // "parameterOrder": [ - // "project", - // "zone", - // "targetInstance" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "targetInstance": { - // "description": "Name of the TargetInstance resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/targetInstances/{targetInstance}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetInstances.get": - -type TargetInstancesGetCall struct { - s *Service - project string - zone string - targetInstance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetInstance resource. Get a list of -// available target instances by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/get -func (r *TargetInstancesService) Get(project string, zone string, targetInstance string) *TargetInstancesGetCall { - c := &TargetInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.targetInstance = targetInstance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetInstancesGetCall) Fields(s ...googleapi.Field) *TargetInstancesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetInstancesGetCall) IfNoneMatch(entityTag string) *TargetInstancesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetInstancesGetCall) Context(ctx context.Context) *TargetInstancesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetInstancesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetInstancesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances/{targetInstance}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "targetInstance": c.targetInstance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetInstances.get" call. -// Exactly one of *TargetInstance or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *TargetInstance.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetInstancesGetCall) Do(opts ...googleapi.CallOption) (*TargetInstance, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetInstance{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified TargetInstance resource. Get a list of available target instances by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.targetInstances.get", - // "parameterOrder": [ - // "project", - // "zone", - // "targetInstance" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "targetInstance": { - // "description": "Name of the TargetInstance resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/targetInstances/{targetInstance}", - // "response": { - // "$ref": "TargetInstance" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetInstances.insert": - -type TargetInstancesInsertCall struct { - s *Service - project string - zone string - targetinstance *TargetInstance - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetInstance resource in the specified project -// and zone using the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/insert -func (r *TargetInstancesService) Insert(project string, zone string, targetinstance *TargetInstance) *TargetInstancesInsertCall { - c := &TargetInstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.targetinstance = targetinstance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetInstancesInsertCall) Fields(s ...googleapi.Field) *TargetInstancesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetInstancesInsertCall) Context(ctx context.Context) *TargetInstancesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetInstancesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetInstancesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetinstance) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetInstances.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetInstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a TargetInstance resource in the specified project and zone using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.targetInstances.insert", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/targetInstances", - // "request": { - // "$ref": "TargetInstance" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetInstances.list": - -type TargetInstancesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of TargetInstance resources available to the -// specified project and zone. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/list -func (r *TargetInstancesService) List(project string, zone string) *TargetInstancesListCall { - c := &TargetInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *TargetInstancesListCall) Filter(filter string) *TargetInstancesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *TargetInstancesListCall) MaxResults(maxResults int64) *TargetInstancesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *TargetInstancesListCall) OrderBy(orderBy string) *TargetInstancesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *TargetInstancesListCall) PageToken(pageToken string) *TargetInstancesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetInstancesListCall) Fields(s ...googleapi.Field) *TargetInstancesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetInstancesListCall) IfNoneMatch(entityTag string) *TargetInstancesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetInstancesListCall) Context(ctx context.Context) *TargetInstancesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetInstancesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetInstancesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetInstances.list" call. -// Exactly one of *TargetInstanceList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TargetInstanceList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetInstancesListCall) Do(opts ...googleapi.CallOption) (*TargetInstanceList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetInstanceList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of TargetInstance resources available to the specified project and zone.", - // "httpMethod": "GET", - // "id": "compute.targetInstances.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/targetInstances", - // "response": { - // "$ref": "TargetInstanceList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *TargetInstancesListCall) Pages(ctx context.Context, f func(*TargetInstanceList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.targetPools.addHealthCheck": - -type TargetPoolsAddHealthCheckCall struct { - s *Service - project string - region string - targetPool string - targetpoolsaddhealthcheckrequest *TargetPoolsAddHealthCheckRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddHealthCheck: Adds health check URLs to a target pool. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/addHealthCheck -func (r *TargetPoolsService) AddHealthCheck(project string, region string, targetPool string, targetpoolsaddhealthcheckrequest *TargetPoolsAddHealthCheckRequest) *TargetPoolsAddHealthCheckCall { - c := &TargetPoolsAddHealthCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.targetpoolsaddhealthcheckrequest = targetpoolsaddhealthcheckrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsAddHealthCheckCall) Fields(s ...googleapi.Field) *TargetPoolsAddHealthCheckCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsAddHealthCheckCall) Context(ctx context.Context) *TargetPoolsAddHealthCheckCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsAddHealthCheckCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsAddHealthCheckCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsaddhealthcheckrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.addHealthCheck" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetPoolsAddHealthCheckCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Adds health check URLs to a target pool.", - // "httpMethod": "POST", - // "id": "compute.targetPools.addHealthCheck", - // "parameterOrder": [ - // "project", - // "region", - // "targetPool" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "targetPool": { - // "description": "Name of the target pool to add a health check to.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck", - // "request": { - // "$ref": "TargetPoolsAddHealthCheckRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetPools.addInstance": - -type TargetPoolsAddInstanceCall struct { - s *Service - project string - region string - targetPool string - targetpoolsaddinstancerequest *TargetPoolsAddInstanceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddInstance: Adds an instance to a target pool. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/addInstance -func (r *TargetPoolsService) AddInstance(project string, region string, targetPool string, targetpoolsaddinstancerequest *TargetPoolsAddInstanceRequest) *TargetPoolsAddInstanceCall { - c := &TargetPoolsAddInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.targetpoolsaddinstancerequest = targetpoolsaddinstancerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsAddInstanceCall) Fields(s ...googleapi.Field) *TargetPoolsAddInstanceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsAddInstanceCall) Context(ctx context.Context) *TargetPoolsAddInstanceCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsAddInstanceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsAddInstanceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsaddinstancerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/addInstance") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.addInstance" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetPoolsAddInstanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Adds an instance to a target pool.", - // "httpMethod": "POST", - // "id": "compute.targetPools.addInstance", - // "parameterOrder": [ - // "project", - // "region", - // "targetPool" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "targetPool": { - // "description": "Name of the TargetPool resource to add instances to.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools/{targetPool}/addInstance", - // "request": { - // "$ref": "TargetPoolsAddInstanceRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetPools.aggregatedList": - -type TargetPoolsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of target pools. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/aggregatedList -func (r *TargetPoolsService) AggregatedList(project string) *TargetPoolsAggregatedListCall { - c := &TargetPoolsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *TargetPoolsAggregatedListCall) Filter(filter string) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *TargetPoolsAggregatedListCall) MaxResults(maxResults int64) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *TargetPoolsAggregatedListCall) OrderBy(orderBy string) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *TargetPoolsAggregatedListCall) PageToken(pageToken string) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsAggregatedListCall) Fields(s ...googleapi.Field) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetPoolsAggregatedListCall) IfNoneMatch(entityTag string) *TargetPoolsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsAggregatedListCall) Context(ctx context.Context) *TargetPoolsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/targetPools") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.aggregatedList" call. -// Exactly one of *TargetPoolAggregatedList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *TargetPoolAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetPoolsAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetPoolAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetPoolAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of target pools.", - // "httpMethod": "GET", - // "id": "compute.targetPools.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/targetPools", - // "response": { - // "$ref": "TargetPoolAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *TargetPoolsAggregatedListCall) Pages(ctx context.Context, f func(*TargetPoolAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.targetPools.delete": - -type TargetPoolsDeleteCall struct { - s *Service - project string - region string - targetPool string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified target pool. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/delete -func (r *TargetPoolsService) Delete(project string, region string, targetPool string) *TargetPoolsDeleteCall { - c := &TargetPoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsDeleteCall) Fields(s ...googleapi.Field) *TargetPoolsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsDeleteCall) Context(ctx context.Context) *TargetPoolsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetPoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified target pool.", - // "httpMethod": "DELETE", - // "id": "compute.targetPools.delete", - // "parameterOrder": [ - // "project", - // "region", - // "targetPool" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "targetPool": { - // "description": "Name of the TargetPool resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools/{targetPool}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetPools.get": - -type TargetPoolsGetCall struct { - s *Service - project string - region string - targetPool string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified target pool. Get a list of available -// target pools by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/get -func (r *TargetPoolsService) Get(project string, region string, targetPool string) *TargetPoolsGetCall { - c := &TargetPoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsGetCall) Fields(s ...googleapi.Field) *TargetPoolsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetPoolsGetCall) IfNoneMatch(entityTag string) *TargetPoolsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsGetCall) Context(ctx context.Context) *TargetPoolsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.get" call. -// Exactly one of *TargetPool or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *TargetPool.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetPoolsGetCall) Do(opts ...googleapi.CallOption) (*TargetPool, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetPool{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified target pool. Get a list of available target pools by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.targetPools.get", - // "parameterOrder": [ - // "project", - // "region", - // "targetPool" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "targetPool": { - // "description": "Name of the TargetPool resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools/{targetPool}", - // "response": { - // "$ref": "TargetPool" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetPools.getHealth": - -type TargetPoolsGetHealthCall struct { - s *Service - project string - region string - targetPool string - instancereference *InstanceReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetHealth: Gets the most recent health check results for each IP for -// the instance that is referenced by the given target pool. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/getHealth -func (r *TargetPoolsService) GetHealth(project string, region string, targetPool string, instancereference *InstanceReference) *TargetPoolsGetHealthCall { - c := &TargetPoolsGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.instancereference = instancereference - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsGetHealthCall) Fields(s ...googleapi.Field) *TargetPoolsGetHealthCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsGetHealthCall) Context(ctx context.Context) *TargetPoolsGetHealthCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsGetHealthCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsGetHealthCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancereference) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/getHealth") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.getHealth" call. -// Exactly one of *TargetPoolInstanceHealth or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *TargetPoolInstanceHealth.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetPoolsGetHealthCall) Do(opts ...googleapi.CallOption) (*TargetPoolInstanceHealth, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetPoolInstanceHealth{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the most recent health check results for each IP for the instance that is referenced by the given target pool.", - // "httpMethod": "POST", - // "id": "compute.targetPools.getHealth", - // "parameterOrder": [ - // "project", - // "region", - // "targetPool" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "targetPool": { - // "description": "Name of the TargetPool resource to which the queried instance belongs.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools/{targetPool}/getHealth", - // "request": { - // "$ref": "InstanceReference" - // }, - // "response": { - // "$ref": "TargetPoolInstanceHealth" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetPools.insert": - -type TargetPoolsInsertCall struct { - s *Service - project string - region string - targetpool *TargetPool - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a target pool in the specified project and region -// using the data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/insert -func (r *TargetPoolsService) Insert(project string, region string, targetpool *TargetPool) *TargetPoolsInsertCall { - c := &TargetPoolsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetpool = targetpool - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsInsertCall) Fields(s ...googleapi.Field) *TargetPoolsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsInsertCall) Context(ctx context.Context) *TargetPoolsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpool) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetPoolsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a target pool in the specified project and region using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.targetPools.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools", - // "request": { - // "$ref": "TargetPool" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetPools.list": - -type TargetPoolsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of target pools available to the specified -// project and region. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/list -func (r *TargetPoolsService) List(project string, region string) *TargetPoolsListCall { - c := &TargetPoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *TargetPoolsListCall) Filter(filter string) *TargetPoolsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *TargetPoolsListCall) MaxResults(maxResults int64) *TargetPoolsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *TargetPoolsListCall) OrderBy(orderBy string) *TargetPoolsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *TargetPoolsListCall) PageToken(pageToken string) *TargetPoolsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsListCall) Fields(s ...googleapi.Field) *TargetPoolsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetPoolsListCall) IfNoneMatch(entityTag string) *TargetPoolsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsListCall) Context(ctx context.Context) *TargetPoolsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.list" call. -// Exactly one of *TargetPoolList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *TargetPoolList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetPoolsListCall) Do(opts ...googleapi.CallOption) (*TargetPoolList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetPoolList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of target pools available to the specified project and region.", - // "httpMethod": "GET", - // "id": "compute.targetPools.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools", - // "response": { - // "$ref": "TargetPoolList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *TargetPoolsListCall) Pages(ctx context.Context, f func(*TargetPoolList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.targetPools.removeHealthCheck": - -type TargetPoolsRemoveHealthCheckCall struct { - s *Service - project string - region string - targetPool string - targetpoolsremovehealthcheckrequest *TargetPoolsRemoveHealthCheckRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveHealthCheck: Removes health check URL from a target pool. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/removeHealthCheck -func (r *TargetPoolsService) RemoveHealthCheck(project string, region string, targetPool string, targetpoolsremovehealthcheckrequest *TargetPoolsRemoveHealthCheckRequest) *TargetPoolsRemoveHealthCheckCall { - c := &TargetPoolsRemoveHealthCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.targetpoolsremovehealthcheckrequest = targetpoolsremovehealthcheckrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsRemoveHealthCheckCall) Fields(s ...googleapi.Field) *TargetPoolsRemoveHealthCheckCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsRemoveHealthCheckCall) Context(ctx context.Context) *TargetPoolsRemoveHealthCheckCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsRemoveHealthCheckCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsRemoveHealthCheckCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsremovehealthcheckrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.removeHealthCheck" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetPoolsRemoveHealthCheckCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Removes health check URL from a target pool.", - // "httpMethod": "POST", - // "id": "compute.targetPools.removeHealthCheck", - // "parameterOrder": [ - // "project", - // "region", - // "targetPool" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "targetPool": { - // "description": "Name of the target pool to remove health checks from.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck", - // "request": { - // "$ref": "TargetPoolsRemoveHealthCheckRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetPools.removeInstance": - -type TargetPoolsRemoveInstanceCall struct { - s *Service - project string - region string - targetPool string - targetpoolsremoveinstancerequest *TargetPoolsRemoveInstanceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveInstance: Removes instance URL from a target pool. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/removeInstance -func (r *TargetPoolsService) RemoveInstance(project string, region string, targetPool string, targetpoolsremoveinstancerequest *TargetPoolsRemoveInstanceRequest) *TargetPoolsRemoveInstanceCall { - c := &TargetPoolsRemoveInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.targetpoolsremoveinstancerequest = targetpoolsremoveinstancerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsRemoveInstanceCall) Fields(s ...googleapi.Field) *TargetPoolsRemoveInstanceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsRemoveInstanceCall) Context(ctx context.Context) *TargetPoolsRemoveInstanceCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsRemoveInstanceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsRemoveInstanceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsremoveinstancerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/removeInstance") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.removeInstance" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetPoolsRemoveInstanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Removes instance URL from a target pool.", - // "httpMethod": "POST", - // "id": "compute.targetPools.removeInstance", - // "parameterOrder": [ - // "project", - // "region", - // "targetPool" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "targetPool": { - // "description": "Name of the TargetPool resource to remove instances from.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools/{targetPool}/removeInstance", - // "request": { - // "$ref": "TargetPoolsRemoveInstanceRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetPools.setBackup": - -type TargetPoolsSetBackupCall struct { - s *Service - project string - region string - targetPool string - targetreference *TargetReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetBackup: Changes a backup target pool's configurations. -// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/setBackup -func (r *TargetPoolsService) SetBackup(project string, region string, targetPool string, targetreference *TargetReference) *TargetPoolsSetBackupCall { - c := &TargetPoolsSetBackupCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.targetreference = targetreference - return c -} - -// FailoverRatio sets the optional parameter "failoverRatio": New -// failoverRatio value for the target pool. -func (c *TargetPoolsSetBackupCall) FailoverRatio(failoverRatio float64) *TargetPoolsSetBackupCall { - c.urlParams_.Set("failoverRatio", fmt.Sprint(failoverRatio)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetPoolsSetBackupCall) Fields(s ...googleapi.Field) *TargetPoolsSetBackupCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetPoolsSetBackupCall) Context(ctx context.Context) *TargetPoolsSetBackupCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetPoolsSetBackupCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsSetBackupCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/setBackup") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.setBackup" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetPoolsSetBackupCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes a backup target pool's configurations.", - // "httpMethod": "POST", - // "id": "compute.targetPools.setBackup", - // "parameterOrder": [ - // "project", - // "region", - // "targetPool" - // ], - // "parameters": { - // "failoverRatio": { - // "description": "New failoverRatio value for the target pool.", - // "format": "float", - // "location": "query", - // "type": "number" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "targetPool": { - // "description": "Name of the TargetPool resource to set a backup pool for.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetPools/{targetPool}/setBackup", - // "request": { - // "$ref": "TargetReference" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetSslProxies.delete": - -type TargetSslProxiesDeleteCall struct { - s *Service - project string - targetSslProxy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetSslProxy resource. -func (r *TargetSslProxiesService) Delete(project string, targetSslProxy string) *TargetSslProxiesDeleteCall { - c := &TargetSslProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetSslProxy = targetSslProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetSslProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetSslProxiesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetSslProxiesDeleteCall) Context(ctx context.Context) *TargetSslProxiesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetSslProxiesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetSslProxy": c.targetSslProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetSslProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified TargetSslProxy resource.", - // "httpMethod": "DELETE", - // "id": "compute.targetSslProxies.delete", - // "parameterOrder": [ - // "project", - // "targetSslProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "targetSslProxy": { - // "description": "Name of the TargetSslProxy resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetSslProxies/{targetSslProxy}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetSslProxies.get": - -type TargetSslProxiesGetCall struct { - s *Service - project string - targetSslProxy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetSslProxy resource. Get a list of -// available target SSL proxies by making a list() request. -func (r *TargetSslProxiesService) Get(project string, targetSslProxy string) *TargetSslProxiesGetCall { - c := &TargetSslProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetSslProxy = targetSslProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetSslProxiesGetCall) Fields(s ...googleapi.Field) *TargetSslProxiesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetSslProxiesGetCall) IfNoneMatch(entityTag string) *TargetSslProxiesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetSslProxiesGetCall) Context(ctx context.Context) *TargetSslProxiesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetSslProxiesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetSslProxy": c.targetSslProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.get" call. -// Exactly one of *TargetSslProxy or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *TargetSslProxy.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetSslProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetSslProxy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetSslProxy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified TargetSslProxy resource. Get a list of available target SSL proxies by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.targetSslProxies.get", - // "parameterOrder": [ - // "project", - // "targetSslProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "targetSslProxy": { - // "description": "Name of the TargetSslProxy resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetSslProxies/{targetSslProxy}", - // "response": { - // "$ref": "TargetSslProxy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetSslProxies.insert": - -type TargetSslProxiesInsertCall struct { - s *Service - project string - targetsslproxy *TargetSslProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetSslProxy resource in the specified project -// using the data included in the request. -func (r *TargetSslProxiesService) Insert(project string, targetsslproxy *TargetSslProxy) *TargetSslProxiesInsertCall { - c := &TargetSslProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetsslproxy = targetsslproxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetSslProxiesInsertCall) Fields(s ...googleapi.Field) *TargetSslProxiesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetSslProxiesInsertCall) Context(ctx context.Context) *TargetSslProxiesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetSslProxiesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetsslproxy) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetSslProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a TargetSslProxy resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.targetSslProxies.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetSslProxies", - // "request": { - // "$ref": "TargetSslProxy" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetSslProxies.list": - -type TargetSslProxiesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of TargetSslProxy resources available to the -// specified project. -func (r *TargetSslProxiesService) List(project string) *TargetSslProxiesListCall { - c := &TargetSslProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *TargetSslProxiesListCall) Filter(filter string) *TargetSslProxiesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *TargetSslProxiesListCall) MaxResults(maxResults int64) *TargetSslProxiesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *TargetSslProxiesListCall) OrderBy(orderBy string) *TargetSslProxiesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *TargetSslProxiesListCall) PageToken(pageToken string) *TargetSslProxiesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetSslProxiesListCall) Fields(s ...googleapi.Field) *TargetSslProxiesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetSslProxiesListCall) IfNoneMatch(entityTag string) *TargetSslProxiesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetSslProxiesListCall) Context(ctx context.Context) *TargetSslProxiesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetSslProxiesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.list" call. -// Exactly one of *TargetSslProxyList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TargetSslProxyList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetSslProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetSslProxyList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetSslProxyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of TargetSslProxy resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.targetSslProxies.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetSslProxies", - // "response": { - // "$ref": "TargetSslProxyList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *TargetSslProxiesListCall) Pages(ctx context.Context, f func(*TargetSslProxyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.targetSslProxies.setBackendService": - -type TargetSslProxiesSetBackendServiceCall struct { - s *Service - project string - targetSslProxy string - targetsslproxiessetbackendservicerequest *TargetSslProxiesSetBackendServiceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetBackendService: Changes the BackendService for TargetSslProxy. -func (r *TargetSslProxiesService) SetBackendService(project string, targetSslProxy string, targetsslproxiessetbackendservicerequest *TargetSslProxiesSetBackendServiceRequest) *TargetSslProxiesSetBackendServiceCall { - c := &TargetSslProxiesSetBackendServiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetSslProxy = targetSslProxy - c.targetsslproxiessetbackendservicerequest = targetsslproxiessetbackendservicerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetSslProxiesSetBackendServiceCall) Fields(s ...googleapi.Field) *TargetSslProxiesSetBackendServiceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetSslProxiesSetBackendServiceCall) Context(ctx context.Context) *TargetSslProxiesSetBackendServiceCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetSslProxiesSetBackendServiceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesSetBackendServiceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetsslproxiessetbackendservicerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}/setBackendService") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetSslProxy": c.targetSslProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.setBackendService" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetSslProxiesSetBackendServiceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes the BackendService for TargetSslProxy.", - // "httpMethod": "POST", - // "id": "compute.targetSslProxies.setBackendService", - // "parameterOrder": [ - // "project", - // "targetSslProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "targetSslProxy": { - // "description": "Name of the TargetSslProxy resource whose BackendService resource is to be set.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetSslProxies/{targetSslProxy}/setBackendService", - // "request": { - // "$ref": "TargetSslProxiesSetBackendServiceRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetSslProxies.setProxyHeader": - -type TargetSslProxiesSetProxyHeaderCall struct { - s *Service - project string - targetSslProxy string - targetsslproxiessetproxyheaderrequest *TargetSslProxiesSetProxyHeaderRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetProxyHeader: Changes the ProxyHeaderType for TargetSslProxy. -func (r *TargetSslProxiesService) SetProxyHeader(project string, targetSslProxy string, targetsslproxiessetproxyheaderrequest *TargetSslProxiesSetProxyHeaderRequest) *TargetSslProxiesSetProxyHeaderCall { - c := &TargetSslProxiesSetProxyHeaderCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetSslProxy = targetSslProxy - c.targetsslproxiessetproxyheaderrequest = targetsslproxiessetproxyheaderrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetSslProxiesSetProxyHeaderCall) Fields(s ...googleapi.Field) *TargetSslProxiesSetProxyHeaderCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetSslProxiesSetProxyHeaderCall) Context(ctx context.Context) *TargetSslProxiesSetProxyHeaderCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetSslProxiesSetProxyHeaderCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesSetProxyHeaderCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetsslproxiessetproxyheaderrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}/setProxyHeader") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetSslProxy": c.targetSslProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.setProxyHeader" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetSslProxiesSetProxyHeaderCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes the ProxyHeaderType for TargetSslProxy.", - // "httpMethod": "POST", - // "id": "compute.targetSslProxies.setProxyHeader", - // "parameterOrder": [ - // "project", - // "targetSslProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "targetSslProxy": { - // "description": "Name of the TargetSslProxy resource whose ProxyHeader is to be set.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetSslProxies/{targetSslProxy}/setProxyHeader", - // "request": { - // "$ref": "TargetSslProxiesSetProxyHeaderRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetSslProxies.setSslCertificates": - -type TargetSslProxiesSetSslCertificatesCall struct { - s *Service - project string - targetSslProxy string - targetsslproxiessetsslcertificatesrequest *TargetSslProxiesSetSslCertificatesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSslCertificates: Changes SslCertificates for TargetSslProxy. -func (r *TargetSslProxiesService) SetSslCertificates(project string, targetSslProxy string, targetsslproxiessetsslcertificatesrequest *TargetSslProxiesSetSslCertificatesRequest) *TargetSslProxiesSetSslCertificatesCall { - c := &TargetSslProxiesSetSslCertificatesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetSslProxy = targetSslProxy - c.targetsslproxiessetsslcertificatesrequest = targetsslproxiessetsslcertificatesrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetSslProxiesSetSslCertificatesCall) Fields(s ...googleapi.Field) *TargetSslProxiesSetSslCertificatesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetSslProxiesSetSslCertificatesCall) Context(ctx context.Context) *TargetSslProxiesSetSslCertificatesCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetSslProxiesSetSslCertificatesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetsslproxiessetsslcertificatesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}/setSslCertificates") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetSslProxy": c.targetSslProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.setSslCertificates" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetSslProxiesSetSslCertificatesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes SslCertificates for TargetSslProxy.", - // "httpMethod": "POST", - // "id": "compute.targetSslProxies.setSslCertificates", - // "parameterOrder": [ - // "project", - // "targetSslProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "targetSslProxy": { - // "description": "Name of the TargetSslProxy resource whose SslCertificate resource is to be set.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetSslProxies/{targetSslProxy}/setSslCertificates", - // "request": { - // "$ref": "TargetSslProxiesSetSslCertificatesRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetTcpProxies.delete": - -type TargetTcpProxiesDeleteCall struct { - s *Service - project string - targetTcpProxy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetTcpProxy resource. -func (r *TargetTcpProxiesService) Delete(project string, targetTcpProxy string) *TargetTcpProxiesDeleteCall { - c := &TargetTcpProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetTcpProxy = targetTcpProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetTcpProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetTcpProxiesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetTcpProxiesDeleteCall) Context(ctx context.Context) *TargetTcpProxiesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetTcpProxiesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies/{targetTcpProxy}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetTcpProxy": c.targetTcpProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetTcpProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified TargetTcpProxy resource.", - // "httpMethod": "DELETE", - // "id": "compute.targetTcpProxies.delete", - // "parameterOrder": [ - // "project", - // "targetTcpProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "targetTcpProxy": { - // "description": "Name of the TargetTcpProxy resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetTcpProxies/{targetTcpProxy}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetTcpProxies.get": - -type TargetTcpProxiesGetCall struct { - s *Service - project string - targetTcpProxy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetTcpProxy resource. Get a list of -// available target TCP proxies by making a list() request. -func (r *TargetTcpProxiesService) Get(project string, targetTcpProxy string) *TargetTcpProxiesGetCall { - c := &TargetTcpProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetTcpProxy = targetTcpProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetTcpProxiesGetCall) Fields(s ...googleapi.Field) *TargetTcpProxiesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetTcpProxiesGetCall) IfNoneMatch(entityTag string) *TargetTcpProxiesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetTcpProxiesGetCall) Context(ctx context.Context) *TargetTcpProxiesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetTcpProxiesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies/{targetTcpProxy}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetTcpProxy": c.targetTcpProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.get" call. -// Exactly one of *TargetTcpProxy or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *TargetTcpProxy.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetTcpProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetTcpProxy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetTcpProxy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified TargetTcpProxy resource. Get a list of available target TCP proxies by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.targetTcpProxies.get", - // "parameterOrder": [ - // "project", - // "targetTcpProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "targetTcpProxy": { - // "description": "Name of the TargetTcpProxy resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetTcpProxies/{targetTcpProxy}", - // "response": { - // "$ref": "TargetTcpProxy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetTcpProxies.insert": - -type TargetTcpProxiesInsertCall struct { - s *Service - project string - targettcpproxy *TargetTcpProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetTcpProxy resource in the specified project -// using the data included in the request. -func (r *TargetTcpProxiesService) Insert(project string, targettcpproxy *TargetTcpProxy) *TargetTcpProxiesInsertCall { - c := &TargetTcpProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targettcpproxy = targettcpproxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetTcpProxiesInsertCall) Fields(s ...googleapi.Field) *TargetTcpProxiesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetTcpProxiesInsertCall) Context(ctx context.Context) *TargetTcpProxiesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetTcpProxiesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targettcpproxy) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetTcpProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a TargetTcpProxy resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.targetTcpProxies.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetTcpProxies", - // "request": { - // "$ref": "TargetTcpProxy" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetTcpProxies.list": - -type TargetTcpProxiesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of TargetTcpProxy resources available to the -// specified project. -func (r *TargetTcpProxiesService) List(project string) *TargetTcpProxiesListCall { - c := &TargetTcpProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *TargetTcpProxiesListCall) Filter(filter string) *TargetTcpProxiesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *TargetTcpProxiesListCall) MaxResults(maxResults int64) *TargetTcpProxiesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *TargetTcpProxiesListCall) OrderBy(orderBy string) *TargetTcpProxiesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *TargetTcpProxiesListCall) PageToken(pageToken string) *TargetTcpProxiesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetTcpProxiesListCall) Fields(s ...googleapi.Field) *TargetTcpProxiesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetTcpProxiesListCall) IfNoneMatch(entityTag string) *TargetTcpProxiesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetTcpProxiesListCall) Context(ctx context.Context) *TargetTcpProxiesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetTcpProxiesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.list" call. -// Exactly one of *TargetTcpProxyList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TargetTcpProxyList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetTcpProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetTcpProxyList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetTcpProxyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of TargetTcpProxy resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.targetTcpProxies.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetTcpProxies", - // "response": { - // "$ref": "TargetTcpProxyList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *TargetTcpProxiesListCall) Pages(ctx context.Context, f func(*TargetTcpProxyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.targetTcpProxies.setBackendService": - -type TargetTcpProxiesSetBackendServiceCall struct { - s *Service - project string - targetTcpProxy string - targettcpproxiessetbackendservicerequest *TargetTcpProxiesSetBackendServiceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetBackendService: Changes the BackendService for TargetTcpProxy. -func (r *TargetTcpProxiesService) SetBackendService(project string, targetTcpProxy string, targettcpproxiessetbackendservicerequest *TargetTcpProxiesSetBackendServiceRequest) *TargetTcpProxiesSetBackendServiceCall { - c := &TargetTcpProxiesSetBackendServiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetTcpProxy = targetTcpProxy - c.targettcpproxiessetbackendservicerequest = targettcpproxiessetbackendservicerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetTcpProxiesSetBackendServiceCall) Fields(s ...googleapi.Field) *TargetTcpProxiesSetBackendServiceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetTcpProxiesSetBackendServiceCall) Context(ctx context.Context) *TargetTcpProxiesSetBackendServiceCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetTcpProxiesSetBackendServiceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesSetBackendServiceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targettcpproxiessetbackendservicerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies/{targetTcpProxy}/setBackendService") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetTcpProxy": c.targetTcpProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.setBackendService" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetTcpProxiesSetBackendServiceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes the BackendService for TargetTcpProxy.", - // "httpMethod": "POST", - // "id": "compute.targetTcpProxies.setBackendService", - // "parameterOrder": [ - // "project", - // "targetTcpProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "targetTcpProxy": { - // "description": "Name of the TargetTcpProxy resource whose BackendService resource is to be set.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetTcpProxies/{targetTcpProxy}/setBackendService", - // "request": { - // "$ref": "TargetTcpProxiesSetBackendServiceRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetTcpProxies.setProxyHeader": - -type TargetTcpProxiesSetProxyHeaderCall struct { - s *Service - project string - targetTcpProxy string - targettcpproxiessetproxyheaderrequest *TargetTcpProxiesSetProxyHeaderRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetProxyHeader: Changes the ProxyHeaderType for TargetTcpProxy. -func (r *TargetTcpProxiesService) SetProxyHeader(project string, targetTcpProxy string, targettcpproxiessetproxyheaderrequest *TargetTcpProxiesSetProxyHeaderRequest) *TargetTcpProxiesSetProxyHeaderCall { - c := &TargetTcpProxiesSetProxyHeaderCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetTcpProxy = targetTcpProxy - c.targettcpproxiessetproxyheaderrequest = targettcpproxiessetproxyheaderrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetTcpProxiesSetProxyHeaderCall) Fields(s ...googleapi.Field) *TargetTcpProxiesSetProxyHeaderCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetTcpProxiesSetProxyHeaderCall) Context(ctx context.Context) *TargetTcpProxiesSetProxyHeaderCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetTcpProxiesSetProxyHeaderCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesSetProxyHeaderCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targettcpproxiessetproxyheaderrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies/{targetTcpProxy}/setProxyHeader") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetTcpProxy": c.targetTcpProxy, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.setProxyHeader" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetTcpProxiesSetProxyHeaderCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes the ProxyHeaderType for TargetTcpProxy.", - // "httpMethod": "POST", - // "id": "compute.targetTcpProxies.setProxyHeader", - // "parameterOrder": [ - // "project", - // "targetTcpProxy" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "targetTcpProxy": { - // "description": "Name of the TargetTcpProxy resource whose ProxyHeader is to be set.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/targetTcpProxies/{targetTcpProxy}/setProxyHeader", - // "request": { - // "$ref": "TargetTcpProxiesSetProxyHeaderRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetVpnGateways.aggregatedList": - -type TargetVpnGatewaysAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of target VPN gateways. -func (r *TargetVpnGatewaysService) AggregatedList(project string) *TargetVpnGatewaysAggregatedListCall { - c := &TargetVpnGatewaysAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *TargetVpnGatewaysAggregatedListCall) Filter(filter string) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *TargetVpnGatewaysAggregatedListCall) MaxResults(maxResults int64) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *TargetVpnGatewaysAggregatedListCall) OrderBy(orderBy string) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *TargetVpnGatewaysAggregatedListCall) PageToken(pageToken string) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetVpnGatewaysAggregatedListCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetVpnGatewaysAggregatedListCall) IfNoneMatch(entityTag string) *TargetVpnGatewaysAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetVpnGatewaysAggregatedListCall) Context(ctx context.Context) *TargetVpnGatewaysAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetVpnGatewaysAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetVpnGatewaysAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/targetVpnGateways") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetVpnGateways.aggregatedList" call. -// Exactly one of *TargetVpnGatewayAggregatedList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *TargetVpnGatewayAggregatedList.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetVpnGatewaysAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetVpnGatewayAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetVpnGatewayAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of target VPN gateways.", - // "httpMethod": "GET", - // "id": "compute.targetVpnGateways.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/targetVpnGateways", - // "response": { - // "$ref": "TargetVpnGatewayAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *TargetVpnGatewaysAggregatedListCall) Pages(ctx context.Context, f func(*TargetVpnGatewayAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.targetVpnGateways.delete": - -type TargetVpnGatewaysDeleteCall struct { - s *Service - project string - region string - targetVpnGateway string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified target VPN gateway. -func (r *TargetVpnGatewaysService) Delete(project string, region string, targetVpnGateway string) *TargetVpnGatewaysDeleteCall { - c := &TargetVpnGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetVpnGateway = targetVpnGateway - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetVpnGatewaysDeleteCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetVpnGatewaysDeleteCall) Context(ctx context.Context) *TargetVpnGatewaysDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetVpnGatewaysDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetVpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetVpnGateway": c.targetVpnGateway, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetVpnGateways.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetVpnGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified target VPN gateway.", - // "httpMethod": "DELETE", - // "id": "compute.targetVpnGateways.delete", - // "parameterOrder": [ - // "project", - // "region", - // "targetVpnGateway" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "targetVpnGateway": { - // "description": "Name of the target VPN gateway to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetVpnGateways.get": - -type TargetVpnGatewaysGetCall struct { - s *Service - project string - region string - targetVpnGateway string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified target VPN gateway. Get a list of -// available target VPN gateways by making a list() request. -func (r *TargetVpnGatewaysService) Get(project string, region string, targetVpnGateway string) *TargetVpnGatewaysGetCall { - c := &TargetVpnGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetVpnGateway = targetVpnGateway - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetVpnGatewaysGetCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetVpnGatewaysGetCall) IfNoneMatch(entityTag string) *TargetVpnGatewaysGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetVpnGatewaysGetCall) Context(ctx context.Context) *TargetVpnGatewaysGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetVpnGatewaysGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetVpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetVpnGateway": c.targetVpnGateway, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetVpnGateways.get" call. -// Exactly one of *TargetVpnGateway or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TargetVpnGateway.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetVpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*TargetVpnGateway, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetVpnGateway{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified target VPN gateway. Get a list of available target VPN gateways by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.targetVpnGateways.get", - // "parameterOrder": [ - // "project", - // "region", - // "targetVpnGateway" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "targetVpnGateway": { - // "description": "Name of the target VPN gateway to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}", - // "response": { - // "$ref": "TargetVpnGateway" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.targetVpnGateways.insert": - -type TargetVpnGatewaysInsertCall struct { - s *Service - project string - region string - targetvpngateway *TargetVpnGateway - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a target VPN gateway in the specified project and -// region using the data included in the request. -func (r *TargetVpnGatewaysService) Insert(project string, region string, targetvpngateway *TargetVpnGateway) *TargetVpnGatewaysInsertCall { - c := &TargetVpnGatewaysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetvpngateway = targetvpngateway - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetVpnGatewaysInsertCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetVpnGatewaysInsertCall) Context(ctx context.Context) *TargetVpnGatewaysInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetVpnGatewaysInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetVpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetvpngateway) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetVpnGateways.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *TargetVpnGatewaysInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a target VPN gateway in the specified project and region using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.targetVpnGateways.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetVpnGateways", - // "request": { - // "$ref": "TargetVpnGateway" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.targetVpnGateways.list": - -type TargetVpnGatewaysListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of target VPN gateways available to the -// specified project and region. -func (r *TargetVpnGatewaysService) List(project string, region string) *TargetVpnGatewaysListCall { - c := &TargetVpnGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *TargetVpnGatewaysListCall) Filter(filter string) *TargetVpnGatewaysListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *TargetVpnGatewaysListCall) MaxResults(maxResults int64) *TargetVpnGatewaysListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *TargetVpnGatewaysListCall) OrderBy(orderBy string) *TargetVpnGatewaysListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *TargetVpnGatewaysListCall) PageToken(pageToken string) *TargetVpnGatewaysListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *TargetVpnGatewaysListCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *TargetVpnGatewaysListCall) IfNoneMatch(entityTag string) *TargetVpnGatewaysListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *TargetVpnGatewaysListCall) Context(ctx context.Context) *TargetVpnGatewaysListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *TargetVpnGatewaysListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetVpnGatewaysListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetVpnGateways.list" call. -// Exactly one of *TargetVpnGatewayList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TargetVpnGatewayList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *TargetVpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*TargetVpnGatewayList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &TargetVpnGatewayList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of target VPN gateways available to the specified project and region.", - // "httpMethod": "GET", - // "id": "compute.targetVpnGateways.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/targetVpnGateways", - // "response": { - // "$ref": "TargetVpnGatewayList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *TargetVpnGatewaysListCall) Pages(ctx context.Context, f func(*TargetVpnGatewayList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.urlMaps.delete": - -type UrlMapsDeleteCall struct { - s *Service - project string - urlMap string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified UrlMap resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/delete -func (r *UrlMapsService) Delete(project string, urlMap string) *UrlMapsDeleteCall { - c := &UrlMapsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlMap = urlMap - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *UrlMapsDeleteCall) Fields(s ...googleapi.Field) *UrlMapsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *UrlMapsDeleteCall) Context(ctx context.Context) *UrlMapsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *UrlMapsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "urlMap": c.urlMap, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *UrlMapsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified UrlMap resource.", - // "httpMethod": "DELETE", - // "id": "compute.urlMaps.delete", - // "parameterOrder": [ - // "project", - // "urlMap" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "urlMap": { - // "description": "Name of the UrlMap resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/urlMaps/{urlMap}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.urlMaps.get": - -type UrlMapsGetCall struct { - s *Service - project string - urlMap string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified UrlMap resource. Get a list of available -// URL maps by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/get -func (r *UrlMapsService) Get(project string, urlMap string) *UrlMapsGetCall { - c := &UrlMapsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlMap = urlMap - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *UrlMapsGetCall) Fields(s ...googleapi.Field) *UrlMapsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *UrlMapsGetCall) IfNoneMatch(entityTag string) *UrlMapsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *UrlMapsGetCall) Context(ctx context.Context) *UrlMapsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *UrlMapsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "urlMap": c.urlMap, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.get" call. -// Exactly one of *UrlMap or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *UrlMap.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *UrlMapsGetCall) Do(opts ...googleapi.CallOption) (*UrlMap, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &UrlMap{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified UrlMap resource. Get a list of available URL maps by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.urlMaps.get", - // "parameterOrder": [ - // "project", - // "urlMap" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "urlMap": { - // "description": "Name of the UrlMap resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/urlMaps/{urlMap}", - // "response": { - // "$ref": "UrlMap" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.urlMaps.insert": - -type UrlMapsInsertCall struct { - s *Service - project string - urlmap *UrlMap - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a UrlMap resource in the specified project using the -// data included in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/insert -func (r *UrlMapsService) Insert(project string, urlmap *UrlMap) *UrlMapsInsertCall { - c := &UrlMapsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlmap = urlmap - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *UrlMapsInsertCall) Fields(s ...googleapi.Field) *UrlMapsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *UrlMapsInsertCall) Context(ctx context.Context) *UrlMapsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *UrlMapsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *UrlMapsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a UrlMap resource in the specified project using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.urlMaps.insert", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/urlMaps", - // "request": { - // "$ref": "UrlMap" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.urlMaps.invalidateCache": - -type UrlMapsInvalidateCacheCall struct { - s *Service - project string - urlMap string - cacheinvalidationrule *CacheInvalidationRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// InvalidateCache: Initiates a cache invalidation operation, -// invalidating the specified path, scoped to the specified UrlMap. -func (r *UrlMapsService) InvalidateCache(project string, urlMap string, cacheinvalidationrule *CacheInvalidationRule) *UrlMapsInvalidateCacheCall { - c := &UrlMapsInvalidateCacheCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlMap = urlMap - c.cacheinvalidationrule = cacheinvalidationrule - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *UrlMapsInvalidateCacheCall) Fields(s ...googleapi.Field) *UrlMapsInvalidateCacheCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *UrlMapsInvalidateCacheCall) Context(ctx context.Context) *UrlMapsInvalidateCacheCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *UrlMapsInvalidateCacheCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsInvalidateCacheCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.cacheinvalidationrule) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}/invalidateCache") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "urlMap": c.urlMap, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.invalidateCache" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *UrlMapsInvalidateCacheCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.", - // "httpMethod": "POST", - // "id": "compute.urlMaps.invalidateCache", - // "parameterOrder": [ - // "project", - // "urlMap" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "urlMap": { - // "description": "Name of the UrlMap scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/urlMaps/{urlMap}/invalidateCache", - // "request": { - // "$ref": "CacheInvalidationRule" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.urlMaps.list": - -type UrlMapsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of UrlMap resources available to the -// specified project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/list -func (r *UrlMapsService) List(project string) *UrlMapsListCall { - c := &UrlMapsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *UrlMapsListCall) Filter(filter string) *UrlMapsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *UrlMapsListCall) MaxResults(maxResults int64) *UrlMapsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *UrlMapsListCall) OrderBy(orderBy string) *UrlMapsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *UrlMapsListCall) PageToken(pageToken string) *UrlMapsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *UrlMapsListCall) Fields(s ...googleapi.Field) *UrlMapsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *UrlMapsListCall) IfNoneMatch(entityTag string) *UrlMapsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *UrlMapsListCall) Context(ctx context.Context) *UrlMapsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *UrlMapsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.list" call. -// Exactly one of *UrlMapList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *UrlMapList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *UrlMapsListCall) Do(opts ...googleapi.CallOption) (*UrlMapList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &UrlMapList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of UrlMap resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.urlMaps.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/urlMaps", - // "response": { - // "$ref": "UrlMapList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *UrlMapsListCall) Pages(ctx context.Context, f func(*UrlMapList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.urlMaps.patch": - -type UrlMapsPatchCall struct { - s *Service - project string - urlMap string - urlmap *UrlMap - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified UrlMap resource with the data included -// in the request. This method supports PATCH semantics and uses the -// JSON merge patch format and processing rules. -// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/patch -func (r *UrlMapsService) Patch(project string, urlMap string, urlmap *UrlMap) *UrlMapsPatchCall { - c := &UrlMapsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlMap = urlMap - c.urlmap = urlmap - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *UrlMapsPatchCall) Fields(s ...googleapi.Field) *UrlMapsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *UrlMapsPatchCall) Context(ctx context.Context) *UrlMapsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *UrlMapsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PATCH", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "urlMap": c.urlMap, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *UrlMapsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "httpMethod": "PATCH", - // "id": "compute.urlMaps.patch", - // "parameterOrder": [ - // "project", - // "urlMap" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "urlMap": { - // "description": "Name of the UrlMap resource to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/urlMaps/{urlMap}", - // "request": { - // "$ref": "UrlMap" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.urlMaps.update": - -type UrlMapsUpdateCall struct { - s *Service - project string - urlMap string - urlmap *UrlMap - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified UrlMap resource with the data included -// in the request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/update -func (r *UrlMapsService) Update(project string, urlMap string, urlmap *UrlMap) *UrlMapsUpdateCall { - c := &UrlMapsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlMap = urlMap - c.urlmap = urlmap - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *UrlMapsUpdateCall) Fields(s ...googleapi.Field) *UrlMapsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *UrlMapsUpdateCall) Context(ctx context.Context) *UrlMapsUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *UrlMapsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "urlMap": c.urlMap, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *UrlMapsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the specified UrlMap resource with the data included in the request.", - // "httpMethod": "PUT", - // "id": "compute.urlMaps.update", - // "parameterOrder": [ - // "project", - // "urlMap" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "urlMap": { - // "description": "Name of the UrlMap resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/urlMaps/{urlMap}", - // "request": { - // "$ref": "UrlMap" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.urlMaps.validate": - -type UrlMapsValidateCall struct { - s *Service - project string - urlMap string - urlmapsvalidaterequest *UrlMapsValidateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Validate: Runs static validation for the UrlMap. In particular, the -// tests of the provided UrlMap will be run. Calling this method does -// NOT create the UrlMap. -// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/validate -func (r *UrlMapsService) Validate(project string, urlMap string, urlmapsvalidaterequest *UrlMapsValidateRequest) *UrlMapsValidateCall { - c := &UrlMapsValidateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlMap = urlMap - c.urlmapsvalidaterequest = urlmapsvalidaterequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *UrlMapsValidateCall) Fields(s ...googleapi.Field) *UrlMapsValidateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *UrlMapsValidateCall) Context(ctx context.Context) *UrlMapsValidateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *UrlMapsValidateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsValidateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapsvalidaterequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}/validate") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "urlMap": c.urlMap, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.validate" call. -// Exactly one of *UrlMapsValidateResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *UrlMapsValidateResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *UrlMapsValidateCall) Do(opts ...googleapi.CallOption) (*UrlMapsValidateResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &UrlMapsValidateResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.", - // "httpMethod": "POST", - // "id": "compute.urlMaps.validate", - // "parameterOrder": [ - // "project", - // "urlMap" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "urlMap": { - // "description": "Name of the UrlMap resource to be validated as.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/global/urlMaps/{urlMap}/validate", - // "request": { - // "$ref": "UrlMapsValidateRequest" - // }, - // "response": { - // "$ref": "UrlMapsValidateResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.vpnTunnels.aggregatedList": - -type VpnTunnelsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of VPN tunnels. -func (r *VpnTunnelsService) AggregatedList(project string) *VpnTunnelsAggregatedListCall { - c := &VpnTunnelsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *VpnTunnelsAggregatedListCall) Filter(filter string) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *VpnTunnelsAggregatedListCall) MaxResults(maxResults int64) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *VpnTunnelsAggregatedListCall) OrderBy(orderBy string) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *VpnTunnelsAggregatedListCall) PageToken(pageToken string) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *VpnTunnelsAggregatedListCall) Fields(s ...googleapi.Field) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *VpnTunnelsAggregatedListCall) IfNoneMatch(entityTag string) *VpnTunnelsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *VpnTunnelsAggregatedListCall) Context(ctx context.Context) *VpnTunnelsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *VpnTunnelsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/vpnTunnels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.aggregatedList" call. -// Exactly one of *VpnTunnelAggregatedList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *VpnTunnelAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *VpnTunnelsAggregatedListCall) Do(opts ...googleapi.CallOption) (*VpnTunnelAggregatedList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &VpnTunnelAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves an aggregated list of VPN tunnels.", - // "httpMethod": "GET", - // "id": "compute.vpnTunnels.aggregatedList", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/aggregated/vpnTunnels", - // "response": { - // "$ref": "VpnTunnelAggregatedList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *VpnTunnelsAggregatedListCall) Pages(ctx context.Context, f func(*VpnTunnelAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.vpnTunnels.delete": - -type VpnTunnelsDeleteCall struct { - s *Service - project string - region string - vpnTunnel string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified VpnTunnel resource. -func (r *VpnTunnelsService) Delete(project string, region string, vpnTunnel string) *VpnTunnelsDeleteCall { - c := &VpnTunnelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.vpnTunnel = vpnTunnel - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *VpnTunnelsDeleteCall) Fields(s ...googleapi.Field) *VpnTunnelsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *VpnTunnelsDeleteCall) Context(ctx context.Context) *VpnTunnelsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *VpnTunnelsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels/{vpnTunnel}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "vpnTunnel": c.vpnTunnel, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *VpnTunnelsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified VpnTunnel resource.", - // "httpMethod": "DELETE", - // "id": "compute.vpnTunnels.delete", - // "parameterOrder": [ - // "project", - // "region", - // "vpnTunnel" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "vpnTunnel": { - // "description": "Name of the VpnTunnel resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/vpnTunnels/{vpnTunnel}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.vpnTunnels.get": - -type VpnTunnelsGetCall struct { - s *Service - project string - region string - vpnTunnel string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified VpnTunnel resource. Get a list of -// available VPN tunnels by making a list() request. -func (r *VpnTunnelsService) Get(project string, region string, vpnTunnel string) *VpnTunnelsGetCall { - c := &VpnTunnelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.vpnTunnel = vpnTunnel - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *VpnTunnelsGetCall) Fields(s ...googleapi.Field) *VpnTunnelsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *VpnTunnelsGetCall) IfNoneMatch(entityTag string) *VpnTunnelsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *VpnTunnelsGetCall) Context(ctx context.Context) *VpnTunnelsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *VpnTunnelsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels/{vpnTunnel}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "vpnTunnel": c.vpnTunnel, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.get" call. -// Exactly one of *VpnTunnel or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *VpnTunnel.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *VpnTunnelsGetCall) Do(opts ...googleapi.CallOption) (*VpnTunnel, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &VpnTunnel{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified VpnTunnel resource. Get a list of available VPN tunnels by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.vpnTunnels.get", - // "parameterOrder": [ - // "project", - // "region", - // "vpnTunnel" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "vpnTunnel": { - // "description": "Name of the VpnTunnel resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/vpnTunnels/{vpnTunnel}", - // "response": { - // "$ref": "VpnTunnel" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.vpnTunnels.insert": - -type VpnTunnelsInsertCall struct { - s *Service - project string - region string - vpntunnel *VpnTunnel - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a VpnTunnel resource in the specified project and -// region using the data included in the request. -func (r *VpnTunnelsService) Insert(project string, region string, vpntunnel *VpnTunnel) *VpnTunnelsInsertCall { - c := &VpnTunnelsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.vpntunnel = vpntunnel - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *VpnTunnelsInsertCall) Fields(s ...googleapi.Field) *VpnTunnelsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *VpnTunnelsInsertCall) Context(ctx context.Context) *VpnTunnelsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *VpnTunnelsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.vpntunnel) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *VpnTunnelsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a VpnTunnel resource in the specified project and region using the data included in the request.", - // "httpMethod": "POST", - // "id": "compute.vpnTunnels.insert", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/vpnTunnels", - // "request": { - // "$ref": "VpnTunnel" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.vpnTunnels.list": - -type VpnTunnelsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of VpnTunnel resources contained in the -// specified project and region. -func (r *VpnTunnelsService) List(project string, region string) *VpnTunnelsListCall { - c := &VpnTunnelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *VpnTunnelsListCall) Filter(filter string) *VpnTunnelsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *VpnTunnelsListCall) MaxResults(maxResults int64) *VpnTunnelsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *VpnTunnelsListCall) OrderBy(orderBy string) *VpnTunnelsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *VpnTunnelsListCall) PageToken(pageToken string) *VpnTunnelsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *VpnTunnelsListCall) Fields(s ...googleapi.Field) *VpnTunnelsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *VpnTunnelsListCall) IfNoneMatch(entityTag string) *VpnTunnelsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *VpnTunnelsListCall) Context(ctx context.Context) *VpnTunnelsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *VpnTunnelsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.list" call. -// Exactly one of *VpnTunnelList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *VpnTunnelList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *VpnTunnelsListCall) Do(opts ...googleapi.CallOption) (*VpnTunnelList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &VpnTunnelList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of VpnTunnel resources contained in the specified project and region.", - // "httpMethod": "GET", - // "id": "compute.vpnTunnels.list", - // "parameterOrder": [ - // "project", - // "region" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/regions/{region}/vpnTunnels", - // "response": { - // "$ref": "VpnTunnelList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *VpnTunnelsListCall) Pages(ctx context.Context, f func(*VpnTunnelList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.zoneOperations.delete": - -type ZoneOperationsDeleteCall struct { - s *Service - project string - zone string - operation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified zone-specific Operations resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/zoneOperations/delete -func (r *ZoneOperationsService) Delete(project string, zone string, operation string) *ZoneOperationsDeleteCall { - c := &ZoneOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.operation = operation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ZoneOperationsDeleteCall) Fields(s ...googleapi.Field) *ZoneOperationsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ZoneOperationsDeleteCall) Context(ctx context.Context) *ZoneOperationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ZoneOperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "operation": c.operation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneOperations.delete" call. -func (c *ZoneOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return err - } - return nil - // { - // "description": "Deletes the specified zone-specific Operations resource.", - // "httpMethod": "DELETE", - // "id": "compute.zoneOperations.delete", - // "parameterOrder": [ - // "project", - // "zone", - // "operation" - // ], - // "parameters": { - // "operation": { - // "description": "Name of the Operations resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/operations/{operation}", - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.zoneOperations.get": - -type ZoneOperationsGetCall struct { - s *Service - project string - zone string - operation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves the specified zone-specific Operations resource. -// For details, see https://cloud.google.com/compute/docs/reference/latest/zoneOperations/get -func (r *ZoneOperationsService) Get(project string, zone string, operation string) *ZoneOperationsGetCall { - c := &ZoneOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.operation = operation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ZoneOperationsGetCall) Fields(s ...googleapi.Field) *ZoneOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ZoneOperationsGetCall) IfNoneMatch(entityTag string) *ZoneOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ZoneOperationsGetCall) Context(ctx context.Context) *ZoneOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ZoneOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "operation": c.operation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneOperations.get" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ZoneOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the specified zone-specific Operations resource.", - // "httpMethod": "GET", - // "id": "compute.zoneOperations.get", - // "parameterOrder": [ - // "project", - // "zone", - // "operation" - // ], - // "parameters": { - // "operation": { - // "description": "Name of the Operations resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/operations/{operation}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.zoneOperations.list": - -type ZoneOperationsListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of Operation resources contained within the -// specified zone. -// For details, see https://cloud.google.com/compute/docs/reference/latest/zoneOperations/list -func (r *ZoneOperationsService) List(project string, zone string) *ZoneOperationsListCall { - c := &ZoneOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *ZoneOperationsListCall) Filter(filter string) *ZoneOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *ZoneOperationsListCall) MaxResults(maxResults int64) *ZoneOperationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *ZoneOperationsListCall) OrderBy(orderBy string) *ZoneOperationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *ZoneOperationsListCall) PageToken(pageToken string) *ZoneOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ZoneOperationsListCall) Fields(s ...googleapi.Field) *ZoneOperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ZoneOperationsListCall) IfNoneMatch(entityTag string) *ZoneOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ZoneOperationsListCall) Context(ctx context.Context) *ZoneOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ZoneOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/operations") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneOperations.list" call. -// Exactly one of *OperationList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *OperationList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ZoneOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &OperationList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves a list of Operation resources contained within the specified zone.", - // "httpMethod": "GET", - // "id": "compute.zoneOperations.list", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}/operations", - // "response": { - // "$ref": "OperationList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ZoneOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.zones.get": - -type ZonesGetCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Zone resource. Get a list of available -// zones by making a list() request. -// For details, see https://cloud.google.com/compute/docs/reference/latest/zones/get -func (r *ZonesService) Get(project string, zone string) *ZonesGetCall { - c := &ZonesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ZonesGetCall) Fields(s ...googleapi.Field) *ZonesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ZonesGetCall) IfNoneMatch(entityTag string) *ZonesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ZonesGetCall) Context(ctx context.Context) *ZonesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ZonesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZonesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zones.get" call. -// Exactly one of *Zone or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Zone.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ZonesGetCall) Do(opts ...googleapi.CallOption) (*Zone, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Zone{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified Zone resource. Get a list of available zones by making a list() request.", - // "httpMethod": "GET", - // "id": "compute.zones.get", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones/{zone}", - // "response": { - // "$ref": "Zone" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.zones.list": - -type ZonesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of Zone resources available to the specified -// project. -// For details, see https://cloud.google.com/compute/docs/reference/latest/zones/list -func (r *ZonesService) List(project string) *ZonesListCall { - c := &ZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": Sets a filter -// {expression} for filtering listed resources. Your {expression} must -// be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only -// atomic field types are supported (string, number, boolean). The -// comparison_string must be either eq (equals) or ne (not equals). The -// literal_string is the string value to filter to. The literal value -// must be valid for the type of field you are filtering by (string, -// number, boolean). For string fields, the literal value is interpreted -// as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on -// instances that have set the scheduling.automaticRestart field to -// true. Use filtering on nested fields to take advantage of labels to -// organize and search for results based on label values. -// -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example, (scheduling.automaticRestart eq -// true) (zone eq us-central1-f). Multiple expressions are treated as -// AND expressions, meaning that resources must match all expressions to -// pass the filters. -func (c *ZonesListCall) Filter(filter string) *ZonesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than maxResults, Compute Engine returns a -// nextPageToken that can be used to get the next page of results in -// subsequent list requests. Acceptable values are 0 to 500, inclusive. -// (Default: 500) -func (c *ZonesListCall) MaxResults(maxResults int64) *ZonesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. -// -// You can also sort results in descending order based on the creation -// timestamp using orderBy="creationTimestamp desc". This sorts results -// based on the creationTimestamp field in reverse chronological order -// (newest result first). Use this to sort resources like operations so -// that the newest operation is returned first. -// -// Currently, only sorting by name or creationTimestamp desc is -// supported. -func (c *ZonesListCall) OrderBy(orderBy string) *ZonesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set pageToken to the nextPageToken returned by a -// previous list request to get the next page of results. -func (c *ZonesListCall) PageToken(pageToken string) *ZonesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ZonesListCall) Fields(s ...googleapi.Field) *ZonesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ZonesListCall) IfNoneMatch(entityTag string) *ZonesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ZonesListCall) Context(ctx context.Context) *ZonesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ZonesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZonesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zones.list" call. -// Exactly one of *ZoneList or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *ZoneList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ZonesListCall) Do(opts ...googleapi.CallOption) (*ZoneList, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ZoneList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the list of Zone resources available to the specified project.", - // "httpMethod": "GET", - // "id": "compute.zones.list", - // "parameterOrder": [ - // "project" - // ], - // "parameters": { - // "filter": { - // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{project}/zones", - // "response": { - // "$ref": "ZoneList" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ZonesListCall) Pages(ctx context.Context, f func(*ZoneList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} diff --git a/vendor/google.golang.org/api/container/v1/container-api.json b/vendor/google.golang.org/api/container/v1/container-api.json deleted file mode 100644 index e9151bb69..000000000 --- a/vendor/google.golang.org/api/container/v1/container-api.json +++ /dev/null @@ -1,2367 +0,0 @@ -{ - "basePath": "", - "ownerDomain": "google.com", - "name": "container", - "batchPath": "batch", - "revision": "20170720", - "documentationLink": "https://cloud.google.com/container-engine/", - "id": "container:v1", - "title": "Google Container Engine API", - "ownerName": "Google", - "discoveryVersion": "v1", - "resources": { - "projects": { - "resources": { - "zones": { - "methods": { - "getServerconfig": { - "flatPath": "v1/projects/{projectId}/zones/{zone}/serverconfig", - "path": "v1/projects/{projectId}/zones/{zone}/serverconfig", - "id": "container.projects.zones.getServerconfig", - "description": "Returns configuration info about the Container Engine service.", - "httpMethod": "GET", - "parameterOrder": [ - "projectId", - "zone" - ], - "response": { - "$ref": "ServerConfig" - }, - "parameters": { - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available)\nto return operations for.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "clusters": { - "methods": { - "locations": { - "request": { - "$ref": "SetLocationsRequest" - }, - "description": "Sets the locations of a specific cluster.", - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "description": "The name of the cluster to upgrade.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations", - "id": "container.projects.zones.clusters.locations" - }, - "update": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "httpMethod": "PUT", - "parameters": { - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "location": "path", - "description": "The name of the cluster to upgrade.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", - "id": "container.projects.zones.clusters.update", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", - "description": "Updates the settings of a specific cluster.", - "request": { - "$ref": "UpdateClusterRequest" - } - }, - "monitoring": { - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/monitoring", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/monitoring", - "id": "container.projects.zones.clusters.monitoring", - "description": "Sets the monitoring service of a specific cluster.", - "request": { - "$ref": "SetMonitoringServiceRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "description": "The name of the cluster to upgrade.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "master": { - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "location": "path", - "description": "The name of the cluster to upgrade.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/master", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/master", - "id": "container.projects.zones.clusters.master", - "description": "Updates the master of a specific cluster.", - "request": { - "$ref": "UpdateMasterRequest" - } - }, - "setMasterAuth": { - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth", - "id": "container.projects.zones.clusters.setMasterAuth", - "request": { - "$ref": "SetMasterAuthRequest" - }, - "description": "Used to set master auth materials. Currently supports :-\nChanging the admin password of a specific cluster.\nThis can be either via password generation or explicitly set the password.", - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "location": "path", - "description": "The name of the cluster to upgrade.", - "type": "string", - "required": true - } - } - }, - "logging": { - "request": { - "$ref": "SetLoggingServiceRequest" - }, - "description": "Sets the logging service of a specific cluster.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true, - "location": "path" - }, - "clusterId": { - "description": "The name of the cluster to upgrade.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/logging", - "id": "container.projects.zones.clusters.logging", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/logging" - }, - "list": { - "response": { - "$ref": "ListClustersResponse" - }, - "parameterOrder": [ - "projectId", - "zone" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides, or \"-\" for all zones.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters", - "id": "container.projects.zones.clusters.list", - "path": "v1/projects/{projectId}/zones/{zone}/clusters", - "description": "Lists all clusters owned by a project in either the specified zone or all\nzones." - }, - "create": { - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters", - "path": "v1/projects/{projectId}/zones/{zone}/clusters", - "id": "container.projects.zones.clusters.create", - "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe cluster creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range is being used by the cluster.", - "request": { - "$ref": "CreateClusterRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "zone" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "resourceLabels": { - "description": "Sets labels on a cluster.", - "request": { - "$ref": "SetLabelsRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "description": "The name of the cluster.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels", - "id": "container.projects.zones.clusters.resourceLabels" - }, - "completeIpRotation": { - "request": { - "$ref": "CompleteIPRotationRequest" - }, - "description": "Completes master IP rotation.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", - "type": "string", - "required": true - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true, - "location": "path" - }, - "clusterId": { - "description": "The name of the cluster.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation", - "id": "container.projects.zones.clusters.completeIpRotation", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation" - }, - "get": { - "description": "Gets the details of a specific cluster.", - "response": { - "$ref": "Cluster" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "location": "path", - "description": "The name of the cluster to retrieve.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", - "id": "container.projects.zones.clusters.get", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}" - }, - "legacyAbac": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "httpMethod": "POST", - "parameters": { - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true, - "location": "path" - }, - "clusterId": { - "description": "The name of the cluster to update.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac", - "id": "container.projects.zones.clusters.legacyAbac", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac", - "description": "Enables or disables the ABAC authorization mechanism on a cluster.", - "request": { - "$ref": "SetLegacyAbacRequest" - } - }, - "setNetworkPolicy": { - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy", - "id": "container.projects.zones.clusters.setNetworkPolicy", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy", - "request": { - "$ref": "SetNetworkPolicyRequest" - }, - "description": "Enables/Disables Network Policy for a cluster.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", - "type": "string", - "required": true - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true, - "location": "path" - }, - "clusterId": { - "location": "path", - "description": "The name of the cluster.", - "type": "string", - "required": true - } - } - }, - "startIpRotation": { - "request": { - "$ref": "StartIPRotationRequest" - }, - "description": "Start master IP rotation.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", - "type": "string", - "required": true - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "location": "path", - "description": "The name of the cluster.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation", - "id": "container.projects.zones.clusters.startIpRotation", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation" - }, - "addons": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "httpMethod": "POST", - "parameters": { - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "description": "The name of the cluster to upgrade.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/addons", - "id": "container.projects.zones.clusters.addons", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/addons", - "description": "Sets the addons of a specific cluster.", - "request": { - "$ref": "SetAddonsConfigRequest" - } - }, - "delete": { - "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster\n(e.g. load balancer resources) will not be deleted if they weren't present\nat the initial create time.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true, - "location": "path" - }, - "clusterId": { - "location": "path", - "description": "The name of the cluster to delete.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", - "id": "container.projects.zones.clusters.delete", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}" - } - }, - "resources": { - "nodePools": { - "methods": { - "list": { - "description": "Lists the node pools for a cluster.", - "httpMethod": "GET", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "response": { - "$ref": "ListNodePoolsResponse" - }, - "parameters": { - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", - "type": "string", - "required": true - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "location": "path", - "description": "The name of the cluster.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", - "id": "container.projects.zones.clusters.nodePools.list" - }, - "rollback": { - "description": "Roll back the previously Aborted or Failed NodePool upgrade.\nThis will be an no-op if the last upgrade successfully completed.", - "request": { - "$ref": "RollbackNodePoolUpgradeRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "zone", - "clusterId", - "nodePoolId" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "description": "The name of the cluster to rollback.", - "type": "string", - "required": true, - "location": "path" - }, - "nodePoolId": { - "description": "The name of the node pool to rollback.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback", - "id": "container.projects.zones.clusters.nodePools.rollback" - }, - "create": { - "description": "Creates a node pool for a cluster.", - "request": { - "$ref": "CreateNodePoolRequest" - }, - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "httpMethod": "POST", - "parameters": { - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", - "type": "string", - "required": true - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "location": "path", - "description": "The name of the cluster.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", - "id": "container.projects.zones.clusters.nodePools.create", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools" - }, - "autoscaling": { - "request": { - "$ref": "SetNodePoolAutoscalingRequest" - }, - "description": "Sets the autoscaling settings of a specific node pool.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId", - "nodePoolId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "nodePoolId": { - "description": "The name of the node pool to upgrade.", - "type": "string", - "required": true, - "location": "path" - }, - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "description": "The name of the cluster to upgrade.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling", - "id": "container.projects.zones.clusters.nodePools.autoscaling", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling" - }, - "get": { - "response": { - "$ref": "NodePool" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId", - "nodePoolId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true, - "location": "path" - }, - "clusterId": { - "description": "The name of the cluster.", - "type": "string", - "required": true, - "location": "path" - }, - "nodePoolId": { - "location": "path", - "description": "The name of the node pool.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", - "id": "container.projects.zones.clusters.nodePools.get", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", - "description": "Retrieves the node pool requested." - }, - "update": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId", - "nodePoolId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "location": "path", - "description": "The name of the cluster to upgrade.", - "type": "string", - "required": true - }, - "nodePoolId": { - "location": "path", - "description": "The name of the node pool to upgrade.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update", - "id": "container.projects.zones.clusters.nodePools.update", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update", - "request": { - "$ref": "UpdateNodePoolRequest" - }, - "description": "Updates the version and/or image type of a specific node pool." - }, - "delete": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId", - "nodePoolId" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "nodePoolId": { - "description": "The name of the node pool to delete.", - "type": "string", - "required": true, - "location": "path" - }, - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", - "type": "string", - "required": true - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "location": "path", - "description": "The name of the cluster.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", - "id": "container.projects.zones.clusters.nodePools.delete", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", - "description": "Deletes a node pool from a cluster." - }, - "setManagement": { - "description": "Sets the NodeManagement options for a node pool.", - "request": { - "$ref": "SetNodePoolManagementRequest" - }, - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId", - "nodePoolId" - ], - "httpMethod": "POST", - "parameters": { - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true, - "location": "path" - }, - "clusterId": { - "description": "The name of the cluster to update.", - "type": "string", - "required": true, - "location": "path" - }, - "nodePoolId": { - "description": "The name of the node pool to update.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement", - "id": "container.projects.zones.clusters.nodePools.setManagement", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement" - }, - "setSize": { - "request": { - "$ref": "SetNodePoolSizeRequest" - }, - "description": "Sets the size of a specific node pool.", - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "zone", - "clusterId", - "nodePoolId" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "nodePoolId": { - "location": "path", - "description": "The name of the node pool to update.", - "type": "string", - "required": true - }, - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true, - "location": "path" - }, - "clusterId": { - "location": "path", - "description": "The name of the cluster to update.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setSize", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setSize", - "id": "container.projects.zones.clusters.nodePools.setSize" - } - } - } - } - }, - "operations": { - "methods": { - "cancel": { - "description": "Cancels the specified operation.", - "request": { - "$ref": "CancelOperationRequest" - }, - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "projectId", - "zone", - "operationId" - ], - "httpMethod": "POST", - "parameters": { - "operationId": { - "description": "The server-assigned `name` of the operation.", - "type": "string", - "required": true, - "location": "path" - }, - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the operation resides.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel", - "id": "container.projects.zones.operations.cancel", - "path": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel" - }, - "get": { - "description": "Gets the specified operation.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "operationId" - ], - "httpMethod": "GET", - "parameters": { - "operationId": { - "location": "path", - "description": "The server-assigned `name` of the operation.", - "type": "string", - "required": true - }, - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}", - "id": "container.projects.zones.operations.get", - "path": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}" - }, - "list": { - "httpMethod": "GET", - "parameterOrder": [ - "projectId", - "zone" - ], - "response": { - "$ref": "ListOperationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available)\nto return operations for, or `-` for all zones.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/operations", - "path": "v1/projects/{projectId}/zones/{zone}/operations", - "id": "container.projects.zones.operations.list", - "description": "Lists all operations in a project in a specific zone or all zones." - } - } - } - } - } - } - } - }, - "parameters": { - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "$.xgafv": { - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string" - }, - "alt": { - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query", - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], - "type": "string" - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" - }, - "key": { - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "type": "string", - "location": "query" - }, - "quotaUser": { - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "type": "string", - "location": "query" - } - }, - "schemas": { - "SetLocationsRequest": { - "description": "SetLocationsRequest sets the locations of the cluster.", - "type": "object", - "properties": { - "locations": { - "description": "The desired list of Google Compute Engine\n[locations](/compute/docs/zones#available) in which the cluster's nodes\nshould be located. Changing the locations a cluster is in will result\nin nodes being either created or removed from the cluster, depending on\nwhether locations are being added or removed.\n\nThis list must always include the cluster's primary zone.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "SetLocationsRequest" - }, - "RollbackNodePoolUpgradeRequest": { - "description": "RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed\nNodePool upgrade. This will be an no-op if the last upgrade successfully\ncompleted.", - "type": "object", - "properties": {}, - "id": "RollbackNodePoolUpgradeRequest" - }, - "SetNodePoolSizeRequest": { - "description": "SetNodePoolSizeRequest sets the size a node\npool.", - "type": "object", - "properties": { - "nodeCount": { - "format": "int32", - "description": "The desired node count for the pool.", - "type": "integer" - } - }, - "id": "SetNodePoolSizeRequest" - }, - "UpdateClusterRequest": { - "description": "UpdateClusterRequest updates the settings of a cluster.", - "type": "object", - "properties": { - "update": { - "description": "A description of the update.", - "$ref": "ClusterUpdate" - } - }, - "id": "UpdateClusterRequest" - }, - "NetworkPolicy": { - "description": "Configuration options for the NetworkPolicy feature.\nhttps://kubernetes.io/docs/concepts/services-networking/networkpolicies/", - "type": "object", - "properties": { - "enabled": { - "description": "Whether network policy is enabled on the cluster.", - "type": "boolean" - }, - "provider": { - "description": "The selected network policy provider.", - "type": "string", - "enumDescriptions": [ - "Not set", - "Tigera (Calico Felix)." - ], - "enum": [ - "PROVIDER_UNSPECIFIED", - "CALICO" - ] - } - }, - "id": "NetworkPolicy" - }, - "UpdateMasterRequest": { - "description": "UpdateMasterRequest updates the master of the cluster.", - "type": "object", - "properties": { - "masterVersion": { - "description": "The Kubernetes version to change the master to. The only valid value is the\nlatest supported version. Use \"-\" to have the server automatically select\nthe latest version.", - "type": "string" - } - }, - "id": "UpdateMasterRequest" - }, - "Cluster": { - "description": "A Google Container Engine cluster.", - "type": "object", - "properties": { - "description": { - "description": "An optional description of this cluster.", - "type": "string" - }, - "currentNodeCount": { - "format": "int32", - "description": "[Output only] The number of nodes currently in the cluster.", - "type": "integer" - }, - "monitoringService": { - "description": "The monitoring service the cluster should use to write metrics.\nCurrently available options:\n\n* `monitoring.googleapis.com` - the Google Cloud Monitoring service.\n* `none` - no metrics will be exported from the cluster.\n* if left as an empty string, `monitoring.googleapis.com` will be used.", - "type": "string" - }, - "network": { - "description": "The name of the Google Compute Engine\n[network](/compute/docs/networks-and-firewalls#networks) to which the\ncluster is connected. If left unspecified, the `default` network\nwill be used.", - "type": "string" - }, - "labelFingerprint": { - "description": "The fingerprint of the set of labels for this cluster.", - "type": "string" - }, - "zone": { - "description": "[Output only] The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string" - }, - "loggingService": { - "description": "The logging service the cluster should use to write logs.\nCurrently available options:\n\n* `logging.googleapis.com` - the Google Cloud Logging service.\n* `none` - no logs will be exported from the cluster.\n* if left as an empty string,`logging.googleapis.com` will be used.", - "type": "string" - }, - "nodeIpv4CidrSize": { - "format": "int32", - "description": "[Output only] The size of the address space on each node for hosting\ncontainers. This is provisioned from within the `container_ipv4_cidr`\nrange.", - "type": "integer" - }, - "expireTime": { - "description": "[Output only] The time the cluster will be automatically\ndeleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", - "type": "string" - }, - "masterAuthorizedNetworksConfig": { - "$ref": "MasterAuthorizedNetworksConfig", - "description": "Master authorized networks is a Beta feature.\nThe configuration options for master authorized networks feature." - }, - "statusMessage": { - "description": "[Output only] Additional information about the current status of this\ncluster, if available.", - "type": "string" - }, - "masterAuth": { - "$ref": "MasterAuth", - "description": "The authentication information for accessing the master endpoint." - }, - "currentMasterVersion": { - "description": "[Output only] The current software version of the master endpoint.", - "type": "string" - }, - "nodeConfig": { - "$ref": "NodeConfig", - "description": "Parameters used in creating the cluster's nodes.\nSee `nodeConfig` for the description of its properties.\nFor requests, this field should only be used in lieu of a\n\"node_pool\" object, since this configuration (along with the\n\"initial_node_count\") will be used to create a \"NodePool\" object with an\nauto-generated name. Do not use this and a node_pool at the same time.\nFor responses, this field will be populated with the node configuration of\nthe first node pool.\n\nIf unspecified, the defaults are used." - }, - "addonsConfig": { - "description": "Configurations for the various addons available to run in the cluster.", - "$ref": "AddonsConfig" - }, - "status": { - "enumDescriptions": [ - "Not set.", - "The PROVISIONING state indicates the cluster is being created.", - "The RUNNING state indicates the cluster has been created and is fully\nusable.", - "The RECONCILING state indicates that some work is actively being done on\nthe cluster, such as upgrading the master or node software. Details can\nbe found in the `statusMessage` field.", - "The STOPPING state indicates the cluster is being deleted.", - "The ERROR state indicates the cluster may be unusable. Details\ncan be found in the `statusMessage` field." - ], - "enum": [ - "STATUS_UNSPECIFIED", - "PROVISIONING", - "RUNNING", - "RECONCILING", - "STOPPING", - "ERROR" - ], - "description": "[Output only] The current status of this cluster.", - "type": "string" - }, - "subnetwork": { - "description": "The name of the Google Compute Engine\n[subnetwork](/compute/docs/subnetworks) to which the\ncluster is connected.", - "type": "string" - }, - "currentNodeVersion": { - "description": "[Output only] The current version of the node software components.\nIf they are currently at multiple versions because they're in the process\nof being upgraded, this reflects the minimum version of all nodes.", - "type": "string" - }, - "resourceLabels": { - "description": "The resource labels for the cluster to use to annotate any related\nGoogle Compute Engine resources.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "name": { - "description": "The name of this cluster. The name must be unique within this project\nand zone, and can be up to 40 characters with the following restrictions:\n\n* Lowercase letters, numbers, and hyphens only.\n* Must start with a letter.\n* Must end with a number or a letter.", - "type": "string" - }, - "initialClusterVersion": { - "description": "The initial Kubernetes version for this cluster. Valid versions are those\nfound in validMasterVersions returned by getServerConfig. The version can\nbe upgraded over time; such upgrades are reflected in\ncurrentMasterVersion and currentNodeVersion.", - "type": "string" - }, - "ipAllocationPolicy": { - "$ref": "IPAllocationPolicy", - "description": "Configuration for cluster IP allocation." - }, - "endpoint": { - "description": "[Output only] The IP address of this cluster's master endpoint.\nThe endpoint can be accessed from the internet at\n`https://username:password@endpoint/`.\n\nSee the `masterAuth` property of this resource for username and\npassword information.", - "type": "string" - }, - "legacyAbac": { - "description": "Configuration for the legacy ABAC authorization mode.", - "$ref": "LegacyAbac" - }, - "createTime": { - "description": "[Output only] The time the cluster was created, in\n[RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", - "type": "string" - }, - "clusterIpv4Cidr": { - "description": "The IP address range of the container pods in this cluster, in\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`). Leave blank to have\none automatically chosen or specify a `/14` block in `10.0.0.0/8`.", - "type": "string" - }, - "initialNodeCount": { - "format": "int32", - "description": "The number of nodes to create in this cluster. You must ensure that your\nCompute Engine \u003ca href=\"/compute/docs/resource-quotas\"\u003eresource quota\u003c/a\u003e\nis sufficient for this number of instances. You must also have available\nfirewall and routes quota.\nFor requests, this field should only be used in lieu of a\n\"node_pool\" object, since this configuration (along with the\n\"node_config\") will be used to create a \"NodePool\" object with an\nauto-generated name. Do not use this and a node_pool at the same time.", - "type": "integer" - }, - "selfLink": { - "description": "[Output only] Server-defined URL for the resource.", - "type": "string" - }, - "locations": { - "description": "The list of Google Compute Engine\n[locations](/compute/docs/zones#available) in which the cluster's nodes\nshould be located.", - "items": { - "type": "string" - }, - "type": "array" - }, - "nodePools": { - "description": "The node pools associated with this cluster.\nThis field should not be set if \"node_config\" or \"initial_node_count\" are\nspecified.", - "items": { - "$ref": "NodePool" - }, - "type": "array" - }, - "instanceGroupUrls": { - "description": "[Output only] The resource URLs of [instance\ngroups](/compute/docs/instance-groups/) associated with this\ncluster.", - "items": { - "type": "string" - }, - "type": "array" - }, - "servicesIpv4Cidr": { - "description": "[Output only] The IP address range of the Kubernetes services in\nthis cluster, in\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `1.2.3.4/29`). Service addresses are\ntypically put in the last `/16` from the container CIDR.", - "type": "string" - }, - "networkPolicy": { - "$ref": "NetworkPolicy", - "description": "Configuration options for the NetworkPolicy feature." - }, - "enableKubernetesAlpha": { - "description": "Kubernetes alpha features are enabled on this cluster. This includes alpha\nAPI groups (e.g. v1alpha1) and features that may not be production ready in\nthe kubernetes version of the master and nodes.\nThe cluster has no SLA for uptime and master/node upgrades are disabled.\nAlpha enabled clusters are automatically deleted thirty days after\ncreation.", - "type": "boolean" - } - }, - "id": "Cluster" - }, - "CreateNodePoolRequest": { - "description": "CreateNodePoolRequest creates a node pool for a cluster.", - "type": "object", - "properties": { - "nodePool": { - "description": "The node pool to create.", - "$ref": "NodePool" - } - }, - "id": "CreateNodePoolRequest" - }, - "ListOperationsResponse": { - "description": "ListOperationsResponse is the result of ListOperationsRequest.", - "type": "object", - "properties": { - "operations": { - "description": "A list of operations in the project in the specified zone.", - "items": { - "$ref": "Operation" - }, - "type": "array" - }, - "missingZones": { - "description": "If any zones are listed here, the list of operations returned\nmay be missing the operations from those zones.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "ListOperationsResponse" - }, - "SetMonitoringServiceRequest": { - "description": "SetMonitoringServiceRequest sets the monitoring service of a cluster.", - "type": "object", - "properties": { - "monitoringService": { - "description": "The monitoring service the cluster should use to write metrics.\nCurrently available options:\n\n* \"monitoring.googleapis.com\" - the Google Cloud Monitoring service\n* \"none\" - no metrics will be exported from the cluster", - "type": "string" - } - }, - "id": "SetMonitoringServiceRequest" - }, - "CidrBlock": { - "description": "CidrBlock contains an optional name and one CIDR block.", - "type": "object", - "properties": { - "displayName": { - "description": "display_name is an optional field for users to identify CIDR blocks.", - "type": "string" - }, - "cidrBlock": { - "description": "cidr_block must be specified in CIDR notation.", - "type": "string" - } - }, - "id": "CidrBlock" - }, - "ServerConfig": { - "description": "Container Engine service configuration.", - "type": "object", - "properties": { - "validMasterVersions": { - "description": "List of valid master versions.", - "items": { - "type": "string" - }, - "type": "array" - }, - "defaultImageType": { - "description": "Default image type.", - "type": "string" - }, - "defaultClusterVersion": { - "description": "Version of Kubernetes the service deploys by default.", - "type": "string" - }, - "validImageTypes": { - "description": "List of valid image types.", - "items": { - "type": "string" - }, - "type": "array" - }, - "validNodeVersions": { - "description": "List of valid node upgrade target versions.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "ServerConfig" - }, - "MasterAuth": { - "description": "The authentication information for accessing the master endpoint.\nAuthentication can be done using HTTP basic auth or using client\ncertificates.", - "type": "object", - "properties": { - "clientKey": { - "description": "[Output only] Base64-encoded private key used by clients to authenticate\nto the cluster endpoint.", - "type": "string" - }, - "clusterCaCertificate": { - "description": "[Output only] Base64-encoded public certificate that is the root of\ntrust for the cluster.", - "type": "string" - }, - "clientCertificate": { - "description": "[Output only] Base64-encoded public certificate used by clients to\nauthenticate to the cluster endpoint.", - "type": "string" - }, - "username": { - "description": "The username to use for HTTP basic authentication to the master endpoint.\nFor clusters v1.6.0 and later, you can disable basic authentication by\nproviding an empty username.", - "type": "string" - }, - "password": { - "description": "The password to use for HTTP basic authentication to the master endpoint.\nBecause the master endpoint is open to the Internet, you should create a\nstrong password. If a password is provided for cluster creation, username\nmust be non-empty.", - "type": "string" - }, - "clientCertificateConfig": { - "description": "Configuration for client certificate authentication on the cluster. If no\nconfiguration is specified, a client certificate is issued.", - "$ref": "ClientCertificateConfig" - } - }, - "id": "MasterAuth" - }, - "NodeConfig": { - "description": "Parameters that describe the nodes in a cluster.", - "type": "object", - "properties": { - "imageType": { - "description": "The image type to use for this node. Note that for a given image type,\nthe latest version of it will be used.", - "type": "string" - }, - "oauthScopes": { - "description": "The set of Google API scopes to be made available on all of the\nnode VMs under the \"default\" service account.\n\nThe following scopes are recommended, but not required, and by default are\nnot included:\n\n* `https://www.googleapis.com/auth/compute` is required for mounting\npersistent storage on your nodes.\n* `https://www.googleapis.com/auth/devstorage.read_only` is required for\ncommunicating with **gcr.io**\n(the [Google Container Registry](/container-registry/)).\n\nIf unspecified, no scopes are added, unless Cloud Logging or Cloud\nMonitoring are enabled, in which case their required scopes will be added.", - "items": { - "type": "string" - }, - "type": "array" - }, - "preemptible": { - "description": "Whether the nodes are created as preemptible VM instances. See:\nhttps://cloud.google.com/compute/docs/instances/preemptible for more\ninformation about preemptible VM instances.", - "type": "boolean" - }, - "labels": { - "description": "The map of Kubernetes labels (key/value pairs) to be applied to each node.\nThese will added in addition to any default label(s) that\nKubernetes may apply to the node.\nIn case of conflict in label keys, the applied set may differ depending on\nthe Kubernetes version -- it's best to assume the behavior is undefined\nand conflicts should be avoided.\nFor more information, including usage and the valid values, see:\nhttp://kubernetes.io/v1.1/docs/user-guide/labels.html", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "localSsdCount": { - "format": "int32", - "description": "The number of local SSD disks to be attached to the node.\n\nThe limit for this value is dependant upon the maximum number of\ndisks available on a machine per zone. See:\nhttps://cloud.google.com/compute/docs/disks/local-ssd#local_ssd_limits\nfor more information.", - "type": "integer" - }, - "metadata": { - "description": "The metadata key/value pairs assigned to instances in the cluster.\n\nKeys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes\nin length. These are reflected as part of a URL in the metadata server.\nAdditionally, to avoid ambiguity, keys must not conflict with any other\nmetadata keys for the project or be one of the four reserved keys:\n\"instance-template\", \"kube-env\", \"startup-script\", and \"user-data\"\n\nValues are free-form strings, and only have meaning as interpreted by\nthe image running in the instance. The only restriction placed on them is\nthat each value's size must be less than or equal to 32 KB.\n\nThe total size of all keys and values must be less than 512 KB.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "diskSizeGb": { - "format": "int32", - "description": "Size of the disk attached to each node, specified in GB.\nThe smallest allowed disk size is 10GB.\n\nIf unspecified, the default disk size is 100GB.", - "type": "integer" - }, - "tags": { - "description": "The list of instance tags applied to all nodes. Tags are used to identify\nvalid sources or targets for network firewalls and are specified by\nthe client during cluster or node pool creation. Each tag within the list\nmust comply with RFC1035.", - "items": { - "type": "string" - }, - "type": "array" - }, - "serviceAccount": { - "description": "The Google Cloud Platform Service Account to be used by the node VMs. If\nno Service Account is specified, the \"default\" service account is used.", - "type": "string" - }, - "accelerators": { - "description": "A list of hardware accelerators to be attached to each node.\nSee https://cloud.google.com/compute/docs/gpus for more information about\nsupport for GPUs.", - "items": { - "$ref": "AcceleratorConfig" - }, - "type": "array" - }, - "machineType": { - "description": "The name of a Google Compute Engine [machine\ntype](/compute/docs/machine-types) (e.g.\n`n1-standard-1`).\n\nIf unspecified, the default machine type is\n`n1-standard-1`.", - "type": "string" - } - }, - "id": "NodeConfig" - }, - "AutoUpgradeOptions": { - "description": "AutoUpgradeOptions defines the set of options for the user to control how\nthe Auto Upgrades will proceed.", - "type": "object", - "properties": { - "description": { - "description": "[Output only] This field is set when upgrades are about to commence\nwith the description of the upgrade.", - "type": "string" - }, - "autoUpgradeStartTime": { - "description": "[Output only] This field is set when upgrades are about to commence\nwith the approximate start time for the upgrades, in\n[RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", - "type": "string" - } - }, - "id": "AutoUpgradeOptions" - }, - "ListClustersResponse": { - "description": "ListClustersResponse is the result of ListClustersRequest.", - "type": "object", - "properties": { - "clusters": { - "description": "A list of clusters in the project in the specified zone, or\nacross all ones.", - "items": { - "$ref": "Cluster" - }, - "type": "array" - }, - "missingZones": { - "description": "If any zones are listed here, the list of clusters returned\nmay be missing those zones.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "ListClustersResponse" - }, - "HttpLoadBalancing": { - "description": "Configuration options for the HTTP (L7) load balancing controller addon,\nwhich makes it easy to set up HTTP load balancers for services in a cluster.", - "type": "object", - "properties": { - "disabled": { - "description": "Whether the HTTP Load Balancing controller is enabled in the cluster.\nWhen enabled, it runs a small pod in the cluster that manages the load\nbalancers.", - "type": "boolean" - } - }, - "id": "HttpLoadBalancing" - }, - "SetNetworkPolicyRequest": { - "description": "SetNetworkPolicyRequest enables/disables network policy for a cluster.", - "type": "object", - "properties": { - "networkPolicy": { - "description": "Configuration options for the NetworkPolicy feature.", - "$ref": "NetworkPolicy" - } - }, - "id": "SetNetworkPolicyRequest" - }, - "SetMasterAuthRequest": { - "description": "SetMasterAuthRequest updates the admin password of a cluster.", - "type": "object", - "properties": { - "update": { - "$ref": "MasterAuth", - "description": "A description of the update." - }, - "action": { - "description": "The exact form of action to be taken on the master auth", - "type": "string", - "enumDescriptions": [ - "Operation is unknown and will error out", - "Set the password to a user generated value.", - "Generate a new password and set it to that." - ], - "enum": [ - "UNKNOWN", - "SET_PASSWORD", - "GENERATE_PASSWORD" - ] - } - }, - "id": "SetMasterAuthRequest" - }, - "ClientCertificateConfig": { - "description": "Configuration for client certificates on the cluster.", - "type": "object", - "properties": { - "issueClientCertificate": { - "description": "Issue a client certificate.", - "type": "boolean" - } - }, - "id": "ClientCertificateConfig" - }, - "NodePoolAutoscaling": { - "description": "NodePoolAutoscaling contains information required by cluster autoscaler to\nadjust the size of the node pool to the current cluster usage.", - "type": "object", - "properties": { - "enabled": { - "description": "Is autoscaling enabled for this node pool.", - "type": "boolean" - }, - "maxNodeCount": { - "format": "int32", - "description": "Maximum number of nodes in the NodePool. Must be \u003e= min_node_count. There\nhas to enough quota to scale up the cluster.", - "type": "integer" - }, - "minNodeCount": { - "format": "int32", - "description": "Minimum number of nodes in the NodePool. Must be \u003e= 1 and \u003c=\nmax_node_count.", - "type": "integer" - } - }, - "id": "NodePoolAutoscaling" - }, - "IPAllocationPolicy": { - "description": "Configuration for controlling how IPs are allocated in the cluster.", - "type": "object", - "properties": { - "servicesIpv4Cidr": { - "description": "The IP address range of the services IPs in this cluster. If blank, a range\nwill be automatically chosen with the default size.\n\nThis field is only applicable when `use_ip_aliases` is true.\n\nSet to blank to have a range will be chosen with the default size.\n\nSet to /netmask (e.g. `/14`) to have a range be chosen with a specific\nnetmask.\n\nSet to a [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.\n`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range\nto use.", - "type": "string" - }, - "createSubnetwork": { - "description": "Whether a new subnetwork will be created automatically for the cluster.\n\nThis field is only applicable when `use_ip_aliases` is true.", - "type": "boolean" - }, - "useIpAliases": { - "description": "Whether alias IPs will be used for pod IPs in the cluster.", - "type": "boolean" - }, - "subnetworkName": { - "description": "A custom subnetwork name to be used if `create_subnetwork` is true. If\nthis field is empty, then an automatic name will be chosen for the new\nsubnetwork.", - "type": "string" - }, - "clusterIpv4Cidr": { - "description": "The IP address range for the cluster pod IPs. If this field is set, then\n`cluster.cluster_ipv4_cidr` must be left blank.\n\nThis field is only applicable when `use_ip_aliases` is true.\n\nSet to blank to have a range will be chosen with the default size.\n\nSet to /netmask (e.g. `/14`) to have a range be chosen with a specific\nnetmask.\n\nSet to a [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.\n`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range\nto use.", - "type": "string" - }, - "nodeIpv4Cidr": { - "description": "The IP address range of the instance IPs in this cluster.\n\nThis is applicable only if `create_subnetwork` is true.\n\nSet to blank to have a range will be chosen with the default size.\n\nSet to /netmask (e.g. `/14`) to have a range be chosen with a specific\nnetmask.\n\nSet to a [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.\n`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range\nto use.", - "type": "string" - } - }, - "id": "IPAllocationPolicy" - }, - "ClusterUpdate": { - "description": "ClusterUpdate describes an update to the cluster. Exactly one update can\nbe applied to a cluster with each request, so at most one field can be\nprovided.", - "type": "object", - "properties": { - "desiredNodePoolId": { - "description": "The node pool to be upgraded. This field is mandatory if\n\"desired_node_version\", \"desired_image_family\" or\n\"desired_node_pool_autoscaling\" is specified and there is more than one\nnode pool on the cluster.", - "type": "string" - }, - "desiredNodeVersion": { - "description": "The Kubernetes version to change the nodes to (typically an\nupgrade). Use `-` to upgrade to the latest version supported by\nthe server.", - "type": "string" - }, - "desiredMasterVersion": { - "description": "The Kubernetes version to change the master to. The only valid value is the\nlatest supported version. Use \"-\" to have the server automatically select\nthe latest version.", - "type": "string" - }, - "desiredMasterAuthorizedNetworksConfig": { - "description": "Master authorized networks is a Beta feature.\nThe desired configuration options for master authorized networks feature.", - "$ref": "MasterAuthorizedNetworksConfig" - }, - "desiredLocations": { - "description": "The desired list of Google Compute Engine\n[locations](/compute/docs/zones#available) in which the cluster's nodes\nshould be located. Changing the locations a cluster is in will result\nin nodes being either created or removed from the cluster, depending on\nwhether locations are being added or removed.\n\nThis list must always include the cluster's primary zone.", - "items": { - "type": "string" - }, - "type": "array" - }, - "desiredNodePoolAutoscaling": { - "$ref": "NodePoolAutoscaling", - "description": "Autoscaler configuration for the node pool specified in\ndesired_node_pool_id. If there is only one pool in the\ncluster and desired_node_pool_id is not provided then\nthe change applies to that single node pool." - }, - "desiredMonitoringService": { - "description": "The monitoring service the cluster should use to write metrics.\nCurrently available options:\n\n* \"monitoring.googleapis.com\" - the Google Cloud Monitoring service\n* \"none\" - no metrics will be exported from the cluster", - "type": "string" - }, - "desiredImageType": { - "description": "The desired image type for the node pool.\nNOTE: Set the \"desired_node_pool\" field as well.", - "type": "string" - }, - "desiredAddonsConfig": { - "description": "Configurations for the various addons available to run in the cluster.", - "$ref": "AddonsConfig" - } - }, - "id": "ClusterUpdate" - }, - "SetLoggingServiceRequest": { - "description": "SetLoggingServiceRequest sets the logging service of a cluster.", - "type": "object", - "properties": { - "loggingService": { - "description": "The logging service the cluster should use to write metrics.\nCurrently available options:\n\n* \"logging.googleapis.com\" - the Google Cloud Logging service\n* \"none\" - no metrics will be exported from the cluster", - "type": "string" - } - }, - "id": "SetLoggingServiceRequest" - }, - "HorizontalPodAutoscaling": { - "description": "Configuration options for the horizontal pod autoscaling feature, which\nincreases or decreases the number of replica pods a replication controller\nhas based on the resource usage of the existing pods.", - "type": "object", - "properties": { - "disabled": { - "description": "Whether the Horizontal Pod Autoscaling feature is enabled in the cluster.\nWhen enabled, it ensures that a Heapster pod is running in the cluster,\nwhich is also used by the Cloud Monitoring service.", - "type": "boolean" - } - }, - "id": "HorizontalPodAutoscaling" - }, - "SetNodePoolManagementRequest": { - "description": "SetNodePoolManagementRequest sets the node management properties of a node\npool.", - "type": "object", - "properties": { - "management": { - "$ref": "NodeManagement", - "description": "NodeManagement configuration for the node pool." - } - }, - "id": "SetNodePoolManagementRequest" - }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object", - "properties": {}, - "id": "Empty" - }, - "MasterAuthorizedNetworksConfig": { - "description": "Master authorized networks is a Beta feature.\nConfiguration options for the master authorized networks feature. Enabled\nmaster authorized networks will disallow all external traffic to access\nKubernetes master through HTTPS except traffic from the given CIDR blocks,\nGoogle Compute Engine Public IPs and Google Prod IPs.", - "type": "object", - "properties": { - "enabled": { - "description": "Whether or not master authorized networks is enabled.", - "type": "boolean" - }, - "cidrBlocks": { - "description": "cidr_blocks define up to 10 external networks that could access\nKubernetes master through HTTPS.", - "items": { - "$ref": "CidrBlock" - }, - "type": "array" - } - }, - "id": "MasterAuthorizedNetworksConfig" - }, - "SetNodePoolAutoscalingRequest": { - "description": "SetNodePoolAutoscalingRequest sets the autoscaler settings of a node pool.", - "type": "object", - "properties": { - "autoscaling": { - "$ref": "NodePoolAutoscaling", - "description": "Autoscaling configuration for the node pool." - } - }, - "id": "SetNodePoolAutoscalingRequest" - }, - "CreateClusterRequest": { - "description": "CreateClusterRequest creates a cluster.", - "type": "object", - "properties": { - "cluster": { - "description": "A [cluster\nresource](/container-engine/reference/rest/v1/projects.zones.clusters)", - "$ref": "Cluster" - } - }, - "id": "CreateClusterRequest" - }, - "ListNodePoolsResponse": { - "description": "ListNodePoolsResponse is the result of ListNodePoolsRequest.", - "type": "object", - "properties": { - "nodePools": { - "description": "A list of node pools for a cluster.", - "items": { - "$ref": "NodePool" - }, - "type": "array" - } - }, - "id": "ListNodePoolsResponse" - }, - "CompleteIPRotationRequest": { - "description": "CompleteIPRotationRequest moves the cluster master back into single-IP mode.", - "type": "object", - "properties": {}, - "id": "CompleteIPRotationRequest" - }, - "StartIPRotationRequest": { - "description": "StartIPRotationRequest creates a new IP for the cluster and then performs\na node upgrade on each node pool to point to the new IP.", - "type": "object", - "properties": {}, - "id": "StartIPRotationRequest" - }, - "UpdateNodePoolRequest": { - "description": "UpdateNodePoolRequests update a node pool's image and/or version.", - "type": "object", - "properties": { - "imageType": { - "description": "The desired image type for the node pool.", - "type": "string" - }, - "nodeVersion": { - "description": "The Kubernetes version to change the nodes to (typically an\nupgrade). Use `-` to upgrade to the latest version supported by\nthe server.", - "type": "string" - } - }, - "id": "UpdateNodePoolRequest" - }, - "AcceleratorConfig": { - "description": "AcceleratorConfig represents a Hardware Accelerator request.", - "type": "object", - "properties": { - "acceleratorType": { - "description": "The accelerator type resource name. List of supported accelerators\n[here](/compute/docs/gpus/#Introduction)", - "type": "string" - }, - "acceleratorCount": { - "format": "int64", - "description": "The number of the accelerator cards exposed to an instance.", - "type": "string" - } - }, - "id": "AcceleratorConfig" - }, - "LegacyAbac": { - "description": "Configuration for the legacy Attribute Based Access Control authorization\nmode.", - "type": "object", - "properties": { - "enabled": { - "description": "Whether the ABAC authorizer is enabled for this cluster. When enabled,\nidentities in the system, including service accounts, nodes, and\ncontrollers, will have statically granted permissions beyond those\nprovided by the RBAC configuration or IAM.", - "type": "boolean" - } - }, - "id": "LegacyAbac" - }, - "SetAddonsConfigRequest": { - "description": "SetAddonsConfigRequest sets the addons associated with the cluster.", - "type": "object", - "properties": { - "addonsConfig": { - "$ref": "AddonsConfig", - "description": "The desired configurations for the various addons available to run in the\ncluster." - } - }, - "id": "SetAddonsConfigRequest" - }, - "SetLabelsRequest": { - "description": "SetLabelsRequest sets the Google Cloud Platform labels on a Google Container\nEngine cluster, which will in turn set them for Google Compute Engine\nresources used by that cluster", - "type": "object", - "properties": { - "resourceLabels": { - "description": "The labels to set for that cluster.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "labelFingerprint": { - "description": "The fingerprint of the previous set of labels for this resource,\nused to detect conflicts. The fingerprint is initially generated by\nContainer Engine and changes after every request to modify or update\nlabels. You must always provide an up-to-date fingerprint hash when\nupdating or changing labels. Make a \u003ccode\u003eget()\u003c/code\u003e request to the\nresource to get the latest fingerprint.", - "type": "string" - } - }, - "id": "SetLabelsRequest" - }, - "NodePool": { - "description": "NodePool contains the name and configuration for a cluster's node pool.\nNode pools are a set of nodes (i.e. VM's), with a common configuration and\nspecification, under the control of the cluster master. They may have a set\nof Kubernetes labels applied to them, which may be used to reference them\nduring pod scheduling. They may also be resized up or down, to accommodate\nthe workload.", - "type": "object", - "properties": { - "status": { - "enumDescriptions": [ - "Not set.", - "The PROVISIONING state indicates the node pool is being created.", - "The RUNNING state indicates the node pool has been created\nand is fully usable.", - "The RUNNING_WITH_ERROR state indicates the node pool has been created\nand is partially usable. Some error state has occurred and some\nfunctionality may be impaired. Customer may need to reissue a request\nor trigger a new update.", - "The RECONCILING state indicates that some work is actively being done on\nthe node pool, such as upgrading node software. Details can\nbe found in the `statusMessage` field.", - "The STOPPING state indicates the node pool is being deleted.", - "The ERROR state indicates the node pool may be unusable. Details\ncan be found in the `statusMessage` field." - ], - "enum": [ - "STATUS_UNSPECIFIED", - "PROVISIONING", - "RUNNING", - "RUNNING_WITH_ERROR", - "RECONCILING", - "STOPPING", - "ERROR" - ], - "description": "[Output only] The status of the nodes in this pool instance.", - "type": "string" - }, - "config": { - "$ref": "NodeConfig", - "description": "The node configuration of the pool." - }, - "statusMessage": { - "description": "[Output only] Additional information about the current status of this\nnode pool instance, if available.", - "type": "string" - }, - "name": { - "description": "The name of the node pool.", - "type": "string" - }, - "autoscaling": { - "description": "Autoscaler configuration for this NodePool. Autoscaler is enabled\nonly if a valid configuration is present.", - "$ref": "NodePoolAutoscaling" - }, - "management": { - "description": "NodeManagement configuration for this NodePool.", - "$ref": "NodeManagement" - }, - "initialNodeCount": { - "format": "int32", - "description": "The initial node count for the pool. You must ensure that your\nCompute Engine \u003ca href=\"/compute/docs/resource-quotas\"\u003eresource quota\u003c/a\u003e\nis sufficient for this number of instances. You must also have available\nfirewall and routes quota.", - "type": "integer" - }, - "selfLink": { - "description": "[Output only] Server-defined URL for the resource.", - "type": "string" - }, - "instanceGroupUrls": { - "description": "[Output only] The resource URLs of [instance\ngroups](/compute/docs/instance-groups/) associated with this\nnode pool.", - "items": { - "type": "string" - }, - "type": "array" - }, - "version": { - "description": "[Output only] The version of the Kubernetes of this node.", - "type": "string" - } - }, - "id": "NodePool" - }, - "NodeManagement": { - "description": "NodeManagement defines the set of node management services turned on for the\nnode pool.", - "type": "object", - "properties": { - "autoRepair": { - "description": "A flag that specifies whether the node auto-repair is enabled for the node\npool. If enabled, the nodes in this node pool will be monitored and, if\nthey fail health checks too many times, an automatic repair action will be\ntriggered.", - "type": "boolean" - }, - "autoUpgrade": { - "description": "A flag that specifies whether node auto-upgrade is enabled for the node\npool. If enabled, node auto-upgrade helps keep the nodes in your node pool\nup to date with the latest release version of Kubernetes.", - "type": "boolean" - }, - "upgradeOptions": { - "description": "Specifies the Auto Upgrade knobs for the node pool.", - "$ref": "AutoUpgradeOptions" - } - }, - "id": "NodeManagement" - }, - "CancelOperationRequest": { - "description": "CancelOperationRequest cancels a single operation.", - "type": "object", - "properties": {}, - "id": "CancelOperationRequest" - }, - "SetLegacyAbacRequest": { - "description": "SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for\na cluster.", - "type": "object", - "properties": { - "enabled": { - "description": "Whether ABAC authorization will be enabled in the cluster.", - "type": "boolean" - } - }, - "id": "SetLegacyAbacRequest" - }, - "KubernetesDashboard": { - "description": "Configuration for the Kubernetes Dashboard.", - "type": "object", - "properties": { - "disabled": { - "description": "Whether the Kubernetes Dashboard is enabled for this cluster.", - "type": "boolean" - } - }, - "id": "KubernetesDashboard" - }, - "Operation": { - "description": "This operation resource represents operations that may have happened or are\nhappening on the cluster. All fields are output only.", - "type": "object", - "properties": { - "selfLink": { - "description": "Server-defined URL for the resource.", - "type": "string" - }, - "detail": { - "description": "Detailed operation progress, if available.", - "type": "string" - }, - "targetLink": { - "description": "Server-defined URL for the target of the operation.", - "type": "string" - }, - "operationType": { - "description": "The operation type.", - "type": "string", - "enumDescriptions": [ - "Not set.", - "Cluster create.", - "Cluster delete.", - "A master upgrade.", - "A node upgrade.", - "Cluster repair.", - "Cluster update.", - "Node pool create.", - "Node pool delete.", - "Set node pool management.", - "Automatic node pool repair.", - "Automatic node upgrade.", - "Set labels.", - "Set/generate master auth materials", - "Set node pool size.", - "Updates network policy for a cluster." - ], - "enum": [ - "TYPE_UNSPECIFIED", - "CREATE_CLUSTER", - "DELETE_CLUSTER", - "UPGRADE_MASTER", - "UPGRADE_NODES", - "REPAIR_CLUSTER", - "UPDATE_CLUSTER", - "CREATE_NODE_POOL", - "DELETE_NODE_POOL", - "SET_NODE_POOL_MANAGEMENT", - "AUTO_REPAIR_NODES", - "AUTO_UPGRADE_NODES", - "SET_LABELS", - "SET_MASTER_AUTH", - "SET_NODE_POOL_SIZE", - "SET_NETWORK_POLICY" - ] - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the operation\nis taking place.", - "type": "string" - }, - "status": { - "enumDescriptions": [ - "Not set.", - "The operation has been created.", - "The operation is currently running.", - "The operation is done, either cancelled or completed.", - "The operation is aborting." - ], - "enum": [ - "STATUS_UNSPECIFIED", - "PENDING", - "RUNNING", - "DONE", - "ABORTING" - ], - "description": "The current status of the operation.", - "type": "string" - }, - "name": { - "description": "The server-assigned ID for the operation.", - "type": "string" - }, - "statusMessage": { - "description": "If an error has occurred, a textual description of the error.", - "type": "string" - } - }, - "id": "Operation" - }, - "AddonsConfig": { - "description": "Configuration for the addons that can be automatically spun up in the\ncluster, enabling additional functionality.", - "type": "object", - "properties": { - "kubernetesDashboard": { - "description": "Configuration for the Kubernetes Dashboard.", - "$ref": "KubernetesDashboard" - }, - "horizontalPodAutoscaling": { - "$ref": "HorizontalPodAutoscaling", - "description": "Configuration for the horizontal pod autoscaling feature, which\nincreases or decreases the number of replica pods a replication controller\nhas based on the resource usage of the existing pods." - }, - "httpLoadBalancing": { - "$ref": "HttpLoadBalancing", - "description": "Configuration for the HTTP (L7) load balancing controller addon, which\nmakes it easy to set up HTTP load balancers for services in a cluster." - } - }, - "id": "AddonsConfig" - } - }, - "protocol": "rest", - "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" - }, - "version": "v1", - "baseUrl": "https://container.googleapis.com/", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "servicePath": "", - "description": "The Google Container Engine API is used for building and managing container based applications, powered by the open source Kubernetes technology.", - "kind": "discovery#restDescription", - "rootUrl": "https://container.googleapis.com/" -} diff --git a/vendor/google.golang.org/api/container/v1/container-gen.go b/vendor/google.golang.org/api/container/v1/container-gen.go deleted file mode 100644 index 839d7b6eb..000000000 --- a/vendor/google.golang.org/api/container/v1/container-gen.go +++ /dev/null @@ -1,6777 +0,0 @@ -// Package container provides access to the Google Container Engine API. -// -// See https://cloud.google.com/container-engine/ -// -// Usage example: -// -// import "google.golang.org/api/container/v1" -// ... -// containerService, err := container.New(oauthHttpClient) -package container - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - context "golang.org/x/net/context" - ctxhttp "golang.org/x/net/context/ctxhttp" - gensupport "google.golang.org/api/gensupport" - googleapi "google.golang.org/api/googleapi" - "io" - "net/http" - "net/url" - "strconv" - "strings" -) - -// Always reference these packages, just in case the auto-generated code -// below doesn't. -var _ = bytes.NewBuffer -var _ = strconv.Itoa -var _ = fmt.Sprintf -var _ = json.NewDecoder -var _ = io.Copy -var _ = url.Parse -var _ = gensupport.MarshalJSON -var _ = googleapi.Version -var _ = errors.New -var _ = strings.Replace -var _ = context.Canceled -var _ = ctxhttp.Do - -const apiId = "container:v1" -const apiName = "container" -const apiVersion = "v1" -const basePath = "https://container.googleapis.com/" - -// OAuth2 scopes used by this API. -const ( - // View and manage your data across Google Cloud Platform services - CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" -) - -func New(client *http.Client) (*Service, error) { - if client == nil { - return nil, errors.New("client is nil") - } - s := &Service{client: client, BasePath: basePath} - s.Projects = NewProjectsService(s) - return s, nil -} - -type Service struct { - client *http.Client - BasePath string // API endpoint base URL - UserAgent string // optional additional User-Agent fragment - - Projects *ProjectsService -} - -func (s *Service) userAgent() string { - if s.UserAgent == "" { - return googleapi.UserAgent - } - return googleapi.UserAgent + " " + s.UserAgent -} - -func NewProjectsService(s *Service) *ProjectsService { - rs := &ProjectsService{s: s} - rs.Zones = NewProjectsZonesService(s) - return rs -} - -type ProjectsService struct { - s *Service - - Zones *ProjectsZonesService -} - -func NewProjectsZonesService(s *Service) *ProjectsZonesService { - rs := &ProjectsZonesService{s: s} - rs.Clusters = NewProjectsZonesClustersService(s) - rs.Operations = NewProjectsZonesOperationsService(s) - return rs -} - -type ProjectsZonesService struct { - s *Service - - Clusters *ProjectsZonesClustersService - - Operations *ProjectsZonesOperationsService -} - -func NewProjectsZonesClustersService(s *Service) *ProjectsZonesClustersService { - rs := &ProjectsZonesClustersService{s: s} - rs.NodePools = NewProjectsZonesClustersNodePoolsService(s) - return rs -} - -type ProjectsZonesClustersService struct { - s *Service - - NodePools *ProjectsZonesClustersNodePoolsService -} - -func NewProjectsZonesClustersNodePoolsService(s *Service) *ProjectsZonesClustersNodePoolsService { - rs := &ProjectsZonesClustersNodePoolsService{s: s} - return rs -} - -type ProjectsZonesClustersNodePoolsService struct { - s *Service -} - -func NewProjectsZonesOperationsService(s *Service) *ProjectsZonesOperationsService { - rs := &ProjectsZonesOperationsService{s: s} - return rs -} - -type ProjectsZonesOperationsService struct { - s *Service -} - -// AcceleratorConfig: AcceleratorConfig represents a Hardware -// Accelerator request. -type AcceleratorConfig struct { - // AcceleratorCount: The number of the accelerator cards exposed to an - // instance. - AcceleratorCount int64 `json:"acceleratorCount,omitempty,string"` - - // AcceleratorType: The accelerator type resource name. List of - // supported accelerators - // [here](/compute/docs/gpus/#Introduction) - AcceleratorType string `json:"acceleratorType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AcceleratorCount") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AcceleratorCount") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AcceleratorConfig) MarshalJSON() ([]byte, error) { - type noMethod AcceleratorConfig - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AddonsConfig: Configuration for the addons that can be automatically -// spun up in the -// cluster, enabling additional functionality. -type AddonsConfig struct { - // HorizontalPodAutoscaling: Configuration for the horizontal pod - // autoscaling feature, which - // increases or decreases the number of replica pods a replication - // controller - // has based on the resource usage of the existing pods. - HorizontalPodAutoscaling *HorizontalPodAutoscaling `json:"horizontalPodAutoscaling,omitempty"` - - // HttpLoadBalancing: Configuration for the HTTP (L7) load balancing - // controller addon, which - // makes it easy to set up HTTP load balancers for services in a - // cluster. - HttpLoadBalancing *HttpLoadBalancing `json:"httpLoadBalancing,omitempty"` - - // KubernetesDashboard: Configuration for the Kubernetes Dashboard. - KubernetesDashboard *KubernetesDashboard `json:"kubernetesDashboard,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "HorizontalPodAutoscaling") to unconditionally include in API - // requests. By default, fields with empty values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "HorizontalPodAutoscaling") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AddonsConfig) MarshalJSON() ([]byte, error) { - type noMethod AddonsConfig - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// AutoUpgradeOptions: AutoUpgradeOptions defines the set of options for -// the user to control how -// the Auto Upgrades will proceed. -type AutoUpgradeOptions struct { - // AutoUpgradeStartTime: [Output only] This field is set when upgrades - // are about to commence - // with the approximate start time for the upgrades, - // in - // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - AutoUpgradeStartTime string `json:"autoUpgradeStartTime,omitempty"` - - // Description: [Output only] This field is set when upgrades are about - // to commence - // with the description of the upgrade. - Description string `json:"description,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "AutoUpgradeStartTime") to unconditionally include in API requests. - // By default, fields with empty values are omitted from API requests. - // However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AutoUpgradeStartTime") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *AutoUpgradeOptions) MarshalJSON() ([]byte, error) { - type noMethod AutoUpgradeOptions - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CancelOperationRequest: CancelOperationRequest cancels a single -// operation. -type CancelOperationRequest struct { -} - -// CidrBlock: CidrBlock contains an optional name and one CIDR block. -type CidrBlock struct { - // CidrBlock: cidr_block must be specified in CIDR notation. - CidrBlock string `json:"cidrBlock,omitempty"` - - // DisplayName: display_name is an optional field for users to identify - // CIDR blocks. - DisplayName string `json:"displayName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CidrBlock") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CidrBlock") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CidrBlock) MarshalJSON() ([]byte, error) { - type noMethod CidrBlock - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ClientCertificateConfig: Configuration for client certificates on the -// cluster. -type ClientCertificateConfig struct { - // IssueClientCertificate: Issue a client certificate. - IssueClientCertificate bool `json:"issueClientCertificate,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "IssueClientCertificate") to unconditionally include in API requests. - // By default, fields with empty values are omitted from API requests. - // However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "IssueClientCertificate") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ClientCertificateConfig) MarshalJSON() ([]byte, error) { - type noMethod ClientCertificateConfig - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Cluster: A Google Container Engine cluster. -type Cluster struct { - // AddonsConfig: Configurations for the various addons available to run - // in the cluster. - AddonsConfig *AddonsConfig `json:"addonsConfig,omitempty"` - - // ClusterIpv4Cidr: The IP address range of the container pods in this - // cluster, - // in - // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // - // notation (e.g. `10.96.0.0/14`). Leave blank to have - // one automatically chosen or specify a `/14` block in `10.0.0.0/8`. - ClusterIpv4Cidr string `json:"clusterIpv4Cidr,omitempty"` - - // CreateTime: [Output only] The time the cluster was created, - // in - // [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - CreateTime string `json:"createTime,omitempty"` - - // CurrentMasterVersion: [Output only] The current software version of - // the master endpoint. - CurrentMasterVersion string `json:"currentMasterVersion,omitempty"` - - // CurrentNodeCount: [Output only] The number of nodes currently in the - // cluster. - CurrentNodeCount int64 `json:"currentNodeCount,omitempty"` - - // CurrentNodeVersion: [Output only] The current version of the node - // software components. - // If they are currently at multiple versions because they're in the - // process - // of being upgraded, this reflects the minimum version of all nodes. - CurrentNodeVersion string `json:"currentNodeVersion,omitempty"` - - // Description: An optional description of this cluster. - Description string `json:"description,omitempty"` - - // EnableKubernetesAlpha: Kubernetes alpha features are enabled on this - // cluster. This includes alpha - // API groups (e.g. v1alpha1) and features that may not be production - // ready in - // the kubernetes version of the master and nodes. - // The cluster has no SLA for uptime and master/node upgrades are - // disabled. - // Alpha enabled clusters are automatically deleted thirty days - // after - // creation. - EnableKubernetesAlpha bool `json:"enableKubernetesAlpha,omitempty"` - - // Endpoint: [Output only] The IP address of this cluster's master - // endpoint. - // The endpoint can be accessed from the internet - // at - // `https://username:password@endpoint/`. - // - // See the `masterAuth` property of this resource for username - // and - // password information. - Endpoint string `json:"endpoint,omitempty"` - - // ExpireTime: [Output only] The time the cluster will be - // automatically - // deleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text - // format. - ExpireTime string `json:"expireTime,omitempty"` - - // InitialClusterVersion: The initial Kubernetes version for this - // cluster. Valid versions are those - // found in validMasterVersions returned by getServerConfig. The - // version can - // be upgraded over time; such upgrades are reflected - // in - // currentMasterVersion and currentNodeVersion. - InitialClusterVersion string `json:"initialClusterVersion,omitempty"` - - // InitialNodeCount: The number of nodes to create in this cluster. You - // must ensure that your - // Compute Engine <a href="/compute/docs/resource-quotas">resource - // quota</a> - // is sufficient for this number of instances. You must also have - // available - // firewall and routes quota. - // For requests, this field should only be used in lieu of a - // "node_pool" object, since this configuration (along with - // the - // "node_config") will be used to create a "NodePool" object with - // an - // auto-generated name. Do not use this and a node_pool at the same - // time. - InitialNodeCount int64 `json:"initialNodeCount,omitempty"` - - // InstanceGroupUrls: [Output only] The resource URLs of - // [instance - // groups](/compute/docs/instance-groups/) associated with this - // cluster. - InstanceGroupUrls []string `json:"instanceGroupUrls,omitempty"` - - // IpAllocationPolicy: Configuration for cluster IP allocation. - IpAllocationPolicy *IPAllocationPolicy `json:"ipAllocationPolicy,omitempty"` - - // LabelFingerprint: The fingerprint of the set of labels for this - // cluster. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // LegacyAbac: Configuration for the legacy ABAC authorization mode. - LegacyAbac *LegacyAbac `json:"legacyAbac,omitempty"` - - // Locations: The list of Google Compute - // Engine - // [locations](/compute/docs/zones#available) in which the cluster's - // nodes - // should be located. - Locations []string `json:"locations,omitempty"` - - // LoggingService: The logging service the cluster should use to write - // logs. - // Currently available options: - // - // * `logging.googleapis.com` - the Google Cloud Logging service. - // * `none` - no logs will be exported from the cluster. - // * if left as an empty string,`logging.googleapis.com` will be used. - LoggingService string `json:"loggingService,omitempty"` - - // MasterAuth: The authentication information for accessing the master - // endpoint. - MasterAuth *MasterAuth `json:"masterAuth,omitempty"` - - // MasterAuthorizedNetworksConfig: Master authorized networks is a Beta - // feature. - // The configuration options for master authorized networks feature. - MasterAuthorizedNetworksConfig *MasterAuthorizedNetworksConfig `json:"masterAuthorizedNetworksConfig,omitempty"` - - // MonitoringService: The monitoring service the cluster should use to - // write metrics. - // Currently available options: - // - // * `monitoring.googleapis.com` - the Google Cloud Monitoring - // service. - // * `none` - no metrics will be exported from the cluster. - // * if left as an empty string, `monitoring.googleapis.com` will be - // used. - MonitoringService string `json:"monitoringService,omitempty"` - - // Name: The name of this cluster. The name must be unique within this - // project - // and zone, and can be up to 40 characters with the following - // restrictions: - // - // * Lowercase letters, numbers, and hyphens only. - // * Must start with a letter. - // * Must end with a number or a letter. - Name string `json:"name,omitempty"` - - // Network: The name of the Google Compute - // Engine - // [network](/compute/docs/networks-and-firewalls#networks) to which - // the - // cluster is connected. If left unspecified, the `default` network - // will be used. - Network string `json:"network,omitempty"` - - // NetworkPolicy: Configuration options for the NetworkPolicy feature. - NetworkPolicy *NetworkPolicy `json:"networkPolicy,omitempty"` - - // NodeConfig: Parameters used in creating the cluster's nodes. - // See `nodeConfig` for the description of its properties. - // For requests, this field should only be used in lieu of a - // "node_pool" object, since this configuration (along with - // the - // "initial_node_count") will be used to create a "NodePool" object with - // an - // auto-generated name. Do not use this and a node_pool at the same - // time. - // For responses, this field will be populated with the node - // configuration of - // the first node pool. - // - // If unspecified, the defaults are used. - NodeConfig *NodeConfig `json:"nodeConfig,omitempty"` - - // NodeIpv4CidrSize: [Output only] The size of the address space on each - // node for hosting - // containers. This is provisioned from within the - // `container_ipv4_cidr` - // range. - NodeIpv4CidrSize int64 `json:"nodeIpv4CidrSize,omitempty"` - - // NodePools: The node pools associated with this cluster. - // This field should not be set if "node_config" or "initial_node_count" - // are - // specified. - NodePools []*NodePool `json:"nodePools,omitempty"` - - // ResourceLabels: The resource labels for the cluster to use to - // annotate any related - // Google Compute Engine resources. - ResourceLabels map[string]string `json:"resourceLabels,omitempty"` - - // SelfLink: [Output only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServicesIpv4Cidr: [Output only] The IP address range of the - // Kubernetes services in - // this cluster, - // in - // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // - // notation (e.g. `1.2.3.4/29`). Service addresses are - // typically put in the last `/16` from the container CIDR. - ServicesIpv4Cidr string `json:"servicesIpv4Cidr,omitempty"` - - // Status: [Output only] The current status of this cluster. - // - // Possible values: - // "STATUS_UNSPECIFIED" - Not set. - // "PROVISIONING" - The PROVISIONING state indicates the cluster is - // being created. - // "RUNNING" - The RUNNING state indicates the cluster has been - // created and is fully - // usable. - // "RECONCILING" - The RECONCILING state indicates that some work is - // actively being done on - // the cluster, such as upgrading the master or node software. Details - // can - // be found in the `statusMessage` field. - // "STOPPING" - The STOPPING state indicates the cluster is being - // deleted. - // "ERROR" - The ERROR state indicates the cluster may be unusable. - // Details - // can be found in the `statusMessage` field. - Status string `json:"status,omitempty"` - - // StatusMessage: [Output only] Additional information about the current - // status of this - // cluster, if available. - StatusMessage string `json:"statusMessage,omitempty"` - - // Subnetwork: The name of the Google Compute - // Engine - // [subnetwork](/compute/docs/subnetworks) to which the - // cluster is connected. - Subnetwork string `json:"subnetwork,omitempty"` - - // Zone: [Output only] The name of the Google Compute - // Engine - // [zone](/compute/docs/zones#available) in which the cluster - // resides. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "AddonsConfig") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AddonsConfig") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Cluster) MarshalJSON() ([]byte, error) { - type noMethod Cluster - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ClusterUpdate: ClusterUpdate describes an update to the cluster. -// Exactly one update can -// be applied to a cluster with each request, so at most one field can -// be -// provided. -type ClusterUpdate struct { - // DesiredAddonsConfig: Configurations for the various addons available - // to run in the cluster. - DesiredAddonsConfig *AddonsConfig `json:"desiredAddonsConfig,omitempty"` - - // DesiredImageType: The desired image type for the node pool. - // NOTE: Set the "desired_node_pool" field as well. - DesiredImageType string `json:"desiredImageType,omitempty"` - - // DesiredLocations: The desired list of Google Compute - // Engine - // [locations](/compute/docs/zones#available) in which the cluster's - // nodes - // should be located. Changing the locations a cluster is in will - // result - // in nodes being either created or removed from the cluster, depending - // on - // whether locations are being added or removed. - // - // This list must always include the cluster's primary zone. - DesiredLocations []string `json:"desiredLocations,omitempty"` - - // DesiredMasterAuthorizedNetworksConfig: Master authorized networks is - // a Beta feature. - // The desired configuration options for master authorized networks - // feature. - DesiredMasterAuthorizedNetworksConfig *MasterAuthorizedNetworksConfig `json:"desiredMasterAuthorizedNetworksConfig,omitempty"` - - // DesiredMasterVersion: The Kubernetes version to change the master to. - // The only valid value is the - // latest supported version. Use "-" to have the server automatically - // select - // the latest version. - DesiredMasterVersion string `json:"desiredMasterVersion,omitempty"` - - // DesiredMonitoringService: The monitoring service the cluster should - // use to write metrics. - // Currently available options: - // - // * "monitoring.googleapis.com" - the Google Cloud Monitoring service - // * "none" - no metrics will be exported from the cluster - DesiredMonitoringService string `json:"desiredMonitoringService,omitempty"` - - // DesiredNodePoolAutoscaling: Autoscaler configuration for the node - // pool specified in - // desired_node_pool_id. If there is only one pool in the - // cluster and desired_node_pool_id is not provided then - // the change applies to that single node pool. - DesiredNodePoolAutoscaling *NodePoolAutoscaling `json:"desiredNodePoolAutoscaling,omitempty"` - - // DesiredNodePoolId: The node pool to be upgraded. This field is - // mandatory if - // "desired_node_version", "desired_image_family" - // or - // "desired_node_pool_autoscaling" is specified and there is more than - // one - // node pool on the cluster. - DesiredNodePoolId string `json:"desiredNodePoolId,omitempty"` - - // DesiredNodeVersion: The Kubernetes version to change the nodes to - // (typically an - // upgrade). Use `-` to upgrade to the latest version supported by - // the server. - DesiredNodeVersion string `json:"desiredNodeVersion,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DesiredAddonsConfig") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DesiredAddonsConfig") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ClusterUpdate) MarshalJSON() ([]byte, error) { - type noMethod ClusterUpdate - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CompleteIPRotationRequest: CompleteIPRotationRequest moves the -// cluster master back into single-IP mode. -type CompleteIPRotationRequest struct { -} - -// CreateClusterRequest: CreateClusterRequest creates a cluster. -type CreateClusterRequest struct { - // Cluster: A - // [cluster - // resource](/container-engine/reference/rest/v1/projects.zones. - // clusters) - Cluster *Cluster `json:"cluster,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Cluster") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Cluster") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CreateClusterRequest) MarshalJSON() ([]byte, error) { - type noMethod CreateClusterRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CreateNodePoolRequest: CreateNodePoolRequest creates a node pool for -// a cluster. -type CreateNodePoolRequest struct { - // NodePool: The node pool to create. - NodePool *NodePool `json:"nodePool,omitempty"` - - // ForceSendFields is a list of field names (e.g. "NodePool") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "NodePool") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CreateNodePoolRequest) MarshalJSON() ([]byte, error) { - type noMethod CreateNodePoolRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Empty: A generic empty message that you can re-use to avoid defining -// duplicated -// empty messages in your APIs. A typical example is to use it as the -// request -// or the response type of an API method. For instance: -// -// service Foo { -// rpc Bar(google.protobuf.Empty) returns -// (google.protobuf.Empty); -// } -// -// The JSON representation for `Empty` is empty JSON object `{}`. -type Empty struct { - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` -} - -// HorizontalPodAutoscaling: Configuration options for the horizontal -// pod autoscaling feature, which -// increases or decreases the number of replica pods a replication -// controller -// has based on the resource usage of the existing pods. -type HorizontalPodAutoscaling struct { - // Disabled: Whether the Horizontal Pod Autoscaling feature is enabled - // in the cluster. - // When enabled, it ensures that a Heapster pod is running in the - // cluster, - // which is also used by the Cloud Monitoring service. - Disabled bool `json:"disabled,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Disabled") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Disabled") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HorizontalPodAutoscaling) MarshalJSON() ([]byte, error) { - type noMethod HorizontalPodAutoscaling - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HttpLoadBalancing: Configuration options for the HTTP (L7) load -// balancing controller addon, -// which makes it easy to set up HTTP load balancers for services in a -// cluster. -type HttpLoadBalancing struct { - // Disabled: Whether the HTTP Load Balancing controller is enabled in - // the cluster. - // When enabled, it runs a small pod in the cluster that manages the - // load - // balancers. - Disabled bool `json:"disabled,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Disabled") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Disabled") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HttpLoadBalancing) MarshalJSON() ([]byte, error) { - type noMethod HttpLoadBalancing - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// IPAllocationPolicy: Configuration for controlling how IPs are -// allocated in the cluster. -type IPAllocationPolicy struct { - // ClusterIpv4Cidr: The IP address range for the cluster pod IPs. If - // this field is set, then - // `cluster.cluster_ipv4_cidr` must be left blank. - // - // This field is only applicable when `use_ip_aliases` is true. - // - // Set to blank to have a range will be chosen with the default - // size. - // - // Set to /netmask (e.g. `/14`) to have a range be chosen with a - // specific - // netmask. - // - // Set to a - // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // no - // tation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks - // (e.g. - // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific - // range - // to use. - ClusterIpv4Cidr string `json:"clusterIpv4Cidr,omitempty"` - - // CreateSubnetwork: Whether a new subnetwork will be created - // automatically for the cluster. - // - // This field is only applicable when `use_ip_aliases` is true. - CreateSubnetwork bool `json:"createSubnetwork,omitempty"` - - // NodeIpv4Cidr: The IP address range of the instance IPs in this - // cluster. - // - // This is applicable only if `create_subnetwork` is true. - // - // Set to blank to have a range will be chosen with the default - // size. - // - // Set to /netmask (e.g. `/14`) to have a range be chosen with a - // specific - // netmask. - // - // Set to a - // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // no - // tation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks - // (e.g. - // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific - // range - // to use. - NodeIpv4Cidr string `json:"nodeIpv4Cidr,omitempty"` - - // ServicesIpv4Cidr: The IP address range of the services IPs in this - // cluster. If blank, a range - // will be automatically chosen with the default size. - // - // This field is only applicable when `use_ip_aliases` is true. - // - // Set to blank to have a range will be chosen with the default - // size. - // - // Set to /netmask (e.g. `/14`) to have a range be chosen with a - // specific - // netmask. - // - // Set to a - // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // no - // tation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks - // (e.g. - // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific - // range - // to use. - ServicesIpv4Cidr string `json:"servicesIpv4Cidr,omitempty"` - - // SubnetworkName: A custom subnetwork name to be used if - // `create_subnetwork` is true. If - // this field is empty, then an automatic name will be chosen for the - // new - // subnetwork. - SubnetworkName string `json:"subnetworkName,omitempty"` - - // UseIpAliases: Whether alias IPs will be used for pod IPs in the - // cluster. - UseIpAliases bool `json:"useIpAliases,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ClusterIpv4Cidr") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ClusterIpv4Cidr") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *IPAllocationPolicy) MarshalJSON() ([]byte, error) { - type noMethod IPAllocationPolicy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// KubernetesDashboard: Configuration for the Kubernetes Dashboard. -type KubernetesDashboard struct { - // Disabled: Whether the Kubernetes Dashboard is enabled for this - // cluster. - Disabled bool `json:"disabled,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Disabled") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Disabled") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *KubernetesDashboard) MarshalJSON() ([]byte, error) { - type noMethod KubernetesDashboard - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// LegacyAbac: Configuration for the legacy Attribute Based Access -// Control authorization -// mode. -type LegacyAbac struct { - // Enabled: Whether the ABAC authorizer is enabled for this cluster. - // When enabled, - // identities in the system, including service accounts, nodes, - // and - // controllers, will have statically granted permissions beyond - // those - // provided by the RBAC configuration or IAM. - Enabled bool `json:"enabled,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Enabled") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Enabled") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *LegacyAbac) MarshalJSON() ([]byte, error) { - type noMethod LegacyAbac - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListClustersResponse: ListClustersResponse is the result of -// ListClustersRequest. -type ListClustersResponse struct { - // Clusters: A list of clusters in the project in the specified zone, - // or - // across all ones. - Clusters []*Cluster `json:"clusters,omitempty"` - - // MissingZones: If any zones are listed here, the list of clusters - // returned - // may be missing those zones. - MissingZones []string `json:"missingZones,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Clusters") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Clusters") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ListClustersResponse) MarshalJSON() ([]byte, error) { - type noMethod ListClustersResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListNodePoolsResponse: ListNodePoolsResponse is the result of -// ListNodePoolsRequest. -type ListNodePoolsResponse struct { - // NodePools: A list of node pools for a cluster. - NodePools []*NodePool `json:"nodePools,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "NodePools") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "NodePools") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ListNodePoolsResponse) MarshalJSON() ([]byte, error) { - type noMethod ListNodePoolsResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListOperationsResponse: ListOperationsResponse is the result of -// ListOperationsRequest. -type ListOperationsResponse struct { - // MissingZones: If any zones are listed here, the list of operations - // returned - // may be missing the operations from those zones. - MissingZones []string `json:"missingZones,omitempty"` - - // Operations: A list of operations in the project in the specified - // zone. - Operations []*Operation `json:"operations,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "MissingZones") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "MissingZones") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { - type noMethod ListOperationsResponse - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// MasterAuth: The authentication information for accessing the master -// endpoint. -// Authentication can be done using HTTP basic auth or using -// client -// certificates. -type MasterAuth struct { - // ClientCertificate: [Output only] Base64-encoded public certificate - // used by clients to - // authenticate to the cluster endpoint. - ClientCertificate string `json:"clientCertificate,omitempty"` - - // ClientCertificateConfig: Configuration for client certificate - // authentication on the cluster. If no - // configuration is specified, a client certificate is issued. - ClientCertificateConfig *ClientCertificateConfig `json:"clientCertificateConfig,omitempty"` - - // ClientKey: [Output only] Base64-encoded private key used by clients - // to authenticate - // to the cluster endpoint. - ClientKey string `json:"clientKey,omitempty"` - - // ClusterCaCertificate: [Output only] Base64-encoded public certificate - // that is the root of - // trust for the cluster. - ClusterCaCertificate string `json:"clusterCaCertificate,omitempty"` - - // Password: The password to use for HTTP basic authentication to the - // master endpoint. - // Because the master endpoint is open to the Internet, you should - // create a - // strong password. If a password is provided for cluster creation, - // username - // must be non-empty. - Password string `json:"password,omitempty"` - - // Username: The username to use for HTTP basic authentication to the - // master endpoint. - // For clusters v1.6.0 and later, you can disable basic authentication - // by - // providing an empty username. - Username string `json:"username,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ClientCertificate") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ClientCertificate") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *MasterAuth) MarshalJSON() ([]byte, error) { - type noMethod MasterAuth - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// MasterAuthorizedNetworksConfig: Master authorized networks is a Beta -// feature. -// Configuration options for the master authorized networks feature. -// Enabled -// master authorized networks will disallow all external traffic to -// access -// Kubernetes master through HTTPS except traffic from the given CIDR -// blocks, -// Google Compute Engine Public IPs and Google Prod IPs. -type MasterAuthorizedNetworksConfig struct { - // CidrBlocks: cidr_blocks define up to 10 external networks that could - // access - // Kubernetes master through HTTPS. - CidrBlocks []*CidrBlock `json:"cidrBlocks,omitempty"` - - // Enabled: Whether or not master authorized networks is enabled. - Enabled bool `json:"enabled,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CidrBlocks") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CidrBlocks") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *MasterAuthorizedNetworksConfig) MarshalJSON() ([]byte, error) { - type noMethod MasterAuthorizedNetworksConfig - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// NetworkPolicy: Configuration options for the NetworkPolicy -// feature. -// https://kubernetes.io/docs/concepts/services-networking/netwo -// rkpolicies/ -type NetworkPolicy struct { - // Enabled: Whether network policy is enabled on the cluster. - Enabled bool `json:"enabled,omitempty"` - - // Provider: The selected network policy provider. - // - // Possible values: - // "PROVIDER_UNSPECIFIED" - Not set - // "CALICO" - Tigera (Calico Felix). - Provider string `json:"provider,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Enabled") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Enabled") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *NetworkPolicy) MarshalJSON() ([]byte, error) { - type noMethod NetworkPolicy - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// NodeConfig: Parameters that describe the nodes in a cluster. -type NodeConfig struct { - // Accelerators: A list of hardware accelerators to be attached to each - // node. - // See https://cloud.google.com/compute/docs/gpus for more information - // about - // support for GPUs. - Accelerators []*AcceleratorConfig `json:"accelerators,omitempty"` - - // DiskSizeGb: Size of the disk attached to each node, specified in - // GB. - // The smallest allowed disk size is 10GB. - // - // If unspecified, the default disk size is 100GB. - DiskSizeGb int64 `json:"diskSizeGb,omitempty"` - - // ImageType: The image type to use for this node. Note that for a given - // image type, - // the latest version of it will be used. - ImageType string `json:"imageType,omitempty"` - - // Labels: The map of Kubernetes labels (key/value pairs) to be applied - // to each node. - // These will added in addition to any default label(s) that - // Kubernetes may apply to the node. - // In case of conflict in label keys, the applied set may differ - // depending on - // the Kubernetes version -- it's best to assume the behavior is - // undefined - // and conflicts should be avoided. - // For more information, including usage and the valid values, - // see: - // http://kubernetes.io/v1.1/docs/user-guide/labels.html - Labels map[string]string `json:"labels,omitempty"` - - // LocalSsdCount: The number of local SSD disks to be attached to the - // node. - // - // The limit for this value is dependant upon the maximum number - // of - // disks available on a machine per zone. - // See: - // https://cloud.google.com/compute/docs/disks/local-ssd#local_ssd_l - // imits - // for more information. - LocalSsdCount int64 `json:"localSsdCount,omitempty"` - - // MachineType: The name of a Google Compute Engine - // [machine - // type](/compute/docs/machine-types) (e.g. - // `n1-standard-1`). - // - // If unspecified, the default machine type is - // `n1-standard-1`. - MachineType string `json:"machineType,omitempty"` - - // Metadata: The metadata key/value pairs assigned to instances in the - // cluster. - // - // Keys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 - // bytes - // in length. These are reflected as part of a URL in the metadata - // server. - // Additionally, to avoid ambiguity, keys must not conflict with any - // other - // metadata keys for the project or be one of the four reserved - // keys: - // "instance-template", "kube-env", "startup-script", and - // "user-data" - // - // Values are free-form strings, and only have meaning as interpreted - // by - // the image running in the instance. The only restriction placed on - // them is - // that each value's size must be less than or equal to 32 KB. - // - // The total size of all keys and values must be less than 512 KB. - Metadata map[string]string `json:"metadata,omitempty"` - - // OauthScopes: The set of Google API scopes to be made available on all - // of the - // node VMs under the "default" service account. - // - // The following scopes are recommended, but not required, and by - // default are - // not included: - // - // * `https://www.googleapis.com/auth/compute` is required for - // mounting - // persistent storage on your nodes. - // * `https://www.googleapis.com/auth/devstorage.read_only` is required - // for - // communicating with **gcr.io** - // (the [Google Container Registry](/container-registry/)). - // - // If unspecified, no scopes are added, unless Cloud Logging or - // Cloud - // Monitoring are enabled, in which case their required scopes will be - // added. - OauthScopes []string `json:"oauthScopes,omitempty"` - - // Preemptible: Whether the nodes are created as preemptible VM - // instances. - // See: - // https://cloud.google.com/compute/docs/instances/preemptible for - // more - // information about preemptible VM instances. - Preemptible bool `json:"preemptible,omitempty"` - - // ServiceAccount: The Google Cloud Platform Service Account to be used - // by the node VMs. If - // no Service Account is specified, the "default" service account is - // used. - ServiceAccount string `json:"serviceAccount,omitempty"` - - // Tags: The list of instance tags applied to all nodes. Tags are used - // to identify - // valid sources or targets for network firewalls and are specified - // by - // the client during cluster or node pool creation. Each tag within the - // list - // must comply with RFC1035. - Tags []string `json:"tags,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Accelerators") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Accelerators") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *NodeConfig) MarshalJSON() ([]byte, error) { - type noMethod NodeConfig - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// NodeManagement: NodeManagement defines the set of node management -// services turned on for the -// node pool. -type NodeManagement struct { - // AutoRepair: A flag that specifies whether the node auto-repair is - // enabled for the node - // pool. If enabled, the nodes in this node pool will be monitored and, - // if - // they fail health checks too many times, an automatic repair action - // will be - // triggered. - AutoRepair bool `json:"autoRepair,omitempty"` - - // AutoUpgrade: A flag that specifies whether node auto-upgrade is - // enabled for the node - // pool. If enabled, node auto-upgrade helps keep the nodes in your node - // pool - // up to date with the latest release version of Kubernetes. - AutoUpgrade bool `json:"autoUpgrade,omitempty"` - - // UpgradeOptions: Specifies the Auto Upgrade knobs for the node pool. - UpgradeOptions *AutoUpgradeOptions `json:"upgradeOptions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AutoRepair") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AutoRepair") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *NodeManagement) MarshalJSON() ([]byte, error) { - type noMethod NodeManagement - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// NodePool: NodePool contains the name and configuration for a -// cluster's node pool. -// Node pools are a set of nodes (i.e. VM's), with a common -// configuration and -// specification, under the control of the cluster master. They may have -// a set -// of Kubernetes labels applied to them, which may be used to reference -// them -// during pod scheduling. They may also be resized up or down, to -// accommodate -// the workload. -type NodePool struct { - // Autoscaling: Autoscaler configuration for this NodePool. Autoscaler - // is enabled - // only if a valid configuration is present. - Autoscaling *NodePoolAutoscaling `json:"autoscaling,omitempty"` - - // Config: The node configuration of the pool. - Config *NodeConfig `json:"config,omitempty"` - - // InitialNodeCount: The initial node count for the pool. You must - // ensure that your - // Compute Engine <a href="/compute/docs/resource-quotas">resource - // quota</a> - // is sufficient for this number of instances. You must also have - // available - // firewall and routes quota. - InitialNodeCount int64 `json:"initialNodeCount,omitempty"` - - // InstanceGroupUrls: [Output only] The resource URLs of - // [instance - // groups](/compute/docs/instance-groups/) associated with this - // node pool. - InstanceGroupUrls []string `json:"instanceGroupUrls,omitempty"` - - // Management: NodeManagement configuration for this NodePool. - Management *NodeManagement `json:"management,omitempty"` - - // Name: The name of the node pool. - Name string `json:"name,omitempty"` - - // SelfLink: [Output only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Status: [Output only] The status of the nodes in this pool instance. - // - // Possible values: - // "STATUS_UNSPECIFIED" - Not set. - // "PROVISIONING" - The PROVISIONING state indicates the node pool is - // being created. - // "RUNNING" - The RUNNING state indicates the node pool has been - // created - // and is fully usable. - // "RUNNING_WITH_ERROR" - The RUNNING_WITH_ERROR state indicates the - // node pool has been created - // and is partially usable. Some error state has occurred and - // some - // functionality may be impaired. Customer may need to reissue a - // request - // or trigger a new update. - // "RECONCILING" - The RECONCILING state indicates that some work is - // actively being done on - // the node pool, such as upgrading node software. Details can - // be found in the `statusMessage` field. - // "STOPPING" - The STOPPING state indicates the node pool is being - // deleted. - // "ERROR" - The ERROR state indicates the node pool may be unusable. - // Details - // can be found in the `statusMessage` field. - Status string `json:"status,omitempty"` - - // StatusMessage: [Output only] Additional information about the current - // status of this - // node pool instance, if available. - StatusMessage string `json:"statusMessage,omitempty"` - - // Version: [Output only] The version of the Kubernetes of this node. - Version string `json:"version,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Autoscaling") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Autoscaling") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *NodePool) MarshalJSON() ([]byte, error) { - type noMethod NodePool - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// NodePoolAutoscaling: NodePoolAutoscaling contains information -// required by cluster autoscaler to -// adjust the size of the node pool to the current cluster usage. -type NodePoolAutoscaling struct { - // Enabled: Is autoscaling enabled for this node pool. - Enabled bool `json:"enabled,omitempty"` - - // MaxNodeCount: Maximum number of nodes in the NodePool. Must be >= - // min_node_count. There - // has to enough quota to scale up the cluster. - MaxNodeCount int64 `json:"maxNodeCount,omitempty"` - - // MinNodeCount: Minimum number of nodes in the NodePool. Must be >= 1 - // and <= - // max_node_count. - MinNodeCount int64 `json:"minNodeCount,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Enabled") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Enabled") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *NodePoolAutoscaling) MarshalJSON() ([]byte, error) { - type noMethod NodePoolAutoscaling - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Operation: This operation resource represents operations that may -// have happened or are -// happening on the cluster. All fields are output only. -type Operation struct { - // Detail: Detailed operation progress, if available. - Detail string `json:"detail,omitempty"` - - // Name: The server-assigned ID for the operation. - Name string `json:"name,omitempty"` - - // OperationType: The operation type. - // - // Possible values: - // "TYPE_UNSPECIFIED" - Not set. - // "CREATE_CLUSTER" - Cluster create. - // "DELETE_CLUSTER" - Cluster delete. - // "UPGRADE_MASTER" - A master upgrade. - // "UPGRADE_NODES" - A node upgrade. - // "REPAIR_CLUSTER" - Cluster repair. - // "UPDATE_CLUSTER" - Cluster update. - // "CREATE_NODE_POOL" - Node pool create. - // "DELETE_NODE_POOL" - Node pool delete. - // "SET_NODE_POOL_MANAGEMENT" - Set node pool management. - // "AUTO_REPAIR_NODES" - Automatic node pool repair. - // "AUTO_UPGRADE_NODES" - Automatic node upgrade. - // "SET_LABELS" - Set labels. - // "SET_MASTER_AUTH" - Set/generate master auth materials - // "SET_NODE_POOL_SIZE" - Set node pool size. - // "SET_NETWORK_POLICY" - Updates network policy for a cluster. - OperationType string `json:"operationType,omitempty"` - - // SelfLink: Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Status: The current status of the operation. - // - // Possible values: - // "STATUS_UNSPECIFIED" - Not set. - // "PENDING" - The operation has been created. - // "RUNNING" - The operation is currently running. - // "DONE" - The operation is done, either cancelled or completed. - // "ABORTING" - The operation is aborting. - Status string `json:"status,omitempty"` - - // StatusMessage: If an error has occurred, a textual description of the - // error. - StatusMessage string `json:"statusMessage,omitempty"` - - // TargetLink: Server-defined URL for the target of the operation. - TargetLink string `json:"targetLink,omitempty"` - - // Zone: The name of the Google Compute - // Engine - // [zone](/compute/docs/zones#available) in which the operation - // is taking place. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Detail") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Detail") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Operation) MarshalJSON() ([]byte, error) { - type noMethod Operation - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RollbackNodePoolUpgradeRequest: RollbackNodePoolUpgradeRequest -// rollbacks the previously Aborted or Failed -// NodePool upgrade. This will be an no-op if the last upgrade -// successfully -// completed. -type RollbackNodePoolUpgradeRequest struct { -} - -// ServerConfig: Container Engine service configuration. -type ServerConfig struct { - // DefaultClusterVersion: Version of Kubernetes the service deploys by - // default. - DefaultClusterVersion string `json:"defaultClusterVersion,omitempty"` - - // DefaultImageType: Default image type. - DefaultImageType string `json:"defaultImageType,omitempty"` - - // ValidImageTypes: List of valid image types. - ValidImageTypes []string `json:"validImageTypes,omitempty"` - - // ValidMasterVersions: List of valid master versions. - ValidMasterVersions []string `json:"validMasterVersions,omitempty"` - - // ValidNodeVersions: List of valid node upgrade target versions. - ValidNodeVersions []string `json:"validNodeVersions,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. - // "DefaultClusterVersion") to unconditionally include in API requests. - // By default, fields with empty values are omitted from API requests. - // However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DefaultClusterVersion") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ServerConfig) MarshalJSON() ([]byte, error) { - type noMethod ServerConfig - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SetAddonsConfigRequest: SetAddonsConfigRequest sets the addons -// associated with the cluster. -type SetAddonsConfigRequest struct { - // AddonsConfig: The desired configurations for the various addons - // available to run in the - // cluster. - AddonsConfig *AddonsConfig `json:"addonsConfig,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AddonsConfig") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AddonsConfig") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SetAddonsConfigRequest) MarshalJSON() ([]byte, error) { - type noMethod SetAddonsConfigRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SetLabelsRequest: SetLabelsRequest sets the Google Cloud Platform -// labels on a Google Container -// Engine cluster, which will in turn set them for Google Compute -// Engine -// resources used by that cluster -type SetLabelsRequest struct { - // LabelFingerprint: The fingerprint of the previous set of labels for - // this resource, - // used to detect conflicts. The fingerprint is initially generated - // by - // Container Engine and changes after every request to modify or - // update - // labels. You must always provide an up-to-date fingerprint hash - // when - // updating or changing labels. Make a <code>get()</code> request to - // the - // resource to get the latest fingerprint. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // ResourceLabels: The labels to set for that cluster. - ResourceLabels map[string]string `json:"resourceLabels,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LabelFingerprint") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "LabelFingerprint") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *SetLabelsRequest) MarshalJSON() ([]byte, error) { - type noMethod SetLabelsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SetLegacyAbacRequest: SetLegacyAbacRequest enables or disables the -// ABAC authorization mechanism for -// a cluster. -type SetLegacyAbacRequest struct { - // Enabled: Whether ABAC authorization will be enabled in the cluster. - Enabled bool `json:"enabled,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Enabled") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Enabled") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SetLegacyAbacRequest) MarshalJSON() ([]byte, error) { - type noMethod SetLegacyAbacRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SetLocationsRequest: SetLocationsRequest sets the locations of the -// cluster. -type SetLocationsRequest struct { - // Locations: The desired list of Google Compute - // Engine - // [locations](/compute/docs/zones#available) in which the cluster's - // nodes - // should be located. Changing the locations a cluster is in will - // result - // in nodes being either created or removed from the cluster, depending - // on - // whether locations are being added or removed. - // - // This list must always include the cluster's primary zone. - Locations []string `json:"locations,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Locations") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Locations") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SetLocationsRequest) MarshalJSON() ([]byte, error) { - type noMethod SetLocationsRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SetLoggingServiceRequest: SetLoggingServiceRequest sets the logging -// service of a cluster. -type SetLoggingServiceRequest struct { - // LoggingService: The logging service the cluster should use to write - // metrics. - // Currently available options: - // - // * "logging.googleapis.com" - the Google Cloud Logging service - // * "none" - no metrics will be exported from the cluster - LoggingService string `json:"loggingService,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LoggingService") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "LoggingService") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *SetLoggingServiceRequest) MarshalJSON() ([]byte, error) { - type noMethod SetLoggingServiceRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SetMasterAuthRequest: SetMasterAuthRequest updates the admin password -// of a cluster. -type SetMasterAuthRequest struct { - // Action: The exact form of action to be taken on the master auth - // - // Possible values: - // "UNKNOWN" - Operation is unknown and will error out - // "SET_PASSWORD" - Set the password to a user generated value. - // "GENERATE_PASSWORD" - Generate a new password and set it to that. - Action string `json:"action,omitempty"` - - // Update: A description of the update. - Update *MasterAuth `json:"update,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Action") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SetMasterAuthRequest) MarshalJSON() ([]byte, error) { - type noMethod SetMasterAuthRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SetMonitoringServiceRequest: SetMonitoringServiceRequest sets the -// monitoring service of a cluster. -type SetMonitoringServiceRequest struct { - // MonitoringService: The monitoring service the cluster should use to - // write metrics. - // Currently available options: - // - // * "monitoring.googleapis.com" - the Google Cloud Monitoring service - // * "none" - no metrics will be exported from the cluster - MonitoringService string `json:"monitoringService,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MonitoringService") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "MonitoringService") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *SetMonitoringServiceRequest) MarshalJSON() ([]byte, error) { - type noMethod SetMonitoringServiceRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SetNetworkPolicyRequest: SetNetworkPolicyRequest enables/disables -// network policy for a cluster. -type SetNetworkPolicyRequest struct { - // NetworkPolicy: Configuration options for the NetworkPolicy feature. - NetworkPolicy *NetworkPolicy `json:"networkPolicy,omitempty"` - - // ForceSendFields is a list of field names (e.g. "NetworkPolicy") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "NetworkPolicy") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SetNetworkPolicyRequest) MarshalJSON() ([]byte, error) { - type noMethod SetNetworkPolicyRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SetNodePoolAutoscalingRequest: SetNodePoolAutoscalingRequest sets the -// autoscaler settings of a node pool. -type SetNodePoolAutoscalingRequest struct { - // Autoscaling: Autoscaling configuration for the node pool. - Autoscaling *NodePoolAutoscaling `json:"autoscaling,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Autoscaling") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Autoscaling") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SetNodePoolAutoscalingRequest) MarshalJSON() ([]byte, error) { - type noMethod SetNodePoolAutoscalingRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SetNodePoolManagementRequest: SetNodePoolManagementRequest sets the -// node management properties of a node -// pool. -type SetNodePoolManagementRequest struct { - // Management: NodeManagement configuration for the node pool. - Management *NodeManagement `json:"management,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Management") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Management") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SetNodePoolManagementRequest) MarshalJSON() ([]byte, error) { - type noMethod SetNodePoolManagementRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SetNodePoolSizeRequest: SetNodePoolSizeRequest sets the size a -// node -// pool. -type SetNodePoolSizeRequest struct { - // NodeCount: The desired node count for the pool. - NodeCount int64 `json:"nodeCount,omitempty"` - - // ForceSendFields is a list of field names (e.g. "NodeCount") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "NodeCount") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SetNodePoolSizeRequest) MarshalJSON() ([]byte, error) { - type noMethod SetNodePoolSizeRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// StartIPRotationRequest: StartIPRotationRequest creates a new IP for -// the cluster and then performs -// a node upgrade on each node pool to point to the new IP. -type StartIPRotationRequest struct { -} - -// UpdateClusterRequest: UpdateClusterRequest updates the settings of a -// cluster. -type UpdateClusterRequest struct { - // Update: A description of the update. - Update *ClusterUpdate `json:"update,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Update") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Update") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UpdateClusterRequest) MarshalJSON() ([]byte, error) { - type noMethod UpdateClusterRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// UpdateMasterRequest: UpdateMasterRequest updates the master of the -// cluster. -type UpdateMasterRequest struct { - // MasterVersion: The Kubernetes version to change the master to. The - // only valid value is the - // latest supported version. Use "-" to have the server automatically - // select - // the latest version. - MasterVersion string `json:"masterVersion,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MasterVersion") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "MasterVersion") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UpdateMasterRequest) MarshalJSON() ([]byte, error) { - type noMethod UpdateMasterRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// UpdateNodePoolRequest: UpdateNodePoolRequests update a node pool's -// image and/or version. -type UpdateNodePoolRequest struct { - // ImageType: The desired image type for the node pool. - ImageType string `json:"imageType,omitempty"` - - // NodeVersion: The Kubernetes version to change the nodes to (typically - // an - // upgrade). Use `-` to upgrade to the latest version supported by - // the server. - NodeVersion string `json:"nodeVersion,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ImageType") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ImageType") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UpdateNodePoolRequest) MarshalJSON() ([]byte, error) { - type noMethod UpdateNodePoolRequest - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// method id "container.projects.zones.getServerconfig": - -type ProjectsZonesGetServerconfigCall struct { - s *Service - projectId string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetServerconfig: Returns configuration info about the Container -// Engine service. -func (r *ProjectsZonesService) GetServerconfig(projectId string, zone string) *ProjectsZonesGetServerconfigCall { - c := &ProjectsZonesGetServerconfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsZonesGetServerconfigCall) Fields(s ...googleapi.Field) *ProjectsZonesGetServerconfigCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsZonesGetServerconfigCall) IfNoneMatch(entityTag string) *ProjectsZonesGetServerconfigCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsZonesGetServerconfigCall) Context(ctx context.Context) *ProjectsZonesGetServerconfigCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsZonesGetServerconfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesGetServerconfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/serverconfig") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.getServerconfig" call. -// Exactly one of *ServerConfig or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *ServerConfig.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsZonesGetServerconfigCall) Do(opts ...googleapi.CallOption) (*ServerConfig, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ServerConfig{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns configuration info about the Container Engine service.", - // "flatPath": "v1/projects/{projectId}/zones/{zone}/serverconfig", - // "httpMethod": "GET", - // "id": "container.projects.zones.getServerconfig", - // "parameterOrder": [ - // "projectId", - // "zone" - // ], - // "parameters": { - // "projectId": { - // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available)\nto return operations for.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/projects/{projectId}/zones/{zone}/serverconfig", - // "response": { - // "$ref": "ServerConfig" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "container.projects.zones.clusters.addons": - -type ProjectsZonesClustersAddonsCall struct { - s *Service - projectId string - zone string - clusterId string - setaddonsconfigrequest *SetAddonsConfigRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Addons: Sets the addons of a specific cluster. -func (r *ProjectsZonesClustersService) Addons(projectId string, zone string, clusterId string, setaddonsconfigrequest *SetAddonsConfigRequest) *ProjectsZonesClustersAddonsCall { - c := &ProjectsZonesClustersAddonsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.setaddonsconfigrequest = setaddonsconfigrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsZonesClustersAddonsCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersAddonsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsZonesClustersAddonsCall) Context(ctx context.Context) *ProjectsZonesClustersAddonsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsZonesClustersAddonsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersAddonsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setaddonsconfigrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/addons") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.addons" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsZonesClustersAddonsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the addons of a specific cluster.", - // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/addons", - // "httpMethod": "POST", - // "id": "container.projects.zones.clusters.addons", - // "parameterOrder": [ - // "projectId", - // "zone", - // "clusterId" - // ], - // "parameters": { - // "clusterId": { - // "description": "The name of the cluster to upgrade.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/addons", - // "request": { - // "$ref": "SetAddonsConfigRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "container.projects.zones.clusters.completeIpRotation": - -type ProjectsZonesClustersCompleteIpRotationCall struct { - s *Service - projectId string - zone string - clusterId string - completeiprotationrequest *CompleteIPRotationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CompleteIpRotation: Completes master IP rotation. -func (r *ProjectsZonesClustersService) CompleteIpRotation(projectId string, zone string, clusterId string, completeiprotationrequest *CompleteIPRotationRequest) *ProjectsZonesClustersCompleteIpRotationCall { - c := &ProjectsZonesClustersCompleteIpRotationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.completeiprotationrequest = completeiprotationrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsZonesClustersCompleteIpRotationCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersCompleteIpRotationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsZonesClustersCompleteIpRotationCall) Context(ctx context.Context) *ProjectsZonesClustersCompleteIpRotationCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsZonesClustersCompleteIpRotationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersCompleteIpRotationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.completeiprotationrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.completeIpRotation" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsZonesClustersCompleteIpRotationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Completes master IP rotation.", - // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation", - // "httpMethod": "POST", - // "id": "container.projects.zones.clusters.completeIpRotation", - // "parameterOrder": [ - // "projectId", - // "zone", - // "clusterId" - // ], - // "parameters": { - // "clusterId": { - // "description": "The name of the cluster.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation", - // "request": { - // "$ref": "CompleteIPRotationRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "container.projects.zones.clusters.create": - -type ProjectsZonesClustersCreateCall struct { - s *Service - projectId string - zone string - createclusterrequest *CreateClusterRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a cluster, consisting of the specified number and -// type of Google -// Compute Engine instances. -// -// By default, the cluster is created in the project's -// [default -// network](/compute/docs/networks-and-firewalls#networks). -// -// One firewall is added for the cluster. After cluster creation, -// the cluster creates routes for each node to allow the containers -// on that node to communicate with all other instances in -// the -// cluster. -// -// Finally, an entry is added to the project's global metadata -// indicating -// which CIDR range is being used by the cluster. -func (r *ProjectsZonesClustersService) Create(projectId string, zone string, createclusterrequest *CreateClusterRequest) *ProjectsZonesClustersCreateCall { - c := &ProjectsZonesClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.createclusterrequest = createclusterrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsZonesClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsZonesClustersCreateCall) Context(ctx context.Context) *ProjectsZonesClustersCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsZonesClustersCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.createclusterrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.create" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsZonesClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe cluster creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range is being used by the cluster.", - // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters", - // "httpMethod": "POST", - // "id": "container.projects.zones.clusters.create", - // "parameterOrder": [ - // "projectId", - // "zone" - // ], - // "parameters": { - // "projectId": { - // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/projects/{projectId}/zones/{zone}/clusters", - // "request": { - // "$ref": "CreateClusterRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "container.projects.zones.clusters.delete": - -type ProjectsZonesClustersDeleteCall struct { - s *Service - projectId string - zone string - clusterId string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the cluster, including the Kubernetes endpoint and -// all worker -// nodes. -// -// Firewalls and routes that were configured during cluster creation -// are also deleted. -// -// Other Google Compute Engine resources that might be in use by the -// cluster -// (e.g. load balancer resources) will not be deleted if they weren't -// present -// at the initial create time. -func (r *ProjectsZonesClustersService) Delete(projectId string, zone string, clusterId string) *ProjectsZonesClustersDeleteCall { - c := &ProjectsZonesClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsZonesClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsZonesClustersDeleteCall) Context(ctx context.Context) *ProjectsZonesClustersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsZonesClustersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsZonesClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster\n(e.g. load balancer resources) will not be deleted if they weren't present\nat the initial create time.", - // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", - // "httpMethod": "DELETE", - // "id": "container.projects.zones.clusters.delete", - // "parameterOrder": [ - // "projectId", - // "zone", - // "clusterId" - // ], - // "parameters": { - // "clusterId": { - // "description": "The name of the cluster to delete.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "container.projects.zones.clusters.get": - -type ProjectsZonesClustersGetCall struct { - s *Service - projectId string - zone string - clusterId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the details of a specific cluster. -func (r *ProjectsZonesClustersService) Get(projectId string, zone string, clusterId string) *ProjectsZonesClustersGetCall { - c := &ProjectsZonesClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsZonesClustersGetCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsZonesClustersGetCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsZonesClustersGetCall) Context(ctx context.Context) *ProjectsZonesClustersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsZonesClustersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.get" call. -// Exactly one of *Cluster or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Cluster.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsZonesClustersGetCall) Do(opts ...googleapi.CallOption) (*Cluster, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Cluster{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the details of a specific cluster.", - // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", - // "httpMethod": "GET", - // "id": "container.projects.zones.clusters.get", - // "parameterOrder": [ - // "projectId", - // "zone", - // "clusterId" - // ], - // "parameters": { - // "clusterId": { - // "description": "The name of the cluster to retrieve.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", - // "response": { - // "$ref": "Cluster" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "container.projects.zones.clusters.legacyAbac": - -type ProjectsZonesClustersLegacyAbacCall struct { - s *Service - projectId string - zone string - clusterId string - setlegacyabacrequest *SetLegacyAbacRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// LegacyAbac: Enables or disables the ABAC authorization mechanism on a -// cluster. -func (r *ProjectsZonesClustersService) LegacyAbac(projectId string, zone string, clusterId string, setlegacyabacrequest *SetLegacyAbacRequest) *ProjectsZonesClustersLegacyAbacCall { - c := &ProjectsZonesClustersLegacyAbacCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.setlegacyabacrequest = setlegacyabacrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsZonesClustersLegacyAbacCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersLegacyAbacCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsZonesClustersLegacyAbacCall) Context(ctx context.Context) *ProjectsZonesClustersLegacyAbacCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsZonesClustersLegacyAbacCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersLegacyAbacCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setlegacyabacrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.legacyAbac" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsZonesClustersLegacyAbacCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Enables or disables the ABAC authorization mechanism on a cluster.", - // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac", - // "httpMethod": "POST", - // "id": "container.projects.zones.clusters.legacyAbac", - // "parameterOrder": [ - // "projectId", - // "zone", - // "clusterId" - // ], - // "parameters": { - // "clusterId": { - // "description": "The name of the cluster to update.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac", - // "request": { - // "$ref": "SetLegacyAbacRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "container.projects.zones.clusters.list": - -type ProjectsZonesClustersListCall struct { - s *Service - projectId string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all clusters owned by a project in either the specified -// zone or all -// zones. -func (r *ProjectsZonesClustersService) List(projectId string, zone string) *ProjectsZonesClustersListCall { - c := &ProjectsZonesClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsZonesClustersListCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsZonesClustersListCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsZonesClustersListCall) Context(ctx context.Context) *ProjectsZonesClustersListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsZonesClustersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.list" call. -// Exactly one of *ListClustersResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListClustersResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsZonesClustersListCall) Do(opts ...googleapi.CallOption) (*ListClustersResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ListClustersResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists all clusters owned by a project in either the specified zone or all\nzones.", - // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters", - // "httpMethod": "GET", - // "id": "container.projects.zones.clusters.list", - // "parameterOrder": [ - // "projectId", - // "zone" - // ], - // "parameters": { - // "projectId": { - // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides, or \"-\" for all zones.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/projects/{projectId}/zones/{zone}/clusters", - // "response": { - // "$ref": "ListClustersResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "container.projects.zones.clusters.locations": - -type ProjectsZonesClustersLocationsCall struct { - s *Service - projectId string - zone string - clusterId string - setlocationsrequest *SetLocationsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Locations: Sets the locations of a specific cluster. -func (r *ProjectsZonesClustersService) Locations(projectId string, zone string, clusterId string, setlocationsrequest *SetLocationsRequest) *ProjectsZonesClustersLocationsCall { - c := &ProjectsZonesClustersLocationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.setlocationsrequest = setlocationsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsZonesClustersLocationsCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersLocationsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsZonesClustersLocationsCall) Context(ctx context.Context) *ProjectsZonesClustersLocationsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsZonesClustersLocationsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersLocationsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setlocationsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.locations" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsZonesClustersLocationsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the locations of a specific cluster.", - // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations", - // "httpMethod": "POST", - // "id": "container.projects.zones.clusters.locations", - // "parameterOrder": [ - // "projectId", - // "zone", - // "clusterId" - // ], - // "parameters": { - // "clusterId": { - // "description": "The name of the cluster to upgrade.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations", - // "request": { - // "$ref": "SetLocationsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "container.projects.zones.clusters.logging": - -type ProjectsZonesClustersLoggingCall struct { - s *Service - projectId string - zone string - clusterId string - setloggingservicerequest *SetLoggingServiceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Logging: Sets the logging service of a specific cluster. -func (r *ProjectsZonesClustersService) Logging(projectId string, zone string, clusterId string, setloggingservicerequest *SetLoggingServiceRequest) *ProjectsZonesClustersLoggingCall { - c := &ProjectsZonesClustersLoggingCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.setloggingservicerequest = setloggingservicerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsZonesClustersLoggingCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersLoggingCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsZonesClustersLoggingCall) Context(ctx context.Context) *ProjectsZonesClustersLoggingCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsZonesClustersLoggingCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersLoggingCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setloggingservicerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/logging") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.logging" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsZonesClustersLoggingCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the logging service of a specific cluster.", - // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/logging", - // "httpMethod": "POST", - // "id": "container.projects.zones.clusters.logging", - // "parameterOrder": [ - // "projectId", - // "zone", - // "clusterId" - // ], - // "parameters": { - // "clusterId": { - // "description": "The name of the cluster to upgrade.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/logging", - // "request": { - // "$ref": "SetLoggingServiceRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "container.projects.zones.clusters.master": - -type ProjectsZonesClustersMasterCall struct { - s *Service - projectId string - zone string - clusterId string - updatemasterrequest *UpdateMasterRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Master: Updates the master of a specific cluster. -func (r *ProjectsZonesClustersService) Master(projectId string, zone string, clusterId string, updatemasterrequest *UpdateMasterRequest) *ProjectsZonesClustersMasterCall { - c := &ProjectsZonesClustersMasterCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.updatemasterrequest = updatemasterrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsZonesClustersMasterCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersMasterCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsZonesClustersMasterCall) Context(ctx context.Context) *ProjectsZonesClustersMasterCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsZonesClustersMasterCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersMasterCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatemasterrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/master") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.master" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsZonesClustersMasterCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the master of a specific cluster.", - // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/master", - // "httpMethod": "POST", - // "id": "container.projects.zones.clusters.master", - // "parameterOrder": [ - // "projectId", - // "zone", - // "clusterId" - // ], - // "parameters": { - // "clusterId": { - // "description": "The name of the cluster to upgrade.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/master", - // "request": { - // "$ref": "UpdateMasterRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "container.projects.zones.clusters.monitoring": - -type ProjectsZonesClustersMonitoringCall struct { - s *Service - projectId string - zone string - clusterId string - setmonitoringservicerequest *SetMonitoringServiceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Monitoring: Sets the monitoring service of a specific cluster. -func (r *ProjectsZonesClustersService) Monitoring(projectId string, zone string, clusterId string, setmonitoringservicerequest *SetMonitoringServiceRequest) *ProjectsZonesClustersMonitoringCall { - c := &ProjectsZonesClustersMonitoringCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.setmonitoringservicerequest = setmonitoringservicerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsZonesClustersMonitoringCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersMonitoringCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsZonesClustersMonitoringCall) Context(ctx context.Context) *ProjectsZonesClustersMonitoringCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsZonesClustersMonitoringCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersMonitoringCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setmonitoringservicerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/monitoring") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.monitoring" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsZonesClustersMonitoringCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the monitoring service of a specific cluster.", - // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/monitoring", - // "httpMethod": "POST", - // "id": "container.projects.zones.clusters.monitoring", - // "parameterOrder": [ - // "projectId", - // "zone", - // "clusterId" - // ], - // "parameters": { - // "clusterId": { - // "description": "The name of the cluster to upgrade.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/monitoring", - // "request": { - // "$ref": "SetMonitoringServiceRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "container.projects.zones.clusters.resourceLabels": - -type ProjectsZonesClustersResourceLabelsCall struct { - s *Service - projectId string - zone string - clusterId string - setlabelsrequest *SetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ResourceLabels: Sets labels on a cluster. -func (r *ProjectsZonesClustersService) ResourceLabels(projectId string, zone string, clusterId string, setlabelsrequest *SetLabelsRequest) *ProjectsZonesClustersResourceLabelsCall { - c := &ProjectsZonesClustersResourceLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.setlabelsrequest = setlabelsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsZonesClustersResourceLabelsCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersResourceLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsZonesClustersResourceLabelsCall) Context(ctx context.Context) *ProjectsZonesClustersResourceLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsZonesClustersResourceLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersResourceLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setlabelsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.resourceLabels" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsZonesClustersResourceLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets labels on a cluster.", - // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels", - // "httpMethod": "POST", - // "id": "container.projects.zones.clusters.resourceLabels", - // "parameterOrder": [ - // "projectId", - // "zone", - // "clusterId" - // ], - // "parameters": { - // "clusterId": { - // "description": "The name of the cluster.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels", - // "request": { - // "$ref": "SetLabelsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "container.projects.zones.clusters.setMasterAuth": - -type ProjectsZonesClustersSetMasterAuthCall struct { - s *Service - projectId string - zone string - clusterId string - setmasterauthrequest *SetMasterAuthRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetMasterAuth: Used to set master auth materials. Currently supports -// :- -// Changing the admin password of a specific cluster. -// This can be either via password generation or explicitly set the -// password. -func (r *ProjectsZonesClustersService) SetMasterAuth(projectId string, zone string, clusterId string, setmasterauthrequest *SetMasterAuthRequest) *ProjectsZonesClustersSetMasterAuthCall { - c := &ProjectsZonesClustersSetMasterAuthCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.setmasterauthrequest = setmasterauthrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsZonesClustersSetMasterAuthCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersSetMasterAuthCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsZonesClustersSetMasterAuthCall) Context(ctx context.Context) *ProjectsZonesClustersSetMasterAuthCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsZonesClustersSetMasterAuthCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersSetMasterAuthCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setmasterauthrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.setMasterAuth" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsZonesClustersSetMasterAuthCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Used to set master auth materials. Currently supports :-\nChanging the admin password of a specific cluster.\nThis can be either via password generation or explicitly set the password.", - // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth", - // "httpMethod": "POST", - // "id": "container.projects.zones.clusters.setMasterAuth", - // "parameterOrder": [ - // "projectId", - // "zone", - // "clusterId" - // ], - // "parameters": { - // "clusterId": { - // "description": "The name of the cluster to upgrade.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth", - // "request": { - // "$ref": "SetMasterAuthRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "container.projects.zones.clusters.setNetworkPolicy": - -type ProjectsZonesClustersSetNetworkPolicyCall struct { - s *Service - projectId string - zone string - clusterId string - setnetworkpolicyrequest *SetNetworkPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetNetworkPolicy: Enables/Disables Network Policy for a cluster. -func (r *ProjectsZonesClustersService) SetNetworkPolicy(projectId string, zone string, clusterId string, setnetworkpolicyrequest *SetNetworkPolicyRequest) *ProjectsZonesClustersSetNetworkPolicyCall { - c := &ProjectsZonesClustersSetNetworkPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.setnetworkpolicyrequest = setnetworkpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsZonesClustersSetNetworkPolicyCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersSetNetworkPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsZonesClustersSetNetworkPolicyCall) Context(ctx context.Context) *ProjectsZonesClustersSetNetworkPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsZonesClustersSetNetworkPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersSetNetworkPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnetworkpolicyrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.setNetworkPolicy" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsZonesClustersSetNetworkPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Enables/Disables Network Policy for a cluster.", - // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy", - // "httpMethod": "POST", - // "id": "container.projects.zones.clusters.setNetworkPolicy", - // "parameterOrder": [ - // "projectId", - // "zone", - // "clusterId" - // ], - // "parameters": { - // "clusterId": { - // "description": "The name of the cluster.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy", - // "request": { - // "$ref": "SetNetworkPolicyRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "container.projects.zones.clusters.startIpRotation": - -type ProjectsZonesClustersStartIpRotationCall struct { - s *Service - projectId string - zone string - clusterId string - startiprotationrequest *StartIPRotationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StartIpRotation: Start master IP rotation. -func (r *ProjectsZonesClustersService) StartIpRotation(projectId string, zone string, clusterId string, startiprotationrequest *StartIPRotationRequest) *ProjectsZonesClustersStartIpRotationCall { - c := &ProjectsZonesClustersStartIpRotationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.startiprotationrequest = startiprotationrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsZonesClustersStartIpRotationCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersStartIpRotationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsZonesClustersStartIpRotationCall) Context(ctx context.Context) *ProjectsZonesClustersStartIpRotationCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsZonesClustersStartIpRotationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersStartIpRotationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.startiprotationrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.startIpRotation" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsZonesClustersStartIpRotationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Start master IP rotation.", - // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation", - // "httpMethod": "POST", - // "id": "container.projects.zones.clusters.startIpRotation", - // "parameterOrder": [ - // "projectId", - // "zone", - // "clusterId" - // ], - // "parameters": { - // "clusterId": { - // "description": "The name of the cluster.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation", - // "request": { - // "$ref": "StartIPRotationRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "container.projects.zones.clusters.update": - -type ProjectsZonesClustersUpdateCall struct { - s *Service - projectId string - zone string - clusterId string - updateclusterrequest *UpdateClusterRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the settings of a specific cluster. -func (r *ProjectsZonesClustersService) Update(projectId string, zone string, clusterId string, updateclusterrequest *UpdateClusterRequest) *ProjectsZonesClustersUpdateCall { - c := &ProjectsZonesClustersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.updateclusterrequest = updateclusterrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsZonesClustersUpdateCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsZonesClustersUpdateCall) Context(ctx context.Context) *ProjectsZonesClustersUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsZonesClustersUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.updateclusterrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("PUT", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsZonesClustersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the settings of a specific cluster.", - // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", - // "httpMethod": "PUT", - // "id": "container.projects.zones.clusters.update", - // "parameterOrder": [ - // "projectId", - // "zone", - // "clusterId" - // ], - // "parameters": { - // "clusterId": { - // "description": "The name of the cluster to upgrade.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", - // "request": { - // "$ref": "UpdateClusterRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "container.projects.zones.clusters.nodePools.autoscaling": - -type ProjectsZonesClustersNodePoolsAutoscalingCall struct { - s *Service - projectId string - zone string - clusterId string - nodePoolId string - setnodepoolautoscalingrequest *SetNodePoolAutoscalingRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Autoscaling: Sets the autoscaling settings of a specific node pool. -func (r *ProjectsZonesClustersNodePoolsService) Autoscaling(projectId string, zone string, clusterId string, nodePoolId string, setnodepoolautoscalingrequest *SetNodePoolAutoscalingRequest) *ProjectsZonesClustersNodePoolsAutoscalingCall { - c := &ProjectsZonesClustersNodePoolsAutoscalingCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.nodePoolId = nodePoolId - c.setnodepoolautoscalingrequest = setnodepoolautoscalingrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsAutoscalingCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsAutoscalingCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnodepoolautoscalingrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - "nodePoolId": c.nodePoolId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.nodePools.autoscaling" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the autoscaling settings of a specific node pool.", - // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling", - // "httpMethod": "POST", - // "id": "container.projects.zones.clusters.nodePools.autoscaling", - // "parameterOrder": [ - // "projectId", - // "zone", - // "clusterId", - // "nodePoolId" - // ], - // "parameters": { - // "clusterId": { - // "description": "The name of the cluster to upgrade.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "nodePoolId": { - // "description": "The name of the node pool to upgrade.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling", - // "request": { - // "$ref": "SetNodePoolAutoscalingRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "container.projects.zones.clusters.nodePools.create": - -type ProjectsZonesClustersNodePoolsCreateCall struct { - s *Service - projectId string - zone string - clusterId string - createnodepoolrequest *CreateNodePoolRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a node pool for a cluster. -func (r *ProjectsZonesClustersNodePoolsService) Create(projectId string, zone string, clusterId string, createnodepoolrequest *CreateNodePoolRequest) *ProjectsZonesClustersNodePoolsCreateCall { - c := &ProjectsZonesClustersNodePoolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.createnodepoolrequest = createnodepoolrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsZonesClustersNodePoolsCreateCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsZonesClustersNodePoolsCreateCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsZonesClustersNodePoolsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersNodePoolsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.createnodepoolrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.nodePools.create" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsZonesClustersNodePoolsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a node pool for a cluster.", - // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", - // "httpMethod": "POST", - // "id": "container.projects.zones.clusters.nodePools.create", - // "parameterOrder": [ - // "projectId", - // "zone", - // "clusterId" - // ], - // "parameters": { - // "clusterId": { - // "description": "The name of the cluster.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", - // "request": { - // "$ref": "CreateNodePoolRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "container.projects.zones.clusters.nodePools.delete": - -type ProjectsZonesClustersNodePoolsDeleteCall struct { - s *Service - projectId string - zone string - clusterId string - nodePoolId string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a node pool from a cluster. -func (r *ProjectsZonesClustersNodePoolsService) Delete(projectId string, zone string, clusterId string, nodePoolId string) *ProjectsZonesClustersNodePoolsDeleteCall { - c := &ProjectsZonesClustersNodePoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.nodePoolId = nodePoolId - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsZonesClustersNodePoolsDeleteCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsZonesClustersNodePoolsDeleteCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsZonesClustersNodePoolsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersNodePoolsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - "nodePoolId": c.nodePoolId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.nodePools.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsZonesClustersNodePoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes a node pool from a cluster.", - // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", - // "httpMethod": "DELETE", - // "id": "container.projects.zones.clusters.nodePools.delete", - // "parameterOrder": [ - // "projectId", - // "zone", - // "clusterId", - // "nodePoolId" - // ], - // "parameters": { - // "clusterId": { - // "description": "The name of the cluster.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "nodePoolId": { - // "description": "The name of the node pool to delete.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "container.projects.zones.clusters.nodePools.get": - -type ProjectsZonesClustersNodePoolsGetCall struct { - s *Service - projectId string - zone string - clusterId string - nodePoolId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves the node pool requested. -func (r *ProjectsZonesClustersNodePoolsService) Get(projectId string, zone string, clusterId string, nodePoolId string) *ProjectsZonesClustersNodePoolsGetCall { - c := &ProjectsZonesClustersNodePoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.nodePoolId = nodePoolId - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsZonesClustersNodePoolsGetCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsZonesClustersNodePoolsGetCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersNodePoolsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsZonesClustersNodePoolsGetCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsZonesClustersNodePoolsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersNodePoolsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - "nodePoolId": c.nodePoolId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.nodePools.get" call. -// Exactly one of *NodePool or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *NodePool.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsZonesClustersNodePoolsGetCall) Do(opts ...googleapi.CallOption) (*NodePool, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &NodePool{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves the node pool requested.", - // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", - // "httpMethod": "GET", - // "id": "container.projects.zones.clusters.nodePools.get", - // "parameterOrder": [ - // "projectId", - // "zone", - // "clusterId", - // "nodePoolId" - // ], - // "parameters": { - // "clusterId": { - // "description": "The name of the cluster.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "nodePoolId": { - // "description": "The name of the node pool.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", - // "response": { - // "$ref": "NodePool" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "container.projects.zones.clusters.nodePools.list": - -type ProjectsZonesClustersNodePoolsListCall struct { - s *Service - projectId string - zone string - clusterId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the node pools for a cluster. -func (r *ProjectsZonesClustersNodePoolsService) List(projectId string, zone string, clusterId string) *ProjectsZonesClustersNodePoolsListCall { - c := &ProjectsZonesClustersNodePoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsZonesClustersNodePoolsListCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsZonesClustersNodePoolsListCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersNodePoolsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsZonesClustersNodePoolsListCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsZonesClustersNodePoolsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersNodePoolsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.nodePools.list" call. -// Exactly one of *ListNodePoolsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListNodePoolsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsZonesClustersNodePoolsListCall) Do(opts ...googleapi.CallOption) (*ListNodePoolsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ListNodePoolsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists the node pools for a cluster.", - // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", - // "httpMethod": "GET", - // "id": "container.projects.zones.clusters.nodePools.list", - // "parameterOrder": [ - // "projectId", - // "zone", - // "clusterId" - // ], - // "parameters": { - // "clusterId": { - // "description": "The name of the cluster.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", - // "response": { - // "$ref": "ListNodePoolsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "container.projects.zones.clusters.nodePools.rollback": - -type ProjectsZonesClustersNodePoolsRollbackCall struct { - s *Service - projectId string - zone string - clusterId string - nodePoolId string - rollbacknodepoolupgraderequest *RollbackNodePoolUpgradeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Rollback: Roll back the previously Aborted or Failed NodePool -// upgrade. -// This will be an no-op if the last upgrade successfully completed. -func (r *ProjectsZonesClustersNodePoolsService) Rollback(projectId string, zone string, clusterId string, nodePoolId string, rollbacknodepoolupgraderequest *RollbackNodePoolUpgradeRequest) *ProjectsZonesClustersNodePoolsRollbackCall { - c := &ProjectsZonesClustersNodePoolsRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.nodePoolId = nodePoolId - c.rollbacknodepoolupgraderequest = rollbacknodepoolupgraderequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsZonesClustersNodePoolsRollbackCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsRollbackCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsZonesClustersNodePoolsRollbackCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsRollbackCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsZonesClustersNodePoolsRollbackCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersNodePoolsRollbackCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.rollbacknodepoolupgraderequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - "nodePoolId": c.nodePoolId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.nodePools.rollback" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsZonesClustersNodePoolsRollbackCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Roll back the previously Aborted or Failed NodePool upgrade.\nThis will be an no-op if the last upgrade successfully completed.", - // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback", - // "httpMethod": "POST", - // "id": "container.projects.zones.clusters.nodePools.rollback", - // "parameterOrder": [ - // "projectId", - // "zone", - // "clusterId", - // "nodePoolId" - // ], - // "parameters": { - // "clusterId": { - // "description": "The name of the cluster to rollback.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "nodePoolId": { - // "description": "The name of the node pool to rollback.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback", - // "request": { - // "$ref": "RollbackNodePoolUpgradeRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "container.projects.zones.clusters.nodePools.setManagement": - -type ProjectsZonesClustersNodePoolsSetManagementCall struct { - s *Service - projectId string - zone string - clusterId string - nodePoolId string - setnodepoolmanagementrequest *SetNodePoolManagementRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetManagement: Sets the NodeManagement options for a node pool. -func (r *ProjectsZonesClustersNodePoolsService) SetManagement(projectId string, zone string, clusterId string, nodePoolId string, setnodepoolmanagementrequest *SetNodePoolManagementRequest) *ProjectsZonesClustersNodePoolsSetManagementCall { - c := &ProjectsZonesClustersNodePoolsSetManagementCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.nodePoolId = nodePoolId - c.setnodepoolmanagementrequest = setnodepoolmanagementrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsZonesClustersNodePoolsSetManagementCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsSetManagementCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsZonesClustersNodePoolsSetManagementCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsSetManagementCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsZonesClustersNodePoolsSetManagementCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersNodePoolsSetManagementCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnodepoolmanagementrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - "nodePoolId": c.nodePoolId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.nodePools.setManagement" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsZonesClustersNodePoolsSetManagementCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the NodeManagement options for a node pool.", - // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement", - // "httpMethod": "POST", - // "id": "container.projects.zones.clusters.nodePools.setManagement", - // "parameterOrder": [ - // "projectId", - // "zone", - // "clusterId", - // "nodePoolId" - // ], - // "parameters": { - // "clusterId": { - // "description": "The name of the cluster to update.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "nodePoolId": { - // "description": "The name of the node pool to update.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement", - // "request": { - // "$ref": "SetNodePoolManagementRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "container.projects.zones.clusters.nodePools.setSize": - -type ProjectsZonesClustersNodePoolsSetSizeCall struct { - s *Service - projectId string - zone string - clusterId string - nodePoolId string - setnodepoolsizerequest *SetNodePoolSizeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSize: Sets the size of a specific node pool. -func (r *ProjectsZonesClustersNodePoolsService) SetSize(projectId string, zone string, clusterId string, nodePoolId string, setnodepoolsizerequest *SetNodePoolSizeRequest) *ProjectsZonesClustersNodePoolsSetSizeCall { - c := &ProjectsZonesClustersNodePoolsSetSizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.nodePoolId = nodePoolId - c.setnodepoolsizerequest = setnodepoolsizerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsZonesClustersNodePoolsSetSizeCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsSetSizeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsZonesClustersNodePoolsSetSizeCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsSetSizeCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsZonesClustersNodePoolsSetSizeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersNodePoolsSetSizeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setnodepoolsizerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setSize") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - "nodePoolId": c.nodePoolId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.nodePools.setSize" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsZonesClustersNodePoolsSetSizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the size of a specific node pool.", - // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setSize", - // "httpMethod": "POST", - // "id": "container.projects.zones.clusters.nodePools.setSize", - // "parameterOrder": [ - // "projectId", - // "zone", - // "clusterId", - // "nodePoolId" - // ], - // "parameters": { - // "clusterId": { - // "description": "The name of the cluster to update.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "nodePoolId": { - // "description": "The name of the node pool to update.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setSize", - // "request": { - // "$ref": "SetNodePoolSizeRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "container.projects.zones.clusters.nodePools.update": - -type ProjectsZonesClustersNodePoolsUpdateCall struct { - s *Service - projectId string - zone string - clusterId string - nodePoolId string - updatenodepoolrequest *UpdateNodePoolRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the version and/or image type of a specific node -// pool. -func (r *ProjectsZonesClustersNodePoolsService) Update(projectId string, zone string, clusterId string, nodePoolId string, updatenodepoolrequest *UpdateNodePoolRequest) *ProjectsZonesClustersNodePoolsUpdateCall { - c := &ProjectsZonesClustersNodePoolsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.nodePoolId = nodePoolId - c.updatenodepoolrequest = updatenodepoolrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsZonesClustersNodePoolsUpdateCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsZonesClustersNodePoolsUpdateCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsZonesClustersNodePoolsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersNodePoolsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatenodepoolrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - "nodePoolId": c.nodePoolId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.nodePools.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsZonesClustersNodePoolsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the version and/or image type of a specific node pool.", - // "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update", - // "httpMethod": "POST", - // "id": "container.projects.zones.clusters.nodePools.update", - // "parameterOrder": [ - // "projectId", - // "zone", - // "clusterId", - // "nodePoolId" - // ], - // "parameters": { - // "clusterId": { - // "description": "The name of the cluster to upgrade.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "nodePoolId": { - // "description": "The name of the node pool to upgrade.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update", - // "request": { - // "$ref": "UpdateNodePoolRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "container.projects.zones.operations.cancel": - -type ProjectsZonesOperationsCancelCall struct { - s *Service - projectId string - zone string - operationId string - canceloperationrequest *CancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Cancels the specified operation. -func (r *ProjectsZonesOperationsService) Cancel(projectId string, zone string, operationId string, canceloperationrequest *CancelOperationRequest) *ProjectsZonesOperationsCancelCall { - c := &ProjectsZonesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.operationId = operationId - c.canceloperationrequest = canceloperationrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsZonesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsZonesOperationsCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsZonesOperationsCancelCall) Context(ctx context.Context) *ProjectsZonesOperationsCancelCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsZonesOperationsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "operationId": c.operationId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.operations.cancel" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsZonesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Cancels the specified operation.", - // "flatPath": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel", - // "httpMethod": "POST", - // "id": "container.projects.zones.operations.cancel", - // "parameterOrder": [ - // "projectId", - // "zone", - // "operationId" - // ], - // "parameters": { - // "operationId": { - // "description": "The server-assigned `name` of the operation.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the operation resides.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel", - // "request": { - // "$ref": "CancelOperationRequest" - // }, - // "response": { - // "$ref": "Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "container.projects.zones.operations.get": - -type ProjectsZonesOperationsGetCall struct { - s *Service - projectId string - zone string - operationId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the specified operation. -func (r *ProjectsZonesOperationsService) Get(projectId string, zone string, operationId string) *ProjectsZonesOperationsGetCall { - c := &ProjectsZonesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.operationId = operationId - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsZonesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsZonesOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsZonesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsZonesOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsZonesOperationsGetCall) Context(ctx context.Context) *ProjectsZonesOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsZonesOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/operations/{operationId}") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "operationId": c.operationId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.operations.get" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsZonesOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the specified operation.", - // "flatPath": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}", - // "httpMethod": "GET", - // "id": "container.projects.zones.operations.get", - // "parameterOrder": [ - // "projectId", - // "zone", - // "operationId" - // ], - // "parameters": { - // "operationId": { - // "description": "The server-assigned `name` of the operation.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "projectId": { - // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "container.projects.zones.operations.list": - -type ProjectsZonesOperationsListCall struct { - s *Service - projectId string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all operations in a project in a specific zone or all -// zones. -func (r *ProjectsZonesOperationsService) List(projectId string, zone string) *ProjectsZonesOperationsListCall { - c := &ProjectsZonesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsZonesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsZonesOperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsZonesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsZonesOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsZonesOperationsListCall) Context(ctx context.Context) *ProjectsZonesOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsZonesOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/operations") - urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.operations.list" call. -// Exactly one of *ListOperationsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListOperationsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsZonesOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ListOperationsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists all operations in a project in a specific zone or all zones.", - // "flatPath": "v1/projects/{projectId}/zones/{zone}/operations", - // "httpMethod": "GET", - // "id": "container.projects.zones.operations.list", - // "parameterOrder": [ - // "projectId", - // "zone" - // ], - // "parameters": { - // "projectId": { - // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available)\nto return operations for, or `-` for all zones.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/projects/{projectId}/zones/{zone}/operations", - // "response": { - // "$ref": "ListOperationsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} diff --git a/vendor/google.golang.org/api/gensupport/backoff.go b/vendor/google.golang.org/api/gensupport/backoff.go deleted file mode 100644 index 135614047..000000000 --- a/vendor/google.golang.org/api/gensupport/backoff.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gensupport - -import ( - "math/rand" - "time" -) - -type BackoffStrategy interface { - // Pause returns the duration of the next pause and true if the operation should be - // retried, or false if no further retries should be attempted. - Pause() (time.Duration, bool) - - // Reset restores the strategy to its initial state. - Reset() -} - -// ExponentialBackoff performs exponential backoff as per https://en.wikipedia.org/wiki/Exponential_backoff. -// The initial pause time is given by Base. -// Once the total pause time exceeds Max, Pause will indicate no further retries. -type ExponentialBackoff struct { - Base time.Duration - Max time.Duration - total time.Duration - n uint -} - -func (eb *ExponentialBackoff) Pause() (time.Duration, bool) { - if eb.total > eb.Max { - return 0, false - } - - // The next pause is selected from randomly from [0, 2^n * Base). - d := time.Duration(rand.Int63n((1 << eb.n) * int64(eb.Base))) - eb.total += d - eb.n++ - return d, true -} - -func (eb *ExponentialBackoff) Reset() { - eb.n = 0 - eb.total = 0 -} diff --git a/vendor/google.golang.org/api/gensupport/buffer.go b/vendor/google.golang.org/api/gensupport/buffer.go deleted file mode 100644 index 992104911..000000000 --- a/vendor/google.golang.org/api/gensupport/buffer.go +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gensupport - -import ( - "bytes" - "io" - - "google.golang.org/api/googleapi" -) - -// MediaBuffer buffers data from an io.Reader to support uploading media in retryable chunks. -type MediaBuffer struct { - media io.Reader - - chunk []byte // The current chunk which is pending upload. The capacity is the chunk size. - err error // Any error generated when populating chunk by reading media. - - // The absolute position of chunk in the underlying media. - off int64 -} - -func NewMediaBuffer(media io.Reader, chunkSize int) *MediaBuffer { - return &MediaBuffer{media: media, chunk: make([]byte, 0, chunkSize)} -} - -// Chunk returns the current buffered chunk, the offset in the underlying media -// from which the chunk is drawn, and the size of the chunk. -// Successive calls to Chunk return the same chunk between calls to Next. -func (mb *MediaBuffer) Chunk() (chunk io.Reader, off int64, size int, err error) { - // There may already be data in chunk if Next has not been called since the previous call to Chunk. - if mb.err == nil && len(mb.chunk) == 0 { - mb.err = mb.loadChunk() - } - return bytes.NewReader(mb.chunk), mb.off, len(mb.chunk), mb.err -} - -// loadChunk will read from media into chunk, up to the capacity of chunk. -func (mb *MediaBuffer) loadChunk() error { - bufSize := cap(mb.chunk) - mb.chunk = mb.chunk[:bufSize] - - read := 0 - var err error - for err == nil && read < bufSize { - var n int - n, err = mb.media.Read(mb.chunk[read:]) - read += n - } - mb.chunk = mb.chunk[:read] - return err -} - -// Next advances to the next chunk, which will be returned by the next call to Chunk. -// Calls to Next without a corresponding prior call to Chunk will have no effect. -func (mb *MediaBuffer) Next() { - mb.off += int64(len(mb.chunk)) - mb.chunk = mb.chunk[0:0] -} - -type readerTyper struct { - io.Reader - googleapi.ContentTyper -} - -// ReaderAtToReader adapts a ReaderAt to be used as a Reader. -// If ra implements googleapi.ContentTyper, then the returned reader -// will also implement googleapi.ContentTyper, delegating to ra. -func ReaderAtToReader(ra io.ReaderAt, size int64) io.Reader { - r := io.NewSectionReader(ra, 0, size) - if typer, ok := ra.(googleapi.ContentTyper); ok { - return readerTyper{r, typer} - } - return r -} diff --git a/vendor/google.golang.org/api/gensupport/doc.go b/vendor/google.golang.org/api/gensupport/doc.go deleted file mode 100644 index 752c4b411..000000000 --- a/vendor/google.golang.org/api/gensupport/doc.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package gensupport is an internal implementation detail used by code -// generated by the google-api-go-generator tool. -// -// This package may be modified at any time without regard for backwards -// compatibility. It should not be used directly by API users. -package gensupport diff --git a/vendor/google.golang.org/api/gensupport/header.go b/vendor/google.golang.org/api/gensupport/header.go deleted file mode 100644 index cb5e67c77..000000000 --- a/vendor/google.golang.org/api/gensupport/header.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gensupport - -import ( - "fmt" - "runtime" - "strings" -) - -// GoogleClientHeader returns the value to use for the x-goog-api-client -// header, which is used internally by Google. -func GoogleClientHeader(generatorVersion, clientElement string) string { - elts := []string{"gl-go/" + strings.Replace(runtime.Version(), " ", "_", -1)} - if clientElement != "" { - elts = append(elts, clientElement) - } - elts = append(elts, fmt.Sprintf("gdcl/%s", generatorVersion)) - return strings.Join(elts, " ") -} diff --git a/vendor/google.golang.org/api/gensupport/json.go b/vendor/google.golang.org/api/gensupport/json.go deleted file mode 100644 index c01e32189..000000000 --- a/vendor/google.golang.org/api/gensupport/json.go +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gensupport - -import ( - "encoding/json" - "fmt" - "reflect" - "strings" -) - -// MarshalJSON returns a JSON encoding of schema containing only selected fields. -// A field is selected if any of the following is true: -// * it has a non-empty value -// * its field name is present in forceSendFields and it is not a nil pointer or nil interface -// * its field name is present in nullFields. -// The JSON key for each selected field is taken from the field's json: struct tag. -func MarshalJSON(schema interface{}, forceSendFields, nullFields []string) ([]byte, error) { - if len(forceSendFields) == 0 && len(nullFields) == 0 { - return json.Marshal(schema) - } - - mustInclude := make(map[string]bool) - for _, f := range forceSendFields { - mustInclude[f] = true - } - useNull := make(map[string]bool) - useNullMaps := make(map[string]map[string]bool) - for _, nf := range nullFields { - parts := strings.SplitN(nf, ".", 2) - field := parts[0] - if len(parts) == 1 { - useNull[field] = true - } else { - if useNullMaps[field] == nil { - useNullMaps[field] = map[string]bool{} - } - useNullMaps[field][parts[1]] = true - } - } - - dataMap, err := schemaToMap(schema, mustInclude, useNull, useNullMaps) - if err != nil { - return nil, err - } - return json.Marshal(dataMap) -} - -func schemaToMap(schema interface{}, mustInclude, useNull map[string]bool, useNullMaps map[string]map[string]bool) (map[string]interface{}, error) { - m := make(map[string]interface{}) - s := reflect.ValueOf(schema) - st := s.Type() - - for i := 0; i < s.NumField(); i++ { - jsonTag := st.Field(i).Tag.Get("json") - if jsonTag == "" { - continue - } - tag, err := parseJSONTag(jsonTag) - if err != nil { - return nil, err - } - if tag.ignore { - continue - } - - v := s.Field(i) - f := st.Field(i) - - if useNull[f.Name] { - if !isEmptyValue(v) { - return nil, fmt.Errorf("field %q in NullFields has non-empty value", f.Name) - } - m[tag.apiName] = nil - continue - } - - if !includeField(v, f, mustInclude) { - continue - } - - // If map fields are explicitly set to null, use a map[string]interface{}. - if f.Type.Kind() == reflect.Map && useNullMaps[f.Name] != nil { - ms, ok := v.Interface().(map[string]string) - if !ok { - return nil, fmt.Errorf("field %q has keys in NullFields but is not a map[string]string", f.Name) - } - mi := map[string]interface{}{} - for k, v := range ms { - mi[k] = v - } - for k := range useNullMaps[f.Name] { - mi[k] = nil - } - m[tag.apiName] = mi - continue - } - - // nil maps are treated as empty maps. - if f.Type.Kind() == reflect.Map && v.IsNil() { - m[tag.apiName] = map[string]string{} - continue - } - - // nil slices are treated as empty slices. - if f.Type.Kind() == reflect.Slice && v.IsNil() { - m[tag.apiName] = []bool{} - continue - } - - if tag.stringFormat { - m[tag.apiName] = formatAsString(v, f.Type.Kind()) - } else { - m[tag.apiName] = v.Interface() - } - } - return m, nil -} - -// formatAsString returns a string representation of v, dereferencing it first if possible. -func formatAsString(v reflect.Value, kind reflect.Kind) string { - if kind == reflect.Ptr && !v.IsNil() { - v = v.Elem() - } - - return fmt.Sprintf("%v", v.Interface()) -} - -// jsonTag represents a restricted version of the struct tag format used by encoding/json. -// It is used to describe the JSON encoding of fields in a Schema struct. -type jsonTag struct { - apiName string - stringFormat bool - ignore bool -} - -// parseJSONTag parses a restricted version of the struct tag format used by encoding/json. -// The format of the tag must match that generated by the Schema.writeSchemaStruct method -// in the api generator. -func parseJSONTag(val string) (jsonTag, error) { - if val == "-" { - return jsonTag{ignore: true}, nil - } - - var tag jsonTag - - i := strings.Index(val, ",") - if i == -1 || val[:i] == "" { - return tag, fmt.Errorf("malformed json tag: %s", val) - } - - tag = jsonTag{ - apiName: val[:i], - } - - switch val[i+1:] { - case "omitempty": - case "omitempty,string": - tag.stringFormat = true - default: - return tag, fmt.Errorf("malformed json tag: %s", val) - } - - return tag, nil -} - -// Reports whether the struct field "f" with value "v" should be included in JSON output. -func includeField(v reflect.Value, f reflect.StructField, mustInclude map[string]bool) bool { - // The regular JSON encoding of a nil pointer is "null", which means "delete this field". - // Therefore, we could enable field deletion by honoring pointer fields' presence in the mustInclude set. - // However, many fields are not pointers, so there would be no way to delete these fields. - // Rather than partially supporting field deletion, we ignore mustInclude for nil pointer fields. - // Deletion will be handled by a separate mechanism. - if f.Type.Kind() == reflect.Ptr && v.IsNil() { - return false - } - - // The "any" type is represented as an interface{}. If this interface - // is nil, there is no reasonable representation to send. We ignore - // these fields, for the same reasons as given above for pointers. - if f.Type.Kind() == reflect.Interface && v.IsNil() { - return false - } - - return mustInclude[f.Name] || !isEmptyValue(v) -} - -// isEmptyValue reports whether v is the empty value for its type. This -// implementation is based on that of the encoding/json package, but its -// correctness does not depend on it being identical. What's important is that -// this function return false in situations where v should not be sent as part -// of a PATCH operation. -func isEmptyValue(v reflect.Value) bool { - switch v.Kind() { - case reflect.Array, reflect.Map, reflect.Slice, reflect.String: - return v.Len() == 0 - case reflect.Bool: - return !v.Bool() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.Interface, reflect.Ptr: - return v.IsNil() - } - return false -} diff --git a/vendor/google.golang.org/api/gensupport/jsonfloat.go b/vendor/google.golang.org/api/gensupport/jsonfloat.go deleted file mode 100644 index cb02335d2..000000000 --- a/vendor/google.golang.org/api/gensupport/jsonfloat.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2016 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package gensupport - -import ( - "encoding/json" - "errors" - "fmt" - "math" -) - -// JSONFloat64 is a float64 that supports proper unmarshaling of special float -// values in JSON, according to -// https://developers.google.com/protocol-buffers/docs/proto3#json. Although -// that is a proto-to-JSON spec, it applies to all Google APIs. -// -// The jsonpb package -// (https://github.com/golang/protobuf/blob/master/jsonpb/jsonpb.go) has -// similar functionality, but only for direct translation from proto messages -// to JSON. -type JSONFloat64 float64 - -func (f *JSONFloat64) UnmarshalJSON(data []byte) error { - var ff float64 - if err := json.Unmarshal(data, &ff); err == nil { - *f = JSONFloat64(ff) - return nil - } - var s string - if err := json.Unmarshal(data, &s); err == nil { - switch s { - case "NaN": - ff = math.NaN() - case "Infinity": - ff = math.Inf(1) - case "-Infinity": - ff = math.Inf(-1) - default: - return fmt.Errorf("google.golang.org/api/internal: bad float string %q", s) - } - *f = JSONFloat64(ff) - return nil - } - return errors.New("google.golang.org/api/internal: data not float or string") -} diff --git a/vendor/google.golang.org/api/gensupport/media.go b/vendor/google.golang.org/api/gensupport/media.go deleted file mode 100644 index c6410e89a..000000000 --- a/vendor/google.golang.org/api/gensupport/media.go +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gensupport - -import ( - "fmt" - "io" - "io/ioutil" - "mime/multipart" - "net/http" - "net/textproto" - - "google.golang.org/api/googleapi" -) - -const sniffBuffSize = 512 - -func newContentSniffer(r io.Reader) *contentSniffer { - return &contentSniffer{r: r} -} - -// contentSniffer wraps a Reader, and reports the content type determined by sniffing up to 512 bytes from the Reader. -type contentSniffer struct { - r io.Reader - start []byte // buffer for the sniffed bytes. - err error // set to any error encountered while reading bytes to be sniffed. - - ctype string // set on first sniff. - sniffed bool // set to true on first sniff. -} - -func (cs *contentSniffer) Read(p []byte) (n int, err error) { - // Ensure that the content type is sniffed before any data is consumed from Reader. - _, _ = cs.ContentType() - - if len(cs.start) > 0 { - n := copy(p, cs.start) - cs.start = cs.start[n:] - return n, nil - } - - // We may have read some bytes into start while sniffing, even if the read ended in an error. - // We should first return those bytes, then the error. - if cs.err != nil { - return 0, cs.err - } - - // Now we have handled all bytes that were buffered while sniffing. Now just delegate to the underlying reader. - return cs.r.Read(p) -} - -// ContentType returns the sniffed content type, and whether the content type was succesfully sniffed. -func (cs *contentSniffer) ContentType() (string, bool) { - if cs.sniffed { - return cs.ctype, cs.ctype != "" - } - cs.sniffed = true - // If ReadAll hits EOF, it returns err==nil. - cs.start, cs.err = ioutil.ReadAll(io.LimitReader(cs.r, sniffBuffSize)) - - // Don't try to detect the content type based on possibly incomplete data. - if cs.err != nil { - return "", false - } - - cs.ctype = http.DetectContentType(cs.start) - return cs.ctype, true -} - -// DetermineContentType determines the content type of the supplied reader. -// If the content type is already known, it can be specified via ctype. -// Otherwise, the content of media will be sniffed to determine the content type. -// If media implements googleapi.ContentTyper (deprecated), this will be used -// instead of sniffing the content. -// After calling DetectContentType the caller must not perform further reads on -// media, but rather read from the Reader that is returned. -func DetermineContentType(media io.Reader, ctype string) (io.Reader, string) { - // Note: callers could avoid calling DetectContentType if ctype != "", - // but doing the check inside this function reduces the amount of - // generated code. - if ctype != "" { - return media, ctype - } - - // For backwards compatability, allow clients to set content - // type by providing a ContentTyper for media. - if typer, ok := media.(googleapi.ContentTyper); ok { - return media, typer.ContentType() - } - - sniffer := newContentSniffer(media) - if ctype, ok := sniffer.ContentType(); ok { - return sniffer, ctype - } - // If content type could not be sniffed, reads from sniffer will eventually fail with an error. - return sniffer, "" -} - -type typeReader struct { - io.Reader - typ string -} - -// multipartReader combines the contents of multiple readers to creat a multipart/related HTTP body. -// Close must be called if reads from the multipartReader are abandoned before reaching EOF. -type multipartReader struct { - pr *io.PipeReader - pipeOpen bool - ctype string -} - -func newMultipartReader(parts []typeReader) *multipartReader { - mp := &multipartReader{pipeOpen: true} - var pw *io.PipeWriter - mp.pr, pw = io.Pipe() - mpw := multipart.NewWriter(pw) - mp.ctype = "multipart/related; boundary=" + mpw.Boundary() - go func() { - for _, part := range parts { - w, err := mpw.CreatePart(typeHeader(part.typ)) - if err != nil { - mpw.Close() - pw.CloseWithError(fmt.Errorf("googleapi: CreatePart failed: %v", err)) - return - } - _, err = io.Copy(w, part.Reader) - if err != nil { - mpw.Close() - pw.CloseWithError(fmt.Errorf("googleapi: Copy failed: %v", err)) - return - } - } - - mpw.Close() - pw.Close() - }() - return mp -} - -func (mp *multipartReader) Read(data []byte) (n int, err error) { - return mp.pr.Read(data) -} - -func (mp *multipartReader) Close() error { - if !mp.pipeOpen { - return nil - } - mp.pipeOpen = false - return mp.pr.Close() -} - -// CombineBodyMedia combines a json body with media content to create a multipart/related HTTP body. -// It returns a ReadCloser containing the combined body, and the overall "multipart/related" content type, with random boundary. -// -// The caller must call Close on the returned ReadCloser if reads are abandoned before reaching EOF. -func CombineBodyMedia(body io.Reader, bodyContentType string, media io.Reader, mediaContentType string) (io.ReadCloser, string) { - mp := newMultipartReader([]typeReader{ - {body, bodyContentType}, - {media, mediaContentType}, - }) - return mp, mp.ctype -} - -func typeHeader(contentType string) textproto.MIMEHeader { - h := make(textproto.MIMEHeader) - if contentType != "" { - h.Set("Content-Type", contentType) - } - return h -} - -// PrepareUpload determines whether the data in the supplied reader should be -// uploaded in a single request, or in sequential chunks. -// chunkSize is the size of the chunk that media should be split into. -// If chunkSize is non-zero and the contents of media do not fit in a single -// chunk (or there is an error reading media), then media will be returned as a -// MediaBuffer. Otherwise, media will be returned as a Reader. -// -// After PrepareUpload has been called, media should no longer be used: the -// media content should be accessed via one of the return values. -func PrepareUpload(media io.Reader, chunkSize int) (io.Reader, *MediaBuffer) { - if chunkSize == 0 { // do not chunk - return media, nil - } - - mb := NewMediaBuffer(media, chunkSize) - rdr, _, _, err := mb.Chunk() - - if err == io.EOF { // we can upload this in a single request - return rdr, nil - } - // err might be a non-EOF error. If it is, the next call to mb.Chunk will - // return the same error. Returning a MediaBuffer ensures that this error - // will be handled at some point. - - return nil, mb -} diff --git a/vendor/google.golang.org/api/gensupport/params.go b/vendor/google.golang.org/api/gensupport/params.go deleted file mode 100644 index 3b3c74396..000000000 --- a/vendor/google.golang.org/api/gensupport/params.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gensupport - -import ( - "net/url" - - "google.golang.org/api/googleapi" -) - -// URLParams is a simplified replacement for url.Values -// that safely builds up URL parameters for encoding. -type URLParams map[string][]string - -// Get returns the first value for the given key, or "". -func (u URLParams) Get(key string) string { - vs := u[key] - if len(vs) == 0 { - return "" - } - return vs[0] -} - -// Set sets the key to value. -// It replaces any existing values. -func (u URLParams) Set(key, value string) { - u[key] = []string{value} -} - -// SetMulti sets the key to an array of values. -// It replaces any existing values. -// Note that values must not be modified after calling SetMulti -// so the caller is responsible for making a copy if necessary. -func (u URLParams) SetMulti(key string, values []string) { - u[key] = values -} - -// Encode encodes the values into ``URL encoded'' form -// ("bar=baz&foo=quux") sorted by key. -func (u URLParams) Encode() string { - return url.Values(u).Encode() -} - -func SetOptions(u URLParams, opts ...googleapi.CallOption) { - for _, o := range opts { - u.Set(o.Get()) - } -} diff --git a/vendor/google.golang.org/api/gensupport/resumable.go b/vendor/google.golang.org/api/gensupport/resumable.go deleted file mode 100644 index dcd591f7f..000000000 --- a/vendor/google.golang.org/api/gensupport/resumable.go +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gensupport - -import ( - "errors" - "fmt" - "io" - "net/http" - "sync" - "time" - - "golang.org/x/net/context" -) - -const ( - // statusTooManyRequests is returned by the storage API if the - // per-project limits have been temporarily exceeded. The request - // should be retried. - // https://cloud.google.com/storage/docs/json_api/v1/status-codes#standardcodes - statusTooManyRequests = 429 -) - -// ResumableUpload is used by the generated APIs to provide resumable uploads. -// It is not used by developers directly. -type ResumableUpload struct { - Client *http.Client - // URI is the resumable resource destination provided by the server after specifying "&uploadType=resumable". - URI string - UserAgent string // User-Agent for header of the request - // Media is the object being uploaded. - Media *MediaBuffer - // MediaType defines the media type, e.g. "image/jpeg". - MediaType string - - mu sync.Mutex // guards progress - progress int64 // number of bytes uploaded so far - - // Callback is an optional function that will be periodically called with the cumulative number of bytes uploaded. - Callback func(int64) - - // If not specified, a default exponential backoff strategy will be used. - Backoff BackoffStrategy -} - -// Progress returns the number of bytes uploaded at this point. -func (rx *ResumableUpload) Progress() int64 { - rx.mu.Lock() - defer rx.mu.Unlock() - return rx.progress -} - -// doUploadRequest performs a single HTTP request to upload data. -// off specifies the offset in rx.Media from which data is drawn. -// size is the number of bytes in data. -// final specifies whether data is the final chunk to be uploaded. -func (rx *ResumableUpload) doUploadRequest(ctx context.Context, data io.Reader, off, size int64, final bool) (*http.Response, error) { - req, err := http.NewRequest("POST", rx.URI, data) - if err != nil { - return nil, err - } - - req.ContentLength = size - var contentRange string - if final { - if size == 0 { - contentRange = fmt.Sprintf("bytes */%v", off) - } else { - contentRange = fmt.Sprintf("bytes %v-%v/%v", off, off+size-1, off+size) - } - } else { - contentRange = fmt.Sprintf("bytes %v-%v/*", off, off+size-1) - } - req.Header.Set("Content-Range", contentRange) - req.Header.Set("Content-Type", rx.MediaType) - req.Header.Set("User-Agent", rx.UserAgent) - - // Google's upload endpoint uses status code 308 for a - // different purpose than the "308 Permanent Redirect" - // since-standardized in RFC 7238. Because of the conflict in - // semantics, Google added this new request header which - // causes it to not use "308" and instead reply with 200 OK - // and sets the upload-specific "X-HTTP-Status-Code-Override: - // 308" response header. - req.Header.Set("X-GUploader-No-308", "yes") - - return SendRequest(ctx, rx.Client, req) -} - -func statusResumeIncomplete(resp *http.Response) bool { - // This is how the server signals "status resume incomplete" - // when X-GUploader-No-308 is set to "yes": - return resp != nil && resp.Header.Get("X-Http-Status-Code-Override") == "308" -} - -// reportProgress calls a user-supplied callback to report upload progress. -// If old==updated, the callback is not called. -func (rx *ResumableUpload) reportProgress(old, updated int64) { - if updated-old == 0 { - return - } - rx.mu.Lock() - rx.progress = updated - rx.mu.Unlock() - if rx.Callback != nil { - rx.Callback(updated) - } -} - -// transferChunk performs a single HTTP request to upload a single chunk from rx.Media. -func (rx *ResumableUpload) transferChunk(ctx context.Context) (*http.Response, error) { - chunk, off, size, err := rx.Media.Chunk() - - done := err == io.EOF - if !done && err != nil { - return nil, err - } - - res, err := rx.doUploadRequest(ctx, chunk, off, int64(size), done) - if err != nil { - return res, err - } - - // We sent "X-GUploader-No-308: yes" (see comment elsewhere in - // this file), so we don't expect to get a 308. - if res.StatusCode == 308 { - return nil, errors.New("unexpected 308 response status code") - } - - if res.StatusCode == http.StatusOK { - rx.reportProgress(off, off+int64(size)) - } - - if statusResumeIncomplete(res) { - rx.Media.Next() - } - return res, nil -} - -func contextDone(ctx context.Context) bool { - select { - case <-ctx.Done(): - return true - default: - return false - } -} - -// Upload starts the process of a resumable upload with a cancellable context. -// It retries using the provided back off strategy until cancelled or the -// strategy indicates to stop retrying. -// It is called from the auto-generated API code and is not visible to the user. -// Before sending an HTTP request, Upload calls any registered hook functions, -// and calls the returned functions after the request returns (see send.go). -// rx is private to the auto-generated API code. -// Exactly one of resp or err will be nil. If resp is non-nil, the caller must call resp.Body.Close. -func (rx *ResumableUpload) Upload(ctx context.Context) (resp *http.Response, err error) { - var pause time.Duration - backoff := rx.Backoff - if backoff == nil { - backoff = DefaultBackoffStrategy() - } - - for { - // Ensure that we return in the case of cancelled context, even if pause is 0. - if contextDone(ctx) { - return nil, ctx.Err() - } - select { - case <-ctx.Done(): - return nil, ctx.Err() - case <-time.After(pause): - } - - resp, err = rx.transferChunk(ctx) - - var status int - if resp != nil { - status = resp.StatusCode - } - - // Check if we should retry the request. - if shouldRetry(status, err) { - var retry bool - pause, retry = backoff.Pause() - if retry { - if resp != nil && resp.Body != nil { - resp.Body.Close() - } - continue - } - } - - // If the chunk was uploaded successfully, but there's still - // more to go, upload the next chunk without any delay. - if statusResumeIncomplete(resp) { - pause = 0 - backoff.Reset() - resp.Body.Close() - continue - } - - // It's possible for err and resp to both be non-nil here, but we expose a simpler - // contract to our callers: exactly one of resp and err will be non-nil. This means - // that any response body must be closed here before returning a non-nil error. - if err != nil { - if resp != nil && resp.Body != nil { - resp.Body.Close() - } - return nil, err - } - - return resp, nil - } -} diff --git a/vendor/google.golang.org/api/gensupport/retry.go b/vendor/google.golang.org/api/gensupport/retry.go deleted file mode 100644 index c60b3c394..000000000 --- a/vendor/google.golang.org/api/gensupport/retry.go +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright 2017 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package gensupport - -import ( - "io" - "net" - "net/http" - "time" - - "golang.org/x/net/context" -) - -// Retry invokes the given function, retrying it multiple times if the connection failed or -// the HTTP status response indicates the request should be attempted again. ctx may be nil. -func Retry(ctx context.Context, f func() (*http.Response, error), backoff BackoffStrategy) (*http.Response, error) { - for { - resp, err := f() - - var status int - if resp != nil { - status = resp.StatusCode - } - - // Return if we shouldn't retry. - pause, retry := backoff.Pause() - if !shouldRetry(status, err) || !retry { - return resp, err - } - - // Ensure the response body is closed, if any. - if resp != nil && resp.Body != nil { - resp.Body.Close() - } - - // Pause, but still listen to ctx.Done if context is not nil. - var done <-chan struct{} - if ctx != nil { - done = ctx.Done() - } - select { - case <-done: - return nil, ctx.Err() - case <-time.After(pause): - } - } -} - -// DefaultBackoffStrategy returns a default strategy to use for retrying failed upload requests. -func DefaultBackoffStrategy() BackoffStrategy { - return &ExponentialBackoff{ - Base: 250 * time.Millisecond, - Max: 16 * time.Second, - } -} - -// shouldRetry returns true if the HTTP response / error indicates that the -// request should be attempted again. -func shouldRetry(status int, err error) bool { - if 500 <= status && status <= 599 { - return true - } - if status == statusTooManyRequests { - return true - } - if err == io.ErrUnexpectedEOF { - return true - } - if err, ok := err.(net.Error); ok { - return err.Temporary() - } - return false -} diff --git a/vendor/google.golang.org/api/gensupport/send.go b/vendor/google.golang.org/api/gensupport/send.go deleted file mode 100644 index 092044f44..000000000 --- a/vendor/google.golang.org/api/gensupport/send.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gensupport - -import ( - "errors" - "net/http" - - "golang.org/x/net/context" - "golang.org/x/net/context/ctxhttp" -) - -// Hook is the type of a function that is called once before each HTTP request -// that is sent by a generated API. It returns a function that is called after -// the request returns. -// Hooks are not called if the context is nil. -type Hook func(ctx context.Context, req *http.Request) func(resp *http.Response) - -var hooks []Hook - -// RegisterHook registers a Hook to be called before each HTTP request by a -// generated API. Hooks are called in the order they are registered. Each -// hook can return a function; if it is non-nil, it is called after the HTTP -// request returns. These functions are called in the reverse order. -// RegisterHook should not be called concurrently with itself or SendRequest. -func RegisterHook(h Hook) { - hooks = append(hooks, h) -} - -// SendRequest sends a single HTTP request using the given client. -// If ctx is non-nil, it calls all hooks, then sends the request with -// ctxhttp.Do, then calls any functions returned by the hooks in reverse order. -func SendRequest(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error) { - // Disallow Accept-Encoding because it interferes with the automatic gzip handling - // done by the default http.Transport. See https://github.com/google/google-api-go-client/issues/219. - if _, ok := req.Header["Accept-Encoding"]; ok { - return nil, errors.New("google api: custom Accept-Encoding headers not allowed") - } - if ctx == nil { - return client.Do(req) - } - // Call hooks in order of registration, store returned funcs. - post := make([]func(resp *http.Response), len(hooks)) - for i, h := range hooks { - fn := h(ctx, req) - post[i] = fn - } - - // Send request. - resp, err := ctxhttp.Do(ctx, client, req) - - // Call returned funcs in reverse order. - for i := len(post) - 1; i >= 0; i-- { - if fn := post[i]; fn != nil { - fn(resp) - } - } - return resp, err -} diff --git a/vendor/google.golang.org/api/googleapi/googleapi.go b/vendor/google.golang.org/api/googleapi/googleapi.go deleted file mode 100644 index bdb11c4ec..000000000 --- a/vendor/google.golang.org/api/googleapi/googleapi.go +++ /dev/null @@ -1,406 +0,0 @@ -// Copyright 2011 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package googleapi contains the common code shared by all Google API -// libraries. -package googleapi - -import ( - "bytes" - "encoding/json" - "fmt" - "io" - "io/ioutil" - "net/http" - "net/url" - "strings" - - "google.golang.org/api/googleapi/internal/uritemplates" -) - -// ContentTyper is an interface for Readers which know (or would like -// to override) their Content-Type. If a media body doesn't implement -// ContentTyper, the type is sniffed from the content using -// http.DetectContentType. -type ContentTyper interface { - ContentType() string -} - -// A SizeReaderAt is a ReaderAt with a Size method. -// An io.SectionReader implements SizeReaderAt. -type SizeReaderAt interface { - io.ReaderAt - Size() int64 -} - -// ServerResponse is embedded in each Do response and -// provides the HTTP status code and header sent by the server. -type ServerResponse struct { - // HTTPStatusCode is the server's response status code. - // When using a resource method's Do call, this will always be in the 2xx range. - HTTPStatusCode int - // Header contains the response header fields from the server. - Header http.Header -} - -const ( - Version = "0.5" - - // UserAgent is the header string used to identify this package. - UserAgent = "google-api-go-client/" + Version - - // The default chunk size to use for resumable uploads if not specified by the user. - DefaultUploadChunkSize = 8 * 1024 * 1024 - - // The minimum chunk size that can be used for resumable uploads. All - // user-specified chunk sizes must be multiple of this value. - MinUploadChunkSize = 256 * 1024 -) - -// Error contains an error response from the server. -type Error struct { - // Code is the HTTP response status code and will always be populated. - Code int `json:"code"` - // Message is the server response message and is only populated when - // explicitly referenced by the JSON server response. - Message string `json:"message"` - // Body is the raw response returned by the server. - // It is often but not always JSON, depending on how the request fails. - Body string - // Header contains the response header fields from the server. - Header http.Header - - Errors []ErrorItem -} - -// ErrorItem is a detailed error code & message from the Google API frontend. -type ErrorItem struct { - // Reason is the typed error code. For example: "some_example". - Reason string `json:"reason"` - // Message is the human-readable description of the error. - Message string `json:"message"` -} - -func (e *Error) Error() string { - if len(e.Errors) == 0 && e.Message == "" { - return fmt.Sprintf("googleapi: got HTTP response code %d with body: %v", e.Code, e.Body) - } - var buf bytes.Buffer - fmt.Fprintf(&buf, "googleapi: Error %d: ", e.Code) - if e.Message != "" { - fmt.Fprintf(&buf, "%s", e.Message) - } - if len(e.Errors) == 0 { - return strings.TrimSpace(buf.String()) - } - if len(e.Errors) == 1 && e.Errors[0].Message == e.Message { - fmt.Fprintf(&buf, ", %s", e.Errors[0].Reason) - return buf.String() - } - fmt.Fprintln(&buf, "\nMore details:") - for _, v := range e.Errors { - fmt.Fprintf(&buf, "Reason: %s, Message: %s\n", v.Reason, v.Message) - } - return buf.String() -} - -type errorReply struct { - Error *Error `json:"error"` -} - -// CheckResponse returns an error (of type *Error) if the response -// status code is not 2xx. -func CheckResponse(res *http.Response) error { - if res.StatusCode >= 200 && res.StatusCode <= 299 { - return nil - } - slurp, err := ioutil.ReadAll(res.Body) - if err == nil { - jerr := new(errorReply) - err = json.Unmarshal(slurp, jerr) - if err == nil && jerr.Error != nil { - if jerr.Error.Code == 0 { - jerr.Error.Code = res.StatusCode - } - jerr.Error.Body = string(slurp) - return jerr.Error - } - } - return &Error{ - Code: res.StatusCode, - Body: string(slurp), - Header: res.Header, - } -} - -// IsNotModified reports whether err is the result of the -// server replying with http.StatusNotModified. -// Such error values are sometimes returned by "Do" methods -// on calls when If-None-Match is used. -func IsNotModified(err error) bool { - if err == nil { - return false - } - ae, ok := err.(*Error) - return ok && ae.Code == http.StatusNotModified -} - -// CheckMediaResponse returns an error (of type *Error) if the response -// status code is not 2xx. Unlike CheckResponse it does not assume the -// body is a JSON error document. -// It is the caller's responsibility to close res.Body. -func CheckMediaResponse(res *http.Response) error { - if res.StatusCode >= 200 && res.StatusCode <= 299 { - return nil - } - slurp, _ := ioutil.ReadAll(io.LimitReader(res.Body, 1<<20)) - return &Error{ - Code: res.StatusCode, - Body: string(slurp), - } -} - -type MarshalStyle bool - -var WithDataWrapper = MarshalStyle(true) -var WithoutDataWrapper = MarshalStyle(false) - -func (wrap MarshalStyle) JSONReader(v interface{}) (io.Reader, error) { - buf := new(bytes.Buffer) - if wrap { - buf.Write([]byte(`{"data": `)) - } - err := json.NewEncoder(buf).Encode(v) - if err != nil { - return nil, err - } - if wrap { - buf.Write([]byte(`}`)) - } - return buf, nil -} - -// endingWithErrorReader from r until it returns an error. If the -// final error from r is io.EOF and e is non-nil, e is used instead. -type endingWithErrorReader struct { - r io.Reader - e error -} - -func (er endingWithErrorReader) Read(p []byte) (n int, err error) { - n, err = er.r.Read(p) - if err == io.EOF && er.e != nil { - err = er.e - } - return -} - -// countingWriter counts the number of bytes it receives to write, but -// discards them. -type countingWriter struct { - n *int64 -} - -func (w countingWriter) Write(p []byte) (int, error) { - *w.n += int64(len(p)) - return len(p), nil -} - -// ProgressUpdater is a function that is called upon every progress update of a resumable upload. -// This is the only part of a resumable upload (from googleapi) that is usable by the developer. -// The remaining usable pieces of resumable uploads is exposed in each auto-generated API. -type ProgressUpdater func(current, total int64) - -type MediaOption interface { - setOptions(o *MediaOptions) -} - -type contentTypeOption string - -func (ct contentTypeOption) setOptions(o *MediaOptions) { - o.ContentType = string(ct) - if o.ContentType == "" { - o.ForceEmptyContentType = true - } -} - -// ContentType returns a MediaOption which sets the Content-Type header for media uploads. -// If ctype is empty, the Content-Type header will be omitted. -func ContentType(ctype string) MediaOption { - return contentTypeOption(ctype) -} - -type chunkSizeOption int - -func (cs chunkSizeOption) setOptions(o *MediaOptions) { - size := int(cs) - if size%MinUploadChunkSize != 0 { - size += MinUploadChunkSize - (size % MinUploadChunkSize) - } - o.ChunkSize = size -} - -// ChunkSize returns a MediaOption which sets the chunk size for media uploads. -// size will be rounded up to the nearest multiple of 256K. -// Media which contains fewer than size bytes will be uploaded in a single request. -// Media which contains size bytes or more will be uploaded in separate chunks. -// If size is zero, media will be uploaded in a single request. -func ChunkSize(size int) MediaOption { - return chunkSizeOption(size) -} - -// MediaOptions stores options for customizing media upload. It is not used by developers directly. -type MediaOptions struct { - ContentType string - ForceEmptyContentType bool - - ChunkSize int -} - -// ProcessMediaOptions stores options from opts in a MediaOptions. -// It is not used by developers directly. -func ProcessMediaOptions(opts []MediaOption) *MediaOptions { - mo := &MediaOptions{ChunkSize: DefaultUploadChunkSize} - for _, o := range opts { - o.setOptions(mo) - } - return mo -} - -func ResolveRelative(basestr, relstr string) string { - u, _ := url.Parse(basestr) - rel, _ := url.Parse(relstr) - u = u.ResolveReference(rel) - us := u.String() - us = strings.Replace(us, "%7B", "{", -1) - us = strings.Replace(us, "%7D", "}", -1) - return us -} - -// Expand subsitutes any {encoded} strings in the URL passed in using -// the map supplied. -// -// This calls SetOpaque to avoid encoding of the parameters in the URL path. -func Expand(u *url.URL, expansions map[string]string) { - escaped, unescaped, err := uritemplates.Expand(u.Path, expansions) - if err == nil { - u.Path = unescaped - u.RawPath = escaped - } -} - -// CloseBody is used to close res.Body. -// Prior to calling Close, it also tries to Read a small amount to see an EOF. -// Not seeing an EOF can prevent HTTP Transports from reusing connections. -func CloseBody(res *http.Response) { - if res == nil || res.Body == nil { - return - } - // Justification for 3 byte reads: two for up to "\r\n" after - // a JSON/XML document, and then 1 to see EOF if we haven't yet. - // TODO(bradfitz): detect Go 1.3+ and skip these reads. - // See https://codereview.appspot.com/58240043 - // and https://codereview.appspot.com/49570044 - buf := make([]byte, 1) - for i := 0; i < 3; i++ { - _, err := res.Body.Read(buf) - if err != nil { - break - } - } - res.Body.Close() - -} - -// VariantType returns the type name of the given variant. -// If the map doesn't contain the named key or the value is not a []interface{}, "" is returned. -// This is used to support "variant" APIs that can return one of a number of different types. -func VariantType(t map[string]interface{}) string { - s, _ := t["type"].(string) - return s -} - -// ConvertVariant uses the JSON encoder/decoder to fill in the struct 'dst' with the fields found in variant 'v'. -// This is used to support "variant" APIs that can return one of a number of different types. -// It reports whether the conversion was successful. -func ConvertVariant(v map[string]interface{}, dst interface{}) bool { - var buf bytes.Buffer - err := json.NewEncoder(&buf).Encode(v) - if err != nil { - return false - } - return json.Unmarshal(buf.Bytes(), dst) == nil -} - -// A Field names a field to be retrieved with a partial response. -// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// -// Partial responses can dramatically reduce the amount of data that must be sent to your application. -// In order to request partial responses, you can specify the full list of fields -// that your application needs by adding the Fields option to your request. -// -// Field strings use camelCase with leading lower-case characters to identify fields within the response. -// -// For example, if your response has a "NextPageToken" and a slice of "Items" with "Id" fields, -// you could request just those fields like this: -// -// svc.Events.List().Fields("nextPageToken", "items/id").Do() -// -// or if you were also interested in each Item's "Updated" field, you can combine them like this: -// -// svc.Events.List().Fields("nextPageToken", "items(id,updated)").Do() -// -// More information about field formatting can be found here: -// https://developers.google.com/+/api/#fields-syntax -// -// Another way to find field names is through the Google API explorer: -// https://developers.google.com/apis-explorer/#p/ -type Field string - -// CombineFields combines fields into a single string. -func CombineFields(s []Field) string { - r := make([]string, len(s)) - for i, v := range s { - r[i] = string(v) - } - return strings.Join(r, ",") -} - -// A CallOption is an optional argument to an API call. -// It should be treated as an opaque value by users of Google APIs. -// -// A CallOption is something that configures an API call in a way that is -// not specific to that API; for instance, controlling the quota user for -// an API call is common across many APIs, and is thus a CallOption. -type CallOption interface { - Get() (key, value string) -} - -// QuotaUser returns a CallOption that will set the quota user for a call. -// The quota user can be used by server-side applications to control accounting. -// It can be an arbitrary string up to 40 characters, and will override UserIP -// if both are provided. -func QuotaUser(u string) CallOption { return quotaUser(u) } - -type quotaUser string - -func (q quotaUser) Get() (string, string) { return "quotaUser", string(q) } - -// UserIP returns a CallOption that will set the "userIp" parameter of a call. -// This should be the IP address of the originating request. -func UserIP(ip string) CallOption { return userIP(ip) } - -type userIP string - -func (i userIP) Get() (string, string) { return "userIp", string(i) } - -// Trace returns a CallOption that enables diagnostic tracing for a call. -// traceToken is an ID supplied by Google support. -func Trace(traceToken string) CallOption { return traceTok(traceToken) } - -type traceTok string - -func (t traceTok) Get() (string, string) { return "trace", "token:" + string(t) } - -// TODO: Fields too diff --git a/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE b/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE deleted file mode 100644 index de9c88cb6..000000000 --- a/vendor/google.golang.org/api/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/vendor/google.golang.org/api/googleapi/internal/uritemplates/uritemplates.go b/vendor/google.golang.org/api/googleapi/internal/uritemplates/uritemplates.go deleted file mode 100644 index 63bf05383..000000000 --- a/vendor/google.golang.org/api/googleapi/internal/uritemplates/uritemplates.go +++ /dev/null @@ -1,248 +0,0 @@ -// 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. - -// Package uritemplates is a level 3 implementation of RFC 6570 (URI -// Template, http://tools.ietf.org/html/rfc6570). -// uritemplates does not support composite values (in Go: slices or maps) -// and so does not qualify as a level 4 implementation. -package uritemplates - -import ( - "bytes" - "errors" - "regexp" - "strconv" - "strings" -) - -var ( - unreserved = regexp.MustCompile("[^A-Za-z0-9\\-._~]") - reserved = regexp.MustCompile("[^A-Za-z0-9\\-._~:/?#[\\]@!$&'()*+,;=]") - validname = regexp.MustCompile("^([A-Za-z0-9_\\.]|%[0-9A-Fa-f][0-9A-Fa-f])+$") - hex = []byte("0123456789ABCDEF") -) - -func pctEncode(src []byte) []byte { - dst := make([]byte, len(src)*3) - for i, b := range src { - buf := dst[i*3 : i*3+3] - buf[0] = 0x25 - buf[1] = hex[b/16] - buf[2] = hex[b%16] - } - return dst -} - -// pairWriter is a convenience struct which allows escaped and unescaped -// versions of the template to be written in parallel. -type pairWriter struct { - escaped, unescaped bytes.Buffer -} - -// Write writes the provided string directly without any escaping. -func (w *pairWriter) Write(s string) { - w.escaped.WriteString(s) - w.unescaped.WriteString(s) -} - -// Escape writes the provided string, escaping the string for the -// escaped output. -func (w *pairWriter) Escape(s string, allowReserved bool) { - w.unescaped.WriteString(s) - if allowReserved { - w.escaped.Write(reserved.ReplaceAllFunc([]byte(s), pctEncode)) - } else { - w.escaped.Write(unreserved.ReplaceAllFunc([]byte(s), pctEncode)) - } -} - -// Escaped returns the escaped string. -func (w *pairWriter) Escaped() string { - return w.escaped.String() -} - -// Unescaped returns the unescaped string. -func (w *pairWriter) Unescaped() string { - return w.unescaped.String() -} - -// A uriTemplate is a parsed representation of a URI template. -type uriTemplate struct { - raw string - parts []templatePart -} - -// parse parses a URI template string into a uriTemplate object. -func parse(rawTemplate string) (*uriTemplate, error) { - split := strings.Split(rawTemplate, "{") - parts := make([]templatePart, len(split)*2-1) - for i, s := range split { - if i == 0 { - if strings.Contains(s, "}") { - return nil, errors.New("unexpected }") - } - parts[i].raw = s - continue - } - subsplit := strings.Split(s, "}") - if len(subsplit) != 2 { - return nil, errors.New("malformed template") - } - expression := subsplit[0] - var err error - parts[i*2-1], err = parseExpression(expression) - if err != nil { - return nil, err - } - parts[i*2].raw = subsplit[1] - } - return &uriTemplate{ - raw: rawTemplate, - parts: parts, - }, nil -} - -type templatePart struct { - raw string - terms []templateTerm - first string - sep string - named bool - ifemp string - allowReserved bool -} - -type templateTerm struct { - name string - explode bool - truncate int -} - -func parseExpression(expression string) (result templatePart, err error) { - switch expression[0] { - case '+': - result.sep = "," - result.allowReserved = true - expression = expression[1:] - case '.': - result.first = "." - result.sep = "." - expression = expression[1:] - case '/': - result.first = "/" - result.sep = "/" - expression = expression[1:] - case ';': - result.first = ";" - result.sep = ";" - result.named = true - expression = expression[1:] - case '?': - result.first = "?" - result.sep = "&" - result.named = true - result.ifemp = "=" - expression = expression[1:] - case '&': - result.first = "&" - result.sep = "&" - result.named = true - result.ifemp = "=" - expression = expression[1:] - case '#': - result.first = "#" - result.sep = "," - result.allowReserved = true - expression = expression[1:] - default: - result.sep = "," - } - rawterms := strings.Split(expression, ",") - result.terms = make([]templateTerm, len(rawterms)) - for i, raw := range rawterms { - result.terms[i], err = parseTerm(raw) - if err != nil { - break - } - } - return result, err -} - -func parseTerm(term string) (result templateTerm, err error) { - // TODO(djd): Remove "*" suffix parsing once we check that no APIs have - // mistakenly used that attribute. - if strings.HasSuffix(term, "*") { - result.explode = true - term = term[:len(term)-1] - } - split := strings.Split(term, ":") - if len(split) == 1 { - result.name = term - } else if len(split) == 2 { - result.name = split[0] - var parsed int64 - parsed, err = strconv.ParseInt(split[1], 10, 0) - result.truncate = int(parsed) - } else { - err = errors.New("multiple colons in same term") - } - if !validname.MatchString(result.name) { - err = errors.New("not a valid name: " + result.name) - } - if result.explode && result.truncate > 0 { - err = errors.New("both explode and prefix modifers on same term") - } - return result, err -} - -// Expand expands a URI template with a set of values to produce the -// resultant URI. Two forms of the result are returned: one with all the -// elements escaped, and one with the elements unescaped. -func (t *uriTemplate) Expand(values map[string]string) (escaped, unescaped string) { - var w pairWriter - for _, p := range t.parts { - p.expand(&w, values) - } - return w.Escaped(), w.Unescaped() -} - -func (tp *templatePart) expand(w *pairWriter, values map[string]string) { - if len(tp.raw) > 0 { - w.Write(tp.raw) - return - } - var first = true - for _, term := range tp.terms { - value, exists := values[term.name] - if !exists { - continue - } - if first { - w.Write(tp.first) - first = false - } else { - w.Write(tp.sep) - } - tp.expandString(w, term, value) - } -} - -func (tp *templatePart) expandName(w *pairWriter, name string, empty bool) { - if tp.named { - w.Write(name) - if empty { - w.Write(tp.ifemp) - } else { - w.Write("=") - } - } -} - -func (tp *templatePart) expandString(w *pairWriter, t templateTerm, s string) { - if len(s) > t.truncate && t.truncate > 0 { - s = s[:t.truncate] - } - tp.expandName(w, t.name, len(s) == 0) - w.Escape(s, tp.allowReserved) -} diff --git a/vendor/google.golang.org/api/googleapi/internal/uritemplates/utils.go b/vendor/google.golang.org/api/googleapi/internal/uritemplates/utils.go deleted file mode 100644 index 2e70b8154..000000000 --- a/vendor/google.golang.org/api/googleapi/internal/uritemplates/utils.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package uritemplates - -// Expand parses then expands a URI template with a set of values to produce -// the resultant URI. Two forms of the result are returned: one with all the -// elements escaped, and one with the elements unescaped. -func Expand(path string, values map[string]string) (escaped, unescaped string, err error) { - template, err := parse(path) - if err != nil { - return "", "", err - } - escaped, unescaped = template.Expand(values) - return escaped, unescaped, nil -} diff --git a/vendor/google.golang.org/api/googleapi/types.go b/vendor/google.golang.org/api/googleapi/types.go deleted file mode 100644 index c8fdd5416..000000000 --- a/vendor/google.golang.org/api/googleapi/types.go +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright 2013 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package googleapi - -import ( - "encoding/json" - "errors" - "strconv" -) - -// Int64s is a slice of int64s that marshal as quoted strings in JSON. -type Int64s []int64 - -func (q *Int64s) UnmarshalJSON(raw []byte) error { - *q = (*q)[:0] - var ss []string - if err := json.Unmarshal(raw, &ss); err != nil { - return err - } - for _, s := range ss { - v, err := strconv.ParseInt(s, 10, 64) - if err != nil { - return err - } - *q = append(*q, int64(v)) - } - return nil -} - -// Int32s is a slice of int32s that marshal as quoted strings in JSON. -type Int32s []int32 - -func (q *Int32s) UnmarshalJSON(raw []byte) error { - *q = (*q)[:0] - var ss []string - if err := json.Unmarshal(raw, &ss); err != nil { - return err - } - for _, s := range ss { - v, err := strconv.ParseInt(s, 10, 32) - if err != nil { - return err - } - *q = append(*q, int32(v)) - } - return nil -} - -// Uint64s is a slice of uint64s that marshal as quoted strings in JSON. -type Uint64s []uint64 - -func (q *Uint64s) UnmarshalJSON(raw []byte) error { - *q = (*q)[:0] - var ss []string - if err := json.Unmarshal(raw, &ss); err != nil { - return err - } - for _, s := range ss { - v, err := strconv.ParseUint(s, 10, 64) - if err != nil { - return err - } - *q = append(*q, uint64(v)) - } - return nil -} - -// Uint32s is a slice of uint32s that marshal as quoted strings in JSON. -type Uint32s []uint32 - -func (q *Uint32s) UnmarshalJSON(raw []byte) error { - *q = (*q)[:0] - var ss []string - if err := json.Unmarshal(raw, &ss); err != nil { - return err - } - for _, s := range ss { - v, err := strconv.ParseUint(s, 10, 32) - if err != nil { - return err - } - *q = append(*q, uint32(v)) - } - return nil -} - -// Float64s is a slice of float64s that marshal as quoted strings in JSON. -type Float64s []float64 - -func (q *Float64s) UnmarshalJSON(raw []byte) error { - *q = (*q)[:0] - var ss []string - if err := json.Unmarshal(raw, &ss); err != nil { - return err - } - for _, s := range ss { - v, err := strconv.ParseFloat(s, 64) - if err != nil { - return err - } - *q = append(*q, float64(v)) - } - return nil -} - -func quotedList(n int, fn func(dst []byte, i int) []byte) ([]byte, error) { - dst := make([]byte, 0, 2+n*10) // somewhat arbitrary - dst = append(dst, '[') - for i := 0; i < n; i++ { - if i > 0 { - dst = append(dst, ',') - } - dst = append(dst, '"') - dst = fn(dst, i) - dst = append(dst, '"') - } - dst = append(dst, ']') - return dst, nil -} - -func (s Int64s) MarshalJSON() ([]byte, error) { - return quotedList(len(s), func(dst []byte, i int) []byte { - return strconv.AppendInt(dst, s[i], 10) - }) -} - -func (s Int32s) MarshalJSON() ([]byte, error) { - return quotedList(len(s), func(dst []byte, i int) []byte { - return strconv.AppendInt(dst, int64(s[i]), 10) - }) -} - -func (s Uint64s) MarshalJSON() ([]byte, error) { - return quotedList(len(s), func(dst []byte, i int) []byte { - return strconv.AppendUint(dst, s[i], 10) - }) -} - -func (s Uint32s) MarshalJSON() ([]byte, error) { - return quotedList(len(s), func(dst []byte, i int) []byte { - return strconv.AppendUint(dst, uint64(s[i]), 10) - }) -} - -func (s Float64s) MarshalJSON() ([]byte, error) { - return quotedList(len(s), func(dst []byte, i int) []byte { - return strconv.AppendFloat(dst, s[i], 'g', -1, 64) - }) -} - -// RawMessage is a raw encoded JSON value. -// It is identical to json.RawMessage, except it does not suffer from -// https://golang.org/issue/14493. -type RawMessage []byte - -// MarshalJSON returns m. -func (m RawMessage) MarshalJSON() ([]byte, error) { - return m, nil -} - -// UnmarshalJSON sets *m to a copy of data. -func (m *RawMessage) UnmarshalJSON(data []byte) error { - if m == nil { - return errors.New("googleapi.RawMessage: UnmarshalJSON on nil pointer") - } - *m = append((*m)[:0], data...) - return nil -} - -/* - * Helper routines for simplifying the creation of optional fields of basic type. - */ - -// Bool is a helper routine that allocates a new bool value -// to store v and returns a pointer to it. -func Bool(v bool) *bool { return &v } - -// Int32 is a helper routine that allocates a new int32 value -// to store v and returns a pointer to it. -func Int32(v int32) *int32 { return &v } - -// Int64 is a helper routine that allocates a new int64 value -// to store v and returns a pointer to it. -func Int64(v int64) *int64 { return &v } - -// Float64 is a helper routine that allocates a new float64 value -// to store v and returns a pointer to it. -func Float64(v float64) *float64 { return &v } - -// Uint32 is a helper routine that allocates a new uint32 value -// to store v and returns a pointer to it. -func Uint32(v uint32) *uint32 { return &v } - -// Uint64 is a helper routine that allocates a new uint64 value -// to store v and returns a pointer to it. -func Uint64(v uint64) *uint64 { return &v } - -// String is a helper routine that allocates a new string value -// to store v and returns a pointer to it. -func String(v string) *string { return &v } diff --git a/vendor/google.golang.org/genproto/.travis.yml b/vendor/google.golang.org/genproto/.travis.yml new file mode 100644 index 000000000..e673e05e6 --- /dev/null +++ b/vendor/google.golang.org/genproto/.travis.yml @@ -0,0 +1,12 @@ +language: go +go: + - 1.6 + - 1.7 + - 1.8 +go_import_path: google.golang.org/genproto + +script: +- go test -v ./... +- if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then + go get -u -v cloud.google.com/go/...; + fi diff --git a/vendor/google.golang.org/genproto/CONTRIBUTING.md b/vendor/google.golang.org/genproto/CONTRIBUTING.md new file mode 100644 index 000000000..2827b7d3f --- /dev/null +++ b/vendor/google.golang.org/genproto/CONTRIBUTING.md @@ -0,0 +1,27 @@ +Want to contribute? Great! First, read this page (including the small print at the end). + +### Before you contribute +Before we can use your code, you must sign the +[Google Individual Contributor License Agreement] +(https://cla.developers.google.com/about/google-individual) +(CLA), which you can do online. The CLA is necessary mainly because you own the +copyright to your changes, even after your contribution becomes part of our +codebase, so we need your permission to use and distribute your code. We also +need to be sure of various other things—for instance that you'll tell us if you +know that your code infringes on other people's patents. You don't have to sign +the CLA until after you've submitted your code for review and a member has +approved it, but you must do it before we can put your code into our codebase. +Before you start working on a larger contribution, you should get in touch with +us first through the issue tracker with your idea so that we can help out and +possibly guide you. Coordinating up front makes it much easier to avoid +frustration later on. + +### Code reviews +All submissions, including submissions by project members, require review. We +use Github pull requests for this purpose. + +### The small print +Contributions made by corporations are covered by a different agreement than +the one above, the +[Software Grant and Corporate Contributor License Agreement] +(https://cla.developers.google.com/about/google-corporate). diff --git a/vendor/cloud.google.com/go/LICENSE b/vendor/google.golang.org/genproto/LICENSE similarity index 99% rename from vendor/cloud.google.com/go/LICENSE rename to vendor/google.golang.org/genproto/LICENSE index a4c5efd82..d64569567 100644 --- a/vendor/cloud.google.com/go/LICENSE +++ b/vendor/google.golang.org/genproto/LICENSE @@ -187,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2014 Google Inc. + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/google.golang.org/genproto/README.md b/vendor/google.golang.org/genproto/README.md new file mode 100644 index 000000000..51d0bae5f --- /dev/null +++ b/vendor/google.golang.org/genproto/README.md @@ -0,0 +1,28 @@ +Go generated proto packages +=========================== + +[![Build Status](https://travis-ci.org/google/go-genproto.svg?branch=master)](https://travis-ci.org/google/go-genproto) +[![GoDoc](https://godoc.org/google.golang.org/genproto?status.svg)](https://godoc.org/google.golang.org/genproto) + +> **IMPORTANT** This repository is currently experimental. The structure +> of the contained packages is subject to change. Please see the original +> source repositories (listed below) to find out the status of the each +> protocol buffer's associated service. + +This repository contains the generated Go packages for common protocol buffer +types, and the generated [gRPC][1] code necessary for interacting with Google's gRPC +APIs. + +There are two sources for the proto files used in this repository: + +1. [google/protobuf][2]: the code in the `protobuf` and `ptypes` subdirectories + is derived from this repo. The messages in `protobuf` are used to describe + protocol buffer messages themselves. The messages under `ptypes` define the + common well-known types. +2. [googleapis/googleapis][3]: the code in the `googleapis` is derived from this + repo. The packages here contain types specifically for interacting with Google + APIs. + +[1]: http://grpc.io +[2]: https://github.com/google/protobuf/ +[3]: https://github.com/googleapis/googleapis/ diff --git a/vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go b/vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go new file mode 100644 index 000000000..8867ae781 --- /dev/null +++ b/vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go @@ -0,0 +1,143 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: google/rpc/status.proto + +/* +Package status is a generated protocol buffer package. + +It is generated from these files: + google/rpc/status.proto + +It has these top-level messages: + Status +*/ +package status + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import google_protobuf "github.com/golang/protobuf/ptypes/any" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + +// The `Status` type defines a logical error model that is suitable for different +// programming environments, including REST APIs and RPC APIs. It is used by +// [gRPC](https://github.com/grpc). The error model is designed to be: +// +// - Simple to use and understand for most users +// - Flexible enough to meet unexpected needs +// +// # Overview +// +// The `Status` message contains three pieces of data: error code, error message, +// and error details. The error code should be an enum value of +// [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed. The +// error message should be a developer-facing English message that helps +// developers *understand* and *resolve* the error. If a localized user-facing +// error message is needed, put the localized message in the error details or +// localize it in the client. The optional error details may contain arbitrary +// information about the error. There is a predefined set of error detail types +// in the package `google.rpc` that can be used for common error conditions. +// +// # Language mapping +// +// The `Status` message is the logical representation of the error model, but it +// is not necessarily the actual wire format. When the `Status` message is +// exposed in different client libraries and different wire protocols, it can be +// mapped differently. For example, it will likely be mapped to some exceptions +// in Java, but more likely mapped to some error codes in C. +// +// # Other uses +// +// The error model and the `Status` message can be used in a variety of +// environments, either with or without APIs, to provide a +// consistent developer experience across different environments. +// +// Example uses of this error model include: +// +// - Partial errors. If a service needs to return partial errors to the client, +// it may embed the `Status` in the normal response to indicate the partial +// errors. +// +// - Workflow errors. A typical workflow has multiple steps. Each step may +// have a `Status` message for error reporting. +// +// - Batch operations. If a client uses batch request and batch response, the +// `Status` message should be used directly inside batch response, one for +// each error sub-response. +// +// - Asynchronous operations. If an API call embeds asynchronous operation +// results in its response, the status of those operations should be +// represented directly using the `Status` message. +// +// - Logging. If some API errors are stored in logs, the message `Status` could +// be used directly after any stripping needed for security/privacy reasons. +type Status struct { + // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + Code int32 `protobuf:"varint,1,opt,name=code" json:"code,omitempty"` + // A developer-facing error message, which should be in English. Any + // user-facing error message should be localized and sent in the + // [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + Message string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"` + // A list of messages that carry the error details. There is a common set of + // message types for APIs to use. + Details []*google_protobuf.Any `protobuf:"bytes,3,rep,name=details" json:"details,omitempty"` +} + +func (m *Status) Reset() { *m = Status{} } +func (m *Status) String() string { return proto.CompactTextString(m) } +func (*Status) ProtoMessage() {} +func (*Status) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +func (m *Status) GetCode() int32 { + if m != nil { + return m.Code + } + return 0 +} + +func (m *Status) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + +func (m *Status) GetDetails() []*google_protobuf.Any { + if m != nil { + return m.Details + } + return nil +} + +func init() { + proto.RegisterType((*Status)(nil), "google.rpc.Status") +} + +func init() { proto.RegisterFile("google/rpc/status.proto", fileDescriptor0) } + +var fileDescriptor0 = []byte{ + // 209 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4f, 0xcf, 0xcf, 0x4f, + 0xcf, 0x49, 0xd5, 0x2f, 0x2a, 0x48, 0xd6, 0x2f, 0x2e, 0x49, 0x2c, 0x29, 0x2d, 0xd6, 0x2b, 0x28, + 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x82, 0x48, 0xe8, 0x15, 0x15, 0x24, 0x4b, 0x49, 0x42, 0x15, 0x81, + 0x65, 0x92, 0x4a, 0xd3, 0xf4, 0x13, 0xf3, 0x2a, 0x21, 0xca, 0x94, 0xd2, 0xb8, 0xd8, 0x82, 0xc1, + 0xda, 0x84, 0x84, 0xb8, 0x58, 0x92, 0xf3, 0x53, 0x52, 0x25, 0x18, 0x15, 0x18, 0x35, 0x58, 0x83, + 0xc0, 0x6c, 0x21, 0x09, 0x2e, 0xf6, 0xdc, 0xd4, 0xe2, 0xe2, 0xc4, 0xf4, 0x54, 0x09, 0x26, 0x05, + 0x46, 0x0d, 0xce, 0x20, 0x18, 0x57, 0x48, 0x8f, 0x8b, 0x3d, 0x25, 0xb5, 0x24, 0x31, 0x33, 0xa7, + 0x58, 0x82, 0x59, 0x81, 0x59, 0x83, 0xdb, 0x48, 0x44, 0x0f, 0x6a, 0x21, 0xcc, 0x12, 0x3d, 0xc7, + 0xbc, 0xca, 0x20, 0x98, 0x22, 0xa7, 0x38, 0x2e, 0xbe, 0xe4, 0xfc, 0x5c, 0x3d, 0x84, 0xa3, 0x9c, + 0xb8, 0x21, 0xf6, 0x06, 0x80, 0x94, 0x07, 0x30, 0x46, 0x99, 0x43, 0xa5, 0xd2, 0xf3, 0x73, 0x12, + 0xf3, 0xd2, 0xf5, 0xf2, 0x8b, 0xd2, 0xf5, 0xd3, 0x53, 0xf3, 0xc0, 0x86, 0xe9, 0x43, 0xa4, 0x12, + 0x0b, 0x32, 0x8b, 0x91, 0xfc, 0x69, 0x0d, 0xa1, 0x16, 0x31, 0x31, 0x07, 0x05, 0x38, 0x27, 0xb1, + 0x81, 0x55, 0x1a, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xa4, 0x53, 0xf0, 0x7c, 0x10, 0x01, 0x00, + 0x00, +} diff --git a/vendor/google.golang.org/genproto/regen.go b/vendor/google.golang.org/genproto/regen.go new file mode 100644 index 000000000..9c906f209 --- /dev/null +++ b/vendor/google.golang.org/genproto/regen.go @@ -0,0 +1,123 @@ +// Copyright 2016 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// +build ignore + +// Regen.go regenerates the genproto repository. +// +// Regen.go recursively walks through each directory named by given arguments, +// looking for all .proto files. (Symlinks are not followed.) +// If the pkg_prefix flag is not an empty string, +// any proto file without `go_package` option +// or whose option does not begin with the prefix is ignored. +// Protoc is executed on remaining files, +// one invocation per set of files declaring the same Go package. +package main + +import ( + "flag" + "fmt" + "io/ioutil" + "log" + "os" + "os/exec" + "path/filepath" + "regexp" + "strconv" + "strings" +) + +var goPkgOptRe = regexp.MustCompile(`(?m)^option go_package = (.*);`) + +func usage() { + fmt.Fprintln(os.Stderr, `usage: go run regen.go -go_out=path/to/output [-pkg_prefix=pkg/prefix] roots... + +Most users will not need to run this file directly. +To regenerate this repository, run regen.sh instead.`) + flag.PrintDefaults() +} + +func main() { + goOutDir := flag.String("go_out", "", "go_out argument to pass to protoc-gen-go") + pkgPrefix := flag.String("pkg_prefix", "", "only include proto files with go_package starting with this prefix") + flag.Usage = usage + flag.Parse() + + if *goOutDir == "" { + log.Fatal("need go_out flag") + } + + pkgFiles := make(map[string][]string) + walkFn := func(path string, info os.FileInfo, err error) error { + if err != nil { + return err + } + if !info.Mode().IsRegular() || !strings.HasSuffix(path, ".proto") { + return nil + } + pkg, err := goPkg(path) + if err != nil { + return err + } + pkgFiles[pkg] = append(pkgFiles[pkg], path) + return nil + } + for _, root := range flag.Args() { + if err := filepath.Walk(root, walkFn); err != nil { + log.Fatal(err) + } + } + for pkg, fnames := range pkgFiles { + if !strings.HasPrefix(pkg, *pkgPrefix) { + continue + } + if out, err := protoc(*goOutDir, flag.Args(), fnames); err != nil { + log.Fatalf("error executing protoc: %s\n%s", err, out) + } + } +} + +// goPkg reports the import path declared in the given file's +// `go_package` option. If the option is missing, goPkg returns empty string. +func goPkg(fname string) (string, error) { + content, err := ioutil.ReadFile(fname) + if err != nil { + return "", err + } + + var pkgName string + if match := goPkgOptRe.FindSubmatch(content); len(match) > 0 { + pn, err := strconv.Unquote(string(match[1])) + if err != nil { + return "", err + } + pkgName = pn + } + if p := strings.IndexRune(pkgName, ';'); p > 0 { + pkgName = pkgName[:p] + } + return pkgName, nil +} + +// protoc executes the "protoc" command on files named in fnames, +// passing go_out and include flags specified in goOut and includes respectively. +// protoc returns combined output from stdout and stderr. +func protoc(goOut string, includes, fnames []string) ([]byte, error) { + args := []string{"--go_out=plugins=grpc:" + goOut} + for _, inc := range includes { + args = append(args, "-I", inc) + } + args = append(args, fnames...) + return exec.Command("protoc", args...).CombinedOutput() +} diff --git a/vendor/google.golang.org/genproto/regen.sh b/vendor/google.golang.org/genproto/regen.sh new file mode 100755 index 000000000..8d9c73197 --- /dev/null +++ b/vendor/google.golang.org/genproto/regen.sh @@ -0,0 +1,77 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This script rebuilds the generated code for the protocol buffers. +# To run this you will need protoc and goprotobuf installed; +# see https://github.com/golang/protobuf for instructions. +# You also need Go and Git installed. + +set -e + +PKG=google.golang.org/genproto +PROTO_REPO=https://github.com/google/protobuf +PROTO_SUBDIR=src/google/protobuf +API_REPO=https://github.com/googleapis/googleapis + +function die() { + echo 1>&2 $* + exit 1 +} + +# Sanity check that the right tools are accessible. +for tool in go git protoc protoc-gen-go; do + q=$(which $tool) || die "didn't find $tool" + echo 1>&2 "$tool: $q" +done + +root=$(go list -f '{{.Root}}' $PKG/... | head -n1) +if [ -z "$root" ]; then + die "cannot find root of $PKG" +fi + +remove_dirs= +trap 'rm -rf $remove_dirs' EXIT + +if [ -z "$PROTOBUF" ]; then + proto_repo_dir=$(mktemp -d -t regen-cds-proto.XXXXXX) + git clone -q $PROTO_REPO $proto_repo_dir & + remove_dirs="$proto_repo_dir" + # The protoc include directory is actually the "src" directory of the repo. + protodir="$proto_repo_dir/src" +else + protodir="$PROTOBUF/src" +fi + +if [ -z "$GOOGLEAPIS" ]; then + apidir=$(mktemp -d -t regen-cds-api.XXXXXX) + git clone -q $API_REPO $apidir & + remove_dirs="$remove_dirs $apidir" +else + apidir="$GOOGLEAPIS" +fi + +wait + +# Nuke everything, we'll generate them back +rm -r googleapis/ protobuf/ + +go run regen.go -go_out "$root/src" -pkg_prefix "$PKG" "$apidir" "$protodir" + +# Sanity check the build. +echo 1>&2 "Checking that the libraries build..." +go build -v ./... + +echo 1>&2 "All done!" diff --git a/vendor/google.golang.org/grpc/.please-update b/vendor/google.golang.org/grpc/.please-update new file mode 100644 index 000000000..e69de29bb diff --git a/vendor/google.golang.org/grpc/.travis.yml b/vendor/google.golang.org/grpc/.travis.yml new file mode 100644 index 000000000..413881a1d --- /dev/null +++ b/vendor/google.golang.org/grpc/.travis.yml @@ -0,0 +1,21 @@ +language: go + +go: + - 1.6.x + - 1.7.x + - 1.8.x + - 1.9.x + +matrix: + include: + - go: 1.9.x + env: ARCH=386 + +go_import_path: google.golang.org/grpc + +before_install: + - if [[ "$TRAVIS_GO_VERSION" = 1.9* && "$ARCH" != "386" ]]; then ./vet.sh -install || exit 1; fi + +script: + - if [[ "$TRAVIS_GO_VERSION" = 1.9* && "$ARCH" != "386" ]]; then ./vet.sh || exit 1; fi + - make test testrace diff --git a/vendor/google.golang.org/grpc/AUTHORS b/vendor/google.golang.org/grpc/AUTHORS new file mode 100644 index 000000000..e491a9e7f --- /dev/null +++ b/vendor/google.golang.org/grpc/AUTHORS @@ -0,0 +1 @@ +Google Inc. diff --git a/vendor/google.golang.org/grpc/CONTRIBUTING.md b/vendor/google.golang.org/grpc/CONTRIBUTING.md new file mode 100644 index 000000000..a5c6e06e2 --- /dev/null +++ b/vendor/google.golang.org/grpc/CONTRIBUTING.md @@ -0,0 +1,32 @@ +# How to contribute + +We definitely welcome your patches and contributions to gRPC! + +If you are new to github, please start by reading [Pull Request howto](https://help.github.com/articles/about-pull-requests/) + +## Legal requirements + +In order to protect both you and ourselves, you will need to sign the +[Contributor License Agreement](https://cla.developers.google.com/clas). + +## Guidelines for Pull Requests +How to get your contributions merged smoothly and quickly. + +- Create **small PRs** that are narrowly focused on **addressing a single concern**. We often times receive PRs that are trying to fix several things at a time, but only one fix is considered acceptable, nothing gets merged and both author's & review's time is wasted. Create more PRs to address different concerns and everyone will be happy. + +- For speculative changes, consider opening an issue and discussing it first. If you are suggesting a behavioral or API change, consider starting with a [gRFC proposal](https://github.com/grpc/proposal). + +- Provide a good **PR description** as a record of **what** change is being made and **why** it was made. Link to a github issue if it exists. + +- Don't fix code style and formatting unless you are already changing that line to address an issue. PRs with irrelevant changes won't be merged. If you do want to fix formatting or style, do that in a separate PR. + +- Unless your PR is trivial, you should expect there will be reviewer comments that you'll need to address before merging. We expect you to be reasonably responsive to those comments, otherwise the PR will be closed after 2-3 weeks of inactivity. + +- Maintain **clean commit history** and use **meaningful commit messages**. PRs with messy commit history are difficult to review and won't be merged. Use `rebase -i upstream/master` to curate your commit history and/or to bring in latest changes from master (but avoid rebasing in the middle of a code review). + +- Keep your PR up to date with upstream/master (if there are merge conflicts, we can't really merge your change). + +- **All tests need to be passing** before your change can be merged. We recommend you **run tests locally** before creating your PR to catch breakages early on. + +- Exceptions to the rules can be made if there's a compelling reason for doing so. + diff --git a/vendor/google.golang.org/grpc/LICENSE b/vendor/google.golang.org/grpc/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/vendor/google.golang.org/grpc/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/google.golang.org/grpc/Makefile b/vendor/google.golang.org/grpc/Makefile new file mode 100644 index 000000000..eb284c238 --- /dev/null +++ b/vendor/google.golang.org/grpc/Makefile @@ -0,0 +1,45 @@ +all: test testrace + +deps: + go get -d -v google.golang.org/grpc/... + +updatedeps: + go get -d -v -u -f google.golang.org/grpc/... + +testdeps: + go get -d -v -t google.golang.org/grpc/... + +updatetestdeps: + go get -d -v -t -u -f google.golang.org/grpc/... + +build: deps + go build google.golang.org/grpc/... + +proto: + @ if ! which protoc > /dev/null; then \ + echo "error: protoc not installed" >&2; \ + exit 1; \ + fi + go generate google.golang.org/grpc/... + +test: testdeps + go test -v -cpu 1,4 google.golang.org/grpc/... + +testrace: testdeps + go test -v -race -cpu 1,4 google.golang.org/grpc/... + +clean: + go clean -i google.golang.org/grpc/... + +.PHONY: \ + all \ + deps \ + updatedeps \ + testdeps \ + updatetestdeps \ + build \ + proto \ + test \ + testrace \ + clean \ + coverage diff --git a/vendor/google.golang.org/grpc/README.md b/vendor/google.golang.org/grpc/README.md new file mode 100644 index 000000000..f1f789cfb --- /dev/null +++ b/vendor/google.golang.org/grpc/README.md @@ -0,0 +1,45 @@ +# gRPC-Go + +[![Build Status](https://travis-ci.org/grpc/grpc-go.svg)](https://travis-ci.org/grpc/grpc-go) [![GoDoc](https://godoc.org/google.golang.org/grpc?status.svg)](https://godoc.org/google.golang.org/grpc) + +The Go implementation of [gRPC](https://grpc.io/): A high performance, open source, general RPC framework that puts mobile and HTTP/2 first. For more information see the [gRPC Quick Start: Go](https://grpc.io/docs/quickstart/go.html) guide. + +Installation +------------ + +To install this package, you need to install Go and setup your Go workspace on your computer. The simplest way to install the library is to run: + +``` +$ go get -u google.golang.org/grpc +``` + +Prerequisites +------------- + +This requires Go 1.6 or later. + +Constraints +----------- +The grpc package should only depend on standard Go packages and a small number of exceptions. If your contribution introduces new dependencies which are NOT in the [list](http://godoc.org/google.golang.org/grpc?imports), you need a discussion with gRPC-Go authors and consultants. + +Documentation +------------- +See [API documentation](https://godoc.org/google.golang.org/grpc) for package and API descriptions and find examples in the [examples directory](examples/). + +Performance +----------- +See the current benchmarks for some of the languages supported in [this dashboard](https://performance-dot-grpc-testing.appspot.com/explore?dashboard=5652536396611584&widget=490377658&container=1286539696). + +Status +------ +General Availability [Google Cloud Platform Launch Stages](https://cloud.google.com/terms/launch-stages). + +FAQ +--- + +#### Compiling error, undefined: grpc.SupportPackageIsVersion + +Please update proto package, gRPC package and rebuild the proto files: + - `go get -u github.com/golang/protobuf/{proto,protoc-gen-go}` + - `go get -u google.golang.org/grpc` + - `protoc --go_out=plugins=grpc:. *.proto` diff --git a/vendor/google.golang.org/grpc/backoff.go b/vendor/google.golang.org/grpc/backoff.go new file mode 100644 index 000000000..090fbe87c --- /dev/null +++ b/vendor/google.golang.org/grpc/backoff.go @@ -0,0 +1,98 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpc + +import ( + "math/rand" + "time" +) + +// DefaultBackoffConfig uses values specified for backoff in +// https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md. +var ( + DefaultBackoffConfig = BackoffConfig{ + MaxDelay: 120 * time.Second, + baseDelay: 1.0 * time.Second, + factor: 1.6, + jitter: 0.2, + } +) + +// backoffStrategy defines the methodology for backing off after a grpc +// connection failure. +// +// This is unexported until the gRPC project decides whether or not to allow +// alternative backoff strategies. Once a decision is made, this type and its +// method may be exported. +type backoffStrategy interface { + // backoff returns the amount of time to wait before the next retry given + // the number of consecutive failures. + backoff(retries int) time.Duration +} + +// BackoffConfig defines the parameters for the default gRPC backoff strategy. +type BackoffConfig struct { + // MaxDelay is the upper bound of backoff delay. + MaxDelay time.Duration + + // TODO(stevvooe): The following fields are not exported, as allowing + // changes would violate the current gRPC specification for backoff. If + // gRPC decides to allow more interesting backoff strategies, these fields + // may be opened up in the future. + + // baseDelay is the amount of time to wait before retrying after the first + // failure. + baseDelay time.Duration + + // factor is applied to the backoff after each retry. + factor float64 + + // jitter provides a range to randomize backoff delays. + jitter float64 +} + +func setDefaults(bc *BackoffConfig) { + md := bc.MaxDelay + *bc = DefaultBackoffConfig + + if md > 0 { + bc.MaxDelay = md + } +} + +func (bc BackoffConfig) backoff(retries int) time.Duration { + if retries == 0 { + return bc.baseDelay + } + backoff, max := float64(bc.baseDelay), float64(bc.MaxDelay) + for backoff < max && retries > 0 { + backoff *= bc.factor + retries-- + } + if backoff > max { + backoff = max + } + // Randomize backoff delays so that if a cluster of requests start at + // the same time, they won't operate in lockstep. + backoff *= 1 + bc.jitter*(rand.Float64()*2-1) + if backoff < 0 { + return 0 + } + return time.Duration(backoff) +} diff --git a/vendor/google.golang.org/grpc/backoff_test.go b/vendor/google.golang.org/grpc/backoff_test.go new file mode 100644 index 000000000..37e8e3f62 --- /dev/null +++ b/vendor/google.golang.org/grpc/backoff_test.go @@ -0,0 +1,29 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpc + +import "testing" + +func TestBackoffConfigDefaults(t *testing.T) { + b := BackoffConfig{} + setDefaults(&b) + if b != DefaultBackoffConfig { + t.Fatalf("expected BackoffConfig to pickup default parameters: %v != %v", b, DefaultBackoffConfig) + } +} diff --git a/vendor/google.golang.org/grpc/balancer.go b/vendor/google.golang.org/grpc/balancer.go new file mode 100644 index 000000000..0fec7b6a3 --- /dev/null +++ b/vendor/google.golang.org/grpc/balancer.go @@ -0,0 +1,408 @@ +/* + * + * Copyright 2016 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpc + +import ( + "fmt" + "net" + "sync" + + "golang.org/x/net/context" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/credentials" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/naming" +) + +// Address represents a server the client connects to. +// This is the EXPERIMENTAL API and may be changed or extended in the future. +type Address struct { + // Addr is the server address on which a connection will be established. + Addr string + // Metadata is the information associated with Addr, which may be used + // to make load balancing decision. + Metadata interface{} +} + +// BalancerConfig specifies the configurations for Balancer. +type BalancerConfig struct { + // DialCreds is the transport credential the Balancer implementation can + // use to dial to a remote load balancer server. The Balancer implementations + // can ignore this if it does not need to talk to another party securely. + DialCreds credentials.TransportCredentials + // Dialer is the custom dialer the Balancer implementation can use to dial + // to a remote load balancer server. The Balancer implementations + // can ignore this if it doesn't need to talk to remote balancer. + Dialer func(context.Context, string) (net.Conn, error) +} + +// BalancerGetOptions configures a Get call. +// This is the EXPERIMENTAL API and may be changed or extended in the future. +type BalancerGetOptions struct { + // BlockingWait specifies whether Get should block when there is no + // connected address. + BlockingWait bool +} + +// Balancer chooses network addresses for RPCs. +// This is the EXPERIMENTAL API and may be changed or extended in the future. +type Balancer interface { + // Start does the initialization work to bootstrap a Balancer. For example, + // this function may start the name resolution and watch the updates. It will + // be called when dialing. + Start(target string, config BalancerConfig) error + // Up informs the Balancer that gRPC has a connection to the server at + // addr. It returns down which is called once the connection to addr gets + // lost or closed. + // TODO: It is not clear how to construct and take advantage of the meaningful error + // parameter for down. Need realistic demands to guide. + Up(addr Address) (down func(error)) + // Get gets the address of a server for the RPC corresponding to ctx. + // i) If it returns a connected address, gRPC internals issues the RPC on the + // connection to this address; + // ii) If it returns an address on which the connection is under construction + // (initiated by Notify(...)) but not connected, gRPC internals + // * fails RPC if the RPC is fail-fast and connection is in the TransientFailure or + // Shutdown state; + // or + // * issues RPC on the connection otherwise. + // iii) If it returns an address on which the connection does not exist, gRPC + // internals treats it as an error and will fail the corresponding RPC. + // + // Therefore, the following is the recommended rule when writing a custom Balancer. + // If opts.BlockingWait is true, it should return a connected address or + // block if there is no connected address. It should respect the timeout or + // cancellation of ctx when blocking. If opts.BlockingWait is false (for fail-fast + // RPCs), it should return an address it has notified via Notify(...) immediately + // instead of blocking. + // + // The function returns put which is called once the rpc has completed or failed. + // put can collect and report RPC stats to a remote load balancer. + // + // This function should only return the errors Balancer cannot recover by itself. + // gRPC internals will fail the RPC if an error is returned. + Get(ctx context.Context, opts BalancerGetOptions) (addr Address, put func(), err error) + // Notify returns a channel that is used by gRPC internals to watch the addresses + // gRPC needs to connect. The addresses might be from a name resolver or remote + // load balancer. gRPC internals will compare it with the existing connected + // addresses. If the address Balancer notified is not in the existing connected + // addresses, gRPC starts to connect the address. If an address in the existing + // connected addresses is not in the notification list, the corresponding connection + // is shutdown gracefully. Otherwise, there are no operations to take. Note that + // the Address slice must be the full list of the Addresses which should be connected. + // It is NOT delta. + Notify() <-chan []Address + // Close shuts down the balancer. + Close() error +} + +// downErr implements net.Error. It is constructed by gRPC internals and passed to the down +// call of Balancer. +type downErr struct { + timeout bool + temporary bool + desc string +} + +func (e downErr) Error() string { return e.desc } +func (e downErr) Timeout() bool { return e.timeout } +func (e downErr) Temporary() bool { return e.temporary } + +func downErrorf(timeout, temporary bool, format string, a ...interface{}) downErr { + return downErr{ + timeout: timeout, + temporary: temporary, + desc: fmt.Sprintf(format, a...), + } +} + +// RoundRobin returns a Balancer that selects addresses round-robin. It uses r to watch +// the name resolution updates and updates the addresses available correspondingly. +func RoundRobin(r naming.Resolver) Balancer { + return &roundRobin{r: r} +} + +type addrInfo struct { + addr Address + connected bool +} + +type roundRobin struct { + r naming.Resolver + w naming.Watcher + addrs []*addrInfo // all the addresses the client should potentially connect + mu sync.Mutex + addrCh chan []Address // the channel to notify gRPC internals the list of addresses the client should connect to. + next int // index of the next address to return for Get() + waitCh chan struct{} // the channel to block when there is no connected address available + done bool // The Balancer is closed. +} + +func (rr *roundRobin) watchAddrUpdates() error { + updates, err := rr.w.Next() + if err != nil { + grpclog.Warningf("grpc: the naming watcher stops working due to %v.", err) + return err + } + rr.mu.Lock() + defer rr.mu.Unlock() + for _, update := range updates { + addr := Address{ + Addr: update.Addr, + Metadata: update.Metadata, + } + switch update.Op { + case naming.Add: + var exist bool + for _, v := range rr.addrs { + if addr == v.addr { + exist = true + grpclog.Infoln("grpc: The name resolver wanted to add an existing address: ", addr) + break + } + } + if exist { + continue + } + rr.addrs = append(rr.addrs, &addrInfo{addr: addr}) + case naming.Delete: + for i, v := range rr.addrs { + if addr == v.addr { + copy(rr.addrs[i:], rr.addrs[i+1:]) + rr.addrs = rr.addrs[:len(rr.addrs)-1] + break + } + } + default: + grpclog.Errorln("Unknown update.Op ", update.Op) + } + } + // Make a copy of rr.addrs and write it onto rr.addrCh so that gRPC internals gets notified. + open := make([]Address, len(rr.addrs)) + for i, v := range rr.addrs { + open[i] = v.addr + } + if rr.done { + return ErrClientConnClosing + } + select { + case <-rr.addrCh: + default: + } + rr.addrCh <- open + return nil +} + +func (rr *roundRobin) Start(target string, config BalancerConfig) error { + rr.mu.Lock() + defer rr.mu.Unlock() + if rr.done { + return ErrClientConnClosing + } + if rr.r == nil { + // If there is no name resolver installed, it is not needed to + // do name resolution. In this case, target is added into rr.addrs + // as the only address available and rr.addrCh stays nil. + rr.addrs = append(rr.addrs, &addrInfo{addr: Address{Addr: target}}) + return nil + } + w, err := rr.r.Resolve(target) + if err != nil { + return err + } + rr.w = w + rr.addrCh = make(chan []Address, 1) + go func() { + for { + if err := rr.watchAddrUpdates(); err != nil { + return + } + } + }() + return nil +} + +// Up sets the connected state of addr and sends notification if there are pending +// Get() calls. +func (rr *roundRobin) Up(addr Address) func(error) { + rr.mu.Lock() + defer rr.mu.Unlock() + var cnt int + for _, a := range rr.addrs { + if a.addr == addr { + if a.connected { + return nil + } + a.connected = true + } + if a.connected { + cnt++ + } + } + // addr is only one which is connected. Notify the Get() callers who are blocking. + if cnt == 1 && rr.waitCh != nil { + close(rr.waitCh) + rr.waitCh = nil + } + return func(err error) { + rr.down(addr, err) + } +} + +// down unsets the connected state of addr. +func (rr *roundRobin) down(addr Address, err error) { + rr.mu.Lock() + defer rr.mu.Unlock() + for _, a := range rr.addrs { + if addr == a.addr { + a.connected = false + break + } + } +} + +// Get returns the next addr in the rotation. +func (rr *roundRobin) Get(ctx context.Context, opts BalancerGetOptions) (addr Address, put func(), err error) { + var ch chan struct{} + rr.mu.Lock() + if rr.done { + rr.mu.Unlock() + err = ErrClientConnClosing + return + } + + if len(rr.addrs) > 0 { + if rr.next >= len(rr.addrs) { + rr.next = 0 + } + next := rr.next + for { + a := rr.addrs[next] + next = (next + 1) % len(rr.addrs) + if a.connected { + addr = a.addr + rr.next = next + rr.mu.Unlock() + return + } + if next == rr.next { + // Has iterated all the possible address but none is connected. + break + } + } + } + if !opts.BlockingWait { + if len(rr.addrs) == 0 { + rr.mu.Unlock() + err = Errorf(codes.Unavailable, "there is no address available") + return + } + // Returns the next addr on rr.addrs for failfast RPCs. + addr = rr.addrs[rr.next].addr + rr.next++ + rr.mu.Unlock() + return + } + // Wait on rr.waitCh for non-failfast RPCs. + if rr.waitCh == nil { + ch = make(chan struct{}) + rr.waitCh = ch + } else { + ch = rr.waitCh + } + rr.mu.Unlock() + for { + select { + case <-ctx.Done(): + err = ctx.Err() + return + case <-ch: + rr.mu.Lock() + if rr.done { + rr.mu.Unlock() + err = ErrClientConnClosing + return + } + + if len(rr.addrs) > 0 { + if rr.next >= len(rr.addrs) { + rr.next = 0 + } + next := rr.next + for { + a := rr.addrs[next] + next = (next + 1) % len(rr.addrs) + if a.connected { + addr = a.addr + rr.next = next + rr.mu.Unlock() + return + } + if next == rr.next { + // Has iterated all the possible address but none is connected. + break + } + } + } + // The newly added addr got removed by Down() again. + if rr.waitCh == nil { + ch = make(chan struct{}) + rr.waitCh = ch + } else { + ch = rr.waitCh + } + rr.mu.Unlock() + } + } +} + +func (rr *roundRobin) Notify() <-chan []Address { + return rr.addrCh +} + +func (rr *roundRobin) Close() error { + rr.mu.Lock() + defer rr.mu.Unlock() + if rr.done { + return errBalancerClosed + } + rr.done = true + if rr.w != nil { + rr.w.Close() + } + if rr.waitCh != nil { + close(rr.waitCh) + rr.waitCh = nil + } + if rr.addrCh != nil { + close(rr.addrCh) + } + return nil +} + +// pickFirst is used to test multi-addresses in one addrConn in which all addresses share the same addrConn. +// It is a wrapper around roundRobin balancer. The logic of all methods works fine because balancer.Get() +// returns the only address Up by resetTransport(). +type pickFirst struct { + *roundRobin +} + +func pickFirstBalancer(r naming.Resolver) Balancer { + return &pickFirst{&roundRobin{r: r}} +} diff --git a/vendor/google.golang.org/grpc/balancer_test.go b/vendor/google.golang.org/grpc/balancer_test.go new file mode 100644 index 000000000..86fc19679 --- /dev/null +++ b/vendor/google.golang.org/grpc/balancer_test.go @@ -0,0 +1,790 @@ +/* + * + * Copyright 2016 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpc + +import ( + "fmt" + "math" + "strconv" + "sync" + "testing" + "time" + + "golang.org/x/net/context" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/naming" +) + +type testWatcher struct { + // the channel to receives name resolution updates + update chan *naming.Update + // the side channel to get to know how many updates in a batch + side chan int + // the channel to notifiy update injector that the update reading is done + readDone chan int +} + +func (w *testWatcher) Next() (updates []*naming.Update, err error) { + n := <-w.side + if n == 0 { + return nil, fmt.Errorf("w.side is closed") + } + for i := 0; i < n; i++ { + u := <-w.update + if u != nil { + updates = append(updates, u) + } + } + w.readDone <- 0 + return +} + +func (w *testWatcher) Close() { +} + +// Inject naming resolution updates to the testWatcher. +func (w *testWatcher) inject(updates []*naming.Update) { + w.side <- len(updates) + for _, u := range updates { + w.update <- u + } + <-w.readDone +} + +type testNameResolver struct { + w *testWatcher + addr string +} + +func (r *testNameResolver) Resolve(target string) (naming.Watcher, error) { + r.w = &testWatcher{ + update: make(chan *naming.Update, 1), + side: make(chan int, 1), + readDone: make(chan int), + } + r.w.side <- 1 + r.w.update <- &naming.Update{ + Op: naming.Add, + Addr: r.addr, + } + go func() { + <-r.w.readDone + }() + return r.w, nil +} + +func startServers(t *testing.T, numServers int, maxStreams uint32) ([]*server, *testNameResolver) { + var servers []*server + for i := 0; i < numServers; i++ { + s := newTestServer() + servers = append(servers, s) + go s.start(t, 0, maxStreams) + s.wait(t, 2*time.Second) + } + // Point to server[0] + addr := "localhost:" + servers[0].port + return servers, &testNameResolver{ + addr: addr, + } +} + +func TestNameDiscovery(t *testing.T) { + // Start 2 servers on 2 ports. + numServers := 2 + servers, r := startServers(t, numServers, math.MaxUint32) + cc, err := Dial("foo.bar.com", WithBalancer(RoundRobin(r)), WithBlock(), WithInsecure(), WithCodec(testCodec{})) + if err != nil { + t.Fatalf("Failed to create ClientConn: %v", err) + } + req := "port" + var reply string + if err := Invoke(context.Background(), "/foo/bar", &req, &reply, cc); err == nil || ErrorDesc(err) != servers[0].port { + t.Fatalf("grpc.Invoke(_, _, _, _, _) = %v, want %s", err, servers[0].port) + } + // Inject the name resolution change to remove servers[0] and add servers[1]. + var updates []*naming.Update + updates = append(updates, &naming.Update{ + Op: naming.Delete, + Addr: "localhost:" + servers[0].port, + }) + updates = append(updates, &naming.Update{ + Op: naming.Add, + Addr: "localhost:" + servers[1].port, + }) + r.w.inject(updates) + // Loop until the rpcs in flight talks to servers[1]. + for { + if err := Invoke(context.Background(), "/foo/bar", &req, &reply, cc); err != nil && ErrorDesc(err) == servers[1].port { + break + } + time.Sleep(10 * time.Millisecond) + } + cc.Close() + for i := 0; i < numServers; i++ { + servers[i].stop() + } +} + +func TestEmptyAddrs(t *testing.T) { + servers, r := startServers(t, 1, math.MaxUint32) + cc, err := Dial("foo.bar.com", WithBalancer(RoundRobin(r)), WithBlock(), WithInsecure(), WithCodec(testCodec{})) + if err != nil { + t.Fatalf("Failed to create ClientConn: %v", err) + } + var reply string + if err := Invoke(context.Background(), "/foo/bar", &expectedRequest, &reply, cc); err != nil || reply != expectedResponse { + t.Fatalf("grpc.Invoke(_, _, _, _, _) = %v, reply = %q, want %q, <nil>", err, reply, expectedResponse) + } + // Inject name resolution change to remove the server so that there is no address + // available after that. + u := &naming.Update{ + Op: naming.Delete, + Addr: "localhost:" + servers[0].port, + } + r.w.inject([]*naming.Update{u}) + // Loop until the above updates apply. + for { + time.Sleep(10 * time.Millisecond) + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Millisecond) + if err := Invoke(ctx, "/foo/bar", &expectedRequest, &reply, cc); err != nil { + cancel() + break + } + cancel() + } + cc.Close() + servers[0].stop() +} + +func TestRoundRobin(t *testing.T) { + // Start 3 servers on 3 ports. + numServers := 3 + servers, r := startServers(t, numServers, math.MaxUint32) + cc, err := Dial("foo.bar.com", WithBalancer(RoundRobin(r)), WithBlock(), WithInsecure(), WithCodec(testCodec{})) + if err != nil { + t.Fatalf("Failed to create ClientConn: %v", err) + } + // Add servers[1] to the service discovery. + u := &naming.Update{ + Op: naming.Add, + Addr: "localhost:" + servers[1].port, + } + r.w.inject([]*naming.Update{u}) + req := "port" + var reply string + // Loop until servers[1] is up + for { + if err := Invoke(context.Background(), "/foo/bar", &req, &reply, cc); err != nil && ErrorDesc(err) == servers[1].port { + break + } + time.Sleep(10 * time.Millisecond) + } + // Add server2[2] to the service discovery. + u = &naming.Update{ + Op: naming.Add, + Addr: "localhost:" + servers[2].port, + } + r.w.inject([]*naming.Update{u}) + // Loop until both servers[2] are up. + for { + if err := Invoke(context.Background(), "/foo/bar", &req, &reply, cc); err != nil && ErrorDesc(err) == servers[2].port { + break + } + time.Sleep(10 * time.Millisecond) + } + // Check the incoming RPCs served in a round-robin manner. + for i := 0; i < 10; i++ { + if err := Invoke(context.Background(), "/foo/bar", &req, &reply, cc); err == nil || ErrorDesc(err) != servers[i%numServers].port { + t.Fatalf("Index %d: Invoke(_, _, _, _, _) = %v, want %s", i, err, servers[i%numServers].port) + } + } + cc.Close() + for i := 0; i < numServers; i++ { + servers[i].stop() + } +} + +func TestCloseWithPendingRPC(t *testing.T) { + servers, r := startServers(t, 1, math.MaxUint32) + cc, err := Dial("foo.bar.com", WithBalancer(RoundRobin(r)), WithBlock(), WithInsecure(), WithCodec(testCodec{})) + if err != nil { + t.Fatalf("Failed to create ClientConn: %v", err) + } + var reply string + if err := Invoke(context.Background(), "/foo/bar", &expectedRequest, &reply, cc, FailFast(false)); err != nil { + t.Fatalf("grpc.Invoke(_, _, _, _, _) = %v, want %s", err, servers[0].port) + } + // Remove the server. + updates := []*naming.Update{{ + Op: naming.Delete, + Addr: "localhost:" + servers[0].port, + }} + r.w.inject(updates) + // Loop until the above update applies. + for { + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Millisecond) + if err := Invoke(ctx, "/foo/bar", &expectedRequest, &reply, cc, FailFast(false)); Code(err) == codes.DeadlineExceeded { + cancel() + break + } + time.Sleep(10 * time.Millisecond) + cancel() + } + // Issue 2 RPCs which should be completed with error status once cc is closed. + var wg sync.WaitGroup + wg.Add(2) + go func() { + defer wg.Done() + var reply string + if err := Invoke(context.Background(), "/foo/bar", &expectedRequest, &reply, cc, FailFast(false)); err == nil { + t.Errorf("grpc.Invoke(_, _, _, _, _) = %v, want not nil", err) + } + }() + go func() { + defer wg.Done() + var reply string + time.Sleep(5 * time.Millisecond) + if err := Invoke(context.Background(), "/foo/bar", &expectedRequest, &reply, cc, FailFast(false)); err == nil { + t.Errorf("grpc.Invoke(_, _, _, _, _) = %v, want not nil", err) + } + }() + time.Sleep(5 * time.Millisecond) + cc.Close() + wg.Wait() + servers[0].stop() +} + +func TestGetOnWaitChannel(t *testing.T) { + servers, r := startServers(t, 1, math.MaxUint32) + cc, err := Dial("foo.bar.com", WithBalancer(RoundRobin(r)), WithBlock(), WithInsecure(), WithCodec(testCodec{})) + if err != nil { + t.Fatalf("Failed to create ClientConn: %v", err) + } + // Remove all servers so that all upcoming RPCs will block on waitCh. + updates := []*naming.Update{{ + Op: naming.Delete, + Addr: "localhost:" + servers[0].port, + }} + r.w.inject(updates) + for { + var reply string + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Millisecond) + if err := Invoke(ctx, "/foo/bar", &expectedRequest, &reply, cc, FailFast(false)); Code(err) == codes.DeadlineExceeded { + cancel() + break + } + cancel() + time.Sleep(10 * time.Millisecond) + } + var wg sync.WaitGroup + wg.Add(1) + go func() { + defer wg.Done() + var reply string + if err := Invoke(context.Background(), "/foo/bar", &expectedRequest, &reply, cc, FailFast(false)); err != nil { + t.Errorf("grpc.Invoke(_, _, _, _, _) = %v, want <nil>", err) + } + }() + // Add a connected server to get the above RPC through. + updates = []*naming.Update{{ + Op: naming.Add, + Addr: "localhost:" + servers[0].port, + }} + r.w.inject(updates) + // Wait until the above RPC succeeds. + wg.Wait() + cc.Close() + servers[0].stop() +} + +func TestOneServerDown(t *testing.T) { + // Start 2 servers. + numServers := 2 + servers, r := startServers(t, numServers, math.MaxUint32) + cc, err := Dial("foo.bar.com", WithBalancer(RoundRobin(r)), WithBlock(), WithInsecure(), WithCodec(testCodec{})) + if err != nil { + t.Fatalf("Failed to create ClientConn: %v", err) + } + // Add servers[1] to the service discovery. + var updates []*naming.Update + updates = append(updates, &naming.Update{ + Op: naming.Add, + Addr: "localhost:" + servers[1].port, + }) + r.w.inject(updates) + req := "port" + var reply string + // Loop until servers[1] is up + for { + if err := Invoke(context.Background(), "/foo/bar", &req, &reply, cc); err != nil && ErrorDesc(err) == servers[1].port { + break + } + time.Sleep(10 * time.Millisecond) + } + + var wg sync.WaitGroup + numRPC := 100 + sleepDuration := 10 * time.Millisecond + wg.Add(1) + go func() { + time.Sleep(sleepDuration) + // After sleepDuration, kill server[0]. + servers[0].stop() + wg.Done() + }() + + // All non-failfast RPCs should not block because there's at least one connection available. + for i := 0; i < numRPC; i++ { + wg.Add(1) + go func() { + time.Sleep(sleepDuration) + // After sleepDuration, invoke RPC. + // server[0] is killed around the same time to make it racy between balancer and gRPC internals. + Invoke(context.Background(), "/foo/bar", &req, &reply, cc, FailFast(false)) + wg.Done() + }() + } + wg.Wait() + cc.Close() + for i := 0; i < numServers; i++ { + servers[i].stop() + } +} + +func TestOneAddressRemoval(t *testing.T) { + // Start 2 servers. + numServers := 2 + servers, r := startServers(t, numServers, math.MaxUint32) + cc, err := Dial("foo.bar.com", WithBalancer(RoundRobin(r)), WithBlock(), WithInsecure(), WithCodec(testCodec{})) + if err != nil { + t.Fatalf("Failed to create ClientConn: %v", err) + } + // Add servers[1] to the service discovery. + var updates []*naming.Update + updates = append(updates, &naming.Update{ + Op: naming.Add, + Addr: "localhost:" + servers[1].port, + }) + r.w.inject(updates) + req := "port" + var reply string + // Loop until servers[1] is up + for { + if err := Invoke(context.Background(), "/foo/bar", &req, &reply, cc); err != nil && ErrorDesc(err) == servers[1].port { + break + } + time.Sleep(10 * time.Millisecond) + } + + var wg sync.WaitGroup + numRPC := 100 + sleepDuration := 10 * time.Millisecond + wg.Add(1) + go func() { + time.Sleep(sleepDuration) + // After sleepDuration, delete server[0]. + var updates []*naming.Update + updates = append(updates, &naming.Update{ + Op: naming.Delete, + Addr: "localhost:" + servers[0].port, + }) + r.w.inject(updates) + wg.Done() + }() + + // All non-failfast RPCs should not fail because there's at least one connection available. + for i := 0; i < numRPC; i++ { + wg.Add(1) + go func() { + var reply string + time.Sleep(sleepDuration) + // After sleepDuration, invoke RPC. + // server[0] is removed around the same time to make it racy between balancer and gRPC internals. + if err := Invoke(context.Background(), "/foo/bar", &expectedRequest, &reply, cc, FailFast(false)); err != nil { + t.Errorf("grpc.Invoke(_, _, _, _, _) = %v, want not nil", err) + } + wg.Done() + }() + } + wg.Wait() + cc.Close() + for i := 0; i < numServers; i++ { + servers[i].stop() + } +} + +func checkServerUp(t *testing.T, currentServer *server) { + req := "port" + port := currentServer.port + cc, err := Dial("localhost:"+port, WithBlock(), WithInsecure(), WithCodec(testCodec{})) + if err != nil { + t.Fatalf("Failed to create ClientConn: %v", err) + } + var reply string + for { + if err := Invoke(context.Background(), "/foo/bar", &req, &reply, cc); err != nil && ErrorDesc(err) == port { + break + } + time.Sleep(10 * time.Millisecond) + } + cc.Close() +} + +func TestPickFirstEmptyAddrs(t *testing.T) { + servers, r := startServers(t, 1, math.MaxUint32) + defer servers[0].stop() + cc, err := Dial("foo.bar.com", WithBalancer(pickFirstBalancer(r)), WithBlock(), WithInsecure(), WithCodec(testCodec{})) + if err != nil { + t.Fatalf("Failed to create ClientConn: %v", err) + } + defer cc.Close() + var reply string + if err := Invoke(context.Background(), "/foo/bar", &expectedRequest, &reply, cc); err != nil || reply != expectedResponse { + t.Fatalf("grpc.Invoke(_, _, _, _, _) = %v, reply = %q, want %q, <nil>", err, reply, expectedResponse) + } + // Inject name resolution change to remove the server so that there is no address + // available after that. + u := &naming.Update{ + Op: naming.Delete, + Addr: "localhost:" + servers[0].port, + } + r.w.inject([]*naming.Update{u}) + // Loop until the above updates apply. + for { + time.Sleep(10 * time.Millisecond) + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Millisecond) + if err := Invoke(ctx, "/foo/bar", &expectedRequest, &reply, cc); err != nil { + cancel() + break + } + cancel() + } +} + +func TestPickFirstCloseWithPendingRPC(t *testing.T) { + servers, r := startServers(t, 1, math.MaxUint32) + defer servers[0].stop() + cc, err := Dial("foo.bar.com", WithBalancer(pickFirstBalancer(r)), WithBlock(), WithInsecure(), WithCodec(testCodec{})) + if err != nil { + t.Fatalf("Failed to create ClientConn: %v", err) + } + var reply string + if err := Invoke(context.Background(), "/foo/bar", &expectedRequest, &reply, cc, FailFast(false)); err != nil { + t.Fatalf("grpc.Invoke(_, _, _, _, _) = %v, want %s", err, servers[0].port) + } + // Remove the server. + updates := []*naming.Update{{ + Op: naming.Delete, + Addr: "localhost:" + servers[0].port, + }} + r.w.inject(updates) + // Loop until the above update applies. + for { + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Millisecond) + if err := Invoke(ctx, "/foo/bar", &expectedRequest, &reply, cc, FailFast(false)); Code(err) == codes.DeadlineExceeded { + cancel() + break + } + time.Sleep(10 * time.Millisecond) + cancel() + } + // Issue 2 RPCs which should be completed with error status once cc is closed. + var wg sync.WaitGroup + wg.Add(2) + go func() { + defer wg.Done() + var reply string + if err := Invoke(context.Background(), "/foo/bar", &expectedRequest, &reply, cc, FailFast(false)); err == nil { + t.Errorf("grpc.Invoke(_, _, _, _, _) = %v, want not nil", err) + } + }() + go func() { + defer wg.Done() + var reply string + time.Sleep(5 * time.Millisecond) + if err := Invoke(context.Background(), "/foo/bar", &expectedRequest, &reply, cc, FailFast(false)); err == nil { + t.Errorf("grpc.Invoke(_, _, _, _, _) = %v, want not nil", err) + } + }() + time.Sleep(5 * time.Millisecond) + cc.Close() + wg.Wait() +} + +func TestPickFirstOrderAllServerUp(t *testing.T) { + // Start 3 servers on 3 ports. + numServers := 3 + servers, r := startServers(t, numServers, math.MaxUint32) + for i := 0; i < numServers; i++ { + defer servers[i].stop() + } + cc, err := Dial("foo.bar.com", WithBalancer(pickFirstBalancer(r)), WithBlock(), WithInsecure(), WithCodec(testCodec{})) + if err != nil { + t.Fatalf("Failed to create ClientConn: %v", err) + } + defer cc.Close() + // Add servers[1] and [2] to the service discovery. + u := &naming.Update{ + Op: naming.Add, + Addr: "localhost:" + servers[1].port, + } + r.w.inject([]*naming.Update{u}) + + u = &naming.Update{ + Op: naming.Add, + Addr: "localhost:" + servers[2].port, + } + r.w.inject([]*naming.Update{u}) + + // Loop until all 3 servers are up + checkServerUp(t, servers[0]) + checkServerUp(t, servers[1]) + checkServerUp(t, servers[2]) + + // Check the incoming RPCs served in server[0] + req := "port" + var reply string + for i := 0; i < 20; i++ { + if err := Invoke(context.Background(), "/foo/bar", &req, &reply, cc); err == nil || ErrorDesc(err) != servers[0].port { + t.Fatalf("Index %d: Invoke(_, _, _, _, _) = %v, want %s", 0, err, servers[0].port) + } + time.Sleep(10 * time.Millisecond) + } + + // Delete server[0] in the balancer, the incoming RPCs served in server[1] + // For test addrconn, close server[0] instead + u = &naming.Update{ + Op: naming.Delete, + Addr: "localhost:" + servers[0].port, + } + r.w.inject([]*naming.Update{u}) + // Loop until it changes to server[1] + for { + if err := Invoke(context.Background(), "/foo/bar", &req, &reply, cc); err != nil && ErrorDesc(err) == servers[1].port { + break + } + time.Sleep(10 * time.Millisecond) + } + for i := 0; i < 20; i++ { + if err := Invoke(context.Background(), "/foo/bar", &req, &reply, cc); err == nil || ErrorDesc(err) != servers[1].port { + t.Fatalf("Index %d: Invoke(_, _, _, _, _) = %v, want %s", 1, err, servers[1].port) + } + time.Sleep(10 * time.Millisecond) + } + + // Add server[0] back to the balancer, the incoming RPCs served in server[1] + // Add is append operation, the order of Notify now is {server[1].port server[2].port server[0].port} + u = &naming.Update{ + Op: naming.Add, + Addr: "localhost:" + servers[0].port, + } + r.w.inject([]*naming.Update{u}) + for i := 0; i < 20; i++ { + if err := Invoke(context.Background(), "/foo/bar", &req, &reply, cc); err == nil || ErrorDesc(err) != servers[1].port { + t.Fatalf("Index %d: Invoke(_, _, _, _, _) = %v, want %s", 1, err, servers[1].port) + } + time.Sleep(10 * time.Millisecond) + } + + // Delete server[1] in the balancer, the incoming RPCs served in server[2] + u = &naming.Update{ + Op: naming.Delete, + Addr: "localhost:" + servers[1].port, + } + r.w.inject([]*naming.Update{u}) + for { + if err := Invoke(context.Background(), "/foo/bar", &req, &reply, cc); err != nil && ErrorDesc(err) == servers[2].port { + break + } + time.Sleep(1 * time.Second) + } + for i := 0; i < 20; i++ { + if err := Invoke(context.Background(), "/foo/bar", &req, &reply, cc); err == nil || ErrorDesc(err) != servers[2].port { + t.Fatalf("Index %d: Invoke(_, _, _, _, _) = %v, want %s", 2, err, servers[2].port) + } + time.Sleep(10 * time.Millisecond) + } + + // Delete server[2] in the balancer, the incoming RPCs served in server[0] + u = &naming.Update{ + Op: naming.Delete, + Addr: "localhost:" + servers[2].port, + } + r.w.inject([]*naming.Update{u}) + for { + if err := Invoke(context.Background(), "/foo/bar", &req, &reply, cc); err != nil && ErrorDesc(err) == servers[0].port { + break + } + time.Sleep(1 * time.Second) + } + for i := 0; i < 20; i++ { + if err := Invoke(context.Background(), "/foo/bar", &req, &reply, cc); err == nil || ErrorDesc(err) != servers[0].port { + t.Fatalf("Index %d: Invoke(_, _, _, _, _) = %v, want %s", 2, err, servers[2].port) + } + time.Sleep(10 * time.Millisecond) + } +} + +func TestPickFirstOrderOneServerDown(t *testing.T) { + // Start 3 servers on 3 ports. + numServers := 3 + servers, r := startServers(t, numServers, math.MaxUint32) + for i := 0; i < numServers; i++ { + defer servers[i].stop() + } + cc, err := Dial("foo.bar.com", WithBalancer(pickFirstBalancer(r)), WithBlock(), WithInsecure(), WithCodec(testCodec{})) + if err != nil { + t.Fatalf("Failed to create ClientConn: %v", err) + } + defer cc.Close() + // Add servers[1] and [2] to the service discovery. + u := &naming.Update{ + Op: naming.Add, + Addr: "localhost:" + servers[1].port, + } + r.w.inject([]*naming.Update{u}) + + u = &naming.Update{ + Op: naming.Add, + Addr: "localhost:" + servers[2].port, + } + r.w.inject([]*naming.Update{u}) + + // Loop until all 3 servers are up + checkServerUp(t, servers[0]) + checkServerUp(t, servers[1]) + checkServerUp(t, servers[2]) + + // Check the incoming RPCs served in server[0] + req := "port" + var reply string + for i := 0; i < 20; i++ { + if err := Invoke(context.Background(), "/foo/bar", &req, &reply, cc); err == nil || ErrorDesc(err) != servers[0].port { + t.Fatalf("Index %d: Invoke(_, _, _, _, _) = %v, want %s", 0, err, servers[0].port) + } + time.Sleep(10 * time.Millisecond) + } + + // server[0] down, incoming RPCs served in server[1], but the order of Notify still remains + // {server[0] server[1] server[2]} + servers[0].stop() + // Loop until it changes to server[1] + for { + if err := Invoke(context.Background(), "/foo/bar", &req, &reply, cc); err != nil && ErrorDesc(err) == servers[1].port { + break + } + time.Sleep(10 * time.Millisecond) + } + for i := 0; i < 20; i++ { + if err := Invoke(context.Background(), "/foo/bar", &req, &reply, cc); err == nil || ErrorDesc(err) != servers[1].port { + t.Fatalf("Index %d: Invoke(_, _, _, _, _) = %v, want %s", 1, err, servers[1].port) + } + time.Sleep(10 * time.Millisecond) + } + + // up the server[0] back, the incoming RPCs served in server[1] + p, _ := strconv.Atoi(servers[0].port) + servers[0] = newTestServer() + go servers[0].start(t, p, math.MaxUint32) + servers[0].wait(t, 2*time.Second) + checkServerUp(t, servers[0]) + + for i := 0; i < 20; i++ { + if err := Invoke(context.Background(), "/foo/bar", &req, &reply, cc); err == nil || ErrorDesc(err) != servers[1].port { + t.Fatalf("Index %d: Invoke(_, _, _, _, _) = %v, want %s", 1, err, servers[1].port) + } + time.Sleep(10 * time.Millisecond) + } + + // Delete server[1] in the balancer, the incoming RPCs served in server[0] + u = &naming.Update{ + Op: naming.Delete, + Addr: "localhost:" + servers[1].port, + } + r.w.inject([]*naming.Update{u}) + for { + if err := Invoke(context.Background(), "/foo/bar", &req, &reply, cc); err != nil && ErrorDesc(err) == servers[0].port { + break + } + time.Sleep(1 * time.Second) + } + for i := 0; i < 20; i++ { + if err := Invoke(context.Background(), "/foo/bar", &req, &reply, cc); err == nil || ErrorDesc(err) != servers[0].port { + t.Fatalf("Index %d: Invoke(_, _, _, _, _) = %v, want %s", 0, err, servers[0].port) + } + time.Sleep(10 * time.Millisecond) + } +} + +func TestPickFirstOneAddressRemoval(t *testing.T) { + // Start 2 servers. + numServers := 2 + servers, r := startServers(t, numServers, math.MaxUint32) + for i := 0; i < numServers; i++ { + defer servers[i].stop() + } + cc, err := Dial("localhost:"+servers[0].port, WithBalancer(pickFirstBalancer(r)), WithBlock(), WithInsecure(), WithCodec(testCodec{})) + if err != nil { + t.Fatalf("Failed to create ClientConn: %v", err) + } + defer cc.Close() + // Add servers[1] to the service discovery. + var updates []*naming.Update + updates = append(updates, &naming.Update{ + Op: naming.Add, + Addr: "localhost:" + servers[1].port, + }) + r.w.inject(updates) + + // Create a new cc to Loop until servers[1] is up + checkServerUp(t, servers[0]) + checkServerUp(t, servers[1]) + + var wg sync.WaitGroup + numRPC := 100 + sleepDuration := 10 * time.Millisecond + wg.Add(1) + go func() { + time.Sleep(sleepDuration) + // After sleepDuration, delete server[0]. + var updates []*naming.Update + updates = append(updates, &naming.Update{ + Op: naming.Delete, + Addr: "localhost:" + servers[0].port, + }) + r.w.inject(updates) + wg.Done() + }() + + // All non-failfast RPCs should not fail because there's at least one connection available. + for i := 0; i < numRPC; i++ { + wg.Add(1) + go func() { + var reply string + time.Sleep(sleepDuration) + // After sleepDuration, invoke RPC. + // server[0] is removed around the same time to make it racy between balancer and gRPC internals. + if err := Invoke(context.Background(), "/foo/bar", &expectedRequest, &reply, cc, FailFast(false)); err != nil { + t.Errorf("grpc.Invoke(_, _, _, _, _) = %v, want not nil", err) + } + wg.Done() + }() + } + wg.Wait() +} diff --git a/vendor/google.golang.org/grpc/call.go b/vendor/google.golang.org/grpc/call.go new file mode 100644 index 000000000..438758fc3 --- /dev/null +++ b/vendor/google.golang.org/grpc/call.go @@ -0,0 +1,309 @@ +/* + * + * Copyright 2014 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpc + +import ( + "bytes" + "io" + "time" + + "golang.org/x/net/context" + "golang.org/x/net/trace" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/peer" + "google.golang.org/grpc/stats" + "google.golang.org/grpc/status" + "google.golang.org/grpc/transport" +) + +// recvResponse receives and parses an RPC response. +// On error, it returns the error and indicates whether the call should be retried. +// +// TODO(zhaoq): Check whether the received message sequence is valid. +// TODO ctx is used for stats collection and processing. It is the context passed from the application. +func recvResponse(ctx context.Context, dopts dialOptions, t transport.ClientTransport, c *callInfo, stream *transport.Stream, reply interface{}) (err error) { + // Try to acquire header metadata from the server if there is any. + defer func() { + if err != nil { + if _, ok := err.(transport.ConnectionError); !ok { + t.CloseStream(stream, err) + } + } + }() + c.headerMD, err = stream.Header() + if err != nil { + return + } + p := &parser{r: stream} + var inPayload *stats.InPayload + if dopts.copts.StatsHandler != nil { + inPayload = &stats.InPayload{ + Client: true, + } + } + for { + if c.maxReceiveMessageSize == nil { + return Errorf(codes.Internal, "callInfo maxReceiveMessageSize field uninitialized(nil)") + } + if err = recv(p, dopts.codec, stream, dopts.dc, reply, *c.maxReceiveMessageSize, inPayload); err != nil { + if err == io.EOF { + break + } + return + } + } + if inPayload != nil && err == io.EOF && stream.Status().Code() == codes.OK { + // TODO in the current implementation, inTrailer may be handled before inPayload in some cases. + // Fix the order if necessary. + dopts.copts.StatsHandler.HandleRPC(ctx, inPayload) + } + c.trailerMD = stream.Trailer() + return nil +} + +// sendRequest writes out various information of an RPC such as Context and Message. +func sendRequest(ctx context.Context, dopts dialOptions, compressor Compressor, c *callInfo, callHdr *transport.CallHdr, stream *transport.Stream, t transport.ClientTransport, args interface{}, opts *transport.Options) (err error) { + defer func() { + if err != nil { + // If err is connection error, t will be closed, no need to close stream here. + if _, ok := err.(transport.ConnectionError); !ok { + t.CloseStream(stream, err) + } + } + }() + var ( + cbuf *bytes.Buffer + outPayload *stats.OutPayload + ) + if compressor != nil { + cbuf = new(bytes.Buffer) + } + if dopts.copts.StatsHandler != nil { + outPayload = &stats.OutPayload{ + Client: true, + } + } + hdr, data, err := encode(dopts.codec, args, compressor, cbuf, outPayload) + if err != nil { + return err + } + if c.maxSendMessageSize == nil { + return Errorf(codes.Internal, "callInfo maxSendMessageSize field uninitialized(nil)") + } + if len(data) > *c.maxSendMessageSize { + return Errorf(codes.ResourceExhausted, "grpc: trying to send message larger than max (%d vs. %d)", len(data), *c.maxSendMessageSize) + } + err = t.Write(stream, hdr, data, opts) + if err == nil && outPayload != nil { + outPayload.SentTime = time.Now() + dopts.copts.StatsHandler.HandleRPC(ctx, outPayload) + } + // t.NewStream(...) could lead to an early rejection of the RPC (e.g., the service/method + // does not exist.) so that t.Write could get io.EOF from wait(...). Leave the following + // recvResponse to get the final status. + if err != nil && err != io.EOF { + return err + } + // Sent successfully. + return nil +} + +// Invoke sends the RPC request on the wire and returns after response is received. +// Invoke is called by generated code. Also users can call Invoke directly when it +// is really needed in their use cases. +func Invoke(ctx context.Context, method string, args, reply interface{}, cc *ClientConn, opts ...CallOption) error { + if cc.dopts.unaryInt != nil { + return cc.dopts.unaryInt(ctx, method, args, reply, cc, invoke, opts...) + } + return invoke(ctx, method, args, reply, cc, opts...) +} + +func invoke(ctx context.Context, method string, args, reply interface{}, cc *ClientConn, opts ...CallOption) (e error) { + c := defaultCallInfo + mc := cc.GetMethodConfig(method) + if mc.WaitForReady != nil { + c.failFast = !*mc.WaitForReady + } + + if mc.Timeout != nil && *mc.Timeout >= 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *mc.Timeout) + defer cancel() + } + + opts = append(cc.dopts.callOptions, opts...) + for _, o := range opts { + if err := o.before(&c); err != nil { + return toRPCErr(err) + } + } + defer func() { + for _, o := range opts { + o.after(&c) + } + }() + + c.maxSendMessageSize = getMaxSize(mc.MaxReqSize, c.maxSendMessageSize, defaultClientMaxSendMessageSize) + c.maxReceiveMessageSize = getMaxSize(mc.MaxRespSize, c.maxReceiveMessageSize, defaultClientMaxReceiveMessageSize) + + if EnableTracing { + c.traceInfo.tr = trace.New("grpc.Sent."+methodFamily(method), method) + defer c.traceInfo.tr.Finish() + c.traceInfo.firstLine.client = true + if deadline, ok := ctx.Deadline(); ok { + c.traceInfo.firstLine.deadline = deadline.Sub(time.Now()) + } + c.traceInfo.tr.LazyLog(&c.traceInfo.firstLine, false) + // TODO(dsymonds): Arrange for c.traceInfo.firstLine.remoteAddr to be set. + defer func() { + if e != nil { + c.traceInfo.tr.LazyLog(&fmtStringer{"%v", []interface{}{e}}, true) + c.traceInfo.tr.SetError() + } + }() + } + ctx = newContextWithRPCInfo(ctx) + sh := cc.dopts.copts.StatsHandler + if sh != nil { + ctx = sh.TagRPC(ctx, &stats.RPCTagInfo{FullMethodName: method, FailFast: c.failFast}) + begin := &stats.Begin{ + Client: true, + BeginTime: time.Now(), + FailFast: c.failFast, + } + sh.HandleRPC(ctx, begin) + defer func() { + end := &stats.End{ + Client: true, + EndTime: time.Now(), + Error: e, + } + sh.HandleRPC(ctx, end) + }() + } + topts := &transport.Options{ + Last: true, + Delay: false, + } + for { + var ( + err error + t transport.ClientTransport + stream *transport.Stream + // Record the put handler from Balancer.Get(...). It is called once the + // RPC has completed or failed. + put func() + ) + // TODO(zhaoq): Need a formal spec of fail-fast. + callHdr := &transport.CallHdr{ + Host: cc.authority, + Method: method, + } + if cc.dopts.cp != nil { + callHdr.SendCompress = cc.dopts.cp.Type() + } + if c.creds != nil { + callHdr.Creds = c.creds + } + + gopts := BalancerGetOptions{ + BlockingWait: !c.failFast, + } + t, put, err = cc.getTransport(ctx, gopts) + if err != nil { + // TODO(zhaoq): Probably revisit the error handling. + if _, ok := status.FromError(err); ok { + return err + } + if err == errConnClosing || err == errConnUnavailable { + if c.failFast { + return Errorf(codes.Unavailable, "%v", err) + } + continue + } + // All the other errors are treated as Internal errors. + return Errorf(codes.Internal, "%v", err) + } + if c.traceInfo.tr != nil { + c.traceInfo.tr.LazyLog(&payload{sent: true, msg: args}, true) + } + stream, err = t.NewStream(ctx, callHdr) + if err != nil { + if put != nil { + if _, ok := err.(transport.ConnectionError); ok { + // If error is connection error, transport was sending data on wire, + // and we are not sure if anything has been sent on wire. + // If error is not connection error, we are sure nothing has been sent. + updateRPCInfoInContext(ctx, rpcInfo{bytesSent: true, bytesReceived: false}) + } + put() + } + if _, ok := err.(transport.ConnectionError); (ok || err == transport.ErrStreamDrain) && !c.failFast { + continue + } + return toRPCErr(err) + } + if peer, ok := peer.FromContext(stream.Context()); ok { + c.peer = peer + } + err = sendRequest(ctx, cc.dopts, cc.dopts.cp, &c, callHdr, stream, t, args, topts) + if err != nil { + if put != nil { + updateRPCInfoInContext(ctx, rpcInfo{ + bytesSent: stream.BytesSent(), + bytesReceived: stream.BytesReceived(), + }) + put() + } + // Retry a non-failfast RPC when + // i) there is a connection error; or + // ii) the server started to drain before this RPC was initiated. + if _, ok := err.(transport.ConnectionError); (ok || err == transport.ErrStreamDrain) && !c.failFast { + continue + } + return toRPCErr(err) + } + err = recvResponse(ctx, cc.dopts, t, &c, stream, reply) + if err != nil { + if put != nil { + updateRPCInfoInContext(ctx, rpcInfo{ + bytesSent: stream.BytesSent(), + bytesReceived: stream.BytesReceived(), + }) + put() + } + if _, ok := err.(transport.ConnectionError); (ok || err == transport.ErrStreamDrain) && !c.failFast { + continue + } + return toRPCErr(err) + } + if c.traceInfo.tr != nil { + c.traceInfo.tr.LazyLog(&payload{sent: false, msg: reply}, true) + } + t.CloseStream(stream, nil) + if put != nil { + updateRPCInfoInContext(ctx, rpcInfo{ + bytesSent: stream.BytesSent(), + bytesReceived: stream.BytesReceived(), + }) + put() + } + return stream.Status().Err() + } +} diff --git a/vendor/google.golang.org/grpc/call_test.go b/vendor/google.golang.org/grpc/call_test.go new file mode 100644 index 000000000..f31130929 --- /dev/null +++ b/vendor/google.golang.org/grpc/call_test.go @@ -0,0 +1,284 @@ +/* + * + * Copyright 2014 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpc + +import ( + "fmt" + "io" + "math" + "net" + "strconv" + "strings" + "sync" + "testing" + "time" + + "golang.org/x/net/context" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "google.golang.org/grpc/transport" +) + +var ( + expectedRequest = "ping" + expectedResponse = "pong" + weirdError = "format verbs: %v%s" + sizeLargeErr = 1024 * 1024 + canceled = 0 +) + +type testCodec struct { +} + +func (testCodec) Marshal(v interface{}) ([]byte, error) { + return []byte(*(v.(*string))), nil +} + +func (testCodec) Unmarshal(data []byte, v interface{}) error { + *(v.(*string)) = string(data) + return nil +} + +func (testCodec) String() string { + return "test" +} + +type testStreamHandler struct { + port string + t transport.ServerTransport +} + +func (h *testStreamHandler) handleStream(t *testing.T, s *transport.Stream) { + p := &parser{r: s} + for { + pf, req, err := p.recvMsg(math.MaxInt32) + if err == io.EOF { + break + } + if err != nil { + return + } + if pf != compressionNone { + t.Errorf("Received the mistaken message format %d, want %d", pf, compressionNone) + return + } + var v string + codec := testCodec{} + if err := codec.Unmarshal(req, &v); err != nil { + t.Errorf("Failed to unmarshal the received message: %v", err) + return + } + if v == "weird error" { + h.t.WriteStatus(s, status.New(codes.Internal, weirdError)) + return + } + if v == "canceled" { + canceled++ + h.t.WriteStatus(s, status.New(codes.Internal, "")) + return + } + if v == "port" { + h.t.WriteStatus(s, status.New(codes.Internal, h.port)) + return + } + + if v != expectedRequest { + h.t.WriteStatus(s, status.New(codes.Internal, strings.Repeat("A", sizeLargeErr))) + return + } + } + // send a response back to end the stream. + hdr, data, err := encode(testCodec{}, &expectedResponse, nil, nil, nil) + if err != nil { + t.Errorf("Failed to encode the response: %v", err) + return + } + h.t.Write(s, hdr, data, &transport.Options{}) + h.t.WriteStatus(s, status.New(codes.OK, "")) +} + +type server struct { + lis net.Listener + port string + startedErr chan error // sent nil or an error after server starts + mu sync.Mutex + conns map[transport.ServerTransport]bool +} + +func newTestServer() *server { + return &server{startedErr: make(chan error, 1)} +} + +// start starts server. Other goroutines should block on s.startedErr for further operations. +func (s *server) start(t *testing.T, port int, maxStreams uint32) { + var err error + if port == 0 { + s.lis, err = net.Listen("tcp", "localhost:0") + } else { + s.lis, err = net.Listen("tcp", "localhost:"+strconv.Itoa(port)) + } + if err != nil { + s.startedErr <- fmt.Errorf("failed to listen: %v", err) + return + } + _, p, err := net.SplitHostPort(s.lis.Addr().String()) + if err != nil { + s.startedErr <- fmt.Errorf("failed to parse listener address: %v", err) + return + } + s.port = p + s.conns = make(map[transport.ServerTransport]bool) + s.startedErr <- nil + for { + conn, err := s.lis.Accept() + if err != nil { + return + } + config := &transport.ServerConfig{ + MaxStreams: maxStreams, + } + st, err := transport.NewServerTransport("http2", conn, config) + if err != nil { + continue + } + s.mu.Lock() + if s.conns == nil { + s.mu.Unlock() + st.Close() + return + } + s.conns[st] = true + s.mu.Unlock() + h := &testStreamHandler{ + port: s.port, + t: st, + } + go st.HandleStreams(func(s *transport.Stream) { + go h.handleStream(t, s) + }, func(ctx context.Context, method string) context.Context { + return ctx + }) + } +} + +func (s *server) wait(t *testing.T, timeout time.Duration) { + select { + case err := <-s.startedErr: + if err != nil { + t.Fatal(err) + } + case <-time.After(timeout): + t.Fatalf("Timed out after %v waiting for server to be ready", timeout) + } +} + +func (s *server) stop() { + s.lis.Close() + s.mu.Lock() + for c := range s.conns { + c.Close() + } + s.conns = nil + s.mu.Unlock() +} + +func setUp(t *testing.T, port int, maxStreams uint32) (*server, *ClientConn) { + server := newTestServer() + go server.start(t, port, maxStreams) + server.wait(t, 2*time.Second) + addr := "localhost:" + server.port + cc, err := Dial(addr, WithBlock(), WithInsecure(), WithCodec(testCodec{})) + if err != nil { + t.Fatalf("Failed to create ClientConn: %v", err) + } + return server, cc +} + +func TestInvoke(t *testing.T) { + server, cc := setUp(t, 0, math.MaxUint32) + var reply string + if err := Invoke(context.Background(), "/foo/bar", &expectedRequest, &reply, cc); err != nil || reply != expectedResponse { + t.Fatalf("grpc.Invoke(_, _, _, _, _) = %v, want <nil>", err) + } + cc.Close() + server.stop() +} + +func TestInvokeLargeErr(t *testing.T) { + server, cc := setUp(t, 0, math.MaxUint32) + var reply string + req := "hello" + err := Invoke(context.Background(), "/foo/bar", &req, &reply, cc) + if _, ok := status.FromError(err); !ok { + t.Fatalf("grpc.Invoke(_, _, _, _, _) receives non rpc error.") + } + if Code(err) != codes.Internal || len(ErrorDesc(err)) != sizeLargeErr { + t.Fatalf("grpc.Invoke(_, _, _, _, _) = %v, want an error of code %d and desc size %d", err, codes.Internal, sizeLargeErr) + } + cc.Close() + server.stop() +} + +// TestInvokeErrorSpecialChars checks that error messages don't get mangled. +func TestInvokeErrorSpecialChars(t *testing.T) { + server, cc := setUp(t, 0, math.MaxUint32) + var reply string + req := "weird error" + err := Invoke(context.Background(), "/foo/bar", &req, &reply, cc) + if _, ok := status.FromError(err); !ok { + t.Fatalf("grpc.Invoke(_, _, _, _, _) receives non rpc error.") + } + if got, want := ErrorDesc(err), weirdError; got != want { + t.Fatalf("grpc.Invoke(_, _, _, _, _) error = %q, want %q", got, want) + } + cc.Close() + server.stop() +} + +// TestInvokeCancel checks that an Invoke with a canceled context is not sent. +func TestInvokeCancel(t *testing.T) { + server, cc := setUp(t, 0, math.MaxUint32) + var reply string + req := "canceled" + for i := 0; i < 100; i++ { + ctx, cancel := context.WithCancel(context.Background()) + cancel() + Invoke(ctx, "/foo/bar", &req, &reply, cc) + } + if canceled != 0 { + t.Fatalf("received %d of 100 canceled requests", canceled) + } + cc.Close() + server.stop() +} + +// TestInvokeCancelClosedNonFail checks that a canceled non-failfast RPC +// on a closed client will terminate. +func TestInvokeCancelClosedNonFailFast(t *testing.T) { + server, cc := setUp(t, 0, math.MaxUint32) + var reply string + cc.Close() + req := "hello" + ctx, cancel := context.WithCancel(context.Background()) + cancel() + if err := Invoke(ctx, "/foo/bar", &req, &reply, cc, FailFast(false)); err == nil { + t.Fatalf("canceled invoke on closed connection should fail") + } + server.stop() +} diff --git a/vendor/google.golang.org/grpc/clientconn.go b/vendor/google.golang.org/grpc/clientconn.go new file mode 100644 index 000000000..98ec57a2a --- /dev/null +++ b/vendor/google.golang.org/grpc/clientconn.go @@ -0,0 +1,1248 @@ +/* + * + * Copyright 2014 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpc + +import ( + "errors" + "math" + "net" + "strings" + "sync" + "time" + + "golang.org/x/net/context" + "golang.org/x/net/trace" + "google.golang.org/grpc/connectivity" + "google.golang.org/grpc/credentials" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/keepalive" + "google.golang.org/grpc/stats" + "google.golang.org/grpc/transport" +) + +var ( + // ErrClientConnClosing indicates that the operation is illegal because + // the ClientConn is closing. + ErrClientConnClosing = errors.New("grpc: the client connection is closing") + // ErrClientConnTimeout indicates that the ClientConn cannot establish the + // underlying connections within the specified timeout. + // DEPRECATED: Please use context.DeadlineExceeded instead. + ErrClientConnTimeout = errors.New("grpc: timed out when dialing") + + // errNoTransportSecurity indicates that there is no transport security + // being set for ClientConn. Users should either set one or explicitly + // call WithInsecure DialOption to disable security. + errNoTransportSecurity = errors.New("grpc: no transport security set (use grpc.WithInsecure() explicitly or set credentials)") + // errTransportCredentialsMissing indicates that users want to transmit security + // information (e.g., oauth2 token) which requires secure connection on an insecure + // connection. + errTransportCredentialsMissing = errors.New("grpc: the credentials require transport level security (use grpc.WithTransportCredentials() to set)") + // errCredentialsConflict indicates that grpc.WithTransportCredentials() + // and grpc.WithInsecure() are both called for a connection. + errCredentialsConflict = errors.New("grpc: transport credentials are set for an insecure connection (grpc.WithTransportCredentials() and grpc.WithInsecure() are both called)") + // errNetworkIO indicates that the connection is down due to some network I/O error. + errNetworkIO = errors.New("grpc: failed with network I/O error") + // errConnDrain indicates that the connection starts to be drained and does not accept any new RPCs. + errConnDrain = errors.New("grpc: the connection is drained") + // errConnClosing indicates that the connection is closing. + errConnClosing = errors.New("grpc: the connection is closing") + // errConnUnavailable indicates that the connection is unavailable. + errConnUnavailable = errors.New("grpc: the connection is unavailable") + // errBalancerClosed indicates that the balancer is closed. + errBalancerClosed = errors.New("grpc: balancer is closed") + // minimum time to give a connection to complete + minConnectTimeout = 20 * time.Second +) + +// dialOptions configure a Dial call. dialOptions are set by the DialOption +// values passed to Dial. +type dialOptions struct { + unaryInt UnaryClientInterceptor + streamInt StreamClientInterceptor + codec Codec + cp Compressor + dc Decompressor + bs backoffStrategy + balancer Balancer + block bool + insecure bool + timeout time.Duration + scChan <-chan ServiceConfig + copts transport.ConnectOptions + callOptions []CallOption +} + +const ( + defaultClientMaxReceiveMessageSize = 1024 * 1024 * 4 + defaultClientMaxSendMessageSize = math.MaxInt32 +) + +// DialOption configures how we set up the connection. +type DialOption func(*dialOptions) + +// WithInitialWindowSize returns a DialOption which sets the value for initial window size on a stream. +// The lower bound for window size is 64K and any value smaller than that will be ignored. +func WithInitialWindowSize(s int32) DialOption { + return func(o *dialOptions) { + o.copts.InitialWindowSize = s + } +} + +// WithInitialConnWindowSize returns a DialOption which sets the value for initial window size on a connection. +// The lower bound for window size is 64K and any value smaller than that will be ignored. +func WithInitialConnWindowSize(s int32) DialOption { + return func(o *dialOptions) { + o.copts.InitialConnWindowSize = s + } +} + +// WithMaxMsgSize returns a DialOption which sets the maximum message size the client can receive. Deprecated: use WithDefaultCallOptions(MaxCallRecvMsgSize(s)) instead. +func WithMaxMsgSize(s int) DialOption { + return WithDefaultCallOptions(MaxCallRecvMsgSize(s)) +} + +// WithDefaultCallOptions returns a DialOption which sets the default CallOptions for calls over the connection. +func WithDefaultCallOptions(cos ...CallOption) DialOption { + return func(o *dialOptions) { + o.callOptions = append(o.callOptions, cos...) + } +} + +// WithCodec returns a DialOption which sets a codec for message marshaling and unmarshaling. +func WithCodec(c Codec) DialOption { + return func(o *dialOptions) { + o.codec = c + } +} + +// WithCompressor returns a DialOption which sets a CompressorGenerator for generating message +// compressor. +func WithCompressor(cp Compressor) DialOption { + return func(o *dialOptions) { + o.cp = cp + } +} + +// WithDecompressor returns a DialOption which sets a DecompressorGenerator for generating +// message decompressor. +func WithDecompressor(dc Decompressor) DialOption { + return func(o *dialOptions) { + o.dc = dc + } +} + +// WithBalancer returns a DialOption which sets a load balancer. +func WithBalancer(b Balancer) DialOption { + return func(o *dialOptions) { + o.balancer = b + } +} + +// WithServiceConfig returns a DialOption which has a channel to read the service configuration. +func WithServiceConfig(c <-chan ServiceConfig) DialOption { + return func(o *dialOptions) { + o.scChan = c + } +} + +// WithBackoffMaxDelay configures the dialer to use the provided maximum delay +// when backing off after failed connection attempts. +func WithBackoffMaxDelay(md time.Duration) DialOption { + return WithBackoffConfig(BackoffConfig{MaxDelay: md}) +} + +// WithBackoffConfig configures the dialer to use the provided backoff +// parameters after connection failures. +// +// Use WithBackoffMaxDelay until more parameters on BackoffConfig are opened up +// for use. +func WithBackoffConfig(b BackoffConfig) DialOption { + // Set defaults to ensure that provided BackoffConfig is valid and + // unexported fields get default values. + setDefaults(&b) + return withBackoff(b) +} + +// withBackoff sets the backoff strategy used for retries after a +// failed connection attempt. +// +// This can be exported if arbitrary backoff strategies are allowed by gRPC. +func withBackoff(bs backoffStrategy) DialOption { + return func(o *dialOptions) { + o.bs = bs + } +} + +// WithBlock returns a DialOption which makes caller of Dial blocks until the underlying +// connection is up. Without this, Dial returns immediately and connecting the server +// happens in background. +func WithBlock() DialOption { + return func(o *dialOptions) { + o.block = true + } +} + +// WithInsecure returns a DialOption which disables transport security for this ClientConn. +// Note that transport security is required unless WithInsecure is set. +func WithInsecure() DialOption { + return func(o *dialOptions) { + o.insecure = true + } +} + +// WithTransportCredentials returns a DialOption which configures a +// connection level security credentials (e.g., TLS/SSL). +func WithTransportCredentials(creds credentials.TransportCredentials) DialOption { + return func(o *dialOptions) { + o.copts.TransportCredentials = creds + } +} + +// WithPerRPCCredentials returns a DialOption which sets +// credentials and places auth state on each outbound RPC. +func WithPerRPCCredentials(creds credentials.PerRPCCredentials) DialOption { + return func(o *dialOptions) { + o.copts.PerRPCCredentials = append(o.copts.PerRPCCredentials, creds) + } +} + +// WithTimeout returns a DialOption that configures a timeout for dialing a ClientConn +// initially. This is valid if and only if WithBlock() is present. +// Deprecated: use DialContext and context.WithTimeout instead. +func WithTimeout(d time.Duration) DialOption { + return func(o *dialOptions) { + o.timeout = d + } +} + +// WithDialer returns a DialOption that specifies a function to use for dialing network addresses. +// If FailOnNonTempDialError() is set to true, and an error is returned by f, gRPC checks the error's +// Temporary() method to decide if it should try to reconnect to the network address. +func WithDialer(f func(string, time.Duration) (net.Conn, error)) DialOption { + return func(o *dialOptions) { + o.copts.Dialer = func(ctx context.Context, addr string) (net.Conn, error) { + if deadline, ok := ctx.Deadline(); ok { + return f(addr, deadline.Sub(time.Now())) + } + return f(addr, 0) + } + } +} + +// WithStatsHandler returns a DialOption that specifies the stats handler +// for all the RPCs and underlying network connections in this ClientConn. +func WithStatsHandler(h stats.Handler) DialOption { + return func(o *dialOptions) { + o.copts.StatsHandler = h + } +} + +// FailOnNonTempDialError returns a DialOption that specifies if gRPC fails on non-temporary dial errors. +// If f is true, and dialer returns a non-temporary error, gRPC will fail the connection to the network +// address and won't try to reconnect. +// The default value of FailOnNonTempDialError is false. +// This is an EXPERIMENTAL API. +func FailOnNonTempDialError(f bool) DialOption { + return func(o *dialOptions) { + o.copts.FailOnNonTempDialError = f + } +} + +// WithUserAgent returns a DialOption that specifies a user agent string for all the RPCs. +func WithUserAgent(s string) DialOption { + return func(o *dialOptions) { + o.copts.UserAgent = s + } +} + +// WithKeepaliveParams returns a DialOption that specifies keepalive paramaters for the client transport. +func WithKeepaliveParams(kp keepalive.ClientParameters) DialOption { + return func(o *dialOptions) { + o.copts.KeepaliveParams = kp + } +} + +// WithUnaryInterceptor returns a DialOption that specifies the interceptor for unary RPCs. +func WithUnaryInterceptor(f UnaryClientInterceptor) DialOption { + return func(o *dialOptions) { + o.unaryInt = f + } +} + +// WithStreamInterceptor returns a DialOption that specifies the interceptor for streaming RPCs. +func WithStreamInterceptor(f StreamClientInterceptor) DialOption { + return func(o *dialOptions) { + o.streamInt = f + } +} + +// WithAuthority returns a DialOption that specifies the value to be used as +// the :authority pseudo-header. This value only works with WithInsecure and +// has no effect if TransportCredentials are present. +func WithAuthority(a string) DialOption { + return func(o *dialOptions) { + o.copts.Authority = a + } +} + +// Dial creates a client connection to the given target. +func Dial(target string, opts ...DialOption) (*ClientConn, error) { + return DialContext(context.Background(), target, opts...) +} + +// DialContext creates a client connection to the given target. ctx can be used to +// cancel or expire the pending connection. Once this function returns, the +// cancellation and expiration of ctx will be noop. Users should call ClientConn.Close +// to terminate all the pending operations after this function returns. +func DialContext(ctx context.Context, target string, opts ...DialOption) (conn *ClientConn, err error) { + cc := &ClientConn{ + target: target, + csMgr: &connectivityStateManager{}, + conns: make(map[Address]*addrConn), + } + cc.csEvltr = &connectivityStateEvaluator{csMgr: cc.csMgr} + cc.ctx, cc.cancel = context.WithCancel(context.Background()) + + for _, opt := range opts { + opt(&cc.dopts) + } + cc.mkp = cc.dopts.copts.KeepaliveParams + + if cc.dopts.copts.Dialer == nil { + cc.dopts.copts.Dialer = newProxyDialer( + func(ctx context.Context, addr string) (net.Conn, error) { + return dialContext(ctx, "tcp", addr) + }, + ) + } + + if cc.dopts.copts.UserAgent != "" { + cc.dopts.copts.UserAgent += " " + grpcUA + } else { + cc.dopts.copts.UserAgent = grpcUA + } + + if cc.dopts.timeout > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, cc.dopts.timeout) + defer cancel() + } + + defer func() { + select { + case <-ctx.Done(): + conn, err = nil, ctx.Err() + default: + } + + if err != nil { + cc.Close() + } + }() + + scSet := false + if cc.dopts.scChan != nil { + // Try to get an initial service config. + select { + case sc, ok := <-cc.dopts.scChan: + if ok { + cc.sc = sc + scSet = true + } + default: + } + } + // Set defaults. + if cc.dopts.codec == nil { + cc.dopts.codec = protoCodec{} + } + if cc.dopts.bs == nil { + cc.dopts.bs = DefaultBackoffConfig + } + creds := cc.dopts.copts.TransportCredentials + if creds != nil && creds.Info().ServerName != "" { + cc.authority = creds.Info().ServerName + } else if cc.dopts.insecure && cc.dopts.copts.Authority != "" { + cc.authority = cc.dopts.copts.Authority + } else { + cc.authority = target + } + waitC := make(chan error, 1) + go func() { + defer close(waitC) + if cc.dopts.balancer == nil && cc.sc.LB != nil { + cc.dopts.balancer = cc.sc.LB + } + if cc.dopts.balancer != nil { + var credsClone credentials.TransportCredentials + if creds != nil { + credsClone = creds.Clone() + } + config := BalancerConfig{ + DialCreds: credsClone, + Dialer: cc.dopts.copts.Dialer, + } + if err := cc.dopts.balancer.Start(target, config); err != nil { + waitC <- err + return + } + ch := cc.dopts.balancer.Notify() + if ch != nil { + if cc.dopts.block { + doneChan := make(chan struct{}) + go cc.lbWatcher(doneChan) + <-doneChan + } else { + go cc.lbWatcher(nil) + } + return + } + } + // No balancer, or no resolver within the balancer. Connect directly. + if err := cc.resetAddrConn([]Address{{Addr: target}}, cc.dopts.block, nil); err != nil { + waitC <- err + return + } + }() + select { + case <-ctx.Done(): + return nil, ctx.Err() + case err := <-waitC: + if err != nil { + return nil, err + } + } + if cc.dopts.scChan != nil && !scSet { + // Blocking wait for the initial service config. + select { + case sc, ok := <-cc.dopts.scChan: + if ok { + cc.sc = sc + } + case <-ctx.Done(): + return nil, ctx.Err() + } + } + if cc.dopts.scChan != nil { + go cc.scWatcher() + } + + return cc, nil +} + +// connectivityStateEvaluator gets updated by addrConns when their +// states transition, based on which it evaluates the state of +// ClientConn. +// Note: This code will eventually sit in the balancer in the new design. +type connectivityStateEvaluator struct { + csMgr *connectivityStateManager + mu sync.Mutex + numReady uint64 // Number of addrConns in ready state. + numConnecting uint64 // Number of addrConns in connecting state. + numTransientFailure uint64 // Number of addrConns in transientFailure. +} + +// recordTransition records state change happening in every addrConn and based on +// that it evaluates what state the ClientConn is in. +// It can only transition between connectivity.Ready, connectivity.Connecting and connectivity.TransientFailure. Other states, +// Idle and connectivity.Shutdown are transitioned into by ClientConn; in the begining of the connection +// before any addrConn is created ClientConn is in idle state. In the end when ClientConn +// closes it is in connectivity.Shutdown state. +// TODO Note that in later releases, a ClientConn with no activity will be put into an Idle state. +func (cse *connectivityStateEvaluator) recordTransition(oldState, newState connectivity.State) { + cse.mu.Lock() + defer cse.mu.Unlock() + + // Update counters. + for idx, state := range []connectivity.State{oldState, newState} { + updateVal := 2*uint64(idx) - 1 // -1 for oldState and +1 for new. + switch state { + case connectivity.Ready: + cse.numReady += updateVal + case connectivity.Connecting: + cse.numConnecting += updateVal + case connectivity.TransientFailure: + cse.numTransientFailure += updateVal + } + } + + // Evaluate. + if cse.numReady > 0 { + cse.csMgr.updateState(connectivity.Ready) + return + } + if cse.numConnecting > 0 { + cse.csMgr.updateState(connectivity.Connecting) + return + } + cse.csMgr.updateState(connectivity.TransientFailure) +} + +// connectivityStateManager keeps the connectivity.State of ClientConn. +// This struct will eventually be exported so the balancers can access it. +type connectivityStateManager struct { + mu sync.Mutex + state connectivity.State + notifyChan chan struct{} +} + +// updateState updates the connectivity.State of ClientConn. +// If there's a change it notifies goroutines waiting on state change to +// happen. +func (csm *connectivityStateManager) updateState(state connectivity.State) { + csm.mu.Lock() + defer csm.mu.Unlock() + if csm.state == connectivity.Shutdown { + return + } + if csm.state == state { + return + } + csm.state = state + if csm.notifyChan != nil { + // There are other goroutines waiting on this channel. + close(csm.notifyChan) + csm.notifyChan = nil + } +} + +func (csm *connectivityStateManager) getState() connectivity.State { + csm.mu.Lock() + defer csm.mu.Unlock() + return csm.state +} + +func (csm *connectivityStateManager) getNotifyChan() <-chan struct{} { + csm.mu.Lock() + defer csm.mu.Unlock() + if csm.notifyChan == nil { + csm.notifyChan = make(chan struct{}) + } + return csm.notifyChan +} + +// ClientConn represents a client connection to an RPC server. +type ClientConn struct { + ctx context.Context + cancel context.CancelFunc + + target string + authority string + dopts dialOptions + csMgr *connectivityStateManager + csEvltr *connectivityStateEvaluator // This will eventually be part of balancer. + + mu sync.RWMutex + sc ServiceConfig + conns map[Address]*addrConn + // Keepalive parameter can be updated if a GoAway is received. + mkp keepalive.ClientParameters +} + +// WaitForStateChange waits until the connectivity.State of ClientConn changes from sourceState or +// ctx expires. A true value is returned in former case and false in latter. +// This is an EXPERIMENTAL API. +func (cc *ClientConn) WaitForStateChange(ctx context.Context, sourceState connectivity.State) bool { + ch := cc.csMgr.getNotifyChan() + if cc.csMgr.getState() != sourceState { + return true + } + select { + case <-ctx.Done(): + return false + case <-ch: + return true + } +} + +// GetState returns the connectivity.State of ClientConn. +// This is an EXPERIMENTAL API. +func (cc *ClientConn) GetState() connectivity.State { + return cc.csMgr.getState() +} + +// lbWatcher watches the Notify channel of the balancer in cc and manages +// connections accordingly. If doneChan is not nil, it is closed after the +// first successfull connection is made. +func (cc *ClientConn) lbWatcher(doneChan chan struct{}) { + defer func() { + // In case channel from cc.dopts.balancer.Notify() gets closed before a + // successful connection gets established, don't forget to notify the + // caller. + if doneChan != nil { + close(doneChan) + } + }() + + _, isPickFirst := cc.dopts.balancer.(*pickFirst) + for addrs := range cc.dopts.balancer.Notify() { + if isPickFirst { + if len(addrs) == 0 { + // No address can be connected, should teardown current addrconn if exists + cc.mu.Lock() + if len(cc.conns) != 0 { + cc.pickFirstAddrConnTearDown() + } + cc.mu.Unlock() + } else { + cc.resetAddrConn(addrs, true, nil) + if doneChan != nil { + close(doneChan) + doneChan = nil + } + } + } else { + // Not pickFirst, create a new addrConn for each address. + var ( + add []Address // Addresses need to setup connections. + del []*addrConn // Connections need to tear down. + ) + cc.mu.Lock() + for _, a := range addrs { + if _, ok := cc.conns[a]; !ok { + add = append(add, a) + } + } + for k, c := range cc.conns { + var keep bool + for _, a := range addrs { + if k == a { + keep = true + break + } + } + if !keep { + del = append(del, c) + delete(cc.conns, k) + } + } + cc.mu.Unlock() + for _, a := range add { + var err error + if doneChan != nil { + err = cc.resetAddrConn([]Address{a}, true, nil) + if err == nil { + close(doneChan) + doneChan = nil + } + } else { + err = cc.resetAddrConn([]Address{a}, false, nil) + } + if err != nil { + grpclog.Warningf("Error creating connection to %v. Err: %v", a, err) + } + } + for _, c := range del { + c.tearDown(errConnDrain) + } + } + } +} + +func (cc *ClientConn) scWatcher() { + for { + select { + case sc, ok := <-cc.dopts.scChan: + if !ok { + return + } + cc.mu.Lock() + // TODO: load balance policy runtime change is ignored. + // We may revist this decision in the future. + cc.sc = sc + cc.mu.Unlock() + case <-cc.ctx.Done(): + return + } + } +} + +// pickFirstUpdateAddresses checks whether current address in the updating list, Update the list if true. +// It is only used when the balancer is pick first. +func (cc *ClientConn) pickFirstUpdateAddresses(addrs []Address) bool { + if len(cc.conns) == 0 { + // No addrconn. Should go resetting addrconn. + return false + } + var currentAc *addrConn + for _, currentAc = range cc.conns { + break + } + var addrInNewSlice bool + for _, addr := range addrs { + if strings.Compare(addr.Addr, currentAc.curAddr.Addr) == 0 { + addrInNewSlice = true + break + } + } + if addrInNewSlice { + cc.conns = make(map[Address]*addrConn) + for _, addr := range addrs { + cc.conns[addr] = currentAc + } + currentAc.addrs = addrs + return true + } + return false +} + +// pickFirstAddrConnTearDown() should be called after lock. +func (cc *ClientConn) pickFirstAddrConnTearDown() { + if len(cc.conns) == 0 { + return + } + var currentAc *addrConn + for _, currentAc = range cc.conns { + break + } + for k := range cc.conns { + delete(cc.conns, k) + } + currentAc.tearDown(errConnDrain) +} + +// resetAddrConn creates an addrConn for addr and adds it to cc.conns. +// If there is an old addrConn for addr, it will be torn down, using tearDownErr as the reason. +// If tearDownErr is nil, errConnDrain will be used instead. +// +// We should never need to replace an addrConn with a new one. This function is only used +// as newAddrConn to create new addrConn. +// TODO rename this function and clean up the code. +func (cc *ClientConn) resetAddrConn(addrs []Address, block bool, tearDownErr error) error { + // if current transport in addrs, just change lists to update order and new addresses + // not work for roundrobin + cc.mu.Lock() + if _, isPickFirst := cc.dopts.balancer.(*pickFirst); isPickFirst { + // If Current address in use in the updating list, just update the list. + // Otherwise, teardown current addrconn and create a new one. + if cc.pickFirstUpdateAddresses(addrs) { + cc.mu.Unlock() + return nil + } + cc.pickFirstAddrConnTearDown() + } + cc.mu.Unlock() + + ac := &addrConn{ + cc: cc, + addrs: addrs, + dopts: cc.dopts, + } + ac.ctx, ac.cancel = context.WithCancel(cc.ctx) + ac.csEvltr = cc.csEvltr + if EnableTracing { + ac.events = trace.NewEventLog("grpc.ClientConn", ac.addrs[0].Addr) + } + if !ac.dopts.insecure { + if ac.dopts.copts.TransportCredentials == nil { + return errNoTransportSecurity + } + } else { + if ac.dopts.copts.TransportCredentials != nil { + return errCredentialsConflict + } + for _, cd := range ac.dopts.copts.PerRPCCredentials { + if cd.RequireTransportSecurity() { + return errTransportCredentialsMissing + } + } + } + // Track ac in cc. This needs to be done before any getTransport(...) is called. + cc.mu.Lock() + if cc.conns == nil { + cc.mu.Unlock() + return ErrClientConnClosing + } + stale := cc.conns[ac.addrs[0]] + for _, a := range ac.addrs { + cc.conns[a] = ac + } + cc.mu.Unlock() + if stale != nil { + // There is an addrConn alive on ac.addr already. This could be due to + // a buggy Balancer that reports duplicated Addresses. + if tearDownErr == nil { + // tearDownErr is nil if resetAddrConn is called by + // 1) Dial + // 2) lbWatcher + // In both cases, the stale ac should drain, not close. + stale.tearDown(errConnDrain) + } else { + stale.tearDown(tearDownErr) + } + } + if block { + if err := ac.resetTransport(false); err != nil { + if err != errConnClosing { + // Tear down ac and delete it from cc.conns. + cc.mu.Lock() + delete(cc.conns, ac.addrs[0]) + cc.mu.Unlock() + ac.tearDown(err) + } + if e, ok := err.(transport.ConnectionError); ok && !e.Temporary() { + return e.Origin() + } + return err + } + // Start to monitor the error status of transport. + go ac.transportMonitor() + } else { + // Start a goroutine connecting to the server asynchronously. + go func() { + if err := ac.resetTransport(false); err != nil { + grpclog.Warningf("Failed to dial %s: %v; please retry.", ac.addrs[0].Addr, err) + if err != errConnClosing { + // Keep this ac in cc.conns, to get the reason it's torn down. + ac.tearDown(err) + } + return + } + ac.transportMonitor() + }() + } + return nil +} + +// GetMethodConfig gets the method config of the input method. +// If there's an exact match for input method (i.e. /service/method), we return +// the corresponding MethodConfig. +// If there isn't an exact match for the input method, we look for the default config +// under the service (i.e /service/). If there is a default MethodConfig for +// the serivce, we return it. +// Otherwise, we return an empty MethodConfig. +func (cc *ClientConn) GetMethodConfig(method string) MethodConfig { + // TODO: Avoid the locking here. + cc.mu.RLock() + defer cc.mu.RUnlock() + m, ok := cc.sc.Methods[method] + if !ok { + i := strings.LastIndex(method, "/") + m, _ = cc.sc.Methods[method[:i+1]] + } + return m +} + +func (cc *ClientConn) getTransport(ctx context.Context, opts BalancerGetOptions) (transport.ClientTransport, func(), error) { + var ( + ac *addrConn + ok bool + put func() + ) + if cc.dopts.balancer == nil { + // If balancer is nil, there should be only one addrConn available. + cc.mu.RLock() + if cc.conns == nil { + cc.mu.RUnlock() + return nil, nil, toRPCErr(ErrClientConnClosing) + } + for _, ac = range cc.conns { + // Break after the first iteration to get the first addrConn. + ok = true + break + } + cc.mu.RUnlock() + } else { + var ( + addr Address + err error + ) + addr, put, err = cc.dopts.balancer.Get(ctx, opts) + if err != nil { + return nil, nil, toRPCErr(err) + } + cc.mu.RLock() + if cc.conns == nil { + cc.mu.RUnlock() + return nil, nil, toRPCErr(ErrClientConnClosing) + } + ac, ok = cc.conns[addr] + cc.mu.RUnlock() + } + if !ok { + if put != nil { + updateRPCInfoInContext(ctx, rpcInfo{bytesSent: false, bytesReceived: false}) + put() + } + return nil, nil, errConnClosing + } + t, err := ac.wait(ctx, cc.dopts.balancer != nil, !opts.BlockingWait) + if err != nil { + if put != nil { + updateRPCInfoInContext(ctx, rpcInfo{bytesSent: false, bytesReceived: false}) + put() + } + return nil, nil, err + } + return t, put, nil +} + +// Close tears down the ClientConn and all underlying connections. +func (cc *ClientConn) Close() error { + cc.cancel() + + cc.mu.Lock() + if cc.conns == nil { + cc.mu.Unlock() + return ErrClientConnClosing + } + conns := cc.conns + cc.conns = nil + cc.csMgr.updateState(connectivity.Shutdown) + cc.mu.Unlock() + if cc.dopts.balancer != nil { + cc.dopts.balancer.Close() + } + for _, ac := range conns { + ac.tearDown(ErrClientConnClosing) + } + return nil +} + +// addrConn is a network connection to a given address. +type addrConn struct { + ctx context.Context + cancel context.CancelFunc + + cc *ClientConn + curAddr Address + addrs []Address + dopts dialOptions + events trace.EventLog + + csEvltr *connectivityStateEvaluator + + mu sync.Mutex + state connectivity.State + down func(error) // the handler called when a connection is down. + // ready is closed and becomes nil when a new transport is up or failed + // due to timeout. + ready chan struct{} + transport transport.ClientTransport + + // The reason this addrConn is torn down. + tearDownErr error +} + +// adjustParams updates parameters used to create transports upon +// receiving a GoAway. +func (ac *addrConn) adjustParams(r transport.GoAwayReason) { + switch r { + case transport.TooManyPings: + v := 2 * ac.dopts.copts.KeepaliveParams.Time + ac.cc.mu.Lock() + if v > ac.cc.mkp.Time { + ac.cc.mkp.Time = v + } + ac.cc.mu.Unlock() + } +} + +// printf records an event in ac's event log, unless ac has been closed. +// REQUIRES ac.mu is held. +func (ac *addrConn) printf(format string, a ...interface{}) { + if ac.events != nil { + ac.events.Printf(format, a...) + } +} + +// errorf records an error in ac's event log, unless ac has been closed. +// REQUIRES ac.mu is held. +func (ac *addrConn) errorf(format string, a ...interface{}) { + if ac.events != nil { + ac.events.Errorf(format, a...) + } +} + +// resetTransport recreates a transport to the address for ac. +// For the old transport: +// - if drain is true, it will be gracefully closed. +// - otherwise, it will be closed. +func (ac *addrConn) resetTransport(drain bool) error { + ac.mu.Lock() + if ac.state == connectivity.Shutdown { + ac.mu.Unlock() + return errConnClosing + } + ac.printf("connecting") + if ac.down != nil { + ac.down(downErrorf(false, true, "%v", errNetworkIO)) + ac.down = nil + } + oldState := ac.state + ac.state = connectivity.Connecting + ac.csEvltr.recordTransition(oldState, ac.state) + t := ac.transport + ac.transport = nil + ac.mu.Unlock() + if t != nil && !drain { + t.Close() + } + ac.cc.mu.RLock() + ac.dopts.copts.KeepaliveParams = ac.cc.mkp + ac.cc.mu.RUnlock() + for retries := 0; ; retries++ { + ac.mu.Lock() + sleepTime := ac.dopts.bs.backoff(retries) + timeout := minConnectTimeout + if timeout < time.Duration(int(sleepTime)/len(ac.addrs)) { + timeout = time.Duration(int(sleepTime) / len(ac.addrs)) + } + connectTime := time.Now() + // copy ac.addrs in case of race + addrsIter := make([]Address, len(ac.addrs)) + copy(addrsIter, ac.addrs) + ac.mu.Unlock() + for _, addr := range addrsIter { + ac.mu.Lock() + if ac.state == connectivity.Shutdown { + // ac.tearDown(...) has been invoked. + ac.mu.Unlock() + return errConnClosing + } + ac.mu.Unlock() + ctx, cancel := context.WithTimeout(ac.ctx, timeout) + sinfo := transport.TargetInfo{ + Addr: addr.Addr, + Metadata: addr.Metadata, + } + newTransport, err := transport.NewClientTransport(ctx, sinfo, ac.dopts.copts) + // Don't call cancel in success path due to a race in Go 1.6: + // https://github.com/golang/go/issues/15078. + if err != nil { + cancel() + + if e, ok := err.(transport.ConnectionError); ok && !e.Temporary() { + return err + } + grpclog.Warningf("grpc: addrConn.resetTransport failed to create client transport: %v; Reconnecting to %v", err, addr) + ac.mu.Lock() + if ac.state == connectivity.Shutdown { + // ac.tearDown(...) has been invoked. + ac.mu.Unlock() + return errConnClosing + } + ac.errorf("transient failure: %v", err) + oldState = ac.state + ac.state = connectivity.TransientFailure + ac.csEvltr.recordTransition(oldState, ac.state) + if ac.ready != nil { + close(ac.ready) + ac.ready = nil + } + ac.mu.Unlock() + continue + } + ac.mu.Lock() + ac.printf("ready") + if ac.state == connectivity.Shutdown { + // ac.tearDown(...) has been invoked. + ac.mu.Unlock() + newTransport.Close() + return errConnClosing + } + oldState = ac.state + ac.state = connectivity.Ready + ac.csEvltr.recordTransition(oldState, ac.state) + ac.transport = newTransport + if ac.ready != nil { + close(ac.ready) + ac.ready = nil + } + if ac.cc.dopts.balancer != nil { + ac.down = ac.cc.dopts.balancer.Up(addr) + } + ac.curAddr = addr + ac.mu.Unlock() + return nil + } + timer := time.NewTimer(sleepTime - time.Since(connectTime)) + select { + case <-timer.C: + case <-ac.ctx.Done(): + timer.Stop() + return ac.ctx.Err() + } + timer.Stop() + } +} + +// Run in a goroutine to track the error in transport and create the +// new transport if an error happens. It returns when the channel is closing. +func (ac *addrConn) transportMonitor() { + for { + ac.mu.Lock() + t := ac.transport + ac.mu.Unlock() + select { + // This is needed to detect the teardown when + // the addrConn is idle (i.e., no RPC in flight). + case <-ac.ctx.Done(): + select { + case <-t.Error(): + t.Close() + default: + } + return + case <-t.GoAway(): + ac.adjustParams(t.GetGoAwayReason()) + // If GoAway happens without any network I/O error, the underlying transport + // will be gracefully closed, and a new transport will be created. + // (The transport will be closed when all the pending RPCs finished or failed.) + // If GoAway and some network I/O error happen concurrently, the underlying transport + // will be closed, and a new transport will be created. + var drain bool + select { + case <-t.Error(): + default: + drain = true + } + if err := ac.resetTransport(drain); err != nil { + grpclog.Infof("get error from resetTransport %v, transportMonitor returning", err) + if err != errConnClosing { + // Keep this ac in cc.conns, to get the reason it's torn down. + ac.tearDown(err) + } + return + } + case <-t.Error(): + select { + case <-ac.ctx.Done(): + t.Close() + return + case <-t.GoAway(): + ac.adjustParams(t.GetGoAwayReason()) + if err := ac.resetTransport(false); err != nil { + grpclog.Infof("get error from resetTransport %v, transportMonitor returning", err) + if err != errConnClosing { + // Keep this ac in cc.conns, to get the reason it's torn down. + ac.tearDown(err) + } + return + } + default: + } + ac.mu.Lock() + if ac.state == connectivity.Shutdown { + // ac has been shutdown. + ac.mu.Unlock() + return + } + oldState := ac.state + ac.state = connectivity.TransientFailure + ac.csEvltr.recordTransition(oldState, ac.state) + ac.mu.Unlock() + if err := ac.resetTransport(false); err != nil { + grpclog.Infof("get error from resetTransport %v, transportMonitor returning", err) + ac.mu.Lock() + ac.printf("transport exiting: %v", err) + ac.mu.Unlock() + grpclog.Warningf("grpc: addrConn.transportMonitor exits due to: %v", err) + if err != errConnClosing { + // Keep this ac in cc.conns, to get the reason it's torn down. + ac.tearDown(err) + } + return + } + } + } +} + +// wait blocks until i) the new transport is up or ii) ctx is done or iii) ac is closed or +// iv) transport is in connectivity.TransientFailure and there is a balancer/failfast is true. +func (ac *addrConn) wait(ctx context.Context, hasBalancer, failfast bool) (transport.ClientTransport, error) { + for { + ac.mu.Lock() + switch { + case ac.state == connectivity.Shutdown: + if failfast || !hasBalancer { + // RPC is failfast or balancer is nil. This RPC should fail with ac.tearDownErr. + err := ac.tearDownErr + ac.mu.Unlock() + return nil, err + } + ac.mu.Unlock() + return nil, errConnClosing + case ac.state == connectivity.Ready: + ct := ac.transport + ac.mu.Unlock() + return ct, nil + case ac.state == connectivity.TransientFailure: + if failfast || hasBalancer { + ac.mu.Unlock() + return nil, errConnUnavailable + } + } + ready := ac.ready + if ready == nil { + ready = make(chan struct{}) + ac.ready = ready + } + ac.mu.Unlock() + select { + case <-ctx.Done(): + return nil, toRPCErr(ctx.Err()) + // Wait until the new transport is ready or failed. + case <-ready: + } + } +} + +// tearDown starts to tear down the addrConn. +// TODO(zhaoq): Make this synchronous to avoid unbounded memory consumption in +// some edge cases (e.g., the caller opens and closes many addrConn's in a +// tight loop. +// tearDown doesn't remove ac from ac.cc.conns. +func (ac *addrConn) tearDown(err error) { + ac.cancel() + + ac.mu.Lock() + ac.curAddr = Address{} + defer ac.mu.Unlock() + if ac.down != nil { + ac.down(downErrorf(false, false, "%v", err)) + ac.down = nil + } + if err == errConnDrain && ac.transport != nil { + // GracefulClose(...) may be executed multiple times when + // i) receiving multiple GoAway frames from the server; or + // ii) there are concurrent name resolver/Balancer triggered + // address removal and GoAway. + ac.transport.GracefulClose() + } + if ac.state == connectivity.Shutdown { + return + } + oldState := ac.state + ac.state = connectivity.Shutdown + ac.tearDownErr = err + ac.csEvltr.recordTransition(oldState, ac.state) + if ac.events != nil { + ac.events.Finish() + ac.events = nil + } + if ac.ready != nil { + close(ac.ready) + ac.ready = nil + } + if ac.transport != nil && err != errConnDrain { + ac.transport.Close() + } + return +} diff --git a/vendor/google.golang.org/grpc/clientconn_test.go b/vendor/google.golang.org/grpc/clientconn_test.go new file mode 100644 index 000000000..bdaf3df12 --- /dev/null +++ b/vendor/google.golang.org/grpc/clientconn_test.go @@ -0,0 +1,394 @@ +/* + * + * Copyright 2014 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpc + +import ( + "math" + "net" + "testing" + "time" + + "golang.org/x/net/context" + + "google.golang.org/grpc/connectivity" + "google.golang.org/grpc/credentials" + "google.golang.org/grpc/keepalive" + "google.golang.org/grpc/naming" + "google.golang.org/grpc/testdata" +) + +func assertState(wantState connectivity.State, cc *ClientConn) (connectivity.State, bool) { + ctx, cancel := context.WithTimeout(context.Background(), time.Second) + defer cancel() + var state connectivity.State + for state = cc.GetState(); state != wantState && cc.WaitForStateChange(ctx, state); state = cc.GetState() { + } + return state, state == wantState +} + +func TestConnectivityStates(t *testing.T) { + servers, resolver := startServers(t, 2, math.MaxUint32) + defer func() { + for i := 0; i < 2; i++ { + servers[i].stop() + } + }() + + cc, err := Dial("foo.bar.com", WithBalancer(RoundRobin(resolver)), WithInsecure()) + if err != nil { + t.Fatalf("Dial(\"foo.bar.com\", WithBalancer(_)) = _, %v, want _ <nil>", err) + } + defer cc.Close() + wantState := connectivity.Ready + if state, ok := assertState(wantState, cc); !ok { + t.Fatalf("asserState(%s) = %s, false, want %s, true", wantState, state, wantState) + } + // Send an update to delete the server connection (tearDown addrConn). + update := []*naming.Update{ + { + Op: naming.Delete, + Addr: "localhost:" + servers[0].port, + }, + } + resolver.w.inject(update) + wantState = connectivity.TransientFailure + if state, ok := assertState(wantState, cc); !ok { + t.Fatalf("asserState(%s) = %s, false, want %s, true", wantState, state, wantState) + } + update[0] = &naming.Update{ + Op: naming.Add, + Addr: "localhost:" + servers[1].port, + } + resolver.w.inject(update) + wantState = connectivity.Ready + if state, ok := assertState(wantState, cc); !ok { + t.Fatalf("asserState(%s) = %s, false, want %s, true", wantState, state, wantState) + } + +} + +func TestDialTimeout(t *testing.T) { + conn, err := Dial("Non-Existent.Server:80", WithTimeout(time.Millisecond), WithBlock(), WithInsecure()) + if err == nil { + conn.Close() + } + if err != context.DeadlineExceeded { + t.Fatalf("Dial(_, _) = %v, %v, want %v", conn, err, context.DeadlineExceeded) + } +} + +func TestTLSDialTimeout(t *testing.T) { + creds, err := credentials.NewClientTLSFromFile(testdata.Path("ca.pem"), "x.test.youtube.com") + if err != nil { + t.Fatalf("Failed to create credentials %v", err) + } + conn, err := Dial("Non-Existent.Server:80", WithTransportCredentials(creds), WithTimeout(time.Millisecond), WithBlock()) + if err == nil { + conn.Close() + } + if err != context.DeadlineExceeded { + t.Fatalf("Dial(_, _) = %v, %v, want %v", conn, err, context.DeadlineExceeded) + } +} + +func TestDefaultAuthority(t *testing.T) { + target := "Non-Existent.Server:8080" + conn, err := Dial(target, WithInsecure()) + if err != nil { + t.Fatalf("Dial(_, _) = _, %v, want _, <nil>", err) + } + conn.Close() + if conn.authority != target { + t.Fatalf("%v.authority = %v, want %v", conn, conn.authority, target) + } +} + +func TestTLSServerNameOverwrite(t *testing.T) { + overwriteServerName := "over.write.server.name" + creds, err := credentials.NewClientTLSFromFile(testdata.Path("ca.pem"), overwriteServerName) + if err != nil { + t.Fatalf("Failed to create credentials %v", err) + } + conn, err := Dial("Non-Existent.Server:80", WithTransportCredentials(creds)) + if err != nil { + t.Fatalf("Dial(_, _) = _, %v, want _, <nil>", err) + } + conn.Close() + if conn.authority != overwriteServerName { + t.Fatalf("%v.authority = %v, want %v", conn, conn.authority, overwriteServerName) + } +} + +func TestWithAuthority(t *testing.T) { + overwriteServerName := "over.write.server.name" + conn, err := Dial("Non-Existent.Server:80", WithInsecure(), WithAuthority(overwriteServerName)) + if err != nil { + t.Fatalf("Dial(_, _) = _, %v, want _, <nil>", err) + } + conn.Close() + if conn.authority != overwriteServerName { + t.Fatalf("%v.authority = %v, want %v", conn, conn.authority, overwriteServerName) + } +} + +func TestWithAuthorityAndTLS(t *testing.T) { + overwriteServerName := "over.write.server.name" + creds, err := credentials.NewClientTLSFromFile(testdata.Path("ca.pem"), overwriteServerName) + if err != nil { + t.Fatalf("Failed to create credentials %v", err) + } + conn, err := Dial("Non-Existent.Server:80", WithTransportCredentials(creds), WithAuthority("no.effect.authority")) + if err != nil { + t.Fatalf("Dial(_, _) = _, %v, want _, <nil>", err) + } + conn.Close() + if conn.authority != overwriteServerName { + t.Fatalf("%v.authority = %v, want %v", conn, conn.authority, overwriteServerName) + } +} + +func TestDialContextCancel(t *testing.T) { + ctx, cancel := context.WithCancel(context.Background()) + cancel() + if _, err := DialContext(ctx, "Non-Existent.Server:80", WithBlock(), WithInsecure()); err != context.Canceled { + t.Fatalf("DialContext(%v, _) = _, %v, want _, %v", ctx, err, context.Canceled) + } +} + +// blockingBalancer mimics the behavior of balancers whose initialization takes a long time. +// In this test, reading from blockingBalancer.Notify() blocks forever. +type blockingBalancer struct { + ch chan []Address +} + +func newBlockingBalancer() Balancer { + return &blockingBalancer{ch: make(chan []Address)} +} +func (b *blockingBalancer) Start(target string, config BalancerConfig) error { + return nil +} +func (b *blockingBalancer) Up(addr Address) func(error) { + return nil +} +func (b *blockingBalancer) Get(ctx context.Context, opts BalancerGetOptions) (addr Address, put func(), err error) { + return Address{}, nil, nil +} +func (b *blockingBalancer) Notify() <-chan []Address { + return b.ch +} +func (b *blockingBalancer) Close() error { + close(b.ch) + return nil +} + +func TestDialWithBlockingBalancer(t *testing.T) { + ctx, cancel := context.WithCancel(context.Background()) + dialDone := make(chan struct{}) + go func() { + DialContext(ctx, "Non-Existent.Server:80", WithBlock(), WithInsecure(), WithBalancer(newBlockingBalancer())) + close(dialDone) + }() + cancel() + <-dialDone +} + +// securePerRPCCredentials always requires transport security. +type securePerRPCCredentials struct{} + +func (c securePerRPCCredentials) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error) { + return nil, nil +} + +func (c securePerRPCCredentials) RequireTransportSecurity() bool { + return true +} + +func TestCredentialsMisuse(t *testing.T) { + tlsCreds, err := credentials.NewClientTLSFromFile(testdata.Path("ca.pem"), "x.test.youtube.com") + if err != nil { + t.Fatalf("Failed to create authenticator %v", err) + } + // Two conflicting credential configurations + if _, err := Dial("Non-Existent.Server:80", WithTransportCredentials(tlsCreds), WithBlock(), WithInsecure()); err != errCredentialsConflict { + t.Fatalf("Dial(_, _) = _, %v, want _, %v", err, errCredentialsConflict) + } + // security info on insecure connection + if _, err := Dial("Non-Existent.Server:80", WithPerRPCCredentials(securePerRPCCredentials{}), WithBlock(), WithInsecure()); err != errTransportCredentialsMissing { + t.Fatalf("Dial(_, _) = _, %v, want _, %v", err, errTransportCredentialsMissing) + } +} + +func TestWithBackoffConfigDefault(t *testing.T) { + testBackoffConfigSet(t, &DefaultBackoffConfig) +} + +func TestWithBackoffConfig(t *testing.T) { + b := BackoffConfig{MaxDelay: DefaultBackoffConfig.MaxDelay / 2} + expected := b + setDefaults(&expected) // defaults should be set + testBackoffConfigSet(t, &expected, WithBackoffConfig(b)) +} + +func TestWithBackoffMaxDelay(t *testing.T) { + md := DefaultBackoffConfig.MaxDelay / 2 + expected := BackoffConfig{MaxDelay: md} + setDefaults(&expected) + testBackoffConfigSet(t, &expected, WithBackoffMaxDelay(md)) +} + +func testBackoffConfigSet(t *testing.T, expected *BackoffConfig, opts ...DialOption) { + opts = append(opts, WithInsecure()) + conn, err := Dial("foo:80", opts...) + if err != nil { + t.Fatalf("unexpected error dialing connection: %v", err) + } + + if conn.dopts.bs == nil { + t.Fatalf("backoff config not set") + } + + actual, ok := conn.dopts.bs.(BackoffConfig) + if !ok { + t.Fatalf("unexpected type of backoff config: %#v", conn.dopts.bs) + } + + if actual != *expected { + t.Fatalf("unexpected backoff config on connection: %v, want %v", actual, expected) + } + conn.Close() +} + +type testErr struct { + temp bool +} + +func (e *testErr) Error() string { + return "test error" +} + +func (e *testErr) Temporary() bool { + return e.temp +} + +var nonTemporaryError = &testErr{false} + +func nonTemporaryErrorDialer(addr string, timeout time.Duration) (net.Conn, error) { + return nil, nonTemporaryError +} + +func TestDialWithBlockErrorOnNonTemporaryErrorDialer(t *testing.T) { + ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond) + defer cancel() + if _, err := DialContext(ctx, "", WithInsecure(), WithDialer(nonTemporaryErrorDialer), WithBlock(), FailOnNonTempDialError(true)); err != nonTemporaryError { + t.Fatalf("Dial(%q) = %v, want %v", "", err, nonTemporaryError) + } + + // Without FailOnNonTempDialError, gRPC will retry to connect, and dial should exit with time out error. + if _, err := DialContext(ctx, "", WithInsecure(), WithDialer(nonTemporaryErrorDialer), WithBlock()); err != context.DeadlineExceeded { + t.Fatalf("Dial(%q) = %v, want %v", "", err, context.DeadlineExceeded) + } +} + +// emptyBalancer returns an empty set of servers. +type emptyBalancer struct { + ch chan []Address +} + +func newEmptyBalancer() Balancer { + return &emptyBalancer{ch: make(chan []Address, 1)} +} +func (b *emptyBalancer) Start(_ string, _ BalancerConfig) error { + b.ch <- nil + return nil +} +func (b *emptyBalancer) Up(_ Address) func(error) { + return nil +} +func (b *emptyBalancer) Get(_ context.Context, _ BalancerGetOptions) (Address, func(), error) { + return Address{}, nil, nil +} +func (b *emptyBalancer) Notify() <-chan []Address { + return b.ch +} +func (b *emptyBalancer) Close() error { + close(b.ch) + return nil +} + +func TestNonblockingDialWithEmptyBalancer(t *testing.T) { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + dialDone := make(chan error) + go func() { + dialDone <- func() error { + conn, err := DialContext(ctx, "Non-Existent.Server:80", WithInsecure(), WithBalancer(newEmptyBalancer())) + if err != nil { + return err + } + return conn.Close() + }() + }() + if err := <-dialDone; err != nil { + t.Fatalf("unexpected error dialing connection: %s", err) + } +} + +func TestClientUpdatesParamsAfterGoAway(t *testing.T) { + lis, err := net.Listen("tcp", "localhost:0") + if err != nil { + t.Fatalf("Failed to listen. Err: %v", err) + } + defer lis.Close() + addr := lis.Addr().String() + s := NewServer() + go s.Serve(lis) + defer s.Stop() + cc, err := Dial(addr, WithBlock(), WithInsecure(), WithKeepaliveParams(keepalive.ClientParameters{ + Time: 50 * time.Millisecond, + Timeout: 1 * time.Millisecond, + PermitWithoutStream: true, + })) + if err != nil { + t.Fatalf("Dial(%s, _) = _, %v, want _, <nil>", addr, err) + } + defer cc.Close() + time.Sleep(1 * time.Second) + cc.mu.RLock() + defer cc.mu.RUnlock() + v := cc.mkp.Time + if v < 100*time.Millisecond { + t.Fatalf("cc.dopts.copts.Keepalive.Time = %v , want 100ms", v) + } +} + +func TestClientLBWatcherWithClosedBalancer(t *testing.T) { + b := newBlockingBalancer() + cc := &ClientConn{dopts: dialOptions{balancer: b}} + + doneChan := make(chan struct{}) + go cc.lbWatcher(doneChan) + // Balancer closes before any successful connections. + b.Close() + + select { + case <-doneChan: + case <-time.After(100 * time.Millisecond): + t.Fatal("lbWatcher with closed balancer didn't close doneChan after 100ms") + } +} diff --git a/vendor/google.golang.org/grpc/codec.go b/vendor/google.golang.org/grpc/codec.go new file mode 100644 index 000000000..905b048e2 --- /dev/null +++ b/vendor/google.golang.org/grpc/codec.go @@ -0,0 +1,104 @@ +/* + * + * Copyright 2014 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpc + +import ( + "math" + "sync" + + "github.com/golang/protobuf/proto" +) + +// Codec defines the interface gRPC uses to encode and decode messages. +// Note that implementations of this interface must be thread safe; +// a Codec's methods can be called from concurrent goroutines. +type Codec interface { + // Marshal returns the wire format of v. + Marshal(v interface{}) ([]byte, error) + // Unmarshal parses the wire format into v. + Unmarshal(data []byte, v interface{}) error + // String returns the name of the Codec implementation. The returned + // string will be used as part of content type in transmission. + String() string +} + +// protoCodec is a Codec implementation with protobuf. It is the default codec for gRPC. +type protoCodec struct { +} + +type cachedProtoBuffer struct { + lastMarshaledSize uint32 + proto.Buffer +} + +func capToMaxInt32(val int) uint32 { + if val > math.MaxInt32 { + return uint32(math.MaxInt32) + } + return uint32(val) +} + +func (p protoCodec) marshal(v interface{}, cb *cachedProtoBuffer) ([]byte, error) { + protoMsg := v.(proto.Message) + newSlice := make([]byte, 0, cb.lastMarshaledSize) + + cb.SetBuf(newSlice) + cb.Reset() + if err := cb.Marshal(protoMsg); err != nil { + return nil, err + } + out := cb.Bytes() + cb.lastMarshaledSize = capToMaxInt32(len(out)) + return out, nil +} + +func (p protoCodec) Marshal(v interface{}) ([]byte, error) { + cb := protoBufferPool.Get().(*cachedProtoBuffer) + out, err := p.marshal(v, cb) + + // put back buffer and lose the ref to the slice + cb.SetBuf(nil) + protoBufferPool.Put(cb) + return out, err +} + +func (p protoCodec) Unmarshal(data []byte, v interface{}) error { + cb := protoBufferPool.Get().(*cachedProtoBuffer) + cb.SetBuf(data) + v.(proto.Message).Reset() + err := cb.Unmarshal(v.(proto.Message)) + cb.SetBuf(nil) + protoBufferPool.Put(cb) + return err +} + +func (protoCodec) String() string { + return "proto" +} + +var ( + protoBufferPool = &sync.Pool{ + New: func() interface{} { + return &cachedProtoBuffer{ + Buffer: proto.Buffer{}, + lastMarshaledSize: 16, + } + }, + } +) diff --git a/vendor/google.golang.org/grpc/codec_benchmark_test.go b/vendor/google.golang.org/grpc/codec_benchmark_test.go new file mode 100644 index 000000000..dee617ca2 --- /dev/null +++ b/vendor/google.golang.org/grpc/codec_benchmark_test.go @@ -0,0 +1,100 @@ +// +build go1.7 + +/* + * + * Copyright 2014 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpc + +import ( + "fmt" + "testing" + + "github.com/golang/protobuf/proto" + "google.golang.org/grpc/test/codec_perf" +) + +func setupBenchmarkProtoCodecInputs(b *testing.B, payloadBaseSize uint32) []proto.Message { + payloadBase := make([]byte, payloadBaseSize) + // arbitrary byte slices + payloadSuffixes := [][]byte{ + []byte("one"), + []byte("two"), + []byte("three"), + []byte("four"), + []byte("five"), + } + protoStructs := make([]proto.Message, 0) + + for _, p := range payloadSuffixes { + ps := &codec_perf.Buffer{} + ps.Body = append(payloadBase, p...) + protoStructs = append(protoStructs, ps) + } + + return protoStructs +} + +// The possible use of certain protobuf APIs like the proto.Buffer API potentially involves caching +// on our side. This can add checks around memory allocations and possible contention. +// Example run: go test -v -run=^$ -bench=BenchmarkProtoCodec -benchmem +func BenchmarkProtoCodec(b *testing.B) { + // range of message sizes + payloadBaseSizes := make([]uint32, 0) + for i := uint32(0); i <= 12; i += 4 { + payloadBaseSizes = append(payloadBaseSizes, 1<<i) + } + // range of SetParallelism + parallelisms := make([]uint32, 0) + for i := uint32(0); i <= 16; i += 4 { + parallelisms = append(parallelisms, 1<<i) + } + for _, s := range payloadBaseSizes { + for _, p := range parallelisms { + func(parallelism int, payloadBaseSize uint32) { + protoStructs := setupBenchmarkProtoCodecInputs(b, payloadBaseSize) + name := fmt.Sprintf("MinPayloadSize:%v/SetParallelism(%v)", payloadBaseSize, parallelism) + b.Run(name, func(b *testing.B) { + codec := &protoCodec{} + b.SetParallelism(parallelism) + b.RunParallel(func(pb *testing.PB) { + benchmarkProtoCodec(codec, protoStructs, pb, b) + }) + }) + }(int(p), s) + } + } +} + +func benchmarkProtoCodec(codec *protoCodec, protoStructs []proto.Message, pb *testing.PB, b *testing.B) { + counter := 0 + for pb.Next() { + counter++ + ps := protoStructs[counter%len(protoStructs)] + fastMarshalAndUnmarshal(codec, ps, b) + } +} + +func fastMarshalAndUnmarshal(protoCodec Codec, protoStruct proto.Message, b *testing.B) { + marshaledBytes, err := protoCodec.Marshal(protoStruct) + if err != nil { + b.Errorf("protoCodec.Marshal(_) returned an error") + } + if err := protoCodec.Unmarshal(marshaledBytes, protoStruct); err != nil { + b.Errorf("protoCodec.Unmarshal(_) returned an error") + } +} diff --git a/vendor/google.golang.org/grpc/codec_test.go b/vendor/google.golang.org/grpc/codec_test.go new file mode 100644 index 000000000..246b13b08 --- /dev/null +++ b/vendor/google.golang.org/grpc/codec_test.go @@ -0,0 +1,128 @@ +/* + * + * Copyright 2014 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpc + +import ( + "bytes" + "sync" + "testing" + + "google.golang.org/grpc/test/codec_perf" +) + +func marshalAndUnmarshal(t *testing.T, protoCodec Codec, expectedBody []byte) { + p := &codec_perf.Buffer{} + p.Body = expectedBody + + marshalledBytes, err := protoCodec.Marshal(p) + if err != nil { + t.Errorf("protoCodec.Marshal(_) returned an error") + } + + if err := protoCodec.Unmarshal(marshalledBytes, p); err != nil { + t.Errorf("protoCodec.Unmarshal(_) returned an error") + } + + if bytes.Compare(p.GetBody(), expectedBody) != 0 { + t.Errorf("Unexpected body; got %v; want %v", p.GetBody(), expectedBody) + } +} + +func TestBasicProtoCodecMarshalAndUnmarshal(t *testing.T) { + marshalAndUnmarshal(t, protoCodec{}, []byte{1, 2, 3}) +} + +// Try to catch possible race conditions around use of pools +func TestConcurrentUsage(t *testing.T) { + const ( + numGoRoutines = 100 + numMarshUnmarsh = 1000 + ) + + // small, arbitrary byte slices + protoBodies := [][]byte{ + []byte("one"), + []byte("two"), + []byte("three"), + []byte("four"), + []byte("five"), + } + + var wg sync.WaitGroup + codec := protoCodec{} + + for i := 0; i < numGoRoutines; i++ { + wg.Add(1) + go func() { + defer wg.Done() + for k := 0; k < numMarshUnmarsh; k++ { + marshalAndUnmarshal(t, codec, protoBodies[k%len(protoBodies)]) + } + }() + } + + wg.Wait() +} + +// TestStaggeredMarshalAndUnmarshalUsingSamePool tries to catch potential errors in which slices get +// stomped on during reuse of a proto.Buffer. +func TestStaggeredMarshalAndUnmarshalUsingSamePool(t *testing.T) { + codec1 := protoCodec{} + codec2 := protoCodec{} + + expectedBody1 := []byte{1, 2, 3} + expectedBody2 := []byte{4, 5, 6} + + proto1 := codec_perf.Buffer{Body: expectedBody1} + proto2 := codec_perf.Buffer{Body: expectedBody2} + + var m1, m2 []byte + var err error + + if m1, err = codec1.Marshal(&proto1); err != nil { + t.Errorf("protoCodec.Marshal(%v) failed", proto1) + } + + if m2, err = codec2.Marshal(&proto2); err != nil { + t.Errorf("protoCodec.Marshal(%v) failed", proto2) + } + + if err = codec1.Unmarshal(m1, &proto1); err != nil { + t.Errorf("protoCodec.Unmarshal(%v) failed", m1) + } + + if err = codec2.Unmarshal(m2, &proto2); err != nil { + t.Errorf("protoCodec.Unmarshal(%v) failed", m2) + } + + b1 := proto1.GetBody() + b2 := proto2.GetBody() + + for i, v := range b1 { + if expectedBody1[i] != v { + t.Errorf("expected %v at index %v but got %v", i, expectedBody1[i], v) + } + } + + for i, v := range b2 { + if expectedBody2[i] != v { + t.Errorf("expected %v at index %v but got %v", i, expectedBody2[i], v) + } + } +} diff --git a/vendor/google.golang.org/grpc/codegen.sh b/vendor/google.golang.org/grpc/codegen.sh new file mode 100755 index 000000000..4cdc6ba7c --- /dev/null +++ b/vendor/google.golang.org/grpc/codegen.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +# This script serves as an example to demonstrate how to generate the gRPC-Go +# interface and the related messages from .proto file. +# +# It assumes the installation of i) Google proto buffer compiler at +# https://github.com/google/protobuf (after v2.6.1) and ii) the Go codegen +# plugin at https://github.com/golang/protobuf (after 2015-02-20). If you have +# not, please install them first. +# +# We recommend running this script at $GOPATH/src. +# +# If this is not what you need, feel free to make your own scripts. Again, this +# script is for demonstration purpose. +# +proto=$1 +protoc --go_out=plugins=grpc:. $proto diff --git a/vendor/google.golang.org/grpc/codes/code_string.go b/vendor/google.golang.org/grpc/codes/code_string.go new file mode 100644 index 000000000..259837060 --- /dev/null +++ b/vendor/google.golang.org/grpc/codes/code_string.go @@ -0,0 +1,16 @@ +// Code generated by "stringer -type=Code"; DO NOT EDIT. + +package codes + +import "fmt" + +const _Code_name = "OKCanceledUnknownInvalidArgumentDeadlineExceededNotFoundAlreadyExistsPermissionDeniedResourceExhaustedFailedPreconditionAbortedOutOfRangeUnimplementedInternalUnavailableDataLossUnauthenticated" + +var _Code_index = [...]uint8{0, 2, 10, 17, 32, 48, 56, 69, 85, 102, 120, 127, 137, 150, 158, 169, 177, 192} + +func (i Code) String() string { + if i >= Code(len(_Code_index)-1) { + return fmt.Sprintf("Code(%d)", i) + } + return _Code_name[_Code_index[i]:_Code_index[i+1]] +} diff --git a/vendor/google.golang.org/grpc/codes/codes.go b/vendor/google.golang.org/grpc/codes/codes.go new file mode 100644 index 000000000..21e7733a5 --- /dev/null +++ b/vendor/google.golang.org/grpc/codes/codes.go @@ -0,0 +1,144 @@ +/* + * + * Copyright 2014 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Package codes defines the canonical error codes used by gRPC. It is +// consistent across various languages. +package codes // import "google.golang.org/grpc/codes" + +// A Code is an unsigned 32-bit error code as defined in the gRPC spec. +type Code uint32 + +//go:generate stringer -type=Code + +const ( + // OK is returned on success. + OK Code = 0 + + // Canceled indicates the operation was canceled (typically by the caller). + Canceled Code = 1 + + // Unknown error. An example of where this error may be returned is + // if a Status value received from another address space belongs to + // an error-space that is not known in this address space. Also + // errors raised by APIs that do not return enough error information + // may be converted to this error. + Unknown Code = 2 + + // InvalidArgument indicates client specified an invalid argument. + // Note that this differs from FailedPrecondition. It indicates arguments + // that are problematic regardless of the state of the system + // (e.g., a malformed file name). + InvalidArgument Code = 3 + + // DeadlineExceeded means operation expired before completion. + // For operations that change the state of the system, this error may be + // returned even if the operation has completed successfully. For + // example, a successful response from a server could have been delayed + // long enough for the deadline to expire. + DeadlineExceeded Code = 4 + + // NotFound means some requested entity (e.g., file or directory) was + // not found. + NotFound Code = 5 + + // AlreadyExists means an attempt to create an entity failed because one + // already exists. + AlreadyExists Code = 6 + + // PermissionDenied indicates the caller does not have permission to + // execute the specified operation. It must not be used for rejections + // caused by exhausting some resource (use ResourceExhausted + // instead for those errors). It must not be + // used if the caller cannot be identified (use Unauthenticated + // instead for those errors). + PermissionDenied Code = 7 + + // Unauthenticated indicates the request does not have valid + // authentication credentials for the operation. + Unauthenticated Code = 16 + + // ResourceExhausted indicates some resource has been exhausted, perhaps + // a per-user quota, or perhaps the entire file system is out of space. + ResourceExhausted Code = 8 + + // FailedPrecondition indicates operation was rejected because the + // system is not in a state required for the operation's execution. + // For example, directory to be deleted may be non-empty, an rmdir + // operation is applied to a non-directory, etc. + // + // A litmus test that may help a service implementor in deciding + // between FailedPrecondition, Aborted, and Unavailable: + // (a) Use Unavailable if the client can retry just the failing call. + // (b) Use Aborted if the client should retry at a higher-level + // (e.g., restarting a read-modify-write sequence). + // (c) Use FailedPrecondition if the client should not retry until + // the system state has been explicitly fixed. E.g., if an "rmdir" + // fails because the directory is non-empty, FailedPrecondition + // should be returned since the client should not retry unless + // they have first fixed up the directory by deleting files from it. + // (d) Use FailedPrecondition if the client performs conditional + // REST Get/Update/Delete on a resource and the resource on the + // server does not match the condition. E.g., conflicting + // read-modify-write on the same resource. + FailedPrecondition Code = 9 + + // Aborted indicates the operation was aborted, typically due to a + // concurrency issue like sequencer check failures, transaction aborts, + // etc. + // + // See litmus test above for deciding between FailedPrecondition, + // Aborted, and Unavailable. + Aborted Code = 10 + + // OutOfRange means operation was attempted past the valid range. + // E.g., seeking or reading past end of file. + // + // Unlike InvalidArgument, this error indicates a problem that may + // be fixed if the system state changes. For example, a 32-bit file + // system will generate InvalidArgument if asked to read at an + // offset that is not in the range [0,2^32-1], but it will generate + // OutOfRange if asked to read from an offset past the current + // file size. + // + // There is a fair bit of overlap between FailedPrecondition and + // OutOfRange. We recommend using OutOfRange (the more specific + // error) when it applies so that callers who are iterating through + // a space can easily look for an OutOfRange error to detect when + // they are done. + OutOfRange Code = 11 + + // Unimplemented indicates operation is not implemented or not + // supported/enabled in this service. + Unimplemented Code = 12 + + // Internal errors. Means some invariants expected by underlying + // system has been broken. If you see one of these errors, + // something is very broken. + Internal Code = 13 + + // Unavailable indicates the service is currently unavailable. + // This is a most likely a transient condition and may be corrected + // by retrying with a backoff. + // + // See litmus test above for deciding between FailedPrecondition, + // Aborted, and Unavailable. + Unavailable Code = 14 + + // DataLoss indicates unrecoverable data loss or corruption. + DataLoss Code = 15 +) diff --git a/vendor/google.golang.org/grpc/connectivity/connectivity.go b/vendor/google.golang.org/grpc/connectivity/connectivity.go new file mode 100644 index 000000000..568ef5dc6 --- /dev/null +++ b/vendor/google.golang.org/grpc/connectivity/connectivity.go @@ -0,0 +1,72 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Package connectivity defines connectivity semantics. +// For details, see https://github.com/grpc/grpc/blob/master/doc/connectivity-semantics-and-api.md. +// All APIs in this package are experimental. +package connectivity + +import ( + "golang.org/x/net/context" + "google.golang.org/grpc/grpclog" +) + +// State indicates the state of connectivity. +// It can be the state of a ClientConn or SubConn. +type State int + +func (s State) String() string { + switch s { + case Idle: + return "IDLE" + case Connecting: + return "CONNECTING" + case Ready: + return "READY" + case TransientFailure: + return "TRANSIENT_FAILURE" + case Shutdown: + return "SHUTDOWN" + default: + grpclog.Errorf("unknown connectivity state: %d", s) + return "Invalid-State" + } +} + +const ( + // Idle indicates the ClientConn is idle. + Idle State = iota + // Connecting indicates the ClienConn is connecting. + Connecting + // Ready indicates the ClientConn is ready for work. + Ready + // TransientFailure indicates the ClientConn has seen a failure but expects to recover. + TransientFailure + // Shutdown indicates the ClientConn has started shutting down. + Shutdown +) + +// Reporter reports the connectivity states. +type Reporter interface { + // CurrentState returns the current state of the reporter. + CurrentState() State + // WaitForStateChange blocks until the reporter's state is different from the given state, + // and returns true. + // It returns false if <-ctx.Done() can proceed (ctx got timeout or got canceled). + WaitForStateChange(context.Context, State) bool +} diff --git a/vendor/google.golang.org/grpc/credentials/credentials.go b/vendor/google.golang.org/grpc/credentials/credentials.go new file mode 100644 index 000000000..2475fe832 --- /dev/null +++ b/vendor/google.golang.org/grpc/credentials/credentials.go @@ -0,0 +1,219 @@ +/* + * + * Copyright 2014 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Package credentials implements various credentials supported by gRPC library, +// which encapsulate all the state needed by a client to authenticate with a +// server and make various assertions, e.g., about the client's identity, role, +// or whether it is authorized to make a particular call. +package credentials // import "google.golang.org/grpc/credentials" + +import ( + "crypto/tls" + "crypto/x509" + "errors" + "fmt" + "io/ioutil" + "net" + "strings" + + "golang.org/x/net/context" +) + +var ( + // alpnProtoStr are the specified application level protocols for gRPC. + alpnProtoStr = []string{"h2"} +) + +// PerRPCCredentials defines the common interface for the credentials which need to +// attach security information to every RPC (e.g., oauth2). +type PerRPCCredentials interface { + // GetRequestMetadata gets the current request metadata, refreshing + // tokens if required. This should be called by the transport layer on + // each request, and the data should be populated in headers or other + // context. uri is the URI of the entry point for the request. When + // supported by the underlying implementation, ctx can be used for + // timeout and cancellation. + // TODO(zhaoq): Define the set of the qualified keys instead of leaving + // it as an arbitrary string. + GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error) + // RequireTransportSecurity indicates whether the credentials requires + // transport security. + RequireTransportSecurity() bool +} + +// ProtocolInfo provides information regarding the gRPC wire protocol version, +// security protocol, security protocol version in use, server name, etc. +type ProtocolInfo struct { + // ProtocolVersion is the gRPC wire protocol version. + ProtocolVersion string + // SecurityProtocol is the security protocol in use. + SecurityProtocol string + // SecurityVersion is the security protocol version. + SecurityVersion string + // ServerName is the user-configured server name. + ServerName string +} + +// AuthInfo defines the common interface for the auth information the users are interested in. +type AuthInfo interface { + AuthType() string +} + +var ( + // ErrConnDispatched indicates that rawConn has been dispatched out of gRPC + // and the caller should not close rawConn. + ErrConnDispatched = errors.New("credentials: rawConn is dispatched out of gRPC") +) + +// TransportCredentials defines the common interface for all the live gRPC wire +// protocols and supported transport security protocols (e.g., TLS, SSL). +type TransportCredentials interface { + // ClientHandshake does the authentication handshake specified by the corresponding + // authentication protocol on rawConn for clients. It returns the authenticated + // connection and the corresponding auth information about the connection. + // Implementations must use the provided context to implement timely cancellation. + // gRPC will try to reconnect if the error returned is a temporary error + // (io.EOF, context.DeadlineExceeded or err.Temporary() == true). + // If the returned error is a wrapper error, implementations should make sure that + // the error implements Temporary() to have the correct retry behaviors. + ClientHandshake(context.Context, string, net.Conn) (net.Conn, AuthInfo, error) + // ServerHandshake does the authentication handshake for servers. It returns + // the authenticated connection and the corresponding auth information about + // the connection. + ServerHandshake(net.Conn) (net.Conn, AuthInfo, error) + // Info provides the ProtocolInfo of this TransportCredentials. + Info() ProtocolInfo + // Clone makes a copy of this TransportCredentials. + Clone() TransportCredentials + // OverrideServerName overrides the server name used to verify the hostname on the returned certificates from the server. + // gRPC internals also use it to override the virtual hosting name if it is set. + // It must be called before dialing. Currently, this is only used by grpclb. + OverrideServerName(string) error +} + +// TLSInfo contains the auth information for a TLS authenticated connection. +// It implements the AuthInfo interface. +type TLSInfo struct { + State tls.ConnectionState +} + +// AuthType returns the type of TLSInfo as a string. +func (t TLSInfo) AuthType() string { + return "tls" +} + +// tlsCreds is the credentials required for authenticating a connection using TLS. +type tlsCreds struct { + // TLS configuration + config *tls.Config +} + +func (c tlsCreds) Info() ProtocolInfo { + return ProtocolInfo{ + SecurityProtocol: "tls", + SecurityVersion: "1.2", + ServerName: c.config.ServerName, + } +} + +func (c *tlsCreds) ClientHandshake(ctx context.Context, addr string, rawConn net.Conn) (_ net.Conn, _ AuthInfo, err error) { + // use local cfg to avoid clobbering ServerName if using multiple endpoints + cfg := cloneTLSConfig(c.config) + if cfg.ServerName == "" { + colonPos := strings.LastIndex(addr, ":") + if colonPos == -1 { + colonPos = len(addr) + } + cfg.ServerName = addr[:colonPos] + } + conn := tls.Client(rawConn, cfg) + errChannel := make(chan error, 1) + go func() { + errChannel <- conn.Handshake() + }() + select { + case err := <-errChannel: + if err != nil { + return nil, nil, err + } + case <-ctx.Done(): + return nil, nil, ctx.Err() + } + return conn, TLSInfo{conn.ConnectionState()}, nil +} + +func (c *tlsCreds) ServerHandshake(rawConn net.Conn) (net.Conn, AuthInfo, error) { + conn := tls.Server(rawConn, c.config) + if err := conn.Handshake(); err != nil { + return nil, nil, err + } + return conn, TLSInfo{conn.ConnectionState()}, nil +} + +func (c *tlsCreds) Clone() TransportCredentials { + return NewTLS(c.config) +} + +func (c *tlsCreds) OverrideServerName(serverNameOverride string) error { + c.config.ServerName = serverNameOverride + return nil +} + +// NewTLS uses c to construct a TransportCredentials based on TLS. +func NewTLS(c *tls.Config) TransportCredentials { + tc := &tlsCreds{cloneTLSConfig(c)} + tc.config.NextProtos = alpnProtoStr + return tc +} + +// NewClientTLSFromCert constructs TLS credentials from the input certificate for client. +// serverNameOverride is for testing only. If set to a non empty string, +// it will override the virtual host name of authority (e.g. :authority header field) in requests. +func NewClientTLSFromCert(cp *x509.CertPool, serverNameOverride string) TransportCredentials { + return NewTLS(&tls.Config{ServerName: serverNameOverride, RootCAs: cp}) +} + +// NewClientTLSFromFile constructs TLS credentials from the input certificate file for client. +// serverNameOverride is for testing only. If set to a non empty string, +// it will override the virtual host name of authority (e.g. :authority header field) in requests. +func NewClientTLSFromFile(certFile, serverNameOverride string) (TransportCredentials, error) { + b, err := ioutil.ReadFile(certFile) + if err != nil { + return nil, err + } + cp := x509.NewCertPool() + if !cp.AppendCertsFromPEM(b) { + return nil, fmt.Errorf("credentials: failed to append certificates") + } + return NewTLS(&tls.Config{ServerName: serverNameOverride, RootCAs: cp}), nil +} + +// NewServerTLSFromCert constructs TLS credentials from the input certificate for server. +func NewServerTLSFromCert(cert *tls.Certificate) TransportCredentials { + return NewTLS(&tls.Config{Certificates: []tls.Certificate{*cert}}) +} + +// NewServerTLSFromFile constructs TLS credentials from the input certificate file and key +// file for server. +func NewServerTLSFromFile(certFile, keyFile string) (TransportCredentials, error) { + cert, err := tls.LoadX509KeyPair(certFile, keyFile) + if err != nil { + return nil, err + } + return NewTLS(&tls.Config{Certificates: []tls.Certificate{cert}}), nil +} diff --git a/vendor/google.golang.org/grpc/credentials/credentials_test.go b/vendor/google.golang.org/grpc/credentials/credentials_test.go new file mode 100644 index 000000000..af4078628 --- /dev/null +++ b/vendor/google.golang.org/grpc/credentials/credentials_test.go @@ -0,0 +1,206 @@ +/* + * + * Copyright 2016 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package credentials + +import ( + "crypto/tls" + "net" + "testing" + + "golang.org/x/net/context" + "google.golang.org/grpc/testdata" +) + +func TestTLSOverrideServerName(t *testing.T) { + expectedServerName := "server.name" + c := NewTLS(nil) + c.OverrideServerName(expectedServerName) + if c.Info().ServerName != expectedServerName { + t.Fatalf("c.Info().ServerName = %v, want %v", c.Info().ServerName, expectedServerName) + } +} + +func TestTLSClone(t *testing.T) { + expectedServerName := "server.name" + c := NewTLS(nil) + c.OverrideServerName(expectedServerName) + cc := c.Clone() + if cc.Info().ServerName != expectedServerName { + t.Fatalf("cc.Info().ServerName = %v, want %v", cc.Info().ServerName, expectedServerName) + } + cc.OverrideServerName("") + if c.Info().ServerName != expectedServerName { + t.Fatalf("Change in clone should not affect the original, c.Info().ServerName = %v, want %v", c.Info().ServerName, expectedServerName) + } + +} + +type serverHandshake func(net.Conn) (AuthInfo, error) + +func TestClientHandshakeReturnsAuthInfo(t *testing.T) { + done := make(chan AuthInfo, 1) + lis := launchServer(t, tlsServerHandshake, done) + defer lis.Close() + lisAddr := lis.Addr().String() + clientAuthInfo := clientHandle(t, gRPCClientHandshake, lisAddr) + // wait until server sends serverAuthInfo or fails. + serverAuthInfo, ok := <-done + if !ok { + t.Fatalf("Error at server-side") + } + if !compare(clientAuthInfo, serverAuthInfo) { + t.Fatalf("c.ClientHandshake(_, %v, _) = %v, want %v.", lisAddr, clientAuthInfo, serverAuthInfo) + } +} + +func TestServerHandshakeReturnsAuthInfo(t *testing.T) { + done := make(chan AuthInfo, 1) + lis := launchServer(t, gRPCServerHandshake, done) + defer lis.Close() + clientAuthInfo := clientHandle(t, tlsClientHandshake, lis.Addr().String()) + // wait until server sends serverAuthInfo or fails. + serverAuthInfo, ok := <-done + if !ok { + t.Fatalf("Error at server-side") + } + if !compare(clientAuthInfo, serverAuthInfo) { + t.Fatalf("ServerHandshake(_) = %v, want %v.", serverAuthInfo, clientAuthInfo) + } +} + +func TestServerAndClientHandshake(t *testing.T) { + done := make(chan AuthInfo, 1) + lis := launchServer(t, gRPCServerHandshake, done) + defer lis.Close() + clientAuthInfo := clientHandle(t, gRPCClientHandshake, lis.Addr().String()) + // wait until server sends serverAuthInfo or fails. + serverAuthInfo, ok := <-done + if !ok { + t.Fatalf("Error at server-side") + } + if !compare(clientAuthInfo, serverAuthInfo) { + t.Fatalf("AuthInfo returned by server: %v and client: %v aren't same", serverAuthInfo, clientAuthInfo) + } +} + +func compare(a1, a2 AuthInfo) bool { + if a1.AuthType() != a2.AuthType() { + return false + } + switch a1.AuthType() { + case "tls": + state1 := a1.(TLSInfo).State + state2 := a2.(TLSInfo).State + if state1.Version == state2.Version && + state1.HandshakeComplete == state2.HandshakeComplete && + state1.CipherSuite == state2.CipherSuite && + state1.NegotiatedProtocol == state2.NegotiatedProtocol { + return true + } + return false + default: + return false + } +} + +func launchServer(t *testing.T, hs serverHandshake, done chan AuthInfo) net.Listener { + lis, err := net.Listen("tcp", "localhost:0") + if err != nil { + t.Fatalf("Failed to listen: %v", err) + } + go serverHandle(t, hs, done, lis) + return lis +} + +// Is run in a seperate goroutine. +func serverHandle(t *testing.T, hs serverHandshake, done chan AuthInfo, lis net.Listener) { + serverRawConn, err := lis.Accept() + if err != nil { + t.Errorf("Server failed to accept connection: %v", err) + close(done) + return + } + serverAuthInfo, err := hs(serverRawConn) + if err != nil { + t.Errorf("Server failed while handshake. Error: %v", err) + serverRawConn.Close() + close(done) + return + } + done <- serverAuthInfo +} + +func clientHandle(t *testing.T, hs func(net.Conn, string) (AuthInfo, error), lisAddr string) AuthInfo { + conn, err := net.Dial("tcp", lisAddr) + if err != nil { + t.Fatalf("Client failed to connect to %s. Error: %v", lisAddr, err) + } + defer conn.Close() + clientAuthInfo, err := hs(conn, lisAddr) + if err != nil { + t.Fatalf("Error on client while handshake. Error: %v", err) + } + return clientAuthInfo +} + +// Server handshake implementation in gRPC. +func gRPCServerHandshake(conn net.Conn) (AuthInfo, error) { + serverTLS, err := NewServerTLSFromFile(testdata.Path("server1.pem"), testdata.Path("server1.key")) + if err != nil { + return nil, err + } + _, serverAuthInfo, err := serverTLS.ServerHandshake(conn) + if err != nil { + return nil, err + } + return serverAuthInfo, nil +} + +// Client handshake implementation in gRPC. +func gRPCClientHandshake(conn net.Conn, lisAddr string) (AuthInfo, error) { + clientTLS := NewTLS(&tls.Config{InsecureSkipVerify: true}) + _, authInfo, err := clientTLS.ClientHandshake(context.Background(), lisAddr, conn) + if err != nil { + return nil, err + } + return authInfo, nil +} + +func tlsServerHandshake(conn net.Conn) (AuthInfo, error) { + cert, err := tls.LoadX509KeyPair(testdata.Path("server1.pem"), testdata.Path("server1.key")) + if err != nil { + return nil, err + } + serverTLSConfig := &tls.Config{Certificates: []tls.Certificate{cert}} + serverConn := tls.Server(conn, serverTLSConfig) + err = serverConn.Handshake() + if err != nil { + return nil, err + } + return TLSInfo{State: serverConn.ConnectionState()}, nil +} + +func tlsClientHandshake(conn net.Conn, _ string) (AuthInfo, error) { + clientTLSConfig := &tls.Config{InsecureSkipVerify: true} + clientConn := tls.Client(conn, clientTLSConfig) + if err := clientConn.Handshake(); err != nil { + return nil, err + } + return TLSInfo{State: clientConn.ConnectionState()}, nil +} diff --git a/vendor/google.golang.org/grpc/credentials/credentials_util_go17.go b/vendor/google.golang.org/grpc/credentials/credentials_util_go17.go new file mode 100644 index 000000000..60409aac0 --- /dev/null +++ b/vendor/google.golang.org/grpc/credentials/credentials_util_go17.go @@ -0,0 +1,60 @@ +// +build go1.7 +// +build !go1.8 + +/* + * + * Copyright 2016 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package credentials + +import ( + "crypto/tls" +) + +// cloneTLSConfig returns a shallow clone of the exported +// fields of cfg, ignoring the unexported sync.Once, which +// contains a mutex and must not be copied. +// +// If cfg is nil, a new zero tls.Config is returned. +func cloneTLSConfig(cfg *tls.Config) *tls.Config { + if cfg == nil { + return &tls.Config{} + } + return &tls.Config{ + Rand: cfg.Rand, + Time: cfg.Time, + Certificates: cfg.Certificates, + NameToCertificate: cfg.NameToCertificate, + GetCertificate: cfg.GetCertificate, + RootCAs: cfg.RootCAs, + NextProtos: cfg.NextProtos, + ServerName: cfg.ServerName, + ClientAuth: cfg.ClientAuth, + ClientCAs: cfg.ClientCAs, + InsecureSkipVerify: cfg.InsecureSkipVerify, + CipherSuites: cfg.CipherSuites, + PreferServerCipherSuites: cfg.PreferServerCipherSuites, + SessionTicketsDisabled: cfg.SessionTicketsDisabled, + SessionTicketKey: cfg.SessionTicketKey, + ClientSessionCache: cfg.ClientSessionCache, + MinVersion: cfg.MinVersion, + MaxVersion: cfg.MaxVersion, + CurvePreferences: cfg.CurvePreferences, + DynamicRecordSizingDisabled: cfg.DynamicRecordSizingDisabled, + Renegotiation: cfg.Renegotiation, + } +} diff --git a/vendor/google.golang.org/grpc/credentials/credentials_util_go18.go b/vendor/google.golang.org/grpc/credentials/credentials_util_go18.go new file mode 100644 index 000000000..93f0e1d8d --- /dev/null +++ b/vendor/google.golang.org/grpc/credentials/credentials_util_go18.go @@ -0,0 +1,38 @@ +// +build go1.8 + +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package credentials + +import ( + "crypto/tls" +) + +// cloneTLSConfig returns a shallow clone of the exported +// fields of cfg, ignoring the unexported sync.Once, which +// contains a mutex and must not be copied. +// +// If cfg is nil, a new zero tls.Config is returned. +func cloneTLSConfig(cfg *tls.Config) *tls.Config { + if cfg == nil { + return &tls.Config{} + } + + return cfg.Clone() +} diff --git a/vendor/google.golang.org/grpc/credentials/credentials_util_pre_go17.go b/vendor/google.golang.org/grpc/credentials/credentials_util_pre_go17.go new file mode 100644 index 000000000..d6bbcc9fd --- /dev/null +++ b/vendor/google.golang.org/grpc/credentials/credentials_util_pre_go17.go @@ -0,0 +1,57 @@ +// +build !go1.7 + +/* + * + * Copyright 2016 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package credentials + +import ( + "crypto/tls" +) + +// cloneTLSConfig returns a shallow clone of the exported +// fields of cfg, ignoring the unexported sync.Once, which +// contains a mutex and must not be copied. +// +// If cfg is nil, a new zero tls.Config is returned. +func cloneTLSConfig(cfg *tls.Config) *tls.Config { + if cfg == nil { + return &tls.Config{} + } + return &tls.Config{ + Rand: cfg.Rand, + Time: cfg.Time, + Certificates: cfg.Certificates, + NameToCertificate: cfg.NameToCertificate, + GetCertificate: cfg.GetCertificate, + RootCAs: cfg.RootCAs, + NextProtos: cfg.NextProtos, + ServerName: cfg.ServerName, + ClientAuth: cfg.ClientAuth, + ClientCAs: cfg.ClientCAs, + InsecureSkipVerify: cfg.InsecureSkipVerify, + CipherSuites: cfg.CipherSuites, + PreferServerCipherSuites: cfg.PreferServerCipherSuites, + SessionTicketsDisabled: cfg.SessionTicketsDisabled, + SessionTicketKey: cfg.SessionTicketKey, + ClientSessionCache: cfg.ClientSessionCache, + MinVersion: cfg.MinVersion, + MaxVersion: cfg.MaxVersion, + CurvePreferences: cfg.CurvePreferences, + } +} diff --git a/vendor/google.golang.org/grpc/doc.go b/vendor/google.golang.org/grpc/doc.go new file mode 100644 index 000000000..187adbb11 --- /dev/null +++ b/vendor/google.golang.org/grpc/doc.go @@ -0,0 +1,24 @@ +/* + * + * Copyright 2015 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +/* +Package grpc implements an RPC system called gRPC. + +See grpc.io for more information about gRPC. +*/ +package grpc // import "google.golang.org/grpc" diff --git a/vendor/google.golang.org/grpc/go16.go b/vendor/google.golang.org/grpc/go16.go new file mode 100644 index 000000000..f3dbf2170 --- /dev/null +++ b/vendor/google.golang.org/grpc/go16.go @@ -0,0 +1,98 @@ +// +build go1.6,!go1.7 + +/* + * + * Copyright 2016 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpc + +import ( + "fmt" + "io" + "net" + "net/http" + "os" + + "golang.org/x/net/context" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "google.golang.org/grpc/transport" +) + +// dialContext connects to the address on the named network. +func dialContext(ctx context.Context, network, address string) (net.Conn, error) { + return (&net.Dialer{Cancel: ctx.Done()}).Dial(network, address) +} + +func sendHTTPRequest(ctx context.Context, req *http.Request, conn net.Conn) error { + req.Cancel = ctx.Done() + if err := req.Write(conn); err != nil { + return fmt.Errorf("failed to write the HTTP request: %v", err) + } + return nil +} + +// toRPCErr converts an error into an error from the status package. +func toRPCErr(err error) error { + if _, ok := status.FromError(err); ok { + return err + } + switch e := err.(type) { + case transport.StreamError: + return status.Error(e.Code, e.Desc) + case transport.ConnectionError: + return status.Error(codes.Unavailable, e.Desc) + default: + switch err { + case context.DeadlineExceeded: + return status.Error(codes.DeadlineExceeded, err.Error()) + case context.Canceled: + return status.Error(codes.Canceled, err.Error()) + case ErrClientConnClosing: + return status.Error(codes.FailedPrecondition, err.Error()) + } + } + return status.Error(codes.Unknown, err.Error()) +} + +// convertCode converts a standard Go error into its canonical code. Note that +// this is only used to translate the error returned by the server applications. +func convertCode(err error) codes.Code { + switch err { + case nil: + return codes.OK + case io.EOF: + return codes.OutOfRange + case io.ErrClosedPipe, io.ErrNoProgress, io.ErrShortBuffer, io.ErrShortWrite, io.ErrUnexpectedEOF: + return codes.FailedPrecondition + case os.ErrInvalid: + return codes.InvalidArgument + case context.Canceled: + return codes.Canceled + case context.DeadlineExceeded: + return codes.DeadlineExceeded + } + switch { + case os.IsExist(err): + return codes.AlreadyExists + case os.IsNotExist(err): + return codes.NotFound + case os.IsPermission(err): + return codes.PermissionDenied + } + return codes.Unknown +} diff --git a/vendor/google.golang.org/grpc/go17.go b/vendor/google.golang.org/grpc/go17.go new file mode 100644 index 000000000..a3421d99e --- /dev/null +++ b/vendor/google.golang.org/grpc/go17.go @@ -0,0 +1,98 @@ +// +build go1.7 + +/* + * + * Copyright 2016 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpc + +import ( + "context" + "io" + "net" + "net/http" + "os" + + netctx "golang.org/x/net/context" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "google.golang.org/grpc/transport" +) + +// dialContext connects to the address on the named network. +func dialContext(ctx context.Context, network, address string) (net.Conn, error) { + return (&net.Dialer{}).DialContext(ctx, network, address) +} + +func sendHTTPRequest(ctx context.Context, req *http.Request, conn net.Conn) error { + req = req.WithContext(ctx) + if err := req.Write(conn); err != nil { + return err + } + return nil +} + +// toRPCErr converts an error into an error from the status package. +func toRPCErr(err error) error { + if _, ok := status.FromError(err); ok { + return err + } + switch e := err.(type) { + case transport.StreamError: + return status.Error(e.Code, e.Desc) + case transport.ConnectionError: + return status.Error(codes.Unavailable, e.Desc) + default: + switch err { + case context.DeadlineExceeded, netctx.DeadlineExceeded: + return status.Error(codes.DeadlineExceeded, err.Error()) + case context.Canceled, netctx.Canceled: + return status.Error(codes.Canceled, err.Error()) + case ErrClientConnClosing: + return status.Error(codes.FailedPrecondition, err.Error()) + } + } + return status.Error(codes.Unknown, err.Error()) +} + +// convertCode converts a standard Go error into its canonical code. Note that +// this is only used to translate the error returned by the server applications. +func convertCode(err error) codes.Code { + switch err { + case nil: + return codes.OK + case io.EOF: + return codes.OutOfRange + case io.ErrClosedPipe, io.ErrNoProgress, io.ErrShortBuffer, io.ErrShortWrite, io.ErrUnexpectedEOF: + return codes.FailedPrecondition + case os.ErrInvalid: + return codes.InvalidArgument + case context.Canceled, netctx.Canceled: + return codes.Canceled + case context.DeadlineExceeded, netctx.DeadlineExceeded: + return codes.DeadlineExceeded + } + switch { + case os.IsExist(err): + return codes.AlreadyExists + case os.IsNotExist(err): + return codes.NotFound + case os.IsPermission(err): + return codes.PermissionDenied + } + return codes.Unknown +} diff --git a/vendor/google.golang.org/grpc/grpclb.go b/vendor/google.golang.org/grpc/grpclb.go new file mode 100644 index 000000000..afe49828c --- /dev/null +++ b/vendor/google.golang.org/grpc/grpclb.go @@ -0,0 +1,708 @@ +/* + * + * Copyright 2016 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpc + +import ( + "errors" + "fmt" + "math/rand" + "net" + "sync" + "time" + + "golang.org/x/net/context" + "google.golang.org/grpc/codes" + lbmpb "google.golang.org/grpc/grpclb/grpc_lb_v1/messages" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/naming" +) + +// Client API for LoadBalancer service. +// Mostly copied from generated pb.go file. +// To avoid circular dependency. +type loadBalancerClient struct { + cc *ClientConn +} + +func (c *loadBalancerClient) BalanceLoad(ctx context.Context, opts ...CallOption) (*balanceLoadClientStream, error) { + desc := &StreamDesc{ + StreamName: "BalanceLoad", + ServerStreams: true, + ClientStreams: true, + } + stream, err := NewClientStream(ctx, desc, c.cc, "/grpc.lb.v1.LoadBalancer/BalanceLoad", opts...) + if err != nil { + return nil, err + } + x := &balanceLoadClientStream{stream} + return x, nil +} + +type balanceLoadClientStream struct { + ClientStream +} + +func (x *balanceLoadClientStream) Send(m *lbmpb.LoadBalanceRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *balanceLoadClientStream) Recv() (*lbmpb.LoadBalanceResponse, error) { + m := new(lbmpb.LoadBalanceResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// NewGRPCLBBalancer creates a grpclb load balancer. +func NewGRPCLBBalancer(r naming.Resolver) Balancer { + return &balancer{ + r: r, + } +} + +type remoteBalancerInfo struct { + addr string + // the server name used for authentication with the remote LB server. + name string +} + +// grpclbAddrInfo consists of the information of a backend server. +type grpclbAddrInfo struct { + addr Address + connected bool + // dropForRateLimiting indicates whether this particular request should be + // dropped by the client for rate limiting. + dropForRateLimiting bool + // dropForLoadBalancing indicates whether this particular request should be + // dropped by the client for load balancing. + dropForLoadBalancing bool +} + +type balancer struct { + r naming.Resolver + target string + mu sync.Mutex + seq int // a sequence number to make sure addrCh does not get stale addresses. + w naming.Watcher + addrCh chan []Address + rbs []remoteBalancerInfo + addrs []*grpclbAddrInfo + next int + waitCh chan struct{} + done bool + rand *rand.Rand + + clientStats lbmpb.ClientStats +} + +func (b *balancer) watchAddrUpdates(w naming.Watcher, ch chan []remoteBalancerInfo) error { + updates, err := w.Next() + if err != nil { + grpclog.Warningf("grpclb: failed to get next addr update from watcher: %v", err) + return err + } + b.mu.Lock() + defer b.mu.Unlock() + if b.done { + return ErrClientConnClosing + } + for _, update := range updates { + switch update.Op { + case naming.Add: + var exist bool + for _, v := range b.rbs { + // TODO: Is the same addr with different server name a different balancer? + if update.Addr == v.addr { + exist = true + break + } + } + if exist { + continue + } + md, ok := update.Metadata.(*naming.AddrMetadataGRPCLB) + if !ok { + // TODO: Revisit the handling here and may introduce some fallback mechanism. + grpclog.Errorf("The name resolution contains unexpected metadata %v", update.Metadata) + continue + } + switch md.AddrType { + case naming.Backend: + // TODO: Revisit the handling here and may introduce some fallback mechanism. + grpclog.Errorf("The name resolution does not give grpclb addresses") + continue + case naming.GRPCLB: + b.rbs = append(b.rbs, remoteBalancerInfo{ + addr: update.Addr, + name: md.ServerName, + }) + default: + grpclog.Errorf("Received unknow address type %d", md.AddrType) + continue + } + case naming.Delete: + for i, v := range b.rbs { + if update.Addr == v.addr { + copy(b.rbs[i:], b.rbs[i+1:]) + b.rbs = b.rbs[:len(b.rbs)-1] + break + } + } + default: + grpclog.Errorf("Unknown update.Op %v", update.Op) + } + } + // TODO: Fall back to the basic round-robin load balancing if the resulting address is + // not a load balancer. + select { + case <-ch: + default: + } + ch <- b.rbs + return nil +} + +func convertDuration(d *lbmpb.Duration) time.Duration { + if d == nil { + return 0 + } + return time.Duration(d.Seconds)*time.Second + time.Duration(d.Nanos)*time.Nanosecond +} + +func (b *balancer) processServerList(l *lbmpb.ServerList, seq int) { + if l == nil { + return + } + servers := l.GetServers() + var ( + sl []*grpclbAddrInfo + addrs []Address + ) + for _, s := range servers { + md := metadata.Pairs("lb-token", s.LoadBalanceToken) + ip := net.IP(s.IpAddress) + ipStr := ip.String() + if ip.To4() == nil { + // Add square brackets to ipv6 addresses, otherwise net.Dial() and + // net.SplitHostPort() will return too many colons error. + ipStr = fmt.Sprintf("[%s]", ipStr) + } + addr := Address{ + Addr: fmt.Sprintf("%s:%d", ipStr, s.Port), + Metadata: &md, + } + sl = append(sl, &grpclbAddrInfo{ + addr: addr, + dropForRateLimiting: s.DropForRateLimiting, + dropForLoadBalancing: s.DropForLoadBalancing, + }) + addrs = append(addrs, addr) + } + b.mu.Lock() + defer b.mu.Unlock() + if b.done || seq < b.seq { + return + } + if len(sl) > 0 { + // reset b.next to 0 when replacing the server list. + b.next = 0 + b.addrs = sl + b.addrCh <- addrs + } + return +} + +func (b *balancer) sendLoadReport(s *balanceLoadClientStream, interval time.Duration, done <-chan struct{}) { + ticker := time.NewTicker(interval) + defer ticker.Stop() + for { + select { + case <-ticker.C: + case <-done: + return + } + b.mu.Lock() + stats := b.clientStats + b.clientStats = lbmpb.ClientStats{} // Clear the stats. + b.mu.Unlock() + t := time.Now() + stats.Timestamp = &lbmpb.Timestamp{ + Seconds: t.Unix(), + Nanos: int32(t.Nanosecond()), + } + if err := s.Send(&lbmpb.LoadBalanceRequest{ + LoadBalanceRequestType: &lbmpb.LoadBalanceRequest_ClientStats{ + ClientStats: &stats, + }, + }); err != nil { + grpclog.Errorf("grpclb: failed to send load report: %v", err) + return + } + } +} + +func (b *balancer) callRemoteBalancer(lbc *loadBalancerClient, seq int) (retry bool) { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + stream, err := lbc.BalanceLoad(ctx) + if err != nil { + grpclog.Errorf("grpclb: failed to perform RPC to the remote balancer %v", err) + return + } + b.mu.Lock() + if b.done { + b.mu.Unlock() + return + } + b.mu.Unlock() + initReq := &lbmpb.LoadBalanceRequest{ + LoadBalanceRequestType: &lbmpb.LoadBalanceRequest_InitialRequest{ + InitialRequest: &lbmpb.InitialLoadBalanceRequest{ + Name: b.target, + }, + }, + } + if err := stream.Send(initReq); err != nil { + grpclog.Errorf("grpclb: failed to send init request: %v", err) + // TODO: backoff on retry? + return true + } + reply, err := stream.Recv() + if err != nil { + grpclog.Errorf("grpclb: failed to recv init response: %v", err) + // TODO: backoff on retry? + return true + } + initResp := reply.GetInitialResponse() + if initResp == nil { + grpclog.Errorf("grpclb: reply from remote balancer did not include initial response.") + return + } + // TODO: Support delegation. + if initResp.LoadBalancerDelegate != "" { + // delegation + grpclog.Errorf("TODO: Delegation is not supported yet.") + return + } + streamDone := make(chan struct{}) + defer close(streamDone) + b.mu.Lock() + b.clientStats = lbmpb.ClientStats{} // Clear client stats. + b.mu.Unlock() + if d := convertDuration(initResp.ClientStatsReportInterval); d > 0 { + go b.sendLoadReport(stream, d, streamDone) + } + // Retrieve the server list. + for { + reply, err := stream.Recv() + if err != nil { + grpclog.Errorf("grpclb: failed to recv server list: %v", err) + break + } + b.mu.Lock() + if b.done || seq < b.seq { + b.mu.Unlock() + return + } + b.seq++ // tick when receiving a new list of servers. + seq = b.seq + b.mu.Unlock() + if serverList := reply.GetServerList(); serverList != nil { + b.processServerList(serverList, seq) + } + } + return true +} + +func (b *balancer) Start(target string, config BalancerConfig) error { + b.rand = rand.New(rand.NewSource(time.Now().Unix())) + // TODO: Fall back to the basic direct connection if there is no name resolver. + if b.r == nil { + return errors.New("there is no name resolver installed") + } + b.target = target + b.mu.Lock() + if b.done { + b.mu.Unlock() + return ErrClientConnClosing + } + b.addrCh = make(chan []Address) + w, err := b.r.Resolve(target) + if err != nil { + b.mu.Unlock() + grpclog.Errorf("grpclb: failed to resolve address: %v, err: %v", target, err) + return err + } + b.w = w + b.mu.Unlock() + balancerAddrsCh := make(chan []remoteBalancerInfo, 1) + // Spawn a goroutine to monitor the name resolution of remote load balancer. + go func() { + for { + if err := b.watchAddrUpdates(w, balancerAddrsCh); err != nil { + grpclog.Warningf("grpclb: the naming watcher stops working due to %v.\n", err) + close(balancerAddrsCh) + return + } + } + }() + // Spawn a goroutine to talk to the remote load balancer. + go func() { + var ( + cc *ClientConn + // ccError is closed when there is an error in the current cc. + // A new rb should be picked from rbs and connected. + ccError chan struct{} + rb *remoteBalancerInfo + rbs []remoteBalancerInfo + rbIdx int + ) + + defer func() { + if ccError != nil { + select { + case <-ccError: + default: + close(ccError) + } + } + if cc != nil { + cc.Close() + } + }() + + for { + var ok bool + select { + case rbs, ok = <-balancerAddrsCh: + if !ok { + return + } + foundIdx := -1 + if rb != nil { + for i, trb := range rbs { + if trb == *rb { + foundIdx = i + break + } + } + } + if foundIdx >= 0 { + if foundIdx >= 1 { + // Move the address in use to the beginning of the list. + b.rbs[0], b.rbs[foundIdx] = b.rbs[foundIdx], b.rbs[0] + rbIdx = 0 + } + continue // If found, don't dial new cc. + } else if len(rbs) > 0 { + // Pick a random one from the list, instead of always using the first one. + if l := len(rbs); l > 1 && rb != nil { + tmpIdx := b.rand.Intn(l - 1) + b.rbs[0], b.rbs[tmpIdx] = b.rbs[tmpIdx], b.rbs[0] + } + rbIdx = 0 + rb = &rbs[0] + } else { + // foundIdx < 0 && len(rbs) <= 0. + rb = nil + } + case <-ccError: + ccError = nil + if rbIdx < len(rbs)-1 { + rbIdx++ + rb = &rbs[rbIdx] + } else { + rb = nil + } + } + + if rb == nil { + continue + } + + if cc != nil { + cc.Close() + } + // Talk to the remote load balancer to get the server list. + var ( + err error + dopts []DialOption + ) + if creds := config.DialCreds; creds != nil { + if rb.name != "" { + if err := creds.OverrideServerName(rb.name); err != nil { + grpclog.Warningf("grpclb: failed to override the server name in the credentials: %v", err) + continue + } + } + dopts = append(dopts, WithTransportCredentials(creds)) + } else { + dopts = append(dopts, WithInsecure()) + } + if dialer := config.Dialer; dialer != nil { + // WithDialer takes a different type of function, so we instead use a special DialOption here. + dopts = append(dopts, func(o *dialOptions) { o.copts.Dialer = dialer }) + } + ccError = make(chan struct{}) + cc, err = Dial(rb.addr, dopts...) + if err != nil { + grpclog.Warningf("grpclb: failed to setup a connection to the remote balancer %v: %v", rb.addr, err) + close(ccError) + continue + } + b.mu.Lock() + b.seq++ // tick when getting a new balancer address + seq := b.seq + b.next = 0 + b.mu.Unlock() + go func(cc *ClientConn, ccError chan struct{}) { + lbc := &loadBalancerClient{cc} + b.callRemoteBalancer(lbc, seq) + cc.Close() + select { + case <-ccError: + default: + close(ccError) + } + }(cc, ccError) + } + }() + return nil +} + +func (b *balancer) down(addr Address, err error) { + b.mu.Lock() + defer b.mu.Unlock() + for _, a := range b.addrs { + if addr == a.addr { + a.connected = false + break + } + } +} + +func (b *balancer) Up(addr Address) func(error) { + b.mu.Lock() + defer b.mu.Unlock() + if b.done { + return nil + } + var cnt int + for _, a := range b.addrs { + if a.addr == addr { + if a.connected { + return nil + } + a.connected = true + } + if a.connected && !a.dropForRateLimiting && !a.dropForLoadBalancing { + cnt++ + } + } + // addr is the only one which is connected. Notify the Get() callers who are blocking. + if cnt == 1 && b.waitCh != nil { + close(b.waitCh) + b.waitCh = nil + } + return func(err error) { + b.down(addr, err) + } +} + +func (b *balancer) Get(ctx context.Context, opts BalancerGetOptions) (addr Address, put func(), err error) { + var ch chan struct{} + b.mu.Lock() + if b.done { + b.mu.Unlock() + err = ErrClientConnClosing + return + } + seq := b.seq + + defer func() { + if err != nil { + return + } + put = func() { + s, ok := rpcInfoFromContext(ctx) + if !ok { + return + } + b.mu.Lock() + defer b.mu.Unlock() + if b.done || seq < b.seq { + return + } + b.clientStats.NumCallsFinished++ + if !s.bytesSent { + b.clientStats.NumCallsFinishedWithClientFailedToSend++ + } else if s.bytesReceived { + b.clientStats.NumCallsFinishedKnownReceived++ + } + } + }() + + b.clientStats.NumCallsStarted++ + if len(b.addrs) > 0 { + if b.next >= len(b.addrs) { + b.next = 0 + } + next := b.next + for { + a := b.addrs[next] + next = (next + 1) % len(b.addrs) + if a.connected { + if !a.dropForRateLimiting && !a.dropForLoadBalancing { + addr = a.addr + b.next = next + b.mu.Unlock() + return + } + if !opts.BlockingWait { + b.next = next + if a.dropForLoadBalancing { + b.clientStats.NumCallsFinished++ + b.clientStats.NumCallsFinishedWithDropForLoadBalancing++ + } else if a.dropForRateLimiting { + b.clientStats.NumCallsFinished++ + b.clientStats.NumCallsFinishedWithDropForRateLimiting++ + } + b.mu.Unlock() + err = Errorf(codes.Unavailable, "%s drops requests", a.addr.Addr) + return + } + } + if next == b.next { + // Has iterated all the possible address but none is connected. + break + } + } + } + if !opts.BlockingWait { + if len(b.addrs) == 0 { + b.clientStats.NumCallsFinished++ + b.clientStats.NumCallsFinishedWithClientFailedToSend++ + b.mu.Unlock() + err = Errorf(codes.Unavailable, "there is no address available") + return + } + // Returns the next addr on b.addrs for a failfast RPC. + addr = b.addrs[b.next].addr + b.next++ + b.mu.Unlock() + return + } + // Wait on b.waitCh for non-failfast RPCs. + if b.waitCh == nil { + ch = make(chan struct{}) + b.waitCh = ch + } else { + ch = b.waitCh + } + b.mu.Unlock() + for { + select { + case <-ctx.Done(): + b.mu.Lock() + b.clientStats.NumCallsFinished++ + b.clientStats.NumCallsFinishedWithClientFailedToSend++ + b.mu.Unlock() + err = ctx.Err() + return + case <-ch: + b.mu.Lock() + if b.done { + b.clientStats.NumCallsFinished++ + b.clientStats.NumCallsFinishedWithClientFailedToSend++ + b.mu.Unlock() + err = ErrClientConnClosing + return + } + + if len(b.addrs) > 0 { + if b.next >= len(b.addrs) { + b.next = 0 + } + next := b.next + for { + a := b.addrs[next] + next = (next + 1) % len(b.addrs) + if a.connected { + if !a.dropForRateLimiting && !a.dropForLoadBalancing { + addr = a.addr + b.next = next + b.mu.Unlock() + return + } + if !opts.BlockingWait { + b.next = next + if a.dropForLoadBalancing { + b.clientStats.NumCallsFinished++ + b.clientStats.NumCallsFinishedWithDropForLoadBalancing++ + } else if a.dropForRateLimiting { + b.clientStats.NumCallsFinished++ + b.clientStats.NumCallsFinishedWithDropForRateLimiting++ + } + b.mu.Unlock() + err = Errorf(codes.Unavailable, "drop requests for the addreess %s", a.addr.Addr) + return + } + } + if next == b.next { + // Has iterated all the possible address but none is connected. + break + } + } + } + // The newly added addr got removed by Down() again. + if b.waitCh == nil { + ch = make(chan struct{}) + b.waitCh = ch + } else { + ch = b.waitCh + } + b.mu.Unlock() + } + } +} + +func (b *balancer) Notify() <-chan []Address { + return b.addrCh +} + +func (b *balancer) Close() error { + b.mu.Lock() + defer b.mu.Unlock() + if b.done { + return errBalancerClosed + } + b.done = true + if b.waitCh != nil { + close(b.waitCh) + } + if b.addrCh != nil { + close(b.addrCh) + } + if b.w != nil { + b.w.Close() + } + return nil +} diff --git a/vendor/google.golang.org/grpc/grpclb/grpc_lb_v1/messages/messages.pb.go b/vendor/google.golang.org/grpc/grpclb/grpc_lb_v1/messages/messages.pb.go new file mode 100644 index 000000000..f4a27125a --- /dev/null +++ b/vendor/google.golang.org/grpc/grpclb/grpc_lb_v1/messages/messages.pb.go @@ -0,0 +1,615 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: grpc_lb_v1/messages/messages.proto + +/* +Package messages is a generated protocol buffer package. + +It is generated from these files: + grpc_lb_v1/messages/messages.proto + +It has these top-level messages: + Duration + Timestamp + LoadBalanceRequest + InitialLoadBalanceRequest + ClientStats + LoadBalanceResponse + InitialLoadBalanceResponse + ServerList + Server +*/ +package messages + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + +type Duration struct { + // Signed seconds of the span of time. Must be from -315,576,000,000 + // to +315,576,000,000 inclusive. + Seconds int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"` + // Signed fractions of a second at nanosecond resolution of the span + // of time. Durations less than one second are represented with a 0 + // `seconds` field and a positive or negative `nanos` field. For durations + // of one second or more, a non-zero value for the `nanos` field must be + // of the same sign as the `seconds` field. Must be from -999,999,999 + // to +999,999,999 inclusive. + Nanos int32 `protobuf:"varint,2,opt,name=nanos" json:"nanos,omitempty"` +} + +func (m *Duration) Reset() { *m = Duration{} } +func (m *Duration) String() string { return proto.CompactTextString(m) } +func (*Duration) ProtoMessage() {} +func (*Duration) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +func (m *Duration) GetSeconds() int64 { + if m != nil { + return m.Seconds + } + return 0 +} + +func (m *Duration) GetNanos() int32 { + if m != nil { + return m.Nanos + } + return 0 +} + +type Timestamp struct { + // Represents seconds of UTC time since Unix epoch + // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + // 9999-12-31T23:59:59Z inclusive. + Seconds int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"` + // Non-negative fractions of a second at nanosecond resolution. Negative + // second values with fractions must still have non-negative nanos values + // that count forward in time. Must be from 0 to 999,999,999 + // inclusive. + Nanos int32 `protobuf:"varint,2,opt,name=nanos" json:"nanos,omitempty"` +} + +func (m *Timestamp) Reset() { *m = Timestamp{} } +func (m *Timestamp) String() string { return proto.CompactTextString(m) } +func (*Timestamp) ProtoMessage() {} +func (*Timestamp) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } + +func (m *Timestamp) GetSeconds() int64 { + if m != nil { + return m.Seconds + } + return 0 +} + +func (m *Timestamp) GetNanos() int32 { + if m != nil { + return m.Nanos + } + return 0 +} + +type LoadBalanceRequest struct { + // Types that are valid to be assigned to LoadBalanceRequestType: + // *LoadBalanceRequest_InitialRequest + // *LoadBalanceRequest_ClientStats + LoadBalanceRequestType isLoadBalanceRequest_LoadBalanceRequestType `protobuf_oneof:"load_balance_request_type"` +} + +func (m *LoadBalanceRequest) Reset() { *m = LoadBalanceRequest{} } +func (m *LoadBalanceRequest) String() string { return proto.CompactTextString(m) } +func (*LoadBalanceRequest) ProtoMessage() {} +func (*LoadBalanceRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } + +type isLoadBalanceRequest_LoadBalanceRequestType interface { + isLoadBalanceRequest_LoadBalanceRequestType() +} + +type LoadBalanceRequest_InitialRequest struct { + InitialRequest *InitialLoadBalanceRequest `protobuf:"bytes,1,opt,name=initial_request,json=initialRequest,oneof"` +} +type LoadBalanceRequest_ClientStats struct { + ClientStats *ClientStats `protobuf:"bytes,2,opt,name=client_stats,json=clientStats,oneof"` +} + +func (*LoadBalanceRequest_InitialRequest) isLoadBalanceRequest_LoadBalanceRequestType() {} +func (*LoadBalanceRequest_ClientStats) isLoadBalanceRequest_LoadBalanceRequestType() {} + +func (m *LoadBalanceRequest) GetLoadBalanceRequestType() isLoadBalanceRequest_LoadBalanceRequestType { + if m != nil { + return m.LoadBalanceRequestType + } + return nil +} + +func (m *LoadBalanceRequest) GetInitialRequest() *InitialLoadBalanceRequest { + if x, ok := m.GetLoadBalanceRequestType().(*LoadBalanceRequest_InitialRequest); ok { + return x.InitialRequest + } + return nil +} + +func (m *LoadBalanceRequest) GetClientStats() *ClientStats { + if x, ok := m.GetLoadBalanceRequestType().(*LoadBalanceRequest_ClientStats); ok { + return x.ClientStats + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*LoadBalanceRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _LoadBalanceRequest_OneofMarshaler, _LoadBalanceRequest_OneofUnmarshaler, _LoadBalanceRequest_OneofSizer, []interface{}{ + (*LoadBalanceRequest_InitialRequest)(nil), + (*LoadBalanceRequest_ClientStats)(nil), + } +} + +func _LoadBalanceRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*LoadBalanceRequest) + // load_balance_request_type + switch x := m.LoadBalanceRequestType.(type) { + case *LoadBalanceRequest_InitialRequest: + b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.InitialRequest); err != nil { + return err + } + case *LoadBalanceRequest_ClientStats: + b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.ClientStats); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("LoadBalanceRequest.LoadBalanceRequestType has unexpected type %T", x) + } + return nil +} + +func _LoadBalanceRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*LoadBalanceRequest) + switch tag { + case 1: // load_balance_request_type.initial_request + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(InitialLoadBalanceRequest) + err := b.DecodeMessage(msg) + m.LoadBalanceRequestType = &LoadBalanceRequest_InitialRequest{msg} + return true, err + case 2: // load_balance_request_type.client_stats + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(ClientStats) + err := b.DecodeMessage(msg) + m.LoadBalanceRequestType = &LoadBalanceRequest_ClientStats{msg} + return true, err + default: + return false, nil + } +} + +func _LoadBalanceRequest_OneofSizer(msg proto.Message) (n int) { + m := msg.(*LoadBalanceRequest) + // load_balance_request_type + switch x := m.LoadBalanceRequestType.(type) { + case *LoadBalanceRequest_InitialRequest: + s := proto.Size(x.InitialRequest) + n += proto.SizeVarint(1<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *LoadBalanceRequest_ClientStats: + s := proto.Size(x.ClientStats) + n += proto.SizeVarint(2<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type InitialLoadBalanceRequest struct { + // Name of load balanced service (IE, balancer.service.com) + // length should be less than 256 bytes. + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` +} + +func (m *InitialLoadBalanceRequest) Reset() { *m = InitialLoadBalanceRequest{} } +func (m *InitialLoadBalanceRequest) String() string { return proto.CompactTextString(m) } +func (*InitialLoadBalanceRequest) ProtoMessage() {} +func (*InitialLoadBalanceRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } + +func (m *InitialLoadBalanceRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +// Contains client level statistics that are useful to load balancing. Each +// count except the timestamp should be reset to zero after reporting the stats. +type ClientStats struct { + // The timestamp of generating the report. + Timestamp *Timestamp `protobuf:"bytes,1,opt,name=timestamp" json:"timestamp,omitempty"` + // The total number of RPCs that started. + NumCallsStarted int64 `protobuf:"varint,2,opt,name=num_calls_started,json=numCallsStarted" json:"num_calls_started,omitempty"` + // The total number of RPCs that finished. + NumCallsFinished int64 `protobuf:"varint,3,opt,name=num_calls_finished,json=numCallsFinished" json:"num_calls_finished,omitempty"` + // The total number of RPCs that were dropped by the client because of rate + // limiting. + NumCallsFinishedWithDropForRateLimiting int64 `protobuf:"varint,4,opt,name=num_calls_finished_with_drop_for_rate_limiting,json=numCallsFinishedWithDropForRateLimiting" json:"num_calls_finished_with_drop_for_rate_limiting,omitempty"` + // The total number of RPCs that were dropped by the client because of load + // balancing. + NumCallsFinishedWithDropForLoadBalancing int64 `protobuf:"varint,5,opt,name=num_calls_finished_with_drop_for_load_balancing,json=numCallsFinishedWithDropForLoadBalancing" json:"num_calls_finished_with_drop_for_load_balancing,omitempty"` + // The total number of RPCs that failed to reach a server except dropped RPCs. + NumCallsFinishedWithClientFailedToSend int64 `protobuf:"varint,6,opt,name=num_calls_finished_with_client_failed_to_send,json=numCallsFinishedWithClientFailedToSend" json:"num_calls_finished_with_client_failed_to_send,omitempty"` + // The total number of RPCs that finished and are known to have been received + // by a server. + NumCallsFinishedKnownReceived int64 `protobuf:"varint,7,opt,name=num_calls_finished_known_received,json=numCallsFinishedKnownReceived" json:"num_calls_finished_known_received,omitempty"` +} + +func (m *ClientStats) Reset() { *m = ClientStats{} } +func (m *ClientStats) String() string { return proto.CompactTextString(m) } +func (*ClientStats) ProtoMessage() {} +func (*ClientStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } + +func (m *ClientStats) GetTimestamp() *Timestamp { + if m != nil { + return m.Timestamp + } + return nil +} + +func (m *ClientStats) GetNumCallsStarted() int64 { + if m != nil { + return m.NumCallsStarted + } + return 0 +} + +func (m *ClientStats) GetNumCallsFinished() int64 { + if m != nil { + return m.NumCallsFinished + } + return 0 +} + +func (m *ClientStats) GetNumCallsFinishedWithDropForRateLimiting() int64 { + if m != nil { + return m.NumCallsFinishedWithDropForRateLimiting + } + return 0 +} + +func (m *ClientStats) GetNumCallsFinishedWithDropForLoadBalancing() int64 { + if m != nil { + return m.NumCallsFinishedWithDropForLoadBalancing + } + return 0 +} + +func (m *ClientStats) GetNumCallsFinishedWithClientFailedToSend() int64 { + if m != nil { + return m.NumCallsFinishedWithClientFailedToSend + } + return 0 +} + +func (m *ClientStats) GetNumCallsFinishedKnownReceived() int64 { + if m != nil { + return m.NumCallsFinishedKnownReceived + } + return 0 +} + +type LoadBalanceResponse struct { + // Types that are valid to be assigned to LoadBalanceResponseType: + // *LoadBalanceResponse_InitialResponse + // *LoadBalanceResponse_ServerList + LoadBalanceResponseType isLoadBalanceResponse_LoadBalanceResponseType `protobuf_oneof:"load_balance_response_type"` +} + +func (m *LoadBalanceResponse) Reset() { *m = LoadBalanceResponse{} } +func (m *LoadBalanceResponse) String() string { return proto.CompactTextString(m) } +func (*LoadBalanceResponse) ProtoMessage() {} +func (*LoadBalanceResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } + +type isLoadBalanceResponse_LoadBalanceResponseType interface { + isLoadBalanceResponse_LoadBalanceResponseType() +} + +type LoadBalanceResponse_InitialResponse struct { + InitialResponse *InitialLoadBalanceResponse `protobuf:"bytes,1,opt,name=initial_response,json=initialResponse,oneof"` +} +type LoadBalanceResponse_ServerList struct { + ServerList *ServerList `protobuf:"bytes,2,opt,name=server_list,json=serverList,oneof"` +} + +func (*LoadBalanceResponse_InitialResponse) isLoadBalanceResponse_LoadBalanceResponseType() {} +func (*LoadBalanceResponse_ServerList) isLoadBalanceResponse_LoadBalanceResponseType() {} + +func (m *LoadBalanceResponse) GetLoadBalanceResponseType() isLoadBalanceResponse_LoadBalanceResponseType { + if m != nil { + return m.LoadBalanceResponseType + } + return nil +} + +func (m *LoadBalanceResponse) GetInitialResponse() *InitialLoadBalanceResponse { + if x, ok := m.GetLoadBalanceResponseType().(*LoadBalanceResponse_InitialResponse); ok { + return x.InitialResponse + } + return nil +} + +func (m *LoadBalanceResponse) GetServerList() *ServerList { + if x, ok := m.GetLoadBalanceResponseType().(*LoadBalanceResponse_ServerList); ok { + return x.ServerList + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*LoadBalanceResponse) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _LoadBalanceResponse_OneofMarshaler, _LoadBalanceResponse_OneofUnmarshaler, _LoadBalanceResponse_OneofSizer, []interface{}{ + (*LoadBalanceResponse_InitialResponse)(nil), + (*LoadBalanceResponse_ServerList)(nil), + } +} + +func _LoadBalanceResponse_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*LoadBalanceResponse) + // load_balance_response_type + switch x := m.LoadBalanceResponseType.(type) { + case *LoadBalanceResponse_InitialResponse: + b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.InitialResponse); err != nil { + return err + } + case *LoadBalanceResponse_ServerList: + b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.ServerList); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("LoadBalanceResponse.LoadBalanceResponseType has unexpected type %T", x) + } + return nil +} + +func _LoadBalanceResponse_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*LoadBalanceResponse) + switch tag { + case 1: // load_balance_response_type.initial_response + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(InitialLoadBalanceResponse) + err := b.DecodeMessage(msg) + m.LoadBalanceResponseType = &LoadBalanceResponse_InitialResponse{msg} + return true, err + case 2: // load_balance_response_type.server_list + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(ServerList) + err := b.DecodeMessage(msg) + m.LoadBalanceResponseType = &LoadBalanceResponse_ServerList{msg} + return true, err + default: + return false, nil + } +} + +func _LoadBalanceResponse_OneofSizer(msg proto.Message) (n int) { + m := msg.(*LoadBalanceResponse) + // load_balance_response_type + switch x := m.LoadBalanceResponseType.(type) { + case *LoadBalanceResponse_InitialResponse: + s := proto.Size(x.InitialResponse) + n += proto.SizeVarint(1<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *LoadBalanceResponse_ServerList: + s := proto.Size(x.ServerList) + n += proto.SizeVarint(2<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type InitialLoadBalanceResponse struct { + // This is an application layer redirect that indicates the client should use + // the specified server for load balancing. When this field is non-empty in + // the response, the client should open a separate connection to the + // load_balancer_delegate and call the BalanceLoad method. Its length should + // be less than 64 bytes. + LoadBalancerDelegate string `protobuf:"bytes,1,opt,name=load_balancer_delegate,json=loadBalancerDelegate" json:"load_balancer_delegate,omitempty"` + // This interval defines how often the client should send the client stats + // to the load balancer. Stats should only be reported when the duration is + // positive. + ClientStatsReportInterval *Duration `protobuf:"bytes,2,opt,name=client_stats_report_interval,json=clientStatsReportInterval" json:"client_stats_report_interval,omitempty"` +} + +func (m *InitialLoadBalanceResponse) Reset() { *m = InitialLoadBalanceResponse{} } +func (m *InitialLoadBalanceResponse) String() string { return proto.CompactTextString(m) } +func (*InitialLoadBalanceResponse) ProtoMessage() {} +func (*InitialLoadBalanceResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } + +func (m *InitialLoadBalanceResponse) GetLoadBalancerDelegate() string { + if m != nil { + return m.LoadBalancerDelegate + } + return "" +} + +func (m *InitialLoadBalanceResponse) GetClientStatsReportInterval() *Duration { + if m != nil { + return m.ClientStatsReportInterval + } + return nil +} + +type ServerList struct { + // Contains a list of servers selected by the load balancer. The list will + // be updated when server resolutions change or as needed to balance load + // across more servers. The client should consume the server list in order + // unless instructed otherwise via the client_config. + Servers []*Server `protobuf:"bytes,1,rep,name=servers" json:"servers,omitempty"` +} + +func (m *ServerList) Reset() { *m = ServerList{} } +func (m *ServerList) String() string { return proto.CompactTextString(m) } +func (*ServerList) ProtoMessage() {} +func (*ServerList) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } + +func (m *ServerList) GetServers() []*Server { + if m != nil { + return m.Servers + } + return nil +} + +// Contains server information. When none of the [drop_for_*] fields are true, +// use the other fields. When drop_for_rate_limiting is true, ignore all other +// fields. Use drop_for_load_balancing only when it is true and +// drop_for_rate_limiting is false. +type Server struct { + // A resolved address for the server, serialized in network-byte-order. It may + // either be an IPv4 or IPv6 address. + IpAddress []byte `protobuf:"bytes,1,opt,name=ip_address,json=ipAddress,proto3" json:"ip_address,omitempty"` + // A resolved port number for the server. + Port int32 `protobuf:"varint,2,opt,name=port" json:"port,omitempty"` + // An opaque but printable token given to the frontend for each pick. All + // frontend requests for that pick must include the token in its initial + // metadata. The token is used by the backend to verify the request and to + // allow the backend to report load to the gRPC LB system. + // + // Its length is variable but less than 50 bytes. + LoadBalanceToken string `protobuf:"bytes,3,opt,name=load_balance_token,json=loadBalanceToken" json:"load_balance_token,omitempty"` + // Indicates whether this particular request should be dropped by the client + // for rate limiting. + DropForRateLimiting bool `protobuf:"varint,4,opt,name=drop_for_rate_limiting,json=dropForRateLimiting" json:"drop_for_rate_limiting,omitempty"` + // Indicates whether this particular request should be dropped by the client + // for load balancing. + DropForLoadBalancing bool `protobuf:"varint,5,opt,name=drop_for_load_balancing,json=dropForLoadBalancing" json:"drop_for_load_balancing,omitempty"` +} + +func (m *Server) Reset() { *m = Server{} } +func (m *Server) String() string { return proto.CompactTextString(m) } +func (*Server) ProtoMessage() {} +func (*Server) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } + +func (m *Server) GetIpAddress() []byte { + if m != nil { + return m.IpAddress + } + return nil +} + +func (m *Server) GetPort() int32 { + if m != nil { + return m.Port + } + return 0 +} + +func (m *Server) GetLoadBalanceToken() string { + if m != nil { + return m.LoadBalanceToken + } + return "" +} + +func (m *Server) GetDropForRateLimiting() bool { + if m != nil { + return m.DropForRateLimiting + } + return false +} + +func (m *Server) GetDropForLoadBalancing() bool { + if m != nil { + return m.DropForLoadBalancing + } + return false +} + +func init() { + proto.RegisterType((*Duration)(nil), "grpc.lb.v1.Duration") + proto.RegisterType((*Timestamp)(nil), "grpc.lb.v1.Timestamp") + proto.RegisterType((*LoadBalanceRequest)(nil), "grpc.lb.v1.LoadBalanceRequest") + proto.RegisterType((*InitialLoadBalanceRequest)(nil), "grpc.lb.v1.InitialLoadBalanceRequest") + proto.RegisterType((*ClientStats)(nil), "grpc.lb.v1.ClientStats") + proto.RegisterType((*LoadBalanceResponse)(nil), "grpc.lb.v1.LoadBalanceResponse") + proto.RegisterType((*InitialLoadBalanceResponse)(nil), "grpc.lb.v1.InitialLoadBalanceResponse") + proto.RegisterType((*ServerList)(nil), "grpc.lb.v1.ServerList") + proto.RegisterType((*Server)(nil), "grpc.lb.v1.Server") +} + +func init() { proto.RegisterFile("grpc_lb_v1/messages/messages.proto", fileDescriptor0) } + +var fileDescriptor0 = []byte{ + // 709 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xdd, 0x4e, 0x1b, 0x3b, + 0x10, 0x26, 0x27, 0x01, 0x92, 0x09, 0x3a, 0xe4, 0x98, 0x1c, 0x08, 0x14, 0x24, 0xba, 0x52, 0x69, + 0x54, 0xd1, 0x20, 0xa0, 0xbd, 0xe8, 0xcf, 0x45, 0x1b, 0x10, 0x0a, 0x2d, 0x17, 0x95, 0x43, 0x55, + 0xa9, 0x52, 0x65, 0x39, 0xd9, 0x21, 0x58, 0x6c, 0xec, 0xad, 0xed, 0x04, 0xf5, 0x11, 0xfa, 0x28, + 0x7d, 0x8c, 0xaa, 0xcf, 0xd0, 0xf7, 0xa9, 0xd6, 0xbb, 0x9b, 0x5d, 0x20, 0x80, 0x7a, 0x67, 0x8f, + 0xbf, 0xf9, 0xbe, 0xf1, 0xac, 0xbf, 0x59, 0xf0, 0x06, 0x3a, 0xec, 0xb3, 0xa0, 0xc7, 0xc6, 0xbb, + 0x3b, 0x43, 0x34, 0x86, 0x0f, 0xd0, 0x4c, 0x16, 0xad, 0x50, 0x2b, 0xab, 0x08, 0x44, 0x98, 0x56, + 0xd0, 0x6b, 0x8d, 0x77, 0xbd, 0x97, 0x50, 0x3e, 0x1c, 0x69, 0x6e, 0x85, 0x92, 0xa4, 0x01, 0xf3, + 0x06, 0xfb, 0x4a, 0xfa, 0xa6, 0x51, 0xd8, 0x2c, 0x34, 0x8b, 0x34, 0xdd, 0x92, 0x3a, 0xcc, 0x4a, + 0x2e, 0x95, 0x69, 0xfc, 0xb3, 0x59, 0x68, 0xce, 0xd2, 0x78, 0xe3, 0xbd, 0x82, 0xca, 0xa9, 0x18, + 0xa2, 0xb1, 0x7c, 0x18, 0xfe, 0x75, 0xf2, 0xcf, 0x02, 0x90, 0x13, 0xc5, 0xfd, 0x36, 0x0f, 0xb8, + 0xec, 0x23, 0xc5, 0xaf, 0x23, 0x34, 0x96, 0x7c, 0x80, 0x45, 0x21, 0x85, 0x15, 0x3c, 0x60, 0x3a, + 0x0e, 0x39, 0xba, 0xea, 0xde, 0xa3, 0x56, 0x56, 0x75, 0xeb, 0x38, 0x86, 0xdc, 0xcc, 0xef, 0xcc, + 0xd0, 0x7f, 0x93, 0xfc, 0x94, 0xf1, 0x35, 0x2c, 0xf4, 0x03, 0x81, 0xd2, 0x32, 0x63, 0xb9, 0x8d, + 0xab, 0xa8, 0xee, 0xad, 0xe4, 0xe9, 0x0e, 0xdc, 0x79, 0x37, 0x3a, 0xee, 0xcc, 0xd0, 0x6a, 0x3f, + 0xdb, 0xb6, 0x1f, 0xc0, 0x6a, 0xa0, 0xb8, 0xcf, 0x7a, 0xb1, 0x4c, 0x5a, 0x14, 0xb3, 0xdf, 0x42, + 0xf4, 0x76, 0x60, 0xf5, 0xd6, 0x4a, 0x08, 0x81, 0x92, 0xe4, 0x43, 0x74, 0xe5, 0x57, 0xa8, 0x5b, + 0x7b, 0xdf, 0x4b, 0x50, 0xcd, 0x89, 0x91, 0x7d, 0xa8, 0xd8, 0xb4, 0x83, 0xc9, 0x3d, 0xff, 0xcf, + 0x17, 0x36, 0x69, 0x2f, 0xcd, 0x70, 0xe4, 0x09, 0xfc, 0x27, 0x47, 0x43, 0xd6, 0xe7, 0x41, 0x60, + 0xa2, 0x3b, 0x69, 0x8b, 0xbe, 0xbb, 0x55, 0x91, 0x2e, 0xca, 0xd1, 0xf0, 0x20, 0x8a, 0x77, 0xe3, + 0x30, 0xd9, 0x06, 0x92, 0x61, 0xcf, 0x84, 0x14, 0xe6, 0x1c, 0xfd, 0x46, 0xd1, 0x81, 0x6b, 0x29, + 0xf8, 0x28, 0x89, 0x13, 0x06, 0xad, 0x9b, 0x68, 0x76, 0x29, 0xec, 0x39, 0xf3, 0xb5, 0x0a, 0xd9, + 0x99, 0xd2, 0x4c, 0x73, 0x8b, 0x2c, 0x10, 0x43, 0x61, 0x85, 0x1c, 0x34, 0x4a, 0x8e, 0xe9, 0xf1, + 0x75, 0xa6, 0x4f, 0xc2, 0x9e, 0x1f, 0x6a, 0x15, 0x1e, 0x29, 0x4d, 0xb9, 0xc5, 0x93, 0x04, 0x4e, + 0x38, 0xec, 0xdc, 0x2b, 0x90, 0x6b, 0x77, 0xa4, 0x30, 0xeb, 0x14, 0x9a, 0x77, 0x28, 0x64, 0xbd, + 0x8f, 0x24, 0xbe, 0xc0, 0xd3, 0xdb, 0x24, 0x92, 0x67, 0x70, 0xc6, 0x45, 0x80, 0x3e, 0xb3, 0x8a, + 0x19, 0x94, 0x7e, 0x63, 0xce, 0x09, 0x6c, 0x4d, 0x13, 0x88, 0x3f, 0xd5, 0x91, 0xc3, 0x9f, 0xaa, + 0x2e, 0x4a, 0x9f, 0x74, 0xe0, 0xe1, 0x14, 0xfa, 0x0b, 0xa9, 0x2e, 0x25, 0xd3, 0xd8, 0x47, 0x31, + 0x46, 0xbf, 0x31, 0xef, 0x28, 0x37, 0xae, 0x53, 0xbe, 0x8f, 0x50, 0x34, 0x01, 0x79, 0xbf, 0x0a, + 0xb0, 0x74, 0xe5, 0xd9, 0x98, 0x50, 0x49, 0x83, 0xa4, 0x0b, 0xb5, 0xcc, 0x01, 0x71, 0x2c, 0x79, + 0x1a, 0x5b, 0xf7, 0x59, 0x20, 0x46, 0x77, 0x66, 0xe8, 0xe2, 0xc4, 0x03, 0x09, 0xe9, 0x0b, 0xa8, + 0x1a, 0xd4, 0x63, 0xd4, 0x2c, 0x10, 0xc6, 0x26, 0x1e, 0x58, 0xce, 0xf3, 0x75, 0xdd, 0xf1, 0x89, + 0x70, 0x1e, 0x02, 0x33, 0xd9, 0xb5, 0xd7, 0x61, 0xed, 0x9a, 0x03, 0x62, 0xce, 0xd8, 0x02, 0x3f, + 0x0a, 0xb0, 0x76, 0x7b, 0x29, 0xe4, 0x19, 0x2c, 0xe7, 0x93, 0x35, 0xf3, 0x31, 0xc0, 0x01, 0xb7, + 0xa9, 0x2d, 0xea, 0x41, 0x96, 0xa4, 0x0f, 0x93, 0x33, 0xf2, 0x11, 0xd6, 0xf3, 0x96, 0x65, 0x1a, + 0x43, 0xa5, 0x2d, 0x13, 0xd2, 0xa2, 0x1e, 0xf3, 0x20, 0x29, 0xbf, 0x9e, 0x2f, 0x3f, 0x1d, 0x62, + 0x74, 0x35, 0xe7, 0x5e, 0xea, 0xf2, 0x8e, 0x93, 0x34, 0xef, 0x0d, 0x40, 0x76, 0x4b, 0xb2, 0x1d, + 0x0d, 0xac, 0x68, 0x17, 0x0d, 0xac, 0x62, 0xb3, 0xba, 0x47, 0x6e, 0xb6, 0x83, 0xa6, 0x90, 0x77, + 0xa5, 0x72, 0xb1, 0x56, 0xf2, 0x7e, 0x17, 0x60, 0x2e, 0x3e, 0x21, 0x1b, 0x00, 0x22, 0x64, 0xdc, + 0xf7, 0x35, 0x9a, 0x78, 0xe4, 0x2d, 0xd0, 0x8a, 0x08, 0xdf, 0xc6, 0x81, 0xc8, 0xfd, 0x91, 0x76, + 0x32, 0xf3, 0xdc, 0x3a, 0x32, 0xe3, 0x95, 0x4e, 0x5a, 0x75, 0x81, 0xd2, 0x99, 0xb1, 0x42, 0x6b, + 0xb9, 0x46, 0x9c, 0x46, 0x71, 0xb2, 0x0f, 0xcb, 0x77, 0x98, 0xae, 0x4c, 0x97, 0xfc, 0x29, 0x06, + 0x7b, 0x0e, 0x2b, 0x77, 0x19, 0xa9, 0x4c, 0xeb, 0xfe, 0x14, 0xd3, 0xb4, 0xe1, 0x73, 0x39, 0xfd, + 0x47, 0xf4, 0xe6, 0xdc, 0x4f, 0x62, 0xff, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa3, 0x36, 0x86, + 0xa6, 0x4a, 0x06, 0x00, 0x00, +} diff --git a/vendor/google.golang.org/grpc/grpclb/grpc_lb_v1/messages/messages.proto b/vendor/google.golang.org/grpc/grpclb/grpc_lb_v1/messages/messages.proto new file mode 100644 index 000000000..2ed04551f --- /dev/null +++ b/vendor/google.golang.org/grpc/grpclb/grpc_lb_v1/messages/messages.proto @@ -0,0 +1,155 @@ +// Copyright 2016 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grpc.lb.v1; +option go_package = "messages"; + +message Duration { + // Signed seconds of the span of time. Must be from -315,576,000,000 + // to +315,576,000,000 inclusive. + int64 seconds = 1; + + // Signed fractions of a second at nanosecond resolution of the span + // of time. Durations less than one second are represented with a 0 + // `seconds` field and a positive or negative `nanos` field. For durations + // of one second or more, a non-zero value for the `nanos` field must be + // of the same sign as the `seconds` field. Must be from -999,999,999 + // to +999,999,999 inclusive. + int32 nanos = 2; +} + +message Timestamp { + // Represents seconds of UTC time since Unix epoch + // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + // 9999-12-31T23:59:59Z inclusive. + int64 seconds = 1; + + // Non-negative fractions of a second at nanosecond resolution. Negative + // second values with fractions must still have non-negative nanos values + // that count forward in time. Must be from 0 to 999,999,999 + // inclusive. + int32 nanos = 2; +} + +message LoadBalanceRequest { + oneof load_balance_request_type { + // This message should be sent on the first request to the load balancer. + InitialLoadBalanceRequest initial_request = 1; + + // The client stats should be periodically reported to the load balancer + // based on the duration defined in the InitialLoadBalanceResponse. + ClientStats client_stats = 2; + } +} + +message InitialLoadBalanceRequest { + // Name of load balanced service (IE, balancer.service.com) + // length should be less than 256 bytes. + string name = 1; +} + +// Contains client level statistics that are useful to load balancing. Each +// count except the timestamp should be reset to zero after reporting the stats. +message ClientStats { + // The timestamp of generating the report. + Timestamp timestamp = 1; + + // The total number of RPCs that started. + int64 num_calls_started = 2; + + // The total number of RPCs that finished. + int64 num_calls_finished = 3; + + // The total number of RPCs that were dropped by the client because of rate + // limiting. + int64 num_calls_finished_with_drop_for_rate_limiting = 4; + + // The total number of RPCs that were dropped by the client because of load + // balancing. + int64 num_calls_finished_with_drop_for_load_balancing = 5; + + // The total number of RPCs that failed to reach a server except dropped RPCs. + int64 num_calls_finished_with_client_failed_to_send = 6; + + // The total number of RPCs that finished and are known to have been received + // by a server. + int64 num_calls_finished_known_received = 7; +} + +message LoadBalanceResponse { + oneof load_balance_response_type { + // This message should be sent on the first response to the client. + InitialLoadBalanceResponse initial_response = 1; + + // Contains the list of servers selected by the load balancer. The client + // should send requests to these servers in the specified order. + ServerList server_list = 2; + } +} + +message InitialLoadBalanceResponse { + // This is an application layer redirect that indicates the client should use + // the specified server for load balancing. When this field is non-empty in + // the response, the client should open a separate connection to the + // load_balancer_delegate and call the BalanceLoad method. Its length should + // be less than 64 bytes. + string load_balancer_delegate = 1; + + // This interval defines how often the client should send the client stats + // to the load balancer. Stats should only be reported when the duration is + // positive. + Duration client_stats_report_interval = 2; +} + +message ServerList { + // Contains a list of servers selected by the load balancer. The list will + // be updated when server resolutions change or as needed to balance load + // across more servers. The client should consume the server list in order + // unless instructed otherwise via the client_config. + repeated Server servers = 1; + + // Was google.protobuf.Duration expiration_interval. + reserved 3; +} + +// Contains server information. When none of the [drop_for_*] fields are true, +// use the other fields. When drop_for_rate_limiting is true, ignore all other +// fields. Use drop_for_load_balancing only when it is true and +// drop_for_rate_limiting is false. +message Server { + // A resolved address for the server, serialized in network-byte-order. It may + // either be an IPv4 or IPv6 address. + bytes ip_address = 1; + + // A resolved port number for the server. + int32 port = 2; + + // An opaque but printable token given to the frontend for each pick. All + // frontend requests for that pick must include the token in its initial + // metadata. The token is used by the backend to verify the request and to + // allow the backend to report load to the gRPC LB system. + // + // Its length is variable but less than 50 bytes. + string load_balance_token = 3; + + // Indicates whether this particular request should be dropped by the client + // for rate limiting. + bool drop_for_rate_limiting = 4; + + // Indicates whether this particular request should be dropped by the client + // for load balancing. + bool drop_for_load_balancing = 5; +} diff --git a/vendor/google.golang.org/grpc/grpclb/grpclb_test.go b/vendor/google.golang.org/grpc/grpclb/grpclb_test.go new file mode 100644 index 000000000..fd861af11 --- /dev/null +++ b/vendor/google.golang.org/grpc/grpclb/grpclb_test.go @@ -0,0 +1,867 @@ +/* + * + * Copyright 2016 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +//go:generate protoc --go_out=plugins=:. grpc_lb_v1/messages/messages.proto +//go:generate protoc --go_out=Mgrpc_lb_v1/messages/messages.proto=google.golang.org/grpc/grpclb/grpc_lb_v1/messages,plugins=grpc:. grpc_lb_v1/service/service.proto + +// Package grpclb_test is currently used only for grpclb testing. +package grpclb_test + +import ( + "errors" + "fmt" + "io" + "net" + "strings" + "sync" + "testing" + "time" + + "github.com/golang/protobuf/proto" + "golang.org/x/net/context" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/credentials" + lbmpb "google.golang.org/grpc/grpclb/grpc_lb_v1/messages" + lbspb "google.golang.org/grpc/grpclb/grpc_lb_v1/service" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/naming" + testpb "google.golang.org/grpc/test/grpc_testing" +) + +var ( + lbsn = "bar.com" + besn = "foo.com" + lbToken = "iamatoken" + + // Resolver replaces localhost with fakeName in Next(). + // Dialer replaces fakeName with localhost when dialing. + // This will test that custom dialer is passed from Dial to grpclb. + fakeName = "fake.Name" +) + +type testWatcher struct { + // the channel to receives name resolution updates + update chan *naming.Update + // the side channel to get to know how many updates in a batch + side chan int + // the channel to notifiy update injector that the update reading is done + readDone chan int +} + +func (w *testWatcher) Next() (updates []*naming.Update, err error) { + n, ok := <-w.side + if !ok { + return nil, fmt.Errorf("w.side is closed") + } + for i := 0; i < n; i++ { + u, ok := <-w.update + if !ok { + break + } + if u != nil { + // Resolver replaces localhost with fakeName in Next(). + // Custom dialer will replace fakeName with localhost when dialing. + u.Addr = strings.Replace(u.Addr, "localhost", fakeName, 1) + updates = append(updates, u) + } + } + w.readDone <- 0 + return +} + +func (w *testWatcher) Close() { +} + +// Inject naming resolution updates to the testWatcher. +func (w *testWatcher) inject(updates []*naming.Update) { + w.side <- len(updates) + for _, u := range updates { + w.update <- u + } + <-w.readDone +} + +type testNameResolver struct { + w *testWatcher + addrs []string +} + +func (r *testNameResolver) Resolve(target string) (naming.Watcher, error) { + r.w = &testWatcher{ + update: make(chan *naming.Update, len(r.addrs)), + side: make(chan int, 1), + readDone: make(chan int), + } + r.w.side <- len(r.addrs) + for _, addr := range r.addrs { + r.w.update <- &naming.Update{ + Op: naming.Add, + Addr: addr, + Metadata: &naming.AddrMetadataGRPCLB{ + AddrType: naming.GRPCLB, + ServerName: lbsn, + }, + } + } + go func() { + <-r.w.readDone + }() + return r.w, nil +} + +func (r *testNameResolver) inject(updates []*naming.Update) { + if r.w != nil { + r.w.inject(updates) + } +} + +type serverNameCheckCreds struct { + mu sync.Mutex + sn string + expected string +} + +func (c *serverNameCheckCreds) ServerHandshake(rawConn net.Conn) (net.Conn, credentials.AuthInfo, error) { + if _, err := io.WriteString(rawConn, c.sn); err != nil { + fmt.Printf("Failed to write the server name %s to the client %v", c.sn, err) + return nil, nil, err + } + return rawConn, nil, nil +} +func (c *serverNameCheckCreds) ClientHandshake(ctx context.Context, addr string, rawConn net.Conn) (net.Conn, credentials.AuthInfo, error) { + c.mu.Lock() + defer c.mu.Unlock() + b := make([]byte, len(c.expected)) + if _, err := rawConn.Read(b); err != nil { + fmt.Printf("Failed to read the server name from the server %v", err) + return nil, nil, err + } + if c.expected != string(b) { + fmt.Printf("Read the server name %s want %s", string(b), c.expected) + return nil, nil, errors.New("received unexpected server name") + } + return rawConn, nil, nil +} +func (c *serverNameCheckCreds) Info() credentials.ProtocolInfo { + c.mu.Lock() + defer c.mu.Unlock() + return credentials.ProtocolInfo{} +} +func (c *serverNameCheckCreds) Clone() credentials.TransportCredentials { + c.mu.Lock() + defer c.mu.Unlock() + return &serverNameCheckCreds{ + expected: c.expected, + } +} +func (c *serverNameCheckCreds) OverrideServerName(s string) error { + c.mu.Lock() + defer c.mu.Unlock() + c.expected = s + return nil +} + +// fakeNameDialer replaces fakeName with localhost when dialing. +// This will test that custom dialer is passed from Dial to grpclb. +func fakeNameDialer(addr string, timeout time.Duration) (net.Conn, error) { + addr = strings.Replace(addr, fakeName, "localhost", 1) + return net.DialTimeout("tcp", addr, timeout) +} + +type remoteBalancer struct { + sls []*lbmpb.ServerList + intervals []time.Duration + statsDura time.Duration + done chan struct{} + mu sync.Mutex + stats lbmpb.ClientStats +} + +func newRemoteBalancer(sls []*lbmpb.ServerList, intervals []time.Duration) *remoteBalancer { + return &remoteBalancer{ + sls: sls, + intervals: intervals, + done: make(chan struct{}), + } +} + +func (b *remoteBalancer) stop() { + close(b.done) +} + +func (b *remoteBalancer) BalanceLoad(stream lbspb.LoadBalancer_BalanceLoadServer) error { + req, err := stream.Recv() + if err != nil { + return err + } + initReq := req.GetInitialRequest() + if initReq.Name != besn { + return grpc.Errorf(codes.InvalidArgument, "invalid service name: %v", initReq.Name) + } + resp := &lbmpb.LoadBalanceResponse{ + LoadBalanceResponseType: &lbmpb.LoadBalanceResponse_InitialResponse{ + InitialResponse: &lbmpb.InitialLoadBalanceResponse{ + ClientStatsReportInterval: &lbmpb.Duration{ + Seconds: int64(b.statsDura.Seconds()), + Nanos: int32(b.statsDura.Nanoseconds() - int64(b.statsDura.Seconds())*1e9), + }, + }, + }, + } + if err := stream.Send(resp); err != nil { + return err + } + go func() { + for { + var ( + req *lbmpb.LoadBalanceRequest + err error + ) + if req, err = stream.Recv(); err != nil { + return + } + b.mu.Lock() + b.stats.NumCallsStarted += req.GetClientStats().NumCallsStarted + b.stats.NumCallsFinished += req.GetClientStats().NumCallsFinished + b.stats.NumCallsFinishedWithDropForRateLimiting += req.GetClientStats().NumCallsFinishedWithDropForRateLimiting + b.stats.NumCallsFinishedWithDropForLoadBalancing += req.GetClientStats().NumCallsFinishedWithDropForLoadBalancing + b.stats.NumCallsFinishedWithClientFailedToSend += req.GetClientStats().NumCallsFinishedWithClientFailedToSend + b.stats.NumCallsFinishedKnownReceived += req.GetClientStats().NumCallsFinishedKnownReceived + b.mu.Unlock() + } + }() + for k, v := range b.sls { + time.Sleep(b.intervals[k]) + resp = &lbmpb.LoadBalanceResponse{ + LoadBalanceResponseType: &lbmpb.LoadBalanceResponse_ServerList{ + ServerList: v, + }, + } + if err := stream.Send(resp); err != nil { + return err + } + } + <-b.done + return nil +} + +type testServer struct { + testpb.TestServiceServer + + addr string +} + +const testmdkey = "testmd" + +func (s *testServer) EmptyCall(ctx context.Context, in *testpb.Empty) (*testpb.Empty, error) { + md, ok := metadata.FromIncomingContext(ctx) + if !ok { + return nil, grpc.Errorf(codes.Internal, "failed to receive metadata") + } + if md == nil || md["lb-token"][0] != lbToken { + return nil, grpc.Errorf(codes.Internal, "received unexpected metadata: %v", md) + } + grpc.SetTrailer(ctx, metadata.Pairs(testmdkey, s.addr)) + return &testpb.Empty{}, nil +} + +func (s *testServer) FullDuplexCall(stream testpb.TestService_FullDuplexCallServer) error { + return nil +} + +func startBackends(sn string, lis ...net.Listener) (servers []*grpc.Server) { + for _, l := range lis { + creds := &serverNameCheckCreds{ + sn: sn, + } + s := grpc.NewServer(grpc.Creds(creds)) + testpb.RegisterTestServiceServer(s, &testServer{addr: l.Addr().String()}) + servers = append(servers, s) + go func(s *grpc.Server, l net.Listener) { + s.Serve(l) + }(s, l) + } + return +} + +func stopBackends(servers []*grpc.Server) { + for _, s := range servers { + s.Stop() + } +} + +type testServers struct { + lbAddr string + ls *remoteBalancer + lb *grpc.Server + beIPs []net.IP + bePorts []int +} + +func newLoadBalancer(numberOfBackends int) (tss *testServers, cleanup func(), err error) { + var ( + beListeners []net.Listener + ls *remoteBalancer + lb *grpc.Server + beIPs []net.IP + bePorts []int + ) + for i := 0; i < numberOfBackends; i++ { + // Start a backend. + beLis, e := net.Listen("tcp", "localhost:0") + if e != nil { + err = fmt.Errorf("Failed to listen %v", err) + return + } + beIPs = append(beIPs, beLis.Addr().(*net.TCPAddr).IP) + bePorts = append(bePorts, beLis.Addr().(*net.TCPAddr).Port) + + beListeners = append(beListeners, beLis) + } + backends := startBackends(besn, beListeners...) + + // Start a load balancer. + lbLis, err := net.Listen("tcp", "localhost:0") + if err != nil { + err = fmt.Errorf("Failed to create the listener for the load balancer %v", err) + return + } + lbCreds := &serverNameCheckCreds{ + sn: lbsn, + } + lb = grpc.NewServer(grpc.Creds(lbCreds)) + if err != nil { + err = fmt.Errorf("Failed to generate the port number %v", err) + return + } + ls = newRemoteBalancer(nil, nil) + lbspb.RegisterLoadBalancerServer(lb, ls) + go func() { + lb.Serve(lbLis) + }() + + tss = &testServers{ + lbAddr: lbLis.Addr().String(), + ls: ls, + lb: lb, + beIPs: beIPs, + bePorts: bePorts, + } + cleanup = func() { + defer stopBackends(backends) + defer func() { + ls.stop() + lb.Stop() + }() + } + return +} + +func TestGRPCLB(t *testing.T) { + tss, cleanup, err := newLoadBalancer(1) + if err != nil { + t.Fatalf("failed to create new load balancer: %v", err) + } + defer cleanup() + + be := &lbmpb.Server{ + IpAddress: tss.beIPs[0], + Port: int32(tss.bePorts[0]), + LoadBalanceToken: lbToken, + } + var bes []*lbmpb.Server + bes = append(bes, be) + sl := &lbmpb.ServerList{ + Servers: bes, + } + tss.ls.sls = []*lbmpb.ServerList{sl} + tss.ls.intervals = []time.Duration{0} + creds := serverNameCheckCreds{ + expected: besn, + } + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + cc, err := grpc.DialContext(ctx, besn, + grpc.WithBalancer(grpc.NewGRPCLBBalancer(&testNameResolver{addrs: []string{tss.lbAddr}})), + grpc.WithBlock(), grpc.WithTransportCredentials(&creds), grpc.WithDialer(fakeNameDialer)) + if err != nil { + t.Fatalf("Failed to dial to the backend %v", err) + } + testC := testpb.NewTestServiceClient(cc) + if _, err := testC.EmptyCall(context.Background(), &testpb.Empty{}); err != nil { + t.Fatalf("%v.EmptyCall(_, _) = _, %v, want _, <nil>", testC, err) + } + cc.Close() +} + +func TestDropRequest(t *testing.T) { + tss, cleanup, err := newLoadBalancer(2) + if err != nil { + t.Fatalf("failed to create new load balancer: %v", err) + } + defer cleanup() + tss.ls.sls = []*lbmpb.ServerList{{ + Servers: []*lbmpb.Server{{ + IpAddress: tss.beIPs[0], + Port: int32(tss.bePorts[0]), + LoadBalanceToken: lbToken, + DropForLoadBalancing: true, + }, { + IpAddress: tss.beIPs[1], + Port: int32(tss.bePorts[1]), + LoadBalanceToken: lbToken, + DropForLoadBalancing: false, + }}, + }} + tss.ls.intervals = []time.Duration{0} + creds := serverNameCheckCreds{ + expected: besn, + } + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + cc, err := grpc.DialContext(ctx, besn, + grpc.WithBalancer(grpc.NewGRPCLBBalancer(&testNameResolver{addrs: []string{tss.lbAddr}})), + grpc.WithBlock(), grpc.WithTransportCredentials(&creds), grpc.WithDialer(fakeNameDialer)) + if err != nil { + t.Fatalf("Failed to dial to the backend %v", err) + } + testC := testpb.NewTestServiceClient(cc) + // The 1st, non-fail-fast RPC should succeed. This ensures both server + // connections are made, because the first one has DropForLoadBalancing set to true. + if _, err := testC.EmptyCall(context.Background(), &testpb.Empty{}, grpc.FailFast(false)); err != nil { + t.Fatalf("%v.SayHello(_, _) = _, %v, want _, <nil>", testC, err) + } + for i := 0; i < 3; i++ { + // Odd fail-fast RPCs should fail, because the 1st backend has DropForLoadBalancing + // set to true. + if _, err := testC.EmptyCall(context.Background(), &testpb.Empty{}); grpc.Code(err) != codes.Unavailable { + t.Fatalf("%v.EmptyCall(_, _) = _, %v, want _, %s", testC, err, codes.Unavailable) + } + // Even fail-fast RPCs should succeed since they choose the + // non-drop-request backend according to the round robin policy. + if _, err := testC.EmptyCall(context.Background(), &testpb.Empty{}); err != nil { + t.Fatalf("%v.EmptyCall(_, _) = _, %v, want _, <nil>", testC, err) + } + } + cc.Close() +} + +func TestDropRequestFailedNonFailFast(t *testing.T) { + tss, cleanup, err := newLoadBalancer(1) + if err != nil { + t.Fatalf("failed to create new load balancer: %v", err) + } + defer cleanup() + be := &lbmpb.Server{ + IpAddress: tss.beIPs[0], + Port: int32(tss.bePorts[0]), + LoadBalanceToken: lbToken, + DropForLoadBalancing: true, + } + var bes []*lbmpb.Server + bes = append(bes, be) + sl := &lbmpb.ServerList{ + Servers: bes, + } + tss.ls.sls = []*lbmpb.ServerList{sl} + tss.ls.intervals = []time.Duration{0} + creds := serverNameCheckCreds{ + expected: besn, + } + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + cc, err := grpc.DialContext(ctx, besn, + grpc.WithBalancer(grpc.NewGRPCLBBalancer(&testNameResolver{addrs: []string{tss.lbAddr}})), + grpc.WithBlock(), grpc.WithTransportCredentials(&creds), grpc.WithDialer(fakeNameDialer)) + if err != nil { + t.Fatalf("Failed to dial to the backend %v", err) + } + testC := testpb.NewTestServiceClient(cc) + ctx, cancel = context.WithTimeout(context.Background(), 10*time.Millisecond) + defer cancel() + if _, err := testC.EmptyCall(ctx, &testpb.Empty{}, grpc.FailFast(false)); grpc.Code(err) != codes.DeadlineExceeded { + t.Fatalf("%v.EmptyCall(_, _) = _, %v, want _, %s", testC, err, codes.DeadlineExceeded) + } + cc.Close() +} + +// When the balancer in use disconnects, grpclb should connect to the next address from resolved balancer address list. +func TestBalancerDisconnects(t *testing.T) { + var ( + lbAddrs []string + lbs []*grpc.Server + ) + for i := 0; i < 3; i++ { + tss, cleanup, err := newLoadBalancer(1) + if err != nil { + t.Fatalf("failed to create new load balancer: %v", err) + } + defer cleanup() + + be := &lbmpb.Server{ + IpAddress: tss.beIPs[0], + Port: int32(tss.bePorts[0]), + LoadBalanceToken: lbToken, + } + var bes []*lbmpb.Server + bes = append(bes, be) + sl := &lbmpb.ServerList{ + Servers: bes, + } + tss.ls.sls = []*lbmpb.ServerList{sl} + tss.ls.intervals = []time.Duration{0} + + lbAddrs = append(lbAddrs, tss.lbAddr) + lbs = append(lbs, tss.lb) + } + + creds := serverNameCheckCreds{ + expected: besn, + } + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + resolver := &testNameResolver{ + addrs: lbAddrs[:2], + } + cc, err := grpc.DialContext(ctx, besn, + grpc.WithBalancer(grpc.NewGRPCLBBalancer(resolver)), + grpc.WithBlock(), grpc.WithTransportCredentials(&creds), grpc.WithDialer(fakeNameDialer)) + if err != nil { + t.Fatalf("Failed to dial to the backend %v", err) + } + testC := testpb.NewTestServiceClient(cc) + var previousTrailer string + trailer := metadata.MD{} + if _, err := testC.EmptyCall(context.Background(), &testpb.Empty{}, grpc.Trailer(&trailer), grpc.FailFast(false)); err != nil { + t.Fatalf("%v.EmptyCall(_, _) = _, %v, want _, <nil>", testC, err) + } else { + previousTrailer = trailer[testmdkey][0] + } + // The initial resolver update contains lbs[0] and lbs[1]. + // When lbs[0] is stopped, lbs[1] should be used. + lbs[0].Stop() + for { + if _, err := testC.EmptyCall(context.Background(), &testpb.Empty{}, grpc.Trailer(&trailer), grpc.FailFast(false)); err != nil { + t.Fatalf("%v.EmptyCall(_, _) = _, %v, want _, <nil>", testC, err) + } else if trailer[testmdkey][0] != previousTrailer { + // A new backend server should receive the request. + // The trailer contains the backend address, so the trailer should be different from the previous one. + previousTrailer = trailer[testmdkey][0] + break + } + time.Sleep(100 * time.Millisecond) + } + // Inject a update to add lbs[2] to resolved addresses. + resolver.inject([]*naming.Update{ + {Op: naming.Add, + Addr: lbAddrs[2], + Metadata: &naming.AddrMetadataGRPCLB{ + AddrType: naming.GRPCLB, + ServerName: lbsn, + }, + }, + }) + // Stop lbs[1]. Now lbs[0] and lbs[1] are all stopped. lbs[2] should be used. + lbs[1].Stop() + for { + if _, err := testC.EmptyCall(context.Background(), &testpb.Empty{}, grpc.Trailer(&trailer), grpc.FailFast(false)); err != nil { + t.Fatalf("%v.EmptyCall(_, _) = _, %v, want _, <nil>", testC, err) + } else if trailer[testmdkey][0] != previousTrailer { + // A new backend server should receive the request. + // The trailer contains the backend address, so the trailer should be different from the previous one. + break + } + time.Sleep(100 * time.Millisecond) + } + cc.Close() +} + +type failPreRPCCred struct{} + +func (failPreRPCCred) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error) { + if strings.Contains(uri[0], "failtosend") { + return nil, fmt.Errorf("rpc should fail to send") + } + return nil, nil +} + +func (failPreRPCCred) RequireTransportSecurity() bool { + return false +} + +func checkStats(stats *lbmpb.ClientStats, expected *lbmpb.ClientStats) error { + if !proto.Equal(stats, expected) { + return fmt.Errorf("stats not equal: got %+v, want %+v", stats, expected) + } + return nil +} + +func runAndGetStats(t *testing.T, dropForLoadBalancing, dropForRateLimiting bool, runRPCs func(*grpc.ClientConn)) lbmpb.ClientStats { + tss, cleanup, err := newLoadBalancer(3) + if err != nil { + t.Fatalf("failed to create new load balancer: %v", err) + } + defer cleanup() + tss.ls.sls = []*lbmpb.ServerList{{ + Servers: []*lbmpb.Server{{ + IpAddress: tss.beIPs[2], + Port: int32(tss.bePorts[2]), + LoadBalanceToken: lbToken, + DropForLoadBalancing: dropForLoadBalancing, + DropForRateLimiting: dropForRateLimiting, + }}, + }} + tss.ls.intervals = []time.Duration{0} + tss.ls.statsDura = 100 * time.Millisecond + creds := serverNameCheckCreds{expected: besn} + + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + cc, err := grpc.DialContext(ctx, besn, + grpc.WithBalancer(grpc.NewGRPCLBBalancer(&testNameResolver{addrs: []string{tss.lbAddr}})), + grpc.WithTransportCredentials(&creds), grpc.WithPerRPCCredentials(failPreRPCCred{}), + grpc.WithBlock(), grpc.WithDialer(fakeNameDialer)) + if err != nil { + t.Fatalf("Failed to dial to the backend %v", err) + } + defer cc.Close() + + runRPCs(cc) + time.Sleep(1 * time.Second) + tss.ls.mu.Lock() + stats := tss.ls.stats + tss.ls.mu.Unlock() + return stats +} + +const countRPC = 40 + +func TestGRPCLBStatsUnarySuccess(t *testing.T) { + stats := runAndGetStats(t, false, false, func(cc *grpc.ClientConn) { + testC := testpb.NewTestServiceClient(cc) + // The first non-failfast RPC succeeds, all connections are up. + if _, err := testC.EmptyCall(context.Background(), &testpb.Empty{}, grpc.FailFast(false)); err != nil { + t.Fatalf("%v.EmptyCall(_, _) = _, %v, want _, <nil>", testC, err) + } + for i := 0; i < countRPC-1; i++ { + testC.EmptyCall(context.Background(), &testpb.Empty{}) + } + }) + + if err := checkStats(&stats, &lbmpb.ClientStats{ + NumCallsStarted: int64(countRPC), + NumCallsFinished: int64(countRPC), + NumCallsFinishedKnownReceived: int64(countRPC), + }); err != nil { + t.Fatal(err) + } +} + +func TestGRPCLBStatsUnaryDropLoadBalancing(t *testing.T) { + c := 0 + stats := runAndGetStats(t, true, false, func(cc *grpc.ClientConn) { + testC := testpb.NewTestServiceClient(cc) + for { + c++ + if _, err := testC.EmptyCall(context.Background(), &testpb.Empty{}); err != nil { + if strings.Contains(err.Error(), "drops requests") { + break + } + } + } + for i := 0; i < countRPC; i++ { + testC.EmptyCall(context.Background(), &testpb.Empty{}) + } + }) + + if err := checkStats(&stats, &lbmpb.ClientStats{ + NumCallsStarted: int64(countRPC + c), + NumCallsFinished: int64(countRPC + c), + NumCallsFinishedWithDropForLoadBalancing: int64(countRPC + 1), + NumCallsFinishedWithClientFailedToSend: int64(c - 1), + }); err != nil { + t.Fatal(err) + } +} + +func TestGRPCLBStatsUnaryDropRateLimiting(t *testing.T) { + c := 0 + stats := runAndGetStats(t, false, true, func(cc *grpc.ClientConn) { + testC := testpb.NewTestServiceClient(cc) + for { + c++ + if _, err := testC.EmptyCall(context.Background(), &testpb.Empty{}); err != nil { + if strings.Contains(err.Error(), "drops requests") { + break + } + } + } + for i := 0; i < countRPC; i++ { + testC.EmptyCall(context.Background(), &testpb.Empty{}) + } + }) + + if err := checkStats(&stats, &lbmpb.ClientStats{ + NumCallsStarted: int64(countRPC + c), + NumCallsFinished: int64(countRPC + c), + NumCallsFinishedWithDropForRateLimiting: int64(countRPC + 1), + NumCallsFinishedWithClientFailedToSend: int64(c - 1), + }); err != nil { + t.Fatal(err) + } +} + +func TestGRPCLBStatsUnaryFailedToSend(t *testing.T) { + stats := runAndGetStats(t, false, false, func(cc *grpc.ClientConn) { + testC := testpb.NewTestServiceClient(cc) + // The first non-failfast RPC succeeds, all connections are up. + if _, err := testC.EmptyCall(context.Background(), &testpb.Empty{}, grpc.FailFast(false)); err != nil { + t.Fatalf("%v.EmptyCall(_, _) = _, %v, want _, <nil>", testC, err) + } + for i := 0; i < countRPC-1; i++ { + grpc.Invoke(context.Background(), "failtosend", &testpb.Empty{}, nil, cc) + } + }) + + if err := checkStats(&stats, &lbmpb.ClientStats{ + NumCallsStarted: int64(countRPC), + NumCallsFinished: int64(countRPC), + NumCallsFinishedWithClientFailedToSend: int64(countRPC - 1), + NumCallsFinishedKnownReceived: 1, + }); err != nil { + t.Fatal(err) + } +} + +func TestGRPCLBStatsStreamingSuccess(t *testing.T) { + stats := runAndGetStats(t, false, false, func(cc *grpc.ClientConn) { + testC := testpb.NewTestServiceClient(cc) + // The first non-failfast RPC succeeds, all connections are up. + stream, err := testC.FullDuplexCall(context.Background(), grpc.FailFast(false)) + if err != nil { + t.Fatalf("%v.FullDuplexCall(_, _) = _, %v, want _, <nil>", testC, err) + } + for { + if _, err = stream.Recv(); err == io.EOF { + break + } + } + for i := 0; i < countRPC-1; i++ { + stream, err = testC.FullDuplexCall(context.Background()) + if err == nil { + // Wait for stream to end if err is nil. + for { + if _, err = stream.Recv(); err == io.EOF { + break + } + } + } + } + }) + + if err := checkStats(&stats, &lbmpb.ClientStats{ + NumCallsStarted: int64(countRPC), + NumCallsFinished: int64(countRPC), + NumCallsFinishedKnownReceived: int64(countRPC), + }); err != nil { + t.Fatal(err) + } +} + +func TestGRPCLBStatsStreamingDropLoadBalancing(t *testing.T) { + c := 0 + stats := runAndGetStats(t, true, false, func(cc *grpc.ClientConn) { + testC := testpb.NewTestServiceClient(cc) + for { + c++ + if _, err := testC.EmptyCall(context.Background(), &testpb.Empty{}); err != nil { + if strings.Contains(err.Error(), "drops requests") { + break + } + } + } + for i := 0; i < countRPC; i++ { + testC.FullDuplexCall(context.Background()) + } + }) + + if err := checkStats(&stats, &lbmpb.ClientStats{ + NumCallsStarted: int64(countRPC + c), + NumCallsFinished: int64(countRPC + c), + NumCallsFinishedWithDropForLoadBalancing: int64(countRPC + 1), + NumCallsFinishedWithClientFailedToSend: int64(c - 1), + }); err != nil { + t.Fatal(err) + } +} + +func TestGRPCLBStatsStreamingDropRateLimiting(t *testing.T) { + c := 0 + stats := runAndGetStats(t, false, true, func(cc *grpc.ClientConn) { + testC := testpb.NewTestServiceClient(cc) + for { + c++ + if _, err := testC.EmptyCall(context.Background(), &testpb.Empty{}); err != nil { + if strings.Contains(err.Error(), "drops requests") { + break + } + } + } + for i := 0; i < countRPC; i++ { + testC.FullDuplexCall(context.Background()) + } + }) + + if err := checkStats(&stats, &lbmpb.ClientStats{ + NumCallsStarted: int64(countRPC + c), + NumCallsFinished: int64(countRPC + c), + NumCallsFinishedWithDropForRateLimiting: int64(countRPC + 1), + NumCallsFinishedWithClientFailedToSend: int64(c - 1), + }); err != nil { + t.Fatal(err) + } +} + +func TestGRPCLBStatsStreamingFailedToSend(t *testing.T) { + stats := runAndGetStats(t, false, false, func(cc *grpc.ClientConn) { + testC := testpb.NewTestServiceClient(cc) + // The first non-failfast RPC succeeds, all connections are up. + stream, err := testC.FullDuplexCall(context.Background(), grpc.FailFast(false)) + if err != nil { + t.Fatalf("%v.FullDuplexCall(_, _) = _, %v, want _, <nil>", testC, err) + } + for { + if _, err = stream.Recv(); err == io.EOF { + break + } + } + for i := 0; i < countRPC-1; i++ { + grpc.NewClientStream(context.Background(), &grpc.StreamDesc{}, cc, "failtosend") + } + }) + + if err := checkStats(&stats, &lbmpb.ClientStats{ + NumCallsStarted: int64(countRPC), + NumCallsFinished: int64(countRPC), + NumCallsFinishedWithClientFailedToSend: int64(countRPC - 1), + NumCallsFinishedKnownReceived: 1, + }); err != nil { + t.Fatal(err) + } +} diff --git a/vendor/google.golang.org/grpc/grpclog/grpclog.go b/vendor/google.golang.org/grpc/grpclog/grpclog.go new file mode 100644 index 000000000..16a7d8886 --- /dev/null +++ b/vendor/google.golang.org/grpc/grpclog/grpclog.go @@ -0,0 +1,123 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Package grpclog defines logging for grpc. +// +// All logs in transport package only go to verbose level 2. +// All logs in other packages in grpc are logged in spite of the verbosity level. +// +// In the default logger, +// severity level can be set by environment variable GRPC_GO_LOG_SEVERITY_LEVEL, +// verbosity level can be set by GRPC_GO_LOG_VERBOSITY_LEVEL. +package grpclog // import "google.golang.org/grpc/grpclog" + +import "os" + +var logger = newLoggerV2() + +// V reports whether verbosity level l is at least the requested verbose level. +func V(l int) bool { + return logger.V(l) +} + +// Info logs to the INFO log. +func Info(args ...interface{}) { + logger.Info(args...) +} + +// Infof logs to the INFO log. Arguments are handled in the manner of fmt.Printf. +func Infof(format string, args ...interface{}) { + logger.Infof(format, args...) +} + +// Infoln logs to the INFO log. Arguments are handled in the manner of fmt.Println. +func Infoln(args ...interface{}) { + logger.Infoln(args...) +} + +// Warning logs to the WARNING log. +func Warning(args ...interface{}) { + logger.Warning(args...) +} + +// Warningf logs to the WARNING log. Arguments are handled in the manner of fmt.Printf. +func Warningf(format string, args ...interface{}) { + logger.Warningf(format, args...) +} + +// Warningln logs to the WARNING log. Arguments are handled in the manner of fmt.Println. +func Warningln(args ...interface{}) { + logger.Warningln(args...) +} + +// Error logs to the ERROR log. +func Error(args ...interface{}) { + logger.Error(args...) +} + +// Errorf logs to the ERROR log. Arguments are handled in the manner of fmt.Printf. +func Errorf(format string, args ...interface{}) { + logger.Errorf(format, args...) +} + +// Errorln logs to the ERROR log. Arguments are handled in the manner of fmt.Println. +func Errorln(args ...interface{}) { + logger.Errorln(args...) +} + +// Fatal logs to the FATAL log. Arguments are handled in the manner of fmt.Print. +// It calls os.Exit() with exit code 1. +func Fatal(args ...interface{}) { + logger.Fatal(args...) + // Make sure fatal logs will exit. + os.Exit(1) +} + +// Fatalf logs to the FATAL log. Arguments are handled in the manner of fmt.Printf. +// It calles os.Exit() with exit code 1. +func Fatalf(format string, args ...interface{}) { + logger.Fatalf(format, args...) + // Make sure fatal logs will exit. + os.Exit(1) +} + +// Fatalln logs to the FATAL log. Arguments are handled in the manner of fmt.Println. +// It calle os.Exit()) with exit code 1. +func Fatalln(args ...interface{}) { + logger.Fatalln(args...) + // Make sure fatal logs will exit. + os.Exit(1) +} + +// Print prints to the logger. Arguments are handled in the manner of fmt.Print. +// Deprecated: use Info. +func Print(args ...interface{}) { + logger.Info(args...) +} + +// Printf prints to the logger. Arguments are handled in the manner of fmt.Printf. +// Deprecated: use Infof. +func Printf(format string, args ...interface{}) { + logger.Infof(format, args...) +} + +// Println prints to the logger. Arguments are handled in the manner of fmt.Println. +// Deprecated: use Infoln. +func Println(args ...interface{}) { + logger.Infoln(args...) +} diff --git a/vendor/google.golang.org/grpc/grpclog/logger.go b/vendor/google.golang.org/grpc/grpclog/logger.go new file mode 100644 index 000000000..d03b2397b --- /dev/null +++ b/vendor/google.golang.org/grpc/grpclog/logger.go @@ -0,0 +1,83 @@ +/* + * + * Copyright 2015 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpclog + +// Logger mimics golang's standard Logger as an interface. +// Deprecated: use LoggerV2. +type Logger interface { + Fatal(args ...interface{}) + Fatalf(format string, args ...interface{}) + Fatalln(args ...interface{}) + Print(args ...interface{}) + Printf(format string, args ...interface{}) + Println(args ...interface{}) +} + +// SetLogger sets the logger that is used in grpc. Call only from +// init() functions. +// Deprecated: use SetLoggerV2. +func SetLogger(l Logger) { + logger = &loggerWrapper{Logger: l} +} + +// loggerWrapper wraps Logger into a LoggerV2. +type loggerWrapper struct { + Logger +} + +func (g *loggerWrapper) Info(args ...interface{}) { + g.Logger.Print(args...) +} + +func (g *loggerWrapper) Infoln(args ...interface{}) { + g.Logger.Println(args...) +} + +func (g *loggerWrapper) Infof(format string, args ...interface{}) { + g.Logger.Printf(format, args...) +} + +func (g *loggerWrapper) Warning(args ...interface{}) { + g.Logger.Print(args...) +} + +func (g *loggerWrapper) Warningln(args ...interface{}) { + g.Logger.Println(args...) +} + +func (g *loggerWrapper) Warningf(format string, args ...interface{}) { + g.Logger.Printf(format, args...) +} + +func (g *loggerWrapper) Error(args ...interface{}) { + g.Logger.Print(args...) +} + +func (g *loggerWrapper) Errorln(args ...interface{}) { + g.Logger.Println(args...) +} + +func (g *loggerWrapper) Errorf(format string, args ...interface{}) { + g.Logger.Printf(format, args...) +} + +func (g *loggerWrapper) V(l int) bool { + // Returns true for all verbose level. + return true +} diff --git a/vendor/google.golang.org/grpc/grpclog/loggerv2.go b/vendor/google.golang.org/grpc/grpclog/loggerv2.go new file mode 100644 index 000000000..d49325776 --- /dev/null +++ b/vendor/google.golang.org/grpc/grpclog/loggerv2.go @@ -0,0 +1,195 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpclog + +import ( + "io" + "io/ioutil" + "log" + "os" + "strconv" +) + +// LoggerV2 does underlying logging work for grpclog. +type LoggerV2 interface { + // Info logs to INFO log. Arguments are handled in the manner of fmt.Print. + Info(args ...interface{}) + // Infoln logs to INFO log. Arguments are handled in the manner of fmt.Println. + Infoln(args ...interface{}) + // Infof logs to INFO log. Arguments are handled in the manner of fmt.Printf. + Infof(format string, args ...interface{}) + // Warning logs to WARNING log. Arguments are handled in the manner of fmt.Print. + Warning(args ...interface{}) + // Warningln logs to WARNING log. Arguments are handled in the manner of fmt.Println. + Warningln(args ...interface{}) + // Warningf logs to WARNING log. Arguments are handled in the manner of fmt.Printf. + Warningf(format string, args ...interface{}) + // Error logs to ERROR log. Arguments are handled in the manner of fmt.Print. + Error(args ...interface{}) + // Errorln logs to ERROR log. Arguments are handled in the manner of fmt.Println. + Errorln(args ...interface{}) + // Errorf logs to ERROR log. Arguments are handled in the manner of fmt.Printf. + Errorf(format string, args ...interface{}) + // Fatal logs to ERROR log. Arguments are handled in the manner of fmt.Print. + // gRPC ensures that all Fatal logs will exit with os.Exit(1). + // Implementations may also call os.Exit() with a non-zero exit code. + Fatal(args ...interface{}) + // Fatalln logs to ERROR log. Arguments are handled in the manner of fmt.Println. + // gRPC ensures that all Fatal logs will exit with os.Exit(1). + // Implementations may also call os.Exit() with a non-zero exit code. + Fatalln(args ...interface{}) + // Fatalf logs to ERROR log. Arguments are handled in the manner of fmt.Printf. + // gRPC ensures that all Fatal logs will exit with os.Exit(1). + // Implementations may also call os.Exit() with a non-zero exit code. + Fatalf(format string, args ...interface{}) + // V reports whether verbosity level l is at least the requested verbose level. + V(l int) bool +} + +// SetLoggerV2 sets logger that is used in grpc to a V2 logger. +// Not mutex-protected, should be called before any gRPC functions. +func SetLoggerV2(l LoggerV2) { + logger = l +} + +const ( + // infoLog indicates Info severity. + infoLog int = iota + // warningLog indicates Warning severity. + warningLog + // errorLog indicates Error severity. + errorLog + // fatalLog indicates Fatal severity. + fatalLog +) + +// severityName contains the string representation of each severity. +var severityName = []string{ + infoLog: "INFO", + warningLog: "WARNING", + errorLog: "ERROR", + fatalLog: "FATAL", +} + +// loggerT is the default logger used by grpclog. +type loggerT struct { + m []*log.Logger + v int +} + +// NewLoggerV2 creates a loggerV2 with the provided writers. +// Fatal logs will be written to errorW, warningW, infoW, followed by exit(1). +// Error logs will be written to errorW, warningW and infoW. +// Warning logs will be written to warningW and infoW. +// Info logs will be written to infoW. +func NewLoggerV2(infoW, warningW, errorW io.Writer) LoggerV2 { + return NewLoggerV2WithVerbosity(infoW, warningW, errorW, 0) +} + +// NewLoggerV2WithVerbosity creates a loggerV2 with the provided writers and +// verbosity level. +func NewLoggerV2WithVerbosity(infoW, warningW, errorW io.Writer, v int) LoggerV2 { + var m []*log.Logger + m = append(m, log.New(infoW, severityName[infoLog]+": ", log.LstdFlags)) + m = append(m, log.New(io.MultiWriter(infoW, warningW), severityName[warningLog]+": ", log.LstdFlags)) + ew := io.MultiWriter(infoW, warningW, errorW) // ew will be used for error and fatal. + m = append(m, log.New(ew, severityName[errorLog]+": ", log.LstdFlags)) + m = append(m, log.New(ew, severityName[fatalLog]+": ", log.LstdFlags)) + return &loggerT{m: m, v: v} +} + +// newLoggerV2 creates a loggerV2 to be used as default logger. +// All logs are written to stderr. +func newLoggerV2() LoggerV2 { + errorW := ioutil.Discard + warningW := ioutil.Discard + infoW := ioutil.Discard + + logLevel := os.Getenv("GRPC_GO_LOG_SEVERITY_LEVEL") + switch logLevel { + case "", "ERROR", "error": // If env is unset, set level to ERROR. + errorW = os.Stderr + case "WARNING", "warning": + warningW = os.Stderr + case "INFO", "info": + infoW = os.Stderr + } + + var v int + vLevel := os.Getenv("GRPC_GO_LOG_VERBOSITY_LEVEL") + if vl, err := strconv.Atoi(vLevel); err == nil { + v = vl + } + return NewLoggerV2WithVerbosity(infoW, warningW, errorW, v) +} + +func (g *loggerT) Info(args ...interface{}) { + g.m[infoLog].Print(args...) +} + +func (g *loggerT) Infoln(args ...interface{}) { + g.m[infoLog].Println(args...) +} + +func (g *loggerT) Infof(format string, args ...interface{}) { + g.m[infoLog].Printf(format, args...) +} + +func (g *loggerT) Warning(args ...interface{}) { + g.m[warningLog].Print(args...) +} + +func (g *loggerT) Warningln(args ...interface{}) { + g.m[warningLog].Println(args...) +} + +func (g *loggerT) Warningf(format string, args ...interface{}) { + g.m[warningLog].Printf(format, args...) +} + +func (g *loggerT) Error(args ...interface{}) { + g.m[errorLog].Print(args...) +} + +func (g *loggerT) Errorln(args ...interface{}) { + g.m[errorLog].Println(args...) +} + +func (g *loggerT) Errorf(format string, args ...interface{}) { + g.m[errorLog].Printf(format, args...) +} + +func (g *loggerT) Fatal(args ...interface{}) { + g.m[fatalLog].Fatal(args...) + // No need to call os.Exit() again because log.Logger.Fatal() calls os.Exit(). +} + +func (g *loggerT) Fatalln(args ...interface{}) { + g.m[fatalLog].Fatalln(args...) + // No need to call os.Exit() again because log.Logger.Fatal() calls os.Exit(). +} + +func (g *loggerT) Fatalf(format string, args ...interface{}) { + g.m[fatalLog].Fatalf(format, args...) + // No need to call os.Exit() again because log.Logger.Fatal() calls os.Exit(). +} + +func (g *loggerT) V(l int) bool { + return l <= g.v +} diff --git a/vendor/google.golang.org/grpc/grpclog/loggerv2_test.go b/vendor/google.golang.org/grpc/grpclog/loggerv2_test.go new file mode 100644 index 000000000..756f215f9 --- /dev/null +++ b/vendor/google.golang.org/grpc/grpclog/loggerv2_test.go @@ -0,0 +1,62 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpclog + +import ( + "bytes" + "fmt" + "regexp" + "testing" +) + +func TestLoggerV2Severity(t *testing.T) { + buffers := []*bytes.Buffer{new(bytes.Buffer), new(bytes.Buffer), new(bytes.Buffer)} + SetLoggerV2(NewLoggerV2(buffers[infoLog], buffers[warningLog], buffers[errorLog])) + + Info(severityName[infoLog]) + Warning(severityName[warningLog]) + Error(severityName[errorLog]) + + for i := 0; i < fatalLog; i++ { + buf := buffers[i] + // The content of info buffer should be something like: + // INFO: 2017/04/07 14:55:42 INFO + // WARNING: 2017/04/07 14:55:42 WARNING + // ERROR: 2017/04/07 14:55:42 ERROR + for j := i; j < fatalLog; j++ { + b, err := buf.ReadBytes('\n') + if err != nil { + t.Fatal(err) + } + if err := checkLogForSeverity(j, b); err != nil { + t.Fatal(err) + } + } + } +} + +// check if b is in the format of: +// WARNING: 2017/04/07 14:55:42 WARNING +func checkLogForSeverity(s int, b []byte) error { + expected := regexp.MustCompile(fmt.Sprintf(`^%s: [0-9]{4}/[0-9]{2}/[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2} %s\n$`, severityName[s], severityName[s])) + if m := expected.Match(b); !m { + return fmt.Errorf("got: %v, want string in format of: %v", string(b), severityName[s]+": 2016/10/05 17:09:26 "+severityName[s]) + } + return nil +} diff --git a/vendor/google.golang.org/grpc/interceptor.go b/vendor/google.golang.org/grpc/interceptor.go new file mode 100644 index 000000000..06dc825b9 --- /dev/null +++ b/vendor/google.golang.org/grpc/interceptor.go @@ -0,0 +1,75 @@ +/* + * + * Copyright 2016 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpc + +import ( + "golang.org/x/net/context" +) + +// UnaryInvoker is called by UnaryClientInterceptor to complete RPCs. +type UnaryInvoker func(ctx context.Context, method string, req, reply interface{}, cc *ClientConn, opts ...CallOption) error + +// UnaryClientInterceptor intercepts the execution of a unary RPC on the client. invoker is the handler to complete the RPC +// and it is the responsibility of the interceptor to call it. +// This is an EXPERIMENTAL API. +type UnaryClientInterceptor func(ctx context.Context, method string, req, reply interface{}, cc *ClientConn, invoker UnaryInvoker, opts ...CallOption) error + +// Streamer is called by StreamClientInterceptor to create a ClientStream. +type Streamer func(ctx context.Context, desc *StreamDesc, cc *ClientConn, method string, opts ...CallOption) (ClientStream, error) + +// StreamClientInterceptor intercepts the creation of ClientStream. It may return a custom ClientStream to intercept all I/O +// operations. streamer is the handler to create a ClientStream and it is the responsibility of the interceptor to call it. +// This is an EXPERIMENTAL API. +type StreamClientInterceptor func(ctx context.Context, desc *StreamDesc, cc *ClientConn, method string, streamer Streamer, opts ...CallOption) (ClientStream, error) + +// UnaryServerInfo consists of various information about a unary RPC on +// server side. All per-rpc information may be mutated by the interceptor. +type UnaryServerInfo struct { + // Server is the service implementation the user provides. This is read-only. + Server interface{} + // FullMethod is the full RPC method string, i.e., /package.service/method. + FullMethod string +} + +// UnaryHandler defines the handler invoked by UnaryServerInterceptor to complete the normal +// execution of a unary RPC. +type UnaryHandler func(ctx context.Context, req interface{}) (interface{}, error) + +// UnaryServerInterceptor provides a hook to intercept the execution of a unary RPC on the server. info +// contains all the information of this RPC the interceptor can operate on. And handler is the wrapper +// of the service method implementation. It is the responsibility of the interceptor to invoke handler +// to complete the RPC. +type UnaryServerInterceptor func(ctx context.Context, req interface{}, info *UnaryServerInfo, handler UnaryHandler) (resp interface{}, err error) + +// StreamServerInfo consists of various information about a streaming RPC on +// server side. All per-rpc information may be mutated by the interceptor. +type StreamServerInfo struct { + // FullMethod is the full RPC method string, i.e., /package.service/method. + FullMethod string + // IsClientStream indicates whether the RPC is a client streaming RPC. + IsClientStream bool + // IsServerStream indicates whether the RPC is a server streaming RPC. + IsServerStream bool +} + +// StreamServerInterceptor provides a hook to intercept the execution of a streaming RPC on the server. +// info contains all the information of this RPC the interceptor can operate on. And handler is the +// service method implementation. It is the responsibility of the interceptor to invoke handler to +// complete the RPC. +type StreamServerInterceptor func(srv interface{}, ss ServerStream, info *StreamServerInfo, handler StreamHandler) error diff --git a/vendor/google.golang.org/grpc/internal/internal.go b/vendor/google.golang.org/grpc/internal/internal.go new file mode 100644 index 000000000..07083832c --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/internal.go @@ -0,0 +1,34 @@ +/* + * Copyright 2016 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Package internal contains gRPC-internal code for testing, to avoid polluting +// the godoc of the top-level grpc package. +package internal + +// TestingCloseConns closes all existing transports but keeps +// grpcServer.lis accepting new connections. +// +// The provided grpcServer must be of type *grpc.Server. It is untyped +// for circular dependency reasons. +var TestingCloseConns func(grpcServer interface{}) + +// TestingUseHandlerImpl enables the http.Handler-based server implementation. +// It must be called before Serve and requires TLS credentials. +// +// The provided grpcServer must be of type *grpc.Server. It is untyped +// for circular dependency reasons. +var TestingUseHandlerImpl func(grpcServer interface{}) diff --git a/vendor/google.golang.org/grpc/keepalive/keepalive.go b/vendor/google.golang.org/grpc/keepalive/keepalive.go new file mode 100644 index 000000000..f8adc7e6d --- /dev/null +++ b/vendor/google.golang.org/grpc/keepalive/keepalive.go @@ -0,0 +1,65 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Package keepalive defines configurable parameters for point-to-point healthcheck. +package keepalive + +import ( + "time" +) + +// ClientParameters is used to set keepalive parameters on the client-side. +// These configure how the client will actively probe to notice when a connection is broken +// and send pings so intermediaries will be aware of the liveness of the connection. +// Make sure these parameters are set in coordination with the keepalive policy on the server, +// as incompatible settings can result in closing of connection. +type ClientParameters struct { + // After a duration of this time if the client doesn't see any activity it pings the server to see if the transport is still alive. + Time time.Duration // The current default value is infinity. + // After having pinged for keepalive check, the client waits for a duration of Timeout and if no activity is seen even after that + // the connection is closed. + Timeout time.Duration // The current default value is 20 seconds. + // If true, client runs keepalive checks even with no active RPCs. + PermitWithoutStream bool // false by default. +} + +// ServerParameters is used to set keepalive and max-age parameters on the server-side. +type ServerParameters struct { + // MaxConnectionIdle is a duration for the amount of time after which an idle connection would be closed by sending a GoAway. + // Idleness duration is defined since the most recent time the number of outstanding RPCs became zero or the connection establishment. + MaxConnectionIdle time.Duration // The current default value is infinity. + // MaxConnectionAge is a duration for the maximum amount of time a connection may exist before it will be closed by sending a GoAway. + // A random jitter of +/-10% will be added to MaxConnectionAge to spread out connection storms. + MaxConnectionAge time.Duration // The current default value is infinity. + // MaxConnectinoAgeGrace is an additive period after MaxConnectionAge after which the connection will be forcibly closed. + MaxConnectionAgeGrace time.Duration // The current default value is infinity. + // After a duration of this time if the server doesn't see any activity it pings the client to see if the transport is still alive. + Time time.Duration // The current default value is 2 hours. + // After having pinged for keepalive check, the server waits for a duration of Timeout and if no activity is seen even after that + // the connection is closed. + Timeout time.Duration // The current default value is 20 seconds. +} + +// EnforcementPolicy is used to set keepalive enforcement policy on the server-side. +// Server will close connection with a client that violates this policy. +type EnforcementPolicy struct { + // MinTime is the minimum amount of time a client should wait before sending a keepalive ping. + MinTime time.Duration // The current default value is 5 minutes. + // If true, server expects keepalive pings even when there are no active streams(RPCs). + PermitWithoutStream bool // false by default. +} diff --git a/vendor/google.golang.org/grpc/metadata/metadata.go b/vendor/google.golang.org/grpc/metadata/metadata.go new file mode 100644 index 000000000..ccfea5d45 --- /dev/null +++ b/vendor/google.golang.org/grpc/metadata/metadata.go @@ -0,0 +1,137 @@ +/* + * + * Copyright 2014 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Package metadata define the structure of the metadata supported by gRPC library. +// Please refer to https://grpc.io/docs/guides/wire.html for more information about custom-metadata. +package metadata // import "google.golang.org/grpc/metadata" + +import ( + "fmt" + "strings" + + "golang.org/x/net/context" +) + +// DecodeKeyValue returns k, v, nil. It is deprecated and should not be used. +func DecodeKeyValue(k, v string) (string, string, error) { + return k, v, nil +} + +// MD is a mapping from metadata keys to values. Users should use the following +// two convenience functions New and Pairs to generate MD. +type MD map[string][]string + +// New creates an MD from a given key-value map. +// +// Only the following ASCII characters are allowed in keys: +// - digits: 0-9 +// - uppercase letters: A-Z (normalized to lower) +// - lowercase letters: a-z +// - special characters: -_. +// Uppercase letters are automatically converted to lowercase. +// +// Keys beginning with "grpc-" are reserved for grpc-internal use only and may +// result in errors if set in metadata. +func New(m map[string]string) MD { + md := MD{} + for k, val := range m { + key := strings.ToLower(k) + md[key] = append(md[key], val) + } + return md +} + +// Pairs returns an MD formed by the mapping of key, value ... +// Pairs panics if len(kv) is odd. +// +// Only the following ASCII characters are allowed in keys: +// - digits: 0-9 +// - uppercase letters: A-Z (normalized to lower) +// - lowercase letters: a-z +// - special characters: -_. +// Uppercase letters are automatically converted to lowercase. +// +// Keys beginning with "grpc-" are reserved for grpc-internal use only and may +// result in errors if set in metadata. +func Pairs(kv ...string) MD { + if len(kv)%2 == 1 { + panic(fmt.Sprintf("metadata: Pairs got the odd number of input pairs for metadata: %d", len(kv))) + } + md := MD{} + var key string + for i, s := range kv { + if i%2 == 0 { + key = strings.ToLower(s) + continue + } + md[key] = append(md[key], s) + } + return md +} + +// Len returns the number of items in md. +func (md MD) Len() int { + return len(md) +} + +// Copy returns a copy of md. +func (md MD) Copy() MD { + return Join(md) +} + +// Join joins any number of mds into a single MD. +// The order of values for each key is determined by the order in which +// the mds containing those values are presented to Join. +func Join(mds ...MD) MD { + out := MD{} + for _, md := range mds { + for k, v := range md { + out[k] = append(out[k], v...) + } + } + return out +} + +type mdIncomingKey struct{} +type mdOutgoingKey struct{} + +// NewIncomingContext creates a new context with incoming md attached. +func NewIncomingContext(ctx context.Context, md MD) context.Context { + return context.WithValue(ctx, mdIncomingKey{}, md) +} + +// NewOutgoingContext creates a new context with outgoing md attached. +func NewOutgoingContext(ctx context.Context, md MD) context.Context { + return context.WithValue(ctx, mdOutgoingKey{}, md) +} + +// FromIncomingContext returns the incoming metadata in ctx if it exists. The +// returned MD should not be modified. Writing to it may cause races. +// Modification should be made to copies of the returned MD. +func FromIncomingContext(ctx context.Context) (md MD, ok bool) { + md, ok = ctx.Value(mdIncomingKey{}).(MD) + return +} + +// FromOutgoingContext returns the outgoing metadata in ctx if it exists. The +// returned MD should not be modified. Writing to it may cause races. +// Modification should be made to the copies of the returned MD. +func FromOutgoingContext(ctx context.Context) (md MD, ok bool) { + md, ok = ctx.Value(mdOutgoingKey{}).(MD) + return +} diff --git a/vendor/google.golang.org/grpc/metadata/metadata_test.go b/vendor/google.golang.org/grpc/metadata/metadata_test.go new file mode 100644 index 000000000..210cbb267 --- /dev/null +++ b/vendor/google.golang.org/grpc/metadata/metadata_test.go @@ -0,0 +1,71 @@ +/* + * + * Copyright 2014 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package metadata + +import ( + "reflect" + "testing" +) + +func TestPairsMD(t *testing.T) { + for _, test := range []struct { + // input + kv []string + // output + md MD + }{ + {[]string{}, MD{}}, + {[]string{"k1", "v1", "k1", "v2"}, MD{"k1": []string{"v1", "v2"}}}, + } { + md := Pairs(test.kv...) + if !reflect.DeepEqual(md, test.md) { + t.Fatalf("Pairs(%v) = %v, want %v", test.kv, md, test.md) + } + } +} + +func TestCopy(t *testing.T) { + const key, val = "key", "val" + orig := Pairs(key, val) + copy := orig.Copy() + if !reflect.DeepEqual(orig, copy) { + t.Errorf("copied value not equal to the original, got %v, want %v", copy, orig) + } + orig[key][0] = "foo" + if v := copy[key][0]; v != val { + t.Errorf("change in original should not affect copy, got %q, want %q", v, val) + } +} + +func TestJoin(t *testing.T) { + for _, test := range []struct { + mds []MD + want MD + }{ + {[]MD{}, MD{}}, + {[]MD{Pairs("foo", "bar")}, Pairs("foo", "bar")}, + {[]MD{Pairs("foo", "bar"), Pairs("foo", "baz")}, Pairs("foo", "bar", "foo", "baz")}, + {[]MD{Pairs("foo", "bar"), Pairs("foo", "baz"), Pairs("zip", "zap")}, Pairs("foo", "bar", "foo", "baz", "zip", "zap")}, + } { + md := Join(test.mds...) + if !reflect.DeepEqual(md, test.want) { + t.Errorf("context's metadata is %v, want %v", md, test.want) + } + } +} diff --git a/vendor/google.golang.org/grpc/naming/dns_resolver.go b/vendor/google.golang.org/grpc/naming/dns_resolver.go new file mode 100644 index 000000000..7e69a2ca0 --- /dev/null +++ b/vendor/google.golang.org/grpc/naming/dns_resolver.go @@ -0,0 +1,290 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package naming + +import ( + "errors" + "fmt" + "net" + "strconv" + "time" + + "golang.org/x/net/context" + "google.golang.org/grpc/grpclog" +) + +const ( + defaultPort = "443" + defaultFreq = time.Minute * 30 +) + +var ( + errMissingAddr = errors.New("missing address") + errWatcherClose = errors.New("watcher has been closed") +) + +// NewDNSResolverWithFreq creates a DNS Resolver that can resolve DNS names, and +// create watchers that poll the DNS server using the frequency set by freq. +func NewDNSResolverWithFreq(freq time.Duration) (Resolver, error) { + return &dnsResolver{freq: freq}, nil +} + +// NewDNSResolver creates a DNS Resolver that can resolve DNS names, and create +// watchers that poll the DNS server using the default frequency defined by defaultFreq. +func NewDNSResolver() (Resolver, error) { + return NewDNSResolverWithFreq(defaultFreq) +} + +// dnsResolver handles name resolution for names following the DNS scheme +type dnsResolver struct { + // frequency of polling the DNS server that the watchers created by this resolver will use. + freq time.Duration +} + +// formatIP returns ok = false if addr is not a valid textual representation of an IP address. +// If addr is an IPv4 address, return the addr and ok = true. +// If addr is an IPv6 address, return the addr enclosed in square brackets and ok = true. +func formatIP(addr string) (addrIP string, ok bool) { + ip := net.ParseIP(addr) + if ip == nil { + return "", false + } + if ip.To4() != nil { + return addr, true + } + return "[" + addr + "]", true +} + +// parseTarget takes the user input target string, returns formatted host and port info. +// If target doesn't specify a port, set the port to be the defaultPort. +// If target is in IPv6 format and host-name is enclosed in sqarue brackets, brackets +// are strippd when setting the host. +// examples: +// target: "www.google.com" returns host: "www.google.com", port: "443" +// target: "ipv4-host:80" returns host: "ipv4-host", port: "80" +// target: "[ipv6-host]" returns host: "ipv6-host", port: "443" +// target: ":80" returns host: "localhost", port: "80" +// target: ":" returns host: "localhost", port: "443" +func parseTarget(target string) (host, port string, err error) { + if target == "" { + return "", "", errMissingAddr + } + + if ip := net.ParseIP(target); ip != nil { + // target is an IPv4 or IPv6(without brackets) address + return target, defaultPort, nil + } + if host, port, err := net.SplitHostPort(target); err == nil { + // target has port, i.e ipv4-host:port, [ipv6-host]:port, host-name:port + if host == "" { + // Keep consistent with net.Dial(): If the host is empty, as in ":80", the local system is assumed. + host = "localhost" + } + if port == "" { + // If the port field is empty(target ends with colon), e.g. "[::1]:", defaultPort is used. + port = defaultPort + } + return host, port, nil + } + if host, port, err := net.SplitHostPort(target + ":" + defaultPort); err == nil { + // target doesn't have port + return host, port, nil + } + return "", "", fmt.Errorf("invalid target address %v", target) +} + +// Resolve creates a watcher that watches the name resolution of the target. +func (r *dnsResolver) Resolve(target string) (Watcher, error) { + host, port, err := parseTarget(target) + if err != nil { + return nil, err + } + + if net.ParseIP(host) != nil { + ipWatcher := &ipWatcher{ + updateChan: make(chan *Update, 1), + } + host, _ = formatIP(host) + ipWatcher.updateChan <- &Update{Op: Add, Addr: host + ":" + port} + return ipWatcher, nil + } + + ctx, cancel := context.WithCancel(context.Background()) + return &dnsWatcher{ + r: r, + host: host, + port: port, + ctx: ctx, + cancel: cancel, + t: time.NewTimer(0), + }, nil +} + +// dnsWatcher watches for the name resolution update for a specific target +type dnsWatcher struct { + r *dnsResolver + host string + port string + // The latest resolved address set + curAddrs map[string]*Update + ctx context.Context + cancel context.CancelFunc + t *time.Timer +} + +// ipWatcher watches for the name resolution update for an IP address. +type ipWatcher struct { + updateChan chan *Update +} + +// Next returns the adrress resolution Update for the target. For IP address, +// the resolution is itself, thus polling name server is unncessary. Therefore, +// Next() will return an Update the first time it is called, and will be blocked +// for all following calls as no Update exisits until watcher is closed. +func (i *ipWatcher) Next() ([]*Update, error) { + u, ok := <-i.updateChan + if !ok { + return nil, errWatcherClose + } + return []*Update{u}, nil +} + +// Close closes the ipWatcher. +func (i *ipWatcher) Close() { + close(i.updateChan) +} + +// AddressType indicates the address type returned by name resolution. +type AddressType uint8 + +const ( + // Backend indicates the server is a backend server. + Backend AddressType = iota + // GRPCLB indicates the server is a grpclb load balancer. + GRPCLB +) + +// AddrMetadataGRPCLB contains the information the name resolver for grpclb should provide. The +// name resolver used by the grpclb balancer is required to provide this type of metadata in +// its address updates. +type AddrMetadataGRPCLB struct { + // AddrType is the type of server (grpc load balancer or backend). + AddrType AddressType + // ServerName is the name of the grpc load balancer. Used for authentication. + ServerName string +} + +// compileUpdate compares the old resolved addresses and newly resolved addresses, +// and generates an update list +func (w *dnsWatcher) compileUpdate(newAddrs map[string]*Update) []*Update { + var res []*Update + for a, u := range w.curAddrs { + if _, ok := newAddrs[a]; !ok { + u.Op = Delete + res = append(res, u) + } + } + for a, u := range newAddrs { + if _, ok := w.curAddrs[a]; !ok { + res = append(res, u) + } + } + return res +} + +func (w *dnsWatcher) lookupSRV() map[string]*Update { + newAddrs := make(map[string]*Update) + _, srvs, err := lookupSRV(w.ctx, "grpclb", "tcp", w.host) + if err != nil { + grpclog.Infof("grpc: failed dns SRV record lookup due to %v.\n", err) + return nil + } + for _, s := range srvs { + lbAddrs, err := lookupHost(w.ctx, s.Target) + if err != nil { + grpclog.Warningf("grpc: failed load banlacer address dns lookup due to %v.\n", err) + continue + } + for _, a := range lbAddrs { + a, ok := formatIP(a) + if !ok { + grpclog.Errorf("grpc: failed IP parsing due to %v.\n", err) + continue + } + addr := a + ":" + strconv.Itoa(int(s.Port)) + newAddrs[addr] = &Update{Addr: addr, + Metadata: AddrMetadataGRPCLB{AddrType: GRPCLB, ServerName: s.Target}} + } + } + return newAddrs +} + +func (w *dnsWatcher) lookupHost() map[string]*Update { + newAddrs := make(map[string]*Update) + addrs, err := lookupHost(w.ctx, w.host) + if err != nil { + grpclog.Warningf("grpc: failed dns A record lookup due to %v.\n", err) + return nil + } + for _, a := range addrs { + a, ok := formatIP(a) + if !ok { + grpclog.Errorf("grpc: failed IP parsing due to %v.\n", err) + continue + } + addr := a + ":" + w.port + newAddrs[addr] = &Update{Addr: addr} + } + return newAddrs +} + +func (w *dnsWatcher) lookup() []*Update { + newAddrs := w.lookupSRV() + if newAddrs == nil { + // If failed to get any balancer address (either no corresponding SRV for the + // target, or caused by failure during resolution/parsing of the balancer target), + // return any A record info available. + newAddrs = w.lookupHost() + } + result := w.compileUpdate(newAddrs) + w.curAddrs = newAddrs + return result +} + +// Next returns the resolved address update(delta) for the target. If there's no +// change, it will sleep for 30 mins and try to resolve again after that. +func (w *dnsWatcher) Next() ([]*Update, error) { + for { + select { + case <-w.ctx.Done(): + return nil, errWatcherClose + case <-w.t.C: + } + result := w.lookup() + // Next lookup should happen after an interval defined by w.r.freq. + w.t.Reset(w.r.freq) + if len(result) > 0 { + return result, nil + } + } +} + +func (w *dnsWatcher) Close() { + w.cancel() +} diff --git a/vendor/google.golang.org/grpc/naming/dns_resolver_test.go b/vendor/google.golang.org/grpc/naming/dns_resolver_test.go new file mode 100644 index 000000000..be1ac1aec --- /dev/null +++ b/vendor/google.golang.org/grpc/naming/dns_resolver_test.go @@ -0,0 +1,315 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package naming + +import ( + "fmt" + "net" + "reflect" + "sync" + "testing" + "time" +) + +func newUpdateWithMD(op Operation, addr, lb string) *Update { + return &Update{ + Op: op, + Addr: addr, + Metadata: AddrMetadataGRPCLB{AddrType: GRPCLB, ServerName: lb}, + } +} + +func toMap(u []*Update) map[string]*Update { + m := make(map[string]*Update) + for _, v := range u { + m[v.Addr] = v + } + return m +} + +func TestCompileUpdate(t *testing.T) { + tests := []struct { + oldAddrs []string + newAddrs []string + want []*Update + }{ + { + []string{}, + []string{"1.0.0.1"}, + []*Update{{Op: Add, Addr: "1.0.0.1"}}, + }, + { + []string{"1.0.0.1"}, + []string{"1.0.0.1"}, + []*Update{}, + }, + { + []string{"1.0.0.0"}, + []string{"1.0.0.1"}, + []*Update{{Op: Delete, Addr: "1.0.0.0"}, {Op: Add, Addr: "1.0.0.1"}}, + }, + { + []string{"1.0.0.1"}, + []string{"1.0.0.0"}, + []*Update{{Op: Add, Addr: "1.0.0.0"}, {Op: Delete, Addr: "1.0.0.1"}}, + }, + { + []string{"1.0.0.1"}, + []string{"1.0.0.1", "1.0.0.2", "1.0.0.3"}, + []*Update{{Op: Add, Addr: "1.0.0.2"}, {Op: Add, Addr: "1.0.0.3"}}, + }, + { + []string{"1.0.0.1", "1.0.0.2", "1.0.0.3"}, + []string{"1.0.0.0"}, + []*Update{{Op: Add, Addr: "1.0.0.0"}, {Op: Delete, Addr: "1.0.0.1"}, {Op: Delete, Addr: "1.0.0.2"}, {Op: Delete, Addr: "1.0.0.3"}}, + }, + { + []string{"1.0.0.1", "1.0.0.3", "1.0.0.5"}, + []string{"1.0.0.2", "1.0.0.3", "1.0.0.6"}, + []*Update{{Op: Delete, Addr: "1.0.0.1"}, {Op: Add, Addr: "1.0.0.2"}, {Op: Delete, Addr: "1.0.0.5"}, {Op: Add, Addr: "1.0.0.6"}}, + }, + { + []string{"1.0.0.1", "1.0.0.1", "1.0.0.2"}, + []string{"1.0.0.1"}, + []*Update{{Op: Delete, Addr: "1.0.0.2"}}, + }, + } + + var w dnsWatcher + for _, c := range tests { + w.curAddrs = make(map[string]*Update) + newUpdates := make(map[string]*Update) + for _, a := range c.oldAddrs { + w.curAddrs[a] = &Update{Addr: a} + } + for _, a := range c.newAddrs { + newUpdates[a] = &Update{Addr: a} + } + r := w.compileUpdate(newUpdates) + if !reflect.DeepEqual(toMap(c.want), toMap(r)) { + t.Errorf("w(%+v).compileUpdate(%+v) = %+v, want %+v", c.oldAddrs, c.newAddrs, updatesToSlice(r), updatesToSlice(c.want)) + } + } +} + +func TestResolveFunc(t *testing.T) { + tests := []struct { + addr string + want error + }{ + // TODO(yuxuanli): More false cases? + {"www.google.com", nil}, + {"foo.bar:12345", nil}, + {"127.0.0.1", nil}, + {"127.0.0.1:12345", nil}, + {"[::1]:80", nil}, + {"[2001:db8:a0b:12f0::1]:21", nil}, + {":80", nil}, + {"127.0.0...1:12345", nil}, + {"[fe80::1%lo0]:80", nil}, + {"golang.org:http", nil}, + {"[2001:db8::1]:http", nil}, + {":", nil}, + {"", errMissingAddr}, + {"[2001:db8:a0b:12f0::1", fmt.Errorf("invalid target address %v", "[2001:db8:a0b:12f0::1")}, + } + + r, err := NewDNSResolver() + if err != nil { + t.Errorf("%v", err) + } + for _, v := range tests { + _, err := r.Resolve(v.addr) + if !reflect.DeepEqual(err, v.want) { + t.Errorf("Resolve(%q) = %v, want %v", v.addr, err, v.want) + } + } +} + +var hostLookupTbl = map[string][]string{ + "foo.bar.com": {"1.2.3.4", "5.6.7.8"}, + "ipv4.single.fake": {"1.2.3.4"}, + "ipv4.multi.fake": {"1.2.3.4", "5.6.7.8", "9.10.11.12"}, + "ipv6.single.fake": {"2607:f8b0:400a:801::1001"}, + "ipv6.multi.fake": {"2607:f8b0:400a:801::1001", "2607:f8b0:400a:801::1002", "2607:f8b0:400a:801::1003"}, +} + +func hostLookup(host string) ([]string, error) { + if addrs, ok := hostLookupTbl[host]; ok { + return addrs, nil + } + return nil, fmt.Errorf("failed to lookup host:%s resolution in hostLookupTbl", host) +} + +var srvLookupTbl = map[string][]*net.SRV{ + "_grpclb._tcp.srv.ipv4.single.fake": {&net.SRV{Target: "ipv4.single.fake", Port: 1234}}, + "_grpclb._tcp.srv.ipv4.multi.fake": {&net.SRV{Target: "ipv4.multi.fake", Port: 1234}}, + "_grpclb._tcp.srv.ipv6.single.fake": {&net.SRV{Target: "ipv6.single.fake", Port: 1234}}, + "_grpclb._tcp.srv.ipv6.multi.fake": {&net.SRV{Target: "ipv6.multi.fake", Port: 1234}}, +} + +func srvLookup(service, proto, name string) (string, []*net.SRV, error) { + cname := "_" + service + "._" + proto + "." + name + if srvs, ok := srvLookupTbl[cname]; ok { + return cname, srvs, nil + } + return "", nil, fmt.Errorf("failed to lookup srv record for %s in srvLookupTbl", cname) +} + +func updatesToSlice(updates []*Update) []Update { + res := make([]Update, len(updates)) + for i, u := range updates { + res[i] = *u + } + return res +} + +func testResolver(t *testing.T, freq time.Duration, slp time.Duration) { + tests := []struct { + target string + want []*Update + }{ + { + "foo.bar.com", + []*Update{{Op: Add, Addr: "1.2.3.4" + colonDefaultPort}, {Op: Add, Addr: "5.6.7.8" + colonDefaultPort}}, + }, + { + "foo.bar.com:1234", + []*Update{{Op: Add, Addr: "1.2.3.4:1234"}, {Op: Add, Addr: "5.6.7.8:1234"}}, + }, + { + "srv.ipv4.single.fake", + []*Update{newUpdateWithMD(Add, "1.2.3.4:1234", "ipv4.single.fake")}, + }, + { + "srv.ipv4.multi.fake", + []*Update{ + newUpdateWithMD(Add, "1.2.3.4:1234", "ipv4.multi.fake"), + newUpdateWithMD(Add, "5.6.7.8:1234", "ipv4.multi.fake"), + newUpdateWithMD(Add, "9.10.11.12:1234", "ipv4.multi.fake")}, + }, + { + "srv.ipv6.single.fake", + []*Update{newUpdateWithMD(Add, "[2607:f8b0:400a:801::1001]:1234", "ipv6.single.fake")}, + }, + { + "srv.ipv6.multi.fake", + []*Update{ + newUpdateWithMD(Add, "[2607:f8b0:400a:801::1001]:1234", "ipv6.multi.fake"), + newUpdateWithMD(Add, "[2607:f8b0:400a:801::1002]:1234", "ipv6.multi.fake"), + newUpdateWithMD(Add, "[2607:f8b0:400a:801::1003]:1234", "ipv6.multi.fake"), + }, + }, + } + + for _, a := range tests { + r, err := NewDNSResolverWithFreq(freq) + if err != nil { + t.Fatalf("%v\n", err) + } + w, err := r.Resolve(a.target) + if err != nil { + t.Fatalf("%v\n", err) + } + updates, err := w.Next() + if err != nil { + t.Fatalf("%v\n", err) + } + if !reflect.DeepEqual(toMap(a.want), toMap(updates)) { + t.Errorf("Resolve(%q) = %+v, want %+v\n", a.target, updatesToSlice(updates), updatesToSlice(a.want)) + } + var wg sync.WaitGroup + wg.Add(1) + go func() { + defer wg.Done() + for { + _, err := w.Next() + if err != nil { + return + } + t.Error("Execution shouldn't reach here, since w.Next() should be blocked until close happen.") + } + }() + // Sleep for sometime to let watcher do more than one lookup + time.Sleep(slp) + w.Close() + wg.Wait() + } +} + +func TestResolve(t *testing.T) { + defer replaceNetFunc()() + testResolver(t, time.Millisecond*5, time.Millisecond*10) +} + +const colonDefaultPort = ":" + defaultPort + +func TestIPWatcher(t *testing.T) { + tests := []struct { + target string + want []*Update + }{ + {"127.0.0.1", []*Update{{Op: Add, Addr: "127.0.0.1" + colonDefaultPort}}}, + {"127.0.0.1:12345", []*Update{{Op: Add, Addr: "127.0.0.1:12345"}}}, + {"::1", []*Update{{Op: Add, Addr: "[::1]" + colonDefaultPort}}}, + {"[::1]:12345", []*Update{{Op: Add, Addr: "[::1]:12345"}}}, + {"[::1]:", []*Update{{Op: Add, Addr: "[::1]:443"}}}, + {"2001:db8:85a3::8a2e:370:7334", []*Update{{Op: Add, Addr: "[2001:db8:85a3::8a2e:370:7334]" + colonDefaultPort}}}, + {"[2001:db8:85a3::8a2e:370:7334]", []*Update{{Op: Add, Addr: "[2001:db8:85a3::8a2e:370:7334]" + colonDefaultPort}}}, + {"[2001:db8:85a3::8a2e:370:7334]:12345", []*Update{{Op: Add, Addr: "[2001:db8:85a3::8a2e:370:7334]:12345"}}}, + {"[2001:db8::1]:http", []*Update{{Op: Add, Addr: "[2001:db8::1]:http"}}}, + // TODO(yuxuanli): zone support? + } + + for _, v := range tests { + r, err := NewDNSResolverWithFreq(time.Millisecond * 5) + if err != nil { + t.Fatalf("%v\n", err) + } + w, err := r.Resolve(v.target) + if err != nil { + t.Fatalf("%v\n", err) + } + var updates []*Update + var wg sync.WaitGroup + wg.Add(1) + count := 0 + go func() { + defer wg.Done() + for { + u, err := w.Next() + if err != nil { + return + } + updates = u + count++ + } + }() + // Sleep for sometime to let watcher do more than one lookup + time.Sleep(time.Millisecond * 10) + w.Close() + wg.Wait() + if !reflect.DeepEqual(v.want, updates) { + t.Errorf("Resolve(%q) = %v, want %+v\n", v.target, updatesToSlice(updates), updatesToSlice(v.want)) + } + if count != 1 { + t.Errorf("IPWatcher Next() should return only once, not %d times\n", count) + } + } +} diff --git a/vendor/google.golang.org/grpc/naming/go17.go b/vendor/google.golang.org/grpc/naming/go17.go new file mode 100644 index 000000000..a537b08c6 --- /dev/null +++ b/vendor/google.golang.org/grpc/naming/go17.go @@ -0,0 +1,34 @@ +// +build go1.6, !go1.8 + +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package naming + +import ( + "net" + + "golang.org/x/net/context" +) + +var ( + lookupHost = func(ctx context.Context, host string) ([]string, error) { return net.LookupHost(host) } + lookupSRV = func(ctx context.Context, service, proto, name string) (string, []*net.SRV, error) { + return net.LookupSRV(service, proto, name) + } +) diff --git a/vendor/google.golang.org/grpc/naming/go17_test.go b/vendor/google.golang.org/grpc/naming/go17_test.go new file mode 100644 index 000000000..db39b9ab7 --- /dev/null +++ b/vendor/google.golang.org/grpc/naming/go17_test.go @@ -0,0 +1,42 @@ +// +build go1.6, !go1.8 + +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package naming + +import ( + "net" + + "golang.org/x/net/context" +) + +func replaceNetFunc() func() { + oldLookupHost := lookupHost + oldLookupSRV := lookupSRV + lookupHost = func(ctx context.Context, host string) ([]string, error) { + return hostLookup(host) + } + lookupSRV = func(ctx context.Context, service, proto, name string) (string, []*net.SRV, error) { + return srvLookup(service, proto, name) + } + return func() { + lookupHost = oldLookupHost + lookupSRV = oldLookupSRV + } +} diff --git a/vendor/google.golang.org/grpc/naming/go18.go b/vendor/google.golang.org/grpc/naming/go18.go new file mode 100644 index 000000000..b5a0f8427 --- /dev/null +++ b/vendor/google.golang.org/grpc/naming/go18.go @@ -0,0 +1,28 @@ +// +build go1.8 + +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package naming + +import "net" + +var ( + lookupHost = net.DefaultResolver.LookupHost + lookupSRV = net.DefaultResolver.LookupSRV +) diff --git a/vendor/google.golang.org/grpc/naming/go18_test.go b/vendor/google.golang.org/grpc/naming/go18_test.go new file mode 100644 index 000000000..5e297539b --- /dev/null +++ b/vendor/google.golang.org/grpc/naming/go18_test.go @@ -0,0 +1,41 @@ +// +build go1.8 + +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package naming + +import ( + "context" + "net" +) + +func replaceNetFunc() func() { + oldLookupHost := lookupHost + oldLookupSRV := lookupSRV + lookupHost = func(ctx context.Context, host string) ([]string, error) { + return hostLookup(host) + } + lookupSRV = func(ctx context.Context, service, proto, name string) (string, []*net.SRV, error) { + return srvLookup(service, proto, name) + } + return func() { + lookupHost = oldLookupHost + lookupSRV = oldLookupSRV + } +} diff --git a/vendor/google.golang.org/grpc/naming/naming.go b/vendor/google.golang.org/grpc/naming/naming.go new file mode 100644 index 000000000..1af7e32f8 --- /dev/null +++ b/vendor/google.golang.org/grpc/naming/naming.go @@ -0,0 +1,59 @@ +/* + * + * Copyright 2014 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Package naming defines the naming API and related data structures for gRPC. +// The interface is EXPERIMENTAL and may be suject to change. +package naming + +// Operation defines the corresponding operations for a name resolution change. +type Operation uint8 + +const ( + // Add indicates a new address is added. + Add Operation = iota + // Delete indicates an exisiting address is deleted. + Delete +) + +// Update defines a name resolution update. Notice that it is not valid having both +// empty string Addr and nil Metadata in an Update. +type Update struct { + // Op indicates the operation of the update. + Op Operation + // Addr is the updated address. It is empty string if there is no address update. + Addr string + // Metadata is the updated metadata. It is nil if there is no metadata update. + // Metadata is not required for a custom naming implementation. + Metadata interface{} +} + +// Resolver creates a Watcher for a target to track its resolution changes. +type Resolver interface { + // Resolve creates a Watcher for target. + Resolve(target string) (Watcher, error) +} + +// Watcher watches for the updates on the specified target. +type Watcher interface { + // Next blocks until an update or error happens. It may return one or more + // updates. The first call should get the full set of the results. It should + // return an error if and only if Watcher cannot recover. + Next() ([]*Update, error) + // Close closes the Watcher. + Close() +} diff --git a/vendor/google.golang.org/grpc/peer/peer.go b/vendor/google.golang.org/grpc/peer/peer.go new file mode 100644 index 000000000..317b8b9d0 --- /dev/null +++ b/vendor/google.golang.org/grpc/peer/peer.go @@ -0,0 +1,51 @@ +/* + * + * Copyright 2014 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Package peer defines various peer information associated with RPCs and +// corresponding utils. +package peer + +import ( + "net" + + "golang.org/x/net/context" + "google.golang.org/grpc/credentials" +) + +// Peer contains the information of the peer for an RPC, such as the address +// and authentication information. +type Peer struct { + // Addr is the peer address. + Addr net.Addr + // AuthInfo is the authentication information of the transport. + // It is nil if there is no transport security being used. + AuthInfo credentials.AuthInfo +} + +type peerKey struct{} + +// NewContext creates a new context with peer information attached. +func NewContext(ctx context.Context, p *Peer) context.Context { + return context.WithValue(ctx, peerKey{}, p) +} + +// FromContext returns the peer information in ctx if it exists. +func FromContext(ctx context.Context) (p *Peer, ok bool) { + p, ok = ctx.Value(peerKey{}).(*Peer) + return +} diff --git a/vendor/google.golang.org/grpc/proxy.go b/vendor/google.golang.org/grpc/proxy.go new file mode 100644 index 000000000..2d40236e2 --- /dev/null +++ b/vendor/google.golang.org/grpc/proxy.go @@ -0,0 +1,130 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpc + +import ( + "bufio" + "errors" + "fmt" + "io" + "net" + "net/http" + "net/http/httputil" + "net/url" + + "golang.org/x/net/context" +) + +var ( + // errDisabled indicates that proxy is disabled for the address. + errDisabled = errors.New("proxy is disabled for the address") + // The following variable will be overwritten in the tests. + httpProxyFromEnvironment = http.ProxyFromEnvironment +) + +func mapAddress(ctx context.Context, address string) (string, error) { + req := &http.Request{ + URL: &url.URL{ + Scheme: "https", + Host: address, + }, + } + url, err := httpProxyFromEnvironment(req) + if err != nil { + return "", err + } + if url == nil { + return "", errDisabled + } + return url.Host, nil +} + +// To read a response from a net.Conn, http.ReadResponse() takes a bufio.Reader. +// It's possible that this reader reads more than what's need for the response and stores +// those bytes in the buffer. +// bufConn wraps the original net.Conn and the bufio.Reader to make sure we don't lose the +// bytes in the buffer. +type bufConn struct { + net.Conn + r io.Reader +} + +func (c *bufConn) Read(b []byte) (int, error) { + return c.r.Read(b) +} + +func doHTTPConnectHandshake(ctx context.Context, conn net.Conn, addr string) (_ net.Conn, err error) { + defer func() { + if err != nil { + conn.Close() + } + }() + + req := (&http.Request{ + Method: http.MethodConnect, + URL: &url.URL{Host: addr}, + Header: map[string][]string{"User-Agent": {grpcUA}}, + }) + + if err := sendHTTPRequest(ctx, req, conn); err != nil { + return nil, fmt.Errorf("failed to write the HTTP request: %v", err) + } + + r := bufio.NewReader(conn) + resp, err := http.ReadResponse(r, req) + if err != nil { + return nil, fmt.Errorf("reading server HTTP response: %v", err) + } + defer resp.Body.Close() + if resp.StatusCode != http.StatusOK { + dump, err := httputil.DumpResponse(resp, true) + if err != nil { + return nil, fmt.Errorf("failed to do connect handshake, status code: %s", resp.Status) + } + return nil, fmt.Errorf("failed to do connect handshake, response: %q", dump) + } + + return &bufConn{Conn: conn, r: r}, nil +} + +// newProxyDialer returns a dialer that connects to proxy first if necessary. +// The returned dialer checks if a proxy is necessary, dial to the proxy with the +// provided dialer, does HTTP CONNECT handshake and returns the connection. +func newProxyDialer(dialer func(context.Context, string) (net.Conn, error)) func(context.Context, string) (net.Conn, error) { + return func(ctx context.Context, addr string) (conn net.Conn, err error) { + var skipHandshake bool + newAddr, err := mapAddress(ctx, addr) + if err != nil { + if err != errDisabled { + return nil, err + } + skipHandshake = true + newAddr = addr + } + + conn, err = dialer(ctx, newAddr) + if err != nil { + return + } + if !skipHandshake { + conn, err = doHTTPConnectHandshake(ctx, conn, addr) + } + return + } +} diff --git a/vendor/google.golang.org/grpc/proxy_test.go b/vendor/google.golang.org/grpc/proxy_test.go new file mode 100644 index 000000000..835b15af9 --- /dev/null +++ b/vendor/google.golang.org/grpc/proxy_test.go @@ -0,0 +1,177 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpc + +import ( + "bufio" + "io" + "net" + "net/http" + "net/url" + "testing" + "time" + + "golang.org/x/net/context" +) + +const ( + envTestAddr = "1.2.3.4:8080" + envProxyAddr = "2.3.4.5:7687" +) + +// overwriteAndRestore overwrite function httpProxyFromEnvironment and +// returns a function to restore the default values. +func overwrite(hpfe func(req *http.Request) (*url.URL, error)) func() { + backHPFE := httpProxyFromEnvironment + httpProxyFromEnvironment = hpfe + return func() { + httpProxyFromEnvironment = backHPFE + } +} + +func TestMapAddressEnv(t *testing.T) { + // Overwrite the function in the test and restore them in defer. + hpfe := func(req *http.Request) (*url.URL, error) { + if req.URL.Host == envTestAddr { + return &url.URL{ + Scheme: "https", + Host: envProxyAddr, + }, nil + } + return nil, nil + } + defer overwrite(hpfe)() + + // envTestAddr should be handled by ProxyFromEnvironment. + got, err := mapAddress(context.Background(), envTestAddr) + if err != nil { + t.Error(err) + } + if got != envProxyAddr { + t.Errorf("want %v, got %v", envProxyAddr, got) + } +} + +type proxyServer struct { + t *testing.T + lis net.Listener + in net.Conn + out net.Conn +} + +func (p *proxyServer) run() { + in, err := p.lis.Accept() + if err != nil { + return + } + p.in = in + + req, err := http.ReadRequest(bufio.NewReader(in)) + if err != nil { + p.t.Errorf("failed to read CONNECT req: %v", err) + return + } + if req.Method != http.MethodConnect || req.UserAgent() != grpcUA { + resp := http.Response{StatusCode: http.StatusMethodNotAllowed} + resp.Write(p.in) + p.in.Close() + p.t.Errorf("get wrong CONNECT req: %+v", req) + return + } + + out, err := net.Dial("tcp", req.URL.Host) + if err != nil { + p.t.Errorf("failed to dial to server: %v", err) + return + } + resp := http.Response{StatusCode: http.StatusOK, Proto: "HTTP/1.0"} + resp.Write(p.in) + p.out = out + go io.Copy(p.in, p.out) + go io.Copy(p.out, p.in) +} + +func (p *proxyServer) stop() { + p.lis.Close() + if p.in != nil { + p.in.Close() + } + if p.out != nil { + p.out.Close() + } +} + +func TestHTTPConnect(t *testing.T) { + plis, err := net.Listen("tcp", "localhost:0") + if err != nil { + t.Fatalf("failed to listen: %v", err) + } + p := &proxyServer{t: t, lis: plis} + go p.run() + defer p.stop() + + blis, err := net.Listen("tcp", "localhost:0") + if err != nil { + t.Fatalf("failed to listen: %v", err) + } + + msg := []byte{4, 3, 5, 2} + recvBuf := make([]byte, len(msg), len(msg)) + done := make(chan struct{}) + go func() { + in, err := blis.Accept() + if err != nil { + t.Errorf("failed to accept: %v", err) + return + } + defer in.Close() + in.Read(recvBuf) + close(done) + }() + + // Overwrite the function in the test and restore them in defer. + hpfe := func(req *http.Request) (*url.URL, error) { + return &url.URL{Host: plis.Addr().String()}, nil + } + defer overwrite(hpfe)() + + // Dial to proxy server. + dialer := newProxyDialer(func(ctx context.Context, addr string) (net.Conn, error) { + if deadline, ok := ctx.Deadline(); ok { + return net.DialTimeout("tcp", addr, deadline.Sub(time.Now())) + } + return net.Dial("tcp", addr) + }) + ctx, cancel := context.WithTimeout(context.Background(), time.Second) + defer cancel() + c, err := dialer(ctx, blis.Addr().String()) + if err != nil { + t.Fatalf("http connect Dial failed: %v", err) + } + defer c.Close() + + // Send msg on the connection. + c.Write(msg) + <-done + + // Check received msg. + if string(recvBuf) != string(msg) { + t.Fatalf("received msg: %v, want %v", recvBuf, msg) + } +} diff --git a/vendor/google.golang.org/grpc/rpc_util.go b/vendor/google.golang.org/grpc/rpc_util.go new file mode 100644 index 000000000..9ba1ce0c9 --- /dev/null +++ b/vendor/google.golang.org/grpc/rpc_util.go @@ -0,0 +1,515 @@ +/* + * + * Copyright 2014 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpc + +import ( + "bytes" + "compress/gzip" + "encoding/binary" + "io" + "io/ioutil" + "math" + "sync" + "time" + + "golang.org/x/net/context" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/credentials" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/peer" + "google.golang.org/grpc/stats" + "google.golang.org/grpc/status" + "google.golang.org/grpc/transport" +) + +// Compressor defines the interface gRPC uses to compress a message. +type Compressor interface { + // Do compresses p into w. + Do(w io.Writer, p []byte) error + // Type returns the compression algorithm the Compressor uses. + Type() string +} + +type gzipCompressor struct { + pool sync.Pool +} + +// NewGZIPCompressor creates a Compressor based on GZIP. +func NewGZIPCompressor() Compressor { + return &gzipCompressor{ + pool: sync.Pool{ + New: func() interface{} { + return gzip.NewWriter(ioutil.Discard) + }, + }, + } +} + +func (c *gzipCompressor) Do(w io.Writer, p []byte) error { + z := c.pool.Get().(*gzip.Writer) + defer c.pool.Put(z) + z.Reset(w) + if _, err := z.Write(p); err != nil { + return err + } + return z.Close() +} + +func (c *gzipCompressor) Type() string { + return "gzip" +} + +// Decompressor defines the interface gRPC uses to decompress a message. +type Decompressor interface { + // Do reads the data from r and uncompress them. + Do(r io.Reader) ([]byte, error) + // Type returns the compression algorithm the Decompressor uses. + Type() string +} + +type gzipDecompressor struct { + pool sync.Pool +} + +// NewGZIPDecompressor creates a Decompressor based on GZIP. +func NewGZIPDecompressor() Decompressor { + return &gzipDecompressor{} +} + +func (d *gzipDecompressor) Do(r io.Reader) ([]byte, error) { + var z *gzip.Reader + switch maybeZ := d.pool.Get().(type) { + case nil: + newZ, err := gzip.NewReader(r) + if err != nil { + return nil, err + } + z = newZ + case *gzip.Reader: + z = maybeZ + if err := z.Reset(r); err != nil { + d.pool.Put(z) + return nil, err + } + } + + defer func() { + z.Close() + d.pool.Put(z) + }() + return ioutil.ReadAll(z) +} + +func (d *gzipDecompressor) Type() string { + return "gzip" +} + +// callInfo contains all related configuration and information about an RPC. +type callInfo struct { + failFast bool + headerMD metadata.MD + trailerMD metadata.MD + peer *peer.Peer + traceInfo traceInfo // in trace.go + maxReceiveMessageSize *int + maxSendMessageSize *int + creds credentials.PerRPCCredentials +} + +var defaultCallInfo = callInfo{failFast: true} + +// CallOption configures a Call before it starts or extracts information from +// a Call after it completes. +type CallOption interface { + // before is called before the call is sent to any server. If before + // returns a non-nil error, the RPC fails with that error. + before(*callInfo) error + + // after is called after the call has completed. after cannot return an + // error, so any failures should be reported via output parameters. + after(*callInfo) +} + +// EmptyCallOption does not alter the Call configuration. +// It can be embedded in another structure to carry satellite data for use +// by interceptors. +type EmptyCallOption struct{} + +func (EmptyCallOption) before(*callInfo) error { return nil } +func (EmptyCallOption) after(*callInfo) {} + +type beforeCall func(c *callInfo) error + +func (o beforeCall) before(c *callInfo) error { return o(c) } +func (o beforeCall) after(c *callInfo) {} + +type afterCall func(c *callInfo) + +func (o afterCall) before(c *callInfo) error { return nil } +func (o afterCall) after(c *callInfo) { o(c) } + +// Header returns a CallOptions that retrieves the header metadata +// for a unary RPC. +func Header(md *metadata.MD) CallOption { + return afterCall(func(c *callInfo) { + *md = c.headerMD + }) +} + +// Trailer returns a CallOptions that retrieves the trailer metadata +// for a unary RPC. +func Trailer(md *metadata.MD) CallOption { + return afterCall(func(c *callInfo) { + *md = c.trailerMD + }) +} + +// Peer returns a CallOption that retrieves peer information for a +// unary RPC. +func Peer(peer *peer.Peer) CallOption { + return afterCall(func(c *callInfo) { + if c.peer != nil { + *peer = *c.peer + } + }) +} + +// FailFast configures the action to take when an RPC is attempted on broken +// connections or unreachable servers. If failfast is true, the RPC will fail +// immediately. Otherwise, the RPC client will block the call until a +// connection is available (or the call is canceled or times out) and will retry +// the call if it fails due to a transient error. Please refer to +// https://github.com/grpc/grpc/blob/master/doc/wait-for-ready.md. +// Note: failFast is default to true. +func FailFast(failFast bool) CallOption { + return beforeCall(func(c *callInfo) error { + c.failFast = failFast + return nil + }) +} + +// MaxCallRecvMsgSize returns a CallOption which sets the maximum message size the client can receive. +func MaxCallRecvMsgSize(s int) CallOption { + return beforeCall(func(o *callInfo) error { + o.maxReceiveMessageSize = &s + return nil + }) +} + +// MaxCallSendMsgSize returns a CallOption which sets the maximum message size the client can send. +func MaxCallSendMsgSize(s int) CallOption { + return beforeCall(func(o *callInfo) error { + o.maxSendMessageSize = &s + return nil + }) +} + +// PerRPCCredentials returns a CallOption that sets credentials.PerRPCCredentials +// for a call. +func PerRPCCredentials(creds credentials.PerRPCCredentials) CallOption { + return beforeCall(func(c *callInfo) error { + c.creds = creds + return nil + }) +} + +// The format of the payload: compressed or not? +type payloadFormat uint8 + +const ( + compressionNone payloadFormat = iota // no compression + compressionMade +) + +// parser reads complete gRPC messages from the underlying reader. +type parser struct { + // r is the underlying reader. + // See the comment on recvMsg for the permissible + // error types. + r io.Reader + + // The header of a gRPC message. Find more detail + // at https://grpc.io/docs/guides/wire.html. + header [5]byte +} + +// recvMsg reads a complete gRPC message from the stream. +// +// It returns the message and its payload (compression/encoding) +// format. The caller owns the returned msg memory. +// +// If there is an error, possible values are: +// * io.EOF, when no messages remain +// * io.ErrUnexpectedEOF +// * of type transport.ConnectionError +// * of type transport.StreamError +// No other error values or types must be returned, which also means +// that the underlying io.Reader must not return an incompatible +// error. +func (p *parser) recvMsg(maxReceiveMessageSize int) (pf payloadFormat, msg []byte, err error) { + if _, err := p.r.Read(p.header[:]); err != nil { + return 0, nil, err + } + + pf = payloadFormat(p.header[0]) + length := binary.BigEndian.Uint32(p.header[1:]) + + if length == 0 { + return pf, nil, nil + } + if length > uint32(maxReceiveMessageSize) { + return 0, nil, Errorf(codes.ResourceExhausted, "grpc: received message larger than max (%d vs. %d)", length, maxReceiveMessageSize) + } + // TODO(bradfitz,zhaoq): garbage. reuse buffer after proto decoding instead + // of making it for each message: + msg = make([]byte, int(length)) + if _, err := p.r.Read(msg); err != nil { + if err == io.EOF { + err = io.ErrUnexpectedEOF + } + return 0, nil, err + } + return pf, msg, nil +} + +// encode serializes msg and returns a buffer of message header and a buffer of msg. +// If msg is nil, it generates the message header and an empty msg buffer. +func encode(c Codec, msg interface{}, cp Compressor, cbuf *bytes.Buffer, outPayload *stats.OutPayload) ([]byte, []byte, error) { + var b []byte + const ( + payloadLen = 1 + sizeLen = 4 + ) + + if msg != nil { + var err error + b, err = c.Marshal(msg) + if err != nil { + return nil, nil, Errorf(codes.Internal, "grpc: error while marshaling: %v", err.Error()) + } + if outPayload != nil { + outPayload.Payload = msg + // TODO truncate large payload. + outPayload.Data = b + outPayload.Length = len(b) + } + if cp != nil { + if err := cp.Do(cbuf, b); err != nil { + return nil, nil, Errorf(codes.Internal, "grpc: error while compressing: %v", err.Error()) + } + b = cbuf.Bytes() + } + } + + if uint(len(b)) > math.MaxUint32 { + return nil, nil, Errorf(codes.ResourceExhausted, "grpc: message too large (%d bytes)", len(b)) + } + + bufHeader := make([]byte, payloadLen+sizeLen) + if cp == nil { + bufHeader[0] = byte(compressionNone) + } else { + bufHeader[0] = byte(compressionMade) + } + // Write length of b into buf + binary.BigEndian.PutUint32(bufHeader[payloadLen:], uint32(len(b))) + if outPayload != nil { + outPayload.WireLength = payloadLen + sizeLen + len(b) + } + return bufHeader, b, nil +} + +func checkRecvPayload(pf payloadFormat, recvCompress string, dc Decompressor) error { + switch pf { + case compressionNone: + case compressionMade: + if dc == nil || recvCompress != dc.Type() { + return Errorf(codes.Unimplemented, "grpc: Decompressor is not installed for grpc-encoding %q", recvCompress) + } + default: + return Errorf(codes.Internal, "grpc: received unexpected payload format %d", pf) + } + return nil +} + +func recv(p *parser, c Codec, s *transport.Stream, dc Decompressor, m interface{}, maxReceiveMessageSize int, inPayload *stats.InPayload) error { + pf, d, err := p.recvMsg(maxReceiveMessageSize) + if err != nil { + return err + } + if inPayload != nil { + inPayload.WireLength = len(d) + } + if err := checkRecvPayload(pf, s.RecvCompress(), dc); err != nil { + return err + } + if pf == compressionMade { + d, err = dc.Do(bytes.NewReader(d)) + if err != nil { + return Errorf(codes.Internal, "grpc: failed to decompress the received message %v", err) + } + } + if len(d) > maxReceiveMessageSize { + // TODO: Revisit the error code. Currently keep it consistent with java + // implementation. + return Errorf(codes.ResourceExhausted, "grpc: received message larger than max (%d vs. %d)", len(d), maxReceiveMessageSize) + } + if err := c.Unmarshal(d, m); err != nil { + return Errorf(codes.Internal, "grpc: failed to unmarshal the received message %v", err) + } + if inPayload != nil { + inPayload.RecvTime = time.Now() + inPayload.Payload = m + // TODO truncate large payload. + inPayload.Data = d + inPayload.Length = len(d) + } + return nil +} + +type rpcInfo struct { + bytesSent bool + bytesReceived bool +} + +type rpcInfoContextKey struct{} + +func newContextWithRPCInfo(ctx context.Context) context.Context { + return context.WithValue(ctx, rpcInfoContextKey{}, &rpcInfo{}) +} + +func rpcInfoFromContext(ctx context.Context) (s *rpcInfo, ok bool) { + s, ok = ctx.Value(rpcInfoContextKey{}).(*rpcInfo) + return +} + +func updateRPCInfoInContext(ctx context.Context, s rpcInfo) { + if ss, ok := rpcInfoFromContext(ctx); ok { + *ss = s + } + return +} + +// Code returns the error code for err if it was produced by the rpc system. +// Otherwise, it returns codes.Unknown. +// +// Deprecated; use status.FromError and Code method instead. +func Code(err error) codes.Code { + if s, ok := status.FromError(err); ok { + return s.Code() + } + return codes.Unknown +} + +// ErrorDesc returns the error description of err if it was produced by the rpc system. +// Otherwise, it returns err.Error() or empty string when err is nil. +// +// Deprecated; use status.FromError and Message method instead. +func ErrorDesc(err error) string { + if s, ok := status.FromError(err); ok { + return s.Message() + } + return err.Error() +} + +// Errorf returns an error containing an error code and a description; +// Errorf returns nil if c is OK. +// +// Deprecated; use status.Errorf instead. +func Errorf(c codes.Code, format string, a ...interface{}) error { + return status.Errorf(c, format, a...) +} + +// MethodConfig defines the configuration recommended by the service providers for a +// particular method. +// This is EXPERIMENTAL and subject to change. +type MethodConfig struct { + // WaitForReady indicates whether RPCs sent to this method should wait until + // the connection is ready by default (!failfast). The value specified via the + // gRPC client API will override the value set here. + WaitForReady *bool + // Timeout is the default timeout for RPCs sent to this method. The actual + // deadline used will be the minimum of the value specified here and the value + // set by the application via the gRPC client API. If either one is not set, + // then the other will be used. If neither is set, then the RPC has no deadline. + Timeout *time.Duration + // MaxReqSize is the maximum allowed payload size for an individual request in a + // stream (client->server) in bytes. The size which is measured is the serialized + // payload after per-message compression (but before stream compression) in bytes. + // The actual value used is the minumum of the value specified here and the value set + // by the application via the gRPC client API. If either one is not set, then the other + // will be used. If neither is set, then the built-in default is used. + MaxReqSize *int + // MaxRespSize is the maximum allowed payload size for an individual response in a + // stream (server->client) in bytes. + MaxRespSize *int +} + +// ServiceConfig is provided by the service provider and contains parameters for how +// clients that connect to the service should behave. +// This is EXPERIMENTAL and subject to change. +type ServiceConfig struct { + // LB is the load balancer the service providers recommends. The balancer specified + // via grpc.WithBalancer will override this. + LB Balancer + // Methods contains a map for the methods in this service. + // If there is an exact match for a method (i.e. /service/method) in the map, use the corresponding MethodConfig. + // If there's no exact match, look for the default config for the service (/service/) and use the corresponding MethodConfig if it exists. + // Otherwise, the method has no MethodConfig to use. + Methods map[string]MethodConfig +} + +func min(a, b *int) *int { + if *a < *b { + return a + } + return b +} + +func getMaxSize(mcMax, doptMax *int, defaultVal int) *int { + if mcMax == nil && doptMax == nil { + return &defaultVal + } + if mcMax != nil && doptMax != nil { + return min(mcMax, doptMax) + } + if mcMax != nil { + return mcMax + } + return doptMax +} + +// SupportPackageIsVersion3 is referenced from generated protocol buffer files. +// The latest support package version is 4. +// SupportPackageIsVersion3 is kept for compability. It will be removed in the +// next support package version update. +const SupportPackageIsVersion3 = true + +// SupportPackageIsVersion4 is referenced from generated protocol buffer files +// to assert that that code is compatible with this version of the grpc package. +// +// This constant may be renamed in the future if a change in the generated code +// requires a synchronised update of grpc-go and protoc-gen-go. This constant +// should not be referenced from any other code. +const SupportPackageIsVersion4 = true + +// Version is the current grpc version. +const Version = "1.6.0" + +const grpcUA = "grpc-go/" + Version diff --git a/vendor/google.golang.org/grpc/rpc_util_test.go b/vendor/google.golang.org/grpc/rpc_util_test.go new file mode 100644 index 000000000..23c471e2e --- /dev/null +++ b/vendor/google.golang.org/grpc/rpc_util_test.go @@ -0,0 +1,237 @@ +/* + * + * Copyright 2014 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpc + +import ( + "bytes" + "io" + "math" + "reflect" + "testing" + + "github.com/golang/protobuf/proto" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + perfpb "google.golang.org/grpc/test/codec_perf" + "google.golang.org/grpc/transport" +) + +type fullReader struct { + reader io.Reader +} + +func (f fullReader) Read(p []byte) (int, error) { + return io.ReadFull(f.reader, p) +} + +var _ CallOption = EmptyCallOption{} // ensure EmptyCallOption implements the interface + +func TestSimpleParsing(t *testing.T) { + bigMsg := bytes.Repeat([]byte{'x'}, 1<<24) + for _, test := range []struct { + // input + p []byte + // outputs + err error + b []byte + pt payloadFormat + }{ + {nil, io.EOF, nil, compressionNone}, + {[]byte{0, 0, 0, 0, 0}, nil, nil, compressionNone}, + {[]byte{0, 0, 0, 0, 1, 'a'}, nil, []byte{'a'}, compressionNone}, + {[]byte{1, 0}, io.ErrUnexpectedEOF, nil, compressionNone}, + {[]byte{0, 0, 0, 0, 10, 'a'}, io.ErrUnexpectedEOF, nil, compressionNone}, + // Check that messages with length >= 2^24 are parsed. + {append([]byte{0, 1, 0, 0, 0}, bigMsg...), nil, bigMsg, compressionNone}, + } { + buf := fullReader{bytes.NewReader(test.p)} + parser := &parser{r: buf} + pt, b, err := parser.recvMsg(math.MaxInt32) + if err != test.err || !bytes.Equal(b, test.b) || pt != test.pt { + t.Fatalf("parser{%v}.recvMsg(_) = %v, %v, %v\nwant %v, %v, %v", test.p, pt, b, err, test.pt, test.b, test.err) + } + } +} + +func TestMultipleParsing(t *testing.T) { + // Set a byte stream consists of 3 messages with their headers. + p := []byte{0, 0, 0, 0, 1, 'a', 0, 0, 0, 0, 2, 'b', 'c', 0, 0, 0, 0, 1, 'd'} + b := fullReader{bytes.NewReader(p)} + parser := &parser{r: b} + + wantRecvs := []struct { + pt payloadFormat + data []byte + }{ + {compressionNone, []byte("a")}, + {compressionNone, []byte("bc")}, + {compressionNone, []byte("d")}, + } + for i, want := range wantRecvs { + pt, data, err := parser.recvMsg(math.MaxInt32) + if err != nil || pt != want.pt || !reflect.DeepEqual(data, want.data) { + t.Fatalf("after %d calls, parser{%v}.recvMsg(_) = %v, %v, %v\nwant %v, %v, <nil>", + i, p, pt, data, err, want.pt, want.data) + } + } + + pt, data, err := parser.recvMsg(math.MaxInt32) + if err != io.EOF { + t.Fatalf("after %d recvMsgs calls, parser{%v}.recvMsg(_) = %v, %v, %v\nwant _, _, %v", + len(wantRecvs), p, pt, data, err, io.EOF) + } +} + +func TestEncode(t *testing.T) { + for _, test := range []struct { + // input + msg proto.Message + cp Compressor + // outputs + hdr []byte + data []byte + err error + }{ + {nil, nil, []byte{0, 0, 0, 0, 0}, []byte{}, nil}, + } { + hdr, data, err := encode(protoCodec{}, test.msg, nil, nil, nil) + if err != test.err || !bytes.Equal(hdr, test.hdr) || !bytes.Equal(data, test.data) { + t.Fatalf("encode(_, _, %v, _) = %v, %v, %v\nwant %v, %v, %v", test.cp, hdr, data, err, test.hdr, test.data, test.err) + } + } +} + +func TestCompress(t *testing.T) { + for _, test := range []struct { + // input + data []byte + cp Compressor + dc Decompressor + // outputs + err error + }{ + {make([]byte, 1024), NewGZIPCompressor(), NewGZIPDecompressor(), nil}, + } { + b := new(bytes.Buffer) + if err := test.cp.Do(b, test.data); err != test.err { + t.Fatalf("Compressor.Do(_, %v) = %v, want %v", test.data, err, test.err) + } + if b.Len() >= len(test.data) { + t.Fatalf("The compressor fails to compress data.") + } + if p, err := test.dc.Do(b); err != nil || !bytes.Equal(test.data, p) { + t.Fatalf("Decompressor.Do(%v) = %v, %v, want %v, <nil>", b, p, err, test.data) + } + } +} + +func TestToRPCErr(t *testing.T) { + for _, test := range []struct { + // input + errIn error + // outputs + errOut error + }{ + {transport.StreamError{Code: codes.Unknown, Desc: ""}, status.Error(codes.Unknown, "")}, + {transport.ErrConnClosing, status.Error(codes.Unavailable, transport.ErrConnClosing.Desc)}, + } { + err := toRPCErr(test.errIn) + if _, ok := status.FromError(err); !ok { + t.Fatalf("toRPCErr{%v} returned type %T, want %T", test.errIn, err, status.Error(codes.Unknown, "")) + } + if !reflect.DeepEqual(err, test.errOut) { + t.Fatalf("toRPCErr{%v} = %v \nwant %v", test.errIn, err, test.errOut) + } + } +} + +// bmEncode benchmarks encoding a Protocol Buffer message containing mSize +// bytes. +func bmEncode(b *testing.B, mSize int) { + msg := &perfpb.Buffer{Body: make([]byte, mSize)} + encodeHdr, encodeData, _ := encode(protoCodec{}, msg, nil, nil, nil) + encodedSz := int64(len(encodeHdr) + len(encodeData)) + b.ReportAllocs() + b.ResetTimer() + for i := 0; i < b.N; i++ { + encode(protoCodec{}, msg, nil, nil, nil) + } + b.SetBytes(encodedSz) +} + +func BenchmarkEncode1B(b *testing.B) { + bmEncode(b, 1) +} + +func BenchmarkEncode1KiB(b *testing.B) { + bmEncode(b, 1024) +} + +func BenchmarkEncode8KiB(b *testing.B) { + bmEncode(b, 8*1024) +} + +func BenchmarkEncode64KiB(b *testing.B) { + bmEncode(b, 64*1024) +} + +func BenchmarkEncode512KiB(b *testing.B) { + bmEncode(b, 512*1024) +} + +func BenchmarkEncode1MiB(b *testing.B) { + bmEncode(b, 1024*1024) +} + +// bmCompressor benchmarks a compressor of a Protocol Buffer message containing +// mSize bytes. +func bmCompressor(b *testing.B, mSize int, cp Compressor) { + payload := make([]byte, mSize) + cBuf := bytes.NewBuffer(make([]byte, mSize)) + b.ReportAllocs() + b.ResetTimer() + for i := 0; i < b.N; i++ { + cp.Do(cBuf, payload) + cBuf.Reset() + } +} + +func BenchmarkGZIPCompressor1B(b *testing.B) { + bmCompressor(b, 1, NewGZIPCompressor()) +} + +func BenchmarkGZIPCompressor1KiB(b *testing.B) { + bmCompressor(b, 1024, NewGZIPCompressor()) +} + +func BenchmarkGZIPCompressor8KiB(b *testing.B) { + bmCompressor(b, 8*1024, NewGZIPCompressor()) +} + +func BenchmarkGZIPCompressor64KiB(b *testing.B) { + bmCompressor(b, 64*1024, NewGZIPCompressor()) +} + +func BenchmarkGZIPCompressor512KiB(b *testing.B) { + bmCompressor(b, 512*1024, NewGZIPCompressor()) +} + +func BenchmarkGZIPCompressor1MiB(b *testing.B) { + bmCompressor(b, 1024*1024, NewGZIPCompressor()) +} diff --git a/vendor/google.golang.org/grpc/server.go b/vendor/google.golang.org/grpc/server.go new file mode 100644 index 000000000..86fe20a53 --- /dev/null +++ b/vendor/google.golang.org/grpc/server.go @@ -0,0 +1,1160 @@ +/* + * + * Copyright 2014 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpc + +import ( + "bytes" + "errors" + "fmt" + "io" + "math" + "net" + "net/http" + "reflect" + "runtime" + "strings" + "sync" + "time" + + "golang.org/x/net/context" + "golang.org/x/net/http2" + "golang.org/x/net/trace" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/credentials" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/internal" + "google.golang.org/grpc/keepalive" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/stats" + "google.golang.org/grpc/status" + "google.golang.org/grpc/tap" + "google.golang.org/grpc/transport" +) + +const ( + defaultServerMaxReceiveMessageSize = 1024 * 1024 * 4 + defaultServerMaxSendMessageSize = math.MaxInt32 +) + +type methodHandler func(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor UnaryServerInterceptor) (interface{}, error) + +// MethodDesc represents an RPC service's method specification. +type MethodDesc struct { + MethodName string + Handler methodHandler +} + +// ServiceDesc represents an RPC service's specification. +type ServiceDesc struct { + ServiceName string + // The pointer to the service interface. Used to check whether the user + // provided implementation satisfies the interface requirements. + HandlerType interface{} + Methods []MethodDesc + Streams []StreamDesc + Metadata interface{} +} + +// service consists of the information of the server serving this service and +// the methods in this service. +type service struct { + server interface{} // the server for service methods + md map[string]*MethodDesc + sd map[string]*StreamDesc + mdata interface{} +} + +// Server is a gRPC server to serve RPC requests. +type Server struct { + opts options + + mu sync.Mutex // guards following + lis map[net.Listener]bool + conns map[io.Closer]bool + serve bool + drain bool + ctx context.Context + cancel context.CancelFunc + // A CondVar to let GracefulStop() blocks until all the pending RPCs are finished + // and all the transport goes away. + cv *sync.Cond + m map[string]*service // service name -> service info + events trace.EventLog +} + +type options struct { + creds credentials.TransportCredentials + codec Codec + cp Compressor + dc Decompressor + unaryInt UnaryServerInterceptor + streamInt StreamServerInterceptor + inTapHandle tap.ServerInHandle + statsHandler stats.Handler + maxConcurrentStreams uint32 + maxReceiveMessageSize int + maxSendMessageSize int + useHandlerImpl bool // use http.Handler-based server + unknownStreamDesc *StreamDesc + keepaliveParams keepalive.ServerParameters + keepalivePolicy keepalive.EnforcementPolicy + initialWindowSize int32 + initialConnWindowSize int32 +} + +var defaultServerOptions = options{ + maxReceiveMessageSize: defaultServerMaxReceiveMessageSize, + maxSendMessageSize: defaultServerMaxSendMessageSize, +} + +// A ServerOption sets options such as credentials, codec and keepalive parameters, etc. +type ServerOption func(*options) + +// InitialWindowSize returns a ServerOption that sets window size for stream. +// The lower bound for window size is 64K and any value smaller than that will be ignored. +func InitialWindowSize(s int32) ServerOption { + return func(o *options) { + o.initialWindowSize = s + } +} + +// InitialConnWindowSize returns a ServerOption that sets window size for a connection. +// The lower bound for window size is 64K and any value smaller than that will be ignored. +func InitialConnWindowSize(s int32) ServerOption { + return func(o *options) { + o.initialConnWindowSize = s + } +} + +// KeepaliveParams returns a ServerOption that sets keepalive and max-age parameters for the server. +func KeepaliveParams(kp keepalive.ServerParameters) ServerOption { + return func(o *options) { + o.keepaliveParams = kp + } +} + +// KeepaliveEnforcementPolicy returns a ServerOption that sets keepalive enforcement policy for the server. +func KeepaliveEnforcementPolicy(kep keepalive.EnforcementPolicy) ServerOption { + return func(o *options) { + o.keepalivePolicy = kep + } +} + +// CustomCodec returns a ServerOption that sets a codec for message marshaling and unmarshaling. +func CustomCodec(codec Codec) ServerOption { + return func(o *options) { + o.codec = codec + } +} + +// RPCCompressor returns a ServerOption that sets a compressor for outbound messages. +func RPCCompressor(cp Compressor) ServerOption { + return func(o *options) { + o.cp = cp + } +} + +// RPCDecompressor returns a ServerOption that sets a decompressor for inbound messages. +func RPCDecompressor(dc Decompressor) ServerOption { + return func(o *options) { + o.dc = dc + } +} + +// MaxMsgSize returns a ServerOption to set the max message size in bytes the server can receive. +// If this is not set, gRPC uses the default limit. Deprecated: use MaxRecvMsgSize instead. +func MaxMsgSize(m int) ServerOption { + return MaxRecvMsgSize(m) +} + +// MaxRecvMsgSize returns a ServerOption to set the max message size in bytes the server can receive. +// If this is not set, gRPC uses the default 4MB. +func MaxRecvMsgSize(m int) ServerOption { + return func(o *options) { + o.maxReceiveMessageSize = m + } +} + +// MaxSendMsgSize returns a ServerOption to set the max message size in bytes the server can send. +// If this is not set, gRPC uses the default 4MB. +func MaxSendMsgSize(m int) ServerOption { + return func(o *options) { + o.maxSendMessageSize = m + } +} + +// MaxConcurrentStreams returns a ServerOption that will apply a limit on the number +// of concurrent streams to each ServerTransport. +func MaxConcurrentStreams(n uint32) ServerOption { + return func(o *options) { + o.maxConcurrentStreams = n + } +} + +// Creds returns a ServerOption that sets credentials for server connections. +func Creds(c credentials.TransportCredentials) ServerOption { + return func(o *options) { + o.creds = c + } +} + +// UnaryInterceptor returns a ServerOption that sets the UnaryServerInterceptor for the +// server. Only one unary interceptor can be installed. The construction of multiple +// interceptors (e.g., chaining) can be implemented at the caller. +func UnaryInterceptor(i UnaryServerInterceptor) ServerOption { + return func(o *options) { + if o.unaryInt != nil { + panic("The unary server interceptor was already set and may not be reset.") + } + o.unaryInt = i + } +} + +// StreamInterceptor returns a ServerOption that sets the StreamServerInterceptor for the +// server. Only one stream interceptor can be installed. +func StreamInterceptor(i StreamServerInterceptor) ServerOption { + return func(o *options) { + if o.streamInt != nil { + panic("The stream server interceptor was already set and may not be reset.") + } + o.streamInt = i + } +} + +// InTapHandle returns a ServerOption that sets the tap handle for all the server +// transport to be created. Only one can be installed. +func InTapHandle(h tap.ServerInHandle) ServerOption { + return func(o *options) { + if o.inTapHandle != nil { + panic("The tap handle was already set and may not be reset.") + } + o.inTapHandle = h + } +} + +// StatsHandler returns a ServerOption that sets the stats handler for the server. +func StatsHandler(h stats.Handler) ServerOption { + return func(o *options) { + o.statsHandler = h + } +} + +// UnknownServiceHandler returns a ServerOption that allows for adding a custom +// unknown service handler. The provided method is a bidi-streaming RPC service +// handler that will be invoked instead of returning the "unimplemented" gRPC +// error whenever a request is received for an unregistered service or method. +// The handling function has full access to the Context of the request and the +// stream, and the invocation passes through interceptors. +func UnknownServiceHandler(streamHandler StreamHandler) ServerOption { + return func(o *options) { + o.unknownStreamDesc = &StreamDesc{ + StreamName: "unknown_service_handler", + Handler: streamHandler, + // We need to assume that the users of the streamHandler will want to use both. + ClientStreams: true, + ServerStreams: true, + } + } +} + +// NewServer creates a gRPC server which has no service registered and has not +// started to accept requests yet. +func NewServer(opt ...ServerOption) *Server { + opts := defaultServerOptions + for _, o := range opt { + o(&opts) + } + if opts.codec == nil { + // Set the default codec. + opts.codec = protoCodec{} + } + s := &Server{ + lis: make(map[net.Listener]bool), + opts: opts, + conns: make(map[io.Closer]bool), + m: make(map[string]*service), + } + s.cv = sync.NewCond(&s.mu) + s.ctx, s.cancel = context.WithCancel(context.Background()) + if EnableTracing { + _, file, line, _ := runtime.Caller(1) + s.events = trace.NewEventLog("grpc.Server", fmt.Sprintf("%s:%d", file, line)) + } + return s +} + +// printf records an event in s's event log, unless s has been stopped. +// REQUIRES s.mu is held. +func (s *Server) printf(format string, a ...interface{}) { + if s.events != nil { + s.events.Printf(format, a...) + } +} + +// errorf records an error in s's event log, unless s has been stopped. +// REQUIRES s.mu is held. +func (s *Server) errorf(format string, a ...interface{}) { + if s.events != nil { + s.events.Errorf(format, a...) + } +} + +// RegisterService registers a service and its implementation to the gRPC +// server. It is called from the IDL generated code. This must be called before +// invoking Serve. +func (s *Server) RegisterService(sd *ServiceDesc, ss interface{}) { + ht := reflect.TypeOf(sd.HandlerType).Elem() + st := reflect.TypeOf(ss) + if !st.Implements(ht) { + grpclog.Fatalf("grpc: Server.RegisterService found the handler of type %v that does not satisfy %v", st, ht) + } + s.register(sd, ss) +} + +func (s *Server) register(sd *ServiceDesc, ss interface{}) { + s.mu.Lock() + defer s.mu.Unlock() + s.printf("RegisterService(%q)", sd.ServiceName) + if s.serve { + grpclog.Fatalf("grpc: Server.RegisterService after Server.Serve for %q", sd.ServiceName) + } + if _, ok := s.m[sd.ServiceName]; ok { + grpclog.Fatalf("grpc: Server.RegisterService found duplicate service registration for %q", sd.ServiceName) + } + srv := &service{ + server: ss, + md: make(map[string]*MethodDesc), + sd: make(map[string]*StreamDesc), + mdata: sd.Metadata, + } + for i := range sd.Methods { + d := &sd.Methods[i] + srv.md[d.MethodName] = d + } + for i := range sd.Streams { + d := &sd.Streams[i] + srv.sd[d.StreamName] = d + } + s.m[sd.ServiceName] = srv +} + +// MethodInfo contains the information of an RPC including its method name and type. +type MethodInfo struct { + // Name is the method name only, without the service name or package name. + Name string + // IsClientStream indicates whether the RPC is a client streaming RPC. + IsClientStream bool + // IsServerStream indicates whether the RPC is a server streaming RPC. + IsServerStream bool +} + +// ServiceInfo contains unary RPC method info, streaming RPC method info and metadata for a service. +type ServiceInfo struct { + Methods []MethodInfo + // Metadata is the metadata specified in ServiceDesc when registering service. + Metadata interface{} +} + +// GetServiceInfo returns a map from service names to ServiceInfo. +// Service names include the package names, in the form of <package>.<service>. +func (s *Server) GetServiceInfo() map[string]ServiceInfo { + ret := make(map[string]ServiceInfo) + for n, srv := range s.m { + methods := make([]MethodInfo, 0, len(srv.md)+len(srv.sd)) + for m := range srv.md { + methods = append(methods, MethodInfo{ + Name: m, + IsClientStream: false, + IsServerStream: false, + }) + } + for m, d := range srv.sd { + methods = append(methods, MethodInfo{ + Name: m, + IsClientStream: d.ClientStreams, + IsServerStream: d.ServerStreams, + }) + } + + ret[n] = ServiceInfo{ + Methods: methods, + Metadata: srv.mdata, + } + } + return ret +} + +var ( + // ErrServerStopped indicates that the operation is now illegal because of + // the server being stopped. + ErrServerStopped = errors.New("grpc: the server has been stopped") +) + +func (s *Server) useTransportAuthenticator(rawConn net.Conn) (net.Conn, credentials.AuthInfo, error) { + if s.opts.creds == nil { + return rawConn, nil, nil + } + return s.opts.creds.ServerHandshake(rawConn) +} + +// Serve accepts incoming connections on the listener lis, creating a new +// ServerTransport and service goroutine for each. The service goroutines +// read gRPC requests and then call the registered handlers to reply to them. +// Serve returns when lis.Accept fails with fatal errors. lis will be closed when +// this method returns. +// Serve always returns non-nil error. +func (s *Server) Serve(lis net.Listener) error { + s.mu.Lock() + s.printf("serving") + s.serve = true + if s.lis == nil { + s.mu.Unlock() + lis.Close() + return ErrServerStopped + } + s.lis[lis] = true + s.mu.Unlock() + defer func() { + s.mu.Lock() + if s.lis != nil && s.lis[lis] { + lis.Close() + delete(s.lis, lis) + } + s.mu.Unlock() + }() + + var tempDelay time.Duration // how long to sleep on accept failure + + for { + rawConn, err := lis.Accept() + if err != nil { + if ne, ok := err.(interface { + Temporary() bool + }); ok && ne.Temporary() { + if tempDelay == 0 { + tempDelay = 5 * time.Millisecond + } else { + tempDelay *= 2 + } + if max := 1 * time.Second; tempDelay > max { + tempDelay = max + } + s.mu.Lock() + s.printf("Accept error: %v; retrying in %v", err, tempDelay) + s.mu.Unlock() + timer := time.NewTimer(tempDelay) + select { + case <-timer.C: + case <-s.ctx.Done(): + } + timer.Stop() + continue + } + s.mu.Lock() + s.printf("done serving; Accept = %v", err) + s.mu.Unlock() + return err + } + tempDelay = 0 + // Start a new goroutine to deal with rawConn + // so we don't stall this Accept loop goroutine. + go s.handleRawConn(rawConn) + } +} + +// handleRawConn is run in its own goroutine and handles a just-accepted +// connection that has not had any I/O performed on it yet. +func (s *Server) handleRawConn(rawConn net.Conn) { + conn, authInfo, err := s.useTransportAuthenticator(rawConn) + if err != nil { + s.mu.Lock() + s.errorf("ServerHandshake(%q) failed: %v", rawConn.RemoteAddr(), err) + s.mu.Unlock() + grpclog.Warningf("grpc: Server.Serve failed to complete security handshake from %q: %v", rawConn.RemoteAddr(), err) + // If serverHandShake returns ErrConnDispatched, keep rawConn open. + if err != credentials.ErrConnDispatched { + rawConn.Close() + } + return + } + + s.mu.Lock() + if s.conns == nil { + s.mu.Unlock() + conn.Close() + return + } + s.mu.Unlock() + + if s.opts.useHandlerImpl { + s.serveUsingHandler(conn) + } else { + s.serveHTTP2Transport(conn, authInfo) + } +} + +// serveHTTP2Transport sets up a http/2 transport (using the +// gRPC http2 server transport in transport/http2_server.go) and +// serves streams on it. +// This is run in its own goroutine (it does network I/O in +// transport.NewServerTransport). +func (s *Server) serveHTTP2Transport(c net.Conn, authInfo credentials.AuthInfo) { + config := &transport.ServerConfig{ + MaxStreams: s.opts.maxConcurrentStreams, + AuthInfo: authInfo, + InTapHandle: s.opts.inTapHandle, + StatsHandler: s.opts.statsHandler, + KeepaliveParams: s.opts.keepaliveParams, + KeepalivePolicy: s.opts.keepalivePolicy, + InitialWindowSize: s.opts.initialWindowSize, + InitialConnWindowSize: s.opts.initialConnWindowSize, + } + st, err := transport.NewServerTransport("http2", c, config) + if err != nil { + s.mu.Lock() + s.errorf("NewServerTransport(%q) failed: %v", c.RemoteAddr(), err) + s.mu.Unlock() + c.Close() + grpclog.Warningln("grpc: Server.Serve failed to create ServerTransport: ", err) + return + } + if !s.addConn(st) { + st.Close() + return + } + s.serveStreams(st) +} + +func (s *Server) serveStreams(st transport.ServerTransport) { + defer s.removeConn(st) + defer st.Close() + var wg sync.WaitGroup + st.HandleStreams(func(stream *transport.Stream) { + wg.Add(1) + go func() { + defer wg.Done() + s.handleStream(st, stream, s.traceInfo(st, stream)) + }() + }, func(ctx context.Context, method string) context.Context { + if !EnableTracing { + return ctx + } + tr := trace.New("grpc.Recv."+methodFamily(method), method) + return trace.NewContext(ctx, tr) + }) + wg.Wait() +} + +var _ http.Handler = (*Server)(nil) + +// serveUsingHandler is called from handleRawConn when s is configured +// to handle requests via the http.Handler interface. It sets up a +// net/http.Server to handle the just-accepted conn. The http.Server +// is configured to route all incoming requests (all HTTP/2 streams) +// to ServeHTTP, which creates a new ServerTransport for each stream. +// serveUsingHandler blocks until conn closes. +// +// This codepath is only used when Server.TestingUseHandlerImpl has +// been configured. This lets the end2end tests exercise the ServeHTTP +// method as one of the environment types. +// +// conn is the *tls.Conn that's already been authenticated. +func (s *Server) serveUsingHandler(conn net.Conn) { + if !s.addConn(conn) { + conn.Close() + return + } + defer s.removeConn(conn) + h2s := &http2.Server{ + MaxConcurrentStreams: s.opts.maxConcurrentStreams, + } + h2s.ServeConn(conn, &http2.ServeConnOpts{ + Handler: s, + }) +} + +// ServeHTTP implements the Go standard library's http.Handler +// interface by responding to the gRPC request r, by looking up +// the requested gRPC method in the gRPC server s. +// +// The provided HTTP request must have arrived on an HTTP/2 +// connection. When using the Go standard library's server, +// practically this means that the Request must also have arrived +// over TLS. +// +// To share one port (such as 443 for https) between gRPC and an +// existing http.Handler, use a root http.Handler such as: +// +// if r.ProtoMajor == 2 && strings.HasPrefix( +// r.Header.Get("Content-Type"), "application/grpc") { +// grpcServer.ServeHTTP(w, r) +// } else { +// yourMux.ServeHTTP(w, r) +// } +// +// Note that ServeHTTP uses Go's HTTP/2 server implementation which is totally +// separate from grpc-go's HTTP/2 server. Performance and features may vary +// between the two paths. ServeHTTP does not support some gRPC features +// available through grpc-go's HTTP/2 server, and it is currently EXPERIMENTAL +// and subject to change. +func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { + st, err := transport.NewServerHandlerTransport(w, r) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + if !s.addConn(st) { + st.Close() + return + } + defer s.removeConn(st) + s.serveStreams(st) +} + +// traceInfo returns a traceInfo and associates it with stream, if tracing is enabled. +// If tracing is not enabled, it returns nil. +func (s *Server) traceInfo(st transport.ServerTransport, stream *transport.Stream) (trInfo *traceInfo) { + tr, ok := trace.FromContext(stream.Context()) + if !ok { + return nil + } + + trInfo = &traceInfo{ + tr: tr, + } + trInfo.firstLine.client = false + trInfo.firstLine.remoteAddr = st.RemoteAddr() + + if dl, ok := stream.Context().Deadline(); ok { + trInfo.firstLine.deadline = dl.Sub(time.Now()) + } + return trInfo +} + +func (s *Server) addConn(c io.Closer) bool { + s.mu.Lock() + defer s.mu.Unlock() + if s.conns == nil || s.drain { + return false + } + s.conns[c] = true + return true +} + +func (s *Server) removeConn(c io.Closer) { + s.mu.Lock() + defer s.mu.Unlock() + if s.conns != nil { + delete(s.conns, c) + s.cv.Broadcast() + } +} + +func (s *Server) sendResponse(t transport.ServerTransport, stream *transport.Stream, msg interface{}, cp Compressor, opts *transport.Options) error { + var ( + cbuf *bytes.Buffer + outPayload *stats.OutPayload + ) + if cp != nil { + cbuf = new(bytes.Buffer) + } + if s.opts.statsHandler != nil { + outPayload = &stats.OutPayload{} + } + hdr, data, err := encode(s.opts.codec, msg, cp, cbuf, outPayload) + if err != nil { + grpclog.Errorln("grpc: server failed to encode response: ", err) + return err + } + if len(data) > s.opts.maxSendMessageSize { + return status.Errorf(codes.ResourceExhausted, "grpc: trying to send message larger than max (%d vs. %d)", len(data), s.opts.maxSendMessageSize) + } + err = t.Write(stream, hdr, data, opts) + if err == nil && outPayload != nil { + outPayload.SentTime = time.Now() + s.opts.statsHandler.HandleRPC(stream.Context(), outPayload) + } + return err +} + +func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.Stream, srv *service, md *MethodDesc, trInfo *traceInfo) (err error) { + sh := s.opts.statsHandler + if sh != nil { + begin := &stats.Begin{ + BeginTime: time.Now(), + } + sh.HandleRPC(stream.Context(), begin) + defer func() { + end := &stats.End{ + EndTime: time.Now(), + } + if err != nil && err != io.EOF { + end.Error = toRPCErr(err) + } + sh.HandleRPC(stream.Context(), end) + }() + } + if trInfo != nil { + defer trInfo.tr.Finish() + trInfo.firstLine.client = false + trInfo.tr.LazyLog(&trInfo.firstLine, false) + defer func() { + if err != nil && err != io.EOF { + trInfo.tr.LazyLog(&fmtStringer{"%v", []interface{}{err}}, true) + trInfo.tr.SetError() + } + }() + } + if s.opts.cp != nil { + // NOTE: this needs to be ahead of all handling, https://github.com/grpc/grpc-go/issues/686. + stream.SetSendCompress(s.opts.cp.Type()) + } + p := &parser{r: stream} + pf, req, err := p.recvMsg(s.opts.maxReceiveMessageSize) + if err == io.EOF { + // The entire stream is done (for unary RPC only). + return err + } + if err == io.ErrUnexpectedEOF { + err = Errorf(codes.Internal, io.ErrUnexpectedEOF.Error()) + } + if err != nil { + if st, ok := status.FromError(err); ok { + if e := t.WriteStatus(stream, st); e != nil { + grpclog.Warningf("grpc: Server.processUnaryRPC failed to write status %v", e) + } + } else { + switch st := err.(type) { + case transport.ConnectionError: + // Nothing to do here. + case transport.StreamError: + if e := t.WriteStatus(stream, status.New(st.Code, st.Desc)); e != nil { + grpclog.Warningf("grpc: Server.processUnaryRPC failed to write status %v", e) + } + default: + panic(fmt.Sprintf("grpc: Unexpected error (%T) from recvMsg: %v", st, st)) + } + } + return err + } + + if err := checkRecvPayload(pf, stream.RecvCompress(), s.opts.dc); err != nil { + if st, ok := status.FromError(err); ok { + if e := t.WriteStatus(stream, st); e != nil { + grpclog.Warningf("grpc: Server.processUnaryRPC failed to write status %v", e) + } + return err + } + if e := t.WriteStatus(stream, status.New(codes.Internal, err.Error())); e != nil { + grpclog.Warningf("grpc: Server.processUnaryRPC failed to write status %v", e) + } + + // TODO checkRecvPayload always return RPC error. Add a return here if necessary. + } + var inPayload *stats.InPayload + if sh != nil { + inPayload = &stats.InPayload{ + RecvTime: time.Now(), + } + } + df := func(v interface{}) error { + if inPayload != nil { + inPayload.WireLength = len(req) + } + if pf == compressionMade { + var err error + req, err = s.opts.dc.Do(bytes.NewReader(req)) + if err != nil { + return Errorf(codes.Internal, err.Error()) + } + } + if len(req) > s.opts.maxReceiveMessageSize { + // TODO: Revisit the error code. Currently keep it consistent with + // java implementation. + return status.Errorf(codes.ResourceExhausted, "grpc: received message larger than max (%d vs. %d)", len(req), s.opts.maxReceiveMessageSize) + } + if err := s.opts.codec.Unmarshal(req, v); err != nil { + return status.Errorf(codes.Internal, "grpc: error unmarshalling request: %v", err) + } + if inPayload != nil { + inPayload.Payload = v + inPayload.Data = req + inPayload.Length = len(req) + sh.HandleRPC(stream.Context(), inPayload) + } + if trInfo != nil { + trInfo.tr.LazyLog(&payload{sent: false, msg: v}, true) + } + return nil + } + reply, appErr := md.Handler(srv.server, stream.Context(), df, s.opts.unaryInt) + if appErr != nil { + appStatus, ok := status.FromError(appErr) + if !ok { + // Convert appErr if it is not a grpc status error. + appErr = status.Error(convertCode(appErr), appErr.Error()) + appStatus, _ = status.FromError(appErr) + } + if trInfo != nil { + trInfo.tr.LazyLog(stringer(appStatus.Message()), true) + trInfo.tr.SetError() + } + if e := t.WriteStatus(stream, appStatus); e != nil { + grpclog.Warningf("grpc: Server.processUnaryRPC failed to write status: %v", e) + } + return appErr + } + if trInfo != nil { + trInfo.tr.LazyLog(stringer("OK"), false) + } + opts := &transport.Options{ + Last: true, + Delay: false, + } + if err := s.sendResponse(t, stream, reply, s.opts.cp, opts); err != nil { + if err == io.EOF { + // The entire stream is done (for unary RPC only). + return err + } + if s, ok := status.FromError(err); ok { + if e := t.WriteStatus(stream, s); e != nil { + grpclog.Warningf("grpc: Server.processUnaryRPC failed to write status: %v", e) + } + } else { + switch st := err.(type) { + case transport.ConnectionError: + // Nothing to do here. + case transport.StreamError: + if e := t.WriteStatus(stream, status.New(st.Code, st.Desc)); e != nil { + grpclog.Warningf("grpc: Server.processUnaryRPC failed to write status %v", e) + } + default: + panic(fmt.Sprintf("grpc: Unexpected error (%T) from sendResponse: %v", st, st)) + } + } + return err + } + if trInfo != nil { + trInfo.tr.LazyLog(&payload{sent: true, msg: reply}, true) + } + // TODO: Should we be logging if writing status failed here, like above? + // Should the logging be in WriteStatus? Should we ignore the WriteStatus + // error or allow the stats handler to see it? + return t.WriteStatus(stream, status.New(codes.OK, "")) +} + +func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transport.Stream, srv *service, sd *StreamDesc, trInfo *traceInfo) (err error) { + sh := s.opts.statsHandler + if sh != nil { + begin := &stats.Begin{ + BeginTime: time.Now(), + } + sh.HandleRPC(stream.Context(), begin) + defer func() { + end := &stats.End{ + EndTime: time.Now(), + } + if err != nil && err != io.EOF { + end.Error = toRPCErr(err) + } + sh.HandleRPC(stream.Context(), end) + }() + } + if s.opts.cp != nil { + stream.SetSendCompress(s.opts.cp.Type()) + } + ss := &serverStream{ + t: t, + s: stream, + p: &parser{r: stream}, + codec: s.opts.codec, + cp: s.opts.cp, + dc: s.opts.dc, + maxReceiveMessageSize: s.opts.maxReceiveMessageSize, + maxSendMessageSize: s.opts.maxSendMessageSize, + trInfo: trInfo, + statsHandler: sh, + } + if ss.cp != nil { + ss.cbuf = new(bytes.Buffer) + } + if trInfo != nil { + trInfo.tr.LazyLog(&trInfo.firstLine, false) + defer func() { + ss.mu.Lock() + if err != nil && err != io.EOF { + ss.trInfo.tr.LazyLog(&fmtStringer{"%v", []interface{}{err}}, true) + ss.trInfo.tr.SetError() + } + ss.trInfo.tr.Finish() + ss.trInfo.tr = nil + ss.mu.Unlock() + }() + } + var appErr error + var server interface{} + if srv != nil { + server = srv.server + } + if s.opts.streamInt == nil { + appErr = sd.Handler(server, ss) + } else { + info := &StreamServerInfo{ + FullMethod: stream.Method(), + IsClientStream: sd.ClientStreams, + IsServerStream: sd.ServerStreams, + } + appErr = s.opts.streamInt(server, ss, info, sd.Handler) + } + if appErr != nil { + appStatus, ok := status.FromError(appErr) + if !ok { + switch err := appErr.(type) { + case transport.StreamError: + appStatus = status.New(err.Code, err.Desc) + default: + appStatus = status.New(convertCode(appErr), appErr.Error()) + } + appErr = appStatus.Err() + } + if trInfo != nil { + ss.mu.Lock() + ss.trInfo.tr.LazyLog(stringer(appStatus.Message()), true) + ss.trInfo.tr.SetError() + ss.mu.Unlock() + } + t.WriteStatus(ss.s, appStatus) + // TODO: Should we log an error from WriteStatus here and below? + return appErr + } + if trInfo != nil { + ss.mu.Lock() + ss.trInfo.tr.LazyLog(stringer("OK"), false) + ss.mu.Unlock() + } + return t.WriteStatus(ss.s, status.New(codes.OK, "")) + +} + +func (s *Server) handleStream(t transport.ServerTransport, stream *transport.Stream, trInfo *traceInfo) { + sm := stream.Method() + if sm != "" && sm[0] == '/' { + sm = sm[1:] + } + pos := strings.LastIndex(sm, "/") + if pos == -1 { + if trInfo != nil { + trInfo.tr.LazyLog(&fmtStringer{"Malformed method name %q", []interface{}{sm}}, true) + trInfo.tr.SetError() + } + errDesc := fmt.Sprintf("malformed method name: %q", stream.Method()) + if err := t.WriteStatus(stream, status.New(codes.ResourceExhausted, errDesc)); err != nil { + if trInfo != nil { + trInfo.tr.LazyLog(&fmtStringer{"%v", []interface{}{err}}, true) + trInfo.tr.SetError() + } + grpclog.Warningf("grpc: Server.handleStream failed to write status: %v", err) + } + if trInfo != nil { + trInfo.tr.Finish() + } + return + } + service := sm[:pos] + method := sm[pos+1:] + srv, ok := s.m[service] + if !ok { + if unknownDesc := s.opts.unknownStreamDesc; unknownDesc != nil { + s.processStreamingRPC(t, stream, nil, unknownDesc, trInfo) + return + } + if trInfo != nil { + trInfo.tr.LazyLog(&fmtStringer{"Unknown service %v", []interface{}{service}}, true) + trInfo.tr.SetError() + } + errDesc := fmt.Sprintf("unknown service %v", service) + if err := t.WriteStatus(stream, status.New(codes.Unimplemented, errDesc)); err != nil { + if trInfo != nil { + trInfo.tr.LazyLog(&fmtStringer{"%v", []interface{}{err}}, true) + trInfo.tr.SetError() + } + grpclog.Warningf("grpc: Server.handleStream failed to write status: %v", err) + } + if trInfo != nil { + trInfo.tr.Finish() + } + return + } + // Unary RPC or Streaming RPC? + if md, ok := srv.md[method]; ok { + s.processUnaryRPC(t, stream, srv, md, trInfo) + return + } + if sd, ok := srv.sd[method]; ok { + s.processStreamingRPC(t, stream, srv, sd, trInfo) + return + } + if trInfo != nil { + trInfo.tr.LazyLog(&fmtStringer{"Unknown method %v", []interface{}{method}}, true) + trInfo.tr.SetError() + } + if unknownDesc := s.opts.unknownStreamDesc; unknownDesc != nil { + s.processStreamingRPC(t, stream, nil, unknownDesc, trInfo) + return + } + errDesc := fmt.Sprintf("unknown method %v", method) + if err := t.WriteStatus(stream, status.New(codes.Unimplemented, errDesc)); err != nil { + if trInfo != nil { + trInfo.tr.LazyLog(&fmtStringer{"%v", []interface{}{err}}, true) + trInfo.tr.SetError() + } + grpclog.Warningf("grpc: Server.handleStream failed to write status: %v", err) + } + if trInfo != nil { + trInfo.tr.Finish() + } +} + +// Stop stops the gRPC server. It immediately closes all open +// connections and listeners. +// It cancels all active RPCs on the server side and the corresponding +// pending RPCs on the client side will get notified by connection +// errors. +func (s *Server) Stop() { + s.mu.Lock() + listeners := s.lis + s.lis = nil + st := s.conns + s.conns = nil + // interrupt GracefulStop if Stop and GracefulStop are called concurrently. + s.cv.Broadcast() + s.mu.Unlock() + + for lis := range listeners { + lis.Close() + } + for c := range st { + c.Close() + } + + s.mu.Lock() + s.cancel() + if s.events != nil { + s.events.Finish() + s.events = nil + } + s.mu.Unlock() +} + +// GracefulStop stops the gRPC server gracefully. It stops the server from +// accepting new connections and RPCs and blocks until all the pending RPCs are +// finished. +func (s *Server) GracefulStop() { + s.mu.Lock() + defer s.mu.Unlock() + if s.conns == nil { + return + } + for lis := range s.lis { + lis.Close() + } + s.lis = nil + s.cancel() + if !s.drain { + for c := range s.conns { + c.(transport.ServerTransport).Drain() + } + s.drain = true + } + for len(s.conns) != 0 { + s.cv.Wait() + } + s.conns = nil + if s.events != nil { + s.events.Finish() + s.events = nil + } +} + +func init() { + internal.TestingCloseConns = func(arg interface{}) { + arg.(*Server).testingCloseConns() + } + internal.TestingUseHandlerImpl = func(arg interface{}) { + arg.(*Server).opts.useHandlerImpl = true + } +} + +// testingCloseConns closes all existing transports but keeps s.lis +// accepting new connections. +func (s *Server) testingCloseConns() { + s.mu.Lock() + for c := range s.conns { + c.Close() + delete(s.conns, c) + } + s.mu.Unlock() +} + +// SetHeader sets the header metadata. +// When called multiple times, all the provided metadata will be merged. +// All the metadata will be sent out when one of the following happens: +// - grpc.SendHeader() is called; +// - The first response is sent out; +// - An RPC status is sent out (error or success). +func SetHeader(ctx context.Context, md metadata.MD) error { + if md.Len() == 0 { + return nil + } + stream, ok := transport.StreamFromContext(ctx) + if !ok { + return Errorf(codes.Internal, "grpc: failed to fetch the stream from the context %v", ctx) + } + return stream.SetHeader(md) +} + +// SendHeader sends header metadata. It may be called at most once. +// The provided md and headers set by SetHeader() will be sent. +func SendHeader(ctx context.Context, md metadata.MD) error { + stream, ok := transport.StreamFromContext(ctx) + if !ok { + return Errorf(codes.Internal, "grpc: failed to fetch the stream from the context %v", ctx) + } + t := stream.ServerTransport() + if t == nil { + grpclog.Fatalf("grpc: SendHeader: %v has no ServerTransport to send header metadata.", stream) + } + if err := t.WriteHeader(stream, md); err != nil { + return toRPCErr(err) + } + return nil +} + +// SetTrailer sets the trailer metadata that will be sent when an RPC returns. +// When called more than once, all the provided metadata will be merged. +func SetTrailer(ctx context.Context, md metadata.MD) error { + if md.Len() == 0 { + return nil + } + stream, ok := transport.StreamFromContext(ctx) + if !ok { + return Errorf(codes.Internal, "grpc: failed to fetch the stream from the context %v", ctx) + } + return stream.SetTrailer(md) +} diff --git a/vendor/google.golang.org/grpc/server_test.go b/vendor/google.golang.org/grpc/server_test.go new file mode 100644 index 000000000..335f56a0d --- /dev/null +++ b/vendor/google.golang.org/grpc/server_test.go @@ -0,0 +1,98 @@ +/* + * + * Copyright 2016 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpc + +import ( + "net" + "reflect" + "strings" + "testing" +) + +type emptyServiceServer interface{} + +type testServer struct{} + +func TestStopBeforeServe(t *testing.T) { + lis, err := net.Listen("tcp", "localhost:0") + if err != nil { + t.Fatalf("failed to create listener: %v", err) + } + + server := NewServer() + server.Stop() + err = server.Serve(lis) + if err != ErrServerStopped { + t.Fatalf("server.Serve() error = %v, want %v", err, ErrServerStopped) + } + + // server.Serve is responsible for closing the listener, even if the + // server was already stopped. + err = lis.Close() + if got, want := ErrorDesc(err), "use of closed"; !strings.Contains(got, want) { + t.Errorf("Close() error = %q, want %q", got, want) + } +} + +func TestGetServiceInfo(t *testing.T) { + testSd := ServiceDesc{ + ServiceName: "grpc.testing.EmptyService", + HandlerType: (*emptyServiceServer)(nil), + Methods: []MethodDesc{ + { + MethodName: "EmptyCall", + Handler: nil, + }, + }, + Streams: []StreamDesc{ + { + StreamName: "EmptyStream", + Handler: nil, + ServerStreams: false, + ClientStreams: true, + }, + }, + Metadata: []int{0, 2, 1, 3}, + } + + server := NewServer() + server.RegisterService(&testSd, &testServer{}) + + info := server.GetServiceInfo() + want := map[string]ServiceInfo{ + "grpc.testing.EmptyService": { + Methods: []MethodInfo{ + { + Name: "EmptyCall", + IsClientStream: false, + IsServerStream: false, + }, + { + Name: "EmptyStream", + IsClientStream: true, + IsServerStream: false, + }}, + Metadata: []int{0, 2, 1, 3}, + }, + } + + if !reflect.DeepEqual(info, want) { + t.Errorf("GetServiceInfo() = %+v, want %+v", info, want) + } +} diff --git a/vendor/google.golang.org/grpc/stats/handlers.go b/vendor/google.golang.org/grpc/stats/handlers.go new file mode 100644 index 000000000..05b384c69 --- /dev/null +++ b/vendor/google.golang.org/grpc/stats/handlers.go @@ -0,0 +1,64 @@ +/* + * + * Copyright 2016 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package stats + +import ( + "net" + + "golang.org/x/net/context" +) + +// ConnTagInfo defines the relevant information needed by connection context tagger. +type ConnTagInfo struct { + // RemoteAddr is the remote address of the corresponding connection. + RemoteAddr net.Addr + // LocalAddr is the local address of the corresponding connection. + LocalAddr net.Addr +} + +// RPCTagInfo defines the relevant information needed by RPC context tagger. +type RPCTagInfo struct { + // FullMethodName is the RPC method in the format of /package.service/method. + FullMethodName string + // FailFast indicates if this RPC is failfast. + // This field is only valid on client side, it's always false on server side. + FailFast bool +} + +// Handler defines the interface for the related stats handling (e.g., RPCs, connections). +type Handler interface { + // TagRPC can attach some information to the given context. + // The context used for the rest lifetime of the RPC will be derived from + // the returned context. + TagRPC(context.Context, *RPCTagInfo) context.Context + // HandleRPC processes the RPC stats. + HandleRPC(context.Context, RPCStats) + + // TagConn can attach some information to the given context. + // The returned context will be used for stats handling. + // For conn stats handling, the context used in HandleConn for this + // connection will be derived from the context returned. + // For RPC stats handling, + // - On server side, the context used in HandleRPC for all RPCs on this + // connection will be derived from the context returned. + // - On client side, the context is not derived from the context returned. + TagConn(context.Context, *ConnTagInfo) context.Context + // HandleConn processes the Conn stats. + HandleConn(context.Context, ConnStats) +} diff --git a/vendor/google.golang.org/grpc/stats/stats.go b/vendor/google.golang.org/grpc/stats/stats.go new file mode 100644 index 000000000..e7a14d922 --- /dev/null +++ b/vendor/google.golang.org/grpc/stats/stats.go @@ -0,0 +1,296 @@ +/* + * + * Copyright 2016 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +//go:generate protoc --go_out=plugins=grpc:. grpc_testing/test.proto + +// Package stats is for collecting and reporting various network and RPC stats. +// This package is for monitoring purpose only. All fields are read-only. +// All APIs are experimental. +package stats // import "google.golang.org/grpc/stats" + +import ( + "net" + "time" + + "golang.org/x/net/context" +) + +// RPCStats contains stats information about RPCs. +type RPCStats interface { + isRPCStats() + // IsClient returns true if this RPCStats is from client side. + IsClient() bool +} + +// Begin contains stats when an RPC begins. +// FailFast is only valid if this Begin is from client side. +type Begin struct { + // Client is true if this Begin is from client side. + Client bool + // BeginTime is the time when the RPC begins. + BeginTime time.Time + // FailFast indicates if this RPC is failfast. + FailFast bool +} + +// IsClient indicates if the stats information is from client side. +func (s *Begin) IsClient() bool { return s.Client } + +func (s *Begin) isRPCStats() {} + +// InPayload contains the information for an incoming payload. +type InPayload struct { + // Client is true if this InPayload is from client side. + Client bool + // Payload is the payload with original type. + Payload interface{} + // Data is the serialized message payload. + Data []byte + // Length is the length of uncompressed data. + Length int + // WireLength is the length of data on wire (compressed, signed, encrypted). + WireLength int + // RecvTime is the time when the payload is received. + RecvTime time.Time +} + +// IsClient indicates if the stats information is from client side. +func (s *InPayload) IsClient() bool { return s.Client } + +func (s *InPayload) isRPCStats() {} + +// InHeader contains stats when a header is received. +type InHeader struct { + // Client is true if this InHeader is from client side. + Client bool + // WireLength is the wire length of header. + WireLength int + + // The following fields are valid only if Client is false. + // FullMethod is the full RPC method string, i.e., /package.service/method. + FullMethod string + // RemoteAddr is the remote address of the corresponding connection. + RemoteAddr net.Addr + // LocalAddr is the local address of the corresponding connection. + LocalAddr net.Addr + // Compression is the compression algorithm used for the RPC. + Compression string +} + +// IsClient indicates if the stats information is from client side. +func (s *InHeader) IsClient() bool { return s.Client } + +func (s *InHeader) isRPCStats() {} + +// InTrailer contains stats when a trailer is received. +type InTrailer struct { + // Client is true if this InTrailer is from client side. + Client bool + // WireLength is the wire length of trailer. + WireLength int +} + +// IsClient indicates if the stats information is from client side. +func (s *InTrailer) IsClient() bool { return s.Client } + +func (s *InTrailer) isRPCStats() {} + +// OutPayload contains the information for an outgoing payload. +type OutPayload struct { + // Client is true if this OutPayload is from client side. + Client bool + // Payload is the payload with original type. + Payload interface{} + // Data is the serialized message payload. + Data []byte + // Length is the length of uncompressed data. + Length int + // WireLength is the length of data on wire (compressed, signed, encrypted). + WireLength int + // SentTime is the time when the payload is sent. + SentTime time.Time +} + +// IsClient indicates if this stats information is from client side. +func (s *OutPayload) IsClient() bool { return s.Client } + +func (s *OutPayload) isRPCStats() {} + +// OutHeader contains stats when a header is sent. +type OutHeader struct { + // Client is true if this OutHeader is from client side. + Client bool + // WireLength is the wire length of header. + WireLength int + + // The following fields are valid only if Client is true. + // FullMethod is the full RPC method string, i.e., /package.service/method. + FullMethod string + // RemoteAddr is the remote address of the corresponding connection. + RemoteAddr net.Addr + // LocalAddr is the local address of the corresponding connection. + LocalAddr net.Addr + // Compression is the compression algorithm used for the RPC. + Compression string +} + +// IsClient indicates if this stats information is from client side. +func (s *OutHeader) IsClient() bool { return s.Client } + +func (s *OutHeader) isRPCStats() {} + +// OutTrailer contains stats when a trailer is sent. +type OutTrailer struct { + // Client is true if this OutTrailer is from client side. + Client bool + // WireLength is the wire length of trailer. + WireLength int +} + +// IsClient indicates if this stats information is from client side. +func (s *OutTrailer) IsClient() bool { return s.Client } + +func (s *OutTrailer) isRPCStats() {} + +// End contains stats when an RPC ends. +type End struct { + // Client is true if this End is from client side. + Client bool + // EndTime is the time when the RPC ends. + EndTime time.Time + // Error is the error the RPC ended with. It is an error generated from + // status.Status and can be converted back to status.Status using + // status.FromError if non-nil. + Error error +} + +// IsClient indicates if this is from client side. +func (s *End) IsClient() bool { return s.Client } + +func (s *End) isRPCStats() {} + +// ConnStats contains stats information about connections. +type ConnStats interface { + isConnStats() + // IsClient returns true if this ConnStats is from client side. + IsClient() bool +} + +// ConnBegin contains the stats of a connection when it is established. +type ConnBegin struct { + // Client is true if this ConnBegin is from client side. + Client bool +} + +// IsClient indicates if this is from client side. +func (s *ConnBegin) IsClient() bool { return s.Client } + +func (s *ConnBegin) isConnStats() {} + +// ConnEnd contains the stats of a connection when it ends. +type ConnEnd struct { + // Client is true if this ConnEnd is from client side. + Client bool +} + +// IsClient indicates if this is from client side. +func (s *ConnEnd) IsClient() bool { return s.Client } + +func (s *ConnEnd) isConnStats() {} + +type incomingTagsKey struct{} +type outgoingTagsKey struct{} + +// SetTags attaches stats tagging data to the context, which will be sent in +// the outgoing RPC with the header grpc-tags-bin. Subsequent calls to +// SetTags will overwrite the values from earlier calls. +// +// NOTE: this is provided only for backward compatibilty with existing clients +// and will likely be removed in an upcoming release. New uses should transmit +// this type of data using metadata with a different, non-reserved (i.e. does +// not begin with "grpc-") header name. +func SetTags(ctx context.Context, b []byte) context.Context { + return context.WithValue(ctx, outgoingTagsKey{}, b) +} + +// Tags returns the tags from the context for the inbound RPC. +// +// NOTE: this is provided only for backward compatibilty with existing clients +// and will likely be removed in an upcoming release. New uses should transmit +// this type of data using metadata with a different, non-reserved (i.e. does +// not begin with "grpc-") header name. +func Tags(ctx context.Context) []byte { + b, _ := ctx.Value(incomingTagsKey{}).([]byte) + return b +} + +// SetIncomingTags attaches stats tagging data to the context, to be read by +// the application (not sent in outgoing RPCs). +// +// This is intended for gRPC-internal use ONLY. +func SetIncomingTags(ctx context.Context, b []byte) context.Context { + return context.WithValue(ctx, incomingTagsKey{}, b) +} + +// OutgoingTags returns the tags from the context for the outbound RPC. +// +// This is intended for gRPC-internal use ONLY. +func OutgoingTags(ctx context.Context) []byte { + b, _ := ctx.Value(outgoingTagsKey{}).([]byte) + return b +} + +type incomingTraceKey struct{} +type outgoingTraceKey struct{} + +// SetTrace attaches stats tagging data to the context, which will be sent in +// the outgoing RPC with the header grpc-trace-bin. Subsequent calls to +// SetTrace will overwrite the values from earlier calls. +// +// NOTE: this is provided only for backward compatibilty with existing clients +// and will likely be removed in an upcoming release. New uses should transmit +// this type of data using metadata with a different, non-reserved (i.e. does +// not begin with "grpc-") header name. +func SetTrace(ctx context.Context, b []byte) context.Context { + return context.WithValue(ctx, outgoingTraceKey{}, b) +} + +// Trace returns the trace from the context for the inbound RPC. +// +// NOTE: this is provided only for backward compatibilty with existing clients +// and will likely be removed in an upcoming release. New uses should transmit +// this type of data using metadata with a different, non-reserved (i.e. does +// not begin with "grpc-") header name. +func Trace(ctx context.Context) []byte { + b, _ := ctx.Value(incomingTraceKey{}).([]byte) + return b +} + +// SetIncomingTrace attaches stats tagging data to the context, to be read by +// the application (not sent in outgoing RPCs). It is intended for +// gRPC-internal use. +func SetIncomingTrace(ctx context.Context, b []byte) context.Context { + return context.WithValue(ctx, incomingTraceKey{}, b) +} + +// OutgoingTrace returns the trace from the context for the outbound RPC. It is +// intended for gRPC-internal use. +func OutgoingTrace(ctx context.Context) []byte { + b, _ := ctx.Value(outgoingTraceKey{}).([]byte) + return b +} diff --git a/vendor/google.golang.org/grpc/stats/stats_test.go b/vendor/google.golang.org/grpc/stats/stats_test.go new file mode 100644 index 000000000..8865d3fb3 --- /dev/null +++ b/vendor/google.golang.org/grpc/stats/stats_test.go @@ -0,0 +1,1278 @@ +/* + * + * Copyright 2016 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package stats_test + +import ( + "fmt" + "io" + "net" + "reflect" + "sync" + "testing" + "time" + + "github.com/golang/protobuf/proto" + "golang.org/x/net/context" + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/stats" + testpb "google.golang.org/grpc/stats/grpc_testing" +) + +func init() { + grpc.EnableTracing = false +} + +type connCtxKey struct{} +type rpcCtxKey struct{} + +var ( + // For headers: + testMetadata = metadata.MD{ + "key1": []string{"value1"}, + "key2": []string{"value2"}, + } + // For trailers: + testTrailerMetadata = metadata.MD{ + "tkey1": []string{"trailerValue1"}, + "tkey2": []string{"trailerValue2"}, + } + // The id for which the service handler should return error. + errorID int32 = 32202 +) + +type testServer struct{} + +func (s *testServer) UnaryCall(ctx context.Context, in *testpb.SimpleRequest) (*testpb.SimpleResponse, error) { + md, ok := metadata.FromIncomingContext(ctx) + if ok { + if err := grpc.SendHeader(ctx, md); err != nil { + return nil, grpc.Errorf(grpc.Code(err), "grpc.SendHeader(_, %v) = %v, want <nil>", md, err) + } + if err := grpc.SetTrailer(ctx, testTrailerMetadata); err != nil { + return nil, grpc.Errorf(grpc.Code(err), "grpc.SetTrailer(_, %v) = %v, want <nil>", testTrailerMetadata, err) + } + } + + if in.Id == errorID { + return nil, fmt.Errorf("got error id: %v", in.Id) + } + + return &testpb.SimpleResponse{Id: in.Id}, nil +} + +func (s *testServer) FullDuplexCall(stream testpb.TestService_FullDuplexCallServer) error { + md, ok := metadata.FromIncomingContext(stream.Context()) + if ok { + if err := stream.SendHeader(md); err != nil { + return grpc.Errorf(grpc.Code(err), "%v.SendHeader(%v) = %v, want %v", stream, md, err, nil) + } + stream.SetTrailer(testTrailerMetadata) + } + for { + in, err := stream.Recv() + if err == io.EOF { + // read done. + return nil + } + if err != nil { + return err + } + + if in.Id == errorID { + return fmt.Errorf("got error id: %v", in.Id) + } + + if err := stream.Send(&testpb.SimpleResponse{Id: in.Id}); err != nil { + return err + } + } +} + +func (s *testServer) ClientStreamCall(stream testpb.TestService_ClientStreamCallServer) error { + md, ok := metadata.FromIncomingContext(stream.Context()) + if ok { + if err := stream.SendHeader(md); err != nil { + return grpc.Errorf(grpc.Code(err), "%v.SendHeader(%v) = %v, want %v", stream, md, err, nil) + } + stream.SetTrailer(testTrailerMetadata) + } + for { + in, err := stream.Recv() + if err == io.EOF { + // read done. + return stream.SendAndClose(&testpb.SimpleResponse{Id: int32(0)}) + } + if err != nil { + return err + } + + if in.Id == errorID { + return fmt.Errorf("got error id: %v", in.Id) + } + } +} + +func (s *testServer) ServerStreamCall(in *testpb.SimpleRequest, stream testpb.TestService_ServerStreamCallServer) error { + md, ok := metadata.FromIncomingContext(stream.Context()) + if ok { + if err := stream.SendHeader(md); err != nil { + return grpc.Errorf(grpc.Code(err), "%v.SendHeader(%v) = %v, want %v", stream, md, err, nil) + } + stream.SetTrailer(testTrailerMetadata) + } + + if in.Id == errorID { + return fmt.Errorf("got error id: %v", in.Id) + } + + for i := 0; i < 5; i++ { + if err := stream.Send(&testpb.SimpleResponse{Id: in.Id}); err != nil { + return err + } + } + return nil +} + +// test is an end-to-end test. It should be created with the newTest +// func, modified as needed, and then started with its startServer method. +// It should be cleaned up with the tearDown method. +type test struct { + t *testing.T + compress string + clientStatsHandler stats.Handler + serverStatsHandler stats.Handler + + testServer testpb.TestServiceServer // nil means none + // srv and srvAddr are set once startServer is called. + srv *grpc.Server + srvAddr string + + cc *grpc.ClientConn // nil until requested via clientConn +} + +func (te *test) tearDown() { + if te.cc != nil { + te.cc.Close() + te.cc = nil + } + te.srv.Stop() +} + +type testConfig struct { + compress string +} + +// newTest returns a new test using the provided testing.T and +// environment. It is returned with default values. Tests should +// modify it before calling its startServer and clientConn methods. +func newTest(t *testing.T, tc *testConfig, ch stats.Handler, sh stats.Handler) *test { + te := &test{ + t: t, + compress: tc.compress, + clientStatsHandler: ch, + serverStatsHandler: sh, + } + return te +} + +// startServer starts a gRPC server listening. Callers should defer a +// call to te.tearDown to clean up. +func (te *test) startServer(ts testpb.TestServiceServer) { + te.testServer = ts + lis, err := net.Listen("tcp", "localhost:0") + if err != nil { + te.t.Fatalf("Failed to listen: %v", err) + } + var opts []grpc.ServerOption + if te.compress == "gzip" { + opts = append(opts, + grpc.RPCCompressor(grpc.NewGZIPCompressor()), + grpc.RPCDecompressor(grpc.NewGZIPDecompressor()), + ) + } + if te.serverStatsHandler != nil { + opts = append(opts, grpc.StatsHandler(te.serverStatsHandler)) + } + s := grpc.NewServer(opts...) + te.srv = s + if te.testServer != nil { + testpb.RegisterTestServiceServer(s, te.testServer) + } + + go s.Serve(lis) + te.srvAddr = lis.Addr().String() +} + +func (te *test) clientConn() *grpc.ClientConn { + if te.cc != nil { + return te.cc + } + opts := []grpc.DialOption{grpc.WithInsecure(), grpc.WithBlock()} + if te.compress == "gzip" { + opts = append(opts, + grpc.WithCompressor(grpc.NewGZIPCompressor()), + grpc.WithDecompressor(grpc.NewGZIPDecompressor()), + ) + } + if te.clientStatsHandler != nil { + opts = append(opts, grpc.WithStatsHandler(te.clientStatsHandler)) + } + + var err error + te.cc, err = grpc.Dial(te.srvAddr, opts...) + if err != nil { + te.t.Fatalf("Dial(%q) = %v", te.srvAddr, err) + } + return te.cc +} + +type rpcType int + +const ( + unaryRPC rpcType = iota + clientStreamRPC + serverStreamRPC + fullDuplexStreamRPC +) + +type rpcConfig struct { + count int // Number of requests and responses for streaming RPCs. + success bool // Whether the RPC should succeed or return error. + failfast bool + callType rpcType // Type of RPC. + noLastRecv bool // Whether to call recv for io.EOF. When true, last recv won't be called. Only valid for streaming RPCs. +} + +func (te *test) doUnaryCall(c *rpcConfig) (*testpb.SimpleRequest, *testpb.SimpleResponse, error) { + var ( + resp *testpb.SimpleResponse + req *testpb.SimpleRequest + err error + ) + tc := testpb.NewTestServiceClient(te.clientConn()) + if c.success { + req = &testpb.SimpleRequest{Id: errorID + 1} + } else { + req = &testpb.SimpleRequest{Id: errorID} + } + ctx := metadata.NewOutgoingContext(context.Background(), testMetadata) + + resp, err = tc.UnaryCall(ctx, req, grpc.FailFast(c.failfast)) + return req, resp, err +} + +func (te *test) doFullDuplexCallRoundtrip(c *rpcConfig) ([]*testpb.SimpleRequest, []*testpb.SimpleResponse, error) { + var ( + reqs []*testpb.SimpleRequest + resps []*testpb.SimpleResponse + err error + ) + tc := testpb.NewTestServiceClient(te.clientConn()) + stream, err := tc.FullDuplexCall(metadata.NewOutgoingContext(context.Background(), testMetadata), grpc.FailFast(c.failfast)) + if err != nil { + return reqs, resps, err + } + var startID int32 + if !c.success { + startID = errorID + } + for i := 0; i < c.count; i++ { + req := &testpb.SimpleRequest{ + Id: int32(i) + startID, + } + reqs = append(reqs, req) + if err = stream.Send(req); err != nil { + return reqs, resps, err + } + var resp *testpb.SimpleResponse + if resp, err = stream.Recv(); err != nil { + return reqs, resps, err + } + resps = append(resps, resp) + } + if err = stream.CloseSend(); err != nil && err != io.EOF { + return reqs, resps, err + } + if !c.noLastRecv { + if _, err = stream.Recv(); err != io.EOF { + return reqs, resps, err + } + } else { + // In the case of not calling the last recv, sleep to avoid + // returning too fast to miss the remaining stats (InTrailer and End). + time.Sleep(time.Second) + } + + return reqs, resps, nil +} + +func (te *test) doClientStreamCall(c *rpcConfig) ([]*testpb.SimpleRequest, *testpb.SimpleResponse, error) { + var ( + reqs []*testpb.SimpleRequest + resp *testpb.SimpleResponse + err error + ) + tc := testpb.NewTestServiceClient(te.clientConn()) + stream, err := tc.ClientStreamCall(metadata.NewOutgoingContext(context.Background(), testMetadata), grpc.FailFast(c.failfast)) + if err != nil { + return reqs, resp, err + } + var startID int32 + if !c.success { + startID = errorID + } + for i := 0; i < c.count; i++ { + req := &testpb.SimpleRequest{ + Id: int32(i) + startID, + } + reqs = append(reqs, req) + if err = stream.Send(req); err != nil { + return reqs, resp, err + } + } + resp, err = stream.CloseAndRecv() + return reqs, resp, err +} + +func (te *test) doServerStreamCall(c *rpcConfig) (*testpb.SimpleRequest, []*testpb.SimpleResponse, error) { + var ( + req *testpb.SimpleRequest + resps []*testpb.SimpleResponse + err error + ) + + tc := testpb.NewTestServiceClient(te.clientConn()) + + var startID int32 + if !c.success { + startID = errorID + } + req = &testpb.SimpleRequest{Id: startID} + stream, err := tc.ServerStreamCall(metadata.NewOutgoingContext(context.Background(), testMetadata), req, grpc.FailFast(c.failfast)) + if err != nil { + return req, resps, err + } + for { + var resp *testpb.SimpleResponse + resp, err := stream.Recv() + if err == io.EOF { + return req, resps, nil + } else if err != nil { + return req, resps, err + } + resps = append(resps, resp) + } +} + +type expectedData struct { + method string + serverAddr string + compression string + reqIdx int + requests []*testpb.SimpleRequest + respIdx int + responses []*testpb.SimpleResponse + err error + failfast bool +} + +type gotData struct { + ctx context.Context + client bool + s interface{} // This could be RPCStats or ConnStats. +} + +const ( + begin int = iota + end + inPayload + inHeader + inTrailer + outPayload + outHeader + outTrailer + connbegin + connend +) + +func checkBegin(t *testing.T, d *gotData, e *expectedData) { + var ( + ok bool + st *stats.Begin + ) + if st, ok = d.s.(*stats.Begin); !ok { + t.Fatalf("got %T, want Begin", d.s) + } + if d.ctx == nil { + t.Fatalf("d.ctx = nil, want <non-nil>") + } + if st.BeginTime.IsZero() { + t.Fatalf("st.BeginTime = %v, want <non-zero>", st.BeginTime) + } + if d.client { + if st.FailFast != e.failfast { + t.Fatalf("st.FailFast = %v, want %v", st.FailFast, e.failfast) + } + } +} + +func checkInHeader(t *testing.T, d *gotData, e *expectedData) { + var ( + ok bool + st *stats.InHeader + ) + if st, ok = d.s.(*stats.InHeader); !ok { + t.Fatalf("got %T, want InHeader", d.s) + } + if d.ctx == nil { + t.Fatalf("d.ctx = nil, want <non-nil>") + } + // TODO check real length, not just > 0. + if st.WireLength <= 0 { + t.Fatalf("st.Lenght = 0, want > 0") + } + if !d.client { + if st.FullMethod != e.method { + t.Fatalf("st.FullMethod = %s, want %v", st.FullMethod, e.method) + } + if st.LocalAddr.String() != e.serverAddr { + t.Fatalf("st.LocalAddr = %v, want %v", st.LocalAddr, e.serverAddr) + } + if st.Compression != e.compression { + t.Fatalf("st.Compression = %v, want %v", st.Compression, e.compression) + } + + if connInfo, ok := d.ctx.Value(connCtxKey{}).(*stats.ConnTagInfo); ok { + if connInfo.RemoteAddr != st.RemoteAddr { + t.Fatalf("connInfo.RemoteAddr = %v, want %v", connInfo.RemoteAddr, st.RemoteAddr) + } + if connInfo.LocalAddr != st.LocalAddr { + t.Fatalf("connInfo.LocalAddr = %v, want %v", connInfo.LocalAddr, st.LocalAddr) + } + } else { + t.Fatalf("got context %v, want one with connCtxKey", d.ctx) + } + if rpcInfo, ok := d.ctx.Value(rpcCtxKey{}).(*stats.RPCTagInfo); ok { + if rpcInfo.FullMethodName != st.FullMethod { + t.Fatalf("rpcInfo.FullMethod = %s, want %v", rpcInfo.FullMethodName, st.FullMethod) + } + } else { + t.Fatalf("got context %v, want one with rpcCtxKey", d.ctx) + } + } +} + +func checkInPayload(t *testing.T, d *gotData, e *expectedData) { + var ( + ok bool + st *stats.InPayload + ) + if st, ok = d.s.(*stats.InPayload); !ok { + t.Fatalf("got %T, want InPayload", d.s) + } + if d.ctx == nil { + t.Fatalf("d.ctx = nil, want <non-nil>") + } + if d.client { + b, err := proto.Marshal(e.responses[e.respIdx]) + if err != nil { + t.Fatalf("failed to marshal message: %v", err) + } + if reflect.TypeOf(st.Payload) != reflect.TypeOf(e.responses[e.respIdx]) { + t.Fatalf("st.Payload = %T, want %T", st.Payload, e.responses[e.respIdx]) + } + e.respIdx++ + if string(st.Data) != string(b) { + t.Fatalf("st.Data = %v, want %v", st.Data, b) + } + if st.Length != len(b) { + t.Fatalf("st.Lenght = %v, want %v", st.Length, len(b)) + } + } else { + b, err := proto.Marshal(e.requests[e.reqIdx]) + if err != nil { + t.Fatalf("failed to marshal message: %v", err) + } + if reflect.TypeOf(st.Payload) != reflect.TypeOf(e.requests[e.reqIdx]) { + t.Fatalf("st.Payload = %T, want %T", st.Payload, e.requests[e.reqIdx]) + } + e.reqIdx++ + if string(st.Data) != string(b) { + t.Fatalf("st.Data = %v, want %v", st.Data, b) + } + if st.Length != len(b) { + t.Fatalf("st.Lenght = %v, want %v", st.Length, len(b)) + } + } + // TODO check WireLength and ReceivedTime. + if st.RecvTime.IsZero() { + t.Fatalf("st.ReceivedTime = %v, want <non-zero>", st.RecvTime) + } +} + +func checkInTrailer(t *testing.T, d *gotData, e *expectedData) { + var ( + ok bool + st *stats.InTrailer + ) + if st, ok = d.s.(*stats.InTrailer); !ok { + t.Fatalf("got %T, want InTrailer", d.s) + } + if d.ctx == nil { + t.Fatalf("d.ctx = nil, want <non-nil>") + } + // TODO check real length, not just > 0. + if st.WireLength <= 0 { + t.Fatalf("st.Lenght = 0, want > 0") + } +} + +func checkOutHeader(t *testing.T, d *gotData, e *expectedData) { + var ( + ok bool + st *stats.OutHeader + ) + if st, ok = d.s.(*stats.OutHeader); !ok { + t.Fatalf("got %T, want OutHeader", d.s) + } + if d.ctx == nil { + t.Fatalf("d.ctx = nil, want <non-nil>") + } + // TODO check real length, not just > 0. + if st.WireLength <= 0 { + t.Fatalf("st.Lenght = 0, want > 0") + } + if d.client { + if st.FullMethod != e.method { + t.Fatalf("st.FullMethod = %s, want %v", st.FullMethod, e.method) + } + if st.RemoteAddr.String() != e.serverAddr { + t.Fatalf("st.RemoteAddr = %v, want %v", st.RemoteAddr, e.serverAddr) + } + if st.Compression != e.compression { + t.Fatalf("st.Compression = %v, want %v", st.Compression, e.compression) + } + + if rpcInfo, ok := d.ctx.Value(rpcCtxKey{}).(*stats.RPCTagInfo); ok { + if rpcInfo.FullMethodName != st.FullMethod { + t.Fatalf("rpcInfo.FullMethod = %s, want %v", rpcInfo.FullMethodName, st.FullMethod) + } + } else { + t.Fatalf("got context %v, want one with rpcCtxKey", d.ctx) + } + } +} + +func checkOutPayload(t *testing.T, d *gotData, e *expectedData) { + var ( + ok bool + st *stats.OutPayload + ) + if st, ok = d.s.(*stats.OutPayload); !ok { + t.Fatalf("got %T, want OutPayload", d.s) + } + if d.ctx == nil { + t.Fatalf("d.ctx = nil, want <non-nil>") + } + if d.client { + b, err := proto.Marshal(e.requests[e.reqIdx]) + if err != nil { + t.Fatalf("failed to marshal message: %v", err) + } + if reflect.TypeOf(st.Payload) != reflect.TypeOf(e.requests[e.reqIdx]) { + t.Fatalf("st.Payload = %T, want %T", st.Payload, e.requests[e.reqIdx]) + } + e.reqIdx++ + if string(st.Data) != string(b) { + t.Fatalf("st.Data = %v, want %v", st.Data, b) + } + if st.Length != len(b) { + t.Fatalf("st.Lenght = %v, want %v", st.Length, len(b)) + } + } else { + b, err := proto.Marshal(e.responses[e.respIdx]) + if err != nil { + t.Fatalf("failed to marshal message: %v", err) + } + if reflect.TypeOf(st.Payload) != reflect.TypeOf(e.responses[e.respIdx]) { + t.Fatalf("st.Payload = %T, want %T", st.Payload, e.responses[e.respIdx]) + } + e.respIdx++ + if string(st.Data) != string(b) { + t.Fatalf("st.Data = %v, want %v", st.Data, b) + } + if st.Length != len(b) { + t.Fatalf("st.Lenght = %v, want %v", st.Length, len(b)) + } + } + // TODO check WireLength and ReceivedTime. + if st.SentTime.IsZero() { + t.Fatalf("st.SentTime = %v, want <non-zero>", st.SentTime) + } +} + +func checkOutTrailer(t *testing.T, d *gotData, e *expectedData) { + var ( + ok bool + st *stats.OutTrailer + ) + if st, ok = d.s.(*stats.OutTrailer); !ok { + t.Fatalf("got %T, want OutTrailer", d.s) + } + if d.ctx == nil { + t.Fatalf("d.ctx = nil, want <non-nil>") + } + if st.Client { + t.Fatalf("st IsClient = true, want false") + } + // TODO check real length, not just > 0. + if st.WireLength <= 0 { + t.Fatalf("st.Lenght = 0, want > 0") + } +} + +func checkEnd(t *testing.T, d *gotData, e *expectedData) { + var ( + ok bool + st *stats.End + ) + if st, ok = d.s.(*stats.End); !ok { + t.Fatalf("got %T, want End", d.s) + } + if d.ctx == nil { + t.Fatalf("d.ctx = nil, want <non-nil>") + } + if st.EndTime.IsZero() { + t.Fatalf("st.EndTime = %v, want <non-zero>", st.EndTime) + } + if grpc.Code(st.Error) != grpc.Code(e.err) || grpc.ErrorDesc(st.Error) != grpc.ErrorDesc(e.err) { + t.Fatalf("st.Error = %v, want %v", st.Error, e.err) + } +} + +func checkConnBegin(t *testing.T, d *gotData, e *expectedData) { + var ( + ok bool + st *stats.ConnBegin + ) + if st, ok = d.s.(*stats.ConnBegin); !ok { + t.Fatalf("got %T, want ConnBegin", d.s) + } + if d.ctx == nil { + t.Fatalf("d.ctx = nil, want <non-nil>") + } + st.IsClient() // TODO remove this. +} + +func checkConnEnd(t *testing.T, d *gotData, e *expectedData) { + var ( + ok bool + st *stats.ConnEnd + ) + if st, ok = d.s.(*stats.ConnEnd); !ok { + t.Fatalf("got %T, want ConnEnd", d.s) + } + if d.ctx == nil { + t.Fatalf("d.ctx = nil, want <non-nil>") + } + st.IsClient() // TODO remove this. +} + +type statshandler struct { + mu sync.Mutex + gotRPC []*gotData + gotConn []*gotData +} + +func (h *statshandler) TagConn(ctx context.Context, info *stats.ConnTagInfo) context.Context { + return context.WithValue(ctx, connCtxKey{}, info) +} + +func (h *statshandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) context.Context { + return context.WithValue(ctx, rpcCtxKey{}, info) +} + +func (h *statshandler) HandleConn(ctx context.Context, s stats.ConnStats) { + h.mu.Lock() + defer h.mu.Unlock() + h.gotConn = append(h.gotConn, &gotData{ctx, s.IsClient(), s}) +} + +func (h *statshandler) HandleRPC(ctx context.Context, s stats.RPCStats) { + h.mu.Lock() + defer h.mu.Unlock() + h.gotRPC = append(h.gotRPC, &gotData{ctx, s.IsClient(), s}) +} + +func checkConnStats(t *testing.T, got []*gotData) { + if len(got) <= 0 || len(got)%2 != 0 { + for i, g := range got { + t.Errorf(" - %v, %T = %+v, ctx: %v", i, g.s, g.s, g.ctx) + } + t.Fatalf("got %v stats, want even positive number", len(got)) + } + // The first conn stats must be a ConnBegin. + checkConnBegin(t, got[0], nil) + // The last conn stats must be a ConnEnd. + checkConnEnd(t, got[len(got)-1], nil) +} + +func checkServerStats(t *testing.T, got []*gotData, expect *expectedData, checkFuncs []func(t *testing.T, d *gotData, e *expectedData)) { + if len(got) != len(checkFuncs) { + for i, g := range got { + t.Errorf(" - %v, %T", i, g.s) + } + t.Fatalf("got %v stats, want %v stats", len(got), len(checkFuncs)) + } + + var rpcctx context.Context + for i := 0; i < len(got); i++ { + if _, ok := got[i].s.(stats.RPCStats); ok { + if rpcctx != nil && got[i].ctx != rpcctx { + t.Fatalf("got different contexts with stats %T", got[i].s) + } + rpcctx = got[i].ctx + } + } + + for i, f := range checkFuncs { + f(t, got[i], expect) + } +} + +func testServerStats(t *testing.T, tc *testConfig, cc *rpcConfig, checkFuncs []func(t *testing.T, d *gotData, e *expectedData)) { + h := &statshandler{} + te := newTest(t, tc, nil, h) + te.startServer(&testServer{}) + defer te.tearDown() + + var ( + reqs []*testpb.SimpleRequest + resps []*testpb.SimpleResponse + err error + method string + + req *testpb.SimpleRequest + resp *testpb.SimpleResponse + e error + ) + + switch cc.callType { + case unaryRPC: + method = "/grpc.testing.TestService/UnaryCall" + req, resp, e = te.doUnaryCall(cc) + reqs = []*testpb.SimpleRequest{req} + resps = []*testpb.SimpleResponse{resp} + err = e + case clientStreamRPC: + method = "/grpc.testing.TestService/ClientStreamCall" + reqs, resp, e = te.doClientStreamCall(cc) + resps = []*testpb.SimpleResponse{resp} + err = e + case serverStreamRPC: + method = "/grpc.testing.TestService/ServerStreamCall" + req, resps, e = te.doServerStreamCall(cc) + reqs = []*testpb.SimpleRequest{req} + err = e + case fullDuplexStreamRPC: + method = "/grpc.testing.TestService/FullDuplexCall" + reqs, resps, err = te.doFullDuplexCallRoundtrip(cc) + } + if cc.success != (err == nil) { + t.Fatalf("cc.success: %v, got error: %v", cc.success, err) + } + te.cc.Close() + te.srv.GracefulStop() // Wait for the server to stop. + + for { + h.mu.Lock() + if len(h.gotRPC) >= len(checkFuncs) { + h.mu.Unlock() + break + } + h.mu.Unlock() + time.Sleep(10 * time.Millisecond) + } + + for { + h.mu.Lock() + if _, ok := h.gotConn[len(h.gotConn)-1].s.(*stats.ConnEnd); ok { + h.mu.Unlock() + break + } + h.mu.Unlock() + time.Sleep(10 * time.Millisecond) + } + + expect := &expectedData{ + serverAddr: te.srvAddr, + compression: tc.compress, + method: method, + requests: reqs, + responses: resps, + err: err, + } + + checkConnStats(t, h.gotConn) + checkServerStats(t, h.gotRPC, expect, checkFuncs) +} + +func TestServerStatsUnaryRPC(t *testing.T) { + testServerStats(t, &testConfig{compress: ""}, &rpcConfig{success: true, callType: unaryRPC}, []func(t *testing.T, d *gotData, e *expectedData){ + checkInHeader, + checkBegin, + checkInPayload, + checkOutHeader, + checkOutPayload, + checkOutTrailer, + checkEnd, + }) +} + +func TestServerStatsUnaryRPCError(t *testing.T) { + testServerStats(t, &testConfig{compress: ""}, &rpcConfig{success: false, callType: unaryRPC}, []func(t *testing.T, d *gotData, e *expectedData){ + checkInHeader, + checkBegin, + checkInPayload, + checkOutHeader, + checkOutTrailer, + checkEnd, + }) +} + +func TestServerStatsClientStreamRPC(t *testing.T) { + count := 5 + checkFuncs := []func(t *testing.T, d *gotData, e *expectedData){ + checkInHeader, + checkBegin, + checkOutHeader, + } + ioPayFuncs := []func(t *testing.T, d *gotData, e *expectedData){ + checkInPayload, + } + for i := 0; i < count; i++ { + checkFuncs = append(checkFuncs, ioPayFuncs...) + } + checkFuncs = append(checkFuncs, + checkOutPayload, + checkOutTrailer, + checkEnd, + ) + testServerStats(t, &testConfig{compress: "gzip"}, &rpcConfig{count: count, success: true, callType: clientStreamRPC}, checkFuncs) +} + +func TestServerStatsClientStreamRPCError(t *testing.T) { + count := 1 + testServerStats(t, &testConfig{compress: "gzip"}, &rpcConfig{count: count, success: false, callType: clientStreamRPC}, []func(t *testing.T, d *gotData, e *expectedData){ + checkInHeader, + checkBegin, + checkOutHeader, + checkInPayload, + checkOutTrailer, + checkEnd, + }) +} + +func TestServerStatsServerStreamRPC(t *testing.T) { + count := 5 + checkFuncs := []func(t *testing.T, d *gotData, e *expectedData){ + checkInHeader, + checkBegin, + checkInPayload, + checkOutHeader, + } + ioPayFuncs := []func(t *testing.T, d *gotData, e *expectedData){ + checkOutPayload, + } + for i := 0; i < count; i++ { + checkFuncs = append(checkFuncs, ioPayFuncs...) + } + checkFuncs = append(checkFuncs, + checkOutTrailer, + checkEnd, + ) + testServerStats(t, &testConfig{compress: "gzip"}, &rpcConfig{count: count, success: true, callType: serverStreamRPC}, checkFuncs) +} + +func TestServerStatsServerStreamRPCError(t *testing.T) { + count := 5 + testServerStats(t, &testConfig{compress: "gzip"}, &rpcConfig{count: count, success: false, callType: serverStreamRPC}, []func(t *testing.T, d *gotData, e *expectedData){ + checkInHeader, + checkBegin, + checkInPayload, + checkOutHeader, + checkOutTrailer, + checkEnd, + }) +} + +func TestServerStatsFullDuplexRPC(t *testing.T) { + count := 5 + checkFuncs := []func(t *testing.T, d *gotData, e *expectedData){ + checkInHeader, + checkBegin, + checkOutHeader, + } + ioPayFuncs := []func(t *testing.T, d *gotData, e *expectedData){ + checkInPayload, + checkOutPayload, + } + for i := 0; i < count; i++ { + checkFuncs = append(checkFuncs, ioPayFuncs...) + } + checkFuncs = append(checkFuncs, + checkOutTrailer, + checkEnd, + ) + testServerStats(t, &testConfig{compress: "gzip"}, &rpcConfig{count: count, success: true, callType: fullDuplexStreamRPC}, checkFuncs) +} + +func TestServerStatsFullDuplexRPCError(t *testing.T) { + count := 5 + testServerStats(t, &testConfig{compress: "gzip"}, &rpcConfig{count: count, success: false, callType: fullDuplexStreamRPC}, []func(t *testing.T, d *gotData, e *expectedData){ + checkInHeader, + checkBegin, + checkOutHeader, + checkInPayload, + checkOutTrailer, + checkEnd, + }) +} + +type checkFuncWithCount struct { + f func(t *testing.T, d *gotData, e *expectedData) + c int // expected count +} + +func checkClientStats(t *testing.T, got []*gotData, expect *expectedData, checkFuncs map[int]*checkFuncWithCount) { + var expectLen int + for _, v := range checkFuncs { + expectLen += v.c + } + if len(got) != expectLen { + for i, g := range got { + t.Errorf(" - %v, %T", i, g.s) + } + t.Fatalf("got %v stats, want %v stats", len(got), expectLen) + } + + var tagInfoInCtx *stats.RPCTagInfo + for i := 0; i < len(got); i++ { + if _, ok := got[i].s.(stats.RPCStats); ok { + tagInfoInCtxNew, _ := got[i].ctx.Value(rpcCtxKey{}).(*stats.RPCTagInfo) + if tagInfoInCtx != nil && tagInfoInCtx != tagInfoInCtxNew { + t.Fatalf("got context containing different tagInfo with stats %T", got[i].s) + } + tagInfoInCtx = tagInfoInCtxNew + } + } + + for _, s := range got { + switch s.s.(type) { + case *stats.Begin: + if checkFuncs[begin].c <= 0 { + t.Fatalf("unexpected stats: %T", s.s) + } + checkFuncs[begin].f(t, s, expect) + checkFuncs[begin].c-- + case *stats.OutHeader: + if checkFuncs[outHeader].c <= 0 { + t.Fatalf("unexpected stats: %T", s.s) + } + checkFuncs[outHeader].f(t, s, expect) + checkFuncs[outHeader].c-- + case *stats.OutPayload: + if checkFuncs[outPayload].c <= 0 { + t.Fatalf("unexpected stats: %T", s.s) + } + checkFuncs[outPayload].f(t, s, expect) + checkFuncs[outPayload].c-- + case *stats.InHeader: + if checkFuncs[inHeader].c <= 0 { + t.Fatalf("unexpected stats: %T", s.s) + } + checkFuncs[inHeader].f(t, s, expect) + checkFuncs[inHeader].c-- + case *stats.InPayload: + if checkFuncs[inPayload].c <= 0 { + t.Fatalf("unexpected stats: %T", s.s) + } + checkFuncs[inPayload].f(t, s, expect) + checkFuncs[inPayload].c-- + case *stats.InTrailer: + if checkFuncs[inTrailer].c <= 0 { + t.Fatalf("unexpected stats: %T", s.s) + } + checkFuncs[inTrailer].f(t, s, expect) + checkFuncs[inTrailer].c-- + case *stats.End: + if checkFuncs[end].c <= 0 { + t.Fatalf("unexpected stats: %T", s.s) + } + checkFuncs[end].f(t, s, expect) + checkFuncs[end].c-- + case *stats.ConnBegin: + if checkFuncs[connbegin].c <= 0 { + t.Fatalf("unexpected stats: %T", s.s) + } + checkFuncs[connbegin].f(t, s, expect) + checkFuncs[connbegin].c-- + case *stats.ConnEnd: + if checkFuncs[connend].c <= 0 { + t.Fatalf("unexpected stats: %T", s.s) + } + checkFuncs[connend].f(t, s, expect) + checkFuncs[connend].c-- + default: + t.Fatalf("unexpected stats: %T", s.s) + } + } +} + +func testClientStats(t *testing.T, tc *testConfig, cc *rpcConfig, checkFuncs map[int]*checkFuncWithCount) { + h := &statshandler{} + te := newTest(t, tc, h, nil) + te.startServer(&testServer{}) + defer te.tearDown() + + var ( + reqs []*testpb.SimpleRequest + resps []*testpb.SimpleResponse + method string + err error + + req *testpb.SimpleRequest + resp *testpb.SimpleResponse + e error + ) + switch cc.callType { + case unaryRPC: + method = "/grpc.testing.TestService/UnaryCall" + req, resp, e = te.doUnaryCall(cc) + reqs = []*testpb.SimpleRequest{req} + resps = []*testpb.SimpleResponse{resp} + err = e + case clientStreamRPC: + method = "/grpc.testing.TestService/ClientStreamCall" + reqs, resp, e = te.doClientStreamCall(cc) + resps = []*testpb.SimpleResponse{resp} + err = e + case serverStreamRPC: + method = "/grpc.testing.TestService/ServerStreamCall" + req, resps, e = te.doServerStreamCall(cc) + reqs = []*testpb.SimpleRequest{req} + err = e + case fullDuplexStreamRPC: + method = "/grpc.testing.TestService/FullDuplexCall" + reqs, resps, err = te.doFullDuplexCallRoundtrip(cc) + } + if cc.success != (err == nil) { + t.Fatalf("cc.success: %v, got error: %v", cc.success, err) + } + te.cc.Close() + te.srv.GracefulStop() // Wait for the server to stop. + + lenRPCStats := 0 + for _, v := range checkFuncs { + lenRPCStats += v.c + } + for { + h.mu.Lock() + if len(h.gotRPC) >= lenRPCStats { + h.mu.Unlock() + break + } + h.mu.Unlock() + time.Sleep(10 * time.Millisecond) + } + + for { + h.mu.Lock() + if _, ok := h.gotConn[len(h.gotConn)-1].s.(*stats.ConnEnd); ok { + h.mu.Unlock() + break + } + h.mu.Unlock() + time.Sleep(10 * time.Millisecond) + } + + expect := &expectedData{ + serverAddr: te.srvAddr, + compression: tc.compress, + method: method, + requests: reqs, + responses: resps, + failfast: cc.failfast, + err: err, + } + + checkConnStats(t, h.gotConn) + checkClientStats(t, h.gotRPC, expect, checkFuncs) +} + +func TestClientStatsUnaryRPC(t *testing.T) { + testClientStats(t, &testConfig{compress: ""}, &rpcConfig{success: true, failfast: false, callType: unaryRPC}, map[int]*checkFuncWithCount{ + begin: {checkBegin, 1}, + outHeader: {checkOutHeader, 1}, + outPayload: {checkOutPayload, 1}, + inHeader: {checkInHeader, 1}, + inPayload: {checkInPayload, 1}, + inTrailer: {checkInTrailer, 1}, + end: {checkEnd, 1}, + }) +} + +func TestClientStatsUnaryRPCError(t *testing.T) { + testClientStats(t, &testConfig{compress: ""}, &rpcConfig{success: false, failfast: false, callType: unaryRPC}, map[int]*checkFuncWithCount{ + begin: {checkBegin, 1}, + outHeader: {checkOutHeader, 1}, + outPayload: {checkOutPayload, 1}, + inHeader: {checkInHeader, 1}, + inTrailer: {checkInTrailer, 1}, + end: {checkEnd, 1}, + }) +} + +func TestClientStatsClientStreamRPC(t *testing.T) { + count := 5 + testClientStats(t, &testConfig{compress: "gzip"}, &rpcConfig{count: count, success: true, failfast: false, callType: clientStreamRPC}, map[int]*checkFuncWithCount{ + begin: {checkBegin, 1}, + outHeader: {checkOutHeader, 1}, + inHeader: {checkInHeader, 1}, + outPayload: {checkOutPayload, count}, + inTrailer: {checkInTrailer, 1}, + inPayload: {checkInPayload, 1}, + end: {checkEnd, 1}, + }) +} + +func TestClientStatsClientStreamRPCError(t *testing.T) { + count := 1 + testClientStats(t, &testConfig{compress: "gzip"}, &rpcConfig{count: count, success: false, failfast: false, callType: clientStreamRPC}, map[int]*checkFuncWithCount{ + begin: {checkBegin, 1}, + outHeader: {checkOutHeader, 1}, + inHeader: {checkInHeader, 1}, + outPayload: {checkOutPayload, 1}, + inTrailer: {checkInTrailer, 1}, + end: {checkEnd, 1}, + }) +} + +func TestClientStatsServerStreamRPC(t *testing.T) { + count := 5 + testClientStats(t, &testConfig{compress: "gzip"}, &rpcConfig{count: count, success: true, failfast: false, callType: serverStreamRPC}, map[int]*checkFuncWithCount{ + begin: {checkBegin, 1}, + outHeader: {checkOutHeader, 1}, + outPayload: {checkOutPayload, 1}, + inHeader: {checkInHeader, 1}, + inPayload: {checkInPayload, count}, + inTrailer: {checkInTrailer, 1}, + end: {checkEnd, 1}, + }) +} + +func TestClientStatsServerStreamRPCError(t *testing.T) { + count := 5 + testClientStats(t, &testConfig{compress: "gzip"}, &rpcConfig{count: count, success: false, failfast: false, callType: serverStreamRPC}, map[int]*checkFuncWithCount{ + begin: {checkBegin, 1}, + outHeader: {checkOutHeader, 1}, + outPayload: {checkOutPayload, 1}, + inHeader: {checkInHeader, 1}, + inTrailer: {checkInTrailer, 1}, + end: {checkEnd, 1}, + }) +} + +func TestClientStatsFullDuplexRPC(t *testing.T) { + count := 5 + testClientStats(t, &testConfig{compress: "gzip"}, &rpcConfig{count: count, success: true, failfast: false, callType: fullDuplexStreamRPC}, map[int]*checkFuncWithCount{ + begin: {checkBegin, 1}, + outHeader: {checkOutHeader, 1}, + outPayload: {checkOutPayload, count}, + inHeader: {checkInHeader, 1}, + inPayload: {checkInPayload, count}, + inTrailer: {checkInTrailer, 1}, + end: {checkEnd, 1}, + }) +} + +func TestClientStatsFullDuplexRPCError(t *testing.T) { + count := 5 + testClientStats(t, &testConfig{compress: "gzip"}, &rpcConfig{count: count, success: false, failfast: false, callType: fullDuplexStreamRPC}, map[int]*checkFuncWithCount{ + begin: {checkBegin, 1}, + outHeader: {checkOutHeader, 1}, + outPayload: {checkOutPayload, 1}, + inHeader: {checkInHeader, 1}, + inTrailer: {checkInTrailer, 1}, + end: {checkEnd, 1}, + }) +} + +// If the user doesn't call the last recv() on clientStream. +func TestClientStatsFullDuplexRPCNotCallingLastRecv(t *testing.T) { + count := 1 + testClientStats(t, &testConfig{compress: "gzip"}, &rpcConfig{count: count, success: true, failfast: false, callType: fullDuplexStreamRPC, noLastRecv: true}, map[int]*checkFuncWithCount{ + begin: {checkBegin, 1}, + outHeader: {checkOutHeader, 1}, + outPayload: {checkOutPayload, count}, + inHeader: {checkInHeader, 1}, + inPayload: {checkInPayload, count}, + inTrailer: {checkInTrailer, 1}, + end: {checkEnd, 1}, + }) +} + +func TestTags(t *testing.T) { + b := []byte{5, 2, 4, 3, 1} + ctx := stats.SetTags(context.Background(), b) + if tg := stats.OutgoingTags(ctx); !reflect.DeepEqual(tg, b) { + t.Errorf("OutgoingTags(%v) = %v; want %v", ctx, tg, b) + } + if tg := stats.Tags(ctx); tg != nil { + t.Errorf("Tags(%v) = %v; want nil", ctx, tg) + } + + ctx = stats.SetIncomingTags(context.Background(), b) + if tg := stats.Tags(ctx); !reflect.DeepEqual(tg, b) { + t.Errorf("Tags(%v) = %v; want %v", ctx, tg, b) + } + if tg := stats.OutgoingTags(ctx); tg != nil { + t.Errorf("OutgoingTags(%v) = %v; want nil", ctx, tg) + } +} + +func TestTrace(t *testing.T) { + b := []byte{5, 2, 4, 3, 1} + ctx := stats.SetTrace(context.Background(), b) + if tr := stats.OutgoingTrace(ctx); !reflect.DeepEqual(tr, b) { + t.Errorf("OutgoingTrace(%v) = %v; want %v", ctx, tr, b) + } + if tr := stats.Trace(ctx); tr != nil { + t.Errorf("Trace(%v) = %v; want nil", ctx, tr) + } + + ctx = stats.SetIncomingTrace(context.Background(), b) + if tr := stats.Trace(ctx); !reflect.DeepEqual(tr, b) { + t.Errorf("Trace(%v) = %v; want %v", ctx, tr, b) + } + if tr := stats.OutgoingTrace(ctx); tr != nil { + t.Errorf("OutgoingTrace(%v) = %v; want nil", ctx, tr) + } +} diff --git a/vendor/google.golang.org/grpc/status/status.go b/vendor/google.golang.org/grpc/status/status.go new file mode 100644 index 000000000..871dc4b31 --- /dev/null +++ b/vendor/google.golang.org/grpc/status/status.go @@ -0,0 +1,168 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Package status implements errors returned by gRPC. These errors are +// serialized and transmitted on the wire between server and client, and allow +// for additional data to be transmitted via the Details field in the status +// proto. gRPC service handlers should return an error created by this +// package, and gRPC clients should expect a corresponding error to be +// returned from the RPC call. +// +// This package upholds the invariants that a non-nil error may not +// contain an OK code, and an OK code must result in a nil error. +package status + +import ( + "errors" + "fmt" + + "github.com/golang/protobuf/proto" + "github.com/golang/protobuf/ptypes" + spb "google.golang.org/genproto/googleapis/rpc/status" + "google.golang.org/grpc/codes" +) + +// statusError is an alias of a status proto. It implements error and Status, +// and a nil statusError should never be returned by this package. +type statusError spb.Status + +func (se *statusError) Error() string { + p := (*spb.Status)(se) + return fmt.Sprintf("rpc error: code = %s desc = %s", codes.Code(p.GetCode()), p.GetMessage()) +} + +func (se *statusError) status() *Status { + return &Status{s: (*spb.Status)(se)} +} + +// Status represents an RPC status code, message, and details. It is immutable +// and should be created with New, Newf, or FromProto. +type Status struct { + s *spb.Status +} + +// Code returns the status code contained in s. +func (s *Status) Code() codes.Code { + if s == nil || s.s == nil { + return codes.OK + } + return codes.Code(s.s.Code) +} + +// Message returns the message contained in s. +func (s *Status) Message() string { + if s == nil || s.s == nil { + return "" + } + return s.s.Message +} + +// Proto returns s's status as an spb.Status proto message. +func (s *Status) Proto() *spb.Status { + if s == nil { + return nil + } + return proto.Clone(s.s).(*spb.Status) +} + +// Err returns an immutable error representing s; returns nil if s.Code() is +// OK. +func (s *Status) Err() error { + if s.Code() == codes.OK { + return nil + } + return (*statusError)(s.s) +} + +// New returns a Status representing c and msg. +func New(c codes.Code, msg string) *Status { + return &Status{s: &spb.Status{Code: int32(c), Message: msg}} +} + +// Newf returns New(c, fmt.Sprintf(format, a...)). +func Newf(c codes.Code, format string, a ...interface{}) *Status { + return New(c, fmt.Sprintf(format, a...)) +} + +// Error returns an error representing c and msg. If c is OK, returns nil. +func Error(c codes.Code, msg string) error { + return New(c, msg).Err() +} + +// Errorf returns Error(c, fmt.Sprintf(format, a...)). +func Errorf(c codes.Code, format string, a ...interface{}) error { + return Error(c, fmt.Sprintf(format, a...)) +} + +// ErrorProto returns an error representing s. If s.Code is OK, returns nil. +func ErrorProto(s *spb.Status) error { + return FromProto(s).Err() +} + +// FromProto returns a Status representing s. +func FromProto(s *spb.Status) *Status { + return &Status{s: proto.Clone(s).(*spb.Status)} +} + +// FromError returns a Status representing err if it was produced from this +// package, otherwise it returns nil, false. +func FromError(err error) (s *Status, ok bool) { + if err == nil { + return &Status{s: &spb.Status{Code: int32(codes.OK)}}, true + } + if s, ok := err.(*statusError); ok { + return s.status(), true + } + return nil, false +} + +// WithDetails returns a new status with the provided details messages appended to the status. +// If any errors are encountered, it returns nil and the first error encountered. +func (s *Status) WithDetails(details ...proto.Message) (*Status, error) { + if s.Code() == codes.OK { + return nil, errors.New("no error details for status with code OK") + } + // s.Code() != OK implies that s.Proto() != nil. + p := s.Proto() + for _, detail := range details { + any, err := ptypes.MarshalAny(detail) + if err != nil { + return nil, err + } + p.Details = append(p.Details, any) + } + return &Status{s: p}, nil +} + +// Details returns a slice of details messages attached to the status. +// If a detail cannot be decoded, the error is returned in place of the detail. +func (s *Status) Details() []interface{} { + if s == nil || s.s == nil { + return nil + } + details := make([]interface{}, 0, len(s.s.Details)) + for _, any := range s.s.Details { + detail := &ptypes.DynamicAny{} + if err := ptypes.UnmarshalAny(any, detail); err != nil { + details = append(details, err) + continue + } + details = append(details, detail.Message) + } + return details +} diff --git a/vendor/google.golang.org/grpc/status/status_test.go b/vendor/google.golang.org/grpc/status/status_test.go new file mode 100644 index 000000000..69be8c9f6 --- /dev/null +++ b/vendor/google.golang.org/grpc/status/status_test.go @@ -0,0 +1,261 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package status + +import ( + "errors" + "fmt" + "reflect" + "testing" + + "github.com/golang/protobuf/proto" + "github.com/golang/protobuf/ptypes" + apb "github.com/golang/protobuf/ptypes/any" + dpb "github.com/golang/protobuf/ptypes/duration" + cpb "google.golang.org/genproto/googleapis/rpc/code" + epb "google.golang.org/genproto/googleapis/rpc/errdetails" + spb "google.golang.org/genproto/googleapis/rpc/status" + "google.golang.org/grpc/codes" +) + +func TestErrorsWithSameParameters(t *testing.T) { + const description = "some description" + e1 := Errorf(codes.AlreadyExists, description) + e2 := Errorf(codes.AlreadyExists, description) + if e1 == e2 || !reflect.DeepEqual(e1, e2) { + t.Fatalf("Errors should be equivalent but unique - e1: %v, %v e2: %p, %v", e1.(*statusError), e1, e2.(*statusError), e2) + } +} + +func TestFromToProto(t *testing.T) { + s := &spb.Status{ + Code: int32(codes.Internal), + Message: "test test test", + Details: []*apb.Any{{TypeUrl: "foo", Value: []byte{3, 2, 1}}}, + } + + err := FromProto(s) + if got := err.Proto(); !proto.Equal(s, got) { + t.Fatalf("Expected errors to be identical - s: %v got: %v", s, got) + } +} + +func TestFromNilProto(t *testing.T) { + tests := []*Status{nil, FromProto(nil)} + for _, s := range tests { + if c := s.Code(); c != codes.OK { + t.Errorf("s: %v - Expected s.Code() = OK; got %v", s, c) + } + if m := s.Message(); m != "" { + t.Errorf("s: %v - Expected s.Message() = \"\"; got %q", s, m) + } + if p := s.Proto(); p != nil { + t.Errorf("s: %v - Expected s.Proto() = nil; got %q", s, p) + } + if e := s.Err(); e != nil { + t.Errorf("s: %v - Expected s.Err() = nil; got %v", s, e) + } + } +} + +func TestError(t *testing.T) { + err := Error(codes.Internal, "test description") + if got, want := err.Error(), "rpc error: code = Internal desc = test description"; got != want { + t.Fatalf("err.Error() = %q; want %q", got, want) + } + s, _ := FromError(err) + if got, want := s.Code(), codes.Internal; got != want { + t.Fatalf("err.Code() = %s; want %s", got, want) + } + if got, want := s.Message(), "test description"; got != want { + t.Fatalf("err.Message() = %s; want %s", got, want) + } +} + +func TestErrorOK(t *testing.T) { + err := Error(codes.OK, "foo") + if err != nil { + t.Fatalf("Error(codes.OK, _) = %p; want nil", err.(*statusError)) + } +} + +func TestErrorProtoOK(t *testing.T) { + s := &spb.Status{Code: int32(codes.OK)} + if got := ErrorProto(s); got != nil { + t.Fatalf("ErrorProto(%v) = %v; want nil", s, got) + } +} + +func TestFromError(t *testing.T) { + code, message := codes.Internal, "test description" + err := Error(code, message) + s, ok := FromError(err) + if !ok || s.Code() != code || s.Message() != message || s.Err() == nil { + t.Fatalf("FromError(%v) = %v, %v; want <Code()=%s, Message()=%q, Err()!=nil>, true", err, s, ok, code, message) + } +} + +func TestFromErrorOK(t *testing.T) { + code, message := codes.OK, "" + s, ok := FromError(nil) + if !ok || s.Code() != code || s.Message() != message || s.Err() != nil { + t.Fatalf("FromError(nil) = %v, %v; want <Code()=%s, Message()=%q, Err=nil>, true", s, ok, code, message) + } +} + +func TestStatus_ErrorDetails(t *testing.T) { + tests := []struct { + code codes.Code + details []proto.Message + }{ + { + code: codes.NotFound, + details: nil, + }, + { + code: codes.NotFound, + details: []proto.Message{ + &epb.ResourceInfo{ + ResourceType: "book", + ResourceName: "projects/1234/books/5678", + Owner: "User", + }, + }, + }, + { + code: codes.Internal, + details: []proto.Message{ + &epb.DebugInfo{ + StackEntries: []string{ + "first stack", + "second stack", + }, + }, + }, + }, + { + code: codes.Unavailable, + details: []proto.Message{ + &epb.RetryInfo{ + RetryDelay: &dpb.Duration{Seconds: 60}, + }, + &epb.ResourceInfo{ + ResourceType: "book", + ResourceName: "projects/1234/books/5678", + Owner: "User", + }, + }, + }, + } + + for _, tc := range tests { + s, err := New(tc.code, "").WithDetails(tc.details...) + if err != nil { + t.Fatalf("(%v).WithDetails(%+v) failed: %v", str(s), tc.details, err) + } + details := s.Details() + for i := range details { + if !proto.Equal(details[i].(proto.Message), tc.details[i]) { + t.Fatalf("(%v).Details()[%d] = %+v, want %+v", str(s), i, details[i], tc.details[i]) + } + } + } +} + +func TestStatus_WithDetails_Fail(t *testing.T) { + tests := []*Status{ + nil, + FromProto(nil), + New(codes.OK, ""), + } + for _, s := range tests { + if s, err := s.WithDetails(); err == nil || s != nil { + t.Fatalf("(%v).WithDetails(%+v) = %v, %v; want nil, non-nil", str(s), []proto.Message{}, s, err) + } + } +} + +func TestStatus_ErrorDetails_Fail(t *testing.T) { + tests := []struct { + s *Status + i []interface{} + }{ + { + nil, + nil, + }, + { + FromProto(nil), + nil, + }, + { + New(codes.OK, ""), + []interface{}{}, + }, + { + FromProto(&spb.Status{ + Code: int32(cpb.Code_CANCELLED), + Details: []*apb.Any{ + { + TypeUrl: "", + Value: []byte{}, + }, + mustMarshalAny(&epb.ResourceInfo{ + ResourceType: "book", + ResourceName: "projects/1234/books/5678", + Owner: "User", + }), + }, + }), + []interface{}{ + errors.New(`message type url "" is invalid`), + &epb.ResourceInfo{ + ResourceType: "book", + ResourceName: "projects/1234/books/5678", + Owner: "User", + }, + }, + }, + } + for _, tc := range tests { + got := tc.s.Details() + if !reflect.DeepEqual(got, tc.i) { + t.Errorf("(%v).Details() = %+v, want %+v", str(tc.s), got, tc.i) + } + } +} + +func str(s *Status) string { + if s == nil { + return "nil" + } + if s.s == nil { + return "<Code=OK>" + } + return fmt.Sprintf("<Code=%v, Message=%q, Details=%+v>", codes.Code(s.s.GetCode()), s.s.GetMessage(), s.s.GetDetails()) +} + +// mustMarshalAny converts a protobuf message to an any. +func mustMarshalAny(msg proto.Message) *apb.Any { + any, err := ptypes.MarshalAny(msg) + if err != nil { + panic(fmt.Sprintf("ptypes.MarshalAny(%+v) failed: %v", msg, err)) + } + return any +} diff --git a/vendor/google.golang.org/grpc/stream.go b/vendor/google.golang.org/grpc/stream.go new file mode 100644 index 000000000..6f29a975d --- /dev/null +++ b/vendor/google.golang.org/grpc/stream.go @@ -0,0 +1,674 @@ +/* + * + * Copyright 2014 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpc + +import ( + "bytes" + "errors" + "io" + "sync" + "time" + + "golang.org/x/net/context" + "golang.org/x/net/trace" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/peer" + "google.golang.org/grpc/stats" + "google.golang.org/grpc/status" + "google.golang.org/grpc/transport" +) + +// StreamHandler defines the handler called by gRPC server to complete the +// execution of a streaming RPC. +type StreamHandler func(srv interface{}, stream ServerStream) error + +// StreamDesc represents a streaming RPC service's method specification. +type StreamDesc struct { + StreamName string + Handler StreamHandler + + // At least one of these is true. + ServerStreams bool + ClientStreams bool +} + +// Stream defines the common interface a client or server stream has to satisfy. +type Stream interface { + // Context returns the context for this stream. + Context() context.Context + // SendMsg blocks until it sends m, the stream is done or the stream + // breaks. + // On error, it aborts the stream and returns an RPC status on client + // side. On server side, it simply returns the error to the caller. + // SendMsg is called by generated code. Also Users can call SendMsg + // directly when it is really needed in their use cases. + // It's safe to have a goroutine calling SendMsg and another goroutine calling + // recvMsg on the same stream at the same time. + // But it is not safe to call SendMsg on the same stream in different goroutines. + SendMsg(m interface{}) error + // RecvMsg blocks until it receives a message or the stream is + // done. On client side, it returns io.EOF when the stream is done. On + // any other error, it aborts the stream and returns an RPC status. On + // server side, it simply returns the error to the caller. + // It's safe to have a goroutine calling SendMsg and another goroutine calling + // recvMsg on the same stream at the same time. + // But it is not safe to call RecvMsg on the same stream in different goroutines. + RecvMsg(m interface{}) error +} + +// ClientStream defines the interface a client stream has to satisfy. +type ClientStream interface { + // Header returns the header metadata received from the server if there + // is any. It blocks if the metadata is not ready to read. + Header() (metadata.MD, error) + // Trailer returns the trailer metadata from the server, if there is any. + // It must only be called after stream.CloseAndRecv has returned, or + // stream.Recv has returned a non-nil error (including io.EOF). + Trailer() metadata.MD + // CloseSend closes the send direction of the stream. It closes the stream + // when non-nil error is met. + CloseSend() error + // Stream.SendMsg() may return a non-nil error when something wrong happens sending + // the request. The returned error indicates the status of this sending, not the final + // status of the RPC. + // Always call Stream.RecvMsg() to get the final status if you care about the status of + // the RPC. + Stream +} + +// NewClientStream creates a new Stream for the client side. This is called +// by generated code. +func NewClientStream(ctx context.Context, desc *StreamDesc, cc *ClientConn, method string, opts ...CallOption) (_ ClientStream, err error) { + if cc.dopts.streamInt != nil { + return cc.dopts.streamInt(ctx, desc, cc, method, newClientStream, opts...) + } + return newClientStream(ctx, desc, cc, method, opts...) +} + +func newClientStream(ctx context.Context, desc *StreamDesc, cc *ClientConn, method string, opts ...CallOption) (_ ClientStream, err error) { + var ( + t transport.ClientTransport + s *transport.Stream + put func() + cancel context.CancelFunc + ) + c := defaultCallInfo + mc := cc.GetMethodConfig(method) + if mc.WaitForReady != nil { + c.failFast = !*mc.WaitForReady + } + + if mc.Timeout != nil { + ctx, cancel = context.WithTimeout(ctx, *mc.Timeout) + defer func() { + if err != nil { + cancel() + } + }() + } + + opts = append(cc.dopts.callOptions, opts...) + for _, o := range opts { + if err := o.before(&c); err != nil { + return nil, toRPCErr(err) + } + } + c.maxSendMessageSize = getMaxSize(mc.MaxReqSize, c.maxSendMessageSize, defaultClientMaxSendMessageSize) + c.maxReceiveMessageSize = getMaxSize(mc.MaxRespSize, c.maxReceiveMessageSize, defaultClientMaxReceiveMessageSize) + + callHdr := &transport.CallHdr{ + Host: cc.authority, + Method: method, + // If it's not client streaming, we should already have the request to be sent, + // so we don't flush the header. + // If it's client streaming, the user may never send a request or send it any + // time soon, so we ask the transport to flush the header. + Flush: desc.ClientStreams, + } + if cc.dopts.cp != nil { + callHdr.SendCompress = cc.dopts.cp.Type() + } + if c.creds != nil { + callHdr.Creds = c.creds + } + var trInfo traceInfo + if EnableTracing { + trInfo.tr = trace.New("grpc.Sent."+methodFamily(method), method) + trInfo.firstLine.client = true + if deadline, ok := ctx.Deadline(); ok { + trInfo.firstLine.deadline = deadline.Sub(time.Now()) + } + trInfo.tr.LazyLog(&trInfo.firstLine, false) + ctx = trace.NewContext(ctx, trInfo.tr) + defer func() { + if err != nil { + // Need to call tr.finish() if error is returned. + // Because tr will not be returned to caller. + trInfo.tr.LazyPrintf("RPC: [%v]", err) + trInfo.tr.SetError() + trInfo.tr.Finish() + } + }() + } + ctx = newContextWithRPCInfo(ctx) + sh := cc.dopts.copts.StatsHandler + if sh != nil { + ctx = sh.TagRPC(ctx, &stats.RPCTagInfo{FullMethodName: method, FailFast: c.failFast}) + begin := &stats.Begin{ + Client: true, + BeginTime: time.Now(), + FailFast: c.failFast, + } + sh.HandleRPC(ctx, begin) + defer func() { + if err != nil { + // Only handle end stats if err != nil. + end := &stats.End{ + Client: true, + Error: err, + } + sh.HandleRPC(ctx, end) + } + }() + } + gopts := BalancerGetOptions{ + BlockingWait: !c.failFast, + } + for { + t, put, err = cc.getTransport(ctx, gopts) + if err != nil { + // TODO(zhaoq): Probably revisit the error handling. + if _, ok := status.FromError(err); ok { + return nil, err + } + if err == errConnClosing || err == errConnUnavailable { + if c.failFast { + return nil, Errorf(codes.Unavailable, "%v", err) + } + continue + } + // All the other errors are treated as Internal errors. + return nil, Errorf(codes.Internal, "%v", err) + } + + s, err = t.NewStream(ctx, callHdr) + if err != nil { + if _, ok := err.(transport.ConnectionError); ok && put != nil { + // If error is connection error, transport was sending data on wire, + // and we are not sure if anything has been sent on wire. + // If error is not connection error, we are sure nothing has been sent. + updateRPCInfoInContext(ctx, rpcInfo{bytesSent: true, bytesReceived: false}) + } + if put != nil { + put() + put = nil + } + if _, ok := err.(transport.ConnectionError); (ok || err == transport.ErrStreamDrain) && !c.failFast { + continue + } + return nil, toRPCErr(err) + } + break + } + // Set callInfo.peer object from stream's context. + if peer, ok := peer.FromContext(s.Context()); ok { + c.peer = peer + } + cs := &clientStream{ + opts: opts, + c: c, + desc: desc, + codec: cc.dopts.codec, + cp: cc.dopts.cp, + dc: cc.dopts.dc, + cancel: cancel, + + put: put, + t: t, + s: s, + p: &parser{r: s}, + + tracing: EnableTracing, + trInfo: trInfo, + + statsCtx: ctx, + statsHandler: cc.dopts.copts.StatsHandler, + } + if cc.dopts.cp != nil { + cs.cbuf = new(bytes.Buffer) + } + // Listen on ctx.Done() to detect cancellation and s.Done() to detect normal termination + // when there is no pending I/O operations on this stream. + go func() { + select { + case <-t.Error(): + // Incur transport error, simply exit. + case <-cc.ctx.Done(): + cs.finish(ErrClientConnClosing) + cs.closeTransportStream(ErrClientConnClosing) + case <-s.Done(): + // TODO: The trace of the RPC is terminated here when there is no pending + // I/O, which is probably not the optimal solution. + cs.finish(s.Status().Err()) + cs.closeTransportStream(nil) + case <-s.GoAway(): + cs.finish(errConnDrain) + cs.closeTransportStream(errConnDrain) + case <-s.Context().Done(): + err := s.Context().Err() + cs.finish(err) + cs.closeTransportStream(transport.ContextErr(err)) + } + }() + return cs, nil +} + +// clientStream implements a client side Stream. +type clientStream struct { + opts []CallOption + c callInfo + t transport.ClientTransport + s *transport.Stream + p *parser + desc *StreamDesc + codec Codec + cp Compressor + cbuf *bytes.Buffer + dc Decompressor + cancel context.CancelFunc + + tracing bool // set to EnableTracing when the clientStream is created. + + mu sync.Mutex + put func() + closed bool + finished bool + // trInfo.tr is set when the clientStream is created (if EnableTracing is true), + // and is set to nil when the clientStream's finish method is called. + trInfo traceInfo + + // statsCtx keeps the user context for stats handling. + // All stats collection should use the statsCtx (instead of the stream context) + // so that all the generated stats for a particular RPC can be associated in the processing phase. + statsCtx context.Context + statsHandler stats.Handler +} + +func (cs *clientStream) Context() context.Context { + return cs.s.Context() +} + +func (cs *clientStream) Header() (metadata.MD, error) { + m, err := cs.s.Header() + if err != nil { + if _, ok := err.(transport.ConnectionError); !ok { + cs.closeTransportStream(err) + } + } + return m, err +} + +func (cs *clientStream) Trailer() metadata.MD { + return cs.s.Trailer() +} + +func (cs *clientStream) SendMsg(m interface{}) (err error) { + if cs.tracing { + cs.mu.Lock() + if cs.trInfo.tr != nil { + cs.trInfo.tr.LazyLog(&payload{sent: true, msg: m}, true) + } + cs.mu.Unlock() + } + // TODO Investigate how to signal the stats handling party. + // generate error stats if err != nil && err != io.EOF? + defer func() { + if err != nil { + cs.finish(err) + } + if err == nil { + return + } + if err == io.EOF { + // Specialize the process for server streaming. SendMsg is only called + // once when creating the stream object. io.EOF needs to be skipped when + // the rpc is early finished (before the stream object is created.). + // TODO: It is probably better to move this into the generated code. + if !cs.desc.ClientStreams && cs.desc.ServerStreams { + err = nil + } + return + } + if _, ok := err.(transport.ConnectionError); !ok { + cs.closeTransportStream(err) + } + err = toRPCErr(err) + }() + var outPayload *stats.OutPayload + if cs.statsHandler != nil { + outPayload = &stats.OutPayload{ + Client: true, + } + } + hdr, data, err := encode(cs.codec, m, cs.cp, cs.cbuf, outPayload) + defer func() { + if cs.cbuf != nil { + cs.cbuf.Reset() + } + }() + if err != nil { + return err + } + if cs.c.maxSendMessageSize == nil { + return Errorf(codes.Internal, "callInfo maxSendMessageSize field uninitialized(nil)") + } + if len(data) > *cs.c.maxSendMessageSize { + return Errorf(codes.ResourceExhausted, "trying to send message larger than max (%d vs. %d)", len(data), *cs.c.maxSendMessageSize) + } + err = cs.t.Write(cs.s, hdr, data, &transport.Options{Last: false}) + if err == nil && outPayload != nil { + outPayload.SentTime = time.Now() + cs.statsHandler.HandleRPC(cs.statsCtx, outPayload) + } + return err +} + +func (cs *clientStream) RecvMsg(m interface{}) (err error) { + var inPayload *stats.InPayload + if cs.statsHandler != nil { + inPayload = &stats.InPayload{ + Client: true, + } + } + if cs.c.maxReceiveMessageSize == nil { + return Errorf(codes.Internal, "callInfo maxReceiveMessageSize field uninitialized(nil)") + } + err = recv(cs.p, cs.codec, cs.s, cs.dc, m, *cs.c.maxReceiveMessageSize, inPayload) + defer func() { + // err != nil indicates the termination of the stream. + if err != nil { + cs.finish(err) + } + }() + if err == nil { + if cs.tracing { + cs.mu.Lock() + if cs.trInfo.tr != nil { + cs.trInfo.tr.LazyLog(&payload{sent: false, msg: m}, true) + } + cs.mu.Unlock() + } + if inPayload != nil { + cs.statsHandler.HandleRPC(cs.statsCtx, inPayload) + } + if !cs.desc.ClientStreams || cs.desc.ServerStreams { + return + } + // Special handling for client streaming rpc. + // This recv expects EOF or errors, so we don't collect inPayload. + if cs.c.maxReceiveMessageSize == nil { + return Errorf(codes.Internal, "callInfo maxReceiveMessageSize field uninitialized(nil)") + } + err = recv(cs.p, cs.codec, cs.s, cs.dc, m, *cs.c.maxReceiveMessageSize, nil) + cs.closeTransportStream(err) + if err == nil { + return toRPCErr(errors.New("grpc: client streaming protocol violation: get <nil>, want <EOF>")) + } + if err == io.EOF { + if se := cs.s.Status().Err(); se != nil { + return se + } + cs.finish(err) + return nil + } + return toRPCErr(err) + } + if _, ok := err.(transport.ConnectionError); !ok { + cs.closeTransportStream(err) + } + if err == io.EOF { + if statusErr := cs.s.Status().Err(); statusErr != nil { + return statusErr + } + // Returns io.EOF to indicate the end of the stream. + return + } + return toRPCErr(err) +} + +func (cs *clientStream) CloseSend() (err error) { + err = cs.t.Write(cs.s, nil, nil, &transport.Options{Last: true}) + defer func() { + if err != nil { + cs.finish(err) + } + }() + if err == nil || err == io.EOF { + return nil + } + if _, ok := err.(transport.ConnectionError); !ok { + cs.closeTransportStream(err) + } + err = toRPCErr(err) + return +} + +func (cs *clientStream) closeTransportStream(err error) { + cs.mu.Lock() + if cs.closed { + cs.mu.Unlock() + return + } + cs.closed = true + cs.mu.Unlock() + cs.t.CloseStream(cs.s, err) +} + +func (cs *clientStream) finish(err error) { + cs.mu.Lock() + defer cs.mu.Unlock() + if cs.finished { + return + } + cs.finished = true + defer func() { + if cs.cancel != nil { + cs.cancel() + } + }() + for _, o := range cs.opts { + o.after(&cs.c) + } + if cs.put != nil { + updateRPCInfoInContext(cs.s.Context(), rpcInfo{ + bytesSent: cs.s.BytesSent(), + bytesReceived: cs.s.BytesReceived(), + }) + cs.put() + cs.put = nil + } + if cs.statsHandler != nil { + end := &stats.End{ + Client: true, + EndTime: time.Now(), + } + if err != io.EOF { + // end.Error is nil if the RPC finished successfully. + end.Error = toRPCErr(err) + } + cs.statsHandler.HandleRPC(cs.statsCtx, end) + } + if !cs.tracing { + return + } + if cs.trInfo.tr != nil { + if err == nil || err == io.EOF { + cs.trInfo.tr.LazyPrintf("RPC: [OK]") + } else { + cs.trInfo.tr.LazyPrintf("RPC: [%v]", err) + cs.trInfo.tr.SetError() + } + cs.trInfo.tr.Finish() + cs.trInfo.tr = nil + } +} + +// ServerStream defines the interface a server stream has to satisfy. +type ServerStream interface { + // SetHeader sets the header metadata. It may be called multiple times. + // When call multiple times, all the provided metadata will be merged. + // All the metadata will be sent out when one of the following happens: + // - ServerStream.SendHeader() is called; + // - The first response is sent out; + // - An RPC status is sent out (error or success). + SetHeader(metadata.MD) error + // SendHeader sends the header metadata. + // The provided md and headers set by SetHeader() will be sent. + // It fails if called multiple times. + SendHeader(metadata.MD) error + // SetTrailer sets the trailer metadata which will be sent with the RPC status. + // When called more than once, all the provided metadata will be merged. + SetTrailer(metadata.MD) + Stream +} + +// serverStream implements a server side Stream. +type serverStream struct { + t transport.ServerTransport + s *transport.Stream + p *parser + codec Codec + cp Compressor + dc Decompressor + cbuf *bytes.Buffer + maxReceiveMessageSize int + maxSendMessageSize int + trInfo *traceInfo + + statsHandler stats.Handler + + mu sync.Mutex // protects trInfo.tr after the service handler runs. +} + +func (ss *serverStream) Context() context.Context { + return ss.s.Context() +} + +func (ss *serverStream) SetHeader(md metadata.MD) error { + if md.Len() == 0 { + return nil + } + return ss.s.SetHeader(md) +} + +func (ss *serverStream) SendHeader(md metadata.MD) error { + return ss.t.WriteHeader(ss.s, md) +} + +func (ss *serverStream) SetTrailer(md metadata.MD) { + if md.Len() == 0 { + return + } + ss.s.SetTrailer(md) + return +} + +func (ss *serverStream) SendMsg(m interface{}) (err error) { + defer func() { + if ss.trInfo != nil { + ss.mu.Lock() + if ss.trInfo.tr != nil { + if err == nil { + ss.trInfo.tr.LazyLog(&payload{sent: true, msg: m}, true) + } else { + ss.trInfo.tr.LazyLog(&fmtStringer{"%v", []interface{}{err}}, true) + ss.trInfo.tr.SetError() + } + } + ss.mu.Unlock() + } + if err != nil && err != io.EOF { + st, _ := status.FromError(toRPCErr(err)) + ss.t.WriteStatus(ss.s, st) + } + }() + var outPayload *stats.OutPayload + if ss.statsHandler != nil { + outPayload = &stats.OutPayload{} + } + hdr, data, err := encode(ss.codec, m, ss.cp, ss.cbuf, outPayload) + defer func() { + if ss.cbuf != nil { + ss.cbuf.Reset() + } + }() + if err != nil { + return err + } + if len(data) > ss.maxSendMessageSize { + return Errorf(codes.ResourceExhausted, "trying to send message larger than max (%d vs. %d)", len(data), ss.maxSendMessageSize) + } + if err := ss.t.Write(ss.s, hdr, data, &transport.Options{Last: false}); err != nil { + return toRPCErr(err) + } + if outPayload != nil { + outPayload.SentTime = time.Now() + ss.statsHandler.HandleRPC(ss.s.Context(), outPayload) + } + return nil +} + +func (ss *serverStream) RecvMsg(m interface{}) (err error) { + defer func() { + if ss.trInfo != nil { + ss.mu.Lock() + if ss.trInfo.tr != nil { + if err == nil { + ss.trInfo.tr.LazyLog(&payload{sent: false, msg: m}, true) + } else if err != io.EOF { + ss.trInfo.tr.LazyLog(&fmtStringer{"%v", []interface{}{err}}, true) + ss.trInfo.tr.SetError() + } + } + ss.mu.Unlock() + } + if err != nil && err != io.EOF { + st, _ := status.FromError(toRPCErr(err)) + ss.t.WriteStatus(ss.s, st) + } + }() + var inPayload *stats.InPayload + if ss.statsHandler != nil { + inPayload = &stats.InPayload{} + } + if err := recv(ss.p, ss.codec, ss.s, ss.dc, m, ss.maxReceiveMessageSize, inPayload); err != nil { + if err == io.EOF { + return err + } + if err == io.ErrUnexpectedEOF { + err = Errorf(codes.Internal, io.ErrUnexpectedEOF.Error()) + } + return toRPCErr(err) + } + if inPayload != nil { + ss.statsHandler.HandleRPC(ss.s.Context(), inPayload) + } + return nil +} diff --git a/vendor/google.golang.org/grpc/tap/tap.go b/vendor/google.golang.org/grpc/tap/tap.go new file mode 100644 index 000000000..22b8fb50d --- /dev/null +++ b/vendor/google.golang.org/grpc/tap/tap.go @@ -0,0 +1,51 @@ +/* + * + * Copyright 2016 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Package tap defines the function handles which are executed on the transport +// layer of gRPC-Go and related information. Everything here is EXPERIMENTAL. +package tap + +import ( + "golang.org/x/net/context" +) + +// Info defines the relevant information needed by the handles. +type Info struct { + // FullMethodName is the string of grpc method (in the format of + // /package.service/method). + FullMethodName string + // TODO: More to be added. +} + +// ServerInHandle defines the function which runs before a new stream is created +// on the server side. If it returns a non-nil error, the stream will not be +// created and a RST_STREAM will be sent back to the client with REFUSED_STREAM. +// The client will receive an RPC error "code = Unavailable, desc = stream +// terminated by RST_STREAM with error code: REFUSED_STREAM". +// +// It's intended to be used in situations where you don't want to waste the +// resources to accept the new stream (e.g. rate-limiting). And the content of +// the error will be ignored and won't be sent back to the client. For other +// general usages, please use interceptors. +// +// Note that it is executed in the per-connection I/O goroutine(s) instead of +// per-RPC goroutine. Therefore, users should NOT have any +// blocking/time-consuming work in this handle. Otherwise all the RPCs would +// slow down. Also, for the same reason, this handle won't be called +// concurrently by gRPC. +type ServerInHandle func(ctx context.Context, info *Info) (context.Context, error) diff --git a/vendor/google.golang.org/grpc/trace.go b/vendor/google.golang.org/grpc/trace.go new file mode 100644 index 000000000..b419c9e3d --- /dev/null +++ b/vendor/google.golang.org/grpc/trace.go @@ -0,0 +1,104 @@ +/* + * + * Copyright 2015 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpc + +import ( + "bytes" + "fmt" + "io" + "net" + "strings" + "time" + + "golang.org/x/net/trace" +) + +// EnableTracing controls whether to trace RPCs using the golang.org/x/net/trace package. +// This should only be set before any RPCs are sent or received by this program. +var EnableTracing = true + +// methodFamily returns the trace family for the given method. +// It turns "/pkg.Service/GetFoo" into "pkg.Service". +func methodFamily(m string) string { + m = strings.TrimPrefix(m, "/") // remove leading slash + if i := strings.Index(m, "/"); i >= 0 { + m = m[:i] // remove everything from second slash + } + if i := strings.LastIndex(m, "."); i >= 0 { + m = m[i+1:] // cut down to last dotted component + } + return m +} + +// traceInfo contains tracing information for an RPC. +type traceInfo struct { + tr trace.Trace + firstLine firstLine +} + +// firstLine is the first line of an RPC trace. +type firstLine struct { + client bool // whether this is a client (outgoing) RPC + remoteAddr net.Addr + deadline time.Duration // may be zero +} + +func (f *firstLine) String() string { + var line bytes.Buffer + io.WriteString(&line, "RPC: ") + if f.client { + io.WriteString(&line, "to") + } else { + io.WriteString(&line, "from") + } + fmt.Fprintf(&line, " %v deadline:", f.remoteAddr) + if f.deadline != 0 { + fmt.Fprint(&line, f.deadline) + } else { + io.WriteString(&line, "none") + } + return line.String() +} + +// payload represents an RPC request or response payload. +type payload struct { + sent bool // whether this is an outgoing payload + msg interface{} // e.g. a proto.Message + // TODO(dsymonds): add stringifying info to codec, and limit how much we hold here? +} + +func (p payload) String() string { + if p.sent { + return fmt.Sprintf("sent: %v", p.msg) + } + return fmt.Sprintf("recv: %v", p.msg) +} + +type fmtStringer struct { + format string + a []interface{} +} + +func (f *fmtStringer) String() string { + return fmt.Sprintf(f.format, f.a...) +} + +type stringer string + +func (s stringer) String() string { return string(s) } diff --git a/vendor/google.golang.org/grpc/transport/bdp_estimator.go b/vendor/google.golang.org/grpc/transport/bdp_estimator.go new file mode 100644 index 000000000..667edb80b --- /dev/null +++ b/vendor/google.golang.org/grpc/transport/bdp_estimator.go @@ -0,0 +1,143 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package transport + +import ( + "sync" + "time" +) + +const ( + // bdpLimit is the maximum value the flow control windows + // will be increased to. + bdpLimit = (1 << 20) * 4 + // alpha is a constant factor used to keep a moving average + // of RTTs. + alpha = 0.9 + // If the current bdp sample is greater than or equal to + // our beta * our estimated bdp and the current bandwidth + // sample is the maximum bandwidth observed so far, we + // increase our bbp estimate by a factor of gamma. + beta = 0.66 + // To put our bdp to be smaller than or equal to twice the real BDP, + // we should multiply our current sample with 4/3, however to round things out + // we use 2 as the multiplication factor. + gamma = 2 +) + +var ( + // Adding arbitrary data to ping so that its ack can be + // identified. + // Easter-egg: what does the ping message say? + bdpPing = &ping{data: [8]byte{2, 4, 16, 16, 9, 14, 7, 7}} +) + +type bdpEstimator struct { + // sentAt is the time when the ping was sent. + sentAt time.Time + + mu sync.Mutex + // bdp is the current bdp estimate. + bdp uint32 + // sample is the number of bytes received in one measurement cycle. + sample uint32 + // bwMax is the maximum bandwidth noted so far (bytes/sec). + bwMax float64 + // bool to keep track of the begining of a new measurement cycle. + isSent bool + // Callback to update the window sizes. + updateFlowControl func(n uint32) + // sampleCount is the number of samples taken so far. + sampleCount uint64 + // round trip time (seconds) + rtt float64 +} + +// timesnap registers the time bdp ping was sent out so that +// network rtt can be calculated when its ack is recieved. +// It is called (by controller) when the bdpPing is +// being written on the wire. +func (b *bdpEstimator) timesnap(d [8]byte) { + if bdpPing.data != d { + return + } + b.sentAt = time.Now() +} + +// add adds bytes to the current sample for calculating bdp. +// It returns true only if a ping must be sent. This can be used +// by the caller (handleData) to make decision about batching +// a window update with it. +func (b *bdpEstimator) add(n uint32) bool { + b.mu.Lock() + defer b.mu.Unlock() + if b.bdp == bdpLimit { + return false + } + if !b.isSent { + b.isSent = true + b.sample = n + b.sentAt = time.Time{} + b.sampleCount++ + return true + } + b.sample += n + return false +} + +// calculate is called when an ack for a bdp ping is received. +// Here we calculate the current bdp and bandwidth sample and +// decide if the flow control windows should go up. +func (b *bdpEstimator) calculate(d [8]byte) { + // Check if the ping acked for was the bdp ping. + if bdpPing.data != d { + return + } + b.mu.Lock() + rttSample := time.Since(b.sentAt).Seconds() + if b.sampleCount < 10 { + // Bootstrap rtt with an average of first 10 rtt samples. + b.rtt += (rttSample - b.rtt) / float64(b.sampleCount) + } else { + // Heed to the recent past more. + b.rtt += (rttSample - b.rtt) * float64(alpha) + } + b.isSent = false + // The number of bytes accumalated so far in the sample is smaller + // than or equal to 1.5 times the real BDP on a saturated connection. + bwCurrent := float64(b.sample) / (b.rtt * float64(1.5)) + if bwCurrent > b.bwMax { + b.bwMax = bwCurrent + } + // If the current sample (which is smaller than or equal to the 1.5 times the real BDP) is + // greater than or equal to 2/3rd our perceived bdp AND this is the maximum bandwidth seen so far, we + // should update our perception of the network BDP. + if float64(b.sample) >= beta*float64(b.bdp) && bwCurrent == b.bwMax && b.bdp != bdpLimit { + sampleFloat := float64(b.sample) + b.bdp = uint32(gamma * sampleFloat) + if b.bdp > bdpLimit { + b.bdp = bdpLimit + } + bdp := b.bdp + b.mu.Unlock() + b.updateFlowControl(bdp) + return + } + b.mu.Unlock() +} diff --git a/vendor/google.golang.org/grpc/transport/control.go b/vendor/google.golang.org/grpc/transport/control.go new file mode 100644 index 000000000..501eb03c4 --- /dev/null +++ b/vendor/google.golang.org/grpc/transport/control.go @@ -0,0 +1,246 @@ +/* + * + * Copyright 2014 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package transport + +import ( + "fmt" + "math" + "sync" + "time" + + "golang.org/x/net/http2" +) + +const ( + // The default value of flow control window size in HTTP2 spec. + defaultWindowSize = 65535 + // The initial window size for flow control. + initialWindowSize = defaultWindowSize // for an RPC + infinity = time.Duration(math.MaxInt64) + defaultClientKeepaliveTime = infinity + defaultClientKeepaliveTimeout = time.Duration(20 * time.Second) + defaultMaxStreamsClient = 100 + defaultMaxConnectionIdle = infinity + defaultMaxConnectionAge = infinity + defaultMaxConnectionAgeGrace = infinity + defaultServerKeepaliveTime = time.Duration(2 * time.Hour) + defaultServerKeepaliveTimeout = time.Duration(20 * time.Second) + defaultKeepalivePolicyMinTime = time.Duration(5 * time.Minute) + // max window limit set by HTTP2 Specs. + maxWindowSize = math.MaxInt32 +) + +// The following defines various control items which could flow through +// the control buffer of transport. They represent different aspects of +// control tasks, e.g., flow control, settings, streaming resetting, etc. +type windowUpdate struct { + streamID uint32 + increment uint32 + flush bool +} + +func (*windowUpdate) item() {} + +type settings struct { + ack bool + ss []http2.Setting +} + +func (*settings) item() {} + +type resetStream struct { + streamID uint32 + code http2.ErrCode +} + +func (*resetStream) item() {} + +type goAway struct { + code http2.ErrCode + debugData []byte + headsUp bool + closeConn bool +} + +func (*goAway) item() {} + +type flushIO struct { +} + +func (*flushIO) item() {} + +type ping struct { + ack bool + data [8]byte +} + +func (*ping) item() {} + +// quotaPool is a pool which accumulates the quota and sends it to acquire() +// when it is available. +type quotaPool struct { + c chan int + + mu sync.Mutex + quota int +} + +// newQuotaPool creates a quotaPool which has quota q available to consume. +func newQuotaPool(q int) *quotaPool { + qb := "aPool{ + c: make(chan int, 1), + } + if q > 0 { + qb.c <- q + } else { + qb.quota = q + } + return qb +} + +// add cancels the pending quota sent on acquired, incremented by v and sends +// it back on acquire. +func (qb *quotaPool) add(v int) { + qb.mu.Lock() + defer qb.mu.Unlock() + select { + case n := <-qb.c: + qb.quota += n + default: + } + qb.quota += v + if qb.quota <= 0 { + return + } + // After the pool has been created, this is the only place that sends on + // the channel. Since mu is held at this point and any quota that was sent + // on the channel has been retrieved, we know that this code will always + // place any positive quota value on the channel. + select { + case qb.c <- qb.quota: + qb.quota = 0 + default: + } +} + +// acquire returns the channel on which available quota amounts are sent. +func (qb *quotaPool) acquire() <-chan int { + return qb.c +} + +// inFlow deals with inbound flow control +type inFlow struct { + mu sync.Mutex + // The inbound flow control limit for pending data. + limit uint32 + // pendingData is the overall data which have been received but not been + // consumed by applications. + pendingData uint32 + // The amount of data the application has consumed but grpc has not sent + // window update for them. Used to reduce window update frequency. + pendingUpdate uint32 + // delta is the extra window update given by receiver when an application + // is reading data bigger in size than the inFlow limit. + delta uint32 +} + +// newLimit updates the inflow window to a new value n. +// It assumes that n is always greater than the old limit. +func (f *inFlow) newLimit(n uint32) uint32 { + f.mu.Lock() + defer f.mu.Unlock() + d := n - f.limit + f.limit = n + return d +} + +func (f *inFlow) maybeAdjust(n uint32) uint32 { + if n > uint32(math.MaxInt32) { + n = uint32(math.MaxInt32) + } + f.mu.Lock() + defer f.mu.Unlock() + // estSenderQuota is the receiver's view of the maximum number of bytes the sender + // can send without a window update. + estSenderQuota := int32(f.limit - (f.pendingData + f.pendingUpdate)) + // estUntransmittedData is the maximum number of bytes the sends might not have put + // on the wire yet. A value of 0 or less means that we have already received all or + // more bytes than the application is requesting to read. + estUntransmittedData := int32(n - f.pendingData) // Casting into int32 since it could be negative. + // This implies that unless we send a window update, the sender won't be able to send all the bytes + // for this message. Therefore we must send an update over the limit since there's an active read + // request from the application. + if estUntransmittedData > estSenderQuota { + // Sender's window shouldn't go more than 2^31 - 1 as speecified in the HTTP spec. + if f.limit+n > maxWindowSize { + f.delta = maxWindowSize - f.limit + } else { + // Send a window update for the whole message and not just the difference between + // estUntransmittedData and estSenderQuota. This will be helpful in case the message + // is padded; We will fallback on the current available window(at least a 1/4th of the limit). + f.delta = n + } + return f.delta + } + return 0 +} + +// onData is invoked when some data frame is received. It updates pendingData. +func (f *inFlow) onData(n uint32) error { + f.mu.Lock() + defer f.mu.Unlock() + f.pendingData += n + if f.pendingData+f.pendingUpdate > f.limit+f.delta { + return fmt.Errorf("received %d-bytes data exceeding the limit %d bytes", f.pendingData+f.pendingUpdate, f.limit) + } + return nil +} + +// onRead is invoked when the application reads the data. It returns the window size +// to be sent to the peer. +func (f *inFlow) onRead(n uint32) uint32 { + f.mu.Lock() + defer f.mu.Unlock() + if f.pendingData == 0 { + return 0 + } + f.pendingData -= n + if n > f.delta { + n -= f.delta + f.delta = 0 + } else { + f.delta -= n + n = 0 + } + f.pendingUpdate += n + if f.pendingUpdate >= f.limit/4 { + wu := f.pendingUpdate + f.pendingUpdate = 0 + return wu + } + return 0 +} + +func (f *inFlow) resetPendingUpdate() uint32 { + f.mu.Lock() + defer f.mu.Unlock() + n := f.pendingUpdate + f.pendingUpdate = 0 + return n +} diff --git a/vendor/google.golang.org/grpc/transport/go16.go b/vendor/google.golang.org/grpc/transport/go16.go new file mode 100644 index 000000000..7cffee11e --- /dev/null +++ b/vendor/google.golang.org/grpc/transport/go16.go @@ -0,0 +1,45 @@ +// +build go1.6,!go1.7 + +/* + * + * Copyright 2016 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package transport + +import ( + "net" + + "google.golang.org/grpc/codes" + + "golang.org/x/net/context" +) + +// dialContext connects to the address on the named network. +func dialContext(ctx context.Context, network, address string) (net.Conn, error) { + return (&net.Dialer{Cancel: ctx.Done()}).Dial(network, address) +} + +// ContextErr converts the error from context package into a StreamError. +func ContextErr(err error) StreamError { + switch err { + case context.DeadlineExceeded: + return streamErrorf(codes.DeadlineExceeded, "%v", err) + case context.Canceled: + return streamErrorf(codes.Canceled, "%v", err) + } + return streamErrorf(codes.Internal, "Unexpected error from context packet: %v", err) +} diff --git a/vendor/google.golang.org/grpc/transport/go17.go b/vendor/google.golang.org/grpc/transport/go17.go new file mode 100644 index 000000000..2464e69fa --- /dev/null +++ b/vendor/google.golang.org/grpc/transport/go17.go @@ -0,0 +1,46 @@ +// +build go1.7 + +/* + * + * Copyright 2016 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package transport + +import ( + "context" + "net" + + "google.golang.org/grpc/codes" + + netctx "golang.org/x/net/context" +) + +// dialContext connects to the address on the named network. +func dialContext(ctx context.Context, network, address string) (net.Conn, error) { + return (&net.Dialer{}).DialContext(ctx, network, address) +} + +// ContextErr converts the error from context package into a StreamError. +func ContextErr(err error) StreamError { + switch err { + case context.DeadlineExceeded, netctx.DeadlineExceeded: + return streamErrorf(codes.DeadlineExceeded, "%v", err) + case context.Canceled, netctx.Canceled: + return streamErrorf(codes.Canceled, "%v", err) + } + return streamErrorf(codes.Internal, "Unexpected error from context packet: %v", err) +} diff --git a/vendor/google.golang.org/grpc/transport/handler_server.go b/vendor/google.golang.org/grpc/transport/handler_server.go new file mode 100644 index 000000000..0489fada5 --- /dev/null +++ b/vendor/google.golang.org/grpc/transport/handler_server.go @@ -0,0 +1,417 @@ +/* + * + * Copyright 2016 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// This file is the implementation of a gRPC server using HTTP/2 which +// uses the standard Go http2 Server implementation (via the +// http.Handler interface), rather than speaking low-level HTTP/2 +// frames itself. It is the implementation of *grpc.Server.ServeHTTP. + +package transport + +import ( + "errors" + "fmt" + "io" + "net" + "net/http" + "strings" + "sync" + "time" + + "github.com/golang/protobuf/proto" + "golang.org/x/net/context" + "golang.org/x/net/http2" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/credentials" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/peer" + "google.golang.org/grpc/status" +) + +// NewServerHandlerTransport returns a ServerTransport handling gRPC +// from inside an http.Handler. It requires that the http Server +// supports HTTP/2. +func NewServerHandlerTransport(w http.ResponseWriter, r *http.Request) (ServerTransport, error) { + if r.ProtoMajor != 2 { + return nil, errors.New("gRPC requires HTTP/2") + } + if r.Method != "POST" { + return nil, errors.New("invalid gRPC request method") + } + if !validContentType(r.Header.Get("Content-Type")) { + return nil, errors.New("invalid gRPC request content-type") + } + if _, ok := w.(http.Flusher); !ok { + return nil, errors.New("gRPC requires a ResponseWriter supporting http.Flusher") + } + if _, ok := w.(http.CloseNotifier); !ok { + return nil, errors.New("gRPC requires a ResponseWriter supporting http.CloseNotifier") + } + + st := &serverHandlerTransport{ + rw: w, + req: r, + closedCh: make(chan struct{}), + writes: make(chan func()), + } + + if v := r.Header.Get("grpc-timeout"); v != "" { + to, err := decodeTimeout(v) + if err != nil { + return nil, streamErrorf(codes.Internal, "malformed time-out: %v", err) + } + st.timeoutSet = true + st.timeout = to + } + + var metakv []string + if r.Host != "" { + metakv = append(metakv, ":authority", r.Host) + } + for k, vv := range r.Header { + k = strings.ToLower(k) + if isReservedHeader(k) && !isWhitelistedPseudoHeader(k) { + continue + } + for _, v := range vv { + v, err := decodeMetadataHeader(k, v) + if err != nil { + return nil, streamErrorf(codes.InvalidArgument, "malformed binary metadata: %v", err) + } + metakv = append(metakv, k, v) + } + } + st.headerMD = metadata.Pairs(metakv...) + + return st, nil +} + +// serverHandlerTransport is an implementation of ServerTransport +// which replies to exactly one gRPC request (exactly one HTTP request), +// using the net/http.Handler interface. This http.Handler is guaranteed +// at this point to be speaking over HTTP/2, so it's able to speak valid +// gRPC. +type serverHandlerTransport struct { + rw http.ResponseWriter + req *http.Request + timeoutSet bool + timeout time.Duration + didCommonHeaders bool + + headerMD metadata.MD + + closeOnce sync.Once + closedCh chan struct{} // closed on Close + + // writes is a channel of code to run serialized in the + // ServeHTTP (HandleStreams) goroutine. The channel is closed + // when WriteStatus is called. + writes chan func() + + mu sync.Mutex + // streamDone indicates whether WriteStatus has been called and writes channel + // has been closed. + streamDone bool +} + +func (ht *serverHandlerTransport) Close() error { + ht.closeOnce.Do(ht.closeCloseChanOnce) + return nil +} + +func (ht *serverHandlerTransport) closeCloseChanOnce() { close(ht.closedCh) } + +func (ht *serverHandlerTransport) RemoteAddr() net.Addr { return strAddr(ht.req.RemoteAddr) } + +// strAddr is a net.Addr backed by either a TCP "ip:port" string, or +// the empty string if unknown. +type strAddr string + +func (a strAddr) Network() string { + if a != "" { + // Per the documentation on net/http.Request.RemoteAddr, if this is + // set, it's set to the IP:port of the peer (hence, TCP): + // https://golang.org/pkg/net/http/#Request + // + // If we want to support Unix sockets later, we can + // add our own grpc-specific convention within the + // grpc codebase to set RemoteAddr to a different + // format, or probably better: we can attach it to the + // context and use that from serverHandlerTransport.RemoteAddr. + return "tcp" + } + return "" +} + +func (a strAddr) String() string { return string(a) } + +// do runs fn in the ServeHTTP goroutine. +func (ht *serverHandlerTransport) do(fn func()) error { + // Avoid a panic writing to closed channel. Imperfect but maybe good enough. + select { + case <-ht.closedCh: + return ErrConnClosing + default: + select { + case ht.writes <- fn: + return nil + case <-ht.closedCh: + return ErrConnClosing + } + + } +} + +func (ht *serverHandlerTransport) WriteStatus(s *Stream, st *status.Status) error { + ht.mu.Lock() + if ht.streamDone { + ht.mu.Unlock() + return nil + } + ht.mu.Unlock() + err := ht.do(func() { + ht.writeCommonHeaders(s) + + // And flush, in case no header or body has been sent yet. + // This forces a separation of headers and trailers if this is the + // first call (for example, in end2end tests's TestNoService). + ht.rw.(http.Flusher).Flush() + + h := ht.rw.Header() + h.Set("Grpc-Status", fmt.Sprintf("%d", st.Code())) + if m := st.Message(); m != "" { + h.Set("Grpc-Message", encodeGrpcMessage(m)) + } + + if p := st.Proto(); p != nil && len(p.Details) > 0 { + stBytes, err := proto.Marshal(p) + if err != nil { + // TODO: return error instead, when callers are able to handle it. + panic(err) + } + + h.Set("Grpc-Status-Details-Bin", encodeBinHeader(stBytes)) + } + + if md := s.Trailer(); len(md) > 0 { + for k, vv := range md { + // Clients don't tolerate reading restricted headers after some non restricted ones were sent. + if isReservedHeader(k) { + continue + } + for _, v := range vv { + // http2 ResponseWriter mechanism to send undeclared Trailers after + // the headers have possibly been written. + h.Add(http2.TrailerPrefix+k, encodeMetadataHeader(k, v)) + } + } + } + }) + close(ht.writes) + ht.mu.Lock() + ht.streamDone = true + ht.mu.Unlock() + return err +} + +// writeCommonHeaders sets common headers on the first write +// call (Write, WriteHeader, or WriteStatus). +func (ht *serverHandlerTransport) writeCommonHeaders(s *Stream) { + if ht.didCommonHeaders { + return + } + ht.didCommonHeaders = true + + h := ht.rw.Header() + h["Date"] = nil // suppress Date to make tests happy; TODO: restore + h.Set("Content-Type", "application/grpc") + + // Predeclare trailers we'll set later in WriteStatus (after the body). + // This is a SHOULD in the HTTP RFC, and the way you add (known) + // Trailers per the net/http.ResponseWriter contract. + // See https://golang.org/pkg/net/http/#ResponseWriter + // and https://golang.org/pkg/net/http/#example_ResponseWriter_trailers + h.Add("Trailer", "Grpc-Status") + h.Add("Trailer", "Grpc-Message") + h.Add("Trailer", "Grpc-Status-Details-Bin") + + if s.sendCompress != "" { + h.Set("Grpc-Encoding", s.sendCompress) + } +} + +func (ht *serverHandlerTransport) Write(s *Stream, hdr []byte, data []byte, opts *Options) error { + return ht.do(func() { + ht.writeCommonHeaders(s) + ht.rw.Write(hdr) + ht.rw.Write(data) + if !opts.Delay { + ht.rw.(http.Flusher).Flush() + } + }) +} + +func (ht *serverHandlerTransport) WriteHeader(s *Stream, md metadata.MD) error { + return ht.do(func() { + ht.writeCommonHeaders(s) + h := ht.rw.Header() + for k, vv := range md { + // Clients don't tolerate reading restricted headers after some non restricted ones were sent. + if isReservedHeader(k) { + continue + } + for _, v := range vv { + v = encodeMetadataHeader(k, v) + h.Add(k, v) + } + } + ht.rw.WriteHeader(200) + ht.rw.(http.Flusher).Flush() + }) +} + +func (ht *serverHandlerTransport) HandleStreams(startStream func(*Stream), traceCtx func(context.Context, string) context.Context) { + // With this transport type there will be exactly 1 stream: this HTTP request. + + var ctx context.Context + var cancel context.CancelFunc + if ht.timeoutSet { + ctx, cancel = context.WithTimeout(context.Background(), ht.timeout) + } else { + ctx, cancel = context.WithCancel(context.Background()) + } + + // requestOver is closed when either the request's context is done + // or the status has been written via WriteStatus. + requestOver := make(chan struct{}) + + // clientGone receives a single value if peer is gone, either + // because the underlying connection is dead or because the + // peer sends an http2 RST_STREAM. + clientGone := ht.rw.(http.CloseNotifier).CloseNotify() + go func() { + select { + case <-requestOver: + return + case <-ht.closedCh: + case <-clientGone: + } + cancel() + }() + + req := ht.req + + s := &Stream{ + id: 0, // irrelevant + requestRead: func(int) {}, + cancel: cancel, + buf: newRecvBuffer(), + st: ht, + method: req.URL.Path, + recvCompress: req.Header.Get("grpc-encoding"), + } + pr := &peer.Peer{ + Addr: ht.RemoteAddr(), + } + if req.TLS != nil { + pr.AuthInfo = credentials.TLSInfo{State: *req.TLS} + } + ctx = metadata.NewIncomingContext(ctx, ht.headerMD) + ctx = peer.NewContext(ctx, pr) + s.ctx = newContextWithStream(ctx, s) + s.trReader = &transportReader{ + reader: &recvBufferReader{ctx: s.ctx, recv: s.buf}, + windowHandler: func(int) {}, + } + + // readerDone is closed when the Body.Read-ing goroutine exits. + readerDone := make(chan struct{}) + go func() { + defer close(readerDone) + + // TODO: minimize garbage, optimize recvBuffer code/ownership + const readSize = 8196 + for buf := make([]byte, readSize); ; { + n, err := req.Body.Read(buf) + if n > 0 { + s.buf.put(recvMsg{data: buf[:n:n]}) + buf = buf[n:] + } + if err != nil { + s.buf.put(recvMsg{err: mapRecvMsgError(err)}) + return + } + if len(buf) == 0 { + buf = make([]byte, readSize) + } + } + }() + + // startStream is provided by the *grpc.Server's serveStreams. + // It starts a goroutine serving s and exits immediately. + // The goroutine that is started is the one that then calls + // into ht, calling WriteHeader, Write, WriteStatus, Close, etc. + startStream(s) + + ht.runStream() + close(requestOver) + + // Wait for reading goroutine to finish. + req.Body.Close() + <-readerDone +} + +func (ht *serverHandlerTransport) runStream() { + for { + select { + case fn, ok := <-ht.writes: + if !ok { + return + } + fn() + case <-ht.closedCh: + return + } + } +} + +func (ht *serverHandlerTransport) Drain() { + panic("Drain() is not implemented") +} + +// mapRecvMsgError returns the non-nil err into the appropriate +// error value as expected by callers of *grpc.parser.recvMsg. +// In particular, in can only be: +// * io.EOF +// * io.ErrUnexpectedEOF +// * of type transport.ConnectionError +// * of type transport.StreamError +func mapRecvMsgError(err error) error { + if err == io.EOF || err == io.ErrUnexpectedEOF { + return err + } + if se, ok := err.(http2.StreamError); ok { + if code, ok := http2ErrConvTab[se.Code]; ok { + return StreamError{ + Code: code, + Desc: se.Error(), + } + } + } + return connectionErrorf(true, err, err.Error()) +} diff --git a/vendor/google.golang.org/grpc/transport/handler_server_test.go b/vendor/google.golang.org/grpc/transport/handler_server_test.go new file mode 100644 index 000000000..262e6016b --- /dev/null +++ b/vendor/google.golang.org/grpc/transport/handler_server_test.go @@ -0,0 +1,437 @@ +/* + * + * Copyright 2016 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package transport + +import ( + "errors" + "fmt" + "io" + "net/http" + "net/http/httptest" + "net/url" + "reflect" + "testing" + "time" + + "github.com/golang/protobuf/proto" + dpb "github.com/golang/protobuf/ptypes/duration" + "golang.org/x/net/context" + epb "google.golang.org/genproto/googleapis/rpc/errdetails" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +func TestHandlerTransport_NewServerHandlerTransport(t *testing.T) { + type testCase struct { + name string + req *http.Request + wantErr string + modrw func(http.ResponseWriter) http.ResponseWriter + check func(*serverHandlerTransport, *testCase) error + } + tests := []testCase{ + { + name: "http/1.1", + req: &http.Request{ + ProtoMajor: 1, + ProtoMinor: 1, + }, + wantErr: "gRPC requires HTTP/2", + }, + { + name: "bad method", + req: &http.Request{ + ProtoMajor: 2, + Method: "GET", + Header: http.Header{}, + RequestURI: "/", + }, + wantErr: "invalid gRPC request method", + }, + { + name: "bad content type", + req: &http.Request{ + ProtoMajor: 2, + Method: "POST", + Header: http.Header{ + "Content-Type": {"application/foo"}, + }, + RequestURI: "/service/foo.bar", + }, + wantErr: "invalid gRPC request content-type", + }, + { + name: "not flusher", + req: &http.Request{ + ProtoMajor: 2, + Method: "POST", + Header: http.Header{ + "Content-Type": {"application/grpc"}, + }, + RequestURI: "/service/foo.bar", + }, + modrw: func(w http.ResponseWriter) http.ResponseWriter { + // Return w without its Flush method + type onlyCloseNotifier interface { + http.ResponseWriter + http.CloseNotifier + } + return struct{ onlyCloseNotifier }{w.(onlyCloseNotifier)} + }, + wantErr: "gRPC requires a ResponseWriter supporting http.Flusher", + }, + { + name: "not closenotifier", + req: &http.Request{ + ProtoMajor: 2, + Method: "POST", + Header: http.Header{ + "Content-Type": {"application/grpc"}, + }, + RequestURI: "/service/foo.bar", + }, + modrw: func(w http.ResponseWriter) http.ResponseWriter { + // Return w without its CloseNotify method + type onlyFlusher interface { + http.ResponseWriter + http.Flusher + } + return struct{ onlyFlusher }{w.(onlyFlusher)} + }, + wantErr: "gRPC requires a ResponseWriter supporting http.CloseNotifier", + }, + { + name: "valid", + req: &http.Request{ + ProtoMajor: 2, + Method: "POST", + Header: http.Header{ + "Content-Type": {"application/grpc"}, + }, + URL: &url.URL{ + Path: "/service/foo.bar", + }, + RequestURI: "/service/foo.bar", + }, + check: func(t *serverHandlerTransport, tt *testCase) error { + if t.req != tt.req { + return fmt.Errorf("t.req = %p; want %p", t.req, tt.req) + } + if t.rw == nil { + return errors.New("t.rw = nil; want non-nil") + } + return nil + }, + }, + { + name: "with timeout", + req: &http.Request{ + ProtoMajor: 2, + Method: "POST", + Header: http.Header{ + "Content-Type": []string{"application/grpc"}, + "Grpc-Timeout": {"200m"}, + }, + URL: &url.URL{ + Path: "/service/foo.bar", + }, + RequestURI: "/service/foo.bar", + }, + check: func(t *serverHandlerTransport, tt *testCase) error { + if !t.timeoutSet { + return errors.New("timeout not set") + } + if want := 200 * time.Millisecond; t.timeout != want { + return fmt.Errorf("timeout = %v; want %v", t.timeout, want) + } + return nil + }, + }, + { + name: "with bad timeout", + req: &http.Request{ + ProtoMajor: 2, + Method: "POST", + Header: http.Header{ + "Content-Type": []string{"application/grpc"}, + "Grpc-Timeout": {"tomorrow"}, + }, + URL: &url.URL{ + Path: "/service/foo.bar", + }, + RequestURI: "/service/foo.bar", + }, + wantErr: `stream error: code = Internal desc = "malformed time-out: transport: timeout unit is not recognized: \"tomorrow\""`, + }, + { + name: "with metadata", + req: &http.Request{ + ProtoMajor: 2, + Method: "POST", + Header: http.Header{ + "Content-Type": []string{"application/grpc"}, + "meta-foo": {"foo-val"}, + "meta-bar": {"bar-val1", "bar-val2"}, + "user-agent": {"x/y a/b"}, + }, + URL: &url.URL{ + Path: "/service/foo.bar", + }, + RequestURI: "/service/foo.bar", + }, + check: func(ht *serverHandlerTransport, tt *testCase) error { + want := metadata.MD{ + "meta-bar": {"bar-val1", "bar-val2"}, + "user-agent": {"x/y a/b"}, + "meta-foo": {"foo-val"}, + } + + if !reflect.DeepEqual(ht.headerMD, want) { + return fmt.Errorf("metdata = %#v; want %#v", ht.headerMD, want) + } + return nil + }, + }, + } + + for _, tt := range tests { + rw := newTestHandlerResponseWriter() + if tt.modrw != nil { + rw = tt.modrw(rw) + } + got, gotErr := NewServerHandlerTransport(rw, tt.req) + if (gotErr != nil) != (tt.wantErr != "") || (gotErr != nil && gotErr.Error() != tt.wantErr) { + t.Errorf("%s: error = %v; want %q", tt.name, gotErr, tt.wantErr) + continue + } + if gotErr != nil { + continue + } + if tt.check != nil { + if err := tt.check(got.(*serverHandlerTransport), &tt); err != nil { + t.Errorf("%s: %v", tt.name, err) + } + } + } +} + +type testHandlerResponseWriter struct { + *httptest.ResponseRecorder + closeNotify chan bool +} + +func (w testHandlerResponseWriter) CloseNotify() <-chan bool { return w.closeNotify } +func (w testHandlerResponseWriter) Flush() {} + +func newTestHandlerResponseWriter() http.ResponseWriter { + return testHandlerResponseWriter{ + ResponseRecorder: httptest.NewRecorder(), + closeNotify: make(chan bool, 1), + } +} + +type handleStreamTest struct { + t *testing.T + bodyw *io.PipeWriter + req *http.Request + rw testHandlerResponseWriter + ht *serverHandlerTransport +} + +func newHandleStreamTest(t *testing.T) *handleStreamTest { + bodyr, bodyw := io.Pipe() + req := &http.Request{ + ProtoMajor: 2, + Method: "POST", + Header: http.Header{ + "Content-Type": {"application/grpc"}, + }, + URL: &url.URL{ + Path: "/service/foo.bar", + }, + RequestURI: "/service/foo.bar", + Body: bodyr, + } + rw := newTestHandlerResponseWriter().(testHandlerResponseWriter) + ht, err := NewServerHandlerTransport(rw, req) + if err != nil { + t.Fatal(err) + } + return &handleStreamTest{ + t: t, + bodyw: bodyw, + ht: ht.(*serverHandlerTransport), + rw: rw, + } +} + +func TestHandlerTransport_HandleStreams(t *testing.T) { + st := newHandleStreamTest(t) + handleStream := func(s *Stream) { + if want := "/service/foo.bar"; s.method != want { + t.Errorf("stream method = %q; want %q", s.method, want) + } + st.bodyw.Close() // no body + st.ht.WriteStatus(s, status.New(codes.OK, "")) + } + st.ht.HandleStreams( + func(s *Stream) { go handleStream(s) }, + func(ctx context.Context, method string) context.Context { return ctx }, + ) + wantHeader := http.Header{ + "Date": nil, + "Content-Type": {"application/grpc"}, + "Trailer": {"Grpc-Status", "Grpc-Message", "Grpc-Status-Details-Bin"}, + "Grpc-Status": {"0"}, + } + if !reflect.DeepEqual(st.rw.HeaderMap, wantHeader) { + t.Errorf("Header+Trailer Map: %#v; want %#v", st.rw.HeaderMap, wantHeader) + } +} + +// Tests that codes.Unimplemented will close the body, per comment in handler_server.go. +func TestHandlerTransport_HandleStreams_Unimplemented(t *testing.T) { + handleStreamCloseBodyTest(t, codes.Unimplemented, "thingy is unimplemented") +} + +// Tests that codes.InvalidArgument will close the body, per comment in handler_server.go. +func TestHandlerTransport_HandleStreams_InvalidArgument(t *testing.T) { + handleStreamCloseBodyTest(t, codes.InvalidArgument, "bad arg") +} + +func handleStreamCloseBodyTest(t *testing.T, statusCode codes.Code, msg string) { + st := newHandleStreamTest(t) + + handleStream := func(s *Stream) { + st.ht.WriteStatus(s, status.New(statusCode, msg)) + } + st.ht.HandleStreams( + func(s *Stream) { go handleStream(s) }, + func(ctx context.Context, method string) context.Context { return ctx }, + ) + wantHeader := http.Header{ + "Date": nil, + "Content-Type": {"application/grpc"}, + "Trailer": {"Grpc-Status", "Grpc-Message", "Grpc-Status-Details-Bin"}, + "Grpc-Status": {fmt.Sprint(uint32(statusCode))}, + "Grpc-Message": {encodeGrpcMessage(msg)}, + } + + if !reflect.DeepEqual(st.rw.HeaderMap, wantHeader) { + t.Errorf("Header+Trailer mismatch.\n got: %#v\nwant: %#v", st.rw.HeaderMap, wantHeader) + } +} + +func TestHandlerTransport_HandleStreams_Timeout(t *testing.T) { + bodyr, bodyw := io.Pipe() + req := &http.Request{ + ProtoMajor: 2, + Method: "POST", + Header: http.Header{ + "Content-Type": {"application/grpc"}, + "Grpc-Timeout": {"200m"}, + }, + URL: &url.URL{ + Path: "/service/foo.bar", + }, + RequestURI: "/service/foo.bar", + Body: bodyr, + } + rw := newTestHandlerResponseWriter().(testHandlerResponseWriter) + ht, err := NewServerHandlerTransport(rw, req) + if err != nil { + t.Fatal(err) + } + runStream := func(s *Stream) { + defer bodyw.Close() + select { + case <-s.ctx.Done(): + case <-time.After(5 * time.Second): + t.Errorf("timeout waiting for ctx.Done") + return + } + err := s.ctx.Err() + if err != context.DeadlineExceeded { + t.Errorf("ctx.Err = %v; want %v", err, context.DeadlineExceeded) + return + } + ht.WriteStatus(s, status.New(codes.DeadlineExceeded, "too slow")) + } + ht.HandleStreams( + func(s *Stream) { go runStream(s) }, + func(ctx context.Context, method string) context.Context { return ctx }, + ) + wantHeader := http.Header{ + "Date": nil, + "Content-Type": {"application/grpc"}, + "Trailer": {"Grpc-Status", "Grpc-Message", "Grpc-Status-Details-Bin"}, + "Grpc-Status": {"4"}, + "Grpc-Message": {encodeGrpcMessage("too slow")}, + } + if !reflect.DeepEqual(rw.HeaderMap, wantHeader) { + t.Errorf("Header+Trailer Map mismatch.\n got: %#v\nwant: %#v", rw.HeaderMap, wantHeader) + } +} + +func TestHandlerTransport_HandleStreams_ErrDetails(t *testing.T) { + errDetails := []proto.Message{ + &epb.RetryInfo{ + RetryDelay: &dpb.Duration{Seconds: 60}, + }, + &epb.ResourceInfo{ + ResourceType: "foo bar", + ResourceName: "service.foo.bar", + Owner: "User", + }, + } + + statusCode := codes.ResourceExhausted + msg := "you are being throttled" + st, err := status.New(statusCode, msg).WithDetails(errDetails...) + if err != nil { + t.Fatal(err) + } + + stBytes, err := proto.Marshal(st.Proto()) + if err != nil { + t.Fatal(err) + } + + hst := newHandleStreamTest(t) + handleStream := func(s *Stream) { + hst.ht.WriteStatus(s, st) + } + hst.ht.HandleStreams( + func(s *Stream) { go handleStream(s) }, + func(ctx context.Context, method string) context.Context { return ctx }, + ) + wantHeader := http.Header{ + "Date": nil, + "Content-Type": {"application/grpc"}, + "Trailer": {"Grpc-Status", "Grpc-Message", "Grpc-Status-Details-Bin"}, + "Grpc-Status": {fmt.Sprint(uint32(statusCode))}, + "Grpc-Message": {encodeGrpcMessage(msg)}, + "Grpc-Status-Details-Bin": {encodeBinHeader(stBytes)}, + } + + if !reflect.DeepEqual(hst.rw.HeaderMap, wantHeader) { + t.Errorf("Header+Trailer mismatch.\n got: %#v\nwant: %#v", hst.rw.HeaderMap, wantHeader) + } +} diff --git a/vendor/google.golang.org/grpc/transport/http2_client.go b/vendor/google.golang.org/grpc/transport/http2_client.go new file mode 100644 index 000000000..5f229138b --- /dev/null +++ b/vendor/google.golang.org/grpc/transport/http2_client.go @@ -0,0 +1,1390 @@ +/* + * + * Copyright 2014 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package transport + +import ( + "bytes" + "io" + "math" + "net" + "strings" + "sync" + "sync/atomic" + "time" + + "golang.org/x/net/context" + "golang.org/x/net/http2" + "golang.org/x/net/http2/hpack" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/credentials" + "google.golang.org/grpc/keepalive" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/peer" + "google.golang.org/grpc/stats" + "google.golang.org/grpc/status" +) + +// http2Client implements the ClientTransport interface with HTTP2. +type http2Client struct { + ctx context.Context + target string // server name/addr + userAgent string + md interface{} + conn net.Conn // underlying communication channel + remoteAddr net.Addr + localAddr net.Addr + authInfo credentials.AuthInfo // auth info about the connection + nextID uint32 // the next stream ID to be used + + // writableChan synchronizes write access to the transport. + // A writer acquires the write lock by sending a value on writableChan + // and releases it by receiving from writableChan. + writableChan chan int + // shutdownChan is closed when Close is called. + // Blocking operations should select on shutdownChan to avoid + // blocking forever after Close. + // TODO(zhaoq): Maybe have a channel context? + shutdownChan chan struct{} + // errorChan is closed to notify the I/O error to the caller. + errorChan chan struct{} + // goAway is closed to notify the upper layer (i.e., addrConn.transportMonitor) + // that the server sent GoAway on this transport. + goAway chan struct{} + // awakenKeepalive is used to wake up keepalive when after it has gone dormant. + awakenKeepalive chan struct{} + + framer *framer + hBuf *bytes.Buffer // the buffer for HPACK encoding + hEnc *hpack.Encoder // HPACK encoder + + // controlBuf delivers all the control related tasks (e.g., window + // updates, reset streams, and various settings) to the controller. + controlBuf *controlBuffer + fc *inFlow + // sendQuotaPool provides flow control to outbound message. + sendQuotaPool *quotaPool + // streamsQuota limits the max number of concurrent streams. + streamsQuota *quotaPool + + // The scheme used: https if TLS is on, http otherwise. + scheme string + + isSecure bool + + creds []credentials.PerRPCCredentials + + // Boolean to keep track of reading activity on transport. + // 1 is true and 0 is false. + activity uint32 // Accessed atomically. + kp keepalive.ClientParameters + + statsHandler stats.Handler + + initialWindowSize int32 + + bdpEst *bdpEstimator + outQuotaVersion uint32 + + mu sync.Mutex // guard the following variables + state transportState // the state of underlying connection + activeStreams map[uint32]*Stream + // The max number of concurrent streams + maxStreams int + // the per-stream outbound flow control window size set by the peer. + streamSendQuota uint32 + // prevGoAway ID records the Last-Stream-ID in the previous GOAway frame. + prevGoAwayID uint32 + // goAwayReason records the http2.ErrCode and debug data received with the + // GoAway frame. + goAwayReason GoAwayReason +} + +func dial(ctx context.Context, fn func(context.Context, string) (net.Conn, error), addr string) (net.Conn, error) { + if fn != nil { + return fn(ctx, addr) + } + return dialContext(ctx, "tcp", addr) +} + +func isTemporary(err error) bool { + switch err { + case io.EOF: + // Connection closures may be resolved upon retry, and are thus + // treated as temporary. + return true + case context.DeadlineExceeded: + // In Go 1.7, context.DeadlineExceeded implements Timeout(), and this + // special case is not needed. Until then, we need to keep this + // clause. + return true + } + + switch err := err.(type) { + case interface { + Temporary() bool + }: + return err.Temporary() + case interface { + Timeout() bool + }: + // Timeouts may be resolved upon retry, and are thus treated as + // temporary. + return err.Timeout() + } + return false +} + +// newHTTP2Client constructs a connected ClientTransport to addr based on HTTP2 +// and starts to receive messages on it. Non-nil error returns if construction +// fails. +func newHTTP2Client(ctx context.Context, addr TargetInfo, opts ConnectOptions) (_ ClientTransport, err error) { + scheme := "http" + conn, err := dial(ctx, opts.Dialer, addr.Addr) + if err != nil { + if opts.FailOnNonTempDialError { + return nil, connectionErrorf(isTemporary(err), err, "transport: error while dialing: %v", err) + } + return nil, connectionErrorf(true, err, "transport: Error while dialing %v", err) + } + // Any further errors will close the underlying connection + defer func(conn net.Conn) { + if err != nil { + conn.Close() + } + }(conn) + var ( + isSecure bool + authInfo credentials.AuthInfo + ) + if creds := opts.TransportCredentials; creds != nil { + scheme = "https" + conn, authInfo, err = creds.ClientHandshake(ctx, addr.Addr, conn) + if err != nil { + // Credentials handshake errors are typically considered permanent + // to avoid retrying on e.g. bad certificates. + temp := isTemporary(err) + return nil, connectionErrorf(temp, err, "transport: authentication handshake failed: %v", err) + } + isSecure = true + } + kp := opts.KeepaliveParams + // Validate keepalive parameters. + if kp.Time == 0 { + kp.Time = defaultClientKeepaliveTime + } + if kp.Timeout == 0 { + kp.Timeout = defaultClientKeepaliveTimeout + } + dynamicWindow := true + icwz := int32(initialWindowSize) + if opts.InitialConnWindowSize >= defaultWindowSize { + icwz = opts.InitialConnWindowSize + dynamicWindow = false + } + var buf bytes.Buffer + t := &http2Client{ + ctx: ctx, + target: addr.Addr, + userAgent: opts.UserAgent, + md: addr.Metadata, + conn: conn, + remoteAddr: conn.RemoteAddr(), + localAddr: conn.LocalAddr(), + authInfo: authInfo, + // The client initiated stream id is odd starting from 1. + nextID: 1, + writableChan: make(chan int, 1), + shutdownChan: make(chan struct{}), + errorChan: make(chan struct{}), + goAway: make(chan struct{}), + awakenKeepalive: make(chan struct{}, 1), + framer: newFramer(conn), + hBuf: &buf, + hEnc: hpack.NewEncoder(&buf), + controlBuf: newControlBuffer(), + fc: &inFlow{limit: uint32(icwz)}, + sendQuotaPool: newQuotaPool(defaultWindowSize), + scheme: scheme, + state: reachable, + activeStreams: make(map[uint32]*Stream), + isSecure: isSecure, + creds: opts.PerRPCCredentials, + maxStreams: defaultMaxStreamsClient, + streamsQuota: newQuotaPool(defaultMaxStreamsClient), + streamSendQuota: defaultWindowSize, + kp: kp, + statsHandler: opts.StatsHandler, + initialWindowSize: initialWindowSize, + } + if opts.InitialWindowSize >= defaultWindowSize { + t.initialWindowSize = opts.InitialWindowSize + dynamicWindow = false + } + if dynamicWindow { + t.bdpEst = &bdpEstimator{ + bdp: initialWindowSize, + updateFlowControl: t.updateFlowControl, + } + } + // Make sure awakenKeepalive can't be written upon. + // keepalive routine will make it writable, if need be. + t.awakenKeepalive <- struct{}{} + if t.statsHandler != nil { + t.ctx = t.statsHandler.TagConn(t.ctx, &stats.ConnTagInfo{ + RemoteAddr: t.remoteAddr, + LocalAddr: t.localAddr, + }) + connBegin := &stats.ConnBegin{ + Client: true, + } + t.statsHandler.HandleConn(t.ctx, connBegin) + } + // Start the reader goroutine for incoming message. Each transport has + // a dedicated goroutine which reads HTTP2 frame from network. Then it + // dispatches the frame to the corresponding stream entity. + go t.reader() + // Send connection preface to server. + n, err := t.conn.Write(clientPreface) + if err != nil { + t.Close() + return nil, connectionErrorf(true, err, "transport: failed to write client preface: %v", err) + } + if n != len(clientPreface) { + t.Close() + return nil, connectionErrorf(true, err, "transport: preface mismatch, wrote %d bytes; want %d", n, len(clientPreface)) + } + if t.initialWindowSize != defaultWindowSize { + err = t.framer.writeSettings(true, http2.Setting{ + ID: http2.SettingInitialWindowSize, + Val: uint32(t.initialWindowSize), + }) + } else { + err = t.framer.writeSettings(true) + } + if err != nil { + t.Close() + return nil, connectionErrorf(true, err, "transport: failed to write initial settings frame: %v", err) + } + // Adjust the connection flow control window if needed. + if delta := uint32(icwz - defaultWindowSize); delta > 0 { + if err := t.framer.writeWindowUpdate(true, 0, delta); err != nil { + t.Close() + return nil, connectionErrorf(true, err, "transport: failed to write window update: %v", err) + } + } + go t.controller() + if t.kp.Time != infinity { + go t.keepalive() + } + t.writableChan <- 0 + return t, nil +} + +func (t *http2Client) newStream(ctx context.Context, callHdr *CallHdr) *Stream { + // TODO(zhaoq): Handle uint32 overflow of Stream.id. + s := &Stream{ + id: t.nextID, + done: make(chan struct{}), + goAway: make(chan struct{}), + method: callHdr.Method, + sendCompress: callHdr.SendCompress, + buf: newRecvBuffer(), + fc: &inFlow{limit: uint32(t.initialWindowSize)}, + sendQuotaPool: newQuotaPool(int(t.streamSendQuota)), + headerChan: make(chan struct{}), + } + t.nextID += 2 + s.requestRead = func(n int) { + t.adjustWindow(s, uint32(n)) + } + // The client side stream context should have exactly the same life cycle with the user provided context. + // That means, s.ctx should be read-only. And s.ctx is done iff ctx is done. + // So we use the original context here instead of creating a copy. + s.ctx = ctx + s.trReader = &transportReader{ + reader: &recvBufferReader{ + ctx: s.ctx, + goAway: s.goAway, + recv: s.buf, + }, + windowHandler: func(n int) { + t.updateWindow(s, uint32(n)) + }, + } + + return s +} + +// NewStream creates a stream and registers it into the transport as "active" +// streams. +func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (_ *Stream, err error) { + pr := &peer.Peer{ + Addr: t.remoteAddr, + } + // Attach Auth info if there is any. + if t.authInfo != nil { + pr.AuthInfo = t.authInfo + } + ctx = peer.NewContext(ctx, pr) + var ( + authData = make(map[string]string) + audience string + ) + // Create an audience string only if needed. + if len(t.creds) > 0 || callHdr.Creds != nil { + // Construct URI required to get auth request metadata. + // Omit port if it is the default one. + host := strings.TrimSuffix(callHdr.Host, ":443") + pos := strings.LastIndex(callHdr.Method, "/") + if pos == -1 { + pos = len(callHdr.Method) + } + audience = "https://" + host + callHdr.Method[:pos] + } + for _, c := range t.creds { + data, err := c.GetRequestMetadata(ctx, audience) + if err != nil { + return nil, streamErrorf(codes.Internal, "transport: %v", err) + } + for k, v := range data { + // Capital header names are illegal in HTTP/2. + k = strings.ToLower(k) + authData[k] = v + } + } + callAuthData := make(map[string]string) + // Check if credentials.PerRPCCredentials were provided via call options. + // Note: if these credentials are provided both via dial options and call + // options, then both sets of credentials will be applied. + if callCreds := callHdr.Creds; callCreds != nil { + if !t.isSecure && callCreds.RequireTransportSecurity() { + return nil, streamErrorf(codes.Unauthenticated, "transport: cannot send secure credentials on an insecure conneciton") + } + data, err := callCreds.GetRequestMetadata(ctx, audience) + if err != nil { + return nil, streamErrorf(codes.Internal, "transport: %v", err) + } + for k, v := range data { + // Capital header names are illegal in HTTP/2 + k = strings.ToLower(k) + callAuthData[k] = v + } + } + t.mu.Lock() + if t.activeStreams == nil { + t.mu.Unlock() + return nil, ErrConnClosing + } + if t.state == draining { + t.mu.Unlock() + return nil, ErrStreamDrain + } + if t.state != reachable { + t.mu.Unlock() + return nil, ErrConnClosing + } + t.mu.Unlock() + sq, err := wait(ctx, nil, nil, t.shutdownChan, t.streamsQuota.acquire()) + if err != nil { + return nil, err + } + // Returns the quota balance back. + if sq > 1 { + t.streamsQuota.add(sq - 1) + } + if _, err := wait(ctx, nil, nil, t.shutdownChan, t.writableChan); err != nil { + // Return the quota back now because there is no stream returned to the caller. + if _, ok := err.(StreamError); ok { + t.streamsQuota.add(1) + } + return nil, err + } + t.mu.Lock() + if t.state == draining { + t.mu.Unlock() + t.streamsQuota.add(1) + // Need to make t writable again so that the rpc in flight can still proceed. + t.writableChan <- 0 + return nil, ErrStreamDrain + } + if t.state != reachable { + t.mu.Unlock() + return nil, ErrConnClosing + } + s := t.newStream(ctx, callHdr) + t.activeStreams[s.id] = s + // If the number of active streams change from 0 to 1, then check if keepalive + // has gone dormant. If so, wake it up. + if len(t.activeStreams) == 1 { + select { + case t.awakenKeepalive <- struct{}{}: + t.framer.writePing(false, false, [8]byte{}) + // Fill the awakenKeepalive channel again as this channel must be + // kept non-writable except at the point that the keepalive() + // goroutine is waiting either to be awaken or shutdown. + t.awakenKeepalive <- struct{}{} + default: + } + } + + t.mu.Unlock() + + // HPACK encodes various headers. Note that once WriteField(...) is + // called, the corresponding headers/continuation frame has to be sent + // because hpack.Encoder is stateful. + t.hBuf.Reset() + t.hEnc.WriteField(hpack.HeaderField{Name: ":method", Value: "POST"}) + t.hEnc.WriteField(hpack.HeaderField{Name: ":scheme", Value: t.scheme}) + t.hEnc.WriteField(hpack.HeaderField{Name: ":path", Value: callHdr.Method}) + t.hEnc.WriteField(hpack.HeaderField{Name: ":authority", Value: callHdr.Host}) + t.hEnc.WriteField(hpack.HeaderField{Name: "content-type", Value: "application/grpc"}) + t.hEnc.WriteField(hpack.HeaderField{Name: "user-agent", Value: t.userAgent}) + t.hEnc.WriteField(hpack.HeaderField{Name: "te", Value: "trailers"}) + + if callHdr.SendCompress != "" { + t.hEnc.WriteField(hpack.HeaderField{Name: "grpc-encoding", Value: callHdr.SendCompress}) + } + if dl, ok := ctx.Deadline(); ok { + // Send out timeout regardless its value. The server can detect timeout context by itself. + timeout := dl.Sub(time.Now()) + t.hEnc.WriteField(hpack.HeaderField{Name: "grpc-timeout", Value: encodeTimeout(timeout)}) + } + + for k, v := range authData { + t.hEnc.WriteField(hpack.HeaderField{Name: k, Value: encodeMetadataHeader(k, v)}) + } + for k, v := range callAuthData { + t.hEnc.WriteField(hpack.HeaderField{Name: k, Value: encodeMetadataHeader(k, v)}) + } + var ( + endHeaders bool + ) + if b := stats.OutgoingTags(ctx); b != nil { + t.hEnc.WriteField(hpack.HeaderField{Name: "grpc-tags-bin", Value: encodeBinHeader(b)}) + } + if b := stats.OutgoingTrace(ctx); b != nil { + t.hEnc.WriteField(hpack.HeaderField{Name: "grpc-trace-bin", Value: encodeBinHeader(b)}) + } + if md, ok := metadata.FromOutgoingContext(ctx); ok { + for k, vv := range md { + // HTTP doesn't allow you to set pseudoheaders after non pseudoheaders were set. + if isReservedHeader(k) { + continue + } + for _, v := range vv { + t.hEnc.WriteField(hpack.HeaderField{Name: k, Value: encodeMetadataHeader(k, v)}) + } + } + } + if md, ok := t.md.(*metadata.MD); ok { + for k, vv := range *md { + if isReservedHeader(k) { + continue + } + for _, v := range vv { + t.hEnc.WriteField(hpack.HeaderField{Name: k, Value: encodeMetadataHeader(k, v)}) + } + } + } + first := true + bufLen := t.hBuf.Len() + // Sends the headers in a single batch even when they span multiple frames. + for !endHeaders { + size := t.hBuf.Len() + if size > http2MaxFrameLen { + size = http2MaxFrameLen + } else { + endHeaders = true + } + var flush bool + if callHdr.Flush && endHeaders { + flush = true + } + if first { + // Sends a HeadersFrame to server to start a new stream. + p := http2.HeadersFrameParam{ + StreamID: s.id, + BlockFragment: t.hBuf.Next(size), + EndStream: false, + EndHeaders: endHeaders, + } + // Do a force flush for the buffered frames iff it is the last headers frame + // and there is header metadata to be sent. Otherwise, there is flushing until + // the corresponding data frame is written. + err = t.framer.writeHeaders(flush, p) + first = false + } else { + // Sends Continuation frames for the leftover headers. + err = t.framer.writeContinuation(flush, s.id, endHeaders, t.hBuf.Next(size)) + } + if err != nil { + t.notifyError(err) + return nil, connectionErrorf(true, err, "transport: %v", err) + } + } + s.mu.Lock() + s.bytesSent = true + s.mu.Unlock() + + if t.statsHandler != nil { + outHeader := &stats.OutHeader{ + Client: true, + WireLength: bufLen, + FullMethod: callHdr.Method, + RemoteAddr: t.remoteAddr, + LocalAddr: t.localAddr, + Compression: callHdr.SendCompress, + } + t.statsHandler.HandleRPC(s.ctx, outHeader) + } + t.writableChan <- 0 + return s, nil +} + +// CloseStream clears the footprint of a stream when the stream is not needed any more. +// This must not be executed in reader's goroutine. +func (t *http2Client) CloseStream(s *Stream, err error) { + t.mu.Lock() + if t.activeStreams == nil { + t.mu.Unlock() + return + } + if err != nil { + // notify in-flight streams, before the deletion + s.write(recvMsg{err: err}) + } + delete(t.activeStreams, s.id) + if t.state == draining && len(t.activeStreams) == 0 { + // The transport is draining and s is the last live stream on t. + t.mu.Unlock() + t.Close() + return + } + t.mu.Unlock() + // rstStream is true in case the stream is being closed at the client-side + // and the server needs to be intimated about it by sending a RST_STREAM + // frame. + // To make sure this frame is written to the wire before the headers of the + // next stream waiting for streamsQuota, we add to streamsQuota pool only + // after having acquired the writableChan to send RST_STREAM out (look at + // the controller() routine). + var rstStream bool + var rstError http2.ErrCode + defer func() { + // In case, the client doesn't have to send RST_STREAM to server + // we can safely add back to streamsQuota pool now. + if !rstStream { + t.streamsQuota.add(1) + return + } + t.controlBuf.put(&resetStream{s.id, rstError}) + }() + s.mu.Lock() + rstStream = s.rstStream + rstError = s.rstError + if s.state == streamDone { + s.mu.Unlock() + return + } + if !s.headerDone { + close(s.headerChan) + s.headerDone = true + } + s.state = streamDone + s.mu.Unlock() + if _, ok := err.(StreamError); ok { + rstStream = true + rstError = http2.ErrCodeCancel + } +} + +// Close kicks off the shutdown process of the transport. This should be called +// only once on a transport. Once it is called, the transport should not be +// accessed any more. +func (t *http2Client) Close() (err error) { + t.mu.Lock() + if t.state == closing { + t.mu.Unlock() + return + } + if t.state == reachable || t.state == draining { + close(t.errorChan) + } + t.state = closing + t.mu.Unlock() + close(t.shutdownChan) + err = t.conn.Close() + t.mu.Lock() + streams := t.activeStreams + t.activeStreams = nil + t.mu.Unlock() + // Notify all active streams. + for _, s := range streams { + s.mu.Lock() + if !s.headerDone { + close(s.headerChan) + s.headerDone = true + } + s.mu.Unlock() + s.write(recvMsg{err: ErrConnClosing}) + } + if t.statsHandler != nil { + connEnd := &stats.ConnEnd{ + Client: true, + } + t.statsHandler.HandleConn(t.ctx, connEnd) + } + return +} + +func (t *http2Client) GracefulClose() error { + t.mu.Lock() + switch t.state { + case unreachable: + // The server may close the connection concurrently. t is not available for + // any streams. Close it now. + t.mu.Unlock() + t.Close() + return nil + case closing: + t.mu.Unlock() + return nil + } + if t.state == draining { + t.mu.Unlock() + return nil + } + t.state = draining + active := len(t.activeStreams) + t.mu.Unlock() + if active == 0 { + return t.Close() + } + return nil +} + +// Write formats the data into HTTP2 data frame(s) and sends it out. The caller +// should proceed only if Write returns nil. +// TODO(zhaoq): opts.Delay is ignored in this implementation. Support it later +// if it improves the performance. +func (t *http2Client) Write(s *Stream, hdr []byte, data []byte, opts *Options) error { + secondStart := http2MaxFrameLen - len(hdr)%http2MaxFrameLen + if len(data) < secondStart { + secondStart = len(data) + } + hdr = append(hdr, data[:secondStart]...) + data = data[secondStart:] + isLastSlice := (len(data) == 0) + r := bytes.NewBuffer(hdr) + var ( + p []byte + oqv uint32 + ) + for { + oqv = atomic.LoadUint32(&t.outQuotaVersion) + if r.Len() > 0 || p != nil { + size := http2MaxFrameLen + // Wait until the stream has some quota to send the data. + sq, err := wait(s.ctx, s.done, s.goAway, t.shutdownChan, s.sendQuotaPool.acquire()) + if err != nil { + return err + } + // Wait until the transport has some quota to send the data. + tq, err := wait(s.ctx, s.done, s.goAway, t.shutdownChan, t.sendQuotaPool.acquire()) + if err != nil { + return err + } + if sq < size { + size = sq + } + if tq < size { + size = tq + } + if p == nil { + p = r.Next(size) + } + ps := len(p) + if ps < sq { + // Overbooked stream quota. Return it back. + s.sendQuotaPool.add(sq - ps) + } + if ps < tq { + // Overbooked transport quota. Return it back. + t.sendQuotaPool.add(tq - ps) + } + } + var ( + endStream bool + forceFlush bool + ) + // Indicate there is a writer who is about to write a data frame. + t.framer.adjustNumWriters(1) + // Got some quota. Try to acquire writing privilege on the transport. + if _, err := wait(s.ctx, s.done, s.goAway, t.shutdownChan, t.writableChan); err != nil { + if _, ok := err.(StreamError); ok || err == io.EOF { + // Return the connection quota back. + t.sendQuotaPool.add(len(p)) + } + if t.framer.adjustNumWriters(-1) == 0 { + // This writer is the last one in this batch and has the + // responsibility to flush the buffered frames. It queues + // a flush request to controlBuf instead of flushing directly + // in order to avoid the race with other writing or flushing. + t.controlBuf.put(&flushIO{}) + } + return err + } + select { + case <-s.ctx.Done(): + t.sendQuotaPool.add(len(p)) + if t.framer.adjustNumWriters(-1) == 0 { + t.controlBuf.put(&flushIO{}) + } + t.writableChan <- 0 + return ContextErr(s.ctx.Err()) + default: + } + if oqv != atomic.LoadUint32(&t.outQuotaVersion) { + // InitialWindowSize settings frame must have been received after we + // acquired send quota but before we got the writable channel. + // We must forsake this write. + t.sendQuotaPool.add(len(p)) + s.sendQuotaPool.add(len(p)) + if t.framer.adjustNumWriters(-1) == 0 { + t.controlBuf.put(&flushIO{}) + } + t.writableChan <- 0 + continue + } + if r.Len() == 0 { + if isLastSlice { + if opts.Last { + endStream = true + } + if t.framer.adjustNumWriters(0) == 1 { + // Do a force flush iff this is last frame for the entire gRPC message + // and the caller is the only writer at this moment. + forceFlush = true + } + } else { + isLastSlice = true + if len(data) != 0 { + r = bytes.NewBuffer(data) + } + } + } + // If WriteData fails, all the pending streams will be handled + // by http2Client.Close(). No explicit CloseStream() needs to be + // invoked. + if err := t.framer.writeData(forceFlush, s.id, endStream, p); err != nil { + t.notifyError(err) + return connectionErrorf(true, err, "transport: %v", err) + } + p = nil + if t.framer.adjustNumWriters(-1) == 0 { + t.framer.flushWrite() + } + t.writableChan <- 0 + if r.Len() == 0 { + break + } + } + if !opts.Last { + return nil + } + s.mu.Lock() + if s.state != streamDone { + s.state = streamWriteDone + } + s.mu.Unlock() + return nil +} + +func (t *http2Client) getStream(f http2.Frame) (*Stream, bool) { + t.mu.Lock() + defer t.mu.Unlock() + s, ok := t.activeStreams[f.Header().StreamID] + return s, ok +} + +// adjustWindow sends out extra window update over the initial window size +// of stream if the application is requesting data larger in size than +// the window. +func (t *http2Client) adjustWindow(s *Stream, n uint32) { + s.mu.Lock() + defer s.mu.Unlock() + if s.state == streamDone { + return + } + if w := s.fc.maybeAdjust(n); w > 0 { + // Piggyback conneciton's window update along. + if cw := t.fc.resetPendingUpdate(); cw > 0 { + t.controlBuf.put(&windowUpdate{0, cw, false}) + } + t.controlBuf.put(&windowUpdate{s.id, w, true}) + } +} + +// updateWindow adjusts the inbound quota for the stream and the transport. +// Window updates will deliver to the controller for sending when +// the cumulative quota exceeds the corresponding threshold. +func (t *http2Client) updateWindow(s *Stream, n uint32) { + s.mu.Lock() + defer s.mu.Unlock() + if s.state == streamDone { + return + } + if w := s.fc.onRead(n); w > 0 { + if cw := t.fc.resetPendingUpdate(); cw > 0 { + t.controlBuf.put(&windowUpdate{0, cw, false}) + } + t.controlBuf.put(&windowUpdate{s.id, w, true}) + } +} + +// updateFlowControl updates the incoming flow control windows +// for the transport and the stream based on the current bdp +// estimation. +func (t *http2Client) updateFlowControl(n uint32) { + t.mu.Lock() + for _, s := range t.activeStreams { + s.fc.newLimit(n) + } + t.initialWindowSize = int32(n) + t.mu.Unlock() + t.controlBuf.put(&windowUpdate{0, t.fc.newLimit(n), false}) + t.controlBuf.put(&settings{ + ack: false, + ss: []http2.Setting{ + { + ID: http2.SettingInitialWindowSize, + Val: uint32(n), + }, + }, + }) +} + +func (t *http2Client) handleData(f *http2.DataFrame) { + size := f.Header().Length + var sendBDPPing bool + if t.bdpEst != nil { + sendBDPPing = t.bdpEst.add(uint32(size)) + } + // Decouple connection's flow control from application's read. + // An update on connection's flow control should not depend on + // whether user application has read the data or not. Such a + // restriction is already imposed on the stream's flow control, + // and therefore the sender will be blocked anyways. + // Decoupling the connection flow control will prevent other + // active(fast) streams from starving in presence of slow or + // inactive streams. + // + // Furthermore, if a bdpPing is being sent out we can piggyback + // connection's window update for the bytes we just received. + if sendBDPPing { + t.controlBuf.put(&windowUpdate{0, uint32(size), false}) + t.controlBuf.put(bdpPing) + } else { + if err := t.fc.onData(uint32(size)); err != nil { + t.notifyError(connectionErrorf(true, err, "%v", err)) + return + } + if w := t.fc.onRead(uint32(size)); w > 0 { + t.controlBuf.put(&windowUpdate{0, w, true}) + } + } + // Select the right stream to dispatch. + s, ok := t.getStream(f) + if !ok { + return + } + if size > 0 { + s.mu.Lock() + if s.state == streamDone { + s.mu.Unlock() + return + } + if err := s.fc.onData(uint32(size)); err != nil { + s.rstStream = true + s.rstError = http2.ErrCodeFlowControl + s.finish(status.New(codes.Internal, err.Error())) + s.mu.Unlock() + s.write(recvMsg{err: io.EOF}) + return + } + if f.Header().Flags.Has(http2.FlagDataPadded) { + if w := s.fc.onRead(uint32(size) - uint32(len(f.Data()))); w > 0 { + t.controlBuf.put(&windowUpdate{s.id, w, true}) + } + } + s.mu.Unlock() + // TODO(bradfitz, zhaoq): A copy is required here because there is no + // guarantee f.Data() is consumed before the arrival of next frame. + // Can this copy be eliminated? + if len(f.Data()) > 0 { + data := make([]byte, len(f.Data())) + copy(data, f.Data()) + s.write(recvMsg{data: data}) + } + } + // The server has closed the stream without sending trailers. Record that + // the read direction is closed, and set the status appropriately. + if f.FrameHeader.Flags.Has(http2.FlagDataEndStream) { + s.mu.Lock() + if s.state == streamDone { + s.mu.Unlock() + return + } + s.finish(status.New(codes.Internal, "server closed the stream without sending trailers")) + s.mu.Unlock() + s.write(recvMsg{err: io.EOF}) + } +} + +func (t *http2Client) handleRSTStream(f *http2.RSTStreamFrame) { + s, ok := t.getStream(f) + if !ok { + return + } + s.mu.Lock() + if s.state == streamDone { + s.mu.Unlock() + return + } + if !s.headerDone { + close(s.headerChan) + s.headerDone = true + } + statusCode, ok := http2ErrConvTab[http2.ErrCode(f.ErrCode)] + if !ok { + warningf("transport: http2Client.handleRSTStream found no mapped gRPC status for the received http2 error %v", f.ErrCode) + statusCode = codes.Unknown + } + s.finish(status.Newf(statusCode, "stream terminated by RST_STREAM with error code: %v", f.ErrCode)) + s.mu.Unlock() + s.write(recvMsg{err: io.EOF}) +} + +func (t *http2Client) handleSettings(f *http2.SettingsFrame) { + if f.IsAck() { + return + } + var ss []http2.Setting + f.ForeachSetting(func(s http2.Setting) error { + ss = append(ss, s) + return nil + }) + // The settings will be applied once the ack is sent. + t.controlBuf.put(&settings{ack: true, ss: ss}) +} + +func (t *http2Client) handlePing(f *http2.PingFrame) { + if f.IsAck() { + // Maybe it's a BDP ping. + if t.bdpEst != nil { + t.bdpEst.calculate(f.Data) + } + return + } + pingAck := &ping{ack: true} + copy(pingAck.data[:], f.Data[:]) + t.controlBuf.put(pingAck) +} + +func (t *http2Client) handleGoAway(f *http2.GoAwayFrame) { + t.mu.Lock() + if t.state != reachable && t.state != draining { + t.mu.Unlock() + return + } + if f.ErrCode == http2.ErrCodeEnhanceYourCalm { + infof("Client received GoAway with http2.ErrCodeEnhanceYourCalm.") + } + id := f.LastStreamID + if id > 0 && id%2 != 1 { + t.mu.Unlock() + t.notifyError(connectionErrorf(true, nil, "received illegal http2 GOAWAY frame: stream ID %d is even", f.LastStreamID)) + return + } + // A client can recieve multiple GoAways from server (look at https://github.com/grpc/grpc-go/issues/1387). + // The idea is that the first GoAway will be sent with an ID of MaxInt32 and the second GoAway will be sent after an RTT delay + // with the ID of the last stream the server will process. + // Therefore, when we get the first GoAway we don't really close any streams. While in case of second GoAway we + // close all streams created after the second GoAwayId. This way streams that were in-flight while the GoAway from server + // was being sent don't get killed. + select { + case <-t.goAway: // t.goAway has been closed (i.e.,multiple GoAways). + // If there are multiple GoAways the first one should always have an ID greater than the following ones. + if id > t.prevGoAwayID { + t.mu.Unlock() + t.notifyError(connectionErrorf(true, nil, "received illegal http2 GOAWAY frame: previously recv GOAWAY frame with LastStramID %d, currently recv %d", id, f.LastStreamID)) + return + } + default: + t.setGoAwayReason(f) + close(t.goAway) + t.state = draining + } + // All streams with IDs greater than the GoAwayId + // and smaller than the previous GoAway ID should be killed. + upperLimit := t.prevGoAwayID + if upperLimit == 0 { // This is the first GoAway Frame. + upperLimit = math.MaxUint32 // Kill all streams after the GoAway ID. + } + for streamID, stream := range t.activeStreams { + if streamID > id && streamID <= upperLimit { + close(stream.goAway) + } + } + t.prevGoAwayID = id + active := len(t.activeStreams) + t.mu.Unlock() + if active == 0 { + t.Close() + } +} + +// setGoAwayReason sets the value of t.goAwayReason based +// on the GoAway frame received. +// It expects a lock on transport's mutext to be held by +// the caller. +func (t *http2Client) setGoAwayReason(f *http2.GoAwayFrame) { + t.goAwayReason = NoReason + switch f.ErrCode { + case http2.ErrCodeEnhanceYourCalm: + if string(f.DebugData()) == "too_many_pings" { + t.goAwayReason = TooManyPings + } + } +} + +func (t *http2Client) GetGoAwayReason() GoAwayReason { + t.mu.Lock() + defer t.mu.Unlock() + return t.goAwayReason +} + +func (t *http2Client) handleWindowUpdate(f *http2.WindowUpdateFrame) { + id := f.Header().StreamID + incr := f.Increment + if id == 0 { + t.sendQuotaPool.add(int(incr)) + return + } + if s, ok := t.getStream(f); ok { + s.sendQuotaPool.add(int(incr)) + } +} + +// operateHeaders takes action on the decoded headers. +func (t *http2Client) operateHeaders(frame *http2.MetaHeadersFrame) { + s, ok := t.getStream(frame) + if !ok { + return + } + s.mu.Lock() + s.bytesReceived = true + s.mu.Unlock() + var state decodeState + if err := state.decodeResponseHeader(frame); err != nil { + s.mu.Lock() + if !s.headerDone { + close(s.headerChan) + s.headerDone = true + } + s.mu.Unlock() + s.write(recvMsg{err: err}) + // Something wrong. Stops reading even when there is remaining. + return + } + + endStream := frame.StreamEnded() + var isHeader bool + defer func() { + if t.statsHandler != nil { + if isHeader { + inHeader := &stats.InHeader{ + Client: true, + WireLength: int(frame.Header().Length), + } + t.statsHandler.HandleRPC(s.ctx, inHeader) + } else { + inTrailer := &stats.InTrailer{ + Client: true, + WireLength: int(frame.Header().Length), + } + t.statsHandler.HandleRPC(s.ctx, inTrailer) + } + } + }() + + s.mu.Lock() + if !endStream { + s.recvCompress = state.encoding + } + if !s.headerDone { + if !endStream && len(state.mdata) > 0 { + s.header = state.mdata + } + close(s.headerChan) + s.headerDone = true + isHeader = true + } + if !endStream || s.state == streamDone { + s.mu.Unlock() + return + } + + if len(state.mdata) > 0 { + s.trailer = state.mdata + } + s.finish(state.status()) + s.mu.Unlock() + s.write(recvMsg{err: io.EOF}) +} + +func handleMalformedHTTP2(s *Stream, err error) { + s.mu.Lock() + if !s.headerDone { + close(s.headerChan) + s.headerDone = true + } + s.mu.Unlock() + s.write(recvMsg{err: err}) +} + +// reader runs as a separate goroutine in charge of reading data from network +// connection. +// +// TODO(zhaoq): currently one reader per transport. Investigate whether this is +// optimal. +// TODO(zhaoq): Check the validity of the incoming frame sequence. +func (t *http2Client) reader() { + // Check the validity of server preface. + frame, err := t.framer.readFrame() + if err != nil { + t.notifyError(err) + return + } + atomic.CompareAndSwapUint32(&t.activity, 0, 1) + sf, ok := frame.(*http2.SettingsFrame) + if !ok { + t.notifyError(err) + return + } + t.handleSettings(sf) + + // loop to keep reading incoming messages on this transport. + for { + frame, err := t.framer.readFrame() + atomic.CompareAndSwapUint32(&t.activity, 0, 1) + if err != nil { + // Abort an active stream if the http2.Framer returns a + // http2.StreamError. This can happen only if the server's response + // is malformed http2. + if se, ok := err.(http2.StreamError); ok { + t.mu.Lock() + s := t.activeStreams[se.StreamID] + t.mu.Unlock() + if s != nil { + // use error detail to provide better err message + handleMalformedHTTP2(s, streamErrorf(http2ErrConvTab[se.Code], "%v", t.framer.errorDetail())) + } + continue + } else { + // Transport error. + t.notifyError(err) + return + } + } + switch frame := frame.(type) { + case *http2.MetaHeadersFrame: + t.operateHeaders(frame) + case *http2.DataFrame: + t.handleData(frame) + case *http2.RSTStreamFrame: + t.handleRSTStream(frame) + case *http2.SettingsFrame: + t.handleSettings(frame) + case *http2.PingFrame: + t.handlePing(frame) + case *http2.GoAwayFrame: + t.handleGoAway(frame) + case *http2.WindowUpdateFrame: + t.handleWindowUpdate(frame) + default: + errorf("transport: http2Client.reader got unhandled frame type %v.", frame) + } + } +} + +func (t *http2Client) applySettings(ss []http2.Setting) { + for _, s := range ss { + switch s.ID { + case http2.SettingMaxConcurrentStreams: + // TODO(zhaoq): This is a hack to avoid significant refactoring of the + // code to deal with the unrealistic int32 overflow. Probably will try + // to find a better way to handle this later. + if s.Val > math.MaxInt32 { + s.Val = math.MaxInt32 + } + t.mu.Lock() + ms := t.maxStreams + t.maxStreams = int(s.Val) + t.mu.Unlock() + t.streamsQuota.add(int(s.Val) - ms) + case http2.SettingInitialWindowSize: + t.mu.Lock() + for _, stream := range t.activeStreams { + // Adjust the sending quota for each stream. + stream.sendQuotaPool.add(int(s.Val) - int(t.streamSendQuota)) + } + t.streamSendQuota = s.Val + t.mu.Unlock() + atomic.AddUint32(&t.outQuotaVersion, 1) + } + } +} + +// controller running in a separate goroutine takes charge of sending control +// frames (e.g., window update, reset stream, setting, etc.) to the server. +func (t *http2Client) controller() { + for { + select { + case i := <-t.controlBuf.get(): + t.controlBuf.load() + select { + case <-t.writableChan: + switch i := i.(type) { + case *windowUpdate: + t.framer.writeWindowUpdate(i.flush, i.streamID, i.increment) + case *settings: + if i.ack { + t.framer.writeSettingsAck(true) + t.applySettings(i.ss) + } else { + t.framer.writeSettings(true, i.ss...) + } + case *resetStream: + // If the server needs to be to intimated about stream closing, + // then we need to make sure the RST_STREAM frame is written to + // the wire before the headers of the next stream waiting on + // streamQuota. We ensure this by adding to the streamsQuota pool + // only after having acquired the writableChan to send RST_STREAM. + t.streamsQuota.add(1) + t.framer.writeRSTStream(true, i.streamID, i.code) + case *flushIO: + t.framer.flushWrite() + case *ping: + if !i.ack { + t.bdpEst.timesnap(i.data) + } + t.framer.writePing(true, i.ack, i.data) + default: + errorf("transport: http2Client.controller got unexpected item type %v\n", i) + } + t.writableChan <- 0 + continue + case <-t.shutdownChan: + return + } + case <-t.shutdownChan: + return + } + } +} + +// keepalive running in a separate goroutune makes sure the connection is alive by sending pings. +func (t *http2Client) keepalive() { + p := &ping{data: [8]byte{}} + timer := time.NewTimer(t.kp.Time) + for { + select { + case <-timer.C: + if atomic.CompareAndSwapUint32(&t.activity, 1, 0) { + timer.Reset(t.kp.Time) + continue + } + // Check if keepalive should go dormant. + t.mu.Lock() + if len(t.activeStreams) < 1 && !t.kp.PermitWithoutStream { + // Make awakenKeepalive writable. + <-t.awakenKeepalive + t.mu.Unlock() + select { + case <-t.awakenKeepalive: + // If the control gets here a ping has been sent + // need to reset the timer with keepalive.Timeout. + case <-t.shutdownChan: + return + } + } else { + t.mu.Unlock() + // Send ping. + t.controlBuf.put(p) + } + + // By the time control gets here a ping has been sent one way or the other. + timer.Reset(t.kp.Timeout) + select { + case <-timer.C: + if atomic.CompareAndSwapUint32(&t.activity, 1, 0) { + timer.Reset(t.kp.Time) + continue + } + t.Close() + return + case <-t.shutdownChan: + if !timer.Stop() { + <-timer.C + } + return + } + case <-t.shutdownChan: + if !timer.Stop() { + <-timer.C + } + return + } + } +} + +func (t *http2Client) Error() <-chan struct{} { + return t.errorChan +} + +func (t *http2Client) GoAway() <-chan struct{} { + return t.goAway +} + +func (t *http2Client) notifyError(err error) { + t.mu.Lock() + // make sure t.errorChan is closed only once. + if t.state == draining { + t.mu.Unlock() + t.Close() + return + } + if t.state == reachable { + t.state = unreachable + close(t.errorChan) + infof("transport: http2Client.notifyError got notified that the client transport was broken %v.", err) + } + t.mu.Unlock() +} diff --git a/vendor/google.golang.org/grpc/transport/http2_server.go b/vendor/google.golang.org/grpc/transport/http2_server.go new file mode 100644 index 000000000..0fd81af9e --- /dev/null +++ b/vendor/google.golang.org/grpc/transport/http2_server.go @@ -0,0 +1,1222 @@ +/* + * + * Copyright 2014 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package transport + +import ( + "bytes" + "errors" + "io" + "math" + "math/rand" + "net" + "strconv" + "sync" + "sync/atomic" + "time" + + "github.com/golang/protobuf/proto" + "golang.org/x/net/context" + "golang.org/x/net/http2" + "golang.org/x/net/http2/hpack" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/credentials" + "google.golang.org/grpc/keepalive" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/peer" + "google.golang.org/grpc/stats" + "google.golang.org/grpc/status" + "google.golang.org/grpc/tap" +) + +// ErrIllegalHeaderWrite indicates that setting header is illegal because of +// the stream's state. +var ErrIllegalHeaderWrite = errors.New("transport: the stream is done or WriteHeader was already called") + +// http2Server implements the ServerTransport interface with HTTP2. +type http2Server struct { + ctx context.Context + conn net.Conn + remoteAddr net.Addr + localAddr net.Addr + maxStreamID uint32 // max stream ID ever seen + authInfo credentials.AuthInfo // auth info about the connection + inTapHandle tap.ServerInHandle + // writableChan synchronizes write access to the transport. + // A writer acquires the write lock by receiving a value on writableChan + // and releases it by sending on writableChan. + writableChan chan int + // shutdownChan is closed when Close is called. + // Blocking operations should select on shutdownChan to avoid + // blocking forever after Close. + shutdownChan chan struct{} + framer *framer + hBuf *bytes.Buffer // the buffer for HPACK encoding + hEnc *hpack.Encoder // HPACK encoder + // The max number of concurrent streams. + maxStreams uint32 + // controlBuf delivers all the control related tasks (e.g., window + // updates, reset streams, and various settings) to the controller. + controlBuf *controlBuffer + fc *inFlow + // sendQuotaPool provides flow control to outbound message. + sendQuotaPool *quotaPool + stats stats.Handler + // Flag to keep track of reading activity on transport. + // 1 is true and 0 is false. + activity uint32 // Accessed atomically. + // Keepalive and max-age parameters for the server. + kp keepalive.ServerParameters + + // Keepalive enforcement policy. + kep keepalive.EnforcementPolicy + // The time instance last ping was received. + lastPingAt time.Time + // Number of times the client has violated keepalive ping policy so far. + pingStrikes uint8 + // Flag to signify that number of ping strikes should be reset to 0. + // This is set whenever data or header frames are sent. + // 1 means yes. + resetPingStrikes uint32 // Accessed atomically. + initialWindowSize int32 + bdpEst *bdpEstimator + + outQuotaVersion uint32 + + mu sync.Mutex // guard the following + + // drainChan is initialized when drain(...) is called the first time. + // After which the server writes out the first GoAway(with ID 2^31-1) frame. + // Then an independent goroutine will be launched to later send the second GoAway. + // During this time we don't want to write another first GoAway(with ID 2^31 -1) frame. + // Thus call to drain(...) will be a no-op if drainChan is already initialized since draining is + // already underway. + drainChan chan struct{} + state transportState + activeStreams map[uint32]*Stream + // the per-stream outbound flow control window size set by the peer. + streamSendQuota uint32 + // idle is the time instant when the connection went idle. + // This is either the begining of the connection or when the number of + // RPCs go down to 0. + // When the connection is busy, this value is set to 0. + idle time.Time +} + +// newHTTP2Server constructs a ServerTransport based on HTTP2. ConnectionError is +// returned if something goes wrong. +func newHTTP2Server(conn net.Conn, config *ServerConfig) (_ ServerTransport, err error) { + framer := newFramer(conn) + // Send initial settings as connection preface to client. + var isettings []http2.Setting + // TODO(zhaoq): Have a better way to signal "no limit" because 0 is + // permitted in the HTTP2 spec. + maxStreams := config.MaxStreams + if maxStreams == 0 { + maxStreams = math.MaxUint32 + } else { + isettings = append(isettings, http2.Setting{ + ID: http2.SettingMaxConcurrentStreams, + Val: maxStreams, + }) + } + dynamicWindow := true + iwz := int32(initialWindowSize) + if config.InitialWindowSize >= defaultWindowSize { + iwz = config.InitialWindowSize + dynamicWindow = false + } + icwz := int32(initialWindowSize) + if config.InitialConnWindowSize >= defaultWindowSize { + icwz = config.InitialConnWindowSize + dynamicWindow = false + } + if iwz != defaultWindowSize { + isettings = append(isettings, http2.Setting{ + ID: http2.SettingInitialWindowSize, + Val: uint32(iwz)}) + } + if err := framer.writeSettings(true, isettings...); err != nil { + return nil, connectionErrorf(true, err, "transport: %v", err) + } + // Adjust the connection flow control window if needed. + if delta := uint32(icwz - defaultWindowSize); delta > 0 { + if err := framer.writeWindowUpdate(true, 0, delta); err != nil { + return nil, connectionErrorf(true, err, "transport: %v", err) + } + } + kp := config.KeepaliveParams + if kp.MaxConnectionIdle == 0 { + kp.MaxConnectionIdle = defaultMaxConnectionIdle + } + if kp.MaxConnectionAge == 0 { + kp.MaxConnectionAge = defaultMaxConnectionAge + } + // Add a jitter to MaxConnectionAge. + kp.MaxConnectionAge += getJitter(kp.MaxConnectionAge) + if kp.MaxConnectionAgeGrace == 0 { + kp.MaxConnectionAgeGrace = defaultMaxConnectionAgeGrace + } + if kp.Time == 0 { + kp.Time = defaultServerKeepaliveTime + } + if kp.Timeout == 0 { + kp.Timeout = defaultServerKeepaliveTimeout + } + kep := config.KeepalivePolicy + if kep.MinTime == 0 { + kep.MinTime = defaultKeepalivePolicyMinTime + } + var buf bytes.Buffer + t := &http2Server{ + ctx: context.Background(), + conn: conn, + remoteAddr: conn.RemoteAddr(), + localAddr: conn.LocalAddr(), + authInfo: config.AuthInfo, + framer: framer, + hBuf: &buf, + hEnc: hpack.NewEncoder(&buf), + maxStreams: maxStreams, + inTapHandle: config.InTapHandle, + controlBuf: newControlBuffer(), + fc: &inFlow{limit: uint32(icwz)}, + sendQuotaPool: newQuotaPool(defaultWindowSize), + state: reachable, + writableChan: make(chan int, 1), + shutdownChan: make(chan struct{}), + activeStreams: make(map[uint32]*Stream), + streamSendQuota: defaultWindowSize, + stats: config.StatsHandler, + kp: kp, + idle: time.Now(), + kep: kep, + initialWindowSize: iwz, + } + if dynamicWindow { + t.bdpEst = &bdpEstimator{ + bdp: initialWindowSize, + updateFlowControl: t.updateFlowControl, + } + } + if t.stats != nil { + t.ctx = t.stats.TagConn(t.ctx, &stats.ConnTagInfo{ + RemoteAddr: t.remoteAddr, + LocalAddr: t.localAddr, + }) + connBegin := &stats.ConnBegin{} + t.stats.HandleConn(t.ctx, connBegin) + } + go t.controller() + go t.keepalive() + t.writableChan <- 0 + return t, nil +} + +// operateHeader takes action on the decoded headers. +func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(*Stream), traceCtx func(context.Context, string) context.Context) (close bool) { + streamID := frame.Header().StreamID + + var state decodeState + for _, hf := range frame.Fields { + if err := state.processHeaderField(hf); err != nil { + if se, ok := err.(StreamError); ok { + t.controlBuf.put(&resetStream{streamID, statusCodeConvTab[se.Code]}) + } + return + } + } + + buf := newRecvBuffer() + s := &Stream{ + id: streamID, + st: t, + buf: buf, + fc: &inFlow{limit: uint32(t.initialWindowSize)}, + recvCompress: state.encoding, + method: state.method, + } + + if frame.StreamEnded() { + // s is just created by the caller. No lock needed. + s.state = streamReadDone + } + if state.timeoutSet { + s.ctx, s.cancel = context.WithTimeout(t.ctx, state.timeout) + } else { + s.ctx, s.cancel = context.WithCancel(t.ctx) + } + pr := &peer.Peer{ + Addr: t.remoteAddr, + } + // Attach Auth info if there is any. + if t.authInfo != nil { + pr.AuthInfo = t.authInfo + } + s.ctx = peer.NewContext(s.ctx, pr) + // Cache the current stream to the context so that the server application + // can find out. Required when the server wants to send some metadata + // back to the client (unary call only). + s.ctx = newContextWithStream(s.ctx, s) + // Attach the received metadata to the context. + if len(state.mdata) > 0 { + s.ctx = metadata.NewIncomingContext(s.ctx, state.mdata) + } + if state.statsTags != nil { + s.ctx = stats.SetIncomingTags(s.ctx, state.statsTags) + } + if state.statsTrace != nil { + s.ctx = stats.SetIncomingTrace(s.ctx, state.statsTrace) + } + if t.inTapHandle != nil { + var err error + info := &tap.Info{ + FullMethodName: state.method, + } + s.ctx, err = t.inTapHandle(s.ctx, info) + if err != nil { + warningf("transport: http2Server.operateHeaders got an error from InTapHandle: %v", err) + t.controlBuf.put(&resetStream{s.id, http2.ErrCodeRefusedStream}) + return + } + } + t.mu.Lock() + if t.state != reachable { + t.mu.Unlock() + return + } + if uint32(len(t.activeStreams)) >= t.maxStreams { + t.mu.Unlock() + t.controlBuf.put(&resetStream{streamID, http2.ErrCodeRefusedStream}) + return + } + if streamID%2 != 1 || streamID <= t.maxStreamID { + t.mu.Unlock() + // illegal gRPC stream id. + errorf("transport: http2Server.HandleStreams received an illegal stream id: %v", streamID) + return true + } + t.maxStreamID = streamID + s.sendQuotaPool = newQuotaPool(int(t.streamSendQuota)) + t.activeStreams[streamID] = s + if len(t.activeStreams) == 1 { + t.idle = time.Time{} + } + t.mu.Unlock() + s.requestRead = func(n int) { + t.adjustWindow(s, uint32(n)) + } + s.ctx = traceCtx(s.ctx, s.method) + if t.stats != nil { + s.ctx = t.stats.TagRPC(s.ctx, &stats.RPCTagInfo{FullMethodName: s.method}) + inHeader := &stats.InHeader{ + FullMethod: s.method, + RemoteAddr: t.remoteAddr, + LocalAddr: t.localAddr, + Compression: s.recvCompress, + WireLength: int(frame.Header().Length), + } + t.stats.HandleRPC(s.ctx, inHeader) + } + s.trReader = &transportReader{ + reader: &recvBufferReader{ + ctx: s.ctx, + recv: s.buf, + }, + windowHandler: func(n int) { + t.updateWindow(s, uint32(n)) + }, + } + handle(s) + return +} + +// HandleStreams receives incoming streams using the given handler. This is +// typically run in a separate goroutine. +// traceCtx attaches trace to ctx and returns the new context. +func (t *http2Server) HandleStreams(handle func(*Stream), traceCtx func(context.Context, string) context.Context) { + // Check the validity of client preface. + preface := make([]byte, len(clientPreface)) + if _, err := io.ReadFull(t.conn, preface); err != nil { + // Only log if it isn't a simple tcp accept check (ie: tcp balancer doing open/close socket) + if err != io.EOF { + errorf("transport: http2Server.HandleStreams failed to receive the preface from client: %v", err) + } + t.Close() + return + } + if !bytes.Equal(preface, clientPreface) { + errorf("transport: http2Server.HandleStreams received bogus greeting from client: %q", preface) + t.Close() + return + } + + frame, err := t.framer.readFrame() + if err == io.EOF || err == io.ErrUnexpectedEOF { + t.Close() + return + } + if err != nil { + errorf("transport: http2Server.HandleStreams failed to read initial settings frame: %v", err) + t.Close() + return + } + atomic.StoreUint32(&t.activity, 1) + sf, ok := frame.(*http2.SettingsFrame) + if !ok { + errorf("transport: http2Server.HandleStreams saw invalid preface type %T from client", frame) + t.Close() + return + } + t.handleSettings(sf) + + for { + frame, err := t.framer.readFrame() + atomic.StoreUint32(&t.activity, 1) + if err != nil { + if se, ok := err.(http2.StreamError); ok { + t.mu.Lock() + s := t.activeStreams[se.StreamID] + t.mu.Unlock() + if s != nil { + t.closeStream(s) + } + t.controlBuf.put(&resetStream{se.StreamID, se.Code}) + continue + } + if err == io.EOF || err == io.ErrUnexpectedEOF { + t.Close() + return + } + warningf("transport: http2Server.HandleStreams failed to read frame: %v", err) + t.Close() + return + } + switch frame := frame.(type) { + case *http2.MetaHeadersFrame: + if t.operateHeaders(frame, handle, traceCtx) { + t.Close() + break + } + case *http2.DataFrame: + t.handleData(frame) + case *http2.RSTStreamFrame: + t.handleRSTStream(frame) + case *http2.SettingsFrame: + t.handleSettings(frame) + case *http2.PingFrame: + t.handlePing(frame) + case *http2.WindowUpdateFrame: + t.handleWindowUpdate(frame) + case *http2.GoAwayFrame: + // TODO: Handle GoAway from the client appropriately. + default: + errorf("transport: http2Server.HandleStreams found unhandled frame type %v.", frame) + } + } +} + +func (t *http2Server) getStream(f http2.Frame) (*Stream, bool) { + t.mu.Lock() + defer t.mu.Unlock() + if t.activeStreams == nil { + // The transport is closing. + return nil, false + } + s, ok := t.activeStreams[f.Header().StreamID] + if !ok { + // The stream is already done. + return nil, false + } + return s, true +} + +// adjustWindow sends out extra window update over the initial window size +// of stream if the application is requesting data larger in size than +// the window. +func (t *http2Server) adjustWindow(s *Stream, n uint32) { + s.mu.Lock() + defer s.mu.Unlock() + if s.state == streamDone { + return + } + if w := s.fc.maybeAdjust(n); w > 0 { + if cw := t.fc.resetPendingUpdate(); cw > 0 { + t.controlBuf.put(&windowUpdate{0, cw, false}) + } + t.controlBuf.put(&windowUpdate{s.id, w, true}) + } +} + +// updateWindow adjusts the inbound quota for the stream and the transport. +// Window updates will deliver to the controller for sending when +// the cumulative quota exceeds the corresponding threshold. +func (t *http2Server) updateWindow(s *Stream, n uint32) { + s.mu.Lock() + defer s.mu.Unlock() + if s.state == streamDone { + return + } + if w := s.fc.onRead(n); w > 0 { + if cw := t.fc.resetPendingUpdate(); cw > 0 { + t.controlBuf.put(&windowUpdate{0, cw, false}) + } + t.controlBuf.put(&windowUpdate{s.id, w, true}) + } +} + +// updateFlowControl updates the incoming flow control windows +// for the transport and the stream based on the current bdp +// estimation. +func (t *http2Server) updateFlowControl(n uint32) { + t.mu.Lock() + for _, s := range t.activeStreams { + s.fc.newLimit(n) + } + t.initialWindowSize = int32(n) + t.mu.Unlock() + t.controlBuf.put(&windowUpdate{0, t.fc.newLimit(n), false}) + t.controlBuf.put(&settings{ + ack: false, + ss: []http2.Setting{ + { + ID: http2.SettingInitialWindowSize, + Val: uint32(n), + }, + }, + }) + +} + +func (t *http2Server) handleData(f *http2.DataFrame) { + size := f.Header().Length + var sendBDPPing bool + if t.bdpEst != nil { + sendBDPPing = t.bdpEst.add(uint32(size)) + } + // Decouple connection's flow control from application's read. + // An update on connection's flow control should not depend on + // whether user application has read the data or not. Such a + // restriction is already imposed on the stream's flow control, + // and therefore the sender will be blocked anyways. + // Decoupling the connection flow control will prevent other + // active(fast) streams from starving in presence of slow or + // inactive streams. + // + // Furthermore, if a bdpPing is being sent out we can piggyback + // connection's window update for the bytes we just received. + if sendBDPPing { + t.controlBuf.put(&windowUpdate{0, uint32(size), false}) + t.controlBuf.put(bdpPing) + } else { + if err := t.fc.onData(uint32(size)); err != nil { + errorf("transport: http2Server %v", err) + t.Close() + return + } + if w := t.fc.onRead(uint32(size)); w > 0 { + t.controlBuf.put(&windowUpdate{0, w, true}) + } + } + // Select the right stream to dispatch. + s, ok := t.getStream(f) + if !ok { + return + } + if size > 0 { + s.mu.Lock() + if s.state == streamDone { + s.mu.Unlock() + return + } + if err := s.fc.onData(uint32(size)); err != nil { + s.mu.Unlock() + t.closeStream(s) + t.controlBuf.put(&resetStream{s.id, http2.ErrCodeFlowControl}) + return + } + if f.Header().Flags.Has(http2.FlagDataPadded) { + if w := s.fc.onRead(uint32(size) - uint32(len(f.Data()))); w > 0 { + t.controlBuf.put(&windowUpdate{s.id, w, true}) + } + } + s.mu.Unlock() + // TODO(bradfitz, zhaoq): A copy is required here because there is no + // guarantee f.Data() is consumed before the arrival of next frame. + // Can this copy be eliminated? + if len(f.Data()) > 0 { + data := make([]byte, len(f.Data())) + copy(data, f.Data()) + s.write(recvMsg{data: data}) + } + } + if f.Header().Flags.Has(http2.FlagDataEndStream) { + // Received the end of stream from the client. + s.mu.Lock() + if s.state != streamDone { + s.state = streamReadDone + } + s.mu.Unlock() + s.write(recvMsg{err: io.EOF}) + } +} + +func (t *http2Server) handleRSTStream(f *http2.RSTStreamFrame) { + s, ok := t.getStream(f) + if !ok { + return + } + t.closeStream(s) +} + +func (t *http2Server) handleSettings(f *http2.SettingsFrame) { + if f.IsAck() { + return + } + var ss []http2.Setting + f.ForeachSetting(func(s http2.Setting) error { + ss = append(ss, s) + return nil + }) + // The settings will be applied once the ack is sent. + t.controlBuf.put(&settings{ack: true, ss: ss}) +} + +const ( + maxPingStrikes = 2 + defaultPingTimeout = 2 * time.Hour +) + +func (t *http2Server) handlePing(f *http2.PingFrame) { + if f.IsAck() { + if f.Data == goAwayPing.data && t.drainChan != nil { + close(t.drainChan) + return + } + // Maybe it's a BDP ping. + if t.bdpEst != nil { + t.bdpEst.calculate(f.Data) + } + return + } + pingAck := &ping{ack: true} + copy(pingAck.data[:], f.Data[:]) + t.controlBuf.put(pingAck) + + now := time.Now() + defer func() { + t.lastPingAt = now + }() + // A reset ping strikes means that we don't need to check for policy + // violation for this ping and the pingStrikes counter should be set + // to 0. + if atomic.CompareAndSwapUint32(&t.resetPingStrikes, 1, 0) { + t.pingStrikes = 0 + return + } + t.mu.Lock() + ns := len(t.activeStreams) + t.mu.Unlock() + if ns < 1 && !t.kep.PermitWithoutStream { + // Keepalive shouldn't be active thus, this new ping should + // have come after atleast defaultPingTimeout. + if t.lastPingAt.Add(defaultPingTimeout).After(now) { + t.pingStrikes++ + } + } else { + // Check if keepalive policy is respected. + if t.lastPingAt.Add(t.kep.MinTime).After(now) { + t.pingStrikes++ + } + } + + if t.pingStrikes > maxPingStrikes { + // Send goaway and close the connection. + t.controlBuf.put(&goAway{code: http2.ErrCodeEnhanceYourCalm, debugData: []byte("too_many_pings"), closeConn: true}) + } +} + +func (t *http2Server) handleWindowUpdate(f *http2.WindowUpdateFrame) { + id := f.Header().StreamID + incr := f.Increment + if id == 0 { + t.sendQuotaPool.add(int(incr)) + return + } + if s, ok := t.getStream(f); ok { + s.sendQuotaPool.add(int(incr)) + } +} + +func (t *http2Server) writeHeaders(s *Stream, b *bytes.Buffer, endStream bool) error { + first := true + endHeaders := false + var err error + defer func() { + if err == nil { + // Reset ping strikes when seding headers since that might cause the + // peer to send ping. + atomic.StoreUint32(&t.resetPingStrikes, 1) + } + }() + // Sends the headers in a single batch. + for !endHeaders { + size := t.hBuf.Len() + if size > http2MaxFrameLen { + size = http2MaxFrameLen + } else { + endHeaders = true + } + if first { + p := http2.HeadersFrameParam{ + StreamID: s.id, + BlockFragment: b.Next(size), + EndStream: endStream, + EndHeaders: endHeaders, + } + err = t.framer.writeHeaders(endHeaders, p) + first = false + } else { + err = t.framer.writeContinuation(endHeaders, s.id, endHeaders, b.Next(size)) + } + if err != nil { + t.Close() + return connectionErrorf(true, err, "transport: %v", err) + } + } + return nil +} + +// WriteHeader sends the header metedata md back to the client. +func (t *http2Server) WriteHeader(s *Stream, md metadata.MD) error { + s.mu.Lock() + if s.headerOk || s.state == streamDone { + s.mu.Unlock() + return ErrIllegalHeaderWrite + } + s.headerOk = true + if md.Len() > 0 { + if s.header.Len() > 0 { + s.header = metadata.Join(s.header, md) + } else { + s.header = md + } + } + md = s.header + s.mu.Unlock() + if _, err := wait(s.ctx, nil, nil, t.shutdownChan, t.writableChan); err != nil { + return err + } + t.hBuf.Reset() + t.hEnc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"}) + t.hEnc.WriteField(hpack.HeaderField{Name: "content-type", Value: "application/grpc"}) + if s.sendCompress != "" { + t.hEnc.WriteField(hpack.HeaderField{Name: "grpc-encoding", Value: s.sendCompress}) + } + for k, vv := range md { + if isReservedHeader(k) { + // Clients don't tolerate reading restricted headers after some non restricted ones were sent. + continue + } + for _, v := range vv { + t.hEnc.WriteField(hpack.HeaderField{Name: k, Value: encodeMetadataHeader(k, v)}) + } + } + bufLen := t.hBuf.Len() + if err := t.writeHeaders(s, t.hBuf, false); err != nil { + return err + } + if t.stats != nil { + outHeader := &stats.OutHeader{ + WireLength: bufLen, + } + t.stats.HandleRPC(s.Context(), outHeader) + } + t.writableChan <- 0 + return nil +} + +// WriteStatus sends stream status to the client and terminates the stream. +// There is no further I/O operations being able to perform on this stream. +// TODO(zhaoq): Now it indicates the end of entire stream. Revisit if early +// OK is adopted. +func (t *http2Server) WriteStatus(s *Stream, st *status.Status) error { + var headersSent, hasHeader bool + s.mu.Lock() + if s.state == streamDone { + s.mu.Unlock() + return nil + } + if s.headerOk { + headersSent = true + } + if s.header.Len() > 0 { + hasHeader = true + } + s.mu.Unlock() + + if !headersSent && hasHeader { + t.WriteHeader(s, nil) + headersSent = true + } + + // Always write a status regardless of context cancellation unless the stream + // is terminated (e.g. by a RST_STREAM, GOAWAY, or transport error). The + // server's application code is already done so it is fine to ignore s.ctx. + select { + case <-t.shutdownChan: + return ErrConnClosing + case <-t.writableChan: + } + t.hBuf.Reset() + if !headersSent { + t.hEnc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"}) + t.hEnc.WriteField(hpack.HeaderField{Name: "content-type", Value: "application/grpc"}) + } + t.hEnc.WriteField( + hpack.HeaderField{ + Name: "grpc-status", + Value: strconv.Itoa(int(st.Code())), + }) + t.hEnc.WriteField(hpack.HeaderField{Name: "grpc-message", Value: encodeGrpcMessage(st.Message())}) + + if p := st.Proto(); p != nil && len(p.Details) > 0 { + stBytes, err := proto.Marshal(p) + if err != nil { + // TODO: return error instead, when callers are able to handle it. + panic(err) + } + + t.hEnc.WriteField(hpack.HeaderField{Name: "grpc-status-details-bin", Value: encodeBinHeader(stBytes)}) + } + + // Attach the trailer metadata. + for k, vv := range s.trailer { + // Clients don't tolerate reading restricted headers after some non restricted ones were sent. + if isReservedHeader(k) { + continue + } + for _, v := range vv { + t.hEnc.WriteField(hpack.HeaderField{Name: k, Value: encodeMetadataHeader(k, v)}) + } + } + bufLen := t.hBuf.Len() + if err := t.writeHeaders(s, t.hBuf, true); err != nil { + t.Close() + return err + } + if t.stats != nil { + outTrailer := &stats.OutTrailer{ + WireLength: bufLen, + } + t.stats.HandleRPC(s.Context(), outTrailer) + } + t.closeStream(s) + t.writableChan <- 0 + return nil +} + +// Write converts the data into HTTP2 data frame and sends it out. Non-nil error +// is returns if it fails (e.g., framing error, transport error). +func (t *http2Server) Write(s *Stream, hdr []byte, data []byte, opts *Options) (err error) { + // TODO(zhaoq): Support multi-writers for a single stream. + secondStart := http2MaxFrameLen - len(hdr)%http2MaxFrameLen + if len(data) < secondStart { + secondStart = len(data) + } + hdr = append(hdr, data[:secondStart]...) + data = data[secondStart:] + isLastSlice := (len(data) == 0) + var writeHeaderFrame bool + s.mu.Lock() + if s.state == streamDone { + s.mu.Unlock() + return streamErrorf(codes.Unknown, "the stream has been done") + } + if !s.headerOk { + writeHeaderFrame = true + } + s.mu.Unlock() + if writeHeaderFrame { + t.WriteHeader(s, nil) + } + r := bytes.NewBuffer(hdr) + var ( + p []byte + oqv uint32 + ) + for { + if r.Len() == 0 && p == nil { + return nil + } + oqv = atomic.LoadUint32(&t.outQuotaVersion) + size := http2MaxFrameLen + // Wait until the stream has some quota to send the data. + sq, err := wait(s.ctx, nil, nil, t.shutdownChan, s.sendQuotaPool.acquire()) + if err != nil { + return err + } + // Wait until the transport has some quota to send the data. + tq, err := wait(s.ctx, nil, nil, t.shutdownChan, t.sendQuotaPool.acquire()) + if err != nil { + return err + } + if sq < size { + size = sq + } + if tq < size { + size = tq + } + if p == nil { + p = r.Next(size) + } + ps := len(p) + if ps < sq { + // Overbooked stream quota. Return it back. + s.sendQuotaPool.add(sq - ps) + } + if ps < tq { + // Overbooked transport quota. Return it back. + t.sendQuotaPool.add(tq - ps) + } + t.framer.adjustNumWriters(1) + // Got some quota. Try to acquire writing privilege on the + // transport. + if _, err := wait(s.ctx, nil, nil, t.shutdownChan, t.writableChan); err != nil { + if _, ok := err.(StreamError); ok { + // Return the connection quota back. + t.sendQuotaPool.add(ps) + } + if t.framer.adjustNumWriters(-1) == 0 { + // This writer is the last one in this batch and has the + // responsibility to flush the buffered frames. It queues + // a flush request to controlBuf instead of flushing directly + // in order to avoid the race with other writing or flushing. + t.controlBuf.put(&flushIO{}) + } + return err + } + select { + case <-s.ctx.Done(): + t.sendQuotaPool.add(ps) + if t.framer.adjustNumWriters(-1) == 0 { + t.controlBuf.put(&flushIO{}) + } + t.writableChan <- 0 + return ContextErr(s.ctx.Err()) + default: + } + if oqv != atomic.LoadUint32(&t.outQuotaVersion) { + // InitialWindowSize settings frame must have been received after we + // acquired send quota but before we got the writable channel. + // We must forsake this write. + t.sendQuotaPool.add(ps) + s.sendQuotaPool.add(ps) + if t.framer.adjustNumWriters(-1) == 0 { + t.controlBuf.put(&flushIO{}) + } + t.writableChan <- 0 + continue + } + var forceFlush bool + if r.Len() == 0 { + if isLastSlice { + if t.framer.adjustNumWriters(0) == 1 && !opts.Last { + forceFlush = true + } + } else { + r = bytes.NewBuffer(data) + isLastSlice = true + } + } + // Reset ping strikes when sending data since this might cause + // the peer to send ping. + atomic.StoreUint32(&t.resetPingStrikes, 1) + if err := t.framer.writeData(forceFlush, s.id, false, p); err != nil { + t.Close() + return connectionErrorf(true, err, "transport: %v", err) + } + p = nil + if t.framer.adjustNumWriters(-1) == 0 { + t.framer.flushWrite() + } + t.writableChan <- 0 + } + +} + +func (t *http2Server) applySettings(ss []http2.Setting) { + for _, s := range ss { + if s.ID == http2.SettingInitialWindowSize { + t.mu.Lock() + defer t.mu.Unlock() + for _, stream := range t.activeStreams { + stream.sendQuotaPool.add(int(s.Val) - int(t.streamSendQuota)) + } + t.streamSendQuota = s.Val + atomic.AddUint32(&t.outQuotaVersion, 1) + } + + } +} + +// keepalive running in a separate goroutine does the following: +// 1. Gracefully closes an idle connection after a duration of keepalive.MaxConnectionIdle. +// 2. Gracefully closes any connection after a duration of keepalive.MaxConnectionAge. +// 3. Forcibly closes a connection after an additive period of keepalive.MaxConnectionAgeGrace over keepalive.MaxConnectionAge. +// 4. Makes sure a connection is alive by sending pings with a frequency of keepalive.Time and closes a non-responsive connection +// after an additional duration of keepalive.Timeout. +func (t *http2Server) keepalive() { + p := &ping{} + var pingSent bool + maxIdle := time.NewTimer(t.kp.MaxConnectionIdle) + maxAge := time.NewTimer(t.kp.MaxConnectionAge) + keepalive := time.NewTimer(t.kp.Time) + // NOTE: All exit paths of this function should reset their + // respecitve timers. A failure to do so will cause the + // following clean-up to deadlock and eventually leak. + defer func() { + if !maxIdle.Stop() { + <-maxIdle.C + } + if !maxAge.Stop() { + <-maxAge.C + } + if !keepalive.Stop() { + <-keepalive.C + } + }() + for { + select { + case <-maxIdle.C: + t.mu.Lock() + idle := t.idle + if idle.IsZero() { // The connection is non-idle. + t.mu.Unlock() + maxIdle.Reset(t.kp.MaxConnectionIdle) + continue + } + val := t.kp.MaxConnectionIdle - time.Since(idle) + t.mu.Unlock() + if val <= 0 { + // The connection has been idle for a duration of keepalive.MaxConnectionIdle or more. + // Gracefully close the connection. + t.drain(http2.ErrCodeNo, []byte{}) + // Reseting the timer so that the clean-up doesn't deadlock. + maxIdle.Reset(infinity) + return + } + maxIdle.Reset(val) + case <-maxAge.C: + t.drain(http2.ErrCodeNo, []byte{}) + maxAge.Reset(t.kp.MaxConnectionAgeGrace) + select { + case <-maxAge.C: + // Close the connection after grace period. + t.Close() + // Reseting the timer so that the clean-up doesn't deadlock. + maxAge.Reset(infinity) + case <-t.shutdownChan: + } + return + case <-keepalive.C: + if atomic.CompareAndSwapUint32(&t.activity, 1, 0) { + pingSent = false + keepalive.Reset(t.kp.Time) + continue + } + if pingSent { + t.Close() + // Reseting the timer so that the clean-up doesn't deadlock. + keepalive.Reset(infinity) + return + } + pingSent = true + t.controlBuf.put(p) + keepalive.Reset(t.kp.Timeout) + case <-t.shutdownChan: + return + } + } +} + +var goAwayPing = &ping{data: [8]byte{1, 6, 1, 8, 0, 3, 3, 9}} + +// controller running in a separate goroutine takes charge of sending control +// frames (e.g., window update, reset stream, setting, etc.) to the server. +func (t *http2Server) controller() { + for { + select { + case i := <-t.controlBuf.get(): + t.controlBuf.load() + select { + case <-t.writableChan: + switch i := i.(type) { + case *windowUpdate: + t.framer.writeWindowUpdate(i.flush, i.streamID, i.increment) + case *settings: + if i.ack { + t.framer.writeSettingsAck(true) + t.applySettings(i.ss) + } else { + t.framer.writeSettings(true, i.ss...) + } + case *resetStream: + t.framer.writeRSTStream(true, i.streamID, i.code) + case *goAway: + t.mu.Lock() + if t.state == closing { + t.mu.Unlock() + // The transport is closing. + return + } + sid := t.maxStreamID + if !i.headsUp { + // Stop accepting more streams now. + t.state = draining + activeStreams := len(t.activeStreams) + t.mu.Unlock() + t.framer.writeGoAway(true, sid, i.code, i.debugData) + if i.closeConn || activeStreams == 0 { + // Abruptly close the connection following the GoAway. + t.Close() + } + t.writableChan <- 0 + continue + } + t.mu.Unlock() + // For a graceful close, send out a GoAway with stream ID of MaxUInt32, + // Follow that with a ping and wait for the ack to come back or a timer + // to expire. During this time accept new streams since they might have + // originated before the GoAway reaches the client. + // After getting the ack or timer expiration send out another GoAway this + // time with an ID of the max stream server intends to process. + t.framer.writeGoAway(true, math.MaxUint32, http2.ErrCodeNo, []byte{}) + t.framer.writePing(true, false, goAwayPing.data) + go func() { + timer := time.NewTimer(time.Minute) + defer timer.Stop() + select { + case <-t.drainChan: + case <-timer.C: + case <-t.shutdownChan: + return + } + t.controlBuf.put(&goAway{code: i.code, debugData: i.debugData}) + }() + case *flushIO: + t.framer.flushWrite() + case *ping: + if !i.ack { + t.bdpEst.timesnap(i.data) + } + t.framer.writePing(true, i.ack, i.data) + default: + errorf("transport: http2Server.controller got unexpected item type %v\n", i) + } + t.writableChan <- 0 + continue + case <-t.shutdownChan: + return + } + case <-t.shutdownChan: + return + } + } +} + +// Close starts shutting down the http2Server transport. +// TODO(zhaoq): Now the destruction is not blocked on any pending streams. This +// could cause some resource issue. Revisit this later. +func (t *http2Server) Close() (err error) { + t.mu.Lock() + if t.state == closing { + t.mu.Unlock() + return errors.New("transport: Close() was already called") + } + t.state = closing + streams := t.activeStreams + t.activeStreams = nil + t.mu.Unlock() + close(t.shutdownChan) + err = t.conn.Close() + // Cancel all active streams. + for _, s := range streams { + s.cancel() + } + if t.stats != nil { + connEnd := &stats.ConnEnd{} + t.stats.HandleConn(t.ctx, connEnd) + } + return +} + +// closeStream clears the footprint of a stream when the stream is not needed +// any more. +func (t *http2Server) closeStream(s *Stream) { + t.mu.Lock() + delete(t.activeStreams, s.id) + if len(t.activeStreams) == 0 { + t.idle = time.Now() + } + if t.state == draining && len(t.activeStreams) == 0 { + defer t.Close() + } + t.mu.Unlock() + // In case stream sending and receiving are invoked in separate + // goroutines (e.g., bi-directional streaming), cancel needs to be + // called to interrupt the potential blocking on other goroutines. + s.cancel() + s.mu.Lock() + if s.state == streamDone { + s.mu.Unlock() + return + } + s.state = streamDone + s.mu.Unlock() +} + +func (t *http2Server) RemoteAddr() net.Addr { + return t.remoteAddr +} + +func (t *http2Server) Drain() { + t.drain(http2.ErrCodeNo, []byte{}) +} + +func (t *http2Server) drain(code http2.ErrCode, debugData []byte) { + t.mu.Lock() + defer t.mu.Unlock() + if t.drainChan != nil { + return + } + t.drainChan = make(chan struct{}) + t.controlBuf.put(&goAway{code: code, debugData: debugData, headsUp: true}) +} + +var rgen = rand.New(rand.NewSource(time.Now().UnixNano())) + +func getJitter(v time.Duration) time.Duration { + if v == infinity { + return 0 + } + // Generate a jitter between +/- 10% of the value. + r := int64(v / 10) + j := rgen.Int63n(2*r) - r + return time.Duration(j) +} diff --git a/vendor/google.golang.org/grpc/transport/http_util.go b/vendor/google.golang.org/grpc/transport/http_util.go new file mode 100644 index 000000000..f7c052aa9 --- /dev/null +++ b/vendor/google.golang.org/grpc/transport/http_util.go @@ -0,0 +1,618 @@ +/* + * + * Copyright 2014 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package transport + +import ( + "bufio" + "bytes" + "encoding/base64" + "fmt" + "io" + "net" + "net/http" + "strconv" + "strings" + "sync/atomic" + "time" + + "github.com/golang/protobuf/proto" + "golang.org/x/net/http2" + "golang.org/x/net/http2/hpack" + spb "google.golang.org/genproto/googleapis/rpc/status" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +const ( + // http2MaxFrameLen specifies the max length of a HTTP2 frame. + http2MaxFrameLen = 16384 // 16KB frame + // http://http2.github.io/http2-spec/#SettingValues + http2InitHeaderTableSize = 4096 + // http2IOBufSize specifies the buffer size for sending frames. + http2IOBufSize = 32 * 1024 +) + +var ( + clientPreface = []byte(http2.ClientPreface) + http2ErrConvTab = map[http2.ErrCode]codes.Code{ + http2.ErrCodeNo: codes.Internal, + http2.ErrCodeProtocol: codes.Internal, + http2.ErrCodeInternal: codes.Internal, + http2.ErrCodeFlowControl: codes.ResourceExhausted, + http2.ErrCodeSettingsTimeout: codes.Internal, + http2.ErrCodeStreamClosed: codes.Internal, + http2.ErrCodeFrameSize: codes.Internal, + http2.ErrCodeRefusedStream: codes.Unavailable, + http2.ErrCodeCancel: codes.Canceled, + http2.ErrCodeCompression: codes.Internal, + http2.ErrCodeConnect: codes.Internal, + http2.ErrCodeEnhanceYourCalm: codes.ResourceExhausted, + http2.ErrCodeInadequateSecurity: codes.PermissionDenied, + http2.ErrCodeHTTP11Required: codes.FailedPrecondition, + } + statusCodeConvTab = map[codes.Code]http2.ErrCode{ + codes.Internal: http2.ErrCodeInternal, + codes.Canceled: http2.ErrCodeCancel, + codes.Unavailable: http2.ErrCodeRefusedStream, + codes.ResourceExhausted: http2.ErrCodeEnhanceYourCalm, + codes.PermissionDenied: http2.ErrCodeInadequateSecurity, + } + httpStatusConvTab = map[int]codes.Code{ + // 400 Bad Request - INTERNAL. + http.StatusBadRequest: codes.Internal, + // 401 Unauthorized - UNAUTHENTICATED. + http.StatusUnauthorized: codes.Unauthenticated, + // 403 Forbidden - PERMISSION_DENIED. + http.StatusForbidden: codes.PermissionDenied, + // 404 Not Found - UNIMPLEMENTED. + http.StatusNotFound: codes.Unimplemented, + // 429 Too Many Requests - UNAVAILABLE. + http.StatusTooManyRequests: codes.Unavailable, + // 502 Bad Gateway - UNAVAILABLE. + http.StatusBadGateway: codes.Unavailable, + // 503 Service Unavailable - UNAVAILABLE. + http.StatusServiceUnavailable: codes.Unavailable, + // 504 Gateway timeout - UNAVAILABLE. + http.StatusGatewayTimeout: codes.Unavailable, + } +) + +// Records the states during HPACK decoding. Must be reset once the +// decoding of the entire headers are finished. +type decodeState struct { + encoding string + // statusGen caches the stream status received from the trailer the server + // sent. Client side only. Do not access directly. After all trailers are + // parsed, use the status method to retrieve the status. + statusGen *status.Status + // rawStatusCode and rawStatusMsg are set from the raw trailer fields and are not + // intended for direct access outside of parsing. + rawStatusCode *int + rawStatusMsg string + httpStatus *int + // Server side only fields. + timeoutSet bool + timeout time.Duration + method string + // key-value metadata map from the peer. + mdata map[string][]string + statsTags []byte + statsTrace []byte +} + +// isReservedHeader checks whether hdr belongs to HTTP2 headers +// reserved by gRPC protocol. Any other headers are classified as the +// user-specified metadata. +func isReservedHeader(hdr string) bool { + if hdr != "" && hdr[0] == ':' { + return true + } + switch hdr { + case "content-type", + "grpc-message-type", + "grpc-encoding", + "grpc-message", + "grpc-status", + "grpc-timeout", + "grpc-status-details-bin", + "te": + return true + default: + return false + } +} + +// isWhitelistedPseudoHeader checks whether hdr belongs to HTTP2 pseudoheaders +// that should be propagated into metadata visible to users. +func isWhitelistedPseudoHeader(hdr string) bool { + switch hdr { + case ":authority": + return true + default: + return false + } +} + +func validContentType(t string) bool { + e := "application/grpc" + if !strings.HasPrefix(t, e) { + return false + } + // Support variations on the content-type + // (e.g. "application/grpc+blah", "application/grpc;blah"). + if len(t) > len(e) && t[len(e)] != '+' && t[len(e)] != ';' { + return false + } + return true +} + +func (d *decodeState) status() *status.Status { + if d.statusGen == nil { + // No status-details were provided; generate status using code/msg. + d.statusGen = status.New(codes.Code(int32(*(d.rawStatusCode))), d.rawStatusMsg) + } + return d.statusGen +} + +const binHdrSuffix = "-bin" + +func encodeBinHeader(v []byte) string { + return base64.RawStdEncoding.EncodeToString(v) +} + +func decodeBinHeader(v string) ([]byte, error) { + if len(v)%4 == 0 { + // Input was padded, or padding was not necessary. + return base64.StdEncoding.DecodeString(v) + } + return base64.RawStdEncoding.DecodeString(v) +} + +func encodeMetadataHeader(k, v string) string { + if strings.HasSuffix(k, binHdrSuffix) { + return encodeBinHeader(([]byte)(v)) + } + return v +} + +func decodeMetadataHeader(k, v string) (string, error) { + if strings.HasSuffix(k, binHdrSuffix) { + b, err := decodeBinHeader(v) + return string(b), err + } + return v, nil +} + +func (d *decodeState) decodeResponseHeader(frame *http2.MetaHeadersFrame) error { + for _, hf := range frame.Fields { + if err := d.processHeaderField(hf); err != nil { + return err + } + } + + // If grpc status exists, no need to check further. + if d.rawStatusCode != nil || d.statusGen != nil { + return nil + } + + // If grpc status doesn't exist and http status doesn't exist, + // then it's a malformed header. + if d.httpStatus == nil { + return streamErrorf(codes.Internal, "malformed header: doesn't contain status(gRPC or HTTP)") + } + + if *(d.httpStatus) != http.StatusOK { + code, ok := httpStatusConvTab[*(d.httpStatus)] + if !ok { + code = codes.Unknown + } + return streamErrorf(code, http.StatusText(*(d.httpStatus))) + } + + // gRPC status doesn't exist and http status is OK. + // Set rawStatusCode to be unknown and return nil error. + // So that, if the stream has ended this Unknown status + // will be propogated to the user. + // Otherwise, it will be ignored. In which case, status from + // a later trailer, that has StreamEnded flag set, is propogated. + code := int(codes.Unknown) + d.rawStatusCode = &code + return nil + +} + +func (d *decodeState) addMetadata(k, v string) { + if d.mdata == nil { + d.mdata = make(map[string][]string) + } + d.mdata[k] = append(d.mdata[k], v) +} + +func (d *decodeState) processHeaderField(f hpack.HeaderField) error { + switch f.Name { + case "content-type": + if !validContentType(f.Value) { + return streamErrorf(codes.FailedPrecondition, "transport: received the unexpected content-type %q", f.Value) + } + case "grpc-encoding": + d.encoding = f.Value + case "grpc-status": + code, err := strconv.Atoi(f.Value) + if err != nil { + return streamErrorf(codes.Internal, "transport: malformed grpc-status: %v", err) + } + d.rawStatusCode = &code + case "grpc-message": + d.rawStatusMsg = decodeGrpcMessage(f.Value) + case "grpc-status-details-bin": + v, err := decodeBinHeader(f.Value) + if err != nil { + return streamErrorf(codes.Internal, "transport: malformed grpc-status-details-bin: %v", err) + } + s := &spb.Status{} + if err := proto.Unmarshal(v, s); err != nil { + return streamErrorf(codes.Internal, "transport: malformed grpc-status-details-bin: %v", err) + } + d.statusGen = status.FromProto(s) + case "grpc-timeout": + d.timeoutSet = true + var err error + if d.timeout, err = decodeTimeout(f.Value); err != nil { + return streamErrorf(codes.Internal, "transport: malformed time-out: %v", err) + } + case ":path": + d.method = f.Value + case ":status": + code, err := strconv.Atoi(f.Value) + if err != nil { + return streamErrorf(codes.Internal, "transport: malformed http-status: %v", err) + } + d.httpStatus = &code + case "grpc-tags-bin": + v, err := decodeBinHeader(f.Value) + if err != nil { + return streamErrorf(codes.Internal, "transport: malformed grpc-tags-bin: %v", err) + } + d.statsTags = v + d.addMetadata(f.Name, string(v)) + case "grpc-trace-bin": + v, err := decodeBinHeader(f.Value) + if err != nil { + return streamErrorf(codes.Internal, "transport: malformed grpc-trace-bin: %v", err) + } + d.statsTrace = v + d.addMetadata(f.Name, string(v)) + default: + if isReservedHeader(f.Name) && !isWhitelistedPseudoHeader(f.Name) { + break + } + v, err := decodeMetadataHeader(f.Name, f.Value) + if err != nil { + errorf("Failed to decode metadata header (%q, %q): %v", f.Name, f.Value, err) + return nil + } + d.addMetadata(f.Name, string(v)) + } + return nil +} + +type timeoutUnit uint8 + +const ( + hour timeoutUnit = 'H' + minute timeoutUnit = 'M' + second timeoutUnit = 'S' + millisecond timeoutUnit = 'm' + microsecond timeoutUnit = 'u' + nanosecond timeoutUnit = 'n' +) + +func timeoutUnitToDuration(u timeoutUnit) (d time.Duration, ok bool) { + switch u { + case hour: + return time.Hour, true + case minute: + return time.Minute, true + case second: + return time.Second, true + case millisecond: + return time.Millisecond, true + case microsecond: + return time.Microsecond, true + case nanosecond: + return time.Nanosecond, true + default: + } + return +} + +const maxTimeoutValue int64 = 100000000 - 1 + +// div does integer division and round-up the result. Note that this is +// equivalent to (d+r-1)/r but has less chance to overflow. +func div(d, r time.Duration) int64 { + if m := d % r; m > 0 { + return int64(d/r + 1) + } + return int64(d / r) +} + +// TODO(zhaoq): It is the simplistic and not bandwidth efficient. Improve it. +func encodeTimeout(t time.Duration) string { + if t <= 0 { + return "0n" + } + if d := div(t, time.Nanosecond); d <= maxTimeoutValue { + return strconv.FormatInt(d, 10) + "n" + } + if d := div(t, time.Microsecond); d <= maxTimeoutValue { + return strconv.FormatInt(d, 10) + "u" + } + if d := div(t, time.Millisecond); d <= maxTimeoutValue { + return strconv.FormatInt(d, 10) + "m" + } + if d := div(t, time.Second); d <= maxTimeoutValue { + return strconv.FormatInt(d, 10) + "S" + } + if d := div(t, time.Minute); d <= maxTimeoutValue { + return strconv.FormatInt(d, 10) + "M" + } + // Note that maxTimeoutValue * time.Hour > MaxInt64. + return strconv.FormatInt(div(t, time.Hour), 10) + "H" +} + +func decodeTimeout(s string) (time.Duration, error) { + size := len(s) + if size < 2 { + return 0, fmt.Errorf("transport: timeout string is too short: %q", s) + } + unit := timeoutUnit(s[size-1]) + d, ok := timeoutUnitToDuration(unit) + if !ok { + return 0, fmt.Errorf("transport: timeout unit is not recognized: %q", s) + } + t, err := strconv.ParseInt(s[:size-1], 10, 64) + if err != nil { + return 0, err + } + return d * time.Duration(t), nil +} + +const ( + spaceByte = ' ' + tildaByte = '~' + percentByte = '%' +) + +// encodeGrpcMessage is used to encode status code in header field +// "grpc-message". +// It checks to see if each individual byte in msg is an +// allowable byte, and then either percent encoding or passing it through. +// When percent encoding, the byte is converted into hexadecimal notation +// with a '%' prepended. +func encodeGrpcMessage(msg string) string { + if msg == "" { + return "" + } + lenMsg := len(msg) + for i := 0; i < lenMsg; i++ { + c := msg[i] + if !(c >= spaceByte && c < tildaByte && c != percentByte) { + return encodeGrpcMessageUnchecked(msg) + } + } + return msg +} + +func encodeGrpcMessageUnchecked(msg string) string { + var buf bytes.Buffer + lenMsg := len(msg) + for i := 0; i < lenMsg; i++ { + c := msg[i] + if c >= spaceByte && c < tildaByte && c != percentByte { + buf.WriteByte(c) + } else { + buf.WriteString(fmt.Sprintf("%%%02X", c)) + } + } + return buf.String() +} + +// decodeGrpcMessage decodes the msg encoded by encodeGrpcMessage. +func decodeGrpcMessage(msg string) string { + if msg == "" { + return "" + } + lenMsg := len(msg) + for i := 0; i < lenMsg; i++ { + if msg[i] == percentByte && i+2 < lenMsg { + return decodeGrpcMessageUnchecked(msg) + } + } + return msg +} + +func decodeGrpcMessageUnchecked(msg string) string { + var buf bytes.Buffer + lenMsg := len(msg) + for i := 0; i < lenMsg; i++ { + c := msg[i] + if c == percentByte && i+2 < lenMsg { + parsed, err := strconv.ParseUint(msg[i+1:i+3], 16, 8) + if err != nil { + buf.WriteByte(c) + } else { + buf.WriteByte(byte(parsed)) + i += 2 + } + } else { + buf.WriteByte(c) + } + } + return buf.String() +} + +type framer struct { + numWriters int32 + reader io.Reader + writer *bufio.Writer + fr *http2.Framer +} + +func newFramer(conn net.Conn) *framer { + f := &framer{ + reader: bufio.NewReaderSize(conn, http2IOBufSize), + writer: bufio.NewWriterSize(conn, http2IOBufSize), + } + f.fr = http2.NewFramer(f.writer, f.reader) + // Opt-in to Frame reuse API on framer to reduce garbage. + // Frames aren't safe to read from after a subsequent call to ReadFrame. + f.fr.SetReuseFrames() + f.fr.ReadMetaHeaders = hpack.NewDecoder(http2InitHeaderTableSize, nil) + return f +} + +func (f *framer) adjustNumWriters(i int32) int32 { + return atomic.AddInt32(&f.numWriters, i) +} + +// The following writeXXX functions can only be called when the caller gets +// unblocked from writableChan channel (i.e., owns the privilege to write). + +func (f *framer) writeContinuation(forceFlush bool, streamID uint32, endHeaders bool, headerBlockFragment []byte) error { + if err := f.fr.WriteContinuation(streamID, endHeaders, headerBlockFragment); err != nil { + return err + } + if forceFlush { + return f.writer.Flush() + } + return nil +} + +func (f *framer) writeData(forceFlush bool, streamID uint32, endStream bool, data []byte) error { + if err := f.fr.WriteData(streamID, endStream, data); err != nil { + return err + } + if forceFlush { + return f.writer.Flush() + } + return nil +} + +func (f *framer) writeGoAway(forceFlush bool, maxStreamID uint32, code http2.ErrCode, debugData []byte) error { + if err := f.fr.WriteGoAway(maxStreamID, code, debugData); err != nil { + return err + } + if forceFlush { + return f.writer.Flush() + } + return nil +} + +func (f *framer) writeHeaders(forceFlush bool, p http2.HeadersFrameParam) error { + if err := f.fr.WriteHeaders(p); err != nil { + return err + } + if forceFlush { + return f.writer.Flush() + } + return nil +} + +func (f *framer) writePing(forceFlush, ack bool, data [8]byte) error { + if err := f.fr.WritePing(ack, data); err != nil { + return err + } + if forceFlush { + return f.writer.Flush() + } + return nil +} + +func (f *framer) writePriority(forceFlush bool, streamID uint32, p http2.PriorityParam) error { + if err := f.fr.WritePriority(streamID, p); err != nil { + return err + } + if forceFlush { + return f.writer.Flush() + } + return nil +} + +func (f *framer) writePushPromise(forceFlush bool, p http2.PushPromiseParam) error { + if err := f.fr.WritePushPromise(p); err != nil { + return err + } + if forceFlush { + return f.writer.Flush() + } + return nil +} + +func (f *framer) writeRSTStream(forceFlush bool, streamID uint32, code http2.ErrCode) error { + if err := f.fr.WriteRSTStream(streamID, code); err != nil { + return err + } + if forceFlush { + return f.writer.Flush() + } + return nil +} + +func (f *framer) writeSettings(forceFlush bool, settings ...http2.Setting) error { + if err := f.fr.WriteSettings(settings...); err != nil { + return err + } + if forceFlush { + return f.writer.Flush() + } + return nil +} + +func (f *framer) writeSettingsAck(forceFlush bool) error { + if err := f.fr.WriteSettingsAck(); err != nil { + return err + } + if forceFlush { + return f.writer.Flush() + } + return nil +} + +func (f *framer) writeWindowUpdate(forceFlush bool, streamID, incr uint32) error { + if err := f.fr.WriteWindowUpdate(streamID, incr); err != nil { + return err + } + if forceFlush { + return f.writer.Flush() + } + return nil +} + +func (f *framer) flushWrite() error { + return f.writer.Flush() +} + +func (f *framer) readFrame() (http2.Frame, error) { + return f.fr.ReadFrame() +} + +func (f *framer) errorDetail() error { + return f.fr.ErrorDetail() +} diff --git a/vendor/google.golang.org/grpc/transport/http_util_test.go b/vendor/google.golang.org/grpc/transport/http_util_test.go new file mode 100644 index 000000000..4ebb23905 --- /dev/null +++ b/vendor/google.golang.org/grpc/transport/http_util_test.go @@ -0,0 +1,175 @@ +/* + * + * Copyright 2014 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package transport + +import ( + "fmt" + "reflect" + "testing" + "time" +) + +func TestTimeoutEncode(t *testing.T) { + for _, test := range []struct { + in string + out string + }{ + {"12345678ns", "12345678n"}, + {"123456789ns", "123457u"}, + {"12345678us", "12345678u"}, + {"123456789us", "123457m"}, + {"12345678ms", "12345678m"}, + {"123456789ms", "123457S"}, + {"12345678s", "12345678S"}, + {"123456789s", "2057614M"}, + {"12345678m", "12345678M"}, + {"123456789m", "2057614H"}, + } { + d, err := time.ParseDuration(test.in) + if err != nil { + t.Fatalf("failed to parse duration string %s: %v", test.in, err) + } + out := encodeTimeout(d) + if out != test.out { + t.Fatalf("timeoutEncode(%s) = %s, want %s", test.in, out, test.out) + } + } +} + +func TestTimeoutDecode(t *testing.T) { + for _, test := range []struct { + // input + s string + // output + d time.Duration + err error + }{ + {"1234S", time.Second * 1234, nil}, + {"1234x", 0, fmt.Errorf("transport: timeout unit is not recognized: %q", "1234x")}, + {"1", 0, fmt.Errorf("transport: timeout string is too short: %q", "1")}, + {"", 0, fmt.Errorf("transport: timeout string is too short: %q", "")}, + } { + d, err := decodeTimeout(test.s) + if d != test.d || fmt.Sprint(err) != fmt.Sprint(test.err) { + t.Fatalf("timeoutDecode(%q) = %d, %v, want %d, %v", test.s, int64(d), err, int64(test.d), test.err) + } + } +} + +func TestValidContentType(t *testing.T) { + tests := []struct { + h string + want bool + }{ + {"application/grpc", true}, + {"application/grpc+", true}, + {"application/grpc+blah", true}, + {"application/grpc;", true}, + {"application/grpc;blah", true}, + {"application/grpcd", false}, + {"application/grpd", false}, + {"application/grp", false}, + } + for _, tt := range tests { + got := validContentType(tt.h) + if got != tt.want { + t.Errorf("validContentType(%q) = %v; want %v", tt.h, got, tt.want) + } + } +} + +func TestEncodeGrpcMessage(t *testing.T) { + for _, tt := range []struct { + input string + expected string + }{ + {"", ""}, + {"Hello", "Hello"}, + {"my favorite character is \u0000", "my favorite character is %00"}, + {"my favorite character is %", "my favorite character is %25"}, + } { + actual := encodeGrpcMessage(tt.input) + if tt.expected != actual { + t.Errorf("encodeGrpcMessage(%v) = %v, want %v", tt.input, actual, tt.expected) + } + } +} + +func TestDecodeGrpcMessage(t *testing.T) { + for _, tt := range []struct { + input string + expected string + }{ + {"", ""}, + {"Hello", "Hello"}, + {"H%61o", "Hao"}, + {"H%6", "H%6"}, + {"%G0", "%G0"}, + {"%E7%B3%BB%E7%BB%9F", "系统"}, + } { + actual := decodeGrpcMessage(tt.input) + if tt.expected != actual { + t.Errorf("dncodeGrpcMessage(%v) = %v, want %v", tt.input, actual, tt.expected) + } + } +} + +const binaryValue = string(128) + +func TestEncodeMetadataHeader(t *testing.T) { + for _, test := range []struct { + // input + kin string + vin string + // output + vout string + }{ + {"key", "abc", "abc"}, + {"KEY", "abc", "abc"}, + {"key-bin", "abc", "YWJj"}, + {"key-bin", binaryValue, "woA"}, + } { + v := encodeMetadataHeader(test.kin, test.vin) + if !reflect.DeepEqual(v, test.vout) { + t.Fatalf("encodeMetadataHeader(%q, %q) = %q, want %q", test.kin, test.vin, v, test.vout) + } + } +} + +func TestDecodeMetadataHeader(t *testing.T) { + for _, test := range []struct { + // input + kin string + vin string + // output + vout string + err error + }{ + {"a", "abc", "abc", nil}, + {"key-bin", "Zm9vAGJhcg==", "foo\x00bar", nil}, + {"key-bin", "Zm9vAGJhcg", "foo\x00bar", nil}, + {"key-bin", "woA=", binaryValue, nil}, + {"a", "abc,efg", "abc,efg", nil}, + } { + v, err := decodeMetadataHeader(test.kin, test.vin) + if !reflect.DeepEqual(v, test.vout) || !reflect.DeepEqual(err, test.err) { + t.Fatalf("decodeMetadataHeader(%q, %q) = %q, %v, want %q, %v", test.kin, test.vin, v, err, test.vout, test.err) + } + } +} diff --git a/vendor/google.golang.org/grpc/transport/log.go b/vendor/google.golang.org/grpc/transport/log.go new file mode 100644 index 000000000..ac8e358c5 --- /dev/null +++ b/vendor/google.golang.org/grpc/transport/log.go @@ -0,0 +1,50 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// This file contains wrappers for grpclog functions. +// The transport package only logs to verbose level 2 by default. + +package transport + +import "google.golang.org/grpc/grpclog" + +const logLevel = 2 + +func infof(format string, args ...interface{}) { + if grpclog.V(logLevel) { + grpclog.Infof(format, args...) + } +} + +func warningf(format string, args ...interface{}) { + if grpclog.V(logLevel) { + grpclog.Warningf(format, args...) + } +} + +func errorf(format string, args ...interface{}) { + if grpclog.V(logLevel) { + grpclog.Errorf(format, args...) + } +} + +func fatalf(format string, args ...interface{}) { + if grpclog.V(logLevel) { + grpclog.Fatalf(format, args...) + } +} diff --git a/vendor/google.golang.org/grpc/transport/transport.go b/vendor/google.golang.org/grpc/transport/transport.go new file mode 100644 index 000000000..c5732beec --- /dev/null +++ b/vendor/google.golang.org/grpc/transport/transport.go @@ -0,0 +1,730 @@ +/* + * + * Copyright 2014 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Package transport defines and implements message oriented communication +// channel to complete various transactions (e.g., an RPC). +package transport // import "google.golang.org/grpc/transport" + +import ( + "fmt" + "io" + "net" + "sync" + + "golang.org/x/net/context" + "golang.org/x/net/http2" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/credentials" + "google.golang.org/grpc/keepalive" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/stats" + "google.golang.org/grpc/status" + "google.golang.org/grpc/tap" +) + +// recvMsg represents the received msg from the transport. All transport +// protocol specific info has been removed. +type recvMsg struct { + data []byte + // nil: received some data + // io.EOF: stream is completed. data is nil. + // other non-nil error: transport failure. data is nil. + err error +} + +// recvBuffer is an unbounded channel of recvMsg structs. +// Note recvBuffer differs from controlBuffer only in that recvBuffer +// holds a channel of only recvMsg structs instead of objects implementing "item" interface. +// recvBuffer is written to much more often than +// controlBuffer and using strict recvMsg structs helps avoid allocation in "recvBuffer.put" +type recvBuffer struct { + c chan recvMsg + mu sync.Mutex + backlog []recvMsg +} + +func newRecvBuffer() *recvBuffer { + b := &recvBuffer{ + c: make(chan recvMsg, 1), + } + return b +} + +func (b *recvBuffer) put(r recvMsg) { + b.mu.Lock() + defer b.mu.Unlock() + if len(b.backlog) == 0 { + select { + case b.c <- r: + return + default: + } + } + b.backlog = append(b.backlog, r) +} + +func (b *recvBuffer) load() { + b.mu.Lock() + defer b.mu.Unlock() + if len(b.backlog) > 0 { + select { + case b.c <- b.backlog[0]: + b.backlog[0] = recvMsg{} + b.backlog = b.backlog[1:] + default: + } + } +} + +// get returns the channel that receives a recvMsg in the buffer. +// +// Upon receipt of a recvMsg, the caller should call load to send another +// recvMsg onto the channel if there is any. +func (b *recvBuffer) get() <-chan recvMsg { + return b.c +} + +// recvBufferReader implements io.Reader interface to read the data from +// recvBuffer. +type recvBufferReader struct { + ctx context.Context + goAway chan struct{} + recv *recvBuffer + last []byte // Stores the remaining data in the previous calls. + err error +} + +// Read reads the next len(p) bytes from last. If last is drained, it tries to +// read additional data from recv. It blocks if there no additional data available +// in recv. If Read returns any non-nil error, it will continue to return that error. +func (r *recvBufferReader) Read(p []byte) (n int, err error) { + if r.err != nil { + return 0, r.err + } + n, r.err = r.read(p) + return n, r.err +} + +func (r *recvBufferReader) read(p []byte) (n int, err error) { + if r.last != nil && len(r.last) > 0 { + // Read remaining data left in last call. + copied := copy(p, r.last) + r.last = r.last[copied:] + return copied, nil + } + select { + case <-r.ctx.Done(): + return 0, ContextErr(r.ctx.Err()) + case <-r.goAway: + return 0, ErrStreamDrain + case m := <-r.recv.get(): + r.recv.load() + if m.err != nil { + return 0, m.err + } + copied := copy(p, m.data) + r.last = m.data[copied:] + return copied, nil + } +} + +// All items in an out of a controlBuffer should be the same type. +type item interface { + item() +} + +// controlBuffer is an unbounded channel of item. +type controlBuffer struct { + c chan item + mu sync.Mutex + backlog []item +} + +func newControlBuffer() *controlBuffer { + b := &controlBuffer{ + c: make(chan item, 1), + } + return b +} + +func (b *controlBuffer) put(r item) { + b.mu.Lock() + defer b.mu.Unlock() + if len(b.backlog) == 0 { + select { + case b.c <- r: + return + default: + } + } + b.backlog = append(b.backlog, r) +} + +func (b *controlBuffer) load() { + b.mu.Lock() + defer b.mu.Unlock() + if len(b.backlog) > 0 { + select { + case b.c <- b.backlog[0]: + b.backlog[0] = nil + b.backlog = b.backlog[1:] + default: + } + } +} + +// get returns the channel that receives an item in the buffer. +// +// Upon receipt of an item, the caller should call load to send another +// item onto the channel if there is any. +func (b *controlBuffer) get() <-chan item { + return b.c +} + +type streamState uint8 + +const ( + streamActive streamState = iota + streamWriteDone // EndStream sent + streamReadDone // EndStream received + streamDone // the entire stream is finished. +) + +// Stream represents an RPC in the transport layer. +type Stream struct { + id uint32 + // nil for client side Stream. + st ServerTransport + // ctx is the associated context of the stream. + ctx context.Context + // cancel is always nil for client side Stream. + cancel context.CancelFunc + // done is closed when the final status arrives. + done chan struct{} + // goAway is closed when the server sent GoAways signal before this stream was initiated. + goAway chan struct{} + // method records the associated RPC method of the stream. + method string + recvCompress string + sendCompress string + buf *recvBuffer + trReader io.Reader + fc *inFlow + recvQuota uint32 + + // TODO: Remote this unused variable. + // The accumulated inbound quota pending for window update. + updateQuota uint32 + + // Callback to state application's intentions to read data. This + // is used to adjust flow control, if need be. + requestRead func(int) + + sendQuotaPool *quotaPool + // Close headerChan to indicate the end of reception of header metadata. + headerChan chan struct{} + // header caches the received header metadata. + header metadata.MD + // The key-value map of trailer metadata. + trailer metadata.MD + + mu sync.RWMutex // guard the following + // headerOK becomes true from the first header is about to send. + headerOk bool + state streamState + // true iff headerChan is closed. Used to avoid closing headerChan + // multiple times. + headerDone bool + // the status error received from the server. + status *status.Status + // rstStream indicates whether a RST_STREAM frame needs to be sent + // to the server to signify that this stream is closing. + rstStream bool + // rstError is the error that needs to be sent along with the RST_STREAM frame. + rstError http2.ErrCode + // bytesSent and bytesReceived indicates whether any bytes have been sent or + // received on this stream. + bytesSent bool + bytesReceived bool +} + +// RecvCompress returns the compression algorithm applied to the inbound +// message. It is empty string if there is no compression applied. +func (s *Stream) RecvCompress() string { + return s.recvCompress +} + +// SetSendCompress sets the compression algorithm to the stream. +func (s *Stream) SetSendCompress(str string) { + s.sendCompress = str +} + +// Done returns a chanel which is closed when it receives the final status +// from the server. +func (s *Stream) Done() <-chan struct{} { + return s.done +} + +// GoAway returns a channel which is closed when the server sent GoAways signal +// before this stream was initiated. +func (s *Stream) GoAway() <-chan struct{} { + return s.goAway +} + +// Header acquires the key-value pairs of header metadata once it +// is available. It blocks until i) the metadata is ready or ii) there is no +// header metadata or iii) the stream is canceled/expired. +func (s *Stream) Header() (metadata.MD, error) { + var err error + select { + case <-s.ctx.Done(): + err = ContextErr(s.ctx.Err()) + case <-s.goAway: + err = ErrStreamDrain + case <-s.headerChan: + return s.header.Copy(), nil + } + // Even if the stream is closed, header is returned if available. + select { + case <-s.headerChan: + return s.header.Copy(), nil + default: + } + return nil, err +} + +// Trailer returns the cached trailer metedata. Note that if it is not called +// after the entire stream is done, it could return an empty MD. Client +// side only. +func (s *Stream) Trailer() metadata.MD { + s.mu.RLock() + defer s.mu.RUnlock() + return s.trailer.Copy() +} + +// ServerTransport returns the underlying ServerTransport for the stream. +// The client side stream always returns nil. +func (s *Stream) ServerTransport() ServerTransport { + return s.st +} + +// Context returns the context of the stream. +func (s *Stream) Context() context.Context { + return s.ctx +} + +// Method returns the method for the stream. +func (s *Stream) Method() string { + return s.method +} + +// Status returns the status received from the server. +func (s *Stream) Status() *status.Status { + return s.status +} + +// SetHeader sets the header metadata. This can be called multiple times. +// Server side only. +func (s *Stream) SetHeader(md metadata.MD) error { + s.mu.Lock() + defer s.mu.Unlock() + if s.headerOk || s.state == streamDone { + return ErrIllegalHeaderWrite + } + if md.Len() == 0 { + return nil + } + s.header = metadata.Join(s.header, md) + return nil +} + +// SetTrailer sets the trailer metadata which will be sent with the RPC status +// by the server. This can be called multiple times. Server side only. +func (s *Stream) SetTrailer(md metadata.MD) error { + if md.Len() == 0 { + return nil + } + s.mu.Lock() + defer s.mu.Unlock() + s.trailer = metadata.Join(s.trailer, md) + return nil +} + +func (s *Stream) write(m recvMsg) { + s.buf.put(m) +} + +// Read reads all p bytes from the wire for this stream. +func (s *Stream) Read(p []byte) (n int, err error) { + // Don't request a read if there was an error earlier + if er := s.trReader.(*transportReader).er; er != nil { + return 0, er + } + s.requestRead(len(p)) + return io.ReadFull(s.trReader, p) +} + +// tranportReader reads all the data available for this Stream from the transport and +// passes them into the decoder, which converts them into a gRPC message stream. +// The error is io.EOF when the stream is done or another non-nil error if +// the stream broke. +type transportReader struct { + reader io.Reader + // The handler to control the window update procedure for both this + // particular stream and the associated transport. + windowHandler func(int) + er error +} + +func (t *transportReader) Read(p []byte) (n int, err error) { + n, err = t.reader.Read(p) + if err != nil { + t.er = err + return + } + t.windowHandler(n) + return +} + +// finish sets the stream's state and status, and closes the done channel. +// s.mu must be held by the caller. st must always be non-nil. +func (s *Stream) finish(st *status.Status) { + s.status = st + s.state = streamDone + close(s.done) +} + +// BytesSent indicates whether any bytes have been sent on this stream. +func (s *Stream) BytesSent() bool { + s.mu.Lock() + defer s.mu.Unlock() + return s.bytesSent +} + +// BytesReceived indicates whether any bytes have been received on this stream. +func (s *Stream) BytesReceived() bool { + s.mu.Lock() + defer s.mu.Unlock() + return s.bytesReceived +} + +// GoString is implemented by Stream so context.String() won't +// race when printing %#v. +func (s *Stream) GoString() string { + return fmt.Sprintf("<stream: %p, %v>", s, s.method) +} + +// The key to save transport.Stream in the context. +type streamKey struct{} + +// newContextWithStream creates a new context from ctx and attaches stream +// to it. +func newContextWithStream(ctx context.Context, stream *Stream) context.Context { + return context.WithValue(ctx, streamKey{}, stream) +} + +// StreamFromContext returns the stream saved in ctx. +func StreamFromContext(ctx context.Context) (s *Stream, ok bool) { + s, ok = ctx.Value(streamKey{}).(*Stream) + return +} + +// state of transport +type transportState int + +const ( + reachable transportState = iota + unreachable + closing + draining +) + +// ServerConfig consists of all the configurations to establish a server transport. +type ServerConfig struct { + MaxStreams uint32 + AuthInfo credentials.AuthInfo + InTapHandle tap.ServerInHandle + StatsHandler stats.Handler + KeepaliveParams keepalive.ServerParameters + KeepalivePolicy keepalive.EnforcementPolicy + InitialWindowSize int32 + InitialConnWindowSize int32 +} + +// NewServerTransport creates a ServerTransport with conn or non-nil error +// if it fails. +func NewServerTransport(protocol string, conn net.Conn, config *ServerConfig) (ServerTransport, error) { + return newHTTP2Server(conn, config) +} + +// ConnectOptions covers all relevant options for communicating with the server. +type ConnectOptions struct { + // UserAgent is the application user agent. + UserAgent string + // Authority is the :authority pseudo-header to use. This field has no effect if + // TransportCredentials is set. + Authority string + // Dialer specifies how to dial a network address. + Dialer func(context.Context, string) (net.Conn, error) + // FailOnNonTempDialError specifies if gRPC fails on non-temporary dial errors. + FailOnNonTempDialError bool + // PerRPCCredentials stores the PerRPCCredentials required to issue RPCs. + PerRPCCredentials []credentials.PerRPCCredentials + // TransportCredentials stores the Authenticator required to setup a client connection. + TransportCredentials credentials.TransportCredentials + // KeepaliveParams stores the keepalive parameters. + KeepaliveParams keepalive.ClientParameters + // StatsHandler stores the handler for stats. + StatsHandler stats.Handler + // InitialWindowSize sets the intial window size for a stream. + InitialWindowSize int32 + // InitialConnWindowSize sets the intial window size for a connection. + InitialConnWindowSize int32 +} + +// TargetInfo contains the information of the target such as network address and metadata. +type TargetInfo struct { + Addr string + Metadata interface{} +} + +// NewClientTransport establishes the transport with the required ConnectOptions +// and returns it to the caller. +func NewClientTransport(ctx context.Context, target TargetInfo, opts ConnectOptions) (ClientTransport, error) { + return newHTTP2Client(ctx, target, opts) +} + +// Options provides additional hints and information for message +// transmission. +type Options struct { + // Last indicates whether this write is the last piece for + // this stream. + Last bool + + // Delay is a hint to the transport implementation for whether + // the data could be buffered for a batching write. The + // Transport implementation may ignore the hint. + Delay bool +} + +// CallHdr carries the information of a particular RPC. +type CallHdr struct { + // Host specifies the peer's host. + Host string + + // Method specifies the operation to perform. + Method string + + // RecvCompress specifies the compression algorithm applied on + // inbound messages. + RecvCompress string + + // SendCompress specifies the compression algorithm applied on + // outbound message. + SendCompress string + + // Creds specifies credentials.PerRPCCredentials for a call. + Creds credentials.PerRPCCredentials + + // Flush indicates whether a new stream command should be sent + // to the peer without waiting for the first data. This is + // only a hint. + // If it's true, the transport may modify the flush decision + // for performance purposes. + // If it's false, new stream will never be flushed. + Flush bool +} + +// ClientTransport is the common interface for all gRPC client-side transport +// implementations. +type ClientTransport interface { + // Close tears down this transport. Once it returns, the transport + // should not be accessed any more. The caller must make sure this + // is called only once. + Close() error + + // GracefulClose starts to tear down the transport. It stops accepting + // new RPCs and wait the completion of the pending RPCs. + GracefulClose() error + + // Write sends the data for the given stream. A nil stream indicates + // the write is to be performed on the transport as a whole. + Write(s *Stream, hdr []byte, data []byte, opts *Options) error + + // NewStream creates a Stream for an RPC. + NewStream(ctx context.Context, callHdr *CallHdr) (*Stream, error) + + // CloseStream clears the footprint of a stream when the stream is + // not needed any more. The err indicates the error incurred when + // CloseStream is called. Must be called when a stream is finished + // unless the associated transport is closing. + CloseStream(stream *Stream, err error) + + // Error returns a channel that is closed when some I/O error + // happens. Typically the caller should have a goroutine to monitor + // this in order to take action (e.g., close the current transport + // and create a new one) in error case. It should not return nil + // once the transport is initiated. + Error() <-chan struct{} + + // GoAway returns a channel that is closed when ClientTransport + // receives the draining signal from the server (e.g., GOAWAY frame in + // HTTP/2). + GoAway() <-chan struct{} + + // GetGoAwayReason returns the reason why GoAway frame was received. + GetGoAwayReason() GoAwayReason +} + +// ServerTransport is the common interface for all gRPC server-side transport +// implementations. +// +// Methods may be called concurrently from multiple goroutines, but +// Write methods for a given Stream will be called serially. +type ServerTransport interface { + // HandleStreams receives incoming streams using the given handler. + HandleStreams(func(*Stream), func(context.Context, string) context.Context) + + // WriteHeader sends the header metadata for the given stream. + // WriteHeader may not be called on all streams. + WriteHeader(s *Stream, md metadata.MD) error + + // Write sends the data for the given stream. + // Write may not be called on all streams. + Write(s *Stream, hdr []byte, data []byte, opts *Options) error + + // WriteStatus sends the status of a stream to the client. WriteStatus is + // the final call made on a stream and always occurs. + WriteStatus(s *Stream, st *status.Status) error + + // Close tears down the transport. Once it is called, the transport + // should not be accessed any more. All the pending streams and their + // handlers will be terminated asynchronously. + Close() error + + // RemoteAddr returns the remote network address. + RemoteAddr() net.Addr + + // Drain notifies the client this ServerTransport stops accepting new RPCs. + Drain() +} + +// streamErrorf creates an StreamError with the specified error code and description. +func streamErrorf(c codes.Code, format string, a ...interface{}) StreamError { + return StreamError{ + Code: c, + Desc: fmt.Sprintf(format, a...), + } +} + +// connectionErrorf creates an ConnectionError with the specified error description. +func connectionErrorf(temp bool, e error, format string, a ...interface{}) ConnectionError { + return ConnectionError{ + Desc: fmt.Sprintf(format, a...), + temp: temp, + err: e, + } +} + +// ConnectionError is an error that results in the termination of the +// entire connection and the retry of all the active streams. +type ConnectionError struct { + Desc string + temp bool + err error +} + +func (e ConnectionError) Error() string { + return fmt.Sprintf("connection error: desc = %q", e.Desc) +} + +// Temporary indicates if this connection error is temporary or fatal. +func (e ConnectionError) Temporary() bool { + return e.temp +} + +// Origin returns the original error of this connection error. +func (e ConnectionError) Origin() error { + // Never return nil error here. + // If the original error is nil, return itself. + if e.err == nil { + return e + } + return e.err +} + +var ( + // ErrConnClosing indicates that the transport is closing. + ErrConnClosing = connectionErrorf(true, nil, "transport is closing") + // ErrStreamDrain indicates that the stream is rejected by the server because + // the server stops accepting new RPCs. + ErrStreamDrain = streamErrorf(codes.Unavailable, "the server stops accepting new RPCs") +) + +// TODO: See if we can replace StreamError with status package errors. + +// StreamError is an error that only affects one stream within a connection. +type StreamError struct { + Code codes.Code + Desc string +} + +func (e StreamError) Error() string { + return fmt.Sprintf("stream error: code = %s desc = %q", e.Code, e.Desc) +} + +// wait blocks until it can receive from ctx.Done, closing, or proceed. +// If it receives from ctx.Done, it returns 0, the StreamError for ctx.Err. +// If it receives from done, it returns 0, io.EOF if ctx is not done; otherwise +// it return the StreamError for ctx.Err. +// If it receives from goAway, it returns 0, ErrStreamDrain. +// If it receives from closing, it returns 0, ErrConnClosing. +// If it receives from proceed, it returns the received integer, nil. +func wait(ctx context.Context, done, goAway, closing <-chan struct{}, proceed <-chan int) (int, error) { + select { + case <-ctx.Done(): + return 0, ContextErr(ctx.Err()) + case <-done: + // User cancellation has precedence. + select { + case <-ctx.Done(): + return 0, ContextErr(ctx.Err()) + default: + } + return 0, io.EOF + case <-goAway: + return 0, ErrStreamDrain + case <-closing: + return 0, ErrConnClosing + case i := <-proceed: + return i, nil + } +} + +// GoAwayReason contains the reason for the GoAway frame received. +type GoAwayReason uint8 + +const ( + // Invalid indicates that no GoAway frame is received. + Invalid GoAwayReason = 0 + // NoReason is the default value when GoAway frame is received. + NoReason GoAwayReason = 1 + // TooManyPings indicates that a GoAway frame with ErrCodeEnhanceYourCalm + // was recieved and that the debug data said "too_many_pings". + TooManyPings GoAwayReason = 2 +) diff --git a/vendor/google.golang.org/grpc/transport/transport_test.go b/vendor/google.golang.org/grpc/transport/transport_test.go new file mode 100644 index 000000000..adaa17232 --- /dev/null +++ b/vendor/google.golang.org/grpc/transport/transport_test.go @@ -0,0 +1,2174 @@ +/* + * + * Copyright 2014 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package transport + +import ( + "bufio" + "bytes" + "encoding/binary" + "errors" + "fmt" + "io" + "math" + "net" + "net/http" + "reflect" + "strconv" + "strings" + "sync" + "testing" + "time" + + "golang.org/x/net/context" + "golang.org/x/net/http2" + "golang.org/x/net/http2/hpack" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/keepalive" + "google.golang.org/grpc/status" +) + +type server struct { + lis net.Listener + port string + startedErr chan error // error (or nil) with server start value + mu sync.Mutex + conns map[ServerTransport]bool +} + +var ( + expectedRequest = []byte("ping") + expectedResponse = []byte("pong") + expectedRequestLarge = make([]byte, initialWindowSize*2) + expectedResponseLarge = make([]byte, initialWindowSize*2) + expectedInvalidHeaderField = "invalid/content-type" +) + +type testStreamHandler struct { + t *http2Server +} + +type hType int + +const ( + normal hType = iota + suspended + misbehaved + encodingRequiredStatus + invalidHeaderField + delayRead + delayWrite + pingpong +) + +func (h *testStreamHandler) handleStream(t *testing.T, s *Stream) { + req := expectedRequest + resp := expectedResponse + if s.Method() == "foo.Large" { + req = expectedRequestLarge + resp = expectedResponseLarge + } + p := make([]byte, len(req)) + _, err := s.Read(p) + if err != nil { + return + } + if !bytes.Equal(p, req) { + t.Fatalf("handleStream got %v, want %v", p, req) + } + // send a response back to the client. + h.t.Write(s, resp, nil, &Options{}) + // send the trailer to end the stream. + h.t.WriteStatus(s, status.New(codes.OK, "")) +} + +func (h *testStreamHandler) handleStreamPingPong(t *testing.T, s *Stream) { + header := make([]byte, 5) + for i := 0; i < 10; i++ { + if _, err := s.Read(header); err != nil { + t.Fatalf("Error on server while reading data header: %v", err) + } + sz := binary.BigEndian.Uint32(header[1:]) + msg := make([]byte, int(sz)) + if _, err := s.Read(msg); err != nil { + t.Fatalf("Error on server while reading message: %v", err) + } + buf := make([]byte, sz+5) + buf[0] = byte(0) + binary.BigEndian.PutUint32(buf[1:], uint32(sz)) + copy(buf[5:], msg) + h.t.Write(s, buf, nil, &Options{}) + } +} + +func (h *testStreamHandler) handleStreamMisbehave(t *testing.T, s *Stream) { + conn, ok := s.ServerTransport().(*http2Server) + if !ok { + t.Fatalf("Failed to convert %v to *http2Server", s.ServerTransport()) + } + var sent int + p := make([]byte, http2MaxFrameLen) + for sent < initialWindowSize { + <-conn.writableChan + n := initialWindowSize - sent + // The last message may be smaller than http2MaxFrameLen + if n <= http2MaxFrameLen { + if s.Method() == "foo.Connection" { + // Violate connection level flow control window of client but do not + // violate any stream level windows. + p = make([]byte, n) + } else { + // Violate stream level flow control window of client. + p = make([]byte, n+1) + } + } + if err := conn.framer.writeData(true, s.id, false, p); err != nil { + conn.writableChan <- 0 + break + } + conn.writableChan <- 0 + sent += len(p) + } +} + +func (h *testStreamHandler) handleStreamEncodingRequiredStatus(t *testing.T, s *Stream) { + // raw newline is not accepted by http2 framer so it must be encoded. + h.t.WriteStatus(s, encodingTestStatus) +} + +func (h *testStreamHandler) handleStreamInvalidHeaderField(t *testing.T, s *Stream) { + <-h.t.writableChan + h.t.hBuf.Reset() + h.t.hEnc.WriteField(hpack.HeaderField{Name: "content-type", Value: expectedInvalidHeaderField}) + if err := h.t.writeHeaders(s, h.t.hBuf, false); err != nil { + t.Fatalf("Failed to write headers: %v", err) + } + h.t.writableChan <- 0 +} + +func (h *testStreamHandler) handleStreamDelayRead(t *testing.T, s *Stream) { + req := expectedRequest + resp := expectedResponse + if s.Method() == "foo.Large" { + req = expectedRequestLarge + resp = expectedResponseLarge + } + p := make([]byte, len(req)) + + // Wait before reading. Give time to client to start sending + // before server starts reading. + time.Sleep(2 * time.Second) + _, err := s.Read(p) + if err != nil { + t.Fatalf("s.Read(_) = _, %v, want _, <nil>", err) + return + } + + if !bytes.Equal(p, req) { + t.Fatalf("handleStream got %v, want %v", p, req) + } + // send a response back to the client. + h.t.Write(s, resp, nil, &Options{}) + // send the trailer to end the stream. + h.t.WriteStatus(s, status.New(codes.OK, "")) +} + +func (h *testStreamHandler) handleStreamDelayWrite(t *testing.T, s *Stream) { + req := expectedRequest + resp := expectedResponse + if s.Method() == "foo.Large" { + req = expectedRequestLarge + resp = expectedResponseLarge + } + p := make([]byte, len(req)) + _, err := s.Read(p) + if err != nil { + t.Fatalf("s.Read(_) = _, %v, want _, <nil>", err) + return + } + if !bytes.Equal(p, req) { + t.Fatalf("handleStream got %v, want %v", p, req) + } + + // Wait before sending. Give time to client to start reading + // before server starts sending. + time.Sleep(2 * time.Second) + h.t.Write(s, resp, nil, &Options{}) + // send the trailer to end the stream. + h.t.WriteStatus(s, status.New(codes.OK, "")) +} + +// start starts server. Other goroutines should block on s.readyChan for further operations. +func (s *server) start(t *testing.T, port int, serverConfig *ServerConfig, ht hType) { + var err error + if port == 0 { + s.lis, err = net.Listen("tcp", "localhost:0") + } else { + s.lis, err = net.Listen("tcp", "localhost:"+strconv.Itoa(port)) + } + if err != nil { + s.startedErr <- fmt.Errorf("failed to listen: %v", err) + return + } + _, p, err := net.SplitHostPort(s.lis.Addr().String()) + if err != nil { + s.startedErr <- fmt.Errorf("failed to parse listener address: %v", err) + return + } + s.port = p + s.conns = make(map[ServerTransport]bool) + s.startedErr <- nil + for { + conn, err := s.lis.Accept() + if err != nil { + return + } + transport, err := NewServerTransport("http2", conn, serverConfig) + if err != nil { + return + } + s.mu.Lock() + if s.conns == nil { + s.mu.Unlock() + transport.Close() + return + } + s.conns[transport] = true + s.mu.Unlock() + h := &testStreamHandler{transport.(*http2Server)} + switch ht { + case suspended: + go transport.HandleStreams(func(*Stream) {}, // Do nothing to handle the stream. + func(ctx context.Context, method string) context.Context { + return ctx + }) + case misbehaved: + go transport.HandleStreams(func(s *Stream) { + go h.handleStreamMisbehave(t, s) + }, func(ctx context.Context, method string) context.Context { + return ctx + }) + case encodingRequiredStatus: + go transport.HandleStreams(func(s *Stream) { + go h.handleStreamEncodingRequiredStatus(t, s) + }, func(ctx context.Context, method string) context.Context { + return ctx + }) + case invalidHeaderField: + go transport.HandleStreams(func(s *Stream) { + go h.handleStreamInvalidHeaderField(t, s) + }, func(ctx context.Context, method string) context.Context { + return ctx + }) + case delayRead: + go transport.HandleStreams(func(s *Stream) { + go h.handleStreamDelayRead(t, s) + }, func(ctx context.Context, method string) context.Context { + return ctx + }) + case delayWrite: + go transport.HandleStreams(func(s *Stream) { + go h.handleStreamDelayWrite(t, s) + }, func(ctx context.Context, method string) context.Context { + return ctx + }) + case pingpong: + go transport.HandleStreams(func(s *Stream) { + go h.handleStreamPingPong(t, s) + }, func(ctx context.Context, method string) context.Context { + return ctx + }) + default: + go transport.HandleStreams(func(s *Stream) { + go h.handleStream(t, s) + }, func(ctx context.Context, method string) context.Context { + return ctx + }) + } + } +} + +func (s *server) wait(t *testing.T, timeout time.Duration) { + select { + case err := <-s.startedErr: + if err != nil { + t.Fatal(err) + } + case <-time.After(timeout): + t.Fatalf("Timed out after %v waiting for server to be ready", timeout) + } +} + +func (s *server) stop() { + s.lis.Close() + s.mu.Lock() + for c := range s.conns { + c.Close() + } + s.conns = nil + s.mu.Unlock() +} + +func setUp(t *testing.T, port int, maxStreams uint32, ht hType) (*server, ClientTransport) { + return setUpWithOptions(t, port, &ServerConfig{MaxStreams: maxStreams}, ht, ConnectOptions{}) +} + +func setUpWithOptions(t *testing.T, port int, serverConfig *ServerConfig, ht hType, copts ConnectOptions) (*server, ClientTransport) { + server := &server{startedErr: make(chan error, 1)} + go server.start(t, port, serverConfig, ht) + server.wait(t, 2*time.Second) + addr := "localhost:" + server.port + var ( + ct ClientTransport + connErr error + ) + target := TargetInfo{ + Addr: addr, + } + ct, connErr = NewClientTransport(context.Background(), target, copts) + if connErr != nil { + t.Fatalf("failed to create transport: %v", connErr) + } + return server, ct +} + +func setUpWithNoPingServer(t *testing.T, copts ConnectOptions, done chan net.Conn) ClientTransport { + lis, err := net.Listen("tcp", "localhost:0") + if err != nil { + t.Fatalf("Failed to listen: %v", err) + } + // Launch a non responsive server. + go func() { + defer lis.Close() + conn, err := lis.Accept() + if err != nil { + t.Errorf("Error at server-side while accepting: %v", err) + close(done) + return + } + done <- conn + }() + tr, err := NewClientTransport(context.Background(), TargetInfo{Addr: lis.Addr().String()}, copts) + if err != nil { + // Server clean-up. + lis.Close() + if conn, ok := <-done; ok { + conn.Close() + } + t.Fatalf("Failed to dial: %v", err) + } + return tr +} + +// TestInflightStreamClosing ensures that closing in-flight stream +// sends StreamError to concurrent stream reader. +func TestInflightStreamClosing(t *testing.T) { + serverConfig := &ServerConfig{} + server, client := setUpWithOptions(t, 0, serverConfig, suspended, ConnectOptions{}) + defer server.stop() + defer client.Close() + + stream, err := client.NewStream(context.Background(), &CallHdr{}) + if err != nil { + t.Fatalf("Client failed to create RPC request: %v", err) + } + + donec := make(chan struct{}) + serr := StreamError{Desc: "client connection is closing"} + go func() { + defer close(donec) + if _, err := stream.Read(make([]byte, defaultWindowSize)); err != serr { + t.Errorf("unexpected Stream error %v, expected %v", err, serr) + } + }() + + // should unblock concurrent stream.Read + client.CloseStream(stream, serr) + + // wait for stream.Read error + timeout := time.NewTimer(5 * time.Second) + select { + case <-donec: + if !timeout.Stop() { + <-timeout.C + } + case <-timeout.C: + t.Fatalf("Test timed out, expected a StreamError.") + } +} + +// TestMaxConnectionIdle tests that a server will send GoAway to a idle client. +// An idle client is one who doesn't make any RPC calls for a duration of +// MaxConnectionIdle time. +func TestMaxConnectionIdle(t *testing.T) { + serverConfig := &ServerConfig{ + KeepaliveParams: keepalive.ServerParameters{ + MaxConnectionIdle: 2 * time.Second, + }, + } + server, client := setUpWithOptions(t, 0, serverConfig, suspended, ConnectOptions{}) + defer server.stop() + defer client.Close() + stream, err := client.NewStream(context.Background(), &CallHdr{Flush: true}) + if err != nil { + t.Fatalf("Client failed to create RPC request: %v", err) + } + stream.mu.Lock() + stream.rstStream = true + stream.mu.Unlock() + client.CloseStream(stream, nil) + // wait for server to see that closed stream and max-age logic to send goaway after no new RPCs are mode + timeout := time.NewTimer(time.Second * 4) + select { + case <-client.GoAway(): + if !timeout.Stop() { + <-timeout.C + } + case <-timeout.C: + t.Fatalf("Test timed out, expected a GoAway from the server.") + } +} + +// TestMaxConenctionIdleNegative tests that a server will not send GoAway to a non-idle(busy) client. +func TestMaxConnectionIdleNegative(t *testing.T) { + serverConfig := &ServerConfig{ + KeepaliveParams: keepalive.ServerParameters{ + MaxConnectionIdle: 2 * time.Second, + }, + } + server, client := setUpWithOptions(t, 0, serverConfig, suspended, ConnectOptions{}) + defer server.stop() + defer client.Close() + _, err := client.NewStream(context.Background(), &CallHdr{Flush: true}) + if err != nil { + t.Fatalf("Client failed to create RPC request: %v", err) + } + timeout := time.NewTimer(time.Second * 4) + select { + case <-client.GoAway(): + if !timeout.Stop() { + <-timeout.C + } + t.Fatalf("A non-idle client received a GoAway.") + case <-timeout.C: + } + +} + +// TestMaxConnectionAge tests that a server will send GoAway after a duration of MaxConnectionAge. +func TestMaxConnectionAge(t *testing.T) { + serverConfig := &ServerConfig{ + KeepaliveParams: keepalive.ServerParameters{ + MaxConnectionAge: 2 * time.Second, + }, + } + server, client := setUpWithOptions(t, 0, serverConfig, suspended, ConnectOptions{}) + defer server.stop() + defer client.Close() + _, err := client.NewStream(context.Background(), &CallHdr{}) + if err != nil { + t.Fatalf("Client failed to create stream: %v", err) + } + // Wait for max-age logic to send GoAway. + timeout := time.NewTimer(4 * time.Second) + select { + case <-client.GoAway(): + if !timeout.Stop() { + <-timeout.C + } + case <-timeout.C: + t.Fatalf("Test timer out, expected a GoAway from the server.") + } +} + +// TestKeepaliveServer tests that a server closes connection with a client that doesn't respond to keepalive pings. +func TestKeepaliveServer(t *testing.T) { + serverConfig := &ServerConfig{ + KeepaliveParams: keepalive.ServerParameters{ + Time: 2 * time.Second, + Timeout: 1 * time.Second, + }, + } + server, c := setUpWithOptions(t, 0, serverConfig, suspended, ConnectOptions{}) + defer server.stop() + defer c.Close() + client, err := net.Dial("tcp", server.lis.Addr().String()) + if err != nil { + t.Fatalf("Failed to dial: %v", err) + } + defer client.Close() + // Set read deadline on client conn so that it doesn't block forever in errorsome cases. + client.SetReadDeadline(time.Now().Add(10 * time.Second)) + // Wait for keepalive logic to close the connection. + time.Sleep(4 * time.Second) + b := make([]byte, 24) + for { + _, err = client.Read(b) + if err == nil { + continue + } + if err != io.EOF { + t.Fatalf("client.Read(_) = _,%v, want io.EOF", err) + } + break + } +} + +// TestKeepaliveServerNegative tests that a server doesn't close connection with a client that responds to keepalive pings. +func TestKeepaliveServerNegative(t *testing.T) { + serverConfig := &ServerConfig{ + KeepaliveParams: keepalive.ServerParameters{ + Time: 2 * time.Second, + Timeout: 1 * time.Second, + }, + } + server, client := setUpWithOptions(t, 0, serverConfig, suspended, ConnectOptions{}) + defer server.stop() + defer client.Close() + // Give keepalive logic some time by sleeping. + time.Sleep(4 * time.Second) + // Assert that client is still active. + clientTr := client.(*http2Client) + clientTr.mu.Lock() + defer clientTr.mu.Unlock() + if clientTr.state != reachable { + t.Fatalf("Test failed: Expected server-client connection to be healthy.") + } +} + +func TestKeepaliveClientClosesIdleTransport(t *testing.T) { + done := make(chan net.Conn, 1) + tr := setUpWithNoPingServer(t, ConnectOptions{KeepaliveParams: keepalive.ClientParameters{ + Time: 2 * time.Second, // Keepalive time = 2 sec. + Timeout: 1 * time.Second, // Keepalive timeout = 1 sec. + PermitWithoutStream: true, // Run keepalive even with no RPCs. + }}, done) + defer tr.Close() + conn, ok := <-done + if !ok { + t.Fatalf("Server didn't return connection object") + } + defer conn.Close() + // Sleep for keepalive to close the connection. + time.Sleep(4 * time.Second) + // Assert that the connection was closed. + ct := tr.(*http2Client) + ct.mu.Lock() + defer ct.mu.Unlock() + if ct.state == reachable { + t.Fatalf("Test Failed: Expected client transport to have closed.") + } +} + +func TestKeepaliveClientStaysHealthyOnIdleTransport(t *testing.T) { + done := make(chan net.Conn, 1) + tr := setUpWithNoPingServer(t, ConnectOptions{KeepaliveParams: keepalive.ClientParameters{ + Time: 2 * time.Second, // Keepalive time = 2 sec. + Timeout: 1 * time.Second, // Keepalive timeout = 1 sec. + }}, done) + defer tr.Close() + conn, ok := <-done + if !ok { + t.Fatalf("server didn't reutrn connection object") + } + defer conn.Close() + // Give keepalive some time. + time.Sleep(4 * time.Second) + // Assert that connections is still healthy. + ct := tr.(*http2Client) + ct.mu.Lock() + defer ct.mu.Unlock() + if ct.state != reachable { + t.Fatalf("Test failed: Expected client transport to be healthy.") + } +} + +func TestKeepaliveClientClosesWithActiveStreams(t *testing.T) { + done := make(chan net.Conn, 1) + tr := setUpWithNoPingServer(t, ConnectOptions{KeepaliveParams: keepalive.ClientParameters{ + Time: 2 * time.Second, // Keepalive time = 2 sec. + Timeout: 1 * time.Second, // Keepalive timeout = 1 sec. + }}, done) + defer tr.Close() + conn, ok := <-done + if !ok { + t.Fatalf("Server didn't return connection object") + } + defer conn.Close() + // Create a stream. + _, err := tr.NewStream(context.Background(), &CallHdr{Flush: true}) + if err != nil { + t.Fatalf("Failed to create a new stream: %v", err) + } + // Give keepalive some time. + time.Sleep(4 * time.Second) + // Assert that transport was closed. + ct := tr.(*http2Client) + ct.mu.Lock() + defer ct.mu.Unlock() + if ct.state == reachable { + t.Fatalf("Test failed: Expected client transport to have closed.") + } +} + +func TestKeepaliveClientStaysHealthyWithResponsiveServer(t *testing.T) { + s, tr := setUpWithOptions(t, 0, &ServerConfig{MaxStreams: math.MaxUint32}, normal, ConnectOptions{KeepaliveParams: keepalive.ClientParameters{ + Time: 2 * time.Second, // Keepalive time = 2 sec. + Timeout: 1 * time.Second, // Keepalive timeout = 1 sec. + PermitWithoutStream: true, // Run keepalive even with no RPCs. + }}) + defer s.stop() + defer tr.Close() + // Give keep alive some time. + time.Sleep(4 * time.Second) + // Assert that transport is healthy. + ct := tr.(*http2Client) + ct.mu.Lock() + defer ct.mu.Unlock() + if ct.state != reachable { + t.Fatalf("Test failed: Expected client transport to be healthy.") + } +} + +func TestKeepaliveServerEnforcementWithAbusiveClientNoRPC(t *testing.T) { + serverConfig := &ServerConfig{ + KeepalivePolicy: keepalive.EnforcementPolicy{ + MinTime: 2 * time.Second, + }, + } + clientOptions := ConnectOptions{ + KeepaliveParams: keepalive.ClientParameters{ + Time: 50 * time.Millisecond, + Timeout: 50 * time.Millisecond, + PermitWithoutStream: true, + }, + } + server, client := setUpWithOptions(t, 0, serverConfig, normal, clientOptions) + defer server.stop() + defer client.Close() + + timeout := time.NewTimer(2 * time.Second) + select { + case <-client.GoAway(): + if !timeout.Stop() { + <-timeout.C + } + case <-timeout.C: + t.Fatalf("Test failed: Expected a GoAway from server.") + } + time.Sleep(500 * time.Millisecond) + ct := client.(*http2Client) + ct.mu.Lock() + defer ct.mu.Unlock() + if ct.state == reachable { + t.Fatalf("Test failed: Expected the connection to be closed.") + } +} + +func TestKeepaliveServerEnforcementWithAbusiveClientWithRPC(t *testing.T) { + serverConfig := &ServerConfig{ + KeepalivePolicy: keepalive.EnforcementPolicy{ + MinTime: 2 * time.Second, + }, + } + clientOptions := ConnectOptions{ + KeepaliveParams: keepalive.ClientParameters{ + Time: 50 * time.Millisecond, + Timeout: 50 * time.Millisecond, + }, + } + server, client := setUpWithOptions(t, 0, serverConfig, suspended, clientOptions) + defer server.stop() + defer client.Close() + + if _, err := client.NewStream(context.Background(), &CallHdr{Flush: true}); err != nil { + t.Fatalf("Client failed to create stream.") + } + timeout := time.NewTimer(2 * time.Second) + select { + case <-client.GoAway(): + if !timeout.Stop() { + <-timeout.C + } + case <-timeout.C: + t.Fatalf("Test failed: Expected a GoAway from server.") + } + time.Sleep(500 * time.Millisecond) + ct := client.(*http2Client) + ct.mu.Lock() + defer ct.mu.Unlock() + if ct.state == reachable { + t.Fatalf("Test failed: Expected the connection to be closed.") + } +} + +func TestKeepaliveServerEnforcementWithObeyingClientNoRPC(t *testing.T) { + serverConfig := &ServerConfig{ + KeepalivePolicy: keepalive.EnforcementPolicy{ + MinTime: 100 * time.Millisecond, + PermitWithoutStream: true, + }, + } + clientOptions := ConnectOptions{ + KeepaliveParams: keepalive.ClientParameters{ + Time: 101 * time.Millisecond, + Timeout: 50 * time.Millisecond, + PermitWithoutStream: true, + }, + } + server, client := setUpWithOptions(t, 0, serverConfig, normal, clientOptions) + defer server.stop() + defer client.Close() + + // Give keepalive enough time. + time.Sleep(2 * time.Second) + // Assert that connection is healthy. + ct := client.(*http2Client) + ct.mu.Lock() + defer ct.mu.Unlock() + if ct.state != reachable { + t.Fatalf("Test failed: Expected connection to be healthy.") + } +} + +func TestKeepaliveServerEnforcementWithObeyingClientWithRPC(t *testing.T) { + serverConfig := &ServerConfig{ + KeepalivePolicy: keepalive.EnforcementPolicy{ + MinTime: 100 * time.Millisecond, + }, + } + clientOptions := ConnectOptions{ + KeepaliveParams: keepalive.ClientParameters{ + Time: 101 * time.Millisecond, + Timeout: 50 * time.Millisecond, + }, + } + server, client := setUpWithOptions(t, 0, serverConfig, suspended, clientOptions) + defer server.stop() + defer client.Close() + + if _, err := client.NewStream(context.Background(), &CallHdr{Flush: true}); err != nil { + t.Fatalf("Client failed to create stream.") + } + + // Give keepalive enough time. + time.Sleep(2 * time.Second) + // Assert that connection is healthy. + ct := client.(*http2Client) + ct.mu.Lock() + defer ct.mu.Unlock() + if ct.state != reachable { + t.Fatalf("Test failed: Expected connection to be healthy.") + } +} + +func TestClientSendAndReceive(t *testing.T) { + server, ct := setUp(t, 0, math.MaxUint32, normal) + callHdr := &CallHdr{ + Host: "localhost", + Method: "foo.Small", + } + s1, err1 := ct.NewStream(context.Background(), callHdr) + if err1 != nil { + t.Fatalf("failed to open stream: %v", err1) + } + if s1.id != 1 { + t.Fatalf("wrong stream id: %d", s1.id) + } + s2, err2 := ct.NewStream(context.Background(), callHdr) + if err2 != nil { + t.Fatalf("failed to open stream: %v", err2) + } + if s2.id != 3 { + t.Fatalf("wrong stream id: %d", s2.id) + } + opts := Options{ + Last: true, + Delay: false, + } + if err := ct.Write(s1, expectedRequest, nil, &opts); err != nil && err != io.EOF { + t.Fatalf("failed to send data: %v", err) + } + p := make([]byte, len(expectedResponse)) + _, recvErr := s1.Read(p) + if recvErr != nil || !bytes.Equal(p, expectedResponse) { + t.Fatalf("Error: %v, want <nil>; Result: %v, want %v", recvErr, p, expectedResponse) + } + _, recvErr = s1.Read(p) + if recvErr != io.EOF { + t.Fatalf("Error: %v; want <EOF>", recvErr) + } + ct.Close() + server.stop() +} + +func TestClientErrorNotify(t *testing.T) { + server, ct := setUp(t, 0, math.MaxUint32, normal) + go server.stop() + // ct.reader should detect the error and activate ct.Error(). + <-ct.Error() + ct.Close() +} + +func performOneRPC(ct ClientTransport) { + callHdr := &CallHdr{ + Host: "localhost", + Method: "foo.Small", + } + s, err := ct.NewStream(context.Background(), callHdr) + if err != nil { + return + } + opts := Options{ + Last: true, + Delay: false, + } + if err := ct.Write(s, expectedRequest, nil, &opts); err == nil || err == io.EOF { + time.Sleep(5 * time.Millisecond) + // The following s.Recv()'s could error out because the + // underlying transport is gone. + // + // Read response + p := make([]byte, len(expectedResponse)) + s.Read(p) + // Read io.EOF + s.Read(p) + } +} + +func TestClientMix(t *testing.T) { + s, ct := setUp(t, 0, math.MaxUint32, normal) + go func(s *server) { + time.Sleep(5 * time.Second) + s.stop() + }(s) + go func(ct ClientTransport) { + <-ct.Error() + ct.Close() + }(ct) + for i := 0; i < 1000; i++ { + time.Sleep(10 * time.Millisecond) + go performOneRPC(ct) + } +} + +func TestLargeMessage(t *testing.T) { + server, ct := setUp(t, 0, math.MaxUint32, normal) + callHdr := &CallHdr{ + Host: "localhost", + Method: "foo.Large", + } + var wg sync.WaitGroup + for i := 0; i < 2; i++ { + wg.Add(1) + go func() { + defer wg.Done() + s, err := ct.NewStream(context.Background(), callHdr) + if err != nil { + t.Errorf("%v.NewStream(_, _) = _, %v, want _, <nil>", ct, err) + } + if err := ct.Write(s, expectedRequestLarge, nil, &Options{Last: true, Delay: false}); err != nil && err != io.EOF { + t.Errorf("%v.Write(_, _, _) = %v, want <nil>", ct, err) + } + p := make([]byte, len(expectedResponseLarge)) + if _, err := s.Read(p); err != nil || !bytes.Equal(p, expectedResponseLarge) { + t.Errorf("s.Read(%v) = _, %v, want %v, <nil>", err, p, expectedResponse) + } + if _, err = s.Read(p); err != io.EOF { + t.Errorf("Failed to complete the stream %v; want <EOF>", err) + } + }() + } + wg.Wait() + ct.Close() + server.stop() +} + +func TestLargeMessageWithDelayRead(t *testing.T) { + server, ct := setUp(t, 0, math.MaxUint32, delayRead) + callHdr := &CallHdr{ + Host: "localhost", + Method: "foo.Large", + } + var wg sync.WaitGroup + for i := 0; i < 2; i++ { + wg.Add(1) + go func() { + defer wg.Done() + s, err := ct.NewStream(context.Background(), callHdr) + if err != nil { + t.Errorf("%v.NewStream(_, _) = _, %v, want _, <nil>", ct, err) + } + if err := ct.Write(s, expectedRequestLarge, nil, &Options{Last: true, Delay: false}); err != nil && err != io.EOF { + t.Errorf("%v.Write(_, _, _) = %v, want <nil>", ct, err) + } + p := make([]byte, len(expectedResponseLarge)) + + // Give time to server to begin sending before client starts reading. + time.Sleep(2 * time.Second) + if _, err := s.Read(p); err != nil || !bytes.Equal(p, expectedResponseLarge) { + t.Errorf("s.Read(_) = _, %v, want _, <nil>", err) + } + if _, err = s.Read(p); err != io.EOF { + t.Errorf("Failed to complete the stream %v; want <EOF>", err) + } + }() + } + wg.Wait() + ct.Close() + server.stop() +} + +func TestLargeMessageDelayWrite(t *testing.T) { + server, ct := setUp(t, 0, math.MaxUint32, delayWrite) + callHdr := &CallHdr{ + Host: "localhost", + Method: "foo.Large", + } + var wg sync.WaitGroup + for i := 0; i < 2; i++ { + wg.Add(1) + go func() { + defer wg.Done() + s, err := ct.NewStream(context.Background(), callHdr) + if err != nil { + t.Errorf("%v.NewStream(_, _) = _, %v, want _, <nil>", ct, err) + } + + // Give time to server to start reading before client starts sending. + time.Sleep(2 * time.Second) + if err := ct.Write(s, expectedRequestLarge, nil, &Options{Last: true, Delay: false}); err != nil && err != io.EOF { + t.Errorf("%v.Write(_, _, _) = %v, want <nil>", ct, err) + } + p := make([]byte, len(expectedResponseLarge)) + if _, err := s.Read(p); err != nil || !bytes.Equal(p, expectedResponseLarge) { + t.Errorf("io.ReadFull(%v) = _, %v, want %v, <nil>", err, p, expectedResponse) + } + if _, err = s.Read(p); err != io.EOF { + t.Errorf("Failed to complete the stream %v; want <EOF>", err) + } + }() + } + wg.Wait() + ct.Close() + server.stop() +} + +func TestGracefulClose(t *testing.T) { + server, ct := setUp(t, 0, math.MaxUint32, normal) + callHdr := &CallHdr{ + Host: "localhost", + Method: "foo.Small", + } + s, err := ct.NewStream(context.Background(), callHdr) + if err != nil { + t.Fatalf("%v.NewStream(_, _) = _, %v, want _, <nil>", ct, err) + } + if err = ct.GracefulClose(); err != nil { + t.Fatalf("%v.GracefulClose() = %v, want <nil>", ct, err) + } + var wg sync.WaitGroup + // Expect the failure for all the follow-up streams because ct has been closed gracefully. + for i := 0; i < 100; i++ { + wg.Add(1) + go func() { + defer wg.Done() + if _, err := ct.NewStream(context.Background(), callHdr); err != ErrStreamDrain { + t.Errorf("%v.NewStream(_, _) = _, %v, want _, %v", ct, err, ErrStreamDrain) + } + }() + } + opts := Options{ + Last: true, + Delay: false, + } + // The stream which was created before graceful close can still proceed. + if err := ct.Write(s, expectedRequest, nil, &opts); err != nil && err != io.EOF { + t.Fatalf("%v.Write(_, _, _) = %v, want <nil>", ct, err) + } + p := make([]byte, len(expectedResponse)) + if _, err := s.Read(p); err != nil || !bytes.Equal(p, expectedResponse) { + t.Fatalf("s.Read(%v) = _, %v, want %v, <nil>", err, p, expectedResponse) + } + if _, err = s.Read(p); err != io.EOF { + t.Fatalf("Failed to complete the stream %v; want <EOF>", err) + } + wg.Wait() + ct.Close() + server.stop() +} + +func TestLargeMessageSuspension(t *testing.T) { + server, ct := setUp(t, 0, math.MaxUint32, suspended) + callHdr := &CallHdr{ + Host: "localhost", + Method: "foo.Large", + } + // Set a long enough timeout for writing a large message out. + ctx, cancel := context.WithTimeout(context.Background(), time.Second) + defer cancel() + s, err := ct.NewStream(ctx, callHdr) + if err != nil { + t.Fatalf("failed to open stream: %v", err) + } + // Write should not be done successfully due to flow control. + msg := make([]byte, initialWindowSize*8) + err = ct.Write(s, msg, nil, &Options{Last: true, Delay: false}) + expectedErr := streamErrorf(codes.DeadlineExceeded, "%v", context.DeadlineExceeded) + if err != expectedErr { + t.Fatalf("Write got %v, want %v", err, expectedErr) + } + ct.Close() + server.stop() +} + +func TestMaxStreams(t *testing.T) { + server, ct := setUp(t, 0, 1, suspended) + callHdr := &CallHdr{ + Host: "localhost", + Method: "foo.Large", + } + // Have a pending stream which takes all streams quota. + s, err := ct.NewStream(context.Background(), callHdr) + if err != nil { + t.Fatalf("Failed to open stream: %v", err) + } + cc, ok := ct.(*http2Client) + if !ok { + t.Fatalf("Failed to convert %v to *http2Client", ct) + } + done := make(chan struct{}) + ch := make(chan int) + ready := make(chan struct{}) + go func() { + for { + select { + case <-time.After(5 * time.Millisecond): + select { + case ch <- 0: + case <-ready: + return + } + case <-time.After(5 * time.Second): + close(done) + return + case <-ready: + return + } + } + }() + for { + select { + case <-ch: + case <-done: + t.Fatalf("Client has not received the max stream setting in 5 seconds.") + } + cc.mu.Lock() + // cc.maxStreams should be equal to 1 after having received settings frame from + // server. + if cc.maxStreams == 1 { + cc.mu.Unlock() + select { + case <-cc.streamsQuota.acquire(): + t.Fatalf("streamsQuota.acquire() becomes readable mistakenly.") + default: + cc.streamsQuota.mu.Lock() + quota := cc.streamsQuota.quota + cc.streamsQuota.mu.Unlock() + if quota != 0 { + t.Fatalf("streamsQuota.quota got non-zero quota mistakenly.") + } + } + break + } + cc.mu.Unlock() + } + close(ready) + // Close the pending stream so that the streams quota becomes available for the next new stream. + ct.CloseStream(s, nil) + select { + case i := <-cc.streamsQuota.acquire(): + if i != 1 { + t.Fatalf("streamsQuota.acquire() got %d quota, want 1.", i) + } + cc.streamsQuota.add(i) + default: + t.Fatalf("streamsQuota.acquire() is not readable.") + } + if _, err := ct.NewStream(context.Background(), callHdr); err != nil { + t.Fatalf("Failed to open stream: %v", err) + } + ct.Close() + server.stop() +} + +func TestServerContextCanceledOnClosedConnection(t *testing.T) { + server, ct := setUp(t, 0, math.MaxUint32, suspended) + callHdr := &CallHdr{ + Host: "localhost", + Method: "foo", + } + var sc *http2Server + // Wait until the server transport is setup. + for { + server.mu.Lock() + if len(server.conns) == 0 { + server.mu.Unlock() + time.Sleep(time.Millisecond) + continue + } + for k := range server.conns { + var ok bool + sc, ok = k.(*http2Server) + if !ok { + t.Fatalf("Failed to convert %v to *http2Server", k) + } + } + server.mu.Unlock() + break + } + cc, ok := ct.(*http2Client) + if !ok { + t.Fatalf("Failed to convert %v to *http2Client", ct) + } + s, err := ct.NewStream(context.Background(), callHdr) + if err != nil { + t.Fatalf("Failed to open stream: %v", err) + } + // Make sure the headers frame is flushed out. + <-cc.writableChan + if err = cc.framer.writeData(true, s.id, false, make([]byte, http2MaxFrameLen)); err != nil { + t.Fatalf("Failed to write data: %v", err) + } + cc.writableChan <- 0 + // Loop until the server side stream is created. + var ss *Stream + for { + time.Sleep(time.Second) + sc.mu.Lock() + if len(sc.activeStreams) == 0 { + sc.mu.Unlock() + continue + } + ss = sc.activeStreams[s.id] + sc.mu.Unlock() + break + } + cc.Close() + select { + case <-ss.Context().Done(): + if ss.Context().Err() != context.Canceled { + t.Fatalf("ss.Context().Err() got %v, want %v", ss.Context().Err(), context.Canceled) + } + case <-time.After(5 * time.Second): + t.Fatalf("Failed to cancel the context of the sever side stream.") + } + server.stop() +} + +func TestClientConnDecoupledFromApplicationRead(t *testing.T) { + connectOptions := ConnectOptions{ + InitialWindowSize: defaultWindowSize, + InitialConnWindowSize: defaultWindowSize, + } + server, client := setUpWithOptions(t, 0, &ServerConfig{}, suspended, connectOptions) + defer server.stop() + defer client.Close() + + waitWhileTrue(t, func() (bool, error) { + server.mu.Lock() + defer server.mu.Unlock() + + if len(server.conns) == 0 { + return true, fmt.Errorf("timed-out while waiting for connection to be created on the server") + } + return false, nil + }) + + var st *http2Server + server.mu.Lock() + for k := range server.conns { + st = k.(*http2Server) + } + server.mu.Unlock() + cstream1, err := client.NewStream(context.Background(), &CallHdr{Flush: true}) + if err != nil { + t.Fatalf("Client failed to create first stream. Err: %v", err) + } + + var sstream1 *Stream + // Access stream on the server. + waitWhileTrue(t, func() (bool, error) { + st.mu.Lock() + defer st.mu.Unlock() + + if len(st.activeStreams) != 1 { + return true, fmt.Errorf("timed-out while waiting for server to have created a stream") + } + for _, v := range st.activeStreams { + sstream1 = v + } + return false, nil + }) + + // Exhaust client's connection window. + <-st.writableChan + if err := st.framer.writeData(true, sstream1.id, true, make([]byte, defaultWindowSize)); err != nil { + st.writableChan <- 0 + t.Fatalf("Server failed to write data. Err: %v", err) + } + st.writableChan <- 0 + // Create another stream on client. + cstream2, err := client.NewStream(context.Background(), &CallHdr{Flush: true}) + if err != nil { + t.Fatalf("Client failed to create second stream. Err: %v", err) + } + + var sstream2 *Stream + waitWhileTrue(t, func() (bool, error) { + st.mu.Lock() + defer st.mu.Unlock() + + if len(st.activeStreams) != 2 { + return true, fmt.Errorf("timed-out while waiting for server to have created the second stream") + } + for _, v := range st.activeStreams { + if v.id == cstream2.id { + sstream2 = v + } + } + if sstream2 == nil { + return true, fmt.Errorf("didn't find stream corresponding to client cstream.id: %v on the server", cstream2.id) + } + return false, nil + }) + + // Server should be able to send data on the new stream, even though the client hasn't read anything on the first stream. + <-st.writableChan + if err := st.framer.writeData(true, sstream2.id, true, make([]byte, defaultWindowSize)); err != nil { + st.writableChan <- 0 + t.Fatalf("Server failed to write data. Err: %v", err) + } + st.writableChan <- 0 + + // Client should be able to read data on second stream. + if _, err := cstream2.Read(make([]byte, defaultWindowSize)); err != nil { + t.Fatalf("_.Read(_) = _, %v, want _, <nil>", err) + } + + // Client should be able to read data on first stream. + if _, err := cstream1.Read(make([]byte, defaultWindowSize)); err != nil { + t.Fatalf("_.Read(_) = _, %v, want _, <nil>", err) + } +} + +func TestServerConnDecoupledFromApplicationRead(t *testing.T) { + serverConfig := &ServerConfig{ + InitialWindowSize: defaultWindowSize, + InitialConnWindowSize: defaultWindowSize, + } + server, client := setUpWithOptions(t, 0, serverConfig, suspended, ConnectOptions{}) + defer server.stop() + defer client.Close() + waitWhileTrue(t, func() (bool, error) { + server.mu.Lock() + defer server.mu.Unlock() + + if len(server.conns) == 0 { + return true, fmt.Errorf("timed-out while waiting for connection to be created on the server") + } + return false, nil + }) + var st *http2Server + server.mu.Lock() + for k := range server.conns { + st = k.(*http2Server) + } + server.mu.Unlock() + cstream1, err := client.NewStream(context.Background(), &CallHdr{Flush: true}) + if err != nil { + t.Fatalf("Failed to create 1st stream. Err: %v", err) + } + // Exhaust server's connection window. + if err := client.Write(cstream1, make([]byte, defaultWindowSize), nil, &Options{Last: true}); err != nil { + t.Fatalf("Client failed to write data. Err: %v", err) + } + //Client should be able to create another stream and send data on it. + cstream2, err := client.NewStream(context.Background(), &CallHdr{Flush: true}) + if err != nil { + t.Fatalf("Failed to create 2nd stream. Err: %v", err) + } + if err := client.Write(cstream2, make([]byte, defaultWindowSize), nil, &Options{}); err != nil { + t.Fatalf("Client failed to write data. Err: %v", err) + } + // Get the streams on server. + waitWhileTrue(t, func() (bool, error) { + st.mu.Lock() + defer st.mu.Unlock() + + if len(st.activeStreams) != 2 { + return true, fmt.Errorf("timed-out while waiting for server to have created the streams") + } + return false, nil + }) + var sstream1 *Stream + st.mu.Lock() + for _, v := range st.activeStreams { + if v.id == 1 { + sstream1 = v + } + } + st.mu.Unlock() + // Trying to write more on a max-ed out stream should result in a RST_STREAM from the server. + ct := client.(*http2Client) + <-ct.writableChan + if err := ct.framer.writeData(true, cstream2.id, true, make([]byte, 1)); err != nil { + t.Fatalf("Client failed to write. Err: %v", err) + } + ct.writableChan <- 0 + code := http2ErrConvTab[http2.ErrCodeFlowControl] + waitWhileTrue(t, func() (bool, error) { + cstream2.mu.Lock() + defer cstream2.mu.Unlock() + if cstream2.status.Code() != code { + return true, fmt.Errorf("want code = %v, got %v", code, cstream2.status.Code()) + } + return false, nil + }) + // Reading from the stream on server should succeed. + if _, err := sstream1.Read(make([]byte, defaultWindowSize)); err != nil { + t.Fatalf("_.Read(_) = %v, want <nil>", err) + } + + if _, err := sstream1.Read(make([]byte, 1)); err != io.EOF { + t.Fatalf("_.Read(_) = %v, want io.EOF", err) + } + +} + +func TestServerWithMisbehavedClient(t *testing.T) { + server, ct := setUp(t, 0, math.MaxUint32, suspended) + callHdr := &CallHdr{ + Host: "localhost", + Method: "foo", + } + var sc *http2Server + // Wait until the server transport is setup. + for { + server.mu.Lock() + if len(server.conns) == 0 { + server.mu.Unlock() + time.Sleep(time.Millisecond) + continue + } + for k := range server.conns { + var ok bool + sc, ok = k.(*http2Server) + if !ok { + t.Fatalf("Failed to convert %v to *http2Server", k) + } + } + server.mu.Unlock() + break + } + cc, ok := ct.(*http2Client) + if !ok { + t.Fatalf("Failed to convert %v to *http2Client", ct) + } + // Test server behavior for violation of stream flow control window size restriction. + s, err := ct.NewStream(context.Background(), callHdr) + if err != nil { + t.Fatalf("Failed to open stream: %v", err) + } + var sent int + // Drain the stream flow control window + <-cc.writableChan + if err = cc.framer.writeData(true, s.id, false, make([]byte, http2MaxFrameLen)); err != nil { + t.Fatalf("Failed to write data: %v", err) + } + cc.writableChan <- 0 + sent += http2MaxFrameLen + // Wait until the server creates the corresponding stream and receive some data. + var ss *Stream + for { + time.Sleep(time.Millisecond) + sc.mu.Lock() + if len(sc.activeStreams) == 0 { + sc.mu.Unlock() + continue + } + ss = sc.activeStreams[s.id] + sc.mu.Unlock() + ss.fc.mu.Lock() + if ss.fc.pendingData > 0 { + ss.fc.mu.Unlock() + break + } + ss.fc.mu.Unlock() + } + if ss.fc.pendingData != http2MaxFrameLen || ss.fc.pendingUpdate != 0 || sc.fc.pendingData != 0 || sc.fc.pendingUpdate != 0 { + t.Fatalf("Server mistakenly updates inbound flow control params: got %d, %d, %d, %d; want %d, %d, %d, %d", ss.fc.pendingData, ss.fc.pendingUpdate, sc.fc.pendingData, sc.fc.pendingUpdate, http2MaxFrameLen, 0, 0, 0) + } + // Keep sending until the server inbound window is drained for that stream. + for sent <= initialWindowSize { + <-cc.writableChan + if err = cc.framer.writeData(true, s.id, false, make([]byte, 1)); err != nil { + t.Fatalf("Failed to write data: %v", err) + } + cc.writableChan <- 0 + sent++ + } + // Server sent a resetStream for s already. + code := http2ErrConvTab[http2.ErrCodeFlowControl] + if _, err := s.Read(make([]byte, 1)); err != io.EOF { + t.Fatalf("%v got err %v want <EOF>", s, err) + } + if s.status.Code() != code { + t.Fatalf("%v got status %v; want Code=%v", s, s.status, code) + } + + ct.CloseStream(s, nil) + ct.Close() + server.stop() +} + +func TestClientWithMisbehavedServer(t *testing.T) { + // Turn off BDP estimation so that the server can + // violate stream window. + connectOptions := ConnectOptions{ + InitialWindowSize: initialWindowSize, + } + server, ct := setUpWithOptions(t, 0, &ServerConfig{}, misbehaved, connectOptions) + callHdr := &CallHdr{ + Host: "localhost", + Method: "foo.Stream", + } + conn, ok := ct.(*http2Client) + if !ok { + t.Fatalf("Failed to convert %v to *http2Client", ct) + } + // Test the logic for the violation of stream flow control window size restriction. + s, err := ct.NewStream(context.Background(), callHdr) + if err != nil { + t.Fatalf("Failed to open stream: %v", err) + } + d := make([]byte, 1) + if err := ct.Write(s, d, nil, &Options{Last: true, Delay: false}); err != nil && err != io.EOF { + t.Fatalf("Failed to write: %v", err) + } + // Read without window update. + for { + p := make([]byte, http2MaxFrameLen) + if _, err = s.trReader.(*transportReader).reader.Read(p); err != nil { + break + } + } + if s.fc.pendingData <= initialWindowSize || s.fc.pendingUpdate != 0 || conn.fc.pendingData != 0 || conn.fc.pendingUpdate != 0 { + t.Fatalf("Client mistakenly updates inbound flow control params: got %d, %d, %d, %d; want >%d, %d, %d, >%d", s.fc.pendingData, s.fc.pendingUpdate, conn.fc.pendingData, conn.fc.pendingUpdate, initialWindowSize, 0, 0, 0) + } + + if err != io.EOF { + t.Fatalf("Got err %v, want <EOF>", err) + } + if s.status.Code() != codes.Internal { + t.Fatalf("Got s.status %v, want s.status.Code()=Internal", s.status) + } + + conn.CloseStream(s, err) + ct.Close() + server.stop() +} + +var encodingTestStatus = status.New(codes.Internal, "\n") + +func TestEncodingRequiredStatus(t *testing.T) { + server, ct := setUp(t, 0, math.MaxUint32, encodingRequiredStatus) + callHdr := &CallHdr{ + Host: "localhost", + Method: "foo", + } + s, err := ct.NewStream(context.Background(), callHdr) + if err != nil { + return + } + opts := Options{ + Last: true, + Delay: false, + } + if err := ct.Write(s, expectedRequest, nil, &opts); err != nil && err != io.EOF { + t.Fatalf("Failed to write the request: %v", err) + } + p := make([]byte, http2MaxFrameLen) + if _, err := s.trReader.(*transportReader).Read(p); err != io.EOF { + t.Fatalf("Read got error %v, want %v", err, io.EOF) + } + if !reflect.DeepEqual(s.Status(), encodingTestStatus) { + t.Fatalf("stream with status %v, want %v", s.Status(), encodingTestStatus) + } + ct.Close() + server.stop() +} + +func TestInvalidHeaderField(t *testing.T) { + server, ct := setUp(t, 0, math.MaxUint32, invalidHeaderField) + callHdr := &CallHdr{ + Host: "localhost", + Method: "foo", + } + s, err := ct.NewStream(context.Background(), callHdr) + if err != nil { + return + } + opts := Options{ + Last: true, + Delay: false, + } + if err := ct.Write(s, expectedRequest, nil, &opts); err != nil && err != io.EOF { + t.Fatalf("Failed to write the request: %v", err) + } + p := make([]byte, http2MaxFrameLen) + _, err = s.trReader.(*transportReader).Read(p) + if se, ok := err.(StreamError); !ok || se.Code != codes.FailedPrecondition || !strings.Contains(err.Error(), expectedInvalidHeaderField) { + t.Fatalf("Read got error %v, want error with code %s and contains %q", err, codes.FailedPrecondition, expectedInvalidHeaderField) + } + ct.Close() + server.stop() +} + +func TestStreamContext(t *testing.T) { + expectedStream := &Stream{} + ctx := newContextWithStream(context.Background(), expectedStream) + s, ok := StreamFromContext(ctx) + if !ok || expectedStream != s { + t.Fatalf("GetStreamFromContext(%v) = %v, %t, want: %v, true", ctx, s, ok, expectedStream) + } +} + +func TestIsReservedHeader(t *testing.T) { + tests := []struct { + h string + want bool + }{ + {"", false}, // but should be rejected earlier + {"foo", false}, + {"content-type", true}, + {"grpc-message-type", true}, + {"grpc-encoding", true}, + {"grpc-message", true}, + {"grpc-status", true}, + {"grpc-timeout", true}, + {"te", true}, + } + for _, tt := range tests { + got := isReservedHeader(tt.h) + if got != tt.want { + t.Errorf("isReservedHeader(%q) = %v; want %v", tt.h, got, tt.want) + } + } +} + +func TestContextErr(t *testing.T) { + for _, test := range []struct { + // input + errIn error + // outputs + errOut StreamError + }{ + {context.DeadlineExceeded, StreamError{codes.DeadlineExceeded, context.DeadlineExceeded.Error()}}, + {context.Canceled, StreamError{codes.Canceled, context.Canceled.Error()}}, + } { + err := ContextErr(test.errIn) + if err != test.errOut { + t.Fatalf("ContextErr{%v} = %v \nwant %v", test.errIn, err, test.errOut) + } + } +} + +func max(a, b int32) int32 { + if a > b { + return a + } + return b +} + +type windowSizeConfig struct { + serverStream int32 + serverConn int32 + clientStream int32 + clientConn int32 +} + +func TestAccountCheckWindowSizeWithLargeWindow(t *testing.T) { + wc := windowSizeConfig{ + serverStream: 10 * 1024 * 1024, + serverConn: 12 * 1024 * 1024, + clientStream: 6 * 1024 * 1024, + clientConn: 8 * 1024 * 1024, + } + testAccountCheckWindowSize(t, wc) +} + +func TestAccountCheckWindowSizeWithSmallWindow(t *testing.T) { + wc := windowSizeConfig{ + serverStream: defaultWindowSize, + // Note this is smaller than initialConnWindowSize which is the current default. + serverConn: defaultWindowSize, + clientStream: defaultWindowSize, + clientConn: defaultWindowSize, + } + testAccountCheckWindowSize(t, wc) +} + +func testAccountCheckWindowSize(t *testing.T, wc windowSizeConfig) { + serverConfig := &ServerConfig{ + InitialWindowSize: wc.serverStream, + InitialConnWindowSize: wc.serverConn, + } + connectOptions := ConnectOptions{ + InitialWindowSize: wc.clientStream, + InitialConnWindowSize: wc.clientConn, + } + server, client := setUpWithOptions(t, 0, serverConfig, suspended, connectOptions) + defer server.stop() + defer client.Close() + + // Wait for server conns to be populated with new server transport. + waitWhileTrue(t, func() (bool, error) { + server.mu.Lock() + defer server.mu.Unlock() + if len(server.conns) == 0 { + return true, fmt.Errorf("timed out waiting for server transport to be created") + } + return false, nil + }) + var st *http2Server + server.mu.Lock() + for k := range server.conns { + st = k.(*http2Server) + } + server.mu.Unlock() + ct := client.(*http2Client) + cstream, err := client.NewStream(context.Background(), &CallHdr{Flush: true}) + if err != nil { + t.Fatalf("Failed to create stream. Err: %v", err) + } + // Wait for server to receive headers. + waitWhileTrue(t, func() (bool, error) { + st.mu.Lock() + defer st.mu.Unlock() + if len(st.activeStreams) == 0 { + return true, fmt.Errorf("timed out waiting for server to receive headers") + } + return false, nil + }) + // Sleeping to make sure the settings are applied in case of negative test. + time.Sleep(time.Second) + + waitWhileTrue(t, func() (bool, error) { + st.fc.mu.Lock() + lim := st.fc.limit + st.fc.mu.Unlock() + if lim != uint32(serverConfig.InitialConnWindowSize) { + return true, fmt.Errorf("Server transport flow control window size: got %v, want %v", lim, serverConfig.InitialConnWindowSize) + } + return false, nil + }) + + ctx, cancel := context.WithTimeout(context.Background(), time.Second) + serverSendQuota, err := wait(ctx, nil, nil, nil, st.sendQuotaPool.acquire()) + if err != nil { + t.Fatalf("Error while acquiring sendQuota on server. Err: %v", err) + } + cancel() + st.sendQuotaPool.add(serverSendQuota) + if serverSendQuota != int(connectOptions.InitialConnWindowSize) { + t.Fatalf("Server send quota(%v) not equal to client's window size(%v) on conn.", serverSendQuota, connectOptions.InitialConnWindowSize) + } + st.mu.Lock() + ssq := st.streamSendQuota + st.mu.Unlock() + if ssq != uint32(connectOptions.InitialWindowSize) { + t.Fatalf("Server stream send quota(%v) not equal to client's window size(%v) on stream.", ssq, connectOptions.InitialWindowSize) + } + ct.fc.mu.Lock() + limit := ct.fc.limit + ct.fc.mu.Unlock() + if limit != uint32(connectOptions.InitialConnWindowSize) { + t.Fatalf("Client transport flow control window size is %v, want %v", limit, connectOptions.InitialConnWindowSize) + } + ctx, cancel = context.WithTimeout(context.Background(), time.Second) + clientSendQuota, err := wait(ctx, nil, nil, nil, ct.sendQuotaPool.acquire()) + if err != nil { + t.Fatalf("Error while acquiring sendQuota on client. Err: %v", err) + } + cancel() + ct.sendQuotaPool.add(clientSendQuota) + if clientSendQuota != int(serverConfig.InitialConnWindowSize) { + t.Fatalf("Client send quota(%v) not equal to server's window size(%v) on conn.", clientSendQuota, serverConfig.InitialConnWindowSize) + } + ct.mu.Lock() + ssq = ct.streamSendQuota + ct.mu.Unlock() + if ssq != uint32(serverConfig.InitialWindowSize) { + t.Fatalf("Client stream send quota(%v) not equal to server's window size(%v) on stream.", ssq, serverConfig.InitialWindowSize) + } + cstream.fc.mu.Lock() + limit = cstream.fc.limit + cstream.fc.mu.Unlock() + if limit != uint32(connectOptions.InitialWindowSize) { + t.Fatalf("Client stream flow control window size is %v, want %v", limit, connectOptions.InitialWindowSize) + } + var sstream *Stream + st.mu.Lock() + for _, v := range st.activeStreams { + sstream = v + } + st.mu.Unlock() + sstream.fc.mu.Lock() + limit = sstream.fc.limit + sstream.fc.mu.Unlock() + if limit != uint32(serverConfig.InitialWindowSize) { + t.Fatalf("Server stream flow control window size is %v, want %v", limit, serverConfig.InitialWindowSize) + } +} + +// Check accounting on both sides after sending and receiving large messages. +func TestAccountCheckExpandingWindow(t *testing.T) { + server, client := setUp(t, 0, 0, pingpong) + defer server.stop() + defer client.Close() + waitWhileTrue(t, func() (bool, error) { + server.mu.Lock() + defer server.mu.Unlock() + if len(server.conns) == 0 { + return true, fmt.Errorf("timed out while waiting for server transport to be created") + } + return false, nil + }) + var st *http2Server + server.mu.Lock() + for k := range server.conns { + st = k.(*http2Server) + } + server.mu.Unlock() + ct := client.(*http2Client) + cstream, err := client.NewStream(context.Background(), &CallHdr{Flush: true}) + if err != nil { + t.Fatalf("Failed to create stream. Err: %v", err) + } + + msgSize := 65535 * 16 * 2 + msg := make([]byte, msgSize) + buf := make([]byte, msgSize+5) + buf[0] = byte(0) + binary.BigEndian.PutUint32(buf[1:], uint32(msgSize)) + copy(buf[5:], msg) + opts := Options{} + header := make([]byte, 5) + for i := 1; i <= 10; i++ { + if err := ct.Write(cstream, buf, nil, &opts); err != nil { + t.Fatalf("Error on client while writing message: %v", err) + } + if _, err := cstream.Read(header); err != nil { + t.Fatalf("Error on client while reading data frame header: %v", err) + } + sz := binary.BigEndian.Uint32(header[1:]) + recvMsg := make([]byte, int(sz)) + if _, err := cstream.Read(recvMsg); err != nil { + t.Fatalf("Error on client while reading data: %v", err) + } + if len(recvMsg) != len(msg) { + t.Fatalf("Length of message received by client: %v, want: %v", len(recvMsg), len(msg)) + } + } + var sstream *Stream + st.mu.Lock() + for _, v := range st.activeStreams { + sstream = v + } + st.mu.Unlock() + + waitWhileTrue(t, func() (bool, error) { + // Check that pendingData and delta on flow control windows on both sides are 0. + cstream.fc.mu.Lock() + if cstream.fc.delta != 0 { + cstream.fc.mu.Unlock() + return true, fmt.Errorf("delta on flow control window of client stream is non-zero") + } + if cstream.fc.pendingData != 0 { + cstream.fc.mu.Unlock() + return true, fmt.Errorf("pendingData on flow control window of client stream is non-zero") + } + cstream.fc.mu.Unlock() + sstream.fc.mu.Lock() + if sstream.fc.delta != 0 { + sstream.fc.mu.Unlock() + return true, fmt.Errorf("delta on flow control window of server stream is non-zero") + } + if sstream.fc.pendingData != 0 { + sstream.fc.mu.Unlock() + return true, fmt.Errorf("pendingData on flow control window of sercer stream is non-zero") + } + sstream.fc.mu.Unlock() + ct.fc.mu.Lock() + if ct.fc.delta != 0 { + ct.fc.mu.Unlock() + return true, fmt.Errorf("delta on flow control window of client transport is non-zero") + } + if ct.fc.pendingData != 0 { + ct.fc.mu.Unlock() + return true, fmt.Errorf("pendingData on flow control window of client transport is non-zero") + } + ct.fc.mu.Unlock() + st.fc.mu.Lock() + if st.fc.delta != 0 { + st.fc.mu.Unlock() + return true, fmt.Errorf("delta on flow control window of server transport is non-zero") + } + if st.fc.pendingData != 0 { + st.fc.mu.Unlock() + return true, fmt.Errorf("pendingData on flow control window of server transport is non-zero") + } + st.fc.mu.Unlock() + + // Check flow conrtrol window on client stream is equal to out flow on server stream. + ctx, cancel := context.WithTimeout(context.Background(), time.Second) + serverStreamSendQuota, err := wait(ctx, nil, nil, nil, sstream.sendQuotaPool.acquire()) + cancel() + if err != nil { + return true, fmt.Errorf("error while acquiring server stream send quota. Err: %v", err) + } + sstream.sendQuotaPool.add(serverStreamSendQuota) + cstream.fc.mu.Lock() + clientEst := cstream.fc.limit - cstream.fc.pendingUpdate + cstream.fc.mu.Unlock() + if uint32(serverStreamSendQuota) != clientEst { + return true, fmt.Errorf("server stream outflow: %v, estimated by client: %v", serverStreamSendQuota, clientEst) + } + + // Check flow control window on server stream is equal to out flow on client stream. + ctx, cancel = context.WithTimeout(context.Background(), time.Second) + clientStreamSendQuota, err := wait(ctx, nil, nil, nil, cstream.sendQuotaPool.acquire()) + cancel() + if err != nil { + return true, fmt.Errorf("error while acquiring client stream send quota. Err: %v", err) + } + cstream.sendQuotaPool.add(clientStreamSendQuota) + sstream.fc.mu.Lock() + serverEst := sstream.fc.limit - sstream.fc.pendingUpdate + sstream.fc.mu.Unlock() + if uint32(clientStreamSendQuota) != serverEst { + return true, fmt.Errorf("client stream outflow: %v. estimated by server: %v", clientStreamSendQuota, serverEst) + } + + // Check flow control window on client transport is equal to out flow of server transport. + ctx, cancel = context.WithTimeout(context.Background(), time.Second) + serverTrSendQuota, err := wait(ctx, nil, nil, nil, st.sendQuotaPool.acquire()) + cancel() + if err != nil { + return true, fmt.Errorf("error while acquring server transport send quota. Err: %v", err) + } + st.sendQuotaPool.add(serverTrSendQuota) + ct.fc.mu.Lock() + clientEst = ct.fc.limit - ct.fc.pendingUpdate + ct.fc.mu.Unlock() + if uint32(serverTrSendQuota) != clientEst { + return true, fmt.Errorf("server transport outflow: %v, estimated by client: %v", serverTrSendQuota, clientEst) + } + + // Check flow control window on server transport is equal to out flow of client transport. + ctx, cancel = context.WithTimeout(context.Background(), time.Second) + clientTrSendQuota, err := wait(ctx, nil, nil, nil, ct.sendQuotaPool.acquire()) + cancel() + if err != nil { + return true, fmt.Errorf("error while acquiring client transport send quota. Err: %v", err) + } + ct.sendQuotaPool.add(clientTrSendQuota) + st.fc.mu.Lock() + serverEst = st.fc.limit - st.fc.pendingUpdate + st.fc.mu.Unlock() + if uint32(clientTrSendQuota) != serverEst { + return true, fmt.Errorf("client transport outflow: %v, estimated by client: %v", clientTrSendQuota, serverEst) + } + + return false, nil + }) + +} + +func waitWhileTrue(t *testing.T, condition func() (bool, error)) { + var ( + wait bool + err error + ) + timer := time.NewTimer(time.Second * 5) + for { + wait, err = condition() + if wait { + select { + case <-timer.C: + t.Fatalf(err.Error()) + default: + time.Sleep(50 * time.Millisecond) + continue + } + } + if !timer.Stop() { + <-timer.C + } + break + } +} + +// A function of type writeHeaders writes out +// http status with the given stream ID using the given framer. +type writeHeaders func(*http2.Framer, uint32, int) error + +func writeOneHeader(framer *http2.Framer, sid uint32, httpStatus int) error { + var buf bytes.Buffer + henc := hpack.NewEncoder(&buf) + henc.WriteField(hpack.HeaderField{Name: ":status", Value: fmt.Sprint(httpStatus)}) + if err := framer.WriteHeaders(http2.HeadersFrameParam{ + StreamID: sid, + BlockFragment: buf.Bytes(), + EndStream: true, + EndHeaders: true, + }); err != nil { + return err + } + return nil +} + +func writeTwoHeaders(framer *http2.Framer, sid uint32, httpStatus int) error { + var buf bytes.Buffer + henc := hpack.NewEncoder(&buf) + henc.WriteField(hpack.HeaderField{ + Name: ":status", + Value: fmt.Sprint(http.StatusOK), + }) + if err := framer.WriteHeaders(http2.HeadersFrameParam{ + StreamID: sid, + BlockFragment: buf.Bytes(), + EndHeaders: true, + }); err != nil { + return err + } + buf.Reset() + henc.WriteField(hpack.HeaderField{ + Name: ":status", + Value: fmt.Sprint(httpStatus), + }) + if err := framer.WriteHeaders(http2.HeadersFrameParam{ + StreamID: sid, + BlockFragment: buf.Bytes(), + EndStream: true, + EndHeaders: true, + }); err != nil { + return err + } + return nil +} + +type httpServer struct { + conn net.Conn + httpStatus int + wh writeHeaders +} + +func (s *httpServer) start(t *testing.T, lis net.Listener) { + // Launch an HTTP server to send back header with httpStatus. + go func() { + var err error + s.conn, err = lis.Accept() + if err != nil { + t.Errorf("Error accepting connection: %v", err) + return + } + defer s.conn.Close() + // Read preface sent by client. + if _, err = io.ReadFull(s.conn, make([]byte, len(http2.ClientPreface))); err != nil { + t.Errorf("Error at server-side while reading preface from cleint. Err: %v", err) + return + } + reader := bufio.NewReaderSize(s.conn, http2IOBufSize) + writer := bufio.NewWriterSize(s.conn, http2IOBufSize) + framer := http2.NewFramer(writer, reader) + if err = framer.WriteSettingsAck(); err != nil { + t.Errorf("Error at server-side while sending Settings ack. Err: %v", err) + return + } + var sid uint32 + // Read frames until a header is received. + for { + frame, err := framer.ReadFrame() + if err != nil { + t.Errorf("Error at server-side while reading frame. Err: %v", err) + return + } + if hframe, ok := frame.(*http2.HeadersFrame); ok { + sid = hframe.Header().StreamID + break + } + } + if err = s.wh(framer, sid, s.httpStatus); err != nil { + t.Errorf("Error at server-side while writing headers. Err: %v", err) + return + } + writer.Flush() + }() +} + +func (s *httpServer) cleanUp() { + if s.conn != nil { + s.conn.Close() + } +} + +func setUpHTTPStatusTest(t *testing.T, httpStatus int, wh writeHeaders) (stream *Stream, cleanUp func()) { + var ( + err error + lis net.Listener + server *httpServer + client ClientTransport + ) + cleanUp = func() { + if lis != nil { + lis.Close() + } + if server != nil { + server.cleanUp() + } + if client != nil { + client.Close() + } + } + defer func() { + if err != nil { + cleanUp() + } + }() + lis, err = net.Listen("tcp", "localhost:0") + if err != nil { + t.Fatalf("Failed to listen. Err: %v", err) + } + server = &httpServer{ + httpStatus: httpStatus, + wh: wh, + } + server.start(t, lis) + client, err = newHTTP2Client(context.Background(), TargetInfo{Addr: lis.Addr().String()}, ConnectOptions{}) + if err != nil { + t.Fatalf("Error creating client. Err: %v", err) + } + stream, err = client.NewStream(context.Background(), &CallHdr{Method: "bogus/method", Flush: true}) + if err != nil { + t.Fatalf("Error creating stream at client-side. Err: %v", err) + } + return +} + +func TestHTTPToGRPCStatusMapping(t *testing.T) { + for k := range httpStatusConvTab { + testHTTPToGRPCStatusMapping(t, k, writeOneHeader) + } +} + +func testHTTPToGRPCStatusMapping(t *testing.T, httpStatus int, wh writeHeaders) { + stream, cleanUp := setUpHTTPStatusTest(t, httpStatus, wh) + defer cleanUp() + want := httpStatusConvTab[httpStatus] + buf := make([]byte, 8) + _, err := stream.Read(buf) + if err == nil { + t.Fatalf("Stream.Read(_) unexpectedly returned no error. Expected stream error with code %v", want) + } + serr, ok := err.(StreamError) + if !ok { + t.Fatalf("err.(Type) = %T, want StreamError", err) + } + if want != serr.Code { + t.Fatalf("Want error code: %v, got: %v", want, serr.Code) + } +} + +func TestHTTPStatusOKAndMissingGRPCStatus(t *testing.T) { + stream, cleanUp := setUpHTTPStatusTest(t, http.StatusOK, writeOneHeader) + defer cleanUp() + buf := make([]byte, 8) + _, err := stream.Read(buf) + if err != io.EOF { + t.Fatalf("stream.Read(_) = _, %v, want _, io.EOF", err) + } + want := codes.Unknown + stream.mu.Lock() + defer stream.mu.Unlock() + if stream.status.Code() != want { + t.Fatalf("Status code of stream: %v, want: %v", stream.status.Code(), want) + } +} + +func TestHTTPStatusNottOKAndMissingGRPCStatusInSecondHeader(t *testing.T) { + testHTTPToGRPCStatusMapping(t, http.StatusUnauthorized, writeTwoHeaders) +} + +// If any error occurs on a call to Stream.Read, future calls +// should continue to return that same error. +func TestReadGivesSameErrorAfterAnyErrorOccurs(t *testing.T) { + testRecvBuffer := newRecvBuffer() + s := &Stream{ + ctx: context.Background(), + goAway: make(chan struct{}), + buf: testRecvBuffer, + requestRead: func(int) {}, + } + s.trReader = &transportReader{ + reader: &recvBufferReader{ + ctx: s.ctx, + goAway: s.goAway, + recv: s.buf, + }, + windowHandler: func(int) {}, + } + testData := make([]byte, 1) + testData[0] = 5 + testErr := errors.New("test error") + s.write(recvMsg{data: testData, err: testErr}) + + inBuf := make([]byte, 1) + actualCount, actualErr := s.Read(inBuf) + if actualCount != 0 { + t.Errorf("actualCount, _ := s.Read(_) differs; want 0; got %v", actualCount) + } + if actualErr.Error() != testErr.Error() { + t.Errorf("_ , actualErr := s.Read(_) differs; want actualErr.Error() to be %v; got %v", testErr.Error(), actualErr.Error()) + } + + s.write(recvMsg{data: testData, err: nil}) + s.write(recvMsg{data: testData, err: errors.New("different error from first")}) + + for i := 0; i < 2; i++ { + inBuf := make([]byte, 1) + actualCount, actualErr := s.Read(inBuf) + if actualCount != 0 { + t.Errorf("actualCount, _ := s.Read(_) differs; want %v; got %v", 0, actualCount) + } + if actualErr.Error() != testErr.Error() { + t.Errorf("_ , actualErr := s.Read(_) differs; want actualErr.Error() to be %v; got %v", testErr.Error(), actualErr.Error()) + } + } +} diff --git a/vendor/google.golang.org/grpc/vet.sh b/vendor/google.golang.org/grpc/vet.sh new file mode 100755 index 000000000..e18fb2908 --- /dev/null +++ b/vendor/google.golang.org/grpc/vet.sh @@ -0,0 +1,74 @@ +#!/bin/bash + +set -ex # Exit on error; debugging enabled. +set -o pipefail # Fail a pipe if any sub-command fails. + +die() { + echo "$@" >&2 + exit 1 +} + +# TODO: Remove this check and the mangling below once "context" is imported +# directly. +if git status --porcelain | read; then + die "Uncommitted or untracked files found; commit changes first" +fi +# Undo any edits made by this script. +cleanup() { + git reset --hard HEAD +} +trap cleanup EXIT + +# Check proto in manual runs or cron runs. +if [[ "$TRAVIS" != "true" || "$TRAVIS_EVENT_TYPE" = "cron" ]]; then + check_proto="true" +fi + +if [ "$1" = "-install" ]; then + go get -d \ + google.golang.org/grpc/... + go get -u \ + github.com/golang/lint/golint \ + golang.org/x/tools/cmd/goimports \ + honnef.co/go/tools/cmd/staticcheck \ + github.com/golang/protobuf/protoc-gen-go \ + golang.org/x/tools/cmd/stringer + if [[ "$check_proto" = "true" ]]; then + if [[ "$TRAVIS" = "true" ]]; then + PROTOBUF_VERSION=3.3.0 + cd /home/travis + wget https://github.com/google/protobuf/releases/download/v$PROTOBUF_VERSION/$basename-linux-x86_64.zip + unzip $basename-linux-x86_64.zip + bin/protoc --version + elif ! which protoc > /dev/null; then + die "Please install protoc into your path" + fi + fi + exit 0 +elif [[ "$#" -ne 0 ]]; then + die "Unknown argument(s): $*" +fi + +git ls-files "*.go" | xargs grep -L "\(Copyright [0-9]\{4,\} gRPC authors\)\|DO NOT EDIT" 2>&1 | tee /dev/stderr | (! read) +gofmt -s -d -l . 2>&1 | tee /dev/stderr | (! read) +goimports -l . 2>&1 | tee /dev/stderr | (! read) +golint ./... 2>&1 | (grep -vE "(_mock|_string|\.pb)\.go:" || true) | tee /dev/stderr | (! read) + +# Rewrite golang.org/x/net/context -> context imports (see grpc/grpc-go#1484). +# TODO: Remove this mangling once "context" is imported directly (grpc/grpc-go#711). +git ls-files "*.go" | xargs sed -i 's:"golang.org/x/net/context":"context":' +set +o pipefail +# TODO: Stop filtering pb.go files once golang/protobuf#214 is fixed. +# TODO: Remove clientconn exception once go1.6 support is removed. +go tool vet -all . 2>&1 | grep -vE 'clientconn.go:.*cancel' | grep -vF '.pb.go:' | tee /dev/stderr | (! read) +set -o pipefail +git reset --hard HEAD + +if [[ "$check_proto" = "true" ]]; then + PATH=/home/travis/bin:$PATH make proto && \ + git status --porcelain 2>&1 | (! read) || \ + (git status; git --no-pager diff; exit 1) +fi + +# TODO(menghanl): fix errors in transport_test. +staticcheck -ignore google.golang.org/grpc/transport/transport_test.go:SA2002 ./... diff --git a/vendor/gopkg.in/fsnotify.v1/example_test.go b/vendor/gopkg.in/fsnotify.v1/example_test.go new file mode 100644 index 000000000..700502cb3 --- /dev/null +++ b/vendor/gopkg.in/fsnotify.v1/example_test.go @@ -0,0 +1,42 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !plan9 + +package fsnotify_test + +import ( + "log" + + "github.com/fsnotify/fsnotify" +) + +func ExampleNewWatcher() { + watcher, err := fsnotify.NewWatcher() + if err != nil { + log.Fatal(err) + } + defer watcher.Close() + + done := make(chan bool) + go func() { + for { + select { + case event := <-watcher.Events: + log.Println("event:", event) + if event.Op&fsnotify.Write == fsnotify.Write { + log.Println("modified file:", event.Name) + } + case err := <-watcher.Errors: + log.Println("error:", err) + } + } + }() + + err = watcher.Add("/tmp/foo") + if err != nil { + log.Fatal(err) + } + <-done +} diff --git a/vendor/gopkg.in/fsnotify.v1/fsnotify_test.go b/vendor/gopkg.in/fsnotify.v1/fsnotify_test.go new file mode 100644 index 000000000..9d6d72afc --- /dev/null +++ b/vendor/gopkg.in/fsnotify.v1/fsnotify_test.go @@ -0,0 +1,40 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !plan9 + +package fsnotify + +import "testing" + +func TestEventStringWithValue(t *testing.T) { + for opMask, expectedString := range map[Op]string{ + Chmod | Create: `"/usr/someFile": CREATE|CHMOD`, + Rename: `"/usr/someFile": RENAME`, + Remove: `"/usr/someFile": REMOVE`, + Write | Chmod: `"/usr/someFile": WRITE|CHMOD`, + } { + event := Event{Name: "/usr/someFile", Op: opMask} + if event.String() != expectedString { + t.Fatalf("Expected %s, got: %v", expectedString, event.String()) + } + + } +} + +func TestEventOpStringWithValue(t *testing.T) { + expectedOpString := "WRITE|CHMOD" + event := Event{Name: "someFile", Op: Write | Chmod} + if event.Op.String() != expectedOpString { + t.Fatalf("Expected %s, got: %v", expectedOpString, event.Op.String()) + } +} + +func TestEventOpStringWithNoValue(t *testing.T) { + expectedOpString := "" + event := Event{Name: "testFile", Op: 0} + if event.Op.String() != expectedOpString { + t.Fatalf("Expected %s, got: %v", expectedOpString, event.Op.String()) + } +} diff --git a/vendor/gopkg.in/fsnotify.v1/inotify_poller_test.go b/vendor/gopkg.in/fsnotify.v1/inotify_poller_test.go new file mode 100644 index 000000000..26623efef --- /dev/null +++ b/vendor/gopkg.in/fsnotify.v1/inotify_poller_test.go @@ -0,0 +1,229 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build linux + +package fsnotify + +import ( + "testing" + "time" + + "golang.org/x/sys/unix" +) + +type testFd [2]int + +func makeTestFd(t *testing.T) testFd { + var tfd testFd + errno := unix.Pipe(tfd[:]) + if errno != nil { + t.Fatalf("Failed to create pipe: %v", errno) + } + return tfd +} + +func (tfd testFd) fd() int { + return tfd[0] +} + +func (tfd testFd) closeWrite(t *testing.T) { + errno := unix.Close(tfd[1]) + if errno != nil { + t.Fatalf("Failed to close write end of pipe: %v", errno) + } +} + +func (tfd testFd) put(t *testing.T) { + buf := make([]byte, 10) + _, errno := unix.Write(tfd[1], buf) + if errno != nil { + t.Fatalf("Failed to write to pipe: %v", errno) + } +} + +func (tfd testFd) get(t *testing.T) { + buf := make([]byte, 10) + _, errno := unix.Read(tfd[0], buf) + if errno != nil { + t.Fatalf("Failed to read from pipe: %v", errno) + } +} + +func (tfd testFd) close() { + unix.Close(tfd[1]) + unix.Close(tfd[0]) +} + +func makePoller(t *testing.T) (testFd, *fdPoller) { + tfd := makeTestFd(t) + poller, err := newFdPoller(tfd.fd()) + if err != nil { + t.Fatalf("Failed to create poller: %v", err) + } + return tfd, poller +} + +func TestPollerWithBadFd(t *testing.T) { + _, err := newFdPoller(-1) + if err != unix.EBADF { + t.Fatalf("Expected EBADF, got: %v", err) + } +} + +func TestPollerWithData(t *testing.T) { + tfd, poller := makePoller(t) + defer tfd.close() + defer poller.close() + + tfd.put(t) + ok, err := poller.wait() + if err != nil { + t.Fatalf("poller failed: %v", err) + } + if !ok { + t.Fatalf("expected poller to return true") + } + tfd.get(t) +} + +func TestPollerWithWakeup(t *testing.T) { + tfd, poller := makePoller(t) + defer tfd.close() + defer poller.close() + + err := poller.wake() + if err != nil { + t.Fatalf("wake failed: %v", err) + } + ok, err := poller.wait() + if err != nil { + t.Fatalf("poller failed: %v", err) + } + if ok { + t.Fatalf("expected poller to return false") + } +} + +func TestPollerWithClose(t *testing.T) { + tfd, poller := makePoller(t) + defer tfd.close() + defer poller.close() + + tfd.closeWrite(t) + ok, err := poller.wait() + if err != nil { + t.Fatalf("poller failed: %v", err) + } + if !ok { + t.Fatalf("expected poller to return true") + } +} + +func TestPollerWithWakeupAndData(t *testing.T) { + tfd, poller := makePoller(t) + defer tfd.close() + defer poller.close() + + tfd.put(t) + err := poller.wake() + if err != nil { + t.Fatalf("wake failed: %v", err) + } + + // both data and wakeup + ok, err := poller.wait() + if err != nil { + t.Fatalf("poller failed: %v", err) + } + if !ok { + t.Fatalf("expected poller to return true") + } + + // data is still in the buffer, wakeup is cleared + ok, err = poller.wait() + if err != nil { + t.Fatalf("poller failed: %v", err) + } + if !ok { + t.Fatalf("expected poller to return true") + } + + tfd.get(t) + // data is gone, only wakeup now + err = poller.wake() + if err != nil { + t.Fatalf("wake failed: %v", err) + } + ok, err = poller.wait() + if err != nil { + t.Fatalf("poller failed: %v", err) + } + if ok { + t.Fatalf("expected poller to return false") + } +} + +func TestPollerConcurrent(t *testing.T) { + tfd, poller := makePoller(t) + defer tfd.close() + defer poller.close() + + oks := make(chan bool) + live := make(chan bool) + defer close(live) + go func() { + defer close(oks) + for { + ok, err := poller.wait() + if err != nil { + t.Fatalf("poller failed: %v", err) + } + oks <- ok + if !<-live { + return + } + } + }() + + // Try a write + select { + case <-time.After(50 * time.Millisecond): + case <-oks: + t.Fatalf("poller did not wait") + } + tfd.put(t) + if !<-oks { + t.Fatalf("expected true") + } + tfd.get(t) + live <- true + + // Try a wakeup + select { + case <-time.After(50 * time.Millisecond): + case <-oks: + t.Fatalf("poller did not wait") + } + err := poller.wake() + if err != nil { + t.Fatalf("wake failed: %v", err) + } + if <-oks { + t.Fatalf("expected false") + } + live <- true + + // Try a close + select { + case <-time.After(50 * time.Millisecond): + case <-oks: + t.Fatalf("poller did not wait") + } + tfd.closeWrite(t) + if !<-oks { + t.Fatalf("expected true") + } + tfd.get(t) +} diff --git a/vendor/gopkg.in/fsnotify.v1/inotify_test.go b/vendor/gopkg.in/fsnotify.v1/inotify_test.go new file mode 100644 index 000000000..a4bb202d1 --- /dev/null +++ b/vendor/gopkg.in/fsnotify.v1/inotify_test.go @@ -0,0 +1,360 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build linux + +package fsnotify + +import ( + "fmt" + "os" + "path/filepath" + "strings" + "testing" + "time" +) + +func TestInotifyCloseRightAway(t *testing.T) { + w, err := NewWatcher() + if err != nil { + t.Fatalf("Failed to create watcher") + } + + // Close immediately; it won't even reach the first unix.Read. + w.Close() + + // Wait for the close to complete. + <-time.After(50 * time.Millisecond) + isWatcherReallyClosed(t, w) +} + +func TestInotifyCloseSlightlyLater(t *testing.T) { + w, err := NewWatcher() + if err != nil { + t.Fatalf("Failed to create watcher") + } + + // Wait until readEvents has reached unix.Read, and Close. + <-time.After(50 * time.Millisecond) + w.Close() + + // Wait for the close to complete. + <-time.After(50 * time.Millisecond) + isWatcherReallyClosed(t, w) +} + +func TestInotifyCloseSlightlyLaterWithWatch(t *testing.T) { + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + w, err := NewWatcher() + if err != nil { + t.Fatalf("Failed to create watcher") + } + w.Add(testDir) + + // Wait until readEvents has reached unix.Read, and Close. + <-time.After(50 * time.Millisecond) + w.Close() + + // Wait for the close to complete. + <-time.After(50 * time.Millisecond) + isWatcherReallyClosed(t, w) +} + +func TestInotifyCloseAfterRead(t *testing.T) { + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + w, err := NewWatcher() + if err != nil { + t.Fatalf("Failed to create watcher") + } + + err = w.Add(testDir) + if err != nil { + t.Fatalf("Failed to add .") + } + + // Generate an event. + os.Create(filepath.Join(testDir, "somethingSOMETHINGsomethingSOMETHING")) + + // Wait for readEvents to read the event, then close the watcher. + <-time.After(50 * time.Millisecond) + w.Close() + + // Wait for the close to complete. + <-time.After(50 * time.Millisecond) + isWatcherReallyClosed(t, w) +} + +func isWatcherReallyClosed(t *testing.T, w *Watcher) { + select { + case err, ok := <-w.Errors: + if ok { + t.Fatalf("w.Errors is not closed; readEvents is still alive after closing (error: %v)", err) + } + default: + t.Fatalf("w.Errors would have blocked; readEvents is still alive!") + } + + select { + case _, ok := <-w.Events: + if ok { + t.Fatalf("w.Events is not closed; readEvents is still alive after closing") + } + default: + t.Fatalf("w.Events would have blocked; readEvents is still alive!") + } +} + +func TestInotifyCloseCreate(t *testing.T) { + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + w, err := NewWatcher() + if err != nil { + t.Fatalf("Failed to create watcher: %v", err) + } + defer w.Close() + + err = w.Add(testDir) + if err != nil { + t.Fatalf("Failed to add testDir: %v", err) + } + h, err := os.Create(filepath.Join(testDir, "testfile")) + if err != nil { + t.Fatalf("Failed to create file in testdir: %v", err) + } + h.Close() + select { + case _ = <-w.Events: + case err := <-w.Errors: + t.Fatalf("Error from watcher: %v", err) + case <-time.After(50 * time.Millisecond): + t.Fatalf("Took too long to wait for event") + } + + // At this point, we've received one event, so the goroutine is ready. + // It's also blocking on unix.Read. + // Now we try to swap the file descriptor under its nose. + w.Close() + w, err = NewWatcher() + defer w.Close() + if err != nil { + t.Fatalf("Failed to create second watcher: %v", err) + } + + <-time.After(50 * time.Millisecond) + err = w.Add(testDir) + if err != nil { + t.Fatalf("Error adding testDir again: %v", err) + } +} + +// This test verifies the watcher can keep up with file creations/deletions +// when under load. +func TestInotifyStress(t *testing.T) { + maxNumToCreate := 1000 + + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + testFilePrefix := filepath.Join(testDir, "testfile") + + w, err := NewWatcher() + if err != nil { + t.Fatalf("Failed to create watcher: %v", err) + } + defer w.Close() + + err = w.Add(testDir) + if err != nil { + t.Fatalf("Failed to add testDir: %v", err) + } + + doneChan := make(chan struct{}) + // The buffer ensures that the file generation goroutine is never blocked. + errChan := make(chan error, 2*maxNumToCreate) + + go func() { + for i := 0; i < maxNumToCreate; i++ { + testFile := fmt.Sprintf("%s%d", testFilePrefix, i) + + handle, err := os.Create(testFile) + if err != nil { + errChan <- fmt.Errorf("Create failed: %v", err) + continue + } + + err = handle.Close() + if err != nil { + errChan <- fmt.Errorf("Close failed: %v", err) + continue + } + } + + // If we delete a newly created file too quickly, inotify will skip the + // create event and only send the delete event. + time.Sleep(100 * time.Millisecond) + + for i := 0; i < maxNumToCreate; i++ { + testFile := fmt.Sprintf("%s%d", testFilePrefix, i) + err = os.Remove(testFile) + if err != nil { + errChan <- fmt.Errorf("Remove failed: %v", err) + } + } + + close(doneChan) + }() + + creates := 0 + removes := 0 + + finished := false + after := time.After(10 * time.Second) + for !finished { + select { + case <-after: + t.Fatalf("Not done") + case <-doneChan: + finished = true + case err := <-errChan: + t.Fatalf("Got an error from file creator goroutine: %v", err) + case err := <-w.Errors: + t.Fatalf("Got an error from watcher: %v", err) + case evt := <-w.Events: + if !strings.HasPrefix(evt.Name, testFilePrefix) { + t.Fatalf("Got an event for an unknown file: %s", evt.Name) + } + if evt.Op == Create { + creates++ + } + if evt.Op == Remove { + removes++ + } + } + } + + // Drain remaining events from channels + count := 0 + for count < 10 { + select { + case err := <-errChan: + t.Fatalf("Got an error from file creator goroutine: %v", err) + case err := <-w.Errors: + t.Fatalf("Got an error from watcher: %v", err) + case evt := <-w.Events: + if !strings.HasPrefix(evt.Name, testFilePrefix) { + t.Fatalf("Got an event for an unknown file: %s", evt.Name) + } + if evt.Op == Create { + creates++ + } + if evt.Op == Remove { + removes++ + } + count = 0 + default: + count++ + // Give the watcher chances to fill the channels. + time.Sleep(time.Millisecond) + } + } + + if creates-removes > 1 || creates-removes < -1 { + t.Fatalf("Creates and removes should not be off by more than one: %d creates, %d removes", creates, removes) + } + if creates < 50 { + t.Fatalf("Expected at least 50 creates, got %d", creates) + } +} + +func TestInotifyRemoveTwice(t *testing.T) { + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + testFile := filepath.Join(testDir, "testfile") + + handle, err := os.Create(testFile) + if err != nil { + t.Fatalf("Create failed: %v", err) + } + handle.Close() + + w, err := NewWatcher() + if err != nil { + t.Fatalf("Failed to create watcher: %v", err) + } + defer w.Close() + + err = w.Add(testFile) + if err != nil { + t.Fatalf("Failed to add testFile: %v", err) + } + + err = os.Remove(testFile) + if err != nil { + t.Fatalf("Failed to remove testFile: %v", err) + } + + err = w.Remove(testFile) + if err == nil { + t.Fatalf("no error on removing invalid file") + } + s1 := fmt.Sprintf("%s", err) + + err = w.Remove(testFile) + if err == nil { + t.Fatalf("no error on removing invalid file") + } + s2 := fmt.Sprintf("%s", err) + + if s1 != s2 { + t.Fatalf("receive different error - %s / %s", s1, s2) + } +} + +func TestInotifyInnerMapLength(t *testing.T) { + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + testFile := filepath.Join(testDir, "testfile") + + handle, err := os.Create(testFile) + if err != nil { + t.Fatalf("Create failed: %v", err) + } + handle.Close() + + w, err := NewWatcher() + if err != nil { + t.Fatalf("Failed to create watcher: %v", err) + } + defer w.Close() + + err = w.Add(testFile) + if err != nil { + t.Fatalf("Failed to add testFile: %v", err) + } + go func() { + for err := range w.Errors { + t.Fatalf("error received: %s", err) + } + }() + + err = os.Remove(testFile) + if err != nil { + t.Fatalf("Failed to remove testFile: %v", err) + } + _ = <-w.Events // consume Remove event + <-time.After(50 * time.Millisecond) // wait IN_IGNORE propagated + + w.mu.Lock() + defer w.mu.Unlock() + if len(w.watches) != 0 { + t.Fatalf("Expected watches len is 0, but got: %d, %v", len(w.watches), w.watches) + } + if len(w.paths) != 0 { + t.Fatalf("Expected paths len is 0, but got: %d, %v", len(w.paths), w.paths) + } +} diff --git a/vendor/gopkg.in/fsnotify.v1/integration_darwin_test.go b/vendor/gopkg.in/fsnotify.v1/integration_darwin_test.go new file mode 100644 index 000000000..5564554f7 --- /dev/null +++ b/vendor/gopkg.in/fsnotify.v1/integration_darwin_test.go @@ -0,0 +1,147 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package fsnotify + +import ( + "os" + "path/filepath" + "testing" + "time" + + "golang.org/x/sys/unix" +) + +// testExchangedataForWatcher tests the watcher with the exchangedata operation on OS X. +// +// This is widely used for atomic saves on OS X, e.g. TextMate and in Apple's NSDocument. +// +// See https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man2/exchangedata.2.html +// Also see: https://github.com/textmate/textmate/blob/cd016be29489eba5f3c09b7b70b06da134dda550/Frameworks/io/src/swap_file_data.cc#L20 +func testExchangedataForWatcher(t *testing.T, watchDir bool) { + // Create directory to watch + testDir1 := tempMkdir(t) + + // For the intermediate file + testDir2 := tempMkdir(t) + + defer os.RemoveAll(testDir1) + defer os.RemoveAll(testDir2) + + resolvedFilename := "TestFsnotifyEvents.file" + + // TextMate does: + // + // 1. exchangedata (intermediate, resolved) + // 2. unlink intermediate + // + // Let's try to simulate that: + resolved := filepath.Join(testDir1, resolvedFilename) + intermediate := filepath.Join(testDir2, resolvedFilename+"~") + + // Make sure we create the file before we start watching + createAndSyncFile(t, resolved) + + watcher := newWatcher(t) + + // Test both variants in isolation + if watchDir { + addWatch(t, watcher, testDir1) + } else { + addWatch(t, watcher, resolved) + } + + // Receive errors on the error channel on a separate goroutine + go func() { + for err := range watcher.Errors { + t.Fatalf("error received: %s", err) + } + }() + + // Receive events on the event channel on a separate goroutine + eventstream := watcher.Events + var removeReceived counter + var createReceived counter + + done := make(chan bool) + + go func() { + for event := range eventstream { + // Only count relevant events + if event.Name == filepath.Clean(resolved) { + if event.Op&Remove == Remove { + removeReceived.increment() + } + if event.Op&Create == Create { + createReceived.increment() + } + } + t.Logf("event received: %s", event) + } + done <- true + }() + + // Repeat to make sure the watched file/directory "survives" the REMOVE/CREATE loop. + for i := 1; i <= 3; i++ { + // The intermediate file is created in a folder outside the watcher + createAndSyncFile(t, intermediate) + + // 1. Swap + if err := unix.Exchangedata(intermediate, resolved, 0); err != nil { + t.Fatalf("[%d] exchangedata failed: %s", i, err) + } + + time.Sleep(50 * time.Millisecond) + + // 2. Delete the intermediate file + err := os.Remove(intermediate) + + if err != nil { + t.Fatalf("[%d] remove %s failed: %s", i, intermediate, err) + } + + time.Sleep(50 * time.Millisecond) + + } + + // We expect this event to be received almost immediately, but let's wait 500 ms to be sure + time.Sleep(500 * time.Millisecond) + + // The events will be (CHMOD + REMOVE + CREATE) X 2. Let's focus on the last two: + if removeReceived.value() < 3 { + t.Fatal("fsnotify remove events have not been received after 500 ms") + } + + if createReceived.value() < 3 { + t.Fatal("fsnotify create events have not been received after 500 ms") + } + + watcher.Close() + t.Log("waiting for the event channel to become closed...") + select { + case <-done: + t.Log("event channel closed") + case <-time.After(2 * time.Second): + t.Fatal("event stream was not closed after 2 seconds") + } +} + +// TestExchangedataInWatchedDir test exchangedata operation on file in watched dir. +func TestExchangedataInWatchedDir(t *testing.T) { + testExchangedataForWatcher(t, true) +} + +// TestExchangedataInWatchedDir test exchangedata operation on watched file. +func TestExchangedataInWatchedFile(t *testing.T) { + testExchangedataForWatcher(t, false) +} + +func createAndSyncFile(t *testing.T, filepath string) { + f1, err := os.OpenFile(filepath, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating %s failed: %s", filepath, err) + } + f1.Sync() + f1.Close() +} diff --git a/vendor/gopkg.in/fsnotify.v1/integration_test.go b/vendor/gopkg.in/fsnotify.v1/integration_test.go new file mode 100644 index 000000000..8b7e9d3ec --- /dev/null +++ b/vendor/gopkg.in/fsnotify.v1/integration_test.go @@ -0,0 +1,1237 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !plan9,!solaris + +package fsnotify + +import ( + "io/ioutil" + "os" + "os/exec" + "path" + "path/filepath" + "runtime" + "sync/atomic" + "testing" + "time" +) + +// An atomic counter +type counter struct { + val int32 +} + +func (c *counter) increment() { + atomic.AddInt32(&c.val, 1) +} + +func (c *counter) value() int32 { + return atomic.LoadInt32(&c.val) +} + +func (c *counter) reset() { + atomic.StoreInt32(&c.val, 0) +} + +// tempMkdir makes a temporary directory +func tempMkdir(t *testing.T) string { + dir, err := ioutil.TempDir("", "fsnotify") + if err != nil { + t.Fatalf("failed to create test directory: %s", err) + } + return dir +} + +// tempMkFile makes a temporary file. +func tempMkFile(t *testing.T, dir string) string { + f, err := ioutil.TempFile(dir, "fsnotify") + if err != nil { + t.Fatalf("failed to create test file: %v", err) + } + defer f.Close() + return f.Name() +} + +// newWatcher initializes an fsnotify Watcher instance. +func newWatcher(t *testing.T) *Watcher { + watcher, err := NewWatcher() + if err != nil { + t.Fatalf("NewWatcher() failed: %s", err) + } + return watcher +} + +// addWatch adds a watch for a directory +func addWatch(t *testing.T, watcher *Watcher, dir string) { + if err := watcher.Add(dir); err != nil { + t.Fatalf("watcher.Add(%q) failed: %s", dir, err) + } +} + +func TestFsnotifyMultipleOperations(t *testing.T) { + watcher := newWatcher(t) + + // Receive errors on the error channel on a separate goroutine + go func() { + for err := range watcher.Errors { + t.Fatalf("error received: %s", err) + } + }() + + // Create directory to watch + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + // Create directory that's not watched + testDirToMoveFiles := tempMkdir(t) + defer os.RemoveAll(testDirToMoveFiles) + + testFile := filepath.Join(testDir, "TestFsnotifySeq.testfile") + testFileRenamed := filepath.Join(testDirToMoveFiles, "TestFsnotifySeqRename.testfile") + + addWatch(t, watcher, testDir) + + // Receive events on the event channel on a separate goroutine + eventstream := watcher.Events + var createReceived, modifyReceived, deleteReceived, renameReceived counter + done := make(chan bool) + go func() { + for event := range eventstream { + // Only count relevant events + if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFile) { + t.Logf("event received: %s", event) + if event.Op&Remove == Remove { + deleteReceived.increment() + } + if event.Op&Write == Write { + modifyReceived.increment() + } + if event.Op&Create == Create { + createReceived.increment() + } + if event.Op&Rename == Rename { + renameReceived.increment() + } + } else { + t.Logf("unexpected event received: %s", event) + } + } + done <- true + }() + + // Create a file + // This should add at least one event to the fsnotify event queue + var f *os.File + f, err := os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Sync() + + time.Sleep(time.Millisecond) + f.WriteString("data") + f.Sync() + f.Close() + + time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete + + if err := testRename(testFile, testFileRenamed); err != nil { + t.Fatalf("rename failed: %s", err) + } + + // Modify the file outside of the watched dir + f, err = os.Open(testFileRenamed) + if err != nil { + t.Fatalf("open test renamed file failed: %s", err) + } + f.WriteString("data") + f.Sync() + f.Close() + + time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete + + // Recreate the file that was moved + f, err = os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Close() + time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete + + // We expect this event to be received almost immediately, but let's wait 500 ms to be sure + time.Sleep(500 * time.Millisecond) + cReceived := createReceived.value() + if cReceived != 2 { + t.Fatalf("incorrect number of create events received after 500 ms (%d vs %d)", cReceived, 2) + } + mReceived := modifyReceived.value() + if mReceived != 1 { + t.Fatalf("incorrect number of modify events received after 500 ms (%d vs %d)", mReceived, 1) + } + dReceived := deleteReceived.value() + rReceived := renameReceived.value() + if dReceived+rReceived != 1 { + t.Fatalf("incorrect number of rename+delete events received after 500 ms (%d vs %d)", rReceived+dReceived, 1) + } + + // Try closing the fsnotify instance + t.Log("calling Close()") + watcher.Close() + t.Log("waiting for the event channel to become closed...") + select { + case <-done: + t.Log("event channel closed") + case <-time.After(2 * time.Second): + t.Fatal("event stream was not closed after 2 seconds") + } +} + +func TestFsnotifyMultipleCreates(t *testing.T) { + watcher := newWatcher(t) + + // Receive errors on the error channel on a separate goroutine + go func() { + for err := range watcher.Errors { + t.Fatalf("error received: %s", err) + } + }() + + // Create directory to watch + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + testFile := filepath.Join(testDir, "TestFsnotifySeq.testfile") + + addWatch(t, watcher, testDir) + + // Receive events on the event channel on a separate goroutine + eventstream := watcher.Events + var createReceived, modifyReceived, deleteReceived counter + done := make(chan bool) + go func() { + for event := range eventstream { + // Only count relevant events + if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFile) { + t.Logf("event received: %s", event) + if event.Op&Remove == Remove { + deleteReceived.increment() + } + if event.Op&Create == Create { + createReceived.increment() + } + if event.Op&Write == Write { + modifyReceived.increment() + } + } else { + t.Logf("unexpected event received: %s", event) + } + } + done <- true + }() + + // Create a file + // This should add at least one event to the fsnotify event queue + var f *os.File + f, err := os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Sync() + + time.Sleep(time.Millisecond) + f.WriteString("data") + f.Sync() + f.Close() + + time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete + + os.Remove(testFile) + + time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete + + // Recreate the file + f, err = os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Close() + time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete + + // Modify + f, err = os.OpenFile(testFile, os.O_WRONLY, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Sync() + + time.Sleep(time.Millisecond) + f.WriteString("data") + f.Sync() + f.Close() + + time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete + + // Modify + f, err = os.OpenFile(testFile, os.O_WRONLY, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Sync() + + time.Sleep(time.Millisecond) + f.WriteString("data") + f.Sync() + f.Close() + + time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete + + // We expect this event to be received almost immediately, but let's wait 500 ms to be sure + time.Sleep(500 * time.Millisecond) + cReceived := createReceived.value() + if cReceived != 2 { + t.Fatalf("incorrect number of create events received after 500 ms (%d vs %d)", cReceived, 2) + } + mReceived := modifyReceived.value() + if mReceived < 3 { + t.Fatalf("incorrect number of modify events received after 500 ms (%d vs atleast %d)", mReceived, 3) + } + dReceived := deleteReceived.value() + if dReceived != 1 { + t.Fatalf("incorrect number of rename+delete events received after 500 ms (%d vs %d)", dReceived, 1) + } + + // Try closing the fsnotify instance + t.Log("calling Close()") + watcher.Close() + t.Log("waiting for the event channel to become closed...") + select { + case <-done: + t.Log("event channel closed") + case <-time.After(2 * time.Second): + t.Fatal("event stream was not closed after 2 seconds") + } +} + +func TestFsnotifyDirOnly(t *testing.T) { + watcher := newWatcher(t) + + // Create directory to watch + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + // Create a file before watching directory + // This should NOT add any events to the fsnotify event queue + testFileAlreadyExists := filepath.Join(testDir, "TestFsnotifyEventsExisting.testfile") + { + var f *os.File + f, err := os.OpenFile(testFileAlreadyExists, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Sync() + f.Close() + } + + addWatch(t, watcher, testDir) + + // Receive errors on the error channel on a separate goroutine + go func() { + for err := range watcher.Errors { + t.Fatalf("error received: %s", err) + } + }() + + testFile := filepath.Join(testDir, "TestFsnotifyDirOnly.testfile") + + // Receive events on the event channel on a separate goroutine + eventstream := watcher.Events + var createReceived, modifyReceived, deleteReceived counter + done := make(chan bool) + go func() { + for event := range eventstream { + // Only count relevant events + if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFile) || event.Name == filepath.Clean(testFileAlreadyExists) { + t.Logf("event received: %s", event) + if event.Op&Remove == Remove { + deleteReceived.increment() + } + if event.Op&Write == Write { + modifyReceived.increment() + } + if event.Op&Create == Create { + createReceived.increment() + } + } else { + t.Logf("unexpected event received: %s", event) + } + } + done <- true + }() + + // Create a file + // This should add at least one event to the fsnotify event queue + var f *os.File + f, err := os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Sync() + + time.Sleep(time.Millisecond) + f.WriteString("data") + f.Sync() + f.Close() + + time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete + + os.Remove(testFile) + os.Remove(testFileAlreadyExists) + + // We expect this event to be received almost immediately, but let's wait 500 ms to be sure + time.Sleep(500 * time.Millisecond) + cReceived := createReceived.value() + if cReceived != 1 { + t.Fatalf("incorrect number of create events received after 500 ms (%d vs %d)", cReceived, 1) + } + mReceived := modifyReceived.value() + if mReceived != 1 { + t.Fatalf("incorrect number of modify events received after 500 ms (%d vs %d)", mReceived, 1) + } + dReceived := deleteReceived.value() + if dReceived != 2 { + t.Fatalf("incorrect number of delete events received after 500 ms (%d vs %d)", dReceived, 2) + } + + // Try closing the fsnotify instance + t.Log("calling Close()") + watcher.Close() + t.Log("waiting for the event channel to become closed...") + select { + case <-done: + t.Log("event channel closed") + case <-time.After(2 * time.Second): + t.Fatal("event stream was not closed after 2 seconds") + } +} + +func TestFsnotifyDeleteWatchedDir(t *testing.T) { + watcher := newWatcher(t) + defer watcher.Close() + + // Create directory to watch + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + // Create a file before watching directory + testFileAlreadyExists := filepath.Join(testDir, "TestFsnotifyEventsExisting.testfile") + { + var f *os.File + f, err := os.OpenFile(testFileAlreadyExists, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Sync() + f.Close() + } + + addWatch(t, watcher, testDir) + + // Add a watch for testFile + addWatch(t, watcher, testFileAlreadyExists) + + // Receive errors on the error channel on a separate goroutine + go func() { + for err := range watcher.Errors { + t.Fatalf("error received: %s", err) + } + }() + + // Receive events on the event channel on a separate goroutine + eventstream := watcher.Events + var deleteReceived counter + go func() { + for event := range eventstream { + // Only count relevant events + if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFileAlreadyExists) { + t.Logf("event received: %s", event) + if event.Op&Remove == Remove { + deleteReceived.increment() + } + } else { + t.Logf("unexpected event received: %s", event) + } + } + }() + + os.RemoveAll(testDir) + + // We expect this event to be received almost immediately, but let's wait 500 ms to be sure + time.Sleep(500 * time.Millisecond) + dReceived := deleteReceived.value() + if dReceived < 2 { + t.Fatalf("did not receive at least %d delete events, received %d after 500 ms", 2, dReceived) + } +} + +func TestFsnotifySubDir(t *testing.T) { + watcher := newWatcher(t) + + // Create directory to watch + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + testFile1 := filepath.Join(testDir, "TestFsnotifyFile1.testfile") + testSubDir := filepath.Join(testDir, "sub") + testSubDirFile := filepath.Join(testDir, "sub/TestFsnotifyFile1.testfile") + + // Receive errors on the error channel on a separate goroutine + go func() { + for err := range watcher.Errors { + t.Fatalf("error received: %s", err) + } + }() + + // Receive events on the event channel on a separate goroutine + eventstream := watcher.Events + var createReceived, deleteReceived counter + done := make(chan bool) + go func() { + for event := range eventstream { + // Only count relevant events + if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testSubDir) || event.Name == filepath.Clean(testFile1) { + t.Logf("event received: %s", event) + if event.Op&Create == Create { + createReceived.increment() + } + if event.Op&Remove == Remove { + deleteReceived.increment() + } + } else { + t.Logf("unexpected event received: %s", event) + } + } + done <- true + }() + + addWatch(t, watcher, testDir) + + // Create sub-directory + if err := os.Mkdir(testSubDir, 0777); err != nil { + t.Fatalf("failed to create test sub-directory: %s", err) + } + + // Create a file + var f *os.File + f, err := os.OpenFile(testFile1, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Sync() + f.Close() + + // Create a file (Should not see this! we are not watching subdir) + var fs *os.File + fs, err = os.OpenFile(testSubDirFile, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + fs.Sync() + fs.Close() + + time.Sleep(200 * time.Millisecond) + + // Make sure receive deletes for both file and sub-directory + os.RemoveAll(testSubDir) + os.Remove(testFile1) + + // We expect this event to be received almost immediately, but let's wait 500 ms to be sure + time.Sleep(500 * time.Millisecond) + cReceived := createReceived.value() + if cReceived != 2 { + t.Fatalf("incorrect number of create events received after 500 ms (%d vs %d)", cReceived, 2) + } + dReceived := deleteReceived.value() + if dReceived != 2 { + t.Fatalf("incorrect number of delete events received after 500 ms (%d vs %d)", dReceived, 2) + } + + // Try closing the fsnotify instance + t.Log("calling Close()") + watcher.Close() + t.Log("waiting for the event channel to become closed...") + select { + case <-done: + t.Log("event channel closed") + case <-time.After(2 * time.Second): + t.Fatal("event stream was not closed after 2 seconds") + } +} + +func TestFsnotifyRename(t *testing.T) { + watcher := newWatcher(t) + + // Create directory to watch + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + addWatch(t, watcher, testDir) + + // Receive errors on the error channel on a separate goroutine + go func() { + for err := range watcher.Errors { + t.Fatalf("error received: %s", err) + } + }() + + testFile := filepath.Join(testDir, "TestFsnotifyEvents.testfile") + testFileRenamed := filepath.Join(testDir, "TestFsnotifyEvents.testfileRenamed") + + // Receive events on the event channel on a separate goroutine + eventstream := watcher.Events + var renameReceived counter + done := make(chan bool) + go func() { + for event := range eventstream { + // Only count relevant events + if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFile) || event.Name == filepath.Clean(testFileRenamed) { + if event.Op&Rename == Rename { + renameReceived.increment() + } + t.Logf("event received: %s", event) + } else { + t.Logf("unexpected event received: %s", event) + } + } + done <- true + }() + + // Create a file + // This should add at least one event to the fsnotify event queue + var f *os.File + f, err := os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Sync() + + f.WriteString("data") + f.Sync() + f.Close() + + // Add a watch for testFile + addWatch(t, watcher, testFile) + + if err := testRename(testFile, testFileRenamed); err != nil { + t.Fatalf("rename failed: %s", err) + } + + // We expect this event to be received almost immediately, but let's wait 500 ms to be sure + time.Sleep(500 * time.Millisecond) + if renameReceived.value() == 0 { + t.Fatal("fsnotify rename events have not been received after 500 ms") + } + + // Try closing the fsnotify instance + t.Log("calling Close()") + watcher.Close() + t.Log("waiting for the event channel to become closed...") + select { + case <-done: + t.Log("event channel closed") + case <-time.After(2 * time.Second): + t.Fatal("event stream was not closed after 2 seconds") + } + + os.Remove(testFileRenamed) +} + +func TestFsnotifyRenameToCreate(t *testing.T) { + watcher := newWatcher(t) + + // Create directory to watch + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + // Create directory to get file + testDirFrom := tempMkdir(t) + defer os.RemoveAll(testDirFrom) + + addWatch(t, watcher, testDir) + + // Receive errors on the error channel on a separate goroutine + go func() { + for err := range watcher.Errors { + t.Fatalf("error received: %s", err) + } + }() + + testFile := filepath.Join(testDirFrom, "TestFsnotifyEvents.testfile") + testFileRenamed := filepath.Join(testDir, "TestFsnotifyEvents.testfileRenamed") + + // Receive events on the event channel on a separate goroutine + eventstream := watcher.Events + var createReceived counter + done := make(chan bool) + go func() { + for event := range eventstream { + // Only count relevant events + if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFile) || event.Name == filepath.Clean(testFileRenamed) { + if event.Op&Create == Create { + createReceived.increment() + } + t.Logf("event received: %s", event) + } else { + t.Logf("unexpected event received: %s", event) + } + } + done <- true + }() + + // Create a file + // This should add at least one event to the fsnotify event queue + var f *os.File + f, err := os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Sync() + f.Close() + + if err := testRename(testFile, testFileRenamed); err != nil { + t.Fatalf("rename failed: %s", err) + } + + // We expect this event to be received almost immediately, but let's wait 500 ms to be sure + time.Sleep(500 * time.Millisecond) + if createReceived.value() == 0 { + t.Fatal("fsnotify create events have not been received after 500 ms") + } + + // Try closing the fsnotify instance + t.Log("calling Close()") + watcher.Close() + t.Log("waiting for the event channel to become closed...") + select { + case <-done: + t.Log("event channel closed") + case <-time.After(2 * time.Second): + t.Fatal("event stream was not closed after 2 seconds") + } + + os.Remove(testFileRenamed) +} + +func TestFsnotifyRenameToOverwrite(t *testing.T) { + switch runtime.GOOS { + case "plan9", "windows": + t.Skipf("skipping test on %q (os.Rename over existing file does not create event).", runtime.GOOS) + } + + watcher := newWatcher(t) + + // Create directory to watch + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + // Create directory to get file + testDirFrom := tempMkdir(t) + defer os.RemoveAll(testDirFrom) + + testFile := filepath.Join(testDirFrom, "TestFsnotifyEvents.testfile") + testFileRenamed := filepath.Join(testDir, "TestFsnotifyEvents.testfileRenamed") + + // Create a file + var fr *os.File + fr, err := os.OpenFile(testFileRenamed, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + fr.Sync() + fr.Close() + + addWatch(t, watcher, testDir) + + // Receive errors on the error channel on a separate goroutine + go func() { + for err := range watcher.Errors { + t.Fatalf("error received: %s", err) + } + }() + + // Receive events on the event channel on a separate goroutine + eventstream := watcher.Events + var eventReceived counter + done := make(chan bool) + go func() { + for event := range eventstream { + // Only count relevant events + if event.Name == filepath.Clean(testFileRenamed) { + eventReceived.increment() + t.Logf("event received: %s", event) + } else { + t.Logf("unexpected event received: %s", event) + } + } + done <- true + }() + + // Create a file + // This should add at least one event to the fsnotify event queue + var f *os.File + f, err = os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Sync() + f.Close() + + if err := testRename(testFile, testFileRenamed); err != nil { + t.Fatalf("rename failed: %s", err) + } + + // We expect this event to be received almost immediately, but let's wait 500 ms to be sure + time.Sleep(500 * time.Millisecond) + if eventReceived.value() == 0 { + t.Fatal("fsnotify events have not been received after 500 ms") + } + + // Try closing the fsnotify instance + t.Log("calling Close()") + watcher.Close() + t.Log("waiting for the event channel to become closed...") + select { + case <-done: + t.Log("event channel closed") + case <-time.After(2 * time.Second): + t.Fatal("event stream was not closed after 2 seconds") + } + + os.Remove(testFileRenamed) +} + +func TestRemovalOfWatch(t *testing.T) { + // Create directory to watch + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + // Create a file before watching directory + testFileAlreadyExists := filepath.Join(testDir, "TestFsnotifyEventsExisting.testfile") + { + var f *os.File + f, err := os.OpenFile(testFileAlreadyExists, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Sync() + f.Close() + } + + watcher := newWatcher(t) + defer watcher.Close() + + addWatch(t, watcher, testDir) + if err := watcher.Remove(testDir); err != nil { + t.Fatalf("Could not remove the watch: %v\n", err) + } + + go func() { + select { + case ev := <-watcher.Events: + t.Fatalf("We received event: %v\n", ev) + case <-time.After(500 * time.Millisecond): + t.Log("No event received, as expected.") + } + }() + + time.Sleep(200 * time.Millisecond) + // Modify the file outside of the watched dir + f, err := os.Open(testFileAlreadyExists) + if err != nil { + t.Fatalf("Open test file failed: %s", err) + } + f.WriteString("data") + f.Sync() + f.Close() + if err := os.Chmod(testFileAlreadyExists, 0700); err != nil { + t.Fatalf("chmod failed: %s", err) + } + time.Sleep(400 * time.Millisecond) +} + +func TestFsnotifyAttrib(t *testing.T) { + if runtime.GOOS == "windows" { + t.Skip("attributes don't work on Windows.") + } + + watcher := newWatcher(t) + + // Create directory to watch + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + // Receive errors on the error channel on a separate goroutine + go func() { + for err := range watcher.Errors { + t.Fatalf("error received: %s", err) + } + }() + + testFile := filepath.Join(testDir, "TestFsnotifyAttrib.testfile") + + // Receive events on the event channel on a separate goroutine + eventstream := watcher.Events + // The modifyReceived counter counts IsModify events that are not IsAttrib, + // and the attribReceived counts IsAttrib events (which are also IsModify as + // a consequence). + var modifyReceived counter + var attribReceived counter + done := make(chan bool) + go func() { + for event := range eventstream { + // Only count relevant events + if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFile) { + if event.Op&Write == Write { + modifyReceived.increment() + } + if event.Op&Chmod == Chmod { + attribReceived.increment() + } + t.Logf("event received: %s", event) + } else { + t.Logf("unexpected event received: %s", event) + } + } + done <- true + }() + + // Create a file + // This should add at least one event to the fsnotify event queue + var f *os.File + f, err := os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Sync() + + f.WriteString("data") + f.Sync() + f.Close() + + // Add a watch for testFile + addWatch(t, watcher, testFile) + + if err := os.Chmod(testFile, 0700); err != nil { + t.Fatalf("chmod failed: %s", err) + } + + // We expect this event to be received almost immediately, but let's wait 500 ms to be sure + // Creating/writing a file changes also the mtime, so IsAttrib should be set to true here + time.Sleep(500 * time.Millisecond) + if modifyReceived.value() != 0 { + t.Fatal("received an unexpected modify event when creating a test file") + } + if attribReceived.value() == 0 { + t.Fatal("fsnotify attribute events have not received after 500 ms") + } + + // Modifying the contents of the file does not set the attrib flag (although eg. the mtime + // might have been modified). + modifyReceived.reset() + attribReceived.reset() + + f, err = os.OpenFile(testFile, os.O_WRONLY, 0) + if err != nil { + t.Fatalf("reopening test file failed: %s", err) + } + + f.WriteString("more data") + f.Sync() + f.Close() + + time.Sleep(500 * time.Millisecond) + + if modifyReceived.value() != 1 { + t.Fatal("didn't receive a modify event after changing test file contents") + } + + if attribReceived.value() != 0 { + t.Fatal("did receive an unexpected attrib event after changing test file contents") + } + + modifyReceived.reset() + attribReceived.reset() + + // Doing a chmod on the file should trigger an event with the "attrib" flag set (the contents + // of the file are not changed though) + if err := os.Chmod(testFile, 0600); err != nil { + t.Fatalf("chmod failed: %s", err) + } + + time.Sleep(500 * time.Millisecond) + + if attribReceived.value() != 1 { + t.Fatal("didn't receive an attribute change after 500ms") + } + + // Try closing the fsnotify instance + t.Log("calling Close()") + watcher.Close() + t.Log("waiting for the event channel to become closed...") + select { + case <-done: + t.Log("event channel closed") + case <-time.After(1e9): + t.Fatal("event stream was not closed after 1 second") + } + + os.Remove(testFile) +} + +func TestFsnotifyClose(t *testing.T) { + watcher := newWatcher(t) + watcher.Close() + + var done int32 + go func() { + watcher.Close() + atomic.StoreInt32(&done, 1) + }() + + time.Sleep(50e6) // 50 ms + if atomic.LoadInt32(&done) == 0 { + t.Fatal("double Close() test failed: second Close() call didn't return") + } + + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + if err := watcher.Add(testDir); err == nil { + t.Fatal("expected error on Watch() after Close(), got nil") + } +} + +func TestFsnotifyFakeSymlink(t *testing.T) { + if runtime.GOOS == "windows" { + t.Skip("symlinks don't work on Windows.") + } + + watcher := newWatcher(t) + + // Create directory to watch + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + var errorsReceived counter + // Receive errors on the error channel on a separate goroutine + go func() { + for errors := range watcher.Errors { + t.Logf("Received error: %s", errors) + errorsReceived.increment() + } + }() + + // Count the CREATE events received + var createEventsReceived, otherEventsReceived counter + go func() { + for ev := range watcher.Events { + t.Logf("event received: %s", ev) + if ev.Op&Create == Create { + createEventsReceived.increment() + } else { + otherEventsReceived.increment() + } + } + }() + + addWatch(t, watcher, testDir) + + if err := os.Symlink(filepath.Join(testDir, "zzz"), filepath.Join(testDir, "zzznew")); err != nil { + t.Fatalf("Failed to create bogus symlink: %s", err) + } + t.Logf("Created bogus symlink") + + // We expect this event to be received almost immediately, but let's wait 500 ms to be sure + time.Sleep(500 * time.Millisecond) + + // Should not be error, just no events for broken links (watching nothing) + if errorsReceived.value() > 0 { + t.Fatal("fsnotify errors have been received.") + } + if otherEventsReceived.value() > 0 { + t.Fatal("fsnotify other events received on the broken link") + } + + // Except for 1 create event (for the link itself) + if createEventsReceived.value() == 0 { + t.Fatal("fsnotify create events were not received after 500 ms") + } + if createEventsReceived.value() > 1 { + t.Fatal("fsnotify more create events received than expected") + } + + // Try closing the fsnotify instance + t.Log("calling Close()") + watcher.Close() +} + +func TestCyclicSymlink(t *testing.T) { + if runtime.GOOS == "windows" { + t.Skip("symlinks don't work on Windows.") + } + + watcher := newWatcher(t) + + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + link := path.Join(testDir, "link") + if err := os.Symlink(".", link); err != nil { + t.Fatalf("could not make symlink: %v", err) + } + addWatch(t, watcher, testDir) + + var createEventsReceived counter + go func() { + for ev := range watcher.Events { + if ev.Op&Create == Create { + createEventsReceived.increment() + } + } + }() + + if err := os.Remove(link); err != nil { + t.Fatalf("Error removing link: %v", err) + } + + // It would be nice to be able to expect a delete event here, but kqueue has + // no way for us to get events on symlinks themselves, because opening them + // opens an fd to the file to which they point. + + if err := ioutil.WriteFile(link, []byte("foo"), 0700); err != nil { + t.Fatalf("could not make symlink: %v", err) + } + + // We expect this event to be received almost immediately, but let's wait 500 ms to be sure + time.Sleep(500 * time.Millisecond) + + if got := createEventsReceived.value(); got == 0 { + t.Errorf("want at least 1 create event got %v", got) + } + + watcher.Close() +} + +// TestConcurrentRemovalOfWatch tests that concurrent calls to RemoveWatch do not race. +// See https://codereview.appspot.com/103300045/ +// go test -test.run=TestConcurrentRemovalOfWatch -test.cpu=1,1,1,1,1 -race +func TestConcurrentRemovalOfWatch(t *testing.T) { + if runtime.GOOS != "darwin" { + t.Skip("regression test for race only present on darwin") + } + + // Create directory to watch + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + // Create a file before watching directory + testFileAlreadyExists := filepath.Join(testDir, "TestFsnotifyEventsExisting.testfile") + { + var f *os.File + f, err := os.OpenFile(testFileAlreadyExists, os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatalf("creating test file failed: %s", err) + } + f.Sync() + f.Close() + } + + watcher := newWatcher(t) + defer watcher.Close() + + addWatch(t, watcher, testDir) + + // Test that RemoveWatch can be invoked concurrently, with no data races. + removed1 := make(chan struct{}) + go func() { + defer close(removed1) + watcher.Remove(testDir) + }() + removed2 := make(chan struct{}) + go func() { + close(removed2) + watcher.Remove(testDir) + }() + <-removed1 + <-removed2 +} + +func TestClose(t *testing.T) { + // Regression test for #59 bad file descriptor from Close + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + watcher := newWatcher(t) + if err := watcher.Add(testDir); err != nil { + t.Fatalf("Expected no error on Add, got %v", err) + } + err := watcher.Close() + if err != nil { + t.Fatalf("Expected no error on Close, got %v.", err) + } +} + +// TestRemoveWithClose tests if one can handle Remove events and, at the same +// time, close Watcher object without any data races. +func TestRemoveWithClose(t *testing.T) { + testDir := tempMkdir(t) + defer os.RemoveAll(testDir) + + const fileN = 200 + tempFiles := make([]string, 0, fileN) + for i := 0; i < fileN; i++ { + tempFiles = append(tempFiles, tempMkFile(t, testDir)) + } + watcher := newWatcher(t) + if err := watcher.Add(testDir); err != nil { + t.Fatalf("Expected no error on Add, got %v", err) + } + startC, stopC := make(chan struct{}), make(chan struct{}) + errC := make(chan error) + go func() { + for { + select { + case <-watcher.Errors: + case <-watcher.Events: + case <-stopC: + return + } + } + }() + go func() { + <-startC + for _, fileName := range tempFiles { + os.Remove(fileName) + } + }() + go func() { + <-startC + errC <- watcher.Close() + }() + close(startC) + defer close(stopC) + if err := <-errC; err != nil { + t.Fatalf("Expected no error on Close, got %v.", err) + } +} + +func testRename(file1, file2 string) error { + switch runtime.GOOS { + case "windows", "plan9": + return os.Rename(file1, file2) + default: + cmd := exec.Command("mv", file1, file2) + return cmd.Run() + } +} diff --git a/vendor/gopkg.in/gcfg.v1/LICENSE b/vendor/gopkg.in/gcfg.v1/LICENSE deleted file mode 100644 index 87a5cede3..000000000 --- a/vendor/gopkg.in/gcfg.v1/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2012 Péter Surányi. Portions Copyright (c) 2009 The Go -Authors. 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/vendor/gopkg.in/gcfg.v1/README b/vendor/gopkg.in/gcfg.v1/README deleted file mode 100644 index 1ff233a52..000000000 --- a/vendor/gopkg.in/gcfg.v1/README +++ /dev/null @@ -1,4 +0,0 @@ -Gcfg reads INI-style configuration files into Go structs; -supports user-defined types and subsections. - -Package docs: https://godoc.org/gopkg.in/gcfg.v1 diff --git a/vendor/gopkg.in/gcfg.v1/doc.go b/vendor/gopkg.in/gcfg.v1/doc.go deleted file mode 100644 index 40c80fe84..000000000 --- a/vendor/gopkg.in/gcfg.v1/doc.go +++ /dev/null @@ -1,145 +0,0 @@ -// Package gcfg reads "INI-style" text-based configuration files with -// "name=value" pairs grouped into sections (gcfg files). -// -// This package is still a work in progress; see the sections below for planned -// changes. -// -// Syntax -// -// The syntax is based on that used by git config: -// http://git-scm.com/docs/git-config#_syntax . -// There are some (planned) differences compared to the git config format: -// - improve data portability: -// - must be encoded in UTF-8 (for now) and must not contain the 0 byte -// - include and "path" type is not supported -// (path type may be implementable as a user-defined type) -// - internationalization -// - section and variable names can contain unicode letters, unicode digits -// (as defined in http://golang.org/ref/spec#Characters ) and hyphens -// (U+002D), starting with a unicode letter -// - disallow potentially ambiguous or misleading definitions: -// - `[sec.sub]` format is not allowed (deprecated in gitconfig) -// - `[sec ""]` is not allowed -// - use `[sec]` for section name "sec" and empty subsection name -// - (planned) within a single file, definitions must be contiguous for each: -// - section: '[secA]' -> '[secB]' -> '[secA]' is an error -// - subsection: '[sec "A"]' -> '[sec "B"]' -> '[sec "A"]' is an error -// - multivalued variable: 'multi=a' -> 'other=x' -> 'multi=b' is an error -// -// Data structure -// -// The functions in this package read values into a user-defined struct. -// Each section corresponds to a struct field in the config struct, and each -// variable in a section corresponds to a data field in the section struct. -// The mapping of each section or variable name to fields is done either based -// on the "gcfg" struct tag or by matching the name of the section or variable, -// ignoring case. In the latter case, hyphens '-' in section and variable names -// correspond to underscores '_' in field names. -// Fields must be exported; to use a section or variable name starting with a -// letter that is neither upper- or lower-case, prefix the field name with 'X'. -// (See https://code.google.com/p/go/issues/detail?id=5763#c4 .) -// -// For sections with subsections, the corresponding field in config must be a -// map, rather than a struct, with string keys and pointer-to-struct values. -// Values for subsection variables are stored in the map with the subsection -// name used as the map key. -// (Note that unlike section and variable names, subsection names are case -// sensitive.) -// When using a map, and there is a section with the same section name but -// without a subsection name, its values are stored with the empty string used -// as the key. -// It is possible to provide default values for subsections in the section -// "default-<sectionname>" (or by setting values in the corresponding struct -// field "Default_<sectionname>"). -// -// The functions in this package panic if config is not a pointer to a struct, -// or when a field is not of a suitable type (either a struct or a map with -// string keys and pointer-to-struct values). -// -// Parsing of values -// -// The section structs in the config struct may contain single-valued or -// multi-valued variables. Variables of unnamed slice type (that is, a type -// starting with `[]`) are treated as multi-value; all others (including named -// slice types) are treated as single-valued variables. -// -// Single-valued variables are handled based on the type as follows. -// Unnamed pointer types (that is, types starting with `*`) are dereferenced, -// and if necessary, a new instance is allocated. -// -// For types implementing the encoding.TextUnmarshaler interface, the -// UnmarshalText method is used to set the value. Implementing this method is -// the recommended way for parsing user-defined types. -// -// For fields of string kind, the value string is assigned to the field, after -// unquoting and unescaping as needed. -// For fields of bool kind, the field is set to true if the value is "true", -// "yes", "on" or "1", and set to false if the value is "false", "no", "off" or -// "0", ignoring case. In addition, single-valued bool fields can be specified -// with a "blank" value (variable name without equals sign and value); in such -// case the value is set to true. -// -// Predefined integer types [u]int(|8|16|32|64) and big.Int are parsed as -// decimal or hexadecimal (if having '0x' prefix). (This is to prevent -// unintuitively handling zero-padded numbers as octal.) Other types having -// [u]int* as the underlying type, such as os.FileMode and uintptr allow -// decimal, hexadecimal, or octal values. -// Parsing mode for integer types can be overridden using the struct tag option -// ",int=mode" where mode is a combination of the 'd', 'h', and 'o' characters -// (each standing for decimal, hexadecimal, and octal, respectively.) -// -// All other types are parsed using fmt.Sscanf with the "%v" verb. -// -// For multi-valued variables, each individual value is parsed as above and -// appended to the slice. If the first value is specified as a "blank" value -// (variable name without equals sign and value), a new slice is allocated; -// that is any values previously set in the slice will be ignored. -// -// The types subpackage for provides helpers for parsing "enum-like" and integer -// types. -// -// Error handling -// -// There are 3 types of errors: -// -// - programmer errors / panics: -// - invalid configuration structure -// - data errors: -// - fatal errors: -// - invalid configuration syntax -// - warnings: -// - data that doesn't belong to any part of the config structure -// -// Programmer errors trigger panics. These are should be fixed by the programmer -// before releasing code that uses gcfg. -// -// Data errors cause gcfg to return a non-nil error value. This includes the -// case when there are extra unknown key-value definitions in the configuration -// data (extra data). -// However, in some occasions it is desirable to be able to proceed in -// situations when the only data error is that of extra data. -// These errors are handled at a different (warning) priority and can be -// filtered out programmatically. To ignore extra data warnings, wrap the -// gcfg.Read*Into invocation into a call to gcfg.FatalOnly. -// -// TODO -// -// The following is a list of changes under consideration: -// - documentation -// - self-contained syntax documentation -// - more practical examples -// - move TODOs to issue tracker (eventually) -// - syntax -// - reconsider valid escape sequences -// (gitconfig doesn't support \r in value, \t in subsection name, etc.) -// - reading / parsing gcfg files -// - define internal representation structure -// - support multiple inputs (readers, strings, files) -// - support declaring encoding (?) -// - support varying fields sets for subsections (?) -// - writing gcfg files -// - error handling -// - make error context accessible programmatically? -// - limit input size? -// -package gcfg diff --git a/vendor/gopkg.in/gcfg.v1/errors.go b/vendor/gopkg.in/gcfg.v1/errors.go deleted file mode 100644 index 853c76021..000000000 --- a/vendor/gopkg.in/gcfg.v1/errors.go +++ /dev/null @@ -1,41 +0,0 @@ -package gcfg - -import ( - "gopkg.in/warnings.v0" -) - -// FatalOnly filters the results of a Read*Into invocation and returns only -// fatal errors. That is, errors (warnings) indicating data for unknown -// sections / variables is ignored. Example invocation: -// -// err := gcfg.FatalOnly(gcfg.ReadFileInto(&cfg, configFile)) -// if err != nil { -// ... -// -func FatalOnly(err error) error { - return warnings.FatalOnly(err) -} - -func isFatal(err error) bool { - _, ok := err.(extraData) - return !ok -} - -type extraData struct { - section string - subsection *string - variable *string -} - -func (e extraData) Error() string { - s := "can't store data at section \"" + e.section + "\"" - if e.subsection != nil { - s += ", subsection \"" + *e.subsection + "\"" - } - if e.variable != nil { - s += ", variable \"" + *e.variable + "\"" - } - return s -} - -var _ error = extraData{} diff --git a/vendor/gopkg.in/gcfg.v1/go1_0.go b/vendor/gopkg.in/gcfg.v1/go1_0.go deleted file mode 100644 index 667021079..000000000 --- a/vendor/gopkg.in/gcfg.v1/go1_0.go +++ /dev/null @@ -1,7 +0,0 @@ -// +build !go1.2 - -package gcfg - -type textUnmarshaler interface { - UnmarshalText(text []byte) error -} diff --git a/vendor/gopkg.in/gcfg.v1/go1_2.go b/vendor/gopkg.in/gcfg.v1/go1_2.go deleted file mode 100644 index 6f5843bc7..000000000 --- a/vendor/gopkg.in/gcfg.v1/go1_2.go +++ /dev/null @@ -1,9 +0,0 @@ -// +build go1.2 - -package gcfg - -import ( - "encoding" -) - -type textUnmarshaler encoding.TextUnmarshaler diff --git a/vendor/gopkg.in/gcfg.v1/read.go b/vendor/gopkg.in/gcfg.v1/read.go deleted file mode 100644 index 8400cf124..000000000 --- a/vendor/gopkg.in/gcfg.v1/read.go +++ /dev/null @@ -1,238 +0,0 @@ -package gcfg - -import ( - "fmt" - "io" - "io/ioutil" - "os" - "strings" - - "gopkg.in/gcfg.v1/scanner" - "gopkg.in/gcfg.v1/token" - "gopkg.in/warnings.v0" -) - -var unescape = map[rune]rune{'\\': '\\', '"': '"', 'n': '\n', 't': '\t'} - -// no error: invalid literals should be caught by scanner -func unquote(s string) string { - u, q, esc := make([]rune, 0, len(s)), false, false - for _, c := range s { - if esc { - uc, ok := unescape[c] - switch { - case ok: - u = append(u, uc) - fallthrough - case !q && c == '\n': - esc = false - continue - } - panic("invalid escape sequence") - } - switch c { - case '"': - q = !q - case '\\': - esc = true - default: - u = append(u, c) - } - } - if q { - panic("missing end quote") - } - if esc { - panic("invalid escape sequence") - } - return string(u) -} - -func readIntoPass(c *warnings.Collector, config interface{}, fset *token.FileSet, - file *token.File, src []byte, subsectPass bool) error { - // - var s scanner.Scanner - var errs scanner.ErrorList - s.Init(file, src, func(p token.Position, m string) { errs.Add(p, m) }, 0) - sect, sectsub := "", "" - pos, tok, lit := s.Scan() - errfn := func(msg string) error { - return fmt.Errorf("%s: %s", fset.Position(pos), msg) - } - for { - if errs.Len() > 0 { - if err := c.Collect(errs.Err()); err != nil { - return err - } - } - switch tok { - case token.EOF: - return nil - case token.EOL, token.COMMENT: - pos, tok, lit = s.Scan() - case token.LBRACK: - pos, tok, lit = s.Scan() - if errs.Len() > 0 { - if err := c.Collect(errs.Err()); err != nil { - return err - } - } - if tok != token.IDENT { - if err := c.Collect(errfn("expected section name")); err != nil { - return err - } - } - sect, sectsub = lit, "" - pos, tok, lit = s.Scan() - if errs.Len() > 0 { - if err := c.Collect(errs.Err()); err != nil { - return err - } - } - if tok == token.STRING { - sectsub = unquote(lit) - if sectsub == "" { - if err := c.Collect(errfn("empty subsection name")); err != nil { - return err - } - } - pos, tok, lit = s.Scan() - if errs.Len() > 0 { - if err := c.Collect(errs.Err()); err != nil { - return err - } - } - } - if tok != token.RBRACK { - if sectsub == "" { - if err := c.Collect(errfn("expected subsection name or right bracket")); err != nil { - return err - } - } - if err := c.Collect(errfn("expected right bracket")); err != nil { - return err - } - } - pos, tok, lit = s.Scan() - if tok != token.EOL && tok != token.EOF && tok != token.COMMENT { - if err := c.Collect(errfn("expected EOL, EOF, or comment")); err != nil { - return err - } - } - // If a section/subsection header was found, ensure a - // container object is created, even if there are no - // variables further down. - err := c.Collect(set(c, config, sect, sectsub, "", true, "", subsectPass)) - if err != nil { - return err - } - case token.IDENT: - if sect == "" { - if err := c.Collect(errfn("expected section header")); err != nil { - return err - } - } - n := lit - pos, tok, lit = s.Scan() - if errs.Len() > 0 { - return errs.Err() - } - blank, v := tok == token.EOF || tok == token.EOL || tok == token.COMMENT, "" - if !blank { - if tok != token.ASSIGN { - if err := c.Collect(errfn("expected '='")); err != nil { - return err - } - } - pos, tok, lit = s.Scan() - if errs.Len() > 0 { - if err := c.Collect(errs.Err()); err != nil { - return err - } - } - if tok != token.STRING { - if err := c.Collect(errfn("expected value")); err != nil { - return err - } - } - v = unquote(lit) - pos, tok, lit = s.Scan() - if errs.Len() > 0 { - if err := c.Collect(errs.Err()); err != nil { - return err - } - } - if tok != token.EOL && tok != token.EOF && tok != token.COMMENT { - if err := c.Collect(errfn("expected EOL, EOF, or comment")); err != nil { - return err - } - } - } - err := set(c, config, sect, sectsub, n, blank, v, subsectPass) - if err != nil { - return err - } - default: - if sect == "" { - if err := c.Collect(errfn("expected section header")); err != nil { - return err - } - } - if err := c.Collect(errfn("expected section header or variable declaration")); err != nil { - return err - } - } - } - panic("never reached") -} - -func readInto(config interface{}, fset *token.FileSet, file *token.File, - src []byte) error { - // - c := warnings.NewCollector(isFatal) - err := readIntoPass(c, config, fset, file, src, false) - if err != nil { - return err - } - err = readIntoPass(c, config, fset, file, src, true) - if err != nil { - return err - } - return c.Done() -} - -// ReadInto reads gcfg formatted data from reader and sets the values into the -// corresponding fields in config. -func ReadInto(config interface{}, reader io.Reader) error { - src, err := ioutil.ReadAll(reader) - if err != nil { - return err - } - fset := token.NewFileSet() - file := fset.AddFile("", fset.Base(), len(src)) - return readInto(config, fset, file, src) -} - -// ReadStringInto reads gcfg formatted data from str and sets the values into -// the corresponding fields in config. -func ReadStringInto(config interface{}, str string) error { - r := strings.NewReader(str) - return ReadInto(config, r) -} - -// ReadFileInto reads gcfg formatted data from the file filename and sets the -// values into the corresponding fields in config. -func ReadFileInto(config interface{}, filename string) error { - f, err := os.Open(filename) - if err != nil { - return err - } - defer f.Close() - src, err := ioutil.ReadAll(f) - if err != nil { - return err - } - fset := token.NewFileSet() - file := fset.AddFile(filename, fset.Base(), len(src)) - return readInto(config, fset, file, src) -} diff --git a/vendor/gopkg.in/gcfg.v1/scanner/errors.go b/vendor/gopkg.in/gcfg.v1/scanner/errors.go deleted file mode 100644 index 1a3c0f656..000000000 --- a/vendor/gopkg.in/gcfg.v1/scanner/errors.go +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package scanner - -import ( - "fmt" - "io" - "sort" -) - -import ( - "gopkg.in/gcfg.v1/token" -) - -// In an ErrorList, an error is represented by an *Error. -// The position Pos, if valid, points to the beginning of -// the offending token, and the error condition is described -// by Msg. -// -type Error struct { - Pos token.Position - Msg string -} - -// Error implements the error interface. -func (e Error) Error() string { - if e.Pos.Filename != "" || e.Pos.IsValid() { - // don't print "<unknown position>" - // TODO(gri) reconsider the semantics of Position.IsValid - return e.Pos.String() + ": " + e.Msg - } - return e.Msg -} - -// ErrorList is a list of *Errors. -// The zero value for an ErrorList is an empty ErrorList ready to use. -// -type ErrorList []*Error - -// Add adds an Error with given position and error message to an ErrorList. -func (p *ErrorList) Add(pos token.Position, msg string) { - *p = append(*p, &Error{pos, msg}) -} - -// Reset resets an ErrorList to no errors. -func (p *ErrorList) Reset() { *p = (*p)[0:0] } - -// ErrorList implements the sort Interface. -func (p ErrorList) Len() int { return len(p) } -func (p ErrorList) Swap(i, j int) { p[i], p[j] = p[j], p[i] } - -func (p ErrorList) Less(i, j int) bool { - e := &p[i].Pos - f := &p[j].Pos - if e.Filename < f.Filename { - return true - } - if e.Filename == f.Filename { - return e.Offset < f.Offset - } - return false -} - -// Sort sorts an ErrorList. *Error entries are sorted by position, -// other errors are sorted by error message, and before any *Error -// entry. -// -func (p ErrorList) Sort() { - sort.Sort(p) -} - -// RemoveMultiples sorts an ErrorList and removes all but the first error per line. -func (p *ErrorList) RemoveMultiples() { - sort.Sort(p) - var last token.Position // initial last.Line is != any legal error line - i := 0 - for _, e := range *p { - if e.Pos.Filename != last.Filename || e.Pos.Line != last.Line { - last = e.Pos - (*p)[i] = e - i++ - } - } - (*p) = (*p)[0:i] -} - -// An ErrorList implements the error interface. -func (p ErrorList) Error() string { - switch len(p) { - case 0: - return "no errors" - case 1: - return p[0].Error() - } - return fmt.Sprintf("%s (and %d more errors)", p[0], len(p)-1) -} - -// Err returns an error equivalent to this error list. -// If the list is empty, Err returns nil. -func (p ErrorList) Err() error { - if len(p) == 0 { - return nil - } - return p -} - -// PrintError is a utility function that prints a list of errors to w, -// one error per line, if the err parameter is an ErrorList. Otherwise -// it prints the err string. -// -func PrintError(w io.Writer, err error) { - if list, ok := err.(ErrorList); ok { - for _, e := range list { - fmt.Fprintf(w, "%s\n", e) - } - } else if err != nil { - fmt.Fprintf(w, "%s\n", err) - } -} diff --git a/vendor/gopkg.in/gcfg.v1/scanner/scanner.go b/vendor/gopkg.in/gcfg.v1/scanner/scanner.go deleted file mode 100644 index bbbdbf535..000000000 --- a/vendor/gopkg.in/gcfg.v1/scanner/scanner.go +++ /dev/null @@ -1,342 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package scanner implements a scanner for gcfg configuration text. -// It takes a []byte as source which can then be tokenized -// through repeated calls to the Scan method. -// -// Note that the API for the scanner package may change to accommodate new -// features or implementation changes in gcfg. -// -package scanner - -import ( - "fmt" - "path/filepath" - "unicode" - "unicode/utf8" -) - -import ( - "gopkg.in/gcfg.v1/token" -) - -// An ErrorHandler may be provided to Scanner.Init. If a syntax error is -// encountered and a handler was installed, the handler is called with a -// position and an error message. The position points to the beginning of -// the offending token. -// -type ErrorHandler func(pos token.Position, msg string) - -// A Scanner holds the scanner's internal state while processing -// a given text. It can be allocated as part of another data -// structure but must be initialized via Init before use. -// -type Scanner struct { - // immutable state - file *token.File // source file handle - dir string // directory portion of file.Name() - src []byte // source - err ErrorHandler // error reporting; or nil - mode Mode // scanning mode - - // scanning state - ch rune // current character - offset int // character offset - rdOffset int // reading offset (position after current character) - lineOffset int // current line offset - nextVal bool // next token is expected to be a value - - // public state - ok to modify - ErrorCount int // number of errors encountered -} - -// Read the next Unicode char into s.ch. -// s.ch < 0 means end-of-file. -// -func (s *Scanner) next() { - if s.rdOffset < len(s.src) { - s.offset = s.rdOffset - if s.ch == '\n' { - s.lineOffset = s.offset - s.file.AddLine(s.offset) - } - r, w := rune(s.src[s.rdOffset]), 1 - switch { - case r == 0: - s.error(s.offset, "illegal character NUL") - case r >= 0x80: - // not ASCII - r, w = utf8.DecodeRune(s.src[s.rdOffset:]) - if r == utf8.RuneError && w == 1 { - s.error(s.offset, "illegal UTF-8 encoding") - } - } - s.rdOffset += w - s.ch = r - } else { - s.offset = len(s.src) - if s.ch == '\n' { - s.lineOffset = s.offset - s.file.AddLine(s.offset) - } - s.ch = -1 // eof - } -} - -// A mode value is a set of flags (or 0). -// They control scanner behavior. -// -type Mode uint - -const ( - ScanComments Mode = 1 << iota // return comments as COMMENT tokens -) - -// Init prepares the scanner s to tokenize the text src by setting the -// scanner at the beginning of src. The scanner uses the file set file -// for position information and it adds line information for each line. -// It is ok to re-use the same file when re-scanning the same file as -// line information which is already present is ignored. Init causes a -// panic if the file size does not match the src size. -// -// Calls to Scan will invoke the error handler err if they encounter a -// syntax error and err is not nil. Also, for each error encountered, -// the Scanner field ErrorCount is incremented by one. The mode parameter -// determines how comments are handled. -// -// Note that Init may call err if there is an error in the first character -// of the file. -// -func (s *Scanner) Init(file *token.File, src []byte, err ErrorHandler, mode Mode) { - // Explicitly initialize all fields since a scanner may be reused. - if file.Size() != len(src) { - panic(fmt.Sprintf("file size (%d) does not match src len (%d)", file.Size(), len(src))) - } - s.file = file - s.dir, _ = filepath.Split(file.Name()) - s.src = src - s.err = err - s.mode = mode - - s.ch = ' ' - s.offset = 0 - s.rdOffset = 0 - s.lineOffset = 0 - s.ErrorCount = 0 - s.nextVal = false - - s.next() -} - -func (s *Scanner) error(offs int, msg string) { - if s.err != nil { - s.err(s.file.Position(s.file.Pos(offs)), msg) - } - s.ErrorCount++ -} - -func (s *Scanner) scanComment() string { - // initial [;#] already consumed - offs := s.offset - 1 // position of initial [;#] - - for s.ch != '\n' && s.ch >= 0 { - s.next() - } - return string(s.src[offs:s.offset]) -} - -func isLetter(ch rune) bool { - return 'a' <= ch && ch <= 'z' || 'A' <= ch && ch <= 'Z' || ch >= 0x80 && unicode.IsLetter(ch) -} - -func isDigit(ch rune) bool { - return '0' <= ch && ch <= '9' || ch >= 0x80 && unicode.IsDigit(ch) -} - -func (s *Scanner) scanIdentifier() string { - offs := s.offset - for isLetter(s.ch) || isDigit(s.ch) || s.ch == '-' { - s.next() - } - return string(s.src[offs:s.offset]) -} - -func (s *Scanner) scanEscape(val bool) { - offs := s.offset - ch := s.ch - s.next() // always make progress - switch ch { - case '\\', '"': - // ok - case 'n', 't': - if val { - break // ok - } - fallthrough - default: - s.error(offs, "unknown escape sequence") - } -} - -func (s *Scanner) scanString() string { - // '"' opening already consumed - offs := s.offset - 1 - - for s.ch != '"' { - ch := s.ch - s.next() - if ch == '\n' || ch < 0 { - s.error(offs, "string not terminated") - break - } - if ch == '\\' { - s.scanEscape(false) - } - } - - s.next() - - return string(s.src[offs:s.offset]) -} - -func stripCR(b []byte) []byte { - c := make([]byte, len(b)) - i := 0 - for _, ch := range b { - if ch != '\r' { - c[i] = ch - i++ - } - } - return c[:i] -} - -func (s *Scanner) scanValString() string { - offs := s.offset - - hasCR := false - end := offs - inQuote := false -loop: - for inQuote || s.ch >= 0 && s.ch != '\n' && s.ch != ';' && s.ch != '#' { - ch := s.ch - s.next() - switch { - case inQuote && ch == '\\': - s.scanEscape(true) - case !inQuote && ch == '\\': - if s.ch == '\r' { - hasCR = true - s.next() - } - if s.ch != '\n' { - s.error(offs, "unquoted '\\' must be followed by new line") - break loop - } - s.next() - case ch == '"': - inQuote = !inQuote - case ch == '\r': - hasCR = true - case ch < 0 || inQuote && ch == '\n': - s.error(offs, "string not terminated") - break loop - } - if inQuote || !isWhiteSpace(ch) { - end = s.offset - } - } - - lit := s.src[offs:end] - if hasCR { - lit = stripCR(lit) - } - - return string(lit) -} - -func isWhiteSpace(ch rune) bool { - return ch == ' ' || ch == '\t' || ch == '\r' -} - -func (s *Scanner) skipWhitespace() { - for isWhiteSpace(s.ch) { - s.next() - } -} - -// Scan scans the next token and returns the token position, the token, -// and its literal string if applicable. The source end is indicated by -// token.EOF. -// -// If the returned token is a literal (token.IDENT, token.STRING) or -// token.COMMENT, the literal string has the corresponding value. -// -// If the returned token is token.ILLEGAL, the literal string is the -// offending character. -// -// In all other cases, Scan returns an empty literal string. -// -// For more tolerant parsing, Scan will return a valid token if -// possible even if a syntax error was encountered. Thus, even -// if the resulting token sequence contains no illegal tokens, -// a client may not assume that no error occurred. Instead it -// must check the scanner's ErrorCount or the number of calls -// of the error handler, if there was one installed. -// -// Scan adds line information to the file added to the file -// set with Init. Token positions are relative to that file -// and thus relative to the file set. -// -func (s *Scanner) Scan() (pos token.Pos, tok token.Token, lit string) { -scanAgain: - s.skipWhitespace() - - // current token start - pos = s.file.Pos(s.offset) - - // determine token value - switch ch := s.ch; { - case s.nextVal: - lit = s.scanValString() - tok = token.STRING - s.nextVal = false - case isLetter(ch): - lit = s.scanIdentifier() - tok = token.IDENT - default: - s.next() // always make progress - switch ch { - case -1: - tok = token.EOF - case '\n': - tok = token.EOL - case '"': - tok = token.STRING - lit = s.scanString() - case '[': - tok = token.LBRACK - case ']': - tok = token.RBRACK - case ';', '#': - // comment - lit = s.scanComment() - if s.mode&ScanComments == 0 { - // skip comment - goto scanAgain - } - tok = token.COMMENT - case '=': - tok = token.ASSIGN - s.nextVal = true - default: - s.error(s.file.Offset(pos), fmt.Sprintf("illegal character %#U", ch)) - tok = token.ILLEGAL - lit = string(ch) - } - } - - return -} diff --git a/vendor/gopkg.in/gcfg.v1/set.go b/vendor/gopkg.in/gcfg.v1/set.go deleted file mode 100644 index e85ec155d..000000000 --- a/vendor/gopkg.in/gcfg.v1/set.go +++ /dev/null @@ -1,333 +0,0 @@ -package gcfg - -import ( - "bytes" - "encoding/gob" - "fmt" - "math/big" - "reflect" - "strings" - "unicode" - "unicode/utf8" - - "gopkg.in/gcfg.v1/types" - "gopkg.in/warnings.v0" -) - -type tag struct { - ident string - intMode string -} - -func newTag(ts string) tag { - t := tag{} - s := strings.Split(ts, ",") - t.ident = s[0] - for _, tse := range s[1:] { - if strings.HasPrefix(tse, "int=") { - t.intMode = tse[len("int="):] - } - } - return t -} - -func fieldFold(v reflect.Value, name string) (reflect.Value, tag) { - var n string - r0, _ := utf8.DecodeRuneInString(name) - if unicode.IsLetter(r0) && !unicode.IsLower(r0) && !unicode.IsUpper(r0) { - n = "X" - } - n += strings.Replace(name, "-", "_", -1) - f, ok := v.Type().FieldByNameFunc(func(fieldName string) bool { - if !v.FieldByName(fieldName).CanSet() { - return false - } - f, _ := v.Type().FieldByName(fieldName) - t := newTag(f.Tag.Get("gcfg")) - if t.ident != "" { - return strings.EqualFold(t.ident, name) - } - return strings.EqualFold(n, fieldName) - }) - if !ok { - return reflect.Value{}, tag{} - } - return v.FieldByName(f.Name), newTag(f.Tag.Get("gcfg")) -} - -type setter func(destp interface{}, blank bool, val string, t tag) error - -var errUnsupportedType = fmt.Errorf("unsupported type") -var errBlankUnsupported = fmt.Errorf("blank value not supported for type") - -var setters = []setter{ - typeSetter, textUnmarshalerSetter, kindSetter, scanSetter, -} - -func textUnmarshalerSetter(d interface{}, blank bool, val string, t tag) error { - dtu, ok := d.(textUnmarshaler) - if !ok { - return errUnsupportedType - } - if blank { - return errBlankUnsupported - } - return dtu.UnmarshalText([]byte(val)) -} - -func boolSetter(d interface{}, blank bool, val string, t tag) error { - if blank { - reflect.ValueOf(d).Elem().Set(reflect.ValueOf(true)) - return nil - } - b, err := types.ParseBool(val) - if err == nil { - reflect.ValueOf(d).Elem().Set(reflect.ValueOf(b)) - } - return err -} - -func intMode(mode string) types.IntMode { - var m types.IntMode - if strings.ContainsAny(mode, "dD") { - m |= types.Dec - } - if strings.ContainsAny(mode, "hH") { - m |= types.Hex - } - if strings.ContainsAny(mode, "oO") { - m |= types.Oct - } - return m -} - -var typeModes = map[reflect.Type]types.IntMode{ - reflect.TypeOf(int(0)): types.Dec | types.Hex, - reflect.TypeOf(int8(0)): types.Dec | types.Hex, - reflect.TypeOf(int16(0)): types.Dec | types.Hex, - reflect.TypeOf(int32(0)): types.Dec | types.Hex, - reflect.TypeOf(int64(0)): types.Dec | types.Hex, - reflect.TypeOf(uint(0)): types.Dec | types.Hex, - reflect.TypeOf(uint8(0)): types.Dec | types.Hex, - reflect.TypeOf(uint16(0)): types.Dec | types.Hex, - reflect.TypeOf(uint32(0)): types.Dec | types.Hex, - reflect.TypeOf(uint64(0)): types.Dec | types.Hex, - // use default mode (allow dec/hex/oct) for uintptr type - reflect.TypeOf(big.Int{}): types.Dec | types.Hex, -} - -func intModeDefault(t reflect.Type) types.IntMode { - m, ok := typeModes[t] - if !ok { - m = types.Dec | types.Hex | types.Oct - } - return m -} - -func intSetter(d interface{}, blank bool, val string, t tag) error { - if blank { - return errBlankUnsupported - } - mode := intMode(t.intMode) - if mode == 0 { - mode = intModeDefault(reflect.TypeOf(d).Elem()) - } - return types.ParseInt(d, val, mode) -} - -func stringSetter(d interface{}, blank bool, val string, t tag) error { - if blank { - return errBlankUnsupported - } - dsp, ok := d.(*string) - if !ok { - return errUnsupportedType - } - *dsp = val - return nil -} - -var kindSetters = map[reflect.Kind]setter{ - reflect.String: stringSetter, - reflect.Bool: boolSetter, - reflect.Int: intSetter, - reflect.Int8: intSetter, - reflect.Int16: intSetter, - reflect.Int32: intSetter, - reflect.Int64: intSetter, - reflect.Uint: intSetter, - reflect.Uint8: intSetter, - reflect.Uint16: intSetter, - reflect.Uint32: intSetter, - reflect.Uint64: intSetter, - reflect.Uintptr: intSetter, -} - -var typeSetters = map[reflect.Type]setter{ - reflect.TypeOf(big.Int{}): intSetter, -} - -func typeSetter(d interface{}, blank bool, val string, tt tag) error { - t := reflect.ValueOf(d).Type().Elem() - setter, ok := typeSetters[t] - if !ok { - return errUnsupportedType - } - return setter(d, blank, val, tt) -} - -func kindSetter(d interface{}, blank bool, val string, tt tag) error { - k := reflect.ValueOf(d).Type().Elem().Kind() - setter, ok := kindSetters[k] - if !ok { - return errUnsupportedType - } - return setter(d, blank, val, tt) -} - -func scanSetter(d interface{}, blank bool, val string, tt tag) error { - if blank { - return errBlankUnsupported - } - return types.ScanFully(d, val, 'v') -} - -func newValue(sect string, vCfg reflect.Value, vType reflect.Type) (reflect.Value, error) { - pv := reflect.New(vType) - dfltName := "default-" + sect - dfltField, _ := fieldFold(vCfg, dfltName) - var err error - if dfltField.IsValid() { - b := bytes.NewBuffer(nil) - ge := gob.NewEncoder(b) - err = ge.EncodeValue(dfltField) - if err != nil { - return pv, err - } - gd := gob.NewDecoder(bytes.NewReader(b.Bytes())) - err = gd.DecodeValue(pv.Elem()) - if err != nil { - return pv, err - } - } - return pv, nil -} - -func set(c *warnings.Collector, cfg interface{}, sect, sub, name string, - blank bool, value string, subsectPass bool) error { - // - vPCfg := reflect.ValueOf(cfg) - if vPCfg.Kind() != reflect.Ptr || vPCfg.Elem().Kind() != reflect.Struct { - panic(fmt.Errorf("config must be a pointer to a struct")) - } - vCfg := vPCfg.Elem() - vSect, _ := fieldFold(vCfg, sect) - if !vSect.IsValid() { - err := extraData{section: sect} - return c.Collect(err) - } - isSubsect := vSect.Kind() == reflect.Map - if subsectPass != isSubsect { - return nil - } - if isSubsect { - vst := vSect.Type() - if vst.Key().Kind() != reflect.String || - vst.Elem().Kind() != reflect.Ptr || - vst.Elem().Elem().Kind() != reflect.Struct { - panic(fmt.Errorf("map field for section must have string keys and "+ - " pointer-to-struct values: section %q", sect)) - } - if vSect.IsNil() { - vSect.Set(reflect.MakeMap(vst)) - } - k := reflect.ValueOf(sub) - pv := vSect.MapIndex(k) - if !pv.IsValid() { - vType := vSect.Type().Elem().Elem() - var err error - pv, err = newValue(sect, vCfg, vType) - if err != nil { - return err - } - vSect.SetMapIndex(k, pv) - } - vSect = pv.Elem() - } else if vSect.Kind() != reflect.Struct { - panic(fmt.Errorf("field for section must be a map or a struct: "+ - "section %q", sect)) - } else if sub != "" { - err := extraData{section: sect, subsection: &sub} - return c.Collect(err) - } - // Empty name is a special value, meaning that only the - // section/subsection object is to be created, with no values set. - if name == "" { - return nil - } - vVar, t := fieldFold(vSect, name) - if !vVar.IsValid() { - var err error - if isSubsect { - err = extraData{section: sect, subsection: &sub, variable: &name} - } else { - err = extraData{section: sect, variable: &name} - } - return c.Collect(err) - } - // vVal is either single-valued var, or newly allocated value within multi-valued var - var vVal reflect.Value - // multi-value if unnamed slice type - isMulti := vVar.Type().Name() == "" && vVar.Kind() == reflect.Slice || - vVar.Type().Name() == "" && vVar.Kind() == reflect.Ptr && vVar.Type().Elem().Name() == "" && vVar.Type().Elem().Kind() == reflect.Slice - if isMulti && vVar.Kind() == reflect.Ptr { - if vVar.IsNil() { - vVar.Set(reflect.New(vVar.Type().Elem())) - } - vVar = vVar.Elem() - } - if isMulti && blank { - vVar.Set(reflect.Zero(vVar.Type())) - return nil - } - if isMulti { - vVal = reflect.New(vVar.Type().Elem()).Elem() - } else { - vVal = vVar - } - isDeref := vVal.Type().Name() == "" && vVal.Type().Kind() == reflect.Ptr - isNew := isDeref && vVal.IsNil() - // vAddr is address of value to set (dereferenced & allocated as needed) - var vAddr reflect.Value - switch { - case isNew: - vAddr = reflect.New(vVal.Type().Elem()) - case isDeref && !isNew: - vAddr = vVal - default: - vAddr = vVal.Addr() - } - vAddrI := vAddr.Interface() - err, ok := error(nil), false - for _, s := range setters { - err = s(vAddrI, blank, value, t) - if err == nil { - ok = true - break - } - if err != errUnsupportedType { - return err - } - } - if !ok { - // in case all setters returned errUnsupportedType - return err - } - if isNew { // set reference if it was dereferenced and newly allocated - vVal.Set(vAddr) - } - if isMulti { // append if multi-valued - vVar.Set(reflect.Append(vVar, vVal)) - } - return nil -} diff --git a/vendor/gopkg.in/gcfg.v1/token/position.go b/vendor/gopkg.in/gcfg.v1/token/position.go deleted file mode 100644 index fc45c1e76..000000000 --- a/vendor/gopkg.in/gcfg.v1/token/position.go +++ /dev/null @@ -1,435 +0,0 @@ -// Copyright 2010 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// TODO(gri) consider making this a separate package outside the go directory. - -package token - -import ( - "fmt" - "sort" - "sync" -) - -// ----------------------------------------------------------------------------- -// Positions - -// Position describes an arbitrary source position -// including the file, line, and column location. -// A Position is valid if the line number is > 0. -// -type Position struct { - Filename string // filename, if any - Offset int // offset, starting at 0 - Line int // line number, starting at 1 - Column int // column number, starting at 1 (character count) -} - -// IsValid returns true if the position is valid. -func (pos *Position) IsValid() bool { return pos.Line > 0 } - -// String returns a string in one of several forms: -// -// file:line:column valid position with file name -// line:column valid position without file name -// file invalid position with file name -// - invalid position without file name -// -func (pos Position) String() string { - s := pos.Filename - if pos.IsValid() { - if s != "" { - s += ":" - } - s += fmt.Sprintf("%d:%d", pos.Line, pos.Column) - } - if s == "" { - s = "-" - } - return s -} - -// Pos is a compact encoding of a source position within a file set. -// It can be converted into a Position for a more convenient, but much -// larger, representation. -// -// The Pos value for a given file is a number in the range [base, base+size], -// where base and size are specified when adding the file to the file set via -// AddFile. -// -// To create the Pos value for a specific source offset, first add -// the respective file to the current file set (via FileSet.AddFile) -// and then call File.Pos(offset) for that file. Given a Pos value p -// for a specific file set fset, the corresponding Position value is -// obtained by calling fset.Position(p). -// -// Pos values can be compared directly with the usual comparison operators: -// If two Pos values p and q are in the same file, comparing p and q is -// equivalent to comparing the respective source file offsets. If p and q -// are in different files, p < q is true if the file implied by p was added -// to the respective file set before the file implied by q. -// -type Pos int - -// The zero value for Pos is NoPos; there is no file and line information -// associated with it, and NoPos().IsValid() is false. NoPos is always -// smaller than any other Pos value. The corresponding Position value -// for NoPos is the zero value for Position. -// -const NoPos Pos = 0 - -// IsValid returns true if the position is valid. -func (p Pos) IsValid() bool { - return p != NoPos -} - -// ----------------------------------------------------------------------------- -// File - -// A File is a handle for a file belonging to a FileSet. -// A File has a name, size, and line offset table. -// -type File struct { - set *FileSet - name string // file name as provided to AddFile - base int // Pos value range for this file is [base...base+size] - size int // file size as provided to AddFile - - // lines and infos are protected by set.mutex - lines []int - infos []lineInfo -} - -// Name returns the file name of file f as registered with AddFile. -func (f *File) Name() string { - return f.name -} - -// Base returns the base offset of file f as registered with AddFile. -func (f *File) Base() int { - return f.base -} - -// Size returns the size of file f as registered with AddFile. -func (f *File) Size() int { - return f.size -} - -// LineCount returns the number of lines in file f. -func (f *File) LineCount() int { - f.set.mutex.RLock() - n := len(f.lines) - f.set.mutex.RUnlock() - return n -} - -// AddLine adds the line offset for a new line. -// The line offset must be larger than the offset for the previous line -// and smaller than the file size; otherwise the line offset is ignored. -// -func (f *File) AddLine(offset int) { - f.set.mutex.Lock() - if i := len(f.lines); (i == 0 || f.lines[i-1] < offset) && offset < f.size { - f.lines = append(f.lines, offset) - } - f.set.mutex.Unlock() -} - -// SetLines sets the line offsets for a file and returns true if successful. -// The line offsets are the offsets of the first character of each line; -// for instance for the content "ab\nc\n" the line offsets are {0, 3}. -// An empty file has an empty line offset table. -// Each line offset must be larger than the offset for the previous line -// and smaller than the file size; otherwise SetLines fails and returns -// false. -// -func (f *File) SetLines(lines []int) bool { - // verify validity of lines table - size := f.size - for i, offset := range lines { - if i > 0 && offset <= lines[i-1] || size <= offset { - return false - } - } - - // set lines table - f.set.mutex.Lock() - f.lines = lines - f.set.mutex.Unlock() - return true -} - -// SetLinesForContent sets the line offsets for the given file content. -func (f *File) SetLinesForContent(content []byte) { - var lines []int - line := 0 - for offset, b := range content { - if line >= 0 { - lines = append(lines, line) - } - line = -1 - if b == '\n' { - line = offset + 1 - } - } - - // set lines table - f.set.mutex.Lock() - f.lines = lines - f.set.mutex.Unlock() -} - -// A lineInfo object describes alternative file and line number -// information (such as provided via a //line comment in a .go -// file) for a given file offset. -type lineInfo struct { - // fields are exported to make them accessible to gob - Offset int - Filename string - Line int -} - -// AddLineInfo adds alternative file and line number information for -// a given file offset. The offset must be larger than the offset for -// the previously added alternative line info and smaller than the -// file size; otherwise the information is ignored. -// -// AddLineInfo is typically used to register alternative position -// information for //line filename:line comments in source files. -// -func (f *File) AddLineInfo(offset int, filename string, line int) { - f.set.mutex.Lock() - if i := len(f.infos); i == 0 || f.infos[i-1].Offset < offset && offset < f.size { - f.infos = append(f.infos, lineInfo{offset, filename, line}) - } - f.set.mutex.Unlock() -} - -// Pos returns the Pos value for the given file offset; -// the offset must be <= f.Size(). -// f.Pos(f.Offset(p)) == p. -// -func (f *File) Pos(offset int) Pos { - if offset > f.size { - panic("illegal file offset") - } - return Pos(f.base + offset) -} - -// Offset returns the offset for the given file position p; -// p must be a valid Pos value in that file. -// f.Offset(f.Pos(offset)) == offset. -// -func (f *File) Offset(p Pos) int { - if int(p) < f.base || int(p) > f.base+f.size { - panic("illegal Pos value") - } - return int(p) - f.base -} - -// Line returns the line number for the given file position p; -// p must be a Pos value in that file or NoPos. -// -func (f *File) Line(p Pos) int { - // TODO(gri) this can be implemented much more efficiently - return f.Position(p).Line -} - -func searchLineInfos(a []lineInfo, x int) int { - return sort.Search(len(a), func(i int) bool { return a[i].Offset > x }) - 1 -} - -// info returns the file name, line, and column number for a file offset. -func (f *File) info(offset int) (filename string, line, column int) { - filename = f.name - if i := searchInts(f.lines, offset); i >= 0 { - line, column = i+1, offset-f.lines[i]+1 - } - if len(f.infos) > 0 { - // almost no files have extra line infos - if i := searchLineInfos(f.infos, offset); i >= 0 { - alt := &f.infos[i] - filename = alt.Filename - if i := searchInts(f.lines, alt.Offset); i >= 0 { - line += alt.Line - i - 1 - } - } - } - return -} - -func (f *File) position(p Pos) (pos Position) { - offset := int(p) - f.base - pos.Offset = offset - pos.Filename, pos.Line, pos.Column = f.info(offset) - return -} - -// Position returns the Position value for the given file position p; -// p must be a Pos value in that file or NoPos. -// -func (f *File) Position(p Pos) (pos Position) { - if p != NoPos { - if int(p) < f.base || int(p) > f.base+f.size { - panic("illegal Pos value") - } - pos = f.position(p) - } - return -} - -// ----------------------------------------------------------------------------- -// FileSet - -// A FileSet represents a set of source files. -// Methods of file sets are synchronized; multiple goroutines -// may invoke them concurrently. -// -type FileSet struct { - mutex sync.RWMutex // protects the file set - base int // base offset for the next file - files []*File // list of files in the order added to the set - last *File // cache of last file looked up -} - -// NewFileSet creates a new file set. -func NewFileSet() *FileSet { - s := new(FileSet) - s.base = 1 // 0 == NoPos - return s -} - -// Base returns the minimum base offset that must be provided to -// AddFile when adding the next file. -// -func (s *FileSet) Base() int { - s.mutex.RLock() - b := s.base - s.mutex.RUnlock() - return b - -} - -// AddFile adds a new file with a given filename, base offset, and file size -// to the file set s and returns the file. Multiple files may have the same -// name. The base offset must not be smaller than the FileSet's Base(), and -// size must not be negative. -// -// Adding the file will set the file set's Base() value to base + size + 1 -// as the minimum base value for the next file. The following relationship -// exists between a Pos value p for a given file offset offs: -// -// int(p) = base + offs -// -// with offs in the range [0, size] and thus p in the range [base, base+size]. -// For convenience, File.Pos may be used to create file-specific position -// values from a file offset. -// -func (s *FileSet) AddFile(filename string, base, size int) *File { - s.mutex.Lock() - defer s.mutex.Unlock() - if base < s.base || size < 0 { - panic("illegal base or size") - } - // base >= s.base && size >= 0 - f := &File{s, filename, base, size, []int{0}, nil} - base += size + 1 // +1 because EOF also has a position - if base < 0 { - panic("token.Pos offset overflow (> 2G of source code in file set)") - } - // add the file to the file set - s.base = base - s.files = append(s.files, f) - s.last = f - return f -} - -// Iterate calls f for the files in the file set in the order they were added -// until f returns false. -// -func (s *FileSet) Iterate(f func(*File) bool) { - for i := 0; ; i++ { - var file *File - s.mutex.RLock() - if i < len(s.files) { - file = s.files[i] - } - s.mutex.RUnlock() - if file == nil || !f(file) { - break - } - } -} - -func searchFiles(a []*File, x int) int { - return sort.Search(len(a), func(i int) bool { return a[i].base > x }) - 1 -} - -func (s *FileSet) file(p Pos) *File { - // common case: p is in last file - if f := s.last; f != nil && f.base <= int(p) && int(p) <= f.base+f.size { - return f - } - // p is not in last file - search all files - if i := searchFiles(s.files, int(p)); i >= 0 { - f := s.files[i] - // f.base <= int(p) by definition of searchFiles - if int(p) <= f.base+f.size { - s.last = f - return f - } - } - return nil -} - -// File returns the file that contains the position p. -// If no such file is found (for instance for p == NoPos), -// the result is nil. -// -func (s *FileSet) File(p Pos) (f *File) { - if p != NoPos { - s.mutex.RLock() - f = s.file(p) - s.mutex.RUnlock() - } - return -} - -// Position converts a Pos in the fileset into a general Position. -func (s *FileSet) Position(p Pos) (pos Position) { - if p != NoPos { - s.mutex.RLock() - if f := s.file(p); f != nil { - pos = f.position(p) - } - s.mutex.RUnlock() - } - return -} - -// ----------------------------------------------------------------------------- -// Helper functions - -func searchInts(a []int, x int) int { - // This function body is a manually inlined version of: - // - // return sort.Search(len(a), func(i int) bool { return a[i] > x }) - 1 - // - // With better compiler optimizations, this may not be needed in the - // future, but at the moment this change improves the go/printer - // benchmark performance by ~30%. This has a direct impact on the - // speed of gofmt and thus seems worthwhile (2011-04-29). - // TODO(gri): Remove this when compilers have caught up. - i, j := 0, len(a) - for i < j { - h := i + (j-i)/2 // avoid overflow when computing h - // i ≤ h < j - if a[h] <= x { - i = h + 1 - } else { - j = h - } - } - return i - 1 -} diff --git a/vendor/gopkg.in/gcfg.v1/token/serialize.go b/vendor/gopkg.in/gcfg.v1/token/serialize.go deleted file mode 100644 index 4adc8f9e3..000000000 --- a/vendor/gopkg.in/gcfg.v1/token/serialize.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package token - -type serializedFile struct { - // fields correspond 1:1 to fields with same (lower-case) name in File - Name string - Base int - Size int - Lines []int - Infos []lineInfo -} - -type serializedFileSet struct { - Base int - Files []serializedFile -} - -// Read calls decode to deserialize a file set into s; s must not be nil. -func (s *FileSet) Read(decode func(interface{}) error) error { - var ss serializedFileSet - if err := decode(&ss); err != nil { - return err - } - - s.mutex.Lock() - s.base = ss.Base - files := make([]*File, len(ss.Files)) - for i := 0; i < len(ss.Files); i++ { - f := &ss.Files[i] - files[i] = &File{s, f.Name, f.Base, f.Size, f.Lines, f.Infos} - } - s.files = files - s.last = nil - s.mutex.Unlock() - - return nil -} - -// Write calls encode to serialize the file set s. -func (s *FileSet) Write(encode func(interface{}) error) error { - var ss serializedFileSet - - s.mutex.Lock() - ss.Base = s.base - files := make([]serializedFile, len(s.files)) - for i, f := range s.files { - files[i] = serializedFile{f.name, f.base, f.size, f.lines, f.infos} - } - ss.Files = files - s.mutex.Unlock() - - return encode(ss) -} diff --git a/vendor/gopkg.in/gcfg.v1/token/token.go b/vendor/gopkg.in/gcfg.v1/token/token.go deleted file mode 100644 index b3c7c83fa..000000000 --- a/vendor/gopkg.in/gcfg.v1/token/token.go +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package token defines constants representing the lexical tokens of the gcfg -// configuration syntax and basic operations on tokens (printing, predicates). -// -// Note that the API for the token package may change to accommodate new -// features or implementation changes in gcfg. -// -package token - -import "strconv" - -// Token is the set of lexical tokens of the gcfg configuration syntax. -type Token int - -// The list of tokens. -const ( - // Special tokens - ILLEGAL Token = iota - EOF - COMMENT - - literal_beg - // Identifiers and basic type literals - // (these tokens stand for classes of literals) - IDENT // section-name, variable-name - STRING // "subsection-name", variable value - literal_end - - operator_beg - // Operators and delimiters - ASSIGN // = - LBRACK // [ - RBRACK // ] - EOL // \n - operator_end -) - -var tokens = [...]string{ - ILLEGAL: "ILLEGAL", - - EOF: "EOF", - COMMENT: "COMMENT", - - IDENT: "IDENT", - STRING: "STRING", - - ASSIGN: "=", - LBRACK: "[", - RBRACK: "]", - EOL: "\n", -} - -// String returns the string corresponding to the token tok. -// For operators and delimiters, the string is the actual token character -// sequence (e.g., for the token ASSIGN, the string is "="). For all other -// tokens the string corresponds to the token constant name (e.g. for the -// token IDENT, the string is "IDENT"). -// -func (tok Token) String() string { - s := "" - if 0 <= tok && tok < Token(len(tokens)) { - s = tokens[tok] - } - if s == "" { - s = "token(" + strconv.Itoa(int(tok)) + ")" - } - return s -} - -// Predicates - -// IsLiteral returns true for tokens corresponding to identifiers -// and basic type literals; it returns false otherwise. -// -func (tok Token) IsLiteral() bool { return literal_beg < tok && tok < literal_end } - -// IsOperator returns true for tokens corresponding to operators and -// delimiters; it returns false otherwise. -// -func (tok Token) IsOperator() bool { return operator_beg < tok && tok < operator_end } diff --git a/vendor/gopkg.in/gcfg.v1/types/bool.go b/vendor/gopkg.in/gcfg.v1/types/bool.go deleted file mode 100644 index 8dcae0d8c..000000000 --- a/vendor/gopkg.in/gcfg.v1/types/bool.go +++ /dev/null @@ -1,23 +0,0 @@ -package types - -// BoolValues defines the name and value mappings for ParseBool. -var BoolValues = map[string]interface{}{ - "true": true, "yes": true, "on": true, "1": true, - "false": false, "no": false, "off": false, "0": false, -} - -var boolParser = func() *EnumParser { - ep := &EnumParser{} - ep.AddVals(BoolValues) - return ep -}() - -// ParseBool parses bool values according to the definitions in BoolValues. -// Parsing is case-insensitive. -func ParseBool(s string) (bool, error) { - v, err := boolParser.Parse(s) - if err != nil { - return false, err - } - return v.(bool), nil -} diff --git a/vendor/gopkg.in/gcfg.v1/types/doc.go b/vendor/gopkg.in/gcfg.v1/types/doc.go deleted file mode 100644 index 9f9c345f6..000000000 --- a/vendor/gopkg.in/gcfg.v1/types/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -// Package types defines helpers for type conversions. -// -// The API for this package is not finalized yet. -package types diff --git a/vendor/gopkg.in/gcfg.v1/types/enum.go b/vendor/gopkg.in/gcfg.v1/types/enum.go deleted file mode 100644 index 1a0c7ef45..000000000 --- a/vendor/gopkg.in/gcfg.v1/types/enum.go +++ /dev/null @@ -1,44 +0,0 @@ -package types - -import ( - "fmt" - "reflect" - "strings" -) - -// EnumParser parses "enum" values; i.e. a predefined set of strings to -// predefined values. -type EnumParser struct { - Type string // type name; if not set, use type of first value added - CaseMatch bool // if true, matching of strings is case-sensitive - // PrefixMatch bool - vals map[string]interface{} -} - -// AddVals adds strings and values to an EnumParser. -func (ep *EnumParser) AddVals(vals map[string]interface{}) { - if ep.vals == nil { - ep.vals = make(map[string]interface{}) - } - for k, v := range vals { - if ep.Type == "" { - ep.Type = reflect.TypeOf(v).Name() - } - if !ep.CaseMatch { - k = strings.ToLower(k) - } - ep.vals[k] = v - } -} - -// Parse parses the string and returns the value or an error. -func (ep EnumParser) Parse(s string) (interface{}, error) { - if !ep.CaseMatch { - s = strings.ToLower(s) - } - v, ok := ep.vals[s] - if !ok { - return false, fmt.Errorf("failed to parse %s %#q", ep.Type, s) - } - return v, nil -} diff --git a/vendor/gopkg.in/gcfg.v1/types/int.go b/vendor/gopkg.in/gcfg.v1/types/int.go deleted file mode 100644 index af7e75c12..000000000 --- a/vendor/gopkg.in/gcfg.v1/types/int.go +++ /dev/null @@ -1,86 +0,0 @@ -package types - -import ( - "fmt" - "strings" -) - -// An IntMode is a mode for parsing integer values, representing a set of -// accepted bases. -type IntMode uint8 - -// IntMode values for ParseInt; can be combined using binary or. -const ( - Dec IntMode = 1 << iota - Hex - Oct -) - -// String returns a string representation of IntMode; e.g. `IntMode(Dec|Hex)`. -func (m IntMode) String() string { - var modes []string - if m&Dec != 0 { - modes = append(modes, "Dec") - } - if m&Hex != 0 { - modes = append(modes, "Hex") - } - if m&Oct != 0 { - modes = append(modes, "Oct") - } - return "IntMode(" + strings.Join(modes, "|") + ")" -} - -var errIntAmbig = fmt.Errorf("ambiguous integer value; must include '0' prefix") - -func prefix0(val string) bool { - return strings.HasPrefix(val, "0") || strings.HasPrefix(val, "-0") -} - -func prefix0x(val string) bool { - return strings.HasPrefix(val, "0x") || strings.HasPrefix(val, "-0x") -} - -// ParseInt parses val using mode into intptr, which must be a pointer to an -// integer kind type. Non-decimal value require prefix `0` or `0x` in the cases -// when mode permits ambiguity of base; otherwise the prefix can be omitted. -func ParseInt(intptr interface{}, val string, mode IntMode) error { - val = strings.TrimSpace(val) - verb := byte(0) - switch mode { - case Dec: - verb = 'd' - case Dec + Hex: - if prefix0x(val) { - verb = 'v' - } else { - verb = 'd' - } - case Dec + Oct: - if prefix0(val) && !prefix0x(val) { - verb = 'v' - } else { - verb = 'd' - } - case Dec + Hex + Oct: - verb = 'v' - case Hex: - if prefix0x(val) { - verb = 'v' - } else { - verb = 'x' - } - case Oct: - verb = 'o' - case Hex + Oct: - if prefix0(val) { - verb = 'v' - } else { - return errIntAmbig - } - } - if verb == 0 { - panic("unsupported mode") - } - return ScanFully(intptr, val, verb) -} diff --git a/vendor/gopkg.in/gcfg.v1/types/scan.go b/vendor/gopkg.in/gcfg.v1/types/scan.go deleted file mode 100644 index db2f6ed3c..000000000 --- a/vendor/gopkg.in/gcfg.v1/types/scan.go +++ /dev/null @@ -1,23 +0,0 @@ -package types - -import ( - "fmt" - "io" - "reflect" -) - -// ScanFully uses fmt.Sscanf with verb to fully scan val into ptr. -func ScanFully(ptr interface{}, val string, verb byte) error { - t := reflect.ValueOf(ptr).Elem().Type() - // attempt to read extra bytes to make sure the value is consumed - var b []byte - n, err := fmt.Sscanf(val, "%"+string(verb)+"%s", ptr, &b) - switch { - case n < 1 || n == 1 && err != io.EOF: - return fmt.Errorf("failed to parse %q as %v: %v", val, t, err) - case n > 1: - return fmt.Errorf("failed to parse %q as %v: extra characters %q", val, t, string(b)) - } - // n == 1 && err == io.EOF - return nil -} diff --git a/vendor/gopkg.in/go-playground/pool.v3/batch_limited_test.go b/vendor/gopkg.in/go-playground/pool.v3/batch_limited_test.go new file mode 100644 index 000000000..6eae3226c --- /dev/null +++ b/vendor/gopkg.in/go-playground/pool.v3/batch_limited_test.go @@ -0,0 +1,172 @@ +package pool + +import ( + "sync" + "testing" + "time" + + . "gopkg.in/go-playground/assert.v1" +) + +// NOTES: +// - Run "go test" to run tests +// - Run "gocov test | gocov report" to report on test converage by file +// - Run "gocov test | gocov annotate -" to report on all code and functions, those ,marked with "MISS" were never called +// +// or +// +// -- may be a good idea to change to output path to somewherelike /tmp +// go test -coverprofile cover.out && go tool cover -html=cover.out -o cover.html +// + +func TestLimitedBatch(t *testing.T) { + + newFunc := func(i int) func(WorkUnit) (interface{}, error) { + return func(WorkUnit) (interface{}, error) { + time.Sleep(time.Second * 1) + return i, nil + } + } + + pool := NewLimited(4) + defer pool.Close() + + batch := pool.Batch() + + for i := 0; i < 4; i++ { + batch.Queue(newFunc(i)) + } + + batch.QueueComplete() + + var count int + + for range batch.Results() { + count++ + } + + Equal(t, count, 4) +} + +func TestLimitedBatchGlobalPool(t *testing.T) { + + newFunc := func(i int) func(WorkUnit) (interface{}, error) { + return func(WorkUnit) (interface{}, error) { + time.Sleep(time.Second * 1) + return i, nil + } + } + + batch := limitedGpool.Batch() + + for i := 0; i < 4; i++ { + batch.Queue(newFunc(i)) + } + + batch.QueueComplete() + + var count int + + for range batch.Results() { + count++ + } + + Equal(t, count, 4) +} + +func TestLimitedBatchCancelItemsThrownAway(t *testing.T) { + + newFunc := func(i int) func(WorkUnit) (interface{}, error) { + return func(WorkUnit) (interface{}, error) { + time.Sleep(time.Second * 1) + return i, nil + } + } + + pool := NewLimited(4) + defer pool.Close() + + batch := pool.Batch() + + go func() { + for i := 0; i < 40; i++ { + batch.Queue(newFunc(i)) + } + }() + + batch.Cancel() + + var count int + + for range batch.Results() { + count++ + } + + NotEqual(t, count, 40) +} + +func TestLimitedBatchCancelItemsCancelledAfterward(t *testing.T) { + + newFunc := func(i int) func(WorkUnit) (interface{}, error) { + return func(WorkUnit) (interface{}, error) { + time.Sleep(time.Second * 1) + return i, nil + } + } + + pool := NewLimited(4) + defer pool.Close() + + batch := pool.Batch() + + go func() { + for i := 0; i < 40; i++ { + batch.Queue(newFunc(i)) + } + }() + + time.Sleep(time.Second * 2) + batch.Cancel() + + var count int + + for range batch.Results() { + count++ + } + + Equal(t, count, 40) +} + +func TestLimitedBatchWaitAll(t *testing.T) { + + var count int + var m sync.Mutex + + newFunc := func(i int) func(WorkUnit) (interface{}, error) { + return func(WorkUnit) (interface{}, error) { + time.Sleep(time.Second * 1) + m.Lock() + count++ + m.Unlock() + return i, nil + } + } + + pool := NewLimited(4) + defer pool.Close() + + batch := pool.Batch() + + go func() { + + for i := 0; i < 10; i++ { + batch.Queue(newFunc(i)) + } + + batch.QueueComplete() + }() + + batch.WaitAll() + + Equal(t, count, 10) +} diff --git a/vendor/gopkg.in/go-playground/pool.v3/batch_unlimited_test.go b/vendor/gopkg.in/go-playground/pool.v3/batch_unlimited_test.go new file mode 100644 index 000000000..ad234bc56 --- /dev/null +++ b/vendor/gopkg.in/go-playground/pool.v3/batch_unlimited_test.go @@ -0,0 +1,172 @@ +package pool + +import ( + "sync" + "testing" + "time" + + . "gopkg.in/go-playground/assert.v1" +) + +// NOTES: +// - Run "go test" to run tests +// - Run "gocov test | gocov report" to report on test converage by file +// - Run "gocov test | gocov annotate -" to report on all code and functions, those ,marked with "MISS" were never called +// +// or +// +// -- may be a good idea to change to output path to somewherelike /tmp +// go test -coverprofile cover.out && go tool cover -html=cover.out -o cover.html +// + +func TestUnlimitedBatch(t *testing.T) { + + newFunc := func(i int) func(WorkUnit) (interface{}, error) { + return func(WorkUnit) (interface{}, error) { + time.Sleep(time.Second * 1) + return i, nil + } + } + + pool := New() + defer pool.Close() + + batch := pool.Batch() + + for i := 0; i < 4; i++ { + batch.Queue(newFunc(i)) + } + + batch.QueueComplete() + + var count int + + for range batch.Results() { + count++ + } + + Equal(t, count, 4) +} + +func TestUnlimitedBatchGlobalPool(t *testing.T) { + + newFunc := func(i int) func(WorkUnit) (interface{}, error) { + return func(WorkUnit) (interface{}, error) { + time.Sleep(time.Second * 1) + return i, nil + } + } + + batch := unlimitedGpool.Batch() + + for i := 0; i < 4; i++ { + batch.Queue(newFunc(i)) + } + + batch.QueueComplete() + + var count int + + for range batch.Results() { + count++ + } + + Equal(t, count, 4) +} + +func TestUnlimitedBatchCancelItemsThrownAway(t *testing.T) { + + newFunc := func(i int) func(WorkUnit) (interface{}, error) { + return func(WorkUnit) (interface{}, error) { + time.Sleep(time.Second * 1) + return i, nil + } + } + + pool := New() + defer pool.Close() + + batch := pool.Batch() + + go func() { + for i := 0; i < 40; i++ { + batch.Queue(newFunc(i)) + } + }() + + batch.Cancel() + + var count int + + for range batch.Results() { + count++ + } + + NotEqual(t, count, 40) +} + +func TestUnlimitedBatchCancelItemsCancelledAfterward(t *testing.T) { + + newFunc := func(i int) func(WorkUnit) (interface{}, error) { + return func(WorkUnit) (interface{}, error) { + time.Sleep(time.Second * 1) + return i, nil + } + } + + pool := New() + defer pool.Close() + + batch := pool.Batch() + + go func() { + for i := 0; i < 40; i++ { + batch.Queue(newFunc(i)) + } + }() + + time.Sleep(time.Second * 2) + batch.Cancel() + + var count int + + for range batch.Results() { + count++ + } + + Equal(t, count, 40) +} + +func TestUnlimitedBatchWaitAll(t *testing.T) { + + var count int + var m sync.Mutex + + newFunc := func(i int) func(WorkUnit) (interface{}, error) { + return func(WorkUnit) (interface{}, error) { + time.Sleep(time.Second * 1) + m.Lock() + count++ + m.Unlock() + return i, nil + } + } + + pool := New() + defer pool.Close() + + batch := pool.Batch() + + go func() { + + for i := 0; i < 10; i++ { + batch.Queue(newFunc(i)) + } + + batch.QueueComplete() + }() + + batch.WaitAll() + + Equal(t, count, 10) +} diff --git a/vendor/gopkg.in/go-playground/pool.v3/limited_pool_benchmarks_test.go b/vendor/gopkg.in/go-playground/pool.v3/limited_pool_benchmarks_test.go new file mode 100644 index 000000000..6ae5e9b97 --- /dev/null +++ b/vendor/gopkg.in/go-playground/pool.v3/limited_pool_benchmarks_test.go @@ -0,0 +1,185 @@ +package pool + +import ( + "testing" + "time" +) + +func BenchmarkLimitedSmallRun(b *testing.B) { + + res := make([]WorkUnit, 10) + + b.ReportAllocs() + + pool := NewLimited(10) + defer pool.Close() + + fn := func(wu WorkUnit) (interface{}, error) { + time.Sleep(time.Millisecond * 500) + if wu.IsCancelled() { + return nil, nil + } + time.Sleep(time.Millisecond * 500) + return 1, nil + } + + for i := 0; i < 10; i++ { + res[i] = pool.Queue(fn) + } + + var count int + + for _, cw := range res { + + cw.Wait() + + if cw.Error() == nil { + count += cw.Value().(int) + } + } + + if count != 10 { + b.Fatal("Count Incorrect") + } +} + +func BenchmarkLimitedSmallCancel(b *testing.B) { + + res := make([]WorkUnit, 0, 20) + + b.ReportAllocs() + + pool := NewLimited(4) + defer pool.Close() + + newFunc := func(i int) WorkFunc { + return func(wu WorkUnit) (interface{}, error) { + time.Sleep(time.Millisecond * 500) + if wu.IsCancelled() { + return nil, nil + } + time.Sleep(time.Millisecond * 500) + return i, nil + } + } + + for i := 0; i < 20; i++ { + if i == 6 { + pool.Cancel() + } + res = append(res, pool.Queue(newFunc(i))) + } + + for _, wrk := range res { + if wrk == nil { + continue + } + wrk.Wait() + } +} + +func BenchmarkLimitedLargeCancel(b *testing.B) { + + res := make([]WorkUnit, 0, 1000) + + b.ReportAllocs() + + pool := NewLimited(4) + defer pool.Close() + + newFunc := func(i int) WorkFunc { + return func(wu WorkUnit) (interface{}, error) { + time.Sleep(time.Millisecond * 500) + if wu.IsCancelled() { + return nil, nil + } + time.Sleep(time.Millisecond * 500) + return i, nil + } + } + + for i := 0; i < 1000; i++ { + if i == 6 { + pool.Cancel() + } + res = append(res, pool.Queue(newFunc(i))) + } + + for _, wrk := range res { + if wrk == nil { + continue + } + wrk.Wait() + } +} + +func BenchmarkLimitedOverconsumeLargeRun(b *testing.B) { + + res := make([]WorkUnit, 100) + + b.ReportAllocs() + + pool := NewLimited(25) + defer pool.Close() + + newFunc := func(i int) WorkFunc { + return func(wu WorkUnit) (interface{}, error) { + time.Sleep(time.Millisecond * 500) + if wu.IsCancelled() { + return nil, nil + } + time.Sleep(time.Millisecond * 500) + return 1, nil + } + } + + for i := 0; i < 100; i++ { + res[i] = pool.Queue(newFunc(i)) + } + + var count int + + for _, cw := range res { + + cw.Wait() + + count += cw.Value().(int) + } + + if count != 100 { + b.Fatalf("Count Incorrect, Expected '100' Got '%d'", count) + } +} + +func BenchmarkLimitedBatchSmallRun(b *testing.B) { + + fn := func(wu WorkUnit) (interface{}, error) { + time.Sleep(time.Millisecond * 500) + if wu.IsCancelled() { + return nil, nil + } + time.Sleep(time.Millisecond * 500) + return 1, nil + } + + pool := NewLimited(10) + defer pool.Close() + + batch := pool.Batch() + + for i := 0; i < 10; i++ { + batch.Queue(fn) + } + + batch.QueueComplete() + + var count int + + for cw := range batch.Results() { + count += cw.Value().(int) + } + + if count != 10 { + b.Fatal("Count Incorrect") + } +} diff --git a/vendor/gopkg.in/go-playground/pool.v3/limited_pool_test.go b/vendor/gopkg.in/go-playground/pool.v3/limited_pool_test.go new file mode 100644 index 000000000..d3323e4d3 --- /dev/null +++ b/vendor/gopkg.in/go-playground/pool.v3/limited_pool_test.go @@ -0,0 +1,177 @@ +package pool + +import ( + "sync" + "testing" + "time" + + . "gopkg.in/go-playground/assert.v1" +) + +// NOTES: +// - Run "go test" to run tests +// - Run "gocov test | gocov report" to report on test converage by file +// - Run "gocov test | gocov annotate -" to report on all code and functions, those ,marked with "MISS" were never called +// +// or +// +// -- may be a good idea to change to output path to somewherelike /tmp +// go test -coverprofile cover.out && go tool cover -html=cover.out -o cover.html +// + +func TestPool(t *testing.T) { + + var res []WorkUnit + + pool := NewLimited(4) + defer pool.Close() + + newFunc := func(d time.Duration) WorkFunc { + return func(WorkUnit) (interface{}, error) { + time.Sleep(d) + return nil, nil + } + } + + for i := 0; i < 4; i++ { + wu := pool.Queue(newFunc(time.Second * 1)) + res = append(res, wu) + } + + var count int + + for _, wu := range res { + wu.Wait() + Equal(t, wu.Error(), nil) + Equal(t, wu.Value(), nil) + count++ + } + + Equal(t, count, 4) + + pool.Close() // testing no error occurs as Close will be called twice once defer pool.Close() fires +} + +func TestCancel(t *testing.T) { + + m := new(sync.RWMutex) + var closed bool + c := make(chan WorkUnit, 100) + + pool := limitedGpool + defer pool.Close() + + newFunc := func(d time.Duration) WorkFunc { + return func(WorkUnit) (interface{}, error) { + time.Sleep(d) + return 1, nil + } + } + + go func(ch chan WorkUnit) { + for i := 0; i < 40; i++ { + + go func(ch chan WorkUnit) { + m.RLock() + if closed { + m.RUnlock() + return + } + + ch <- pool.Queue(newFunc(time.Second * 1)) + m.RUnlock() + }(ch) + } + }(c) + + time.Sleep(time.Second * 1) + pool.Cancel() + m.Lock() + closed = true + close(c) + m.Unlock() + + var count int + + for wu := range c { + wu.Wait() + + if wu.Error() != nil { + _, ok := wu.Error().(*ErrCancelled) + if !ok { + _, ok = wu.Error().(*ErrPoolClosed) + if ok { + Equal(t, wu.Error().Error(), "ERROR: Work Unit added/run after the pool had been closed or cancelled") + } + } else { + Equal(t, wu.Error().Error(), "ERROR: Work Unit Cancelled") + } + + Equal(t, ok, true) + continue + } + + count += wu.Value().(int) + } + + NotEqual(t, count, 40) + + // reset and test again + pool.Reset() + + wrk := pool.Queue(newFunc(time.Millisecond * 300)) + wrk.Wait() + + _, ok := wrk.Value().(int) + Equal(t, ok, true) + + wrk = pool.Queue(newFunc(time.Millisecond * 300)) + time.Sleep(time.Second * 1) + wrk.Cancel() + wrk.Wait() // proving we don't get stuck here after cancel + Equal(t, wrk.Error(), nil) + + pool.Reset() // testing that we can do this and nothing bad will happen as it checks if pool closed + + pool.Close() + + wu := pool.Queue(newFunc(time.Second * 1)) + wu.Wait() + NotEqual(t, wu.Error(), nil) + Equal(t, wu.Error().Error(), "ERROR: Work Unit added/run after the pool had been closed or cancelled") +} + +func TestPanicRecovery(t *testing.T) { + + pool := NewLimited(2) + defer pool.Close() + + newFunc := func(d time.Duration, i int) WorkFunc { + return func(WorkUnit) (interface{}, error) { + if i == 1 { + panic("OMG OMG OMG! something bad happened!") + } + time.Sleep(d) + return 1, nil + } + } + + var wrk WorkUnit + for i := 0; i < 4; i++ { + time.Sleep(time.Second * 1) + if i == 1 { + wrk = pool.Queue(newFunc(time.Second*1, i)) + continue + } + pool.Queue(newFunc(time.Second*1, i)) + } + wrk.Wait() + + NotEqual(t, wrk.Error(), nil) + Equal(t, wrk.Error().Error()[0:90], "ERROR: Work Unit failed due to a recoverable error: 'OMG OMG OMG! something bad happened!'") + +} + +func TestBadWorkerCount(t *testing.T) { + PanicMatches(t, func() { NewLimited(0) }, "invalid workers '0'") +} diff --git a/vendor/gopkg.in/go-playground/pool.v3/pool_test.go b/vendor/gopkg.in/go-playground/pool.v3/pool_test.go new file mode 100644 index 000000000..d79375553 --- /dev/null +++ b/vendor/gopkg.in/go-playground/pool.v3/pool_test.go @@ -0,0 +1,36 @@ +package pool + +import ( + "os" + "testing" +) + +// NOTES: +// - Run "go test" to run tests +// - Run "gocov test | gocov report" to report on test converage by file +// - Run "gocov test | gocov annotate -" to report on all code and functions, those ,marked with "MISS" were never called +// +// or +// +// -- may be a good idea to change to output path to somewherelike /tmp +// go test -coverprofile cover.out && go tool cover -html=cover.out -o cover.html +// + +// global pool for testing long running pool +var limitedGpool Pool + +var unlimitedGpool Pool + +func TestMain(m *testing.M) { + + // setup + limitedGpool = NewLimited(4) + defer limitedGpool.Close() + + unlimitedGpool = New() + defer unlimitedGpool.Close() + + os.Exit(m.Run()) + + // teardown +} diff --git a/vendor/gopkg.in/go-playground/pool.v3/unlimited_pool_benchmarks_test.go b/vendor/gopkg.in/go-playground/pool.v3/unlimited_pool_benchmarks_test.go new file mode 100644 index 000000000..572a55436 --- /dev/null +++ b/vendor/gopkg.in/go-playground/pool.v3/unlimited_pool_benchmarks_test.go @@ -0,0 +1,185 @@ +package pool + +import ( + "testing" + "time" +) + +func BenchmarkUnlimitedSmallRun(b *testing.B) { + + res := make([]WorkUnit, 10) + + b.ReportAllocs() + + pool := New() + defer pool.Close() + + fn := func(wu WorkUnit) (interface{}, error) { + time.Sleep(time.Millisecond * 500) + if wu.IsCancelled() { + return nil, nil + } + time.Sleep(time.Millisecond * 500) + return 1, nil + } + + for i := 0; i < 10; i++ { + res[i] = pool.Queue(fn) + } + + var count int + + for _, cw := range res { + + cw.Wait() + + if cw.Error() == nil { + count += cw.Value().(int) + } + } + + if count != 10 { + b.Fatal("Count Incorrect") + } +} + +func BenchmarkUnlimitedSmallCancel(b *testing.B) { + + res := make([]WorkUnit, 0, 20) + + b.ReportAllocs() + + pool := New() + defer pool.Close() + + newFunc := func(i int) WorkFunc { + return func(wu WorkUnit) (interface{}, error) { + time.Sleep(time.Millisecond * 500) + if wu.IsCancelled() { + return nil, nil + } + time.Sleep(time.Millisecond * 500) + return i, nil + } + } + + for i := 0; i < 20; i++ { + if i == 6 { + pool.Cancel() + } + res = append(res, pool.Queue(newFunc(i))) + } + + for _, wrk := range res { + if wrk == nil { + continue + } + wrk.Wait() + } +} + +func BenchmarkUnlimitedLargeCancel(b *testing.B) { + + res := make([]WorkUnit, 0, 1000) + + b.ReportAllocs() + + pool := New() + defer pool.Close() + + newFunc := func(i int) WorkFunc { + return func(wu WorkUnit) (interface{}, error) { + time.Sleep(time.Millisecond * 500) + if wu.IsCancelled() { + return nil, nil + } + time.Sleep(time.Millisecond * 500) + return i, nil + } + } + + for i := 0; i < 1000; i++ { + if i == 6 { + pool.Cancel() + } + res = append(res, pool.Queue(newFunc(i))) + } + + for _, wrk := range res { + if wrk == nil { + continue + } + wrk.Wait() + } +} + +func BenchmarkUnlimitedLargeRun(b *testing.B) { + + res := make([]WorkUnit, 100) + + b.ReportAllocs() + + pool := New() + defer pool.Close() + + newFunc := func(i int) WorkFunc { + return func(wu WorkUnit) (interface{}, error) { + time.Sleep(time.Millisecond * 500) + if wu.IsCancelled() { + return nil, nil + } + time.Sleep(time.Millisecond * 500) + return 1, nil + } + } + + for i := 0; i < 100; i++ { + res[i] = pool.Queue(newFunc(i)) + } + + var count int + + for _, cw := range res { + + cw.Wait() + + count += cw.Value().(int) + } + + if count != 100 { + b.Fatalf("Count Incorrect, Expected '100' Got '%d'", count) + } +} + +func BenchmarkUnlimitedBatchSmallRun(b *testing.B) { + + fn := func(wu WorkUnit) (interface{}, error) { + time.Sleep(time.Millisecond * 500) + if wu.IsCancelled() { + return nil, nil + } + time.Sleep(time.Millisecond * 500) + return 1, nil + } + + pool := New() + defer pool.Close() + + batch := pool.Batch() + + for i := 0; i < 10; i++ { + batch.Queue(fn) + } + + batch.QueueComplete() + + var count int + + for cw := range batch.Results() { + count += cw.Value().(int) + } + + if count != 10 { + b.Fatal("Count Incorrect") + } +} diff --git a/vendor/gopkg.in/go-playground/pool.v3/unlimited_pool_test.go b/vendor/gopkg.in/go-playground/pool.v3/unlimited_pool_test.go new file mode 100644 index 000000000..6ac9623b8 --- /dev/null +++ b/vendor/gopkg.in/go-playground/pool.v3/unlimited_pool_test.go @@ -0,0 +1,194 @@ +package pool + +import ( + "sync" + "testing" + "time" + + . "gopkg.in/go-playground/assert.v1" +) + +// NOTES: +// - Run "go test" to run tests +// - Run "gocov test | gocov report" to report on test converage by file +// - Run "gocov test | gocov annotate -" to report on all code and functions, those ,marked with "MISS" were never called +// +// or +// +// -- may be a good idea to change to output path to somewherelike /tmp +// go test -coverprofile cover.out && go tool cover -html=cover.out -o cover.html +// + +func TestUnlimitedPool(t *testing.T) { + + var res []WorkUnit + + pool := New() + defer pool.Close() + + newFunc := func(d time.Duration) WorkFunc { + return func(WorkUnit) (interface{}, error) { + time.Sleep(d) + return nil, nil + } + } + + for i := 0; i < 4; i++ { + wu := pool.Queue(newFunc(time.Second * 1)) + res = append(res, wu) + } + + var count int + + for _, wu := range res { + wu.Wait() + Equal(t, wu.Error(), nil) + Equal(t, wu.Value(), nil) + count++ + } + + Equal(t, count, 4) + + pool.Close() // testing no error occurs as Close will be called twice once defer pool.Close() fires +} + +func TestUnlimitedCancel(t *testing.T) { + + m := new(sync.RWMutex) + var closed bool + c := make(chan WorkUnit, 100) + + pool := unlimitedGpool + defer pool.Close() + + newFunc := func(d time.Duration) WorkFunc { + return func(WorkUnit) (interface{}, error) { + time.Sleep(d) + return 1, nil + } + } + + go func(ch chan WorkUnit) { + for i := 0; i < 40; i++ { + + go func(ch chan WorkUnit) { + m.RLock() + if !closed { + ch <- pool.Queue(newFunc(time.Second * 1)) + } + m.RUnlock() + }(ch) + } + }(c) + + time.Sleep(time.Second * 1) + pool.Cancel() + m.Lock() + closed = true + close(c) + m.Unlock() + + var count int + + for wu := range c { + wu.Wait() + + if wu.Error() != nil { + _, ok := wu.Error().(*ErrCancelled) + if !ok { + _, ok = wu.Error().(*ErrPoolClosed) + if ok { + Equal(t, wu.Error().Error(), "ERROR: Work Unit added/run after the pool had been closed or cancelled") + } + } else { + Equal(t, wu.Error().Error(), "ERROR: Work Unit Cancelled") + } + + Equal(t, ok, true) + continue + } + + count += wu.Value().(int) + } + + NotEqual(t, count, 40) + + // reset and test again + pool.Reset() + + wrk := pool.Queue(newFunc(time.Millisecond * 300)) + wrk.Wait() + + _, ok := wrk.Value().(int) + Equal(t, ok, true) + + wrk = pool.Queue(newFunc(time.Millisecond * 300)) + time.Sleep(time.Second * 1) + wrk.Cancel() + wrk.Wait() // proving we don't get stuck here after cancel + Equal(t, wrk.Error(), nil) + + pool.Reset() // testing that we can do this and nothing bad will happen as it checks if pool closed + + pool.Close() + + wu := pool.Queue(newFunc(time.Second * 1)) + wu.Wait() + NotEqual(t, wu.Error(), nil) + Equal(t, wu.Error().Error(), "ERROR: Work Unit added/run after the pool had been closed or cancelled") +} + +func TestCancelFromWithin(t *testing.T) { + pool := New() + defer pool.Close() + + newFunc := func(d time.Duration) WorkFunc { + return func(wu WorkUnit) (interface{}, error) { + time.Sleep(d) + if wu.IsCancelled() { + return nil, nil + } + + return 1, nil + } + } + + q := pool.Queue(newFunc(time.Second * 5)) + + time.Sleep(time.Second * 2) + pool.Cancel() + + Equal(t, q.Value() == nil, true) + NotEqual(t, q.Error(), nil) + Equal(t, q.Error().Error(), "ERROR: Work Unit Cancelled") +} + +func TestUnlimitedPanicRecovery(t *testing.T) { + + pool := New() + defer pool.Close() + + newFunc := func(d time.Duration, i int) WorkFunc { + return func(WorkUnit) (interface{}, error) { + if i == 1 { + panic("OMG OMG OMG! something bad happened!") + } + time.Sleep(d) + return 1, nil + } + } + + var wrk WorkUnit + for i := 0; i < 4; i++ { + time.Sleep(time.Second * 1) + if i == 1 { + wrk = pool.Queue(newFunc(time.Second*1, i)) + continue + } + pool.Queue(newFunc(time.Second*1, i)) + } + wrk.Wait() + + NotEqual(t, wrk.Error(), nil) + Equal(t, wrk.Error().Error()[0:90], "ERROR: Work Unit failed due to a recoverable error: 'OMG OMG OMG! something bad happened!'") +} diff --git a/vendor/gopkg.in/inf.v0/benchmark_test.go b/vendor/gopkg.in/inf.v0/benchmark_test.go new file mode 100644 index 000000000..27071da0e --- /dev/null +++ b/vendor/gopkg.in/inf.v0/benchmark_test.go @@ -0,0 +1,210 @@ +package inf + +import ( + "fmt" + "math/big" + "math/rand" + "sync" + "testing" +) + +const maxcap = 1024 * 1024 +const bits = 256 +const maxscale = 32 + +var once sync.Once + +var decInput [][2]Dec +var intInput [][2]big.Int + +var initBench = func() { + decInput = make([][2]Dec, maxcap) + intInput = make([][2]big.Int, maxcap) + max := new(big.Int).Lsh(big.NewInt(1), bits) + r := rand.New(rand.NewSource(0)) + for i := 0; i < cap(decInput); i++ { + decInput[i][0].SetUnscaledBig(new(big.Int).Rand(r, max)). + SetScale(Scale(r.Int31n(int32(2*maxscale-1)) - int32(maxscale))) + decInput[i][1].SetUnscaledBig(new(big.Int).Rand(r, max)). + SetScale(Scale(r.Int31n(int32(2*maxscale-1)) - int32(maxscale))) + } + for i := 0; i < cap(intInput); i++ { + intInput[i][0].Rand(r, max) + intInput[i][1].Rand(r, max) + } +} + +func doBenchmarkDec1(b *testing.B, f func(z *Dec)) { + once.Do(initBench) + b.ResetTimer() + b.StartTimer() + for i := 0; i < b.N; i++ { + f(&decInput[i%maxcap][0]) + } +} + +func doBenchmarkDec2(b *testing.B, f func(x, y *Dec)) { + once.Do(initBench) + b.ResetTimer() + b.StartTimer() + for i := 0; i < b.N; i++ { + f(&decInput[i%maxcap][0], &decInput[i%maxcap][1]) + } +} + +func doBenchmarkInt1(b *testing.B, f func(z *big.Int)) { + once.Do(initBench) + b.ResetTimer() + b.StartTimer() + for i := 0; i < b.N; i++ { + f(&intInput[i%maxcap][0]) + } +} + +func doBenchmarkInt2(b *testing.B, f func(x, y *big.Int)) { + once.Do(initBench) + b.ResetTimer() + b.StartTimer() + for i := 0; i < b.N; i++ { + f(&intInput[i%maxcap][0], &intInput[i%maxcap][1]) + } +} + +func Benchmark_Dec_String(b *testing.B) { + doBenchmarkDec1(b, func(x *Dec) { + x.String() + }) +} + +func Benchmark_Dec_StringScan(b *testing.B) { + doBenchmarkDec1(b, func(x *Dec) { + s := x.String() + d := new(Dec) + fmt.Sscan(s, d) + }) +} + +func Benchmark_Dec_GobEncode(b *testing.B) { + doBenchmarkDec1(b, func(x *Dec) { + x.GobEncode() + }) +} + +func Benchmark_Dec_GobEnDecode(b *testing.B) { + doBenchmarkDec1(b, func(x *Dec) { + g, _ := x.GobEncode() + new(Dec).GobDecode(g) + }) +} + +func Benchmark_Dec_Add(b *testing.B) { + doBenchmarkDec2(b, func(x, y *Dec) { + ys := y.Scale() + y.SetScale(x.Scale()) + _ = new(Dec).Add(x, y) + y.SetScale(ys) + }) +} + +func Benchmark_Dec_AddMixed(b *testing.B) { + doBenchmarkDec2(b, func(x, y *Dec) { + _ = new(Dec).Add(x, y) + }) +} + +func Benchmark_Dec_Sub(b *testing.B) { + doBenchmarkDec2(b, func(x, y *Dec) { + ys := y.Scale() + y.SetScale(x.Scale()) + _ = new(Dec).Sub(x, y) + y.SetScale(ys) + }) +} + +func Benchmark_Dec_SubMixed(b *testing.B) { + doBenchmarkDec2(b, func(x, y *Dec) { + _ = new(Dec).Sub(x, y) + }) +} + +func Benchmark_Dec_Mul(b *testing.B) { + doBenchmarkDec2(b, func(x, y *Dec) { + _ = new(Dec).Mul(x, y) + }) +} + +func Benchmark_Dec_Mul_QuoExact(b *testing.B) { + doBenchmarkDec2(b, func(x, y *Dec) { + v := new(Dec).Mul(x, y) + _ = new(Dec).QuoExact(v, y) + }) +} + +func Benchmark_Dec_QuoRound_Fixed_Down(b *testing.B) { + doBenchmarkDec2(b, func(x, y *Dec) { + _ = new(Dec).QuoRound(x, y, 0, RoundDown) + }) +} + +func Benchmark_Dec_QuoRound_Fixed_HalfUp(b *testing.B) { + doBenchmarkDec2(b, func(x, y *Dec) { + _ = new(Dec).QuoRound(x, y, 0, RoundHalfUp) + }) +} + +func Benchmark_Int_String(b *testing.B) { + doBenchmarkInt1(b, func(x *big.Int) { + x.String() + }) +} + +func Benchmark_Int_StringScan(b *testing.B) { + doBenchmarkInt1(b, func(x *big.Int) { + s := x.String() + d := new(big.Int) + fmt.Sscan(s, d) + }) +} + +func Benchmark_Int_GobEncode(b *testing.B) { + doBenchmarkInt1(b, func(x *big.Int) { + x.GobEncode() + }) +} + +func Benchmark_Int_GobEnDecode(b *testing.B) { + doBenchmarkInt1(b, func(x *big.Int) { + g, _ := x.GobEncode() + new(big.Int).GobDecode(g) + }) +} + +func Benchmark_Int_Add(b *testing.B) { + doBenchmarkInt2(b, func(x, y *big.Int) { + _ = new(big.Int).Add(x, y) + }) +} + +func Benchmark_Int_Sub(b *testing.B) { + doBenchmarkInt2(b, func(x, y *big.Int) { + _ = new(big.Int).Sub(x, y) + }) +} + +func Benchmark_Int_Mul(b *testing.B) { + doBenchmarkInt2(b, func(x, y *big.Int) { + _ = new(big.Int).Mul(x, y) + }) +} + +func Benchmark_Int_Quo(b *testing.B) { + doBenchmarkInt2(b, func(x, y *big.Int) { + _ = new(big.Int).Quo(x, y) + }) +} + +func Benchmark_Int_QuoRem(b *testing.B) { + doBenchmarkInt2(b, func(x, y *big.Int) { + _, _ = new(big.Int).QuoRem(x, y, new(big.Int)) + }) +} diff --git a/vendor/gopkg.in/inf.v0/dec.go b/vendor/gopkg.in/inf.v0/dec.go index d17ad945d..3b4afedf1 100644 --- a/vendor/gopkg.in/inf.v0/dec.go +++ b/vendor/gopkg.in/inf.v0/dec.go @@ -20,7 +20,7 @@ // + combined operations such as AddRound/MulAdd etc // + exchanging data in decimal32/64/128 formats // -package inf +package inf // import "gopkg.in/inf.v0" // TODO: // - avoid excessive deep copying (quo and rounders) diff --git a/vendor/gopkg.in/inf.v0/dec_go1_2_test.go b/vendor/gopkg.in/inf.v0/dec_go1_2_test.go new file mode 100644 index 000000000..5df0f7b55 --- /dev/null +++ b/vendor/gopkg.in/inf.v0/dec_go1_2_test.go @@ -0,0 +1,33 @@ +// +build go1.2 + +package inf + +import ( + "encoding" + "encoding/json" + "testing" +) + +var _ encoding.TextMarshaler = new(Dec) +var _ encoding.TextUnmarshaler = new(Dec) + +type Obj struct { + Val *Dec +} + +func TestDecJsonMarshalUnmarshal(t *testing.T) { + o := Obj{Val: NewDec(123, 2)} + js, err := json.Marshal(o) + if err != nil { + t.Fatalf("json.Marshal(%v): got %v, want ok", o, err) + } + o2 := &Obj{} + err = json.Unmarshal(js, o2) + if err != nil { + t.Fatalf("json.Unmarshal(%#q): got %v, want ok", js, err) + } + if o.Val.Scale() != o2.Val.Scale() || + o.Val.UnscaledBig().Cmp(o2.Val.UnscaledBig()) != 0 { + t.Fatalf("json.Unmarshal(json.Marshal(%v)): want %v, got %v", o, o, o2) + } +} diff --git a/vendor/gopkg.in/inf.v0/dec_internal_test.go b/vendor/gopkg.in/inf.v0/dec_internal_test.go new file mode 100644 index 000000000..d4fbe3e5b --- /dev/null +++ b/vendor/gopkg.in/inf.v0/dec_internal_test.go @@ -0,0 +1,40 @@ +package inf + +import ( + "math/big" + "testing" +) + +var decQuoRemZZZ = []struct { + z, x, y *Dec + r *big.Rat + srA, srB int +}{ + // basic examples + {NewDec(1, 0), NewDec(2, 0), NewDec(2, 0), big.NewRat(0, 1), 0, 1}, + {NewDec(15, 1), NewDec(3, 0), NewDec(2, 0), big.NewRat(0, 1), 0, 1}, + {NewDec(1, 1), NewDec(1, 0), NewDec(10, 0), big.NewRat(0, 1), 0, 1}, + {NewDec(0, 0), NewDec(2, 0), NewDec(3, 0), big.NewRat(2, 3), 1, 1}, + {NewDec(0, 0), NewDec(2, 0), NewDec(6, 0), big.NewRat(1, 3), 1, 1}, + {NewDec(1, 1), NewDec(2, 0), NewDec(12, 0), big.NewRat(2, 3), 1, 1}, + + // examples from the Go Language Specification + {NewDec(1, 0), NewDec(5, 0), NewDec(3, 0), big.NewRat(2, 3), 1, 1}, + {NewDec(-1, 0), NewDec(-5, 0), NewDec(3, 0), big.NewRat(-2, 3), -1, 1}, + {NewDec(-1, 0), NewDec(5, 0), NewDec(-3, 0), big.NewRat(-2, 3), 1, -1}, + {NewDec(1, 0), NewDec(-5, 0), NewDec(-3, 0), big.NewRat(2, 3), -1, -1}, +} + +func TestDecQuoRem(t *testing.T) { + for i, a := range decQuoRemZZZ { + z, rA, rB := new(Dec), new(big.Int), new(big.Int) + s := scaleQuoExact{}.Scale(a.x, a.y) + z.quoRem(a.x, a.y, s, true, rA, rB) + if a.z.Cmp(z) != 0 || a.r.Cmp(new(big.Rat).SetFrac(rA, rB)) != 0 { + t.Errorf("#%d QuoRemZZZ got %v, %v, %v; expected %v, %v", i, z, rA, rB, a.z, a.r) + } + if a.srA != rA.Sign() || a.srB != rB.Sign() { + t.Errorf("#%d QuoRemZZZ wrong signs, got %v, %v; expected %v, %v", i, rA.Sign(), rB.Sign(), a.srA, a.srB) + } + } +} diff --git a/vendor/gopkg.in/inf.v0/dec_test.go b/vendor/gopkg.in/inf.v0/dec_test.go new file mode 100644 index 000000000..e4b09b3fd --- /dev/null +++ b/vendor/gopkg.in/inf.v0/dec_test.go @@ -0,0 +1,379 @@ +package inf_test + +import ( + "bytes" + "encoding/gob" + "fmt" + "math/big" + "strings" + "testing" + + "gopkg.in/inf.v0" +) + +type decFunZZ func(z, x, y *inf.Dec) *inf.Dec +type decArgZZ struct { + z, x, y *inf.Dec +} + +var decSumZZ = []decArgZZ{ + {inf.NewDec(0, 0), inf.NewDec(0, 0), inf.NewDec(0, 0)}, + {inf.NewDec(1, 0), inf.NewDec(1, 0), inf.NewDec(0, 0)}, + {inf.NewDec(1111111110, 0), inf.NewDec(123456789, 0), inf.NewDec(987654321, 0)}, + {inf.NewDec(-1, 0), inf.NewDec(-1, 0), inf.NewDec(0, 0)}, + {inf.NewDec(864197532, 0), inf.NewDec(-123456789, 0), inf.NewDec(987654321, 0)}, + {inf.NewDec(-1111111110, 0), inf.NewDec(-123456789, 0), inf.NewDec(-987654321, 0)}, + {inf.NewDec(12, 2), inf.NewDec(1, 1), inf.NewDec(2, 2)}, +} + +var decProdZZ = []decArgZZ{ + {inf.NewDec(0, 0), inf.NewDec(0, 0), inf.NewDec(0, 0)}, + {inf.NewDec(0, 0), inf.NewDec(1, 0), inf.NewDec(0, 0)}, + {inf.NewDec(1, 0), inf.NewDec(1, 0), inf.NewDec(1, 0)}, + {inf.NewDec(-991*991, 0), inf.NewDec(991, 0), inf.NewDec(-991, 0)}, + {inf.NewDec(2, 3), inf.NewDec(1, 1), inf.NewDec(2, 2)}, + {inf.NewDec(2, -3), inf.NewDec(1, -1), inf.NewDec(2, -2)}, + {inf.NewDec(2, 3), inf.NewDec(1, 1), inf.NewDec(2, 2)}, +} + +func TestDecSignZ(t *testing.T) { + var zero inf.Dec + for _, a := range decSumZZ { + s := a.z.Sign() + e := a.z.Cmp(&zero) + if s != e { + t.Errorf("got %d; want %d for z = %v", s, e, a.z) + } + } +} + +func TestDecAbsZ(t *testing.T) { + var zero inf.Dec + for _, a := range decSumZZ { + var z inf.Dec + z.Abs(a.z) + var e inf.Dec + e.Set(a.z) + if e.Cmp(&zero) < 0 { + e.Sub(&zero, &e) + } + if z.Cmp(&e) != 0 { + t.Errorf("got z = %v; want %v", z, e) + } + } +} + +func testDecFunZZ(t *testing.T, msg string, f decFunZZ, a decArgZZ) { + var z inf.Dec + f(&z, a.x, a.y) + if (&z).Cmp(a.z) != 0 { + t.Errorf("%s%+v\n\tgot z = %v; want %v", msg, a, &z, a.z) + } +} + +func TestDecSumZZ(t *testing.T) { + AddZZ := func(z, x, y *inf.Dec) *inf.Dec { return z.Add(x, y) } + SubZZ := func(z, x, y *inf.Dec) *inf.Dec { return z.Sub(x, y) } + for _, a := range decSumZZ { + arg := a + testDecFunZZ(t, "AddZZ", AddZZ, arg) + + arg = decArgZZ{a.z, a.y, a.x} + testDecFunZZ(t, "AddZZ symmetric", AddZZ, arg) + + arg = decArgZZ{a.x, a.z, a.y} + testDecFunZZ(t, "SubZZ", SubZZ, arg) + + arg = decArgZZ{a.y, a.z, a.x} + testDecFunZZ(t, "SubZZ symmetric", SubZZ, arg) + } +} + +func TestDecProdZZ(t *testing.T) { + MulZZ := func(z, x, y *inf.Dec) *inf.Dec { return z.Mul(x, y) } + for _, a := range decProdZZ { + arg := a + testDecFunZZ(t, "MulZZ", MulZZ, arg) + + arg = decArgZZ{a.z, a.y, a.x} + testDecFunZZ(t, "MulZZ symmetric", MulZZ, arg) + } +} + +var decUnscaledTests = []struct { + d *inf.Dec + u int64 // ignored when ok == false + ok bool +}{ + {new(inf.Dec), 0, true}, + {inf.NewDec(-1<<63, 0), -1 << 63, true}, + {inf.NewDec(-(-1<<63 + 1), 0), -(-1<<63 + 1), true}, + {new(inf.Dec).Neg(inf.NewDec(-1<<63, 0)), 0, false}, + {new(inf.Dec).Sub(inf.NewDec(-1<<63, 0), inf.NewDec(1, 0)), 0, false}, + {inf.NewDecBig(new(big.Int).Lsh(big.NewInt(1), 64), 0), 0, false}, +} + +func TestDecUnscaled(t *testing.T) { + for i, tt := range decUnscaledTests { + u, ok := tt.d.Unscaled() + if ok != tt.ok { + t.Errorf("#%d Unscaled: got %v, expected %v", i, ok, tt.ok) + } else if ok && u != tt.u { + t.Errorf("#%d Unscaled: got %v, expected %v", i, u, tt.u) + } + } +} + +var decRoundTests = [...]struct { + in *inf.Dec + s inf.Scale + r inf.Rounder + exp *inf.Dec +}{ + {inf.NewDec(123424999999999993, 15), 2, inf.RoundHalfUp, inf.NewDec(12342, 2)}, + {inf.NewDec(123425000000000001, 15), 2, inf.RoundHalfUp, inf.NewDec(12343, 2)}, + {inf.NewDec(123424999999999993, 15), 15, inf.RoundHalfUp, inf.NewDec(123424999999999993, 15)}, + {inf.NewDec(123424999999999993, 15), 16, inf.RoundHalfUp, inf.NewDec(1234249999999999930, 16)}, + {inf.NewDecBig(new(big.Int).Lsh(big.NewInt(1), 64), 0), -1, inf.RoundHalfUp, inf.NewDec(1844674407370955162, -1)}, + {inf.NewDecBig(new(big.Int).Lsh(big.NewInt(1), 64), 0), -2, inf.RoundHalfUp, inf.NewDec(184467440737095516, -2)}, + {inf.NewDecBig(new(big.Int).Lsh(big.NewInt(1), 64), 0), -3, inf.RoundHalfUp, inf.NewDec(18446744073709552, -3)}, + {inf.NewDecBig(new(big.Int).Lsh(big.NewInt(1), 64), 0), -4, inf.RoundHalfUp, inf.NewDec(1844674407370955, -4)}, + {inf.NewDecBig(new(big.Int).Lsh(big.NewInt(1), 64), 0), -5, inf.RoundHalfUp, inf.NewDec(184467440737096, -5)}, + {inf.NewDecBig(new(big.Int).Lsh(big.NewInt(1), 64), 0), -6, inf.RoundHalfUp, inf.NewDec(18446744073710, -6)}, +} + +func TestDecRound(t *testing.T) { + for i, tt := range decRoundTests { + z := new(inf.Dec).Round(tt.in, tt.s, tt.r) + if tt.exp.Cmp(z) != 0 { + t.Errorf("#%d Round got %v; expected %v", i, z, tt.exp) + } + } +} + +var decStringTests = []struct { + in string + out string + val int64 + scale inf.Scale // skip SetString if negative + ok bool + scanOk bool +}{ + {in: "", ok: false, scanOk: false}, + {in: "a", ok: false, scanOk: false}, + {in: "z", ok: false, scanOk: false}, + {in: "+", ok: false, scanOk: false}, + {in: "-", ok: false, scanOk: false}, + {in: "g", ok: false, scanOk: false}, + {in: ".", ok: false, scanOk: false}, + {in: ".-0", ok: false, scanOk: false}, + {in: ".+0", ok: false, scanOk: false}, + // Scannable but not SetStringable + {"0b", "ignored", 0, 0, false, true}, + {"0x", "ignored", 0, 0, false, true}, + {"0xg", "ignored", 0, 0, false, true}, + {"0.0g", "ignored", 0, 1, false, true}, + // examples from godoc for Dec + {"0", "0", 0, 0, true, true}, + {"0.00", "0.00", 0, 2, true, true}, + {"ignored", "0", 0, -2, true, false}, + {"1", "1", 1, 0, true, true}, + {"1.00", "1.00", 100, 2, true, true}, + {"10", "10", 10, 0, true, true}, + {"ignored", "10", 1, -1, true, false}, + // other tests + {"+0", "0", 0, 0, true, true}, + {"-0", "0", 0, 0, true, true}, + {"0.0", "0.0", 0, 1, true, true}, + {"0.1", "0.1", 1, 1, true, true}, + {"0.", "0", 0, 0, true, true}, + {"-10", "-10", -1, -1, true, true}, + {"-1", "-1", -1, 0, true, true}, + {"-0.1", "-0.1", -1, 1, true, true}, + {"-0.01", "-0.01", -1, 2, true, true}, + {"+0.", "0", 0, 0, true, true}, + {"-0.", "0", 0, 0, true, true}, + {".0", "0.0", 0, 1, true, true}, + {"+.0", "0.0", 0, 1, true, true}, + {"-.0", "0.0", 0, 1, true, true}, + {"0.0000000000", "0.0000000000", 0, 10, true, true}, + {"0.0000000001", "0.0000000001", 1, 10, true, true}, + {"-0.0000000000", "0.0000000000", 0, 10, true, true}, + {"-0.0000000001", "-0.0000000001", -1, 10, true, true}, + {"-10", "-10", -10, 0, true, true}, + {"+10", "10", 10, 0, true, true}, + {"00", "0", 0, 0, true, true}, + {"023", "23", 23, 0, true, true}, // decimal, not octal + {"-02.3", "-2.3", -23, 1, true, true}, // decimal, not octal +} + +func TestDecGetString(t *testing.T) { + z := new(inf.Dec) + for i, test := range decStringTests { + if !test.ok { + continue + } + z.SetUnscaled(test.val) + z.SetScale(test.scale) + + s := z.String() + if s != test.out { + t.Errorf("#%da got %s; want %s", i, s, test.out) + } + + s = fmt.Sprintf("%d", z) + if s != test.out { + t.Errorf("#%db got %s; want %s", i, s, test.out) + } + } +} + +func TestDecSetString(t *testing.T) { + tmp := new(inf.Dec) + for i, test := range decStringTests { + if test.scale < 0 { + // SetString only supports scale >= 0 + continue + } + // initialize to a non-zero value so that issues with parsing + // 0 are detected + tmp.Set(inf.NewDec(1234567890, 123)) + n1, ok1 := new(inf.Dec).SetString(test.in) + n2, ok2 := tmp.SetString(test.in) + expected := inf.NewDec(test.val, test.scale) + if ok1 != test.ok || ok2 != test.ok { + t.Errorf("#%d (input '%s') ok incorrect (should be %t)", i, test.in, test.ok) + continue + } + if !ok1 { + if n1 != nil { + t.Errorf("#%d (input '%s') n1 != nil", i, test.in) + } + continue + } + if !ok2 { + if n2 != nil { + t.Errorf("#%d (input '%s') n2 != nil", i, test.in) + } + continue + } + + if n1.Cmp(expected) != 0 { + t.Errorf("#%d (input '%s') got: %s want: %d", i, test.in, n1, test.val) + } + if n2.Cmp(expected) != 0 { + t.Errorf("#%d (input '%s') got: %s want: %d", i, test.in, n2, test.val) + } + } +} + +func TestDecScan(t *testing.T) { + tmp := new(inf.Dec) + for i, test := range decStringTests { + if test.scale < 0 { + // SetString only supports scale >= 0 + continue + } + // initialize to a non-zero value so that issues with parsing + // 0 are detected + tmp.Set(inf.NewDec(1234567890, 123)) + n1, n2 := new(inf.Dec), tmp + nn1, err1 := fmt.Sscan(test.in, n1) + nn2, err2 := fmt.Sscan(test.in, n2) + if !test.scanOk { + if err1 == nil || err2 == nil { + t.Errorf("#%d (input '%s') ok incorrect, should be %t", i, test.in, test.scanOk) + } + continue + } + expected := inf.NewDec(test.val, test.scale) + if nn1 != 1 || err1 != nil || nn2 != 1 || err2 != nil { + t.Errorf("#%d (input '%s') error %d %v, %d %v", i, test.in, nn1, err1, nn2, err2) + continue + } + if n1.Cmp(expected) != 0 { + t.Errorf("#%d (input '%s') got: %s want: %d", i, test.in, n1, test.val) + } + if n2.Cmp(expected) != 0 { + t.Errorf("#%d (input '%s') got: %s want: %d", i, test.in, n2, test.val) + } + } +} + +var decScanNextTests = []struct { + in string + ok bool + next rune +}{ + {"", false, 0}, + {"a", false, 'a'}, + {"z", false, 'z'}, + {"+", false, 0}, + {"-", false, 0}, + {"g", false, 'g'}, + {".", false, 0}, + {".-0", false, '-'}, + {".+0", false, '+'}, + {"0b", true, 'b'}, + {"0x", true, 'x'}, + {"0xg", true, 'x'}, + {"0.0g", true, 'g'}, +} + +func TestDecScanNext(t *testing.T) { + for i, test := range decScanNextTests { + rdr := strings.NewReader(test.in) + n1 := new(inf.Dec) + nn1, _ := fmt.Fscan(rdr, n1) + if (test.ok && nn1 == 0) || (!test.ok && nn1 > 0) { + t.Errorf("#%d (input '%s') ok incorrect should be %t", i, test.in, test.ok) + continue + } + r := rune(0) + nn2, err := fmt.Fscanf(rdr, "%c", &r) + if test.next != r { + t.Errorf("#%d (input '%s') next incorrect, got %c should be %c, %d, %v", i, test.in, r, test.next, nn2, err) + } + } +} + +var decGobEncodingTests = []string{ + "0", + "1", + "2", + "10", + "42", + "1234567890", + "298472983472983471903246121093472394872319615612417471234712061", +} + +func TestDecGobEncoding(t *testing.T) { + var medium bytes.Buffer + enc := gob.NewEncoder(&medium) + dec := gob.NewDecoder(&medium) + for i, test := range decGobEncodingTests { + for j := 0; j < 2; j++ { + for k := inf.Scale(-5); k <= 5; k++ { + medium.Reset() // empty buffer for each test case (in case of failures) + stest := test + if j != 0 { + // negative numbers + stest = "-" + test + } + var tx inf.Dec + tx.SetString(stest) + tx.SetScale(k) // test with positive, negative, and zero scale + if err := enc.Encode(&tx); err != nil { + t.Errorf("#%d%c: encoding failed: %s", i, 'a'+j, err) + } + var rx inf.Dec + if err := dec.Decode(&rx); err != nil { + t.Errorf("#%d%c: decoding failed: %s", i, 'a'+j, err) + } + if rx.Cmp(&tx) != 0 { + t.Errorf("#%d%c: transmission failed: got %s want %s", i, 'a'+j, &rx, &tx) + } + } + } + } +} diff --git a/vendor/gopkg.in/inf.v0/example_test.go b/vendor/gopkg.in/inf.v0/example_test.go new file mode 100644 index 000000000..fa1e54d16 --- /dev/null +++ b/vendor/gopkg.in/inf.v0/example_test.go @@ -0,0 +1,62 @@ +package inf_test + +import ( + "fmt" + "log" +) + +import "gopkg.in/inf.v0" + +func ExampleDec_SetString() { + d := new(inf.Dec) + d.SetString("012345.67890") // decimal; leading 0 ignored; trailing 0 kept + fmt.Println(d) + // Output: 12345.67890 +} + +func ExampleDec_Scan() { + // The Scan function is rarely used directly; + // the fmt package recognizes it as an implementation of fmt.Scanner. + d := new(inf.Dec) + _, err := fmt.Sscan("184467440.73709551617", d) + if err != nil { + log.Println("error scanning value:", err) + } else { + fmt.Println(d) + } + // Output: 184467440.73709551617 +} + +func ExampleDec_QuoRound_scale2RoundDown() { + // 10 / 3 is an infinite decimal; it has no exact Dec representation + x, y := inf.NewDec(10, 0), inf.NewDec(3, 0) + // use 2 digits beyond the decimal point, round towards 0 + z := new(inf.Dec).QuoRound(x, y, 2, inf.RoundDown) + fmt.Println(z) + // Output: 3.33 +} + +func ExampleDec_QuoRound_scale2RoundCeil() { + // -42 / 400 is an finite decimal with 3 digits beyond the decimal point + x, y := inf.NewDec(-42, 0), inf.NewDec(400, 0) + // use 2 digits beyond decimal point, round towards positive infinity + z := new(inf.Dec).QuoRound(x, y, 2, inf.RoundCeil) + fmt.Println(z) + // Output: -0.10 +} + +func ExampleDec_QuoExact_ok() { + // 1 / 25 is a finite decimal; it has exact Dec representation + x, y := inf.NewDec(1, 0), inf.NewDec(25, 0) + z := new(inf.Dec).QuoExact(x, y) + fmt.Println(z) + // Output: 0.04 +} + +func ExampleDec_QuoExact_fail() { + // 1 / 3 is an infinite decimal; it has no exact Dec representation + x, y := inf.NewDec(1, 0), inf.NewDec(3, 0) + z := new(inf.Dec).QuoExact(x, y) + fmt.Println(z) + // Output: <nil> +} diff --git a/vendor/gopkg.in/inf.v0/rounder_example_test.go b/vendor/gopkg.in/inf.v0/rounder_example_test.go new file mode 100644 index 000000000..803c1d7ee --- /dev/null +++ b/vendor/gopkg.in/inf.v0/rounder_example_test.go @@ -0,0 +1,72 @@ +package inf_test + +import ( + "fmt" + "os" + "text/tabwriter" + + "gopkg.in/inf.v0" +) + +// This example displays the results of Dec.Round with each of the Rounders. +// +func ExampleRounder() { + var vals = []struct { + x string + s inf.Scale + }{ + {"-0.18", 1}, {"-0.15", 1}, {"-0.12", 1}, {"-0.10", 1}, + {"-0.08", 1}, {"-0.05", 1}, {"-0.02", 1}, {"0.00", 1}, + {"0.02", 1}, {"0.05", 1}, {"0.08", 1}, {"0.10", 1}, + {"0.12", 1}, {"0.15", 1}, {"0.18", 1}, + } + + var rounders = []struct { + name string + rounder inf.Rounder + }{ + {"RoundDown", inf.RoundDown}, {"RoundUp", inf.RoundUp}, + {"RoundCeil", inf.RoundCeil}, {"RoundFloor", inf.RoundFloor}, + {"RoundHalfDown", inf.RoundHalfDown}, {"RoundHalfUp", inf.RoundHalfUp}, + {"RoundHalfEven", inf.RoundHalfEven}, {"RoundExact", inf.RoundExact}, + } + + fmt.Println("The results of new(inf.Dec).Round(x, s, inf.RoundXXX):\n") + w := tabwriter.NewWriter(os.Stdout, 0, 0, 1, ' ', tabwriter.AlignRight) + fmt.Fprint(w, "x\ts\t|\t") + for _, r := range rounders { + fmt.Fprintf(w, "%s\t", r.name[5:]) + } + fmt.Fprintln(w) + for _, v := range vals { + fmt.Fprintf(w, "%s\t%d\t|\t", v.x, v.s) + for _, r := range rounders { + x, _ := new(inf.Dec).SetString(v.x) + z := new(inf.Dec).Round(x, v.s, r.rounder) + fmt.Fprintf(w, "%d\t", z) + } + fmt.Fprintln(w) + } + w.Flush() + + // Output: + // The results of new(inf.Dec).Round(x, s, inf.RoundXXX): + // + // x s | Down Up Ceil Floor HalfDown HalfUp HalfEven Exact + // -0.18 1 | -0.1 -0.2 -0.1 -0.2 -0.2 -0.2 -0.2 <nil> + // -0.15 1 | -0.1 -0.2 -0.1 -0.2 -0.1 -0.2 -0.2 <nil> + // -0.12 1 | -0.1 -0.2 -0.1 -0.2 -0.1 -0.1 -0.1 <nil> + // -0.10 1 | -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 + // -0.08 1 | 0.0 -0.1 0.0 -0.1 -0.1 -0.1 -0.1 <nil> + // -0.05 1 | 0.0 -0.1 0.0 -0.1 0.0 -0.1 0.0 <nil> + // -0.02 1 | 0.0 -0.1 0.0 -0.1 0.0 0.0 0.0 <nil> + // 0.00 1 | 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + // 0.02 1 | 0.0 0.1 0.1 0.0 0.0 0.0 0.0 <nil> + // 0.05 1 | 0.0 0.1 0.1 0.0 0.0 0.1 0.0 <nil> + // 0.08 1 | 0.0 0.1 0.1 0.0 0.1 0.1 0.1 <nil> + // 0.10 1 | 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 + // 0.12 1 | 0.1 0.2 0.2 0.1 0.1 0.1 0.1 <nil> + // 0.15 1 | 0.1 0.2 0.2 0.1 0.1 0.2 0.2 <nil> + // 0.18 1 | 0.1 0.2 0.2 0.1 0.2 0.2 0.2 <nil> + +} diff --git a/vendor/gopkg.in/inf.v0/rounder_test.go b/vendor/gopkg.in/inf.v0/rounder_test.go new file mode 100644 index 000000000..d7e14c58c --- /dev/null +++ b/vendor/gopkg.in/inf.v0/rounder_test.go @@ -0,0 +1,109 @@ +package inf_test + +import ( + "math/big" + "testing" + + "gopkg.in/inf.v0" +) + +var decRounderInputs = [...]struct { + quo *inf.Dec + rA, rB *big.Int +}{ + // examples from go language spec + {inf.NewDec(1, 0), big.NewInt(2), big.NewInt(3)}, // 5 / 3 + {inf.NewDec(-1, 0), big.NewInt(-2), big.NewInt(3)}, // -5 / 3 + {inf.NewDec(-1, 0), big.NewInt(2), big.NewInt(-3)}, // 5 / -3 + {inf.NewDec(1, 0), big.NewInt(-2), big.NewInt(-3)}, // -5 / -3 + // examples from godoc + {inf.NewDec(-1, 1), big.NewInt(-8), big.NewInt(10)}, + {inf.NewDec(-1, 1), big.NewInt(-5), big.NewInt(10)}, + {inf.NewDec(-1, 1), big.NewInt(-2), big.NewInt(10)}, + {inf.NewDec(0, 1), big.NewInt(-8), big.NewInt(10)}, + {inf.NewDec(0, 1), big.NewInt(-5), big.NewInt(10)}, + {inf.NewDec(0, 1), big.NewInt(-2), big.NewInt(10)}, + {inf.NewDec(0, 1), big.NewInt(0), big.NewInt(1)}, + {inf.NewDec(0, 1), big.NewInt(2), big.NewInt(10)}, + {inf.NewDec(0, 1), big.NewInt(5), big.NewInt(10)}, + {inf.NewDec(0, 1), big.NewInt(8), big.NewInt(10)}, + {inf.NewDec(1, 1), big.NewInt(2), big.NewInt(10)}, + {inf.NewDec(1, 1), big.NewInt(5), big.NewInt(10)}, + {inf.NewDec(1, 1), big.NewInt(8), big.NewInt(10)}, +} + +var decRounderResults = [...]struct { + rounder inf.Rounder + results [len(decRounderInputs)]*inf.Dec +}{ + {inf.RoundExact, [...]*inf.Dec{nil, nil, nil, nil, + nil, nil, nil, nil, nil, nil, + inf.NewDec(0, 1), nil, nil, nil, nil, nil, nil}}, + {inf.RoundDown, [...]*inf.Dec{ + inf.NewDec(1, 0), inf.NewDec(-1, 0), inf.NewDec(-1, 0), inf.NewDec(1, 0), + inf.NewDec(-1, 1), inf.NewDec(-1, 1), inf.NewDec(-1, 1), + inf.NewDec(0, 1), inf.NewDec(0, 1), inf.NewDec(0, 1), + inf.NewDec(0, 1), + inf.NewDec(0, 1), inf.NewDec(0, 1), inf.NewDec(0, 1), + inf.NewDec(1, 1), inf.NewDec(1, 1), inf.NewDec(1, 1)}}, + {inf.RoundUp, [...]*inf.Dec{ + inf.NewDec(2, 0), inf.NewDec(-2, 0), inf.NewDec(-2, 0), inf.NewDec(2, 0), + inf.NewDec(-2, 1), inf.NewDec(-2, 1), inf.NewDec(-2, 1), + inf.NewDec(-1, 1), inf.NewDec(-1, 1), inf.NewDec(-1, 1), + inf.NewDec(0, 1), + inf.NewDec(1, 1), inf.NewDec(1, 1), inf.NewDec(1, 1), + inf.NewDec(2, 1), inf.NewDec(2, 1), inf.NewDec(2, 1)}}, + {inf.RoundHalfDown, [...]*inf.Dec{ + inf.NewDec(2, 0), inf.NewDec(-2, 0), inf.NewDec(-2, 0), inf.NewDec(2, 0), + inf.NewDec(-2, 1), inf.NewDec(-1, 1), inf.NewDec(-1, 1), + inf.NewDec(-1, 1), inf.NewDec(0, 1), inf.NewDec(0, 1), + inf.NewDec(0, 1), + inf.NewDec(0, 1), inf.NewDec(0, 1), inf.NewDec(1, 1), + inf.NewDec(1, 1), inf.NewDec(1, 1), inf.NewDec(2, 1)}}, + {inf.RoundHalfUp, [...]*inf.Dec{ + inf.NewDec(2, 0), inf.NewDec(-2, 0), inf.NewDec(-2, 0), inf.NewDec(2, 0), + inf.NewDec(-2, 1), inf.NewDec(-2, 1), inf.NewDec(-1, 1), + inf.NewDec(-1, 1), inf.NewDec(-1, 1), inf.NewDec(0, 1), + inf.NewDec(0, 1), + inf.NewDec(0, 1), inf.NewDec(1, 1), inf.NewDec(1, 1), + inf.NewDec(1, 1), inf.NewDec(2, 1), inf.NewDec(2, 1)}}, + {inf.RoundHalfEven, [...]*inf.Dec{ + inf.NewDec(2, 0), inf.NewDec(-2, 0), inf.NewDec(-2, 0), inf.NewDec(2, 0), + inf.NewDec(-2, 1), inf.NewDec(-2, 1), inf.NewDec(-1, 1), + inf.NewDec(-1, 1), inf.NewDec(0, 1), inf.NewDec(0, 1), + inf.NewDec(0, 1), + inf.NewDec(0, 1), inf.NewDec(0, 1), inf.NewDec(1, 1), + inf.NewDec(1, 1), inf.NewDec(2, 1), inf.NewDec(2, 1)}}, + {inf.RoundFloor, [...]*inf.Dec{ + inf.NewDec(1, 0), inf.NewDec(-2, 0), inf.NewDec(-2, 0), inf.NewDec(1, 0), + inf.NewDec(-2, 1), inf.NewDec(-2, 1), inf.NewDec(-2, 1), + inf.NewDec(-1, 1), inf.NewDec(-1, 1), inf.NewDec(-1, 1), + inf.NewDec(0, 1), + inf.NewDec(0, 1), inf.NewDec(0, 1), inf.NewDec(0, 1), + inf.NewDec(1, 1), inf.NewDec(1, 1), inf.NewDec(1, 1)}}, + {inf.RoundCeil, [...]*inf.Dec{ + inf.NewDec(2, 0), inf.NewDec(-1, 0), inf.NewDec(-1, 0), inf.NewDec(2, 0), + inf.NewDec(-1, 1), inf.NewDec(-1, 1), inf.NewDec(-1, 1), + inf.NewDec(0, 1), inf.NewDec(0, 1), inf.NewDec(0, 1), + inf.NewDec(0, 1), + inf.NewDec(1, 1), inf.NewDec(1, 1), inf.NewDec(1, 1), + inf.NewDec(2, 1), inf.NewDec(2, 1), inf.NewDec(2, 1)}}, +} + +func TestDecRounders(t *testing.T) { + for i, a := range decRounderResults { + for j, input := range decRounderInputs { + q := new(inf.Dec).Set(input.quo) + rA, rB := new(big.Int).Set(input.rA), new(big.Int).Set(input.rB) + res := a.rounder.Round(new(inf.Dec), q, rA, rB) + if a.results[j] == nil && res == nil { + continue + } + if (a.results[j] == nil && res != nil) || + (a.results[j] != nil && res == nil) || + a.results[j].Cmp(res) != 0 { + t.Errorf("#%d,%d Rounder got %v; expected %v", i, j, res, a.results[j]) + } + } + } +} diff --git a/vendor/gopkg.in/warnings.v0/LICENSE b/vendor/gopkg.in/warnings.v0/LICENSE deleted file mode 100644 index d65f7e9d8..000000000 --- a/vendor/gopkg.in/warnings.v0/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright (c) 2016 Péter Surányi. - -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. - -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/vendor/gopkg.in/warnings.v0/README b/vendor/gopkg.in/warnings.v0/README deleted file mode 100644 index 77f46dd2c..000000000 --- a/vendor/gopkg.in/warnings.v0/README +++ /dev/null @@ -1,74 +0,0 @@ -Package warnings implements error handling with non-fatal errors (warnings). - -import path: "gopkg.in/warnings.v0" -package docs: https://godoc.org/gopkg.in/warnings.v0 -issues: https://github.com/go-warnings/warnings/issues -pull requests: https://github.com/go-warnings/warnings/pulls - -A recurring pattern in Go programming is the following: - - func myfunc(params) error { - if err := doSomething(...); err != nil { - return err - } - if err := doSomethingElse(...); err != nil { - return err - } - if ok := doAnotherThing(...); !ok { - return errors.New("my error") - } - ... - return nil - } - -This pattern allows interrupting the flow on any received error. But what if -there are errors that should be noted but still not fatal, for which the flow -should not be interrupted? Implementing such logic at each if statement would -make the code complex and the flow much harder to follow. - -Package warnings provides the Collector type and a clean and simple pattern -for achieving such logic. The Collector takes care of deciding when to break -the flow and when to continue, collecting any non-fatal errors (warnings) -along the way. The only requirement is that fatal and non-fatal errors can be -distinguished programmatically; that is a function such as - - IsFatal(error) bool - -must be implemented. The following is an example of what the above snippet -could look like using the warnings package: - - import "gopkg.in/warnings.v0" - - func isFatal(err error) bool { - _, ok := err.(WarningType) - return !ok - } - - func myfunc(params) error { - c := warnings.NewCollector(isFatal) - c.FatalWithWarnings = true - if err := c.Collect(doSomething()); err != nil { - return err - } - if err := c.Collect(doSomethingElse(...)); err != nil { - return err - } - if ok := doAnotherThing(...); !ok { - if err := c.Collect(errors.New("my error")); err != nil { - return err - } - } - ... - return c.Done() - } - -Rules for using warnings - - - ensure that warnings are programmatically distinguishable from fatal - errors (i.e. implement an isFatal function and any necessary error types) - - ensure that there is a single Collector instance for a call of each - exported function - - ensure that all errors (fatal or warning) are fed through Collect - - ensure that every time an error is returned, it is one returned by a - Collector (from Collect or Done) - - ensure that Collect is never called after Done diff --git a/vendor/gopkg.in/warnings.v0/warnings.go b/vendor/gopkg.in/warnings.v0/warnings.go deleted file mode 100644 index 0e6780048..000000000 --- a/vendor/gopkg.in/warnings.v0/warnings.go +++ /dev/null @@ -1,191 +0,0 @@ -// Package warnings implements error handling with non-fatal errors (warnings). -// -// A recurring pattern in Go programming is the following: -// -// func myfunc(params) error { -// if err := doSomething(...); err != nil { -// return err -// } -// if err := doSomethingElse(...); err != nil { -// return err -// } -// if ok := doAnotherThing(...); !ok { -// return errors.New("my error") -// } -// ... -// return nil -// } -// -// This pattern allows interrupting the flow on any received error. But what if -// there are errors that should be noted but still not fatal, for which the flow -// should not be interrupted? Implementing such logic at each if statement would -// make the code complex and the flow much harder to follow. -// -// Package warnings provides the Collector type and a clean and simple pattern -// for achieving such logic. The Collector takes care of deciding when to break -// the flow and when to continue, collecting any non-fatal errors (warnings) -// along the way. The only requirement is that fatal and non-fatal errors can be -// distinguished programmatically; that is a function such as -// -// IsFatal(error) bool -// -// must be implemented. The following is an example of what the above snippet -// could look like using the warnings package: -// -// import "gopkg.in/warnings.v0" -// -// func isFatal(err error) bool { -// _, ok := err.(WarningType) -// return !ok -// } -// -// func myfunc(params) error { -// c := warnings.NewCollector(isFatal) -// c.FatalWithWarnings = true -// if err := c.Collect(doSomething()); err != nil { -// return err -// } -// if err := c.Collect(doSomethingElse(...)); err != nil { -// return err -// } -// if ok := doAnotherThing(...); !ok { -// if err := c.Collect(errors.New("my error")); err != nil { -// return err -// } -// } -// ... -// return c.Done() -// } -// -// Rules for using warnings -// -// - ensure that warnings are programmatically distinguishable from fatal -// errors (i.e. implement an isFatal function and any necessary error types) -// - ensure that there is a single Collector instance for a call of each -// exported function -// - ensure that all errors (fatal or warning) are fed through Collect -// - ensure that every time an error is returned, it is one returned by a -// Collector (from Collect or Done) -// - ensure that Collect is never called after Done -// -// TODO -// -// - optionally limit the number of warnings (e.g. stop after 20 warnings) (?) -// - consider interaction with contexts -// - go vet-style invocations verifier -// - semi-automatic code converter -// -package warnings - -import ( - "bytes" - "fmt" -) - -// List holds a collection of warnings and optionally one fatal error. -type List struct { - Warnings []error - Fatal error -} - -// Error implements the error interface. -func (l List) Error() string { - b := bytes.NewBuffer(nil) - if l.Fatal != nil { - fmt.Fprintln(b, "fatal:") - fmt.Fprintln(b, l.Fatal) - } - switch len(l.Warnings) { - case 0: - // nop - case 1: - fmt.Fprintln(b, "warning:") - default: - fmt.Fprintln(b, "warnings:") - } - for _, err := range l.Warnings { - fmt.Fprintln(b, err) - } - return b.String() -} - -// A Collector collects errors up to the first fatal error. -type Collector struct { - // IsFatal distinguishes between warnings and fatal errors. - IsFatal func(error) bool - // FatalWithWarnings set to true means that a fatal error is returned as - // a List together with all warnings so far. The default behavior is to - // only return the fatal error and discard any warnings that have been - // collected. - FatalWithWarnings bool - - l List - done bool -} - -// NewCollector returns a new Collector; it uses isFatal to distinguish between -// warnings and fatal errors. -func NewCollector(isFatal func(error) bool) *Collector { - return &Collector{IsFatal: isFatal} -} - -// Collect collects a single error (warning or fatal). It returns nil if -// collection can continue (only warnings so far), or otherwise the errors -// collected. Collect mustn't be called after the first fatal error or after -// Done has been called. -func (c *Collector) Collect(err error) error { - if c.done { - panic("warnings.Collector already done") - } - if err == nil { - return nil - } - if c.IsFatal(err) { - c.done = true - c.l.Fatal = err - } else { - c.l.Warnings = append(c.l.Warnings, err) - } - if c.l.Fatal != nil { - return c.erorr() - } - return nil -} - -// Done ends collection and returns the collected error(s). -func (c *Collector) Done() error { - c.done = true - return c.erorr() -} - -func (c *Collector) erorr() error { - if !c.FatalWithWarnings && c.l.Fatal != nil { - return c.l.Fatal - } - if c.l.Fatal == nil && len(c.l.Warnings) == 0 { - return nil - } - // Note that a single warning is also returned as a List. This is to make it - // easier to determine fatal-ness of the returned error. - return c.l -} - -// FatalOnly returns the fatal error, if any, **in an error returned by a -// Collector**. It returns nil if and only if err is nil or err is a List -// with err.Fatal == nil. -func FatalOnly(err error) error { - l, ok := err.(List) - if !ok { - return err - } - return l.Fatal -} - -// WarningsOnly returns the warnings **in an error returned by a Collector**. -func WarningsOnly(err error) []error { - l, ok := err.(List) - if !ok { - return nil - } - return l.Warnings -} diff --git a/vendor/gopkg.in/yaml.v2/.travis.yml b/vendor/gopkg.in/yaml.v2/.travis.yml new file mode 100644 index 000000000..004172a2e --- /dev/null +++ b/vendor/gopkg.in/yaml.v2/.travis.yml @@ -0,0 +1,9 @@ +language: go + +go: + - 1.4 + - 1.5 + - 1.6 + - tip + +go_import_path: gopkg.in/yaml.v2 diff --git a/vendor/gopkg.in/yaml.v2/LICENSE b/vendor/gopkg.in/yaml.v2/LICENSE index a68e67f01..8dada3eda 100644 --- a/vendor/gopkg.in/yaml.v2/LICENSE +++ b/vendor/gopkg.in/yaml.v2/LICENSE @@ -1,188 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -Copyright (c) 2011-2014 - Canonical Inc. + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -This software is licensed under the LGPLv3, included below. + 1. Definitions. -As a special exception to the GNU Lesser General Public License version 3 -("LGPL3"), the copyright holders of this Library give you permission to -convey to a third party a Combined Work that links statically or dynamically -to this Library without providing any Minimal Corresponding Source or -Minimal Application Code as set out in 4d or providing the installation -information set out in section 4e, provided that you comply with the other -provisions of LGPL3 and provided that you meet, for the Application the -terms and conditions of the license(s) which apply to the Application. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. -Except as stated in this special exception, the provisions of LGPL3 will -continue to comply in full to this Library. If you modify this Library, you -may apply this exception to your version of this Library, but you are not -obliged to do so. If you do not wish to do so, delete this exception -statement from your version. This exception does not (and cannot) modify any -license terms which apply to the Application, with which you must still -comply. + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). - 0. Additional Definitions. + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and - 1. Exception to Section 3 of the GNU GPL. + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and - 2. Conveying Modified Versions. + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. - 3. Object Code Incorporating Material from Library Header Files. + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. - b) Accompany the object code with a copy of the GNU GPL and this license - document. + END OF TERMS AND CONDITIONS - 4. Combined Works. + APPENDIX: How to apply the Apache License to your work. - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. + Copyright {yyyy} {name of copyright owner} - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. + http://www.apache.org/licenses/LICENSE-2.0 - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/gopkg.in/yaml.v2/README.md b/vendor/gopkg.in/yaml.v2/README.md index 7b8bd8670..7a512d67c 100644 --- a/vendor/gopkg.in/yaml.v2/README.md +++ b/vendor/gopkg.in/yaml.v2/README.md @@ -42,12 +42,14 @@ The package API for yaml v2 will remain stable as described in [gopkg.in](https: License ------- -The yaml package is licensed under the LGPL with an exception that allows it to be linked statically. Please see the LICENSE file for details. +The yaml package is licensed under the Apache License 2.0. Please see the LICENSE file for details. Example ------- +Some more examples can be found in the "examples" folder. + ```Go package main diff --git a/vendor/gopkg.in/yaml.v2/decode.go b/vendor/gopkg.in/yaml.v2/decode.go index 085cddc44..db1f5f206 100644 --- a/vendor/gopkg.in/yaml.v2/decode.go +++ b/vendor/gopkg.in/yaml.v2/decode.go @@ -120,7 +120,6 @@ func (p *parser) parse() *node { default: panic("attempted to parse unknown event: " + strconv.Itoa(int(p.event.typ))) } - panic("unreachable") } func (p *parser) node(kind int) *node { @@ -191,6 +190,7 @@ type decoder struct { aliases map[string]bool mapType reflect.Type terrors []string + strict bool } var ( @@ -200,8 +200,8 @@ var ( ifaceType = defaultMapType.Elem() ) -func newDecoder() *decoder { - d := &decoder{mapType: defaultMapType} +func newDecoder(strict bool) *decoder { + d := &decoder{mapType: defaultMapType, strict: strict} d.aliases = make(map[string]bool) return d } @@ -251,7 +251,7 @@ func (d *decoder) callUnmarshaler(n *node, u Unmarshaler) (good bool) { // // If n holds a null value, prepare returns before doing anything. func (d *decoder) prepare(n *node, out reflect.Value) (newout reflect.Value, unmarshaled, good bool) { - if n.tag == yaml_NULL_TAG || n.kind == scalarNode && n.tag == "" && (n.value == "null" || n.value == "") { + if n.tag == yaml_NULL_TAG || n.kind == scalarNode && n.tag == "" && (n.value == "null" || n.value == "" && n.implicit) { return out, false, false } again := true @@ -640,6 +640,8 @@ func (d *decoder) mappingStruct(n *node, out reflect.Value) (good bool) { value := reflect.New(elemType).Elem() d.unmarshal(n.children[i+1], value) inlineMap.SetMapIndex(name, value) + } else if d.strict { + d.terrors = append(d.terrors, fmt.Sprintf("line %d: field %s not found in struct %s", n.line+1, name.String(), out.Type())) } } return true diff --git a/vendor/gopkg.in/yaml.v2/decode_test.go b/vendor/gopkg.in/yaml.v2/decode_test.go new file mode 100644 index 000000000..713b1ee9c --- /dev/null +++ b/vendor/gopkg.in/yaml.v2/decode_test.go @@ -0,0 +1,1017 @@ +package yaml_test + +import ( + "errors" + . "gopkg.in/check.v1" + "gopkg.in/yaml.v2" + "math" + "net" + "reflect" + "strings" + "time" +) + +var unmarshalIntTest = 123 + +var unmarshalTests = []struct { + data string + value interface{} +}{ + { + "", + &struct{}{}, + }, { + "{}", &struct{}{}, + }, { + "v: hi", + map[string]string{"v": "hi"}, + }, { + "v: hi", map[string]interface{}{"v": "hi"}, + }, { + "v: true", + map[string]string{"v": "true"}, + }, { + "v: true", + map[string]interface{}{"v": true}, + }, { + "v: 10", + map[string]interface{}{"v": 10}, + }, { + "v: 0b10", + map[string]interface{}{"v": 2}, + }, { + "v: 0xA", + map[string]interface{}{"v": 10}, + }, { + "v: 4294967296", + map[string]int64{"v": 4294967296}, + }, { + "v: 0.1", + map[string]interface{}{"v": 0.1}, + }, { + "v: .1", + map[string]interface{}{"v": 0.1}, + }, { + "v: .Inf", + map[string]interface{}{"v": math.Inf(+1)}, + }, { + "v: -.Inf", + map[string]interface{}{"v": math.Inf(-1)}, + }, { + "v: -10", + map[string]interface{}{"v": -10}, + }, { + "v: -.1", + map[string]interface{}{"v": -0.1}, + }, + + // Simple values. + { + "123", + &unmarshalIntTest, + }, + + // Floats from spec + { + "canonical: 6.8523e+5", + map[string]interface{}{"canonical": 6.8523e+5}, + }, { + "expo: 685.230_15e+03", + map[string]interface{}{"expo": 685.23015e+03}, + }, { + "fixed: 685_230.15", + map[string]interface{}{"fixed": 685230.15}, + }, { + "neginf: -.inf", + map[string]interface{}{"neginf": math.Inf(-1)}, + }, { + "fixed: 685_230.15", + map[string]float64{"fixed": 685230.15}, + }, + //{"sexa: 190:20:30.15", map[string]interface{}{"sexa": 0}}, // Unsupported + //{"notanum: .NaN", map[string]interface{}{"notanum": math.NaN()}}, // Equality of NaN fails. + + // Bools from spec + { + "canonical: y", + map[string]interface{}{"canonical": true}, + }, { + "answer: NO", + map[string]interface{}{"answer": false}, + }, { + "logical: True", + map[string]interface{}{"logical": true}, + }, { + "option: on", + map[string]interface{}{"option": true}, + }, { + "option: on", + map[string]bool{"option": true}, + }, + // Ints from spec + { + "canonical: 685230", + map[string]interface{}{"canonical": 685230}, + }, { + "decimal: +685_230", + map[string]interface{}{"decimal": 685230}, + }, { + "octal: 02472256", + map[string]interface{}{"octal": 685230}, + }, { + "hexa: 0x_0A_74_AE", + map[string]interface{}{"hexa": 685230}, + }, { + "bin: 0b1010_0111_0100_1010_1110", + map[string]interface{}{"bin": 685230}, + }, { + "bin: -0b101010", + map[string]interface{}{"bin": -42}, + }, { + "decimal: +685_230", + map[string]int{"decimal": 685230}, + }, + + //{"sexa: 190:20:30", map[string]interface{}{"sexa": 0}}, // Unsupported + + // Nulls from spec + { + "empty:", + map[string]interface{}{"empty": nil}, + }, { + "canonical: ~", + map[string]interface{}{"canonical": nil}, + }, { + "english: null", + map[string]interface{}{"english": nil}, + }, { + "~: null key", + map[interface{}]string{nil: "null key"}, + }, { + "empty:", + map[string]*bool{"empty": nil}, + }, + + // Flow sequence + { + "seq: [A,B]", + map[string]interface{}{"seq": []interface{}{"A", "B"}}, + }, { + "seq: [A,B,C,]", + map[string][]string{"seq": []string{"A", "B", "C"}}, + }, { + "seq: [A,1,C]", + map[string][]string{"seq": []string{"A", "1", "C"}}, + }, { + "seq: [A,1,C]", + map[string][]int{"seq": []int{1}}, + }, { + "seq: [A,1,C]", + map[string]interface{}{"seq": []interface{}{"A", 1, "C"}}, + }, + // Block sequence + { + "seq:\n - A\n - B", + map[string]interface{}{"seq": []interface{}{"A", "B"}}, + }, { + "seq:\n - A\n - B\n - C", + map[string][]string{"seq": []string{"A", "B", "C"}}, + }, { + "seq:\n - A\n - 1\n - C", + map[string][]string{"seq": []string{"A", "1", "C"}}, + }, { + "seq:\n - A\n - 1\n - C", + map[string][]int{"seq": []int{1}}, + }, { + "seq:\n - A\n - 1\n - C", + map[string]interface{}{"seq": []interface{}{"A", 1, "C"}}, + }, + + // Literal block scalar + { + "scalar: | # Comment\n\n literal\n\n \ttext\n\n", + map[string]string{"scalar": "\nliteral\n\n\ttext\n"}, + }, + + // Folded block scalar + { + "scalar: > # Comment\n\n folded\n line\n \n next\n line\n * one\n * two\n\n last\n line\n\n", + map[string]string{"scalar": "\nfolded line\nnext line\n * one\n * two\n\nlast line\n"}, + }, + + // Map inside interface with no type hints. + { + "a: {b: c}", + map[interface{}]interface{}{"a": map[interface{}]interface{}{"b": "c"}}, + }, + + // Structs and type conversions. + { + "hello: world", + &struct{ Hello string }{"world"}, + }, { + "a: {b: c}", + &struct{ A struct{ B string } }{struct{ B string }{"c"}}, + }, { + "a: {b: c}", + &struct{ A *struct{ B string } }{&struct{ B string }{"c"}}, + }, { + "a: {b: c}", + &struct{ A map[string]string }{map[string]string{"b": "c"}}, + }, { + "a: {b: c}", + &struct{ A *map[string]string }{&map[string]string{"b": "c"}}, + }, { + "a:", + &struct{ A map[string]string }{}, + }, { + "a: 1", + &struct{ A int }{1}, + }, { + "a: 1", + &struct{ A float64 }{1}, + }, { + "a: 1.0", + &struct{ A int }{1}, + }, { + "a: 1.0", + &struct{ A uint }{1}, + }, { + "a: [1, 2]", + &struct{ A []int }{[]int{1, 2}}, + }, { + "a: 1", + &struct{ B int }{0}, + }, { + "a: 1", + &struct { + B int "a" + }{1}, + }, { + "a: y", + &struct{ A bool }{true}, + }, + + // Some cross type conversions + { + "v: 42", + map[string]uint{"v": 42}, + }, { + "v: -42", + map[string]uint{}, + }, { + "v: 4294967296", + map[string]uint64{"v": 4294967296}, + }, { + "v: -4294967296", + map[string]uint64{}, + }, + + // int + { + "int_max: 2147483647", + map[string]int{"int_max": math.MaxInt32}, + }, + { + "int_min: -2147483648", + map[string]int{"int_min": math.MinInt32}, + }, + { + "int_overflow: 9223372036854775808", // math.MaxInt64 + 1 + map[string]int{}, + }, + + // int64 + { + "int64_max: 9223372036854775807", + map[string]int64{"int64_max": math.MaxInt64}, + }, + { + "int64_max_base2: 0b111111111111111111111111111111111111111111111111111111111111111", + map[string]int64{"int64_max_base2": math.MaxInt64}, + }, + { + "int64_min: -9223372036854775808", + map[string]int64{"int64_min": math.MinInt64}, + }, + { + "int64_neg_base2: -0b111111111111111111111111111111111111111111111111111111111111111", + map[string]int64{"int64_neg_base2": -math.MaxInt64}, + }, + { + "int64_overflow: 9223372036854775808", // math.MaxInt64 + 1 + map[string]int64{}, + }, + + // uint + { + "uint_min: 0", + map[string]uint{"uint_min": 0}, + }, + { + "uint_max: 4294967295", + map[string]uint{"uint_max": math.MaxUint32}, + }, + { + "uint_underflow: -1", + map[string]uint{}, + }, + + // uint64 + { + "uint64_min: 0", + map[string]uint{"uint64_min": 0}, + }, + { + "uint64_max: 18446744073709551615", + map[string]uint64{"uint64_max": math.MaxUint64}, + }, + { + "uint64_max_base2: 0b1111111111111111111111111111111111111111111111111111111111111111", + map[string]uint64{"uint64_max_base2": math.MaxUint64}, + }, + { + "uint64_maxint64: 9223372036854775807", + map[string]uint64{"uint64_maxint64": math.MaxInt64}, + }, + { + "uint64_underflow: -1", + map[string]uint64{}, + }, + + // float32 + { + "float32_max: 3.40282346638528859811704183484516925440e+38", + map[string]float32{"float32_max": math.MaxFloat32}, + }, + { + "float32_nonzero: 1.401298464324817070923729583289916131280e-45", + map[string]float32{"float32_nonzero": math.SmallestNonzeroFloat32}, + }, + { + "float32_maxuint64: 18446744073709551615", + map[string]float32{"float32_maxuint64": float32(math.MaxUint64)}, + }, + { + "float32_maxuint64+1: 18446744073709551616", + map[string]float32{"float32_maxuint64+1": float32(math.MaxUint64 + 1)}, + }, + + // float64 + { + "float64_max: 1.797693134862315708145274237317043567981e+308", + map[string]float64{"float64_max": math.MaxFloat64}, + }, + { + "float64_nonzero: 4.940656458412465441765687928682213723651e-324", + map[string]float64{"float64_nonzero": math.SmallestNonzeroFloat64}, + }, + { + "float64_maxuint64: 18446744073709551615", + map[string]float64{"float64_maxuint64": float64(math.MaxUint64)}, + }, + { + "float64_maxuint64+1: 18446744073709551616", + map[string]float64{"float64_maxuint64+1": float64(math.MaxUint64 + 1)}, + }, + + // Overflow cases. + { + "v: 4294967297", + map[string]int32{}, + }, { + "v: 128", + map[string]int8{}, + }, + + // Quoted values. + { + "'1': '\"2\"'", + map[interface{}]interface{}{"1": "\"2\""}, + }, { + "v:\n- A\n- 'B\n\n C'\n", + map[string][]string{"v": []string{"A", "B\nC"}}, + }, + + // Explicit tags. + { + "v: !!float '1.1'", + map[string]interface{}{"v": 1.1}, + }, { + "v: !!null ''", + map[string]interface{}{"v": nil}, + }, { + "%TAG !y! tag:yaml.org,2002:\n---\nv: !y!int '1'", + map[string]interface{}{"v": 1}, + }, + + // Non-specific tag (Issue #75) + { + "v: ! test", + map[string]interface{}{"v": "test"}, + }, + + // Anchors and aliases. + { + "a: &x 1\nb: &y 2\nc: *x\nd: *y\n", + &struct{ A, B, C, D int }{1, 2, 1, 2}, + }, { + "a: &a {c: 1}\nb: *a", + &struct { + A, B struct { + C int + } + }{struct{ C int }{1}, struct{ C int }{1}}, + }, { + "a: &a [1, 2]\nb: *a", + &struct{ B []int }{[]int{1, 2}}, + }, { + "b: *a\na: &a {c: 1}", + &struct { + A, B struct { + C int + } + }{struct{ C int }{1}, struct{ C int }{1}}, + }, + + // Bug #1133337 + { + "foo: ''", + map[string]*string{"foo": new(string)}, + }, { + "foo: null", + map[string]string{"foo": ""}, + }, { + "foo: null", + map[string]interface{}{"foo": nil}, + }, + + // Ignored field + { + "a: 1\nb: 2\n", + &struct { + A int + B int "-" + }{1, 0}, + }, + + // Bug #1191981 + { + "" + + "%YAML 1.1\n" + + "--- !!str\n" + + `"Generic line break (no glyph)\n\` + "\n" + + ` Generic line break (glyphed)\n\` + "\n" + + ` Line separator\u2028\` + "\n" + + ` Paragraph separator\u2029"` + "\n", + "" + + "Generic line break (no glyph)\n" + + "Generic line break (glyphed)\n" + + "Line separator\u2028Paragraph separator\u2029", + }, + + // Struct inlining + { + "a: 1\nb: 2\nc: 3\n", + &struct { + A int + C inlineB `yaml:",inline"` + }{1, inlineB{2, inlineC{3}}}, + }, + + // Map inlining + { + "a: 1\nb: 2\nc: 3\n", + &struct { + A int + C map[string]int `yaml:",inline"` + }{1, map[string]int{"b": 2, "c": 3}}, + }, + + // bug 1243827 + { + "a: -b_c", + map[string]interface{}{"a": "-b_c"}, + }, + { + "a: +b_c", + map[string]interface{}{"a": "+b_c"}, + }, + { + "a: 50cent_of_dollar", + map[string]interface{}{"a": "50cent_of_dollar"}, + }, + + // Duration + { + "a: 3s", + map[string]time.Duration{"a": 3 * time.Second}, + }, + + // Issue #24. + { + "a: <foo>", + map[string]string{"a": "<foo>"}, + }, + + // Base 60 floats are obsolete and unsupported. + { + "a: 1:1\n", + map[string]string{"a": "1:1"}, + }, + + // Binary data. + { + "a: !!binary gIGC\n", + map[string]string{"a": "\x80\x81\x82"}, + }, { + "a: !!binary |\n " + strings.Repeat("kJCQ", 17) + "kJ\n CQ\n", + map[string]string{"a": strings.Repeat("\x90", 54)}, + }, { + "a: !!binary |\n " + strings.Repeat("A", 70) + "\n ==\n", + map[string]string{"a": strings.Repeat("\x00", 52)}, + }, + + // Ordered maps. + { + "{b: 2, a: 1, d: 4, c: 3, sub: {e: 5}}", + &yaml.MapSlice{{"b", 2}, {"a", 1}, {"d", 4}, {"c", 3}, {"sub", yaml.MapSlice{{"e", 5}}}}, + }, + + // Issue #39. + { + "a:\n b:\n c: d\n", + map[string]struct{ B interface{} }{"a": {map[interface{}]interface{}{"c": "d"}}}, + }, + + // Custom map type. + { + "a: {b: c}", + M{"a": M{"b": "c"}}, + }, + + // Support encoding.TextUnmarshaler. + { + "a: 1.2.3.4\n", + map[string]net.IP{"a": net.IPv4(1, 2, 3, 4)}, + }, + { + "a: 2015-02-24T18:19:39Z\n", + map[string]time.Time{"a": time.Unix(1424801979, 0).In(time.UTC)}, + }, + + // Encode empty lists as zero-length slices. + { + "a: []", + &struct{ A []int }{[]int{}}, + }, + + // UTF-16-LE + { + "\xff\xfe\xf1\x00o\x00\xf1\x00o\x00:\x00 \x00v\x00e\x00r\x00y\x00 \x00y\x00e\x00s\x00\n\x00", + M{"ñoño": "very yes"}, + }, + // UTF-16-LE with surrogate. + { + "\xff\xfe\xf1\x00o\x00\xf1\x00o\x00:\x00 \x00v\x00e\x00r\x00y\x00 \x00y\x00e\x00s\x00 \x00=\xd8\xd4\xdf\n\x00", + M{"ñoño": "very yes 🟔"}, + }, + + // UTF-16-BE + { + "\xfe\xff\x00\xf1\x00o\x00\xf1\x00o\x00:\x00 \x00v\x00e\x00r\x00y\x00 \x00y\x00e\x00s\x00\n", + M{"ñoño": "very yes"}, + }, + // UTF-16-BE with surrogate. + { + "\xfe\xff\x00\xf1\x00o\x00\xf1\x00o\x00:\x00 \x00v\x00e\x00r\x00y\x00 \x00y\x00e\x00s\x00 \xd8=\xdf\xd4\x00\n", + M{"ñoño": "very yes 🟔"}, + }, + + // YAML Float regex shouldn't match this + { + "a: 123456e1\n", + M{"a": "123456e1"}, + }, { + "a: 123456E1\n", + M{"a": "123456E1"}, + }, +} + +type M map[interface{}]interface{} + +type inlineB struct { + B int + inlineC `yaml:",inline"` +} + +type inlineC struct { + C int +} + +func (s *S) TestUnmarshal(c *C) { + for i, item := range unmarshalTests { + c.Logf("test %d: %q", i, item.data) + t := reflect.ValueOf(item.value).Type() + var value interface{} + switch t.Kind() { + case reflect.Map: + value = reflect.MakeMap(t).Interface() + case reflect.String: + value = reflect.New(t).Interface() + case reflect.Ptr: + value = reflect.New(t.Elem()).Interface() + default: + c.Fatalf("missing case for %s", t) + } + err := yaml.Unmarshal([]byte(item.data), value) + if _, ok := err.(*yaml.TypeError); !ok { + c.Assert(err, IsNil) + } + if t.Kind() == reflect.String { + c.Assert(*value.(*string), Equals, item.value) + } else { + c.Assert(value, DeepEquals, item.value) + } + } +} + +func (s *S) TestUnmarshalNaN(c *C) { + value := map[string]interface{}{} + err := yaml.Unmarshal([]byte("notanum: .NaN"), &value) + c.Assert(err, IsNil) + c.Assert(math.IsNaN(value["notanum"].(float64)), Equals, true) +} + +var unmarshalErrorTests = []struct { + data, error string +}{ + {"v: !!float 'error'", "yaml: cannot decode !!str `error` as a !!float"}, + {"v: [A,", "yaml: line 1: did not find expected node content"}, + {"v:\n- [A,", "yaml: line 2: did not find expected node content"}, + {"a: *b\n", "yaml: unknown anchor 'b' referenced"}, + {"a: &a\n b: *a\n", "yaml: anchor 'a' value contains itself"}, + {"value: -", "yaml: block sequence entries are not allowed in this context"}, + {"a: !!binary ==", "yaml: !!binary value contains invalid base64 data"}, + {"{[.]}", `yaml: invalid map key: \[\]interface \{\}\{"\."\}`}, + {"{{.}}", `yaml: invalid map key: map\[interface\ \{\}\]interface \{\}\{".":interface \{\}\(nil\)\}`}, + {"%TAG !%79! tag:yaml.org,2002:\n---\nv: !%79!int '1'", "yaml: did not find expected whitespace"}, +} + +func (s *S) TestUnmarshalErrors(c *C) { + for _, item := range unmarshalErrorTests { + var value interface{} + err := yaml.Unmarshal([]byte(item.data), &value) + c.Assert(err, ErrorMatches, item.error, Commentf("Partial unmarshal: %#v", value)) + } +} + +var unmarshalerTests = []struct { + data, tag string + value interface{} +}{ + {"_: {hi: there}", "!!map", map[interface{}]interface{}{"hi": "there"}}, + {"_: [1,A]", "!!seq", []interface{}{1, "A"}}, + {"_: 10", "!!int", 10}, + {"_: null", "!!null", nil}, + {`_: BAR!`, "!!str", "BAR!"}, + {`_: "BAR!"`, "!!str", "BAR!"}, + {"_: !!foo 'BAR!'", "!!foo", "BAR!"}, + {`_: ""`, "!!str", ""}, +} + +var unmarshalerResult = map[int]error{} + +type unmarshalerType struct { + value interface{} +} + +func (o *unmarshalerType) UnmarshalYAML(unmarshal func(v interface{}) error) error { + if err := unmarshal(&o.value); err != nil { + return err + } + if i, ok := o.value.(int); ok { + if result, ok := unmarshalerResult[i]; ok { + return result + } + } + return nil +} + +type unmarshalerPointer struct { + Field *unmarshalerType "_" +} + +type unmarshalerValue struct { + Field unmarshalerType "_" +} + +func (s *S) TestUnmarshalerPointerField(c *C) { + for _, item := range unmarshalerTests { + obj := &unmarshalerPointer{} + err := yaml.Unmarshal([]byte(item.data), obj) + c.Assert(err, IsNil) + if item.value == nil { + c.Assert(obj.Field, IsNil) + } else { + c.Assert(obj.Field, NotNil, Commentf("Pointer not initialized (%#v)", item.value)) + c.Assert(obj.Field.value, DeepEquals, item.value) + } + } +} + +func (s *S) TestUnmarshalerValueField(c *C) { + for _, item := range unmarshalerTests { + obj := &unmarshalerValue{} + err := yaml.Unmarshal([]byte(item.data), obj) + c.Assert(err, IsNil) + c.Assert(obj.Field, NotNil, Commentf("Pointer not initialized (%#v)", item.value)) + c.Assert(obj.Field.value, DeepEquals, item.value) + } +} + +func (s *S) TestUnmarshalerWholeDocument(c *C) { + obj := &unmarshalerType{} + err := yaml.Unmarshal([]byte(unmarshalerTests[0].data), obj) + c.Assert(err, IsNil) + value, ok := obj.value.(map[interface{}]interface{}) + c.Assert(ok, Equals, true, Commentf("value: %#v", obj.value)) + c.Assert(value["_"], DeepEquals, unmarshalerTests[0].value) +} + +func (s *S) TestUnmarshalerTypeError(c *C) { + unmarshalerResult[2] = &yaml.TypeError{[]string{"foo"}} + unmarshalerResult[4] = &yaml.TypeError{[]string{"bar"}} + defer func() { + delete(unmarshalerResult, 2) + delete(unmarshalerResult, 4) + }() + + type T struct { + Before int + After int + M map[string]*unmarshalerType + } + var v T + data := `{before: A, m: {abc: 1, def: 2, ghi: 3, jkl: 4}, after: B}` + err := yaml.Unmarshal([]byte(data), &v) + c.Assert(err, ErrorMatches, ""+ + "yaml: unmarshal errors:\n"+ + " line 1: cannot unmarshal !!str `A` into int\n"+ + " foo\n"+ + " bar\n"+ + " line 1: cannot unmarshal !!str `B` into int") + c.Assert(v.M["abc"], NotNil) + c.Assert(v.M["def"], IsNil) + c.Assert(v.M["ghi"], NotNil) + c.Assert(v.M["jkl"], IsNil) + + c.Assert(v.M["abc"].value, Equals, 1) + c.Assert(v.M["ghi"].value, Equals, 3) +} + +type proxyTypeError struct{} + +func (v *proxyTypeError) UnmarshalYAML(unmarshal func(interface{}) error) error { + var s string + var a int32 + var b int64 + if err := unmarshal(&s); err != nil { + panic(err) + } + if s == "a" { + if err := unmarshal(&b); err == nil { + panic("should have failed") + } + return unmarshal(&a) + } + if err := unmarshal(&a); err == nil { + panic("should have failed") + } + return unmarshal(&b) +} + +func (s *S) TestUnmarshalerTypeErrorProxying(c *C) { + type T struct { + Before int + After int + M map[string]*proxyTypeError + } + var v T + data := `{before: A, m: {abc: a, def: b}, after: B}` + err := yaml.Unmarshal([]byte(data), &v) + c.Assert(err, ErrorMatches, ""+ + "yaml: unmarshal errors:\n"+ + " line 1: cannot unmarshal !!str `A` into int\n"+ + " line 1: cannot unmarshal !!str `a` into int32\n"+ + " line 1: cannot unmarshal !!str `b` into int64\n"+ + " line 1: cannot unmarshal !!str `B` into int") +} + +type failingUnmarshaler struct{} + +var failingErr = errors.New("failingErr") + +func (ft *failingUnmarshaler) UnmarshalYAML(unmarshal func(interface{}) error) error { + return failingErr +} + +func (s *S) TestUnmarshalerError(c *C) { + err := yaml.Unmarshal([]byte("a: b"), &failingUnmarshaler{}) + c.Assert(err, Equals, failingErr) +} + +type sliceUnmarshaler []int + +func (su *sliceUnmarshaler) UnmarshalYAML(unmarshal func(interface{}) error) error { + var slice []int + err := unmarshal(&slice) + if err == nil { + *su = slice + return nil + } + + var intVal int + err = unmarshal(&intVal) + if err == nil { + *su = []int{intVal} + return nil + } + + return err +} + +func (s *S) TestUnmarshalerRetry(c *C) { + var su sliceUnmarshaler + err := yaml.Unmarshal([]byte("[1, 2, 3]"), &su) + c.Assert(err, IsNil) + c.Assert(su, DeepEquals, sliceUnmarshaler([]int{1, 2, 3})) + + err = yaml.Unmarshal([]byte("1"), &su) + c.Assert(err, IsNil) + c.Assert(su, DeepEquals, sliceUnmarshaler([]int{1})) +} + +// From http://yaml.org/type/merge.html +var mergeTests = ` +anchors: + list: + - &CENTER { "x": 1, "y": 2 } + - &LEFT { "x": 0, "y": 2 } + - &BIG { "r": 10 } + - &SMALL { "r": 1 } + +# All the following maps are equal: + +plain: + # Explicit keys + "x": 1 + "y": 2 + "r": 10 + label: center/big + +mergeOne: + # Merge one map + << : *CENTER + "r": 10 + label: center/big + +mergeMultiple: + # Merge multiple maps + << : [ *CENTER, *BIG ] + label: center/big + +override: + # Override + << : [ *BIG, *LEFT, *SMALL ] + "x": 1 + label: center/big + +shortTag: + # Explicit short merge tag + !!merge "<<" : [ *CENTER, *BIG ] + label: center/big + +longTag: + # Explicit merge long tag + !<tag:yaml.org,2002:merge> "<<" : [ *CENTER, *BIG ] + label: center/big + +inlineMap: + # Inlined map + << : {"x": 1, "y": 2, "r": 10} + label: center/big + +inlineSequenceMap: + # Inlined map in sequence + << : [ *CENTER, {"r": 10} ] + label: center/big +` + +func (s *S) TestMerge(c *C) { + var want = map[interface{}]interface{}{ + "x": 1, + "y": 2, + "r": 10, + "label": "center/big", + } + + var m map[interface{}]interface{} + err := yaml.Unmarshal([]byte(mergeTests), &m) + c.Assert(err, IsNil) + for name, test := range m { + if name == "anchors" { + continue + } + c.Assert(test, DeepEquals, want, Commentf("test %q failed", name)) + } +} + +func (s *S) TestMergeStruct(c *C) { + type Data struct { + X, Y, R int + Label string + } + want := Data{1, 2, 10, "center/big"} + + var m map[string]Data + err := yaml.Unmarshal([]byte(mergeTests), &m) + c.Assert(err, IsNil) + for name, test := range m { + if name == "anchors" { + continue + } + c.Assert(test, Equals, want, Commentf("test %q failed", name)) + } +} + +var unmarshalNullTests = []func() interface{}{ + func() interface{} { var v interface{}; v = "v"; return &v }, + func() interface{} { var s = "s"; return &s }, + func() interface{} { var s = "s"; sptr := &s; return &sptr }, + func() interface{} { var i = 1; return &i }, + func() interface{} { var i = 1; iptr := &i; return &iptr }, + func() interface{} { m := map[string]int{"s": 1}; return &m }, + func() interface{} { m := map[string]int{"s": 1}; return m }, +} + +func (s *S) TestUnmarshalNull(c *C) { + for _, test := range unmarshalNullTests { + item := test() + zero := reflect.Zero(reflect.TypeOf(item).Elem()).Interface() + err := yaml.Unmarshal([]byte("null"), item) + c.Assert(err, IsNil) + if reflect.TypeOf(item).Kind() == reflect.Map { + c.Assert(reflect.ValueOf(item).Interface(), DeepEquals, reflect.MakeMap(reflect.TypeOf(item)).Interface()) + } else { + c.Assert(reflect.ValueOf(item).Elem().Interface(), DeepEquals, zero) + } + } +} + +func (s *S) TestUnmarshalSliceOnPreset(c *C) { + // Issue #48. + v := struct{ A []int }{[]int{1}} + yaml.Unmarshal([]byte("a: [2]"), &v) + c.Assert(v.A, DeepEquals, []int{2}) +} + +func (s *S) TestUnmarshalStrict(c *C) { + v := struct{ A, B int }{} + + err := yaml.UnmarshalStrict([]byte("a: 1\nb: 2"), &v) + c.Check(err, IsNil) + err = yaml.Unmarshal([]byte("a: 1\nb: 2\nc: 3"), &v) + c.Check(err, IsNil) + err = yaml.UnmarshalStrict([]byte("a: 1\nb: 2\nc: 3"), &v) + c.Check(err, ErrorMatches, "yaml: unmarshal errors:\n line 1: field c not found in struct struct { A int; B int }") +} + +//var data []byte +//func init() { +// var err error +// data, err = ioutil.ReadFile("/tmp/file.yaml") +// if err != nil { +// panic(err) +// } +//} +// +//func (s *S) BenchmarkUnmarshal(c *C) { +// var err error +// for i := 0; i < c.N; i++ { +// var v map[string]interface{} +// err = yaml.Unmarshal(data, &v) +// } +// if err != nil { +// panic(err) +// } +//} +// +//func (s *S) BenchmarkMarshal(c *C) { +// var v map[string]interface{} +// yaml.Unmarshal(data, &v) +// c.ResetTimer() +// for i := 0; i < c.N; i++ { +// yaml.Marshal(&v) +// } +//} diff --git a/vendor/gopkg.in/yaml.v2/emitterc.go b/vendor/gopkg.in/yaml.v2/emitterc.go index 2befd553e..41de8b856 100644 --- a/vendor/gopkg.in/yaml.v2/emitterc.go +++ b/vendor/gopkg.in/yaml.v2/emitterc.go @@ -666,7 +666,6 @@ func yaml_emitter_emit_node(emitter *yaml_emitter_t, event *yaml_event_t, return yaml_emitter_set_emitter_error(emitter, "expected SCALAR, SEQUENCE-START, MAPPING-START, or ALIAS") } - return false } // Expect ALIAS. @@ -995,7 +994,7 @@ func yaml_emitter_analyze_scalar(emitter *yaml_emitter_t, value []byte) bool { break_space = false space_break = false - preceeded_by_whitespace = false + preceded_by_whitespace = false followed_by_whitespace = false previous_space = false previous_break = false @@ -1017,7 +1016,7 @@ func yaml_emitter_analyze_scalar(emitter *yaml_emitter_t, value []byte) bool { flow_indicators = true } - preceeded_by_whitespace = true + preceded_by_whitespace = true for i, w := 0, 0; i < len(value); i += w { w = width(value[i]) followed_by_whitespace = i+w >= len(value) || is_blank(value, i+w) @@ -1048,7 +1047,7 @@ func yaml_emitter_analyze_scalar(emitter *yaml_emitter_t, value []byte) bool { block_indicators = true } case '#': - if preceeded_by_whitespace { + if preceded_by_whitespace { flow_indicators = true block_indicators = true } @@ -1089,7 +1088,7 @@ func yaml_emitter_analyze_scalar(emitter *yaml_emitter_t, value []byte) bool { } // [Go]: Why 'z'? Couldn't be the end of the string as that's the loop condition. - preceeded_by_whitespace = is_blankz(value, i) + preceded_by_whitespace = is_blankz(value, i) } emitter.scalar_data.multiline = line_breaks diff --git a/vendor/gopkg.in/yaml.v2/encode_test.go b/vendor/gopkg.in/yaml.v2/encode_test.go new file mode 100644 index 000000000..84099bd38 --- /dev/null +++ b/vendor/gopkg.in/yaml.v2/encode_test.go @@ -0,0 +1,501 @@ +package yaml_test + +import ( + "fmt" + "math" + "strconv" + "strings" + "time" + + . "gopkg.in/check.v1" + "gopkg.in/yaml.v2" + "net" + "os" +) + +var marshalIntTest = 123 + +var marshalTests = []struct { + value interface{} + data string +}{ + { + nil, + "null\n", + }, { + &struct{}{}, + "{}\n", + }, { + map[string]string{"v": "hi"}, + "v: hi\n", + }, { + map[string]interface{}{"v": "hi"}, + "v: hi\n", + }, { + map[string]string{"v": "true"}, + "v: \"true\"\n", + }, { + map[string]string{"v": "false"}, + "v: \"false\"\n", + }, { + map[string]interface{}{"v": true}, + "v: true\n", + }, { + map[string]interface{}{"v": false}, + "v: false\n", + }, { + map[string]interface{}{"v": 10}, + "v: 10\n", + }, { + map[string]interface{}{"v": -10}, + "v: -10\n", + }, { + map[string]uint{"v": 42}, + "v: 42\n", + }, { + map[string]interface{}{"v": int64(4294967296)}, + "v: 4294967296\n", + }, { + map[string]int64{"v": int64(4294967296)}, + "v: 4294967296\n", + }, { + map[string]uint64{"v": 4294967296}, + "v: 4294967296\n", + }, { + map[string]interface{}{"v": "10"}, + "v: \"10\"\n", + }, { + map[string]interface{}{"v": 0.1}, + "v: 0.1\n", + }, { + map[string]interface{}{"v": float64(0.1)}, + "v: 0.1\n", + }, { + map[string]interface{}{"v": -0.1}, + "v: -0.1\n", + }, { + map[string]interface{}{"v": math.Inf(+1)}, + "v: .inf\n", + }, { + map[string]interface{}{"v": math.Inf(-1)}, + "v: -.inf\n", + }, { + map[string]interface{}{"v": math.NaN()}, + "v: .nan\n", + }, { + map[string]interface{}{"v": nil}, + "v: null\n", + }, { + map[string]interface{}{"v": ""}, + "v: \"\"\n", + }, { + map[string][]string{"v": []string{"A", "B"}}, + "v:\n- A\n- B\n", + }, { + map[string][]string{"v": []string{"A", "B\nC"}}, + "v:\n- A\n- |-\n B\n C\n", + }, { + map[string][]interface{}{"v": []interface{}{"A", 1, map[string][]int{"B": []int{2, 3}}}}, + "v:\n- A\n- 1\n- B:\n - 2\n - 3\n", + }, { + map[string]interface{}{"a": map[interface{}]interface{}{"b": "c"}}, + "a:\n b: c\n", + }, { + map[string]interface{}{"a": "-"}, + "a: '-'\n", + }, + + // Simple values. + { + &marshalIntTest, + "123\n", + }, + + // Structures + { + &struct{ Hello string }{"world"}, + "hello: world\n", + }, { + &struct { + A struct { + B string + } + }{struct{ B string }{"c"}}, + "a:\n b: c\n", + }, { + &struct { + A *struct { + B string + } + }{&struct{ B string }{"c"}}, + "a:\n b: c\n", + }, { + &struct { + A *struct { + B string + } + }{}, + "a: null\n", + }, { + &struct{ A int }{1}, + "a: 1\n", + }, { + &struct{ A []int }{[]int{1, 2}}, + "a:\n- 1\n- 2\n", + }, { + &struct { + B int "a" + }{1}, + "a: 1\n", + }, { + &struct{ A bool }{true}, + "a: true\n", + }, + + // Conditional flag + { + &struct { + A int "a,omitempty" + B int "b,omitempty" + }{1, 0}, + "a: 1\n", + }, { + &struct { + A int "a,omitempty" + B int "b,omitempty" + }{0, 0}, + "{}\n", + }, { + &struct { + A *struct{ X, y int } "a,omitempty,flow" + }{&struct{ X, y int }{1, 2}}, + "a: {x: 1}\n", + }, { + &struct { + A *struct{ X, y int } "a,omitempty,flow" + }{nil}, + "{}\n", + }, { + &struct { + A *struct{ X, y int } "a,omitempty,flow" + }{&struct{ X, y int }{}}, + "a: {x: 0}\n", + }, { + &struct { + A struct{ X, y int } "a,omitempty,flow" + }{struct{ X, y int }{1, 2}}, + "a: {x: 1}\n", + }, { + &struct { + A struct{ X, y int } "a,omitempty,flow" + }{struct{ X, y int }{0, 1}}, + "{}\n", + }, { + &struct { + A float64 "a,omitempty" + B float64 "b,omitempty" + }{1, 0}, + "a: 1\n", + }, + + // Flow flag + { + &struct { + A []int "a,flow" + }{[]int{1, 2}}, + "a: [1, 2]\n", + }, { + &struct { + A map[string]string "a,flow" + }{map[string]string{"b": "c", "d": "e"}}, + "a: {b: c, d: e}\n", + }, { + &struct { + A struct { + B, D string + } "a,flow" + }{struct{ B, D string }{"c", "e"}}, + "a: {b: c, d: e}\n", + }, + + // Unexported field + { + &struct { + u int + A int + }{0, 1}, + "a: 1\n", + }, + + // Ignored field + { + &struct { + A int + B int "-" + }{1, 2}, + "a: 1\n", + }, + + // Struct inlining + { + &struct { + A int + C inlineB `yaml:",inline"` + }{1, inlineB{2, inlineC{3}}}, + "a: 1\nb: 2\nc: 3\n", + }, + + // Map inlining + { + &struct { + A int + C map[string]int `yaml:",inline"` + }{1, map[string]int{"b": 2, "c": 3}}, + "a: 1\nb: 2\nc: 3\n", + }, + + // Duration + { + map[string]time.Duration{"a": 3 * time.Second}, + "a: 3s\n", + }, + + // Issue #24: bug in map merging logic. + { + map[string]string{"a": "<foo>"}, + "a: <foo>\n", + }, + + // Issue #34: marshal unsupported base 60 floats quoted for compatibility + // with old YAML 1.1 parsers. + { + map[string]string{"a": "1:1"}, + "a: \"1:1\"\n", + }, + + // Binary data. + { + map[string]string{"a": "\x00"}, + "a: \"\\0\"\n", + }, { + map[string]string{"a": "\x80\x81\x82"}, + "a: !!binary gIGC\n", + }, { + map[string]string{"a": strings.Repeat("\x90", 54)}, + "a: !!binary |\n " + strings.Repeat("kJCQ", 17) + "kJ\n CQ\n", + }, + + // Ordered maps. + { + &yaml.MapSlice{{"b", 2}, {"a", 1}, {"d", 4}, {"c", 3}, {"sub", yaml.MapSlice{{"e", 5}}}}, + "b: 2\na: 1\nd: 4\nc: 3\nsub:\n e: 5\n", + }, + + // Encode unicode as utf-8 rather than in escaped form. + { + map[string]string{"a": "你好"}, + "a: 你好\n", + }, + + // Support encoding.TextMarshaler. + { + map[string]net.IP{"a": net.IPv4(1, 2, 3, 4)}, + "a: 1.2.3.4\n", + }, + { + map[string]time.Time{"a": time.Unix(1424801979, 0)}, + "a: 2015-02-24T18:19:39Z\n", + }, + + // Ensure strings containing ": " are quoted (reported as PR #43, but not reproducible). + { + map[string]string{"a": "b: c"}, + "a: 'b: c'\n", + }, + + // Containing hash mark ('#') in string should be quoted + { + map[string]string{"a": "Hello #comment"}, + "a: 'Hello #comment'\n", + }, + { + map[string]string{"a": "你好 #comment"}, + "a: '你好 #comment'\n", + }, +} + +func (s *S) TestMarshal(c *C) { + defer os.Setenv("TZ", os.Getenv("TZ")) + os.Setenv("TZ", "UTC") + for _, item := range marshalTests { + data, err := yaml.Marshal(item.value) + c.Assert(err, IsNil) + c.Assert(string(data), Equals, item.data) + } +} + +var marshalErrorTests = []struct { + value interface{} + error string + panic string +}{{ + value: &struct { + B int + inlineB ",inline" + }{1, inlineB{2, inlineC{3}}}, + panic: `Duplicated key 'b' in struct struct \{ B int; .*`, +}, { + value: &struct { + A int + B map[string]int ",inline" + }{1, map[string]int{"a": 2}}, + panic: `Can't have key "a" in inlined map; conflicts with struct field`, +}} + +func (s *S) TestMarshalErrors(c *C) { + for _, item := range marshalErrorTests { + if item.panic != "" { + c.Assert(func() { yaml.Marshal(item.value) }, PanicMatches, item.panic) + } else { + _, err := yaml.Marshal(item.value) + c.Assert(err, ErrorMatches, item.error) + } + } +} + +func (s *S) TestMarshalTypeCache(c *C) { + var data []byte + var err error + func() { + type T struct{ A int } + data, err = yaml.Marshal(&T{}) + c.Assert(err, IsNil) + }() + func() { + type T struct{ B int } + data, err = yaml.Marshal(&T{}) + c.Assert(err, IsNil) + }() + c.Assert(string(data), Equals, "b: 0\n") +} + +var marshalerTests = []struct { + data string + value interface{} +}{ + {"_:\n hi: there\n", map[interface{}]interface{}{"hi": "there"}}, + {"_:\n- 1\n- A\n", []interface{}{1, "A"}}, + {"_: 10\n", 10}, + {"_: null\n", nil}, + {"_: BAR!\n", "BAR!"}, +} + +type marshalerType struct { + value interface{} +} + +func (o marshalerType) MarshalText() ([]byte, error) { + panic("MarshalText called on type with MarshalYAML") +} + +func (o marshalerType) MarshalYAML() (interface{}, error) { + return o.value, nil +} + +type marshalerValue struct { + Field marshalerType "_" +} + +func (s *S) TestMarshaler(c *C) { + for _, item := range marshalerTests { + obj := &marshalerValue{} + obj.Field.value = item.value + data, err := yaml.Marshal(obj) + c.Assert(err, IsNil) + c.Assert(string(data), Equals, string(item.data)) + } +} + +func (s *S) TestMarshalerWholeDocument(c *C) { + obj := &marshalerType{} + obj.value = map[string]string{"hello": "world!"} + data, err := yaml.Marshal(obj) + c.Assert(err, IsNil) + c.Assert(string(data), Equals, "hello: world!\n") +} + +type failingMarshaler struct{} + +func (ft *failingMarshaler) MarshalYAML() (interface{}, error) { + return nil, failingErr +} + +func (s *S) TestMarshalerError(c *C) { + _, err := yaml.Marshal(&failingMarshaler{}) + c.Assert(err, Equals, failingErr) +} + +func (s *S) TestSortedOutput(c *C) { + order := []interface{}{ + false, + true, + 1, + uint(1), + 1.0, + 1.1, + 1.2, + 2, + uint(2), + 2.0, + 2.1, + "", + ".1", + ".2", + ".a", + "1", + "2", + "a!10", + "a/2", + "a/10", + "a~10", + "ab/1", + "b/1", + "b/01", + "b/2", + "b/02", + "b/3", + "b/03", + "b1", + "b01", + "b3", + "c2.10", + "c10.2", + "d1", + "d12", + "d12a", + } + m := make(map[interface{}]int) + for _, k := range order { + m[k] = 1 + } + data, err := yaml.Marshal(m) + c.Assert(err, IsNil) + out := "\n" + string(data) + last := 0 + for i, k := range order { + repr := fmt.Sprint(k) + if s, ok := k.(string); ok { + if _, err = strconv.ParseFloat(repr, 32); s == "" || err == nil { + repr = `"` + repr + `"` + } + } + index := strings.Index(out, "\n"+repr+":") + if index == -1 { + c.Fatalf("%#v is not in the output: %#v", k, out) + } + if index < last { + c.Fatalf("%#v was generated before %#v: %q", k, order[i-1], out) + } + last = index + } +} diff --git a/vendor/gopkg.in/yaml.v2/example_embedded_test.go b/vendor/gopkg.in/yaml.v2/example_embedded_test.go new file mode 100644 index 000000000..c8b241d54 --- /dev/null +++ b/vendor/gopkg.in/yaml.v2/example_embedded_test.go @@ -0,0 +1,41 @@ +package yaml_test + +import ( + "fmt" + "log" + + "gopkg.in/yaml.v2" +) + +// An example showing how to unmarshal embedded +// structs from YAML. + +type StructA struct { + A string `yaml:"a"` +} + +type StructB struct { + // Embedded structs are not treated as embedded in YAML by default. To do that, + // add the ",inline" annotation below + StructA `yaml:",inline"` + B string `yaml:"b"` +} + +var data = ` +a: a string from struct A +b: a string from struct B +` + +func ExampleUnmarshal_embedded() { + var b StructB + + err := yaml.Unmarshal([]byte(data), &b) + if err != nil { + log.Fatal("cannot unmarshal data: %v", err) + } + fmt.Println(b.A) + fmt.Println(b.B) + // Output: + // a string from struct A + // a string from struct B +} diff --git a/vendor/gopkg.in/yaml.v2/parserc.go b/vendor/gopkg.in/yaml.v2/parserc.go index 0a7037ad1..81d05dfe5 100644 --- a/vendor/gopkg.in/yaml.v2/parserc.go +++ b/vendor/gopkg.in/yaml.v2/parserc.go @@ -166,7 +166,6 @@ func yaml_parser_state_machine(parser *yaml_parser_t, event *yaml_event_t) bool default: panic("invalid parser state") } - return false } // Parse the production: diff --git a/vendor/gopkg.in/yaml.v2/readerc.go b/vendor/gopkg.in/yaml.v2/readerc.go index d5fb09727..f45079171 100644 --- a/vendor/gopkg.in/yaml.v2/readerc.go +++ b/vendor/gopkg.in/yaml.v2/readerc.go @@ -247,7 +247,7 @@ func yaml_parser_update_buffer(parser *yaml_parser_t, length int) bool { if parser.encoding == yaml_UTF16LE_ENCODING { low, high = 0, 1 } else { - high, low = 1, 0 + low, high = 1, 0 } // The UTF-16 encoding is not as simple as one might @@ -357,23 +357,26 @@ func yaml_parser_update_buffer(parser *yaml_parser_t, length int) bool { if value <= 0x7F { // 0000 0000-0000 007F . 0xxxxxxx parser.buffer[buffer_len+0] = byte(value) + buffer_len += 1 } else if value <= 0x7FF { // 0000 0080-0000 07FF . 110xxxxx 10xxxxxx parser.buffer[buffer_len+0] = byte(0xC0 + (value >> 6)) parser.buffer[buffer_len+1] = byte(0x80 + (value & 0x3F)) + buffer_len += 2 } else if value <= 0xFFFF { // 0000 0800-0000 FFFF . 1110xxxx 10xxxxxx 10xxxxxx parser.buffer[buffer_len+0] = byte(0xE0 + (value >> 12)) parser.buffer[buffer_len+1] = byte(0x80 + ((value >> 6) & 0x3F)) parser.buffer[buffer_len+2] = byte(0x80 + (value & 0x3F)) + buffer_len += 3 } else { // 0001 0000-0010 FFFF . 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx parser.buffer[buffer_len+0] = byte(0xF0 + (value >> 18)) parser.buffer[buffer_len+1] = byte(0x80 + ((value >> 12) & 0x3F)) parser.buffer[buffer_len+2] = byte(0x80 + ((value >> 6) & 0x3F)) parser.buffer[buffer_len+3] = byte(0x80 + (value & 0x3F)) + buffer_len += 4 } - buffer_len += width parser.unread++ } diff --git a/vendor/gopkg.in/yaml.v2/resolve.go b/vendor/gopkg.in/yaml.v2/resolve.go index 93a863274..232313cc0 100644 --- a/vendor/gopkg.in/yaml.v2/resolve.go +++ b/vendor/gopkg.in/yaml.v2/resolve.go @@ -3,6 +3,7 @@ package yaml import ( "encoding/base64" "math" + "regexp" "strconv" "strings" "unicode/utf8" @@ -80,6 +81,8 @@ func resolvableTag(tag string) bool { return false } +var yamlStyleFloat = regexp.MustCompile(`^[-+]?[0-9]*\.?[0-9]+([eE][-+][0-9]+)?$`) + func resolve(tag string, in string) (rtag string, out interface{}) { if !resolvableTag(tag) { return tag, in @@ -135,9 +138,11 @@ func resolve(tag string, in string) (rtag string, out interface{}) { if err == nil { return yaml_INT_TAG, uintv } - floatv, err := strconv.ParseFloat(plain, 64) - if err == nil { - return yaml_FLOAT_TAG, floatv + if yamlStyleFloat.MatchString(plain) { + floatv, err := strconv.ParseFloat(plain, 64) + if err == nil { + return yaml_FLOAT_TAG, floatv + } } if strings.HasPrefix(plain, "0b") { intv, err := strconv.ParseInt(plain[2:], 2, 64) diff --git a/vendor/gopkg.in/yaml.v2/scannerc.go b/vendor/gopkg.in/yaml.v2/scannerc.go index d97d76fa5..074484455 100644 --- a/vendor/gopkg.in/yaml.v2/scannerc.go +++ b/vendor/gopkg.in/yaml.v2/scannerc.go @@ -9,7 +9,7 @@ import ( // ************ // // The following notes assume that you are familiar with the YAML specification -// (http://yaml.org/spec/cvs/current.html). We mostly follow it, although in +// (http://yaml.org/spec/1.2/spec.html). We mostly follow it, although in // some cases we are less restrictive that it requires. // // The process of transforming a YAML stream into a sequence of events is @@ -611,7 +611,7 @@ func yaml_parser_set_scanner_tag_error(parser *yaml_parser_t, directive bool, co if directive { context = "while parsing a %TAG directive" } - return yaml_parser_set_scanner_error(parser, context, context_mark, "did not find URI escaped octet") + return yaml_parser_set_scanner_error(parser, context, context_mark, problem) } func trace(args ...interface{}) func() { @@ -1546,7 +1546,7 @@ func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool // Unknown directive. } else { yaml_parser_set_scanner_error(parser, "while scanning a directive", - start_mark, "found uknown directive name") + start_mark, "found unknown directive name") return false } @@ -1944,7 +1944,7 @@ func yaml_parser_scan_tag_handle(parser *yaml_parser_t, directive bool, start_ma } else { // It's either the '!' tag or not really a tag handle. If it's a %TAG // directive, it's an error. If it's a tag token, it must be a part of URI. - if directive && !(s[0] == '!' && s[1] == 0) { + if directive && string(s) != "!" { yaml_parser_set_scanner_tag_error(parser, directive, start_mark, "did not find expected '!'") return false @@ -1959,6 +1959,7 @@ func yaml_parser_scan_tag_handle(parser *yaml_parser_t, directive bool, start_ma func yaml_parser_scan_tag_uri(parser *yaml_parser_t, directive bool, head []byte, start_mark yaml_mark_t, uri *[]byte) bool { //size_t length = head ? strlen((char *)head) : 0 var s []byte + hasTag := len(head) > 0 // Copy the head if needed. // @@ -2000,10 +2001,10 @@ func yaml_parser_scan_tag_uri(parser *yaml_parser_t, directive bool, head []byte if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { return false } + hasTag = true } - // Check if the tag is non-empty. - if len(s) == 0 { + if !hasTag { yaml_parser_set_scanner_tag_error(parser, directive, start_mark, "did not find expected tag URI") return false diff --git a/vendor/gopkg.in/yaml.v2/suite_test.go b/vendor/gopkg.in/yaml.v2/suite_test.go new file mode 100644 index 000000000..c5cf1ed4f --- /dev/null +++ b/vendor/gopkg.in/yaml.v2/suite_test.go @@ -0,0 +1,12 @@ +package yaml_test + +import ( + . "gopkg.in/check.v1" + "testing" +) + +func Test(t *testing.T) { TestingT(t) } + +type S struct{} + +var _ = Suite(&S{}) diff --git a/vendor/gopkg.in/yaml.v2/yaml.go b/vendor/gopkg.in/yaml.v2/yaml.go index d133edf9d..bf18884e0 100644 --- a/vendor/gopkg.in/yaml.v2/yaml.go +++ b/vendor/gopkg.in/yaml.v2/yaml.go @@ -77,8 +77,19 @@ type Marshaler interface { // supported tag options. // func Unmarshal(in []byte, out interface{}) (err error) { + return unmarshal(in, out, false) +} + +// UnmarshalStrict is like Unmarshal except that any fields that are found +// in the data that do not have corresponding struct members will result in +// an error. +func UnmarshalStrict(in []byte, out interface{}) (err error) { + return unmarshal(in, out, true) +} + +func unmarshal(in []byte, out interface{}, strict bool) (err error) { defer handleErr(&err) - d := newDecoder() + d := newDecoder(strict) p := newParser(in) defer p.destroy() node := p.parse() @@ -222,7 +233,7 @@ func getStructInfo(st reflect.Type) (*structInfo, error) { inlineMap := -1 for i := 0; i != n; i++ { field := st.Field(i) - if field.PkgPath != "" { + if field.PkgPath != "" && !field.Anonymous { continue // Private field } diff --git a/vendor/gopkg.in/yaml.v2/yamlh.go b/vendor/gopkg.in/yaml.v2/yamlh.go index d60a6b6b0..3caeca049 100644 --- a/vendor/gopkg.in/yaml.v2/yamlh.go +++ b/vendor/gopkg.in/yaml.v2/yamlh.go @@ -508,7 +508,7 @@ type yaml_parser_t struct { problem string // Error description. - // The byte about which the problem occured. + // The byte about which the problem occurred. problem_offset int problem_value int problem_mark yaml_mark_t diff --git a/vendor/k8s.io/api/OWNERS b/vendor/k8s.io/api/OWNERS new file mode 100644 index 000000000..918b10522 --- /dev/null +++ b/vendor/k8s.io/api/OWNERS @@ -0,0 +1,51 @@ +approvers: +- erictune +- lavalamp +- smarterclayton +- thockin +- liggitt +# - bgrant0607 # manual escalations only +reviewers: +- brendandburns +- caesarxuchao +- davidopp +- dchen1107 +- deads2k +- derekwaynecarr +- dims +- eparis +- erictune +- errordeveloper +- feiskyer +- gmarek +- janetkuo +- jbeda +- jsafrane +- jszczepkowski +- justinsb +- krousey +- lavalamp +- liggitt +- luxas +- madhusudancs +- mikedanese +- mwielgus +- ncdc +- nikhiljindal +- piosz +- pmorie +- pwittrock +- roberthbailey +- rootfs +- saad-ali +- smarterclayton +- soltysh +- sttts +- tallclair +- thockin +- timothysc +- vishh +- wojtek-t +- yifan-gu +- yujuhong +- zmerlynn diff --git a/vendor/k8s.io/api/README.md b/vendor/k8s.io/api/README.md new file mode 100644 index 000000000..967543a45 --- /dev/null +++ b/vendor/k8s.io/api/README.md @@ -0,0 +1 @@ +This repo is still in the experimental stage. Shortly it will contain the schema of the API that are served by the Kubernetes apiserver. diff --git a/vendor/k8s.io/api/admissionregistration/v1alpha1/doc.go b/vendor/k8s.io/api/admissionregistration/v1alpha1/doc.go index bd72b25cc..49e0e0989 100644 --- a/vendor/k8s.io/api/admissionregistration/v1alpha1/doc.go +++ b/vendor/k8s.io/api/admissionregistration/v1alpha1/doc.go @@ -22,4 +22,4 @@ limitations under the License. // InitializerConfiguration and ExternalAdmissionHookConfiguration is for the // new dynamic admission controller configuration. // +groupName=admissionregistration.k8s.io -package v1alpha1 +package v1alpha1 // import "k8s.io/api/admissionregistration/v1alpha1" diff --git a/vendor/k8s.io/api/apps/OWNERS b/vendor/k8s.io/api/apps/OWNERS new file mode 100755 index 000000000..e06ff4c48 --- /dev/null +++ b/vendor/k8s.io/api/apps/OWNERS @@ -0,0 +1,20 @@ +reviewers: +- thockin +- lavalamp +- smarterclayton +- deads2k +- caesarxuchao +- pmorie +- sttts +- saad-ali +- ncdc +- tallclair +- timothysc +- dims +- errordeveloper +- mml +- m1093782566 +- mbohlool +- david-mcmahon +- kevin-wangzefeng +- jianhuiz diff --git a/vendor/k8s.io/api/apps/v1beta1/doc.go b/vendor/k8s.io/api/apps/v1beta1/doc.go index 82af692e6..158f0000c 100644 --- a/vendor/k8s.io/api/apps/v1beta1/doc.go +++ b/vendor/k8s.io/api/apps/v1beta1/doc.go @@ -17,4 +17,4 @@ limitations under the License. // +k8s:deepcopy-gen=package,register // +k8s:openapi-gen=true -package v1beta1 +package v1beta1 // import "k8s.io/api/apps/v1beta1" diff --git a/vendor/k8s.io/api/apps/v1beta2/doc.go b/vendor/k8s.io/api/apps/v1beta2/doc.go index 0527447bc..dafca1201 100644 --- a/vendor/k8s.io/api/apps/v1beta2/doc.go +++ b/vendor/k8s.io/api/apps/v1beta2/doc.go @@ -17,4 +17,4 @@ limitations under the License. // +k8s:deepcopy-gen=package,register // +k8s:openapi-gen=true -package v1beta2 +package v1beta2 // import "k8s.io/api/apps/v1beta2" diff --git a/vendor/k8s.io/api/authentication/OWNERS b/vendor/k8s.io/api/authentication/OWNERS new file mode 100755 index 000000000..952352341 --- /dev/null +++ b/vendor/k8s.io/api/authentication/OWNERS @@ -0,0 +1,10 @@ +reviewers: +- liggitt +- lavalamp +- wojtek-t +- deads2k +- sttts +- timothysc +- mbohlool +- jianhuiz +- enj diff --git a/vendor/k8s.io/api/authentication/v1/doc.go b/vendor/k8s.io/api/authentication/v1/doc.go index b354f2da1..15b117a4c 100644 --- a/vendor/k8s.io/api/authentication/v1/doc.go +++ b/vendor/k8s.io/api/authentication/v1/doc.go @@ -17,4 +17,4 @@ limitations under the License. // +k8s:deepcopy-gen=package,register // +groupName=authentication.k8s.io // +k8s:openapi-gen=true -package v1 +package v1 // import "k8s.io/api/authentication/v1" diff --git a/vendor/k8s.io/api/authentication/v1beta1/doc.go b/vendor/k8s.io/api/authentication/v1beta1/doc.go index c2e365640..065cfbd99 100644 --- a/vendor/k8s.io/api/authentication/v1beta1/doc.go +++ b/vendor/k8s.io/api/authentication/v1beta1/doc.go @@ -17,4 +17,4 @@ limitations under the License. // +k8s:deepcopy-gen=package,register // +groupName=authentication.k8s.io // +k8s:openapi-gen=true -package v1beta1 +package v1beta1 // import "k8s.io/api/authentication/v1beta1" diff --git a/vendor/k8s.io/api/authorization/OWNERS b/vendor/k8s.io/api/authorization/OWNERS new file mode 100755 index 000000000..a68d7eef5 --- /dev/null +++ b/vendor/k8s.io/api/authorization/OWNERS @@ -0,0 +1,18 @@ +reviewers: +- thockin +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- liggitt +- nikhiljindal +- erictune +- sttts +- ncdc +- timothysc +- dims +- mml +- mbohlool +- david-mcmahon +- jianhuiz +- enj diff --git a/vendor/k8s.io/api/authorization/v1/doc.go b/vendor/k8s.io/api/authorization/v1/doc.go index b2908215a..b02e09cae 100644 --- a/vendor/k8s.io/api/authorization/v1/doc.go +++ b/vendor/k8s.io/api/authorization/v1/doc.go @@ -18,4 +18,4 @@ limitations under the License. // +k8s:openapi-gen=true // +groupName=authorization.k8s.io -package v1 +package v1 // import "k8s.io/api/authorization/v1" diff --git a/vendor/k8s.io/api/authorization/v1beta1/doc.go b/vendor/k8s.io/api/authorization/v1beta1/doc.go index 48f1289d5..6809b811e 100644 --- a/vendor/k8s.io/api/authorization/v1beta1/doc.go +++ b/vendor/k8s.io/api/authorization/v1beta1/doc.go @@ -18,4 +18,4 @@ limitations under the License. // +k8s:openapi-gen=true // +groupName=authorization.k8s.io -package v1beta1 +package v1beta1 // import "k8s.io/api/authorization/v1beta1" diff --git a/vendor/k8s.io/api/autoscaling/OWNERS b/vendor/k8s.io/api/autoscaling/OWNERS new file mode 100755 index 000000000..76dffeceb --- /dev/null +++ b/vendor/k8s.io/api/autoscaling/OWNERS @@ -0,0 +1,20 @@ +reviewers: +- thockin +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- caesarxuchao +- erictune +- sttts +- ncdc +- timothysc +- piosz +- dims +- errordeveloper +- madhusudancs +- mml +- mbohlool +- david-mcmahon +- jianhuiz +- directxman12 diff --git a/vendor/k8s.io/api/autoscaling/v1/doc.go b/vendor/k8s.io/api/autoscaling/v1/doc.go index d567450ef..1689adb5c 100644 --- a/vendor/k8s.io/api/autoscaling/v1/doc.go +++ b/vendor/k8s.io/api/autoscaling/v1/doc.go @@ -17,4 +17,4 @@ limitations under the License. // +k8s:deepcopy-gen=package,register // +k8s:openapi-gen=true -package v1 +package v1 // import "k8s.io/api/autoscaling/v1" diff --git a/vendor/k8s.io/api/autoscaling/v2beta1/doc.go b/vendor/k8s.io/api/autoscaling/v2beta1/doc.go index 4758ad848..689f369bf 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta1/doc.go +++ b/vendor/k8s.io/api/autoscaling/v2beta1/doc.go @@ -17,4 +17,4 @@ limitations under the License. // +k8s:deepcopy-gen=package,register // +k8s:openapi-gen=true -package v2beta1 +package v2beta1 // import "k8s.io/api/autoscaling/v2beta1" diff --git a/vendor/k8s.io/api/batch/OWNERS b/vendor/k8s.io/api/batch/OWNERS new file mode 100755 index 000000000..502f90771 --- /dev/null +++ b/vendor/k8s.io/api/batch/OWNERS @@ -0,0 +1,19 @@ +reviewers: +- thockin +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- caesarxuchao +- erictune +- sttts +- saad-ali +- ncdc +- timothysc +- soltysh +- dims +- errordeveloper +- mml +- mbohlool +- david-mcmahon +- jianhuiz diff --git a/vendor/k8s.io/api/batch/v1/doc.go b/vendor/k8s.io/api/batch/v1/doc.go index d567450ef..52a1d9039 100644 --- a/vendor/k8s.io/api/batch/v1/doc.go +++ b/vendor/k8s.io/api/batch/v1/doc.go @@ -17,4 +17,4 @@ limitations under the License. // +k8s:deepcopy-gen=package,register // +k8s:openapi-gen=true -package v1 +package v1 // import "k8s.io/api/batch/v1" diff --git a/vendor/k8s.io/api/batch/v1beta1/doc.go b/vendor/k8s.io/api/batch/v1beta1/doc.go index 882b0295c..653ebe040 100644 --- a/vendor/k8s.io/api/batch/v1beta1/doc.go +++ b/vendor/k8s.io/api/batch/v1beta1/doc.go @@ -17,4 +17,4 @@ limitations under the License. // +k8s:deepcopy-gen=package,register // +k8s:openapi-gen=true -package v1beta1 +package v1beta1 // import "k8s.io/api/batch/v1beta1" diff --git a/vendor/k8s.io/api/batch/v2alpha1/doc.go b/vendor/k8s.io/api/batch/v2alpha1/doc.go index 81396d1ee..288275d6e 100644 --- a/vendor/k8s.io/api/batch/v2alpha1/doc.go +++ b/vendor/k8s.io/api/batch/v2alpha1/doc.go @@ -17,4 +17,4 @@ limitations under the License. // +k8s:deepcopy-gen=package,register // +k8s:openapi-gen=true -package v2alpha1 +package v2alpha1 // import "k8s.io/api/batch/v2alpha1" diff --git a/vendor/k8s.io/api/certificates/OWNERS b/vendor/k8s.io/api/certificates/OWNERS new file mode 100755 index 000000000..6066d2c12 --- /dev/null +++ b/vendor/k8s.io/api/certificates/OWNERS @@ -0,0 +1,15 @@ +reviewers: +- thockin +- lavalamp +- smarterclayton +- deads2k +- caesarxuchao +- liggitt +- sttts +- timothysc +- dims +- errordeveloper +- mbohlool +- david-mcmahon +- jianhuiz +- enj diff --git a/vendor/k8s.io/api/certificates/v1beta1/doc.go b/vendor/k8s.io/api/certificates/v1beta1/doc.go index 3f4281ec3..d98ee7c3d 100644 --- a/vendor/k8s.io/api/certificates/v1beta1/doc.go +++ b/vendor/k8s.io/api/certificates/v1beta1/doc.go @@ -18,4 +18,4 @@ limitations under the License. // +k8s:openapi-gen=true // +groupName=certificates.k8s.io -package v1beta1 +package v1beta1 // import "k8s.io/api/certificates/v1beta1" diff --git a/vendor/k8s.io/api/core/OWNERS b/vendor/k8s.io/api/core/OWNERS new file mode 100644 index 000000000..7009d88bf --- /dev/null +++ b/vendor/k8s.io/api/core/OWNERS @@ -0,0 +1,42 @@ +approvers: +- erictune +- lavalamp +- smarterclayton +- thockin +reviewers: +- thockin +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- yujuhong +- brendandburns +- derekwaynecarr +- caesarxuchao +- vishh +- mikedanese +- liggitt +- nikhiljindal +- gmarek +- erictune +- davidopp +- pmorie +- sttts +- dchen1107 +- saad-ali +- zmerlynn +- luxas +- janetkuo +- justinsb +- pwittrock +- roberthbailey +- ncdc +- tallclair +- yifan-gu +- eparis +- mwielgus +- timothysc +- soltysh +- piosz +- jsafrane +- jbeda diff --git a/vendor/k8s.io/api/core/v1/doc.go b/vendor/k8s.io/api/core/v1/doc.go index 9f9a27c3c..a31af9ea4 100644 --- a/vendor/k8s.io/api/core/v1/doc.go +++ b/vendor/k8s.io/api/core/v1/doc.go @@ -18,4 +18,4 @@ limitations under the License. // +k8s:deepcopy-gen=package,register // Package v1 is the v1 version of the core API. -package v1 +package v1 // import "k8s.io/api/core/v1" diff --git a/vendor/k8s.io/api/core/v1/taint_test.go b/vendor/k8s.io/api/core/v1/taint_test.go new file mode 100644 index 000000000..22c7f9c4f --- /dev/null +++ b/vendor/k8s.io/api/core/v1/taint_test.go @@ -0,0 +1,122 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "testing" +) + +func TestTaintToString(t *testing.T) { + testCases := []struct { + taint *Taint + expectedString string + }{ + { + taint: &Taint{ + Key: "foo", + Value: "bar", + Effect: TaintEffectNoSchedule, + }, + expectedString: "foo=bar:NoSchedule", + }, + { + taint: &Taint{ + Key: "foo", + Effect: TaintEffectNoSchedule, + }, + expectedString: "foo:NoSchedule", + }, + } + + for i, tc := range testCases { + if tc.expectedString != tc.taint.ToString() { + t.Errorf("[%v] expected taint %v converted to %s, got %s", i, tc.taint, tc.expectedString, tc.taint.ToString()) + } + } +} + +func TestMatchTaint(t *testing.T) { + testCases := []struct { + description string + taint *Taint + taintToMatch Taint + expectMatch bool + }{ + { + description: "two taints with the same key,value,effect should match", + taint: &Taint{ + Key: "foo", + Value: "bar", + Effect: TaintEffectNoSchedule, + }, + taintToMatch: Taint{ + Key: "foo", + Value: "bar", + Effect: TaintEffectNoSchedule, + }, + expectMatch: true, + }, + { + description: "two taints with the same key,effect but different value should match", + taint: &Taint{ + Key: "foo", + Value: "bar", + Effect: TaintEffectNoSchedule, + }, + taintToMatch: Taint{ + Key: "foo", + Value: "different-value", + Effect: TaintEffectNoSchedule, + }, + expectMatch: true, + }, + { + description: "two taints with the different key cannot match", + taint: &Taint{ + Key: "foo", + Value: "bar", + Effect: TaintEffectNoSchedule, + }, + taintToMatch: Taint{ + Key: "different-key", + Value: "bar", + Effect: TaintEffectNoSchedule, + }, + expectMatch: false, + }, + { + description: "two taints with the different effect cannot match", + taint: &Taint{ + Key: "foo", + Value: "bar", + Effect: TaintEffectNoSchedule, + }, + taintToMatch: Taint{ + Key: "foo", + Value: "bar", + Effect: TaintEffectPreferNoSchedule, + }, + expectMatch: false, + }, + } + + for _, tc := range testCases { + if tc.expectMatch != tc.taint.MatchTaint(&tc.taintToMatch) { + t.Errorf("[%s] expect taint %s match taint %s", tc.description, tc.taint.ToString(), tc.taintToMatch.ToString()) + } + } +} diff --git a/vendor/k8s.io/api/core/v1/toleration_test.go b/vendor/k8s.io/api/core/v1/toleration_test.go new file mode 100644 index 000000000..3dd48f087 --- /dev/null +++ b/vendor/k8s.io/api/core/v1/toleration_test.go @@ -0,0 +1,123 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "testing" +) + +func TestTolerationToleratesTaint(t *testing.T) { + + testCases := []struct { + description string + toleration Toleration + taint Taint + expectTolerated bool + }{ + { + description: "toleration and taint have the same key and effect, and operator is Exists, and taint has no value, expect tolerated", + toleration: Toleration{ + Key: "foo", + Operator: TolerationOpExists, + Effect: TaintEffectNoSchedule, + }, + taint: Taint{ + Key: "foo", + Effect: TaintEffectNoSchedule, + }, + expectTolerated: true, + }, + { + description: "toleration and taint have the same key and effect, and operator is Exists, and taint has some value, expect tolerated", + toleration: Toleration{ + Key: "foo", + Operator: TolerationOpExists, + Effect: TaintEffectNoSchedule, + }, + taint: Taint{ + Key: "foo", + Value: "bar", + Effect: TaintEffectNoSchedule, + }, + expectTolerated: true, + }, + { + description: "toleration and taint have the same effect, toleration has empty key and operator is Exists, means match all taints, expect tolerated", + toleration: Toleration{ + Key: "", + Operator: TolerationOpExists, + Effect: TaintEffectNoSchedule, + }, + taint: Taint{ + Key: "foo", + Value: "bar", + Effect: TaintEffectNoSchedule, + }, + expectTolerated: true, + }, + { + description: "toleration and taint have the same key, effect and value, and operator is Equal, expect tolerated", + toleration: Toleration{ + Key: "foo", + Operator: TolerationOpEqual, + Value: "bar", + Effect: TaintEffectNoSchedule, + }, + taint: Taint{ + Key: "foo", + Value: "bar", + Effect: TaintEffectNoSchedule, + }, + expectTolerated: true, + }, + { + description: "toleration and taint have the same key and effect, but different values, and operator is Equal, expect not tolerated", + toleration: Toleration{ + Key: "foo", + Operator: TolerationOpEqual, + Value: "value1", + Effect: TaintEffectNoSchedule, + }, + taint: Taint{ + Key: "foo", + Value: "value2", + Effect: TaintEffectNoSchedule, + }, + expectTolerated: false, + }, + { + description: "toleration and taint have the same key and value, but different effects, and operator is Equal, expect not tolerated", + toleration: Toleration{ + Key: "foo", + Operator: TolerationOpEqual, + Value: "bar", + Effect: TaintEffectNoSchedule, + }, + taint: Taint{ + Key: "foo", + Value: "bar", + Effect: TaintEffectNoExecute, + }, + expectTolerated: false, + }, + } + for _, tc := range testCases { + if tolerated := tc.toleration.ToleratesTaint(&tc.taint); tc.expectTolerated != tolerated { + t.Errorf("[%s] expect %v, got %v: toleration %+v, taint %s", tc.description, tc.expectTolerated, tolerated, tc.toleration, tc.taint.ToString()) + } + } +} diff --git a/vendor/k8s.io/api/extensions/OWNERS b/vendor/k8s.io/api/extensions/OWNERS new file mode 100755 index 000000000..82c173c98 --- /dev/null +++ b/vendor/k8s.io/api/extensions/OWNERS @@ -0,0 +1,39 @@ +reviewers: +- thockin +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- brendandburns +- derekwaynecarr +- caesarxuchao +- mikedanese +- liggitt +- nikhiljindal +- erictune +- pmorie +- sttts +- saad-ali +- janetkuo +- justinsb +- ncdc +- tallclair +- mwielgus +- timothysc +- soltysh +- piosz +- dims +- errordeveloper +- madhusudancs +- rootfs +- jszczepkowski +- mml +- resouer +- mbohlool +- david-mcmahon +- therc +- pweil- +- tmrts +- mqliang +- lukaszo +- jianhuiz diff --git a/vendor/k8s.io/api/extensions/v1beta1/doc.go b/vendor/k8s.io/api/extensions/v1beta1/doc.go index 82af692e6..ac174dd27 100644 --- a/vendor/k8s.io/api/extensions/v1beta1/doc.go +++ b/vendor/k8s.io/api/extensions/v1beta1/doc.go @@ -17,4 +17,4 @@ limitations under the License. // +k8s:deepcopy-gen=package,register // +k8s:openapi-gen=true -package v1beta1 +package v1beta1 // import "k8s.io/api/extensions/v1beta1" diff --git a/vendor/k8s.io/api/networking/OWNERS b/vendor/k8s.io/api/networking/OWNERS new file mode 100755 index 000000000..97bde9728 --- /dev/null +++ b/vendor/k8s.io/api/networking/OWNERS @@ -0,0 +1,4 @@ +reviewers: +- caseydavenport +- danwinship +- thockin diff --git a/vendor/k8s.io/api/networking/v1/doc.go b/vendor/k8s.io/api/networking/v1/doc.go index b4076cbbf..8bcc30b07 100644 --- a/vendor/k8s.io/api/networking/v1/doc.go +++ b/vendor/k8s.io/api/networking/v1/doc.go @@ -17,4 +17,4 @@ limitations under the License. // +k8s:deepcopy-gen=package,register // +k8s:openapi-gen=true // +groupName=networking.k8s.io -package v1 +package v1 // import "k8s.io/api/networking/v1" diff --git a/vendor/k8s.io/api/policy/OWNERS b/vendor/k8s.io/api/policy/OWNERS new file mode 100755 index 000000000..99e0bffb5 --- /dev/null +++ b/vendor/k8s.io/api/policy/OWNERS @@ -0,0 +1,4 @@ +approvers: +- sig-apps-api-approvers +reviewers: +- sig-apps-reviewers diff --git a/vendor/k8s.io/api/policy/v1beta1/doc.go b/vendor/k8s.io/api/policy/v1beta1/doc.go index 3492435ad..1e9f4974d 100644 --- a/vendor/k8s.io/api/policy/v1beta1/doc.go +++ b/vendor/k8s.io/api/policy/v1beta1/doc.go @@ -20,4 +20,4 @@ limitations under the License. // they aren't all here, are PodDisruptionBudget, PodSecurityPolicy, // NetworkPolicy, etc. // +k8s:openapi-gen=true -package v1beta1 +package v1beta1 // import "k8s.io/api/policy/v1beta1" diff --git a/vendor/k8s.io/api/rbac/OWNERS b/vendor/k8s.io/api/rbac/OWNERS new file mode 100755 index 000000000..53710111c --- /dev/null +++ b/vendor/k8s.io/api/rbac/OWNERS @@ -0,0 +1,18 @@ +reviewers: +- thockin +- lavalamp +- smarterclayton +- deads2k +- sttts +- ncdc +- timothysc +- dims +- krousey +- mml +- mbohlool +- david-mcmahon +- ericchiang +- lixiaobing10051267 +- jianhuiz +- liggitt +- enj diff --git a/vendor/k8s.io/api/rbac/v1/doc.go b/vendor/k8s.io/api/rbac/v1/doc.go index 7b5c3250a..737261a09 100644 --- a/vendor/k8s.io/api/rbac/v1/doc.go +++ b/vendor/k8s.io/api/rbac/v1/doc.go @@ -18,4 +18,4 @@ limitations under the License. // +k8s:openapi-gen=true // +groupName=rbac.authorization.k8s.io -package v1 +package v1 // import "k8s.io/api/rbac/v1" diff --git a/vendor/k8s.io/api/rbac/v1alpha1/doc.go b/vendor/k8s.io/api/rbac/v1alpha1/doc.go index 3c3c70375..619b47bf2 100644 --- a/vendor/k8s.io/api/rbac/v1alpha1/doc.go +++ b/vendor/k8s.io/api/rbac/v1alpha1/doc.go @@ -18,4 +18,4 @@ limitations under the License. // +k8s:openapi-gen=true // +groupName=rbac.authorization.k8s.io -package v1alpha1 +package v1alpha1 // import "k8s.io/api/rbac/v1alpha1" diff --git a/vendor/k8s.io/api/rbac/v1beta1/doc.go b/vendor/k8s.io/api/rbac/v1beta1/doc.go index 563373717..bb7d47df9 100644 --- a/vendor/k8s.io/api/rbac/v1beta1/doc.go +++ b/vendor/k8s.io/api/rbac/v1beta1/doc.go @@ -18,4 +18,4 @@ limitations under the License. // +k8s:openapi-gen=true // +groupName=rbac.authorization.k8s.io -package v1beta1 +package v1beta1 // import "k8s.io/api/rbac/v1beta1" diff --git a/vendor/k8s.io/api/scheduling/v1alpha1/doc.go b/vendor/k8s.io/api/scheduling/v1alpha1/doc.go index 8c401bcf2..bf9015986 100644 --- a/vendor/k8s.io/api/scheduling/v1alpha1/doc.go +++ b/vendor/k8s.io/api/scheduling/v1alpha1/doc.go @@ -18,4 +18,4 @@ limitations under the License. // +k8s:openapi-gen=true // +groupName=scheduling.k8s.io -package v1alpha1 +package v1alpha1 // import "k8s.io/api/scheduling/v1alpha1" diff --git a/vendor/k8s.io/api/settings/v1alpha1/doc.go b/vendor/k8s.io/api/settings/v1alpha1/doc.go index 605b35557..ae1bfb912 100644 --- a/vendor/k8s.io/api/settings/v1alpha1/doc.go +++ b/vendor/k8s.io/api/settings/v1alpha1/doc.go @@ -18,4 +18,4 @@ limitations under the License. // +k8s:openapi-gen=true // +groupName=settings.k8s.io -package v1alpha1 +package v1alpha1 // import "k8s.io/api/settings/v1alpha1" diff --git a/vendor/k8s.io/api/storage/OWNERS b/vendor/k8s.io/api/storage/OWNERS new file mode 100755 index 000000000..d59ed6e1d --- /dev/null +++ b/vendor/k8s.io/api/storage/OWNERS @@ -0,0 +1,3 @@ +reviewers: +- deads2k +- mbohlool diff --git a/vendor/k8s.io/api/storage/v1beta1/doc.go b/vendor/k8s.io/api/storage/v1beta1/doc.go index 58d2548ae..6137d7a4c 100644 --- a/vendor/k8s.io/api/storage/v1beta1/doc.go +++ b/vendor/k8s.io/api/storage/v1beta1/doc.go @@ -17,4 +17,4 @@ limitations under the License. // +k8s:deepcopy-gen=package,register // +groupName=storage.k8s.io // +k8s:openapi-gen=true -package v1beta1 +package v1beta1 // import "k8s.io/api/storage/v1beta1" diff --git a/vendor/k8s.io/apiextensions-apiserver/BUILD b/vendor/k8s.io/apiextensions-apiserver/BUILD new file mode 100644 index 000000000..90eddd2ef --- /dev/null +++ b/vendor/k8s.io/apiextensions-apiserver/BUILD @@ -0,0 +1,54 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_binary", + "go_library", +) + +go_binary( + name = "apiextensions-apiserver", + library = ":go_default_library", +) + +go_library( + name = "go_default_library", + srcs = ["main.go"], + deps = [ + "//vendor/github.com/golang/glog:go_default_library", + "//vendor/k8s.io/apiextensions-apiserver/pkg/cmd/server:go_default_library", + "//vendor/k8s.io/apiserver/pkg/server:go_default_library", + "//vendor/k8s.io/apiserver/pkg/util/logs:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [ + ":package-srcs", + "//staging/src/k8s.io/apiextensions-apiserver/examples/client-go:all-srcs", + "//staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions:all-srcs", + "//staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver:all-srcs", + "//staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset:all-srcs", + "//staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset:all-srcs", + "//staging/src/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions:all-srcs", + "//staging/src/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion:all-srcs", + "//staging/src/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/internalversion:all-srcs", + "//staging/src/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1beta1:all-srcs", + "//staging/src/k8s.io/apiextensions-apiserver/pkg/cmd/server:all-srcs", + "//staging/src/k8s.io/apiextensions-apiserver/pkg/controller/finalizer:all-srcs", + "//staging/src/k8s.io/apiextensions-apiserver/pkg/controller/status:all-srcs", + "//staging/src/k8s.io/apiextensions-apiserver/pkg/features:all-srcs", + "//staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource:all-srcs", + "//staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition:all-srcs", + "//staging/src/k8s.io/apiextensions-apiserver/test/integration:all-srcs", + ], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/apiextensions-apiserver/OWNERS b/vendor/k8s.io/apiextensions-apiserver/OWNERS new file mode 100644 index 000000000..e0cd3186f --- /dev/null +++ b/vendor/k8s.io/apiextensions-apiserver/OWNERS @@ -0,0 +1,8 @@ +reviewers: +- deads2k +- sttts +- enisoc +approvers: +- deads2k +- lavalamp +- sttts diff --git a/vendor/k8s.io/apiextensions-apiserver/README.md b/vendor/k8s.io/apiextensions-apiserver/README.md new file mode 100644 index 000000000..be75b9ba4 --- /dev/null +++ b/vendor/k8s.io/apiextensions-apiserver/README.md @@ -0,0 +1,20 @@ +# apiextensions-apiserver + +Implements: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/thirdpartyresources.md + +It provides an API for registering `CustomResourceDefinitions`. + +## Purpose + +This API server provides the implementation for `CustomResourceDefinitions` which is included as +delegate server inside of `kube-apiserver`. + + +## Compatibility + +HEAD of this repo will match HEAD of k8s.io/apiserver, k8s.io/apimachinery, and k8s.io/client-go. + +## Where does it come from? + +`apiextensions-apiserver` is synced from https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apiextensions-apiserver. +Code changes are made in that location, merged into `k8s.io/kubernetes` and later synced here. diff --git a/vendor/k8s.io/client-go/informers/internalinterfaces/factory_interfaces.go b/vendor/k8s.io/apiextensions-apiserver/main.go similarity index 50% rename from vendor/k8s.io/client-go/informers/internalinterfaces/factory_interfaces.go rename to vendor/k8s.io/apiextensions-apiserver/main.go index bfe354a59..7723e6513 100644 --- a/vendor/k8s.io/client-go/informers/internalinterfaces/factory_interfaces.go +++ b/vendor/k8s.io/apiextensions-apiserver/main.go @@ -14,21 +14,32 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen - -package internalinterfaces +package main import ( - runtime "k8s.io/apimachinery/pkg/runtime" - kubernetes "k8s.io/client-go/kubernetes" - cache "k8s.io/client-go/tools/cache" - time "time" + "flag" + "os" + "runtime" + + "github.com/golang/glog" + + "k8s.io/apiextensions-apiserver/pkg/cmd/server" + genericapiserver "k8s.io/apiserver/pkg/server" + "k8s.io/apiserver/pkg/util/logs" ) -type NewInformerFunc func(kubernetes.Interface, time.Duration) cache.SharedIndexInformer +func main() { + logs.InitLogs() + defer logs.FlushLogs() -// SharedInformerFactory a small interface to allow for adding an informer without an import cycle -type SharedInformerFactory interface { - Start(stopCh <-chan struct{}) - InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer + if len(os.Getenv("GOMAXPROCS")) == 0 { + runtime.GOMAXPROCS(runtime.NumCPU()) + } + + stopCh := genericapiserver.SetupSignalHandler() + cmd := server.NewCommandStartCustomResourceDefinitionsServer(os.Stdout, os.Stderr, stopCh) + cmd.Flags().AddGoFlagSet(flag.CommandLine) + if err := cmd.Execute(); err != nil { + glog.Fatal(err) + } } diff --git a/vendor/k8s.io/apimachinery/OWNERS b/vendor/k8s.io/apimachinery/OWNERS new file mode 100644 index 000000000..7069eeb0b --- /dev/null +++ b/vendor/k8s.io/apimachinery/OWNERS @@ -0,0 +1,21 @@ +approvers: +- lavalamp +- smarterclayton +- deads2k +- sttts +- liggitt +- caesarxuchao +reviewers: +- thockin +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- derekwaynecarr +- caesarxuchao +- mikedanese +- liggitt +- gmarek +- sttts +- ncdc +- tallclair diff --git a/vendor/k8s.io/apimachinery/README.md b/vendor/k8s.io/apimachinery/README.md new file mode 100644 index 000000000..98899fb58 --- /dev/null +++ b/vendor/k8s.io/apimachinery/README.md @@ -0,0 +1,29 @@ +# apimachinery + +Scheme, typing, encoding, decoding, and conversion packages for Kubernetes and Kubernetes-like API objects. + + +## Purpose + +This library is a shared dependency for servers and clients to work with Kubernetes API infrastructure without direct +type dependencies. It's first comsumers are `k8s.io/kubernetes`, `k8s.io/client-go`, and `k8s.io/apiserver`. + + +## Compatibility + +There are *NO compatibility guarantees* for this repository. It is in direct support of Kubernetes, so branches +will track Kubernetes and be compatible with that repo. As we more cleanly separate the layers, we will review the +compatibility guarantee. + + +## Where does it come from? + +`apimachinery` is synced from https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery. +Code changes are made in that location, merged into `k8s.io/kubernetes` and later synced here. + + +## Things you should *NOT* do + + 1. Add API types to this repo. This is for the machinery, not for the types. + 2. Directly modify any files under `pkg` in this repo. Those are driven from `k8s.io/kuberenetes/staging/src/k8s.io/apimachinery`. + 3. Expect compatibility. This repo is direct support of Kubernetes and the API isn't yet stable enough for API guarantees. \ No newline at end of file diff --git a/vendor/k8s.io/apimachinery/pkg/OWNERS b/vendor/k8s.io/apimachinery/pkg/OWNERS new file mode 100644 index 000000000..63bb7814f --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/OWNERS @@ -0,0 +1,6 @@ +approvers: +- caesarxuchao +- deads2k +- lavalamp +- smarterclayton +- liggitt diff --git a/vendor/k8s.io/apimachinery/pkg/api/errors/doc.go b/vendor/k8s.io/apimachinery/pkg/api/errors/doc.go index 58751ed0e..167baf680 100644 --- a/vendor/k8s.io/apimachinery/pkg/api/errors/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/api/errors/doc.go @@ -15,4 +15,4 @@ limitations under the License. */ // Package errors provides detailed error types for api field validation. -package errors +package errors // import "k8s.io/apimachinery/pkg/api/errors" diff --git a/vendor/k8s.io/apimachinery/pkg/api/errors/errors_test.go b/vendor/k8s.io/apimachinery/pkg/api/errors/errors_test.go new file mode 100644 index 000000000..afc26fd31 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/api/errors/errors_test.go @@ -0,0 +1,222 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package errors + +import ( + "errors" + "fmt" + "reflect" + "testing" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/validation/field" +) + +func resource(resource string) schema.GroupResource { + return schema.GroupResource{Group: "", Resource: resource} +} +func kind(kind string) schema.GroupKind { + return schema.GroupKind{Group: "", Kind: kind} +} + +func TestErrorNew(t *testing.T) { + err := NewAlreadyExists(resource("tests"), "1") + if !IsAlreadyExists(err) { + t.Errorf("expected to be %s", metav1.StatusReasonAlreadyExists) + } + if IsConflict(err) { + t.Errorf("expected to not be %s", metav1.StatusReasonConflict) + } + if IsNotFound(err) { + t.Errorf(fmt.Sprintf("expected to not be %s", metav1.StatusReasonNotFound)) + } + if IsInvalid(err) { + t.Errorf("expected to not be %s", metav1.StatusReasonInvalid) + } + if IsBadRequest(err) { + t.Errorf("expected to not be %s", metav1.StatusReasonBadRequest) + } + if IsForbidden(err) { + t.Errorf("expected to not be %s", metav1.StatusReasonForbidden) + } + if IsServerTimeout(err) { + t.Errorf("expected to not be %s", metav1.StatusReasonServerTimeout) + } + if IsMethodNotSupported(err) { + t.Errorf("expected to not be %s", metav1.StatusReasonMethodNotAllowed) + } + + if !IsConflict(NewConflict(resource("tests"), "2", errors.New("message"))) { + t.Errorf("expected to be conflict") + } + if !IsNotFound(NewNotFound(resource("tests"), "3")) { + t.Errorf("expected to be %s", metav1.StatusReasonNotFound) + } + if !IsInvalid(NewInvalid(kind("Test"), "2", nil)) { + t.Errorf("expected to be %s", metav1.StatusReasonInvalid) + } + if !IsBadRequest(NewBadRequest("reason")) { + t.Errorf("expected to be %s", metav1.StatusReasonBadRequest) + } + if !IsForbidden(NewForbidden(resource("tests"), "2", errors.New("reason"))) { + t.Errorf("expected to be %s", metav1.StatusReasonForbidden) + } + if !IsUnauthorized(NewUnauthorized("reason")) { + t.Errorf("expected to be %s", metav1.StatusReasonUnauthorized) + } + if !IsServerTimeout(NewServerTimeout(resource("tests"), "reason", 0)) { + t.Errorf("expected to be %s", metav1.StatusReasonServerTimeout) + } + if !IsMethodNotSupported(NewMethodNotSupported(resource("foos"), "delete")) { + t.Errorf("expected to be %s", metav1.StatusReasonMethodNotAllowed) + } + + if time, ok := SuggestsClientDelay(NewServerTimeout(resource("tests"), "doing something", 10)); time != 10 || !ok { + t.Errorf("unexpected %d", time) + } + if time, ok := SuggestsClientDelay(NewServerTimeout(resource("tests"), "doing something", 0)); time != 0 || !ok { + t.Errorf("unexpected %d", time) + } + if time, ok := SuggestsClientDelay(NewTimeoutError("test reason", 10)); time != 10 || !ok { + t.Errorf("unexpected %d", time) + } + if time, ok := SuggestsClientDelay(NewTooManyRequests("doing something", 10)); time != 10 || !ok { + t.Errorf("unexpected %d", time) + } + if time, ok := SuggestsClientDelay(NewTooManyRequests("doing something", 1)); time != 1 || !ok { + t.Errorf("unexpected %d", time) + } + if time, ok := SuggestsClientDelay(NewGenericServerResponse(429, "get", resource("tests"), "test", "doing something", 10, true)); time != 10 || !ok { + t.Errorf("unexpected %d", time) + } + if time, ok := SuggestsClientDelay(NewGenericServerResponse(500, "get", resource("tests"), "test", "doing something", 10, true)); time != 10 || !ok { + t.Errorf("unexpected %d", time) + } + if time, ok := SuggestsClientDelay(NewGenericServerResponse(429, "get", resource("tests"), "test", "doing something", 0, true)); time != 0 || ok { + t.Errorf("unexpected %d", time) + } +} + +func TestNewInvalid(t *testing.T) { + testCases := []struct { + Err *field.Error + Details *metav1.StatusDetails + }{ + { + field.Duplicate(field.NewPath("field[0].name"), "bar"), + &metav1.StatusDetails{ + Kind: "Kind", + Name: "name", + Causes: []metav1.StatusCause{{ + Type: metav1.CauseTypeFieldValueDuplicate, + Field: "field[0].name", + }}, + }, + }, + { + field.Invalid(field.NewPath("field[0].name"), "bar", "detail"), + &metav1.StatusDetails{ + Kind: "Kind", + Name: "name", + Causes: []metav1.StatusCause{{ + Type: metav1.CauseTypeFieldValueInvalid, + Field: "field[0].name", + }}, + }, + }, + { + field.NotFound(field.NewPath("field[0].name"), "bar"), + &metav1.StatusDetails{ + Kind: "Kind", + Name: "name", + Causes: []metav1.StatusCause{{ + Type: metav1.CauseTypeFieldValueNotFound, + Field: "field[0].name", + }}, + }, + }, + { + field.NotSupported(field.NewPath("field[0].name"), "bar", nil), + &metav1.StatusDetails{ + Kind: "Kind", + Name: "name", + Causes: []metav1.StatusCause{{ + Type: metav1.CauseTypeFieldValueNotSupported, + Field: "field[0].name", + }}, + }, + }, + { + field.Required(field.NewPath("field[0].name"), ""), + &metav1.StatusDetails{ + Kind: "Kind", + Name: "name", + Causes: []metav1.StatusCause{{ + Type: metav1.CauseTypeFieldValueRequired, + Field: "field[0].name", + }}, + }, + }, + } + for i, testCase := range testCases { + vErr, expected := testCase.Err, testCase.Details + expected.Causes[0].Message = vErr.ErrorBody() + err := NewInvalid(kind("Kind"), "name", field.ErrorList{vErr}) + status := err.ErrStatus + if status.Code != 422 || status.Reason != metav1.StatusReasonInvalid { + t.Errorf("%d: unexpected status: %#v", i, status) + } + if !reflect.DeepEqual(expected, status.Details) { + t.Errorf("%d: expected %#v, got %#v", i, expected, status.Details) + } + } +} + +func Test_reasonForError(t *testing.T) { + if e, a := metav1.StatusReasonUnknown, reasonForError(nil); e != a { + t.Errorf("unexpected reason type: %#v", a) + } +} + +type TestType struct{} + +func (obj *TestType) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } +func (obj *TestType) DeepCopyObject() runtime.Object { + if obj == nil { + return nil + } + clone := *obj + return &clone +} + +func TestFromObject(t *testing.T) { + table := []struct { + obj runtime.Object + message string + }{ + {&metav1.Status{Message: "foobar"}, "foobar"}, + {&TestType{}, "unexpected object: &{}"}, + } + + for _, item := range table { + if e, a := item.message, FromObject(item.obj).Error(); e != a { + t.Errorf("Expected %v, got %v", e, a) + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/doc.go b/vendor/k8s.io/apimachinery/pkg/api/meta/doc.go index a3b18a5c9..b6d42acf8 100644 --- a/vendor/k8s.io/apimachinery/pkg/api/meta/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/api/meta/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package meta provides functions for retrieving API metadata from objects // belonging to the Kubernetes API -package meta +package meta // import "k8s.io/apimachinery/pkg/api/meta" diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/meta_test.go b/vendor/k8s.io/apimachinery/pkg/api/meta/meta_test.go new file mode 100644 index 000000000..c7b753e0f --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/api/meta/meta_test.go @@ -0,0 +1,51 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package meta + +import ( + "math/rand" + "reflect" + "testing" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1alpha1 "k8s.io/apimachinery/pkg/apis/meta/v1alpha1" + "k8s.io/apimachinery/pkg/util/diff" + + fuzz "github.com/google/gofuzz" +) + +func TestAsPartialObjectMetadata(t *testing.T) { + f := fuzz.New().NilChance(.5).NumElements(0, 1).RandSource(rand.NewSource(1)) + + for i := 0; i < 100; i++ { + m := &metav1.ObjectMeta{} + f.Fuzz(m) + partial := AsPartialObjectMetadata(m) + if !reflect.DeepEqual(&partial.ObjectMeta, m) { + t.Fatalf("incomplete partial object metadata: %s", diff.ObjectReflectDiff(&partial.ObjectMeta, m)) + } + } + + for i := 0; i < 100; i++ { + m := &metav1alpha1.PartialObjectMetadata{} + f.Fuzz(&m.ObjectMeta) + partial := AsPartialObjectMetadata(m) + if !reflect.DeepEqual(&partial.ObjectMeta, &m.ObjectMeta) { + t.Fatalf("incomplete partial object metadata: %s", diff.ObjectReflectDiff(&partial.ObjectMeta, &m.ObjectMeta)) + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/multirestmapper_test.go b/vendor/k8s.io/apimachinery/pkg/api/meta/multirestmapper_test.go new file mode 100644 index 000000000..dec07a16f --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/api/meta/multirestmapper_test.go @@ -0,0 +1,355 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package meta + +import ( + "errors" + "reflect" + "testing" + + "k8s.io/apimachinery/pkg/runtime/schema" +) + +func TestMultiRESTMapperResourceFor(t *testing.T) { + tcs := []struct { + name string + + mapper MultiRESTMapper + input schema.GroupVersionResource + result schema.GroupVersionResource + err error + }{ + { + name: "empty", + mapper: MultiRESTMapper{}, + input: schema.GroupVersionResource{Resource: "foo"}, + result: schema.GroupVersionResource{}, + err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "foo"}}, + }, + { + name: "ignore not found", + mapper: MultiRESTMapper{fixedRESTMapper{err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "IGNORE_THIS"}}}}, + input: schema.GroupVersionResource{Resource: "foo"}, + result: schema.GroupVersionResource{}, + err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "foo"}}, + }, + { + name: "accept first failure", + mapper: MultiRESTMapper{fixedRESTMapper{err: errors.New("fail on this")}, fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{{Resource: "unused"}}}}, + input: schema.GroupVersionResource{Resource: "foo"}, + result: schema.GroupVersionResource{}, + err: errors.New("fail on this"), + }, + } + + for _, tc := range tcs { + actualResult, actualErr := tc.mapper.ResourceFor(tc.input) + if e, a := tc.result, actualResult; e != a { + t.Errorf("%s: expected %v, got %v", tc.name, e, a) + } + switch { + case tc.err == nil && actualErr == nil: + case tc.err == nil: + t.Errorf("%s: unexpected error: %v", tc.name, actualErr) + case actualErr == nil: + t.Errorf("%s: expected error: %v got nil", tc.name, tc.err) + case tc.err.Error() != actualErr.Error(): + t.Errorf("%s: expected %v, got %v", tc.name, tc.err, actualErr) + } + } +} + +func TestMultiRESTMapperResourcesFor(t *testing.T) { + tcs := []struct { + name string + + mapper MultiRESTMapper + input schema.GroupVersionResource + result []schema.GroupVersionResource + err error + }{ + { + name: "empty", + mapper: MultiRESTMapper{}, + input: schema.GroupVersionResource{Resource: "foo"}, + result: nil, + err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "foo"}}, + }, + { + name: "ignore not found", + mapper: MultiRESTMapper{fixedRESTMapper{err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "IGNORE_THIS"}}}}, + input: schema.GroupVersionResource{Resource: "foo"}, + result: nil, + err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "foo"}}, + }, + { + name: "accept first failure", + mapper: MultiRESTMapper{fixedRESTMapper{err: errors.New("fail on this")}, fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{{Resource: "unused"}}}}, + input: schema.GroupVersionResource{Resource: "foo"}, + result: nil, + err: errors.New("fail on this"), + }, + { + name: "union and dedup", + mapper: MultiRESTMapper{ + fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{{Resource: "dupe"}, {Resource: "first"}}}, + fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{{Resource: "dupe"}, {Resource: "second"}}}, + }, + input: schema.GroupVersionResource{Resource: "foo"}, + result: []schema.GroupVersionResource{{Resource: "dupe"}, {Resource: "first"}, {Resource: "second"}}, + }, + { + name: "skip not and continue", + mapper: MultiRESTMapper{ + fixedRESTMapper{err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "IGNORE_THIS"}}}, + fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{{Resource: "first"}, {Resource: "second"}}}, + }, + input: schema.GroupVersionResource{Resource: "foo"}, + result: []schema.GroupVersionResource{{Resource: "first"}, {Resource: "second"}}, + }, + } + + for _, tc := range tcs { + actualResult, actualErr := tc.mapper.ResourcesFor(tc.input) + if e, a := tc.result, actualResult; !reflect.DeepEqual(e, a) { + t.Errorf("%s: expected %v, got %v", tc.name, e, a) + } + switch { + case tc.err == nil && actualErr == nil: + case tc.err == nil: + t.Errorf("%s: unexpected error: %v", tc.name, actualErr) + case actualErr == nil: + t.Errorf("%s: expected error: %v got nil", tc.name, tc.err) + case tc.err.Error() != actualErr.Error(): + t.Errorf("%s: expected %v, got %v", tc.name, tc.err, actualErr) + } + } +} + +func TestMultiRESTMapperKindsFor(t *testing.T) { + tcs := []struct { + name string + + mapper MultiRESTMapper + input schema.GroupVersionResource + result []schema.GroupVersionKind + err error + }{ + { + name: "empty", + mapper: MultiRESTMapper{}, + input: schema.GroupVersionResource{Resource: "foo"}, + result: nil, + err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "foo"}}, + }, + { + name: "ignore not found", + mapper: MultiRESTMapper{fixedRESTMapper{err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "IGNORE_THIS"}}}}, + input: schema.GroupVersionResource{Resource: "foo"}, + result: nil, + err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "foo"}}, + }, + { + name: "accept first failure", + mapper: MultiRESTMapper{fixedRESTMapper{err: errors.New("fail on this")}, fixedRESTMapper{kindsFor: []schema.GroupVersionKind{{Kind: "unused"}}}}, + input: schema.GroupVersionResource{Resource: "foo"}, + result: nil, + err: errors.New("fail on this"), + }, + { + name: "union and dedup", + mapper: MultiRESTMapper{ + fixedRESTMapper{kindsFor: []schema.GroupVersionKind{{Kind: "dupe"}, {Kind: "first"}}}, + fixedRESTMapper{kindsFor: []schema.GroupVersionKind{{Kind: "dupe"}, {Kind: "second"}}}, + }, + input: schema.GroupVersionResource{Resource: "foo"}, + result: []schema.GroupVersionKind{{Kind: "dupe"}, {Kind: "first"}, {Kind: "second"}}, + }, + { + name: "skip not and continue", + mapper: MultiRESTMapper{ + fixedRESTMapper{err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "IGNORE_THIS"}}}, + fixedRESTMapper{kindsFor: []schema.GroupVersionKind{{Kind: "first"}, {Kind: "second"}}}, + }, + input: schema.GroupVersionResource{Resource: "foo"}, + result: []schema.GroupVersionKind{{Kind: "first"}, {Kind: "second"}}, + }, + } + + for _, tc := range tcs { + actualResult, actualErr := tc.mapper.KindsFor(tc.input) + if e, a := tc.result, actualResult; !reflect.DeepEqual(e, a) { + t.Errorf("%s: expected %v, got %v", tc.name, e, a) + } + switch { + case tc.err == nil && actualErr == nil: + case tc.err == nil: + t.Errorf("%s: unexpected error: %v", tc.name, actualErr) + case actualErr == nil: + t.Errorf("%s: expected error: %v got nil", tc.name, tc.err) + case tc.err.Error() != actualErr.Error(): + t.Errorf("%s: expected %v, got %v", tc.name, tc.err, actualErr) + } + } +} + +func TestMultiRESTMapperKindFor(t *testing.T) { + tcs := []struct { + name string + + mapper MultiRESTMapper + input schema.GroupVersionResource + result schema.GroupVersionKind + err error + }{ + { + name: "empty", + mapper: MultiRESTMapper{}, + input: schema.GroupVersionResource{Resource: "foo"}, + result: schema.GroupVersionKind{}, + err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "foo"}}, + }, + { + name: "ignore not found", + mapper: MultiRESTMapper{fixedRESTMapper{err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "IGNORE_THIS"}}}}, + input: schema.GroupVersionResource{Resource: "foo"}, + result: schema.GroupVersionKind{}, + err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "foo"}}, + }, + { + name: "accept first failure", + mapper: MultiRESTMapper{fixedRESTMapper{err: errors.New("fail on this")}, fixedRESTMapper{kindsFor: []schema.GroupVersionKind{{Kind: "unused"}}}}, + input: schema.GroupVersionResource{Resource: "foo"}, + result: schema.GroupVersionKind{}, + err: errors.New("fail on this"), + }, + } + + for _, tc := range tcs { + actualResult, actualErr := tc.mapper.KindFor(tc.input) + if e, a := tc.result, actualResult; e != a { + t.Errorf("%s: expected %v, got %v", tc.name, e, a) + } + switch { + case tc.err == nil && actualErr == nil: + case tc.err == nil: + t.Errorf("%s: unexpected error: %v", tc.name, actualErr) + case actualErr == nil: + t.Errorf("%s: expected error: %v got nil", tc.name, tc.err) + case tc.err.Error() != actualErr.Error(): + t.Errorf("%s: expected %v, got %v", tc.name, tc.err, actualErr) + } + } +} + +func TestMultiRESTMapperRESTMappings(t *testing.T) { + mapping1, mapping2 := &RESTMapping{}, &RESTMapping{} + tcs := []struct { + name string + + mapper MultiRESTMapper + input schema.GroupKind + result []*RESTMapping + err error + }{ + { + name: "empty", + mapper: MultiRESTMapper{}, + input: schema.GroupKind{Kind: "Foo"}, + result: nil, + err: &NoKindMatchError{PartialKind: schema.GroupVersionKind{Kind: "Foo"}}, + }, + { + name: "ignore not found", + mapper: MultiRESTMapper{fixedRESTMapper{err: &NoKindMatchError{PartialKind: schema.GroupVersionKind{Kind: "IGNORE_THIS"}}}}, + input: schema.GroupKind{Kind: "Foo"}, + result: nil, + err: &NoKindMatchError{PartialKind: schema.GroupVersionKind{Kind: "Foo"}}, + }, + { + name: "accept first failure", + mapper: MultiRESTMapper{fixedRESTMapper{err: errors.New("fail on this")}, fixedRESTMapper{mappings: []*RESTMapping{mapping1}}}, + input: schema.GroupKind{Kind: "Foo"}, + result: nil, + err: errors.New("fail on this"), + }, + { + name: "return both", + mapper: MultiRESTMapper{fixedRESTMapper{mappings: []*RESTMapping{mapping1}}, fixedRESTMapper{mappings: []*RESTMapping{mapping2}}}, + input: schema.GroupKind{Kind: "Foo"}, + result: []*RESTMapping{mapping1, mapping2}, + }, + } + + for _, tc := range tcs { + actualResult, actualErr := tc.mapper.RESTMappings(tc.input) + if e, a := tc.result, actualResult; !reflect.DeepEqual(e, a) { + t.Errorf("%s: expected %v, got %v", tc.name, e, a) + } + switch { + case tc.err == nil && actualErr == nil: + case tc.err == nil: + t.Errorf("%s: unexpected error: %v", tc.name, actualErr) + case actualErr == nil: + t.Errorf("%s: expected error: %v got nil", tc.name, tc.err) + case tc.err.Error() != actualErr.Error(): + t.Errorf("%s: expected %v, got %v", tc.name, tc.err, actualErr) + } + } +} + +type fixedRESTMapper struct { + resourcesFor []schema.GroupVersionResource + kindsFor []schema.GroupVersionKind + resourceFor schema.GroupVersionResource + kindFor schema.GroupVersionKind + mappings []*RESTMapping + + err error +} + +func (m fixedRESTMapper) ResourceSingularizer(resource string) (singular string, err error) { + return "", m.err +} + +func (m fixedRESTMapper) ResourcesFor(resource schema.GroupVersionResource) ([]schema.GroupVersionResource, error) { + return m.resourcesFor, m.err +} + +func (m fixedRESTMapper) KindsFor(resource schema.GroupVersionResource) (gvk []schema.GroupVersionKind, err error) { + return m.kindsFor, m.err +} + +func (m fixedRESTMapper) ResourceFor(resource schema.GroupVersionResource) (schema.GroupVersionResource, error) { + return m.resourceFor, m.err +} + +func (m fixedRESTMapper) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error) { + return m.kindFor, m.err +} + +func (m fixedRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (mapping *RESTMapping, err error) { + return nil, m.err +} + +func (m fixedRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) (mappings []*RESTMapping, err error) { + return m.mappings, m.err +} + +func (m fixedRESTMapper) ResourceIsValid(resource schema.GroupVersionResource) bool { + return false +} diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/priority_test.go b/vendor/k8s.io/apimachinery/pkg/api/meta/priority_test.go new file mode 100644 index 000000000..f273a39f9 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/api/meta/priority_test.go @@ -0,0 +1,346 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package meta + +import ( + "errors" + "reflect" + "strings" + "testing" + + "k8s.io/apimachinery/pkg/runtime/schema" +) + +func TestPriorityRESTMapperResourceForErrorHandling(t *testing.T) { + tcs := []struct { + name string + + delegate RESTMapper + resourcePatterns []schema.GroupVersionResource + result schema.GroupVersionResource + err string + }{ + { + name: "single hit", + delegate: fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{{Resource: "single-hit"}}}, + result: schema.GroupVersionResource{Resource: "single-hit"}, + }, + { + name: "ambiguous match", + delegate: fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{ + {Group: "one", Version: "a", Resource: "first"}, + {Group: "two", Version: "b", Resource: "second"}, + }}, + err: "matches multiple resources", + }, + { + name: "group selection", + delegate: fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{ + {Group: "one", Version: "a", Resource: "first"}, + {Group: "two", Version: "b", Resource: "second"}, + }}, + resourcePatterns: []schema.GroupVersionResource{ + {Group: "one", Version: AnyVersion, Resource: AnyResource}, + }, + result: schema.GroupVersionResource{Group: "one", Version: "a", Resource: "first"}, + }, + { + name: "empty match continues", + delegate: fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{ + {Group: "one", Version: "a", Resource: "first"}, + {Group: "two", Version: "b", Resource: "second"}, + }}, + resourcePatterns: []schema.GroupVersionResource{ + {Group: "fail", Version: AnyVersion, Resource: AnyResource}, + {Group: "one", Version: AnyVersion, Resource: AnyResource}, + }, + result: schema.GroupVersionResource{Group: "one", Version: "a", Resource: "first"}, + }, + { + name: "group followed by version selection", + delegate: fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{ + {Group: "one", Version: "a", Resource: "first"}, + {Group: "two", Version: "b", Resource: "second"}, + {Group: "one", Version: "c", Resource: "third"}, + }}, + resourcePatterns: []schema.GroupVersionResource{ + {Group: "one", Version: AnyVersion, Resource: AnyResource}, + {Group: AnyGroup, Version: "a", Resource: AnyResource}, + }, + result: schema.GroupVersionResource{Group: "one", Version: "a", Resource: "first"}, + }, + { + name: "resource selection", + delegate: fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{ + {Group: "one", Version: "a", Resource: "first"}, + {Group: "one", Version: "a", Resource: "second"}, + }}, + resourcePatterns: []schema.GroupVersionResource{ + {Group: AnyGroup, Version: AnyVersion, Resource: "second"}, + }, + result: schema.GroupVersionResource{Group: "one", Version: "a", Resource: "second"}, + }, + } + + for _, tc := range tcs { + mapper := PriorityRESTMapper{Delegate: tc.delegate, ResourcePriority: tc.resourcePatterns} + + actualResult, actualErr := mapper.ResourceFor(schema.GroupVersionResource{}) + if e, a := tc.result, actualResult; e != a { + t.Errorf("%s: expected %v, got %v", tc.name, e, a) + } + if len(tc.err) == 0 && actualErr == nil { + continue + } + if len(tc.err) > 0 && actualErr == nil { + t.Errorf("%s: missing expected err: %v", tc.name, tc.err) + continue + } + if !strings.Contains(actualErr.Error(), tc.err) { + t.Errorf("%s: expected %v, got %v", tc.name, tc.err, actualErr) + } + } +} + +func TestPriorityRESTMapperKindForErrorHandling(t *testing.T) { + tcs := []struct { + name string + + delegate RESTMapper + kindPatterns []schema.GroupVersionKind + result schema.GroupVersionKind + err string + }{ + { + name: "single hit", + delegate: fixedRESTMapper{kindsFor: []schema.GroupVersionKind{{Kind: "single-hit"}}}, + result: schema.GroupVersionKind{Kind: "single-hit"}, + }, + { + name: "ambiguous match", + delegate: fixedRESTMapper{kindsFor: []schema.GroupVersionKind{ + {Group: "one", Version: "a", Kind: "first"}, + {Group: "two", Version: "b", Kind: "second"}, + }}, + err: "matches multiple kinds", + }, + { + name: "group selection", + delegate: fixedRESTMapper{kindsFor: []schema.GroupVersionKind{ + {Group: "one", Version: "a", Kind: "first"}, + {Group: "two", Version: "b", Kind: "second"}, + }}, + kindPatterns: []schema.GroupVersionKind{ + {Group: "one", Version: AnyVersion, Kind: AnyKind}, + }, + result: schema.GroupVersionKind{Group: "one", Version: "a", Kind: "first"}, + }, + { + name: "empty match continues", + delegate: fixedRESTMapper{kindsFor: []schema.GroupVersionKind{ + {Group: "one", Version: "a", Kind: "first"}, + {Group: "two", Version: "b", Kind: "second"}, + }}, + kindPatterns: []schema.GroupVersionKind{ + {Group: "fail", Version: AnyVersion, Kind: AnyKind}, + {Group: "one", Version: AnyVersion, Kind: AnyKind}, + }, + result: schema.GroupVersionKind{Group: "one", Version: "a", Kind: "first"}, + }, + { + name: "group followed by version selection", + delegate: fixedRESTMapper{kindsFor: []schema.GroupVersionKind{ + {Group: "one", Version: "a", Kind: "first"}, + {Group: "two", Version: "b", Kind: "second"}, + {Group: "one", Version: "c", Kind: "third"}, + }}, + kindPatterns: []schema.GroupVersionKind{ + {Group: "one", Version: AnyVersion, Kind: AnyKind}, + {Group: AnyGroup, Version: "a", Kind: AnyKind}, + }, + result: schema.GroupVersionKind{Group: "one", Version: "a", Kind: "first"}, + }, + { + name: "kind selection", + delegate: fixedRESTMapper{kindsFor: []schema.GroupVersionKind{ + {Group: "one", Version: "a", Kind: "first"}, + {Group: "one", Version: "a", Kind: "second"}, + }}, + kindPatterns: []schema.GroupVersionKind{ + {Group: AnyGroup, Version: AnyVersion, Kind: "second"}, + }, + result: schema.GroupVersionKind{Group: "one", Version: "a", Kind: "second"}, + }, + } + + for _, tc := range tcs { + mapper := PriorityRESTMapper{Delegate: tc.delegate, KindPriority: tc.kindPatterns} + + actualResult, actualErr := mapper.KindFor(schema.GroupVersionResource{}) + if e, a := tc.result, actualResult; e != a { + t.Errorf("%s: expected %v, got %v", tc.name, e, a) + } + if len(tc.err) == 0 && actualErr == nil { + continue + } + if len(tc.err) > 0 && actualErr == nil { + t.Errorf("%s: missing expected err: %v", tc.name, tc.err) + continue + } + if !strings.Contains(actualErr.Error(), tc.err) { + t.Errorf("%s: expected %v, got %v", tc.name, tc.err, actualErr) + } + } +} + +func TestPriorityRESTMapperRESTMapping(t *testing.T) { + mapping1 := &RESTMapping{ + GroupVersionKind: schema.GroupVersionKind{Kind: "Foo", Version: "v1alpha1"}, + } + mapping2 := &RESTMapping{ + GroupVersionKind: schema.GroupVersionKind{Kind: "Foo", Version: "v1"}, + } + mapping3 := &RESTMapping{ + GroupVersionKind: schema.GroupVersionKind{Group: "other", Kind: "Foo", Version: "v1"}, + } + allMappers := MultiRESTMapper{ + fixedRESTMapper{mappings: []*RESTMapping{mapping1}}, + fixedRESTMapper{mappings: []*RESTMapping{mapping2}}, + fixedRESTMapper{mappings: []*RESTMapping{mapping3}}, + } + tcs := []struct { + name string + + mapper PriorityRESTMapper + input schema.GroupKind + result *RESTMapping + err error + }{ + { + name: "empty", + mapper: PriorityRESTMapper{Delegate: MultiRESTMapper{}}, + input: schema.GroupKind{Kind: "Foo"}, + err: &NoKindMatchError{PartialKind: schema.GroupVersionKind{Kind: "Foo"}}, + }, + { + name: "ignore not found", + mapper: PriorityRESTMapper{Delegate: MultiRESTMapper{fixedRESTMapper{err: &NoKindMatchError{PartialKind: schema.GroupVersionKind{Kind: "IGNORE_THIS"}}}}}, + input: schema.GroupKind{Kind: "Foo"}, + err: &NoKindMatchError{PartialKind: schema.GroupVersionKind{Kind: "Foo"}}, + }, + { + name: "accept first failure", + mapper: PriorityRESTMapper{Delegate: MultiRESTMapper{fixedRESTMapper{err: errors.New("fail on this")}, fixedRESTMapper{mappings: []*RESTMapping{mapping1}}}}, + input: schema.GroupKind{Kind: "Foo"}, + err: errors.New("fail on this"), + }, + { + name: "return error for ambiguous", + mapper: PriorityRESTMapper{ + Delegate: allMappers, + }, + input: schema.GroupKind{Kind: "Foo"}, + err: &AmbiguousKindError{ + PartialKind: schema.GroupVersionKind{Kind: "Foo"}, + MatchingKinds: []schema.GroupVersionKind{ + {Kind: "Foo", Version: "v1alpha1"}, + {Kind: "Foo", Version: "v1"}, + {Group: "other", Kind: "Foo", Version: "v1"}, + }, + }, + }, + { + name: "accept only item", + mapper: PriorityRESTMapper{ + Delegate: fixedRESTMapper{mappings: []*RESTMapping{mapping1}}, + }, + input: schema.GroupKind{Kind: "Foo"}, + result: mapping1, + }, + { + name: "return single priority", + mapper: PriorityRESTMapper{ + Delegate: allMappers, + KindPriority: []schema.GroupVersionKind{{Version: "v1", Kind: AnyKind}, {Version: "v1alpha1", Kind: AnyKind}}, + }, + input: schema.GroupKind{Kind: "Foo"}, + result: mapping2, + }, + { + name: "return out of group match", + mapper: PriorityRESTMapper{ + Delegate: allMappers, + KindPriority: []schema.GroupVersionKind{{Group: AnyGroup, Version: "v1", Kind: AnyKind}, {Group: "other", Version: AnyVersion, Kind: AnyKind}}, + }, + input: schema.GroupKind{Kind: "Foo"}, + result: mapping3, + }, + } + + for _, tc := range tcs { + actualResult, actualErr := tc.mapper.RESTMapping(tc.input) + if e, a := tc.result, actualResult; !reflect.DeepEqual(e, a) { + t.Errorf("%s: expected %v, got %v", tc.name, e, a) + } + switch { + case tc.err == nil && actualErr == nil: + case tc.err == nil: + t.Errorf("%s: unexpected error: %v", tc.name, actualErr) + case actualErr == nil: + t.Errorf("%s: expected error: %v got nil", tc.name, tc.err) + case tc.err.Error() != actualErr.Error(): + t.Errorf("%s: expected %v, got %v", tc.name, tc.err, actualErr) + } + } +} + +func TestPriorityRESTMapperRESTMappingHonorsUserVersion(t *testing.T) { + mappingV2alpha1 := &RESTMapping{ + GroupVersionKind: schema.GroupVersionKind{Group: "Bar", Kind: "Foo", Version: "v2alpha1"}, + } + mappingV1 := &RESTMapping{ + GroupVersionKind: schema.GroupVersionKind{Group: "Bar", Kind: "Foo", Version: "v1"}, + } + + allMappers := MultiRESTMapper{ + fixedRESTMapper{mappings: []*RESTMapping{mappingV2alpha1}}, + fixedRESTMapper{mappings: []*RESTMapping{mappingV1}}, + } + + mapper := PriorityRESTMapper{ + Delegate: allMappers, + KindPriority: []schema.GroupVersionKind{{Group: "Bar", Version: "v2alpha1", Kind: AnyKind}, {Group: "Bar", Version: AnyVersion, Kind: AnyKind}}, + } + + outMapping1, err := mapper.RESTMapping(schema.GroupKind{Group: "Bar", Kind: "Foo"}, "v1") + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + if outMapping1 != mappingV1 { + t.Errorf("asked for version %v, expected mapping for %v, got mapping for %v", "v1", mappingV1.GroupVersionKind, outMapping1.GroupVersionKind) + } + + outMapping2, err := mapper.RESTMapping(schema.GroupKind{Group: "Bar", Kind: "Foo"}, "v2alpha1") + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + if outMapping2 != mappingV2alpha1 { + t.Errorf("asked for version %v, expected mapping for %v, got mapping for %v", "v2alpha1", mappingV2alpha1.GroupVersionKind, outMapping2.GroupVersionKind) + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/restmapper_test.go b/vendor/k8s.io/apimachinery/pkg/api/meta/restmapper_test.go new file mode 100644 index 000000000..292c4149e --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/api/meta/restmapper_test.go @@ -0,0 +1,751 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package meta + +import ( + "errors" + "reflect" + "strings" + "testing" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +type fakeConvertor struct{} + +func (fakeConvertor) Convert(in, out, context interface{}) error { + return nil +} + +func (fakeConvertor) ConvertToVersion(in runtime.Object, _ runtime.GroupVersioner) (runtime.Object, error) { + return in, nil +} + +func (fakeConvertor) ConvertFieldLabel(version, kind, label, value string) (string, string, error) { + return label, value, nil +} + +var validAccessor = resourceAccessor{} +var validConvertor = fakeConvertor{} + +func fakeInterfaces(version schema.GroupVersion) (*VersionInterfaces, error) { + return &VersionInterfaces{ObjectConvertor: validConvertor, MetadataAccessor: validAccessor}, nil +} + +var unmatchedErr = errors.New("no version") + +func unmatchedVersionInterfaces(version schema.GroupVersion) (*VersionInterfaces, error) { + return nil, unmatchedErr +} + +func TestRESTMapperVersionAndKindForResource(t *testing.T) { + testGroup := "test.group" + testVersion := "test" + testGroupVersion := schema.GroupVersion{Group: testGroup, Version: testVersion} + + testCases := []struct { + Resource schema.GroupVersionResource + GroupVersionToRegister schema.GroupVersion + ExpectedGVK schema.GroupVersionKind + Err bool + }{ + {Resource: schema.GroupVersionResource{Resource: "internalobjec"}, Err: true}, + {Resource: schema.GroupVersionResource{Resource: "internalObjec"}, Err: true}, + + {Resource: schema.GroupVersionResource{Resource: "internalobject"}, ExpectedGVK: testGroupVersion.WithKind("InternalObject")}, + {Resource: schema.GroupVersionResource{Resource: "internalobjects"}, ExpectedGVK: testGroupVersion.WithKind("InternalObject")}, + } + for i, testCase := range testCases { + mapper := NewDefaultRESTMapper([]schema.GroupVersion{testGroupVersion}, fakeInterfaces) + if len(testCase.ExpectedGVK.Kind) != 0 { + mapper.Add(testCase.ExpectedGVK, RESTScopeNamespace) + } + actualGVK, err := mapper.KindFor(testCase.Resource) + + hasErr := err != nil + if hasErr != testCase.Err { + t.Errorf("%d: unexpected error behavior %t: %v", i, testCase.Err, err) + continue + } + if err != nil { + continue + } + + if actualGVK != testCase.ExpectedGVK { + t.Errorf("%d: unexpected version and kind: e=%s a=%s", i, testCase.ExpectedGVK, actualGVK) + } + } +} + +func TestRESTMapperGroupForResource(t *testing.T) { + testCases := []struct { + Resource schema.GroupVersionResource + GroupVersionKind schema.GroupVersionKind + Err bool + }{ + {Resource: schema.GroupVersionResource{Resource: "myObject"}, GroupVersionKind: schema.GroupVersionKind{Group: "testapi", Version: "test", Kind: "MyObject"}}, + {Resource: schema.GroupVersionResource{Resource: "myobject"}, GroupVersionKind: schema.GroupVersionKind{Group: "testapi2", Version: "test", Kind: "MyObject"}}, + {Resource: schema.GroupVersionResource{Resource: "myObje"}, Err: true, GroupVersionKind: schema.GroupVersionKind{Group: "testapi", Version: "test", Kind: "MyObject"}}, + {Resource: schema.GroupVersionResource{Resource: "myobje"}, Err: true, GroupVersionKind: schema.GroupVersionKind{Group: "testapi", Version: "test", Kind: "MyObject"}}, + } + for i, testCase := range testCases { + mapper := NewDefaultRESTMapper([]schema.GroupVersion{testCase.GroupVersionKind.GroupVersion()}, fakeInterfaces) + mapper.Add(testCase.GroupVersionKind, RESTScopeNamespace) + + actualGVK, err := mapper.KindFor(testCase.Resource) + if testCase.Err { + if err == nil { + t.Errorf("%d: expected error", i) + } + } else if err != nil { + t.Errorf("%d: unexpected error: %v", i, err) + } else if actualGVK != testCase.GroupVersionKind { + t.Errorf("%d: expected group %q, got %q", i, testCase.GroupVersionKind, actualGVK) + } + } +} + +func TestRESTMapperKindsFor(t *testing.T) { + testCases := []struct { + Name string + PreferredOrder []schema.GroupVersion + KindsToRegister []schema.GroupVersionKind + PartialResourceToRequest schema.GroupVersionResource + + ExpectedKinds []schema.GroupVersionKind + ExpectedKindErr string + }{ + { + // exact matches are preferred + Name: "groups, with group exact", + PreferredOrder: []schema.GroupVersion{ + {Group: "first-group-1", Version: "first-version"}, + {Group: "first-group", Version: "first-version"}, + }, + KindsToRegister: []schema.GroupVersionKind{ + {Group: "first-group-1", Version: "first-version", Kind: "my-kind"}, + {Group: "first-group", Version: "first-version", Kind: "my-kind"}, + }, + PartialResourceToRequest: schema.GroupVersionResource{Group: "first-group", Resource: "my-kind"}, + + ExpectedKinds: []schema.GroupVersionKind{ + {Group: "first-group", Version: "first-version", Kind: "my-kind"}, + }, + }, + + { + // group prefixes work + Name: "groups, with group prefix", + PreferredOrder: []schema.GroupVersion{ + {Group: "second-group", Version: "first-version"}, + {Group: "first-group", Version: "first-version"}, + }, + KindsToRegister: []schema.GroupVersionKind{ + {Group: "first-group", Version: "first-version", Kind: "my-kind"}, + {Group: "second-group", Version: "first-version", Kind: "my-kind"}, + }, + PartialResourceToRequest: schema.GroupVersionResource{Group: "first", Resource: "my-kind"}, + + ExpectedKinds: []schema.GroupVersionKind{ + {Group: "first-group", Version: "first-version", Kind: "my-kind"}, + }, + }, + + { + // group prefixes can be ambiguous + Name: "groups, with ambiguous group prefix", + PreferredOrder: []schema.GroupVersion{ + {Group: "first-group-1", Version: "first-version"}, + {Group: "first-group", Version: "first-version"}, + }, + KindsToRegister: []schema.GroupVersionKind{ + {Group: "first-group-1", Version: "first-version", Kind: "my-kind"}, + {Group: "first-group", Version: "first-version", Kind: "my-kind"}, + }, + PartialResourceToRequest: schema.GroupVersionResource{Group: "first", Resource: "my-kind"}, + + ExpectedKinds: []schema.GroupVersionKind{ + {Group: "first-group-1", Version: "first-version", Kind: "my-kind"}, + {Group: "first-group", Version: "first-version", Kind: "my-kind"}, + }, + ExpectedKindErr: " matches multiple kinds ", + }, + + { + Name: "ambiguous groups, with preference order", + PreferredOrder: []schema.GroupVersion{ + {Group: "second-group", Version: "first-version"}, + {Group: "first-group", Version: "first-version"}, + }, + KindsToRegister: []schema.GroupVersionKind{ + {Group: "first-group", Version: "first-version", Kind: "my-kind"}, + {Group: "first-group", Version: "first-version", Kind: "your-kind"}, + {Group: "second-group", Version: "first-version", Kind: "my-kind"}, + {Group: "second-group", Version: "first-version", Kind: "your-kind"}, + }, + PartialResourceToRequest: schema.GroupVersionResource{Resource: "my-kinds"}, + + ExpectedKinds: []schema.GroupVersionKind{ + {Group: "second-group", Version: "first-version", Kind: "my-kind"}, + {Group: "first-group", Version: "first-version", Kind: "my-kind"}, + }, + ExpectedKindErr: " matches multiple kinds ", + }, + + { + Name: "ambiguous groups, with explicit group match", + PreferredOrder: []schema.GroupVersion{ + {Group: "second-group", Version: "first-version"}, + {Group: "first-group", Version: "first-version"}, + }, + KindsToRegister: []schema.GroupVersionKind{ + {Group: "first-group", Version: "first-version", Kind: "my-kind"}, + {Group: "first-group", Version: "first-version", Kind: "your-kind"}, + {Group: "second-group", Version: "first-version", Kind: "my-kind"}, + {Group: "second-group", Version: "first-version", Kind: "your-kind"}, + }, + PartialResourceToRequest: schema.GroupVersionResource{Group: "first-group", Resource: "my-kinds"}, + + ExpectedKinds: []schema.GroupVersionKind{ + {Group: "first-group", Version: "first-version", Kind: "my-kind"}, + }, + }, + + { + Name: "ambiguous groups, with ambiguous version match", + PreferredOrder: []schema.GroupVersion{ + {Group: "first-group", Version: "first-version"}, + {Group: "second-group", Version: "first-version"}, + }, + KindsToRegister: []schema.GroupVersionKind{ + {Group: "first-group", Version: "first-version", Kind: "my-kind"}, + {Group: "first-group", Version: "first-version", Kind: "your-kind"}, + {Group: "second-group", Version: "first-version", Kind: "my-kind"}, + {Group: "second-group", Version: "first-version", Kind: "your-kind"}, + }, + PartialResourceToRequest: schema.GroupVersionResource{Version: "first-version", Resource: "my-kinds"}, + + ExpectedKinds: []schema.GroupVersionKind{ + {Group: "first-group", Version: "first-version", Kind: "my-kind"}, + {Group: "second-group", Version: "first-version", Kind: "my-kind"}, + }, + ExpectedKindErr: " matches multiple kinds ", + }, + } + for _, testCase := range testCases { + tcName := testCase.Name + mapper := NewDefaultRESTMapper(testCase.PreferredOrder, fakeInterfaces) + for _, kind := range testCase.KindsToRegister { + mapper.Add(kind, RESTScopeNamespace) + } + + actualKinds, err := mapper.KindsFor(testCase.PartialResourceToRequest) + if err != nil { + t.Errorf("%s: unexpected error: %v", tcName, err) + continue + } + if !reflect.DeepEqual(testCase.ExpectedKinds, actualKinds) { + t.Errorf("%s: expected %v, got %v", tcName, testCase.ExpectedKinds, actualKinds) + } + + singleKind, err := mapper.KindFor(testCase.PartialResourceToRequest) + if err == nil && len(testCase.ExpectedKindErr) != 0 { + t.Errorf("%s: expected error: %v", tcName, testCase.ExpectedKindErr) + continue + } + if err != nil { + if len(testCase.ExpectedKindErr) == 0 { + t.Errorf("%s: unexpected error: %v", tcName, err) + continue + } else { + if !strings.Contains(err.Error(), testCase.ExpectedKindErr) { + t.Errorf("%s: expected %v, got %v", tcName, testCase.ExpectedKindErr, err) + continue + } + } + + } else { + if testCase.ExpectedKinds[0] != singleKind { + t.Errorf("%s: expected %v, got %v", tcName, testCase.ExpectedKinds[0], singleKind) + } + + } + } +} + +func TestRESTMapperResourcesFor(t *testing.T) { + testCases := []struct { + Name string + PreferredOrder []schema.GroupVersion + KindsToRegister []schema.GroupVersionKind + PluralPartialResourceToRequest schema.GroupVersionResource + SingularPartialResourceToRequest schema.GroupVersionResource + + ExpectedResources []schema.GroupVersionResource + ExpectedResourceErr string + }{ + { + // exact matches are preferred + Name: "groups, with group exact", + PreferredOrder: []schema.GroupVersion{ + {Group: "first-group-1", Version: "first-version"}, + {Group: "first-group", Version: "first-version"}, + }, + KindsToRegister: []schema.GroupVersionKind{ + {Group: "first-group-1", Version: "first-version", Kind: "my-kind"}, + {Group: "first-group", Version: "first-version", Kind: "my-kind"}, + }, + PluralPartialResourceToRequest: schema.GroupVersionResource{Group: "first-group", Resource: "my-kinds"}, + SingularPartialResourceToRequest: schema.GroupVersionResource{Group: "first-group", Resource: "my-kind"}, + + ExpectedResources: []schema.GroupVersionResource{ + {Group: "first-group", Version: "first-version", Resource: "my-kinds"}, + }, + }, + + { + // group prefixes work + Name: "groups, with group prefix", + PreferredOrder: []schema.GroupVersion{ + {Group: "second-group", Version: "first-version"}, + {Group: "first-group", Version: "first-version"}, + }, + KindsToRegister: []schema.GroupVersionKind{ + {Group: "first-group", Version: "first-version", Kind: "my-kind"}, + {Group: "second-group", Version: "first-version", Kind: "my-kind"}, + }, + PluralPartialResourceToRequest: schema.GroupVersionResource{Group: "first", Resource: "my-kinds"}, + SingularPartialResourceToRequest: schema.GroupVersionResource{Group: "first", Resource: "my-kind"}, + + ExpectedResources: []schema.GroupVersionResource{ + {Group: "first-group", Version: "first-version", Resource: "my-kinds"}, + }, + }, + + { + // group prefixes can be ambiguous + Name: "groups, with ambiguous group prefix", + PreferredOrder: []schema.GroupVersion{ + {Group: "first-group-1", Version: "first-version"}, + {Group: "first-group", Version: "first-version"}, + }, + KindsToRegister: []schema.GroupVersionKind{ + {Group: "first-group-1", Version: "first-version", Kind: "my-kind"}, + {Group: "first-group", Version: "first-version", Kind: "my-kind"}, + }, + PluralPartialResourceToRequest: schema.GroupVersionResource{Group: "first", Resource: "my-kinds"}, + SingularPartialResourceToRequest: schema.GroupVersionResource{Group: "first", Resource: "my-kind"}, + + ExpectedResources: []schema.GroupVersionResource{ + {Group: "first-group-1", Version: "first-version", Resource: "my-kinds"}, + {Group: "first-group", Version: "first-version", Resource: "my-kinds"}, + }, + ExpectedResourceErr: " matches multiple resources ", + }, + + { + Name: "ambiguous groups, with preference order", + PreferredOrder: []schema.GroupVersion{ + {Group: "second-group", Version: "first-version"}, + {Group: "first-group", Version: "first-version"}, + }, + KindsToRegister: []schema.GroupVersionKind{ + {Group: "first-group", Version: "first-version", Kind: "my-kind"}, + {Group: "first-group", Version: "first-version", Kind: "your-kind"}, + {Group: "second-group", Version: "first-version", Kind: "my-kind"}, + {Group: "second-group", Version: "first-version", Kind: "your-kind"}, + }, + PluralPartialResourceToRequest: schema.GroupVersionResource{Resource: "my-kinds"}, + SingularPartialResourceToRequest: schema.GroupVersionResource{Resource: "my-kind"}, + + ExpectedResources: []schema.GroupVersionResource{ + {Group: "second-group", Version: "first-version", Resource: "my-kinds"}, + {Group: "first-group", Version: "first-version", Resource: "my-kinds"}, + }, + ExpectedResourceErr: " matches multiple resources ", + }, + + { + Name: "ambiguous groups, with explicit group match", + PreferredOrder: []schema.GroupVersion{ + {Group: "second-group", Version: "first-version"}, + {Group: "first-group", Version: "first-version"}, + }, + KindsToRegister: []schema.GroupVersionKind{ + {Group: "first-group", Version: "first-version", Kind: "my-kind"}, + {Group: "first-group", Version: "first-version", Kind: "your-kind"}, + {Group: "second-group", Version: "first-version", Kind: "my-kind"}, + {Group: "second-group", Version: "first-version", Kind: "your-kind"}, + }, + PluralPartialResourceToRequest: schema.GroupVersionResource{Group: "first-group", Resource: "my-kinds"}, + SingularPartialResourceToRequest: schema.GroupVersionResource{Group: "first-group", Resource: "my-kind"}, + + ExpectedResources: []schema.GroupVersionResource{ + {Group: "first-group", Version: "first-version", Resource: "my-kinds"}, + }, + }, + + { + Name: "ambiguous groups, with ambiguous version match", + PreferredOrder: []schema.GroupVersion{ + {Group: "first-group", Version: "first-version"}, + {Group: "second-group", Version: "first-version"}, + }, + KindsToRegister: []schema.GroupVersionKind{ + {Group: "first-group", Version: "first-version", Kind: "my-kind"}, + {Group: "first-group", Version: "first-version", Kind: "your-kind"}, + {Group: "second-group", Version: "first-version", Kind: "my-kind"}, + {Group: "second-group", Version: "first-version", Kind: "your-kind"}, + }, + PluralPartialResourceToRequest: schema.GroupVersionResource{Version: "first-version", Resource: "my-kinds"}, + SingularPartialResourceToRequest: schema.GroupVersionResource{Version: "first-version", Resource: "my-kind"}, + + ExpectedResources: []schema.GroupVersionResource{ + {Group: "first-group", Version: "first-version", Resource: "my-kinds"}, + {Group: "second-group", Version: "first-version", Resource: "my-kinds"}, + }, + ExpectedResourceErr: " matches multiple resources ", + }, + } + for _, testCase := range testCases { + tcName := testCase.Name + + for _, partialResource := range []schema.GroupVersionResource{testCase.PluralPartialResourceToRequest, testCase.SingularPartialResourceToRequest} { + mapper := NewDefaultRESTMapper(testCase.PreferredOrder, fakeInterfaces) + for _, kind := range testCase.KindsToRegister { + mapper.Add(kind, RESTScopeNamespace) + } + + actualResources, err := mapper.ResourcesFor(partialResource) + if err != nil { + t.Errorf("%s: unexpected error: %v", tcName, err) + continue + } + if !reflect.DeepEqual(testCase.ExpectedResources, actualResources) { + t.Errorf("%s: expected %v, got %v", tcName, testCase.ExpectedResources, actualResources) + } + + singleResource, err := mapper.ResourceFor(partialResource) + if err == nil && len(testCase.ExpectedResourceErr) != 0 { + t.Errorf("%s: expected error: %v", tcName, testCase.ExpectedResourceErr) + continue + } + if err != nil { + if len(testCase.ExpectedResourceErr) == 0 { + t.Errorf("%s: unexpected error: %v", tcName, err) + continue + } else { + if !strings.Contains(err.Error(), testCase.ExpectedResourceErr) { + t.Errorf("%s: expected %v, got %v", tcName, testCase.ExpectedResourceErr, err) + continue + } + } + + } else { + if testCase.ExpectedResources[0] != singleResource { + t.Errorf("%s: expected %v, got %v", tcName, testCase.ExpectedResources[0], singleResource) + } + + } + } + } +} + +func TestKindToResource(t *testing.T) { + testCases := []struct { + Kind string + Plural, Singular string + }{ + {Kind: "Pod", Plural: "pods", Singular: "pod"}, + + {Kind: "ReplicationController", Plural: "replicationcontrollers", Singular: "replicationcontroller"}, + + // Add "ies" when ending with "y" + {Kind: "ImageRepository", Plural: "imagerepositories", Singular: "imagerepository"}, + // Add "es" when ending with "s" + {Kind: "miss", Plural: "misses", Singular: "miss"}, + // Add "s" otherwise + {Kind: "lowercase", Plural: "lowercases", Singular: "lowercase"}, + } + for i, testCase := range testCases { + version := schema.GroupVersion{} + + plural, singular := UnsafeGuessKindToResource(version.WithKind(testCase.Kind)) + if singular != version.WithResource(testCase.Singular) || plural != version.WithResource(testCase.Plural) { + t.Errorf("%d: unexpected plural and singular: %v %v", i, plural, singular) + } + } +} + +func TestRESTMapperResourceSingularizer(t *testing.T) { + testGroupVersion := schema.GroupVersion{Group: "tgroup", Version: "test"} + + testCases := []struct { + Kind string + Plural string + Singular string + }{ + {Kind: "Pod", Plural: "pods", Singular: "pod"}, + {Kind: "ReplicationController", Plural: "replicationcontrollers", Singular: "replicationcontroller"}, + {Kind: "ImageRepository", Plural: "imagerepositories", Singular: "imagerepository"}, + {Kind: "Status", Plural: "statuses", Singular: "status"}, + + {Kind: "lowercase", Plural: "lowercases", Singular: "lowercase"}, + // TODO this test is broken. This updates to reflect actual behavior. Kinds are expected to be singular + // old (incorrect), coment: Don't add extra s if the original object is already plural + {Kind: "lowercases", Plural: "lowercaseses", Singular: "lowercases"}, + } + for i, testCase := range testCases { + mapper := NewDefaultRESTMapper([]schema.GroupVersion{testGroupVersion}, fakeInterfaces) + // create singular/plural mapping + mapper.Add(testGroupVersion.WithKind(testCase.Kind), RESTScopeNamespace) + + singular, err := mapper.ResourceSingularizer(testCase.Plural) + if err != nil { + t.Errorf("%d: unexpected error: %v", i, err) + } + if singular != testCase.Singular { + t.Errorf("%d: mismatched singular: got %v, expected %v", i, singular, testCase.Singular) + } + } +} + +func TestRESTMapperRESTMapping(t *testing.T) { + testGroup := "tgroup" + testGroupVersion := schema.GroupVersion{Group: testGroup, Version: "test"} + internalGroupVersion := schema.GroupVersion{Group: testGroup, Version: "test"} + + testCases := []struct { + Kind string + APIGroupVersions []schema.GroupVersion + DefaultVersions []schema.GroupVersion + + Resource string + ExpectedGroupVersion *schema.GroupVersion + Err bool + }{ + {Kind: "Unknown", Err: true}, + {Kind: "InternalObject", Err: true}, + + {DefaultVersions: []schema.GroupVersion{testGroupVersion}, Kind: "Unknown", Err: true}, + + {DefaultVersions: []schema.GroupVersion{testGroupVersion}, Kind: "InternalObject", APIGroupVersions: []schema.GroupVersion{{Group: testGroup, Version: "test"}}, Resource: "internalobjects"}, + {DefaultVersions: []schema.GroupVersion{testGroupVersion}, Kind: "InternalObject", APIGroupVersions: []schema.GroupVersion{{Group: testGroup, Version: "test"}}, Resource: "internalobjects"}, + + {DefaultVersions: []schema.GroupVersion{testGroupVersion}, Kind: "InternalObject", APIGroupVersions: []schema.GroupVersion{{Group: testGroup, Version: "test"}}, Resource: "internalobjects"}, + + {DefaultVersions: []schema.GroupVersion{testGroupVersion}, Kind: "InternalObject", APIGroupVersions: []schema.GroupVersion{}, Resource: "internalobjects", ExpectedGroupVersion: &schema.GroupVersion{Group: testGroup, Version: "test"}}, + + {DefaultVersions: []schema.GroupVersion{testGroupVersion}, Kind: "InternalObject", APIGroupVersions: []schema.GroupVersion{{Group: testGroup, Version: "test"}}, Resource: "internalobjects"}, + + // TODO: add test for a resource that exists in one version but not another + } + for i, testCase := range testCases { + mapper := NewDefaultRESTMapper(testCase.DefaultVersions, fakeInterfaces) + mapper.Add(internalGroupVersion.WithKind("InternalObject"), RESTScopeNamespace) + + preferredVersions := []string{} + for _, gv := range testCase.APIGroupVersions { + preferredVersions = append(preferredVersions, gv.Version) + } + gk := schema.GroupKind{Group: testGroup, Kind: testCase.Kind} + + mapping, err := mapper.RESTMapping(gk, preferredVersions...) + hasErr := err != nil + if hasErr != testCase.Err { + t.Errorf("%d: unexpected error behavior %t: %v", i, testCase.Err, err) + } + if hasErr { + continue + } + if mapping.Resource != testCase.Resource { + t.Errorf("%d: unexpected resource: %#v", i, mapping) + } + + if mapping.MetadataAccessor == nil || mapping.ObjectConvertor == nil { + t.Errorf("%d: missing codec and accessor: %#v", i, mapping) + } + + groupVersion := testCase.ExpectedGroupVersion + if groupVersion == nil { + groupVersion = &testCase.APIGroupVersions[0] + } + if mapping.GroupVersionKind.GroupVersion() != *groupVersion { + t.Errorf("%d: unexpected version: %#v", i, mapping) + } + + } +} + +func TestRESTMapperRESTMappingSelectsVersion(t *testing.T) { + expectedGroupVersion1 := schema.GroupVersion{Group: "tgroup", Version: "test1"} + expectedGroupVersion2 := schema.GroupVersion{Group: "tgroup", Version: "test2"} + expectedGroupVersion3 := schema.GroupVersion{Group: "tgroup", Version: "test3"} + internalObjectGK := schema.GroupKind{Group: "tgroup", Kind: "InternalObject"} + otherObjectGK := schema.GroupKind{Group: "tgroup", Kind: "OtherObject"} + + mapper := NewDefaultRESTMapper([]schema.GroupVersion{expectedGroupVersion1, expectedGroupVersion2}, fakeInterfaces) + mapper.Add(expectedGroupVersion1.WithKind("InternalObject"), RESTScopeNamespace) + mapper.Add(expectedGroupVersion2.WithKind("OtherObject"), RESTScopeNamespace) + + // pick default matching object kind based on search order + mapping, err := mapper.RESTMapping(otherObjectGK) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if mapping.Resource != "otherobjects" || mapping.GroupVersionKind.GroupVersion() != expectedGroupVersion2 { + t.Errorf("unexpected mapping: %#v", mapping) + } + + mapping, err = mapper.RESTMapping(internalObjectGK) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if mapping.Resource != "internalobjects" || mapping.GroupVersionKind.GroupVersion() != expectedGroupVersion1 { + t.Errorf("unexpected mapping: %#v", mapping) + } + + // mismatch of version + mapping, err = mapper.RESTMapping(internalObjectGK, expectedGroupVersion2.Version) + if err == nil { + t.Errorf("unexpected non-error") + } + mapping, err = mapper.RESTMapping(otherObjectGK, expectedGroupVersion1.Version) + if err == nil { + t.Errorf("unexpected non-error") + } + + // not in the search versions + mapping, err = mapper.RESTMapping(otherObjectGK, expectedGroupVersion3.Version) + if err == nil { + t.Errorf("unexpected non-error") + } + + // explicit search order + mapping, err = mapper.RESTMapping(otherObjectGK, expectedGroupVersion3.Version, expectedGroupVersion1.Version) + if err == nil { + t.Errorf("unexpected non-error") + } + + mapping, err = mapper.RESTMapping(otherObjectGK, expectedGroupVersion3.Version, expectedGroupVersion2.Version) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if mapping.Resource != "otherobjects" || mapping.GroupVersionKind.GroupVersion() != expectedGroupVersion2 { + t.Errorf("unexpected mapping: %#v", mapping) + } +} + +func TestRESTMapperRESTMappings(t *testing.T) { + testGroup := "tgroup" + testGroupVersion := schema.GroupVersion{Group: testGroup, Version: "v1"} + + testCases := []struct { + Kind string + APIGroupVersions []schema.GroupVersion + DefaultVersions []schema.GroupVersion + AddGroupVersionKind []schema.GroupVersionKind + + ExpectedRESTMappings []*RESTMapping + Err bool + }{ + {Kind: "Unknown", Err: true}, + {Kind: "InternalObject", Err: true}, + + {DefaultVersions: []schema.GroupVersion{testGroupVersion}, Kind: "Unknown", Err: true}, + + // ask for specific version - not available - thus error + {DefaultVersions: []schema.GroupVersion{testGroupVersion}, Kind: "InternalObject", APIGroupVersions: []schema.GroupVersion{{Group: testGroup, Version: "v2"}}, Err: true}, + + // ask for specific version - available - check ExpectedRESTMappings + { + DefaultVersions: []schema.GroupVersion{testGroupVersion}, + Kind: "InternalObject", + APIGroupVersions: []schema.GroupVersion{{Group: testGroup, Version: "v2"}}, + AddGroupVersionKind: []schema.GroupVersionKind{schema.GroupVersion{Group: testGroup, Version: "v2"}.WithKind("InternalObject")}, + ExpectedRESTMappings: []*RESTMapping{{Resource: "internalobjects", GroupVersionKind: schema.GroupVersionKind{Group: testGroup, Version: "v2", Kind: "InternalObject"}}}, + }, + + // ask for specific versions - only one available - check ExpectedRESTMappings + { + DefaultVersions: []schema.GroupVersion{testGroupVersion}, + Kind: "InternalObject", + APIGroupVersions: []schema.GroupVersion{{Group: testGroup, Version: "v3"}, {Group: testGroup, Version: "v2"}}, + AddGroupVersionKind: []schema.GroupVersionKind{schema.GroupVersion{Group: testGroup, Version: "v2"}.WithKind("InternalObject")}, + ExpectedRESTMappings: []*RESTMapping{{Resource: "internalobjects", GroupVersionKind: schema.GroupVersionKind{Group: testGroup, Version: "v2", Kind: "InternalObject"}}}, + }, + + // do not ask for specific version - search through default versions - check ExpectedRESTMappings + { + DefaultVersions: []schema.GroupVersion{testGroupVersion, {Group: testGroup, Version: "v2"}}, + Kind: "InternalObject", + AddGroupVersionKind: []schema.GroupVersionKind{schema.GroupVersion{Group: testGroup, Version: "v1"}.WithKind("InternalObject"), schema.GroupVersion{Group: testGroup, Version: "v2"}.WithKind("InternalObject")}, + ExpectedRESTMappings: []*RESTMapping{{Resource: "internalobjects", GroupVersionKind: schema.GroupVersionKind{Group: testGroup, Version: "v1", Kind: "InternalObject"}}, {Resource: "internalobjects", GroupVersionKind: schema.GroupVersionKind{Group: testGroup, Version: "v2", Kind: "InternalObject"}}}, + }, + } + + for i, testCase := range testCases { + mapper := NewDefaultRESTMapper(testCase.DefaultVersions, fakeInterfaces) + for _, gvk := range testCase.AddGroupVersionKind { + mapper.Add(gvk, RESTScopeNamespace) + } + + preferredVersions := []string{} + for _, gv := range testCase.APIGroupVersions { + preferredVersions = append(preferredVersions, gv.Version) + } + gk := schema.GroupKind{Group: testGroup, Kind: testCase.Kind} + + mappings, err := mapper.RESTMappings(gk, preferredVersions...) + hasErr := err != nil + if hasErr != testCase.Err { + t.Errorf("%d: unexpected error behavior %t: %v", i, testCase.Err, err) + } + if hasErr { + continue + } + if len(mappings) != len(testCase.ExpectedRESTMappings) { + t.Errorf("%d: unexpected number = %d of rest mappings was returned, expected = %d", i, len(mappings), len(testCase.ExpectedRESTMappings)) + } + for j, mapping := range mappings { + exp := testCase.ExpectedRESTMappings[j] + if mapping.Resource != exp.Resource { + t.Errorf("%d - %d: unexpected resource: %#v", i, j, mapping) + } + if mapping.MetadataAccessor == nil || mapping.ObjectConvertor == nil { + t.Errorf("%d - %d: missing codec and accessor: %#v", i, j, mapping) + } + if mapping.GroupVersionKind != exp.GroupVersionKind { + t.Errorf("%d - %d: unexpected GroupVersionKind: %#v", i, j, mapping) + } + } + } +} + +func TestRESTMapperReportsErrorOnBadVersion(t *testing.T) { + expectedGroupVersion1 := schema.GroupVersion{Group: "tgroup", Version: "test1"} + expectedGroupVersion2 := schema.GroupVersion{Group: "tgroup", Version: "test2"} + internalObjectGK := schema.GroupKind{Group: "tgroup", Kind: "InternalObject"} + + mapper := NewDefaultRESTMapper([]schema.GroupVersion{expectedGroupVersion1, expectedGroupVersion2}, unmatchedVersionInterfaces) + mapper.Add(expectedGroupVersion1.WithKind("InternalObject"), RESTScopeNamespace) + _, err := mapper.RESTMapping(internalObjectGK, expectedGroupVersion1.Version) + if err == nil { + t.Errorf("unexpected non-error") + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/amount_test.go b/vendor/k8s.io/apimachinery/pkg/api/resource/amount_test.go new file mode 100644 index 000000000..dd070bad3 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/api/resource/amount_test.go @@ -0,0 +1,133 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package resource + +import ( + "testing" +) + +func TestInt64AmountAsInt64(t *testing.T) { + for _, test := range []struct { + value int64 + scale Scale + result int64 + ok bool + }{ + {100, 0, 100, true}, + {100, 1, 1000, true}, + {100, -5, 0, false}, + {100, 100, 0, false}, + } { + r, ok := int64Amount{value: test.value, scale: test.scale}.AsInt64() + if r != test.result { + t.Errorf("%v: unexpected result: %d", test, r) + } + if ok != test.ok { + t.Errorf("%v: unexpected ok: %t", test, ok) + } + } +} + +func TestInt64AmountAdd(t *testing.T) { + for _, test := range []struct { + a, b, c int64Amount + ok bool + }{ + {int64Amount{value: 100, scale: 1}, int64Amount{value: 10, scale: 2}, int64Amount{value: 200, scale: 1}, true}, + {int64Amount{value: 100, scale: 1}, int64Amount{value: 1, scale: 2}, int64Amount{value: 110, scale: 1}, true}, + {int64Amount{value: 100, scale: 1}, int64Amount{value: 1, scale: 100}, int64Amount{value: 1, scale: 100}, false}, + {int64Amount{value: -5, scale: 2}, int64Amount{value: 50, scale: 1}, int64Amount{value: 0, scale: 1}, true}, + {int64Amount{value: -5, scale: 2}, int64Amount{value: 5, scale: 2}, int64Amount{value: 0, scale: 2}, true}, + + {int64Amount{value: mostPositive, scale: -1}, int64Amount{value: 1, scale: -1}, int64Amount{value: 0, scale: -1}, false}, + {int64Amount{value: mostPositive, scale: -1}, int64Amount{value: 0, scale: -1}, int64Amount{value: mostPositive, scale: -1}, true}, + {int64Amount{value: mostPositive / 10, scale: 1}, int64Amount{value: 10, scale: 0}, int64Amount{value: mostPositive, scale: -1}, false}, + } { + c := test.a + ok := c.Add(test.b) + if ok != test.ok { + t.Errorf("%v: unexpected ok: %t", test, ok) + } + if ok { + if c != test.c { + t.Errorf("%v: unexpected result: %d", test, c) + } + } else { + if c != test.a { + t.Errorf("%v: overflow addition mutated source: %d", test, c) + } + } + + // addition is commutative + c = test.b + if ok := c.Add(test.a); ok != test.ok { + t.Errorf("%v: unexpected ok: %t", test, ok) + } + if ok { + if c != test.c { + t.Errorf("%v: unexpected result: %d", test, c) + } + } else { + if c != test.b { + t.Errorf("%v: overflow addition mutated source: %d", test, c) + } + } + } +} +func TestInt64AsCanonicalString(t *testing.T) { + for _, test := range []struct { + value int64 + scale Scale + result string + exponent int32 + }{ + {100, 0, "100", 0}, + {100, 1, "1", 3}, + {100, -1, "10", 0}, + {10800, -10, "1080", -9}, + } { + r, exp := int64Amount{value: test.value, scale: test.scale}.AsCanonicalBytes(nil) + if string(r) != test.result { + t.Errorf("%v: unexpected result: %s", test, r) + } + if exp != test.exponent { + t.Errorf("%v: unexpected exponent: %d", test, exp) + } + } +} + +func TestAmountSign(t *testing.T) { + table := []struct { + i int64Amount + expect int + }{ + {int64Amount{value: -50, scale: 1}, -1}, + {int64Amount{value: 0, scale: 1}, 0}, + {int64Amount{value: 300, scale: 1}, 1}, + {int64Amount{value: -50, scale: -8}, -1}, + {int64Amount{value: 50, scale: -8}, 1}, + {int64Amount{value: 0, scale: -8}, 0}, + {int64Amount{value: -50, scale: 0}, -1}, + {int64Amount{value: 50, scale: 0}, 1}, + {int64Amount{value: 0, scale: 0}, 0}, + } + for _, testCase := range table { + if result := testCase.i.Sign(); result != testCase.expect { + t.Errorf("i: %v, Expected: %v, Actual: %v", testCase.i, testCase.expect, result) + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/math_test.go b/vendor/k8s.io/apimachinery/pkg/api/resource/math_test.go new file mode 100644 index 000000000..070a0c237 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/api/resource/math_test.go @@ -0,0 +1,211 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package resource + +import ( + "testing" +) + +func TestDetectOverflowAdd(t *testing.T) { + for _, test := range []struct { + a, b int64 + c int64 + ok bool + }{ + {0, 0, 0, true}, + {-1, 1, 0, true}, + {0, 1, 1, true}, + {2, 2, 4, true}, + {2, -2, 0, true}, + {-2, -2, -4, true}, + + {mostNegative, -1, 0, false}, + {mostNegative, 1, mostNegative + 1, true}, + {mostPositive, -1, mostPositive - 1, true}, + {mostPositive, 1, 0, false}, + + {mostNegative, mostPositive, -1, true}, + {mostPositive, mostNegative, -1, true}, + {mostPositive, mostPositive, 0, false}, + {mostNegative, mostNegative, 0, false}, + + {-mostPositive, mostNegative, 0, false}, + {mostNegative, -mostPositive, 0, false}, + {-mostPositive, -mostPositive, 0, false}, + } { + c, ok := int64Add(test.a, test.b) + if c != test.c { + t.Errorf("%v: unexpected result: %d", test, c) + } + if ok != test.ok { + t.Errorf("%v: unexpected overflow: %t", test, ok) + } + // addition is commutative + d, ok2 := int64Add(test.b, test.a) + if c != d || ok != ok2 { + t.Errorf("%v: not commutative: %d %t", test, d, ok2) + } + } +} + +func TestDetectOverflowMultiply(t *testing.T) { + for _, test := range []struct { + a, b int64 + c int64 + ok bool + }{ + {0, 0, 0, true}, + {-1, 1, -1, true}, + {-1, -1, 1, true}, + {1, 1, 1, true}, + {0, 1, 0, true}, + {1, 0, 0, true}, + {2, 2, 4, true}, + {2, -2, -4, true}, + {-2, -2, 4, true}, + + {mostNegative, -1, 0, false}, + {mostNegative, 1, mostNegative, true}, + {mostPositive, -1, -mostPositive, true}, + {mostPositive, 1, mostPositive, true}, + + {mostNegative, mostPositive, 0, false}, + {mostPositive, mostNegative, 0, false}, + {mostPositive, mostPositive, 1, false}, + {mostNegative, mostNegative, 0, false}, + + {-mostPositive, mostNegative, 0, false}, + {mostNegative, -mostPositive, 0, false}, + {-mostPositive, -mostPositive, 1, false}, + } { + c, ok := int64Multiply(test.a, test.b) + if c != test.c { + t.Errorf("%v: unexpected result: %d", test, c) + } + if ok != test.ok { + t.Errorf("%v: unexpected overflow: %t", test, ok) + } + // multiplication is commutative + d, ok2 := int64Multiply(test.b, test.a) + if c != d || ok != ok2 { + t.Errorf("%v: not commutative: %d %t", test, d, ok2) + } + } +} + +func TestDetectOverflowScale(t *testing.T) { + for _, a := range []int64{0, -1, 1, 10, -10, mostPositive, mostNegative, -mostPositive} { + for _, b := range []int64{1, 2, 10, 100, 1000, mostPositive} { + expect, expectOk := int64Multiply(a, b) + + c, ok := int64MultiplyScale(a, b) + if c != expect { + t.Errorf("%d*%d: unexpected result: %d", a, b, c) + } + if ok != expectOk { + t.Errorf("%d*%d: unexpected overflow: %t", a, b, ok) + } + } + for _, test := range []struct { + base int64 + fn func(a int64) (int64, bool) + }{ + {10, int64MultiplyScale10}, + {100, int64MultiplyScale100}, + {1000, int64MultiplyScale1000}, + } { + expect, expectOk := int64Multiply(a, test.base) + c, ok := test.fn(a) + if c != expect { + t.Errorf("%d*%d: unexpected result: %d", a, test.base, c) + } + if ok != expectOk { + t.Errorf("%d*%d: unexpected overflow: %t", a, test.base, ok) + } + } + } +} + +func TestRemoveInt64Factors(t *testing.T) { + for _, test := range []struct { + value int64 + max int64 + result int64 + scale int32 + }{ + {100, 10, 1, 2}, + {100, 10, 1, 2}, + {100, 100, 1, 1}, + {1, 10, 1, 0}, + } { + r, s := removeInt64Factors(test.value, test.max) + if r != test.result { + t.Errorf("%v: unexpected result: %d", test, r) + } + if s != test.scale { + t.Errorf("%v: unexpected scale: %d", test, s) + } + } +} + +func TestNegativeScaleInt64(t *testing.T) { + for _, test := range []struct { + base int64 + scale Scale + result int64 + exact bool + }{ + {1234567, 0, 1234567, true}, + {1234567, 1, 123457, false}, + {1234567, 2, 12346, false}, + {1234567, 3, 1235, false}, + {1234567, 4, 124, false}, + + {-1234567, 0, -1234567, true}, + {-1234567, 1, -123457, false}, + {-1234567, 2, -12346, false}, + {-1234567, 3, -1235, false}, + {-1234567, 4, -124, false}, + + {1000, 0, 1000, true}, + {1000, 1, 100, true}, + {1000, 2, 10, true}, + {1000, 3, 1, true}, + {1000, 4, 1, false}, + + {-1000, 0, -1000, true}, + {-1000, 1, -100, true}, + {-1000, 2, -10, true}, + {-1000, 3, -1, true}, + {-1000, 4, -1, false}, + + {0, 0, 0, true}, + {0, 1, 0, true}, + {0, 2, 0, true}, + + // negative scale is undefined behavior + {1000, -1, 1000, true}, + } { + result, exact := negativeScaleInt64(test.base, test.scale) + if result != test.result { + t.Errorf("%v: unexpected result: %d", test, result) + } + if exact != test.exact { + t.Errorf("%v: unexpected exact: %t", test, exact) + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_example_test.go b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_example_test.go new file mode 100644 index 000000000..56a7dbe0e --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_example_test.go @@ -0,0 +1,59 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package resource_test + +import ( + "fmt" + + "k8s.io/apimachinery/pkg/api/resource" +) + +func ExampleFormat() { + memorySize := resource.NewQuantity(5*1024*1024*1024, resource.BinarySI) + fmt.Printf("memorySize = %v\n", memorySize) + + diskSize := resource.NewQuantity(5*1000*1000*1000, resource.DecimalSI) + fmt.Printf("diskSize = %v\n", diskSize) + + cores := resource.NewMilliQuantity(5300, resource.DecimalSI) + fmt.Printf("cores = %v\n", cores) + + // Output: + // memorySize = 5Gi + // diskSize = 5G + // cores = 5300m +} + +func ExampleMustParse() { + memorySize := resource.MustParse("5Gi") + fmt.Printf("memorySize = %v (%v)\n", memorySize.Value(), memorySize.Format) + + diskSize := resource.MustParse("5G") + fmt.Printf("diskSize = %v (%v)\n", diskSize.Value(), diskSize.Format) + + cores := resource.MustParse("5300m") + fmt.Printf("milliCores = %v (%v)\n", cores.MilliValue(), cores.Format) + + cores2 := resource.MustParse("5.4") + fmt.Printf("milliCores = %v (%v)\n", cores2.MilliValue(), cores2.Format) + + // Output: + // memorySize = 5368709120 (BinarySI) + // diskSize = 5000000000 (DecimalSI) + // milliCores = 5300 (DecimalSI) + // milliCores = 5400 (DecimalSI) +} diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_proto_test.go b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_proto_test.go new file mode 100644 index 000000000..574a3cf5d --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_proto_test.go @@ -0,0 +1,103 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package resource + +import ( + "testing" + + inf "gopkg.in/inf.v0" +) + +func TestQuantityProtoMarshal(t *testing.T) { + // Test when d is nil + table := []struct { + quantity string + expect Quantity + }{ + {"0", Quantity{i: int64Amount{value: 0, scale: 0}, s: "0", Format: DecimalSI}}, + {"100m", Quantity{i: int64Amount{value: 100, scale: -3}, s: "100m", Format: DecimalSI}}, + {"50m", Quantity{i: int64Amount{value: 50, scale: -3}, s: "50m", Format: DecimalSI}}, + {"10000T", Quantity{i: int64Amount{value: 10000, scale: 12}, s: "10000T", Format: DecimalSI}}, + } + for _, testCase := range table { + q := MustParse(testCase.quantity) + // Won't currently get an error as MarshalTo can't return one + result, _ := q.Marshal() + q.MarshalTo(result) + if q.Cmp(testCase.expect) != 0 { + t.Errorf("Expected: %v, Actual: %v", testCase.expect, q) + } + } + // Test when i is {0,0} + table2 := []struct { + dec *inf.Dec + expect Quantity + }{ + {dec(0, 0).Dec, Quantity{i: int64Amount{value: 0, scale: 0}, d: infDecAmount{dec(0, 0).Dec}, s: "0", Format: DecimalSI}}, + {dec(10, 0).Dec, Quantity{i: int64Amount{value: 0, scale: 0}, d: infDecAmount{dec(10, 0).Dec}, s: "10", Format: DecimalSI}}, + {dec(-10, 0).Dec, Quantity{i: int64Amount{value: 0, scale: 0}, d: infDecAmount{dec(-10, 0).Dec}, s: "-10", Format: DecimalSI}}, + } + for _, testCase := range table2 { + q := Quantity{d: infDecAmount{testCase.dec}, Format: DecimalSI} + // Won't currently get an error as MarshalTo can't return one + result, _ := q.Marshal() + q.Unmarshal(result) + if q.Cmp(testCase.expect) != 0 { + t.Errorf("Expected: %v, Actual: %v", testCase.expect, q) + } + } +} + +func TestQuantityProtoUnmarshal(t *testing.T) { + // Test when d is nil + table := []struct { + input Quantity + expect string + }{ + {Quantity{i: int64Amount{value: 0, scale: 0}, s: "0", Format: DecimalSI}, "0"}, + {Quantity{i: int64Amount{value: 100, scale: -3}, s: "100m", Format: DecimalSI}, "100m"}, + {Quantity{i: int64Amount{value: 50, scale: -3}, s: "50m", Format: DecimalSI}, "50m"}, + {Quantity{i: int64Amount{value: 10000, scale: 12}, s: "10000T", Format: DecimalSI}, "10000T"}, + } + for _, testCase := range table { + var inputQ Quantity + expectQ := MustParse(testCase.expect) + inputByteArray, _ := testCase.input.Marshal() + inputQ.Unmarshal(inputByteArray) + if inputQ.Cmp(expectQ) != 0 { + t.Errorf("Expected: %v, Actual: %v", inputQ, expectQ) + } + } + // Test when i is {0,0} + table2 := []struct { + input Quantity + expect *inf.Dec + }{ + {Quantity{i: int64Amount{value: 0, scale: 0}, d: infDecAmount{dec(0, 0).Dec}, s: "0", Format: DecimalSI}, dec(0, 0).Dec}, + {Quantity{i: int64Amount{value: 0, scale: 0}, d: infDecAmount{dec(10, 0).Dec}, s: "10", Format: DecimalSI}, dec(10, 0).Dec}, + {Quantity{i: int64Amount{value: 0, scale: 0}, d: infDecAmount{dec(-10, 0).Dec}, s: "-10", Format: DecimalSI}, dec(-10, 0).Dec}, + } + for _, testCase := range table2 { + var inputQ Quantity + expectQ := Quantity{d: infDecAmount{testCase.expect}, Format: DecimalSI} + inputByteArray, _ := testCase.input.Marshal() + inputQ.Unmarshal(inputByteArray) + if inputQ.Cmp(expectQ) != 0 { + t.Errorf("Expected: %v, Actual: %v", inputQ, expectQ) + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_test.go b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_test.go new file mode 100644 index 000000000..e61a2547d --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_test.go @@ -0,0 +1,1370 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package resource + +import ( + "encoding/json" + "math/rand" + "strings" + "testing" + "unicode" + + fuzz "github.com/google/gofuzz" + "github.com/spf13/pflag" + + inf "gopkg.in/inf.v0" +) + +var useInfDec bool + +func amount(i int64, exponent int) infDecAmount { + // See the below test-- scale is the negative of an exponent. + return infDecAmount{inf.NewDec(i, inf.Scale(-exponent))} +} + +func dec(i int64, exponent int) infDecAmount { + // See the below test-- scale is the negative of an exponent. + return infDecAmount{inf.NewDec(i, inf.Scale(-exponent))} +} + +func decQuantity(i int64, exponent int, format Format) Quantity { + return Quantity{d: dec(i, exponent), Format: format} +} + +func intQuantity(i int64, exponent Scale, format Format) Quantity { + return Quantity{i: int64Amount{value: i, scale: exponent}, Format: format} +} + +func TestDec(t *testing.T) { + table := []struct { + got infDecAmount + expect string + }{ + {dec(1, 0), "1"}, + {dec(1, 1), "10"}, + {dec(5, 2), "500"}, + {dec(8, 3), "8000"}, + {dec(2, 0), "2"}, + {dec(1, -1), "0.1"}, + {dec(3, -2), "0.03"}, + {dec(4, -3), "0.004"}, + } + + for _, item := range table { + if e, a := item.expect, item.got.Dec.String(); e != a { + t.Errorf("expected %v, got %v", e, a) + } + } +} + +// TestQuantityParseZero ensures that when a 0 quantity is passed, its string value is 0 +func TestQuantityParseZero(t *testing.T) { + zero := MustParse("0") + if expected, actual := "0", zero.String(); expected != actual { + t.Errorf("Expected %v, actual %v", expected, actual) + } +} + +// TestQuantityParseNonNumericError ensures that when a non-numeric string is parsed +// it panics +func TestQuantityParseNonNumericPanic(t *testing.T) { + defer func() { + if r := recover(); r == nil { + t.Errorf("MustParse did not panic") + } + }() + _ = MustParse("Non-Numeric") +} + +// TestQuantityAddZeroPreservesSuffix verifies that a suffix is preserved +// independent of the order of operations when adding a zero and non-zero val +func TestQuantityAddZeroPreservesSuffix(t *testing.T) { + testValues := []string{"100m", "1Gi"} + zero := MustParse("0") + for _, testValue := range testValues { + value := MustParse(testValue) + v1 := *value.Copy() + // ensure non-zero + zero = non-zero (suffix preserved) + v1.Add(zero) + // ensure zero + non-zero = non-zero (suffix preserved) + v2 := *zero.Copy() + v2.Add(value) + + if v1.String() != testValue { + t.Errorf("Expected %v, actual %v", testValue, v1.String()) + continue + } + if v2.String() != testValue { + t.Errorf("Expected %v, actual %v", testValue, v2.String()) + } + } +} + +// TestQuantitySubZeroPreservesSuffix verifies that a suffix is preserved +// independent of the order of operations when subtracting a zero and non-zero val +func TestQuantitySubZeroPreservesSuffix(t *testing.T) { + testValues := []string{"100m", "1Gi"} + zero := MustParse("0") + for _, testValue := range testValues { + value := MustParse(testValue) + v1 := *value.Copy() + // ensure non-zero - zero = non-zero (suffix preserved) + v1.Sub(zero) + // ensure we preserved the input value + if v1.String() != testValue { + t.Errorf("Expected %v, actual %v", testValue, v1.String()) + } + + // ensure zero - non-zero = -non-zero (suffix preserved) + v2 := *zero.Copy() + v2.Sub(value) + negVal := *value.Copy() + negVal.Neg() + if v2.String() != negVal.String() { + t.Errorf("Expected %v, actual %v", negVal.String(), v2.String()) + } + } +} + +// Verifies that you get 0 as canonical value if internal value is 0, and not 0<suffix> +func TestQuantityCanocicalizeZero(t *testing.T) { + val := MustParse("1000m") + val.i.Sub(int64Amount{value: 1}) + zero := Quantity{i: val.i, Format: DecimalSI} + if expected, actual := "0", zero.String(); expected != actual { + t.Errorf("Expected %v, actual %v", expected, actual) + } +} + +func TestQuantityCmp(t *testing.T) { + // Test when d is nil + table := []struct { + x string + y string + expect int + }{ + {"0", "0", 0}, + {"100m", "50m", 1}, + {"50m", "100m", -1}, + {"10000T", "100Gi", 1}, + } + for _, testCase := range table { + q1 := MustParse(testCase.x) + q2 := MustParse(testCase.y) + if result := q1.Cmp(q2); result != testCase.expect { + t.Errorf("X: %v, Y: %v, Expected: %v, Actual: %v", testCase.x, testCase.y, testCase.expect, result) + } + } + // Test when i is {0,0} + table2 := []struct { + x *inf.Dec + y *inf.Dec + expect int + }{ + {dec(0, 0).Dec, dec(0, 0).Dec, 0}, + {nil, dec(0, 0).Dec, 0}, + {dec(0, 0).Dec, nil, 0}, + {nil, nil, 0}, + {nil, dec(10, 0).Dec, -1}, + {nil, dec(-10, 0).Dec, 1}, + {dec(10, 0).Dec, nil, 1}, + {dec(-10, 0).Dec, nil, -1}, + } + for _, testCase := range table2 { + q1 := Quantity{d: infDecAmount{testCase.x}, Format: DecimalSI} + q2 := Quantity{d: infDecAmount{testCase.y}, Format: DecimalSI} + if result := q1.Cmp(q2); result != testCase.expect { + t.Errorf("X: %v, Y: %v, Expected: %v, Actual: %v", testCase.x, testCase.y, testCase.expect, result) + } + } +} + +func TestParseQuantityString(t *testing.T) { + table := []struct { + input string + positive bool + value string + num, denom, suffix string + }{ + {"0.025Ti", true, "0.025", "0", "025", "Ti"}, + {"1.025Ti", true, "1.025", "1", "025", "Ti"}, + {"-1.025Ti", false, "-1.025", "1", "025", "Ti"}, + {".", true, ".", "0", "", ""}, + {"-.", false, "-.", "0", "", ""}, + {"1E-3", true, "1", "1", "", "E-3"}, + } + for _, test := range table { + positive, value, num, denom, suffix, err := parseQuantityString(test.input) + if err != nil { + t.Errorf("%s: error: %v", test.input, err) + continue + } + if positive != test.positive || value != test.value || num != test.num || denom != test.denom || suffix != test.suffix { + t.Errorf("%s: unmatched: %t %q %q %q %q", test.input, positive, value, num, denom, suffix) + } + } +} + +func TestQuantityParse(t *testing.T) { + if _, err := ParseQuantity(""); err == nil { + t.Errorf("expected empty string to return error") + } + + table := []struct { + input string + expect Quantity + }{ + {"0", decQuantity(0, 0, DecimalSI)}, + {"0n", decQuantity(0, 0, DecimalSI)}, + {"0u", decQuantity(0, 0, DecimalSI)}, + {"0m", decQuantity(0, 0, DecimalSI)}, + {"0Ki", decQuantity(0, 0, BinarySI)}, + {"0k", decQuantity(0, 0, DecimalSI)}, + {"0Mi", decQuantity(0, 0, BinarySI)}, + {"0M", decQuantity(0, 0, DecimalSI)}, + {"0Gi", decQuantity(0, 0, BinarySI)}, + {"0G", decQuantity(0, 0, DecimalSI)}, + {"0Ti", decQuantity(0, 0, BinarySI)}, + {"0T", decQuantity(0, 0, DecimalSI)}, + + // Quantity less numbers are allowed + {"1", decQuantity(1, 0, DecimalSI)}, + + // Binary suffixes + {"1Ki", decQuantity(1024, 0, BinarySI)}, + {"8Ki", decQuantity(8*1024, 0, BinarySI)}, + {"7Mi", decQuantity(7*1024*1024, 0, BinarySI)}, + {"6Gi", decQuantity(6*1024*1024*1024, 0, BinarySI)}, + {"5Ti", decQuantity(5*1024*1024*1024*1024, 0, BinarySI)}, + {"4Pi", decQuantity(4*1024*1024*1024*1024*1024, 0, BinarySI)}, + {"3Ei", decQuantity(3*1024*1024*1024*1024*1024*1024, 0, BinarySI)}, + + {"10Ti", decQuantity(10*1024*1024*1024*1024, 0, BinarySI)}, + {"100Ti", decQuantity(100*1024*1024*1024*1024, 0, BinarySI)}, + + // Decimal suffixes + {"5n", decQuantity(5, -9, DecimalSI)}, + {"4u", decQuantity(4, -6, DecimalSI)}, + {"3m", decQuantity(3, -3, DecimalSI)}, + {"9", decQuantity(9, 0, DecimalSI)}, + {"8k", decQuantity(8, 3, DecimalSI)}, + {"50k", decQuantity(5, 4, DecimalSI)}, + {"7M", decQuantity(7, 6, DecimalSI)}, + {"6G", decQuantity(6, 9, DecimalSI)}, + {"5T", decQuantity(5, 12, DecimalSI)}, + {"40T", decQuantity(4, 13, DecimalSI)}, + {"300T", decQuantity(3, 14, DecimalSI)}, + {"2P", decQuantity(2, 15, DecimalSI)}, + {"1E", decQuantity(1, 18, DecimalSI)}, + + // Decimal exponents + {"1E-3", decQuantity(1, -3, DecimalExponent)}, + {"1e3", decQuantity(1, 3, DecimalExponent)}, + {"1E6", decQuantity(1, 6, DecimalExponent)}, + {"1e9", decQuantity(1, 9, DecimalExponent)}, + {"1E12", decQuantity(1, 12, DecimalExponent)}, + {"1e15", decQuantity(1, 15, DecimalExponent)}, + {"1E18", decQuantity(1, 18, DecimalExponent)}, + + // Nonstandard but still parsable + {"1e14", decQuantity(1, 14, DecimalExponent)}, + {"1e13", decQuantity(1, 13, DecimalExponent)}, + {"1e3", decQuantity(1, 3, DecimalExponent)}, + {"100.035k", decQuantity(100035, 0, DecimalSI)}, + + // Things that look like floating point + {"0.001", decQuantity(1, -3, DecimalSI)}, + {"0.0005k", decQuantity(5, -1, DecimalSI)}, + {"0.005", decQuantity(5, -3, DecimalSI)}, + {"0.05", decQuantity(5, -2, DecimalSI)}, + {"0.5", decQuantity(5, -1, DecimalSI)}, + {"0.00050k", decQuantity(5, -1, DecimalSI)}, + {"0.00500", decQuantity(5, -3, DecimalSI)}, + {"0.05000", decQuantity(5, -2, DecimalSI)}, + {"0.50000", decQuantity(5, -1, DecimalSI)}, + {"0.5e0", decQuantity(5, -1, DecimalExponent)}, + {"0.5e-1", decQuantity(5, -2, DecimalExponent)}, + {"0.5e-2", decQuantity(5, -3, DecimalExponent)}, + {"0.5e0", decQuantity(5, -1, DecimalExponent)}, + {"10.035M", decQuantity(10035, 3, DecimalSI)}, + + {"1.2e3", decQuantity(12, 2, DecimalExponent)}, + {"1.3E+6", decQuantity(13, 5, DecimalExponent)}, + {"1.40e9", decQuantity(14, 8, DecimalExponent)}, + {"1.53E12", decQuantity(153, 10, DecimalExponent)}, + {"1.6e15", decQuantity(16, 14, DecimalExponent)}, + {"1.7E18", decQuantity(17, 17, DecimalExponent)}, + + {"9.01", decQuantity(901, -2, DecimalSI)}, + {"8.1k", decQuantity(81, 2, DecimalSI)}, + {"7.123456M", decQuantity(7123456, 0, DecimalSI)}, + {"6.987654321G", decQuantity(6987654321, 0, DecimalSI)}, + {"5.444T", decQuantity(5444, 9, DecimalSI)}, + {"40.1T", decQuantity(401, 11, DecimalSI)}, + {"300.2T", decQuantity(3002, 11, DecimalSI)}, + {"2.5P", decQuantity(25, 14, DecimalSI)}, + {"1.01E", decQuantity(101, 16, DecimalSI)}, + + // Things that saturate/round + {"3.001n", decQuantity(4, -9, DecimalSI)}, + {"1.1E-9", decQuantity(2, -9, DecimalExponent)}, + {"0.0000000001", decQuantity(1, -9, DecimalSI)}, + {"0.0000000005", decQuantity(1, -9, DecimalSI)}, + {"0.00000000050", decQuantity(1, -9, DecimalSI)}, + {"0.5e-9", decQuantity(1, -9, DecimalExponent)}, + {"0.9n", decQuantity(1, -9, DecimalSI)}, + {"0.00000012345", decQuantity(124, -9, DecimalSI)}, + {"0.00000012354", decQuantity(124, -9, DecimalSI)}, + {"9Ei", Quantity{d: maxAllowed, Format: BinarySI}}, + {"9223372036854775807Ki", Quantity{d: maxAllowed, Format: BinarySI}}, + {"12E", decQuantity(12, 18, DecimalSI)}, + + // We'll accept fractional binary stuff, too. + {"100.035Ki", decQuantity(10243584, -2, BinarySI)}, + {"0.5Mi", decQuantity(.5*1024*1024, 0, BinarySI)}, + {"0.05Gi", decQuantity(536870912, -1, BinarySI)}, + {"0.025Ti", decQuantity(274877906944, -1, BinarySI)}, + + // Things written by trolls + {"0.000000000001Ki", decQuantity(2, -9, DecimalSI)}, // rounds up, changes format + {".001", decQuantity(1, -3, DecimalSI)}, + {".0001k", decQuantity(100, -3, DecimalSI)}, + {"1.", decQuantity(1, 0, DecimalSI)}, + {"1.G", decQuantity(1, 9, DecimalSI)}, + } + + for _, asDec := range []bool{false, true} { + for _, item := range table { + got, err := ParseQuantity(item.input) + if err != nil { + t.Errorf("%v: unexpected error: %v", item.input, err) + continue + } + if asDec { + got.AsDec() + } + + if e, a := item.expect, got; e.Cmp(a) != 0 { + t.Errorf("%v: expected %v, got %v", item.input, e.String(), a.String()) + } + if e, a := item.expect.Format, got.Format; e != a { + t.Errorf("%v: expected %#v, got %#v", item.input, e, a) + } + + if asDec { + if i, ok := got.AsInt64(); i != 0 || ok { + t.Errorf("%v: expected inf.Dec to return false for AsInt64: %d", item.input, i) + } + continue + } + i, ok := item.expect.AsInt64() + if !ok { + continue + } + j, ok := got.AsInt64() + if !ok { + if got.d.Dec == nil && got.i.scale >= 0 { + t.Errorf("%v: is an int64Amount, but can't return AsInt64: %v", item.input, got) + } + continue + } + if i != j { + t.Errorf("%v: expected equivalent representation as int64: %d %d", item.input, i, j) + } + } + + for _, item := range table { + got, err := ParseQuantity(item.input) + if err != nil { + t.Errorf("%v: unexpected error: %v", item.input, err) + continue + } + + if asDec { + got.AsDec() + } + + // verify that we can decompose the input and get the same result by building up from the base. + positive, _, num, denom, suffix, err := parseQuantityString(item.input) + if err != nil { + t.Errorf("%v: unexpected error: %v", item.input, err) + continue + } + if got.Sign() >= 0 && !positive || got.Sign() < 0 && positive { + t.Errorf("%v: positive was incorrect: %t", item.input, positive) + continue + } + var value string + if !positive { + value = "-" + } + value += num + if len(denom) > 0 { + value += "." + denom + } + value += suffix + if len(value) == 0 { + t.Errorf("%v: did not parse correctly, %q %q %q", item.input, num, denom, suffix) + } + expected, err := ParseQuantity(value) + if err != nil { + t.Errorf("%v: unexpected error for %s: %v", item.input, value, err) + continue + } + if expected.Cmp(got) != 0 { + t.Errorf("%v: not the same as %s", item.input, value) + continue + } + } + + // Try the negative version of everything + desired := &inf.Dec{} + expect := Quantity{d: infDecAmount{Dec: desired}} + for _, item := range table { + got, err := ParseQuantity("-" + strings.TrimLeftFunc(item.input, unicode.IsSpace)) + if err != nil { + t.Errorf("-%v: unexpected error: %v", item.input, err) + continue + } + if asDec { + got.AsDec() + } + + expected := item.expect + desired.Neg(expected.AsDec()) + + if e, a := expect, got; e.Cmp(a) != 0 { + t.Errorf("%v: expected %s, got %s", item.input, e.String(), a.String()) + } + if e, a := expected.Format, got.Format; e != a { + t.Errorf("%v: expected %#v, got %#v", item.input, e, a) + } + } + + // Try everything with an explicit + + for _, item := range table { + got, err := ParseQuantity("+" + strings.TrimLeftFunc(item.input, unicode.IsSpace)) + if err != nil { + t.Errorf("-%v: unexpected error: %v", item.input, err) + continue + } + if asDec { + got.AsDec() + } + + if e, a := item.expect, got; e.Cmp(a) != 0 { + t.Errorf("%v(%t): expected %s, got %s", item.input, asDec, e.String(), a.String()) + } + if e, a := item.expect.Format, got.Format; e != a { + t.Errorf("%v: expected %#v, got %#v", item.input, e, a) + } + } + } + + invalid := []string{ + "1.1.M", + "1+1.0M", + "0.1mi", + "0.1am", + "aoeu", + ".5i", + "1i", + "-3.01i", + "-3.01e-", + + // trailing whitespace is forbidden + " 1", + "1 ", + } + for _, item := range invalid { + _, err := ParseQuantity(item) + if err == nil { + t.Errorf("%v parsed unexpectedly", item) + } + } +} + +func TestQuantityRoundUp(t *testing.T) { + table := []struct { + in string + scale Scale + expect Quantity + ok bool + }{ + {"9.01", -3, decQuantity(901, -2, DecimalSI), true}, + {"9.01", -2, decQuantity(901, -2, DecimalSI), true}, + {"9.01", -1, decQuantity(91, -1, DecimalSI), false}, + {"9.01", 0, decQuantity(10, 0, DecimalSI), false}, + {"9.01", 1, decQuantity(10, 0, DecimalSI), false}, + {"9.01", 2, decQuantity(100, 0, DecimalSI), false}, + + {"-9.01", -3, decQuantity(-901, -2, DecimalSI), true}, + {"-9.01", -2, decQuantity(-901, -2, DecimalSI), true}, + {"-9.01", -1, decQuantity(-91, -1, DecimalSI), false}, + {"-9.01", 0, decQuantity(-10, 0, DecimalSI), false}, + {"-9.01", 1, decQuantity(-10, 0, DecimalSI), false}, + {"-9.01", 2, decQuantity(-100, 0, DecimalSI), false}, + } + + for _, asDec := range []bool{false, true} { + for _, item := range table { + got, err := ParseQuantity(item.in) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + expect := *item.expect.Copy() + if asDec { + got.AsDec() + } + if ok := got.RoundUp(item.scale); ok != item.ok { + t.Errorf("%s(%d,%t): unexpected ok: %t", item.in, item.scale, asDec, ok) + } + if got.Cmp(expect) != 0 { + t.Errorf("%s(%d,%t): unexpected round: %s vs %s", item.in, item.scale, asDec, got.String(), expect.String()) + } + } + } +} + +func TestQuantityCmpInt64AndDec(t *testing.T) { + table := []struct { + a, b Quantity + cmp int + }{ + {intQuantity(901, -2, DecimalSI), intQuantity(901, -2, DecimalSI), 0}, + {intQuantity(90, -1, DecimalSI), intQuantity(901, -2, DecimalSI), -1}, + {intQuantity(901, -2, DecimalSI), intQuantity(900, -2, DecimalSI), 1}, + {intQuantity(0, 0, DecimalSI), intQuantity(0, 0, DecimalSI), 0}, + {intQuantity(0, 1, DecimalSI), intQuantity(0, -1, DecimalSI), 0}, + {intQuantity(0, -1, DecimalSI), intQuantity(0, 1, DecimalSI), 0}, + {intQuantity(800, -3, DecimalSI), intQuantity(1, 0, DecimalSI), -1}, + {intQuantity(800, -3, DecimalSI), intQuantity(79, -2, DecimalSI), 1}, + + {intQuantity(mostPositive, 0, DecimalSI), intQuantity(1, -1, DecimalSI), 1}, + {intQuantity(mostPositive, 1, DecimalSI), intQuantity(1, 0, DecimalSI), 1}, + {intQuantity(mostPositive, 1, DecimalSI), intQuantity(1, 1, DecimalSI), 1}, + {intQuantity(mostPositive, 1, DecimalSI), intQuantity(0, 1, DecimalSI), 1}, + {intQuantity(mostPositive, -16, DecimalSI), intQuantity(1, 3, DecimalSI), -1}, + + {intQuantity(mostNegative, 0, DecimalSI), intQuantity(0, 0, DecimalSI), -1}, + {intQuantity(mostNegative, -18, DecimalSI), intQuantity(-1, 0, DecimalSI), -1}, + {intQuantity(mostNegative, -19, DecimalSI), intQuantity(-1, 0, DecimalSI), 1}, + + {intQuantity(1*1000000*1000000*1000000, -17, DecimalSI), intQuantity(1, 1, DecimalSI), 0}, + {intQuantity(1*1000000*1000000*1000000, -17, DecimalSI), intQuantity(-10, 0, DecimalSI), 1}, + {intQuantity(-1*1000000*1000000*1000000, -17, DecimalSI), intQuantity(-10, 0, DecimalSI), 0}, + {intQuantity(1*1000000*1000000*1000000, -17, DecimalSI), intQuantity(1, 0, DecimalSI), 1}, + + {intQuantity(1*1000000*1000000*1000000+1, -17, DecimalSI), intQuantity(1, 1, DecimalSI), 1}, + {intQuantity(1*1000000*1000000*1000000-1, -17, DecimalSI), intQuantity(1, 1, DecimalSI), -1}, + } + + for _, item := range table { + if cmp := item.a.Cmp(item.b); cmp != item.cmp { + t.Errorf("%#v: unexpected Cmp: %d", item, cmp) + } + if cmp := item.b.Cmp(item.a); cmp != -item.cmp { + t.Errorf("%#v: unexpected inverted Cmp: %d", item, cmp) + } + } + + for _, item := range table { + a, b := *item.a.Copy(), *item.b.Copy() + a.AsDec() + if cmp := a.Cmp(b); cmp != item.cmp { + t.Errorf("%#v: unexpected Cmp: %d", item, cmp) + } + if cmp := b.Cmp(a); cmp != -item.cmp { + t.Errorf("%#v: unexpected inverted Cmp: %d", item, cmp) + } + } + + for _, item := range table { + a, b := *item.a.Copy(), *item.b.Copy() + b.AsDec() + if cmp := a.Cmp(b); cmp != item.cmp { + t.Errorf("%#v: unexpected Cmp: %d", item, cmp) + } + if cmp := b.Cmp(a); cmp != -item.cmp { + t.Errorf("%#v: unexpected inverted Cmp: %d", item, cmp) + } + } + + for _, item := range table { + a, b := *item.a.Copy(), *item.b.Copy() + a.AsDec() + b.AsDec() + if cmp := a.Cmp(b); cmp != item.cmp { + t.Errorf("%#v: unexpected Cmp: %d", item, cmp) + } + if cmp := b.Cmp(a); cmp != -item.cmp { + t.Errorf("%#v: unexpected inverted Cmp: %d", item, cmp) + } + } +} + +func TestQuantityNeg(t *testing.T) { + table := []struct { + a Quantity + out string + }{ + {intQuantity(901, -2, DecimalSI), "-9010m"}, + {decQuantity(901, -2, DecimalSI), "-9010m"}, + } + + for i, item := range table { + out := *item.a.Copy() + out.Neg() + if out.Cmp(item.a) == 0 { + t.Errorf("%d: negating an item should not mutate the source: %s", i, out.String()) + } + if out.String() != item.out { + t.Errorf("%d: negating did not equal exact value: %s", i, out.String()) + } + } +} + +func TestQuantityString(t *testing.T) { + table := []struct { + in Quantity + expect string + alternate string + }{ + {decQuantity(1024*1024*1024, 0, BinarySI), "1Gi", "1024Mi"}, + {decQuantity(300*1024*1024, 0, BinarySI), "300Mi", "307200Ki"}, + {decQuantity(6*1024, 0, BinarySI), "6Ki", ""}, + {decQuantity(1001*1024*1024*1024, 0, BinarySI), "1001Gi", "1025024Mi"}, + {decQuantity(1024*1024*1024*1024, 0, BinarySI), "1Ti", "1024Gi"}, + {decQuantity(5, 0, BinarySI), "5", "5000m"}, + {decQuantity(500, -3, BinarySI), "500m", "0.5"}, + {decQuantity(1, 9, DecimalSI), "1G", "1000M"}, + {decQuantity(1000, 6, DecimalSI), "1G", "0.001T"}, + {decQuantity(1000000, 3, DecimalSI), "1G", ""}, + {decQuantity(1000000000, 0, DecimalSI), "1G", ""}, + {decQuantity(1, -3, DecimalSI), "1m", "1000u"}, + {decQuantity(80, -3, DecimalSI), "80m", ""}, + {decQuantity(1080, -3, DecimalSI), "1080m", "1.08"}, + {decQuantity(108, -2, DecimalSI), "1080m", "1080000000n"}, + {decQuantity(10800, -4, DecimalSI), "1080m", ""}, + {decQuantity(300, 6, DecimalSI), "300M", ""}, + {decQuantity(1, 12, DecimalSI), "1T", ""}, + {decQuantity(1234567, 6, DecimalSI), "1234567M", ""}, + {decQuantity(1234567, -3, BinarySI), "1234567m", ""}, + {decQuantity(3, 3, DecimalSI), "3k", ""}, + {decQuantity(1025, 0, BinarySI), "1025", ""}, + {decQuantity(0, 0, DecimalSI), "0", ""}, + {decQuantity(0, 0, BinarySI), "0", ""}, + {decQuantity(1, 9, DecimalExponent), "1e9", ".001e12"}, + {decQuantity(1, -3, DecimalExponent), "1e-3", "0.001e0"}, + {decQuantity(1, -9, DecimalExponent), "1e-9", "1000e-12"}, + {decQuantity(80, -3, DecimalExponent), "80e-3", ""}, + {decQuantity(300, 6, DecimalExponent), "300e6", ""}, + {decQuantity(1, 12, DecimalExponent), "1e12", ""}, + {decQuantity(1, 3, DecimalExponent), "1e3", ""}, + {decQuantity(3, 3, DecimalExponent), "3e3", ""}, + {decQuantity(3, 3, DecimalSI), "3k", ""}, + {decQuantity(0, 0, DecimalExponent), "0", "00"}, + {decQuantity(1, -9, DecimalSI), "1n", ""}, + {decQuantity(80, -9, DecimalSI), "80n", ""}, + {decQuantity(1080, -9, DecimalSI), "1080n", ""}, + {decQuantity(108, -8, DecimalSI), "1080n", ""}, + {decQuantity(10800, -10, DecimalSI), "1080n", ""}, + {decQuantity(1, -6, DecimalSI), "1u", ""}, + {decQuantity(80, -6, DecimalSI), "80u", ""}, + {decQuantity(1080, -6, DecimalSI), "1080u", ""}, + } + for _, item := range table { + got := item.in.String() + if e, a := item.expect, got; e != a { + t.Errorf("%#v: expected %v, got %v", item.in, e, a) + } + q, err := ParseQuantity(item.expect) + if err != nil { + t.Errorf("%#v: unexpected error: %v", item.expect, err) + } + if len(q.s) == 0 || q.s != item.expect { + t.Errorf("%#v: did not copy canonical string on parse: %s", item.expect, q.s) + } + if len(item.alternate) == 0 { + continue + } + q, err = ParseQuantity(item.alternate) + if err != nil { + t.Errorf("%#v: unexpected error: %v", item.expect, err) + continue + } + if len(q.s) != 0 { + t.Errorf("%#v: unexpected nested string: %v", item.expect, q.s) + } + if q.String() != item.expect { + t.Errorf("%#v: unexpected alternate canonical: %v", item.expect, q.String()) + } + if len(q.s) == 0 || q.s != item.expect { + t.Errorf("%#v: did not set canonical string on ToString: %s", item.expect, q.s) + } + } + desired := &inf.Dec{} // Avoid modifying the values in the table. + for _, item := range table { + if item.in.Cmp(Quantity{}) == 0 { + // Don't expect it to print "-0" ever + continue + } + q := item.in + q.d = infDecAmount{desired.Neg(q.AsDec())} + if e, a := "-"+item.expect, q.String(); e != a { + t.Errorf("%#v: expected %v, got %v", item.in, e, a) + } + } +} + +func TestQuantityParseEmit(t *testing.T) { + table := []struct { + in string + expect string + }{ + {"1Ki", "1Ki"}, + {"1Mi", "1Mi"}, + {"1Gi", "1Gi"}, + {"1024Mi", "1Gi"}, + {"1000M", "1G"}, + {".001Ki", "1024m"}, + {".000001Ki", "1024u"}, + {".000000001Ki", "1024n"}, + {".000000000001Ki", "2n"}, + } + + for _, item := range table { + q, err := ParseQuantity(item.in) + if err != nil { + t.Errorf("Couldn't parse %v", item.in) + continue + } + if e, a := item.expect, q.String(); e != a { + t.Errorf("%#v: expected %v, got %v", item.in, e, a) + } + } + for _, item := range table { + q, err := ParseQuantity("-" + item.in) + if err != nil { + t.Errorf("Couldn't parse %v", item.in) + continue + } + if q.Cmp(Quantity{}) == 0 { + continue + } + if e, a := "-"+item.expect, q.String(); e != a { + t.Errorf("%#v: expected %v, got %v (%#v)", item.in, e, a, q.i) + } + } +} + +var fuzzer = fuzz.New().Funcs( + func(q *Quantity, c fuzz.Continue) { + q.i = Zero + if c.RandBool() { + q.Format = BinarySI + if c.RandBool() { + dec := &inf.Dec{} + q.d = infDecAmount{Dec: dec} + dec.SetScale(0) + dec.SetUnscaled(c.Int63()) + return + } + // Be sure to test cases like 1Mi + dec := &inf.Dec{} + q.d = infDecAmount{Dec: dec} + dec.SetScale(0) + dec.SetUnscaled(c.Int63n(1024) << uint(10*c.Intn(5))) + return + } + if c.RandBool() { + q.Format = DecimalSI + } else { + q.Format = DecimalExponent + } + if c.RandBool() { + dec := &inf.Dec{} + q.d = infDecAmount{Dec: dec} + dec.SetScale(inf.Scale(c.Intn(4))) + dec.SetUnscaled(c.Int63()) + return + } + // Be sure to test cases like 1M + dec := &inf.Dec{} + q.d = infDecAmount{Dec: dec} + dec.SetScale(inf.Scale(3 - c.Intn(15))) + dec.SetUnscaled(c.Int63n(1000)) + }, +) + +func TestQuantityDeepCopy(t *testing.T) { + // Test when d is nil + slice := []string{"0", "100m", "50m", "10000T"} + for _, testCase := range slice { + q := MustParse(testCase) + if result := q.DeepCopy(); result != q { + t.Errorf("Expected: %v, Actual: %v", q, result) + } + } + table := []*inf.Dec{ + dec(0, 0).Dec, + dec(10, 0).Dec, + dec(-10, 0).Dec, + } + // Test when i is {0,0} + for _, testCase := range table { + q := Quantity{d: infDecAmount{testCase}, Format: DecimalSI} + result := q.DeepCopy() + if q.d.Cmp(result.AsDec()) != 0 { + t.Errorf("Expected: %v, Actual: %v", q.String(), result.String()) + } + result = Quantity{d: infDecAmount{dec(2, 0).Dec}, Format: DecimalSI} + if q.d.Cmp(result.AsDec()) == 0 { + t.Errorf("Modifying result has affected q") + } + } +} + +func TestJSON(t *testing.T) { + for i := 0; i < 500; i++ { + q := &Quantity{} + fuzzer.Fuzz(q) + b, err := json.Marshal(q) + if err != nil { + t.Errorf("error encoding %v: %v", q, err) + continue + } + q2 := &Quantity{} + err = json.Unmarshal(b, q2) + if err != nil { + t.Logf("%d: %s", i, string(b)) + t.Errorf("%v: error decoding %v: %v", q, string(b), err) + } + if q2.Cmp(*q) != 0 { + t.Errorf("Expected equal: %v, %v (json was '%v')", q, q2, string(b)) + } + } +} + +func TestJSONWhitespace(t *testing.T) { + q := Quantity{} + testCases := []struct { + in string + expect string + }{ + {`" 1"`, "1"}, + {`"1 "`, "1"}, + {`1`, "1"}, + {` 1`, "1"}, + {`1 `, "1"}, + {`10`, "10"}, + {`-1`, "-1"}, + {` -1`, "-1"}, + } + for _, test := range testCases { + if err := json.Unmarshal([]byte(test.in), &q); err != nil { + t.Errorf("%q: %v", test.in, err) + } + if q.String() != test.expect { + t.Errorf("unexpected string: %q", q.String()) + } + } +} + +func TestMilliNewSet(t *testing.T) { + table := []struct { + value int64 + format Format + expect string + exact bool + }{ + {1, DecimalSI, "1m", true}, + {1000, DecimalSI, "1", true}, + {1234000, DecimalSI, "1234", true}, + {1024, BinarySI, "1024m", false}, // Format changes + {1000000, "invalidFormatDefaultsToExponent", "1e3", true}, + {1024 * 1024, BinarySI, "1048576m", false}, // Format changes + } + + for _, item := range table { + q := NewMilliQuantity(item.value, item.format) + if e, a := item.expect, q.String(); e != a { + t.Errorf("Expected %v, got %v; %#v", e, a, q) + } + if !item.exact { + continue + } + q2, err := ParseQuantity(q.String()) + if err != nil { + t.Errorf("Round trip failed on %v", q) + } + if e, a := item.value, q2.MilliValue(); e != a { + t.Errorf("Expected %v, got %v", e, a) + } + } + + for _, item := range table { + q := NewQuantity(0, item.format) + q.SetMilli(item.value) + if e, a := item.expect, q.String(); e != a { + t.Errorf("Set: Expected %v, got %v; %#v", e, a, q) + } + } +} + +func TestNewSet(t *testing.T) { + table := []struct { + value int64 + format Format + expect string + }{ + {1, DecimalSI, "1"}, + {1000, DecimalSI, "1k"}, + {1234000, DecimalSI, "1234k"}, + {1024, BinarySI, "1Ki"}, + {1000000, "invalidFormatDefaultsToExponent", "1e6"}, + {1024 * 1024, BinarySI, "1Mi"}, + } + + for _, asDec := range []bool{false, true} { + for _, item := range table { + q := NewQuantity(item.value, item.format) + if asDec { + q.ToDec() + } + if e, a := item.expect, q.String(); e != a { + t.Errorf("Expected %v, got %v; %#v", e, a, q) + } + q2, err := ParseQuantity(q.String()) + if err != nil { + t.Errorf("Round trip failed on %v", q) + } + if e, a := item.value, q2.Value(); e != a { + t.Errorf("Expected %v, got %v", e, a) + } + } + + for _, item := range table { + q := NewQuantity(0, item.format) + q.Set(item.value) + if asDec { + q.ToDec() + } + if e, a := item.expect, q.String(); e != a { + t.Errorf("Set: Expected %v, got %v; %#v", e, a, q) + } + } + } +} + +func TestNewScaledSet(t *testing.T) { + table := []struct { + value int64 + scale Scale + expect string + }{ + {1, Nano, "1n"}, + {1000, Nano, "1u"}, + {1, Micro, "1u"}, + {1000, Micro, "1m"}, + {1, Milli, "1m"}, + {1000, Milli, "1"}, + {1, 0, "1"}, + {0, Nano, "0"}, + {0, Micro, "0"}, + {0, Milli, "0"}, + {0, 0, "0"}, + } + + for _, item := range table { + q := NewScaledQuantity(item.value, item.scale) + if e, a := item.expect, q.String(); e != a { + t.Errorf("Expected %v, got %v; %#v", e, a, q) + } + q2, err := ParseQuantity(q.String()) + if err != nil { + t.Errorf("Round trip failed on %v", q) + } + if e, a := item.value, q2.ScaledValue(item.scale); e != a { + t.Errorf("Expected %v, got %v", e, a) + } + q3 := NewQuantity(0, DecimalSI) + q3.SetScaled(item.value, item.scale) + if q.Cmp(*q3) != 0 { + t.Errorf("Expected %v and %v to be equal", q, q3) + } + } +} + +func TestScaledValue(t *testing.T) { + table := []struct { + fromScale Scale + toScale Scale + expected int64 + }{ + {Nano, Nano, 1}, + {Nano, Micro, 1}, + {Nano, Milli, 1}, + {Nano, 0, 1}, + {Micro, Nano, 1000}, + {Micro, Micro, 1}, + {Micro, Milli, 1}, + {Micro, 0, 1}, + {Milli, Nano, 1000 * 1000}, + {Milli, Micro, 1000}, + {Milli, Milli, 1}, + {Milli, 0, 1}, + {0, Nano, 1000 * 1000 * 1000}, + {0, Micro, 1000 * 1000}, + {0, Milli, 1000}, + {0, 0, 1}, + } + + for _, item := range table { + q := NewScaledQuantity(1, item.fromScale) + if e, a := item.expected, q.ScaledValue(item.toScale); e != a { + t.Errorf("%v to %v: Expected %v, got %v", item.fromScale, item.toScale, e, a) + } + } +} + +func TestUninitializedNoCrash(t *testing.T) { + var q Quantity + + q.Value() + q.MilliValue() + q.Copy() + _ = q.String() + q.MarshalJSON() +} + +func TestCopy(t *testing.T) { + q := NewQuantity(5, DecimalSI) + c := q.Copy() + c.Set(6) + if q.Value() == 6 { + t.Errorf("Copy didn't") + } +} + +func TestQFlagSet(t *testing.T) { + qf := qFlag{&Quantity{}} + qf.Set("1Ki") + if e, a := "1Ki", qf.String(); e != a { + t.Errorf("Unexpected result %v != %v", e, a) + } +} + +func TestQFlagIsPFlag(t *testing.T) { + var pfv pflag.Value = qFlag{} + if e, a := "quantity", pfv.Type(); e != a { + t.Errorf("Unexpected result %v != %v", e, a) + } +} + +func TestSub(t *testing.T) { + tests := []struct { + a Quantity + b Quantity + expected Quantity + }{ + {decQuantity(10, 0, DecimalSI), decQuantity(1, 1, DecimalSI), decQuantity(0, 0, DecimalSI)}, + {decQuantity(10, 0, DecimalSI), decQuantity(1, 0, BinarySI), decQuantity(9, 0, DecimalSI)}, + {decQuantity(10, 0, BinarySI), decQuantity(1, 0, DecimalSI), decQuantity(9, 0, BinarySI)}, + {Quantity{Format: DecimalSI}, decQuantity(50, 0, DecimalSI), decQuantity(-50, 0, DecimalSI)}, + {decQuantity(50, 0, DecimalSI), Quantity{Format: DecimalSI}, decQuantity(50, 0, DecimalSI)}, + {Quantity{Format: DecimalSI}, Quantity{Format: DecimalSI}, decQuantity(0, 0, DecimalSI)}, + } + + for i, test := range tests { + test.a.Sub(test.b) + if test.a.Cmp(test.expected) != 0 { + t.Errorf("[%d] Expected %q, got %q", i, test.expected.String(), test.a.String()) + } + } +} + +func TestNeg(t *testing.T) { + tests := []struct { + a Quantity + b Quantity + expected Quantity + }{ + {a: intQuantity(0, 0, DecimalSI), expected: intQuantity(0, 0, DecimalSI)}, + {a: Quantity{}, expected: Quantity{}}, + {a: intQuantity(10, 0, BinarySI), expected: intQuantity(-10, 0, BinarySI)}, + {a: intQuantity(-10, 0, BinarySI), expected: intQuantity(10, 0, BinarySI)}, + {a: decQuantity(0, 0, DecimalSI), expected: intQuantity(0, 0, DecimalSI)}, + {a: decQuantity(10, 0, BinarySI), expected: intQuantity(-10, 0, BinarySI)}, + {a: decQuantity(-10, 0, BinarySI), expected: intQuantity(10, 0, BinarySI)}, + } + + for i, test := range tests { + a := test.a.Copy() + a.Neg() + // ensure value is same + if a.Cmp(test.expected) != 0 { + t.Errorf("[%d] Expected %q, got %q", i, test.expected.String(), a.String()) + } + } +} + +func TestAdd(t *testing.T) { + tests := []struct { + a Quantity + b Quantity + expected Quantity + }{ + {decQuantity(10, 0, DecimalSI), decQuantity(1, 1, DecimalSI), decQuantity(20, 0, DecimalSI)}, + {decQuantity(10, 0, DecimalSI), decQuantity(1, 0, BinarySI), decQuantity(11, 0, DecimalSI)}, + {decQuantity(10, 0, BinarySI), decQuantity(1, 0, DecimalSI), decQuantity(11, 0, BinarySI)}, + {Quantity{Format: DecimalSI}, decQuantity(50, 0, DecimalSI), decQuantity(50, 0, DecimalSI)}, + {decQuantity(50, 0, DecimalSI), Quantity{Format: DecimalSI}, decQuantity(50, 0, DecimalSI)}, + {Quantity{Format: DecimalSI}, Quantity{Format: DecimalSI}, decQuantity(0, 0, DecimalSI)}, + } + + for i, test := range tests { + test.a.Add(test.b) + if test.a.Cmp(test.expected) != 0 { + t.Errorf("[%d] Expected %q, got %q", i, test.expected.String(), test.a.String()) + } + } +} + +func TestAddSubRoundTrip(t *testing.T) { + for k := -10; k <= 10; k++ { + q := Quantity{Format: DecimalSI} + var order []int64 + for i := 0; i < 100; i++ { + j := rand.Int63() + order = append(order, j) + q.Add(*NewScaledQuantity(j, Scale(k))) + } + for _, j := range order { + q.Sub(*NewScaledQuantity(j, Scale(k))) + } + if !q.IsZero() { + t.Errorf("addition and subtraction did not cancel: %s", &q) + } + } +} + +func TestAddSubRoundTripAcrossScales(t *testing.T) { + q := Quantity{Format: DecimalSI} + var order []int64 + for i := 0; i < 100; i++ { + j := rand.Int63() + order = append(order, j) + q.Add(*NewScaledQuantity(j, Scale(j%20-10))) + } + for _, j := range order { + q.Sub(*NewScaledQuantity(j, Scale(j%20-10))) + } + if !q.IsZero() { + t.Errorf("addition and subtraction did not cancel: %s", &q) + } +} + +func TestNegateRoundTrip(t *testing.T) { + for _, asDec := range []bool{false, true} { + for k := -10; k <= 10; k++ { + for i := 0; i < 100; i++ { + j := rand.Int63() + q := *NewScaledQuantity(j, Scale(k)) + if asDec { + q.AsDec() + } + + b := q.Copy() + b.Neg() + b.Neg() + if b.Cmp(q) != 0 { + t.Errorf("double negation did not cancel: %s", &q) + } + } + } + } +} +func benchmarkQuantities() []Quantity { + return []Quantity{ + intQuantity(1024*1024*1024, 0, BinarySI), + intQuantity(1024*1024*1024*1024, 0, BinarySI), + intQuantity(1000000, 3, DecimalSI), + intQuantity(1000000000, 0, DecimalSI), + intQuantity(1, -3, DecimalSI), + intQuantity(80, -3, DecimalSI), + intQuantity(1080, -3, DecimalSI), + intQuantity(0, 0, BinarySI), + intQuantity(1, 9, DecimalExponent), + intQuantity(1, -9, DecimalSI), + intQuantity(1000000, 10, DecimalSI), + } +} + +func BenchmarkQuantityString(b *testing.B) { + values := benchmarkQuantities() + b.ResetTimer() + var s string + for i := 0; i < b.N; i++ { + q := values[i%len(values)] + q.s = "" + s = q.String() + } + b.StopTimer() + if len(s) == 0 { + b.Fatal(s) + } +} + +func BenchmarkQuantityStringPrecalc(b *testing.B) { + values := benchmarkQuantities() + for i := range values { + _ = values[i].String() + } + b.ResetTimer() + var s string + for i := 0; i < b.N; i++ { + q := values[i%len(values)] + s = q.String() + } + b.StopTimer() + if len(s) == 0 { + b.Fatal(s) + } +} + +func BenchmarkQuantityStringBinarySI(b *testing.B) { + values := benchmarkQuantities() + for i := range values { + values[i].Format = BinarySI + } + b.ResetTimer() + var s string + for i := 0; i < b.N; i++ { + q := values[i%len(values)] + q.s = "" + s = q.String() + } + b.StopTimer() + if len(s) == 0 { + b.Fatal(s) + } +} + +func BenchmarkQuantityMarshalJSON(b *testing.B) { + values := benchmarkQuantities() + b.ResetTimer() + for i := 0; i < b.N; i++ { + q := values[i%len(values)] + q.s = "" + if _, err := q.MarshalJSON(); err != nil { + b.Fatal(err) + } + } + b.StopTimer() +} + +func BenchmarkQuantityUnmarshalJSON(b *testing.B) { + values := benchmarkQuantities() + var json [][]byte + for _, v := range values { + data, _ := v.MarshalJSON() + json = append(json, data) + } + + b.ResetTimer() + for i := 0; i < b.N; i++ { + var q Quantity + if err := q.UnmarshalJSON(json[i%len(values)]); err != nil { + b.Fatal(err) + } + } + b.StopTimer() +} + +func BenchmarkParseQuantity(b *testing.B) { + values := benchmarkQuantities() + var strings []string + for _, v := range values { + strings = append(strings, v.String()) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + if _, err := ParseQuantity(strings[i%len(values)]); err != nil { + b.Fatal(err) + } + } + b.StopTimer() +} + +func BenchmarkCanonicalize(b *testing.B) { + values := benchmarkQuantities() + b.ResetTimer() + buffer := make([]byte, 0, 100) + for i := 0; i < b.N; i++ { + s, _ := values[i%len(values)].CanonicalizeBytes(buffer) + if len(s) == 0 { + b.Fatal(s) + } + } + b.StopTimer() +} + +func BenchmarkQuantityRoundUp(b *testing.B) { + values := benchmarkQuantities() + b.ResetTimer() + for i := 0; i < b.N; i++ { + q := values[i%len(values)] + copied := q + copied.RoundUp(-3) + } + b.StopTimer() +} + +func BenchmarkQuantityCopy(b *testing.B) { + values := benchmarkQuantities() + b.ResetTimer() + for i := 0; i < b.N; i++ { + values[i%len(values)].Copy() + } + b.StopTimer() +} + +func BenchmarkQuantityAdd(b *testing.B) { + values := benchmarkQuantities() + base := &Quantity{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + q := values[i%len(values)] + base.d.Dec = nil + base.i = int64Amount{value: 100} + base.Add(q) + } + b.StopTimer() +} + +func BenchmarkQuantityCmp(b *testing.B) { + values := benchmarkQuantities() + b.ResetTimer() + for i := 0; i < b.N; i++ { + q := values[i%len(values)] + if q.Cmp(q) != 0 { + b.Fatal(q) + } + } + b.StopTimer() +} diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/scale_int_test.go b/vendor/k8s.io/apimachinery/pkg/api/resource/scale_int_test.go new file mode 100644 index 000000000..50d91060a --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/api/resource/scale_int_test.go @@ -0,0 +1,85 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package resource + +import ( + "math" + "math/big" + "testing" +) + +func TestScaledValueInternal(t *testing.T) { + tests := []struct { + unscaled *big.Int + scale int + newScale int + + want int64 + }{ + // remain scale + {big.NewInt(1000), 0, 0, 1000}, + + // scale down + {big.NewInt(1000), 0, -3, 1}, + {big.NewInt(1000), 3, 0, 1}, + {big.NewInt(0), 3, 0, 0}, + + // always round up + {big.NewInt(999), 3, 0, 1}, + {big.NewInt(500), 3, 0, 1}, + {big.NewInt(499), 3, 0, 1}, + {big.NewInt(1), 3, 0, 1}, + // large scaled value does not lose precision + {big.NewInt(0).Sub(maxInt64, bigOne), 1, 0, (math.MaxInt64-1)/10 + 1}, + // large intermidiate result. + {big.NewInt(1).Exp(big.NewInt(10), big.NewInt(100), nil), 100, 0, 1}, + + // scale up + {big.NewInt(0), 0, 3, 0}, + {big.NewInt(1), 0, 3, 1000}, + {big.NewInt(1), -3, 0, 1000}, + {big.NewInt(1000), -3, 2, 100000000}, + {big.NewInt(0).Div(big.NewInt(math.MaxInt64), bigThousand), 0, 3, + (math.MaxInt64 / 1000) * 1000}, + } + + for i, tt := range tests { + old := (&big.Int{}).Set(tt.unscaled) + got := scaledValue(tt.unscaled, tt.scale, tt.newScale) + if got != tt.want { + t.Errorf("#%d: got = %v, want %v", i, got, tt.want) + } + if tt.unscaled.Cmp(old) != 0 { + t.Errorf("#%d: unscaled = %v, want %v", i, tt.unscaled, old) + } + } +} + +func BenchmarkScaledValueSmall(b *testing.B) { + s := big.NewInt(1000) + for i := 0; i < b.N; i++ { + scaledValue(s, 3, 0) + } +} + +func BenchmarkScaledValueLarge(b *testing.B) { + s := big.NewInt(math.MaxInt64) + s.Mul(s, big.NewInt(1000)) + for i := 0; i < b.N; i++ { + scaledValue(s, 10, 0) + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/api/validation/doc.go b/vendor/k8s.io/apimachinery/pkg/api/validation/doc.go index 9e305b0b1..9f20152e4 100644 --- a/vendor/k8s.io/apimachinery/pkg/api/validation/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/api/validation/doc.go @@ -15,4 +15,4 @@ limitations under the License. */ // Package validation contains generic api type validation functions. -package validation +package validation // import "k8s.io/apimachinery/pkg/api/validation" diff --git a/vendor/k8s.io/apimachinery/pkg/api/validation/objectmeta_test.go b/vendor/k8s.io/apimachinery/pkg/api/validation/objectmeta_test.go new file mode 100644 index 000000000..9ec73b040 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/api/validation/objectmeta_test.go @@ -0,0 +1,500 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package validation + +import ( + "math/rand" + "reflect" + "strings" + "testing" + "time" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/validation/field" +) + +const ( + maxLengthErrMsg = "must be no more than" + namePartErrMsg = "name part must consist of" + nameErrMsg = "a qualified name must consist of" +) + +// Ensure custom name functions are allowed +func TestValidateObjectMetaCustomName(t *testing.T) { + errs := ValidateObjectMeta( + &metav1.ObjectMeta{Name: "test", GenerateName: "foo"}, + false, + func(s string, prefix bool) []string { + if s == "test" { + return nil + } + return []string{"name-gen"} + }, + field.NewPath("field")) + if len(errs) != 1 { + t.Fatalf("unexpected errors: %v", errs) + } + if !strings.Contains(errs[0].Error(), "name-gen") { + t.Errorf("unexpected error message: %v", errs) + } +} + +// Ensure namespace names follow dns label format +func TestValidateObjectMetaNamespaces(t *testing.T) { + errs := ValidateObjectMeta( + &metav1.ObjectMeta{Name: "test", Namespace: "foo.bar"}, + true, + func(s string, prefix bool) []string { + return nil + }, + field.NewPath("field")) + if len(errs) != 1 { + t.Fatalf("unexpected errors: %v", errs) + } + if !strings.Contains(errs[0].Error(), `Invalid value: "foo.bar"`) { + t.Errorf("unexpected error message: %v", errs) + } + maxLength := 63 + letters := []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") + b := make([]rune, maxLength+1) + for i := range b { + b[i] = letters[rand.Intn(len(letters))] + } + errs = ValidateObjectMeta( + &metav1.ObjectMeta{Name: "test", Namespace: string(b)}, + true, + func(s string, prefix bool) []string { + return nil + }, + field.NewPath("field")) + if len(errs) != 2 { + t.Fatalf("unexpected errors: %v", errs) + } + if !strings.Contains(errs[0].Error(), "Invalid value") || !strings.Contains(errs[1].Error(), "Invalid value") { + t.Errorf("unexpected error message: %v", errs) + } +} + +func TestValidateObjectMetaOwnerReferences(t *testing.T) { + trueVar := true + falseVar := false + testCases := []struct { + description string + ownerReferences []metav1.OwnerReference + expectError bool + expectedErrorMessage string + }{ + { + description: "simple success - third party extension.", + ownerReferences: []metav1.OwnerReference{ + { + APIVersion: "customresourceVersion", + Kind: "customresourceKind", + Name: "name", + UID: "1", + }, + }, + expectError: false, + expectedErrorMessage: "", + }, + { + description: "simple failures - event shouldn't be set as an owner", + ownerReferences: []metav1.OwnerReference{ + { + APIVersion: "v1", + Kind: "Event", + Name: "name", + UID: "1", + }, + }, + expectError: true, + expectedErrorMessage: "is disallowed from being an owner", + }, + { + description: "simple controller ref success - one reference with Controller set", + ownerReferences: []metav1.OwnerReference{ + { + APIVersion: "customresourceVersion", + Kind: "customresourceKind", + Name: "name", + UID: "1", + Controller: &falseVar, + }, + { + APIVersion: "customresourceVersion", + Kind: "customresourceKind", + Name: "name", + UID: "2", + Controller: &trueVar, + }, + { + APIVersion: "customresourceVersion", + Kind: "customresourceKind", + Name: "name", + UID: "3", + Controller: &falseVar, + }, + { + APIVersion: "customresourceVersion", + Kind: "customresourceKind", + Name: "name", + UID: "4", + }, + }, + expectError: false, + expectedErrorMessage: "", + }, + { + description: "simple controller ref failure - two references with Controller set", + ownerReferences: []metav1.OwnerReference{ + { + APIVersion: "customresourceVersion", + Kind: "customresourceKind", + Name: "name", + UID: "1", + Controller: &falseVar, + }, + { + APIVersion: "customresourceVersion", + Kind: "customresourceKind", + Name: "name", + UID: "2", + Controller: &trueVar, + }, + { + APIVersion: "customresourceVersion", + Kind: "customresourceKind", + Name: "name", + UID: "3", + Controller: &trueVar, + }, + { + APIVersion: "customresourceVersion", + Kind: "customresourceKind", + Name: "name", + UID: "4", + }, + }, + expectError: true, + expectedErrorMessage: "Only one reference can have Controller set to true", + }, + } + + for _, tc := range testCases { + errs := ValidateObjectMeta( + &metav1.ObjectMeta{Name: "test", Namespace: "test", OwnerReferences: tc.ownerReferences}, + true, + func(s string, prefix bool) []string { + return nil + }, + field.NewPath("field")) + if len(errs) != 0 && !tc.expectError { + t.Errorf("unexpected error: %v in test case %v", errs, tc.description) + } + if len(errs) == 0 && tc.expectError { + t.Errorf("expect error in test case %v", tc.description) + } + if len(errs) != 0 && !strings.Contains(errs[0].Error(), tc.expectedErrorMessage) { + t.Errorf("unexpected error message: %v in test case %v", errs, tc.description) + } + } +} + +func TestValidateObjectMetaUpdateIgnoresCreationTimestamp(t *testing.T) { + if errs := ValidateObjectMetaUpdate( + &metav1.ObjectMeta{Name: "test", ResourceVersion: "1"}, + &metav1.ObjectMeta{Name: "test", ResourceVersion: "1", CreationTimestamp: metav1.NewTime(time.Unix(10, 0))}, + field.NewPath("field"), + ); len(errs) != 0 { + t.Fatalf("unexpected errors: %v", errs) + } + if errs := ValidateObjectMetaUpdate( + &metav1.ObjectMeta{Name: "test", ResourceVersion: "1", CreationTimestamp: metav1.NewTime(time.Unix(10, 0))}, + &metav1.ObjectMeta{Name: "test", ResourceVersion: "1"}, + field.NewPath("field"), + ); len(errs) != 0 { + t.Fatalf("unexpected errors: %v", errs) + } + if errs := ValidateObjectMetaUpdate( + &metav1.ObjectMeta{Name: "test", ResourceVersion: "1", CreationTimestamp: metav1.NewTime(time.Unix(10, 0))}, + &metav1.ObjectMeta{Name: "test", ResourceVersion: "1", CreationTimestamp: metav1.NewTime(time.Unix(11, 0))}, + field.NewPath("field"), + ); len(errs) != 0 { + t.Fatalf("unexpected errors: %v", errs) + } +} + +func TestValidateFinalizersUpdate(t *testing.T) { + testcases := map[string]struct { + Old metav1.ObjectMeta + New metav1.ObjectMeta + ExpectedErr string + }{ + "invalid adding finalizers": { + Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &metav1.Time{}, Finalizers: []string{"x/a"}}, + New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &metav1.Time{}, Finalizers: []string{"x/a", "y/b"}}, + ExpectedErr: "y/b", + }, + "invalid changing finalizers": { + Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &metav1.Time{}, Finalizers: []string{"x/a"}}, + New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &metav1.Time{}, Finalizers: []string{"x/b"}}, + ExpectedErr: "x/b", + }, + "valid removing finalizers": { + Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &metav1.Time{}, Finalizers: []string{"x/a", "y/b"}}, + New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &metav1.Time{}, Finalizers: []string{"x/a"}}, + ExpectedErr: "", + }, + "valid adding finalizers for objects not being deleted": { + Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", Finalizers: []string{"x/a"}}, + New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", Finalizers: []string{"x/a", "y/b"}}, + ExpectedErr: "", + }, + } + for name, tc := range testcases { + errs := ValidateObjectMetaUpdate(&tc.New, &tc.Old, field.NewPath("field")) + if len(errs) == 0 { + if len(tc.ExpectedErr) != 0 { + t.Errorf("case: %q, expected error to contain %q", name, tc.ExpectedErr) + } + } else if e, a := tc.ExpectedErr, errs.ToAggregate().Error(); !strings.Contains(a, e) { + t.Errorf("case: %q, expected error to contain %q, got error %q", name, e, a) + } + } +} + +func TestValidateFinalizersPreventConflictingFinalizers(t *testing.T) { + testcases := map[string]struct { + ObjectMeta metav1.ObjectMeta + ExpectedErr string + }{ + "conflicting finalizers": { + ObjectMeta: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", Finalizers: []string{metav1.FinalizerOrphanDependents, metav1.FinalizerDeleteDependents}}, + ExpectedErr: "cannot be both set", + }, + } + for name, tc := range testcases { + errs := ValidateObjectMeta(&tc.ObjectMeta, false, NameIsDNSSubdomain, field.NewPath("field")) + if len(errs) == 0 { + if len(tc.ExpectedErr) != 0 { + t.Errorf("case: %q, expected error to contain %q", name, tc.ExpectedErr) + } + } else if e, a := tc.ExpectedErr, errs.ToAggregate().Error(); !strings.Contains(a, e) { + t.Errorf("case: %q, expected error to contain %q, got error %q", name, e, a) + } + } +} + +func TestValidateObjectMetaUpdatePreventsDeletionFieldMutation(t *testing.T) { + now := metav1.NewTime(time.Unix(1000, 0).UTC()) + later := metav1.NewTime(time.Unix(2000, 0).UTC()) + gracePeriodShort := int64(30) + gracePeriodLong := int64(40) + + testcases := map[string]struct { + Old metav1.ObjectMeta + New metav1.ObjectMeta + ExpectedNew metav1.ObjectMeta + ExpectedErrs []string + }{ + "valid without deletion fields": { + Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1"}, + New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1"}, + ExpectedNew: metav1.ObjectMeta{Name: "test", ResourceVersion: "1"}, + ExpectedErrs: []string{}, + }, + "valid with deletion fields": { + Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now, DeletionGracePeriodSeconds: &gracePeriodShort}, + New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now, DeletionGracePeriodSeconds: &gracePeriodShort}, + ExpectedNew: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now, DeletionGracePeriodSeconds: &gracePeriodShort}, + ExpectedErrs: []string{}, + }, + + "invalid set deletionTimestamp": { + Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1"}, + New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now}, + ExpectedNew: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now}, + ExpectedErrs: []string{"field.deletionTimestamp: Invalid value: 1970-01-01 00:16:40 +0000 UTC: field is immutable; may only be changed via deletion"}, + }, + "invalid clear deletionTimestamp": { + Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now}, + New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1"}, + ExpectedNew: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now}, + ExpectedErrs: []string{}, // no errors, validation copies the old value + }, + "invalid change deletionTimestamp": { + Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now}, + New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &later}, + ExpectedNew: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now}, + ExpectedErrs: []string{}, // no errors, validation copies the old value + }, + + "invalid set deletionGracePeriodSeconds": { + Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1"}, + New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionGracePeriodSeconds: &gracePeriodShort}, + ExpectedNew: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionGracePeriodSeconds: &gracePeriodShort}, + ExpectedErrs: []string{"field.deletionGracePeriodSeconds: Invalid value: 30: field is immutable; may only be changed via deletion"}, + }, + "invalid clear deletionGracePeriodSeconds": { + Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionGracePeriodSeconds: &gracePeriodShort}, + New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1"}, + ExpectedNew: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionGracePeriodSeconds: &gracePeriodShort}, + ExpectedErrs: []string{}, // no errors, validation copies the old value + }, + "invalid change deletionGracePeriodSeconds": { + Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionGracePeriodSeconds: &gracePeriodShort}, + New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionGracePeriodSeconds: &gracePeriodLong}, + ExpectedNew: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionGracePeriodSeconds: &gracePeriodLong}, + ExpectedErrs: []string{"field.deletionGracePeriodSeconds: Invalid value: 40: field is immutable; may only be changed via deletion"}, + }, + } + + for k, tc := range testcases { + errs := ValidateObjectMetaUpdate(&tc.New, &tc.Old, field.NewPath("field")) + if len(errs) != len(tc.ExpectedErrs) { + t.Logf("%s: Expected: %#v", k, tc.ExpectedErrs) + t.Logf("%s: Got: %#v", k, errs) + t.Errorf("%s: expected %d errors, got %d", k, len(tc.ExpectedErrs), len(errs)) + continue + } + for i := range errs { + if errs[i].Error() != tc.ExpectedErrs[i] { + t.Errorf("%s: error #%d: expected %q, got %q", k, i, tc.ExpectedErrs[i], errs[i].Error()) + } + } + if !reflect.DeepEqual(tc.New, tc.ExpectedNew) { + t.Errorf("%s: Expected after validation:\n%#v\ngot\n%#v", k, tc.ExpectedNew, tc.New) + } + } +} + +func TestObjectMetaGenerationUpdate(t *testing.T) { + testcases := map[string]struct { + Old metav1.ObjectMeta + New metav1.ObjectMeta + ExpectedErrs []string + }{ + "invalid generation change - decremented": { + Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", Generation: 5}, + New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", Generation: 4}, + ExpectedErrs: []string{"field.generation: Invalid value: 4: must not be decremented"}, + }, + "valid generation change - incremented by one": { + Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", Generation: 1}, + New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", Generation: 2}, + ExpectedErrs: []string{}, + }, + "valid generation field - not updated": { + Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", Generation: 5}, + New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", Generation: 5}, + ExpectedErrs: []string{}, + }, + } + + for k, tc := range testcases { + errList := []string{} + errs := ValidateObjectMetaUpdate(&tc.New, &tc.Old, field.NewPath("field")) + if len(errs) != len(tc.ExpectedErrs) { + t.Logf("%s: Expected: %#v", k, tc.ExpectedErrs) + for _, err := range errs { + errList = append(errList, err.Error()) + } + t.Logf("%s: Got: %#v", k, errList) + t.Errorf("%s: expected %d errors, got %d", k, len(tc.ExpectedErrs), len(errs)) + continue + } + for i := range errList { + if errList[i] != tc.ExpectedErrs[i] { + t.Errorf("%s: error #%d: expected %q, got %q", k, i, tc.ExpectedErrs[i], errList[i]) + } + } + } +} + +// Ensure trailing slash is allowed in generate name +func TestValidateObjectMetaTrimsTrailingSlash(t *testing.T) { + errs := ValidateObjectMeta( + &metav1.ObjectMeta{Name: "test", GenerateName: "foo-"}, + false, + NameIsDNSSubdomain, + field.NewPath("field")) + if len(errs) != 0 { + t.Fatalf("unexpected errors: %v", errs) + } +} + +func TestValidateAnnotations(t *testing.T) { + successCases := []map[string]string{ + {"simple": "bar"}, + {"now-with-dashes": "bar"}, + {"1-starts-with-num": "bar"}, + {"1234": "bar"}, + {"simple/simple": "bar"}, + {"now-with-dashes/simple": "bar"}, + {"now-with-dashes/now-with-dashes": "bar"}, + {"now.with.dots/simple": "bar"}, + {"now-with.dashes-and.dots/simple": "bar"}, + {"1-num.2-num/3-num": "bar"}, + {"1234/5678": "bar"}, + {"1.2.3.4/5678": "bar"}, + {"UpperCase123": "bar"}, + {"a": strings.Repeat("b", totalAnnotationSizeLimitB-1)}, + { + "a": strings.Repeat("b", totalAnnotationSizeLimitB/2-1), + "c": strings.Repeat("d", totalAnnotationSizeLimitB/2-1), + }, + } + for i := range successCases { + errs := ValidateAnnotations(successCases[i], field.NewPath("field")) + if len(errs) != 0 { + t.Errorf("case[%d] expected success, got %#v", i, errs) + } + } + + nameErrorCases := []struct { + annotations map[string]string + expect string + }{ + {map[string]string{"nospecialchars^=@": "bar"}, namePartErrMsg}, + {map[string]string{"cantendwithadash-": "bar"}, namePartErrMsg}, + {map[string]string{"only/one/slash": "bar"}, nameErrMsg}, + {map[string]string{strings.Repeat("a", 254): "bar"}, maxLengthErrMsg}, + } + for i := range nameErrorCases { + errs := ValidateAnnotations(nameErrorCases[i].annotations, field.NewPath("field")) + if len(errs) != 1 { + t.Errorf("case[%d]: expected failure", i) + } else { + if !strings.Contains(errs[0].Detail, nameErrorCases[i].expect) { + t.Errorf("case[%d]: error details do not include %q: %q", i, nameErrorCases[i].expect, errs[0].Detail) + } + } + } + totalSizeErrorCases := []map[string]string{ + {"a": strings.Repeat("b", totalAnnotationSizeLimitB)}, + { + "a": strings.Repeat("b", totalAnnotationSizeLimitB/2), + "c": strings.Repeat("d", totalAnnotationSizeLimitB/2), + }, + } + for i := range totalSizeErrorCases { + errs := ValidateAnnotations(totalSizeErrorCases[i], field.NewPath("field")) + if len(errs) != 1 { + t.Errorf("case[%d] expected failure", i) + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/apimachinery/announced/announced_test.go b/vendor/k8s.io/apimachinery/pkg/apimachinery/announced/announced_test.go new file mode 100644 index 000000000..95882e5df --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apimachinery/announced/announced_test.go @@ -0,0 +1,64 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package announced + +import ( + "reflect" + "testing" + + "k8s.io/apimachinery/pkg/util/sets" +) + +func TestFactoryRegistry(t *testing.T) { + regA := make(APIGroupFactoryRegistry) + regB := make(APIGroupFactoryRegistry) + + if err := regA.AnnounceGroup(&GroupMetaFactoryArgs{ + GroupName: "foo", + VersionPreferenceOrder: []string{"v2", "v1"}, + RootScopedKinds: sets.NewString("namespaces"), + }); err != nil { + t.Fatalf("Unexpected error: %v", err) + } + if err := regA.AnnounceGroupVersion(&GroupVersionFactoryArgs{ + GroupName: "foo", + VersionName: "v1", + }); err != nil { + t.Fatalf("Unexpected error: %v", err) + } + if err := regA.AnnounceGroupVersion(&GroupVersionFactoryArgs{ + GroupName: "foo", + VersionName: "v2", + }); err != nil { + t.Fatalf("Unexpected error: %v", err) + } + + if err := regB.AnnouncePreconstructedFactory(NewGroupMetaFactory( + &GroupMetaFactoryArgs{ + GroupName: "foo", + VersionPreferenceOrder: []string{"v2", "v1"}, + RootScopedKinds: sets.NewString("namespaces"), + }, + VersionToSchemeFunc{"v1": nil, "v2": nil}, + )); err != nil { + t.Fatalf("Unexpected error: %v", err) + } + + if !reflect.DeepEqual(regA, regB) { + t.Errorf("Expected both ways of registering to be equivalent, but they were not.\n\n%#v\n\n%#v\n", regA, regB) + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/apimachinery/doc.go b/vendor/k8s.io/apimachinery/pkg/apimachinery/doc.go index ede22b3d6..b238454b2 100644 --- a/vendor/k8s.io/apimachinery/pkg/apimachinery/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/apimachinery/doc.go @@ -17,4 +17,4 @@ limitations under the License. // Package apimachinery contains the generic API machinery code that // is common to both server and clients. // This package should never import specific API objects. -package apimachinery +package apimachinery // import "k8s.io/apimachinery/pkg/apimachinery" diff --git a/vendor/k8s.io/apimachinery/pkg/apimachinery/registered/registered_test.go b/vendor/k8s.io/apimachinery/pkg/apimachinery/registered/registered_test.go new file mode 100644 index 000000000..58fc0173e --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apimachinery/registered/registered_test.go @@ -0,0 +1,71 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package registered + +import ( + "testing" + + "k8s.io/apimachinery/pkg/apimachinery" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +func TestAllPreferredGroupVersions(t *testing.T) { + testCases := []struct { + groupMetas []apimachinery.GroupMeta + expect string + }{ + { + groupMetas: []apimachinery.GroupMeta{ + { + GroupVersion: schema.GroupVersion{Group: "group1", Version: "v1"}, + }, + { + GroupVersion: schema.GroupVersion{Group: "group2", Version: "v2"}, + }, + { + GroupVersion: schema.GroupVersion{Group: "", Version: "v1"}, + }, + }, + expect: "group1/v1,group2/v2,v1", + }, + { + groupMetas: []apimachinery.GroupMeta{ + { + GroupVersion: schema.GroupVersion{Group: "", Version: "v1"}, + }, + }, + expect: "v1", + }, + { + groupMetas: []apimachinery.GroupMeta{}, + expect: "", + }, + } + for _, testCase := range testCases { + m, err := NewAPIRegistrationManager("") + if err != nil { + t.Fatalf("Unexpected failure to make a manager: %v", err) + } + for _, groupMeta := range testCase.groupMetas { + m.RegisterGroup(groupMeta) + } + output := m.AllPreferredGroupVersions() + if testCase.expect != output { + t.Errorf("Error. expect: %s, got: %s", testCase.expect, output) + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/apimachinery/types_test.go b/vendor/k8s.io/apimachinery/pkg/apimachinery/types_test.go new file mode 100644 index 000000000..ca858788e --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apimachinery/types_test.go @@ -0,0 +1,43 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package apimachinery + +import ( + "testing" + + "k8s.io/apimachinery/pkg/runtime/schema" +) + +func TestAdd(t *testing.T) { + gm := GroupMeta{ + GroupVersion: schema.GroupVersion{ + Group: "test", + Version: "v1", + }, + GroupVersions: []schema.GroupVersion{{Group: "test", Version: "v1"}}, + } + + gm.AddVersionInterfaces(schema.GroupVersion{Group: "test", Version: "v1"}, nil) + if e, a := 1, len(gm.InterfacesByVersion); e != a { + t.Errorf("expected %v, got %v", e, a) + } + + // GroupVersions is unchanged + if e, a := 1, len(gm.GroupVersions); e != a { + t.Errorf("expected %v, got %v", e, a) + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/register_test.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/register_test.go new file mode 100644 index 000000000..8a6fefa41 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/register_test.go @@ -0,0 +1,89 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package internalversion + +import ( + "net/url" + "reflect" + "testing" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/diff" +) + +func TestListOptions(t *testing.T) { + // verify round trip conversion + ten := int64(10) + in := &metav1.ListOptions{ + LabelSelector: "a=1", + FieldSelector: "b=1", + ResourceVersion: "10", + TimeoutSeconds: &ten, + Watch: true, + } + out := &ListOptions{} + if err := scheme.Convert(in, out, nil); err != nil { + t.Fatal(err) + } + actual := &metav1.ListOptions{} + if err := scheme.Convert(out, actual, nil); err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(in, actual) { + t.Errorf("unexpected: %s", diff.ObjectReflectDiff(in, actual)) + } + + // verify failing conversion + for i, failingObject := range []*metav1.ListOptions{ + {LabelSelector: "a!!!"}, + {FieldSelector: "a!!!"}, + } { + out = &ListOptions{} + if err := scheme.Convert(failingObject, out, nil); err == nil { + t.Errorf("%d: unexpected conversion: %#v", i, out) + } + } + + // verify kind registration + if gvk, unversioned, err := scheme.ObjectKind(in); err != nil || unversioned || gvk != metav1.SchemeGroupVersion.WithKind("ListOptions") { + t.Errorf("unexpected: %v %v %v", gvk, unversioned, err) + } + if gvk, unversioned, err := scheme.ObjectKind(out); err != nil || unversioned || gvk != SchemeGroupVersion.WithKind("ListOptions") { + t.Errorf("unexpected: %v %v %v", gvk, unversioned, err) + } + + actual = &metav1.ListOptions{} + if err := ParameterCodec.DecodeParameters(url.Values{"watch": []string{"1"}}, metav1.SchemeGroupVersion, actual); err != nil { + t.Fatal(err) + } + if !actual.Watch { + t.Errorf("unexpected watch decode: %#v", actual) + } + + // check ParameterCodec + query, err := ParameterCodec.EncodeParameters(in, metav1.SchemeGroupVersion) + if err != nil { + t.Fatal(err) + } + actual = &metav1.ListOptions{} + if err := ParameterCodec.DecodeParameters(query, metav1.SchemeGroupVersion, actual); err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(in, actual) { + t.Errorf("unexpected: %s", diff.ObjectReflectDiff(in, actual)) + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/roundtrip_test.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/roundtrip_test.go new file mode 100644 index 000000000..725aa316d --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/roundtrip_test.go @@ -0,0 +1,28 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package internalversion + +import ( + "testing" + + "k8s.io/apimachinery/pkg/api/testing/roundtrip" + "k8s.io/apimachinery/pkg/apis/meta/fuzzer" +) + +func TestRoundTrip(t *testing.T) { + roundtrip.RoundTripTestForScheme(t, scheme, fuzzer.Funcs) +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/controller_ref_test.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/controller_ref_test.go new file mode 100644 index 000000000..add764a33 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/controller_ref_test.go @@ -0,0 +1,133 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "testing" + + "k8s.io/apimachinery/pkg/runtime/schema" +) + +type metaObj struct { + ObjectMeta + TypeMeta +} + +func TestNewControllerRef(t *testing.T) { + gvk := schema.GroupVersionKind{ + Group: "group", + Version: "v1", + Kind: "Kind", + } + obj1 := &metaObj{ + ObjectMeta: ObjectMeta{ + Name: "name", + UID: "uid1", + }, + } + controllerRef := NewControllerRef(obj1, gvk) + if controllerRef.UID != obj1.UID { + t.Errorf("Incorrect UID: %s", controllerRef.UID) + } + if controllerRef.Controller == nil || *controllerRef.Controller != true { + t.Error("Controller must be set to true") + } + if controllerRef.BlockOwnerDeletion == nil || *controllerRef.BlockOwnerDeletion != true { + t.Error("BlockOwnerDeletion must be set to true") + } + if controllerRef.APIVersion == "" || + controllerRef.Kind == "" || + controllerRef.Name == "" { + t.Errorf("All controllerRef fields must be set: %v", controllerRef) + } +} + +func TestGetControllerOf(t *testing.T) { + gvk := schema.GroupVersionKind{ + Group: "group", + Version: "v1", + Kind: "Kind", + } + obj1 := &metaObj{ + ObjectMeta: ObjectMeta{ + UID: "uid1", + Name: "name1", + }, + } + controllerRef := NewControllerRef(obj1, gvk) + var falseRef = false + obj2 := &metaObj{ + ObjectMeta: ObjectMeta{ + UID: "uid2", + Name: "name1", + OwnerReferences: []OwnerReference{ + { + Name: "owner1", + Controller: &falseRef, + }, + *controllerRef, + { + Name: "owner2", + Controller: &falseRef, + }, + }, + }, + } + + if GetControllerOf(obj1) != nil { + t.Error("GetControllerOf must return null") + } + c := GetControllerOf(obj2) + if c.Name != controllerRef.Name || c.UID != controllerRef.UID { + t.Errorf("Incorrect result of GetControllerOf: %v", c) + } +} + +func TestIsControlledBy(t *testing.T) { + gvk := schema.GroupVersionKind{ + Group: "group", + Version: "v1", + Kind: "Kind", + } + obj1 := &metaObj{ + ObjectMeta: ObjectMeta{ + UID: "uid1", + }, + } + obj2 := &metaObj{ + ObjectMeta: ObjectMeta{ + UID: "uid2", + OwnerReferences: []OwnerReference{ + *NewControllerRef(obj1, gvk), + }, + }, + } + obj3 := &metaObj{ + ObjectMeta: ObjectMeta{ + UID: "uid3", + OwnerReferences: []OwnerReference{ + *NewControllerRef(obj2, gvk), + }, + }, + } + if !IsControlledBy(obj2, obj1) || !IsControlledBy(obj3, obj2) { + t.Error("Incorrect IsControlledBy result: false") + } + if IsControlledBy(obj3, obj1) { + t.Error("Incorrect IsControlledBy result: true") + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/doc.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/doc.go index 52273240f..61f201cdf 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/doc.go @@ -19,4 +19,4 @@ limitations under the License. // +k8s:defaulter-gen=TypeMeta // +groupName=meta.k8s.io -package v1 +package v1 // import "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/duration_test.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/duration_test.go new file mode 100644 index 000000000..7230cb28a --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/duration_test.go @@ -0,0 +1,153 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "encoding/json" + "testing" + "time" + + "github.com/ghodss/yaml" +) + +type DurationHolder struct { + D Duration `json:"d"` +} + +func TestDurationMarshalYAML(t *testing.T) { + cases := []struct { + input Duration + result string + }{ + {Duration{5 * time.Second}, "d: 5s\n"}, + {Duration{2 * time.Minute}, "d: 2m0s\n"}, + {Duration{time.Hour + 3*time.Millisecond}, "d: 1h0m0.003s\n"}, + } + + for _, c := range cases { + input := DurationHolder{c.input} + result, err := yaml.Marshal(&input) + if err != nil { + t.Errorf("Failed to marshal input: %q: %v", input, err) + } + if string(result) != c.result { + t.Errorf("Failed to marshal input: %q: expected %q, got %q", input, c.result, string(result)) + } + } +} + +func TestDurationUnmarshalYAML(t *testing.T) { + cases := []struct { + input string + result Duration + }{ + {"d: 0s\n", Duration{}}, + {"d: 5s\n", Duration{5 * time.Second}}, + {"d: 2m0s\n", Duration{2 * time.Minute}}, + {"d: 1h0m0.003s\n", Duration{time.Hour + 3*time.Millisecond}}, + + // Units with zero values can optionally be dropped + {"d: 2m\n", Duration{2 * time.Minute}}, + {"d: 1h0.003s\n", Duration{time.Hour + 3*time.Millisecond}}, + } + + for _, c := range cases { + var result DurationHolder + if err := yaml.Unmarshal([]byte(c.input), &result); err != nil { + t.Errorf("Failed to unmarshal input %q: %v", c.input, err) + } + if result.D != c.result { + t.Errorf("Failed to unmarshal input %q: expected %q, got %q", c.input, c.result, result) + } + } +} + +func TestDurationMarshalJSON(t *testing.T) { + cases := []struct { + input Duration + result string + }{ + {Duration{5 * time.Second}, `{"d":"5s"}`}, + {Duration{2 * time.Minute}, `{"d":"2m0s"}`}, + {Duration{time.Hour + 3*time.Millisecond}, `{"d":"1h0m0.003s"}`}, + } + + for _, c := range cases { + input := DurationHolder{c.input} + result, err := json.Marshal(&input) + if err != nil { + t.Errorf("Failed to marshal input: %q: %v", input, err) + } + if string(result) != c.result { + t.Errorf("Failed to marshal input: %q: expected %q, got %q", input, c.result, string(result)) + } + } +} + +func TestDurationUnmarshalJSON(t *testing.T) { + cases := []struct { + input string + result Duration + }{ + {`{"d":"0s"}`, Duration{}}, + {`{"d":"5s"}`, Duration{5 * time.Second}}, + {`{"d":"2m0s"}`, Duration{2 * time.Minute}}, + {`{"d":"1h0m0.003s"}`, Duration{time.Hour + 3*time.Millisecond}}, + + // Units with zero values can optionally be dropped + {`{"d":"2m"}`, Duration{2 * time.Minute}}, + {`{"d":"1h0.003s"}`, Duration{time.Hour + 3*time.Millisecond}}, + } + + for _, c := range cases { + var result DurationHolder + if err := json.Unmarshal([]byte(c.input), &result); err != nil { + t.Errorf("Failed to unmarshal input %q: %v", c.input, err) + } + if result.D != c.result { + t.Errorf("Failed to unmarshal input %q: expected %q, got %q", c.input, c.result, result) + } + } +} + +func TestDurationMarshalJSONUnmarshalYAML(t *testing.T) { + cases := []struct { + input Duration + }{ + {Duration{}}, + {Duration{5 * time.Second}}, + {Duration{2 * time.Minute}}, + {Duration{time.Hour + 3*time.Millisecond}}, + } + + for i, c := range cases { + input := DurationHolder{c.input} + jsonMarshalled, err := json.Marshal(&input) + if err != nil { + t.Errorf("%d-1: Failed to marshal input: '%v': %v", i, input, err) + } + + var result DurationHolder + if err := yaml.Unmarshal(jsonMarshalled, &result); err != nil { + t.Errorf("%d-2: Failed to unmarshal '%+v': %v", i, string(jsonMarshalled), err) + } + + if input.D != result.D { + t.Errorf("%d-4: Failed to marshal input '%#v': got %#v", i, input, result) + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/group_version_test.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/group_version_test.go new file mode 100644 index 000000000..2217aa293 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/group_version_test.go @@ -0,0 +1,78 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "encoding/json" + "reflect" + "testing" + + jsoniter "github.com/json-iterator/go" +) + +type GroupVersionHolder struct { + GV GroupVersion `json:"val"` +} + +func TestGroupVersionUnmarshalJSON(t *testing.T) { + cases := []struct { + input []byte + expect GroupVersion + }{ + {[]byte(`{"val": "v1"}`), GroupVersion{"", "v1"}}, + {[]byte(`{"val": "extensions/v1beta1"}`), GroupVersion{"extensions", "v1beta1"}}, + } + + for _, c := range cases { + var result GroupVersionHolder + // test golang lib's JSON codec + if err := json.Unmarshal([]byte(c.input), &result); err != nil { + t.Errorf("JSON codec failed to unmarshal input '%v': %v", c.input, err) + } + if !reflect.DeepEqual(result.GV, c.expect) { + t.Errorf("JSON codec failed to unmarshal input '%s': expected %+v, got %+v", c.input, c.expect, result.GV) + } + // test the json-iterator codec + if err := jsoniter.ConfigFastest.Unmarshal(c.input, &result); err != nil { + t.Errorf("json-iterator codec failed to unmarshal input '%v': %v", c.input, err) + } + if !reflect.DeepEqual(result.GV, c.expect) { + t.Errorf("json-iterator codec failed to unmarshal input '%s': expected %+v, got %+v", c.input, c.expect, result.GV) + } + } +} + +func TestGroupVersionMarshalJSON(t *testing.T) { + cases := []struct { + input GroupVersion + expect []byte + }{ + {GroupVersion{"", "v1"}, []byte(`{"val":"v1"}`)}, + {GroupVersion{"extensions", "v1beta1"}, []byte(`{"val":"extensions/v1beta1"}`)}, + } + + for _, c := range cases { + input := GroupVersionHolder{c.input} + result, err := json.Marshal(&input) + if err != nil { + t.Errorf("Failed to marshal input '%v': %v", input, err) + } + if !reflect.DeepEqual(result, c.expect) { + t.Errorf("Failed to marshal input '%+v': expected: %s, got: %s", input, c.expect, result) + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers_test.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers_test.go new file mode 100644 index 000000000..fba6b158e --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers_test.go @@ -0,0 +1,154 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "reflect" + "strings" + "testing" + + "k8s.io/apimachinery/pkg/labels" +) + +func TestLabelSelectorAsSelector(t *testing.T) { + matchLabels := map[string]string{"foo": "bar"} + matchExpressions := []LabelSelectorRequirement{{ + Key: "baz", + Operator: LabelSelectorOpIn, + Values: []string{"qux", "norf"}, + }} + mustParse := func(s string) labels.Selector { + out, e := labels.Parse(s) + if e != nil { + panic(e) + } + return out + } + tc := []struct { + in *LabelSelector + out labels.Selector + expectErr bool + }{ + {in: nil, out: labels.Nothing()}, + {in: &LabelSelector{}, out: labels.Everything()}, + { + in: &LabelSelector{MatchLabels: matchLabels}, + out: mustParse("foo=bar"), + }, + { + in: &LabelSelector{MatchExpressions: matchExpressions}, + out: mustParse("baz in (norf,qux)"), + }, + { + in: &LabelSelector{MatchLabels: matchLabels, MatchExpressions: matchExpressions}, + out: mustParse("baz in (norf,qux),foo=bar"), + }, + { + in: &LabelSelector{ + MatchExpressions: []LabelSelectorRequirement{{ + Key: "baz", + Operator: LabelSelectorOpExists, + Values: []string{"qux", "norf"}, + }}, + }, + expectErr: true, + }, + } + + for i, tc := range tc { + out, err := LabelSelectorAsSelector(tc.in) + if err == nil && tc.expectErr { + t.Errorf("[%v]expected error but got none.", i) + } + if err != nil && !tc.expectErr { + t.Errorf("[%v]did not expect error but got: %v", i, err) + } + if !reflect.DeepEqual(out, tc.out) { + t.Errorf("[%v]expected:\n\t%+v\nbut got:\n\t%+v", i, tc.out, out) + } + } +} + +func TestLabelSelectorAsMap(t *testing.T) { + matchLabels := map[string]string{"foo": "bar"} + matchExpressions := func(operator LabelSelectorOperator, values []string) []LabelSelectorRequirement { + return []LabelSelectorRequirement{{ + Key: "baz", + Operator: operator, + Values: values, + }} + } + + tests := []struct { + in *LabelSelector + out map[string]string + errString string + }{ + {in: nil, out: nil}, + { + in: &LabelSelector{MatchLabels: matchLabels}, + out: map[string]string{"foo": "bar"}, + }, + { + in: &LabelSelector{MatchLabels: matchLabels, MatchExpressions: matchExpressions(LabelSelectorOpIn, []string{"norf"})}, + out: map[string]string{"foo": "bar", "baz": "norf"}, + }, + { + in: &LabelSelector{MatchExpressions: matchExpressions(LabelSelectorOpIn, []string{"norf"})}, + out: map[string]string{"baz": "norf"}, + }, + { + in: &LabelSelector{MatchLabels: matchLabels, MatchExpressions: matchExpressions(LabelSelectorOpIn, []string{"norf", "qux"})}, + out: map[string]string{"foo": "bar"}, + errString: "without a single value cannot be converted", + }, + { + in: &LabelSelector{MatchExpressions: matchExpressions(LabelSelectorOpNotIn, []string{"norf", "qux"})}, + out: map[string]string{}, + errString: "cannot be converted", + }, + { + in: &LabelSelector{MatchLabels: matchLabels, MatchExpressions: matchExpressions(LabelSelectorOpExists, []string{})}, + out: map[string]string{"foo": "bar"}, + errString: "cannot be converted", + }, + { + in: &LabelSelector{MatchExpressions: matchExpressions(LabelSelectorOpDoesNotExist, []string{})}, + out: map[string]string{}, + errString: "cannot be converted", + }, + } + + for i, tc := range tests { + out, err := LabelSelectorAsMap(tc.in) + if err == nil && len(tc.errString) > 0 { + t.Errorf("[%v]expected error but got none.", i) + continue + } + if err != nil && len(tc.errString) == 0 { + t.Errorf("[%v]did not expect error but got: %v", i, err) + continue + } + if err != nil && len(tc.errString) > 0 && !strings.Contains(err.Error(), tc.errString) { + t.Errorf("[%v]expected error with %q but got: %v", i, tc.errString, err) + continue + } + if !reflect.DeepEqual(out, tc.out) { + t.Errorf("[%v]expected:\n\t%+v\nbut got:\n\t%+v", i, tc.out, out) + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/labels_test.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/labels_test.go new file mode 100644 index 000000000..b1bccad40 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/labels_test.go @@ -0,0 +1,120 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "reflect" + "testing" +) + +func TestCloneSelectorAndAddLabel(t *testing.T) { + labels := map[string]string{ + "foo1": "bar1", + "foo2": "bar2", + "foo3": "bar3", + } + + cases := []struct { + labels map[string]string + labelKey string + labelValue string + want map[string]string + }{ + { + labels: labels, + want: labels, + }, + { + labels: labels, + labelKey: "foo4", + labelValue: "89", + want: map[string]string{ + "foo1": "bar1", + "foo2": "bar2", + "foo3": "bar3", + "foo4": "89", + }, + }, + { + labels: nil, + labelKey: "foo4", + labelValue: "12", + want: map[string]string{ + "foo4": "12", + }, + }, + } + + for _, tc := range cases { + ls_in := LabelSelector{MatchLabels: tc.labels} + ls_out := LabelSelector{MatchLabels: tc.want} + + got := CloneSelectorAndAddLabel(&ls_in, tc.labelKey, tc.labelValue) + if !reflect.DeepEqual(got, &ls_out) { + t.Errorf("got %v, want %v", got, tc.want) + } + } +} + +func TestAddLabelToSelector(t *testing.T) { + labels := map[string]string{ + "foo1": "bar1", + "foo2": "bar2", + "foo3": "bar3", + } + + cases := []struct { + labels map[string]string + labelKey string + labelValue string + want map[string]string + }{ + { + labels: labels, + want: labels, + }, + { + labels: labels, + labelKey: "foo4", + labelValue: "89", + want: map[string]string{ + "foo1": "bar1", + "foo2": "bar2", + "foo3": "bar3", + "foo4": "89", + }, + }, + { + labels: nil, + labelKey: "foo4", + labelValue: "12", + want: map[string]string{ + "foo4": "12", + }, + }, + } + + for _, tc := range cases { + ls_in := LabelSelector{MatchLabels: tc.labels} + ls_out := LabelSelector{MatchLabels: tc.want} + + got := AddLabelToSelector(&ls_in, tc.labelKey, tc.labelValue) + if !reflect.DeepEqual(got, &ls_out) { + t.Errorf("got %v, want %v", got, tc.want) + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_test.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_test.go new file mode 100644 index 000000000..339610aeb --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_test.go @@ -0,0 +1,139 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "encoding/json" + "reflect" + "testing" + "time" + + "github.com/ghodss/yaml" +) + +type MicroTimeHolder struct { + T MicroTime `json:"t"` +} + +func TestMicroTimeMarshalYAML(t *testing.T) { + cases := []struct { + input MicroTime + result string + }{ + {MicroTime{}, "t: null\n"}, + {DateMicro(1998, time.May, 5, 1, 5, 5, 50, time.FixedZone("test", -4*60*60)), "t: 1998-05-05T05:05:05.000000Z\n"}, + {DateMicro(1998, time.May, 5, 5, 5, 5, 0, time.UTC), "t: 1998-05-05T05:05:05.000000Z\n"}, + } + + for _, c := range cases { + input := MicroTimeHolder{c.input} + result, err := yaml.Marshal(&input) + if err != nil { + t.Errorf("Failed to marshal input: '%v': %v", input, err) + } + if string(result) != c.result { + t.Errorf("Failed to marshal input: '%v': expected %+v, got %q", input, c.result, string(result)) + } + } +} + +func TestMicroTimeUnmarshalYAML(t *testing.T) { + cases := []struct { + input string + result MicroTime + }{ + {"t: null\n", MicroTime{}}, + {"t: 1998-05-05T05:05:05.000000Z\n", MicroTime{Date(1998, time.May, 5, 5, 5, 5, 0, time.UTC).Local()}}, + } + + for _, c := range cases { + var result MicroTimeHolder + if err := yaml.Unmarshal([]byte(c.input), &result); err != nil { + t.Errorf("Failed to unmarshal input '%v': %v", c.input, err) + } + if result.T != c.result { + t.Errorf("Failed to unmarshal input '%v': expected %+v, got %+v", c.input, c.result, result) + } + } +} + +func TestMicroTimeMarshalJSON(t *testing.T) { + cases := []struct { + input MicroTime + result string + }{ + {MicroTime{}, "{\"t\":null}"}, + {DateMicro(1998, time.May, 5, 5, 5, 5, 50, time.UTC), "{\"t\":\"1998-05-05T05:05:05.000000Z\"}"}, + {DateMicro(1998, time.May, 5, 5, 5, 5, 0, time.UTC), "{\"t\":\"1998-05-05T05:05:05.000000Z\"}"}, + } + + for _, c := range cases { + input := MicroTimeHolder{c.input} + result, err := json.Marshal(&input) + if err != nil { + t.Errorf("Failed to marshal input: '%v': %v", input, err) + } + if string(result) != c.result { + t.Errorf("Failed to marshal input: '%v': expected %+v, got %q", input, c.result, string(result)) + } + } +} + +func TestMicroTimeUnmarshalJSON(t *testing.T) { + cases := []struct { + input string + result MicroTime + }{ + {"{\"t\":null}", MicroTime{}}, + {"{\"t\":\"1998-05-05T05:05:05.000000Z\"}", MicroTime{Date(1998, time.May, 5, 5, 5, 5, 0, time.UTC).Local()}}, + } + + for _, c := range cases { + var result MicroTimeHolder + if err := json.Unmarshal([]byte(c.input), &result); err != nil { + t.Errorf("Failed to unmarshal input '%v': %v", c.input, err) + } + if result.T != c.result { + t.Errorf("Failed to unmarshal input '%v': expected %+v, got %+v", c.input, c.result, result) + } + } +} + +func TestMicroTimeProto(t *testing.T) { + cases := []struct { + input MicroTime + }{ + {MicroTime{}}, + {DateMicro(1998, time.May, 5, 1, 5, 5, 50, time.Local)}, + {DateMicro(1998, time.May, 5, 5, 5, 5, 0, time.Local)}, + } + + for _, c := range cases { + input := c.input + data, err := input.Marshal() + if err != nil { + t.Fatalf("Failed to marshal input: '%v': %v", input, err) + } + time := MicroTime{} + if err := time.Unmarshal(data); err != nil { + t.Fatalf("Failed to unmarshal output: '%v': %v", input, err) + } + if !reflect.DeepEqual(input, time) { + t.Errorf("Marshal->Unmarshal is not idempotent: '%v' vs '%v'", input, time) + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time_test.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time_test.go new file mode 100644 index 000000000..c0fafab9b --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time_test.go @@ -0,0 +1,173 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "encoding/json" + "reflect" + "testing" + "time" + + "github.com/ghodss/yaml" +) + +type TimeHolder struct { + T Time `json:"t"` +} + +func TestTimeMarshalYAML(t *testing.T) { + cases := []struct { + input Time + result string + }{ + {Time{}, "t: null\n"}, + {Date(1998, time.May, 5, 1, 5, 5, 50, time.FixedZone("test", -4*60*60)), "t: 1998-05-05T05:05:05Z\n"}, + {Date(1998, time.May, 5, 5, 5, 5, 0, time.UTC), "t: 1998-05-05T05:05:05Z\n"}, + } + + for _, c := range cases { + input := TimeHolder{c.input} + result, err := yaml.Marshal(&input) + if err != nil { + t.Errorf("Failed to marshal input: '%v': %v", input, err) + } + if string(result) != c.result { + t.Errorf("Failed to marshal input: '%v': expected %+v, got %q", input, c.result, string(result)) + } + } +} + +func TestTimeUnmarshalYAML(t *testing.T) { + cases := []struct { + input string + result Time + }{ + {"t: null\n", Time{}}, + {"t: 1998-05-05T05:05:05Z\n", Time{Date(1998, time.May, 5, 5, 5, 5, 0, time.UTC).Local()}}, + } + + for _, c := range cases { + var result TimeHolder + if err := yaml.Unmarshal([]byte(c.input), &result); err != nil { + t.Errorf("Failed to unmarshal input '%v': %v", c.input, err) + } + if result.T != c.result { + t.Errorf("Failed to unmarshal input '%v': expected %+v, got %+v", c.input, c.result, result) + } + } +} + +func TestTimeMarshalJSON(t *testing.T) { + cases := []struct { + input Time + result string + }{ + {Time{}, "{\"t\":null}"}, + {Date(1998, time.May, 5, 5, 5, 5, 50, time.UTC), "{\"t\":\"1998-05-05T05:05:05Z\"}"}, + {Date(1998, time.May, 5, 5, 5, 5, 0, time.UTC), "{\"t\":\"1998-05-05T05:05:05Z\"}"}, + } + + for _, c := range cases { + input := TimeHolder{c.input} + result, err := json.Marshal(&input) + if err != nil { + t.Errorf("Failed to marshal input: '%v': %v", input, err) + } + if string(result) != c.result { + t.Errorf("Failed to marshal input: '%v': expected %+v, got %q", input, c.result, string(result)) + } + } +} + +func TestTimeUnmarshalJSON(t *testing.T) { + cases := []struct { + input string + result Time + }{ + {"{\"t\":null}", Time{}}, + {"{\"t\":\"1998-05-05T05:05:05Z\"}", Time{Date(1998, time.May, 5, 5, 5, 5, 0, time.UTC).Local()}}, + } + + for _, c := range cases { + var result TimeHolder + if err := json.Unmarshal([]byte(c.input), &result); err != nil { + t.Errorf("Failed to unmarshal input '%v': %v", c.input, err) + } + if result.T != c.result { + t.Errorf("Failed to unmarshal input '%v': expected %+v, got %+v", c.input, c.result, result) + } + } +} + +func TestTimeMarshalJSONUnmarshalYAML(t *testing.T) { + cases := []struct { + input Time + }{ + {Time{}}, + {Date(1998, time.May, 5, 5, 5, 5, 50, time.Local).Rfc3339Copy()}, + {Date(1998, time.May, 5, 5, 5, 5, 0, time.Local).Rfc3339Copy()}, + } + + for i, c := range cases { + input := TimeHolder{c.input} + jsonMarshalled, err := json.Marshal(&input) + if err != nil { + t.Errorf("%d-1: Failed to marshal input: '%v': %v", i, input, err) + } + + var result TimeHolder + err = yaml.Unmarshal(jsonMarshalled, &result) + if err != nil { + t.Errorf("%d-2: Failed to unmarshal '%+v': %v", i, string(jsonMarshalled), err) + } + + iN, iO := input.T.Zone() + oN, oO := result.T.Zone() + if iN != oN || iO != oO { + t.Errorf("%d-3: Time zones differ before and after serialization %s:%d %s:%d", i, iN, iO, oN, oO) + } + + if input.T.UnixNano() != result.T.UnixNano() { + t.Errorf("%d-4: Failed to marshal input '%#v': got %#v", i, input, result) + } + } +} + +func TestTimeProto(t *testing.T) { + cases := []struct { + input Time + }{ + {Time{}}, + {Date(1998, time.May, 5, 1, 5, 5, 0, time.Local)}, + {Date(1998, time.May, 5, 5, 5, 5, 0, time.Local)}, + } + + for _, c := range cases { + input := c.input + data, err := input.Marshal() + if err != nil { + t.Fatalf("Failed to marshal input: '%v': %v", input, err) + } + time := Time{} + if err := time.Unmarshal(data); err != nil { + t.Fatalf("Failed to unmarshal output: '%v': %v", input, err) + } + if !reflect.DeepEqual(input, time) { + t.Errorf("Marshal->Unmarshal is not idempotent: '%v' vs '%v'", input, time) + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_test.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_test.go new file mode 100644 index 000000000..21aa9560e --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_test.go @@ -0,0 +1,134 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "encoding/json" + "reflect" + "testing" + + jsoniter "github.com/json-iterator/go" +) + +func TestVerbsUgorjiMarshalJSON(t *testing.T) { + cases := []struct { + input APIResource + result string + }{ + {APIResource{}, `{"name":"","singularName":"","namespaced":false,"kind":"","verbs":null}`}, + {APIResource{Verbs: Verbs([]string{})}, `{"name":"","singularName":"","namespaced":false,"kind":"","verbs":[]}`}, + {APIResource{Verbs: Verbs([]string{"delete"})}, `{"name":"","singularName":"","namespaced":false,"kind":"","verbs":["delete"]}`}, + } + + for i, c := range cases { + result, err := json.Marshal(&c.input) + if err != nil { + t.Errorf("[%d] Failed to marshal input: '%v': %v", i, c.input, err) + } + if string(result) != c.result { + t.Errorf("[%d] Failed to marshal input: '%v': expected '%v', got '%v'", i, c.input, c.result, string(result)) + } + } +} + +func TestVerbsUgorjiUnmarshalJSON(t *testing.T) { + cases := []struct { + input string + result APIResource + }{ + {`{}`, APIResource{}}, + {`{"verbs":null}`, APIResource{}}, + {`{"verbs":[]}`, APIResource{Verbs: Verbs([]string{})}}, + {`{"verbs":["delete"]}`, APIResource{Verbs: Verbs([]string{"delete"})}}, + } + + for i, c := range cases { + var result APIResource + if err := jsoniter.ConfigFastest.Unmarshal([]byte(c.input), &result); err != nil { + t.Errorf("[%d] Failed to unmarshal input '%v': %v", i, c.input, err) + } + if !reflect.DeepEqual(result, c.result) { + t.Errorf("[%d] Failed to unmarshal input '%v': expected %+v, got %+v", i, c.input, c.result, result) + } + } +} + +// TestUgorjiMarshalJSONWithOmit tests that we don't have regressions regarding nil and empty slices with "omit" +func TestUgorjiMarshalJSONWithOmit(t *testing.T) { + cases := []struct { + input LabelSelector + result string + }{ + {LabelSelector{}, `{}`}, + {LabelSelector{MatchExpressions: []LabelSelectorRequirement{}}, `{}`}, + {LabelSelector{MatchExpressions: []LabelSelectorRequirement{{}}}, `{"matchExpressions":[{"key":"","operator":""}]}`}, + } + + for i, c := range cases { + result, err := json.Marshal(&c.input) + if err != nil { + t.Errorf("[%d] Failed to marshal input: '%v': %v", i, c.input, err) + } + if string(result) != c.result { + t.Errorf("[%d] Failed to marshal input: '%v': expected '%v', got '%v'", i, c.input, c.result, string(result)) + } + } +} + +func TestVerbsUnmarshalJSON(t *testing.T) { + cases := []struct { + input string + result APIResource + }{ + {`{}`, APIResource{}}, + {`{"verbs":null}`, APIResource{}}, + {`{"verbs":[]}`, APIResource{Verbs: Verbs([]string{})}}, + {`{"verbs":["delete"]}`, APIResource{Verbs: Verbs([]string{"delete"})}}, + } + + for i, c := range cases { + var result APIResource + if err := json.Unmarshal([]byte(c.input), &result); err != nil { + t.Errorf("[%d] Failed to unmarshal input '%v': %v", i, c.input, err) + } + if !reflect.DeepEqual(result, c.result) { + t.Errorf("[%d] Failed to unmarshal input '%v': expected %+v, got %+v", i, c.input, c.result, result) + } + } +} + +func TestVerbsProto(t *testing.T) { + cases := []APIResource{ + {}, + {Verbs: Verbs([]string{})}, + {Verbs: Verbs([]string{"delete"})}, + } + + for _, input := range cases { + data, err := input.Marshal() + if err != nil { + t.Fatalf("Failed to marshal input: '%v': %v", input, err) + } + resource := APIResource{} + if err := resource.Unmarshal(data); err != nil { + t.Fatalf("Failed to unmarshal output: '%v': %v", input, err) + } + if !reflect.DeepEqual(input, resource) { + t.Errorf("Marshal->Unmarshal is not idempotent: '%v' vs '%v'", input, resource) + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_test.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_test.go new file mode 100644 index 000000000..51fc089a7 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_test.go @@ -0,0 +1,60 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package unstructured + +import ( + "io/ioutil" + "sync" + "testing" + + "github.com/stretchr/testify/assert" +) + +// TestCodecOfUnstructuredList tests that there are no data races in Encode(). +// i.e. that it does not mutate the object being encoded. +func TestCodecOfUnstructuredList(t *testing.T) { + var wg sync.WaitGroup + concurrency := 10 + list := UnstructuredList{ + Object: map[string]interface{}{}, + } + wg.Add(concurrency) + for i := 0; i < concurrency; i++ { + go func() { + defer wg.Done() + assert.NoError(t, UnstructuredJSONScheme.Encode(&list, ioutil.Discard)) + }() + } + wg.Wait() +} + +func TestUnstructuredList(t *testing.T) { + list := &UnstructuredList{ + Object: map[string]interface{}{"kind": "List", "apiVersion": "v1"}, + Items: []Unstructured{ + {Object: map[string]interface{}{"kind": "Pod", "apiVersion": "v1", "metadata": map[string]interface{}{"name": "test"}}}, + }, + } + content := list.UnstructuredContent() + items := content["items"].([]interface{}) + if len(items) != 1 { + t.Fatalf("unexpected items: %#v", items) + } + if getNestedField(items[0].(map[string]interface{}), "metadata", "name") != "test" { + t.Fatalf("unexpected fields: %#v", items[0]) + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation_test.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation_test.go new file mode 100644 index 000000000..9766fa7e7 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation_test.go @@ -0,0 +1,94 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package validation + +import ( + "strings" + "testing" + + "k8s.io/apimachinery/pkg/util/validation/field" +) + +func TestValidateLabels(t *testing.T) { + successCases := []map[string]string{ + {"simple": "bar"}, + {"now-with-dashes": "bar"}, + {"1-starts-with-num": "bar"}, + {"1234": "bar"}, + {"simple/simple": "bar"}, + {"now-with-dashes/simple": "bar"}, + {"now-with-dashes/now-with-dashes": "bar"}, + {"now.with.dots/simple": "bar"}, + {"now-with.dashes-and.dots/simple": "bar"}, + {"1-num.2-num/3-num": "bar"}, + {"1234/5678": "bar"}, + {"1.2.3.4/5678": "bar"}, + {"UpperCaseAreOK123": "bar"}, + {"goodvalue": "123_-.BaR"}, + } + for i := range successCases { + errs := ValidateLabels(successCases[i], field.NewPath("field")) + if len(errs) != 0 { + t.Errorf("case[%d] expected success, got %#v", i, errs) + } + } + + namePartErrMsg := "name part must consist of" + nameErrMsg := "a qualified name must consist of" + labelErrMsg := "a valid label must be an empty string or consist of" + maxLengthErrMsg := "must be no more than" + + labelNameErrorCases := []struct { + labels map[string]string + expect string + }{ + {map[string]string{"nospecialchars^=@": "bar"}, namePartErrMsg}, + {map[string]string{"cantendwithadash-": "bar"}, namePartErrMsg}, + {map[string]string{"only/one/slash": "bar"}, nameErrMsg}, + {map[string]string{strings.Repeat("a", 254): "bar"}, maxLengthErrMsg}, + } + for i := range labelNameErrorCases { + errs := ValidateLabels(labelNameErrorCases[i].labels, field.NewPath("field")) + if len(errs) != 1 { + t.Errorf("case[%d]: expected failure", i) + } else { + if !strings.Contains(errs[0].Detail, labelNameErrorCases[i].expect) { + t.Errorf("case[%d]: error details do not include %q: %q", i, labelNameErrorCases[i].expect, errs[0].Detail) + } + } + } + + labelValueErrorCases := []struct { + labels map[string]string + expect string + }{ + {map[string]string{"toolongvalue": strings.Repeat("a", 64)}, maxLengthErrMsg}, + {map[string]string{"backslashesinvalue": "some\\bad\\value"}, labelErrMsg}, + {map[string]string{"nocommasallowed": "bad,value"}, labelErrMsg}, + {map[string]string{"strangecharsinvalue": "?#$notsogood"}, labelErrMsg}, + } + for i := range labelValueErrorCases { + errs := ValidateLabels(labelValueErrorCases[i].labels, field.NewPath("field")) + if len(errs) != 1 { + t.Errorf("case[%d]: expected failure", i) + } else { + if !strings.Contains(errs[0].Detail, labelValueErrorCases[i].expect) { + t.Errorf("case[%d]: error details do not include %q: %q", i, labelValueErrorCases[i].expect, errs[0].Detail) + } + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/conversion/converter_test.go b/vendor/k8s.io/apimachinery/pkg/conversion/converter_test.go new file mode 100644 index 000000000..57f51c253 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/conversion/converter_test.go @@ -0,0 +1,826 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package conversion + +import ( + "fmt" + "reflect" + "strconv" + "strings" + "testing" + + "github.com/google/gofuzz" + flag "github.com/spf13/pflag" + + "k8s.io/apimachinery/pkg/util/diff" +) + +var fuzzIters = flag.Int("fuzz-iters", 50, "How many fuzzing iterations to do.") + +// Test a weird version/kind embedding format. +type MyWeirdCustomEmbeddedVersionKindField struct { + ID string `json:"ID,omitempty"` + APIVersion string `json:"myVersionKey,omitempty"` + ObjectKind string `json:"myKindKey,omitempty"` + Z string `json:"Z,omitempty"` + Y uint64 `json:"Y,omitempty"` +} + +type TestType1 struct { + MyWeirdCustomEmbeddedVersionKindField `json:",inline"` + A string `json:"A,omitempty"` + B int `json:"B,omitempty"` + C int8 `json:"C,omitempty"` + D int16 `json:"D,omitempty"` + E int32 `json:"E,omitempty"` + F int64 `json:"F,omitempty"` + G uint `json:"G,omitempty"` + H uint8 `json:"H,omitempty"` + I uint16 `json:"I,omitempty"` + J uint32 `json:"J,omitempty"` + K uint64 `json:"K,omitempty"` + L bool `json:"L,omitempty"` + M map[string]int `json:"M,omitempty"` + N map[string]TestType2 `json:"N,omitempty"` + O *TestType2 `json:"O,omitempty"` + P []TestType2 `json:"Q,omitempty"` +} + +type TestType2 struct { + A string `json:"A,omitempty"` + B int `json:"B,omitempty"` +} + +type ExternalTestType2 struct { + A string `json:"A,omitempty"` + B int `json:"B,omitempty"` +} +type ExternalTestType1 struct { + MyWeirdCustomEmbeddedVersionKindField `json:",inline"` + A string `json:"A,omitempty"` + B int `json:"B,omitempty"` + C int8 `json:"C,omitempty"` + D int16 `json:"D,omitempty"` + E int32 `json:"E,omitempty"` + F int64 `json:"F,omitempty"` + G uint `json:"G,omitempty"` + H uint8 `json:"H,omitempty"` + I uint16 `json:"I,omitempty"` + J uint32 `json:"J,omitempty"` + K uint64 `json:"K,omitempty"` + L bool `json:"L,omitempty"` + M map[string]int `json:"M,omitempty"` + N map[string]ExternalTestType2 `json:"N,omitempty"` + O *ExternalTestType2 `json:"O,omitempty"` + P []ExternalTestType2 `json:"Q,omitempty"` +} + +func testLogger(t *testing.T) DebugLogger { + // We don't set logger to eliminate rubbish logs in tests. + // If you want to switch it, simply switch it to: "return t" + return nil +} + +func TestConverter_byteSlice(t *testing.T) { + c := NewConverter(DefaultNameFunc) + src := []byte{1, 2, 3} + dest := []byte{} + err := c.Convert(&src, &dest, 0, nil) + if err != nil { + t.Fatalf("expected no error") + } + if e, a := src, dest; !reflect.DeepEqual(e, a) { + t.Errorf("expected %#v, got %#v", e, a) + } +} + +func TestConverter_MismatchedTypes(t *testing.T) { + c := NewConverter(DefaultNameFunc) + + err := c.RegisterConversionFunc( + func(in *[]string, out *int, s Scope) error { + if str, err := strconv.Atoi((*in)[0]); err != nil { + return err + } else { + *out = str + return nil + } + }, + ) + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + + src := []string{"5"} + var dest *int + err = c.Convert(&src, &dest, 0, nil) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if e, a := 5, *dest; e != a { + t.Errorf("expected %#v, got %#v", e, a) + } +} + +func TestConverter_DefaultConvert(t *testing.T) { + type A struct { + Foo string + Baz int + } + type B struct { + Bar string + Baz int + } + c := NewConverter(DefaultNameFunc) + c.Debug = testLogger(t) + c.nameFunc = func(t reflect.Type) string { return "MyType" } + + // Ensure conversion funcs can call DefaultConvert to get default behavior, + // then fixup remaining fields manually + err := c.RegisterConversionFunc(func(in *A, out *B, s Scope) error { + if err := s.DefaultConvert(in, out, IgnoreMissingFields); err != nil { + return err + } + out.Bar = in.Foo + return nil + }) + if err != nil { + t.Fatalf("unexpected error %v", err) + } + + x := A{"hello, intrepid test reader!", 3} + y := B{} + + err = c.Convert(&x, &y, 0, nil) + if err != nil { + t.Fatalf("unexpected error %v", err) + } + if e, a := x.Foo, y.Bar; e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := x.Baz, y.Baz; e != a { + t.Errorf("expected %v, got %v", e, a) + } +} + +func TestConverter_DeepCopy(t *testing.T) { + type A struct { + Foo *string + Bar []string + Baz interface{} + Qux map[string]string + } + c := NewConverter(DefaultNameFunc) + c.Debug = testLogger(t) + + foo, baz := "foo", "baz" + x := A{ + Foo: &foo, + Bar: []string{"bar"}, + Baz: &baz, + Qux: map[string]string{"qux": "qux"}, + } + y := A{} + + if err := c.Convert(&x, &y, 0, nil); err != nil { + t.Fatalf("unexpected error %v", err) + } + *x.Foo = "foo2" + x.Bar[0] = "bar2" + *x.Baz.(*string) = "baz2" + x.Qux["qux"] = "qux2" + if e, a := *x.Foo, *y.Foo; e == a { + t.Errorf("expected difference between %v and %v", e, a) + } + if e, a := x.Bar, y.Bar; reflect.DeepEqual(e, a) { + t.Errorf("expected difference between %v and %v", e, a) + } + if e, a := *x.Baz.(*string), *y.Baz.(*string); e == a { + t.Errorf("expected difference between %v and %v", e, a) + } + if e, a := x.Qux, y.Qux; reflect.DeepEqual(e, a) { + t.Errorf("expected difference between %v and %v", e, a) + } +} + +func TestConverter_CallsRegisteredFunctions(t *testing.T) { + type A struct { + Foo string + Baz int + } + type B struct { + Bar string + Baz int + } + type C struct{} + c := NewConverter(DefaultNameFunc) + c.Debug = testLogger(t) + err := c.RegisterConversionFunc(func(in *A, out *B, s Scope) error { + out.Bar = in.Foo + return s.Convert(&in.Baz, &out.Baz, 0) + }) + if err != nil { + t.Fatalf("unexpected error %v", err) + } + err = c.RegisterConversionFunc(func(in *B, out *A, s Scope) error { + out.Foo = in.Bar + return s.Convert(&in.Baz, &out.Baz, 0) + }) + if err != nil { + t.Fatalf("unexpected error %v", err) + } + + x := A{"hello, intrepid test reader!", 3} + y := B{} + + err = c.Convert(&x, &y, 0, nil) + if err != nil { + t.Fatalf("unexpected error %v", err) + } + if e, a := x.Foo, y.Bar; e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := x.Baz, y.Baz; e != a { + t.Errorf("expected %v, got %v", e, a) + } + + z := B{"all your test are belong to us", 42} + w := A{} + + err = c.Convert(&z, &w, 0, nil) + if err != nil { + t.Fatalf("unexpected error %v", err) + } + if e, a := z.Bar, w.Foo; e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := z.Baz, w.Baz; e != a { + t.Errorf("expected %v, got %v", e, a) + } + + err = c.RegisterConversionFunc(func(in *A, out *C, s Scope) error { + return fmt.Errorf("C can't store an A, silly") + }) + if err != nil { + t.Fatalf("unexpected error %v", err) + } + err = c.Convert(&A{}, &C{}, 0, nil) + if err == nil { + t.Errorf("unexpected non-error") + } +} + +func TestConverter_IgnoredConversion(t *testing.T) { + type A struct{} + type B struct{} + + count := 0 + c := NewConverter(DefaultNameFunc) + if err := c.RegisterConversionFunc(func(in *A, out *B, s Scope) error { + count++ + return nil + }); err != nil { + t.Fatalf("unexpected error %v", err) + } + if err := c.RegisterIgnoredConversion(&A{}, &B{}); err != nil { + t.Fatal(err) + } + a := A{} + b := B{} + if err := c.Convert(&a, &b, 0, nil); err != nil { + t.Errorf("%v", err) + } + if count != 0 { + t.Errorf("unexpected number of conversion invocations") + } +} + +func TestConverter_IgnoredConversionNested(t *testing.T) { + type C string + type A struct { + C C + } + type B struct { + C C + } + + c := NewConverter(DefaultNameFunc) + typed := C("") + if err := c.RegisterIgnoredConversion(&typed, &typed); err != nil { + t.Fatal(err) + } + a := A{C: C("test")} + b := B{C: C("other")} + if err := c.Convert(&a, &b, AllowDifferentFieldTypeNames, nil); err != nil { + t.Errorf("%v", err) + } + if b.C != C("other") { + t.Errorf("expected no conversion of field C: %#v", b) + } +} + +func TestConverter_GeneratedConversionOverriden(t *testing.T) { + type A struct{} + type B struct{} + c := NewConverter(DefaultNameFunc) + if err := c.RegisterConversionFunc(func(in *A, out *B, s Scope) error { + return nil + }); err != nil { + t.Fatalf("unexpected error %v", err) + } + if err := c.RegisterGeneratedConversionFunc(func(in *A, out *B, s Scope) error { + return fmt.Errorf("generated function should be overriden") + }); err != nil { + t.Fatalf("unexpected error %v", err) + } + + a := A{} + b := B{} + if err := c.Convert(&a, &b, 0, nil); err != nil { + t.Errorf("%v", err) + } +} + +func TestConverter_WithConversionOverriden(t *testing.T) { + type A struct{} + type B struct{} + c := NewConverter(DefaultNameFunc) + if err := c.RegisterConversionFunc(func(in *A, out *B, s Scope) error { + return fmt.Errorf("conversion function should be overriden") + }); err != nil { + t.Fatalf("unexpected error %v", err) + } + if err := c.RegisterGeneratedConversionFunc(func(in *A, out *B, s Scope) error { + return fmt.Errorf("generated function should be overriden") + }); err != nil { + t.Fatalf("unexpected error %v", err) + } + + ext := NewConversionFuncs() + ext.Add(func(in *A, out *B, s Scope) error { + return nil + }) + newc := c.WithConversions(ext) + + a := A{} + b := B{} + if err := c.Convert(&a, &b, 0, nil); err == nil || err.Error() != "conversion function should be overriden" { + t.Errorf("unexpected error: %v", err) + } + if err := newc.Convert(&a, &b, 0, nil); err != nil { + t.Errorf("%v", err) + } +} + +func TestConverter_MapsStringArrays(t *testing.T) { + type A struct { + Foo string + Baz int + Other string + } + c := NewConverter(DefaultNameFunc) + c.Debug = testLogger(t) + if err := c.RegisterConversionFunc(func(input *[]string, out *string, s Scope) error { + if len(*input) == 0 { + *out = "" + } + *out = (*input)[0] + return nil + }); err != nil { + t.Fatalf("unexpected error %v", err) + } + + x := map[string][]string{ + "Foo": {"bar"}, + "Baz": {"1"}, + "Other": {"", "test"}, + "other": {"wrong"}, + } + y := A{"test", 2, "something"} + + if err := c.Convert(&x, &y, AllowDifferentFieldTypeNames, nil); err == nil { + t.Error("unexpected non-error") + } + + if err := c.RegisterConversionFunc(func(input *[]string, out *int, s Scope) error { + if len(*input) == 0 { + *out = 0 + } + str := (*input)[0] + i, err := strconv.Atoi(str) + if err != nil { + return err + } + *out = i + return nil + }); err != nil { + t.Fatalf("unexpected error %v", err) + } + + if err := c.Convert(&x, &y, AllowDifferentFieldTypeNames, nil); err != nil { + t.Fatalf("unexpected error %v", err) + } + if !reflect.DeepEqual(y, A{"bar", 1, ""}) { + t.Errorf("unexpected result: %#v", y) + } +} + +func TestConverter_MapsStringArraysWithMappingKey(t *testing.T) { + type A struct { + Foo string `json:"test"` + Baz int + Other string + } + c := NewConverter(DefaultNameFunc) + c.Debug = testLogger(t) + if err := c.RegisterConversionFunc(func(input *[]string, out *string, s Scope) error { + if len(*input) == 0 { + *out = "" + } + *out = (*input)[0] + return nil + }); err != nil { + t.Fatalf("unexpected error %v", err) + } + + x := map[string][]string{ + "Foo": {"bar"}, + "test": {"baz"}, + } + y := A{"", 0, ""} + + if err := c.Convert(&x, &y, AllowDifferentFieldTypeNames|IgnoreMissingFields, &Meta{}); err != nil { + t.Fatalf("unexpected error %v", err) + } + if !reflect.DeepEqual(y, A{"bar", 0, ""}) { + t.Errorf("unexpected result: %#v", y) + } + + mapping := func(key string, sourceTag, destTag reflect.StructTag) (source string, dest string) { + if s := destTag.Get("json"); len(s) > 0 { + return strings.SplitN(s, ",", 2)[0], key + } + return key, key + } + + if err := c.Convert(&x, &y, AllowDifferentFieldTypeNames|IgnoreMissingFields, &Meta{KeyNameMapping: mapping}); err != nil { + t.Fatalf("unexpected error %v", err) + } + if !reflect.DeepEqual(y, A{"baz", 0, ""}) { + t.Errorf("unexpected result: %#v", y) + } +} + +func TestConverter_fuzz(t *testing.T) { + // Use the same types from the scheme test. + table := []struct { + from, to, check interface{} + }{ + {&TestType1{}, &ExternalTestType1{}, &TestType1{}}, + {&ExternalTestType1{}, &TestType1{}, &ExternalTestType1{}}, + } + + f := fuzz.New().NilChance(.5).NumElements(0, 100) + c := NewConverter(DefaultNameFunc) + c.nameFunc = func(t reflect.Type) string { + // Hide the fact that we don't have separate packages for these things. + return map[reflect.Type]string{ + reflect.TypeOf(TestType1{}): "TestType1", + reflect.TypeOf(ExternalTestType1{}): "TestType1", + reflect.TypeOf(TestType2{}): "TestType2", + reflect.TypeOf(ExternalTestType2{}): "TestType2", + }[t] + } + c.Debug = testLogger(t) + + for i, item := range table { + for j := 0; j < *fuzzIters; j++ { + f.Fuzz(item.from) + err := c.Convert(item.from, item.to, 0, nil) + if err != nil { + t.Errorf("(%v, %v): unexpected error: %v", i, j, err) + continue + } + err = c.Convert(item.to, item.check, 0, nil) + if err != nil { + t.Errorf("(%v, %v): unexpected error: %v", i, j, err) + continue + } + if e, a := item.from, item.check; !reflect.DeepEqual(e, a) { + t.Errorf("(%v, %v): unexpected diff: %v", i, j, diff.ObjectDiff(e, a)) + } + } + } +} + +func TestConverter_MapElemAddr(t *testing.T) { + type Foo struct { + A map[int]int + } + type Bar struct { + A map[string]string + } + c := NewConverter(DefaultNameFunc) + c.Debug = testLogger(t) + err := c.RegisterConversionFunc( + func(in *int, out *string, s Scope) error { + *out = fmt.Sprintf("%v", *in) + return nil + }, + ) + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + err = c.RegisterConversionFunc( + func(in *string, out *int, s Scope) error { + if str, err := strconv.Atoi(*in); err != nil { + return err + } else { + *out = str + return nil + } + }, + ) + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + f := fuzz.New().NilChance(0).NumElements(3, 3) + first := Foo{} + second := Bar{} + f.Fuzz(&first) + err = c.Convert(&first, &second, AllowDifferentFieldTypeNames, nil) + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + third := Foo{} + err = c.Convert(&second, &third, AllowDifferentFieldTypeNames, nil) + if e, a := first, third; !reflect.DeepEqual(e, a) { + t.Errorf("Unexpected diff: %v", diff.ObjectDiff(e, a)) + } +} + +func TestConverter_tags(t *testing.T) { + type Foo struct { + A string `test:"foo"` + } + type Bar struct { + A string `test:"bar"` + } + c := NewConverter(DefaultNameFunc) + c.Debug = testLogger(t) + err := c.RegisterConversionFunc( + func(in *string, out *string, s Scope) error { + if e, a := "foo", s.SrcTag().Get("test"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := "bar", s.DestTag().Get("test"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + return nil + }, + ) + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + err = c.Convert(&Foo{}, &Bar{}, AllowDifferentFieldTypeNames, nil) + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } +} + +func TestConverter_meta(t *testing.T) { + type Foo struct{ A string } + type Bar struct{ A string } + c := NewConverter(DefaultNameFunc) + c.Debug = testLogger(t) + checks := 0 + err := c.RegisterConversionFunc( + func(in *Foo, out *Bar, s Scope) error { + if s.Meta() == nil { + t.Errorf("Meta did not get passed!") + } + checks++ + s.Convert(&in.A, &out.A, 0) + return nil + }, + ) + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + err = c.RegisterConversionFunc( + func(in *string, out *string, s Scope) error { + if s.Meta() == nil { + t.Errorf("Meta did not get passed a second time!") + } + checks++ + return nil + }, + ) + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + err = c.Convert(&Foo{}, &Bar{}, 0, &Meta{}) + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + if checks != 2 { + t.Errorf("Registered functions did not get called.") + } +} + +func TestConverter_flags(t *testing.T) { + type Foo struct{ A string } + type Bar struct{ A string } + table := []struct { + from, to interface{} + flags FieldMatchingFlags + shouldSucceed bool + }{ + // Check that DestFromSource allows extra fields only in source. + { + from: &struct{ A string }{}, + to: &struct{ A, B string }{}, + flags: DestFromSource, + shouldSucceed: false, + }, { + from: &struct{ A, B string }{}, + to: &struct{ A string }{}, + flags: DestFromSource, + shouldSucceed: true, + }, + + // Check that SourceToDest allows for extra fields only in dest. + { + from: &struct{ A string }{}, + to: &struct{ A, B string }{}, + flags: SourceToDest, + shouldSucceed: true, + }, { + from: &struct{ A, B string }{}, + to: &struct{ A string }{}, + flags: SourceToDest, + shouldSucceed: false, + }, + + // Check that IgnoreMissingFields makes the above failure cases pass. + { + from: &struct{ A string }{}, + to: &struct{ A, B string }{}, + flags: DestFromSource | IgnoreMissingFields, + shouldSucceed: true, + }, { + from: &struct{ A, B string }{}, + to: &struct{ A string }{}, + flags: SourceToDest | IgnoreMissingFields, + shouldSucceed: true, + }, + + // Check that the field type name must match unless + // AllowDifferentFieldTypeNames is specified. + { + from: &struct{ A, B Foo }{}, + to: &struct{ A Bar }{}, + flags: DestFromSource, + shouldSucceed: false, + }, { + from: &struct{ A Foo }{}, + to: &struct{ A, B Bar }{}, + flags: SourceToDest, + shouldSucceed: false, + }, { + from: &struct{ A, B Foo }{}, + to: &struct{ A Bar }{}, + flags: DestFromSource | AllowDifferentFieldTypeNames, + shouldSucceed: true, + }, { + from: &struct{ A Foo }{}, + to: &struct{ A, B Bar }{}, + flags: SourceToDest | AllowDifferentFieldTypeNames, + shouldSucceed: true, + }, + } + f := fuzz.New().NilChance(.5).NumElements(0, 100) + c := NewConverter(DefaultNameFunc) + c.Debug = testLogger(t) + + for i, item := range table { + for j := 0; j < *fuzzIters; j++ { + f.Fuzz(item.from) + err := c.Convert(item.from, item.to, item.flags, nil) + if item.shouldSucceed && err != nil { + t.Errorf("(%v, %v): unexpected error: %v", i, j, err) + continue + } + if !item.shouldSucceed && err == nil { + t.Errorf("(%v, %v): unexpected non-error", i, j) + continue + } + } + } +} + +func TestConverter_FieldRename(t *testing.T) { + type WeirdMeta struct { + Name string + Type string + } + type NameMeta struct { + Name string + } + type TypeMeta struct { + Type string + } + type A struct { + WeirdMeta + } + type B struct { + TypeMeta + NameMeta + } + + c := NewConverter(DefaultNameFunc) + err := c.SetStructFieldCopy(WeirdMeta{}, "WeirdMeta", TypeMeta{}, "TypeMeta") + if err != nil { + t.Fatalf("unexpected error %v", err) + } + err = c.SetStructFieldCopy(WeirdMeta{}, "WeirdMeta", NameMeta{}, "NameMeta") + if err != nil { + t.Fatalf("unexpected error %v", err) + } + err = c.SetStructFieldCopy(TypeMeta{}, "TypeMeta", WeirdMeta{}, "WeirdMeta") + if err != nil { + t.Fatalf("unexpected error %v", err) + } + err = c.SetStructFieldCopy(NameMeta{}, "NameMeta", WeirdMeta{}, "WeirdMeta") + if err != nil { + t.Fatalf("unexpected error %v", err) + } + c.Debug = testLogger(t) + + aVal := &A{ + WeirdMeta: WeirdMeta{ + Name: "Foo", + Type: "Bar", + }, + } + + bVal := &B{ + TypeMeta: TypeMeta{"Bar"}, + NameMeta: NameMeta{"Foo"}, + } + + table := map[string]struct { + from, to, expect interface{} + flags FieldMatchingFlags + }{ + "to": { + aVal, + &B{}, + bVal, + AllowDifferentFieldTypeNames | SourceToDest | IgnoreMissingFields, + }, + "from": { + bVal, + &A{}, + aVal, + AllowDifferentFieldTypeNames | SourceToDest, + }, + "toDestFirst": { + aVal, + &B{}, + bVal, + AllowDifferentFieldTypeNames, + }, + "fromDestFirst": { + bVal, + &A{}, + aVal, + AllowDifferentFieldTypeNames | IgnoreMissingFields, + }, + } + + for name, item := range table { + err := c.Convert(item.from, item.to, item.flags, nil) + if err != nil { + t.Errorf("%v: unexpected error: %v", name, err) + continue + } + if e, a := item.expect, item.to; !reflect.DeepEqual(e, a) { + t.Errorf("%v: unexpected diff: %v", name, diff.ObjectDiff(e, a)) + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/conversion/deep_copy_test.go b/vendor/k8s.io/apimachinery/pkg/conversion/deep_copy_test.go new file mode 100644 index 000000000..fdef856f2 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/conversion/deep_copy_test.go @@ -0,0 +1,161 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package conversion + +import ( + "math/rand" + "reflect" + "testing" + + "github.com/google/gofuzz" +) + +func TestDeepCopy(t *testing.T) { + semantic := EqualitiesOrDie() + f := fuzz.New().NilChance(.5).NumElements(0, 100) + table := []interface{}{ + map[string]string{}, + int(5), + "hello world", + struct { + A, B, C struct { + D map[string]int + } + X []int + Y []byte + }{}, + } + for _, obj := range table { + obj2, err := NewCloner().DeepCopy(obj) + if err != nil { + t.Errorf("Error: couldn't copy %#v", obj) + continue + } + if e, a := obj, obj2; !semantic.DeepEqual(e, a) { + t.Errorf("expected %#v\ngot %#v", e, a) + } + + obj3 := reflect.New(reflect.TypeOf(obj)).Interface() + f.Fuzz(obj3) + obj4, err := NewCloner().DeepCopy(obj3) + if err != nil { + t.Errorf("Error: couldn't copy %#v", obj) + continue + } + if e, a := obj3, obj4; !semantic.DeepEqual(e, a) { + t.Errorf("expected %#v\ngot %#v", e, a) + } + f.Fuzz(obj3) + } +} + +func copyOrDie(t *testing.T, in interface{}) interface{} { + out, err := NewCloner().DeepCopy(in) + if err != nil { + t.Fatalf("DeepCopy failed: %#q: %v", in, err) + } + return out +} + +func TestDeepCopySliceSeparate(t *testing.T) { + x := []int{5} + y := copyOrDie(t, x).([]int) + x[0] = 3 + if y[0] == 3 { + t.Errorf("deep copy wasn't deep: %#q %#q", x, y) + } +} + +func TestDeepCopyArraySeparate(t *testing.T) { + x := [1]int{5} + y := copyOrDie(t, x).([1]int) + x[0] = 3 + if y[0] == 3 { + t.Errorf("deep copy wasn't deep: %#q %#q", x, y) + } +} + +func TestDeepCopyMapSeparate(t *testing.T) { + x := map[string]int{"foo": 5} + y := copyOrDie(t, x).(map[string]int) + x["foo"] = 3 + if y["foo"] == 3 { + t.Errorf("deep copy wasn't deep: %#q %#q", x, y) + } +} + +func TestDeepCopyPointerSeparate(t *testing.T) { + z := 5 + x := &z + y := copyOrDie(t, x).(*int) + *x = 3 + if *y == 3 { + t.Errorf("deep copy wasn't deep: %#q %#q", x, y) + } +} + +func TestDeepCopyStruct(t *testing.T) { + type Foo struct { + A int + } + type Bar struct { + Foo + F *Foo + } + a := &Bar{Foo{1}, &Foo{2}} + b := copyOrDie(t, a).(*Bar) + a.A = 3 + a.F.A = 4 + + if b.A != 1 || b.F.A != 2 { + t.Errorf("deep copy wasn't deep: %#v, %#v", a, b) + } +} + +var result interface{} + +func BenchmarkDeepCopy(b *testing.B) { + table := []interface{}{ + map[string]string{}, + int(5), + "hello world", + struct { + A, B, C struct { + D map[string]int + } + X []int + Y []byte + }{}, + } + + f := fuzz.New().RandSource(rand.NewSource(1)).NilChance(.5).NumElements(0, 100) + for i := range table { + out := table[i] + obj := reflect.New(reflect.TypeOf(out)).Interface() + f.Fuzz(obj) + table[i] = obj + } + + b.ResetTimer() + var r interface{} + for i := 0; i < b.N; i++ { + for j := range table { + r, _ = NewCloner().DeepCopy(table[j]) + } + } + result = r +} diff --git a/vendor/k8s.io/apimachinery/pkg/conversion/doc.go b/vendor/k8s.io/apimachinery/pkg/conversion/doc.go index 0c46ef2d1..7415d8164 100644 --- a/vendor/k8s.io/apimachinery/pkg/conversion/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/conversion/doc.go @@ -21,4 +21,4 @@ limitations under the License. // but for the fields which did not change, copying is automated. This makes it // easy to modify the structures you use in memory without affecting the format // you store on disk or respond to in your external API calls. -package conversion +package conversion // import "k8s.io/apimachinery/pkg/conversion" diff --git a/vendor/k8s.io/apimachinery/pkg/conversion/helper_test.go b/vendor/k8s.io/apimachinery/pkg/conversion/helper_test.go new file mode 100644 index 000000000..8c61a30a8 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/conversion/helper_test.go @@ -0,0 +1,38 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package conversion + +import "testing" + +func TestInvalidPtrValueKind(t *testing.T) { + var simple interface{} + switch obj := simple.(type) { + default: + _, err := EnforcePtr(obj) + if err == nil { + t.Errorf("Expected error on invalid kind") + } + } +} + +func TestEnforceNilPtr(t *testing.T) { + var nilPtr *struct{} + _, err := EnforcePtr(nilPtr) + if err == nil { + t.Errorf("Expected error on nil pointer") + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/conversion/queryparams/convert_test.go b/vendor/k8s.io/apimachinery/pkg/conversion/queryparams/convert_test.go new file mode 100644 index 000000000..21dc0000e --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/conversion/queryparams/convert_test.go @@ -0,0 +1,212 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package queryparams_test + +import ( + "net/url" + "reflect" + "testing" + "time" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/conversion/queryparams" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +type namedString string +type namedBool bool + +type bar struct { + Float1 float32 `json:"float1"` + Float2 float64 `json:"float2"` + Int1 int64 `json:"int1,omitempty"` + Int2 int32 `json:"int2,omitempty"` + Int3 int16 `json:"int3,omitempty"` + Str1 string `json:"str1,omitempty"` + Ignored int + Ignored2 string +} + +func (obj *bar) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } + +type foo struct { + Str string `json:"str"` + Integer int `json:"integer,omitempty"` + Slice []string `json:"slice,omitempty"` + Boolean bool `json:"boolean,omitempty"` + NamedStr namedString `json:"namedStr,omitempty"` + NamedBool namedBool `json:"namedBool,omitempty"` + Foobar bar `json:"foobar,omitempty"` + Testmap map[string]string `json:"testmap,omitempty"` +} + +func (obj *foo) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } + +type baz struct { + Ptr *int `json:"ptr"` + Bptr *bool `json:"bptr,omitempty"` +} + +func (obj *baz) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } + +// childStructs tests some of the types we serialize to query params for log API calls +// notably, the nested time struct +type childStructs struct { + Container string `json:"container,omitempty"` + Follow bool `json:"follow,omitempty"` + Previous bool `json:"previous,omitempty"` + SinceSeconds *int64 `json:"sinceSeconds,omitempty"` + SinceTime *metav1.Time `json:"sinceTime,omitempty"` + EmptyTime *metav1.Time `json:"emptyTime"` +} + +func (obj *childStructs) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } + +func validateResult(t *testing.T, input interface{}, actual, expected url.Values) { + local := url.Values{} + for k, v := range expected { + local[k] = v + } + for k, v := range actual { + if ev, ok := local[k]; !ok || !reflect.DeepEqual(ev, v) { + if !ok { + t.Errorf("%#v: actual value key %s not found in expected map", input, k) + } else { + t.Errorf("%#v: values don't match: actual: %#v, expected: %#v", input, v, ev) + } + } + delete(local, k) + } + if len(local) > 0 { + t.Errorf("%#v: expected map has keys that were not found in actual map: %#v", input, local) + } +} + +func TestConvert(t *testing.T) { + sinceSeconds := int64(123) + sinceTime := metav1.Date(2000, 1, 1, 12, 34, 56, 0, time.UTC) + + tests := []struct { + input interface{} + expected url.Values + }{ + { + input: &foo{ + Str: "hello", + }, + expected: url.Values{"str": {"hello"}}, + }, + { + input: &foo{ + Str: "test string", + Slice: []string{"one", "two", "three"}, + Integer: 234, + Boolean: true, + }, + expected: url.Values{"str": {"test string"}, "slice": {"one", "two", "three"}, "integer": {"234"}, "boolean": {"true"}}, + }, + { + input: &foo{ + Str: "named types", + NamedStr: "value1", + NamedBool: true, + }, + expected: url.Values{"str": {"named types"}, "namedStr": {"value1"}, "namedBool": {"true"}}, + }, + { + input: &foo{ + Str: "don't ignore embedded struct", + Foobar: bar{ + Float1: 5.0, + }, + }, + expected: url.Values{"str": {"don't ignore embedded struct"}, "float1": {"5"}, "float2": {"0"}}, + }, + { + // Ignore untagged fields + input: &bar{ + Float1: 23.5, + Float2: 100.7, + Int1: 1, + Int2: 2, + Int3: 3, + Ignored: 1, + Ignored2: "ignored", + }, + expected: url.Values{"float1": {"23.5"}, "float2": {"100.7"}, "int1": {"1"}, "int2": {"2"}, "int3": {"3"}}, + }, + { + // include fields that are not tagged omitempty + input: &foo{ + NamedStr: "named str", + }, + expected: url.Values{"str": {""}, "namedStr": {"named str"}}, + }, + { + input: &baz{ + Ptr: intp(5), + Bptr: boolp(true), + }, + expected: url.Values{"ptr": {"5"}, "bptr": {"true"}}, + }, + { + input: &baz{ + Bptr: boolp(true), + }, + expected: url.Values{"ptr": {""}, "bptr": {"true"}}, + }, + { + input: &baz{ + Ptr: intp(5), + }, + expected: url.Values{"ptr": {"5"}}, + }, + { + input: &childStructs{ + Container: "mycontainer", + Follow: true, + Previous: true, + SinceSeconds: &sinceSeconds, + SinceTime: &sinceTime, // test a custom marshaller + EmptyTime: nil, // test a nil custom marshaller without omitempty + }, + expected: url.Values{"container": {"mycontainer"}, "follow": {"true"}, "previous": {"true"}, "sinceSeconds": {"123"}, "sinceTime": {"2000-01-01T12:34:56Z"}, "emptyTime": {""}}, + }, + { + input: &childStructs{ + Container: "mycontainer", + Follow: true, + Previous: true, + SinceSeconds: &sinceSeconds, + SinceTime: nil, // test a nil custom marshaller with omitempty + }, + expected: url.Values{"container": {"mycontainer"}, "follow": {"true"}, "previous": {"true"}, "sinceSeconds": {"123"}, "emptyTime": {""}}, + }, + } + + for _, test := range tests { + result, err := queryparams.Convert(test.input) + if err != nil { + t.Errorf("Unexpected error while converting %#v: %v", test.input, err) + } + validateResult(t, test.input, result, test.expected) + } +} + +func intp(n int) *int { return &n } + +func boolp(b bool) *bool { return &b } diff --git a/vendor/k8s.io/apimachinery/pkg/conversion/queryparams/doc.go b/vendor/k8s.io/apimachinery/pkg/conversion/queryparams/doc.go index 4c1002a4c..7b763de6f 100644 --- a/vendor/k8s.io/apimachinery/pkg/conversion/queryparams/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/conversion/queryparams/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package queryparams provides conversion from versioned // runtime objects to URL query values -package queryparams +package queryparams // import "k8s.io/apimachinery/pkg/conversion/queryparams" diff --git a/vendor/k8s.io/apimachinery/pkg/conversion/unstructured/doc.go b/vendor/k8s.io/apimachinery/pkg/conversion/unstructured/doc.go index 75128804e..cd40e74be 100644 --- a/vendor/k8s.io/apimachinery/pkg/conversion/unstructured/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/conversion/unstructured/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package unstructured provides conversion from runtime objects // to map[string]interface{} representation. -package unstructured +package unstructured // import "k8s.io/apimachinery/pkg/conversion/unstructured" diff --git a/vendor/k8s.io/apimachinery/pkg/fields/doc.go b/vendor/k8s.io/apimachinery/pkg/fields/doc.go index 49059e263..c39b8039a 100644 --- a/vendor/k8s.io/apimachinery/pkg/fields/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/fields/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package fields implements a simple field system, parsing and matching // selectors with sets of fields. -package fields +package fields // import "k8s.io/apimachinery/pkg/fields" diff --git a/vendor/k8s.io/apimachinery/pkg/fields/fields_test.go b/vendor/k8s.io/apimachinery/pkg/fields/fields_test.go new file mode 100644 index 000000000..6965be687 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/fields/fields_test.go @@ -0,0 +1,57 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fields + +import ( + "testing" +) + +func matches(t *testing.T, ls Set, want string) { + if ls.String() != want { + t.Errorf("Expected '%s', but got '%s'", want, ls.String()) + } +} + +func TestSetString(t *testing.T) { + matches(t, Set{"x": "y"}, "x=y") + matches(t, Set{"foo": "bar"}, "foo=bar") + matches(t, Set{"foo": "bar", "baz": "qup"}, "baz=qup,foo=bar") +} + +func TestFieldHas(t *testing.T) { + fieldHasTests := []struct { + Ls Fields + Key string + Has bool + }{ + {Set{"x": "y"}, "x", true}, + {Set{"x": ""}, "x", true}, + {Set{"x": "y"}, "foo", false}, + } + for _, lh := range fieldHasTests { + if has := lh.Ls.Has(lh.Key); has != lh.Has { + t.Errorf("%#v.Has(%#v) => %v, expected %v", lh.Ls, lh.Key, has, lh.Has) + } + } +} + +func TestFieldGet(t *testing.T) { + ls := Set{"x": "y"} + if ls.Get("x") != "y" { + t.Errorf("Set.Get is broken") + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/fields/selector_test.go b/vendor/k8s.io/apimachinery/pkg/fields/selector_test.go new file mode 100644 index 000000000..0aa66935c --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/fields/selector_test.go @@ -0,0 +1,397 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fields + +import ( + "reflect" + "testing" +) + +func TestSplitTerms(t *testing.T) { + testcases := map[string][]string{ + // Simple selectors + `a`: {`a`}, + `a=avalue`: {`a=avalue`}, + `a=avalue,b=bvalue`: {`a=avalue`, `b=bvalue`}, + `a=avalue,b==bvalue,c!=cvalue`: {`a=avalue`, `b==bvalue`, `c!=cvalue`}, + + // Empty terms + ``: nil, + `a=a,`: {`a=a`, ``}, + `,a=a`: {``, `a=a`}, + + // Escaped values + `k=\,,k2=v2`: {`k=\,`, `k2=v2`}, // escaped comma in value + `k=\\,k2=v2`: {`k=\\`, `k2=v2`}, // escaped backslash, unescaped comma + `k=\\\,,k2=v2`: {`k=\\\,`, `k2=v2`}, // escaped backslash and comma + `k=\a\b\`: {`k=\a\b\`}, // non-escape sequences + `k=\`: {`k=\`}, // orphan backslash + + // Multi-byte + `함=수,목=록`: {`함=수`, `목=록`}, + } + + for selector, expectedTerms := range testcases { + if terms := splitTerms(selector); !reflect.DeepEqual(terms, expectedTerms) { + t.Errorf("splitSelectors(`%s`): Expected\n%#v\ngot\n%#v", selector, expectedTerms, terms) + } + } +} + +func TestSplitTerm(t *testing.T) { + testcases := map[string]struct { + lhs string + op string + rhs string + ok bool + }{ + // Simple terms + `a=value`: {lhs: `a`, op: `=`, rhs: `value`, ok: true}, + `b==value`: {lhs: `b`, op: `==`, rhs: `value`, ok: true}, + `c!=value`: {lhs: `c`, op: `!=`, rhs: `value`, ok: true}, + + // Empty or invalid terms + ``: {lhs: ``, op: ``, rhs: ``, ok: false}, + `a`: {lhs: ``, op: ``, rhs: ``, ok: false}, + + // Escaped values + `k=\,`: {lhs: `k`, op: `=`, rhs: `\,`, ok: true}, + `k=\=`: {lhs: `k`, op: `=`, rhs: `\=`, ok: true}, + `k=\\\a\b\=\,\`: {lhs: `k`, op: `=`, rhs: `\\\a\b\=\,\`, ok: true}, + + // Multi-byte + `함=수`: {lhs: `함`, op: `=`, rhs: `수`, ok: true}, + } + + for term, expected := range testcases { + lhs, op, rhs, ok := splitTerm(term) + if lhs != expected.lhs || op != expected.op || rhs != expected.rhs || ok != expected.ok { + t.Errorf( + "splitTerm(`%s`): Expected\n%s,%s,%s,%v\nGot\n%s,%s,%s,%v", + term, + expected.lhs, expected.op, expected.rhs, expected.ok, + lhs, op, rhs, ok, + ) + } + } +} + +func TestEscapeValue(t *testing.T) { + // map values to their normalized escaped values + testcases := map[string]string{ + ``: ``, + `a`: `a`, + `=`: `\=`, + `,`: `\,`, + `\`: `\\`, + `\=\,\`: `\\\=\\\,\\`, + } + + for unescapedValue, escapedValue := range testcases { + actualEscaped := EscapeValue(unescapedValue) + if actualEscaped != escapedValue { + t.Errorf("EscapeValue(%s): expected %s, got %s", unescapedValue, escapedValue, actualEscaped) + } + + actualUnescaped, err := UnescapeValue(escapedValue) + if err != nil { + t.Errorf("UnescapeValue(%s): unexpected error %v", escapedValue, err) + } + if actualUnescaped != unescapedValue { + t.Errorf("UnescapeValue(%s): expected %s, got %s", escapedValue, unescapedValue, actualUnescaped) + } + } + + // test invalid escape sequences + invalidTestcases := []string{ + `\`, // orphan slash is invalid + `\\\`, // orphan slash is invalid + `\a`, // unrecognized escape sequence is invalid + } + for _, invalidValue := range invalidTestcases { + _, err := UnescapeValue(invalidValue) + if _, ok := err.(InvalidEscapeSequence); !ok || err == nil { + t.Errorf("UnescapeValue(%s): expected invalid escape sequence error, got %#v", invalidValue, err) + } + } +} + +func TestSelectorParse(t *testing.T) { + testGoodStrings := []string{ + "x=a,y=b,z=c", + "", + "x!=a,y=b", + `x=a||y\=b`, + `x=a\=\=b`, + } + testBadStrings := []string{ + "x=a||y=b", + "x==a==b", + "x=a,b", + "x in (a)", + "x in (a,b,c)", + "x", + } + for _, test := range testGoodStrings { + lq, err := ParseSelector(test) + if err != nil { + t.Errorf("%v: error %v (%#v)\n", test, err, err) + } + if test != lq.String() { + t.Errorf("%v restring gave: %v\n", test, lq.String()) + } + } + for _, test := range testBadStrings { + _, err := ParseSelector(test) + if err == nil { + t.Errorf("%v: did not get expected error\n", test) + } + } +} + +func TestDeterministicParse(t *testing.T) { + s1, err := ParseSelector("x=a,a=x") + s2, err2 := ParseSelector("a=x,x=a") + if err != nil || err2 != nil { + t.Errorf("Unexpected parse error") + } + if s1.String() != s2.String() { + t.Errorf("Non-deterministic parse") + } +} + +func expectMatch(t *testing.T, selector string, ls Set) { + lq, err := ParseSelector(selector) + if err != nil { + t.Errorf("Unable to parse %v as a selector\n", selector) + return + } + if !lq.Matches(ls) { + t.Errorf("Wanted %s to match '%s', but it did not.\n", selector, ls) + } +} + +func expectNoMatch(t *testing.T, selector string, ls Set) { + lq, err := ParseSelector(selector) + if err != nil { + t.Errorf("Unable to parse %v as a selector\n", selector) + return + } + if lq.Matches(ls) { + t.Errorf("Wanted '%s' to not match '%s', but it did.", selector, ls) + } +} + +func TestEverything(t *testing.T) { + if !Everything().Matches(Set{"x": "y"}) { + t.Errorf("Nil selector didn't match") + } + if !Everything().Empty() { + t.Errorf("Everything was not empty") + } +} + +func TestSelectorMatches(t *testing.T) { + expectMatch(t, "", Set{"x": "y"}) + expectMatch(t, "x=y", Set{"x": "y"}) + expectMatch(t, "x=y,z=w", Set{"x": "y", "z": "w"}) + expectMatch(t, "x!=y,z!=w", Set{"x": "z", "z": "a"}) + expectMatch(t, "notin=in", Set{"notin": "in"}) // in and notin in exactMatch + expectNoMatch(t, "x=y", Set{"x": "z"}) + expectNoMatch(t, "x=y,z=w", Set{"x": "w", "z": "w"}) + expectNoMatch(t, "x!=y,z!=w", Set{"x": "z", "z": "w"}) + + fieldset := Set{ + "foo": "bar", + "baz": "blah", + "complex": `=value\,\`, + } + expectMatch(t, "foo=bar", fieldset) + expectMatch(t, "baz=blah", fieldset) + expectMatch(t, "foo=bar,baz=blah", fieldset) + expectMatch(t, `foo=bar,baz=blah,complex=\=value\\\,\\`, fieldset) + expectNoMatch(t, "foo=blah", fieldset) + expectNoMatch(t, "baz=bar", fieldset) + expectNoMatch(t, "foo=bar,foobar=bar,baz=blah", fieldset) +} + +func TestOneTermEqualSelector(t *testing.T) { + if !OneTermEqualSelector("x", "y").Matches(Set{"x": "y"}) { + t.Errorf("No match when match expected.") + } + if OneTermEqualSelector("x", "y").Matches(Set{"x": "z"}) { + t.Errorf("Match when none expected.") + } +} + +func expectMatchDirect(t *testing.T, selector, ls Set) { + if !SelectorFromSet(selector).Matches(ls) { + t.Errorf("Wanted %s to match '%s', but it did not.\n", selector, ls) + } +} + +func expectNoMatchDirect(t *testing.T, selector, ls Set) { + if SelectorFromSet(selector).Matches(ls) { + t.Errorf("Wanted '%s' to not match '%s', but it did.", selector, ls) + } +} + +func TestSetMatches(t *testing.T) { + labelset := Set{ + "foo": "bar", + "baz": "blah", + } + expectMatchDirect(t, Set{}, labelset) + expectMatchDirect(t, Set{"foo": "bar"}, labelset) + expectMatchDirect(t, Set{"baz": "blah"}, labelset) + expectMatchDirect(t, Set{"foo": "bar", "baz": "blah"}, labelset) + expectNoMatchDirect(t, Set{"foo": "=blah"}, labelset) + expectNoMatchDirect(t, Set{"baz": "=bar"}, labelset) + expectNoMatchDirect(t, Set{"foo": "=bar", "foobar": "bar", "baz": "blah"}, labelset) +} + +func TestNilMapIsValid(t *testing.T) { + selector := Set(nil).AsSelector() + if selector == nil { + t.Errorf("Selector for nil set should be Everything") + } + if !selector.Empty() { + t.Errorf("Selector for nil set should be Empty") + } +} + +func TestSetIsEmpty(t *testing.T) { + if !(Set{}).AsSelector().Empty() { + t.Errorf("Empty set should be empty") + } + if !(andTerm(nil)).Empty() { + t.Errorf("Nil andTerm should be empty") + } + if (&hasTerm{}).Empty() { + t.Errorf("hasTerm should not be empty") + } + if (¬HasTerm{}).Empty() { + t.Errorf("notHasTerm should not be empty") + } + if !(andTerm{andTerm{}}).Empty() { + t.Errorf("Nested andTerm should be empty") + } + if (andTerm{&hasTerm{"a", "b"}}).Empty() { + t.Errorf("Nested andTerm should not be empty") + } +} + +func TestRequiresExactMatch(t *testing.T) { + testCases := map[string]struct { + S Selector + Label string + Value string + Found bool + }{ + "empty set": {Set{}.AsSelector(), "test", "", false}, + "empty hasTerm": {&hasTerm{}, "test", "", false}, + "skipped hasTerm": {&hasTerm{"a", "b"}, "test", "", false}, + "valid hasTerm": {&hasTerm{"test", "b"}, "test", "b", true}, + "valid hasTerm no value": {&hasTerm{"test", ""}, "test", "", true}, + "valid notHasTerm": {¬HasTerm{"test", "b"}, "test", "", false}, + "valid notHasTerm no value": {¬HasTerm{"test", ""}, "test", "", false}, + "nil andTerm": {andTerm(nil), "test", "", false}, + "empty andTerm": {andTerm{}, "test", "", false}, + "nested andTerm": {andTerm{andTerm{}}, "test", "", false}, + "nested andTerm matches": {andTerm{&hasTerm{"test", "b"}}, "test", "b", true}, + "andTerm with non-match": {andTerm{&hasTerm{}, &hasTerm{"test", "b"}}, "test", "b", true}, + } + for k, v := range testCases { + value, found := v.S.RequiresExactMatch(v.Label) + if value != v.Value { + t.Errorf("%s: expected value %s, got %s", k, v.Value, value) + } + if found != v.Found { + t.Errorf("%s: expected found %t, got %t", k, v.Found, found) + } + } +} + +func TestTransform(t *testing.T) { + testCases := []struct { + name string + selector string + transform func(field, value string) (string, string, error) + result string + isEmpty bool + }{ + { + name: "empty selector", + selector: "", + transform: func(field, value string) (string, string, error) { return field, value, nil }, + result: "", + isEmpty: true, + }, + { + name: "no-op transform", + selector: "a=b,c=d", + transform: func(field, value string) (string, string, error) { return field, value, nil }, + result: "a=b,c=d", + isEmpty: false, + }, + { + name: "transform one field", + selector: "a=b,c=d", + transform: func(field, value string) (string, string, error) { + if field == "a" { + return "e", "f", nil + } + return field, value, nil + }, + result: "e=f,c=d", + isEmpty: false, + }, + { + name: "remove field to make empty", + selector: "a=b", + transform: func(field, value string) (string, string, error) { return "", "", nil }, + result: "", + isEmpty: true, + }, + { + name: "remove only one field", + selector: "a=b,c=d,e=f", + transform: func(field, value string) (string, string, error) { + if field == "c" { + return "", "", nil + } + return field, value, nil + }, + result: "a=b,e=f", + isEmpty: false, + }, + } + + for i, tc := range testCases { + result, err := ParseAndTransformSelector(tc.selector, tc.transform) + if err != nil { + t.Errorf("[%d] unexpected error during Transform: %v", i, err) + } + if result.Empty() != tc.isEmpty { + t.Errorf("[%d] expected empty: %t, got: %t", i, tc.isEmpty, result.Empty()) + } + if result.String() != tc.result { + t.Errorf("[%d] unexpected result: %s", i, result.String()) + } + } + +} diff --git a/vendor/k8s.io/apimachinery/pkg/labels/doc.go b/vendor/k8s.io/apimachinery/pkg/labels/doc.go index 35ba78809..82de0051b 100644 --- a/vendor/k8s.io/apimachinery/pkg/labels/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/labels/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package labels implements a simple label system, parsing and matching // selectors with sets of labels. -package labels +package labels // import "k8s.io/apimachinery/pkg/labels" diff --git a/vendor/k8s.io/apimachinery/pkg/labels/labels_test.go b/vendor/k8s.io/apimachinery/pkg/labels/labels_test.go new file mode 100644 index 000000000..2d4d761bc --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/labels/labels_test.go @@ -0,0 +1,231 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package labels + +import ( + "testing" +) + +func matches(t *testing.T, ls Set, want string) { + if ls.String() != want { + t.Errorf("Expected '%s', but got '%s'", want, ls.String()) + } +} + +func TestSetString(t *testing.T) { + matches(t, Set{"x": "y"}, "x=y") + matches(t, Set{"foo": "bar"}, "foo=bar") + matches(t, Set{"foo": "bar", "baz": "qup"}, "baz=qup,foo=bar") + + // TODO: Make our label representation robust enough to handle labels + // with ",=!" characters in their names. +} + +func TestLabelHas(t *testing.T) { + labelHasTests := []struct { + Ls Labels + Key string + Has bool + }{ + {Set{"x": "y"}, "x", true}, + {Set{"x": ""}, "x", true}, + {Set{"x": "y"}, "foo", false}, + } + for _, lh := range labelHasTests { + if has := lh.Ls.Has(lh.Key); has != lh.Has { + t.Errorf("%#v.Has(%#v) => %v, expected %v", lh.Ls, lh.Key, has, lh.Has) + } + } +} + +func TestLabelGet(t *testing.T) { + ls := Set{"x": "y"} + if ls.Get("x") != "y" { + t.Errorf("Set.Get is broken") + } +} + +func TestLabelConflict(t *testing.T) { + tests := []struct { + labels1 map[string]string + labels2 map[string]string + conflict bool + }{ + { + labels1: map[string]string{}, + labels2: map[string]string{}, + conflict: false, + }, + { + labels1: map[string]string{"env": "test"}, + labels2: map[string]string{"infra": "true"}, + conflict: false, + }, + { + labels1: map[string]string{"env": "test"}, + labels2: map[string]string{"infra": "true", "env": "test"}, + conflict: false, + }, + { + labels1: map[string]string{"env": "test"}, + labels2: map[string]string{"env": "dev"}, + conflict: true, + }, + { + labels1: map[string]string{"env": "test", "infra": "false"}, + labels2: map[string]string{"infra": "true", "color": "blue"}, + conflict: true, + }, + } + for _, test := range tests { + conflict := Conflicts(Set(test.labels1), Set(test.labels2)) + if conflict != test.conflict { + t.Errorf("expected: %v but got: %v", test.conflict, conflict) + } + } +} + +func TestLabelMerge(t *testing.T) { + tests := []struct { + labels1 map[string]string + labels2 map[string]string + mergedLabels map[string]string + }{ + { + labels1: map[string]string{}, + labels2: map[string]string{}, + mergedLabels: map[string]string{}, + }, + { + labels1: map[string]string{"infra": "true"}, + labels2: map[string]string{}, + mergedLabels: map[string]string{"infra": "true"}, + }, + { + labels1: map[string]string{"infra": "true"}, + labels2: map[string]string{"env": "test", "color": "blue"}, + mergedLabels: map[string]string{"infra": "true", "env": "test", "color": "blue"}, + }, + } + for _, test := range tests { + mergedLabels := Merge(Set(test.labels1), Set(test.labels2)) + if !Equals(mergedLabels, test.mergedLabels) { + t.Errorf("expected: %v but got: %v", test.mergedLabels, mergedLabels) + } + } +} + +func TestLabelSelectorParse(t *testing.T) { + tests := []struct { + selector string + labels map[string]string + valid bool + }{ + { + selector: "", + labels: map[string]string{}, + valid: true, + }, + { + selector: "x=a", + labels: map[string]string{"x": "a"}, + valid: true, + }, + { + selector: "x=a,y=b,z=c", + labels: map[string]string{"x": "a", "y": "b", "z": "c"}, + valid: true, + }, + { + selector: " x = a , y = b , z = c ", + labels: map[string]string{"x": "a", "y": "b", "z": "c"}, + valid: true, + }, + { + selector: "color=green,env=test,service=front", + labels: map[string]string{"color": "green", "env": "test", "service": "front"}, + valid: true, + }, + { + selector: "color=green, env=test, service=front", + labels: map[string]string{"color": "green", "env": "test", "service": "front"}, + valid: true, + }, + { + selector: ",", + labels: map[string]string{}, + valid: false, + }, + { + selector: "x", + labels: map[string]string{}, + valid: false, + }, + { + selector: "x,y", + labels: map[string]string{}, + valid: false, + }, + { + selector: "x=$y", + labels: map[string]string{}, + valid: false, + }, + { + selector: "x!=y", + labels: map[string]string{}, + valid: false, + }, + { + selector: "x==y", + labels: map[string]string{}, + valid: false, + }, + { + selector: "x=a||y=b", + labels: map[string]string{}, + valid: false, + }, + { + selector: "x in (y)", + labels: map[string]string{}, + valid: false, + }, + { + selector: "x notin (y)", + labels: map[string]string{}, + valid: false, + }, + { + selector: "x y", + labels: map[string]string{}, + valid: false, + }, + } + for _, test := range tests { + labels, err := ConvertSelectorToLabelsMap(test.selector) + if test.valid && err != nil { + t.Errorf("selector: %s, expected no error but got: %s", test.selector, err) + } else if !test.valid && err == nil { + t.Errorf("selector: %s, expected an error", test.selector) + } + + if !Equals(Set(labels), test.labels) { + t.Errorf("expected: %s but got: %s", test.labels, labels) + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/labels/selector_test.go b/vendor/k8s.io/apimachinery/pkg/labels/selector_test.go new file mode 100644 index 000000000..995317bd1 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/labels/selector_test.go @@ -0,0 +1,575 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package labels + +import ( + "reflect" + "strings" + "testing" + + "k8s.io/apimachinery/pkg/selection" + "k8s.io/apimachinery/pkg/util/sets" +) + +func TestSelectorParse(t *testing.T) { + testGoodStrings := []string{ + "x=a,y=b,z=c", + "", + "x!=a,y=b", + "x=", + "x= ", + "x=,z= ", + "x= ,z= ", + "!x", + "x>1", + "x>1,z<5", + } + testBadStrings := []string{ + "x=a||y=b", + "x==a==b", + "!x=a", + "x<a", + } + for _, test := range testGoodStrings { + lq, err := Parse(test) + if err != nil { + t.Errorf("%v: error %v (%#v)\n", test, err, err) + } + if strings.Replace(test, " ", "", -1) != lq.String() { + t.Errorf("%v restring gave: %v\n", test, lq.String()) + } + } + for _, test := range testBadStrings { + _, err := Parse(test) + if err == nil { + t.Errorf("%v: did not get expected error\n", test) + } + } +} + +func TestDeterministicParse(t *testing.T) { + s1, err := Parse("x=a,a=x") + s2, err2 := Parse("a=x,x=a") + if err != nil || err2 != nil { + t.Errorf("Unexpected parse error") + } + if s1.String() != s2.String() { + t.Errorf("Non-deterministic parse") + } +} + +func expectMatch(t *testing.T, selector string, ls Set) { + lq, err := Parse(selector) + if err != nil { + t.Errorf("Unable to parse %v as a selector\n", selector) + return + } + if !lq.Matches(ls) { + t.Errorf("Wanted %s to match '%s', but it did not.\n", selector, ls) + } +} + +func expectNoMatch(t *testing.T, selector string, ls Set) { + lq, err := Parse(selector) + if err != nil { + t.Errorf("Unable to parse %v as a selector\n", selector) + return + } + if lq.Matches(ls) { + t.Errorf("Wanted '%s' to not match '%s', but it did.", selector, ls) + } +} + +func TestEverything(t *testing.T) { + if !Everything().Matches(Set{"x": "y"}) { + t.Errorf("Nil selector didn't match") + } + if !Everything().Empty() { + t.Errorf("Everything was not empty") + } +} + +func TestSelectorMatches(t *testing.T) { + expectMatch(t, "", Set{"x": "y"}) + expectMatch(t, "x=y", Set{"x": "y"}) + expectMatch(t, "x=y,z=w", Set{"x": "y", "z": "w"}) + expectMatch(t, "x!=y,z!=w", Set{"x": "z", "z": "a"}) + expectMatch(t, "notin=in", Set{"notin": "in"}) // in and notin in exactMatch + expectMatch(t, "x", Set{"x": "z"}) + expectMatch(t, "!x", Set{"y": "z"}) + expectMatch(t, "x>1", Set{"x": "2"}) + expectMatch(t, "x<1", Set{"x": "0"}) + expectNoMatch(t, "x=z", Set{}) + expectNoMatch(t, "x=y", Set{"x": "z"}) + expectNoMatch(t, "x=y,z=w", Set{"x": "w", "z": "w"}) + expectNoMatch(t, "x!=y,z!=w", Set{"x": "z", "z": "w"}) + expectNoMatch(t, "x", Set{"y": "z"}) + expectNoMatch(t, "!x", Set{"x": "z"}) + expectNoMatch(t, "x>1", Set{"x": "0"}) + expectNoMatch(t, "x<1", Set{"x": "2"}) + + labelset := Set{ + "foo": "bar", + "baz": "blah", + } + expectMatch(t, "foo=bar", labelset) + expectMatch(t, "baz=blah", labelset) + expectMatch(t, "foo=bar,baz=blah", labelset) + expectNoMatch(t, "foo=blah", labelset) + expectNoMatch(t, "baz=bar", labelset) + expectNoMatch(t, "foo=bar,foobar=bar,baz=blah", labelset) +} + +func expectMatchDirect(t *testing.T, selector, ls Set) { + if !SelectorFromSet(selector).Matches(ls) { + t.Errorf("Wanted %s to match '%s', but it did not.\n", selector, ls) + } +} + +func expectNoMatchDirect(t *testing.T, selector, ls Set) { + if SelectorFromSet(selector).Matches(ls) { + t.Errorf("Wanted '%s' to not match '%s', but it did.", selector, ls) + } +} + +func TestSetMatches(t *testing.T) { + labelset := Set{ + "foo": "bar", + "baz": "blah", + } + expectMatchDirect(t, Set{}, labelset) + expectMatchDirect(t, Set{"foo": "bar"}, labelset) + expectMatchDirect(t, Set{"baz": "blah"}, labelset) + expectMatchDirect(t, Set{"foo": "bar", "baz": "blah"}, labelset) + + //TODO: bad values not handled for the moment in SelectorFromSet + //expectNoMatchDirect(t, Set{"foo": "=blah"}, labelset) + //expectNoMatchDirect(t, Set{"baz": "=bar"}, labelset) + //expectNoMatchDirect(t, Set{"foo": "=bar", "foobar": "bar", "baz": "blah"}, labelset) +} + +func TestNilMapIsValid(t *testing.T) { + selector := Set(nil).AsSelector() + if selector == nil { + t.Errorf("Selector for nil set should be Everything") + } + if !selector.Empty() { + t.Errorf("Selector for nil set should be Empty") + } +} + +func TestSetIsEmpty(t *testing.T) { + if !(Set{}).AsSelector().Empty() { + t.Errorf("Empty set should be empty") + } + if !(NewSelector()).Empty() { + t.Errorf("Nil Selector should be empty") + } +} + +func TestLexer(t *testing.T) { + testcases := []struct { + s string + t Token + }{ + {"", EndOfStringToken}, + {",", CommaToken}, + {"notin", NotInToken}, + {"in", InToken}, + {"=", EqualsToken}, + {"==", DoubleEqualsToken}, + {">", GreaterThanToken}, + {"<", LessThanToken}, + //Note that Lex returns the longest valid token found + {"!", DoesNotExistToken}, + {"!=", NotEqualsToken}, + {"(", OpenParToken}, + {")", ClosedParToken}, + //Non-"special" characters are considered part of an identifier + {"~", IdentifierToken}, + {"||", IdentifierToken}, + } + for _, v := range testcases { + l := &Lexer{s: v.s, pos: 0} + token, lit := l.Lex() + if token != v.t { + t.Errorf("Got %d it should be %d for '%s'", token, v.t, v.s) + } + if v.t != ErrorToken && lit != v.s { + t.Errorf("Got '%s' it should be '%s'", lit, v.s) + } + } +} + +func min(l, r int) (m int) { + m = r + if l < r { + m = l + } + return m +} + +func TestLexerSequence(t *testing.T) { + testcases := []struct { + s string + t []Token + }{ + {"key in ( value )", []Token{IdentifierToken, InToken, OpenParToken, IdentifierToken, ClosedParToken}}, + {"key notin ( value )", []Token{IdentifierToken, NotInToken, OpenParToken, IdentifierToken, ClosedParToken}}, + {"key in ( value1, value2 )", []Token{IdentifierToken, InToken, OpenParToken, IdentifierToken, CommaToken, IdentifierToken, ClosedParToken}}, + {"key", []Token{IdentifierToken}}, + {"!key", []Token{DoesNotExistToken, IdentifierToken}}, + {"()", []Token{OpenParToken, ClosedParToken}}, + {"x in (),y", []Token{IdentifierToken, InToken, OpenParToken, ClosedParToken, CommaToken, IdentifierToken}}, + {"== != (), = notin", []Token{DoubleEqualsToken, NotEqualsToken, OpenParToken, ClosedParToken, CommaToken, EqualsToken, NotInToken}}, + {"key>2", []Token{IdentifierToken, GreaterThanToken, IdentifierToken}}, + {"key<1", []Token{IdentifierToken, LessThanToken, IdentifierToken}}, + } + for _, v := range testcases { + var literals []string + var tokens []Token + l := &Lexer{s: v.s, pos: 0} + for { + token, lit := l.Lex() + if token == EndOfStringToken { + break + } + tokens = append(tokens, token) + literals = append(literals, lit) + } + if len(tokens) != len(v.t) { + t.Errorf("Bad number of tokens for '%s %d, %d", v.s, len(tokens), len(v.t)) + } + for i := 0; i < min(len(tokens), len(v.t)); i++ { + if tokens[i] != v.t[i] { + t.Errorf("Test '%s': Mismatching in token type found '%v' it should be '%v'", v.s, tokens[i], v.t[i]) + } + } + } +} +func TestParserLookahead(t *testing.T) { + testcases := []struct { + s string + t []Token + }{ + {"key in ( value )", []Token{IdentifierToken, InToken, OpenParToken, IdentifierToken, ClosedParToken, EndOfStringToken}}, + {"key notin ( value )", []Token{IdentifierToken, NotInToken, OpenParToken, IdentifierToken, ClosedParToken, EndOfStringToken}}, + {"key in ( value1, value2 )", []Token{IdentifierToken, InToken, OpenParToken, IdentifierToken, CommaToken, IdentifierToken, ClosedParToken, EndOfStringToken}}, + {"key", []Token{IdentifierToken, EndOfStringToken}}, + {"!key", []Token{DoesNotExistToken, IdentifierToken, EndOfStringToken}}, + {"()", []Token{OpenParToken, ClosedParToken, EndOfStringToken}}, + {"", []Token{EndOfStringToken}}, + {"x in (),y", []Token{IdentifierToken, InToken, OpenParToken, ClosedParToken, CommaToken, IdentifierToken, EndOfStringToken}}, + {"== != (), = notin", []Token{DoubleEqualsToken, NotEqualsToken, OpenParToken, ClosedParToken, CommaToken, EqualsToken, NotInToken, EndOfStringToken}}, + {"key>2", []Token{IdentifierToken, GreaterThanToken, IdentifierToken, EndOfStringToken}}, + {"key<1", []Token{IdentifierToken, LessThanToken, IdentifierToken, EndOfStringToken}}, + } + for _, v := range testcases { + p := &Parser{l: &Lexer{s: v.s, pos: 0}, position: 0} + p.scan() + if len(p.scannedItems) != len(v.t) { + t.Errorf("Expected %d items found %d", len(v.t), len(p.scannedItems)) + } + for { + token, lit := p.lookahead(KeyAndOperator) + + token2, lit2 := p.consume(KeyAndOperator) + if token == EndOfStringToken { + break + } + if token != token2 || lit != lit2 { + t.Errorf("Bad values") + } + } + } +} + +func TestRequirementConstructor(t *testing.T) { + requirementConstructorTests := []struct { + Key string + Op selection.Operator + Vals sets.String + Success bool + }{ + {"x", selection.In, nil, false}, + {"x", selection.NotIn, sets.NewString(), false}, + {"x", selection.In, sets.NewString("foo"), true}, + {"x", selection.NotIn, sets.NewString("foo"), true}, + {"x", selection.Exists, nil, true}, + {"x", selection.DoesNotExist, nil, true}, + {"1foo", selection.In, sets.NewString("bar"), true}, + {"1234", selection.In, sets.NewString("bar"), true}, + {"y", selection.GreaterThan, sets.NewString("1"), true}, + {"z", selection.LessThan, sets.NewString("6"), true}, + {"foo", selection.GreaterThan, sets.NewString("bar"), false}, + {"barz", selection.LessThan, sets.NewString("blah"), false}, + {strings.Repeat("a", 254), selection.Exists, nil, false}, //breaks DNS rule that len(key) <= 253 + } + for _, rc := range requirementConstructorTests { + if _, err := NewRequirement(rc.Key, rc.Op, rc.Vals.List()); err == nil && !rc.Success { + t.Errorf("expected error with key:%#v op:%v vals:%v, got no error", rc.Key, rc.Op, rc.Vals) + } else if err != nil && rc.Success { + t.Errorf("expected no error with key:%#v op:%v vals:%v, got:%v", rc.Key, rc.Op, rc.Vals, err) + } + } +} + +func TestToString(t *testing.T) { + var req Requirement + toStringTests := []struct { + In *internalSelector + Out string + Valid bool + }{ + + {&internalSelector{ + getRequirement("x", selection.In, sets.NewString("abc", "def"), t), + getRequirement("y", selection.NotIn, sets.NewString("jkl"), t), + getRequirement("z", selection.Exists, nil, t)}, + "x in (abc,def),y notin (jkl),z", true}, + {&internalSelector{ + getRequirement("x", selection.NotIn, sets.NewString("abc", "def"), t), + getRequirement("y", selection.NotEquals, sets.NewString("jkl"), t), + getRequirement("z", selection.DoesNotExist, nil, t)}, + "x notin (abc,def),y!=jkl,!z", true}, + {&internalSelector{ + getRequirement("x", selection.In, sets.NewString("abc", "def"), t), + req}, // adding empty req for the trailing ',' + "x in (abc,def),", false}, + {&internalSelector{ + getRequirement("x", selection.NotIn, sets.NewString("abc"), t), + getRequirement("y", selection.In, sets.NewString("jkl", "mno"), t), + getRequirement("z", selection.NotIn, sets.NewString(""), t)}, + "x notin (abc),y in (jkl,mno),z notin ()", true}, + {&internalSelector{ + getRequirement("x", selection.Equals, sets.NewString("abc"), t), + getRequirement("y", selection.DoubleEquals, sets.NewString("jkl"), t), + getRequirement("z", selection.NotEquals, sets.NewString("a"), t), + getRequirement("z", selection.Exists, nil, t)}, + "x=abc,y==jkl,z!=a,z", true}, + {&internalSelector{ + getRequirement("x", selection.GreaterThan, sets.NewString("2"), t), + getRequirement("y", selection.LessThan, sets.NewString("8"), t), + getRequirement("z", selection.Exists, nil, t)}, + "x>2,y<8,z", true}, + } + for _, ts := range toStringTests { + if out := ts.In.String(); out == "" && ts.Valid { + t.Errorf("%#v.String() => '%v' expected no error", ts.In, out) + } else if out != ts.Out { + t.Errorf("%#v.String() => '%v' want '%v'", ts.In, out, ts.Out) + } + } +} + +func TestRequirementSelectorMatching(t *testing.T) { + var req Requirement + labelSelectorMatchingTests := []struct { + Set Set + Sel Selector + Match bool + }{ + {Set{"x": "foo", "y": "baz"}, &internalSelector{ + req, + }, false}, + {Set{"x": "foo", "y": "baz"}, &internalSelector{ + getRequirement("x", selection.In, sets.NewString("foo"), t), + getRequirement("y", selection.NotIn, sets.NewString("alpha"), t), + }, true}, + {Set{"x": "foo", "y": "baz"}, &internalSelector{ + getRequirement("x", selection.In, sets.NewString("foo"), t), + getRequirement("y", selection.In, sets.NewString("alpha"), t), + }, false}, + {Set{"y": ""}, &internalSelector{ + getRequirement("x", selection.NotIn, sets.NewString(""), t), + getRequirement("y", selection.Exists, nil, t), + }, true}, + {Set{"y": ""}, &internalSelector{ + getRequirement("x", selection.DoesNotExist, nil, t), + getRequirement("y", selection.Exists, nil, t), + }, true}, + {Set{"y": ""}, &internalSelector{ + getRequirement("x", selection.NotIn, sets.NewString(""), t), + getRequirement("y", selection.DoesNotExist, nil, t), + }, false}, + {Set{"y": "baz"}, &internalSelector{ + getRequirement("x", selection.In, sets.NewString(""), t), + }, false}, + {Set{"z": "2"}, &internalSelector{ + getRequirement("z", selection.GreaterThan, sets.NewString("1"), t), + }, true}, + {Set{"z": "v2"}, &internalSelector{ + getRequirement("z", selection.GreaterThan, sets.NewString("1"), t), + }, false}, + } + for _, lsm := range labelSelectorMatchingTests { + if match := lsm.Sel.Matches(lsm.Set); match != lsm.Match { + t.Errorf("%+v.Matches(%#v) => %v, want %v", lsm.Sel, lsm.Set, match, lsm.Match) + } + } +} + +func TestSetSelectorParser(t *testing.T) { + setSelectorParserTests := []struct { + In string + Out Selector + Match bool + Valid bool + }{ + {"", NewSelector(), true, true}, + {"\rx", internalSelector{ + getRequirement("x", selection.Exists, nil, t), + }, true, true}, + {"this-is-a-dns.domain.com/key-with-dash", internalSelector{ + getRequirement("this-is-a-dns.domain.com/key-with-dash", selection.Exists, nil, t), + }, true, true}, + {"this-is-another-dns.domain.com/key-with-dash in (so,what)", internalSelector{ + getRequirement("this-is-another-dns.domain.com/key-with-dash", selection.In, sets.NewString("so", "what"), t), + }, true, true}, + {"0.1.2.domain/99 notin (10.10.100.1, tick.tack.clock)", internalSelector{ + getRequirement("0.1.2.domain/99", selection.NotIn, sets.NewString("10.10.100.1", "tick.tack.clock"), t), + }, true, true}, + {"foo in (abc)", internalSelector{ + getRequirement("foo", selection.In, sets.NewString("abc"), t), + }, true, true}, + {"x notin\n (abc)", internalSelector{ + getRequirement("x", selection.NotIn, sets.NewString("abc"), t), + }, true, true}, + {"x notin \t (abc,def)", internalSelector{ + getRequirement("x", selection.NotIn, sets.NewString("abc", "def"), t), + }, true, true}, + {"x in (abc,def)", internalSelector{ + getRequirement("x", selection.In, sets.NewString("abc", "def"), t), + }, true, true}, + {"x in (abc,)", internalSelector{ + getRequirement("x", selection.In, sets.NewString("abc", ""), t), + }, true, true}, + {"x in ()", internalSelector{ + getRequirement("x", selection.In, sets.NewString(""), t), + }, true, true}, + {"x notin (abc,,def),bar,z in (),w", internalSelector{ + getRequirement("bar", selection.Exists, nil, t), + getRequirement("w", selection.Exists, nil, t), + getRequirement("x", selection.NotIn, sets.NewString("abc", "", "def"), t), + getRequirement("z", selection.In, sets.NewString(""), t), + }, true, true}, + {"x,y in (a)", internalSelector{ + getRequirement("y", selection.In, sets.NewString("a"), t), + getRequirement("x", selection.Exists, nil, t), + }, false, true}, + {"x=a", internalSelector{ + getRequirement("x", selection.Equals, sets.NewString("a"), t), + }, true, true}, + {"x>1", internalSelector{ + getRequirement("x", selection.GreaterThan, sets.NewString("1"), t), + }, true, true}, + {"x<7", internalSelector{ + getRequirement("x", selection.LessThan, sets.NewString("7"), t), + }, true, true}, + {"x=a,y!=b", internalSelector{ + getRequirement("x", selection.Equals, sets.NewString("a"), t), + getRequirement("y", selection.NotEquals, sets.NewString("b"), t), + }, true, true}, + {"x=a,y!=b,z in (h,i,j)", internalSelector{ + getRequirement("x", selection.Equals, sets.NewString("a"), t), + getRequirement("y", selection.NotEquals, sets.NewString("b"), t), + getRequirement("z", selection.In, sets.NewString("h", "i", "j"), t), + }, true, true}, + {"x=a||y=b", internalSelector{}, false, false}, + {"x,,y", nil, true, false}, + {",x,y", nil, true, false}, + {"x nott in (y)", nil, true, false}, + {"x notin ( )", internalSelector{ + getRequirement("x", selection.NotIn, sets.NewString(""), t), + }, true, true}, + {"x notin (, a)", internalSelector{ + getRequirement("x", selection.NotIn, sets.NewString("", "a"), t), + }, true, true}, + {"a in (xyz),", nil, true, false}, + {"a in (xyz)b notin ()", nil, true, false}, + {"a ", internalSelector{ + getRequirement("a", selection.Exists, nil, t), + }, true, true}, + {"a in (x,y,notin, z,in)", internalSelector{ + getRequirement("a", selection.In, sets.NewString("in", "notin", "x", "y", "z"), t), + }, true, true}, // operator 'in' inside list of identifiers + {"a in (xyz abc)", nil, false, false}, // no comma + {"a notin(", nil, true, false}, // bad formed + {"a (", nil, false, false}, // cpar + {"(", nil, false, false}, // opar + } + + for _, ssp := range setSelectorParserTests { + if sel, err := Parse(ssp.In); err != nil && ssp.Valid { + t.Errorf("Parse(%s) => %v expected no error", ssp.In, err) + } else if err == nil && !ssp.Valid { + t.Errorf("Parse(%s) => %+v expected error", ssp.In, sel) + } else if ssp.Match && !reflect.DeepEqual(sel, ssp.Out) { + t.Errorf("Parse(%s) => parse output '%#v' doesn't match '%#v' expected match", ssp.In, sel, ssp.Out) + } + } +} + +func getRequirement(key string, op selection.Operator, vals sets.String, t *testing.T) Requirement { + req, err := NewRequirement(key, op, vals.List()) + if err != nil { + t.Errorf("NewRequirement(%v, %v, %v) resulted in error:%v", key, op, vals, err) + return Requirement{} + } + return *req +} + +func TestAdd(t *testing.T) { + testCases := []struct { + name string + sel Selector + key string + operator selection.Operator + values []string + refSelector Selector + }{ + { + "keyInOperator", + internalSelector{}, + "key", + selection.In, + []string{"value"}, + internalSelector{Requirement{"key", selection.In, []string{"value"}}}, + }, + { + "keyEqualsOperator", + internalSelector{Requirement{"key", selection.In, []string{"value"}}}, + "key2", + selection.Equals, + []string{"value2"}, + internalSelector{ + Requirement{"key", selection.In, []string{"value"}}, + Requirement{"key2", selection.Equals, []string{"value2"}}, + }, + }, + } + for _, ts := range testCases { + req, err := NewRequirement(ts.key, ts.operator, ts.values) + if err != nil { + t.Errorf("%s - Unable to create labels.Requirement", ts.name) + } + ts.sel = ts.sel.Add(*req) + if !reflect.DeepEqual(ts.sel, ts.refSelector) { + t.Errorf("%s - Expected %v found %v", ts.name, ts.refSelector, ts.sel) + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/conversion_test.go b/vendor/k8s.io/apimachinery/pkg/runtime/conversion_test.go new file mode 100644 index 000000000..33670415b --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/conversion_test.go @@ -0,0 +1,115 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package runtime_test + +import ( + "reflect" + "testing" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + runtimetesting "k8s.io/apimachinery/pkg/runtime/testing" +) + +func TestStringMapConversion(t *testing.T) { + internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} + externalGV := schema.GroupVersion{Group: "test.group", Version: "external"} + + scheme := runtime.NewScheme() + scheme.Log(t) + scheme.AddKnownTypeWithName(internalGV.WithKind("Complex"), &runtimetesting.InternalComplex{}) + scheme.AddKnownTypeWithName(externalGV.WithKind("Complex"), &runtimetesting.ExternalComplex{}) + + testCases := map[string]struct { + input map[string][]string + errFn func(error) bool + expected runtime.Object + }{ + "ignores omitempty": { + input: map[string][]string{ + "String": {"not_used"}, + "string": {"value"}, + "int": {"1"}, + "Integer64": {"2"}, + }, + expected: &runtimetesting.ExternalComplex{String: "value", Integer: 1}, + }, + "returns error on bad int": { + input: map[string][]string{ + "int": {"a"}, + }, + errFn: func(err error) bool { return err != nil }, + expected: &runtimetesting.ExternalComplex{}, + }, + "parses int64": { + input: map[string][]string{ + "Int64": {"-1"}, + }, + expected: &runtimetesting.ExternalComplex{Int64: -1}, + }, + "returns error on bad int64": { + input: map[string][]string{ + "Int64": {"a"}, + }, + errFn: func(err error) bool { return err != nil }, + expected: &runtimetesting.ExternalComplex{}, + }, + "parses boolean true": { + input: map[string][]string{ + "bool": {"true"}, + }, + expected: &runtimetesting.ExternalComplex{Bool: true}, + }, + "parses boolean any value": { + input: map[string][]string{ + "bool": {"foo"}, + }, + expected: &runtimetesting.ExternalComplex{Bool: true}, + }, + "parses boolean false": { + input: map[string][]string{ + "bool": {"false"}, + }, + expected: &runtimetesting.ExternalComplex{Bool: false}, + }, + "parses boolean empty value": { + input: map[string][]string{ + "bool": {""}, + }, + expected: &runtimetesting.ExternalComplex{Bool: true}, + }, + "parses boolean no value": { + input: map[string][]string{ + "bool": {}, + }, + expected: &runtimetesting.ExternalComplex{Bool: false}, + }, + } + + for k, tc := range testCases { + out := &runtimetesting.ExternalComplex{} + if err := scheme.Convert(&tc.input, out, nil); (tc.errFn == nil && err != nil) || (tc.errFn != nil && !tc.errFn(err)) { + t.Errorf("%s: unexpected error: %v", k, err) + continue + } else if err != nil { + continue + } + if !reflect.DeepEqual(out, tc.expected) { + t.Errorf("%s: unexpected output: %#v", k, out) + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/doc.go b/vendor/k8s.io/apimachinery/pkg/runtime/doc.go index a9d084d9f..06b45df66 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/doc.go @@ -42,4 +42,4 @@ limitations under the License. // As a bonus, a few common types useful from all api objects and versions // are provided in types.go. -package runtime +package runtime // import "k8s.io/apimachinery/pkg/runtime" diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/embedded_test.go b/vendor/k8s.io/apimachinery/pkg/runtime/embedded_test.go new file mode 100644 index 000000000..606e0e96a --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/embedded_test.go @@ -0,0 +1,256 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package runtime_test + +import ( + "encoding/json" + "reflect" + "testing" + + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer" + runtimetesting "k8s.io/apimachinery/pkg/runtime/testing" + "k8s.io/apimachinery/pkg/util/diff" +) + +func TestDecodeEmptyRawExtensionAsObject(t *testing.T) { + internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} + externalGV := schema.GroupVersion{Group: "test.group", Version: "v1test"} + externalGVK := externalGV.WithKind("ObjectTest") + + s := runtime.NewScheme() + s.AddKnownTypes(internalGV, &runtimetesting.ObjectTest{}) + s.AddKnownTypeWithName(externalGVK, &runtimetesting.ObjectTestExternal{}) + + codec := serializer.NewCodecFactory(s).LegacyCodec(externalGV) + + obj, gvk, err := codec.Decode([]byte(`{"kind":"`+externalGVK.Kind+`","apiVersion":"`+externalGV.String()+`","items":[{}]}`), nil, nil) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + test := obj.(*runtimetesting.ObjectTest) + if unk, ok := test.Items[0].(*runtime.Unknown); !ok || unk.Kind != "" || unk.APIVersion != "" || string(unk.Raw) != "{}" || unk.ContentType != runtime.ContentTypeJSON { + t.Fatalf("unexpected object: %#v", test.Items[0]) + } + if *gvk != externalGVK { + t.Fatalf("unexpected kind: %#v", gvk) + } + + obj, gvk, err = codec.Decode([]byte(`{"kind":"`+externalGVK.Kind+`","apiVersion":"`+externalGV.String()+`","items":[{"kind":"Other","apiVersion":"v1"}]}`), nil, nil) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + test = obj.(*runtimetesting.ObjectTest) + if unk, ok := test.Items[0].(*runtime.Unknown); !ok || unk.Kind != "" || unk.APIVersion != "" || string(unk.Raw) != `{"kind":"Other","apiVersion":"v1"}` || unk.ContentType != runtime.ContentTypeJSON { + t.Fatalf("unexpected object: %#v", test.Items[0]) + } + if *gvk != externalGVK { + t.Fatalf("unexpected kind: %#v", gvk) + } +} + +func TestArrayOfRuntimeObject(t *testing.T) { + internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} + externalGV := schema.GroupVersion{Group: "test.group", Version: "v1test"} + + s := runtime.NewScheme() + s.AddKnownTypes(internalGV, &runtimetesting.EmbeddedTest{}) + s.AddKnownTypeWithName(externalGV.WithKind("EmbeddedTest"), &runtimetesting.EmbeddedTestExternal{}) + s.AddKnownTypes(internalGV, &runtimetesting.ObjectTest{}) + s.AddKnownTypeWithName(externalGV.WithKind("ObjectTest"), &runtimetesting.ObjectTestExternal{}) + + codec := serializer.NewCodecFactory(s).LegacyCodec(externalGV) + + innerItems := []runtime.Object{ + &runtimetesting.EmbeddedTest{ID: "baz"}, + } + items := []runtime.Object{ + &runtimetesting.EmbeddedTest{ID: "foo"}, + &runtimetesting.EmbeddedTest{ID: "bar"}, + // TODO: until YAML is removed, this JSON must be in ascending key order to ensure consistent roundtrip serialization + &runtime.Unknown{ + Raw: []byte(`{"apiVersion":"unknown.group/unknown","foo":"bar","kind":"OtherTest"}`), + ContentType: runtime.ContentTypeJSON, + }, + &runtimetesting.ObjectTest{ + Items: runtime.NewEncodableList(codec, innerItems), + }, + } + internal := &runtimetesting.ObjectTest{ + Items: runtime.NewEncodableList(codec, items), + } + wire, err := runtime.Encode(codec, internal) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + t.Logf("Wire format is:\n%s\n", string(wire)) + + obj := &runtimetesting.ObjectTestExternal{} + if err := json.Unmarshal(wire, obj); err != nil { + t.Fatalf("unexpected error: %v", err) + } + t.Logf("exact wire is: %s", string(obj.Items[0].Raw)) + + items[3] = &runtimetesting.ObjectTest{Items: innerItems} + internal.Items = items + + decoded, err := runtime.Decode(codec, wire) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + list, err := meta.ExtractList(decoded) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if errs := runtime.DecodeList(list, codec); len(errs) > 0 { + t.Fatalf("unexpected error: %v", errs) + } + + list2, err := meta.ExtractList(list[3]) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if errs := runtime.DecodeList(list2, codec); len(errs) > 0 { + t.Fatalf("unexpected error: %v", errs) + } + if err := meta.SetList(list[3], list2); err != nil { + t.Fatalf("unexpected error: %v", err) + } + + // we want DecodeList to set type meta if possible, even on runtime.Unknown objects + internal.Items[2].(*runtime.Unknown).TypeMeta = runtime.TypeMeta{Kind: "OtherTest", APIVersion: "unknown.group/unknown"} + if e, a := internal.Items, list; !reflect.DeepEqual(e, a) { + t.Errorf("mismatched decoded: %s", diff.ObjectGoPrintSideBySide(e, a)) + } +} + +func TestNestedObject(t *testing.T) { + internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} + externalGV := schema.GroupVersion{Group: "test.group", Version: "v1test"} + embeddedTestExternalGVK := externalGV.WithKind("EmbeddedTest") + + s := runtime.NewScheme() + s.AddKnownTypes(internalGV, &runtimetesting.EmbeddedTest{}) + s.AddKnownTypeWithName(embeddedTestExternalGVK, &runtimetesting.EmbeddedTestExternal{}) + + codec := serializer.NewCodecFactory(s).LegacyCodec(externalGV) + + inner := &runtimetesting.EmbeddedTest{ + ID: "inner", + } + outer := &runtimetesting.EmbeddedTest{ + ID: "outer", + Object: runtime.NewEncodable(codec, inner), + } + + wire, err := runtime.Encode(codec, outer) + if err != nil { + t.Fatalf("Unexpected encode error '%v'", err) + } + + t.Logf("Wire format is:\n%v\n", string(wire)) + + decoded, err := runtime.Decode(codec, wire) + if err != nil { + t.Fatalf("Unexpected decode error %v", err) + } + + // for later tests + outer.Object = inner + + if e, a := outer, decoded; reflect.DeepEqual(e, a) { + t.Errorf("Expected unequal %#v %#v", e, a) + } + + obj, err := runtime.Decode(codec, decoded.(*runtimetesting.EmbeddedTest).Object.(*runtime.Unknown).Raw) + if err != nil { + t.Fatal(err) + } + decoded.(*runtimetesting.EmbeddedTest).Object = obj + if e, a := outer, decoded; !reflect.DeepEqual(e, a) { + t.Errorf("Expected equal %#v %#v", e, a) + } + + // test JSON decoding of the external object, which should preserve + // raw bytes + var externalViaJSON runtimetesting.EmbeddedTestExternal + err = json.Unmarshal(wire, &externalViaJSON) + if err != nil { + t.Fatalf("Unexpected decode error %v", err) + } + if externalViaJSON.Kind == "" || externalViaJSON.APIVersion == "" || externalViaJSON.ID != "outer" { + t.Errorf("Expected objects to have type info set, got %#v", externalViaJSON) + } + if len(externalViaJSON.EmptyObject.Raw) > 0 { + t.Errorf("Expected deserialization of empty nested objects into empty bytes, got %#v", externalViaJSON) + } + + // test JSON decoding, too, since Decode uses yaml unmarshalling. + // Generic Unmarshalling of JSON cannot load the nested objects because there is + // no default schema set. Consumers wishing to get direct JSON decoding must use + // the external representation + var decodedViaJSON runtimetesting.EmbeddedTest + err = json.Unmarshal(wire, &decodedViaJSON) + if err == nil { + t.Fatal("Expeceted decode error") + } + if _, ok := err.(*json.UnmarshalTypeError); !ok { + t.Fatalf("Unexpected decode error: %v", err) + } + if a := decodedViaJSON; a.Object != nil || a.EmptyObject != nil { + t.Errorf("Expected embedded objects to be nil: %#v", a) + } +} + +// TestDeepCopyOfRuntimeObject checks to make sure that runtime.Objects's can be passed through DeepCopy with fidelity +func TestDeepCopyOfRuntimeObject(t *testing.T) { + internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} + externalGV := schema.GroupVersion{Group: "test.group", Version: "v1test"} + embeddedTestExternalGVK := externalGV.WithKind("EmbeddedTest") + + s := runtime.NewScheme() + s.AddKnownTypes(internalGV, &runtimetesting.EmbeddedTest{}) + s.AddKnownTypeWithName(embeddedTestExternalGVK, &runtimetesting.EmbeddedTestExternal{}) + + original := &runtimetesting.EmbeddedTest{ + ID: "outer", + Object: &runtimetesting.EmbeddedTest{ + ID: "inner", + }, + } + + codec := serializer.NewCodecFactory(s).LegacyCodec(externalGV) + + originalData, err := runtime.Encode(codec, original) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + t.Logf("originalRole = %v\n", string(originalData)) + + copyOfOriginal := original.DeepCopy() + copiedData, err := runtime.Encode(codec, copyOfOriginal) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + t.Logf("copyOfRole = %v\n", string(copiedData)) + + if !reflect.DeepEqual(original, copyOfOriginal) { + t.Errorf("expected \n%v\n, got \n%v", string(originalData), string(copiedData)) + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/extension_test.go b/vendor/k8s.io/apimachinery/pkg/runtime/extension_test.go new file mode 100644 index 000000000..5f9154ea6 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/extension_test.go @@ -0,0 +1,113 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package runtime_test + +import ( + "bytes" + "encoding/json" + "reflect" + "testing" + + "k8s.io/apimachinery/pkg/runtime" +) + +func TestEmbeddedRawExtensionMarshal(t *testing.T) { + type test struct { + Ext runtime.RawExtension + } + + extension := test{Ext: runtime.RawExtension{Raw: []byte(`{"foo":"bar"}`)}} + data, err := json.Marshal(extension) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if string(data) != `{"Ext":{"foo":"bar"}}` { + t.Errorf("unexpected data: %s", string(data)) + } +} +func TestEmbeddedRawExtensionUnmarshal(t *testing.T) { + type test struct { + Ext runtime.RawExtension + } + + testCases := map[string]struct { + orig test + }{ + "non-empty object": { + orig: test{Ext: runtime.RawExtension{Raw: []byte(`{"foo":"bar"}`)}}, + }, + "empty object": { + orig: test{Ext: runtime.RawExtension{}}, + }, + } + + for k, tc := range testCases { + new := test{} + data, _ := json.Marshal(tc.orig) + if err := json.Unmarshal(data, &new); err != nil { + t.Errorf("%s: umarshal error: %v", k, err) + } + if !reflect.DeepEqual(tc.orig, new) { + t.Errorf("%s: unmarshaled struct differs from original: %v %v", k, tc.orig, new) + } + } +} + +func TestEmbeddedRawExtensionRoundTrip(t *testing.T) { + type test struct { + Ext runtime.RawExtension + } + + testCases := map[string]struct { + orig test + }{ + "non-empty object": { + orig: test{Ext: runtime.RawExtension{Raw: []byte(`{"foo":"bar"}`)}}, + }, + "empty object": { + orig: test{Ext: runtime.RawExtension{}}, + }, + } + + for k, tc := range testCases { + new1 := test{} + new2 := test{} + data, err := json.Marshal(tc.orig) + if err != nil { + t.Errorf("1st marshal error: %v", err) + } + if err = json.Unmarshal(data, &new1); err != nil { + t.Errorf("1st unmarshal error: %v", err) + } + newData, err := json.Marshal(new1) + if err != nil { + t.Errorf("2st marshal error: %v", err) + } + if err = json.Unmarshal(newData, &new2); err != nil { + t.Errorf("2nd unmarshal error: %v", err) + } + if !bytes.Equal(data, newData) { + t.Errorf("%s: re-marshaled data differs from original: %v %v", k, data, newData) + } + if !reflect.DeepEqual(tc.orig, new1) { + t.Errorf("%s: unmarshaled struct differs from original: %v %v", k, tc.orig, new1) + } + if !reflect.DeepEqual(new1, new2) { + t.Errorf("%s: re-unmarshaled struct differs from original: %v %v", k, new1, new2) + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version_test.go b/vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version_test.go new file mode 100644 index 000000000..51f26df7f --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version_test.go @@ -0,0 +1,136 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package schema + +import ( + "testing" +) + +func TestGroupVersionParse(t *testing.T) { + tests := []struct { + input string + out GroupVersion + err func(error) bool + }{ + {input: "v1", out: GroupVersion{Version: "v1"}}, + {input: "v2", out: GroupVersion{Version: "v2"}}, + {input: "/v1", out: GroupVersion{Version: "v1"}}, + {input: "v1/", out: GroupVersion{Group: "v1"}}, + {input: "/v1/", err: func(err error) bool { return err.Error() == "unexpected GroupVersion string: /v1/" }}, + {input: "v1/a", out: GroupVersion{Group: "v1", Version: "a"}}, + } + for i, test := range tests { + out, err := ParseGroupVersion(test.input) + if test.err == nil && err != nil || err == nil && test.err != nil { + t.Errorf("%d: unexpected error: %v", i, err) + continue + } + if test.err != nil && !test.err(err) { + t.Errorf("%d: unexpected error: %v", i, err) + continue + } + if out != test.out { + t.Errorf("%d: unexpected output: %#v", i, out) + } + } +} + +func TestGroupResourceParse(t *testing.T) { + tests := []struct { + input string + out GroupResource + }{ + {input: "v1", out: GroupResource{Resource: "v1"}}, + {input: ".v1", out: GroupResource{Group: "v1"}}, + {input: "v1.", out: GroupResource{Resource: "v1"}}, + {input: "v1.a", out: GroupResource{Group: "a", Resource: "v1"}}, + {input: "b.v1.a", out: GroupResource{Group: "v1.a", Resource: "b"}}, + } + for i, test := range tests { + out := ParseGroupResource(test.input) + if out != test.out { + t.Errorf("%d: unexpected output: %#v", i, out) + } + } +} + +func TestParseResourceArg(t *testing.T) { + tests := []struct { + input string + gvr *GroupVersionResource + gr GroupResource + }{ + {input: "v1", gr: GroupResource{Resource: "v1"}}, + {input: ".v1", gr: GroupResource{Group: "v1"}}, + {input: "v1.", gr: GroupResource{Resource: "v1"}}, + {input: "v1.a", gr: GroupResource{Group: "a", Resource: "v1"}}, + {input: "b.v1.a", gvr: &GroupVersionResource{Group: "a", Version: "v1", Resource: "b"}, gr: GroupResource{Group: "v1.a", Resource: "b"}}, + } + for i, test := range tests { + gvr, gr := ParseResourceArg(test.input) + if (gvr != nil && test.gvr == nil) || (gvr == nil && test.gvr != nil) || (test.gvr != nil && *gvr != *test.gvr) { + t.Errorf("%d: unexpected output: %#v", i, gvr) + } + if gr != test.gr { + t.Errorf("%d: unexpected output: %#v", i, gr) + } + } +} + +func TestKindForGroupVersionKinds(t *testing.T) { + gvks := GroupVersions{ + GroupVersion{Group: "batch", Version: "v1"}, + GroupVersion{Group: "batch", Version: "v2alpha1"}, + GroupVersion{Group: "policy", Version: "v1beta1"}, + } + cases := []struct { + input []GroupVersionKind + target GroupVersionKind + ok bool + }{ + { + input: []GroupVersionKind{{Group: "batch", Version: "v2alpha1", Kind: "ScheduledJob"}}, + target: GroupVersionKind{Group: "batch", Version: "v2alpha1", Kind: "ScheduledJob"}, + ok: true, + }, + { + input: []GroupVersionKind{{Group: "batch", Version: "v3alpha1", Kind: "CronJob"}}, + target: GroupVersionKind{Group: "batch", Version: "v1", Kind: "CronJob"}, + ok: true, + }, + { + input: []GroupVersionKind{{Group: "policy", Version: "v1beta1", Kind: "PodDisruptionBudget"}}, + target: GroupVersionKind{Group: "policy", Version: "v1beta1", Kind: "PodDisruptionBudget"}, + ok: true, + }, + { + input: []GroupVersionKind{{Group: "apps", Version: "v1alpha1", Kind: "StatefulSet"}}, + target: GroupVersionKind{}, + ok: false, + }, + } + + for i, c := range cases { + target, ok := gvks.KindForGroupVersionKinds(c.input) + if c.target != target { + t.Errorf("%d: unexpected target: %v, expected %v", i, target, c.target) + } + if c.ok != ok { + t.Errorf("%d: unexpected ok: %v, expected %v", i, ok, c.ok) + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/scheme_test.go b/vendor/k8s.io/apimachinery/pkg/runtime/scheme_test.go new file mode 100644 index 000000000..3e623f642 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/scheme_test.go @@ -0,0 +1,861 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package runtime_test + +import ( + "reflect" + "strings" + "testing" + + "github.com/google/gofuzz" + flag "github.com/spf13/pflag" + + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer" + runtimetesting "k8s.io/apimachinery/pkg/runtime/testing" + "k8s.io/apimachinery/pkg/util/diff" +) + +var fuzzIters = flag.Int("fuzz-iters", 50, "How many fuzzing iterations to do.") + +func TestScheme(t *testing.T) { + internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} + externalGV := schema.GroupVersion{Group: "test.group", Version: "testExternal"} + + scheme := runtime.NewScheme() + scheme.AddKnownTypeWithName(internalGV.WithKind("Simple"), &runtimetesting.InternalSimple{}) + scheme.AddKnownTypeWithName(externalGV.WithKind("Simple"), &runtimetesting.ExternalSimple{}) + + // If set, would clear TypeMeta during conversion. + //scheme.AddIgnoredConversionType(&TypeMeta{}, &TypeMeta{}) + + // test that scheme is an ObjectTyper + var _ runtime.ObjectTyper = scheme + + internalToExternalCalls := 0 + externalToInternalCalls := 0 + + // Register functions to verify that scope.Meta() gets set correctly. + err := scheme.AddConversionFuncs( + func(in *runtimetesting.InternalSimple, out *runtimetesting.ExternalSimple, scope conversion.Scope) error { + scope.Convert(&in.TypeMeta, &out.TypeMeta, 0) + scope.Convert(&in.TestString, &out.TestString, 0) + internalToExternalCalls++ + return nil + }, + func(in *runtimetesting.ExternalSimple, out *runtimetesting.InternalSimple, scope conversion.Scope) error { + scope.Convert(&in.TypeMeta, &out.TypeMeta, 0) + scope.Convert(&in.TestString, &out.TestString, 0) + externalToInternalCalls++ + return nil + }, + ) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + codecs := serializer.NewCodecFactory(scheme) + codec := codecs.LegacyCodec(externalGV) + info, _ := runtime.SerializerInfoForMediaType(codecs.SupportedMediaTypes(), runtime.ContentTypeJSON) + jsonserializer := info.Serializer + + simple := &runtimetesting.InternalSimple{ + TestString: "foo", + } + + // Test Encode, Decode, DecodeInto, and DecodeToVersion + obj := runtime.Object(simple) + data, err := runtime.Encode(codec, obj) + if err != nil { + t.Fatal(err) + } + + obj2, err := runtime.Decode(codec, data) + if err != nil { + t.Fatal(err) + } + if _, ok := obj2.(*runtimetesting.InternalSimple); !ok { + t.Fatalf("Got wrong type") + } + if e, a := simple, obj2; !reflect.DeepEqual(e, a) { + t.Errorf("Expected:\n %#v,\n Got:\n %#v", e, a) + } + + obj3 := &runtimetesting.InternalSimple{} + if err := runtime.DecodeInto(codec, data, obj3); err != nil { + t.Fatal(err) + } + // clearing TypeMeta is a function of the scheme, which we do not test here (ConvertToVersion + // does not automatically clear TypeMeta anymore). + simple.TypeMeta = runtime.TypeMeta{Kind: "Simple", APIVersion: externalGV.String()} + if e, a := simple, obj3; !reflect.DeepEqual(e, a) { + t.Errorf("Expected:\n %#v,\n Got:\n %#v", e, a) + } + + obj4, err := runtime.Decode(jsonserializer, data) + if err != nil { + t.Fatal(err) + } + if _, ok := obj4.(*runtimetesting.ExternalSimple); !ok { + t.Fatalf("Got wrong type") + } + + // Test Convert + external := &runtimetesting.ExternalSimple{} + err = scheme.Convert(simple, external, nil) + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + if e, a := simple.TestString, external.TestString; e != a { + t.Errorf("Expected %v, got %v", e, a) + } + + // Encode and Convert should each have caused an increment. + if e, a := 2, internalToExternalCalls; e != a { + t.Errorf("Expected %v, got %v", e, a) + } + // DecodeInto and Decode should each have caused an increment because of a conversion + if e, a := 2, externalToInternalCalls; e != a { + t.Errorf("Expected %v, got %v", e, a) + } +} + +func TestBadJSONRejection(t *testing.T) { + scheme := runtime.NewScheme() + codecs := serializer.NewCodecFactory(scheme) + info, _ := runtime.SerializerInfoForMediaType(codecs.SupportedMediaTypes(), runtime.ContentTypeJSON) + jsonserializer := info.Serializer + + badJSONMissingKind := []byte(`{ }`) + if _, err := runtime.Decode(jsonserializer, badJSONMissingKind); err == nil { + t.Errorf("Did not reject despite lack of kind field: %s", badJSONMissingKind) + } + badJSONUnknownType := []byte(`{"kind": "bar"}`) + if _, err1 := runtime.Decode(jsonserializer, badJSONUnknownType); err1 == nil { + t.Errorf("Did not reject despite use of unknown type: %s", badJSONUnknownType) + } + /*badJSONKindMismatch := []byte(`{"kind": "Pod"}`) + if err2 := DecodeInto(badJSONKindMismatch, &Node{}); err2 == nil { + t.Errorf("Kind is set but doesn't match the object type: %s", badJSONKindMismatch) + }*/ +} + +func TestExternalToInternalMapping(t *testing.T) { + internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} + externalGV := schema.GroupVersion{Group: "test.group", Version: "testExternal"} + + scheme := runtime.NewScheme() + scheme.AddKnownTypeWithName(internalGV.WithKind("OptionalExtensionType"), &runtimetesting.InternalOptionalExtensionType{}) + scheme.AddKnownTypeWithName(externalGV.WithKind("OptionalExtensionType"), &runtimetesting.ExternalOptionalExtensionType{}) + + codec := serializer.NewCodecFactory(scheme).LegacyCodec(externalGV) + + table := []struct { + obj runtime.Object + encoded string + }{ + { + &runtimetesting.InternalOptionalExtensionType{Extension: nil}, + `{"kind":"OptionalExtensionType","apiVersion":"` + externalGV.String() + `"}`, + }, + } + + for i, item := range table { + gotDecoded, err := runtime.Decode(codec, []byte(item.encoded)) + if err != nil { + t.Errorf("unexpected error '%v' (%v)", err, item.encoded) + } else if e, a := item.obj, gotDecoded; !reflect.DeepEqual(e, a) { + t.Errorf("%d: unexpected objects:\n%s", i, diff.ObjectGoPrintSideBySide(e, a)) + } + } +} + +func TestExtensionMapping(t *testing.T) { + internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} + externalGV := schema.GroupVersion{Group: "test.group", Version: "testExternal"} + + scheme := runtime.NewScheme() + scheme.AddKnownTypeWithName(internalGV.WithKind("ExtensionType"), &runtimetesting.InternalExtensionType{}) + scheme.AddKnownTypeWithName(internalGV.WithKind("OptionalExtensionType"), &runtimetesting.InternalOptionalExtensionType{}) + scheme.AddKnownTypeWithName(externalGV.WithKind("ExtensionType"), &runtimetesting.ExternalExtensionType{}) + scheme.AddKnownTypeWithName(externalGV.WithKind("OptionalExtensionType"), &runtimetesting.ExternalOptionalExtensionType{}) + + // register external first when the object is the same in both schemes, so ObjectVersionAndKind reports the + // external version. + scheme.AddKnownTypeWithName(externalGV.WithKind("A"), &runtimetesting.ExtensionA{}) + scheme.AddKnownTypeWithName(externalGV.WithKind("B"), &runtimetesting.ExtensionB{}) + scheme.AddKnownTypeWithName(internalGV.WithKind("A"), &runtimetesting.ExtensionA{}) + scheme.AddKnownTypeWithName(internalGV.WithKind("B"), &runtimetesting.ExtensionB{}) + + codec := serializer.NewCodecFactory(scheme).LegacyCodec(externalGV) + + table := []struct { + obj runtime.Object + expected runtime.Object + encoded string + }{ + { + &runtimetesting.InternalExtensionType{ + Extension: runtime.NewEncodable(codec, &runtimetesting.ExtensionA{TestString: "foo"}), + }, + &runtimetesting.InternalExtensionType{ + Extension: &runtime.Unknown{ + Raw: []byte(`{"apiVersion":"test.group/testExternal","kind":"A","testString":"foo"}`), + ContentType: runtime.ContentTypeJSON, + }, + }, + // apiVersion is set in the serialized object for easier consumption by clients + `{"apiVersion":"` + externalGV.String() + `","kind":"ExtensionType","extension":{"apiVersion":"test.group/testExternal","kind":"A","testString":"foo"}} +`, + }, { + &runtimetesting.InternalExtensionType{Extension: runtime.NewEncodable(codec, &runtimetesting.ExtensionB{TestString: "bar"})}, + &runtimetesting.InternalExtensionType{ + Extension: &runtime.Unknown{ + Raw: []byte(`{"apiVersion":"test.group/testExternal","kind":"B","testString":"bar"}`), + ContentType: runtime.ContentTypeJSON, + }, + }, + // apiVersion is set in the serialized object for easier consumption by clients + `{"apiVersion":"` + externalGV.String() + `","kind":"ExtensionType","extension":{"apiVersion":"test.group/testExternal","kind":"B","testString":"bar"}} +`, + }, { + &runtimetesting.InternalExtensionType{Extension: nil}, + &runtimetesting.InternalExtensionType{ + Extension: nil, + }, + `{"apiVersion":"` + externalGV.String() + `","kind":"ExtensionType","extension":null} +`, + }, + } + + for i, item := range table { + gotEncoded, err := runtime.Encode(codec, item.obj) + if err != nil { + t.Errorf("unexpected error '%v' (%#v)", err, item.obj) + } else if e, a := item.encoded, string(gotEncoded); e != a { + t.Errorf("expected\n%#v\ngot\n%#v\n", e, a) + } + + gotDecoded, err := runtime.Decode(codec, []byte(item.encoded)) + if err != nil { + t.Errorf("unexpected error '%v' (%v)", err, item.encoded) + } else if e, a := item.expected, gotDecoded; !reflect.DeepEqual(e, a) { + t.Errorf("%d: unexpected objects:\n%s", i, diff.ObjectGoPrintSideBySide(e, a)) + } + } +} + +func TestEncode(t *testing.T) { + internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} + externalGV := schema.GroupVersion{Group: "test.group", Version: "testExternal"} + + scheme := runtime.NewScheme() + scheme.AddKnownTypeWithName(internalGV.WithKind("Simple"), &runtimetesting.InternalSimple{}) + scheme.AddKnownTypeWithName(externalGV.WithKind("Simple"), &runtimetesting.ExternalSimple{}) + + codec := serializer.NewCodecFactory(scheme).LegacyCodec(externalGV) + + test := &runtimetesting.InternalSimple{ + TestString: "I'm the same", + } + obj := runtime.Object(test) + data, err := runtime.Encode(codec, obj) + obj2, gvk, err2 := codec.Decode(data, nil, nil) + if err != nil || err2 != nil { + t.Fatalf("Failure: '%v' '%v'", err, err2) + } + if _, ok := obj2.(*runtimetesting.InternalSimple); !ok { + t.Fatalf("Got wrong type") + } + if !reflect.DeepEqual(obj2, test) { + t.Errorf("Expected:\n %#v,\n Got:\n %#v", test, obj2) + } + if !reflect.DeepEqual(gvk, &schema.GroupVersionKind{Group: "test.group", Version: "testExternal", Kind: "Simple"}) { + t.Errorf("unexpected gvk returned by decode: %#v", gvk) + } +} + +func TestUnversionedTypes(t *testing.T) { + internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} + externalGV := schema.GroupVersion{Group: "test.group", Version: "testExternal"} + otherGV := schema.GroupVersion{Group: "group", Version: "other"} + + scheme := runtime.NewScheme() + scheme.AddUnversionedTypes(externalGV, &runtimetesting.InternalSimple{}) + scheme.AddKnownTypeWithName(internalGV.WithKind("Simple"), &runtimetesting.InternalSimple{}) + scheme.AddKnownTypeWithName(externalGV.WithKind("Simple"), &runtimetesting.ExternalSimple{}) + scheme.AddKnownTypeWithName(otherGV.WithKind("Simple"), &runtimetesting.ExternalSimple{}) + + codec := serializer.NewCodecFactory(scheme).LegacyCodec(externalGV) + + if unv, ok := scheme.IsUnversioned(&runtimetesting.InternalSimple{}); !unv || !ok { + t.Fatalf("type not unversioned and in scheme: %t %t", unv, ok) + } + + kinds, _, err := scheme.ObjectKinds(&runtimetesting.InternalSimple{}) + if err != nil { + t.Fatal(err) + } + kind := kinds[0] + if kind != externalGV.WithKind("InternalSimple") { + t.Fatalf("unexpected: %#v", kind) + } + + test := &runtimetesting.InternalSimple{ + TestString: "I'm the same", + } + obj := runtime.Object(test) + data, err := runtime.Encode(codec, obj) + if err != nil { + t.Fatal(err) + } + obj2, gvk, err := codec.Decode(data, nil, nil) + if err != nil { + t.Fatal(err) + } + if _, ok := obj2.(*runtimetesting.InternalSimple); !ok { + t.Fatalf("Got wrong type") + } + if !reflect.DeepEqual(obj2, test) { + t.Errorf("Expected:\n %#v,\n Got:\n %#v", test, obj2) + } + // object is serialized as an unversioned object (in the group and version it was defined in) + if !reflect.DeepEqual(gvk, &schema.GroupVersionKind{Group: "test.group", Version: "testExternal", Kind: "InternalSimple"}) { + t.Errorf("unexpected gvk returned by decode: %#v", gvk) + } + + // when serialized to a different group, the object is kept in its preferred name + codec = serializer.NewCodecFactory(scheme).LegacyCodec(otherGV) + data, err = runtime.Encode(codec, obj) + if err != nil { + t.Fatal(err) + } + if string(data) != `{"apiVersion":"test.group/testExternal","kind":"InternalSimple","testString":"I'm the same"}`+"\n" { + t.Errorf("unexpected data: %s", data) + } +} + +// TestObjectFuzzer can randomly populate all the above objects. +var TestObjectFuzzer = fuzz.New().NilChance(.5).NumElements(1, 100).Funcs( + func(j *runtimetesting.MyWeirdCustomEmbeddedVersionKindField, c fuzz.Continue) { + // We have to customize the randomization of MyWeirdCustomEmbeddedVersionKindFields because their + // APIVersion and Kind must remain blank in memory. + j.APIVersion = "" + j.ObjectKind = "" + j.ID = c.RandString() + }, +) + +// Returns a new Scheme set up with the test objects. +func GetTestScheme() *runtime.Scheme { + internalGV := schema.GroupVersion{Version: "__internal"} + externalGV := schema.GroupVersion{Version: "v1"} + alternateExternalGV := schema.GroupVersion{Group: "custom", Version: "v1"} + differentExternalGV := schema.GroupVersion{Group: "other", Version: "v2"} + + s := runtime.NewScheme() + // Ordinarily, we wouldn't add TestType2, but because this is a test and + // both types are from the same package, we need to get it into the system + // so that converter will match it with ExternalType2. + s.AddKnownTypes(internalGV, &runtimetesting.TestType1{}, &runtimetesting.TestType2{}, &runtimetesting.ExternalInternalSame{}) + s.AddKnownTypes(externalGV, &runtimetesting.ExternalInternalSame{}) + s.AddKnownTypeWithName(externalGV.WithKind("TestType1"), &runtimetesting.ExternalTestType1{}) + s.AddKnownTypeWithName(externalGV.WithKind("TestType2"), &runtimetesting.ExternalTestType2{}) + s.AddKnownTypeWithName(internalGV.WithKind("TestType3"), &runtimetesting.TestType1{}) + s.AddKnownTypeWithName(externalGV.WithKind("TestType3"), &runtimetesting.ExternalTestType1{}) + s.AddKnownTypeWithName(externalGV.WithKind("TestType4"), &runtimetesting.ExternalTestType1{}) + s.AddKnownTypeWithName(alternateExternalGV.WithKind("TestType3"), &runtimetesting.ExternalTestType1{}) + s.AddKnownTypeWithName(alternateExternalGV.WithKind("TestType5"), &runtimetesting.ExternalTestType1{}) + s.AddKnownTypeWithName(differentExternalGV.WithKind("TestType1"), &runtimetesting.ExternalTestType1{}) + s.AddUnversionedTypes(externalGV, &runtimetesting.UnversionedType{}) + return s +} + +func TestKnownTypes(t *testing.T) { + s := GetTestScheme() + if len(s.KnownTypes(schema.GroupVersion{Group: "group", Version: "v2"})) != 0 { + t.Errorf("should have no known types for v2") + } + + types := s.KnownTypes(schema.GroupVersion{Version: "v1"}) + for _, s := range []string{"TestType1", "TestType2", "TestType3", "ExternalInternalSame"} { + if _, ok := types[s]; !ok { + t.Errorf("missing type %q", s) + } + } +} + +func TestAddKnownTypesIdemPotent(t *testing.T) { + s := runtime.NewScheme() + + gv := schema.GroupVersion{Group: "foo", Version: "v1"} + s.AddKnownTypes(gv, &runtimetesting.InternalSimple{}) + s.AddKnownTypes(gv, &runtimetesting.InternalSimple{}) + if len(s.KnownTypes(gv)) != 1 { + t.Errorf("expected only one %v type after double registration", gv) + } + if len(s.AllKnownTypes()) != 1 { + t.Errorf("expected only one type after double registration") + } + + s.AddKnownTypeWithName(gv.WithKind("InternalSimple"), &runtimetesting.InternalSimple{}) + s.AddKnownTypeWithName(gv.WithKind("InternalSimple"), &runtimetesting.InternalSimple{}) + if len(s.KnownTypes(gv)) != 1 { + t.Errorf("expected only one %v type after double registration with custom name", gv) + } + if len(s.AllKnownTypes()) != 1 { + t.Errorf("expected only one type after double registration with custom name") + } + + s.AddUnversionedTypes(gv, &runtimetesting.InternalSimple{}) + s.AddUnversionedTypes(gv, &runtimetesting.InternalSimple{}) + if len(s.KnownTypes(gv)) != 1 { + t.Errorf("expected only one %v type after double registration with custom name", gv) + } + if len(s.AllKnownTypes()) != 1 { + t.Errorf("expected only one type after double registration with custom name") + } + + kinds, _, err := s.ObjectKinds(&runtimetesting.InternalSimple{}) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if len(kinds) != 1 { + t.Errorf("expected only one kind for InternalSimple after double registration") + } +} + +// redefine InternalSimple with the same name, but obviously as a different type than in runtimetesting +type InternalSimple struct { + runtime.TypeMeta `json:",inline"` + TestString string `json:"testString"` +} + +func (s *InternalSimple) DeepCopyObject() runtime.Object { return nil } + +func TestConflictingAddKnownTypes(t *testing.T) { + s := runtime.NewScheme() + gv := schema.GroupVersion{Group: "foo", Version: "v1"} + + panicked := make(chan bool) + go func() { + defer func() { + if recover() != nil { + panicked <- true + } + }() + s.AddKnownTypeWithName(gv.WithKind("InternalSimple"), &runtimetesting.InternalSimple{}) + s.AddKnownTypeWithName(gv.WithKind("InternalSimple"), &runtimetesting.ExternalSimple{}) + panicked <- false + }() + if !<-panicked { + t.Errorf("Expected AddKnownTypesWithName to panic with conflicting type registrations") + } + + go func() { + defer func() { + if recover() != nil { + panicked <- true + } + }() + + s.AddUnversionedTypes(gv, &runtimetesting.InternalSimple{}) + s.AddUnversionedTypes(gv, &InternalSimple{}) + panicked <- false + }() + if !<-panicked { + t.Errorf("Expected AddUnversionedTypes to panic with conflicting type registrations") + } +} + +func TestConvertToVersionBasic(t *testing.T) { + s := GetTestScheme() + tt := &runtimetesting.TestType1{A: "I'm not a pointer object"} + other, err := s.ConvertToVersion(tt, schema.GroupVersion{Version: "v1"}) + if err != nil { + t.Fatalf("Failure: %v", err) + } + converted, ok := other.(*runtimetesting.ExternalTestType1) + if !ok { + t.Fatalf("Got wrong type: %T", other) + } + if tt.A != converted.A { + t.Fatalf("Failed to convert object correctly: %#v", converted) + } +} + +type testGroupVersioner struct { + target schema.GroupVersionKind + ok bool +} + +func (m testGroupVersioner) KindForGroupVersionKinds(kinds []schema.GroupVersionKind) (schema.GroupVersionKind, bool) { + return m.target, m.ok +} + +func TestConvertToVersion(t *testing.T) { + testCases := []struct { + scheme *runtime.Scheme + in runtime.Object + gv runtime.GroupVersioner + same bool + out runtime.Object + errFn func(error) bool + }{ + // errors if the type is not registered in the scheme + { + scheme: GetTestScheme(), + in: &runtimetesting.UnknownType{}, + errFn: func(err error) bool { return err != nil && runtime.IsNotRegisteredError(err) }, + }, + // errors if the group versioner returns no target + { + scheme: GetTestScheme(), + in: &runtimetesting.ExternalTestType1{A: "test"}, + gv: testGroupVersioner{}, + errFn: func(err error) bool { + return err != nil && strings.Contains(err.Error(), "is not suitable for converting") + }, + }, + // converts to internal + { + scheme: GetTestScheme(), + in: &runtimetesting.ExternalTestType1{A: "test"}, + gv: schema.GroupVersion{Version: "__internal"}, + out: &runtimetesting.TestType1{A: "test"}, + }, + // prefers the best match + { + scheme: GetTestScheme(), + in: &runtimetesting.ExternalTestType1{A: "test"}, + gv: schema.GroupVersions{{Version: "__internal"}, {Version: "v1"}}, + out: &runtimetesting.ExternalTestType1{ + MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "TestType1"}, + A: "test", + }, + }, + // unversioned type returned as-is + { + scheme: GetTestScheme(), + in: &runtimetesting.UnversionedType{A: "test"}, + gv: schema.GroupVersions{{Version: "v1"}}, + same: true, + out: &runtimetesting.UnversionedType{ + MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "UnversionedType"}, + A: "test", + }, + }, + // unversioned type returned when not included in the target types + { + scheme: GetTestScheme(), + in: &runtimetesting.UnversionedType{A: "test"}, + gv: schema.GroupVersions{{Group: "other", Version: "v2"}}, + same: true, + out: &runtimetesting.UnversionedType{ + MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "UnversionedType"}, + A: "test", + }, + }, + // detected as already being in the target version + { + scheme: GetTestScheme(), + in: &runtimetesting.ExternalTestType1{A: "test"}, + gv: schema.GroupVersions{{Version: "v1"}}, + same: true, + out: &runtimetesting.ExternalTestType1{ + MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "TestType1"}, + A: "test", + }, + }, + // detected as already being in the first target version + { + scheme: GetTestScheme(), + in: &runtimetesting.ExternalTestType1{A: "test"}, + gv: schema.GroupVersions{{Version: "v1"}, {Version: "__internal"}}, + same: true, + out: &runtimetesting.ExternalTestType1{ + MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "TestType1"}, + A: "test", + }, + }, + // detected as already being in the first target version + { + scheme: GetTestScheme(), + in: &runtimetesting.ExternalTestType1{A: "test"}, + gv: schema.GroupVersions{{Version: "v1"}, {Version: "__internal"}}, + same: true, + out: &runtimetesting.ExternalTestType1{ + MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "TestType1"}, + A: "test", + }, + }, + // the external type is registered in multiple groups, versions, and kinds, and can be targeted to all of them (1/3): different kind + { + scheme: GetTestScheme(), + in: &runtimetesting.ExternalTestType1{A: "test"}, + gv: testGroupVersioner{ok: true, target: schema.GroupVersionKind{Kind: "TestType3", Version: "v1"}}, + same: true, + out: &runtimetesting.ExternalTestType1{ + MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "TestType3"}, + A: "test", + }, + }, + // the external type is registered in multiple groups, versions, and kinds, and can be targeted to all of them (2/3): different gv + { + scheme: GetTestScheme(), + in: &runtimetesting.ExternalTestType1{A: "test"}, + gv: testGroupVersioner{ok: true, target: schema.GroupVersionKind{Kind: "TestType3", Group: "custom", Version: "v1"}}, + same: true, + out: &runtimetesting.ExternalTestType1{ + MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "custom/v1", ObjectKind: "TestType3"}, + A: "test", + }, + }, + // the external type is registered in multiple groups, versions, and kinds, and can be targeted to all of them (3/3): different gvk + { + scheme: GetTestScheme(), + in: &runtimetesting.ExternalTestType1{A: "test"}, + gv: testGroupVersioner{ok: true, target: schema.GroupVersionKind{Group: "custom", Version: "v1", Kind: "TestType5"}}, + same: true, + out: &runtimetesting.ExternalTestType1{ + MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "custom/v1", ObjectKind: "TestType5"}, + A: "test", + }, + }, + // multi group versioner recognizes multiple groups and forces the output to a particular version, copies because version differs + { + scheme: GetTestScheme(), + in: &runtimetesting.ExternalTestType1{A: "test"}, + gv: runtime.NewMultiGroupVersioner(schema.GroupVersion{Group: "other", Version: "v2"}, schema.GroupKind{Group: "custom", Kind: "TestType3"}, schema.GroupKind{Kind: "TestType1"}), + out: &runtimetesting.ExternalTestType1{ + MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "other/v2", ObjectKind: "TestType1"}, + A: "test", + }, + }, + // multi group versioner recognizes multiple groups and forces the output to a particular version, copies because version differs + { + scheme: GetTestScheme(), + in: &runtimetesting.ExternalTestType1{A: "test"}, + gv: runtime.NewMultiGroupVersioner(schema.GroupVersion{Group: "other", Version: "v2"}, schema.GroupKind{Kind: "TestType1"}, schema.GroupKind{Group: "custom", Kind: "TestType3"}), + out: &runtimetesting.ExternalTestType1{ + MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "other/v2", ObjectKind: "TestType1"}, + A: "test", + }, + }, + // multi group versioner is unable to find a match when kind AND group don't match (there is no TestType1 kind in group "other", and no kind "TestType5" in the default group) + { + scheme: GetTestScheme(), + in: &runtimetesting.TestType1{A: "test"}, + gv: runtime.NewMultiGroupVersioner(schema.GroupVersion{Group: "custom", Version: "v1"}, schema.GroupKind{Group: "other"}, schema.GroupKind{Kind: "TestType5"}), + errFn: func(err error) bool { + return err != nil && strings.Contains(err.Error(), "is not suitable for converting") + }, + }, + // multi group versioner recognizes multiple groups and forces the output to a particular version, performs no copy + { + scheme: GetTestScheme(), + in: &runtimetesting.ExternalTestType1{A: "test"}, + gv: runtime.NewMultiGroupVersioner(schema.GroupVersion{Group: "", Version: "v1"}, schema.GroupKind{Group: "custom", Kind: "TestType3"}, schema.GroupKind{Kind: "TestType1"}), + same: true, + out: &runtimetesting.ExternalTestType1{ + MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "TestType1"}, + A: "test", + }, + }, + // multi group versioner recognizes multiple groups and forces the output to a particular version, performs no copy + { + scheme: GetTestScheme(), + in: &runtimetesting.ExternalTestType1{A: "test"}, + gv: runtime.NewMultiGroupVersioner(schema.GroupVersion{Group: "", Version: "v1"}, schema.GroupKind{Kind: "TestType1"}, schema.GroupKind{Group: "custom", Kind: "TestType3"}), + same: true, + out: &runtimetesting.ExternalTestType1{ + MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "TestType1"}, + A: "test", + }, + }, + // group versioner can choose a particular target kind for a given input when kind is the same across group versions + { + scheme: GetTestScheme(), + in: &runtimetesting.TestType1{A: "test"}, + gv: testGroupVersioner{ok: true, target: schema.GroupVersionKind{Version: "v1", Kind: "TestType3"}}, + out: &runtimetesting.ExternalTestType1{ + MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "TestType3"}, + A: "test", + }, + }, + // group versioner can choose a different kind + { + scheme: GetTestScheme(), + in: &runtimetesting.TestType1{A: "test"}, + gv: testGroupVersioner{ok: true, target: schema.GroupVersionKind{Kind: "TestType5", Group: "custom", Version: "v1"}}, + out: &runtimetesting.ExternalTestType1{ + MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "custom/v1", ObjectKind: "TestType5"}, + A: "test", + }, + }, + } + for i, test := range testCases { + original := test.in.DeepCopyObject() + out, err := test.scheme.ConvertToVersion(test.in, test.gv) + switch { + case test.errFn != nil: + if !test.errFn(err) { + t.Errorf("%d: unexpected error: %v", i, err) + } + continue + case err != nil: + t.Errorf("%d: unexpected error: %v", i, err) + continue + } + if out == test.in { + t.Errorf("%d: ConvertToVersion should always copy out: %#v", i, out) + continue + } + + if test.same { + if !reflect.DeepEqual(original, test.in) { + t.Errorf("%d: unexpected mutation of input: %s", i, diff.ObjectReflectDiff(original, test.in)) + continue + } + if !reflect.DeepEqual(out, test.out) { + t.Errorf("%d: unexpected out: %s", i, diff.ObjectReflectDiff(out, test.out)) + continue + } + unsafe, err := test.scheme.UnsafeConvertToVersion(test.in, test.gv) + if err != nil { + t.Errorf("%d: unexpected error: %v", i, err) + continue + } + if !reflect.DeepEqual(unsafe, test.out) { + t.Errorf("%d: unexpected unsafe: %s", i, diff.ObjectReflectDiff(unsafe, test.out)) + continue + } + if unsafe != test.in { + t.Errorf("%d: UnsafeConvertToVersion should return same object: %#v", i, unsafe) + continue + } + continue + } + if !reflect.DeepEqual(out, test.out) { + t.Errorf("%d: unexpected out: %s", i, diff.ObjectReflectDiff(out, test.out)) + continue + } + } +} + +func TestMetaValues(t *testing.T) { + internalGV := schema.GroupVersion{Group: "test.group", Version: "__internal"} + externalGV := schema.GroupVersion{Group: "test.group", Version: "externalVersion"} + + s := runtime.NewScheme() + s.AddKnownTypeWithName(internalGV.WithKind("Simple"), &runtimetesting.InternalSimple{}) + s.AddKnownTypeWithName(externalGV.WithKind("Simple"), &runtimetesting.ExternalSimple{}) + + internalToExternalCalls := 0 + externalToInternalCalls := 0 + + // Register functions to verify that scope.Meta() gets set correctly. + err := s.AddConversionFuncs( + func(in *runtimetesting.InternalSimple, out *runtimetesting.ExternalSimple, scope conversion.Scope) error { + t.Logf("internal -> external") + scope.Convert(&in.TestString, &out.TestString, 0) + internalToExternalCalls++ + return nil + }, + func(in *runtimetesting.ExternalSimple, out *runtimetesting.InternalSimple, scope conversion.Scope) error { + t.Logf("external -> internal") + scope.Convert(&in.TestString, &out.TestString, 0) + externalToInternalCalls++ + return nil + }, + ) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + simple := &runtimetesting.InternalSimple{ + TestString: "foo", + } + + s.Log(t) + + out, err := s.ConvertToVersion(simple, externalGV) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + internal, err := s.ConvertToVersion(out, internalGV) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + if e, a := simple, internal; !reflect.DeepEqual(e, a) { + t.Errorf("Expected:\n %#v,\n Got:\n %#v", e, a) + } + + if e, a := 1, internalToExternalCalls; e != a { + t.Errorf("Expected %v, got %v", e, a) + } + if e, a := 1, externalToInternalCalls; e != a { + t.Errorf("Expected %v, got %v", e, a) + } +} + +func TestMetaValuesUnregisteredConvert(t *testing.T) { + type InternalSimple struct { + Version string `json:"apiVersion,omitempty"` + Kind string `json:"kind,omitempty"` + TestString string `json:"testString"` + } + type ExternalSimple struct { + Version string `json:"apiVersion,omitempty"` + Kind string `json:"kind,omitempty"` + TestString string `json:"testString"` + } + s := runtime.NewScheme() + // We deliberately don't register the types. + + internalToExternalCalls := 0 + + // Register functions to verify that scope.Meta() gets set correctly. + err := s.AddConversionFuncs( + func(in *InternalSimple, out *ExternalSimple, scope conversion.Scope) error { + scope.Convert(&in.TestString, &out.TestString, 0) + internalToExternalCalls++ + return nil + }, + ) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + simple := &InternalSimple{TestString: "foo"} + external := &ExternalSimple{} + err = s.Convert(simple, external, nil) + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + if e, a := simple.TestString, external.TestString; e != a { + t.Errorf("Expected %v, got %v", e, a) + } + + // Verify that our conversion handler got called. + if e, a := 1, internalToExternalCalls; e != a { + t.Errorf("Expected %v, got %v", e, a) + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/codec_test.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/codec_test.go new file mode 100644 index 000000000..d27da113a --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/codec_test.go @@ -0,0 +1,339 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package serializer + +import ( + "encoding/json" + "fmt" + "log" + "os" + "reflect" + "strings" + "testing" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + serializertesting "k8s.io/apimachinery/pkg/runtime/serializer/testing" + "k8s.io/apimachinery/pkg/util/diff" + + "github.com/ghodss/yaml" + "github.com/google/gofuzz" + flag "github.com/spf13/pflag" +) + +var fuzzIters = flag.Int("fuzz-iters", 50, "How many fuzzing iterations to do.") + +type testMetaFactory struct{} + +func (testMetaFactory) Interpret(data []byte) (*schema.GroupVersionKind, error) { + findKind := struct { + APIVersion string `json:"myVersionKey,omitempty"` + ObjectKind string `json:"myKindKey,omitempty"` + }{} + // yaml is a superset of json, so we use it to decode here. That way, + // we understand both. + if err := yaml.Unmarshal(data, &findKind); err != nil { + return nil, fmt.Errorf("couldn't get version/kind: %v", err) + } + gv, err := schema.ParseGroupVersion(findKind.APIVersion) + if err != nil { + return nil, err + } + return &schema.GroupVersionKind{Group: gv.Group, Version: gv.Version, Kind: findKind.ObjectKind}, nil +} + +// TestObjectFuzzer can randomly populate all the above objects. +var TestObjectFuzzer = fuzz.New().NilChance(.5).NumElements(1, 100).Funcs( + func(j *serializertesting.MyWeirdCustomEmbeddedVersionKindField, c fuzz.Continue) { + c.FuzzNoCustom(j) + j.APIVersion = "" + j.ObjectKind = "" + }, +) + +// Returns a new Scheme set up with the test objects. +func GetTestScheme() (*runtime.Scheme, runtime.Codec) { + internalGV := schema.GroupVersion{Version: runtime.APIVersionInternal} + externalGV := schema.GroupVersion{Version: "v1"} + externalGV2 := schema.GroupVersion{Version: "v2"} + + s := runtime.NewScheme() + // Ordinarily, we wouldn't add TestType2, but because this is a test and + // both types are from the same package, we need to get it into the system + // so that converter will match it with ExternalType2. + s.AddKnownTypes(internalGV, &serializertesting.TestType1{}, &serializertesting.TestType2{}, &serializertesting.ExternalInternalSame{}) + s.AddKnownTypes(externalGV, &serializertesting.ExternalInternalSame{}) + s.AddKnownTypeWithName(externalGV.WithKind("TestType1"), &serializertesting.ExternalTestType1{}) + s.AddKnownTypeWithName(externalGV.WithKind("TestType2"), &serializertesting.ExternalTestType2{}) + s.AddKnownTypeWithName(internalGV.WithKind("TestType3"), &serializertesting.TestType1{}) + s.AddKnownTypeWithName(externalGV.WithKind("TestType3"), &serializertesting.ExternalTestType1{}) + s.AddKnownTypeWithName(externalGV2.WithKind("TestType1"), &serializertesting.ExternalTestType1{}) + + s.AddUnversionedTypes(externalGV, &metav1.Status{}) + + cf := newCodecFactory(s, newSerializersForScheme(s, testMetaFactory{})) + codec := cf.LegacyCodec(schema.GroupVersion{Version: "v1"}) + return s, codec +} + +var semantic = conversion.EqualitiesOrDie( + func(a, b serializertesting.MyWeirdCustomEmbeddedVersionKindField) bool { + a.APIVersion, a.ObjectKind = "", "" + b.APIVersion, b.ObjectKind = "", "" + return a == b + }, +) + +func runTest(t *testing.T, source interface{}) { + name := reflect.TypeOf(source).Elem().Name() + TestObjectFuzzer.Fuzz(source) + + _, codec := GetTestScheme() + data, err := runtime.Encode(codec, source.(runtime.Object)) + if err != nil { + t.Errorf("%v: %v (%#v)", name, err, source) + return + } + obj2, err := runtime.Decode(codec, data) + if err != nil { + t.Errorf("%v: %v (%v)", name, err, string(data)) + return + } + if !semantic.DeepEqual(source, obj2) { + t.Errorf("1: %v: diff: %v", name, diff.ObjectGoPrintSideBySide(source, obj2)) + return + } + obj3 := reflect.New(reflect.TypeOf(source).Elem()).Interface() + if err := runtime.DecodeInto(codec, data, obj3.(runtime.Object)); err != nil { + t.Errorf("2: %v: %v", name, err) + return + } + if !semantic.DeepEqual(source, obj3) { + t.Errorf("3: %v: diff: %v", name, diff.ObjectDiff(source, obj3)) + return + } +} + +func TestTypes(t *testing.T) { + table := []interface{}{ + &serializertesting.TestType1{}, + &serializertesting.ExternalInternalSame{}, + } + for _, item := range table { + // Try a few times, since runTest uses random values. + for i := 0; i < *fuzzIters; i++ { + runTest(t, item) + } + } +} + +func TestVersionedEncoding(t *testing.T) { + s, _ := GetTestScheme() + cf := newCodecFactory(s, newSerializersForScheme(s, testMetaFactory{})) + info, _ := runtime.SerializerInfoForMediaType(cf.SupportedMediaTypes(), runtime.ContentTypeJSON) + encoder := info.Serializer + + codec := cf.CodecForVersions(encoder, nil, schema.GroupVersion{Version: "v2"}, nil) + out, err := runtime.Encode(codec, &serializertesting.TestType1{}) + if err != nil { + t.Fatal(err) + } + if string(out) != `{"myVersionKey":"v2","myKindKey":"TestType1"}`+"\n" { + t.Fatal(string(out)) + } + + codec = cf.CodecForVersions(encoder, nil, schema.GroupVersion{Version: "v3"}, nil) + _, err = runtime.Encode(codec, &serializertesting.TestType1{}) + if err == nil { + t.Fatal(err) + } + + // unversioned encode with no versions is written directly to wire + codec = cf.CodecForVersions(encoder, nil, runtime.InternalGroupVersioner, nil) + out, err = runtime.Encode(codec, &serializertesting.TestType1{}) + if err != nil { + t.Fatal(err) + } + if string(out) != `{}`+"\n" { + t.Fatal(string(out)) + } +} + +func TestMultipleNames(t *testing.T) { + _, codec := GetTestScheme() + + obj, _, err := codec.Decode([]byte(`{"myKindKey":"TestType3","myVersionKey":"v1","A":"value"}`), nil, nil) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + internal := obj.(*serializertesting.TestType1) + if internal.A != "value" { + t.Fatalf("unexpected decoded object: %#v", internal) + } + + out, err := runtime.Encode(codec, internal) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if !strings.Contains(string(out), `"myKindKey":"TestType1"`) { + t.Errorf("unexpected encoded output: %s", string(out)) + } +} + +func TestConvertTypesWhenDefaultNamesMatch(t *testing.T) { + internalGV := schema.GroupVersion{Version: runtime.APIVersionInternal} + externalGV := schema.GroupVersion{Version: "v1"} + + s := runtime.NewScheme() + // create two names internally, with TestType1 being preferred + s.AddKnownTypeWithName(internalGV.WithKind("TestType1"), &serializertesting.TestType1{}) + s.AddKnownTypeWithName(internalGV.WithKind("OtherType1"), &serializertesting.TestType1{}) + // create two names externally, with TestType1 being preferred + s.AddKnownTypeWithName(externalGV.WithKind("TestType1"), &serializertesting.ExternalTestType1{}) + s.AddKnownTypeWithName(externalGV.WithKind("OtherType1"), &serializertesting.ExternalTestType1{}) + + ext := &serializertesting.ExternalTestType1{} + ext.APIVersion = "v1" + ext.ObjectKind = "OtherType1" + ext.A = "test" + data, err := json.Marshal(ext) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + expect := &serializertesting.TestType1{A: "test"} + + codec := newCodecFactory(s, newSerializersForScheme(s, testMetaFactory{})).LegacyCodec(schema.GroupVersion{Version: "v1"}) + + obj, err := runtime.Decode(codec, data) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if !semantic.DeepEqual(expect, obj) { + t.Errorf("unexpected object: %#v", obj) + } + + into := &serializertesting.TestType1{} + if err := runtime.DecodeInto(codec, data, into); err != nil { + t.Fatalf("unexpected error: %v", err) + } + if !semantic.DeepEqual(expect, into) { + t.Errorf("unexpected object: %#v", obj) + } +} + +func TestEncode_Ptr(t *testing.T) { + _, codec := GetTestScheme() + tt := &serializertesting.TestType1{A: "I am a pointer object"} + data, err := runtime.Encode(codec, tt) + obj2, err2 := runtime.Decode(codec, data) + if err != nil || err2 != nil { + t.Fatalf("Failure: '%v' '%v'\n%s", err, err2, data) + } + if _, ok := obj2.(*serializertesting.TestType1); !ok { + t.Fatalf("Got wrong type") + } + if !semantic.DeepEqual(obj2, tt) { + t.Errorf("Expected:\n %#v,\n Got:\n %#v", tt, obj2) + } +} + +func TestBadJSONRejection(t *testing.T) { + log.SetOutput(os.Stderr) + _, codec := GetTestScheme() + badJSONs := [][]byte{ + []byte(`{"myVersionKey":"v1"}`), // Missing kind + []byte(`{"myVersionKey":"v1","myKindKey":"bar"}`), // Unknown kind + []byte(`{"myVersionKey":"bar","myKindKey":"TestType1"}`), // Unknown version + []byte(`{"myKindKey":"TestType1"}`), // Missing version + } + for _, b := range badJSONs { + if _, err := runtime.Decode(codec, b); err == nil { + t.Errorf("Did not reject bad json: %s", string(b)) + } + } + badJSONKindMismatch := []byte(`{"myVersionKey":"v1","myKindKey":"ExternalInternalSame"}`) + if err := runtime.DecodeInto(codec, badJSONKindMismatch, &serializertesting.TestType1{}); err == nil { + t.Errorf("Kind is set but doesn't match the object type: %s", badJSONKindMismatch) + } + if err := runtime.DecodeInto(codec, []byte(``), &serializertesting.TestType1{}); err != nil { + t.Errorf("Should allow empty decode: %v", err) + } + if _, _, err := codec.Decode([]byte(``), &schema.GroupVersionKind{Kind: "ExternalInternalSame"}, nil); err == nil { + t.Errorf("Did not give error for empty data with only kind default") + } + if _, _, err := codec.Decode([]byte(`{"myVersionKey":"v1"}`), &schema.GroupVersionKind{Kind: "ExternalInternalSame"}, nil); err != nil { + t.Errorf("Gave error for version and kind default") + } + if _, _, err := codec.Decode([]byte(`{"myKindKey":"ExternalInternalSame"}`), &schema.GroupVersionKind{Version: "v1"}, nil); err != nil { + t.Errorf("Gave error for version and kind default") + } + if _, _, err := codec.Decode([]byte(``), &schema.GroupVersionKind{Kind: "ExternalInternalSame", Version: "v1"}, nil); err != nil { + t.Errorf("Gave error for version and kind defaulted: %v", err) + } + if _, err := runtime.Decode(codec, []byte(``)); err == nil { + t.Errorf("Did not give error for empty data") + } +} + +// Returns a new Scheme set up with the test objects needed by TestDirectCodec. +func GetDirectCodecTestScheme() *runtime.Scheme { + internalGV := schema.GroupVersion{Version: runtime.APIVersionInternal} + externalGV := schema.GroupVersion{Version: "v1"} + + s := runtime.NewScheme() + // Ordinarily, we wouldn't add TestType2, but because this is a test and + // both types are from the same package, we need to get it into the system + // so that converter will match it with ExternalType2. + s.AddKnownTypes(internalGV, &serializertesting.TestType1{}) + s.AddKnownTypes(externalGV, &serializertesting.ExternalTestType1{}) + + s.AddUnversionedTypes(externalGV, &metav1.Status{}) + return s +} + +func TestDirectCodec(t *testing.T) { + s := GetDirectCodecTestScheme() + cf := newCodecFactory(s, newSerializersForScheme(s, testMetaFactory{})) + info, _ := runtime.SerializerInfoForMediaType(cf.SupportedMediaTypes(), runtime.ContentTypeJSON) + serializer := info.Serializer + df := DirectCodecFactory{cf} + ignoredGV, err := schema.ParseGroupVersion("ignored group/ignored version") + if err != nil { + t.Fatal(err) + } + directEncoder := df.EncoderForVersion(serializer, ignoredGV) + directDecoder := df.DecoderToVersion(serializer, ignoredGV) + out, err := runtime.Encode(directEncoder, &serializertesting.ExternalTestType1{}) + if err != nil { + t.Fatal(err) + } + if string(out) != `{"myVersionKey":"v1","myKindKey":"ExternalTestType1"}`+"\n" { + t.Fatal(string(out)) + } + a, _, err := directDecoder.Decode(out, nil, nil) + e := &serializertesting.ExternalTestType1{ + MyWeirdCustomEmbeddedVersionKindField: serializertesting.MyWeirdCustomEmbeddedVersionKindField{ + APIVersion: "v1", + ObjectKind: "ExternalTestType1", + }, + } + if !semantic.DeepEqual(e, a) { + t.Fatalf("expect %v, got %v", e, a) + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json_test.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json_test.go new file mode 100644 index 000000000..469bf3ed8 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json_test.go @@ -0,0 +1,267 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package json_test + +import ( + "fmt" + "reflect" + "strings" + "testing" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer/json" + "k8s.io/apimachinery/pkg/util/diff" +) + +type testDecodable struct { + Other string + Value int `json:"value"` + gvk schema.GroupVersionKind +} + +func (d *testDecodable) GetObjectKind() schema.ObjectKind { return d } +func (d *testDecodable) SetGroupVersionKind(gvk schema.GroupVersionKind) { d.gvk = gvk } +func (d *testDecodable) GroupVersionKind() schema.GroupVersionKind { return d.gvk } +func (d *testDecodable) DeepCopyObject() runtime.Object { + panic("testDecodable does not support DeepCopy") +} + +func TestDecode(t *testing.T) { + testCases := []struct { + creater runtime.ObjectCreater + typer runtime.ObjectTyper + yaml bool + pretty bool + + data []byte + defaultGVK *schema.GroupVersionKind + into runtime.Object + + errFn func(error) bool + expectedObject runtime.Object + expectedGVK *schema.GroupVersionKind + }{ + { + data: []byte("{}"), + + expectedGVK: &schema.GroupVersionKind{}, + errFn: func(err error) bool { return strings.Contains(err.Error(), "Object 'Kind' is missing in") }, + }, + { + data: []byte("{}"), + defaultGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, + creater: &mockCreater{err: fmt.Errorf("fake error")}, + + expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, + errFn: func(err error) bool { return err.Error() == "fake error" }, + }, + { + data: []byte("{}"), + defaultGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, + creater: &mockCreater{obj: &testDecodable{}}, + expectedObject: &testDecodable{}, + expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, + }, + + // version without group is not defaulted + { + data: []byte(`{"apiVersion":"blah"}`), + defaultGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, + creater: &mockCreater{obj: &testDecodable{}}, + expectedObject: &testDecodable{}, + expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "", Version: "blah"}, + }, + // group without version is defaulted + { + data: []byte(`{"apiVersion":"other/"}`), + defaultGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, + creater: &mockCreater{obj: &testDecodable{}}, + expectedObject: &testDecodable{}, + expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, + }, + + // accept runtime.Unknown as into and bypass creator + { + data: []byte(`{}`), + into: &runtime.Unknown{}, + + expectedGVK: &schema.GroupVersionKind{}, + expectedObject: &runtime.Unknown{ + Raw: []byte(`{}`), + ContentType: runtime.ContentTypeJSON, + }, + }, + { + data: []byte(`{"test":"object"}`), + into: &runtime.Unknown{}, + + expectedGVK: &schema.GroupVersionKind{}, + expectedObject: &runtime.Unknown{ + Raw: []byte(`{"test":"object"}`), + ContentType: runtime.ContentTypeJSON, + }, + }, + { + data: []byte(`{"test":"object"}`), + into: &runtime.Unknown{}, + defaultGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, + expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, + expectedObject: &runtime.Unknown{ + TypeMeta: runtime.TypeMeta{APIVersion: "other/blah", Kind: "Test"}, + Raw: []byte(`{"test":"object"}`), + ContentType: runtime.ContentTypeJSON, + }, + }, + + // unregistered objects can be decoded into directly + { + data: []byte(`{"kind":"Test","apiVersion":"other/blah","value":1,"Other":"test"}`), + into: &testDecodable{}, + typer: &mockTyper{err: runtime.NewNotRegisteredErrForKind(schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"})}, + expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, + expectedObject: &testDecodable{ + Other: "test", + Value: 1, + }, + }, + // registered types get defaulted by the into object kind + { + data: []byte(`{"value":1,"Other":"test"}`), + into: &testDecodable{}, + typer: &mockTyper{gvk: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}}, + expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, + expectedObject: &testDecodable{ + Other: "test", + Value: 1, + }, + }, + // registered types get defaulted by the into object kind even without version, but return an error + { + data: []byte(`{"value":1,"Other":"test"}`), + into: &testDecodable{}, + typer: &mockTyper{gvk: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: ""}}, + expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: ""}, + errFn: func(err error) bool { return strings.Contains(err.Error(), "Object 'apiVersion' is missing in") }, + expectedObject: &testDecodable{ + Other: "test", + Value: 1, + }, + }, + + // runtime.VersionedObjects are decoded + { + data: []byte(`{"value":1,"Other":"test"}`), + into: &runtime.VersionedObjects{Objects: []runtime.Object{}}, + creater: &mockCreater{obj: &testDecodable{}}, + typer: &mockTyper{gvk: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}}, + defaultGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, + expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, + expectedObject: &runtime.VersionedObjects{ + Objects: []runtime.Object{ + &testDecodable{ + Other: "test", + Value: 1, + }, + }, + }, + }, + // runtime.VersionedObjects with an object are decoded into + { + data: []byte(`{"Other":"test"}`), + into: &runtime.VersionedObjects{Objects: []runtime.Object{&testDecodable{Value: 2}}}, + typer: &mockTyper{gvk: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}}, + expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, + expectedObject: &runtime.VersionedObjects{ + Objects: []runtime.Object{ + &testDecodable{ + Other: "test", + Value: 2, + }, + }, + }, + }, + } + + for i, test := range testCases { + var s runtime.Serializer + if test.yaml { + s = json.NewYAMLSerializer(json.DefaultMetaFactory, test.creater, test.typer) + } else { + s = json.NewSerializer(json.DefaultMetaFactory, test.creater, test.typer, test.pretty) + } + obj, gvk, err := s.Decode([]byte(test.data), test.defaultGVK, test.into) + + if !reflect.DeepEqual(test.expectedGVK, gvk) { + t.Errorf("%d: unexpected GVK: %v", i, gvk) + } + + switch { + case err == nil && test.errFn != nil: + t.Errorf("%d: failed: %v", i, err) + continue + case err != nil && test.errFn == nil: + t.Errorf("%d: failed: %v", i, err) + continue + case err != nil: + if !test.errFn(err) { + t.Errorf("%d: failed: %v", i, err) + } + if obj != nil { + t.Errorf("%d: should have returned nil object", i) + } + continue + } + + if test.into != nil && test.into != obj { + t.Errorf("%d: expected into to be returned: %v", i, obj) + continue + } + + if !reflect.DeepEqual(test.expectedObject, obj) { + t.Errorf("%d: unexpected object:\n%s", i, diff.ObjectGoPrintSideBySide(test.expectedObject, obj)) + } + } +} + +type mockCreater struct { + apiVersion string + kind string + err error + obj runtime.Object +} + +func (c *mockCreater) New(kind schema.GroupVersionKind) (runtime.Object, error) { + c.apiVersion, c.kind = kind.GroupVersion().String(), kind.Kind + return c.obj, c.err +} + +type mockTyper struct { + gvk *schema.GroupVersionKind + err error +} + +func (t *mockTyper) ObjectKinds(obj runtime.Object) ([]schema.GroupVersionKind, bool, error) { + if t.gvk == nil { + return nil, false, t.err + } + return []schema.GroupVersionKind{*t.gvk}, false, t.err +} + +func (t *mockTyper) Recognizes(_ schema.GroupVersionKind) bool { + return false +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/meta_test.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/meta_test.go new file mode 100644 index 000000000..f4e34a22d --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/meta_test.go @@ -0,0 +1,45 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package json + +import "testing" + +func TestSimpleMetaFactoryInterpret(t *testing.T) { + factory := SimpleMetaFactory{} + gvk, err := factory.Interpret([]byte(`{"apiVersion":"1","kind":"object"}`)) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if gvk.Version != "1" || gvk.Kind != "object" { + t.Errorf("unexpected interpret: %#v", gvk) + } + + // no kind or version + gvk, err = factory.Interpret([]byte(`{}`)) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if gvk.Version != "" || gvk.Kind != "" { + t.Errorf("unexpected interpret: %#v", gvk) + } + + // unparsable + gvk, err = factory.Interpret([]byte(`{`)) + if err == nil { + t.Errorf("unexpected non-error") + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/doc.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/doc.go index 381748d69..72d0ac79b 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/doc.go @@ -15,4 +15,4 @@ limitations under the License. */ // Package protobuf provides a Kubernetes serializer for the protobuf format. -package protobuf +package protobuf // import "k8s.io/apimachinery/pkg/runtime/serializer/protobuf" diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming_test.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming_test.go new file mode 100644 index 000000000..9cae6a32c --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming_test.go @@ -0,0 +1,84 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package streaming + +import ( + "bytes" + "io" + "io/ioutil" + "testing" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/framer" +) + +type fakeDecoder struct { + got []byte + obj runtime.Object + err error +} + +func (d *fakeDecoder) Decode(data []byte, gvk *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { + d.got = data + return d.obj, nil, d.err +} + +func TestEmptyDecoder(t *testing.T) { + buf := bytes.NewBuffer([]byte{}) + d := &fakeDecoder{} + _, _, err := NewDecoder(ioutil.NopCloser(buf), d).Decode(nil, nil) + if err != io.EOF { + t.Fatal(err) + } +} + +func TestDecoder(t *testing.T) { + frames := [][]byte{ + make([]byte, 1025), + make([]byte, 1024*5), + make([]byte, 1024*1024*5), + make([]byte, 1025), + } + pr, pw := io.Pipe() + fw := framer.NewLengthDelimitedFrameWriter(pw) + go func() { + for i := range frames { + fw.Write(frames[i]) + } + pw.Close() + }() + + r := framer.NewLengthDelimitedFrameReader(pr) + d := &fakeDecoder{} + dec := NewDecoder(r, d) + if _, _, err := dec.Decode(nil, nil); err != nil || !bytes.Equal(d.got, frames[0]) { + t.Fatalf("unexpected %v %v", err, len(d.got)) + } + if _, _, err := dec.Decode(nil, nil); err != nil || !bytes.Equal(d.got, frames[1]) { + t.Fatalf("unexpected %v %v", err, len(d.got)) + } + if _, _, err := dec.Decode(nil, nil); err != ErrObjectTooLarge || !bytes.Equal(d.got, frames[1]) { + t.Fatalf("unexpected %v %v", err, len(d.got)) + } + if _, _, err := dec.Decode(nil, nil); err != nil || !bytes.Equal(d.got, frames[3]) { + t.Fatalf("unexpected %v %v", err, len(d.got)) + } + if _, _, err := dec.Decode(nil, nil); err != io.EOF { + t.Fatalf("unexpected %v %v", err, len(d.got)) + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning_test.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning_test.go new file mode 100644 index 000000000..b0a42fb54 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning_test.go @@ -0,0 +1,413 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package versioning + +import ( + "fmt" + "io" + "io/ioutil" + "reflect" + "testing" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/diff" +) + +type testDecodable struct { + Other string + Value int `json:"value"` + gvk schema.GroupVersionKind +} + +func (d *testDecodable) GetObjectKind() schema.ObjectKind { return d } +func (d *testDecodable) SetGroupVersionKind(gvk schema.GroupVersionKind) { d.gvk = gvk } +func (d *testDecodable) GroupVersionKind() schema.GroupVersionKind { return d.gvk } +func (d *testDecodable) DeepCopyObject() runtime.Object { + if d == nil { + return nil + } + clone := *d + return &clone +} + +type testNestedDecodable struct { + Other string + Value int `json:"value"` + + gvk schema.GroupVersionKind + nestedCalled bool + nestedErr error +} + +func (d *testNestedDecodable) GetObjectKind() schema.ObjectKind { return d } +func (d *testNestedDecodable) SetGroupVersionKind(gvk schema.GroupVersionKind) { d.gvk = gvk } +func (d *testNestedDecodable) GroupVersionKind() schema.GroupVersionKind { return d.gvk } +func (d *testNestedDecodable) DeepCopyObject() runtime.Object { + if d == nil { + return nil + } + clone := *d + return &clone +} + +func (d *testNestedDecodable) EncodeNestedObjects(e runtime.Encoder) error { + d.nestedCalled = true + return d.nestedErr +} + +func (d *testNestedDecodable) DecodeNestedObjects(_ runtime.Decoder) error { + d.nestedCalled = true + return d.nestedErr +} + +func TestNestedDecode(t *testing.T) { + n := &testNestedDecodable{nestedErr: fmt.Errorf("unable to decode")} + decoder := &mockSerializer{obj: n} + codec := NewCodec(nil, decoder, nil, nil, nil, nil, nil, nil, nil) + if _, _, err := codec.Decode([]byte(`{}`), nil, n); err != n.nestedErr { + t.Errorf("unexpected error: %v", err) + } + if !n.nestedCalled { + t.Errorf("did not invoke nested decoder") + } +} + +func TestNestedEncode(t *testing.T) { + n := &testNestedDecodable{nestedErr: fmt.Errorf("unable to decode")} + n2 := &testNestedDecodable{nestedErr: fmt.Errorf("unable to decode 2")} + encoder := &mockSerializer{obj: n} + codec := NewCodec( + encoder, nil, + &checkConvertor{obj: n2, groupVersion: schema.GroupVersion{Group: "other"}}, + nil, nil, + &mockTyper{gvks: []schema.GroupVersionKind{{Kind: "test"}}}, + nil, + schema.GroupVersion{Group: "other"}, nil, + ) + if err := codec.Encode(n, ioutil.Discard); err != n2.nestedErr { + t.Errorf("unexpected error: %v", err) + } + if n.nestedCalled || !n2.nestedCalled { + t.Errorf("did not invoke correct nested decoder") + } +} + +func TestDecode(t *testing.T) { + gvk1 := &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"} + decodable1 := &testDecodable{} + decodable2 := &testDecodable{} + decodable3 := &testDecodable{} + versionedDecodable1 := &runtime.VersionedObjects{Objects: []runtime.Object{decodable1}} + + testCases := []struct { + serializer runtime.Serializer + convertor runtime.ObjectConvertor + creater runtime.ObjectCreater + copier runtime.ObjectCopier + typer runtime.ObjectTyper + defaulter runtime.ObjectDefaulter + yaml bool + pretty bool + + encodes, decodes runtime.GroupVersioner + + defaultGVK *schema.GroupVersionKind + into runtime.Object + + errFn func(error) bool + expectedObject runtime.Object + sameObject runtime.Object + expectedGVK *schema.GroupVersionKind + }{ + { + serializer: &mockSerializer{actual: gvk1}, + convertor: &checkConvertor{groupVersion: schema.GroupVersion{Group: "other", Version: "__internal"}}, + expectedGVK: gvk1, + decodes: schema.GroupVersion{Group: "other", Version: "__internal"}, + }, + { + serializer: &mockSerializer{actual: gvk1, obj: decodable1}, + convertor: &checkConvertor{in: decodable1, obj: decodable2, groupVersion: schema.GroupVersion{Group: "other", Version: "__internal"}}, + expectedGVK: gvk1, + sameObject: decodable2, + decodes: schema.GroupVersion{Group: "other", Version: "__internal"}, + }, + // defaultGVK.Group is allowed to force a conversion to the destination group + { + serializer: &mockSerializer{actual: gvk1, obj: decodable1}, + defaultGVK: &schema.GroupVersionKind{Group: "force"}, + convertor: &checkConvertor{in: decodable1, obj: decodable2, groupVersion: schema.GroupVersion{Group: "force", Version: "__internal"}}, + expectedGVK: gvk1, + sameObject: decodable2, + decodes: schema.GroupVersion{Group: "force", Version: "__internal"}, + }, + // uses direct conversion for into when objects differ + { + into: decodable3, + serializer: &mockSerializer{actual: gvk1, obj: decodable1}, + convertor: &checkConvertor{in: decodable1, obj: decodable3, directConvert: true}, + expectedGVK: gvk1, + sameObject: decodable3, + }, + { + into: versionedDecodable1, + serializer: &mockSerializer{actual: gvk1, obj: decodable3}, + convertor: &checkConvertor{in: decodable3, obj: decodable1, directConvert: true}, + expectedGVK: gvk1, + sameObject: versionedDecodable1, + }, + // returns directly when serializer returns into + { + into: decodable3, + serializer: &mockSerializer{actual: gvk1, obj: decodable3}, + expectedGVK: gvk1, + sameObject: decodable3, + }, + // returns directly when serializer returns into + { + into: versionedDecodable1, + serializer: &mockSerializer{actual: gvk1, obj: decodable1}, + expectedGVK: gvk1, + sameObject: versionedDecodable1, + }, + + // runtime.VersionedObjects are decoded + { + into: &runtime.VersionedObjects{Objects: []runtime.Object{}}, + + serializer: &mockSerializer{actual: gvk1, obj: decodable1}, + copier: &checkCopy{in: decodable1, obj: decodable1}, + convertor: &checkConvertor{in: decodable1, obj: decodable2, groupVersion: schema.GroupVersion{Group: "other", Version: "__internal"}}, + expectedGVK: gvk1, + expectedObject: &runtime.VersionedObjects{Objects: []runtime.Object{decodable1, decodable2}}, + decodes: schema.GroupVersion{Group: "other", Version: "__internal"}, + }, + { + into: &runtime.VersionedObjects{Objects: []runtime.Object{}}, + + serializer: &mockSerializer{actual: gvk1, obj: decodable1}, + copier: &checkCopy{in: decodable1, obj: nil, err: fmt.Errorf("error on copy")}, + convertor: &checkConvertor{in: decodable1, obj: decodable2, groupVersion: schema.GroupVersion{Group: "other", Version: "__internal"}}, + expectedGVK: gvk1, + expectedObject: &runtime.VersionedObjects{Objects: []runtime.Object{decodable1, decodable2}}, + decodes: schema.GroupVersion{Group: "other", Version: "__internal"}, + }, + + // decode into the same version as the serialized object + { + decodes: schema.GroupVersions{gvk1.GroupVersion()}, + + serializer: &mockSerializer{actual: gvk1, obj: decodable1}, + convertor: &checkConvertor{in: decodable1, obj: decodable1, groupVersion: schema.GroupVersions{{Group: "other", Version: "blah"}}}, + expectedGVK: gvk1, + expectedObject: decodable1, + }, + { + into: &runtime.VersionedObjects{Objects: []runtime.Object{}}, + decodes: schema.GroupVersions{gvk1.GroupVersion()}, + + serializer: &mockSerializer{actual: gvk1, obj: decodable1}, + convertor: &checkConvertor{in: decodable1, obj: decodable1, groupVersion: schema.GroupVersions{{Group: "other", Version: "blah"}}}, + copier: &checkCopy{in: decodable1, obj: decodable1, err: nil}, + expectedGVK: gvk1, + expectedObject: &runtime.VersionedObjects{Objects: []runtime.Object{decodable1}}, + }, + + // codec with non matching version skips conversion altogether + { + decodes: schema.GroupVersions{{Group: "something", Version: "else"}}, + + serializer: &mockSerializer{actual: gvk1, obj: decodable1}, + convertor: &checkConvertor{in: decodable1, obj: decodable1, groupVersion: schema.GroupVersions{{Group: "something", Version: "else"}}}, + expectedGVK: gvk1, + expectedObject: decodable1, + }, + { + into: &runtime.VersionedObjects{Objects: []runtime.Object{}}, + decodes: schema.GroupVersions{{Group: "something", Version: "else"}}, + + serializer: &mockSerializer{actual: gvk1, obj: decodable1}, + convertor: &checkConvertor{in: decodable1, obj: decodable1, groupVersion: schema.GroupVersions{{Group: "something", Version: "else"}}}, + copier: &checkCopy{in: decodable1, obj: decodable1, err: nil}, + expectedGVK: gvk1, + expectedObject: &runtime.VersionedObjects{Objects: []runtime.Object{decodable1}}, + }, + } + + for i, test := range testCases { + t.Logf("%d", i) + s := NewCodec(test.serializer, test.serializer, test.convertor, test.creater, test.copier, test.typer, test.defaulter, test.encodes, test.decodes) + obj, gvk, err := s.Decode([]byte(`{}`), test.defaultGVK, test.into) + + if !reflect.DeepEqual(test.expectedGVK, gvk) { + t.Errorf("%d: unexpected GVK: %v", i, gvk) + } + + switch { + case err == nil && test.errFn != nil: + t.Errorf("%d: failed: %v", i, err) + continue + case err != nil && test.errFn == nil: + t.Errorf("%d: failed: %v", i, err) + continue + case err != nil: + if !test.errFn(err) { + t.Errorf("%d: failed: %v", i, err) + } + if obj != nil { + t.Errorf("%d: should have returned nil object", i) + } + continue + } + + if test.into != nil && test.into != obj { + t.Errorf("%d: expected into to be returned: %v", i, obj) + continue + } + + switch { + case test.expectedObject != nil: + if !reflect.DeepEqual(test.expectedObject, obj) { + t.Errorf("%d: unexpected object:\n%s", i, diff.ObjectGoPrintSideBySide(test.expectedObject, obj)) + } + case test.sameObject != nil: + if test.sameObject != obj { + t.Errorf("%d: unexpected object:\n%s", i, diff.ObjectGoPrintSideBySide(test.sameObject, obj)) + } + case obj != nil: + t.Errorf("%d: unexpected object: %#v", i, obj) + } + } +} + +type checkCopy struct { + in, obj runtime.Object + err error +} + +func (c *checkCopy) Copy(obj runtime.Object) (runtime.Object, error) { + if c.in != nil && c.in != obj { + return nil, fmt.Errorf("unexpected input to copy: %#v", obj) + } + return c.obj, c.err +} + +type checkConvertor struct { + err error + in, obj runtime.Object + groupVersion runtime.GroupVersioner + directConvert bool +} + +func (c *checkConvertor) Convert(in, out, context interface{}) error { + if !c.directConvert { + return fmt.Errorf("unexpected call to Convert") + } + if c.in != nil && c.in != in { + return fmt.Errorf("unexpected in: %s", in) + } + if c.obj != nil && c.obj != out { + return fmt.Errorf("unexpected out: %s", out) + } + return c.err +} +func (c *checkConvertor) ConvertToVersion(in runtime.Object, outVersion runtime.GroupVersioner) (out runtime.Object, err error) { + if c.directConvert { + return nil, fmt.Errorf("unexpected call to ConvertToVersion") + } + if c.in != nil && c.in != in { + return nil, fmt.Errorf("unexpected in: %s", in) + } + if !reflect.DeepEqual(c.groupVersion, outVersion) { + return nil, fmt.Errorf("unexpected outversion: %s (%s)", outVersion, c.groupVersion) + } + return c.obj, c.err +} +func (c *checkConvertor) ConvertFieldLabel(version, kind, label, value string) (string, string, error) { + return "", "", fmt.Errorf("unexpected call to ConvertFieldLabel") +} + +type mockSerializer struct { + err error + obj runtime.Object + encodingObjGVK schema.GroupVersionKind + + defaults, actual *schema.GroupVersionKind + into runtime.Object +} + +func (s *mockSerializer) Decode(data []byte, defaults *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { + s.defaults = defaults + s.into = into + return s.obj, s.actual, s.err +} + +func (s *mockSerializer) Encode(obj runtime.Object, w io.Writer) error { + s.obj = obj + s.encodingObjGVK = obj.GetObjectKind().GroupVersionKind() + return s.err +} + +type mockCreater struct { + err error + obj runtime.Object +} + +func (c *mockCreater) New(kind schema.GroupVersionKind) (runtime.Object, error) { + return c.obj, c.err +} + +type mockTyper struct { + gvks []schema.GroupVersionKind + unversioned bool + err error +} + +func (t *mockTyper) ObjectKinds(obj runtime.Object) ([]schema.GroupVersionKind, bool, error) { + return t.gvks, t.unversioned, t.err +} + +func (t *mockTyper) Recognizes(_ schema.GroupVersionKind) bool { + return true +} + +func TestDirectCodecEncode(t *testing.T) { + serializer := mockSerializer{} + typer := mockTyper{ + gvks: []schema.GroupVersionKind{ + { + Group: "wrong_group", + Kind: "some_kind", + }, + { + Group: "expected_group", + Kind: "some_kind", + }, + }, + } + + c := DirectEncoder{ + Version: schema.GroupVersion{Group: "expected_group"}, + Encoder: &serializer, + ObjectTyper: &typer, + } + c.Encode(&testDecodable{}, ioutil.Discard) + if e, a := "expected_group", serializer.encodingObjGVK.Group; e != a { + t.Errorf("expected group to be %v, got %v", e, a) + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/swagger_doc_generator_test.go b/vendor/k8s.io/apimachinery/pkg/runtime/swagger_doc_generator_test.go new file mode 100644 index 000000000..a6f338d31 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/swagger_doc_generator_test.go @@ -0,0 +1,43 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package runtime + +import ( + "testing" +) + +func TestFmtRawDoc(t *testing.T) { + tests := []struct { + t, expected string + }{ + {"aaa\n --- asd\n TODO: tooooodo\n toooodoooooo\n", "aaa"}, + {"aaa\nasd\n TODO: tooooodo\nbbbb\n --- toooodoooooo\n", "aaa asd bbbb"}, + {" TODO: tooooodo\n", ""}, + {"Par1\n\nPar2\n\n", "Par1\\n\\nPar2"}, + {"", ""}, + {" ", ""}, + {" \n", ""}, + {" \n\n ", ""}, + {"Example:\n\tl1\n\t\tl2\n", "Example:\\n\\tl1\\n\\t\\tl2"}, + } + + for _, test := range tests { + if o := fmtRawDoc(test.t); o != test.expected { + t.Fatalf("Expected: %q, got %q", test.expected, o) + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/types/doc.go b/vendor/k8s.io/apimachinery/pkg/types/doc.go index 783cbcdc8..5667fa992 100644 --- a/vendor/k8s.io/apimachinery/pkg/types/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/types/doc.go @@ -15,4 +15,4 @@ limitations under the License. */ // Package types implements various generic types used throughout kubernetes. -package types +package types // import "k8s.io/apimachinery/pkg/types" diff --git a/vendor/k8s.io/apimachinery/pkg/util/cache/cache_test.go b/vendor/k8s.io/apimachinery/pkg/util/cache/cache_test.go new file mode 100644 index 000000000..42a58a93d --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/cache/cache_test.go @@ -0,0 +1,90 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cache + +import ( + "testing" +) + +const ( + maxTestCacheSize int = shardsCount * 2 +) + +func ExpectEntry(t *testing.T, cache Cache, index uint64, expectedValue interface{}) bool { + elem, found := cache.Get(index) + if !found { + t.Errorf("Expected to find entry with key %d", index) + return false + } else if elem != expectedValue { + t.Errorf("Expected to find %v, got %v", expectedValue, elem) + return false + } + return true +} + +func TestBasic(t *testing.T) { + cache := NewCache(maxTestCacheSize) + cache.Add(1, "xxx") + ExpectEntry(t, cache, 1, "xxx") +} + +func TestOverflow(t *testing.T) { + cache := NewCache(maxTestCacheSize) + for i := 0; i < maxTestCacheSize+1; i++ { + cache.Add(uint64(i), "xxx") + } + foundIndexes := make([]uint64, 0) + for i := 0; i < maxTestCacheSize+1; i++ { + _, found := cache.Get(uint64(i)) + if found { + foundIndexes = append(foundIndexes, uint64(i)) + } + } + if len(foundIndexes) != maxTestCacheSize { + t.Errorf("Expect to find %d elements, got %d %v", maxTestCacheSize, len(foundIndexes), foundIndexes) + } +} + +func TestOverwrite(t *testing.T) { + cache := NewCache(maxTestCacheSize) + cache.Add(1, "xxx") + ExpectEntry(t, cache, 1, "xxx") + cache.Add(1, "yyy") + ExpectEntry(t, cache, 1, "yyy") +} + +// TestEvict this test will fail sporatically depending on what add() +// selects for the randomKey to be evicted. Ensure that randomKey +// is never the key we most recently added. Since the chance of failure +// on each evict is 50%, if we do it 7 times, it should catch the problem +// if it exists >99% of the time. +func TestEvict(t *testing.T) { + cache := NewCache(shardsCount) + var found bool + for retry := 0; retry < 7; retry++ { + cache.Add(uint64(shardsCount), "xxx") + found = ExpectEntry(t, cache, uint64(shardsCount), "xxx") + if !found { + break + } + cache.Add(0, "xxx") + found = ExpectEntry(t, cache, 0, "xxx") + if !found { + break + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/cache/lruexpirecache_test.go b/vendor/k8s.io/apimachinery/pkg/util/cache/lruexpirecache_test.go new file mode 100644 index 000000000..bd44f60d4 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/cache/lruexpirecache_test.go @@ -0,0 +1,68 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cache + +import ( + "testing" + "time" + + "k8s.io/apimachinery/pkg/util/clock" + + "github.com/golang/groupcache/lru" +) + +func expectEntry(t *testing.T, c *LRUExpireCache, key lru.Key, value interface{}) { + result, ok := c.Get(key) + if !ok || result != value { + t.Errorf("Expected cache[%v]: %v, got %v", key, value, result) + } +} + +func expectNotEntry(t *testing.T, c *LRUExpireCache, key lru.Key) { + if result, ok := c.Get(key); ok { + t.Errorf("Expected cache[%v] to be empty, got %v", key, result) + } +} + +func TestSimpleGet(t *testing.T) { + c := NewLRUExpireCache(10) + c.Add("long-lived", "12345", 10*time.Hour) + expectEntry(t, c, "long-lived", "12345") +} + +func TestExpiredGet(t *testing.T) { + fakeClock := clock.NewFakeClock(time.Now()) + c := NewLRUExpireCacheWithClock(10, fakeClock) + c.Add("short-lived", "12345", 1*time.Millisecond) + // ensure the entry expired + fakeClock.Step(2 * time.Millisecond) + expectNotEntry(t, c, "short-lived") +} + +func TestLRUOverflow(t *testing.T) { + c := NewLRUExpireCache(4) + c.Add("elem1", "1", 10*time.Hour) + c.Add("elem2", "2", 10*time.Hour) + c.Add("elem3", "3", 10*time.Hour) + c.Add("elem4", "4", 10*time.Hour) + c.Add("elem5", "5", 10*time.Hour) + expectNotEntry(t, c, "elem1") + expectEntry(t, c, "elem2", "2") + expectEntry(t, c, "elem3", "3") + expectEntry(t, c, "elem4", "4") + expectEntry(t, c, "elem5", "5") +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/clock/clock_test.go b/vendor/k8s.io/apimachinery/pkg/util/clock/clock_test.go new file mode 100644 index 000000000..27d34605f --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/clock/clock_test.go @@ -0,0 +1,184 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package clock + +import ( + "testing" + "time" +) + +func TestFakeClock(t *testing.T) { + startTime := time.Now() + tc := NewFakeClock(startTime) + tc.Step(time.Second) + now := tc.Now() + if now.Sub(startTime) != time.Second { + t.Errorf("input: %s now=%s gap=%s expected=%s", startTime, now, now.Sub(startTime), time.Second) + } + + tt := tc.Now() + tc.SetTime(tt.Add(time.Hour)) + if tc.Now().Sub(tt) != time.Hour { + t.Errorf("input: %s now=%s gap=%s expected=%s", tt, tc.Now(), tc.Now().Sub(tt), time.Hour) + } +} + +func TestFakeClockSleep(t *testing.T) { + startTime := time.Now() + tc := NewFakeClock(startTime) + tc.Sleep(time.Duration(1) * time.Hour) + now := tc.Now() + if now.Sub(startTime) != time.Hour { + t.Errorf("Fake sleep failed, expected time to advance by one hour, instead, its %v", now.Sub(startTime)) + } +} + +func TestFakeAfter(t *testing.T) { + tc := NewFakeClock(time.Now()) + if tc.HasWaiters() { + t.Errorf("unexpected waiter?") + } + oneSec := tc.After(time.Second) + if !tc.HasWaiters() { + t.Errorf("unexpected lack of waiter?") + } + + oneOhOneSec := tc.After(time.Second + time.Millisecond) + twoSec := tc.After(2 * time.Second) + select { + case <-oneSec: + t.Errorf("unexpected channel read") + case <-oneOhOneSec: + t.Errorf("unexpected channel read") + case <-twoSec: + t.Errorf("unexpected channel read") + default: + } + + tc.Step(999 * time.Millisecond) + select { + case <-oneSec: + t.Errorf("unexpected channel read") + case <-oneOhOneSec: + t.Errorf("unexpected channel read") + case <-twoSec: + t.Errorf("unexpected channel read") + default: + } + + tc.Step(time.Millisecond) + select { + case <-oneSec: + // Expected! + case <-oneOhOneSec: + t.Errorf("unexpected channel read") + case <-twoSec: + t.Errorf("unexpected channel read") + default: + t.Errorf("unexpected non-channel read") + } + tc.Step(time.Millisecond) + select { + case <-oneSec: + // should not double-trigger! + t.Errorf("unexpected channel read") + case <-oneOhOneSec: + // Expected! + case <-twoSec: + t.Errorf("unexpected channel read") + default: + t.Errorf("unexpected non-channel read") + } +} + +func TestFakeTick(t *testing.T) { + tc := NewFakeClock(time.Now()) + if tc.HasWaiters() { + t.Errorf("unexpected waiter?") + } + oneSec := tc.Tick(time.Second) + if !tc.HasWaiters() { + t.Errorf("unexpected lack of waiter?") + } + + oneOhOneSec := tc.Tick(time.Second + time.Millisecond) + twoSec := tc.Tick(2 * time.Second) + select { + case <-oneSec: + t.Errorf("unexpected channel read") + case <-oneOhOneSec: + t.Errorf("unexpected channel read") + case <-twoSec: + t.Errorf("unexpected channel read") + default: + } + + tc.Step(999 * time.Millisecond) // t=.999 + select { + case <-oneSec: + t.Errorf("unexpected channel read") + case <-oneOhOneSec: + t.Errorf("unexpected channel read") + case <-twoSec: + t.Errorf("unexpected channel read") + default: + } + + tc.Step(time.Millisecond) // t=1.000 + select { + case <-oneSec: + // Expected! + case <-oneOhOneSec: + t.Errorf("unexpected channel read") + case <-twoSec: + t.Errorf("unexpected channel read") + default: + t.Errorf("unexpected non-channel read") + } + tc.Step(time.Millisecond) // t=1.001 + select { + case <-oneSec: + // should not double-trigger! + t.Errorf("unexpected channel read") + case <-oneOhOneSec: + // Expected! + case <-twoSec: + t.Errorf("unexpected channel read") + default: + t.Errorf("unexpected non-channel read") + } + + tc.Step(time.Second) // t=2.001 + tc.Step(time.Second) // t=3.001 + tc.Step(time.Second) // t=4.001 + tc.Step(time.Second) // t=5.001 + + // The one second ticker should not accumulate ticks + accumulatedTicks := 0 + drained := false + for !drained { + select { + case <-oneSec: + accumulatedTicks++ + default: + drained = true + } + } + if accumulatedTicks != 1 { + t.Errorf("unexpected number of accumulated ticks: %d", accumulatedTicks) + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/diff/diff_test.go b/vendor/k8s.io/apimachinery/pkg/util/diff/diff_test.go new file mode 100644 index 000000000..2b72c2f53 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/diff/diff_test.go @@ -0,0 +1,96 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package diff + +import ( + "testing" +) + +func TestObjectReflectDiff(t *testing.T) { + type struct1 struct{ A []int } + + testCases := map[string]struct { + a, b interface{} + out string + }{ + "map": { + a: map[string]int{}, + b: map[string]int{}, + }, + "detect nil map": { + a: map[string]int(nil), + b: map[string]int{}, + out: ` +object: + a: map[string]int(nil) + b: map[string]int{}`, + }, + "detect map changes": { + a: map[string]int{"test": 1, "other": 2}, + b: map[string]int{"test": 2, "third": 3}, + out: ` +object[other]: + a: 2 + b: <nil> +object[test]: + a: 1 + b: 2 +object[third]: + a: <nil> + b: 3`, + }, + "nil slice": {a: struct1{A: nil}, b: struct1{A: nil}}, + "empty slice": {a: struct1{A: []int{}}, b: struct1{A: []int{}}}, + "detect slice changes 1": {a: struct1{A: []int{1}}, b: struct1{A: []int{2}}, out: ` +object.A[0]: + a: 1 + b: 2`, + }, + "detect slice changes 2": {a: struct1{A: []int{}}, b: struct1{A: []int{2}}, out: ` +object.A[0]: + a: <nil> + b: 2`, + }, + "detect slice changes 3": {a: struct1{A: []int{1}}, b: struct1{A: []int{}}, out: ` +object.A[0]: + a: 1 + b: <nil>`, + }, + "detect nil vs empty slices": {a: struct1{A: nil}, b: struct1{A: []int{}}, out: ` +object.A: + a: []int(nil) + b: []int{}`, + }, + } + for name, test := range testCases { + expect := test.out + if len(expect) == 0 { + expect = "<no diffs>" + } + if actual := ObjectReflectDiff(test.a, test.b); actual != expect { + t.Errorf("%s: unexpected output: %s", name, actual) + } + } +} + +func TestStringDiff(t *testing.T) { + diff := StringDiff("aaabb", "aaacc") + expect := "aaa\n\nA: bb\n\nB: cc\n\n" + if diff != expect { + t.Errorf("diff returned %v", diff) + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/errors/doc.go b/vendor/k8s.io/apimachinery/pkg/util/errors/doc.go index b3b39bc38..5d4d6250a 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/errors/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/util/errors/doc.go @@ -15,4 +15,4 @@ limitations under the License. */ // Package errors implements various utility functions and types around errors. -package errors +package errors // import "k8s.io/apimachinery/pkg/util/errors" diff --git a/vendor/k8s.io/apimachinery/pkg/util/errors/errors_test.go b/vendor/k8s.io/apimachinery/pkg/util/errors/errors_test.go new file mode 100644 index 000000000..0ad3967d2 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/errors/errors_test.go @@ -0,0 +1,368 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package errors + +import ( + "fmt" + "reflect" + "sort" + "testing" +) + +func TestEmptyAggregate(t *testing.T) { + var slice []error + var agg Aggregate + var err error + + agg = NewAggregate(slice) + if agg != nil { + t.Errorf("expected nil, got %#v", agg) + } + err = NewAggregate(slice) + if err != nil { + t.Errorf("expected nil, got %#v", err) + } + + // This is not normally possible, but pedantry demands I test it. + agg = aggregate(slice) // empty aggregate + if s := agg.Error(); s != "" { + t.Errorf("expected empty string, got %q", s) + } + if s := agg.Errors(); len(s) != 0 { + t.Errorf("expected empty slice, got %#v", s) + } + err = agg.(error) + if s := err.Error(); s != "" { + t.Errorf("expected empty string, got %q", s) + } +} + +func TestAggregateWithNil(t *testing.T) { + var slice []error + slice = []error{nil} + var agg Aggregate + var err error + + agg = NewAggregate(slice) + if agg != nil { + t.Errorf("expected nil, got %#v", agg) + } + err = NewAggregate(slice) + if err != nil { + t.Errorf("expected nil, got %#v", err) + } + + // Append a non-nil error + slice = append(slice, fmt.Errorf("err")) + agg = NewAggregate(slice) + if agg == nil { + t.Errorf("expected non-nil") + } + if s := agg.Error(); s != "err" { + t.Errorf("expected 'err', got %q", s) + } + if s := agg.Errors(); len(s) != 1 { + t.Errorf("expected one-element slice, got %#v", s) + } + if s := agg.Errors()[0].Error(); s != "err" { + t.Errorf("expected 'err', got %q", s) + } + + err = agg.(error) + if err == nil { + t.Errorf("expected non-nil") + } + if s := err.Error(); s != "err" { + t.Errorf("expected 'err', got %q", s) + } +} + +func TestSingularAggregate(t *testing.T) { + var slice []error = []error{fmt.Errorf("err")} + var agg Aggregate + var err error + + agg = NewAggregate(slice) + if agg == nil { + t.Errorf("expected non-nil") + } + if s := agg.Error(); s != "err" { + t.Errorf("expected 'err', got %q", s) + } + if s := agg.Errors(); len(s) != 1 { + t.Errorf("expected one-element slice, got %#v", s) + } + if s := agg.Errors()[0].Error(); s != "err" { + t.Errorf("expected 'err', got %q", s) + } + + err = agg.(error) + if err == nil { + t.Errorf("expected non-nil") + } + if s := err.Error(); s != "err" { + t.Errorf("expected 'err', got %q", s) + } +} + +func TestPluralAggregate(t *testing.T) { + var slice []error = []error{fmt.Errorf("abc"), fmt.Errorf("123")} + var agg Aggregate + var err error + + agg = NewAggregate(slice) + if agg == nil { + t.Errorf("expected non-nil") + } + if s := agg.Error(); s != "[abc, 123]" { + t.Errorf("expected '[abc, 123]', got %q", s) + } + if s := agg.Errors(); len(s) != 2 { + t.Errorf("expected two-elements slice, got %#v", s) + } + if s := agg.Errors()[0].Error(); s != "abc" { + t.Errorf("expected '[abc, 123]', got %q", s) + } + + err = agg.(error) + if err == nil { + t.Errorf("expected non-nil") + } + if s := err.Error(); s != "[abc, 123]" { + t.Errorf("expected '[abc, 123]', got %q", s) + } +} + +func TestFilterOut(t *testing.T) { + testCases := []struct { + err error + filter []Matcher + expected error + }{ + { + nil, + []Matcher{}, + nil, + }, + { + aggregate{}, + []Matcher{}, + nil, + }, + { + aggregate{fmt.Errorf("abc")}, + []Matcher{}, + aggregate{fmt.Errorf("abc")}, + }, + { + aggregate{fmt.Errorf("abc")}, + []Matcher{func(err error) bool { return false }}, + aggregate{fmt.Errorf("abc")}, + }, + { + aggregate{fmt.Errorf("abc")}, + []Matcher{func(err error) bool { return true }}, + nil, + }, + { + aggregate{fmt.Errorf("abc")}, + []Matcher{func(err error) bool { return false }, func(err error) bool { return false }}, + aggregate{fmt.Errorf("abc")}, + }, + { + aggregate{fmt.Errorf("abc")}, + []Matcher{func(err error) bool { return false }, func(err error) bool { return true }}, + nil, + }, + { + aggregate{fmt.Errorf("abc"), fmt.Errorf("def"), fmt.Errorf("ghi")}, + []Matcher{func(err error) bool { return err.Error() == "def" }}, + aggregate{fmt.Errorf("abc"), fmt.Errorf("ghi")}, + }, + { + aggregate{aggregate{fmt.Errorf("abc")}}, + []Matcher{}, + aggregate{aggregate{fmt.Errorf("abc")}}, + }, + { + aggregate{aggregate{fmt.Errorf("abc"), aggregate{fmt.Errorf("def")}}}, + []Matcher{}, + aggregate{aggregate{fmt.Errorf("abc"), aggregate{fmt.Errorf("def")}}}, + }, + { + aggregate{aggregate{fmt.Errorf("abc"), aggregate{fmt.Errorf("def")}}}, + []Matcher{func(err error) bool { return err.Error() == "def" }}, + aggregate{aggregate{fmt.Errorf("abc")}}, + }, + } + for i, testCase := range testCases { + err := FilterOut(testCase.err, testCase.filter...) + if !reflect.DeepEqual(testCase.expected, err) { + t.Errorf("%d: expected %v, got %v", i, testCase.expected, err) + } + } +} + +func TestFlatten(t *testing.T) { + testCases := []struct { + agg Aggregate + expected Aggregate + }{ + { + nil, + nil, + }, + { + aggregate{}, + nil, + }, + { + aggregate{fmt.Errorf("abc")}, + aggregate{fmt.Errorf("abc")}, + }, + { + aggregate{fmt.Errorf("abc"), fmt.Errorf("def"), fmt.Errorf("ghi")}, + aggregate{fmt.Errorf("abc"), fmt.Errorf("def"), fmt.Errorf("ghi")}, + }, + { + aggregate{aggregate{fmt.Errorf("abc")}}, + aggregate{fmt.Errorf("abc")}, + }, + { + aggregate{aggregate{aggregate{fmt.Errorf("abc")}}}, + aggregate{fmt.Errorf("abc")}, + }, + { + aggregate{aggregate{fmt.Errorf("abc"), aggregate{fmt.Errorf("def")}}}, + aggregate{fmt.Errorf("abc"), fmt.Errorf("def")}, + }, + { + aggregate{aggregate{aggregate{fmt.Errorf("abc")}, fmt.Errorf("def"), aggregate{fmt.Errorf("ghi")}}}, + aggregate{fmt.Errorf("abc"), fmt.Errorf("def"), fmt.Errorf("ghi")}, + }, + } + for i, testCase := range testCases { + agg := Flatten(testCase.agg) + if !reflect.DeepEqual(testCase.expected, agg) { + t.Errorf("%d: expected %v, got %v", i, testCase.expected, agg) + } + } +} + +func TestCreateAggregateFromMessageCountMap(t *testing.T) { + testCases := []struct { + name string + mcm MessageCountMap + expected Aggregate + }{ + { + "input has single instance of one message", + MessageCountMap{"abc": 1}, + aggregate{fmt.Errorf("abc")}, + }, + { + "input has multiple messages", + MessageCountMap{"abc": 2, "ghi": 1}, + aggregate{fmt.Errorf("abc (repeated 2 times)"), fmt.Errorf("ghi")}, + }, + { + "input has multiple messages", + MessageCountMap{"ghi": 1, "abc": 2}, + aggregate{fmt.Errorf("abc (repeated 2 times)"), fmt.Errorf("ghi")}, + }, + } + + var expected, agg []error + for _, testCase := range testCases { + t.Run(testCase.name, func(t *testing.T) { + if testCase.expected != nil { + expected = testCase.expected.Errors() + sort.Slice(expected, func(i, j int) bool { return expected[i].Error() < expected[j].Error() }) + } + if testCase.mcm != nil { + agg = CreateAggregateFromMessageCountMap(testCase.mcm).Errors() + sort.Slice(agg, func(i, j int) bool { return agg[i].Error() < agg[j].Error() }) + } + if !reflect.DeepEqual(expected, agg) { + t.Errorf("expected %v, got %v", expected, agg) + } + }) + } +} + +func TestAggregateGoroutines(t *testing.T) { + testCases := []struct { + errs []error + expected map[string]bool // can't compare directly to Aggregate due to non-deterministic ordering + }{ + { + []error{}, + nil, + }, + { + []error{nil}, + nil, + }, + { + []error{nil, nil}, + nil, + }, + { + []error{fmt.Errorf("1")}, + map[string]bool{"1": true}, + }, + { + []error{fmt.Errorf("1"), nil}, + map[string]bool{"1": true}, + }, + { + []error{fmt.Errorf("1"), fmt.Errorf("267")}, + map[string]bool{"1": true, "267": true}, + }, + { + []error{fmt.Errorf("1"), nil, fmt.Errorf("1234")}, + map[string]bool{"1": true, "1234": true}, + }, + { + []error{nil, fmt.Errorf("1"), nil, fmt.Errorf("1234"), fmt.Errorf("22")}, + map[string]bool{"1": true, "1234": true, "22": true}, + }, + } + for i, testCase := range testCases { + funcs := make([]func() error, len(testCase.errs)) + for i := range testCase.errs { + err := testCase.errs[i] + funcs[i] = func() error { return err } + } + agg := AggregateGoroutines(funcs...) + if agg == nil { + if len(testCase.expected) > 0 { + t.Errorf("%d: expected %v, got nil", i, testCase.expected) + } + continue + } + if len(agg.Errors()) != len(testCase.expected) { + t.Errorf("%d: expected %d errors in aggregate, got %v", i, len(testCase.expected), agg) + continue + } + for _, err := range agg.Errors() { + if !testCase.expected[err.Error()] { + t.Errorf("%d: expected %v, got aggregate containing %v", i, testCase.expected, err) + } + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/framer/framer_test.go b/vendor/k8s.io/apimachinery/pkg/util/framer/framer_test.go new file mode 100644 index 000000000..b7ed00f53 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/framer/framer_test.go @@ -0,0 +1,176 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package framer + +import ( + "bytes" + "io" + "io/ioutil" + "testing" +) + +func TestRead(t *testing.T) { + data := []byte{ + 0x00, 0x00, 0x00, 0x04, + 0x01, 0x02, 0x03, 0x04, + 0x00, 0x00, 0x00, 0x03, + 0x05, 0x06, 0x07, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, + 0x08, + } + b := bytes.NewBuffer(data) + r := NewLengthDelimitedFrameReader(ioutil.NopCloser(b)) + buf := make([]byte, 1) + if n, err := r.Read(buf); err != io.ErrShortBuffer && n != 1 && bytes.Equal(buf, []byte{0x01}) { + t.Fatalf("unexpected: %v %d %v", err, n, buf) + } + if n, err := r.Read(buf); err != io.ErrShortBuffer && n != 1 && bytes.Equal(buf, []byte{0x02}) { + t.Fatalf("unexpected: %v %d %v", err, n, buf) + } + // read the remaining frame + buf = make([]byte, 2) + if n, err := r.Read(buf); err != nil && n != 2 && bytes.Equal(buf, []byte{0x03, 0x04}) { + t.Fatalf("unexpected: %v %d %v", err, n, buf) + } + // read with buffer equal to frame + buf = make([]byte, 3) + if n, err := r.Read(buf); err != nil && n != 3 && bytes.Equal(buf, []byte{0x05, 0x06, 0x07}) { + t.Fatalf("unexpected: %v %d %v", err, n, buf) + } + // read empty frame + buf = make([]byte, 3) + if n, err := r.Read(buf); err != nil && n != 0 && bytes.Equal(buf, []byte{}) { + t.Fatalf("unexpected: %v %d %v", err, n, buf) + } + // read with larger buffer than frame + buf = make([]byte, 3) + if n, err := r.Read(buf); err != nil && n != 1 && bytes.Equal(buf, []byte{0x08}) { + t.Fatalf("unexpected: %v %d %v", err, n, buf) + } + // read EOF + if n, err := r.Read(buf); err != io.EOF && n != 0 { + t.Fatalf("unexpected: %v %d", err, n) + } +} + +func TestReadLarge(t *testing.T) { + data := []byte{ + 0x00, 0x00, 0x00, 0x04, + 0x01, 0x02, 0x03, 0x04, + 0x00, 0x00, 0x00, 0x03, + 0x05, 0x06, 0x07, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, + 0x08, + } + b := bytes.NewBuffer(data) + r := NewLengthDelimitedFrameReader(ioutil.NopCloser(b)) + buf := make([]byte, 40) + if n, err := r.Read(buf); err != nil && n != 4 && bytes.Equal(buf, []byte{0x01, 0x02, 0x03, 0x04}) { + t.Fatalf("unexpected: %v %d %v", err, n, buf) + } + if n, err := r.Read(buf); err != nil && n != 3 && bytes.Equal(buf, []byte{0x05, 0x06, 0x7}) { + t.Fatalf("unexpected: %v %d %v", err, n, buf) + } + if n, err := r.Read(buf); err != nil && n != 0 && bytes.Equal(buf, []byte{}) { + t.Fatalf("unexpected: %v %d %v", err, n, buf) + } + if n, err := r.Read(buf); err != nil && n != 1 && bytes.Equal(buf, []byte{0x08}) { + t.Fatalf("unexpected: %v %d %v", err, n, buf) + } + // read EOF + if n, err := r.Read(buf); err != io.EOF && n != 0 { + t.Fatalf("unexpected: %v %d", err, n) + } +} +func TestReadInvalidFrame(t *testing.T) { + data := []byte{ + 0x00, 0x00, 0x00, 0x04, + 0x01, 0x02, + } + b := bytes.NewBuffer(data) + r := NewLengthDelimitedFrameReader(ioutil.NopCloser(b)) + buf := make([]byte, 1) + if n, err := r.Read(buf); err != io.ErrShortBuffer && n != 1 && bytes.Equal(buf, []byte{0x01}) { + t.Fatalf("unexpected: %v %d %v", err, n, buf) + } + // read the remaining frame + buf = make([]byte, 3) + if n, err := r.Read(buf); err != io.ErrUnexpectedEOF && n != 1 && bytes.Equal(buf, []byte{0x02}) { + t.Fatalf("unexpected: %v %d %v", err, n, buf) + } + // read EOF + if n, err := r.Read(buf); err != io.EOF && n != 0 { + t.Fatalf("unexpected: %v %d", err, n) + } +} + +func TestJSONFrameReader(t *testing.T) { + b := bytes.NewBufferString("{\"test\":true}\n1\n[\"a\"]") + r := NewJSONFramedReader(ioutil.NopCloser(b)) + buf := make([]byte, 20) + if n, err := r.Read(buf); err != nil || n != 13 || string(buf[:n]) != `{"test":true}` { + t.Fatalf("unexpected: %v %d %q", err, n, buf) + } + if n, err := r.Read(buf); err != nil || n != 1 || string(buf[:n]) != `1` { + t.Fatalf("unexpected: %v %d %q", err, n, buf) + } + if n, err := r.Read(buf); err != nil || n != 5 || string(buf[:n]) != `["a"]` { + t.Fatalf("unexpected: %v %d %q", err, n, buf) + } + if n, err := r.Read(buf); err != io.EOF || n != 0 { + t.Fatalf("unexpected: %v %d %q", err, n, buf) + } +} + +func TestJSONFrameReaderShortBuffer(t *testing.T) { + b := bytes.NewBufferString("{\"test\":true}\n1\n[\"a\"]") + r := NewJSONFramedReader(ioutil.NopCloser(b)) + buf := make([]byte, 3) + + if n, err := r.Read(buf); err != io.ErrShortBuffer || n != 3 || string(buf[:n]) != `{"t` { + t.Fatalf("unexpected: %v %d %q", err, n, buf) + } + if n, err := r.Read(buf); err != io.ErrShortBuffer || n != 3 || string(buf[:n]) != `est` { + t.Fatalf("unexpected: %v %d %q", err, n, buf) + } + if n, err := r.Read(buf); err != io.ErrShortBuffer || n != 3 || string(buf[:n]) != `":t` { + t.Fatalf("unexpected: %v %d %q", err, n, buf) + } + if n, err := r.Read(buf); err != io.ErrShortBuffer || n != 3 || string(buf[:n]) != `rue` { + t.Fatalf("unexpected: %v %d %q", err, n, buf) + } + if n, err := r.Read(buf); err != nil || n != 1 || string(buf[:n]) != `}` { + t.Fatalf("unexpected: %v %d %q", err, n, buf) + } + + if n, err := r.Read(buf); err != nil || n != 1 || string(buf[:n]) != `1` { + t.Fatalf("unexpected: %v %d %q", err, n, buf) + } + + if n, err := r.Read(buf); err != io.ErrShortBuffer || n != 3 || string(buf[:n]) != `["a` { + t.Fatalf("unexpected: %v %d %q", err, n, buf) + } + if n, err := r.Read(buf); err != nil || n != 2 || string(buf[:n]) != `"]` { + t.Fatalf("unexpected: %v %d %q", err, n, buf) + } + + if n, err := r.Read(buf); err != io.EOF || n != 0 { + t.Fatalf("unexpected: %v %d %q", err, n, buf) + } +} diff --git a/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/aes/BUILD b/vendor/k8s.io/apimachinery/pkg/util/httpstream/BUILD similarity index 65% rename from vendor/k8s.io/apiserver/pkg/storage/value/encrypt/aes/BUILD rename to vendor/k8s.io/apimachinery/pkg/util/httpstream/BUILD index 430d6438d..fa913eb77 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/aes/BUILD +++ b/vendor/k8s.io/apimachinery/pkg/util/httpstream/BUILD @@ -8,15 +8,16 @@ load( go_test( name = "go_default_test", - srcs = ["aes_test.go"], + srcs = ["httpstream_test.go"], library = ":go_default_library", - deps = ["//vendor/k8s.io/apiserver/pkg/storage/value:go_default_library"], ) go_library( name = "go_default_library", - srcs = ["aes.go"], - deps = ["//vendor/k8s.io/apiserver/pkg/storage/value:go_default_library"], + srcs = [ + "doc.go", + "httpstream.go", + ], ) filegroup( @@ -28,6 +29,9 @@ filegroup( filegroup( name = "all-srcs", - srcs = [":package-srcs"], + srcs = [ + ":package-srcs", + "//staging/src/k8s.io/apimachinery/pkg/util/httpstream/spdy:all-srcs", + ], tags = ["automanaged"], ) diff --git a/controllers/gce/utils/doc.go b/vendor/k8s.io/apimachinery/pkg/util/httpstream/doc.go similarity index 72% rename from controllers/gce/utils/doc.go rename to vendor/k8s.io/apimachinery/pkg/util/httpstream/doc.go index f5ff4e4e7..5893df5bd 100644 --- a/controllers/gce/utils/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/util/httpstream/doc.go @@ -14,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -// utils contains odd structs, constants etc that don't fit cleanly into any -// sub-module because they're shared. Ideally this module wouldn't exist, but -// sharing these odd bits reduces margin for error. - -package utils +// Package httpstream adds multiplexed streaming support to HTTP requests and +// responses via connection upgrades. +package httpstream // import "k8s.io/apimachinery/pkg/util/httpstream" diff --git a/vendor/k8s.io/apimachinery/pkg/util/httpstream/httpstream.go b/vendor/k8s.io/apimachinery/pkg/util/httpstream/httpstream.go new file mode 100644 index 000000000..7c9b791d4 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/httpstream/httpstream.go @@ -0,0 +1,149 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package httpstream + +import ( + "fmt" + "io" + "net/http" + "strings" + "time" +) + +const ( + HeaderConnection = "Connection" + HeaderUpgrade = "Upgrade" + HeaderProtocolVersion = "X-Stream-Protocol-Version" + HeaderAcceptedProtocolVersions = "X-Accepted-Stream-Protocol-Versions" +) + +// NewStreamHandler defines a function that is called when a new Stream is +// received. If no error is returned, the Stream is accepted; otherwise, +// the stream is rejected. After the reply frame has been sent, replySent is closed. +type NewStreamHandler func(stream Stream, replySent <-chan struct{}) error + +// NoOpNewStreamHandler is a stream handler that accepts a new stream and +// performs no other logic. +func NoOpNewStreamHandler(stream Stream, replySent <-chan struct{}) error { return nil } + +// Dialer knows how to open a streaming connection to a server. +type Dialer interface { + + // Dial opens a streaming connection to a server using one of the protocols + // specified (in order of most preferred to least preferred). + Dial(protocols ...string) (Connection, string, error) +} + +// UpgradeRoundTripper is a type of http.RoundTripper that is able to upgrade +// HTTP requests to support multiplexed bidirectional streams. After RoundTrip() +// is invoked, if the upgrade is successful, clients may retrieve the upgraded +// connection by calling UpgradeRoundTripper.Connection(). +type UpgradeRoundTripper interface { + http.RoundTripper + // NewConnection validates the response and creates a new Connection. + NewConnection(resp *http.Response) (Connection, error) +} + +// ResponseUpgrader knows how to upgrade HTTP requests and responses to +// add streaming support to them. +type ResponseUpgrader interface { + // UpgradeResponse upgrades an HTTP response to one that supports multiplexed + // streams. newStreamHandler will be called asynchronously whenever the + // other end of the upgraded connection creates a new stream. + UpgradeResponse(w http.ResponseWriter, req *http.Request, newStreamHandler NewStreamHandler) Connection +} + +// Connection represents an upgraded HTTP connection. +type Connection interface { + // CreateStream creates a new Stream with the supplied headers. + CreateStream(headers http.Header) (Stream, error) + // Close resets all streams and closes the connection. + Close() error + // CloseChan returns a channel that is closed when the underlying connection is closed. + CloseChan() <-chan bool + // SetIdleTimeout sets the amount of time the connection may remain idle before + // it is automatically closed. + SetIdleTimeout(timeout time.Duration) +} + +// Stream represents a bidirectional communications channel that is part of an +// upgraded connection. +type Stream interface { + io.ReadWriteCloser + // Reset closes both directions of the stream, indicating that neither client + // or server can use it any more. + Reset() error + // Headers returns the headers used to create the stream. + Headers() http.Header + // Identifier returns the stream's ID. + Identifier() uint32 +} + +// IsUpgradeRequest returns true if the given request is a connection upgrade request +func IsUpgradeRequest(req *http.Request) bool { + for _, h := range req.Header[http.CanonicalHeaderKey(HeaderConnection)] { + if strings.Contains(strings.ToLower(h), strings.ToLower(HeaderUpgrade)) { + return true + } + } + return false +} + +func negotiateProtocol(clientProtocols, serverProtocols []string) string { + for i := range clientProtocols { + for j := range serverProtocols { + if clientProtocols[i] == serverProtocols[j] { + return clientProtocols[i] + } + } + } + return "" +} + +// Handshake performs a subprotocol negotiation. If the client did request a +// subprotocol, Handshake will select the first common value found in +// serverProtocols. If a match is found, Handshake adds a response header +// indicating the chosen subprotocol. If no match is found, HTTP forbidden is +// returned, along with a response header containing the list of protocols the +// server can accept. +func Handshake(req *http.Request, w http.ResponseWriter, serverProtocols []string) (string, error) { + clientProtocols := req.Header[http.CanonicalHeaderKey(HeaderProtocolVersion)] + if len(clientProtocols) == 0 { + // Kube 1.0 clients didn't support subprotocol negotiation. + // TODO require clientProtocols once Kube 1.0 is no longer supported + return "", nil + } + + if len(serverProtocols) == 0 { + // Kube 1.0 servers didn't support subprotocol negotiation. This is mainly for testing. + // TODO require serverProtocols once Kube 1.0 is no longer supported + return "", nil + } + + negotiatedProtocol := negotiateProtocol(clientProtocols, serverProtocols) + if len(negotiatedProtocol) == 0 { + w.WriteHeader(http.StatusForbidden) + for i := range serverProtocols { + w.Header().Add(HeaderAcceptedProtocolVersions, serverProtocols[i]) + } + fmt.Fprintf(w, "unable to upgrade: unable to negotiate protocol: client supports %v, server accepts %v", clientProtocols, serverProtocols) + return "", fmt.Errorf("unable to upgrade: unable to negotiate protocol: client supports %v, server supports %v", clientProtocols, serverProtocols) + } + + w.Header().Add(HeaderProtocolVersion, negotiatedProtocol) + return negotiatedProtocol, nil +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/httpstream/httpstream_test.go b/vendor/k8s.io/apimachinery/pkg/util/httpstream/httpstream_test.go new file mode 100644 index 000000000..f7f9a3ebf --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/httpstream/httpstream_test.go @@ -0,0 +1,125 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package httpstream + +import ( + "net/http" + "reflect" + "testing" +) + +type responseWriter struct { + header http.Header + statusCode *int +} + +func newResponseWriter() *responseWriter { + return &responseWriter{ + header: make(http.Header), + } +} + +func (r *responseWriter) Header() http.Header { + return r.header +} + +func (r *responseWriter) WriteHeader(code int) { + r.statusCode = &code +} + +func (r *responseWriter) Write([]byte) (int, error) { + return 0, nil +} + +func TestHandshake(t *testing.T) { + tests := map[string]struct { + clientProtocols []string + serverProtocols []string + expectedProtocol string + expectError bool + }{ + "no client protocols": { + clientProtocols: []string{}, + serverProtocols: []string{"a", "b"}, + expectedProtocol: "", + }, + "no common protocol": { + clientProtocols: []string{"c"}, + serverProtocols: []string{"a", "b"}, + expectedProtocol: "", + expectError: true, + }, + "common protocol": { + clientProtocols: []string{"b"}, + serverProtocols: []string{"a", "b"}, + expectedProtocol: "b", + }, + } + + for name, test := range tests { + req, err := http.NewRequest("GET", "http://www.example.com/", nil) + if err != nil { + t.Fatalf("%s: error creating request: %v", name, err) + } + + for _, p := range test.clientProtocols { + req.Header.Add(HeaderProtocolVersion, p) + } + + w := newResponseWriter() + negotiated, err := Handshake(req, w, test.serverProtocols) + + // verify negotiated protocol + if e, a := test.expectedProtocol, negotiated; e != a { + t.Errorf("%s: protocol: expected %q, got %q", name, e, a) + } + + if test.expectError { + if err == nil { + t.Errorf("%s: expected error but did not get one", name) + } + if w.statusCode == nil { + t.Errorf("%s: expected w.statusCode to be set", name) + } else if e, a := http.StatusForbidden, *w.statusCode; e != a { + t.Errorf("%s: w.statusCode: expected %d, got %d", name, e, a) + } + if e, a := test.serverProtocols, w.Header()[HeaderAcceptedProtocolVersions]; !reflect.DeepEqual(e, a) { + t.Errorf("%s: accepted server protocols: expected %v, got %v", name, e, a) + } + continue + } + if !test.expectError && err != nil { + t.Errorf("%s: unexpected error: %v", name, err) + continue + } + if w.statusCode != nil { + t.Errorf("%s: unexpected non-nil w.statusCode: %d", name, w.statusCode) + } + + if len(test.expectedProtocol) == 0 { + if len(w.Header()[HeaderProtocolVersion]) > 0 { + t.Errorf("%s: unexpected protocol version response header: %s", name, w.Header()[HeaderProtocolVersion]) + } + continue + } + + // verify response headers + if e, a := []string{test.expectedProtocol}, w.Header()[HeaderProtocolVersion]; !reflect.DeepEqual(e, a) { + t.Errorf("%s: protocol response header: expected %v, got %v", name, e, a) + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/BUILD b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/BUILD new file mode 100644 index 000000000..3d82eb526 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/BUILD @@ -0,0 +1,55 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", + "go_test", +) + +go_test( + name = "go_default_test", + srcs = [ + "connection_test.go", + "roundtripper_test.go", + "upgrade_test.go", + ], + library = ":go_default_library", + deps = [ + "//vendor/github.com/elazarl/goproxy:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/httpstream:go_default_library", + ], +) + +go_library( + name = "go_default_library", + srcs = [ + "connection.go", + "roundtripper.go", + "upgrade.go", + ], + deps = [ + "//vendor/github.com/docker/spdystream:go_default_library", + "//vendor/github.com/golang/glog:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/httpstream:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/net:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/third_party/forked/golang/netutil:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/connection.go b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/connection.go new file mode 100644 index 000000000..3dc8e23ae --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/connection.go @@ -0,0 +1,145 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package spdy + +import ( + "net" + "net/http" + "sync" + "time" + + "github.com/docker/spdystream" + "github.com/golang/glog" + "k8s.io/apimachinery/pkg/util/httpstream" +) + +// connection maintains state about a spdystream.Connection and its associated +// streams. +type connection struct { + conn *spdystream.Connection + streams []httpstream.Stream + streamLock sync.Mutex + newStreamHandler httpstream.NewStreamHandler +} + +// NewClientConnection creates a new SPDY client connection. +func NewClientConnection(conn net.Conn) (httpstream.Connection, error) { + spdyConn, err := spdystream.NewConnection(conn, false) + if err != nil { + defer conn.Close() + return nil, err + } + + return newConnection(spdyConn, httpstream.NoOpNewStreamHandler), nil +} + +// NewServerConnection creates a new SPDY server connection. newStreamHandler +// will be invoked when the server receives a newly created stream from the +// client. +func NewServerConnection(conn net.Conn, newStreamHandler httpstream.NewStreamHandler) (httpstream.Connection, error) { + spdyConn, err := spdystream.NewConnection(conn, true) + if err != nil { + defer conn.Close() + return nil, err + } + + return newConnection(spdyConn, newStreamHandler), nil +} + +// newConnection returns a new connection wrapping conn. newStreamHandler +// will be invoked when the server receives a newly created stream from the +// client. +func newConnection(conn *spdystream.Connection, newStreamHandler httpstream.NewStreamHandler) httpstream.Connection { + c := &connection{conn: conn, newStreamHandler: newStreamHandler} + go conn.Serve(c.newSpdyStream) + return c +} + +// createStreamResponseTimeout indicates how long to wait for the other side to +// acknowledge the new stream before timing out. +const createStreamResponseTimeout = 30 * time.Second + +// Close first sends a reset for all of the connection's streams, and then +// closes the underlying spdystream.Connection. +func (c *connection) Close() error { + c.streamLock.Lock() + for _, s := range c.streams { + // calling Reset instead of Close ensures that all streams are fully torn down + s.Reset() + } + c.streams = make([]httpstream.Stream, 0) + c.streamLock.Unlock() + + // now that all streams are fully torn down, it's safe to call close on the underlying connection, + // which should be able to terminate immediately at this point, instead of waiting for any + // remaining graceful stream termination. + return c.conn.Close() +} + +// CreateStream creates a new stream with the specified headers and registers +// it with the connection. +func (c *connection) CreateStream(headers http.Header) (httpstream.Stream, error) { + stream, err := c.conn.CreateStream(headers, nil, false) + if err != nil { + return nil, err + } + if err = stream.WaitTimeout(createStreamResponseTimeout); err != nil { + return nil, err + } + + c.registerStream(stream) + return stream, nil +} + +// registerStream adds the stream s to the connection's list of streams that +// it owns. +func (c *connection) registerStream(s httpstream.Stream) { + c.streamLock.Lock() + c.streams = append(c.streams, s) + c.streamLock.Unlock() +} + +// CloseChan returns a channel that, when closed, indicates that the underlying +// spdystream.Connection has been closed. +func (c *connection) CloseChan() <-chan bool { + return c.conn.CloseChan() +} + +// newSpdyStream is the internal new stream handler used by spdystream.Connection.Serve. +// It calls connection's newStreamHandler, giving it the opportunity to accept or reject +// the stream. If newStreamHandler returns an error, the stream is rejected. If not, the +// stream is accepted and registered with the connection. +func (c *connection) newSpdyStream(stream *spdystream.Stream) { + replySent := make(chan struct{}) + err := c.newStreamHandler(stream, replySent) + rejectStream := (err != nil) + if rejectStream { + glog.Warningf("Stream rejected: %v", err) + stream.Reset() + return + } + + c.registerStream(stream) + stream.SendReply(http.Header{}, rejectStream) + close(replySent) +} + +// SetIdleTimeout sets the amount of time the connection may remain idle before +// it is automatically closed. +func (c *connection) SetIdleTimeout(timeout time.Duration) { + c.conn.SetIdleTimeout(timeout) +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/connection_test.go b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/connection_test.go new file mode 100644 index 000000000..f94e2b3ba --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/connection_test.go @@ -0,0 +1,164 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package spdy + +import ( + "io" + "net" + "net/http" + "sync" + "testing" + "time" + + "k8s.io/apimachinery/pkg/util/httpstream" +) + +func runProxy(t *testing.T, backendUrl string, proxyUrl chan<- string, proxyDone chan<- struct{}) { + listener, err := net.Listen("tcp4", "localhost:0") + if err != nil { + t.Fatalf("error listening: %v", err) + } + defer listener.Close() + + proxyUrl <- listener.Addr().String() + + clientConn, err := listener.Accept() + if err != nil { + t.Errorf("proxy: error accepting client connection: %v", err) + return + } + + backendConn, err := net.Dial("tcp4", backendUrl) + if err != nil { + t.Errorf("proxy: error dialing backend: %v", err) + return + } + defer backendConn.Close() + + var wg sync.WaitGroup + wg.Add(2) + + go func() { + defer wg.Done() + io.Copy(backendConn, clientConn) + }() + + go func() { + defer wg.Done() + io.Copy(clientConn, backendConn) + }() + + wg.Wait() + + proxyDone <- struct{}{} +} + +func runServer(t *testing.T, backendUrl chan<- string, serverDone chan<- struct{}) { + listener, err := net.Listen("tcp4", "localhost:0") + if err != nil { + t.Fatalf("server: error listening: %v", err) + } + defer listener.Close() + + backendUrl <- listener.Addr().String() + + conn, err := listener.Accept() + if err != nil { + t.Errorf("server: error accepting connection: %v", err) + return + } + + streamChan := make(chan httpstream.Stream) + replySentChan := make(chan (<-chan struct{})) + spdyConn, err := NewServerConnection(conn, func(stream httpstream.Stream, replySent <-chan struct{}) error { + streamChan <- stream + replySentChan <- replySent + return nil + }) + if err != nil { + t.Errorf("server: error creating spdy connection: %v", err) + return + } + + stream := <-streamChan + replySent := <-replySentChan + <-replySent + + buf := make([]byte, 1) + _, err = stream.Read(buf) + if err != io.EOF { + t.Errorf("server: unexpected read error: %v", err) + return + } + + <-spdyConn.CloseChan() + raw := spdyConn.(*connection).conn + if err := raw.Wait(15 * time.Second); err != nil { + t.Errorf("server: timed out waiting for connection closure: %v", err) + } + + serverDone <- struct{}{} +} + +func TestConnectionCloseIsImmediateThroughAProxy(t *testing.T) { + serverDone := make(chan struct{}) + backendUrlChan := make(chan string) + go runServer(t, backendUrlChan, serverDone) + backendUrl := <-backendUrlChan + + proxyDone := make(chan struct{}) + proxyUrlChan := make(chan string) + go runProxy(t, backendUrl, proxyUrlChan, proxyDone) + proxyUrl := <-proxyUrlChan + + conn, err := net.Dial("tcp4", proxyUrl) + if err != nil { + t.Fatalf("client: error connecting to proxy: %v", err) + } + + spdyConn, err := NewClientConnection(conn) + if err != nil { + t.Fatalf("client: error creating spdy connection: %v", err) + } + + if _, err := spdyConn.CreateStream(http.Header{}); err != nil { + t.Fatalf("client: error creating stream: %v", err) + } + + spdyConn.Close() + raw := spdyConn.(*connection).conn + if err := raw.Wait(15 * time.Second); err != nil { + t.Fatalf("client: timed out waiting for connection closure: %v", err) + } + + expired := time.NewTimer(15 * time.Second) + defer expired.Stop() + i := 0 + for { + select { + case <-expired.C: + t.Fatalf("timed out waiting for proxy and/or server closure") + case <-serverDone: + i++ + case <-proxyDone: + i++ + } + if i == 2 { + break + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper.go b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper.go new file mode 100644 index 000000000..12bef075d --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper.go @@ -0,0 +1,326 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package spdy + +import ( + "bufio" + "bytes" + "crypto/tls" + "encoding/base64" + "fmt" + "io" + "io/ioutil" + "net" + "net/http" + "net/http/httputil" + "net/url" + "strings" + + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/apimachinery/pkg/util/httpstream" + utilnet "k8s.io/apimachinery/pkg/util/net" + "k8s.io/apimachinery/third_party/forked/golang/netutil" +) + +// SpdyRoundTripper knows how to upgrade an HTTP request to one that supports +// multiplexed streams. After RoundTrip() is invoked, Conn will be set +// and usable. SpdyRoundTripper implements the UpgradeRoundTripper interface. +type SpdyRoundTripper struct { + //tlsConfig holds the TLS configuration settings to use when connecting + //to the remote server. + tlsConfig *tls.Config + + /* TODO according to http://golang.org/pkg/net/http/#RoundTripper, a RoundTripper + must be safe for use by multiple concurrent goroutines. If this is absolutely + necessary, we could keep a map from http.Request to net.Conn. In practice, + a client will create an http.Client, set the transport to a new insteace of + SpdyRoundTripper, and use it a single time, so this hopefully won't be an issue. + */ + // conn is the underlying network connection to the remote server. + conn net.Conn + + // Dialer is the dialer used to connect. Used if non-nil. + Dialer *net.Dialer + + // proxier knows which proxy to use given a request, defaults to http.ProxyFromEnvironment + // Used primarily for mocking the proxy discovery in tests. + proxier func(req *http.Request) (*url.URL, error) + + // followRedirects indicates if the round tripper should examine responses for redirects and + // follow them. + followRedirects bool +} + +var _ utilnet.TLSClientConfigHolder = &SpdyRoundTripper{} +var _ httpstream.UpgradeRoundTripper = &SpdyRoundTripper{} +var _ utilnet.Dialer = &SpdyRoundTripper{} + +// NewRoundTripper creates a new SpdyRoundTripper that will use +// the specified tlsConfig. +func NewRoundTripper(tlsConfig *tls.Config, followRedirects bool) httpstream.UpgradeRoundTripper { + return NewSpdyRoundTripper(tlsConfig, followRedirects) +} + +// NewSpdyRoundTripper creates a new SpdyRoundTripper that will use +// the specified tlsConfig. This function is mostly meant for unit tests. +func NewSpdyRoundTripper(tlsConfig *tls.Config, followRedirects bool) *SpdyRoundTripper { + return &SpdyRoundTripper{tlsConfig: tlsConfig, followRedirects: followRedirects} +} + +// TLSClientConfig implements pkg/util/net.TLSClientConfigHolder for proper TLS checking during +// proxying with a spdy roundtripper. +func (s *SpdyRoundTripper) TLSClientConfig() *tls.Config { + return s.tlsConfig +} + +// Dial implements k8s.io/apimachinery/pkg/util/net.Dialer. +func (s *SpdyRoundTripper) Dial(req *http.Request) (net.Conn, error) { + conn, err := s.dial(req) + if err != nil { + return nil, err + } + + if err := req.Write(conn); err != nil { + conn.Close() + return nil, err + } + + return conn, nil +} + +// dial dials the host specified by req, using TLS if appropriate, optionally +// using a proxy server if one is configured via environment variables. +func (s *SpdyRoundTripper) dial(req *http.Request) (net.Conn, error) { + proxier := s.proxier + if proxier == nil { + proxier = http.ProxyFromEnvironment + } + proxyURL, err := proxier(req) + if err != nil { + return nil, err + } + + if proxyURL == nil { + return s.dialWithoutProxy(req.URL) + } + + // ensure we use a canonical host with proxyReq + targetHost := netutil.CanonicalAddr(req.URL) + + // proxying logic adapted from http://blog.h6t.eu/post/74098062923/golang-websocket-with-http-proxy-support + proxyReq := http.Request{ + Method: "CONNECT", + URL: &url.URL{}, + Host: targetHost, + } + + if pa := s.proxyAuth(proxyURL); pa != "" { + proxyReq.Header = http.Header{} + proxyReq.Header.Set("Proxy-Authorization", pa) + } + + proxyDialConn, err := s.dialWithoutProxy(proxyURL) + if err != nil { + return nil, err + } + + proxyClientConn := httputil.NewProxyClientConn(proxyDialConn, nil) + _, err = proxyClientConn.Do(&proxyReq) + if err != nil && err != httputil.ErrPersistEOF { + return nil, err + } + + rwc, _ := proxyClientConn.Hijack() + + if req.URL.Scheme != "https" { + return rwc, nil + } + + host, _, err := net.SplitHostPort(targetHost) + if err != nil { + return nil, err + } + + tlsConfig := s.tlsConfig + switch { + case tlsConfig == nil: + tlsConfig = &tls.Config{ServerName: host} + case len(tlsConfig.ServerName) == 0: + tlsConfig = tlsConfig.Clone() + tlsConfig.ServerName = host + } + + tlsConn := tls.Client(rwc, tlsConfig) + + // need to manually call Handshake() so we can call VerifyHostname() below + if err := tlsConn.Handshake(); err != nil { + return nil, err + } + + // Return if we were configured to skip validation + if tlsConfig.InsecureSkipVerify { + return tlsConn, nil + } + + if err := tlsConn.VerifyHostname(tlsConfig.ServerName); err != nil { + return nil, err + } + + return tlsConn, nil +} + +// dialWithoutProxy dials the host specified by url, using TLS if appropriate. +func (s *SpdyRoundTripper) dialWithoutProxy(url *url.URL) (net.Conn, error) { + dialAddr := netutil.CanonicalAddr(url) + + if url.Scheme == "http" { + if s.Dialer == nil { + return net.Dial("tcp", dialAddr) + } else { + return s.Dialer.Dial("tcp", dialAddr) + } + } + + // TODO validate the TLSClientConfig is set up? + var conn *tls.Conn + var err error + if s.Dialer == nil { + conn, err = tls.Dial("tcp", dialAddr, s.tlsConfig) + } else { + conn, err = tls.DialWithDialer(s.Dialer, "tcp", dialAddr, s.tlsConfig) + } + if err != nil { + return nil, err + } + + // Return if we were configured to skip validation + if s.tlsConfig != nil && s.tlsConfig.InsecureSkipVerify { + return conn, nil + } + + host, _, err := net.SplitHostPort(dialAddr) + if err != nil { + return nil, err + } + if s.tlsConfig != nil && len(s.tlsConfig.ServerName) > 0 { + host = s.tlsConfig.ServerName + } + err = conn.VerifyHostname(host) + if err != nil { + return nil, err + } + + return conn, nil +} + +// proxyAuth returns, for a given proxy URL, the value to be used for the Proxy-Authorization header +func (s *SpdyRoundTripper) proxyAuth(proxyURL *url.URL) string { + if proxyURL == nil || proxyURL.User == nil { + return "" + } + credentials := proxyURL.User.String() + encodedAuth := base64.StdEncoding.EncodeToString([]byte(credentials)) + return fmt.Sprintf("Basic %s", encodedAuth) +} + +// RoundTrip executes the Request and upgrades it. After a successful upgrade, +// clients may call SpdyRoundTripper.Connection() to retrieve the upgraded +// connection. +func (s *SpdyRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { + header := utilnet.CloneHeader(req.Header) + header.Add(httpstream.HeaderConnection, httpstream.HeaderUpgrade) + header.Add(httpstream.HeaderUpgrade, HeaderSpdy31) + + var ( + conn net.Conn + rawResponse []byte + err error + ) + + if s.followRedirects { + conn, rawResponse, err = utilnet.ConnectWithRedirects(req.Method, req.URL, header, req.Body, s) + } else { + clone := utilnet.CloneRequest(req) + clone.Header = header + conn, err = s.Dial(clone) + } + if err != nil { + return nil, err + } + + responseReader := bufio.NewReader( + io.MultiReader( + bytes.NewBuffer(rawResponse), + conn, + ), + ) + + resp, err := http.ReadResponse(responseReader, nil) + if err != nil { + if conn != nil { + conn.Close() + } + return nil, err + } + + s.conn = conn + + return resp, nil +} + +// NewConnection validates the upgrade response, creating and returning a new +// httpstream.Connection if there were no errors. +func (s *SpdyRoundTripper) NewConnection(resp *http.Response) (httpstream.Connection, error) { + connectionHeader := strings.ToLower(resp.Header.Get(httpstream.HeaderConnection)) + upgradeHeader := strings.ToLower(resp.Header.Get(httpstream.HeaderUpgrade)) + if (resp.StatusCode != http.StatusSwitchingProtocols) || !strings.Contains(connectionHeader, strings.ToLower(httpstream.HeaderUpgrade)) || !strings.Contains(upgradeHeader, strings.ToLower(HeaderSpdy31)) { + defer resp.Body.Close() + responseError := "" + responseErrorBytes, err := ioutil.ReadAll(resp.Body) + if err != nil { + responseError = "unable to read error from server response" + } else { + // TODO: I don't belong here, I should be abstracted from this class + if obj, _, err := statusCodecs.UniversalDecoder().Decode(responseErrorBytes, nil, &metav1.Status{}); err == nil { + if status, ok := obj.(*metav1.Status); ok { + return nil, &apierrors.StatusError{ErrStatus: *status} + } + } + responseError = string(responseErrorBytes) + responseError = strings.TrimSpace(responseError) + } + + return nil, fmt.Errorf("unable to upgrade connection: %s", responseError) + } + + return NewClientConnection(s.conn) +} + +// statusScheme is private scheme for the decoding here until someone fixes the TODO in NewConnection +var statusScheme = runtime.NewScheme() + +// ParameterCodec knows about query parameters used with the meta v1 API spec. +var statusCodecs = serializer.NewCodecFactory(statusScheme) + +func init() { + statusScheme.AddUnversionedTypes(metav1.SchemeGroupVersion, + &metav1.Status{}, + ) +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper_test.go b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper_test.go new file mode 100644 index 000000000..887adbe8f --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper_test.go @@ -0,0 +1,529 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package spdy + +import ( + "crypto/tls" + "crypto/x509" + "encoding/base64" + "fmt" + "io" + "net/http" + "net/http/httptest" + "net/url" + "strings" + "sync/atomic" + "testing" + + "github.com/elazarl/goproxy" + + "k8s.io/apimachinery/pkg/util/httpstream" +) + +// be sure to unset environment variable https_proxy (if exported) before testing, otherwise the testing will fail unexpectedly. +func TestRoundTripAndNewConnection(t *testing.T) { + for _, redirect := range []bool{false, true} { + t.Run(fmt.Sprintf("redirect = %t", redirect), func(t *testing.T) { + localhostPool := x509.NewCertPool() + if !localhostPool.AppendCertsFromPEM(localhostCert) { + t.Errorf("error setting up localhostCert pool") + } + + httpsServerInvalidHostname := func(h http.Handler) *httptest.Server { + cert, err := tls.X509KeyPair(exampleCert, exampleKey) + if err != nil { + t.Errorf("https (invalid hostname): proxy_test: %v", err) + } + ts := httptest.NewUnstartedServer(h) + ts.TLS = &tls.Config{ + Certificates: []tls.Certificate{cert}, + } + ts.StartTLS() + return ts + } + + httpsServerValidHostname := func(h http.Handler) *httptest.Server { + cert, err := tls.X509KeyPair(localhostCert, localhostKey) + if err != nil { + t.Errorf("https (valid hostname): proxy_test: %v", err) + } + ts := httptest.NewUnstartedServer(h) + ts.TLS = &tls.Config{ + Certificates: []tls.Certificate{cert}, + } + ts.StartTLS() + return ts + } + + testCases := map[string]struct { + serverFunc func(http.Handler) *httptest.Server + proxyServerFunc func(http.Handler) *httptest.Server + proxyAuth *url.Userinfo + clientTLS *tls.Config + serverConnectionHeader string + serverUpgradeHeader string + serverStatusCode int + shouldError bool + }{ + "no headers": { + serverFunc: httptest.NewServer, + serverConnectionHeader: "", + serverUpgradeHeader: "", + serverStatusCode: http.StatusSwitchingProtocols, + shouldError: true, + }, + "no upgrade header": { + serverFunc: httptest.NewServer, + serverConnectionHeader: "Upgrade", + serverUpgradeHeader: "", + serverStatusCode: http.StatusSwitchingProtocols, + shouldError: true, + }, + "no connection header": { + serverFunc: httptest.NewServer, + serverConnectionHeader: "", + serverUpgradeHeader: "SPDY/3.1", + serverStatusCode: http.StatusSwitchingProtocols, + shouldError: true, + }, + "no switching protocol status code": { + serverFunc: httptest.NewServer, + serverConnectionHeader: "Upgrade", + serverUpgradeHeader: "SPDY/3.1", + serverStatusCode: http.StatusForbidden, + shouldError: true, + }, + "http": { + serverFunc: httptest.NewServer, + serverConnectionHeader: "Upgrade", + serverUpgradeHeader: "SPDY/3.1", + serverStatusCode: http.StatusSwitchingProtocols, + shouldError: false, + }, + "https (invalid hostname + InsecureSkipVerify)": { + serverFunc: httpsServerInvalidHostname, + clientTLS: &tls.Config{InsecureSkipVerify: true}, + serverConnectionHeader: "Upgrade", + serverUpgradeHeader: "SPDY/3.1", + serverStatusCode: http.StatusSwitchingProtocols, + shouldError: false, + }, + "https (invalid hostname + hostname verification)": { + serverFunc: httpsServerInvalidHostname, + clientTLS: &tls.Config{InsecureSkipVerify: false}, + serverConnectionHeader: "Upgrade", + serverUpgradeHeader: "SPDY/3.1", + serverStatusCode: http.StatusSwitchingProtocols, + shouldError: true, + }, + "https (valid hostname + RootCAs)": { + serverFunc: httpsServerValidHostname, + clientTLS: &tls.Config{RootCAs: localhostPool}, + serverConnectionHeader: "Upgrade", + serverUpgradeHeader: "SPDY/3.1", + serverStatusCode: http.StatusSwitchingProtocols, + shouldError: false, + }, + "proxied http->http": { + serverFunc: httptest.NewServer, + proxyServerFunc: httptest.NewServer, + serverConnectionHeader: "Upgrade", + serverUpgradeHeader: "SPDY/3.1", + serverStatusCode: http.StatusSwitchingProtocols, + shouldError: false, + }, + "proxied https (invalid hostname + InsecureSkipVerify) -> http": { + serverFunc: httptest.NewServer, + proxyServerFunc: httpsServerInvalidHostname, + clientTLS: &tls.Config{InsecureSkipVerify: true}, + serverConnectionHeader: "Upgrade", + serverUpgradeHeader: "SPDY/3.1", + serverStatusCode: http.StatusSwitchingProtocols, + shouldError: false, + }, + "proxied https with auth (invalid hostname + InsecureSkipVerify) -> http": { + serverFunc: httptest.NewServer, + proxyServerFunc: httpsServerInvalidHostname, + proxyAuth: url.UserPassword("proxyuser", "proxypasswd"), + clientTLS: &tls.Config{InsecureSkipVerify: true}, + serverConnectionHeader: "Upgrade", + serverUpgradeHeader: "SPDY/3.1", + serverStatusCode: http.StatusSwitchingProtocols, + shouldError: false, + }, + "proxied https (invalid hostname + hostname verification) -> http": { + serverFunc: httptest.NewServer, + proxyServerFunc: httpsServerInvalidHostname, + clientTLS: &tls.Config{InsecureSkipVerify: false}, + serverConnectionHeader: "Upgrade", + serverUpgradeHeader: "SPDY/3.1", + serverStatusCode: http.StatusSwitchingProtocols, + shouldError: true, // fails because the client doesn't trust the proxy + }, + "proxied https (valid hostname + RootCAs) -> http": { + serverFunc: httptest.NewServer, + proxyServerFunc: httpsServerValidHostname, + clientTLS: &tls.Config{RootCAs: localhostPool}, + serverConnectionHeader: "Upgrade", + serverUpgradeHeader: "SPDY/3.1", + serverStatusCode: http.StatusSwitchingProtocols, + shouldError: false, + }, + "proxied https with auth (valid hostname + RootCAs) -> http": { + serverFunc: httptest.NewServer, + proxyServerFunc: httpsServerValidHostname, + proxyAuth: url.UserPassword("proxyuser", "proxypasswd"), + clientTLS: &tls.Config{RootCAs: localhostPool}, + serverConnectionHeader: "Upgrade", + serverUpgradeHeader: "SPDY/3.1", + serverStatusCode: http.StatusSwitchingProtocols, + shouldError: false, + }, + "proxied https (invalid hostname + InsecureSkipVerify) -> https (invalid hostname)": { + serverFunc: httpsServerInvalidHostname, + proxyServerFunc: httpsServerInvalidHostname, + clientTLS: &tls.Config{InsecureSkipVerify: true}, + serverConnectionHeader: "Upgrade", + serverUpgradeHeader: "SPDY/3.1", + serverStatusCode: http.StatusSwitchingProtocols, + shouldError: false, // works because the test proxy ignores TLS errors + }, + "proxied https with auth (invalid hostname + InsecureSkipVerify) -> https (invalid hostname)": { + serverFunc: httpsServerInvalidHostname, + proxyServerFunc: httpsServerInvalidHostname, + proxyAuth: url.UserPassword("proxyuser", "proxypasswd"), + clientTLS: &tls.Config{InsecureSkipVerify: true}, + serverConnectionHeader: "Upgrade", + serverUpgradeHeader: "SPDY/3.1", + serverStatusCode: http.StatusSwitchingProtocols, + shouldError: false, // works because the test proxy ignores TLS errors + }, + "proxied https (invalid hostname + hostname verification) -> https (invalid hostname)": { + serverFunc: httpsServerInvalidHostname, + proxyServerFunc: httpsServerInvalidHostname, + clientTLS: &tls.Config{InsecureSkipVerify: false}, + serverConnectionHeader: "Upgrade", + serverUpgradeHeader: "SPDY/3.1", + serverStatusCode: http.StatusSwitchingProtocols, + shouldError: true, // fails because the client doesn't trust the proxy + }, + "proxied https (valid hostname + RootCAs) -> https (valid hostname + RootCAs)": { + serverFunc: httpsServerValidHostname, + proxyServerFunc: httpsServerValidHostname, + clientTLS: &tls.Config{RootCAs: localhostPool}, + serverConnectionHeader: "Upgrade", + serverUpgradeHeader: "SPDY/3.1", + serverStatusCode: http.StatusSwitchingProtocols, + shouldError: false, + }, + "proxied https with auth (valid hostname + RootCAs) -> https (valid hostname + RootCAs)": { + serverFunc: httpsServerValidHostname, + proxyServerFunc: httpsServerValidHostname, + proxyAuth: url.UserPassword("proxyuser", "proxypasswd"), + clientTLS: &tls.Config{RootCAs: localhostPool}, + serverConnectionHeader: "Upgrade", + serverUpgradeHeader: "SPDY/3.1", + serverStatusCode: http.StatusSwitchingProtocols, + shouldError: false, + }, + } + + for k, testCase := range testCases { + server := testCase.serverFunc(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + if testCase.shouldError { + if e, a := httpstream.HeaderUpgrade, req.Header.Get(httpstream.HeaderConnection); e != a { + t.Fatalf("%s: Expected connection=upgrade header, got '%s", k, a) + } + + w.Header().Set(httpstream.HeaderConnection, testCase.serverConnectionHeader) + w.Header().Set(httpstream.HeaderUpgrade, testCase.serverUpgradeHeader) + w.WriteHeader(testCase.serverStatusCode) + + return + } + + streamCh := make(chan httpstream.Stream) + + responseUpgrader := NewResponseUpgrader() + spdyConn := responseUpgrader.UpgradeResponse(w, req, func(s httpstream.Stream, replySent <-chan struct{}) error { + streamCh <- s + return nil + }) + if spdyConn == nil { + t.Fatalf("%s: unexpected nil spdyConn", k) + } + defer spdyConn.Close() + + stream := <-streamCh + io.Copy(stream, stream) + })) + defer server.Close() + + serverURL, err := url.Parse(server.URL) + if err != nil { + t.Fatalf("%s: Error creating request: %s", k, err) + } + req, err := http.NewRequest("GET", server.URL, nil) + if err != nil { + t.Fatalf("%s: Error creating request: %s", k, err) + } + + spdyTransport := NewSpdyRoundTripper(testCase.clientTLS, redirect) + + var proxierCalled bool + var proxyCalledWithHost string + var proxyCalledWithAuth bool + var proxyCalledWithAuthHeader string + if testCase.proxyServerFunc != nil { + proxyHandler := goproxy.NewProxyHttpServer() + + proxyHandler.OnRequest().HandleConnectFunc(func(host string, ctx *goproxy.ProxyCtx) (*goproxy.ConnectAction, string) { + proxyCalledWithHost = host + + proxyAuthHeaderName := "Proxy-Authorization" + _, proxyCalledWithAuth = ctx.Req.Header[proxyAuthHeaderName] + proxyCalledWithAuthHeader = ctx.Req.Header.Get(proxyAuthHeaderName) + return goproxy.OkConnect, host + }) + + proxy := testCase.proxyServerFunc(proxyHandler) + + spdyTransport.proxier = func(proxierReq *http.Request) (*url.URL, error) { + proxierCalled = true + proxyURL, err := url.Parse(proxy.URL) + if err != nil { + return nil, err + } + proxyURL.User = testCase.proxyAuth + return proxyURL, nil + } + defer proxy.Close() + } + + client := &http.Client{Transport: spdyTransport} + + resp, err := client.Do(req) + var conn httpstream.Connection + if err == nil { + conn, err = spdyTransport.NewConnection(resp) + } + haveErr := err != nil + if e, a := testCase.shouldError, haveErr; e != a { + t.Fatalf("%s: shouldError=%t, got %t: %v", k, e, a, err) + } + if testCase.shouldError { + continue + } + defer conn.Close() + + if resp.StatusCode != http.StatusSwitchingProtocols { + t.Fatalf("%s: expected http 101 switching protocols, got %d", k, resp.StatusCode) + } + + stream, err := conn.CreateStream(http.Header{}) + if err != nil { + t.Fatalf("%s: error creating client stream: %s", k, err) + } + + n, err := stream.Write([]byte("hello")) + if err != nil { + t.Fatalf("%s: error writing to stream: %s", k, err) + } + if n != 5 { + t.Fatalf("%s: Expected to write 5 bytes, but actually wrote %d", k, n) + } + + b := make([]byte, 5) + n, err = stream.Read(b) + if err != nil { + t.Fatalf("%s: error reading from stream: %s", k, err) + } + if n != 5 { + t.Fatalf("%s: Expected to read 5 bytes, but actually read %d", k, n) + } + if e, a := "hello", string(b[0:n]); e != a { + t.Fatalf("%s: expected '%s', got '%s'", k, e, a) + } + + if testCase.proxyServerFunc != nil { + if !proxierCalled { + t.Fatalf("%s: Expected to use a proxy but proxier in SpdyRoundTripper wasn't called", k) + } + if proxyCalledWithHost != serverURL.Host { + t.Fatalf("%s: Expected to see a call to the proxy for backend %q, got %q", k, serverURL.Host, proxyCalledWithHost) + } + } + + var expectedProxyAuth string + if testCase.proxyAuth != nil { + encodedCredentials := base64.StdEncoding.EncodeToString([]byte(testCase.proxyAuth.String())) + expectedProxyAuth = "Basic " + encodedCredentials + } + if len(expectedProxyAuth) == 0 && proxyCalledWithAuth { + t.Fatalf("%s: Proxy authorization unexpected, got %q", k, proxyCalledWithAuthHeader) + } + if proxyCalledWithAuthHeader != expectedProxyAuth { + t.Fatalf("%s: Expected to see a call to the proxy with credentials %q, got %q", k, testCase.proxyAuth, proxyCalledWithAuthHeader) + } + } + }) + } +} + +func TestRoundTripRedirects(t *testing.T) { + tests := []struct { + redirects int32 + expectSuccess bool + }{ + {0, true}, + {1, true}, + {10, true}, + {11, false}, + } + for _, test := range tests { + t.Run(fmt.Sprintf("with %d redirects", test.redirects), func(t *testing.T) { + var redirects int32 = 0 + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + if redirects < test.redirects { + redirects = atomic.AddInt32(&redirects, 1) + http.Redirect(w, req, "redirect", http.StatusFound) + return + } + streamCh := make(chan httpstream.Stream) + + responseUpgrader := NewResponseUpgrader() + spdyConn := responseUpgrader.UpgradeResponse(w, req, func(s httpstream.Stream, replySent <-chan struct{}) error { + streamCh <- s + return nil + }) + if spdyConn == nil { + t.Fatalf("unexpected nil spdyConn") + } + defer spdyConn.Close() + + stream := <-streamCh + io.Copy(stream, stream) + })) + defer server.Close() + + req, err := http.NewRequest("GET", server.URL, nil) + if err != nil { + t.Fatalf("Error creating request: %s", err) + } + + spdyTransport := NewSpdyRoundTripper(nil, true) + client := &http.Client{Transport: spdyTransport} + + resp, err := client.Do(req) + if test.expectSuccess { + if err != nil { + t.Fatalf("error calling Do: %v", err) + } + } else { + if err == nil { + t.Fatalf("expecting an error") + } else if !strings.Contains(err.Error(), "too many redirects") { + t.Fatalf("expecting too many redirects, got %v", err) + } + return + } + + conn, err := spdyTransport.NewConnection(resp) + if err != nil { + t.Fatalf("error calling NewConnection: %v", err) + } + defer conn.Close() + + if resp.StatusCode != http.StatusSwitchingProtocols { + t.Fatalf("expected http 101 switching protocols, got %d", resp.StatusCode) + } + + stream, err := conn.CreateStream(http.Header{}) + if err != nil { + t.Fatalf("error creating client stream: %s", err) + } + + n, err := stream.Write([]byte("hello")) + if err != nil { + t.Fatalf("error writing to stream: %s", err) + } + if n != 5 { + t.Fatalf("Expected to write 5 bytes, but actually wrote %d", n) + } + + b := make([]byte, 5) + n, err = stream.Read(b) + if err != nil { + t.Fatalf("error reading from stream: %s", err) + } + if n != 5 { + t.Fatalf("Expected to read 5 bytes, but actually read %d", n) + } + if e, a := "hello", string(b[0:n]); e != a { + t.Fatalf("expected '%s', got '%s'", e, a) + } + }) + } +} + +// exampleCert was generated from crypto/tls/generate_cert.go with the following command: +// go run generate_cert.go --rsa-bits 512 --host example.com --ca --start-date "Jan 1 00:00:00 1970" --duration=1000000h +var exampleCert = []byte(`-----BEGIN CERTIFICATE----- +MIIBdzCCASGgAwIBAgIRAOVTAdPnfbS5V85mfS90TfIwDQYJKoZIhvcNAQELBQAw +EjEQMA4GA1UEChMHQWNtZSBDbzAgFw03MDAxMDEwMDAwMDBaGA8yMDg0MDEyOTE2 +MDAwMFowEjEQMA4GA1UEChMHQWNtZSBDbzBcMA0GCSqGSIb3DQEBAQUAA0sAMEgC +QQCoVSqeu8TBvF+70T7Jm4340YQNhds6IxjRoifenYodAO1dnKGrcbF266DJGunh +nIjQH7B12tduhl0fLK4Ezf7/AgMBAAGjUDBOMA4GA1UdDwEB/wQEAwICpDATBgNV +HSUEDDAKBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MBYGA1UdEQQPMA2CC2V4 +YW1wbGUuY29tMA0GCSqGSIb3DQEBCwUAA0EAk1kVa5uZ/AzwYDVcS9bpM/czwjjV +xq3VeSCfmNa2uNjbFvodmCRwZOHUvipAMGCUCV6j5vMrJ8eMj8tCQ36W9A== +-----END CERTIFICATE-----`) + +var exampleKey = []byte(`-----BEGIN RSA PRIVATE KEY----- +MIIBOgIBAAJBAKhVKp67xMG8X7vRPsmbjfjRhA2F2zojGNGiJ96dih0A7V2coatx +sXbroMka6eGciNAfsHXa126GXR8srgTN/v8CAwEAAQJASdzdD7vKsUwMIejGCUb1 +fAnLTPfAY3lFCa+CmR89nE22dAoRDv+5RbnBsZ58BazPNJHrsVPRlfXB3OQmSQr0 +SQIhANoJhs+xOJE/i8nJv0uAbzKyiD1YkvRkta0GpUOULyAVAiEAxaQus3E/SuqD +P7y5NeJnE7X6XkyC35zrsJRkz7orE8MCIHdDjsI8pjyNDeGqwUCDWE/a6DrmIDwe +emHSqMN2YvChAiEAnxLCM9NWaenOsaIoP+J1rDuvw+4499nJKVqGuVrSCRkCIEqK +4KSchPMc3x8M/uhw9oWTtKFmjA/PPh0FsWCdKrEy +-----END RSA PRIVATE KEY-----`) + +// localhostCert was generated from crypto/tls/generate_cert.go with the following command: +// go run generate_cert.go --rsa-bits 512 --host 127.0.0.1,::1,example.com --ca --start-date "Jan 1 00:00:00 1970" --duration=1000000h +var localhostCert = []byte(`-----BEGIN CERTIFICATE----- +MIIBjzCCATmgAwIBAgIRAKpi2WmTcFrVjxrl5n5YDUEwDQYJKoZIhvcNAQELBQAw +EjEQMA4GA1UEChMHQWNtZSBDbzAgFw03MDAxMDEwMDAwMDBaGA8yMDg0MDEyOTE2 +MDAwMFowEjEQMA4GA1UEChMHQWNtZSBDbzBcMA0GCSqGSIb3DQEBAQUAA0sAMEgC +QQC9fEbRszP3t14Gr4oahV7zFObBI4TfA5i7YnlMXeLinb7MnvT4bkfOJzE6zktn +59zP7UiHs3l4YOuqrjiwM413AgMBAAGjaDBmMA4GA1UdDwEB/wQEAwICpDATBgNV +HSUEDDAKBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MC4GA1UdEQQnMCWCC2V4 +YW1wbGUuY29thwR/AAABhxAAAAAAAAAAAAAAAAAAAAABMA0GCSqGSIb3DQEBCwUA +A0EAUsVE6KMnza/ZbodLlyeMzdo7EM/5nb5ywyOxgIOCf0OOLHsPS9ueGLQX9HEG +//yjTXuhNcUugExIjM/AIwAZPQ== +-----END CERTIFICATE-----`) + +// localhostKey is the private key for localhostCert. +var localhostKey = []byte(`-----BEGIN RSA PRIVATE KEY----- +MIIBOwIBAAJBAL18RtGzM/e3XgavihqFXvMU5sEjhN8DmLtieUxd4uKdvsye9Phu +R84nMTrOS2fn3M/tSIezeXhg66quOLAzjXcCAwEAAQJBAKcRxH9wuglYLBdI/0OT +BLzfWPZCEw1vZmMR2FF1Fm8nkNOVDPleeVGTWoOEcYYlQbpTmkGSxJ6ya+hqRi6x +goECIQDx3+X49fwpL6B5qpJIJMyZBSCuMhH4B7JevhGGFENi3wIhAMiNJN5Q3UkL +IuSvv03kaPR5XVQ99/UeEetUgGvBcABpAiBJSBzVITIVCGkGc7d+RCf49KTCIklv +bGWObufAR8Ni4QIgWpILjW8dkGg8GOUZ0zaNA6Nvt6TIv2UWGJ4v5PoV98kCIQDx +rIiZs5QbKdycsv9gQJzwQAogC8o04X3Zz3dsoX+h4A== +-----END RSA PRIVATE KEY-----`) diff --git a/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/upgrade.go b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/upgrade.go new file mode 100644 index 000000000..13353988f --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/upgrade.go @@ -0,0 +1,107 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package spdy + +import ( + "bufio" + "fmt" + "io" + "net" + "net/http" + "strings" + "sync/atomic" + + "k8s.io/apimachinery/pkg/util/httpstream" + "k8s.io/apimachinery/pkg/util/runtime" +) + +const HeaderSpdy31 = "SPDY/3.1" + +// responseUpgrader knows how to upgrade HTTP responses. It +// implements the httpstream.ResponseUpgrader interface. +type responseUpgrader struct { +} + +// connWrapper is used to wrap a hijacked connection and its bufio.Reader. All +// calls will be handled directly by the underlying net.Conn with the exception +// of Read and Close calls, which will consider data in the bufio.Reader. This +// ensures that data already inside the used bufio.Reader instance is also +// read. +type connWrapper struct { + net.Conn + closed int32 + bufReader *bufio.Reader +} + +func (w *connWrapper) Read(b []byte) (n int, err error) { + if atomic.LoadInt32(&w.closed) == 1 { + return 0, io.EOF + } + return w.bufReader.Read(b) +} + +func (w *connWrapper) Close() error { + err := w.Conn.Close() + atomic.StoreInt32(&w.closed, 1) + return err +} + +// NewResponseUpgrader returns a new httpstream.ResponseUpgrader that is +// capable of upgrading HTTP responses using SPDY/3.1 via the +// spdystream package. +func NewResponseUpgrader() httpstream.ResponseUpgrader { + return responseUpgrader{} +} + +// UpgradeResponse upgrades an HTTP response to one that supports multiplexed +// streams. newStreamHandler will be called synchronously whenever the +// other end of the upgraded connection creates a new stream. +func (u responseUpgrader) UpgradeResponse(w http.ResponseWriter, req *http.Request, newStreamHandler httpstream.NewStreamHandler) httpstream.Connection { + connectionHeader := strings.ToLower(req.Header.Get(httpstream.HeaderConnection)) + upgradeHeader := strings.ToLower(req.Header.Get(httpstream.HeaderUpgrade)) + if !strings.Contains(connectionHeader, strings.ToLower(httpstream.HeaderUpgrade)) || !strings.Contains(upgradeHeader, strings.ToLower(HeaderSpdy31)) { + w.WriteHeader(http.StatusBadRequest) + fmt.Fprintf(w, "unable to upgrade: missing upgrade headers in request: %#v", req.Header) + return nil + } + + hijacker, ok := w.(http.Hijacker) + if !ok { + w.WriteHeader(http.StatusInternalServerError) + fmt.Fprintf(w, "unable to upgrade: unable to hijack response") + return nil + } + + w.Header().Add(httpstream.HeaderConnection, httpstream.HeaderUpgrade) + w.Header().Add(httpstream.HeaderUpgrade, HeaderSpdy31) + w.WriteHeader(http.StatusSwitchingProtocols) + + conn, bufrw, err := hijacker.Hijack() + if err != nil { + runtime.HandleError(fmt.Errorf("unable to upgrade: error hijacking response: %v", err)) + return nil + } + + connWithBuf := &connWrapper{Conn: conn, bufReader: bufrw.Reader} + spdyConn, err := NewServerConnection(connWithBuf, newStreamHandler) + if err != nil { + runtime.HandleError(fmt.Errorf("unable to upgrade: error creating SPDY server connection: %v", err)) + return nil + } + + return spdyConn +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/upgrade_test.go b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/upgrade_test.go new file mode 100644 index 000000000..5a514dd5b --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/upgrade_test.go @@ -0,0 +1,93 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package spdy + +import ( + "net/http" + "net/http/httptest" + "testing" +) + +func TestUpgradeResponse(t *testing.T) { + testCases := []struct { + connectionHeader string + upgradeHeader string + shouldError bool + }{ + { + connectionHeader: "", + upgradeHeader: "", + shouldError: true, + }, + { + connectionHeader: "Upgrade", + upgradeHeader: "", + shouldError: true, + }, + { + connectionHeader: "", + upgradeHeader: "SPDY/3.1", + shouldError: true, + }, + { + connectionHeader: "Upgrade", + upgradeHeader: "SPDY/3.1", + shouldError: false, + }, + } + + for i, testCase := range testCases { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + upgrader := NewResponseUpgrader() + conn := upgrader.UpgradeResponse(w, req, nil) + haveErr := conn == nil + if e, a := testCase.shouldError, haveErr; e != a { + t.Fatalf("%d: expected shouldErr=%t, got %t", i, testCase.shouldError, haveErr) + } + if haveErr { + return + } + if conn == nil { + t.Fatalf("%d: unexpected nil conn", i) + } + defer conn.Close() + })) + defer server.Close() + + req, err := http.NewRequest("GET", server.URL, nil) + if err != nil { + t.Fatalf("%d: error creating request: %s", i, err) + } + + req.Header.Set("Connection", testCase.connectionHeader) + req.Header.Set("Upgrade", testCase.upgradeHeader) + + client := &http.Client{} + resp, err := client.Do(req) + if err != nil { + t.Fatalf("%d: unexpected non-nil err from client.Do: %s", i, err) + } + + if testCase.shouldError { + continue + } + + if resp.StatusCode != http.StatusSwitchingProtocols { + t.Fatalf("%d: expected status 101 switching protocols, got %d", i, resp.StatusCode) + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr_test.go b/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr_test.go new file mode 100644 index 000000000..4faba46f8 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr_test.go @@ -0,0 +1,176 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package intstr + +import ( + "encoding/json" + "reflect" + "testing" + + "github.com/ghodss/yaml" +) + +func TestFromInt(t *testing.T) { + i := FromInt(93) + if i.Type != Int || i.IntVal != 93 { + t.Errorf("Expected IntVal=93, got %+v", i) + } +} + +func TestFromString(t *testing.T) { + i := FromString("76") + if i.Type != String || i.StrVal != "76" { + t.Errorf("Expected StrVal=\"76\", got %+v", i) + } +} + +type IntOrStringHolder struct { + IOrS IntOrString `json:"val"` +} + +func TestIntOrStringUnmarshalJSON(t *testing.T) { + cases := []struct { + input string + result IntOrString + }{ + {"{\"val\": 123}", FromInt(123)}, + {"{\"val\": \"123\"}", FromString("123")}, + } + + for _, c := range cases { + var result IntOrStringHolder + if err := json.Unmarshal([]byte(c.input), &result); err != nil { + t.Errorf("Failed to unmarshal input '%v': %v", c.input, err) + } + if result.IOrS != c.result { + t.Errorf("Failed to unmarshal input '%v': expected %+v, got %+v", c.input, c.result, result) + } + } +} + +func TestIntOrStringMarshalJSON(t *testing.T) { + cases := []struct { + input IntOrString + result string + }{ + {FromInt(123), "{\"val\":123}"}, + {FromString("123"), "{\"val\":\"123\"}"}, + } + + for _, c := range cases { + input := IntOrStringHolder{c.input} + result, err := json.Marshal(&input) + if err != nil { + t.Errorf("Failed to marshal input '%v': %v", input, err) + } + if string(result) != c.result { + t.Errorf("Failed to marshal input '%v': expected: %+v, got %q", input, c.result, string(result)) + } + } +} + +func TestIntOrStringMarshalJSONUnmarshalYAML(t *testing.T) { + cases := []struct { + input IntOrString + }{ + {FromInt(123)}, + {FromString("123")}, + } + + for _, c := range cases { + input := IntOrStringHolder{c.input} + jsonMarshalled, err := json.Marshal(&input) + if err != nil { + t.Errorf("1: Failed to marshal input: '%v': %v", input, err) + } + + var result IntOrStringHolder + err = yaml.Unmarshal(jsonMarshalled, &result) + if err != nil { + t.Errorf("2: Failed to unmarshal '%+v': %v", string(jsonMarshalled), err) + } + + if !reflect.DeepEqual(input, result) { + t.Errorf("3: Failed to marshal input '%+v': got %+v", input, result) + } + } +} + +func TestGetValueFromIntOrPercent(t *testing.T) { + tests := []struct { + input IntOrString + total int + roundUp bool + expectErr bool + expectVal int + }{ + { + input: FromInt(123), + expectErr: false, + expectVal: 123, + }, + { + input: FromString("90%"), + total: 100, + roundUp: true, + expectErr: false, + expectVal: 90, + }, + { + input: FromString("90%"), + total: 95, + roundUp: true, + expectErr: false, + expectVal: 86, + }, + { + input: FromString("90%"), + total: 95, + roundUp: false, + expectErr: false, + expectVal: 85, + }, + { + input: FromString("%"), + expectErr: true, + }, + { + input: FromString("90#"), + expectErr: true, + }, + { + input: FromString("#%"), + expectErr: true, + }, + } + + for i, test := range tests { + t.Logf("test case %d", i) + value, err := GetValueFromIntOrPercent(&test.input, test.total, test.roundUp) + if test.expectErr && err == nil { + t.Errorf("expected error, but got none") + continue + } + if !test.expectErr && err != nil { + t.Errorf("unexpected err: %v", err) + continue + } + if test.expectVal != value { + t.Errorf("expected %v, but got %v", test.expectVal, value) + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/json/json_test.go b/vendor/k8s.io/apimachinery/pkg/util/json/json_test.go new file mode 100644 index 000000000..cd0c18bb2 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/json/json_test.go @@ -0,0 +1,319 @@ +// +build go1.8 + +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package json + +import ( + "fmt" + "math" + "reflect" + "strconv" + "strings" + "testing" +) + +func TestEvaluateTypes(t *testing.T) { + testCases := []struct { + In string + Data interface{} + Out string + Err bool + }{ + // Invalid syntaxes + { + In: `x`, + Err: true, + }, + { + In: ``, + Err: true, + }, + + // Null + { + In: `null`, + Data: nil, + Out: `null`, + }, + // Booleans + { + In: `true`, + Data: true, + Out: `true`, + }, + { + In: `false`, + Data: false, + Out: `false`, + }, + + // Integers + { + In: `0`, + Data: int64(0), + Out: `0`, + }, + { + In: `-0`, + Data: int64(-0), + Out: `0`, + }, + { + In: `1`, + Data: int64(1), + Out: `1`, + }, + { + In: `2147483647`, + Data: int64(math.MaxInt32), + Out: `2147483647`, + }, + { + In: `-2147483648`, + Data: int64(math.MinInt32), + Out: `-2147483648`, + }, + { + In: `9223372036854775807`, + Data: int64(math.MaxInt64), + Out: `9223372036854775807`, + }, + { + In: `-9223372036854775808`, + Data: int64(math.MinInt64), + Out: `-9223372036854775808`, + }, + + // Int overflow + { + In: `9223372036854775808`, // MaxInt64 + 1 + Data: float64(9223372036854775808), + Out: `9223372036854776000`, + }, + { + In: `-9223372036854775809`, // MinInt64 - 1 + Data: float64(math.MinInt64), + Out: `-9223372036854776000`, + }, + + // Floats + { + In: `0.0`, + Data: float64(0), + Out: `0`, + }, + { + In: `-0.0`, + Data: float64(-0.0), + Out: `-0`, + }, + { + In: `0.5`, + Data: float64(0.5), + Out: `0.5`, + }, + { + In: `1e3`, + Data: float64(1e3), + Out: `1000`, + }, + { + In: `1.5`, + Data: float64(1.5), + Out: `1.5`, + }, + { + In: `-0.3`, + Data: float64(-.3), + Out: `-0.3`, + }, + { + // Largest representable float32 + In: `3.40282346638528859811704183484516925440e+38`, + Data: float64(math.MaxFloat32), + Out: strconv.FormatFloat(math.MaxFloat32, 'g', -1, 64), + }, + { + // Smallest float32 without losing precision + In: `1.175494351e-38`, + Data: float64(1.175494351e-38), + Out: `1.175494351e-38`, + }, + { + // float32 closest to zero + In: `1.401298464324817070923729583289916131280e-45`, + Data: float64(math.SmallestNonzeroFloat32), + Out: strconv.FormatFloat(math.SmallestNonzeroFloat32, 'g', -1, 64), + }, + { + // Largest representable float64 + In: `1.797693134862315708145274237317043567981e+308`, + Data: float64(math.MaxFloat64), + Out: strconv.FormatFloat(math.MaxFloat64, 'g', -1, 64), + }, + { + // Closest to zero without losing precision + In: `2.2250738585072014e-308`, + Data: float64(2.2250738585072014e-308), + Out: `2.2250738585072014e-308`, + }, + + { + // float64 closest to zero + In: `4.940656458412465441765687928682213723651e-324`, + Data: float64(math.SmallestNonzeroFloat64), + Out: strconv.FormatFloat(math.SmallestNonzeroFloat64, 'g', -1, 64), + }, + + { + // math.MaxFloat64 + 2 overflow + In: `1.7976931348623159e+308`, + Err: true, + }, + + // Strings + { + In: `""`, + Data: string(""), + Out: `""`, + }, + { + In: `"0"`, + Data: string("0"), + Out: `"0"`, + }, + { + In: `"A"`, + Data: string("A"), + Out: `"A"`, + }, + { + In: `"Iñtërnâtiônàlizætiøn"`, + Data: string("Iñtërnâtiônàlizætiøn"), + Out: `"Iñtërnâtiônàlizætiøn"`, + }, + + // Arrays + { + In: `[]`, + Data: []interface{}{}, + Out: `[]`, + }, + { + In: `[` + strings.Join([]string{ + `null`, + `true`, + `false`, + `0`, + `9223372036854775807`, + `0.0`, + `0.5`, + `1.0`, + `1.797693134862315708145274237317043567981e+308`, + `"0"`, + `"A"`, + `"Iñtërnâtiônàlizætiøn"`, + `[null,true,1,1.0,1.5]`, + `{"boolkey":true,"floatkey":1.0,"intkey":1,"nullkey":null}`, + }, ",") + `]`, + Data: []interface{}{ + nil, + true, + false, + int64(0), + int64(math.MaxInt64), + float64(0.0), + float64(0.5), + float64(1.0), + float64(math.MaxFloat64), + string("0"), + string("A"), + string("Iñtërnâtiônàlizætiøn"), + []interface{}{nil, true, int64(1), float64(1.0), float64(1.5)}, + map[string]interface{}{"nullkey": nil, "boolkey": true, "intkey": int64(1), "floatkey": float64(1.0)}, + }, + Out: `[` + strings.Join([]string{ + `null`, + `true`, + `false`, + `0`, + `9223372036854775807`, + `0`, + `0.5`, + `1`, + strconv.FormatFloat(math.MaxFloat64, 'g', -1, 64), + `"0"`, + `"A"`, + `"Iñtërnâtiônàlizætiøn"`, + `[null,true,1,1,1.5]`, + `{"boolkey":true,"floatkey":1,"intkey":1,"nullkey":null}`, // gets alphabetized by Marshal + }, ",") + `]`, + }, + + // Maps + { + In: `{}`, + Data: map[string]interface{}{}, + Out: `{}`, + }, + { + In: `{"boolkey":true,"floatkey":1.0,"intkey":1,"nullkey":null}`, + Data: map[string]interface{}{"nullkey": nil, "boolkey": true, "intkey": int64(1), "floatkey": float64(1.0)}, + Out: `{"boolkey":true,"floatkey":1,"intkey":1,"nullkey":null}`, // gets alphabetized by Marshal + }, + } + + for _, tc := range testCases { + inputJSON := fmt.Sprintf(`{"data":%s}`, tc.In) + expectedJSON := fmt.Sprintf(`{"data":%s}`, tc.Out) + m := map[string]interface{}{} + err := Unmarshal([]byte(inputJSON), &m) + if tc.Err && err != nil { + // Expected error + continue + } + if err != nil { + t.Errorf("%s: error decoding: %v", tc.In, err) + continue + } + if tc.Err { + t.Errorf("%s: expected error, got none", tc.In) + continue + } + data, ok := m["data"] + if !ok { + t.Errorf("%s: decoded object missing data key: %#v", tc.In, m) + continue + } + if !reflect.DeepEqual(tc.Data, data) { + t.Errorf("%s: expected\n\t%#v (%v), got\n\t%#v (%v)", tc.In, tc.Data, reflect.TypeOf(tc.Data), data, reflect.TypeOf(data)) + continue + } + + outputJSON, err := Marshal(m) + if err != nil { + t.Errorf("%s: error encoding: %v", tc.In, err) + continue + } + + if expectedJSON != string(outputJSON) { + t.Errorf("%s: expected\n\t%s, got\n\t%s", tc.In, expectedJSON, string(outputJSON)) + continue + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/mergepatch/util_test.go b/vendor/k8s.io/apimachinery/pkg/util/mergepatch/util_test.go new file mode 100644 index 000000000..1b37e3ef5 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/mergepatch/util_test.go @@ -0,0 +1,138 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package mergepatch + +import ( + "fmt" + "testing" +) + +func TestHasConflicts(t *testing.T) { + testCases := []struct { + A interface{} + B interface{} + Ret bool + }{ + {A: "hello", B: "hello", Ret: false}, + {A: "hello", B: "hell", Ret: true}, + {A: "hello", B: nil, Ret: true}, + {A: "hello", B: 1, Ret: true}, + {A: "hello", B: float64(1.0), Ret: true}, + {A: "hello", B: false, Ret: true}, + {A: 1, B: 1, Ret: false}, + {A: nil, B: nil, Ret: false}, + {A: false, B: false, Ret: false}, + {A: float64(3), B: float64(3), Ret: false}, + + {A: "hello", B: []interface{}{}, Ret: true}, + {A: []interface{}{1}, B: []interface{}{}, Ret: true}, + {A: []interface{}{}, B: []interface{}{}, Ret: false}, + {A: []interface{}{1}, B: []interface{}{1}, Ret: false}, + {A: map[string]interface{}{}, B: []interface{}{1}, Ret: true}, + + {A: map[string]interface{}{}, B: map[string]interface{}{"a": 1}, Ret: false}, + {A: map[string]interface{}{"a": 1}, B: map[string]interface{}{"a": 1}, Ret: false}, + {A: map[string]interface{}{"a": 1}, B: map[string]interface{}{"a": 2}, Ret: true}, + {A: map[string]interface{}{"a": 1}, B: map[string]interface{}{"b": 2}, Ret: false}, + + { + A: map[string]interface{}{"a": []interface{}{1}}, + B: map[string]interface{}{"a": []interface{}{1}}, + Ret: false, + }, + { + A: map[string]interface{}{"a": []interface{}{1}}, + B: map[string]interface{}{"a": []interface{}{}}, + Ret: true, + }, + { + A: map[string]interface{}{"a": []interface{}{1}}, + B: map[string]interface{}{"a": 1}, + Ret: true, + }, + + // Maps and lists with multiple entries. + { + A: map[string]interface{}{"a": 1, "b": 2}, + B: map[string]interface{}{"a": 1, "b": 0}, + Ret: true, + }, + { + A: map[string]interface{}{"a": 1, "b": 2}, + B: map[string]interface{}{"a": 1, "b": 2}, + Ret: false, + }, + { + A: map[string]interface{}{"a": 1, "b": 2}, + B: map[string]interface{}{"a": 1, "b": 0, "c": 3}, + Ret: true, + }, + { + A: map[string]interface{}{"a": 1, "b": 2}, + B: map[string]interface{}{"a": 1, "b": 2, "c": 3}, + Ret: false, + }, + { + A: map[string]interface{}{"a": []interface{}{1, 2}}, + B: map[string]interface{}{"a": []interface{}{1, 0}}, + Ret: true, + }, + { + A: map[string]interface{}{"a": []interface{}{1, 2}}, + B: map[string]interface{}{"a": []interface{}{1, 2}}, + Ret: false, + }, + + // Numeric types are not interchangeable. + // Callers are expected to ensure numeric types are consistent in 'left' and 'right'. + {A: int(0), B: int64(0), Ret: true}, + {A: int(0), B: float64(0), Ret: true}, + {A: int64(0), B: float64(0), Ret: true}, + // Other types are not interchangeable. + {A: int(0), B: "0", Ret: true}, + {A: int(0), B: nil, Ret: true}, + {A: int(0), B: false, Ret: true}, + {A: "true", B: true, Ret: true}, + {A: "null", B: nil, Ret: true}, + } + + for _, testCase := range testCases { + testStr := fmt.Sprintf("A = %#v, B = %#v", testCase.A, testCase.B) + // Run each test case multiple times if it passes because HasConflicts() + // uses map iteration, which returns keys in nondeterministic order. + for try := 0; try < 10; try++ { + out, err := HasConflicts(testCase.A, testCase.B) + if err != nil { + t.Errorf("%v: unexpected error: %v", testStr, err) + break + } + if out != testCase.Ret { + t.Errorf("%v: expected %t got %t", testStr, testCase.Ret, out) + break + } + out, err = HasConflicts(testCase.B, testCase.A) + if err != nil { + t.Errorf("%v: unexpected error: %v", testStr, err) + break + } + if out != testCase.Ret { + t.Errorf("%v: expected reversed %t got %t", testStr, testCase.Ret, out) + break + } + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/http_test.go b/vendor/k8s.io/apimachinery/pkg/util/net/http_test.go new file mode 100644 index 000000000..2d41eda49 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/net/http_test.go @@ -0,0 +1,220 @@ +// +build go1.8 + +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package net + +import ( + "crypto/tls" + "net" + "net/http" + "net/url" + "os" + "reflect" + "testing" +) + +func TestGetClientIP(t *testing.T) { + ipString := "10.0.0.1" + ip := net.ParseIP(ipString) + invalidIPString := "invalidIPString" + testCases := []struct { + Request http.Request + ExpectedIP net.IP + }{ + { + Request: http.Request{}, + }, + { + Request: http.Request{ + Header: map[string][]string{ + "X-Real-Ip": {ipString}, + }, + }, + ExpectedIP: ip, + }, + { + Request: http.Request{ + Header: map[string][]string{ + "X-Real-Ip": {invalidIPString}, + }, + }, + }, + { + Request: http.Request{ + Header: map[string][]string{ + "X-Forwarded-For": {ipString}, + }, + }, + ExpectedIP: ip, + }, + { + Request: http.Request{ + Header: map[string][]string{ + "X-Forwarded-For": {invalidIPString}, + }, + }, + }, + { + Request: http.Request{ + Header: map[string][]string{ + "X-Forwarded-For": {invalidIPString + "," + ipString}, + }, + }, + ExpectedIP: ip, + }, + { + Request: http.Request{ + // RemoteAddr is in the form host:port + RemoteAddr: ipString + ":1234", + }, + ExpectedIP: ip, + }, + { + Request: http.Request{ + RemoteAddr: invalidIPString, + }, + }, + { + Request: http.Request{ + Header: map[string][]string{ + "X-Forwarded-For": {invalidIPString}, + }, + // RemoteAddr is in the form host:port + RemoteAddr: ipString, + }, + ExpectedIP: ip, + }, + } + + for i, test := range testCases { + if a, e := GetClientIP(&test.Request), test.ExpectedIP; reflect.DeepEqual(e, a) != true { + t.Fatalf("test case %d failed. expected: %v, actual: %v", i, e, a) + } + } +} + +func TestAppendForwardedForHeader(t *testing.T) { + testCases := []struct { + addr, forwarded, expected string + }{ + {"1.2.3.4:8000", "", "1.2.3.4"}, + {"1.2.3.4:8000", "8.8.8.8", "8.8.8.8, 1.2.3.4"}, + {"1.2.3.4:8000", "8.8.8.8, 1.2.3.4", "8.8.8.8, 1.2.3.4, 1.2.3.4"}, + {"1.2.3.4:8000", "foo,bar", "foo,bar, 1.2.3.4"}, + } + for i, test := range testCases { + req := &http.Request{ + RemoteAddr: test.addr, + Header: make(http.Header), + } + if test.forwarded != "" { + req.Header.Set("X-Forwarded-For", test.forwarded) + } + + AppendForwardedForHeader(req) + actual := req.Header.Get("X-Forwarded-For") + if actual != test.expected { + t.Errorf("[%d] Expected %q, Got %q", i, test.expected, actual) + } + } +} + +func TestProxierWithNoProxyCIDR(t *testing.T) { + testCases := []struct { + name string + noProxy string + url string + + expectedDelegated bool + }{ + { + name: "no env", + url: "https://192.168.143.1/api", + expectedDelegated: true, + }, + { + name: "no cidr", + noProxy: "192.168.63.1", + url: "https://192.168.143.1/api", + expectedDelegated: true, + }, + { + name: "hostname", + noProxy: "192.168.63.0/24,192.168.143.0/24", + url: "https://my-hostname/api", + expectedDelegated: true, + }, + { + name: "match second cidr", + noProxy: "192.168.63.0/24,192.168.143.0/24", + url: "https://192.168.143.1/api", + expectedDelegated: false, + }, + { + name: "match second cidr with host:port", + noProxy: "192.168.63.0/24,192.168.143.0/24", + url: "https://192.168.143.1:8443/api", + expectedDelegated: false, + }, + } + + for _, test := range testCases { + os.Setenv("NO_PROXY", test.noProxy) + actualDelegated := false + proxyFunc := NewProxierWithNoProxyCIDR(func(req *http.Request) (*url.URL, error) { + actualDelegated = true + return nil, nil + }) + + req, err := http.NewRequest("GET", test.url, nil) + if err != nil { + t.Errorf("%s: unexpected err: %v", test.name, err) + continue + } + if _, err := proxyFunc(req); err != nil { + t.Errorf("%s: unexpected err: %v", test.name, err) + continue + } + + if test.expectedDelegated != actualDelegated { + t.Errorf("%s: expected %v, got %v", test.name, test.expectedDelegated, actualDelegated) + continue + } + } +} + +type fakeTLSClientConfigHolder struct { + called bool +} + +func (f *fakeTLSClientConfigHolder) TLSClientConfig() *tls.Config { + f.called = true + return nil +} +func (f *fakeTLSClientConfigHolder) RoundTrip(*http.Request) (*http.Response, error) { + return nil, nil +} + +func TestTLSClientConfigHolder(t *testing.T) { + rt := &fakeTLSClientConfigHolder{} + TLSClientConfig(rt) + + if !rt.called { + t.Errorf("didn't find tls config") + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/interface_test.go b/vendor/k8s.io/apimachinery/pkg/util/net/interface_test.go new file mode 100644 index 000000000..5f42852ce --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/net/interface_test.go @@ -0,0 +1,725 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package net + +import ( + "fmt" + "io/ioutil" + "net" + "os" + "strings" + "testing" +) + +const gatewayfirst = `Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT +eth3 00000000 0100FE0A 0003 0 0 1024 00000000 0 0 0 +eth3 0000FE0A 00000000 0001 0 0 0 0080FFFF 0 0 0 +docker0 000011AC 00000000 0001 0 0 0 0000FFFF 0 0 0 +virbr0 007AA8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0 +` +const gatewaylast = `Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT +docker0 000011AC 00000000 0001 0 0 0 0000FFFF 0 0 0 +virbr0 007AA8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0 +eth3 0000FE0A 00000000 0001 0 0 0 0080FFFF 0 0 0 +eth3 00000000 0100FE0A 0003 0 0 1024 00000000 0 0 0 +` +const gatewaymiddle = `Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT +eth3 0000FE0A 00000000 0001 0 0 0 0080FFFF 0 0 0 +docker0 000011AC 00000000 0001 0 0 0 0000FFFF 0 0 0 +eth3 00000000 0100FE0A 0003 0 0 1024 00000000 0 0 0 +virbr0 007AA8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0 +` +const noInternetConnection = `Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT +docker0 000011AC 00000000 0001 0 0 0 0000FFFF 0 0 0 +virbr0 007AA8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0 +` +const nothing = `Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT +` +const badDestination = `Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT +eth3 00000000 0100FE0A 0003 0 0 1024 00000000 0 0 0 +eth3 0000FE0AA1 00000000 0001 0 0 0 0080FFFF 0 0 0 +docker0 000011AC 00000000 0001 0 0 0 0000FFFF 0 0 0 +virbr0 007AA8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0 +` +const badGateway = `Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT +eth3 00000000 0100FE0AA1 0003 0 0 1024 00000000 0 0 0 +eth3 0000FE0A 00000000 0001 0 0 0 0080FFFF 0 0 0 +docker0 000011AC 00000000 0001 0 0 0 0000FFFF 0 0 0 +virbr0 007AA8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0 +` +const route_Invalidhex = `Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT +eth3 00000000 0100FE0AA 0003 0 0 1024 00000000 0 0 0 +eth3 0000FE0A 00000000 0001 0 0 0 0080FFFF 0 0 0 +docker0 000011AC 00000000 0001 0 0 0 0000FFFF 0 0 0 +virbr0 007AA8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0 +` + +const v6gatewayfirst = `00000000000000000000000000000000 00 00000000000000000000000000000000 00 20010001000000000000000000000001 00000064 00000000 00000000 00000003 eth3 +20010002000000000000000000000000 40 00000000000000000000000000000000 00 00000000000000000000000000000000 00000100 00000000 00000000 00000001 eth3 +00000000000000000000000000000000 60 00000000000000000000000000000000 00 00000000000000000000000000000000 00000400 00000000 00000000 00200200 lo +` +const v6gatewaylast = `20010002000000000000000000000000 40 00000000000000000000000000000000 00 00000000000000000000000000000000 00000100 00000000 00000000 00000001 eth3 +00000000000000000000000000000000 60 00000000000000000000000000000000 00 00000000000000000000000000000000 00000400 00000000 00000000 00200200 lo +00000000000000000000000000000000 00 00000000000000000000000000000000 00 20010001000000000000000000000001 00000064 00000000 00000000 00000003 eth3 +` +const v6gatewaymiddle = `20010002000000000000000000000000 40 00000000000000000000000000000000 00 00000000000000000000000000000000 00000100 00000000 00000000 00000001 eth3 +00000000000000000000000000000000 00 00000000000000000000000000000000 00 20010001000000000000000000000001 00000064 00000000 00000000 00000003 eth3 +00000000000000000000000000000000 60 00000000000000000000000000000000 00 00000000000000000000000000000000 00000400 00000000 00000000 00200200 lo +` +const v6noDefaultRoutes = `00000000000000000000000000000000 60 00000000000000000000000000000000 00 00000000000000000000000000000000 00000400 00000000 00000000 00200200 lo +20010001000000000000000000000000 40 00000000000000000000000000000000 00 00000000000000000000000000000000 00000400 00000000 00000000 00000001 docker0 +20010002000000000000000000000000 40 00000000000000000000000000000000 00 00000000000000000000000000000000 00000100 00000000 00000000 00000001 eth3 +fe800000000000000000000000000000 40 00000000000000000000000000000000 00 00000000000000000000000000000000 00000100 00000000 00000000 00000001 eth3 +` +const v6nothing = `` +const v6badDestination = `2001000200000000 7a 00000000000000000000000000000000 00 00000000000000000000000000000000 00000400 00000000 00000000 00200200 lo +` +const v6badGateway = `00000000000000000000000000000000 00 00000000000000000000000000000000 00 200100010000000000000000000000000012 00000064 00000000 00000000 00000003 eth3 +` +const v6route_Invalidhex = `000000000000000000000000000000000 00 00000000000000000000000000000000 00 fe80000000000000021fcafffea0ec00 00000064 00000000 00000000 00000003 enp1s0f0 + +` + +const ( + flagUp = net.FlagUp | net.FlagBroadcast | net.FlagMulticast + flagDown = net.FlagBroadcast | net.FlagMulticast + flagLoopback = net.FlagUp | net.FlagLoopback + flagP2P = net.FlagUp | net.FlagPointToPoint +) + +func makeIntf(index int, name string, flags net.Flags) net.Interface { + mac := net.HardwareAddr{0, 0x32, 0x7d, 0x69, 0xf7, byte(0x30 + index)} + return net.Interface{ + Index: index, + MTU: 1500, + Name: name, + HardwareAddr: mac, + Flags: flags} +} + +var ( + downIntf = makeIntf(1, "eth3", flagDown) + loopbackIntf = makeIntf(1, "lo", flagLoopback) + p2pIntf = makeIntf(1, "lo", flagP2P) + upIntf = makeIntf(1, "eth3", flagUp) +) + +var ( + ipv4Route = Route{Interface: "eth3", Destination: net.ParseIP("0.0.0.0"), Gateway: net.ParseIP("10.254.0.1"), Family: familyIPv4} + ipv6Route = Route{Interface: "eth3", Destination: net.ParseIP("::"), Gateway: net.ParseIP("2001:1::1"), Family: familyIPv6} +) + +var ( + noRoutes = []Route{} + routeV4 = []Route{ipv4Route} + routeV6 = []Route{ipv6Route} + bothRoutes = []Route{ipv4Route, ipv6Route} +) + +func TestGetIPv4Routes(t *testing.T) { + testCases := []struct { + tcase string + route string + count int + expected *Route + errStrFrag string + }{ + {"gatewayfirst", gatewayfirst, 1, &ipv4Route, ""}, + {"gatewaymiddle", gatewaymiddle, 1, &ipv4Route, ""}, + {"gatewaylast", gatewaylast, 1, &ipv4Route, ""}, + {"no routes", nothing, 0, nil, ""}, + {"badDestination", badDestination, 0, nil, "invalid IPv4"}, + {"badGateway", badGateway, 0, nil, "invalid IPv4"}, + {"route_Invalidhex", route_Invalidhex, 0, nil, "odd length hex string"}, + {"no default routes", noInternetConnection, 0, nil, ""}, + } + for _, tc := range testCases { + r := strings.NewReader(tc.route) + routes, err := getIPv4DefaultRoutes(r) + if err != nil { + if !strings.Contains(err.Error(), tc.errStrFrag) { + t.Errorf("case[%s]: Error string %q does not contain %q", tc.tcase, err, tc.errStrFrag) + } + } else if tc.errStrFrag != "" { + t.Errorf("case[%s]: Error %q expected, but not seen", tc.tcase, tc.errStrFrag) + } else { + if tc.count != len(routes) { + t.Errorf("case[%s]: expected %d routes, have %v", tc.tcase, tc.count, routes) + } else if tc.count == 1 { + if !tc.expected.Gateway.Equal(routes[0].Gateway) { + t.Errorf("case[%s]: expected %v, got %v .err : %v", tc.tcase, tc.expected, routes, err) + } + if !routes[0].Destination.Equal(net.IPv4zero) { + t.Errorf("case[%s}: destination is not for default route (not zero)", tc.tcase) + } + + } + } + } +} + +func TestGetIPv6Routes(t *testing.T) { + testCases := []struct { + tcase string + route string + count int + expected *Route + errStrFrag string + }{ + {"v6 gatewayfirst", v6gatewayfirst, 1, &ipv6Route, ""}, + {"v6 gatewaymiddle", v6gatewaymiddle, 1, &ipv6Route, ""}, + {"v6 gatewaylast", v6gatewaylast, 1, &ipv6Route, ""}, + {"v6 no routes", v6nothing, 0, nil, ""}, + {"v6 badDestination", v6badDestination, 0, nil, "invalid IPv6"}, + {"v6 badGateway", v6badGateway, 0, nil, "invalid IPv6"}, + {"v6 route_Invalidhex", v6route_Invalidhex, 0, nil, "odd length hex string"}, + {"v6 no default routes", v6noDefaultRoutes, 0, nil, ""}, + } + for _, tc := range testCases { + r := strings.NewReader(tc.route) + routes, err := getIPv6DefaultRoutes(r) + if err != nil { + if !strings.Contains(err.Error(), tc.errStrFrag) { + t.Errorf("case[%s]: Error string %q does not contain %q", tc.tcase, err, tc.errStrFrag) + } + } else if tc.errStrFrag != "" { + t.Errorf("case[%s]: Error %q expected, but not seen", tc.tcase, tc.errStrFrag) + } else { + if tc.count != len(routes) { + t.Errorf("case[%s]: expected %d routes, have %v", tc.tcase, tc.count, routes) + } else if tc.count == 1 { + if !tc.expected.Gateway.Equal(routes[0].Gateway) { + t.Errorf("case[%s]: expected %v, got %v .err : %v", tc.tcase, tc.expected, routes, err) + } + if !routes[0].Destination.Equal(net.IPv6zero) { + t.Errorf("case[%s}: destination is not for default route (not zero)", tc.tcase) + } + } + } + } +} + +func TestParseIP(t *testing.T) { + testCases := []struct { + tcase string + ip string + family AddressFamily + success bool + expected net.IP + }{ + {"empty", "", familyIPv4, false, nil}, + {"too short", "AA", familyIPv4, false, nil}, + {"too long", "0011223344", familyIPv4, false, nil}, + {"invalid", "invalid!", familyIPv4, false, nil}, + {"zero", "00000000", familyIPv4, true, net.IP{0, 0, 0, 0}}, + {"ffff", "FFFFFFFF", familyIPv4, true, net.IP{0xff, 0xff, 0xff, 0xff}}, + {"valid v4", "12345678", familyIPv4, true, net.IP{120, 86, 52, 18}}, + {"valid v6", "fe800000000000000000000000000000", familyIPv6, true, net.IP{0xfe, 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, + {"v6 too short", "fe80000000000000021fcafffea0ec0", familyIPv6, false, nil}, + {"v6 too long", "fe80000000000000021fcafffea0ec002", familyIPv6, false, nil}, + } + for _, tc := range testCases { + ip, err := parseIP(tc.ip, tc.family) + if !ip.Equal(tc.expected) { + t.Errorf("case[%v]: expected %q, got %q . err : %v", tc.tcase, tc.expected, ip, err) + } + } +} + +func TestIsInterfaceUp(t *testing.T) { + testCases := []struct { + tcase string + intf *net.Interface + expected bool + }{ + {"up", &net.Interface{Index: 0, MTU: 0, Name: "eth3", HardwareAddr: nil, Flags: net.FlagUp}, true}, + {"down", &net.Interface{Index: 0, MTU: 0, Name: "eth3", HardwareAddr: nil, Flags: 0}, false}, + {"no interface", nil, false}, + } + for _, tc := range testCases { + it := isInterfaceUp(tc.intf) + if it != tc.expected { + t.Errorf("case[%v]: expected %v, got %v .", tc.tcase, tc.expected, it) + } + } +} + +type addrStruct struct{ val string } + +func (a addrStruct) Network() string { + return a.val +} +func (a addrStruct) String() string { + return a.val +} + +func TestFinalIP(t *testing.T) { + testCases := []struct { + tcase string + addr []net.Addr + family AddressFamily + expected net.IP + }{ + {"no ipv4", []net.Addr{addrStruct{val: "2001::5/64"}}, familyIPv4, nil}, + {"no ipv6", []net.Addr{addrStruct{val: "10.128.0.4/32"}}, familyIPv6, nil}, + {"invalidV4CIDR", []net.Addr{addrStruct{val: "10.20.30.40.50/24"}}, familyIPv4, nil}, + {"invalidV6CIDR", []net.Addr{addrStruct{val: "fe80::2f7:67fff:fe6e:2956/64"}}, familyIPv6, nil}, + {"loopback", []net.Addr{addrStruct{val: "127.0.0.1/24"}}, familyIPv4, nil}, + {"loopbackv6", []net.Addr{addrStruct{val: "::1/128"}}, familyIPv6, nil}, + {"link local v4", []net.Addr{addrStruct{val: "169.254.1.10/16"}}, familyIPv4, nil}, + {"link local v6", []net.Addr{addrStruct{val: "fe80::2f7:6fff:fe6e:2956/64"}}, familyIPv6, nil}, + {"ip4", []net.Addr{addrStruct{val: "10.254.12.132/17"}}, familyIPv4, net.ParseIP("10.254.12.132")}, + {"ip6", []net.Addr{addrStruct{val: "2001::5/64"}}, familyIPv6, net.ParseIP("2001::5")}, + + {"no addresses", []net.Addr{}, familyIPv4, nil}, + } + for _, tc := range testCases { + ip, err := getMatchingGlobalIP(tc.addr, tc.family) + if !ip.Equal(tc.expected) { + t.Errorf("case[%v]: expected %v, got %v .err : %v", tc.tcase, tc.expected, ip, err) + } + } +} + +func TestAddrs(t *testing.T) { + var nw networkInterfacer = validNetworkInterface{} + intf := net.Interface{Index: 0, MTU: 0, Name: "eth3", HardwareAddr: nil, Flags: 0} + addrs, err := nw.Addrs(&intf) + if err != nil { + t.Errorf("expected no error got : %v", err) + } + if len(addrs) != 2 { + t.Errorf("expected addrs: 2 got null") + } +} + +// Has a valid IPv4 address (IPv6 is LLA) +type validNetworkInterface struct { +} + +func (_ validNetworkInterface) InterfaceByName(intfName string) (*net.Interface, error) { + return &upIntf, nil +} +func (_ validNetworkInterface) Addrs(intf *net.Interface) ([]net.Addr, error) { + var ifat []net.Addr + ifat = []net.Addr{ + addrStruct{val: "fe80::2f7:6fff:fe6e:2956/64"}, addrStruct{val: "10.254.71.145/17"}} + return ifat, nil +} +func (_ validNetworkInterface) Interfaces() ([]net.Interface, error) { + return []net.Interface{upIntf}, nil +} + +// Both IPv4 and IPv6 addresses (expecting IPv4 to be used) +type v4v6NetworkInterface struct { +} + +func (_ v4v6NetworkInterface) InterfaceByName(intfName string) (*net.Interface, error) { + return &upIntf, nil +} +func (_ v4v6NetworkInterface) Addrs(intf *net.Interface) ([]net.Addr, error) { + var ifat []net.Addr + ifat = []net.Addr{ + addrStruct{val: "2001::10/64"}, addrStruct{val: "10.254.71.145/17"}} + return ifat, nil +} +func (_ v4v6NetworkInterface) Interfaces() ([]net.Interface, error) { + return []net.Interface{upIntf}, nil +} + +// Interface with only IPv6 address +type ipv6NetworkInterface struct { +} + +func (_ ipv6NetworkInterface) InterfaceByName(intfName string) (*net.Interface, error) { + return &upIntf, nil +} +func (_ ipv6NetworkInterface) Addrs(intf *net.Interface) ([]net.Addr, error) { + var ifat []net.Addr + ifat = []net.Addr{addrStruct{val: "2001::200/64"}} + return ifat, nil +} + +func (_ ipv6NetworkInterface) Interfaces() ([]net.Interface, error) { + return []net.Interface{upIntf}, nil +} + +// Only with link local addresses +type networkInterfaceWithOnlyLinkLocals struct { +} + +func (_ networkInterfaceWithOnlyLinkLocals) InterfaceByName(intfName string) (*net.Interface, error) { + return &upIntf, nil +} +func (_ networkInterfaceWithOnlyLinkLocals) Addrs(intf *net.Interface) ([]net.Addr, error) { + var ifat []net.Addr + ifat = []net.Addr{addrStruct{val: "169.254.162.166/16"}, addrStruct{val: "fe80::200/10"}} + return ifat, nil +} +func (_ networkInterfaceWithOnlyLinkLocals) Interfaces() ([]net.Interface, error) { + return []net.Interface{upIntf}, nil +} + +// Unable to get interface(s) +type failGettingNetworkInterface struct { +} + +func (_ failGettingNetworkInterface) InterfaceByName(intfName string) (*net.Interface, error) { + return nil, fmt.Errorf("unable get Interface") +} +func (_ failGettingNetworkInterface) Addrs(intf *net.Interface) ([]net.Addr, error) { + return nil, nil +} +func (_ failGettingNetworkInterface) Interfaces() ([]net.Interface, error) { + return nil, fmt.Errorf("mock failed getting all interfaces") +} + +// No interfaces +type noNetworkInterface struct { +} + +func (_ noNetworkInterface) InterfaceByName(intfName string) (*net.Interface, error) { + return nil, fmt.Errorf("no such network interface") +} +func (_ noNetworkInterface) Addrs(intf *net.Interface) ([]net.Addr, error) { + return nil, nil +} +func (_ noNetworkInterface) Interfaces() ([]net.Interface, error) { + return []net.Interface{}, nil +} + +// Interface is down +type downNetworkInterface struct { +} + +func (_ downNetworkInterface) InterfaceByName(intfName string) (*net.Interface, error) { + return &downIntf, nil +} +func (_ downNetworkInterface) Addrs(intf *net.Interface) ([]net.Addr, error) { + var ifat []net.Addr + ifat = []net.Addr{ + addrStruct{val: "fe80::2f7:6fff:fe6e:2956/64"}, addrStruct{val: "10.254.71.145/17"}} + return ifat, nil +} +func (_ downNetworkInterface) Interfaces() ([]net.Interface, error) { + return []net.Interface{downIntf}, nil +} + +// Loopback interface +type loopbackNetworkInterface struct { +} + +func (_ loopbackNetworkInterface) InterfaceByName(intfName string) (*net.Interface, error) { + return &loopbackIntf, nil +} +func (_ loopbackNetworkInterface) Addrs(intf *net.Interface) ([]net.Addr, error) { + var ifat []net.Addr + ifat = []net.Addr{ + addrStruct{val: "::1/128"}, addrStruct{val: "127.0.0.1/8"}} + return ifat, nil +} +func (_ loopbackNetworkInterface) Interfaces() ([]net.Interface, error) { + return []net.Interface{loopbackIntf}, nil +} + +// Point to point interface +type p2pNetworkInterface struct { +} + +func (_ p2pNetworkInterface) InterfaceByName(intfName string) (*net.Interface, error) { + return &p2pIntf, nil +} +func (_ p2pNetworkInterface) Addrs(intf *net.Interface) ([]net.Addr, error) { + var ifat []net.Addr + ifat = []net.Addr{ + addrStruct{val: "::1/128"}, addrStruct{val: "127.0.0.1/8"}} + return ifat, nil +} +func (_ p2pNetworkInterface) Interfaces() ([]net.Interface, error) { + return []net.Interface{p2pIntf}, nil +} + +// Unable to get IP addresses for interface +type networkInterfaceFailGetAddrs struct { +} + +func (_ networkInterfaceFailGetAddrs) InterfaceByName(intfName string) (*net.Interface, error) { + return &upIntf, nil +} +func (_ networkInterfaceFailGetAddrs) Addrs(intf *net.Interface) ([]net.Addr, error) { + return nil, fmt.Errorf("unable to get Addrs") +} +func (_ networkInterfaceFailGetAddrs) Interfaces() ([]net.Interface, error) { + return []net.Interface{upIntf}, nil +} + +// No addresses for interface +type networkInterfaceWithNoAddrs struct { +} + +func (_ networkInterfaceWithNoAddrs) InterfaceByName(intfName string) (*net.Interface, error) { + return &upIntf, nil +} +func (_ networkInterfaceWithNoAddrs) Addrs(intf *net.Interface) ([]net.Addr, error) { + ifat := []net.Addr{} + return ifat, nil +} +func (_ networkInterfaceWithNoAddrs) Interfaces() ([]net.Interface, error) { + return []net.Interface{upIntf}, nil +} + +// Invalid addresses for interface +type networkInterfaceWithInvalidAddr struct { +} + +func (_ networkInterfaceWithInvalidAddr) InterfaceByName(intfName string) (*net.Interface, error) { + return &upIntf, nil +} +func (_ networkInterfaceWithInvalidAddr) Addrs(intf *net.Interface) ([]net.Addr, error) { + var ifat []net.Addr + ifat = []net.Addr{addrStruct{val: "10.20.30.40.50/24"}} + return ifat, nil +} +func (_ networkInterfaceWithInvalidAddr) Interfaces() ([]net.Interface, error) { + return []net.Interface{upIntf}, nil +} + +func TestGetIPFromInterface(t *testing.T) { + testCases := []struct { + tcase string + nwname string + family AddressFamily + nw networkInterfacer + expected net.IP + errStrFrag string + }{ + {"ipv4", "eth3", familyIPv4, validNetworkInterface{}, net.ParseIP("10.254.71.145"), ""}, + {"ipv6", "eth3", familyIPv6, ipv6NetworkInterface{}, net.ParseIP("2001::200"), ""}, + {"no ipv4", "eth3", familyIPv4, ipv6NetworkInterface{}, nil, ""}, + {"no ipv6", "eth3", familyIPv6, validNetworkInterface{}, nil, ""}, + {"I/F down", "eth3", familyIPv4, downNetworkInterface{}, nil, ""}, + {"I/F get fail", "eth3", familyIPv4, noNetworkInterface{}, nil, "no such network interface"}, + {"fail get addr", "eth3", familyIPv4, networkInterfaceFailGetAddrs{}, nil, "unable to get Addrs"}, + {"bad addr", "eth3", familyIPv4, networkInterfaceWithInvalidAddr{}, nil, "invalid CIDR"}, + } + for _, tc := range testCases { + ip, err := getIPFromInterface(tc.nwname, tc.family, tc.nw) + if err != nil { + if !strings.Contains(err.Error(), tc.errStrFrag) { + t.Errorf("case[%s]: Error string %q does not contain %q", tc.tcase, err, tc.errStrFrag) + } + } else if tc.errStrFrag != "" { + t.Errorf("case[%s]: Error %q expected, but not seen", tc.tcase, tc.errStrFrag) + } else if !ip.Equal(tc.expected) { + t.Errorf("case[%v]: expected %v, got %+v .err : %v", tc.tcase, tc.expected, ip, err) + } + } +} + +func TestChooseHostInterfaceFromRoute(t *testing.T) { + testCases := []struct { + tcase string + routes []Route + nw networkInterfacer + expected net.IP + }{ + {"ipv4", routeV4, validNetworkInterface{}, net.ParseIP("10.254.71.145")}, + {"ipv6", routeV6, ipv6NetworkInterface{}, net.ParseIP("2001::200")}, + {"prefer ipv4", bothRoutes, v4v6NetworkInterface{}, net.ParseIP("10.254.71.145")}, + {"all LLA", routeV4, networkInterfaceWithOnlyLinkLocals{}, nil}, + {"no routes", noRoutes, validNetworkInterface{}, nil}, + {"fail get IP", routeV4, networkInterfaceFailGetAddrs{}, nil}, + } + for _, tc := range testCases { + ip, err := chooseHostInterfaceFromRoute(tc.routes, tc.nw) + if !ip.Equal(tc.expected) { + t.Errorf("case[%v]: expected %v, got %+v .err : %v", tc.tcase, tc.expected, ip, err) + } + } +} + +func TestMemberOf(t *testing.T) { + testCases := []struct { + tcase string + ip net.IP + family AddressFamily + expected bool + }{ + {"ipv4 is 4", net.ParseIP("10.20.30.40"), familyIPv4, true}, + {"ipv4 is 6", net.ParseIP("10.10.10.10"), familyIPv6, false}, + {"ipv6 is 4", net.ParseIP("2001::100"), familyIPv4, false}, + {"ipv6 is 6", net.ParseIP("2001::100"), familyIPv6, true}, + } + for _, tc := range testCases { + if memberOf(tc.ip, tc.family) != tc.expected { + t.Errorf("case[%s]: expected %+v", tc.tcase, tc.expected) + } + } +} + +func TestGetIPFromHostInterfaces(t *testing.T) { + testCases := []struct { + tcase string + nw networkInterfacer + expected net.IP + errStrFrag string + }{ + {"fail get I/Fs", failGettingNetworkInterface{}, nil, "failed getting all interfaces"}, + {"no interfaces", noNetworkInterface{}, nil, "no interfaces"}, + {"I/F not up", downNetworkInterface{}, nil, "no acceptable"}, + {"loopback only", loopbackNetworkInterface{}, nil, "no acceptable"}, + {"P2P I/F only", p2pNetworkInterface{}, nil, "no acceptable"}, + {"fail get addrs", networkInterfaceFailGetAddrs{}, nil, "unable to get Addrs"}, + {"no addresses", networkInterfaceWithNoAddrs{}, nil, "no acceptable"}, + {"invalid addr", networkInterfaceWithInvalidAddr{}, nil, "invalid CIDR"}, + {"no matches", networkInterfaceWithOnlyLinkLocals{}, nil, "no acceptable"}, + {"ipv4", validNetworkInterface{}, net.ParseIP("10.254.71.145"), ""}, + {"ipv6", ipv6NetworkInterface{}, net.ParseIP("2001::200"), ""}, + } + + for _, tc := range testCases { + ip, err := chooseIPFromHostInterfaces(tc.nw) + if !ip.Equal(tc.expected) { + t.Errorf("case[%s]: expected %+v, got %+v with err : %v", tc.tcase, tc.expected, ip, err) + } + if err != nil && !strings.Contains(err.Error(), tc.errStrFrag) { + t.Errorf("case[%s]: unable to find %q in error string %q", tc.tcase, tc.errStrFrag, err.Error()) + } + } +} + +func makeRouteFile(content string, t *testing.T) (*os.File, error) { + routeFile, err := ioutil.TempFile("", "route") + if err != nil { + return nil, err + } + + if _, err := routeFile.Write([]byte(content)); err != nil { + return routeFile, err + } + err = routeFile.Close() + return routeFile, err +} + +func TestFailGettingIPv4Routes(t *testing.T) { + defer func() { v4File.name = ipv4RouteFile }() + + // Try failure to open file (should not occur, as caller ensures we have IPv4 route file, but being thorough) + v4File.name = "no-such-file" + errStrFrag := "no such file" + _, err := v4File.extract() + if err == nil { + fmt.Errorf("Expected error trying to read non-existent v4 route file") + } + if !strings.Contains(err.Error(), errStrFrag) { + t.Errorf("Unable to find %q in error string %q", errStrFrag, err.Error()) + } +} + +func TestFailGettingIPv6Routes(t *testing.T) { + defer func() { v6File.name = ipv6RouteFile }() + + // Try failure to open file (this would be ignored by caller) + v6File.name = "no-such-file" + errStrFrag := "no such file" + _, err := v6File.extract() + if err == nil { + fmt.Errorf("Expected error trying to read non-existent v6 route file") + } + if !strings.Contains(err.Error(), errStrFrag) { + t.Errorf("Unable to find %q in error string %q", errStrFrag, err.Error()) + } +} + +func TestGetAllDefaultRoutesFailNoV4RouteFile(t *testing.T) { + defer func() { v4File.name = ipv4RouteFile }() + + // Should not occur, as caller ensures we have IPv4 route file, but being thorough + v4File.name = "no-such-file" + errStrFrag := "no such file" + _, err := getAllDefaultRoutes() + if err == nil { + fmt.Errorf("Expected error trying to read non-existent v4 route file") + } + if !strings.Contains(err.Error(), errStrFrag) { + t.Errorf("Unable to find %q in error string %q", errStrFrag, err.Error()) + } +} + +func TestGetAllDefaultRoutes(t *testing.T) { + testCases := []struct { + tcase string + v4Info string + v6Info string + count int + expected []Route + errStrFrag string + }{ + {"no routes", noInternetConnection, v6noDefaultRoutes, 0, nil, "No default routes"}, + {"only v4 route", gatewayfirst, v6noDefaultRoutes, 1, routeV4, ""}, + {"only v6 route", noInternetConnection, v6gatewayfirst, 1, routeV6, ""}, + {"v4 and v6 routes", gatewayfirst, v6gatewayfirst, 2, bothRoutes, ""}, + } + defer func() { + v4File.name = ipv4RouteFile + v6File.name = ipv6RouteFile + }() + + for _, tc := range testCases { + routeFile, err := makeRouteFile(tc.v4Info, t) + if routeFile != nil { + defer os.Remove(routeFile.Name()) + } + if err != nil { + t.Errorf("case[%s]: test setup failure for IPv4 route file: %v", tc.tcase, err) + } + v4File.name = routeFile.Name() + v6routeFile, err := makeRouteFile(tc.v6Info, t) + if v6routeFile != nil { + defer os.Remove(v6routeFile.Name()) + } + if err != nil { + t.Errorf("case[%s]: test setup failure for IPv6 route file: %v", tc.tcase, err) + } + v6File.name = v6routeFile.Name() + + routes, err := getAllDefaultRoutes() + if err != nil { + if !strings.Contains(err.Error(), tc.errStrFrag) { + t.Errorf("case[%s]: Error string %q does not contain %q", tc.tcase, err, tc.errStrFrag) + } + } else if tc.errStrFrag != "" { + t.Errorf("case[%s]: Error %q expected, but not seen", tc.tcase, tc.errStrFrag) + } else { + if tc.count != len(routes) { + t.Errorf("case[%s]: expected %d routes, have %v", tc.tcase, tc.count, routes) + } + for i, expected := range tc.expected { + if !expected.Gateway.Equal(routes[i].Gateway) { + t.Errorf("case[%s]: at %d expected %v, got %v .err : %v", tc.tcase, i, tc.expected, routes, err) + } + zeroIP := net.IPv4zero + if expected.Family == familyIPv6 { + zeroIP = net.IPv6zero + } + if !routes[i].Destination.Equal(zeroIP) { + t.Errorf("case[%s}: at %d destination is not for default route (not %v)", tc.tcase, i, zeroIP) + } + } + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/port_range_test.go b/vendor/k8s.io/apimachinery/pkg/util/net/port_range_test.go new file mode 100644 index 000000000..897b8df61 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/net/port_range_test.go @@ -0,0 +1,69 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package net + +import ( + "testing" + + flag "github.com/spf13/pflag" +) + +func TestPortRange(t *testing.T) { + testCases := []struct { + input string + success bool + expected string + included int + excluded int + }{ + {"100-200", true, "100-200", 200, 201}, + {" 100-200 ", true, "100-200", 200, 201}, + {"0-0", true, "0-0", 0, 1}, + {"", true, "", -1, 0}, + {"100", false, "", -1, -1}, + {"100 - 200", false, "", -1, -1}, + {"-100", false, "", -1, -1}, + {"100-", false, "", -1, -1}, + {"200-100", false, "", -1, -1}, + {"60000-70000", false, "", -1, -1}, + {"70000-80000", false, "", -1, -1}, + } + + for i := range testCases { + tc := &testCases[i] + pr := &PortRange{} + var f flag.Value = pr + err := f.Set(tc.input) + if err != nil && tc.success == true { + t.Errorf("expected success, got %q", err) + continue + } else if err == nil && tc.success == false { + t.Errorf("expected failure") + continue + } else if tc.success { + if f.String() != tc.expected { + t.Errorf("expected %q, got %q", tc.expected, f.String()) + } + if tc.included >= 0 && !pr.Contains(tc.included) { + t.Errorf("expected %q to include %d", f.String(), tc.included) + } + if tc.excluded >= 0 && pr.Contains(tc.excluded) { + t.Errorf("expected %q to exclude %d", f.String(), tc.excluded) + } + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/port_split_test.go b/vendor/k8s.io/apimachinery/pkg/util/net/port_split_test.go new file mode 100644 index 000000000..e801bdbea --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/net/port_split_test.go @@ -0,0 +1,121 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package net + +import ( + "testing" +) + +func TestSplitSchemeNamePort(t *testing.T) { + table := []struct { + in string + name, port, scheme string + valid bool + normalized bool + }{ + { + in: "aoeu:asdf", + name: "aoeu", + port: "asdf", + valid: true, + normalized: true, + }, { + in: "http:aoeu:asdf", + scheme: "http", + name: "aoeu", + port: "asdf", + valid: true, + normalized: true, + }, { + in: "https:aoeu:", + scheme: "https", + name: "aoeu", + port: "", + valid: true, + normalized: false, + }, { + in: "https:aoeu:asdf", + scheme: "https", + name: "aoeu", + port: "asdf", + valid: true, + normalized: true, + }, { + in: "aoeu:", + name: "aoeu", + valid: true, + normalized: false, + }, { + in: "aoeu", + name: "aoeu", + valid: true, + normalized: true, + }, { + in: ":asdf", + valid: false, + }, { + in: "aoeu:asdf:htns", + valid: false, + }, { + in: "http::asdf", + valid: false, + }, { + in: "http::", + valid: false, + }, { + in: "", + valid: false, + }, + } + + for _, item := range table { + scheme, name, port, valid := SplitSchemeNamePort(item.in) + if e, a := item.scheme, scheme; e != a { + t.Errorf("%q: Wanted %q, got %q", item.in, e, a) + } + if e, a := item.name, name; e != a { + t.Errorf("%q: Wanted %q, got %q", item.in, e, a) + } + if e, a := item.port, port; e != a { + t.Errorf("%q: Wanted %q, got %q", item.in, e, a) + } + if e, a := item.valid, valid; e != a { + t.Errorf("%q: Wanted %t, got %t", item.in, e, a) + } + + // Make sure valid items round trip through JoinSchemeNamePort + if item.valid { + out := JoinSchemeNamePort(scheme, name, port) + if item.normalized && out != item.in { + t.Errorf("%q: Wanted %s, got %s", item.in, item.in, out) + } + scheme, name, port, valid := SplitSchemeNamePort(out) + if e, a := item.scheme, scheme; e != a { + t.Errorf("%q: Wanted %q, got %q", item.in, e, a) + } + if e, a := item.name, name; e != a { + t.Errorf("%q: Wanted %q, got %q", item.in, e, a) + } + if e, a := item.port, port; e != a { + t.Errorf("%q: Wanted %q, got %q", item.in, e, a) + } + if e, a := item.valid, valid; e != a { + t.Errorf("%q: Wanted %t, got %t", item.in, e, a) + } + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/util_test.go b/vendor/k8s.io/apimachinery/pkg/util/net/util_test.go new file mode 100644 index 000000000..bcbef753b --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/net/util_test.go @@ -0,0 +1,68 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package net + +import ( + "net" + "testing" +) + +func getIPNet(cidr string) *net.IPNet { + _, ipnet, _ := net.ParseCIDR(cidr) + return ipnet +} + +func TestIPNetEqual(t *testing.T) { + testCases := []struct { + ipnet1 *net.IPNet + ipnet2 *net.IPNet + expect bool + }{ + //null case + { + getIPNet("10.0.0.1/24"), + getIPNet(""), + false, + }, + { + getIPNet("10.0.0.0/24"), + getIPNet("10.0.0.0/24"), + true, + }, + { + getIPNet("10.0.0.0/24"), + getIPNet("10.0.0.1/24"), + true, + }, + { + getIPNet("10.0.0.0/25"), + getIPNet("10.0.0.0/24"), + false, + }, + { + getIPNet("10.0.1.0/24"), + getIPNet("10.0.0.0/24"), + false, + }, + } + + for _, tc := range testCases { + if tc.expect != IPNetEqual(tc.ipnet1, tc.ipnet2) { + t.Errorf("Expect equality of %s and %s be to %v", tc.ipnet1.String(), tc.ipnet2.String(), tc.expect) + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/rand/rand_test.go b/vendor/k8s.io/apimachinery/pkg/util/rand/rand_test.go new file mode 100644 index 000000000..40fdb7d68 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/rand/rand_test.go @@ -0,0 +1,101 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package rand + +import ( + "math/rand" + "strings" + "testing" +) + +const ( + maxRangeTestCount = 500 +) + +func TestString(t *testing.T) { + valid := "0123456789abcdefghijklmnopqrstuvwxyz" + for _, l := range []int{0, 1, 2, 10, 123} { + s := String(l) + if len(s) != l { + t.Errorf("expected string of size %d, got %q", l, s) + } + for _, c := range s { + if !strings.ContainsRune(valid, c) { + t.Errorf("expected valid charaters, got %v", c) + } + } + } +} + +// Confirm that panic occurs on invalid input. +func TestRangePanic(t *testing.T) { + defer func() { + if err := recover(); err == nil { + t.Errorf("Panic didn't occur!") + } + }() + // Should result in an error... + Intn(0) +} + +func TestIntn(t *testing.T) { + // 0 is invalid. + for _, max := range []int{1, 2, 10, 123} { + inrange := Intn(max) + if inrange < 0 || inrange > max { + t.Errorf("%v out of range (0,%v)", inrange, max) + } + } +} + +func TestPerm(t *testing.T) { + Seed(5) + rand.Seed(5) + for i := 1; i < 20; i++ { + actual := Perm(i) + expected := rand.Perm(i) + for j := 0; j < i; j++ { + if actual[j] != expected[j] { + t.Errorf("Perm call result is unexpected") + } + } + } +} + +func TestIntnRange(t *testing.T) { + // 0 is invalid. + for min, max := range map[int]int{1: 2, 10: 123, 100: 500} { + for i := 0; i < maxRangeTestCount; i++ { + inrange := IntnRange(min, max) + if inrange < min || inrange >= max { + t.Errorf("%v out of range (%v,%v)", inrange, min, max) + } + } + } +} + +func TestInt63nRange(t *testing.T) { + // 0 is invalid. + for min, max := range map[int64]int64{1: 2, 10: 123, 100: 500} { + for i := 0; i < maxRangeTestCount; i++ { + inrange := Int63nRange(min, max) + if inrange < min || inrange >= max { + t.Errorf("%v out of range (%v,%v)", inrange, min, max) + } + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/uuid/BUILD b/vendor/k8s.io/apimachinery/pkg/util/remotecommand/BUILD similarity index 69% rename from vendor/k8s.io/apimachinery/pkg/util/uuid/BUILD rename to vendor/k8s.io/apimachinery/pkg/util/remotecommand/BUILD index 5ee2b075b..0293e0dda 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/uuid/BUILD +++ b/vendor/k8s.io/apimachinery/pkg/util/remotecommand/BUILD @@ -7,11 +7,8 @@ load( go_library( name = "go_default_library", - srcs = ["uuid.go"], - deps = [ - "//vendor/github.com/pborman/uuid:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - ], + srcs = ["constants.go"], + deps = ["//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library"], ) filegroup( diff --git a/vendor/k8s.io/apimachinery/pkg/util/remotecommand/constants.go b/vendor/k8s.io/apimachinery/pkg/util/remotecommand/constants.go new file mode 100644 index 000000000..acfeb827c --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/remotecommand/constants.go @@ -0,0 +1,53 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package remotecommand + +import ( + "time" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +const ( + DefaultStreamCreationTimeout = 30 * time.Second + + // The SPDY subprotocol "channel.k8s.io" is used for remote command + // attachment/execution. This represents the initial unversioned subprotocol, + // which has the known bugs http://issues.k8s.io/13394 and + // http://issues.k8s.io/13395. + StreamProtocolV1Name = "channel.k8s.io" + + // The SPDY subprotocol "v2.channel.k8s.io" is used for remote command + // attachment/execution. It is the second version of the subprotocol and + // resolves the issues present in the first version. + StreamProtocolV2Name = "v2.channel.k8s.io" + + // The SPDY subprotocol "v3.channel.k8s.io" is used for remote command + // attachment/execution. It is the third version of the subprotocol and + // adds support for resizing container terminals. + StreamProtocolV3Name = "v3.channel.k8s.io" + + // The SPDY subprotocol "v4.channel.k8s.io" is used for remote command + // attachment/execution. It is the 4th version of the subprotocol and + // adds support for exit codes. + StreamProtocolV4Name = "v4.channel.k8s.io" + + NonZeroExitCodeReason = metav1.StatusReason("NonZeroExitCode") + ExitCodeCauseType = metav1.CauseType("ExitCode") +) + +var SupportedStreamingProtocols = []string{StreamProtocolV4Name, StreamProtocolV3Name, StreamProtocolV2Name, StreamProtocolV1Name} diff --git a/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime_test.go b/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime_test.go new file mode 100644 index 000000000..9dff17ea5 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime_test.go @@ -0,0 +1,71 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package runtime + +import ( + "fmt" + "testing" +) + +func TestHandleCrash(t *testing.T) { + defer func() { + if x := recover(); x == nil { + t.Errorf("Expected a panic to recover from") + } + }() + defer HandleCrash() + panic("Test Panic") +} + +func TestCustomHandleCrash(t *testing.T) { + old := PanicHandlers + defer func() { PanicHandlers = old }() + var result interface{} + PanicHandlers = []func(interface{}){ + func(r interface{}) { + result = r + }, + } + func() { + defer func() { + if x := recover(); x == nil { + t.Errorf("Expected a panic to recover from") + } + }() + defer HandleCrash() + panic("test") + }() + if result != "test" { + t.Errorf("did not receive custom handler") + } +} + +func TestCustomHandleError(t *testing.T) { + old := ErrorHandlers + defer func() { ErrorHandlers = old }() + var result error + ErrorHandlers = []func(error){ + func(err error) { + result = err + }, + } + err := fmt.Errorf("test") + HandleError(err) + if result != err { + t.Errorf("did not receive custom handler") + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/sets/set_test.go b/vendor/k8s.io/apimachinery/pkg/util/sets/set_test.go new file mode 100644 index 000000000..df722ec27 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/sets/set_test.go @@ -0,0 +1,270 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package sets + +import ( + "reflect" + "testing" +) + +func TestStringSet(t *testing.T) { + s := String{} + s2 := String{} + if len(s) != 0 { + t.Errorf("Expected len=0: %d", len(s)) + } + s.Insert("a", "b") + if len(s) != 2 { + t.Errorf("Expected len=2: %d", len(s)) + } + s.Insert("c") + if s.Has("d") { + t.Errorf("Unexpected contents: %#v", s) + } + if !s.Has("a") { + t.Errorf("Missing contents: %#v", s) + } + s.Delete("a") + if s.Has("a") { + t.Errorf("Unexpected contents: %#v", s) + } + s.Insert("a") + if s.HasAll("a", "b", "d") { + t.Errorf("Unexpected contents: %#v", s) + } + if !s.HasAll("a", "b") { + t.Errorf("Missing contents: %#v", s) + } + s2.Insert("a", "b", "d") + if s.IsSuperset(s2) { + t.Errorf("Unexpected contents: %#v", s) + } + s2.Delete("d") + if !s.IsSuperset(s2) { + t.Errorf("Missing contents: %#v", s) + } +} + +func TestStringSetDeleteMultiples(t *testing.T) { + s := String{} + s.Insert("a", "b", "c") + if len(s) != 3 { + t.Errorf("Expected len=3: %d", len(s)) + } + + s.Delete("a", "c") + if len(s) != 1 { + t.Errorf("Expected len=1: %d", len(s)) + } + if s.Has("a") { + t.Errorf("Unexpected contents: %#v", s) + } + if s.Has("c") { + t.Errorf("Unexpected contents: %#v", s) + } + if !s.Has("b") { + t.Errorf("Missing contents: %#v", s) + } + +} + +func TestNewStringSet(t *testing.T) { + s := NewString("a", "b", "c") + if len(s) != 3 { + t.Errorf("Expected len=3: %d", len(s)) + } + if !s.Has("a") || !s.Has("b") || !s.Has("c") { + t.Errorf("Unexpected contents: %#v", s) + } +} + +func TestStringSetList(t *testing.T) { + s := NewString("z", "y", "x", "a") + if !reflect.DeepEqual(s.List(), []string{"a", "x", "y", "z"}) { + t.Errorf("List gave unexpected result: %#v", s.List()) + } +} + +func TestStringSetDifference(t *testing.T) { + a := NewString("1", "2", "3") + b := NewString("1", "2", "4", "5") + c := a.Difference(b) + d := b.Difference(a) + if len(c) != 1 { + t.Errorf("Expected len=1: %d", len(c)) + } + if !c.Has("3") { + t.Errorf("Unexpected contents: %#v", c.List()) + } + if len(d) != 2 { + t.Errorf("Expected len=2: %d", len(d)) + } + if !d.Has("4") || !d.Has("5") { + t.Errorf("Unexpected contents: %#v", d.List()) + } +} + +func TestStringSetHasAny(t *testing.T) { + a := NewString("1", "2", "3") + + if !a.HasAny("1", "4") { + t.Errorf("expected true, got false") + } + + if a.HasAny("0", "4") { + t.Errorf("expected false, got true") + } +} + +func TestStringSetEquals(t *testing.T) { + // Simple case (order doesn't matter) + a := NewString("1", "2") + b := NewString("2", "1") + if !a.Equal(b) { + t.Errorf("Expected to be equal: %v vs %v", a, b) + } + + // It is a set; duplicates are ignored + b = NewString("2", "2", "1") + if !a.Equal(b) { + t.Errorf("Expected to be equal: %v vs %v", a, b) + } + + // Edge cases around empty sets / empty strings + a = NewString() + b = NewString() + if !a.Equal(b) { + t.Errorf("Expected to be equal: %v vs %v", a, b) + } + + b = NewString("1", "2", "3") + if a.Equal(b) { + t.Errorf("Expected to be not-equal: %v vs %v", a, b) + } + + b = NewString("1", "2", "") + if a.Equal(b) { + t.Errorf("Expected to be not-equal: %v vs %v", a, b) + } + + // Check for equality after mutation + a = NewString() + a.Insert("1") + if a.Equal(b) { + t.Errorf("Expected to be not-equal: %v vs %v", a, b) + } + + a.Insert("2") + if a.Equal(b) { + t.Errorf("Expected to be not-equal: %v vs %v", a, b) + } + + a.Insert("") + if !a.Equal(b) { + t.Errorf("Expected to be equal: %v vs %v", a, b) + } + + a.Delete("") + if a.Equal(b) { + t.Errorf("Expected to be not-equal: %v vs %v", a, b) + } +} + +func TestStringUnion(t *testing.T) { + tests := []struct { + s1 String + s2 String + expected String + }{ + { + NewString("1", "2", "3", "4"), + NewString("3", "4", "5", "6"), + NewString("1", "2", "3", "4", "5", "6"), + }, + { + NewString("1", "2", "3", "4"), + NewString(), + NewString("1", "2", "3", "4"), + }, + { + NewString(), + NewString("1", "2", "3", "4"), + NewString("1", "2", "3", "4"), + }, + { + NewString(), + NewString(), + NewString(), + }, + } + + for _, test := range tests { + union := test.s1.Union(test.s2) + if union.Len() != test.expected.Len() { + t.Errorf("Expected union.Len()=%d but got %d", test.expected.Len(), union.Len()) + } + + if !union.Equal(test.expected) { + t.Errorf("Expected union.Equal(expected) but not true. union:%v expected:%v", union.List(), test.expected.List()) + } + } +} + +func TestStringIntersection(t *testing.T) { + tests := []struct { + s1 String + s2 String + expected String + }{ + { + NewString("1", "2", "3", "4"), + NewString("3", "4", "5", "6"), + NewString("3", "4"), + }, + { + NewString("1", "2", "3", "4"), + NewString("1", "2", "3", "4"), + NewString("1", "2", "3", "4"), + }, + { + NewString("1", "2", "3", "4"), + NewString(), + NewString(), + }, + { + NewString(), + NewString("1", "2", "3", "4"), + NewString(), + }, + { + NewString(), + NewString(), + NewString(), + }, + } + + for _, test := range tests { + intersection := test.s1.Intersection(test.s2) + if intersection.Len() != test.expected.Len() { + t.Errorf("Expected intersection.Len()=%d but got %d", test.expected.Len(), intersection.Len()) + } + + if !intersection.Equal(test.expected) { + t.Errorf("Expected intersection.Equal(expected) but not true. intersection:%v expected:%v", intersection.List(), test.expected.List()) + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch_test.go b/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch_test.go new file mode 100644 index 000000000..7f6372db6 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch_test.go @@ -0,0 +1,6717 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package strategicpatch + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/davecgh/go-spew/spew" + "github.com/ghodss/yaml" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/mergepatch" + "k8s.io/apimachinery/pkg/util/sets" +) + +type SortMergeListTestCases struct { + TestCases []SortMergeListTestCase +} + +type SortMergeListTestCase struct { + Description string + Original map[string]interface{} + Sorted map[string]interface{} +} + +type StrategicMergePatchTestCases struct { + TestCases []StrategicMergePatchTestCase +} + +type StrategicMergePatchTestCase struct { + Description string + StrategicMergePatchTestCaseData +} + +type StrategicMergePatchRawTestCase struct { + Description string + StrategicMergePatchRawTestCaseData +} + +type StrategicMergePatchTestCaseData struct { + // Original is the original object (last-applied config in annotation) + Original map[string]interface{} + // Modified is the modified object (new config we want) + Modified map[string]interface{} + // Current is the current object (live config in the server) + Current map[string]interface{} + // TwoWay is the expected two-way merge patch diff between original and modified + TwoWay map[string]interface{} + // ThreeWay is the expected three-way merge patch + ThreeWay map[string]interface{} + // Result is the expected object after applying the three-way patch on current object. + Result map[string]interface{} + // TwoWayResult is the expected object after applying the two-way patch on current object. + // If nil, Modified is used. + TwoWayResult map[string]interface{} +} + +// The meaning of each field is the same as StrategicMergePatchTestCaseData's. +// The difference is that all the fields in StrategicMergePatchRawTestCaseData are json-encoded data. +type StrategicMergePatchRawTestCaseData struct { + Original []byte + Modified []byte + Current []byte + TwoWay []byte + ThreeWay []byte + Result []byte + TwoWayResult []byte + ExpectedError string +} + +type MergeItem struct { + Name string + Value string + Other string + MergingList []MergeItem `patchStrategy:"merge" patchMergeKey:"name"` + NonMergingList []MergeItem + MergingIntList []int `patchStrategy:"merge"` + NonMergingIntList []int + MergeItemPtr *MergeItem `patchStrategy:"merge" patchMergeKey:"name"` + SimpleMap map[string]string + ReplacingItem runtime.RawExtension `patchStrategy:"replace"` + RetainKeysMap RetainKeysMergeItem `patchStrategy:"retainKeys"` + RetainKeysMergingList []MergeItem `patchStrategy:"merge,retainKeys" patchMergeKey:"name"` +} + +type RetainKeysMergeItem struct { + Name string + Value string + Other string + SimpleMap map[string]string + MergingIntList []int `patchStrategy:"merge"` + MergingList []MergeItem `patchStrategy:"merge" patchMergeKey:"name"` + NonMergingList []MergeItem +} + +var mergeItem MergeItem + +// These are test cases for SortMergeList, used to assert that it (recursively) +// sorts both merging and non merging lists correctly. +var sortMergeListTestCaseData = []byte(` +testCases: + - description: sort one list of maps + original: + mergingList: + - name: 1 + - name: 3 + - name: 2 + sorted: + mergingList: + - name: 1 + - name: 2 + - name: 3 + - description: sort lists of maps but not nested lists of maps + original: + mergingList: + - name: 2 + nonMergingList: + - name: 1 + - name: 3 + - name: 2 + - name: 1 + nonMergingList: + - name: 2 + - name: 1 + sorted: + mergingList: + - name: 1 + nonMergingList: + - name: 2 + - name: 1 + - name: 2 + nonMergingList: + - name: 1 + - name: 3 + - name: 2 + - description: sort lists of maps and nested lists of maps + fieldTypes: + original: + mergingList: + - name: 2 + mergingList: + - name: 1 + - name: 3 + - name: 2 + - name: 1 + mergingList: + - name: 2 + - name: 1 + sorted: + mergingList: + - name: 1 + mergingList: + - name: 1 + - name: 2 + - name: 2 + mergingList: + - name: 1 + - name: 2 + - name: 3 + - description: merging list should NOT sort when nested in non merging list + original: + nonMergingList: + - name: 2 + mergingList: + - name: 1 + - name: 3 + - name: 2 + - name: 1 + mergingList: + - name: 2 + - name: 1 + sorted: + nonMergingList: + - name: 2 + mergingList: + - name: 1 + - name: 3 + - name: 2 + - name: 1 + mergingList: + - name: 2 + - name: 1 + - description: sort very nested list of maps + fieldTypes: + original: + mergingList: + - mergingList: + - mergingList: + - name: 2 + - name: 1 + sorted: + mergingList: + - mergingList: + - mergingList: + - name: 1 + - name: 2 + - description: sort nested lists of ints + original: + mergingList: + - name: 2 + mergingIntList: + - 1 + - 3 + - 2 + - name: 1 + mergingIntList: + - 2 + - 1 + sorted: + mergingList: + - name: 1 + mergingIntList: + - 1 + - 2 + - name: 2 + mergingIntList: + - 1 + - 2 + - 3 + - description: sort nested pointers of ints + original: + mergeItemPtr: + - name: 2 + mergingIntList: + - 1 + - 3 + - 2 + - name: 1 + mergingIntList: + - 2 + - 1 + sorted: + mergeItemPtr: + - name: 1 + mergingIntList: + - 1 + - 2 + - name: 2 + mergingIntList: + - 1 + - 2 + - 3 + - description: sort merging list by pointer + original: + mergeItemPtr: + - name: 1 + - name: 3 + - name: 2 + sorted: + mergeItemPtr: + - name: 1 + - name: 2 + - name: 3 +`) + +func TestSortMergeLists(t *testing.T) { + tc := SortMergeListTestCases{} + err := yaml.Unmarshal(sortMergeListTestCaseData, &tc) + if err != nil { + t.Errorf("can't unmarshal test cases: %s\n", err) + return + } + + for _, c := range tc.TestCases { + got := sortJsonOrFail(t, testObjectToJSONOrFail(t, c.Original), c.Description) + expected := testObjectToJSONOrFail(t, c.Sorted) + if !reflect.DeepEqual(got, expected) { + t.Errorf("error in test case: %s\ncannot sort object:\n%s\nexpected:\n%s\ngot:\n%s\n", + c.Description, mergepatch.ToYAMLOrError(c.Original), mergepatch.ToYAMLOrError(c.Sorted), jsonToYAMLOrError(got)) + } + } +} + +// These are test cases for StrategicMergePatch that cannot be generated using +// CreateTwoWayMergePatch because it may be one of the following cases: +// - not use the replace directive. +// - generate duplicate integers for a merging list patch. +// - generate empty merging lists. +// - use patch format from an old client. +var customStrategicMergePatchTestCaseData = []byte(` +testCases: + - description: unique scalars when merging lists + original: + mergingIntList: + - 1 + - 2 + twoWay: + mergingIntList: + - 2 + - 3 + modified: + mergingIntList: + - 1 + - 2 + - 3 + - description: delete map from nested map + original: + simpleMap: + key1: 1 + key2: 1 + twoWay: + simpleMap: + $patch: delete + modified: + simpleMap: + {} + - description: delete all items from merging list + original: + mergingList: + - name: 1 + - name: 2 + twoWay: + mergingList: + - $patch: replace + modified: + mergingList: [] + - description: merge empty merging lists + original: + mergingList: [] + twoWay: + mergingList: [] + modified: + mergingList: [] + - description: delete all keys from map + original: + name: 1 + value: 1 + twoWay: + $patch: replace + modified: {} + - description: add key and delete all keys from map + original: + name: 1 + value: 1 + twoWay: + other: a + $patch: replace + modified: + other: a + - description: delete all duplicate entries in a merging list + original: + mergingList: + - name: 1 + - name: 1 + - name: 2 + value: a + - name: 3 + - name: 3 + twoWay: + mergingList: + - name: 1 + $patch: delete + - name: 3 + $patch: delete + modified: + mergingList: + - name: 2 + value: a + - description: retainKeys map can add a field when no retainKeys directive present + original: + retainKeysMap: + name: foo + twoWay: + retainKeysMap: + value: bar + modified: + retainKeysMap: + name: foo + value: bar + - description: retainKeys map can change a field when no retainKeys directive present + original: + retainKeysMap: + name: foo + value: a + twoWay: + retainKeysMap: + value: b + modified: + retainKeysMap: + name: foo + value: b + - description: retainKeys map can delete a field when no retainKeys directive present + original: + retainKeysMap: + name: foo + value: a + twoWay: + retainKeysMap: + value: null + modified: + retainKeysMap: + name: foo + - description: retainKeys map merge an empty map + original: + retainKeysMap: + name: foo + value: a + twoWay: + retainKeysMap: {} + modified: + retainKeysMap: + name: foo + value: a + - description: retainKeys list can add a field when no retainKeys directive present + original: + retainKeysMergingList: + - name: bar + - name: foo + twoWay: + retainKeysMergingList: + - name: foo + value: a + modified: + retainKeysMergingList: + - name: bar + - name: foo + value: a + - description: retainKeys list can change a field when no retainKeys directive present + original: + retainKeysMergingList: + - name: bar + - name: foo + value: a + twoWay: + retainKeysMergingList: + - name: foo + value: b + modified: + retainKeysMergingList: + - name: bar + - name: foo + value: b + - description: retainKeys list can delete a field when no retainKeys directive present + original: + retainKeysMergingList: + - name: bar + - name: foo + value: a + twoWay: + retainKeysMergingList: + - name: foo + value: null + modified: + retainKeysMergingList: + - name: bar + - name: foo + - description: preserve the order from the patch in a merging list + original: + mergingList: + - name: 1 + - name: 2 + value: b + - name: 3 + twoWay: + mergingList: + - name: 3 + value: c + - name: 1 + value: a + - name: 2 + other: x + modified: + mergingList: + - name: 3 + value: c + - name: 1 + value: a + - name: 2 + value: b + other: x + - description: preserve the order from the patch in a merging list 2 + original: + mergingList: + - name: 1 + - name: 2 + value: b + - name: 3 + twoWay: + mergingList: + - name: 3 + value: c + - name: 1 + value: a + modified: + mergingList: + - name: 2 + value: b + - name: 3 + value: c + - name: 1 + value: a + - description: preserve the order from the patch in a merging int list + original: + mergingIntList: + - 1 + - 2 + - 3 + twoWay: + mergingIntList: + - 3 + - 1 + - 2 + modified: + mergingIntList: + - 3 + - 1 + - 2 + - description: preserve the order from the patch in a merging int list + original: + mergingIntList: + - 1 + - 2 + - 3 + twoWay: + mergingIntList: + - 3 + - 1 + modified: + mergingIntList: + - 2 + - 3 + - 1 +`) + +var customStrategicMergePatchRawTestCases = []StrategicMergePatchRawTestCase{ + { + Description: "$setElementOrder contains item that is not present in the list to be merged", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + - name: 3 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 3 + - name: 2 + - name: 1 +mergingList: + - name: 3 + value: 3 + - name: 1 + value: 1 +`), + Modified: []byte(` +mergingList: + - name: 3 + value: 3 + - name: 1 + value: 1 +`), + }, + }, + { + Description: "$setElementOrder contains item that is not present in the int list to be merged", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingIntList: + - 1 + - 3 +`), + TwoWay: []byte(` +$setElementOrder/mergingIntList: + - 3 + - 2 + - 1 +`), + Modified: []byte(` +mergingIntList: + - 3 + - 1 +`), + }, + }, + { + Description: "should check if order in $setElementOrder and patch list match", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + - name: 3 + - name: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 + - name: 3 +mergingList: + - name: 3 + value: 3 + - name: 1 + value: 1 +`), + ExpectedError: "doesn't match", + }, + }, + { + Description: "$setElementOrder contains item that is not present in the int list to be merged", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingIntList: + - 1 + - 3 + - 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingIntList: + - 1 + - 2 + - 3 +mergingIntList: + - 3 + - 1 +`), + ExpectedError: "doesn't match", + }, + }, +} + +func TestCustomStrategicMergePatch(t *testing.T) { + tc := StrategicMergePatchTestCases{} + err := yaml.Unmarshal(customStrategicMergePatchTestCaseData, &tc) + if err != nil { + t.Errorf("can't unmarshal test cases: %v\n", err) + return + } + + for _, c := range tc.TestCases { + original, expectedTwoWayPatch, _, expectedResult := twoWayTestCaseToJSONOrFail(t, c) + testPatchApplication(t, original, expectedTwoWayPatch, expectedResult, c.Description, "") + } + + for _, c := range customStrategicMergePatchRawTestCases { + original, expectedTwoWayPatch, _, expectedResult := twoWayRawTestCaseToJSONOrFail(t, c) + testPatchApplication(t, original, expectedTwoWayPatch, expectedResult, c.Description, c.ExpectedError) + } +} + +// These are test cases for StrategicMergePatch, to assert that applying a patch +// yields the correct outcome. They are also test cases for CreateTwoWayMergePatch +// and CreateThreeWayMergePatch, to assert that they both generate the correct patch +// for the given set of input documents. +// +var createStrategicMergePatchTestCaseData = []byte(` +testCases: + - description: nil original + twoWay: + name: 1 + value: 1 + modified: + name: 1 + value: 1 + current: + name: 1 + other: a + threeWay: + value: 1 + result: + name: 1 + value: 1 + other: a + - description: nil patch + original: + name: 1 + twoWay: + {} + modified: + name: 1 + current: + name: 1 + threeWay: + {} + result: + name: 1 + - description: add field to map + original: + name: 1 + twoWay: + value: 1 + modified: + name: 1 + value: 1 + current: + name: 1 + other: a + threeWay: + value: 1 + result: + name: 1 + value: 1 + other: a + - description: add field to map with conflict + original: + name: 1 + twoWay: + value: 1 + modified: + name: 1 + value: 1 + current: + name: a + other: a + threeWay: + name: 1 + value: 1 + result: + name: 1 + value: 1 + other: a + - description: add field and delete field from map + original: + name: 1 + twoWay: + name: null + value: 1 + modified: + value: 1 + current: + name: 1 + other: a + threeWay: + name: null + value: 1 + result: + value: 1 + other: a + - description: add field and delete field from map with conflict + original: + name: 1 + twoWay: + name: null + value: 1 + modified: + value: 1 + current: + name: a + other: a + threeWay: + name: null + value: 1 + result: + value: 1 + other: a + - description: delete field from nested map + original: + simpleMap: + key1: 1 + key2: 1 + twoWay: + simpleMap: + key2: null + modified: + simpleMap: + key1: 1 + current: + simpleMap: + key1: 1 + key2: 1 + other: a + threeWay: + simpleMap: + key2: null + result: + simpleMap: + key1: 1 + other: a + - description: delete field from nested map with conflict + original: + simpleMap: + key1: 1 + key2: 1 + twoWay: + simpleMap: + key2: null + modified: + simpleMap: + key1: 1 + current: + simpleMap: + key1: a + key2: 1 + other: a + threeWay: + simpleMap: + key1: 1 + key2: null + result: + simpleMap: + key1: 1 + other: a + - description: delete all fields from map + original: + name: 1 + value: 1 + twoWay: + name: null + value: null + modified: {} + current: + name: 1 + value: 1 + other: a + threeWay: + name: null + value: null + result: + other: a + - description: delete all fields from map with conflict + original: + name: 1 + value: 1 + twoWay: + name: null + value: null + modified: {} + current: + name: 1 + value: a + other: a + threeWay: + name: null + value: null + result: + other: a + - description: add field and delete all fields from map + original: + name: 1 + value: 1 + twoWay: + name: null + value: null + other: a + modified: + other: a + current: + name: 1 + value: 1 + other: a + threeWay: + name: null + value: null + result: + other: a + - description: add field and delete all fields from map with conflict + original: + name: 1 + value: 1 + twoWay: + name: null + value: null + other: a + modified: + other: a + current: + name: 1 + value: 1 + other: b + threeWay: + name: null + value: null + other: a + result: + other: a + - description: replace list of scalars + original: + nonMergingIntList: + - 1 + - 2 + twoWay: + nonMergingIntList: + - 2 + - 3 + modified: + nonMergingIntList: + - 2 + - 3 + current: + nonMergingIntList: + - 1 + - 2 + threeWay: + nonMergingIntList: + - 2 + - 3 + result: + nonMergingIntList: + - 2 + - 3 + - description: replace list of scalars with conflict + original: + nonMergingIntList: + - 1 + - 2 + twoWay: + nonMergingIntList: + - 2 + - 3 + modified: + nonMergingIntList: + - 2 + - 3 + current: + nonMergingIntList: + - 1 + - 4 + threeWay: + nonMergingIntList: + - 2 + - 3 + result: + nonMergingIntList: + - 2 + - 3 + - description: delete all maps from merging list + original: + mergingList: + - name: 1 + - name: 2 + twoWay: + mergingList: + - name: 1 + $patch: delete + - name: 2 + $patch: delete + modified: + mergingList: [] + current: + mergingList: + - name: 1 + - name: 2 + threeWay: + mergingList: + - name: 1 + $patch: delete + - name: 2 + $patch: delete + result: + mergingList: [] + - description: delete all maps from merging list with conflict + original: + mergingList: + - name: 1 + - name: 2 + twoWay: + mergingList: + - name: 1 + $patch: delete + - name: 2 + $patch: delete + modified: + mergingList: [] + current: + mergingList: + - name: 1 + other: a + - name: 2 + other: b + threeWay: + mergingList: + - name: 1 + $patch: delete + - name: 2 + $patch: delete + result: + mergingList: [] + - description: delete all maps from empty merging list + original: + mergingList: + - name: 1 + - name: 2 + twoWay: + mergingList: + - name: 1 + $patch: delete + - name: 2 + $patch: delete + modified: + mergingList: [] + current: + mergingList: [] + threeWay: + mergingList: + - name: 1 + $patch: delete + - name: 2 + $patch: delete + result: + mergingList: [] + - description: merge empty merging lists + original: + mergingList: [] + twoWay: + {} + modified: + mergingList: [] + current: + mergingList: [] + threeWay: + {} + result: + mergingList: [] + - description: defined null values should propagate overwrite current fields (with conflict) + original: + name: 2 + twoWay: + name: 1 + value: 1 + other: null + twoWayResult: + name: 1 + value: 1 + modified: + name: 1 + value: 1 + other: null + current: + name: a + other: a + threeWay: + name: 1 + value: 1 + other: null + result: + name: 1 + value: 1 + - description: defined null values should propagate removing original fields + original: + name: original-name + value: original-value + current: + name: original-name + value: original-value + other: current-other + modified: + name: modified-name + value: null + twoWay: + name: modified-name + value: null + twoWayResult: + name: modified-name + threeWay: + name: modified-name + value: null + result: + name: modified-name + other: current-other + - description: nil patch with retainKeys map + original: + name: a + retainKeysMap: + name: foo + current: + name: a + value: b + retainKeysMap: + name: foo + modified: + name: a + retainKeysMap: + name: foo + twoWay: {} + threeWay: {} + result: + name: a + value: b + retainKeysMap: + name: foo + - description: retainKeys map with no change should not be present + original: + name: a + retainKeysMap: + name: foo + current: + name: a + other: c + retainKeysMap: + name: foo + modified: + name: a + value: b + retainKeysMap: + name: foo + twoWay: + value: b + threeWay: + value: b + result: + name: a + value: b + other: c + retainKeysMap: + name: foo +`) + +var strategicMergePatchRawTestCases = []StrategicMergePatchRawTestCase{ + { + Description: "delete items in lists of scalars", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingIntList: + - 1 + - 2 + - 3 +`), + TwoWay: []byte(` +$setElementOrder/mergingIntList: + - 1 + - 2 +$deleteFromPrimitiveList/mergingIntList: + - 3 +`), + Modified: []byte(` +mergingIntList: + - 1 + - 2 +`), + Current: []byte(` +mergingIntList: + - 1 + - 2 + - 3 + - 4 +`), + ThreeWay: []byte(` +$setElementOrder/mergingIntList: + - 1 + - 2 +$deleteFromPrimitiveList/mergingIntList: + - 3 +`), + Result: []byte(` +mergingIntList: + - 1 + - 2 + - 4 +`), + }, + }, + { + Description: "delete all duplicate items in lists of scalars", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingIntList: + - 1 + - 2 + - 3 + - 3 +`), + TwoWay: []byte(` +$setElementOrder/mergingIntList: + - 1 + - 2 +$deleteFromPrimitiveList/mergingIntList: + - 3 +`), + Modified: []byte(` +mergingIntList: + - 1 + - 2 +`), + Current: []byte(` +mergingIntList: + - 1 + - 2 + - 3 + - 3 + - 4 +`), + ThreeWay: []byte(` +$setElementOrder/mergingIntList: + - 1 + - 2 +$deleteFromPrimitiveList/mergingIntList: + - 3 +`), + Result: []byte(` +mergingIntList: + - 1 + - 2 + - 4 +`), + }, + }, + { + Description: "add and delete items in lists of scalars", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingIntList: + - 1 + - 2 + - 3 +`), + TwoWay: []byte(` +$setElementOrder/mergingIntList: + - 1 + - 2 + - 4 +$deleteFromPrimitiveList/mergingIntList: + - 3 +mergingIntList: + - 4 +`), + Modified: []byte(` +mergingIntList: + - 1 + - 2 + - 4 +`), + Current: []byte(` +mergingIntList: + - 1 + - 2 + - 3 + - 4 +`), + ThreeWay: []byte(` +$setElementOrder/mergingIntList: + - 1 + - 2 + - 4 +$deleteFromPrimitiveList/mergingIntList: + - 3 +`), + Result: []byte(` +mergingIntList: + - 1 + - 2 + - 4 +`), + }, + }, + { + Description: "merge lists of maps", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + - name: 2 + value: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 4 + - name: 1 + - name: 2 + - name: 3 +mergingList: + - name: 4 + value: 4 + - name: 3 + value: 3 +`), + Modified: []byte(` +mergingList: + - name: 4 + value: 4 + - name: 1 + - name: 2 + value: 2 + - name: 3 + value: 3 +`), + Current: []byte(` +mergingList: + - name: 1 + other: a + - name: 2 + value: 2 + other: b +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 4 + - name: 1 + - name: 2 + - name: 3 +mergingList: + - name: 4 + value: 4 + - name: 3 + value: 3 +`), + Result: []byte(` +mergingList: + - name: 4 + value: 4 + - name: 1 + other: a + - name: 2 + value: 2 + other: b + - name: 3 + value: 3 +`), + }, + }, + { + Description: "merge lists of maps with conflict", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + - name: 2 + value: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 + - name: 3 +mergingList: + - name: 3 + value: 3 +`), + Modified: []byte(` +mergingList: + - name: 1 + - name: 2 + value: 2 + - name: 3 + value: 3 +`), + Current: []byte(` +mergingList: + - name: 1 + other: a + - name: 2 + value: 3 + other: b +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 + - name: 3 +mergingList: + - name: 2 + value: 2 + - name: 3 + value: 3 +`), + Result: []byte(` +mergingList: + - name: 1 + other: a + - name: 2 + value: 2 + other: b + - name: 3 + value: 3 +`), + }, + }, + { + Description: "add field to map in merging list", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + - name: 2 + value: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - name: 1 + value: 1 +`), + Modified: []byte(` +mergingList: + - name: 1 + value: 1 + - name: 2 + value: 2 +`), + Current: []byte(` +mergingList: + - name: 1 + other: a + - name: 2 + value: 2 + other: b +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - name: 1 + value: 1 +`), + Result: []byte(` +mergingList: + - name: 1 + value: 1 + other: a + - name: 2 + value: 2 + other: b +`), + }, + }, + { + Description: "add field to map in merging list", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + - name: 2 + value: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - name: 1 + value: 1 +`), + Modified: []byte(` +mergingList: + - name: 1 + value: 1 + - name: 2 + value: 2 +`), + Current: []byte(` +mergingList: + - name: 1 + other: a + - name: 2 + value: 2 + other: b +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - name: 1 + value: 1 +`), + Result: []byte(` +mergingList: + - name: 1 + value: 1 + other: a + - name: 2 + value: 2 + other: b +`), + }, + }, + { + Description: "add field to map in merging list with conflict", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + - name: 2 + value: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - name: 1 + value: 1 +`), + Modified: []byte(` +mergingList: + - name: 1 + value: 1 + - name: 2 + value: 2 +`), + Current: []byte(` +mergingList: + - name: 1 + other: a + - name: 3 + value: 2 + other: b +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - name: 1 + value: 1 + - name: 2 + value: 2 +`), + Result: []byte(` +mergingList: + - name: 1 + value: 1 + other: a + - name: 2 + value: 2 + - name: 3 + value: 2 + other: b +`), + }, + }, + { + Description: "add duplicate field to map in merging list", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + - name: 2 + value: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - name: 1 + value: 1 +`), + Modified: []byte(` +mergingList: + - name: 1 + value: 1 + - name: 2 + value: 2 +`), + Current: []byte(` +mergingList: + - name: 1 + value: 1 + other: a + - name: 2 + value: 2 + other: b +`), + ThreeWay: []byte(`{}`), + Result: []byte(` +mergingList: + - name: 1 + value: 1 + other: a + - name: 2 + value: 2 + other: b +`), + }, + }, + { + Description: "add an item that already exists in current object in merging list", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + value: a + - name: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 + - name: 3 +mergingList: + - name: 3 +`), + Modified: []byte(` +mergingList: + - name: 1 + value: a + - name: 2 + - name: 3 +`), + Current: []byte(` +mergingList: + - name: 1 + value: a + other: x + - name: 2 + - name: 3 +`), + ThreeWay: []byte(`{}`), + Result: []byte(` +mergingList: + - name: 1 + value: a + other: x + - name: 2 + - name: 3 +`), + }, + }, + { + Description: "add duplicate field to map in merging list with conflict", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + - name: 2 + value: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - name: 1 + value: 1 +`), + Modified: []byte(` +mergingList: + - name: 1 + value: 1 + - name: 2 + value: 2 +`), + Current: []byte(` +mergingList: + - name: 1 + value: 1 + other: a + - name: 2 + value: 3 + other: b +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - name: 2 + value: 2 +`), + Result: []byte(` +mergingList: + - name: 1 + value: 1 + other: a + - name: 2 + value: 2 + other: b +`), + }, + }, + { + Description: "replace map field value in merging list", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + value: 1 + - name: 2 + value: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - name: 1 + value: a +`), + Modified: []byte(` +mergingList: + - name: 1 + value: a + - name: 2 + value: 2 +`), + Current: []byte(` +mergingList: + - name: 1 + value: 1 + other: a + - name: 2 + value: 2 + other: b +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - name: 1 + value: a +`), + Result: []byte(` +mergingList: + - name: 1 + value: a + other: a + - name: 2 + value: 2 + other: b +`), + }, + }, + { + Description: "replace map field value in merging list with conflict", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + value: 1 + - name: 2 + value: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - name: 1 + value: a +`), + Modified: []byte(` +mergingList: + - name: 1 + value: a + - name: 2 + value: 2 +`), + Current: []byte(` +mergingList: + - name: 1 + value: 3 + other: a + - name: 2 + value: 2 + other: b +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - name: 1 + value: a +`), + Result: []byte(` +mergingList: + - name: 1 + value: a + other: a + - name: 2 + value: 2 + other: b +`), + }, + }, + { + Description: "delete map from merging list", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + - name: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 2 +mergingList: + - name: 1 + $patch: delete +`), + Modified: []byte(` +mergingList: + - name: 2 +`), + Current: []byte(` +mergingList: + - name: 1 + - name: 2 + other: b +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 2 +mergingList: + - name: 1 + $patch: delete +`), + Result: []byte(` +mergingList: + - name: 2 + other: b +`), + }, + }, + { + Description: "delete map from merging list with conflict", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + - name: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 2 +mergingList: + - name: 1 + $patch: delete +`), + Modified: []byte(` +mergingList: + - name: 2 +`), + Current: []byte(` +mergingList: + - name: 1 + other: a + - name: 2 + other: b +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 2 +mergingList: + - name: 1 + $patch: delete +`), + Result: []byte(` +mergingList: + - name: 2 + other: b +`), + }, + }, + { + Description: "delete missing map from merging list", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + - name: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 2 +mergingList: + - name: 1 + $patch: delete +`), + Modified: []byte(` +mergingList: + - name: 2 +`), + Current: []byte(` +mergingList: + - name: 2 + other: b +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 2 +mergingList: + - name: 1 + $patch: delete +`), + Result: []byte(` +mergingList: + - name: 2 + other: b +`), + }, + }, + { + Description: "delete missing map from merging list with conflict", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + - name: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 2 +mergingList: + - name: 1 + $patch: delete +`), + Modified: []byte(` +mergingList: + - name: 2 +`), + Current: []byte(` +mergingList: + - name: 3 + other: a +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 2 +mergingList: + - name: 2 + - name: 1 + $patch: delete +`), + Result: []byte(` +mergingList: + - name: 2 + - name: 3 + other: a +`), + }, + }, + { + Description: "add map and delete map from merging list", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + - name: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 2 + - name: 3 +mergingList: + - name: 3 + - name: 1 + $patch: delete +`), + Modified: []byte(` +mergingList: + - name: 2 + - name: 3 +`), + Current: []byte(` +mergingList: + - name: 1 + - name: 2 + other: b + - name: 4 + other: c +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 2 + - name: 3 +mergingList: + - name: 3 + - name: 1 + $patch: delete +`), + Result: []byte(` +mergingList: + - name: 2 + other: b + - name: 4 + other: c + - name: 3 +`), + }, + }, + { + Description: "add map and delete map from merging list with conflict", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + - name: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 2 + - name: 3 +mergingList: + - name: 3 + - name: 1 + $patch: delete +`), + Modified: []byte(` +mergingList: + - name: 2 + - name: 3 +`), + Current: []byte(` +mergingList: + - name: 1 + other: a + - name: 4 + other: c +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 2 + - name: 3 +mergingList: + - name: 2 + - name: 3 + - name: 1 + $patch: delete +`), + Result: []byte(` +mergingList: + - name: 4 + other: c + - name: 2 + - name: 3 +`), + }, + }, + { + Description: "delete field from map in merging list", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + value: 1 + - name: 2 + value: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - name: 1 + value: null +`), + Modified: []byte(` +mergingList: + - name: 1 + - name: 2 + value: 2 +`), + Current: []byte(` +mergingList: + - name: 1 + value: 1 + other: a + - name: 2 + value: 2 + other: b +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - name: 1 + value: null +`), + Result: []byte(` +mergingList: + - name: 1 + other: a + - name: 2 + value: 2 + other: b +`), + }, + }, + { + Description: "delete field from map in merging list with conflict", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + value: 1 + - name: 2 + value: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - name: 1 + value: null +`), + Modified: []byte(` +mergingList: + - name: 1 + - name: 2 + value: 2 +`), + Current: []byte(` +mergingList: + - name: 1 + value: a + other: a + - name: 2 + value: 2 +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - name: 1 + value: null +`), + Result: []byte(` +mergingList: + - name: 1 + other: a + - name: 2 + value: 2 +`), + }, + }, + { + Description: "delete missing field from map in merging list", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + value: 1 + - name: 2 + value: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - name: 1 + value: null +`), + Modified: []byte(` +mergingList: + - name: 1 + - name: 2 + value: 2 +`), + Current: []byte(` +mergingList: + - name: 1 + other: a + - name: 2 + value: 2 + other: b +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - name: 1 + value: null +`), + Result: []byte(` +mergingList: + - name: 1 + other: a + - name: 2 + value: 2 + other: b +`), + }, + }, + { + Description: "delete missing field from map in merging list with conflict", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + value: 1 + - name: 2 + value: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - name: 1 + value: null +`), + Modified: []byte(` +mergingList: + - name: 1 + - name: 2 + value: 2 +`), + Current: []byte(` +mergingList: + - name: 1 + other: a + - name: 2 + other: b +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - name: 1 + value: null + - name: 2 + value: 2 +`), + Result: []byte(` +mergingList: + - name: 1 + other: a + - name: 2 + value: 2 + other: b +`), + }, + }, + { + Description: "replace non merging list nested in merging list", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + nonMergingList: + - name: 1 + - name: 2 + value: 2 + - name: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - name: 1 + nonMergingList: + - name: 1 + value: 1 +`), + Modified: []byte(` +mergingList: + - name: 1 + nonMergingList: + - name: 1 + value: 1 + - name: 2 +`), + Current: []byte(` +mergingList: + - name: 1 + other: a + nonMergingList: + - name: 1 + - name: 2 + value: 2 + - name: 2 + other: b +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - name: 1 + nonMergingList: + - name: 1 + value: 1 +`), + Result: []byte(` +mergingList: + - name: 1 + other: a + nonMergingList: + - name: 1 + value: 1 + - name: 2 + other: b +`), + }, + }, + { + Description: "replace non merging list nested in merging list with value conflict", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + nonMergingList: + - name: 1 + - name: 2 + value: 2 + - name: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - name: 1 + nonMergingList: + - name: 1 + value: 1 +`), + Modified: []byte(` +mergingList: + - name: 1 + nonMergingList: + - name: 1 + value: 1 + - name: 2 +`), + Current: []byte(` +mergingList: + - name: 1 + other: a + nonMergingList: + - name: 1 + value: c + - name: 2 + other: b +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - name: 1 + nonMergingList: + - name: 1 + value: 1 +`), + Result: []byte(` +mergingList: + - name: 1 + other: a + nonMergingList: + - name: 1 + value: 1 + - name: 2 + other: b +`), + }, + }, + { + Description: "replace non merging list nested in merging list with value conflict", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + nonMergingList: + - name: 1 + - name: 2 + value: 2 + - name: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - name: 1 + nonMergingList: + - name: 1 + value: 1 +`), + Modified: []byte(` +mergingList: + - name: 1 + nonMergingList: + - name: 1 + value: 1 + - name: 2 +`), + Current: []byte(` +mergingList: + - name: 1 + other: a + nonMergingList: + - name: 1 + value: c + - name: 2 + other: b +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - name: 1 + nonMergingList: + - name: 1 + value: 1 +`), + Result: []byte(` +mergingList: + - name: 1 + other: a + nonMergingList: + - name: 1 + value: 1 + - name: 2 + other: b +`), + }, + }, + { + Description: "replace non merging list nested in merging list with deletion conflict", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + nonMergingList: + - name: 1 + - name: 2 + value: 2 + - name: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - name: 1 + nonMergingList: + - name: 1 + value: 1 +`), + Modified: []byte(` +mergingList: + - name: 1 + nonMergingList: + - name: 1 + value: 1 + - name: 2 +`), + Current: []byte(` +mergingList: + - name: 1 + other: a + nonMergingList: + - name: 2 + value: 2 + - name: 2 + other: b +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - name: 1 + nonMergingList: + - name: 1 + value: 1 +`), + Result: []byte(` +mergingList: + - name: 1 + other: a + nonMergingList: + - name: 1 + value: 1 + - name: 2 + other: b +`), + }, + }, + { + Description: "add field to map in merging list nested in merging list", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + mergingList: + - name: 1 + - name: 2 + value: 2 + - name: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - $setElementOrder/mergingList: + - name: 1 + - name: 2 + name: 1 + mergingList: + - name: 1 + value: 1 +`), + Modified: []byte(` +mergingList: + - name: 1 + mergingList: + - name: 1 + value: 1 + - name: 2 + value: 2 + - name: 2 +`), + Current: []byte(` +mergingList: + - name: 1 + other: a + mergingList: + - name: 1 + - name: 2 + value: 2 + - name: 2 + other: b +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - $setElementOrder/mergingList: + - name: 1 + - name: 2 + name: 1 + mergingList: + - name: 1 + value: 1 +`), + Result: []byte(` +mergingList: + - name: 1 + other: a + mergingList: + - name: 1 + value: 1 + - name: 2 + value: 2 + - name: 2 + other: b +`), + }, + }, + { + Description: "add field to map in merging list nested in merging list with value conflict", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + mergingList: + - name: 1 + - name: 2 + value: 2 + - name: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - $setElementOrder/mergingList: + - name: 1 + - name: 2 + name: 1 + mergingList: + - name: 1 + value: 1 +`), + Modified: []byte(` +mergingList: + - name: 1 + mergingList: + - name: 1 + value: 1 + - name: 2 + value: 2 + - name: 2 +`), + Current: []byte(` +mergingList: + - name: 1 + other: a + mergingList: + - name: 1 + value: a + other: c + - name: 2 + value: b + other: d + - name: 2 + other: b +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - $setElementOrder/mergingList: + - name: 1 + - name: 2 + name: 1 + mergingList: + - name: 1 + value: 1 + - name: 2 + value: 2 +`), + Result: []byte(` +mergingList: + - name: 1 + other: a + mergingList: + - name: 1 + value: 1 + other: c + - name: 2 + value: 2 + other: d + - name: 2 + other: b +`), + }, + }, + { + Description: "add field to map in merging list nested in merging list with deletion conflict", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + mergingList: + - name: 1 + - name: 2 + value: 2 + - name: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - $setElementOrder/mergingList: + - name: 1 + - name: 2 + name: 1 + mergingList: + - name: 1 + value: 1 +`), + Modified: []byte(` +mergingList: + - name: 1 + mergingList: + - name: 1 + value: 1 + - name: 2 + value: 2 + - name: 2 +`), + Current: []byte(` +mergingList: + - name: 1 + other: a + mergingList: + - name: 2 + value: 2 + other: d + - name: 2 + other: b +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - $setElementOrder/mergingList: + - name: 1 + - name: 2 + name: 1 + mergingList: + - name: 1 + value: 1 +`), + Result: []byte(` +mergingList: + - name: 1 + other: a + mergingList: + - name: 1 + value: 1 + - name: 2 + value: 2 + other: d + - name: 2 + other: b +`), + }, + }, + + { + Description: "add field to map in merging list nested in merging list with deletion conflict", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + mergingList: + - name: 1 + - name: 2 + value: 2 + - name: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - $setElementOrder/mergingList: + - name: 2 + - name: 1 + name: 1 + mergingList: + - name: 1 + value: 1 +`), + Modified: []byte(` +mergingList: + - name: 1 + mergingList: + - name: 2 + value: 2 + - name: 1 + value: 1 + - name: 2 +`), + Current: []byte(` +mergingList: + - name: 1 + other: a + mergingList: + - name: 2 + value: 2 + other: d + - name: 2 + other: b +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 2 +mergingList: + - $setElementOrder/mergingList: + - name: 2 + - name: 1 + name: 1 + mergingList: + - name: 1 + value: 1 +`), + Result: []byte(` +mergingList: + - name: 1 + other: a + mergingList: + - name: 2 + value: 2 + other: d + - name: 1 + value: 1 + - name: 2 + other: b +`), + }, + }, + { + Description: "add map to merging list by pointer", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergeItemPtr: + - name: 1 +`), + TwoWay: []byte(` +$setElementOrder/mergeItemPtr: + - name: 1 + - name: 2 +mergeItemPtr: + - name: 2 +`), + Modified: []byte(` +mergeItemPtr: + - name: 1 + - name: 2 +`), + Current: []byte(` +mergeItemPtr: + - name: 1 + other: a + - name: 3 +`), + ThreeWay: []byte(` +$setElementOrder/mergeItemPtr: + - name: 1 + - name: 2 +mergeItemPtr: + - name: 2 +`), + Result: []byte(` +mergeItemPtr: + - name: 1 + other: a + - name: 2 + - name: 3 +`), + }, + }, + { + Description: "add map to merging list by pointer with conflict", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergeItemPtr: + - name: 1 +`), + TwoWay: []byte(` +$setElementOrder/mergeItemPtr: + - name: 1 + - name: 2 +mergeItemPtr: + - name: 2 +`), + Modified: []byte(` +mergeItemPtr: + - name: 1 + - name: 2 +`), + Current: []byte(` +mergeItemPtr: + - name: 3 +`), + ThreeWay: []byte(` +$setElementOrder/mergeItemPtr: + - name: 1 + - name: 2 +mergeItemPtr: + - name: 1 + - name: 2 +`), + Result: []byte(` +mergeItemPtr: + - name: 1 + - name: 2 + - name: 3 +`), + }, + }, + { + Description: "add field to map in merging list by pointer", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergeItemPtr: + - name: 1 + mergeItemPtr: + - name: 1 + - name: 2 + value: 2 + - name: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergeItemPtr: + - name: 1 + - name: 2 +mergeItemPtr: + - $setElementOrder/mergeItemPtr: + - name: 1 + - name: 2 + name: 1 + mergeItemPtr: + - name: 1 + value: 1 +`), + Modified: []byte(` +mergeItemPtr: + - name: 1 + mergeItemPtr: + - name: 1 + value: 1 + - name: 2 + value: 2 + - name: 2 +`), + Current: []byte(` +mergeItemPtr: + - name: 1 + other: a + mergeItemPtr: + - name: 1 + other: a + - name: 2 + value: 2 + other: b + - name: 2 + other: b +`), + ThreeWay: []byte(` +$setElementOrder/mergeItemPtr: + - name: 1 + - name: 2 +mergeItemPtr: + - $setElementOrder/mergeItemPtr: + - name: 1 + - name: 2 + name: 1 + mergeItemPtr: + - name: 1 + value: 1 +`), + Result: []byte(` +mergeItemPtr: + - name: 1 + other: a + mergeItemPtr: + - name: 1 + value: 1 + other: a + - name: 2 + value: 2 + other: b + - name: 2 + other: b +`), + }, + }, + { + Description: "add field to map in merging list by pointer with conflict", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergeItemPtr: + - name: 1 + mergeItemPtr: + - name: 1 + - name: 2 + value: 2 + - name: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergeItemPtr: + - name: 1 + - name: 2 +mergeItemPtr: + - $setElementOrder/mergeItemPtr: + - name: 1 + - name: 2 + name: 1 + mergeItemPtr: + - name: 1 + value: 1 +`), + Modified: []byte(` +mergeItemPtr: + - name: 1 + mergeItemPtr: + - name: 1 + value: 1 + - name: 2 + value: 2 + - name: 2 +`), + Current: []byte(` +mergeItemPtr: + - name: 1 + other: a + mergeItemPtr: + - name: 1 + value: a + - name: 2 + value: 2 + other: b + - name: 2 + other: b +`), + ThreeWay: []byte(` +$setElementOrder/mergeItemPtr: + - name: 1 + - name: 2 +mergeItemPtr: + - $setElementOrder/mergeItemPtr: + - name: 1 + - name: 2 + name: 1 + mergeItemPtr: + - name: 1 + value: 1 +`), + Result: []byte(` +mergeItemPtr: + - name: 1 + other: a + mergeItemPtr: + - name: 1 + value: 1 + - name: 2 + value: 2 + other: b + - name: 2 + other: b +`), + }, + }, + { + Description: "merge lists of scalars", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingIntList: +- 1 +- 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingIntList: +- 1 +- 2 +- 3 +mergingIntList: +- 3 +`), + Modified: []byte(` +mergingIntList: +- 1 +- 2 +- 3 +`), + Current: []byte(` +mergingIntList: +- 1 +- 2 +- 4 +`), + ThreeWay: []byte(` +$setElementOrder/mergingIntList: +- 1 +- 2 +- 3 +mergingIntList: +- 3 +`), + Result: []byte(` +mergingIntList: +- 1 +- 2 +- 3 +- 4 +`), + }, + }, + { + Description: "add duplicate field to map in merging int list", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingIntList: + - 1 + - 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingIntList: + - 1 + - 2 + - 3 +mergingIntList: + - 3 +`), + Modified: []byte(` +mergingIntList: + - 1 + - 2 + - 3 +`), + Current: []byte(` +mergingIntList: + - 1 + - 2 + - 3 +`), + ThreeWay: []byte(`{}`), + Result: []byte(` +mergingIntList: + - 1 + - 2 + - 3 +`), + }, + }, + // test case for setElementOrder + { + Description: "add an item in a list of primitives and preserve order", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingIntList: +- 1 +- 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingIntList: +- 3 +- 1 +- 2 +mergingIntList: +- 3 +`), + Modified: []byte(` +mergingIntList: +- 3 +- 1 +- 2 +`), + Current: []byte(` +mergingIntList: +- 1 +- 4 +- 2 +`), + ThreeWay: []byte(` +$setElementOrder/mergingIntList: +- 3 +- 1 +- 2 +mergingIntList: +- 3 +`), + Result: []byte(` +mergingIntList: +- 3 +- 1 +- 4 +- 2 +`), + }, + }, + { + Description: "delete an item in a list of primitives and preserve order", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingIntList: +- 1 +- 2 +- 3 +`), + TwoWay: []byte(` +$setElementOrder/mergingIntList: +- 2 +- 1 +$deleteFromPrimitiveList/mergingIntList: +- 3 +`), + Modified: []byte(` +mergingIntList: +- 2 +- 1 +`), + Current: []byte(` +mergingIntList: +- 1 +- 2 +- 3 +`), + ThreeWay: []byte(` +$setElementOrder/mergingIntList: +- 2 +- 1 +$deleteFromPrimitiveList/mergingIntList: +- 3 +`), + Result: []byte(` +mergingIntList: +- 2 +- 1 +`), + }, + }, + { + Description: "add an item in a list and preserve order", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + - name: 2 + value: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 3 + - name: 1 + - name: 2 +mergingList: + - name: 3 + value: 3 +`), + Modified: []byte(` +mergingList: + - name: 3 + value: 3 + - name: 1 + - name: 2 + value: 2 +`), + Current: []byte(` +mergingList: + - name: 1 + other: a + - name: 2 + value: 2 + other: b +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 3 + - name: 1 + - name: 2 +mergingList: + - name: 3 + value: 3 +`), + Result: []byte(` +mergingList: + - name: 3 + value: 3 + - name: 1 + other: a + - name: 2 + value: 2 + other: b +`), + }, + }, + { + Description: "add multiple items in a list and preserve order", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + - name: 2 + value: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 4 + - name: 2 + - name: 3 +mergingList: + - name: 4 + value: 4 + - name: 3 + value: 3 +`), + Modified: []byte(` +mergingList: + - name: 1 + - name: 4 + value: 4 + - name: 2 + value: 2 + - name: 3 + value: 3 +`), + Current: []byte(` +mergingList: + - name: 1 + other: a + - name: 2 + value: 2 + other: b +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 1 + - name: 4 + - name: 2 + - name: 3 +mergingList: + - name: 4 + value: 4 + - name: 3 + value: 3 +`), + Result: []byte(` +mergingList: + - name: 1 + other: a + - name: 4 + value: 4 + - name: 2 + value: 2 + other: b + - name: 3 + value: 3 +`), + }, + }, + { + Description: "delete an item in a list and preserve order", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + - name: 3 + value: 3 + - name: 2 + value: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 2 + - name: 1 +mergingList: + - name: 3 + $patch: delete +`), + Modified: []byte(` +mergingList: + - name: 2 + value: 2 + - name: 1 +`), + Current: []byte(` +mergingList: + - name: 1 + other: a + - name: 2 + value: 2 + other: b + - name: 3 + value: 3 +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 2 + - name: 1 +mergingList: + - name: 3 + $patch: delete +`), + Result: []byte(` +mergingList: + - name: 2 + value: 2 + other: b + - name: 1 + other: a +`), + }, + }, + { + Description: "change an item in a list and preserve order", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + - name: 3 + value: 3 + - name: 2 + value: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 2 + - name: 3 + - name: 1 +mergingList: + - name: 3 + value: x +`), + Modified: []byte(` +mergingList: + - name: 2 + value: 2 + - name: 3 + value: x + - name: 1 +`), + Current: []byte(` +mergingList: + - name: 1 + other: a + - name: 2 + value: 2 + other: b + - name: 3 + value: 3 +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 2 + - name: 3 + - name: 1 +mergingList: + - name: 3 + value: x +`), + Result: []byte(` +mergingList: + - name: 2 + value: 2 + other: b + - name: 3 + value: x + - name: 1 + other: a +`), + }, + }, + { + Description: "add and delete an item in a list and preserve order", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + - name: 3 + value: 3 + - name: 2 + value: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 4 + - name: 2 + - name: 1 +mergingList: + - name: 4 + value: 4 + - name: 3 + $patch: delete +`), + Modified: []byte(` +mergingList: + - name: 4 + value: 4 + - name: 2 + value: 2 + - name: 1 +`), + Current: []byte(` +mergingList: + - name: 1 + other: a + - name: 2 + value: 2 + other: b + - name: 3 + value: 3 +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 4 + - name: 2 + - name: 1 +mergingList: + - name: 4 + value: 4 + - name: 3 + $patch: delete +`), + Result: []byte(` +mergingList: + - name: 4 + value: 4 + - name: 2 + value: 2 + other: b + - name: 1 + other: a +`), + }, + }, + { + Description: "set elements order in a list", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + - name: 3 + value: 3 + - name: 4 + value: 4 + - name: 2 + value: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 4 + - name: 2 + - name: 3 + - name: 1 +`), + Modified: []byte(` +mergingList: + - name: 4 + value: 4 + - name: 2 + value: 2 + - name: 3 + value: 3 + - name: 1 +`), + Current: []byte(` +mergingList: + - name: 1 + other: a + - name: 3 + value: 3 + - name: 4 + value: 4 + - name: 2 + value: 2 +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 4 + - name: 2 + - name: 3 + - name: 1 +`), + Result: []byte(` +mergingList: + - name: 4 + value: 4 + - name: 2 + value: 2 + - name: 3 + value: 3 + - name: 1 + other: a +`), + }, + }, + { + Description: "set elements order in a list with server-only items", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + - name: 3 + value: 3 + - name: 4 + value: 4 + - name: 2 + value: 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 4 + - name: 2 + - name: 3 + - name: 1 +`), + Modified: []byte(` +mergingList: + - name: 4 + value: 4 + - name: 2 + value: 2 + - name: 3 + value: 3 + - name: 1 +`), + Current: []byte(` +mergingList: + - name: 1 + other: a + - name: 3 + value: 3 + - name: 4 + value: 4 + - name: 2 + value: 2 + - name: 9 +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 4 + - name: 2 + - name: 3 + - name: 1 +`), + Result: []byte(` +mergingList: + - name: 4 + value: 4 + - name: 2 + value: 2 + - name: 3 + value: 3 + - name: 1 + other: a + - name: 9 +`), + }, + }, + { + Description: "set elements order in a list with server-only items 2", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + - name: 2 + value: 2 + - name: 3 + value: 3 + - name: 4 + value: 4 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 2 + - name: 1 + - name: 4 + - name: 3 +`), + Modified: []byte(` +mergingList: + - name: 2 + value: 2 + - name: 1 + - name: 4 + value: 4 + - name: 3 + value: 3 +`), + Current: []byte(` +mergingList: + - name: 1 + other: a + - name: 2 + value: 2 + - name: 9 + - name: 3 + value: 3 + - name: 4 + value: 4 +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 2 + - name: 1 + - name: 4 + - name: 3 +`), + Result: []byte(` +mergingList: + - name: 2 + value: 2 + - name: 1 + other: a + - name: 9 + - name: 4 + value: 4 + - name: 3 + value: 3 +`), + }, + }, + { + Description: "set elements order in a list with server-only items 3", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: + - name: 1 + - name: 2 + value: 2 + - name: 3 + value: 3 + - name: 4 + value: 4 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: + - name: 2 + - name: 1 + - name: 4 + - name: 3 +`), + Modified: []byte(` +mergingList: + - name: 2 + value: 2 + - name: 1 + - name: 4 + value: 4 + - name: 3 + value: 3 +`), + Current: []byte(` +mergingList: + - name: 1 + other: a + - name: 2 + value: 2 + - name: 7 + - name: 9 + - name: 8 + - name: 3 + value: 3 + - name: 4 + value: 4 +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: + - name: 2 + - name: 1 + - name: 4 + - name: 3 +`), + Result: []byte(` +mergingList: + - name: 2 + value: 2 + - name: 1 + other: a + - name: 7 + - name: 9 + - name: 8 + - name: 4 + value: 4 + - name: 3 + value: 3 +`), + }, + }, + { + Description: "add an item in a int list and preserve order", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingIntList: + - 1 + - 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingIntList: + - 3 + - 1 + - 2 +mergingIntList: + - 3 +`), + Modified: []byte(` +mergingIntList: + - 3 + - 1 + - 2 +`), + Current: []byte(` +mergingIntList: + - 1 + - 2 +`), + ThreeWay: []byte(` +$setElementOrder/mergingIntList: + - 3 + - 1 + - 2 +mergingIntList: + - 3 +`), + Result: []byte(` +mergingIntList: + - 3 + - 1 + - 2 +`), + }, + }, + { + Description: "add multiple items in a int list and preserve order", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingIntList: + - 1 + - 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingIntList: + - 1 + - 4 + - 2 + - 3 +mergingIntList: + - 4 + - 3 +`), + Modified: []byte(` +mergingIntList: + - 1 + - 4 + - 2 + - 3 +`), + Current: []byte(` +mergingIntList: + - 1 + - 2 +`), + ThreeWay: []byte(` +$setElementOrder/mergingIntList: + - 1 + - 4 + - 2 + - 3 +mergingIntList: + - 4 + - 3 +`), + Result: []byte(` +mergingIntList: + - 1 + - 4 + - 2 + - 3 +`), + }, + }, + { + Description: "delete an item in a int list and preserve order", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingIntList: + - 1 + - 3 + - 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingIntList: + - 2 + - 1 +$deleteFromPrimitiveList/mergingIntList: + - 3 +`), + Modified: []byte(` +mergingIntList: + - 2 + - 1 +`), + Current: []byte(` +mergingIntList: + - 1 + - 2 + - 3 +`), + ThreeWay: []byte(` +$setElementOrder/mergingIntList: + - 2 + - 1 +$deleteFromPrimitiveList/mergingIntList: + - 3 +`), + Result: []byte(` +mergingIntList: + - 2 + - 1 +`), + }, + }, + { + Description: "add and delete an item in a int list and preserve order", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingIntList: + - 1 + - 3 + - 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingIntList: + - 4 + - 2 + - 1 +mergingIntList: + - 4 +$deleteFromPrimitiveList/mergingIntList: + - 3 +`), + Modified: []byte(` +mergingIntList: + - 4 + - 2 + - 1 +`), + Current: []byte(` +mergingIntList: + - 1 + - 2 + - 3 +`), + ThreeWay: []byte(` +$setElementOrder/mergingIntList: + - 4 + - 2 + - 1 +mergingIntList: + - 4 +$deleteFromPrimitiveList/mergingIntList: + - 3 +`), + Result: []byte(` +mergingIntList: + - 4 + - 2 + - 1 +`), + }, + }, + { + Description: "set elements order in a int list", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingIntList: + - 1 + - 3 + - 4 + - 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingIntList: + - 4 + - 2 + - 3 + - 1 +`), + Modified: []byte(` +mergingIntList: + - 4 + - 2 + - 3 + - 1 +`), + Current: []byte(` +mergingIntList: + - 1 + - 3 + - 4 + - 2 +`), + ThreeWay: []byte(` +$setElementOrder/mergingIntList: + - 4 + - 2 + - 3 + - 1 +`), + Result: []byte(` +mergingIntList: + - 4 + - 2 + - 3 + - 1 +`), + }, + }, + { + Description: "set elements order in a int list with server-only items", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingIntList: + - 1 + - 3 + - 4 + - 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingIntList: + - 4 + - 2 + - 3 + - 1 +`), + Modified: []byte(` +mergingIntList: + - 4 + - 2 + - 3 + - 1 +`), + Current: []byte(` +mergingIntList: + - 1 + - 3 + - 4 + - 2 + - 9 +`), + ThreeWay: []byte(` +$setElementOrder/mergingIntList: + - 4 + - 2 + - 3 + - 1 +`), + Result: []byte(` +mergingIntList: + - 4 + - 2 + - 3 + - 1 + - 9 +`), + }, + }, + { + Description: "set elements order in a int list with server-only items 2", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingIntList: + - 1 + - 2 + - 3 + - 4 +`), + TwoWay: []byte(` +$setElementOrder/mergingIntList: + - 2 + - 1 + - 4 + - 3 +`), + Modified: []byte(` +mergingIntList: + - 2 + - 1 + - 4 + - 3 +`), + Current: []byte(` +mergingIntList: + - 1 + - 2 + - 9 + - 3 + - 4 +`), + ThreeWay: []byte(` +$setElementOrder/mergingIntList: + - 2 + - 1 + - 4 + - 3 +`), + Result: []byte(` +mergingIntList: + - 2 + - 1 + - 9 + - 4 + - 3 +`), + }, + }, + { + Description: "set elements order in a int list with server-only items 3", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingIntList: + - 1 + - 2 + - 3 + - 4 +`), + TwoWay: []byte(` +$setElementOrder/mergingIntList: + - 2 + - 1 + - 4 + - 3 +`), + Modified: []byte(` +mergingIntList: + - 2 + - 1 + - 4 + - 3 +`), + Current: []byte(` +mergingIntList: + - 1 + - 2 + - 7 + - 9 + - 8 + - 3 + - 4 +`), + ThreeWay: []byte(` +$setElementOrder/mergingIntList: + - 2 + - 1 + - 4 + - 3 +`), + Result: []byte(` +mergingIntList: + - 2 + - 1 + - 7 + - 9 + - 8 + - 4 + - 3 +`), + }, + }, + { + // This test case is used just to demonstrate the behavior when dealing with a list with duplicate + Description: "behavior of set element order for a merging list with duplicate", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: +- name: 1 +- name: 2 + value: dup1 +- name: 3 +- name: 2 + value: dup2 +- name: 4 +`), + Current: []byte(` +mergingList: +- name: 1 +- name: 2 + value: dup1 +- name: 3 +- name: 2 + value: dup2 +- name: 4 +`), + Modified: []byte(` +mergingList: +- name: 2 + value: dup1 +- name: 1 +- name: 4 +- name: 3 +- name: 2 + value: dup2 +`), + TwoWay: []byte(` +$setElementOrder/mergingList: +- name: 2 +- name: 1 +- name: 4 +- name: 3 +- name: 2 +`), + TwoWayResult: []byte(` +mergingList: +- name: 2 + value: dup1 +- name: 2 + value: dup2 +- name: 1 +- name: 4 +- name: 3 +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: +- name: 2 +- name: 1 +- name: 4 +- name: 3 +- name: 2 +`), + Result: []byte(` +mergingList: +- name: 2 + value: dup1 +- name: 2 + value: dup2 +- name: 1 +- name: 4 +- name: 3 +`), + }, + }, + { + // This test case is used just to demonstrate the behavior when dealing with a list with duplicate + Description: "behavior of set element order for a merging int list with duplicate", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingIntList: +- 1 +- 2 +- 3 +- 2 +- 4 +`), + Current: []byte(` +mergingIntList: +- 1 +- 2 +- 3 +- 2 +- 4 +`), + Modified: []byte(` +mergingIntList: +- 2 +- 1 +- 4 +- 3 +- 2 +`), + TwoWay: []byte(` +$setElementOrder/mergingIntList: +- 2 +- 1 +- 4 +- 3 +- 2 +`), + TwoWayResult: []byte(` +mergingIntList: +- 2 +- 2 +- 1 +- 4 +- 3 +`), + ThreeWay: []byte(` +$setElementOrder/mergingIntList: +- 2 +- 1 +- 4 +- 3 +- 2 +`), + Result: []byte(` +mergingIntList: +- 2 +- 2 +- 1 +- 4 +- 3 +`), + }, + }, + { + Description: "retainKeys map should clear defaulted field", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(`{}`), + Current: []byte(` +retainKeysMap: + value: foo +`), + Modified: []byte(` +retainKeysMap: + other: bar +`), + TwoWay: []byte(` +retainKeysMap: + other: bar +`), + ThreeWay: []byte(` +retainKeysMap: + $retainKeys: + - other + other: bar +`), + Result: []byte(` +retainKeysMap: + other: bar +`), + }, + }, + { + Description: "retainKeys map should clear defaulted field with conflict (discriminated union)", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(`{}`), + Current: []byte(` +retainKeysMap: + name: type1 + value: foo +`), + Modified: []byte(` +retainKeysMap: + name: type2 + other: bar +`), + TwoWay: []byte(` +retainKeysMap: + name: type2 + other: bar +`), + ThreeWay: []byte(` +retainKeysMap: + $retainKeys: + - name + - other + name: type2 + other: bar +`), + Result: []byte(` +retainKeysMap: + name: type2 + other: bar +`), + }, + }, + { + Description: "retainKeys map adds a field", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMap: + name: foo +`), + Current: []byte(` +retainKeysMap: + name: foo +`), + Modified: []byte(` +retainKeysMap: + name: foo + value: bar +`), + TwoWay: []byte(` +retainKeysMap: + $retainKeys: + - name + - value + value: bar +`), + ThreeWay: []byte(` +retainKeysMap: + $retainKeys: + - name + - value + value: bar +`), + Result: []byte(` +retainKeysMap: + name: foo + value: bar +`), + }, + }, + { + Description: "retainKeys map adds a field and clear a field", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMap: + name: foo +`), + Current: []byte(` +retainKeysMap: + name: foo + other: a +`), + Modified: []byte(` +retainKeysMap: + name: foo + value: bar +`), + TwoWay: []byte(` +retainKeysMap: + $retainKeys: + - name + - value + value: bar +`), + ThreeWay: []byte(` +retainKeysMap: + $retainKeys: + - name + - value + value: bar +`), + Result: []byte(` +retainKeysMap: + name: foo + value: bar +`), + }, + }, + { + Description: "retainKeys map deletes a field", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMap: + name: foo + value: bar +`), + Current: []byte(` +retainKeysMap: + name: foo + value: bar +`), + Modified: []byte(` +retainKeysMap: + name: foo +`), + TwoWay: []byte(` +retainKeysMap: + $retainKeys: + - name + value: null +`), + ThreeWay: []byte(` +retainKeysMap: + $retainKeys: + - name + value: null +`), + Result: []byte(` +retainKeysMap: + name: foo +`), + }, + }, + { + Description: "retainKeys map deletes a field and clears a field", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMap: + name: foo + value: bar +`), + Current: []byte(` +retainKeysMap: + name: foo + value: bar + other: a +`), + Modified: []byte(` +retainKeysMap: + name: foo +`), + TwoWay: []byte(` +retainKeysMap: + $retainKeys: + - name + value: null +`), + ThreeWay: []byte(` +retainKeysMap: + $retainKeys: + - name + value: null +`), + Result: []byte(` +retainKeysMap: + name: foo +`), + }, + }, + { + Description: "retainKeys map clears a field", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMap: + name: foo + value: bar +`), + Current: []byte(` +retainKeysMap: + name: foo + value: bar + other: a +`), + Modified: []byte(` +retainKeysMap: + name: foo + value: bar +`), + TwoWay: []byte(`{}`), + ThreeWay: []byte(` +retainKeysMap: + $retainKeys: + - name + - value +`), + Result: []byte(` +retainKeysMap: + name: foo + value: bar +`), + }, + }, + { + Description: "retainKeys map nested map with no change", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMap: + name: foo + simpleMap: + key1: a +`), + Current: []byte(` +retainKeysMap: + name: foo + simpleMap: + key1: a +`), + Modified: []byte(` +retainKeysMap: + name: foo + value: bar + simpleMap: + key1: a +`), + TwoWay: []byte(` +retainKeysMap: + $retainKeys: + - name + - simpleMap + - value + value: bar +`), + ThreeWay: []byte(` +retainKeysMap: + $retainKeys: + - name + - simpleMap + - value + value: bar +`), + Result: []byte(` +retainKeysMap: + name: foo + value: bar + simpleMap: + key1: a +`), + }, + }, + { + Description: "retainKeys map adds a field in a nested map", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMap: + name: foo + value: bar + simpleMap: + key1: a +`), + Current: []byte(` +retainKeysMap: + name: foo + value: bar + simpleMap: + key1: a + key3: c +`), + Modified: []byte(` +retainKeysMap: + name: foo + value: bar + simpleMap: + key1: a + key2: b +`), + TwoWay: []byte(` +retainKeysMap: + $retainKeys: + - name + - simpleMap + - value + simpleMap: + key2: b +`), + ThreeWay: []byte(` +retainKeysMap: + $retainKeys: + - name + - simpleMap + - value + simpleMap: + key2: b +`), + Result: []byte(` +retainKeysMap: + name: foo + value: bar + simpleMap: + key1: a + key2: b + key3: c +`), + }, + }, + { + Description: "retainKeys map deletes a field in a nested map", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMap: + name: foo + value: bar + simpleMap: + key1: a + key2: b +`), + Current: []byte(` +retainKeysMap: + name: foo + value: bar + simpleMap: + key1: a + key2: b + key3: c +`), + Modified: []byte(` +retainKeysMap: + name: foo + value: bar + simpleMap: + key1: a +`), + TwoWay: []byte(` +retainKeysMap: + $retainKeys: + - name + - simpleMap + - value + simpleMap: + key2: null +`), + ThreeWay: []byte(` +retainKeysMap: + $retainKeys: + - name + - simpleMap + - value + simpleMap: + key2: null +`), + Result: []byte(` +retainKeysMap: + name: foo + value: bar + simpleMap: + key1: a + key3: c +`), + }, + }, + { + Description: "retainKeys map changes a field in a nested map", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMap: + name: foo + value: bar + simpleMap: + key1: a + key2: b +`), + Current: []byte(` +retainKeysMap: + name: foo + value: bar + simpleMap: + key1: a + key2: b + key3: c +`), + Modified: []byte(` +retainKeysMap: + name: foo + value: bar + simpleMap: + key1: x + key2: b +`), + TwoWay: []byte(` +retainKeysMap: + $retainKeys: + - name + - simpleMap + - value + simpleMap: + key1: x +`), + ThreeWay: []byte(` +retainKeysMap: + $retainKeys: + - name + - simpleMap + - value + simpleMap: + key1: x +`), + Result: []byte(` +retainKeysMap: + name: foo + value: bar + simpleMap: + key1: x + key2: b + key3: c +`), + }, + }, + { + Description: "retainKeys map changes a field in a nested map with conflict", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMap: + name: foo + value: bar + simpleMap: + key1: old + key2: b +`), + Current: []byte(` +retainKeysMap: + name: foo + value: bar + simpleMap: + key1: new + key2: b + key3: c +`), + Modified: []byte(` +retainKeysMap: + name: foo + value: bar + simpleMap: + key1: modified + key2: b +`), + TwoWay: []byte(` +retainKeysMap: + $retainKeys: + - name + - simpleMap + - value + simpleMap: + key1: modified +`), + ThreeWay: []byte(` +retainKeysMap: + $retainKeys: + - name + - simpleMap + - value + simpleMap: + key1: modified +`), + Result: []byte(` +retainKeysMap: + name: foo + value: bar + simpleMap: + key1: modified + key2: b + key3: c +`), + }, + }, + { + Description: "retainKeys map replaces non-merging list", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMap: + name: foo + value: bar + nonMergingList: + - name: a + - name: b +`), + Current: []byte(` +retainKeysMap: + name: foo + value: bar + nonMergingList: + - name: a + - name: b +`), + Modified: []byte(` +retainKeysMap: + name: foo + value: bar + nonMergingList: + - name: a + - name: c + - name: b +`), + TwoWay: []byte(` +retainKeysMap: + $retainKeys: + - name + - nonMergingList + - value + nonMergingList: + - name: a + - name: c + - name: b +`), + ThreeWay: []byte(` +retainKeysMap: + $retainKeys: + - name + - nonMergingList + - value + nonMergingList: + - name: a + - name: c + - name: b +`), + Result: []byte(` +retainKeysMap: + name: foo + value: bar + nonMergingList: + - name: a + - name: c + - name: b +`), + }, + }, + { + Description: "retainKeys map nested non-merging list with no change", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMap: + name: foo + nonMergingList: + - name: a + - name: b +`), + Current: []byte(` +retainKeysMap: + name: foo + nonMergingList: + - name: a + - name: b +`), + Modified: []byte(` +retainKeysMap: + name: foo + value: bar + nonMergingList: + - name: a + - name: b +`), + TwoWay: []byte(` +retainKeysMap: + $retainKeys: + - name + - nonMergingList + - value + value: bar +`), + ThreeWay: []byte(` +retainKeysMap: + $retainKeys: + - name + - nonMergingList + - value + value: bar +`), + Result: []byte(` +retainKeysMap: + name: foo + value: bar + nonMergingList: + - name: a + - name: b +`), + }, + }, + { + Description: "retainKeys map nested non-merging list with no change with conflict", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMap: + name: foo + nonMergingList: + - name: a + - name: b +`), + Current: []byte(` +retainKeysMap: + name: foo + nonMergingList: + - name: a + - name: b + - name: c +`), + Modified: []byte(` +retainKeysMap: + name: foo + value: bar + nonMergingList: + - name: a + - name: b +`), + TwoWay: []byte(` +retainKeysMap: + $retainKeys: + - name + - nonMergingList + - value + value: bar +`), + ThreeWay: []byte(` +retainKeysMap: + $retainKeys: + - name + - nonMergingList + - value + value: bar + nonMergingList: + - name: a + - name: b +`), + Result: []byte(` +retainKeysMap: + name: foo + value: bar + nonMergingList: + - name: a + - name: b +`), + }, + }, + { + Description: "retainKeys map deletes nested non-merging list", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMap: + name: foo + nonMergingList: + - name: a + - name: b +`), + Current: []byte(` +retainKeysMap: + name: foo + nonMergingList: + - name: a + - name: b +`), + Modified: []byte(` +retainKeysMap: + name: foo + value: bar +`), + TwoWay: []byte(` +retainKeysMap: + $retainKeys: + - name + - value + value: bar + nonMergingList: null +`), + ThreeWay: []byte(` +retainKeysMap: + $retainKeys: + - name + - value + value: bar + nonMergingList: null +`), + Result: []byte(` +retainKeysMap: + name: foo + value: bar +`), + }, + }, + { + Description: "retainKeys map delete nested non-merging list with conflict", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMap: + name: foo + nonMergingList: + - name: a + - name: b +`), + Current: []byte(` +retainKeysMap: + name: foo + nonMergingList: + - name: a + - name: b + - name: c +`), + Modified: []byte(` +retainKeysMap: + name: foo + value: bar +`), + TwoWay: []byte(` +retainKeysMap: + $retainKeys: + - name + - value + value: bar + nonMergingList: null +`), + ThreeWay: []byte(` +retainKeysMap: + $retainKeys: + - name + - value + value: bar + nonMergingList: null +`), + Result: []byte(` +retainKeysMap: + name: foo + value: bar +`), + }, + }, + { + Description: "retainKeys map nested merging int list with no change", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMap: + name: foo + mergingIntList: + - 1 + - 2 +`), + Current: []byte(` +retainKeysMap: + name: foo + mergingIntList: + - 1 + - 2 + - 3 +`), + Modified: []byte(` +retainKeysMap: + name: foo + value: bar + mergingIntList: + - 1 + - 2 +`), + TwoWay: []byte(` +retainKeysMap: + $retainKeys: + - mergingIntList + - name + - value + value: bar +`), + ThreeWay: []byte(` +retainKeysMap: + $retainKeys: + - mergingIntList + - name + - value + $setElementOrder/mergingIntList: + - 1 + - 2 + value: bar +`), + Result: []byte(` +retainKeysMap: + name: foo + value: bar + mergingIntList: + - 1 + - 2 + - 3 +`), + }, + }, + { + Description: "retainKeys map adds an item in nested merging int list", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMap: + name: foo + mergingIntList: + - 1 + - 2 +`), + Current: []byte(` +retainKeysMap: + name: foo + mergingIntList: + - 1 + - 2 + - 3 +`), + Modified: []byte(` +retainKeysMap: + name: foo + mergingIntList: + - 1 + - 2 + - 4 +`), + TwoWay: []byte(` +retainKeysMap: + $setElementOrder/mergingIntList: + - 1 + - 2 + - 4 + $retainKeys: + - mergingIntList + - name + mergingIntList: + - 4 +`), + ThreeWay: []byte(` +retainKeysMap: + $setElementOrder/mergingIntList: + - 1 + - 2 + - 4 + $retainKeys: + - mergingIntList + - name + mergingIntList: + - 4 +`), + Result: []byte(` +retainKeysMap: + name: foo + mergingIntList: + - 1 + - 2 + - 4 + - 3 +`), + }, + }, + { + Description: "retainKeys map deletes an item in nested merging int list", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMap: + name: foo + mergingIntList: + - 1 + - 2 + - 3 +`), + Current: []byte(` +retainKeysMap: + name: foo + mergingIntList: + - 1 + - 2 + - 3 + - 4 +`), + Modified: []byte(` +retainKeysMap: + name: foo + mergingIntList: + - 1 + - 3 +`), + TwoWay: []byte(` +retainKeysMap: + $retainKeys: + - mergingIntList + - name + $deleteFromPrimitiveList/mergingIntList: + - 2 + $setElementOrder/mergingIntList: + - 1 + - 3 +`), + ThreeWay: []byte(` +retainKeysMap: + $retainKeys: + - mergingIntList + - name + $deleteFromPrimitiveList/mergingIntList: + - 2 + $setElementOrder/mergingIntList: + - 1 + - 3 +`), + Result: []byte(` +retainKeysMap: + name: foo + mergingIntList: + - 1 + - 3 + - 4 +`), + }, + }, + { + Description: "retainKeys map adds an item and deletes an item in nested merging int list", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMap: + name: foo + mergingIntList: + - 1 + - 2 + - 3 +`), + Current: []byte(` +retainKeysMap: + name: foo + mergingIntList: + - 1 + - 2 + - 3 + - 4 +`), + Modified: []byte(` +retainKeysMap: + name: foo + mergingIntList: + - 1 + - 3 + - 5 +`), + TwoWay: []byte(` +retainKeysMap: + $retainKeys: + - mergingIntList + - name + mergingIntList: + - 5 + $deleteFromPrimitiveList/mergingIntList: + - 2 + $setElementOrder/mergingIntList: + - 1 + - 3 + - 5 +`), + ThreeWay: []byte(` +retainKeysMap: + $retainKeys: + - mergingIntList + - name + mergingIntList: + - 5 + $deleteFromPrimitiveList/mergingIntList: + - 2 + $setElementOrder/mergingIntList: + - 1 + - 3 + - 5 +`), + Result: []byte(` +retainKeysMap: + name: foo + mergingIntList: + - 1 + - 3 + - 5 + - 4 +`), + }, + }, + { + Description: "retainKeys map deletes nested merging int list", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMap: + name: foo + mergingIntList: + - 1 + - 2 + - 3 +`), + Current: []byte(` +retainKeysMap: + name: foo + mergingIntList: + - 1 + - 2 + - 3 +`), + Modified: []byte(` +retainKeysMap: + name: foo +`), + TwoWay: []byte(` +retainKeysMap: + $retainKeys: + - name + mergingIntList: null +`), + ThreeWay: []byte(` +retainKeysMap: + $retainKeys: + - name + mergingIntList: null +`), + Result: []byte(` +retainKeysMap: + name: foo +`), + }, + }, + { + Description: "retainKeys map nested merging list with no change", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMap: + name: foo + mergingList: + - name: a + - name: b +`), + Current: []byte(` +retainKeysMap: + name: foo + mergingList: + - name: a + - name: b + - name: c +`), + Modified: []byte(` +retainKeysMap: + name: foo + value: bar + mergingList: + - name: a + - name: b +`), + TwoWay: []byte(` +retainKeysMap: + $retainKeys: + - mergingList + - name + - value + value: bar +`), + ThreeWay: []byte(` +retainKeysMap: + $retainKeys: + - mergingList + - name + - value + $setElementOrder/mergingList: + - name: a + - name: b + value: bar +`), + Result: []byte(` +retainKeysMap: + name: foo + value: bar + mergingList: + - name: a + - name: b + - name: c +`), + }, + }, + { + Description: "retainKeys map adds an item in nested merging list", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMap: + name: foo + mergingList: + - name: a + - name: b +`), + Current: []byte(` +retainKeysMap: + name: foo + mergingList: + - name: a + - name: b + - name: x +`), + Modified: []byte(` +retainKeysMap: + name: foo + mergingList: + - name: a + - name: b + - name: c +`), + TwoWay: []byte(` +retainKeysMap: + $retainKeys: + - mergingList + - name + $setElementOrder/mergingList: + - name: a + - name: b + - name: c + mergingList: + - name: c +`), + ThreeWay: []byte(` +retainKeysMap: + $retainKeys: + - mergingList + - name + $setElementOrder/mergingList: + - name: a + - name: b + - name: c + mergingList: + - name: c +`), + Result: []byte(` +retainKeysMap: + name: foo + mergingList: + - name: a + - name: b + - name: c + - name: x +`), + }, + }, + { + Description: "retainKeys map changes an item in nested merging list", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMap: + name: foo + mergingList: + - name: a + - name: b + value: foo +`), + Current: []byte(` +retainKeysMap: + name: foo + mergingList: + - name: a + - name: b + value: foo + - name: x +`), + Modified: []byte(` +retainKeysMap: + name: foo + mergingList: + - name: a + - name: b + value: bar +`), + TwoWay: []byte(` +retainKeysMap: + $retainKeys: + - mergingList + - name + $setElementOrder/mergingList: + - name: a + - name: b + mergingList: + - name: b + value: bar +`), + ThreeWay: []byte(` +retainKeysMap: + $retainKeys: + - mergingList + - name + $setElementOrder/mergingList: + - name: a + - name: b + mergingList: + - name: b + value: bar +`), + Result: []byte(` +retainKeysMap: + name: foo + mergingList: + - name: a + - name: b + value: bar + - name: x +`), + }, + }, + { + Description: "retainKeys map deletes nested merging list", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMap: + name: foo + mergingList: + - name: a + - name: b +`), + Current: []byte(` +retainKeysMap: + name: foo + mergingList: + - name: a + - name: b +`), + Modified: []byte(` +retainKeysMap: + name: foo + value: bar +`), + TwoWay: []byte(` +retainKeysMap: + $retainKeys: + - name + - value + value: bar + mergingList: null +`), + ThreeWay: []byte(` +retainKeysMap: + $retainKeys: + - name + - value + value: bar + mergingList: null +`), + Result: []byte(` +retainKeysMap: + name: foo + value: bar +`), + }, + }, + { + Description: "retainKeys map deletes an item in nested merging list", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMap: + name: foo + mergingList: + - name: a + - name: b +`), + Current: []byte(` +retainKeysMap: + name: foo + mergingList: + - name: a + - name: b + - name: x +`), + Modified: []byte(` +retainKeysMap: + name: foo + mergingList: + - name: a +`), + TwoWay: []byte(` +retainKeysMap: + $retainKeys: + - mergingList + - name + $setElementOrder/mergingList: + - name: a + mergingList: + - name: b + $patch: delete +`), + ThreeWay: []byte(` +retainKeysMap: + $retainKeys: + - mergingList + - name + $setElementOrder/mergingList: + - name: a + mergingList: + - name: b + $patch: delete +`), + Result: []byte(` +retainKeysMap: + name: foo + mergingList: + - name: a + - name: x +`), + }, + }, + { + Description: "retainKeys list of maps clears a field", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMergingList: +- name: bar +- name: foo + value: a +`), + Current: []byte(` +retainKeysMergingList: +- name: bar +- name: foo + value: a + other: x +`), + Modified: []byte(` +retainKeysMergingList: +- name: bar +- name: foo + value: a +`), + TwoWay: []byte(`{}`), + ThreeWay: []byte(` +$setElementOrder/retainKeysMergingList: + - name: bar + - name: foo +retainKeysMergingList: +- $retainKeys: + - name + - value + name: foo +`), + Result: []byte(` +retainKeysMergingList: +- name: bar +- name: foo + value: a +`), + }, + }, + { + Description: "retainKeys list of maps clears a field with conflict", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMergingList: +- name: bar +- name: foo + value: old +`), + Current: []byte(` +retainKeysMergingList: +- name: bar +- name: foo + value: new + other: x +`), + Modified: []byte(` +retainKeysMergingList: +- name: bar +- name: foo + value: modified +`), + TwoWay: []byte(` +$setElementOrder/retainKeysMergingList: + - name: bar + - name: foo +retainKeysMergingList: +- $retainKeys: + - name + - value + name: foo + value: modified +`), + ThreeWay: []byte(` +$setElementOrder/retainKeysMergingList: + - name: bar + - name: foo +retainKeysMergingList: +- $retainKeys: + - name + - value + name: foo + value: modified +`), + Result: []byte(` +retainKeysMergingList: +- name: bar +- name: foo + value: modified +`), + }, + }, + { + Description: "retainKeys list of maps changes a field and clear a field", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMergingList: +- name: bar +- name: foo + value: old +`), + Current: []byte(` +retainKeysMergingList: +- name: bar +- name: foo + value: old + other: x +`), + Modified: []byte(` +retainKeysMergingList: +- name: bar +- name: foo + value: new +`), + TwoWay: []byte(` +$setElementOrder/retainKeysMergingList: + - name: bar + - name: foo +retainKeysMergingList: +- $retainKeys: + - name + - value + name: foo + value: new +`), + ThreeWay: []byte(` +$setElementOrder/retainKeysMergingList: + - name: bar + - name: foo +retainKeysMergingList: +- $retainKeys: + - name + - value + name: foo + value: new +`), + Result: []byte(` +retainKeysMergingList: +- name: bar +- name: foo + value: new +`), + }, + }, + { + Description: "retainKeys list of maps changes a field and clear a field with conflict", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMergingList: +- name: bar +- name: foo + value: old +`), + Current: []byte(` +retainKeysMergingList: +- name: bar +- name: foo + value: modified + other: x +`), + Modified: []byte(` +retainKeysMergingList: +- name: bar +- name: foo + value: new +`), + TwoWay: []byte(` +$setElementOrder/retainKeysMergingList: + - name: bar + - name: foo +retainKeysMergingList: +- $retainKeys: + - name + - value + name: foo + value: new +`), + ThreeWay: []byte(` +$setElementOrder/retainKeysMergingList: + - name: bar + - name: foo +retainKeysMergingList: +- $retainKeys: + - name + - value + name: foo + value: new +`), + Result: []byte(` +retainKeysMergingList: +- name: bar +- name: foo + value: new +`), + }, + }, + { + Description: "retainKeys list of maps adds a field", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMergingList: +- name: bar +- name: foo +`), + Current: []byte(` +retainKeysMergingList: +- name: bar +- name: foo +`), + Modified: []byte(` +retainKeysMergingList: +- name: bar +- name: foo + value: a +`), + TwoWay: []byte(` +$setElementOrder/retainKeysMergingList: + - name: bar + - name: foo +retainKeysMergingList: +- $retainKeys: + - name + - value + name: foo + value: a +`), + ThreeWay: []byte(` +$setElementOrder/retainKeysMergingList: + - name: bar + - name: foo +retainKeysMergingList: +- $retainKeys: + - name + - value + name: foo + value: a +`), + Result: []byte(` +retainKeysMergingList: +- name: bar +- name: foo + value: a +`), + }, + }, + { + Description: "retainKeys list of maps adds a field and clear a field", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMergingList: +- name: bar +- name: foo +`), + Current: []byte(` +retainKeysMergingList: +- name: bar +- name: foo + other: x +`), + Modified: []byte(` +retainKeysMergingList: +- name: bar +- name: foo + value: a +`), + TwoWay: []byte(` +$setElementOrder/retainKeysMergingList: + - name: bar + - name: foo +retainKeysMergingList: +- $retainKeys: + - name + - value + name: foo + value: a +`), + ThreeWay: []byte(` +$setElementOrder/retainKeysMergingList: + - name: bar + - name: foo +retainKeysMergingList: +- $retainKeys: + - name + - value + name: foo + value: a +`), + Result: []byte(` +retainKeysMergingList: +- name: bar +- name: foo + value: a +`), + }, + }, + { + Description: "retainKeys list of maps deletes a field", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMergingList: +- name: bar +- name: foo + value: a +`), + Current: []byte(` +retainKeysMergingList: +- name: bar +- name: foo + value: a +`), + Modified: []byte(` +retainKeysMergingList: +- name: bar +- name: foo +`), + TwoWay: []byte(` +$setElementOrder/retainKeysMergingList: + - name: bar + - name: foo +retainKeysMergingList: +- $retainKeys: + - name + name: foo + value: null +`), + ThreeWay: []byte(` +$setElementOrder/retainKeysMergingList: + - name: bar + - name: foo +retainKeysMergingList: +- $retainKeys: + - name + name: foo + value: null +`), + Result: []byte(` +retainKeysMergingList: +- name: bar +- name: foo +`), + }, + }, + { + Description: "retainKeys list of maps deletes a field and clear a field", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +retainKeysMergingList: +- name: bar +- name: foo + value: a +`), + Current: []byte(` +retainKeysMergingList: +- name: bar +- name: foo + value: a + other: x +`), + Modified: []byte(` +retainKeysMergingList: +- name: bar +- name: foo +`), + TwoWay: []byte(` +$setElementOrder/retainKeysMergingList: + - name: bar + - name: foo +retainKeysMergingList: +- $retainKeys: + - name + name: foo + value: null +`), + ThreeWay: []byte(` +$setElementOrder/retainKeysMergingList: + - name: bar + - name: foo +retainKeysMergingList: +- $retainKeys: + - name + name: foo + value: null +`), + Result: []byte(` +retainKeysMergingList: +- name: bar +- name: foo +`), + }, + }, + { + Description: "delete and reorder in one list, reorder in another", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +mergingList: +- name: a + value: a +- name: b + value: b +mergeItemPtr: +- name: c + value: c +- name: d + value: d +`), + Current: []byte(` +mergingList: +- name: a + value: a +- name: b + value: b +mergeItemPtr: +- name: c + value: c +- name: d + value: d +`), + Modified: []byte(` +mergingList: +- name: b + value: b +mergeItemPtr: +- name: d + value: d +- name: c + value: c +`), + TwoWay: []byte(` +$setElementOrder/mergingList: +- name: b +$setElementOrder/mergeItemPtr: +- name: d +- name: c +mergingList: +- $patch: delete + name: a +`), + ThreeWay: []byte(` +$setElementOrder/mergingList: +- name: b +$setElementOrder/mergeItemPtr: +- name: d +- name: c +mergingList: +- $patch: delete + name: a +`), + Result: []byte(` +mergingList: +- name: b + value: b +mergeItemPtr: +- name: d + value: d +- name: c + value: c +`), + }, + }, +} + +func TestStrategicMergePatch(t *testing.T) { + testStrategicMergePatchWithCustomArguments(t, "bad original", + "<THIS IS NOT JSON>", "{}", mergeItem, mergepatch.ErrBadJSONDoc) + testStrategicMergePatchWithCustomArguments(t, "bad patch", + "{}", "<THIS IS NOT JSON>", mergeItem, mergepatch.ErrBadJSONDoc) + testStrategicMergePatchWithCustomArguments(t, "bad struct", + "{}", "{}", []byte("<THIS IS NOT A STRUCT>"), mergepatch.ErrBadArgKind(struct{}{}, []byte{})) + testStrategicMergePatchWithCustomArguments(t, "nil struct", + "{}", "{}", nil, mergepatch.ErrBadArgKind(struct{}{}, nil)) + + tc := StrategicMergePatchTestCases{} + err := yaml.Unmarshal(createStrategicMergePatchTestCaseData, &tc) + if err != nil { + t.Errorf("can't unmarshal test cases: %s\n", err) + return + } + + for _, c := range tc.TestCases { + testTwoWayPatch(t, c) + testThreeWayPatch(t, c) + } + + // run multiple times to exercise different map traversal orders + for i := 0; i < 10; i++ { + for _, c := range strategicMergePatchRawTestCases { + testTwoWayPatchForRawTestCase(t, c) + testThreeWayPatchForRawTestCase(t, c) + } + } +} + +func testStrategicMergePatchWithCustomArguments(t *testing.T, description, original, patch string, dataStruct interface{}, err error) { + _, err2 := StrategicMergePatch([]byte(original), []byte(patch), dataStruct) + if err2 != err { + if err2 == nil { + t.Errorf("expected error: %s\ndid not occur in test case: %s", err, description) + return + } + + if err == nil || err2.Error() != err.Error() { + t.Errorf("unexpected error: %s\noccurred in test case: %s", err2, description) + return + } + } +} + +func testTwoWayPatch(t *testing.T, c StrategicMergePatchTestCase) { + original, expectedPatch, modified, expectedResult := twoWayTestCaseToJSONOrFail(t, c) + + actualPatch, err := CreateTwoWayMergePatch(original, modified, mergeItem) + if err != nil { + t.Errorf("error: %s\nin test case: %s\ncannot create two way patch: %s:\n%s\n", + err, c.Description, original, mergepatch.ToYAMLOrError(c.StrategicMergePatchTestCaseData)) + return + } + + testPatchCreation(t, expectedPatch, actualPatch, c.Description) + testPatchApplication(t, original, actualPatch, expectedResult, c.Description, "") +} + +func testTwoWayPatchForRawTestCase(t *testing.T, c StrategicMergePatchRawTestCase) { + original, expectedPatch, modified, expectedResult := twoWayRawTestCaseToJSONOrFail(t, c) + + actualPatch, err := CreateTwoWayMergePatch(original, modified, mergeItem) + if err != nil { + t.Errorf("error: %s\nin test case: %s\ncannot create two way patch:\noriginal:%s\ntwoWay:%s\nmodified:%s\ncurrent:%s\nthreeWay:%s\nresult:%s\n", + err, c.Description, c.Original, c.TwoWay, c.Modified, c.Current, c.ThreeWay, c.Result) + return + } + + testPatchCreation(t, expectedPatch, actualPatch, c.Description) + testPatchApplication(t, original, actualPatch, expectedResult, c.Description, c.ExpectedError) +} + +func twoWayTestCaseToJSONOrFail(t *testing.T, c StrategicMergePatchTestCase) ([]byte, []byte, []byte, []byte) { + expectedResult := c.TwoWayResult + if expectedResult == nil { + expectedResult = c.Modified + } + return sortJsonOrFail(t, testObjectToJSONOrFail(t, c.Original), c.Description), + sortJsonOrFail(t, testObjectToJSONOrFail(t, c.TwoWay), c.Description), + sortJsonOrFail(t, testObjectToJSONOrFail(t, c.Modified), c.Description), + sortJsonOrFail(t, testObjectToJSONOrFail(t, expectedResult), c.Description) +} + +func twoWayRawTestCaseToJSONOrFail(t *testing.T, c StrategicMergePatchRawTestCase) ([]byte, []byte, []byte, []byte) { + expectedResult := c.TwoWayResult + if expectedResult == nil { + expectedResult = c.Modified + } + return yamlToJSONOrError(t, c.Original), + yamlToJSONOrError(t, c.TwoWay), + yamlToJSONOrError(t, c.Modified), + yamlToJSONOrError(t, expectedResult) +} + +func testThreeWayPatch(t *testing.T, c StrategicMergePatchTestCase) { + original, modified, current, expected, result := threeWayTestCaseToJSONOrFail(t, c) + actual, err := CreateThreeWayMergePatch(original, modified, current, mergeItem, false) + if err != nil { + if !mergepatch.IsConflict(err) { + t.Errorf("error: %s\nin test case: %s\ncannot create three way patch:\n%s\n", + err, c.Description, mergepatch.ToYAMLOrError(c.StrategicMergePatchTestCaseData)) + return + } + + if !strings.Contains(c.Description, "conflict") { + t.Errorf("unexpected conflict: %s\nin test case: %s\ncannot create three way patch:\n%s\n", + err, c.Description, mergepatch.ToYAMLOrError(c.StrategicMergePatchTestCaseData)) + return + } + + if len(c.Result) > 0 { + actual, err := CreateThreeWayMergePatch(original, modified, current, mergeItem, true) + if err != nil { + t.Errorf("error: %s\nin test case: %s\ncannot force three way patch application:\n%s\n", + err, c.Description, mergepatch.ToYAMLOrError(c.StrategicMergePatchTestCaseData)) + return + } + + testPatchCreation(t, expected, actual, c.Description) + testPatchApplication(t, current, actual, result, c.Description, "") + } + + return + } + + if strings.Contains(c.Description, "conflict") || len(c.Result) < 1 { + t.Errorf("error in test case: %s\nexpected conflict did not occur:\n%s\n", + c.Description, mergepatch.ToYAMLOrError(c.StrategicMergePatchTestCaseData)) + return + } + + testPatchCreation(t, expected, actual, c.Description) + testPatchApplication(t, current, actual, result, c.Description, "") +} + +func testThreeWayPatchForRawTestCase(t *testing.T, c StrategicMergePatchRawTestCase) { + original, modified, current, expected, result := threeWayRawTestCaseToJSONOrFail(t, c) + actual, err := CreateThreeWayMergePatch(original, modified, current, mergeItem, false) + if err != nil { + if !mergepatch.IsConflict(err) { + t.Errorf("error: %s\nin test case: %s\ncannot create three way patch:\noriginal:%s\ntwoWay:%s\nmodified:%s\ncurrent:%s\nthreeWay:%s\nresult:%s\n", + err, c.Description, c.Original, c.TwoWay, c.Modified, c.Current, c.ThreeWay, c.Result) + return + } + + if !strings.Contains(c.Description, "conflict") { + t.Errorf("unexpected conflict: %s\nin test case: %s\ncannot create three way patch:\noriginal:%s\ntwoWay:%s\nmodified:%s\ncurrent:%s\nthreeWay:%s\nresult:%s\n", + err, c.Description, c.Original, c.TwoWay, c.Modified, c.Current, c.ThreeWay, c.Result) + return + } + + if len(c.Result) > 0 { + actual, err := CreateThreeWayMergePatch(original, modified, current, mergeItem, true) + if err != nil { + t.Errorf("error: %s\nin test case: %s\ncannot force three way patch application:\noriginal:%s\ntwoWay:%s\nmodified:%s\ncurrent:%s\nthreeWay:%s\nresult:%s\n", + err, c.Description, c.Original, c.TwoWay, c.Modified, c.Current, c.ThreeWay, c.Result) + return + } + + testPatchCreation(t, expected, actual, c.Description) + testPatchApplication(t, current, actual, result, c.Description, c.ExpectedError) + } + + return + } + + if strings.Contains(c.Description, "conflict") || len(c.Result) < 1 { + t.Errorf("error: %s\nin test case: %s\nexpected conflict did not occur:\noriginal:%s\ntwoWay:%s\nmodified:%s\ncurrent:%s\nthreeWay:%s\nresult:%s\n", + err, c.Description, c.Original, c.TwoWay, c.Modified, c.Current, c.ThreeWay, c.Result) + return + } + + testPatchCreation(t, expected, actual, c.Description) + testPatchApplication(t, current, actual, result, c.Description, c.ExpectedError) +} + +func threeWayTestCaseToJSONOrFail(t *testing.T, c StrategicMergePatchTestCase) ([]byte, []byte, []byte, []byte, []byte) { + return sortJsonOrFail(t, testObjectToJSONOrFail(t, c.Original), c.Description), + sortJsonOrFail(t, testObjectToJSONOrFail(t, c.Modified), c.Description), + sortJsonOrFail(t, testObjectToJSONOrFail(t, c.Current), c.Description), + sortJsonOrFail(t, testObjectToJSONOrFail(t, c.ThreeWay), c.Description), + sortJsonOrFail(t, testObjectToJSONOrFail(t, c.Result), c.Description) +} + +func threeWayRawTestCaseToJSONOrFail(t *testing.T, c StrategicMergePatchRawTestCase) ([]byte, []byte, []byte, []byte, []byte) { + return yamlToJSONOrError(t, c.Original), + yamlToJSONOrError(t, c.Modified), + yamlToJSONOrError(t, c.Current), + yamlToJSONOrError(t, c.ThreeWay), + yamlToJSONOrError(t, c.Result) +} + +func testPatchCreation(t *testing.T, expected, actual []byte, description string) { + if !reflect.DeepEqual(actual, expected) { + t.Errorf("error in test case: %s\nexpected patch:\n%s\ngot:\n%s\n", + description, jsonToYAMLOrError(expected), jsonToYAMLOrError(actual)) + return + } +} + +func testPatchApplication(t *testing.T, original, patch, expected []byte, description, expectedError string) { + result, err := StrategicMergePatch(original, patch, mergeItem) + if len(expectedError) != 0 { + if err != nil && strings.Contains(err.Error(), expectedError) { + return + } + t.Errorf("expected error should contain:\n%s\nin test case: %s\nbut got:\n%s\n", expectedError, description, err) + } + if err != nil { + t.Errorf("error: %s\nin test case: %s\ncannot apply patch:\n%s\nto original:\n%s\n", + err, description, jsonToYAMLOrError(patch), jsonToYAMLOrError(original)) + return + } + + if !reflect.DeepEqual(result, expected) { + format := "error in test case: %s\npatch application failed:\noriginal:\n%s\npatch:\n%s\nexpected:\n%s\ngot:\n%s\n" + t.Errorf(format, description, + jsonToYAMLOrError(original), jsonToYAMLOrError(patch), + jsonToYAMLOrError(expected), jsonToYAMLOrError(result)) + return + } +} + +func testObjectToJSONOrFail(t *testing.T, o map[string]interface{}) []byte { + if o == nil { + return nil + } + + j, err := toJSON(o) + if err != nil { + t.Error(err) + } + return j +} + +func sortJsonOrFail(t *testing.T, j []byte, description string) []byte { + if j == nil { + return nil + } + r, err := sortMergeListsByName(j, mergeItem) + if err != nil { + t.Errorf("error: %s\nin test case: %s\ncannot sort object:\n%s\n", err, description, j) + return nil + } + + return r +} + +func jsonToYAMLOrError(j []byte) string { + y, err := jsonToYAML(j) + if err != nil { + return err.Error() + } + + return string(y) +} + +func toJSON(v interface{}) ([]byte, error) { + j, err := json.Marshal(v) + if err != nil { + return nil, fmt.Errorf("json marshal failed: %v\n%v\n", err, spew.Sdump(v)) + } + + return j, nil +} + +func jsonToYAML(j []byte) ([]byte, error) { + y, err := yaml.JSONToYAML(j) + if err != nil { + return nil, fmt.Errorf("json to yaml failed: %v\n%v\n", err, j) + } + + return y, nil +} + +func yamlToJSON(y []byte) ([]byte, error) { + j, err := yaml.YAMLToJSON(y) + if err != nil { + return nil, fmt.Errorf("yaml to json failed: %v\n%v\n", err, y) + } + + return j, nil +} + +func yamlToJSONOrError(t *testing.T, y []byte) []byte { + j, err := yamlToJSON(y) + if err != nil { + t.Errorf("%v", err) + } + + return j +} + +type PrecisionItem struct { + Name string + Int32 int32 + Int64 int64 + Float32 float32 + Float64 float64 +} + +var precisionItem PrecisionItem + +func TestNumberConversion(t *testing.T) { + testcases := map[string]struct { + Old string + New string + ExpectedPatch string + ExpectedResult string + }{ + "empty": { + Old: `{}`, + New: `{}`, + ExpectedPatch: `{}`, + ExpectedResult: `{}`, + }, + "int32 medium": { + Old: `{"int32":1000000}`, + New: `{"int32":1000000,"name":"newname"}`, + ExpectedPatch: `{"name":"newname"}`, + ExpectedResult: `{"int32":1000000,"name":"newname"}`, + }, + "int32 max": { + Old: `{"int32":2147483647}`, + New: `{"int32":2147483647,"name":"newname"}`, + ExpectedPatch: `{"name":"newname"}`, + ExpectedResult: `{"int32":2147483647,"name":"newname"}`, + }, + "int64 medium": { + Old: `{"int64":1000000}`, + New: `{"int64":1000000,"name":"newname"}`, + ExpectedPatch: `{"name":"newname"}`, + ExpectedResult: `{"int64":1000000,"name":"newname"}`, + }, + "int64 max": { + Old: `{"int64":9223372036854775807}`, + New: `{"int64":9223372036854775807,"name":"newname"}`, + ExpectedPatch: `{"name":"newname"}`, + ExpectedResult: `{"int64":9223372036854775807,"name":"newname"}`, + }, + "float32 max": { + Old: `{"float32":3.4028234663852886e+38}`, + New: `{"float32":3.4028234663852886e+38,"name":"newname"}`, + ExpectedPatch: `{"name":"newname"}`, + ExpectedResult: `{"float32":3.4028234663852886e+38,"name":"newname"}`, + }, + "float64 max": { + Old: `{"float64":1.7976931348623157e+308}`, + New: `{"float64":1.7976931348623157e+308,"name":"newname"}`, + ExpectedPatch: `{"name":"newname"}`, + ExpectedResult: `{"float64":1.7976931348623157e+308,"name":"newname"}`, + }, + } + + for k, tc := range testcases { + patch, err := CreateTwoWayMergePatch([]byte(tc.Old), []byte(tc.New), precisionItem) + if err != nil { + t.Errorf("%s: unexpected error %v", k, err) + continue + } + if tc.ExpectedPatch != string(patch) { + t.Errorf("%s: expected %s, got %s", k, tc.ExpectedPatch, string(patch)) + continue + } + + result, err := StrategicMergePatch([]byte(tc.Old), patch, precisionItem) + if err != nil { + t.Errorf("%s: unexpected error %v", k, err) + continue + } + if tc.ExpectedResult != string(result) { + t.Errorf("%s: expected %s, got %s", k, tc.ExpectedResult, string(result)) + continue + } + } +} + +var replaceRawExtensionPatchTestCases = []StrategicMergePatchRawTestCase{ + { + Description: "replace RawExtension field, rest unchanched", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +name: my-object +value: some-value +other: current-other +replacingItem: + Some: Generic + Yaml: Inside + The: RawExtension + Field: Period +`), + Current: []byte(` +name: my-object +value: some-value +other: current-other +merginglist: + - name: 1 + - name: 2 + - name: 3 +replacingItem: + Some: Generic + Yaml: Inside + The: RawExtension + Field: Period +`), + Modified: []byte(` +name: my-object +value: some-value +other: current-other +merginglist: + - name: 1 + - name: 2 + - name: 3 +replacingItem: + Newly: Modified + Yaml: Inside + The: RawExtension +`), + TwoWay: []byte(` +merginglist: + - name: 1 + - name: 2 + - name: 3 +replacingItem: + Newly: Modified + Yaml: Inside + The: RawExtension +`), + TwoWayResult: []byte(` +name: my-object +value: some-value +other: current-other +merginglist: + - name: 1 + - name: 2 + - name: 3 +replacingItem: + Newly: Modified + Yaml: Inside + The: RawExtension +`), + ThreeWay: []byte(` +replacingItem: + Newly: Modified + Yaml: Inside + The: RawExtension +`), + Result: []byte(` +name: my-object +value: some-value +other: current-other +merginglist: + - name: 1 + - name: 2 + - name: 3 +replacingItem: + Newly: Modified + Yaml: Inside + The: RawExtension +`), + }, + }, + { + Description: "replace RawExtension field and merge list", + StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ + Original: []byte(` +name: my-object +value: some-value +other: current-other +merginglist: + - name: 1 +replacingItem: + Some: Generic + Yaml: Inside + The: RawExtension + Field: Period +`), + Current: []byte(` +name: my-object +value: some-value +other: current-other +merginglist: + - name: 1 + - name: 3 +replacingItem: + Some: Generic + Yaml: Inside + The: RawExtension + Field: Period +`), + Modified: []byte(` +name: my-object +value: some-value +other: current-other +merginglist: + - name: 1 + - name: 2 +replacingItem: + Newly: Modified + Yaml: Inside + The: RawExtension +`), + TwoWay: []byte(` +$setElementOrder/merginglist: + - name: 1 + - name: 2 +merginglist: + - name: 2 +replacingItem: + Newly: Modified + Yaml: Inside + The: RawExtension +`), + TwoWayResult: []byte(` +name: my-object +value: some-value +other: current-other +merginglist: + - name: 1 + - name: 2 +replacingItem: + Newly: Modified + Yaml: Inside + The: RawExtension +`), + ThreeWay: []byte(` +$setElementOrder/merginglist: + - name: 1 + - name: 2 +merginglist: + - name: 2 +replacingItem: + Newly: Modified + Yaml: Inside + The: RawExtension +`), + Result: []byte(` +name: my-object +value: some-value +other: current-other +merginglist: + - name: 1 + - name: 2 + - name: 3 +replacingItem: + Newly: Modified + Yaml: Inside + The: RawExtension +`), + }, + }, +} + +func TestReplaceWithRawExtension(t *testing.T) { + for _, c := range replaceRawExtensionPatchTestCases { + testTwoWayPatchForRawTestCase(t, c) + testThreeWayPatchForRawTestCase(t, c) + } +} + +func TestUnknownField(t *testing.T) { + testcases := map[string]struct { + Original string + Current string + Modified string + + ExpectedTwoWay string + ExpectedTwoWayErr string + ExpectedTwoWayResult string + ExpectedThreeWay string + ExpectedThreeWayErr string + ExpectedThreeWayResult string + }{ + // cases we can successfully strategically merge + "no diff": { + Original: `{"array":[1,2,3],"complex":{"nested":true},"name":"foo","scalar":true}`, + Current: `{"array":[1,2,3],"complex":{"nested":true},"name":"foo","scalar":true}`, + Modified: `{"array":[1,2,3],"complex":{"nested":true},"name":"foo","scalar":true}`, + + ExpectedTwoWay: `{}`, + ExpectedTwoWayResult: `{"array":[1,2,3],"complex":{"nested":true},"name":"foo","scalar":true}`, + ExpectedThreeWay: `{}`, + ExpectedThreeWayResult: `{"array":[1,2,3],"complex":{"nested":true},"name":"foo","scalar":true}`, + }, + "added only": { + Original: `{"name":"foo"}`, + Current: `{"name":"foo"}`, + Modified: `{"name":"foo","scalar":true,"complex":{"nested":true},"array":[1,2,3]}`, + + ExpectedTwoWay: `{"array":[1,2,3],"complex":{"nested":true},"scalar":true}`, + ExpectedTwoWayResult: `{"array":[1,2,3],"complex":{"nested":true},"name":"foo","scalar":true}`, + ExpectedThreeWay: `{"array":[1,2,3],"complex":{"nested":true},"scalar":true}`, + ExpectedThreeWayResult: `{"array":[1,2,3],"complex":{"nested":true},"name":"foo","scalar":true}`, + }, + "removed only": { + Original: `{"name":"foo","scalar":true,"complex":{"nested":true}}`, + Current: `{"name":"foo","scalar":true,"complex":{"nested":true},"array":[1,2,3]}`, + Modified: `{"name":"foo"}`, + + ExpectedTwoWay: `{"complex":null,"scalar":null}`, + ExpectedTwoWayResult: `{"name":"foo"}`, + ExpectedThreeWay: `{"complex":null,"scalar":null}`, + ExpectedThreeWayResult: `{"array":[1,2,3],"name":"foo"}`, + }, + + // cases we cannot successfully strategically merge (expect errors) + "diff": { + Original: `{"array":[1,2,3],"complex":{"nested":true},"name":"foo","scalar":true}`, + Current: `{"array":[1,2,3],"complex":{"nested":true},"name":"foo","scalar":true}`, + Modified: `{"array":[1,2,3],"complex":{"nested":false},"name":"foo","scalar":true}`, + + ExpectedTwoWayErr: `unable to find api field`, + ExpectedThreeWayErr: `unable to find api field`, + }, + } + + for _, k := range sets.StringKeySet(testcases).List() { + tc := testcases[k] + func() { + twoWay, err := CreateTwoWayMergePatch([]byte(tc.Original), []byte(tc.Modified), &MergeItem{}) + if err != nil { + if len(tc.ExpectedTwoWayErr) == 0 { + t.Errorf("%s: error making two-way patch: %v", k, err) + } + if !strings.Contains(err.Error(), tc.ExpectedTwoWayErr) { + t.Errorf("%s: expected error making two-way patch to contain '%s', got %s", k, tc.ExpectedTwoWayErr, err) + } + return + } + + if string(twoWay) != tc.ExpectedTwoWay { + t.Errorf("%s: expected two-way patch:\n\t%s\ngot\n\t%s", k, string(tc.ExpectedTwoWay), string(twoWay)) + return + } + + twoWayResult, err := StrategicMergePatch([]byte(tc.Original), twoWay, MergeItem{}) + if err != nil { + t.Errorf("%s: error applying two-way patch: %v", k, err) + return + } + if string(twoWayResult) != tc.ExpectedTwoWayResult { + t.Errorf("%s: expected two-way result:\n\t%s\ngot\n\t%s", k, string(tc.ExpectedTwoWayResult), string(twoWayResult)) + return + } + }() + + func() { + threeWay, err := CreateThreeWayMergePatch([]byte(tc.Original), []byte(tc.Modified), []byte(tc.Current), &MergeItem{}, false) + if err != nil { + if len(tc.ExpectedThreeWayErr) == 0 { + t.Errorf("%s: error making three-way patch: %v", k, err) + } else if !strings.Contains(err.Error(), tc.ExpectedThreeWayErr) { + t.Errorf("%s: expected error making three-way patch to contain '%s', got %s", k, tc.ExpectedThreeWayErr, err) + } + return + } + + if string(threeWay) != tc.ExpectedThreeWay { + t.Errorf("%s: expected three-way patch:\n\t%s\ngot\n\t%s", k, string(tc.ExpectedThreeWay), string(threeWay)) + return + } + + threeWayResult, err := StrategicMergePatch([]byte(tc.Current), threeWay, MergeItem{}) + if err != nil { + t.Errorf("%s: error applying three-way patch: %v", k, err) + return + } else if string(threeWayResult) != tc.ExpectedThreeWayResult { + t.Errorf("%s: expected three-way result:\n\t%s\ngot\n\t%s", k, string(tc.ExpectedThreeWayResult), string(threeWayResult)) + return + } + }() + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/uuid/uuid.go b/vendor/k8s.io/apimachinery/pkg/util/uuid/uuid.go deleted file mode 100644 index bf478223d..000000000 --- a/vendor/k8s.io/apimachinery/pkg/util/uuid/uuid.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package uuid - -import ( - "sync" - - "github.com/pborman/uuid" - - "k8s.io/apimachinery/pkg/types" -) - -var uuidLock sync.Mutex -var lastUUID uuid.UUID - -func NewUUID() types.UID { - uuidLock.Lock() - defer uuidLock.Unlock() - result := uuid.NewUUID() - // The UUID package is naive and can generate identical UUIDs if the - // time interval is quick enough. - // The UUID uses 100 ns increments so it's short enough to actively - // wait for a new value. - for uuid.Equal(lastUUID, result) == true { - result = uuid.NewUUID() - } - lastUUID = result - return types.UID(result.String()) -} diff --git a/vendor/k8s.io/apimachinery/pkg/util/validation/field/errors_test.go b/vendor/k8s.io/apimachinery/pkg/util/validation/field/errors_test.go new file mode 100644 index 000000000..26612017f --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/validation/field/errors_test.go @@ -0,0 +1,167 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package field + +import ( + "fmt" + "strings" + "testing" +) + +func TestMakeFuncs(t *testing.T) { + testCases := []struct { + fn func() *Error + expected ErrorType + }{ + { + func() *Error { return Invalid(NewPath("f"), "v", "d") }, + ErrorTypeInvalid, + }, + { + func() *Error { return NotSupported(NewPath("f"), "v", nil) }, + ErrorTypeNotSupported, + }, + { + func() *Error { return Duplicate(NewPath("f"), "v") }, + ErrorTypeDuplicate, + }, + { + func() *Error { return NotFound(NewPath("f"), "v") }, + ErrorTypeNotFound, + }, + { + func() *Error { return Required(NewPath("f"), "d") }, + ErrorTypeRequired, + }, + { + func() *Error { return InternalError(NewPath("f"), fmt.Errorf("e")) }, + ErrorTypeInternal, + }, + } + + for _, testCase := range testCases { + err := testCase.fn() + if err.Type != testCase.expected { + t.Errorf("expected Type %q, got %q", testCase.expected, err.Type) + } + } +} + +func TestErrorUsefulMessage(t *testing.T) { + { + s := Invalid(nil, nil, "").Error() + t.Logf("message: %v", s) + if !strings.Contains(s, "null") { + t.Errorf("error message did not contain 'null': %s", s) + } + } + + s := Invalid(NewPath("foo"), "bar", "deet").Error() + t.Logf("message: %v", s) + for _, part := range []string{"foo", "bar", "deet", ErrorTypeInvalid.String()} { + if !strings.Contains(s, part) { + t.Errorf("error message did not contain expected part '%v'", part) + } + } + + type complicated struct { + Baz int + Qux string + Inner interface{} + KV map[string]int + } + s = Invalid( + NewPath("foo"), + &complicated{ + Baz: 1, + Qux: "aoeu", + Inner: &complicated{Qux: "asdf"}, + KV: map[string]int{"Billy": 2}, + }, + "detail", + ).Error() + t.Logf("message: %v", s) + for _, part := range []string{ + "foo", ErrorTypeInvalid.String(), + "Baz", "Qux", "Inner", "KV", "detail", + "1", "aoeu", "Billy", "2", + // "asdf", TODO: reenable once we have a better nested printer + } { + if !strings.Contains(s, part) { + t.Errorf("error message did not contain expected part '%v'", part) + } + } +} + +func TestToAggregate(t *testing.T) { + testCases := struct { + ErrList []ErrorList + NumExpectedErrs []int + }{ + []ErrorList{ + nil, + {}, + {Invalid(NewPath("f"), "v", "d")}, + {Invalid(NewPath("f"), "v", "d"), Invalid(NewPath("f"), "v", "d")}, + {Invalid(NewPath("f"), "v", "d"), InternalError(NewPath(""), fmt.Errorf("e"))}, + }, + []int{ + 0, + 0, + 1, + 1, + 2, + }, + } + + if len(testCases.ErrList) != len(testCases.NumExpectedErrs) { + t.Errorf("Mismatch: length of NumExpectedErrs does not match length of ErrList") + } + for i, tc := range testCases.ErrList { + agg := tc.ToAggregate() + numErrs := 0 + + if agg != nil { + numErrs = len(agg.Errors()) + } + if numErrs != testCases.NumExpectedErrs[i] { + t.Errorf("[%d] Expected %d, got %d", i, testCases.NumExpectedErrs[i], numErrs) + } + + if len(tc) == 0 { + if agg != nil { + t.Errorf("[%d] Expected nil, got %#v", i, agg) + } + } else if agg == nil { + t.Errorf("[%d] Expected non-nil", i) + } + } +} + +func TestErrListFilter(t *testing.T) { + list := ErrorList{ + Invalid(NewPath("test.field"), "", ""), + Invalid(NewPath("field.test"), "", ""), + Duplicate(NewPath("test"), "value"), + } + if len(list.Filter(NewErrorTypeMatcher(ErrorTypeDuplicate))) != 2 { + t.Errorf("should not filter") + } + if len(list.Filter(NewErrorTypeMatcher(ErrorTypeInvalid))) != 1 { + t.Errorf("should filter") + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/validation/field/path_test.go b/vendor/k8s.io/apimachinery/pkg/util/validation/field/path_test.go new file mode 100644 index 000000000..d2f568c36 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/validation/field/path_test.go @@ -0,0 +1,123 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package field + +import "testing" + +func TestPath(t *testing.T) { + testCases := []struct { + op func(*Path) *Path + expected string + }{ + { + func(p *Path) *Path { return p }, + "root", + }, + { + func(p *Path) *Path { return p.Child("first") }, + "root.first", + }, + { + func(p *Path) *Path { return p.Child("second") }, + "root.first.second", + }, + { + func(p *Path) *Path { return p.Index(0) }, + "root.first.second[0]", + }, + { + func(p *Path) *Path { return p.Child("third") }, + "root.first.second[0].third", + }, + { + func(p *Path) *Path { return p.Index(93) }, + "root.first.second[0].third[93]", + }, + { + func(p *Path) *Path { return p.parent }, + "root.first.second[0].third", + }, + { + func(p *Path) *Path { return p.parent }, + "root.first.second[0]", + }, + { + func(p *Path) *Path { return p.Key("key") }, + "root.first.second[0][key]", + }, + } + + root := NewPath("root") + p := root + for i, tc := range testCases { + p = tc.op(p) + if p.String() != tc.expected { + t.Errorf("[%d] Expected %q, got %q", i, tc.expected, p.String()) + } + if p.Root() != root { + t.Errorf("[%d] Wrong root: %#v", i, p.Root()) + } + } +} + +func TestPathMultiArg(t *testing.T) { + testCases := []struct { + op func(*Path) *Path + expected string + }{ + { + func(p *Path) *Path { return p }, + "root.first", + }, + { + func(p *Path) *Path { return p.Child("second", "third") }, + "root.first.second.third", + }, + { + func(p *Path) *Path { return p.Index(0) }, + "root.first.second.third[0]", + }, + { + func(p *Path) *Path { return p.parent }, + "root.first.second.third", + }, + { + func(p *Path) *Path { return p.parent }, + "root.first.second", + }, + { + func(p *Path) *Path { return p.parent }, + "root.first", + }, + { + func(p *Path) *Path { return p.parent }, + "root", + }, + } + + root := NewPath("root", "first") + p := root + for i, tc := range testCases { + p = tc.op(p) + if p.String() != tc.expected { + t.Errorf("[%d] Expected %q, got %q", i, tc.expected, p.String()) + } + if p.Root() != root.Root() { + t.Errorf("[%d] Wrong root: %#v", i, p.Root()) + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/validation/validation_test.go b/vendor/k8s.io/apimachinery/pkg/util/validation/validation_test.go new file mode 100644 index 000000000..4c628bbc4 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/validation/validation_test.go @@ -0,0 +1,513 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package validation + +import ( + "strings" + "testing" + + "k8s.io/apimachinery/pkg/util/validation/field" +) + +func TestIsDNS1123Label(t *testing.T) { + goodValues := []string{ + "a", "ab", "abc", "a1", "a-1", "a--1--2--b", + "0", "01", "012", "1a", "1-a", "1--a--b--2", + strings.Repeat("a", 63), + } + for _, val := range goodValues { + if msgs := IsDNS1123Label(val); len(msgs) != 0 { + t.Errorf("expected true for '%s': %v", val, msgs) + } + } + + badValues := []string{ + "", "A", "ABC", "aBc", "A1", "A-1", "1-A", + "-", "a-", "-a", "1-", "-1", + "_", "a_", "_a", "a_b", "1_", "_1", "1_2", + ".", "a.", ".a", "a.b", "1.", ".1", "1.2", + " ", "a ", " a", "a b", "1 ", " 1", "1 2", + strings.Repeat("a", 64), + } + for _, val := range badValues { + if msgs := IsDNS1123Label(val); len(msgs) == 0 { + t.Errorf("expected false for '%s'", val) + } + } +} + +func TestIsDNS1123Subdomain(t *testing.T) { + goodValues := []string{ + "a", "ab", "abc", "a1", "a-1", "a--1--2--b", + "0", "01", "012", "1a", "1-a", "1--a--b--2", + "a.a", "ab.a", "abc.a", "a1.a", "a-1.a", "a--1--2--b.a", + "a.1", "ab.1", "abc.1", "a1.1", "a-1.1", "a--1--2--b.1", + "0.a", "01.a", "012.a", "1a.a", "1-a.a", "1--a--b--2", + "0.1", "01.1", "012.1", "1a.1", "1-a.1", "1--a--b--2.1", + "a.b.c.d.e", "aa.bb.cc.dd.ee", "1.2.3.4.5", "11.22.33.44.55", + strings.Repeat("a", 253), + } + for _, val := range goodValues { + if msgs := IsDNS1123Subdomain(val); len(msgs) != 0 { + t.Errorf("expected true for '%s': %v", val, msgs) + } + } + + badValues := []string{ + "", "A", "ABC", "aBc", "A1", "A-1", "1-A", + "-", "a-", "-a", "1-", "-1", + "_", "a_", "_a", "a_b", "1_", "_1", "1_2", + ".", "a.", ".a", "a..b", "1.", ".1", "1..2", + " ", "a ", " a", "a b", "1 ", " 1", "1 2", + "A.a", "aB.a", "ab.A", "A1.a", "a1.A", + "A.1", "aB.1", "A1.1", "1A.1", + "0.A", "01.A", "012.A", "1A.a", "1a.A", + "A.B.C.D.E", "AA.BB.CC.DD.EE", "a.B.c.d.e", "aa.bB.cc.dd.ee", + "a@b", "a,b", "a_b", "a;b", + "a:b", "a%b", "a?b", "a$b", + strings.Repeat("a", 254), + } + for _, val := range badValues { + if msgs := IsDNS1123Subdomain(val); len(msgs) == 0 { + t.Errorf("expected false for '%s'", val) + } + } +} + +func TestIsDNS1035Label(t *testing.T) { + goodValues := []string{ + "a", "ab", "abc", "a1", "a-1", "a--1--2--b", + strings.Repeat("a", 63), + } + for _, val := range goodValues { + if msgs := IsDNS1035Label(val); len(msgs) != 0 { + t.Errorf("expected true for '%s': %v", val, msgs) + } + } + + badValues := []string{ + "0", "01", "012", "1a", "1-a", "1--a--b--2", + "", "A", "ABC", "aBc", "A1", "A-1", "1-A", + "-", "a-", "-a", "1-", "-1", + "_", "a_", "_a", "a_b", "1_", "_1", "1_2", + ".", "a.", ".a", "a.b", "1.", ".1", "1.2", + " ", "a ", " a", "a b", "1 ", " 1", "1 2", + strings.Repeat("a", 64), + } + for _, val := range badValues { + if msgs := IsDNS1035Label(val); len(msgs) == 0 { + t.Errorf("expected false for '%s'", val) + } + } +} + +func TestIsCIdentifier(t *testing.T) { + goodValues := []string{ + "a", "ab", "abc", "a1", "_a", "a_", "a_b", "a_1", "a__1__2__b", "__abc_123", + "A", "AB", "AbC", "A1", "_A", "A_", "A_B", "A_1", "A__1__2__B", "__123_ABC", + } + for _, val := range goodValues { + if msgs := IsCIdentifier(val); len(msgs) != 0 { + t.Errorf("expected true for '%s': %v", val, msgs) + } + } + + badValues := []string{ + "", "1", "123", "1a", + "-", "a-", "-a", "1-", "-1", "1_", "1_2", + ".", "a.", ".a", "a.b", "1.", ".1", "1.2", + " ", "a ", " a", "a b", "1 ", " 1", "1 2", + "#a#", + } + for _, val := range badValues { + if msgs := IsCIdentifier(val); len(msgs) == 0 { + t.Errorf("expected false for '%s'", val) + } + } +} + +func TestIsValidPortNum(t *testing.T) { + goodValues := []int{1, 2, 1000, 16384, 32768, 65535} + for _, val := range goodValues { + if msgs := IsValidPortNum(val); len(msgs) != 0 { + t.Errorf("expected true for %d, got %v", val, msgs) + } + } + + badValues := []int{0, -1, 65536, 100000} + for _, val := range badValues { + if msgs := IsValidPortNum(val); len(msgs) == 0 { + t.Errorf("expected false for %d", val) + } + } +} + +func TestIsInRange(t *testing.T) { + goodValues := []struct { + value int + min int + max int + }{{1, 0, 10}, {5, 5, 20}, {25, 10, 25}} + for _, val := range goodValues { + if msgs := IsInRange(val.value, val.min, val.max); len(msgs) > 0 { + t.Errorf("expected no errors for %#v, but got %v", val, msgs) + } + } + + badValues := []struct { + value int + min int + max int + }{{1, 2, 10}, {5, -4, 2}, {25, 100, 120}} + for _, val := range badValues { + if msgs := IsInRange(val.value, val.min, val.max); len(msgs) == 0 { + t.Errorf("expected errors for %#v", val) + } + } +} + +func createGroupIDs(ids ...int64) []int64 { + var output []int64 + for _, id := range ids { + output = append(output, int64(id)) + } + return output +} + +func createUserIDs(ids ...int64) []int64 { + var output []int64 + for _, id := range ids { + output = append(output, int64(id)) + } + return output +} + +func TestIsValidGroupID(t *testing.T) { + goodValues := createGroupIDs(0, 1, 1000, 65535, 2147483647) + for _, val := range goodValues { + if msgs := IsValidGroupID(val); len(msgs) != 0 { + t.Errorf("expected true for '%d': %v", val, msgs) + } + } + + badValues := createGroupIDs(-1, -1003, 2147483648, 4147483647) + for _, val := range badValues { + if msgs := IsValidGroupID(val); len(msgs) == 0 { + t.Errorf("expected false for '%d'", val) + } + } +} + +func TestIsValidUserID(t *testing.T) { + goodValues := createUserIDs(0, 1, 1000, 65535, 2147483647) + for _, val := range goodValues { + if msgs := IsValidUserID(val); len(msgs) != 0 { + t.Errorf("expected true for '%d': %v", val, msgs) + } + } + + badValues := createUserIDs(-1, -1003, 2147483648, 4147483647) + for _, val := range badValues { + if msgs := IsValidUserID(val); len(msgs) == 0 { + t.Errorf("expected false for '%d'", val) + } + } +} + +func TestIsValidPortName(t *testing.T) { + goodValues := []string{"telnet", "re-mail-ck", "pop3", "a", "a-1", "1-a", "a-1-b-2-c", "1-a-2-b-3"} + for _, val := range goodValues { + if msgs := IsValidPortName(val); len(msgs) != 0 { + t.Errorf("expected true for %q: %v", val, msgs) + } + } + + badValues := []string{"longerthan15characters", "", strings.Repeat("a", 16), "12345", "1-2-3-4", "-begin", "end-", "two--hyphens", "whois++"} + for _, val := range badValues { + if msgs := IsValidPortName(val); len(msgs) == 0 { + t.Errorf("expected false for %q", val) + } + } +} + +func TestIsQualifiedName(t *testing.T) { + successCases := []string{ + "simple", + "now-with-dashes", + "1-starts-with-num", + "1234", + "simple/simple", + "now-with-dashes/simple", + "now-with-dashes/now-with-dashes", + "now.with.dots/simple", + "now-with.dashes-and.dots/simple", + "1-num.2-num/3-num", + "1234/5678", + "1.2.3.4/5678", + "Uppercase_Is_OK_123", + "example.com/Uppercase_Is_OK_123", + "requests.storage-foo", + strings.Repeat("a", 63), + strings.Repeat("a", 253) + "/" + strings.Repeat("b", 63), + } + for i := range successCases { + if errs := IsQualifiedName(successCases[i]); len(errs) != 0 { + t.Errorf("case[%d]: %q: expected success: %v", i, successCases[i], errs) + } + } + + errorCases := []string{ + "nospecialchars%^=@", + "cantendwithadash-", + "-cantstartwithadash-", + "only/one/slash", + "Example.com/abc", + "example_com/abc", + "example.com/", + "/simple", + strings.Repeat("a", 64), + strings.Repeat("a", 254) + "/abc", + } + for i := range errorCases { + if errs := IsQualifiedName(errorCases[i]); len(errs) == 0 { + t.Errorf("case[%d]: %q: expected failure", i, errorCases[i]) + } + } +} + +func TestIsValidLabelValue(t *testing.T) { + successCases := []string{ + "simple", + "now-with-dashes", + "1-starts-with-num", + "end-with-num-1", + "1234", // only num + strings.Repeat("a", 63), // to the limit + "", // empty value + } + for i := range successCases { + if errs := IsValidLabelValue(successCases[i]); len(errs) != 0 { + t.Errorf("case %s expected success: %v", successCases[i], errs) + } + } + + errorCases := []string{ + "nospecialchars%^=@", + "Tama-nui-te-rā.is.Māori.sun", + "\\backslashes\\are\\bad", + "-starts-with-dash", + "ends-with-dash-", + ".starts.with.dot", + "ends.with.dot.", + strings.Repeat("a", 64), // over the limit + } + for i := range errorCases { + if errs := IsValidLabelValue(errorCases[i]); len(errs) == 0 { + t.Errorf("case[%d] expected failure", i) + } + } +} + +func TestIsValidIP(t *testing.T) { + goodValues := []string{ + "::1", + "2a00:79e0:2:0:f1c3:e797:93c1:df80", + "::", + "2001:4860:4860::8888", + "::fff:1.1.1.1", + "1.1.1.1", + "1.1.1.01", + "255.0.0.1", + "1.0.0.0", + "0.0.0.0", + } + for _, val := range goodValues { + if msgs := IsValidIP(val); len(msgs) != 0 { + t.Errorf("expected true for %q: %v", val, msgs) + } + } + + badValues := []string{ + "[2001:db8:0:1]:80", + "myhost.mydomain", + "-1.0.0.0", + "[2001:db8:0:1]", + "a", + } + for _, val := range badValues { + if msgs := IsValidIP(val); len(msgs) == 0 { + t.Errorf("expected false for %q", val) + } + } +} + +func TestIsHTTPHeaderName(t *testing.T) { + goodValues := []string{ + // Common ones + "Accept-Encoding", "Host", "If-Modified-Since", "X-Forwarded-For", + // Weirdo, but still conforming names + "a", "ab", "abc", "a1", "-a", "a-", "a-b", "a-1", "a--1--2--b", "--abc-123", + "A", "AB", "AbC", "A1", "-A", "A-", "A-B", "A-1", "A--1--2--B", "--123-ABC", + } + for _, val := range goodValues { + if msgs := IsHTTPHeaderName(val); len(msgs) != 0 { + t.Errorf("expected true for '%s': %v", val, msgs) + } + } + + badValues := []string{ + "Host:", "X-Forwarded-For:", "X-@Home", + "", "_", "a_", "_a", "1_", "1_2", ".", "a.", ".a", "a.b", "1.", ".1", "1.2", + " ", "a ", " a", "a b", "1 ", " 1", "1 2", "#a#", "^", ",", ";", "=", "<", + "?", "@", "{", + } + for _, val := range badValues { + if msgs := IsHTTPHeaderName(val); len(msgs) == 0 { + t.Errorf("expected false for '%s'", val) + } + } +} + +func TestIsValidPercent(t *testing.T) { + goodValues := []string{ + "0%", + "00000%", + "1%", + "01%", + "99%", + "100%", + "101%", + } + for _, val := range goodValues { + if msgs := IsValidPercent(val); len(msgs) != 0 { + t.Errorf("expected true for %q: %v", val, msgs) + } + } + + badValues := []string{ + "", + "0", + "100", + "0.0%", + "99.9%", + "hundred", + " 1%", + "1% ", + "-0%", + "-1%", + "+1%", + } + for _, val := range badValues { + if msgs := IsValidPercent(val); len(msgs) == 0 { + t.Errorf("expected false for %q", val) + } + } +} + +func TestIsConfigMapKey(t *testing.T) { + successCases := []string{ + "a", + "good", + "good-good", + "still.good", + "this.is.also.good", + ".so.is.this", + "THIS_IS_GOOD", + "so_is_this_17", + } + + for i := range successCases { + if errs := IsConfigMapKey(successCases[i]); len(errs) != 0 { + t.Errorf("[%d] expected success: %v", i, errs) + } + } + + failureCases := []string{ + ".", + "..", + "..bad", + "b*d", + "bad!&bad", + } + + for i := range failureCases { + if errs := IsConfigMapKey(failureCases[i]); len(errs) == 0 { + t.Errorf("[%d] expected failure", i) + } + } +} + +func TestIsWildcardDNS1123Subdomain(t *testing.T) { + goodValues := []string{ + "*.example.com", + "*.bar.com", + "*.foo.bar.com", + } + for _, val := range goodValues { + if errs := IsWildcardDNS1123Subdomain(val); len(errs) != 0 { + t.Errorf("expected no errors for %q: %v", val, errs) + } + } + + badValues := []string{ + "*.*.bar.com", + "*.foo.*.com", + "*bar.com", + "f*.bar.com", + "*", + } + for _, val := range badValues { + if errs := IsWildcardDNS1123Subdomain(val); len(errs) == 0 { + t.Errorf("expected errors for %q", val) + } + } +} + +func TestIsFullyQualifiedName(t *testing.T) { + tests := []struct { + name string + targetName string + err string + }{ + { + name: "name needs to be fully qualified, i.e., contains at least 2 dots", + targetName: "k8s.io", + err: "should be a domain with at least three segments separated by dots", + }, + { + name: "name cannot be empty", + targetName: "", + err: "Required value", + }, + { + name: "name must conform to RFC 1123", + targetName: "A.B.C", + err: "a DNS-1123 subdomain must consist of lower case alphanumeric characters", + }, + } + for _, tc := range tests { + err := IsFullyQualifiedName(field.NewPath(""), tc.targetName).ToAggregate() + switch { + case tc.err == "" && err != nil: + t.Errorf("%q: unexpected error: %v", tc.name, err) + case tc.err != "" && err == nil: + t.Errorf("%q: unexpected no error, expected %s", tc.name, tc.err) + case tc.err != "" && err != nil && !strings.Contains(err.Error(), tc.err): + t.Errorf("%q: expected %s, got %v", tc.name, tc.err, err) + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/wait/doc.go b/vendor/k8s.io/apimachinery/pkg/util/wait/doc.go index ff89dc170..3f0c968ec 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/wait/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/util/wait/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package wait provides tools for polling or listening for changes // to a condition. -package wait +package wait // import "k8s.io/apimachinery/pkg/util/wait" diff --git a/vendor/k8s.io/apimachinery/pkg/util/wait/wait_test.go b/vendor/k8s.io/apimachinery/pkg/util/wait/wait_test.go new file mode 100644 index 000000000..2dfd28777 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/wait/wait_test.go @@ -0,0 +1,501 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package wait + +import ( + "errors" + "fmt" + "sync" + "sync/atomic" + "testing" + "time" + + "k8s.io/apimachinery/pkg/util/runtime" +) + +func TestUntil(t *testing.T) { + ch := make(chan struct{}) + close(ch) + Until(func() { + t.Fatal("should not have been invoked") + }, 0, ch) + + ch = make(chan struct{}) + called := make(chan struct{}) + go func() { + Until(func() { + called <- struct{}{} + }, 0, ch) + close(called) + }() + <-called + close(ch) + <-called +} + +func TestNonSlidingUntil(t *testing.T) { + ch := make(chan struct{}) + close(ch) + NonSlidingUntil(func() { + t.Fatal("should not have been invoked") + }, 0, ch) + + ch = make(chan struct{}) + called := make(chan struct{}) + go func() { + NonSlidingUntil(func() { + called <- struct{}{} + }, 0, ch) + close(called) + }() + <-called + close(ch) + <-called +} + +func TestUntilReturnsImmediately(t *testing.T) { + now := time.Now() + ch := make(chan struct{}) + Until(func() { + close(ch) + }, 30*time.Second, ch) + if now.Add(25 * time.Second).Before(time.Now()) { + t.Errorf("Until did not return immediately when the stop chan was closed inside the func") + } +} + +func TestJitterUntil(t *testing.T) { + ch := make(chan struct{}) + // if a channel is closed JitterUntil never calls function f + // and returns immediately + close(ch) + JitterUntil(func() { + t.Fatal("should not have been invoked") + }, 0, 1.0, true, ch) + + ch = make(chan struct{}) + called := make(chan struct{}) + go func() { + JitterUntil(func() { + called <- struct{}{} + }, 0, 1.0, true, ch) + close(called) + }() + <-called + close(ch) + <-called +} + +func TestJitterUntilReturnsImmediately(t *testing.T) { + now := time.Now() + ch := make(chan struct{}) + JitterUntil(func() { + close(ch) + }, 30*time.Second, 1.0, true, ch) + if now.Add(25 * time.Second).Before(time.Now()) { + t.Errorf("JitterUntil did not return immediately when the stop chan was closed inside the func") + } +} + +func TestJitterUntilRecoversPanic(t *testing.T) { + // Save and restore crash handlers + originalReallyCrash := runtime.ReallyCrash + originalHandlers := runtime.PanicHandlers + defer func() { + runtime.ReallyCrash = originalReallyCrash + runtime.PanicHandlers = originalHandlers + }() + + called := 0 + handled := 0 + + // Hook up a custom crash handler to ensure it is called when a jitter function panics + runtime.ReallyCrash = false + runtime.PanicHandlers = []func(interface{}){ + func(p interface{}) { + handled++ + }, + } + + ch := make(chan struct{}) + JitterUntil(func() { + called++ + if called > 2 { + close(ch) + return + } + panic("TestJitterUntilRecoversPanic") + }, time.Millisecond, 1.0, true, ch) + + if called != 3 { + t.Errorf("Expected panic recovers") + } +} + +func TestJitterUntilNegativeFactor(t *testing.T) { + now := time.Now() + ch := make(chan struct{}) + called := make(chan struct{}) + received := make(chan struct{}) + go func() { + JitterUntil(func() { + called <- struct{}{} + <-received + }, time.Second, -30.0, true, ch) + }() + // first loop + <-called + received <- struct{}{} + // second loop + <-called + close(ch) + received <- struct{}{} + + // it should take at most 2 seconds + some overhead, not 3 + if now.Add(3 * time.Second).Before(time.Now()) { + t.Errorf("JitterUntil did not returned after predefined period with negative jitter factor when the stop chan was closed inside the func") + } + +} + +func TestExponentialBackoff(t *testing.T) { + opts := Backoff{Factor: 1.0, Steps: 3} + + // waits up to steps + i := 0 + err := ExponentialBackoff(opts, func() (bool, error) { + i++ + return false, nil + }) + if err != ErrWaitTimeout || i != opts.Steps { + t.Errorf("unexpected error: %v", err) + } + + // returns immediately + i = 0 + err = ExponentialBackoff(opts, func() (bool, error) { + i++ + return true, nil + }) + if err != nil || i != 1 { + t.Errorf("unexpected error: %v", err) + } + + // returns immediately on error + testErr := fmt.Errorf("some other error") + err = ExponentialBackoff(opts, func() (bool, error) { + return false, testErr + }) + if err != testErr { + t.Errorf("unexpected error: %v", err) + } + + // invoked multiple times + i = 1 + err = ExponentialBackoff(opts, func() (bool, error) { + if i < opts.Steps { + i++ + return false, nil + } + return true, nil + }) + if err != nil || i != opts.Steps { + t.Errorf("unexpected error: %v", err) + } +} + +func TestPoller(t *testing.T) { + done := make(chan struct{}) + defer close(done) + w := poller(time.Millisecond, 2*time.Millisecond) + ch := w(done) + count := 0 +DRAIN: + for { + select { + case _, open := <-ch: + if !open { + break DRAIN + } + count++ + case <-time.After(ForeverTestTimeout): + t.Errorf("unexpected timeout after poll") + } + } + if count > 3 { + t.Errorf("expected up to three values, got %d", count) + } +} + +type fakePoller struct { + max int + used int32 // accessed with atomics + wg sync.WaitGroup +} + +func fakeTicker(max int, used *int32, doneFunc func()) WaitFunc { + return func(done <-chan struct{}) <-chan struct{} { + ch := make(chan struct{}) + go func() { + defer doneFunc() + defer close(ch) + for i := 0; i < max; i++ { + select { + case ch <- struct{}{}: + case <-done: + return + } + if used != nil { + atomic.AddInt32(used, 1) + } + } + }() + return ch + } +} + +func (fp *fakePoller) GetWaitFunc() WaitFunc { + fp.wg.Add(1) + return fakeTicker(fp.max, &fp.used, fp.wg.Done) +} + +func TestPoll(t *testing.T) { + invocations := 0 + f := ConditionFunc(func() (bool, error) { + invocations++ + return true, nil + }) + fp := fakePoller{max: 1} + if err := pollInternal(fp.GetWaitFunc(), f); err != nil { + t.Fatalf("unexpected error %v", err) + } + fp.wg.Wait() + if invocations != 1 { + t.Errorf("Expected exactly one invocation, got %d", invocations) + } + used := atomic.LoadInt32(&fp.used) + if used != 1 { + t.Errorf("Expected exactly one tick, got %d", used) + } +} + +func TestPollError(t *testing.T) { + expectedError := errors.New("Expected error") + f := ConditionFunc(func() (bool, error) { + return false, expectedError + }) + fp := fakePoller{max: 1} + if err := pollInternal(fp.GetWaitFunc(), f); err == nil || err != expectedError { + t.Fatalf("Expected error %v, got none %v", expectedError, err) + } + fp.wg.Wait() + used := atomic.LoadInt32(&fp.used) + if used != 1 { + t.Errorf("Expected exactly one tick, got %d", used) + } +} + +func TestPollImmediate(t *testing.T) { + invocations := 0 + f := ConditionFunc(func() (bool, error) { + invocations++ + return true, nil + }) + fp := fakePoller{max: 0} + if err := pollImmediateInternal(fp.GetWaitFunc(), f); err != nil { + t.Fatalf("unexpected error %v", err) + } + // We don't need to wait for fp.wg, as pollImmediate shouldn't call WaitFunc at all. + if invocations != 1 { + t.Errorf("Expected exactly one invocation, got %d", invocations) + } + used := atomic.LoadInt32(&fp.used) + if used != 0 { + t.Errorf("Expected exactly zero ticks, got %d", used) + } +} + +func TestPollImmediateError(t *testing.T) { + expectedError := errors.New("Expected error") + f := ConditionFunc(func() (bool, error) { + return false, expectedError + }) + fp := fakePoller{max: 0} + if err := pollImmediateInternal(fp.GetWaitFunc(), f); err == nil || err != expectedError { + t.Fatalf("Expected error %v, got none %v", expectedError, err) + } + // We don't need to wait for fp.wg, as pollImmediate shouldn't call WaitFunc at all. + used := atomic.LoadInt32(&fp.used) + if used != 0 { + t.Errorf("Expected exactly zero ticks, got %d", used) + } +} + +func TestPollForever(t *testing.T) { + ch := make(chan struct{}) + done := make(chan struct{}, 1) + complete := make(chan struct{}) + go func() { + f := ConditionFunc(func() (bool, error) { + ch <- struct{}{} + select { + case <-done: + return true, nil + default: + } + return false, nil + }) + + if err := PollInfinite(time.Microsecond, f); err != nil { + t.Fatalf("unexpected error %v", err) + } + + close(ch) + complete <- struct{}{} + }() + + // ensure the condition is opened + <-ch + + // ensure channel sends events + for i := 0; i < 10; i++ { + select { + case _, open := <-ch: + if !open { + t.Fatalf("did not expect channel to be closed") + } + case <-time.After(ForeverTestTimeout): + t.Fatalf("channel did not return at least once within the poll interval") + } + } + + // at most one poll notification should be sent once we return from the condition + done <- struct{}{} + go func() { + for i := 0; i < 2; i++ { + _, open := <-ch + if !open { + return + } + } + t.Fatalf("expected closed channel after two iterations") + }() + <-complete +} + +func TestWaitFor(t *testing.T) { + var invocations int + testCases := map[string]struct { + F ConditionFunc + Ticks int + Invoked int + Err bool + }{ + "invoked once": { + ConditionFunc(func() (bool, error) { + invocations++ + return true, nil + }), + 2, + 1, + false, + }, + "invoked and returns a timeout": { + ConditionFunc(func() (bool, error) { + invocations++ + return false, nil + }), + 2, + 3, // the contract of WaitFor() says the func is called once more at the end of the wait + true, + }, + "returns immediately on error": { + ConditionFunc(func() (bool, error) { + invocations++ + return false, errors.New("test") + }), + 2, + 1, + true, + }, + } + for k, c := range testCases { + invocations = 0 + ticker := fakeTicker(c.Ticks, nil, func() {}) + err := func() error { + done := make(chan struct{}) + defer close(done) + return WaitFor(ticker, c.F, done) + }() + switch { + case c.Err && err == nil: + t.Errorf("%s: Expected error, got nil", k) + continue + case !c.Err && err != nil: + t.Errorf("%s: Expected no error, got: %#v", k, err) + continue + } + if invocations != c.Invoked { + t.Errorf("%s: Expected %d invocations, got %d", k, c.Invoked, invocations) + } + } +} + +func TestWaitForWithDelay(t *testing.T) { + done := make(chan struct{}) + defer close(done) + WaitFor(poller(time.Millisecond, ForeverTestTimeout), func() (bool, error) { + time.Sleep(10 * time.Millisecond) + return true, nil + }, done) + // If polling goroutine doesn't see the done signal it will leak timers. + select { + case done <- struct{}{}: + case <-time.After(ForeverTestTimeout): + t.Errorf("expected an ack of the done signal.") + } +} + +func TestPollUntil(t *testing.T) { + stopCh := make(chan struct{}) + called := make(chan bool) + pollDone := make(chan struct{}) + + go func() { + PollUntil(time.Microsecond, ConditionFunc(func() (bool, error) { + called <- true + return false, nil + }), stopCh) + + close(pollDone) + }() + + // make sure we're called once + <-called + // this should trigger a "done" + close(stopCh) + + go func() { + // release the condition func if needed + for { + <-called + } + }() + + // make sure we finished the poll + <-pollDone +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/yaml/decoder_test.go b/vendor/k8s.io/apimachinery/pkg/util/yaml/decoder_test.go new file mode 100644 index 000000000..bd4403648 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/yaml/decoder_test.go @@ -0,0 +1,349 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package yaml + +import ( + "bufio" + "bytes" + "encoding/json" + "fmt" + "io" + "math/rand" + "reflect" + "strings" + "testing" +) + +func TestSplitYAMLDocument(t *testing.T) { + testCases := []struct { + input string + atEOF bool + expect string + adv int + }{ + {"foo", true, "foo", 3}, + {"fo", false, "", 0}, + + {"---", true, "---", 3}, + {"---\n", true, "---\n", 4}, + {"---\n", false, "", 0}, + + {"\n---\n", false, "", 5}, + {"\n---\n", true, "", 5}, + + {"abc\n---\ndef", true, "abc", 8}, + {"def", true, "def", 3}, + {"", true, "", 0}, + } + for i, testCase := range testCases { + adv, token, err := splitYAMLDocument([]byte(testCase.input), testCase.atEOF) + if err != nil { + t.Errorf("%d: unexpected error: %v", i, err) + continue + } + if adv != testCase.adv { + t.Errorf("%d: advance did not match: %d %d", i, testCase.adv, adv) + } + if testCase.expect != string(token) { + t.Errorf("%d: token did not match: %q %q", i, testCase.expect, string(token)) + } + } +} + +func TestGuessJSON(t *testing.T) { + if r, _, isJSON := GuessJSONStream(bytes.NewReader([]byte(" \n{}")), 100); !isJSON { + t.Fatalf("expected stream to be JSON") + } else { + b := make([]byte, 30) + n, err := r.Read(b) + if err != nil || n != 4 { + t.Fatalf("unexpected body: %d / %v", n, err) + } + if string(b[:n]) != " \n{}" { + t.Fatalf("unexpected body: %q", string(b[:n])) + } + } +} + +func TestScanYAML(t *testing.T) { + s := bufio.NewScanner(bytes.NewReader([]byte(`--- +stuff: 1 + +--- + `))) + s.Split(splitYAMLDocument) + if !s.Scan() { + t.Fatalf("should have been able to scan") + } + t.Logf("scan: %s", s.Text()) + if !s.Scan() { + t.Fatalf("should have been able to scan") + } + t.Logf("scan: %s", s.Text()) + if s.Scan() { + t.Fatalf("scan should have been done") + } + if s.Err() != nil { + t.Fatalf("err should have been nil: %v", s.Err()) + } +} + +func TestDecodeYAML(t *testing.T) { + s := NewYAMLToJSONDecoder(bytes.NewReader([]byte(`--- +stuff: 1 + +--- + `))) + obj := generic{} + if err := s.Decode(&obj); err != nil { + t.Fatalf("unexpected error: %v", err) + } + if fmt.Sprintf("%#v", obj) != `yaml.generic{"stuff":1}` { + t.Errorf("unexpected object: %#v", obj) + } + obj = generic{} + if err := s.Decode(&obj); err != nil { + t.Fatalf("unexpected error: %v", err) + } + if len(obj) != 0 { + t.Fatalf("unexpected object: %#v", obj) + } + obj = generic{} + if err := s.Decode(&obj); err != io.EOF { + t.Fatalf("unexpected error: %v", err) + } +} + +func TestDecodeBrokenYAML(t *testing.T) { + s := NewYAMLOrJSONDecoder(bytes.NewReader([]byte(`--- +stuff: 1 + test-foo: 1 + +--- + `)), 100) + obj := generic{} + err := s.Decode(&obj) + if err == nil { + t.Fatal("expected error with yaml: violate, got no error") + } + fmt.Printf("err: %s\n", err.Error()) + if !strings.Contains(err.Error(), "yaml: line 2:") { + t.Fatalf("expected %q to have 'yaml: line 2:' found a tab character", err.Error()) + } +} + +func TestDecodeBrokenJSON(t *testing.T) { + s := NewYAMLOrJSONDecoder(bytes.NewReader([]byte(`{ + "foo": { + "stuff": 1 + "otherStuff": 2 + } +} + `)), 100) + obj := generic{} + err := s.Decode(&obj) + if err == nil { + t.Fatal("expected error with json: prefix, got no error") + } + if !strings.HasPrefix(err.Error(), "json: line 3:") { + t.Fatalf("expected %q to have 'json: line 3:' prefix", err.Error()) + } +} + +type generic map[string]interface{} + +func TestYAMLOrJSONDecoder(t *testing.T) { + testCases := []struct { + input string + buffer int + isJSON bool + err bool + out []generic + }{ + {` {"1":2}{"3":4}`, 2, true, false, []generic{ + {"1": 2}, + {"3": 4}, + }}, + {" \n{}", 3, true, false, []generic{ + {}, + }}, + {" \na: b", 2, false, false, []generic{ + {"a": "b"}, + }}, + {" \n{\"a\": \"b\"}", 2, false, true, []generic{ + {"a": "b"}, + }}, + {" \n{\"a\": \"b\"}", 3, true, false, []generic{ + {"a": "b"}, + }}, + {` {"a":"b"}`, 100, true, false, []generic{ + {"a": "b"}, + }}, + {"", 1, false, false, []generic{}}, + {"foo: bar\n---\nbaz: biz", 100, false, false, []generic{ + {"foo": "bar"}, + {"baz": "biz"}, + }}, + {"foo: bar\n---\n", 100, false, false, []generic{ + {"foo": "bar"}, + }}, + {"foo: bar\n---", 100, false, false, []generic{ + {"foo": "bar"}, + }}, + {"foo: bar\n--", 100, false, true, []generic{ + {"foo": "bar"}, + }}, + {"foo: bar\n-", 100, false, true, []generic{ + {"foo": "bar"}, + }}, + {"foo: bar\n", 100, false, false, []generic{ + {"foo": "bar"}, + }}, + } + for i, testCase := range testCases { + decoder := NewYAMLOrJSONDecoder(bytes.NewReader([]byte(testCase.input)), testCase.buffer) + objs := []generic{} + + var err error + for { + out := make(generic) + err = decoder.Decode(&out) + if err != nil { + break + } + objs = append(objs, out) + } + if err != io.EOF { + switch { + case testCase.err && err == nil: + t.Errorf("%d: unexpected non-error", i) + continue + case !testCase.err && err != nil: + t.Errorf("%d: unexpected error: %v", i, err) + continue + case err != nil: + continue + } + } + switch decoder.decoder.(type) { + case *YAMLToJSONDecoder: + if testCase.isJSON { + t.Errorf("%d: expected JSON decoder, got YAML", i) + } + case *json.Decoder: + if !testCase.isJSON { + t.Errorf("%d: expected YAML decoder, got JSON", i) + } + } + if fmt.Sprintf("%#v", testCase.out) != fmt.Sprintf("%#v", objs) { + t.Errorf("%d: objects were not equal: \n%#v\n%#v", i, testCase.out, objs) + } + } +} + +func TestReadSingleLongLine(t *testing.T) { + testReadLines(t, []int{128 * 1024}) +} + +func TestReadRandomLineLengths(t *testing.T) { + minLength := 100 + maxLength := 96 * 1024 + maxLines := 100 + + lineLengths := make([]int, maxLines) + for i := 0; i < maxLines; i++ { + lineLengths[i] = rand.Intn(maxLength-minLength) + minLength + } + + testReadLines(t, lineLengths) +} + +func testReadLines(t *testing.T, lineLengths []int) { + var ( + lines [][]byte + inputStream []byte + ) + for _, lineLength := range lineLengths { + inputLine := make([]byte, lineLength+1) + for i := 0; i < lineLength; i++ { + char := rand.Intn('z'-'A') + 'A' + inputLine[i] = byte(char) + } + inputLine[len(inputLine)-1] = '\n' + lines = append(lines, inputLine) + } + for _, line := range lines { + inputStream = append(inputStream, line...) + } + + // init Reader + reader := bufio.NewReader(bytes.NewReader(inputStream)) + lineReader := &LineReader{reader: reader} + + // read lines + var readLines [][]byte + for range lines { + bytes, err := lineReader.Read() + if err != nil && err != io.EOF { + t.Fatalf("failed to read lines: %v", err) + } + readLines = append(readLines, bytes) + } + + // validate + for i := range lines { + if len(lines[i]) != len(readLines[i]) { + t.Fatalf("expected line length: %d, but got %d", len(lines[i]), len(readLines[i])) + } + if !reflect.DeepEqual(lines[i], readLines[i]) { + t.Fatalf("expected line: %v, but got %v", lines[i], readLines[i]) + } + } +} + +func TestTypedJSONOrYamlErrors(t *testing.T) { + s := NewYAMLOrJSONDecoder(bytes.NewReader([]byte(`{ + "foo": { + "stuff": 1 + "otherStuff": 2 + } +} + `)), 100) + obj := generic{} + err := s.Decode(&obj) + if err == nil { + t.Fatal("expected error with json: prefix, got no error") + } + if _, ok := err.(JSONSyntaxError); !ok { + t.Fatalf("expected %q to be of type JSONSyntaxError", err.Error()) + } + + s = NewYAMLOrJSONDecoder(bytes.NewReader([]byte(`--- +stuff: 1 + test-foo: 1 + +--- + `)), 100) + obj = generic{} + err = s.Decode(&obj) + if err == nil { + t.Fatal("expected error with yaml: prefix, got no error") + } + if _, ok := err.(YAMLSyntaxError); !ok { + t.Fatalf("expected %q to be of type YAMLSyntaxError", err.Error()) + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/version/doc.go b/vendor/k8s.io/apimachinery/pkg/version/doc.go index 00431d489..5e77af7ea 100644 --- a/vendor/k8s.io/apimachinery/pkg/version/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/version/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package version supplies the type for version information collected at build time. // +k8s:openapi-gen=true -package version +package version // import "k8s.io/apimachinery/pkg/version" diff --git a/vendor/k8s.io/apimachinery/pkg/watch/doc.go b/vendor/k8s.io/apimachinery/pkg/watch/doc.go index 5fde5e742..7e6bf3fb9 100644 --- a/vendor/k8s.io/apimachinery/pkg/watch/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/watch/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package watch contains a generic watchable interface, and a fake for // testing code that uses the watch interface. -package watch +package watch // import "k8s.io/apimachinery/pkg/watch" diff --git a/vendor/k8s.io/apimachinery/pkg/watch/filter_test.go b/vendor/k8s.io/apimachinery/pkg/watch/filter_test.go new file mode 100644 index 000000000..4b5ae898a --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/watch/filter_test.go @@ -0,0 +1,84 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package watch_test + +import ( + "reflect" + "testing" + + . "k8s.io/apimachinery/pkg/watch" +) + +func TestFilter(t *testing.T) { + table := []Event{ + {Type: Added, Object: testType("foo")}, + {Type: Added, Object: testType("bar")}, + {Type: Added, Object: testType("baz")}, + {Type: Added, Object: testType("qux")}, + {Type: Added, Object: testType("zoo")}, + } + + source := NewFake() + filtered := Filter(source, func(e Event) (Event, bool) { + return e, e.Object.(testType)[0] != 'b' + }) + + go func() { + for _, item := range table { + source.Action(item.Type, item.Object) + } + source.Stop() + }() + + var got []string + for { + event, ok := <-filtered.ResultChan() + if !ok { + break + } + got = append(got, string(event.Object.(testType))) + } + + if e, a := []string{"foo", "qux", "zoo"}, got; !reflect.DeepEqual(e, a) { + t.Errorf("got %v, wanted %v", e, a) + } +} + +func TestFilterStop(t *testing.T) { + source := NewFake() + filtered := Filter(source, func(e Event) (Event, bool) { + return e, e.Object.(testType)[0] != 'b' + }) + + go func() { + source.Add(testType("foo")) + filtered.Stop() + }() + + var got []string + for { + event, ok := <-filtered.ResultChan() + if !ok { + break + } + got = append(got, string(event.Object.(testType))) + } + + if e, a := []string{"foo"}, got; !reflect.DeepEqual(e, a) { + t.Errorf("got %v, wanted %v", e, a) + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/watch/mux_test.go b/vendor/k8s.io/apimachinery/pkg/watch/mux_test.go new file mode 100644 index 000000000..7029cf1f4 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/watch/mux_test.go @@ -0,0 +1,176 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package watch_test + +import ( + "reflect" + "sync" + "testing" + "time" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/wait" + . "k8s.io/apimachinery/pkg/watch" +) + +type myType struct { + ID string + Value string +} + +func (obj *myType) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } +func (obj *myType) DeepCopyObject() runtime.Object { + if obj == nil { + return nil + } + clone := *obj + return &clone +} + +func TestBroadcaster(t *testing.T) { + table := []Event{ + {Type: Added, Object: &myType{"foo", "hello world 1"}}, + {Type: Added, Object: &myType{"bar", "hello world 2"}}, + {Type: Modified, Object: &myType{"foo", "goodbye world 3"}}, + {Type: Deleted, Object: &myType{"bar", "hello world 4"}}, + } + + // The broadcaster we're testing + m := NewBroadcaster(0, WaitIfChannelFull) + + // Add a bunch of watchers + const testWatchers = 2 + wg := sync.WaitGroup{} + wg.Add(testWatchers) + for i := 0; i < testWatchers; i++ { + // Verify that each watcher gets the events in the correct order + go func(watcher int, w Interface) { + tableLine := 0 + for { + event, ok := <-w.ResultChan() + if !ok { + break + } + if e, a := table[tableLine], event; !reflect.DeepEqual(e, a) { + t.Errorf("Watcher %v, line %v: Expected (%v, %#v), got (%v, %#v)", + watcher, tableLine, e.Type, e.Object, a.Type, a.Object) + } else { + t.Logf("Got (%v, %#v)", event.Type, event.Object) + } + tableLine++ + } + wg.Done() + }(i, m.Watch()) + } + + for i, item := range table { + t.Logf("Sending %v", i) + m.Action(item.Type, item.Object) + } + + m.Shutdown() + + wg.Wait() +} + +func TestBroadcasterWatcherClose(t *testing.T) { + m := NewBroadcaster(0, WaitIfChannelFull) + w := m.Watch() + w2 := m.Watch() + w.Stop() + m.Shutdown() + if _, open := <-w.ResultChan(); open { + t.Errorf("Stop didn't work?") + } + if _, open := <-w2.ResultChan(); open { + t.Errorf("Shutdown didn't work?") + } + // Extra stops don't hurt things + w.Stop() + w2.Stop() +} + +func TestBroadcasterWatcherStopDeadlock(t *testing.T) { + done := make(chan bool) + m := NewBroadcaster(0, WaitIfChannelFull) + go func(w0, w1 Interface) { + // We know Broadcaster is in the distribute loop once one watcher receives + // an event. Stop the other watcher while distribute is trying to + // send to it. + select { + case <-w0.ResultChan(): + w1.Stop() + case <-w1.ResultChan(): + w0.Stop() + } + close(done) + }(m.Watch(), m.Watch()) + m.Action(Added, &myType{}) + select { + case <-time.After(wait.ForeverTestTimeout): + t.Error("timeout: deadlocked") + case <-done: + } + m.Shutdown() +} + +func TestBroadcasterDropIfChannelFull(t *testing.T) { + m := NewBroadcaster(1, DropIfChannelFull) + + event1 := Event{Type: Added, Object: &myType{"foo", "hello world 1"}} + event2 := Event{Type: Added, Object: &myType{"bar", "hello world 2"}} + + // Add a couple watchers + watches := make([]Interface, 2) + for i := range watches { + watches[i] = m.Watch() + } + + // Send a couple events before closing the broadcast channel. + t.Log("Sending event 1") + m.Action(event1.Type, event1.Object) + t.Log("Sending event 2") + m.Action(event2.Type, event2.Object) + m.Shutdown() + + // Pull events from the queue. + wg := sync.WaitGroup{} + wg.Add(len(watches)) + for i := range watches { + // Verify that each watcher only gets the first event because its watch + // queue of length one was full from the first one. + go func(watcher int, w Interface) { + defer wg.Done() + e1, ok := <-w.ResultChan() + if !ok { + t.Errorf("Watcher %v failed to retrieve first event.", watcher) + } + if e, a := event1, e1; !reflect.DeepEqual(e, a) { + t.Errorf("Watcher %v: Expected (%v, %#v), got (%v, %#v)", + watcher, e.Type, e.Object, a.Type, a.Object) + } + t.Logf("Got (%v, %#v)", e1.Type, e1.Object) + e2, ok := <-w.ResultChan() + if ok { + t.Errorf("Watcher %v received second event (%v, %#v) even though it shouldn't have.", + watcher, e2.Type, e2.Object) + } + }(i, watches[i]) + } + wg.Wait() +} diff --git a/vendor/k8s.io/apimachinery/pkg/watch/streamwatcher_test.go b/vendor/k8s.io/apimachinery/pkg/watch/streamwatcher_test.go new file mode 100644 index 000000000..1e3029115 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/watch/streamwatcher_test.go @@ -0,0 +1,68 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package watch_test + +import ( + "io" + "reflect" + "testing" + + "k8s.io/apimachinery/pkg/runtime" + . "k8s.io/apimachinery/pkg/watch" +) + +type fakeDecoder struct { + items chan Event +} + +func (f fakeDecoder) Decode() (action EventType, object runtime.Object, err error) { + item, open := <-f.items + if !open { + return action, nil, io.EOF + } + return item.Type, item.Object, nil +} + +func (f fakeDecoder) Close() { + close(f.items) +} + +func TestStreamWatcher(t *testing.T) { + table := []Event{ + {Type: Added, Object: testType("foo")}, + } + + fd := fakeDecoder{make(chan Event, 5)} + sw := NewStreamWatcher(fd) + + for _, item := range table { + fd.items <- item + got, open := <-sw.ResultChan() + if !open { + t.Errorf("unexpected early close") + } + if e, a := item, got; !reflect.DeepEqual(e, a) { + t.Errorf("expected %v, got %v", e, a) + } + } + + sw.Stop() + _, open := <-sw.ResultChan() + if open { + t.Errorf("Unexpected failure to close") + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/watch/until_test.go b/vendor/k8s.io/apimachinery/pkg/watch/until_test.go new file mode 100644 index 000000000..e872c3681 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/watch/until_test.go @@ -0,0 +1,172 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package watch + +import ( + "errors" + "strings" + "testing" + "time" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/wait" +) + +type fakePod struct { + name string +} + +func (obj *fakePod) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } +func (obj *fakePod) DeepCopyObject() runtime.Object { panic("DeepCopyObject not supported by fakePod") } + +func TestUntil(t *testing.T) { + fw := NewFake() + go func() { + var obj *fakePod + fw.Add(obj) + fw.Modify(obj) + }() + conditions := []ConditionFunc{ + func(event Event) (bool, error) { return event.Type == Added, nil }, + func(event Event) (bool, error) { return event.Type == Modified, nil }, + } + + timeout := time.Minute + lastEvent, err := Until(timeout, fw, conditions...) + if err != nil { + t.Fatalf("expected nil error, got %#v", err) + } + if lastEvent == nil { + t.Fatal("expected an event") + } + if lastEvent.Type != Modified { + t.Fatalf("expected MODIFIED event type, got %v", lastEvent.Type) + } + if got, isPod := lastEvent.Object.(*fakePod); !isPod { + t.Fatalf("expected a pod event, got %#v", got) + } +} + +func TestUntilMultipleConditions(t *testing.T) { + fw := NewFake() + go func() { + var obj *fakePod + fw.Add(obj) + }() + conditions := []ConditionFunc{ + func(event Event) (bool, error) { return event.Type == Added, nil }, + func(event Event) (bool, error) { return event.Type == Added, nil }, + } + + timeout := time.Minute + lastEvent, err := Until(timeout, fw, conditions...) + if err != nil { + t.Fatalf("expected nil error, got %#v", err) + } + if lastEvent == nil { + t.Fatal("expected an event") + } + if lastEvent.Type != Added { + t.Fatalf("expected MODIFIED event type, got %v", lastEvent.Type) + } + if got, isPod := lastEvent.Object.(*fakePod); !isPod { + t.Fatalf("expected a pod event, got %#v", got) + } +} + +func TestUntilMultipleConditionsFail(t *testing.T) { + fw := NewFake() + go func() { + var obj *fakePod + fw.Add(obj) + }() + conditions := []ConditionFunc{ + func(event Event) (bool, error) { return event.Type == Added, nil }, + func(event Event) (bool, error) { return event.Type == Added, nil }, + func(event Event) (bool, error) { return event.Type == Deleted, nil }, + } + + timeout := 10 * time.Second + lastEvent, err := Until(timeout, fw, conditions...) + if err != wait.ErrWaitTimeout { + t.Fatalf("expected ErrWaitTimeout error, got %#v", err) + } + if lastEvent == nil { + t.Fatal("expected an event") + } + if lastEvent.Type != Added { + t.Fatalf("expected ADDED event type, got %v", lastEvent.Type) + } + if got, isPod := lastEvent.Object.(*fakePod); !isPod { + t.Fatalf("expected a pod event, got %#v", got) + } +} + +func TestUntilTimeout(t *testing.T) { + fw := NewFake() + go func() { + var obj *fakePod + fw.Add(obj) + fw.Modify(obj) + }() + conditions := []ConditionFunc{ + func(event Event) (bool, error) { + return event.Type == Added, nil + }, + func(event Event) (bool, error) { + return event.Type == Modified, nil + }, + } + + timeout := time.Duration(0) + lastEvent, err := Until(timeout, fw, conditions...) + if err != nil { + t.Fatalf("expected nil error, got %#v", err) + } + if lastEvent == nil { + t.Fatal("expected an event") + } + if lastEvent.Type != Modified { + t.Fatalf("expected MODIFIED event type, got %v", lastEvent.Type) + } + if got, isPod := lastEvent.Object.(*fakePod); !isPod { + t.Fatalf("expected a pod event, got %#v", got) + } +} + +func TestUntilErrorCondition(t *testing.T) { + fw := NewFake() + go func() { + var obj *fakePod + fw.Add(obj) + }() + expected := "something bad" + conditions := []ConditionFunc{ + func(event Event) (bool, error) { return event.Type == Added, nil }, + func(event Event) (bool, error) { return false, errors.New(expected) }, + } + + timeout := time.Minute + _, err := Until(timeout, fw, conditions...) + if err == nil { + t.Fatal("expected an error") + } + if !strings.Contains(err.Error(), expected) { + t.Fatalf("expected %q in error string, got %q", expected, err.Error()) + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/watch/watch_test.go b/vendor/k8s.io/apimachinery/pkg/watch/watch_test.go new file mode 100644 index 000000000..bdf7fedd4 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/watch/watch_test.go @@ -0,0 +1,137 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package watch_test + +import ( + "testing" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + . "k8s.io/apimachinery/pkg/watch" +) + +type testType string + +func (obj testType) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } +func (obj testType) DeepCopyObject() runtime.Object { return obj } + +func TestFake(t *testing.T) { + f := NewFake() + + table := []struct { + t EventType + s testType + }{ + {Added, testType("foo")}, + {Modified, testType("qux")}, + {Modified, testType("bar")}, + {Deleted, testType("bar")}, + {Error, testType("error: blah")}, + } + + // Prove that f implements Interface by phrasing this as a function. + consumer := func(w Interface) { + for _, expect := range table { + got, ok := <-w.ResultChan() + if !ok { + t.Fatalf("closed early") + } + if e, a := expect.t, got.Type; e != a { + t.Fatalf("Expected %v, got %v", e, a) + } + if a, ok := got.Object.(testType); !ok || a != expect.s { + t.Fatalf("Expected %v, got %v", expect.s, a) + } + } + _, stillOpen := <-w.ResultChan() + if stillOpen { + t.Fatal("Never stopped") + } + } + + sender := func() { + f.Add(testType("foo")) + f.Action(Modified, testType("qux")) + f.Modify(testType("bar")) + f.Delete(testType("bar")) + f.Error(testType("error: blah")) + f.Stop() + } + + go sender() + consumer(f) +} + +func TestRaceFreeFake(t *testing.T) { + f := NewRaceFreeFake() + + table := []struct { + t EventType + s testType + }{ + {Added, testType("foo")}, + {Modified, testType("qux")}, + {Modified, testType("bar")}, + {Deleted, testType("bar")}, + {Error, testType("error: blah")}, + } + + // Prove that f implements Interface by phrasing this as a function. + consumer := func(w Interface) { + for _, expect := range table { + got, ok := <-w.ResultChan() + if !ok { + t.Fatalf("closed early") + } + if e, a := expect.t, got.Type; e != a { + t.Fatalf("Expected %v, got %v", e, a) + } + if a, ok := got.Object.(testType); !ok || a != expect.s { + t.Fatalf("Expected %v, got %v", expect.s, a) + } + } + _, stillOpen := <-w.ResultChan() + if stillOpen { + t.Fatal("Never stopped") + } + } + + sender := func() { + f.Add(testType("foo")) + f.Action(Modified, testType("qux")) + f.Modify(testType("bar")) + f.Delete(testType("bar")) + f.Error(testType("error: blah")) + f.Stop() + } + + go sender() + consumer(f) +} + +func TestEmpty(t *testing.T) { + w := NewEmptyWatch() + _, ok := <-w.ResultChan() + if ok { + t.Errorf("unexpected result channel result") + } + w.Stop() + _, ok = <-w.ResultChan() + if ok { + t.Errorf("unexpected result channel result") + } +} diff --git a/vendor/k8s.io/apimachinery/third_party/forked/golang/json/fields_test.go b/vendor/k8s.io/apimachinery/third_party/forked/golang/json/fields_test.go new file mode 100644 index 000000000..04d8cebd9 --- /dev/null +++ b/vendor/k8s.io/apimachinery/third_party/forked/golang/json/fields_test.go @@ -0,0 +1,30 @@ +package json + +import ( + "reflect" + "testing" +) + +func TestLookupPtrToStruct(t *testing.T) { + type Elem struct { + Key string + Value string + } + type Outer struct { + Inner []Elem `json:"inner" patchStrategy:"merge" patchMergeKey:"key"` + } + outer := &Outer{} + elemType, patchStrategies, patchMergeKey, err := LookupPatchMetadata(reflect.TypeOf(outer), "inner") + if err != nil { + t.Fatal(err) + } + if elemType != reflect.TypeOf([]Elem{}) { + t.Errorf("elemType = %v, want: %v", elemType, reflect.TypeOf([]Elem{})) + } + if !reflect.DeepEqual(patchStrategies, []string{"merge"}) { + t.Errorf("patchStrategies = %v, want: %v", patchStrategies, []string{"merge"}) + } + if patchMergeKey != "key" { + t.Errorf("patchMergeKey = %v, want: %v", patchMergeKey, "key") + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/master/ports/BUILD b/vendor/k8s.io/apimachinery/third_party/forked/golang/netutil/BUILD similarity index 87% rename from vendor/k8s.io/kubernetes/pkg/master/ports/BUILD rename to vendor/k8s.io/apimachinery/third_party/forked/golang/netutil/BUILD index 1b047cda9..b48ba0312 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/ports/BUILD +++ b/vendor/k8s.io/apimachinery/third_party/forked/golang/netutil/BUILD @@ -7,10 +7,7 @@ load( go_library( name = "go_default_library", - srcs = [ - "doc.go", - "ports.go", - ], + srcs = ["addr.go"], ) filegroup( diff --git a/vendor/k8s.io/apimachinery/third_party/forked/golang/netutil/addr.go b/vendor/k8s.io/apimachinery/third_party/forked/golang/netutil/addr.go new file mode 100644 index 000000000..c70f431c2 --- /dev/null +++ b/vendor/k8s.io/apimachinery/third_party/forked/golang/netutil/addr.go @@ -0,0 +1,27 @@ +package netutil + +import ( + "net/url" + "strings" +) + +// FROM: http://golang.org/src/net/http/client.go +// Given a string of the form "host", "host:port", or "[ipv6::address]:port", +// return true if the string includes a port. +func hasPort(s string) bool { return strings.LastIndex(s, ":") > strings.LastIndex(s, "]") } + +// FROM: http://golang.org/src/net/http/transport.go +var portMap = map[string]string{ + "http": "80", + "https": "443", +} + +// FROM: http://golang.org/src/net/http/transport.go +// canonicalAddr returns url.Host but always with a ":port" suffix +func CanonicalAddr(url *url.URL) string { + addr := url.Host + if !hasPort(addr) { + return addr + ":" + portMap[url.Scheme] + } + return addr +} diff --git a/vendor/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal_test.go b/vendor/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal_test.go new file mode 100644 index 000000000..4a0629930 --- /dev/null +++ b/vendor/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal_test.go @@ -0,0 +1,137 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package reflect + +import ( + "testing" +) + +func TestEqualities(t *testing.T) { + e := Equalities{} + type Bar struct { + X int + } + type Baz struct { + Y Bar + } + err := e.AddFuncs( + func(a, b int) bool { + return a+1 == b + }, + func(a, b Bar) bool { + return a.X*10 == b.X + }, + ) + if err != nil { + t.Fatalf("Unexpected: %v", err) + } + + type Foo struct { + X int + } + + table := []struct { + a, b interface{} + equal bool + }{ + {1, 2, true}, + {2, 1, false}, + {"foo", "fo", false}, + {"foo", "foo", true}, + {"foo", "foobar", false}, + {Foo{1}, Foo{2}, true}, + {Foo{2}, Foo{1}, false}, + {Bar{1}, Bar{10}, true}, + {&Bar{1}, &Bar{10}, true}, + {Baz{Bar{1}}, Baz{Bar{10}}, true}, + {[...]string{}, [...]string{"1", "2", "3"}, false}, + {[...]string{"1"}, [...]string{"1", "2", "3"}, false}, + {[...]string{"1", "2", "3"}, [...]string{}, false}, + {[...]string{"1", "2", "3"}, [...]string{"1", "2", "3"}, true}, + {map[string]int{"foo": 1}, map[string]int{}, false}, + {map[string]int{"foo": 1}, map[string]int{"foo": 2}, true}, + {map[string]int{"foo": 2}, map[string]int{"foo": 1}, false}, + {map[string]int{"foo": 1}, map[string]int{"foo": 2, "bar": 6}, false}, + {map[string]int{"foo": 1, "bar": 6}, map[string]int{"foo": 2}, false}, + {map[string]int{}, map[string]int(nil), true}, + {[]string(nil), []string(nil), true}, + {[]string{}, []string(nil), true}, + {[]string(nil), []string{}, true}, + {[]string{"1"}, []string(nil), false}, + {[]string{}, []string{"1", "2", "3"}, false}, + {[]string{"1"}, []string{"1", "2", "3"}, false}, + {[]string{"1", "2", "3"}, []string{}, false}, + } + + for _, item := range table { + if e, a := item.equal, e.DeepEqual(item.a, item.b); e != a { + t.Errorf("Expected (%+v == %+v) == %v, but got %v", item.a, item.b, e, a) + } + } +} + +func TestDerivates(t *testing.T) { + e := Equalities{} + type Bar struct { + X int + } + type Baz struct { + Y Bar + } + err := e.AddFuncs( + func(a, b int) bool { + return a+1 == b + }, + func(a, b Bar) bool { + return a.X*10 == b.X + }, + ) + if err != nil { + t.Fatalf("Unexpected: %v", err) + } + + type Foo struct { + X int + } + + table := []struct { + a, b interface{} + equal bool + }{ + {1, 2, true}, + {2, 1, false}, + {"foo", "fo", false}, + {"foo", "foo", true}, + {"foo", "foobar", false}, + {Foo{1}, Foo{2}, true}, + {Foo{2}, Foo{1}, false}, + {Bar{1}, Bar{10}, true}, + {&Bar{1}, &Bar{10}, true}, + {Baz{Bar{1}}, Baz{Bar{10}}, true}, + {[...]string{}, [...]string{"1", "2", "3"}, false}, + {[...]string{"1"}, [...]string{"1", "2", "3"}, false}, + {[...]string{"1", "2", "3"}, [...]string{}, false}, + {[...]string{"1", "2", "3"}, [...]string{"1", "2", "3"}, true}, + {map[string]int{"foo": 1}, map[string]int{}, false}, + {map[string]int{"foo": 1}, map[string]int{"foo": 2}, true}, + {map[string]int{"foo": 2}, map[string]int{"foo": 1}, false}, + {map[string]int{"foo": 1}, map[string]int{"foo": 2, "bar": 6}, true}, + {map[string]int{"foo": 1, "bar": 6}, map[string]int{"foo": 2}, false}, + {map[string]int{}, map[string]int(nil), true}, + {[]string(nil), []string(nil), true}, + {[]string{}, []string(nil), true}, + {[]string(nil), []string{}, true}, + {[]string{"1"}, []string(nil), false}, + {[]string{}, []string{"1", "2", "3"}, true}, + {[]string{"1"}, []string{"1", "2", "3"}, true}, + {[]string{"1", "2", "3"}, []string{}, false}, + } + + for _, item := range table { + if e, a := item.equal, e.DeepDerivative(item.a, item.b); e != a { + t.Errorf("Expected (%+v ~ %+v) == %v, but got %v", item.a, item.b, e, a) + } + } +} diff --git a/vendor/k8s.io/apiserver/.import-restrictions b/vendor/k8s.io/apiserver/.import-restrictions new file mode 100644 index 000000000..c80e742d5 --- /dev/null +++ b/vendor/k8s.io/apiserver/.import-restrictions @@ -0,0 +1,10 @@ +{ + "Rules": [ + { + "SelectorRegexp": "k8s[.]io/kubernetes", + "ForbiddenPrefixes": [ + "" + ] + } + ] +} diff --git a/vendor/k8s.io/apiserver/OWNERS b/vendor/k8s.io/apiserver/OWNERS new file mode 100644 index 000000000..52f250446 --- /dev/null +++ b/vendor/k8s.io/apiserver/OWNERS @@ -0,0 +1,18 @@ +approvers: +- lavalamp +- smarterclayton +- deads2k +- sttts +- liggitt +reviewers: +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- caesarxuchao +- liggitt +- sttts +- ncdc +- tallclair +- timothysc +- enj diff --git a/vendor/k8s.io/apiserver/README.md b/vendor/k8s.io/apiserver/README.md new file mode 100644 index 000000000..96927ae70 --- /dev/null +++ b/vendor/k8s.io/apiserver/README.md @@ -0,0 +1,30 @@ +# apiserver + +Generic library for building a Kubernetes aggregated API server. + + +## Purpose + +This library contains code to create Kubernetes aggregation server complete with delegated authentication and authorization, +`kubectl` compatible discovery information, optional admission chain, and versioned types. It's first consumers are +`k8s.io/kubernetes`, `k8s.io/kube-aggregator`, and `github.com/kubernetes-incubator/service-catalog`. + + +## Compatibility + +There are *NO compatibility guarantees* for this repository, yet. It is in direct support of Kubernetes, so branches +will track Kubernetes and be compatible with that repo. As we more cleanly separate the layers, we will review the +compatibility guarantee. We have a goal to make this easier to use in 2017. + + +## Where does it come from? + +`apiserver` is synced from https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apiserver. +Code changes are made in that location, merged into `k8s.io/kubernetes` and later synced here. + + +## Things you should *NOT* do + + 1. Directly modify any files under `pkg` in this repo. Those are driven from `k8s.io/kuberenetes/staging/src/k8s.io/apiserver`. + 2. Expect compatibility. This repo is changing quickly in direct support of + Kubernetes and the API isn't yet stable enough for API guarantees. diff --git a/vendor/k8s.io/apiserver/pkg/authentication/serviceaccount/util_test.go b/vendor/k8s.io/apiserver/pkg/authentication/serviceaccount/util_test.go new file mode 100644 index 000000000..14784b16c --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/authentication/serviceaccount/util_test.go @@ -0,0 +1,82 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package serviceaccount + +import "testing" + +func TestMakeUsername(t *testing.T) { + + testCases := map[string]struct { + Namespace string + Name string + ExpectedErr bool + }{ + "valid": { + Namespace: "foo", + Name: "bar", + ExpectedErr: false, + }, + "empty": { + ExpectedErr: true, + }, + "empty namespace": { + Namespace: "", + Name: "foo", + ExpectedErr: true, + }, + "empty name": { + Namespace: "foo", + Name: "", + ExpectedErr: true, + }, + "extra segments": { + Namespace: "foo", + Name: "bar:baz", + ExpectedErr: true, + }, + "invalid chars in namespace": { + Namespace: "foo ", + Name: "bar", + ExpectedErr: true, + }, + "invalid chars in name": { + Namespace: "foo", + Name: "bar ", + ExpectedErr: true, + }, + } + + for k, tc := range testCases { + username := MakeUsername(tc.Namespace, tc.Name) + + namespace, name, err := SplitUsername(username) + if (err != nil) != tc.ExpectedErr { + t.Errorf("%s: Expected error=%v, got %v", k, tc.ExpectedErr, err) + continue + } + if err != nil { + continue + } + + if namespace != tc.Namespace { + t.Errorf("%s: Expected namespace %q, got %q", k, tc.Namespace, namespace) + } + if name != tc.Name { + t.Errorf("%s: Expected name %q, got %q", k, tc.Name, name) + } + } +} diff --git a/vendor/k8s.io/apiserver/pkg/server/BUILD b/vendor/k8s.io/apiserver/pkg/server/BUILD new file mode 100644 index 000000000..e4ae0d178 --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/server/BUILD @@ -0,0 +1,135 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", + "go_test", +) + +go_test( + name = "go_default_test", + srcs = [ + "config_selfclient_test.go", + "config_test.go", + "genericapiserver_test.go", + ], + library = ":go_default_library", + deps = [ + "//vendor/github.com/stretchr/testify/assert:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apimachinery:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/version:go_default_library", + "//vendor/k8s.io/apiserver/pkg/apis/example:go_default_library", + "//vendor/k8s.io/apiserver/pkg/apis/example/v1:go_default_library", + "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", + "//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", + "//vendor/k8s.io/apiserver/pkg/endpoints/discovery:go_default_library", + "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", + "//vendor/k8s.io/apiserver/pkg/registry/rest:go_default_library", + "//vendor/k8s.io/apiserver/pkg/server/healthz:go_default_library", + "//vendor/k8s.io/apiserver/pkg/storage/etcd/testing:go_default_library", + "//vendor/k8s.io/client-go/informers:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/fake:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + "//vendor/k8s.io/kube-openapi/pkg/common:go_default_library", + ], +) + +go_library( + name = "go_default_library", + srcs = [ + "config.go", + "config_selfclient.go", + "doc.go", + "genericapiserver.go", + "handler.go", + "healthz.go", + "hooks.go", + "plugins.go", + "serve.go", + "signal.go", + "signal_posix.go", + ] + select({ + "@io_bazel_rules_go//go/platform:windows_amd64": [ + "signal_windows.go", + ], + "//conditions:default": [], + }), + deps = [ + "//vendor/github.com/coreos/go-systemd/daemon:go_default_library", + "//vendor/github.com/emicklei/go-restful:go_default_library", + "//vendor/github.com/emicklei/go-restful-swagger12:go_default_library", + "//vendor/github.com/go-openapi/spec:go_default_library", + "//vendor/github.com/golang/glog:go_default_library", + "//vendor/github.com/pborman/uuid:go_default_library", + "//vendor/github.com/pkg/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apimachinery:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/validation:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/version:go_default_library", + "//vendor/k8s.io/apiserver/pkg/admission:go_default_library", + "//vendor/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle:go_default_library", + "//vendor/k8s.io/apiserver/pkg/apis/apiserver/install:go_default_library", + "//vendor/k8s.io/apiserver/pkg/audit:go_default_library", + "//vendor/k8s.io/apiserver/pkg/audit/policy:go_default_library", + "//vendor/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library", + "//vendor/k8s.io/apiserver/pkg/authentication/authenticatorfactory:go_default_library", + "//vendor/k8s.io/apiserver/pkg/authentication/request/union:go_default_library", + "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", + "//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", + "//vendor/k8s.io/apiserver/pkg/authorization/authorizerfactory:go_default_library", + "//vendor/k8s.io/apiserver/pkg/authorization/union:go_default_library", + "//vendor/k8s.io/apiserver/pkg/endpoints:go_default_library", + "//vendor/k8s.io/apiserver/pkg/endpoints/discovery:go_default_library", + "//vendor/k8s.io/apiserver/pkg/endpoints/filters:go_default_library", + "//vendor/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters:go_default_library", + "//vendor/k8s.io/apiserver/pkg/endpoints/openapi:go_default_library", + "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", + "//vendor/k8s.io/apiserver/pkg/features:go_default_library", + "//vendor/k8s.io/apiserver/pkg/registry/generic:go_default_library", + "//vendor/k8s.io/apiserver/pkg/registry/rest:go_default_library", + "//vendor/k8s.io/apiserver/pkg/server/filters:go_default_library", + "//vendor/k8s.io/apiserver/pkg/server/healthz:go_default_library", + "//vendor/k8s.io/apiserver/pkg/server/mux:go_default_library", + "//vendor/k8s.io/apiserver/pkg/server/routes:go_default_library", + "//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library", + "//vendor/k8s.io/client-go/informers:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + "//vendor/k8s.io/client-go/util/cert:go_default_library", + "//vendor/k8s.io/kube-openapi/pkg/common:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [ + ":package-srcs", + "//staging/src/k8s.io/apiserver/pkg/server/filters:all-srcs", + "//staging/src/k8s.io/apiserver/pkg/server/healthz:all-srcs", + "//staging/src/k8s.io/apiserver/pkg/server/httplog:all-srcs", + "//staging/src/k8s.io/apiserver/pkg/server/mux:all-srcs", + "//staging/src/k8s.io/apiserver/pkg/server/options:all-srcs", + "//staging/src/k8s.io/apiserver/pkg/server/routes:all-srcs", + "//staging/src/k8s.io/apiserver/pkg/server/storage:all-srcs", + ], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/apiserver/pkg/server/config.go b/vendor/k8s.io/apiserver/pkg/server/config.go new file mode 100644 index 000000000..69c0e4497 --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/server/config.go @@ -0,0 +1,573 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package server + +import ( + "crypto/tls" + "crypto/x509" + "fmt" + "io" + "net" + "net/http" + goruntime "runtime" + "sort" + "strconv" + "strings" + "time" + + "github.com/emicklei/go-restful-swagger12" + "github.com/go-openapi/spec" + "github.com/pborman/uuid" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/version" + "k8s.io/apiserver/pkg/admission" + "k8s.io/apiserver/pkg/audit" + auditpolicy "k8s.io/apiserver/pkg/audit/policy" + "k8s.io/apiserver/pkg/authentication/authenticator" + "k8s.io/apiserver/pkg/authentication/authenticatorfactory" + authenticatorunion "k8s.io/apiserver/pkg/authentication/request/union" + "k8s.io/apiserver/pkg/authentication/user" + "k8s.io/apiserver/pkg/authorization/authorizer" + "k8s.io/apiserver/pkg/authorization/authorizerfactory" + authorizerunion "k8s.io/apiserver/pkg/authorization/union" + "k8s.io/apiserver/pkg/endpoints/discovery" + genericapifilters "k8s.io/apiserver/pkg/endpoints/filters" + apiopenapi "k8s.io/apiserver/pkg/endpoints/openapi" + apirequest "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/apiserver/pkg/features" + genericregistry "k8s.io/apiserver/pkg/registry/generic" + genericfilters "k8s.io/apiserver/pkg/server/filters" + "k8s.io/apiserver/pkg/server/healthz" + "k8s.io/apiserver/pkg/server/routes" + utilfeature "k8s.io/apiserver/pkg/util/feature" + "k8s.io/client-go/informers" + restclient "k8s.io/client-go/rest" + certutil "k8s.io/client-go/util/cert" + openapicommon "k8s.io/kube-openapi/pkg/common" + + // install apis + _ "k8s.io/apiserver/pkg/apis/apiserver/install" +) + +const ( + // DefaultLegacyAPIPrefix is where the the legacy APIs will be located. + DefaultLegacyAPIPrefix = "/api" + + // APIGroupPrefix is where non-legacy API group will be located. + APIGroupPrefix = "/apis" +) + +// Config is a structure used to configure a GenericAPIServer. +// Its members are sorted roughly in order of importance for composers. +type Config struct { + // SecureServingInfo is required to serve https + SecureServingInfo *SecureServingInfo + + // LoopbackClientConfig is a config for a privileged loopback connection to the API server + // This is required for proper functioning of the PostStartHooks on a GenericAPIServer + LoopbackClientConfig *restclient.Config + // Authenticator determines which subject is making the request + Authenticator authenticator.Request + // Authorizer determines whether the subject is allowed to make the request based only + // on the RequestURI + Authorizer authorizer.Authorizer + // RuleResolver is required to get the list of rules that apply to a given user + // in a given namespace + RuleResolver authorizer.RuleResolver + // AdmissionControl performs deep inspection of a given request (including content) + // to set values and determine whether its allowed + AdmissionControl admission.Interface + CorsAllowedOriginList []string + + EnableSwaggerUI bool + EnableIndex bool + EnableProfiling bool + EnableDiscovery bool + // Requires generic profiling enabled + EnableContentionProfiling bool + EnableMetrics bool + + DisabledPostStartHooks sets.String + + // Version will enable the /version endpoint if non-nil + Version *version.Info + // LegacyAuditWriter is the destination for audit logs. If nil, they will not be written. + LegacyAuditWriter io.Writer + // AuditBackend is where audit events are sent to. + AuditBackend audit.Backend + // AuditPolicyChecker makes the decision of whether and how to audit log a request. + AuditPolicyChecker auditpolicy.Checker + // SupportsBasicAuth indicates that's at least one Authenticator supports basic auth + // If this is true, a basic auth challenge is returned on authentication failure + // TODO(roberthbailey): Remove once the server no longer supports http basic auth. + SupportsBasicAuth bool + // ExternalAddress is the host name to use for external (public internet) facing URLs (e.g. Swagger) + // Will default to a value based on secure serving info and available ipv4 IPs. + ExternalAddress string + + //=========================================================================== + // Fields you probably don't care about changing + //=========================================================================== + + // BuildHandlerChainFunc allows you to build custom handler chains by decorating the apiHandler. + BuildHandlerChainFunc func(apiHandler http.Handler, c *Config) (secure http.Handler) + // DiscoveryAddresses is used to build the IPs pass to discovery. If nil, the ExternalAddress is + // always reported + DiscoveryAddresses discovery.Addresses + // The default set of healthz checks. There might be more added via AddHealthzChecks dynamically. + HealthzChecks []healthz.HealthzChecker + // LegacyAPIGroupPrefixes is used to set up URL parsing for authorization and for validating requests + // to InstallLegacyAPIGroup. New API servers don't generally have legacy groups at all. + LegacyAPIGroupPrefixes sets.String + // RequestContextMapper maps requests to contexts. Exported so downstream consumers can provider their own mappers + // TODO confirm that anyone downstream actually uses this and doesn't just need an accessor + RequestContextMapper apirequest.RequestContextMapper + // RequestInfoResolver is used to assign attributes (used by admission and authorization) based on a request URL. + // Use-cases that are like kubelets may need to customize this. + RequestInfoResolver apirequest.RequestInfoResolver + // Serializer is required and provides the interface for serializing and converting objects to and from the wire + // The default (api.Codecs) usually works fine. + Serializer runtime.NegotiatedSerializer + // OpenAPIConfig will be used in generating OpenAPI spec. This is nil by default. Use DefaultOpenAPIConfig for "working" defaults. + OpenAPIConfig *openapicommon.Config + // SwaggerConfig will be used in generating Swagger spec. This is nil by default. Use DefaultSwaggerConfig for "working" defaults. + SwaggerConfig *swagger.Config + + // RESTOptionsGetter is used to construct RESTStorage types via the generic registry. + RESTOptionsGetter genericregistry.RESTOptionsGetter + + // If specified, all requests except those which match the LongRunningFunc predicate will timeout + // after this duration. + RequestTimeout time.Duration + // If specified, long running requests such as watch will be allocated a random timeout between this value, and + // twice this value. Note that it is up to the request handlers to ignore or honor this timeout. In seconds. + MinRequestTimeout int + // MaxRequestsInFlight is the maximum number of parallel non-long-running requests. Every further + // request has to wait. Applies only to non-mutating requests. + MaxRequestsInFlight int + // MaxMutatingRequestsInFlight is the maximum number of parallel mutating requests. Every further + // request has to wait. + MaxMutatingRequestsInFlight int + // Predicate which is true for paths of long-running http requests + LongRunningFunc apirequest.LongRunningRequestCheck + + // EnableAPIResponseCompression indicates whether API Responses should support compression + // if the client requests it via Accept-Encoding + EnableAPIResponseCompression bool + + //=========================================================================== + // values below here are targets for removal + //=========================================================================== + + // The port on PublicAddress where a read-write server will be installed. + // Defaults to 6443 if not set. + ReadWritePort int + // PublicAddress is the IP address where members of the cluster (kubelet, + // kube-proxy, services, etc.) can reach the GenericAPIServer. + // If nil or 0.0.0.0, the host's default interface will be used. + PublicAddress net.IP +} + +type RecommendedConfig struct { + Config + + // SharedInformerFactory provides shared informers for Kubernetes resources. This value is set by + // RecommendedOptions.CoreAPI.ApplyTo called by RecommendedOptions.ApplyTo. It uses an in-cluster client config + // by default, or the kubeconfig given with kubeconfig command line flag. + SharedInformerFactory informers.SharedInformerFactory +} + +type SecureServingInfo struct { + // BindAddress is the ip:port to serve on + BindAddress string + // BindNetwork is the type of network to bind to - defaults to "tcp", accepts "tcp", + // "tcp4", and "tcp6". + BindNetwork string + + // Cert is the main server cert which is used if SNI does not match. Cert must be non-nil and is + // allowed to be in SNICerts. + Cert *tls.Certificate + + // CACert is an optional certificate authority used for the loopback connection of the Admission controllers. + // If this is nil, the certificate authority is extracted from Cert or a matching SNI certificate. + CACert *tls.Certificate + + // SNICerts are the TLS certificates by name used for SNI. + SNICerts map[string]*tls.Certificate + + // ClientCA is the certificate bundle for all the signers that you'll recognize for incoming client certificates + ClientCA *x509.CertPool + + // MinTLSVersion optionally overrides the minimum TLS version supported. + // Values are from tls package constants (https://golang.org/pkg/crypto/tls/#pkg-constants). + MinTLSVersion uint16 + + // CipherSuites optionally overrides the list of allowed cipher suites for the server. + // Values are from tls package constants (https://golang.org/pkg/crypto/tls/#pkg-constants). + CipherSuites []uint16 +} + +// NewConfig returns a Config struct with the default values +func NewConfig(codecs serializer.CodecFactory) *Config { + return &Config{ + Serializer: codecs, + ReadWritePort: 443, + RequestContextMapper: apirequest.NewRequestContextMapper(), + BuildHandlerChainFunc: DefaultBuildHandlerChain, + LegacyAPIGroupPrefixes: sets.NewString(DefaultLegacyAPIPrefix), + DisabledPostStartHooks: sets.NewString(), + HealthzChecks: []healthz.HealthzChecker{healthz.PingHealthz}, + EnableIndex: true, + EnableDiscovery: true, + EnableProfiling: true, + MaxRequestsInFlight: 400, + MaxMutatingRequestsInFlight: 200, + RequestTimeout: time.Duration(60) * time.Second, + MinRequestTimeout: 1800, + EnableAPIResponseCompression: utilfeature.DefaultFeatureGate.Enabled(features.APIResponseCompression), + + // Default to treating watch as a long-running operation + // Generic API servers have no inherent long-running subresources + LongRunningFunc: genericfilters.BasicLongRunningRequestCheck(sets.NewString("watch"), sets.NewString()), + } +} + +// NewRecommendedConfig returns a RecommendedConfig struct with the default values +func NewRecommendedConfig(codecs serializer.CodecFactory) *RecommendedConfig { + return &RecommendedConfig{ + Config: *NewConfig(codecs), + } +} + +func DefaultOpenAPIConfig(getDefinitions openapicommon.GetOpenAPIDefinitions, scheme *runtime.Scheme) *openapicommon.Config { + defNamer := apiopenapi.NewDefinitionNamer(scheme) + return &openapicommon.Config{ + ProtocolList: []string{"https"}, + IgnorePrefixes: []string{"/swaggerapi"}, + Info: &spec.Info{ + InfoProps: spec.InfoProps{ + Title: "Generic API Server", + }, + }, + DefaultResponse: &spec.Response{ + ResponseProps: spec.ResponseProps{ + Description: "Default Response.", + }, + }, + GetOperationIDAndTags: apiopenapi.GetOperationIDAndTags, + GetDefinitionName: defNamer.GetDefinitionName, + GetDefinitions: getDefinitions, + } +} + +// DefaultSwaggerConfig returns a default configuration without WebServiceURL and +// WebServices set. +func DefaultSwaggerConfig() *swagger.Config { + return &swagger.Config{ + ApiPath: "/swaggerapi", + SwaggerPath: "/swaggerui/", + SwaggerFilePath: "/swagger-ui/", + SchemaFormatHandler: func(typeName string) string { + switch typeName { + case "metav1.Time", "*metav1.Time": + return "date-time" + } + return "" + }, + } +} + +func (c *Config) ApplyClientCert(clientCAFile string) (*Config, error) { + if c.SecureServingInfo != nil { + if len(clientCAFile) > 0 { + clientCAs, err := certutil.CertsFromFile(clientCAFile) + if err != nil { + return nil, fmt.Errorf("unable to load client CA file: %v", err) + } + if c.SecureServingInfo.ClientCA == nil { + c.SecureServingInfo.ClientCA = x509.NewCertPool() + } + for _, cert := range clientCAs { + c.SecureServingInfo.ClientCA.AddCert(cert) + } + } + } + + return c, nil +} + +type completedConfig struct { + *Config + + //=========================================================================== + // values below here are filled in during completion + //=========================================================================== + + // SharedInformerFactory provides shared informers for resources + SharedInformerFactory informers.SharedInformerFactory +} + +type CompletedConfig struct { + // Embed a private pointer that cannot be instantiated outside of this package. + *completedConfig +} + +// Complete fills in any fields not set that are required to have valid data and can be derived +// from other fields. If you're going to `ApplyOptions`, do that first. It's mutating the receiver. +func (c *Config) Complete(informers informers.SharedInformerFactory) CompletedConfig { + if len(c.ExternalAddress) == 0 && c.PublicAddress != nil { + hostAndPort := c.PublicAddress.String() + if c.ReadWritePort != 0 { + hostAndPort = net.JoinHostPort(hostAndPort, strconv.Itoa(c.ReadWritePort)) + } + c.ExternalAddress = hostAndPort + } + if c.OpenAPIConfig != nil && c.OpenAPIConfig.SecurityDefinitions != nil { + // Setup OpenAPI security: all APIs will have the same authentication for now. + c.OpenAPIConfig.DefaultSecurity = []map[string][]string{} + keys := []string{} + for k := range *c.OpenAPIConfig.SecurityDefinitions { + keys = append(keys, k) + } + sort.Strings(keys) + for _, k := range keys { + c.OpenAPIConfig.DefaultSecurity = append(c.OpenAPIConfig.DefaultSecurity, map[string][]string{k: {}}) + } + if c.OpenAPIConfig.CommonResponses == nil { + c.OpenAPIConfig.CommonResponses = map[int]spec.Response{} + } + if _, exists := c.OpenAPIConfig.CommonResponses[http.StatusUnauthorized]; !exists { + c.OpenAPIConfig.CommonResponses[http.StatusUnauthorized] = spec.Response{ + ResponseProps: spec.ResponseProps{ + Description: "Unauthorized", + }, + } + } + + if c.OpenAPIConfig.Info == nil { + c.OpenAPIConfig.Info = &spec.Info{} + } + if c.OpenAPIConfig.Info.Version == "" { + if c.Version != nil { + c.OpenAPIConfig.Info.Version = strings.Split(c.Version.String(), "-")[0] + } else { + c.OpenAPIConfig.Info.Version = "unversioned" + } + } + } + if c.SwaggerConfig != nil && len(c.SwaggerConfig.WebServicesUrl) == 0 { + if c.SecureServingInfo != nil { + c.SwaggerConfig.WebServicesUrl = "https://" + c.ExternalAddress + } else { + c.SwaggerConfig.WebServicesUrl = "http://" + c.ExternalAddress + } + } + if c.DiscoveryAddresses == nil { + c.DiscoveryAddresses = discovery.DefaultAddresses{DefaultAddress: c.ExternalAddress} + } + + // If the loopbackclientconfig is specified AND it has a token for use against the API server + // wrap the authenticator and authorizer in loopback authentication logic + if c.Authenticator != nil && c.Authorizer != nil && c.LoopbackClientConfig != nil && len(c.LoopbackClientConfig.BearerToken) > 0 { + privilegedLoopbackToken := c.LoopbackClientConfig.BearerToken + var uid = uuid.NewRandom().String() + tokens := make(map[string]*user.DefaultInfo) + tokens[privilegedLoopbackToken] = &user.DefaultInfo{ + Name: user.APIServerUser, + UID: uid, + Groups: []string{user.SystemPrivilegedGroup}, + } + + tokenAuthenticator := authenticatorfactory.NewFromTokens(tokens) + c.Authenticator = authenticatorunion.New(tokenAuthenticator, c.Authenticator) + + tokenAuthorizer := authorizerfactory.NewPrivilegedGroups(user.SystemPrivilegedGroup) + c.Authorizer = authorizerunion.New(tokenAuthorizer, c.Authorizer) + } + + if c.RequestInfoResolver == nil { + c.RequestInfoResolver = NewRequestInfoResolver(c) + } + + return CompletedConfig{&completedConfig{c, informers}} +} + +// Complete fills in any fields not set that are required to have valid data and can be derived +// from other fields. If you're going to `ApplyOptions`, do that first. It's mutating the receiver. +func (c *RecommendedConfig) Complete() CompletedConfig { + return c.Config.Complete(c.SharedInformerFactory) +} + +// New creates a new server which logically combines the handling chain with the passed server. +// name is used to differentiate for logging. The handler chain in particular can be difficult as it starts delgating. +func (c completedConfig) New(name string, delegationTarget DelegationTarget) (*GenericAPIServer, error) { + // The delegationTarget and the config must agree on the RequestContextMapper + + if c.Serializer == nil { + return nil, fmt.Errorf("Genericapiserver.New() called with config.Serializer == nil") + } + if c.LoopbackClientConfig == nil { + return nil, fmt.Errorf("Genericapiserver.New() called with config.LoopbackClientConfig == nil") + } + + handlerChainBuilder := func(handler http.Handler) http.Handler { + return c.BuildHandlerChainFunc(handler, c.Config) + } + apiServerHandler := NewAPIServerHandler(name, c.RequestContextMapper, c.Serializer, handlerChainBuilder, delegationTarget.UnprotectedHandler()) + + s := &GenericAPIServer{ + discoveryAddresses: c.DiscoveryAddresses, + LoopbackClientConfig: c.LoopbackClientConfig, + legacyAPIGroupPrefixes: c.LegacyAPIGroupPrefixes, + admissionControl: c.AdmissionControl, + requestContextMapper: c.RequestContextMapper, + Serializer: c.Serializer, + AuditBackend: c.AuditBackend, + delegationTarget: delegationTarget, + + minRequestTimeout: time.Duration(c.MinRequestTimeout) * time.Second, + + SecureServingInfo: c.SecureServingInfo, + ExternalAddress: c.ExternalAddress, + + Handler: apiServerHandler, + + listedPathProvider: apiServerHandler, + + swaggerConfig: c.SwaggerConfig, + openAPIConfig: c.OpenAPIConfig, + + postStartHooks: map[string]postStartHookEntry{}, + disabledPostStartHooks: c.DisabledPostStartHooks, + + healthzChecks: c.HealthzChecks, + + DiscoveryGroupManager: discovery.NewRootAPIsHandler(c.DiscoveryAddresses, c.Serializer, c.RequestContextMapper), + + enableAPIResponseCompression: c.EnableAPIResponseCompression, + } + + for k, v := range delegationTarget.PostStartHooks() { + s.postStartHooks[k] = v + } + + genericApiServerHookName := "generic-apiserver-start-informers" + if c.SharedInformerFactory != nil && !s.isHookRegistered(genericApiServerHookName) { + err := s.AddPostStartHook(genericApiServerHookName, func(context PostStartHookContext) error { + c.SharedInformerFactory.Start(context.StopCh) + return nil + }) + if err != nil { + return nil, err + } + } + for _, delegateCheck := range delegationTarget.HealthzChecks() { + skip := false + for _, existingCheck := range c.HealthzChecks { + if existingCheck.Name() == delegateCheck.Name() { + skip = true + break + } + } + if skip { + continue + } + + s.healthzChecks = append(s.healthzChecks, delegateCheck) + } + + s.listedPathProvider = routes.ListedPathProviders{s.listedPathProvider, delegationTarget} + + installAPI(s, c.Config) + + // use the UnprotectedHandler from the delegation target to ensure that we don't attempt to double authenticator, authorize, + // or some other part of the filter chain in delegation cases. + if delegationTarget.UnprotectedHandler() == nil && c.EnableIndex { + s.Handler.NonGoRestfulMux.NotFoundHandler(routes.IndexLister{ + StatusCode: http.StatusNotFound, + PathProvider: s.listedPathProvider, + }) + } + + return s, nil +} + +func DefaultBuildHandlerChain(apiHandler http.Handler, c *Config) http.Handler { + handler := genericapifilters.WithAuthorization(apiHandler, c.RequestContextMapper, c.Authorizer, c.Serializer) + handler = genericfilters.WithMaxInFlightLimit(handler, c.MaxRequestsInFlight, c.MaxMutatingRequestsInFlight, c.RequestContextMapper, c.LongRunningFunc) + handler = genericapifilters.WithImpersonation(handler, c.RequestContextMapper, c.Authorizer, c.Serializer) + if utilfeature.DefaultFeatureGate.Enabled(features.AdvancedAuditing) { + handler = genericapifilters.WithAudit(handler, c.RequestContextMapper, c.AuditBackend, c.AuditPolicyChecker, c.LongRunningFunc) + } else { + handler = genericapifilters.WithLegacyAudit(handler, c.RequestContextMapper, c.LegacyAuditWriter) + } + failedHandler := genericapifilters.Unauthorized(c.RequestContextMapper, c.Serializer, c.SupportsBasicAuth) + if utilfeature.DefaultFeatureGate.Enabled(features.AdvancedAuditing) { + failedHandler = genericapifilters.WithFailedAuthenticationAudit(failedHandler, c.RequestContextMapper, c.AuditBackend, c.AuditPolicyChecker) + } + handler = genericapifilters.WithAuthentication(handler, c.RequestContextMapper, c.Authenticator, failedHandler) + handler = genericfilters.WithCORS(handler, c.CorsAllowedOriginList, nil, nil, nil, "true") + handler = genericfilters.WithTimeoutForNonLongRunningRequests(handler, c.RequestContextMapper, c.LongRunningFunc, c.RequestTimeout) + handler = genericapifilters.WithRequestInfo(handler, c.RequestInfoResolver, c.RequestContextMapper) + handler = apirequest.WithRequestContext(handler, c.RequestContextMapper) + handler = genericfilters.WithPanicRecovery(handler) + return handler +} + +func installAPI(s *GenericAPIServer, c *Config) { + if c.EnableIndex { + routes.Index{}.Install(s.listedPathProvider, s.Handler.NonGoRestfulMux) + } + if c.SwaggerConfig != nil && c.EnableSwaggerUI { + routes.SwaggerUI{}.Install(s.Handler.NonGoRestfulMux) + } + if c.EnableProfiling { + routes.Profiling{}.Install(s.Handler.NonGoRestfulMux) + if c.EnableContentionProfiling { + goruntime.SetBlockProfileRate(1) + } + } + if c.EnableMetrics { + if c.EnableProfiling { + routes.MetricsWithReset{}.Install(s.Handler.NonGoRestfulMux) + } else { + routes.DefaultMetrics{}.Install(s.Handler.NonGoRestfulMux) + } + } + routes.Version{Version: c.Version}.Install(s.Handler.GoRestfulContainer) + + if c.EnableDiscovery { + s.Handler.GoRestfulContainer.Add(s.DiscoveryGroupManager.WebService()) + } +} + +func NewRequestInfoResolver(c *Config) *apirequest.RequestInfoFactory { + apiPrefixes := sets.NewString(strings.Trim(APIGroupPrefix, "/")) // all possible API prefixes + legacyAPIPrefixes := sets.String{} // APIPrefixes that won't have groups (legacy) + for legacyAPIPrefix := range c.LegacyAPIGroupPrefixes { + apiPrefixes.Insert(strings.Trim(legacyAPIPrefix, "/")) + legacyAPIPrefixes.Insert(strings.Trim(legacyAPIPrefix, "/")) + } + + return &apirequest.RequestInfoFactory{ + APIPrefixes: apiPrefixes, + GrouplessAPIPrefixes: legacyAPIPrefixes, + } +} diff --git a/vendor/k8s.io/apiserver/pkg/server/config_selfclient.go b/vendor/k8s.io/apiserver/pkg/server/config_selfclient.go new file mode 100644 index 000000000..5e37c1ad2 --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/server/config_selfclient.go @@ -0,0 +1,83 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package server + +import ( + "fmt" + "net" + + restclient "k8s.io/client-go/rest" +) + +// LoopbackClientServerNameOverride is passed to the apiserver from the loopback client in order to +// select the loopback certificate via SNI if TLS is used. +const LoopbackClientServerNameOverride = "apiserver-loopback-client" + +func (s *SecureServingInfo) NewLoopbackClientConfig(token string, loopbackCert []byte) (*restclient.Config, error) { + if s == nil || (s.Cert == nil && len(s.SNICerts) == 0) { + return nil, nil + } + + host, port, err := LoopbackHostPort(s.BindAddress) + if err != nil { + return nil, err + } + + return &restclient.Config{ + // Increase QPS limits. The client is currently passed to all admission plugins, + // and those can be throttled in case of higher load on apiserver - see #22340 and #22422 + // for more details. Once #22422 is fixed, we may want to remove it. + QPS: 50, + Burst: 100, + Host: "https://" + net.JoinHostPort(host, port), + BearerToken: token, + // override the ServerName to select our loopback certificate via SNI. This name is also + // used by the client to compare the returns server certificate against. + TLSClientConfig: restclient.TLSClientConfig{ + ServerName: LoopbackClientServerNameOverride, + CAData: loopbackCert, + }, + }, nil +} + +// LoopbackHostPort returns the host and port loopback REST clients should use +// to contact the server. +func LoopbackHostPort(bindAddress string) (string, string, error) { + host, port, err := net.SplitHostPort(bindAddress) + if err != nil { + // should never happen + return "", "", fmt.Errorf("invalid server bind address: %q", bindAddress) + } + + // Value is expected to be an IP or DNS name, not "0.0.0.0". + if host == "0.0.0.0" { + host = "localhost" + // Get ip of local interface, but fall back to "localhost". + // Note that "localhost" is resolved with the external nameserver first with Go's stdlib. + // So if localhost.<yoursearchdomain> resolves, we don't get a 127.0.0.1 as expected. + addrs, err := net.InterfaceAddrs() + if err == nil { + for _, address := range addrs { + if ipnet, ok := address.(*net.IPNet); ok && ipnet.IP.IsLoopback() { + host = ipnet.IP.String() + break + } + } + } + } + return host, port, nil +} diff --git a/vendor/k8s.io/apiserver/pkg/server/config_selfclient_test.go b/vendor/k8s.io/apiserver/pkg/server/config_selfclient_test.go new file mode 100644 index 000000000..a28e1937b --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/server/config_selfclient_test.go @@ -0,0 +1,46 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package server + +import ( + "net" + "testing" +) + +func TestLoopbackHostPort(t *testing.T) { + host, port, err := LoopbackHostPort("1.2.3.4:443") + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if host != "1.2.3.4" { + t.Fatalf("expected 1.2.3.4 as host, got %q", host) + } + if port != "443" { + t.Fatalf("expected 443 as port, got %q", port) + } + + host, port, err = LoopbackHostPort("0.0.0.0:443") + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if ip := net.ParseIP(host); ip == nil || !ip.IsLoopback() { + t.Fatalf("expected host to be loopback, got %q", host) + } + if port != "443" { + t.Fatalf("expected 443 as port, got %q", port) + } +} diff --git a/vendor/k8s.io/apiserver/pkg/server/config_test.go b/vendor/k8s.io/apiserver/pkg/server/config_test.go new file mode 100644 index 000000000..9f0ac45c5 --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/server/config_test.go @@ -0,0 +1,157 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package server + +import ( + "fmt" + "io/ioutil" + "net" + "net/http" + "net/http/httptest" + "net/http/httputil" + "testing" + + "k8s.io/apimachinery/pkg/util/sets" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/apiserver/pkg/server/healthz" + "k8s.io/client-go/informers" + "k8s.io/client-go/kubernetes/fake" + "k8s.io/client-go/rest" +) + +func TestNewWithDelegate(t *testing.T) { + delegateConfig := NewConfig(codecs) + delegateConfig.PublicAddress = net.ParseIP("192.168.10.4") + delegateConfig.RequestContextMapper = genericapirequest.NewRequestContextMapper() + delegateConfig.LegacyAPIGroupPrefixes = sets.NewString("/api") + delegateConfig.LoopbackClientConfig = &rest.Config{} + delegateConfig.SwaggerConfig = DefaultSwaggerConfig() + clientset := fake.NewSimpleClientset() + if clientset == nil { + t.Fatal("unable to create fake client set") + } + + delegateHealthzCalled := false + delegateConfig.HealthzChecks = append(delegateConfig.HealthzChecks, healthz.NamedCheck("delegate-health", func(r *http.Request) error { + delegateHealthzCalled = true + return fmt.Errorf("delegate failed healthcheck") + })) + + sharedInformers := informers.NewSharedInformerFactory(clientset, delegateConfig.LoopbackClientConfig.Timeout) + delegateServer, err := delegateConfig.Complete(sharedInformers).New("test", EmptyDelegate) + if err != nil { + t.Fatal(err) + } + delegateServer.Handler.NonGoRestfulMux.HandleFunc("/foo", func(w http.ResponseWriter, _ *http.Request) { + w.WriteHeader(http.StatusForbidden) + }) + + delegateServer.AddPostStartHook("delegate-post-start-hook", func(context PostStartHookContext) error { + return nil + }) + + // this wires up swagger + delegateServer.PrepareRun() + + wrappingConfig := NewConfig(codecs) + wrappingConfig.PublicAddress = net.ParseIP("192.168.10.4") + wrappingConfig.RequestContextMapper = genericapirequest.NewRequestContextMapper() + wrappingConfig.LegacyAPIGroupPrefixes = sets.NewString("/api") + wrappingConfig.LoopbackClientConfig = &rest.Config{} + wrappingConfig.SwaggerConfig = DefaultSwaggerConfig() + + wrappingHealthzCalled := false + wrappingConfig.HealthzChecks = append(wrappingConfig.HealthzChecks, healthz.NamedCheck("wrapping-health", func(r *http.Request) error { + wrappingHealthzCalled = true + return fmt.Errorf("wrapping failed healthcheck") + })) + + sharedInformers = informers.NewSharedInformerFactory(clientset, wrappingConfig.LoopbackClientConfig.Timeout) + wrappingServer, err := wrappingConfig.Complete(sharedInformers).New("test", delegateServer) + if err != nil { + t.Fatal(err) + } + wrappingServer.Handler.NonGoRestfulMux.HandleFunc("/bar", func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusUnauthorized) + }) + + wrappingServer.AddPostStartHook("wrapping-post-start-hook", func(context PostStartHookContext) error { + return nil + }) + + stopCh := make(chan struct{}) + defer close(stopCh) + wrappingServer.PrepareRun() + wrappingServer.RunPostStartHooks(stopCh) + + server := httptest.NewServer(wrappingServer.Handler) + defer server.Close() + + checkPath(server.URL, http.StatusOK, `{ + "paths": [ + "/apis", + "/bar", + "/foo", + "/healthz", + "/healthz/delegate-health", + "/healthz/ping", + "/healthz/poststarthook/delegate-post-start-hook", + "/healthz/poststarthook/generic-apiserver-start-informers", + "/healthz/poststarthook/wrapping-post-start-hook", + "/healthz/wrapping-health", + "/swaggerapi" + ] +}`, t) + checkPath(server.URL+"/healthz", http.StatusInternalServerError, `[+]ping ok +[-]wrapping-health failed: reason withheld +[-]delegate-health failed: reason withheld +[+]poststarthook/generic-apiserver-start-informers ok +[+]poststarthook/delegate-post-start-hook ok +[+]poststarthook/wrapping-post-start-hook ok +healthz check failed +`, t) + + checkPath(server.URL+"/healthz/delegate-health", http.StatusInternalServerError, `internal server error: delegate failed healthcheck +`, t) + checkPath(server.URL+"/healthz/wrapping-health", http.StatusInternalServerError, `internal server error: wrapping failed healthcheck +`, t) + checkPath(server.URL+"/healthz/poststarthook/delegate-post-start-hook", http.StatusOK, `ok`, t) + checkPath(server.URL+"/healthz/poststarthook/wrapping-post-start-hook", http.StatusOK, `ok`, t) + checkPath(server.URL+"/foo", http.StatusForbidden, ``, t) + checkPath(server.URL+"/bar", http.StatusUnauthorized, ``, t) +} + +func checkPath(url string, expectedStatusCode int, expectedBody string, t *testing.T) { + resp, err := http.Get(url) + if err != nil { + t.Fatal(err) + } + dump, _ := httputil.DumpResponse(resp, true) + t.Log(string(dump)) + + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + t.Fatal(err) + } + + if e, a := expectedBody, string(body); e != a { + t.Errorf("%q expected %v, got %v", url, e, a) + } + if e, a := expectedStatusCode, resp.StatusCode; e != a { + t.Errorf("%q expected %v, got %v", url, e, a) + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/master/ports/doc.go b/vendor/k8s.io/apiserver/pkg/server/doc.go similarity index 78% rename from vendor/k8s.io/kubernetes/pkg/master/ports/doc.go rename to vendor/k8s.io/apiserver/pkg/server/doc.go index a2a002101..b5f97c658 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/ports/doc.go +++ b/vendor/k8s.io/apiserver/pkg/server/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,5 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package ports defines ports used by various pieces of the kubernetes -// infrastructure. -package ports +// Package server contains the plumbing to create kubernetes-like API server command. +package server diff --git a/vendor/k8s.io/apiserver/pkg/server/genericapiserver.go b/vendor/k8s.io/apiserver/pkg/server/genericapiserver.go new file mode 100644 index 000000000..9be725d4e --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/server/genericapiserver.go @@ -0,0 +1,447 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package server + +import ( + "fmt" + "net/http" + "strings" + "sync" + "time" + + systemd "github.com/coreos/go-systemd/daemon" + "github.com/emicklei/go-restful-swagger12" + "github.com/golang/glog" + + "k8s.io/apimachinery/pkg/apimachinery" + "k8s.io/apimachinery/pkg/apimachinery/registered" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apiserver/pkg/admission" + "k8s.io/apiserver/pkg/audit" + genericapi "k8s.io/apiserver/pkg/endpoints" + "k8s.io/apiserver/pkg/endpoints/discovery" + apirequest "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/apiserver/pkg/registry/rest" + "k8s.io/apiserver/pkg/server/healthz" + "k8s.io/apiserver/pkg/server/routes" + restclient "k8s.io/client-go/rest" + openapicommon "k8s.io/kube-openapi/pkg/common" +) + +// Info about an API group. +type APIGroupInfo struct { + GroupMeta apimachinery.GroupMeta + // Info about the resources in this group. Its a map from version to resource to the storage. + VersionedResourcesStorageMap map[string]map[string]rest.Storage + // OptionsExternalVersion controls the APIVersion used for common objects in the + // schema like api.Status, api.DeleteOptions, and metav1.ListOptions. Other implementors may + // define a version "v1beta1" but want to use the Kubernetes "v1" internal objects. + // If nil, defaults to groupMeta.GroupVersion. + // TODO: Remove this when https://github.com/kubernetes/kubernetes/issues/19018 is fixed. + OptionsExternalVersion *schema.GroupVersion + // MetaGroupVersion defaults to "meta.k8s.io/v1" and is the scheme group version used to decode + // common API implementations like ListOptions. Future changes will allow this to vary by group + // version (for when the inevitable meta/v2 group emerges). + MetaGroupVersion *schema.GroupVersion + + // Scheme includes all of the types used by this group and how to convert between them (or + // to convert objects from outside of this group that are accepted in this API). + // TODO: replace with interfaces + Scheme *runtime.Scheme + // NegotiatedSerializer controls how this group encodes and decodes data + NegotiatedSerializer runtime.NegotiatedSerializer + // ParameterCodec performs conversions for query parameters passed to API calls + ParameterCodec runtime.ParameterCodec + + // SubresourceGroupVersionKind contains the GroupVersionKind overrides for each subresource that is + // accessible from this API group version. The GroupVersionKind is that of the external version of + // the subresource. The key of this map should be the path of the subresource. The keys here should + // match the keys in the Storage map above for subresources. + SubresourceGroupVersionKind map[string]schema.GroupVersionKind +} + +// GenericAPIServer contains state for a Kubernetes cluster api server. +type GenericAPIServer struct { + // discoveryAddresses is used to build cluster IPs for discovery. + discoveryAddresses discovery.Addresses + + // LoopbackClientConfig is a config for a privileged loopback connection to the API server + LoopbackClientConfig *restclient.Config + + // minRequestTimeout is how short the request timeout can be. This is used to build the RESTHandler + minRequestTimeout time.Duration + + // legacyAPIGroupPrefixes is used to set up URL parsing for authorization and for validating requests + // to InstallLegacyAPIGroup + legacyAPIGroupPrefixes sets.String + + // admissionControl is used to build the RESTStorage that backs an API Group. + admissionControl admission.Interface + + // requestContextMapper provides a way to get the context for a request. It may be nil. + requestContextMapper apirequest.RequestContextMapper + + SecureServingInfo *SecureServingInfo + + // numerical ports, set after listening + effectiveSecurePort int + + // ExternalAddress is the address (hostname or IP and port) that should be used in + // external (public internet) URLs for this GenericAPIServer. + ExternalAddress string + + // Serializer controls how common API objects not in a group/version prefix are serialized for this server. + // Individual APIGroups may define their own serializers. + Serializer runtime.NegotiatedSerializer + + // "Outputs" + // Handler holds the handlers being used by this API server + Handler *APIServerHandler + + // listedPathProvider is a lister which provides the set of paths to show at / + listedPathProvider routes.ListedPathProvider + + // DiscoveryGroupManager serves /apis + DiscoveryGroupManager discovery.GroupManager + + // Enable swagger and/or OpenAPI if these configs are non-nil. + swaggerConfig *swagger.Config + openAPIConfig *openapicommon.Config + + // PostStartHooks are each called after the server has started listening, in a separate go func for each + // with no guarantee of ordering between them. The map key is a name used for error reporting. + // It may kill the process with a panic if it wishes to by returning an error. + postStartHookLock sync.Mutex + postStartHooks map[string]postStartHookEntry + postStartHooksCalled bool + disabledPostStartHooks sets.String + + // healthz checks + healthzLock sync.Mutex + healthzChecks []healthz.HealthzChecker + healthzCreated bool + + // auditing. The backend is started after the server starts listening. + AuditBackend audit.Backend + + // enableAPIResponseCompression indicates whether API Responses should support compression + // if the client requests it via Accept-Encoding + enableAPIResponseCompression bool + + // delegationTarget is the next delegate in the chain or nil + delegationTarget DelegationTarget +} + +// DelegationTarget is an interface which allows for composition of API servers with top level handling that works +// as expected. +type DelegationTarget interface { + // UnprotectedHandler returns a handler that is NOT protected by a normal chain + UnprotectedHandler() http.Handler + + // RequestContextMapper returns the existing RequestContextMapper. Because we cannot rewire all existing + // uses of this function, this will be used in any delegating API server + RequestContextMapper() apirequest.RequestContextMapper + + // PostStartHooks returns the post-start hooks that need to be combined + PostStartHooks() map[string]postStartHookEntry + + // HealthzChecks returns the healthz checks that need to be combined + HealthzChecks() []healthz.HealthzChecker + + // ListedPaths returns the paths for supporting an index + ListedPaths() []string + + // NextDelegate returns the next delegationTarget in the chain of delegations + NextDelegate() DelegationTarget +} + +func (s *GenericAPIServer) UnprotectedHandler() http.Handler { + // when we delegate, we need the server we're delegating to choose whether or not to use gorestful + return s.Handler.Director +} +func (s *GenericAPIServer) PostStartHooks() map[string]postStartHookEntry { + return s.postStartHooks +} +func (s *GenericAPIServer) HealthzChecks() []healthz.HealthzChecker { + return s.healthzChecks +} +func (s *GenericAPIServer) ListedPaths() []string { + return s.listedPathProvider.ListedPaths() +} + +func (s *GenericAPIServer) NextDelegate() DelegationTarget { + return s.delegationTarget +} + +var EmptyDelegate = emptyDelegate{ + requestContextMapper: apirequest.NewRequestContextMapper(), +} + +type emptyDelegate struct { + requestContextMapper apirequest.RequestContextMapper +} + +func (s emptyDelegate) UnprotectedHandler() http.Handler { + return nil +} +func (s emptyDelegate) PostStartHooks() map[string]postStartHookEntry { + return map[string]postStartHookEntry{} +} +func (s emptyDelegate) HealthzChecks() []healthz.HealthzChecker { + return []healthz.HealthzChecker{} +} +func (s emptyDelegate) ListedPaths() []string { + return []string{} +} +func (s emptyDelegate) RequestContextMapper() apirequest.RequestContextMapper { + return s.requestContextMapper +} +func (s emptyDelegate) NextDelegate() DelegationTarget { + return nil +} + +// RequestContextMapper is exposed so that third party resource storage can be build in a different location. +// TODO refactor third party resource storage +func (s *GenericAPIServer) RequestContextMapper() apirequest.RequestContextMapper { + return s.requestContextMapper +} + +// MinRequestTimeout is exposed so that third party resource storage can be build in a different location. +// TODO refactor third party resource storage +func (s *GenericAPIServer) MinRequestTimeout() time.Duration { + return s.minRequestTimeout +} + +type preparedGenericAPIServer struct { + *GenericAPIServer +} + +// PrepareRun does post API installation setup steps. +func (s *GenericAPIServer) PrepareRun() preparedGenericAPIServer { + if s.swaggerConfig != nil { + routes.Swagger{Config: s.swaggerConfig}.Install(s.Handler.GoRestfulContainer) + } + if s.openAPIConfig != nil { + routes.OpenAPI{ + Config: s.openAPIConfig, + }.Install(s.Handler.GoRestfulContainer, s.Handler.NonGoRestfulMux) + } + + s.installHealthz() + + return preparedGenericAPIServer{s} +} + +// Run spawns the secure http server. It only returns if stopCh is closed +// or the secure port cannot be listened on initially. +func (s preparedGenericAPIServer) Run(stopCh <-chan struct{}) error { + err := s.NonBlockingRun(stopCh) + if err != nil { + return err + } + + <-stopCh + + if s.GenericAPIServer.AuditBackend != nil { + s.GenericAPIServer.AuditBackend.Shutdown() + } + + return nil +} + +// NonBlockingRun spawns the secure http server. An error is +// returned if the secure port cannot be listened on. +func (s preparedGenericAPIServer) NonBlockingRun(stopCh <-chan struct{}) error { + // Use an internal stop channel to allow cleanup of the listeners on error. + internalStopCh := make(chan struct{}) + + if s.SecureServingInfo != nil && s.Handler != nil { + if err := s.serveSecurely(internalStopCh); err != nil { + close(internalStopCh) + return err + } + } + + // Now that listener have bound successfully, it is the + // responsibility of the caller to close the provided channel to + // ensure cleanup. + go func() { + <-stopCh + close(internalStopCh) + }() + + // Start the audit backend before any request comes in. This means we cannot turn it into a + // post start hook because without calling Backend.Run the Backend.ProcessEvents call might block. + if s.AuditBackend != nil { + if err := s.AuditBackend.Run(stopCh); err != nil { + return fmt.Errorf("failed to run the audit backend: %v", err) + } + } + + s.RunPostStartHooks(stopCh) + + if _, err := systemd.SdNotify(true, "READY=1\n"); err != nil { + glog.Errorf("Unable to send systemd daemon successful start message: %v\n", err) + } + + return nil +} + +// EffectiveSecurePort returns the secure port we bound to. +func (s *GenericAPIServer) EffectiveSecurePort() int { + return s.effectiveSecurePort +} + +// installAPIResources is a private method for installing the REST storage backing each api groupversionresource +func (s *GenericAPIServer) installAPIResources(apiPrefix string, apiGroupInfo *APIGroupInfo) error { + for _, groupVersion := range apiGroupInfo.GroupMeta.GroupVersions { + if len(apiGroupInfo.VersionedResourcesStorageMap[groupVersion.Version]) == 0 { + glog.Warningf("Skipping API %v because it has no resources.", groupVersion) + continue + } + + apiGroupVersion := s.getAPIGroupVersion(apiGroupInfo, groupVersion, apiPrefix) + if apiGroupInfo.OptionsExternalVersion != nil { + apiGroupVersion.OptionsExternalVersion = apiGroupInfo.OptionsExternalVersion + } + + if err := apiGroupVersion.InstallREST(s.Handler.GoRestfulContainer); err != nil { + return fmt.Errorf("Unable to setup API %v: %v", apiGroupInfo, err) + } + } + + return nil +} + +func (s *GenericAPIServer) InstallLegacyAPIGroup(apiPrefix string, apiGroupInfo *APIGroupInfo) error { + if !s.legacyAPIGroupPrefixes.Has(apiPrefix) { + return fmt.Errorf("%q is not in the allowed legacy API prefixes: %v", apiPrefix, s.legacyAPIGroupPrefixes.List()) + } + if err := s.installAPIResources(apiPrefix, apiGroupInfo); err != nil { + return err + } + + // setup discovery + apiVersions := []string{} + for _, groupVersion := range apiGroupInfo.GroupMeta.GroupVersions { + apiVersions = append(apiVersions, groupVersion.Version) + } + // Install the version handler. + // Add a handler at /<apiPrefix> to enumerate the supported api versions. + s.Handler.GoRestfulContainer.Add(discovery.NewLegacyRootAPIHandler(s.discoveryAddresses, s.Serializer, apiPrefix, apiVersions, s.requestContextMapper).WebService()) + return nil +} + +// Exposes the given api group in the API. +func (s *GenericAPIServer) InstallAPIGroup(apiGroupInfo *APIGroupInfo) error { + // Do not register empty group or empty version. Doing so claims /apis/ for the wrong entity to be returned. + // Catching these here places the error much closer to its origin + if len(apiGroupInfo.GroupMeta.GroupVersion.Group) == 0 { + return fmt.Errorf("cannot register handler with an empty group for %#v", *apiGroupInfo) + } + if len(apiGroupInfo.GroupMeta.GroupVersion.Version) == 0 { + return fmt.Errorf("cannot register handler with an empty version for %#v", *apiGroupInfo) + } + + if err := s.installAPIResources(APIGroupPrefix, apiGroupInfo); err != nil { + return err + } + + // setup discovery + // Install the version handler. + // Add a handler at /apis/<groupName> to enumerate all versions supported by this group. + apiVersionsForDiscovery := []metav1.GroupVersionForDiscovery{} + for _, groupVersion := range apiGroupInfo.GroupMeta.GroupVersions { + // Check the config to make sure that we elide versions that don't have any resources + if len(apiGroupInfo.VersionedResourcesStorageMap[groupVersion.Version]) == 0 { + continue + } + apiVersionsForDiscovery = append(apiVersionsForDiscovery, metav1.GroupVersionForDiscovery{ + GroupVersion: groupVersion.String(), + Version: groupVersion.Version, + }) + } + preferredVersionForDiscovery := metav1.GroupVersionForDiscovery{ + GroupVersion: apiGroupInfo.GroupMeta.GroupVersion.String(), + Version: apiGroupInfo.GroupMeta.GroupVersion.Version, + } + apiGroup := metav1.APIGroup{ + Name: apiGroupInfo.GroupMeta.GroupVersion.Group, + Versions: apiVersionsForDiscovery, + PreferredVersion: preferredVersionForDiscovery, + } + + s.DiscoveryGroupManager.AddGroup(apiGroup) + s.Handler.GoRestfulContainer.Add(discovery.NewAPIGroupHandler(s.Serializer, apiGroup, s.requestContextMapper).WebService()) + + return nil +} + +func (s *GenericAPIServer) getAPIGroupVersion(apiGroupInfo *APIGroupInfo, groupVersion schema.GroupVersion, apiPrefix string) *genericapi.APIGroupVersion { + storage := make(map[string]rest.Storage) + for k, v := range apiGroupInfo.VersionedResourcesStorageMap[groupVersion.Version] { + storage[strings.ToLower(k)] = v + } + version := s.newAPIGroupVersion(apiGroupInfo, groupVersion) + version.Root = apiPrefix + version.Storage = storage + return version +} + +func (s *GenericAPIServer) newAPIGroupVersion(apiGroupInfo *APIGroupInfo, groupVersion schema.GroupVersion) *genericapi.APIGroupVersion { + return &genericapi.APIGroupVersion{ + GroupVersion: groupVersion, + MetaGroupVersion: apiGroupInfo.MetaGroupVersion, + + ParameterCodec: apiGroupInfo.ParameterCodec, + Serializer: apiGroupInfo.NegotiatedSerializer, + Creater: apiGroupInfo.Scheme, + Convertor: apiGroupInfo.Scheme, + UnsafeConvertor: runtime.UnsafeObjectConvertor(apiGroupInfo.Scheme), + Copier: apiGroupInfo.Scheme, + Defaulter: apiGroupInfo.Scheme, + Typer: apiGroupInfo.Scheme, + SubresourceGroupVersionKind: apiGroupInfo.SubresourceGroupVersionKind, + Linker: apiGroupInfo.GroupMeta.SelfLinker, + Mapper: apiGroupInfo.GroupMeta.RESTMapper, + + Admit: s.admissionControl, + Context: s.RequestContextMapper(), + MinRequestTimeout: s.minRequestTimeout, + EnableAPIResponseCompression: s.enableAPIResponseCompression, + } +} + +// NewDefaultAPIGroupInfo returns an APIGroupInfo stubbed with "normal" values +// exposed for easier composition from other packages +func NewDefaultAPIGroupInfo(group string, registry *registered.APIRegistrationManager, scheme *runtime.Scheme, parameterCodec runtime.ParameterCodec, codecs serializer.CodecFactory) APIGroupInfo { + groupMeta := registry.GroupOrDie(group) + + return APIGroupInfo{ + GroupMeta: *groupMeta, + VersionedResourcesStorageMap: map[string]map[string]rest.Storage{}, + // TODO unhardcode this. It was hardcoded before, but we need to re-evaluate + OptionsExternalVersion: &schema.GroupVersion{Version: "v1"}, + Scheme: scheme, + ParameterCodec: parameterCodec, + NegotiatedSerializer: codecs, + } +} diff --git a/vendor/k8s.io/apiserver/pkg/server/genericapiserver_test.go b/vendor/k8s.io/apiserver/pkg/server/genericapiserver_test.go new file mode 100644 index 000000000..54a6540fd --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/server/genericapiserver_test.go @@ -0,0 +1,511 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package server + +import ( + "encoding/json" + "fmt" + "io" + "io/ioutil" + "net" + "net/http" + "net/http/httptest" + goruntime "runtime" + "testing" + "time" + + // "github.com/go-openapi/spec" + "github.com/stretchr/testify/assert" + + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/apimachinery" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/version" + "k8s.io/apiserver/pkg/apis/example" + examplev1 "k8s.io/apiserver/pkg/apis/example/v1" + "k8s.io/apiserver/pkg/authentication/user" + "k8s.io/apiserver/pkg/authorization/authorizer" + "k8s.io/apiserver/pkg/endpoints/discovery" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/apiserver/pkg/registry/rest" + etcdtesting "k8s.io/apiserver/pkg/storage/etcd/testing" + "k8s.io/client-go/informers" + "k8s.io/client-go/kubernetes/fake" + restclient "k8s.io/client-go/rest" + openapi "k8s.io/kube-openapi/pkg/common" +) + +const ( + extensionsGroupName = "extensions" +) + +var ( + v1GroupVersion = schema.GroupVersion{Group: "", Version: "v1"} + + scheme = runtime.NewScheme() + codecs = serializer.NewCodecFactory(scheme) + parameterCodec = runtime.NewParameterCodec(scheme) +) + +func init() { + metav1.AddToGroupVersion(scheme, metav1.SchemeGroupVersion) + scheme.AddUnversionedTypes(v1GroupVersion, + &metav1.Status{}, + &metav1.APIVersions{}, + &metav1.APIGroupList{}, + &metav1.APIGroup{}, + &metav1.APIResourceList{}, + ) + example.AddToScheme(scheme) + examplev1.AddToScheme(scheme) +} + +func testGetOpenAPIDefinitions(ref openapi.ReferenceCallback) map[string]openapi.OpenAPIDefinition { + return map[string]openapi.OpenAPIDefinition{} +} + +// setUp is a convience function for setting up for (most) tests. +func setUp(t *testing.T) (*etcdtesting.EtcdTestServer, Config, *assert.Assertions) { + etcdServer, _ := etcdtesting.NewUnsecuredEtcd3TestClientServer(t, scheme) + + config := NewConfig(codecs) + config.PublicAddress = net.ParseIP("192.168.10.4") + config.RequestContextMapper = genericapirequest.NewRequestContextMapper() + config.LegacyAPIGroupPrefixes = sets.NewString("/api") + config.LoopbackClientConfig = &restclient.Config{} + + clientset := fake.NewSimpleClientset() + if clientset == nil { + t.Fatal("unable to create fake client set") + } + + // TODO restore this test, but right now, eliminate our cycle + // config.OpenAPIConfig = DefaultOpenAPIConfig(testGetOpenAPIDefinitions, runtime.NewScheme()) + // config.OpenAPIConfig.Info = &spec.Info{ + // InfoProps: spec.InfoProps{ + // Title: "Kubernetes", + // Version: "unversioned", + // }, + // } + config.SwaggerConfig = DefaultSwaggerConfig() + sharedInformers := informers.NewSharedInformerFactory(clientset, config.LoopbackClientConfig.Timeout) + config.Complete(sharedInformers) + + return etcdServer, *config, assert.New(t) +} + +func newMaster(t *testing.T) (*GenericAPIServer, *etcdtesting.EtcdTestServer, Config, *assert.Assertions) { + etcdserver, config, assert := setUp(t) + + s, err := config.Complete(nil).New("test", EmptyDelegate) + if err != nil { + t.Fatalf("Error in bringing up the server: %v", err) + } + return s, etcdserver, config, assert +} + +// TestNew verifies that the New function returns a GenericAPIServer +// using the configuration properly. +func TestNew(t *testing.T) { + s, etcdserver, config, assert := newMaster(t) + defer etcdserver.Terminate(t) + + // Verify many of the variables match their config counterparts + assert.Equal(s.legacyAPIGroupPrefixes, config.LegacyAPIGroupPrefixes) + assert.Equal(s.admissionControl, config.AdmissionControl) + assert.Equal(s.RequestContextMapper(), config.RequestContextMapper) + + // these values get defaulted + assert.Equal(net.JoinHostPort(config.PublicAddress.String(), "443"), s.ExternalAddress) + assert.NotNil(s.swaggerConfig) + assert.Equal("http://"+s.ExternalAddress, s.swaggerConfig.WebServicesUrl) +} + +// Verifies that AddGroupVersions works as expected. +func TestInstallAPIGroups(t *testing.T) { + etcdserver, config, assert := setUp(t) + defer etcdserver.Terminate(t) + + config.LegacyAPIGroupPrefixes = sets.NewString("/apiPrefix") + config.DiscoveryAddresses = discovery.DefaultAddresses{DefaultAddress: "ExternalAddress"} + + s, err := config.Complete(nil).New("test", EmptyDelegate) + if err != nil { + t.Fatalf("Error in bringing up the server: %v", err) + } + + testAPI := func(gv schema.GroupVersion) APIGroupInfo { + getter, noVerbs := testGetterStorage{}, testNoVerbsStorage{} + + scheme := runtime.NewScheme() + scheme.AddKnownTypeWithName(gv.WithKind("Getter"), getter.New()) + scheme.AddKnownTypeWithName(gv.WithKind("NoVerb"), noVerbs.New()) + scheme.AddKnownTypes(v1GroupVersion, &metav1.Status{}) + metav1.AddToGroupVersion(scheme, v1GroupVersion) + + interfacesFor := func(version schema.GroupVersion) (*meta.VersionInterfaces, error) { + return &meta.VersionInterfaces{ + ObjectConvertor: scheme, + MetadataAccessor: meta.NewAccessor(), + }, nil + } + + mapper := meta.NewDefaultRESTMapper([]schema.GroupVersion{gv}, interfacesFor) + for kind := range scheme.KnownTypes(gv) { + mapper.Add(gv.WithKind(kind), meta.RESTScopeNamespace) + } + groupMeta := apimachinery.GroupMeta{ + GroupVersion: gv, + GroupVersions: []schema.GroupVersion{gv}, + RESTMapper: mapper, + InterfacesFor: interfacesFor, + } + + return APIGroupInfo{ + GroupMeta: groupMeta, + VersionedResourcesStorageMap: map[string]map[string]rest.Storage{ + gv.Version: { + "getter": &testGetterStorage{Version: gv.Version}, + "noverbs": &testNoVerbsStorage{Version: gv.Version}, + }, + }, + OptionsExternalVersion: &schema.GroupVersion{Version: "v1"}, + ParameterCodec: parameterCodec, + NegotiatedSerializer: codecs, + Scheme: scheme, + } + } + + apis := []APIGroupInfo{ + testAPI(schema.GroupVersion{Group: "", Version: "v1"}), + testAPI(schema.GroupVersion{Group: extensionsGroupName, Version: "v1"}), + testAPI(schema.GroupVersion{Group: "batch", Version: "v1"}), + } + + err = s.InstallLegacyAPIGroup("/apiPrefix", &apis[0]) + assert.NoError(err) + groupPaths := []string{ + config.LegacyAPIGroupPrefixes.List()[0], // /apiPrefix + } + for _, api := range apis[1:] { + err = s.InstallAPIGroup(&api) + assert.NoError(err) + groupPaths = append(groupPaths, APIGroupPrefix+"/"+api.GroupMeta.GroupVersion.Group) // /apis/<group> + } + + server := httptest.NewServer(s.Handler) + defer server.Close() + + for i := range apis { + // should serve APIGroup at group path + info := &apis[i] + path := groupPaths[i] + resp, err := http.Get(server.URL + path) + if err != nil { + t.Errorf("[%d] unexpected error getting path %q path: %v", i, path, err) + continue + } + + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + t.Errorf("[%d] unexpected error reading body at path %q: %v", i, path, err) + continue + } + + t.Logf("[%d] json at %s: %s", i, path, string(body)) + + if i == 0 { + // legacy API returns APIVersions + group := metav1.APIVersions{} + err = json.Unmarshal(body, &group) + if err != nil { + t.Errorf("[%d] unexpected error parsing json body at path %q: %v", i, path, err) + continue + } + } else { + // API groups return APIGroup + group := metav1.APIGroup{} + err = json.Unmarshal(body, &group) + if err != nil { + t.Errorf("[%d] unexpected error parsing json body at path %q: %v", i, path, err) + continue + } + + if got, expected := group.Name, info.GroupMeta.GroupVersion.Group; got != expected { + t.Errorf("[%d] unexpected group name at path %q: got=%q expected=%q", i, path, got, expected) + continue + } + + if got, expected := group.PreferredVersion.Version, info.GroupMeta.GroupVersion.Version; got != expected { + t.Errorf("[%d] unexpected group version at path %q: got=%q expected=%q", i, path, got, expected) + continue + } + } + + // should serve APIResourceList at group path + /<group-version> + path = path + "/" + info.GroupMeta.GroupVersion.Version + resp, err = http.Get(server.URL + path) + if err != nil { + t.Errorf("[%d] unexpected error getting path %q path: %v", i, path, err) + continue + } + + body, err = ioutil.ReadAll(resp.Body) + if err != nil { + t.Errorf("[%d] unexpected error reading body at path %q: %v", i, path, err) + continue + } + + t.Logf("[%d] json at %s: %s", i, path, string(body)) + + resources := metav1.APIResourceList{} + err = json.Unmarshal(body, &resources) + if err != nil { + t.Errorf("[%d] unexpected error parsing json body at path %q: %v", i, path, err) + continue + } + + if got, expected := resources.GroupVersion, info.GroupMeta.GroupVersion.String(); got != expected { + t.Errorf("[%d] unexpected groupVersion at path %q: got=%q expected=%q", i, path, got, expected) + continue + } + + // the verbs should match the features of resources + for _, r := range resources.APIResources { + switch r.Name { + case "getter": + if got, expected := sets.NewString([]string(r.Verbs)...), sets.NewString("get"); !got.Equal(expected) { + t.Errorf("[%d] unexpected verbs for resource %s/%s: got=%v expected=%v", i, resources.GroupVersion, r.Name, got, expected) + } + case "noverbs": + if r.Verbs == nil { + t.Errorf("[%d] unexpected nil verbs slice. Expected: []string{}", i) + } + if got, expected := sets.NewString([]string(r.Verbs)...), sets.NewString(); !got.Equal(expected) { + t.Errorf("[%d] unexpected verbs for resource %s/%s: got=%v expected=%v", i, resources.GroupVersion, r.Name, got, expected) + } + } + } + } +} + +func TestPrepareRun(t *testing.T) { + s, etcdserver, config, assert := newMaster(t) + defer etcdserver.Terminate(t) + + assert.NotNil(config.SwaggerConfig) + + server := httptest.NewServer(s.Handler.Director) + defer server.Close() + done := make(chan struct{}) + + s.PrepareRun() + s.RunPostStartHooks(done) + + // swagger is installed in PrepareRun + resp, err := http.Get(server.URL + "/swaggerapi/") + assert.NoError(err) + assert.Equal(http.StatusOK, resp.StatusCode) + + // healthz checks are installed in PrepareRun + resp, err = http.Get(server.URL + "/healthz") + assert.NoError(err) + assert.Equal(http.StatusOK, resp.StatusCode) + resp, err = http.Get(server.URL + "/healthz/ping") + assert.NoError(err) + assert.Equal(http.StatusOK, resp.StatusCode) +} + +// TestCustomHandlerChain verifies the handler chain with custom handler chain builder functions. +func TestCustomHandlerChain(t *testing.T) { + etcdserver, config, _ := setUp(t) + defer etcdserver.Terminate(t) + + var protected, called bool + + config.BuildHandlerChainFunc = func(apiHandler http.Handler, c *Config) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + protected = true + apiHandler.ServeHTTP(w, req) + }) + } + handler := http.HandlerFunc(func(r http.ResponseWriter, req *http.Request) { + called = true + }) + + s, err := config.Complete(nil).New("test", EmptyDelegate) + if err != nil { + t.Fatalf("Error in bringing up the server: %v", err) + } + + s.Handler.NonGoRestfulMux.Handle("/nonswagger", handler) + s.Handler.NonGoRestfulMux.Handle("/secret", handler) + + type Test struct { + handler http.Handler + path string + protected bool + } + for i, test := range []Test{ + {s.Handler, "/nonswagger", true}, + {s.Handler, "/secret", true}, + } { + protected, called = false, false + + var w io.Reader + req, err := http.NewRequest("GET", test.path, w) + if err != nil { + t.Errorf("%d: Unexpected http error: %v", i, err) + continue + } + + test.handler.ServeHTTP(httptest.NewRecorder(), req) + + if !called { + t.Errorf("%d: Expected handler to be called.", i) + } + if test.protected != protected { + t.Errorf("%d: Expected protected=%v, got protected=%v.", i, test.protected, protected) + } + } +} + +// TestNotRestRoutesHaveAuth checks that special non-routes are behind authz/authn. +func TestNotRestRoutesHaveAuth(t *testing.T) { + etcdserver, config, _ := setUp(t) + defer etcdserver.Terminate(t) + + authz := mockAuthorizer{} + + config.LegacyAPIGroupPrefixes = sets.NewString("/apiPrefix") + config.Authorizer = &authz + + config.EnableSwaggerUI = true + config.EnableIndex = true + config.EnableProfiling = true + config.SwaggerConfig = DefaultSwaggerConfig() + + kubeVersion := fakeVersion() + config.Version = &kubeVersion + + s, err := config.Complete(nil).New("test", EmptyDelegate) + if err != nil { + t.Fatalf("Error in bringing up the server: %v", err) + } + + for _, test := range []struct { + route string + }{ + {"/"}, + {"/swagger-ui/"}, + {"/debug/pprof/"}, + {"/version"}, + } { + resp := httptest.NewRecorder() + req, _ := http.NewRequest("GET", test.route, nil) + s.Handler.ServeHTTP(resp, req) + if resp.Code != 200 { + t.Errorf("route %q expected to work: code %d", test.route, resp.Code) + continue + } + + if authz.lastURI != test.route { + t.Errorf("route %q expected to go through authorization, last route did: %q", test.route, authz.lastURI) + } + } +} + +type mockAuthorizer struct { + lastURI string +} + +func (authz *mockAuthorizer) Authorize(a authorizer.Attributes) (authorized bool, reason string, err error) { + authz.lastURI = a.GetPath() + return true, "", nil +} + +type mockAuthenticator struct { + lastURI string +} + +func (authn *mockAuthenticator) AuthenticateRequest(req *http.Request) (user.Info, bool, error) { + authn.lastURI = req.RequestURI + return &user.DefaultInfo{ + Name: "foo", + }, true, nil +} + +func decodeResponse(resp *http.Response, obj interface{}) error { + defer resp.Body.Close() + + data, err := ioutil.ReadAll(resp.Body) + if err != nil { + return err + } + if err := json.Unmarshal(data, obj); err != nil { + return err + } + return nil +} + +type testGetterStorage struct { + Version string +} + +func (p *testGetterStorage) New() runtime.Object { + return &metav1.APIGroup{ + TypeMeta: metav1.TypeMeta{ + Kind: "Getter", + APIVersion: p.Version, + }, + } +} + +func (p *testGetterStorage) Get(ctx genericapirequest.Context, name string, options *metav1.GetOptions) (runtime.Object, error) { + return nil, nil +} + +type testNoVerbsStorage struct { + Version string +} + +func (p *testNoVerbsStorage) New() runtime.Object { + return &metav1.APIGroup{ + TypeMeta: metav1.TypeMeta{ + Kind: "NoVerbs", + APIVersion: p.Version, + }, + } +} + +func fakeVersion() version.Info { + return version.Info{ + Major: "42", + Minor: "42", + GitVersion: "42", + GitCommit: "34973274ccef6ab4dfaaf86599792fa9c3fe4689", + GitTreeState: "Dirty", + BuildDate: time.Now().String(), + GoVersion: goruntime.Version(), + Compiler: goruntime.Compiler, + Platform: fmt.Sprintf("%s/%s", goruntime.GOOS, goruntime.GOARCH), + } +} diff --git a/vendor/k8s.io/apiserver/pkg/server/handler.go b/vendor/k8s.io/apiserver/pkg/server/handler.go new file mode 100644 index 000000000..48d1408a4 --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/server/handler.go @@ -0,0 +1,199 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package server + +import ( + "bytes" + "errors" + "fmt" + "net/http" + rt "runtime" + "sort" + "strings" + + "github.com/emicklei/go-restful" + "github.com/golang/glog" + + apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apiserver/pkg/endpoints/handlers/responsewriters" + "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/apiserver/pkg/server/mux" + genericmux "k8s.io/apiserver/pkg/server/mux" +) + +// APIServerHandlers holds the different http.Handlers used by the API server. +// This includes the full handler chain, the director (which chooses between gorestful and nonGoRestful, +// the gorestful handler (used for the API) which falls through to the nonGoRestful handler on unregistered paths, +// and the nonGoRestful handler (which can contain a fallthrough of its own) +// FullHandlerChain -> Director -> {GoRestfulContainer,NonGoRestfulMux} based on inspection of registered web services +type APIServerHandler struct { + // FullHandlerChain is the one that is eventually served with. It should include the full filter + // chain and then call the Director. + FullHandlerChain http.Handler + // The registered APIs. InstallAPIs uses this. Other servers probably shouldn't access this directly. + GoRestfulContainer *restful.Container + // NonGoRestfulMux is the final HTTP handler in the chain. + // It comes after all filters and the API handling + // This is where other servers can attach handler to various parts of the chain. + NonGoRestfulMux *mux.PathRecorderMux + + // Director is here so that we can properly handle fall through and proxy cases. + // This looks a bit bonkers, but here's what's happening. We need to have /apis handling registered in gorestful in order to have + // swagger generated for compatibility. Doing that with `/apis` as a webservice, means that it forcibly 404s (no defaulting allowed) + // all requests which are not /apis or /apis/. We need those calls to fall through behind goresful for proper delegation. Trying to + // register for a pattern which includes everything behind it doesn't work because gorestful negotiates for verbs and content encoding + // and all those things go crazy when gorestful really just needs to pass through. In addition, openapi enforces unique verb constraints + // which we don't fit into and it still muddies up swagger. Trying to switch the webservices into a route doesn't work because the + // containing webservice faces all the same problems listed above. + // This leads to the crazy thing done here. Our mux does what we need, so we'll place it in front of gorestful. It will introspect to + // decide if the the route is likely to be handled by goresful and route there if needed. Otherwise, it goes to PostGoRestful mux in + // order to handle "normal" paths and delegation. Hopefully no API consumers will ever have to deal with this level of detail. I think + // we should consider completely removing gorestful. + // Other servers should only use this opaquely to delegate to an API server. + Director http.Handler +} + +// HandlerChainBuilderFn is used to wrap the GoRestfulContainer handler using the provided handler chain. +// It is normally used to apply filtering like authentication and authorization +type HandlerChainBuilderFn func(apiHandler http.Handler) http.Handler + +func NewAPIServerHandler(name string, contextMapper request.RequestContextMapper, s runtime.NegotiatedSerializer, handlerChainBuilder HandlerChainBuilderFn, notFoundHandler http.Handler) *APIServerHandler { + nonGoRestfulMux := genericmux.NewPathRecorderMux(name) + if notFoundHandler != nil { + nonGoRestfulMux.NotFoundHandler(notFoundHandler) + } + + gorestfulContainer := restful.NewContainer() + gorestfulContainer.ServeMux = http.NewServeMux() + gorestfulContainer.Router(restful.CurlyRouter{}) // e.g. for proxy/{kind}/{name}/{*} + gorestfulContainer.RecoverHandler(func(panicReason interface{}, httpWriter http.ResponseWriter) { + logStackOnRecover(s, panicReason, httpWriter) + }) + gorestfulContainer.ServiceErrorHandler(func(serviceErr restful.ServiceError, request *restful.Request, response *restful.Response) { + ctx, ok := contextMapper.Get(request.Request) + if !ok { + responsewriters.InternalError(response.ResponseWriter, request.Request, errors.New("no context found for request")) + } + serviceErrorHandler(ctx, s, serviceErr, request, response) + }) + + director := director{ + name: name, + goRestfulContainer: gorestfulContainer, + nonGoRestfulMux: nonGoRestfulMux, + } + + return &APIServerHandler{ + FullHandlerChain: handlerChainBuilder(director), + GoRestfulContainer: gorestfulContainer, + NonGoRestfulMux: nonGoRestfulMux, + Director: director, + } +} + +// ListedPaths returns the paths that should be shown under / +func (a *APIServerHandler) ListedPaths() []string { + var handledPaths []string + // Extract the paths handled using restful.WebService + for _, ws := range a.GoRestfulContainer.RegisteredWebServices() { + handledPaths = append(handledPaths, ws.RootPath()) + } + handledPaths = append(handledPaths, a.NonGoRestfulMux.ListedPaths()...) + sort.Strings(handledPaths) + + return handledPaths +} + +type director struct { + name string + goRestfulContainer *restful.Container + nonGoRestfulMux *mux.PathRecorderMux +} + +func (d director) ServeHTTP(w http.ResponseWriter, req *http.Request) { + path := req.URL.Path + + // check to see if our webservices want to claim this path + for _, ws := range d.goRestfulContainer.RegisteredWebServices() { + switch { + case ws.RootPath() == "/apis": + // if we are exactly /apis or /apis/, then we need special handling in loop. + // normally these are passed to the nonGoRestfulMux, but if discovery is enabled, it will go directly. + // We can't rely on a prefix match since /apis matches everything (see the big comment on Director above) + if path == "/apis" || path == "/apis/" { + glog.V(5).Infof("%v: %v %q satisfied by gorestful with webservice %v", d.name, req.Method, path, ws.RootPath()) + // don't use servemux here because gorestful servemuxes get messed up when removing webservices + // TODO fix gorestful, remove TPRs, or stop using gorestful + d.goRestfulContainer.Dispatch(w, req) + return + } + + case strings.HasPrefix(path, ws.RootPath()): + // ensure an exact match or a path boundary match + if len(path) == len(ws.RootPath()) || path[len(ws.RootPath())] == '/' { + glog.V(5).Infof("%v: %v %q satisfied by gorestful with webservice %v", d.name, req.Method, path, ws.RootPath()) + // don't use servemux here because gorestful servemuxes get messed up when removing webservices + // TODO fix gorestful, remove TPRs, or stop using gorestful + d.goRestfulContainer.Dispatch(w, req) + return + } + } + } + + // if we didn't find a match, then we just skip gorestful altogether + glog.V(5).Infof("%v: %v %q satisfied by nonGoRestful", d.name, req.Method, path) + d.nonGoRestfulMux.ServeHTTP(w, req) +} + +//TODO: Unify with RecoverPanics? +func logStackOnRecover(s runtime.NegotiatedSerializer, panicReason interface{}, w http.ResponseWriter) { + var buffer bytes.Buffer + buffer.WriteString(fmt.Sprintf("recover from panic situation: - %v\r\n", panicReason)) + for i := 2; ; i++ { + _, file, line, ok := rt.Caller(i) + if !ok { + break + } + buffer.WriteString(fmt.Sprintf(" %s:%d\r\n", file, line)) + } + glog.Errorln(buffer.String()) + + headers := http.Header{} + if ct := w.Header().Get("Content-Type"); len(ct) > 0 { + headers.Set("Accept", ct) + } + emptyContext := request.NewContext() // best we can do here: we don't know the request + responsewriters.ErrorNegotiated(emptyContext, apierrors.NewGenericServerResponse(http.StatusInternalServerError, "", schema.GroupResource{}, "", "", 0, false), s, schema.GroupVersion{}, w, &http.Request{Header: headers}) +} + +func serviceErrorHandler(ctx request.Context, s runtime.NegotiatedSerializer, serviceErr restful.ServiceError, request *restful.Request, resp *restful.Response) { + responsewriters.ErrorNegotiated( + ctx, + apierrors.NewGenericServerResponse(serviceErr.Code, "", schema.GroupResource{}, "", serviceErr.Message, 0, false), + s, + schema.GroupVersion{}, + resp, + request.Request, + ) +} + +// ServeHTTP makes it an http.Handler +func (a *APIServerHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + a.FullHandlerChain.ServeHTTP(w, r) +} diff --git a/vendor/k8s.io/apiserver/pkg/server/healthz.go b/vendor/k8s.io/apiserver/pkg/server/healthz.go new file mode 100644 index 000000000..43e102b5c --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/server/healthz.go @@ -0,0 +1,45 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package server + +import ( + "fmt" + + "k8s.io/apiserver/pkg/server/healthz" +) + +// AddHealthzCheck allows you to add a HealthzCheck. +func (s *GenericAPIServer) AddHealthzChecks(checks ...healthz.HealthzChecker) error { + s.healthzLock.Lock() + defer s.healthzLock.Unlock() + + if s.healthzCreated { + return fmt.Errorf("unable to add because the healthz endpoint has already been created") + } + + s.healthzChecks = append(s.healthzChecks, checks...) + return nil +} + +// installHealthz creates the healthz endpoint for this server +func (s *GenericAPIServer) installHealthz() { + s.healthzLock.Lock() + defer s.healthzLock.Unlock() + s.healthzCreated = true + + healthz.InstallHandler(s.Handler.NonGoRestfulMux, s.healthzChecks...) +} diff --git a/vendor/k8s.io/apiserver/pkg/server/healthz/doc.go b/vendor/k8s.io/apiserver/pkg/server/healthz/doc.go index 3ce26017c..06e67f6fe 100644 --- a/vendor/k8s.io/apiserver/pkg/server/healthz/doc.go +++ b/vendor/k8s.io/apiserver/pkg/server/healthz/doc.go @@ -18,4 +18,4 @@ limitations under the License. // Usage: // import "k8s.io/apiserver/pkg/server/healthz" // healthz.DefaultHealthz() -package healthz +package healthz // import "k8s.io/apiserver/pkg/server/healthz" diff --git a/vendor/k8s.io/apiserver/pkg/server/healthz/healthz_test.go b/vendor/k8s.io/apiserver/pkg/server/healthz/healthz_test.go new file mode 100644 index 000000000..99aae5a9e --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/server/healthz/healthz_test.go @@ -0,0 +1,112 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package healthz + +import ( + "errors" + "fmt" + "net/http" + "net/http/httptest" + "reflect" + "testing" +) + +func TestInstallHandler(t *testing.T) { + mux := http.NewServeMux() + InstallHandler(mux) + req, err := http.NewRequest("GET", "http://example.com/healthz", nil) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + w := httptest.NewRecorder() + mux.ServeHTTP(w, req) + if w.Code != http.StatusOK { + t.Errorf("expected %v, got %v", http.StatusOK, w.Code) + } + if w.Body.String() != "ok" { + t.Errorf("expected %v, got %v", "ok", w.Body.String()) + } +} + +func TestMulitipleChecks(t *testing.T) { + tests := []struct { + path string + expectedResponse string + expectedStatus int + addBadCheck bool + }{ + {"/healthz?verbose", "[+]ping ok\nhealthz check passed\n", http.StatusOK, false}, + {"/healthz/ping", "ok", http.StatusOK, false}, + {"/healthz", "ok", http.StatusOK, false}, + {"/healthz?verbose", "[+]ping ok\n[-]bad failed: reason withheld\nhealthz check failed\n", http.StatusInternalServerError, true}, + {"/healthz/ping", "ok", http.StatusOK, true}, + {"/healthz/bad", "internal server error: this will fail\n", http.StatusInternalServerError, true}, + {"/healthz", "[+]ping ok\n[-]bad failed: reason withheld\nhealthz check failed\n", http.StatusInternalServerError, true}, + } + + for i, test := range tests { + mux := http.NewServeMux() + checks := []HealthzChecker{PingHealthz} + if test.addBadCheck { + checks = append(checks, NamedCheck("bad", func(_ *http.Request) error { + return errors.New("this will fail") + })) + } + InstallHandler(mux, checks...) + req, err := http.NewRequest("GET", fmt.Sprintf("http://example.com%v", test.path), nil) + if err != nil { + t.Fatalf("case[%d] Unexpected error: %v", i, err) + } + w := httptest.NewRecorder() + mux.ServeHTTP(w, req) + if w.Code != test.expectedStatus { + t.Errorf("case[%d] Expected: %v, got: %v", i, test.expectedStatus, w.Code) + } + if w.Body.String() != test.expectedResponse { + t.Errorf("case[%d] Expected:\n%v\ngot:\n%v\n", i, test.expectedResponse, w.Body.String()) + } + } +} + +func TestCheckerNames(t *testing.T) { + n1 := "n1" + n2 := "n2" + c1 := &healthzCheck{name: n1} + c2 := &healthzCheck{name: n2} + + testCases := []struct { + desc string + have []HealthzChecker + want []string + }{ + {"no checker", []HealthzChecker{}, []string{}}, + {"one checker", []HealthzChecker{c1}, []string{n1}}, + {"other checker", []HealthzChecker{c2}, []string{n2}}, + {"checker order", []HealthzChecker{c1, c2}, []string{n1, n2}}, + {"different checker order", []HealthzChecker{c2, c1}, []string{n2, n1}}, + } + + for _, tc := range testCases { + result := checkerNames(tc.have...) + t.Run(tc.desc, func(t *testing.T) { + if reflect.DeepEqual(tc.want, result) { + t.Errorf("want %#v, got %#v", tc.want, result) + } + }) + } + +} diff --git a/vendor/k8s.io/apiserver/pkg/server/hooks.go b/vendor/k8s.io/apiserver/pkg/server/hooks.go new file mode 100644 index 000000000..a190f5622 --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/server/hooks.go @@ -0,0 +1,162 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package server + +import ( + "errors" + "fmt" + "net/http" + + "github.com/golang/glog" + + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apiserver/pkg/server/healthz" + restclient "k8s.io/client-go/rest" +) + +// PostStartHookFunc is a function that is called after the server has started. +// It must properly handle cases like: +// 1. asynchronous start in multiple API server processes +// 2. conflicts between the different processes all trying to perform the same action +// 3. partially complete work (API server crashes while running your hook) +// 4. API server access **BEFORE** your hook has completed +// Think of it like a mini-controller that is super privileged and gets to run in-process +// If you use this feature, tag @deads2k on github who has promised to review code for anyone's PostStartHook +// until it becomes easier to use. +type PostStartHookFunc func(context PostStartHookContext) error + +// PostStartHookContext provides information about this API server to a PostStartHookFunc +type PostStartHookContext struct { + // LoopbackClientConfig is a config for a privileged loopback connection to the API server + LoopbackClientConfig *restclient.Config + // StopCh is the channel that will be closed when the server stops + StopCh <-chan struct{} +} + +// PostStartHookProvider is an interface in addition to provide a post start hook for the api server +type PostStartHookProvider interface { + PostStartHook() (string, PostStartHookFunc, error) +} + +type postStartHookEntry struct { + hook PostStartHookFunc + + // done will be closed when the postHook is finished + done chan struct{} +} + +// AddPostStartHook allows you to add a PostStartHook. +func (s *GenericAPIServer) AddPostStartHook(name string, hook PostStartHookFunc) error { + if len(name) == 0 { + return fmt.Errorf("missing name") + } + if hook == nil { + return nil + } + if s.disabledPostStartHooks.Has(name) { + return nil + } + + s.postStartHookLock.Lock() + defer s.postStartHookLock.Unlock() + + if s.postStartHooksCalled { + return fmt.Errorf("unable to add %q because PostStartHooks have already been called", name) + } + if _, exists := s.postStartHooks[name]; exists { + return fmt.Errorf("unable to add %q because it is already registered", name) + } + + // done is closed when the poststarthook is finished. This is used by the health check to be able to indicate + // that the poststarthook is finished + done := make(chan struct{}) + s.AddHealthzChecks(postStartHookHealthz{name: "poststarthook/" + name, done: done}) + s.postStartHooks[name] = postStartHookEntry{hook: hook, done: done} + + return nil +} + +// AddPostStartHookOrDie allows you to add a PostStartHook, but dies on failure +func (s *GenericAPIServer) AddPostStartHookOrDie(name string, hook PostStartHookFunc) { + if err := s.AddPostStartHook(name, hook); err != nil { + glog.Fatalf("Error registering PostStartHook %q: %v", name, err) + } +} + +// RunPostStartHooks runs the PostStartHooks for the server +func (s *GenericAPIServer) RunPostStartHooks(stopCh <-chan struct{}) { + s.postStartHookLock.Lock() + defer s.postStartHookLock.Unlock() + s.postStartHooksCalled = true + + context := PostStartHookContext{ + LoopbackClientConfig: s.LoopbackClientConfig, + StopCh: stopCh, + } + + for hookName, hookEntry := range s.postStartHooks { + go runPostStartHook(hookName, hookEntry, context) + } +} + +// isHookRegistered checks whether a given hook is registered +func (s *GenericAPIServer) isHookRegistered(name string) bool { + s.postStartHookLock.Lock() + defer s.postStartHookLock.Unlock() + _, exists := s.postStartHooks[name] + return exists +} + +func runPostStartHook(name string, entry postStartHookEntry, context PostStartHookContext) { + var err error + func() { + // don't let the hook *accidentally* panic and kill the server + defer utilruntime.HandleCrash() + err = entry.hook(context) + }() + // if the hook intentionally wants to kill server, let it. + if err != nil { + glog.Fatalf("PostStartHook %q failed: %v", name, err) + } + close(entry.done) +} + +// postStartHookHealthz implements a healthz check for poststarthooks. It will return a "hookNotFinished" +// error until the poststarthook is finished. +type postStartHookHealthz struct { + name string + + // done will be closed when the postStartHook is finished + done chan struct{} +} + +var _ healthz.HealthzChecker = postStartHookHealthz{} + +func (h postStartHookHealthz) Name() string { + return h.name +} + +var hookNotFinished = errors.New("not finished") + +func (h postStartHookHealthz) Check(req *http.Request) error { + select { + case <-h.done: + return nil + default: + return hookNotFinished + } +} diff --git a/vendor/k8s.io/apiserver/pkg/server/options/encryptionconfig/BUILD b/vendor/k8s.io/apiserver/pkg/server/options/encryptionconfig/BUILD deleted file mode 100644 index 442550bb9..000000000 --- a/vendor/k8s.io/apiserver/pkg/server/options/encryptionconfig/BUILD +++ /dev/null @@ -1,50 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "config.go", - "plugins.go", - "types.go", - ], - deps = [ - "//vendor/github.com/ghodss/yaml:go_default_library", - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/value:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/value/encrypt/aes:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/value/encrypt/envelope:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/value/encrypt/identity:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/value/encrypt/secretbox:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["encryptionconfig_test.go"], - library = ":go_default_library", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/value:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/value/encrypt/envelope:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/apiserver/pkg/server/options/encryptionconfig/config.go b/vendor/k8s.io/apiserver/pkg/server/options/encryptionconfig/config.go deleted file mode 100644 index ad2f0927c..000000000 --- a/vendor/k8s.io/apiserver/pkg/server/options/encryptionconfig/config.go +++ /dev/null @@ -1,295 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package encryptionconfig - -import ( - "crypto/aes" - "crypto/cipher" - "encoding/base64" - "fmt" - "io" - "io/ioutil" - "os" - - yaml "github.com/ghodss/yaml" - - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apiserver/pkg/storage/value" - aestransformer "k8s.io/apiserver/pkg/storage/value/encrypt/aes" - "k8s.io/apiserver/pkg/storage/value/encrypt/envelope" - "k8s.io/apiserver/pkg/storage/value/encrypt/identity" - "k8s.io/apiserver/pkg/storage/value/encrypt/secretbox" -) - -const ( - aesCBCTransformerPrefixV1 = "k8s:enc:aescbc:v1:" - aesGCMTransformerPrefixV1 = "k8s:enc:aesgcm:v1:" - secretboxTransformerPrefixV1 = "k8s:enc:secretbox:v1:" - kmsTransformerPrefixV1 = "k8s:enc:kms:v1:" -) - -// GetTransformerOverrides returns the transformer overrides by reading and parsing the encryption provider configuration file -func GetTransformerOverrides(filepath string) (map[schema.GroupResource]value.Transformer, error) { - f, err := os.Open(filepath) - if err != nil { - return nil, fmt.Errorf("error opening encryption provider configuration file %q: %v", filepath, err) - } - defer f.Close() - - result, err := ParseEncryptionConfiguration(f) - if err != nil { - return nil, fmt.Errorf("error while parsing encryption provider configuration file %q: %v", filepath, err) - } - return result, nil -} - -// ParseEncryptionConfiguration parses configuration data and returns the transformer overrides -func ParseEncryptionConfiguration(f io.Reader) (map[schema.GroupResource]value.Transformer, error) { - configFileContents, err := ioutil.ReadAll(f) - if err != nil { - return nil, fmt.Errorf("could not read contents: %v", err) - } - - var config EncryptionConfig - err = yaml.Unmarshal(configFileContents, &config) - if err != nil { - return nil, fmt.Errorf("error while parsing file: %v", err) - } - - if config.Kind == "" { - return nil, fmt.Errorf("invalid configuration file, missing Kind") - } - if config.Kind != "EncryptionConfig" { - return nil, fmt.Errorf("invalid configuration kind %q provided", config.Kind) - } - // TODO config.APIVersion is unchecked - - resourceToPrefixTransformer := map[schema.GroupResource][]value.PrefixTransformer{} - - // For each entry in the configuration - for _, resourceConfig := range config.Resources { - transformers, err := GetPrefixTransformers(&resourceConfig) - if err != nil { - return nil, err - } - - // For each resource, create a list of providers to use - for _, resource := range resourceConfig.Resources { - gr := schema.ParseGroupResource(resource) - resourceToPrefixTransformer[gr] = append( - resourceToPrefixTransformer[gr], transformers...) - } - } - - result := map[schema.GroupResource]value.Transformer{} - for gr, transList := range resourceToPrefixTransformer { - result[gr] = value.NewMutableTransformer(value.NewPrefixTransformers(fmt.Errorf("no matching prefix found"), transList...)) - } - return result, nil -} - -// GetPrefixTransformers constructs and returns the appropriate prefix transformers for the passed resource using its configuration -func GetPrefixTransformers(config *ResourceConfig) ([]value.PrefixTransformer, error) { - var result []value.PrefixTransformer - for _, provider := range config.Providers { - found := false - - var transformer value.PrefixTransformer - var err error - - if provider.AESGCM != nil { - transformer, err = GetAESPrefixTransformer(provider.AESGCM, aestransformer.NewGCMTransformer, aesGCMTransformerPrefixV1) - if err != nil { - return result, err - } - found = true - } - - if provider.AESCBC != nil { - if found == true { - return result, fmt.Errorf("more than one provider specified in a single element, should split into different list elements") - } - transformer, err = GetAESPrefixTransformer(provider.AESCBC, aestransformer.NewCBCTransformer, aesCBCTransformerPrefixV1) - found = true - } - - if provider.Secretbox != nil { - if found == true { - return result, fmt.Errorf("more than one provider specified in a single element, should split into different list elements") - } - transformer, err = GetSecretboxPrefixTransformer(provider.Secretbox) - found = true - } - - if provider.Identity != nil { - if found == true { - return result, fmt.Errorf("more than one provider specified in a single element, should split into different list elements") - } - transformer = value.PrefixTransformer{ - Transformer: identity.NewEncryptCheckTransformer(), - Prefix: []byte{}, - } - found = true - } - - if provider.KMS != nil { - if found == true { - return nil, fmt.Errorf("more than one provider specified in a single element, should split into different list elements") - } - f, err := os.Open(provider.KMS.ConfigFile) - if err != nil { - return nil, fmt.Errorf("error opening KMS provider configuration file %q: %v", provider.KMS.ConfigFile, err) - } - defer f.Close() - envelopeService, pluginFound, err := KMSPluginRegistry.getPlugin(provider.KMS.Name, f) - if err != nil { - return nil, fmt.Errorf("could not configure KMS plugin %q, %v", provider.KMS.Name, err) - } - if pluginFound == false { - return nil, fmt.Errorf("KMS plugin %q not found", provider.KMS.Name) - } - transformer, err = getEnvelopePrefixTransformer(provider.KMS, envelopeService, kmsTransformerPrefixV1) - found = true - } - - if err != nil { - return result, err - } - result = append(result, transformer) - - if found == false { - return result, fmt.Errorf("invalid provider configuration: at least one provider must be specified") - } - } - return result, nil -} - -// BlockTransformerFunc takes an AES cipher block and returns a value transformer. -type BlockTransformerFunc func(cipher.Block) value.Transformer - -// GetAESPrefixTransformer returns a prefix transformer from the provided configuration. -// Returns an AES transformer based on the provided prefix and block transformer. -func GetAESPrefixTransformer(config *AESConfig, fn BlockTransformerFunc, prefix string) (value.PrefixTransformer, error) { - var result value.PrefixTransformer - - if len(config.Keys) == 0 { - return result, fmt.Errorf("aes provider has no valid keys") - } - for _, key := range config.Keys { - if key.Name == "" { - return result, fmt.Errorf("key with invalid name provided") - } - if key.Secret == "" { - return result, fmt.Errorf("key %v has no provided secret", key.Name) - } - } - - keyTransformers := []value.PrefixTransformer{} - - for _, keyData := range config.Keys { - key, err := base64.StdEncoding.DecodeString(keyData.Secret) - if err != nil { - return result, fmt.Errorf("could not obtain secret for named key %s: %s", keyData.Name, err) - } - block, err := aes.NewCipher(key) - if err != nil { - return result, fmt.Errorf("error while creating cipher for named key %s: %s", keyData.Name, err) - } - - // Create a new PrefixTransformer for this key - keyTransformers = append(keyTransformers, - value.PrefixTransformer{ - Transformer: fn(block), - Prefix: []byte(keyData.Name + ":"), - }) - } - - // Create a prefixTransformer which can choose between these keys - keyTransformer := value.NewPrefixTransformers( - fmt.Errorf("no matching key was found for the provided AES transformer"), keyTransformers...) - - // Create a PrefixTransformer which shall later be put in a list with other providers - result = value.PrefixTransformer{ - Transformer: keyTransformer, - Prefix: []byte(prefix), - } - return result, nil -} - -// GetSecretboxPrefixTransformer returns a prefix transformer from the provided configuration -func GetSecretboxPrefixTransformer(config *SecretboxConfig) (value.PrefixTransformer, error) { - var result value.PrefixTransformer - - if len(config.Keys) == 0 { - return result, fmt.Errorf("secretbox provider has no valid keys") - } - for _, key := range config.Keys { - if key.Name == "" { - return result, fmt.Errorf("key with invalid name provided") - } - if key.Secret == "" { - return result, fmt.Errorf("key %v has no provided secret", key.Name) - } - } - - keyTransformers := []value.PrefixTransformer{} - - for _, keyData := range config.Keys { - key, err := base64.StdEncoding.DecodeString(keyData.Secret) - if err != nil { - return result, fmt.Errorf("could not obtain secret for named key %s: %s", keyData.Name, err) - } - - if len(key) != 32 { - return result, fmt.Errorf("expected key size 32 for secretbox provider, got %v", len(key)) - } - - keyArray := [32]byte{} - copy(keyArray[:], key) - - // Create a new PrefixTransformer for this key - keyTransformers = append(keyTransformers, - value.PrefixTransformer{ - Transformer: secretbox.NewSecretboxTransformer(keyArray), - Prefix: []byte(keyData.Name + ":"), - }) - } - - // Create a prefixTransformer which can choose between these keys - keyTransformer := value.NewPrefixTransformers( - fmt.Errorf("no matching key was found for the provided Secretbox transformer"), keyTransformers...) - - // Create a PrefixTransformer which shall later be put in a list with other providers - result = value.PrefixTransformer{ - Transformer: keyTransformer, - Prefix: []byte(secretboxTransformerPrefixV1), - } - return result, nil -} - -// getEnvelopePrefixTransformer returns a prefix transformer from the provided config. -// envelopeService is used as the root of trust. -func getEnvelopePrefixTransformer(config *KMSConfig, envelopeService envelope.Service, prefix string) (value.PrefixTransformer, error) { - envelopeTransformer, err := envelope.NewEnvelopeTransformer(envelopeService, config.CacheSize, aestransformer.NewCBCTransformer) - if err != nil { - return value.PrefixTransformer{}, err - } - return value.PrefixTransformer{ - Transformer: envelopeTransformer, - Prefix: []byte(prefix + config.Name + ":"), - }, nil -} diff --git a/vendor/k8s.io/apiserver/pkg/server/options/encryptionconfig/plugins.go b/vendor/k8s.io/apiserver/pkg/server/options/encryptionconfig/plugins.go deleted file mode 100644 index 310c7238f..000000000 --- a/vendor/k8s.io/apiserver/pkg/server/options/encryptionconfig/plugins.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package encryptionconfig - -import ( - "bytes" - "io" - "io/ioutil" - "reflect" - "sync" - - "github.com/golang/glog" - - "k8s.io/apiserver/pkg/storage/value/encrypt/envelope" -) - -// Factory is a function that returns an envelope Service for encryption providers. -// The config parameter provides an io.Reader handler to the factory in -// order to load specific configurations. If no configuration is provided -// the parameter is nil. -type Factory func(config io.Reader) (envelope.Service, error) - -// KMSPlugins contains all registered KMS options. -type KMSPlugins struct { - lock sync.RWMutex - registry map[string]Factory -} - -var ( - // PluginEnabledFn checks whether a plugin is enabled. By default, if you ask about it, it's enabled. - PluginEnabledFn = func(name string, config io.Reader) bool { - return true - } - - // KMSPluginRegistry contains the registered KMS plugins which can be used for configuring - // encryption providers. - KMSPluginRegistry = KMSPlugins{} -) - -// PluginEnabledFunc is a function type that can provide an external check on whether an admission plugin may be enabled -type PluginEnabledFunc func(name string, config io.Reader) bool - -// Register registers a plugin Factory by name. This -// is expected to happen during app startup. It does not allow -// registering a plugin by the same name twice. -func (ps *KMSPlugins) Register(name string, plugin Factory) { - ps.lock.Lock() - defer ps.lock.Unlock() - _, found := ps.registry[name] - if ps.registry == nil { - ps.registry = map[string]Factory{} - } - if found { - glog.Fatalf("KMS plugin %q was registered twice", name) - } else { - ps.registry[name] = plugin - glog.V(1).Infof("Registered KMS plugin %q", name) - } -} - -// getPlugin creates an instance of the named plugin. It returns `false` if the -// the name is not known. The error is returned only when the named provider was -// known but failed to initialize. The config parameter specifies the io.Reader -// handler of the configuration file for the cloud provider, or nil for no configuration. -func (ps *KMSPlugins) getPlugin(name string, config io.Reader) (envelope.Service, bool, error) { - f, found := ps.fetchPluginFromRegistry(name) - if !found { - return nil, false, nil - } - - config1, config2, err := splitStream(config) - if err != nil { - return nil, true, err - } - if !PluginEnabledFn(name, config1) { - return nil, true, nil - } - - ret, err := f(config2) - return ret, true, err -} - -// fetchPluginFromRegistry tries to get a registered plugin with the requested name. -func (ps *KMSPlugins) fetchPluginFromRegistry(name string) (Factory, bool) { - ps.lock.RLock() - defer ps.lock.RUnlock() - // Map lookup defaults to single value context - f, found := ps.registry[name] - return f, found -} - -// splitStream reads the stream bytes and constructs two copies of it. -func splitStream(config io.Reader) (io.Reader, io.Reader, error) { - if config == nil || reflect.ValueOf(config).IsNil() { - return nil, nil, nil - } - - configBytes, err := ioutil.ReadAll(config) - if err != nil { - return nil, nil, err - } - - return bytes.NewBuffer(configBytes), bytes.NewBuffer(configBytes), nil -} diff --git a/vendor/k8s.io/apiserver/pkg/server/options/encryptionconfig/types.go b/vendor/k8s.io/apiserver/pkg/server/options/encryptionconfig/types.go deleted file mode 100644 index 1603e044a..000000000 --- a/vendor/k8s.io/apiserver/pkg/server/options/encryptionconfig/types.go +++ /dev/null @@ -1,86 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package encryptionconfig - -// EncryptionConfig stores the complete configuration for encryption providers. -type EncryptionConfig struct { - // kind is the type of configuration file. - Kind string `json:"kind"` - // apiVersion is the API version this file has to be parsed as. - APIVersion string `json:"apiVersion"` - // resources is a list containing resources, and their corresponding encryption providers. - Resources []ResourceConfig `json:"resources"` -} - -// ResourceConfig stores per resource configuration. -type ResourceConfig struct { - // resources is a list of kubernetes resources which have to be encrypted. - Resources []string `json:"resources"` - // providers is a list of transformers to be used for reading and writing the resources to disk. - // eg: aesgcm, aescbc, secretbox, identity. - Providers []ProviderConfig `json:"providers"` -} - -// ProviderConfig stores the provided configuration for an encryption provider. -type ProviderConfig struct { - // aesgcm is the configuration for the AES-GCM transformer. - AESGCM *AESConfig `json:"aesgcm,omitempty"` - // aescbc is the configuration for the AES-CBC transformer. - AESCBC *AESConfig `json:"aescbc,omitempty"` - // secretbox is the configuration for the Secretbox based transformer. - Secretbox *SecretboxConfig `json:"secretbox,omitempty"` - // identity is the (empty) configuration for the identity transformer. - Identity *IdentityConfig `json:"identity,omitempty"` - // kms contains the name, cache size and path to configuration file for a KMS based envelope transformer. - KMS *KMSConfig `json:"kms,omitempty"` -} - -// AESConfig contains the API configuration for an AES transformer. -type AESConfig struct { - // keys is a list of keys to be used for creating the AES transformer. - // Each key has to be 32 bytes long for AES-CBC and 16, 24 or 32 bytes for AES-GCM. - Keys []Key `json:"keys"` -} - -// SecretboxConfig contains the API configuration for an Secretbox transformer. -type SecretboxConfig struct { - // keys is a list of keys to be used for creating the Secretbox transformer. - // Each key has to be 32 bytes long. - Keys []Key `json:"keys"` -} - -// Key contains name and secret of the provided key for a transformer. -type Key struct { - // name is the name of the key to be used while storing data to disk. - Name string `json:"name"` - // secret is the actual key, encoded in base64. - Secret string `json:"secret"` -} - -// IdentityConfig is an empty struct to allow identity transformer in provider configuration. -type IdentityConfig struct{} - -// KMSConfig contains the name, cache size and path to configuration file for a KMS based envelope transformer. -type KMSConfig struct { - // name is the name of the KMS plugin to be used. - Name string `json:"name"` - // cacheSize is the maximum number of secrets which are cached in memory. The default value is 1000. - // +optional - CacheSize int `json:"cachesize,omitempty"` - // configfile is the path to the configuration file for the named KMS provider. - ConfigFile string `json:"configfile"` -} diff --git a/vendor/k8s.io/apiserver/pkg/server/plugins.go b/vendor/k8s.io/apiserver/pkg/server/plugins.go new file mode 100644 index 000000000..404e8afc4 --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/server/plugins.go @@ -0,0 +1,28 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package server + +// This file exists to force the desired plugin implementations to be linked into genericapi pkg. +import ( + "k8s.io/apiserver/pkg/admission" + "k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle" +) + +// RegisterAllAdmissionPlugins registers all admission plugins +func RegisterAllAdmissionPlugins(plugins *admission.Plugins) { + lifecycle.Register(plugins) +} diff --git a/vendor/k8s.io/apiserver/pkg/server/serve.go b/vendor/k8s.io/apiserver/pkg/server/serve.go new file mode 100644 index 000000000..90f4078c7 --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/server/serve.go @@ -0,0 +1,212 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package server + +import ( + "crypto/tls" + "crypto/x509" + "fmt" + "net" + "net/http" + "strings" + "time" + + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/validation" + + "github.com/golang/glog" + "github.com/pkg/errors" +) + +const ( + defaultKeepAlivePeriod = 3 * time.Minute +) + +// serveSecurely runs the secure http server. It fails only if certificates cannot +// be loaded or the initial listen call fails. The actual server loop (stoppable by closing +// stopCh) runs in a go routine, i.e. serveSecurely does not block. +func (s *GenericAPIServer) serveSecurely(stopCh <-chan struct{}) error { + secureServer := &http.Server{ + Addr: s.SecureServingInfo.BindAddress, + Handler: s.Handler, + MaxHeaderBytes: 1 << 20, + TLSConfig: &tls.Config{ + NameToCertificate: s.SecureServingInfo.SNICerts, + // Can't use SSLv3 because of POODLE and BEAST + // Can't use TLSv1.0 because of POODLE and BEAST using CBC cipher + // Can't use TLSv1.1 because of RC4 cipher usage + MinVersion: tls.VersionTLS12, + // enable HTTP2 for go's 1.7 HTTP Server + NextProtos: []string{"h2", "http/1.1"}, + }, + } + + if s.SecureServingInfo.MinTLSVersion > 0 { + secureServer.TLSConfig.MinVersion = s.SecureServingInfo.MinTLSVersion + } + if len(s.SecureServingInfo.CipherSuites) > 0 { + secureServer.TLSConfig.CipherSuites = s.SecureServingInfo.CipherSuites + } + + if s.SecureServingInfo.Cert != nil { + secureServer.TLSConfig.Certificates = []tls.Certificate{*s.SecureServingInfo.Cert} + } + + // append all named certs. Otherwise, the go tls stack will think no SNI processing + // is necessary because there is only one cert anyway. + // Moreover, if ServerCert.CertFile/ServerCert.KeyFile are not set, the first SNI + // cert will become the default cert. That's what we expect anyway. + for _, c := range s.SecureServingInfo.SNICerts { + secureServer.TLSConfig.Certificates = append(secureServer.TLSConfig.Certificates, *c) + } + + if s.SecureServingInfo.ClientCA != nil { + // Populate PeerCertificates in requests, but don't reject connections without certificates + // This allows certificates to be validated by authenticators, while still allowing other auth types + secureServer.TLSConfig.ClientAuth = tls.RequestClientCert + // Specify allowed CAs for client certificates + secureServer.TLSConfig.ClientCAs = s.SecureServingInfo.ClientCA + } + + glog.Infof("Serving securely on %s", s.SecureServingInfo.BindAddress) + var err error + s.effectiveSecurePort, err = RunServer(secureServer, s.SecureServingInfo.BindNetwork, stopCh) + return err +} + +// RunServer listens on the given port, then spawns a go-routine continuously serving +// until the stopCh is closed. The port is returned. This function does not block. +func RunServer(server *http.Server, network string, stopCh <-chan struct{}) (int, error) { + if len(server.Addr) == 0 { + return 0, errors.New("address cannot be empty") + } + + if len(network) == 0 { + network = "tcp" + } + + ln, err := net.Listen(network, server.Addr) + if err != nil { + return 0, fmt.Errorf("failed to listen on %v: %v", server.Addr, err) + } + + // get port + tcpAddr, ok := ln.Addr().(*net.TCPAddr) + if !ok { + ln.Close() + return 0, fmt.Errorf("invalid listen address: %q", ln.Addr().String()) + } + + // Stop the server by closing the listener + go func() { + <-stopCh + ln.Close() + }() + + go func() { + defer utilruntime.HandleCrash() + + var listener net.Listener + listener = tcpKeepAliveListener{ln.(*net.TCPListener)} + if server.TLSConfig != nil { + listener = tls.NewListener(listener, server.TLSConfig) + } + + err := server.Serve(listener) + + msg := fmt.Sprintf("Stopped listening on %s", tcpAddr.String()) + select { + case <-stopCh: + glog.Info(msg) + default: + panic(fmt.Sprintf("%s due to error: %v", msg, err)) + } + }() + + return tcpAddr.Port, nil +} + +type NamedTLSCert struct { + TLSCert tls.Certificate + + // names is a list of domain patterns: fully qualified domain names, possibly prefixed with + // wildcard segments. + Names []string +} + +// getNamedCertificateMap returns a map of *tls.Certificate by name. It's is +// suitable for use in tls.Config#NamedCertificates. Returns an error if any of the certs +// cannot be loaded. Returns nil if len(certs) == 0 +func GetNamedCertificateMap(certs []NamedTLSCert) (map[string]*tls.Certificate, error) { + // register certs with implicit names first, reverse order such that earlier trump over the later + byName := map[string]*tls.Certificate{} + for i := len(certs) - 1; i >= 0; i-- { + if len(certs[i].Names) > 0 { + continue + } + cert := &certs[i].TLSCert + + // read names from certificate common names and DNS names + if len(cert.Certificate) == 0 { + return nil, fmt.Errorf("empty SNI certificate, skipping") + } + x509Cert, err := x509.ParseCertificate(cert.Certificate[0]) + if err != nil { + return nil, fmt.Errorf("parse error for SNI certificate: %v", err) + } + cn := x509Cert.Subject.CommonName + if cn == "*" || len(validation.IsDNS1123Subdomain(strings.TrimPrefix(cn, "*."))) == 0 { + byName[cn] = cert + } + for _, san := range x509Cert.DNSNames { + byName[san] = cert + } + // intentionally all IPs in the cert are ignored as SNI forbids passing IPs + // to select a cert. Before go 1.6 the tls happily passed IPs as SNI values. + } + + // register certs with explicit names last, overwriting every of the implicit ones, + // again in reverse order. + for i := len(certs) - 1; i >= 0; i-- { + namedCert := &certs[i] + for _, name := range namedCert.Names { + byName[name] = &certs[i].TLSCert + } + } + + return byName, nil +} + +// tcpKeepAliveListener sets TCP keep-alive timeouts on accepted +// connections. It's used by ListenAndServe and ListenAndServeTLS so +// dead TCP connections (e.g. closing laptop mid-download) eventually +// go away. +// +// Copied from Go 1.7.2 net/http/server.go +type tcpKeepAliveListener struct { + *net.TCPListener +} + +func (ln tcpKeepAliveListener) Accept() (net.Conn, error) { + tc, err := ln.AcceptTCP() + if err != nil { + return nil, err + } + tc.SetKeepAlive(true) + tc.SetKeepAlivePeriod(defaultKeepAlivePeriod) + return tc, nil +} diff --git a/vendor/k8s.io/apiserver/pkg/server/signal.go b/vendor/k8s.io/apiserver/pkg/server/signal.go new file mode 100644 index 000000000..1cd8cefaa --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/server/signal.go @@ -0,0 +1,43 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package server + +import ( + "os" + "os/signal" +) + +var onlyOneSignalHandler = make(chan struct{}) + +// SetupSignalHandler registered for SIGTERM and SIGINT. A stop channel is returned +// which is closed on one of these signals. If a second signal is caught, the program +// is terminated with exit code 1. +func SetupSignalHandler() (stopCh <-chan struct{}) { + close(onlyOneSignalHandler) // panics when called twice + + stop := make(chan struct{}) + c := make(chan os.Signal, 2) + signal.Notify(c, shutdownSignals...) + go func() { + <-c + close(stop) + <-c + os.Exit(1) // second signal. Exit directly. + }() + + return stop +} diff --git a/vendor/k8s.io/apiserver/pkg/server/signal_posix.go b/vendor/k8s.io/apiserver/pkg/server/signal_posix.go new file mode 100644 index 000000000..11b3bba65 --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/server/signal_posix.go @@ -0,0 +1,26 @@ +// +build !windows + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package server + +import ( + "os" + "syscall" +) + +var shutdownSignals = []os.Signal{os.Interrupt, syscall.SIGTERM} diff --git a/vendor/k8s.io/apiserver/pkg/server/signal_windows.go b/vendor/k8s.io/apiserver/pkg/server/signal_windows.go new file mode 100644 index 000000000..e7645a208 --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/server/signal_windows.go @@ -0,0 +1,23 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package server + +import ( + "os" +) + +var shutdownSignals = []os.Signal{os.Interrupt} diff --git a/vendor/k8s.io/apiserver/pkg/storage/value/BUILD b/vendor/k8s.io/apiserver/pkg/storage/value/BUILD deleted file mode 100644 index 0933e9741..000000000 --- a/vendor/k8s.io/apiserver/pkg/storage/value/BUILD +++ /dev/null @@ -1,37 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["transformer_test.go"], - library = ":go_default_library", -) - -go_library( - name = "go_default_library", - srcs = ["transformer.go"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/aes:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/identity:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/secretbox:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/aes/aes.go b/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/aes/aes.go deleted file mode 100644 index daa82f711..000000000 --- a/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/aes/aes.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package aes transforms values for storage at rest using AES-GCM. -package aes - -import ( - "bytes" - "crypto/aes" - "crypto/cipher" - "crypto/rand" - "errors" - "fmt" - "io" - - "k8s.io/apiserver/pkg/storage/value" -) - -// gcm implements AEAD encryption of the provided values given a cipher.Block algorithm. -// The authenticated data provided as part of the value.Context method must match when the same -// value is set to and loaded from storage. In order to ensure that values cannot be copied by -// an attacker from a location under their control, use characteristics of the storage location -// (such as the etcd key) as part of the authenticated data. -// -// Because this mode requires a generated IV and IV reuse is a known weakness of AES-GCM, keys -// must be rotated before a birthday attack becomes feasible. NIST SP 800-38D -// (http://csrc.nist.gov/publications/nistpubs/800-38D/SP-800-38D.pdf) recommends using the same -// key with random 96-bit nonces (the default nonce length) no more than 2^32 times, and -// therefore transformers using this implementation *must* ensure they allow for frequent key -// rotation. Future work should include investigation of AES-GCM-SIV as an alternative to -// random nonces. -type gcm struct { - block cipher.Block -} - -// NewGCMTransformer takes the given block cipher and performs encryption and decryption on the given -// data. -func NewGCMTransformer(block cipher.Block) value.Transformer { - return &gcm{block: block} -} - -func (t *gcm) TransformFromStorage(data []byte, context value.Context) ([]byte, bool, error) { - aead, err := cipher.NewGCM(t.block) - if err != nil { - return nil, false, err - } - nonceSize := aead.NonceSize() - if len(data) < nonceSize { - return nil, false, fmt.Errorf("the stored data was shorter than the required size") - } - result, err := aead.Open(nil, data[:nonceSize], data[nonceSize:], context.AuthenticatedData()) - return result, false, err -} - -func (t *gcm) TransformToStorage(data []byte, context value.Context) ([]byte, error) { - aead, err := cipher.NewGCM(t.block) - if err != nil { - return nil, err - } - nonceSize := aead.NonceSize() - result := make([]byte, nonceSize+aead.Overhead()+len(data)) - n, err := rand.Read(result[:nonceSize]) - if err != nil { - return nil, err - } - if n != nonceSize { - return nil, fmt.Errorf("unable to read sufficient random bytes") - } - cipherText := aead.Seal(result[nonceSize:nonceSize], result[:nonceSize], data, context.AuthenticatedData()) - return result[:nonceSize+len(cipherText)], nil -} - -// cbc implements encryption at rest of the provided values given a cipher.Block algorithm. -type cbc struct { - block cipher.Block -} - -// NewCBCTransformer takes the given block cipher and performs encryption and decryption on the given -// data. -func NewCBCTransformer(block cipher.Block) value.Transformer { - return &cbc{block: block} -} - -var ( - errInvalidBlockSize = fmt.Errorf("the stored data is not a multiple of the block size") - errInvalidPKCS7Data = errors.New("invalid PKCS7 data (empty or not padded)") - errInvalidPKCS7Padding = errors.New("invalid padding on input") -) - -func (t *cbc) TransformFromStorage(data []byte, context value.Context) ([]byte, bool, error) { - blockSize := aes.BlockSize - if len(data) < blockSize { - return nil, false, fmt.Errorf("the stored data was shorter than the required size") - } - iv := data[:blockSize] - data = data[blockSize:] - - if len(data)%blockSize != 0 { - return nil, false, errInvalidBlockSize - } - - result := make([]byte, len(data)) - copy(result, data) - mode := cipher.NewCBCDecrypter(t.block, iv) - mode.CryptBlocks(result, result) - - // remove and verify PKCS#7 padding for CBC - c := result[len(result)-1] - paddingSize := int(c) - size := len(result) - paddingSize - if paddingSize == 0 || paddingSize > len(result) { - return nil, false, errInvalidPKCS7Data - } - for i := 0; i < paddingSize; i++ { - if result[size+i] != c { - return nil, false, errInvalidPKCS7Padding - } - } - - return result[:size], false, nil -} - -func (t *cbc) TransformToStorage(data []byte, context value.Context) ([]byte, error) { - blockSize := aes.BlockSize - paddingSize := blockSize - (len(data) % blockSize) - result := make([]byte, blockSize+len(data)+paddingSize) - iv := result[:blockSize] - if _, err := io.ReadFull(rand.Reader, iv); err != nil { - return nil, fmt.Errorf("unable to read sufficient random bytes") - } - copy(result[blockSize:], data) - - // add PKCS#7 padding for CBC - copy(result[blockSize+len(data):], bytes.Repeat([]byte{byte(paddingSize)}, paddingSize)) - - mode := cipher.NewCBCEncrypter(t.block, iv) - mode.CryptBlocks(result[blockSize:], result[blockSize:]) - return result, nil -} diff --git a/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/envelope.go b/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/envelope.go deleted file mode 100644 index acb26e6f5..000000000 --- a/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/envelope.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package envelope transforms values for storage at rest using a Envelope provider -package envelope - -import ( - "crypto/aes" - "crypto/cipher" - "crypto/rand" - "encoding/binary" - "fmt" - - "k8s.io/apiserver/pkg/storage/value" - - lru "github.com/hashicorp/golang-lru" -) - -// defaultCacheSize is the number of decrypted DEKs which would be cached by the transformer. -const defaultCacheSize = 1000 - -// Service allows encrypting and decrypting data using an external Key Management Service. -type Service interface { - // Decrypt a given data string to obtain the original byte data. - Decrypt(data string) ([]byte, error) - // Encrypt bytes to a string ciphertext. - Encrypt(data []byte) (string, error) -} - -type envelopeTransformer struct { - envelopeService Service - - // transformers is a thread-safe LRU cache which caches decrypted DEKs indexed by their encrypted form. - transformers *lru.Cache - - // cacheSize is the maximum number of DEKs that are cached. - cacheSize int - - // baseTransformerFunc creates a new transformer for encrypting the data with the DEK. - baseTransformerFunc func(cipher.Block) value.Transformer -} - -// NewEnvelopeTransformer returns a transformer which implements a KEK-DEK based envelope encryption scheme. -// It uses envelopeService to encrypt and decrypt DEKs. Respective DEKs (in encrypted form) are prepended to -// the data items they encrypt. A cache (of size cacheSize) is maintained to store the most recently -// used decrypted DEKs in memory. -func NewEnvelopeTransformer(envelopeService Service, cacheSize int, baseTransformerFunc func(cipher.Block) value.Transformer) (value.Transformer, error) { - if cacheSize == 0 { - cacheSize = defaultCacheSize - } - cache, err := lru.New(cacheSize) - if err != nil { - return nil, err - } - return &envelopeTransformer{ - envelopeService: envelopeService, - transformers: cache, - cacheSize: cacheSize, - baseTransformerFunc: baseTransformerFunc, - }, nil -} - -// TransformFromStorage decrypts data encrypted by this transformer using envelope encryption. -func (t *envelopeTransformer) TransformFromStorage(data []byte, context value.Context) ([]byte, bool, error) { - // Read the 16 bit length-of-DEK encoded at the start of the encrypted DEK. 16 bits can - // represent a maximum key length of 65536 bytes. We are using a 256 bit key, whose - // length cannot fit in 8 bits (1 byte). Thus, we use 16 bits (2 bytes) to store the length. - keyLen := int(binary.BigEndian.Uint16(data[:2])) - if keyLen+2 > len(data) { - return nil, false, fmt.Errorf("invalid data encountered by genvelope transformer, length longer than available bytes: %q", data) - } - encKey := string(data[2 : keyLen+2]) - encData := data[2+keyLen:] - - var transformer value.Transformer - // Look up the decrypted DEK from cache or Envelope. - _transformer, found := t.transformers.Get(encKey) - if found { - transformer = _transformer.(value.Transformer) - } else { - key, err := t.envelopeService.Decrypt(encKey) - if err != nil { - return nil, false, fmt.Errorf("error while decrypting key: %q", err) - } - transformer, err = t.addTransformer(encKey, key) - if err != nil { - return nil, false, err - } - } - return transformer.TransformFromStorage(encData, context) -} - -// TransformToStorage encrypts data to be written to disk using envelope encryption. -func (t *envelopeTransformer) TransformToStorage(data []byte, context value.Context) ([]byte, error) { - newKey, err := generateKey(32) - if err != nil { - return nil, err - } - - encKey, err := t.envelopeService.Encrypt(newKey) - if err != nil { - return nil, err - } - - transformer, err := t.addTransformer(encKey, newKey) - if err != nil { - return nil, err - } - - // Append the length of the encrypted DEK as the first 2 bytes. - encKeyLen := make([]byte, 2) - encKeyBytes := []byte(encKey) - binary.BigEndian.PutUint16(encKeyLen, uint16(len(encKeyBytes))) - - prefix := append(encKeyLen, encKeyBytes...) - - prefixedData := make([]byte, len(prefix), len(data)+len(prefix)) - copy(prefixedData, prefix) - result, err := transformer.TransformToStorage(data, context) - if err != nil { - return nil, err - } - prefixedData = append(prefixedData, result...) - return prefixedData, nil -} - -var _ value.Transformer = &envelopeTransformer{} - -// addTransformer inserts a new transformer to the Envelope cache of DEKs for future reads. -func (t *envelopeTransformer) addTransformer(encKey string, key []byte) (value.Transformer, error) { - block, err := aes.NewCipher(key) - if err != nil { - return nil, err - } - transformer := t.baseTransformerFunc(block) - t.transformers.Add(encKey, transformer) - return transformer, nil -} - -// generateKey generates a random key using system randomness. -func generateKey(length int) ([]byte, error) { - key := make([]byte, length) - _, err := rand.Read(key) - if err != nil { - return nil, err - } - - return key, nil -} diff --git a/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/identity/identity.go b/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/identity/identity.go deleted file mode 100644 index e322bd9b1..000000000 --- a/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/identity/identity.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package identity - -import ( - "bytes" - "fmt" - - "k8s.io/apiserver/pkg/storage/value" -) - -// identityTransformer performs no transformation on provided data, but validates -// that the data is not encrypted data during TransformFromStorage -type identityTransformer struct{} - -// NewEncryptCheckTransformer returns an identityTransformer which returns an error -// on attempts to read encrypted data -func NewEncryptCheckTransformer() value.Transformer { - return identityTransformer{} -} - -// TransformFromStorage returns the input bytes if the data is not encrypted -func (identityTransformer) TransformFromStorage(b []byte, context value.Context) ([]byte, bool, error) { - // identityTransformer has to return an error if the data is encoded using another transformer. - // JSON data starts with '{'. Protobuf data has a prefix 'k8s[\x00-\xFF]'. - // Prefix 'k8s:enc:' is reserved for encrypted data on disk. - if bytes.HasPrefix(b, []byte("k8s:enc:")) { - return []byte{}, false, fmt.Errorf("identity transformer tried to read encrypted data") - } - return b, false, nil -} - -// TransformToStorage implements the Transformer interface for identityTransformer -func (identityTransformer) TransformToStorage(b []byte, context value.Context) ([]byte, error) { - return b, nil -} diff --git a/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/secretbox/BUILD b/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/secretbox/BUILD deleted file mode 100644 index 79308921a..000000000 --- a/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/secretbox/BUILD +++ /dev/null @@ -1,36 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["secretbox_test.go"], - library = ":go_default_library", - deps = ["//vendor/k8s.io/apiserver/pkg/storage/value:go_default_library"], -) - -go_library( - name = "go_default_library", - srcs = ["secretbox.go"], - deps = [ - "//vendor/golang.org/x/crypto/nacl/secretbox:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/value:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/secretbox/secretbox.go b/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/secretbox/secretbox.go deleted file mode 100644 index f53aa2c37..000000000 --- a/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/secretbox/secretbox.go +++ /dev/null @@ -1,69 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package secretbox transforms values for storage at rest using XSalsa20 and Poly1305. -package secretbox - -import ( - "crypto/rand" - "fmt" - - "golang.org/x/crypto/nacl/secretbox" - - "k8s.io/apiserver/pkg/storage/value" -) - -// secretbox implements at rest encryption of the provided values given a 32 byte secret key. -// Uses a standard 24 byte nonce (placed at the the beginning of the cipher text) generated -// from crypto/rand. Does not perform authentication of the data at rest. -type secretboxTransformer struct { - key [32]byte -} - -const nonceSize = 24 - -// NewSecretboxTransformer takes the given key and performs encryption and decryption on the given -// data. -func NewSecretboxTransformer(key [32]byte) value.Transformer { - return &secretboxTransformer{key: key} -} - -func (t *secretboxTransformer) TransformFromStorage(data []byte, context value.Context) ([]byte, bool, error) { - if len(data) < (secretbox.Overhead + nonceSize) { - return nil, false, fmt.Errorf("the stored data was shorter than the required size") - } - var nonce [nonceSize]byte - copy(nonce[:], data[:nonceSize]) - data = data[nonceSize:] - out := make([]byte, 0, len(data)-secretbox.Overhead) - result, ok := secretbox.Open(out, data, &nonce, &t.key) - if !ok { - return nil, false, fmt.Errorf("output array was not large enough for encryption") - } - return result, false, nil -} - -func (t *secretboxTransformer) TransformToStorage(data []byte, context value.Context) ([]byte, error) { - var nonce [nonceSize]byte - n, err := rand.Read(nonce[:]) - if err != nil { - return nil, err - } - if n != nonceSize { - return nil, fmt.Errorf("unable to read sufficient random bytes") - } - return secretbox.Seal(nonce[:], data, &nonce, &t.key), nil -} diff --git a/vendor/k8s.io/apiserver/pkg/storage/value/transformer.go b/vendor/k8s.io/apiserver/pkg/storage/value/transformer.go deleted file mode 100644 index 04af5d6db..000000000 --- a/vendor/k8s.io/apiserver/pkg/storage/value/transformer.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package value contains methods for assisting with transformation of values in storage. -package value - -import ( - "bytes" - "fmt" - "sync" -) - -// Context is additional information that a storage transformation may need to verify the data at rest. -type Context interface { - // AuthenticatedData should return an array of bytes that describes the current value. If the value changes, - // the transformer may report the value as unreadable or tampered. This may be nil if no such description exists - // or is needed. For additional verification, set this to data that strongly identifies the value, such as - // the key and creation version of the stored data. - AuthenticatedData() []byte -} - -// Transformer allows a value to be transformed before being read from or written to the underlying store. The methods -// must be able to undo the transformation caused by the other. -type Transformer interface { - // TransformFromStorage may transform the provided data from its underlying storage representation or return an error. - // Stale is true if the object on disk is stale and a write to etcd should be issued, even if the contents of the object - // have not changed. - TransformFromStorage(data []byte, context Context) (out []byte, stale bool, err error) - // TransformToStorage may transform the provided data into the appropriate form in storage or return an error. - TransformToStorage(data []byte, context Context) (out []byte, err error) -} - -type identityTransformer struct{} - -// IdentityTransformer performs no transformation of the provided data. -var IdentityTransformer Transformer = identityTransformer{} - -func (identityTransformer) TransformFromStorage(b []byte, ctx Context) ([]byte, bool, error) { - return b, false, nil -} -func (identityTransformer) TransformToStorage(b []byte, ctx Context) ([]byte, error) { - return b, nil -} - -// DefaultContext is a simple implementation of Context for a slice of bytes. -type DefaultContext []byte - -// AuthenticatedData returns itself. -func (c DefaultContext) AuthenticatedData() []byte { return []byte(c) } - -// MutableTransformer allows a transformer to be changed safely at runtime. -type MutableTransformer struct { - lock sync.RWMutex - transformer Transformer -} - -// NewMutableTransformer creates a transformer that can be updated at any time by calling Set() -func NewMutableTransformer(transformer Transformer) *MutableTransformer { - return &MutableTransformer{transformer: transformer} -} - -// Set updates the nested transformer. -func (t *MutableTransformer) Set(transformer Transformer) { - t.lock.Lock() - t.transformer = transformer - t.lock.Unlock() -} - -func (t *MutableTransformer) TransformFromStorage(data []byte, context Context) (out []byte, stale bool, err error) { - t.lock.RLock() - transformer := t.transformer - t.lock.RUnlock() - return transformer.TransformFromStorage(data, context) -} -func (t *MutableTransformer) TransformToStorage(data []byte, context Context) (out []byte, err error) { - t.lock.RLock() - transformer := t.transformer - t.lock.RUnlock() - return transformer.TransformToStorage(data, context) -} - -// PrefixTransformer holds a transformer interface and the prefix that the transformation is located under. -type PrefixTransformer struct { - Prefix []byte - Transformer Transformer -} - -type prefixTransformers struct { - transformers []PrefixTransformer - err error -} - -var _ Transformer = &prefixTransformers{} - -// NewPrefixTransformers supports the Transformer interface by checking the incoming data against the provided -// prefixes in order. The first matching prefix will be used to transform the value (the prefix is stripped -// before the Transformer interface is invoked). The first provided transformer will be used when writing to -// the store. -func NewPrefixTransformers(err error, transformers ...PrefixTransformer) Transformer { - if err == nil { - err = fmt.Errorf("the provided value does not match any of the supported transformers") - } - return &prefixTransformers{ - transformers: transformers, - err: err, - } -} - -// TransformFromStorage finds the first transformer with a prefix matching the provided data and returns -// the result of transforming the value. It will always mark any transformation as stale that is not using -// the first transformer. -func (t *prefixTransformers) TransformFromStorage(data []byte, context Context) ([]byte, bool, error) { - for i, transformer := range t.transformers { - if bytes.HasPrefix(data, transformer.Prefix) { - result, stale, err := transformer.Transformer.TransformFromStorage(data[len(transformer.Prefix):], context) - // To migrate away from encryption, user can specify an identity transformer higher up - // (in the config file) than the encryption transformer. In that scenario, the identity transformer needs to - // identify (during reads from disk) whether the data being read is encrypted or not. If the data is encrypted, - // it shall throw an error, but that error should not prevent subsequent transformers from being tried. - if len(transformer.Prefix) == 0 && err != nil { - continue - } - return result, stale || i != 0, err - } - } - return nil, false, t.err -} - -// TransformToStorage uses the first transformer and adds its prefix to the data. -func (t *prefixTransformers) TransformToStorage(data []byte, context Context) ([]byte, error) { - transformer := t.transformers[0] - prefixedData := make([]byte, len(transformer.Prefix), len(data)+len(transformer.Prefix)) - copy(prefixedData, transformer.Prefix) - result, err := transformer.Transformer.TransformToStorage(data, context) - if err != nil { - return nil, err - } - prefixedData = append(prefixedData, result...) - return prefixedData, nil -} diff --git a/vendor/k8s.io/apiserver/pkg/util/feature/feature_gate_test.go b/vendor/k8s.io/apiserver/pkg/util/feature/feature_gate_test.go new file mode 100644 index 000000000..c4525ad0c --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/util/feature/feature_gate_test.go @@ -0,0 +1,191 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package feature + +import ( + "fmt" + "strings" + "testing" + + "github.com/spf13/pflag" +) + +func TestFeatureGateFlag(t *testing.T) { + // gates for testing + const testAlphaGate Feature = "TestAlpha" + const testBetaGate Feature = "TestBeta" + + tests := []struct { + arg string + expect map[Feature]bool + parseError string + }{ + { + arg: "", + expect: map[Feature]bool{ + allAlphaGate: false, + testAlphaGate: false, + testBetaGate: false, + }, + }, + { + arg: "fooBarBaz=maybeidk", + expect: map[Feature]bool{ + allAlphaGate: false, + testAlphaGate: false, + testBetaGate: false, + }, + parseError: "unrecognized key: fooBarBaz", + }, + { + arg: "AllAlpha=false", + expect: map[Feature]bool{ + allAlphaGate: false, + testAlphaGate: false, + testBetaGate: false, + }, + }, + { + arg: "AllAlpha=true", + expect: map[Feature]bool{ + allAlphaGate: true, + testAlphaGate: true, + testBetaGate: false, + }, + }, + { + arg: "AllAlpha=banana", + expect: map[Feature]bool{ + allAlphaGate: false, + testAlphaGate: false, + testBetaGate: false, + }, + parseError: "invalid value of AllAlpha", + }, + { + arg: "AllAlpha=false,TestAlpha=true", + expect: map[Feature]bool{ + allAlphaGate: false, + testAlphaGate: true, + testBetaGate: false, + }, + }, + { + arg: "TestAlpha=true,AllAlpha=false", + expect: map[Feature]bool{ + allAlphaGate: false, + testAlphaGate: true, + testBetaGate: false, + }, + }, + { + arg: "AllAlpha=true,TestAlpha=false", + expect: map[Feature]bool{ + allAlphaGate: true, + testAlphaGate: false, + testBetaGate: false, + }, + }, + { + arg: "TestAlpha=false,AllAlpha=true", + expect: map[Feature]bool{ + allAlphaGate: true, + testAlphaGate: false, + testBetaGate: false, + }, + }, + { + arg: "TestBeta=true,AllAlpha=false", + expect: map[Feature]bool{ + allAlphaGate: false, + testAlphaGate: false, + testBetaGate: true, + }, + }, + } + for i, test := range tests { + fs := pflag.NewFlagSet("testfeaturegateflag", pflag.ContinueOnError) + f := NewFeatureGate() + f.Add(map[Feature]FeatureSpec{ + testAlphaGate: {Default: false, PreRelease: Alpha}, + testBetaGate: {Default: false, PreRelease: Beta}, + }) + f.AddFlag(fs) + + err := fs.Parse([]string{fmt.Sprintf("--%s=%s", flagName, test.arg)}) + if test.parseError != "" { + if !strings.Contains(err.Error(), test.parseError) { + t.Errorf("%d: Parse() Expected %v, Got %v", i, test.parseError, err) + } + } else if err != nil { + t.Errorf("%d: Parse() Expected nil, Got %v", i, err) + } + for k, v := range test.expect { + if f.enabled[k] != v { + t.Errorf("%d: expected %s=%v, Got %v", i, k, v, f.enabled[k]) + } + } + } +} + +func TestFeatureGateOverride(t *testing.T) { + const testAlphaGate Feature = "TestAlpha" + const testBetaGate Feature = "TestBeta" + + // Don't parse the flag, assert defaults are used. + var f FeatureGate = NewFeatureGate() + f.Add(map[Feature]FeatureSpec{ + testAlphaGate: {Default: false, PreRelease: Alpha}, + testBetaGate: {Default: false, PreRelease: Beta}, + }) + + f.Set("TestAlpha=true,TestBeta=true") + if f.Enabled(testAlphaGate) != true { + t.Errorf("Expected true") + } + if f.Enabled(testBetaGate) != true { + t.Errorf("Expected true") + } + + f.Set("TestAlpha=false") + if f.Enabled(testAlphaGate) != false { + t.Errorf("Expected false") + } + if f.Enabled(testBetaGate) != true { + t.Errorf("Expected true") + } +} + +func TestFeatureGateFlagDefaults(t *testing.T) { + // gates for testing + const testAlphaGate Feature = "TestAlpha" + const testBetaGate Feature = "TestBeta" + + // Don't parse the flag, assert defaults are used. + var f FeatureGate = NewFeatureGate() + f.Add(map[Feature]FeatureSpec{ + testAlphaGate: {Default: false, PreRelease: Alpha}, + testBetaGate: {Default: true, PreRelease: Beta}, + }) + + if f.Enabled(testAlphaGate) != false { + t.Errorf("Expected false") + } + if f.Enabled(testBetaGate) != true { + t.Errorf("Expected true") + } +} diff --git a/vendor/k8s.io/client-go/.travis.yml b/vendor/k8s.io/client-go/.travis.yml new file mode 100644 index 000000000..557658ed4 --- /dev/null +++ b/vendor/k8s.io/client-go/.travis.yml @@ -0,0 +1,8 @@ +language: go + +go_import_path: k8s.io/client-go + +go: + - 1.8.1 + +script: go build ./... diff --git a/vendor/k8s.io/client-go/CHANGELOG.md b/vendor/k8s.io/client-go/CHANGELOG.md new file mode 100644 index 000000000..2bd29ba1e --- /dev/null +++ b/vendor/k8s.io/client-go/CHANGELOG.md @@ -0,0 +1,139 @@ +TODO: This document was manually maintained so might be incomplete. The +automation effort is tracked in +https://github.com/kubernetes/client-go/issues/234. + +# HEAD (changes that will go into v5) + +** Breaking changes** + +pkg/api and pkg/apis are moved to +[k8s.io/api](https://github.com/kubernetes/api). Other kubernetes repositories +also import types from there, so they are composable with client-go. + +Helper functions in pkg/api and pkg/apis are also removed. They are planned to +be exported in other repos. The issue is tracked +[here](https://github.com/kubernetes/kubernetes/issues/48209#issuecomment-314537745). +During the transition, you'll have to copy the helper functions to your projects. + +# v4.0.0 + +No significant changes since v4.0.0-beta.0. + +# v4.0.0-beta.0 + +**New features:** + +* Added OpenAPISchema support in the discovery client + + * [https://github.com/kubernetes/kubernetes/pull/44531](https://github.com/kubernetes/kubernetes/pull/44531) + +* Added mutation cache filter: MutationCache is able to take the result of update operations and stores them in an LRU that can be used to provide a more current view of a requested object. + + * [https://github.com/kubernetes/kubernetes/pull/45838](https://github.com/kubernetes/kubernetes/pull/45838/commits/f88c7725b4f9446c652d160bdcfab7c6201bddea) + +* Moved the remotecommand package (used by `kubectl exec/attach`) to client-go + + * [https://github.com/kubernetes/kubernetes/pull/41331](https://github.com/kubernetes/kubernetes/pull/41331) + +* Added support for following redirects to the SpdyRoundTripper + + * [https://github.com/kubernetes/kubernetes/pull/44451](https://github.com/kubernetes/kubernetes/pull/44451) + +* Added Azure Active Directory plugin + + * [https://github.com/kubernetes/kubernetes/pull/43987](https://github.com/kubernetes/kubernetes/pull/43987) + +**Usability improvements:** + +* Added several new examples and reorganized client-go/examples + + * [Related PRs](https://github.com/kubernetes/kubernetes/commits/release-1.7/staging/src/k8s.io/client-go/examples) + +**API changes:** + +* Added networking.k8s.io/v1 API + + * [https://github.com/kubernetes/kubernetes/pull/39164](https://github.com/kubernetes/kubernetes/pull/39164) + +* ControllerRevision type added for StatefulSet and DaemonSet history. + + * [https://github.com/kubernetes/kubernetes/pull/45867](https://github.com/kubernetes/kubernetes/pull/45867) + +* Added support for initializers + + * [https://github.com/kubernetes/kubernetes/pull/38058](https://github.com/kubernetes/kubernetes/pull/38058) + +* Added admissionregistration.k8s.io/v1alpha1 API + + * [https://github.com/kubernetes/kubernetes/pull/46294](https://github.com/kubernetes/kubernetes/pull/46294) + +**Breaking changes:** + +* Moved client-go/util/clock to apimachinery/pkg/util/clock + + * [https://github.com/kubernetes/kubernetes/pull/45933](https://github.com/kubernetes/kubernetes/pull/45933/commits/8013212db54e95050c622675c6706cce5de42b45) + +* Some [API helpers](https://github.com/kubernetes/client-go/blob/release-3.0/pkg/api/helpers.go) were removed. + +* Dynamic client takes GetOptions as an input parameter + + * [https://github.com/kubernetes/kubernetes/pull/47251](https://github.com/kubernetes/kubernetes/pull/47251) + +**Bug fixes:** + +* PortForwarder: don't log an error if net.Listen fails. [https://github.com/kubernetes/kubernetes/pull/44636](https://github.com/kubernetes/kubernetes/pull/44636) + +* oidc auth plugin not to override the Auth header if it's already exits. [https://github.com/kubernetes/kubernetes/pull/45529](https://github.com/kubernetes/kubernetes/pull/45529) + +* The --namespace flag is now honored for in-cluster clients that have an empty configuration. [https://github.com/kubernetes/kubernetes/pull/46299](https://github.com/kubernetes/kubernetes/pull/46299) + +* GCP auth plugin no longer overwrites existing Authorization headers. [https://github.com/kubernetes/kubernetes/pull/45575](https://github.com/kubernetes/kubernetes/pull/45575) + +# v3.0.0 + +Bug fixes: +* Use OS-specific libs when computing client User-Agent in kubectl, etc. (https://github.com/kubernetes/kubernetes/pull/44423) +* kubectl commands run inside a pod using a kubeconfig file now use the namespace specified in the kubeconfig file, instead of using the pod namespace. If no kubeconfig file is used, or the kubeconfig does not specify a namespace, the pod namespace is still used as a fallback. (https://github.com/kubernetes/kubernetes/pull/44570) +* Restored the ability of kubectl running inside a pod to consume resource files specifying a different namespace than the one the pod is running in. (https://github.com/kubernetes/kubernetes/pull/44862) + +# v3.0.0-beta.0 + +* Added dependency on k8s.io/apimachinery. The impacts include changing import path of API objects like `ListOptions` from `k8s.io/client-go/pkg/api/v1` to `k8s.io/apimachinery/pkg/apis/meta/v1`. +* Added generated listers (listers/) and informers (informers/) +* Kubernetes API changes: + * Added client support for: + * authentication/v1 + * authorization/v1 + * autoscaling/v2alpha1 + * rbac/v1beta1 + * settings/v1alpha1 + * storage/v1 + * Changed client support for: + * certificates from v1alpha1 to v1beta1 + * policy from v1alpha1 to v1beta1 + * Deleted client support for: + * extensions/v1beta1#Job +* CHANGED: pass typed options to dynamic client (https://github.com/kubernetes/kubernetes/pull/41887) + +# v2.0.0 + +* Included bug fixes in k8s.io/kuberentes release-1.5 branch, up to commit + bde8578d9675129b7a2aa08f1b825ec6cc0f3420 + +# v2.0.0-alpha.1 + +* Removed top-level version folder (e.g., 1.4 and 1.5), switching to maintaining separate versions + in separate branches. +* Clientset supported multiple versions per API group +* Added ThirdPartyResources example +* Kubernetes API changes + * Apps API group graduated to v1beta1 + * Policy API group graduated to v1beta1 + * Added support for batch/v2alpha1/cronjob + * Renamed PetSet to StatefulSet + + +# v1.5.0 + +* Included the auth plugin (https://github.com/kubernetes/kubernetes/pull/33334) +* Added timeout field to RESTClient config (https://github.com/kubernetes/kubernetes/pull/33958) diff --git a/vendor/k8s.io/client-go/INSTALL.md b/vendor/k8s.io/client-go/INSTALL.md new file mode 100644 index 000000000..c4e4d99b2 --- /dev/null +++ b/vendor/k8s.io/client-go/INSTALL.md @@ -0,0 +1,180 @@ +# Installing client-go + +## For the casual user + +If you want to write a simple script, don't care about a reproducible client +library install, don't mind getting head (which may be less stable than a +particular release), then simply: + +```sh +$ go get k8s.io/client-go/... +``` + +This will install `k8s.io/client-go` in your `$GOPATH`. `k8s.io/client-go` +includes most of its own dependencies in its `k8s.io/client-go/vendor` path, +except for `k8s.io/apimachinery` and `glog`. `go get` will recursively download +these excluded repos to your `$GOPATH`, if they don't already exist. If +`k8s.io/apimachinery` preexisted in `$GOPATH`, you also need to: + +```sh +$ go get -u k8s.io/apimachinery/... +``` + +because the head of client-go is only guaranteed to work with the head of +apimachinery. + +We excluded `k8s.io/apimachinery` and `glog` from `k8s.io/client-go/vendor` to +prevent `go get` users from hitting issues like +[#19](https://github.com/kubernetes/client-go/issues/19) and +[#83](https://github.com/kubernetes/client-go/issues/83). If your project share +other dependencies with client-go, and you hit issues similar to #19 or #83, +then you'll need to look down at the next section. + +Note: the official go policy is that libraries should not vendor their +dependencies. This is unworkable for us, since our dependencies change and HEAD +on every dependency has not necessarily been tested with client-go. In fact, +HEAD from all dependencies may not even compile with client-go! + +## Dependency management for the serious (or reluctant) user + +Reasons why you might need to use a dependency management system: +* You use a dependency that client-go also uses, and don't want two copies of + the dependency compiled into your application. For some dependencies with + singletons or global inits (e.g. `glog`) this wouldn't even compile... +* You want to lock in a particular version (so you don't have to change your + code every time we change a public interface). +* You want your install to be reproducible. For example, for your CI system or + for new team members. + +There are three tools you could in theory use for this. Instructions +for each follows. + +### Godep + +[godep](https://github.com/tools/godep) is an older dependency management tool, which is +used by the main Kubernetes repo and `client-go` to manage dependencies. + +Before proceeding with the below instructions, you should ensure that your +$GOPATH is empty except for containing your own package and its dependencies, +and you have a copy of godep somewhere in your $PATH. + +To install `client-go` and place its dependencies in your `$GOPATH`: + +```sh +go get k8s.io/client-go/... +cd $GOPATH/src/k8s.io/client-go +git checkout v2.0.0 +# cd 1.5 # only necessary with 1.5 and 1.4 clients. +godep restore ./... +``` + +At this point, `client-go`'s dependencies have been placed in your $GOPATH, but +if you were to build, `client-go` would still see its own copy of its +dependencies in its `vendor` directory. You have two options at this point. + +If you would like to keep dependencies in your own project's vendor directory, +then you can continue like this: + +```sh +cd $GOPATH/src/<my-pkg> +godep save ./... +``` + +Alternatively, if you want to build using the dependencies in your `$GOPATH`, +then `rm -rf vendor/` to remove `client-go`'s copy of its dependencies. + +### Glide + +[Glide](https://github.com/Masterminds/glide) is another popular dependency +management tool for Go. Glide will manage your /vendor directory, but unlike +godep, will not use or modify your $GOPATH (there's no equivalent of +`godep restore` or `godep save`). + +Generally, it's best to avoid Glide's many subcommands, favoring modifying +Glide's manifest file (`glide.yaml`) directly, then running +`glide update --strip-vendor`. First create a `glide.yaml` file at the root of +your project: + +```yaml +package: ( your project's import path ) # e.g. github.com/foo/bar +import: +- package: k8s.io/client-go + version: v2.0.0 +``` + +Second, add a Go file that imports `client-go` somewhere in your project, +otherwise `client-go`'s dependencies will not be added to your project's +vendor/. Then run the following command in the same directory as `glide.yaml`: + +```sh +glide update --strip-vendor +``` + +This can also be abbreviated as: + +```sh +glide up -v +``` + +At this point, `k8s.io/client-go` should be added to your project's vendor/. +`client-go`'s dependencies should be flattened and be added to your project's +vendor/ as well. + +Glide will detect the versions of dependencies `client-go` specified in +`client-go`'s Godep.json file, and automatically set the versions of these +imports in your /vendor directory. It will also record the detected version of +all dependencies in the `glide.lock` file. + +Projects that require a different version of a dependency than `client-go` +requests can override the version manually in `glide.yaml`. For example: + +```yaml +package: ( your project's import path ) # e.g. github.com/foo/bar +import: +- package: k8s.io/client-go + version: v2.0.0 +# Use a newer version of go-spew even though client-go wants an old one. +- package: github.com/davecgh/go-spew + version: v1.1.0 +``` + +After modifying, run `glide up -v` again to re-populate your /vendor directory. + +Optionally, Glide users can also use [`glide-vc`](https://github.com/sgotti/glide-vc) +after running `glide up -v` to remove unused files from /vendor. + +### Dep + +[dep](https://github.com/golang/dep) is an up-and-coming dependency management tool, +which has the goal of being accepted as part of the standard go toolchain. Its +status is currently alpha. However, it comes the closest to working easily out +of the box. + +```sh +$ go get github.com/golang/dep +$ go install github.com/golang/dep/cmd/dep + +# Make sure you have a go file in your directory which imports a package of +# k8s.io/client-go first--I suggest copying one of the examples. +$ dep init +$ dep ensure k8s.io/client-go@^2.0.0 +``` + +Then you can try one of the +[examples](https://github.com/kubernetes/client-go/tree/v2.0.0/examples/) from +the 2.0.0 release. + +This will set up a `vendor` directory in your current directory, add `k8s.io/client-go` +to it, and flatten all of `k8s.io/client-go`'s dependencies into that vendor directory, +so that your code and `client-go` will both get the same copy of each +dependency. + +After installing like this, you could either use dep for your other +dependencies, or copy everything in the `vendor` directory into your +`$GOPATH/src` directory and proceed as if you had done a fancy `go get` that +flattened dependencies sanely. + +One thing to note about dep is that it will omit dependencies that aren't +actually used, and some dependencies of `client-go` are used only if you import +one of the plugins (for example, the auth plugins). So you may need to run `dep +ensure` again if you start importing a plugin that you weren't using before. diff --git a/vendor/k8s.io/client-go/OWNERS b/vendor/k8s.io/client-go/OWNERS new file mode 100644 index 000000000..44a4c9e1f --- /dev/null +++ b/vendor/k8s.io/client-go/OWNERS @@ -0,0 +1,44 @@ +approvers: +- caesarxuchao +- deads2k +- krousey +- lavalamp +- smarterclayton +- sttts +- liggitt +reviewers: +- thockin +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- yujuhong +- derekwaynecarr +- caesarxuchao +- vishh +- mikedanese +- liggitt +- nikhiljindal +- gmarek +- erictune +- davidopp +- pmorie +- sttts +- dchen1107 +- saad-ali +- zmerlynn +- luxas +- janetkuo +- justinsb +- roberthbailey +- ncdc +- tallclair +- yifan-gu +- eparis +- mwielgus +- timothysc +- feiskyer +- jlowdermilk +- soltysh +- piosz +- jsafrane diff --git a/vendor/k8s.io/client-go/README.md b/vendor/k8s.io/client-go/README.md new file mode 100644 index 000000000..afd03ced3 --- /dev/null +++ b/vendor/k8s.io/client-go/README.md @@ -0,0 +1,157 @@ +# client-go + +Go clients for talking to a [kubernetes](http://kubernetes.io/) cluster. + +We currently recommend using the v4.0.0 tag. See [INSTALL.md](/INSTALL.md) for +detailed installation instructions. `go get k8s.io/client-go/...` works, but +will give you head and doesn't handle the dependencies well. + +[![Build Status](https://travis-ci.org/kubernetes/client-go.svg?branch=master)](https://travis-ci.org/kubernetes/client-go) +[![GoDoc](https://godoc.org/k8s.io/client-go?status.svg)](https://godoc.org/k8s.io/client-go) + +## Table of Contents + +- [What's included](#whats-included) +- [Versioning](#versioning) + - [Compatibility: your code <-> client-go](#compatibility-your-code---client-go) + - [Compatibility: client-go <-> Kubernetes clusters](#compatibility-client-go---kubernetes-clusters) + - [Compatibility matrix](#compatibility-matrix) + - [Why do the 1.4 and 1.5 branch contain top-level folder named after the version?](#why-do-the-14-and-15-branch-contain-top-level-folder-named-after-the-version) +- [How to get it](#how-to-get-it) +- [How to use it](#how-to-use-it) +- [Dependency management](#dependency-management) +- [Contributing code](#contributing-code) + +### What's included + +* The `kubernetes` package contains the clientset to access Kubernetes API. +* The `discovery` package is used to discover APIs supported by a Kubernetes API server. +* The `dynamic` package contains a dynamic client that can perform generic operations on arbitrary Kubernetes API objects. +* The `transport` package is used to set up auth and start a connection. +* The `tools/cache` package is useful for writing controllers. + +### Versioning + +`client-go` follows [semver](http://semver.org/). We will not make +backwards-incompatible changes without incrementing the major version number. A +change is backwards-incompatible either if it *i)* changes the public interfaces +of `client-go`, or *ii)* makes `client-go` incompatible with otherwise supported +versions of Kubernetes clusters. + +Changes that add features in a backwards-compatible way will result in bumping +the minor version (second digit) number. + +Bugfixes will result in the patch version (third digit) changing. PRs that are +cherry-picked into an older Kubernetes release branch will result in an update +to the corresponding branch in `client-go`, with a corresponding new tag +changing the patch version. + +A consequence of this is that `client-go` version numbers will be unrelated to +Kubernetes version numbers. + +#### Branches and tags. + +We will create a new branch and tag for each increment in the major version number or +minor version number. We will create only a new tag for each increment in the patch +version number. See [semver](http://semver.org/) for definitions of major, +minor, and patch. + +The master branch will track HEAD in the main Kubernetes repo and +accumulate changes. Consider HEAD to have the version `x.(y+1).0-alpha` or +`(x+1).0.0-alpha` (depending on whether it has accumulated a breaking change or +not), where `x` and `y` are the current major and minor versions. + +#### Compatibility: your code <-> client-go + +`client-go` follows [semver](http://semver.org/), so until the major version of +client-go gets increased, your code will compile and will continue to work with +explicitly supported versions of Kubernetes clusters. You must use a dependency +management system and pin a specific major version of `client-go` to get this +benefit, as HEAD follows the upstream Kubernetes repo. + +#### Compatibility: client-go <-> Kubernetes clusters + +Since Kubernetes is backwards compatible with clients, older `client-go` +versions will work with many different Kubernetes cluster versions. + +We will backport bugfixes--but not new features--into older versions of +`client-go`. + + +#### Compatibility matrix + +| | Kubernetes 1.3 | Kubernetes 1.4 | Kubernetes 1.5 | Kubernetes 1.6 | Kubernetes 1.7 | +|---------------------|----------------|----------------|----------------|----------------|----------------| +| client-go 1.4 | + | ✓ | - | - | - | +| client-go 1.5 | + | + | - | - | - | +| client-go 2.0 | + | + | ✓ | - | - | +| client-go 3.0 | † | † | † | ✓ | - | +| client-go 4.0 | † | † | † | + | ✓ | +| client-go HEAD | † | † | † | + | + | + +Key: + +* `✓` Exactly the same features / API objects in both client-go and the Kubernetes + version. +* `+` client-go has features or api objects that may not be present in the + Kubernetes cluster, but everything they have in common will work. Please + note that alpha APIs may vanish or change significantly in a single release. +* `†` client-go has new features or api objects, and some APIs running in the + cluster may have been deprecated and removed from client-go. But everything + they share in common (i.e., most APIs) will work. +* `-` The Kubernetes cluster has features the client-go library can't use + (additional API objects, etc). + +See the [CHANGELOG](./CHANGELOG.md) for a detailed description of changes +between client-go versions. + +| Branch | Canonical source code location | Maintenance status | +|----------------|--------------------------------------|-------------------------------| +| client-go 1.4 | Kubernetes main repo, 1.4 branch | = - | +| client-go 1.5 | Kubernetes main repo, 1.5 branch | = - | +| client-go 2.0 | Kubernetes main repo, 1.5 branch | ✓ | +| client-go 3.0 | Kubernetes main repo, 1.6 branch | ✓ | +| client-go 4.0 | Kubernetes main repo, 1.7 branch | ✓ | +| client-go HEAD | Kubernetes main repo, master branch | ✓ | + +Key: + +* `✓` Changes in main Kubernetes repo are actively published to client-go by a bot +* `=` Maintenance is manual, only severe security bugs will be patched. +* `-` Deprecated; please upgrade. + +#### Deprecation policy + +We will maintain branches for at least six months after their first stable tag +is cut. (E.g., the clock for the release-2.0 branch started ticking when we +tagged v2.0.0, not when we made the first alpha.) This policy applies to +every version greater than or equal to 2.0. + +#### Why do the 1.4 and 1.5 branch contain top-level folder named after the version? + +For the initial release of client-go, we thought it would be easiest to keep +separate directories for each minor version. That soon proved to be a mistake. +We are keeping the top-level folders in the 1.4 and 1.5 branches so that +existing users won't be broken. + +### How to get it + +You can use `go get k8s.io/client-go/...` to get client-go, but **you will get +the unstable master branch** and `client-go`'s vendored dependencies will not be +added to your `$GOPATH`. So we think most users will want to use a dependency +management system. See [INSTALL.md](/INSTALL.md) for detailed instructions. + +### How to use it + +If your application runs in a Pod in the cluster, please refer to the +in-cluster [example](examples/in-cluster-client-configuration), otherwise please +refer to the out-of-cluster [example](examples/out-of-cluster-client-configuration). + +### Dependency management + +If your application depends on a package that client-go depends on, and you let the Go compiler find the dependency in `GOPATH`, you will end up with duplicated dependencies: one copy from the `GOPATH`, and one from the vendor folder of client-go. This will cause unexpected runtime error like flag redefinition, since the go compiler ends up importing both packages separately, even if they are exactly the same thing. If this happens, you can either +* run `godep restore` ([godep](https://github.com/tools/godep)) in the client-go/ folder, then remove the vendor folder of client-go. Then the packages in your GOPATH will be the only copy +* or run `godep save` in your application folder to flatten all dependencies. + +### Contributing code +Please send pull requests against the client packages in the Kubernetes main [repository](https://github.com/kubernetes/kubernetes). Changes in the staging area will be published to this repository every day. diff --git a/vendor/k8s.io/client-go/discovery/discovery_client_test.go b/vendor/k8s.io/client-go/discovery/discovery_client_test.go new file mode 100644 index 000000000..e0c908ee3 --- /dev/null +++ b/vendor/k8s.io/client-go/discovery/discovery_client_test.go @@ -0,0 +1,834 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package discovery_test + +import ( + "encoding/json" + "fmt" + "mime" + "net/http" + "net/http/httptest" + "reflect" + "testing" + + "github.com/emicklei/go-restful-swagger12" + "github.com/gogo/protobuf/proto" + "github.com/googleapis/gnostic/OpenAPIv2" + + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/version" + . "k8s.io/client-go/discovery" + restclient "k8s.io/client-go/rest" +) + +func TestGetServerVersion(t *testing.T) { + expect := version.Info{ + Major: "foo", + Minor: "bar", + GitCommit: "baz", + } + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + output, err := json.Marshal(expect) + if err != nil { + t.Errorf("unexpected encoding error: %v", err) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + w.Write(output) + })) + defer server.Close() + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) + + got, err := client.ServerVersion() + if err != nil { + t.Fatalf("unexpected encoding error: %v", err) + } + if e, a := expect, *got; !reflect.DeepEqual(e, a) { + t.Errorf("expected %v, got %v", e, a) + } +} + +func TestGetServerGroupsWithV1Server(t *testing.T) { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + var obj interface{} + switch req.URL.Path { + case "/api": + obj = &metav1.APIVersions{ + Versions: []string{ + "v1", + }, + } + default: + w.WriteHeader(http.StatusNotFound) + return + } + output, err := json.Marshal(obj) + if err != nil { + t.Fatalf("unexpected encoding error: %v", err) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + w.Write(output) + })) + defer server.Close() + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) + // ServerGroups should not return an error even if server returns error at /api and /apis + apiGroupList, err := client.ServerGroups() + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + groupVersions := metav1.ExtractGroupVersions(apiGroupList) + if !reflect.DeepEqual(groupVersions, []string{"v1"}) { + t.Errorf("expected: %q, got: %q", []string{"v1"}, groupVersions) + } +} + +func TestGetServerGroupsWithBrokenServer(t *testing.T) { + for _, statusCode := range []int{http.StatusNotFound, http.StatusForbidden} { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + w.WriteHeader(statusCode) + })) + defer server.Close() + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) + // ServerGroups should not return an error even if server returns Not Found or Forbidden error at all end points + apiGroupList, err := client.ServerGroups() + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + groupVersions := metav1.ExtractGroupVersions(apiGroupList) + if len(groupVersions) != 0 { + t.Errorf("expected empty list, got: %q", groupVersions) + } + } +} + +func TestGetServerResourcesWithV1Server(t *testing.T) { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + var obj interface{} + switch req.URL.Path { + case "/api": + obj = &metav1.APIVersions{ + Versions: []string{ + "v1", + }, + } + default: + w.WriteHeader(http.StatusNotFound) + return + } + output, err := json.Marshal(obj) + if err != nil { + t.Errorf("unexpected encoding error: %v", err) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + w.Write(output) + })) + defer server.Close() + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) + // ServerResources should not return an error even if server returns error at /api/v1. + serverResources, err := client.ServerResources() + if err != nil { + t.Errorf("unexpected error: %v", err) + } + gvs := groupVersions(serverResources) + if !sets.NewString(gvs...).Has("v1") { + t.Errorf("missing v1 in resource list: %v", serverResources) + } +} + +func TestGetServerResources(t *testing.T) { + stable := metav1.APIResourceList{ + GroupVersion: "v1", + APIResources: []metav1.APIResource{ + {Name: "pods", Namespaced: true, Kind: "Pod"}, + {Name: "services", Namespaced: true, Kind: "Service"}, + {Name: "namespaces", Namespaced: false, Kind: "Namespace"}, + }, + } + beta := metav1.APIResourceList{ + GroupVersion: "extensions/v1beta1", + APIResources: []metav1.APIResource{ + {Name: "deployments", Namespaced: true, Kind: "Deployment"}, + {Name: "ingresses", Namespaced: true, Kind: "Ingress"}, + {Name: "jobs", Namespaced: true, Kind: "Job"}, + }, + } + tests := []struct { + resourcesList *metav1.APIResourceList + path string + request string + expectErr bool + }{ + { + resourcesList: &stable, + path: "/api/v1", + request: "v1", + expectErr: false, + }, + { + resourcesList: &beta, + path: "/apis/extensions/v1beta1", + request: "extensions/v1beta1", + expectErr: false, + }, + { + resourcesList: &stable, + path: "/api/v1", + request: "foobar", + expectErr: true, + }, + } + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + var list interface{} + switch req.URL.Path { + case "/api/v1": + list = &stable + case "/apis/extensions/v1beta1": + list = &beta + case "/api": + list = &metav1.APIVersions{ + Versions: []string{ + "v1", + }, + } + case "/apis": + list = &metav1.APIGroupList{ + Groups: []metav1.APIGroup{ + { + Versions: []metav1.GroupVersionForDiscovery{ + {GroupVersion: "extensions/v1beta1"}, + }, + }, + }, + } + default: + t.Logf("unexpected request: %s", req.URL.Path) + w.WriteHeader(http.StatusNotFound) + return + } + output, err := json.Marshal(list) + if err != nil { + t.Errorf("unexpected encoding error: %v", err) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + w.Write(output) + })) + defer server.Close() + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) + for _, test := range tests { + got, err := client.ServerResourcesForGroupVersion(test.request) + if test.expectErr { + if err == nil { + t.Error("unexpected non-error") + } + continue + } + if err != nil { + t.Errorf("unexpected error: %v", err) + continue + } + if !reflect.DeepEqual(got, test.resourcesList) { + t.Errorf("expected:\n%v\ngot:\n%v\n", test.resourcesList, got) + } + } + + serverResources, err := client.ServerResources() + if err != nil { + t.Errorf("unexpected error: %v", err) + } + serverGroupVersions := sets.NewString(groupVersions(serverResources)...) + for _, api := range []string{"v1", "extensions/v1beta1"} { + if !serverGroupVersions.Has(api) { + t.Errorf("missing expected api %q in %v", api, serverResources) + } + } +} + +func swaggerSchemaFakeServer() (*httptest.Server, error) { + request := 1 + var sErr error + + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + var resp interface{} + if request == 1 { + resp = metav1.APIVersions{Versions: []string{"v1", "v2", "v3"}} + request++ + } else { + resp = swagger.ApiDeclaration{} + } + output, err := json.Marshal(resp) + if err != nil { + sErr = err + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + w.Write(output) + })) + return server, sErr +} + +func TestGetSwaggerSchema(t *testing.T) { + expect := swagger.ApiDeclaration{} + + server, err := swaggerSchemaFakeServer() + if err != nil { + t.Errorf("unexpected encoding error: %v", err) + } + defer server.Close() + + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) + got, err := client.SwaggerSchema(v1.SchemeGroupVersion) + if err != nil { + t.Fatalf("unexpected encoding error: %v", err) + } + if e, a := expect, *got; !reflect.DeepEqual(e, a) { + t.Errorf("expected %v, got %v", e, a) + } +} + +func TestGetSwaggerSchemaFail(t *testing.T) { + expErr := "API version: api.group/v4 is not supported by the server. Use one of: [v1 v2 v3]" + + server, err := swaggerSchemaFakeServer() + if err != nil { + t.Errorf("unexpected encoding error: %v", err) + } + defer server.Close() + + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) + got, err := client.SwaggerSchema(schema.GroupVersion{Group: "api.group", Version: "v4"}) + if got != nil { + t.Fatalf("unexpected response: %v", got) + } + if err.Error() != expErr { + t.Errorf("expected an error, got %v", err) + } +} + +var returnedOpenAPI = openapi_v2.Document{ + Definitions: &openapi_v2.Definitions{ + AdditionalProperties: []*openapi_v2.NamedSchema{ + { + Name: "fake.type.1", + Value: &openapi_v2.Schema{ + Properties: &openapi_v2.Properties{ + AdditionalProperties: []*openapi_v2.NamedSchema{ + { + Name: "count", + Value: &openapi_v2.Schema{ + Type: &openapi_v2.TypeItem{ + Value: []string{"integer"}, + }, + }, + }, + }, + }, + }, + }, + { + Name: "fake.type.2", + Value: &openapi_v2.Schema{ + Properties: &openapi_v2.Properties{ + AdditionalProperties: []*openapi_v2.NamedSchema{ + { + Name: "count", + Value: &openapi_v2.Schema{ + Type: &openapi_v2.TypeItem{ + Value: []string{"array"}, + }, + Items: &openapi_v2.ItemsItem{ + Schema: []*openapi_v2.Schema{ + { + Type: &openapi_v2.TypeItem{ + Value: []string{"string"}, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, +} + +func openapiSchemaFakeServer() (*httptest.Server, error) { + var sErr error + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + if req.URL.Path != "/swagger-2.0.0.pb-v1" { + sErr = fmt.Errorf("Unexpected url %v", req.URL) + } + if req.Method != "GET" { + sErr = fmt.Errorf("Unexpected method %v", req.Method) + } + + mime.AddExtensionType(".pb-v1", "application/com.github.googleapis.gnostic.OpenAPIv2@68f4ded+protobuf") + + output, err := proto.Marshal(&returnedOpenAPI) + if err != nil { + sErr = err + return + } + w.WriteHeader(http.StatusOK) + w.Write(output) + })) + return server, sErr +} + +func TestGetOpenAPISchema(t *testing.T) { + server, err := openapiSchemaFakeServer() + if err != nil { + t.Errorf("unexpected error starting fake server: %v", err) + } + defer server.Close() + + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) + got, err := client.OpenAPISchema() + if err != nil { + t.Fatalf("unexpected error getting openapi: %v", err) + } + if e, a := returnedOpenAPI, *got; !reflect.DeepEqual(e, a) { + t.Errorf("expected %v, got %v", e, a) + } +} + +func TestServerPreferredResources(t *testing.T) { + stable := metav1.APIResourceList{ + GroupVersion: "v1", + APIResources: []metav1.APIResource{ + {Name: "pods", Namespaced: true, Kind: "Pod"}, + {Name: "services", Namespaced: true, Kind: "Service"}, + {Name: "namespaces", Namespaced: false, Kind: "Namespace"}, + }, + } + tests := []struct { + resourcesList []*metav1.APIResourceList + response func(w http.ResponseWriter, req *http.Request) + expectErr func(err error) bool + }{ + { + resourcesList: []*metav1.APIResourceList{&stable}, + expectErr: IsGroupDiscoveryFailedError, + response: func(w http.ResponseWriter, req *http.Request) { + var list interface{} + switch req.URL.Path { + case "/apis/extensions/v1beta1": + w.WriteHeader(http.StatusInternalServerError) + return + case "/api/v1": + list = &stable + case "/api": + list = &metav1.APIVersions{ + Versions: []string{ + "v1", + }, + } + case "/apis": + list = &metav1.APIGroupList{ + Groups: []metav1.APIGroup{ + { + Versions: []metav1.GroupVersionForDiscovery{ + {GroupVersion: "extensions/v1beta1"}, + }, + }, + }, + } + default: + t.Logf("unexpected request: %s", req.URL.Path) + w.WriteHeader(http.StatusNotFound) + return + } + output, err := json.Marshal(list) + if err != nil { + t.Errorf("unexpected encoding error: %v", err) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + w.Write(output) + }, + }, + { + resourcesList: nil, + expectErr: IsGroupDiscoveryFailedError, + response: func(w http.ResponseWriter, req *http.Request) { + var list interface{} + switch req.URL.Path { + case "/apis/extensions/v1beta1": + w.WriteHeader(http.StatusInternalServerError) + return + case "/api/v1": + w.WriteHeader(http.StatusInternalServerError) + case "/api": + list = &metav1.APIVersions{ + Versions: []string{ + "v1", + }, + } + case "/apis": + list = &metav1.APIGroupList{ + Groups: []metav1.APIGroup{ + { + Versions: []metav1.GroupVersionForDiscovery{ + {GroupVersion: "extensions/v1beta1"}, + }, + }, + }, + } + default: + t.Logf("unexpected request: %s", req.URL.Path) + w.WriteHeader(http.StatusNotFound) + return + } + output, err := json.Marshal(list) + if err != nil { + t.Errorf("unexpected encoding error: %v", err) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + w.Write(output) + }, + }, + } + for _, test := range tests { + server := httptest.NewServer(http.HandlerFunc(test.response)) + defer server.Close() + + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) + resources, err := client.ServerPreferredResources() + if test.expectErr != nil { + if err == nil { + t.Error("unexpected non-error") + } + + continue + } + if err != nil { + t.Errorf("unexpected error: %v", err) + continue + } + got, err := GroupVersionResources(resources) + if err != nil { + t.Errorf("unexpected error: %v", err) + continue + } + expected, _ := GroupVersionResources(test.resourcesList) + if !reflect.DeepEqual(got, expected) { + t.Errorf("expected:\n%v\ngot:\n%v\n", test.resourcesList, got) + } + server.Close() + } +} + +func TestServerPreferredResourcesRetries(t *testing.T) { + stable := metav1.APIResourceList{ + GroupVersion: "v1", + APIResources: []metav1.APIResource{ + {Name: "pods", Namespaced: true, Kind: "Pod"}, + }, + } + beta := metav1.APIResourceList{ + GroupVersion: "extensions/v1", + APIResources: []metav1.APIResource{ + {Name: "deployments", Namespaced: true, Kind: "Deployment"}, + }, + } + + response := func(numErrors int) http.HandlerFunc { + var i = 0 + return func(w http.ResponseWriter, req *http.Request) { + var list interface{} + switch req.URL.Path { + case "/apis/extensions/v1beta1": + if i < numErrors { + i++ + w.WriteHeader(http.StatusInternalServerError) + return + } + list = &beta + case "/api/v1": + list = &stable + case "/api": + list = &metav1.APIVersions{ + Versions: []string{ + "v1", + }, + } + case "/apis": + list = &metav1.APIGroupList{ + Groups: []metav1.APIGroup{ + { + Name: "extensions", + Versions: []metav1.GroupVersionForDiscovery{ + {GroupVersion: "extensions/v1beta1"}, + }, + PreferredVersion: metav1.GroupVersionForDiscovery{ + GroupVersion: "extensions/v1beta1", + Version: "v1beta1", + }, + }, + }, + } + default: + t.Logf("unexpected request: %s", req.URL.Path) + w.WriteHeader(http.StatusNotFound) + return + } + output, err := json.Marshal(list) + if err != nil { + t.Errorf("unexpected encoding error: %v", err) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + w.Write(output) + } + } + tests := []struct { + responseErrors int + expectResources int + expectedError func(err error) bool + }{ + { + responseErrors: 1, + expectResources: 2, + expectedError: func(err error) bool { + return err == nil + }, + }, + { + responseErrors: 2, + expectResources: 1, + expectedError: IsGroupDiscoveryFailedError, + }, + } + + for i, tc := range tests { + server := httptest.NewServer(http.HandlerFunc(response(tc.responseErrors))) + defer server.Close() + + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) + resources, err := client.ServerPreferredResources() + if !tc.expectedError(err) { + t.Errorf("case %d: unexpected error: %v", i, err) + } + got, err := GroupVersionResources(resources) + if err != nil { + t.Errorf("case %d: unexpected error: %v", i, err) + } + if len(got) != tc.expectResources { + t.Errorf("case %d: expect %d resources, got %#v", i, tc.expectResources, got) + } + server.Close() + } +} + +func TestServerPreferredNamespacedResources(t *testing.T) { + stable := metav1.APIResourceList{ + GroupVersion: "v1", + APIResources: []metav1.APIResource{ + {Name: "pods", Namespaced: true, Kind: "Pod"}, + {Name: "services", Namespaced: true, Kind: "Service"}, + {Name: "namespaces", Namespaced: false, Kind: "Namespace"}, + }, + } + batchv1 := metav1.APIResourceList{ + GroupVersion: "batch/v1", + APIResources: []metav1.APIResource{ + {Name: "jobs", Namespaced: true, Kind: "Job"}, + }, + } + batchv2alpha1 := metav1.APIResourceList{ + GroupVersion: "batch/v2alpha1", + APIResources: []metav1.APIResource{ + {Name: "jobs", Namespaced: true, Kind: "Job"}, + {Name: "cronjobs", Namespaced: true, Kind: "CronJob"}, + }, + } + batchv3alpha1 := metav1.APIResourceList{ + GroupVersion: "batch/v3alpha1", + APIResources: []metav1.APIResource{ + {Name: "jobs", Namespaced: true, Kind: "Job"}, + {Name: "cronjobs", Namespaced: true, Kind: "CronJob"}, + }, + } + tests := []struct { + response func(w http.ResponseWriter, req *http.Request) + expected map[schema.GroupVersionResource]struct{} + }{ + { + response: func(w http.ResponseWriter, req *http.Request) { + var list interface{} + switch req.URL.Path { + case "/api/v1": + list = &stable + case "/api": + list = &metav1.APIVersions{ + Versions: []string{ + "v1", + }, + } + default: + t.Logf("unexpected request: %s", req.URL.Path) + w.WriteHeader(http.StatusNotFound) + return + } + output, err := json.Marshal(list) + if err != nil { + t.Errorf("unexpected encoding error: %v", err) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + w.Write(output) + }, + expected: map[schema.GroupVersionResource]struct{}{ + {Group: "", Version: "v1", Resource: "pods"}: {}, + {Group: "", Version: "v1", Resource: "services"}: {}, + }, + }, + { + response: func(w http.ResponseWriter, req *http.Request) { + var list interface{} + switch req.URL.Path { + case "/apis": + list = &metav1.APIGroupList{ + Groups: []metav1.APIGroup{ + { + Name: "batch", + Versions: []metav1.GroupVersionForDiscovery{ + {GroupVersion: "batch/v1", Version: "v1"}, + {GroupVersion: "batch/v2alpha1", Version: "v2alpha1"}, + {GroupVersion: "batch/v3alpha1", Version: "v3alpha1"}, + }, + PreferredVersion: metav1.GroupVersionForDiscovery{GroupVersion: "batch/v1", Version: "v1"}, + }, + }, + } + case "/apis/batch/v1": + list = &batchv1 + case "/apis/batch/v2alpha1": + list = &batchv2alpha1 + case "/apis/batch/v3alpha1": + list = &batchv3alpha1 + default: + t.Logf("unexpected request: %s", req.URL.Path) + w.WriteHeader(http.StatusNotFound) + return + } + output, err := json.Marshal(list) + if err != nil { + t.Errorf("unexpected encoding error: %v", err) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + w.Write(output) + }, + expected: map[schema.GroupVersionResource]struct{}{ + {Group: "batch", Version: "v1", Resource: "jobs"}: {}, + {Group: "batch", Version: "v2alpha1", Resource: "cronjobs"}: {}, + }, + }, + { + response: func(w http.ResponseWriter, req *http.Request) { + var list interface{} + switch req.URL.Path { + case "/apis": + list = &metav1.APIGroupList{ + Groups: []metav1.APIGroup{ + { + Name: "batch", + Versions: []metav1.GroupVersionForDiscovery{ + {GroupVersion: "batch/v1", Version: "v1"}, + {GroupVersion: "batch/v2alpha1", Version: "v2alpha1"}, + {GroupVersion: "batch/v3alpha1", Version: "v3alpha1"}, + }, + PreferredVersion: metav1.GroupVersionForDiscovery{GroupVersion: "batch/v2alpha", Version: "v2alpha1"}, + }, + }, + } + case "/apis/batch/v1": + list = &batchv1 + case "/apis/batch/v2alpha1": + list = &batchv2alpha1 + case "/apis/batch/v3alpha1": + list = &batchv3alpha1 + default: + t.Logf("unexpected request: %s", req.URL.Path) + w.WriteHeader(http.StatusNotFound) + return + } + output, err := json.Marshal(list) + if err != nil { + t.Errorf("unexpected encoding error: %v", err) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + w.Write(output) + }, + expected: map[schema.GroupVersionResource]struct{}{ + {Group: "batch", Version: "v2alpha1", Resource: "jobs"}: {}, + {Group: "batch", Version: "v2alpha1", Resource: "cronjobs"}: {}, + }, + }, + } + for i, test := range tests { + server := httptest.NewServer(http.HandlerFunc(test.response)) + defer server.Close() + + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) + resources, err := client.ServerPreferredNamespacedResources() + if err != nil { + t.Errorf("[%d] unexpected error: %v", i, err) + continue + } + got, err := GroupVersionResources(resources) + if err != nil { + t.Errorf("[%d] unexpected error: %v", i, err) + continue + } + + if !reflect.DeepEqual(got, test.expected) { + t.Errorf("[%d] expected:\n%v\ngot:\n%v\n", i, test.expected, got) + } + server.Close() + } +} + +func groupVersions(resources []*metav1.APIResourceList) []string { + result := []string{} + for _, resourceList := range resources { + result = append(result, resourceList.GroupVersion) + } + return result +} diff --git a/vendor/k8s.io/client-go/discovery/fake/discovery_test.go b/vendor/k8s.io/client-go/discovery/fake/discovery_test.go new file mode 100644 index 000000000..cfdcf1a23 --- /dev/null +++ b/vendor/k8s.io/client-go/discovery/fake/discovery_test.go @@ -0,0 +1,46 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake_test + +import ( + "testing" + + "k8s.io/apimachinery/pkg/version" + fakediscovery "k8s.io/client-go/discovery/fake" + fakeclientset "k8s.io/client-go/kubernetes/fake" +) + +func TestFakingServerVersion(t *testing.T) { + client := fakeclientset.NewSimpleClientset() + fakeDiscovery, ok := client.Discovery().(*fakediscovery.FakeDiscovery) + if !ok { + t.Fatalf("couldn't convert Discovery() to *FakeDiscovery") + } + + testGitCommit := "v1.0.0" + fakeDiscovery.FakedServerVersion = &version.Info{ + GitCommit: testGitCommit, + } + + sv, err := client.Discovery().ServerVersion() + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if sv.GitCommit != testGitCommit { + t.Fatalf("unexpected faked discovery return value: %q", sv.GitCommit) + } +} diff --git a/vendor/k8s.io/client-go/discovery/helper_blackbox_test.go b/vendor/k8s.io/client-go/discovery/helper_blackbox_test.go new file mode 100644 index 000000000..b3cf2591f --- /dev/null +++ b/vendor/k8s.io/client-go/discovery/helper_blackbox_test.go @@ -0,0 +1,185 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package discovery_test + +import ( + "bytes" + "encoding/json" + "errors" + "io" + "io/ioutil" + "net/http" + "strings" + "testing" + + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + uapi "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/client-go/discovery" + "k8s.io/client-go/kubernetes/scheme" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/rest/fake" +) + +func objBody(object interface{}) io.ReadCloser { + output, err := json.MarshalIndent(object, "", "") + if err != nil { + panic(err) + } + return ioutil.NopCloser(bytes.NewReader([]byte(output))) +} + +func TestServerSupportsVersion(t *testing.T) { + tests := []struct { + name string + requiredVersion schema.GroupVersion + serverVersions []string + expectErr func(err error) bool + sendErr error + statusCode int + }{ + { + name: "explicit version supported", + requiredVersion: schema.GroupVersion{Version: "v1"}, + serverVersions: []string{"/version1", v1.SchemeGroupVersion.String()}, + statusCode: http.StatusOK, + }, + { + name: "explicit version not supported on server", + requiredVersion: schema.GroupVersion{Version: "v1"}, + serverVersions: []string{"version1"}, + expectErr: func(err error) bool { return strings.Contains(err.Error(), `server does not support API version "v1"`) }, + statusCode: http.StatusOK, + }, + { + name: "connection refused error", + serverVersions: []string{"version1"}, + sendErr: errors.New("connection refused"), + expectErr: func(err error) bool { return strings.Contains(err.Error(), "connection refused") }, + statusCode: http.StatusOK, + }, + { + name: "discovery fails due to 404 Not Found errors and thus serverVersions is empty, use requested GroupVersion", + requiredVersion: schema.GroupVersion{Version: "version1"}, + statusCode: http.StatusNotFound, + }, + } + + for _, test := range tests { + fakeClient := &fake.RESTClient{ + NegotiatedSerializer: scheme.Codecs, + Resp: &http.Response{ + StatusCode: test.statusCode, + Body: objBody(&uapi.APIVersions{Versions: test.serverVersions}), + }, + Client: fake.CreateHTTPClient(func(req *http.Request) (*http.Response, error) { + if test.sendErr != nil { + return nil, test.sendErr + } + header := http.Header{} + header.Set("Content-Type", runtime.ContentTypeJSON) + return &http.Response{StatusCode: test.statusCode, Header: header, Body: objBody(&uapi.APIVersions{Versions: test.serverVersions})}, nil + }), + } + c := discovery.NewDiscoveryClientForConfigOrDie(&restclient.Config{}) + c.RESTClient().(*restclient.RESTClient).Client = fakeClient.Client + err := discovery.ServerSupportsVersion(c, test.requiredVersion) + if err == nil && test.expectErr != nil { + t.Errorf("expected error, got nil for [%s].", test.name) + } + if err != nil { + if test.expectErr == nil || !test.expectErr(err) { + t.Errorf("unexpected error for [%s]: %v.", test.name, err) + } + continue + } + } +} + +func TestFilteredBy(t *testing.T) { + all := discovery.ResourcePredicateFunc(func(gv string, r *metav1.APIResource) bool { + return true + }) + none := discovery.ResourcePredicateFunc(func(gv string, r *metav1.APIResource) bool { + return false + }) + onlyV2 := discovery.ResourcePredicateFunc(func(gv string, r *metav1.APIResource) bool { + return strings.HasSuffix(gv, "/v2") || gv == "v2" + }) + onlyBar := discovery.ResourcePredicateFunc(func(gv string, r *metav1.APIResource) bool { + return r.Kind == "Bar" + }) + + foo := []*metav1.APIResourceList{ + { + GroupVersion: "foo/v1", + APIResources: []metav1.APIResource{ + {Name: "bar", Kind: "Bar"}, + {Name: "test", Kind: "Test"}, + }, + }, + { + GroupVersion: "foo/v2", + APIResources: []metav1.APIResource{ + {Name: "bar", Kind: "Bar"}, + {Name: "test", Kind: "Test"}, + }, + }, + { + GroupVersion: "foo/v3", + APIResources: []metav1.APIResource{}, + }, + } + + tests := []struct { + input []*metav1.APIResourceList + pred discovery.ResourcePredicate + expectedResources []string + }{ + {nil, all, []string{}}, + {[]*metav1.APIResourceList{ + {GroupVersion: "foo/v1"}, + }, all, []string{}}, + {foo, all, []string{"foo/v1.bar", "foo/v1.test", "foo/v2.bar", "foo/v2.test"}}, + {foo, onlyV2, []string{"foo/v2.bar", "foo/v2.test"}}, + {foo, onlyBar, []string{"foo/v1.bar", "foo/v2.bar"}}, + {foo, none, []string{}}, + } + for i, test := range tests { + filtered := discovery.FilteredBy(test.pred, test.input) + + if expected, got := sets.NewString(test.expectedResources...), sets.NewString(stringify(filtered)...); !expected.Equal(got) { + t.Errorf("[%d] unexpected group versions: expected=%v, got=%v", i, test.expectedResources, stringify(filtered)) + } + } +} + +func stringify(rls []*metav1.APIResourceList) []string { + result := []string{} + for _, rl := range rls { + for _, r := range rl.APIResources { + result = append(result, rl.GroupVersion+"."+r.Name) + } + if len(rl.APIResources) == 0 { + result = append(result, rl.GroupVersion) + } + } + return result +} diff --git a/vendor/k8s.io/client-go/discovery/restmapper_test.go b/vendor/k8s.io/client-go/discovery/restmapper_test.go new file mode 100644 index 000000000..f2956be3b --- /dev/null +++ b/vendor/k8s.io/client-go/discovery/restmapper_test.go @@ -0,0 +1,389 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package discovery_test + +import ( + "reflect" + "testing" + + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/version" + . "k8s.io/client-go/discovery" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/rest/fake" + + "github.com/emicklei/go-restful-swagger12" + "github.com/googleapis/gnostic/OpenAPIv2" + "github.com/stretchr/testify/assert" +) + +func TestRESTMapper(t *testing.T) { + resources := []*APIGroupResources{ + { + Group: metav1.APIGroup{ + Name: "extensions", + Versions: []metav1.GroupVersionForDiscovery{ + {Version: "v1beta"}, + }, + PreferredVersion: metav1.GroupVersionForDiscovery{Version: "v1beta"}, + }, + VersionedResources: map[string][]metav1.APIResource{ + "v1beta": { + {Name: "jobs", Namespaced: true, Kind: "Job"}, + {Name: "pods", Namespaced: true, Kind: "Pod"}, + }, + }, + }, + { + Group: metav1.APIGroup{ + Versions: []metav1.GroupVersionForDiscovery{ + {Version: "v1"}, + {Version: "v2"}, + }, + PreferredVersion: metav1.GroupVersionForDiscovery{Version: "v1"}, + }, + VersionedResources: map[string][]metav1.APIResource{ + "v1": { + {Name: "pods", Namespaced: true, Kind: "Pod"}, + }, + "v2": { + {Name: "pods", Namespaced: true, Kind: "Pod"}, + }, + }, + }, + + // This group tests finding and prioritizing resources that only exist in non-preferred versions + { + Group: metav1.APIGroup{ + Name: "unpreferred", + Versions: []metav1.GroupVersionForDiscovery{ + {Version: "v1"}, + {Version: "v2beta1"}, + {Version: "v2alpha1"}, + }, + PreferredVersion: metav1.GroupVersionForDiscovery{Version: "v1"}, + }, + VersionedResources: map[string][]metav1.APIResource{ + "v1": { + {Name: "broccoli", Namespaced: true, Kind: "Broccoli"}, + }, + "v2beta1": { + {Name: "broccoli", Namespaced: true, Kind: "Broccoli"}, + {Name: "peas", Namespaced: true, Kind: "Pea"}, + }, + "v2alpha1": { + {Name: "broccoli", Namespaced: true, Kind: "Broccoli"}, + {Name: "peas", Namespaced: true, Kind: "Pea"}, + }, + }, + }, + } + + restMapper := NewRESTMapper(resources, nil) + + kindTCs := []struct { + input schema.GroupVersionResource + want schema.GroupVersionKind + }{ + { + input: schema.GroupVersionResource{ + Resource: "pods", + }, + want: schema.GroupVersionKind{ + Version: "v1", + Kind: "Pod", + }, + }, + { + input: schema.GroupVersionResource{ + Version: "v1", + Resource: "pods", + }, + want: schema.GroupVersionKind{ + Version: "v1", + Kind: "Pod", + }, + }, + { + input: schema.GroupVersionResource{ + Version: "v2", + Resource: "pods", + }, + want: schema.GroupVersionKind{ + Version: "v2", + Kind: "Pod", + }, + }, + { + input: schema.GroupVersionResource{ + Resource: "pods", + }, + want: schema.GroupVersionKind{ + Version: "v1", + Kind: "Pod", + }, + }, + { + input: schema.GroupVersionResource{ + Resource: "jobs", + }, + want: schema.GroupVersionKind{ + Group: "extensions", + Version: "v1beta", + Kind: "Job", + }, + }, + { + input: schema.GroupVersionResource{ + Resource: "peas", + }, + want: schema.GroupVersionKind{ + Group: "unpreferred", + Version: "v2beta1", + Kind: "Pea", + }, + }, + } + + for _, tc := range kindTCs { + got, err := restMapper.KindFor(tc.input) + if err != nil { + t.Errorf("KindFor(%#v) unexpected error: %v", tc.input, err) + continue + } + + if !reflect.DeepEqual(got, tc.want) { + t.Errorf("KindFor(%#v) = %#v, want %#v", tc.input, got, tc.want) + } + } + + resourceTCs := []struct { + input schema.GroupVersionResource + want schema.GroupVersionResource + }{ + { + input: schema.GroupVersionResource{ + Resource: "pods", + }, + want: schema.GroupVersionResource{ + Version: "v1", + Resource: "pods", + }, + }, + { + input: schema.GroupVersionResource{ + Version: "v1", + Resource: "pods", + }, + want: schema.GroupVersionResource{ + Version: "v1", + Resource: "pods", + }, + }, + { + input: schema.GroupVersionResource{ + Version: "v2", + Resource: "pods", + }, + want: schema.GroupVersionResource{ + Version: "v2", + Resource: "pods", + }, + }, + { + input: schema.GroupVersionResource{ + Resource: "pods", + }, + want: schema.GroupVersionResource{ + Version: "v1", + Resource: "pods", + }, + }, + { + input: schema.GroupVersionResource{ + Resource: "jobs", + }, + want: schema.GroupVersionResource{ + Group: "extensions", + Version: "v1beta", + Resource: "jobs", + }, + }, + } + + for _, tc := range resourceTCs { + got, err := restMapper.ResourceFor(tc.input) + if err != nil { + t.Errorf("ResourceFor(%#v) unexpected error: %v", tc.input, err) + continue + } + + if !reflect.DeepEqual(got, tc.want) { + t.Errorf("ResourceFor(%#v) = %#v, want %#v", tc.input, got, tc.want) + } + } +} + +func TestDeferredDiscoveryRESTMapper_CacheMiss(t *testing.T) { + assert := assert.New(t) + + cdc := fakeCachedDiscoveryInterface{fresh: false} + m := NewDeferredDiscoveryRESTMapper(&cdc, nil) + assert.False(cdc.fresh, "should NOT be fresh after instantiation") + assert.Zero(cdc.invalidateCalls, "should not have called Invalidate()") + + gvk, err := m.KindFor(schema.GroupVersionResource{ + Group: "a", + Version: "v1", + Resource: "foo", + }) + assert.NoError(err) + assert.True(cdc.fresh, "should be fresh after a cache-miss") + assert.Equal(cdc.invalidateCalls, 1, "should have called Invalidate() once") + assert.Equal(gvk.Kind, "Foo") + + gvk, err = m.KindFor(schema.GroupVersionResource{ + Group: "a", + Version: "v1", + Resource: "foo", + }) + assert.NoError(err) + assert.Equal(cdc.invalidateCalls, 1, "should NOT have called Invalidate() again") + + gvk, err = m.KindFor(schema.GroupVersionResource{ + Group: "a", + Version: "v1", + Resource: "bar", + }) + assert.Error(err) + assert.Equal(cdc.invalidateCalls, 1, "should NOT have called Invalidate() again after another cache-miss, but with fresh==true") + + cdc.fresh = false + gvk, err = m.KindFor(schema.GroupVersionResource{ + Group: "a", + Version: "v1", + Resource: "bar", + }) + assert.Error(err) + assert.Equal(cdc.invalidateCalls, 2, "should HAVE called Invalidate() again after another cache-miss, but with fresh==false") +} + +type fakeCachedDiscoveryInterface struct { + invalidateCalls int + fresh bool + enabledA bool +} + +var _ CachedDiscoveryInterface = &fakeCachedDiscoveryInterface{} + +func (c *fakeCachedDiscoveryInterface) Fresh() bool { + return c.fresh +} + +func (c *fakeCachedDiscoveryInterface) Invalidate() { + c.invalidateCalls = c.invalidateCalls + 1 + c.fresh = true + c.enabledA = true +} + +func (c *fakeCachedDiscoveryInterface) RESTClient() restclient.Interface { + return &fake.RESTClient{} +} + +func (c *fakeCachedDiscoveryInterface) ServerGroups() (*metav1.APIGroupList, error) { + if c.enabledA { + return &metav1.APIGroupList{ + Groups: []metav1.APIGroup{ + { + Name: "a", + Versions: []metav1.GroupVersionForDiscovery{ + { + GroupVersion: "a/v1", + Version: "v1", + }, + }, + PreferredVersion: metav1.GroupVersionForDiscovery{ + GroupVersion: "a/v1", + Version: "v1", + }, + }, + }, + }, nil + } + return &metav1.APIGroupList{}, nil +} + +func (c *fakeCachedDiscoveryInterface) ServerResourcesForGroupVersion(groupVersion string) (*metav1.APIResourceList, error) { + if c.enabledA && groupVersion == "a/v1" { + return &metav1.APIResourceList{ + GroupVersion: "a/v1", + APIResources: []metav1.APIResource{ + { + Name: "foo", + Kind: "Foo", + Namespaced: false, + }, + }, + }, nil + } + + return nil, errors.NewNotFound(schema.GroupResource{}, "") +} + +func (c *fakeCachedDiscoveryInterface) ServerResources() ([]*metav1.APIResourceList, error) { + if c.enabledA { + av1, _ := c.ServerResourcesForGroupVersion("a/v1") + return []*metav1.APIResourceList{av1}, nil + } + return []*metav1.APIResourceList{}, nil +} + +func (c *fakeCachedDiscoveryInterface) ServerPreferredResources() ([]*metav1.APIResourceList, error) { + if c.enabledA { + return []*metav1.APIResourceList{ + { + GroupVersion: "a/v1", + APIResources: []metav1.APIResource{ + { + Name: "foo", + Kind: "Foo", + Verbs: []string{}, + }, + }, + }, + }, nil + } + return nil, nil +} + +func (c *fakeCachedDiscoveryInterface) ServerPreferredNamespacedResources() ([]*metav1.APIResourceList, error) { + return nil, nil +} + +func (c *fakeCachedDiscoveryInterface) ServerVersion() (*version.Info, error) { + return &version.Info{}, nil +} + +func (c *fakeCachedDiscoveryInterface) SwaggerSchema(version schema.GroupVersion) (*swagger.ApiDeclaration, error) { + return &swagger.ApiDeclaration{}, nil +} + +func (c *fakeCachedDiscoveryInterface) OpenAPISchema() (*openapi_v2.Document, error) { + return &openapi_v2.Document{}, nil +} diff --git a/vendor/k8s.io/client-go/informers/core/v1/BUILD b/vendor/k8s.io/client-go/informers/core/v1/BUILD deleted file mode 100644 index 697caaf13..000000000 --- a/vendor/k8s.io/client-go/informers/core/v1/BUILD +++ /dev/null @@ -1,52 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "componentstatus.go", - "configmap.go", - "endpoints.go", - "event.go", - "interface.go", - "limitrange.go", - "namespace.go", - "node.go", - "persistentvolume.go", - "persistentvolumeclaim.go", - "pod.go", - "podtemplate.go", - "replicationcontroller.go", - "resourcequota.go", - "secret.go", - "service.go", - "serviceaccount.go", - ], - deps = [ - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/listers/core/v1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/client-go/informers/core/v1/componentstatus.go b/vendor/k8s.io/client-go/informers/core/v1/componentstatus.go deleted file mode 100644 index f07f9120b..000000000 --- a/vendor/k8s.io/client-go/informers/core/v1/componentstatus.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package v1 - -import ( - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" - kubernetes "k8s.io/client-go/kubernetes" - v1 "k8s.io/client-go/listers/core/v1" - cache "k8s.io/client-go/tools/cache" - time "time" -) - -// ComponentStatusInformer provides access to a shared informer and lister for -// ComponentStatuses. -type ComponentStatusInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.ComponentStatusLister -} - -type componentStatusInformer struct { - factory internalinterfaces.SharedInformerFactory -} - -// NewComponentStatusInformer constructs a new informer for ComponentStatus type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewComponentStatusInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { - return client.CoreV1().ComponentStatuses().List(options) - }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { - return client.CoreV1().ComponentStatuses().Watch(options) - }, - }, - &core_v1.ComponentStatus{}, - resyncPeriod, - indexers, - ) -} - -func defaultComponentStatusInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewComponentStatusInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) -} - -func (f *componentStatusInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.ComponentStatus{}, defaultComponentStatusInformer) -} - -func (f *componentStatusInformer) Lister() v1.ComponentStatusLister { - return v1.NewComponentStatusLister(f.Informer().GetIndexer()) -} diff --git a/vendor/k8s.io/client-go/informers/core/v1/configmap.go b/vendor/k8s.io/client-go/informers/core/v1/configmap.go deleted file mode 100644 index 7a14f1db4..000000000 --- a/vendor/k8s.io/client-go/informers/core/v1/configmap.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package v1 - -import ( - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" - kubernetes "k8s.io/client-go/kubernetes" - v1 "k8s.io/client-go/listers/core/v1" - cache "k8s.io/client-go/tools/cache" - time "time" -) - -// ConfigMapInformer provides access to a shared informer and lister for -// ConfigMaps. -type ConfigMapInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.ConfigMapLister -} - -type configMapInformer struct { - factory internalinterfaces.SharedInformerFactory -} - -// NewConfigMapInformer constructs a new informer for ConfigMap type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewConfigMapInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { - return client.CoreV1().ConfigMaps(namespace).List(options) - }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { - return client.CoreV1().ConfigMaps(namespace).Watch(options) - }, - }, - &core_v1.ConfigMap{}, - resyncPeriod, - indexers, - ) -} - -func defaultConfigMapInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewConfigMapInformer(client, meta_v1.NamespaceAll, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) -} - -func (f *configMapInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.ConfigMap{}, defaultConfigMapInformer) -} - -func (f *configMapInformer) Lister() v1.ConfigMapLister { - return v1.NewConfigMapLister(f.Informer().GetIndexer()) -} diff --git a/vendor/k8s.io/client-go/informers/core/v1/endpoints.go b/vendor/k8s.io/client-go/informers/core/v1/endpoints.go deleted file mode 100644 index 248aedfee..000000000 --- a/vendor/k8s.io/client-go/informers/core/v1/endpoints.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package v1 - -import ( - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" - kubernetes "k8s.io/client-go/kubernetes" - v1 "k8s.io/client-go/listers/core/v1" - cache "k8s.io/client-go/tools/cache" - time "time" -) - -// EndpointsInformer provides access to a shared informer and lister for -// Endpoints. -type EndpointsInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.EndpointsLister -} - -type endpointsInformer struct { - factory internalinterfaces.SharedInformerFactory -} - -// NewEndpointsInformer constructs a new informer for Endpoints type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewEndpointsInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { - return client.CoreV1().Endpoints(namespace).List(options) - }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { - return client.CoreV1().Endpoints(namespace).Watch(options) - }, - }, - &core_v1.Endpoints{}, - resyncPeriod, - indexers, - ) -} - -func defaultEndpointsInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewEndpointsInformer(client, meta_v1.NamespaceAll, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) -} - -func (f *endpointsInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.Endpoints{}, defaultEndpointsInformer) -} - -func (f *endpointsInformer) Lister() v1.EndpointsLister { - return v1.NewEndpointsLister(f.Informer().GetIndexer()) -} diff --git a/vendor/k8s.io/client-go/informers/core/v1/event.go b/vendor/k8s.io/client-go/informers/core/v1/event.go deleted file mode 100644 index 0751775c3..000000000 --- a/vendor/k8s.io/client-go/informers/core/v1/event.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package v1 - -import ( - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" - kubernetes "k8s.io/client-go/kubernetes" - v1 "k8s.io/client-go/listers/core/v1" - cache "k8s.io/client-go/tools/cache" - time "time" -) - -// EventInformer provides access to a shared informer and lister for -// Events. -type EventInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.EventLister -} - -type eventInformer struct { - factory internalinterfaces.SharedInformerFactory -} - -// NewEventInformer constructs a new informer for Event type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewEventInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { - return client.CoreV1().Events(namespace).List(options) - }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { - return client.CoreV1().Events(namespace).Watch(options) - }, - }, - &core_v1.Event{}, - resyncPeriod, - indexers, - ) -} - -func defaultEventInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewEventInformer(client, meta_v1.NamespaceAll, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) -} - -func (f *eventInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.Event{}, defaultEventInformer) -} - -func (f *eventInformer) Lister() v1.EventLister { - return v1.NewEventLister(f.Informer().GetIndexer()) -} diff --git a/vendor/k8s.io/client-go/informers/core/v1/interface.go b/vendor/k8s.io/client-go/informers/core/v1/interface.go deleted file mode 100644 index 5f2ff96b2..000000000 --- a/vendor/k8s.io/client-go/informers/core/v1/interface.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package v1 - -import ( - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // ComponentStatuses returns a ComponentStatusInformer. - ComponentStatuses() ComponentStatusInformer - // ConfigMaps returns a ConfigMapInformer. - ConfigMaps() ConfigMapInformer - // Endpoints returns a EndpointsInformer. - Endpoints() EndpointsInformer - // Events returns a EventInformer. - Events() EventInformer - // LimitRanges returns a LimitRangeInformer. - LimitRanges() LimitRangeInformer - // Namespaces returns a NamespaceInformer. - Namespaces() NamespaceInformer - // Nodes returns a NodeInformer. - Nodes() NodeInformer - // PersistentVolumes returns a PersistentVolumeInformer. - PersistentVolumes() PersistentVolumeInformer - // PersistentVolumeClaims returns a PersistentVolumeClaimInformer. - PersistentVolumeClaims() PersistentVolumeClaimInformer - // Pods returns a PodInformer. - Pods() PodInformer - // PodTemplates returns a PodTemplateInformer. - PodTemplates() PodTemplateInformer - // ReplicationControllers returns a ReplicationControllerInformer. - ReplicationControllers() ReplicationControllerInformer - // ResourceQuotas returns a ResourceQuotaInformer. - ResourceQuotas() ResourceQuotaInformer - // Secrets returns a SecretInformer. - Secrets() SecretInformer - // Services returns a ServiceInformer. - Services() ServiceInformer - // ServiceAccounts returns a ServiceAccountInformer. - ServiceAccounts() ServiceAccountInformer -} - -type version struct { - internalinterfaces.SharedInformerFactory -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory) Interface { - return &version{f} -} - -// ComponentStatuses returns a ComponentStatusInformer. -func (v *version) ComponentStatuses() ComponentStatusInformer { - return &componentStatusInformer{factory: v.SharedInformerFactory} -} - -// ConfigMaps returns a ConfigMapInformer. -func (v *version) ConfigMaps() ConfigMapInformer { - return &configMapInformer{factory: v.SharedInformerFactory} -} - -// Endpoints returns a EndpointsInformer. -func (v *version) Endpoints() EndpointsInformer { - return &endpointsInformer{factory: v.SharedInformerFactory} -} - -// Events returns a EventInformer. -func (v *version) Events() EventInformer { - return &eventInformer{factory: v.SharedInformerFactory} -} - -// LimitRanges returns a LimitRangeInformer. -func (v *version) LimitRanges() LimitRangeInformer { - return &limitRangeInformer{factory: v.SharedInformerFactory} -} - -// Namespaces returns a NamespaceInformer. -func (v *version) Namespaces() NamespaceInformer { - return &namespaceInformer{factory: v.SharedInformerFactory} -} - -// Nodes returns a NodeInformer. -func (v *version) Nodes() NodeInformer { - return &nodeInformer{factory: v.SharedInformerFactory} -} - -// PersistentVolumes returns a PersistentVolumeInformer. -func (v *version) PersistentVolumes() PersistentVolumeInformer { - return &persistentVolumeInformer{factory: v.SharedInformerFactory} -} - -// PersistentVolumeClaims returns a PersistentVolumeClaimInformer. -func (v *version) PersistentVolumeClaims() PersistentVolumeClaimInformer { - return &persistentVolumeClaimInformer{factory: v.SharedInformerFactory} -} - -// Pods returns a PodInformer. -func (v *version) Pods() PodInformer { - return &podInformer{factory: v.SharedInformerFactory} -} - -// PodTemplates returns a PodTemplateInformer. -func (v *version) PodTemplates() PodTemplateInformer { - return &podTemplateInformer{factory: v.SharedInformerFactory} -} - -// ReplicationControllers returns a ReplicationControllerInformer. -func (v *version) ReplicationControllers() ReplicationControllerInformer { - return &replicationControllerInformer{factory: v.SharedInformerFactory} -} - -// ResourceQuotas returns a ResourceQuotaInformer. -func (v *version) ResourceQuotas() ResourceQuotaInformer { - return &resourceQuotaInformer{factory: v.SharedInformerFactory} -} - -// Secrets returns a SecretInformer. -func (v *version) Secrets() SecretInformer { - return &secretInformer{factory: v.SharedInformerFactory} -} - -// Services returns a ServiceInformer. -func (v *version) Services() ServiceInformer { - return &serviceInformer{factory: v.SharedInformerFactory} -} - -// ServiceAccounts returns a ServiceAccountInformer. -func (v *version) ServiceAccounts() ServiceAccountInformer { - return &serviceAccountInformer{factory: v.SharedInformerFactory} -} diff --git a/vendor/k8s.io/client-go/informers/core/v1/limitrange.go b/vendor/k8s.io/client-go/informers/core/v1/limitrange.go deleted file mode 100644 index 77ffbb6dc..000000000 --- a/vendor/k8s.io/client-go/informers/core/v1/limitrange.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package v1 - -import ( - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" - kubernetes "k8s.io/client-go/kubernetes" - v1 "k8s.io/client-go/listers/core/v1" - cache "k8s.io/client-go/tools/cache" - time "time" -) - -// LimitRangeInformer provides access to a shared informer and lister for -// LimitRanges. -type LimitRangeInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.LimitRangeLister -} - -type limitRangeInformer struct { - factory internalinterfaces.SharedInformerFactory -} - -// NewLimitRangeInformer constructs a new informer for LimitRange type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewLimitRangeInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { - return client.CoreV1().LimitRanges(namespace).List(options) - }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { - return client.CoreV1().LimitRanges(namespace).Watch(options) - }, - }, - &core_v1.LimitRange{}, - resyncPeriod, - indexers, - ) -} - -func defaultLimitRangeInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewLimitRangeInformer(client, meta_v1.NamespaceAll, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) -} - -func (f *limitRangeInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.LimitRange{}, defaultLimitRangeInformer) -} - -func (f *limitRangeInformer) Lister() v1.LimitRangeLister { - return v1.NewLimitRangeLister(f.Informer().GetIndexer()) -} diff --git a/vendor/k8s.io/client-go/informers/core/v1/namespace.go b/vendor/k8s.io/client-go/informers/core/v1/namespace.go deleted file mode 100644 index e37dccfda..000000000 --- a/vendor/k8s.io/client-go/informers/core/v1/namespace.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package v1 - -import ( - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" - kubernetes "k8s.io/client-go/kubernetes" - v1 "k8s.io/client-go/listers/core/v1" - cache "k8s.io/client-go/tools/cache" - time "time" -) - -// NamespaceInformer provides access to a shared informer and lister for -// Namespaces. -type NamespaceInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.NamespaceLister -} - -type namespaceInformer struct { - factory internalinterfaces.SharedInformerFactory -} - -// NewNamespaceInformer constructs a new informer for Namespace type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewNamespaceInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { - return client.CoreV1().Namespaces().List(options) - }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { - return client.CoreV1().Namespaces().Watch(options) - }, - }, - &core_v1.Namespace{}, - resyncPeriod, - indexers, - ) -} - -func defaultNamespaceInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewNamespaceInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) -} - -func (f *namespaceInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.Namespace{}, defaultNamespaceInformer) -} - -func (f *namespaceInformer) Lister() v1.NamespaceLister { - return v1.NewNamespaceLister(f.Informer().GetIndexer()) -} diff --git a/vendor/k8s.io/client-go/informers/core/v1/node.go b/vendor/k8s.io/client-go/informers/core/v1/node.go deleted file mode 100644 index 9cd065b22..000000000 --- a/vendor/k8s.io/client-go/informers/core/v1/node.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package v1 - -import ( - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" - kubernetes "k8s.io/client-go/kubernetes" - v1 "k8s.io/client-go/listers/core/v1" - cache "k8s.io/client-go/tools/cache" - time "time" -) - -// NodeInformer provides access to a shared informer and lister for -// Nodes. -type NodeInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.NodeLister -} - -type nodeInformer struct { - factory internalinterfaces.SharedInformerFactory -} - -// NewNodeInformer constructs a new informer for Node type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewNodeInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { - return client.CoreV1().Nodes().List(options) - }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { - return client.CoreV1().Nodes().Watch(options) - }, - }, - &core_v1.Node{}, - resyncPeriod, - indexers, - ) -} - -func defaultNodeInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewNodeInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) -} - -func (f *nodeInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.Node{}, defaultNodeInformer) -} - -func (f *nodeInformer) Lister() v1.NodeLister { - return v1.NewNodeLister(f.Informer().GetIndexer()) -} diff --git a/vendor/k8s.io/client-go/informers/core/v1/persistentvolume.go b/vendor/k8s.io/client-go/informers/core/v1/persistentvolume.go deleted file mode 100644 index c41e22f37..000000000 --- a/vendor/k8s.io/client-go/informers/core/v1/persistentvolume.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package v1 - -import ( - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" - kubernetes "k8s.io/client-go/kubernetes" - v1 "k8s.io/client-go/listers/core/v1" - cache "k8s.io/client-go/tools/cache" - time "time" -) - -// PersistentVolumeInformer provides access to a shared informer and lister for -// PersistentVolumes. -type PersistentVolumeInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.PersistentVolumeLister -} - -type persistentVolumeInformer struct { - factory internalinterfaces.SharedInformerFactory -} - -// NewPersistentVolumeInformer constructs a new informer for PersistentVolume type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewPersistentVolumeInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { - return client.CoreV1().PersistentVolumes().List(options) - }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { - return client.CoreV1().PersistentVolumes().Watch(options) - }, - }, - &core_v1.PersistentVolume{}, - resyncPeriod, - indexers, - ) -} - -func defaultPersistentVolumeInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewPersistentVolumeInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) -} - -func (f *persistentVolumeInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.PersistentVolume{}, defaultPersistentVolumeInformer) -} - -func (f *persistentVolumeInformer) Lister() v1.PersistentVolumeLister { - return v1.NewPersistentVolumeLister(f.Informer().GetIndexer()) -} diff --git a/vendor/k8s.io/client-go/informers/core/v1/persistentvolumeclaim.go b/vendor/k8s.io/client-go/informers/core/v1/persistentvolumeclaim.go deleted file mode 100644 index 2d0364caa..000000000 --- a/vendor/k8s.io/client-go/informers/core/v1/persistentvolumeclaim.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package v1 - -import ( - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" - kubernetes "k8s.io/client-go/kubernetes" - v1 "k8s.io/client-go/listers/core/v1" - cache "k8s.io/client-go/tools/cache" - time "time" -) - -// PersistentVolumeClaimInformer provides access to a shared informer and lister for -// PersistentVolumeClaims. -type PersistentVolumeClaimInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.PersistentVolumeClaimLister -} - -type persistentVolumeClaimInformer struct { - factory internalinterfaces.SharedInformerFactory -} - -// NewPersistentVolumeClaimInformer constructs a new informer for PersistentVolumeClaim type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewPersistentVolumeClaimInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { - return client.CoreV1().PersistentVolumeClaims(namespace).List(options) - }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { - return client.CoreV1().PersistentVolumeClaims(namespace).Watch(options) - }, - }, - &core_v1.PersistentVolumeClaim{}, - resyncPeriod, - indexers, - ) -} - -func defaultPersistentVolumeClaimInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewPersistentVolumeClaimInformer(client, meta_v1.NamespaceAll, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) -} - -func (f *persistentVolumeClaimInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.PersistentVolumeClaim{}, defaultPersistentVolumeClaimInformer) -} - -func (f *persistentVolumeClaimInformer) Lister() v1.PersistentVolumeClaimLister { - return v1.NewPersistentVolumeClaimLister(f.Informer().GetIndexer()) -} diff --git a/vendor/k8s.io/client-go/informers/core/v1/pod.go b/vendor/k8s.io/client-go/informers/core/v1/pod.go deleted file mode 100644 index d926fbd0f..000000000 --- a/vendor/k8s.io/client-go/informers/core/v1/pod.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package v1 - -import ( - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" - kubernetes "k8s.io/client-go/kubernetes" - v1 "k8s.io/client-go/listers/core/v1" - cache "k8s.io/client-go/tools/cache" - time "time" -) - -// PodInformer provides access to a shared informer and lister for -// Pods. -type PodInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.PodLister -} - -type podInformer struct { - factory internalinterfaces.SharedInformerFactory -} - -// NewPodInformer constructs a new informer for Pod type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewPodInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { - return client.CoreV1().Pods(namespace).List(options) - }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { - return client.CoreV1().Pods(namespace).Watch(options) - }, - }, - &core_v1.Pod{}, - resyncPeriod, - indexers, - ) -} - -func defaultPodInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewPodInformer(client, meta_v1.NamespaceAll, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) -} - -func (f *podInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.Pod{}, defaultPodInformer) -} - -func (f *podInformer) Lister() v1.PodLister { - return v1.NewPodLister(f.Informer().GetIndexer()) -} diff --git a/vendor/k8s.io/client-go/informers/core/v1/podtemplate.go b/vendor/k8s.io/client-go/informers/core/v1/podtemplate.go deleted file mode 100644 index b61f8667b..000000000 --- a/vendor/k8s.io/client-go/informers/core/v1/podtemplate.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package v1 - -import ( - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" - kubernetes "k8s.io/client-go/kubernetes" - v1 "k8s.io/client-go/listers/core/v1" - cache "k8s.io/client-go/tools/cache" - time "time" -) - -// PodTemplateInformer provides access to a shared informer and lister for -// PodTemplates. -type PodTemplateInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.PodTemplateLister -} - -type podTemplateInformer struct { - factory internalinterfaces.SharedInformerFactory -} - -// NewPodTemplateInformer constructs a new informer for PodTemplate type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewPodTemplateInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { - return client.CoreV1().PodTemplates(namespace).List(options) - }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { - return client.CoreV1().PodTemplates(namespace).Watch(options) - }, - }, - &core_v1.PodTemplate{}, - resyncPeriod, - indexers, - ) -} - -func defaultPodTemplateInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewPodTemplateInformer(client, meta_v1.NamespaceAll, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) -} - -func (f *podTemplateInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.PodTemplate{}, defaultPodTemplateInformer) -} - -func (f *podTemplateInformer) Lister() v1.PodTemplateLister { - return v1.NewPodTemplateLister(f.Informer().GetIndexer()) -} diff --git a/vendor/k8s.io/client-go/informers/core/v1/replicationcontroller.go b/vendor/k8s.io/client-go/informers/core/v1/replicationcontroller.go deleted file mode 100644 index f305994cc..000000000 --- a/vendor/k8s.io/client-go/informers/core/v1/replicationcontroller.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package v1 - -import ( - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" - kubernetes "k8s.io/client-go/kubernetes" - v1 "k8s.io/client-go/listers/core/v1" - cache "k8s.io/client-go/tools/cache" - time "time" -) - -// ReplicationControllerInformer provides access to a shared informer and lister for -// ReplicationControllers. -type ReplicationControllerInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.ReplicationControllerLister -} - -type replicationControllerInformer struct { - factory internalinterfaces.SharedInformerFactory -} - -// NewReplicationControllerInformer constructs a new informer for ReplicationController type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewReplicationControllerInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { - return client.CoreV1().ReplicationControllers(namespace).List(options) - }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { - return client.CoreV1().ReplicationControllers(namespace).Watch(options) - }, - }, - &core_v1.ReplicationController{}, - resyncPeriod, - indexers, - ) -} - -func defaultReplicationControllerInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewReplicationControllerInformer(client, meta_v1.NamespaceAll, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) -} - -func (f *replicationControllerInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.ReplicationController{}, defaultReplicationControllerInformer) -} - -func (f *replicationControllerInformer) Lister() v1.ReplicationControllerLister { - return v1.NewReplicationControllerLister(f.Informer().GetIndexer()) -} diff --git a/vendor/k8s.io/client-go/informers/core/v1/resourcequota.go b/vendor/k8s.io/client-go/informers/core/v1/resourcequota.go deleted file mode 100644 index ac69106c8..000000000 --- a/vendor/k8s.io/client-go/informers/core/v1/resourcequota.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package v1 - -import ( - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" - kubernetes "k8s.io/client-go/kubernetes" - v1 "k8s.io/client-go/listers/core/v1" - cache "k8s.io/client-go/tools/cache" - time "time" -) - -// ResourceQuotaInformer provides access to a shared informer and lister for -// ResourceQuotas. -type ResourceQuotaInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.ResourceQuotaLister -} - -type resourceQuotaInformer struct { - factory internalinterfaces.SharedInformerFactory -} - -// NewResourceQuotaInformer constructs a new informer for ResourceQuota type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewResourceQuotaInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { - return client.CoreV1().ResourceQuotas(namespace).List(options) - }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { - return client.CoreV1().ResourceQuotas(namespace).Watch(options) - }, - }, - &core_v1.ResourceQuota{}, - resyncPeriod, - indexers, - ) -} - -func defaultResourceQuotaInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewResourceQuotaInformer(client, meta_v1.NamespaceAll, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) -} - -func (f *resourceQuotaInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.ResourceQuota{}, defaultResourceQuotaInformer) -} - -func (f *resourceQuotaInformer) Lister() v1.ResourceQuotaLister { - return v1.NewResourceQuotaLister(f.Informer().GetIndexer()) -} diff --git a/vendor/k8s.io/client-go/informers/core/v1/secret.go b/vendor/k8s.io/client-go/informers/core/v1/secret.go deleted file mode 100644 index 0c7464bc8..000000000 --- a/vendor/k8s.io/client-go/informers/core/v1/secret.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package v1 - -import ( - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" - kubernetes "k8s.io/client-go/kubernetes" - v1 "k8s.io/client-go/listers/core/v1" - cache "k8s.io/client-go/tools/cache" - time "time" -) - -// SecretInformer provides access to a shared informer and lister for -// Secrets. -type SecretInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.SecretLister -} - -type secretInformer struct { - factory internalinterfaces.SharedInformerFactory -} - -// NewSecretInformer constructs a new informer for Secret type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewSecretInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { - return client.CoreV1().Secrets(namespace).List(options) - }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { - return client.CoreV1().Secrets(namespace).Watch(options) - }, - }, - &core_v1.Secret{}, - resyncPeriod, - indexers, - ) -} - -func defaultSecretInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewSecretInformer(client, meta_v1.NamespaceAll, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) -} - -func (f *secretInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.Secret{}, defaultSecretInformer) -} - -func (f *secretInformer) Lister() v1.SecretLister { - return v1.NewSecretLister(f.Informer().GetIndexer()) -} diff --git a/vendor/k8s.io/client-go/informers/core/v1/service.go b/vendor/k8s.io/client-go/informers/core/v1/service.go deleted file mode 100644 index bba8ab9dc..000000000 --- a/vendor/k8s.io/client-go/informers/core/v1/service.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package v1 - -import ( - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" - kubernetes "k8s.io/client-go/kubernetes" - v1 "k8s.io/client-go/listers/core/v1" - cache "k8s.io/client-go/tools/cache" - time "time" -) - -// ServiceInformer provides access to a shared informer and lister for -// Services. -type ServiceInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.ServiceLister -} - -type serviceInformer struct { - factory internalinterfaces.SharedInformerFactory -} - -// NewServiceInformer constructs a new informer for Service type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewServiceInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { - return client.CoreV1().Services(namespace).List(options) - }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { - return client.CoreV1().Services(namespace).Watch(options) - }, - }, - &core_v1.Service{}, - resyncPeriod, - indexers, - ) -} - -func defaultServiceInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewServiceInformer(client, meta_v1.NamespaceAll, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) -} - -func (f *serviceInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.Service{}, defaultServiceInformer) -} - -func (f *serviceInformer) Lister() v1.ServiceLister { - return v1.NewServiceLister(f.Informer().GetIndexer()) -} diff --git a/vendor/k8s.io/client-go/informers/core/v1/serviceaccount.go b/vendor/k8s.io/client-go/informers/core/v1/serviceaccount.go deleted file mode 100644 index d41667bb2..000000000 --- a/vendor/k8s.io/client-go/informers/core/v1/serviceaccount.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package v1 - -import ( - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" - kubernetes "k8s.io/client-go/kubernetes" - v1 "k8s.io/client-go/listers/core/v1" - cache "k8s.io/client-go/tools/cache" - time "time" -) - -// ServiceAccountInformer provides access to a shared informer and lister for -// ServiceAccounts. -type ServiceAccountInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.ServiceAccountLister -} - -type serviceAccountInformer struct { - factory internalinterfaces.SharedInformerFactory -} - -// NewServiceAccountInformer constructs a new informer for ServiceAccount type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewServiceAccountInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { - return client.CoreV1().ServiceAccounts(namespace).List(options) - }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { - return client.CoreV1().ServiceAccounts(namespace).Watch(options) - }, - }, - &core_v1.ServiceAccount{}, - resyncPeriod, - indexers, - ) -} - -func defaultServiceAccountInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewServiceAccountInformer(client, meta_v1.NamespaceAll, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) -} - -func (f *serviceAccountInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.ServiceAccount{}, defaultServiceAccountInformer) -} - -func (f *serviceAccountInformer) Lister() v1.ServiceAccountLister { - return v1.NewServiceAccountLister(f.Informer().GetIndexer()) -} diff --git a/vendor/k8s.io/client-go/informers/extensions/v1beta1/BUILD b/vendor/k8s.io/client-go/informers/extensions/v1beta1/BUILD deleted file mode 100644 index 195f023ea..000000000 --- a/vendor/k8s.io/client-go/informers/extensions/v1beta1/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "daemonset.go", - "deployment.go", - "ingress.go", - "interface.go", - "podsecuritypolicy.go", - "replicaset.go", - "thirdpartyresource.go", - ], - deps = [ - "//vendor/k8s.io/api/extensions/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/listers/extensions/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/client-go/informers/extensions/v1beta1/daemonset.go b/vendor/k8s.io/client-go/informers/extensions/v1beta1/daemonset.go deleted file mode 100644 index e203ea6f2..000000000 --- a/vendor/k8s.io/client-go/informers/extensions/v1beta1/daemonset.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package v1beta1 - -import ( - extensions_v1beta1 "k8s.io/api/extensions/v1beta1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" - kubernetes "k8s.io/client-go/kubernetes" - v1beta1 "k8s.io/client-go/listers/extensions/v1beta1" - cache "k8s.io/client-go/tools/cache" - time "time" -) - -// DaemonSetInformer provides access to a shared informer and lister for -// DaemonSets. -type DaemonSetInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1beta1.DaemonSetLister -} - -type daemonSetInformer struct { - factory internalinterfaces.SharedInformerFactory -} - -// NewDaemonSetInformer constructs a new informer for DaemonSet type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewDaemonSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return client.ExtensionsV1beta1().DaemonSets(namespace).List(options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return client.ExtensionsV1beta1().DaemonSets(namespace).Watch(options) - }, - }, - &extensions_v1beta1.DaemonSet{}, - resyncPeriod, - indexers, - ) -} - -func defaultDaemonSetInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewDaemonSetInformer(client, v1.NamespaceAll, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) -} - -func (f *daemonSetInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&extensions_v1beta1.DaemonSet{}, defaultDaemonSetInformer) -} - -func (f *daemonSetInformer) Lister() v1beta1.DaemonSetLister { - return v1beta1.NewDaemonSetLister(f.Informer().GetIndexer()) -} diff --git a/vendor/k8s.io/client-go/informers/extensions/v1beta1/deployment.go b/vendor/k8s.io/client-go/informers/extensions/v1beta1/deployment.go deleted file mode 100644 index 4d20f8abe..000000000 --- a/vendor/k8s.io/client-go/informers/extensions/v1beta1/deployment.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package v1beta1 - -import ( - extensions_v1beta1 "k8s.io/api/extensions/v1beta1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" - kubernetes "k8s.io/client-go/kubernetes" - v1beta1 "k8s.io/client-go/listers/extensions/v1beta1" - cache "k8s.io/client-go/tools/cache" - time "time" -) - -// DeploymentInformer provides access to a shared informer and lister for -// Deployments. -type DeploymentInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1beta1.DeploymentLister -} - -type deploymentInformer struct { - factory internalinterfaces.SharedInformerFactory -} - -// NewDeploymentInformer constructs a new informer for Deployment type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewDeploymentInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return client.ExtensionsV1beta1().Deployments(namespace).List(options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return client.ExtensionsV1beta1().Deployments(namespace).Watch(options) - }, - }, - &extensions_v1beta1.Deployment{}, - resyncPeriod, - indexers, - ) -} - -func defaultDeploymentInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewDeploymentInformer(client, v1.NamespaceAll, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) -} - -func (f *deploymentInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&extensions_v1beta1.Deployment{}, defaultDeploymentInformer) -} - -func (f *deploymentInformer) Lister() v1beta1.DeploymentLister { - return v1beta1.NewDeploymentLister(f.Informer().GetIndexer()) -} diff --git a/vendor/k8s.io/client-go/informers/extensions/v1beta1/ingress.go b/vendor/k8s.io/client-go/informers/extensions/v1beta1/ingress.go deleted file mode 100644 index 9280ffe37..000000000 --- a/vendor/k8s.io/client-go/informers/extensions/v1beta1/ingress.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package v1beta1 - -import ( - extensions_v1beta1 "k8s.io/api/extensions/v1beta1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" - kubernetes "k8s.io/client-go/kubernetes" - v1beta1 "k8s.io/client-go/listers/extensions/v1beta1" - cache "k8s.io/client-go/tools/cache" - time "time" -) - -// IngressInformer provides access to a shared informer and lister for -// Ingresses. -type IngressInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1beta1.IngressLister -} - -type ingressInformer struct { - factory internalinterfaces.SharedInformerFactory -} - -// NewIngressInformer constructs a new informer for Ingress type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewIngressInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return client.ExtensionsV1beta1().Ingresses(namespace).List(options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return client.ExtensionsV1beta1().Ingresses(namespace).Watch(options) - }, - }, - &extensions_v1beta1.Ingress{}, - resyncPeriod, - indexers, - ) -} - -func defaultIngressInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewIngressInformer(client, v1.NamespaceAll, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) -} - -func (f *ingressInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&extensions_v1beta1.Ingress{}, defaultIngressInformer) -} - -func (f *ingressInformer) Lister() v1beta1.IngressLister { - return v1beta1.NewIngressLister(f.Informer().GetIndexer()) -} diff --git a/vendor/k8s.io/client-go/informers/extensions/v1beta1/interface.go b/vendor/k8s.io/client-go/informers/extensions/v1beta1/interface.go deleted file mode 100644 index ef226bae0..000000000 --- a/vendor/k8s.io/client-go/informers/extensions/v1beta1/interface.go +++ /dev/null @@ -1,78 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package v1beta1 - -import ( - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // DaemonSets returns a DaemonSetInformer. - DaemonSets() DaemonSetInformer - // Deployments returns a DeploymentInformer. - Deployments() DeploymentInformer - // Ingresses returns a IngressInformer. - Ingresses() IngressInformer - // PodSecurityPolicies returns a PodSecurityPolicyInformer. - PodSecurityPolicies() PodSecurityPolicyInformer - // ReplicaSets returns a ReplicaSetInformer. - ReplicaSets() ReplicaSetInformer - // ThirdPartyResources returns a ThirdPartyResourceInformer. - ThirdPartyResources() ThirdPartyResourceInformer -} - -type version struct { - internalinterfaces.SharedInformerFactory -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory) Interface { - return &version{f} -} - -// DaemonSets returns a DaemonSetInformer. -func (v *version) DaemonSets() DaemonSetInformer { - return &daemonSetInformer{factory: v.SharedInformerFactory} -} - -// Deployments returns a DeploymentInformer. -func (v *version) Deployments() DeploymentInformer { - return &deploymentInformer{factory: v.SharedInformerFactory} -} - -// Ingresses returns a IngressInformer. -func (v *version) Ingresses() IngressInformer { - return &ingressInformer{factory: v.SharedInformerFactory} -} - -// PodSecurityPolicies returns a PodSecurityPolicyInformer. -func (v *version) PodSecurityPolicies() PodSecurityPolicyInformer { - return &podSecurityPolicyInformer{factory: v.SharedInformerFactory} -} - -// ReplicaSets returns a ReplicaSetInformer. -func (v *version) ReplicaSets() ReplicaSetInformer { - return &replicaSetInformer{factory: v.SharedInformerFactory} -} - -// ThirdPartyResources returns a ThirdPartyResourceInformer. -func (v *version) ThirdPartyResources() ThirdPartyResourceInformer { - return &thirdPartyResourceInformer{factory: v.SharedInformerFactory} -} diff --git a/vendor/k8s.io/client-go/informers/extensions/v1beta1/podsecuritypolicy.go b/vendor/k8s.io/client-go/informers/extensions/v1beta1/podsecuritypolicy.go deleted file mode 100644 index 59336b0e4..000000000 --- a/vendor/k8s.io/client-go/informers/extensions/v1beta1/podsecuritypolicy.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package v1beta1 - -import ( - extensions_v1beta1 "k8s.io/api/extensions/v1beta1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" - kubernetes "k8s.io/client-go/kubernetes" - v1beta1 "k8s.io/client-go/listers/extensions/v1beta1" - cache "k8s.io/client-go/tools/cache" - time "time" -) - -// PodSecurityPolicyInformer provides access to a shared informer and lister for -// PodSecurityPolicies. -type PodSecurityPolicyInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1beta1.PodSecurityPolicyLister -} - -type podSecurityPolicyInformer struct { - factory internalinterfaces.SharedInformerFactory -} - -// NewPodSecurityPolicyInformer constructs a new informer for PodSecurityPolicy type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewPodSecurityPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return client.ExtensionsV1beta1().PodSecurityPolicies().List(options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return client.ExtensionsV1beta1().PodSecurityPolicies().Watch(options) - }, - }, - &extensions_v1beta1.PodSecurityPolicy{}, - resyncPeriod, - indexers, - ) -} - -func defaultPodSecurityPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewPodSecurityPolicyInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) -} - -func (f *podSecurityPolicyInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&extensions_v1beta1.PodSecurityPolicy{}, defaultPodSecurityPolicyInformer) -} - -func (f *podSecurityPolicyInformer) Lister() v1beta1.PodSecurityPolicyLister { - return v1beta1.NewPodSecurityPolicyLister(f.Informer().GetIndexer()) -} diff --git a/vendor/k8s.io/client-go/informers/extensions/v1beta1/replicaset.go b/vendor/k8s.io/client-go/informers/extensions/v1beta1/replicaset.go deleted file mode 100644 index 8d1af8119..000000000 --- a/vendor/k8s.io/client-go/informers/extensions/v1beta1/replicaset.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package v1beta1 - -import ( - extensions_v1beta1 "k8s.io/api/extensions/v1beta1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" - kubernetes "k8s.io/client-go/kubernetes" - v1beta1 "k8s.io/client-go/listers/extensions/v1beta1" - cache "k8s.io/client-go/tools/cache" - time "time" -) - -// ReplicaSetInformer provides access to a shared informer and lister for -// ReplicaSets. -type ReplicaSetInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1beta1.ReplicaSetLister -} - -type replicaSetInformer struct { - factory internalinterfaces.SharedInformerFactory -} - -// NewReplicaSetInformer constructs a new informer for ReplicaSet type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewReplicaSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return client.ExtensionsV1beta1().ReplicaSets(namespace).List(options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return client.ExtensionsV1beta1().ReplicaSets(namespace).Watch(options) - }, - }, - &extensions_v1beta1.ReplicaSet{}, - resyncPeriod, - indexers, - ) -} - -func defaultReplicaSetInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewReplicaSetInformer(client, v1.NamespaceAll, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) -} - -func (f *replicaSetInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&extensions_v1beta1.ReplicaSet{}, defaultReplicaSetInformer) -} - -func (f *replicaSetInformer) Lister() v1beta1.ReplicaSetLister { - return v1beta1.NewReplicaSetLister(f.Informer().GetIndexer()) -} diff --git a/vendor/k8s.io/client-go/informers/extensions/v1beta1/thirdpartyresource.go b/vendor/k8s.io/client-go/informers/extensions/v1beta1/thirdpartyresource.go deleted file mode 100644 index 62d02a548..000000000 --- a/vendor/k8s.io/client-go/informers/extensions/v1beta1/thirdpartyresource.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by informer-gen - -package v1beta1 - -import ( - extensions_v1beta1 "k8s.io/api/extensions/v1beta1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" - kubernetes "k8s.io/client-go/kubernetes" - v1beta1 "k8s.io/client-go/listers/extensions/v1beta1" - cache "k8s.io/client-go/tools/cache" - time "time" -) - -// ThirdPartyResourceInformer provides access to a shared informer and lister for -// ThirdPartyResources. -type ThirdPartyResourceInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1beta1.ThirdPartyResourceLister -} - -type thirdPartyResourceInformer struct { - factory internalinterfaces.SharedInformerFactory -} - -// NewThirdPartyResourceInformer constructs a new informer for ThirdPartyResource type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewThirdPartyResourceInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return client.ExtensionsV1beta1().ThirdPartyResources().List(options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return client.ExtensionsV1beta1().ThirdPartyResources().Watch(options) - }, - }, - &extensions_v1beta1.ThirdPartyResource{}, - resyncPeriod, - indexers, - ) -} - -func defaultThirdPartyResourceInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewThirdPartyResourceInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) -} - -func (f *thirdPartyResourceInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&extensions_v1beta1.ThirdPartyResource{}, defaultThirdPartyResourceInformer) -} - -func (f *thirdPartyResourceInformer) Lister() v1beta1.ThirdPartyResourceLister { - return v1beta1.NewThirdPartyResourceLister(f.Informer().GetIndexer()) -} diff --git a/vendor/k8s.io/client-go/kubernetes/import.go b/vendor/k8s.io/client-go/kubernetes/import.go index 93f3e4c6e..c4f9a91bc 100644 --- a/vendor/k8s.io/client-go/kubernetes/import.go +++ b/vendor/k8s.io/client-go/kubernetes/import.go @@ -16,4 +16,4 @@ limitations under the License. // This file exists to enforce this clientset's vanity import path. -package kubernetes +package kubernetes // import "k8s.io/client-go/kubernetes" diff --git a/vendor/k8s.io/client-go/listers/core/v1/BUILD b/vendor/k8s.io/client-go/listers/core/v1/BUILD deleted file mode 100644 index beb7e6635..000000000 --- a/vendor/k8s.io/client-go/listers/core/v1/BUILD +++ /dev/null @@ -1,52 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "componentstatus.go", - "configmap.go", - "endpoints.go", - "event.go", - "expansion_generated.go", - "limitrange.go", - "namespace.go", - "node.go", - "node_expansion.go", - "persistentvolume.go", - "persistentvolumeclaim.go", - "pod.go", - "podtemplate.go", - "replicationcontroller.go", - "replicationcontroller_expansion.go", - "resourcequota.go", - "secret.go", - "service.go", - "service_expansion.go", - "serviceaccount.go", - ], - deps = [ - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/client-go/listers/core/v1/componentstatus.go b/vendor/k8s.io/client-go/listers/core/v1/componentstatus.go deleted file mode 100644 index a612a544c..000000000 --- a/vendor/k8s.io/client-go/listers/core/v1/componentstatus.go +++ /dev/null @@ -1,67 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package v1 - -import ( - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// ComponentStatusLister helps list ComponentStatuses. -type ComponentStatusLister interface { - // List lists all ComponentStatuses in the indexer. - List(selector labels.Selector) (ret []*v1.ComponentStatus, err error) - // Get retrieves the ComponentStatus from the index for a given name. - Get(name string) (*v1.ComponentStatus, error) - ComponentStatusListerExpansion -} - -// componentStatusLister implements the ComponentStatusLister interface. -type componentStatusLister struct { - indexer cache.Indexer -} - -// NewComponentStatusLister returns a new ComponentStatusLister. -func NewComponentStatusLister(indexer cache.Indexer) ComponentStatusLister { - return &componentStatusLister{indexer: indexer} -} - -// List lists all ComponentStatuses in the indexer. -func (s *componentStatusLister) List(selector labels.Selector) (ret []*v1.ComponentStatus, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.ComponentStatus)) - }) - return ret, err -} - -// Get retrieves the ComponentStatus from the index for a given name. -func (s *componentStatusLister) Get(name string) (*v1.ComponentStatus, error) { - key := &v1.ComponentStatus{ObjectMeta: meta_v1.ObjectMeta{Name: name}} - obj, exists, err := s.indexer.Get(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("componentstatus"), name) - } - return obj.(*v1.ComponentStatus), nil -} diff --git a/vendor/k8s.io/client-go/listers/core/v1/configmap.go b/vendor/k8s.io/client-go/listers/core/v1/configmap.go deleted file mode 100644 index e976928d9..000000000 --- a/vendor/k8s.io/client-go/listers/core/v1/configmap.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package v1 - -import ( - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// ConfigMapLister helps list ConfigMaps. -type ConfigMapLister interface { - // List lists all ConfigMaps in the indexer. - List(selector labels.Selector) (ret []*v1.ConfigMap, err error) - // ConfigMaps returns an object that can list and get ConfigMaps. - ConfigMaps(namespace string) ConfigMapNamespaceLister - ConfigMapListerExpansion -} - -// configMapLister implements the ConfigMapLister interface. -type configMapLister struct { - indexer cache.Indexer -} - -// NewConfigMapLister returns a new ConfigMapLister. -func NewConfigMapLister(indexer cache.Indexer) ConfigMapLister { - return &configMapLister{indexer: indexer} -} - -// List lists all ConfigMaps in the indexer. -func (s *configMapLister) List(selector labels.Selector) (ret []*v1.ConfigMap, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.ConfigMap)) - }) - return ret, err -} - -// ConfigMaps returns an object that can list and get ConfigMaps. -func (s *configMapLister) ConfigMaps(namespace string) ConfigMapNamespaceLister { - return configMapNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// ConfigMapNamespaceLister helps list and get ConfigMaps. -type ConfigMapNamespaceLister interface { - // List lists all ConfigMaps in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1.ConfigMap, err error) - // Get retrieves the ConfigMap from the indexer for a given namespace and name. - Get(name string) (*v1.ConfigMap, error) - ConfigMapNamespaceListerExpansion -} - -// configMapNamespaceLister implements the ConfigMapNamespaceLister -// interface. -type configMapNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all ConfigMaps in the indexer for a given namespace. -func (s configMapNamespaceLister) List(selector labels.Selector) (ret []*v1.ConfigMap, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.ConfigMap)) - }) - return ret, err -} - -// Get retrieves the ConfigMap from the indexer for a given namespace and name. -func (s configMapNamespaceLister) Get(name string) (*v1.ConfigMap, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("configmap"), name) - } - return obj.(*v1.ConfigMap), nil -} diff --git a/vendor/k8s.io/client-go/listers/core/v1/endpoints.go b/vendor/k8s.io/client-go/listers/core/v1/endpoints.go deleted file mode 100644 index 6f5a1133c..000000000 --- a/vendor/k8s.io/client-go/listers/core/v1/endpoints.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package v1 - -import ( - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// EndpointsLister helps list Endpoints. -type EndpointsLister interface { - // List lists all Endpoints in the indexer. - List(selector labels.Selector) (ret []*v1.Endpoints, err error) - // Endpoints returns an object that can list and get Endpoints. - Endpoints(namespace string) EndpointsNamespaceLister - EndpointsListerExpansion -} - -// endpointsLister implements the EndpointsLister interface. -type endpointsLister struct { - indexer cache.Indexer -} - -// NewEndpointsLister returns a new EndpointsLister. -func NewEndpointsLister(indexer cache.Indexer) EndpointsLister { - return &endpointsLister{indexer: indexer} -} - -// List lists all Endpoints in the indexer. -func (s *endpointsLister) List(selector labels.Selector) (ret []*v1.Endpoints, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Endpoints)) - }) - return ret, err -} - -// Endpoints returns an object that can list and get Endpoints. -func (s *endpointsLister) Endpoints(namespace string) EndpointsNamespaceLister { - return endpointsNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// EndpointsNamespaceLister helps list and get Endpoints. -type EndpointsNamespaceLister interface { - // List lists all Endpoints in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1.Endpoints, err error) - // Get retrieves the Endpoints from the indexer for a given namespace and name. - Get(name string) (*v1.Endpoints, error) - EndpointsNamespaceListerExpansion -} - -// endpointsNamespaceLister implements the EndpointsNamespaceLister -// interface. -type endpointsNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all Endpoints in the indexer for a given namespace. -func (s endpointsNamespaceLister) List(selector labels.Selector) (ret []*v1.Endpoints, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Endpoints)) - }) - return ret, err -} - -// Get retrieves the Endpoints from the indexer for a given namespace and name. -func (s endpointsNamespaceLister) Get(name string) (*v1.Endpoints, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("endpoints"), name) - } - return obj.(*v1.Endpoints), nil -} diff --git a/vendor/k8s.io/client-go/listers/core/v1/event.go b/vendor/k8s.io/client-go/listers/core/v1/event.go deleted file mode 100644 index b087cd8bd..000000000 --- a/vendor/k8s.io/client-go/listers/core/v1/event.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package v1 - -import ( - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// EventLister helps list Events. -type EventLister interface { - // List lists all Events in the indexer. - List(selector labels.Selector) (ret []*v1.Event, err error) - // Events returns an object that can list and get Events. - Events(namespace string) EventNamespaceLister - EventListerExpansion -} - -// eventLister implements the EventLister interface. -type eventLister struct { - indexer cache.Indexer -} - -// NewEventLister returns a new EventLister. -func NewEventLister(indexer cache.Indexer) EventLister { - return &eventLister{indexer: indexer} -} - -// List lists all Events in the indexer. -func (s *eventLister) List(selector labels.Selector) (ret []*v1.Event, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Event)) - }) - return ret, err -} - -// Events returns an object that can list and get Events. -func (s *eventLister) Events(namespace string) EventNamespaceLister { - return eventNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// EventNamespaceLister helps list and get Events. -type EventNamespaceLister interface { - // List lists all Events in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1.Event, err error) - // Get retrieves the Event from the indexer for a given namespace and name. - Get(name string) (*v1.Event, error) - EventNamespaceListerExpansion -} - -// eventNamespaceLister implements the EventNamespaceLister -// interface. -type eventNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all Events in the indexer for a given namespace. -func (s eventNamespaceLister) List(selector labels.Selector) (ret []*v1.Event, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Event)) - }) - return ret, err -} - -// Get retrieves the Event from the indexer for a given namespace and name. -func (s eventNamespaceLister) Get(name string) (*v1.Event, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("event"), name) - } - return obj.(*v1.Event), nil -} diff --git a/vendor/k8s.io/client-go/listers/core/v1/expansion_generated.go b/vendor/k8s.io/client-go/listers/core/v1/expansion_generated.go deleted file mode 100644 index a96db8dc9..000000000 --- a/vendor/k8s.io/client-go/listers/core/v1/expansion_generated.go +++ /dev/null @@ -1,111 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package v1 - -// ComponentStatusListerExpansion allows custom methods to be added to -// ComponentStatusLister. -type ComponentStatusListerExpansion interface{} - -// ConfigMapListerExpansion allows custom methods to be added to -// ConfigMapLister. -type ConfigMapListerExpansion interface{} - -// ConfigMapNamespaceListerExpansion allows custom methods to be added to -// ConfigMapNamespaceLister. -type ConfigMapNamespaceListerExpansion interface{} - -// EndpointsListerExpansion allows custom methods to be added to -// EndpointsLister. -type EndpointsListerExpansion interface{} - -// EndpointsNamespaceListerExpansion allows custom methods to be added to -// EndpointsNamespaceLister. -type EndpointsNamespaceListerExpansion interface{} - -// EventListerExpansion allows custom methods to be added to -// EventLister. -type EventListerExpansion interface{} - -// EventNamespaceListerExpansion allows custom methods to be added to -// EventNamespaceLister. -type EventNamespaceListerExpansion interface{} - -// LimitRangeListerExpansion allows custom methods to be added to -// LimitRangeLister. -type LimitRangeListerExpansion interface{} - -// LimitRangeNamespaceListerExpansion allows custom methods to be added to -// LimitRangeNamespaceLister. -type LimitRangeNamespaceListerExpansion interface{} - -// NamespaceListerExpansion allows custom methods to be added to -// NamespaceLister. -type NamespaceListerExpansion interface{} - -// PersistentVolumeListerExpansion allows custom methods to be added to -// PersistentVolumeLister. -type PersistentVolumeListerExpansion interface{} - -// PersistentVolumeClaimListerExpansion allows custom methods to be added to -// PersistentVolumeClaimLister. -type PersistentVolumeClaimListerExpansion interface{} - -// PersistentVolumeClaimNamespaceListerExpansion allows custom methods to be added to -// PersistentVolumeClaimNamespaceLister. -type PersistentVolumeClaimNamespaceListerExpansion interface{} - -// PodListerExpansion allows custom methods to be added to -// PodLister. -type PodListerExpansion interface{} - -// PodNamespaceListerExpansion allows custom methods to be added to -// PodNamespaceLister. -type PodNamespaceListerExpansion interface{} - -// PodTemplateListerExpansion allows custom methods to be added to -// PodTemplateLister. -type PodTemplateListerExpansion interface{} - -// PodTemplateNamespaceListerExpansion allows custom methods to be added to -// PodTemplateNamespaceLister. -type PodTemplateNamespaceListerExpansion interface{} - -// ResourceQuotaListerExpansion allows custom methods to be added to -// ResourceQuotaLister. -type ResourceQuotaListerExpansion interface{} - -// ResourceQuotaNamespaceListerExpansion allows custom methods to be added to -// ResourceQuotaNamespaceLister. -type ResourceQuotaNamespaceListerExpansion interface{} - -// SecretListerExpansion allows custom methods to be added to -// SecretLister. -type SecretListerExpansion interface{} - -// SecretNamespaceListerExpansion allows custom methods to be added to -// SecretNamespaceLister. -type SecretNamespaceListerExpansion interface{} - -// ServiceAccountListerExpansion allows custom methods to be added to -// ServiceAccountLister. -type ServiceAccountListerExpansion interface{} - -// ServiceAccountNamespaceListerExpansion allows custom methods to be added to -// ServiceAccountNamespaceLister. -type ServiceAccountNamespaceListerExpansion interface{} diff --git a/vendor/k8s.io/client-go/listers/core/v1/limitrange.go b/vendor/k8s.io/client-go/listers/core/v1/limitrange.go deleted file mode 100644 index f19943751..000000000 --- a/vendor/k8s.io/client-go/listers/core/v1/limitrange.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package v1 - -import ( - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// LimitRangeLister helps list LimitRanges. -type LimitRangeLister interface { - // List lists all LimitRanges in the indexer. - List(selector labels.Selector) (ret []*v1.LimitRange, err error) - // LimitRanges returns an object that can list and get LimitRanges. - LimitRanges(namespace string) LimitRangeNamespaceLister - LimitRangeListerExpansion -} - -// limitRangeLister implements the LimitRangeLister interface. -type limitRangeLister struct { - indexer cache.Indexer -} - -// NewLimitRangeLister returns a new LimitRangeLister. -func NewLimitRangeLister(indexer cache.Indexer) LimitRangeLister { - return &limitRangeLister{indexer: indexer} -} - -// List lists all LimitRanges in the indexer. -func (s *limitRangeLister) List(selector labels.Selector) (ret []*v1.LimitRange, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.LimitRange)) - }) - return ret, err -} - -// LimitRanges returns an object that can list and get LimitRanges. -func (s *limitRangeLister) LimitRanges(namespace string) LimitRangeNamespaceLister { - return limitRangeNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// LimitRangeNamespaceLister helps list and get LimitRanges. -type LimitRangeNamespaceLister interface { - // List lists all LimitRanges in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1.LimitRange, err error) - // Get retrieves the LimitRange from the indexer for a given namespace and name. - Get(name string) (*v1.LimitRange, error) - LimitRangeNamespaceListerExpansion -} - -// limitRangeNamespaceLister implements the LimitRangeNamespaceLister -// interface. -type limitRangeNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all LimitRanges in the indexer for a given namespace. -func (s limitRangeNamespaceLister) List(selector labels.Selector) (ret []*v1.LimitRange, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.LimitRange)) - }) - return ret, err -} - -// Get retrieves the LimitRange from the indexer for a given namespace and name. -func (s limitRangeNamespaceLister) Get(name string) (*v1.LimitRange, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("limitrange"), name) - } - return obj.(*v1.LimitRange), nil -} diff --git a/vendor/k8s.io/client-go/listers/core/v1/namespace.go b/vendor/k8s.io/client-go/listers/core/v1/namespace.go deleted file mode 100644 index 9b184f71c..000000000 --- a/vendor/k8s.io/client-go/listers/core/v1/namespace.go +++ /dev/null @@ -1,67 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package v1 - -import ( - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// NamespaceLister helps list Namespaces. -type NamespaceLister interface { - // List lists all Namespaces in the indexer. - List(selector labels.Selector) (ret []*v1.Namespace, err error) - // Get retrieves the Namespace from the index for a given name. - Get(name string) (*v1.Namespace, error) - NamespaceListerExpansion -} - -// namespaceLister implements the NamespaceLister interface. -type namespaceLister struct { - indexer cache.Indexer -} - -// NewNamespaceLister returns a new NamespaceLister. -func NewNamespaceLister(indexer cache.Indexer) NamespaceLister { - return &namespaceLister{indexer: indexer} -} - -// List lists all Namespaces in the indexer. -func (s *namespaceLister) List(selector labels.Selector) (ret []*v1.Namespace, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Namespace)) - }) - return ret, err -} - -// Get retrieves the Namespace from the index for a given name. -func (s *namespaceLister) Get(name string) (*v1.Namespace, error) { - key := &v1.Namespace{ObjectMeta: meta_v1.ObjectMeta{Name: name}} - obj, exists, err := s.indexer.Get(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("namespace"), name) - } - return obj.(*v1.Namespace), nil -} diff --git a/vendor/k8s.io/client-go/listers/core/v1/node.go b/vendor/k8s.io/client-go/listers/core/v1/node.go deleted file mode 100644 index 24a01fbdd..000000000 --- a/vendor/k8s.io/client-go/listers/core/v1/node.go +++ /dev/null @@ -1,67 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package v1 - -import ( - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// NodeLister helps list Nodes. -type NodeLister interface { - // List lists all Nodes in the indexer. - List(selector labels.Selector) (ret []*v1.Node, err error) - // Get retrieves the Node from the index for a given name. - Get(name string) (*v1.Node, error) - NodeListerExpansion -} - -// nodeLister implements the NodeLister interface. -type nodeLister struct { - indexer cache.Indexer -} - -// NewNodeLister returns a new NodeLister. -func NewNodeLister(indexer cache.Indexer) NodeLister { - return &nodeLister{indexer: indexer} -} - -// List lists all Nodes in the indexer. -func (s *nodeLister) List(selector labels.Selector) (ret []*v1.Node, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Node)) - }) - return ret, err -} - -// Get retrieves the Node from the index for a given name. -func (s *nodeLister) Get(name string) (*v1.Node, error) { - key := &v1.Node{ObjectMeta: meta_v1.ObjectMeta{Name: name}} - obj, exists, err := s.indexer.Get(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("node"), name) - } - return obj.(*v1.Node), nil -} diff --git a/vendor/k8s.io/client-go/listers/core/v1/node_expansion.go b/vendor/k8s.io/client-go/listers/core/v1/node_expansion.go deleted file mode 100644 index 9e5c55ab3..000000000 --- a/vendor/k8s.io/client-go/listers/core/v1/node_expansion.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1 - -import ( - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/labels" -) - -// NodeConditionPredicate is a function that indicates whether the given node's conditions meet -// some set of criteria defined by the function. -type NodeConditionPredicate func(node *v1.Node) bool - -// NodeListerExpansion allows custom methods to be added to -// NodeLister. -type NodeListerExpansion interface { - ListWithPredicate(predicate NodeConditionPredicate) ([]*v1.Node, error) -} - -func (l *nodeLister) ListWithPredicate(predicate NodeConditionPredicate) ([]*v1.Node, error) { - nodes, err := l.List(labels.Everything()) - if err != nil { - return nil, err - } - - var filtered []*v1.Node - for i := range nodes { - if predicate(nodes[i]) { - filtered = append(filtered, nodes[i]) - } - } - - return filtered, nil -} diff --git a/vendor/k8s.io/client-go/listers/core/v1/persistentvolume.go b/vendor/k8s.io/client-go/listers/core/v1/persistentvolume.go deleted file mode 100644 index ea2f79dd7..000000000 --- a/vendor/k8s.io/client-go/listers/core/v1/persistentvolume.go +++ /dev/null @@ -1,67 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package v1 - -import ( - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// PersistentVolumeLister helps list PersistentVolumes. -type PersistentVolumeLister interface { - // List lists all PersistentVolumes in the indexer. - List(selector labels.Selector) (ret []*v1.PersistentVolume, err error) - // Get retrieves the PersistentVolume from the index for a given name. - Get(name string) (*v1.PersistentVolume, error) - PersistentVolumeListerExpansion -} - -// persistentVolumeLister implements the PersistentVolumeLister interface. -type persistentVolumeLister struct { - indexer cache.Indexer -} - -// NewPersistentVolumeLister returns a new PersistentVolumeLister. -func NewPersistentVolumeLister(indexer cache.Indexer) PersistentVolumeLister { - return &persistentVolumeLister{indexer: indexer} -} - -// List lists all PersistentVolumes in the indexer. -func (s *persistentVolumeLister) List(selector labels.Selector) (ret []*v1.PersistentVolume, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.PersistentVolume)) - }) - return ret, err -} - -// Get retrieves the PersistentVolume from the index for a given name. -func (s *persistentVolumeLister) Get(name string) (*v1.PersistentVolume, error) { - key := &v1.PersistentVolume{ObjectMeta: meta_v1.ObjectMeta{Name: name}} - obj, exists, err := s.indexer.Get(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("persistentvolume"), name) - } - return obj.(*v1.PersistentVolume), nil -} diff --git a/vendor/k8s.io/client-go/listers/core/v1/persistentvolumeclaim.go b/vendor/k8s.io/client-go/listers/core/v1/persistentvolumeclaim.go deleted file mode 100644 index 72ddac93e..000000000 --- a/vendor/k8s.io/client-go/listers/core/v1/persistentvolumeclaim.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package v1 - -import ( - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// PersistentVolumeClaimLister helps list PersistentVolumeClaims. -type PersistentVolumeClaimLister interface { - // List lists all PersistentVolumeClaims in the indexer. - List(selector labels.Selector) (ret []*v1.PersistentVolumeClaim, err error) - // PersistentVolumeClaims returns an object that can list and get PersistentVolumeClaims. - PersistentVolumeClaims(namespace string) PersistentVolumeClaimNamespaceLister - PersistentVolumeClaimListerExpansion -} - -// persistentVolumeClaimLister implements the PersistentVolumeClaimLister interface. -type persistentVolumeClaimLister struct { - indexer cache.Indexer -} - -// NewPersistentVolumeClaimLister returns a new PersistentVolumeClaimLister. -func NewPersistentVolumeClaimLister(indexer cache.Indexer) PersistentVolumeClaimLister { - return &persistentVolumeClaimLister{indexer: indexer} -} - -// List lists all PersistentVolumeClaims in the indexer. -func (s *persistentVolumeClaimLister) List(selector labels.Selector) (ret []*v1.PersistentVolumeClaim, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.PersistentVolumeClaim)) - }) - return ret, err -} - -// PersistentVolumeClaims returns an object that can list and get PersistentVolumeClaims. -func (s *persistentVolumeClaimLister) PersistentVolumeClaims(namespace string) PersistentVolumeClaimNamespaceLister { - return persistentVolumeClaimNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// PersistentVolumeClaimNamespaceLister helps list and get PersistentVolumeClaims. -type PersistentVolumeClaimNamespaceLister interface { - // List lists all PersistentVolumeClaims in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1.PersistentVolumeClaim, err error) - // Get retrieves the PersistentVolumeClaim from the indexer for a given namespace and name. - Get(name string) (*v1.PersistentVolumeClaim, error) - PersistentVolumeClaimNamespaceListerExpansion -} - -// persistentVolumeClaimNamespaceLister implements the PersistentVolumeClaimNamespaceLister -// interface. -type persistentVolumeClaimNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all PersistentVolumeClaims in the indexer for a given namespace. -func (s persistentVolumeClaimNamespaceLister) List(selector labels.Selector) (ret []*v1.PersistentVolumeClaim, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.PersistentVolumeClaim)) - }) - return ret, err -} - -// Get retrieves the PersistentVolumeClaim from the indexer for a given namespace and name. -func (s persistentVolumeClaimNamespaceLister) Get(name string) (*v1.PersistentVolumeClaim, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("persistentvolumeclaim"), name) - } - return obj.(*v1.PersistentVolumeClaim), nil -} diff --git a/vendor/k8s.io/client-go/listers/core/v1/pod.go b/vendor/k8s.io/client-go/listers/core/v1/pod.go deleted file mode 100644 index 6cf4a8424..000000000 --- a/vendor/k8s.io/client-go/listers/core/v1/pod.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package v1 - -import ( - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// PodLister helps list Pods. -type PodLister interface { - // List lists all Pods in the indexer. - List(selector labels.Selector) (ret []*v1.Pod, err error) - // Pods returns an object that can list and get Pods. - Pods(namespace string) PodNamespaceLister - PodListerExpansion -} - -// podLister implements the PodLister interface. -type podLister struct { - indexer cache.Indexer -} - -// NewPodLister returns a new PodLister. -func NewPodLister(indexer cache.Indexer) PodLister { - return &podLister{indexer: indexer} -} - -// List lists all Pods in the indexer. -func (s *podLister) List(selector labels.Selector) (ret []*v1.Pod, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Pod)) - }) - return ret, err -} - -// Pods returns an object that can list and get Pods. -func (s *podLister) Pods(namespace string) PodNamespaceLister { - return podNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// PodNamespaceLister helps list and get Pods. -type PodNamespaceLister interface { - // List lists all Pods in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1.Pod, err error) - // Get retrieves the Pod from the indexer for a given namespace and name. - Get(name string) (*v1.Pod, error) - PodNamespaceListerExpansion -} - -// podNamespaceLister implements the PodNamespaceLister -// interface. -type podNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all Pods in the indexer for a given namespace. -func (s podNamespaceLister) List(selector labels.Selector) (ret []*v1.Pod, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Pod)) - }) - return ret, err -} - -// Get retrieves the Pod from the indexer for a given namespace and name. -func (s podNamespaceLister) Get(name string) (*v1.Pod, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("pod"), name) - } - return obj.(*v1.Pod), nil -} diff --git a/vendor/k8s.io/client-go/listers/core/v1/podtemplate.go b/vendor/k8s.io/client-go/listers/core/v1/podtemplate.go deleted file mode 100644 index d825c7475..000000000 --- a/vendor/k8s.io/client-go/listers/core/v1/podtemplate.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package v1 - -import ( - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// PodTemplateLister helps list PodTemplates. -type PodTemplateLister interface { - // List lists all PodTemplates in the indexer. - List(selector labels.Selector) (ret []*v1.PodTemplate, err error) - // PodTemplates returns an object that can list and get PodTemplates. - PodTemplates(namespace string) PodTemplateNamespaceLister - PodTemplateListerExpansion -} - -// podTemplateLister implements the PodTemplateLister interface. -type podTemplateLister struct { - indexer cache.Indexer -} - -// NewPodTemplateLister returns a new PodTemplateLister. -func NewPodTemplateLister(indexer cache.Indexer) PodTemplateLister { - return &podTemplateLister{indexer: indexer} -} - -// List lists all PodTemplates in the indexer. -func (s *podTemplateLister) List(selector labels.Selector) (ret []*v1.PodTemplate, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.PodTemplate)) - }) - return ret, err -} - -// PodTemplates returns an object that can list and get PodTemplates. -func (s *podTemplateLister) PodTemplates(namespace string) PodTemplateNamespaceLister { - return podTemplateNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// PodTemplateNamespaceLister helps list and get PodTemplates. -type PodTemplateNamespaceLister interface { - // List lists all PodTemplates in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1.PodTemplate, err error) - // Get retrieves the PodTemplate from the indexer for a given namespace and name. - Get(name string) (*v1.PodTemplate, error) - PodTemplateNamespaceListerExpansion -} - -// podTemplateNamespaceLister implements the PodTemplateNamespaceLister -// interface. -type podTemplateNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all PodTemplates in the indexer for a given namespace. -func (s podTemplateNamespaceLister) List(selector labels.Selector) (ret []*v1.PodTemplate, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.PodTemplate)) - }) - return ret, err -} - -// Get retrieves the PodTemplate from the indexer for a given namespace and name. -func (s podTemplateNamespaceLister) Get(name string) (*v1.PodTemplate, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("podtemplate"), name) - } - return obj.(*v1.PodTemplate), nil -} diff --git a/vendor/k8s.io/client-go/listers/core/v1/replicationcontroller.go b/vendor/k8s.io/client-go/listers/core/v1/replicationcontroller.go deleted file mode 100644 index 6670a9d92..000000000 --- a/vendor/k8s.io/client-go/listers/core/v1/replicationcontroller.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package v1 - -import ( - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// ReplicationControllerLister helps list ReplicationControllers. -type ReplicationControllerLister interface { - // List lists all ReplicationControllers in the indexer. - List(selector labels.Selector) (ret []*v1.ReplicationController, err error) - // ReplicationControllers returns an object that can list and get ReplicationControllers. - ReplicationControllers(namespace string) ReplicationControllerNamespaceLister - ReplicationControllerListerExpansion -} - -// replicationControllerLister implements the ReplicationControllerLister interface. -type replicationControllerLister struct { - indexer cache.Indexer -} - -// NewReplicationControllerLister returns a new ReplicationControllerLister. -func NewReplicationControllerLister(indexer cache.Indexer) ReplicationControllerLister { - return &replicationControllerLister{indexer: indexer} -} - -// List lists all ReplicationControllers in the indexer. -func (s *replicationControllerLister) List(selector labels.Selector) (ret []*v1.ReplicationController, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.ReplicationController)) - }) - return ret, err -} - -// ReplicationControllers returns an object that can list and get ReplicationControllers. -func (s *replicationControllerLister) ReplicationControllers(namespace string) ReplicationControllerNamespaceLister { - return replicationControllerNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// ReplicationControllerNamespaceLister helps list and get ReplicationControllers. -type ReplicationControllerNamespaceLister interface { - // List lists all ReplicationControllers in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1.ReplicationController, err error) - // Get retrieves the ReplicationController from the indexer for a given namespace and name. - Get(name string) (*v1.ReplicationController, error) - ReplicationControllerNamespaceListerExpansion -} - -// replicationControllerNamespaceLister implements the ReplicationControllerNamespaceLister -// interface. -type replicationControllerNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all ReplicationControllers in the indexer for a given namespace. -func (s replicationControllerNamespaceLister) List(selector labels.Selector) (ret []*v1.ReplicationController, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.ReplicationController)) - }) - return ret, err -} - -// Get retrieves the ReplicationController from the indexer for a given namespace and name. -func (s replicationControllerNamespaceLister) Get(name string) (*v1.ReplicationController, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("replicationcontroller"), name) - } - return obj.(*v1.ReplicationController), nil -} diff --git a/vendor/k8s.io/client-go/listers/core/v1/replicationcontroller_expansion.go b/vendor/k8s.io/client-go/listers/core/v1/replicationcontroller_expansion.go deleted file mode 100644 index b031d5217..000000000 --- a/vendor/k8s.io/client-go/listers/core/v1/replicationcontroller_expansion.go +++ /dev/null @@ -1,66 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1 - -import ( - "fmt" - - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/labels" -) - -// ReplicationControllerListerExpansion allows custom methods to be added to -// ReplicationControllerLister. -type ReplicationControllerListerExpansion interface { - GetPodControllers(pod *v1.Pod) ([]*v1.ReplicationController, error) -} - -// ReplicationControllerNamespaceListerExpansion allows custom methods to be added to -// ReplicationControllerNamespaceLister. -type ReplicationControllerNamespaceListerExpansion interface{} - -// GetPodControllers returns a list of ReplicationControllers that potentially match a pod. -// Only the one specified in the Pod's ControllerRef will actually manage it. -// Returns an error only if no matching ReplicationControllers are found. -func (s *replicationControllerLister) GetPodControllers(pod *v1.Pod) ([]*v1.ReplicationController, error) { - if len(pod.Labels) == 0 { - return nil, fmt.Errorf("no controllers found for pod %v because it has no labels", pod.Name) - } - - items, err := s.ReplicationControllers(pod.Namespace).List(labels.Everything()) - if err != nil { - return nil, err - } - - var controllers []*v1.ReplicationController - for i := range items { - rc := items[i] - selector := labels.Set(rc.Spec.Selector).AsSelectorPreValidated() - - // If an rc with a nil or empty selector creeps in, it should match nothing, not everything. - if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { - continue - } - controllers = append(controllers, rc) - } - - if len(controllers) == 0 { - return nil, fmt.Errorf("could not find controller for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) - } - - return controllers, nil -} diff --git a/vendor/k8s.io/client-go/listers/core/v1/resourcequota.go b/vendor/k8s.io/client-go/listers/core/v1/resourcequota.go deleted file mode 100644 index 713a41511..000000000 --- a/vendor/k8s.io/client-go/listers/core/v1/resourcequota.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package v1 - -import ( - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// ResourceQuotaLister helps list ResourceQuotas. -type ResourceQuotaLister interface { - // List lists all ResourceQuotas in the indexer. - List(selector labels.Selector) (ret []*v1.ResourceQuota, err error) - // ResourceQuotas returns an object that can list and get ResourceQuotas. - ResourceQuotas(namespace string) ResourceQuotaNamespaceLister - ResourceQuotaListerExpansion -} - -// resourceQuotaLister implements the ResourceQuotaLister interface. -type resourceQuotaLister struct { - indexer cache.Indexer -} - -// NewResourceQuotaLister returns a new ResourceQuotaLister. -func NewResourceQuotaLister(indexer cache.Indexer) ResourceQuotaLister { - return &resourceQuotaLister{indexer: indexer} -} - -// List lists all ResourceQuotas in the indexer. -func (s *resourceQuotaLister) List(selector labels.Selector) (ret []*v1.ResourceQuota, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.ResourceQuota)) - }) - return ret, err -} - -// ResourceQuotas returns an object that can list and get ResourceQuotas. -func (s *resourceQuotaLister) ResourceQuotas(namespace string) ResourceQuotaNamespaceLister { - return resourceQuotaNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// ResourceQuotaNamespaceLister helps list and get ResourceQuotas. -type ResourceQuotaNamespaceLister interface { - // List lists all ResourceQuotas in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1.ResourceQuota, err error) - // Get retrieves the ResourceQuota from the indexer for a given namespace and name. - Get(name string) (*v1.ResourceQuota, error) - ResourceQuotaNamespaceListerExpansion -} - -// resourceQuotaNamespaceLister implements the ResourceQuotaNamespaceLister -// interface. -type resourceQuotaNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all ResourceQuotas in the indexer for a given namespace. -func (s resourceQuotaNamespaceLister) List(selector labels.Selector) (ret []*v1.ResourceQuota, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.ResourceQuota)) - }) - return ret, err -} - -// Get retrieves the ResourceQuota from the indexer for a given namespace and name. -func (s resourceQuotaNamespaceLister) Get(name string) (*v1.ResourceQuota, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("resourcequota"), name) - } - return obj.(*v1.ResourceQuota), nil -} diff --git a/vendor/k8s.io/client-go/listers/core/v1/secret.go b/vendor/k8s.io/client-go/listers/core/v1/secret.go deleted file mode 100644 index 26ef13d9e..000000000 --- a/vendor/k8s.io/client-go/listers/core/v1/secret.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package v1 - -import ( - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// SecretLister helps list Secrets. -type SecretLister interface { - // List lists all Secrets in the indexer. - List(selector labels.Selector) (ret []*v1.Secret, err error) - // Secrets returns an object that can list and get Secrets. - Secrets(namespace string) SecretNamespaceLister - SecretListerExpansion -} - -// secretLister implements the SecretLister interface. -type secretLister struct { - indexer cache.Indexer -} - -// NewSecretLister returns a new SecretLister. -func NewSecretLister(indexer cache.Indexer) SecretLister { - return &secretLister{indexer: indexer} -} - -// List lists all Secrets in the indexer. -func (s *secretLister) List(selector labels.Selector) (ret []*v1.Secret, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Secret)) - }) - return ret, err -} - -// Secrets returns an object that can list and get Secrets. -func (s *secretLister) Secrets(namespace string) SecretNamespaceLister { - return secretNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// SecretNamespaceLister helps list and get Secrets. -type SecretNamespaceLister interface { - // List lists all Secrets in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1.Secret, err error) - // Get retrieves the Secret from the indexer for a given namespace and name. - Get(name string) (*v1.Secret, error) - SecretNamespaceListerExpansion -} - -// secretNamespaceLister implements the SecretNamespaceLister -// interface. -type secretNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all Secrets in the indexer for a given namespace. -func (s secretNamespaceLister) List(selector labels.Selector) (ret []*v1.Secret, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Secret)) - }) - return ret, err -} - -// Get retrieves the Secret from the indexer for a given namespace and name. -func (s secretNamespaceLister) Get(name string) (*v1.Secret, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("secret"), name) - } - return obj.(*v1.Secret), nil -} diff --git a/vendor/k8s.io/client-go/listers/core/v1/service.go b/vendor/k8s.io/client-go/listers/core/v1/service.go deleted file mode 100644 index 895a69223..000000000 --- a/vendor/k8s.io/client-go/listers/core/v1/service.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package v1 - -import ( - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// ServiceLister helps list Services. -type ServiceLister interface { - // List lists all Services in the indexer. - List(selector labels.Selector) (ret []*v1.Service, err error) - // Services returns an object that can list and get Services. - Services(namespace string) ServiceNamespaceLister - ServiceListerExpansion -} - -// serviceLister implements the ServiceLister interface. -type serviceLister struct { - indexer cache.Indexer -} - -// NewServiceLister returns a new ServiceLister. -func NewServiceLister(indexer cache.Indexer) ServiceLister { - return &serviceLister{indexer: indexer} -} - -// List lists all Services in the indexer. -func (s *serviceLister) List(selector labels.Selector) (ret []*v1.Service, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Service)) - }) - return ret, err -} - -// Services returns an object that can list and get Services. -func (s *serviceLister) Services(namespace string) ServiceNamespaceLister { - return serviceNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// ServiceNamespaceLister helps list and get Services. -type ServiceNamespaceLister interface { - // List lists all Services in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1.Service, err error) - // Get retrieves the Service from the indexer for a given namespace and name. - Get(name string) (*v1.Service, error) - ServiceNamespaceListerExpansion -} - -// serviceNamespaceLister implements the ServiceNamespaceLister -// interface. -type serviceNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all Services in the indexer for a given namespace. -func (s serviceNamespaceLister) List(selector labels.Selector) (ret []*v1.Service, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Service)) - }) - return ret, err -} - -// Get retrieves the Service from the indexer for a given namespace and name. -func (s serviceNamespaceLister) Get(name string) (*v1.Service, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("service"), name) - } - return obj.(*v1.Service), nil -} diff --git a/vendor/k8s.io/client-go/listers/core/v1/service_expansion.go b/vendor/k8s.io/client-go/listers/core/v1/service_expansion.go deleted file mode 100644 index e283d2509..000000000 --- a/vendor/k8s.io/client-go/listers/core/v1/service_expansion.go +++ /dev/null @@ -1,56 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1 - -import ( - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/labels" -) - -// ServiceListerExpansion allows custom methods to be added to -// ServiceLister. -type ServiceListerExpansion interface { - GetPodServices(pod *v1.Pod) ([]*v1.Service, error) -} - -// ServiceNamespaceListerExpansion allows custom methods to be added to -// ServiceNamespaceLister. -type ServiceNamespaceListerExpansion interface{} - -// TODO: Move this back to scheduler as a helper function that takes a Store, -// rather than a method of ServiceLister. -func (s *serviceLister) GetPodServices(pod *v1.Pod) ([]*v1.Service, error) { - allServices, err := s.Services(pod.Namespace).List(labels.Everything()) - if err != nil { - return nil, err - } - - var services []*v1.Service - for i := range allServices { - service := allServices[i] - if service.Spec.Selector == nil { - // services with nil selectors match nothing, not everything. - continue - } - selector := labels.Set(service.Spec.Selector).AsSelectorPreValidated() - if selector.Matches(labels.Set(pod.Labels)) { - services = append(services, service) - } - } - - return services, nil -} diff --git a/vendor/k8s.io/client-go/listers/core/v1/serviceaccount.go b/vendor/k8s.io/client-go/listers/core/v1/serviceaccount.go deleted file mode 100644 index 2245d5d43..000000000 --- a/vendor/k8s.io/client-go/listers/core/v1/serviceaccount.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package v1 - -import ( - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// ServiceAccountLister helps list ServiceAccounts. -type ServiceAccountLister interface { - // List lists all ServiceAccounts in the indexer. - List(selector labels.Selector) (ret []*v1.ServiceAccount, err error) - // ServiceAccounts returns an object that can list and get ServiceAccounts. - ServiceAccounts(namespace string) ServiceAccountNamespaceLister - ServiceAccountListerExpansion -} - -// serviceAccountLister implements the ServiceAccountLister interface. -type serviceAccountLister struct { - indexer cache.Indexer -} - -// NewServiceAccountLister returns a new ServiceAccountLister. -func NewServiceAccountLister(indexer cache.Indexer) ServiceAccountLister { - return &serviceAccountLister{indexer: indexer} -} - -// List lists all ServiceAccounts in the indexer. -func (s *serviceAccountLister) List(selector labels.Selector) (ret []*v1.ServiceAccount, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.ServiceAccount)) - }) - return ret, err -} - -// ServiceAccounts returns an object that can list and get ServiceAccounts. -func (s *serviceAccountLister) ServiceAccounts(namespace string) ServiceAccountNamespaceLister { - return serviceAccountNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// ServiceAccountNamespaceLister helps list and get ServiceAccounts. -type ServiceAccountNamespaceLister interface { - // List lists all ServiceAccounts in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1.ServiceAccount, err error) - // Get retrieves the ServiceAccount from the indexer for a given namespace and name. - Get(name string) (*v1.ServiceAccount, error) - ServiceAccountNamespaceListerExpansion -} - -// serviceAccountNamespaceLister implements the ServiceAccountNamespaceLister -// interface. -type serviceAccountNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all ServiceAccounts in the indexer for a given namespace. -func (s serviceAccountNamespaceLister) List(selector labels.Selector) (ret []*v1.ServiceAccount, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.ServiceAccount)) - }) - return ret, err -} - -// Get retrieves the ServiceAccount from the indexer for a given namespace and name. -func (s serviceAccountNamespaceLister) Get(name string) (*v1.ServiceAccount, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("serviceaccount"), name) - } - return obj.(*v1.ServiceAccount), nil -} diff --git a/vendor/k8s.io/client-go/listers/extensions/v1beta1/BUILD b/vendor/k8s.io/client-go/listers/extensions/v1beta1/BUILD deleted file mode 100644 index 9dec1ff07..000000000 --- a/vendor/k8s.io/client-go/listers/extensions/v1beta1/BUILD +++ /dev/null @@ -1,60 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "daemonset.go", - "daemonset_expansion.go", - "deployment.go", - "deployment_expansion.go", - "expansion_generated.go", - "ingress.go", - "podsecuritypolicy.go", - "replicaset.go", - "replicaset_expansion.go", - "scale.go", - "thirdpartyresource.go", - ], - deps = [ - "//vendor/k8s.io/api/apps/v1beta1:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/api/extensions/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["daemonset_expansion_test.go"], - library = ":go_default_library", - deps = [ - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/api/extensions/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/client-go/listers/extensions/v1beta1/daemonset.go b/vendor/k8s.io/client-go/listers/extensions/v1beta1/daemonset.go deleted file mode 100644 index 4672a5cb9..000000000 --- a/vendor/k8s.io/client-go/listers/extensions/v1beta1/daemonset.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package v1beta1 - -import ( - v1beta1 "k8s.io/api/extensions/v1beta1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// DaemonSetLister helps list DaemonSets. -type DaemonSetLister interface { - // List lists all DaemonSets in the indexer. - List(selector labels.Selector) (ret []*v1beta1.DaemonSet, err error) - // DaemonSets returns an object that can list and get DaemonSets. - DaemonSets(namespace string) DaemonSetNamespaceLister - DaemonSetListerExpansion -} - -// daemonSetLister implements the DaemonSetLister interface. -type daemonSetLister struct { - indexer cache.Indexer -} - -// NewDaemonSetLister returns a new DaemonSetLister. -func NewDaemonSetLister(indexer cache.Indexer) DaemonSetLister { - return &daemonSetLister{indexer: indexer} -} - -// List lists all DaemonSets in the indexer. -func (s *daemonSetLister) List(selector labels.Selector) (ret []*v1beta1.DaemonSet, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1beta1.DaemonSet)) - }) - return ret, err -} - -// DaemonSets returns an object that can list and get DaemonSets. -func (s *daemonSetLister) DaemonSets(namespace string) DaemonSetNamespaceLister { - return daemonSetNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// DaemonSetNamespaceLister helps list and get DaemonSets. -type DaemonSetNamespaceLister interface { - // List lists all DaemonSets in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1beta1.DaemonSet, err error) - // Get retrieves the DaemonSet from the indexer for a given namespace and name. - Get(name string) (*v1beta1.DaemonSet, error) - DaemonSetNamespaceListerExpansion -} - -// daemonSetNamespaceLister implements the DaemonSetNamespaceLister -// interface. -type daemonSetNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all DaemonSets in the indexer for a given namespace. -func (s daemonSetNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.DaemonSet, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1beta1.DaemonSet)) - }) - return ret, err -} - -// Get retrieves the DaemonSet from the indexer for a given namespace and name. -func (s daemonSetNamespaceLister) Get(name string) (*v1beta1.DaemonSet, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1beta1.Resource("daemonset"), name) - } - return obj.(*v1beta1.DaemonSet), nil -} diff --git a/vendor/k8s.io/client-go/listers/extensions/v1beta1/daemonset_expansion.go b/vendor/k8s.io/client-go/listers/extensions/v1beta1/daemonset_expansion.go deleted file mode 100644 index 336a4ed83..000000000 --- a/vendor/k8s.io/client-go/listers/extensions/v1beta1/daemonset_expansion.go +++ /dev/null @@ -1,114 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1beta1 - -import ( - "fmt" - - apps "k8s.io/api/apps/v1beta1" - "k8s.io/api/core/v1" - "k8s.io/api/extensions/v1beta1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" -) - -// DaemonSetListerExpansion allows custom methods to be added to -// DaemonSetLister. -type DaemonSetListerExpansion interface { - GetPodDaemonSets(pod *v1.Pod) ([]*v1beta1.DaemonSet, error) - GetHistoryDaemonSets(history *apps.ControllerRevision) ([]*v1beta1.DaemonSet, error) -} - -// DaemonSetNamespaceListerExpansion allows custom methods to be added to -// DaemonSetNamespaceLister. -type DaemonSetNamespaceListerExpansion interface{} - -// GetPodDaemonSets returns a list of DaemonSets that potentially match a pod. -// Only the one specified in the Pod's ControllerRef will actually manage it. -// Returns an error only if no matching DaemonSets are found. -func (s *daemonSetLister) GetPodDaemonSets(pod *v1.Pod) ([]*v1beta1.DaemonSet, error) { - var selector labels.Selector - var daemonSet *v1beta1.DaemonSet - - if len(pod.Labels) == 0 { - return nil, fmt.Errorf("no daemon sets found for pod %v because it has no labels", pod.Name) - } - - list, err := s.DaemonSets(pod.Namespace).List(labels.Everything()) - if err != nil { - return nil, err - } - - var daemonSets []*v1beta1.DaemonSet - for i := range list { - daemonSet = list[i] - if daemonSet.Namespace != pod.Namespace { - continue - } - selector, err = metav1.LabelSelectorAsSelector(daemonSet.Spec.Selector) - if err != nil { - // this should not happen if the DaemonSet passed validation - return nil, err - } - - // If a daemonSet with a nil or empty selector creeps in, it should match nothing, not everything. - if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { - continue - } - daemonSets = append(daemonSets, daemonSet) - } - - if len(daemonSets) == 0 { - return nil, fmt.Errorf("could not find daemon set for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) - } - - return daemonSets, nil -} - -// GetHistoryDaemonSets returns a list of DaemonSets that potentially -// match a ControllerRevision. Only the one specified in the ControllerRevision's ControllerRef -// will actually manage it. -// Returns an error only if no matching DaemonSets are found. -func (s *daemonSetLister) GetHistoryDaemonSets(history *apps.ControllerRevision) ([]*v1beta1.DaemonSet, error) { - if len(history.Labels) == 0 { - return nil, fmt.Errorf("no DaemonSet found for ControllerRevision %s because it has no labels", history.Name) - } - - list, err := s.DaemonSets(history.Namespace).List(labels.Everything()) - if err != nil { - return nil, err - } - - var daemonSets []*v1beta1.DaemonSet - for _, ds := range list { - selector, err := metav1.LabelSelectorAsSelector(ds.Spec.Selector) - if err != nil { - return nil, fmt.Errorf("invalid label selector: %v", err) - } - // If a DaemonSet with a nil or empty selector creeps in, it should match nothing, not everything. - if selector.Empty() || !selector.Matches(labels.Set(history.Labels)) { - continue - } - daemonSets = append(daemonSets, ds) - } - - if len(daemonSets) == 0 { - return nil, fmt.Errorf("could not find DaemonSets for ControllerRevision %s in namespace %s with labels: %v", history.Name, history.Namespace, history.Labels) - } - - return daemonSets, nil -} diff --git a/vendor/k8s.io/client-go/listers/extensions/v1beta1/deployment.go b/vendor/k8s.io/client-go/listers/extensions/v1beta1/deployment.go deleted file mode 100644 index 4c17085dd..000000000 --- a/vendor/k8s.io/client-go/listers/extensions/v1beta1/deployment.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package v1beta1 - -import ( - v1beta1 "k8s.io/api/extensions/v1beta1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// DeploymentLister helps list Deployments. -type DeploymentLister interface { - // List lists all Deployments in the indexer. - List(selector labels.Selector) (ret []*v1beta1.Deployment, err error) - // Deployments returns an object that can list and get Deployments. - Deployments(namespace string) DeploymentNamespaceLister - DeploymentListerExpansion -} - -// deploymentLister implements the DeploymentLister interface. -type deploymentLister struct { - indexer cache.Indexer -} - -// NewDeploymentLister returns a new DeploymentLister. -func NewDeploymentLister(indexer cache.Indexer) DeploymentLister { - return &deploymentLister{indexer: indexer} -} - -// List lists all Deployments in the indexer. -func (s *deploymentLister) List(selector labels.Selector) (ret []*v1beta1.Deployment, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1beta1.Deployment)) - }) - return ret, err -} - -// Deployments returns an object that can list and get Deployments. -func (s *deploymentLister) Deployments(namespace string) DeploymentNamespaceLister { - return deploymentNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// DeploymentNamespaceLister helps list and get Deployments. -type DeploymentNamespaceLister interface { - // List lists all Deployments in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1beta1.Deployment, err error) - // Get retrieves the Deployment from the indexer for a given namespace and name. - Get(name string) (*v1beta1.Deployment, error) - DeploymentNamespaceListerExpansion -} - -// deploymentNamespaceLister implements the DeploymentNamespaceLister -// interface. -type deploymentNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all Deployments in the indexer for a given namespace. -func (s deploymentNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Deployment, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1beta1.Deployment)) - }) - return ret, err -} - -// Get retrieves the Deployment from the indexer for a given namespace and name. -func (s deploymentNamespaceLister) Get(name string) (*v1beta1.Deployment, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1beta1.Resource("deployment"), name) - } - return obj.(*v1beta1.Deployment), nil -} diff --git a/vendor/k8s.io/client-go/listers/extensions/v1beta1/deployment_expansion.go b/vendor/k8s.io/client-go/listers/extensions/v1beta1/deployment_expansion.go deleted file mode 100644 index b9a14167e..000000000 --- a/vendor/k8s.io/client-go/listers/extensions/v1beta1/deployment_expansion.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1beta1 - -import ( - "fmt" - - extensions "k8s.io/api/extensions/v1beta1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" -) - -// DeploymentListerExpansion allows custom methods to be added to -// DeploymentLister. -type DeploymentListerExpansion interface { - GetDeploymentsForReplicaSet(rs *extensions.ReplicaSet) ([]*extensions.Deployment, error) -} - -// DeploymentNamespaceListerExpansion allows custom methods to be added to -// DeploymentNamespaceLister. -type DeploymentNamespaceListerExpansion interface{} - -// GetDeploymentsForReplicaSet returns a list of Deployments that potentially -// match a ReplicaSet. Only the one specified in the ReplicaSet's ControllerRef -// will actually manage it. -// Returns an error only if no matching Deployments are found. -func (s *deploymentLister) GetDeploymentsForReplicaSet(rs *extensions.ReplicaSet) ([]*extensions.Deployment, error) { - if len(rs.Labels) == 0 { - return nil, fmt.Errorf("no deployments found for ReplicaSet %v because it has no labels", rs.Name) - } - - // TODO: MODIFY THIS METHOD so that it checks for the podTemplateSpecHash label - dList, err := s.Deployments(rs.Namespace).List(labels.Everything()) - if err != nil { - return nil, err - } - - var deployments []*extensions.Deployment - for _, d := range dList { - selector, err := metav1.LabelSelectorAsSelector(d.Spec.Selector) - if err != nil { - return nil, fmt.Errorf("invalid label selector: %v", err) - } - // If a deployment with a nil or empty selector creeps in, it should match nothing, not everything. - if selector.Empty() || !selector.Matches(labels.Set(rs.Labels)) { - continue - } - deployments = append(deployments, d) - } - - if len(deployments) == 0 { - return nil, fmt.Errorf("could not find deployments set for ReplicaSet %s in namespace %s with labels: %v", rs.Name, rs.Namespace, rs.Labels) - } - - return deployments, nil -} diff --git a/vendor/k8s.io/client-go/listers/extensions/v1beta1/expansion_generated.go b/vendor/k8s.io/client-go/listers/extensions/v1beta1/expansion_generated.go deleted file mode 100644 index b3c29269b..000000000 --- a/vendor/k8s.io/client-go/listers/extensions/v1beta1/expansion_generated.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package v1beta1 - -// IngressListerExpansion allows custom methods to be added to -// IngressLister. -type IngressListerExpansion interface{} - -// IngressNamespaceListerExpansion allows custom methods to be added to -// IngressNamespaceLister. -type IngressNamespaceListerExpansion interface{} - -// PodSecurityPolicyListerExpansion allows custom methods to be added to -// PodSecurityPolicyLister. -type PodSecurityPolicyListerExpansion interface{} - -// ScaleListerExpansion allows custom methods to be added to -// ScaleLister. -type ScaleListerExpansion interface{} - -// ScaleNamespaceListerExpansion allows custom methods to be added to -// ScaleNamespaceLister. -type ScaleNamespaceListerExpansion interface{} - -// ThirdPartyResourceListerExpansion allows custom methods to be added to -// ThirdPartyResourceLister. -type ThirdPartyResourceListerExpansion interface{} diff --git a/vendor/k8s.io/client-go/listers/extensions/v1beta1/ingress.go b/vendor/k8s.io/client-go/listers/extensions/v1beta1/ingress.go deleted file mode 100644 index 5615dfccc..000000000 --- a/vendor/k8s.io/client-go/listers/extensions/v1beta1/ingress.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package v1beta1 - -import ( - v1beta1 "k8s.io/api/extensions/v1beta1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// IngressLister helps list Ingresses. -type IngressLister interface { - // List lists all Ingresses in the indexer. - List(selector labels.Selector) (ret []*v1beta1.Ingress, err error) - // Ingresses returns an object that can list and get Ingresses. - Ingresses(namespace string) IngressNamespaceLister - IngressListerExpansion -} - -// ingressLister implements the IngressLister interface. -type ingressLister struct { - indexer cache.Indexer -} - -// NewIngressLister returns a new IngressLister. -func NewIngressLister(indexer cache.Indexer) IngressLister { - return &ingressLister{indexer: indexer} -} - -// List lists all Ingresses in the indexer. -func (s *ingressLister) List(selector labels.Selector) (ret []*v1beta1.Ingress, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1beta1.Ingress)) - }) - return ret, err -} - -// Ingresses returns an object that can list and get Ingresses. -func (s *ingressLister) Ingresses(namespace string) IngressNamespaceLister { - return ingressNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// IngressNamespaceLister helps list and get Ingresses. -type IngressNamespaceLister interface { - // List lists all Ingresses in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1beta1.Ingress, err error) - // Get retrieves the Ingress from the indexer for a given namespace and name. - Get(name string) (*v1beta1.Ingress, error) - IngressNamespaceListerExpansion -} - -// ingressNamespaceLister implements the IngressNamespaceLister -// interface. -type ingressNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all Ingresses in the indexer for a given namespace. -func (s ingressNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Ingress, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1beta1.Ingress)) - }) - return ret, err -} - -// Get retrieves the Ingress from the indexer for a given namespace and name. -func (s ingressNamespaceLister) Get(name string) (*v1beta1.Ingress, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1beta1.Resource("ingress"), name) - } - return obj.(*v1beta1.Ingress), nil -} diff --git a/vendor/k8s.io/client-go/listers/extensions/v1beta1/podsecuritypolicy.go b/vendor/k8s.io/client-go/listers/extensions/v1beta1/podsecuritypolicy.go deleted file mode 100644 index da47dbb52..000000000 --- a/vendor/k8s.io/client-go/listers/extensions/v1beta1/podsecuritypolicy.go +++ /dev/null @@ -1,67 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package v1beta1 - -import ( - v1beta1 "k8s.io/api/extensions/v1beta1" - "k8s.io/apimachinery/pkg/api/errors" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// PodSecurityPolicyLister helps list PodSecurityPolicies. -type PodSecurityPolicyLister interface { - // List lists all PodSecurityPolicies in the indexer. - List(selector labels.Selector) (ret []*v1beta1.PodSecurityPolicy, err error) - // Get retrieves the PodSecurityPolicy from the index for a given name. - Get(name string) (*v1beta1.PodSecurityPolicy, error) - PodSecurityPolicyListerExpansion -} - -// podSecurityPolicyLister implements the PodSecurityPolicyLister interface. -type podSecurityPolicyLister struct { - indexer cache.Indexer -} - -// NewPodSecurityPolicyLister returns a new PodSecurityPolicyLister. -func NewPodSecurityPolicyLister(indexer cache.Indexer) PodSecurityPolicyLister { - return &podSecurityPolicyLister{indexer: indexer} -} - -// List lists all PodSecurityPolicies in the indexer. -func (s *podSecurityPolicyLister) List(selector labels.Selector) (ret []*v1beta1.PodSecurityPolicy, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1beta1.PodSecurityPolicy)) - }) - return ret, err -} - -// Get retrieves the PodSecurityPolicy from the index for a given name. -func (s *podSecurityPolicyLister) Get(name string) (*v1beta1.PodSecurityPolicy, error) { - key := &v1beta1.PodSecurityPolicy{ObjectMeta: v1.ObjectMeta{Name: name}} - obj, exists, err := s.indexer.Get(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1beta1.Resource("podsecuritypolicy"), name) - } - return obj.(*v1beta1.PodSecurityPolicy), nil -} diff --git a/vendor/k8s.io/client-go/listers/extensions/v1beta1/replicaset.go b/vendor/k8s.io/client-go/listers/extensions/v1beta1/replicaset.go deleted file mode 100644 index 44de996e4..000000000 --- a/vendor/k8s.io/client-go/listers/extensions/v1beta1/replicaset.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package v1beta1 - -import ( - v1beta1 "k8s.io/api/extensions/v1beta1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// ReplicaSetLister helps list ReplicaSets. -type ReplicaSetLister interface { - // List lists all ReplicaSets in the indexer. - List(selector labels.Selector) (ret []*v1beta1.ReplicaSet, err error) - // ReplicaSets returns an object that can list and get ReplicaSets. - ReplicaSets(namespace string) ReplicaSetNamespaceLister - ReplicaSetListerExpansion -} - -// replicaSetLister implements the ReplicaSetLister interface. -type replicaSetLister struct { - indexer cache.Indexer -} - -// NewReplicaSetLister returns a new ReplicaSetLister. -func NewReplicaSetLister(indexer cache.Indexer) ReplicaSetLister { - return &replicaSetLister{indexer: indexer} -} - -// List lists all ReplicaSets in the indexer. -func (s *replicaSetLister) List(selector labels.Selector) (ret []*v1beta1.ReplicaSet, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1beta1.ReplicaSet)) - }) - return ret, err -} - -// ReplicaSets returns an object that can list and get ReplicaSets. -func (s *replicaSetLister) ReplicaSets(namespace string) ReplicaSetNamespaceLister { - return replicaSetNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// ReplicaSetNamespaceLister helps list and get ReplicaSets. -type ReplicaSetNamespaceLister interface { - // List lists all ReplicaSets in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1beta1.ReplicaSet, err error) - // Get retrieves the ReplicaSet from the indexer for a given namespace and name. - Get(name string) (*v1beta1.ReplicaSet, error) - ReplicaSetNamespaceListerExpansion -} - -// replicaSetNamespaceLister implements the ReplicaSetNamespaceLister -// interface. -type replicaSetNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all ReplicaSets in the indexer for a given namespace. -func (s replicaSetNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.ReplicaSet, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1beta1.ReplicaSet)) - }) - return ret, err -} - -// Get retrieves the ReplicaSet from the indexer for a given namespace and name. -func (s replicaSetNamespaceLister) Get(name string) (*v1beta1.ReplicaSet, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1beta1.Resource("replicaset"), name) - } - return obj.(*v1beta1.ReplicaSet), nil -} diff --git a/vendor/k8s.io/client-go/listers/extensions/v1beta1/replicaset_expansion.go b/vendor/k8s.io/client-go/listers/extensions/v1beta1/replicaset_expansion.go deleted file mode 100644 index 1f72644cc..000000000 --- a/vendor/k8s.io/client-go/listers/extensions/v1beta1/replicaset_expansion.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1beta1 - -import ( - "fmt" - - "k8s.io/api/core/v1" - extensions "k8s.io/api/extensions/v1beta1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" -) - -// ReplicaSetListerExpansion allows custom methods to be added to -// ReplicaSetLister. -type ReplicaSetListerExpansion interface { - GetPodReplicaSets(pod *v1.Pod) ([]*extensions.ReplicaSet, error) -} - -// ReplicaSetNamespaceListerExpansion allows custom methods to be added to -// ReplicaSetNamespaceLister. -type ReplicaSetNamespaceListerExpansion interface{} - -// GetPodReplicaSets returns a list of ReplicaSets that potentially match a pod. -// Only the one specified in the Pod's ControllerRef will actually manage it. -// Returns an error only if no matching ReplicaSets are found. -func (s *replicaSetLister) GetPodReplicaSets(pod *v1.Pod) ([]*extensions.ReplicaSet, error) { - if len(pod.Labels) == 0 { - return nil, fmt.Errorf("no ReplicaSets found for pod %v because it has no labels", pod.Name) - } - - list, err := s.ReplicaSets(pod.Namespace).List(labels.Everything()) - if err != nil { - return nil, err - } - - var rss []*extensions.ReplicaSet - for _, rs := range list { - if rs.Namespace != pod.Namespace { - continue - } - selector, err := metav1.LabelSelectorAsSelector(rs.Spec.Selector) - if err != nil { - return nil, fmt.Errorf("invalid selector: %v", err) - } - - // If a ReplicaSet with a nil or empty selector creeps in, it should match nothing, not everything. - if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { - continue - } - rss = append(rss, rs) - } - - if len(rss) == 0 { - return nil, fmt.Errorf("could not find ReplicaSet for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) - } - - return rss, nil -} diff --git a/vendor/k8s.io/client-go/listers/extensions/v1beta1/scale.go b/vendor/k8s.io/client-go/listers/extensions/v1beta1/scale.go deleted file mode 100644 index a027af828..000000000 --- a/vendor/k8s.io/client-go/listers/extensions/v1beta1/scale.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package v1beta1 - -import ( - v1beta1 "k8s.io/api/extensions/v1beta1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// ScaleLister helps list Scales. -type ScaleLister interface { - // List lists all Scales in the indexer. - List(selector labels.Selector) (ret []*v1beta1.Scale, err error) - // Scales returns an object that can list and get Scales. - Scales(namespace string) ScaleNamespaceLister - ScaleListerExpansion -} - -// scaleLister implements the ScaleLister interface. -type scaleLister struct { - indexer cache.Indexer -} - -// NewScaleLister returns a new ScaleLister. -func NewScaleLister(indexer cache.Indexer) ScaleLister { - return &scaleLister{indexer: indexer} -} - -// List lists all Scales in the indexer. -func (s *scaleLister) List(selector labels.Selector) (ret []*v1beta1.Scale, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1beta1.Scale)) - }) - return ret, err -} - -// Scales returns an object that can list and get Scales. -func (s *scaleLister) Scales(namespace string) ScaleNamespaceLister { - return scaleNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// ScaleNamespaceLister helps list and get Scales. -type ScaleNamespaceLister interface { - // List lists all Scales in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1beta1.Scale, err error) - // Get retrieves the Scale from the indexer for a given namespace and name. - Get(name string) (*v1beta1.Scale, error) - ScaleNamespaceListerExpansion -} - -// scaleNamespaceLister implements the ScaleNamespaceLister -// interface. -type scaleNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all Scales in the indexer for a given namespace. -func (s scaleNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Scale, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1beta1.Scale)) - }) - return ret, err -} - -// Get retrieves the Scale from the indexer for a given namespace and name. -func (s scaleNamespaceLister) Get(name string) (*v1beta1.Scale, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1beta1.Resource("scale"), name) - } - return obj.(*v1beta1.Scale), nil -} diff --git a/vendor/k8s.io/client-go/listers/extensions/v1beta1/thirdpartyresource.go b/vendor/k8s.io/client-go/listers/extensions/v1beta1/thirdpartyresource.go deleted file mode 100644 index 3cd699a86..000000000 --- a/vendor/k8s.io/client-go/listers/extensions/v1beta1/thirdpartyresource.go +++ /dev/null @@ -1,67 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was automatically generated by lister-gen - -package v1beta1 - -import ( - v1beta1 "k8s.io/api/extensions/v1beta1" - "k8s.io/apimachinery/pkg/api/errors" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// ThirdPartyResourceLister helps list ThirdPartyResources. -type ThirdPartyResourceLister interface { - // List lists all ThirdPartyResources in the indexer. - List(selector labels.Selector) (ret []*v1beta1.ThirdPartyResource, err error) - // Get retrieves the ThirdPartyResource from the index for a given name. - Get(name string) (*v1beta1.ThirdPartyResource, error) - ThirdPartyResourceListerExpansion -} - -// thirdPartyResourceLister implements the ThirdPartyResourceLister interface. -type thirdPartyResourceLister struct { - indexer cache.Indexer -} - -// NewThirdPartyResourceLister returns a new ThirdPartyResourceLister. -func NewThirdPartyResourceLister(indexer cache.Indexer) ThirdPartyResourceLister { - return &thirdPartyResourceLister{indexer: indexer} -} - -// List lists all ThirdPartyResources in the indexer. -func (s *thirdPartyResourceLister) List(selector labels.Selector) (ret []*v1beta1.ThirdPartyResource, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1beta1.ThirdPartyResource)) - }) - return ret, err -} - -// Get retrieves the ThirdPartyResource from the index for a given name. -func (s *thirdPartyResourceLister) Get(name string) (*v1beta1.ThirdPartyResource, error) { - key := &v1beta1.ThirdPartyResource{ObjectMeta: v1.ObjectMeta{Name: name}} - obj, exists, err := s.indexer.Get(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1beta1.Resource("thirdpartyresource"), name) - } - return obj.(*v1beta1.ThirdPartyResource), nil -} diff --git a/vendor/k8s.io/client-go/pkg/version/doc.go b/vendor/k8s.io/client-go/pkg/version/doc.go index 380395784..30399fb02 100644 --- a/vendor/k8s.io/client-go/pkg/version/doc.go +++ b/vendor/k8s.io/client-go/pkg/version/doc.go @@ -17,4 +17,4 @@ limitations under the License. // Package version supplies version information collected at build time to // kubernetes components. // +k8s:openapi-gen=true -package version +package version // import "k8s.io/client-go/pkg/version" diff --git a/vendor/k8s.io/client-go/rest/client_test.go b/vendor/k8s.io/client-go/rest/client_test.go new file mode 100644 index 000000000..3096cc13a --- /dev/null +++ b/vendor/k8s.io/client-go/rest/client_test.go @@ -0,0 +1,343 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package rest + +import ( + "net/http" + "net/http/httptest" + "net/url" + "os" + "reflect" + "testing" + "time" + + "fmt" + + "k8s.io/api/core/v1" + v1beta1 "k8s.io/api/extensions/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/diff" + "k8s.io/client-go/kubernetes/scheme" + utiltesting "k8s.io/client-go/util/testing" +) + +type TestParam struct { + actualError error + expectingError bool + actualCreated bool + expCreated bool + expStatus *metav1.Status + testBody bool + testBodyErrorIsNotNil bool +} + +// TestSerializer makes sure that you're always able to decode metav1.Status +func TestSerializer(t *testing.T) { + gv := v1beta1.SchemeGroupVersion + contentConfig := ContentConfig{ + ContentType: "application/json", + GroupVersion: &gv, + NegotiatedSerializer: serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}, + } + + serializer, err := createSerializers(contentConfig) + if err != nil { + t.Fatal(err) + } + // bytes based on actual return from API server when encoding an "unversioned" object + obj, err := runtime.Decode(serializer.Decoder, []byte(`{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Success"}`)) + t.Log(obj) + if err != nil { + t.Fatal(err) + } +} + +func TestDoRequestSuccess(t *testing.T) { + testServer, fakeHandler, status := testServerEnv(t, 200) + defer testServer.Close() + + c, err := restClient(testServer) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + body, err := c.Get().Prefix("test").Do().Raw() + + testParam := TestParam{actualError: err, expectingError: false, expCreated: true, + expStatus: status, testBody: true, testBodyErrorIsNotNil: false} + validate(testParam, t, body, fakeHandler) +} + +func TestDoRequestFailed(t *testing.T) { + status := &metav1.Status{ + Code: http.StatusNotFound, + Status: metav1.StatusFailure, + Reason: metav1.StatusReasonNotFound, + Message: " \"\" not found", + Details: &metav1.StatusDetails{}, + } + expectedBody, _ := runtime.Encode(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), status) + fakeHandler := utiltesting.FakeHandler{ + StatusCode: 404, + ResponseBody: string(expectedBody), + T: t, + } + testServer := httptest.NewServer(&fakeHandler) + defer testServer.Close() + + c, err := restClient(testServer) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + err = c.Get().Do().Error() + if err == nil { + t.Errorf("unexpected non-error") + } + ss, ok := err.(errors.APIStatus) + if !ok { + t.Errorf("unexpected error type %v", err) + } + actual := ss.Status() + if !reflect.DeepEqual(status, &actual) { + t.Errorf("Unexpected mis-match: %s", diff.ObjectReflectDiff(status, &actual)) + } +} + +func TestDoRawRequestFailed(t *testing.T) { + status := &metav1.Status{ + Code: http.StatusNotFound, + Status: metav1.StatusFailure, + Reason: metav1.StatusReasonNotFound, + Message: "the server could not find the requested resource", + Details: &metav1.StatusDetails{ + Causes: []metav1.StatusCause{ + {Type: metav1.CauseTypeUnexpectedServerResponse, Message: "unknown"}, + }, + }, + } + expectedBody, _ := runtime.Encode(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), status) + fakeHandler := utiltesting.FakeHandler{ + StatusCode: 404, + ResponseBody: string(expectedBody), + T: t, + } + testServer := httptest.NewServer(&fakeHandler) + defer testServer.Close() + + c, err := restClient(testServer) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + body, err := c.Get().Do().Raw() + + if err == nil || body == nil { + t.Errorf("unexpected non-error: %#v", body) + } + ss, ok := err.(errors.APIStatus) + if !ok { + t.Errorf("unexpected error type %v", err) + } + actual := ss.Status() + if !reflect.DeepEqual(status, &actual) { + t.Errorf("Unexpected mis-match: %s", diff.ObjectReflectDiff(status, &actual)) + } +} + +func TestDoRequestCreated(t *testing.T) { + testServer, fakeHandler, status := testServerEnv(t, 201) + defer testServer.Close() + + c, err := restClient(testServer) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + created := false + body, err := c.Get().Prefix("test").Do().WasCreated(&created).Raw() + + testParam := TestParam{actualError: err, expectingError: false, expCreated: true, + expStatus: status, testBody: false} + validate(testParam, t, body, fakeHandler) +} + +func TestDoRequestNotCreated(t *testing.T) { + testServer, fakeHandler, expectedStatus := testServerEnv(t, 202) + defer testServer.Close() + c, err := restClient(testServer) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + created := false + body, err := c.Get().Prefix("test").Do().WasCreated(&created).Raw() + testParam := TestParam{actualError: err, expectingError: false, expCreated: false, + expStatus: expectedStatus, testBody: false} + validate(testParam, t, body, fakeHandler) +} + +func TestDoRequestAcceptedNoContentReturned(t *testing.T) { + testServer, fakeHandler, _ := testServerEnv(t, 204) + defer testServer.Close() + + c, err := restClient(testServer) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + created := false + body, err := c.Get().Prefix("test").Do().WasCreated(&created).Raw() + testParam := TestParam{actualError: err, expectingError: false, expCreated: false, + testBody: false} + validate(testParam, t, body, fakeHandler) +} + +func TestBadRequest(t *testing.T) { + testServer, fakeHandler, _ := testServerEnv(t, 400) + defer testServer.Close() + c, err := restClient(testServer) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + created := false + body, err := c.Get().Prefix("test").Do().WasCreated(&created).Raw() + testParam := TestParam{actualError: err, expectingError: true, expCreated: false, + testBody: true} + validate(testParam, t, body, fakeHandler) +} + +func validate(testParam TestParam, t *testing.T, body []byte, fakeHandler *utiltesting.FakeHandler) { + switch { + case testParam.expectingError && testParam.actualError == nil: + t.Errorf("Expected error") + case !testParam.expectingError && testParam.actualError != nil: + t.Error(testParam.actualError) + } + if !testParam.expCreated { + if testParam.actualCreated { + t.Errorf("Expected object not to be created") + } + } + statusOut, err := runtime.Decode(scheme.Codecs.UniversalDeserializer(), body) + if testParam.testBody { + if testParam.testBodyErrorIsNotNil && err == nil { + t.Errorf("Expected Error") + } + if !testParam.testBodyErrorIsNotNil && err != nil { + t.Errorf("Unexpected Error: %v", err) + } + } + + if testParam.expStatus != nil { + if !reflect.DeepEqual(testParam.expStatus, statusOut) { + t.Errorf("Unexpected mis-match. Expected %#v. Saw %#v", testParam.expStatus, statusOut) + } + } + fakeHandler.ValidateRequest(t, "/"+v1.SchemeGroupVersion.String()+"/test", "GET", nil) + +} + +func TestHttpMethods(t *testing.T) { + testServer, _, _ := testServerEnv(t, 200) + defer testServer.Close() + c, _ := restClient(testServer) + + request := c.Post() + if request == nil { + t.Errorf("Post : Object returned should not be nil") + } + + request = c.Get() + if request == nil { + t.Errorf("Get: Object returned should not be nil") + } + + request = c.Put() + if request == nil { + t.Errorf("Put : Object returned should not be nil") + } + + request = c.Delete() + if request == nil { + t.Errorf("Delete : Object returned should not be nil") + } + + request = c.Patch(types.JSONPatchType) + if request == nil { + t.Errorf("Patch : Object returned should not be nil") + } +} + +func TestCreateBackoffManager(t *testing.T) { + + theUrl, _ := url.Parse("http://localhost") + + // 1 second base backoff + duration of 2 seconds -> exponential backoff for requests. + os.Setenv(envBackoffBase, "1") + os.Setenv(envBackoffDuration, "2") + backoff := readExpBackoffConfig() + backoff.UpdateBackoff(theUrl, nil, 500) + backoff.UpdateBackoff(theUrl, nil, 500) + if backoff.CalculateBackoff(theUrl)/time.Second != 2 { + t.Errorf("Backoff env not working.") + } + + // 0 duration -> no backoff. + os.Setenv(envBackoffBase, "1") + os.Setenv(envBackoffDuration, "0") + backoff.UpdateBackoff(theUrl, nil, 500) + backoff.UpdateBackoff(theUrl, nil, 500) + backoff = readExpBackoffConfig() + if backoff.CalculateBackoff(theUrl)/time.Second != 0 { + t.Errorf("Zero backoff duration, but backoff still occuring.") + } + + // No env -> No backoff. + os.Setenv(envBackoffBase, "") + os.Setenv(envBackoffDuration, "") + backoff = readExpBackoffConfig() + backoff.UpdateBackoff(theUrl, nil, 500) + backoff.UpdateBackoff(theUrl, nil, 500) + if backoff.CalculateBackoff(theUrl)/time.Second != 0 { + t.Errorf("Backoff should have been 0.") + } + +} + +func testServerEnv(t *testing.T, statusCode int) (*httptest.Server, *utiltesting.FakeHandler, *metav1.Status) { + status := &metav1.Status{TypeMeta: metav1.TypeMeta{APIVersion: "v1", Kind: "Status"}, Status: fmt.Sprintf("%s", metav1.StatusSuccess)} + expectedBody, _ := runtime.Encode(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), status) + fakeHandler := utiltesting.FakeHandler{ + StatusCode: statusCode, + ResponseBody: string(expectedBody), + T: t, + } + testServer := httptest.NewServer(&fakeHandler) + return testServer, &fakeHandler, status +} + +func restClient(testServer *httptest.Server) (*RESTClient, error) { + c, err := RESTClientFor(&Config{ + Host: testServer.URL, + ContentConfig: ContentConfig{ + GroupVersion: &v1.SchemeGroupVersion, + NegotiatedSerializer: serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}, + }, + Username: "user", + Password: "pass", + }) + return c, err +} diff --git a/vendor/k8s.io/client-go/rest/config_test.go b/vendor/k8s.io/client-go/rest/config_test.go new file mode 100644 index 000000000..ff851e6ad --- /dev/null +++ b/vendor/k8s.io/client-go/rest/config_test.go @@ -0,0 +1,276 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package rest + +import ( + "io" + "net" + "net/http" + "path/filepath" + "reflect" + "strings" + "testing" + + fuzz "github.com/google/gofuzz" + + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/diff" + "k8s.io/client-go/kubernetes/scheme" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" + "k8s.io/client-go/util/flowcontrol" + + "github.com/stretchr/testify/assert" +) + +func TestIsConfigTransportTLS(t *testing.T) { + testCases := []struct { + Config *Config + TransportTLS bool + }{ + { + Config: &Config{}, + TransportTLS: false, + }, + { + Config: &Config{ + Host: "https://localhost", + }, + TransportTLS: true, + }, + { + Config: &Config{ + Host: "localhost", + TLSClientConfig: TLSClientConfig{ + CertFile: "foo", + }, + }, + TransportTLS: true, + }, + { + Config: &Config{ + Host: "///:://localhost", + TLSClientConfig: TLSClientConfig{ + CertFile: "foo", + }, + }, + TransportTLS: false, + }, + { + Config: &Config{ + Host: "1.2.3.4:567", + TLSClientConfig: TLSClientConfig{ + Insecure: true, + }, + }, + TransportTLS: true, + }, + } + for _, testCase := range testCases { + if err := SetKubernetesDefaults(testCase.Config); err != nil { + t.Errorf("setting defaults failed for %#v: %v", testCase.Config, err) + continue + } + useTLS := IsConfigTransportTLS(*testCase.Config) + if testCase.TransportTLS != useTLS { + t.Errorf("expected %v for %#v", testCase.TransportTLS, testCase.Config) + } + } +} + +func TestSetKubernetesDefaultsUserAgent(t *testing.T) { + config := &Config{} + if err := SetKubernetesDefaults(config); err != nil { + t.Errorf("unexpected error: %v", err) + } + if !strings.Contains(config.UserAgent, "kubernetes/") { + t.Errorf("no user agent set: %#v", config) + } +} + +func TestAdjustVersion(t *testing.T) { + assert := assert.New(t) + assert.Equal("1.2.3", adjustVersion("1.2.3-alpha4")) + assert.Equal("1.2.3", adjustVersion("1.2.3-alpha")) + assert.Equal("1.2.3", adjustVersion("1.2.3")) + assert.Equal("unknown", adjustVersion("")) +} + +func TestAdjustCommit(t *testing.T) { + assert := assert.New(t) + assert.Equal("1234567", adjustCommit("1234567890")) + assert.Equal("123456", adjustCommit("123456")) + assert.Equal("unknown", adjustCommit("")) +} + +func TestAdjustCommand(t *testing.T) { + assert := assert.New(t) + assert.Equal("beans", adjustCommand(filepath.Join("home", "bob", "Downloads", "beans"))) + assert.Equal("beans", adjustCommand(filepath.Join(".", "beans"))) + assert.Equal("beans", adjustCommand("beans")) + assert.Equal("unknown", adjustCommand("")) +} + +func TestBuildUserAgent(t *testing.T) { + assert.New(t).Equal( + "lynx/nicest (beos/itanium) kubernetes/baaaaaaaaad", + buildUserAgent( + "lynx", "nicest", + "beos", "itanium", "baaaaaaaaad")) +} + +// This function untestable since it doesn't accept arguments. +func TestDefaultKubernetesUserAgent(t *testing.T) { + assert.New(t).Contains(DefaultKubernetesUserAgent(), "kubernetes") +} + +func TestRESTClientRequires(t *testing.T) { + if _, err := RESTClientFor(&Config{Host: "127.0.0.1", ContentConfig: ContentConfig{NegotiatedSerializer: scheme.Codecs}}); err == nil { + t.Errorf("unexpected non-error") + } + if _, err := RESTClientFor(&Config{Host: "127.0.0.1", ContentConfig: ContentConfig{GroupVersion: &v1.SchemeGroupVersion}}); err == nil { + t.Errorf("unexpected non-error") + } + if _, err := RESTClientFor(&Config{Host: "127.0.0.1", ContentConfig: ContentConfig{GroupVersion: &v1.SchemeGroupVersion, NegotiatedSerializer: scheme.Codecs}}); err != nil { + t.Errorf("unexpected error: %v", err) + } +} + +type fakeLimiter struct { + FakeSaturation float64 + FakeQPS float32 +} + +func (t *fakeLimiter) TryAccept() bool { + return true +} + +func (t *fakeLimiter) Saturation() float64 { + return t.FakeSaturation +} + +func (t *fakeLimiter) QPS() float32 { + return t.FakeQPS +} + +func (t *fakeLimiter) Stop() {} + +func (t *fakeLimiter) Accept() {} + +type fakeCodec struct{} + +func (c *fakeCodec) Decode([]byte, *schema.GroupVersionKind, runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { + return nil, nil, nil +} + +func (c *fakeCodec) Encode(obj runtime.Object, stream io.Writer) error { + return nil +} + +type fakeRoundTripper struct{} + +func (r *fakeRoundTripper) RoundTrip(*http.Request) (*http.Response, error) { + return nil, nil +} + +var fakeWrapperFunc = func(http.RoundTripper) http.RoundTripper { + return &fakeRoundTripper{} +} + +type fakeNegotiatedSerializer struct{} + +func (n *fakeNegotiatedSerializer) SupportedMediaTypes() []runtime.SerializerInfo { + return nil +} + +func (n *fakeNegotiatedSerializer) EncoderForVersion(serializer runtime.Encoder, gv runtime.GroupVersioner) runtime.Encoder { + return &fakeCodec{} +} + +func (n *fakeNegotiatedSerializer) DecoderToVersion(serializer runtime.Decoder, gv runtime.GroupVersioner) runtime.Decoder { + return &fakeCodec{} +} + +func TestAnonymousConfig(t *testing.T) { + f := fuzz.New().NilChance(0.0).NumElements(1, 1) + f.Funcs( + func(r *runtime.Codec, f fuzz.Continue) { + codec := &fakeCodec{} + f.Fuzz(codec) + *r = codec + }, + func(r *http.RoundTripper, f fuzz.Continue) { + roundTripper := &fakeRoundTripper{} + f.Fuzz(roundTripper) + *r = roundTripper + }, + func(fn *func(http.RoundTripper) http.RoundTripper, f fuzz.Continue) { + *fn = fakeWrapperFunc + }, + func(r *runtime.NegotiatedSerializer, f fuzz.Continue) { + serializer := &fakeNegotiatedSerializer{} + f.Fuzz(serializer) + *r = serializer + }, + func(r *flowcontrol.RateLimiter, f fuzz.Continue) { + limiter := &fakeLimiter{} + f.Fuzz(limiter) + *r = limiter + }, + // Authentication does not require fuzzer + func(r *AuthProviderConfigPersister, f fuzz.Continue) {}, + func(r *clientcmdapi.AuthProviderConfig, f fuzz.Continue) { + r.Config = map[string]string{} + }, + // Dial does not require fuzzer + func(r *func(network, addr string) (net.Conn, error), f fuzz.Continue) {}, + ) + for i := 0; i < 20; i++ { + original := &Config{} + f.Fuzz(original) + actual := AnonymousClientConfig(original) + expected := *original + + // this is the list of known security related fields, add to this list if a new field + // is added to Config, update AnonymousClientConfig to preserve the field otherwise. + expected.Impersonate = ImpersonationConfig{} + expected.BearerToken = "" + expected.Username = "" + expected.Password = "" + expected.CacheDir = "" + expected.AuthProvider = nil + expected.AuthConfigPersister = nil + expected.TLSClientConfig.CertData = nil + expected.TLSClientConfig.CertFile = "" + expected.TLSClientConfig.KeyData = nil + expected.TLSClientConfig.KeyFile = "" + + // The DeepEqual cannot handle the func comparison, so we just verify if the + // function return the expected object. + if actual.WrapTransport == nil || !reflect.DeepEqual(expected.WrapTransport(nil), &fakeRoundTripper{}) { + t.Fatalf("AnonymousClientConfig dropped the WrapTransport field") + } else { + actual.WrapTransport = nil + expected.WrapTransport = nil + } + + if !reflect.DeepEqual(*actual, expected) { + t.Fatalf("AnonymousClientConfig dropped unexpected fields, identify whether they are security related or not: %s", diff.ObjectGoPrintDiff(expected, actual)) + } + } +} diff --git a/vendor/k8s.io/client-go/rest/plugin_test.go b/vendor/k8s.io/client-go/rest/plugin_test.go new file mode 100644 index 000000000..070e53790 --- /dev/null +++ b/vendor/k8s.io/client-go/rest/plugin_test.go @@ -0,0 +1,311 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package rest + +import ( + "fmt" + "net/http" + "reflect" + "strconv" + "testing" + + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" +) + +func TestAuthPluginWrapTransport(t *testing.T) { + if err := RegisterAuthProviderPlugin("pluginA", pluginAProvider); err != nil { + t.Errorf("Unexpected error: failed to register pluginA: %v", err) + } + if err := RegisterAuthProviderPlugin("pluginB", pluginBProvider); err != nil { + t.Errorf("Unexpected error: failed to register pluginB: %v", err) + } + if err := RegisterAuthProviderPlugin("pluginFail", pluginFailProvider); err != nil { + t.Errorf("Unexpected error: failed to register pluginFail: %v", err) + } + testCases := []struct { + useWrapTransport bool + plugin string + expectErr bool + expectPluginA bool + expectPluginB bool + }{ + {false, "", false, false, false}, + {false, "pluginA", false, true, false}, + {false, "pluginB", false, false, true}, + {false, "pluginFail", true, false, false}, + {false, "pluginUnknown", true, false, false}, + } + for i, tc := range testCases { + c := Config{} + if tc.useWrapTransport { + // Specify an existing WrapTransport in the config to make sure that + // plugins play nicely. + c.WrapTransport = func(rt http.RoundTripper) http.RoundTripper { + return &wrapTransport{rt} + } + } + if len(tc.plugin) != 0 { + c.AuthProvider = &clientcmdapi.AuthProviderConfig{Name: tc.plugin} + } + tConfig, err := c.TransportConfig() + if err != nil { + // Unknown/bad plugins are expected to fail here. + if !tc.expectErr { + t.Errorf("%d. Did not expect errors loading Auth Plugin: %q. Got: %v", i, tc.plugin, err) + } + continue + } + var fullyWrappedTransport http.RoundTripper + fullyWrappedTransport = &emptyTransport{} + if tConfig.WrapTransport != nil { + fullyWrappedTransport = tConfig.WrapTransport(&emptyTransport{}) + } + res, err := fullyWrappedTransport.RoundTrip(&http.Request{}) + if err != nil { + t.Errorf("%d. Unexpected error in RoundTrip: %v", i, err) + continue + } + hasWrapTransport := res.Header.Get("wrapTransport") == "Y" + hasPluginA := res.Header.Get("pluginA") == "Y" + hasPluginB := res.Header.Get("pluginB") == "Y" + if hasWrapTransport != tc.useWrapTransport { + t.Errorf("%d. Expected Existing config.WrapTransport: %t; Got: %t", i, tc.useWrapTransport, hasWrapTransport) + } + if hasPluginA != tc.expectPluginA { + t.Errorf("%d. Expected Plugin A: %t; Got: %t", i, tc.expectPluginA, hasPluginA) + } + if hasPluginB != tc.expectPluginB { + t.Errorf("%d. Expected Plugin B: %t; Got: %t", i, tc.expectPluginB, hasPluginB) + } + } +} + +func TestAuthPluginPersist(t *testing.T) { + // register pluginA by a different name so we don't collide across tests. + if err := RegisterAuthProviderPlugin("pluginA2", pluginAProvider); err != nil { + t.Errorf("Unexpected error: failed to register pluginA: %v", err) + } + if err := RegisterAuthProviderPlugin("pluginPersist", pluginPersistProvider); err != nil { + t.Errorf("Unexpected error: failed to register pluginPersist: %v", err) + } + fooBarConfig := map[string]string{"foo": "bar"} + testCases := []struct { + plugin string + startingConfig map[string]string + expectedConfigAfterLogin map[string]string + expectedConfigAfterRoundTrip map[string]string + }{ + // non-persisting plugins should work fine without modifying config. + {"pluginA2", map[string]string{}, map[string]string{}, map[string]string{}}, + {"pluginA2", fooBarConfig, fooBarConfig, fooBarConfig}, + // plugins that persist config should be able to persist when they want. + { + "pluginPersist", + map[string]string{}, + map[string]string{ + "login": "Y", + }, + map[string]string{ + "login": "Y", + "roundTrips": "1", + }, + }, + { + "pluginPersist", + map[string]string{ + "login": "Y", + "roundTrips": "123", + }, + map[string]string{ + "login": "Y", + "roundTrips": "123", + }, + map[string]string{ + "login": "Y", + "roundTrips": "124", + }, + }, + } + for i, tc := range testCases { + cfg := &clientcmdapi.AuthProviderConfig{ + Name: tc.plugin, + Config: tc.startingConfig, + } + persister := &inMemoryPersister{make(map[string]string)} + persister.Persist(tc.startingConfig) + plugin, err := GetAuthProvider("127.0.0.1", cfg, persister) + if err != nil { + t.Errorf("%d. Unexpected error: failed to get plugin %q: %v", i, tc.plugin, err) + } + if err := plugin.Login(); err != nil { + t.Errorf("%d. Unexpected error calling Login() w/ plugin %q: %v", i, tc.plugin, err) + } + // Make sure the plugin persisted what we expect after Login(). + if !reflect.DeepEqual(persister.savedConfig, tc.expectedConfigAfterLogin) { + t.Errorf("%d. Unexpected persisted config after calling %s.Login(): \nGot:\n%v\nExpected:\n%v", + i, tc.plugin, persister.savedConfig, tc.expectedConfigAfterLogin) + } + if _, err := plugin.WrapTransport(&emptyTransport{}).RoundTrip(&http.Request{}); err != nil { + t.Errorf("%d. Unexpected error round-tripping w/ plugin %q: %v", i, tc.plugin, err) + } + // Make sure the plugin persisted what we expect after RoundTrip(). + if !reflect.DeepEqual(persister.savedConfig, tc.expectedConfigAfterRoundTrip) { + t.Errorf("%d. Unexpected persisted config after calling %s.WrapTransport.RoundTrip(): \nGot:\n%v\nExpected:\n%v", + i, tc.plugin, persister.savedConfig, tc.expectedConfigAfterLogin) + } + } + +} + +// emptyTransport provides an empty http.Response with an initialized header +// to allow wrapping RoundTrippers to set header values. +type emptyTransport struct{} + +func (*emptyTransport) RoundTrip(req *http.Request) (*http.Response, error) { + res := &http.Response{ + Header: make(map[string][]string), + } + return res, nil +} + +// wrapTransport sets "wrapTransport" = "Y" on the response. +type wrapTransport struct { + rt http.RoundTripper +} + +func (w *wrapTransport) RoundTrip(req *http.Request) (*http.Response, error) { + res, err := w.rt.RoundTrip(req) + if err != nil { + return nil, err + } + res.Header.Add("wrapTransport", "Y") + return res, nil +} + +// wrapTransportA sets "pluginA" = "Y" on the response. +type wrapTransportA struct { + rt http.RoundTripper +} + +func (w *wrapTransportA) RoundTrip(req *http.Request) (*http.Response, error) { + res, err := w.rt.RoundTrip(req) + if err != nil { + return nil, err + } + res.Header.Add("pluginA", "Y") + return res, nil +} + +type pluginA struct{} + +func (*pluginA) WrapTransport(rt http.RoundTripper) http.RoundTripper { + return &wrapTransportA{rt} +} + +func (*pluginA) Login() error { return nil } + +func pluginAProvider(string, map[string]string, AuthProviderConfigPersister) (AuthProvider, error) { + return &pluginA{}, nil +} + +// wrapTransportB sets "pluginB" = "Y" on the response. +type wrapTransportB struct { + rt http.RoundTripper +} + +func (w *wrapTransportB) RoundTrip(req *http.Request) (*http.Response, error) { + res, err := w.rt.RoundTrip(req) + if err != nil { + return nil, err + } + res.Header.Add("pluginB", "Y") + return res, nil +} + +type pluginB struct{} + +func (*pluginB) WrapTransport(rt http.RoundTripper) http.RoundTripper { + return &wrapTransportB{rt} +} + +func (*pluginB) Login() error { return nil } + +func pluginBProvider(string, map[string]string, AuthProviderConfigPersister) (AuthProvider, error) { + return &pluginB{}, nil +} + +// pluginFailProvider simulates a registered AuthPlugin that fails to load. +func pluginFailProvider(string, map[string]string, AuthProviderConfigPersister) (AuthProvider, error) { + return nil, fmt.Errorf("Failed to load AuthProvider") +} + +type inMemoryPersister struct { + savedConfig map[string]string +} + +func (i *inMemoryPersister) Persist(config map[string]string) error { + i.savedConfig = make(map[string]string) + for k, v := range config { + i.savedConfig[k] = v + } + return nil +} + +// wrapTransportPersist increments the "roundTrips" entry from the config when +// roundTrip is called. +type wrapTransportPersist struct { + rt http.RoundTripper + config map[string]string + persister AuthProviderConfigPersister +} + +func (w *wrapTransportPersist) RoundTrip(req *http.Request) (*http.Response, error) { + roundTrips := 0 + if rtVal, ok := w.config["roundTrips"]; ok { + var err error + roundTrips, err = strconv.Atoi(rtVal) + if err != nil { + return nil, err + } + } + roundTrips++ + w.config["roundTrips"] = fmt.Sprintf("%d", roundTrips) + if err := w.persister.Persist(w.config); err != nil { + return nil, err + } + return w.rt.RoundTrip(req) +} + +type pluginPersist struct { + config map[string]string + persister AuthProviderConfigPersister +} + +func (p *pluginPersist) WrapTransport(rt http.RoundTripper) http.RoundTripper { + return &wrapTransportPersist{rt, p.config, p.persister} +} + +// Login sets the config entry "login" to "Y". +func (p *pluginPersist) Login() error { + p.config["login"] = "Y" + p.persister.Persist(p.config) + return nil +} + +func pluginPersistProvider(_ string, config map[string]string, persister AuthProviderConfigPersister) (AuthProvider, error) { + return &pluginPersist{config, persister}, nil +} diff --git a/vendor/k8s.io/client-go/rest/request_test.go b/vendor/k8s.io/client-go/rest/request_test.go new file mode 100755 index 000000000..0691fc726 --- /dev/null +++ b/vendor/k8s.io/client-go/rest/request_test.go @@ -0,0 +1,1718 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package rest + +import ( + "bytes" + "context" + "errors" + "fmt" + "io" + "io/ioutil" + "net" + "net/http" + "net/http/httptest" + "net/url" + "os" + "reflect" + "strings" + "syscall" + "testing" + "time" + + "k8s.io/api/core/v1" + apiequality "k8s.io/apimachinery/pkg/api/equality" + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/apimachinery/pkg/runtime/serializer/streaming" + "k8s.io/apimachinery/pkg/util/clock" + "k8s.io/apimachinery/pkg/util/diff" + "k8s.io/apimachinery/pkg/util/httpstream" + "k8s.io/apimachinery/pkg/util/intstr" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/kubernetes/scheme" + restclientwatch "k8s.io/client-go/rest/watch" + "k8s.io/client-go/util/flowcontrol" + utiltesting "k8s.io/client-go/util/testing" +) + +func TestNewRequestSetsAccept(t *testing.T) { + r := NewRequest(nil, "get", &url.URL{Path: "/path/"}, "", ContentConfig{}, Serializers{}, nil, nil) + if r.headers.Get("Accept") != "" { + t.Errorf("unexpected headers: %#v", r.headers) + } + r = NewRequest(nil, "get", &url.URL{Path: "/path/"}, "", ContentConfig{ContentType: "application/other"}, Serializers{}, nil, nil) + if r.headers.Get("Accept") != "application/other, */*" { + t.Errorf("unexpected headers: %#v", r.headers) + } +} + +type clientFunc func(req *http.Request) (*http.Response, error) + +func (f clientFunc) Do(req *http.Request) (*http.Response, error) { + return f(req) +} + +func TestRequestSetsHeaders(t *testing.T) { + server := clientFunc(func(req *http.Request) (*http.Response, error) { + if req.Header.Get("Accept") != "application/other, */*" { + t.Errorf("unexpected headers: %#v", req.Header) + } + return &http.Response{ + StatusCode: http.StatusForbidden, + Body: ioutil.NopCloser(bytes.NewReader([]byte{})), + }, nil + }) + config := defaultContentConfig() + config.ContentType = "application/other" + serializers := defaultSerializers(t) + r := NewRequest(server, "get", &url.URL{Path: "/path"}, "", config, serializers, nil, nil) + + // Check if all "issue" methods are setting headers. + _ = r.Do() + _, _ = r.Watch() + _, _ = r.Stream() +} + +func TestRequestWithErrorWontChange(t *testing.T) { + gvCopy := v1.SchemeGroupVersion + original := Request{ + err: errors.New("test"), + content: ContentConfig{GroupVersion: &gvCopy}, + } + r := original + changed := r.Param("foo", "bar"). + AbsPath("/abs"). + Prefix("test"). + Suffix("testing"). + Namespace("new"). + Resource("foos"). + Name("bars"). + Body("foo"). + Timeout(time.Millisecond) + if changed != &r { + t.Errorf("returned request should point to the same object") + } + if !reflect.DeepEqual(changed, &original) { + t.Errorf("expected %#v, got %#v", &original, changed) + } +} + +func TestRequestPreservesBaseTrailingSlash(t *testing.T) { + r := &Request{baseURL: &url.URL{}, pathPrefix: "/path/"} + if s := r.URL().String(); s != "/path/" { + t.Errorf("trailing slash should be preserved: %s", s) + } +} + +func TestRequestAbsPathPreservesTrailingSlash(t *testing.T) { + r := (&Request{baseURL: &url.URL{}}).AbsPath("/foo/") + if s := r.URL().String(); s != "/foo/" { + t.Errorf("trailing slash should be preserved: %s", s) + } + + r = (&Request{baseURL: &url.URL{}}).AbsPath("/foo/") + if s := r.URL().String(); s != "/foo/" { + t.Errorf("trailing slash should be preserved: %s", s) + } +} + +func TestRequestAbsPathJoins(t *testing.T) { + r := (&Request{baseURL: &url.URL{}}).AbsPath("foo/bar", "baz") + if s := r.URL().String(); s != "foo/bar/baz" { + t.Errorf("trailing slash should be preserved: %s", s) + } +} + +func TestRequestSetsNamespace(t *testing.T) { + r := (&Request{ + baseURL: &url.URL{ + Path: "/", + }, + }).Namespace("foo") + if r.namespace == "" { + t.Errorf("namespace should be set: %#v", r) + } + + if s := r.URL().String(); s != "namespaces/foo" { + t.Errorf("namespace should be in path: %s", s) + } +} + +func TestRequestOrdersNamespaceInPath(t *testing.T) { + r := (&Request{ + baseURL: &url.URL{}, + pathPrefix: "/test/", + }).Name("bar").Resource("baz").Namespace("foo") + if s := r.URL().String(); s != "/test/namespaces/foo/baz/bar" { + t.Errorf("namespace should be in order in path: %s", s) + } +} + +func TestRequestOrdersSubResource(t *testing.T) { + r := (&Request{ + baseURL: &url.URL{}, + pathPrefix: "/test/", + }).Name("bar").Resource("baz").Namespace("foo").Suffix("test").SubResource("a", "b") + if s := r.URL().String(); s != "/test/namespaces/foo/baz/bar/a/b/test" { + t.Errorf("namespace should be in order in path: %s", s) + } +} + +func TestRequestSetTwiceError(t *testing.T) { + if (&Request{}).Name("bar").Name("baz").err == nil { + t.Errorf("setting name twice should result in error") + } + if (&Request{}).Namespace("bar").Namespace("baz").err == nil { + t.Errorf("setting namespace twice should result in error") + } + if (&Request{}).Resource("bar").Resource("baz").err == nil { + t.Errorf("setting resource twice should result in error") + } + if (&Request{}).SubResource("bar").SubResource("baz").err == nil { + t.Errorf("setting subresource twice should result in error") + } +} + +func TestInvalidSegments(t *testing.T) { + invalidSegments := []string{".", "..", "test/segment", "test%2bsegment"} + setters := map[string]func(string, *Request){ + "namespace": func(s string, r *Request) { r.Namespace(s) }, + "resource": func(s string, r *Request) { r.Resource(s) }, + "name": func(s string, r *Request) { r.Name(s) }, + "subresource": func(s string, r *Request) { r.SubResource(s) }, + } + for _, invalidSegment := range invalidSegments { + for setterName, setter := range setters { + r := &Request{} + setter(invalidSegment, r) + if r.err == nil { + t.Errorf("%s: %s: expected error, got none", setterName, invalidSegment) + } + } + } +} + +func TestRequestParam(t *testing.T) { + r := (&Request{}).Param("foo", "a") + if !reflect.DeepEqual(r.params, url.Values{"foo": []string{"a"}}) { + t.Errorf("should have set a param: %#v", r) + } + + r.Param("bar", "1") + r.Param("bar", "2") + if !reflect.DeepEqual(r.params, url.Values{"foo": []string{"a"}, "bar": []string{"1", "2"}}) { + t.Errorf("should have set a param: %#v", r) + } +} + +func TestRequestVersionedParams(t *testing.T) { + r := (&Request{content: ContentConfig{GroupVersion: &v1.SchemeGroupVersion}}).Param("foo", "a") + if !reflect.DeepEqual(r.params, url.Values{"foo": []string{"a"}}) { + t.Errorf("should have set a param: %#v", r) + } + r.VersionedParams(&v1.PodLogOptions{Follow: true, Container: "bar"}, scheme.ParameterCodec) + + if !reflect.DeepEqual(r.params, url.Values{ + "foo": []string{"a"}, + "container": []string{"bar"}, + "follow": []string{"true"}, + }) { + t.Errorf("should have set a param: %#v", r) + } +} + +func TestRequestVersionedParamsFromListOptions(t *testing.T) { + r := &Request{content: ContentConfig{GroupVersion: &v1.SchemeGroupVersion}} + r.VersionedParams(&metav1.ListOptions{ResourceVersion: "1"}, scheme.ParameterCodec) + if !reflect.DeepEqual(r.params, url.Values{ + "resourceVersion": []string{"1"}, + }) { + t.Errorf("should have set a param: %#v", r) + } + + var timeout int64 = 10 + r.VersionedParams(&metav1.ListOptions{ResourceVersion: "2", TimeoutSeconds: &timeout}, scheme.ParameterCodec) + if !reflect.DeepEqual(r.params, url.Values{ + "resourceVersion": []string{"1", "2"}, + "timeoutSeconds": []string{"10"}, + }) { + t.Errorf("should have set a param: %#v %v", r.params, r.err) + } +} + +func TestRequestURI(t *testing.T) { + r := (&Request{}).Param("foo", "a") + r.Prefix("other") + r.RequestURI("/test?foo=b&a=b&c=1&c=2") + if r.pathPrefix != "/test" { + t.Errorf("path is wrong: %#v", r) + } + if !reflect.DeepEqual(r.params, url.Values{"a": []string{"b"}, "foo": []string{"b"}, "c": []string{"1", "2"}}) { + t.Errorf("should have set a param: %#v", r) + } +} + +type NotAnAPIObject struct{} + +func (obj NotAnAPIObject) GroupVersionKind() *schema.GroupVersionKind { return nil } +func (obj NotAnAPIObject) SetGroupVersionKind(gvk *schema.GroupVersionKind) {} + +func defaultContentConfig() ContentConfig { + gvCopy := v1.SchemeGroupVersion + return ContentConfig{ + ContentType: "application/json", + GroupVersion: &gvCopy, + NegotiatedSerializer: serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}, + } +} + +func defaultSerializers(t *testing.T) Serializers { + config := defaultContentConfig() + serializers, err := createSerializers(config) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + return *serializers +} + +func TestRequestBody(t *testing.T) { + // test unknown type + r := (&Request{}).Body([]string{"test"}) + if r.err == nil || r.body != nil { + t.Errorf("should have set err and left body nil: %#v", r) + } + + // test error set when failing to read file + f, err := ioutil.TempFile("", "test") + if err != nil { + t.Fatalf("unable to create temp file") + } + defer f.Close() + os.Remove(f.Name()) + r = (&Request{}).Body(f.Name()) + if r.err == nil || r.body != nil { + t.Errorf("should have set err and left body nil: %#v", r) + } + + // test unencodable api object + r = (&Request{content: defaultContentConfig()}).Body(&NotAnAPIObject{}) + if r.err == nil || r.body != nil { + t.Errorf("should have set err and left body nil: %#v", r) + } +} + +func TestResultIntoWithErrReturnsErr(t *testing.T) { + res := Result{err: errors.New("test")} + if err := res.Into(&v1.Pod{}); err != res.err { + t.Errorf("should have returned exact error from result") + } +} + +func TestResultIntoWithNoBodyReturnsErr(t *testing.T) { + res := Result{ + body: []byte{}, + decoder: scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), + } + if err := res.Into(&v1.Pod{}); err == nil || !strings.Contains(err.Error(), "0-length") { + t.Errorf("should have complained about 0 length body") + } +} + +func TestURLTemplate(t *testing.T) { + uri, _ := url.Parse("http://localhost") + r := NewRequest(nil, "POST", uri, "", ContentConfig{GroupVersion: &schema.GroupVersion{Group: "test"}}, Serializers{}, nil, nil) + r.Prefix("pre1").Resource("r1").Namespace("ns").Name("nm").Param("p0", "v0") + full := r.URL() + if full.String() != "http://localhost/pre1/namespaces/ns/r1/nm?p0=v0" { + t.Errorf("unexpected initial URL: %s", full) + } + actualURL := r.finalURLTemplate() + actual := actualURL.String() + expected := "http://localhost/pre1/namespaces/%7Bnamespace%7D/r1/%7Bname%7D?p0=%7Bvalue%7D" + if actual != expected { + t.Errorf("unexpected URL template: %s %s", actual, expected) + } + if r.URL().String() != full.String() { + t.Errorf("creating URL template changed request: %s -> %s", full.String(), r.URL().String()) + } +} + +func TestTransformResponse(t *testing.T) { + invalid := []byte("aaaaa") + uri, _ := url.Parse("http://localhost") + testCases := []struct { + Response *http.Response + Data []byte + Created bool + Error bool + ErrFn func(err error) bool + }{ + {Response: &http.Response{StatusCode: 200}, Data: []byte{}}, + {Response: &http.Response{StatusCode: 201}, Data: []byte{}, Created: true}, + {Response: &http.Response{StatusCode: 199}, Error: true}, + {Response: &http.Response{StatusCode: 500}, Error: true}, + {Response: &http.Response{StatusCode: 422}, Error: true}, + {Response: &http.Response{StatusCode: 409}, Error: true}, + {Response: &http.Response{StatusCode: 404}, Error: true}, + {Response: &http.Response{StatusCode: 401}, Error: true}, + { + Response: &http.Response{ + StatusCode: 401, + Header: http.Header{"Content-Type": []string{"application/json"}}, + Body: ioutil.NopCloser(bytes.NewReader(invalid)), + }, + Error: true, + ErrFn: func(err error) bool { + return err.Error() != "aaaaa" && apierrors.IsUnauthorized(err) + }, + }, + { + Response: &http.Response{ + StatusCode: 401, + Header: http.Header{"Content-Type": []string{"text/any"}}, + Body: ioutil.NopCloser(bytes.NewReader(invalid)), + }, + Error: true, + ErrFn: func(err error) bool { + return strings.Contains(err.Error(), "server has asked for the client to provide") && apierrors.IsUnauthorized(err) + }, + }, + {Response: &http.Response{StatusCode: 403}, Error: true}, + {Response: &http.Response{StatusCode: 200, Body: ioutil.NopCloser(bytes.NewReader(invalid))}, Data: invalid}, + {Response: &http.Response{StatusCode: 200, Body: ioutil.NopCloser(bytes.NewReader(invalid))}, Data: invalid}, + } + for i, test := range testCases { + r := NewRequest(nil, "", uri, "", defaultContentConfig(), defaultSerializers(t), nil, nil) + if test.Response.Body == nil { + test.Response.Body = ioutil.NopCloser(bytes.NewReader([]byte{})) + } + result := r.transformResponse(test.Response, &http.Request{}) + response, created, err := result.body, result.statusCode == http.StatusCreated, result.err + hasErr := err != nil + if hasErr != test.Error { + t.Errorf("%d: unexpected error: %t %v", i, test.Error, err) + } else if hasErr && test.Response.StatusCode > 399 { + status, ok := err.(apierrors.APIStatus) + if !ok { + t.Errorf("%d: response should have been transformable into APIStatus: %v", i, err) + continue + } + if int(status.Status().Code) != test.Response.StatusCode { + t.Errorf("%d: status code did not match response: %#v", i, status.Status()) + } + } + if test.ErrFn != nil && !test.ErrFn(err) { + t.Errorf("%d: error function did not match: %v", i, err) + } + if !(test.Data == nil && response == nil) && !apiequality.Semantic.DeepDerivative(test.Data, response) { + t.Errorf("%d: unexpected response: %#v %#v", i, test.Data, response) + } + if test.Created != created { + t.Errorf("%d: expected created %t, got %t", i, test.Created, created) + } + } +} + +type renegotiator struct { + called bool + contentType string + params map[string]string + decoder runtime.Decoder + err error +} + +func (r *renegotiator) invoke(contentType string, params map[string]string) (runtime.Decoder, error) { + r.called = true + r.contentType = contentType + r.params = params + return r.decoder, r.err +} + +func TestTransformResponseNegotiate(t *testing.T) { + invalid := []byte("aaaaa") + uri, _ := url.Parse("http://localhost") + testCases := []struct { + Response *http.Response + Data []byte + Created bool + Error bool + ErrFn func(err error) bool + + ContentType string + Called bool + ExpectContentType string + Decoder runtime.Decoder + NegotiateErr error + }{ + { + ContentType: "application/json", + Response: &http.Response{ + StatusCode: 401, + Header: http.Header{"Content-Type": []string{"application/json"}}, + Body: ioutil.NopCloser(bytes.NewReader(invalid)), + }, + Error: true, + ErrFn: func(err error) bool { + return err.Error() != "aaaaa" && apierrors.IsUnauthorized(err) + }, + }, + { + ContentType: "application/json", + Response: &http.Response{ + StatusCode: 401, + Header: http.Header{"Content-Type": []string{"application/protobuf"}}, + Body: ioutil.NopCloser(bytes.NewReader(invalid)), + }, + Decoder: scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), + + Called: true, + ExpectContentType: "application/protobuf", + + Error: true, + ErrFn: func(err error) bool { + return err.Error() != "aaaaa" && apierrors.IsUnauthorized(err) + }, + }, + { + ContentType: "application/json", + Response: &http.Response{ + StatusCode: 500, + Header: http.Header{"Content-Type": []string{"application/,others"}}, + }, + Decoder: scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), + + Error: true, + ErrFn: func(err error) bool { + return err.Error() == "Internal error occurred: mime: expected token after slash" && err.(apierrors.APIStatus).Status().Code == 500 + }, + }, + { + // no negotiation when no content type specified + Response: &http.Response{ + StatusCode: 200, + Header: http.Header{"Content-Type": []string{"text/any"}}, + Body: ioutil.NopCloser(bytes.NewReader(invalid)), + }, + Decoder: scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), + }, + { + // no negotiation when no response content type specified + ContentType: "text/any", + Response: &http.Response{ + StatusCode: 200, + Body: ioutil.NopCloser(bytes.NewReader(invalid)), + }, + Decoder: scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), + }, + { + // unrecognized content type is not handled + ContentType: "application/json", + Response: &http.Response{ + StatusCode: 404, + Header: http.Header{"Content-Type": []string{"application/unrecognized"}}, + Body: ioutil.NopCloser(bytes.NewReader(invalid)), + }, + Decoder: scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), + + NegotiateErr: fmt.Errorf("aaaa"), + Called: true, + ExpectContentType: "application/unrecognized", + + Error: true, + ErrFn: func(err error) bool { + return err.Error() != "aaaaa" && apierrors.IsNotFound(err) + }, + }, + } + for i, test := range testCases { + serializers := defaultSerializers(t) + negotiator := &renegotiator{ + decoder: test.Decoder, + err: test.NegotiateErr, + } + serializers.RenegotiatedDecoder = negotiator.invoke + contentConfig := defaultContentConfig() + contentConfig.ContentType = test.ContentType + r := NewRequest(nil, "", uri, "", contentConfig, serializers, nil, nil) + if test.Response.Body == nil { + test.Response.Body = ioutil.NopCloser(bytes.NewReader([]byte{})) + } + result := r.transformResponse(test.Response, &http.Request{}) + _, err := result.body, result.err + hasErr := err != nil + if hasErr != test.Error { + t.Errorf("%d: unexpected error: %t %v", i, test.Error, err) + continue + } else if hasErr && test.Response.StatusCode > 399 { + status, ok := err.(apierrors.APIStatus) + if !ok { + t.Errorf("%d: response should have been transformable into APIStatus: %v", i, err) + continue + } + if int(status.Status().Code) != test.Response.StatusCode { + t.Errorf("%d: status code did not match response: %#v", i, status.Status()) + } + } + if test.ErrFn != nil && !test.ErrFn(err) { + t.Errorf("%d: error function did not match: %v", i, err) + } + if negotiator.called != test.Called { + t.Errorf("%d: negotiator called %t != %t", i, negotiator.called, test.Called) + } + if !test.Called { + continue + } + if negotiator.contentType != test.ExpectContentType { + t.Errorf("%d: unexpected content type: %s", i, negotiator.contentType) + } + } +} + +func TestTransformUnstructuredError(t *testing.T) { + testCases := []struct { + Req *http.Request + Res *http.Response + + Resource string + Name string + + ErrFn func(error) bool + Transformed error + }{ + { + Resource: "foo", + Name: "bar", + Req: &http.Request{ + Method: "POST", + }, + Res: &http.Response{ + StatusCode: http.StatusConflict, + Body: ioutil.NopCloser(bytes.NewReader(nil)), + }, + ErrFn: apierrors.IsAlreadyExists, + }, + { + Resource: "foo", + Name: "bar", + Req: &http.Request{ + Method: "PUT", + }, + Res: &http.Response{ + StatusCode: http.StatusConflict, + Body: ioutil.NopCloser(bytes.NewReader(nil)), + }, + ErrFn: apierrors.IsConflict, + }, + { + Resource: "foo", + Name: "bar", + Req: &http.Request{}, + Res: &http.Response{ + StatusCode: http.StatusNotFound, + Body: ioutil.NopCloser(bytes.NewReader(nil)), + }, + ErrFn: apierrors.IsNotFound, + }, + { + Req: &http.Request{}, + Res: &http.Response{ + StatusCode: http.StatusBadRequest, + Body: ioutil.NopCloser(bytes.NewReader(nil)), + }, + ErrFn: apierrors.IsBadRequest, + }, + { + // status in response overrides transformed result + Req: &http.Request{}, + Res: &http.Response{StatusCode: http.StatusBadRequest, Body: ioutil.NopCloser(bytes.NewReader([]byte(`{"kind":"Status","apiVersion":"v1","status":"Failure","code":404}`)))}, + ErrFn: apierrors.IsBadRequest, + Transformed: &apierrors.StatusError{ + ErrStatus: metav1.Status{Status: metav1.StatusFailure, Code: http.StatusNotFound}, + }, + }, + { + // successful status is ignored + Req: &http.Request{}, + Res: &http.Response{StatusCode: http.StatusBadRequest, Body: ioutil.NopCloser(bytes.NewReader([]byte(`{"kind":"Status","apiVersion":"v1","status":"Success","code":404}`)))}, + ErrFn: apierrors.IsBadRequest, + }, + { + // empty object does not change result + Req: &http.Request{}, + Res: &http.Response{StatusCode: http.StatusBadRequest, Body: ioutil.NopCloser(bytes.NewReader([]byte(`{}`)))}, + ErrFn: apierrors.IsBadRequest, + }, + { + // we default apiVersion for backwards compatibility with old clients + // TODO: potentially remove in 1.7 + Req: &http.Request{}, + Res: &http.Response{StatusCode: http.StatusBadRequest, Body: ioutil.NopCloser(bytes.NewReader([]byte(`{"kind":"Status","status":"Failure","code":404}`)))}, + ErrFn: apierrors.IsBadRequest, + Transformed: &apierrors.StatusError{ + ErrStatus: metav1.Status{Status: metav1.StatusFailure, Code: http.StatusNotFound}, + }, + }, + { + // we do not default kind + Req: &http.Request{}, + Res: &http.Response{StatusCode: http.StatusBadRequest, Body: ioutil.NopCloser(bytes.NewReader([]byte(`{"status":"Failure","code":404}`)))}, + ErrFn: apierrors.IsBadRequest, + }, + } + + for i, testCase := range testCases { + r := &Request{ + content: defaultContentConfig(), + serializers: defaultSerializers(t), + resourceName: testCase.Name, + resource: testCase.Resource, + } + result := r.transformResponse(testCase.Res, testCase.Req) + err := result.err + if !testCase.ErrFn(err) { + t.Errorf("unexpected error: %v", err) + continue + } + if !apierrors.IsUnexpectedServerError(err) { + t.Errorf("%d: unexpected error type: %v", i, err) + } + if len(testCase.Name) != 0 && !strings.Contains(err.Error(), testCase.Name) { + t.Errorf("unexpected error string: %s", err) + } + if len(testCase.Resource) != 0 && !strings.Contains(err.Error(), testCase.Resource) { + t.Errorf("unexpected error string: %s", err) + } + + // verify Error() properly transforms the error + transformed := result.Error() + expect := testCase.Transformed + if expect == nil { + expect = err + } + if !reflect.DeepEqual(expect, transformed) { + t.Errorf("%d: unexpected Error(): %s", i, diff.ObjectReflectDiff(expect, transformed)) + } + + // verify result.Get properly transforms the error + if _, err := result.Get(); !reflect.DeepEqual(expect, err) { + t.Errorf("%d: unexpected error on Get(): %s", i, diff.ObjectReflectDiff(expect, err)) + } + + // verify result.Into properly handles the error + if err := result.Into(&v1.Pod{}); !reflect.DeepEqual(expect, err) { + t.Errorf("%d: unexpected error on Into(): %s", i, diff.ObjectReflectDiff(expect, err)) + } + + // verify result.Raw leaves the error in the untransformed state + if _, err := result.Raw(); !reflect.DeepEqual(result.err, err) { + t.Errorf("%d: unexpected error on Raw(): %s", i, diff.ObjectReflectDiff(expect, err)) + } + } +} + +func TestRequestWatch(t *testing.T) { + testCases := []struct { + Request *Request + Err bool + ErrFn func(error) bool + Empty bool + }{ + { + Request: &Request{err: errors.New("bail")}, + Err: true, + }, + { + Request: &Request{baseURL: &url.URL{}, pathPrefix: "%"}, + Err: true, + }, + { + Request: &Request{ + client: clientFunc(func(req *http.Request) (*http.Response, error) { + return nil, errors.New("err") + }), + baseURL: &url.URL{}, + }, + Err: true, + }, + { + Request: &Request{ + content: defaultContentConfig(), + serializers: defaultSerializers(t), + client: clientFunc(func(req *http.Request) (*http.Response, error) { + return &http.Response{ + StatusCode: http.StatusForbidden, + Body: ioutil.NopCloser(bytes.NewReader([]byte{})), + }, nil + }), + baseURL: &url.URL{}, + }, + Err: true, + ErrFn: func(err error) bool { + return apierrors.IsForbidden(err) + }, + }, + { + Request: &Request{ + content: defaultContentConfig(), + serializers: defaultSerializers(t), + client: clientFunc(func(req *http.Request) (*http.Response, error) { + return &http.Response{ + StatusCode: http.StatusUnauthorized, + Body: ioutil.NopCloser(bytes.NewReader([]byte{})), + }, nil + }), + baseURL: &url.URL{}, + }, + Err: true, + ErrFn: func(err error) bool { + return apierrors.IsUnauthorized(err) + }, + }, + { + Request: &Request{ + content: defaultContentConfig(), + serializers: defaultSerializers(t), + client: clientFunc(func(req *http.Request) (*http.Response, error) { + return &http.Response{ + StatusCode: http.StatusUnauthorized, + Body: ioutil.NopCloser(bytes.NewReader([]byte(runtime.EncodeOrDie(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), &metav1.Status{ + Status: metav1.StatusFailure, + Reason: metav1.StatusReasonUnauthorized, + })))), + }, nil + }), + baseURL: &url.URL{}, + }, + Err: true, + ErrFn: func(err error) bool { + return apierrors.IsUnauthorized(err) + }, + }, + { + Request: &Request{ + serializers: defaultSerializers(t), + client: clientFunc(func(req *http.Request) (*http.Response, error) { + return nil, io.EOF + }), + baseURL: &url.URL{}, + }, + Empty: true, + }, + { + Request: &Request{ + serializers: defaultSerializers(t), + client: clientFunc(func(req *http.Request) (*http.Response, error) { + return nil, &url.Error{Err: io.EOF} + }), + baseURL: &url.URL{}, + }, + Empty: true, + }, + { + Request: &Request{ + serializers: defaultSerializers(t), + client: clientFunc(func(req *http.Request) (*http.Response, error) { + return nil, errors.New("http: can't write HTTP request on broken connection") + }), + baseURL: &url.URL{}, + }, + Empty: true, + }, + { + Request: &Request{ + serializers: defaultSerializers(t), + client: clientFunc(func(req *http.Request) (*http.Response, error) { + return nil, errors.New("foo: connection reset by peer") + }), + baseURL: &url.URL{}, + }, + Empty: true, + }, + } + for i, testCase := range testCases { + t.Logf("testcase %v", testCase.Request) + testCase.Request.backoffMgr = &NoBackoff{} + watch, err := testCase.Request.Watch() + hasErr := err != nil + if hasErr != testCase.Err { + t.Errorf("%d: expected %t, got %t: %v", i, testCase.Err, hasErr, err) + continue + } + if testCase.ErrFn != nil && !testCase.ErrFn(err) { + t.Errorf("%d: error not valid: %v", i, err) + } + if hasErr && watch != nil { + t.Errorf("%d: watch should be nil when error is returned", i) + continue + } + if testCase.Empty { + _, ok := <-watch.ResultChan() + if ok { + t.Errorf("%d: expected the watch to be empty: %#v", i, watch) + } + } + } +} + +func TestRequestStream(t *testing.T) { + testCases := []struct { + Request *Request + Err bool + ErrFn func(error) bool + }{ + { + Request: &Request{err: errors.New("bail")}, + Err: true, + }, + { + Request: &Request{baseURL: &url.URL{}, pathPrefix: "%"}, + Err: true, + }, + { + Request: &Request{ + client: clientFunc(func(req *http.Request) (*http.Response, error) { + return nil, errors.New("err") + }), + baseURL: &url.URL{}, + }, + Err: true, + }, + { + Request: &Request{ + client: clientFunc(func(req *http.Request) (*http.Response, error) { + return &http.Response{ + StatusCode: http.StatusUnauthorized, + Body: ioutil.NopCloser(bytes.NewReader([]byte(runtime.EncodeOrDie(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), &metav1.Status{ + Status: metav1.StatusFailure, + Reason: metav1.StatusReasonUnauthorized, + })))), + }, nil + }), + content: defaultContentConfig(), + serializers: defaultSerializers(t), + baseURL: &url.URL{}, + }, + Err: true, + }, + { + Request: &Request{ + client: clientFunc(func(req *http.Request) (*http.Response, error) { + return &http.Response{ + StatusCode: http.StatusBadRequest, + Body: ioutil.NopCloser(bytes.NewReader([]byte(`{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"a container name must be specified for pod kube-dns-v20-mz5cv, choose one of: [kubedns dnsmasq healthz]","reason":"BadRequest","code":400}`))), + }, nil + }), + content: defaultContentConfig(), + serializers: defaultSerializers(t), + baseURL: &url.URL{}, + }, + Err: true, + ErrFn: func(err error) bool { + if err.Error() == "a container name must be specified for pod kube-dns-v20-mz5cv, choose one of: [kubedns dnsmasq healthz]" { + return true + } + return false + }, + }, + } + for i, testCase := range testCases { + testCase.Request.backoffMgr = &NoBackoff{} + body, err := testCase.Request.Stream() + hasErr := err != nil + if hasErr != testCase.Err { + t.Errorf("%d: expected %t, got %t: %v", i, testCase.Err, hasErr, err) + } + if hasErr && body != nil { + t.Errorf("%d: body should be nil when error is returned", i) + } + + if hasErr { + if testCase.ErrFn != nil && !testCase.ErrFn(err) { + t.Errorf("unexpected error: %v", err) + } + } + } +} + +type fakeUpgradeConnection struct{} + +func (c *fakeUpgradeConnection) CreateStream(headers http.Header) (httpstream.Stream, error) { + return nil, nil +} +func (c *fakeUpgradeConnection) Close() error { + return nil +} +func (c *fakeUpgradeConnection) CloseChan() <-chan bool { + return make(chan bool) +} +func (c *fakeUpgradeConnection) SetIdleTimeout(timeout time.Duration) { +} + +type fakeUpgradeRoundTripper struct { + req *http.Request + conn httpstream.Connection +} + +func (f *fakeUpgradeRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { + f.req = req + b := []byte{} + body := ioutil.NopCloser(bytes.NewReader(b)) + resp := &http.Response{ + StatusCode: 101, + Body: body, + } + return resp, nil +} + +func (f *fakeUpgradeRoundTripper) NewConnection(resp *http.Response) (httpstream.Connection, error) { + return f.conn, nil +} + +func TestRequestDo(t *testing.T) { + testCases := []struct { + Request *Request + Err bool + }{ + { + Request: &Request{err: errors.New("bail")}, + Err: true, + }, + { + Request: &Request{baseURL: &url.URL{}, pathPrefix: "%"}, + Err: true, + }, + { + Request: &Request{ + client: clientFunc(func(req *http.Request) (*http.Response, error) { + return nil, errors.New("err") + }), + baseURL: &url.URL{}, + }, + Err: true, + }, + } + for i, testCase := range testCases { + testCase.Request.backoffMgr = &NoBackoff{} + body, err := testCase.Request.Do().Raw() + hasErr := err != nil + if hasErr != testCase.Err { + t.Errorf("%d: expected %t, got %t: %v", i, testCase.Err, hasErr, err) + } + if hasErr && body != nil { + t.Errorf("%d: body should be nil when error is returned", i) + } + } +} + +func TestDoRequestNewWay(t *testing.T) { + reqBody := "request body" + expectedObj := &v1.Service{Spec: v1.ServiceSpec{Ports: []v1.ServicePort{{ + Protocol: "TCP", + Port: 12345, + TargetPort: intstr.FromInt(12345), + }}}} + expectedBody, _ := runtime.Encode(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), expectedObj) + fakeHandler := utiltesting.FakeHandler{ + StatusCode: 200, + ResponseBody: string(expectedBody), + T: t, + } + testServer := httptest.NewServer(&fakeHandler) + defer testServer.Close() + c := testRESTClient(t, testServer) + obj, err := c.Verb("POST"). + Prefix("foo", "bar"). + Suffix("baz"). + Timeout(time.Second). + Body([]byte(reqBody)). + Do().Get() + if err != nil { + t.Errorf("Unexpected error: %v %#v", err, err) + return + } + if obj == nil { + t.Error("nil obj") + } else if !apiequality.Semantic.DeepDerivative(expectedObj, obj) { + t.Errorf("Expected: %#v, got %#v", expectedObj, obj) + } + requestURL := defaultResourcePathWithPrefix("foo/bar", "", "", "baz") + requestURL += "?timeout=1s" + fakeHandler.ValidateRequest(t, requestURL, "POST", &reqBody) +} + +// This test assumes that the client implementation backs off exponentially, for an individual request. +func TestBackoffLifecycle(t *testing.T) { + count := 0 + testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + count++ + t.Logf("Attempt %d", count) + if count == 5 || count == 9 { + w.WriteHeader(http.StatusOK) + return + } else { + w.WriteHeader(http.StatusGatewayTimeout) + return + } + })) + defer testServer.Close() + c := testRESTClient(t, testServer) + + // Test backoff recovery and increase. This correlates to the constants + // which are used in the server implementation returning StatusOK above. + seconds := []int{0, 1, 2, 4, 8, 0, 1, 2, 4, 0} + request := c.Verb("POST").Prefix("backofftest").Suffix("abc") + clock := clock.FakeClock{} + request.backoffMgr = &URLBackoff{ + // Use a fake backoff here to avoid flakes and speed the test up. + Backoff: flowcontrol.NewFakeBackOff( + time.Duration(1)*time.Second, + time.Duration(200)*time.Second, + &clock, + )} + + for _, sec := range seconds { + thisBackoff := request.backoffMgr.CalculateBackoff(request.URL()) + t.Logf("Current backoff %v", thisBackoff) + if thisBackoff != time.Duration(sec)*time.Second { + t.Errorf("Backoff is %v instead of %v", thisBackoff, sec) + } + now := clock.Now() + request.DoRaw() + elapsed := clock.Since(now) + if clock.Since(now) != thisBackoff { + t.Errorf("CalculatedBackoff not honored by clock: Expected time of %v, but got %v ", thisBackoff, elapsed) + } + } +} + +type testBackoffManager struct { + sleeps []time.Duration +} + +func (b *testBackoffManager) UpdateBackoff(actualUrl *url.URL, err error, responseCode int) { +} + +func (b *testBackoffManager) CalculateBackoff(actualUrl *url.URL) time.Duration { + return time.Duration(0) +} + +func (b *testBackoffManager) Sleep(d time.Duration) { + b.sleeps = append(b.sleeps, d) +} + +func TestCheckRetryClosesBody(t *testing.T) { + count := 0 + ch := make(chan struct{}) + testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + count++ + t.Logf("attempt %d", count) + if count >= 5 { + w.WriteHeader(http.StatusOK) + close(ch) + return + } + w.Header().Set("Retry-After", "1") + http.Error(w, "Too many requests, please try again later.", http.StatusTooManyRequests) + })) + defer testServer.Close() + + backoffMgr := &testBackoffManager{} + expectedSleeps := []time.Duration{0, time.Second, 0, time.Second, 0, time.Second, 0, time.Second, 0} + + c := testRESTClient(t, testServer) + c.createBackoffMgr = func() BackoffManager { return backoffMgr } + _, err := c.Verb("POST"). + Prefix("foo", "bar"). + Suffix("baz"). + Timeout(time.Second). + Body([]byte(strings.Repeat("abcd", 1000))). + DoRaw() + if err != nil { + t.Fatalf("Unexpected error: %v %#v", err, err) + } + <-ch + if count != 5 { + t.Errorf("unexpected retries: %d", count) + } + if !reflect.DeepEqual(backoffMgr.sleeps, expectedSleeps) { + t.Errorf("unexpected sleeps, expected: %v, got: %v", expectedSleeps, backoffMgr.sleeps) + } +} + +func TestConnectionResetByPeerIsRetried(t *testing.T) { + count := 0 + backoff := &testBackoffManager{} + req := &Request{ + verb: "GET", + client: clientFunc(func(req *http.Request) (*http.Response, error) { + count++ + if count >= 3 { + return &http.Response{ + StatusCode: 200, + Body: ioutil.NopCloser(bytes.NewReader([]byte{})), + }, nil + } + return nil, &net.OpError{Err: syscall.ECONNRESET} + }), + backoffMgr: backoff, + } + // We expect two retries of "connection reset by peer" and the success. + _, err := req.Do().Raw() + if err != nil { + t.Errorf("Unexpected error: %v", err) + } + // We have a sleep before each retry (including the initial one) and for + // every "retry-after" call - thus 5 together. + if len(backoff.sleeps) != 5 { + t.Errorf("Expected 5 retries, got: %d", len(backoff.sleeps)) + } +} + +func TestCheckRetryHandles429And5xx(t *testing.T) { + count := 0 + ch := make(chan struct{}) + testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + data, err := ioutil.ReadAll(req.Body) + if err != nil { + t.Fatalf("unable to read request body: %v", err) + } + if !bytes.Equal(data, []byte(strings.Repeat("abcd", 1000))) { + t.Fatalf("retry did not send a complete body: %s", data) + } + t.Logf("attempt %d", count) + if count >= 4 { + w.WriteHeader(http.StatusOK) + close(ch) + return + } + w.Header().Set("Retry-After", "0") + w.WriteHeader([]int{http.StatusTooManyRequests, 500, 501, 504}[count]) + count++ + })) + defer testServer.Close() + + c := testRESTClient(t, testServer) + _, err := c.Verb("POST"). + Prefix("foo", "bar"). + Suffix("baz"). + Timeout(time.Second). + Body([]byte(strings.Repeat("abcd", 1000))). + DoRaw() + if err != nil { + t.Fatalf("Unexpected error: %v %#v", err, err) + } + <-ch + if count != 4 { + t.Errorf("unexpected retries: %d", count) + } +} + +func BenchmarkCheckRetryClosesBody(b *testing.B) { + count := 0 + testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + count++ + if count%3 == 0 { + w.WriteHeader(http.StatusOK) + return + } + w.Header().Set("Retry-After", "0") + w.WriteHeader(http.StatusTooManyRequests) + })) + defer testServer.Close() + + c := testRESTClient(b, testServer) + r := c.Verb("POST"). + Prefix("foo", "bar"). + Suffix("baz"). + Timeout(time.Second). + Body([]byte(strings.Repeat("abcd", 1000))) + + for i := 0; i < b.N; i++ { + if _, err := r.DoRaw(); err != nil { + b.Fatalf("Unexpected error: %v %#v", err, err) + } + } +} + +func TestDoRequestNewWayReader(t *testing.T) { + reqObj := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} + reqBodyExpected, _ := runtime.Encode(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), reqObj) + expectedObj := &v1.Service{Spec: v1.ServiceSpec{Ports: []v1.ServicePort{{ + Protocol: "TCP", + Port: 12345, + TargetPort: intstr.FromInt(12345), + }}}} + expectedBody, _ := runtime.Encode(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), expectedObj) + fakeHandler := utiltesting.FakeHandler{ + StatusCode: 200, + ResponseBody: string(expectedBody), + T: t, + } + testServer := httptest.NewServer(&fakeHandler) + defer testServer.Close() + c := testRESTClient(t, testServer) + obj, err := c.Verb("POST"). + Resource("bar"). + Name("baz"). + Prefix("foo"). + Timeout(time.Second). + Body(bytes.NewBuffer(reqBodyExpected)). + Do().Get() + if err != nil { + t.Errorf("Unexpected error: %v %#v", err, err) + return + } + if obj == nil { + t.Error("nil obj") + } else if !apiequality.Semantic.DeepDerivative(expectedObj, obj) { + t.Errorf("Expected: %#v, got %#v", expectedObj, obj) + } + tmpStr := string(reqBodyExpected) + requestURL := defaultResourcePathWithPrefix("foo", "bar", "", "baz") + requestURL += "?timeout=1s" + fakeHandler.ValidateRequest(t, requestURL, "POST", &tmpStr) +} + +func TestDoRequestNewWayObj(t *testing.T) { + reqObj := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} + reqBodyExpected, _ := runtime.Encode(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), reqObj) + expectedObj := &v1.Service{Spec: v1.ServiceSpec{Ports: []v1.ServicePort{{ + Protocol: "TCP", + Port: 12345, + TargetPort: intstr.FromInt(12345), + }}}} + expectedBody, _ := runtime.Encode(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), expectedObj) + fakeHandler := utiltesting.FakeHandler{ + StatusCode: 200, + ResponseBody: string(expectedBody), + T: t, + } + testServer := httptest.NewServer(&fakeHandler) + defer testServer.Close() + c := testRESTClient(t, testServer) + obj, err := c.Verb("POST"). + Suffix("baz"). + Name("bar"). + Resource("foo"). + Timeout(time.Second). + Body(reqObj). + Do().Get() + if err != nil { + t.Errorf("Unexpected error: %v %#v", err, err) + return + } + if obj == nil { + t.Error("nil obj") + } else if !apiequality.Semantic.DeepDerivative(expectedObj, obj) { + t.Errorf("Expected: %#v, got %#v", expectedObj, obj) + } + tmpStr := string(reqBodyExpected) + requestURL := defaultResourcePathWithPrefix("", "foo", "", "bar/baz") + requestURL += "?timeout=1s" + fakeHandler.ValidateRequest(t, requestURL, "POST", &tmpStr) +} + +func TestDoRequestNewWayFile(t *testing.T) { + reqObj := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} + reqBodyExpected, err := runtime.Encode(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), reqObj) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + file, err := ioutil.TempFile("", "foo") + if err != nil { + t.Errorf("unexpected error: %v", err) + } + defer file.Close() + defer os.Remove(file.Name()) + + _, err = file.Write(reqBodyExpected) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + expectedObj := &v1.Service{Spec: v1.ServiceSpec{Ports: []v1.ServicePort{{ + Protocol: "TCP", + Port: 12345, + TargetPort: intstr.FromInt(12345), + }}}} + expectedBody, _ := runtime.Encode(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), expectedObj) + fakeHandler := utiltesting.FakeHandler{ + StatusCode: 200, + ResponseBody: string(expectedBody), + T: t, + } + testServer := httptest.NewServer(&fakeHandler) + defer testServer.Close() + c := testRESTClient(t, testServer) + wasCreated := true + obj, err := c.Verb("POST"). + Prefix("foo/bar", "baz"). + Timeout(time.Second). + Body(file.Name()). + Do().WasCreated(&wasCreated).Get() + if err != nil { + t.Errorf("Unexpected error: %v %#v", err, err) + return + } + if obj == nil { + t.Error("nil obj") + } else if !apiequality.Semantic.DeepDerivative(expectedObj, obj) { + t.Errorf("Expected: %#v, got %#v", expectedObj, obj) + } + if wasCreated { + t.Errorf("expected object was created") + } + tmpStr := string(reqBodyExpected) + requestURL := defaultResourcePathWithPrefix("foo/bar/baz", "", "", "") + requestURL += "?timeout=1s" + fakeHandler.ValidateRequest(t, requestURL, "POST", &tmpStr) +} + +func TestWasCreated(t *testing.T) { + reqObj := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} + reqBodyExpected, err := runtime.Encode(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), reqObj) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + expectedObj := &v1.Service{Spec: v1.ServiceSpec{Ports: []v1.ServicePort{{ + Protocol: "TCP", + Port: 12345, + TargetPort: intstr.FromInt(12345), + }}}} + expectedBody, _ := runtime.Encode(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), expectedObj) + fakeHandler := utiltesting.FakeHandler{ + StatusCode: 201, + ResponseBody: string(expectedBody), + T: t, + } + testServer := httptest.NewServer(&fakeHandler) + defer testServer.Close() + c := testRESTClient(t, testServer) + wasCreated := false + obj, err := c.Verb("PUT"). + Prefix("foo/bar", "baz"). + Timeout(time.Second). + Body(reqBodyExpected). + Do().WasCreated(&wasCreated).Get() + if err != nil { + t.Errorf("Unexpected error: %v %#v", err, err) + return + } + if obj == nil { + t.Error("nil obj") + } else if !apiequality.Semantic.DeepDerivative(expectedObj, obj) { + t.Errorf("Expected: %#v, got %#v", expectedObj, obj) + } + if !wasCreated { + t.Errorf("Expected object was created") + } + + tmpStr := string(reqBodyExpected) + requestURL := defaultResourcePathWithPrefix("foo/bar/baz", "", "", "") + requestURL += "?timeout=1s" + fakeHandler.ValidateRequest(t, requestURL, "PUT", &tmpStr) +} + +func TestVerbs(t *testing.T) { + c := testRESTClient(t, nil) + if r := c.Post(); r.verb != "POST" { + t.Errorf("Post verb is wrong") + } + if r := c.Put(); r.verb != "PUT" { + t.Errorf("Put verb is wrong") + } + if r := c.Get(); r.verb != "GET" { + t.Errorf("Get verb is wrong") + } + if r := c.Delete(); r.verb != "DELETE" { + t.Errorf("Delete verb is wrong") + } +} + +func TestAbsPath(t *testing.T) { + for i, tc := range []struct { + configPrefix string + resourcePrefix string + absPath string + wantsAbsPath string + }{ + {"/", "", "", "/"}, + {"", "", "/", "/"}, + {"", "", "/api", "/api"}, + {"", "", "/api/", "/api/"}, + {"", "", "/apis", "/apis"}, + {"", "/foo", "/bar/foo", "/bar/foo"}, + {"", "/api/foo/123", "/bar/foo", "/bar/foo"}, + {"/p1", "", "", "/p1"}, + {"/p1", "", "/", "/p1/"}, + {"/p1", "", "/api", "/p1/api"}, + {"/p1", "", "/apis", "/p1/apis"}, + {"/p1", "/r1", "/apis", "/p1/apis"}, + {"/p1", "/api/r1", "/apis", "/p1/apis"}, + {"/p1/api/p2", "", "", "/p1/api/p2"}, + {"/p1/api/p2", "", "/", "/p1/api/p2/"}, + {"/p1/api/p2", "", "/api", "/p1/api/p2/api"}, + {"/p1/api/p2", "", "/api/", "/p1/api/p2/api/"}, + {"/p1/api/p2", "/r1", "/api/", "/p1/api/p2/api/"}, + {"/p1/api/p2", "/api/r1", "/api/", "/p1/api/p2/api/"}, + } { + u, _ := url.Parse("http://localhost:123" + tc.configPrefix) + r := NewRequest(nil, "POST", u, "", ContentConfig{GroupVersion: &schema.GroupVersion{Group: "test"}}, Serializers{}, nil, nil).Prefix(tc.resourcePrefix).AbsPath(tc.absPath) + if r.pathPrefix != tc.wantsAbsPath { + t.Errorf("test case %d failed, unexpected path: %q, expected %q", i, r.pathPrefix, tc.wantsAbsPath) + } + } +} + +func TestUnacceptableParamNames(t *testing.T) { + table := []struct { + name string + testVal string + expectSuccess bool + }{ + // timeout is no longer "protected" + {"timeout", "42", true}, + } + + for _, item := range table { + c := testRESTClient(t, nil) + r := c.Get().setParam(item.name, item.testVal) + if e, a := item.expectSuccess, r.err == nil; e != a { + t.Errorf("expected %v, got %v (%v)", e, a, r.err) + } + } +} + +func TestBody(t *testing.T) { + const data = "test payload" + + obj := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} + bodyExpected, _ := runtime.Encode(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), obj) + + f, err := ioutil.TempFile("", "test_body") + if err != nil { + t.Fatalf("TempFile error: %v", err) + } + if _, err := f.WriteString(data); err != nil { + t.Fatalf("TempFile.WriteString error: %v", err) + } + f.Close() + defer os.Remove(f.Name()) + + var nilObject *v1.DeleteOptions + typedObject := interface{}(nilObject) + c := testRESTClient(t, nil) + tests := []struct { + input interface{} + expected string + headers map[string]string + }{ + {[]byte(data), data, nil}, + {f.Name(), data, nil}, + {strings.NewReader(data), data, nil}, + {obj, string(bodyExpected), map[string]string{"Content-Type": "application/json"}}, + {typedObject, "", nil}, + } + for i, tt := range tests { + r := c.Post().Body(tt.input) + if r.err != nil { + t.Errorf("%d: r.Body(%#v) error: %v", i, tt, r.err) + continue + } + if tt.headers != nil { + for k, v := range tt.headers { + if r.headers.Get(k) != v { + t.Errorf("%d: r.headers[%q] = %q; want %q", i, k, v, v) + } + } + } + + if r.body == nil { + if len(tt.expected) != 0 { + t.Errorf("%d: r.body = %q; want %q", i, r.body, tt.expected) + } + continue + } + buf := make([]byte, len(tt.expected)) + if _, err := r.body.Read(buf); err != nil { + t.Errorf("%d: r.body.Read error: %v", i, err) + continue + } + body := string(buf) + if body != tt.expected { + t.Errorf("%d: r.body = %q; want %q", i, body, tt.expected) + } + } +} + +func TestWatch(t *testing.T) { + var table = []struct { + t watch.EventType + obj runtime.Object + }{ + {watch.Added, &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "first"}}}, + {watch.Modified, &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "second"}}}, + {watch.Deleted, &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "last"}}}, + } + + testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + flusher, ok := w.(http.Flusher) + if !ok { + panic("need flusher!") + } + + w.Header().Set("Transfer-Encoding", "chunked") + w.WriteHeader(http.StatusOK) + flusher.Flush() + + encoder := restclientwatch.NewEncoder(streaming.NewEncoder(w, scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion)), scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion)) + for _, item := range table { + if err := encoder.Encode(&watch.Event{Type: item.t, Object: item.obj}); err != nil { + panic(err) + } + flusher.Flush() + } + })) + defer testServer.Close() + + s := testRESTClient(t, testServer) + watching, err := s.Get().Prefix("path/to/watch/thing").Watch() + if err != nil { + t.Fatalf("Unexpected error") + } + + for _, item := range table { + got, ok := <-watching.ResultChan() + if !ok { + t.Fatalf("Unexpected early close") + } + if e, a := item.t, got.Type; e != a { + t.Errorf("Expected %v, got %v", e, a) + } + if e, a := item.obj, got.Object; !apiequality.Semantic.DeepDerivative(e, a) { + t.Errorf("Expected %v, got %v", e, a) + } + } + + _, ok := <-watching.ResultChan() + if ok { + t.Fatal("Unexpected non-close") + } +} + +func TestStream(t *testing.T) { + expectedBody := "expected body" + + testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + flusher, ok := w.(http.Flusher) + if !ok { + panic("need flusher!") + } + w.Header().Set("Transfer-Encoding", "chunked") + w.WriteHeader(http.StatusOK) + w.Write([]byte(expectedBody)) + flusher.Flush() + })) + defer testServer.Close() + + s := testRESTClient(t, testServer) + readCloser, err := s.Get().Prefix("path/to/stream/thing").Stream() + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + defer readCloser.Close() + buf := new(bytes.Buffer) + buf.ReadFrom(readCloser) + resultBody := buf.String() + + if expectedBody != resultBody { + t.Errorf("Expected %s, got %s", expectedBody, resultBody) + } +} + +func testRESTClient(t testing.TB, srv *httptest.Server) *RESTClient { + baseURL, _ := url.Parse("http://localhost") + if srv != nil { + var err error + baseURL, err = url.Parse(srv.URL) + if err != nil { + t.Fatalf("failed to parse test URL: %v", err) + } + } + versionedAPIPath := defaultResourcePathWithPrefix("", "", "", "") + client, err := NewRESTClient(baseURL, versionedAPIPath, defaultContentConfig(), 0, 0, nil, nil) + if err != nil { + t.Fatalf("failed to create a client: %v", err) + } + return client +} + +func TestDoContext(t *testing.T) { + receivedCh := make(chan struct{}) + block := make(chan struct{}) + testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + close(receivedCh) + <-block + w.WriteHeader(http.StatusOK) + })) + defer testServer.Close() + defer close(block) + + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + go func() { + <-receivedCh + cancel() + }() + + c := testRESTClient(t, testServer) + _, err := c.Verb("GET"). + Context(ctx). + Prefix("foo"). + DoRaw() + if err == nil { + t.Fatal("Expected context cancellation error") + } +} + +func defaultResourcePathWithPrefix(prefix, resource, namespace, name string) string { + var path string + path = "/api/" + v1.SchemeGroupVersion.Version + + if prefix != "" { + path = path + "/" + prefix + } + if namespace != "" { + path = path + "/namespaces/" + namespace + } + // Resource names are lower case. + resource = strings.ToLower(resource) + if resource != "" { + path = path + "/" + resource + } + if name != "" { + path = path + "/" + name + } + return path +} diff --git a/vendor/k8s.io/client-go/rest/url_utils_test.go b/vendor/k8s.io/client-go/rest/url_utils_test.go new file mode 100644 index 000000000..6321678a4 --- /dev/null +++ b/vendor/k8s.io/client-go/rest/url_utils_test.go @@ -0,0 +1,61 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package rest + +import ( + "path" + "testing" + + "k8s.io/api/core/v1" +) + +func TestValidatesHostParameter(t *testing.T) { + testCases := []struct { + Host string + APIPath string + + URL string + Err bool + }{ + {"127.0.0.1", "", "http://127.0.0.1/" + v1.SchemeGroupVersion.Version, false}, + {"127.0.0.1:8080", "", "http://127.0.0.1:8080/" + v1.SchemeGroupVersion.Version, false}, + {"foo.bar.com", "", "http://foo.bar.com/" + v1.SchemeGroupVersion.Version, false}, + {"http://host/prefix", "", "http://host/prefix/" + v1.SchemeGroupVersion.Version, false}, + {"http://host", "", "http://host/" + v1.SchemeGroupVersion.Version, false}, + {"http://host", "/", "http://host/" + v1.SchemeGroupVersion.Version, false}, + {"http://host", "/other", "http://host/other/" + v1.SchemeGroupVersion.Version, false}, + {"host/server", "", "", true}, + } + for i, testCase := range testCases { + u, versionedAPIPath, err := DefaultServerURL(testCase.Host, testCase.APIPath, v1.SchemeGroupVersion, false) + switch { + case err == nil && testCase.Err: + t.Errorf("expected error but was nil") + continue + case err != nil && !testCase.Err: + t.Errorf("unexpected error %v", err) + continue + case err != nil: + continue + } + u.Path = path.Join(u.Path, versionedAPIPath) + if e, a := testCase.URL, u.String(); e != a { + t.Errorf("%d: expected host %s, got %s", i, e, a) + continue + } + } +} diff --git a/vendor/k8s.io/client-go/rest/urlbackoff_test.go b/vendor/k8s.io/client-go/rest/urlbackoff_test.go new file mode 100644 index 000000000..c5f439238 --- /dev/null +++ b/vendor/k8s.io/client-go/rest/urlbackoff_test.go @@ -0,0 +1,79 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package rest + +import ( + "net/url" + "testing" + "time" + + "k8s.io/client-go/util/flowcontrol" +) + +func parse(raw string) *url.URL { + theUrl, _ := url.Parse(raw) + return theUrl +} + +func TestURLBackoffFunctionalityCollisions(t *testing.T) { + myBackoff := &URLBackoff{ + Backoff: flowcontrol.NewBackOff(1*time.Second, 60*time.Second), + } + + // Add some noise and make sure backoff for a clean URL is zero. + myBackoff.UpdateBackoff(parse("http://100.200.300.400:8080"), nil, 500) + + myBackoff.UpdateBackoff(parse("http://1.2.3.4:8080"), nil, 500) + + if myBackoff.CalculateBackoff(parse("http://1.2.3.4:100")) > 0 { + t.Errorf("URLs are colliding in the backoff map!") + } +} + +// TestURLBackoffFunctionality generally tests the URLBackoff wrapper. We avoid duplicating tests from backoff and request. +func TestURLBackoffFunctionality(t *testing.T) { + myBackoff := &URLBackoff{ + Backoff: flowcontrol.NewBackOff(1*time.Second, 60*time.Second), + } + + // Now test that backoff increases, then recovers. + // 200 and 300 should both result in clearing the backoff. + // all others like 429 should result in increased backoff. + seconds := []int{0, + 1, 2, 4, 8, 0, + 1, 2} + returnCodes := []int{ + 429, 500, 501, 502, 300, + 500, 501, 502, + } + + if len(seconds) != len(returnCodes) { + t.Fatalf("responseCode to backoff arrays should be the same length... sanity check failed.") + } + + for i, sec := range seconds { + backoffSec := myBackoff.CalculateBackoff(parse("http://1.2.3.4:100")) + if backoffSec < time.Duration(sec)*time.Second || backoffSec > time.Duration(sec+5)*time.Second { + t.Errorf("Backoff out of range %v: %v %v", i, sec, backoffSec) + } + myBackoff.UpdateBackoff(parse("http://1.2.3.4:100/responseCodeForFuncTest"), nil, returnCodes[i]) + } + + if myBackoff.CalculateBackoff(parse("http://1.2.3.4:100")) == 0 { + t.Errorf("The final return code %v should have resulted in a backoff ! ", returnCodes[7]) + } +} diff --git a/vendor/k8s.io/client-go/rest/watch/decoder_test.go b/vendor/k8s.io/client-go/rest/watch/decoder_test.go new file mode 100644 index 000000000..2d29d437d --- /dev/null +++ b/vendor/k8s.io/client-go/rest/watch/decoder_test.go @@ -0,0 +1,123 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package versioned_test + +import ( + "encoding/json" + "io" + "testing" + "time" + + "k8s.io/api/core/v1" + apiequality "k8s.io/apimachinery/pkg/api/equality" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/serializer" + runtimejson "k8s.io/apimachinery/pkg/runtime/serializer/json" + "k8s.io/apimachinery/pkg/runtime/serializer/streaming" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/kubernetes/scheme" + restclientwatch "k8s.io/client-go/rest/watch" +) + +// getDecoder mimics how k8s.io/client-go/rest.createSerializers creates a decoder +func getDecoder() runtime.Decoder { + jsonSerializer := runtimejson.NewSerializer(runtimejson.DefaultMetaFactory, scheme.Scheme, scheme.Scheme, false) + directCodecFactory := serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + return directCodecFactory.DecoderToVersion(jsonSerializer, v1.SchemeGroupVersion) +} + +func TestDecoder(t *testing.T) { + table := []watch.EventType{watch.Added, watch.Deleted, watch.Modified, watch.Error} + + for _, eventType := range table { + out, in := io.Pipe() + + decoder := restclientwatch.NewDecoder(streaming.NewDecoder(out, getDecoder()), getDecoder()) + + expect := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} + encoder := json.NewEncoder(in) + go func() { + data, err := runtime.Encode(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), expect) + if err != nil { + t.Fatalf("Unexpected error %v", err) + } + event := metav1.WatchEvent{ + Type: string(eventType), + Object: runtime.RawExtension{Raw: json.RawMessage(data)}, + } + if err := encoder.Encode(&event); err != nil { + t.Errorf("Unexpected error %v", err) + } + in.Close() + }() + + done := make(chan struct{}) + go func() { + action, got, err := decoder.Decode() + if err != nil { + t.Fatalf("Unexpected error %v", err) + } + if e, a := eventType, action; e != a { + t.Errorf("Expected %v, got %v", e, a) + } + if e, a := expect, got; !apiequality.Semantic.DeepDerivative(e, a) { + t.Errorf("Expected %v, got %v", e, a) + } + t.Logf("Exited read") + close(done) + }() + <-done + + done = make(chan struct{}) + go func() { + _, _, err := decoder.Decode() + if err == nil { + t.Errorf("Unexpected nil error") + } + close(done) + }() + <-done + + decoder.Close() + } +} + +func TestDecoder_SourceClose(t *testing.T) { + out, in := io.Pipe() + decoder := restclientwatch.NewDecoder(streaming.NewDecoder(out, getDecoder()), getDecoder()) + + done := make(chan struct{}) + + go func() { + _, _, err := decoder.Decode() + if err == nil { + t.Errorf("Unexpected nil error") + } + close(done) + }() + + in.Close() + + select { + case <-done: + break + case <-time.After(wait.ForeverTestTimeout): + t.Error("Timeout") + } +} diff --git a/vendor/k8s.io/client-go/rest/watch/encoder_test.go b/vendor/k8s.io/client-go/rest/watch/encoder_test.go new file mode 100644 index 000000000..1388d1cc6 --- /dev/null +++ b/vendor/k8s.io/client-go/rest/watch/encoder_test.go @@ -0,0 +1,84 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package versioned_test + +import ( + "bytes" + "io/ioutil" + "testing" + + "k8s.io/api/core/v1" + apiequality "k8s.io/apimachinery/pkg/api/equality" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/serializer" + runtimejson "k8s.io/apimachinery/pkg/runtime/serializer/json" + "k8s.io/apimachinery/pkg/runtime/serializer/streaming" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/kubernetes/scheme" + restclientwatch "k8s.io/client-go/rest/watch" +) + +// getEncoder mimics how k8s.io/client-go/rest.createSerializers creates a encoder +func getEncoder() runtime.Encoder { + jsonSerializer := runtimejson.NewSerializer(runtimejson.DefaultMetaFactory, scheme.Scheme, scheme.Scheme, false) + directCodecFactory := serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + return directCodecFactory.EncoderForVersion(jsonSerializer, v1.SchemeGroupVersion) +} + +func TestEncodeDecodeRoundTrip(t *testing.T) { + testCases := []struct { + Type watch.EventType + Object runtime.Object + }{ + { + watch.Added, + &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, + }, + { + watch.Modified, + &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, + }, + { + watch.Deleted, + &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, + }, + } + for i, testCase := range testCases { + buf := &bytes.Buffer{} + + encoder := restclientwatch.NewEncoder(streaming.NewEncoder(buf, getEncoder()), getEncoder()) + if err := encoder.Encode(&watch.Event{Type: testCase.Type, Object: testCase.Object}); err != nil { + t.Errorf("%d: unexpected error: %v", i, err) + continue + } + + rc := ioutil.NopCloser(buf) + decoder := restclientwatch.NewDecoder(streaming.NewDecoder(rc, getDecoder()), getDecoder()) + event, obj, err := decoder.Decode() + if err != nil { + t.Errorf("%d: unexpected error: %v", i, err) + continue + } + if !apiequality.Semantic.DeepDerivative(testCase.Object, obj) { + t.Errorf("%d: expected %#v, got %#v", i, testCase.Object, obj) + } + if event != testCase.Type { + t.Errorf("%d: unexpected type: %#v", i, event) + } + } +} diff --git a/vendor/k8s.io/client-go/tools/auth/clientauth_test.go b/vendor/k8s.io/client-go/tools/auth/clientauth_test.go new file mode 100644 index 000000000..11f7369de --- /dev/null +++ b/vendor/k8s.io/client-go/tools/auth/clientauth_test.go @@ -0,0 +1,69 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package auth_test + +import ( + "io/ioutil" + "os" + "reflect" + "testing" + + clientauth "k8s.io/client-go/tools/auth" +) + +func TestLoadFromFile(t *testing.T) { + loadAuthInfoTests := []struct { + authData string + authInfo *clientauth.Info + expectErr bool + }{ + { + `{"user": "user", "password": "pass"}`, + &clientauth.Info{User: "user", Password: "pass"}, + false, + }, + { + "", nil, true, + }, + } + for _, loadAuthInfoTest := range loadAuthInfoTests { + tt := loadAuthInfoTest + aifile, err := ioutil.TempFile("", "testAuthInfo") + if err != nil { + t.Errorf("Unexpected error: %v", err) + } + if tt.authData != "missing" { + defer os.Remove(aifile.Name()) + defer aifile.Close() + _, err = aifile.WriteString(tt.authData) + if err != nil { + t.Errorf("Unexpected error: %v", err) + } + } else { + aifile.Close() + os.Remove(aifile.Name()) + } + authInfo, err := clientauth.LoadFromFile(aifile.Name()) + gotErr := err != nil + if gotErr != tt.expectErr { + t.Errorf("expected errorness: %v, actual errorness: %v", tt.expectErr, gotErr) + } + if !reflect.DeepEqual(authInfo, tt.authInfo) { + t.Errorf("Expected %v, got %v", tt.authInfo, authInfo) + } + } +} diff --git a/vendor/k8s.io/client-go/tools/cache/controller_test.go b/vendor/k8s.io/client-go/tools/cache/controller_test.go new file mode 100644 index 000000000..a7a70533f --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/controller_test.go @@ -0,0 +1,405 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cache + +import ( + "fmt" + "math/rand" + "sync" + "testing" + "time" + + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apimachinery/pkg/watch" + fcache "k8s.io/client-go/tools/cache/testing" + + "github.com/google/gofuzz" +) + +func Example() { + // source simulates an apiserver object endpoint. + source := fcache.NewFakeControllerSource() + + // This will hold the downstream state, as we know it. + downstream := NewStore(DeletionHandlingMetaNamespaceKeyFunc) + + // This will hold incoming changes. Note how we pass downstream in as a + // KeyLister, that way resync operations will result in the correct set + // of update/delete deltas. + fifo := NewDeltaFIFO(MetaNamespaceKeyFunc, nil, downstream) + + // Let's do threadsafe output to get predictable test results. + deletionCounter := make(chan string, 1000) + + cfg := &Config{ + Queue: fifo, + ListerWatcher: source, + ObjectType: &v1.Pod{}, + FullResyncPeriod: time.Millisecond * 100, + RetryOnError: false, + + // Let's implement a simple controller that just deletes + // everything that comes in. + Process: func(obj interface{}) error { + // Obj is from the Pop method of the Queue we make above. + newest := obj.(Deltas).Newest() + + if newest.Type != Deleted { + // Update our downstream store. + err := downstream.Add(newest.Object) + if err != nil { + return err + } + + // Delete this object. + source.Delete(newest.Object.(runtime.Object)) + } else { + // Update our downstream store. + err := downstream.Delete(newest.Object) + if err != nil { + return err + } + + // fifo's KeyOf is easiest, because it handles + // DeletedFinalStateUnknown markers. + key, err := fifo.KeyOf(newest.Object) + if err != nil { + return err + } + + // Report this deletion. + deletionCounter <- key + } + return nil + }, + } + + // Create the controller and run it until we close stop. + stop := make(chan struct{}) + defer close(stop) + go New(cfg).Run(stop) + + // Let's add a few objects to the source. + testIDs := []string{"a-hello", "b-controller", "c-framework"} + for _, name := range testIDs { + // Note that these pods are not valid-- the fake source doesn't + // call validation or anything. + source.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: name}}) + } + + // Let's wait for the controller to process the things we just added. + outputSet := sets.String{} + for i := 0; i < len(testIDs); i++ { + outputSet.Insert(<-deletionCounter) + } + + for _, key := range outputSet.List() { + fmt.Println(key) + } + // Output: + // a-hello + // b-controller + // c-framework +} + +func ExampleNewInformer() { + // source simulates an apiserver object endpoint. + source := fcache.NewFakeControllerSource() + + // Let's do threadsafe output to get predictable test results. + deletionCounter := make(chan string, 1000) + + // Make a controller that immediately deletes anything added to it, and + // logs anything deleted. + _, controller := NewInformer( + source, + &v1.Pod{}, + time.Millisecond*100, + ResourceEventHandlerFuncs{ + AddFunc: func(obj interface{}) { + source.Delete(obj.(runtime.Object)) + }, + DeleteFunc: func(obj interface{}) { + key, err := DeletionHandlingMetaNamespaceKeyFunc(obj) + if err != nil { + key = "oops something went wrong with the key" + } + + // Report this deletion. + deletionCounter <- key + }, + }, + ) + + // Run the controller and run it until we close stop. + stop := make(chan struct{}) + defer close(stop) + go controller.Run(stop) + + // Let's add a few objects to the source. + testIDs := []string{"a-hello", "b-controller", "c-framework"} + for _, name := range testIDs { + // Note that these pods are not valid-- the fake source doesn't + // call validation or anything. + source.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: name}}) + } + + // Let's wait for the controller to process the things we just added. + outputSet := sets.String{} + for i := 0; i < len(testIDs); i++ { + outputSet.Insert(<-deletionCounter) + } + + for _, key := range outputSet.List() { + fmt.Println(key) + } + // Output: + // a-hello + // b-controller + // c-framework +} + +func TestHammerController(t *testing.T) { + // This test executes a bunch of requests through the fake source and + // controller framework to make sure there's no locking/threading + // errors. If an error happens, it should hang forever or trigger the + // race detector. + + // source simulates an apiserver object endpoint. + source := fcache.NewFakeControllerSource() + + // Let's do threadsafe output to get predictable test results. + outputSetLock := sync.Mutex{} + // map of key to operations done on the key + outputSet := map[string][]string{} + + recordFunc := func(eventType string, obj interface{}) { + key, err := DeletionHandlingMetaNamespaceKeyFunc(obj) + if err != nil { + t.Errorf("something wrong with key: %v", err) + key = "oops something went wrong with the key" + } + + // Record some output when items are deleted. + outputSetLock.Lock() + defer outputSetLock.Unlock() + outputSet[key] = append(outputSet[key], eventType) + } + + // Make a controller which just logs all the changes it gets. + _, controller := NewInformer( + source, + &v1.Pod{}, + time.Millisecond*100, + ResourceEventHandlerFuncs{ + AddFunc: func(obj interface{}) { recordFunc("add", obj) }, + UpdateFunc: func(oldObj, newObj interface{}) { recordFunc("update", newObj) }, + DeleteFunc: func(obj interface{}) { recordFunc("delete", obj) }, + }, + ) + + if controller.HasSynced() { + t.Errorf("Expected HasSynced() to return false before we started the controller") + } + + // Run the controller and run it until we close stop. + stop := make(chan struct{}) + go controller.Run(stop) + + // Let's wait for the controller to do its initial sync + wait.Poll(100*time.Millisecond, wait.ForeverTestTimeout, func() (bool, error) { + return controller.HasSynced(), nil + }) + if !controller.HasSynced() { + t.Errorf("Expected HasSynced() to return true after the initial sync") + } + + wg := sync.WaitGroup{} + const threads = 3 + wg.Add(threads) + for i := 0; i < threads; i++ { + go func() { + defer wg.Done() + // Let's add a few objects to the source. + currentNames := sets.String{} + rs := rand.NewSource(rand.Int63()) + f := fuzz.New().NilChance(.5).NumElements(0, 2).RandSource(rs) + r := rand.New(rs) // Mustn't use r and f concurrently! + for i := 0; i < 100; i++ { + var name string + var isNew bool + if currentNames.Len() == 0 || r.Intn(3) == 1 { + f.Fuzz(&name) + isNew = true + } else { + l := currentNames.List() + name = l[r.Intn(len(l))] + } + + pod := &v1.Pod{} + f.Fuzz(pod) + pod.ObjectMeta.Name = name + pod.ObjectMeta.Namespace = "default" + // Add, update, or delete randomly. + // Note that these pods are not valid-- the fake source doesn't + // call validation or perform any other checking. + if isNew { + currentNames.Insert(name) + source.Add(pod) + continue + } + switch r.Intn(2) { + case 0: + currentNames.Insert(name) + source.Modify(pod) + case 1: + currentNames.Delete(name) + source.Delete(pod) + } + } + }() + } + wg.Wait() + + // Let's wait for the controller to finish processing the things we just added. + // TODO: look in the queue to see how many items need to be processed. + time.Sleep(100 * time.Millisecond) + close(stop) + + // TODO: Verify that no goroutines were leaked here and that everything shut + // down cleanly. + + outputSetLock.Lock() + t.Logf("got: %#v", outputSet) +} + +func TestUpdate(t *testing.T) { + // This test is going to exercise the various paths that result in a + // call to update. + + // source simulates an apiserver object endpoint. + source := fcache.NewFakeControllerSource() + + const ( + FROM = "from" + TO = "to" + ) + + // These are the transitions we expect to see; because this is + // asynchronous, there are a lot of valid possibilities. + type pair struct{ from, to string } + allowedTransitions := map[pair]bool{ + {FROM, TO}: true, + + // Because a resync can happen when we've already observed one + // of the above but before the item is deleted. + {TO, TO}: true, + // Because a resync could happen before we observe an update. + {FROM, FROM}: true, + } + + pod := func(name, check string, final bool) *v1.Pod { + p := &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Labels: map[string]string{"check": check}, + }, + } + if final { + p.Labels["final"] = "true" + } + return p + } + deletePod := func(p *v1.Pod) bool { + return p.Labels["final"] == "true" + } + + tests := []func(string){ + func(name string) { + name = "a-" + name + source.Add(pod(name, FROM, false)) + source.Modify(pod(name, TO, true)) + }, + } + + const threads = 3 + + var testDoneWG sync.WaitGroup + testDoneWG.Add(threads * len(tests)) + + // Make a controller that deletes things once it observes an update. + // It calls Done() on the wait group on deletions so we can tell when + // everything we've added has been deleted. + watchCh := make(chan struct{}) + _, controller := NewInformer( + &testLW{ + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + watch, err := source.Watch(options) + close(watchCh) + return watch, err + }, + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return source.List(options) + }, + }, + &v1.Pod{}, + 0, + ResourceEventHandlerFuncs{ + UpdateFunc: func(oldObj, newObj interface{}) { + o, n := oldObj.(*v1.Pod), newObj.(*v1.Pod) + from, to := o.Labels["check"], n.Labels["check"] + if !allowedTransitions[pair{from, to}] { + t.Errorf("observed transition %q -> %q for %v", from, to, n.Name) + } + if deletePod(n) { + source.Delete(n) + } + }, + DeleteFunc: func(obj interface{}) { + testDoneWG.Done() + }, + }, + ) + + // Run the controller and run it until we close stop. + // Once Run() is called, calls to testDoneWG.Done() might start, so + // all testDoneWG.Add() calls must happen before this point + stop := make(chan struct{}) + go controller.Run(stop) + <-watchCh + + // run every test a few times, in parallel + var wg sync.WaitGroup + wg.Add(threads * len(tests)) + for i := 0; i < threads; i++ { + for j, f := range tests { + go func(name string, f func(string)) { + defer wg.Done() + f(name) + }(fmt.Sprintf("%v-%v", i, j), f) + } + } + wg.Wait() + + // Let's wait for the controller to process the things we just added. + testDoneWG.Wait() + close(stop) +} diff --git a/vendor/k8s.io/client-go/tools/cache/delta_fifo_test.go b/vendor/k8s.io/client-go/tools/cache/delta_fifo_test.go new file mode 100644 index 000000000..87bbdaeab --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/delta_fifo_test.go @@ -0,0 +1,533 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cache + +import ( + "fmt" + "reflect" + "testing" + "time" +) + +// helper function to reduce stuttering +func testPop(f *DeltaFIFO) testFifoObject { + return Pop(f).(Deltas).Newest().Object.(testFifoObject) +} + +// keyLookupFunc adapts a raw function to be a KeyLookup. +type keyLookupFunc func() []testFifoObject + +// ListKeys just calls kl. +func (kl keyLookupFunc) ListKeys() []string { + result := []string{} + for _, fifoObj := range kl() { + result = append(result, fifoObj.name) + } + return result +} + +// GetByKey returns the key if it exists in the list returned by kl. +func (kl keyLookupFunc) GetByKey(key string) (interface{}, bool, error) { + for _, v := range kl() { + if v.name == key { + return v, true, nil + } + } + return nil, false, nil +} + +func TestDeltaFIFO_basic(t *testing.T) { + f := NewDeltaFIFO(testFifoObjectKeyFunc, nil, nil) + const amount = 500 + go func() { + for i := 0; i < amount; i++ { + f.Add(mkFifoObj(string([]rune{'a', rune(i)}), i+1)) + } + }() + go func() { + for u := uint64(0); u < amount; u++ { + f.Add(mkFifoObj(string([]rune{'b', rune(u)}), u+1)) + } + }() + + lastInt := int(0) + lastUint := uint64(0) + for i := 0; i < amount*2; i++ { + switch obj := testPop(f).val.(type) { + case int: + if obj <= lastInt { + t.Errorf("got %v (int) out of order, last was %v", obj, lastInt) + } + lastInt = obj + case uint64: + if obj <= lastUint { + t.Errorf("got %v (uint) out of order, last was %v", obj, lastUint) + } else { + lastUint = obj + } + default: + t.Fatalf("unexpected type %#v", obj) + } + } +} + +func TestDeltaFIFO_requeueOnPop(t *testing.T) { + f := NewDeltaFIFO(testFifoObjectKeyFunc, nil, nil) + + f.Add(mkFifoObj("foo", 10)) + _, err := f.Pop(func(obj interface{}) error { + if obj.(Deltas)[0].Object.(testFifoObject).name != "foo" { + t.Fatalf("unexpected object: %#v", obj) + } + return ErrRequeue{Err: nil} + }) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if _, ok, err := f.GetByKey("foo"); !ok || err != nil { + t.Fatalf("object should have been requeued: %t %v", ok, err) + } + + _, err = f.Pop(func(obj interface{}) error { + if obj.(Deltas)[0].Object.(testFifoObject).name != "foo" { + t.Fatalf("unexpected object: %#v", obj) + } + return ErrRequeue{Err: fmt.Errorf("test error")} + }) + if err == nil || err.Error() != "test error" { + t.Fatalf("unexpected error: %v", err) + } + if _, ok, err := f.GetByKey("foo"); !ok || err != nil { + t.Fatalf("object should have been requeued: %t %v", ok, err) + } + + _, err = f.Pop(func(obj interface{}) error { + if obj.(Deltas)[0].Object.(testFifoObject).name != "foo" { + t.Fatalf("unexpected object: %#v", obj) + } + return nil + }) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if _, ok, err := f.GetByKey("foo"); ok || err != nil { + t.Fatalf("object should have been removed: %t %v", ok, err) + } +} + +func TestDeltaFIFO_compressorWorks(t *testing.T) { + oldestTypes := []DeltaType{} + f := NewDeltaFIFO( + testFifoObjectKeyFunc, + // This function just keeps the most recent delta + // and puts deleted ones in the list. + DeltaCompressorFunc(func(d Deltas) Deltas { + if n := len(d); n > 1 { + oldestTypes = append(oldestTypes, d[0].Type) + d = d[1:] + } + return d + }), + nil, + ) + if f.HasSynced() { + t.Errorf("Expected HasSynced to be false before completion of initial population") + } + f.Add(mkFifoObj("foo", 10)) + f.Update(mkFifoObj("foo", 12)) + f.Replace([]interface{}{mkFifoObj("foo", 20)}, "0") + f.Delete(mkFifoObj("foo", 22)) + f.Add(mkFifoObj("foo", 25)) // flush the last one out + expect := []DeltaType{Added, Updated, Sync, Deleted} + if e, a := expect, oldestTypes; !reflect.DeepEqual(e, a) { + t.Errorf("Expected %#v, got %#v", e, a) + } + if e, a := (Deltas{{Added, mkFifoObj("foo", 25)}}), Pop(f).(Deltas); !reflect.DeepEqual(e, a) { + t.Fatalf("Expected %#v, got %#v", e, a) + } + if !f.HasSynced() { + t.Errorf("Expected HasSynced to be true after completion of initial population") + } +} + +func TestDeltaFIFO_addUpdate(t *testing.T) { + f := NewDeltaFIFO(testFifoObjectKeyFunc, nil, nil) + f.Add(mkFifoObj("foo", 10)) + f.Update(mkFifoObj("foo", 12)) + f.Delete(mkFifoObj("foo", 15)) + + if e, a := []interface{}{mkFifoObj("foo", 15)}, f.List(); !reflect.DeepEqual(e, a) { + t.Errorf("Expected %+v, got %+v", e, a) + } + if e, a := []string{"foo"}, f.ListKeys(); !reflect.DeepEqual(e, a) { + t.Errorf("Expected %+v, got %+v", e, a) + } + + got := make(chan testFifoObject, 2) + go func() { + for { + obj := testPop(f) + t.Logf("got a thing %#v", obj) + t.Logf("D len: %v", len(f.queue)) + got <- obj + } + }() + + first := <-got + if e, a := 15, first.val; e != a { + t.Errorf("Didn't get updated value (%v), got %v", e, a) + } + select { + case unexpected := <-got: + t.Errorf("Got second value %v", unexpected.val) + case <-time.After(50 * time.Millisecond): + } + _, exists, _ := f.Get(mkFifoObj("foo", "")) + if exists { + t.Errorf("item did not get removed") + } +} + +func TestDeltaFIFO_enqueueingNoLister(t *testing.T) { + f := NewDeltaFIFO(testFifoObjectKeyFunc, nil, nil) + f.Add(mkFifoObj("foo", 10)) + f.Update(mkFifoObj("bar", 15)) + f.Add(mkFifoObj("qux", 17)) + f.Delete(mkFifoObj("qux", 18)) + + // This delete does not enqueue anything because baz doesn't exist. + f.Delete(mkFifoObj("baz", 20)) + + expectList := []int{10, 15, 18} + for _, expect := range expectList { + if e, a := expect, testPop(f).val; e != a { + t.Errorf("Didn't get updated value (%v), got %v", e, a) + } + } + if e, a := 0, len(f.items); e != a { + t.Errorf("queue unexpectedly not empty: %v != %v\n%#v", e, a, f.items) + } +} + +func TestDeltaFIFO_enqueueingWithLister(t *testing.T) { + f := NewDeltaFIFO( + testFifoObjectKeyFunc, + nil, + keyLookupFunc(func() []testFifoObject { + return []testFifoObject{mkFifoObj("foo", 5), mkFifoObj("bar", 6), mkFifoObj("baz", 7)} + }), + ) + f.Add(mkFifoObj("foo", 10)) + f.Update(mkFifoObj("bar", 15)) + + // This delete does enqueue the deletion, because "baz" is in the key lister. + f.Delete(mkFifoObj("baz", 20)) + + expectList := []int{10, 15, 20} + for _, expect := range expectList { + if e, a := expect, testPop(f).val; e != a { + t.Errorf("Didn't get updated value (%v), got %v", e, a) + } + } + if e, a := 0, len(f.items); e != a { + t.Errorf("queue unexpectedly not empty: %v != %v", e, a) + } +} + +func TestDeltaFIFO_addReplace(t *testing.T) { + f := NewDeltaFIFO(testFifoObjectKeyFunc, nil, nil) + f.Add(mkFifoObj("foo", 10)) + f.Replace([]interface{}{mkFifoObj("foo", 15)}, "0") + got := make(chan testFifoObject, 2) + go func() { + for { + got <- testPop(f) + } + }() + + first := <-got + if e, a := 15, first.val; e != a { + t.Errorf("Didn't get updated value (%v), got %v", e, a) + } + select { + case unexpected := <-got: + t.Errorf("Got second value %v", unexpected.val) + case <-time.After(50 * time.Millisecond): + } + _, exists, _ := f.Get(mkFifoObj("foo", "")) + if exists { + t.Errorf("item did not get removed") + } +} + +func TestDeltaFIFO_ResyncNonExisting(t *testing.T) { + f := NewDeltaFIFO( + testFifoObjectKeyFunc, + nil, + keyLookupFunc(func() []testFifoObject { + return []testFifoObject{mkFifoObj("foo", 5)} + }), + ) + f.Delete(mkFifoObj("foo", 10)) + f.Resync() + + deltas := f.items["foo"] + if len(deltas) != 1 { + t.Fatalf("unexpected deltas length: %v", deltas) + } + if deltas[0].Type != Deleted { + t.Errorf("unexpected delta: %v", deltas[0]) + } +} + +func TestDeltaFIFO_DeleteExistingNonPropagated(t *testing.T) { + f := NewDeltaFIFO( + testFifoObjectKeyFunc, + nil, + keyLookupFunc(func() []testFifoObject { + return []testFifoObject{} + }), + ) + f.Add(mkFifoObj("foo", 5)) + f.Delete(mkFifoObj("foo", 6)) + + deltas := f.items["foo"] + if len(deltas) != 2 { + t.Fatalf("unexpected deltas length: %v", deltas) + } + if deltas[len(deltas)-1].Type != Deleted { + t.Errorf("unexpected delta: %v", deltas[len(deltas)-1]) + } +} + +func TestDeltaFIFO_ReplaceMakesDeletions(t *testing.T) { + f := NewDeltaFIFO( + testFifoObjectKeyFunc, + nil, + keyLookupFunc(func() []testFifoObject { + return []testFifoObject{mkFifoObj("foo", 5), mkFifoObj("bar", 6), mkFifoObj("baz", 7)} + }), + ) + f.Delete(mkFifoObj("baz", 10)) + f.Replace([]interface{}{mkFifoObj("foo", 5)}, "0") + + expectedList := []Deltas{ + {{Deleted, mkFifoObj("baz", 10)}}, + {{Sync, mkFifoObj("foo", 5)}}, + // Since "bar" didn't have a delete event and wasn't in the Replace list + // it should get a tombstone key with the right Obj. + {{Deleted, DeletedFinalStateUnknown{Key: "bar", Obj: mkFifoObj("bar", 6)}}}, + } + + for _, expected := range expectedList { + cur := Pop(f).(Deltas) + if e, a := expected, cur; !reflect.DeepEqual(e, a) { + t.Errorf("Expected %#v, got %#v", e, a) + } + } +} + +func TestDeltaFIFO_UpdateResyncRace(t *testing.T) { + f := NewDeltaFIFO( + testFifoObjectKeyFunc, + nil, + keyLookupFunc(func() []testFifoObject { + return []testFifoObject{mkFifoObj("foo", 5)} + }), + ) + f.Update(mkFifoObj("foo", 6)) + f.Resync() + + expectedList := []Deltas{ + {{Updated, mkFifoObj("foo", 6)}}, + } + + for _, expected := range expectedList { + cur := Pop(f).(Deltas) + if e, a := expected, cur; !reflect.DeepEqual(e, a) { + t.Errorf("Expected %#v, got %#v", e, a) + } + } +} + +func TestDeltaFIFO_HasSyncedCorrectOnDeletion(t *testing.T) { + f := NewDeltaFIFO( + testFifoObjectKeyFunc, + nil, + keyLookupFunc(func() []testFifoObject { + return []testFifoObject{mkFifoObj("foo", 5), mkFifoObj("bar", 6), mkFifoObj("baz", 7)} + }), + ) + f.Replace([]interface{}{mkFifoObj("foo", 5)}, "0") + + expectedList := []Deltas{ + {{Sync, mkFifoObj("foo", 5)}}, + // Since "bar" didn't have a delete event and wasn't in the Replace list + // it should get a tombstone key with the right Obj. + {{Deleted, DeletedFinalStateUnknown{Key: "bar", Obj: mkFifoObj("bar", 6)}}}, + } + + for _, expected := range expectedList { + if f.HasSynced() { + t.Errorf("Expected HasSynced to be false") + } + cur := Pop(f).(Deltas) + if e, a := expected, cur; !reflect.DeepEqual(e, a) { + t.Errorf("Expected %#v, got %#v", e, a) + } + } + if f.HasSynced() { + t.Errorf("Expected HasSynced to be true") + } +} + +func TestDeltaFIFO_detectLineJumpers(t *testing.T) { + f := NewDeltaFIFO(testFifoObjectKeyFunc, nil, nil) + + f.Add(mkFifoObj("foo", 10)) + f.Add(mkFifoObj("bar", 1)) + f.Add(mkFifoObj("foo", 11)) + f.Add(mkFifoObj("foo", 13)) + f.Add(mkFifoObj("zab", 30)) + + if e, a := 13, testPop(f).val; a != e { + t.Fatalf("expected %d, got %d", e, a) + } + + f.Add(mkFifoObj("foo", 14)) // ensure foo doesn't jump back in line + + if e, a := 1, testPop(f).val; a != e { + t.Fatalf("expected %d, got %d", e, a) + } + + if e, a := 30, testPop(f).val; a != e { + t.Fatalf("expected %d, got %d", e, a) + } + + if e, a := 14, testPop(f).val; a != e { + t.Fatalf("expected %d, got %d", e, a) + } +} + +func TestDeltaFIFO_addIfNotPresent(t *testing.T) { + f := NewDeltaFIFO(testFifoObjectKeyFunc, nil, nil) + + f.Add(mkFifoObj("b", 3)) + b3 := Pop(f) + f.Add(mkFifoObj("c", 4)) + c4 := Pop(f) + if e, a := 0, len(f.items); e != a { + t.Fatalf("Expected %v, got %v items in queue", e, a) + } + + f.Add(mkFifoObj("a", 1)) + f.Add(mkFifoObj("b", 2)) + f.AddIfNotPresent(b3) + f.AddIfNotPresent(c4) + + if e, a := 3, len(f.items); a != e { + t.Fatalf("expected queue length %d, got %d", e, a) + } + + expectedValues := []int{1, 2, 4} + for _, expected := range expectedValues { + if actual := testPop(f).val; actual != expected { + t.Fatalf("expected value %d, got %d", expected, actual) + } + } +} + +func TestDeltaFIFO_KeyOf(t *testing.T) { + f := DeltaFIFO{keyFunc: testFifoObjectKeyFunc} + + table := []struct { + obj interface{} + key string + }{ + {obj: testFifoObject{name: "A"}, key: "A"}, + {obj: DeletedFinalStateUnknown{Key: "B", Obj: nil}, key: "B"}, + {obj: Deltas{{Object: testFifoObject{name: "C"}}}, key: "C"}, + {obj: Deltas{{Object: DeletedFinalStateUnknown{Key: "D", Obj: nil}}}, key: "D"}, + } + + for _, item := range table { + got, err := f.KeyOf(item.obj) + if err != nil { + t.Errorf("Unexpected error for %q: %v", item.obj, err) + continue + } + if e, a := item.key, got; e != a { + t.Errorf("Expected %v, got %v", e, a) + } + } +} + +func TestDeltaFIFO_HasSynced(t *testing.T) { + tests := []struct { + actions []func(f *DeltaFIFO) + expectedSynced bool + }{ + { + actions: []func(f *DeltaFIFO){}, + expectedSynced: false, + }, + { + actions: []func(f *DeltaFIFO){ + func(f *DeltaFIFO) { f.Add(mkFifoObj("a", 1)) }, + }, + expectedSynced: true, + }, + { + actions: []func(f *DeltaFIFO){ + func(f *DeltaFIFO) { f.Replace([]interface{}{}, "0") }, + }, + expectedSynced: true, + }, + { + actions: []func(f *DeltaFIFO){ + func(f *DeltaFIFO) { f.Replace([]interface{}{mkFifoObj("a", 1), mkFifoObj("b", 2)}, "0") }, + }, + expectedSynced: false, + }, + { + actions: []func(f *DeltaFIFO){ + func(f *DeltaFIFO) { f.Replace([]interface{}{mkFifoObj("a", 1), mkFifoObj("b", 2)}, "0") }, + func(f *DeltaFIFO) { Pop(f) }, + }, + expectedSynced: false, + }, + { + actions: []func(f *DeltaFIFO){ + func(f *DeltaFIFO) { f.Replace([]interface{}{mkFifoObj("a", 1), mkFifoObj("b", 2)}, "0") }, + func(f *DeltaFIFO) { Pop(f) }, + func(f *DeltaFIFO) { Pop(f) }, + }, + expectedSynced: true, + }, + } + + for i, test := range tests { + f := NewDeltaFIFO(testFifoObjectKeyFunc, nil, nil) + + for _, action := range test.actions { + action(f) + } + if e, a := test.expectedSynced, f.HasSynced(); a != e { + t.Errorf("test case %v failed, expected: %v , got %v", i, e, a) + } + } +} diff --git a/vendor/k8s.io/client-go/tools/cache/doc.go b/vendor/k8s.io/client-go/tools/cache/doc.go index 4f593f0d3..56b61d300 100644 --- a/vendor/k8s.io/client-go/tools/cache/doc.go +++ b/vendor/k8s.io/client-go/tools/cache/doc.go @@ -21,4 +21,4 @@ limitations under the License. // list currently available nodes), and one that additionally acts as // a FIFO queue (for example, to allow a scheduler to process incoming // pods). -package cache +package cache // import "k8s.io/client-go/tools/cache" diff --git a/vendor/k8s.io/client-go/tools/cache/expiration_cache_test.go b/vendor/k8s.io/client-go/tools/cache/expiration_cache_test.go new file mode 100644 index 000000000..fac621cbc --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/expiration_cache_test.go @@ -0,0 +1,189 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cache + +import ( + "reflect" + "testing" + "time" + + "k8s.io/apimachinery/pkg/util/clock" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/util/wait" +) + +func TestTTLExpirationBasic(t *testing.T) { + testObj := testStoreObject{id: "foo", val: "bar"} + deleteChan := make(chan string, 1) + ttlStore := NewFakeExpirationStore( + testStoreKeyFunc, deleteChan, + &FakeExpirationPolicy{ + NeverExpire: sets.NewString(), + RetrieveKeyFunc: func(obj interface{}) (string, error) { + return obj.(*timestampedEntry).obj.(testStoreObject).id, nil + }, + }, + clock.RealClock{}, + ) + err := ttlStore.Add(testObj) + if err != nil { + t.Errorf("Unable to add obj %#v", testObj) + } + item, exists, err := ttlStore.Get(testObj) + if err != nil { + t.Errorf("Failed to get from store, %v", err) + } + if exists || item != nil { + t.Errorf("Got unexpected item %#v", item) + } + key, _ := testStoreKeyFunc(testObj) + select { + case delKey := <-deleteChan: + if delKey != key { + t.Errorf("Unexpected delete for key %s", key) + } + case <-time.After(wait.ForeverTestTimeout): + t.Errorf("Unexpected timeout waiting on delete") + } + close(deleteChan) +} + +func TestReAddExpiredItem(t *testing.T) { + deleteChan := make(chan string, 1) + exp := &FakeExpirationPolicy{ + NeverExpire: sets.NewString(), + RetrieveKeyFunc: func(obj interface{}) (string, error) { + return obj.(*timestampedEntry).obj.(testStoreObject).id, nil + }, + } + ttlStore := NewFakeExpirationStore( + testStoreKeyFunc, deleteChan, exp, clock.RealClock{}) + testKey := "foo" + testObj := testStoreObject{id: testKey, val: "bar"} + err := ttlStore.Add(testObj) + if err != nil { + t.Errorf("Unable to add obj %#v", testObj) + } + + // This get will expire the item. + item, exists, err := ttlStore.Get(testObj) + if err != nil { + t.Errorf("Failed to get from store, %v", err) + } + if exists || item != nil { + t.Errorf("Got unexpected item %#v", item) + } + + key, _ := testStoreKeyFunc(testObj) + differentValue := "different_bar" + err = ttlStore.Add( + testStoreObject{id: testKey, val: differentValue}) + if err != nil { + t.Errorf("Failed to add second value") + } + + select { + case delKey := <-deleteChan: + if delKey != key { + t.Errorf("Unexpected delete for key %s", key) + } + case <-time.After(wait.ForeverTestTimeout): + t.Errorf("Unexpected timeout waiting on delete") + } + exp.NeverExpire = sets.NewString(testKey) + item, exists, err = ttlStore.GetByKey(testKey) + if err != nil { + t.Errorf("Failed to get from store, %v", err) + } + if !exists || item == nil || item.(testStoreObject).val != differentValue { + t.Errorf("Got unexpected item %#v", item) + } + close(deleteChan) +} + +func TestTTLList(t *testing.T) { + testObjs := []testStoreObject{ + {id: "foo", val: "bar"}, + {id: "foo1", val: "bar1"}, + {id: "foo2", val: "bar2"}, + } + expireKeys := sets.NewString(testObjs[0].id, testObjs[2].id) + deleteChan := make(chan string, len(testObjs)) + defer close(deleteChan) + + ttlStore := NewFakeExpirationStore( + testStoreKeyFunc, deleteChan, + &FakeExpirationPolicy{ + NeverExpire: sets.NewString(testObjs[1].id), + RetrieveKeyFunc: func(obj interface{}) (string, error) { + return obj.(*timestampedEntry).obj.(testStoreObject).id, nil + }, + }, + clock.RealClock{}, + ) + for _, obj := range testObjs { + err := ttlStore.Add(obj) + if err != nil { + t.Errorf("Unable to add obj %#v", obj) + } + } + listObjs := ttlStore.List() + if len(listObjs) != 1 || !reflect.DeepEqual(listObjs[0], testObjs[1]) { + t.Errorf("List returned unexpected results %#v", listObjs) + } + + // Make sure all our deletes come through in an acceptable rate (1/100ms) + for expireKeys.Len() != 0 { + select { + case delKey := <-deleteChan: + if !expireKeys.Has(delKey) { + t.Errorf("Unexpected delete for key %s", delKey) + } + expireKeys.Delete(delKey) + case <-time.After(wait.ForeverTestTimeout): + t.Errorf("Unexpected timeout waiting on delete") + return + } + } +} + +func TestTTLPolicy(t *testing.T) { + fakeTime := time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC) + ttl := 30 * time.Second + exactlyOnTTL := fakeTime.Add(-ttl) + expiredTime := fakeTime.Add(-(ttl + 1)) + + policy := TTLPolicy{ttl, clock.NewFakeClock(fakeTime)} + fakeTimestampedEntry := ×tampedEntry{obj: struct{}{}, timestamp: exactlyOnTTL} + if policy.IsExpired(fakeTimestampedEntry) { + t.Errorf("TTL cache should not expire entries exactly on ttl") + } + fakeTimestampedEntry.timestamp = fakeTime + if policy.IsExpired(fakeTimestampedEntry) { + t.Errorf("TTL Cache should not expire entries before ttl") + } + fakeTimestampedEntry.timestamp = expiredTime + if !policy.IsExpired(fakeTimestampedEntry) { + t.Errorf("TTL Cache should expire entries older than ttl") + } + for _, ttl = range []time.Duration{0, -1} { + policy.Ttl = ttl + if policy.IsExpired(fakeTimestampedEntry) { + t.Errorf("TTL policy should only expire entries when initialized with a ttl > 0") + } + } +} diff --git a/vendor/k8s.io/client-go/tools/cache/fifo_test.go b/vendor/k8s.io/client-go/tools/cache/fifo_test.go new file mode 100644 index 000000000..afd311d78 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/fifo_test.go @@ -0,0 +1,280 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cache + +import ( + "fmt" + "reflect" + "testing" + "time" +) + +func testFifoObjectKeyFunc(obj interface{}) (string, error) { + return obj.(testFifoObject).name, nil +} + +type testFifoObject struct { + name string + val interface{} +} + +func mkFifoObj(name string, val interface{}) testFifoObject { + return testFifoObject{name: name, val: val} +} + +func TestFIFO_basic(t *testing.T) { + f := NewFIFO(testFifoObjectKeyFunc) + const amount = 500 + go func() { + for i := 0; i < amount; i++ { + f.Add(mkFifoObj(string([]rune{'a', rune(i)}), i+1)) + } + }() + go func() { + for u := uint64(0); u < amount; u++ { + f.Add(mkFifoObj(string([]rune{'b', rune(u)}), u+1)) + } + }() + + lastInt := int(0) + lastUint := uint64(0) + for i := 0; i < amount*2; i++ { + switch obj := Pop(f).(testFifoObject).val.(type) { + case int: + if obj <= lastInt { + t.Errorf("got %v (int) out of order, last was %v", obj, lastInt) + } + lastInt = obj + case uint64: + if obj <= lastUint { + t.Errorf("got %v (uint) out of order, last was %v", obj, lastUint) + } else { + lastUint = obj + } + default: + t.Fatalf("unexpected type %#v", obj) + } + } +} + +func TestFIFO_requeueOnPop(t *testing.T) { + f := NewFIFO(testFifoObjectKeyFunc) + + f.Add(mkFifoObj("foo", 10)) + _, err := f.Pop(func(obj interface{}) error { + if obj.(testFifoObject).name != "foo" { + t.Fatalf("unexpected object: %#v", obj) + } + return ErrRequeue{Err: nil} + }) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if _, ok, err := f.GetByKey("foo"); !ok || err != nil { + t.Fatalf("object should have been requeued: %t %v", ok, err) + } + + _, err = f.Pop(func(obj interface{}) error { + if obj.(testFifoObject).name != "foo" { + t.Fatalf("unexpected object: %#v", obj) + } + return ErrRequeue{Err: fmt.Errorf("test error")} + }) + if err == nil || err.Error() != "test error" { + t.Fatalf("unexpected error: %v", err) + } + if _, ok, err := f.GetByKey("foo"); !ok || err != nil { + t.Fatalf("object should have been requeued: %t %v", ok, err) + } + + _, err = f.Pop(func(obj interface{}) error { + if obj.(testFifoObject).name != "foo" { + t.Fatalf("unexpected object: %#v", obj) + } + return nil + }) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if _, ok, err := f.GetByKey("foo"); ok || err != nil { + t.Fatalf("object should have been removed: %t %v", ok, err) + } +} + +func TestFIFO_addUpdate(t *testing.T) { + f := NewFIFO(testFifoObjectKeyFunc) + f.Add(mkFifoObj("foo", 10)) + f.Update(mkFifoObj("foo", 15)) + + if e, a := []interface{}{mkFifoObj("foo", 15)}, f.List(); !reflect.DeepEqual(e, a) { + t.Errorf("Expected %+v, got %+v", e, a) + } + if e, a := []string{"foo"}, f.ListKeys(); !reflect.DeepEqual(e, a) { + t.Errorf("Expected %+v, got %+v", e, a) + } + + got := make(chan testFifoObject, 2) + go func() { + for { + got <- Pop(f).(testFifoObject) + } + }() + + first := <-got + if e, a := 15, first.val; e != a { + t.Errorf("Didn't get updated value (%v), got %v", e, a) + } + select { + case unexpected := <-got: + t.Errorf("Got second value %v", unexpected.val) + case <-time.After(50 * time.Millisecond): + } + _, exists, _ := f.Get(mkFifoObj("foo", "")) + if exists { + t.Errorf("item did not get removed") + } +} + +func TestFIFO_addReplace(t *testing.T) { + f := NewFIFO(testFifoObjectKeyFunc) + f.Add(mkFifoObj("foo", 10)) + f.Replace([]interface{}{mkFifoObj("foo", 15)}, "15") + got := make(chan testFifoObject, 2) + go func() { + for { + got <- Pop(f).(testFifoObject) + } + }() + + first := <-got + if e, a := 15, first.val; e != a { + t.Errorf("Didn't get updated value (%v), got %v", e, a) + } + select { + case unexpected := <-got: + t.Errorf("Got second value %v", unexpected.val) + case <-time.After(50 * time.Millisecond): + } + _, exists, _ := f.Get(mkFifoObj("foo", "")) + if exists { + t.Errorf("item did not get removed") + } +} + +func TestFIFO_detectLineJumpers(t *testing.T) { + f := NewFIFO(testFifoObjectKeyFunc) + + f.Add(mkFifoObj("foo", 10)) + f.Add(mkFifoObj("bar", 1)) + f.Add(mkFifoObj("foo", 11)) + f.Add(mkFifoObj("foo", 13)) + f.Add(mkFifoObj("zab", 30)) + + if e, a := 13, Pop(f).(testFifoObject).val; a != e { + t.Fatalf("expected %d, got %d", e, a) + } + + f.Add(mkFifoObj("foo", 14)) // ensure foo doesn't jump back in line + + if e, a := 1, Pop(f).(testFifoObject).val; a != e { + t.Fatalf("expected %d, got %d", e, a) + } + + if e, a := 30, Pop(f).(testFifoObject).val; a != e { + t.Fatalf("expected %d, got %d", e, a) + } + + if e, a := 14, Pop(f).(testFifoObject).val; a != e { + t.Fatalf("expected %d, got %d", e, a) + } +} + +func TestFIFO_addIfNotPresent(t *testing.T) { + f := NewFIFO(testFifoObjectKeyFunc) + + f.Add(mkFifoObj("a", 1)) + f.Add(mkFifoObj("b", 2)) + f.AddIfNotPresent(mkFifoObj("b", 3)) + f.AddIfNotPresent(mkFifoObj("c", 4)) + + if e, a := 3, len(f.items); a != e { + t.Fatalf("expected queue length %d, got %d", e, a) + } + + expectedValues := []int{1, 2, 4} + for _, expected := range expectedValues { + if actual := Pop(f).(testFifoObject).val; actual != expected { + t.Fatalf("expected value %d, got %d", expected, actual) + } + } +} + +func TestFIFO_HasSynced(t *testing.T) { + tests := []struct { + actions []func(f *FIFO) + expectedSynced bool + }{ + { + actions: []func(f *FIFO){}, + expectedSynced: false, + }, + { + actions: []func(f *FIFO){ + func(f *FIFO) { f.Add(mkFifoObj("a", 1)) }, + }, + expectedSynced: true, + }, + { + actions: []func(f *FIFO){ + func(f *FIFO) { f.Replace([]interface{}{}, "0") }, + }, + expectedSynced: true, + }, + { + actions: []func(f *FIFO){ + func(f *FIFO) { f.Replace([]interface{}{mkFifoObj("a", 1), mkFifoObj("b", 2)}, "0") }, + }, + expectedSynced: false, + }, + { + actions: []func(f *FIFO){ + func(f *FIFO) { f.Replace([]interface{}{mkFifoObj("a", 1), mkFifoObj("b", 2)}, "0") }, + func(f *FIFO) { Pop(f) }, + }, + expectedSynced: false, + }, + { + actions: []func(f *FIFO){ + func(f *FIFO) { f.Replace([]interface{}{mkFifoObj("a", 1), mkFifoObj("b", 2)}, "0") }, + func(f *FIFO) { Pop(f) }, + func(f *FIFO) { Pop(f) }, + }, + expectedSynced: true, + }, + } + + for i, test := range tests { + f := NewFIFO(testFifoObjectKeyFunc) + + for _, action := range test.actions { + action(f) + } + if e, a := test.expectedSynced, f.HasSynced(); a != e { + t.Errorf("test case %v failed, expected: %v , got %v", i, e, a) + } + } +} diff --git a/vendor/k8s.io/client-go/tools/cache/heap_test.go b/vendor/k8s.io/client-go/tools/cache/heap_test.go new file mode 100644 index 000000000..c2e476988 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/heap_test.go @@ -0,0 +1,382 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cache + +import ( + "sync" + "testing" + "time" +) + +func testHeapObjectKeyFunc(obj interface{}) (string, error) { + return obj.(testHeapObject).name, nil +} + +type testHeapObject struct { + name string + val interface{} +} + +func mkHeapObj(name string, val interface{}) testHeapObject { + return testHeapObject{name: name, val: val} +} + +func compareInts(val1 interface{}, val2 interface{}) bool { + first := val1.(testHeapObject).val.(int) + second := val2.(testHeapObject).val.(int) + return first < second +} + +// TestHeapBasic tests Heap invariant and synchronization. +func TestHeapBasic(t *testing.T) { + h := NewHeap(testHeapObjectKeyFunc, compareInts) + var wg sync.WaitGroup + wg.Add(2) + const amount = 500 + var i, u int + // Insert items in the heap in opposite orders in two go routines. + go func() { + for i = amount; i > 0; i-- { + h.Add(mkHeapObj(string([]rune{'a', rune(i)}), i)) + } + wg.Done() + }() + go func() { + for u = 0; u < amount; u++ { + h.Add(mkHeapObj(string([]rune{'b', rune(u)}), u+1)) + } + wg.Done() + }() + // Wait for the two go routines to finish. + wg.Wait() + // Make sure that the numbers are popped in ascending order. + prevNum := 0 + for i := 0; i < amount*2; i++ { + obj, err := h.Pop() + num := obj.(testHeapObject).val.(int) + // All the items must be sorted. + if err != nil || prevNum > num { + t.Errorf("got %v out of order, last was %v", obj, prevNum) + } + prevNum = num + } +} + +// Tests Heap.Add and ensures that heap invariant is preserved after adding items. +func TestHeap_Add(t *testing.T) { + h := NewHeap(testHeapObjectKeyFunc, compareInts) + h.Add(mkHeapObj("foo", 10)) + h.Add(mkHeapObj("bar", 1)) + h.Add(mkHeapObj("baz", 11)) + h.Add(mkHeapObj("zab", 30)) + h.Add(mkHeapObj("foo", 13)) // This updates "foo". + + item, err := h.Pop() + if e, a := 1, item.(testHeapObject).val; err != nil || a != e { + t.Fatalf("expected %d, got %d", e, a) + } + item, err = h.Pop() + if e, a := 11, item.(testHeapObject).val; err != nil || a != e { + t.Fatalf("expected %d, got %d", e, a) + } + h.Delete(mkHeapObj("baz", 11)) // Nothing is deleted. + h.Add(mkHeapObj("foo", 14)) // foo is updated. + item, err = h.Pop() + if e, a := 14, item.(testHeapObject).val; err != nil || a != e { + t.Fatalf("expected %d, got %d", e, a) + } + item, err = h.Pop() + if e, a := 30, item.(testHeapObject).val; err != nil || a != e { + t.Fatalf("expected %d, got %d", e, a) + } +} + +// TestHeap_BulkAdd tests Heap.BulkAdd functionality and ensures that all the +// items given to BulkAdd are added to the queue before Pop reads them. +func TestHeap_BulkAdd(t *testing.T) { + h := NewHeap(testHeapObjectKeyFunc, compareInts) + const amount = 500 + // Insert items in the heap in opposite orders in a go routine. + go func() { + l := []interface{}{} + for i := amount; i > 0; i-- { + l = append(l, mkHeapObj(string([]rune{'a', rune(i)}), i)) + } + h.BulkAdd(l) + }() + prevNum := -1 + for i := 0; i < amount; i++ { + obj, err := h.Pop() + num := obj.(testHeapObject).val.(int) + // All the items must be sorted. + if err != nil || prevNum >= num { + t.Errorf("got %v out of order, last was %v", obj, prevNum) + } + prevNum = num + } +} + +// TestHeapEmptyPop tests that pop returns properly after heap is closed. +func TestHeapEmptyPop(t *testing.T) { + h := NewHeap(testHeapObjectKeyFunc, compareInts) + go func() { + time.Sleep(1 * time.Second) + h.Close() + }() + _, err := h.Pop() + if err == nil || err.Error() != closedMsg { + t.Errorf("pop should have returned heap closed error: %v", err) + } +} + +// TestHeap_AddIfNotPresent tests Heap.AddIfNotPresent and ensures that heap +// invariant is preserved after adding items. +func TestHeap_AddIfNotPresent(t *testing.T) { + h := NewHeap(testHeapObjectKeyFunc, compareInts) + h.AddIfNotPresent(mkHeapObj("foo", 10)) + h.AddIfNotPresent(mkHeapObj("bar", 1)) + h.AddIfNotPresent(mkHeapObj("baz", 11)) + h.AddIfNotPresent(mkHeapObj("zab", 30)) + h.AddIfNotPresent(mkHeapObj("foo", 13)) // This is not added. + + if len := len(h.data.items); len != 4 { + t.Errorf("unexpected number of items: %d", len) + } + if val := h.data.items["foo"].obj.(testHeapObject).val; val != 10 { + t.Errorf("unexpected value: %d", val) + } + item, err := h.Pop() + if e, a := 1, item.(testHeapObject).val; err != nil || a != e { + t.Fatalf("expected %d, got %d", e, a) + } + item, err = h.Pop() + if e, a := 10, item.(testHeapObject).val; err != nil || a != e { + t.Fatalf("expected %d, got %d", e, a) + } + // bar is already popped. Let's add another one. + h.AddIfNotPresent(mkHeapObj("bar", 14)) + item, err = h.Pop() + if e, a := 11, item.(testHeapObject).val; err != nil || a != e { + t.Fatalf("expected %d, got %d", e, a) + } + item, err = h.Pop() + if e, a := 14, item.(testHeapObject).val; err != nil || a != e { + t.Fatalf("expected %d, got %d", e, a) + } +} + +// TestHeap_Delete tests Heap.Delete and ensures that heap invariant is +// preserved after deleting items. +func TestHeap_Delete(t *testing.T) { + h := NewHeap(testHeapObjectKeyFunc, compareInts) + h.Add(mkHeapObj("foo", 10)) + h.Add(mkHeapObj("bar", 1)) + h.Add(mkHeapObj("bal", 31)) + h.Add(mkHeapObj("baz", 11)) + + // Delete head. Delete should work with "key" and doesn't care about the value. + if err := h.Delete(mkHeapObj("bar", 200)); err != nil { + t.Fatalf("Failed to delete head.") + } + item, err := h.Pop() + if e, a := 10, item.(testHeapObject).val; err != nil || a != e { + t.Fatalf("expected %d, got %d", e, a) + } + h.Add(mkHeapObj("zab", 30)) + h.Add(mkHeapObj("faz", 30)) + len := h.data.Len() + // Delete non-existing item. + if err = h.Delete(mkHeapObj("non-existent", 10)); err == nil || len != h.data.Len() { + t.Fatalf("Didn't expect any item removal") + } + // Delete tail. + if err = h.Delete(mkHeapObj("bal", 31)); err != nil { + t.Fatalf("Failed to delete tail.") + } + // Delete one of the items with value 30. + if err = h.Delete(mkHeapObj("zab", 30)); err != nil { + t.Fatalf("Failed to delete item.") + } + item, err = h.Pop() + if e, a := 11, item.(testHeapObject).val; err != nil || a != e { + t.Fatalf("expected %d, got %d", e, a) + } + item, err = h.Pop() + if e, a := 30, item.(testHeapObject).val; err != nil || a != e { + t.Fatalf("expected %d, got %d", e, a) + } + if h.data.Len() != 0 { + t.Fatalf("expected an empty heap.") + } +} + +// TestHeap_Update tests Heap.Update and ensures that heap invariant is +// preserved after adding items. +func TestHeap_Update(t *testing.T) { + h := NewHeap(testHeapObjectKeyFunc, compareInts) + h.Add(mkHeapObj("foo", 10)) + h.Add(mkHeapObj("bar", 1)) + h.Add(mkHeapObj("bal", 31)) + h.Add(mkHeapObj("baz", 11)) + + // Update an item to a value that should push it to the head. + h.Update(mkHeapObj("baz", 0)) + if h.data.queue[0] != "baz" || h.data.items["baz"].index != 0 { + t.Fatalf("expected baz to be at the head") + } + item, err := h.Pop() + if e, a := 0, item.(testHeapObject).val; err != nil || a != e { + t.Fatalf("expected %d, got %d", e, a) + } + // Update bar to push it farther back in the queue. + h.Update(mkHeapObj("bar", 100)) + if h.data.queue[0] != "foo" || h.data.items["foo"].index != 0 { + t.Fatalf("expected foo to be at the head") + } +} + +// TestHeap_Get tests Heap.Get. +func TestHeap_Get(t *testing.T) { + h := NewHeap(testHeapObjectKeyFunc, compareInts) + h.Add(mkHeapObj("foo", 10)) + h.Add(mkHeapObj("bar", 1)) + h.Add(mkHeapObj("bal", 31)) + h.Add(mkHeapObj("baz", 11)) + + // Get works with the key. + obj, exists, err := h.Get(mkHeapObj("baz", 0)) + if err != nil || exists == false || obj.(testHeapObject).val != 11 { + t.Fatalf("unexpected error in getting element") + } + // Get non-existing object. + _, exists, err = h.Get(mkHeapObj("non-existing", 0)) + if err != nil || exists == true { + t.Fatalf("didn't expect to get any object") + } +} + +// TestHeap_GetByKey tests Heap.GetByKey and is very similar to TestHeap_Get. +func TestHeap_GetByKey(t *testing.T) { + h := NewHeap(testHeapObjectKeyFunc, compareInts) + h.Add(mkHeapObj("foo", 10)) + h.Add(mkHeapObj("bar", 1)) + h.Add(mkHeapObj("bal", 31)) + h.Add(mkHeapObj("baz", 11)) + + obj, exists, err := h.GetByKey("baz") + if err != nil || exists == false || obj.(testHeapObject).val != 11 { + t.Fatalf("unexpected error in getting element") + } + // Get non-existing object. + _, exists, err = h.GetByKey("non-existing") + if err != nil || exists == true { + t.Fatalf("didn't expect to get any object") + } +} + +// TestHeap_Close tests Heap.Close and Heap.IsClosed functions. +func TestHeap_Close(t *testing.T) { + h := NewHeap(testHeapObjectKeyFunc, compareInts) + h.Add(mkHeapObj("foo", 10)) + h.Add(mkHeapObj("bar", 1)) + + if h.IsClosed() { + t.Fatalf("didn't expect heap to be closed") + } + h.Close() + if !h.IsClosed() { + t.Fatalf("expect heap to be closed") + } +} + +// TestHeap_List tests Heap.List function. +func TestHeap_List(t *testing.T) { + h := NewHeap(testHeapObjectKeyFunc, compareInts) + list := h.List() + if len(list) != 0 { + t.Errorf("expected an empty list") + } + + items := map[string]int{ + "foo": 10, + "bar": 1, + "bal": 30, + "baz": 11, + "faz": 30, + } + for k, v := range items { + h.Add(mkHeapObj(k, v)) + } + list = h.List() + if len(list) != len(items) { + t.Errorf("expected %d items, got %d", len(items), len(list)) + } + for _, obj := range list { + heapObj := obj.(testHeapObject) + v, ok := items[heapObj.name] + if !ok || v != heapObj.val { + t.Errorf("unexpected item in the list: %v", heapObj) + } + } +} + +// TestHeap_ListKeys tests Heap.ListKeys function. Scenario is the same as +// TestHeap_list. +func TestHeap_ListKeys(t *testing.T) { + h := NewHeap(testHeapObjectKeyFunc, compareInts) + list := h.ListKeys() + if len(list) != 0 { + t.Errorf("expected an empty list") + } + + items := map[string]int{ + "foo": 10, + "bar": 1, + "bal": 30, + "baz": 11, + "faz": 30, + } + for k, v := range items { + h.Add(mkHeapObj(k, v)) + } + list = h.ListKeys() + if len(list) != len(items) { + t.Errorf("expected %d items, got %d", len(items), len(list)) + } + for _, key := range list { + _, ok := items[key] + if !ok { + t.Errorf("unexpected item in the list: %v", key) + } + } +} + +// TestHeapAddAfterClose tests that heap returns an error if anything is added +// after it is closed. +func TestHeapAddAfterClose(t *testing.T) { + h := NewHeap(testHeapObjectKeyFunc, compareInts) + h.Close() + if err := h.Add(mkHeapObj("test", 1)); err == nil || err.Error() != closedMsg { + t.Errorf("expected heap closed error") + } + if err := h.AddIfNotPresent(mkHeapObj("test", 1)); err == nil || err.Error() != closedMsg { + t.Errorf("expected heap closed error") + } + if err := h.BulkAdd([]interface{}{mkHeapObj("test", 1)}); err == nil || err.Error() != closedMsg { + t.Errorf("expected heap closed error") + } +} diff --git a/vendor/k8s.io/client-go/tools/cache/index_test.go b/vendor/k8s.io/client-go/tools/cache/index_test.go new file mode 100644 index 000000000..d5615e6df --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/index_test.go @@ -0,0 +1,137 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cache + +import ( + "strings" + "testing" + + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/kubernetes/scheme" +) + +func testIndexFunc(obj interface{}) ([]string, error) { + pod := obj.(*v1.Pod) + return []string{pod.Labels["foo"]}, nil +} + +func TestGetIndexFuncValues(t *testing.T) { + index := NewIndexer(MetaNamespaceKeyFunc, Indexers{"testmodes": testIndexFunc}) + + pod1 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "one", Labels: map[string]string{"foo": "bar"}}} + pod2 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "two", Labels: map[string]string{"foo": "bar"}}} + pod3 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "tre", Labels: map[string]string{"foo": "biz"}}} + + index.Add(pod1) + index.Add(pod2) + index.Add(pod3) + + keys := index.ListIndexFuncValues("testmodes") + if len(keys) != 2 { + t.Errorf("Expected 2 keys but got %v", len(keys)) + } + + for _, key := range keys { + if key != "bar" && key != "biz" { + t.Errorf("Expected only 'bar' or 'biz' but got %s", key) + } + } +} + +func testUsersIndexFunc(obj interface{}) ([]string, error) { + pod := obj.(*v1.Pod) + usersString := pod.Annotations["users"] + + return strings.Split(usersString, ","), nil +} + +func TestMultiIndexKeys(t *testing.T) { + index := NewIndexer(MetaNamespaceKeyFunc, Indexers{"byUser": testUsersIndexFunc}) + + pod1 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "one", Annotations: map[string]string{"users": "ernie,bert"}}} + pod2 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "two", Annotations: map[string]string{"users": "bert,oscar"}}} + pod3 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "tre", Annotations: map[string]string{"users": "ernie,elmo"}}} + + index.Add(pod1) + index.Add(pod2) + index.Add(pod3) + + erniePods, err := index.ByIndex("byUser", "ernie") + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if len(erniePods) != 2 { + t.Errorf("Expected 2 pods but got %v", len(erniePods)) + } + + bertPods, err := index.ByIndex("byUser", "bert") + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if len(bertPods) != 2 { + t.Errorf("Expected 2 pods but got %v", len(bertPods)) + } + + oscarPods, err := index.ByIndex("byUser", "oscar") + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if len(oscarPods) != 1 { + t.Errorf("Expected 1 pods but got %v", len(erniePods)) + } + + ernieAndBertKeys, err := index.Index("byUser", pod1) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if len(ernieAndBertKeys) != 3 { + t.Errorf("Expected 3 pods but got %v", len(ernieAndBertKeys)) + } + + index.Delete(pod3) + erniePods, err = index.ByIndex("byUser", "ernie") + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if len(erniePods) != 1 { + t.Errorf("Expected 1 pods but got %v", len(erniePods)) + } + elmoPods, err := index.ByIndex("byUser", "elmo") + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if len(elmoPods) != 0 { + t.Errorf("Expected 0 pods but got %v", len(elmoPods)) + } + + obj, err := scheme.Scheme.DeepCopy(pod2) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + copyOfPod2 := obj.(*v1.Pod) + copyOfPod2.Annotations["users"] = "oscar" + index.Update(copyOfPod2) + bertPods, err = index.ByIndex("byUser", "bert") + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if len(bertPods) != 1 { + t.Errorf("Expected 1 pods but got %v", len(bertPods)) + } + +} diff --git a/vendor/k8s.io/client-go/tools/cache/mutation_detector_test.go b/vendor/k8s.io/client-go/tools/cache/mutation_detector_test.go new file mode 100644 index 000000000..41b6942f5 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/mutation_detector_test.go @@ -0,0 +1,81 @@ +// +build !race + +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cache + +import ( + "testing" + "time" + + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" +) + +func TestMutationDetector(t *testing.T) { + fakeWatch := watch.NewFake() + lw := &testLW{ + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return fakeWatch, nil + }, + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return &v1.PodList{}, nil + }, + } + pod := &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "anything", + Labels: map[string]string{"check": "foo"}, + }, + } + stopCh := make(chan struct{}) + defer close(stopCh) + addReceived := make(chan bool) + mutationFound := make(chan bool) + + informer := NewSharedInformer(lw, &v1.Pod{}, 1*time.Second).(*sharedIndexInformer) + informer.cacheMutationDetector = &defaultCacheMutationDetector{ + name: "name", + period: 1 * time.Second, + failureFunc: func(message string) { + mutationFound <- true + }, + } + informer.AddEventHandler( + ResourceEventHandlerFuncs{ + AddFunc: func(obj interface{}) { + addReceived <- true + }, + }, + ) + go informer.Run(stopCh) + + fakeWatch.Add(pod) + + select { + case <-addReceived: + } + + pod.Labels["change"] = "true" + + select { + case <-mutationFound: + } + +} diff --git a/vendor/k8s.io/client-go/tools/cache/processor_listener_test.go b/vendor/k8s.io/client-go/tools/cache/processor_listener_test.go new file mode 100644 index 000000000..90a775b3a --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/processor_listener_test.go @@ -0,0 +1,57 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cache + +import ( + "sync" + "testing" + "time" + + "k8s.io/apimachinery/pkg/util/wait" +) + +const ( + concurrencyLevel = 5 +) + +func BenchmarkListener(b *testing.B) { + var notification addNotification + + var swg sync.WaitGroup + swg.Add(b.N) + b.SetParallelism(concurrencyLevel) + pl := newProcessListener(&ResourceEventHandlerFuncs{ + AddFunc: func(obj interface{}) { + swg.Done() + }, + }, 0, 0, time.Now()) + var wg wait.Group + defer wg.Wait() // Wait for .run and .pop to stop + defer close(pl.addCh) // Tell .run and .pop to stop + wg.Start(pl.run) + wg.Start(pl.pop) + + b.ReportAllocs() + b.ResetTimer() + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + pl.add(notification) + } + }) + swg.Wait() // Block until all notifications have been received + b.StopTimer() +} diff --git a/vendor/k8s.io/client-go/tools/cache/reflector_test.go b/vendor/k8s.io/client-go/tools/cache/reflector_test.go new file mode 100644 index 000000000..bb06059f7 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/reflector_test.go @@ -0,0 +1,389 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cache + +import ( + "errors" + "fmt" + "math/rand" + "strconv" + "testing" + "time" + + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apimachinery/pkg/watch" +) + +var nevererrc chan error + +type testLW struct { + ListFunc func(options metav1.ListOptions) (runtime.Object, error) + WatchFunc func(options metav1.ListOptions) (watch.Interface, error) +} + +func (t *testLW) List(options metav1.ListOptions) (runtime.Object, error) { + return t.ListFunc(options) +} +func (t *testLW) Watch(options metav1.ListOptions) (watch.Interface, error) { + return t.WatchFunc(options) +} + +func TestCloseWatchChannelOnError(t *testing.T) { + r := NewReflector(&testLW{}, &v1.Pod{}, NewStore(MetaNamespaceKeyFunc), 0) + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}} + fw := watch.NewFake() + r.listerWatcher = &testLW{ + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return fw, nil + }, + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return &v1.PodList{ListMeta: metav1.ListMeta{ResourceVersion: "1"}}, nil + }, + } + go r.ListAndWatch(wait.NeverStop) + fw.Error(pod) + select { + case _, ok := <-fw.ResultChan(): + if ok { + t.Errorf("Watch channel left open after cancellation") + } + case <-time.After(wait.ForeverTestTimeout): + t.Errorf("the cancellation is at least %s late", wait.ForeverTestTimeout.String()) + break + } +} + +func TestRunUntil(t *testing.T) { + stopCh := make(chan struct{}) + store := NewStore(MetaNamespaceKeyFunc) + r := NewReflector(&testLW{}, &v1.Pod{}, store, 0) + fw := watch.NewFake() + r.listerWatcher = &testLW{ + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return fw, nil + }, + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return &v1.PodList{ListMeta: metav1.ListMeta{ResourceVersion: "1"}}, nil + }, + } + go r.Run(stopCh) + // Synchronously add a dummy pod into the watch channel so we + // know the RunUntil go routine is in the watch handler. + fw.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}}) + close(stopCh) + select { + case _, ok := <-fw.ResultChan(): + if ok { + t.Errorf("Watch channel left open after stopping the watch") + } + case <-time.After(wait.ForeverTestTimeout): + t.Errorf("the cancellation is at least %s late", wait.ForeverTestTimeout.String()) + break + } +} + +func TestReflectorResyncChan(t *testing.T) { + s := NewStore(MetaNamespaceKeyFunc) + g := NewReflector(&testLW{}, &v1.Pod{}, s, time.Millisecond) + a, _ := g.resyncChan() + b := time.After(wait.ForeverTestTimeout) + select { + case <-a: + t.Logf("got timeout as expected") + case <-b: + t.Errorf("resyncChan() is at least 99 milliseconds late??") + } +} + +func BenchmarkReflectorResyncChanMany(b *testing.B) { + s := NewStore(MetaNamespaceKeyFunc) + g := NewReflector(&testLW{}, &v1.Pod{}, s, 25*time.Millisecond) + // The improvement to this (calling the timer's Stop() method) makes + // this benchmark about 40% faster. + for i := 0; i < b.N; i++ { + g.resyncPeriod = time.Duration(rand.Float64() * float64(time.Millisecond) * 25) + _, stop := g.resyncChan() + stop() + } +} + +func TestReflectorWatchHandlerError(t *testing.T) { + s := NewStore(MetaNamespaceKeyFunc) + g := NewReflector(&testLW{}, &v1.Pod{}, s, 0) + fw := watch.NewFake() + go func() { + fw.Stop() + }() + var resumeRV string + err := g.watchHandler(fw, &resumeRV, nevererrc, wait.NeverStop) + if err == nil { + t.Errorf("unexpected non-error") + } +} + +func TestReflectorWatchHandler(t *testing.T) { + s := NewStore(MetaNamespaceKeyFunc) + g := NewReflector(&testLW{}, &v1.Pod{}, s, 0) + fw := watch.NewFake() + s.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) + s.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}}) + go func() { + fw.Add(&v1.Service{ObjectMeta: metav1.ObjectMeta{Name: "rejected"}}) + fw.Delete(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) + fw.Modify(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar", ResourceVersion: "55"}}) + fw.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "baz", ResourceVersion: "32"}}) + fw.Stop() + }() + var resumeRV string + err := g.watchHandler(fw, &resumeRV, nevererrc, wait.NeverStop) + if err != nil { + t.Errorf("unexpected error %v", err) + } + + mkPod := func(id string, rv string) *v1.Pod { + return &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: id, ResourceVersion: rv}} + } + + table := []struct { + Pod *v1.Pod + exists bool + }{ + {mkPod("foo", ""), false}, + {mkPod("rejected", ""), false}, + {mkPod("bar", "55"), true}, + {mkPod("baz", "32"), true}, + } + for _, item := range table { + obj, exists, _ := s.Get(item.Pod) + if e, a := item.exists, exists; e != a { + t.Errorf("%v: expected %v, got %v", item.Pod, e, a) + } + if !exists { + continue + } + if e, a := item.Pod.ResourceVersion, obj.(*v1.Pod).ResourceVersion; e != a { + t.Errorf("%v: expected %v, got %v", item.Pod, e, a) + } + } + + // RV should send the last version we see. + if e, a := "32", resumeRV; e != a { + t.Errorf("expected %v, got %v", e, a) + } + + // last sync resource version should be the last version synced with store + if e, a := "32", g.LastSyncResourceVersion(); e != a { + t.Errorf("expected %v, got %v", e, a) + } +} + +func TestReflectorStopWatch(t *testing.T) { + s := NewStore(MetaNamespaceKeyFunc) + g := NewReflector(&testLW{}, &v1.Pod{}, s, 0) + fw := watch.NewFake() + var resumeRV string + stopWatch := make(chan struct{}, 1) + stopWatch <- struct{}{} + err := g.watchHandler(fw, &resumeRV, nevererrc, stopWatch) + if err != errorStopRequested { + t.Errorf("expected stop error, got %q", err) + } +} + +func TestReflectorListAndWatch(t *testing.T) { + createdFakes := make(chan *watch.FakeWatcher) + + // The ListFunc says that it's at revision 1. Therefore, we expect our WatchFunc + // to get called at the beginning of the watch with 1, and again with 3 when we + // inject an error. + expectedRVs := []string{"1", "3"} + lw := &testLW{ + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + rv := options.ResourceVersion + fw := watch.NewFake() + if e, a := expectedRVs[0], rv; e != a { + t.Errorf("Expected rv %v, but got %v", e, a) + } + expectedRVs = expectedRVs[1:] + // channel is not buffered because the for loop below needs to block. But + // we don't want to block here, so report the new fake via a go routine. + go func() { createdFakes <- fw }() + return fw, nil + }, + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return &v1.PodList{ListMeta: metav1.ListMeta{ResourceVersion: "1"}}, nil + }, + } + s := NewFIFO(MetaNamespaceKeyFunc) + r := NewReflector(lw, &v1.Pod{}, s, 0) + go r.ListAndWatch(wait.NeverStop) + + ids := []string{"foo", "bar", "baz", "qux", "zoo"} + var fw *watch.FakeWatcher + for i, id := range ids { + if fw == nil { + fw = <-createdFakes + } + sendingRV := strconv.FormatUint(uint64(i+2), 10) + fw.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: id, ResourceVersion: sendingRV}}) + if sendingRV == "3" { + // Inject a failure. + fw.Stop() + fw = nil + } + } + + // Verify we received the right ids with the right resource versions. + for i, id := range ids { + pod := Pop(s).(*v1.Pod) + if e, a := id, pod.Name; e != a { + t.Errorf("%v: Expected %v, got %v", i, e, a) + } + if e, a := strconv.FormatUint(uint64(i+2), 10), pod.ResourceVersion; e != a { + t.Errorf("%v: Expected %v, got %v", i, e, a) + } + } + + if len(expectedRVs) != 0 { + t.Error("called watchStarter an unexpected number of times") + } +} + +func TestReflectorListAndWatchWithErrors(t *testing.T) { + mkPod := func(id string, rv string) *v1.Pod { + return &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: id, ResourceVersion: rv}} + } + mkList := func(rv string, pods ...*v1.Pod) *v1.PodList { + list := &v1.PodList{ListMeta: metav1.ListMeta{ResourceVersion: rv}} + for _, pod := range pods { + list.Items = append(list.Items, *pod) + } + return list + } + table := []struct { + list *v1.PodList + listErr error + events []watch.Event + watchErr error + }{ + { + list: mkList("1"), + events: []watch.Event{ + {Type: watch.Added, Object: mkPod("foo", "2")}, + {Type: watch.Added, Object: mkPod("bar", "3")}, + }, + }, { + list: mkList("3", mkPod("foo", "2"), mkPod("bar", "3")), + events: []watch.Event{ + {Type: watch.Deleted, Object: mkPod("foo", "4")}, + {Type: watch.Added, Object: mkPod("qux", "5")}, + }, + }, { + listErr: fmt.Errorf("a list error"), + }, { + list: mkList("5", mkPod("bar", "3"), mkPod("qux", "5")), + watchErr: fmt.Errorf("a watch error"), + }, { + list: mkList("5", mkPod("bar", "3"), mkPod("qux", "5")), + events: []watch.Event{ + {Type: watch.Added, Object: mkPod("baz", "6")}, + }, + }, { + list: mkList("6", mkPod("bar", "3"), mkPod("qux", "5"), mkPod("baz", "6")), + }, + } + + s := NewFIFO(MetaNamespaceKeyFunc) + for line, item := range table { + if item.list != nil { + // Test that the list is what currently exists in the store. + current := s.List() + checkMap := map[string]string{} + for _, item := range current { + pod := item.(*v1.Pod) + checkMap[pod.Name] = pod.ResourceVersion + } + for _, pod := range item.list.Items { + if e, a := pod.ResourceVersion, checkMap[pod.Name]; e != a { + t.Errorf("%v: expected %v, got %v for pod %v", line, e, a, pod.Name) + } + } + if e, a := len(item.list.Items), len(checkMap); e != a { + t.Errorf("%v: expected %v, got %v", line, e, a) + } + } + watchRet, watchErr := item.events, item.watchErr + lw := &testLW{ + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + if watchErr != nil { + return nil, watchErr + } + watchErr = fmt.Errorf("second watch") + fw := watch.NewFake() + go func() { + for _, e := range watchRet { + fw.Action(e.Type, e.Object) + } + fw.Stop() + }() + return fw, nil + }, + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return item.list, item.listErr + }, + } + r := NewReflector(lw, &v1.Pod{}, s, 0) + r.ListAndWatch(wait.NeverStop) + } +} + +func TestReflectorResync(t *testing.T) { + iteration := 0 + stopCh := make(chan struct{}) + rerr := errors.New("expected resync reached") + s := &FakeCustomStore{ + ResyncFunc: func() error { + iteration++ + if iteration == 2 { + return rerr + } + return nil + }, + } + + lw := &testLW{ + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + fw := watch.NewFake() + return fw, nil + }, + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return &v1.PodList{ListMeta: metav1.ListMeta{ResourceVersion: "0"}}, nil + }, + } + resyncPeriod := 1 * time.Millisecond + r := NewReflector(lw, &v1.Pod{}, s, resyncPeriod) + if err := r.ListAndWatch(stopCh); err != nil { + // error from Resync is not propaged up to here. + t.Errorf("expected error %v", err) + } + if iteration != 2 { + t.Errorf("exactly 2 iterations were expected, got: %v", iteration) + } +} diff --git a/vendor/k8s.io/client-go/tools/cache/shared_informer_test.go b/vendor/k8s.io/client-go/tools/cache/shared_informer_test.go new file mode 100644 index 000000000..6f49d167a --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/shared_informer_test.go @@ -0,0 +1,253 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cache + +import ( + "fmt" + "sync" + "testing" + "time" + + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/clock" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/util/wait" + fcache "k8s.io/client-go/tools/cache/testing" +) + +type testListener struct { + lock sync.RWMutex + resyncPeriod time.Duration + expectedItemNames sets.String + receivedItemNames []string + name string +} + +func newTestListener(name string, resyncPeriod time.Duration, expected ...string) *testListener { + l := &testListener{ + resyncPeriod: resyncPeriod, + expectedItemNames: sets.NewString(expected...), + name: name, + } + return l +} + +func (l *testListener) OnAdd(obj interface{}) { + l.handle(obj) +} + +func (l *testListener) OnUpdate(old, new interface{}) { + l.handle(new) +} + +func (l *testListener) OnDelete(obj interface{}) { +} + +func (l *testListener) handle(obj interface{}) { + key, _ := MetaNamespaceKeyFunc(obj) + fmt.Printf("%s: handle: %v\n", l.name, key) + l.lock.Lock() + defer l.lock.Unlock() + + objectMeta, _ := meta.Accessor(obj) + l.receivedItemNames = append(l.receivedItemNames, objectMeta.GetName()) +} + +func (l *testListener) ok() bool { + fmt.Println("polling") + err := wait.PollImmediate(100*time.Millisecond, 2*time.Second, func() (bool, error) { + if l.satisfiedExpectations() { + return true, nil + } + return false, nil + }) + if err != nil { + return false + } + + // wait just a bit to allow any unexpected stragglers to come in + fmt.Println("sleeping") + time.Sleep(1 * time.Second) + fmt.Println("final check") + return l.satisfiedExpectations() +} + +func (l *testListener) satisfiedExpectations() bool { + l.lock.RLock() + defer l.lock.RUnlock() + + return len(l.receivedItemNames) == l.expectedItemNames.Len() && sets.NewString(l.receivedItemNames...).Equal(l.expectedItemNames) +} + +func TestListenerResyncPeriods(t *testing.T) { + // source simulates an apiserver object endpoint. + source := fcache.NewFakeControllerSource() + source.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "pod1"}}) + source.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "pod2"}}) + + // create the shared informer and resync every 1s + informer := NewSharedInformer(source, &v1.Pod{}, 1*time.Second).(*sharedIndexInformer) + + clock := clock.NewFakeClock(time.Now()) + informer.clock = clock + informer.processor.clock = clock + + // listener 1, never resync + listener1 := newTestListener("listener1", 0, "pod1", "pod2") + informer.AddEventHandlerWithResyncPeriod(listener1, listener1.resyncPeriod) + + // listener 2, resync every 2s + listener2 := newTestListener("listener2", 2*time.Second, "pod1", "pod2") + informer.AddEventHandlerWithResyncPeriod(listener2, listener2.resyncPeriod) + + // listener 3, resync every 3s + listener3 := newTestListener("listener3", 3*time.Second, "pod1", "pod2") + informer.AddEventHandlerWithResyncPeriod(listener3, listener3.resyncPeriod) + listeners := []*testListener{listener1, listener2, listener3} + + stop := make(chan struct{}) + defer close(stop) + + go informer.Run(stop) + + // ensure all listeners got the initial List + for _, listener := range listeners { + if !listener.ok() { + t.Errorf("%s: expected %v, got %v", listener.name, listener.expectedItemNames, listener.receivedItemNames) + } + } + + // reset + for _, listener := range listeners { + listener.receivedItemNames = []string{} + } + + // advance so listener2 gets a resync + clock.Step(2 * time.Second) + + // make sure listener2 got the resync + if !listener2.ok() { + t.Errorf("%s: expected %v, got %v", listener2.name, listener2.expectedItemNames, listener2.receivedItemNames) + } + + // wait a bit to give errant items a chance to go to 1 and 3 + time.Sleep(1 * time.Second) + + // make sure listeners 1 and 3 got nothing + if len(listener1.receivedItemNames) != 0 { + t.Errorf("listener1: should not have resynced (got %d)", len(listener1.receivedItemNames)) + } + if len(listener3.receivedItemNames) != 0 { + t.Errorf("listener3: should not have resynced (got %d)", len(listener3.receivedItemNames)) + } + + // reset + for _, listener := range listeners { + listener.receivedItemNames = []string{} + } + + // advance so listener3 gets a resync + clock.Step(1 * time.Second) + + // make sure listener3 got the resync + if !listener3.ok() { + t.Errorf("%s: expected %v, got %v", listener3.name, listener3.expectedItemNames, listener3.receivedItemNames) + } + + // wait a bit to give errant items a chance to go to 1 and 2 + time.Sleep(1 * time.Second) + + // make sure listeners 1 and 2 got nothing + if len(listener1.receivedItemNames) != 0 { + t.Errorf("listener1: should not have resynced (got %d)", len(listener1.receivedItemNames)) + } + if len(listener2.receivedItemNames) != 0 { + t.Errorf("listener2: should not have resynced (got %d)", len(listener2.receivedItemNames)) + } +} + +func TestResyncCheckPeriod(t *testing.T) { + // source simulates an apiserver object endpoint. + source := fcache.NewFakeControllerSource() + + // create the shared informer and resync every 12 hours + informer := NewSharedInformer(source, &v1.Pod{}, 12*time.Hour).(*sharedIndexInformer) + + clock := clock.NewFakeClock(time.Now()) + informer.clock = clock + informer.processor.clock = clock + + // listener 1, never resync + listener1 := newTestListener("listener1", 0) + informer.AddEventHandlerWithResyncPeriod(listener1, listener1.resyncPeriod) + if e, a := 12*time.Hour, informer.resyncCheckPeriod; e != a { + t.Errorf("expected %d, got %d", e, a) + } + if e, a := time.Duration(0), informer.processor.listeners[0].resyncPeriod; e != a { + t.Errorf("expected %d, got %d", e, a) + } + + // listener 2, resync every minute + listener2 := newTestListener("listener2", 1*time.Minute) + informer.AddEventHandlerWithResyncPeriod(listener2, listener2.resyncPeriod) + if e, a := 1*time.Minute, informer.resyncCheckPeriod; e != a { + t.Errorf("expected %d, got %d", e, a) + } + if e, a := time.Duration(0), informer.processor.listeners[0].resyncPeriod; e != a { + t.Errorf("expected %d, got %d", e, a) + } + if e, a := 1*time.Minute, informer.processor.listeners[1].resyncPeriod; e != a { + t.Errorf("expected %d, got %d", e, a) + } + + // listener 3, resync every 55 seconds + listener3 := newTestListener("listener3", 55*time.Second) + informer.AddEventHandlerWithResyncPeriod(listener3, listener3.resyncPeriod) + if e, a := 55*time.Second, informer.resyncCheckPeriod; e != a { + t.Errorf("expected %d, got %d", e, a) + } + if e, a := time.Duration(0), informer.processor.listeners[0].resyncPeriod; e != a { + t.Errorf("expected %d, got %d", e, a) + } + if e, a := 1*time.Minute, informer.processor.listeners[1].resyncPeriod; e != a { + t.Errorf("expected %d, got %d", e, a) + } + if e, a := 55*time.Second, informer.processor.listeners[2].resyncPeriod; e != a { + t.Errorf("expected %d, got %d", e, a) + } + + // listener 4, resync every 5 seconds + listener4 := newTestListener("listener4", 5*time.Second) + informer.AddEventHandlerWithResyncPeriod(listener4, listener4.resyncPeriod) + if e, a := 5*time.Second, informer.resyncCheckPeriod; e != a { + t.Errorf("expected %d, got %d", e, a) + } + if e, a := time.Duration(0), informer.processor.listeners[0].resyncPeriod; e != a { + t.Errorf("expected %d, got %d", e, a) + } + if e, a := 1*time.Minute, informer.processor.listeners[1].resyncPeriod; e != a { + t.Errorf("expected %d, got %d", e, a) + } + if e, a := 55*time.Second, informer.processor.listeners[2].resyncPeriod; e != a { + t.Errorf("expected %d, got %d", e, a) + } + if e, a := 5*time.Second, informer.processor.listeners[3].resyncPeriod; e != a { + t.Errorf("expected %d, got %d", e, a) + } +} diff --git a/vendor/k8s.io/client-go/tools/cache/store_test.go b/vendor/k8s.io/client-go/tools/cache/store_test.go new file mode 100644 index 000000000..52c9585a9 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/store_test.go @@ -0,0 +1,156 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cache + +import ( + "testing" + + "k8s.io/apimachinery/pkg/util/sets" +) + +// Test public interface +func doTestStore(t *testing.T, store Store) { + mkObj := func(id string, val string) testStoreObject { + return testStoreObject{id: id, val: val} + } + + store.Add(mkObj("foo", "bar")) + if item, ok, _ := store.Get(mkObj("foo", "")); !ok { + t.Errorf("didn't find inserted item") + } else { + if e, a := "bar", item.(testStoreObject).val; e != a { + t.Errorf("expected %v, got %v", e, a) + } + } + store.Update(mkObj("foo", "baz")) + if item, ok, _ := store.Get(mkObj("foo", "")); !ok { + t.Errorf("didn't find inserted item") + } else { + if e, a := "baz", item.(testStoreObject).val; e != a { + t.Errorf("expected %v, got %v", e, a) + } + } + store.Delete(mkObj("foo", "")) + if _, ok, _ := store.Get(mkObj("foo", "")); ok { + t.Errorf("found deleted item??") + } + + // Test List. + store.Add(mkObj("a", "b")) + store.Add(mkObj("c", "d")) + store.Add(mkObj("e", "e")) + { + found := sets.String{} + for _, item := range store.List() { + found.Insert(item.(testStoreObject).val) + } + if !found.HasAll("b", "d", "e") { + t.Errorf("missing items, found: %v", found) + } + if len(found) != 3 { + t.Errorf("extra items") + } + } + + // Test Replace. + store.Replace([]interface{}{ + mkObj("foo", "foo"), + mkObj("bar", "bar"), + }, "0") + + { + found := sets.String{} + for _, item := range store.List() { + found.Insert(item.(testStoreObject).val) + } + if !found.HasAll("foo", "bar") { + t.Errorf("missing items") + } + if len(found) != 2 { + t.Errorf("extra items") + } + } +} + +// Test public interface +func doTestIndex(t *testing.T, indexer Indexer) { + mkObj := func(id string, val string) testStoreObject { + return testStoreObject{id: id, val: val} + } + + // Test Index + expected := map[string]sets.String{} + expected["b"] = sets.NewString("a", "c") + expected["f"] = sets.NewString("e") + expected["h"] = sets.NewString("g") + indexer.Add(mkObj("a", "b")) + indexer.Add(mkObj("c", "b")) + indexer.Add(mkObj("e", "f")) + indexer.Add(mkObj("g", "h")) + { + for k, v := range expected { + found := sets.String{} + indexResults, err := indexer.Index("by_val", mkObj("", k)) + if err != nil { + t.Errorf("Unexpected error %v", err) + } + for _, item := range indexResults { + found.Insert(item.(testStoreObject).id) + } + items := v.List() + if !found.HasAll(items...) { + t.Errorf("missing items, index %s, expected %v but found %v", k, items, found.List()) + } + } + } +} + +func testStoreKeyFunc(obj interface{}) (string, error) { + return obj.(testStoreObject).id, nil +} + +func testStoreIndexFunc(obj interface{}) ([]string, error) { + return []string{obj.(testStoreObject).val}, nil +} + +func testStoreIndexers() Indexers { + indexers := Indexers{} + indexers["by_val"] = testStoreIndexFunc + return indexers +} + +type testStoreObject struct { + id string + val string +} + +func TestCache(t *testing.T) { + doTestStore(t, NewStore(testStoreKeyFunc)) +} + +func TestFIFOCache(t *testing.T) { + doTestStore(t, NewFIFO(testStoreKeyFunc)) +} + +func TestUndeltaStore(t *testing.T) { + nop := func([]interface{}) {} + doTestStore(t, NewUndeltaStore(nop, testStoreKeyFunc)) +} + +func TestIndex(t *testing.T) { + doTestIndex(t, NewIndexer(testStoreKeyFunc, testStoreIndexers())) +} diff --git a/vendor/k8s.io/client-go/tools/cache/testing/fake_controller_source_test.go b/vendor/k8s.io/client-go/tools/cache/testing/fake_controller_source_test.go new file mode 100644 index 000000000..e5097c7a4 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/testing/fake_controller_source_test.go @@ -0,0 +1,95 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package framework + +import ( + "sync" + "testing" + + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/watch" +) + +// ensure the watch delivers the requested and only the requested items. +func consume(t *testing.T, w watch.Interface, rvs []string, done *sync.WaitGroup) { + defer done.Done() + for _, rv := range rvs { + got, ok := <-w.ResultChan() + if !ok { + t.Errorf("%#v: unexpected channel close, wanted %v", rvs, rv) + return + } + gotRV := got.Object.(*v1.Pod).ObjectMeta.ResourceVersion + if e, a := rv, gotRV; e != a { + t.Errorf("wanted %v, got %v", e, a) + } else { + t.Logf("Got %v as expected", gotRV) + } + } + // We should not get anything else. + got, open := <-w.ResultChan() + if open { + t.Errorf("%#v: unwanted object %#v", rvs, got) + } +} + +func TestRCNumber(t *testing.T) { + pod := func(name string) *v1.Pod { + return &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + }, + } + } + + wg := &sync.WaitGroup{} + wg.Add(3) + + source := NewFakeControllerSource() + source.Add(pod("foo")) + source.Modify(pod("foo")) + source.Modify(pod("foo")) + + w, err := source.Watch(metav1.ListOptions{ResourceVersion: "1"}) + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + go consume(t, w, []string{"2", "3"}, wg) + + list, err := source.List(metav1.ListOptions{}) + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + if e, a := "3", list.(*v1.List).ResourceVersion; e != a { + t.Errorf("wanted %v, got %v", e, a) + } + + w2, err := source.Watch(metav1.ListOptions{ResourceVersion: "2"}) + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + go consume(t, w2, []string{"3"}, wg) + + w3, err := source.Watch(metav1.ListOptions{ResourceVersion: "3"}) + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + go consume(t, w3, []string{}, wg) + source.Shutdown() + wg.Wait() +} diff --git a/vendor/k8s.io/client-go/tools/cache/undelta_store_test.go b/vendor/k8s.io/client-go/tools/cache/undelta_store_test.go new file mode 100644 index 000000000..6316442e6 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/undelta_store_test.go @@ -0,0 +1,131 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cache + +import ( + "reflect" + "testing" +) + +// store_test.go checks that UndeltaStore conforms to the Store interface +// behavior. This test just tests that it calls the push func in addition. + +type testUndeltaObject struct { + name string + val interface{} +} + +func testUndeltaKeyFunc(obj interface{}) (string, error) { + return obj.(testUndeltaObject).name, nil +} + +/* +var ( + o1 interface{} = t{1} + o2 interface{} = t{2} + l1 []interface{} = []interface{}{t{1}} +) +*/ + +func TestUpdateCallsPush(t *testing.T) { + mkObj := func(name string, val interface{}) testUndeltaObject { + return testUndeltaObject{name: name, val: val} + } + + var got []interface{} + var callcount int = 0 + push := func(m []interface{}) { + callcount++ + got = m + } + + u := NewUndeltaStore(push, testUndeltaKeyFunc) + + u.Add(mkObj("a", 2)) + u.Update(mkObj("a", 1)) + if callcount != 2 { + t.Errorf("Expected 2 calls, got %d", callcount) + } + + l := []interface{}{mkObj("a", 1)} + if !reflect.DeepEqual(l, got) { + t.Errorf("Expected %#v, Got %#v", l, got) + } +} + +func TestDeleteCallsPush(t *testing.T) { + mkObj := func(name string, val interface{}) testUndeltaObject { + return testUndeltaObject{name: name, val: val} + } + + var got []interface{} + var callcount int = 0 + push := func(m []interface{}) { + callcount++ + got = m + } + + u := NewUndeltaStore(push, testUndeltaKeyFunc) + + u.Add(mkObj("a", 2)) + u.Delete(mkObj("a", "")) + if callcount != 2 { + t.Errorf("Expected 2 calls, got %d", callcount) + } + expected := []interface{}{} + if !reflect.DeepEqual(expected, got) { + t.Errorf("Expected %#v, Got %#v", expected, got) + } +} + +func TestReadsDoNotCallPush(t *testing.T) { + push := func(m []interface{}) { + t.Errorf("Unexpected call to push!") + } + + u := NewUndeltaStore(push, testUndeltaKeyFunc) + + // These should not call push. + _ = u.List() + _, _, _ = u.Get(testUndeltaObject{"a", ""}) +} + +func TestReplaceCallsPush(t *testing.T) { + mkObj := func(name string, val interface{}) testUndeltaObject { + return testUndeltaObject{name: name, val: val} + } + + var got []interface{} + var callcount int = 0 + push := func(m []interface{}) { + callcount++ + got = m + } + + u := NewUndeltaStore(push, testUndeltaKeyFunc) + + m := []interface{}{mkObj("a", 1)} + + u.Replace(m, "0") + if callcount != 1 { + t.Errorf("Expected 1 calls, got %d", callcount) + } + expected := []interface{}{mkObj("a", 1)} + if !reflect.DeepEqual(expected, got) { + t.Errorf("Expected %#v, Got %#v", expected, got) + } +} diff --git a/vendor/k8s.io/client-go/tools/clientcmd/api/helpers_test.go b/vendor/k8s.io/client-go/tools/clientcmd/api/helpers_test.go new file mode 100644 index 000000000..430208456 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/api/helpers_test.go @@ -0,0 +1,301 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package api + +import ( + "fmt" + "io/ioutil" + "os" + "reflect" + "testing" + + "github.com/ghodss/yaml" +) + +func newMergedConfig(certFile, certContent, keyFile, keyContent, caFile, caContent string, t *testing.T) Config { + if err := ioutil.WriteFile(certFile, []byte(certContent), 0644); err != nil { + t.Errorf("unexpected error: %v", err) + } + if err := ioutil.WriteFile(keyFile, []byte(keyContent), 0600); err != nil { + t.Errorf("unexpected error: %v", err) + } + if err := ioutil.WriteFile(caFile, []byte(caContent), 0644); err != nil { + t.Errorf("unexpected error: %v", err) + } + + return Config{ + AuthInfos: map[string]*AuthInfo{ + "red-user": {Token: "red-token", ClientCertificateData: []byte(certContent), ClientKeyData: []byte(keyContent)}, + "blue-user": {Token: "blue-token", ClientCertificate: certFile, ClientKey: keyFile}}, + Clusters: map[string]*Cluster{ + "cow-cluster": {Server: "http://cow.org:8080", CertificateAuthorityData: []byte(caContent)}, + "chicken-cluster": {Server: "http://chicken.org:8080", CertificateAuthority: caFile}}, + Contexts: map[string]*Context{ + "federal-context": {AuthInfo: "red-user", Cluster: "cow-cluster"}, + "shaker-context": {AuthInfo: "blue-user", Cluster: "chicken-cluster"}}, + CurrentContext: "federal-context", + } +} + +func TestMinifySuccess(t *testing.T) { + certFile, _ := ioutil.TempFile("", "") + defer os.Remove(certFile.Name()) + keyFile, _ := ioutil.TempFile("", "") + defer os.Remove(keyFile.Name()) + caFile, _ := ioutil.TempFile("", "") + defer os.Remove(caFile.Name()) + + mutatingConfig := newMergedConfig(certFile.Name(), "cert", keyFile.Name(), "key", caFile.Name(), "ca", t) + + if err := MinifyConfig(&mutatingConfig); err != nil { + t.Errorf("unexpected error: %v", err) + } + + if len(mutatingConfig.Contexts) > 1 { + t.Errorf("unexpected contexts: %v", mutatingConfig.Contexts) + } + if _, exists := mutatingConfig.Contexts["federal-context"]; !exists { + t.Errorf("missing context") + } + + if len(mutatingConfig.Clusters) > 1 { + t.Errorf("unexpected clusters: %v", mutatingConfig.Clusters) + } + if _, exists := mutatingConfig.Clusters["cow-cluster"]; !exists { + t.Errorf("missing cluster") + } + + if len(mutatingConfig.AuthInfos) > 1 { + t.Errorf("unexpected users: %v", mutatingConfig.AuthInfos) + } + if _, exists := mutatingConfig.AuthInfos["red-user"]; !exists { + t.Errorf("missing user") + } +} + +func TestMinifyMissingContext(t *testing.T) { + certFile, _ := ioutil.TempFile("", "") + defer os.Remove(certFile.Name()) + keyFile, _ := ioutil.TempFile("", "") + defer os.Remove(keyFile.Name()) + caFile, _ := ioutil.TempFile("", "") + defer os.Remove(caFile.Name()) + + mutatingConfig := newMergedConfig(certFile.Name(), "cert", keyFile.Name(), "key", caFile.Name(), "ca", t) + mutatingConfig.CurrentContext = "missing" + + errMsg := "cannot locate context missing" + + if err := MinifyConfig(&mutatingConfig); err == nil || err.Error() != errMsg { + t.Errorf("expected %v, got %v", errMsg, err) + } +} + +func TestMinifyMissingCluster(t *testing.T) { + certFile, _ := ioutil.TempFile("", "") + defer os.Remove(certFile.Name()) + keyFile, _ := ioutil.TempFile("", "") + defer os.Remove(keyFile.Name()) + caFile, _ := ioutil.TempFile("", "") + defer os.Remove(caFile.Name()) + + mutatingConfig := newMergedConfig(certFile.Name(), "cert", keyFile.Name(), "key", caFile.Name(), "ca", t) + delete(mutatingConfig.Clusters, mutatingConfig.Contexts[mutatingConfig.CurrentContext].Cluster) + + errMsg := "cannot locate cluster cow-cluster" + + if err := MinifyConfig(&mutatingConfig); err == nil || err.Error() != errMsg { + t.Errorf("expected %v, got %v", errMsg, err) + } +} + +func TestMinifyMissingAuthInfo(t *testing.T) { + certFile, _ := ioutil.TempFile("", "") + defer os.Remove(certFile.Name()) + keyFile, _ := ioutil.TempFile("", "") + defer os.Remove(keyFile.Name()) + caFile, _ := ioutil.TempFile("", "") + defer os.Remove(caFile.Name()) + + mutatingConfig := newMergedConfig(certFile.Name(), "cert", keyFile.Name(), "key", caFile.Name(), "ca", t) + delete(mutatingConfig.AuthInfos, mutatingConfig.Contexts[mutatingConfig.CurrentContext].AuthInfo) + + errMsg := "cannot locate user red-user" + + if err := MinifyConfig(&mutatingConfig); err == nil || err.Error() != errMsg { + t.Errorf("expected %v, got %v", errMsg, err) + } +} + +func TestFlattenSuccess(t *testing.T) { + certFile, _ := ioutil.TempFile("", "") + defer os.Remove(certFile.Name()) + keyFile, _ := ioutil.TempFile("", "") + defer os.Remove(keyFile.Name()) + caFile, _ := ioutil.TempFile("", "") + defer os.Remove(caFile.Name()) + + certData := "cert" + keyData := "key" + caData := "ca" + + unchangingCluster := "cow-cluster" + unchangingAuthInfo := "red-user" + changingCluster := "chicken-cluster" + changingAuthInfo := "blue-user" + + startingConfig := newMergedConfig(certFile.Name(), certData, keyFile.Name(), keyData, caFile.Name(), caData, t) + mutatingConfig := startingConfig + + if err := FlattenConfig(&mutatingConfig); err != nil { + t.Errorf("unexpected error: %v", err) + } + + if len(mutatingConfig.Contexts) != 2 { + t.Errorf("unexpected contexts: %v", mutatingConfig.Contexts) + } + if !reflect.DeepEqual(startingConfig.Contexts, mutatingConfig.Contexts) { + t.Errorf("expected %v, got %v", startingConfig.Contexts, mutatingConfig.Contexts) + } + + if len(mutatingConfig.Clusters) != 2 { + t.Errorf("unexpected clusters: %v", mutatingConfig.Clusters) + } + if !reflect.DeepEqual(startingConfig.Clusters[unchangingCluster], mutatingConfig.Clusters[unchangingCluster]) { + t.Errorf("expected %v, got %v", startingConfig.Clusters[unchangingCluster], mutatingConfig.Clusters[unchangingCluster]) + } + if len(mutatingConfig.Clusters[changingCluster].CertificateAuthority) != 0 { + t.Errorf("unexpected caFile") + } + if string(mutatingConfig.Clusters[changingCluster].CertificateAuthorityData) != caData { + t.Errorf("expected %v, got %v", caData, string(mutatingConfig.Clusters[changingCluster].CertificateAuthorityData)) + } + + if len(mutatingConfig.AuthInfos) != 2 { + t.Errorf("unexpected users: %v", mutatingConfig.AuthInfos) + } + if !reflect.DeepEqual(startingConfig.AuthInfos[unchangingAuthInfo], mutatingConfig.AuthInfos[unchangingAuthInfo]) { + t.Errorf("expected %v, got %v", startingConfig.AuthInfos[unchangingAuthInfo], mutatingConfig.AuthInfos[unchangingAuthInfo]) + } + if len(mutatingConfig.AuthInfos[changingAuthInfo].ClientCertificate) != 0 { + t.Errorf("unexpected caFile") + } + if string(mutatingConfig.AuthInfos[changingAuthInfo].ClientCertificateData) != certData { + t.Errorf("expected %v, got %v", certData, string(mutatingConfig.AuthInfos[changingAuthInfo].ClientCertificateData)) + } + if len(mutatingConfig.AuthInfos[changingAuthInfo].ClientKey) != 0 { + t.Errorf("unexpected caFile") + } + if string(mutatingConfig.AuthInfos[changingAuthInfo].ClientKeyData) != keyData { + t.Errorf("expected %v, got %v", keyData, string(mutatingConfig.AuthInfos[changingAuthInfo].ClientKeyData)) + } + +} + +func Example_minifyAndShorten() { + certFile, _ := ioutil.TempFile("", "") + defer os.Remove(certFile.Name()) + keyFile, _ := ioutil.TempFile("", "") + defer os.Remove(keyFile.Name()) + caFile, _ := ioutil.TempFile("", "") + defer os.Remove(caFile.Name()) + + certData := "cert" + keyData := "key" + caData := "ca" + + config := newMergedConfig(certFile.Name(), certData, keyFile.Name(), keyData, caFile.Name(), caData, nil) + + MinifyConfig(&config) + ShortenConfig(&config) + + output, _ := yaml.Marshal(config) + fmt.Printf("%s", string(output)) + // Output: + // clusters: + // cow-cluster: + // LocationOfOrigin: "" + // certificate-authority-data: REDACTED + // server: http://cow.org:8080 + // contexts: + // federal-context: + // LocationOfOrigin: "" + // cluster: cow-cluster + // user: red-user + // current-context: federal-context + // preferences: {} + // users: + // red-user: + // LocationOfOrigin: "" + // client-certificate-data: REDACTED + // client-key-data: REDACTED + // token: red-token +} + +func TestShortenSuccess(t *testing.T) { + certFile, _ := ioutil.TempFile("", "") + defer os.Remove(certFile.Name()) + keyFile, _ := ioutil.TempFile("", "") + defer os.Remove(keyFile.Name()) + caFile, _ := ioutil.TempFile("", "") + defer os.Remove(caFile.Name()) + + certData := "cert" + keyData := "key" + caData := "ca" + + unchangingCluster := "chicken-cluster" + unchangingAuthInfo := "blue-user" + changingCluster := "cow-cluster" + changingAuthInfo := "red-user" + + startingConfig := newMergedConfig(certFile.Name(), certData, keyFile.Name(), keyData, caFile.Name(), caData, t) + mutatingConfig := startingConfig + + ShortenConfig(&mutatingConfig) + + if len(mutatingConfig.Contexts) != 2 { + t.Errorf("unexpected contexts: %v", mutatingConfig.Contexts) + } + if !reflect.DeepEqual(startingConfig.Contexts, mutatingConfig.Contexts) { + t.Errorf("expected %v, got %v", startingConfig.Contexts, mutatingConfig.Contexts) + } + + redacted := string(redactedBytes) + if len(mutatingConfig.Clusters) != 2 { + t.Errorf("unexpected clusters: %v", mutatingConfig.Clusters) + } + if !reflect.DeepEqual(startingConfig.Clusters[unchangingCluster], mutatingConfig.Clusters[unchangingCluster]) { + t.Errorf("expected %v, got %v", startingConfig.Clusters[unchangingCluster], mutatingConfig.Clusters[unchangingCluster]) + } + if string(mutatingConfig.Clusters[changingCluster].CertificateAuthorityData) != redacted { + t.Errorf("expected %v, got %v", redacted, string(mutatingConfig.Clusters[changingCluster].CertificateAuthorityData)) + } + + if len(mutatingConfig.AuthInfos) != 2 { + t.Errorf("unexpected users: %v", mutatingConfig.AuthInfos) + } + if !reflect.DeepEqual(startingConfig.AuthInfos[unchangingAuthInfo], mutatingConfig.AuthInfos[unchangingAuthInfo]) { + t.Errorf("expected %v, got %v", startingConfig.AuthInfos[unchangingAuthInfo], mutatingConfig.AuthInfos[unchangingAuthInfo]) + } + if string(mutatingConfig.AuthInfos[changingAuthInfo].ClientCertificateData) != redacted { + t.Errorf("expected %v, got %v", redacted, string(mutatingConfig.AuthInfos[changingAuthInfo].ClientCertificateData)) + } + if string(mutatingConfig.AuthInfos[changingAuthInfo].ClientKeyData) != redacted { + t.Errorf("expected %v, got %v", redacted, string(mutatingConfig.AuthInfos[changingAuthInfo].ClientKeyData)) + } +} diff --git a/vendor/k8s.io/client-go/tools/clientcmd/api/types_test.go b/vendor/k8s.io/client-go/tools/clientcmd/api/types_test.go new file mode 100644 index 000000000..bd3483452 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/api/types_test.go @@ -0,0 +1,135 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package api + +import ( + "fmt" + + "github.com/ghodss/yaml" +) + +func Example_emptyConfig() { + defaultConfig := NewConfig() + + output, err := yaml.Marshal(defaultConfig) + if err != nil { + fmt.Printf("Unexpected error: %v", err) + } + + fmt.Printf("%v", string(output)) + // Output: + // clusters: {} + // contexts: {} + // current-context: "" + // preferences: {} + // users: {} +} + +func Example_ofOptionsConfig() { + defaultConfig := NewConfig() + defaultConfig.Preferences.Colors = true + defaultConfig.Clusters["alfa"] = &Cluster{ + Server: "https://alfa.org:8080", + InsecureSkipTLSVerify: true, + CertificateAuthority: "path/to/my/cert-ca-filename", + } + defaultConfig.Clusters["bravo"] = &Cluster{ + Server: "https://bravo.org:8080", + InsecureSkipTLSVerify: false, + } + defaultConfig.AuthInfos["white-mage-via-cert"] = &AuthInfo{ + ClientCertificate: "path/to/my/client-cert-filename", + ClientKey: "path/to/my/client-key-filename", + } + defaultConfig.AuthInfos["red-mage-via-token"] = &AuthInfo{ + Token: "my-secret-token", + } + defaultConfig.AuthInfos["black-mage-via-auth-provider"] = &AuthInfo{ + AuthProvider: &AuthProviderConfig{ + Name: "gcp", + Config: map[string]string{ + "foo": "bar", + "token": "s3cr3t-t0k3n", + }, + }, + } + defaultConfig.Contexts["bravo-as-black-mage"] = &Context{ + Cluster: "bravo", + AuthInfo: "black-mage-via-auth-provider", + Namespace: "yankee", + } + defaultConfig.Contexts["alfa-as-black-mage"] = &Context{ + Cluster: "alfa", + AuthInfo: "black-mage-via-auth-provider", + Namespace: "zulu", + } + defaultConfig.Contexts["alfa-as-white-mage"] = &Context{ + Cluster: "alfa", + AuthInfo: "white-mage-via-cert", + } + defaultConfig.CurrentContext = "alfa-as-white-mage" + + output, err := yaml.Marshal(defaultConfig) + if err != nil { + fmt.Printf("Unexpected error: %v", err) + } + + fmt.Printf("%v", string(output)) + // Output: + // clusters: + // alfa: + // LocationOfOrigin: "" + // certificate-authority: path/to/my/cert-ca-filename + // insecure-skip-tls-verify: true + // server: https://alfa.org:8080 + // bravo: + // LocationOfOrigin: "" + // server: https://bravo.org:8080 + // contexts: + // alfa-as-black-mage: + // LocationOfOrigin: "" + // cluster: alfa + // namespace: zulu + // user: black-mage-via-auth-provider + // alfa-as-white-mage: + // LocationOfOrigin: "" + // cluster: alfa + // user: white-mage-via-cert + // bravo-as-black-mage: + // LocationOfOrigin: "" + // cluster: bravo + // namespace: yankee + // user: black-mage-via-auth-provider + // current-context: alfa-as-white-mage + // preferences: + // colors: true + // users: + // black-mage-via-auth-provider: + // LocationOfOrigin: "" + // auth-provider: + // config: + // foo: bar + // token: s3cr3t-t0k3n + // name: gcp + // red-mage-via-token: + // LocationOfOrigin: "" + // token: my-secret-token + // white-mage-via-cert: + // LocationOfOrigin: "" + // client-certificate: path/to/my/client-cert-filename + // client-key: path/to/my/client-key-filename +} diff --git a/vendor/k8s.io/client-go/tools/clientcmd/client_config_test.go b/vendor/k8s.io/client-go/tools/clientcmd/client_config_test.go new file mode 100644 index 000000000..9c08ff89d --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/client_config_test.go @@ -0,0 +1,528 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package clientcmd + +import ( + "io/ioutil" + "os" + "reflect" + "strings" + "testing" + + "github.com/imdario/mergo" + restclient "k8s.io/client-go/rest" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" +) + +func TestOldMergoLib(t *testing.T) { + type T struct { + X string + } + dst := T{X: "one"} + src := T{X: "two"} + mergo.Merge(&dst, &src) + if dst.X != "two" { + // mergo.Merge changed in an incompatible way with + // + // https://github.com/imdario/mergo/commit/d304790b2ed594794496464fadd89d2bb266600a + // + // We have to stay with the old version which still does eager + // copying from src to dst in structs. + t.Errorf("mergo.Merge library found with incompatible, new behavior") + } +} + +func createValidTestConfig() *clientcmdapi.Config { + const ( + server = "https://anything.com:8080" + token = "the-token" + ) + + config := clientcmdapi.NewConfig() + config.Clusters["clean"] = &clientcmdapi.Cluster{ + Server: server, + } + config.AuthInfos["clean"] = &clientcmdapi.AuthInfo{ + Token: token, + } + config.Contexts["clean"] = &clientcmdapi.Context{ + Cluster: "clean", + AuthInfo: "clean", + } + config.CurrentContext = "clean" + + return config +} + +func createCAValidTestConfig() *clientcmdapi.Config { + + config := createValidTestConfig() + config.Clusters["clean"].CertificateAuthorityData = []byte{0, 0} + return config +} + +func TestInsecureOverridesCA(t *testing.T) { + config := createCAValidTestConfig() + clientBuilder := NewNonInteractiveClientConfig(*config, "clean", &ConfigOverrides{ + ClusterInfo: clientcmdapi.Cluster{ + InsecureSkipTLSVerify: true, + }, + }, nil) + + actualCfg, err := clientBuilder.ClientConfig() + if err != nil { + t.Errorf("Unexpected error: %v", err) + } + + matchBoolArg(true, actualCfg.Insecure, t) + matchStringArg("", actualCfg.TLSClientConfig.CAFile, t) + matchByteArg(nil, actualCfg.TLSClientConfig.CAData, t) +} + +func TestMergeContext(t *testing.T) { + const namespace = "overriden-namespace" + + config := createValidTestConfig() + clientBuilder := NewNonInteractiveClientConfig(*config, "clean", &ConfigOverrides{}, nil) + + _, overridden, err := clientBuilder.Namespace() + if err != nil { + t.Errorf("Unexpected error: %v", err) + } + + if overridden { + t.Error("Expected namespace to not be overridden") + } + + clientBuilder = NewNonInteractiveClientConfig(*config, "clean", &ConfigOverrides{ + Context: clientcmdapi.Context{ + Namespace: namespace, + }, + }, nil) + + actual, overridden, err := clientBuilder.Namespace() + if err != nil { + t.Errorf("Unexpected error: %v", err) + } + + if !overridden { + t.Error("Expected namespace to be overridden") + } + + matchStringArg(namespace, actual, t) +} + +func TestCertificateData(t *testing.T) { + caData := []byte("ca-data") + certData := []byte("cert-data") + keyData := []byte("key-data") + + config := clientcmdapi.NewConfig() + config.Clusters["clean"] = &clientcmdapi.Cluster{ + Server: "https://localhost:8443", + CertificateAuthorityData: caData, + } + config.AuthInfos["clean"] = &clientcmdapi.AuthInfo{ + ClientCertificateData: certData, + ClientKeyData: keyData, + } + config.Contexts["clean"] = &clientcmdapi.Context{ + Cluster: "clean", + AuthInfo: "clean", + } + config.CurrentContext = "clean" + + clientBuilder := NewNonInteractiveClientConfig(*config, "clean", &ConfigOverrides{}, nil) + + clientConfig, err := clientBuilder.ClientConfig() + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + + // Make sure cert data gets into config (will override file paths) + matchByteArg(caData, clientConfig.TLSClientConfig.CAData, t) + matchByteArg(certData, clientConfig.TLSClientConfig.CertData, t) + matchByteArg(keyData, clientConfig.TLSClientConfig.KeyData, t) +} + +func TestBasicAuthData(t *testing.T) { + username := "myuser" + password := "mypass" + + config := clientcmdapi.NewConfig() + config.Clusters["clean"] = &clientcmdapi.Cluster{ + Server: "https://localhost:8443", + } + config.AuthInfos["clean"] = &clientcmdapi.AuthInfo{ + Username: username, + Password: password, + } + config.Contexts["clean"] = &clientcmdapi.Context{ + Cluster: "clean", + AuthInfo: "clean", + } + config.CurrentContext = "clean" + + clientBuilder := NewNonInteractiveClientConfig(*config, "clean", &ConfigOverrides{}, nil) + + clientConfig, err := clientBuilder.ClientConfig() + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + + // Make sure basic auth data gets into config + matchStringArg(username, clientConfig.Username, t) + matchStringArg(password, clientConfig.Password, t) +} + +func TestBasicTokenFile(t *testing.T) { + token := "exampletoken" + f, err := ioutil.TempFile("", "tokenfile") + if err != nil { + t.Errorf("Unexpected error: %v", err) + return + } + defer os.Remove(f.Name()) + if err := ioutil.WriteFile(f.Name(), []byte(token), 0644); err != nil { + t.Errorf("Unexpected error: %v", err) + return + } + + config := clientcmdapi.NewConfig() + config.Clusters["clean"] = &clientcmdapi.Cluster{ + Server: "https://localhost:8443", + } + config.AuthInfos["clean"] = &clientcmdapi.AuthInfo{ + TokenFile: f.Name(), + } + config.Contexts["clean"] = &clientcmdapi.Context{ + Cluster: "clean", + AuthInfo: "clean", + } + config.CurrentContext = "clean" + + clientBuilder := NewNonInteractiveClientConfig(*config, "clean", &ConfigOverrides{}, nil) + + clientConfig, err := clientBuilder.ClientConfig() + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + + matchStringArg(token, clientConfig.BearerToken, t) +} + +func TestPrecedenceTokenFile(t *testing.T) { + token := "exampletoken" + f, err := ioutil.TempFile("", "tokenfile") + if err != nil { + t.Errorf("Unexpected error: %v", err) + return + } + defer os.Remove(f.Name()) + if err := ioutil.WriteFile(f.Name(), []byte(token), 0644); err != nil { + t.Errorf("Unexpected error: %v", err) + return + } + + config := clientcmdapi.NewConfig() + config.Clusters["clean"] = &clientcmdapi.Cluster{ + Server: "https://localhost:8443", + } + expectedToken := "expected" + config.AuthInfos["clean"] = &clientcmdapi.AuthInfo{ + Token: expectedToken, + TokenFile: f.Name(), + } + config.Contexts["clean"] = &clientcmdapi.Context{ + Cluster: "clean", + AuthInfo: "clean", + } + config.CurrentContext = "clean" + + clientBuilder := NewNonInteractiveClientConfig(*config, "clean", &ConfigOverrides{}, nil) + + clientConfig, err := clientBuilder.ClientConfig() + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + + matchStringArg(expectedToken, clientConfig.BearerToken, t) +} + +func TestCreateClean(t *testing.T) { + config := createValidTestConfig() + clientBuilder := NewNonInteractiveClientConfig(*config, "clean", &ConfigOverrides{}, nil) + + clientConfig, err := clientBuilder.ClientConfig() + if err != nil { + t.Errorf("Unexpected error: %v", err) + } + + matchStringArg(config.Clusters["clean"].Server, clientConfig.Host, t) + matchStringArg("", clientConfig.APIPath, t) + matchBoolArg(config.Clusters["clean"].InsecureSkipTLSVerify, clientConfig.Insecure, t) + matchStringArg(config.AuthInfos["clean"].Token, clientConfig.BearerToken, t) +} + +func TestCreateCleanWithPrefix(t *testing.T) { + tt := []struct { + server string + host string + }{ + {"https://anything.com:8080/foo/bar", "https://anything.com:8080/foo/bar"}, + {"http://anything.com:8080/foo/bar", "http://anything.com:8080/foo/bar"}, + {"http://anything.com:8080/foo/bar/", "http://anything.com:8080/foo/bar/"}, + {"http://anything.com:8080/", "http://anything.com:8080/"}, + {"http://anything.com:8080//", "http://anything.com:8080//"}, + {"anything.com:8080/foo/bar", "anything.com:8080/foo/bar"}, + {"anything.com:8080", "anything.com:8080"}, + {"anything.com", "anything.com"}, + {"anything", "anything"}, + } + + tt = append(tt, struct{ server, host string }{"", "http://localhost:8080"}) + + for _, tc := range tt { + config := createValidTestConfig() + + cleanConfig := config.Clusters["clean"] + cleanConfig.Server = tc.server + config.Clusters["clean"] = cleanConfig + + clientBuilder := NewNonInteractiveClientConfig(*config, "clean", &ConfigOverrides{ + ClusterDefaults: clientcmdapi.Cluster{Server: "http://localhost:8080"}, + }, nil) + + clientConfig, err := clientBuilder.ClientConfig() + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + + matchStringArg(tc.host, clientConfig.Host, t) + } +} + +func TestCreateCleanDefault(t *testing.T) { + config := createValidTestConfig() + clientBuilder := NewDefaultClientConfig(*config, &ConfigOverrides{}) + + clientConfig, err := clientBuilder.ClientConfig() + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + + matchStringArg(config.Clusters["clean"].Server, clientConfig.Host, t) + matchBoolArg(config.Clusters["clean"].InsecureSkipTLSVerify, clientConfig.Insecure, t) + matchStringArg(config.AuthInfos["clean"].Token, clientConfig.BearerToken, t) +} + +func TestCreateCleanDefaultCluster(t *testing.T) { + config := createValidTestConfig() + clientBuilder := NewDefaultClientConfig(*config, &ConfigOverrides{ + ClusterDefaults: clientcmdapi.Cluster{Server: "http://localhost:8080"}, + }) + + clientConfig, err := clientBuilder.ClientConfig() + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + + matchStringArg(config.Clusters["clean"].Server, clientConfig.Host, t) + matchBoolArg(config.Clusters["clean"].InsecureSkipTLSVerify, clientConfig.Insecure, t) + matchStringArg(config.AuthInfos["clean"].Token, clientConfig.BearerToken, t) +} + +func TestCreateMissingContextNoDefault(t *testing.T) { + const expectedErrorContains = "Context was not found for specified context" + config := createValidTestConfig() + clientBuilder := NewNonInteractiveClientConfig(*config, "not-present", &ConfigOverrides{}, nil) + + _, err := clientBuilder.ClientConfig() + if err == nil { + t.Fatalf("Unexpected error: %v", err) + } +} + +func TestCreateMissingContext(t *testing.T) { + const expectedErrorContains = "context was not found for specified context: not-present" + config := createValidTestConfig() + clientBuilder := NewNonInteractiveClientConfig(*config, "not-present", &ConfigOverrides{ + ClusterDefaults: clientcmdapi.Cluster{Server: "http://localhost:8080"}, + }, nil) + + _, err := clientBuilder.ClientConfig() + if err == nil { + t.Fatalf("Expected error: %v", expectedErrorContains) + } + if !strings.Contains(err.Error(), expectedErrorContains) { + t.Fatalf("Expected error: %v, but got %v", expectedErrorContains, err) + } +} + +func TestInClusterClientConfigPrecedence(t *testing.T) { + tt := []struct { + overrides *ConfigOverrides + }{ + { + overrides: &ConfigOverrides{ + ClusterInfo: clientcmdapi.Cluster{ + Server: "https://host-from-overrides.com", + }, + }, + }, + { + overrides: &ConfigOverrides{ + AuthInfo: clientcmdapi.AuthInfo{ + Token: "https://host-from-overrides.com", + }, + }, + }, + { + overrides: &ConfigOverrides{ + ClusterInfo: clientcmdapi.Cluster{ + CertificateAuthority: "/path/to/ca-from-overrides.crt", + }, + }, + }, + { + overrides: &ConfigOverrides{ + ClusterInfo: clientcmdapi.Cluster{ + Server: "https://host-from-overrides.com", + }, + AuthInfo: clientcmdapi.AuthInfo{ + Token: "https://host-from-overrides.com", + }, + }, + }, + { + overrides: &ConfigOverrides{ + ClusterInfo: clientcmdapi.Cluster{ + Server: "https://host-from-overrides.com", + CertificateAuthority: "/path/to/ca-from-overrides.crt", + }, + }, + }, + { + overrides: &ConfigOverrides{ + ClusterInfo: clientcmdapi.Cluster{ + CertificateAuthority: "/path/to/ca-from-overrides.crt", + }, + AuthInfo: clientcmdapi.AuthInfo{ + Token: "https://host-from-overrides.com", + }, + }, + }, + { + overrides: &ConfigOverrides{ + ClusterInfo: clientcmdapi.Cluster{ + Server: "https://host-from-overrides.com", + CertificateAuthority: "/path/to/ca-from-overrides.crt", + }, + AuthInfo: clientcmdapi.AuthInfo{ + Token: "https://host-from-overrides.com", + }, + }, + }, + { + overrides: &ConfigOverrides{}, + }, + } + + for _, tc := range tt { + expectedServer := "https://host-from-cluster.com" + expectedToken := "token-from-cluster" + expectedCAFile := "/path/to/ca-from-cluster.crt" + + icc := &inClusterClientConfig{ + inClusterConfigProvider: func() (*restclient.Config, error) { + return &restclient.Config{ + Host: expectedServer, + BearerToken: expectedToken, + TLSClientConfig: restclient.TLSClientConfig{ + CAFile: expectedCAFile, + }, + }, nil + }, + overrides: tc.overrides, + } + + clientConfig, err := icc.ClientConfig() + if err != nil { + t.Fatalf("Unxpected error: %v", err) + } + + if overridenServer := tc.overrides.ClusterInfo.Server; len(overridenServer) > 0 { + expectedServer = overridenServer + } + if overridenToken := tc.overrides.AuthInfo.Token; len(overridenToken) > 0 { + expectedToken = overridenToken + } + if overridenCAFile := tc.overrides.ClusterInfo.CertificateAuthority; len(overridenCAFile) > 0 { + expectedCAFile = overridenCAFile + } + + if clientConfig.Host != expectedServer { + t.Errorf("Expected server %v, got %v", expectedServer, clientConfig.Host) + } + if clientConfig.BearerToken != expectedToken { + t.Errorf("Expected token %v, got %v", expectedToken, clientConfig.BearerToken) + } + if clientConfig.TLSClientConfig.CAFile != expectedCAFile { + t.Errorf("Expected Certificate Authority %v, got %v", expectedCAFile, clientConfig.TLSClientConfig.CAFile) + } + } +} + +func matchBoolArg(expected, got bool, t *testing.T) { + if expected != got { + t.Errorf("Expected %v, got %v", expected, got) + } +} + +func matchStringArg(expected, got string, t *testing.T) { + if expected != got { + t.Errorf("Expected %q, got %q", expected, got) + } +} + +func matchByteArg(expected, got []byte, t *testing.T) { + if !reflect.DeepEqual(expected, got) { + t.Errorf("Expected %v, got %v", expected, got) + } +} + +func TestNamespaceOverride(t *testing.T) { + config := &DirectClientConfig{ + overrides: &ConfigOverrides{ + Context: clientcmdapi.Context{ + Namespace: "foo", + }, + }, + } + + ns, overridden, err := config.Namespace() + + if err != nil { + t.Errorf("Unexpected error: %v", err) + } + + if !overridden { + t.Errorf("Expected overridden = true") + } + + matchStringArg("foo", ns, t) +} diff --git a/vendor/k8s.io/client-go/tools/clientcmd/doc.go b/vendor/k8s.io/client-go/tools/clientcmd/doc.go index c07ace6a5..424311ee1 100644 --- a/vendor/k8s.io/client-go/tools/clientcmd/doc.go +++ b/vendor/k8s.io/client-go/tools/clientcmd/doc.go @@ -34,4 +34,4 @@ Sample usage from merged .kubeconfig files (local directory, home directory) client, err := metav1.New(config) // ... */ -package clientcmd +package clientcmd // import "k8s.io/client-go/tools/clientcmd" diff --git a/vendor/k8s.io/client-go/tools/clientcmd/loader_test.go b/vendor/k8s.io/client-go/tools/clientcmd/loader_test.go new file mode 100644 index 000000000..74319788a --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/loader_test.go @@ -0,0 +1,579 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package clientcmd + +import ( + "fmt" + "io/ioutil" + "os" + "path" + "path/filepath" + "reflect" + "strings" + "testing" + + "github.com/ghodss/yaml" + + "k8s.io/apimachinery/pkg/runtime" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" + clientcmdlatest "k8s.io/client-go/tools/clientcmd/api/latest" +) + +var ( + testConfigAlfa = clientcmdapi.Config{ + AuthInfos: map[string]*clientcmdapi.AuthInfo{ + "red-user": {Token: "red-token"}}, + Clusters: map[string]*clientcmdapi.Cluster{ + "cow-cluster": {Server: "http://cow.org:8080"}}, + Contexts: map[string]*clientcmdapi.Context{ + "federal-context": {AuthInfo: "red-user", Cluster: "cow-cluster", Namespace: "hammer-ns"}}, + } + testConfigBravo = clientcmdapi.Config{ + AuthInfos: map[string]*clientcmdapi.AuthInfo{ + "black-user": {Token: "black-token"}}, + Clusters: map[string]*clientcmdapi.Cluster{ + "pig-cluster": {Server: "http://pig.org:8080"}}, + Contexts: map[string]*clientcmdapi.Context{ + "queen-anne-context": {AuthInfo: "black-user", Cluster: "pig-cluster", Namespace: "saw-ns"}}, + } + testConfigCharlie = clientcmdapi.Config{ + AuthInfos: map[string]*clientcmdapi.AuthInfo{ + "green-user": {Token: "green-token"}}, + Clusters: map[string]*clientcmdapi.Cluster{ + "horse-cluster": {Server: "http://horse.org:8080"}}, + Contexts: map[string]*clientcmdapi.Context{ + "shaker-context": {AuthInfo: "green-user", Cluster: "horse-cluster", Namespace: "chisel-ns"}}, + } + testConfigDelta = clientcmdapi.Config{ + AuthInfos: map[string]*clientcmdapi.AuthInfo{ + "blue-user": {Token: "blue-token"}}, + Clusters: map[string]*clientcmdapi.Cluster{ + "chicken-cluster": {Server: "http://chicken.org:8080"}}, + Contexts: map[string]*clientcmdapi.Context{ + "gothic-context": {AuthInfo: "blue-user", Cluster: "chicken-cluster", Namespace: "plane-ns"}}, + } + + testConfigConflictAlfa = clientcmdapi.Config{ + AuthInfos: map[string]*clientcmdapi.AuthInfo{ + "red-user": {Token: "a-different-red-token"}, + "yellow-user": {Token: "yellow-token"}}, + Clusters: map[string]*clientcmdapi.Cluster{ + "cow-cluster": {Server: "http://a-different-cow.org:8080", InsecureSkipTLSVerify: true}, + "donkey-cluster": {Server: "http://donkey.org:8080", InsecureSkipTLSVerify: true}}, + CurrentContext: "federal-context", + } +) + +func TestNonExistentCommandLineFile(t *testing.T) { + loadingRules := ClientConfigLoadingRules{ + ExplicitPath: "bogus_file", + } + + _, err := loadingRules.Load() + if err == nil { + t.Fatalf("Expected error for missing command-line file, got none") + } + if !strings.Contains(err.Error(), "bogus_file") { + t.Fatalf("Expected error about 'bogus_file', got %s", err.Error()) + } +} + +func TestToleratingMissingFiles(t *testing.T) { + loadingRules := ClientConfigLoadingRules{ + Precedence: []string{"bogus1", "bogus2", "bogus3"}, + } + + _, err := loadingRules.Load() + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } +} + +func TestErrorReadingFile(t *testing.T) { + commandLineFile, _ := ioutil.TempFile("", "") + defer os.Remove(commandLineFile.Name()) + + if err := ioutil.WriteFile(commandLineFile.Name(), []byte("bogus value"), 0644); err != nil { + t.Fatalf("Error creating tempfile: %v", err) + } + + loadingRules := ClientConfigLoadingRules{ + ExplicitPath: commandLineFile.Name(), + } + + _, err := loadingRules.Load() + if err == nil { + t.Fatalf("Expected error for unloadable file, got none") + } + if !strings.Contains(err.Error(), commandLineFile.Name()) { + t.Fatalf("Expected error about '%s', got %s", commandLineFile.Name(), err.Error()) + } +} + +func TestErrorReadingNonFile(t *testing.T) { + tmpdir, err := ioutil.TempDir("", "") + if err != nil { + t.Fatalf("Couldn't create tmpdir") + } + defer os.RemoveAll(tmpdir) + + loadingRules := ClientConfigLoadingRules{ + ExplicitPath: tmpdir, + } + + _, err = loadingRules.Load() + if err == nil { + t.Fatalf("Expected error for non-file, got none") + } + if !strings.Contains(err.Error(), tmpdir) { + t.Fatalf("Expected error about '%s', got %s", tmpdir, err.Error()) + } +} + +func TestConflictingCurrentContext(t *testing.T) { + commandLineFile, _ := ioutil.TempFile("", "") + defer os.Remove(commandLineFile.Name()) + envVarFile, _ := ioutil.TempFile("", "") + defer os.Remove(envVarFile.Name()) + + mockCommandLineConfig := clientcmdapi.Config{ + CurrentContext: "any-context-value", + } + mockEnvVarConfig := clientcmdapi.Config{ + CurrentContext: "a-different-context", + } + + WriteToFile(mockCommandLineConfig, commandLineFile.Name()) + WriteToFile(mockEnvVarConfig, envVarFile.Name()) + + loadingRules := ClientConfigLoadingRules{ + ExplicitPath: commandLineFile.Name(), + Precedence: []string{envVarFile.Name()}, + } + + mergedConfig, err := loadingRules.Load() + if err != nil { + t.Errorf("Unexpected error: %v", err) + } + + if mergedConfig.CurrentContext != mockCommandLineConfig.CurrentContext { + t.Errorf("expected %v, got %v", mockCommandLineConfig.CurrentContext, mergedConfig.CurrentContext) + } +} + +func TestLoadingEmptyMaps(t *testing.T) { + configFile, _ := ioutil.TempFile("", "") + defer os.Remove(configFile.Name()) + + mockConfig := clientcmdapi.Config{ + CurrentContext: "any-context-value", + } + + WriteToFile(mockConfig, configFile.Name()) + + config, err := LoadFromFile(configFile.Name()) + if err != nil { + t.Errorf("Unexpected error: %v", err) + } + + if config.Clusters == nil { + t.Error("expected config.Clusters to be non-nil") + } + if config.AuthInfos == nil { + t.Error("expected config.AuthInfos to be non-nil") + } + if config.Contexts == nil { + t.Error("expected config.Contexts to be non-nil") + } +} + +func TestResolveRelativePaths(t *testing.T) { + pathResolutionConfig1 := clientcmdapi.Config{ + AuthInfos: map[string]*clientcmdapi.AuthInfo{ + "relative-user-1": {ClientCertificate: "relative/client/cert", ClientKey: "../relative/client/key"}, + "absolute-user-1": {ClientCertificate: "/absolute/client/cert", ClientKey: "/absolute/client/key"}, + }, + Clusters: map[string]*clientcmdapi.Cluster{ + "relative-server-1": {CertificateAuthority: "../relative/ca"}, + "absolute-server-1": {CertificateAuthority: "/absolute/ca"}, + }, + } + pathResolutionConfig2 := clientcmdapi.Config{ + AuthInfos: map[string]*clientcmdapi.AuthInfo{ + "relative-user-2": {ClientCertificate: "relative/client/cert2", ClientKey: "../relative/client/key2"}, + "absolute-user-2": {ClientCertificate: "/absolute/client/cert2", ClientKey: "/absolute/client/key2"}, + }, + Clusters: map[string]*clientcmdapi.Cluster{ + "relative-server-2": {CertificateAuthority: "../relative/ca2"}, + "absolute-server-2": {CertificateAuthority: "/absolute/ca2"}, + }, + } + + configDir1, _ := ioutil.TempDir("", "") + defer os.RemoveAll(configDir1) + configFile1 := path.Join(configDir1, ".kubeconfig") + configDir1, _ = filepath.Abs(configDir1) + + configDir2, _ := ioutil.TempDir("", "") + defer os.RemoveAll(configDir2) + configDir2, _ = ioutil.TempDir(configDir2, "") + configFile2 := path.Join(configDir2, ".kubeconfig") + configDir2, _ = filepath.Abs(configDir2) + + WriteToFile(pathResolutionConfig1, configFile1) + WriteToFile(pathResolutionConfig2, configFile2) + + loadingRules := ClientConfigLoadingRules{ + Precedence: []string{configFile1, configFile2}, + } + + mergedConfig, err := loadingRules.Load() + if err != nil { + t.Errorf("Unexpected error: %v", err) + } + + foundClusterCount := 0 + for key, cluster := range mergedConfig.Clusters { + if key == "relative-server-1" { + foundClusterCount++ + matchStringArg(path.Join(configDir1, pathResolutionConfig1.Clusters["relative-server-1"].CertificateAuthority), cluster.CertificateAuthority, t) + } + if key == "relative-server-2" { + foundClusterCount++ + matchStringArg(path.Join(configDir2, pathResolutionConfig2.Clusters["relative-server-2"].CertificateAuthority), cluster.CertificateAuthority, t) + } + if key == "absolute-server-1" { + foundClusterCount++ + matchStringArg(pathResolutionConfig1.Clusters["absolute-server-1"].CertificateAuthority, cluster.CertificateAuthority, t) + } + if key == "absolute-server-2" { + foundClusterCount++ + matchStringArg(pathResolutionConfig2.Clusters["absolute-server-2"].CertificateAuthority, cluster.CertificateAuthority, t) + } + } + if foundClusterCount != 4 { + t.Errorf("Expected 4 clusters, found %v: %v", foundClusterCount, mergedConfig.Clusters) + } + + foundAuthInfoCount := 0 + for key, authInfo := range mergedConfig.AuthInfos { + if key == "relative-user-1" { + foundAuthInfoCount++ + matchStringArg(path.Join(configDir1, pathResolutionConfig1.AuthInfos["relative-user-1"].ClientCertificate), authInfo.ClientCertificate, t) + matchStringArg(path.Join(configDir1, pathResolutionConfig1.AuthInfos["relative-user-1"].ClientKey), authInfo.ClientKey, t) + } + if key == "relative-user-2" { + foundAuthInfoCount++ + matchStringArg(path.Join(configDir2, pathResolutionConfig2.AuthInfos["relative-user-2"].ClientCertificate), authInfo.ClientCertificate, t) + matchStringArg(path.Join(configDir2, pathResolutionConfig2.AuthInfos["relative-user-2"].ClientKey), authInfo.ClientKey, t) + } + if key == "absolute-user-1" { + foundAuthInfoCount++ + matchStringArg(pathResolutionConfig1.AuthInfos["absolute-user-1"].ClientCertificate, authInfo.ClientCertificate, t) + matchStringArg(pathResolutionConfig1.AuthInfos["absolute-user-1"].ClientKey, authInfo.ClientKey, t) + } + if key == "absolute-user-2" { + foundAuthInfoCount++ + matchStringArg(pathResolutionConfig2.AuthInfos["absolute-user-2"].ClientCertificate, authInfo.ClientCertificate, t) + matchStringArg(pathResolutionConfig2.AuthInfos["absolute-user-2"].ClientKey, authInfo.ClientKey, t) + } + } + if foundAuthInfoCount != 4 { + t.Errorf("Expected 4 users, found %v: %v", foundAuthInfoCount, mergedConfig.AuthInfos) + } + +} + +func TestMigratingFile(t *testing.T) { + sourceFile, _ := ioutil.TempFile("", "") + defer os.Remove(sourceFile.Name()) + destinationFile, _ := ioutil.TempFile("", "") + // delete the file so that we'll write to it + os.Remove(destinationFile.Name()) + + WriteToFile(testConfigAlfa, sourceFile.Name()) + + loadingRules := ClientConfigLoadingRules{ + MigrationRules: map[string]string{destinationFile.Name(): sourceFile.Name()}, + } + + if _, err := loadingRules.Load(); err != nil { + t.Errorf("unexpected error %v", err) + } + + // the load should have recreated this file + defer os.Remove(destinationFile.Name()) + + sourceContent, err := ioutil.ReadFile(sourceFile.Name()) + if err != nil { + t.Errorf("unexpected error %v", err) + } + destinationContent, err := ioutil.ReadFile(destinationFile.Name()) + if err != nil { + t.Errorf("unexpected error %v", err) + } + + if !reflect.DeepEqual(sourceContent, destinationContent) { + t.Errorf("source and destination do not match") + } +} + +func TestMigratingFileLeaveExistingFileAlone(t *testing.T) { + sourceFile, _ := ioutil.TempFile("", "") + defer os.Remove(sourceFile.Name()) + destinationFile, _ := ioutil.TempFile("", "") + defer os.Remove(destinationFile.Name()) + + WriteToFile(testConfigAlfa, sourceFile.Name()) + + loadingRules := ClientConfigLoadingRules{ + MigrationRules: map[string]string{destinationFile.Name(): sourceFile.Name()}, + } + + if _, err := loadingRules.Load(); err != nil { + t.Errorf("unexpected error %v", err) + } + + destinationContent, err := ioutil.ReadFile(destinationFile.Name()) + if err != nil { + t.Errorf("unexpected error %v", err) + } + + if len(destinationContent) > 0 { + t.Errorf("destination should not have been touched") + } +} + +func TestMigratingFileSourceMissingSkip(t *testing.T) { + sourceFilename := "some-missing-file" + destinationFile, _ := ioutil.TempFile("", "") + // delete the file so that we'll write to it + os.Remove(destinationFile.Name()) + + loadingRules := ClientConfigLoadingRules{ + MigrationRules: map[string]string{destinationFile.Name(): sourceFilename}, + } + + if _, err := loadingRules.Load(); err != nil { + t.Errorf("unexpected error %v", err) + } + + if _, err := os.Stat(destinationFile.Name()); !os.IsNotExist(err) { + t.Errorf("destination should not exist") + } +} + +func TestFileLocking(t *testing.T) { + f, _ := ioutil.TempFile("", "") + defer os.Remove(f.Name()) + + err := lockFile(f.Name()) + if err != nil { + t.Errorf("unexpected error while locking file: %v", err) + } + defer unlockFile(f.Name()) + + err = lockFile(f.Name()) + if err == nil { + t.Error("expected error while locking file.") + } +} + +func Example_noMergingOnExplicitPaths() { + commandLineFile, _ := ioutil.TempFile("", "") + defer os.Remove(commandLineFile.Name()) + envVarFile, _ := ioutil.TempFile("", "") + defer os.Remove(envVarFile.Name()) + + WriteToFile(testConfigAlfa, commandLineFile.Name()) + WriteToFile(testConfigConflictAlfa, envVarFile.Name()) + + loadingRules := ClientConfigLoadingRules{ + ExplicitPath: commandLineFile.Name(), + Precedence: []string{envVarFile.Name()}, + } + + mergedConfig, err := loadingRules.Load() + + json, err := runtime.Encode(clientcmdlatest.Codec, mergedConfig) + if err != nil { + fmt.Printf("Unexpected error: %v", err) + } + output, err := yaml.JSONToYAML(json) + if err != nil { + fmt.Printf("Unexpected error: %v", err) + } + + fmt.Printf("%v", string(output)) + // Output: + // apiVersion: v1 + // clusters: + // - cluster: + // server: http://cow.org:8080 + // name: cow-cluster + // contexts: + // - context: + // cluster: cow-cluster + // namespace: hammer-ns + // user: red-user + // name: federal-context + // current-context: "" + // kind: Config + // preferences: {} + // users: + // - name: red-user + // user: + // token: red-token +} + +func Example_mergingSomeWithConflict() { + commandLineFile, _ := ioutil.TempFile("", "") + defer os.Remove(commandLineFile.Name()) + envVarFile, _ := ioutil.TempFile("", "") + defer os.Remove(envVarFile.Name()) + + WriteToFile(testConfigAlfa, commandLineFile.Name()) + WriteToFile(testConfigConflictAlfa, envVarFile.Name()) + + loadingRules := ClientConfigLoadingRules{ + Precedence: []string{commandLineFile.Name(), envVarFile.Name()}, + } + + mergedConfig, err := loadingRules.Load() + + json, err := runtime.Encode(clientcmdlatest.Codec, mergedConfig) + if err != nil { + fmt.Printf("Unexpected error: %v", err) + } + output, err := yaml.JSONToYAML(json) + if err != nil { + fmt.Printf("Unexpected error: %v", err) + } + + fmt.Printf("%v", string(output)) + // Output: + // apiVersion: v1 + // clusters: + // - cluster: + // server: http://cow.org:8080 + // name: cow-cluster + // - cluster: + // insecure-skip-tls-verify: true + // server: http://donkey.org:8080 + // name: donkey-cluster + // contexts: + // - context: + // cluster: cow-cluster + // namespace: hammer-ns + // user: red-user + // name: federal-context + // current-context: federal-context + // kind: Config + // preferences: {} + // users: + // - name: red-user + // user: + // token: red-token + // - name: yellow-user + // user: + // token: yellow-token +} + +func Example_mergingEverythingNoConflicts() { + commandLineFile, _ := ioutil.TempFile("", "") + defer os.Remove(commandLineFile.Name()) + envVarFile, _ := ioutil.TempFile("", "") + defer os.Remove(envVarFile.Name()) + currentDirFile, _ := ioutil.TempFile("", "") + defer os.Remove(currentDirFile.Name()) + homeDirFile, _ := ioutil.TempFile("", "") + defer os.Remove(homeDirFile.Name()) + + WriteToFile(testConfigAlfa, commandLineFile.Name()) + WriteToFile(testConfigBravo, envVarFile.Name()) + WriteToFile(testConfigCharlie, currentDirFile.Name()) + WriteToFile(testConfigDelta, homeDirFile.Name()) + + loadingRules := ClientConfigLoadingRules{ + Precedence: []string{commandLineFile.Name(), envVarFile.Name(), currentDirFile.Name(), homeDirFile.Name()}, + } + + mergedConfig, err := loadingRules.Load() + + json, err := runtime.Encode(clientcmdlatest.Codec, mergedConfig) + if err != nil { + fmt.Printf("Unexpected error: %v", err) + } + output, err := yaml.JSONToYAML(json) + if err != nil { + fmt.Printf("Unexpected error: %v", err) + } + + fmt.Printf("%v", string(output)) + // Output: + // apiVersion: v1 + // clusters: + // - cluster: + // server: http://chicken.org:8080 + // name: chicken-cluster + // - cluster: + // server: http://cow.org:8080 + // name: cow-cluster + // - cluster: + // server: http://horse.org:8080 + // name: horse-cluster + // - cluster: + // server: http://pig.org:8080 + // name: pig-cluster + // contexts: + // - context: + // cluster: cow-cluster + // namespace: hammer-ns + // user: red-user + // name: federal-context + // - context: + // cluster: chicken-cluster + // namespace: plane-ns + // user: blue-user + // name: gothic-context + // - context: + // cluster: pig-cluster + // namespace: saw-ns + // user: black-user + // name: queen-anne-context + // - context: + // cluster: horse-cluster + // namespace: chisel-ns + // user: green-user + // name: shaker-context + // current-context: "" + // kind: Config + // preferences: {} + // users: + // - name: black-user + // user: + // token: black-token + // - name: blue-user + // user: + // token: blue-token + // - name: green-user + // user: + // token: green-token + // - name: red-user + // user: + // token: red-token +} diff --git a/vendor/k8s.io/client-go/tools/clientcmd/merged_client_builder_test.go b/vendor/k8s.io/client-go/tools/clientcmd/merged_client_builder_test.go new file mode 100644 index 000000000..8b0386764 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/merged_client_builder_test.go @@ -0,0 +1,328 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package clientcmd + +import ( + "fmt" + "testing" + + restclient "k8s.io/client-go/rest" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" +) + +type testLoader struct { + ClientConfigLoader + + called bool + config *clientcmdapi.Config + err error +} + +func (l *testLoader) Load() (*clientcmdapi.Config, error) { + l.called = true + return l.config, l.err +} + +type testClientConfig struct { + config *restclient.Config + namespace string + namespaceSpecified bool + err error +} + +func (c *testClientConfig) RawConfig() (clientcmdapi.Config, error) { + return clientcmdapi.Config{}, fmt.Errorf("unexpected call") +} +func (c *testClientConfig) ClientConfig() (*restclient.Config, error) { + return c.config, c.err +} +func (c *testClientConfig) Namespace() (string, bool, error) { + return c.namespace, c.namespaceSpecified, c.err +} +func (c *testClientConfig) ConfigAccess() ConfigAccess { + return nil +} + +type testICC struct { + testClientConfig + + possible bool + called bool +} + +func (icc *testICC) Possible() bool { + icc.called = true + return icc.possible +} + +func TestInClusterConfig(t *testing.T) { + default1 := &DirectClientConfig{ + config: *createValidTestConfig(), + contextName: "clean", + overrides: &ConfigOverrides{}, + } + invalidDefaultConfig := clientcmdapi.NewConfig() + invalidDefaultConfig.Clusters["clean"] = &clientcmdapi.Cluster{ + Server: "http://localhost:8080", + } + invalidDefaultConfig.Contexts["other"] = &clientcmdapi.Context{ + Cluster: "clean", + } + invalidDefaultConfig.CurrentContext = "clean" + + defaultInvalid := &DirectClientConfig{ + config: *invalidDefaultConfig, + overrides: &ConfigOverrides{}, + } + if _, err := defaultInvalid.ClientConfig(); err == nil || !IsConfigurationInvalid(err) { + t.Fatal(err) + } + config1, err := default1.ClientConfig() + if err != nil { + t.Fatal(err) + } + config2 := &restclient.Config{Host: "config2"} + err1 := fmt.Errorf("unique error") + + testCases := map[string]struct { + clientConfig *testClientConfig + icc *testICC + defaultConfig *DirectClientConfig + + checkedICC bool + result *restclient.Config + err error + }{ + "in-cluster checked on other error": { + clientConfig: &testClientConfig{err: ErrEmptyConfig}, + icc: &testICC{}, + + checkedICC: true, + result: nil, + err: ErrEmptyConfig, + }, + + "in-cluster not checked on non-empty error": { + clientConfig: &testClientConfig{err: ErrEmptyCluster}, + icc: &testICC{}, + + checkedICC: false, + result: nil, + err: ErrEmptyCluster, + }, + + "in-cluster checked when config is default": { + defaultConfig: default1, + clientConfig: &testClientConfig{config: config1}, + icc: &testICC{}, + + checkedICC: true, + result: config1, + err: nil, + }, + + "in-cluster not checked when default config is invalid": { + defaultConfig: defaultInvalid, + clientConfig: &testClientConfig{config: config1}, + icc: &testICC{}, + + checkedICC: false, + result: config1, + err: nil, + }, + + "in-cluster not checked when config is not equal to default": { + defaultConfig: default1, + clientConfig: &testClientConfig{config: config2}, + icc: &testICC{}, + + checkedICC: false, + result: config2, + err: nil, + }, + + "in-cluster checked when config is not equal to default and error is empty": { + clientConfig: &testClientConfig{config: config2, err: ErrEmptyConfig}, + icc: &testICC{}, + + checkedICC: true, + result: config2, + err: ErrEmptyConfig, + }, + + "in-cluster error returned when config is empty": { + clientConfig: &testClientConfig{err: ErrEmptyConfig}, + icc: &testICC{ + possible: true, + testClientConfig: testClientConfig{ + err: err1, + }, + }, + + checkedICC: true, + result: nil, + err: err1, + }, + + "in-cluster config returned when config is empty": { + clientConfig: &testClientConfig{err: ErrEmptyConfig}, + icc: &testICC{ + possible: true, + testClientConfig: testClientConfig{ + config: config2, + }, + }, + + checkedICC: true, + result: config2, + err: nil, + }, + + "in-cluster not checked when standard default is invalid": { + defaultConfig: &DefaultClientConfig, + clientConfig: &testClientConfig{config: config2}, + icc: &testICC{}, + + checkedICC: false, + result: config2, + err: nil, + }, + } + + for name, test := range testCases { + c := &DeferredLoadingClientConfig{icc: test.icc} + c.loader = &ClientConfigLoadingRules{DefaultClientConfig: test.defaultConfig} + c.clientConfig = test.clientConfig + + cfg, err := c.ClientConfig() + if test.icc.called != test.checkedICC { + t.Errorf("%s: unexpected in-cluster-config call %t", name, test.icc.called) + } + if err != test.err || cfg != test.result { + t.Errorf("%s: unexpected result: %v %#v", name, err, cfg) + } + } +} + +func TestInClusterConfigNamespace(t *testing.T) { + err1 := fmt.Errorf("unique error") + + testCases := map[string]struct { + clientConfig *testClientConfig + icc *testICC + + checkedICC bool + result string + ok bool + err error + }{ + "in-cluster checked on empty error": { + clientConfig: &testClientConfig{err: ErrEmptyConfig}, + icc: &testICC{}, + + checkedICC: true, + err: ErrEmptyConfig, + }, + + "in-cluster not checked on non-empty error": { + clientConfig: &testClientConfig{err: ErrEmptyCluster}, + icc: &testICC{}, + + err: ErrEmptyCluster, + }, + + "in-cluster checked when config is default": { + clientConfig: &testClientConfig{}, + icc: &testICC{}, + + checkedICC: true, + }, + + "in-cluster not checked when config is not equal to default": { + clientConfig: &testClientConfig{namespace: "test", namespaceSpecified: true}, + icc: &testICC{}, + + result: "test", + ok: true, + }, + + "in-cluster checked when namespace is not specified, but is defaulted": { + clientConfig: &testClientConfig{namespace: "test", namespaceSpecified: false}, + icc: &testICC{}, + + checkedICC: true, + result: "test", + ok: false, + }, + + "in-cluster error returned when config is empty": { + clientConfig: &testClientConfig{err: ErrEmptyConfig}, + icc: &testICC{ + possible: true, + testClientConfig: testClientConfig{ + err: err1, + }, + }, + + checkedICC: true, + err: err1, + }, + + "in-cluster config returned when config is empty": { + clientConfig: &testClientConfig{err: ErrEmptyConfig}, + icc: &testICC{ + possible: true, + testClientConfig: testClientConfig{ + namespace: "test", + namespaceSpecified: true, + }, + }, + + checkedICC: true, + result: "test", + ok: true, + }, + + "in-cluster config returned when config is empty and namespace is defaulted but not explicitly set": { + clientConfig: &testClientConfig{err: ErrEmptyConfig}, + icc: &testICC{ + possible: true, + testClientConfig: testClientConfig{ + namespace: "test", + namespaceSpecified: false, + }, + }, + + checkedICC: true, + result: "test", + ok: false, + }, + } + + for name, test := range testCases { + c := &DeferredLoadingClientConfig{icc: test.icc} + c.clientConfig = test.clientConfig + + ns, ok, err := c.Namespace() + if test.icc.called != test.checkedICC { + t.Errorf("%s: unexpected in-cluster-config call %t", name, test.icc.called) + } + if err != test.err || ns != test.result || ok != test.ok { + t.Errorf("%s: unexpected result: %v %s %t", name, err, ns, ok) + } + } +} diff --git a/vendor/k8s.io/client-go/tools/clientcmd/overrides_test.go b/vendor/k8s.io/client-go/tools/clientcmd/overrides_test.go new file mode 100644 index 000000000..13a995cf5 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/overrides_test.go @@ -0,0 +1,50 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package clientcmd + +import ( + "testing" + + "github.com/spf13/pflag" +) + +func TestNamespacePrefixStrip(t *testing.T) { + testData := map[string]string{ + "namespaces/foo": "foo", + "NAMESPACES/foo": "foo", + "NameSpaces/foo": "foo", + "namespace/foo": "foo", + "NAMESPACE/foo": "foo", + "nameSpace/foo": "foo", + "ns/foo": "foo", + "NS/foo": "foo", + "namespaces/": "namespaces/", + "namespace/": "namespace/", + "ns/": "ns/", + } + + for before, after := range testData { + overrides := &ConfigOverrides{} + fs := &pflag.FlagSet{} + BindOverrideFlags(overrides, fs, RecommendedConfigOverrideFlags("")) + fs.Parse([]string{"--namespace", before}) + + if overrides.Context.Namespace != after { + t.Fatalf("Expected %s, got %s", after, overrides.Context.Namespace) + } + } +} diff --git a/vendor/k8s.io/client-go/tools/clientcmd/validation_test.go b/vendor/k8s.io/client-go/tools/clientcmd/validation_test.go new file mode 100644 index 000000000..6441f1483 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/validation_test.go @@ -0,0 +1,445 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package clientcmd + +import ( + "io/ioutil" + "os" + "strings" + "testing" + + utilerrors "k8s.io/apimachinery/pkg/util/errors" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" +) + +func TestConfirmUsableBadInfoButOkConfig(t *testing.T) { + config := clientcmdapi.NewConfig() + config.Clusters["missing ca"] = &clientcmdapi.Cluster{ + Server: "anything", + CertificateAuthority: "missing", + } + config.AuthInfos["error"] = &clientcmdapi.AuthInfo{ + Username: "anything", + Token: "here", + } + config.Contexts["dirty"] = &clientcmdapi.Context{ + Cluster: "missing ca", + AuthInfo: "error", + } + config.Clusters["clean"] = &clientcmdapi.Cluster{ + Server: "anything", + } + config.AuthInfos["clean"] = &clientcmdapi.AuthInfo{ + Token: "here", + } + config.Contexts["clean"] = &clientcmdapi.Context{ + Cluster: "clean", + AuthInfo: "clean", + } + + badValidation := configValidationTest{ + config: config, + expectedErrorSubstring: []string{"unable to read certificate-authority"}, + } + okTest := configValidationTest{ + config: config, + } + + okTest.testConfirmUsable("clean", t) + badValidation.testConfig(t) +} +func TestConfirmUsableBadInfoConfig(t *testing.T) { + config := clientcmdapi.NewConfig() + config.Clusters["missing ca"] = &clientcmdapi.Cluster{ + Server: "anything", + CertificateAuthority: "missing", + } + config.AuthInfos["error"] = &clientcmdapi.AuthInfo{ + Username: "anything", + Token: "here", + } + config.Contexts["first"] = &clientcmdapi.Context{ + Cluster: "missing ca", + AuthInfo: "error", + } + test := configValidationTest{ + config: config, + expectedErrorSubstring: []string{"unable to read certificate-authority"}, + } + + test.testConfirmUsable("first", t) +} +func TestConfirmUsableEmptyConfig(t *testing.T) { + config := clientcmdapi.NewConfig() + test := configValidationTest{ + config: config, + expectedErrorSubstring: []string{"invalid configuration: no configuration has been provided"}, + } + + test.testConfirmUsable("", t) +} +func TestConfirmUsableMissingConfig(t *testing.T) { + config := clientcmdapi.NewConfig() + test := configValidationTest{ + config: config, + expectedErrorSubstring: []string{"invalid configuration: no configuration has been provided"}, + } + + test.testConfirmUsable("not-here", t) +} +func TestValidateEmptyConfig(t *testing.T) { + config := clientcmdapi.NewConfig() + test := configValidationTest{ + config: config, + expectedErrorSubstring: []string{"invalid configuration: no configuration has been provided"}, + } + + test.testConfig(t) +} +func TestValidateMissingCurrentContextConfig(t *testing.T) { + config := clientcmdapi.NewConfig() + config.CurrentContext = "anything" + test := configValidationTest{ + config: config, + expectedErrorSubstring: []string{"context was not found for specified "}, + } + + test.testConfig(t) +} +func TestIsContextNotFound(t *testing.T) { + config := clientcmdapi.NewConfig() + config.CurrentContext = "anything" + + err := Validate(*config) + if !IsContextNotFound(err) { + t.Errorf("Expected context not found, but got %v", err) + } + if !IsConfigurationInvalid(err) { + t.Errorf("Expected configuration invalid, but got %v", err) + } +} + +func TestIsEmptyConfig(t *testing.T) { + config := clientcmdapi.NewConfig() + + err := Validate(*config) + if !IsEmptyConfig(err) { + t.Errorf("Expected context not found, but got %v", err) + } + if !IsConfigurationInvalid(err) { + t.Errorf("Expected configuration invalid, but got %v", err) + } +} + +func TestIsConfigurationInvalid(t *testing.T) { + if newErrConfigurationInvalid([]error{}) != nil { + t.Errorf("unexpected error") + } + if newErrConfigurationInvalid([]error{ErrNoContext}) == ErrNoContext { + t.Errorf("unexpected error") + } + if newErrConfigurationInvalid([]error{ErrNoContext, ErrNoContext}) == nil { + t.Errorf("unexpected error") + } + if !IsConfigurationInvalid(newErrConfigurationInvalid([]error{ErrNoContext, ErrNoContext})) { + t.Errorf("unexpected error") + } +} + +func TestValidateMissingReferencesConfig(t *testing.T) { + config := clientcmdapi.NewConfig() + config.CurrentContext = "anything" + config.Contexts["anything"] = &clientcmdapi.Context{Cluster: "missing", AuthInfo: "missing"} + test := configValidationTest{ + config: config, + expectedErrorSubstring: []string{"user \"missing\" was not found for context \"anything\"", "cluster \"missing\" was not found for context \"anything\""}, + } + + test.testContext("anything", t) + test.testConfig(t) +} +func TestValidateEmptyContext(t *testing.T) { + config := clientcmdapi.NewConfig() + config.CurrentContext = "anything" + config.Contexts["anything"] = &clientcmdapi.Context{} + test := configValidationTest{ + config: config, + expectedErrorSubstring: []string{"user was not specified for context \"anything\"", "cluster was not specified for context \"anything\""}, + } + + test.testContext("anything", t) + test.testConfig(t) +} + +func TestValidateEmptyClusterInfo(t *testing.T) { + config := clientcmdapi.NewConfig() + config.Clusters["empty"] = clientcmdapi.NewCluster() + test := configValidationTest{ + config: config, + expectedErrorSubstring: []string{"cluster has no server defined"}, + } + + test.testCluster("empty", t) + test.testConfig(t) +} + +func TestValidateClusterInfoErrEmptyCluster(t *testing.T) { + cluster := clientcmdapi.NewCluster() + errs := validateClusterInfo("", *cluster) + + if len(errs) != 1 { + t.Fatalf("unexpected errors: %v", errs) + } + if errs[0] != ErrEmptyCluster { + t.Errorf("unexpected error: %v", errs[0]) + } +} + +func TestValidateMissingCAFileClusterInfo(t *testing.T) { + config := clientcmdapi.NewConfig() + config.Clusters["missing ca"] = &clientcmdapi.Cluster{ + Server: "anything", + CertificateAuthority: "missing", + } + test := configValidationTest{ + config: config, + expectedErrorSubstring: []string{"unable to read certificate-authority"}, + } + + test.testCluster("missing ca", t) + test.testConfig(t) +} +func TestValidateCleanClusterInfo(t *testing.T) { + config := clientcmdapi.NewConfig() + config.Clusters["clean"] = &clientcmdapi.Cluster{ + Server: "anything", + } + test := configValidationTest{ + config: config, + } + + test.testCluster("clean", t) + test.testConfig(t) +} +func TestValidateCleanWithCAClusterInfo(t *testing.T) { + tempFile, _ := ioutil.TempFile("", "") + defer os.Remove(tempFile.Name()) + + config := clientcmdapi.NewConfig() + config.Clusters["clean"] = &clientcmdapi.Cluster{ + Server: "anything", + CertificateAuthority: tempFile.Name(), + } + test := configValidationTest{ + config: config, + } + + test.testCluster("clean", t) + test.testConfig(t) +} + +func TestValidateEmptyAuthInfo(t *testing.T) { + config := clientcmdapi.NewConfig() + config.AuthInfos["error"] = &clientcmdapi.AuthInfo{} + test := configValidationTest{ + config: config, + } + + test.testAuthInfo("error", t) + test.testConfig(t) +} +func TestValidateCertFilesNotFoundAuthInfo(t *testing.T) { + config := clientcmdapi.NewConfig() + config.AuthInfos["error"] = &clientcmdapi.AuthInfo{ + ClientCertificate: "missing", + ClientKey: "missing", + } + test := configValidationTest{ + config: config, + expectedErrorSubstring: []string{"unable to read client-cert", "unable to read client-key"}, + } + + test.testAuthInfo("error", t) + test.testConfig(t) +} +func TestValidateCertDataOverridesFiles(t *testing.T) { + tempFile, _ := ioutil.TempFile("", "") + defer os.Remove(tempFile.Name()) + + config := clientcmdapi.NewConfig() + config.AuthInfos["clean"] = &clientcmdapi.AuthInfo{ + ClientCertificate: tempFile.Name(), + ClientCertificateData: []byte("certdata"), + ClientKey: tempFile.Name(), + ClientKeyData: []byte("keydata"), + } + test := configValidationTest{ + config: config, + expectedErrorSubstring: []string{"client-cert-data and client-cert are both specified", "client-key-data and client-key are both specified"}, + } + + test.testAuthInfo("clean", t) + test.testConfig(t) +} +func TestValidateCleanCertFilesAuthInfo(t *testing.T) { + tempFile, _ := ioutil.TempFile("", "") + defer os.Remove(tempFile.Name()) + + config := clientcmdapi.NewConfig() + config.AuthInfos["clean"] = &clientcmdapi.AuthInfo{ + ClientCertificate: tempFile.Name(), + ClientKey: tempFile.Name(), + } + test := configValidationTest{ + config: config, + } + + test.testAuthInfo("clean", t) + test.testConfig(t) +} +func TestValidateCleanTokenAuthInfo(t *testing.T) { + config := clientcmdapi.NewConfig() + config.AuthInfos["clean"] = &clientcmdapi.AuthInfo{ + Token: "any-value", + } + test := configValidationTest{ + config: config, + } + + test.testAuthInfo("clean", t) + test.testConfig(t) +} + +func TestValidateMultipleMethodsAuthInfo(t *testing.T) { + config := clientcmdapi.NewConfig() + config.AuthInfos["error"] = &clientcmdapi.AuthInfo{ + Token: "token", + Username: "username", + } + test := configValidationTest{ + config: config, + expectedErrorSubstring: []string{"more than one authentication method", "token", "basicAuth"}, + } + + test.testAuthInfo("error", t) + test.testConfig(t) +} + +type configValidationTest struct { + config *clientcmdapi.Config + expectedErrorSubstring []string +} + +func (c configValidationTest) testContext(contextName string, t *testing.T) { + errs := validateContext(contextName, *c.config.Contexts[contextName], *c.config) + + if len(c.expectedErrorSubstring) != 0 { + if len(errs) == 0 { + t.Errorf("Expected error containing: %v", c.expectedErrorSubstring) + } + for _, curr := range c.expectedErrorSubstring { + if len(errs) != 0 && !strings.Contains(utilerrors.NewAggregate(errs).Error(), curr) { + t.Errorf("Expected error containing: %v, but got %v", c.expectedErrorSubstring, utilerrors.NewAggregate(errs)) + } + } + + } else { + if len(errs) != 0 { + t.Errorf("Unexpected error: %v", utilerrors.NewAggregate(errs)) + } + } +} +func (c configValidationTest) testConfirmUsable(contextName string, t *testing.T) { + err := ConfirmUsable(*c.config, contextName) + + if len(c.expectedErrorSubstring) != 0 { + if err == nil { + t.Errorf("Expected error containing: %v", c.expectedErrorSubstring) + } else { + for _, curr := range c.expectedErrorSubstring { + if err != nil && !strings.Contains(err.Error(), curr) { + t.Errorf("Expected error containing: %v, but got %v", c.expectedErrorSubstring, err) + } + } + } + } else { + if err != nil { + t.Errorf("Unexpected error: %v", err) + } + } +} +func (c configValidationTest) testConfig(t *testing.T) { + err := Validate(*c.config) + + if len(c.expectedErrorSubstring) != 0 { + if err == nil { + t.Errorf("Expected error containing: %v", c.expectedErrorSubstring) + } else { + for _, curr := range c.expectedErrorSubstring { + if err != nil && !strings.Contains(err.Error(), curr) { + t.Errorf("Expected error containing: %v, but got %v", c.expectedErrorSubstring, err) + } + } + if !IsConfigurationInvalid(err) { + t.Errorf("all errors should be configuration invalid: %v", err) + } + } + } else { + if err != nil { + t.Errorf("Unexpected error: %v", err) + } + } +} +func (c configValidationTest) testCluster(clusterName string, t *testing.T) { + errs := validateClusterInfo(clusterName, *c.config.Clusters[clusterName]) + + if len(c.expectedErrorSubstring) != 0 { + if len(errs) == 0 { + t.Errorf("Expected error containing: %v", c.expectedErrorSubstring) + } + for _, curr := range c.expectedErrorSubstring { + if len(errs) != 0 && !strings.Contains(utilerrors.NewAggregate(errs).Error(), curr) { + t.Errorf("Expected error containing: %v, but got %v", c.expectedErrorSubstring, utilerrors.NewAggregate(errs)) + } + } + + } else { + if len(errs) != 0 { + t.Errorf("Unexpected error: %v", utilerrors.NewAggregate(errs)) + } + } +} + +func (c configValidationTest) testAuthInfo(authInfoName string, t *testing.T) { + errs := validateAuthInfo(authInfoName, *c.config.AuthInfos[authInfoName]) + + if len(c.expectedErrorSubstring) != 0 { + if len(errs) == 0 { + t.Errorf("Expected error containing: %v", c.expectedErrorSubstring) + } + for _, curr := range c.expectedErrorSubstring { + if len(errs) != 0 && !strings.Contains(utilerrors.NewAggregate(errs).Error(), curr) { + t.Errorf("Expected error containing: %v, but got %v", c.expectedErrorSubstring, utilerrors.NewAggregate(errs)) + } + } + + } else { + if len(errs) != 0 { + t.Errorf("Unexpected error: %v", utilerrors.NewAggregate(errs)) + } + } +} diff --git a/vendor/k8s.io/client-go/tools/leaderelection/leaderelection_test.go b/vendor/k8s.io/client-go/tools/leaderelection/leaderelection_test.go new file mode 100644 index 000000000..5e5864631 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/leaderelection/leaderelection_test.go @@ -0,0 +1,292 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package leaderelection + +import ( + "fmt" + "sync" + "testing" + "time" + + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + fakecorev1 "k8s.io/client-go/kubernetes/typed/core/v1/fake" + core "k8s.io/client-go/testing" + rl "k8s.io/client-go/tools/leaderelection/resourcelock" + "k8s.io/client-go/tools/record" +) + +func createLockObject(objectType string, objectMeta metav1.ObjectMeta) (obj runtime.Object) { + switch objectType { + case "endpoints": + obj = &v1.Endpoints{ObjectMeta: objectMeta} + case "configmaps": + obj = &v1.ConfigMap{ObjectMeta: objectMeta} + default: + panic("unexpected objType:" + objectType) + } + return +} + +// Will test leader election using endpoints as the resource +func TestTryAcquireOrRenewEndpoints(t *testing.T) { + testTryAcquireOrRenew(t, "endpoints") +} + +func testTryAcquireOrRenew(t *testing.T, objectType string) { + future := time.Now().Add(1000 * time.Hour) + past := time.Now().Add(-1000 * time.Hour) + + tests := []struct { + observedRecord rl.LeaderElectionRecord + observedTime time.Time + reactors []struct { + verb string + reaction core.ReactionFunc + } + + expectSuccess bool + transitionLeader bool + outHolder string + }{ + // acquire from no object + { + reactors: []struct { + verb string + reaction core.ReactionFunc + }{ + { + verb: "get", + reaction: func(action core.Action) (handled bool, ret runtime.Object, err error) { + return true, nil, errors.NewNotFound(action.(core.GetAction).GetResource().GroupResource(), action.(core.GetAction).GetName()) + }, + }, + { + verb: "create", + reaction: func(action core.Action) (handled bool, ret runtime.Object, err error) { + return true, action.(core.CreateAction).GetObject(), nil + }, + }, + }, + expectSuccess: true, + outHolder: "baz", + }, + // acquire from unled object + { + reactors: []struct { + verb string + reaction core.ReactionFunc + }{ + { + verb: "get", + reaction: func(action core.Action) (handled bool, ret runtime.Object, err error) { + objectMeta := metav1.ObjectMeta{ + Namespace: action.GetNamespace(), + Name: action.(core.GetAction).GetName(), + } + return true, createLockObject(objectType, objectMeta), nil + }, + }, + { + verb: "update", + reaction: func(action core.Action) (handled bool, ret runtime.Object, err error) { + return true, action.(core.CreateAction).GetObject(), nil + }, + }, + }, + + expectSuccess: true, + transitionLeader: true, + outHolder: "baz", + }, + // acquire from led, unacked object + { + reactors: []struct { + verb string + reaction core.ReactionFunc + }{ + { + verb: "get", + reaction: func(action core.Action) (handled bool, ret runtime.Object, err error) { + objectMeta := metav1.ObjectMeta{ + Namespace: action.GetNamespace(), + Name: action.(core.GetAction).GetName(), + Annotations: map[string]string{ + rl.LeaderElectionRecordAnnotationKey: `{"holderIdentity":"bing"}`, + }, + } + return true, createLockObject(objectType, objectMeta), nil + }, + }, + { + verb: "update", + reaction: func(action core.Action) (handled bool, ret runtime.Object, err error) { + return true, action.(core.CreateAction).GetObject(), nil + }, + }, + }, + observedRecord: rl.LeaderElectionRecord{HolderIdentity: "bing"}, + observedTime: past, + + expectSuccess: true, + transitionLeader: true, + outHolder: "baz", + }, + // don't acquire from led, acked object + { + reactors: []struct { + verb string + reaction core.ReactionFunc + }{ + { + verb: "get", + reaction: func(action core.Action) (handled bool, ret runtime.Object, err error) { + objectMeta := metav1.ObjectMeta{ + Namespace: action.GetNamespace(), + Name: action.(core.GetAction).GetName(), + Annotations: map[string]string{ + rl.LeaderElectionRecordAnnotationKey: `{"holderIdentity":"bing"}`, + }, + } + return true, createLockObject(objectType, objectMeta), nil + }, + }, + }, + observedTime: future, + + expectSuccess: false, + outHolder: "bing", + }, + // renew already acquired object + { + reactors: []struct { + verb string + reaction core.ReactionFunc + }{ + { + verb: "get", + reaction: func(action core.Action) (handled bool, ret runtime.Object, err error) { + objectMeta := metav1.ObjectMeta{ + Namespace: action.GetNamespace(), + Name: action.(core.GetAction).GetName(), + Annotations: map[string]string{ + rl.LeaderElectionRecordAnnotationKey: `{"holderIdentity":"baz"}`, + }, + } + return true, createLockObject(objectType, objectMeta), nil + }, + }, + { + verb: "update", + reaction: func(action core.Action) (handled bool, ret runtime.Object, err error) { + return true, action.(core.CreateAction).GetObject(), nil + }, + }, + }, + observedTime: future, + observedRecord: rl.LeaderElectionRecord{HolderIdentity: "baz"}, + + expectSuccess: true, + outHolder: "baz", + }, + } + + for i, test := range tests { + // OnNewLeader is called async so we have to wait for it. + var wg sync.WaitGroup + wg.Add(1) + var reportedLeader string + var lock rl.Interface + + objectMeta := metav1.ObjectMeta{Namespace: "foo", Name: "bar"} + resourceLockConfig := rl.ResourceLockConfig{ + Identity: "baz", + EventRecorder: &record.FakeRecorder{}, + } + c := &fakecorev1.FakeCoreV1{Fake: &core.Fake{}} + for _, reactor := range test.reactors { + c.AddReactor(reactor.verb, objectType, reactor.reaction) + } + c.AddReactor("*", "*", func(action core.Action) (bool, runtime.Object, error) { + t.Errorf("[%v] unreachable action. testclient called too many times: %+v", i, action) + return true, nil, fmt.Errorf("unreachable action") + }) + + switch objectType { + case "endpoints": + lock = &rl.EndpointsLock{ + EndpointsMeta: objectMeta, + LockConfig: resourceLockConfig, + Client: c, + } + case "configmaps": + lock = &rl.ConfigMapLock{ + ConfigMapMeta: objectMeta, + LockConfig: resourceLockConfig, + Client: c, + } + } + + lec := LeaderElectionConfig{ + Lock: lock, + LeaseDuration: 10 * time.Second, + Callbacks: LeaderCallbacks{ + OnNewLeader: func(l string) { + defer wg.Done() + reportedLeader = l + }, + }, + } + le := &LeaderElector{ + config: lec, + observedRecord: test.observedRecord, + observedTime: test.observedTime, + } + + if test.expectSuccess != le.tryAcquireOrRenew() { + t.Errorf("[%v]unexpected result of tryAcquireOrRenew: [succeded=%v]", i, !test.expectSuccess) + } + + le.observedRecord.AcquireTime = metav1.Time{} + le.observedRecord.RenewTime = metav1.Time{} + if le.observedRecord.HolderIdentity != test.outHolder { + t.Errorf("[%v]expected holder:\n\t%+v\ngot:\n\t%+v", i, test.outHolder, le.observedRecord.HolderIdentity) + } + if len(test.reactors) != len(c.Actions()) { + t.Errorf("[%v]wrong number of api interactions", i) + } + if test.transitionLeader && le.observedRecord.LeaderTransitions != 1 { + t.Errorf("[%v]leader should have transitioned but did not", i) + } + if !test.transitionLeader && le.observedRecord.LeaderTransitions != 0 { + t.Errorf("[%v]leader should not have transitioned but did", i) + } + + le.maybeReportTransition() + wg.Wait() + if reportedLeader != test.outHolder { + t.Errorf("[%v]reported leader was not the new leader. expected %q, got %q", i, test.outHolder, reportedLeader) + } + } +} + +// Will test leader election using configmap as the resource +func TestTryAcquireOrRenewConfigMaps(t *testing.T) { + testTryAcquireOrRenew(t, "configmaps") +} diff --git a/vendor/k8s.io/client-go/tools/pager/pager_test.go b/vendor/k8s.io/client-go/tools/pager/pager_test.go new file mode 100644 index 000000000..6e3e9444a --- /dev/null +++ b/vendor/k8s.io/client-go/tools/pager/pager_test.go @@ -0,0 +1,206 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package pager + +import ( + "fmt" + "reflect" + "testing" + + "golang.org/x/net/context" + "k8s.io/apimachinery/pkg/api/errors" + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1alpha1 "k8s.io/apimachinery/pkg/apis/meta/v1alpha1" + "k8s.io/apimachinery/pkg/runtime" +) + +func list(count int, rv string) *metainternalversion.List { + var list metainternalversion.List + for i := 0; i < count; i++ { + list.Items = append(list.Items, &metav1alpha1.PartialObjectMetadata{ + ObjectMeta: metav1.ObjectMeta{ + Name: fmt.Sprintf("%d", i), + }, + }) + } + list.ResourceVersion = rv + return &list +} + +type testPager struct { + t *testing.T + rv string + index int + remaining int + last int + continuing bool + done bool + expectPage int64 +} + +func (p *testPager) reset() { + p.continuing = false + p.remaining += p.index + p.index = 0 + p.last = 0 + p.done = false +} + +func (p *testPager) PagedList(ctx context.Context, options metav1.ListOptions) (runtime.Object, error) { + if p.done { + p.t.Errorf("did not expect additional call to paged list") + return nil, fmt.Errorf("unexpected list call") + } + expectedContinue := fmt.Sprintf("%s:%d", p.rv, p.last) + if options.Limit != p.expectPage || (p.continuing && options.Continue != expectedContinue) { + p.t.Errorf("invariant violated, expected limit %d and continue %s, got %#v", p.expectPage, expectedContinue, options) + return nil, fmt.Errorf("invariant violated") + } + var list metainternalversion.List + total := options.Limit + if total == 0 { + total = int64(p.remaining) + } + for i := int64(0); i < total; i++ { + if p.remaining <= 0 { + break + } + list.Items = append(list.Items, &metav1alpha1.PartialObjectMetadata{ + ObjectMeta: metav1.ObjectMeta{ + Name: fmt.Sprintf("%d", p.index), + }, + }) + p.remaining-- + p.index++ + } + p.last = p.index + if p.remaining > 0 { + list.Continue = fmt.Sprintf("%s:%d", p.rv, p.last) + p.continuing = true + } else { + p.done = true + } + list.ResourceVersion = p.rv + return &list, nil +} + +func (p *testPager) ExpiresOnSecondPage(ctx context.Context, options metav1.ListOptions) (runtime.Object, error) { + if p.continuing { + p.done = true + return nil, errors.NewResourceExpired("this list has expired") + } + return p.PagedList(ctx, options) +} + +func (p *testPager) ExpiresOnSecondPageThenFullList(ctx context.Context, options metav1.ListOptions) (runtime.Object, error) { + if p.continuing { + p.reset() + p.expectPage = 0 + return nil, errors.NewResourceExpired("this list has expired") + } + return p.PagedList(ctx, options) +} + +func TestListPager_List(t *testing.T) { + type fields struct { + PageSize int64 + PageFn ListPageFunc + FullListIfExpired bool + } + type args struct { + ctx context.Context + options metav1.ListOptions + } + tests := []struct { + name string + fields fields + args args + want runtime.Object + wantErr bool + isExpired bool + }{ + { + name: "empty page", + fields: fields{PageSize: 10, PageFn: (&testPager{t: t, expectPage: 10, remaining: 0, rv: "rv:20"}).PagedList}, + args: args{}, + want: list(0, "rv:20"), + }, + { + name: "one page", + fields: fields{PageSize: 10, PageFn: (&testPager{t: t, expectPage: 10, remaining: 9, rv: "rv:20"}).PagedList}, + args: args{}, + want: list(9, "rv:20"), + }, + { + name: "one full page", + fields: fields{PageSize: 10, PageFn: (&testPager{t: t, expectPage: 10, remaining: 10, rv: "rv:20"}).PagedList}, + args: args{}, + want: list(10, "rv:20"), + }, + { + name: "two pages", + fields: fields{PageSize: 10, PageFn: (&testPager{t: t, expectPage: 10, remaining: 11, rv: "rv:20"}).PagedList}, + args: args{}, + want: list(11, "rv:20"), + }, + { + name: "three pages", + fields: fields{PageSize: 10, PageFn: (&testPager{t: t, expectPage: 10, remaining: 21, rv: "rv:20"}).PagedList}, + args: args{}, + want: list(21, "rv:20"), + }, + { + name: "expires on second page", + fields: fields{PageSize: 10, PageFn: (&testPager{t: t, expectPage: 10, remaining: 21, rv: "rv:20"}).ExpiresOnSecondPage}, + args: args{}, + wantErr: true, + isExpired: true, + }, + { + name: "expires on second page and then lists", + fields: fields{ + FullListIfExpired: true, + PageSize: 10, + PageFn: (&testPager{t: t, expectPage: 10, remaining: 21, rv: "rv:20"}).ExpiresOnSecondPageThenFullList, + }, + args: args{}, + want: list(21, "rv:20"), + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + p := &ListPager{ + PageSize: tt.fields.PageSize, + PageFn: tt.fields.PageFn, + FullListIfExpired: tt.fields.FullListIfExpired, + } + got, err := p.List(tt.args.ctx, tt.args.options) + if (err != nil) != tt.wantErr { + t.Errorf("ListPager.List() error = %v, wantErr %v", err, tt.wantErr) + return + } + if tt.isExpired != errors.IsResourceExpired(err) { + t.Errorf("ListPager.List() error = %v, isExpired %v", err, tt.isExpired) + return + } + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("ListPager.List() = %v, want %v", got, tt.want) + } + }) + } +} diff --git a/vendor/k8s.io/client-go/tools/record/doc.go b/vendor/k8s.io/client-go/tools/record/doc.go index 0dc790696..657ddecbc 100644 --- a/vendor/k8s.io/client-go/tools/record/doc.go +++ b/vendor/k8s.io/client-go/tools/record/doc.go @@ -15,4 +15,4 @@ limitations under the License. */ // Package record has all client logic for recording and reporting events. -package record +package record // import "k8s.io/client-go/tools/record" diff --git a/vendor/k8s.io/client-go/tools/record/event_test.go b/vendor/k8s.io/client-go/tools/record/event_test.go new file mode 100644 index 000000000..07b6df218 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/record/event_test.go @@ -0,0 +1,918 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package record + +import ( + "encoding/json" + "fmt" + "math/rand" + "net/http" + "strconv" + "testing" + "time" + + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8sruntime "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/clock" + "k8s.io/apimachinery/pkg/util/strategicpatch" + "k8s.io/client-go/kubernetes/scheme" + restclient "k8s.io/client-go/rest" + ref "k8s.io/client-go/tools/reference" +) + +type testEventSink struct { + OnCreate func(e *v1.Event) (*v1.Event, error) + OnUpdate func(e *v1.Event) (*v1.Event, error) + OnPatch func(e *v1.Event, p []byte) (*v1.Event, error) +} + +// CreateEvent records the event for testing. +func (t *testEventSink) Create(e *v1.Event) (*v1.Event, error) { + if t.OnCreate != nil { + return t.OnCreate(e) + } + return e, nil +} + +// UpdateEvent records the event for testing. +func (t *testEventSink) Update(e *v1.Event) (*v1.Event, error) { + if t.OnUpdate != nil { + return t.OnUpdate(e) + } + return e, nil +} + +// PatchEvent records the event for testing. +func (t *testEventSink) Patch(e *v1.Event, p []byte) (*v1.Event, error) { + if t.OnPatch != nil { + return t.OnPatch(e, p) + } + return e, nil +} + +type OnCreateFunc func(*v1.Event) (*v1.Event, error) + +func OnCreateFactory(testCache map[string]*v1.Event, createEvent chan<- *v1.Event) OnCreateFunc { + return func(event *v1.Event) (*v1.Event, error) { + testCache[getEventKey(event)] = event + createEvent <- event + return event, nil + } +} + +type OnPatchFunc func(*v1.Event, []byte) (*v1.Event, error) + +func OnPatchFactory(testCache map[string]*v1.Event, patchEvent chan<- *v1.Event) OnPatchFunc { + return func(event *v1.Event, patch []byte) (*v1.Event, error) { + cachedEvent, found := testCache[getEventKey(event)] + if !found { + return nil, fmt.Errorf("unexpected error: couldn't find Event in testCache.") + } + originalData, err := json.Marshal(cachedEvent) + if err != nil { + return nil, fmt.Errorf("unexpected error: %v", err) + } + patched, err := strategicpatch.StrategicMergePatch(originalData, patch, event) + if err != nil { + return nil, fmt.Errorf("unexpected error: %v", err) + } + patchedObj := &v1.Event{} + err = json.Unmarshal(patched, patchedObj) + if err != nil { + return nil, fmt.Errorf("unexpected error: %v", err) + } + patchEvent <- patchedObj + return patchedObj, nil + } +} + +func TestEventf(t *testing.T) { + testPod := &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + SelfLink: "/api/version/pods/foo", + Name: "foo", + Namespace: "baz", + UID: "bar", + }, + } + testPod2 := &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + SelfLink: "/api/version/pods/foo", + Name: "foo", + Namespace: "baz", + UID: "differentUid", + }, + } + testRef, err := ref.GetPartialReference(scheme.Scheme, testPod, "spec.containers[2]") + testRef2, err := ref.GetPartialReference(scheme.Scheme, testPod2, "spec.containers[3]") + if err != nil { + t.Fatal(err) + } + table := []struct { + obj k8sruntime.Object + eventtype string + reason string + messageFmt string + elements []interface{} + expect *v1.Event + expectLog string + expectUpdate bool + }{ + { + obj: testRef, + eventtype: v1.EventTypeNormal, + reason: "Started", + messageFmt: "some verbose message: %v", + elements: []interface{}{1}, + expect: &v1.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Namespace: "baz", + }, + InvolvedObject: v1.ObjectReference{ + Kind: "Pod", + Name: "foo", + Namespace: "baz", + UID: "bar", + APIVersion: "version", + FieldPath: "spec.containers[2]", + }, + Reason: "Started", + Message: "some verbose message: 1", + Source: v1.EventSource{Component: "eventTest"}, + Count: 1, + Type: v1.EventTypeNormal, + }, + expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"bar", APIVersion:"version", ResourceVersion:"", FieldPath:"spec.containers[2]"}): type: 'Normal' reason: 'Started' some verbose message: 1`, + expectUpdate: false, + }, + { + obj: testPod, + eventtype: v1.EventTypeNormal, + reason: "Killed", + messageFmt: "some other verbose message: %v", + elements: []interface{}{1}, + expect: &v1.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Namespace: "baz", + }, + InvolvedObject: v1.ObjectReference{ + Kind: "Pod", + Name: "foo", + Namespace: "baz", + UID: "bar", + APIVersion: "version", + }, + Reason: "Killed", + Message: "some other verbose message: 1", + Source: v1.EventSource{Component: "eventTest"}, + Count: 1, + Type: v1.EventTypeNormal, + }, + expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"bar", APIVersion:"version", ResourceVersion:"", FieldPath:""}): type: 'Normal' reason: 'Killed' some other verbose message: 1`, + expectUpdate: false, + }, + { + obj: testRef, + eventtype: v1.EventTypeNormal, + reason: "Started", + messageFmt: "some verbose message: %v", + elements: []interface{}{1}, + expect: &v1.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Namespace: "baz", + }, + InvolvedObject: v1.ObjectReference{ + Kind: "Pod", + Name: "foo", + Namespace: "baz", + UID: "bar", + APIVersion: "version", + FieldPath: "spec.containers[2]", + }, + Reason: "Started", + Message: "some verbose message: 1", + Source: v1.EventSource{Component: "eventTest"}, + Count: 2, + Type: v1.EventTypeNormal, + }, + expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"bar", APIVersion:"version", ResourceVersion:"", FieldPath:"spec.containers[2]"}): type: 'Normal' reason: 'Started' some verbose message: 1`, + expectUpdate: true, + }, + { + obj: testRef2, + eventtype: v1.EventTypeNormal, + reason: "Started", + messageFmt: "some verbose message: %v", + elements: []interface{}{1}, + expect: &v1.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Namespace: "baz", + }, + InvolvedObject: v1.ObjectReference{ + Kind: "Pod", + Name: "foo", + Namespace: "baz", + UID: "differentUid", + APIVersion: "version", + FieldPath: "spec.containers[3]", + }, + Reason: "Started", + Message: "some verbose message: 1", + Source: v1.EventSource{Component: "eventTest"}, + Count: 1, + Type: v1.EventTypeNormal, + }, + expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"differentUid", APIVersion:"version", ResourceVersion:"", FieldPath:"spec.containers[3]"}): type: 'Normal' reason: 'Started' some verbose message: 1`, + expectUpdate: false, + }, + { + obj: testRef, + eventtype: v1.EventTypeNormal, + reason: "Started", + messageFmt: "some verbose message: %v", + elements: []interface{}{1}, + expect: &v1.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Namespace: "baz", + }, + InvolvedObject: v1.ObjectReference{ + Kind: "Pod", + Name: "foo", + Namespace: "baz", + UID: "bar", + APIVersion: "version", + FieldPath: "spec.containers[2]", + }, + Reason: "Started", + Message: "some verbose message: 1", + Source: v1.EventSource{Component: "eventTest"}, + Count: 3, + Type: v1.EventTypeNormal, + }, + expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"bar", APIVersion:"version", ResourceVersion:"", FieldPath:"spec.containers[2]"}): type: 'Normal' reason: 'Started' some verbose message: 1`, + expectUpdate: true, + }, + { + obj: testRef2, + eventtype: v1.EventTypeNormal, + reason: "Stopped", + messageFmt: "some verbose message: %v", + elements: []interface{}{1}, + expect: &v1.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Namespace: "baz", + }, + InvolvedObject: v1.ObjectReference{ + Kind: "Pod", + Name: "foo", + Namespace: "baz", + UID: "differentUid", + APIVersion: "version", + FieldPath: "spec.containers[3]", + }, + Reason: "Stopped", + Message: "some verbose message: 1", + Source: v1.EventSource{Component: "eventTest"}, + Count: 1, + Type: v1.EventTypeNormal, + }, + expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"differentUid", APIVersion:"version", ResourceVersion:"", FieldPath:"spec.containers[3]"}): type: 'Normal' reason: 'Stopped' some verbose message: 1`, + expectUpdate: false, + }, + { + obj: testRef2, + eventtype: v1.EventTypeNormal, + reason: "Stopped", + messageFmt: "some verbose message: %v", + elements: []interface{}{1}, + expect: &v1.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Namespace: "baz", + }, + InvolvedObject: v1.ObjectReference{ + Kind: "Pod", + Name: "foo", + Namespace: "baz", + UID: "differentUid", + APIVersion: "version", + FieldPath: "spec.containers[3]", + }, + Reason: "Stopped", + Message: "some verbose message: 1", + Source: v1.EventSource{Component: "eventTest"}, + Count: 2, + Type: v1.EventTypeNormal, + }, + expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"differentUid", APIVersion:"version", ResourceVersion:"", FieldPath:"spec.containers[3]"}): type: 'Normal' reason: 'Stopped' some verbose message: 1`, + expectUpdate: true, + }, + } + + testCache := map[string]*v1.Event{} + logCalled := make(chan struct{}) + createEvent := make(chan *v1.Event) + updateEvent := make(chan *v1.Event) + patchEvent := make(chan *v1.Event) + testEvents := testEventSink{ + OnCreate: OnCreateFactory(testCache, createEvent), + OnUpdate: func(event *v1.Event) (*v1.Event, error) { + updateEvent <- event + return event, nil + }, + OnPatch: OnPatchFactory(testCache, patchEvent), + } + eventBroadcaster := NewBroadcasterForTests(0) + sinkWatcher := eventBroadcaster.StartRecordingToSink(&testEvents) + + clock := clock.NewFakeClock(time.Now()) + recorder := recorderWithFakeClock(v1.EventSource{Component: "eventTest"}, eventBroadcaster, clock) + for index, item := range table { + clock.Step(1 * time.Second) + logWatcher := eventBroadcaster.StartLogging(func(formatter string, args ...interface{}) { + if e, a := item.expectLog, fmt.Sprintf(formatter, args...); e != a { + t.Errorf("Expected '%v', got '%v'", e, a) + } + logCalled <- struct{}{} + }) + recorder.Eventf(item.obj, item.eventtype, item.reason, item.messageFmt, item.elements...) + + <-logCalled + + // validate event + if item.expectUpdate { + actualEvent := <-patchEvent + validateEvent(strconv.Itoa(index), actualEvent, item.expect, t) + } else { + actualEvent := <-createEvent + validateEvent(strconv.Itoa(index), actualEvent, item.expect, t) + } + logWatcher.Stop() + } + sinkWatcher.Stop() +} + +func recorderWithFakeClock(eventSource v1.EventSource, eventBroadcaster EventBroadcaster, clock clock.Clock) EventRecorder { + return &recorderImpl{scheme.Scheme, eventSource, eventBroadcaster.(*eventBroadcasterImpl).Broadcaster, clock} +} + +func TestWriteEventError(t *testing.T) { + type entry struct { + timesToSendError int + attemptsWanted int + err error + } + table := map[string]*entry{ + "giveUp1": { + timesToSendError: 1000, + attemptsWanted: 1, + err: &restclient.RequestConstructionError{}, + }, + "giveUp2": { + timesToSendError: 1000, + attemptsWanted: 1, + err: &errors.StatusError{}, + }, + "retry1": { + timesToSendError: 1000, + attemptsWanted: 12, + err: &errors.UnexpectedObjectError{}, + }, + "retry2": { + timesToSendError: 1000, + attemptsWanted: 12, + err: fmt.Errorf("A weird error"), + }, + "succeedEventually": { + timesToSendError: 2, + attemptsWanted: 2, + err: fmt.Errorf("A weird error"), + }, + } + + clock := clock.IntervalClock{Time: time.Now(), Duration: time.Second} + eventCorrelator := NewEventCorrelator(&clock) + randGen := rand.New(rand.NewSource(time.Now().UnixNano())) + + for caseName, ent := range table { + attempts := 0 + sink := &testEventSink{ + OnCreate: func(event *v1.Event) (*v1.Event, error) { + attempts++ + if attempts < ent.timesToSendError { + return nil, ent.err + } + return event, nil + }, + } + ev := &v1.Event{} + recordToSink(sink, ev, eventCorrelator, randGen, 0) + if attempts != ent.attemptsWanted { + t.Errorf("case %v: wanted %d, got %d attempts", caseName, ent.attemptsWanted, attempts) + } + } +} + +func TestUpdateExpiredEvent(t *testing.T) { + clock := clock.IntervalClock{Time: time.Now(), Duration: time.Second} + eventCorrelator := NewEventCorrelator(&clock) + randGen := rand.New(rand.NewSource(time.Now().UnixNano())) + + var createdEvent *v1.Event + + sink := &testEventSink{ + OnPatch: func(*v1.Event, []byte) (*v1.Event, error) { + return nil, &errors.StatusError{ + ErrStatus: metav1.Status{ + Code: http.StatusNotFound, + Reason: metav1.StatusReasonNotFound, + }} + }, + OnCreate: func(event *v1.Event) (*v1.Event, error) { + createdEvent = event + return event, nil + }, + } + + ev := &v1.Event{} + ev.ResourceVersion = "updated-resource-version" + ev.Count = 2 + recordToSink(sink, ev, eventCorrelator, randGen, 0) + + if createdEvent == nil { + t.Error("Event did not get created after patch failed") + return + } + + if createdEvent.ResourceVersion != "" { + t.Errorf("Event did not have its resource version cleared, was %s", createdEvent.ResourceVersion) + } +} + +func TestLotsOfEvents(t *testing.T) { + recorderCalled := make(chan struct{}) + loggerCalled := make(chan struct{}) + + // Fail each event a few times to ensure there's some load on the tested code. + var counts [1000]int + testEvents := testEventSink{ + OnCreate: func(event *v1.Event) (*v1.Event, error) { + num, err := strconv.Atoi(event.Message) + if err != nil { + t.Error(err) + return event, nil + } + counts[num]++ + if counts[num] < 5 { + return nil, fmt.Errorf("fake error") + } + recorderCalled <- struct{}{} + return event, nil + }, + } + + eventBroadcaster := NewBroadcasterForTests(0) + sinkWatcher := eventBroadcaster.StartRecordingToSink(&testEvents) + logWatcher := eventBroadcaster.StartLogging(func(formatter string, args ...interface{}) { + loggerCalled <- struct{}{} + }) + recorder := eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "eventTest"}) + for i := 0; i < maxQueuedEvents; i++ { + // we want a unique object to stop spam filtering + ref := &v1.ObjectReference{ + Kind: "Pod", + Name: fmt.Sprintf("foo-%v", i), + Namespace: "baz", + UID: "bar", + APIVersion: "version", + } + // we need to vary the reason to prevent aggregation + go recorder.Eventf(ref, v1.EventTypeNormal, "Reason-"+string(i), strconv.Itoa(i)) + } + // Make sure no events were dropped by either of the listeners. + for i := 0; i < maxQueuedEvents; i++ { + <-recorderCalled + <-loggerCalled + } + // Make sure that every event was attempted 5 times + for i := 0; i < maxQueuedEvents; i++ { + if counts[i] < 5 { + t.Errorf("Only attempted to record event '%d' %d times.", i, counts[i]) + } + } + sinkWatcher.Stop() + logWatcher.Stop() +} + +func TestEventfNoNamespace(t *testing.T) { + testPod := &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + SelfLink: "/api/version/pods/foo", + Name: "foo", + UID: "bar", + }, + } + testRef, err := ref.GetPartialReference(scheme.Scheme, testPod, "spec.containers[2]") + if err != nil { + t.Fatal(err) + } + table := []struct { + obj k8sruntime.Object + eventtype string + reason string + messageFmt string + elements []interface{} + expect *v1.Event + expectLog string + expectUpdate bool + }{ + { + obj: testRef, + eventtype: v1.EventTypeNormal, + reason: "Started", + messageFmt: "some verbose message: %v", + elements: []interface{}{1}, + expect: &v1.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Namespace: "default", + }, + InvolvedObject: v1.ObjectReference{ + Kind: "Pod", + Name: "foo", + Namespace: "", + UID: "bar", + APIVersion: "version", + FieldPath: "spec.containers[2]", + }, + Reason: "Started", + Message: "some verbose message: 1", + Source: v1.EventSource{Component: "eventTest"}, + Count: 1, + Type: v1.EventTypeNormal, + }, + expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"", Name:"foo", UID:"bar", APIVersion:"version", ResourceVersion:"", FieldPath:"spec.containers[2]"}): type: 'Normal' reason: 'Started' some verbose message: 1`, + expectUpdate: false, + }, + } + + testCache := map[string]*v1.Event{} + logCalled := make(chan struct{}) + createEvent := make(chan *v1.Event) + updateEvent := make(chan *v1.Event) + patchEvent := make(chan *v1.Event) + testEvents := testEventSink{ + OnCreate: OnCreateFactory(testCache, createEvent), + OnUpdate: func(event *v1.Event) (*v1.Event, error) { + updateEvent <- event + return event, nil + }, + OnPatch: OnPatchFactory(testCache, patchEvent), + } + eventBroadcaster := NewBroadcasterForTests(0) + sinkWatcher := eventBroadcaster.StartRecordingToSink(&testEvents) + + clock := clock.NewFakeClock(time.Now()) + recorder := recorderWithFakeClock(v1.EventSource{Component: "eventTest"}, eventBroadcaster, clock) + + for index, item := range table { + clock.Step(1 * time.Second) + logWatcher := eventBroadcaster.StartLogging(func(formatter string, args ...interface{}) { + if e, a := item.expectLog, fmt.Sprintf(formatter, args...); e != a { + t.Errorf("Expected '%v', got '%v'", e, a) + } + logCalled <- struct{}{} + }) + recorder.Eventf(item.obj, item.eventtype, item.reason, item.messageFmt, item.elements...) + + <-logCalled + + // validate event + if item.expectUpdate { + actualEvent := <-patchEvent + validateEvent(strconv.Itoa(index), actualEvent, item.expect, t) + } else { + actualEvent := <-createEvent + validateEvent(strconv.Itoa(index), actualEvent, item.expect, t) + } + + logWatcher.Stop() + } + sinkWatcher.Stop() +} + +func TestMultiSinkCache(t *testing.T) { + testPod := &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + SelfLink: "/api/version/pods/foo", + Name: "foo", + Namespace: "baz", + UID: "bar", + }, + } + testPod2 := &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + SelfLink: "/api/version/pods/foo", + Name: "foo", + Namespace: "baz", + UID: "differentUid", + }, + } + testRef, err := ref.GetPartialReference(scheme.Scheme, testPod, "spec.containers[2]") + testRef2, err := ref.GetPartialReference(scheme.Scheme, testPod2, "spec.containers[3]") + if err != nil { + t.Fatal(err) + } + table := []struct { + obj k8sruntime.Object + eventtype string + reason string + messageFmt string + elements []interface{} + expect *v1.Event + expectLog string + expectUpdate bool + }{ + { + obj: testRef, + eventtype: v1.EventTypeNormal, + reason: "Started", + messageFmt: "some verbose message: %v", + elements: []interface{}{1}, + expect: &v1.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Namespace: "baz", + }, + InvolvedObject: v1.ObjectReference{ + Kind: "Pod", + Name: "foo", + Namespace: "baz", + UID: "bar", + APIVersion: "version", + FieldPath: "spec.containers[2]", + }, + Reason: "Started", + Message: "some verbose message: 1", + Source: v1.EventSource{Component: "eventTest"}, + Count: 1, + Type: v1.EventTypeNormal, + }, + expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"bar", APIVersion:"version", ResourceVersion:"", FieldPath:"spec.containers[2]"}): type: 'Normal' reason: 'Started' some verbose message: 1`, + expectUpdate: false, + }, + { + obj: testPod, + eventtype: v1.EventTypeNormal, + reason: "Killed", + messageFmt: "some other verbose message: %v", + elements: []interface{}{1}, + expect: &v1.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Namespace: "baz", + }, + InvolvedObject: v1.ObjectReference{ + Kind: "Pod", + Name: "foo", + Namespace: "baz", + UID: "bar", + APIVersion: "version", + }, + Reason: "Killed", + Message: "some other verbose message: 1", + Source: v1.EventSource{Component: "eventTest"}, + Count: 1, + Type: v1.EventTypeNormal, + }, + expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"bar", APIVersion:"version", ResourceVersion:"", FieldPath:""}): type: 'Normal' reason: 'Killed' some other verbose message: 1`, + expectUpdate: false, + }, + { + obj: testRef, + eventtype: v1.EventTypeNormal, + reason: "Started", + messageFmt: "some verbose message: %v", + elements: []interface{}{1}, + expect: &v1.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Namespace: "baz", + }, + InvolvedObject: v1.ObjectReference{ + Kind: "Pod", + Name: "foo", + Namespace: "baz", + UID: "bar", + APIVersion: "version", + FieldPath: "spec.containers[2]", + }, + Reason: "Started", + Message: "some verbose message: 1", + Source: v1.EventSource{Component: "eventTest"}, + Count: 2, + Type: v1.EventTypeNormal, + }, + expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"bar", APIVersion:"version", ResourceVersion:"", FieldPath:"spec.containers[2]"}): type: 'Normal' reason: 'Started' some verbose message: 1`, + expectUpdate: true, + }, + { + obj: testRef2, + eventtype: v1.EventTypeNormal, + reason: "Started", + messageFmt: "some verbose message: %v", + elements: []interface{}{1}, + expect: &v1.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Namespace: "baz", + }, + InvolvedObject: v1.ObjectReference{ + Kind: "Pod", + Name: "foo", + Namespace: "baz", + UID: "differentUid", + APIVersion: "version", + FieldPath: "spec.containers[3]", + }, + Reason: "Started", + Message: "some verbose message: 1", + Source: v1.EventSource{Component: "eventTest"}, + Count: 1, + Type: v1.EventTypeNormal, + }, + expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"differentUid", APIVersion:"version", ResourceVersion:"", FieldPath:"spec.containers[3]"}): type: 'Normal' reason: 'Started' some verbose message: 1`, + expectUpdate: false, + }, + { + obj: testRef, + eventtype: v1.EventTypeNormal, + reason: "Started", + messageFmt: "some verbose message: %v", + elements: []interface{}{1}, + expect: &v1.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Namespace: "baz", + }, + InvolvedObject: v1.ObjectReference{ + Kind: "Pod", + Name: "foo", + Namespace: "baz", + UID: "bar", + APIVersion: "version", + FieldPath: "spec.containers[2]", + }, + Reason: "Started", + Message: "some verbose message: 1", + Source: v1.EventSource{Component: "eventTest"}, + Count: 3, + Type: v1.EventTypeNormal, + }, + expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"bar", APIVersion:"version", ResourceVersion:"", FieldPath:"spec.containers[2]"}): type: 'Normal' reason: 'Started' some verbose message: 1`, + expectUpdate: true, + }, + { + obj: testRef2, + eventtype: v1.EventTypeNormal, + reason: "Stopped", + messageFmt: "some verbose message: %v", + elements: []interface{}{1}, + expect: &v1.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Namespace: "baz", + }, + InvolvedObject: v1.ObjectReference{ + Kind: "Pod", + Name: "foo", + Namespace: "baz", + UID: "differentUid", + APIVersion: "version", + FieldPath: "spec.containers[3]", + }, + Reason: "Stopped", + Message: "some verbose message: 1", + Source: v1.EventSource{Component: "eventTest"}, + Count: 1, + Type: v1.EventTypeNormal, + }, + expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"differentUid", APIVersion:"version", ResourceVersion:"", FieldPath:"spec.containers[3]"}): type: 'Normal' reason: 'Stopped' some verbose message: 1`, + expectUpdate: false, + }, + { + obj: testRef2, + eventtype: v1.EventTypeNormal, + reason: "Stopped", + messageFmt: "some verbose message: %v", + elements: []interface{}{1}, + expect: &v1.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Namespace: "baz", + }, + InvolvedObject: v1.ObjectReference{ + Kind: "Pod", + Name: "foo", + Namespace: "baz", + UID: "differentUid", + APIVersion: "version", + FieldPath: "spec.containers[3]", + }, + Reason: "Stopped", + Message: "some verbose message: 1", + Source: v1.EventSource{Component: "eventTest"}, + Count: 2, + Type: v1.EventTypeNormal, + }, + expectLog: `Event(v1.ObjectReference{Kind:"Pod", Namespace:"baz", Name:"foo", UID:"differentUid", APIVersion:"version", ResourceVersion:"", FieldPath:"spec.containers[3]"}): type: 'Normal' reason: 'Stopped' some verbose message: 1`, + expectUpdate: true, + }, + } + + testCache := map[string]*v1.Event{} + createEvent := make(chan *v1.Event) + updateEvent := make(chan *v1.Event) + patchEvent := make(chan *v1.Event) + testEvents := testEventSink{ + OnCreate: OnCreateFactory(testCache, createEvent), + OnUpdate: func(event *v1.Event) (*v1.Event, error) { + updateEvent <- event + return event, nil + }, + OnPatch: OnPatchFactory(testCache, patchEvent), + } + + testCache2 := map[string]*v1.Event{} + createEvent2 := make(chan *v1.Event) + updateEvent2 := make(chan *v1.Event) + patchEvent2 := make(chan *v1.Event) + testEvents2 := testEventSink{ + OnCreate: OnCreateFactory(testCache2, createEvent2), + OnUpdate: func(event *v1.Event) (*v1.Event, error) { + updateEvent2 <- event + return event, nil + }, + OnPatch: OnPatchFactory(testCache2, patchEvent2), + } + + eventBroadcaster := NewBroadcasterForTests(0) + clock := clock.NewFakeClock(time.Now()) + recorder := recorderWithFakeClock(v1.EventSource{Component: "eventTest"}, eventBroadcaster, clock) + + sinkWatcher := eventBroadcaster.StartRecordingToSink(&testEvents) + for index, item := range table { + clock.Step(1 * time.Second) + recorder.Eventf(item.obj, item.eventtype, item.reason, item.messageFmt, item.elements...) + + // validate event + if item.expectUpdate { + actualEvent := <-patchEvent + validateEvent(strconv.Itoa(index), actualEvent, item.expect, t) + } else { + actualEvent := <-createEvent + validateEvent(strconv.Itoa(index), actualEvent, item.expect, t) + } + } + + // Another StartRecordingToSink call should start to record events with new clean cache. + sinkWatcher2 := eventBroadcaster.StartRecordingToSink(&testEvents2) + for index, item := range table { + clock.Step(1 * time.Second) + recorder.Eventf(item.obj, item.eventtype, item.reason, item.messageFmt, item.elements...) + + // validate event + if item.expectUpdate { + actualEvent := <-patchEvent2 + validateEvent(strconv.Itoa(index), actualEvent, item.expect, t) + } else { + actualEvent := <-createEvent2 + validateEvent(strconv.Itoa(index), actualEvent, item.expect, t) + } + } + + sinkWatcher.Stop() + sinkWatcher2.Stop() +} diff --git a/vendor/k8s.io/client-go/tools/record/events_cache_test.go b/vendor/k8s.io/client-go/tools/record/events_cache_test.go new file mode 100644 index 000000000..6ccd16d82 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/record/events_cache_test.go @@ -0,0 +1,287 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package record + +import ( + "reflect" + "strings" + "testing" + "time" + + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/clock" + "k8s.io/apimachinery/pkg/util/diff" +) + +func makeObjectReference(kind, name, namespace string) v1.ObjectReference { + return v1.ObjectReference{ + Kind: kind, + Name: name, + Namespace: namespace, + UID: "C934D34AFB20242", + APIVersion: "version", + FieldPath: "spec.containers{mycontainer}", + } +} + +func makeEvent(reason, message string, involvedObject v1.ObjectReference) v1.Event { + eventTime := metav1.Now() + event := v1.Event{ + Reason: reason, + Message: message, + InvolvedObject: involvedObject, + Source: v1.EventSource{ + Component: "kubelet", + Host: "kublet.node1", + }, + Count: 1, + FirstTimestamp: eventTime, + LastTimestamp: eventTime, + Type: v1.EventTypeNormal, + } + return event +} + +func makeEvents(num int, template v1.Event) []v1.Event { + events := []v1.Event{} + for i := 0; i < num; i++ { + events = append(events, template) + } + return events +} + +func makeUniqueEvents(num int) []v1.Event { + events := []v1.Event{} + kind := "Pod" + for i := 0; i < num; i++ { + reason := strings.Join([]string{"reason", string(i)}, "-") + message := strings.Join([]string{"message", string(i)}, "-") + name := strings.Join([]string{"pod", string(i)}, "-") + namespace := strings.Join([]string{"ns", string(i)}, "-") + involvedObject := makeObjectReference(kind, name, namespace) + events = append(events, makeEvent(reason, message, involvedObject)) + } + return events +} + +func makeSimilarEvents(num int, template v1.Event, messagePrefix string) []v1.Event { + events := makeEvents(num, template) + for i := range events { + events[i].Message = strings.Join([]string{messagePrefix, string(i), events[i].Message}, "-") + } + return events +} + +func setCount(event v1.Event, count int) v1.Event { + event.Count = int32(count) + return event +} + +func validateEvent(messagePrefix string, actualEvent *v1.Event, expectedEvent *v1.Event, t *testing.T) (*v1.Event, error) { + recvEvent := *actualEvent + expectCompression := expectedEvent.Count > 1 + t.Logf("%v - expectedEvent.Count is %d\n", messagePrefix, expectedEvent.Count) + // Just check that the timestamp was set. + if recvEvent.FirstTimestamp.IsZero() || recvEvent.LastTimestamp.IsZero() { + t.Errorf("%v - timestamp wasn't set: %#v", messagePrefix, recvEvent) + } + actualFirstTimestamp := recvEvent.FirstTimestamp + actualLastTimestamp := recvEvent.LastTimestamp + if actualFirstTimestamp.Equal(&actualLastTimestamp) { + if expectCompression { + t.Errorf("%v - FirstTimestamp (%q) and LastTimestamp (%q) must be different to indicate event compression happened, but were the same. Actual Event: %#v", messagePrefix, actualFirstTimestamp, actualLastTimestamp, recvEvent) + } + } else { + if expectedEvent.Count == 1 { + t.Errorf("%v - FirstTimestamp (%q) and LastTimestamp (%q) must be equal to indicate only one occurrence of the event, but were different. Actual Event: %#v", messagePrefix, actualFirstTimestamp, actualLastTimestamp, recvEvent) + } + } + // Temp clear time stamps for comparison because actual values don't matter for comparison + recvEvent.FirstTimestamp = expectedEvent.FirstTimestamp + recvEvent.LastTimestamp = expectedEvent.LastTimestamp + // Check that name has the right prefix. + if n, en := recvEvent.Name, expectedEvent.Name; !strings.HasPrefix(n, en) { + t.Errorf("%v - Name '%v' does not contain prefix '%v'", messagePrefix, n, en) + } + recvEvent.Name = expectedEvent.Name + if e, a := expectedEvent, &recvEvent; !reflect.DeepEqual(e, a) { + t.Errorf("%v - diff: %s", messagePrefix, diff.ObjectGoPrintDiff(e, a)) + } + recvEvent.FirstTimestamp = actualFirstTimestamp + recvEvent.LastTimestamp = actualLastTimestamp + return actualEvent, nil +} + +// TestDefaultEventFilterFunc ensures that no events are filtered +func TestDefaultEventFilterFunc(t *testing.T) { + event := makeEvent("end-of-world", "it was fun", makeObjectReference("Pod", "pod1", "other")) + if DefaultEventFilterFunc(&event) { + t.Fatalf("DefaultEventFilterFunc should always return false") + } +} + +// TestEventAggregatorByReasonFunc ensures that two events are aggregated if they vary only by event.message +func TestEventAggregatorByReasonFunc(t *testing.T) { + event1 := makeEvent("end-of-world", "it was fun", makeObjectReference("Pod", "pod1", "other")) + event2 := makeEvent("end-of-world", "it was awful", makeObjectReference("Pod", "pod1", "other")) + event3 := makeEvent("nevermind", "it was a bug", makeObjectReference("Pod", "pod1", "other")) + + aggKey1, localKey1 := EventAggregatorByReasonFunc(&event1) + aggKey2, localKey2 := EventAggregatorByReasonFunc(&event2) + aggKey3, _ := EventAggregatorByReasonFunc(&event3) + + if aggKey1 != aggKey2 { + t.Errorf("Expected %v equal %v", aggKey1, aggKey2) + } + if localKey1 == localKey2 { + t.Errorf("Expected %v to not equal %v", aggKey1, aggKey3) + } + if aggKey1 == aggKey3 { + t.Errorf("Expected %v to not equal %v", aggKey1, aggKey3) + } +} + +// TestEventAggregatorByReasonMessageFunc validates the proper output for an aggregate message +func TestEventAggregatorByReasonMessageFunc(t *testing.T) { + expectedPrefix := "(combined from similar events): " + event1 := makeEvent("end-of-world", "it was fun", makeObjectReference("Pod", "pod1", "other")) + actual := EventAggregatorByReasonMessageFunc(&event1) + if !strings.HasPrefix(actual, expectedPrefix) { + t.Errorf("Expected %v to begin with prefix %v", actual, expectedPrefix) + } +} + +// TestEventCorrelator validates proper counting, aggregation of events +func TestEventCorrelator(t *testing.T) { + firstEvent := makeEvent("first", "i am first", makeObjectReference("Pod", "my-pod", "my-ns")) + duplicateEvent := makeEvent("duplicate", "me again", makeObjectReference("Pod", "my-pod", "my-ns")) + uniqueEvent := makeEvent("unique", "snowflake", makeObjectReference("Pod", "my-pod", "my-ns")) + similarEvent := makeEvent("similar", "similar message", makeObjectReference("Pod", "my-pod", "my-ns")) + similarEvent.InvolvedObject.FieldPath = "spec.containers{container1}" + aggregateEvent := makeEvent(similarEvent.Reason, EventAggregatorByReasonMessageFunc(&similarEvent), similarEvent.InvolvedObject) + similarButDifferentContainerEvent := similarEvent + similarButDifferentContainerEvent.InvolvedObject.FieldPath = "spec.containers{container2}" + scenario := map[string]struct { + previousEvents []v1.Event + newEvent v1.Event + expectedEvent v1.Event + intervalSeconds int + expectedSkip bool + }{ + "create-a-single-event": { + previousEvents: []v1.Event{}, + newEvent: firstEvent, + expectedEvent: setCount(firstEvent, 1), + intervalSeconds: 5, + }, + "the-same-event-should-just-count": { + previousEvents: makeEvents(1, duplicateEvent), + newEvent: duplicateEvent, + expectedEvent: setCount(duplicateEvent, 2), + intervalSeconds: 5, + }, + "the-same-event-should-just-count-even-if-more-than-aggregate": { + previousEvents: makeEvents(defaultAggregateMaxEvents, duplicateEvent), + newEvent: duplicateEvent, + expectedEvent: setCount(duplicateEvent, defaultAggregateMaxEvents+1), + intervalSeconds: 30, // larger interval induces aggregation but not spam. + }, + "the-same-event-is-spam-if-happens-too-frequently": { + previousEvents: makeEvents(defaultSpamBurst+1, duplicateEvent), + newEvent: duplicateEvent, + expectedSkip: true, + intervalSeconds: 1, + }, + "create-many-unique-events": { + previousEvents: makeUniqueEvents(30), + newEvent: uniqueEvent, + expectedEvent: setCount(uniqueEvent, 1), + intervalSeconds: 5, + }, + "similar-events-should-aggregate-event": { + previousEvents: makeSimilarEvents(defaultAggregateMaxEvents-1, similarEvent, similarEvent.Message), + newEvent: similarEvent, + expectedEvent: setCount(aggregateEvent, 1), + intervalSeconds: 5, + }, + "similar-events-many-times-should-count-the-aggregate": { + previousEvents: makeSimilarEvents(defaultAggregateMaxEvents, similarEvent, similarEvent.Message), + newEvent: similarEvent, + expectedEvent: setCount(aggregateEvent, 2), + intervalSeconds: 5, + }, + "events-from-different-containers-do-not-aggregate": { + previousEvents: makeEvents(1, similarButDifferentContainerEvent), + newEvent: similarEvent, + expectedEvent: setCount(similarEvent, 1), + intervalSeconds: 5, + }, + "similar-events-whose-interval-is-greater-than-aggregate-interval-do-not-aggregate": { + previousEvents: makeSimilarEvents(defaultAggregateMaxEvents-1, similarEvent, similarEvent.Message), + newEvent: similarEvent, + expectedEvent: setCount(similarEvent, 1), + intervalSeconds: defaultAggregateIntervalInSeconds, + }, + } + + for testScenario, testInput := range scenario { + eventInterval := time.Duration(testInput.intervalSeconds) * time.Second + clock := clock.IntervalClock{Time: time.Now(), Duration: eventInterval} + correlator := NewEventCorrelator(&clock) + for i := range testInput.previousEvents { + event := testInput.previousEvents[i] + now := metav1.NewTime(clock.Now()) + event.FirstTimestamp = now + event.LastTimestamp = now + result, err := correlator.EventCorrelate(&event) + if err != nil { + t.Errorf("scenario %v: unexpected error playing back prevEvents %v", testScenario, err) + } + // if we are skipping the event, we can avoid updating state + if !result.Skip { + correlator.UpdateState(result.Event) + } + } + + // update the input to current clock value + now := metav1.NewTime(clock.Now()) + testInput.newEvent.FirstTimestamp = now + testInput.newEvent.LastTimestamp = now + result, err := correlator.EventCorrelate(&testInput.newEvent) + if err != nil { + t.Errorf("scenario %v: unexpected error correlating input event %v", testScenario, err) + } + + // verify we did not get skip from filter function unexpectedly... + if result.Skip != testInput.expectedSkip { + t.Errorf("scenario %v: expected skip %v, but got %v", testScenario, testInput.expectedSkip, result.Skip) + continue + } + + // we wanted to actually skip, so no event is needed to validate + if testInput.expectedSkip { + continue + } + + // validate event + _, err = validateEvent(testScenario, result.Event, &testInput.expectedEvent, t) + if err != nil { + t.Errorf("scenario %v: unexpected error validating result %v", testScenario, err) + } + } +} diff --git a/vendor/k8s.io/client-go/tools/remotecommand/BUILD b/vendor/k8s.io/client-go/tools/remotecommand/BUILD new file mode 100644 index 000000000..9d061ed06 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/remotecommand/BUILD @@ -0,0 +1,60 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", + "go_test", +) + +go_test( + name = "go_default_test", + srcs = [ + "v2_test.go", + "v4_test.go", + ], + library = ":go_default_library", + deps = [ + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/httpstream:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", + ], +) + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "errorstream.go", + "remotecommand.go", + "resize.go", + "v1.go", + "v2.go", + "v3.go", + "v4.go", + ], + deps = [ + "//vendor/github.com/golang/glog:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/httpstream:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/remotecommand:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + "//vendor/k8s.io/client-go/transport:go_default_library", + "//vendor/k8s.io/client-go/transport/spdy:go_default_library", + "//vendor/k8s.io/client-go/util/exec:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/client-go/tools/remotecommand/doc.go b/vendor/k8s.io/client-go/tools/remotecommand/doc.go new file mode 100644 index 000000000..ac06a9cd3 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/remotecommand/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package remotecommand adds support for executing commands in containers, +// with support for separate stdin, stdout, and stderr streams, as well as +// TTY. +package remotecommand // import "k8s.io/client-go/tools/remotecommand" diff --git a/vendor/k8s.io/client-go/tools/remotecommand/errorstream.go b/vendor/k8s.io/client-go/tools/remotecommand/errorstream.go new file mode 100644 index 000000000..360276b65 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/remotecommand/errorstream.go @@ -0,0 +1,55 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package remotecommand + +import ( + "fmt" + "io" + "io/ioutil" + + "k8s.io/apimachinery/pkg/util/runtime" +) + +// errorStreamDecoder interprets the data on the error channel and creates a go error object from it. +type errorStreamDecoder interface { + decode(message []byte) error +} + +// watchErrorStream watches the errorStream for remote command error data, +// decodes it with the given errorStreamDecoder, sends the decoded error (or nil if the remote +// command exited successfully) to the returned error channel, and closes it. +// This function returns immediately. +func watchErrorStream(errorStream io.Reader, d errorStreamDecoder) chan error { + errorChan := make(chan error) + + go func() { + defer runtime.HandleCrash() + + message, err := ioutil.ReadAll(errorStream) + switch { + case err != nil && err != io.EOF: + errorChan <- fmt.Errorf("error reading from error stream: %s", err) + case len(message) > 0: + errorChan <- d.decode(message) + default: + errorChan <- nil + } + close(errorChan) + }() + + return errorChan +} diff --git a/vendor/k8s.io/client-go/tools/remotecommand/remotecommand.go b/vendor/k8s.io/client-go/tools/remotecommand/remotecommand.go new file mode 100644 index 000000000..bcbe9fcd4 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/remotecommand/remotecommand.go @@ -0,0 +1,138 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package remotecommand + +import ( + "fmt" + "io" + "net/http" + "net/url" + + "github.com/golang/glog" + + "k8s.io/apimachinery/pkg/util/httpstream" + "k8s.io/apimachinery/pkg/util/remotecommand" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/transport" + spdy "k8s.io/client-go/transport/spdy" +) + +// StreamOptions holds information pertaining to the current streaming session: supported stream +// protocols, input/output streams, if the client is requesting a TTY, and a terminal size queue to +// support terminal resizing. +type StreamOptions struct { + Stdin io.Reader + Stdout io.Writer + Stderr io.Writer + Tty bool + TerminalSizeQueue TerminalSizeQueue +} + +// Executor is an interface for transporting shell-style streams. +type Executor interface { + // Stream initiates the transport of the standard shell streams. It will transport any + // non-nil stream to a remote system, and return an error if a problem occurs. If tty + // is set, the stderr stream is not used (raw TTY manages stdout and stderr over the + // stdout stream). + Stream(options StreamOptions) error +} + +type streamCreator interface { + CreateStream(headers http.Header) (httpstream.Stream, error) +} + +type streamProtocolHandler interface { + stream(conn streamCreator) error +} + +// streamExecutor handles transporting standard shell streams over an httpstream connection. +type streamExecutor struct { + upgrader spdy.Upgrader + transport http.RoundTripper + + method string + url *url.URL + protocols []string +} + +// NewSPDYExecutor connects to the provided server and upgrades the connection to +// multiplexed bidirectional streams. +func NewSPDYExecutor(config *restclient.Config, method string, url *url.URL) (Executor, error) { + return NewSPDYExecutorForProtocols( + config, method, url, + remotecommand.StreamProtocolV4Name, + remotecommand.StreamProtocolV3Name, + remotecommand.StreamProtocolV2Name, + remotecommand.StreamProtocolV1Name, + ) +} + +// NewSPDYExecutorForProtocols connects to the provided server and upgrades the connection to +// multiplexed bidirectional streams using only the provided protocols. Exposed for testing, most +// callers should use NewSPDYExecutor. +func NewSPDYExecutorForProtocols(config *restclient.Config, method string, url *url.URL, protocols ...string) (Executor, error) { + wrapper, upgradeRoundTripper, err := spdy.RoundTripperFor(config) + if err != nil { + return nil, err + } + wrapper = transport.DebugWrappers(wrapper) + return &streamExecutor{ + upgrader: upgradeRoundTripper, + transport: wrapper, + method: method, + url: url, + protocols: protocols, + }, nil +} + +// Stream opens a protocol streamer to the server and streams until a client closes +// the connection or the server disconnects. +func (e *streamExecutor) Stream(options StreamOptions) error { + req, err := http.NewRequest(e.method, e.url.String(), nil) + if err != nil { + return fmt.Errorf("error creating request: %v", err) + } + + conn, protocol, err := spdy.Negotiate( + e.upgrader, + &http.Client{Transport: e.transport}, + req, + e.protocols..., + ) + if err != nil { + return err + } + defer conn.Close() + + var streamer streamProtocolHandler + + switch protocol { + case remotecommand.StreamProtocolV4Name: + streamer = newStreamProtocolV4(options) + case remotecommand.StreamProtocolV3Name: + streamer = newStreamProtocolV3(options) + case remotecommand.StreamProtocolV2Name: + streamer = newStreamProtocolV2(options) + case "": + glog.V(4).Infof("The server did not negotiate a streaming protocol version. Falling back to %s", remotecommand.StreamProtocolV1Name) + fallthrough + case remotecommand.StreamProtocolV1Name: + streamer = newStreamProtocolV1(options) + } + + return streamer.stream(conn) +} diff --git a/vendor/k8s.io/client-go/tools/remotecommand/resize.go b/vendor/k8s.io/client-go/tools/remotecommand/resize.go new file mode 100644 index 000000000..c838f21ba --- /dev/null +++ b/vendor/k8s.io/client-go/tools/remotecommand/resize.go @@ -0,0 +1,33 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package remotecommand + +// TerminalSize and TerminalSizeQueue was a part of k8s.io/kubernetes/pkg/util/term +// and were moved in order to decouple client from other term dependencies + +// TerminalSize represents the width and height of a terminal. +type TerminalSize struct { + Width uint16 + Height uint16 +} + +// TerminalSizeQueue is capable of returning terminal resize events as they occur. +type TerminalSizeQueue interface { + // Next returns the new terminal size after the terminal has been resized. It returns nil when + // monitoring has been stopped. + Next() *TerminalSize +} diff --git a/vendor/k8s.io/client-go/tools/remotecommand/v1.go b/vendor/k8s.io/client-go/tools/remotecommand/v1.go new file mode 100644 index 000000000..92dad727f --- /dev/null +++ b/vendor/k8s.io/client-go/tools/remotecommand/v1.go @@ -0,0 +1,160 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package remotecommand + +import ( + "fmt" + "io" + "io/ioutil" + "net/http" + + "github.com/golang/glog" + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/util/httpstream" +) + +// streamProtocolV1 implements the first version of the streaming exec & attach +// protocol. This version has some bugs, such as not being able to detect when +// non-interactive stdin data has ended. See http://issues.k8s.io/13394 and +// http://issues.k8s.io/13395 for more details. +type streamProtocolV1 struct { + StreamOptions + + errorStream httpstream.Stream + remoteStdin httpstream.Stream + remoteStdout httpstream.Stream + remoteStderr httpstream.Stream +} + +var _ streamProtocolHandler = &streamProtocolV1{} + +func newStreamProtocolV1(options StreamOptions) streamProtocolHandler { + return &streamProtocolV1{ + StreamOptions: options, + } +} + +func (p *streamProtocolV1) stream(conn streamCreator) error { + doneChan := make(chan struct{}, 2) + errorChan := make(chan error) + + cp := func(s string, dst io.Writer, src io.Reader) { + glog.V(6).Infof("Copying %s", s) + defer glog.V(6).Infof("Done copying %s", s) + if _, err := io.Copy(dst, src); err != nil && err != io.EOF { + glog.Errorf("Error copying %s: %v", s, err) + } + if s == v1.StreamTypeStdout || s == v1.StreamTypeStderr { + doneChan <- struct{}{} + } + } + + // set up all the streams first + var err error + headers := http.Header{} + headers.Set(v1.StreamType, v1.StreamTypeError) + p.errorStream, err = conn.CreateStream(headers) + if err != nil { + return err + } + defer p.errorStream.Reset() + + // Create all the streams first, then start the copy goroutines. The server doesn't start its copy + // goroutines until it's received all of the streams. If the client creates the stdin stream and + // immediately begins copying stdin data to the server, it's possible to overwhelm and wedge the + // spdy frame handler in the server so that it is full of unprocessed frames. The frames aren't + // getting processed because the server hasn't started its copying, and it won't do that until it + // gets all the streams. By creating all the streams first, we ensure that the server is ready to + // process data before the client starts sending any. See https://issues.k8s.io/16373 for more info. + if p.Stdin != nil { + headers.Set(v1.StreamType, v1.StreamTypeStdin) + p.remoteStdin, err = conn.CreateStream(headers) + if err != nil { + return err + } + defer p.remoteStdin.Reset() + } + + if p.Stdout != nil { + headers.Set(v1.StreamType, v1.StreamTypeStdout) + p.remoteStdout, err = conn.CreateStream(headers) + if err != nil { + return err + } + defer p.remoteStdout.Reset() + } + + if p.Stderr != nil && !p.Tty { + headers.Set(v1.StreamType, v1.StreamTypeStderr) + p.remoteStderr, err = conn.CreateStream(headers) + if err != nil { + return err + } + defer p.remoteStderr.Reset() + } + + // now that all the streams have been created, proceed with reading & copying + + // always read from errorStream + go func() { + message, err := ioutil.ReadAll(p.errorStream) + if err != nil && err != io.EOF { + errorChan <- fmt.Errorf("Error reading from error stream: %s", err) + return + } + if len(message) > 0 { + errorChan <- fmt.Errorf("Error executing remote command: %s", message) + return + } + }() + + if p.Stdin != nil { + // TODO this goroutine will never exit cleanly (the io.Copy never unblocks) + // because stdin is not closed until the process exits. If we try to call + // stdin.Close(), it returns no error but doesn't unblock the copy. It will + // exit when the process exits, instead. + go cp(v1.StreamTypeStdin, p.remoteStdin, p.Stdin) + } + + waitCount := 0 + completedStreams := 0 + + if p.Stdout != nil { + waitCount++ + go cp(v1.StreamTypeStdout, p.Stdout, p.remoteStdout) + } + + if p.Stderr != nil && !p.Tty { + waitCount++ + go cp(v1.StreamTypeStderr, p.Stderr, p.remoteStderr) + } + +Loop: + for { + select { + case <-doneChan: + completedStreams++ + if completedStreams == waitCount { + break Loop + } + case err := <-errorChan: + return err + } + } + + return nil +} diff --git a/vendor/k8s.io/client-go/tools/remotecommand/v2.go b/vendor/k8s.io/client-go/tools/remotecommand/v2.go new file mode 100644 index 000000000..b74ae8de2 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/remotecommand/v2.go @@ -0,0 +1,195 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package remotecommand + +import ( + "fmt" + "io" + "io/ioutil" + "net/http" + "sync" + + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/util/runtime" +) + +// streamProtocolV2 implements version 2 of the streaming protocol for attach +// and exec. The original streaming protocol was metav1. As a result, this +// version is referred to as version 2, even though it is the first actual +// numbered version. +type streamProtocolV2 struct { + StreamOptions + + errorStream io.Reader + remoteStdin io.ReadWriteCloser + remoteStdout io.Reader + remoteStderr io.Reader +} + +var _ streamProtocolHandler = &streamProtocolV2{} + +func newStreamProtocolV2(options StreamOptions) streamProtocolHandler { + return &streamProtocolV2{ + StreamOptions: options, + } +} + +func (p *streamProtocolV2) createStreams(conn streamCreator) error { + var err error + headers := http.Header{} + + // set up error stream + headers.Set(v1.StreamType, v1.StreamTypeError) + p.errorStream, err = conn.CreateStream(headers) + if err != nil { + return err + } + + // set up stdin stream + if p.Stdin != nil { + headers.Set(v1.StreamType, v1.StreamTypeStdin) + p.remoteStdin, err = conn.CreateStream(headers) + if err != nil { + return err + } + } + + // set up stdout stream + if p.Stdout != nil { + headers.Set(v1.StreamType, v1.StreamTypeStdout) + p.remoteStdout, err = conn.CreateStream(headers) + if err != nil { + return err + } + } + + // set up stderr stream + if p.Stderr != nil && !p.Tty { + headers.Set(v1.StreamType, v1.StreamTypeStderr) + p.remoteStderr, err = conn.CreateStream(headers) + if err != nil { + return err + } + } + return nil +} + +func (p *streamProtocolV2) copyStdin() { + if p.Stdin != nil { + var once sync.Once + + // copy from client's stdin to container's stdin + go func() { + defer runtime.HandleCrash() + + // if p.stdin is noninteractive, p.g. `echo abc | kubectl exec -i <pod> -- cat`, make sure + // we close remoteStdin as soon as the copy from p.stdin to remoteStdin finishes. Otherwise + // the executed command will remain running. + defer once.Do(func() { p.remoteStdin.Close() }) + + if _, err := io.Copy(p.remoteStdin, p.Stdin); err != nil { + runtime.HandleError(err) + } + }() + + // read from remoteStdin until the stream is closed. this is essential to + // be able to exit interactive sessions cleanly and not leak goroutines or + // hang the client's terminal. + // + // TODO we aren't using go-dockerclient any more; revisit this to determine if it's still + // required by engine-api. + // + // go-dockerclient's current hijack implementation + // (https://github.com/fsouza/go-dockerclient/blob/89f3d56d93788dfe85f864a44f85d9738fca0670/client.go#L564) + // waits for all three streams (stdin/stdout/stderr) to finish copying + // before returning. When hijack finishes copying stdout/stderr, it calls + // Close() on its side of remoteStdin, which allows this copy to complete. + // When that happens, we must Close() on our side of remoteStdin, to + // allow the copy in hijack to complete, and hijack to return. + go func() { + defer runtime.HandleCrash() + defer once.Do(func() { p.remoteStdin.Close() }) + + // this "copy" doesn't actually read anything - it's just here to wait for + // the server to close remoteStdin. + if _, err := io.Copy(ioutil.Discard, p.remoteStdin); err != nil { + runtime.HandleError(err) + } + }() + } +} + +func (p *streamProtocolV2) copyStdout(wg *sync.WaitGroup) { + if p.Stdout == nil { + return + } + + wg.Add(1) + go func() { + defer runtime.HandleCrash() + defer wg.Done() + + if _, err := io.Copy(p.Stdout, p.remoteStdout); err != nil { + runtime.HandleError(err) + } + }() +} + +func (p *streamProtocolV2) copyStderr(wg *sync.WaitGroup) { + if p.Stderr == nil || p.Tty { + return + } + + wg.Add(1) + go func() { + defer runtime.HandleCrash() + defer wg.Done() + + if _, err := io.Copy(p.Stderr, p.remoteStderr); err != nil { + runtime.HandleError(err) + } + }() +} + +func (p *streamProtocolV2) stream(conn streamCreator) error { + if err := p.createStreams(conn); err != nil { + return err + } + + // now that all the streams have been created, proceed with reading & copying + + errorChan := watchErrorStream(p.errorStream, &errorDecoderV2{}) + + p.copyStdin() + + var wg sync.WaitGroup + p.copyStdout(&wg) + p.copyStderr(&wg) + + // we're waiting for stdout/stderr to finish copying + wg.Wait() + + // waits for errorStream to finish reading with an error or nil + return <-errorChan +} + +// errorDecoderV2 interprets the error channel data as plain text. +type errorDecoderV2 struct{} + +func (d *errorDecoderV2) decode(message []byte) error { + return fmt.Errorf("error executing remote command: %s", message) +} diff --git a/vendor/k8s.io/client-go/tools/remotecommand/v2_test.go b/vendor/k8s.io/client-go/tools/remotecommand/v2_test.go new file mode 100644 index 000000000..e303f57a9 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/remotecommand/v2_test.go @@ -0,0 +1,228 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package remotecommand + +import ( + "errors" + "io" + "net/http" + "strings" + "testing" + "time" + + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/util/httpstream" + "k8s.io/apimachinery/pkg/util/wait" +) + +type fakeReader struct { + err error +} + +func (r *fakeReader) Read([]byte) (int, error) { return 0, r.err } + +type fakeWriter struct{} + +func (*fakeWriter) Write([]byte) (int, error) { return 0, nil } + +type fakeStreamCreator struct { + created map[string]bool + errors map[string]error +} + +var _ streamCreator = &fakeStreamCreator{} + +func (f *fakeStreamCreator) CreateStream(headers http.Header) (httpstream.Stream, error) { + streamType := headers.Get(v1.StreamType) + f.created[streamType] = true + return nil, f.errors[streamType] +} + +func TestV2CreateStreams(t *testing.T) { + tests := []struct { + name string + stdin bool + stdinError error + stdout bool + stdoutError error + stderr bool + stderrError error + errorError error + tty bool + expectError bool + }{ + { + name: "stdin error", + stdin: true, + stdinError: errors.New("stdin error"), + expectError: true, + }, + { + name: "stdout error", + stdout: true, + stdoutError: errors.New("stdout error"), + expectError: true, + }, + { + name: "stderr error", + stderr: true, + stderrError: errors.New("stderr error"), + expectError: true, + }, + { + name: "error stream error", + stdin: true, + stdout: true, + stderr: true, + errorError: errors.New("error stream error"), + expectError: true, + }, + { + name: "no errors", + stdin: true, + stdout: true, + stderr: true, + expectError: false, + }, + { + name: "no errors, stderr & tty set, don't expect stderr", + stdin: true, + stdout: true, + stderr: true, + tty: true, + expectError: false, + }, + } + for _, test := range tests { + conn := &fakeStreamCreator{ + created: make(map[string]bool), + errors: map[string]error{ + v1.StreamTypeStdin: test.stdinError, + v1.StreamTypeStdout: test.stdoutError, + v1.StreamTypeStderr: test.stderrError, + v1.StreamTypeError: test.errorError, + }, + } + + opts := StreamOptions{Tty: test.tty} + if test.stdin { + opts.Stdin = &fakeReader{} + } + if test.stdout { + opts.Stdout = &fakeWriter{} + } + if test.stderr { + opts.Stderr = &fakeWriter{} + } + + h := newStreamProtocolV2(opts).(*streamProtocolV2) + err := h.createStreams(conn) + + if test.expectError { + if err == nil { + t.Errorf("%s: expected error", test.name) + continue + } + if e, a := test.stdinError, err; test.stdinError != nil && e != a { + t.Errorf("%s: expected %v, got %v", test.name, e, a) + } + if e, a := test.stdoutError, err; test.stdoutError != nil && e != a { + t.Errorf("%s: expected %v, got %v", test.name, e, a) + } + if e, a := test.stderrError, err; test.stderrError != nil && e != a { + t.Errorf("%s: expected %v, got %v", test.name, e, a) + } + if e, a := test.errorError, err; test.errorError != nil && e != a { + t.Errorf("%s: expected %v, got %v", test.name, e, a) + } + continue + } + + if !test.expectError && err != nil { + t.Errorf("%s: unexpected error: %v", test.name, err) + continue + } + + if test.stdin && !conn.created[v1.StreamTypeStdin] { + t.Errorf("%s: expected stdin stream", test.name) + } + if test.stdout && !conn.created[v1.StreamTypeStdout] { + t.Errorf("%s: expected stdout stream", test.name) + } + if test.stderr { + if test.tty && conn.created[v1.StreamTypeStderr] { + t.Errorf("%s: unexpected stderr stream because tty is set", test.name) + } else if !test.tty && !conn.created[v1.StreamTypeStderr] { + t.Errorf("%s: expected stderr stream", test.name) + } + } + if !conn.created[v1.StreamTypeError] { + t.Errorf("%s: expected error stream", test.name) + } + + } +} + +func TestV2ErrorStreamReading(t *testing.T) { + tests := []struct { + name string + stream io.Reader + expectedError error + }{ + { + name: "error reading from stream", + stream: &fakeReader{errors.New("foo")}, + expectedError: errors.New("error reading from error stream: foo"), + }, + { + name: "stream returns an error", + stream: strings.NewReader("some error"), + expectedError: errors.New("error executing remote command: some error"), + }, + } + + for _, test := range tests { + h := newStreamProtocolV2(StreamOptions{}).(*streamProtocolV2) + h.errorStream = test.stream + + ch := watchErrorStream(h.errorStream, &errorDecoderV2{}) + if ch == nil { + t.Fatalf("%s: unexpected nil channel", test.name) + } + + var err error + select { + case err = <-ch: + case <-time.After(wait.ForeverTestTimeout): + t.Fatalf("%s: timed out", test.name) + } + + if test.expectedError != nil { + if err == nil { + t.Errorf("%s: expected an error", test.name) + } else if e, a := test.expectedError, err; e.Error() != a.Error() { + t.Errorf("%s: expected %q, got %q", test.name, e, a) + } + continue + } + + if test.expectedError == nil && err != nil { + t.Errorf("%s: unexpected error: %v", test.name, err) + continue + } + } +} diff --git a/vendor/k8s.io/client-go/tools/remotecommand/v3.go b/vendor/k8s.io/client-go/tools/remotecommand/v3.go new file mode 100644 index 000000000..846dd24a5 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/remotecommand/v3.go @@ -0,0 +1,111 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package remotecommand + +import ( + "encoding/json" + "io" + "net/http" + "sync" + + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/util/runtime" +) + +// streamProtocolV3 implements version 3 of the streaming protocol for attach +// and exec. This version adds support for resizing the container's terminal. +type streamProtocolV3 struct { + *streamProtocolV2 + + resizeStream io.Writer +} + +var _ streamProtocolHandler = &streamProtocolV3{} + +func newStreamProtocolV3(options StreamOptions) streamProtocolHandler { + return &streamProtocolV3{ + streamProtocolV2: newStreamProtocolV2(options).(*streamProtocolV2), + } +} + +func (p *streamProtocolV3) createStreams(conn streamCreator) error { + // set up the streams from v2 + if err := p.streamProtocolV2.createStreams(conn); err != nil { + return err + } + + // set up resize stream + if p.Tty { + headers := http.Header{} + headers.Set(v1.StreamType, v1.StreamTypeResize) + var err error + p.resizeStream, err = conn.CreateStream(headers) + if err != nil { + return err + } + } + + return nil +} + +func (p *streamProtocolV3) handleResizes() { + if p.resizeStream == nil || p.TerminalSizeQueue == nil { + return + } + go func() { + defer runtime.HandleCrash() + + encoder := json.NewEncoder(p.resizeStream) + for { + size := p.TerminalSizeQueue.Next() + if size == nil { + return + } + if err := encoder.Encode(&size); err != nil { + runtime.HandleError(err) + } + } + }() +} + +func (p *streamProtocolV3) stream(conn streamCreator) error { + if err := p.createStreams(conn); err != nil { + return err + } + + // now that all the streams have been created, proceed with reading & copying + + errorChan := watchErrorStream(p.errorStream, &errorDecoderV3{}) + + p.handleResizes() + + p.copyStdin() + + var wg sync.WaitGroup + p.copyStdout(&wg) + p.copyStderr(&wg) + + // we're waiting for stdout/stderr to finish copying + wg.Wait() + + // waits for errorStream to finish reading with an error or nil + return <-errorChan +} + +type errorDecoderV3 struct { + errorDecoderV2 +} diff --git a/vendor/k8s.io/client-go/tools/remotecommand/v4.go b/vendor/k8s.io/client-go/tools/remotecommand/v4.go new file mode 100644 index 000000000..69ca934a0 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/remotecommand/v4.go @@ -0,0 +1,119 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package remotecommand + +import ( + "encoding/json" + "errors" + "fmt" + "strconv" + "sync" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/remotecommand" + "k8s.io/client-go/util/exec" +) + +// streamProtocolV4 implements version 4 of the streaming protocol for attach +// and exec. This version adds support for exit codes on the error stream through +// the use of metav1.Status instead of plain text messages. +type streamProtocolV4 struct { + *streamProtocolV3 +} + +var _ streamProtocolHandler = &streamProtocolV4{} + +func newStreamProtocolV4(options StreamOptions) streamProtocolHandler { + return &streamProtocolV4{ + streamProtocolV3: newStreamProtocolV3(options).(*streamProtocolV3), + } +} + +func (p *streamProtocolV4) createStreams(conn streamCreator) error { + return p.streamProtocolV3.createStreams(conn) +} + +func (p *streamProtocolV4) handleResizes() { + p.streamProtocolV3.handleResizes() +} + +func (p *streamProtocolV4) stream(conn streamCreator) error { + if err := p.createStreams(conn); err != nil { + return err + } + + // now that all the streams have been created, proceed with reading & copying + + errorChan := watchErrorStream(p.errorStream, &errorDecoderV4{}) + + p.handleResizes() + + p.copyStdin() + + var wg sync.WaitGroup + p.copyStdout(&wg) + p.copyStderr(&wg) + + // we're waiting for stdout/stderr to finish copying + wg.Wait() + + // waits for errorStream to finish reading with an error or nil + return <-errorChan +} + +// errorDecoderV4 interprets the json-marshaled metav1.Status on the error channel +// and creates an exec.ExitError from it. +type errorDecoderV4 struct{} + +func (d *errorDecoderV4) decode(message []byte) error { + status := metav1.Status{} + err := json.Unmarshal(message, &status) + if err != nil { + return fmt.Errorf("error stream protocol error: %v in %q", err, string(message)) + } + switch status.Status { + case metav1.StatusSuccess: + return nil + case metav1.StatusFailure: + if status.Reason == remotecommand.NonZeroExitCodeReason { + if status.Details == nil { + return errors.New("error stream protocol error: details must be set") + } + for i := range status.Details.Causes { + c := &status.Details.Causes[i] + if c.Type != remotecommand.ExitCodeCauseType { + continue + } + + rc, err := strconv.ParseUint(c.Message, 10, 8) + if err != nil { + return fmt.Errorf("error stream protocol error: invalid exit code value %q", c.Message) + } + return exec.CodeExitError{ + Err: fmt.Errorf("command terminated with exit code %d", rc), + Code: int(rc), + } + } + + return fmt.Errorf("error stream protocol error: no %s cause given", remotecommand.ExitCodeCauseType) + } + default: + return errors.New("error stream protocol error: unknown error") + } + + return fmt.Errorf(status.Message) +} diff --git a/vendor/k8s.io/client-go/tools/remotecommand/v4_test.go b/vendor/k8s.io/client-go/tools/remotecommand/v4_test.go new file mode 100644 index 000000000..b8674918f --- /dev/null +++ b/vendor/k8s.io/client-go/tools/remotecommand/v4_test.go @@ -0,0 +1,71 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package remotecommand + +import ( + "fmt" + "testing" +) + +func TestV4ErrorDecoder(t *testing.T) { + dec := errorDecoderV4{} + + type Test struct { + message string + err string + } + + for _, test := range []Test{ + { + message: "{}", + err: "error stream protocol error: unknown error", + }, + { + message: "{", + err: "error stream protocol error: unexpected end of JSON input in \"{\"", + }, + { + message: `{"status": "Success" }`, + err: "", + }, + { + message: `{"status": "Failure", "message": "foobar" }`, + err: "foobar", + }, + { + message: `{"status": "Failure", "message": "foobar", "reason": "NonZeroExitCode", "details": {"causes": [{"reason": "foo"}] } }`, + err: "error stream protocol error: no ExitCode cause given", + }, + { + message: `{"status": "Failure", "message": "foobar", "reason": "NonZeroExitCode", "details": {"causes": [{"reason": "ExitCode"}] } }`, + err: "error stream protocol error: invalid exit code value \"\"", + }, + { + message: `{"status": "Failure", "message": "foobar", "reason": "NonZeroExitCode", "details": {"causes": [{"reason": "ExitCode", "message": "42"}] } }`, + err: "command terminated with exit code 42", + }, + } { + err := dec.decode([]byte(test.message)) + want := test.err + if want == "" { + want = "<nil>" + } + if got := fmt.Sprintf("%v", err); got != want { + t.Errorf("wrong error for message %q: want=%q, got=%q", test.message, want, got) + } + } +} diff --git a/vendor/k8s.io/client-go/transport/cache_test.go b/vendor/k8s.io/client-go/transport/cache_test.go new file mode 100644 index 000000000..eb9624d7e --- /dev/null +++ b/vendor/k8s.io/client-go/transport/cache_test.go @@ -0,0 +1,114 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package transport + +import ( + "net/http" + "testing" +) + +func TestTLSConfigKey(t *testing.T) { + // Make sure config fields that don't affect the tls config don't affect the cache key + identicalConfigurations := map[string]*Config{ + "empty": {}, + "basic": {Username: "bob", Password: "password"}, + "bearer": {BearerToken: "token"}, + "user agent": {UserAgent: "useragent"}, + "transport": {Transport: http.DefaultTransport}, + "wrap transport": {WrapTransport: func(http.RoundTripper) http.RoundTripper { return nil }}, + } + for nameA, valueA := range identicalConfigurations { + for nameB, valueB := range identicalConfigurations { + keyA, err := tlsConfigKey(valueA) + if err != nil { + t.Errorf("Unexpected error for %q: %v", nameA, err) + continue + } + keyB, err := tlsConfigKey(valueB) + if err != nil { + t.Errorf("Unexpected error for %q: %v", nameB, err) + continue + } + if keyA != keyB { + t.Errorf("Expected identical cache keys for %q and %q, got:\n\t%s\n\t%s", nameA, nameB, keyA, keyB) + continue + } + } + } + + // Make sure config fields that affect the tls config affect the cache key + uniqueConfigurations := map[string]*Config{ + "no tls": {}, + "insecure": {TLS: TLSConfig{Insecure: true}}, + "cadata 1": {TLS: TLSConfig{CAData: []byte{1}}}, + "cadata 2": {TLS: TLSConfig{CAData: []byte{2}}}, + "cert 1, key 1": { + TLS: TLSConfig{ + CertData: []byte{1}, + KeyData: []byte{1}, + }, + }, + "cert 1, key 2": { + TLS: TLSConfig{ + CertData: []byte{1}, + KeyData: []byte{2}, + }, + }, + "cert 2, key 1": { + TLS: TLSConfig{ + CertData: []byte{2}, + KeyData: []byte{1}, + }, + }, + "cert 2, key 2": { + TLS: TLSConfig{ + CertData: []byte{2}, + KeyData: []byte{2}, + }, + }, + "cadata 1, cert 1, key 1": { + TLS: TLSConfig{ + CAData: []byte{1}, + CertData: []byte{1}, + KeyData: []byte{1}, + }, + }, + } + for nameA, valueA := range uniqueConfigurations { + for nameB, valueB := range uniqueConfigurations { + // Don't compare to ourselves + if nameA == nameB { + continue + } + + keyA, err := tlsConfigKey(valueA) + if err != nil { + t.Errorf("Unexpected error for %q: %v", nameA, err) + continue + } + keyB, err := tlsConfigKey(valueB) + if err != nil { + t.Errorf("Unexpected error for %q: %v", nameB, err) + continue + } + if keyA == keyB { + t.Errorf("Expected unique cache keys for %q and %q, got:\n\t%s\n\t%s", nameA, nameB, keyA, keyB) + continue + } + } + } +} diff --git a/vendor/k8s.io/client-go/transport/round_trippers_test.go b/vendor/k8s.io/client-go/transport/round_trippers_test.go new file mode 100644 index 000000000..c1e30c3f2 --- /dev/null +++ b/vendor/k8s.io/client-go/transport/round_trippers_test.go @@ -0,0 +1,279 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package transport + +import ( + "bytes" + "io/ioutil" + "net/http" + "net/url" + "os" + "reflect" + "strings" + "testing" +) + +type testRoundTripper struct { + Request *http.Request + Response *http.Response + Err error +} + +func (rt *testRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { + rt.Request = req + return rt.Response, rt.Err +} + +func TestBearerAuthRoundTripper(t *testing.T) { + rt := &testRoundTripper{} + req := &http.Request{} + NewBearerAuthRoundTripper("test", rt).RoundTrip(req) + if rt.Request == nil { + t.Fatalf("unexpected nil request: %v", rt) + } + if rt.Request == req { + t.Fatalf("round tripper should have copied request object: %#v", rt.Request) + } + if rt.Request.Header.Get("Authorization") != "Bearer test" { + t.Errorf("unexpected authorization header: %#v", rt.Request) + } +} + +func TestBasicAuthRoundTripper(t *testing.T) { + for n, tc := range map[string]struct { + user string + pass string + }{ + "basic": {user: "user", pass: "pass"}, + "no pass": {user: "user"}, + } { + rt := &testRoundTripper{} + req := &http.Request{} + NewBasicAuthRoundTripper(tc.user, tc.pass, rt).RoundTrip(req) + if rt.Request == nil { + t.Fatalf("%s: unexpected nil request: %v", n, rt) + } + if rt.Request == req { + t.Fatalf("%s: round tripper should have copied request object: %#v", n, rt.Request) + } + if user, pass, found := rt.Request.BasicAuth(); !found || user != tc.user || pass != tc.pass { + t.Errorf("%s: unexpected authorization header: %#v", n, rt.Request) + } + } +} + +func TestUserAgentRoundTripper(t *testing.T) { + rt := &testRoundTripper{} + req := &http.Request{ + Header: make(http.Header), + } + req.Header.Set("User-Agent", "other") + NewUserAgentRoundTripper("test", rt).RoundTrip(req) + if rt.Request == nil { + t.Fatalf("unexpected nil request: %v", rt) + } + if rt.Request != req { + t.Fatalf("round tripper should not have copied request object: %#v", rt.Request) + } + if rt.Request.Header.Get("User-Agent") != "other" { + t.Errorf("unexpected user agent header: %#v", rt.Request) + } + + req = &http.Request{} + NewUserAgentRoundTripper("test", rt).RoundTrip(req) + if rt.Request == nil { + t.Fatalf("unexpected nil request: %v", rt) + } + if rt.Request == req { + t.Fatalf("round tripper should have copied request object: %#v", rt.Request) + } + if rt.Request.Header.Get("User-Agent") != "test" { + t.Errorf("unexpected user agent header: %#v", rt.Request) + } +} + +func TestImpersonationRoundTripper(t *testing.T) { + tcs := []struct { + name string + impersonationConfig ImpersonationConfig + expected map[string][]string + }{ + { + name: "all", + impersonationConfig: ImpersonationConfig{ + UserName: "user", + Groups: []string{"one", "two"}, + Extra: map[string][]string{ + "first": {"A", "a"}, + "second": {"B", "b"}, + }, + }, + expected: map[string][]string{ + ImpersonateUserHeader: {"user"}, + ImpersonateGroupHeader: {"one", "two"}, + ImpersonateUserExtraHeaderPrefix + "First": {"A", "a"}, + ImpersonateUserExtraHeaderPrefix + "Second": {"B", "b"}, + }, + }, + } + + for _, tc := range tcs { + rt := &testRoundTripper{} + req := &http.Request{ + Header: make(http.Header), + } + NewImpersonatingRoundTripper(tc.impersonationConfig, rt).RoundTrip(req) + + for k, v := range rt.Request.Header { + expected, ok := tc.expected[k] + if !ok { + t.Errorf("%v missing %v=%v", tc.name, k, v) + continue + } + if !reflect.DeepEqual(expected, v) { + t.Errorf("%v expected %v: %v, got %v", tc.name, k, expected, v) + } + } + for k, v := range tc.expected { + expected, ok := rt.Request.Header[k] + if !ok { + t.Errorf("%v missing %v=%v", tc.name, k, v) + continue + } + if !reflect.DeepEqual(expected, v) { + t.Errorf("%v expected %v: %v, got %v", tc.name, k, expected, v) + } + } + } +} + +func TestAuthProxyRoundTripper(t *testing.T) { + for n, tc := range map[string]struct { + username string + groups []string + extra map[string][]string + }{ + "allfields": { + username: "user", + groups: []string{"groupA", "groupB"}, + extra: map[string][]string{ + "one": {"alpha", "bravo"}, + "two": {"charlie", "delta"}, + }, + }, + } { + rt := &testRoundTripper{} + req := &http.Request{} + NewAuthProxyRoundTripper(tc.username, tc.groups, tc.extra, rt).RoundTrip(req) + if rt.Request == nil { + t.Errorf("%s: unexpected nil request: %v", n, rt) + continue + } + if rt.Request == req { + t.Errorf("%s: round tripper should have copied request object: %#v", n, rt.Request) + continue + } + + actualUsernames, ok := rt.Request.Header["X-Remote-User"] + if !ok { + t.Errorf("%s missing value", n) + continue + } + if e, a := []string{tc.username}, actualUsernames; !reflect.DeepEqual(e, a) { + t.Errorf("%s expected %v, got %v", n, e, a) + continue + } + actualGroups, ok := rt.Request.Header["X-Remote-Group"] + if !ok { + t.Errorf("%s missing value", n) + continue + } + if e, a := tc.groups, actualGroups; !reflect.DeepEqual(e, a) { + t.Errorf("%s expected %v, got %v", n, e, a) + continue + } + + actualExtra := map[string][]string{} + for key, values := range rt.Request.Header { + if strings.HasPrefix(strings.ToLower(key), strings.ToLower("X-Remote-Extra-")) { + extraKey := strings.ToLower(key[len("X-Remote-Extra-"):]) + actualExtra[extraKey] = append(actualExtra[key], values...) + } + } + if e, a := tc.extra, actualExtra; !reflect.DeepEqual(e, a) { + t.Errorf("%s expected %v, got %v", n, e, a) + continue + } + } +} + +func TestCacheRoundTripper(t *testing.T) { + rt := &testRoundTripper{} + cacheDir, err := ioutil.TempDir("", "cache-rt") + defer os.RemoveAll(cacheDir) + if err != nil { + t.Fatal(err) + } + cache := NewCacheRoundTripper(cacheDir, rt) + + // First call, caches the response + req := &http.Request{ + Method: http.MethodGet, + URL: &url.URL{Host: "localhost"}, + } + rt.Response = &http.Response{ + Header: http.Header{"ETag": []string{`"123456"`}}, + Body: ioutil.NopCloser(bytes.NewReader([]byte("Content"))), + StatusCode: http.StatusOK, + } + resp, err := cache.RoundTrip(req) + if err != nil { + t.Fatal(err) + } + content, err := ioutil.ReadAll(resp.Body) + if err != nil { + t.Fatal(err) + } + if string(content) != "Content" { + t.Errorf(`Expected Body to be "Content", got %q`, string(content)) + } + + // Second call, returns cached response + req = &http.Request{ + Method: http.MethodGet, + URL: &url.URL{Host: "localhost"}, + } + rt.Response = &http.Response{ + StatusCode: http.StatusNotModified, + Body: ioutil.NopCloser(bytes.NewReader([]byte("Other Content"))), + } + + resp, err = cache.RoundTrip(req) + if err != nil { + t.Fatal(err) + } + + // Read body and make sure we have the initial content + content, err = ioutil.ReadAll(resp.Body) + resp.Body.Close() + if err != nil { + t.Fatal(err) + } + if string(content) != "Content" { + t.Errorf("Invalid content read from cache %q", string(content)) + } +} diff --git a/vendor/k8s.io/client-go/informers/internalinterfaces/BUILD b/vendor/k8s.io/client-go/transport/spdy/BUILD similarity index 62% rename from vendor/k8s.io/client-go/informers/internalinterfaces/BUILD rename to vendor/k8s.io/client-go/transport/spdy/BUILD index 1f3323abc..7e5145c99 100644 --- a/vendor/k8s.io/client-go/informers/internalinterfaces/BUILD +++ b/vendor/k8s.io/client-go/transport/spdy/BUILD @@ -7,11 +7,11 @@ load( go_library( name = "go_default_library", - srcs = ["factory_interfaces.go"], + srcs = ["spdy.go"], deps = [ - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/httpstream:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", ], ) diff --git a/vendor/k8s.io/client-go/transport/spdy/spdy.go b/vendor/k8s.io/client-go/transport/spdy/spdy.go new file mode 100644 index 000000000..e0eb468ba --- /dev/null +++ b/vendor/k8s.io/client-go/transport/spdy/spdy.go @@ -0,0 +1,94 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package spdy + +import ( + "fmt" + "net/http" + "net/url" + + "k8s.io/apimachinery/pkg/util/httpstream" + "k8s.io/apimachinery/pkg/util/httpstream/spdy" + restclient "k8s.io/client-go/rest" +) + +// Upgrader validates a response from the server after a SPDY upgrade. +type Upgrader interface { + // NewConnection validates the response and creates a new Connection. + NewConnection(resp *http.Response) (httpstream.Connection, error) +} + +// RoundTripperFor returns a round tripper and upgrader to use with SPDY. +func RoundTripperFor(config *restclient.Config) (http.RoundTripper, Upgrader, error) { + tlsConfig, err := restclient.TLSConfigFor(config) + if err != nil { + return nil, nil, err + } + upgradeRoundTripper := spdy.NewRoundTripper(tlsConfig, true) + wrapper, err := restclient.HTTPWrappersForConfig(config, upgradeRoundTripper) + if err != nil { + return nil, nil, err + } + return wrapper, upgradeRoundTripper, nil +} + +// dialer implements the httpstream.Dialer interface. +type dialer struct { + client *http.Client + upgrader Upgrader + method string + url *url.URL +} + +var _ httpstream.Dialer = &dialer{} + +// NewDialer will create a dialer that connects to the provided URL and upgrades the connection to SPDY. +func NewDialer(upgrader Upgrader, client *http.Client, method string, url *url.URL) httpstream.Dialer { + return &dialer{ + client: client, + upgrader: upgrader, + method: method, + url: url, + } +} + +func (d *dialer) Dial(protocols ...string) (httpstream.Connection, string, error) { + req, err := http.NewRequest(d.method, d.url.String(), nil) + if err != nil { + return nil, "", fmt.Errorf("error creating request: %v", err) + } + return Negotiate(d.upgrader, d.client, req, protocols...) +} + +// Negotiate opens a connection to a remote server and attempts to negotiate +// a SPDY connection. Upon success, it returns the connection and the protocol selected by +// the server. The client transport must use the upgradeRoundTripper - see RoundTripperFor. +func Negotiate(upgrader Upgrader, client *http.Client, req *http.Request, protocols ...string) (httpstream.Connection, string, error) { + for i := range protocols { + req.Header.Add(httpstream.HeaderProtocolVersion, protocols[i]) + } + resp, err := client.Do(req) + if err != nil { + return nil, "", fmt.Errorf("error sending request: %v", err) + } + defer resp.Body.Close() + conn, err := upgrader.NewConnection(resp) + if err != nil { + return nil, "", err + } + return conn, resp.Header.Get(httpstream.HeaderProtocolVersion), nil +} diff --git a/vendor/k8s.io/client-go/transport/transport_test.go b/vendor/k8s.io/client-go/transport/transport_test.go new file mode 100644 index 000000000..4d2d78f86 --- /dev/null +++ b/vendor/k8s.io/client-go/transport/transport_test.go @@ -0,0 +1,204 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package transport + +import ( + "net/http" + "testing" +) + +const ( + rootCACert = `-----BEGIN CERTIFICATE----- +MIIC4DCCAcqgAwIBAgIBATALBgkqhkiG9w0BAQswIzEhMB8GA1UEAwwYMTAuMTMu +MTI5LjEwNkAxNDIxMzU5MDU4MB4XDTE1MDExNTIxNTczN1oXDTE2MDExNTIxNTcz +OFowIzEhMB8GA1UEAwwYMTAuMTMuMTI5LjEwNkAxNDIxMzU5MDU4MIIBIjANBgkq +hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAunDRXGwsiYWGFDlWH6kjGun+PshDGeZX +xtx9lUnL8pIRWH3wX6f13PO9sktaOWW0T0mlo6k2bMlSLlSZgG9H6og0W6gLS3vq +s4VavZ6DbXIwemZG2vbRwsvR+t4G6Nbwelm6F8RFnA1Fwt428pavmNQ/wgYzo+T1 +1eS+HiN4ACnSoDSx3QRWcgBkB1g6VReofVjx63i0J+w8Q/41L9GUuLqquFxu6ZnH +60vTB55lHgFiDLjA1FkEz2dGvGh/wtnFlRvjaPC54JH2K1mPYAUXTreoeJtLJKX0 +ycoiyB24+zGCniUmgIsmQWRPaOPircexCp1BOeze82BT1LCZNTVaxQIDAQABoyMw +ITAOBgNVHQ8BAf8EBAMCAKQwDwYDVR0TAQH/BAUwAwEB/zALBgkqhkiG9w0BAQsD +ggEBADMxsUuAFlsYDpF4fRCzXXwrhbtj4oQwcHpbu+rnOPHCZupiafzZpDu+rw4x +YGPnCb594bRTQn4pAu3Ac18NbLD5pV3uioAkv8oPkgr8aUhXqiv7KdDiaWm6sbAL +EHiXVBBAFvQws10HMqMoKtO8f1XDNAUkWduakR/U6yMgvOPwS7xl0eUTqyRB6zGb +K55q2dejiFWaFqB/y78txzvz6UlOZKE44g2JAVoJVM6kGaxh33q8/FmrL4kuN3ut +W+MmJCVDvd4eEqPwbp7146ZWTqpIJ8lvA6wuChtqV8lhAPka2hD/LMqY8iXNmfXD +uml0obOEy+ON91k+SWTJ3ggmF/U= +-----END CERTIFICATE-----` + + certData = `-----BEGIN CERTIFICATE----- +MIIC6jCCAdSgAwIBAgIBCzALBgkqhkiG9w0BAQswIzEhMB8GA1UEAwwYMTAuMTMu +MTI5LjEwNkAxNDIxMzU5MDU4MB4XDTE1MDExNTIyMDEzMVoXDTE2MDExNTIyMDEz +MlowGzEZMBcGA1UEAxMQb3BlbnNoaWZ0LWNsaWVudDCCASIwDQYJKoZIhvcNAQEB +BQADggEPADCCAQoCggEBAKtdhz0+uCLXw5cSYns9rU/XifFSpb/x24WDdrm72S/v +b9BPYsAStiP148buylr1SOuNi8sTAZmlVDDIpIVwMLff+o2rKYDicn9fjbrTxTOj +lI4pHJBH+JU3AJ0tbajupioh70jwFS0oYpwtneg2zcnE2Z4l6mhrj2okrc5Q1/X2 +I2HChtIU4JYTisObtin10QKJX01CLfYXJLa8upWzKZ4/GOcHG+eAV3jXWoXidtjb +1Usw70amoTZ6mIVCkiu1QwCoa8+ycojGfZhvqMsAp1536ZcCul+Na+AbCv4zKS7F +kQQaImVrXdUiFansIoofGlw/JNuoKK6ssVpS5Ic3pgcCAwEAAaM1MDMwDgYDVR0P +AQH/BAQDAgCgMBMGA1UdJQQMMAoGCCsGAQUFBwMCMAwGA1UdEwEB/wQCMAAwCwYJ +KoZIhvcNAQELA4IBAQCKLREH7bXtXtZ+8vI6cjD7W3QikiArGqbl36bAhhWsJLp/ +p/ndKz39iFNaiZ3GlwIURWOOKx3y3GA0x9m8FR+Llthf0EQ8sUjnwaknWs0Y6DQ3 +jjPFZOpV3KPCFrdMJ3++E3MgwFC/Ih/N2ebFX9EcV9Vcc6oVWMdwT0fsrhu683rq +6GSR/3iVX1G/pmOiuaR0fNUaCyCfYrnI4zHBDgSfnlm3vIvN2lrsR/DQBakNL8DJ +HBgKxMGeUPoneBv+c8DMXIL0EhaFXRlBv9QW45/GiAIOuyFJ0i6hCtGZpJjq4OpQ +BRjCI+izPzFTjsxD4aORE+WOkyWFCGPWKfNejfw0 +-----END CERTIFICATE-----` + + keyData = `-----BEGIN RSA PRIVATE KEY----- +MIIEowIBAAKCAQEAq12HPT64ItfDlxJiez2tT9eJ8VKlv/HbhYN2ubvZL+9v0E9i +wBK2I/Xjxu7KWvVI642LyxMBmaVUMMikhXAwt9/6jaspgOJyf1+NutPFM6OUjikc +kEf4lTcAnS1tqO6mKiHvSPAVLShinC2d6DbNycTZniXqaGuPaiStzlDX9fYjYcKG +0hTglhOKw5u2KfXRAolfTUIt9hcktry6lbMpnj8Y5wcb54BXeNdaheJ22NvVSzDv +RqahNnqYhUKSK7VDAKhrz7JyiMZ9mG+oywCnXnfplwK6X41r4BsK/jMpLsWRBBoi +ZWtd1SIVqewiih8aXD8k26gorqyxWlLkhzemBwIDAQABAoIBAD2XYRs3JrGHQUpU +FkdbVKZkvrSY0vAZOqBTLuH0zUv4UATb8487anGkWBjRDLQCgxH+jucPTrztekQK +aW94clo0S3aNtV4YhbSYIHWs1a0It0UdK6ID7CmdWkAj6s0T8W8lQT7C46mWYVLm +5mFnCTHi6aB42jZrqmEpC7sivWwuU0xqj3Ml8kkxQCGmyc9JjmCB4OrFFC8NNt6M +ObvQkUI6Z3nO4phTbpxkE1/9dT0MmPIF7GhHVzJMS+EyyRYUDllZ0wvVSOM3qZT0 +JMUaBerkNwm9foKJ1+dv2nMKZZbJajv7suUDCfU44mVeaEO+4kmTKSGCGjjTBGkr +7L1ySDECgYEA5ElIMhpdBzIivCuBIH8LlUeuzd93pqssO1G2Xg0jHtfM4tz7fyeI +cr90dc8gpli24dkSxzLeg3Tn3wIj/Bu64m2TpZPZEIlukYvgdgArmRIPQVxerYey +OkrfTNkxU1HXsYjLCdGcGXs5lmb+K/kuTcFxaMOs7jZi7La+jEONwf8CgYEAwCs/ +rUOOA0klDsWWisbivOiNPII79c9McZCNBqncCBfMUoiGe8uWDEO4TFHN60vFuVk9 +8PkwpCfvaBUX+ajvbafIfHxsnfk1M04WLGCeqQ/ym5Q4sQoQOcC1b1y9qc/xEWfg +nIUuia0ukYRpl7qQa3tNg+BNFyjypW8zukUAC/kCgYB1/Kojuxx5q5/oQVPrx73k +2bevD+B3c+DYh9MJqSCNwFtUpYIWpggPxoQan4LwdsmO0PKzocb/ilyNFj4i/vII +NToqSc/WjDFpaDIKyuu9oWfhECye45NqLWhb/6VOuu4QA/Nsj7luMhIBehnEAHW+ +GkzTKM8oD1PxpEG3nPKXYQKBgQC6AuMPRt3XBl1NkCrpSBy/uObFlFaP2Enpf39S +3OZ0Gv0XQrnSaL1kP8TMcz68rMrGX8DaWYsgytstR4W+jyy7WvZwsUu+GjTJ5aMG +77uEcEBpIi9CBzivfn7hPccE8ZgqPf+n4i6q66yxBJflW5xhvafJqDtW2LcPNbW/ +bvzdmQKBgExALRUXpq+5dbmkdXBHtvXdRDZ6rVmrnjy4nI5bPw+1GqQqk6uAR6B/ +F6NmLCQOO4PDG/cuatNHIr2FrwTmGdEL6ObLUGWn9Oer9gJhHVqqsY5I4sEPo4XX +stR0Yiw0buV6DL/moUO0HIM9Bjh96HJp+LxiIS6UCdIhMPp5HoQa +-----END RSA PRIVATE KEY-----` +) + +func TestNew(t *testing.T) { + testCases := map[string]struct { + Config *Config + Err bool + TLS bool + Default bool + }{ + "default transport": { + Default: true, + Config: &Config{}, + }, + + "ca transport": { + TLS: true, + Config: &Config{ + TLS: TLSConfig{ + CAData: []byte(rootCACert), + }, + }, + }, + "bad ca file transport": { + Err: true, + Config: &Config{ + TLS: TLSConfig{ + CAFile: "invalid file", + }, + }, + }, + "ca data overriding bad ca file transport": { + TLS: true, + Config: &Config{ + TLS: TLSConfig{ + CAData: []byte(rootCACert), + CAFile: "invalid file", + }, + }, + }, + + "cert transport": { + TLS: true, + Config: &Config{ + TLS: TLSConfig{ + CAData: []byte(rootCACert), + CertData: []byte(certData), + KeyData: []byte(keyData), + }, + }, + }, + "bad cert data transport": { + Err: true, + Config: &Config{ + TLS: TLSConfig{ + CAData: []byte(rootCACert), + CertData: []byte(certData), + KeyData: []byte("bad key data"), + }, + }, + }, + "bad file cert transport": { + Err: true, + Config: &Config{ + TLS: TLSConfig{ + CAData: []byte(rootCACert), + CertData: []byte(certData), + KeyFile: "invalid file", + }, + }, + }, + "key data overriding bad file cert transport": { + TLS: true, + Config: &Config{ + TLS: TLSConfig{ + CAData: []byte(rootCACert), + CertData: []byte(certData), + KeyData: []byte(keyData), + KeyFile: "invalid file", + }, + }, + }, + } + for k, testCase := range testCases { + transport, err := New(testCase.Config) + switch { + case testCase.Err && err == nil: + t.Errorf("%s: unexpected non-error", k) + continue + case !testCase.Err && err != nil: + t.Errorf("%s: unexpected error: %v", k, err) + continue + } + + switch { + case testCase.Default && transport != http.DefaultTransport: + t.Errorf("%s: expected the default transport, got %#v", k, transport) + continue + case !testCase.Default && transport == http.DefaultTransport: + t.Errorf("%s: expected non-default transport, got %#v", k, transport) + continue + } + + // We only know how to check TLSConfig on http.Transports + if transport, ok := transport.(*http.Transport); ok { + switch { + case testCase.TLS && transport.TLSClientConfig == nil: + t.Errorf("%s: expected TLSClientConfig, got %#v", k, transport) + continue + case !testCase.TLS && transport.TLSClientConfig != nil: + t.Errorf("%s: expected no TLSClientConfig, got %#v", k, transport) + continue + } + } + } +} diff --git a/vendor/k8s.io/client-go/util/cert/csr_test.go b/vendor/k8s.io/client-go/util/cert/csr_test.go new file mode 100644 index 000000000..ed28f021e --- /dev/null +++ b/vendor/k8s.io/client-go/util/cert/csr_test.go @@ -0,0 +1,75 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cert + +import ( + "crypto/x509" + "crypto/x509/pkix" + "encoding/pem" + "io/ioutil" + "net" + "testing" +) + +func TestMakeCSR(t *testing.T) { + keyFile := "testdata/dontUseThisKey.pem" + subject := &pkix.Name{ + CommonName: "kube-worker", + } + dnsSANs := []string{"localhost"} + ipSANs := []net.IP{net.ParseIP("127.0.0.1")} + + keyData, err := ioutil.ReadFile(keyFile) + if err != nil { + t.Fatal(err) + } + key, err := ParsePrivateKeyPEM(keyData) + if err != nil { + t.Fatal(err) + } + csrPEM, err := MakeCSR(key, subject, dnsSANs, ipSANs) + if err != nil { + t.Error(err) + } + csrBlock, rest := pem.Decode(csrPEM) + if csrBlock == nil { + t.Error("Unable to decode MakeCSR result.") + } + if len(rest) != 0 { + t.Error("Found more than one PEM encoded block in the result.") + } + if csrBlock.Type != CertificateRequestBlockType { + t.Errorf("Found block type %q, wanted 'CERTIFICATE REQUEST'", csrBlock.Type) + } + csr, err := x509.ParseCertificateRequest(csrBlock.Bytes) + if err != nil { + t.Errorf("Found %v parsing MakeCSR result as a CertificateRequest.", err) + } + if csr.Subject.CommonName != subject.CommonName { + t.Errorf("Wanted %v, got %v", subject, csr.Subject) + } + if len(csr.DNSNames) != 1 { + t.Errorf("Wanted 1 DNS name in the result, got %d", len(csr.DNSNames)) + } else if csr.DNSNames[0] != dnsSANs[0] { + t.Errorf("Wanted %v, got %v", dnsSANs[0], csr.DNSNames[0]) + } + if len(csr.IPAddresses) != 1 { + t.Errorf("Wanted 1 IP address in the result, got %d", len(csr.IPAddresses)) + } else if csr.IPAddresses[0].String() != ipSANs[0].String() { + t.Errorf("Wanted %v, got %v", ipSANs[0], csr.IPAddresses[0]) + } +} diff --git a/vendor/k8s.io/client-go/util/cert/pem_test.go b/vendor/k8s.io/client-go/util/cert/pem_test.go new file mode 100644 index 000000000..de3ce5253 --- /dev/null +++ b/vendor/k8s.io/client-go/util/cert/pem_test.go @@ -0,0 +1,197 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cert + +import ( + "io/ioutil" + "os" + "testing" +) + +const ( + // rsaPrivateKey is a RSA Private Key in PKCS#1 format + // openssl genrsa -out rsa2048.pem 2048 + rsaPrivateKey = `-----BEGIN RSA PRIVATE KEY----- +MIIEpAIBAAKCAQEA92mVjhBKOFsdxFzb/Pjq+7b5TJlODAdY5hK+WxLZTIrfhDPq +FWrGKdjSNiHbXrdEtwJh9V+RqPZVSN3aWy1224RgkyNdMJsXhJKuCC24ZKY8SXtW +xuTYmMRaMnCsv6QBGRTIbZ2EFbAObVM7lDyv1VqY3amZIWFQMlZ9CNpxDSPa5yi4 +3gopbXkne0oGNmey9X0qtpk7NMZIgAL6Zz4rZ30bcfC2ag6RLOFI2E/c4n8c38R8 +9MfXfLkj8/Cxo4JfI9NvRCpPOpFO8d/ZtWVUuIrBQN+Y7tkN2T60Qq/TkKXUrhDe +fwlTlktZVJ/GztLYU41b2GcWsh/XO+PH831rmwIDAQABAoIBAQCC9c6GDjVbM0/E +WurPMusfJjE7zII1d8YkspM0HfwLug6qKdikUYpnKC/NG4rEzfl/bbFwco/lgc6O +7W/hh2U8uQttlvCDA/Uk5YddKOZL0Hpk4vaB/SxxYK3luSKXpjY2knutGg2KdVCN +qdsFkkH4iyYTXuyBcMNEgedZQldI/kEujIH/L7FE+DF5TMzT4lHhozDoG+fy564q +qVGUZXJn0ubc3GaPn2QOLNNM44sfYA4UJCpKBXPu85bvNObjxVQO4WqwwxU1vRnL +UUsaGaelhSVJCo0dVPRvrfPPKZ09HTwpy40EkgQo6VriFc1EBoQDjENLbAJv9OfQ +aCc9wiZhAoGBAP/8oEy48Zbb0P8Vdy4djf5tfBW8yXFLWzXewJ4l3itKS1r42nbX +9q3cJsgRTQm8uRcMIpWxsc3n6zG+lREvTkoTB3ViI7+uQPiqA+BtWyNy7jzufFke +ONKZfg7QxxmYRWZBRnoNGNbMpNeERuLmhvQuom9D1WbhzAYJbfs/O4WTAoGBAPds +2FNDU0gaesFDdkIUGq1nIJqRQDW485LXZm4pFqBFxdOpbdWRuYT2XZjd3fD0XY98 +Nhkpb7NTMCuK3BdKcqIptt+cK+quQgYid0hhhgZbpCQ5AL6c6KgyjgpYlh2enzU9 +Zo3yg8ej1zbbA11sBlhX+5iO2P1u5DG+JHLwUUbZAoGAUwaU102EzfEtsA4+QW7E +hyjrfgFlNKHES4yb3K9bh57pIfBkqvcQwwMMcQdrfSUAw0DkVrjzel0mI1Q09QXq +1ould6UFAz55RC2gZEITtUOpkYmoOx9aPrQZ9qQwb1S77ZZuTVfCHqjxLhVxCFbM +npYhiQTvShciHTMhwMOZgpECgYAVV5EtVXBYltgh1YTc3EkUzgF087R7LdHsx6Gx +POATwRD4WfP8aQ58lpeqOPEM+LcdSlSMRRO6fyF3kAm+BJDwxfJdRWZQXumZB94M +I0VhRQRaj4Qt7PDwmTPBVrTUJzuKZxpyggm17b8Bn1Ch/VBqzGQKW8AB1E/grosM +UwhfuQKBgQC2JO/iqTQScHClf0qlItCJsBuVukFmSAVCkpOD8YdbdlPdOOwSk1wQ +C0eAlsC3BCMvkpidKQmra6IqIrvTGI6EFgkrb3aknWdup2w8j2udYCNqyE3W+fVe +p8FdYQ1FkACQ+daO5VlClL/9l0sGjKXlNKbpmJ2H4ngZmXj5uGmxuQ== +-----END RSA PRIVATE KEY-----` + + // rsaPublicKey is a RSA Public Key in PEM encoded format + // openssl rsa -in rsa2048.pem -pubout -out rsa2048pub.pem + rsaPublicKey = `-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA92mVjhBKOFsdxFzb/Pjq ++7b5TJlODAdY5hK+WxLZTIrfhDPqFWrGKdjSNiHbXrdEtwJh9V+RqPZVSN3aWy12 +24RgkyNdMJsXhJKuCC24ZKY8SXtWxuTYmMRaMnCsv6QBGRTIbZ2EFbAObVM7lDyv +1VqY3amZIWFQMlZ9CNpxDSPa5yi43gopbXkne0oGNmey9X0qtpk7NMZIgAL6Zz4r +Z30bcfC2ag6RLOFI2E/c4n8c38R89MfXfLkj8/Cxo4JfI9NvRCpPOpFO8d/ZtWVU +uIrBQN+Y7tkN2T60Qq/TkKXUrhDefwlTlktZVJ/GztLYU41b2GcWsh/XO+PH831r +mwIDAQAB +-----END PUBLIC KEY-----` + + // certificate is an x509 certificate in PEM encoded format + // openssl req -new -key rsa2048.pem -sha256 -nodes -x509 -days 1826 -out x509certificate.pem -subj "/C=US/CN=not-valid" + certificate = `-----BEGIN CERTIFICATE----- +MIIDFTCCAf2gAwIBAgIJAN8B8NOwtiUCMA0GCSqGSIb3DQEBCwUAMCExCzAJBgNV +BAYTAlVTMRIwEAYDVQQDDAlub3QtdmFsaWQwHhcNMTcwMzIyMDI1NjM2WhcNMjIw +MzIyMDI1NjM2WjAhMQswCQYDVQQGEwJVUzESMBAGA1UEAwwJbm90LXZhbGlkMIIB +IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA92mVjhBKOFsdxFzb/Pjq+7b5 +TJlODAdY5hK+WxLZTIrfhDPqFWrGKdjSNiHbXrdEtwJh9V+RqPZVSN3aWy1224Rg +kyNdMJsXhJKuCC24ZKY8SXtWxuTYmMRaMnCsv6QBGRTIbZ2EFbAObVM7lDyv1VqY +3amZIWFQMlZ9CNpxDSPa5yi43gopbXkne0oGNmey9X0qtpk7NMZIgAL6Zz4rZ30b +cfC2ag6RLOFI2E/c4n8c38R89MfXfLkj8/Cxo4JfI9NvRCpPOpFO8d/ZtWVUuIrB +QN+Y7tkN2T60Qq/TkKXUrhDefwlTlktZVJ/GztLYU41b2GcWsh/XO+PH831rmwID +AQABo1AwTjAdBgNVHQ4EFgQU1I5GfinLF7ta+dBJ6UWcrYaexLswHwYDVR0jBBgw +FoAU1I5GfinLF7ta+dBJ6UWcrYaexLswDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0B +AQsFAAOCAQEAUl0wUD4y41juHFOVMYiziPYr1ShSpQXdwp8FfaHrzI5hsr8UMe8D +dzb9QzZ4bx3yZhiG3ahrSBh956thMTHrKTEwAfJIEXI4cuSVWQAaOJ4Em5SDFxQe +d0E6Ui2nGh1SFGF7oyuEXyzqgRMWFNDFw9HLUNgXaO18Zfouw8+K0BgbfEWEcSi1 +JLQbyhCjz088gltrliQGPWDFAg9cHBKtJhuTzZkvuqK1CLEmBhtzP1zFiGBfOJc8 +v+aKjAwrPUNX11cXOCPxBv2qXMetxaovBem6AI2hvypCInXaVQfP+yOLubzlTDjS +Y708SlY38hmS1uTwDpyLOn8AKkZ8jtx75g== +-----END CERTIFICATE-----` + + // ecdsaPrivateKeyWithParams is a ECDSA Private Key with included EC Parameters block + // openssl ecparam -name prime256v1 -genkey -out ecdsa256params.pem + ecdsaPrivateKeyWithParams = `-----BEGIN EC PARAMETERS----- +BggqhkjOPQMBBw== +-----END EC PARAMETERS----- +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIAwSOWQqlMTZNqNF7tgua812Jxib1DVOgb2pHHyIEyNNoAoGCCqGSM49 +AwEHoUQDQgAEyxYNrs6a6tsNCFNYn+l+JDUZ0PnUZbcsDgJn2O62D1se8M5iQ5rY +iIv6RpxE3VHvlHEIvYgCZkG0jHszTUopBg== +-----END EC PRIVATE KEY-----` + + // ecdsaPrivateKey is a ECDSA Private Key in ASN.1 format + // openssl ecparam -name prime256v1 -genkey -noout -out ecdsa256.pem + ecdsaPrivateKey = `-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIP6Qw6dHDiLsSnLXUhQVTPE0fTQQrj3XSbiQAZPXnk5+oAoGCCqGSM49 +AwEHoUQDQgAEZZzi1u5f2/AEGFI/HYUhU+u6cTK1q2bbtE7r1JMK+/sQA5sNAp+7 +Vdc3psr1OaNzyTyuhTECyRdFKXm63cMnGg== +-----END EC PRIVATE KEY-----` + + // ecdsaPublicKey is a ECDSA Public Key in PEM encoded format + // openssl ec -in ecdsa256.pem -pubout -out ecdsa256pub.pem + ecdsaPublicKey = `-----BEGIN PUBLIC KEY----- +MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEZZzi1u5f2/AEGFI/HYUhU+u6cTK1 +q2bbtE7r1JMK+/sQA5sNAp+7Vdc3psr1OaNzyTyuhTECyRdFKXm63cMnGg== +-----END PUBLIC KEY-----` +) + +func TestReadPrivateKey(t *testing.T) { + f, err := ioutil.TempFile("", "") + if err != nil { + t.Fatalf("error creating tmpfile: %v", err) + } + defer os.Remove(f.Name()) + + if _, err := PrivateKeyFromFile(f.Name()); err == nil { + t.Fatalf("Expected error reading key from empty file, got none") + } + + if err := ioutil.WriteFile(f.Name(), []byte(rsaPrivateKey), os.FileMode(0600)); err != nil { + t.Fatalf("error writing private key to tmpfile: %v", err) + } + if _, err := PrivateKeyFromFile(f.Name()); err != nil { + t.Fatalf("error reading private RSA key: %v", err) + } + + if err := ioutil.WriteFile(f.Name(), []byte(ecdsaPrivateKey), os.FileMode(0600)); err != nil { + t.Fatalf("error writing private key to tmpfile: %v", err) + } + if _, err := PrivateKeyFromFile(f.Name()); err != nil { + t.Fatalf("error reading private ECDSA key: %v", err) + } + + if err := ioutil.WriteFile(f.Name(), []byte(ecdsaPrivateKeyWithParams), os.FileMode(0600)); err != nil { + t.Fatalf("error writing private key to tmpfile: %v", err) + } + if _, err := PrivateKeyFromFile(f.Name()); err != nil { + t.Fatalf("error reading private ECDSA key with params: %v", err) + } +} + +func TestReadPublicKeys(t *testing.T) { + f, err := ioutil.TempFile("", "") + if err != nil { + t.Fatalf("error creating tmpfile: %v", err) + } + defer os.Remove(f.Name()) + + if _, err := PublicKeysFromFile(f.Name()); err == nil { + t.Fatalf("Expected error reading keys from empty file, got none") + } + + if err := ioutil.WriteFile(f.Name(), []byte(rsaPublicKey), os.FileMode(0600)); err != nil { + t.Fatalf("error writing public key to tmpfile: %v", err) + } + if keys, err := PublicKeysFromFile(f.Name()); err != nil { + t.Fatalf("error reading RSA public key: %v", err) + } else if len(keys) != 1 { + t.Fatalf("expected 1 key, got %d", len(keys)) + } + + if err := ioutil.WriteFile(f.Name(), []byte(ecdsaPublicKey), os.FileMode(0600)); err != nil { + t.Fatalf("error writing public key to tmpfile: %v", err) + } + if keys, err := PublicKeysFromFile(f.Name()); err != nil { + t.Fatalf("error reading ECDSA public key: %v", err) + } else if len(keys) != 1 { + t.Fatalf("expected 1 key, got %d", len(keys)) + } + + if err := ioutil.WriteFile(f.Name(), []byte(rsaPublicKey+"\n"+ecdsaPublicKey), os.FileMode(0600)); err != nil { + t.Fatalf("error writing public key to tmpfile: %v", err) + } + if keys, err := PublicKeysFromFile(f.Name()); err != nil { + t.Fatalf("error reading combined RSA/ECDSA public key file: %v", err) + } else if len(keys) != 2 { + t.Fatalf("expected 2 keys, got %d", len(keys)) + } + + if err := ioutil.WriteFile(f.Name(), []byte(certificate), os.FileMode(0600)); err != nil { + t.Fatalf("error writing certificate to tmpfile: %v", err) + } + if keys, err := PublicKeysFromFile(f.Name()); err != nil { + t.Fatalf("error reading public key from certificate file: %v", err) + } else if len(keys) != 1 { + t.Fatalf("expected 1 keys, got %d", len(keys)) + } + +} diff --git a/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/identity/BUILD b/vendor/k8s.io/client-go/util/exec/BUILD similarity index 78% rename from vendor/k8s.io/apiserver/pkg/storage/value/encrypt/identity/BUILD rename to vendor/k8s.io/client-go/util/exec/BUILD index 570402289..396658dc5 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/identity/BUILD +++ b/vendor/k8s.io/client-go/util/exec/BUILD @@ -7,8 +7,7 @@ load( go_library( name = "go_default_library", - srcs = ["identity.go"], - deps = ["//vendor/k8s.io/apiserver/pkg/storage/value:go_default_library"], + srcs = ["exec.go"], ) filegroup( diff --git a/vendor/k8s.io/client-go/util/exec/exec.go b/vendor/k8s.io/client-go/util/exec/exec.go new file mode 100644 index 000000000..d170badb6 --- /dev/null +++ b/vendor/k8s.io/client-go/util/exec/exec.go @@ -0,0 +1,52 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package exec + +// ExitError is an interface that presents an API similar to os.ProcessState, which is +// what ExitError from os/exec is. This is designed to make testing a bit easier and +// probably loses some of the cross-platform properties of the underlying library. +type ExitError interface { + String() string + Error() string + Exited() bool + ExitStatus() int +} + +// CodeExitError is an implementation of ExitError consisting of an error object +// and an exit code (the upper bits of os.exec.ExitStatus). +type CodeExitError struct { + Err error + Code int +} + +var _ ExitError = CodeExitError{} + +func (e CodeExitError) Error() string { + return e.Err.Error() +} + +func (e CodeExitError) String() string { + return e.Err.Error() +} + +func (e CodeExitError) Exited() bool { + return true +} + +func (e CodeExitError) ExitStatus() int { + return e.Code +} diff --git a/vendor/k8s.io/client-go/util/flowcontrol/backoff_test.go b/vendor/k8s.io/client-go/util/flowcontrol/backoff_test.go new file mode 100644 index 000000000..23a6cbfa3 --- /dev/null +++ b/vendor/k8s.io/client-go/util/flowcontrol/backoff_test.go @@ -0,0 +1,195 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package flowcontrol + +import ( + "testing" + "time" + + "k8s.io/apimachinery/pkg/util/clock" +) + +func TestSlowBackoff(t *testing.T) { + id := "_idSlow" + tc := clock.NewFakeClock(time.Now()) + step := time.Second + maxDuration := 50 * step + + b := NewFakeBackOff(step, maxDuration, tc) + cases := []time.Duration{0, 1, 2, 4, 8, 16, 32, 50, 50, 50} + for ix, c := range cases { + tc.Step(step) + w := b.Get(id) + if w != c*step { + t.Errorf("input: '%d': expected %s, got %s", ix, c*step, w) + } + b.Next(id, tc.Now()) + } + + //Now confirm that the Reset cancels backoff. + b.Next(id, tc.Now()) + b.Reset(id) + if b.Get(id) != 0 { + t.Errorf("Reset didn't clear the backoff.") + } + +} + +func TestBackoffReset(t *testing.T) { + id := "_idReset" + tc := clock.NewFakeClock(time.Now()) + step := time.Second + maxDuration := step * 5 + b := NewFakeBackOff(step, maxDuration, tc) + startTime := tc.Now() + + // get to backoff = maxDuration + for i := 0; i <= int(maxDuration/step); i++ { + tc.Step(step) + b.Next(id, tc.Now()) + } + + // backoff should be capped at maxDuration + if !b.IsInBackOffSince(id, tc.Now()) { + t.Errorf("expected to be in Backoff got %s", b.Get(id)) + } + + lastUpdate := tc.Now() + tc.Step(2*maxDuration + step) // time += 11s, 11 > 2*maxDuration + if b.IsInBackOffSince(id, lastUpdate) { + t.Errorf("expected to not be in Backoff after reset (start=%s, now=%s, lastUpdate=%s), got %s", startTime, tc.Now(), lastUpdate, b.Get(id)) + } +} + +func TestBackoffHightWaterMark(t *testing.T) { + id := "_idHiWaterMark" + tc := clock.NewFakeClock(time.Now()) + step := time.Second + maxDuration := 5 * step + b := NewFakeBackOff(step, maxDuration, tc) + + // get to backoff = maxDuration + for i := 0; i <= int(maxDuration/step); i++ { + tc.Step(step) + b.Next(id, tc.Now()) + } + + // backoff high watermark expires after 2*maxDuration + tc.Step(maxDuration + step) + b.Next(id, tc.Now()) + + if b.Get(id) != maxDuration { + t.Errorf("expected Backoff to stay at high watermark %s got %s", maxDuration, b.Get(id)) + } +} + +func TestBackoffGC(t *testing.T) { + id := "_idGC" + tc := clock.NewFakeClock(time.Now()) + step := time.Second + maxDuration := 5 * step + + b := NewFakeBackOff(step, maxDuration, tc) + + for i := 0; i <= int(maxDuration/step); i++ { + tc.Step(step) + b.Next(id, tc.Now()) + } + lastUpdate := tc.Now() + tc.Step(maxDuration + step) + b.GC() + _, found := b.perItemBackoff[id] + if !found { + t.Errorf("expected GC to skip entry, elapsed time=%s maxDuration=%s", tc.Now().Sub(lastUpdate), maxDuration) + } + + tc.Step(maxDuration + step) + b.GC() + r, found := b.perItemBackoff[id] + if found { + t.Errorf("expected GC of entry after %s got entry %v", tc.Now().Sub(lastUpdate), r) + } +} + +func TestIsInBackOffSinceUpdate(t *testing.T) { + id := "_idIsInBackOffSinceUpdate" + tc := clock.NewFakeClock(time.Now()) + step := time.Second + maxDuration := 10 * step + b := NewFakeBackOff(step, maxDuration, tc) + startTime := tc.Now() + + cases := []struct { + tick time.Duration + inBackOff bool + value int + }{ + {tick: 0, inBackOff: false, value: 0}, + {tick: 1, inBackOff: false, value: 1}, + {tick: 2, inBackOff: true, value: 2}, + {tick: 3, inBackOff: false, value: 2}, + {tick: 4, inBackOff: true, value: 4}, + {tick: 5, inBackOff: true, value: 4}, + {tick: 6, inBackOff: true, value: 4}, + {tick: 7, inBackOff: false, value: 4}, + {tick: 8, inBackOff: true, value: 8}, + {tick: 9, inBackOff: true, value: 8}, + {tick: 10, inBackOff: true, value: 8}, + {tick: 11, inBackOff: true, value: 8}, + {tick: 12, inBackOff: true, value: 8}, + {tick: 13, inBackOff: true, value: 8}, + {tick: 14, inBackOff: true, value: 8}, + {tick: 15, inBackOff: false, value: 8}, + {tick: 16, inBackOff: true, value: 10}, + {tick: 17, inBackOff: true, value: 10}, + {tick: 18, inBackOff: true, value: 10}, + {tick: 19, inBackOff: true, value: 10}, + {tick: 20, inBackOff: true, value: 10}, + {tick: 21, inBackOff: true, value: 10}, + {tick: 22, inBackOff: true, value: 10}, + {tick: 23, inBackOff: true, value: 10}, + {tick: 24, inBackOff: true, value: 10}, + {tick: 25, inBackOff: false, value: 10}, + {tick: 26, inBackOff: true, value: 10}, + {tick: 27, inBackOff: true, value: 10}, + {tick: 28, inBackOff: true, value: 10}, + {tick: 29, inBackOff: true, value: 10}, + {tick: 30, inBackOff: true, value: 10}, + {tick: 31, inBackOff: true, value: 10}, + {tick: 32, inBackOff: true, value: 10}, + {tick: 33, inBackOff: true, value: 10}, + {tick: 34, inBackOff: true, value: 10}, + {tick: 35, inBackOff: false, value: 10}, + {tick: 56, inBackOff: false, value: 0}, + {tick: 57, inBackOff: false, value: 1}, + } + + for _, c := range cases { + tc.SetTime(startTime.Add(c.tick * step)) + if c.inBackOff != b.IsInBackOffSinceUpdate(id, tc.Now()) { + t.Errorf("expected IsInBackOffSinceUpdate %v got %v at tick %s", c.inBackOff, b.IsInBackOffSinceUpdate(id, tc.Now()), c.tick*step) + } + + if c.inBackOff && (time.Duration(c.value)*step != b.Get(id)) { + t.Errorf("expected backoff value=%s got %s at tick %s", time.Duration(c.value)*step, b.Get(id), c.tick*step) + } + + if !c.inBackOff { + b.Next(id, tc.Now()) + } + } +} diff --git a/vendor/k8s.io/client-go/util/flowcontrol/throttle_test.go b/vendor/k8s.io/client-go/util/flowcontrol/throttle_test.go new file mode 100644 index 000000000..642020fe4 --- /dev/null +++ b/vendor/k8s.io/client-go/util/flowcontrol/throttle_test.go @@ -0,0 +1,177 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package flowcontrol + +import ( + "math" + "sync" + "testing" + "time" +) + +func TestMultithreadedThrottling(t *testing.T) { + // Bucket with 100QPS and no burst + r := NewTokenBucketRateLimiter(100, 1) + + // channel to collect 100 tokens + taken := make(chan bool, 100) + + // Set up goroutines to hammer the throttler + startCh := make(chan bool) + endCh := make(chan bool) + for i := 0; i < 10; i++ { + go func() { + // wait for the starting signal + <-startCh + for { + // get a token + r.Accept() + select { + // try to add it to the taken channel + case taken <- true: + continue + // if taken is full, notify and return + default: + endCh <- true + return + } + } + }() + } + + // record wall time + startTime := time.Now() + // take the initial capacity so all tokens are the result of refill + r.Accept() + // start the thundering herd + close(startCh) + // wait for the first signal that we collected 100 tokens + <-endCh + // record wall time + endTime := time.Now() + + // tolerate a 1% clock change because these things happen + if duration := endTime.Sub(startTime); duration < (time.Second * 99 / 100) { + // We shouldn't be able to get 100 tokens out of the bucket in less than 1 second of wall clock time, no matter what + t.Errorf("Expected it to take at least 1 second to get 100 tokens, took %v", duration) + } else { + t.Logf("Took %v to get 100 tokens", duration) + } +} + +func TestBasicThrottle(t *testing.T) { + r := NewTokenBucketRateLimiter(1, 3) + for i := 0; i < 3; i++ { + if !r.TryAccept() { + t.Error("unexpected false accept") + } + } + if r.TryAccept() { + t.Error("unexpected true accept") + } +} + +func TestIncrementThrottle(t *testing.T) { + r := NewTokenBucketRateLimiter(1, 1) + if !r.TryAccept() { + t.Error("unexpected false accept") + } + if r.TryAccept() { + t.Error("unexpected true accept") + } + + // Allow to refill + time.Sleep(2 * time.Second) + + if !r.TryAccept() { + t.Error("unexpected false accept") + } +} + +func TestThrottle(t *testing.T) { + r := NewTokenBucketRateLimiter(10, 5) + + // Should consume 5 tokens immediately, then + // the remaining 11 should take at least 1 second (0.1s each) + expectedFinish := time.Now().Add(time.Second * 1) + for i := 0; i < 16; i++ { + r.Accept() + } + if time.Now().Before(expectedFinish) { + t.Error("rate limit was not respected, finished too early") + } +} + +func TestRateLimiterSaturation(t *testing.T) { + const e = 0.000001 + tests := []struct { + capacity int + take int + + expectedSaturation float64 + }{ + {1, 1, 1}, + {10, 3, 0.3}, + } + for i, tt := range tests { + rl := NewTokenBucketRateLimiter(1, tt.capacity) + for i := 0; i < tt.take; i++ { + rl.Accept() + } + if math.Abs(rl.Saturation()-tt.expectedSaturation) > e { + t.Fatalf("#%d: Saturation rate difference isn't within tolerable range\n want=%f, get=%f", + i, tt.expectedSaturation, rl.Saturation()) + } + } +} + +func TestAlwaysFake(t *testing.T) { + rl := NewFakeAlwaysRateLimiter() + if !rl.TryAccept() { + t.Error("TryAccept in AlwaysFake should return true.") + } + // If this will block the test will timeout + rl.Accept() +} + +func TestNeverFake(t *testing.T) { + rl := NewFakeNeverRateLimiter() + if rl.TryAccept() { + t.Error("TryAccept in NeverFake should return false.") + } + + finished := false + wg := sync.WaitGroup{} + wg.Add(1) + go func() { + rl.Accept() + finished = true + wg.Done() + }() + + // Wait some time to make sure it never finished. + time.Sleep(time.Second) + if finished { + t.Error("Accept should block forever in NeverFake.") + } + + rl.Stop() + wg.Wait() + if !finished { + t.Error("Stop should make Accept unblock in NeverFake.") + } +} diff --git a/vendor/k8s.io/client-go/util/integer/integer_test.go b/vendor/k8s.io/client-go/util/integer/integer_test.go new file mode 100644 index 000000000..e9f586888 --- /dev/null +++ b/vendor/k8s.io/client-go/util/integer/integer_test.go @@ -0,0 +1,244 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package integer + +import "testing" + +func TestIntMax(t *testing.T) { + tests := []struct { + nums []int + expectedMax int + }{ + { + nums: []int{-1, 0}, + expectedMax: 0, + }, + { + nums: []int{-1, -2}, + expectedMax: -1, + }, + { + nums: []int{0, 1}, + expectedMax: 1, + }, + { + nums: []int{1, 2}, + expectedMax: 2, + }, + } + + for i, test := range tests { + t.Logf("executing scenario %d", i) + if max := IntMax(test.nums[0], test.nums[1]); max != test.expectedMax { + t.Errorf("expected %v, got %v", test.expectedMax, max) + } + } +} + +func TestIntMin(t *testing.T) { + tests := []struct { + nums []int + expectedMin int + }{ + { + nums: []int{-1, 0}, + expectedMin: -1, + }, + { + nums: []int{-1, -2}, + expectedMin: -2, + }, + { + nums: []int{0, 1}, + expectedMin: 0, + }, + { + nums: []int{1, 2}, + expectedMin: 1, + }, + } + + for i, test := range tests { + t.Logf("executing scenario %d", i) + if min := IntMin(test.nums[0], test.nums[1]); min != test.expectedMin { + t.Errorf("expected %v, got %v", test.expectedMin, min) + } + } +} + +func TestInt32Max(t *testing.T) { + tests := []struct { + nums []int32 + expectedMax int32 + }{ + { + nums: []int32{-1, 0}, + expectedMax: 0, + }, + { + nums: []int32{-1, -2}, + expectedMax: -1, + }, + { + nums: []int32{0, 1}, + expectedMax: 1, + }, + { + nums: []int32{1, 2}, + expectedMax: 2, + }, + } + + for i, test := range tests { + t.Logf("executing scenario %d", i) + if max := Int32Max(test.nums[0], test.nums[1]); max != test.expectedMax { + t.Errorf("expected %v, got %v", test.expectedMax, max) + } + } +} + +func TestInt32Min(t *testing.T) { + tests := []struct { + nums []int32 + expectedMin int32 + }{ + { + nums: []int32{-1, 0}, + expectedMin: -1, + }, + { + nums: []int32{-1, -2}, + expectedMin: -2, + }, + { + nums: []int32{0, 1}, + expectedMin: 0, + }, + { + nums: []int32{1, 2}, + expectedMin: 1, + }, + } + + for i, test := range tests { + t.Logf("executing scenario %d", i) + if min := Int32Min(test.nums[0], test.nums[1]); min != test.expectedMin { + t.Errorf("expected %v, got %v", test.expectedMin, min) + } + } +} + +func TestInt64Max(t *testing.T) { + tests := []struct { + nums []int64 + expectedMax int64 + }{ + { + nums: []int64{-1, 0}, + expectedMax: 0, + }, + { + nums: []int64{-1, -2}, + expectedMax: -1, + }, + { + nums: []int64{0, 1}, + expectedMax: 1, + }, + { + nums: []int64{1, 2}, + expectedMax: 2, + }, + } + + for i, test := range tests { + t.Logf("executing scenario %d", i) + if max := Int64Max(test.nums[0], test.nums[1]); max != test.expectedMax { + t.Errorf("expected %v, got %v", test.expectedMax, max) + } + } +} + +func TestInt64Min(t *testing.T) { + tests := []struct { + nums []int64 + expectedMin int64 + }{ + { + nums: []int64{-1, 0}, + expectedMin: -1, + }, + { + nums: []int64{-1, -2}, + expectedMin: -2, + }, + { + nums: []int64{0, 1}, + expectedMin: 0, + }, + { + nums: []int64{1, 2}, + expectedMin: 1, + }, + } + + for i, test := range tests { + t.Logf("executing scenario %d", i) + if min := Int64Min(test.nums[0], test.nums[1]); min != test.expectedMin { + t.Errorf("expected %v, got %v", test.expectedMin, min) + } + } +} + +func TestRoundToInt32(t *testing.T) { + tests := []struct { + num float64 + exp int32 + }{ + { + num: 5.5, + exp: 6, + }, + { + num: -3.7, + exp: -4, + }, + { + num: 3.49, + exp: 3, + }, + { + num: -7.9, + exp: -8, + }, + { + num: -4.499999, + exp: -4, + }, + { + num: 0, + exp: 0, + }, + } + + for i, test := range tests { + t.Logf("executing scenario %d", i) + if got := RoundToInt32(test.num); got != test.exp { + t.Errorf("expected %d, got %d", test.exp, got) + } + } +} diff --git a/vendor/k8s.io/client-go/util/retry/util_test.go b/vendor/k8s.io/client-go/util/retry/util_test.go new file mode 100644 index 000000000..dbb4374fe --- /dev/null +++ b/vendor/k8s.io/client-go/util/retry/util_test.go @@ -0,0 +1,71 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package retry + +import ( + "fmt" + "testing" + + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/wait" +) + +func TestRetryOnConflict(t *testing.T) { + opts := wait.Backoff{Factor: 1.0, Steps: 3} + conflictErr := errors.NewConflict(schema.GroupResource{Resource: "test"}, "other", nil) + + // never returns + err := RetryOnConflict(opts, func() error { + return conflictErr + }) + if err != conflictErr { + t.Errorf("unexpected error: %v", err) + } + + // returns immediately + i := 0 + err = RetryOnConflict(opts, func() error { + i++ + return nil + }) + if err != nil || i != 1 { + t.Errorf("unexpected error: %v", err) + } + + // returns immediately on error + testErr := fmt.Errorf("some other error") + err = RetryOnConflict(opts, func() error { + return testErr + }) + if err != testErr { + t.Errorf("unexpected error: %v", err) + } + + // keeps retrying + i = 0 + err = RetryOnConflict(opts, func() error { + if i < 2 { + i++ + return errors.NewConflict(schema.GroupResource{Resource: "test"}, "other", nil) + } + return nil + }) + if err != nil || i != 2 { + t.Errorf("unexpected error: %v", err) + } +} diff --git a/vendor/k8s.io/client-go/util/workqueue/default_rate_limiters_test.go b/vendor/k8s.io/client-go/util/workqueue/default_rate_limiters_test.go new file mode 100644 index 000000000..91d34a317 --- /dev/null +++ b/vendor/k8s.io/client-go/util/workqueue/default_rate_limiters_test.go @@ -0,0 +1,184 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package workqueue + +import ( + "testing" + "time" +) + +func TestItemExponentialFailureRateLimiter(t *testing.T) { + limiter := NewItemExponentialFailureRateLimiter(1*time.Millisecond, 1*time.Second) + + if e, a := 1*time.Millisecond, limiter.When("one"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := 2*time.Millisecond, limiter.When("one"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := 4*time.Millisecond, limiter.When("one"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := 8*time.Millisecond, limiter.When("one"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := 16*time.Millisecond, limiter.When("one"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := 5, limiter.NumRequeues("one"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + + if e, a := 1*time.Millisecond, limiter.When("two"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := 2*time.Millisecond, limiter.When("two"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := 2, limiter.NumRequeues("two"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + + limiter.Forget("one") + if e, a := 0, limiter.NumRequeues("one"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := 1*time.Millisecond, limiter.When("one"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + +} + +func TestItemExponentialFailureRateLimiterOverFlow(t *testing.T) { + limiter := NewItemExponentialFailureRateLimiter(1*time.Millisecond, 1000*time.Second) + for i := 0; i < 5; i++ { + limiter.When("one") + } + if e, a := 32*time.Millisecond, limiter.When("one"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + + for i := 0; i < 1000; i++ { + limiter.When("overflow1") + } + if e, a := 1000*time.Second, limiter.When("overflow1"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + + limiter = NewItemExponentialFailureRateLimiter(1*time.Minute, 1000*time.Hour) + for i := 0; i < 2; i++ { + limiter.When("two") + } + if e, a := 4*time.Minute, limiter.When("two"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + + for i := 0; i < 1000; i++ { + limiter.When("overflow2") + } + if e, a := 1000*time.Hour, limiter.When("overflow2"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + +} + +func TestItemFastSlowRateLimiter(t *testing.T) { + limiter := NewItemFastSlowRateLimiter(5*time.Millisecond, 10*time.Second, 3) + + if e, a := 5*time.Millisecond, limiter.When("one"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := 5*time.Millisecond, limiter.When("one"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := 5*time.Millisecond, limiter.When("one"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := 10*time.Second, limiter.When("one"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := 10*time.Second, limiter.When("one"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := 5, limiter.NumRequeues("one"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + + if e, a := 5*time.Millisecond, limiter.When("two"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := 5*time.Millisecond, limiter.When("two"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := 2, limiter.NumRequeues("two"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + + limiter.Forget("one") + if e, a := 0, limiter.NumRequeues("one"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := 5*time.Millisecond, limiter.When("one"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + +} + +func TestMaxOfRateLimiter(t *testing.T) { + limiter := NewMaxOfRateLimiter( + NewItemFastSlowRateLimiter(5*time.Millisecond, 3*time.Second, 3), + NewItemExponentialFailureRateLimiter(1*time.Millisecond, 1*time.Second), + ) + + if e, a := 5*time.Millisecond, limiter.When("one"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := 5*time.Millisecond, limiter.When("one"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := 5*time.Millisecond, limiter.When("one"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := 3*time.Second, limiter.When("one"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := 3*time.Second, limiter.When("one"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := 5, limiter.NumRequeues("one"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + + if e, a := 5*time.Millisecond, limiter.When("two"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := 5*time.Millisecond, limiter.When("two"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := 2, limiter.NumRequeues("two"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + + limiter.Forget("one") + if e, a := 0, limiter.NumRequeues("one"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := 5*time.Millisecond, limiter.When("one"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + +} diff --git a/vendor/k8s.io/client-go/util/workqueue/delaying_queue_test.go b/vendor/k8s.io/client-go/util/workqueue/delaying_queue_test.go new file mode 100644 index 000000000..3c8ebf13a --- /dev/null +++ b/vendor/k8s.io/client-go/util/workqueue/delaying_queue_test.go @@ -0,0 +1,255 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package workqueue + +import ( + "fmt" + "math/rand" + "reflect" + "testing" + "time" + + "k8s.io/apimachinery/pkg/util/clock" + "k8s.io/apimachinery/pkg/util/wait" +) + +func TestSimpleQueue(t *testing.T) { + fakeClock := clock.NewFakeClock(time.Now()) + q := newDelayingQueue(fakeClock, "") + + first := "foo" + + q.AddAfter(first, 50*time.Millisecond) + if err := waitForWaitingQueueToFill(q); err != nil { + t.Fatalf("unexpected err: %v", err) + } + + if q.Len() != 0 { + t.Errorf("should not have added") + } + + fakeClock.Step(60 * time.Millisecond) + + if err := waitForAdded(q, 1); err != nil { + t.Errorf("should have added") + } + item, _ := q.Get() + q.Done(item) + + // step past the next heartbeat + fakeClock.Step(10 * time.Second) + + err := wait.Poll(1*time.Millisecond, 30*time.Millisecond, func() (done bool, err error) { + if q.Len() > 0 { + return false, fmt.Errorf("added to queue") + } + + return false, nil + }) + if err != wait.ErrWaitTimeout { + t.Errorf("expected timeout, got: %v", err) + } + + if q.Len() != 0 { + t.Errorf("should not have added") + } +} + +func TestDeduping(t *testing.T) { + fakeClock := clock.NewFakeClock(time.Now()) + q := newDelayingQueue(fakeClock, "") + + first := "foo" + + q.AddAfter(first, 50*time.Millisecond) + if err := waitForWaitingQueueToFill(q); err != nil { + t.Fatalf("unexpected err: %v", err) + } + q.AddAfter(first, 70*time.Millisecond) + if err := waitForWaitingQueueToFill(q); err != nil { + t.Fatalf("unexpected err: %v", err) + } + if q.Len() != 0 { + t.Errorf("should not have added") + } + + // step past the first block, we should receive now + fakeClock.Step(60 * time.Millisecond) + if err := waitForAdded(q, 1); err != nil { + t.Errorf("should have added") + } + item, _ := q.Get() + q.Done(item) + + // step past the second add + fakeClock.Step(20 * time.Millisecond) + if q.Len() != 0 { + t.Errorf("should not have added") + } + + // test again, but this time the earlier should override + q.AddAfter(first, 50*time.Millisecond) + q.AddAfter(first, 30*time.Millisecond) + if err := waitForWaitingQueueToFill(q); err != nil { + t.Fatalf("unexpected err: %v", err) + } + if q.Len() != 0 { + t.Errorf("should not have added") + } + + fakeClock.Step(40 * time.Millisecond) + if err := waitForAdded(q, 1); err != nil { + t.Errorf("should have added") + } + item, _ = q.Get() + q.Done(item) + + // step past the second add + fakeClock.Step(20 * time.Millisecond) + if q.Len() != 0 { + t.Errorf("should not have added") + } + if q.Len() != 0 { + t.Errorf("should not have added") + } +} + +func TestAddTwoFireEarly(t *testing.T) { + fakeClock := clock.NewFakeClock(time.Now()) + q := newDelayingQueue(fakeClock, "") + + first := "foo" + second := "bar" + third := "baz" + + q.AddAfter(first, 1*time.Second) + q.AddAfter(second, 50*time.Millisecond) + if err := waitForWaitingQueueToFill(q); err != nil { + t.Fatalf("unexpected err: %v", err) + } + + if q.Len() != 0 { + t.Errorf("should not have added") + } + + fakeClock.Step(60 * time.Millisecond) + + if err := waitForAdded(q, 1); err != nil { + t.Fatalf("unexpected err: %v", err) + } + item, _ := q.Get() + if !reflect.DeepEqual(item, second) { + t.Errorf("expected %v, got %v", second, item) + } + + q.AddAfter(third, 2*time.Second) + + fakeClock.Step(1 * time.Second) + if err := waitForAdded(q, 1); err != nil { + t.Fatalf("unexpected err: %v", err) + } + item, _ = q.Get() + if !reflect.DeepEqual(item, first) { + t.Errorf("expected %v, got %v", first, item) + } + + fakeClock.Step(2 * time.Second) + if err := waitForAdded(q, 1); err != nil { + t.Fatalf("unexpected err: %v", err) + } + item, _ = q.Get() + if !reflect.DeepEqual(item, third) { + t.Errorf("expected %v, got %v", third, item) + } +} + +func TestCopyShifting(t *testing.T) { + fakeClock := clock.NewFakeClock(time.Now()) + q := newDelayingQueue(fakeClock, "") + + first := "foo" + second := "bar" + third := "baz" + + q.AddAfter(first, 1*time.Second) + q.AddAfter(second, 500*time.Millisecond) + q.AddAfter(third, 250*time.Millisecond) + if err := waitForWaitingQueueToFill(q); err != nil { + t.Fatalf("unexpected err: %v", err) + } + + if q.Len() != 0 { + t.Errorf("should not have added") + } + + fakeClock.Step(2 * time.Second) + + if err := waitForAdded(q, 3); err != nil { + t.Fatalf("unexpected err: %v", err) + } + actualFirst, _ := q.Get() + if !reflect.DeepEqual(actualFirst, third) { + t.Errorf("expected %v, got %v", third, actualFirst) + } + actualSecond, _ := q.Get() + if !reflect.DeepEqual(actualSecond, second) { + t.Errorf("expected %v, got %v", second, actualSecond) + } + actualThird, _ := q.Get() + if !reflect.DeepEqual(actualThird, first) { + t.Errorf("expected %v, got %v", first, actualThird) + } +} + +func BenchmarkDelayingQueue_AddAfter(b *testing.B) { + r := rand.New(rand.NewSource(time.Now().Unix())) + + fakeClock := clock.NewFakeClock(time.Now()) + q := newDelayingQueue(fakeClock, "") + + // Add items + for n := 0; n < b.N; n++ { + data := fmt.Sprintf("%d", n) + q.AddAfter(data, time.Duration(r.Int63n(int64(10*time.Minute)))) + } + + // Exercise item removal as well + fakeClock.Step(11 * time.Minute) + for n := 0; n < b.N; n++ { + _, _ = q.Get() + } +} + +func waitForAdded(q DelayingInterface, depth int) error { + return wait.Poll(1*time.Millisecond, 10*time.Second, func() (done bool, err error) { + if q.Len() == depth { + return true, nil + } + + return false, nil + }) +} + +func waitForWaitingQueueToFill(q DelayingInterface) error { + return wait.Poll(1*time.Millisecond, 10*time.Second, func() (done bool, err error) { + if len(q.(*delayingType).waitingForAddCh) == 0 { + return true, nil + } + + return false, nil + }) +} diff --git a/vendor/k8s.io/client-go/util/workqueue/queue_test.go b/vendor/k8s.io/client-go/util/workqueue/queue_test.go new file mode 100644 index 000000000..131f4a2a5 --- /dev/null +++ b/vendor/k8s.io/client-go/util/workqueue/queue_test.go @@ -0,0 +1,161 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package workqueue_test + +import ( + "sync" + "testing" + "time" + + "k8s.io/client-go/util/workqueue" +) + +func TestBasic(t *testing.T) { + // If something is seriously wrong this test will never complete. + q := workqueue.New() + + // Start producers + const producers = 50 + producerWG := sync.WaitGroup{} + producerWG.Add(producers) + for i := 0; i < producers; i++ { + go func(i int) { + defer producerWG.Done() + for j := 0; j < 50; j++ { + q.Add(i) + time.Sleep(time.Millisecond) + } + }(i) + } + + // Start consumers + const consumers = 10 + consumerWG := sync.WaitGroup{} + consumerWG.Add(consumers) + for i := 0; i < consumers; i++ { + go func(i int) { + defer consumerWG.Done() + for { + item, quit := q.Get() + if item == "added after shutdown!" { + t.Errorf("Got an item added after shutdown.") + } + if quit { + return + } + t.Logf("Worker %v: begin processing %v", i, item) + time.Sleep(3 * time.Millisecond) + t.Logf("Worker %v: done processing %v", i, item) + q.Done(item) + } + }(i) + } + + producerWG.Wait() + q.ShutDown() + q.Add("added after shutdown!") + consumerWG.Wait() +} + +func TestAddWhileProcessing(t *testing.T) { + q := workqueue.New() + + // Start producers + const producers = 50 + producerWG := sync.WaitGroup{} + producerWG.Add(producers) + for i := 0; i < producers; i++ { + go func(i int) { + defer producerWG.Done() + q.Add(i) + }(i) + } + + // Start consumers + const consumers = 10 + consumerWG := sync.WaitGroup{} + consumerWG.Add(consumers) + for i := 0; i < consumers; i++ { + go func(i int) { + defer consumerWG.Done() + // Every worker will re-add every item up to two times. + // This tests the dirty-while-processing case. + counters := map[interface{}]int{} + for { + item, quit := q.Get() + if quit { + return + } + counters[item]++ + if counters[item] < 2 { + q.Add(item) + } + q.Done(item) + } + }(i) + } + + producerWG.Wait() + q.ShutDown() + consumerWG.Wait() +} + +func TestLen(t *testing.T) { + q := workqueue.New() + q.Add("foo") + if e, a := 1, q.Len(); e != a { + t.Errorf("Expected %v, got %v", e, a) + } + q.Add("bar") + if e, a := 2, q.Len(); e != a { + t.Errorf("Expected %v, got %v", e, a) + } + q.Add("foo") // should not increase the queue length. + if e, a := 2, q.Len(); e != a { + t.Errorf("Expected %v, got %v", e, a) + } +} + +func TestReinsert(t *testing.T) { + q := workqueue.New() + q.Add("foo") + + // Start processing + i, _ := q.Get() + if i != "foo" { + t.Errorf("Expected %v, got %v", "foo", i) + } + + // Add it back while processing + q.Add(i) + + // Finish it up + q.Done(i) + + // It should be back on the queue + i, _ = q.Get() + if i != "foo" { + t.Errorf("Expected %v, got %v", "foo", i) + } + + // Finish that one up + q.Done(i) + + if a := q.Len(); a != 0 { + t.Errorf("Expected queue to be empty. Has %v items", a) + } +} diff --git a/vendor/k8s.io/client-go/util/workqueue/rate_limitting_queue_test.go b/vendor/k8s.io/client-go/util/workqueue/rate_limitting_queue_test.go new file mode 100644 index 000000000..32d7fc906 --- /dev/null +++ b/vendor/k8s.io/client-go/util/workqueue/rate_limitting_queue_test.go @@ -0,0 +1,75 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package workqueue + +import ( + "testing" + "time" + + "k8s.io/apimachinery/pkg/util/clock" +) + +func TestRateLimitingQueue(t *testing.T) { + limiter := NewItemExponentialFailureRateLimiter(1*time.Millisecond, 1*time.Second) + queue := NewRateLimitingQueue(limiter).(*rateLimitingType) + fakeClock := clock.NewFakeClock(time.Now()) + delayingQueue := &delayingType{ + Interface: New(), + clock: fakeClock, + heartbeat: fakeClock.Tick(maxWait), + stopCh: make(chan struct{}), + waitingForAddCh: make(chan *waitFor, 1000), + metrics: newRetryMetrics(""), + } + queue.DelayingInterface = delayingQueue + + queue.AddRateLimited("one") + waitEntry := <-delayingQueue.waitingForAddCh + if e, a := 1*time.Millisecond, waitEntry.readyAt.Sub(fakeClock.Now()); e != a { + t.Errorf("expected %v, got %v", e, a) + } + queue.AddRateLimited("one") + waitEntry = <-delayingQueue.waitingForAddCh + if e, a := 2*time.Millisecond, waitEntry.readyAt.Sub(fakeClock.Now()); e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := 2, queue.NumRequeues("one"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + + queue.AddRateLimited("two") + waitEntry = <-delayingQueue.waitingForAddCh + if e, a := 1*time.Millisecond, waitEntry.readyAt.Sub(fakeClock.Now()); e != a { + t.Errorf("expected %v, got %v", e, a) + } + queue.AddRateLimited("two") + waitEntry = <-delayingQueue.waitingForAddCh + if e, a := 2*time.Millisecond, waitEntry.readyAt.Sub(fakeClock.Now()); e != a { + t.Errorf("expected %v, got %v", e, a) + } + + queue.Forget("one") + if e, a := 0, queue.NumRequeues("one"); e != a { + t.Errorf("expected %v, got %v", e, a) + } + queue.AddRateLimited("one") + waitEntry = <-delayingQueue.waitingForAddCh + if e, a := 1*time.Millisecond, waitEntry.readyAt.Sub(fakeClock.Now()); e != a { + t.Errorf("expected %v, got %v", e, a) + } + +} diff --git a/vendor/k8s.io/kube-openapi/.gitignore b/vendor/k8s.io/kube-openapi/.gitignore new file mode 100644 index 000000000..e36047774 --- /dev/null +++ b/vendor/k8s.io/kube-openapi/.gitignore @@ -0,0 +1,20 @@ +# Binaries for programs and plugins +*.exe +*.dll +*.so +*.dylib + +# Test binary, build with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 +.glide/ + +# Intellij IDEA files +.idea/ +*.iml +.vscode + diff --git a/vendor/k8s.io/kube-openapi/.travis.yml b/vendor/k8s.io/kube-openapi/.travis.yml new file mode 100644 index 000000000..996a4df0e --- /dev/null +++ b/vendor/k8s.io/kube-openapi/.travis.yml @@ -0,0 +1,4 @@ +language: go +go_import_path: k8s.io/kube-openapi +script: go test ./pkg/... + diff --git a/vendor/k8s.io/kube-openapi/OWNERS b/vendor/k8s.io/kube-openapi/OWNERS new file mode 100755 index 000000000..7c8ad60c5 --- /dev/null +++ b/vendor/k8s.io/kube-openapi/OWNERS @@ -0,0 +1,7 @@ +reviewers: +- yujuhong +- gmarek +- mbohlool +- philips +approvers: +- mbohlool diff --git a/vendor/k8s.io/kube-openapi/README.md b/vendor/k8s.io/kube-openapi/README.md new file mode 100644 index 000000000..babadde1f --- /dev/null +++ b/vendor/k8s.io/kube-openapi/README.md @@ -0,0 +1,14 @@ +# Kube OpenAPI + +This repo is the home for Kubernetes OpenAPI discovery spec generation. The goal +is to support a subset of OpenAPI features to satisfy kubernetes use-cases but +implement that subset with little to no assumption about the structure of the +code or routes. Thus, there should be no kubernetes specific code in this repo. + + +There are two main parts: + - A model generator that goes through .go files, find and generate model +definitions. + - The spec generator that is responsible for dynamically generate +the final OpenAPI spec using web service routes or combining other +OpenAPI/Json specs. diff --git a/vendor/k8s.io/kube-openapi/pkg/common/common.go b/vendor/k8s.io/kube-openapi/pkg/common/common.go index 94b026edb..fbe01cabb 100644 --- a/vendor/k8s.io/kube-openapi/pkg/common/common.go +++ b/vendor/k8s.io/kube-openapi/pkg/common/common.go @@ -89,6 +89,30 @@ type Config struct { DefaultSecurity []map[string][]string } +var schemaTypeFormatMap = map[string][]string{ + "uint": {"integer", "int32"}, + "uint8": {"integer", "byte"}, + "uint16": {"integer", "int32"}, + "uint32": {"integer", "int64"}, + "uint64": {"integer", "int64"}, + "int": {"integer", "int32"}, + "int8": {"integer", "byte"}, + "int16": {"integer", "int32"}, + "int32": {"integer", "int32"}, + "int64": {"integer", "int64"}, + "byte": {"integer", "byte"}, + "float64": {"number", "double"}, + "float32": {"number", "float"}, + "bool": {"boolean", ""}, + "time.Time": {"string", "date-time"}, + "string": {"string", ""}, + "integer": {"integer", ""}, + "number": {"number", ""}, + "boolean": {"boolean", ""}, + "[]byte": {"string", "byte"}, // base64 encoded characters + "interface{}": {"object", ""}, +} + // This function is a reference for converting go (or any custom type) to a simple open API type,format pair. There are // two ways to customize spec for a type. If you add it here, a type will be converted to a simple type and the type // comment (the comment that is added before type definition) will be lost. The spec will still have the property @@ -129,29 +153,6 @@ type Config struct { // } // func GetOpenAPITypeFormat(typeName string) (string, string) { - schemaTypeFormatMap := map[string][]string{ - "uint": {"integer", "int32"}, - "uint8": {"integer", "byte"}, - "uint16": {"integer", "int32"}, - "uint32": {"integer", "int64"}, - "uint64": {"integer", "int64"}, - "int": {"integer", "int32"}, - "int8": {"integer", "byte"}, - "int16": {"integer", "int32"}, - "int32": {"integer", "int32"}, - "int64": {"integer", "int64"}, - "byte": {"integer", "byte"}, - "float64": {"number", "double"}, - "float32": {"number", "float"}, - "bool": {"boolean", ""}, - "time.Time": {"string", "date-time"}, - "string": {"string", ""}, - "integer": {"integer", ""}, - "number": {"number", ""}, - "boolean": {"boolean", ""}, - "[]byte": {"string", "byte"}, // base64 encoded characters - "interface{}": {"object", ""}, - } mapped, ok := schemaTypeFormatMap[typeName] if !ok { return "", "" diff --git a/vendor/k8s.io/kubernetes/.bazelrc b/vendor/k8s.io/kubernetes/.bazelrc new file mode 120000 index 000000000..4de3dbc6b --- /dev/null +++ b/vendor/k8s.io/kubernetes/.bazelrc @@ -0,0 +1 @@ +build/root/.bazelrc \ No newline at end of file diff --git a/vendor/k8s.io/kubernetes/.generated_files b/vendor/k8s.io/kubernetes/.generated_files new file mode 100644 index 000000000..ac3b191ad --- /dev/null +++ b/vendor/k8s.io/kubernetes/.generated_files @@ -0,0 +1,30 @@ +# Files that should be ignored by tools which do not want to consider generated +# code. +# +# https://github.com/kubernetes/contrib/blob/master/mungegithub/mungers/size.go +# +# This file is a series of lines, each of the form: +# <type> <name> +# +# Type can be: +# path - an exact path to a single file +# file-name - an exact leaf filename, regardless of path +# path-prefix - a prefix match on the file path +# file-prefix - a prefix match of the leaf filename (no path) +# paths-from-repo - read a file from the repo and load file paths +# + +file-prefix zz_generated. + +file-name BUILD +file-name types.generated.go +file-name generated.pb.go +file-name generated.proto +file-name types_swagger_doc_generated.go + +path-prefix Godeps/ +path-prefix vendor/ +path-prefix api/swagger-spec/ +path-prefix pkg/generated/ + +paths-from-repo docs/.generated_docs diff --git a/vendor/k8s.io/kubernetes/.gitattributes b/vendor/k8s.io/kubernetes/.gitattributes new file mode 100644 index 000000000..0bf66f3ab --- /dev/null +++ b/vendor/k8s.io/kubernetes/.gitattributes @@ -0,0 +1,10 @@ +hack/verify-flags/known-flags.txt merge=union +test/test_owners.csv merge=union + +**/zz_generated.*.go -diff +**/types.generated.go -diff +**/generated.pb.go -diff +**/generated.proto -diff +**/types_swagger_doc_generated.go -diff +docs/api-reference/** -diff +federation/docs/api-reference/** -diff diff --git a/vendor/k8s.io/kubernetes/.gitignore b/vendor/k8s.io/kubernetes/.gitignore new file mode 100644 index 000000000..aad2fb8ba --- /dev/null +++ b/vendor/k8s.io/kubernetes/.gitignore @@ -0,0 +1,127 @@ +# OSX leaves these everywhere on SMB shares +._* + +# OSX trash +.DS_Store + +# Eclipse files +.classpath +.project +.settings/** + +# Files generated by JetBrains IDEs, e.g. IntelliJ IDEA +.idea/ +*.iml + +# Vscode files +.vscode + +# This is where the result of the go build goes +/output*/ +/_output*/ +/_output + +# Emacs save files +*~ +\#*\# +.\#* + +# Vim-related files +[._]*.s[a-w][a-z] +[._]s[a-w][a-z] +*.un~ +Session.vim +.netrwhist + +# cscope-related files +cscope.* + +# Go test binaries +*.test +/hack/.test-cmd-auth + +# JUnit test output from ginkgo e2e tests +/junit*.xml + +# Mercurial files +**/.hg +**/.hg* + +# Vagrant +.vagrant +network_closure.sh + +# Local cluster env variables +/cluster/env.sh + +# Compiled binaries in third_party +/third_party/pkg + +# Also ignore etcd installed by hack/install-etcd.sh +/third_party/etcd* +/default.etcd + +# User cluster configs +.kubeconfig + +.tags* + +# Version file for dockerized build +.dockerized-kube-version-defs + +# Web UI +/www/master/node_modules/ +/www/master/npm-debug.log +/www/master/shared/config/development.json + +# Karma output +/www/test_out + +# precommit temporary directories created by ./hack/verify-generated-docs.sh and ./hack/lib/util.sh +/_tmp/ +/doc_tmp/ + +# Test artifacts produced by Jenkins jobs +/_artifacts/ + +# Go dependencies installed on Jenkins +/_gopath/ + +# Config directories created by gcloud and gsutil on Jenkins +/.config/gcloud*/ +/.gsutil/ + +# CoreOS stuff +/cluster/libvirt-coreos/coreos_*.img + +# Juju Stuff +/cluster/juju/charms/* +/cluster/juju/bundles/local.yaml + +# Downloaded Kubernetes binary release +/kubernetes/ + +# direnv .envrc files +.envrc + +# Downloaded kubernetes binary release tar ball +kubernetes.tar.gz + +# generated files in any directory +# TODO(thockin): uncomment this when we stop committing the generated files. +#zz_generated.* +zz_generated.openapi.go + +# make-related metadata +/.make/ +# Just in time generated data in the source, should never be commited +/test/e2e/generated/bindata.go + +# This file used by some vendor repos (e.g. github.com/go-openapi/...) to store secret variables and should not be ignored +!\.drone\.sec + +# Godeps workspace +/Godeps/_workspace + +/bazel-* +*.pyc diff --git a/vendor/k8s.io/kubernetes/.kazelcfg.json b/vendor/k8s.io/kubernetes/.kazelcfg.json new file mode 120000 index 000000000..cdc4e17bb --- /dev/null +++ b/vendor/k8s.io/kubernetes/.kazelcfg.json @@ -0,0 +1 @@ +build/root/.kazelcfg.json \ No newline at end of file diff --git a/vendor/k8s.io/kubernetes/BUILD.bazel b/vendor/k8s.io/kubernetes/BUILD.bazel new file mode 120000 index 000000000..6889d57db --- /dev/null +++ b/vendor/k8s.io/kubernetes/BUILD.bazel @@ -0,0 +1 @@ +build/root/BUILD.root \ No newline at end of file diff --git a/vendor/k8s.io/kubernetes/CHANGELOG-1.2.md b/vendor/k8s.io/kubernetes/CHANGELOG-1.2.md new file mode 100644 index 000000000..413a67c89 --- /dev/null +++ b/vendor/k8s.io/kubernetes/CHANGELOG-1.2.md @@ -0,0 +1,584 @@ +<!-- BEGIN MUNGE: GENERATED_TOC --> +- [v1.2.7](#v127) + - [Downloads for v1.2.7](#downloads-for-v127) + - [Client Binaries](#client-binaries) + - [Server Binaries](#server-binaries) + - [Changelog since v1.2.6](#changelog-since-v126) + - [Other notable changes](#other-notable-changes) +- [v1.2.6](#v126) + - [Downloads for v1.2.6](#downloads-for-v126) + - [Changelog since v1.2.5](#changelog-since-v125) + - [Other notable changes](#other-notable-changes-1) +- [v1.2.5](#v125) + - [Downloads for v1.2.5](#downloads-for-v125) + - [Changes since v1.2.4](#changes-since-v124) + - [Other notable changes](#other-notable-changes-2) +- [v1.2.4](#v124) + - [Downloads for v1.2.4](#downloads-for-v124) + - [Changes since v1.2.3](#changes-since-v123) + - [Other notable changes](#other-notable-changes-3) +- [v1.2.3](#v123) + - [Downloads for v1.2.3](#downloads-for-v123) + - [Changes since v1.2.2](#changes-since-v122) + - [Action Required](#action-required) + - [Other notable changes](#other-notable-changes-4) +- [v1.2.2](#v122) + - [Downloads for v1.2.2](#downloads-for-v122) + - [Changes since v1.2.1](#changes-since-v121) + - [Other notable changes](#other-notable-changes-5) +- [v1.2.1](#v121) + - [Downloads for v1.2.1](#downloads-for-v121) + - [Changes since v1.2.0](#changes-since-v120) + - [Other notable changes](#other-notable-changes-6) +- [v1.2.0](#v120) + - [Downloads for v1.2.0](#downloads-for-v120) + - [Changes since v1.1.1](#changes-since-v111) + - [Major Themes](#major-themes) + - [Other notable improvements](#other-notable-improvements) + - [Experimental Features](#experimental-features) + - [Action required](#action-required-1) + - [Known Issues](#known-issues) + - [Docker Known Issues](#docker-known-issues) + - [1.9.1](#191) + - [Provider-specific Notes](#provider-specific-notes) + - [Various](#various) + - [AWS](#aws) + - [GCE](#gce) +<!-- END MUNGE: GENERATED_TOC --> + +<!-- NEW RELEASE NOTES ENTRY --> + + +# v1.2.7 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.2/examples) + +## Downloads for v1.2.7 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.2.7/kubernetes.tar.gz) | `53db157923c17fa7a0addb3e4dfe7d1b9194b9266a87d371a251d5bb790a1832` +[kubernetes-src.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.2.7/kubernetes-src.tar.gz) | `e6e46831706743d8263581d0575507cf5ffc265096d22e5e84cf1c3ae925db5e` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.2.7/kubernetes-client-darwin-386.tar.gz) | `8418767e45c62c2ef5f9b4479ed02af64e190ce07dcbafa1920e93e71f419c55` +[kubernetes-client-darwin-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.2.7/kubernetes-client-darwin-amd64.tar.gz) | `41d742c2c55e7686311978eaaddee3844b990a0fe49fa8597158bcb0ee4c05c9` +[kubernetes-client-linux-386.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.2.7/kubernetes-client-linux-386.tar.gz) | `619e0a450cddf10ed1d42ed1d6330d41a75b9c1e00eb654cbe4b0422cd6099c5` +[kubernetes-client-linux-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.2.7/kubernetes-client-linux-amd64.tar.gz) | `9a5fcd87514b88eb25173e574aef5b5343816c07ab5947d06787c9f12c40f54a` +[kubernetes-client-linux-arm.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.2.7/kubernetes-client-linux-arm.tar.gz) | `fd6e39b4a56e03448382825f27f4f30a2e981a8d20f4a8cedbd084bbb4577d42` +[kubernetes-client-windows-386.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.2.7/kubernetes-client-windows-386.tar.gz) | `862625cb3d9445cff1b09e4ebcdb60dd93b5b2dc34bb6022d2eeed7c8d8bc5d8` +[kubernetes-client-windows-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.2.7/kubernetes-client-windows-amd64.tar.gz) | `054337e41187e39950de93e4670bc78a95b6901cc2f95c50ff437d9825ae94c5` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.2.7/kubernetes-server-linux-amd64.tar.gz) | `fef041e9cbe5bcf8fd708f81ee2e2783429af1ab9cfb151d645ef9be96e19b73` +[kubernetes-server-linux-arm.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.2.7/kubernetes-server-linux-arm.tar.gz) | `ce02d7bcd75c31db4f7b9922c19ea2a3312b0ba579b0dcd96b279b661eca18a8` + +## Changelog since v1.2.6 + +### Other notable changes + +* Test x509 intermediates correctly ([#34524](https://github.com/kubernetes/kubernetes/pull/34524), [@liggitt](https://github.com/liggitt)) + + + +# v1.2.6 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.2/examples) + +## Downloads for v1.2.6 + +binary | sha1 hash | md5 hash +------ | --------- | -------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.2.6/kubernetes.tar.gz) | `50023455d00af52c41a7158b4bd117b2dfd4a100` | `cf0411bcb620eb13b08b93578efffc43` + +## Changelog since v1.2.5 + +### Other notable changes + +* Fix watch cache filtering ([#28967](https://github.com/kubernetes/kubernetes/pull/28967), [@liggitt](https://github.com/liggitt)) +* Fix problems with container restarts and flocker ([#25874](https://github.com/kubernetes/kubernetes/pull/25874), [@simonswine](https://github.com/simonswine)) + + + +# v1.2.5 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.2/examples) + +## Downloads for v1.2.5 + +binary | sha1 hash | md5 hash +------ | --------- | -------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.2.5/kubernetes.tar.gz) | `ddf12d7f37dfef25308798d71ad547761d0785ac` | `69d770df8fa4eceb57167e34df3962ca` + +## Changes since v1.2.4 + +### Other notable changes + +* Retry Pod/RC updates in kubectl rolling-update ([#27509](https://github.com/kubernetes/kubernetes/pull/27509), [@janetkuo](https://github.com/janetkuo)) +* GCE provider: Create TargetPool with 200 instances, then update with rest ([#27865](https://github.com/kubernetes/kubernetes/pull/27865), [@zmerlynn](https://github.com/zmerlynn)) +* GCE provider: Limit Filter calls to regexps rather than large blobs ([#27741](https://github.com/kubernetes/kubernetes/pull/27741), [@zmerlynn](https://github.com/zmerlynn)) +* Fix strategic merge diff list diff bug ([#26418](https://github.com/kubernetes/kubernetes/pull/26418), [@AdoHe](https://github.com/AdoHe)) +* AWS: Fix long-standing bug in stringSetToPointers ([#26331](https://github.com/kubernetes/kubernetes/pull/26331), [@therc](https://github.com/therc)) +* AWS kube-up: Increase timeout waiting for docker start ([#25405](https://github.com/kubernetes/kubernetes/pull/25405), [@justinsb](https://github.com/justinsb)) +* Fix hyperkube flag parsing ([#25512](https://github.com/kubernetes/kubernetes/pull/25512), [@colhom](https://github.com/colhom)) +* kubectl rolling-update support for same image ([#24645](https://github.com/kubernetes/kubernetes/pull/24645), [@jlowdermilk](https://github.com/jlowdermilk)) +* Return "410 Gone" errors via watch stream when using watch cache ([#25369](https://github.com/kubernetes/kubernetes/pull/25369), [@liggitt](https://github.com/liggitt)) + + + +# v1.2.4 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.2/examples) + +## Downloads for v1.2.4 + +binary | sha1 hash | md5 hash +------ | --------- | -------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.2.4/kubernetes.tar.gz) | `f3aea83f8f0e16b2b41998a2edc09eb42fd8d945` | `ab0aca3a20e8eba43c8ff9d672793618` + +## Changes since v1.2.3 + +### Other notable changes + +* Ensure status is not changed during an update of PV, PVC, HPA objects ([#24924](https://github.com/kubernetes/kubernetes/pull/24924), [@mqliang](https://github.com/mqliang)) +* GCI: Add two GCI specific metadata pairs ([#25105](https://github.com/kubernetes/kubernetes/pull/25105), [@andyzheng0831](https://github.com/andyzheng0831)) +* Add an entry to the salt config to allow Debian jessie on GCE. ([#25123](https://github.com/kubernetes/kubernetes/pull/25123), [@jlewi](https://github.com/jlewi)) + * As with the existing Wheezy image on GCE, docker is expected + * to already be installed in the image. +* Fix DeletingLoadBalancer event generation. ([#24833](https://github.com/kubernetes/kubernetes/pull/24833), [@a-robinson](https://github.com/a-robinson)) +* GCE: Prefer preconfigured node tags for firewalls, if available ([#25148](https://github.com/kubernetes/kubernetes/pull/25148), [@a-robinson](https://github.com/a-robinson)) +* Drain pods created from ReplicaSets in 'kubectl drain' ([#23689](https://github.com/kubernetes/kubernetes/pull/23689), [@maclof](https://github.com/maclof)) +* GCI: Update the command to get the image ([#24987](https://github.com/kubernetes/kubernetes/pull/24987), [@andyzheng0831](https://github.com/andyzheng0831)) +* Validate deletion timestamp doesn't change on update ([#24839](https://github.com/kubernetes/kubernetes/pull/24839), [@liggitt](https://github.com/liggitt)) +* Add support for running clusters on GCI ([#24893](https://github.com/kubernetes/kubernetes/pull/24893), [@andyzheng0831](https://github.com/andyzheng0831)) +* Trusty: Add retry in curl commands ([#24749](https://github.com/kubernetes/kubernetes/pull/24749), [@andyzheng0831](https://github.com/andyzheng0831)) + + + +# v1.2.3 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.2/examples) + +## Downloads for v1.2.3 + +binary | sha1 hash | md5 hash +------ | --------- | -------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.2.3/kubernetes.tar.gz) | `b2ce4e0c72562d09ba06e3c0913f0bd78da0285e` | `69e75650de30d5a52d144799e94a168d` + +## Changes since v1.2.2 + +### Action Required + +* Make watch cache treat resourceVersion consistent with uncached watch ([#24008](https://github.com/kubernetes/kubernetes/pull/24008), [@liggitt](https://github.com/liggitt)) + +### Other notable changes + +* Fix unintended change of Service.spec.ports[].nodePort during kubectl apply ([#24180](https://github.com/kubernetes/kubernetes/pull/24180), [@AdoHe](https://github.com/AdoHe)) +* Flush conntrack state for removed/changed UDP Services ([#22573](https://github.com/kubernetes/kubernetes/pull/22573), [@freehan](https://github.com/freehan)) +* Allow setting the Host header in a httpGet probe ([#24292](https://github.com/kubernetes/kubernetes/pull/24292), [@errm](https://github.com/errm)) +* Bridge off-cluster traffic into services by masquerading. ([#24429](https://github.com/kubernetes/kubernetes/pull/24429), [@cjcullen](https://github.com/cjcullen)) +* Version-guard Kubectl client Guestbook application test against deployments ([#24478](https://github.com/kubernetes/kubernetes/pull/24478), [@ihmccreery](https://github.com/ihmccreery)) +* Fix goroutine leak in ssh-tunnel healthcheck. ([#24487](https://github.com/kubernetes/kubernetes/pull/24487), [@cjcullen](https://github.com/cjcullen)) +* Fixed mounting with containerized kubelet ([#23435](https://github.com/kubernetes/kubernetes/pull/23435), [@jsafrane](https://github.com/jsafrane)) +* Do not throw creation errors for containers that fail immediately after being started ([#23894](https://github.com/kubernetes/kubernetes/pull/23894), [@vishh](https://github.com/vishh)) +* Honor starting resourceVersion in watch cache ([#24208](https://github.com/kubernetes/kubernetes/pull/24208), [@ncdc](https://github.com/ncdc)) +* Fix TerminationMessagePath ([#23658](https://github.com/kubernetes/kubernetes/pull/23658), [@Random-Liu](https://github.com/Random-Liu)) +* Fix gce.getDiskByNameUnknownZone logic. ([#24452](https://github.com/kubernetes/kubernetes/pull/24452), [@a-robinson](https://github.com/a-robinson)) +* kubelet: add RSS memory to the summary API ([#24015](https://github.com/kubernetes/kubernetes/pull/24015), [@yujuhong](https://github.com/yujuhong)) +* e2e: adapt kubelet_perf.go to use the new summary metrics API ([#24003](https://github.com/kubernetes/kubernetes/pull/24003), [@yujuhong](https://github.com/yujuhong)) +* e2e: fix error checking in kubelet stats ([#24205](https://github.com/kubernetes/kubernetes/pull/24205), [@yujuhong](https://github.com/yujuhong)) +* Trusty: Avoid unnecessary in-memory temp files ([#24144](https://github.com/kubernetes/kubernetes/pull/24144), [@andyzheng0831](https://github.com/andyzheng0831)) +* Allowing type object in kubectl swagger validation ([#24054](https://github.com/kubernetes/kubernetes/pull/24054), [@nikhiljindal](https://github.com/nikhiljindal)) +* Add ClusterUpgrade tests ([#24150](https://github.com/kubernetes/kubernetes/pull/24150), [@ihmccreery](https://github.com/ihmccreery)) +* Trusty: Do not create the docker-daemon cgroup ([#23996](https://github.com/kubernetes/kubernetes/pull/23996), [@andyzheng0831](https://github.com/andyzheng0831)) + + + +# v1.2.2 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.2/examples) + +## Downloads for v1.2.2 + +binary | sha1 hash | md5 hash +------ | --------- | -------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.2.2/kubernetes.tar.gz) | `8dede5833a1986434adea80749624f81a0db7bb4` | `72a5389f22827fb5133fdc3b7bfb9b3a` + +## Changes since v1.2.1 + +### Other notable changes + +* Trusty: Update heapster manifest handling code ([#23434](https://github.com/kubernetes/kubernetes/pull/23434), [@andyzheng0831](https://github.com/andyzheng0831)) +* Support addon Deployments, make heapster a deployment with a nanny. ([#22893](https://github.com/kubernetes/kubernetes/pull/22893), [@Q-Lee](https://github.com/Q-Lee)) +* Create a new Deployment in kube-system for every version. ([#23512](https://github.com/kubernetes/kubernetes/pull/23512), [@Q-Lee](https://github.com/Q-Lee)) +* Use SCP to dump logs and parallelize a bit. ([#22835](https://github.com/kubernetes/kubernetes/pull/22835), [@spxtr](https://github.com/spxtr)) +* Trusty: Regional release .tar.gz support ([#23558](https://github.com/kubernetes/kubernetes/pull/23558), [@andyzheng0831](https://github.com/andyzheng0831)) +* Make ConfigMap volume readable as non-root ([#23793](https://github.com/kubernetes/kubernetes/pull/23793), [@pmorie](https://github.com/pmorie)) +* only include running and pending pods in daemonset should place calculation ([#23929](https://github.com/kubernetes/kubernetes/pull/23929), [@mikedanese](https://github.com/mikedanese)) +* A pod never terminated if a container image registry was unavailable ([#23746](https://github.com/kubernetes/kubernetes/pull/23746), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* Update Dashboard UI addon to v1.0.1 ([#23724](https://github.com/kubernetes/kubernetes/pull/23724), [@maciaszczykm](https://github.com/maciaszczykm)) +* Ensure object returned by volume getCloudProvider incorporates cloud config ([#23769](https://github.com/kubernetes/kubernetes/pull/23769), [@saad-ali](https://github.com/saad-ali)) +* Add a timeout to the sshDialer to prevent indefinite hangs. ([#23843](https://github.com/kubernetes/kubernetes/pull/23843), [@cjcullen](https://github.com/cjcullen)) +* AWS kube-up: tolerate a lack of ephemeral volumes ([#23776](https://github.com/kubernetes/kubernetes/pull/23776), [@justinsb](https://github.com/justinsb)) +* Fix so setup-files don't recreate/invalidate certificates that already exist ([#23550](https://github.com/kubernetes/kubernetes/pull/23550), [@luxas](https://github.com/luxas)) + + + +# v1.2.1 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.2/examples) + +## Downloads for v1.2.1 + +binary | sha1 hash | md5 hash +------ | --------- | -------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.2.1/kubernetes.tar.gz) | `1639807c5788e1c6b1ab51fd30b723fb5debd865` | `235a1da47972c96a560d718d3256ca4f` + + +## Changes since v1.2.0 + +### Other notable changes + +* AWS: Fix problems with >2 security groups ([#23340](https://github.com/kubernetes/kubernetes/pull/23340), [@justinsb](https://github.com/justinsb)) +* IngressTLS: allow secretName to be blank for SNI routing ([#23500](https://github.com/kubernetes/kubernetes/pull/23500), [@tam7t](https://github.com/tam7t)) +* Heapster patch release to 1.0.2 ([#23487](https://github.com/kubernetes/kubernetes/pull/23487), [@piosz](https://github.com/piosz)) +* Remove unnecessary override of /etc/init.d/docker on containervm image. ([#23593](https://github.com/kubernetes/kubernetes/pull/23593), [@dchen1107](https://github.com/dchen1107)) +* Change kube-proxy & fluentd CPU request to 20m/80m. ([#23646](https://github.com/kubernetes/kubernetes/pull/23646), [@cjcullen](https://github.com/cjcullen)) +* make docker-checker more robust ([#23662](https://github.com/kubernetes/kubernetes/pull/23662), [@ArtfulCoder](https://github.com/ArtfulCoder)) +* validate that daemonsets don't have empty selectors on creation ([#23530](https://github.com/kubernetes/kubernetes/pull/23530), [@mikedanese](https://github.com/mikedanese)) +* don't sync deployment when pod selector is empty ([#23467](https://github.com/kubernetes/kubernetes/pull/23467), [@mikedanese](https://github.com/mikedanese)) +* Support differentiation of OS distro in e2e tests ([#23466](https://github.com/kubernetes/kubernetes/pull/23466), [@andyzheng0831](https://github.com/andyzheng0831)) +* don't sync daemonsets with selectors that match all pods ([#23223](https://github.com/kubernetes/kubernetes/pull/23223), [@mikedanese](https://github.com/mikedanese)) +* Trusty: Avoid reaching GCE custom metadata size limit ([#22818](https://github.com/kubernetes/kubernetes/pull/22818), [@andyzheng0831](https://github.com/andyzheng0831)) +* Update kubectl help for 1.2 resources ([#23305](https://github.com/kubernetes/kubernetes/pull/23305), [@janetkuo](https://github.com/janetkuo)) +* Removing URL query param from swagger UI to fix the XSS issue ([#23234](https://github.com/kubernetes/kubernetes/pull/23234), [@nikhiljindal](https://github.com/nikhiljindal)) +* Fix hairpin mode ([#23325](https://github.com/kubernetes/kubernetes/pull/23325), [@MurgaNikolay](https://github.com/MurgaNikolay)) +* Bump to container-vm-v20160321 ([#23313](https://github.com/kubernetes/kubernetes/pull/23313), [@zmerlynn](https://github.com/zmerlynn)) +* Remove the restart-kube-proxy and restart-apiserver functions ([#23180](https://github.com/kubernetes/kubernetes/pull/23180), [@roberthbailey](https://github.com/roberthbailey)) +* Copy annotations back from RS to Deployment on rollback ([#23160](https://github.com/kubernetes/kubernetes/pull/23160), [@janetkuo](https://github.com/janetkuo)) +* Trusty: Support hybrid cluster with nodes on ContainerVM ([#23079](https://github.com/kubernetes/kubernetes/pull/23079), [@andyzheng0831](https://github.com/andyzheng0831)) +* update expose command description to add deployment ([#23246](https://github.com/kubernetes/kubernetes/pull/23246), [@AdoHe](https://github.com/AdoHe)) +* Add a rate limiter to the GCE cloudprovider ([#23019](https://github.com/kubernetes/kubernetes/pull/23019), [@alex-mohr](https://github.com/alex-mohr)) +* Add a Deployment example for kubectl expose. ([#23222](https://github.com/kubernetes/kubernetes/pull/23222), [@madhusudancs](https://github.com/madhusudancs)) +* Use versioned object when computing patch ([#23145](https://github.com/kubernetes/kubernetes/pull/23145), [@liggitt](https://github.com/liggitt)) +* kubelet: send all recevied pods in one update ([#23141](https://github.com/kubernetes/kubernetes/pull/23141), [@yujuhong](https://github.com/yujuhong)) +* Add a SSHKey sync check to the master's healthz (when using SSHTunnels). ([#23167](https://github.com/kubernetes/kubernetes/pull/23167), [@cjcullen](https://github.com/cjcullen)) +* Validate minimum CPU limits to be >= 10m ([#23143](https://github.com/kubernetes/kubernetes/pull/23143), [@vishh](https://github.com/vishh)) +* Fix controller-manager race condition issue which cause endpoints flush during restart ([#23035](https://github.com/kubernetes/kubernetes/pull/23035), [@xinxiaogang](https://github.com/xinxiaogang)) +* MESOS: forward globally declared cadvisor housekeeping flags ([#22974](https://github.com/kubernetes/kubernetes/pull/22974), [@jdef](https://github.com/jdef)) +* Trusty: support developer workflow on base image ([#22960](https://github.com/kubernetes/kubernetes/pull/22960), [@andyzheng0831](https://github.com/andyzheng0831)) + + + +# v1.2.0 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.2/examples) + +## Downloads for v1.2.0 + +binary | sha1 hash | md5 hash +------ | --------- | -------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.2.0/kubernetes.tar.gz) | `52dd998e1191f464f581a9b87017d70ce0b058d9` | `c0ce9e6150e9d7a19455db82f3318b4c` + +## Changes since v1.1.1 + +### Major Themes + + * <strong>Significant scale improvements</strong>. Increased cluster scale by 400% to 1000 nodes with 30,000 pods per cluster. +Kubelet supports 100 pods per node with 4x reduced system overhead. + * <strong>Simplified application deployment and management. </strong> + * Dynamic Configuration (ConfigMap API in the core API group) enables application +configuration to be stored as a Kubernetes API object and pulled dynamically on +container startup, as an alternative to baking in command-line flags when a +container is built. + * Turnkey Deployments (Deployment API (Beta) in the Extensions API group) +automate deployment and rolling updates of applications, specified +declaratively. It handles versioning, multiple simultaneous rollouts, +aggregating status across all pods, maintaining application availability, and +rollback. + * <strong>Automated cluster management: </strong> + * Kubernetes clusters can now span zones within a cloud provider. Pods from a +service will be automatically spread across zones, enabling applications to +tolerate zone failure. + * Simplified way to run a container on every node (DaemonSet API (Beta) in the +Extensions API group): Kubernetes can schedule a service (such as a logging +agent) that runs one, and only one, pod per node. + * TLS and L7 support (Ingress API (Beta) in the Extensions API group): Kubernetes +is now easier to integrate into custom networking environments by supporting +TLS for secure communication and L7 http-based traffic routing. + * Graceful Node Shutdown (aka drain) - The new “kubectl drain” command gracefully +evicts pods from nodes in preparation for disruptive operations like kernel +upgrades or maintenance. + * Custom Metrics for Autoscaling (HorizontalPodAutoscaler API in the Autoscaling +API group): The Horizontal Pod Autoscaling feature now supports custom metrics +(Alpha), allowing you to specify application-level metrics and thresholds to +trigger scaling up and down the number of pods in your application. + * <strong>New GUI</strong> (dashboard) allows you to get started quickly and enables the same +functionality found in the CLI as a more approachable and discoverable way of +interacting with the system. Note: the GUI is enabled by default in 1.2 clusters. + +<img src="docs/images/newgui.png" width="" alt="Dashboard UI screenshot showing cards that represent applications that run inside a cluster" title="Dashboard UI apps screen"> + +### Other notable improvements + + * Job was Beta in 1.1 and is GA in 1.2 . + * <code>apiVersion: batch/v1 </code>is now available. You now do not need to specify the <code>.spec.selector</code> field — a [unique selector is automatically generated ](http://kubernetes.io/docs/user-guide/jobs/#pod-selector)for you. + * The previous version, <code>apiVersion: extensions/v1beta1</code>, is still supported. Even if you roll back to 1.1, the objects created using +the new apiVersion will still be accessible, using the old version. You can +continue to use your existing JSON and YAML files until you are ready to switch +to <code>batch/v1</code>. We may remove support for Jobs with <code>apiVersion: extensions/v1beta1 </code>in 1.3 or 1.4. + * HorizontalPodAutoscaler was Beta in 1.1 and is GA in 1.2 . + * <code>apiVersion: autoscaling/v1 </code>is now available. Changes in this version are: + * Field CPUUtilization which was a nested structure CPUTargetUtilization in +HorizontalPodAutoscalerSpec was replaced by TargetCPUUtilizationPercentage +which is an integer. + * ScaleRef of type SubresourceReference in HorizontalPodAutoscalerSpec which +referred to scale subresource of the resource being scaled was replaced by +ScaleTargetRef which points just to the resource being scaled. + * In extensions/v1beta1 if CPUUtilization in HorizontalPodAutoscalerSpec was not +specified it was set to 80 by default while in autoscaling/v1 HPA object +without TargetCPUUtilizationPercentage specified is a valid object. Pod +autoscaler controller will apply a default scaling policy in this case which is +equivalent to the previous one but may change in the future. + * The previous version, <code>apiVersion: extensions/v1beta1</code>, is still supported. Even if you roll back to 1.1, the objects created using +the new apiVersions will still be accessible, using the old version. You can +continue to use your existing JSON and YAML files until you are ready to switch +to <code>autoscaling/v1</code>. We may remove support for HorizontalPodAutoscalers with <code>apiVersion: extensions/v1beta1 </code>in 1.3 or 1.4. + * Kube-Proxy now defaults to an iptables-based proxy. If the --proxy-mode flag is +specified while starting kube-proxy (‘userspace’ or ‘iptables’), the flag value +will be respected. If the flag value is not specified, the kube-proxy respects +the Node object annotation: ‘net.beta.kubernetes.io/proxy-mode’. If the +annotation is not specified, then ‘iptables’ mode is the default. If kube-proxy +is unable to start in iptables mode because system requirements are not met +(kernel or iptables versions are insufficient), the kube-proxy will fall-back +to userspace mode. Kube-proxy is much more performant and less +resource-intensive in ‘iptables’ mode. + * Node stability can be improved by reserving [resources](https://github.com/kubernetes/kubernetes/blob/release-1.2/docs/proposals/node-allocatable.md) for the base operating system using --system-reserved and --kube-reserved Kubelet flags + * Liveness and readiness probes now support more configuration parameters: +periodSeconds, successThreshold, failureThreshold + * The new ReplicaSet API (Beta) in the Extensions API group is similar to +ReplicationController, but its [selector](http://kubernetes.io/docs/user-guide/labels/#label-selectors) is more general (supports set-based selector; whereas ReplicationController +only supports equality-based selector). + * Scale subresource support is now expanded to ReplicaSets along with +ReplicationControllers and Deployments. Scale now supports two different types +of selectors to accommodate both [equality-based selectors](http://kubernetes.io/docs/user-guide/labels/#equality-based-requirement) supported by ReplicationControllers and [set-based selectors](http://kubernetes.io/docs/user-guide/labels/#set-based-requirement) supported by Deployments and ReplicaSets. + * “kubectl run” now produces Deployments (instead of ReplicationControllers) and +Jobs (instead of Pods) by default. + * Pods can now consume Secret data in environment variables and inject those +environment variables into a container’s command-line args. + * Stable version of Heapster which scales up to 1000 nodes: more metrics, reduced +latency, reduced cpu/memory consumption (~4mb per monitored node). + * Pods now have a security context which allows users to specify: + * attributes which apply to the whole pod: + * User ID + * Whether all containers should be non-root + * Supplemental Groups + * FSGroup - a special supplemental group + * SELinux options + * If a pod defines an FSGroup, that Pod’s system (emptyDir, secret, configMap, +etc) volumes and block-device volumes will be owned by the FSGroup, and each +container in the pod will run with the FSGroup as a supplemental group + * Volumes that support SELinux labelling are now automatically relabeled with the +Pod’s SELinux context, if specified + * A stable client library release\_1\_2 is added. The library is [here](pkg/client/clientset_generated/), and detailed doc is [here](docs/devel/generating-clientset.md#released-clientsets). We will keep the interface of this go client stable. + * New Azure File Service Volume Plugin enables mounting Microsoft Azure File +Volumes (SMB 2.1 and 3.0) into a Pod. See [example](https://github.com/kubernetes/kubernetes/blob/release-1.2/examples/azure_file/README.md) for details. + * Logs usage and root filesystem usage of a container, volumes usage of a pod and node disk usage are exposed through Kubelet new metrics API. + +### Experimental Features + + * Dynamic Provisioning of PersistentVolumes: Kubernetes previously required all +volumes to be manually provisioned by a cluster administrator before use. With +this feature, volume plugins that support it (GCE PD, AWS EBS, and Cinder) can +automatically provision a PersistentVolume to bind to an unfulfilled +PersistentVolumeClaim. + * Run multiple schedulers in parallel, e.g. one or more custom schedulers +alongside the default Kubernetes scheduler, using pod annotations to select +among the schedulers for each pod. Documentation is [here](http://kubernetes.io/docs/admin/multiple-schedulers.md), design doc is [here](docs/proposals/multiple-schedulers.md). + * More expressive node affinity syntax, and support for “soft” node affinity. +Node selectors (to constrain pods to schedule on a subset of nodes) now support +the operators {<code>In, NotIn, Exists, DoesNotExist, Gt, Lt</code>} instead of just conjunction of exact match on node label values. In +addition, we’ve introduced a new “soft” kind of node selector that is just a +hint to the scheduler; the scheduler will try to satisfy these requests but it +does not guarantee they will be satisfied. Both the “hard” and “soft” variants +of node affinity use the new syntax. Documentation is [here](http://kubernetes.io/docs/user-guide/node-selection/) (see section “Alpha feature in Kubernetes v1.2: Node Affinity“). Design doc is [here](https://github.com/kubernetes/kubernetes/blob/release-1.2/docs/design/nodeaffinity.md). + * A pod can specify its own Hostname and Subdomain via annotations (<code>pod.beta.kubernetes.io/hostname, pod.beta.kubernetes.io/subdomain)</code>. If the Subdomain matches the name of a [headless service](http://kubernetes.io/docs/user-guide/services/#headless-services) in the same namespace, a DNS A record is also created for the pod’s FQDN. More +details can be found in the [DNS README](https://github.com/kubernetes/kubernetes/blob/release-1.2/cluster/saltbase/salt/kube-dns/README.md#a-records-and-hostname-based-on-pod-annotations---a-beta-feature-in-kubernetes-v12). Changes were introduced in PR [#20688](https://github.com/kubernetes/kubernetes/pull/20688). + * New SchedulerExtender enables users to implement custom +out-of-(the-scheduler)-process scheduling predicates and priority functions, +for example to schedule pods based on resources that are not directly managed +by Kubernetes. Changes were introduced in PR [#13580](https://github.com/kubernetes/kubernetes/pull/13580). Example configuration and documentation is available [here](docs/design/scheduler_extender.md). This is an alpha feature and may not be supported in its current form at beta +or GA. + * New Flex Volume Plugin enables users to use out-of-process volume plugins that +are installed to “/usr/libexec/kubernetes/kubelet-plugins/volume/exec/” on +every node, instead of being compiled into the Kubernetes binary. See [example](examples/volumes/flexvolume/README.md) for details. + * vendor volumes into a pod. It expects vendor drivers are installed in the +volume plugin path on each kubelet node. This is an alpha feature and may +change in future. + * Kubelet exposes a new Alpha metrics API - /stats/summary in a user friendly format with reduced system overhead. The measurement is done in PR [#22542](https://github.com/kubernetes/kubernetes/pull/22542). + +### Action required + + * Docker v1.9.1 is officially recommended. Docker v1.8.3 and Docker v1.10 are +supported. If you are using an older release of Docker, please upgrade. Known +issues with Docker 1.9.1 can be found below. + * CPU hardcapping will be enabled by default for containers with CPU limit set, +if supported by the kernel. You should either adjust your CPU limit, or set CPU +request only, if you want to avoid hardcapping. If the kernel does not support +CPU Quota, NodeStatus will contain a warning indicating that CPU Limits cannot +be enforced. + * The following applies only if you use the Go language client (<code>/pkg/client/unversioned</code>) to create Job by defining Go variables of type "<code>k8s.io/kubernetes/pkg/apis/extensions".Job</code>). We think <strong>this is not common</strong>, so if you are not sure what this means, you probably aren't doing this. If +you do this, then, at the time you re-vendor the "<code>k8s.io/kubernetes/"</code> code, you will need to set <code>job.Spec.ManualSelector = true</code>, or else set <code>job.Spec.Selector = nil. </code>Otherwise, the jobs you create may be rejected. See [Specifying your own pod selector](http://kubernetes.io/docs/user-guide/jobs/#specifying-your-own-pod-selector). + * Deployment was Alpha in 1.1 (though it had apiVersion extensions/v1beta1) and +was disabled by default. Due to some non-backward-compatible API changes, any +Deployment objects you created in 1.1 won’t work with in the 1.2 release. + * Before upgrading to 1.2, <strong>delete all Deployment alpha-version resources</strong>, including the Replication Controllers and Pods the Deployment manages. Then +create Deployment Beta resources after upgrading to 1.2. Not deleting the +Deployment objects may cause the deployment controller to mistakenly match +other pods and delete them, due to the selector API change. + * Client (kubectl) and server versions must match (both 1.1 or both 1.2) for any +Deployment-related operations. + * Behavior change: + * Deployment creates ReplicaSets instead of ReplicationControllers. + * Scale subresource now has a new <code>targetSelector</code> field in its status. This field supports the new set-based selectors supported +by Deployments, but in a serialized format. + * Spec change: + * Deployment’s [selector](http://kubernetes.io/docs/user-guide/labels/#label-selectors) is now more general (supports set-based selector; it only supported +equality-based selector in 1.1). + * .spec.uniqueLabelKey is removed -- users can’t customize unique label key -- +and its default value is changed from +“deployment.kubernetes.io/podTemplateHash” to “pod-template-hash”. + * .spec.strategy.rollingUpdate.minReadySeconds is moved to .spec.minReadySeconds + * DaemonSet was Alpha in 1.1 (though it had apiVersion extensions/v1beta1) and +was disabled by default. Due to some non-backward-compatible API changes, any +DaemonSet objects you created in 1.1 won’t work with in the 1.2 release. + * Before upgrading to 1.2, <strong>delete all DaemonSet alpha-version resources</strong>. If you do not want to disrupt the pods, use kubectl delete daemonset <name> +--cascade=false. Then create DaemonSet Beta resources after upgrading to 1.2. + * Client (kubectl) and server versions must match (both 1.1 or both 1.2) for any +DaemonSet-related operations. + * Behavior change: + * DaemonSet pods will be created on nodes with .spec.unschedulable=true and will +not be evicted from nodes whose Ready condition is false. + * Updates to the pod template are now permitted. To perform a rolling update of a +DaemonSet, update the pod template and then delete its pods one by one; they +will be replaced using the updated template. + * Spec change: + * DaemonSet’s [selector](http://kubernetes.io/docs/user-guide/labels/#label-selectors) is now more general (supports set-based selector; it only supported +equality-based selector in 1.1). + * Running against a secured etcd requires these flags to be passed to +kube-apiserver (instead of --etcd-config): + * --etcd-certfile, --etcd-keyfile (if using client cert auth) + * --etcd-cafile (if not using system roots) + * As part of preparation in 1.2 for adding support for protocol buffers (and the +direct YAML support in the API available today), the Content-Type and Accept +headers are now properly handled as per the HTTP spec. As a consequence, if +you had a client that was sending an invalid Content-Type or Accept header to +the API, in 1.2 you will either receive a 415 or 406 error. +The only client +this is known to affect is curl when you use -d with JSON but don't set a +content type, helpfully sends "application/x-www-urlencoded", which is not +correct. +Other client authors should double check that you are sending proper +accept and content type headers, or set no value (in which case JSON is the +default). +An example using curl: +<code>curl -H "Content-Type: application/json" -XPOST -d +'{"apiVersion":"v1","kind":"Namespace","metadata":{"name":"kube-system"}}' "[http://127.0.0.1:8080/api/v1/namespaces](http://127.0.0.1:8080/api/v1/namespaces)"</code> + * The version of InfluxDB is bumped from 0.8 to 0.9 which means storage schema +change. More details [here](https://docs.influxdata.com/influxdb/v0.9/administration/upgrading/). + * We have renamed “minions” to “nodes”. If you were specifying NUM\_MINIONS or +MINION\_SIZE to kube-up, you should now specify NUM\_NODES or NODE\_SIZE. + +### Known Issues + + * Paused deployments can't be resized and don't clean up old ReplicaSets. + * Minimum memory limit is 4MB. This is a docker limitation + * Minimum CPU limits is 10m. This is a Linux Kernel limitation + * “kubectl rollout undo” (i.e. rollback) will hang on paused deployments, because +paused deployments can’t be rolled back (this is expected), and the command +waits for rollback events to return the result. Users should use “kubectl +rollout resume” to resume a deployment before rolling back. + * “kubectl edit <list>” will open the editor multiple times, once for each +resource in the list. + * If you create HPA object using autoscaling/v1 API without specifying +targetCPUUtilizationPercentage and read it using kubectl it will print default +value as specified in extensions/v1beta1 (see details in [#23196](https://github.com/kubernetes/kubernetes/issues/23196)). + * If a node or kubelet crashes with a volume attached, the volume will remain +attached to that node. If that volume can only be attached to one node at a +time (GCE PDs attached in RW mode, for example), then the volume must be +manually detached before Kubernetes can attach it to other nodes. + * If a volume is already attached to a node any subsequent attempts to attach it +again (due to kubelet restart, for example) will fail. The volume must either +be manually detached first or the pods referencing it deleted (which would +trigger automatic volume detach). + * In very large clusters it may happen that a few nodes won’t register in API +server in a given timeframe for whatever reasons (networking issue, machine +failure, etc.). Normally when kube-up script will encounter even one NotReady +node it will fail, even though the cluster most likely will be working. We +added an environmental variable to kube-up ALLOWED\_NOTREADY\_NODES that +defines the number of nodes that if not Ready in time won’t cause kube-up +failure. + * “kubectl rolling-update” only supports Replication Controllers (it doesn’t +support Replica Sets). It’s recommended to use Deployment 1.2 with “kubectl +rollout” commands instead, if you want to rolling update Replica Sets. + * When live upgrading Kubelet to 1.2 without draining the pods running on the node, +the containers will be restarted by Kubelet (see details in [#23104](https://github.com/kubernetes/kubernetes/issues/23104)). + +#### Docker Known Issues + +##### 1.9.1 + + * Listing containers can be slow at times which will affect kubelet performance. +More information [here](https://github.com/docker/docker/issues/17720) + * Docker daemon restarts can fail. Docker checkpoints have to deleted between +restarts. More information [here](https://github.com/kubernetes/kubernetes/issues/20995) + * Pod IP allocation-related issues. Deleting the docker checkpoint prior to +restarting the daemon alleviates this issue, but hasn’t been verified to +completely eliminate the IP allocation issue. More information [here](https://github.com/kubernetes/kubernetes/issues/21523#issuecomment-191498969) + * Daemon becomes unresponsive (rarely) due to kernel deadlocks. More information [here](https://github.com/kubernetes/kubernetes/issues/21866#issuecomment-189492391) + +### Provider-specific Notes + +#### Various + + Core changes: + + * Support for load balancers with source ranges + +#### AWS + +Core changes: + + * Support for ELBs with complex configurations: better subnet selection with +multiple subnets, and internal ELBs + * Support for VPCs with private dns names + * Multiple fixes to EBS volume mounting code for robustness, and to support +mounting the full number of AWS recommended volumes. + * Multiple fixes to avoid hitting AWS rate limits, and to throttle if we do + * Support for the EC2 Container Registry (currently in us-east-1 only) + +With kube-up: + + * Automatically install updates on boot & reboot + * Use optimized image based on Jessie by default + * Add support for Ubuntu Wily + * Master is configured with automatic restart-on-failure, via CloudWatch + * Bootstrap reworked to be more similar to GCE; better supports reboots/restarts + * Use an elastic IP for the master by default + * Experimental support for node spot instances (set NODE\_SPOT\_PRICE=0.05) + +#### GCE + + * Ubuntu Trusty support added + +Please see the [Releases Page](https://github.com/kubernetes/kubernetes/releases) for older releases. + + +[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/CHANGELOG.md?pixel)]() diff --git a/vendor/k8s.io/kubernetes/CHANGELOG-1.3.md b/vendor/k8s.io/kubernetes/CHANGELOG-1.3.md new file mode 100644 index 000000000..2427031cc --- /dev/null +++ b/vendor/k8s.io/kubernetes/CHANGELOG-1.3.md @@ -0,0 +1,972 @@ +<!-- BEGIN MUNGE: GENERATED_TOC --> +- [v1.3.10](#v1310) + - [Downloads for v1.3.10](#downloads-for-v1310) + - [Client Binaries](#client-binaries) + - [Server Binaries](#server-binaries) + - [Changelog since v1.3.9](#changelog-since-v139) + - [Other notable changes](#other-notable-changes) +- [v1.3.9](#v139) + - [Downloads](#downloads) + - [Changelog since v1.3.8](#changelog-since-v138) + - [Other notable changes](#other-notable-changes-1) +- [v1.3.8](#v138) + - [Downloads](#downloads-1) + - [Changelog since v1.3.7](#changelog-since-v137) + - [Other notable changes](#other-notable-changes-2) +- [v1.3.7](#v137) + - [Downloads](#downloads-2) + - [Changelog since v1.3.6](#changelog-since-v136) + - [Other notable changes](#other-notable-changes-3) +- [v1.3.6](#v136) + - [Downloads](#downloads-3) + - [Changelog since v1.3.5](#changelog-since-v135) + - [Other notable changes](#other-notable-changes-4) +- [v1.3.5](#v135) + - [Downloads](#downloads-4) + - [Changelog since v1.3.4](#changelog-since-v134) + - [Other notable changes](#other-notable-changes-5) +- [v1.3.4](#v134) + - [Downloads](#downloads-5) + - [Changelog since v1.3.3](#changelog-since-v133) + - [Other notable changes](#other-notable-changes-6) +- [v1.3.3](#v133) + - [Downloads](#downloads-6) + - [Changelog since v1.3.2](#changelog-since-v132) + - [Other notable changes](#other-notable-changes-7) + - [Known Issues](#known-issues) +- [v1.3.2](#v132) + - [Downloads](#downloads-7) + - [Changelog since v1.3.1](#changelog-since-v131) + - [Other notable changes](#other-notable-changes-8) +- [v1.3.1](#v131) + - [Downloads](#downloads-8) + - [Changelog since v1.3.0](#changelog-since-v130) + - [Other notable changes](#other-notable-changes-9) +- [v1.3.0](#v130) + - [Downloads](#downloads-9) + - [Highlights](#highlights) + - [Known Issues and Important Steps before Upgrading](#known-issues-and-important-steps-before-upgrading) + - [ThirdPartyResource](#thirdpartyresource) + - [kubectl](#kubectl) + - [kubernetes Core Known Issues](#kubernetes-core-known-issues) + - [Docker runtime Known Issues](#docker-runtime-known-issues) + - [Rkt runtime Known Issues](#rkt-runtime-known-issues) + - [Provider-specific Notes](#provider-specific-notes) + - [Previous Releases Included in v1.3.0](#previous-releases-included-in-v130) +- [v1.3.0-beta.3](#v130-beta3) + - [Downloads](#downloads-10) + - [Changelog since v1.3.0-beta.2](#changelog-since-v130-beta2) + - [Action Required](#action-required) + - [Other notable changes](#other-notable-changes-10) +- [v1.3.0-beta.2](#v130-beta2) + - [Downloads](#downloads-11) + - [Changes since v1.3.0-beta.1](#changes-since-v130-beta1) + - [Experimental Features](#experimental-features) + - [Other notable changes](#other-notable-changes-11) +- [v1.3.0-beta.1](#v130-beta1) + - [Downloads](#downloads-12) + - [Changes since v1.3.0-alpha.5](#changes-since-v130-alpha5) + - [Action Required](#action-required-1) + - [Other notable changes](#other-notable-changes-12) +- [v1.3.0-alpha.5](#v130-alpha5) + - [Downloads](#downloads-13) + - [Changes since v1.3.0-alpha.4](#changes-since-v130-alpha4) + - [Action Required](#action-required-2) + - [Other notable changes](#other-notable-changes-13) +- [v1.3.0-alpha.4](#v130-alpha4) + - [Downloads](#downloads-14) + - [Changes since v1.3.0-alpha.3](#changes-since-v130-alpha3) + - [Action Required](#action-required-3) + - [Other notable changes](#other-notable-changes-14) +- [v1.3.0-alpha.3](#v130-alpha3) + - [Downloads](#downloads-15) + - [Changes since v1.3.0-alpha.2](#changes-since-v130-alpha2) + - [Action Required](#action-required-4) + - [Other notable changes](#other-notable-changes-15) +- [v1.3.0-alpha.2](#v130-alpha2) + - [Downloads](#downloads-16) + - [Changes since v1.3.0-alpha.1](#changes-since-v130-alpha1) + - [Other notable changes](#other-notable-changes-16) +- [v1.3.0-alpha.1](#v130-alpha1) + - [Downloads](#downloads-17) + - [Changes since v1.2.0](#changes-since-v120) + - [Action Required](#action-required-5) + - [Other notable changes](#other-notable-changes-17) +<!-- END MUNGE: GENERATED_TOC --> + +<!-- NEW RELEASE NOTES ENTRY --> + + +# v1.3.10 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.3/examples) + +## Downloads for v1.3.10 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.10/kubernetes.tar.gz) | `0f61517fbab1feafbe1024da0b88bfe16e61fed7e612285d70e3ecb53ce518cf` +[kubernetes-src.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.10/kubernetes-src.tar.gz) | `7b1be0dcc12ae1b0cb1928b770c1025755fd0858ce7520907bacda19e5bfa53f` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.10/kubernetes-client-darwin-386.tar.gz) | `64a7012411a506ff7825e7b9c64b50197917d6f4e1128ea0e7b30a121059da47` +[kubernetes-client-darwin-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.10/kubernetes-client-darwin-amd64.tar.gz) | `5d85843e643eaebe3e34e48810f4786430b5ecce915144e01ba2d8539aa77364` +[kubernetes-client-linux-386.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.10/kubernetes-client-linux-386.tar.gz) | `06d478c601b1d4aa1fc539e9120adbcbbd2fb370d062516f84a064e465d8eadc` +[kubernetes-client-linux-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.10/kubernetes-client-linux-amd64.tar.gz) | `fe571542482b8ba3ff94b9e5e9657f6ab4fc0feb8971930dc80b7ae2548d669b` +[kubernetes-client-linux-arm64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.10/kubernetes-client-linux-arm64.tar.gz) | `176b52d35150ca9f08a7e90e33e2839b7574afe350edf4fafa46745d77bb5aa4` +[kubernetes-client-linux-arm.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.10/kubernetes-client-linux-arm.tar.gz) | `1c3bf4ac1e4eb0e02f785db725efd490beaf06c8acd26d694971ba510b60a94d` +[kubernetes-client-linux-ppc64le.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.10/kubernetes-client-linux-ppc64le.tar.gz) | `172cd0af71fcba7c51e9476732dbe86ba251c03b1d74f912111e4e755be540ce` +[kubernetes-client-windows-386.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.10/kubernetes-client-windows-386.tar.gz) | `f2d2f82d7e285c98d8cc58a8a6e13a1122c9f60bb2c73e4cefe3555f963e56cd` +[kubernetes-client-windows-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.10/kubernetes-client-windows-amd64.tar.gz) | `ac0aa2b09dfeb8001e76f3aefe82c7bd2fda5bd0ef744ac3aed966b99c8dc8e5` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.10/kubernetes-server-linux-amd64.tar.gz) | `bf0d3924ff84c95c316fcb4b21876cc019bd648ca8ab87fd6b2712ccda30992b` +[kubernetes-server-linux-arm64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.10/kubernetes-server-linux-arm64.tar.gz) | `45e88d1c8edc17d7f1deab8d040a769d8647203c465d76763abb1ce445a98773` +[kubernetes-server-linux-arm.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.10/kubernetes-server-linux-arm.tar.gz) | `40ac46a265021615637f07d532cd563b4256dcf340a27c594bfd3501fe66b84c` +[kubernetes-server-linux-ppc64le.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.10/kubernetes-server-linux-ppc64le.tar.gz) | `faa5075ab3e6688666bbbb274fa55a825513ee082a3b17bcddb5b8f4fd6f9aa0` + +## Changelog since v1.3.9 + +### Other notable changes + +* gci: decouple from the built-in kubelet version ([#31367](https://github.com/kubernetes/kubernetes/pull/31367), [@Amey-D](https://github.com/Amey-D)) +* Bump GCE debian image to container-vm-v20161025 (CVE-2016-5195 Dirty… ([#35825](https://github.com/kubernetes/kubernetes/pull/35825), [@dchen1107](https://github.com/dchen1107)) +* Add RELEASE_INFRA_PUSH related code to support pushes from kubernetes/release. ([#28922](https://github.com/kubernetes/kubernetes/pull/28922), [@david-mcmahon](https://github.com/david-mcmahon)) + + + +# v1.3.9 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.3/examples) + +## Downloads + +binary | sha256 hash +------ | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.9/kubernetes.tar.gz) | `a994c732d2b852bbee55a78601d50d046323021a99b0801aea07dacf64c2c59a` + +## Changelog since v1.3.8 + +### Other notable changes + +* Test x509 intermediates correctly ([#34524](https://github.com/kubernetes/kubernetes/pull/34524), [@liggitt](https://github.com/liggitt)) +* Remove headers that are unnecessary for proxy target ([#34076](https://github.com/kubernetes/kubernetes/pull/34076), [@mbohlool](https://github.com/mbohlool)) + + + +# v1.3.8 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.3/examples) + +## Downloads + +binary | sha256 hash +------ | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.8/kubernetes.tar.gz) | `66cf72d8f07e2f700acfcb11536694e0d904483611ff154f34a8380c63720a8d` + +## Changelog since v1.3.7 + +### Other notable changes + +* AWS: fix volume device assignment race condition ([#31090](https://github.com/kubernetes/kubernetes/pull/31090), [@justinsb](https://github.com/justinsb)) + + + +# v1.3.7 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.3/examples) + +## Downloads + +binary | sha256 hash +------ | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.7/kubernetes.tar.gz) | `ad18566a09ff87b36107c2ea238fa5e20988d7a62c85df9c8598920679fec4a1` + +## Changelog since v1.3.6 + +### Other notable changes + +* AWS: Add ap-south-1 to list of known AWS regions ([#28428](https://github.com/kubernetes/kubernetes/pull/28428), [@justinsb](https://github.com/justinsb)) +* Back porting critical vSphere bug fixes to release 1.3 ([#31993](https://github.com/kubernetes/kubernetes/pull/31993), [@dagnello](https://github.com/dagnello)) +* Back port - Openstack provider allowing more than one service port for lbaas v2 ([#32001](https://github.com/kubernetes/kubernetes/pull/32001), [@dagnello](https://github.com/dagnello)) +* Fix a bug in kubelet hostport logic which flushes KUBE-MARK-MASQ iptables chain ([#32413](https://github.com/kubernetes/kubernetes/pull/32413), [@freehan](https://github.com/freehan)) +* Fixes the panic that occurs in the federation controller manager when registering a GKE cluster to the federation. Fixes issue [#30790](https://github.com/kubernetes/kubernetes/pull/30790). ([#30940](https://github.com/kubernetes/kubernetes/pull/30940), [@madhusudancs](https://github.com/madhusudancs)) + + + +# v1.3.6 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.3/examples) + +## Downloads + +binary | sha256 hash +------ | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.6/kubernetes.tar.gz) | `2db7ace2f72a2e162329a6dc969a5a158bb8c5d0f8054c5b1b2b1063aa22020d` + +## Changelog since v1.3.5 + +### Other notable changes + +* Addresses vSphere Volume Attach limits ([#29881](https://github.com/kubernetes/kubernetes/pull/29881), [@dagnello](https://github.com/dagnello)) +* Increase request timeout based on termination grace period ([#31275](https://github.com/kubernetes/kubernetes/pull/31275), [@dims](https://github.com/dims)) +* Skip safe to detach check if node API object no longer exists ([#30737](https://github.com/kubernetes/kubernetes/pull/30737), [@saad-ali](https://github.com/saad-ali)) +* Nodecontroller doesn't flip readiness on pods if kubeletVersion < 1.2.0 ([#30828](https://github.com/kubernetes/kubernetes/pull/30828), [@bprashanth](https://github.com/bprashanth)) +* Update cadvisor to v0.23.9 to fix a problem where attempting to gather container filesystem usage statistics could result in corrupted devicemapper thin pool storage for Docker. ([#30307](https://github.com/kubernetes/kubernetes/pull/30307), [@sjenning](https://github.com/sjenning)) + + + +# v1.3.5 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.3/examples) + +## Downloads + +binary | sha256 hash +------ | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.5/kubernetes.tar.gz) | `46be88ce927124f7cef7e280720b42c63051086880b7ebdba298b561dbe19f82` + +## Changelog since v1.3.4 + +### Other notable changes + +* Update Dashboard UI to version v1.1.1 ([#30273](https://github.com/kubernetes/kubernetes/pull/30273), [@bryk](https://github.com/bryk)) +* allow restricting subresource access ([#30001](https://github.com/kubernetes/kubernetes/pull/30001), [@deads2k](https://github.com/deads2k)) +* Fix PVC.Status.Capacity and AccessModes after binding ([#29982](https://github.com/kubernetes/kubernetes/pull/29982), [@jsafrane](https://github.com/jsafrane)) +* oidc authentication plugin: don't trim issuer URLs with trailing slashes ([#29860](https://github.com/kubernetes/kubernetes/pull/29860), [@ericchiang](https://github.com/ericchiang)) +* network/cni: Bring up the `lo` interface for rkt ([#29310](https://github.com/kubernetes/kubernetes/pull/29310), [@euank](https://github.com/euank)) +* Fixing kube-up for CVM masters. ([#29140](https://github.com/kubernetes/kubernetes/pull/29140), [@maisem](https://github.com/maisem)) + + + +# v1.3.4 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.3/examples) + +## Downloads + +binary | sha256 hash +------ | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.4/kubernetes.tar.gz) | `818acc1a8ba61cff434d4c0c5aa3d342d06e6907b565cfd8651b8cfcf3f0a1e6` + +## Changelog since v1.3.3 + +### Other notable changes + +* NetworkPolicy cherry-pick 1.3 ([#29556](https://github.com/kubernetes/kubernetes/pull/29556), [@caseydavenport](https://github.com/caseydavenport)) +* Allow mounts to run in parallel for non-attachable volumes ([#28939](https://github.com/kubernetes/kubernetes/pull/28939), [@saad-ali](https://github.com/saad-ali)) +* add enhanced volume and mount logging for block devices ([#24797](https://github.com/kubernetes/kubernetes/pull/24797), [@screeley44](https://github.com/screeley44)) +* kube-up: increase download timeout for kubernetes.tar.gz ([#29426](https://github.com/kubernetes/kubernetes/pull/29426), [@justinsb](https://github.com/justinsb)) +* Fix RBAC authorizer of ServiceAccount ([#29071](https://github.com/kubernetes/kubernetes/pull/29071), [@albatross0](https://github.com/albatross0)) +* Update docker engine-api to dea108d3aa ([#29144](https://github.com/kubernetes/kubernetes/pull/29144), [@ronnielai](https://github.com/ronnielai)) +* Assume volume is detached if node doesn't exist ([#29485](https://github.com/kubernetes/kubernetes/pull/29485), [@saad-ali](https://github.com/saad-ali)) +* Make PD E2E Tests Wait for Detach to Prevent Kernel Errors ([#29031](https://github.com/kubernetes/kubernetes/pull/29031), [@saad-ali](https://github.com/saad-ali)) +* Fix "PVC Volume not detached if pod deleted via namespace deletion" issue ([#29077](https://github.com/kubernetes/kubernetes/pull/29077), [@saad-ali](https://github.com/saad-ali)) +* append an abac rule for $KUBE_USER. ([#29164](https://github.com/kubernetes/kubernetes/pull/29164), [@cjcullen](https://github.com/cjcullen)) + + + +# v1.3.3 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.3/examples) + +## Downloads + +binary | sha256 hash +------ | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.3/kubernetes.tar.gz) | `a92a74a0d3f7d02d01ac2c8dfb5ee2e97b0485819e77b2110eb7c6b7c782478c` + +## Changelog since v1.3.2 + +### Other notable changes + +* Removing images with multiple tags ([#29316](https://github.com/kubernetes/kubernetes/pull/29316), [@ronnielai](https://github.com/ronnielai)) +* kubectl: don't display an empty list when trying to get a single resource that isn't found ([#28294](https://github.com/kubernetes/kubernetes/pull/28294), [@ncdc](https://github.com/ncdc)) +* Fix working_set calculation in kubelet ([#29154](https://github.com/kubernetes/kubernetes/pull/29154), [@vishh](https://github.com/vishh)) +* Don't delete affinity when endpoints are empty ([#28655](https://github.com/kubernetes/kubernetes/pull/28655), [@freehan](https://github.com/freehan)) +* GCE bring-up: Differentiate NODE_TAGS from NODE_INSTANCE_PREFIX ([#29141](https://github.com/kubernetes/kubernetes/pull/29141), [@zmerlynn](https://github.com/zmerlynn)) +* Fix logrotate config on GCI ([#29139](https://github.com/kubernetes/kubernetes/pull/29139), [@adityakali](https://github.com/adityakali)) +* Do not query the metadata server to find out if running on GCE. Retry metadata server query for gcr if running on gce. ([#28871](https://github.com/kubernetes/kubernetes/pull/28871), [@vishh](https://github.com/vishh)) +* Fix GPU resource validation ([#28743](https://github.com/kubernetes/kubernetes/pull/28743), [@therc](https://github.com/therc)) +* Scale kube-proxy conntrack limits by cores (new default behavior) ([#28876](https://github.com/kubernetes/kubernetes/pull/28876), [@thockin](https://github.com/thockin)) +* Don't recreate lb cloud resources on kcm restart ([#29082](https://github.com/kubernetes/kubernetes/pull/29082), [@bprashanth](https://github.com/bprashanth)) + +## Known Issues + +There are a number of known issues that have been found and are being worked on. +Please be aware of them as you test your workloads. + +* PVC Volume not detached if pod deleted via namespace deletion ([29051](https://github.com/kubernetes/kubernetes/issues/29051)) +* Google Compute Engine PD Detach fails if node no longer exists ([29358](https://github.com/kubernetes/kubernetes/issues/29358)) +* Mounting (only 'default-token') volume takes a long time when creating a batch of pods (parallelization issue) ([28616](https://github.com/kubernetes/kubernetes/issues/28616)) +* Error while tearing down pod, "device or resource busy" on service account secret ([28750](https://github.com/kubernetes/kubernetes/issues/28750)) + + + +# v1.3.2 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.3/examples) + +## Downloads + +binary | sha1 hash | md5 hash +------ | --------- | -------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.2/kubernetes.tar.gz) | `f46664d04dc2966c77d8727bba57f57b5f917572` | `1a5b0639941054585d0432dd5ce3abc7` + +## Changelog since v1.3.1 + +### Other notable changes + +* List all nodes and occupy cidr map before starting allocations ([#29062](https://github.com/kubernetes/kubernetes/pull/29062), [@bprashanth](https://github.com/bprashanth)) +* Fix watch cache filtering ([#28968](https://github.com/kubernetes/kubernetes/pull/28968), [@liggitt](https://github.com/liggitt)) +* Lock all possible kubecfg files at the beginning of ModifyConfig. ([#28232](https://github.com/kubernetes/kubernetes/pull/28232), [@cjcullen](https://github.com/cjcullen)) + + + +# v1.3.1 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.3.0/examples) + +## Downloads + +binary | sha1 hash | md5 hash +------ | --------- | -------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.1/kubernetes.tar.gz) | `5645b12beda22137204439de8260c62c9925f89b` | `ae6e9902ec70c1322d9a0a29ef385190` + +## Changelog since v1.3.0 + +### Other notable changes + +* Fix watch cache filtering ([#29046](https://github.com/kubernetes/kubernetes/pull/29046), [@liggitt](https://github.com/liggitt)) + + + +# v1.3.0 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.3/examples) + +## Downloads + +binary | sha1 hash | md5 hash +------ | --------- | -------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.0/kubernetes.tar.gz) | `88249c443d438666928379aa7fe865b389ed72ea` | `9270f001aef8c03ff5db63456ca9eecc` + +## Highlights + +* Authorization: + * **Alpha** RBAC authorization API group +* Federation + * federation api group is now **beta** + * Services from all federated clusters are now registered in Cloud DNS (AWS and GCP). +* Stateful Apps: + * **alpha** PetSets manage stateful apps + * **alpha** Init containers provide one-time setup for stateful containers +* Updating: + * Retry Pod/RC updates in kubectl rolling-update. + * Stop 'kubectl drain' deleting pods with local storage. + * Add `kubectl rollout status` +* Security/Auth + * L7 LB controller and disk attach controllers run on master, so nodes do not need those privileges. + * Setting TLS1.2 minimum + * `kubectl create secret tls` command + * Webhook Token Authenticator + * **beta** PodSecurityPolicy objects limits use of security-sensitive features by pods. +* Kubectl + * Display line number on JSON errors + * Add flag -t as shorthand for --tty +* Resources + * Improved node stability by *optionally* evicting pods upon memory pressure - [Design Doc](https://github.com/kubernetes/kubernetes/blob/release-1.3/docs/proposals/kubelet-eviction.md) + * **alpha**: NVIDIA GPU support ([#24836](https://github.com/kubernetes/kubernetes/pull/24836), [@therc](https://github.com/therc)) + * Adding loadBalancer services and nodeports services to quota system + +## Known Issues and Important Steps before Upgrading + +The following versions of Docker Engine are supported - *[v1.10](https://github.com/kubernetes/kubernetes/issues/19720)*, *[v1.11](https://github.com/kubernetes/kubernetes/issues/23397)* +Although *v1.9* is still compatible, we recommend upgrading to one of the supported versions. +All prior versions of docker will not be supported. + +#### ThirdPartyResource + +If you use ThirdPartyResource objects, they have moved from being namespaced-scoped to be cluster-scoped. Before upgrading to 1.3.0, export and delete any existing ThirdPartyResource objects using a 1.2.x client: + +kubectl get thirdpartyresource --all-namespaces -o yaml > tprs.yaml +kubectl delete -f tprs.yaml + +After upgrading to 1.3.0, re-register the third party resource objects at the root scope (using a 1.3 server and client): + +kubectl create -f tprs.yaml + +#### kubectl + +Kubectl flag `--container-port` flag is deprecated: it will be removed in the future, please use `--target-port` instead. + +#### kubernetes Core Known Issues + +- Kube Proxy crashes infrequently due to a docker bug ([#24000](https://github.com/docker/docker/issues/24000)) + - This issue can be resolved by restarting docker daemon +- CORS works only in insecure mode ([#24086](https://github.com/kubernetes/kubernetes/issues/24086)) +- Persistent volume claims gets added incorrectly after being deleted under stress. Happens very infrequently. ([#26082](https://github.com/kubernetes/kubernetes/issues/26082)) + +#### Docker runtime Known Issues + +- Kernel crash with Aufs storage driver on Debian Jessie ([#27885](https://github.com/kubernetes/kubernetes/issues/27885)) + - Consider running the *new* [kubernetes node problem detector](https://github.com/kubernetes/node-problem-detector) to identify this (and other) kernel issues automatically. + +- File descriptors are leaked in docker v1.11 ([#275](https://github.com/docker/containerd/issues/275)) +- Additional memory overhead per container in docker v1.11 ([#21737](https://github.com/docker/docker/issues/21737)) +- [List of upstream fixes](https://github.com/docker/docker/compare/v1.10.3...runcom:docker-1.10.3-stable) for docker v1.10 identified by RedHat + +#### Rkt runtime Known Issues + +- A detailed list of known issues can be found [here](https://github.com/kubernetes/kubernetes.github.io/blob/release-1.3/docs/getting-started-guides/rkt/notes.md) + +*More Instructions coming soon* + +## Provider-specific Notes + +* AWS + * Support for ap-northeast-2 region (Seoul) + * Allow cross-region image pulling with ECR + * More reliable kube-up/kube-down + * Enable ICMP Type 3 Code 4 for ELBs + * ARP caching fix + * Use /dev/xvdXX names + * ELB: + * ELB proxy protocol support + * mixed plaintext/encrypted ports support in ELBs + * SSL support for ELB listeners + * Allow VPC CIDR to be specified (experimental) + * Fix problems with >2 security groups +* GCP: + * Enable using gcr.io as a Docker registry mirror. + * Make bigger master root disks in GCE for large clusters. + * Change default clusterCIDRs from /16 to /14 allowing 1000 Node clusters by default. + * Allow Debian Jessie on GCE. + * Node problem detector addon pod detects and reports kernel deadlocks. +* OpenStack + * Provider added. +* VSphere: + * Provider updated. + +## Previous Releases Included in v1.3.0 + +- [v1.3.0-beta.3](CHANGELOG.md#v130-beta3) +- [v1.3.0-beta.2](CHANGELOG.md#v130-beta2) +- [v1.3.0-beta.1](CHANGELOG.md#v130-beta1) +- [v1.3.0-alpha.5](CHANGELOG.md#v130-alpha5) +- [v1.3.0-alpha.4](CHANGELOG.md#v130-alpha4) +- [v1.3.0-alpha.3](CHANGELOG.md#v130-alpha3) +- [v1.3.0-alpha.2](CHANGELOG.md#v130-alpha2) +- [v1.3.0-alpha.1](CHANGELOG.md#v130-alpha1) + + + +# v1.3.0-beta.3 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.3/examples) + +## Downloads + +binary | sha1 hash | md5 hash +------ | --------- | -------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.0-beta.3/kubernetes.tar.gz) | `9d18964a294f356bfdc841957dcad8ff35ed909c` | `ee5fcdf86645135ed132663967876dd6` + +## Changelog since v1.3.0-beta.2 + +### Action Required + +* [kubelet] Allow opting out of automatic cloud provider detection in kubelet. By default kubelet will auto-detect cloud providers ([#28258](https://github.com/kubernetes/kubernetes/pull/28258), [@vishh](https://github.com/vishh)) +* If you use one of the kube-dns replication controller manifest in `cluster/saltbase/salt/kube-dns`, i.e. `cluster/saltbase/salt/kube-dns/{skydns-rc.yaml.base,skydns-rc.yaml.in}`, either substitute one of `__PILLAR__FEDERATIONS__DOMAIN__MAP__` or `{{ pillar['federations_domain_map'] }}` with the corresponding federation name to domain name value or remove them if you do not support cluster federation at this time. If you plan to substitute the parameter with its value, here is an example for `{{ pillar['federations_domain_map'] }` ([#28132](https://github.com/kubernetes/kubernetes/pull/28132), [@madhusudancs](https://github.com/madhusudancs)) + * pillar['federations_domain_map'] = "- --federations=myfederation=federation.test" + * where `myfederation` is the name of the federation and `federation.test` is the domain name registered for the federation. +* federation: Upgrading the groupversion to v1beta1 ([#28186](https://github.com/kubernetes/kubernetes/pull/28186), [@nikhiljindal](https://github.com/nikhiljindal)) +* Set Dashboard UI version to v1.1.0 ([#27869](https://github.com/kubernetes/kubernetes/pull/27869), [@bryk](https://github.com/bryk)) + +### Other notable changes + +* Build: Add KUBE_GCS_RELEASE_BUCKET_MIRROR option to push-ci-build.sh ([#28172](https://github.com/kubernetes/kubernetes/pull/28172), [@zmerlynn](https://github.com/zmerlynn)) +* Image GC logic should compensate for reserved blocks ([#27996](https://github.com/kubernetes/kubernetes/pull/27996), [@ronnielai](https://github.com/ronnielai)) +* Bump minimum API version for docker to 1.21 ([#27208](https://github.com/kubernetes/kubernetes/pull/27208), [@yujuhong](https://github.com/yujuhong)) +* Adding lock files for kubeconfig updating ([#28034](https://github.com/kubernetes/kubernetes/pull/28034), [@krousey](https://github.com/krousey)) +* federation service controller: fixing the logic to update DNS records ([#27999](https://github.com/kubernetes/kubernetes/pull/27999), [@quinton-hoole](https://github.com/quinton-hoole)) +* federation: Updating KubeDNS to try finding a local service first for federation query ([#27708](https://github.com/kubernetes/kubernetes/pull/27708), [@nikhiljindal](https://github.com/nikhiljindal)) +* Support journal logs in fluentd-gcp on GCI ([#27981](https://github.com/kubernetes/kubernetes/pull/27981), [@a-robinson](https://github.com/a-robinson)) +* Copy and display source location prominently on Kubernetes instances ([#27985](https://github.com/kubernetes/kubernetes/pull/27985), [@maisem](https://github.com/maisem)) +* Federation e2e support for AWS ([#27791](https://github.com/kubernetes/kubernetes/pull/27791), [@colhom](https://github.com/colhom)) +* Copy and display source location prominently on Kubernetes instances ([#27840](https://github.com/kubernetes/kubernetes/pull/27840), [@zmerlynn](https://github.com/zmerlynn)) +* AWS/GCE: Spread PetSet volume creation across zones, create GCE volumes in non-master zones ([#27553](https://github.com/kubernetes/kubernetes/pull/27553), [@justinsb](https://github.com/justinsb)) +* GCE provider: Create TargetPool with 200 instances, then update with rest ([#27829](https://github.com/kubernetes/kubernetes/pull/27829), [@zmerlynn](https://github.com/zmerlynn)) +* Add sources to server tarballs. ([#27830](https://github.com/kubernetes/kubernetes/pull/27830), [@david-mcmahon](https://github.com/david-mcmahon)) +* Retry Pod/RC updates in kubectl rolling-update ([#27509](https://github.com/kubernetes/kubernetes/pull/27509), [@janetkuo](https://github.com/janetkuo)) +* AWS kube-up: Authorize route53 in the IAM policy ([#27794](https://github.com/kubernetes/kubernetes/pull/27794), [@justinsb](https://github.com/justinsb)) +* Allow conformance tests to run on non-GCE providers ([#26932](https://github.com/kubernetes/kubernetes/pull/26932), [@aaronlevy](https://github.com/aaronlevy)) +* AWS kube-up: move to Docker 1.11.2 ([#27676](https://github.com/kubernetes/kubernetes/pull/27676), [@justinsb](https://github.com/justinsb)) +* Fixed an issue that Deployment may be scaled down further than allowed by maxUnavailable when minReadySeconds is set. ([#27728](https://github.com/kubernetes/kubernetes/pull/27728), [@janetkuo](https://github.com/janetkuo)) + + + +# v1.3.0-beta.2 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.3/examples) + +## Downloads + +binary | sha1 hash | md5 hash +------ | --------- | -------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.0-beta.2/kubernetes.tar.gz) | `9c95762970b943d6c6547f0841c1e5471148b0e3` | `dc9e8560f24459b2313317b15910bee7` + +## Changes since v1.3.0-beta.1 + +### Experimental Features + +* Init containers enable pod authors to perform tasks before their normal containers start. Each init container is started in order, and failing containers will prevent the application from starting. ([#23666](https://github.com/kubernetes/kubernetes/pull/23666), [@smarterclayton](https://github.com/smarterclayton)) + +### Other notable changes + +* GCE provider: Limit Filter calls to regexps rather than large blobs ([#27741](https://github.com/kubernetes/kubernetes/pull/27741), [@zmerlynn](https://github.com/zmerlynn)) +* Show LASTSEEN, the sorting key, as the first column in `kubectl get event` output ([#27549](https://github.com/kubernetes/kubernetes/pull/27549), [@therc](https://github.com/therc)) +* GCI: fix kubectl permission issue [#27643](https://github.com/kubernetes/kubernetes/pull/27643) ([#27740](https://github.com/kubernetes/kubernetes/pull/27740), [@andyzheng0831](https://github.com/andyzheng0831)) +* Add federation api and cm servers to hyperkube ([#27586](https://github.com/kubernetes/kubernetes/pull/27586), [@colhom](https://github.com/colhom)) +* federation: Creating kubeconfig files to be used for creating secrets for clusters on aws and gke ([#27332](https://github.com/kubernetes/kubernetes/pull/27332), [@nikhiljindal](https://github.com/nikhiljindal)) +* AWS: Enable ICMP Type 3 Code 4 for ELBs ([#27677](https://github.com/kubernetes/kubernetes/pull/27677), [@justinsb](https://github.com/justinsb)) +* Bumped Heapster to v1.1.0. ([#27542](https://github.com/kubernetes/kubernetes/pull/27542), [@piosz](https://github.com/piosz)) + * More details about the release https://github.com/kubernetes/heapster/releases/tag/v1.1.0 +* Deleting federation-push.sh ([#27400](https://github.com/kubernetes/kubernetes/pull/27400), [@nikhiljindal](https://github.com/nikhiljindal)) +* Validate-cluster finishes shortly after at most ALLOWED_NOTREADY_NODE… ([#26778](https://github.com/kubernetes/kubernetes/pull/26778), [@gmarek](https://github.com/gmarek)) +* AWS kube-down: Issue warning if VPC not found ([#27518](https://github.com/kubernetes/kubernetes/pull/27518), [@justinsb](https://github.com/justinsb)) +* gce/kube-down: Parallelize IGM deletion, batch more ([#27302](https://github.com/kubernetes/kubernetes/pull/27302), [@zmerlynn](https://github.com/zmerlynn)) +* Enable dynamic allocation of heapster/eventer cpu request/limit ([#27185](https://github.com/kubernetes/kubernetes/pull/27185), [@gmarek](https://github.com/gmarek)) +* 'kubectl describe pv' now shows events ([#27431](https://github.com/kubernetes/kubernetes/pull/27431), [@jsafrane](https://github.com/jsafrane)) +* AWS kube-up: set net.ipv4.neigh.default.gc_thresh1=0 to avoid ARP over-caching ([#27682](https://github.com/kubernetes/kubernetes/pull/27682), [@justinsb](https://github.com/justinsb)) +* AWS volumes: Use /dev/xvdXX names with EC2 ([#27628](https://github.com/kubernetes/kubernetes/pull/27628), [@justinsb](https://github.com/justinsb)) +* Add a test config variable to specify desired Docker version to run on GCI. ([#26813](https://github.com/kubernetes/kubernetes/pull/26813), [@wonderfly](https://github.com/wonderfly)) +* Check for thin_is binary in path for devicemapper when using ThinPoolWatcher and fix uint64 overflow issue for CPU stats ([#27591](https://github.com/kubernetes/kubernetes/pull/27591), [@dchen1107](https://github.com/dchen1107)) +* Change default value of deleting-pods-burst to 1 ([#27606](https://github.com/kubernetes/kubernetes/pull/27606), [@gmarek](https://github.com/gmarek)) +* MESOS: fix race condition in contrib/mesos/pkg/queue/delay ([#24916](https://github.com/kubernetes/kubernetes/pull/24916), [@jdef](https://github.com/jdef)) +* including federation binaries in the list of images we push during release ([#27396](https://github.com/kubernetes/kubernetes/pull/27396), [@nikhiljindal](https://github.com/nikhiljindal)) +* fix updatePod() of RS and RC controllers ([#27415](https://github.com/kubernetes/kubernetes/pull/27415), [@caesarxuchao](https://github.com/caesarxuchao)) +* Change default value of deleting-pods-burst to 1 ([#27422](https://github.com/kubernetes/kubernetes/pull/27422), [@gmarek](https://github.com/gmarek)) +* A new volume manager was introduced in kubelet that synchronizes volume mount/unmount (and attach/detach, if attach/detach controller is not enabled). ([#26801](https://github.com/kubernetes/kubernetes/pull/26801), [@saad-ali](https://github.com/saad-ali)) + * This eliminates the race conditions between the pod creation loop and the orphaned volumes loops. It also removes the unmount/detach from the `syncPod()` path so volume clean up never blocks the `syncPod` loop. + + + +# v1.3.0-beta.1 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.3/examples) + +## Downloads + +binary | sha1 hash | md5 hash +------ | --------- | -------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.0-beta.1/kubernetes.tar.gz) | `2b54995ee8f52d78dc31c3d7291e8dfa5c809fe7` | `f1022a84c3441cae4ebe1d295470be8f` + +## Changes since v1.3.0-alpha.5 + +### Action Required + +* Fixing logic to generate ExternalHost in genericapiserver ([#26796](https://github.com/kubernetes/kubernetes/pull/26796), [@nikhiljindal](https://github.com/nikhiljindal)) +* federation: Updating federation-controller-manager to use secret to get federation-apiserver's kubeconfig ([#26819](https://github.com/kubernetes/kubernetes/pull/26819), [@nikhiljindal](https://github.com/nikhiljindal)) + +### Other notable changes + +* federation: fix dns provider initialization issues ([#27252](https://github.com/kubernetes/kubernetes/pull/27252), [@mfanjie](https://github.com/mfanjie)) +* Updating federation up scripts to work in non e2e setup ([#27260](https://github.com/kubernetes/kubernetes/pull/27260), [@nikhiljindal](https://github.com/nikhiljindal)) +* version bump for gci to milestone 53 ([#27210](https://github.com/kubernetes/kubernetes/pull/27210), [@adityakali](https://github.com/adityakali)) +* kubectl apply: retry applying a patch if a version conflict error is encountered ([#26557](https://github.com/kubernetes/kubernetes/pull/26557), [@AdoHe](https://github.com/AdoHe)) +* Revert "Wait for arc.getArchive() to complete before running tests" ([#27130](https://github.com/kubernetes/kubernetes/pull/27130), [@pwittrock](https://github.com/pwittrock)) +* ResourceQuota BestEffort scope aligned with Pod level QoS ([#26969](https://github.com/kubernetes/kubernetes/pull/26969), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* The AWS cloudprovider will cache results from DescribeInstances() if the set of nodes hasn't changed ([#26900](https://github.com/kubernetes/kubernetes/pull/26900), [@therc](https://github.com/therc)) +* GCE provider: Log full contents of long operations ([#26962](https://github.com/kubernetes/kubernetes/pull/26962), [@zmerlynn](https://github.com/zmerlynn)) +* Fix system container detection in kubelet on systemd. ([#26586](https://github.com/kubernetes/kubernetes/pull/26586), [@derekwaynecarr](https://github.com/derekwaynecarr)) + * This fixed environments where CPU and Memory Accounting were not enabled on the unit that launched the kubelet or docker from reporting the root cgroup when monitoring usage stats for those components. +* New default horizontalpodautoscaler/v1 generator for kubectl autoscale. ([#26775](https://github.com/kubernetes/kubernetes/pull/26775), [@piosz](https://github.com/piosz)) + * Use autoscaling/v1 in kubectl by default. +* federation: Adding dnsprovider flags to federation-controller-manager ([#27158](https://github.com/kubernetes/kubernetes/pull/27158), [@nikhiljindal](https://github.com/nikhiljindal)) +* federation service controller: fixing a bug so that existing services are created in newly registered clusters ([#27028](https://github.com/kubernetes/kubernetes/pull/27028), [@mfanjie](https://github.com/mfanjie)) +* Rename environment variables (KUBE_)ENABLE_NODE_AUTOSCALER to (KUBE_)ENABLE_CLUSTER_AUTOSCALER. ([#27117](https://github.com/kubernetes/kubernetes/pull/27117), [@mwielgus](https://github.com/mwielgus)) +* support for mounting local-ssds on GCI ([#27143](https://github.com/kubernetes/kubernetes/pull/27143), [@adityakali](https://github.com/adityakali)) +* AWS: support mixed plaintext/encrypted ports in ELBs via service.beta.kubernetes.io/aws-load-balancer-ssl-ports annotation ([#26976](https://github.com/kubernetes/kubernetes/pull/26976), [@therc](https://github.com/therc)) +* Updating e2e docs with instructions on running federation tests ([#27072](https://github.com/kubernetes/kubernetes/pull/27072), [@colhom](https://github.com/colhom)) +* LBaaS v2 Support for Openstack Cloud Provider Plugin ([#25987](https://github.com/kubernetes/kubernetes/pull/25987), [@dagnello](https://github.com/dagnello)) +* GCI: add support for network plugin ([#27027](https://github.com/kubernetes/kubernetes/pull/27027), [@andyzheng0831](https://github.com/andyzheng0831)) +* Bump cAdvisor to v0.23.3 ([#27065](https://github.com/kubernetes/kubernetes/pull/27065), [@timstclair](https://github.com/timstclair)) +* Stop 'kubectl drain' deleting pods with local storage. ([#26667](https://github.com/kubernetes/kubernetes/pull/26667), [@mml](https://github.com/mml)) +* Networking e2es: Wait for all nodes to be schedulable in kubeproxy and networking tests ([#27008](https://github.com/kubernetes/kubernetes/pull/27008), [@zmerlynn](https://github.com/zmerlynn)) +* change clientset of service controller to versioned ([#26694](https://github.com/kubernetes/kubernetes/pull/26694), [@mfanjie](https://github.com/mfanjie)) +* Use gcr.io as a Docker registry mirror when setting up a cluster in GCE. ([#25841](https://github.com/kubernetes/kubernetes/pull/25841), [@ojarjur](https://github.com/ojarjur)) +* correction on rbd volume object and defaults ([#25490](https://github.com/kubernetes/kubernetes/pull/25490), [@rootfs](https://github.com/rootfs)) +* Bump GCE debian image to container-v1-3-v20160604 ([#26851](https://github.com/kubernetes/kubernetes/pull/26851), [@zmerlynn](https://github.com/zmerlynn)) +* Option to enable http2 on client connections. ([#25280](https://github.com/kubernetes/kubernetes/pull/25280), [@timothysc](https://github.com/timothysc)) +* kubectl get ingress output remove rules ([#26684](https://github.com/kubernetes/kubernetes/pull/26684), [@AdoHe](https://github.com/AdoHe)) +* AWS kube-up: Remove SecurityContextDeny admission controller (to mirror GCE) ([#25381](https://github.com/kubernetes/kubernetes/pull/25381), [@zquestz](https://github.com/zquestz)) +* Fix third party ([#25894](https://github.com/kubernetes/kubernetes/pull/25894), [@brendandburns](https://github.com/brendandburns)) +* AWS Route53 dnsprovider ([#26049](https://github.com/kubernetes/kubernetes/pull/26049), [@quinton-hoole](https://github.com/quinton-hoole)) +* GCI/Trusty: support the Docker registry mirror ([#26745](https://github.com/kubernetes/kubernetes/pull/26745), [@andyzheng0831](https://github.com/andyzheng0831)) +* Kubernetes v1.3 introduces a new Attach/Detach Controller. This controller manages attaching and detaching of volumes on-behalf of nodes. ([#26351](https://github.com/kubernetes/kubernetes/pull/26351), [@saad-ali](https://github.com/saad-ali)) + * This ensures that attachment and detachment of volumes is independent of any single nodes’ availability. Meaning, if a node or kubelet becomes unavailable for any reason, the volumes attached to that node will be detached so they are free to be attached to other nodes. + * Specifically the new controller watches the API server for scheduled pods. It processes each pod and ensures that any volumes that implement the volume Attacher interface are attached to the node their pod is scheduled to. + * When a pod is deleted, the controller waits for the volume to be safely unmounted by kubelet. It does this by waiting for the volume to no longer be present in the nodes Node.Status.VolumesInUse list. If the volume is not safely unmounted by kubelet within a pre-configured duration (3 minutes in Kubernetes v1.3), the controller unilaterally detaches the volume (this prevents volumes from getting stranded on nodes that become unavailable). + * In order to remain backwards compatible, the new controller only manages attach/detach of volumes that are scheduled to nodes that opt-in to controller management. Nodes running v1.3 or higher of Kubernetes opt-in to controller management by default by setting the "volumes.kubernetes.io/controller-managed-attach-detach" annotation on the Node object on startup. This behavior is gated by a new kubelet flag, "enable-controller-attach-detach,” (default true). + * In order to safely upgrade an existing Kubernetes cluster without interruption of volume attach/detach logic: + * First upgrade the master to Kubernetes v1.3. + * This will start the new attach/detach controller. + * The new controller will initially ignore volumes for all nodes since they lack the "volumes.kubernetes.io/controller-managed-attach-detach" annotation. + * Then upgrade nodes to Kubernetes v1.3. + * As nodes are upgraded, they will automatically, by default, opt-in to attach/detach controller management, which will cause the controller to start managing attaches/detaches for volumes that get scheduled to those nodes. +* Added DNS Reverse Record logic for service IPs ([#26226](https://github.com/kubernetes/kubernetes/pull/26226), [@ArtfulCoder](https://github.com/ArtfulCoder)) +* read gluster log to surface glusterfs plugin errors properly in describe events ([#24808](https://github.com/kubernetes/kubernetes/pull/24808), [@screeley44](https://github.com/screeley44)) + + + +# v1.3.0-alpha.5 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/master/examples) + +## Downloads + +binary | sha1 hash | md5 hash +------ | --------- | -------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.0-alpha.5/kubernetes.tar.gz) | `724bf5a4437ca9dc75d9297382f47a179e8dc5a6` | `2a8b4a5297df3007fce69f1e344fd87e` + +## Changes since v1.3.0-alpha.4 + +### Action Required + +* Add direct serializer ([#26251](https://github.com/kubernetes/kubernetes/pull/26251), [@caesarxuchao](https://github.com/caesarxuchao)) +* Add a NodeCondition "NetworkUnavailable" to prevent scheduling onto a node until the routes have been created ([#26415](https://github.com/kubernetes/kubernetes/pull/26415), [@wojtek-t](https://github.com/wojtek-t)) +* Add garbage collector into kube-controller-manager ([#26341](https://github.com/kubernetes/kubernetes/pull/26341), [@caesarxuchao](https://github.com/caesarxuchao)) +* Add orphaning finalizer logic to GC ([#25599](https://github.com/kubernetes/kubernetes/pull/25599), [@caesarxuchao](https://github.com/caesarxuchao)) +* GCI-backed masters mount srv/kubernetes and srv/sshproxy in the right place ([#26238](https://github.com/kubernetes/kubernetes/pull/26238), [@ihmccreery](https://github.com/ihmccreery)) +* Updaing QoS policy to be at the pod level ([#14943](https://github.com/kubernetes/kubernetes/pull/14943), [@vishh](https://github.com/vishh)) +* add CIDR allocator for NodeController ([#19242](https://github.com/kubernetes/kubernetes/pull/19242), [@mqliang](https://github.com/mqliang)) +* Adding garbage collector controller ([#24509](https://github.com/kubernetes/kubernetes/pull/24509), [@caesarxuchao](https://github.com/caesarxuchao)) + +### Other notable changes + +* Fix a bug with pluralization of third party resources ([#25374](https://github.com/kubernetes/kubernetes/pull/25374), [@brendandburns](https://github.com/brendandburns)) +* Run l7 controller on master ([#26048](https://github.com/kubernetes/kubernetes/pull/26048), [@bprashanth](https://github.com/bprashanth)) +* AWS: ELB proxy protocol support via annotation service.beta.kubernetes.io/aws-load-balancer-proxy-protocol ([#24569](https://github.com/kubernetes/kubernetes/pull/24569), [@williamsandrew](https://github.com/williamsandrew)) +* kubectl run --restart=Never creates pods ([#25253](https://github.com/kubernetes/kubernetes/pull/25253), [@soltysh](https://github.com/soltysh)) +* Add LabelSelector to PersistentVolumeClaimSpec ([#25917](https://github.com/kubernetes/kubernetes/pull/25917), [@pmorie](https://github.com/pmorie)) +* Removed metrics api group ([#26073](https://github.com/kubernetes/kubernetes/pull/26073), [@piosz](https://github.com/piosz)) +* Fixed check in kubectl autoscale: cpu consumption can be higher than 100%. ([#26162](https://github.com/kubernetes/kubernetes/pull/26162), [@jszczepkowski](https://github.com/jszczepkowski)) +* Add support for 3rd party objects to kubectl label ([#24882](https://github.com/kubernetes/kubernetes/pull/24882), [@brendandburns](https://github.com/brendandburns)) +* Move shell completion generation into 'kubectl completion' command ([#23801](https://github.com/kubernetes/kubernetes/pull/23801), [@sttts](https://github.com/sttts)) +* Fix strategic merge diff list diff bug ([#26418](https://github.com/kubernetes/kubernetes/pull/26418), [@AdoHe](https://github.com/AdoHe)) +* Setting TLS1.2 minimum because TLS1.0 and TLS1.1 are vulnerable ([#26169](https://github.com/kubernetes/kubernetes/pull/26169), [@victorgp](https://github.com/victorgp)) +* Kubelet: Periodically reporting image pulling progress in log ([#26145](https://github.com/kubernetes/kubernetes/pull/26145), [@Random-Liu](https://github.com/Random-Liu)) +* Federation service controller is one key component of federation controller manager, it watches federation service, creates/updates services to all registered clusters, and update DNS records to global DNS server. ([#26034](https://github.com/kubernetes/kubernetes/pull/26034), [@mfanjie](https://github.com/mfanjie)) +* Stabilize map order in kubectl describe ([#26046](https://github.com/kubernetes/kubernetes/pull/26046), [@timoreimann](https://github.com/timoreimann)) +* Google Cloud DNS dnsprovider - replacement for [#25389](https://github.com/kubernetes/kubernetes/pull/25389) ([#26020](https://github.com/kubernetes/kubernetes/pull/26020), [@quinton-hoole](https://github.com/quinton-hoole)) +* Fix system container detection in kubelet on systemd. ([#25982](https://github.com/kubernetes/kubernetes/pull/25982), [@derekwaynecarr](https://github.com/derekwaynecarr)) + * This fixed environments where CPU and Memory Accounting were not enabled on the unit + * that launched the kubelet or docker from reporting the root cgroup when + * monitoring usage stats for those components. +* Added pods-per-core to kubelet. [#25762](https://github.com/kubernetes/kubernetes/pull/25762) ([#25813](https://github.com/kubernetes/kubernetes/pull/25813), [@rrati](https://github.com/rrati)) +* promote sourceRange into service spec ([#25826](https://github.com/kubernetes/kubernetes/pull/25826), [@freehan](https://github.com/freehan)) +* kube-controller-manager: Add configure-cloud-routes option ([#25614](https://github.com/kubernetes/kubernetes/pull/25614), [@justinsb](https://github.com/justinsb)) +* kubelet: reading cloudinfo from cadvisor ([#21373](https://github.com/kubernetes/kubernetes/pull/21373), [@enoodle](https://github.com/enoodle)) +* Disable cAdvisor event storage by default ([#24771](https://github.com/kubernetes/kubernetes/pull/24771), [@timstclair](https://github.com/timstclair)) +* Remove docker-multinode ([#26031](https://github.com/kubernetes/kubernetes/pull/26031), [@luxas](https://github.com/luxas)) +* nodecontroller: Fix log message on successful update ([#26207](https://github.com/kubernetes/kubernetes/pull/26207), [@zmerlynn](https://github.com/zmerlynn)) +* remove deprecated generated typed clients ([#26336](https://github.com/kubernetes/kubernetes/pull/26336), [@caesarxuchao](https://github.com/caesarxuchao)) +* Kubenet host-port support through iptables ([#25604](https://github.com/kubernetes/kubernetes/pull/25604), [@freehan](https://github.com/freehan)) +* Add metrics support for a GCE PD, EC2 EBS & Azure File volumes ([#25852](https://github.com/kubernetes/kubernetes/pull/25852), [@vishh](https://github.com/vishh)) +* Bump cAdvisor to v0.23.2 - See [changelog](https://github.com/google/cadvisor/blob/master/CHANGELOG.md) for details ([#25914](https://github.com/kubernetes/kubernetes/pull/25914), [@timstclair](https://github.com/timstclair)) +* Alpha version of "Role Based Access Control" API. ([#25634](https://github.com/kubernetes/kubernetes/pull/25634), [@ericchiang](https://github.com/ericchiang)) +* Add Seccomp API ([#25324](https://github.com/kubernetes/kubernetes/pull/25324), [@jfrazelle](https://github.com/jfrazelle)) +* AWS: Fix long-standing bug in stringSetToPointers ([#26331](https://github.com/kubernetes/kubernetes/pull/26331), [@therc](https://github.com/therc)) +* Add dnsmasq as a DNS cache in kube-dns pod ([#26114](https://github.com/kubernetes/kubernetes/pull/26114), [@ArtfulCoder](https://github.com/ArtfulCoder)) +* routecontroller: Add wait.NonSlidingUntil, use it ([#26301](https://github.com/kubernetes/kubernetes/pull/26301), [@zmerlynn](https://github.com/zmerlynn)) +* Attempt 2: Bump GCE containerVM to container-v1-3-v20160517 (Docker 1.11.1) again. ([#26001](https://github.com/kubernetes/kubernetes/pull/26001), [@dchen1107](https://github.com/dchen1107)) +* Downward API implementation for resources limits and requests ([#24179](https://github.com/kubernetes/kubernetes/pull/24179), [@aveshagarwal](https://github.com/aveshagarwal)) +* GCE clusters start using GCI as the default OS image for masters ([#26197](https://github.com/kubernetes/kubernetes/pull/26197), [@wonderfly](https://github.com/wonderfly)) +* Add a 'kubectl clusterinfo dump' option ([#20672](https://github.com/kubernetes/kubernetes/pull/20672), [@brendandburns](https://github.com/brendandburns)) +* Fixing heapster memory requirements. ([#26109](https://github.com/kubernetes/kubernetes/pull/26109), [@Q-Lee](https://github.com/Q-Lee)) +* Handle federated service name lookups in kube-dns. ([#25727](https://github.com/kubernetes/kubernetes/pull/25727), [@madhusudancs](https://github.com/madhusudancs)) +* Support sort-by timestamp in kubectl get ([#25600](https://github.com/kubernetes/kubernetes/pull/25600), [@janetkuo](https://github.com/janetkuo)) +* vSphere Volume Plugin Implementation ([#24947](https://github.com/kubernetes/kubernetes/pull/24947), [@abithap](https://github.com/abithap)) +* ResourceQuota controller uses rate limiter to prevent hot-loops in error situations ([#25748](https://github.com/kubernetes/kubernetes/pull/25748), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* Fix hyperkube flag parsing ([#25512](https://github.com/kubernetes/kubernetes/pull/25512), [@colhom](https://github.com/colhom)) +* Add a kubectl create secret tls command ([#24719](https://github.com/kubernetes/kubernetes/pull/24719), [@bprashanth](https://github.com/bprashanth)) +* Introduce a new add-on pod NodeProblemDetector. ([#25986](https://github.com/kubernetes/kubernetes/pull/25986), [@Random-Liu](https://github.com/Random-Liu)) + * NodeProblemDetector is a DaemonSet running on each node, monitoring node health and reporting + * node problems as NodeCondition and Event. Currently it already supports kernel log monitoring, and + * will support more problem detection in the future. It is enabled by default on gce now. +* Handle cAdvisor partial failures ([#25933](https://github.com/kubernetes/kubernetes/pull/25933), [@timstclair](https://github.com/timstclair)) +* Use SkyDNS as a library for a more integrated kube DNS ([#23930](https://github.com/kubernetes/kubernetes/pull/23930), [@ArtfulCoder](https://github.com/ArtfulCoder)) +* Introduce node memory pressure condition to scheduler ([#25531](https://github.com/kubernetes/kubernetes/pull/25531), [@ingvagabund](https://github.com/ingvagabund)) +* Fix detection of docker cgroup on RHEL ([#25907](https://github.com/kubernetes/kubernetes/pull/25907), [@ncdc](https://github.com/ncdc)) +* Kubelet evicts pods when available memory falls below configured eviction thresholds ([#25772](https://github.com/kubernetes/kubernetes/pull/25772), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* Use protobufs by default to communicate with apiserver (still store JSONs in etcd) ([#25738](https://github.com/kubernetes/kubernetes/pull/25738), [@wojtek-t](https://github.com/wojtek-t)) +* Implement NetworkPolicy v1beta1 API object / client support. ([#25638](https://github.com/kubernetes/kubernetes/pull/25638), [@caseydavenport](https://github.com/caseydavenport)) +* Only expose top N images in `NodeStatus` ([#25328](https://github.com/kubernetes/kubernetes/pull/25328), [@resouer](https://github.com/resouer)) +* Extend secrets volumes with path control ([#25285](https://github.com/kubernetes/kubernetes/pull/25285), [@ingvagabund](https://github.com/ingvagabund)) +* With this PR, kubectl and other RestClient's using the AuthProvider framework can make OIDC authenticated requests, and, if there is a refresh token present, the tokens will be refreshed as needed. ([#25270](https://github.com/kubernetes/kubernetes/pull/25270), [@bobbyrullo](https://github.com/bobbyrullo)) +* Make addon-manager cross-platform and use it with hyperkube ([#25631](https://github.com/kubernetes/kubernetes/pull/25631), [@luxas](https://github.com/luxas)) +* kubelet: Optionally, have kubelet exit if lock file contention is observed, using --exit-on-lock-contention flag ([#25596](https://github.com/kubernetes/kubernetes/pull/25596), [@derekparker](https://github.com/derekparker)) +* Bump up glbc version to 0.6.2 ([#25446](https://github.com/kubernetes/kubernetes/pull/25446), [@bprashanth](https://github.com/bprashanth)) +* Add "kubectl set image" for easier updating container images (for pods or resources with pod templates). ([#25509](https://github.com/kubernetes/kubernetes/pull/25509), [@janetkuo](https://github.com/janetkuo)) +* NodeController doesn't evict Pods if no Nodes are Ready ([#25571](https://github.com/kubernetes/kubernetes/pull/25571), [@gmarek](https://github.com/gmarek)) +* Incompatible change of kube-up.sh: ([#25734](https://github.com/kubernetes/kubernetes/pull/25734), [@jszczepkowski](https://github.com/jszczepkowski)) + * when turning on cluster autoscaler by setting KUBE_ENABLE_NODE_AUTOSCALER=true, + * KUBE_AUTOSCALER_MIN_NODES and KUBE_AUTOSCALER_MAX_NODES need to be set. +* systemd node spec proposal ([#17688](https://github.com/kubernetes/kubernetes/pull/17688), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* Bump GCE ContainerVM to container-v1-3-v20160517 (Docker 1.11.1) ([#25843](https://github.com/kubernetes/kubernetes/pull/25843), [@zmerlynn](https://github.com/zmerlynn)) +* AWS: Move enforcement of attached AWS device limit from kubelet to scheduler ([#23254](https://github.com/kubernetes/kubernetes/pull/23254), [@jsafrane](https://github.com/jsafrane)) +* Refactor persistent volume controller ([#24331](https://github.com/kubernetes/kubernetes/pull/24331), [@jsafrane](https://github.com/jsafrane)) +* Add support for running GCI on the GCE cloud provider ([#25425](https://github.com/kubernetes/kubernetes/pull/25425), [@andyzheng0831](https://github.com/andyzheng0831)) +* Implement taints and tolerations ([#24134](https://github.com/kubernetes/kubernetes/pull/24134), [@kevin-wangzefeng](https://github.com/kevin-wangzefeng)) +* Add init containers to pods ([#23567](https://github.com/kubernetes/kubernetes/pull/23567), [@smarterclayton](https://github.com/smarterclayton)) + + + +# v1.3.0-alpha.4 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/master/examples) + +## Downloads + +binary | sha1 hash | md5 hash +------ | --------- | -------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.0-alpha.4/kubernetes.tar.gz) | `758e97e7e50153840379ecd9f8fda1869543539f` | `4e18ae6a428c99fcc30e2137d7c41854` + +## Changes since v1.3.0-alpha.3 + +### Action Required + +* validate third party resources ([#25007](https://github.com/kubernetes/kubernetes/pull/25007), [@liggitt](https://github.com/liggitt)) +* Automatically create the kube-system namespace ([#25196](https://github.com/kubernetes/kubernetes/pull/25196), [@luxas](https://github.com/luxas)) +* Make ThirdPartyResource a root scoped object ([#25006](https://github.com/kubernetes/kubernetes/pull/25006), [@liggitt](https://github.com/liggitt)) +* mark container-port flag as deprecated ([#25072](https://github.com/kubernetes/kubernetes/pull/25072), [@AdoHe](https://github.com/AdoHe)) +* Provide flags to use etcd3 backed storage ([#24455](https://github.com/kubernetes/kubernetes/pull/24455), [@hongchaodeng](https://github.com/hongchaodeng)) + +### Other notable changes + +* Fix hyperkube's layer caching, and remove --make-symlinks at build time ([#25693](https://github.com/kubernetes/kubernetes/pull/25693), [@luxas](https://github.com/luxas)) +* AWS: More support for ap-northeast-2 region ([#24464](https://github.com/kubernetes/kubernetes/pull/24464), [@matthewrudy](https://github.com/matthewrudy)) +* Make bigger master root disks in GCE for large clusters ([#25670](https://github.com/kubernetes/kubernetes/pull/25670), [@gmarek](https://github.com/gmarek)) +* AWS kube-down: don't fail if ELB not in VPC - [#23784](https://github.com/kubernetes/kubernetes/pull/23784) ([#23785](https://github.com/kubernetes/kubernetes/pull/23785), [@ajohnstone](https://github.com/ajohnstone)) +* Build hyperkube in hack/local-up-cluster instead of separate binaries ([#25627](https://github.com/kubernetes/kubernetes/pull/25627), [@luxas](https://github.com/luxas)) +* enable recursive processing in kubectl rollout ([#25110](https://github.com/kubernetes/kubernetes/pull/25110), [@metral](https://github.com/metral)) +* Support struct,array,slice types when sorting kubectl output ([#25022](https://github.com/kubernetes/kubernetes/pull/25022), [@zhouhaibing089](https://github.com/zhouhaibing089)) +* federated api servers: Adding a discovery summarizer server ([#20358](https://github.com/kubernetes/kubernetes/pull/20358), [@nikhiljindal](https://github.com/nikhiljindal)) +* AWS: Allow cross-region image pulling with ECR ([#24369](https://github.com/kubernetes/kubernetes/pull/24369), [@therc](https://github.com/therc)) +* Automatically add node labels beta.kubernetes.io/{os,arch} ([#23684](https://github.com/kubernetes/kubernetes/pull/23684), [@luxas](https://github.com/luxas)) +* kubectl "rm" will suggest using "delete"; "ps" and "list" will suggest "get". ([#25181](https://github.com/kubernetes/kubernetes/pull/25181), [@janetkuo](https://github.com/janetkuo)) +* Add IPv6 address support for pods - does NOT include services ([#23090](https://github.com/kubernetes/kubernetes/pull/23090), [@tgraf](https://github.com/tgraf)) +* Use local disk for ConfigMap volume instead of tmpfs ([#25306](https://github.com/kubernetes/kubernetes/pull/25306), [@pmorie](https://github.com/pmorie)) +* Alpha support for scheduling pods on machines with NVIDIA GPUs whose kubelets use the `--experimental-nvidia-gpus` flag, using the alpha.kubernetes.io/nvidia-gpu resource ([#24836](https://github.com/kubernetes/kubernetes/pull/24836), [@therc](https://github.com/therc)) +* AWS: SSL support for ELB listeners through annotations ([#23495](https://github.com/kubernetes/kubernetes/pull/23495), [@therc](https://github.com/therc)) +* Implement `kubectl rollout status` that can be used to watch a deployment's rollout status ([#19946](https://github.com/kubernetes/kubernetes/pull/19946), [@janetkuo](https://github.com/janetkuo)) +* Webhook Token Authenticator ([#24902](https://github.com/kubernetes/kubernetes/pull/24902), [@cjcullen](https://github.com/cjcullen)) +* Update PodSecurityPolicy types and add admission controller that could enforce them ([#24600](https://github.com/kubernetes/kubernetes/pull/24600), [@pweil-](https://github.com/pweil-)) +* Introducing ScheduledJobs as described in [the proposal](docs/proposals/scheduledjob.md) as part of `batch/v2alpha1` version (experimental feature). ([#24970](https://github.com/kubernetes/kubernetes/pull/24970), [@soltysh](https://github.com/soltysh)) +* kubectl now supports validation of nested objects with different ApiGroups (e.g. objects in a List) ([#25172](https://github.com/kubernetes/kubernetes/pull/25172), [@pwittrock](https://github.com/pwittrock)) +* Change default clusterCIDRs from /16 to /14 in GCE configs allowing 1000 Node clusters by default. ([#25350](https://github.com/kubernetes/kubernetes/pull/25350), [@gmarek](https://github.com/gmarek)) +* Add 'kubectl set' ([#25444](https://github.com/kubernetes/kubernetes/pull/25444), [@janetkuo](https://github.com/janetkuo)) +* vSphere Cloud Provider Implementation ([#24703](https://github.com/kubernetes/kubernetes/pull/24703), [@dagnello](https://github.com/dagnello)) +* Added JobTemplate, a preliminary step for ScheduledJob and Workflow ([#21675](https://github.com/kubernetes/kubernetes/pull/21675), [@soltysh](https://github.com/soltysh)) +* Openstack provider ([#21737](https://github.com/kubernetes/kubernetes/pull/21737), [@zreigz](https://github.com/zreigz)) +* AWS kube-up: Allow VPC CIDR to be specified (experimental) ([#23362](https://github.com/kubernetes/kubernetes/pull/23362), [@miguelfrde](https://github.com/miguelfrde)) +* Return "410 Gone" errors via watch stream when using watch cache ([#25369](https://github.com/kubernetes/kubernetes/pull/25369), [@liggitt](https://github.com/liggitt)) +* GKE provider: Add cluster-ipv4-cidr and arbitrary flags ([#25437](https://github.com/kubernetes/kubernetes/pull/25437), [@zmerlynn](https://github.com/zmerlynn)) +* AWS kube-up: Increase timeout waiting for docker start ([#25405](https://github.com/kubernetes/kubernetes/pull/25405), [@justinsb](https://github.com/justinsb)) +* Sort resources in quota errors to avoid duplicate events ([#25161](https://github.com/kubernetes/kubernetes/pull/25161), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* Display line number on JSON errors ([#25038](https://github.com/kubernetes/kubernetes/pull/25038), [@mfojtik](https://github.com/mfojtik)) +* If the cluster node count exceeds the GCE TargetPool maximum (currently 1000), ([#25178](https://github.com/kubernetes/kubernetes/pull/25178), [@zmerlynn](https://github.com/zmerlynn)) + * randomly select which nodes are members of Kubernetes External Load Balancers. +* Clarify supported version skew between masters, nodes, and clients ([#25087](https://github.com/kubernetes/kubernetes/pull/25087), [@ihmccreery](https://github.com/ihmccreery)) +* Move godeps to vendor/ ([#24242](https://github.com/kubernetes/kubernetes/pull/24242), [@thockin](https://github.com/thockin)) +* Introduce events flag for describers ([#24554](https://github.com/kubernetes/kubernetes/pull/24554), [@ingvagabund](https://github.com/ingvagabund)) +* run kube-addon-manager in a static pod ([#23600](https://github.com/kubernetes/kubernetes/pull/23600), [@mikedanese](https://github.com/mikedanese)) +* Reimplement 'pause' in C - smaller footprint all around ([#23009](https://github.com/kubernetes/kubernetes/pull/23009), [@uluyol](https://github.com/uluyol)) +* Add subPath to mount a child dir or file of a volumeMount ([#22575](https://github.com/kubernetes/kubernetes/pull/22575), [@MikaelCluseau](https://github.com/MikaelCluseau)) +* Handle image digests in node status and image GC ([#25088](https://github.com/kubernetes/kubernetes/pull/25088), [@ncdc](https://github.com/ncdc)) +* PLEG: reinspect pods that failed prior inspections ([#25077](https://github.com/kubernetes/kubernetes/pull/25077), [@ncdc](https://github.com/ncdc)) +* Fix kubectl create secret/configmap to allow = values ([#24989](https://github.com/kubernetes/kubernetes/pull/24989), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* Upgrade installed packages when building hyperkube to improve the security profile ([#25114](https://github.com/kubernetes/kubernetes/pull/25114), [@aaronlevy](https://github.com/aaronlevy)) +* GCI/Trusty: Support ABAC authorization ([#24950](https://github.com/kubernetes/kubernetes/pull/24950), [@andyzheng0831](https://github.com/andyzheng0831)) +* fix cinder volume dir umount issue [#24717](https://github.com/kubernetes/kubernetes/pull/24717) ([#24718](https://github.com/kubernetes/kubernetes/pull/24718), [@chengyli](https://github.com/chengyli)) +* Inter pod topological affinity and anti-affinity implementation ([#22985](https://github.com/kubernetes/kubernetes/pull/22985), [@kevin-wangzefeng](https://github.com/kevin-wangzefeng)) +* start etcd compactor in background ([#25010](https://github.com/kubernetes/kubernetes/pull/25010), [@hongchaodeng](https://github.com/hongchaodeng)) +* GCI: Add two GCI specific metadata pairs ([#25105](https://github.com/kubernetes/kubernetes/pull/25105), [@andyzheng0831](https://github.com/andyzheng0831)) +* Ensure status is not changed during an update of PV, PVC, HPA objects ([#24924](https://github.com/kubernetes/kubernetes/pull/24924), [@mqliang](https://github.com/mqliang)) +* GCE: Prefer preconfigured node tags for firewalls, if available ([#25148](https://github.com/kubernetes/kubernetes/pull/25148), [@a-robinson](https://github.com/a-robinson)) +* kubectl rolling-update support for same image ([#24645](https://github.com/kubernetes/kubernetes/pull/24645), [@jlowdermilk](https://github.com/jlowdermilk)) +* Add an entry to the salt config to allow Debian jessie on GCE. ([#25123](https://github.com/kubernetes/kubernetes/pull/25123), [@jlewi](https://github.com/jlewi)) + * As with the existing Wheezy image on GCE, docker is expected + * to already be installed in the image. +* Mark kube-push.sh as broken ([#25095](https://github.com/kubernetes/kubernetes/pull/25095), [@ihmccreery](https://github.com/ihmccreery)) +* AWS: Add support for ap-northeast-2 region (Seoul) ([#24457](https://github.com/kubernetes/kubernetes/pull/24457), [@leokhoa](https://github.com/leokhoa)) +* GCI: Update the command to get the image ([#24987](https://github.com/kubernetes/kubernetes/pull/24987), [@andyzheng0831](https://github.com/andyzheng0831)) +* Port-forward: use out and error streams instead of glog ([#17030](https://github.com/kubernetes/kubernetes/pull/17030), [@csrwng](https://github.com/csrwng)) +* Promote Pod Hostname & Subdomain to fields (were annotations) ([#24362](https://github.com/kubernetes/kubernetes/pull/24362), [@ArtfulCoder](https://github.com/ArtfulCoder)) +* Validate deletion timestamp doesn't change on update ([#24839](https://github.com/kubernetes/kubernetes/pull/24839), [@liggitt](https://github.com/liggitt)) +* Add flag -t as shorthand for --tty ([#24365](https://github.com/kubernetes/kubernetes/pull/24365), [@janetkuo](https://github.com/janetkuo)) +* Add support for running clusters on GCI ([#24893](https://github.com/kubernetes/kubernetes/pull/24893), [@andyzheng0831](https://github.com/andyzheng0831)) +* Switch to ABAC authorization from AllowAll ([#24210](https://github.com/kubernetes/kubernetes/pull/24210), [@cjcullen](https://github.com/cjcullen)) +* Fix DeletingLoadBalancer event generation. ([#24833](https://github.com/kubernetes/kubernetes/pull/24833), [@a-robinson](https://github.com/a-robinson)) + + + +# v1.3.0-alpha.3 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/master/examples) + +## Downloads + +binary | sha1 hash | md5 hash +------ | --------- | -------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.0-alpha.3/kubernetes.tar.gz) | `01e0dc68653173614dc99f44875173478f837b38` | `ae22c35f3a963743d21daa17683e0288` + +## Changes since v1.3.0-alpha.2 + +### Action Required + +* Updating go-restful to generate "type":"object" instead of "type":"any" in swagger-spec (breaks kubectl 1.1) ([#22897](https://github.com/kubernetes/kubernetes/pull/22897), [@nikhiljindal](https://github.com/nikhiljindal)) +* Make watch cache treat resourceVersion consistent with uncached watch ([#24008](https://github.com/kubernetes/kubernetes/pull/24008), [@liggitt](https://github.com/liggitt)) + +### Other notable changes + +* Trusty: Add retry in curl commands ([#24749](https://github.com/kubernetes/kubernetes/pull/24749), [@andyzheng0831](https://github.com/andyzheng0831)) +* Collect and expose runtime's image storage usage via Kubelet's /stats/summary endpoint ([#23595](https://github.com/kubernetes/kubernetes/pull/23595), [@vishh](https://github.com/vishh)) +* Adding loadBalancer services to quota system ([#24247](https://github.com/kubernetes/kubernetes/pull/24247), [@sdminonne](https://github.com/sdminonne)) +* Enforce --max-pods in kubelet admission; previously was only enforced in scheduler ([#24674](https://github.com/kubernetes/kubernetes/pull/24674), [@gmarek](https://github.com/gmarek)) +* All clients under ClientSet share one RateLimiter. ([#24166](https://github.com/kubernetes/kubernetes/pull/24166), [@gmarek](https://github.com/gmarek)) +* Remove requirement that Endpoints IPs be IPv4 ([#23317](https://github.com/kubernetes/kubernetes/pull/23317), [@aanm](https://github.com/aanm)) +* Fix unintended change of Service.spec.ports[].nodePort during kubectl apply ([#24180](https://github.com/kubernetes/kubernetes/pull/24180), [@AdoHe](https://github.com/AdoHe)) +* Don't log private SSH key ([#24506](https://github.com/kubernetes/kubernetes/pull/24506), [@timstclair](https://github.com/timstclair)) +* Incremental improvements to kubelet e2e tests ([#24426](https://github.com/kubernetes/kubernetes/pull/24426), [@pwittrock](https://github.com/pwittrock)) +* Bridge off-cluster traffic into services by masquerading. ([#24429](https://github.com/kubernetes/kubernetes/pull/24429), [@cjcullen](https://github.com/cjcullen)) +* Flush conntrack state for removed/changed UDP Services ([#22573](https://github.com/kubernetes/kubernetes/pull/22573), [@freehan](https://github.com/freehan)) +* Allow setting the Host header in a httpGet probe ([#24292](https://github.com/kubernetes/kubernetes/pull/24292), [@errm](https://github.com/errm)) +* Fix goroutine leak in ssh-tunnel healthcheck. ([#24487](https://github.com/kubernetes/kubernetes/pull/24487), [@cjcullen](https://github.com/cjcullen)) +* Fix gce.getDiskByNameUnknownZone logic. ([#24452](https://github.com/kubernetes/kubernetes/pull/24452), [@a-robinson](https://github.com/a-robinson)) +* Make etcd cache size configurable ([#23914](https://github.com/kubernetes/kubernetes/pull/23914), [@jsravn](https://github.com/jsravn)) +* Drain pods created from ReplicaSets in 'kubectl drain' ([#23689](https://github.com/kubernetes/kubernetes/pull/23689), [@maclof](https://github.com/maclof)) +* Make kubectl edit not convert GV on edits ([#23437](https://github.com/kubernetes/kubernetes/pull/23437), [@DirectXMan12](https://github.com/DirectXMan12)) +* don't ship kube-registry-proxy and pause images in tars. ([#23605](https://github.com/kubernetes/kubernetes/pull/23605), [@mikedanese](https://github.com/mikedanese)) +* Do not throw creation errors for containers that fail immediately after being started ([#23894](https://github.com/kubernetes/kubernetes/pull/23894), [@vishh](https://github.com/vishh)) +* Add a client flag to delete "--now" for grace period 0 ([#23756](https://github.com/kubernetes/kubernetes/pull/23756), [@smarterclayton](https://github.com/smarterclayton)) +* add act-as powers ([#23549](https://github.com/kubernetes/kubernetes/pull/23549), [@deads2k](https://github.com/deads2k)) +* Build Kubernetes, etcd and flannel for arm64 and ppc64le ([#23931](https://github.com/kubernetes/kubernetes/pull/23931), [@luxas](https://github.com/luxas)) +* Honor starting resourceVersion in watch cache ([#24208](https://github.com/kubernetes/kubernetes/pull/24208), [@ncdc](https://github.com/ncdc)) +* Update the pause image to build for arm64 and ppc64le ([#23697](https://github.com/kubernetes/kubernetes/pull/23697), [@luxas](https://github.com/luxas)) +* Return more useful error information when a persistent volume fails to mount ([#23122](https://github.com/kubernetes/kubernetes/pull/23122), [@screeley44](https://github.com/screeley44)) +* Trusty: Avoid unnecessary in-memory temp files ([#24144](https://github.com/kubernetes/kubernetes/pull/24144), [@andyzheng0831](https://github.com/andyzheng0831)) +* e2e: fix error checking in kubelet stats ([#24205](https://github.com/kubernetes/kubernetes/pull/24205), [@yujuhong](https://github.com/yujuhong)) +* Fixed mounting with containerized kubelet ([#23435](https://github.com/kubernetes/kubernetes/pull/23435), [@jsafrane](https://github.com/jsafrane)) +* Adding nodeports services to quota ([#22154](https://github.com/kubernetes/kubernetes/pull/22154), [@sdminonne](https://github.com/sdminonne)) +* e2e: adapt kubelet_perf.go to use the new summary metrics API ([#24003](https://github.com/kubernetes/kubernetes/pull/24003), [@yujuhong](https://github.com/yujuhong)) +* kubelet: add RSS memory to the summary API ([#24015](https://github.com/kubernetes/kubernetes/pull/24015), [@yujuhong](https://github.com/yujuhong)) + + + +# v1.3.0-alpha.2 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/master/examples) + +## Downloads + +binary | sha1 hash | md5 hash +------ | --------- | -------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.0-alpha.2/kubernetes.tar.gz) | `305c8c2af7e99d463dbbe4208ecfe2b50585e796` | `aadb8d729d855e69212008f8fda628c0` + +## Changes since v1.3.0-alpha.1 + +### Other notable changes + +* Make kube2sky and skydns docker images cross-platform ([#19376](https://github.com/kubernetes/kubernetes/pull/19376), [@luxas](https://github.com/luxas)) +* Allowing type object in kubectl swagger validation ([#24054](https://github.com/kubernetes/kubernetes/pull/24054), [@nikhiljindal](https://github.com/nikhiljindal)) +* Fix TerminationMessagePath ([#23658](https://github.com/kubernetes/kubernetes/pull/23658), [@Random-Liu](https://github.com/Random-Liu)) +* Trusty: Do not create the docker-daemon cgroup ([#23996](https://github.com/kubernetes/kubernetes/pull/23996), [@andyzheng0831](https://github.com/andyzheng0831)) +* Make ConfigMap volume readable as non-root ([#23793](https://github.com/kubernetes/kubernetes/pull/23793), [@pmorie](https://github.com/pmorie)) +* only include running and pending pods in daemonset should place calculation ([#23929](https://github.com/kubernetes/kubernetes/pull/23929), [@mikedanese](https://github.com/mikedanese)) +* Upgrade to golang 1.6 ([#22149](https://github.com/kubernetes/kubernetes/pull/22149), [@luxas](https://github.com/luxas)) +* Cross-build hyperkube and debian-iptables for ARM. Also add a flannel image ([#21617](https://github.com/kubernetes/kubernetes/pull/21617), [@luxas](https://github.com/luxas)) +* Add a timeout to the sshDialer to prevent indefinite hangs. ([#23843](https://github.com/kubernetes/kubernetes/pull/23843), [@cjcullen](https://github.com/cjcullen)) +* Ensure object returned by volume getCloudProvider incorporates cloud config ([#23769](https://github.com/kubernetes/kubernetes/pull/23769), [@saad-ali](https://github.com/saad-ali)) +* Update Dashboard UI addon to v1.0.1 ([#23724](https://github.com/kubernetes/kubernetes/pull/23724), [@maciaszczykm](https://github.com/maciaszczykm)) +* Add zsh completion for kubectl ([#23797](https://github.com/kubernetes/kubernetes/pull/23797), [@sttts](https://github.com/sttts)) +* AWS kube-up: tolerate a lack of ephemeral volumes ([#23776](https://github.com/kubernetes/kubernetes/pull/23776), [@justinsb](https://github.com/justinsb)) +* duplicate kube-apiserver to federated-apiserver ([#23509](https://github.com/kubernetes/kubernetes/pull/23509), [@jianhuiz](https://github.com/jianhuiz)) +* Kubelet: Start using the official docker engine-api ([#23506](https://github.com/kubernetes/kubernetes/pull/23506), [@Random-Liu](https://github.com/Random-Liu)) +* Fix so setup-files don't recreate/invalidate certificates that already exist ([#23550](https://github.com/kubernetes/kubernetes/pull/23550), [@luxas](https://github.com/luxas)) +* A pod never terminated if a container image registry was unavailable ([#23746](https://github.com/kubernetes/kubernetes/pull/23746), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* Fix jsonpath to handle maps with key of nonstring types ([#23358](https://github.com/kubernetes/kubernetes/pull/23358), [@aveshagarwal](https://github.com/aveshagarwal)) +* Trusty: Regional release .tar.gz support ([#23558](https://github.com/kubernetes/kubernetes/pull/23558), [@andyzheng0831](https://github.com/andyzheng0831)) +* Add support for 3rd party objects to kubectl ([#18835](https://github.com/kubernetes/kubernetes/pull/18835), [@brendandburns](https://github.com/brendandburns)) +* Remove unnecessary override of /etc/init.d/docker on containervm image. ([#23593](https://github.com/kubernetes/kubernetes/pull/23593), [@dchen1107](https://github.com/dchen1107)) +* make docker-checker more robust ([#23662](https://github.com/kubernetes/kubernetes/pull/23662), [@ArtfulCoder](https://github.com/ArtfulCoder)) +* Change kube-proxy & fluentd CPU request to 20m/80m. ([#23646](https://github.com/kubernetes/kubernetes/pull/23646), [@cjcullen](https://github.com/cjcullen)) +* Create a new Deployment in kube-system for every version. ([#23512](https://github.com/kubernetes/kubernetes/pull/23512), [@Q-Lee](https://github.com/Q-Lee)) +* IngressTLS: allow secretName to be blank for SNI routing ([#23500](https://github.com/kubernetes/kubernetes/pull/23500), [@tam7t](https://github.com/tam7t)) +* don't sync deployment when pod selector is empty ([#23467](https://github.com/kubernetes/kubernetes/pull/23467), [@mikedanese](https://github.com/mikedanese)) +* AWS: Fix problems with >2 security groups ([#23340](https://github.com/kubernetes/kubernetes/pull/23340), [@justinsb](https://github.com/justinsb)) + + + +# v1.3.0-alpha.1 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/HEAD/examples) + +## Downloads + +binary | sha1 hash | md5 hash +------ | --------- | -------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.0-alpha.1/kubernetes.tar.gz) | `e0041b08e220a4704ea2ad90a6ec7c8f2120c2d3` | `7bb2df32aea94678f72a8d1f43a12098` + +## Changes since v1.2.0 + +### Action Required + +* Disabling swagger ui by default on apiserver. Adding a flag that can enable it ([#23025](https://github.com/kubernetes/kubernetes/pull/23025), [@nikhiljindal](https://github.com/nikhiljindal)) +* restore ability to run against secured etcd ([#21535](https://github.com/kubernetes/kubernetes/pull/21535), [@AdoHe](https://github.com/AdoHe)) + +### Other notable changes + +* validate that daemonsets don't have empty selectors on creation ([#23530](https://github.com/kubernetes/kubernetes/pull/23530), [@mikedanese](https://github.com/mikedanese)) +* Trusty: Update heapster manifest handling code ([#23434](https://github.com/kubernetes/kubernetes/pull/23434), [@andyzheng0831](https://github.com/andyzheng0831)) +* Support differentiation of OS distro in e2e tests ([#23466](https://github.com/kubernetes/kubernetes/pull/23466), [@andyzheng0831](https://github.com/andyzheng0831)) +* don't sync daemonsets with selectors that match all pods ([#23223](https://github.com/kubernetes/kubernetes/pull/23223), [@mikedanese](https://github.com/mikedanese)) +* Trusty: Avoid reaching GCE custom metadata size limit ([#22818](https://github.com/kubernetes/kubernetes/pull/22818), [@andyzheng0831](https://github.com/andyzheng0831)) +* Update kubectl help for 1.2 resources ([#23305](https://github.com/kubernetes/kubernetes/pull/23305), [@janetkuo](https://github.com/janetkuo)) +* Support addon Deployments, make heapster a deployment with a nanny. ([#22893](https://github.com/kubernetes/kubernetes/pull/22893), [@Q-Lee](https://github.com/Q-Lee)) +* Removing URL query param from swagger UI to fix the XSS issue ([#23234](https://github.com/kubernetes/kubernetes/pull/23234), [@nikhiljindal](https://github.com/nikhiljindal)) +* Fix hairpin mode ([#23325](https://github.com/kubernetes/kubernetes/pull/23325), [@MurgaNikolay](https://github.com/MurgaNikolay)) +* Bump to container-vm-v20160321 ([#23313](https://github.com/kubernetes/kubernetes/pull/23313), [@zmerlynn](https://github.com/zmerlynn)) +* Remove the restart-kube-proxy and restart-apiserver functions ([#23180](https://github.com/kubernetes/kubernetes/pull/23180), [@roberthbailey](https://github.com/roberthbailey)) +* Copy annotations back from RS to Deployment on rollback ([#23160](https://github.com/kubernetes/kubernetes/pull/23160), [@janetkuo](https://github.com/janetkuo)) +* Trusty: Support hybrid cluster with nodes on ContainerVM ([#23079](https://github.com/kubernetes/kubernetes/pull/23079), [@andyzheng0831](https://github.com/andyzheng0831)) +* update expose command description to add deployment ([#23246](https://github.com/kubernetes/kubernetes/pull/23246), [@AdoHe](https://github.com/AdoHe)) +* Add a rate limiter to the GCE cloudprovider ([#23019](https://github.com/kubernetes/kubernetes/pull/23019), [@alex-mohr](https://github.com/alex-mohr)) +* Add a Deployment example for kubectl expose. ([#23222](https://github.com/kubernetes/kubernetes/pull/23222), [@madhusudancs](https://github.com/madhusudancs)) +* Use versioned object when computing patch ([#23145](https://github.com/kubernetes/kubernetes/pull/23145), [@liggitt](https://github.com/liggitt)) +* kubelet: send all recevied pods in one update ([#23141](https://github.com/kubernetes/kubernetes/pull/23141), [@yujuhong](https://github.com/yujuhong)) +* Add a SSHKey sync check to the master's healthz (when using SSHTunnels). ([#23167](https://github.com/kubernetes/kubernetes/pull/23167), [@cjcullen](https://github.com/cjcullen)) +* Validate minimum CPU limits to be >= 10m ([#23143](https://github.com/kubernetes/kubernetes/pull/23143), [@vishh](https://github.com/vishh)) +* Fix controller-manager race condition issue which cause endpoints flush during restart ([#23035](https://github.com/kubernetes/kubernetes/pull/23035), [@xinxiaogang](https://github.com/xinxiaogang)) +* MESOS: forward globally declared cadvisor housekeeping flags ([#22974](https://github.com/kubernetes/kubernetes/pull/22974), [@jdef](https://github.com/jdef)) +* Trusty: support developer workflow on base image ([#22960](https://github.com/kubernetes/kubernetes/pull/22960), [@andyzheng0831](https://github.com/andyzheng0831)) +* Bumped Heapster to stable version 1.0.0 ([#22993](https://github.com/kubernetes/kubernetes/pull/22993), [@piosz](https://github.com/piosz)) +* Deprecating --api-version flag ([#22410](https://github.com/kubernetes/kubernetes/pull/22410), [@nikhiljindal](https://github.com/nikhiljindal)) +* allow resource.version.group in kubectl ([#22853](https://github.com/kubernetes/kubernetes/pull/22853), [@deads2k](https://github.com/deads2k)) +* Use SCP to dump logs and parallelize a bit. ([#22835](https://github.com/kubernetes/kubernetes/pull/22835), [@spxtr](https://github.com/spxtr)) +* update wide option output ([#22772](https://github.com/kubernetes/kubernetes/pull/22772), [@AdoHe](https://github.com/AdoHe)) +* Change scheduler logic from random to round-robin ([#22430](https://github.com/kubernetes/kubernetes/pull/22430), [@gmarek](https://github.com/gmarek)) + +Please see the [Releases Page](https://github.com/kubernetes/kubernetes/releases) for older releases. + +Release notes of older releases can be found in: +- [CHANGELOG-1.2.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.2.md) + +[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/CHANGELOG.md?pixel)]() diff --git a/vendor/k8s.io/kubernetes/CHANGELOG-1.4.md b/vendor/k8s.io/kubernetes/CHANGELOG-1.4.md new file mode 100644 index 000000000..11e704844 --- /dev/null +++ b/vendor/k8s.io/kubernetes/CHANGELOG-1.4.md @@ -0,0 +1,1436 @@ +<!-- BEGIN MUNGE: GENERATED_TOC --> +- [v1.4.12](#v1412) + - [Downloads for v1.4.12](#downloads-for-v1412) + - [Client Binaries](#client-binaries) + - [Server Binaries](#server-binaries) + - [Node Binaries](#node-binaries) + - [Changelog since v1.4.9](#changelog-since-v149) + - [Other notable changes](#other-notable-changes) +- [v1.4.9](#v149) + - [Downloads for v1.4.9](#downloads-for-v149) + - [Client Binaries](#client-binaries-1) + - [Server Binaries](#server-binaries-1) + - [Changelog since v1.4.8](#changelog-since-v148) + - [Other notable changes](#other-notable-changes-1) +- [v1.4.8](#v148) + - [Downloads for v1.4.8](#downloads-for-v148) + - [Client Binaries](#client-binaries-2) + - [Server Binaries](#server-binaries-2) + - [Changelog since v1.4.7](#changelog-since-v147) + - [Other notable changes](#other-notable-changes-2) +- [v1.4.7](#v147) + - [Downloads for v1.4.7](#downloads-for-v147) + - [Client Binaries](#client-binaries-3) + - [Server Binaries](#server-binaries-3) + - [Changelog since v1.4.6](#changelog-since-v146) + - [Other notable changes](#other-notable-changes-3) +- [v1.4.6](#v146) + - [Downloads for v1.4.6](#downloads-for-v146) + - [Client Binaries](#client-binaries-4) + - [Server Binaries](#server-binaries-4) + - [Changelog since v1.4.5](#changelog-since-v145) + - [Other notable changes](#other-notable-changes-4) +- [v1.4.5](#v145) + - [Downloads for v1.4.5](#downloads-for-v145) + - [Client Binaries](#client-binaries-5) + - [Server Binaries](#server-binaries-5) + - [Changelog since v1.4.4](#changelog-since-v144) + - [Other notable changes](#other-notable-changes-5) +- [v1.4.4](#v144) + - [Downloads for v1.4.4](#downloads-for-v144) + - [Client Binaries](#client-binaries-6) + - [Server Binaries](#server-binaries-6) + - [Changelog since v1.4.3](#changelog-since-v143) + - [Other notable changes](#other-notable-changes-6) +- [v1.4.3](#v143) + - [Downloads](#downloads) + - [Changelog since v1.4.2-beta.1](#changelog-since-v142-beta1) + - [Other notable changes](#other-notable-changes-7) +- [v1.4.2](#v142) + - [Downloads](#downloads-1) + - [Changelog since v1.4.2-beta.1](#changelog-since-v142-beta1-1) + - [Other notable changes](#other-notable-changes-8) +- [v1.4.2-beta.1](#v142-beta1) + - [Downloads](#downloads-2) + - [Changelog since v1.4.1](#changelog-since-v141) + - [Other notable changes](#other-notable-changes-9) +- [v1.4.1](#v141) + - [Downloads](#downloads-3) + - [Changelog since v1.4.1-beta.2](#changelog-since-v141-beta2) +- [v1.4.1-beta.2](#v141-beta2) + - [Downloads](#downloads-4) + - [Changelog since v1.4.0](#changelog-since-v140) + - [Other notable changes](#other-notable-changes-10) +- [v1.4.0](#v140) + - [Downloads](#downloads-5) + - [Major Themes](#major-themes) + - [Features](#features) + - [Known Issues](#known-issues) + - [Notable Changes to Existing Behavior](#notable-changes-to-existing-behavior) + - [Deployments](#deployments) + - [kubectl rolling-update: < v1.4.0 client vs >=v1.4.0 cluster](#kubectl-rolling-update:-<-v140-client-vs->=v140-cluster) + - [kubectl delete: < v1.4.0 client vs >=v1.4.0 cluster](#kubectl-delete:-<-v140-client-vs->=v140-cluster) + - [DELETE operation in REST API](#delete-operation-in-rest-api) + - [Action Required Before Upgrading](#action-required-before-upgrading) +- [optionally, remove the old secret](#optionally-remove-the-old-secret) + - [Previous Releases Included in v1.4.0](#previous-releases-included-in-v140) +- [v1.4.0-beta.11](#v140-beta11) + - [Downloads](#downloads-6) + - [Changelog since v1.4.0-beta.10](#changelog-since-v140-beta10) +- [v1.4.0-beta.10](#v140-beta10) + - [Downloads](#downloads-7) + - [Changelog since v1.4.0-beta.8](#changelog-since-v140-beta8) + - [Other notable changes](#other-notable-changes-11) +- [v1.4.0-beta.8](#v140-beta8) + - [Downloads](#downloads-8) + - [Changelog since v1.4.0-beta.7](#changelog-since-v140-beta7) +- [v1.4.0-beta.7](#v140-beta7) + - [Downloads](#downloads-9) + - [Changelog since v1.4.0-beta.6](#changelog-since-v140-beta6) + - [Other notable changes](#other-notable-changes-12) +- [v1.4.0-beta.6](#v140-beta6) + - [Downloads](#downloads-10) + - [Changelog since v1.4.0-beta.5](#changelog-since-v140-beta5) + - [Other notable changes](#other-notable-changes-13) +- [v1.4.0-beta.5](#v140-beta5) + - [Downloads](#downloads-11) + - [Changelog since v1.4.0-beta.3](#changelog-since-v140-beta3) + - [Other notable changes](#other-notable-changes-14) +- [v1.4.0-beta.3](#v140-beta3) + - [Downloads](#downloads-12) + - [Changelog since v1.4.0-beta.2](#changelog-since-v140-beta2) + - [Behavior changes caused by enabling the garbage collector](#behavior-changes-caused-by-enabling-the-garbage-collector) + - [kubectl rolling-update](#kubectl-rolling-update) + - [kubectl delete](#kubectl-delete) + - [DELETE operation in REST API](#delete-operation-in-rest-api-1) +- [v1.4.0-beta.2](#v140-beta2) + - [Downloads](#downloads-13) + - [Changelog since v1.4.0-beta.1](#changelog-since-v140-beta1) + - [Other notable changes](#other-notable-changes-15) +- [v1.4.0-beta.1](#v140-beta1) + - [Downloads](#downloads-14) + - [Changelog since v1.4.0-alpha.3](#changelog-since-v140-alpha3) + - [Action Required](#action-required) + - [Other notable changes](#other-notable-changes-16) +- [v1.4.0-alpha.3](#v140-alpha3) + - [Downloads](#downloads-15) + - [Changelog since v1.4.0-alpha.2](#changelog-since-v140-alpha2) + - [Action Required](#action-required-1) + - [Other notable changes](#other-notable-changes-17) +- [v1.4.0-alpha.2](#v140-alpha2) + - [Downloads](#downloads-16) + - [Changelog since v1.4.0-alpha.1](#changelog-since-v140-alpha1) + - [Action Required](#action-required-2) + - [Other notable changes](#other-notable-changes-18) +- [v1.4.0-alpha.1](#v140-alpha1) + - [Downloads](#downloads-17) + - [Changelog since v1.3.0](#changelog-since-v130) + - [Experimental Features](#experimental-features) + - [Action Required](#action-required-3) + - [Other notable changes](#other-notable-changes-19) +<!-- END MUNGE: GENERATED_TOC --> + +<!-- NEW RELEASE NOTES ENTRY --> + + +# v1.4.12 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.4/examples) + +## Downloads for v1.4.12 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.4.12/kubernetes.tar.gz) | `f0d7ca7e1c92174c900d49087347d043b817eb589803eacc7727a84df9280ed2` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.4.12/kubernetes-src.tar.gz) | `251835f258d79f186d8c715b18f2ccb93312270b35c22434b4ff27bc1de50eda` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.4.12/kubernetes-client-darwin-386.tar.gz) | `e91c76b6281fe7b488f2f30aeaeecde58a6df1a0e23f6c431b6dc9d1adc1ff1a` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.4.12/kubernetes-client-darwin-amd64.tar.gz) | `4504bc965bd1b5bcea91d18c3a879252026796fdd251b72e3541499c65ac20e0` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.4.12/kubernetes-client-linux-386.tar.gz) | `adf1f939db2da0b87bca876d9bee69e0d6bf4ca4a78e64195e9a08960e5ef010` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.4.12/kubernetes-client-linux-amd64.tar.gz) | `5419bdbba8144b55bf7bf2af1aefa531e25279f31a02d692f19b505862d0204f` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.4.12/kubernetes-client-linux-arm64.tar.gz) | `98ae30ac2e447b9e3c2768cac6861de5368d80cbd2db1983697c5436a2a2fe75` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.4.12/kubernetes-client-linux-arm.tar.gz) | `ed8e9901c130aebfd295a6016cccb123ee42d826619815250a6add2d03942c69` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.4.12/kubernetes-client-windows-386.tar.gz) | `bdca3096bed1a4c485942ab1d3f9351f5de00962058adefbb5297d50071461d4` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.4.12/kubernetes-client-windows-amd64.tar.gz) | `a74934eca20dd2e753d385ddca912e76dafbfff2a65e3e3a1ec3c5c40fd92bc8` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.4.12/kubernetes-server-linux-amd64.tar.gz) | `bf8aa3e2e204c1f782645f7df9338767daab7be3ab47a4670e2df08ee410ee7f` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.4.12/kubernetes-server-linux-arm64.tar.gz) | `7c5cfe06fe1fcfe11bd754921e88582d16887aacb6cee0eb82573c88debce65e` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.4.12/kubernetes-server-linux-arm.tar.gz) | `551c2bc2e3d1c0b8fa30cc0b0c8fae1acf561b5e303e9ddaf647e49239a97e6e` + +### Node Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-node*.tar.gz](https://dl.k8s.io/v1.4.12/kubernetes-node*.tar.gz) | `` + +## Changelog since v1.4.9 + +### Other notable changes + +* kube-apiserver now drops unneeded path information if an older version of Windows kubectl sends it. ([#44586](https://github.com/kubernetes/kubernetes/pull/44586), [@mml](https://github.com/mml)) +* Bump gcr.io/google_containers/glbc from 0.8.0 to 0.9.2. Release notes: [0.9.0](https://github.com/kubernetes/ingress/releases/tag/0.9.0), [0.9.1](https://github.com/kubernetes/ingress/releases/tag/0.9.1), [0.9.2](https://github.com/kubernetes/ingress/releases/tag/0.9.2) ([#43098](https://github.com/kubernetes/kubernetes/pull/43098), [@timstclair](https://github.com/timstclair)) +* Patch CVE-2016-8859 in alpine based images: ([#42937](https://github.com/kubernetes/kubernetes/pull/42937), [@timstclair](https://github.com/timstclair)) + * - gcr.io/google-containers/etcd-empty-dir-cleanup + * - gcr.io/google-containers/kube-dnsmasq-amd64 +* Check if pathExists before performing Unmount ([#39311](https://github.com/kubernetes/kubernetes/pull/39311), [@rkouj](https://github.com/rkouj)) +* Unmount operation should not fail if volume is already unmounted ([#38547](https://github.com/kubernetes/kubernetes/pull/38547), [@rkouj](https://github.com/rkouj)) +* Updates base image used for `kube-addon-manager` to latest `python:2.7-slim` and embedded `kubectl` to `v1.3.10`. No functionality changes expected. ([#42842](https://github.com/kubernetes/kubernetes/pull/42842), [@ixdy](https://github.com/ixdy)) +* list-resources: don't fail if the grep fails to match any resources ([#41933](https://github.com/kubernetes/kubernetes/pull/41933), [@ixdy](https://github.com/ixdy)) +* Update gcr.io/google-containers/rescheduler to v0.2.2, which uses busybox as a base image instead of ubuntu. ([#41911](https://github.com/kubernetes/kubernetes/pull/41911), [@ixdy](https://github.com/ixdy)) +* Backporting TPR fix to 1.4 ([#42380](https://github.com/kubernetes/kubernetes/pull/42380), [@foxish](https://github.com/foxish)) +* Fix AWS device allocator to only use valid device names ([#41455](https://github.com/kubernetes/kubernetes/pull/41455), [@gnufied](https://github.com/gnufied)) +* Reverts to looking up the current VM in vSphere using the machine's UUID, either obtained via sysfs or via the `vm-uuid` parameter in the cloud configuration file. ([#40892](https://github.com/kubernetes/kubernetes/pull/40892), [@robdaemon](https://github.com/robdaemon)) +* We change the default attach_detach_controller sync period to 1 minute to reduce the query frequency through cloud provider to check whether volumes are attached or not. ([#41363](https://github.com/kubernetes/kubernetes/pull/41363), [@jingxu97](https://github.com/jingxu97)) +* Bump GCI to gci-stable-56-9000-84-2: Fixed google-accounts-daemon breaks on GCI when network is unavailable. Fixed iptables-restore performance regression. ([#41831](https://github.com/kubernetes/kubernetes/pull/41831), [@freehan](https://github.com/freehan)) +* Update fluentd-gcp addon to 1.25.2 ([#41863](https://github.com/kubernetes/kubernetes/pull/41863), [@ixdy](https://github.com/ixdy)) +* Bump GCE ContainerVM to container-vm-v20170214 to address CVE-2016-9962. ([#41449](https://github.com/kubernetes/kubernetes/pull/41449), [@zmerlynn](https://github.com/zmerlynn)) + + + +# v1.4.9 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.4/examples) + +## Downloads for v1.4.9 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.4.9/kubernetes.tar.gz) | `9d385d555073c7cf509a92ce3aa96d0414a93c21c51bcf020744c70b4b290aa2` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.4.9/kubernetes-src.tar.gz) | `6fd7d33775356f0245d06b401ac74d8227a92abd07cc5a0ef362bac16e01f011` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.4.9/kubernetes-client-darwin-386.tar.gz) | `16b362f3cf56dee7b0c291188767222fd65176ed9573a8b87e8acf7eb6b22ed9` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.4.9/kubernetes-client-darwin-amd64.tar.gz) | `537e5c5d8a9148cd464f5d6d0a796e214add04c185b859ea9e39a4cc7264394c` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.4.9/kubernetes-client-linux-386.tar.gz) | `e9d2e55b42e002771c32d9f26e8eb0b65c257ea257e8ab19f7fd928f21caace8` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.4.9/kubernetes-client-linux-amd64.tar.gz) | `1ba81d64d1ae165b73375d61d364c642068385d6a1d68196d90e42a8d0fd6c7d` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.4.9/kubernetes-client-linux-arm64.tar.gz) | `d0398d2b11ed591575adde3ce9e1ad877fe37b8b56bd2be5b2aee344a35db330` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.4.9/kubernetes-client-linux-arm.tar.gz) | `714b06319bf047084514803531edab6a0a262c5f38a0d0bfda0a8e59672595b6` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.4.9/kubernetes-client-windows-386.tar.gz) | `16a7224313889d2f98a7d072f328198790531fd0e724eaeeccffe82521ae63b8` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.4.9/kubernetes-client-windows-amd64.tar.gz) | `dc19651287701ea6dcbd7b4949db2331468f730e8ebe951de1216f1105761d97` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.4.9/kubernetes-server-linux-amd64.tar.gz) | `6a104d143f8568a8ce16c979d1cb2eb357263d96ab43bd399b05d28f8da2b961` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.4.9/kubernetes-server-linux-arm64.tar.gz) | `8137ecde19574e6aba0cd9efe127f3b3eb02c312d7691745df3a23e40b7a5d72` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.4.9/kubernetes-server-linux-arm.tar.gz) | `085195abeb9133cb43f0e6198e638ded7f15beca44d19503c2836339a7e604aa` + +## Changelog since v1.4.8 + +### Other notable changes + +* Bump GCE ContainerVM to container-vm-v20170201 to address CVE-2016-9962. ([#40828](https://github.com/kubernetes/kubernetes/pull/40828), [@zmerlynn](https://github.com/zmerlynn)) +* Bump GCI to gci-beta-56-9000-80-0 ([#41027](https://github.com/kubernetes/kubernetes/pull/41027), [@dchen1107](https://github.com/dchen1107)) +* Fix for detach volume when node is not present/ powered off ([#40118](https://github.com/kubernetes/kubernetes/pull/40118), [@BaluDontu](https://github.com/BaluDontu)) +* Bump GCI to gci-beta-56-9000-80-0 ([#41027](https://github.com/kubernetes/kubernetes/pull/41027), [@dchen1107](https://github.com/dchen1107)) +* Move b.gcr.io/k8s_authenticated_test to gcr.io/k8s-authenticated-test ([#40335](https://github.com/kubernetes/kubernetes/pull/40335), [@zmerlynn](https://github.com/zmerlynn)) +* Prep node_e2e for GCI to COS name change ([#41088](https://github.com/kubernetes/kubernetes/pull/41088), [@jessfraz](https://github.com/jessfraz)) +* If ExperimentalCriticalPodAnnotation=True flag gate is set, kubelet will ensure that pods with `scheduler.alpha.kubernetes.io/critical-pod` annotation will be admitted even under resource pressure, will not be evicted, and are reasonably protected from system OOMs. ([#41052](https://github.com/kubernetes/kubernetes/pull/41052), [@vishh](https://github.com/vishh)) +* Fix resync goroutine leak in ListAndWatch ([#35672](https://github.com/kubernetes/kubernetes/pull/35672), [@tatsuhiro-t](https://github.com/tatsuhiro-t)) +* Kubelet will no longer set hairpin mode on every interface on the machine when an error occurs in setting up hairpin for a specific interface. ([#36990](https://github.com/kubernetes/kubernetes/pull/36990), [@bboreham](https://github.com/bboreham)) +* Bump GCE ContainerVM to container-vm-v20170201 to address CVE-2016-9962. ([#40828](https://github.com/kubernetes/kubernetes/pull/40828), [@zmerlynn](https://github.com/zmerlynn)) +* Adding vmdk file extension for vmDiskPath in vsphere DeleteVolume ([#40538](https://github.com/kubernetes/kubernetes/pull/40538), [@divyenpatel](https://github.com/divyenpatel)) +* Prevent hotloops on error conditions, which could fill up the disk faster than log rotation can free space. ([#40497](https://github.com/kubernetes/kubernetes/pull/40497), [@lavalamp](https://github.com/lavalamp)) +* Update GCE ContainerVM deployment to container-vm-v20170117 to pick up CVE fixes in base image. ([#40094](https://github.com/kubernetes/kubernetes/pull/40094), [@zmerlynn](https://github.com/zmerlynn)) +* Update kube-proxy image to be based off of Debian 8.6 base image. ([#39695](https://github.com/kubernetes/kubernetes/pull/39695), [@ixdy](https://github.com/ixdy)) +* Update amd64 kube-proxy base image to debian-iptables-amd64:v5 ([#39725](https://github.com/kubernetes/kubernetes/pull/39725), [@ixdy](https://github.com/ixdy)) + + + +# v1.4.8 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.4/examples) + +## Downloads for v1.4.8 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.4.8/kubernetes.tar.gz) | `888d2e6c5136e8805805498729a1da55cf89addfd28f098e0d2cf3f28697ab5c` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.4.8/kubernetes-src.tar.gz) | `0992c3f4f4cb21011fea32187c909babc1a3806f35cec86aacfe9c3d8bef2485` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.4.8/kubernetes-client-darwin-386.tar.gz) | `8b1c9931544b7b42df64ea98e0d8e1430d09eea3c9f78309834e4e18b091dc18` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.4.8/kubernetes-client-darwin-amd64.tar.gz) | `a306a687979013b8a27acae244d000de9a77f73714ccf96510ecf0398d677051` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.4.8/kubernetes-client-linux-386.tar.gz) | `81fc5e1b5aba4e0aead37c82c7e45891c4493c7df51da5200f83462b6f7ad98f` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.4.8/kubernetes-client-linux-amd64.tar.gz) | `704a5f8424190406821b69283f802ade95e39944efcce10bcaf4bd7b3183abc4` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.4.8/kubernetes-client-linux-arm64.tar.gz) | `7f3e5e8dadb51257afa8650bcd3db3e8f3bc60e767c1a13d946b88fa8625a326` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.4.8/kubernetes-client-linux-arm.tar.gz) | `461d359067cd90542ce2ceb46a4b2ec9d92dd8fd1e7d21a9d9f469c98f446e56` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.4.8/kubernetes-client-windows-386.tar.gz) | `894a9c8667e4c4942cb25ac32d10c4f6de8477c6bbbad94e9e6f47121151f5df` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.4.8/kubernetes-client-windows-amd64.tar.gz) | `b2bd4afdd3eaea305c03b94b0864c5622abf19113c6794dedff4ad85327fda01` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.4.8/kubernetes-server-linux-amd64.tar.gz) | `c3dc0e26c00bbe40bd19f61d2d7faeaa56384355c58a0efc4227a360b3eb2da2` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.4.8/kubernetes-server-linux-arm64.tar.gz) | `745d7ba03bb9c6b57a5a36b389f6467a0707f0a1476d7536ad47417c853eeffd` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.4.8/kubernetes-server-linux-arm.tar.gz) | `dc21f9c659f1d762cad9d0cce0a32146c11cd0d41c58eb2dcbfb0c9f9707349f` + +## Changelog since v1.4.7 + +### Other notable changes + +* AWS: recognize eu-west-2 region ([#38746](https://github.com/kubernetes/kubernetes/pull/38746), [@justinsb](https://github.com/justinsb)) +* Add path exist check in getPodVolumePathListFromDisk ([#38909](https://github.com/kubernetes/kubernetes/pull/38909), [@jingxu97](https://github.com/jingxu97)) +* Update fluentd-gcp addon to 1.21.1/1.25.1. ([#39705](https://github.com/kubernetes/kubernetes/pull/39705), [@ixdy](https://github.com/ixdy)) +* Admit critical pods in the kubelet ([#38836](https://github.com/kubernetes/kubernetes/pull/38836), [@bprashanth](https://github.com/bprashanth)) +* assign -998 as the oom_score_adj for critical pods (e.g. kube-proxy) ([#39114](https://github.com/kubernetes/kubernetes/pull/39114), [@dchen1107](https://github.com/dchen1107)) +* Don't evict static pods ([#39059](https://github.com/kubernetes/kubernetes/pull/39059), [@bprashanth](https://github.com/bprashanth)) +* Provide kubernetes-controller-manager flags to control volume attach/detach reconciler sync. The duration of the syncs can be controlled, and the syncs can be shut off as well. ([#39551](https://github.com/kubernetes/kubernetes/pull/39551), [@chrislovecnm](https://github.com/chrislovecnm)) +* AWS: Recognize ca-central-1 region ([#38410](https://github.com/kubernetes/kubernetes/pull/38410), [@justinsb](https://github.com/justinsb)) +* Add TLS conf for Go1.7 ([#38600](https://github.com/kubernetes/kubernetes/pull/38600), [@k82cn](https://github.com/k82cn)) +* Fix fsGroup to vSphere ([#38655](https://github.com/kubernetes/kubernetes/pull/38655), [@abrarshivani](https://github.com/abrarshivani)) +* Only set sysctls for infra containers ([#32383](https://github.com/kubernetes/kubernetes/pull/32383), [@sttts](https://github.com/sttts)) +* fix kubectl taint e2e flake: add retries for removing taint ([#33872](https://github.com/kubernetes/kubernetes/pull/33872), [@kevin-wangzefeng](https://github.com/kevin-wangzefeng)) +* portfordwardtester: avoid data loss during send+close+exit ([#37103](https://github.com/kubernetes/kubernetes/pull/37103), [@sttts](https://github.com/sttts)) +* Wait for the port to be ready before starting ([#38260](https://github.com/kubernetes/kubernetes/pull/38260), [@fraenkel](https://github.com/fraenkel)) +* Ensure the GCI metadata files do not have newline at the end ([#38727](https://github.com/kubernetes/kubernetes/pull/38727), [@Amey-D](https://github.com/Amey-D)) +* Fix nil pointer dereference in test framework ([#37583](https://github.com/kubernetes/kubernetes/pull/37583), [@mtaufen](https://github.com/mtaufen)) +* Kubelet: Add image cache. ([#38375](https://github.com/kubernetes/kubernetes/pull/38375), [@Random-Liu](https://github.com/Random-Liu)) +* Collect logs for dead kubelets too ([#37671](https://github.com/kubernetes/kubernetes/pull/37671), [@mtaufen](https://github.com/mtaufen)) + + + +# v1.4.7 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.4/examples) + +## Downloads for v1.4.7 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.4.7/kubernetes.tar.gz) | `d193f76e70322010b3e86ac61c7a893175f9e62d37bece87cfd14ea068c8d187` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.4.7/kubernetes-src.tar.gz) | `7c7ef45e903ed2691c73bb2752805f190b4042ba233a6260f2cdeab7d0ac9bd3` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.4.7/kubernetes-client-darwin-386.tar.gz) | `a5a3ec9f5270156cf507b4c6bf2d08da67062a2ed9cb5f21e8891f2fd83f438a` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.4.7/kubernetes-client-darwin-amd64.tar.gz) | `e5328781640b19e86b59aa8afd665dd21999c6740acbee8332cfa20745d6a5ce` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.4.7/kubernetes-client-linux-386.tar.gz) | `61082afc6aee2dc5bbd35bfda2e5991bd9f9730192f1c9396b6db500fc64e121` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.4.7/kubernetes-client-linux-amd64.tar.gz) | `36232c9e21298f5f53dbf4851520a8cc53a2d6b6d2be8810cf5258a067570314` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.4.7/kubernetes-client-linux-arm64.tar.gz) | `802d0c5e7bb55dacdd19afe73ed71d0726960ec9933c49e77051df7e2594790b` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.4.7/kubernetes-client-linux-arm.tar.gz) | `f42d8d2d918b31564d12d742bce2263df0c93807619bd03194028ff2714f1a17` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.4.7/kubernetes-client-windows-386.tar.gz) | `b45dcdfe0ba0177fad5419b4fd6b5b80bf9bca0e56e7fe19d2bc217c9aae1f9d` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.4.7/kubernetes-client-windows-amd64.tar.gz) | `ae4666aea8fa74ef1cce746d1d90cbadc972850560b65a8eeff4417fdede6b4e` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.4.7/kubernetes-server-linux-amd64.tar.gz) | `56e01e9788d1ef0499b1783768022cb188b5bb840d1499a62e9f0a18c2bd2bd5` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.4.7/kubernetes-server-linux-arm64.tar.gz) | `6654ef3c142694a79ec2596929ceec36a399407e1fb74b09be1a67c59b30ca42` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.4.7/kubernetes-server-linux-arm.tar.gz) | `b10e78286dea804d69311e3805c35f5414b0669094edec7a2e0ba99170a5d04a` + +## Changelog since v1.4.6 + +### Other notable changes + +* Exit with error if <version number or publication> is not the final parameter. ([#37723](https://github.com/kubernetes/kubernetes/pull/37723), [@mtaufen](https://github.com/mtaufen)) +* Fix GCI mounter issue ([#38124](https://github.com/kubernetes/kubernetes/pull/38124), [@jingxu97](https://github.com/jingxu97)) +* Fix space issue in volumePath with vSphere Cloud Provider ([#38338](https://github.com/kubernetes/kubernetes/pull/38338), [@BaluDontu](https://github.com/BaluDontu)) +* Fix panic in vSphere cloud provider ([#38423](https://github.com/kubernetes/kubernetes/pull/38423), [@BaluDontu](https://github.com/BaluDontu)) +* Changed default scsi controller type in vSphere Cloud Provider ([#38426](https://github.com/kubernetes/kubernetes/pull/38426), [@abrarshivani](https://github.com/abrarshivani)) +* Fix unmountDevice issue caused by shared mount in GCI ([#38411](https://github.com/kubernetes/kubernetes/pull/38411), [@jingxu97](https://github.com/jingxu97)) +* Implement CanMount() for gfsMounter for linux ([#36686](https://github.com/kubernetes/kubernetes/pull/36686), [@rkouj](https://github.com/rkouj)) +* Better messaging for missing volume binaries on host ([#36280](https://github.com/kubernetes/kubernetes/pull/36280), [@rkouj](https://github.com/rkouj)) +* fix mesos unit tests ([#38196](https://github.com/kubernetes/kubernetes/pull/38196), [@deads2k](https://github.com/deads2k)) +* Fix Service Update on LoadBalancerSourceRanges Field ([#37720](https://github.com/kubernetes/kubernetes/pull/37720), [@freehan](https://github.com/freehan)) +* Include serial port output in GCP log-dump ([#37248](https://github.com/kubernetes/kubernetes/pull/37248), [@mtaufen](https://github.com/mtaufen)) +* Collect installation and configuration service logs for tests ([#37401](https://github.com/kubernetes/kubernetes/pull/37401), [@mtaufen](https://github.com/mtaufen)) +* Use shasum if sha1sum doesn't exist in the path ([#37362](https://github.com/kubernetes/kubernetes/pull/37362), [@roberthbailey](https://github.com/roberthbailey)) +* Guard the ready replica checking by server version ([#37303](https://github.com/kubernetes/kubernetes/pull/37303), [@krousey](https://github.com/krousey)) +* Fix issue when attempting to unmount a wrong vSphere volume ([#37413](https://github.com/kubernetes/kubernetes/pull/37413), [@BaluDontu](https://github.com/BaluDontu)) +* Fix issue in converting AWS volume ID from mount paths ([#36840](https://github.com/kubernetes/kubernetes/pull/36840), [@jingxu97](https://github.com/jingxu97)) +* Correct env var name in configure-helper ([#33848](https://github.com/kubernetes/kubernetes/pull/33848), [@mtaufen](https://github.com/mtaufen)) +* wait until the pods are deleted completely ([#34778](https://github.com/kubernetes/kubernetes/pull/34778), [@ymqytw](https://github.com/ymqytw)) +* AWS: recognize us-east-2 region ([#35013](https://github.com/kubernetes/kubernetes/pull/35013), [@justinsb](https://github.com/justinsb)) +* Replace controller presence checking logic ([#36924](https://github.com/kubernetes/kubernetes/pull/36924), [@krousey](https://github.com/krousey)) +* Fix a bug in scheduler happening after retrying unsuccessful bindings ([#37293](https://github.com/kubernetes/kubernetes/pull/37293), [@wojtek-t](https://github.com/wojtek-t)) +* Try self-repair scheduler cache or panic ([#37379](https://github.com/kubernetes/kubernetes/pull/37379), [@wojtek-t](https://github.com/wojtek-t)) +* Ignore mirror pods with RestartPolicy == Never in restart tests ([#34462](https://github.com/kubernetes/kubernetes/pull/34462), [@yujuhong](https://github.com/yujuhong)) +* Change image-puller restart policy to OnFailure ([#37070](https://github.com/kubernetes/kubernetes/pull/37070), [@gmarek](https://github.com/gmarek)) +* Filter out non-RestartAlways mirror pod in restart test. ([#37203](https://github.com/kubernetes/kubernetes/pull/37203), [@Random-Liu](https://github.com/Random-Liu)) +* Validate volume spec before returning azure mounter ([#37018](https://github.com/kubernetes/kubernetes/pull/37018), [@rootfs](https://github.com/rootfs)) +* Networking test rewrite ([#31559](https://github.com/kubernetes/kubernetes/pull/31559), [@bprashanth](https://github.com/bprashanth)) +* Fix the equality checks for numeric values in cluster/gce/util.sh. ([#37638](https://github.com/kubernetes/kubernetes/pull/37638), [@roberthbailey](https://github.com/roberthbailey)) +* Use gsed on the Mac ([#37562](https://github.com/kubernetes/kubernetes/pull/37562), [@roberthbailey](https://github.com/roberthbailey)) +* Fix TestServiceAlloc flakes ([#37487](https://github.com/kubernetes/kubernetes/pull/37487), [@wojtek-t](https://github.com/wojtek-t)) +* Change ScheduledJob POD name suffix from hash to Unix Epoch ([#36883](https://github.com/kubernetes/kubernetes/pull/36883), [@jakub-d](https://github.com/jakub-d)) +* Add support for NFSv4 and GlusterFS in GCI base image ([#37336](https://github.com/kubernetes/kubernetes/pull/37336), [@jingxu97](https://github.com/jingxu97)) +* Use generous limits in the resource usage tracking tests ([#36623](https://github.com/kubernetes/kubernetes/pull/36623), [@yujuhong](https://github.com/yujuhong)) + + + +# v1.4.6 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.4/examples) + +## Downloads for v1.4.6 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.6/kubernetes.tar.gz) | `6f8242aa29493e1f824997748419e4a287c28b06ed13f17b1ba94bf07fdfa3be` +[kubernetes-src.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.6/kubernetes-src.tar.gz) | `a2a2d885d246300b52adb5d7e1471b382c77d90a816618518c2a6e9941208e40` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.6/kubernetes-client-darwin-386.tar.gz) | `4db6349c976f893d0000dcb5b2ab09327824d0c38b3beab961711a0951cdfc82` +[kubernetes-client-darwin-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.6/kubernetes-client-darwin-amd64.tar.gz) | `2d31dea858569f518410effb20d3c3b9a6798d706dacbafd85f1f67f9ccbe288` +[kubernetes-client-linux-386.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.6/kubernetes-client-linux-386.tar.gz) | `7980cf6132a7a6bf3816b8fd60d7bc1c9cb447d45196c31312b9d73567010909` +[kubernetes-client-linux-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.6/kubernetes-client-linux-amd64.tar.gz) | `95b3cbd339f7d104d5b69b08d53060bfc78bd4ee7a94ede7ba4c0a76b615f8b1` +[kubernetes-client-linux-arm64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.6/kubernetes-client-linux-arm64.tar.gz) | `0f03cff262b0f4cc218b0f79294b4cbd8f92146c31137c75a27012d956864c79` +[kubernetes-client-linux-arm.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.6/kubernetes-client-linux-arm.tar.gz) | `f8c76fe8c41a5084cc1a1ab3e08d7e2d815f7baedfadac0dc6f9157ed2c607c9` +[kubernetes-client-windows-386.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.6/kubernetes-client-windows-386.tar.gz) | `c29b3c8c8a72246852db048e922ad2221f35e1c309571f73fd9f3d9b01be5f79` +[kubernetes-client-windows-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.6/kubernetes-client-windows-amd64.tar.gz) | `95bf20bdbe354476bbd3647adf72985698ded53a59819baa8268b5811e19f952` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.6/kubernetes-server-linux-amd64.tar.gz) | `f0a60c45f3360696431288826e56df3b8c18c1dc6fc3f0ea83409f970395e38f` +[kubernetes-server-linux-arm64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.6/kubernetes-server-linux-arm64.tar.gz) | `8c667d4792fcfee821a2041e5d0356e1abc2b3fa6fe7b69c5479e48c858ba29c` +[kubernetes-server-linux-arm.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.6/kubernetes-server-linux-arm.tar.gz) | `c57246d484b5f98d6aa16591f2b4c4c1a01ebbc7be05bce8690a4f3b88582844` + +## Changelog since v1.4.5 + +### Other notable changes + +* Fix issue in reconstruct volume data when kubelet restarts ([#36616](https://github.com/kubernetes/kubernetes/pull/36616), [@jingxu97](https://github.com/jingxu97)) +* Add sync state loop in master's volume reconciler ([#34859](https://github.com/kubernetes/kubernetes/pull/34859), [@jingxu97](https://github.com/jingxu97)) +* AWS: strong-typing for k8s vs aws volume ids ([#35883](https://github.com/kubernetes/kubernetes/pull/35883), [@justinsb](https://github.com/justinsb)) +* Bump GCI version to gci-beta-55-8872-47-0 ([#36679](https://github.com/kubernetes/kubernetes/pull/36679), [@mtaufen](https://github.com/mtaufen)) + +``` + gci-beta-55-8872-47-0: + Date: Nov 11, 2016 + Kernel: ChromiumOS-4.4 + Kubernetes: v1.4.5 + Docker: v1.11.2 + Changelog (vs 55-8872-18-0) + * Cherry-pick runc PR#608: Eliminate redundant parsing of mountinfo + * Updated kubernetes to v1.4.5 + * Fixed a bug in e2fsprogs that caused mke2fs to take a very long time. Upstream fix: http://git.kernel.org/cgit/fs/ext2/e2fsprogs.git/commit/?h=next&id=d33e690fe7a6cbeb51349d9f2c7fb16a6ebec9c2 +``` + +* Fix fetching pids running in a cgroup, which caused problems with OOM score adjustments & setting the /system cgroup ("misc" in the summary API). ([#36614](https://github.com/kubernetes/kubernetes/pull/36614), [@timstclair](https://github.com/timstclair)) +* DELETE requests can now pass in their DeleteOptions as a query parameter or a body parameter, rather than just as a body parameter. ([#35806](https://github.com/kubernetes/kubernetes/pull/35806), [@bdbauer](https://github.com/bdbauer)) +* rkt: Convert image name to be a valid acidentifier ([#34375](https://github.com/kubernetes/kubernetes/pull/34375), [@euank](https://github.com/euank)) +* Remove stale volumes if endpoint/svc creation fails. ([#35285](https://github.com/kubernetes/kubernetes/pull/35285), [@humblec](https://github.com/humblec)) +* Remove Job also from .status.active for Replace strategy ([#35420](https://github.com/kubernetes/kubernetes/pull/35420), [@soltysh](https://github.com/soltysh)) +* Update PodAntiAffinity to ignore calls to subresources ([#35608](https://github.com/kubernetes/kubernetes/pull/35608), [@soltysh](https://github.com/soltysh)) +* Adds TCPCloseWaitTimeout option to kube-proxy for sysctl nf_conntrack_tcp_timeout_time_wait ([#35919](https://github.com/kubernetes/kubernetes/pull/35919), [@bowei](https://github.com/bowei)) +* Fix how we iterate over active jobs when removing them for Replace policy ([#36161](https://github.com/kubernetes/kubernetes/pull/36161), [@soltysh](https://github.com/soltysh)) +* Bump GCI version to latest m55 version in GCE for K8s 1.4 ([#36302](https://github.com/kubernetes/kubernetes/pull/36302), [@mtaufen](https://github.com/mtaufen)) +* Add a check for file size if the reading content returns empty ([#33976](https://github.com/kubernetes/kubernetes/pull/33976), [@jingxu97](https://github.com/jingxu97)) +* Add a retry when reading a file content from a container ([#35560](https://github.com/kubernetes/kubernetes/pull/35560), [@jingxu97](https://github.com/jingxu97)) +* Skip CLOSE_WAIT e2e test if server is 1.4.5 ([#36404](https://github.com/kubernetes/kubernetes/pull/36404), [@bowei](https://github.com/bowei)) +* Adds etcd3 changes ([#36232](https://github.com/kubernetes/kubernetes/pull/36232), [@wojtek-t](https://github.com/wojtek-t)) +* Adds TCPCloseWaitTimeout option to kube-proxy for sysctl nf_conntrack_tcp_timeout_time_wait ([#36099](https://github.com/kubernetes/kubernetes/pull/36099), [@bowei](https://github.com/bowei)) + + + +# v1.4.5 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.4/examples) + +## Downloads for v1.4.5 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.5/kubernetes.tar.gz) | `339f4d1c7a374ddb32334268c4af8dae0b86d1567a9c812087d672a7defe233c` +[kubernetes-src.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.5/kubernetes-src.tar.gz) | `69b1b022400794d491200a9365ea9bf735567348d0299920462cf7167c76ba61` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.5/kubernetes-client-darwin-386.tar.gz) | `6012dab54687f7eb41ce9cd6b4676e15b774fbfbeadb7e00c806ba3f63fe10ce` +[kubernetes-client-darwin-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.5/kubernetes-client-darwin-amd64.tar.gz) | `981b321f4393fc9892c6558321e1d8ee6d8256b85f09266c8794fdcee9cb1c07` +[kubernetes-client-linux-386.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.5/kubernetes-client-linux-386.tar.gz) | `75ce408ef9f4b277718701c025955cd628eeee4180d8e9e7fd8ecf008878429f` +[kubernetes-client-linux-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.5/kubernetes-client-linux-amd64.tar.gz) | `0c0768d7646cec490ca1e47a4e2f519724fc75d984d411aa92fe17a82356532b` +[kubernetes-client-linux-arm64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.5/kubernetes-client-linux-arm64.tar.gz) | `910a6465b1ecbf1aae8f6cd16e35ac7ad7b0e598557941937d02d16520e2e37c` +[kubernetes-client-linux-arm.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.5/kubernetes-client-linux-arm.tar.gz) | `29644cca627cdce6c7aad057d9680eee87d21b1bbd6af02f7277f24eccbc95f7` +[kubernetes-client-windows-386.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.5/kubernetes-client-windows-386.tar.gz) | `dc249cc0f6cbb0e0705f7b43929461b6702ae91148218da070bb99e8a8f6f108` +[kubernetes-client-windows-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.5/kubernetes-client-windows-amd64.tar.gz) | `d60d275ad5f45ebe83a458912de96fd8381540d4bcf91023fe2173af6acd535b` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.5/kubernetes-server-linux-amd64.tar.gz) | `25e12aaf3f93c320f6aa640bb1430d4c0e99e3b0e83bcef660d2a513bdef2c20` +[kubernetes-server-linux-arm64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.5/kubernetes-server-linux-arm64.tar.gz) | `e768146c9476b96f092409030349b4c5bb9682287567fe2732888ad5ed1d3ede` +[kubernetes-server-linux-arm.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.5/kubernetes-server-linux-arm.tar.gz) | `26581dc0fc31542c831a588baad9ad391598e5b2ff299a0fc92a2c04990b3edd` + +## Changelog since v1.4.4 + +### Other notable changes + +* Fix volume states out of sync problem after kubelet restarts ([#33616](https://github.com/kubernetes/kubernetes/pull/33616), [@jingxu97](https://github.com/jingxu97)) +* cross: add IsNotMountPoint() to mount_unsupported.go ([#35566](https://github.com/kubernetes/kubernetes/pull/35566), [@rootfs](https://github.com/rootfs)) +* Bump GCE debian image to container-vm-v20161025 (CVE-2016-5195 Dirty COW) ([#35825](https://github.com/kubernetes/kubernetes/pull/35825), [@dchen1107](https://github.com/dchen1107)) +* Avoid overriding system and kubelet cgroups on GCI ([#35319](https://github.com/kubernetes/kubernetes/pull/35319), [@vishh](https://github.com/vishh)) + * Make the kubectl from k8s release the default on GCI +* kubelet summary rootfs now refers to the filesystem that contains the Kubelet RootDirectory (var/lib/kubelet) instead of cadvisor's rootfs ( / ), since they may be different filesystems. ([#35136](https://github.com/kubernetes/kubernetes/pull/35136), [@dashpole](https://github.com/dashpole)) +* Fix cadvisor_unsupported and the crossbuild ([#35817](https://github.com/kubernetes/kubernetes/pull/35817), [@luxas](https://github.com/luxas)) +* kubenet: SyncHostports for both running and ready to run pods. ([#31388](https://github.com/kubernetes/kubernetes/pull/31388), [@yifan-gu](https://github.com/yifan-gu)) +* GC pod ips ([#35572](https://github.com/kubernetes/kubernetes/pull/35572), [@bprashanth](https://github.com/bprashanth)) +* Fix version string generation for local version different from release and not based on `-alpha.no` or `-beta.no` suffixed tag. ([#34612](https://github.com/kubernetes/kubernetes/pull/34612), [@jellonek](https://github.com/jellonek)) +* Node status updater should SetNodeStatusUpdateNeeded if it fails to update status ([#34368](https://github.com/kubernetes/kubernetes/pull/34368), [@jingxu97](https://github.com/jingxu97)) +* Fixed flakes caused by petset tests. ([#35158](https://github.com/kubernetes/kubernetes/pull/35158), [@foxish](https://github.com/foxish)) +* Added rkt binary to GCI ([#35321](https://github.com/kubernetes/kubernetes/pull/35321), [@vishh](https://github.com/vishh)) +* Bump container-vm version in config-test.sh ([#35705](https://github.com/kubernetes/kubernetes/pull/35705), [@mtaufen](https://github.com/mtaufen)) +* Delete all firewall rules (and optionally network) on GCE/GKE cluster teardown ([#34577](https://github.com/kubernetes/kubernetes/pull/34577), [@ixdy](https://github.com/ixdy)) +* Fixed mutation warning in Attach/Detach controller ([#35273](https://github.com/kubernetes/kubernetes/pull/35273), [@jsafrane](https://github.com/jsafrane)) +* Dynamic provisioning for vSphere ([#30836](https://github.com/kubernetes/kubernetes/pull/30836), [@abrarshivani](https://github.com/abrarshivani)) +* Update grafana version used by default in kubernetes to 3.1.1 ([#35435](https://github.com/kubernetes/kubernetes/pull/35435), [@Crassirostris](https://github.com/Crassirostris)) +* vSphere Kube-up: resolve vm-names on all nodes ([#35365](https://github.com/kubernetes/kubernetes/pull/35365), [@kerneltime](https://github.com/kerneltime)) +* Improve source IP preservation test, fail the test instead of panic. ([#34030](https://github.com/kubernetes/kubernetes/pull/34030), [@MrHohn](https://github.com/MrHohn)) +* Fix [#31085](https://github.com/kubernetes/kubernetes/pull/31085), include output checking in retry loop ([#34107](https://github.com/kubernetes/kubernetes/pull/34107), [@MrHohn](https://github.com/MrHohn)) +* vSphere kube-up: Wait for cbr0 configuration to complete before setting up routes. ([#35232](https://github.com/kubernetes/kubernetes/pull/35232), [@kerneltime](https://github.com/kerneltime)) +* Substitute gcloud regex with regexp ([#35346](https://github.com/kubernetes/kubernetes/pull/35346), [@bprashanth](https://github.com/bprashanth)) +* Fix PDB e2e test, off-by-one ([#35274](https://github.com/kubernetes/kubernetes/pull/35274), [@soltysh](https://github.com/soltysh)) +* etcd3: API storage - decouple decorator from filter ([#31189](https://github.com/kubernetes/kubernetes/pull/31189), [@hongchaodeng](https://github.com/hongchaodeng)) +* etcd3: v3client + grpc client leak fix ([#31704](https://github.com/kubernetes/kubernetes/pull/31704), [@timothysc](https://github.com/timothysc)) +* etcd3: watcher logging error ([#32831](https://github.com/kubernetes/kubernetes/pull/32831), [@hongchaodeng](https://github.com/hongchaodeng)) +* etcd: watcher centralize error handling ([#32907](https://github.com/kubernetes/kubernetes/pull/32907), [@hongchaodeng](https://github.com/hongchaodeng)) +* etcd: stop watcher when watch channel is closed ([#33003](https://github.com/kubernetes/kubernetes/pull/33003), [@hongchaodeng](https://github.com/hongchaodeng)) +* etcd3: dereference the UID pointer for a readable error message. ([#33349](https://github.com/kubernetes/kubernetes/pull/33349), [@madhusudancs](https://github.com/madhusudancs)) +* etcd3: pass SelectionPredicate instead of Filter to storage layer ([#31190](https://github.com/kubernetes/kubernetes/pull/31190), [@hongchaodeng](https://github.com/hongchaodeng)) +* etcd3: make gets for previous value in watch serialize-able ([#34089](https://github.com/kubernetes/kubernetes/pull/34089), [@wojtek-t](https://github.com/wojtek-t)) +* etcd3: minor cleanups ([#34234](https://github.com/kubernetes/kubernetes/pull/34234), [@wojtek-t](https://github.com/wojtek-t)) +* etcd3: update etcd godep to 3.0.9 to address TestWatch issues ([#32822](https://github.com/kubernetes/kubernetes/pull/32822), [@timothysc](https://github.com/timothysc)) +* etcd3: update to etcd 3.0.10 ([#33393](https://github.com/kubernetes/kubernetes/pull/33393), [@timothysc](https://github.com/timothysc)) +* etcd3: use PrevKV to remove additional get ([#34246](https://github.com/kubernetes/kubernetes/pull/34246), [@hongchaodeng](https://github.com/hongchaodeng)) +* etcd3: avoid unnecessary decoding in etcd3 client ([#34435](https://github.com/kubernetes/kubernetes/pull/34435), [@wojtek-t](https://github.com/wojtek-t)) +* etcd3: fix suite ([#32477](https://github.com/kubernetes/kubernetes/pull/32477), [@wojtek-t](https://github.com/wojtek-t)) + + + +# v1.4.4 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.4/examples) + +## Downloads for v1.4.4 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.4/kubernetes.tar.gz) | `2732bfc56ceabc872b6af3f460cbda68c2384c95a1c0c72eb33e5ff0e03dc9da` +[kubernetes-src.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.4/kubernetes-src.tar.gz) | `29c6cf1567e6b7f6c3ecb71acead083b7535b22ac20bd8166b29074e8a0f6441` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.4/kubernetes-client-darwin-386.tar.gz) | `e983b1837e4165e4bc8e361000468421f16dbd5ae90b0c49af6280dbcecf57b1` +[kubernetes-client-darwin-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.4/kubernetes-client-darwin-amd64.tar.gz) | `8c58231c8340e546336b70d86b6a76285b9f7a0c13b802b350b68610dfaedb35` +[kubernetes-client-linux-386.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.4/kubernetes-client-linux-386.tar.gz) | `33e5d2da52325367db08bcc80791cef2e21fdae176b496b063b3a37115f3f075` +[kubernetes-client-linux-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.4/kubernetes-client-linux-amd64.tar.gz) | `5fd6215ef0673f5a8e385660cf233d67d26dd79568c69e2328b103fbf1bd752a` +[kubernetes-client-linux-arm64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.4/kubernetes-client-linux-arm64.tar.gz) | `2d6d0400cd59b042e2da074cbd3b13b9dc61da1dbba04468d67119294cf72435` +[kubernetes-client-linux-arm.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.4/kubernetes-client-linux-arm.tar.gz) | `ff99f26082a77e37caa66aa07ec56bfc7963e6ac782550be5090a8b158f7e89a` +[kubernetes-client-windows-386.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.4/kubernetes-client-windows-386.tar.gz) | `82e762727a8f607180a1e339e058cc9739ad55960d3517c5170bcd5b64179f13` +[kubernetes-client-windows-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.4/kubernetes-client-windows-amd64.tar.gz) | `4de735ba72c729589efbcd2b8fc4920786fffd96850173c13cbf469819d00808` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.4/kubernetes-server-linux-amd64.tar.gz) | `6d5ff37941328df33c0efc5876bb7b82722bc584f1976fe632915db7bf3f316a` +[kubernetes-server-linux-arm64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.4/kubernetes-server-linux-arm64.tar.gz) | `6ec40848ea29c0982b89c746d716b0958438a6eb774aea20a5ef7885a7060aed` +[kubernetes-server-linux-arm.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.4/kubernetes-server-linux-arm.tar.gz) | `43d6a3260d73cfe652af2ffa7b7092444fe57429cb45e90eb99f0a70012ee033` + +## Changelog since v1.4.3 + +### Other notable changes + +* Update the GCI image to gci-dev-55-8872-18-0 ([#35243](https://github.com/kubernetes/kubernetes/pull/35243), [@maisem](https://github.com/maisem)) +* Change merge key for VolumeMount to mountPath ([#35071](https://github.com/kubernetes/kubernetes/pull/35071), [@thockin](https://github.com/thockin)) +* Turned-off etcd listening on public ports as potentially insecure. Removed ([#35192](https://github.com/kubernetes/kubernetes/pull/35192), [@jszczepkowski](https://github.com/jszczepkowski)) + * experimental support for master replication. +* Add support for vSphere Cloud Provider when deploying via kubeup on vSphere. ([#31467](https://github.com/kubernetes/kubernetes/pull/31467), [@kerneltime](https://github.com/kerneltime)) +* Fix kube vsphere.kerneltime ([#34997](https://github.com/kubernetes/kubernetes/pull/34997), [@kerneltime](https://github.com/kerneltime)) +* HPA: fixed wrong count for target replicas calculations ([#34821](https://github.com/kubernetes/kubernetes/pull/34821)). ([#34955](https://github.com/kubernetes/kubernetes/pull/34955), [@jszczepkowski](https://github.com/jszczepkowski)) +* Fix leaking ingress resources in federated ingress e2e test. ([#34652](https://github.com/kubernetes/kubernetes/pull/34652), [@quinton-hoole](https://github.com/quinton-hoole)) +* azure: add PrimaryAvailabilitySet to config, only use nodes in that set in the loadbalancer pool ([#34526](https://github.com/kubernetes/kubernetes/pull/34526), [@colemickens](https://github.com/colemickens)) +* azure: lower log priority for skipped nic update message ([#34730](https://github.com/kubernetes/kubernetes/pull/34730), [@colemickens](https://github.com/colemickens)) + + + +# v1.4.3 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.4/examples) + +## Downloads + +binary | sha256 hash +------ | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.3/kubernetes.tar.gz) | `c3dccccc005bc22eaf814ccb8e72b4f876167ab38ac594bb7e44c98f162a0f1c` + +## Changelog since v1.4.2-beta.1 + +### Other notable changes + +* Fix non-starting node controller in 1.4 branch ([#34895](https://github.com/kubernetes/kubernetes/pull/34895), [@wojtek-t](https://github.com/wojtek-t)) +* Cherrypick [#34851](https://github.com/kubernetes/kubernetes/pull/34851) "Only wait for cache syncs once in NodeController" ([#34861](https://github.com/kubernetes/kubernetes/pull/34861), [@jessfraz](https://github.com/jessfraz)) +* NodeController waits for informer sync before doing anything ([#34809](https://github.com/kubernetes/kubernetes/pull/34809), [@gmarek](https://github.com/gmarek)) +* Make NodeController recognize deletion tombstones ([#34786](https://github.com/kubernetes/kubernetes/pull/34786), [@davidopp](https://github.com/davidopp)) +* Fix panic in NodeController caused by receiving DeletedFinalStateUnknown object from the cache. ([#34694](https://github.com/kubernetes/kubernetes/pull/34694), [@gmarek](https://github.com/gmarek)) +* Update GlusterFS provisioning readme with endpoint/service details ([#31854](https://github.com/kubernetes/kubernetes/pull/31854), [@humblec](https://github.com/humblec)) +* Add logging for enabled/disabled API Groups ([#32198](https://github.com/kubernetes/kubernetes/pull/32198), [@deads2k](https://github.com/deads2k)) +* New federation deployment mechanism now allows non-GCP clusters. ([#34620](https://github.com/kubernetes/kubernetes/pull/34620), [@madhusudancs](https://github.com/madhusudancs)) + * Writes the federation kubeconfig to the local kubeconfig file. + + + +# v1.4.2 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.4/examples) + +## Downloads + +binary | sha256 hash +------ | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.2/kubernetes.tar.gz) | `0730e207944ca96c9d9588a571a5eff0f8fdbb0e1287423513a2b2a4baca9f77` + +## Changelog since v1.4.2-beta.1 + +### Other notable changes + +* Cherrypick [#34851](https://github.com/kubernetes/kubernetes/pull/34851) "Only wait for cache syncs once in NodeController" ([#34861](https://github.com/kubernetes/kubernetes/pull/34861), [@jessfraz](https://github.com/jessfraz)) +* NodeController waits for informer sync before doing anything ([#34809](https://github.com/kubernetes/kubernetes/pull/34809), [@gmarek](https://github.com/gmarek)) +* Make NodeController recognize deletion tombstones ([#34786](https://github.com/kubernetes/kubernetes/pull/34786), [@davidopp](https://github.com/davidopp)) +* Fix panic in NodeController caused by receiving DeletedFinalStateUnknown object from the cache. ([#34694](https://github.com/kubernetes/kubernetes/pull/34694), [@gmarek](https://github.com/gmarek)) +* Update GlusterFS provisioning readme with endpoint/service details ([#31854](https://github.com/kubernetes/kubernetes/pull/31854), [@humblec](https://github.com/humblec)) +* Add logging for enabled/disabled API Groups ([#32198](https://github.com/kubernetes/kubernetes/pull/32198), [@deads2k](https://github.com/deads2k)) +* New federation deployment mechanism now allows non-GCP clusters. ([#34620](https://github.com/kubernetes/kubernetes/pull/34620), [@madhusudancs](https://github.com/madhusudancs)) + * Writes the federation kubeconfig to the local kubeconfig file. + + + +# v1.4.2-beta.1 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.4/examples) + +## Downloads + +binary | sha256 hash +------ | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.2-beta.1/kubernetes.tar.gz) | `b72986a0adcb7e08feb580c5d72de129ac2ecc128c154fd79785bac2d2e760f7` + +## Changelog since v1.4.1 + +### Other notable changes + +* Fix base image pinning during upgrades via cluster/gce/upgrade.sh ([#33147](https://github.com/kubernetes/kubernetes/pull/33147), [@vishh](https://github.com/vishh)) +* Fix upgrade.sh image setup ([#34468](https://github.com/kubernetes/kubernetes/pull/34468), [@mtaufen](https://github.com/mtaufen)) +* Add `cifs-utils` to the hyperkube image. ([#34416](https://github.com/kubernetes/kubernetes/pull/34416), [@colemickens](https://github.com/colemickens)) +* Match GroupVersionKind against specific version ([#34010](https://github.com/kubernetes/kubernetes/pull/34010), [@soltysh](https://github.com/soltysh)) +* Fixed an issue that caused a credential error when deploying federation control plane onto a GKE cluster. ([#31747](https://github.com/kubernetes/kubernetes/pull/31747), [@madhusudancs](https://github.com/madhusudancs)) +* Test x509 intermediates correctly ([#34524](https://github.com/kubernetes/kubernetes/pull/34524), [@liggitt](https://github.com/liggitt)) + + + +# v1.4.1 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.4/examples) + +## Downloads + +binary | sha256 hash +------ | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.1/kubernetes.tar.gz) | `b51971d872426ba71bb09b9a9191bb95fc0e48390dc287a9080e3876c8e19a95` + +## Changelog since v1.4.1-beta.2 + +**No notable changes for this release** + + + +# v1.4.1-beta.2 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.4/examples) + +## Downloads + +binary | sha256 hash +------ | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.1-beta.2/kubernetes.tar.gz) | `708fbaabf17a69c69c2c9a715e152a29d47334b8c98d217ba17e9b42d6770f25` + +## Changelog since v1.4.0 + +### Other notable changes + +* Update GCI base image: ([#34156](https://github.com/kubernetes/kubernetes/pull/34156), [@adityakali](https://github.com/adityakali)) + * Enabled VXLAN and IP_SET config options in kernel to support some networking tools (ebtools) + * OpenSSL CVE fixes +* ContainerVm/GCI image: try to use ifdown/ifup if available ([#33595](https://github.com/kubernetes/kubernetes/pull/33595), [@freehan](https://github.com/freehan)) +* Make the informer library available for the go client library. ([#32718](https://github.com/kubernetes/kubernetes/pull/32718), [@mikedanese](https://github.com/mikedanese)) +* Enforce Disk based pod eviction with GCI base image in Kubelet ([#33520](https://github.com/kubernetes/kubernetes/pull/33520), [@vishh](https://github.com/vishh)) +* Fix nil pointer issue when getting metrics from volume mounter ([#34251](https://github.com/kubernetes/kubernetes/pull/34251), [@jingxu97](https://github.com/jingxu97)) +* Enable kubectl describe rs to work when apiserver does not support pods ([#33794](https://github.com/kubernetes/kubernetes/pull/33794), [@nikhiljindal](https://github.com/nikhiljindal)) +* Increase timeout for federated ingress test. ([#33610](https://github.com/kubernetes/kubernetes/pull/33610), [@quinton-hoole](https://github.com/quinton-hoole)) +* Remove headers that are unnecessary for proxy target ([#34076](https://github.com/kubernetes/kubernetes/pull/34076), [@mbohlool](https://github.com/mbohlool)) +* Support graceful termination in kube-dns ([#31894](https://github.com/kubernetes/kubernetes/pull/31894), [@MrHohn](https://github.com/MrHohn)) +* Added --log-facility flag to enhance dnsmasq logging ([#32422](https://github.com/kubernetes/kubernetes/pull/32422), [@MrHohn](https://github.com/MrHohn)) +* Split dns healthcheck into two different urls ([#32406](https://github.com/kubernetes/kubernetes/pull/32406), [@MrHohn](https://github.com/MrHohn)) +* Tune down initialDelaySeconds for readinessProbe. ([#33146](https://github.com/kubernetes/kubernetes/pull/33146), [@MrHohn](https://github.com/MrHohn)) +* Bump up addon kube-dns to v20 for graceful termination ([#33774](https://github.com/kubernetes/kubernetes/pull/33774), [@MrHohn](https://github.com/MrHohn)) +* Send recycle events from pod to pv. ([#27714](https://github.com/kubernetes/kubernetes/pull/27714), [@jsafrane](https://github.com/jsafrane)) +* Limit the number of names per image reported in the node status ([#32914](https://github.com/kubernetes/kubernetes/pull/32914), [@yujuhong](https://github.com/yujuhong)) +* Fixes in HPA: consider only running pods; proper denominator in avg request calculations. ([#33735](https://github.com/kubernetes/kubernetes/pull/33735), [@jszczepkowski](https://github.com/jszczepkowski)) +* Fix audit_test regex for iso8601 timestamps ([#32593](https://github.com/kubernetes/kubernetes/pull/32593), [@johnbieren](https://github.com/johnbieren)) +* Limit the number of names per image reported in the node status ([#32914](https://github.com/kubernetes/kubernetes/pull/32914), [@yujuhong](https://github.com/yujuhong)) +* Fix the DOCKER_OPTS appending bug. ([#33163](https://github.com/kubernetes/kubernetes/pull/33163), [@DjangoPeng](https://github.com/DjangoPeng)) +* Remove cpu limits for dns pod to avoid CPU starvation ([#33227](https://github.com/kubernetes/kubernetes/pull/33227), [@vishh](https://github.com/vishh)) +* Fixes memory/goroutine leak in Federation Service controller. ([#33359](https://github.com/kubernetes/kubernetes/pull/33359), [@shashidharatd](https://github.com/shashidharatd)) +* Use UpdateStatus, not Update, to add LoadBalancerStatus to Federated Ingress. ([#33605](https://github.com/kubernetes/kubernetes/pull/33605), [@quinton-hoole](https://github.com/quinton-hoole)) +* Initialize podsWithAffinity to avoid scheduler panic ([#33967](https://github.com/kubernetes/kubernetes/pull/33967), [@xiang90](https://github.com/xiang90)) +* Heal the namespaceless ingresses in federation e2e. ([#33977](https://github.com/kubernetes/kubernetes/pull/33977), [@quinton-hoole](https://github.com/quinton-hoole)) +* Add missing argument to log message in federated ingress controller. ([#34158](https://github.com/kubernetes/kubernetes/pull/34158), [@quinton-hoole](https://github.com/quinton-hoole)) +* Fix issue in updating device path when volume is attached multiple times ([#33796](https://github.com/kubernetes/kubernetes/pull/33796), [@jingxu97](https://github.com/jingxu97)) +* To reduce memory usage to reasonable levels in smaller clusters, kube-apiserver now sets the deserialization cache size based on the target memory usage. ([#34000](https://github.com/kubernetes/kubernetes/pull/34000), [@wojtek-t](https://github.com/wojtek-t)) +* Fix possible panic in PodAffinityChecker ([#33086](https://github.com/kubernetes/kubernetes/pull/33086), [@ivan4th](https://github.com/ivan4th)) +* Fix race condition in setting node statusUpdateNeeded flag ([#32807](https://github.com/kubernetes/kubernetes/pull/32807), [@jingxu97](https://github.com/jingxu97)) +* kube-proxy: Add a lower-bound for conntrack (128k default) ([#33051](https://github.com/kubernetes/kubernetes/pull/33051), [@thockin](https://github.com/thockin)) +* Use patched golang1.7.1 for cross-builds targeting darwin ([#33803](https://github.com/kubernetes/kubernetes/pull/33803), [@ixdy](https://github.com/ixdy)) +* Move HighWaterMark to the top of the struct in order to fix arm ([#33117](https://github.com/kubernetes/kubernetes/pull/33117), [@luxas](https://github.com/luxas)) +* Move HighWaterMark to the top of the struct in order to fix arm, second time ([#33376](https://github.com/kubernetes/kubernetes/pull/33376), [@luxas](https://github.com/luxas)) + + + +# v1.4.0 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.4/examples) + +## Downloads + +binary | sha256 hash +------ | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.0/kubernetes.tar.gz) | `6cf3d78230f7659b87fa399a56a7aaed1fde6a73be9d05e25feedacfbd8d5a16` + +## Major Themes + +- **Simplified User Experience** + - Easier to get a cluster up and running (eg: `kubeadm`, intra-cluster bootstrapping) + - Easier to understand a cluster (eg: API audit logs, server-based API defaults) +- **Stateful Appplication Support** + - Enhanced persistence capabilities (eg: `StorageClasses`, new volume plugins) + - New resources and scheduler features (eg: `ScheduledJob` resource, pod/node affinity/anti-affinity) +- **Cluster Federation** + - Global Multi-cluster HTTP(S) Ingress across GCE and GKE clusters. + - Expanded support for federated hybrid-cloud resources including ReplicaSets, Secrets, Namespaces and Events. +- **Security** + - Increased pod-level security granularity (eg: Container Image Policies, AppArmor and `sysctl` support) + - Increased cluster-level security granularity (eg: Access Review API) + +## Features + +This is the first release tracked via the use of the [kubernetes/features](https://github.com/kubernetes/features) issues repo. Each Feature issue is owned by a Special Interest Group from [kubernetes/community](https://github.com/kubernetes/community) + +- **API Machinery** + - [alpha] Generate audit logs for every request user performs against secured API server endpoint. ([docs](http://kubernetes.io/docs/admin/audit/)) ([kubernetes/features#22](https://github.com/kubernetes/features/issues/22)) + - [beta] `kube-apiserver` now publishes a swagger 2.0 spec in addition to a swagger 1.2 spec ([kubernetes/features#53](https://github.com/kubernetes/features/issues/53)) + - [beta] Server-side garbage collection is enabled by default. See [user-guide](http://kubernetes.io/docs/user-guide/garbage-collection/) +- **Apps** + - [alpha] Introducing 'ScheduledJobs', which allow running time based Jobs, namely once at a specified time or repeatedly at specified point in time. ([docs](http://kubernetes.io/docs/user-guide/scheduled-jobs/)) ([kubernetes/features#19](https://github.com/kubernetes/features/issues/19)) +- **Auth** + - [alpha] Container Image Policy allows an access controller to determine whether a pod may be scheduled based on a policy ([docs](http://kubernetes.io/docs/admin/admission-controllers/#imagepolicywebhook)) ([kubernetes/features#59](https://github.com/kubernetes/features/issues/59)) + - [alpha] Access Review APIs expose authorization engine to external inquiries for delegation, inspection, and debugging ([docs](http://kubernetes.io/docs/admin/authorization/)) ([kubernetes/features#37](https://github.com/kubernetes/features/issues/37)) +- **Cluster Lifecycle** + - [alpha] Ensure critical cluster infrastructure pods (Heapster, DNS, etc.) can schedule by evicting regular pods when necessary to make the critical pods schedule. ([docs](http://kubernetes.io/docs/admin/rescheduler/#guaranteed-scheduling-of-critical-add-on-pods)) ([kubernetes/features#62](https://github.com/kubernetes/features/issues/62)) + - [alpha] Simplifies bootstrapping of TLS secured communication between the API server and kubelet. ([docs](http://kubernetes.io/docs/admin/master-node-communication/#kubelet-tls-bootstrap)) ([kubernetes/features#43](https://github.com/kubernetes/features/issues/43)) + - [alpha] The `kubeadm` tool makes it much easier to bootstrap Kubernetes. ([docs](http://kubernetes.io/docs/getting-started-guides/kubeadm/)) ([kubernetes/features#11](https://github.com/kubernetes/features/issues/11)) +- **Federation** + - [alpha] Creating a `Federated Ingress` is as simple as submitting + an `Ingress` creation request to the Federation API Server. The + Federation control system then creates and maintains a single + global virtual IP to load balance incoming HTTP(S) traffic across + some or all the registered clusters, across all regions. Google's + GCE L7 LoadBalancer is the first supported implementation, and + is available in this release. + ([docs](http://kubernetes.io/docs/user-guide/federation/federated-ingress.md)) + ([kubernetes/features#82](https://github.com/kubernetes/features/issues/82)) + - [beta] `Federated Replica Sets` create and maintain matching + `Replica Set`s in some or all clusters in a federation, with the + desired replica count distributed equally or according to + specified per-cluster weights. + ([docs](http://kubernetes.io/docs/user-guide/federation/federated-replicasets.md)) + ([kubernetes/features#46](https://github.com/kubernetes/features/issues/46)) + - [beta] `Federated Secrets` are created and kept consistent across all clusters in a federation. + ([docs](http://kubernetes.io/docs/user-guide/federation/federated-secrets.md)) + ([kubernetes/features#68](https://github.com/kubernetes/features/issues/68)) + - [beta] Federation API server gained support for events and many + federation controllers now report important events. + ([docs](http://kubernetes.io/docs/user-guide/federation/events)) + ([kubernetes/features#70](https://github.com/kubernetes/features/issues/70)) + - [alpha] Creating a `Federated Namespace` causes matching + `Namespace`s to be created and maintained in all the clusters registered with that federation. ([docs](http://kubernetes.io/docs/user-guide/federation/federated-namespaces.md)) ([kubernetes/features#69](https://github.com/kubernetes/features/issues/69)) + - [alpha] ingress has alpha support for a single master multi zone cluster ([docs](http://kubernetes.io/docs/user-guide/ingress.md#failing-across-availability-zones)) ([kubernetes/features#52](https://github.com/kubernetes/features/issues/52)) +- **Network** + - [alpha] Service LB now has alpha support for preserving client source IP ([docs](http://kubernetes.io/docs/user-guide/load-balancer/)) ([kubernetes/features#27](https://github.com/kubernetes/features/issues/27)) +- **Node** + - [alpha] Publish node performance dashboard at http://node-perf-dash.k8s.io/#/builds ([docs](https://github.com/kubernetes/contrib/blob/master/node-perf-dash/README.md)) ([kubernetes/features#83](https://github.com/kubernetes/features/issues/83)) + - [alpha] Pods now have alpha support for setting whitelisted, safe sysctls. Unsafe sysctls can be whitelisted on the kubelet. ([docs](http://kubernetes.io/docs/admin/sysctls/)) ([kubernetes/features#34](https://github.com/kubernetes/features/issues/34)) + - [beta] AppArmor profiles can be specified & applied to pod containers ([docs](http://kubernetes.io/docs/admin/apparmor/)) ([kubernetes/features#24](https://github.com/kubernetes/features/issues/24)) + - [beta] Cluster policy to control access and defaults of security related features ([docs](http://kubernetes.io/docs/user-guide/pod-security-policy/)) ([kubernetes/features#5](https://github.com/kubernetes/features/issues/5)) + - [stable] kubelet is able to evict pods when it observes disk pressure ([docs](http://kubernetes.io/docs/admin/out-of-resource/)) ([kubernetes/features#39](https://github.com/kubernetes/features/issues/39)) + - [stable] Automated docker validation results posted to https://k8s-testgrid.appspot.com/docker [kubernetes/features#57](https://github.com/kubernetes/features/issues/57) +- **Scheduling** + - [alpha] Allows pods to require or prohibit (or prefer or prefer not) co-scheduling on the same node (or zone or other topology domain) as another set of pods. ([docs](http://kubernetes.io/docs/user-guide/node-selection/) ([kubernetes/features#51](https://github.com/kubernetes/features/issues/51)) +- **Storage** + - [beta] Persistent Volume provisioning now supports multiple provisioners using StorageClass configuration. ([docs](http://kubernetes.io/docs/user-guide/persistent-volumes/)) ([kubernetes/features#36](https://github.com/kubernetes/features/issues/36)) + - [stable] New volume plugin for the Quobyte Distributed File System ([docs](http://kubernetes.io/docs/user-guide/volumes/#quobyte)) ([kubernetes/features#80](https://github.com/kubernetes/features/issues/80)) + - [stable] New volume plugin for Azure Data Disk ([docs](http://kubernetes.io/docs/user-guide/volumes/#azurediskvolume)) ([kubernetes/features#79](https://github.com/kubernetes/features/issues/79)) +- **UI** + - [stable] Kubernetes Dashboard UI - a great looking Kubernetes Dashboard UI with 90% CLI parity for at-a-glance management. [docs](https://github.com/kubernetes/dashboard) + - [stable] `kubectl` no longer applies defaults before sending objects to the server in create and update requests, allowing the server to apply the defaults. ([kubernetes/features#55](https://github.com/kubernetes/features/issues/55)) + +## Known Issues + +- Completed pods lose logs across node upgrade ([#32324](https://github.com/kubernetes/kubernetes/issues/32324)) +- Pods are deleted across node upgrade ([#32323](https://github.com/kubernetes/kubernetes/issues/32323)) +- Secure master -> node communication ([#11816](https://github.com/kubernetes/kubernetes/issues/11816)) +- upgrading master doesn't upgrade kubectl ([#32538](https://github.com/kubernetes/kubernetes/issues/32538)) +- Specific error message on failed rolling update issued by older kubectl against 1.4 master ([#32751](https://github.com/kubernetes/kubernetes/issues/32751)) +- bump master cidr range from /30 to /29 ([#32886](https://github.com/kubernetes/kubernetes/issues/32886)) +- non-hostNetwork daemonsets will almost always have a pod that fails to schedule ([#32900](https://github.com/kubernetes/kubernetes/issues/32900)) +- Service loadBalancerSourceRanges doesn't respect updates ([#33033](https://github.com/kubernetes/kubernetes/issues/33033)) +- disallow user to update loadbalancerSourceRanges ([#33346](https://github.com/kubernetes/kubernetes/issues/33346)) + +## Notable Changes to Existing Behavior + +### Deployments + +- ReplicaSets of paused Deployments are now scaled while the Deployment is paused. This is retroactive to existing Deployments. +- When scaling a Deployment during a rollout, the ReplicaSets of all Deployments are now scaled proportionally based on the number of replicas they each have instead of only scaling the newest ReplicaSet. + +### kubectl rolling-update: < v1.4.0 client vs >=v1.4.0 cluster + +Old version kubectl's rolling-update command is compatible with Kubernetes 1.4 and higher only if you specify a new replication controller name. You will need to update to kubectl 1.4 or higher to use the rolling update command against a 1.4 cluster if you want to keep the original name, or you'll have to do two rolling updates. + +If you do happen to use old version kubectl's rolling update against a 1.4 cluster, it will fail, usually with an error message that will direct you here. If you saw that error, then don't worry, the operation succeeded except for the part where the new replication controller is renamed back to the old name. You can just do another rolling update using kubectl 1.4 or higher to change the name back: look for a replication controller that has the original name plus a random suffix. + +Unfortunately, there is a much rarer second possible failure mode: the replication controller gets renamed to the old name, but there is a duplicated set of pods in the cluster. kubectl will not report an error since it thinks its job is done. + +If this happens to you, you can wait at most 10 minutes for the replication controller to start a resync, the extra pods will then be deleted. Or, you can manually trigger a resync by change the replicas in the spec of the replication controller. + +### kubectl delete: < v1.4.0 client vs >=v1.4.0 cluster + +If you use an old version kubectl to delete a replication controller or replicaset, then after the delete command has returned, the replication controller or the replicaset will continue to exist in the key-value store for a short period of time (<1s). You probably will not notice any difference if you use kubectl manually, but you might notice it if you are using kubectl in a script. + +### DELETE operation in REST API + +* **Replication controller & Replicaset**: the DELETE request of a replication controller or a replicaset becomes asynchronous by default. The object will continue to exist in the key-value store for some time. The API server will set its metadata.deletionTimestamp, add the "orphan" finalizer to its metadata.finalizers. The object will be deleted from the key-value store after the garbage collector orphans its dependents. Please refer to this [user-guide](http://kubernetes.io/docs/user-guide/garbage-collector/) for more information regarding the garbage collection. + +* **Other objects**: no changes unless you explicitly request orphaning. + +## Action Required Before Upgrading + +- If you are using Kubernetes to manage `docker` containers, please be aware Kubernetes has been validated to work with docker 1.9.1, docker 1.11.2 (#23397), and docker 1.12.0 (#28698) +- If you upgrade your apiserver to 1.4.x but leave your kubelets at 1.3.x, they will not report init container status, but init containers will work properly. Upgrading kubelets to 1.4.x fixes this. +- The NamespaceExists and NamespaceAutoProvision admission controllers have been removed, use the NamespaceLifecycle admission controller instead (#31250, @derekwaynecarr) +- If upgrading Cluster Federation components from 1.3.x, the `federation-apiserver` and `federation-controller-manager` binaries have been folded into `hyperkube`. Please switch to using that instead. (#29929, @madhusudancs) +- If you are using the PodSecurityPolicy feature (eg: `kubectl get podsecuritypolicy` does not error, and returns one or more objects), be aware that init containers have moved from alpha to beta. If there are any pods with the key `pods.beta.kubernetes.io/init-containers`, then that pod may not have been filtered by the PodSecurityPolicy. You should find such pods and either delete them or audit them to ensure they do not use features that you intend to be blocked by PodSecurityPolicy. (#31026, @erictune) +- If upgrading Cluster Federation components from 1.3.x, please ensure your cluster name is a valid DNS label (#30956, @nikhiljindal) +- kubelet's `--config` flag has been deprecated, use `--pod-manifest-path` instead (#29999, @mtaufen) +- If upgrading Cluster Federation components from 1.3.x, be aware the federation-controller-manager now looks for a different secret name. Run the following to migrate (#28938, @madhusudancs) + +``` +kubectl --namespace=federation get secret federation-apiserver-secret -o json | sed 's/federation-apiserver-secret/federation-apiserver-kubeconfig/g' | kubectl create -f - +# optionally, remove the old secret +kubectl delete secret --namespace=federation federation-apiserver-secret +``` + +- Kubernetes components no longer handle panics, and instead actively crash. All Kubernetes components should be run by something that actively restarts them. This is true of the default setups, but those with custom environments may need to double-check (#28800, @lavalamp) +- kubelet now defaults to `--cloud-provider=auto-detect`, use `--cloud-provider=''` to preserve previous default of no cloud provider (#28258, @vishh) + +## Previous Releases Included in v1.4.0 + +For a detailed list of all changes that were included in this release, please refer to the following CHANGELOG entries: + +- [v1.4.0-beta.10](CHANGELOG.md#v140-beta10) +- [v1.4.0-beta.8](CHANGELOG.md#v140-beta8) +- [v1.4.0-beta.7](CHANGELOG.md#v140-beta7) +- [v1.4.0-beta.6](CHANGELOG.md#v140-beta6) +- [v1.4.0-beta.5](CHANGELOG.md#v140-beta5) +- [v1.4.0-beta.3](CHANGELOG.md#v140-beta3) +- [v1.4.0-beta.2](CHANGELOG.md#v140-beta2) +- [v1.4.0-beta.1](CHANGELOG.md#v140-beta1) +- [v1.4.0-alpha.3](CHANGELOG.md#v140-alpha3) +- [v1.4.0-alpha.2](CHANGELOG.md#v140-alpha2) +- [v1.4.0-alpha.1](CHANGELOG.md#v140-alpha1) + + + +# v1.4.0-beta.11 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.4/examples) + +## Downloads + +binary | sha256 hash +------ | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.0-beta.11/kubernetes.tar.gz) | `993e785f501d2fa86c9035b55a875c420059b3541a32b5822acf5fefb9a61916` + +## Changelog since v1.4.0-beta.10 + +**No notable changes for this release** + + + +# v1.4.0-beta.10 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.4/examples) + +## Downloads + +binary | sha256 hash +------ | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.0-beta.10/kubernetes.tar.gz) | `f3f1f0e5cf8234d640c8e9444c73343f04be8685f92b6a1ad66190f84de2e3a7` + +## Changelog since v1.4.0-beta.8 + +### Other notable changes + +* Remove cpu limits for dns pod to avoid CPU starvation ([#33227](https://github.com/kubernetes/kubernetes/pull/33227), [@vishh](https://github.com/vishh)) +* Resolves x509 verification issue with masters dialing nodes when started with --kubelet-certificate-authority ([#33141](https://github.com/kubernetes/kubernetes/pull/33141), [@liggitt](https://github.com/liggitt)) +* Upgrading Container-VM base image for k8s on GCE. Brief changelog as follows: ([#32738](https://github.com/kubernetes/kubernetes/pull/32738), [@Amey-D](https://github.com/Amey-D)) + * - Fixed performance regression in veth device driver + * - Docker and related binaries are statically linked + * - Fixed the issue of systemd being oom-killable +* Update cAdvisor to v0.24.0 - see the [cAdvisor changelog](https://github.com/google/cadvisor/blob/v0.24.0/CHANGELOG.md) for the full list of changes. ([#33052](https://github.com/kubernetes/kubernetes/pull/33052), [@timstclair](https://github.com/timstclair)) + + + +# v1.4.0-beta.8 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.4/examples) + +## Downloads + +binary | sha256 hash +------ | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.0-beta.8/kubernetes.tar.gz) | `31701c5c675c137887b58d7914e39b4c8a9c03767c0c3d89198a52f4476278ca` + +## Changelog since v1.4.0-beta.7 + +**No notable changes for this release** + + + +# v1.4.0-beta.7 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.4/examples) + +## Downloads + +binary | sha256 hash +------ | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.0-beta.7/kubernetes.tar.gz) | `51e8f3ebe55cfcfbe582dd6e5ea60ae125d89373477571c0faee70eff51bab31` + +## Changelog since v1.4.0-beta.6 + +### Other notable changes + +* Use a patched go1.7.1 for building linux/arm ([#32517](https://github.com/kubernetes/kubernetes/pull/32517), [@luxas](https://github.com/luxas)) +* Specific error message on failed rolling update issued by older kubectl against 1.4 master ([#32751](https://github.com/kubernetes/kubernetes/pull/32751), [@caesarxuchao](https://github.com/caesarxuchao)) + + + +# v1.4.0-beta.6 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.4/examples) + +## Downloads + +binary | sha256 hash +------ | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.0-beta.6/kubernetes.tar.gz) | `0b0158e4745663b48c55527247d3e64cc3649f875fa7611fc7b38fa5c3b736bd` + +## Changelog since v1.4.0-beta.5 + +### Other notable changes + +* Set Dashboard UI to final 1.4 version ([#32666](https://github.com/kubernetes/kubernetes/pull/32666), [@bryk](https://github.com/bryk)) + + + +# v1.4.0-beta.5 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.4/examples) + +## Downloads + +binary | sha256 hash +------ | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.0-beta.5/kubernetes.tar.gz) | `ec6b233b0448472e05e6820b8ea1644119ae4f9fe3a1516cf978117c19bad0a9` + +## Changelog since v1.4.0-beta.3 + +### Other notable changes + +* Bumped Heapster to v1.2.0. ([#32649](https://github.com/kubernetes/kubernetes/pull/32649), [@piosz](https://github.com/piosz)) + * More details about the release https://github.com/kubernetes/heapster/releases/tag/v1.2.0 +* Docker digest validation is too strict ([#32627](https://github.com/kubernetes/kubernetes/pull/32627), [@smarterclayton](https://github.com/smarterclayton)) +* Added new kubelet flags `--cni-bin-dir` and `--cni-conf-dir` to specify where CNI files are located. ([#32151](https://github.com/kubernetes/kubernetes/pull/32151), [@bboreham](https://github.com/bboreham)) + * Fixed CNI configuration on GCI platform when using CNI. +* make --runtime-config=api/all=true|false work ([#32582](https://github.com/kubernetes/kubernetes/pull/32582), [@jlowdermilk](https://github.com/jlowdermilk)) +* AWS: Change default networking for kube-up to kubenet ([#32239](https://github.com/kubernetes/kubernetes/pull/32239), [@zmerlynn](https://github.com/zmerlynn)) + + + +# v1.4.0-beta.3 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.4/examples) + +## Downloads + +binary | sha256 hash +------ | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.0-beta.3/kubernetes.tar.gz) | `5a6802703c6b0b652e72166a4347fee7899c46205463f6797dc78f8086876465` + +## Changelog since v1.4.0-beta.2 + +**No notable changes for this release** + +## Behavior changes caused by enabling the garbage collector + +### kubectl rolling-update + +Old version kubectl's rolling-update command is compatible with Kubernetes 1.4 and higher **only if** you specify a new replication controller name. You will need to update to kubectl 1.4 or higher to use the rolling update command against a 1.4 cluster if you want to keep the original name, or you'll have to do two rolling updates. + +If you do happen to use old version kubectl's rolling update against a 1.4 cluster, it will fail, usually with an error message that will direct you here. If you saw that error, then don't worry, the operation succeeded except for the part where the new replication controller is renamed back to the old name. You can just do another rolling update using kubectl 1.4 or higher to change the name back: look for a replication controller that has the original name plus a random suffix. + +Unfortunately, there is a much rarer second possible failure mode: the replication controller gets renamed to the old name, but there is a duplicate set of pods in the cluster. kubectl will not report an error since it thinks its job is done. + +If this happens to you, you can wait at most 10 minutes for the replication controller to start a resync, the extra pods will then be deleted. Or, you can manually trigger a resync by change the replicas in the spec of the replication controller. + +### kubectl delete + +If you use an old version kubectl to delete a replication controller or a replicaset, then after the delete command has returned, the replication controller or the replicaset will continue to exist in the key-value store for a short period of time (<1s). You probably will not notice any difference if you use kubectl manually, but you might notice it if you are using kubectl in a script. To fix it, you can poll the API server to confirm the object is deleted. + +### DELETE operation in REST API + +* **Replication controller & Replicaset**: the DELETE request of a replication controller or a replicaset becomes asynchronous by default. The object will continue to exist in the key-value store for some time. The API server will set its metadata.deletionTimestamp, add the "orphan" finalizer to its metadata.finalizers. The object will be deleted from the key-value store after the garbage collector orphans its dependents. Please refer to this [user-guide](http://kubernetes.io/docs/user-guide/garbage-collector/) for more information regarding the garbage collection. + +* **Other objects**: no changes unless you explicitly request orphaning. + + +# v1.4.0-beta.2 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.4/examples) + +## Downloads + +binary | sha256 hash +------ | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.0-beta.2/kubernetes.tar.gz) | `0c6f54eb9059090c88f10a448ed5bcb6ef663abbd76c79281fd8dcb72faa6315` + +## Changelog since v1.4.0-beta.1 + +### Other notable changes + +* Fix a bug in kubelet hostport logic which flushes KUBE-MARK-MASQ iptables chain ([#32413](https://github.com/kubernetes/kubernetes/pull/32413), [@freehan](https://github.com/freehan)) +* Stick to 2.2.1 etcd ([#32404](https://github.com/kubernetes/kubernetes/pull/32404), [@caesarxuchao](https://github.com/caesarxuchao)) +* Use etcd 2.3.7 ([#32359](https://github.com/kubernetes/kubernetes/pull/32359), [@wojtek-t](https://github.com/wojtek-t)) +* AWS: Change default networking for kube-up to kubenet ([#32239](https://github.com/kubernetes/kubernetes/pull/32239), [@zmerlynn](https://github.com/zmerlynn)) +* Make sure finalizers prevent deletion on storage that supports graceful deletion ([#32351](https://github.com/kubernetes/kubernetes/pull/32351), [@caesarxuchao](https://github.com/caesarxuchao)) +* Some components like kube-dns and kube-proxy could fail to load the service account token when started within a pod. Properly handle empty configurations to try loading the service account config. ([#31947](https://github.com/kubernetes/kubernetes/pull/31947), [@smarterclayton](https://github.com/smarterclayton)) +* Use federated namespace instead of the bootstrap cluster's namespace in Ingress e2e tests. ([#32105](https://github.com/kubernetes/kubernetes/pull/32105), [@madhusudancs](https://github.com/madhusudancs)) + + + +# v1.4.0-beta.1 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.4/examples) + +## Downloads + +binary | sha256 hash +------ | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.0-beta.1/kubernetes.tar.gz) | `837296455933629b6792a8954f2c5b17d55c1149c12b644101f2f02549d06d25` + +## Changelog since v1.4.0-alpha.3 + +### Action Required + +* The NamespaceExists and NamespaceAutoProvision admission controllers have been removed. ([#31250](https://github.com/kubernetes/kubernetes/pull/31250), [@derekwaynecarr](https://github.com/derekwaynecarr)) + * All cluster operators should use NamespaceLifecycle. +* Federation binaries and their corresponding docker images - `federation-apiserver` and `federation-controller-manager` are now folded in to the `hyperkube` binary. If you were using one of these binaries or docker images, please switch to using the `hyperkube` version. Please refer to the federation manifests - `federation/manifests/federation-apiserver.yaml` and `federation/manifests/federation-controller-manager-deployment.yaml` for examples. ([#29929](https://github.com/kubernetes/kubernetes/pull/29929), [@madhusudancs](https://github.com/madhusudancs)) +* Use upgraded container-vm by default on worker nodes for GCE k8s clusters ([#31023](https://github.com/kubernetes/kubernetes/pull/31023), [@vishh](https://github.com/vishh)) + +### Other notable changes + +* Enable kubelet eviction whenever inodes free is < 5% on GCE ([#31545](https://github.com/kubernetes/kubernetes/pull/31545), [@vishh](https://github.com/vishh)) +* Move StorageClass to a storage group ([#31886](https://github.com/kubernetes/kubernetes/pull/31886), [@deads2k](https://github.com/deads2k)) +* Some components like kube-dns and kube-proxy could fail to load the service account token when started within a pod. Properly handle empty configurations to try loading the service account config. ([#31947](https://github.com/kubernetes/kubernetes/pull/31947), [@smarterclayton](https://github.com/smarterclayton)) +* Removed comments in json config when using kubectl edit with -o json ([#31685](https://github.com/kubernetes/kubernetes/pull/31685), [@jellonek](https://github.com/jellonek)) +* fixes invalid null selector issue in sysdig example yaml ([#31393](https://github.com/kubernetes/kubernetes/pull/31393), [@baldwinSPC](https://github.com/baldwinSPC)) +* Rescheduler which ensures that critical pods are always scheduled enabled by default in GCE. ([#31974](https://github.com/kubernetes/kubernetes/pull/31974), [@piosz](https://github.com/piosz)) +* retry oauth token fetch in gce cloudprovider ([#32021](https://github.com/kubernetes/kubernetes/pull/32021), [@mikedanese](https://github.com/mikedanese)) +* Deprecate the old cbr0 and flannel networking modes ([#31197](https://github.com/kubernetes/kubernetes/pull/31197), [@freehan](https://github.com/freehan)) +* AWS: fix volume device assignment race condition ([#31090](https://github.com/kubernetes/kubernetes/pull/31090), [@justinsb](https://github.com/justinsb)) +* The certificates API group has been renamed to certificates.k8s.io ([#31887](https://github.com/kubernetes/kubernetes/pull/31887), [@liggitt](https://github.com/liggitt)) +* Increase Dashboard UI version to v1.4.0-beta2 ([#31518](https://github.com/kubernetes/kubernetes/pull/31518), [@bryk](https://github.com/bryk)) +* Fixed incomplete kubectl bash completion. ([#31333](https://github.com/kubernetes/kubernetes/pull/31333), [@xingzhou](https://github.com/xingzhou)) +* Added liveness probe to Heapster service. ([#31878](https://github.com/kubernetes/kubernetes/pull/31878), [@mksalawa](https://github.com/mksalawa)) +* Adding clusters to the list of valid resources printed by kubectl help ([#31719](https://github.com/kubernetes/kubernetes/pull/31719), [@nikhiljindal](https://github.com/nikhiljindal)) +* Kubernetes server components using `kubeconfig` files no longer default to `http://localhost:8080`. Administrators must specify a server value in their kubeconfig files. ([#30808](https://github.com/kubernetes/kubernetes/pull/30808), [@smarterclayton](https://github.com/smarterclayton)) +* Update influxdb to 0.12 ([#31519](https://github.com/kubernetes/kubernetes/pull/31519), [@piosz](https://github.com/piosz)) +* Include security options in the container created event ([#31557](https://github.com/kubernetes/kubernetes/pull/31557), [@timstclair](https://github.com/timstclair)) +* Federation can now be deployed using the `federation/deploy/deploy.sh` script. This script does not depend on any of the development environment shell library/scripts. This is an alternative to the current `federation-up.sh`/`federation-down.sh` scripts. Both the scripts are going to co-exist in this release, but the `federation-up.sh`/`federation-down.sh` scripts might be removed in a future release in favor of `federation/deploy/deploy.sh` script. ([#30744](https://github.com/kubernetes/kubernetes/pull/30744), [@madhusudancs](https://github.com/madhusudancs)) +* Add get/delete cluster, delete context to kubectl config ([#29821](https://github.com/kubernetes/kubernetes/pull/29821), [@alexbrand](https://github.com/alexbrand)) +* rkt: Force `rkt fetch` to fetch from remote to conform the image pull policy. ([#31378](https://github.com/kubernetes/kubernetes/pull/31378), [@yifan-gu](https://github.com/yifan-gu)) +* Allow services which use same port, different protocol to use the same nodePort for both ([#30253](https://github.com/kubernetes/kubernetes/pull/30253), [@AdoHe](https://github.com/AdoHe)) +* Handle overlapping deployments gracefully ([#30730](https://github.com/kubernetes/kubernetes/pull/30730), [@janetkuo](https://github.com/janetkuo)) +* Remove environment variables and internal Kubernetes Docker labels from cAdvisor Prometheus metric labels. ([#31064](https://github.com/kubernetes/kubernetes/pull/31064), [@grobie](https://github.com/grobie)) + * Old behavior: + * - environment variables explicitly whitelisted via --docker-env-metadata-whitelist were exported as `container_env_*=*`. Default is zero so by default non were exported + * - all docker labels were exported as `container_label_*=*` + * New behavior: + * - Only `container_name`, `pod_name`, `namespace`, `id`, `image`, and `name` labels are exposed + * - no environment variables will be exposed ever via /metrics, even if whitelisted +* Filter duplicate network packets in promiscuous bridge mode (with ebtables) ([#28717](https://github.com/kubernetes/kubernetes/pull/28717), [@freehan](https://github.com/freehan)) +* Refactor to simplify the hard-traveled path of the KubeletConfiguration object ([#29216](https://github.com/kubernetes/kubernetes/pull/29216), [@mtaufen](https://github.com/mtaufen)) +* Fix overflow issue in controller-manager rate limiter ([#31396](https://github.com/kubernetes/kubernetes/pull/31396), [@foxish](https://github.com/foxish)) + + + +# v1.4.0-alpha.3 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/master/examples) + +## Downloads + +binary | sha256 hash +------ | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.0-alpha.3/kubernetes.tar.gz) | `8055f0373e3b6bdee865749ef9bcfc765396a40f39ec2fa3cd31b675d1bbf5d9` + +## Changelog since v1.4.0-alpha.2 + +### Action Required + +* Moved init-container feature from alpha to beta. ([#31026](https://github.com/kubernetes/kubernetes/pull/31026), [@erictune](https://github.com/erictune)) + * Security Action Required: + * This only applies to you if you use the PodSecurityPolicy feature. You are using that feature if `kubectl get podsecuritypolicy` returns one or more objects. If it returns an error, you are not using it. + * If there are any pods with the key `pods.beta.kubernetes.io/init-containers`, then that pod may not have been filtered by the PodSecurityPolicy. You should find such pods and either delete them or audit them to ensure they do not use features that you intend to be blocked by PodSecurityPolicy. + * Explanation of Feature + * In 1.3, an init container is specified with this annotation key + * on the pod or pod template: `pods.alpha.kubernetes.io/init-containers`. + * In 1.4, either that key or this key: `pods.beta.kubernetes.io/init-containers`, + * can be used. + * When you GET an object, you will see both annotation keys with the same values. + * You can safely roll back from 1.4 to 1.3, and things with init-containers + * will still work (pods, deployments, etc). + * If you are running 1.3, only use the alpha annotation, or it may be lost when + * rolling forward. + * The status has moved from annotation key + * `pods.beta.kubernetes.io/init-container-statuses` to + * `pods.beta.kubernetes.io/init-container-statuses`. + * Any code that inspects this annotation should be changed to use the new key. + * State of Initialization will continue to be reported in both pods.alpha.kubernetes.io/initialized + * and in `podStatus.conditions.{status: "True", type: Initialized}` +* Action required: federation-only: Please update your cluster name to be a valid DNS label. ([#30956](https://github.com/kubernetes/kubernetes/pull/30956), [@nikhiljindal](https://github.com/nikhiljindal)) + * Updating federation.v1beta1.Cluster API to disallow subdomains as valid cluster names. Only DNS labels are allowed as valid cluster names now. +* [Kubelet] Rename `--config` to `--pod-manifest-path`. `--config` is deprecated. ([#29999](https://github.com/kubernetes/kubernetes/pull/29999), [@mtaufen](https://github.com/mtaufen)) + +### Other notable changes + +* rkt: Improve support for privileged pod (pod whose all containers are privileged) ([#31286](https://github.com/kubernetes/kubernetes/pull/31286), [@yifan-gu](https://github.com/yifan-gu)) +* The pod annotation `security.alpha.kubernetes.io/sysctls` now allows customization of namespaced and well isolated kernel parameters (sysctls), starting with `kernel.shm_rmid_forced`, `net.ipv4.ip_local_port_range` and `net.ipv4.tcp_syncookies` for Kubernetes 1.4. ([#27180](https://github.com/kubernetes/kubernetes/pull/27180), [@sttts](https://github.com/sttts)) + * The pod annotation `security.alpha.kubernetes.io/unsafe-sysctls` allows customization of namespaced sysctls where isolation is unclear. Unsafe sysctls must be enabled at-your-own-risk on the kubelet with the `--experimental-allowed-unsafe-sysctls` flag. Future versions will improve on resource isolation and more sysctls will be considered safe. +* Increase request timeout based on termination grace period ([#31275](https://github.com/kubernetes/kubernetes/pull/31275), [@dims](https://github.com/dims)) +* Fixed two issues of kubectl bash completion. ([#31135](https://github.com/kubernetes/kubernetes/pull/31135), [@xingzhou](https://github.com/xingzhou)) +* Reduced size of fluentd images. ([#31239](https://github.com/kubernetes/kubernetes/pull/31239), [@aledbf](https://github.com/aledbf)) +* support Azure data disk volume ([#29836](https://github.com/kubernetes/kubernetes/pull/29836), [@rootfs](https://github.com/rootfs)) +* fix Openstack provider to allow more than one service port for lbaas v2 ([#30649](https://github.com/kubernetes/kubernetes/pull/30649), [@dagnello](https://github.com/dagnello)) +* Add kubelet --network-plugin-mtu flag for MTU selection ([#30376](https://github.com/kubernetes/kubernetes/pull/30376), [@justinsb](https://github.com/justinsb)) +* Let Services preserve client IPs and not double-hop from external LBs (alpha) ([#29409](https://github.com/kubernetes/kubernetes/pull/29409), [@girishkalele](https://github.com/girishkalele)) +* [Kubelet] Optionally consume configuration from <node-name> named config maps ([#30090](https://github.com/kubernetes/kubernetes/pull/30090), [@mtaufen](https://github.com/mtaufen)) +* [GarbageCollector] Allow per-resource default garbage collection behavior ([#30838](https://github.com/kubernetes/kubernetes/pull/30838), [@caesarxuchao](https://github.com/caesarxuchao)) +* Action required: If you have a running federation control plane, you will have to ensure that for all federation resources, the corresponding namespace exists in federation control plane. ([#31139](https://github.com/kubernetes/kubernetes/pull/31139), [@nikhiljindal](https://github.com/nikhiljindal)) + * federation-apiserver now supports NamespaceLifecycle admission control, which is enabled by default. Set the --admission-control flag on the server to change that. +* Configure webhook ([#30923](https://github.com/kubernetes/kubernetes/pull/30923), [@Q-Lee](https://github.com/Q-Lee)) +* Federated Ingress Controller ([#30419](https://github.com/kubernetes/kubernetes/pull/30419), [@quinton-hoole](https://github.com/quinton-hoole)) +* Federation replicaset controller ([#29741](https://github.com/kubernetes/kubernetes/pull/29741), [@jianhuiz](https://github.com/jianhuiz)) +* AWS: More ELB attributes via service annotations ([#30695](https://github.com/kubernetes/kubernetes/pull/30695), [@krancour](https://github.com/krancour)) +* Impersonate user extra ([#30881](https://github.com/kubernetes/kubernetes/pull/30881), [@deads2k](https://github.com/deads2k)) +* DNS, Heapster and UI are critical addons ([#30995](https://github.com/kubernetes/kubernetes/pull/30995), [@piosz](https://github.com/piosz)) +* AWS: Support HTTP->HTTP mode for ELB ([#30563](https://github.com/kubernetes/kubernetes/pull/30563), [@knarz](https://github.com/knarz)) +* kube-up: Allow IP restrictions for SSH and HTTPS API access on AWS. ([#27061](https://github.com/kubernetes/kubernetes/pull/27061), [@Naddiseo](https://github.com/Naddiseo)) +* Add readyReplicas to replica sets ([#29481](https://github.com/kubernetes/kubernetes/pull/29481), [@kargakis](https://github.com/kargakis)) +* The implicit registration of Prometheus metrics for request count and latency have been removed, and a plug-able interface was added. If you were using our client libraries in your own binaries and want these metrics, add the following to your imports in the main package: "k8s.io/pkg/client/metrics/prometheus". ([#30638](https://github.com/kubernetes/kubernetes/pull/30638), [@krousey](https://github.com/krousey)) +* Add support for --image-pull-policy to 'kubectl run' ([#30614](https://github.com/kubernetes/kubernetes/pull/30614), [@AdoHe](https://github.com/AdoHe)) +* x509 authenticator: get groups from subject's organization field ([#30392](https://github.com/kubernetes/kubernetes/pull/30392), [@ericchiang](https://github.com/ericchiang)) +* Add initial support for TokenFile to to the client config file. ([#29696](https://github.com/kubernetes/kubernetes/pull/29696), [@brendandburns](https://github.com/brendandburns)) +* update kubectl help output for better organization ([#25524](https://github.com/kubernetes/kubernetes/pull/25524), [@AdoHe](https://github.com/AdoHe)) +* daemonset controller should respect taints ([#31020](https://github.com/kubernetes/kubernetes/pull/31020), [@mikedanese](https://github.com/mikedanese)) +* Implement TLS bootstrap for kubelet using `--experimental-bootstrap-kubeconfig` (2nd take) ([#30922](https://github.com/kubernetes/kubernetes/pull/30922), [@yifan-gu](https://github.com/yifan-gu)) +* rkt: Support subPath volume mounts feature ([#30934](https://github.com/kubernetes/kubernetes/pull/30934), [@yifan-gu](https://github.com/yifan-gu)) +* Return container command exit codes in kubectl run/exec ([#26541](https://github.com/kubernetes/kubernetes/pull/26541), [@sttts](https://github.com/sttts)) +* Fix kubectl describe to display a container's resource limit env vars as node allocatable when the limits are not set ([#29849](https://github.com/kubernetes/kubernetes/pull/29849), [@aveshagarwal](https://github.com/aveshagarwal)) +* The `valueFrom.fieldRef.name` field on environment variables in pods and objects with pod templates now allows two additional fields to be used: ([#27880](https://github.com/kubernetes/kubernetes/pull/27880), [@smarterclayton](https://github.com/smarterclayton)) + * `spec.nodeName` will return the name of the node this pod is running on + * `spec.serviceAccountName` will return the name of the service account this pod is running under +* Adding ImagePolicyWebhook admission controller. ([#30631](https://github.com/kubernetes/kubernetes/pull/30631), [@ecordell](https://github.com/ecordell)) +* Validate involvedObject.Namespace matches event.Namespace ([#30533](https://github.com/kubernetes/kubernetes/pull/30533), [@liggitt](https://github.com/liggitt)) +* allow group impersonation ([#30803](https://github.com/kubernetes/kubernetes/pull/30803), [@deads2k](https://github.com/deads2k)) +* Always return command output for exec probes and kubelet RunInContainer ([#30731](https://github.com/kubernetes/kubernetes/pull/30731), [@ncdc](https://github.com/ncdc)) +* Enable the garbage collector by default ([#30480](https://github.com/kubernetes/kubernetes/pull/30480), [@caesarxuchao](https://github.com/caesarxuchao)) +* use valid_resources to replace kubectl.PossibleResourceTypes ([#30955](https://github.com/kubernetes/kubernetes/pull/30955), [@lojies](https://github.com/lojies)) +* oidc auth provider: don't trim issuer URL ([#30944](https://github.com/kubernetes/kubernetes/pull/30944), [@ericchiang](https://github.com/ericchiang)) +* Add a short `-n` for `kubectl --namespace` ([#30630](https://github.com/kubernetes/kubernetes/pull/30630), [@silasbw](https://github.com/silasbw)) +* Federated secret controller ([#30669](https://github.com/kubernetes/kubernetes/pull/30669), [@kshafiee](https://github.com/kshafiee)) +* Add Events for operation_executor to show status of mounts, failed/successful to show in describe events ([#27778](https://github.com/kubernetes/kubernetes/pull/27778), [@screeley44](https://github.com/screeley44)) +* Alpha support for OpenAPI (aka. Swagger 2.0) specification served on /swagger.json (enabled by default) ([#30233](https://github.com/kubernetes/kubernetes/pull/30233), [@mbohlool](https://github.com/mbohlool)) +* Disable linux/ppc64le compilation by default ([#30659](https://github.com/kubernetes/kubernetes/pull/30659), [@ixdy](https://github.com/ixdy)) +* Implement dynamic provisioning (beta) of PersistentVolumes via StorageClass ([#29006](https://github.com/kubernetes/kubernetes/pull/29006), [@jsafrane](https://github.com/jsafrane)) +* Allow setting permission mode bits on secrets, configmaps and downwardAPI files ([#28936](https://github.com/kubernetes/kubernetes/pull/28936), [@rata](https://github.com/rata)) +* Skip safe to detach check if node API object no longer exists ([#30737](https://github.com/kubernetes/kubernetes/pull/30737), [@saad-ali](https://github.com/saad-ali)) +* The Kubelet now supports the `--require-kubeconfig` option which reads all client config from the provided `--kubeconfig` file and will cause the Kubelet to exit with error code 1 on error. It also forces the Kubelet to use the server URL from the kubeconfig file rather than the `--api-servers` flag. Without this flag set, a failure to read the kubeconfig file would only result in a warning message. ([#30798](https://github.com/kubernetes/kubernetes/pull/30798), [@smarterclayton](https://github.com/smarterclayton)) + * In a future release, the value of this flag will be defaulted to `true`. +* Adding container image verification webhook API. ([#30241](https://github.com/kubernetes/kubernetes/pull/30241), [@Q-Lee](https://github.com/Q-Lee)) +* Nodecontroller doesn't flip readiness on pods if kubeletVersion < 1.2.0 ([#30828](https://github.com/kubernetes/kubernetes/pull/30828), [@bprashanth](https://github.com/bprashanth)) +* AWS: Handle kube-down case where the LaunchConfig is dangling ([#30816](https://github.com/kubernetes/kubernetes/pull/30816), [@zmerlynn](https://github.com/zmerlynn)) +* kubectl will no longer do client-side defaulting on create and replace. ([#30250](https://github.com/kubernetes/kubernetes/pull/30250), [@krousey](https://github.com/krousey)) +* Added warning msg for `kubectl get` ([#28352](https://github.com/kubernetes/kubernetes/pull/28352), [@vefimova](https://github.com/vefimova)) +* Removed support for HPA in extensions client. ([#30504](https://github.com/kubernetes/kubernetes/pull/30504), [@piosz](https://github.com/piosz)) +* Implement DisruptionController. ([#25921](https://github.com/kubernetes/kubernetes/pull/25921), [@mml](https://github.com/mml)) +* [Kubelet] Check if kubelet is running as uid 0 ([#30466](https://github.com/kubernetes/kubernetes/pull/30466), [@vishh](https://github.com/vishh)) +* Fix third party APIResource reporting ([#29724](https://github.com/kubernetes/kubernetes/pull/29724), [@brendandburns](https://github.com/brendandburns)) +* speed up RC scaler ([#30383](https://github.com/kubernetes/kubernetes/pull/30383), [@deads2k](https://github.com/deads2k)) +* Set pod state as "unknown" when CNI plugin fails ([#30137](https://github.com/kubernetes/kubernetes/pull/30137), [@nhlfr](https://github.com/nhlfr)) +* Cluster Federation components can now be built and deployed using the make command. Please see federation/README.md for details. ([#29515](https://github.com/kubernetes/kubernetes/pull/29515), [@madhusudancs](https://github.com/madhusudancs)) +* Adding events to federation control plane ([#30421](https://github.com/kubernetes/kubernetes/pull/30421), [@nikhiljindal](https://github.com/nikhiljindal)) +* [kubelet] Introduce --protect-kernel-defaults flag to make the tunable behaviour configurable ([#27874](https://github.com/kubernetes/kubernetes/pull/27874), [@ingvagabund](https://github.com/ingvagabund)) +* Add support for kube-up.sh to deploy Calico network policy to GCI masters ([#29037](https://github.com/kubernetes/kubernetes/pull/29037), [@matthewdupre](https://github.com/matthewdupre)) +* Added 'kubectl top' command showing the resource usage metrics. ([#28844](https://github.com/kubernetes/kubernetes/pull/28844), [@mksalawa](https://github.com/mksalawa)) +* Add basic audit logging ([#27087](https://github.com/kubernetes/kubernetes/pull/27087), [@soltysh](https://github.com/soltysh)) +* Marked NodePhase deprecated. ([#30005](https://github.com/kubernetes/kubernetes/pull/30005), [@dchen1107](https://github.com/dchen1107)) +* Name the job created by scheduledjob (sj) deterministically with sj's name and a hash of job's scheduled time. ([#30420](https://github.com/kubernetes/kubernetes/pull/30420), [@janetkuo](https://github.com/janetkuo)) +* add metrics for workqueues ([#30296](https://github.com/kubernetes/kubernetes/pull/30296), [@deads2k](https://github.com/deads2k)) +* Adding ingress resource to federation apiserver ([#30112](https://github.com/kubernetes/kubernetes/pull/30112), [@nikhiljindal](https://github.com/nikhiljindal)) +* Update Dashboard UI to version v1.1.1 ([#30273](https://github.com/kubernetes/kubernetes/pull/30273), [@bryk](https://github.com/bryk)) +* Update etcd 2.2 references to use 3.0.x ([#29399](https://github.com/kubernetes/kubernetes/pull/29399), [@timothysc](https://github.com/timothysc)) +* HPA: ignore scale targets whose replica count is 0 ([#29212](https://github.com/kubernetes/kubernetes/pull/29212), [@sjenning](https://github.com/sjenning)) +* Add total inodes to kubelet summary api ([#30231](https://github.com/kubernetes/kubernetes/pull/30231), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* Updates required for juju kubernetes to use the tls-terminated etcd charm. ([#30104](https://github.com/kubernetes/kubernetes/pull/30104), [@mbruzek](https://github.com/mbruzek)) +* Fix PVC.Status.Capacity and AccessModes after binding ([#29982](https://github.com/kubernetes/kubernetes/pull/29982), [@jsafrane](https://github.com/jsafrane)) +* allow a read-only rbd image mounted by multiple pods ([#29622](https://github.com/kubernetes/kubernetes/pull/29622), [@rootfs](https://github.com/rootfs)) +* [kubelet] Auto-discover node IP if neither cloud provider exists and IP is not explicitly specified ([#29907](https://github.com/kubernetes/kubernetes/pull/29907), [@luxas](https://github.com/luxas)) +* kubectl config set-crentials: add arguments for auth providers ([#30007](https://github.com/kubernetes/kubernetes/pull/30007), [@ericchiang](https://github.com/ericchiang)) +* Scheduledjob controller ([#29137](https://github.com/kubernetes/kubernetes/pull/29137), [@janetkuo](https://github.com/janetkuo)) +* add subjectaccessreviews resource ([#20573](https://github.com/kubernetes/kubernetes/pull/20573), [@deads2k](https://github.com/deads2k)) +* AWS/GCE: Rework use of master name ([#30047](https://github.com/kubernetes/kubernetes/pull/30047), [@zmerlynn](https://github.com/zmerlynn)) +* Add density (batch pods creation latency and resource) and resource performance tests to `test-e2e-node' built for Linux only ([#30026](https://github.com/kubernetes/kubernetes/pull/30026), [@coufon](https://github.com/coufon)) +* Clean up items from moving local cluster setup guides ([#30035](https://github.com/kubernetes/kubernetes/pull/30035), [@pwittrock](https://github.com/pwittrock)) +* federation: Adding secret API ([#29138](https://github.com/kubernetes/kubernetes/pull/29138), [@kshafiee](https://github.com/kshafiee)) +* Introducing ScheduledJobs as described in [the proposal](docs/proposals/scheduledjob.md) as part of `batch/v2alpha1` version (experimental feature). ([#25816](https://github.com/kubernetes/kubernetes/pull/25816), [@soltysh](https://github.com/soltysh)) +* Node disk pressure should induce image gc ([#29880](https://github.com/kubernetes/kubernetes/pull/29880), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* oidc authentication plugin: don't trim issuer URLs with trailing slashes ([#29860](https://github.com/kubernetes/kubernetes/pull/29860), [@ericchiang](https://github.com/ericchiang)) +* Allow leading * in ingress hostname ([#29204](https://github.com/kubernetes/kubernetes/pull/29204), [@aledbf](https://github.com/aledbf)) +* Rewrite service controller to apply best controller pattern ([#25189](https://github.com/kubernetes/kubernetes/pull/25189), [@mfanjie](https://github.com/mfanjie)) +* Fix issue with kubectl annotate when --resource-version is provided. ([#29319](https://github.com/kubernetes/kubernetes/pull/29319), [@juanvallejo](https://github.com/juanvallejo)) +* Reverted conversion of influx-db to Pet Set, it is now a Replication Controller. ([#30080](https://github.com/kubernetes/kubernetes/pull/30080), [@jszczepkowski](https://github.com/jszczepkowski)) +* rbac validation: rules can't combine non-resource URLs and regular resources ([#29930](https://github.com/kubernetes/kubernetes/pull/29930), [@ericchiang](https://github.com/ericchiang)) +* VSAN support for VSphere Volume Plugin ([#29172](https://github.com/kubernetes/kubernetes/pull/29172), [@abrarshivani](https://github.com/abrarshivani)) +* Addresses vSphere Volume Attach limits ([#29881](https://github.com/kubernetes/kubernetes/pull/29881), [@dagnello](https://github.com/dagnello)) +* allow restricting subresource access ([#29988](https://github.com/kubernetes/kubernetes/pull/29988), [@deads2k](https://github.com/deads2k)) +* Add density (batch pods creation latency and resource) and resource performance tests to `test-e2e-node' ([#29764](https://github.com/kubernetes/kubernetes/pull/29764), [@coufon](https://github.com/coufon)) +* Allow Secret & ConfigMap keys to contain caps, dots, and underscores ([#25458](https://github.com/kubernetes/kubernetes/pull/25458), [@errm](https://github.com/errm)) +* allow watching old resources with kubectl ([#27392](https://github.com/kubernetes/kubernetes/pull/27392), [@sjenning](https://github.com/sjenning)) +* azure: kube-up respects AZURE_RESOURCE_GROUP ([#28700](https://github.com/kubernetes/kubernetes/pull/28700), [@colemickens](https://github.com/colemickens)) +* Modified influxdb petset to provision persistent volume. ([#28840](https://github.com/kubernetes/kubernetes/pull/28840), [@jszczepkowski](https://github.com/jszczepkowski)) +* Allow service names up to 63 characters (RFC 1035) ([#29523](https://github.com/kubernetes/kubernetes/pull/29523), [@fraenkel](https://github.com/fraenkel)) +* Change eviction policies in NodeController: ([#28897](https://github.com/kubernetes/kubernetes/pull/28897), [@gmarek](https://github.com/gmarek)) + * - add a "partialDisruption" mode, when more than 33% of Nodes in the zone are not Ready + * - add "fullDisruption" mode, when all Nodes in the zone are not Ready + * Eviction behavior depends on the mode in which NodeController is operating: + * - if the new state is "partialDisruption" or "fullDisruption" we call a user defined function that returns a new QPS to use (default 1/10 of the default rate, and the default rate respectively), + * - if the new state is "normal" we resume normal operation (go back to default limiter settings), + * - if all zones in the cluster are in "fullDisruption" state we stop all evictions. +* Add a flag for `kubectl expose`to set ClusterIP and allow headless services ([#28239](https://github.com/kubernetes/kubernetes/pull/28239), [@ApsOps](https://github.com/ApsOps)) +* Add support to quota pvc storage requests ([#28636](https://github.com/kubernetes/kubernetes/pull/28636), [@derekwaynecarr](https://github.com/derekwaynecarr)) + + + +# v1.4.0-alpha.2 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/master/examples) + +## Downloads + +binary | sha256 hash +------ | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.0-alpha.2/kubernetes.tar.gz) | `787ce63a5149a1cb47d14c55450172e3a045d85349682d2e17ff492de9e415b9` + +## Changelog since v1.4.0-alpha.1 + +### Action Required + +* Federation API server kubeconfig secret consumed by federation-controller-manager has a new name. ([#28938](https://github.com/kubernetes/kubernetes/pull/28938), [@madhusudancs](https://github.com/madhusudancs)) + * If you are upgrading your Cluster Federation components from v1.3.x, please run this command to migrate the federation-apiserver-secret to federation-apiserver-kubeconfig serect; + * $ kubectl --namespace=federation get secret federation-apiserver-secret -o json | sed 's/federation-apiserver-secret/federation-apiserver-kubeconfig/g' | kubectl create -f - + * You might also want to delete the old secret using this command: + * $ kubectl delete secret --namespace=federation federation-apiserver-secret +* Stop eating panics ([#28800](https://github.com/kubernetes/kubernetes/pull/28800), [@lavalamp](https://github.com/lavalamp)) + +### Other notable changes + +* Add API for StorageClasses ([#29694](https://github.com/kubernetes/kubernetes/pull/29694), [@childsb](https://github.com/childsb)) +* Fix kubectl help command ([#29737](https://github.com/kubernetes/kubernetes/pull/29737), [@andreykurilin](https://github.com/andreykurilin)) +* add shorthand cm for configmaps ([#29652](https://github.com/kubernetes/kubernetes/pull/29652), [@lojies](https://github.com/lojies)) +* Bump cadvisor dependencies to latest head. ([#29492](https://github.com/kubernetes/kubernetes/pull/29492), [@Random-Liu](https://github.com/Random-Liu)) +* If a service of type node port declares multiple ports, quota on "services.nodeports" will charge for each port in the service. ([#29457](https://github.com/kubernetes/kubernetes/pull/29457), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* Add an Azure CloudProvider Implementation ([#28821](https://github.com/kubernetes/kubernetes/pull/28821), [@colemickens](https://github.com/colemickens)) +* Add support for kubectl create quota command ([#28351](https://github.com/kubernetes/kubernetes/pull/28351), [@sttts](https://github.com/sttts)) +* Assume volume is detached if node doesn't exist ([#29485](https://github.com/kubernetes/kubernetes/pull/29485), [@saad-ali](https://github.com/saad-ali)) +* kube-up: increase download timeout for kubernetes.tar.gz ([#29426](https://github.com/kubernetes/kubernetes/pull/29426), [@justinsb](https://github.com/justinsb)) +* Allow multiple APIs to register for the same API Group ([#28414](https://github.com/kubernetes/kubernetes/pull/28414), [@brendandburns](https://github.com/brendandburns)) +* Fix a problem with multiple APIs clobbering each other in registration. ([#28431](https://github.com/kubernetes/kubernetes/pull/28431), [@brendandburns](https://github.com/brendandburns)) +* Removing images with multiple tags ([#29316](https://github.com/kubernetes/kubernetes/pull/29316), [@ronnielai](https://github.com/ronnielai)) +* add enhanced volume and mount logging for block devices ([#24797](https://github.com/kubernetes/kubernetes/pull/24797), [@screeley44](https://github.com/screeley44)) +* append an abac rule for $KUBE_USER. ([#29164](https://github.com/kubernetes/kubernetes/pull/29164), [@cjcullen](https://github.com/cjcullen)) +* add tokenreviews endpoint to implement webhook ([#28788](https://github.com/kubernetes/kubernetes/pull/28788), [@deads2k](https://github.com/deads2k)) +* Fix "PVC Volume not detached if pod deleted via namespace deletion" issue ([#29077](https://github.com/kubernetes/kubernetes/pull/29077), [@saad-ali](https://github.com/saad-ali)) +* Allow mounts to run in parallel for non-attachable volumes ([#28939](https://github.com/kubernetes/kubernetes/pull/28939), [@saad-ali](https://github.com/saad-ali)) +* Fix working_set calculation in kubelet ([#29153](https://github.com/kubernetes/kubernetes/pull/29153), [@vishh](https://github.com/vishh)) +* Fix RBAC authorizer of ServiceAccount ([#29071](https://github.com/kubernetes/kubernetes/pull/29071), [@albatross0](https://github.com/albatross0)) +* kubectl proxy changed to now allow urls to pods with "attach" or "exec" in the pod name ([#28765](https://github.com/kubernetes/kubernetes/pull/28765), [@nhlfr](https://github.com/nhlfr)) +* AWS: Added experimental option to skip zone check ([#28417](https://github.com/kubernetes/kubernetes/pull/28417), [@kevensen](https://github.com/kevensen)) +* Ubuntu: Enable ssh compression when downloading binaries during cluster creation ([#26746](https://github.com/kubernetes/kubernetes/pull/26746), [@MHBauer](https://github.com/MHBauer)) +* Add extensions/replicaset to federation-apiserver ([#24764](https://github.com/kubernetes/kubernetes/pull/24764), [@jianhuiz](https://github.com/jianhuiz)) +* federation: Adding namespaces API ([#26298](https://github.com/kubernetes/kubernetes/pull/26298), [@nikhiljindal](https://github.com/nikhiljindal)) +* Improve quota controller performance by eliminating unneeded list calls ([#29134](https://github.com/kubernetes/kubernetes/pull/29134), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* Make Daemonset use GeneralPredicates ([#28803](https://github.com/kubernetes/kubernetes/pull/28803), [@lukaszo](https://github.com/lukaszo)) +* Update docker engine-api to dea108d3aa ([#29144](https://github.com/kubernetes/kubernetes/pull/29144), [@ronnielai](https://github.com/ronnielai)) +* Fixing kube-up for CVM masters. ([#29140](https://github.com/kubernetes/kubernetes/pull/29140), [@maisem](https://github.com/maisem)) +* Fix logrotate config on GCI ([#29139](https://github.com/kubernetes/kubernetes/pull/29139), [@adityakali](https://github.com/adityakali)) +* GCE bring-up: Differentiate NODE_TAGS from NODE_INSTANCE_PREFIX ([#29141](https://github.com/kubernetes/kubernetes/pull/29141), [@zmerlynn](https://github.com/zmerlynn)) +* hyperkube: fix build for 3rd party registry (again) ([#28489](https://github.com/kubernetes/kubernetes/pull/28489), [@liyimeng](https://github.com/liyimeng)) +* Detect flakes in PR builder e2e runs ([#27898](https://github.com/kubernetes/kubernetes/pull/27898), [@lavalamp](https://github.com/lavalamp)) +* Remove examples moved to docs site ([#23513](https://github.com/kubernetes/kubernetes/pull/23513), [@erictune](https://github.com/erictune)) +* Do not query the metadata server to find out if running on GCE. Retry metadata server query for gcr if running on gce. ([#28871](https://github.com/kubernetes/kubernetes/pull/28871), [@vishh](https://github.com/vishh)) +* Change maxsize to size in logrotate. ([#29128](https://github.com/kubernetes/kubernetes/pull/29128), [@bprashanth](https://github.com/bprashanth)) +* Change setting "kubectl --record=false" to stop updating the change-cause when a previous change-cause is found. ([#28234](https://github.com/kubernetes/kubernetes/pull/28234), [@damemi](https://github.com/damemi)) +* Add "kubectl --overwrite" flag to automatically resolve conflicts between the modified and live configuration using values from the modified configuration. ([#26136](https://github.com/kubernetes/kubernetes/pull/26136), [@AdoHe](https://github.com/AdoHe)) +* Make discovery summarizer call servers in parallel ([#26705](https://github.com/kubernetes/kubernetes/pull/26705), [@nebril](https://github.com/nebril)) +* Don't recreate lb cloud resources on kcm restart ([#29082](https://github.com/kubernetes/kubernetes/pull/29082), [@bprashanth](https://github.com/bprashanth)) +* List all nodes and occupy cidr map before starting allocations ([#29062](https://github.com/kubernetes/kubernetes/pull/29062), [@bprashanth](https://github.com/bprashanth)) +* Fix GPU resource validation ([#28743](https://github.com/kubernetes/kubernetes/pull/28743), [@therc](https://github.com/therc)) +* Make PD E2E Tests Wait for Detach to Prevent Kernel Errors ([#29031](https://github.com/kubernetes/kubernetes/pull/29031), [@saad-ali](https://github.com/saad-ali)) +* Scale kube-proxy conntrack limits by cores (new default behavior) ([#28876](https://github.com/kubernetes/kubernetes/pull/28876), [@thockin](https://github.com/thockin)) +* [Kubelet] Improving QOS in kubelet by introducing QoS level Cgroups - `--cgroups-per-qos` ([#27853](https://github.com/kubernetes/kubernetes/pull/27853), [@dubstack](https://github.com/dubstack)) +* AWS: Add ap-south-1 to list of known AWS regions ([#28428](https://github.com/kubernetes/kubernetes/pull/28428), [@justinsb](https://github.com/justinsb)) +* Add RELEASE_INFRA_PUSH related code to support pushes from kubernetes/release. ([#28922](https://github.com/kubernetes/kubernetes/pull/28922), [@david-mcmahon](https://github.com/david-mcmahon)) +* Fix watch cache filtering ([#28966](https://github.com/kubernetes/kubernetes/pull/28966), [@liggitt](https://github.com/liggitt)) +* Deprecate deleting-pods-burst ControllerManager flag ([#28882](https://github.com/kubernetes/kubernetes/pull/28882), [@gmarek](https://github.com/gmarek)) +* Add support for terminal resizing for exec, attach, and run. Note that for Docker, exec sessions ([#25273](https://github.com/kubernetes/kubernetes/pull/25273), [@ncdc](https://github.com/ncdc)) + * inherit the environment from the primary process, so if the container was created with tty=false, + * that means the exec session's TERM variable will default to "dumb". Users can override this by + * setting TERM=xterm (or whatever is appropriate) to get the correct "smart" terminal behavior. +* Implement alpha version of PreferAvoidPods ([#20699](https://github.com/kubernetes/kubernetes/pull/20699), [@jiangyaoguo](https://github.com/jiangyaoguo)) +* Retry when apiserver fails to listen on insecure port ([#28797](https://github.com/kubernetes/kubernetes/pull/28797), [@aaronlevy](https://github.com/aaronlevy)) +* Add SSH_OPTS to config ssh and scp port ([#28872](https://github.com/kubernetes/kubernetes/pull/28872), [@lojies](https://github.com/lojies)) +* kube-up: install new Docker pre-requisite (libltdl7) when not in image ([#28745](https://github.com/kubernetes/kubernetes/pull/28745), [@justinsb](https://github.com/justinsb)) +* Separate rate limiters for Pod evictions for different zones in NodeController ([#28843](https://github.com/kubernetes/kubernetes/pull/28843), [@gmarek](https://github.com/gmarek)) +* Add --quiet to hide the 'waiting for pods to be running' message in kubectl run ([#28801](https://github.com/kubernetes/kubernetes/pull/28801), [@janetkuo](https://github.com/janetkuo)) +* Controllers doesn't take any actions when being deleted. ([#27438](https://github.com/kubernetes/kubernetes/pull/27438), [@gmarek](https://github.com/gmarek)) +* Add "deploy" abbrev for deployments to kubectl ([#24087](https://github.com/kubernetes/kubernetes/pull/24087), [@Frostman](https://github.com/Frostman)) +* --no-header available now for custom-column ([#26696](https://github.com/kubernetes/kubernetes/pull/26696), [@gitfred](https://github.com/gitfred)) + + + +# v1.4.0-alpha.1 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/master/examples) + +## Downloads + +binary | sha1 hash | md5 hash +------ | --------- | -------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.4.0-alpha.1/kubernetes.tar.gz) | `11a199208c5164a291c1767a1b9e64e45fdea747` | `334f349daf9268d8ac091d7fcc8e4626` + +## Changelog since v1.3.0 + +### Experimental Features + +* An alpha implementation of the TLS bootstrap API described in docs/proposals/kubelet-tls-bootstrap.md. ([#25562](https://github.com/kubernetes/kubernetes/pull/25562), [@gtank](https://github.com/gtank)) + +### Action Required + +* [kubelet] Allow opting out of automatic cloud provider detection in kubelet. By default kubelet will auto-detect cloud providers ([#28258](https://github.com/kubernetes/kubernetes/pull/28258), [@vishh](https://github.com/vishh)) +* If you use one of the kube-dns replication controller manifest in `cluster/saltbase/salt/kube-dns`, i.e. `cluster/saltbase/salt/kube-dns/{skydns-rc.yaml.base,skydns-rc.yaml.in}`, either substitute one of `__PILLAR__FEDERATIONS__DOMAIN__MAP__` or `{{ pillar['federations_domain_map'] }}` with the corresponding federation name to domain name value or remove them if you do not support cluster federation at this time. If you plan to substitute the parameter with its value, here is an example for `{{ pillar['federations_domain_map'] }` ([#28132](https://github.com/kubernetes/kubernetes/pull/28132), [@madhusudancs](https://github.com/madhusudancs)) + * pillar['federations_domain_map'] = "- --federations=myfederation=federation.test" + * where `myfederation` is the name of the federation and `federation.test` is the domain name registered for the federation. +* Proportionally scale paused and rolling deployments ([#20273](https://github.com/kubernetes/kubernetes/pull/20273), [@kargakis](https://github.com/kargakis)) + +### Other notable changes + +* Support --all-namespaces in kubectl describe ([#26315](https://github.com/kubernetes/kubernetes/pull/26315), [@dims](https://github.com/dims)) +* Add checks in Create and Update Cgroup methods ([#28566](https://github.com/kubernetes/kubernetes/pull/28566), [@dubstack](https://github.com/dubstack)) +* Update coreos node e2e image to a version that uses cgroupfs ([#28661](https://github.com/kubernetes/kubernetes/pull/28661), [@dubstack](https://github.com/dubstack)) +* Don't delete affinity when endpoints are empty ([#28655](https://github.com/kubernetes/kubernetes/pull/28655), [@freehan](https://github.com/freehan)) +* Enable memory based pod evictions by default on the kubelet. ([#28607](https://github.com/kubernetes/kubernetes/pull/28607), [@derekwaynecarr](https://github.com/derekwaynecarr)) + * Trigger pod eviction when available memory falls below 100Mi. +* Enable extensions/v1beta1/NetworkPolicy by default ([#28549](https://github.com/kubernetes/kubernetes/pull/28549), [@caseydavenport](https://github.com/caseydavenport)) +* MESOS: Support a pre-installed km binary at a well known, agent-local path ([#28447](https://github.com/kubernetes/kubernetes/pull/28447), [@k82cn](https://github.com/k82cn)) +* kubectl should print usage at the bottom ([#25640](https://github.com/kubernetes/kubernetes/pull/25640), [@dims](https://github.com/dims)) +* A new command "kubectl config get-contexts" has been added. ([#25463](https://github.com/kubernetes/kubernetes/pull/25463), [@asalkeld](https://github.com/asalkeld)) +* kubectl: ignore only update conflicts in the scaler ([#27048](https://github.com/kubernetes/kubernetes/pull/27048), [@kargakis](https://github.com/kargakis)) +* Declare out of disk when there is no free inodes ([#28176](https://github.com/kubernetes/kubernetes/pull/28176), [@ronnielai](https://github.com/ronnielai)) +* Includes the number of free inodes in stat summary ([#28173](https://github.com/kubernetes/kubernetes/pull/28173), [@ronnielai](https://github.com/ronnielai)) +* kubectl: don't display an empty list when trying to get a single resource that isn't found ([#28294](https://github.com/kubernetes/kubernetes/pull/28294), [@ncdc](https://github.com/ncdc)) +* Graceful deletion bumps object's generation ([#27269](https://github.com/kubernetes/kubernetes/pull/27269), [@gmarek](https://github.com/gmarek)) +* Allow specifying secret data using strings ([#28263](https://github.com/kubernetes/kubernetes/pull/28263), [@liggitt](https://github.com/liggitt)) +* kubectl help now provides "Did you mean this?" suggestions for typo/invalid command names. ([#27049](https://github.com/kubernetes/kubernetes/pull/27049), [@andreykurilin](https://github.com/andreykurilin)) +* Lock all possible kubecfg files at the beginning of ModifyConfig. ([#28232](https://github.com/kubernetes/kubernetes/pull/28232), [@cjcullen](https://github.com/cjcullen)) +* Enable HTTP2 by default ([#28114](https://github.com/kubernetes/kubernetes/pull/28114), [@timothysc](https://github.com/timothysc)) +* Influxdb migrated to PetSet and PersistentVolumes. ([#28109](https://github.com/kubernetes/kubernetes/pull/28109), [@jszczepkowski](https://github.com/jszczepkowski)) +* Change references to gs://kubernetes-release/ci ([#28193](https://github.com/kubernetes/kubernetes/pull/28193), [@zmerlynn](https://github.com/zmerlynn)) +* Build: Add KUBE_GCS_RELEASE_BUCKET_MIRROR option to push-ci-build.sh ([#28172](https://github.com/kubernetes/kubernetes/pull/28172), [@zmerlynn](https://github.com/zmerlynn)) +* Skip multi-zone e2e tests unless provider is GCE, GKE or AWS ([#27871](https://github.com/kubernetes/kubernetes/pull/27871), [@lukaszo](https://github.com/lukaszo)) +* Making DHCP_OPTION_SET_ID creation optional ([#27278](https://github.com/kubernetes/kubernetes/pull/27278), [@activars](https://github.com/activars)) +* Convert service account token controller to use a work queue ([#23858](https://github.com/kubernetes/kubernetes/pull/23858), [@liggitt](https://github.com/liggitt)) +* Adding OWNERS for federation ([#28042](https://github.com/kubernetes/kubernetes/pull/28042), [@nikhiljindal](https://github.com/nikhiljindal)) +* Modifying the default container GC policy parameters ([#27881](https://github.com/kubernetes/kubernetes/pull/27881), [@ronnielai](https://github.com/ronnielai)) +* Kubelet can retrieve host IP even when apiserver has not been contacted ([#27508](https://github.com/kubernetes/kubernetes/pull/27508), [@aaronlevy](https://github.com/aaronlevy)) +* Add the Patch method to the generated clientset. ([#27293](https://github.com/kubernetes/kubernetes/pull/27293), [@caesarxuchao](https://github.com/caesarxuchao)) +* let patch use --local flag like `kubectl set image` ([#26722](https://github.com/kubernetes/kubernetes/pull/26722), [@deads2k](https://github.com/deads2k)) +* enable recursive processing in kubectl edit ([#25085](https://github.com/kubernetes/kubernetes/pull/25085), [@metral](https://github.com/metral)) +* Image GC logic should compensate for reserved blocks ([#27996](https://github.com/kubernetes/kubernetes/pull/27996), [@ronnielai](https://github.com/ronnielai)) +* Bump minimum API version for docker to 1.21 ([#27208](https://github.com/kubernetes/kubernetes/pull/27208), [@yujuhong](https://github.com/yujuhong)) +* Adding lock files for kubeconfig updating ([#28034](https://github.com/kubernetes/kubernetes/pull/28034), [@krousey](https://github.com/krousey)) + +Please see the [Releases Page](https://github.com/kubernetes/kubernetes/releases) for older releases. + +Release notes of older releases can be found in: +- [CHANGELOG-1.2.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.2.md) +- [CHANGELOG-1.3.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.3.md) + +[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/CHANGELOG.md?pixel)]() diff --git a/vendor/k8s.io/kubernetes/CHANGELOG-1.5.md b/vendor/k8s.io/kubernetes/CHANGELOG-1.5.md new file mode 100644 index 000000000..0631d7253 --- /dev/null +++ b/vendor/k8s.io/kubernetes/CHANGELOG-1.5.md @@ -0,0 +1,1266 @@ +<!-- BEGIN MUNGE: GENERATED_TOC --> +- [v1.5.7](#v157) + - [Downloads for v1.5.7](#downloads-for-v157) + - [Client Binaries](#client-binaries) + - [Server Binaries](#server-binaries) + - [Node Binaries](#node-binaries) + - [Changelog since v1.5.6](#changelog-since-v156) + - [Other notable changes](#other-notable-changes) +- [v1.5.6](#v156) + - [Downloads for v1.5.6](#downloads-for-v156) + - [Client Binaries](#client-binaries-1) + - [Server Binaries](#server-binaries-1) + - [Changelog since v1.5.5](#changelog-since-v155) + - [Other notable changes](#other-notable-changes-1) +- [v1.5.5](#v155) + - [Downloads for v1.5.5](#downloads-for-v155) + - [Client Binaries](#client-binaries-2) + - [Server Binaries](#server-binaries-2) + - [Changelog since v1.5.4](#changelog-since-v154) +- [v1.5.4](#v154) + - [Downloads for v1.5.4](#downloads-for-v154) + - [Client Binaries](#client-binaries-3) + - [Server Binaries](#server-binaries-3) + - [Changelog since v1.5.3](#changelog-since-v153) + - [Other notable changes](#other-notable-changes-2) +- [v1.5.3](#v153) + - [Downloads for v1.5.3](#downloads-for-v153) + - [Client Binaries](#client-binaries-4) + - [Server Binaries](#server-binaries-4) + - [Node Binaries](#node-binaries-1) + - [Changelog since v1.5.2](#changelog-since-v152) + - [Other notable changes](#other-notable-changes-3) +- [v1.5.2](#v152) + - [Downloads for v1.5.2](#downloads-for-v152) + - [Client Binaries](#client-binaries-5) + - [Server Binaries](#server-binaries-5) + - [Changelog since v1.5.1](#changelog-since-v151) + - [Other notable changes](#other-notable-changes-4) +- [v1.5.1](#v151) + - [Downloads for v1.5.1](#downloads-for-v151) + - [Client Binaries](#client-binaries-6) + - [Server Binaries](#server-binaries-6) + - [Changelog since v1.5.0](#changelog-since-v150) + - [Other notable changes](#other-notable-changes-5) + - [Known Issues for v1.5.1](#known-issues-for-v151) +- [v1.5.0](#v150) + - [Downloads for v1.5.0](#downloads-for-v150) + - [Client Binaries](#client-binaries-7) + - [Server Binaries](#server-binaries-7) + - [Major Themes](#major-themes) + - [Features](#features) + - [Known Issues](#known-issues) + - [Notable Changes to Existing Behavior](#notable-changes-to-existing-behavior) + - [Deprecations](#deprecations) + - [Action Required Before Upgrading](#action-required-before-upgrading) + - [External Dependency Version Information](#external-dependency-version-information) + - [Changelog since v1.5.0-beta.3](#changelog-since-v150-beta3) + - [Other notable changes](#other-notable-changes-6) + - [Previous Releases Included in v1.5.0](#previous-releases-included-in-v150) +- [v1.5.0-beta.3](#v150-beta3) + - [Downloads for v1.5.0-beta.3](#downloads-for-v150-beta3) + - [Client Binaries](#client-binaries-8) + - [Server Binaries](#server-binaries-8) + - [Changelog since v1.5.0-beta.2](#changelog-since-v150-beta2) + - [Other notable changes](#other-notable-changes-7) +- [v1.5.0-beta.2](#v150-beta2) + - [Downloads for v1.5.0-beta.2](#downloads-for-v150-beta2) + - [Client Binaries](#client-binaries-9) + - [Server Binaries](#server-binaries-9) + - [Changelog since v1.5.0-beta.1](#changelog-since-v150-beta1) + - [Other notable changes](#other-notable-changes-8) +- [v1.5.0-beta.1](#v150-beta1) + - [Downloads for v1.5.0-beta.1](#downloads-for-v150-beta1) + - [Client Binaries](#client-binaries-10) + - [Server Binaries](#server-binaries-10) + - [Changelog since v1.5.0-alpha.2](#changelog-since-v150-alpha2) + - [Action Required](#action-required) + - [Other notable changes](#other-notable-changes-9) +- [v1.5.0-alpha.2](#v150-alpha2) + - [Downloads for v1.5.0-alpha.2](#downloads-for-v150-alpha2) + - [Client Binaries](#client-binaries-11) + - [Server Binaries](#server-binaries-11) + - [Changelog since v1.5.0-alpha.1](#changelog-since-v150-alpha1) + - [Action Required](#action-required-1) + - [Other notable changes](#other-notable-changes-10) +- [v1.5.0-alpha.1](#v150-alpha1) + - [Downloads](#downloads) + - [Changelog since v1.4.0-alpha.3](#changelog-since-v140-alpha3) + - [Experimental Features](#experimental-features) + - [Action Required](#action-required-2) + - [Other notable changes](#other-notable-changes-11) +<!-- END MUNGE: GENERATED_TOC --> + +<!-- NEW RELEASE NOTES ENTRY --> + + +# v1.5.7 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.5/examples) + +## Downloads for v1.5.7 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.5.7/kubernetes.tar.gz) | `36bc0bcdce4060546f3fef7186f1207d30d5fd340e72113ff592966bd6684827` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.5.7/kubernetes-src.tar.gz) | `b329b02e9542049b9b85f8083a466e51799691bcf06fdf172b9c0f1cb61bdb6d` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.5.7/kubernetes-client-darwin-386.tar.gz) | `824ea7e5987e4ac7915b11fcd86658221a5a1e942a3f5210383435953509f96f` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.5.7/kubernetes-client-darwin-amd64.tar.gz) | `251a91eff457640066dd395393b16aae81850225db29207c07321b62fd9213ab` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.5.7/kubernetes-client-linux-386.tar.gz) | `84c69d23010304308459ad520375fd017f57562f8a78b6157ef0ea093636a8b6` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.5.7/kubernetes-client-linux-amd64.tar.gz) | `991e1eab65d1817ca3600e3ba3bc63ed86cf139a4669f84899f593ff684fb36c` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.5.7/kubernetes-client-linux-arm64.tar.gz) | `afe9c001a41b88da351ddf0cb3d506d3d8da7d9a94ae2d4b05062b2927c81fec` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.5.7/kubernetes-client-linux-arm.tar.gz) | `a936578c04887a2e1fe0a25e05f4d9663cd673d3fbac0c522bf75710d7f39f9b` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.5.7/kubernetes-client-windows-386.tar.gz) | `529ae014f0603868c82ee89601668fac17fa55932535d5925a7b61b1f301e61f` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.5.7/kubernetes-client-windows-amd64.tar.gz) | `f1f7e588dca059a4cbe97b4a28a983d346f93fc2bb0d4a1dbbb7d55a3e33caef` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.5.7/kubernetes-server-linux-amd64.tar.gz) | `ae18d659811da316d4a8bbdce15c4396fdee0068f9d3247a72c3a23433fee44c` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.5.7/kubernetes-server-linux-arm64.tar.gz) | `d56187d19b42848b7ff09e82c0452120c173ae56709cae88f96312ee7c41b0c4` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.5.7/kubernetes-server-linux-arm.tar.gz) | `aaa4d9414620bb1834401a17f2b877fe1347a4f8fc37c940092ac7f112e22934` + +### Node Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.5.7/kubernetes-node-linux-amd64.tar.gz) | `40c294ef5af4d548d37a599ee7fa07462f116fa5784d2b1501d95eeb04b8d34d` +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.5.7/kubernetes-node-linux-arm64.tar.gz) | `37482d5933c99fca526d0d47f0cfb2b69101f2e60dd5240b490b9768c8e4171e` +[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.5.7/kubernetes-node-linux-arm.tar.gz) | `786ddb390a9fac6e41caa4bb8054240ddb5255b9937bb37d01d77e23857bb407` +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.5.7/kubernetes-node-windows-amd64.tar.gz) | `c3e89390c8026845fcf72765e84b7e3cd383de705ef46f4e3d422b343d66bd47` + +## Changelog since v1.5.6 + +### Other notable changes + +* kube-apiserver now drops unneeded path information if an older version of Windows kubectl sends it. ([#44585](https://github.com/kubernetes/kubernetes/pull/44585), [@mml](https://github.com/mml)) +* Fix for kube-proxy healthcheck handling an update that simultaneously removes one port and adds another. ([#44365](https://github.com/kubernetes/kubernetes/pull/44365), [@MrHohn](https://github.com/MrHohn)) +* Fix [broken service accounts when using dedicated service account key](https://github.com/kubernetes/kubernetes/issues/44285). ([#44169](https://github.com/kubernetes/kubernetes/pull/44169), [@mikedanese](https://github.com/mikedanese)) +* Update to fluentd-gcp:1.28.3, rebased on ubuntu-slim:0.8 ([#43928](https://github.com/kubernetes/kubernetes/pull/43928), [@ixdy](https://github.com/ixdy)) +* Fix polarity of NodePort logic to avoid leaked ports ([#43259](https://github.com/kubernetes/kubernetes/pull/43259), [@thockin](https://github.com/thockin)) +* Upgrade golang versions to 1.7.5 ([#41771](https://github.com/kubernetes/kubernetes/pull/41771), [@cblecker](https://github.com/cblecker)) + + + +# v1.5.6 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.5/examples) + +## Downloads for v1.5.6 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.5.6/kubernetes.tar.gz) | `14a514bb9ed331eb1854a1d66cfaa53290c382641e154c901bcb14eb2cd683b4` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.5.6/kubernetes-src.tar.gz) | `cf3d85bcfd148ed6a54c64b4102a10cc4e54332907fb3d9a6c6e2658a31ca2e9` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.5.6/kubernetes-client-darwin-386.tar.gz) | `30b819eb1427317be38a4f534fc2c369d43e67499e5df79cdd5d4cfac14f8d36` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.5.6/kubernetes-client-darwin-amd64.tar.gz) | `3eedf919b2feff4c21edcadb493247013274a3672f6a3d46f19e13af211cea4e` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.5.6/kubernetes-client-linux-386.tar.gz) | `351bb189f6be835baadda3b87909472c4a9f522ece6e6425250ef227937f2d58` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.5.6/kubernetes-client-linux-amd64.tar.gz) | `d7c3508dc5029c6fefb1bf6f381af92d8626ac5a4b7246009832c03768ae670f` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.5.6/kubernetes-client-linux-arm64.tar.gz) | `2eaf838ab853c94f05c362a8ce089f32acdb6062356399a6f5fe7cdb13a6fa0c` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.5.6/kubernetes-client-linux-arm.tar.gz) | `e5212f6d9577bd090c88a7124edba86f925e08c710865623d9fb914a5b72e67f` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.5.6/kubernetes-client-windows-386.tar.gz) | `5a4fdbf0cb88f0e889d8dca1e6c073c167a8c3c7d7b1caad10dbe0dc2eb46677` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.5.6/kubernetes-client-windows-amd64.tar.gz) | `b1170a33c5c6fe2c3f71e820f11cf877f0ee72b60a6546aaf989267c89598656` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.5.6/kubernetes-server-linux-amd64.tar.gz) | `995959c43661c22b0f2ede45b62061f37c25a53388bcdd8988f928574070390a` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.5.6/kubernetes-server-linux-arm64.tar.gz) | `c6b20af2f0c5e3abe20c18aac734846923c8ff3afda637ef1fbd6d3b3820e3b7` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.5.6/kubernetes-server-linux-arm.tar.gz) | `7d439b2012a0280d40441a5871b25a07b540f5e84c561d2bf8c67725ebbf115d` + +## Changelog since v1.5.5 + +### Other notable changes + +* kube-up (with gce/gci and gce/coreos providers) now ensures the authentication token file contains correct tokens for the control plane components, even if the file already exists (ensures upgrades and downgrades work successfully) ([#43676](https://github.com/kubernetes/kubernetes/pull/43676), [@liggitt](https://github.com/liggitt)) +* Patch CVE-2016-8859 in alpine based images: ([#42936](https://github.com/kubernetes/kubernetes/pull/42936), [@timstclair](https://github.com/timstclair)) + * - gcr.io/google-containers/cluster-proportional-autoscaler-amd64 + * - gcr.io/google-containers/dnsmasq-metrics-amd64 + * - gcr.io/google-containers/etcd-empty-dir-cleanup + * - gcr.io/google-containers/kube-addon-manager + * - gcr.io/google-containers/kube-dnsmasq-amd64 +* - Disable thin_ls due to excessive iops ([#43113](https://github.com/kubernetes/kubernetes/pull/43113), [@dashpole](https://github.com/dashpole)) + * - Ignore .mount cgroups, fixing dissappearing stats + * - Fix wc goroutine leak + * - Update aws-sdk-go dependency to 1.6.10 +* PodSecurityPolicy authorization is correctly enforced by the PodSecurityPolicy admission plugin. ([#43489](https://github.com/kubernetes/kubernetes/pull/43489), [@liggitt](https://github.com/liggitt)) +* Bump gcr.io/google_containers/glbc from 0.9.1 to 0.9.2. Release notes: [0.9.2](https://github.com/kubernetes/ingress/releases/tag/0.9.2) ([#43097](https://github.com/kubernetes/kubernetes/pull/43097), [@timstclair](https://github.com/timstclair)) +* Update gcr.io/google-containers/rescheduler to v0.2.2, which uses busybox as a base image instead of ubuntu. ([#41911](https://github.com/kubernetes/kubernetes/pull/41911), [@ixdy](https://github.com/ixdy)) +* restored normalization of custom `--etcd-prefix` when `--storage-backend` is set to etcd3 ([#42506](https://github.com/kubernetes/kubernetes/pull/42506), [@liggitt](https://github.com/liggitt)) + + + +# v1.5.5 + +This release contains a fix for a PodSecurityPolicy vulnerability which allows users to make use of any existing PodSecurityPolicy object, even ones they are not authorized to use. + +Other then that, this release contains no other changes from 1.5.4. + +The vulnerability is tracked in http://issue.k8s.io/43459. + +**Who is affected?** + +Only Kubernetes 1.5.0-1.5.4 installations that do all of the following: +* Enable the PodSecurityPolicy API (which is not enabled by default): + * `--runtime-config=extensions/v1beta1/podsecuritypolicy=true` +* Enable the PodSecurityPolicy admission plugin (which is not enabled by default): + * `--admission-control=...,PodSecurityPolicy,...` +* Use authorization to limit users' ability to use specific PodSecurityPolicy objects + +**What is the impact?** + +A user that is authorized to create pods can make use of any existing PodSecurityPolicy, even ones they are not authorized to use. + +**How can I mitigate this prior to installing 1.5.5?** + +1. Export existing PodSecurityPolicy objects: + * `kubectl get podsecuritypolicies -o yaml > psp.yaml` +2. Review and delete any PodSecurityPolicy objects you do not want all pod-creating users to be able to use (NOTE: Privileged users that were making use of those policies will also lose access to those policies). For example: + * `kubectl delete podsecuritypolicies/my-privileged-policy` +3. After upgrading to 1.5.5, re-create the exported PodSecurityPolicy objects: + * `kubectl create -f psp.yaml` + +## Downloads for v1.5.5 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.5.5/kubernetes.tar.gz) | `ff171d53b6dba2aace899dbfa06044d3a54d798896f7b6dd483f20d2c05374ed` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.5.5/kubernetes-src.tar.gz) | `25207344982bcf76172c7d156106357a7113b3909ac851e19b437dbba9402af6` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.5.5/kubernetes-client-darwin-386.tar.gz) | `92eb19b1464674078927263642205498a9b4e496909138626de721f8ff2eb3f1` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.5.5/kubernetes-client-darwin-amd64.tar.gz) | `dd2076d8a3062459b82481bf064d80a198df580f2c34efe7132a091c19d8084c` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.5.5/kubernetes-client-linux-386.tar.gz) | `8366a72910c987e4140db42244741752efac8e06f0e13f5d0cbc1cc9bec9733c` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.5.5/kubernetes-client-linux-amd64.tar.gz) | `73536e200fee9f4de19ebfd7d2e063a04f5ccb93073982032e79dc47ae92e89a` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.5.5/kubernetes-client-linux-arm64.tar.gz) | `8f679bd012ecbc58f0a916f393d3fc79de6dc2624320b04edc1b9249213a49f8` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.5.5/kubernetes-client-linux-arm.tar.gz) | `1998d6398aef02898babc5ff20484fe7c538f75f78c650631afea1a555aee8d1` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.5.5/kubernetes-client-windows-386.tar.gz) | `dff6fe02a6090feb949acc5753633891bcbdb7ecfb2bff3fa132d025713cbd55` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.5.5/kubernetes-client-windows-amd64.tar.gz) | `bd7c7c39122135b58da89a700580475a3cadbb31aa1b35175ff2f80067bedc0d` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.5.5/kubernetes-server-linux-amd64.tar.gz) | `578977b62af58639548d743991cd2f71b0fd58f9caa729131824f8dde85b5c6e` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.5.5/kubernetes-server-linux-arm64.tar.gz) | `01a1104d8c5a22c26b8b0a402bf0362d749b7d13a636b31c64fb51bb61ea3a01` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.5.5/kubernetes-server-linux-arm.tar.gz) | `06c5ca1f962f368219835ed6d075ef6e3a72685f2f0988823f44dd2e602e1980` + +## Changelog since v1.5.4 + +**No notable changes for this release** + + + +# v1.5.4 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.5/examples) + +## Downloads for v1.5.4 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.5.4/kubernetes.tar.gz) | `2ff668c687c1bdf8351dcae102901b1d46cc50e446bde08a244c2e65739de4c3` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.5.4/kubernetes-src.tar.gz) | `172d33787ec2d11345d152becdc96982d3057ed16426910302c1b103980b634b` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.5.4/kubernetes-client-darwin-386.tar.gz) | `53e7c4839025ad04c1104b99e1f8b45f4fe639397c623e2e050acb53cb0a8cbd` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.5.4/kubernetes-client-darwin-amd64.tar.gz) | `6fac39282c9599566874d63c57b305798e4096a42ef83a8965f615c1d709559c` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.5.4/kubernetes-client-linux-386.tar.gz) | `80719626f7e6db6d2d04e57bb7edad3077b774a11ebccea3fcddadaa48cbf0a6` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.5.4/kubernetes-client-linux-amd64.tar.gz) | `24001bc0c7ddb32cd72ac9bed55543830424fba734587ac23b812d8d047a9091` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.5.4/kubernetes-client-linux-arm64.tar.gz) | `094ff4fe7a10e23a397803869a11a3cc508f3990d9e3b4fbccaefe44be2ad81a` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.5.4/kubernetes-client-linux-arm.tar.gz) | `b12b823d12942d7fccaf791343e9c9854073de3e03cc57a7e4bd7b03fec9806b` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.5.4/kubernetes-client-windows-386.tar.gz) | `e5ae9775cfe695d2d855b29c01f19b0fd0fad008071d8e95f47f70beb16291a8` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.5.4/kubernetes-client-windows-amd64.tar.gz) | `40cc26a8216e703217264194b68d6b5af28ffa1b9b48b23232027c5d63d8b28c` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.5.4/kubernetes-server-linux-amd64.tar.gz) | `a61cb36d64c8a4111cf04f9d1aac5d8418d07a7c8a682522203b0dfa76f9c806` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.5.4/kubernetes-server-linux-arm64.tar.gz) | `abaa5052f9d0daaebf6b7375c9667c9160355b8ea074daac76ba8a79a24cab37` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.5.4/kubernetes-server-linux-arm.tar.gz) | `ffff55a0f5f5848fdde32a2766dc63cdf26629ca4f91db458381ffb55cf49535` + +## Changelog since v1.5.3 + +### Other notable changes + +* Fix AWS device allocator to only use valid device names ([#41455](https://github.com/kubernetes/kubernetes/pull/41455), [@gnufied](https://github.com/gnufied)) +* The kube-apiserver [basic audit log](https://kubernetes.io/docs/admin/audit/) can be enabled in GCE by exporting the environment variable `ENABLE_APISERVER_BASIC_AUDIT=true` before running `cluster/kube-up.sh`. This will log to `/var/log/kube-apiserver-audit.log` and use the same `logrotate` settings as `/var/log/kube-apiserver.log`. ([#41211](https://github.com/kubernetes/kubernetes/pull/41211), [@enisoc](https://github.com/enisoc)) +* list-resources: don't fail if the grep fails to match any resources ([#41933](https://github.com/kubernetes/kubernetes/pull/41933), [@ixdy](https://github.com/ixdy)) +* Bump GCE ContainerVM to container-vm-v20170214 to address CVE-2016-9962. ([#41449](https://github.com/kubernetes/kubernetes/pull/41449), [@zmerlynn](https://github.com/zmerlynn)) + + + +# v1.5.3 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.5/examples) + +## Downloads for v1.5.3 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.5.3/kubernetes.tar.gz) | `a4d997be9e3ac0f9838a58fb80d08c2ab02e00afb9d16d3db18d99c85b88b316` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.5.3/kubernetes-src.tar.gz) | `a23636ee40a60c1bb3255a03177f522c28133f74c6d09a5437f6b56b7e1d5296` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.5.3/kubernetes-client-darwin-386.tar.gz) | `2f8eeb772c22c7dad5a32d6ee17e8b309503b56fbcb0abdc74e1f94e86b33520` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.5.3/kubernetes-client-darwin-amd64.tar.gz) | `b044240271223aa93f8bdb8054824a48ba5571460d2e6c90688dccd0892e5c7e` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.5.3/kubernetes-client-linux-386.tar.gz) | `d2649a41e4a64c2027e321254e4ef3e690371bd0c7eece12d3395e49d8171617` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.5.3/kubernetes-client-linux-amd64.tar.gz) | `eaf386a46eeee324bb71349bba7d5d3f41d7d19af75537cf9e4e7045d7068f68` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.5.3/kubernetes-client-linux-arm64.tar.gz) | `2f2d45296651e5696f373838ba019e8b8bb11b2a2772a55f0a6e367ec6c18e2d` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.5.3/kubernetes-client-linux-arm.tar.gz) | `56b8b207fd914dc7c16fdb675a3917ab9bff0efbe745ee1675abbff2b5854d32` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.5.3/kubernetes-client-windows-386.tar.gz) | `fe3136e3c6bd983e55396341c451f896e478e8c9d0b3d1418e1d1fccee3d7b75` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.5.3/kubernetes-client-windows-amd64.tar.gz) | `8e315cb48135a4ed26585e9d8cf88f550ac51e3658b981bb53cb0952e9b3393a` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.5.3/kubernetes-server-linux-amd64.tar.gz) | `ad4d101bec0ef981a7e1efbe11223e502ff644368d70ad54915e15fcb3ad6735` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.5.3/kubernetes-server-linux-arm64.tar.gz) | `bfd66c57d1071bdd213d4c6d124d491959ae3509994e5a23cc2720a8ad18526d` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.5.3/kubernetes-server-linux-arm.tar.gz) | `12b335637b7a4aa019cee600b0161d51e6317a87bec0500e1f9d85990f6352d5` + +### Node Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.5.3/kubernetes-node-linux-amd64.tar.gz) | `3f54e2d101b6351513ce9425a23f9a196e965326c3a7f78a98ef1dad452e5830` +[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.5.3/kubernetes-node-linux-arm.tar.gz) | `6508b64755dc0ff90f23921d2b8bb6c0c321c38edeaf24fd4c22282880a87a11` +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.5.3/kubernetes-node-linux-arm64.tar.gz) | `578ef8a6958fb4bf2e0438cdef7707d12456186a1b8c4b18aa66f47b9221a713` +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.5.3/kubernetes-node-windows-amd64.tar.gz) | `aa166b275b3d0f80cbf23fbee7f42358b6176f37fd9ef66837f38910d4626079` + +## Changelog since v1.5.2 + +### Other notable changes + +* We change the default attach_detach_controller sync period to 1 minute to reduce the query frequency through cloud provider to check whether volumes are attached or not. ([#41363](https://github.com/kubernetes/kubernetes/pull/41363), [@jingxu97](https://github.com/jingxu97)) +* Added configurable etcd initial-cluster-state to kube-up script ([#41320](https://github.com/kubernetes/kubernetes/pull/41320), [@jszczepkowski](https://github.com/jszczepkowski)) +* If ExperimentalCriticalPodAnnotation=True flag gate is set, kubelet will ensure that pods with `scheduler.alpha.kubernetes.io/critical-pod` annotation will be admitted even under resource pressure, will not be evicted, and are reasonably protected from system OOMs. ([#41052](https://github.com/kubernetes/kubernetes/pull/41052), [@vishh](https://github.com/vishh)) +* Reverts to looking up the current VM in vSphere using the machine's UUID, either obtained via sysfs or via the `vm-uuid` parameter in the cloud configuration file. ([#40892](https://github.com/kubernetes/kubernetes/pull/40892), [@robdaemon](https://github.com/robdaemon)) +* Fix for detach volume when node is not present/ powered off ([#40118](https://github.com/kubernetes/kubernetes/pull/40118), [@BaluDontu](https://github.com/BaluDontu)) +* Move b.gcr.io/k8s_authenticated_test to gcr.io/k8s-authenticated-test ([#40335](https://github.com/kubernetes/kubernetes/pull/40335), [@zmerlynn](https://github.com/zmerlynn)) +* Bump up GLBC version from 0.9.0-beta to 0.9.1 ([#41037](https://github.com/kubernetes/kubernetes/pull/41037), [@bprashanth](https://github.com/bprashanth)) +* azure: fix Azure Container Registry integration ([#40142](https://github.com/kubernetes/kubernetes/pull/40142), [@colemickens](https://github.com/colemickens)) +* azure disk: restrict name length for Azure specifications ([#40030](https://github.com/kubernetes/kubernetes/pull/40030), [@colemickens](https://github.com/colemickens)) +* Bump GCI to gci-beta-56-9000-80-0 ([#41027](https://github.com/kubernetes/kubernetes/pull/41027), [@dchen1107](https://github.com/dchen1107)) +* Bump up glbc version to 0.9.0-beta.1 ([#40565](https://github.com/kubernetes/kubernetes/pull/40565), [@bprashanth](https://github.com/bprashanth)) +* Enable lazy inode table and journal initialization for ext3 and ext4 ([#38865](https://github.com/kubernetes/kubernetes/pull/38865), [@codablock](https://github.com/codablock)) +* Kubelet will no longer set hairpin mode on every interface on the machine when an error occurs in setting up hairpin for a specific interface. ([#36990](https://github.com/kubernetes/kubernetes/pull/36990), [@bboreham](https://github.com/bboreham)) +* The SubjectAccessReview API passes subresource and resource name information to the authorizer to answer authorization queries. ([#40935](https://github.com/kubernetes/kubernetes/pull/40935), [@liggitt](https://github.com/liggitt)) +* Bump GCE ContainerVM to container-vm-v20170201 to address CVE-2016-9962. ([#40828](https://github.com/kubernetes/kubernetes/pull/40828), [@zmerlynn](https://github.com/zmerlynn)) +* Reduce time needed to attach Azure disks ([#40066](https://github.com/kubernetes/kubernetes/pull/40066), [@codablock](https://github.com/codablock)) +* Fixes request header authenticator by presenting the request header client CA so that the front proxy will authenticate using its client certificate. ([#40301](https://github.com/kubernetes/kubernetes/pull/40301), [@deads2k](https://github.com/deads2k)) +* Fix failing load balancers in Azure ([#40405](https://github.com/kubernetes/kubernetes/pull/40405), [@codablock](https://github.com/codablock)) +* Add a KUBERNETES_NODE_* section to build kubelet/kube-proxy for windows ([#38919](https://github.com/kubernetes/kubernetes/pull/38919), [@brendandburns](https://github.com/brendandburns)) +* Update GCE ContainerVM deployment to container-vm-v20170117 to pick up CVE fixes in base image. ([#40094](https://github.com/kubernetes/kubernetes/pull/40094), [@zmerlynn](https://github.com/zmerlynn)) +* Adding vmdk file extension for vmDiskPath in vsphere DeleteVolume ([#40538](https://github.com/kubernetes/kubernetes/pull/40538), [@divyenpatel](https://github.com/divyenpatel)) +* AWS: Remove duplicate calls to DescribeInstance during volume operations ([#39842](https://github.com/kubernetes/kubernetes/pull/39842), [@gnufied](https://github.com/gnufied)) +* Caching added to the OIDC client auth plugin to fix races and reduce the time kubectl commands using this plugin take by several seconds. ([#38167](https://github.com/kubernetes/kubernetes/pull/38167), [@ericchiang](https://github.com/ericchiang)) +* Actually fix local-cluster-up on 1.5 branch ([#40501](https://github.com/kubernetes/kubernetes/pull/40501), [@lavalamp](https://github.com/lavalamp)) +* Prevent hotloops on error conditions, which could fill up the disk faster than log rotation can free space. ([#40497](https://github.com/kubernetes/kubernetes/pull/40497), [@lavalamp](https://github.com/lavalamp)) +* Fix issue with PodDisruptionBudgets in which `minAvailable` specified as a percentage did not work with StatefulSet Pods. ([#39454](https://github.com/kubernetes/kubernetes/pull/39454), [@foxish](https://github.com/foxish)) +* Fix panic in vSphere cloud provider ([#38423](https://github.com/kubernetes/kubernetes/pull/38423), [@BaluDontu](https://github.com/BaluDontu)) +* Allow missing keys in templates by default ([#39486](https://github.com/kubernetes/kubernetes/pull/39486), [@ncdc](https://github.com/ncdc)) +* Fix kubectl get -f <file> -o <nondefault printer> so it prints all items in the file ([#39038](https://github.com/kubernetes/kubernetes/pull/39038), [@ncdc](https://github.com/ncdc)) +* Endpoints, that tolerate unready Pods, are now listing Pods in state Terminating as well ([#37093](https://github.com/kubernetes/kubernetes/pull/37093), [@simonswine](https://github.com/simonswine)) +* Add path exist check in getPodVolumePathListFromDisk ([#38909](https://github.com/kubernetes/kubernetes/pull/38909), [@jingxu97](https://github.com/jingxu97)) +* Ensure the GCI metadata files do not have newline at the end ([#38727](https://github.com/kubernetes/kubernetes/pull/38727), [@Amey-D](https://github.com/Amey-D)) +* AWS: recognize eu-west-2 region ([#38746](https://github.com/kubernetes/kubernetes/pull/38746), [@justinsb](https://github.com/justinsb)) +* Fix space issue in volumePath with vSphere Cloud Provider ([#38338](https://github.com/kubernetes/kubernetes/pull/38338), [@BaluDontu](https://github.com/BaluDontu)) +* Fix issue when attempting to unmount a wrong vSphere volume ([#37413](https://github.com/kubernetes/kubernetes/pull/37413), [@BaluDontu](https://github.com/BaluDontu)) +* Changed default scsi controller type in vSphere Cloud Provider ([#38426](https://github.com/kubernetes/kubernetes/pull/38426), [@abrarshivani](https://github.com/abrarshivani)) +* Fixes API compatibility issue with empty lists incorrectly returning a null `items` field instead of an empty array. ([#39834](https://github.com/kubernetes/kubernetes/pull/39834), [@liggitt](https://github.com/liggitt)) +* AWS: Add sequential allocator for device names. ([#38818](https://github.com/kubernetes/kubernetes/pull/38818), [@jsafrane](https://github.com/jsafrane)) +* Fix fsGroup to vSphere ([#38655](https://github.com/kubernetes/kubernetes/pull/38655), [@abrarshivani](https://github.com/abrarshivani)) + + + +# v1.5.2 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.5/examples) + +## Downloads for v1.5.2 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.5.2/kubernetes.tar.gz) | `67344958325a70348db5c4e35e59f9c3552232cdc34defb8a0a799ed91c671a3` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.5.2/kubernetes-src.tar.gz) | `93241d0f7b69de71d68384699b225ed8a5439bde03dc154827a2b7a6a343791e` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.5.2/kubernetes-client-darwin-386.tar.gz) | `1e8a3186907fe5e00f8afcd2ca7a207703d5c499d86c80839333cd7cc4eee9ad` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.5.2/kubernetes-client-darwin-amd64.tar.gz) | `64ebd769d96aa5a12f13c4d8c4f6ddce58eae90765c55b7942872dc91447e4d7` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.5.2/kubernetes-client-linux-386.tar.gz) | `a8ecb343a7baf9e01459cd903c09291dbbe72e12431e259e60e11b243b2740f7` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.5.2/kubernetes-client-linux-amd64.tar.gz) | `9d5b6edebb5ee09b20f35d821d3d233ff4d5935880fc8ea8f1fa654d5fd23e51` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.5.2/kubernetes-client-linux-arm64.tar.gz) | `03fd45f96e5d2b66c568b213d0ab6a216aad8c383d5ea4654f7ba8ef5c4d6747` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.5.2/kubernetes-client-linux-arm.tar.gz) | `527fbf42e2e4a2785ad367484a4db619b04484621006fa098cde0ffc3ad3496f` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.5.2/kubernetes-client-windows-386.tar.gz) | `3afe8d3ef470e81a4d793539c2a05fbbca9f0710ced1c132b1105469924e3cea` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.5.2/kubernetes-client-windows-amd64.tar.gz) | `dbb63c5211d62512b412efcb52d0a394f19a8417f3e5cd153a7f04c619eb5b41` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.5.2/kubernetes-server-linux-amd64.tar.gz) | `8c4be20caa87530fdd17e539abe6f2d3cfccaef9156d262d4d9859ca8b6e3a38` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.5.2/kubernetes-server-linux-arm64.tar.gz) | `e0251c3209acebf55e98db521cf29aaa74076a4119b1b19780620faf81d18f44` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.5.2/kubernetes-server-linux-arm.tar.gz) | `548ad7e061263ff53b80f3ab10a3c7f9289e89a4c56b5a8f49ae513ba88ea93a` + +## Changelog since v1.5.1 + +### Other notable changes + +* Fixes NotAuthenticated errors that appear in the kubelet and kube-controller-manager due to never logging in to vSphere ([#36169](https://github.com/kubernetes/kubernetes/pull/36169), [@robdaemon](https://github.com/robdaemon)) +* Update amd64 kube-proxy base image to debian-iptables-amd64:v5 ([#39725](https://github.com/kubernetes/kubernetes/pull/39725), [@ixdy](https://github.com/ixdy)) +* Update kube-proxy image to be based off of Debian 8.6 base image. ([#39695](https://github.com/kubernetes/kubernetes/pull/39695), [@ixdy](https://github.com/ixdy)) +* Fixes an HPA-related panic due to division-by-zero. ([#39694](https://github.com/kubernetes/kubernetes/pull/39694), [@DirectXMan12](https://github.com/DirectXMan12)) +* Update fluentd-gcp addon to 1.28.1 ([#39706](https://github.com/kubernetes/kubernetes/pull/39706), [@ixdy](https://github.com/ixdy)) +* Provide kubernetes-controller-manager flags to control volume attach/detach reconciler sync. The duration of the syncs can be controlled, and the syncs can be shut off as well. ([#39551](https://github.com/kubernetes/kubernetes/pull/39551), [@chrislovecnm](https://github.com/chrislovecnm)) +* AWS: Recognize ca-central-1 region ([#38410](https://github.com/kubernetes/kubernetes/pull/38410), [@justinsb](https://github.com/justinsb)) +* fix nil dereference when doing a volume type check on persistent volumes ([#39529](https://github.com/kubernetes/kubernetes/pull/39529), [@sjenning](https://github.com/sjenning)) +* Generate OpenAPI definition for inlined types ([#39466](https://github.com/kubernetes/kubernetes/pull/39466), [@mbohlool](https://github.com/mbohlool)) +* Admit critical pods in the kubelet ([#38836](https://github.com/kubernetes/kubernetes/pull/38836), [@bprashanth](https://github.com/bprashanth)) +* assign -998 as the oom_score_adj for critical pods (e.g. kube-proxy) ([#39114](https://github.com/kubernetes/kubernetes/pull/39114), [@dchen1107](https://github.com/dchen1107)) +* Don't evict static pods ([#39059](https://github.com/kubernetes/kubernetes/pull/39059), [@bprashanth](https://github.com/bprashanth)) +* Fix an issue where AWS tear-down leaks an DHCP Option Set. ([#38645](https://github.com/kubernetes/kubernetes/pull/38645), [@zmerlynn](https://github.com/zmerlynn)) +* Give apply the versioned struct that generated from the type defined in the restmapping. ([#38982](https://github.com/kubernetes/kubernetes/pull/38982), [@ymqytw](https://github.com/ymqytw)) +* Add support for Azure Container Registry, update Azure dependencies ([#37783](https://github.com/kubernetes/kubernetes/pull/37783), [@brendandburns](https://github.com/brendandburns)) +* Fixes an issue where `hack/local-up-cluster.sh` would fail on the API server start with ([#38898](https://github.com/kubernetes/kubernetes/pull/38898), [@deads2k](https://github.com/deads2k)) + * !!! [1215 15:42:56] Timed out waiting for apiserver: to answer at https://localhost:6443/version; tried 10 waiting 1 between each +* Since `kubernetes.tar.gz` no longer includes client or server binaries, `cluster/kube-{up,down,push}.sh` now automatically download released binaries if they are missing. ([#38730](https://github.com/kubernetes/kubernetes/pull/38730), [@ixdy](https://github.com/ixdy)) +* Fixed validation of multizone cluster for GCE ([#38695](https://github.com/kubernetes/kubernetes/pull/38695), [@jszczepkowski](https://github.com/jszczepkowski)) +* Fix nil pointer dereference in test framework ([#37583](https://github.com/kubernetes/kubernetes/pull/37583), [@mtaufen](https://github.com/mtaufen)) +* Fixed detection of master during creation of multizone nodes cluster by kube-up. ([#38617](https://github.com/kubernetes/kubernetes/pull/38617), [@jszczepkowski](https://github.com/jszczepkowski)) +* Kubelet: Add image cache. ([#38375](https://github.com/kubernetes/kubernetes/pull/38375), [@Random-Liu](https://github.com/Random-Liu)) + + + +# v1.5.1 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.5/examples) + +## Downloads for v1.5.1 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.5.1/kubernetes.tar.gz) | `adc4f6ec1fc8f97ed19f474ffcc0af2d050f92dc20ecec2799741802019205ec` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.5.1/kubernetes-src.tar.gz) | `27e5009b906b9f233a7be1efcf51140be945446d828c006c171d03fe07e43565` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.5.1/kubernetes-client-darwin-386.tar.gz) | `06f8155f0df381bca3b4e27bbd28834f7601e32cbe3d0c1f24be90516c5b8a3b` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.5.1/kubernetes-client-darwin-amd64.tar.gz) | `3ede7d74c5f2f918547bca4d813901e33580c8b8f19828da21a5c2296ff4b8be` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.5.1/kubernetes-client-linux-386.tar.gz) | `b96c3c359146e4fc4d8ff4cf09216bbbb9dbaf3f405488d4aaa45ac741c98f99` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.5.1/kubernetes-client-linux-amd64.tar.gz) | `662fc57057290deb38ec49dd7daf4a4a5b91def2dbdb7ee7a4494dec611379a5` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.5.1/kubernetes-client-linux-arm64.tar.gz) | `c33936b7a27f296c7b85bbfac1fe303573580a948dd1f3174916da9a5a954d49` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.5.1/kubernetes-client-linux-arm.tar.gz) | `31ea3e4cbcc9574a37566a2cc3c809105d56a739e9cbd387bf878acacedf9ec8` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.5.1/kubernetes-client-windows-386.tar.gz) | `95420d0d49e2875703ac09a1b6021252644ba162349c6c506b06f2677852de5d` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.5.1/kubernetes-client-windows-amd64.tar.gz) | `534a3c5bdde989c7339df05c4e7793c6c50e5ebc0a663b1a9cdd25bce43a5a74` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.5.1/kubernetes-server-linux-amd64.tar.gz) | `871a9f35e1c73f571b7113e01a91d7bfc5bfe3501e910c921a18313774b25fd1` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.5.1/kubernetes-server-linux-arm64.tar.gz) | `e13b070ef70d2cea512a839095dbf95249d2f7b5dcbfb378539548c888efe196` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.5.1/kubernetes-server-linux-arm.tar.gz) | `c54cf106e919149731a23da60ad354eadc53b3bf544ab91d4d48ff0c87fdaa7e` + +## Changelog since v1.5.0 + +### Other notable changes + +* Changes the default value of the "anonymous-auth" flag to a safer default value of false. This affects kube apiserver and federation apiserver. See https://groups.google.com/forum/#!topic/kubernetes-announce/iclRj-6Nfsg for more details. ([#38708](https://github.com/kubernetes/kubernetes/pull/38708), [@erictune](https://github.com/erictune)) +* Fixes issue where if the audit log is enabled and anonymous authentication is disabled, then an unauthenticated user request will cause a panic and crash the `kube-apiserver`. ([#38717](https://github.com/kubernetes/kubernetes/pull/38717), [@deads2k](https://github.com/deads2k)) + +## Known Issues for v1.5.1 + +- `hack/local-up-cluster.sh` script times out waiting for apiserver to answer, see [#38847](https://github.com/kubernetes/kubernetes/issues/38847). + To workaround this, modify the script to pass `--anonymous-auth=true` to `sudo -E "${GO_OUT}/hyperkube" apiserver ...` when starting `kube-apiserver`. + +# v1.5.0 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.5/examples) + +## Downloads for v1.5.0 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.5.0/kubernetes.tar.gz) | `52b7df98ea05fb3ebbababf1ccb7f6d4e6f4cad00b8d09350f270aa7e3ad7e85` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.5.0/kubernetes-src.tar.gz) | `fbefb2544667f96045c346cee595b0f315282dfdbd41a8f2d5ccc74054a4078e` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.5.0/kubernetes-client-darwin-386.tar.gz) | `27d71bb6b16a26387ee30272bd4ee5758deccafafdc91b38f3d0dc19a34e129e` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.5.0/kubernetes-client-darwin-amd64.tar.gz) | `5fa8550235919568d7d839b19de00e9bdd72a97cfde21dbdbe07fefd6d6290dc` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.5.0/kubernetes-client-linux-386.tar.gz) | `032a17701c014b8bbbb83c7da1046d8992a41031628cf7e1959a94378f5f195b` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.5.0/kubernetes-client-linux-amd64.tar.gz) | `afae4fadb7bbb1532967f88fef1de6458abda17219f634cc2c41608fd83ae7f6` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.5.0/kubernetes-client-linux-arm64.tar.gz) | `acca7607dae678a0165b7e10685e0eff0d418beebe7c25eaffe18c85717b5cc4` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.5.0/kubernetes-client-linux-arm.tar.gz) | `fbc182b6d9ae476c7c509486d773074fd1007032886a8177735e08010c43f89d` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.5.0/kubernetes-client-windows-386.tar.gz) | `a8ddea329bc8d57267294464c163d8c2f7837f6353f8c685271864ed8b8bc54d` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.5.0/kubernetes-client-windows-amd64.tar.gz) | `bc3a76f1414fa1f4b2fb92732de2100d346edb7b870ed5414ea062bb401a8ebd` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.5.0/kubernetes-server-linux-amd64.tar.gz) | `b9c122d709c0556c1e19d31d98bf26ee530f91c0119f4454fb930cef5a0c1aa7` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.5.0/kubernetes-server-linux-arm64.tar.gz) | `3bbba5c8dedc47db8f9ebdfac5468398cce2470617de9d550affef9702b724c9` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.5.0/kubernetes-server-linux-arm.tar.gz) | `3ff9ccdd641690fd1c8878408cd369beca1f9f8b212198e251862d40cf2dadc0` + +## Major Themes + +- StatefulSets (ex-PetSets) + - StatefulSets are beta now (fixes and stabilization) +- Improved Federation Support + - New command: `kubefed` + - DaemonSets + - Deployments + - ConfigMaps +- Simplified Cluster Deployment + - Improvements to `kubeadm` + - HA Setup for Master +- Node Robustness and Extensibility + - Windows Server Container support + - CRI for pluggable container runtimes + - `kubelet` API supports authentication and authorization + +## Features + +Features for this release were tracked via the use of the [kubernetes/features](https://github.com/kubernetes/features) issues repo. Each Feature issue is owned by a Special Interest Group from [kubernetes/community](https://github.com/kubernetes/community) + +- **API Machinery** + - [beta] `kube-apiserver` support for the OpenAPI spec is moving from alpha to beta. The first [non-go client](https://github.com/kubernetes-incubator/client-python) is based on it ([kubernetes/features#53](https://github.com/kubernetes/features/issues/53)) +- **Apps** + - [stable] When replica sets cannot create pods, they will now report detail via the API about the underlying reason ([kubernetes/features#120](https://github.com/kubernetes/features/issues/120)) + - [stable] `kubectl apply` is now able to delete resources you no longer need with `--prune` ([kubernetes/features#128](https://github.com/kubernetes/features/issues/128)) + - [beta] Deployments that cannot make progress in rolling out the newest version will now indicate via the API they are blocked ([docs](http://kubernetes.io/docs/user-guide/deployments/#failed-deployment)) ([kubernetes/features#122](https://github.com/kubernetes/features/issues/122)) + - [beta] StatefulSets allow workloads that require persistent identity or per-instance storage to be created and managed on Kubernetes. ([docs](http://kubernetes.io/docs/concepts/abstractions/controllers/statefulsets/)) ([kubernetes/features#137](https://github.com/kubernetes/features/issues/137)) + - [beta] In order to preserve safety guarantees the cluster no longer force deletes pods on un-responsive nodes and users are now warned if they try to force delete pods via the CLI. ([docs](http://kubernetes.io/docs/tasks/manage-stateful-set/scale-stateful-set/)) ([kubernetes/features#119](https://github.com/kubernetes/features/issues/119)) +- **Auth** + - [alpha] Further polishing of the Role-based access control alpha API including a default set of cluster roles. ([docs](http://kubernetes.io/docs/admin/authorization/)) ([kubernetes/features#2](https://github.com/kubernetes/features/issues/2)) + - [beta] Added ability to authenticate/authorize access to the Kubelet API ([docs](http://kubernetes.io/docs/admin/kubelet-authentication-authorization/)) ([kubernetes/features#89](https://github.com/kubernetes/features/issues/89)) +- **AWS** + - [stable] Roles should appear in kubectl get nodes ([kubernetes/features#113](https://github.com/kubernetes/features/issues/113)) +- **Cluster Lifecycle** + - [alpha] Improved UX and usability for the kubeadm binary that makes it easy to get a new cluster running. ([docs](http://kubernetes.io/docs/getting-started-guides/kubeadm/)) ([changelog](https://github.com/kubernetes/kubeadm/blob/master/CHANGELOG.md)) ([kubernetes/features#11](https://github.com/kubernetes/features/issues/11)) +- **Cluster Ops** + - [alpha] Added ability to create/remove clusters w/highly available (replicated) masters on GCE using kube-up/kube-down scripts. ([docs](http://kubernetes.io/docs/admin/ha-master-gce/)) ([kubernetes/features#48](https://github.com/kubernetes/features/issues/48)) +- **Federation** + - [alpha] Support for ConfigMaps in federation. ([docs](http://kubernetes.io/docs/user-guide/federation/configmap/)) ([kubernetes/features#105](https://github.com/kubernetes/features/issues/105)) + - [alpha] Alpha level support for DaemonSets in federation. ([docs](http://kubernetes.io/docs/user-guide/federation/daemonsets/)) ([kubernetes/features#101](https://github.com/kubernetes/features/issues/101)) + - [alpha] Alpha level support for Deployments in federation. ([docs](http://kubernetes.io/docs/user-guide/federation/deployment/)) ([kubernetes/features#100](https://github.com/kubernetes/features/issues/100)) + - [alpha] Cluster federation: Added support for DeleteOptions.OrphanDependents for federation resources. ([docs](http://kubernetes.io/docs/user-guide/federation/#cascading-deletion)) ([kubernetes/features#99](https://github.com/kubernetes/features/issues/99)) + - [alpha] Introducing `kubefed`, a new command line tool to simplify federation control plane. ([docs](http://kubernetes.io/docs/admin/federation/kubefed/)) ([kubernetes/features#97](https://github.com/kubernetes/features/issues/97)) +- **Network** + - [stable] Services can reference another service by DNS name, rather than being hosted in pods ([kubernetes/features#33](https://github.com/kubernetes/features/issues/33)) + - [beta] Opt in source ip preservation for Services with Type NodePort or LoadBalancer ([docs](http://kubernetes.io/docs/tutorials/services/source-ip/)) ([kubernetes/features#27](https://github.com/kubernetes/features/issues/27)) + - [stable] Enable DNS Horizontal Autoscaling with beta ConfigMap parameters support ([docs](http://kubernetes.io/docs/tasks/administer-cluster/dns-horizontal-autoscaling/)) +- **Node** + - [alpha] Added ability to preserve access to host userns when userns remapping is enabled in container runtime ([kubernetes/features#127](https://github.com/kubernetes/features/issues/127)) + - [alpha] Introducing the v1alpha1 CRI API to allow pluggable container runtimes; an experimental docker-CRI integration is ready for testing and feedback. ([docs](https://github.com/kubernetes/community/blob/master/contributors/devel/container-runtime-interface.md)) ([kubernetes/features#54](https://github.com/kubernetes/features/issues/54)) + - [alpha] Kubelet launches container in a per pod cgroup hierarchy based on quality of service tier ([kubernetes/features#126](https://github.com/kubernetes/features/issues/126)) + - [beta] Kubelet integrates with memcg notification API to detect when a hard eviction threshold is crossed ([kubernetes/features#125](https://github.com/kubernetes/features/issues/125)) + - [beta] Introducing the beta version containerized node conformance test gcr.io/google_containers/node-test:0.2 for users to verify node setup. ([docs](http://kubernetes.io/docs/admin/node-conformance/)) ([kubernetes/features#84](https://github.com/kubernetes/features/issues/84)) +- **Scheduling** + - [alpha] Added support for accounting opaque integer resources. ([docs](http://kubernetes.io/docs/user-guide/compute-resources/#opaque-integer-resources-alpha-feature)) ([kubernetes/features#76](https://github.com/kubernetes/features/issues/76)) + - [beta] PodDisruptionBudget has been promoted to beta, can be used to safely drain nodes while respecting application SLO's ([docs](http://kubernetes.io/docs/tasks/administer-cluster/safely-drain-node/)) ([kubernetes/features#85](https://github.com/kubernetes/features/issues/85)) +- **UI** + - [stable] Dashboard UI now shows all user facing objects and their resource usage. ([docs](http://kubernetes.io/docs/user-guide/ui/)) ([kubernetes/features#136](https://github.com/kubernetes/features/issues/136)) +- **Windows** + - [alpha] Added support for Windows Server 2016 nodes and scheduling Windows Server Containers ([docs](http://kubernetes.io/docs/getting-started-guides/windows/)) ([kubernetes/features#116](https://github.com/kubernetes/features/issues/116)) + +## Known Issues + +Populated via [v1.5.0 known issues / FAQ accumulator](https://github.com/kubernetes/kubernetes/issues/37134) + +* CRI [known issues and + limitations](https://github.com/kubernetes/community/blob/master/contributors/devel/container-runtime-interface.md#kubernetes-v15-release-cri-v1alpha1) +* getDeviceNameFromMount() function doesn't return the volume path correctly when the volume path contains spaces [#37712](https://github.com/kubernetes/kubernetes/issues/37712) +* Federation alpha features do not have feature gates defined and +are hence enabled by default. This will be fixed in a future release. +[#38593](https://github.com/kubernetes/kubernetes/issues/38593) +* Federation control plane can be upgraded by updating the image +fields in the `Deployment` specs of the control plane components. +However, federation control plane upgrades were not tested in this +release [38537](https://github.com/kubernetes/kubernetes/issues/38537) + +## Notable Changes to Existing Behavior + +* Node controller no longer force-deletes pods from the api-server. ([#35235](https://github.com/kubernetes/kubernetes/pull/35235), [@foxish](https://github.com/foxish)) + * For StatefulSet (previously PetSet), this change means creation of + replacement pods is blocked until old pods are definitely not running + (indicated either by the kubelet returning from partitioned state, + deletion of the Node object, deletion of the instance in the cloud provider, + or force deletion of the pod from the api-server). + This helps prevent "split brain" scenarios in clustered applications by + ensuring that unreachable pods will not be presumed dead unless some + "fencing" operation has provided one of the above indications. + * For all other existing controllers except StatefulSet, this has no effect on + the ability of the controller to replace pods because the controllers do not + reuse pod names (they use generate-name). + * User-written controllers that reuse names of pod objects should evaluate this change. + * When deleting an object with `kubectl delete ... --grace-period=0`, the client will + begin a graceful deletion and wait until the resource is fully deleted. To force + deletion immediately, use the `--force` flag. This prevents users from accidentally + allowing two Stateful Set pods to share the same persistent volume which could lead to data + corruption [#37263](https://github.com/kubernetes/kubernetes/pull/37263) + + +* Allow anonymous API server access, decorate authenticated users with system:authenticated group ([#32386](https://github.com/kubernetes/kubernetes/pull/32386), [@liggitt](https://github.com/liggitt)) + * kube-apiserver learned the '--anonymous-auth' flag, which defaults to true. When enabled, requests to the secure port that are not rejected by other configured authentication methods are treated as anonymous requests, and given a username of 'system:anonymous' and a group of 'system:unauthenticated'. + * Authenticated users are decorated with a 'system:authenticated' group. + * **IMPORTANT**: See Action Required for important actions related to this change. + +* kubectl get -o jsonpath=... will now throw an error if the path is to a field not present in the json, even if the path is for a field valid for the type. This is a change from the pre-1.5 behavior, which would return the default value for some fields even if they were not present in the json. ([#37991](https://github.com/kubernetes/kubernetes/pull/37991), [@pwittrock](https://github.com/pwittrock)) + +* The strategicmerge patchMergeKey for VolumeMounts was changed from "name" to "mountPath". This was necessary because the name field refers to the name of the Volume, and is not a unique key for the VolumeMount. Multiple VolumeMounts will have the same Volume name if mounting the same volume more than once. The "mountPath" is verified to be unique and can act as the mergekey. ([#35071](https://github.com/kubernetes/kubernetes/pull/35071), [@pwittrock](https://github.com/pwittrock)) + +## Deprecations + +* extensions/v1beta1.Jobs is deprecated, use batch/v1.Job instead ([#36355](https://github.com/kubernetes/kubernetes/pull/36355), [@soltysh](https://github.com/soltysh)) +* The kubelet --reconcile-cdir flag is deprecated because it has no function anymore. ([#35523](https://github.com/kubernetes/kubernetes/pull/35523), [@luxas](https://github.com/luxas)) +* Notice of deprecation for recycler [#36760](https://github.com/kubernetes/kubernetes/pull/36760) +* The init-container (pod.beta.kubernetes.io/init-containers) annotations used to accept capitalized field names that could be accidentally generated by the k8s.io/kubernetes/pkg/api package. Using an upper case field name will now return an error and all users should use the versioned API types from `pkg/api/v1` when serializing from Golang. + +## Action Required Before Upgrading + +* **Important Security-related changes before upgrading + * You *MUST* set `--anonymous-auth=false` flag on your kube-apiserver unless you are a developer testing this feature and understand it. + If you do not, you risk allowing unauthorized users to access your apiserver. + * You *MUST* set `--anonymous-auth=false` flag on your federation apiserver unless you are a developer testing this feature and understand it. + If you do not, you risk allowing unauthorized users to access your federation apiserver. + * You do not need to adjust this flag on Kubelet: there was no authorization for the Kubelet APIs in 1.4. +* batch/v2alpha1.ScheduledJob has been renamed, use batch/v2alpha1.CronJob instead ([#36021](https://github.com/kubernetes/kubernetes/pull/36021), [@soltysh](https://github.com/soltysh)) +* PetSet has been renamed to StatefulSet. + If you have existing PetSets, **you must perform extra migration steps** both + before and after upgrading to convert them to StatefulSets. ([docs](http://kubernetes.io/docs/tasks/manage-stateful-set/upgrade-pet-set-to-stateful-set/)) ([#35663](https://github.com/kubernetes/kubernetes/pull/35663), [@janetkuo](https://github.com/janetkuo)) +* If you are upgrading your Cluster Federation components from v1.4.x, please update your `federation-apiserver` and `federation-controller-manager` manifests to the new version ([#30601](https://github.com/kubernetes/kubernetes/pull/30601), [@madhusudancs](https://github.com/madhusudancs)) +* The deprecated kubelet --configure-cbr0 flag has been removed, and with that the "classic" networking mode as well. If you depend on this mode, please investigate whether the other network plugins `kubenet` or `cni` meet your needs. ([#34906](https://github.com/kubernetes/kubernetes/pull/34906), [@luxas](https://github.com/luxas)) +* New client-go structure, refer to kubernetes/client-go for versioning policy ([#34989](https://github.com/kubernetes/kubernetes/pull/34989), [@caesarxuchao](https://github.com/caesarxuchao)) +* The deprecated kube-scheduler --bind-pods-qps and --bind-pods burst flags have been removed, use --kube-api-qps and --kube-api-burst instead ([#34471](https://github.com/kubernetes/kubernetes/pull/34471), [@timothysc](https://github.com/timothysc)) +* If you used the [PodDisruptionBudget](http://kubernetes.io/docs/admin/disruptions/) feature in 1.4 (i.e. created `PodDisruptionBudget` objects), then **BEFORE** upgrading from 1.4 to 1.5, you must delete all `PodDisruptionBudget` objects (`policy/v1alpha1/PodDisruptionBudget`) that you have created. It is not possible to delete these objects after you upgrade, and their presence will prevent you from using the beta PodDisruptionBudget feature in 1.5 (which uses `policy/v1beta1/PodDisruptionBudget`). If you have already upgraded, you will need to downgrade the master to 1.4 to delete the `policy/v1alpha1/PodDisruptionBudget` objects. + +## External Dependency Version Information + +Continuous integration builds have used the following versions of external dependencies, however, this is not a strong recommendation and users should consult an appropriate installation or upgrade guide before deciding what versions of etcd, docker or rkt to use. + +* Docker versions 1.10.3 - 1.12.3 + * Docker version 1.11.2 known issues + - Kernel crash with Aufs storage driver on Debian Jessie ([#27885]((https://github.com/kubernetes/kubernetes/issues/27885)) + which can be identified by the [node problem detector](http://kubernetes.io/docs/admin/node-problem/) + - Leaked File descriptors ([#275](https://github.com/docker/containerd/issues/275)) + - Additional memory overhead per container ([#21737]((https://github.com/docker/docker/issues/21737)) + * Docker version 1.12.1 [has been validated](https://github.com/kubernetes/kubernetes/issues/28698) through the Kubernetes docker automated validation framework as has Docker version 1.12.3 + * Docker 1.10.3 contains [backports provided by RedHat](https://github.com/docker/docker/compare/v1.10.3...runcom:docker-1.10.3-stable) for known issues + * Docker versions as old as may 1.9.1 work with [known issues](CHANGELOG.md#191) but this is not guaranteed +* rkt version 1.21.0 + * known issues with the rkt runtime are [listed here](http://kubernetes.io/docs/getting-started-guides/rkt/notes/) +* etcd version 2.2.1 + * etcd version 3.0.14 [has also been validated](https://k8s-gubernator.appspot.com/builds/kubernetes-jenkins/logs/ci-kubernetes-e2e-gce-etcd3/) but does require [specific configuration steps](https://coreos.com/blog/migrating-applications-etcd-v3.html) + +## Changelog since v1.5.0-beta.3 + +### Other notable changes + +* Bump GCE debian image to container-vm-v20161208 ([release notes](https://cloud.google.com/compute/docs/containers/container_vms#changelog)) ([#38444](https://github.com/kubernetes/kubernetes/pull/38444), [@timstclair](https://github.com/timstclair)) +* Fix unmountDevice issue caused by shared mount in GCI ([#38411](https://github.com/kubernetes/kubernetes/pull/38411), [@jingxu97](https://github.com/jingxu97)) + +### Previous Releases Included in v1.5.0 + +- [v1.5.0-beta.3](CHANGELOG.md#v150-beta3) +- [v1.5.0-beta.2](CHANGELOG.md#v150-beta2) +- [v1.5.0-beta.1](CHANGELOG.md#v150-beta1) +- [v1.5.0-alpha.2](CHANGELOG.md#v150-alpha2) +- [v1.5.0-alpha.1](CHANGELOG.md#v150-alpha1) + + + +# v1.5.0-beta.3 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.5/examples) + +## Downloads for v1.5.0-beta.3 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.5.0-beta.3/kubernetes.tar.gz) | `c2b29b38d29829b7b2591559d0d36495d463de0e18a2611bd1d66f2baea6352c` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.5.0-beta.3/kubernetes-src.tar.gz) | `0b3327b6f0b024c989aba1e546d50d56fc89ed6df74c09fc55b9f9c4a667b771` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.5.0-beta.3/kubernetes-client-darwin-386.tar.gz) | `82a7144ae1371c3320019c8e6a76e95242d85aae9dedccc4884b677cda544c0e` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.5.0-beta.3/kubernetes-client-darwin-amd64.tar.gz) | `3aeea90acfbaf776e2c812e34df4c11a44720e4c5b86c4c0e9a8aaf221149335` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.5.0-beta.3/kubernetes-client-linux-386.tar.gz) | `d55fb1dfe64e62bffbf03f1a7c8bd666562014ad0d438049f0f801f5fa583914` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.5.0-beta.3/kubernetes-client-linux-amd64.tar.gz) | `779b2f1c0eb3eca7dd60332972ccfc79e557e34f080c210dfb6aa6e18e71bbf4` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.5.0-beta.3/kubernetes-client-linux-arm64.tar.gz) | `b5f0a3b23d7082eaefe7090d7a8f9952fd8b00d44a90137200bc5a91001b6e95` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.5.0-beta.3/kubernetes-client-linux-arm.tar.gz) | `ccadbef7ce7c89fc48988c57585c0ccb7488d2dcc7e96f4e43c5bb64e44b9e29` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.5.0-beta.3/kubernetes-client-windows-386.tar.gz) | `da1428b6ed138134358c72af570a65565c5188a1c6e50cee42becb1a48441d91` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.5.0-beta.3/kubernetes-client-windows-amd64.tar.gz) | `7b74aeb215b0f0ff86bae262af5bafe7083a44293e1ab2545f5de3ac42deda0b` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.5.0-beta.3/kubernetes-server-linux-amd64.tar.gz) | `c56aa39fd4e732c86a2729aa427ca2fc95130bd788053aa8e8f6a8efd9e1310e` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.5.0-beta.3/kubernetes-server-linux-arm64.tar.gz) | `9f55082ca5face2db2d6d54bed2a831622e747e1aa527ee8adc61d0ed3fcfab8` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.5.0-beta.3/kubernetes-server-linux-arm.tar.gz) | `4a7c037ac221531eee4e47b66a2aa12fce4044d2d4acbef0e48b09e0a8fe950b` + +## Changelog since v1.5.0-beta.2 + +### Other notable changes + +* Better compat with very old iptables (e.g. CentOS 6) ([#37594](https://github.com/kubernetes/kubernetes/pull/37594), [@thockin](https://github.com/thockin)) +* fix permissions when using fsGroup ([#37009](https://github.com/kubernetes/kubernetes/pull/37009), [@sjenning](https://github.com/sjenning)) +* Fix GCI mounter issue ([#38124](https://github.com/kubernetes/kubernetes/pull/38124), [@jingxu97](https://github.com/jingxu97)) +* fix mesos unit tests ([#38196](https://github.com/kubernetes/kubernetes/pull/38196), [@deads2k](https://github.com/deads2k)) +* Fix Service Update on LoadBalancerSourceRanges Field ([#37720](https://github.com/kubernetes/kubernetes/pull/37720), [@freehan](https://github.com/freehan)) +* Fix Service Update on LoadBalancerSourceRanges Field ([#37720](https://github.com/kubernetes/kubernetes/pull/37720), [@freehan](https://github.com/freehan)) +* Set kernel.softlockup_panic =1 based on the flag. ([#38001](https://github.com/kubernetes/kubernetes/pull/38001), [@dchen1107](https://github.com/dchen1107)) +* Fix logic error in graceful deletion ([#37721](https://github.com/kubernetes/kubernetes/pull/37721), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* Enable containerized mounter only for nfs and glusterfs types ([#37990](https://github.com/kubernetes/kubernetes/pull/37990), [@jingxu97](https://github.com/jingxu97)) +* GCI: Remove /var/lib/docker/network ([#37593](https://github.com/kubernetes/kubernetes/pull/37593), [@yujuhong](https://github.com/yujuhong)) +* kubelet: don't reject pods without adding them to the pod manager ([#37661](https://github.com/kubernetes/kubernetes/pull/37661), [@yujuhong](https://github.com/yujuhong)) +* Fix photon controller plugin to construct with correct PdID ([#37167](https://github.com/kubernetes/kubernetes/pull/37167), [@luomiao](https://github.com/luomiao)) +* Fix the equality checks for numeric values in cluster/gce/util.sh. ([#37638](https://github.com/kubernetes/kubernetes/pull/37638), [@roberthbailey](https://github.com/roberthbailey)) +* federation service controller: stop deleting services from underlying clusters when federated service is deleted. ([#37353](https://github.com/kubernetes/kubernetes/pull/37353), [@nikhiljindal](https://github.com/nikhiljindal)) +* Set Dashboard UI version to v1.5.0 ([#37684](https://github.com/kubernetes/kubernetes/pull/37684), [@rf232](https://github.com/rf232)) +* When deleting an object with `--grace-period=0`, the client will begin a graceful deletion and wait until the resource is fully deleted. To force deletion, use the `--force` flag. ([#37263](https://github.com/kubernetes/kubernetes/pull/37263), [@smarterclayton](https://github.com/smarterclayton)) +* Removes shorthand flag -w from kubectl apply ([#37345](https://github.com/kubernetes/kubernetes/pull/37345), [@MrHohn](https://github.com/MrHohn)) +* Update doc for kubectl apply ([#37397](https://github.com/kubernetes/kubernetes/pull/37397), [@ymqytw](https://github.com/ymqytw)) +* Try self-repair scheduler cache or panic ([#37379](https://github.com/kubernetes/kubernetes/pull/37379), [@wojtek-t](https://github.com/wojtek-t)) +* Use gsed on the Mac ([#37562](https://github.com/kubernetes/kubernetes/pull/37562), [@roberthbailey](https://github.com/roberthbailey)) +* Fix TestServiceAlloc flakes ([#37487](https://github.com/kubernetes/kubernetes/pull/37487), [@wojtek-t](https://github.com/wojtek-t)) + + + +# v1.5.0-beta.2 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.5/examples) + +## Downloads for v1.5.0-beta.2 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-beta.2/kubernetes.tar.gz) | `4a6cb512dee2312ffe291f4209759309576ca477cf51fb8447b30a7cb2a887ed` +[kubernetes-src.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-beta.2/kubernetes-src.tar.gz) | `fe71f19b607183da4abf5f537e7ccbe72ac3306b0933ee1f519253c78bf9252f` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-beta.2/kubernetes-client-darwin-386.tar.gz) | `37bcd12754a28ba6b4d030c68526bc6369f1fa3b7b0e405277bb13989ed0f9da` +[kubernetes-client-darwin-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-beta.2/kubernetes-client-darwin-amd64.tar.gz) | `760817040ca040dd4ba8929cfb714b8bf6704c6ac2ec9985b56fa77b4da03d2c` +[kubernetes-client-linux-386.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-beta.2/kubernetes-client-linux-386.tar.gz) | `87d694445a3e532748d07e0d0da05c1ae8b84b46c54ec1415c9603533747a465` +[kubernetes-client-linux-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-beta.2/kubernetes-client-linux-amd64.tar.gz) | `b2bcd07a525428fe24da628afca22b019b8f2847d1999da8fce72b7342cf64ed` +[kubernetes-client-linux-arm64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-beta.2/kubernetes-client-linux-arm64.tar.gz) | `262c4fa70039389aa5d5b73a0def325471bd24b858157d60c0389fbee5ca671e` +[kubernetes-client-linux-arm.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-beta.2/kubernetes-client-linux-arm.tar.gz) | `52c9341c1e6aa923aed4497c061121c192f209c90fcf31135edc45241a684bfa` +[kubernetes-client-windows-386.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-beta.2/kubernetes-client-windows-386.tar.gz) | `7d8e3bcdfa9dc3d5fde70c60a37e543cc59d23b25e2b0a2274e672d0bae013c2` +[kubernetes-client-windows-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-beta.2/kubernetes-client-windows-amd64.tar.gz) | `75143c176bc817fc49a79229dfae8c7429d0a3deeaba54a397dddce3e37e8550` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-beta.2/kubernetes-server-linux-amd64.tar.gz) | `61c209048da1612796a30b880076b7f9b59038821da63bbecac4c56f24216312` +[kubernetes-server-linux-arm64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-beta.2/kubernetes-server-linux-arm64.tar.gz) | `2c6952e16c0b0c153ca3d424b3deca9b43a8e421b1a59359bc10260309bf470c` +[kubernetes-server-linux-arm.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-beta.2/kubernetes-server-linux-arm.tar.gz) | `cf3e37a89358cae1d2d36aaad10f3e906269bc3df611279dbed9f50e81449fad` + +## Changelog since v1.5.0-beta.1 + +### Other notable changes + +* Modify GCI mounter to enable NFSv3 ([#36610](https://github.com/kubernetes/kubernetes/pull/36610), [@jingxu97](https://github.com/jingxu97)) +* Third party resources are now deleted when a namespace is deleted. ([#35947](https://github.com/kubernetes/kubernetes/pull/35947), [@brendandburns](https://github.com/brendandburns)) +* kube-dns ([#36775](https://github.com/kubernetes/kubernetes/pull/36775), [@bowei](https://github.com/bowei)) + * Added --config-map and --config-map-namespace command line options. + * If --config-map is set, kube-dns will load dynamic configuration from the config map + * referenced by --config-map-namespace, --config-map. The config-map supports + * the following properties: "federations". + * --federations flag is now deprecated. Prefer to set federations via the config-map. + * Federations can be configured by settings the "federations" field to the value currently + * set in the command line. + * Example: + * kind: ConfigMap + * apiVersion: v1 + * metadata: + * name: kube-dns + * namespace: kube-system + * data: + * federations: abc=def +* azure: support multiple ipconfigs on a NIC ([#36841](https://github.com/kubernetes/kubernetes/pull/36841), [@colemickens](https://github.com/colemickens)) +* Fix issue in converting AWS volume ID from mount paths ([#36840](https://github.com/kubernetes/kubernetes/pull/36840), [@jingxu97](https://github.com/jingxu97)) +* fix leaking memory backed volumes of terminated pods ([#36779](https://github.com/kubernetes/kubernetes/pull/36779), [@sjenning](https://github.com/sjenning)) +* Default logging subsystem's resiliency was greatly improved, fluentd memory consumption and OOM error probability was reduced. ([#37021](https://github.com/kubernetes/kubernetes/pull/37021), [@Crassirostris](https://github.com/Crassirostris)) + + + +# v1.5.0-beta.1 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.5/examples) + +## Downloads for v1.5.0-beta.1 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-beta.1/kubernetes.tar.gz) | `62c51bcee460794cda30e720c65509b679b51015c62c075e6e735fe29d089e2b` +[kubernetes-src.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-beta.1/kubernetes-src.tar.gz) | `8c950c7377eb40670d0438ccb68bbeaf1100ed2e919e012bc98479ff07ddd393` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-beta.1/kubernetes-client-darwin-386.tar.gz) | `e71af85542837842ff3b0fb8137332f4e1ce4c453d225da292e1fa781f1c74d7` +[kubernetes-client-darwin-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-beta.1/kubernetes-client-darwin-amd64.tar.gz) | `033d02c1382553f977057827b6a5b82f1b69aecd44b649c937781d1cccb763d1` +[kubernetes-client-linux-386.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-beta.1/kubernetes-client-linux-386.tar.gz) | `1e7a435f2f7d06e3de9bd8c8d0457b6548aa15ad5cdab4241391f290a28b804f` +[kubernetes-client-linux-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-beta.1/kubernetes-client-linux-amd64.tar.gz) | `3c07a89e8eb785a7b37842d4b0bc0471fcc7b4e3a4bd973e6f8936cbc6030d76` +[kubernetes-client-linux-arm64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-beta.1/kubernetes-client-linux-arm64.tar.gz) | `680a2786d9782395b613e27509df2d0f671a2471a43533ccdbc6b71cfb332072` +[kubernetes-client-linux-arm.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-beta.1/kubernetes-client-linux-arm.tar.gz) | `2a5b10fbd69ce9b1da0403a80d71684ee2cf4d75298a5ec19e069ae826da81ed` +[kubernetes-client-windows-386.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-beta.1/kubernetes-client-windows-386.tar.gz) | `10acbf09ffbc04f549d1cffff98a533b456562d5c09a2d0f315523b70072c35d` +[kubernetes-client-windows-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-beta.1/kubernetes-client-windows-amd64.tar.gz) | `3317f90da242b0fb95a3cbc669fc4941d7b56b5ff90ac528c166e915bee31fdf` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-beta.1/kubernetes-server-linux-amd64.tar.gz) | `fdb257c0bbf64304441fd377a5ee330de10696aa0b5c1b6c27fa73a6c00121ae` +[kubernetes-server-linux-arm64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-beta.1/kubernetes-server-linux-arm64.tar.gz) | `a174cf6c9351da786b8780f5edca158a4e021d4af597bcc66f238601fb37c2b1` +[kubernetes-server-linux-arm.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-beta.1/kubernetes-server-linux-arm.tar.gz) | `1dc520b9a4428321225ba6cfa0f79b702965d7f6994357c15e0195c5af1528ff` + +## Changelog since v1.5.0-alpha.2 + +### Action Required + +* Deprecate extensions/v1beta1.Jobs ([#36355](https://github.com/kubernetes/kubernetes/pull/36355), [@soltysh](https://github.com/soltysh)) +* Rename ScheduledJobs to CronJobs. ([#36021](https://github.com/kubernetes/kubernetes/pull/36021), [@soltysh](https://github.com/soltysh)) +* Read the federation controller manager kubeconfig from a filesystem path ([#30601](https://github.com/kubernetes/kubernetes/pull/30601), [@madhusudancs](https://github.com/madhusudancs)) +* Node controller to not force delete pods ([#35235](https://github.com/kubernetes/kubernetes/pull/35235), [@foxish](https://github.com/foxish)) +* Add perma-failed deployments API ([#19343](https://github.com/kubernetes/kubernetes/pull/19343), [@kargakis](https://github.com/kargakis)) + +### Other notable changes + +* Federation: allow specification of dns zone by ID ([#36336](https://github.com/kubernetes/kubernetes/pull/36336), [@justinsb](https://github.com/justinsb)) +* K8s 1.5 keeps container-vm as the default node image on GCE for backwards compatibility reasons. Please beware that container-vm is officially deprecated (supported with security patches only) and you should replace it with GCI if at all possible. You can review the migration guide here for more detail: https://cloud.google.com/container-engine/docs/node-image-migration ([#36822](https://github.com/kubernetes/kubernetes/pull/36822), [@mtaufen](https://github.com/mtaufen)) +* Add a flag allowing contention profiling of the API server ([#36756](https://github.com/kubernetes/kubernetes/pull/36756), [@gmarek](https://github.com/gmarek)) +* Rename `--cgroups-per-qos` to `--experimental-cgroups-per-qos` in Kubelet ([#36767](https://github.com/kubernetes/kubernetes/pull/36767), [@vishh](https://github.com/vishh)) +* Implement CanMount() for gfsMounter for linux ([#36686](https://github.com/kubernetes/kubernetes/pull/36686), [@rkouj](https://github.com/rkouj)) +* Default host user namespace via experimental flag ([#31169](https://github.com/kubernetes/kubernetes/pull/31169), [@pweil-](https://github.com/pweil-)) +* Use generous limits in the resource usage tracking tests ([#36623](https://github.com/kubernetes/kubernetes/pull/36623), [@yujuhong](https://github.com/yujuhong)) +* Update Dashboard UI version to 1.4.2 ([#35895](https://github.com/kubernetes/kubernetes/pull/35895), [@rf232](https://github.com/rf232)) +* Add support for service load balancer source ranges to Azure load balancers. ([#36696](https://github.com/kubernetes/kubernetes/pull/36696), [@brendandburns](https://github.com/brendandburns)) +* gci-dev-56-8977-0-0: ([#36681](https://github.com/kubernetes/kubernetes/pull/36681), [@mtaufen](https://github.com/mtaufen)) + * Date: Nov 03, 2016 + * Kernel: ChromiumOS-4.4 + * Kubernetes: v1.4.5 + * Docker: v1.11.2 + * Changelog (vs 55-8872-18-0) + * Updated kubernetes to v1.4.5 + * Fixed a bug in e2fsprogs that caused mke2fs to take a very long time. Upstream fix: http://git.kernel.org/cgit/fs/ext2/e2fsprogs.git/commit/?h=next&id=d33e690fe7a6cbeb51349d9f2c7fb16a6ebec9c2 +* Fix strategic patch for list of primitive type with merge sementic ([#35647](https://github.com/kubernetes/kubernetes/pull/35647), [@ymqytw](https://github.com/ymqytw)) +* Fix issue in reconstruct volume data when kubelet restarts ([#36616](https://github.com/kubernetes/kubernetes/pull/36616), [@jingxu97](https://github.com/jingxu97)) +* Ensure proper serialization of updates and creates in federation test watcher ([#36613](https://github.com/kubernetes/kubernetes/pull/36613), [@mwielgus](https://github.com/mwielgus)) +* Add support for SourceIP preservation in Azure LBs ([#36557](https://github.com/kubernetes/kubernetes/pull/36557), [@brendandburns](https://github.com/brendandburns)) +* Fix fetching pids running in a cgroup, which caused problems with OOM score adjustments & setting the /system cgroup ("misc" in the summary API). ([#36551](https://github.com/kubernetes/kubernetes/pull/36551), [@timstclair](https://github.com/timstclair)) +* federation: Adding support for DeleteOptions.OrphanDependents for federated replicasets and deployments. Setting it to false while deleting a federated replicaset or deployment also deletes the corresponding resource from all registered clusters. ([#36476](https://github.com/kubernetes/kubernetes/pull/36476), [@nikhiljindal](https://github.com/nikhiljindal)) +* kubectl: show node label if defined ([#35901](https://github.com/kubernetes/kubernetes/pull/35901), [@justinsb](https://github.com/justinsb)) +* Migrates addons from RCs to Deployments ([#36008](https://github.com/kubernetes/kubernetes/pull/36008), [@MrHohn](https://github.com/MrHohn)) +* Avoid setting S_ISGID on files in volumes ([#36386](https://github.com/kubernetes/kubernetes/pull/36386), [@sjenning](https://github.com/sjenning)) +* federation: Adding support for DeleteOptions.OrphanDependents for federated daemonsets and ingresses. Setting it to false while deleting a federated daemonset or ingress also deletes the corresponding resource from all registered clusters. ([#36330](https://github.com/kubernetes/kubernetes/pull/36330), [@nikhiljindal](https://github.com/nikhiljindal)) +* Add authz to psp admission ([#33080](https://github.com/kubernetes/kubernetes/pull/33080), [@pweil-](https://github.com/pweil-)) +* Better messaging for missing volume binaries on host ([#36280](https://github.com/kubernetes/kubernetes/pull/36280), [@rkouj](https://github.com/rkouj)) +* Add Windows support to kube-proxy ([#36079](https://github.com/kubernetes/kubernetes/pull/36079), [@jbhurat](https://github.com/jbhurat)) +* Support persistent volume usage for kubernetes running on Photon Controller platform ([#36133](https://github.com/kubernetes/kubernetes/pull/36133), [@luomiao](https://github.com/luomiao)) +* GCI nodes use an external mounter script to mount NFS & GlusterFS storage volumes ([#36267](https://github.com/kubernetes/kubernetes/pull/36267), [@vishh](https://github.com/vishh)) +* Add retry to node scheduability marking. ([#36211](https://github.com/kubernetes/kubernetes/pull/36211), [@brendandburns](https://github.com/brendandburns)) +* specify custom ca file to verify the keystone server ([#35488](https://github.com/kubernetes/kubernetes/pull/35488), [@dixudx](https://github.com/dixudx)) +* AWS: Support default value for ExternalHost ([#33568](https://github.com/kubernetes/kubernetes/pull/33568), [@justinsb](https://github.com/justinsb)) +* HPA: Consider unready pods separately ([#33593](https://github.com/kubernetes/kubernetes/pull/33593), [@DirectXMan12](https://github.com/DirectXMan12)) +* Node Conformance Test: Containerize the node e2e test ([#31093](https://github.com/kubernetes/kubernetes/pull/31093), [@Random-Liu](https://github.com/Random-Liu)) +* federation: Adding support for DeleteOptions.OrphanDependents for federated secrets. Setting it to false while deleting a federated secret also deletes the corresponding secrets from all registered clusters. ([#36296](https://github.com/kubernetes/kubernetes/pull/36296), [@nikhiljindal](https://github.com/nikhiljindal)) +* Deploy kube-dns with cluster-proportional-autoscaler ([#33239](https://github.com/kubernetes/kubernetes/pull/33239), [@MrHohn](https://github.com/MrHohn)) +* Adds support for StatefulSets in kubectl drain. ([#35483](https://github.com/kubernetes/kubernetes/pull/35483), [@ymqytw](https://github.com/ymqytw)) + * Switches to use the eviction sub-resource instead of deletion in kubectl drain, if server supports. +* azure: load balancer preserves destination ip address ([#36256](https://github.com/kubernetes/kubernetes/pull/36256), [@colemickens](https://github.com/colemickens)) +* LegacyHostIP will be deprecated in 1.7. ([#36095](https://github.com/kubernetes/kubernetes/pull/36095), [@caesarxuchao](https://github.com/caesarxuchao)) +* Fix LBaaS version detection in openstack cloudprovider ([#36249](https://github.com/kubernetes/kubernetes/pull/36249), [@sjenning](https://github.com/sjenning)) +* Node Conformance Test: Add system verification ([#32427](https://github.com/kubernetes/kubernetes/pull/32427), [@Random-Liu](https://github.com/Random-Liu)) +* kubelet bootstrap: start hostNetwork pods before we have PodCIDR ([#35526](https://github.com/kubernetes/kubernetes/pull/35526), [@justinsb](https://github.com/justinsb)) +* Enable HPA controller based on autoscaling/v1 api group ([#36215](https://github.com/kubernetes/kubernetes/pull/36215), [@piosz](https://github.com/piosz)) +* Remove unused WaitForDetach from Detacher interface and plugins ([#35629](https://github.com/kubernetes/kubernetes/pull/35629), [@kiall](https://github.com/kiall)) +* Initial work on running windows containers on Kubernetes ([#31707](https://github.com/kubernetes/kubernetes/pull/31707), [@alexbrand](https://github.com/alexbrand)) +* Per Volume Inode Accounting ([#35132](https://github.com/kubernetes/kubernetes/pull/35132), [@dashpole](https://github.com/dashpole)) +* [AppArmor] Hold bad AppArmor pods in pending rather than rejecting ([#35342](https://github.com/kubernetes/kubernetes/pull/35342), [@timstclair](https://github.com/timstclair)) +* Federation: separate notion of zone-name & dns-suffix ([#35372](https://github.com/kubernetes/kubernetes/pull/35372), [@justinsb](https://github.com/justinsb)) +* In order to bypass graceful deletion of pods (to immediately remove the pod from the API) the user must now provide the `--force` flag in addition to `--grace-period=0`. This prevents users from accidentally force deleting pods without being aware of the consequences of force deletion. Force deleting pods for resources like StatefulSets can result in multiple pods with the same name having running processes in the cluster, which may lead to data corruption or data inconsistency when using shared storage or common API endpoints. ([#35484](https://github.com/kubernetes/kubernetes/pull/35484), [@smarterclayton](https://github.com/smarterclayton)) +* NPD: Add e2e test for NPD v0.2. ([#35740](https://github.com/kubernetes/kubernetes/pull/35740), [@Random-Liu](https://github.com/Random-Liu)) +* DELETE requests can now pass in their DeleteOptions as a query parameter or a body parameter, rather than just as a body parameter. ([#35806](https://github.com/kubernetes/kubernetes/pull/35806), [@bdbauer](https://github.com/bdbauer)) +* make using service account credentials from controllers optional ([#35970](https://github.com/kubernetes/kubernetes/pull/35970), [@deads2k](https://github.com/deads2k)) +* AWS: strong-typing for k8s vs aws volume ids ([#35883](https://github.com/kubernetes/kubernetes/pull/35883), [@justinsb](https://github.com/justinsb)) +* Controller changes for perma failed deployments ([#35691](https://github.com/kubernetes/kubernetes/pull/35691), [@kargakis](https://github.com/kargakis)) +* Proxy min sync period ([#35334](https://github.com/kubernetes/kubernetes/pull/35334), [@timothysc](https://github.com/timothysc)) +* Federated ConfigMap controller ([#35635](https://github.com/kubernetes/kubernetes/pull/35635), [@mwielgus](https://github.com/mwielgus)) +* have basic kubectl crud agnostic of registered types ([#36085](https://github.com/kubernetes/kubernetes/pull/36085), [@deads2k](https://github.com/deads2k)) +* Fix how we iterate over active jobs when removing them for Replace policy ([#36161](https://github.com/kubernetes/kubernetes/pull/36161), [@soltysh](https://github.com/soltysh)) +* Adds TCPCloseWaitTimeout option to kube-proxy for sysctl nf_conntrack_tcp_timeout_time_wait ([#35919](https://github.com/kubernetes/kubernetes/pull/35919), [@bowei](https://github.com/bowei)) +* Pods that are terminating due to eviction by the nodecontroller (typically due to unresponsive kubelet, or network partition) now surface in `kubectl get` output ([#36017](https://github.com/kubernetes/kubernetes/pull/36017), [@foxish](https://github.com/foxish)) + * as being in state "Unknown", along with a longer description in `kubectl describe` output. +* The hostname of the node (as autodetected by the kubelet, specified via --hostname-override, or determined by the cloudprovider) is now recorded as an address of type "Hostname" in the status of the Node API object. The hostname is expected to be resolveable from the apiserver. ([#25532](https://github.com/kubernetes/kubernetes/pull/25532), [@mkulke](https://github.com/mkulke)) +* [Kubelet] Add alpha support for `--cgroups-per-qos` using the configured `--cgroup-driver`. Disabled by default. ([#31546](https://github.com/kubernetes/kubernetes/pull/31546), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* Move Statefulset (previously PetSet) to v1beta1 ([#35731](https://github.com/kubernetes/kubernetes/pull/35731), [@janetkuo](https://github.com/janetkuo)) +* The error handling behavior of `pkg/client/restclient.Result` has changed. Calls to `Result.Raw()` will no longer parse the body, although they will still return errors that react to `pkg/api/errors.Is*()` as in previous releases. Callers of `Get()` and `Into()` will continue to receive errors that are parsed from the body if the kind and apiVersion of the body match the `Status` object. ([#36001](https://github.com/kubernetes/kubernetes/pull/36001), [@smarterclayton](https://github.com/smarterclayton)) + * This more closely aligns rest client as a generic RESTful client, while preserving the special Kube API extended error handling for the `Get` and `Into` methods (which most Kube clients use). +* Making the pod.alpha.kubernetes.io/initialized annotation optional in PetSet pods ([#35739](https://github.com/kubernetes/kubernetes/pull/35739), [@foxish](https://github.com/foxish)) +* AWS: recognize us-east-2 region ([#35013](https://github.com/kubernetes/kubernetes/pull/35013), [@justinsb](https://github.com/justinsb)) +* Eviction manager evicts based on inode consumption ([#35137](https://github.com/kubernetes/kubernetes/pull/35137), [@dashpole](https://github.com/dashpole)) +* SELinux Overhaul ([#33663](https://github.com/kubernetes/kubernetes/pull/33663), [@pmorie](https://github.com/pmorie)) +* Add SNI support to the apiserver ([#35109](https://github.com/kubernetes/kubernetes/pull/35109), [@sttts](https://github.com/sttts)) +* The main kubernetes repository stops hosting archived version of released clients. Please use [client-go](https://github.com/kubernetes/client-go). ([#35928](https://github.com/kubernetes/kubernetes/pull/35928), [@caesarxuchao](https://github.com/caesarxuchao)) +* Correct the article in generated documents ([#32557](https://github.com/kubernetes/kubernetes/pull/32557), [@asalkeld](https://github.com/asalkeld)) +* Update PodAntiAffinity to ignore calls to subresources ([#35608](https://github.com/kubernetes/kubernetes/pull/35608), [@soltysh](https://github.com/soltysh)) +* The apiserver can now select which type of kubelet-reported address to use for apiserver->node communications, using the --kubelet-preferred-address-types flag. ([#35497](https://github.com/kubernetes/kubernetes/pull/35497), [@liggitt](https://github.com/liggitt)) +* update list of vailable resources ([#32687](https://github.com/kubernetes/kubernetes/pull/32687), [@jouve](https://github.com/jouve)) +* Remove stale volumes if endpoint/svc creation fails. ([#35285](https://github.com/kubernetes/kubernetes/pull/35285), [@humblec](https://github.com/humblec)) +* add kubectl cp ([#34914](https://github.com/kubernetes/kubernetes/pull/34914), [@brendandburns](https://github.com/brendandburns)) +* Remove Job also from .status.active for Replace strategy ([#35420](https://github.com/kubernetes/kubernetes/pull/35420), [@soltysh](https://github.com/soltysh)) +* Let release_1_5 clientset include multiple versions of a group ([#35471](https://github.com/kubernetes/kubernetes/pull/35471), [@caesarxuchao](https://github.com/caesarxuchao)) +* support editing before creating resource ([#33250](https://github.com/kubernetes/kubernetes/pull/33250), [@ymqytw](https://github.com/ymqytw)) +* allow authentication through a front-proxy ([#35452](https://github.com/kubernetes/kubernetes/pull/35452), [@deads2k](https://github.com/deads2k)) +* On GCI, cleanup kubelet startup ([#35319](https://github.com/kubernetes/kubernetes/pull/35319), [@vishh](https://github.com/vishh)) +* Add a retry when reading a file content from a container ([#35560](https://github.com/kubernetes/kubernetes/pull/35560), [@jingxu97](https://github.com/jingxu97)) +* Fix cadvisor_unsupported and the crossbuild ([#35817](https://github.com/kubernetes/kubernetes/pull/35817), [@luxas](https://github.com/luxas)) +* [PHASE 1] Opaque integer resource accounting. ([#31652](https://github.com/kubernetes/kubernetes/pull/31652), [@ConnorDoyle](https://github.com/ConnorDoyle)) +* Add sync state loop in master's volume reconciler ([#34859](https://github.com/kubernetes/kubernetes/pull/34859), [@jingxu97](https://github.com/jingxu97)) +* Bump GCE debian image to container-vm-v20161025 (CVE-2016-5195 Dirty… ([#35825](https://github.com/kubernetes/kubernetes/pull/35825), [@dchen1107](https://github.com/dchen1107)) +* GC pod ips ([#35572](https://github.com/kubernetes/kubernetes/pull/35572), [@bprashanth](https://github.com/bprashanth)) +* Stop including arch-specific binaries in kubernetes.tar.gz ([#35737](https://github.com/kubernetes/kubernetes/pull/35737), [@ixdy](https://github.com/ixdy)) +* Rename PetSet to StatefulSet ([#35663](https://github.com/kubernetes/kubernetes/pull/35663), [@janetkuo](https://github.com/janetkuo)) +* Enable containerized storage plugins mounter on GCI ([#35350](https://github.com/kubernetes/kubernetes/pull/35350), [@vishh](https://github.com/vishh)) +* Bump container-vm version in config-test.sh ([#35705](https://github.com/kubernetes/kubernetes/pull/35705), [@mtaufen](https://github.com/mtaufen)) +* Cadvisor root path configuration ([#35136](https://github.com/kubernetes/kubernetes/pull/35136), [@dashpole](https://github.com/dashpole)) +* ssh pubkey parsing: prevent segfault ([#35323](https://github.com/kubernetes/kubernetes/pull/35323), [@mikkeloscar](https://github.com/mikkeloscar)) + + + +# v1.5.0-alpha.2 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/master/examples) + +## Downloads for v1.5.0-alpha.2 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-alpha.2/kubernetes.tar.gz) | `77f04c646657b683210a17aeca62e56bf985702b267942b41729406970c40cee` +[kubernetes-src.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-alpha.2/kubernetes-src.tar.gz) | `f6090cc853e56159099bf12169f0d84e29fd2c055b0c7dbdac755ee94439a6a6` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-alpha.2/kubernetes-client-darwin-386.tar.gz) | `917adbc70156d55371c1aea62279a521e930e7ff130728aa176505f0268182e3` +[kubernetes-client-darwin-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-alpha.2/kubernetes-client-darwin-amd64.tar.gz) | `9c8084eeab05b6db0508f789cb8a05b4f864ee23ea37b43e17af0026fb67defa` +[kubernetes-client-linux-386.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-alpha.2/kubernetes-client-linux-386.tar.gz) | `3498f9cd73bb947b7cd8c4e5fb3ebe0676fbc98cf346a807f1b7c252aa068d68` +[kubernetes-client-linux-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-alpha.2/kubernetes-client-linux-amd64.tar.gz) | `e9bf2e48212bb275b113d0a1f6091c4692126c8af3c4e0a986e483ec27190e82` +[kubernetes-client-linux-arm64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-alpha.2/kubernetes-client-linux-arm64.tar.gz) | `9c514a482d4dd44d64f3d47eb3d64b434343f10abdecf1b5176ff0078d3b7008` +[kubernetes-client-linux-arm.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-alpha.2/kubernetes-client-linux-arm.tar.gz) | `c51a8ebc2c3ca2f914042a6017852feb315fd3ceba8b0d5186349b553da11fdb` +[kubernetes-client-windows-386.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-alpha.2/kubernetes-client-windows-386.tar.gz) | `32b006e1f9e6c14fe399806bb82ec4bf8658ab9828753d1b14732bb8dbb72062` +[kubernetes-client-windows-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-alpha.2/kubernetes-client-windows-amd64.tar.gz) | `1e142f1fe76bdd660b4f1be51eef4e51705585fccb94e674a7d891ffe8c3b4e3` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-alpha.2/kubernetes-server-linux-amd64.tar.gz) | `4a3b550a1ede8bebd14413a37e3fc10c8403a3e3fbbce096de443351d076817a` +[kubernetes-server-linux-arm64.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-alpha.2/kubernetes-server-linux-arm64.tar.gz) | `00e58bb04bf150c554f28d8fd2f72fbdd1e7918999aaea9c88c91c8f71946ffe` +[kubernetes-server-linux-arm.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-alpha.2/kubernetes-server-linux-arm.tar.gz) | `6837ff73249c0f3e7ba2d7c00321274db0f97b5cd0b4dc58d5cc3a2119e1c820` + +## Changelog since v1.5.0-alpha.1 + +### Action Required + +* Deprecate the --reconcile-cidr kubelet flag because it has no function anymore ([#35523](https://github.com/kubernetes/kubernetes/pull/35523), [@luxas](https://github.com/luxas)) +* Removed the deprecated kubelet --configure-cbr0 flag, and with that the "classic" networking mode as well ([#34906](https://github.com/kubernetes/kubernetes/pull/34906), [@luxas](https://github.com/luxas)) +* New client-go structure ([#34989](https://github.com/kubernetes/kubernetes/pull/34989), [@caesarxuchao](https://github.com/caesarxuchao)) +* Remove scheduler flags that were marked as deprecated 2+ releases ago. ([#34471](https://github.com/kubernetes/kubernetes/pull/34471), [@timothysc](https://github.com/timothysc)) + +### Other notable changes + +* Make the fake RESTClient usable by all the API groups, not just core. ([#35492](https://github.com/kubernetes/kubernetes/pull/35492), [@madhusudancs](https://github.com/madhusudancs)) +* Adding support for DeleteOptions.OrphanDependents for federated namespaces. Setting it to false while deleting a federated namespace also deletes the corresponding namespace from all registered clusters. ([#34648](https://github.com/kubernetes/kubernetes/pull/34648), [@nikhiljindal](https://github.com/nikhiljindal)) +* Kubelet flag '--mounter-path' renamed to '--experimental-mounter-path' ([#35646](https://github.com/kubernetes/kubernetes/pull/35646), [@vishh](https://github.com/vishh)) +* Node status updater should SetNodeStatusUpdateNeeded if it fails to update status ([#34368](https://github.com/kubernetes/kubernetes/pull/34368), [@jingxu97](https://github.com/jingxu97)) +* Deprecate OpenAPI spec for GroupVersion endpoints in favor of single spec /swagger.json ([#35388](https://github.com/kubernetes/kubernetes/pull/35388), [@mbohlool](https://github.com/mbohlool)) +* kubelet authn/authz ([#34381](https://github.com/kubernetes/kubernetes/pull/34381), [@liggitt](https://github.com/liggitt)) +* Fix volume states out of sync problem after kubelet restarts ([#33616](https://github.com/kubernetes/kubernetes/pull/33616), [@jingxu97](https://github.com/jingxu97)) +* Added rkt binary to GCI ([#35321](https://github.com/kubernetes/kubernetes/pull/35321), [@vishh](https://github.com/vishh)) +* Fixed mutation warning in Attach/Detach controller ([#35273](https://github.com/kubernetes/kubernetes/pull/35273), [@jsafrane](https://github.com/jsafrane)) +* Don't count failed pods as "not-ready" ([#35404](https://github.com/kubernetes/kubernetes/pull/35404), [@brendandburns](https://github.com/brendandburns)) +* fixed typo in script which made setting custom cidr in gce using kube-up impossible ([#35267](https://github.com/kubernetes/kubernetes/pull/35267), [@tommywo](https://github.com/tommywo)) +* The podGC controller will now always run, irrespective of the value supplied to the "terminated-pod-gc-threshold" flag supplied to the controller manager. ([#35476](https://github.com/kubernetes/kubernetes/pull/35476), [@foxish](https://github.com/foxish)) + * The specific behavior of the podGC controller to clean up terminated pods is still governed by the flag, but the podGC's responsibilities have evolved beyond just cleaning up terminated pods. +* Update grafana version used by default in kubernetes to 3.1.1 ([#35435](https://github.com/kubernetes/kubernetes/pull/35435), [@Crassirostris](https://github.com/Crassirostris)) +* vSphere Kube-up: resolve vm-names on all nodes ([#35365](https://github.com/kubernetes/kubernetes/pull/35365), [@kerneltime](https://github.com/kerneltime)) +* bootstrap: Start hostNetwork pods even if network plugin not ready ([#33347](https://github.com/kubernetes/kubernetes/pull/33347), [@justinsb](https://github.com/justinsb)) +* Factor out post-init swagger and OpenAPI routes ([#32590](https://github.com/kubernetes/kubernetes/pull/32590), [@sttts](https://github.com/sttts)) +* Substitute gcloud regex with regexp ([#35346](https://github.com/kubernetes/kubernetes/pull/35346), [@bprashanth](https://github.com/bprashanth)) +* Remove support for multi-architecture code in `kubeadm`, which was released untested. ([#35124](https://github.com/kubernetes/kubernetes/pull/35124), [@errordeveloper](https://github.com/errordeveloper)) +* vSphere kube-up: Wait for cbr0 configuration to complete before setting up routes. ([#35232](https://github.com/kubernetes/kubernetes/pull/35232), [@kerneltime](https://github.com/kerneltime)) +* Remove last probe time from replica sets ([#35199](https://github.com/kubernetes/kubernetes/pull/35199), [@kargakis](https://github.com/kargakis)) +* Update the GCI image to gci-dev-55-8872-18-0 ([#35243](https://github.com/kubernetes/kubernetes/pull/35243), [@maisem](https://github.com/maisem)) +* Add `--mounter-path` flag to kubelet that will allow overriding the `mount` command used by kubelet ([#34994](https://github.com/kubernetes/kubernetes/pull/34994), [@jingxu97](https://github.com/jingxu97)) +* Fix a bug under the rkt runtime whereby image-registries with ports would not be fetched from ([#34375](https://github.com/kubernetes/kubernetes/pull/34375), [@euank](https://github.com/euank)) +* Updated default Elasticsearch and Kibana used for elasticsearch logging destination to versions 2.4.1 and 4.6.1 respectively. ([#34969](https://github.com/kubernetes/kubernetes/pull/34969), [@Crassirostris](https://github.com/Crassirostris)) +* Loadbalanced client src ip preservation enters beta ([#33957](https://github.com/kubernetes/kubernetes/pull/33957), [@bprashanth](https://github.com/bprashanth)) +* Add NodePort value in kubectl output ([#34922](https://github.com/kubernetes/kubernetes/pull/34922), [@zreigz](https://github.com/zreigz)) +* kubectl drain now waits until pods have been delete from the Node before exiting ([#34778](https://github.com/kubernetes/kubernetes/pull/34778), [@ymqytw](https://github.com/ymqytw)) +* Don't report FS stats for system containers in the Kubelet Summary API ([#34998](https://github.com/kubernetes/kubernetes/pull/34998), [@timstclair](https://github.com/timstclair)) +* Fixed flakes caused by petset tests. ([#35158](https://github.com/kubernetes/kubernetes/pull/35158), [@foxish](https://github.com/foxish)) +* Add validation that detects repeated keys in the labels and annotations maps ([#34407](https://github.com/kubernetes/kubernetes/pull/34407), [@brendandburns](https://github.com/brendandburns)) +* Change merge key for VolumeMount to mountPath ([#35071](https://github.com/kubernetes/kubernetes/pull/35071), [@thockin](https://github.com/thockin)) +* kubelet: storage: don't hang kubelet on unresponsive nfs ([#35038](https://github.com/kubernetes/kubernetes/pull/35038), [@sjenning](https://github.com/sjenning)) +* Fix kube vsphere.kerneltime ([#34997](https://github.com/kubernetes/kubernetes/pull/34997), [@kerneltime](https://github.com/kerneltime)) +* Add PSP support for seccomp profiles ([#28300](https://github.com/kubernetes/kubernetes/pull/28300), [@pweil-](https://github.com/pweil-)) +* Updated Go to 1.7 ([#28742](https://github.com/kubernetes/kubernetes/pull/28742), [@jessfraz](https://github.com/jessfraz)) +* HPA: fixed wrong count for target replicas calculations ([#34821](https://github.com/kubernetes/kubernetes/pull/34821)). ([#34955](https://github.com/kubernetes/kubernetes/pull/34955), [@jszczepkowski](https://github.com/jszczepkowski)) +* Improves how 'kubectl' uses the terminal size when printing help and usage. ([#34502](https://github.com/kubernetes/kubernetes/pull/34502), [@fabianofranz](https://github.com/fabianofranz)) +* Updated Elasticsearch image from version 1.5.1 to version 2.4.1. Updated Kibana image from version 4.0.2 to version 4.6.1. ([#34562](https://github.com/kubernetes/kubernetes/pull/34562), [@Crassirostris](https://github.com/Crassirostris)) +* libvirt-coreos: Download the coreos_production_qemu_image over SSL. ([#34646](https://github.com/kubernetes/kubernetes/pull/34646), [@roberthbailey](https://github.com/roberthbailey)) +* Add a new global option "--request-timeout" to the `kubectl` client ([#33958](https://github.com/kubernetes/kubernetes/pull/33958), [@juanvallejo](https://github.com/juanvallejo)) +* Add support for admission controller based on namespace node selectors. ([#24980](https://github.com/kubernetes/kubernetes/pull/24980), [@aveshagarwal](https://github.com/aveshagarwal)) +* Add 'kubectl set resources' ([#27206](https://github.com/kubernetes/kubernetes/pull/27206), [@JacobTanenbaum](https://github.com/JacobTanenbaum)) +* Support trust id as a scope in the OpenStack authentication logic ([#32111](https://github.com/kubernetes/kubernetes/pull/32111), [@MatMaul](https://github.com/MatMaul)) +* Only wait for cache syncs once in NodeController ([#34851](https://github.com/kubernetes/kubernetes/pull/34851), [@ncdc](https://github.com/ncdc)) +* NodeController waits for informer sync before doing anything ([#34809](https://github.com/kubernetes/kubernetes/pull/34809), [@gmarek](https://github.com/gmarek)) +* azure: lower log priority for skipped nic update message ([#34730](https://github.com/kubernetes/kubernetes/pull/34730), [@colemickens](https://github.com/colemickens)) +* Security Group support for OpenStack Load Balancers ([#31921](https://github.com/kubernetes/kubernetes/pull/31921), [@grahamhayes](https://github.com/grahamhayes)) +* Make NodeController recognize deletion tombstones ([#34786](https://github.com/kubernetes/kubernetes/pull/34786), [@davidopp](https://github.com/davidopp)) +* Delete all firewall rules (and optionally network) on GCE/GKE cluster teardown ([#34577](https://github.com/kubernetes/kubernetes/pull/34577), [@ixdy](https://github.com/ixdy)) +* Fix panic in NodeController caused by receiving DeletedFinalStateUnknown object from the cache. ([#34694](https://github.com/kubernetes/kubernetes/pull/34694), [@gmarek](https://github.com/gmarek)) +* azure: add PrimaryAvailabilitySet to config, only use nodes in that set in the loadbalancer pool ([#34526](https://github.com/kubernetes/kubernetes/pull/34526), [@colemickens](https://github.com/colemickens)) +* Fix leaking ingress resources in federated ingress e2e test. ([#34652](https://github.com/kubernetes/kubernetes/pull/34652), [@quinton-hoole](https://github.com/quinton-hoole)) +* pvc.Spec.Resources.Requests min and max can be enforced with a LimitRange of type "PersistentVolumeClaim" in the namespace ([#30145](https://github.com/kubernetes/kubernetes/pull/30145), [@markturansky](https://github.com/markturansky)) +* Federated DaemonSet controller. Supports all the API that regular DaemonSet has. ([#34319](https://github.com/kubernetes/kubernetes/pull/34319), [@mwielgus](https://github.com/mwielgus)) +* New federation deployment mechanism now allows non-GCP clusters. ([#34620](https://github.com/kubernetes/kubernetes/pull/34620), [@madhusudancs](https://github.com/madhusudancs)) + * Writes the federation kubeconfig to the local kubeconfig file. +* Update the series and the README to reflect the change. ([#30374](https://github.com/kubernetes/kubernetes/pull/30374), [@mbruzek](https://github.com/mbruzek)) +* Replica set conditions API ([#33905](https://github.com/kubernetes/kubernetes/pull/33905), [@kargakis](https://github.com/kargakis)) +* etcd3: avoid unnecessary decoding in etcd3 client ([#34435](https://github.com/kubernetes/kubernetes/pull/34435), [@wojtek-t](https://github.com/wojtek-t)) +* Test x509 intermediates correctly ([#34524](https://github.com/kubernetes/kubernetes/pull/34524), [@liggitt](https://github.com/liggitt)) +* Add `cifs-utils` to the hyperkube image. ([#34416](https://github.com/kubernetes/kubernetes/pull/34416), [@colemickens](https://github.com/colemickens)) +* etcd3: use PrevKV to remove additional get ([#34246](https://github.com/kubernetes/kubernetes/pull/34246), [@hongchaodeng](https://github.com/hongchaodeng)) +* Fix upgrade.sh image setup ([#34468](https://github.com/kubernetes/kubernetes/pull/34468), [@mtaufen](https://github.com/mtaufen)) + + + +# v1.5.0-alpha.1 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/master/examples) + +## Downloads + +binary | sha256 hash +------ | ----------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.5.0-alpha.1/kubernetes.tar.gz) | `86bfcfffaa210ddf18983ff066470ef9c06ee00449b2238043e2777aac2c906d` + +## Changelog since v1.4.0-alpha.3 + +### Experimental Features + +* `kubeadm` (alpha) provides an easy way to securely bootstrap Kubernetes on Linux, see http://kubernetes.io/docs/kubeadm/ ([#33262](https://github.com/kubernetes/kubernetes/pull/33262), [@errordeveloper](https://github.com/errordeveloper)) +* Alpha JWS Discovery API for locating an apiserver securely ([#32203](https://github.com/kubernetes/kubernetes/pull/32203), [@dgoodwin](https://github.com/dgoodwin)) + +### Action Required + +* kube-apiserver learned the '--anonymous-auth' flag, which defaults to true. When enabled, requests to the secure port that are not rejected by other configured authentication methods are treated as anonymous requests, and given a username of 'system:anonymous' and a group of 'system:unauthenticated'. ([#32386](https://github.com/kubernetes/kubernetes/pull/32386), [@liggitt](https://github.com/liggitt)) + * Authenticated users are decorated with a 'system:authenticated' group. + * NOTE: anonymous access is enabled by default. If you rely on authentication alone to authorize access, change to use an authorization mode other than AlwaysAllow, or or set '--anonymous-auth=false'. +* The NamespaceExists and NamespaceAutoProvision admission controllers have been removed. ([#31250](https://github.com/kubernetes/kubernetes/pull/31250), [@derekwaynecarr](https://github.com/derekwaynecarr)) + * All cluster operators should use NamespaceLifecycle. +* Federation binaries and their corresponding docker images - `federation-apiserver` and `federation-controller-manager` are now folded in to the `hyperkube` binary. If you were using one of these binaries or docker images, please switch to using the `hyperkube` version. Please refer to the federation manifests - `federation/manifests/federation-apiserver.yaml` and `federation/manifests/federation-controller-manager-deployment.yaml` for examples. ([#29929](https://github.com/kubernetes/kubernetes/pull/29929), [@madhusudancs](https://github.com/madhusudancs)) + +### Other notable changes + +* The kube-apiserver --service-account-key-file option can be specified multiple times, or can point to a file containing multiple keys, to enable rotation of signing keys. ([#34029](https://github.com/kubernetes/kubernetes/pull/34029), [@liggitt](https://github.com/liggitt)) +* The apiserver now uses addresses reported by the kubelet in the Node object's status for apiserver->kubelet communications, rather than the name of the Node object. The address type used defaults to `InternalIP`, `ExternalIP`, and `LegacyHostIP` address types, in that order. ([#33718](https://github.com/kubernetes/kubernetes/pull/33718), [@justinsb](https://github.com/justinsb)) +* Federated deployment controller that supports the same api as the regular kubernetes deployment controller. ([#34109](https://github.com/kubernetes/kubernetes/pull/34109), [@mwielgus](https://github.com/mwielgus)) +* Match GroupVersionKind against specific version ([#34010](https://github.com/kubernetes/kubernetes/pull/34010), [@soltysh](https://github.com/soltysh)) +* fix yaml decode issue ([#34297](https://github.com/kubernetes/kubernetes/pull/34297), [@AdoHe](https://github.com/AdoHe)) +* kubectl annotate now supports --dry-run ([#34199](https://github.com/kubernetes/kubernetes/pull/34199), [@asalkeld](https://github.com/asalkeld)) +* kubectl: Add external ip information to node when '-o wide' is used ([#33552](https://github.com/kubernetes/kubernetes/pull/33552), [@floreks](https://github.com/floreks)) +* Update GCI base image: ([#34156](https://github.com/kubernetes/kubernetes/pull/34156), [@adityakali](https://github.com/adityakali)) + * Enabled VXLAN and IP_SET config options in kernel to support some networking tools (ebtools) + * OpenSSL CVE fixes +* ContainerVm/GCI image: try to use ifdown/ifup if available ([#33595](https://github.com/kubernetes/kubernetes/pull/33595), [@freehan](https://github.com/freehan)) +* Use manifest digest (as `docker-pullable://`) as ImageID when available (exposes a canonical, pullable image ID for containers). ([#33014](https://github.com/kubernetes/kubernetes/pull/33014), [@DirectXMan12](https://github.com/DirectXMan12)) +* Add kubelet awareness to taint tolerant match caculator. ([#26501](https://github.com/kubernetes/kubernetes/pull/26501), [@resouer](https://github.com/resouer)) +* Fix nil pointer issue when getting metrics from volume mounter ([#34251](https://github.com/kubernetes/kubernetes/pull/34251), [@jingxu97](https://github.com/jingxu97)) +* Enforce Disk based pod eviction with GCI base image in Kubelet ([#33520](https://github.com/kubernetes/kubernetes/pull/33520), [@vishh](https://github.com/vishh)) +* Remove headers that are unnecessary for proxy target ([#34076](https://github.com/kubernetes/kubernetes/pull/34076), [@mbohlool](https://github.com/mbohlool)) +* Add missing argument to log message in federated ingress controller. ([#34158](https://github.com/kubernetes/kubernetes/pull/34158), [@quinton-hoole](https://github.com/quinton-hoole)) +* The kubelet --eviction-minimum-reclaim option can now take precentages as well as absolute values for resources quantities ([#33392](https://github.com/kubernetes/kubernetes/pull/33392), [@sjenning](https://github.com/sjenning)) +* The implicit registration of Prometheus metrics for workqueue has been removed, and a plug-able interface was added. If you were using workqueue in your own binaries and want these metrics, add the following to your imports in the main package: "k8s.io/pkg/util/workqueue/prometheus". ([#33792](https://github.com/kubernetes/kubernetes/pull/33792), [@caesarxuchao](https://github.com/caesarxuchao)) +* Add kubectl --node-port option for specifying the service nodeport ([#33319](https://github.com/kubernetes/kubernetes/pull/33319), [@juanvallejo](https://github.com/juanvallejo)) +* To reduce memory usage to reasonable levels in smaller clusters, kube-apiserver now sets the deserialization cache size based on the target memory usage. ([#34000](https://github.com/kubernetes/kubernetes/pull/34000), [@wojtek-t](https://github.com/wojtek-t)) +* use service accounts as clients for controllers ([#33310](https://github.com/kubernetes/kubernetes/pull/33310), [@deads2k](https://github.com/deads2k)) +* Add a new option "--local" to the `kubectl annotate` ([#34074](https://github.com/kubernetes/kubernetes/pull/34074), [@asalkeld](https://github.com/asalkeld)) +* Add a new option "--local" to the `kubectl label` ([#33990](https://github.com/kubernetes/kubernetes/pull/33990), [@asalkeld](https://github.com/asalkeld)) +* Initialize podsWithAffinity to avoid scheduler panic ([#33967](https://github.com/kubernetes/kubernetes/pull/33967), [@xiang90](https://github.com/xiang90)) +* Fix base image pinning during upgrades via cluster/gce/upgrade.sh ([#33147](https://github.com/kubernetes/kubernetes/pull/33147), [@vishh](https://github.com/vishh)) +* Remove the flannel experimental overlay ([#33862](https://github.com/kubernetes/kubernetes/pull/33862), [@luxas](https://github.com/luxas)) +* CRI: Remove the mount name and port name. ([#33970](https://github.com/kubernetes/kubernetes/pull/33970), [@yifan-gu](https://github.com/yifan-gu)) +* Enable kubectl describe rs to work when apiserver does not support pods ([#33794](https://github.com/kubernetes/kubernetes/pull/33794), [@nikhiljindal](https://github.com/nikhiljindal)) +* Heal the namespaceless ingresses in federation e2e. ([#33977](https://github.com/kubernetes/kubernetes/pull/33977), [@quinton-hoole](https://github.com/quinton-hoole)) +* Fix issue in updating device path when volume is attached multiple times ([#33796](https://github.com/kubernetes/kubernetes/pull/33796), [@jingxu97](https://github.com/jingxu97)) +* ECDSA keys can now be used for signing and verifying service account tokens. ([#33565](https://github.com/kubernetes/kubernetes/pull/33565), [@liggitt](https://github.com/liggitt)) +* OnlyLocal nodeports ([#33587](https://github.com/kubernetes/kubernetes/pull/33587), [@bprashanth](https://github.com/bprashanth)) +* Remove flannel because now everything here is upstreamed ([#33860](https://github.com/kubernetes/kubernetes/pull/33860), [@luxas](https://github.com/luxas)) +* Use patched golang1.7.1 for cross-builds targeting darwin ([#33803](https://github.com/kubernetes/kubernetes/pull/33803), [@ixdy](https://github.com/ixdy)) +* Bump up addon kube-dns to v20 for graceful termination ([#33774](https://github.com/kubernetes/kubernetes/pull/33774), [@MrHohn](https://github.com/MrHohn)) +* Creating LoadBalancer Service with "None" ClusterIP is no longer possible ([#33274](https://github.com/kubernetes/kubernetes/pull/33274), [@nebril](https://github.com/nebril)) +* Increase timeout for federated ingress test. ([#33610](https://github.com/kubernetes/kubernetes/pull/33610), [@quinton-hoole](https://github.com/quinton-hoole)) +* Use UpdateStatus, not Update, to add LoadBalancerStatus to Federated Ingress. ([#33605](https://github.com/kubernetes/kubernetes/pull/33605), [@quinton-hoole](https://github.com/quinton-hoole)) +* add anytoken authenticator ([#33378](https://github.com/kubernetes/kubernetes/pull/33378), [@deads2k](https://github.com/deads2k)) +* Fixes in HPA: consider only running pods; proper denominator in avg request calculations. ([#33735](https://github.com/kubernetes/kubernetes/pull/33735), [@jszczepkowski](https://github.com/jszczepkowski)) +* When CORS Handler is enabled, we now add a new HTTP header named "Access-Control-Expose-Headers" with a value of "Date". This allows the "Date" HTTP header to be accessed from XHR/JavaScript. ([#33242](https://github.com/kubernetes/kubernetes/pull/33242), [@dims](https://github.com/dims)) +* promote contrib/mesos to incubator ([#33658](https://github.com/kubernetes/kubernetes/pull/33658), [@deads2k](https://github.com/deads2k)) +* MinReadySeconds / AvailableReplicas for ReplicaSets ([#32771](https://github.com/kubernetes/kubernetes/pull/32771), [@kargakis](https://github.com/kargakis)) +* Kubectl drain will now drain finished Pods ([#31763](https://github.com/kubernetes/kubernetes/pull/31763), [@fraenkel](https://github.com/fraenkel)) +* Adds the -deployment option to e2e.go, adds the ability to run e2e.go using a `kops` deployment. ([#33518](https://github.com/kubernetes/kubernetes/pull/33518), [@zmerlynn](https://github.com/zmerlynn)) +* Tune down initialDelaySeconds for readinessProbe. ([#33146](https://github.com/kubernetes/kubernetes/pull/33146), [@MrHohn](https://github.com/MrHohn)) +* kube-proxy: Add a lower-bound for conntrack (128k default) ([#33051](https://github.com/kubernetes/kubernetes/pull/33051), [@thockin](https://github.com/thockin)) +* local-up-cluster.sh: add SERVICE_CLUSTER_IP_RANGE as option ([#32921](https://github.com/kubernetes/kubernetes/pull/32921), [@aanm](https://github.com/aanm)) +* Default HTTP2 on, post fixes from [#29001](https://github.com/kubernetes/kubernetes/pull/29001) ([#32231](https://github.com/kubernetes/kubernetes/pull/32231), [@timothysc](https://github.com/timothysc)) +* Split dns healthcheck into two different urls ([#32406](https://github.com/kubernetes/kubernetes/pull/32406), [@MrHohn](https://github.com/MrHohn)) +* Remove kubectl namespace command ([#33275](https://github.com/kubernetes/kubernetes/pull/33275), [@maciaszczykm](https://github.com/maciaszczykm)) +* Automatic generation of man pages ([#33277](https://github.com/kubernetes/kubernetes/pull/33277), [@mkumatag](https://github.com/mkumatag)) +* Fixes memory/goroutine leak in Federation Service controller. ([#33359](https://github.com/kubernetes/kubernetes/pull/33359), [@shashidharatd](https://github.com/shashidharatd)) +* Switch k8s on GCE to use GCI by default ([#33353](https://github.com/kubernetes/kubernetes/pull/33353), [@vishh](https://github.com/vishh)) +* Move HighWaterMark to the top of the struct in order to fix arm, second time ([#33376](https://github.com/kubernetes/kubernetes/pull/33376), [@luxas](https://github.com/luxas)) +* Fix race condition in setting node statusUpdateNeeded flag ([#32807](https://github.com/kubernetes/kubernetes/pull/32807), [@jingxu97](https://github.com/jingxu97)) +* Fix the DOCKER_OPTS appending bug. ([#33163](https://github.com/kubernetes/kubernetes/pull/33163), [@DjangoPeng](https://github.com/DjangoPeng)) +* Send recycle events from pod to pv. ([#27714](https://github.com/kubernetes/kubernetes/pull/27714), [@jsafrane](https://github.com/jsafrane)) +* Add port forwarding for rkt with kvm stage1 ([#32126](https://github.com/kubernetes/kubernetes/pull/32126), [@jjlakis](https://github.com/jjlakis)) +* The value of the `versioned.Event` object (returned by watch APIs) in the Swagger 1.2 schemas has been updated from `*versioned.Event` which was not expected by many client tools. The new value is consistent with other structs returned by the API. ([#33007](https://github.com/kubernetes/kubernetes/pull/33007), [@smarterclayton](https://github.com/smarterclayton)) +* Remove cpu limits for dns pod to avoid CPU starvation ([#33227](https://github.com/kubernetes/kubernetes/pull/33227), [@vishh](https://github.com/vishh)) +* Allow secure access to apiserver from Admission Controllers ([#31491](https://github.com/kubernetes/kubernetes/pull/31491), [@dims](https://github.com/dims)) +* Resolves x509 verification issue with masters dialing nodes when started with --kubelet-certificate-authority ([#33141](https://github.com/kubernetes/kubernetes/pull/33141), [@liggitt](https://github.com/liggitt)) +* Fix possible panic in PodAffinityChecker ([#33086](https://github.com/kubernetes/kubernetes/pull/33086), [@ivan4th](https://github.com/ivan4th)) +* Upgrading Container-VM base image for k8s on GCE. Brief changelog as follows: ([#32738](https://github.com/kubernetes/kubernetes/pull/32738), [@Amey-D](https://github.com/Amey-D)) + * - Fixed performance regression in veth device driver + * - Docker and related binaries are statically linked + * - Fixed the issue of systemd being oom-killable +* Move HighWaterMark to the top of the struct in order to fix arm ([#33117](https://github.com/kubernetes/kubernetes/pull/33117), [@luxas](https://github.com/luxas)) +* kubenet: SyncHostports for both running and ready to run pods. ([#31388](https://github.com/kubernetes/kubernetes/pull/31388), [@yifan-gu](https://github.com/yifan-gu)) +* Limit the number of names per image reported in the node status ([#32914](https://github.com/kubernetes/kubernetes/pull/32914), [@yujuhong](https://github.com/yujuhong)) +* Support Quobyte as StorageClass ([#31434](https://github.com/kubernetes/kubernetes/pull/31434), [@johscheuer](https://github.com/johscheuer)) +* Use a patched go1.7.1 for building linux/arm ([#32517](https://github.com/kubernetes/kubernetes/pull/32517), [@luxas](https://github.com/luxas)) +* Add line break after events in kubectl describe ([#31463](https://github.com/kubernetes/kubernetes/pull/31463), [@fabianofranz](https://github.com/fabianofranz)) +* Specific error message on failed rolling update issued by older kubectl against 1.4 master ([#32751](https://github.com/kubernetes/kubernetes/pull/32751), [@caesarxuchao](https://github.com/caesarxuchao)) +* Make the informer library available for the go client library. ([#32718](https://github.com/kubernetes/kubernetes/pull/32718), [@mikedanese](https://github.com/mikedanese)) +* Added --log-facility flag to enhance dnsmasq logging ([#32422](https://github.com/kubernetes/kubernetes/pull/32422), [@MrHohn](https://github.com/MrHohn)) +* Set Dashboard UI to final 1.4 version ([#32666](https://github.com/kubernetes/kubernetes/pull/32666), [@bryk](https://github.com/bryk)) +* Fix audit_test regex for iso8601 timestamps ([#32593](https://github.com/kubernetes/kubernetes/pull/32593), [@johnbieren](https://github.com/johnbieren)) +* Docker digest validation is too strict ([#32627](https://github.com/kubernetes/kubernetes/pull/32627), [@smarterclayton](https://github.com/smarterclayton)) +* Bumped Heapster to v1.2.0. ([#32649](https://github.com/kubernetes/kubernetes/pull/32649), [@piosz](https://github.com/piosz)) + * More details about the release https://github.com/kubernetes/heapster/releases/tag/v1.2.0 +* add local subject access review API ([#32407](https://github.com/kubernetes/kubernetes/pull/32407), [@deads2k](https://github.com/deads2k)) +* make --runtime-config=api/all=true|false work ([#32582](https://github.com/kubernetes/kubernetes/pull/32582), [@jlowdermilk](https://github.com/jlowdermilk)) +* Added new kubelet flags `--cni-bin-dir` and `--cni-conf-dir` to specify where CNI files are located. ([#32151](https://github.com/kubernetes/kubernetes/pull/32151), [@bboreham](https://github.com/bboreham)) + * Fixed CNI configuration on GCI platform when using CNI. +* Move push-ci-build.sh to kubernetes/release repo ([#32444](https://github.com/kubernetes/kubernetes/pull/32444), [@david-mcmahon](https://github.com/david-mcmahon)) +* vendor: update github.com/coreos/go-oidc client package ([#31564](https://github.com/kubernetes/kubernetes/pull/31564), [@ericchiang](https://github.com/ericchiang)) +* Fixed an issue that caused a credential error when deploying federation control plane onto a GKE cluster. ([#31747](https://github.com/kubernetes/kubernetes/pull/31747), [@madhusudancs](https://github.com/madhusudancs)) +* Error if a contextName is provided but not found in the kubeconfig. ([#31767](https://github.com/kubernetes/kubernetes/pull/31767), [@asalkeld](https://github.com/asalkeld)) +* Use a Deployment for kube-dns ([#32018](https://github.com/kubernetes/kubernetes/pull/32018), [@MrHohn](https://github.com/MrHohn)) +* Support graceful termination in kube-dns ([#31894](https://github.com/kubernetes/kubernetes/pull/31894), [@MrHohn](https://github.com/MrHohn)) +* When prompting for passwords, don't echo to the terminal ([#31586](https://github.com/kubernetes/kubernetes/pull/31586), [@brendandburns](https://github.com/brendandburns)) +* add group prefix matching for kubectl usage ([#32140](https://github.com/kubernetes/kubernetes/pull/32140), [@deads2k](https://github.com/deads2k)) +* Stick to 2.2.1 etcd ([#32404](https://github.com/kubernetes/kubernetes/pull/32404), [@caesarxuchao](https://github.com/caesarxuchao)) +* Fix a bug in kubelet hostport logic which flushes KUBE-MARK-MASQ iptables chain ([#32413](https://github.com/kubernetes/kubernetes/pull/32413), [@freehan](https://github.com/freehan)) +* Make sure finalizers prevent deletion on storage that supports graceful deletion ([#32351](https://github.com/kubernetes/kubernetes/pull/32351), [@caesarxuchao](https://github.com/caesarxuchao)) +* AWS: Change default networking for kube-up to kubenet ([#32239](https://github.com/kubernetes/kubernetes/pull/32239), [@zmerlynn](https://github.com/zmerlynn)) +* Use etcd 2.3.7 ([#32359](https://github.com/kubernetes/kubernetes/pull/32359), [@wojtek-t](https://github.com/wojtek-t)) +* Allow missing keys in jsonpath ([#31714](https://github.com/kubernetes/kubernetes/pull/31714), [@smarterclayton](https://github.com/smarterclayton)) +* Changes 'kubectl rollout status' to wait until all updated replicas are available before finishing. ([#31499](https://github.com/kubernetes/kubernetes/pull/31499), [@areed](https://github.com/areed)) +* add selfsubjectaccessreview API ([#31271](https://github.com/kubernetes/kubernetes/pull/31271), [@deads2k](https://github.com/deads2k)) +* Add kubectl describe cmd support for vSphere volume ([#31045](https://github.com/kubernetes/kubernetes/pull/31045), [@abrarshivani](https://github.com/abrarshivani)) +* Enable kubelet eviction whenever inodes free is < 5% on GCE ([#31545](https://github.com/kubernetes/kubernetes/pull/31545), [@vishh](https://github.com/vishh)) +* Use federated namespace instead of the bootstrap cluster's namespace in Ingress e2e tests. ([#32105](https://github.com/kubernetes/kubernetes/pull/32105), [@madhusudancs](https://github.com/madhusudancs)) +* Move StorageClass to a storage group ([#31886](https://github.com/kubernetes/kubernetes/pull/31886), [@deads2k](https://github.com/deads2k)) +* Some components like kube-dns and kube-proxy could fail to load the service account token when started within a pod. Properly handle empty configurations to try loading the service account config. ([#31947](https://github.com/kubernetes/kubernetes/pull/31947), [@smarterclayton](https://github.com/smarterclayton)) +* Removed comments in json config when using kubectl edit with -o json ([#31685](https://github.com/kubernetes/kubernetes/pull/31685), [@jellonek](https://github.com/jellonek)) +* fixes invalid null selector issue in sysdig example yaml ([#31393](https://github.com/kubernetes/kubernetes/pull/31393), [@baldwinSPC](https://github.com/baldwinSPC)) +* Rescheduler which ensures that critical pods are always scheduled enabled by default in GCE. ([#31974](https://github.com/kubernetes/kubernetes/pull/31974), [@piosz](https://github.com/piosz)) +* retry oauth token fetch in gce cloudprovider ([#32021](https://github.com/kubernetes/kubernetes/pull/32021), [@mikedanese](https://github.com/mikedanese)) +* Deprecate the old cbr0 and flannel networking modes ([#31197](https://github.com/kubernetes/kubernetes/pull/31197), [@freehan](https://github.com/freehan)) +* AWS: fix volume device assignment race condition ([#31090](https://github.com/kubernetes/kubernetes/pull/31090), [@justinsb](https://github.com/justinsb)) +* The certificates API group has been renamed to certificates.k8s.io ([#31887](https://github.com/kubernetes/kubernetes/pull/31887), [@liggitt](https://github.com/liggitt)) +* Increase Dashboard UI version to v1.4.0-beta2 ([#31518](https://github.com/kubernetes/kubernetes/pull/31518), [@bryk](https://github.com/bryk)) +* Fixed incomplete kubectl bash completion. ([#31333](https://github.com/kubernetes/kubernetes/pull/31333), [@xingzhou](https://github.com/xingzhou)) +* Added liveness probe to Heapster service. ([#31878](https://github.com/kubernetes/kubernetes/pull/31878), [@mksalawa](https://github.com/mksalawa)) +* Adding clusters to the list of valid resources printed by kubectl help ([#31719](https://github.com/kubernetes/kubernetes/pull/31719), [@nikhiljindal](https://github.com/nikhiljindal)) +* Kubernetes server components using `kubeconfig` files no longer default to `http://localhost:8080`. Administrators must specify a server value in their kubeconfig files. ([#30808](https://github.com/kubernetes/kubernetes/pull/30808), [@smarterclayton](https://github.com/smarterclayton)) +* Update influxdb to 0.12 ([#31519](https://github.com/kubernetes/kubernetes/pull/31519), [@piosz](https://github.com/piosz)) +* Include security options in the container created event ([#31557](https://github.com/kubernetes/kubernetes/pull/31557), [@timstclair](https://github.com/timstclair)) +* Federation can now be deployed using the `federation/deploy/deploy.sh` script. This script does not depend on any of the development environment shell library/scripts. This is an alternative to the current `federation-up.sh`/`federation-down.sh` scripts. Both the scripts are going to co-exist in this release, but the `federation-up.sh`/`federation-down.sh` scripts might be removed in a future release in favor of `federation/deploy/deploy.sh` script. ([#30744](https://github.com/kubernetes/kubernetes/pull/30744), [@madhusudancs](https://github.com/madhusudancs)) +* Add get/delete cluster, delete context to kubectl config ([#29821](https://github.com/kubernetes/kubernetes/pull/29821), [@alexbrand](https://github.com/alexbrand)) +* rkt: Force `rkt fetch` to fetch from remote to conform the image pull policy. ([#31378](https://github.com/kubernetes/kubernetes/pull/31378), [@yifan-gu](https://github.com/yifan-gu)) +* Allow services which use same port, different protocol to use the same nodePort for both ([#30253](https://github.com/kubernetes/kubernetes/pull/30253), [@AdoHe](https://github.com/AdoHe)) +* Handle overlapping deployments gracefully ([#30730](https://github.com/kubernetes/kubernetes/pull/30730), [@janetkuo](https://github.com/janetkuo)) +* Remove environment variables and internal Kubernetes Docker labels from cAdvisor Prometheus metric labels. ([#31064](https://github.com/kubernetes/kubernetes/pull/31064), [@grobie](https://github.com/grobie)) + * Old behavior: + * - environment variables explicitly whitelisted via --docker-env-metadata-whitelist were exported as `container_env_*=*`. Default is zero so by default non were exported + * - all docker labels were exported as `container_label_*=*` + * New behavior: + * - Only `container_name`, `pod_name`, `namespace`, `id`, `image`, and `name` labels are exposed + * - no environment variables will be exposed ever via /metrics, even if whitelisted +* Filter duplicate network packets in promiscuous bridge mode (with ebtables) ([#28717](https://github.com/kubernetes/kubernetes/pull/28717), [@freehan](https://github.com/freehan)) +* Refactor to simplify the hard-traveled path of the KubeletConfiguration object ([#29216](https://github.com/kubernetes/kubernetes/pull/29216), [@mtaufen](https://github.com/mtaufen)) +* Fix overflow issue in controller-manager rate limiter ([#31396](https://github.com/kubernetes/kubernetes/pull/31396), [@foxish](https://github.com/foxish)) + +Please see the [Releases Page](https://github.com/kubernetes/kubernetes/releases) for older releases. + +Release notes of older releases can be found in: +- [CHANGELOG-1.2.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.2.md) +- [CHANGELOG-1.3.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.3.md) +- [CHANGELOG-1.4.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.4.md) + +[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/CHANGELOG.md?pixel)]() diff --git a/vendor/k8s.io/kubernetes/CHANGELOG-1.6.md b/vendor/k8s.io/kubernetes/CHANGELOG-1.6.md new file mode 100644 index 000000000..31b56832c --- /dev/null +++ b/vendor/k8s.io/kubernetes/CHANGELOG-1.6.md @@ -0,0 +1,2688 @@ +<!-- BEGIN MUNGE: GENERATED_TOC --> +- [v1.6.10](#v1610) + - [Downloads for v1.6.10](#downloads-for-v1610) + - [Client Binaries](#client-binaries) + - [Server Binaries](#server-binaries) + - [Node Binaries](#node-binaries) + - [Changelog since v1.6.9](#changelog-since-v169) + - [Other notable changes](#other-notable-changes) +- [v1.6.9](#v169) + - [Downloads for v1.6.9](#downloads-for-v169) + - [Client Binaries](#client-binaries-1) + - [Server Binaries](#server-binaries-1) + - [Node Binaries](#node-binaries-1) + - [Changelog since v1.6.8](#changelog-since-v168) + - [Other notable changes](#other-notable-changes-1) +- [v1.6.8](#v168) + - [Downloads for v1.6.8](#downloads-for-v168) + - [Client Binaries](#client-binaries-2) + - [Server Binaries](#server-binaries-2) + - [Node Binaries](#node-binaries-2) + - [Changelog since v1.6.7](#changelog-since-v167) + - [Other notable changes](#other-notable-changes-2) +- [v1.6.7](#v167) + - [Downloads for v1.6.7](#downloads-for-v167) + - [Client Binaries](#client-binaries-3) + - [Server Binaries](#server-binaries-3) + - [Node Binaries](#node-binaries-3) + - [Changelog since v1.6.6](#changelog-since-v166) + - [Other notable changes](#other-notable-changes-3) +- [v1.6.6](#v166) + - [Downloads for v1.6.6](#downloads-for-v166) + - [Client Binaries](#client-binaries-4) + - [Server Binaries](#server-binaries-4) + - [Node Binaries](#node-binaries-4) + - [Changelog since v1.6.5](#changelog-since-v165) + - [Action Required](#action-required) + - [Other notable changes](#other-notable-changes-4) +- [v1.6.5](#v165) + - [Known Issues for v1.6.5](#known-issues-for-v165) + - [Downloads for v1.6.5](#downloads-for-v165) + - [Client Binaries](#client-binaries-5) + - [Server Binaries](#server-binaries-5) + - [Node Binaries](#node-binaries-5) + - [Changelog since v1.6.4](#changelog-since-v164) + - [Other notable changes](#other-notable-changes-5) +- [v1.6.4](#v164) + - [Known Issues for v1.6.4](#known-issues-for-v164) + - [Downloads for v1.6.4](#downloads-for-v164) + - [Client Binaries](#client-binaries-6) + - [Server Binaries](#server-binaries-6) + - [Node Binaries](#node-binaries-6) + - [Changelog since v1.6.3](#changelog-since-v163) + - [Other notable changes](#other-notable-changes-6) +- [v1.6.3](#v163) + - [Known Issues for v1.6.3](#known-issues-for-v163) + - [Downloads for v1.6.3](#downloads-for-v163) + - [Client Binaries](#client-binaries-7) + - [Server Binaries](#server-binaries-7) + - [Node Binaries](#node-binaries-7) + - [Changelog since v1.6.2](#changelog-since-v162) + - [Other notable changes](#other-notable-changes-7) +- [v1.6.2](#v162) + - [Downloads for v1.6.2](#downloads-for-v162) + - [Client Binaries](#client-binaries-8) + - [Server Binaries](#server-binaries-8) + - [Changelog since v1.6.1](#changelog-since-v161) + - [Other notable changes](#other-notable-changes-8) +- [v1.6.1](#v161) + - [Downloads for v1.6.1](#downloads-for-v161) + - [Client Binaries](#client-binaries-9) + - [Server Binaries](#server-binaries-9) + - [Changelog since v1.6.0](#changelog-since-v160) + - [Other notable changes](#other-notable-changes-9) +- [v1.6.0](#v160) + - [Downloads for v1.6.0](#downloads-for-v160) + - [Client Binaries](#client-binaries-10) + - [Server Binaries](#server-binaries-10) + - [WARNING: etcd backup strongly recommended](#warning:-etcd-backup-strongly-recommended) + - [Major updates and release themes](#major-updates-and-release-themes) + - [Action Required](#action-required-1) + - [Certificates API](#certificates-api) + - [Cluster Autoscaler](#cluster-autoscaler) + - [Deployment](#deployment) + - [Federation](#federation) + - [Internal Storage Layer](#internal-storage-layer) + - [Node Components](#node-components) + - [kubectl](#kubectl) + - [RBAC](#rbac) + - [Scheduling](#scheduling) + - [Service](#service) + - [StatefulSet](#statefulset) + - [Volumes](#volumes) + - [Notable Features](#notable-features) + - [Autoscaling](#autoscaling) + - [DaemonSet](#daemonset) + - [Deployment](#deployment-1) + - [Federation](#federation-1) + - [Internal Storage Layer](#internal-storage-layer-1) + - [kubeadm](#kubeadm) + - [Node Components](#node-components-1) + - [RBAC](#rbac-1) + - [Scheduling](#scheduling-1) + - [Service Catalog](#service-catalog) + - [Volumes](#volumes-1) + - [Deprecations](#deprecations) + - [Cluster Provisioning Scripts](#cluster-provisioning-scripts) + - [kubeadm](#kubeadm-1) + - [Other Deprecations](#other-deprecations) + - [Changes to API Resources](#changes-to-api-resources) + - [ABAC](#abac) + - [Admission Control](#admission-control) + - [Authentication](#authentication) + - [Authorization](#authorization) + - [Autoscaling](#autoscaling-1) + - [Certificates](#certificates) + - [ConfigMap](#configmap) + - [CronJob](#cronjob) + - [DaemonSet](#daemonset-1) + - [Deployment](#deployment-2) + - [Node](#node) + - [Pod](#pod) + - [Pod Security Policy](#pod-security-policy) + - [RBAC](#rbac-2) + - [ReplicaSet](#replicaset) + - [Secrets](#secrets) + - [Service](#service-1) + - [StatefulSet](#statefulset-1) + - [Taints and Tolerations](#taints-and-tolerations) + - [Volumes](#volumes-2) + - [Changes to Major Components](#changes-to-major-components) + - [API Server](#api-server) + - [API Server Aggregator](#api-server-aggregator) + - [Generic API Server](#generic-api-server) + - [Client](#client) + - [client-go](#client-go) + - [Cloud Provider](#cloud-provider) + - [AWS](#aws) + - [Azure](#azure) + - [GCE](#gce) + - [GKE](#gke) + - [vSphere](#vsphere) + - [Federation](#federation-2) + - [kubefed](#kubefed) + - [Other Notable Changes](#other-notable-changes-10) + - [Garbage Collector](#garbage-collector) + - [kubeadm](#kubeadm-2) + - [kubectl](#kubectl-1) + - [New Commands](#new-commands) + - [Create subcommands](#create-subcommands) + - [Updates to existing commands](#updates-to-existing-commands) + - [Updates to apply](#updates-to-apply) + - [Updates to edit](#updates-to-edit) + - [Bug fixes](#bug-fixes) + - [Other Notable Changes](#other-notable-changes-11) + - [Node Components](#node-components-2) + - [Bug fixes](#bug-fixes-1) + - [kube-controller-manager](#kube-controller-manager) + - [kube-dns](#kube-dns) + - [kube-proxy](#kube-proxy) + - [Scheduler](#scheduler) + - [Volume Plugins](#volume-plugins) + - [Azure Disk](#azure-disk) + - [GlusterFS](#glusterfs) + - [Photon](#photon) + - [rbd](#rbd) + - [vSphere](#vsphere-1) + - [Other Notable Changes](#other-notable-changes-12) + - [Changes to Cluster Provisioning Scripts](#changes-to-cluster-provisioning-scripts) + - [AWS](#aws-1) + - [Juju](#juju) + - [libvirt CoreOS](#libvirt-coreos) + - [GCE](#gce-1) + - [OpenStack](#openstack) + - [Container Images](#container-images) + - [Other Notable Changes](#other-notable-changes-13) + - [Changes to Addons](#changes-to-addons) + - [Dashboard](#dashboard) + - [DNS](#dns) + - [DNS Autoscaler](#dns-autoscaler) + - [Cluster Autoscaler](#cluster-autoscaler-1) + - [Cluster Load Balancing](#cluster-load-balancing) + - [etcd Empty Dir Cleanup](#etcd-empty-dir-cleanup) + - [Fluentd](#fluentd) + - [Heapster](#heapster) + - [Registry](#registry) + - [External Dependency Version Information](#external-dependency-version-information) + - [Changelog since v1.6.0-rc.1](#changelog-since-v160-rc1) + - [Previous Releases Included in v1.6.0](#previous-releases-included-in-v160) +- [v1.6.0-rc.1](#v160-rc1) + - [Downloads for v1.6.0-rc.1](#downloads-for-v160-rc1) + - [Client Binaries](#client-binaries-11) + - [Server Binaries](#server-binaries-11) + - [Changelog since v1.6.0-beta.4](#changelog-since-v160-beta4) + - [Other notable changes](#other-notable-changes-14) +- [v1.6.0-beta.4](#v160-beta4) + - [Downloads for v1.6.0-beta.4](#downloads-for-v160-beta4) + - [Client Binaries](#client-binaries-12) + - [Server Binaries](#server-binaries-12) + - [Changelog since v1.6.0-beta.3](#changelog-since-v160-beta3) + - [Other notable changes](#other-notable-changes-15) +- [v1.6.0-beta.3](#v160-beta3) + - [Downloads for v1.6.0-beta.3](#downloads-for-v160-beta3) + - [Client Binaries](#client-binaries-13) + - [Server Binaries](#server-binaries-13) + - [Changelog since v1.6.0-beta.2](#changelog-since-v160-beta2) + - [Other notable changes](#other-notable-changes-16) +- [v1.6.0-beta.2](#v160-beta2) + - [Downloads for v1.6.0-beta.2](#downloads-for-v160-beta2) + - [Client Binaries](#client-binaries-14) + - [Server Binaries](#server-binaries-14) + - [Changelog since v1.6.0-beta.1](#changelog-since-v160-beta1) + - [Action Required](#action-required-2) + - [Other notable changes](#other-notable-changes-17) +- [v1.6.0-beta.1](#v160-beta1) + - [Downloads for v1.6.0-beta.1](#downloads-for-v160-beta1) + - [Client Binaries](#client-binaries-15) + - [Server Binaries](#server-binaries-15) + - [Changelog since v1.6.0-alpha.3](#changelog-since-v160-alpha3) + - [Action Required](#action-required-3) + - [Other notable changes](#other-notable-changes-18) +- [v1.6.0-alpha.3](#v160-alpha3) + - [Downloads for v1.6.0-alpha.3](#downloads-for-v160-alpha3) + - [Client Binaries](#client-binaries-16) + - [Server Binaries](#server-binaries-16) + - [Changelog since v1.6.0-alpha.2](#changelog-since-v160-alpha2) + - [Other notable changes](#other-notable-changes-19) +- [v1.6.0-alpha.2](#v160-alpha2) + - [Downloads for v1.6.0-alpha.2](#downloads-for-v160-alpha2) + - [Client Binaries](#client-binaries-17) + - [Server Binaries](#server-binaries-17) + - [Changelog since v1.6.0-alpha.1](#changelog-since-v160-alpha1) + - [Other notable changes](#other-notable-changes-20) +- [v1.6.0-alpha.1](#v160-alpha1) + - [Downloads for v1.6.0-alpha.1](#downloads-for-v160-alpha1) + - [Client Binaries](#client-binaries-18) + - [Server Binaries](#server-binaries-18) + - [Changelog since v1.5.0](#changelog-since-v150) + - [Action Required](#action-required-4) + - [Other notable changes](#other-notable-changes-21) +<!-- END MUNGE: GENERATED_TOC --> + +<!-- NEW RELEASE NOTES ENTRY --> + + +# v1.6.10 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.6/examples) + +## Downloads for v1.6.10 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.6.10/kubernetes.tar.gz) | `8877359b78950b12a48ea68483f4e4ba2d2521f7e8620efca6f84275cb023428` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.6.10/kubernetes-src.tar.gz) | `560d1441b72c670c3d21f838f8d0a94bc75628b1bdd322b18e91df2578a0f84b` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.6.10/kubernetes-client-darwin-386.tar.gz) | `087799af2856decf438dbd896260cfdec3c02c6a42e2e2f90b608f21d61a8fb6` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.6.10/kubernetes-client-darwin-amd64.tar.gz) | `8d9dbbee46a26fcf7f50af145b888881a428d62a3ee929b75e0a6833553de4ab` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.6.10/kubernetes-client-linux-386.tar.gz) | `d69bd343613bd3f57799d05de5f56ec159ddb6f38cbec1d914b5c2e7a2945f6e` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.10/kubernetes-client-linux-amd64.tar.gz) | `b0e2420e66257e67c9f53c996feebff20bebbbe5c9bc12b85b973a165ee436ec` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.10/kubernetes-client-linux-arm64.tar.gz) | `4d9b6064fd409789c7bc07b7a3746798f94a19bf811021f727fcf8afdbd432aa` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.6.10/kubernetes-client-linux-arm.tar.gz) | `7a02002aa3c4f6c5c2ff662fe023da3cd32a687967bb42a76e2014fe12a349f4` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.10/kubernetes-client-linux-ppc64le.tar.gz) | `f0b26ad0bdf578a8c98e870a276ad7b8d77ef13f423476b21b78f18077b83893` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.10/kubernetes-client-linux-s390x.tar.gz) | `da4125aff73b1d397b2917d4397690686d44f426471fd12eed080947c0de03e5` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.6.10/kubernetes-client-windows-386.tar.gz) | `0bd8aeb66a1d5235da85a71150e10838c0d8d67ecb8b368262d52ac86ff10dbd` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.6.10/kubernetes-client-windows-amd64.tar.gz) | `3a89271b4554e56c37038f797ad31f357107257d80fed9ab5ca80832e33cf00e` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.10/kubernetes-server-linux-amd64.tar.gz) | `ae897c9db3a0b89be6ff66ca8e35b41165be620614f60aab424d76deffa45bcc` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.10/kubernetes-server-linux-arm64.tar.gz) | `f6ce8a89f2ce9b380789828ba2723ac834d2dd40dd20403f22040ee08a390b07` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.6.10/kubernetes-server-linux-arm.tar.gz) | `085a3166785ab4fe17cc153fa6306df55af6fa90d5a3a4670923cf4515323f70` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.10/kubernetes-server-linux-ppc64le.tar.gz) | `c55f6741370471a2caac8b844865d908c8b327f2aea6685e193d54f4b14a5a63` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.10/kubernetes-server-linux-s390x.tar.gz) | `e36bd6f3bd7493f4ba12ceeebc9a6102778d20d203054d74cd69e929b7abcc84` + +### Node Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.10/kubernetes-node-linux-amd64.tar.gz) | `e083f7bc8028a2eb03bbcc6be93a95377e74906ae49970af034d36b3409f72de` +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.10/kubernetes-node-linux-arm64.tar.gz) | `95895aab99979aca8cb713f53b2be0f11b16c3a76e97c206a70969a3cc3e003d` +[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.6.10/kubernetes-node-linux-arm.tar.gz) | `a1e2dee888f4ef9affd1c2b747602f4d53971911b93ea69174d7301a5f7e1ccc` +[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.10/kubernetes-node-linux-ppc64le.tar.gz) | `1cbaa1f6116c862acaef7a3e1ad6c27bcf5f87eb4ce01f6f9164c58caa2e0009` +[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.10/kubernetes-node-linux-s390x.tar.gz) | `178a53d8193464a6062b3ebdea6c8dbb3dcb9f7c0ab1f40e386e555939c0be51` +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.6.10/kubernetes-node-windows-amd64.tar.gz) | `1c044217184bcbe7e11c9fe0c511bbc6353935fc850b2c6b0f6ca0f2cbe31a8e` + +## Changelog since v1.6.9 + +### Other notable changes + +* Add --request-timeout to kube-apiserver to make global request timeout configurable. ([#51415](https://github.com/kubernetes/kubernetes/pull/51415), [@jpbetz](https://github.com/jpbetz)) +* Fix for Nodes in vSphere lacking an InternalIP. ([#48760](https://github.com/kubernetes/kubernetes/pull/48760)) ([#49202](https://github.com/kubernetes/kubernetes/pull/49202), [@cbonte](https://github.com/cbonte)) +* GCE: Bump GLBC version to [0.9.6](https://github.com/kubernetes/ingress/releases/tag/0.9.6). ([#50096](https://github.com/kubernetes/kubernetes/pull/50096), [@nicksardo](https://github.com/nicksardo)) +* In GCE with COS, increase TasksMax for Docker service to raise cap on number of threads/processes used by containers. ([#51986](https://github.com/kubernetes/kubernetes/pull/51986), [@yujuhong](https://github.com/yujuhong)) +* Fixed an issue ([#47800](https://github.com/kubernetes/kubernetes/pull/47800)) where `kubectl logs -f` failed with `unexpected stream type ""`. ([#51872](https://github.com/kubernetes/kubernetes/pull/51872), [@feiskyer](https://github.com/feiskyer)) +* Fix for Pod stuck in ContainerCreating with error "Volume is not yet attached according to node". ([#50806](https://github.com/kubernetes/kubernetes/pull/50806), [@verult](https://github.com/verult)) +* Fix initial exec terminal dimensions. ([#51126](https://github.com/kubernetes/kubernetes/pull/51126), [@chen-anders](https://github.com/chen-anders)) +* vSphere: Fix attach volume failing on the first try. ([#51218](https://github.com/kubernetes/kubernetes/pull/51218), [@BaluDontu](https://github.com/BaluDontu)) + + + +# v1.6.9 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.6/examples) + +## Downloads for v1.6.9 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.6.9/kubernetes.tar.gz) | `08be94c252e7fbdd7c14811ec021818e687c1259e557b70db10aac64c0e8e4b2` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.6.9/kubernetes-src.tar.gz) | `519501e26afc341b236c5b46602f010a33fc190e3d1bfb7802969b2e979faaeb` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.6.9/kubernetes-client-darwin-386.tar.gz) | `864f2307dd22c055063d1a55354596754a94d03f023e7278c24d5978bba00b3e` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.6.9/kubernetes-client-darwin-amd64.tar.gz) | `0a107e0a1d7e6865ddd9241f1e8357405f476889a6f1a16989ba01f6cffd3be7` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.6.9/kubernetes-client-linux-386.tar.gz) | `b20599e266248e7e176383e0318acd855c1aad8014396cc4018adde11a33d0c8` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.9/kubernetes-client-linux-amd64.tar.gz) | `0690a8c9858f91cc000b3acd602799bf2320756b7471e463df2e3a36fbdde886` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.9/kubernetes-client-linux-arm64.tar.gz) | `354897ffc6382b8eb27f434d8e7aa3cbfae4b819da3160a43db8ccb8cae1275b` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.6.9/kubernetes-client-linux-arm.tar.gz) | `6897408bf8d65d1281555c21ae978a4ccd69482a7ad2549bcec381416e312d7a` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.9/kubernetes-client-linux-ppc64le.tar.gz) | `2afae0c211eb415829446f90a0bf9d48b9f8311ac4566fa74a08415ed9a31e75` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.9/kubernetes-client-linux-s390x.tar.gz) | `abde354528cc9c8ced49bb767ffcd8bfae47a0b4b5501502f560cf663a0c4a05` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.6.9/kubernetes-client-windows-386.tar.gz) | `83083c0d78e9468c7be395282a4697d2c703d3310593e7b70cd09fa9e7791d80` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.6.9/kubernetes-client-windows-amd64.tar.gz) | `3471db3463d60d22d82edb34fbe3ca301cc583ebddffc2664569255302e7d304` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.9/kubernetes-server-linux-amd64.tar.gz) | `598e49c8a22e4e8db1e1c0ed9d8955c991425cd4e06c072ac36fd5ed693b1c61` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.9/kubernetes-server-linux-arm64.tar.gz) | `5ce75f57636d537b4bf3ca00c4a1322e9c1aaf273bd945304333b558af3c081b` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.6.9/kubernetes-server-linux-arm.tar.gz) | `afea9780049c5e6548f64973bd8679aae60672ab05027f8c36784ccf2a83a1b2` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.9/kubernetes-server-linux-ppc64le.tar.gz) | `cd131b3e39e4160cd9920fe2635b4f6da4679cce12cb2483cfe28197e366bceb` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.9/kubernetes-server-linux-s390x.tar.gz) | `93ee43f33cbe061ac088acf62099be1abd0d9c0b4a8a79be4069904c3780c76d` + +### Node Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.9/kubernetes-node-linux-amd64.tar.gz) | `f8f13233b168c4833af685817f9591c73658d1377ceb9d550cbea929c6e27c2e` +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.9/kubernetes-node-linux-arm64.tar.gz) | `1ed434f9e6469c8cc7a3bb15404e918cf242ef92ef075e7cf479b7e951269b5c` +[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.6.9/kubernetes-node-linux-arm.tar.gz) | `3fd8e089184f83bd9ed2cf5f193253e1f7b9b853876a08a2babf91647d6d0ac8` +[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.9/kubernetes-node-linux-ppc64le.tar.gz) | `9673547a32f83498bb28f02212d419b28cc50a0a4d7b866396994b5ea9313e79` +[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.9/kubernetes-node-linux-s390x.tar.gz) | `80044cdeb4260e807660c166ed15bb2a9db03d59d8c186b1d4f9a53841cea327` +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.6.9/kubernetes-node-windows-amd64.tar.gz) | `b1dd678ee2974dc83ea7cfe8516557c9360ed55e40cad1b68803b71786f8d16f` + +## Changelog since v1.6.8 + +### Other notable changes + +* StatefulSet: Set hostname/subdomain fields on new Pods in addition to the deprecated annotations, to allow mitigation of Pod DNS issues upon upgrading to Kubernetes v1.7.x. ([#50942](https://github.com/kubernetes/kubernetes/pull/50942), [@enisoc](https://github.com/enisoc)) +* Azure: Allow VNet to be in a separate Resource Group. ([#49725](https://github.com/kubernetes/kubernetes/pull/49725), [@sylr](https://github.com/sylr)) +* In GCE, add measures to prevent corruption of known_tokens.csv. ([#49897](https://github.com/kubernetes/kubernetes/pull/49897), [@mikedanese](https://github.com/mikedanese)) +* Fixed a bug in the API server watch cache, which could cause a missing watch event immediately after cache initialization. ([#49992](https://github.com/kubernetes/kubernetes/pull/49992), [@liggitt](https://github.com/liggitt)) + + + +# v1.6.8 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.6/examples) + +## Downloads for v1.6.8 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.6.8/kubernetes.tar.gz) | `c87f7826f0b7cf91baddd97ebafb33e99d91dcf6b9019a50bee0689527541ef7` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.6.8/kubernetes-src.tar.gz) | `591c43f9624dac351745da35444302cd694ad4953275b8f09016b4654d37b793` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.6.8/kubernetes-client-darwin-386.tar.gz) | `3f6cda6ca2cf3e8f038649f1021ca23c35f4da12d66cefaa4339c9613ca9bbd6` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.6.8/kubernetes-client-darwin-amd64.tar.gz) | `147bf5124e44a1557b95e7daa76717992b7890e79910c446dc682103f62325eb` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.6.8/kubernetes-client-linux-386.tar.gz) | `cd7238c19f9d4a4ce0b14c2d954f6ead2235caa2d74b319524a0d2ffeea0ca37` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.8/kubernetes-client-linux-amd64.tar.gz) | `34042be9607ca75702384552b31514f594af22d3c1d88549b0cd4ce36ee8fd6b` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.8/kubernetes-client-linux-arm64.tar.gz) | `3a7d4be76dda07fac50a257275369b3f4c48848e2963b55b46fa9df44477bfc8` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.6.8/kubernetes-client-linux-arm.tar.gz) | `0a060b8745b3c0e8173827af3d91a4748eb191a9c15538625eee108f6024fcfd` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.8/kubernetes-client-linux-ppc64le.tar.gz) | `bbc7be082d20082179de5efb85c0da9d0f3811c2119d3928bf89edc8f59e8cd0` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.8/kubernetes-client-linux-s390x.tar.gz) | `5e93d7ed4797f6b8742925d13f791e862bdb410bdd2b33737882132aabcc0bfd` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.6.8/kubernetes-client-windows-386.tar.gz) | `22a0a80fa5ed5f0745371cc9fd68eeeb0671242cf7c476fb4e635ccd9ef8c2b1` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.6.8/kubernetes-client-windows-amd64.tar.gz) | `ce42d7e826aa07bd98a424332926b04e75effbe926b098565781de3c3b6d244c` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.8/kubernetes-server-linux-amd64.tar.gz) | `9bf31375917ffdf9a9437ed562e96a1e2b43e23dcb4a42204032bb289ff12b6d` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.8/kubernetes-server-linux-arm64.tar.gz) | `51d84e7b1ace983b13639f1fe4bf1b11212d178e6a75b769de9bdac97d1fa7ae` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.6.8/kubernetes-server-linux-arm.tar.gz) | `b704de70774c6c0feb13a7b47d8d757e9a0438406b7fd1d33d0c5cb991d179b0` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.8/kubernetes-server-linux-ppc64le.tar.gz) | `f36f086481656fcb659a456ca832d62274e40defc1a3ed1dcc1e5ea7a696729b` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.8/kubernetes-server-linux-s390x.tar.gz) | `348f8a733556fcceaaa27d316c3e2ea01039c860988a434d7c9a850bc2412546` + +### Node Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.8/kubernetes-node-linux-amd64.tar.gz) | `e38255961c73e021bcca08890918f23cce39831536bf74496aa369049a1eb165` +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.8/kubernetes-node-linux-arm64.tar.gz) | `be06c10320f3f996a48845eef9572353f9a0bd56330338c4cad6aca1fcc4fac4` +[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.6.8/kubernetes-node-linux-arm.tar.gz) | `06c6ecd885fbb4889791e78f50cdcb9920ee8f1e866d4fa921bc2096dbfbbd4b` +[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.8/kubernetes-node-linux-ppc64le.tar.gz) | `74e88435549cc46f3fc082300bf373c7d824921bd01eabf789a1b09e1a17a04a` +[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.8/kubernetes-node-linux-s390x.tar.gz) | `7ebe22e74653650ac0cedbfc482f5ff08713c40747018dac7506b36bb78ee8fc` +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.6.8/kubernetes-node-windows-amd64.tar.gz) | `66b66655976647f50db3eda61849cbb26bcb06ad20a866328f24aef862758bb4` + +## Changelog since v1.6.7 + +### Other notable changes + +* Revert deprecation of vCenter port in vSphere Cloud Provider. ([#49689](https://github.com/kubernetes/kubernetes/pull/49689), [@divyenpatel](https://github.com/divyenpatel)) +* kubeadm: Add preflight check for localhost resolution. ([#48875](https://github.com/kubernetes/kubernetes/pull/48875), [@craigtracey](https://github.com/craigtracey)) +* Fix panic when using `kubeadm init` with vsphere cloud-provider. ([#44661](https://github.com/kubernetes/kubernetes/pull/44661), [@xiangpengzhao](https://github.com/xiangpengzhao)) +* kubectl: Fix bug that showed terminated/evicted pods even without `--show-all`. ([#48786](https://github.com/kubernetes/kubernetes/pull/48786), [@janetkuo](https://github.com/janetkuo)) +* Never prevent deletion of resources as part of namespace lifecycle ([#48733](https://github.com/kubernetes/kubernetes/pull/48733), [@liggitt](https://github.com/liggitt)) +* AWS cloudprovider plugin: Fix for large clusters (200+ nodes). Also fix bug with volumes not getting detached from a node after reboot. ([#48312](https://github.com/kubernetes/kubernetes/pull/48312), [@gnufied](https://github.com/gnufied)) +* Fix Pods using Portworx volumes getting stuck in ContainerCreating phase. ([#48898](https://github.com/kubernetes/kubernetes/pull/48898), [@harsh-px](https://github.com/harsh-px)) +* RBAC role and role-binding reconciliation now ensures namespaces exist when reconciling on startup. ([#48480](https://github.com/kubernetes/kubernetes/pull/48480), [@liggitt](https://github.com/liggitt)) + + + +# v1.6.7 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.6/examples) + +## Downloads for v1.6.7 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.6.7/kubernetes.tar.gz) | `6522086d9666543ed4e88a791626953acd1ea843eb024f16f4a4a2390dcbb2b2` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.6.7/kubernetes-src.tar.gz) | `b2a73f140966ba0080ce16e3b9a67d5fd9849b36942f3490e9f8daa0fe4511c4` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.6.7/kubernetes-client-darwin-386.tar.gz) | `ffa06a16a3091b2697ef14f8e28bb08000455bd9b719cf0f510f011b864cd1e0` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.6.7/kubernetes-client-darwin-amd64.tar.gz) | `32de3e38f7a60c9171a63f43a2c7f0b2d8f8ba55d51468d8dbf7847dbd943b45` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.6.7/kubernetes-client-linux-386.tar.gz) | `d9c27321007607cc5afb2ff5b3cac210471d55dd1c3a478c6703ab72d187211e` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.7/kubernetes-client-linux-amd64.tar.gz) | `54947ef84181e89f9dbacedd54717cbed5cc7f9c36cb37bc8afc9097648e2c91` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.7/kubernetes-client-linux-arm64.tar.gz) | `e96d300eb6526705b1c1bedaaf3f4746f3e5d6b49ccc7e60650eb9ee022fba0e` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.6.7/kubernetes-client-linux-arm.tar.gz) | `e4605dca3948264fba603dc8f95b202528eb8ad4ca99c7f3a61f77031e7ba756` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.7/kubernetes-client-linux-ppc64le.tar.gz) | `8b77793aea5abf1c17b73f7e11476b9d387f3dc89e5d8405ffadd1a395258483` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.7/kubernetes-client-linux-s390x.tar.gz) | `ff3ddec930a0ffdc83fe324d544d4657d57a64a3973fb9df4ddaa7a98228d7fb` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.6.7/kubernetes-client-windows-386.tar.gz) | `ce09e4b071bb06039ad9bdf6a1059d59cf129dce942600fcdc9d320ff0c07a7a` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.6.7/kubernetes-client-windows-amd64.tar.gz) | `e985644f582945274e82764742f02bd175f05128c1945e987d06973dd5f5a56d` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.7/kubernetes-server-linux-amd64.tar.gz) | `1287bb85f1057eae53f8bb4e4475c990783e43d2f57ea1c551fdf2da7ca5345d` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.7/kubernetes-server-linux-arm64.tar.gz) | `51623850475669be59f6428922ba316d4dd60d977f892adfaf0ca0845c38506c` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.6.7/kubernetes-server-linux-arm.tar.gz) | `a5331022d29f085e6b7fc4ae064af64024eba6a02ae54e78c2e84b40d0aec598` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.7/kubernetes-server-linux-ppc64le.tar.gz) | `93d52e84d0fea5bdf3ede6784b8da6c501e0430c74430da3a125bd45c557e10a` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.7/kubernetes-server-linux-s390x.tar.gz) | `baccbb6fc497f433c2bd93146c31fbca1da427e0d6ac8483df26dd42ccb79c6e` + +### Node Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.7/kubernetes-node-linux-amd64.tar.gz) | `0cfdd51de879869e7ef40a17dfa1a303a596833fb567c3b7e4f82ba0cf863839` +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.7/kubernetes-node-linux-arm64.tar.gz) | `d07ef669d94ea20a4a9e3a38868ac389dab4d3f2bdf8b27280724fe63f4de3c3` +[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.6.7/kubernetes-node-linux-arm.tar.gz) | `1cc9b6a8aee4e59967421cbded21c0a20f02c39288781f504e55ad6ca71d1037` +[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.7/kubernetes-node-linux-ppc64le.tar.gz) | `3f412096d8b249d671f924c3ee4aecf3656186fde4509ce9f560f67a9a166b6d` +[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.7/kubernetes-node-linux-s390x.tar.gz) | `2cca7629c1236b3435e6e31498c1f8216d7cca4236d8ad0ae10c83a422519a34` +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.6.7/kubernetes-node-windows-amd64.tar.gz) | `4f859fba52c044a9ce703528760967e1efa47a359603b5466c0dc0748eb25e36` + +## Changelog since v1.6.6 + +### Other notable changes + +* kubeadm: Expose only the cluster-info ConfigMap in the kube-public ns ([#48050](https://github.com/kubernetes/kubernetes/pull/48050), [@luxas](https://github.com/luxas)) +* Fix kubelet request timeout when stopping a container. ([#46267](https://github.com/kubernetes/kubernetes/pull/46267), [@Random-Liu](https://github.com/Random-Liu)) +* Add generic NoSchedule toleration to fluentd in gcp config. ([#48182](https://github.com/kubernetes/kubernetes/pull/48182), [@gmarek](https://github.com/gmarek)) +* Update cluster-proportional-autoscaler, fluentd-gcp, and kube-addon-manager, and kube-dns addons with refreshed base images containing fixes for CVE-2016-9841, CVE-2016-9843, CVE-2017-2616, and CVE-2017-6512. ([#47454](https://github.com/kubernetes/kubernetes/pull/47454), [@ixdy](https://github.com/ixdy)) +* Fix fluentd-gcp configuration to facilitate JSON parsing ([#48139](https://github.com/kubernetes/kubernetes/pull/48139), [@crassirostris](https://github.com/crassirostris)) +* Bump runc to v1.0.0-rc2-49-gd223e2a - fixes `failed to initialise top level QOS containers` kubelet error. ([#48117](https://github.com/kubernetes/kubernetes/pull/48117), [@sjenning](https://github.com/sjenning)) +* `kubefed init` correctly checks for RBAC API enablement. ([#48077](https://github.com/kubernetes/kubernetes/pull/48077), [@liggitt](https://github.com/liggitt)) +* `kubectl api-versions` now always fetches information about enabled API groups and versions instead of using the local cache. ([#48016](https://github.com/kubernetes/kubernetes/pull/48016), [@liggitt](https://github.com/liggitt)) +* Fix kubelet event recording for selected events. ([#46246](https://github.com/kubernetes/kubernetes/pull/46246), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* Fix `Invalid value: "foregroundDeletion"` error when attempting to delete a resource. ([#46500](https://github.com/kubernetes/kubernetes/pull/46500), [@tnozicka](https://github.com/tnozicka)) + + + +# v1.6.6 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.6/examples) + +## Downloads for v1.6.6 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.6.6/kubernetes.tar.gz) | `1574d868d43f5d88cfd1af255226e8cd6da72cd65fb9e1285557279c34f8a645` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.6.6/kubernetes-src.tar.gz) | `305f372320f78855e298b6caea062c8d1f7db117c7b44943ff5ddd0169424033` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.6.6/kubernetes-client-darwin-386.tar.gz) | `d93ca6f95cd80856b04d9c76a98ca986d6ba183d9fa100619fcda9f157bfd7f6` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.6.6/kubernetes-client-darwin-amd64.tar.gz) | `facda65133f2893296f64c1067807dd7b354e2a4440afdd1ee62c05c07bcb91a` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.6.6/kubernetes-client-linux-386.tar.gz) | `5d1bd3ecc96f9e1cb9f20cef88c5aa2ec9c09370e8892557fc8a7cfe3cba595b` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.6/kubernetes-client-linux-amd64.tar.gz) | `94b2c9cd29981a8e150c187193bab0d8c0b6e906260f837367feff99860a6376` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.6/kubernetes-client-linux-arm64.tar.gz) | `a7554e496403b50c12f5dbfaa00f2b887773905894ae5c330e2accd7b7e137c9` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.6.6/kubernetes-client-linux-arm.tar.gz) | `5a3414f4b47c84b173c879379d90b447af0540730bb86f10baf6d6933b09d41d` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.6/kubernetes-client-linux-ppc64le.tar.gz) | `904bab541dd8f1236d5e47f97cd2509c649f629fdc3af88a3968ca3c5575886d` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.6/kubernetes-client-linux-s390x.tar.gz) | `d4a85694f796e4e1c14e6bddc295d9f776001fd8ac92ed32565606b964a843b0` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.6.6/kubernetes-client-windows-386.tar.gz) | `47258f6fc7fbd17ac1ddb38387adc5a2ddc2e39c5792cf3d354f9b19d373a6b2` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.6.6/kubernetes-client-windows-amd64.tar.gz) | `e8c2957688acf19463e28d39cc1b4b1e9a12b3f10101dff179d1d63754b34236` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.6/kubernetes-server-linux-amd64.tar.gz) | `7bbf43f81f5dbc3729c1956705d95c218b848591d03789d48f10e58fa865a0ba` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.6/kubernetes-server-linux-arm64.tar.gz) | `f725f491a8998bdf164470029441135336ec0414360d6b57a5d8daf73d09334f` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.6.6/kubernetes-server-linux-arm.tar.gz) | `9026ca6fdbffef1d02409a86649e4dd0a7667ff6c27df318a3d851c271fb38d0` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.6/kubernetes-server-linux-ppc64le.tar.gz) | `cd3b1b693b4e8225f78751bff533024785b0e20c2c51228956692db2a21d9f60` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.6/kubernetes-server-linux-s390x.tar.gz) | `9cd42506f4891be4691b7f4a8be7b894109dca54d0e9130651bc869101d7ed1f` + +### Node Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.6/kubernetes-node-linux-amd64.tar.gz) | `962f327f9a7b038c3b125a6cd06b690012fa38c827de0dae75955bb2be717126` +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.6/kubernetes-node-linux-arm64.tar.gz) | `e09af9f1130f8e1d4f6b45ec79eedb94e98354edb813b635c0dc097437834a1b` +[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.6.6/kubernetes-node-linux-arm.tar.gz) | `7647ec0a51308ca73e4c4eb4cbe09f2f9609c809e530d129a718d960a25d339d` +[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.6/kubernetes-node-linux-ppc64le.tar.gz) | `439b2135b179b699ca951a2d619629583d92dbdfb60b3920a1fa872b4cd65b6d` +[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.6/kubernetes-node-linux-s390x.tar.gz) | `eed95c80bddad4a67d81c036b0d047dfb7bef8fb13a4e1b4817c1f2a595b993e` +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.6.6/kubernetes-node-windows-amd64.tar.gz) | `611a92f9ab4f6dd48349843eec844b6abf861d76a151cce91b216a56bb6c821f` + +## Changelog since v1.6.5 + +### Action Required + +* Azure: Change container permissions to private for provisioned volumes. If you have existing Azure volumes that were created by Kubernetes v1.6.0-v1.6.5, you should change the permissions on them manually. ([#47605](https://github.com/kubernetes/kubernetes/pull/47605), [@brendandburns](https://github.com/brendandburns)) + +### Other notable changes + +* Bump GLBC version to 0.9.5 - fixes [loss of manually modified GCLB health check settings](https://github.com/kubernetes/kubernetes/issues/47559) upon upgrade from pre-1.6.4 to either 1.6.4 or 1.6.5. ([#47567](https://github.com/kubernetes/kubernetes/pull/47567), [@nicksardo](https://github.com/nicksardo)) + + + +# v1.6.5 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.6/examples) + +## Known Issues for v1.6.5 + +* If you use the [GLBC Ingress Controller](https://github.com/kubernetes/ingress/tree/master/controllers/gce), + upgrading an existing pre-v1.6.4 cluster to Kubernetes v1.6.5 will cause an unintentional + [overwrite of manual edits to GCP Health Checks](https://github.com/kubernetes/ingress/issues/842) + managed by the GLBC Ingress Controller. This can cause the health checks to start failing, + requiring you to reapply the manual edits. + * This issue does not affect clusters that were already running Kubernetes v1.6.4 or higher. + * This issue does not affect Health Checks that were left in the configuration + [originally set by the GLBC Ingress Controller](https://github.com/kubernetes/ingress/tree/master/controllers/gce#health-checks). + +## Downloads for v1.6.5 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.6.5/kubernetes.tar.gz) | `e497ddd9d0fb03a71babd6c7f879951ba8e2d791c9884613d60794f7df9a5a51` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.6.5/kubernetes-src.tar.gz) | `3971e41435f6e22914b603ea56bec72f78673fca9f5a5436a4beda7957dc24e1` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.6.5/kubernetes-client-darwin-386.tar.gz) | `af2290d1c3c923a6f873736739e0fc381328d19eb726419a17f2ae51e3ac2b45` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.6.5/kubernetes-client-darwin-amd64.tar.gz) | `8a138c2487871807bc8461a5bb0867d75cf9da228ecb6acdc5d22c08b2ed107d` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.6.5/kubernetes-client-linux-386.tar.gz) | `3f6867dd51e7838f58cf7e95174ef914d8d280ff275ac56cc8b285566ce30996` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.5/kubernetes-client-linux-amd64.tar.gz) | `8f38e71b1c68d69299af86ab4432297ae0d72cdee1d1e1c9975d77e448096c9c` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.5/kubernetes-client-linux-arm64.tar.gz) | `1d01ae4423eb9794d09202ff4f24207c9d62b32a1b8f4906801a66fcd70b8fa5` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.6.5/kubernetes-client-linux-arm.tar.gz) | `438a8b4388960fe48e87aa7e97954f1cf9f9cc5c957eee108c3cc8040786fdce` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.5/kubernetes-client-linux-ppc64le.tar.gz) | `3b64d6ce09ffb65d3fe8c4101309c3b39fdab3643d89f91e89445c8e3279884e` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.5/kubernetes-client-linux-s390x.tar.gz) | `f5fb3ddc6a6203ae68b0213624bbfa12b114a70a38e85151272273cbd8fd4fbd` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.6.5/kubernetes-client-windows-386.tar.gz) | `6ddc9b300746eefdc5d71aae193dea171115dab9db00010d416728d3f2035f19` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.6.5/kubernetes-client-windows-amd64.tar.gz) | `95854266bf64b84b59d1e6a3ca0501cf3c85fbd0258cb540893d5771aca74ace` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.5/kubernetes-server-linux-amd64.tar.gz) | `68809d34d3429685eaafedf398f690bba1bcc1f793cd2d8193559b90492c68b1` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.5/kubernetes-server-linux-arm64.tar.gz) | `96bf4da5cbaa8f7b0f8909276005e0766ca4fa30431396ba30b9e77be1abb7f0` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.6.5/kubernetes-server-linux-arm.tar.gz) | `2f9c5275a6a2b5b10416a3e76f64e996851f486eb6b2dbe0f106b81bb63e63a9` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.5/kubernetes-server-linux-ppc64le.tar.gz) | `f47bc83530dc7448879e7d11c2ba1613adc318fd6c1cbba76e5d7181d850667c` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.5/kubernetes-server-linux-s390x.tar.gz) | `ebbd82df12da7470299e9877185797def86b859a44e72486e7be995c01eae56c` + +### Node Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.5/kubernetes-node-linux-amd64.tar.gz) | `f842694701f8966cdfceca5f8f9d2b49bc84baf7446b67f7bf23b7581c245cc3` +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.5/kubernetes-node-linux-arm64.tar.gz) | `4efc4c8d9df77ad66763ce5cc39650ea1ebd43dd4f789622c93b0aa872f7a186` +[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.6.5/kubernetes-node-linux-arm.tar.gz) | `6f4e2b764aec5c458e8bf28159190c0c725e20ab94cf9ced3279dc75caa3fe21` +[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.5/kubernetes-node-linux-ppc64le.tar.gz) | `ba0e8ea11050273dbdf7b6d179251a95021b85000523e539c4940312586fd716` +[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.5/kubernetes-node-linux-s390x.tar.gz) | `b6555e9a94a38e8bda502ec3eb951d4d854ebe8c44ba31320882a497703ab2bf` +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.6.5/kubernetes-node-windows-amd64.tar.gz) | `0eaf3789c93996a45c74b30cc8a4d7169a639b7cf3fcf589ec387a0cfd0782d8` + +## Changelog since v1.6.4 + +### Other notable changes + +* Fix iSCSI iSER mounting. ([#47281](https://github.com/kubernetes/kubernetes/pull/47281), [@mtanino](https://github.com/mtanino)) +* Added exponential backoff to Azure cloudprovider ([#46660](https://github.com/kubernetes/kubernetes/pull/46660), [@jackfrancis](https://github.com/jackfrancis)) +* Update kube-dns to 1.14.2. ([#45684](https://github.com/kubernetes/kubernetes/pull/45684), [@bowei](https://github.com/bowei)) +* Fix log spam due to unnecessary status update when node is deleted. ([#45923](https://github.com/kubernetes/kubernetes/pull/45923), [@verult](https://github.com/verult)) +* Poll all active pods periodically for volumes to fix out of order pod & node addition events. Fixes volumes not getting detached after controller restart. ([#42033](https://github.com/kubernetes/kubernetes/pull/42033), [@NickrenREN](https://github.com/NickrenREN)) +* iscsi storage plugin: Fix dangling session when using multiple target portal addresses. ([#46239](https://github.com/kubernetes/kubernetes/pull/46239), [@mtanino](https://github.com/mtanino)) +* The namespace API object no longer supports the deletecollection operation, which was previously allowed by mistake and did not respect expected namespace lifecycle semantics. ([#47098](https://github.com/kubernetes/kubernetes/pull/47098), [@liggitt](https://github.com/liggitt)) +* Azure: Fix support for multiple `loadBalancerSourceRanges`, and add support for UDP ports and the Service spec's `sessionAffinity`. ([#45523](https://github.com/kubernetes/kubernetes/pull/45523), [@colemickens](https://github.com/colemickens)) +* Fix the bug where container cannot run as root when SecurityContext.RunAsNonRoot is false. ([#47009](https://github.com/kubernetes/kubernetes/pull/47009), [@yujuhong](https://github.com/yujuhong)) +* Remove broken getvolumename and pass PV or volume name to attach call ([#46249](https://github.com/kubernetes/kubernetes/pull/46249), [@chakri-nelluri](https://github.com/chakri-nelluri)) +* Portworx volume driver no longer has to run on the master. ([#45518](https://github.com/kubernetes/kubernetes/pull/45518), [@harsh-px](https://github.com/harsh-px)) +* Upgrade golang version to 1.7.6 ([#46405](https://github.com/kubernetes/kubernetes/pull/46405), [@cblecker](https://github.com/cblecker)) +* kube-proxy handling of services with no endpoints now applies to both INPUT and OUTPUT chains, preventing socket leak. ([#43972](https://github.com/kubernetes/kubernetes/pull/43972), [@thockin](https://github.com/thockin)) +* Fix kube-apiserver crash when patching TPR data ([#44612](https://github.com/kubernetes/kubernetes/pull/44612), [@nikhita](https://github.com/nikhita)) +* vSphere cloud provider: Report same Node IP as both internal and external. ([#45201](https://github.com/kubernetes/kubernetes/pull/45201), [@abrarshivani](https://github.com/abrarshivani)) +* Kubelet: Fix image garbage collector attempting to remove in-use images. ([#46121](https://github.com/kubernetes/kubernetes/pull/46121), [@Random-Liu](https://github.com/Random-Liu)) +* Add metrics exporter to the fluentd-gcp deployment ([#45096](https://github.com/kubernetes/kubernetes/pull/45096), [@crassirostris](https://github.com/crassirostris)) +* Fix the bug where StartedAt time is not reported for exited containers. ([#45977](https://github.com/kubernetes/kubernetes/pull/45977), [@yujuhong](https://github.com/yujuhong)) +* Enable basic auth username rotation for GCI ([#44590](https://github.com/kubernetes/kubernetes/pull/44590), [@ihmccreery](https://github.com/ihmccreery)) +* vSphere cloud provider: Filter out IPV6 node addresses. ([#45181](https://github.com/kubernetes/kubernetes/pull/45181), [@BaluDontu](https://github.com/BaluDontu)) +* vSphere cloud provider: Fix volume detach on node failure. ([#45569](https://github.com/kubernetes/kubernetes/pull/45569), [@divyenpatel](https://github.com/divyenpatel)) +* Job controller: Retry with rate-limiting if a Pod create/delete operation fails. ([#45870](https://github.com/kubernetes/kubernetes/pull/45870), [@tacy](https://github.com/tacy)) +* Ensure that autoscaling/v1 is the preferred version for API discovery when autoscaling/v2alpha1 is enabled. ([#45741](https://github.com/kubernetes/kubernetes/pull/45741), [@DirectXMan12](https://github.com/DirectXMan12)) +* Add support for Azure internal load balancer. ([#45690](https://github.com/kubernetes/kubernetes/pull/45690), [@jdumars](https://github.com/jdumars)) +* Fix `kubectl delete --cascade=false` for resources that don't have legacy overrides to orphan by default. ([#45713](https://github.com/kubernetes/kubernetes/pull/45713), [@kargakis](https://github.com/kargakis)) +* Fix erroneous FailedSync and FailedMount events being periodically and indefinitely posted on Pods after kubelet is restarted ([#44781](https://github.com/kubernetes/kubernetes/pull/44781), [@wongma7](https://github.com/wongma7)) +* fluentd will tolerate all NoExecute Taints when run in gcp configuration. ([#45715](https://github.com/kubernetes/kubernetes/pull/45715), [@gmarek](https://github.com/gmarek)) +* Fix [Deployments with Recreate strategy not waiting for Pod termination](https://github.com/kubernetes/kubernetes/issues/27362). ([#45639](https://github.com/kubernetes/kubernetes/pull/45639), [@ChipmunkV](https://github.com/ChipmunkV)) +* vSphere cloud provider: Remove the dependency of login information on worker nodes for vsphere cloud provider. ([#43545](https://github.com/kubernetes/kubernetes/pull/43545), [@luomiao](https://github.com/luomiao)) +* vSphere cloud provider: Fix fetching of VM UUID on Ubuntu 16.04 and Fedora. ([#45311](https://github.com/kubernetes/kubernetes/pull/45311), [@divyenpatel](https://github.com/divyenpatel)) + + + +# v1.6.4 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.6.3/examples) + +## Known Issues for v1.6.4 + +* If you use the [GLBC Ingress Controller](https://github.com/kubernetes/ingress/tree/master/controllers/gce), + upgrading an existing cluster to Kubernetes v1.6.4 will cause an unintentional + [overwrite of manual edits to GCP Health Checks](https://github.com/kubernetes/ingress/issues/842) + managed by the GLBC Ingress Controller. This can cause the health checks to start failing, + requiring you to reapply the manual edits. + * This issue does not affect clusters that start out with Kubernetes v1.6.4 or higher. + * This issue does not affect Health Checks that were left in the configuration + [originally set by the GLBC Ingress Controller](https://github.com/kubernetes/ingress/tree/master/controllers/gce#health-checks). + +## Downloads for v1.6.4 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.6.4/kubernetes.tar.gz) | `fef6a97be8195fee1108b40acbd7bea61ef5244b8be23e799d2d01ee365907dd` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.6.4/kubernetes-src.tar.gz) | `2915465e9b389c5af0fa660f6e7cbc36a416d1286094201e2a2da5b084a37cb3` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.6.4/kubernetes-client-darwin-386.tar.gz) | `e2db37a1cf3dff342e9ba25506c96edba0cbc9b65984dfe985a7ab45df64f93e` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.6.4/kubernetes-client-darwin-amd64.tar.gz) | `0d49df4b06f76b5a6e168f72ac0088194d4267cc888880f7d0f23e558cd0ee32` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.6.4/kubernetes-client-linux-386.tar.gz) | `5e218cc7f01d6fa71d0a10a30eea2724ee111db3bbae5a03f0c560cd0d24a5df` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.4/kubernetes-client-linux-amd64.tar.gz) | `4c8dbd03a66d871f03592e84ed98d205d2d0e0c0f6d48c7b60f3e9840ad04df8` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.4/kubernetes-client-linux-arm64.tar.gz) | `9bf29b0f8bdde972d62556bdd14622199f979f7dcf56d3948d429b1d73feca08` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.6.4/kubernetes-client-linux-arm.tar.gz) | `bbca1efe8fb95c6df7b330054776ce619652ba9d4c5428eabef9c435c61d1d9a` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.4/kubernetes-client-linux-ppc64le.tar.gz) | `7aa02e261f36a816dc1c7c898e16d732d9199d827ac4828f8e120b4a9ce5aa05` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.4/kubernetes-client-linux-s390x.tar.gz) | `531d00c43a49bb72365f2d6c1f31ad99ff09893e41f6b28d21980dbdd3ab0de4` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.6.4/kubernetes-client-windows-386.tar.gz) | `256fa2ffa77a1107e87a5a232bf8aa245afbcb5d383eda18f19f3fedbbad9a69` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.6.4/kubernetes-client-windows-amd64.tar.gz) | `c8a97087b81defdc513a9fe4aaf317d10ad6fc3368170465dd4ea64c23655939` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.4/kubernetes-server-linux-amd64.tar.gz) | `76a1d6dbce630b50fd3a5f566fcea6ef1a04996cf4f4c568338a3db0d3b6a3d5` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.4/kubernetes-server-linux-arm64.tar.gz) | `8b731307138a71ae90e025cb85ec7b4ac9179ebd8923f7abd1c839a2966ff2b0` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.6.4/kubernetes-server-linux-arm.tar.gz) | `0d3039f22cdc36526257f211c55099552b8d55cda25a05405f2701c869bb4be2` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.4/kubernetes-server-linux-ppc64le.tar.gz) | `6de3a85392ff65c019fd90173f1219a41f56559aebd07b18ed497e46645fcffc` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.4/kubernetes-server-linux-s390x.tar.gz) | `622a137c06a9fda23ec5941dd41607564804eeede0e6d3976cda6cc136e010c6` + +### Node Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.4/kubernetes-node-linux-amd64.tar.gz) | `df40c178ffbd92376e98dd258113e35c0a46a8313f188d34d391a834baeb1da8` +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.4/kubernetes-node-linux-arm64.tar.gz) | `a27b15a0edcfd78470db54181ea2c2c942b5d4489b6f7a4ba78bb1fac34f8fa8` +[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.6.4/kubernetes-node-linux-arm.tar.gz) | `2b4dceee70ba7b508a0acc3cc5ce072d92f9c32c1a6961911b93a5da02ace9f7` +[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.4/kubernetes-node-linux-ppc64le.tar.gz) | `c5e01f9f7de6ae2d73004bbcd288f5c942414b6639099c1bf52a98e592147745` +[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.4/kubernetes-node-linux-s390x.tar.gz) | `eded4d2b94c9c22ae6c865e32a7965c1228d564aebf90c533607c716ed89b676` +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.6.4/kubernetes-node-windows-amd64.tar.gz) | `da561264f5665fe1ae9a41999731403b147b91c3a5c47439eb828ed688b0738f` + +## Changelog since v1.6.3 + +### Other notable changes + +* Fix kubelet panic during disk eviction introduced in 1.6.3. ([#46049](https://github.com/kubernetes/kubernetes/pull/46049), [@enisoc](https://github.com/enisoc)) +* Fix pods failing to start if they specify a file as a volume subPath to mount. ([#46046](https://github.com/kubernetes/kubernetes/pull/46046), [@enisoc](https://github.com/enisoc)) + + + +# v1.6.3 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.6/examples) + +## Known Issues for v1.6.3 + +* This release introduced a regression when using [subPath](https://kubernetes.io/docs/concepts/storage/volumes/#using-subpath). + If the `subPath` is a file rather than a directory, Pods may fail to start ([#45613](https://github.com/kubernetes/kubernetes/issues/45613)). + + **Do not upgrade to v1.6.3** if your cluster may run Pods with such subPaths. + +## Downloads for v1.6.3 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.6.3/kubernetes.tar.gz) | `0af5914fcea36b3c65c8185f31e94b2839eaed52dfdd666d31dfa14534a7d69c` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.6.3/kubernetes-src.tar.gz) | `0d3cbc716b0d08bf3be779ddd096df965609b5bcb55c8b9ea084c6bb2d6ef1fd` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.6.3/kubernetes-client-darwin-386.tar.gz) | `2f2f58e8853eef7df293e579e8c94e1b6e75318b08bd1bf5747685ad8d16ebe2` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.6.3/kubernetes-client-darwin-amd64.tar.gz) | `122c20e2e92c1ed4a592c8a3851867452acff181ffe5251e8fee0ec8284704ac` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.6.3/kubernetes-client-linux-386.tar.gz) | `47c970bbe75a41634b9e5d0ae109a01f4823fdb83cf1c6c40a1ad4034b6d2764` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.3/kubernetes-client-linux-amd64.tar.gz) | `ae141e0cd011889c4468b5b8b841d8cd62c1802c4ccba4dfd8c42beaccaf7e75` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.3/kubernetes-client-linux-arm64.tar.gz) | `07a83a7f7df555e859f4f8e143274f9ed1f475d597f01d1c79e95cdfda289c94` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.6.3/kubernetes-client-linux-arm.tar.gz) | `4a0b89b4985e651a1c29590ae2ea16ea00203d7cbad7ffc8a541b8a13569e1be` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.3/kubernetes-client-linux-ppc64le.tar.gz) | `1c0116942a61580da717845c9b7fc69aa58438aaa176888cd3e57267c9c717c0` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.3/kubernetes-client-linux-s390x.tar.gz) | `94307d778e0819dc5a64e12d794e95a028207d06603204d82610f369e040ce67` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.6.3/kubernetes-client-windows-386.tar.gz) | `322d2db5dadd4b388c785d1caf651bcc76c566afb6d19e84bdf6abcc40fa19d4` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.6.3/kubernetes-client-windows-amd64.tar.gz) | `9ef35675f7cd6acb81fa69ded37174e9a55cc0f58a2f8159bfc5512230495763` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.3/kubernetes-server-linux-amd64.tar.gz) | `22eadeff9c3a45bf4d490ffca50bd257b6c282a3d16b5b8b40b8c31070a94de1` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.3/kubernetes-server-linux-arm64.tar.gz) | `2f9d976dd6d436a8258a5eb0c4a270329746f4331db607acc6b893f81f25e1c9` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.6.3/kubernetes-server-linux-arm.tar.gz) | `11f6a859438805250b84b415427df5f07d44a2a2ffb37591b6cdc6c8dc317382` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.3/kubernetes-server-linux-ppc64le.tar.gz) | `670fc921b50cca1c4fc20fbe58be640eeae766d38f6b2053b68c1a1293e88ba0` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.3/kubernetes-server-linux-s390x.tar.gz) | `c5f2358bf81ea34fc01dbe5b639f03a10b5799ad75f8465863bb5c2b797b4f0b` + +### Node Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.3/kubernetes-node-linux-amd64.tar.gz) | `428332868f42f77e02f337779a18a6332894b27f2432c5b804a8ff753895b883` +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.3/kubernetes-node-linux-arm64.tar.gz) | `a8bdefd9c0ba9a247536a5a1bb7481b7a937cf39951256be774e45b8e40250cc` +[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.6.3/kubernetes-node-linux-arm.tar.gz) | `6b5aa71b27c0524b714489de80b2100e66bef99112f452aeaedcde1f890d2916` +[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.3/kubernetes-node-linux-ppc64le.tar.gz) | `34afa6e39ff8eb8a6f8f29874b6a3e5426fa6b64cc1b0f4466b17ae0f91f71ad` +[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.3/kubernetes-node-linux-s390x.tar.gz) | `170953b40e70242249c31e32456de73dacbed54e537efa4275d273441df98f7d` +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.6.3/kubernetes-node-windows-amd64.tar.gz) | `410f175a47335b93f212cff5f3921a062ca6e945fa336d3cf0971f9bebba73e5` + +## Changelog since v1.6.2 + +### Other notable changes + +* Bump GLBC version to 0.9.3 ([#45055](https://github.com/kubernetes/kubernetes/pull/45055), [@nicksardo](https://github.com/nicksardo)) +* kubeadm: Fix invalid assign statement so it is possible to register the master kubelet with other initial Taints ([#45376](https://github.com/kubernetes/kubernetes/pull/45376), [@luxas](https://github.com/luxas)) +* Fix a bug that caused invalid Tolerations to be applied to Pods created by DaemonSets. ([#45349](https://github.com/kubernetes/kubernetes/pull/45349), [@gmarek](https://github.com/gmarek)) +* Bump cluster autoscaler to v0.5.4, which fixes scale down issues with pods ignoring SIGTERM. ([#45483](https://github.com/kubernetes/kubernetes/pull/45483), [@mwielgus](https://github.com/mwielgus)) +* Fixes and minor cleanups to pod (anti)affinity predicate ([#45098](https://github.com/kubernetes/kubernetes/pull/45098), [@wojtek-t](https://github.com/wojtek-t)) +* StatefulSet: Fix to fully preserve restart and termination order when StatefulSet is rapidly scaled up and down. ([#45113](https://github.com/kubernetes/kubernetes/pull/45113), [@kow3ns](https://github.com/kow3ns)) +* Fix some false negatives in detection of meaningful conflicts during strategic merge patch with maps and lists. ([#43469](https://github.com/kubernetes/kubernetes/pull/43469), [@enisoc](https://github.com/enisoc)) +* cluster-autoscaler: Fix duplicate writing of logs. ([#45017](https://github.com/kubernetes/kubernetes/pull/45017), [@MaciekPytel](https://github.com/MaciekPytel)) +* Fixes a bug where pods were evicted even after images are successfully deleted. ([#44986](https://github.com/kubernetes/kubernetes/pull/44986), [@dashpole](https://github.com/dashpole)) +* CRI: respect container's stopping timeout. ([#44998](https://github.com/kubernetes/kubernetes/pull/44998), [@feiskyer](https://github.com/feiskyer)) +* Fix problems with scaling up the cluster when unschedulable pods have some persistent volume claims. ([#44860](https://github.com/kubernetes/kubernetes/pull/44860), [@mwielgus](https://github.com/mwielgus)) +* Exclude nodes labeled as master from LoadBalancer / NodePort; restores documented behaviour. ([#44745](https://github.com/kubernetes/kubernetes/pull/44745), [@justinsb](https://github.com/justinsb)) +* Fix for [scaling down remaining good replicas when a failed Deployment is paused](https://github.com/kubernetes/kubernetes/issues/44436). ([#44616](https://github.com/kubernetes/kubernetes/pull/44616), [@kargakis](https://github.com/kargakis)) +* kubectl commands run inside a pod using a kubeconfig file now use the namespace specified in the kubeconfig file, instead of using the pod namespace. If no kubeconfig file is used, or the kubeconfig does not specify a namespace, the pod namespace is still used as a fallback. ([#44570](https://github.com/kubernetes/kubernetes/pull/44570), [@liggitt](https://github.com/liggitt)) +* Restored the ability of kubectl running inside a pod to consume resource files specifying a different namespace than the one the pod is running in. ([#44862](https://github.com/kubernetes/kubernetes/pull/44862), [@liggitt](https://github.com/liggitt)) +* Fix false positive "meaningful conflict" detection for strategic merge patch with integer values. ([#44788](https://github.com/kubernetes/kubernetes/pull/44788), [@enisoc](https://github.com/enisoc)) +* Fix insufficient permissions to read/write volumes when mounting them with a subPath. ([#43775](https://github.com/kubernetes/kubernetes/pull/43775), [@wongma7](https://github.com/wongma7)) +* vSphere cloud provider: Allow specifying fstype in storage class. ([#41929](https://github.com/kubernetes/kubernetes/pull/41929), [@abrarshivani](https://github.com/abrarshivani)) +* vSphere cloud provider: Allow specifying VSAN Storage Capabilities during dynamic volume provisioning. ([#42974](https://github.com/kubernetes/kubernetes/pull/42974), [@BaluDontu](https://github.com/BaluDontu)) + + + +# v1.6.2 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.6/examples) + +## Downloads for v1.6.2 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.6.2/kubernetes.tar.gz) | `240f66a98bf75246b53ef7c1fa3a2be36a92cbc173bc8626e7bc4427bef9ce6a` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.6.2/kubernetes-src.tar.gz) | `dbf19a8f2e50b3e691eeba0c418fe057f1ea8527b8c0194ba9749c12c801b24b` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.6.2/kubernetes-client-darwin-386.tar.gz) | `3b1437cbc9d10e5466c83304c54ab06f5a880e0b047e2b0ea775530ee893b6b6` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.6.2/kubernetes-client-darwin-amd64.tar.gz) | `e3dad0848b3d6c1737199d0704c692e74bf979e6a81fabea79c5b2499ca3fa73` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.6.2/kubernetes-client-linux-386.tar.gz) | `962f576e67f13f8f8afc958f89f0371c7496b2540372ef7f8e1bd0e43a67e829` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.2/kubernetes-client-linux-amd64.tar.gz) | `f8ef17b8b4bb8f6974fa2b3faa992af3c39ad318c30bdfe1efab957361d8bdfe` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.2/kubernetes-client-linux-arm64.tar.gz) | `9582e6783e7effa10b0af2f662d1bc4471bbf8205d9df07a543edb099ba7f27c` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.6.2/kubernetes-client-linux-arm.tar.gz) | `165b642ba6900f7d779bc6a27f89ccdb09eefcbb310a8bc5f6d101db27e2e9cc` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.2/kubernetes-client-linux-ppc64le.tar.gz) | `514a308ccfb978111a74b5bf843cf6862464743f0f4e2aaffada33add4c2bb0f` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.2/kubernetes-client-linux-s390x.tar.gz) | `e030593109a369bc3288c9f47703843248dbe4a9ade496f936d8cc355a874ba6` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.6.2/kubernetes-client-windows-386.tar.gz) | `a2b0053de6b62d09123d8fcc1927a8cf9ab2a5a312794a858e7b423f4ffdbe3e` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.6.2/kubernetes-client-windows-amd64.tar.gz) | `eafdaa29a70d1820be0dc181074c5788127996402bbd5af53b0b765ed244e476` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.2/kubernetes-server-linux-amd64.tar.gz) | `016bc4db69a8f90495e82fbe6e5ec9a12e56ecab58a8eb2e5471bf9cab827ad2` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.2/kubernetes-server-linux-arm64.tar.gz) | `1985596d769656d68ec692030dd31bbec8081daf52ddaef6a2a7af7d6b1f7876` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.6.2/kubernetes-server-linux-arm.tar.gz) | `e0d4c53c55de5c100973379005aabe1441004ed4213b96a6e492c88d5a9b7f49` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.2/kubernetes-server-linux-ppc64le.tar.gz) | `652a8230c4511bc30d8f3a6ae11ebeee8c6d350648d879f8f2e1aa34777323d0` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.2/kubernetes-server-linux-s390x.tar.gz) | `1eab2d36beecf4f74e3b7b74734a75faf43ed6428d312aebe2e940df4cceb5ed` + +## Changelog since v1.6.1 + +### Other notable changes + +* Fix for [Windows kubectl sending full path to binary in User Agent](https://github.com/kubernetes/kubernetes/issues/44419). ([#44622](https://github.com/kubernetes/kubernetes/pull/44622), [@monopole](https://github.com/monopole)) +* kube-apiserver now drops unneeded path information if an older version of Windows kubectl sends it. ([#44421](https://github.com/kubernetes/kubernetes/pull/44421), [@mml](https://github.com/mml)) +* CRI: Fix kubelet failing to start when using rkt. ([#44569](https://github.com/kubernetes/kubernetes/pull/44569), [@yujuhong](https://github.com/yujuhong)) +* CRI: `kubectl logs -f` now stops following when container stops, as it did pre-CRI. ([#44406](https://github.com/kubernetes/kubernetes/pull/44406), [@Random-Liu](https://github.com/Random-Liu)) +* Azure cloudprovider: Reduce the polling delay for all azure clients to 5 seconds. This should speed up some operations at the cost of some additional quota. ([#43699](https://github.com/kubernetes/kubernetes/pull/43699), [@colemickens](https://github.com/colemickens)) +* kubeadm: clean up exited containers and network checkpoints ([#43836](https://github.com/kubernetes/kubernetes/pull/43836), [@yujuhong](https://github.com/yujuhong)) +* Fix corner-case with OnlyLocal Service healthchecks. ([#44313](https://github.com/kubernetes/kubernetes/pull/44313), [@thockin](https://github.com/thockin)) +* Fix for [disabling federation controllers through override args](https://github.com/kubernetes/kubernetes/issues/42761). ([#44341](https://github.com/kubernetes/kubernetes/pull/44341), [@irfanurrehman](https://github.com/irfanurrehman)) +* Fix for [federation failing to propagate cascading deletion](https://github.com/kubernetes/kubernetes/issues/44304). ([#44108](https://github.com/kubernetes/kubernetes/pull/44108), [@csbell](https://github.com/csbell)) +* Fix for [failure to delete federation controllers with finalizers](https://github.com/kubernetes/kubernetes/issues/43828). ([#44084](https://github.com/kubernetes/kubernetes/pull/44084), [@nikhiljindal](https://github.com/nikhiljindal)) +* Fix [transition between NotReady and Unreachable taints](https://github.com/kubernetes/kubernetes/issues/43444). ([#44042](https://github.com/kubernetes/kubernetes/pull/44042), [@gmarek](https://github.com/gmarek)) +* AWS cloud provider: fix support running the master with a different AWS account or even on a different cloud provider than the nodes. ([#44235](https://github.com/kubernetes/kubernetes/pull/44235), [@mrIncompetent](https://github.com/mrIncompetent)) +* kubeadm: Make `kubeadm reset` tolerant of a disabled docker service. ([#43951](https://github.com/kubernetes/kubernetes/pull/43951), [@luxas](https://github.com/luxas)) +* Fix [broken service accounts when using dedicated service account key](https://github.com/kubernetes/kubernetes/issues/44285). ([#44169](https://github.com/kubernetes/kubernetes/pull/44169), [@mikedanese](https://github.com/mikedanese)) +* Fix for kube-proxy healthcheck handling an update that simultaneously removes one port and adds another. ([#44246](https://github.com/kubernetes/kubernetes/pull/44246), [@thockin](https://github.com/thockin)) +* Fix container hostPid settings when CRI is enabled. ([#44116](https://github.com/kubernetes/kubernetes/pull/44116), [@feiskyer](https://github.com/feiskyer)) +* RBAC role and rolebinding auto-reconciliation is now performed only when the RBAC authorization mode is enabled. ([#43813](https://github.com/kubernetes/kubernetes/pull/43813), [@liggitt](https://github.com/liggitt)) +* Fix incorrect conflict errors applying strategic merge patches to resources. ([#43871](https://github.com/kubernetes/kubernetes/pull/43871), [@liggitt](https://github.com/liggitt)) +* Fixed an issue mounting the wrong secret into pods as a service account token. ([#44102](https://github.com/kubernetes/kubernetes/pull/44102), [@ncdc](https://github.com/ncdc)) +* AWS cloud provider: allow to set KubernetesClusterID or KubernetesClusterTag in combination with VPC. ([#42512](https://github.com/kubernetes/kubernetes/pull/42512), [@scheeles](https://github.com/scheeles)) +* kubeadm: Remove hard-coded default version when fetching stable version from the web fails. Fixes [kubeadm 1.6.1 deploying 1.6.0 control plane](https://github.com/kubernetes/kubeadm/issues/224). ([#43999](https://github.com/kubernetes/kubernetes/pull/43999), [@mikedanese](https://github.com/mikedanese)) +* Fixed recognition of default storage class in DefaultStorageClass admission plugin. ([#43945](https://github.com/kubernetes/kubernetes/pull/43945), [@mikkeloscar](https://github.com/mikkeloscar)) +* Fix [Kubelet panic when Docker is not running](https://github.com/kubernetes/kubernetes/issues/44027). ([#44047](https://github.com/kubernetes/kubernetes/pull/44047), [@yujuhong](https://github.com/yujuhong)) +* Fix [vSphere volumes in SELinux environment](https://github.com/kubernetes/kubernetes/issues/42972). ([#42973](https://github.com/kubernetes/kubernetes/pull/42973), [@gnufied](https://github.com/gnufied)) +* Fix bug with error "Volume has no class annotation" when deleting a PersistentVolume. ([#43982](https://github.com/kubernetes/kubernetes/pull/43982), [@jsafrane](https://github.com/jsafrane)) + + + +# v1.6.1 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.6/examples) + +## Downloads for v1.6.1 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.6.1/kubernetes.tar.gz) | `f1634e22ee3fe8af5c355c3f53d1b93f946490addfab029e19acf5317c51cd38` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.6.1/kubernetes-src.tar.gz) | `b818f29661dd34db77d1e46c6ba98df6d35906dbc36ac1fdfe45f770b0f695c1` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.6.1/kubernetes-client-darwin-386.tar.gz) | `6eb7a0749de4c66d66630ac831f9a0aa73af9be856776c428d6adb3e07479d4a` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.6.1/kubernetes-client-darwin-amd64.tar.gz) | `05715224efdda0da3241960ec6cc71c2b008d3a53d217e5f90b159b5274db240` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.6.1/kubernetes-client-linux-386.tar.gz) | `7608a4754e48297dac8be9e863c429676f35afb97a9a10897e15038df6499a2e` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.1/kubernetes-client-linux-amd64.tar.gz) | `21e85cd3388b131fd1b63b06ea7ace8eef9555b7c558900b0cf1f9a3f2733e9a` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.1/kubernetes-client-linux-arm64.tar.gz) | `b798e4b440df52e35809310147f8678a1d9b822dce85212fcf382d19ec2bd8c3` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.6.1/kubernetes-client-linux-arm.tar.gz) | `3227e745db3986a6be9c16c8ffb4f40ce604a400c680e2e6ff92368e72a597c3` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.1/kubernetes-client-linux-ppc64le.tar.gz) | `ab7c9b2516d3cda8b4c236e00a179448e0787670cfd20c66dfb1b0c6c73ef0db` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.1/kubernetes-client-linux-s390x.tar.gz) | `9fbcb5f1b092573e5db5188689d7709a03b2bfdae635f61b5dbf72ae9dde2aaf` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.6.1/kubernetes-client-windows-386.tar.gz) | `306566c6903111769f01b0d05ba66aed63c133501adf49ef8daa38cc6a78097d` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.6.1/kubernetes-client-windows-amd64.tar.gz) | `5ca89e1672fd29a13a7cb997480216643e98afeba4d19ab081877281d0db8060` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.1/kubernetes-server-linux-amd64.tar.gz) | `3e5c7103f44f20a95db29243a43f04aca731c8a4d411c80592ea49f7550d875c` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.1/kubernetes-server-linux-arm64.tar.gz) | `3fad77963f993396786e1777aecb770572b8b06cc3fe985c688916a70ffee2fd` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.6.1/kubernetes-server-linux-arm.tar.gz) | `4b981751da6a0bf471e52e55b548d62c038f7e6d8ed628b8177389f24cfd0434` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.1/kubernetes-server-linux-ppc64le.tar.gz) | `7b4bdf49cc2510af81205f2a65653a577fc79623c76c7ed3c29c2fbe1d835773` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.1/kubernetes-server-linux-s390x.tar.gz) | `3c55f1322ca39b7acb4914dd174978b015c1124e1ddd5431ec14c97b1b45f69f` + +## Changelog since v1.6.0 + +### Other notable changes + +* Fix a deadlock in kubeadm master initialization. ([#43835](https://github.com/kubernetes/kubernetes/pull/43835), [@mikedanese](https://github.com/mikedanese)) +* Use Cluster Autoscaler 0.5.1, which fixes an issue in Cluster Autoscaler 0.5 where the cluster may be scaled up unnecessarily. Also the status of Cluster Autoscaler is now exposed in kube-system/cluster-autoscaler-status config map. ([#43745](https://github.com/kubernetes/kubernetes/pull/43745), [@mwielgus](https://github.com/mwielgus)) + + + +# v1.6.0 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.6/examples) + +## Downloads for v1.6.0 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.6.0/kubernetes.tar.gz) | `e89318b88ea340e68c427d0aad701e544ce2291195dc1d5901222e7bae48f03b` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.6.0/kubernetes-src.tar.gz) | `0b03d27e1c7af3be5d94ecd5f679e5f55588d801376cf1ae170d9ec0a229b1e2` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.6.0/kubernetes-client-darwin-386.tar.gz) | `274277a67a85e9081d9fee5e763ed7c3dd096acf641c31a9ccc916a3981fead2` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.6.0/kubernetes-client-darwin-amd64.tar.gz) | `af8d1aa034721b31fd14f7b93f5ef16f8dbac4fdcd9e312c3c61e6cf03295057` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.6.0/kubernetes-client-linux-386.tar.gz) | `4c6a3c12f131c3c88612f888257d00a3cc7fef67947757b897b0d8be9fab547c` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.0/kubernetes-client-linux-amd64.tar.gz) | `4a5daf0459dffc24bf0ccbb2fc881f688008e91ae41fde961b81d09b0801004c` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.0/kubernetes-client-linux-arm64.tar.gz) | `91d5e31407140a55cf00c0dc6e20aa8433cc918615dedd842637585e81694ebd` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.6.0/kubernetes-client-linux-arm.tar.gz) | `985fecd7fb94b42c25b8a56efde1831b2616a6792d3d5a02549248e01ce524ed` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.0/kubernetes-client-linux-ppc64le.tar.gz) | `303279f935289cadfb97a6a5d3f58b0da67d1b88b5ed049e6a98fc203b7b9d52` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.0/kubernetes-client-linux-s390x.tar.gz) | `2bd216c6b7d4f09de02c3b5d20021124f7d04f483ab600b291c515386003ca74` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.6.0/kubernetes-client-windows-386.tar.gz) | `11d5459b0d413a25045c55ce3548d30616ddc2d62451280d3299baa9f3e3e014` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.6.0/kubernetes-client-windows-amd64.tar.gz) | `84eba6f2b2b82a95397688b1e2ca4deb8d7daf1f8a40919fa0312741ca253799` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.0/kubernetes-server-linux-amd64.tar.gz) | `3625b63d573aa4d28eaa30b291017f775f2ddc0523f40d25023ad1da9c30390e` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.0/kubernetes-server-linux-arm64.tar.gz) | `906496c985d4d836466b73e1c9e618ea8ce07f396aba3a96edcdc6045e0ab4e3` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.6.0/kubernetes-server-linux-arm.tar.gz) | `3b63f481156f57729bc8100566d8b3d7856791e5b36bb70042e17d21f11f8d5d` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.0/kubernetes-server-linux-ppc64le.tar.gz) | `382666b3892fd4d89be5e4bb052dd0ef0d1c1d213c1ae7a92435083a105064fd` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.0/kubernetes-server-linux-s390x.tar.gz) | `e15de8896bd84a9b74756adc1a2e20c6912a65f6ff0a3f3dfabc8b463e31d19b` + +## WARNING: etcd backup strongly recommended + +Before updating to 1.6, you are strongly recommended to back up your etcd data. +Please consult the installation procedure you are using (kargo, kops, kube-up, +kube-aws, kubeadm etc) for specific advice. + +1.6 encourages etcd3, and switching from etcd2 to etcd3 involves a full +migration of data between different storage engines. You must stop the API +from writing to etcd during an etcd2 -> etcd3 migration. HA installations cannot +be migrated at the current time using the official Kubernetes procedure. + +1.6 will also default to protobuf encoding if using etcd3. **This change is +irreversible.** To rollback, you must restore from a backup made before the +protobuf/etcd3 switch, and any changes since the backup will be lost. As 1.5 +does not support protobuf encoding, if you roll back to 1.5 after upgrading to +protobuf you will be forced to restore from backup, and you will lose any changes +since you converted to protobuf. After conversion to protobuf, you should +validate the correct operation of your cluster thoroughly before returning it +to normal operation. + +Backups are always a good precaution, particularly around upgrades, but this +upgrade has multiple known issues where the only remedy is to restore from +backup. + +Also, please note: +- using `application/vnd.kubernetes.protobuf` as the media storage type for 1.6 is default but not required +- the ability to rollback to etcd2 can be preserved by setting the storage media type flag on `kube-apiserver` + + ``` + --storage-media-type application/json + ``` + + to continue to use `application/json` as the storage media type which can be changed to + `application/vnd.kubernetes.protobuf` at a later time. + +## Major updates and release themes + +* Kubernetes now supports up to 5,000 nodes via etcd v3, which is enabled by default. +* [Role-based access control (RBAC)](https://kubernetes.io//docs/admin/authorization/rbac) has graduated to beta, and defines secure default roles for control plane, node, and controller components. +* The [`kubeadm` cluster bootstrap tool](https://kubernetes.io/docs/getting-started-guides/kubeadm/) has graduated to beta. Some highlights: + * **WARNING:** A [known issue](https://github.com/kubernetes/kubernetes/issues/43815) + in v1.6.0 causes `kubeadm init` to hang. Please use v1.6.1, which fixes the issue. + * All communication is now over TLS + * Authorization plugins can be installed by kubeadm, including the new default of RBAC + * The bootstrap token system now allows token management and expiration +* The [`kubefed` federation bootstrap tool](https://kubernetes.io/docs/tutorials/federation/set-up-cluster-federation-kubefed/) has also graduated to beta. +* Interaction with container runtimes is now through the CRI interface, enabling easier integration of runtimes with the kubelet. Docker remains the default runtime via Docker-CRI (which moves to beta). + * **WARNING:** A [known issue](https://github.com/kubernetes/kubernetes/issues/44041) + in v1.6.0 causes `Pod.Spec.HostPid` (using the host PID namespace for the pod) to always + be false. Please wait for v1.6.2, which will include a fix for this issue. +* Various scheduling features have graduated to beta: + * You can now use [multiple schedulers](https://kubernetes.io/docs/tutorials/clusters/multiple-schedulers/) + * [Nodes](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature) and [pods](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) now support affinity and anti-affinity + * Advanced scheduling can be performed with [taints and tolerations](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature) +* You can now specify (per pod) how long a pod should stay bound to a node, when there is a node problem. +* Various storage features have graduated to GA: + * StorageClass pre-installed and set as default on Azure, AWS, GCE, OpenStack, and vSphere + * Configurable [Dynamic Provisioning](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#dynamic) and [StorageClass](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#storageclasses) +* DaemonSets [can now be updated by a rolling update](https://kubernetes.io/docs/tasks/manage-daemon/update-daemon-set). + +## Action Required + +### Certificates API +* Users of the alpha certificates API should delete v1alpha1 CSRs from the API before upgrading and recreate them as v1beta1 CSR after upgrading. ([#39772](https://github.com/kubernetes/kubernetes/pull/39772), [@mikedanese](https://github.com/mikedanese)) + +### Cluster Autoscaler +* If you are using (or planning to use) Cluster Autoscaler please wait for Kubernetes 1.6.1. In 1.6.0 Cluster Autoscaler +may occasionally increase the size of the cluster a bit more than it is actually needed, when there are +unschedulable pods, scale up is required and cloud provider is slow to set up networking for new nodes. +Anyway, the cluster should get back to the proper size after 10 min. + +### Deployment +* Deployment now fully respects ControllerRef to avoid fighting over Pods and ReplicaSets. At the time of upgrade, **you must not have Deployments with selectors that overlap**, or else [ownership of ReplicaSets may change](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md#upgrading). ([#42175](https://github.com/kubernetes/kubernetes/pull/42175), [@enisoc](https://github.com/enisoc)) + +### Federation +* The --dns-provider argument of 'kubefed init' is now mandatory and does not default to `google-clouddns`. To initialize a Federation control plane with Google Cloud DNS, use the following invocation: 'kubefed init --dns-provider=google-clouddns' ([#42092](https://github.com/kubernetes/kubernetes/pull/42092), [@marun](https://github.com/marun)) +* Cluster federation servers have changed the location in etcd where federated services are stored, so existing federated services must be deleted and recreated. Before upgrading, export all federated services from the federation server and delete the services. After upgrading the cluster, recreate the federated services from the exported data. ([#37770](https://github.com/kubernetes/kubernetes/pull/37770), [@enj](https://github.com/enj)) + +### Internal Storage Layer +* upgrade to etcd3 prior to upgrading to 1.6 **OR** explicitly specify `--storage-backend=etcd2 --storage-media-type=application/json` when starting the apiserver + +### Node Components +* **Kubelet with the Docker-CRI implementation** + * The Docker-CRI implementation is enabled by default. + * It is not compatible with containers created by older Kubelets. It is + recommended to drain your node before upgrade. If you choose to perform + an in-place upgrade, the Kubelet will automatically restart all + Kubernetes-managed containers on the node. + * It is not compatible with CNI plugins that do not conform to the + [error handling behavior in the spec](https://github.com/containernetworking/cni/blob/master/SPEC.md#network-configuration-list-error-handling). + The plugins are being updated to resolve this issue ([#43488](https://github.com/kubernetes/kubernetes/issues/43488)). + You can disable CRI explicitly (`--enable-cri=false`) as a + temporary workaround. + * The standard `bridge` plugin have been validated to interoperate with + the new CRI + CNI code path. + * If you are using plugins other than `bridge`, make sure you have + updated custom plugins to the latest version that is compatible. +* **CNI plugins now affect node readiness** + * Kubelet will now block node readiness until a CNI configuration file is + present in `/etc/cni/net.d` or a given custom CNI configuration path. + [This change](https://github.com/kubernetes/kubernetes/pull/43474) ensures + kubelet does not start pods that require networking before + [networking is ready](https://github.com/kubernetes/kubernetes/issues/43014). + This change may require changes to clients that gate pod creation and/or + scheduling on the node condition `type` `Ready` `status` being `True` for pods + that need to run prior to the network being ready. +* **Enhance Kubelet QoS**: + * Pods are placed under a new cgroup hierarchy by default. This feature requires + draining and restarting the node as part of upgrades. To opt-out set + `--cgroups-per-qos=false`. + * If `kube-reserved` and/or `system-reserved` are specified, node allocatable + will be enforced on all pods by default. To opt-out set + `--enforce-node-allocatable=””` + * Hard Eviction Thresholds will be subtracted from Capacity while calculating + Node Allocatable. This will result in a reduction of schedulable capacity in + clusters post upgrade where kubelet hard eviction has been turned on for + memory. To opt-out set `--experimental-allocatable-ignore-eviction=true`. + * More details on these feature here: + https://kubernetes.io/docs/concepts/cluster-administration/node-allocatable/ +* Drop the support for docker 1.9.x. Docker versions 1.10.3, 1.11.2, 1.12.6 + have been validated. +* The following deprecated kubelet flags are removed: `--config`, `--auth-path`, + `--resource-container`, `--system-container`, `--reconcile-cidr` +* Remove the temporary fix for pre-1.0 mirror pods. Upgrade directly from + pre-1.0 to 1.6 kubelet is not supported. +* Fluentd was migrated to Daemon Set, which targets nodes with + beta.kubernetes.io/fluentd-ds-ready=true label. If you use fluentd in your + cluster please make sure that the nodes with version 1.6+ contains this + label. + +### kubectl +* Running `kubectl taint` (alpha in 1.5) against a 1.6 server requires upgrading kubectl to version 1.6 +* Running `kubectl taint` (alpha in 1.5) against a 1.5 server requires a kubectl version of 1.5 +* Running `kubectl create secret` no longer accepts passing multiple values to a single --from-literal flag using comma separation + * Update command invocations to pass separate --from-literal flags for each value + +### RBAC +* Default ClusterRole and ClusterRoleBinding objects are automatically updated at server start to add missing permissions and subjects (extra permissions and subjects are left in place). To prevent autoupdating a particular role or rolebinding, annotate it with `rbac.authorization.kubernetes.io/autoupdate=false`. ([#41155](https://github.com/kubernetes/kubernetes/pull/41155), [@liggitt](https://github.com/liggitt)) +* `v1beta1` RoleBinding/ClusterRoleBinding subjects changed `apiVersion` to `apiGroup` to fully-qualify a subject. ServiceAccount subjects default to an apiGroup of `""`, User and Group subjects default to an apiGroup of `"rbac.authorization.k8s.io"`. ([#41184](https://github.com/kubernetes/kubernetes/pull/41184), [@liggitt](https://github.com/liggitt)) +* To create or update an RBAC RoleBinding or ClusterRoleBinding object, a user must: ([#39383](https://github.com/kubernetes/kubernetes/pull/39383), [@liggitt](https://github.com/liggitt)) + * 1. Be authorized to make the create or update API request + * 2. Be allowed to bind the referenced role, either by already having all of the permissions contained in the referenced role, or by having the "bind" permission on the referenced role. +* The `--authorization-rbac-super-user` flag (alpha in 1.5) is deprecated; the `system:masters` group has privileged access ([#38121](https://github.com/kubernetes/kubernetes/pull/38121), [@deads2k](https://github.com/deads2k)) +* special handling of the user `*` in RoleBinding and ClusterRoleBinding objects is removed in v1beta1. To match all users, explicitly bind to the group `system:authenticated` and/or `system:unauthenticated`. Existing v1alpha1 bindings to the user `*` are automatically converted to the group `system:authenticated`. ([#38981](https://github.com/kubernetes/kubernetes/pull/38981), [@liggitt](https://github.com/liggitt)) + +### Scheduling +* **Multiple schedulers** + * Modify your PodSpecs that currently use the `scheduler.alpha.kubernetes.io/name` annotation on Pod, to instead use the `schedulerName` field in the PodSpec. + * Modify any custom scheduler(s) you have written so that they read the `schedulerName` field on Pod instead of the `scheduler.alpha.kubernetes.io/name` annotation. + * Note that you can only start using the `schedulerName` field **after** you upgrade to 1.6; it is not recognized in 1.5. + +* **Node affinity/anti-affinity and pod affinity/anti-affinity** + * You can continue to use the alpha version of this feature (with one caveat -- see below), in which you specify affinity requests using Pod annotations, in 1.6 by including `AffinityInAnnotations=true` in `--feature-gates`, such as `--feature-gates=FooBar=true,AffinityInAnnotations=true`. Otherwise, you must modify your PodSpecs that currently use the `scheduler.alpha.kubernetes.io/affinity` annotation on Pod, to instead use the `affinity` field in the PodSpec. Support for the annotation will be removed in a future release, so we encourage you to switch to using the field as soon as possible. + * Caveat: The alpha version no longer supports, and the beta version does not support, the "empty `podAffinityTerm.namespaces` list means all namespaces" behavior. In both alpha and beta it now means "same namespace as the pod specifying this affinity rule." + * Note that you can only start using the `affinity` field **after** you upgrade to 1.6; it is not recognized in 1.5. + * The `--failure-domains` scheduler command line-argument is not supported in the beta version of the feature. + +* **Taints** + * You will need to use `kubectl taint` to re-create all of your taints after kubectl and the master are upgraded to 1.6. Between the time the master is upgraded to 1.6 and when you do this, your existing taints will have no effect. + * You can find out what taints you have in place on a node while you are still running Kubernetes 1.5 by doing `kubectl describe node <node name>`; the `Taints` section will show the taints you have in place. To see the taints that were created under 1.5 when you are running 1.6, do `kubectl get node <node name> -o yaml` and look for the "Annotation" section with the annotation key `scheduler.alpha.kubernetes.io/taints` + * You can remove the "old" taints (stored internally as annotations) at any time after the upgrade by doing `kubectl annotate nodes <node name> scheduler.alpha.kubernetes.io/taints-` (note the minus at the end, which means "delete the taint with this key") + * Note that because any taints you might have created with Kubernetes 1.5 can only affect the scheduling of new pods (the `NoExecute` taint effect is introduced in 1.6), neither the master upgrade nor your running `kubectl taint` to re-create the taints will affect pods that are already running. + * Rescheduler relies on taints, which were changed in a backward incompatible way. Rescheduler 0.3 shipped together with Kubernetes 1.6 understands the new taints and will clean up the old annotations, but Rescheduler 0.2 shipped together with Kubernetes 1.5 doesn't understand the new taints. In order to avoid eviction loop during 1.5->1.6 upgrade you need to either upgrade the master node atomically (for example by using `upgrade.sh` script for GCE) or ensure that the rescheduler is upgraded first, then the scheduler and then all the other master components. + +* **Tolerations** + * After your master is upgraded to 1.6, you will need to update your PodSpecs to set the `tolerations` field of the PodSpec and remove the `scheduler.alpha.kubernetes.io/tolerations` annotation on the Pod. (It's not strictly necessary to remove the annotation, as it will have no effect once you upgrade to 1.6.) Between the time the master is upgraded to 1.6 and when you do this, tolerations attached to Pods that are created will have no effect. Pods that are already running will not be affected by the upgrade. + * You can find the PodSpec tolerations that were created as annotations (if any) in a controller definition by doing `kubectl get <controller kind> <controller name> -o yaml` and looking for the "Annotation" section with the annotation key `scheduler.alpha.kubernetes.io/tolerations` (This will work whether you are running Kubernetes 1.5 or 1.6). + * To update a controller's PodSpec to use the field instead of the annotation, use one of the kubectl commands that do update ("kubectl replace" or "kubectl apply" or "kubectl patch") or just delete the controller entirely and re-create it with a new pod template. Note that you will be able to do these things only after the upgrade. + +### Service +* The 'endpoints.beta.kubernetes.io/hostnames-map' annotation is no longer supported. Users can use the 'Endpoints.subsets[].addresses[].hostname' field instead. ([#39284](https://github.com/kubernetes/kubernetes/pull/39284), [@bowei](https://github.com/bowei)) + +### StatefulSet +* StatefulSet now respects ControllerRef to avoid fighting over Pods. At the time of upgrade, **you must not have StatefulSets with selectors that overlap** with any other controllers (such as ReplicaSets), or else [ownership of Pods may change](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md#upgrading). ([#42080](https://github.com/kubernetes/kubernetes/pull/42080), [@enisoc](https://github.com/enisoc)) + +### Volumes +* StorageClass pre-installed and set as default on Azure, AWS, GCE, OpenStack, and vSphere. + * This is something to pay close attention to if you’ve been using Kubernetes for a while, because it changes the default behavior of PersistentVolumeClaim objects on these clouds. + * Marking a StorageClass as default makes it so that even a PersistentVolumeClaim without a StorageClass specified will trigger dynamic provisioning (instead of binding to an existing pool of PVs). + * If you depend on the old behavior of volumes binding to existing pool of PersistentVolume objects then modify the StorageClass object and set `storageclass.beta.kubernetes.io/is-default-class` to `false`. +* Flex volume plugin is updated to support attach/detach interfaces. It broke backward compatibility. Please update your drivers and implement the new callouts. ([#41804](https://github.com/kubernetes/kubernetes/pull/41804), [@chakri-nelluri](https://github.com/chakri-nelluri)) + +## Notable Features +Features for this release were tracked via the use of the [kubernetes/features](https://github.com/kubernetes/features) issues repo. Each Feature issue is owned by a Special Interest Group from the [kubernetes/community](https://github.com/kubernetes/community/blob/master/sig-list.md). + +### Autoscaling +* **[alpha]** The Horizontal Pod Autoscaler now supports drawing metrics through the API server aggregator. +* **[alpha]** The Horizontal Pod Autoscaler now supports scaling on multiple, custom metrics. +* Cluster Autoscaler publishes its status to kube-system/cluster-autoscaler-status ConfigMap. +* Cluster Autoscaler can continue operations while some nodes are broken or unready. +* Cluster Autoscaler respects Pod Disruption Budgets when removing a node. + +### DaemonSet +* **[beta]** Introduce the rolling update feature for DaemonSet. See [Performing a Rolling Update on a DaemonSet](https://kubernetes.io/docs/tasks/manage-daemon/update-daemon-set/). + +### Deployment +* **[beta]** Deployments that cannot make progress in rolling out the newest version will now indicate via the API they are blocked ([docs](https://kubernetes.io/docs/user-guide/deployments/#deployment-status)) + +### Federation +* **[beta]** `kubefed` has graduated to beta: supports hosting federation on on-prem clusters, automatically configures `kube-dns` in joining clusters and allows passing arguments to federation components. + +### Internal Storage Layer +* **[stable]** The internal storage layer for kubernetes cluster state has been updated to use etcd v3 by default. Existing clusters will have to plan for a data migration window. ([docs](https://kubernetes.io/docs/tasks/administer-cluster/upgrade-1-6/))([kubernetes/features#44](https://github.com/kubernetes/features/issues/44)) + +### kubeadm +* **[beta]** Introduces an API for clients to request TLS certificates from the API server. See the [tutorial](https://kubernetes.io/docs/tasks/tls/managing-tls-in-a-cluster). +* **[beta]** kubeadm is enhanced and improved with a baseline feature set and command line flags that are now marked as beta. Other parts of kubeadm, including subcommands under `kubeadm alpha`, are [still in alpha](https://kubernetes.io/docs/admin/kubeadm/). Using it is considered safe, although note that upgrades and HA are not yet supported. Please [try it out](https://kubernetes.io/docs/getting-started-guides/kubeadm/) and [give us feedback](https://kubernetes.io/docs/getting-started-guides/kubeadm/#feedback)! +* **[alpha]** New Bootstrap Token authentication and management method. Works well with kubeadm. kubeadm now supports managing tokens, including time based expiration, after the cluster is launched. See [kubeadm reference docs](https://kubernetes.io/docs/admin/kubeadm/#manage-tokens) for details. +* **[alpha]** Adds a new cloud-controller-manager binary that may be used for testing the new out-of-core cloudprovider flow. + +### Node Components +* **[stable]** Init containers have graduated to GA and now appear as a field. + The beta annotation value will still be respected and overrides the field + value. +* Kubelet Container Runtime Interface (CRI) support + - **[beta]** The Docker-CRI implementation is enabled by default in kubelet. + You can disable it by --enable-cri=false. See + [notes on the new implementation](https://github.com/kubernetes/community/blob/master/contributors/devel/container-runtime-interface.md#kubernetes-v16-release-docker-cri-integration-beta) + for more details. + - **[alpha]** Alpha support for other runtimes: + [cri-o](https://github.com/kubernetes-incubator/cri-o/releases/tag/v0.1), [frakti](https://github.com/kubernetes/frakti/releases/tag/v0.1), [rkt](https://github.com/coreos/rkt/issues?q=is%3Aopen+is%3Aissue+label%3Aarea%2Fcri). +* **[beta]** Node Problem Detector is beta (v0.3.0) now. New + features added into node-problem-detector:v0.3.0: + - Add support for journald. + - The ability to monitor any system daemon logs. Previously only kernel + logs were supported. + - The ability to be deployed and run as a native daemon. +* **[alpha]** Critical Pods: When feature gate "ExperimentalCriticalPodAnnotation" is + set to true, the system will guarantee scheduling and admission of pods with + the following annotation - `scheduler.alpha.kubernetes.io/critical-pod` + - This feature should be used in conjunction with the + [rescheduler](https://kubernetes.io/docs/admin/rescheduler/) to guarantee + resource availability for critical system pods. +* **[alpha]** `--experimental-nvidia-gpus` flag is replaced by `Accelerators` alpha + feature gate along with addition of support for multiple Nvidia GPUs. + - To use GPUs, pass `Accelerators=true` as part of `--feature-gates` flag. + - More information [here](https://vishh.github.io/docs/user-guide/gpus/). +* A pod’s Quality of Service Class is now available in its Status. +* Upgrade cAdvisor library to v0.25.0. Notable changes include, + - Container filesystem usage tracking disabled for device mapper due to excessive + IOPS. + - Ignore `.mount` cgroups, fixing disappearing stats. +* A new field `terminationMessagePolicy` has been added to containers that allows + a user to request FallbackToLogsOnError, which will read from the container's + logs to populate the termination message if the user does not write to the + termination message log file. The termination message file is now properly + readable for end users and has a maximum size (4k bytes) to prevent abuse. + Each pod may have up to 12k bytes of termination messages before the contents + of each will be truncated. +* Do not delete pod objects until all its compute resource footprint has been + reclaimed. + - This feature prevents the node and scheduler from oversubscribing resources + that are still being used by a pod in the process of being cleaned up. + - This feature can result in increase of Pod Deletion latency especially if the + pod has a large filesystem footprint. + +### RBAC +* **[beta]** RBAC API is promoted to v1beta1 (rbac.authorization.k8s.io/v1beta1), and defines default roles for control plane, node, and controller components. +* **[beta]** The Docker-CRI implementation is Beta and is enabled by default in kubelet. You can disable it by `--enable-cri=false`. See [notes on the new implementation]( https://github.com/kubernetes/community/blob/master/contributors/devel/container-runtime-interface.md#kubernetes-v16-release-docker-cri-integration-beta) for more details. + +### Scheduling +- **[beta]** The [multiple schedulers](https://kubernetes.io/docs/tutorials/clusters/multiple-schedulers/). This feature allows you to run multiple schedulers in parallel, each responsible for different sets of pods. When using multiple schedulers, the scheduler name is now specified in a new-in-1.6 `schedulerName` field of the PodSpec rather than using the `scheduler.alpha.kubernetes.io/name` annotation on the Pod. When you upgrade to 1.6, the Kubernetes default scheduler will start using the `schedulerName` field of the PodSpec and will ignore the annotation. +- **[beta]** [Node affinity/anti-affinity](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) and **[beta]** [pod affinity/anti-affinity](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/). Node affinity/anti-affinity allow you to specify rules for restricting which node(s) a pod can schedule onto, based on the labels on the node. Pod affinity/anti-affinity allow you to specify rules for spreading and packing pods relative to one another, across arbitrary topologies (node, zone, etc.) These affinity rules are now be specified in a new-in-1.6 `affinity` field of the PodSpec. Kubernetes 1.6 continues to support the alpha `scheduler.alpha.kubernetes.io/affinity` annotation on the Pod if you explicitly enable the alpha feature "AffinityInAnnotations", but it will be removed in a future release. When you upgrade to 1.6, if you have not enabled the alpha feature, then the scheduler will use the `affinity` field in PodSpec and will ignore the annotation. If you have enabled the alpha feature, then the scheduler will use the `affinity` field in PodSpec if it is present, and otherwise will use the annotation. +- **[beta]** [Taints and tolerations](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/). This feature allows you to specify rules for "repelling" pods from nodes by default, which enables use cases like dedicated nodes and reserving nodes with special features for pods that need those features. We've also added a `NoExecute` taint type that evicts already-running pods, and an associated `tolerationSeconds` field to tolerations to delay the eviction for a specified amount of time. As before, taints are created using `kubectl taint` (but internally they are now represented as a field `taints` in the NodeSpec rather than using the `scheduler.alpha.kubernetes.io/taints` annotation on Node). Tolerations are now specified in a new-in-1.6 `tolerations` field of the PodSpec rather than using the `scheduler.alpha.kubernetes.io/tolerations` annotation on the Pod. When you upgrade to 1.6, the scheduler will start using the fields and will ignore the annotations. +- **[alpha]** Represent node problems "not ready" and "unreachable" using `NoExecute` taints. In combination with `tolerationSeconds` described below, this allows per-pod specification of how long to remain bound to a node that becomes unreachable or not ready, rather than using the default of 5 minutes. You can enable this alpha feature by including `TaintBasedEvictions=true` in `--feature-gates`, such as `--feature-gates=FooBar=true,TaintBasedEvictions=true`. Documentation is [here](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/). + +### Service Catalog +- **[alpha]** Adds a new API resource `PodPreset` and admission controller to enable defining cross-cutting injection of Volumes and Environment into Pods. + +### Volumes +* **[stable]** StorageClass API is promoted to v1 (storage.k8s.io/v1). +* **[stable]** Default storage classes are deployed during installation on Azure, AWS, GCE, OpenStack and vSphere. +* **[stable]** Added ability to populate environment variables from a configmap or secret. +* **[stable]** Support for user-written/run dynamic PV provisioners. The Kubernetes Incubator contains [a golang library and examples](https://github.com/kubernetes-incubator/external-storage). +* **[stable]** Volume plugin for ScaleIO enabling pods to seamlessly access and use data stored on Dell EMC ScaleIO volumes. +* **[stable]** Volume plugin for Portworx added capability to use [Portworx](http://www.portworx.com) as a storage provider for Kubernetes clusters. Portworx pools server capacity and turns servers or cloud instances into converged, highly available compute and storage nodes. +* **[stable]** Add support to use NFSv3, NFSv4, and GlusterFS on GCE/GKE GCI image based clusters. +* **[beta]** Added support for mount options in persistent volumes. +* **[alpha]** All in one volume proposal - a new volume driver capable of projecting secrets, configmaps, and downward API items into the same directory. +* **[alpha]** Flex volume API and Improved lifecycle (flexvolume). + +## Deprecations +* Remove extensions/v1beta1 Jobs resource, and job/v1beta1 generator. ([#38614](https://github.com/kubernetes/kubernetes/pull/38614), [@soltysh](https://github.com/soltysh)) +* `federation/deploy/deploy.sh` was an interim solution introduced in Kubernetes v1.4 to simplify the federation control plane deployment experience. Now that we have `kubefed`, we are deprecating `deploy.sh` scripts. ([#38902](https://github.com/kubernetes/kubernetes/pull/38902), [@madhusudancs](https://github.com/madhusudancs)) + + +### Cluster Provisioning Scripts +* The bash AWS deployment via kube-up.sh has been deprecated. See http://kubernetes.io/docs/getting-started-guides/aws/ for alternatives. ([#38772](https://github.com/kubernetes/kubernetes/pull/38772), [@zmerlynn](https://github.com/zmerlynn)) +* Remove Azure kube-up as the Azure community has focused efforts elsewhere. ([#41672](https://github.com/kubernetes/kubernetes/pull/41672), [@mikedanese](https://github.com/mikedanese)) +* Remove the deprecated vsphere kube-up. ([#39140](https://github.com/kubernetes/kubernetes/pull/39140), [@kerneltime](https://github.com/kerneltime)) + +### kubeadm +* Quite a few flags been renamed or removed. Those options that are removed as flags can still be accessed via the config file. Most notably this includes external etcd settings and the option for setting the cloud provider on the API server. The [kubeadm reference documentation](https://kubernetes.io/docs/admin/kubeadm/) is up to date with the new flags. + +### Other Deprecations +* Remove cmd/kube-discovery from the tree since it's not necessary anymore ([#42070](https://github.com/kubernetes/kubernetes/pull/42070), [@luxas](https://github.com/luxas)) + +## Changes to API Resources +### ABAC +* ABAC policies using `"user":"*"` or `"group":"*"` to match all users or groups will only match authenticated requests. To match unauthenticated requests, ABAC policies must explicitly specify `"group":"system:unauthenticated"` ([#38968](https://github.com/kubernetes/kubernetes/pull/38968), [@liggitt](https://github.com/liggitt)) + +### Admission Control +* Adds a new API resource `PodPreset` and admission controller to enable defining cross-cutting injection of Volumes and Environment into Pods. ([#41931](https://github.com/kubernetes/kubernetes/pull/41931), [@jessfraz](https://github.com/jessfraz)) +* Enable DefaultTolerationSeconds admission controller by default ([#41815](https://github.com/kubernetes/kubernetes/pull/41815), [@kevin-wangzefeng](https://github.com/kevin-wangzefeng)) +* ResourceQuota ability to support default limited resources ([#36765](https://github.com/kubernetes/kubernetes/pull/36765), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* Add defaultTolerationSeconds admission controller ([#41414](https://github.com/kubernetes/kubernetes/pull/41414), [@kevin-wangzefeng](https://github.com/kevin-wangzefeng)) +* An `automountServiceAccountToken` field was added to ServiceAccount and PodSpec objects. If set to `false` on a pod spec, no service account token is automounted in the pod. If set to `false` on a service account, no service account token is automounted for that service account unless explicitly overridden in the pod spec. ([#37953](https://github.com/kubernetes/kubernetes/pull/37953), [@liggitt](https://github.com/liggitt)) +* Admission control support for versioned configuration files ([#39109](https://github.com/kubernetes/kubernetes/pull/39109), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* Ability to quota storage by storage class ([#34554](https://github.com/kubernetes/kubernetes/pull/34554), [@derekwaynecarr](https://github.com/derekwaynecarr)) + +### Authentication +* The authentication.k8s.io API group was promoted to v1([#41058](https://github.com/kubernetes/kubernetes/pull/41058), [@liggitt](https://github.com/liggitt)) + +### Authorization +* The authorization.k8s.io API group was promoted to v1 ([#40709](https://github.com/kubernetes/kubernetes/pull/40709), [@liggitt](https://github.com/liggitt)) +* The SubjectAccessReview API now passes subresource and resource name information to the authorizer to answer authorization queries. ([#40935](https://github.com/kubernetes/kubernetes/pull/40935), [@liggitt](https://github.com/liggitt)) + +### Autoscaling +* Introduces an new alpha version of the Horizontal Pod Autoscaler including expanded support for specifying metrics. ([#36033](https://github.com/kubernetes/kubernetes/pull/36033), [@DirectXMan12](https://github.com/DirectXMan12) +* HorizontalPodAutoscaler is no longer supported in extensions/v1beta1 version. Use autoscaling/v1 instead. ([#35782](https://github.com/kubernetes/kubernetes/pull/35782), [@piosz](https://github.com/piosz)) +* Fixes an HPA-related panic due to division-by-zero. ([#39694](https://github.com/kubernetes/kubernetes/pull/39694), [@DirectXMan12](https://github.com/DirectXMan12)) + +### Certificates +* The CertificateSigningRequest API added the `extra` field to persist all information about the requesting user. This mirrors the fields in the SubjectAccessReview API used to check authorization. ([#41755](https://github.com/kubernetes/kubernetes/pull/41755), [@liggitt](https://github.com/liggitt)) +* Native support for token based bootstrap flow. This includes signing a well known ConfigMap in the `kube-public` namespace and cleaning out expired tokens. ([#36101](https://github.com/kubernetes/kubernetes/pull/36101), [@jbeda](https://github.com/jbeda)) + +### ConfigMap +* Volumes and environment variables populated from ConfigMap and Secret objects can now tolerate the named source object or specific keys being missing, by adding `optional: true` to the volume or environment variable source specifications. ([#39981](https://github.com/kubernetes/kubernetes/pull/39981), [@fraenkel](https://github.com/fraenkel)) +* Allow pods to define multiple environment variables from a whole ConfigMap ([#36245](https://github.com/kubernetes/kubernetes/pull/36245), [@fraenkel](https://github.com/fraenkel)) + +### CronJob +* Add configurable limits to CronJob resource to specify how many successful and failed jobs are preserved. ([#40932](https://github.com/kubernetes/kubernetes/pull/40932), [@peay](https://github.com/peay)) + +### DaemonSet +* DaemonSet now respects ControllerRef to avoid fighting over Pods. ([#42173](https://github.com/kubernetes/kubernetes/pull/42173), [@enisoc](https://github.com/enisoc)) +* Make DaemonSet respect critical pods annotation when scheduling. ([#42028](https://github.com/kubernetes/kubernetes/pull/42028), [@janetkuo](https://github.com/janetkuo)) +* Implement the update feature for DaemonSet. ([#41116](https://github.com/kubernetes/kubernetes/pull/41116), [@lukaszo](https://github.com/lukaszo)) +* Make DaemonSets survive taint-based evictions when nodes turn unreachable/notReady. ([#41896](https://github.com/kubernetes/kubernetes/pull/41896), [@kevin-wangzefeng](https://github.com/kevin-wangzefeng)) +* Make DaemonSet controller respect node taints and pod tolerations. ([#41172](https://github.com/kubernetes/kubernetes/pull/41172), [@janetkuo](https://github.com/janetkuo)) +* DaemonSet controller actively kills failed pods (to recreate them) ([#40330](https://github.com/kubernetes/kubernetes/pull/40330), [@janetkuo](https://github.com/janetkuo)) +* DaemonSet ObservedGeneration ([#39157](https://github.com/kubernetes/kubernetes/pull/39157), [@lukaszo](https://github.com/lukaszo)) + +### Deployment +* Add ready replicas in Deployments ([#37959](https://github.com/kubernetes/kubernetes/pull/37959), [@kargakis](https://github.com/kargakis)) +* Deployments that cannot make progress in rolling out the newest version will now indicate via the API they are blocked +* Introduce apps/v1beta1.Deployments resource with modified defaults compared to extensions/v1beta1.Deployments. ([#39683](https://github.com/kubernetes/kubernetes/pull/39683), [@soltysh](https://github.com/soltysh)) +* Introduce new generator for apps/v1beta1 deployments ([#42362](https://github.com/kubernetes/kubernetes/pull/42362), [@soltysh](https://github.com/soltysh)) + +### Node +* Set all node conditions to Unknown when node is unreachable ([#36592](https://github.com/kubernetes/kubernetes/pull/36592), [@andrewsykim](https://github.com/andrewsykim)) + +### Pod +* Init containers have graduated to GA and now appear as a field. The beta annotation value will still be respected and overrides the field value. ([#38382](https://github.com/kubernetes/kubernetes/pull/38382), [@hodovska](https://github.com/hodovska)) +* A new field `terminationMessagePolicy` has been added to containers that allows a user to request `FallbackToLogsOnError`, which will read from the container's logs to populate the termination message if the user does not write to the termination message log file. The termination message file is now properly readable for end users and has a maximum size (4k bytes) to prevent abuse. Each pod may have up to 12k bytes of termination messages before the contents of each will be truncated. ([#39341](https://github.com/kubernetes/kubernetes/pull/39341), [@smarterclayton](https://github.com/smarterclayton)) +* Fix issue with PodDisruptionBudgets in which `minAvailable` specified as a percentage did not work with StatefulSet Pods. ([#39454](https://github.com/kubernetes/kubernetes/pull/39454), [@foxish](https://github.com/foxish)) +* Node affinity has moved from annotations to api fields in the pod spec. Node affinity that is defined in the annotations will be ignored. ([#37299](https://github.com/kubernetes/kubernetes/pull/37299), [@rrati](https://github.com/rrati)) +* Moved pod affinity and anti-affinity from annotations to api fields [#25319](https://github.com/kubernetes/kubernetes/pull/25319) ([#39478](https://github.com/kubernetes/kubernetes/pull/39478), [@rrati](https://github.com/rrati)) +* Add QoS pod status field ([#37968](https://github.com/kubernetes/kubernetes/pull/37968), [@sjenning](https://github.com/sjenning)) +### Pod Security Policy +* PodSecurityPolicy resource is now enabled by default in the extensions API group. ([#39743](https://github.com/kubernetes/kubernetes/pull/39743), [@pweil-](https://github.com/pweil-)) + +### RBAC +* The `attributeRestrictions` field has been removed from the PolicyRule type in the rbac.authorization.k8s.io/v1alpha1 API. The field was not used by the RBAC authorizer. ([#39625](https://github.com/kubernetes/kubernetes/pull/39625), [@deads2k](https://github.com/deads2k)) +* A user can now be authorized to bind a particular role by having permission to perform the `bind` verb on the referenced role ([#39383](https://github.com/kubernetes/kubernetes/pull/39383), [@liggitt](https://github.com/liggitt)) + +### ReplicaSet +* ReplicaSet has onwer ref of the Deployment that created it ([#35676](https://github.com/kubernetes/kubernetes/pull/35676), [@krmayankk](https://github.com/krmayankk)) + +### Secrets +* Populate environment variables from a secrets. ([#39446](https://github.com/kubernetes/kubernetes/pull/39446), [@fraenkel](https://github.com/fraenkel)) +* Added a new secret type "bootstrap.kubernetes.io/token" for dynamically creating TLS bootstrapping bearer tokens. ([#41281](https://github.com/kubernetes/kubernetes/pull/41281), [@ericchiang](https://github.com/ericchiang)) + +### Service +* Endpoints, that tolerate unready Pods, are now listing Pods in state Terminating as well ([#37093](https://github.com/kubernetes/kubernetes/pull/37093), [@simonswine](https://github.com/simonswine)) +* Fix Service Update on LoadBalancerSourceRanges Field ([#37720](https://github.com/kubernetes/kubernetes/pull/37720), [@freehan](https://github.com/freehan)) +* Bug fix. Incoming UDP packets not reach newly deployed services ([#32561](https://github.com/kubernetes/kubernetes/pull/32561), [@zreigz](https://github.com/zreigz)) +* Services of type loadbalancer consume both loadbalancer and nodeport quota. ([#39364](https://github.com/kubernetes/kubernetes/pull/39364), [@zhouhaibing089](https://github.com/zhouhaibing089)) + +### StatefulSet + +* Fix zone placement heuristics so that multiple mounts in a StatefulSet pod are created in the same zone ([#40910](https://github.com/kubernetes/kubernetes/pull/40910), [@justinsb](https://github.com/justinsb)) +* Fixes issue [#38418](https://github.com/kubernetes/kubernetes/pull/38418) which, under circumstance, could cause StatefulSet to deadlock. ([#40838](https://github.com/kubernetes/kubernetes/pull/40838), [@kow3ns](https://github.com/kow3ns)) + * Mediates issue [#36859](https://github.com/kubernetes/kubernetes/pull/36859). StatefulSet only acts on Pods whose identity matches the StatefulSet, providing a partial mediation for overlapping controllers. + +### Taints and Tolerations +* Add a manager to NodeController that is responsible for removing Pods from Nodes tainted with NoExecute Taints. This feature is beta (as the rest of taints) and enabled by default. It's gated by controller-manager enable-taint-manager flag. ([#40355](https://github.com/kubernetes/kubernetes/pull/40355), [@gmarek](https://github.com/gmarek)) +* Add an alpha feature that makes NodeController set Taints instead of deleting Pods from not Ready Nodes. ([#41133](https://github.com/kubernetes/kubernetes/pull/41133), [@gmarek](https://github.com/gmarek)) +* Make tolerations respect wildcard key ([#39914](https://github.com/kubernetes/kubernetes/pull/39914), [@kevin-wangzefeng](https://github.com/kevin-wangzefeng)) +* Forgiveness alpha version api definition ([#39469](https://github.com/kubernetes/kubernetes/pull/39469), [@kevin-wangzefeng](https://github.com/kevin-wangzefeng)) +* Rescheduler uses taints in v1beta1 and will remove old ones (in version v1alpha1) right after its start. ([#43106](https://github.com/kubernetes/kubernetes/pull/43106), [@piosz](https://github.com/piosz)) + +### Volumes +* StorageClassName attribute has been added to PersistentVolume and PersistentVolumeClaim objects and should be used instead of annotation `volume.beta.kubernetes.io/storage-class`. The beta annotation is still working in this release, however it will be removed in a future release. ([#42128](https://github.com/kubernetes/kubernetes/pull/42128), [@jsafrane](https://github.com/jsafrane)) +* Parameter keys in a StorageClass `parameters` map may not use the `kubernetes.io` or `k8s.io` namespaces. ([#41837](https://github.com/kubernetes/kubernetes/pull/41837), [@liggitt](https://github.com/liggitt)) +* Add storage.k8s.io/v1 API ([#40088](https://github.com/kubernetes/kubernetes/pull/40088), [@jsafrane](https://github.com/jsafrane)) +* Alpha version of dynamic volume provisioning is removed in this release. Annotation ([#40000](https://github.com/kubernetes/kubernetes/pull/40000), [@jsafrane](https://github.com/jsafrane)) + * "volume.alpha.kubernetes.io/storage-class" does not have any special meaning. A default storage class + * and DefaultStorageClass admission plugin can be used to preserve similar behavior of Kubernetes cluster, + * see https://kubernetes.io/docs/user-guide/persistent-volumes/#class-1 for details. +* Reduce verbosity of volume reconciler when attaching volumes ([#36900](https://github.com/kubernetes/kubernetes/pull/36900), [@codablock](https://github.com/codablock)) +* We change the default attach_detach_controller sync period to 1 minute to reduce the query frequency through cloud provider to check whether volumes are attached or not. ([#41363](https://github.com/kubernetes/kubernetes/pull/41363), [@jingxu97](https://github.com/jingxu97)) + +## Changes to Major Components +### API Server +* **`--anonymous-auth` is enabled by default, unless the API server is started with the `AlwaysAllow` authorizer. ([#38706](https://github.com/kubernetes/kubernetes/pull/38706), [@deads2k](https://github.com/deads2k))** +* **When using OIDC authentication and specifying --oidc-username-claim=email, an `"email_verified":true` claim must be returned from the identity provider. ([#36087](https://github.com/kubernetes/kubernetes/pull/36087), [@ericchiang](https://github.com/ericchiang))** + * `--basic-auth-file` supports optionally specifying groups in the fourth column of the file ([#39651](https://github.com/kubernetes/kubernetes/pull/39651), [@liggitt](https://github.com/liggitt)) +* API server now has two separate limits for read-only and mutating inflight requests. ([#36064](https://github.com/kubernetes/kubernetes/pull/36064), [@gmarek](https://github.com/gmarek)) +* Restored normalization of custom `--etcd-prefix` when `--storage-backend` is set to etcd3 ([#42506](https://github.com/kubernetes/kubernetes/pull/42506), [@liggitt](https://github.com/liggitt)) +* Updating apiserver to return http status code 202 for a delete request when the resource is not immediately deleted because of user requesting cascading deletion using DeleteOptions.OrphanDependents=false. ([#41165](https://github.com/kubernetes/kubernetes/pull/41165), [@nikhiljindal](https://github.com/nikhiljindal)) +* Use full package path for definition name in OpenAPI spec ([#40124](https://github.com/kubernetes/kubernetes/pull/40124), [@mbohlool](https://github.com/mbohlool)) +* Follow redirects for streaming requests (exec/attach/port-forward) in the apiserver by default (alpha -> beta). ([#40039](https://github.com/kubernetes/kubernetes/pull/40039), [@timstclair](https://github.com/timstclair)) +* Add 'X-Content-Type-Options: nosniff" to some error messages ([#37190](https://github.com/kubernetes/kubernetes/pull/37190), [@brendandburns](https://github.com/brendandburns)) +* Fixes bug in resolving client-requested API versions ([#38533](https://github.com/kubernetes/kubernetes/pull/38533), [@DirectXMan12](https://github.com/DirectXMan12)) +* Replace glog.Fatals with fmt.Errorfs ([#38175](https://github.com/kubernetes/kubernetes/pull/38175), [@sttts](https://github.com/sttts)) +* Pipe get options to storage ([#37693](https://github.com/kubernetes/kubernetes/pull/37693), [@wojtek-t](https://github.com/wojtek-t)) +* The --long-running-request-regexp flag to kube-apiserver is deprecated and will be removed in a future release. Long-running requests are now detected based on specific verbs (watch, proxy) or subresources (proxy, portforward, log, exec, attach). ([#38119](https://github.com/kubernetes/kubernetes/pull/38119), [@liggitt](https://github.com/liggitt)) +* if kube-apiserver is started with `--storage-backend=etcd2`, the media type `application/json` is used. ([#43122](https://github.com/kubernetes/kubernetes/pull/43122), [@liggitt](https://github.com/liggitt)) +* API fields that previously serialized null arrays as `null` and empty arrays as `[]` no longer distinguish between those values and always output `[]` when serializing to JSON. ([#43422](https://github.com/kubernetes/kubernetes/pull/43422), [@liggitt](https://github.com/liggitt)) +* Generate OpenAPI definition for inlined types ([#39466](https://github.com/kubernetes/kubernetes/pull/39466), [@mbohlool](https://github.com/mbohlool)) + +### API Server Aggregator +* Rename kubernetes-discovery to kube-aggregator ([#39619](https://github.com/kubernetes/kubernetes/pull/39619), [@deads2k](https://github.com/deads2k)) +* Fix connection upgrades through kuberentes-discovery ([#38724](https://github.com/kubernetes/kubernetes/pull/38724), [@deads2k](https://github.com/deads2k)) + +#### Generic API Server +* Move pkg/api/rest into genericapiserver ([#39948](https://github.com/kubernetes/kubernetes/pull/39948), [@sttts](https://github.com/sttts)) +* Move non-generic apiserver code out of the generic packages ([#38191](https://github.com/kubernetes/kubernetes/pull/38191), [@sttts](https://github.com/sttts)) +* Fixes API compatibility issue with empty lists incorrectly returning a null `items` field instead of an empty array. ([#39834](https://github.com/kubernetes/kubernetes/pull/39834), [@liggitt](https://github.com/liggitt)) +* Re-add /healthz/ping handler in genericapiserver ([#38603](https://github.com/kubernetes/kubernetes/pull/38603), [@sttts](https://github.com/sttts)) +* Remove genericapiserver.Options.MasterServiceNamespace ([#38186](https://github.com/kubernetes/kubernetes/pull/38186), [@sttts](https://github.com/sttts)) +* genericapiserver: cut off more dependencies – episode 3 ([#40426](https://github.com/kubernetes/kubernetes/pull/40426), [@sttts](https://github.com/sttts)) +* genericapiserver: more dependency cutoffs ([#40216](https://github.com/kubernetes/kubernetes/pull/40216), [@sttts](https://github.com/sttts)) +* genericapiserver: cut off kube pkg/version dependency ([#39943](https://github.com/kubernetes/kubernetes/pull/39943), [@sttts](https://github.com/sttts)) +* genericapiserver: cut off pkg/serviceaccount dependency ([#39945](https://github.com/kubernetes/kubernetes/pull/39945), [@sttts](https://github.com/sttts)) +* genericapiserver: cut off pkg/apis/extensions and pkg/storage dependencies ([#39946](https://github.com/kubernetes/kubernetes/pull/39946), [@sttts](https://github.com/sttts)) +* genericapiserver: cut off certificates api dependency ([#39947](https://github.com/kubernetes/kubernetes/pull/39947), [@sttts](https://github.com/sttts)) +* genericapiserver: extract CA cert from server cert and SNI cert chains ([#39022](https://github.com/kubernetes/kubernetes/pull/39022), [@sttts](https://github.com/sttts)) +* genericapiserver: turn APIContainer.SecretRoutes into a real ServeMux ([#38826](https://github.com/kubernetes/kubernetes/pull/38826), [@sttts](https://github.com/sttts)) +* genericapiserver: unify swagger and openapi in config ([#38690](https://github.com/kubernetes/kubernetes/pull/38690), [@sttts](https://github.com/sttts)) + +### Client +* Use Prometheus instrumentation conventions ([#36704](https://github.com/kubernetes/kubernetes/pull/36704), [@fabxc](https://github.com/fabxc)) +* Clients now use the `?watch=true` parameter to make watch API calls, instead of the `/watch/` path prefix ([#41722](https://github.com/kubernetes/kubernetes/pull/41722), [@liggitt](https://github.com/liggitt)) +* Move private key parsing from serviceaccount/jwt.go to client-go/util/cert ([#40907](https://github.com/kubernetes/kubernetes/pull/40907), [@cblecker](https://github.com/cblecker)) +* Caching added to the OIDC client auth plugin to fix races and reduce the time kubectl commands using this plugin take by several seconds. ([#38167](https://github.com/kubernetes/kubernetes/pull/38167), [@ericchiang](https://github.com/ericchiang)) +* Fix resync goroutine leak in ListAndWatch ([#35672](https://github.com/kubernetes/kubernetes/pull/35672), [@tatsuhiro-t](https://github.com/tatsuhiro-t)) + +#### client-go +* The main repository does not keep multiple releases of clientsets anymore. Please find previous releases at https://github.com/kubernetes/client-go ([#38154](https://github.com/kubernetes/kubernetes/pull/38154), [@caesarxuchao](https://github.com/caesarxuchao)) +* Support whitespace in command path for gcp auth plugin ([#41653](https://github.com/kubernetes/kubernetes/pull/41653), [@jlowdermilk](https://github.com/jlowdermilk)) +* client-go no longer imports GCP OAuth2 and OpenID Connect packages by default. ([#41532](https://github.com/kubernetes/kubernetes/pull/41532), [@ericchiang](https://github.com/ericchiang)) +* Added bool type support for jsonpath. ([#39063](https://github.com/kubernetes/kubernetes/pull/39063), [@xingzhou](https://github.com/xingzhou)) +* Preventing nil pointer reference in client_config ([#40508](https://github.com/kubernetes/kubernetes/pull/40508), [@vjsamuel](https://github.com/vjsamuel)) +* Prevent hotloops on error conditions, which could fill up the disk faster than log rotation can free space. ([#40497](https://github.com/kubernetes/kubernetes/pull/40497), [@lavalamp](https://github.com/lavalamp)) + +### Cloud Provider + +#### AWS +* Allow to running the master with a different AWS account or even on a different cloud provider than the nodes. ([#39996](https://github.com/kubernetes/kubernetes/pull/39996), [@scheeles](https://github.com/scheeles)) +* Support shared tag `kubernetes.io/cluster/<clusterid>` ([#41695](https://github.com/kubernetes/kubernetes/pull/41695), [@justinsb](https://github.com/justinsb)) +* Do not consider master instance zones for dynamic volume creation ([#41702](https://github.com/kubernetes/kubernetes/pull/41702), [@justinsb](https://github.com/justinsb)) +* Fix AWS device allocator to only use valid device names ([#41455](https://github.com/kubernetes/kubernetes/pull/41455), [@gnufied](https://github.com/gnufied)) +* Trust region if found from AWS metadata ([#38880](https://github.com/kubernetes/kubernetes/pull/38880), [@justinsb](https://github.com/justinsb)) +* Remove duplicate calls to DescribeInstance during volume operations ([#39842](https://github.com/kubernetes/kubernetes/pull/39842), [@gnufied](https://github.com/gnufied)) +* Recognize eu-west-2 region ([#38746](https://github.com/kubernetes/kubernetes/pull/38746), [@justinsb](https://github.com/justinsb)) +* Recognize ca-central-1 region ([#38410](https://github.com/kubernetes/kubernetes/pull/38410), [@justinsb](https://github.com/justinsb)) +* Add sequential allocator for device names. ([#38818](https://github.com/kubernetes/kubernetes/pull/38818), [@jsafrane](https://github.com/jsafrane)) + +#### Azure +* Fix failing load balancers in Azure ([#40405](https://github.com/kubernetes/kubernetes/pull/40405), [@codablock](https://github.com/codablock)) +* Reduce time needed to attach Azure disks ([#40066](https://github.com/kubernetes/kubernetes/pull/40066), [@codablock](https://github.com/codablock)) +* Remove Azure Subnet RouteTable check ([#38334](https://github.com/kubernetes/kubernetes/pull/38334), [@mogthesprog](https://github.com/mogthesprog)) +* Add support for Azure Container Registry, update Azure dependencies ([#37783](https://github.com/kubernetes/kubernetes/pull/37783), [@brendandburns](https://github.com/brendandburns)) +* Allow backendpools in Azure Load Balancers which are not owned by cloud provider ([#36882](https://github.com/kubernetes/kubernetes/pull/36882), [@codablock](https://github.com/codablock)) + +#### GCE +* On GCI by default logrotate is disabled for application containers in favor of rotation mechanism provided by docker logging driver. ([#40634](https://github.com/kubernetes/kubernetes/pull/40634), [@crassirostris](https://github.com/crassirostris)) + +#### GKE +* New GKE certificates controller. ([#41160](https://github.com/kubernetes/kubernetes/pull/41160), [@pipejakob](https://github.com/pipejakob)) + +#### vSphere +* Reverts to looking up the current VM in vSphere using the machine's UUID, either obtained via sysfs or via the `vm-uuid` parameter in the cloud configuration file. ([#40892](https://github.com/kubernetes/kubernetes/pull/40892), [@robdaemon](https://github.com/robdaemon)) +* Fix for detach volume when node is not present/ powered off ([#40118](https://github.com/kubernetes/kubernetes/pull/40118), [@BaluDontu](https://github.com/BaluDontu)) +* Adding vmdk file extension for vmDiskPath in vsphere DeleteVolume ([#40538](https://github.com/kubernetes/kubernetes/pull/40538), [@divyenpatel](https://github.com/divyenpatel)) +* Changed default scsi controller type in vSphere Cloud Provider ([#38426](https://github.com/kubernetes/kubernetes/pull/38426), [@abrarshivani](https://github.com/abrarshivani)) +* Fixes NotAuthenticated errors that appear in the kubelet and kube-controller-manager due to never logging in to vSphere ([#36169](https://github.com/kubernetes/kubernetes/pull/36169), [@robdaemon](https://github.com/robdaemon)) +* Fix panic in vSphere cloud provider ([#38423](https://github.com/kubernetes/kubernetes/pull/38423), [@BaluDontu](https://github.com/BaluDontu)) +* Fix space issue in volumePath with vSphere Cloud Provider ([#38338](https://github.com/kubernetes/kubernetes/pull/38338), [@BaluDontu](https://github.com/BaluDontu)) + +### Federation + +#### kubefed +* Flag cleanup ([#41335](https://github.com/kubernetes/kubernetes/pull/41335), [@irfanurrehman](https://github.com/irfanurrehman)) +* Create configmap for the cluster kube-dns when cluster joins and remove when it unjoins ([#39338](https://github.com/kubernetes/kubernetes/pull/39338), [@irfanurrehman](https://github.com/irfanurrehman)) +* Support configuring dns-provider ([#40528](https://github.com/kubernetes/kubernetes/pull/40528), [@shashidharatd](https://github.com/shashidharatd)) +* Bug fix relating kubeconfig path in kubefed init ([#41410](https://github.com/kubernetes/kubernetes/pull/41410), [@irfanurrehman](https://github.com/irfanurrehman)) +* Add override flags options to kubefed init ([#40917](https://github.com/kubernetes/kubernetes/pull/40917), [@irfanurrehman](https://github.com/irfanurrehman)) +* Add option to expose federation apiserver on nodeport service ([#40516](https://github.com/kubernetes/kubernetes/pull/40516), [@shashidharatd](https://github.com/shashidharatd)) +* Add option to disable persistence storage for etcd ([#40862](https://github.com/kubernetes/kubernetes/pull/40862), [@shashidharatd](https://github.com/shashidharatd)) +* kubefed init creates a service account for federation controller manager in the federation-system namespace and binds that service account to the federation-system:federation-controller-manager role that has read and list access on secrets in the federation-system namespace. ([#40392](https://github.com/kubernetes/kubernetes/pull/40392), [@madhusudancs](https://github.com/madhusudancs)) +* Implement dry run support in kubefed init ([#36447](https://github.com/kubernetes/kubernetes/pull/36447), [@irfanurrehman](https://github.com/irfanurrehman)) +* Make federation etcd PVC size configurable ([#36310](https://github.com/kubernetes/kubernetes/pull/36310), [@irfanurrehman](https://github.com/irfanurrehman)) + +#### Other Notable Changes +* Federated Ingress over GCE no longer requires separate firewall rules to be created for each cluster to circumvent flapping firewall health checks. ([#41942](https://github.com/kubernetes/kubernetes/pull/41942), [@csbell](https://github.com/csbell)) +* Add support for finalizers in federated configmaps (deletes configmaps from underlying clusters). ([#40464](https://github.com/kubernetes/kubernetes/pull/40464), [@csbell](https://github.com/csbell)) +* Add support for DeleteOptions.OrphanDependents for federated services. Setting it to false while deleting a federated service also deletes the corresponding services from all registered clusters. ([#36390](https://github.com/kubernetes/kubernetes/pull/36390), [@nikhiljindal](https://github.com/nikhiljindal)) +* Add `--controllers` flag to federation controller manager for enable/disable federation ingress controller ([#36643](https://github.com/kubernetes/kubernetes/pull/36643), [@kzwang](https://github.com/kzwang)) +* Stop deleting services from underlying clusters when federated service is deleted. ([#37353](https://github.com/kubernetes/kubernetes/pull/37353), [@nikhiljindal](https://github.com/nikhiljindal)) +* Expose autoscaling apis through federation api server ([#38976](https://github.com/kubernetes/kubernetes/pull/38976), [@irfanurrehman](https://github.com/irfanurrehman)) +* Federation: Add `batch/jobs` API objects to federation-apiserver ([#35943](https://github.com/kubernetes/kubernetes/pull/35943), [@jianhuiz](https://github.com/jianhuiz)) +* Add logging of route53 calls ([#39964](https://github.com/kubernetes/kubernetes/pull/39964), [@justinsb](https://github.com/justinsb)) + +### Garbage Collector +* Added foreground garbage collection: the owner object will not be deleted until all its dependents are deleted by the garbage collector. Please checkout the [user doc](https://kubernetes.io/docs/concepts/abstractions/controllers/garbage-collection/) for details. ([#38676](https://github.com/kubernetes/kubernetes/pull/38676), [@caesarxuchao](https://github.com/caesarxuchao)) + * deleteOptions.orphanDependents is going to be deprecated in 1.7. Please use deleteOptions.propagationPolicy instead. + +### kubeadm +* A new label and taint is used for marking the master. The label is `node-role.kubernetes.io/master=""` and the taint has the effect `NoSchedule`. Tolerate the `node-role.kubernetes.io/master="":NoSchedule` taint to schedule a workload on the master (a networking DaemonSet for example). +* The kubelet API is now secured, only cluster admins are allowed to access it. +* Insecure access to the API Server over `localhost:8080` is now disabled. +* The control plane components now talk securely to each other. The API Server talks securely to the kubelets in the cluster. +* kubeadm creates RBAC-enabled clusters. This means that some add-ons which worked previously won't work without having their YAML configuration updated. Please see each vendor's own documentation to check that the add-ons you are using will work with Kubernetes 1.6. +* The kube-discovery Deployment isn't used anymore when creating a kubeadm cluster and shouldn't be used anywhere else either due to its insecure nature. +* The Certificates API has graduated from alpha to beta. This is a backwards-incompatible change since the alpha support is dropped, and therefore kubeadm v1.5 and v1.6 don't work together (for example kubeadm v1.5 can't join a kubeadm v1.6 cluster). +* Supporting only etcd3, with 3.0.14 as the minimum version. +* `kubeadm reset` will no longer drain nodes automatically. This is because the credentials on nodes do not have permission to perform this operation. We have documented an [alternate procedure](https://kubernetes.io/docs/getting-started-guides/kubeadm/#tear-down), driven from the API server/master. +* Hook up kubeadm against the BootstrapSigner ([#41417](https://github.com/kubernetes/kubernetes/pull/41417), [@luxas](https://github.com/luxas)) +* Rename some flags for beta UI and fixup some logic ([#42064](https://github.com/kubernetes/kubernetes/pull/42064), [@luxas](https://github.com/luxas)) +* Insecure access to the API Server at localhost:8080 will be turned off in v1.6 when using kubeadm ([#42066](https://github.com/kubernetes/kubernetes/pull/42066), [@luxas](https://github.com/luxas)) +* Flag --use-kubernetes-version for kubeadm init renamed to --kubernetes-version ([#41820](https://github.com/kubernetes/kubernetes/pull/41820), [@kad](https://github.com/kad)) +* Remove the --cloud-provider flag for beta init UX ([#41710](https://github.com/kubernetes/kubernetes/pull/41710), [@luxas](https://github.com/luxas)) +* Fixed an SELinux issue in kubeadm on Docker 1.12+ by moving etcd SELinux options from container to pod. ([#40682](https://github.com/kubernetes/kubernetes/pull/40682), [@dgoodwin](https://github.com/dgoodwin)) +* Add authorization mode to kubeadm ([#39846](https://github.com/kubernetes/kubernetes/pull/39846), [@andrewrynhard](https://github.com/andrewrynhard)) +* Refactor the certificate and kubeconfig code in the kubeadm binary into two phases ([#39280](https://github.com/kubernetes/kubernetes/pull/39280), [@luxas](https://github.com/luxas)) +* Added kubeadm commands to manage bootstrap tokens and the duration they are valid for. ([#35805](https://github.com/kubernetes/kubernetes/pull/35805), [@dgoodwin](https://github.com/dgoodwin)) + +### kubectl + +#### New Commands +- `apply set-last-applied` *updates the applied-applied-configuration annotation* ([#41694](https://github.com/kubernetes/kubernetes/pull/41694), [@shiywang](https://github.com/shiywang)) +- `kubectl apply view-last-applied` *viewing the last configuration file applied* ([#41146](https://github.com/kubernetes/kubernetes/pull/41146), [@shiywang](https://github.com/shiywang)) + +#### Create subcommands + - `create poddisruptionbudget` ([#36646](https://github.com/kubernetes/kubernetes/pull/36646), [@kargakis](https://github.com/kargakis)) + - `create clusterrole` ([#41538](https://github.com/kubernetes/kubernetes/pull/41538), [@xingzhou](https://github.com/xingzhou)) + - `create role` ([#39852](https://github.com/kubernetes/kubernetes/pull/39852), [@xingzhou](https://github.com/xingzhou)) + - `create clusterrolebinding` ([#37098](https://github.com/kubernetes/kubernetes/pull/37098), [@deads2k](https://github.com/deads2k)) + - `create service externalname` ([#34789](https://github.com/kubernetes/kubernetes/pull/34789), [@adohe](https://github.com/adohe)) +- `set selector` - update selector labels ([#38966](https://github.com/kubernetes/kubernetes/pull/38966), [@kargakis](https://github.com/kargakis)) +- `can-i` to see if you can perform an action ([#41077](https://github.com/kubernetes/kubernetes/pull/41077), [@deads2k](https://github.com/deads2k)) + +#### Updates to existing commands +* Printing and output + * Import a numeric ordering sorting library and use it in the sorting printer. ([#40746](https://github.com/kubernetes/kubernetes/pull/40746), [@matthyx](https://github.com/matthyx)) + * DaemonSet get and describe show status fields. ([#42843](https://github.com/kubernetes/kubernetes/pull/42843), [@janetkuo](https://github.com/janetkuo)) + * Pods describe shows tolerationSeconds ([#42162](https://github.com/kubernetes/kubernetes/pull/42162), [@kevin-wangzefeng](https://github.com/kevin-wangzefeng)) + * Node describe contains closing paren ([#39217](https://github.com/kubernetes/kubernetes/pull/39217), [@luksa](https://github.com/luksa)) + * Display pod node selectors with kubectl describe. ([#36396](https://github.com/kubernetes/kubernetes/pull/36396), [@aveshagarwal](https://github.com/aveshagarwal)) + * Add Version to the resource printer for 'get nodes' ([#37943](https://github.com/kubernetes/kubernetes/pull/37943), [@ailusazh](https://github.com/ailusazh)) + * Added support for printing in all supported `--output` formats to `kubectl create ...` and `kubectl apply ...` ([#38112](https://github.com/kubernetes/kubernetes/pull/38112), [@juanvallejo](https://github.com/juanvallejo)) + * Add three more columns to `kubectl get deploy -o wide` output. ([#39240](https://github.com/kubernetes/kubernetes/pull/39240), [@xingzhou](https://github.com/xingzhou)) + * Fix kubectl get -f <file> -o <nondefault printer> so it prints all items in the file ([#39038](https://github.com/kubernetes/kubernetes/pull/39038), [@ncdc](https://github.com/ncdc)) + * kubectl describe no longer prints the last-applied-configuration annotation for secrets. ([#34664](https://github.com/kubernetes/kubernetes/pull/34664), [@ymqytw](https://github.com/ymqytw)) + * Completed pods should not be hidden when requested by name via `kubectl get`. ([#42216](https://github.com/kubernetes/kubernetes/pull/42216), [@smarterclayton](https://github.com/smarterclayton)) + * Improve formatting of EventSource in kubectl get and kubectl describe ([#40073](https://github.com/kubernetes/kubernetes/pull/40073), [@matthyx](https://github.com/matthyx)) +* Attach now supports multiple types ([#40365](https://github.com/kubernetes/kubernetes/pull/40365), [@shiywang](https://github.com/shiywang)) +* Create now accepts the label selector flag for filtering objects to create ([#40057](https://github.com/kubernetes/kubernetes/pull/40057), [@MrHohn](https://github.com/MrHohn)) +* Top now accepts short forms for "node" and "pod" ("no", "po") ([#39218](https://github.com/kubernetes/kubernetes/pull/39218), [@luksa](https://github.com/luksa)) +* Begin paths for internationalization in kubectl ([#36802](https://github.com/kubernetes/kubernetes/pull/36802), [@brendandburns](https://github.com/brendandburns)) + * Add initial french translations for kubectl ([#40645](https://github.com/kubernetes/kubernetes/pull/40645), [@brendandburns](https://github.com/brendandburns)) + +#### Updates to apply +* New command `apply set-last-applied` *updates the applied-applied-configuration annotation* ([#41694](https://github.com/kubernetes/kubernetes/pull/41694), [@shiywang](https://github.com/shiywang)) +* New command `apply view-last-applied` *command for viewing the last configuration file applied* ([#41146](https://github.com/kubernetes/kubernetes/pull/41146), [@shiywang](https://github.com/shiywang)) +* `apply` now supports explicitly clearing values by setting them to null ([#40630](https://github.com/kubernetes/kubernetes/pull/40630), [@liggitt](https://github.com/liggitt)) +* Warn user when using `apply` on a resource lacking the `LastAppliedConfig` annotation ([#36672](https://github.com/kubernetes/kubernetes/pull/36672), [@ymqytw](https://github.com/ymqytw)) +* PATCH (i.e. apply and edit) now supports merging lists of primitives ([#38665](https://github.com/kubernetes/kubernetes/pull/38665), [@ymqytw](https://github.com/ymqytw)) +* `apply` falls back to generic 3-way JSON merge patch for Third Party Resource or unregistered types ([#40666](https://github.com/kubernetes/kubernetes/pull/40666), [@ymqytw](https://github.com/ymqytw)) + +#### Updates to edit +* `edit` now supports Third party resources and extension API servers. ([#41304](https://github.com/kubernetes/kubernetes/pull/41304), [@liggitt](https://github.com/liggitt)) + * Now to edit a particular API version, provide the fully-qualify the resource, version, and group used to fetch the object (for example, `job.v1.batch/myjob`) + * Client-side conversion is no longer done, and the `--output-version` option is deprecated for `kubectl edit`. +* `edit` works as intended with apply and will not change the annotation + * No longer updates the last-applied-configuration annotation when --save-config is unspecified or false. ([#41924](https://github.com/kubernetes/kubernetes/pull/41924), [@ymqytw](https://github.com/ymqytw)) + * Fixes issue that caused apply to revert changes made by edit + +#### Bug fixes +* Fixed --save-config in create subcommand to save the annotation ([#40289](https://github.com/kubernetes/kubernetes/pull/40289), [@xilabao](https://github.com/xilabao)) +* Fixed an issue where 'kubectl get --sort-by=' would return an error if the specified fields in sort were not specified in one or more of the returned objects. ([#40541](https://github.com/kubernetes/kubernetes/pull/40541), [@fabianofranz](https://github.com/fabianofranz)) + * Previously this would cause the command to fail regardless of whether or not the field was present in the object model + * Now the command will succeed even if the sort-by field is missing from one or more of the objects +* Fixed issue with kubectl proxy so it will now proxy an empty path - e.g. http://localhost:8001 ([#39226](https://github.com/kubernetes/kubernetes/pull/39226), [@luksa](https://github.com/luksa)) +* Fixed an issue where commas were not accepted in --from-literal flags for the creation of secrets. ([#35191](https://github.com/kubernetes/kubernetes/pull/35191), [@SamiHiltunen](https://github.com/SamiHiltunen)) + * Passing multiple values separated by a comma in a single --from-literal flag is no longer supported. Please use multiple --from-literal flags to provide multiple values. +* Fixed a bug where the --server, --token, and --certificate-authority flags were not overriding the related in-cluster configs when provided in a `kubectl` call inside a cluster. ([#39006](https://github.com/kubernetes/kubernetes/pull/39006), [@fabianofranz](https://github.com/fabianofranz)) + +#### Other Notable Changes +* The api server will publish the extensions/Deployments API as preferred over the apps/Deployment (introduced in 1.6). ([#43553](https://github.com/kubernetes/kubernetes/pull/43553), [@liggitt](https://github.com/liggitt)) + * This will ensure certain commands in 1.5 versions of kubectl continue function when run against a 1.6 server. (e.g. `kubectl edit deployment`) +* Taint + * The `taint` command will not function in a skewed 1.5 / 1.6 environment - client and server versions must match (See Action required section above) + * Change taints/tolerations to api fields ([#38957](https://github.com/kubernetes/kubernetes/pull/38957), [@aveshagarwal](https://github.com/aveshagarwal)) + * Make kubectl taint command respect effect NoExecute ([#42120](https://github.com/kubernetes/kubernetes/pull/42120), [@kevin-wangzefeng](https://github.com/kevin-wangzefeng)) +* Allow drain --force to remove pods whose managing resource is deleted. ([#41864](https://github.com/kubernetes/kubernetes/pull/41864), [@marun](https://github.com/marun)) +* `--output-version` is ignored for all commands except `kubectl convert`. This is consistent with the generic nature of `kubectl` CRUD commands and the previous removal of `--api-version`. Specific versions can be specified in the resource field: `resource.version.group`, `jobs.v1.batch`. ([#41576](https://github.com/kubernetes/kubernetes/pull/41576), [@deads2k](https://github.com/deads2k)) +* Allow missing keys in templates by default ([#39486](https://github.com/kubernetes/kubernetes/pull/39486), [@ncdc](https://github.com/ncdc)) +* Add error message when trying to use clusterrole with namespace in kubectl ([#36424](https://github.com/kubernetes/kubernetes/pull/36424), [@xilabao](https://github.com/xilabao)) +* When deleting an object with `--grace-period=0`, the client will begin a graceful deletion and wait until the resource is fully deleted. To force deletion, use the `--force` flag. ([#37263](https://github.com/kubernetes/kubernetes/pull/37263), [@smarterclayton](https://github.com/smarterclayton)) + +### Node Components +* Kubelet config should ignore file start with dots. + ([#39196](https://github.com/kubernetes/kubernetes/pull/39196), [@resouer](https://github.com/resouer)) +* Bump GCI to gci-stable-56-9000-84-2. + ([#41819](https://github.com/kubernetes/kubernetes/pull/41819), + [@dchen1107](https://github.com/dchen1107)) +* Bump GCE ContainerVM to container-vm-v20170214 to address CVE-2016-9962. + ([#41449](https://github.com/kubernetes/kubernetes/pull/41449), + [@zmerlynn](https://github.com/zmerlynn)) +* Kubelet: Remove the PLEG health check from /healthz, Kubelet will now report +* NodeNotReady on failed PLEG health check. + ([#41569](https://github.com/kubernetes/kubernetes/pull/41569), + [@yujuhong](https://github.com/yujuhong)) +* CRI: upgrade protobuf to v3. Protobuf v2 and v3 are not compatible. + ([#39158](https://github.com/kubernetes/kubernetes/pull/39158), [@feiskyer](https://github.com/feiskyer)) +* kubelet exports metrics for cgroup management ([#41988](https://github.com/kubernetes/kubernetes/pull/41988), [@sjenning](https://github.com/sjenning)) +* Experimental support to reserve a pod's memory request from being utilized by + pods in lower QoS tiers. + ([#41149](https://github.com/kubernetes/kubernetes/pull/41149), + [@sjenning](https://github.com/sjenning)) +* Port forwarding can forward over websockets or SPDY. + ([#33684](https://github.com/kubernetes/kubernetes/pull/33684), + [@fraenkel](https://github.com/fraenkel)) +* Flag gate faster evictions based on node memory pressure using kernel memcg + notifications - `--experimental-kernel-memcg-notification`. + ([#38258](https://github.com/kubernetes/kubernetes/pull/38258), + [@derekwaynecarr](https://github.com/derekwaynecarr)) +* Nodes can now report two additional address types in their status: InternalDNS + and ExternalDNS. The apiserver can use --kubelet-preferred-address-types to + give priority to the type of address it uses to reach nodes. + ([#34259](https://github.com/kubernetes/kubernetes/pull/34259), [@liggitt](https://github.com/liggitt)) + +#### Bug fixes +* Add image cache to fix the issue where kubelet hands when reporting the node + status. ([#38375](https://github.com/kubernetes/kubernetes/pull/38375), + [@Random-Liu](https://github.com/Random-Liu)) +* Fix logic error in graceful deletion that caused pods not being able to + be deleted. ([#37721](https://github.com/kubernetes/kubernetes/pull/37721), + [@derekwaynecarr](https://github.com/derekwaynecarr)) +* Fix ConfigMap for Windows Containers. + ([#39373](https://github.com/kubernetes/kubernetes/pull/39373), + [@jbhurat](https://github.com/jbhurat)) +* Fix the “pod rejected by kubelet may stay at pending forever” bug. + (https://github.com/kubernetes/kubernetes/pull/37661), + [@yujuhong](https://github.com/yujuhong)) + +### kube-controller-manager +* add --controllers to controller manager ([#39740](https://github.com/kubernetes/kubernetes/pull/39740), [@deads2k](https://github.com/deads2k)) + +### kube-dns +* Adds support for configurable DNS stub domains and upstream nameservers. + The following configuration options have been added to the `kube-system:kube-dns` ConfigMap: + ``` + "stubDomains": { + "acme.local": ["1.2.3.4"] + }, + ``` + is a map of domain to list of nameservers for the domain. This is used + to inject private DNS domains into the kube-dns namespace. In the above + example, any DNS requests for *.acme.local will be served by the + nameserver 1.2.3.4. + ``` + "upstreamNameservers": ["8.8.8.8", "8.8.4.4"] + ``` + is a list of upstreamNameservers to use, overriding the configuration + specified in /etc/resolv.conf. + +* An empty `kube-system:kube-dns` ConfigMap will be created for the cluster if one did not already exist. + +### kube-proxy +* **- Add tcp/udp userspace proxy support for Windows. ([#41487](https://github.com/kubernetes/kubernetes/pull/41487), [@anhowe](https://github.com/anhowe))** +* Add DNS suffix search list support in Windows kube-proxy. ([#41618](https://github.com/kubernetes/kubernetes/pull/41618), [@JiangtianLi](https://github.com/JiangtianLi)) +* Add a KUBERNETES_NODE_* section to build kubelet/kube-proxy for windows ([#38919](https://github.com/kubernetes/kubernetes/pull/38919), [@brendandburns](https://github.com/brendandburns)) +* Remove outdated net.experimental.kubernetes.io/proxy-mode and net.beta.kubernetes.io/proxy-mode annotations from kube-proxy. ([#40585](https://github.com/kubernetes/kubernetes/pull/40585), [@cblecker](https://github.com/cblecker)) +* proxy/iptables: don't sync proxy rules if services map didn't change ([#38996](https://github.com/kubernetes/kubernetes/pull/38996), [@dcbw](https://github.com/dcbw)) +* Update kube-proxy image to be based off of Debian 8.6 base image. ([#39695](https://github.com/kubernetes/kubernetes/pull/39695), [@ixdy](https://github.com/ixdy)) +* Update amd64 kube-proxy base image to debian-iptables-amd64:v5 ([#39725](https://github.com/kubernetes/kubernetes/pull/39725), [@ixdy](https://github.com/ixdy)) +* Clean up the kube-proxy container image by removing unnecessary packages and files. ([#42090](https://github.com/kubernetes/kubernetes/pull/42090), [@timstclair](https://github.com/timstclair)) +* Better compat with very old iptables (e.g. CentOS 6) ([#37594](https://github.com/kubernetes/kubernetes/pull/37594), [@thockin](https://github.com/thockin)) + +### Scheduler +* Add the support to the scheduler for spreading pods of StatefulSets. ([#41708](https://github.com/kubernetes/kubernetes/pull/41708), [@bsalamat](https://github.com/bsalamat)) +* Added support to minimize sending verbose node information to scheduler extender by sending only node names and expecting extenders to cache the rest of the node information ([#41119](https://github.com/kubernetes/kubernetes/pull/41119), [@sarat-k](https://github.com/sarat-k)) +* Support KUBE_MAX_PD_VOLS on Azure ([#41398](https://github.com/kubernetes/kubernetes/pull/41398), [@codablock](https://github.com/codablock)) +* Mark multi-scheduler graduation to beta and then v1. ([#38871](https://github.com/kubernetes/kubernetes/pull/38871), [@k82cn](https://github.com/k82cn)) +* Scheduler treats StatefulSet pods as belonging to a single equivalence class. ([#39718](https://github.com/kubernetes/kubernetes/pull/39718), [@foxish](https://github.com/foxish)) +* Update FitError as a message component into the PodConditionUpdater. ([#39491](https://github.com/kubernetes/kubernetes/pull/39491), [@jayunit100](https://github.com/jayunit100)) +* Fix comment and optimize code ([#38084](https://github.com/kubernetes/kubernetes/pull/38084), [@tanshanshan](https://github.com/tanshanshan)) +* Add flag to enable contention profiling in scheduler. ([#37357](https://github.com/kubernetes/kubernetes/pull/37357), [@gmarek](https://github.com/gmarek)) +* Try self-repair scheduler cache or panic ([#37379](https://github.com/kubernetes/kubernetes/pull/37379), [@wojtek-t](https://github.com/wojtek-t)) + +### Volume Plugins + +#### Azure Disk +* restrict name length for Azure specifications ([#40030](https://github.com/kubernetes/kubernetes/pull/40030), [@colemickens](https://github.com/colemickens)) + +#### GlusterFS +* The glusterfs dynamic volume provisioner will now choose a unique GID for new persistent volumes from a range that can be configured in the storage class with the "gidMin" and "gidMax" parameters. The default range is 2000 - 2147483647 (max int32). ([#37886](https://github.com/kubernetes/kubernetes/pull/37886), [@obnoxxx](https://github.com/obnoxxx)) + +#### Photon +* Fix photon controller plugin to construct with correct PdID ([#37167](https://github.com/kubernetes/kubernetes/pull/37167), [@luomiao](https://github.com/luomiao)) + +#### rbd +* force unlock rbd image if the image is not used ([#41597](https://github.com/kubernetes/kubernetes/pull/41597), [@rootfs](https://github.com/rootfs)) + +#### vSphere +* Fix fsGroup to vSphere ([#38655](https://github.com/kubernetes/kubernetes/pull/38655), [@abrarshivani](https://github.com/abrarshivani)) +* Fix issue when attempting to unmount a wrong vSphere volume ([#37413](https://github.com/kubernetes/kubernetes/pull/37413), [@BaluDontu](https://github.com/BaluDontu)) + +#### Other Notable Changes +* Implement bulk polling of volumes ([#41306](https://github.com/kubernetes/kubernetes/pull/41306), [@gnufied](https://github.com/gnufied)) +* Check if pathExists before performing Unmount ([#39311](https://github.com/kubernetes/kubernetes/pull/39311), [@rkouj](https://github.com/rkouj)) +* Unmount operation should not fail if volume is already unmounted ([#38547](https://github.com/kubernetes/kubernetes/pull/38547), [@rkouj](https://github.com/rkouj)) +* Provide kubernetes-controller-manager flags to control volume attach/detach reconciler sync. The duration of the syncs can be controlled, and the syncs can be shut off as well. ([#39551](https://github.com/kubernetes/kubernetes/pull/39551), [@chrislovecnm](https://github.com/chrislovecnm)) +* Fix unmountDevice issue caused by shared mount in GCI ([#38411](https://github.com/kubernetes/kubernetes/pull/38411), [@jingxu97](https://github.com/jingxu97)) +* Fix permissions when using fsGroup ([#37009](https://github.com/kubernetes/kubernetes/pull/37009), [@sjenning](https://github.com/sjenning)) +* Fixed issues ([#39202](https://github.com/kubernetes/kubernetes/pull/39202)), ([#41041](https://github.com/kubernetes/kubernetes/pull/41041)) and ([#40941](https://github.com/kubernetes/kubernetes/pull/40941)) that caused the iSCSI connections to + be prematurely closed when deleting a pod with an iSCSI persistent volume attached and that prevented the use of newly created LUNs on targets with preestablished connections. ([#41196](https://github.com/kubernetes/kubernetes/pull/41196)), [@CristianPop](https://github.com/CristianPop)) + +## Changes to Cluster Provisioning Scripts + +### AWS +* Deployment of AWS Kubernetes clusters using the in-tree bash deployment (i.e. cluster/kube-up.sh or get-kube.sh) is obsolete. v1.5.x will be the last release to support cluster/kube-up.sh with AWS. For a list of viable alternatives, see: http://kubernetes.io/docs/getting-started-guides/aws/ ([#42196](https://github.com/kubernetes/kubernetes/pull/42196), [@zmerlynn](https://github.com/zmerlynn)) +* Fix an issue where AWS tear-down leaks an DHCP Option Set. ([#38645](https://github.com/kubernetes/kubernetes/pull/38645), [@zmerlynn](https://github.com/zmerlynn)) + +### Juju +* The kubernetes-master, kubernetes-worker and kubeapi-load-balancer charms have gained an nrpe-external-master relation, allowing the integration of their monitoring in an external Nagios server. ([#41923](https://github.com/kubernetes/kubernetes/pull/41923), [@Cynerva](https://github.com/Cynerva)) +* Disable anonymous auth on kubelet ([#41919](https://github.com/kubernetes/kubernetes/pull/41919), [@Cynerva](https://github.com/Cynerva)) +* Fix shebangs in charm actions to use python3 ([#42058](https://github.com/kubernetes/kubernetes/pull/42058), [@Cynerva](https://github.com/Cynerva)) +* K8s master charm now properly keeps distributed master files in sync for an HA control plane. ([#41351](https://github.com/kubernetes/kubernetes/pull/41351), [@chuckbutler](https://github.com/chuckbutler)) +* Improve status messages ([#40691](https://github.com/kubernetes/kubernetes/pull/40691), [@Cynerva](https://github.com/Cynerva)) +* Splits Juju Charm layers into master/worker roles ([#40324](https://github.com/kubernetes/kubernetes/pull/40324), [@chuckbutler](https://github.com/chuckbutler)) + * Adds support for 1.5.x series of Kubernetes + * Introduces a tactic for keeping templates in sync with upstream eliminating template drift + * Adds CNI support to the Juju Charms + * Adds durable storage support to the Juju Charms + * Introduces an e2e Charm layer for repeatable testing efforts and validation of clusters + +### libvirt CoreOS +* To add local registry to libvirt_coreos ([#36751](https://github.com/kubernetes/kubernetes/pull/36751), [@sdminonne](https://github.com/sdminonne)) + +### GCE +* **the `gce` provider enables both RBAC authorization and the permissive legacy ABAC policy that makes all service accounts superusers. To opt out of the permissive ABAC policy, export the environment variable `ENABLE_LEGACY_ABAC=false` before running `cluster/kube-up.sh`. ([#43544](https://github.com/kubernetes/kubernetes/pull/43544), [@liggitt](https://github.com/liggitt))** +* **the `gce` provider ensures the bootstrap admin token user is included in the super-user group ([#39537](https://github.com/kubernetes/kubernetes/pull/39537), [@liggitt](https://github.com/liggitt))** +* Remove support for debian masters in GCE kube-up. ([#41666](https://github.com/kubernetes/kubernetes/pull/41666), [@mikedanese](https://github.com/mikedanese)) +* Remove support for trusty in GCE kube-up. ([#41670](https://github.com/kubernetes/kubernetes/pull/41670), [@mikedanese](https://github.com/mikedanese)) +* Don't fail if the grep fails to match any resources ([#41933](https://github.com/kubernetes/kubernetes/pull/41933), [@ixdy](https://github.com/ixdy)) +* Fix the output of health-mointor.sh ([#41525](https://github.com/kubernetes/kubernetes/pull/41525), [@yujuhong](https://github.com/yujuhong)) +* Added configurable etcd initial-cluster-state to kube-up script. ([#41332](https://github.com/kubernetes/kubernetes/pull/41332), [@jszczepkowski](https://github.com/jszczepkowski)) +* The kube-apiserver [basic audit log](https://kubernetes.io/docs/admin/audit/) can be enabled in GCE by exporting the environment variable `ENABLE_APISERVER_BASIC_AUDIT=true` before running `cluster/kube-up.sh`. This will log to `/var/log/kube-apiserver-audit.log` and use the same `logrotate` settings as `/var/log/kube-apiserver.log`. ([#41211](https://github.com/kubernetes/kubernetes/pull/41211), [@enisoc](https://github.com/enisoc)) +* On kube-up.sh clusters on GCE, kube-scheduler now contacts the API on the secured port. ([#41285](https://github.com/kubernetes/kubernetes/pull/41285), [@liggitt](https://github.com/liggitt)) +* Use existing ABAC policy file when upgrading GCE cluster ([#40172](https://github.com/kubernetes/kubernetes/pull/40172), [@liggitt](https://github.com/liggitt)) +* Ensure the GCI metadata files do not have newline at the end ([#38727](https://github.com/kubernetes/kubernetes/pull/38727), [@Amey-D](https://github.com/Amey-D)) +* Fixed detection of master during creation of multizone nodes cluster by kube-up. ([#38617](https://github.com/kubernetes/kubernetes/pull/38617), [@jszczepkowski](https://github.com/jszczepkowski)) +* Fixed validation of multizone cluster for GCE ([#38695](https://github.com/kubernetes/kubernetes/pull/38695), [@jszczepkowski](https://github.com/jszczepkowski)) +* Fix GCI mounter issue ([#38124](https://github.com/kubernetes/kubernetes/pull/38124), [@jingxu97](https://github.com/jingxu97)) +* Exit with error if <version number or publication> is not the final parameter. ([#37723](https://github.com/kubernetes/kubernetes/pull/37723), [@mtaufen](https://github.com/mtaufen)) +* GCI: Remove /var/lib/docker/network ([#37593](https://github.com/kubernetes/kubernetes/pull/37593), [@yujuhong](https://github.com/yujuhong)) +* Fix the equality checks for numeric values in cluster/gce/util.sh. ([#37638](https://github.com/kubernetes/kubernetes/pull/37638), [@roberthbailey](https://github.com/roberthbailey)) +* Modify GCI mounter to enable NFSv3 ([#37582](https://github.com/kubernetes/kubernetes/pull/37582), [@jingxu97](https://github.com/jingxu97)) +* Use gsed on the Mac ([#37562](https://github.com/kubernetes/kubernetes/pull/37562), [@roberthbailey](https://github.com/roberthbailey)) +* Bump GCI +* to gci-beta-56-9000-80-0 ([#41027](https://github.com/kubernetes/kubernetes/pull/41027), [@dchen1107](https://github.com/dchen1107)) +* to gci-stable-56-9000-84-2 ([#41819](https://github.com/kubernetes/kubernetes/pull/41819), [@dchen1107](https://github.com/dchen1107)) +* Bump GCE ContainerVM + * to container-vm-v20161208 ([release notes](https://cloud.google.com/compute/docs/containers/container_vms#changelog)) ([#38432](https://github.com/kubernetes/kubernetes/pull/38432), [@timstclair](https://github.com/timstclair)) + * to container-vm-v20170201 to address CVE-2016-9962. ([#40828](https://github.com/kubernetes/kubernetes/pull/40828), [@zmerlynn](https://github.com/zmerlynn)) + * to container-vm-v20170117 to pick up CVE fixes in base image. ([#40094](https://github.com/kubernetes/kubernetes/pull/40094), [@zmerlynn](https://github.com/zmerlynn)) + * to container-vm-v20170214 to address CVE-2016-9962. ([#41449](https://github.com/kubernetes/kubernetes/pull/41449), [@zmerlynn](https://github.com/zmerlynn)) + +### OpenStack +* Do not daemonize `salt-minion` for the openstack-heat provider. ([#40722](https://github.com/kubernetes/kubernetes/pull/40722), [@micmro](https://github.com/micmro)) +* OpenStack-Heat will now look for an image named "CentOS-7-x86_64-GenericCloud-1604". To restore the previous behavior set OPENSTACK_IMAGE_NAME="CentOS7" ([#40368](https://github.com/kubernetes/kubernetes/pull/40368), [@sc68cal](https://github.com/sc68cal)) +* Fixes a bug in the OpenStack-Heat kubernetes provider, in the handling of differences between the Identity v2 and Identity v3 APIs ([#40105](https://github.com/kubernetes/kubernetes/pull/40105), [@sc68cal](https://github.com/sc68cal)) + +### Container Images +* Update gcr.io/google-containers/rescheduler to v0.2.2, which uses busybox as a base image instead of ubuntu. ([#41911](https://github.com/kubernetes/kubernetes/pull/41911), [@ixdy](https://github.com/ixdy)) +* Remove unnecessary metrics (http/process/go) from being exposed by etcd-version-monitor ([#41807](https://github.com/kubernetes/kubernetes/pull/41807), [@shyamjvs](https://github.com/shyamjvs)) +* Align the hyperkube image to support running binaries at /usr/local/bin/ like the other server images ([#41017](https://github.com/kubernetes/kubernetes/pull/41017), [@luxas](https://github.com/luxas)) +* Bump up GLBC version from 0.9.0-beta to 0.9.1 ([#41037](https://github.com/kubernetes/kubernetes/pull/41037), [@bprashanth](https://github.com/bprashanth)) + +### Other Notable Changes +* The default client certificate generated by kube-up now contains the superuser `system:masters` group ([#39966](https://github.com/kubernetes/kubernetes/pull/39966), [@liggitt](https://github.com/liggitt)) +* Added support for creating HA clusters for centos using kube-up.sh. ([#39462](https://github.com/kubernetes/kubernetes/pull/39462), [@Shawyeok](https://github.com/Shawyeok)) +* Enable lazy inode table and journal initialization for ext3 and ext4 ([#38865](https://github.com/kubernetes/kubernetes/pull/38865), [@codablock](https://github.com/codablock)) +* Since `kubernetes.tar.gz` no longer includes client or server binaries, `cluster/kube-{up,down,push}.sh` now automatically download released binaries if they are missing. ([#38730](https://github.com/kubernetes/kubernetes/pull/38730), [@ixdy](https://github.com/ixdy)) +* Fix broken cluster/centos and enhance the style ([#34002](https://github.com/kubernetes/kubernetes/pull/34002), [@xiaoping378](https://github.com/xiaoping378)) +* Set kernel.softlockup_panic =1 based on the flag. ([#38001](https://github.com/kubernetes/kubernetes/pull/38001), [@dchen1107](https://github.com/dchen1107)) +* Configure local-up-cluster.sh to handle auth proxies ([#36838](https://github.com/kubernetes/kubernetes/pull/36838), [@deads2k](https://github.com/deads2k)) +* `kube-up.sh`/`kube-down.sh` no longer force update gcloud for provider=gce|gke. ([#36292](https://github.com/kubernetes/kubernetes/pull/36292), [@jlowdermilk](https://github.com/jlowdermilk)) +* Collect logs for dead kubelets too ([#37671](https://github.com/kubernetes/kubernetes/pull/37671), [@mtaufen](https://github.com/mtaufen)) + +## Changes to Addons + +### Dashboard +* Update dashboard version to v1.6.0 ([#43210](https://github.com/kubernetes/kubernetes/pull/43210), [@floreks](https://github.com/floreks)) + +### DNS +* Updates the dnsmasq cache/mux layer to be managed by dnsmasq-nanny. ([#41826](https://github.com/kubernetes/kubernetes/pull/41826), [@bowei](https://github.com/bowei)) + dnsmasq-nanny manages dnsmasq based on values from the + kube-system:kube-dns configmap: + ``` + "stubDomains": { + "acme.local": ["1.2.3.4"] + }, + ``` + + is a map of domain to list of nameservers for the domain. This is used + to inject private DNS domains into the kube-dns namespace. In the above + example, any DNS requests for `*.acme.local` will be served by the + ``` + nameserver 1.2.3.4. + ``` + + ``` + upstreamNameservers": ["8.8.8.8", "8.8.4.4"] + ``` + is a list of upstreamNameservers to use, overriding the configuration + specified in `/etc/resolv.conf`. +* `kube-dns` now runs using a separate `system:serviceaccount:kube-system:kube-dns` service account which is automatically bound to the correct RBAC permissions. ([#38816](https://github.com/kubernetes/kubernetes/pull/38816), [@deads2k](https://github.com/deads2k)) +* Use kube-dns:1.11.0 ([#39925](https://github.com/kubernetes/kubernetes/pull/39925), [@sadlil](https://github.com/sadlil)) + +### DNS Autoscaler +* Patch CVE-2016-8859 in gcr.io/google-containers/cluster-proportional-autoscaler-amd64 ([#42933](https://github.com/kubernetes/kubernetes/pull/42933), [@timstclair](https://github.com/timstclair)) + +### Cluster Autoscaler +* Allow the Horizontal Pod Autoscaler controller to talk to the metrics API and custom metrics API as standard APIs. ([#41824](https://github.com/kubernetes/kubernetes/pull/41824), [@DirectXMan12](https://github.com/DirectXMan12)) + +### Cluster Load Balancing +* Update defaultbackend image to 1.3 ([#42212](https://github.com/kubernetes/kubernetes/pull/42212), [@timstclair](https://github.com/timstclair)) + +### etcd Empty Dir Cleanup +* Base etcd-empty-dir-cleanup on busybox, run as nobody, and update to etcdctl 3.0.14 ([#41674](https://github.com/kubernetes/kubernetes/pull/41674), [@ixdy](https://github.com/ixdy)) + +### Fluentd +* Migrated fluentd addon to daemon set ([#32088](https://github.com/kubernetes/kubernetes/pull/32088), [@piosz](https://github.com/piosz)) +* Fluentd was migrated to Daemon Set, which targets nodes with beta.kubernetes.io/fluentd-ds-ready=true label. If you use fluentd in your cluster please make sure that the nodes with version 1.6+ contains this label. ([#42931](https://github.com/kubernetes/kubernetes/pull/42931), [@piosz](https://github.com/piosz)) +* Fluentd-gcp containers spawned by DaemonSet are now configured using ConfigMap ([#42126](https://github.com/kubernetes/kubernetes/pull/42126), [@crassirostris](https://github.com/crassirostris)) +* Cleanup fluentd-gcp image: rebase on debian-base, switch to upstream packages, remove fluent-ui & rails ([#41998](https://github.com/kubernetes/kubernetes/pull/41998), [@timstclair](https://github.com/timstclair)) +* On GCE, the apiserver audit log (`/var/log/kube-apiserver-audit.log`) will be sent through fluentd if enabled. It will go to the same place as `kube-apiserver.log`, but tagged as its own stream. ([#41360](https://github.com/kubernetes/kubernetes/pull/41360), [@enisoc](https://github.com/enisoc)) +* If `experimentalCriticalPodAnnotation` feature gate is set to true, fluentd pods will not be evicted by the kubelet. ([#41035](https://github.com/kubernetes/kubernetes/pull/41035), [@vishh](https://github.com/vishh)) +* fluentd config for GKE clusters updated: detect exceptions in container log streams and forward them as one log entry. ([#39656](https://github.com/kubernetes/kubernetes/pull/39656), [@thomasschickinger](https://github.com/thomasschickinger)) +* Make fluentd pods critical ([#39146](https://github.com/kubernetes/kubernetes/pull/39146), [@crassirostris](https://github.com/crassirostris)) +* Fluentd/Elastisearch add-on: correctly parse and index kubernetes labels ([#36857](https://github.com/kubernetes/kubernetes/pull/36857), [@Shrugs](https://github.com/Shrugs)) + +### Heapster +* Bumped Heapster to v1.3.0. ([#43298](https://github.com/kubernetes/kubernetes/pull/43298), [@piosz](https://github.com/piosz)) + * More details about the release https://github.com/kubernetes/heapster/releases/tag/v1.3.0 + +### Registry +* Use daemonset in docker registry add on ([#35582](https://github.com/kubernetes/kubernetes/pull/35582), [@surajssd](https://github.com/surajssd)) +* contribute deis/registry-proxy as a replacement for kube-registry-proxy ([#35797](https://github.com/kubernetes/kubernetes/pull/35797), [@bacongobbler](https://github.com/bacongobbler)) + +## External Dependency Version Information + +Continuous integration builds have used the following versions of external dependencies, however, this is not a strong recommendation and users should consult an appropriate installation or upgrade guide before deciding what versions of etcd, docker or rkt to use. + +* Docker versions 1.10.3, 1.11.2, 1.12.6 have been validated + * Docker version 1.12.6 known issues + * overlay2 driver not fully supported + * live-restore not fully supported + * no shared pid namespace support + * Docker version 1.11.2 known issues + * Kernel crash with Aufs storage driver on Debian Jessie ([#27885](https://github.com/kubernetes/kubernetes/issues/27885)) + which can be identified by the [node problem detector](http://kubernetes.io/docs/admin/node-problem/) + * Leaked File descriptors ([#275](https://github.com/docker/containerd/issues/275)) + * Additional memory overhead per container ([#21737](https://github.com/docker/docker/issues/21737)) + * Docker 1.10.3 contains [backports provided by RedHat](https://github.com/docker/docker/compare/v1.10.3...runcom:docker-1.10.3-stable) for known issues + * Support for Docker version 1.9.x has been removed +* rkt version 1.23.0+ + * known issues with the rkt runtime are [listed in the Getting Started Guide](http://kubernetes.io/docs/getting-started-guides/rkt/notes/) +* etcd version 3.0.17 +## Changelog since v1.6.0-rc.1 + + +### Previous Releases Included in v1.6.0 +- [v1.6.0-rc.1](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md#v160-rc1) +- [v1.6.0-beta.4](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md#v160-beta4) +- [v1.6.0-beta.3](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md#v160-beta3) +- [v1.6.0-beta.2](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md#v160-beta2) +- [v1.6.0-beta.1](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md#v160-beta1) +- [v1.6.0-alpha.3](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md#v160-alpha3) +- [v1.6.0-alpha.2](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md#v160-alpha2) +- [v1.6.0-alpha.1](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md#v160-alpha1) +**No notable changes for this release** + + + +# v1.6.0-rc.1 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.6/examples) + +## Downloads for v1.6.0-rc.1 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.6.0-rc.1/kubernetes.tar.gz) | `b92be4b71184888ba4a2781d4068ea369442b6030dfb38e23029192a554651e5` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.6.0-rc.1/kubernetes-src.tar.gz) | `e45e993edfdba176a6750c6d3c2207d54d60b5b1fc80a0fe47274d4d9b233d66` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.6.0-rc.1/kubernetes-client-darwin-386.tar.gz) | `1d56088fb85fba02362f7f87a5d5f899c05caa605f4d11b8616749cb0d970384` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.6.0-rc.1/kubernetes-client-darwin-amd64.tar.gz) | `f3df7b558c2ecf6ed8344668515f436b7211a2f840d982f81c55586e1ec84a7b` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.6.0-rc.1/kubernetes-client-linux-386.tar.gz) | `c5ee1787d69d508d8448675428936d70e21f17b21ff44e22db4462483adcebe2` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.0-rc.1/kubernetes-client-linux-amd64.tar.gz) | `0960505da11330c8cc66b7df4e4413680afd2a62afc2341bad6bbd88c73e3a56` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.0-rc.1/kubernetes-client-linux-arm64.tar.gz) | `dc113881b9cd09ef8cecbdf8f4ff41eddeba7df3ad7af70461e513eb79757e54` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.6.0-rc.1/kubernetes-client-linux-arm.tar.gz) | `5f6bd182852ffe3776b520fbf2db3546c8246133df166dcf6c81ece4b0974227` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.0-rc.1/kubernetes-client-linux-ppc64le.tar.gz) | `ea91e79a779eac8c00a5eb80be1fd5b227b9f5ae767e30a12354bfa691f198d5` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.0-rc.1/kubernetes-client-linux-s390x.tar.gz) | `874d7410078d39b80fe07a44018f6e95655cb9e05c99ec66dea012d06633fbbb` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.6.0-rc.1/kubernetes-client-windows-386.tar.gz) | `b02d6d8e436322294a65def8c9c576f232df9387093c4ca61e57dd3bdf184b87` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.6.0-rc.1/kubernetes-client-windows-amd64.tar.gz) | `68dbf06824b3785027a85d448f9f2b9928a4092912b382e67c1579e30bb58bbd` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.0-rc.1/kubernetes-server-linux-amd64.tar.gz) | `aa9e5d1cb60c1d33d048a75003fdce9ffa0985ede3748b38b4357d961943d603` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.0-rc.1/kubernetes-server-linux-arm64.tar.gz) | `0343a1dead1efb8b829ab485028d2ec58ffc4aa7845b3415da5a5bb6fd8bcbfd` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.6.0-rc.1/kubernetes-server-linux-arm.tar.gz) | `77a724b28e071e92113759440fdca7e12ea00c5b41a5334ce7581a0139d8f264` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.0-rc.1/kubernetes-server-linux-ppc64le.tar.gz) | `ae21bc7cced29a3c20c76dbf57262a8ea276fe120e411d950ff5267fe4b6cd50` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.0-rc.1/kubernetes-server-linux-s390x.tar.gz) | `424f5cd9f4aee3e53a8a760ccdc16bd7e2683913e57d56519b536bf4a98f56e5` + +## Changelog since v1.6.0-beta.4 + +### Other notable changes + +* `kube-up.sh` using the `gce` provider enables both RBAC authorization and the permissive legacy ABAC policy that makes all service accounts superusers. To opt out of the permissive ABAC policy, export the environment variable `ENABLE_LEGACY_ABAC=false` before running `cluster/kube-up.sh`. ([#43544](https://github.com/kubernetes/kubernetes/pull/43544), [@liggitt](https://github.com/liggitt)) +* Bump CNI consumers to v0.5.1 ([#43546](https://github.com/kubernetes/kubernetes/pull/43546), [@calebamiles](https://github.com/calebamiles)) +* The API server discovery document now prioritizes the `extensions` API group over the `apps` API group. This ensures certain commands in 1.5 versions of kubectl (such as `kubectl edit deployment`) continue to function against a 1.6 API. ([#43553](https://github.com/kubernetes/kubernetes/pull/43553), [@liggitt](https://github.com/liggitt)) +* Fix adding disks to more than one scsi adapter. ([#42422](https://github.com/kubernetes/kubernetes/pull/42422), [@kerneltime](https://github.com/kerneltime)) +* PodSecurityPolicy authorization is correctly enforced by the PodSecurityPolicy admission plugin. ([#43489](https://github.com/kubernetes/kubernetes/pull/43489), [@liggitt](https://github.com/liggitt)) +* API fields that previously serialized null arrays as `null` and empty arrays as `[]` no longer distinguish between those values and always output `[]` when serializing to JSON. ([#43422](https://github.com/kubernetes/kubernetes/pull/43422), [@liggitt](https://github.com/liggitt)) +* Apply taint tolerations for NoExecute for all static pods. ([#43116](https://github.com/kubernetes/kubernetes/pull/43116), [@dchen1107](https://github.com/dchen1107)) +* Bumped Heapster to v1.3.0. ([#43298](https://github.com/kubernetes/kubernetes/pull/43298), [@piosz](https://github.com/piosz)) + * More details about the release https://github.com/kubernetes/heapster/releases/tag/v1.3.0 + + + +# v1.6.0-beta.4 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.6/examples) + +## Downloads for v1.6.0-beta.4 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.6.0-beta.4/kubernetes.tar.gz) | `8f308a87bcc367656c777f74270a82ad6986517c28a08c7158c77b1d7954e243` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.6.0-beta.4/kubernetes-src.tar.gz) | `3ba73cf27a05f78026d1cfb3a0e47c6e5e33932aefc630a0a5aa3619561bc4dc` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.6.0-beta.4/kubernetes-client-darwin-386.tar.gz) | `7007e8024257fd2436c9f68ddb25383e889d58379e30a60c9bb6bffb1a6809df` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.6.0-beta.4/kubernetes-client-darwin-amd64.tar.gz) | `f1bc3f0c8e4c8c9e0aa2f66fffea163a5bf139d528160eb4266cd5322cf112e1` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.6.0-beta.4/kubernetes-client-linux-386.tar.gz) | `7ceb47d4b282b31d300aa7a81bf00eef744fb58df58d613e1ea01930287c85d9` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.0-beta.4/kubernetes-client-linux-amd64.tar.gz) | `d25c73f0ebb3338fc3e674d4a667d3023d073b8bc4942eb98f1a3fc9001675ef` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.0-beta.4/kubernetes-client-linux-arm64.tar.gz) | `3d5a1188f638cddad7cd5eca0668d25f46a6a6f80641a8e9e6f3777a23af0f7c` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.6.0-beta.4/kubernetes-client-linux-arm.tar.gz) | `e9d40ad06385266cd993adf436270972412dd5407d436e682bddf30706fddbda` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.0-beta.4/kubernetes-client-linux-ppc64le.tar.gz) | `17f9a60eb6175e28aa0a9ba534cc0ceda24ff8ab81eaf06d04c362146f707e81` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.0-beta.4/kubernetes-client-linux-s390x.tar.gz) | `30017ac4603bda496a125162cd956e9e874a4d04eff170972c72c8095a9f9121` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.6.0-beta.4/kubernetes-client-windows-386.tar.gz) | `6165b8d0781894b36b2f2cd72d79063ce95621012cd1ca38bd7d936feeea8416` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.6.0-beta.4/kubernetes-client-windows-amd64.tar.gz) | `ac45e5ddf44dd0a680abc5641ae1cb59ad9c7ab8d4132e3b110ebca7ed2119ac` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.0-beta.4/kubernetes-server-linux-amd64.tar.gz) | `a37f0b431aea2cc7e259ddf118fd42315589236106b279de5803e2d50af08531` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.0-beta.4/kubernetes-server-linux-arm64.tar.gz) | `e6a5c8a9e59a12df5294766a4e31e08603a041dd75bcc23f19fb7d20d8a30b9a` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.6.0-beta.4/kubernetes-server-linux-arm.tar.gz) | `ebe1ccf95a80a829c294fe8bb216a10a096bc7f311fb0f74b7a121772c4d238b` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.0-beta.4/kubernetes-server-linux-ppc64le.tar.gz) | `8a09baa5c2ddfbc579a1601f76b7079dab695c1423d22a04acd039256e26355c` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.0-beta.4/kubernetes-server-linux-s390x.tar.gz) | `621feb08ac3bee0b9f5b31c648b3011f91883c44954db04268c0da4ef59f16f1` + +## Changelog since v1.6.0-beta.3 + +### Other notable changes + +* Update dashboard version to v1.6.0 ([#43210](https://github.com/kubernetes/kubernetes/pull/43210), [@floreks](https://github.com/floreks)) +* Update photon controller go SDK in vendor code. ([#43108](https://github.com/kubernetes/kubernetes/pull/43108), [@luomiao](https://github.com/luomiao)) +* Fluentd was migrated to Daemon Set, which targets nodes with beta.kubernetes.io/fluentd-ds-ready=true label. If you use fluentd in your cluster please make sure that the nodes with version 1.6+ contains this label. ([#42931](https://github.com/kubernetes/kubernetes/pull/42931), [@piosz](https://github.com/piosz)) +* if kube-apiserver is started with `--storage-backend=etcd2`, the media type `application/json` is used. ([#43122](https://github.com/kubernetes/kubernetes/pull/43122), [@liggitt](https://github.com/liggitt)) +* Add -p to mkdirs in gci-mounter function of gce configure.sh script ([#43134](https://github.com/kubernetes/kubernetes/pull/43134), [@shyamjvs](https://github.com/shyamjvs)) +* Rescheduler uses taints in v1beta1 and will remove old ones (in version v1alpha1) right after its start. ([#43106](https://github.com/kubernetes/kubernetes/pull/43106), [@piosz](https://github.com/piosz)) +* kubeadm: `kubeadm reset` won't drain and remove the current node anymore ([#42713](https://github.com/kubernetes/kubernetes/pull/42713), [@luxas](https://github.com/luxas)) +* hack/godep-restore.sh: use godep v79 which works ([#42965](https://github.com/kubernetes/kubernetes/pull/42965), [@sttts](https://github.com/sttts)) +* Patch CVE-2016-8859 in gcr.io/google-containers/cluster-proportional-autoscaler-amd64 ([#42933](https://github.com/kubernetes/kubernetes/pull/42933), [@timstclair](https://github.com/timstclair)) +* Disable devicemapper thin_ls due to excessive iops ([#42899](https://github.com/kubernetes/kubernetes/pull/42899), [@dashpole](https://github.com/dashpole)) + + + +# v1.6.0-beta.3 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.6/examples) + +## Downloads for v1.6.0-beta.3 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.6.0-beta.3/kubernetes.tar.gz) | `3903f0a49945abe26f5775c20deb25ba65a8607a2944da8802255bd50d20aca7` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.6.0-beta.3/kubernetes-src.tar.gz) | `62f5f9459c14163e319f878494d10296052d75345da7906e8b38a2d6d0d2a25c` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.6.0-beta.3/kubernetes-client-darwin-386.tar.gz) | `1294256f09d3a78a05cf2c85466495b08f87830911e68fd0206964f0466682e3` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.6.0-beta.3/kubernetes-client-darwin-amd64.tar.gz) | `ff6d8561163d9039c807f4cf05144dd3837104b111fac1ae4b667e2b8548d135` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.6.0-beta.3/kubernetes-client-linux-386.tar.gz) | `d32a07b4a24a88cfee589cff91336e411a89ed470557b8f74f34bb6636adc800` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.0-beta.3/kubernetes-client-linux-amd64.tar.gz) | `e3663e134cd42bbf71f4f6f0395e6c3ea2080d8621bdab9cc668c77f5478196a` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.0-beta.3/kubernetes-client-linux-arm64.tar.gz) | `39465c409396a4cc0ae672f0f0c0db971e482de52e9dff835eb43a8f7e3412e9` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.6.0-beta.3/kubernetes-client-linux-arm.tar.gz) | `8897b38e59cee396213f50453bdcb88808cd56d63be762362d79454ce526b1ea` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.0-beta.3/kubernetes-client-linux-ppc64le.tar.gz) | `a32b85c5e495dd3645845f2e8ff0eb366fb4ae4795e2bdafceae97cfe71e34b5` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.0-beta.3/kubernetes-client-linux-s390x.tar.gz) | `0af4f0d7778cb67c1acc3b2f3870283e3008c6e1ea8d532c6b90b5a7f1475db8` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.6.0-beta.3/kubernetes-client-windows-386.tar.gz) | `b298561b924c8c88b062759cc69b733187310a7e1af74b1b3987ed256f422b05` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.6.0-beta.3/kubernetes-client-windows-amd64.tar.gz) | `42ec39178885bb06cba4002844e80948e0c9c3618bfb0a009618a3fab1797a69` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.0-beta.3/kubernetes-server-linux-amd64.tar.gz) | `333ea0cf5c25f65dbb5d353cac002af3fa5e6f8431e81eaba2534005164c9ce9` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.0-beta.3/kubernetes-server-linux-arm64.tar.gz) | `2979a04409863f6e4dbc745eebfd57ee90e0b38ed4449dcb15cfd87d8f80dadc` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.6.0-beta.3/kubernetes-server-linux-arm.tar.gz) | `2ed1e98b2566b4f552951d9496537b18b28ae53eb9e36c6fd17202e9e498eae5` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.0-beta.3/kubernetes-server-linux-ppc64le.tar.gz) | `f4989351a6a98746c1d269d72d2fa87dba8ce782bdfc088d9f7f8d10029aa3fe` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.0-beta.3/kubernetes-server-linux-s390x.tar.gz) | `31fb764136e97e851d1640464154f3ce4fc696e3286314f538da7b19eed3e2fe` + +## Changelog since v1.6.0-beta.2 + +### Other notable changes + +* Introduce new generator for apps/v1beta1 deployments ([#42362](https://github.com/kubernetes/kubernetes/pull/42362), [@soltysh](https://github.com/soltysh)) +* Use Prometheus instrumentation conventions ([#36704](https://github.com/kubernetes/kubernetes/pull/36704), [@fabxc](https://github.com/fabxc)) +* Add new DaemonSet status fields to kubectl printer and describer. ([#42843](https://github.com/kubernetes/kubernetes/pull/42843), [@janetkuo](https://github.com/janetkuo)) +* Dropped the support for docker 1.9.x and the belows. ([#42694](https://github.com/kubernetes/kubernetes/pull/42694), [@dchen1107](https://github.com/dchen1107)) + + + +# v1.6.0-beta.2 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.6/examples) + +## Downloads for v1.6.0-beta.2 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.6.0-beta.2/kubernetes.tar.gz) | `8199c781f8c98ed7048e939a590ea10a6c39f6a74bd35ed526b459fa18e20f50` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.6.0-beta.2/kubernetes-src.tar.gz) | `f8de26ab6493d4547f9068f5ef396650c169702863535ba63feaf815464a6702` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.6.0-beta.2/kubernetes-client-darwin-386.tar.gz) | `0b2350c5ffec582f86d2bd95fa9ecd1b4213fbcd3af79f2a7f67d071c3a0373f` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.6.0-beta.2/kubernetes-client-darwin-amd64.tar.gz) | `a1c81457a34258f2622f841b9971ba490c66f6a0f5725c089430d0f0fb09dc8c` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.6.0-beta.2/kubernetes-client-linux-386.tar.gz) | `40d45492f6741980afde0c83bb752382b699b3d62ac36203faca16fcd9fadd21` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.0-beta.2/kubernetes-client-linux-amd64.tar.gz) | `a06baf31249b06375fde1f608ffea041bdbad0f4814ba8ea69839a7778fa4646` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.0-beta.2/kubernetes-client-linux-arm64.tar.gz) | `d9e18ceb7efacee5cc2a579e204919bb4c272c586bc15750963946e7fe5dc741` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.6.0-beta.2/kubernetes-client-linux-arm.tar.gz) | `7abc1a2e5c0e40b46b9839b9c9ca065fceec486413ee3c0687e832dc668560ca` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.0-beta.2/kubernetes-client-linux-ppc64le.tar.gz) | `84d82f1c2a2b07bea7c827c20cc208f0741b72cf732319673edbf73b42f1b687` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.0-beta.2/kubernetes-client-linux-s390x.tar.gz) | `605852ee99117abb5bf62f4239c7e2c7e3976f1f497e24ffed50ba4817c301dc` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.6.0-beta.2/kubernetes-client-windows-386.tar.gz) | `2c442dbfaa393f67f2fe2a1fd2c10267092e99385ca40f7bed732d48bb36ae62` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.6.0-beta.2/kubernetes-client-windows-amd64.tar.gz) | `6b64521cde0b239d9e23e0896919653dfe30ad064d363a9931305feefe04b359` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.0-beta.2/kubernetes-server-linux-amd64.tar.gz) | `0a49f719cd295be9a4947b7b8b0fe68c29d8168d7e03a9e37173de340490b578` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.0-beta.2/kubernetes-server-linux-arm64.tar.gz) | `fb1464794b9e6375cc7f5b8b72125d81921416b6825fe2c37073aef006e846d1` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.6.0-beta.2/kubernetes-server-linux-arm.tar.gz) | `27acc02302c6d45ef6314a2bceca6012e35c88d0678b219528d21d8ee4c6b424` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.0-beta.2/kubernetes-server-linux-ppc64le.tar.gz) | `8eef21ab0700ba2802ef70d2c0b84ee0b27ae0833d2259d425429984f972690e` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.0-beta.2/kubernetes-server-linux-s390x.tar.gz) | `c6e383f897ceb8143a7b1f023e155c9c39e9e7c220e989cc6c1bfcffdb886dd5` + +## Changelog since v1.6.0-beta.1 + +### Action Required + +* Deployment now fully respects ControllerRef to avoid fighting over Pods and ReplicaSets. At the time of upgrade, **you must not have Deployments with selectors that overlap**, or else [ownership of ReplicaSets may change](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md#upgrading). ([#42175](https://github.com/kubernetes/kubernetes/pull/42175), [@enisoc](https://github.com/enisoc)) +* StatefulSet now respects ControllerRef to avoid fighting over Pods. At the time of upgrade, **you must not have StatefulSets with selectors that overlap** with any other controllers (such as ReplicaSets), or else [ownership of Pods may change](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md#upgrading). ([#42080](https://github.com/kubernetes/kubernetes/pull/42080), [@enisoc](https://github.com/enisoc)) + +### Other notable changes + +* DaemonSet now respects ControllerRef to avoid fighting over Pods. ([#42173](https://github.com/kubernetes/kubernetes/pull/42173), [@enisoc](https://github.com/enisoc)) +* restored normalization of custom `--etcd-prefix` when `--storage-backend` is set to etcd3 ([#42506](https://github.com/kubernetes/kubernetes/pull/42506), [@liggitt](https://github.com/liggitt)) +* kubelet created cgroups follow lowercase naming conventions ([#42497](https://github.com/kubernetes/kubernetes/pull/42497), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* Support whitespace in command path for gcp auth plugin ([#41653](https://github.com/kubernetes/kubernetes/pull/41653), [@jlowdermilk](https://github.com/jlowdermilk)) +* Updates the dnsmasq cache/mux layer to be managed by dnsmasq-nanny. ([#41826](https://github.com/kubernetes/kubernetes/pull/41826), [@bowei](https://github.com/bowei)) + * dnsmasq-nanny manages dnsmasq based on values from the + * kube-system:kube-dns configmap: + * "stubDomains": { + * "acme.local": ["1.2.3.4"] + * }, + * is a map of domain to list of nameservers for the domain. This is used + * to inject private DNS domains into the kube-dns namespace. In the above + * example, any DNS requests for *.acme.local will be served by the + * nameserver 1.2.3.4. + * "upstreamNameservers": ["8.8.8.8", "8.8.4.4"] + * is a list of upstreamNameservers to use, overriding the configuration + * specified in /etc/resolv.conf. +* kubelet exports metrics for cgroup management ([#41988](https://github.com/kubernetes/kubernetes/pull/41988), [@sjenning](https://github.com/sjenning)) +* kubectl: respect deployment strategy parameters for rollout status ([#41809](https://github.com/kubernetes/kubernetes/pull/41809), [@kargakis](https://github.com/kargakis)) +* Remove cmd/kube-discovery from the tree since it's not necessary anymore ([#42070](https://github.com/kubernetes/kubernetes/pull/42070), [@luxas](https://github.com/luxas)) +* kubeadm: Hook up kubeadm against the BootstrapSigner ([#41417](https://github.com/kubernetes/kubernetes/pull/41417), [@luxas](https://github.com/luxas)) +* Federated Ingress over GCE no longer requires separate firewall rules to be created for each cluster to circumvent flapping firewall health checks. ([#41942](https://github.com/kubernetes/kubernetes/pull/41942), [@csbell](https://github.com/csbell)) +* ScaleIO Kubernetes Volume Plugin added enabling pods to seamlessly access and use data stored on ScaleIO volumes. ([#38924](https://github.com/kubernetes/kubernetes/pull/38924), [@vladimirvivien](https://github.com/vladimirvivien)) +* Pods are launched in a separate cgroup hierarchy than system services. ([#42350](https://github.com/kubernetes/kubernetes/pull/42350), [@vishh](https://github.com/vishh)) +* Experimental support to reserve a pod's memory request from being utilized by pods in lower QoS tiers. ([#41149](https://github.com/kubernetes/kubernetes/pull/41149), [@sjenning](https://github.com/sjenning)) +* Juju: Disable anonymous auth on kubelet ([#41919](https://github.com/kubernetes/kubernetes/pull/41919), [@Cynerva](https://github.com/Cynerva)) +* Remove support for debian masters in GCE kube-up. ([#41666](https://github.com/kubernetes/kubernetes/pull/41666), [@mikedanese](https://github.com/mikedanese)) +* Implement bulk polling of volumes ([#41306](https://github.com/kubernetes/kubernetes/pull/41306), [@gnufied](https://github.com/gnufied)) +* stop kubectl edit from updating the last-applied-configuration annotation when --save-config is unspecified or false. ([#41924](https://github.com/kubernetes/kubernetes/pull/41924), [@ymqytw](https://github.com/ymqytw)) + + + +# v1.6.0-beta.1 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.6/examples) + +## Downloads for v1.6.0-beta.1 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.6.0-beta.1/kubernetes.tar.gz) | `ca17c4f1ebdd4bbbd0e570bf3a29d52be1e962742155bc5e20765434f3141f2d` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.6.0-beta.1/kubernetes-src.tar.gz) | `4aefc25b42594f0aab48e43608c8ef6eca8c115022fcc76a9a0d34430e33be0f` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.6.0-beta.1/kubernetes-client-darwin-386.tar.gz) | `7629da89467e758e6e70c513d5332e6231941de60e99b6621376bc72f9ede314` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.6.0-beta.1/kubernetes-client-darwin-amd64.tar.gz) | `3a6d6f78ca307486189c7a92e874508233d6b9b5697a0c42cb2803f4b17ccfb2` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.6.0-beta.1/kubernetes-client-linux-386.tar.gz) | `544b944fdcbebb0dbf0e1acedf7e1deb40fd795c46b8f5afe5d622d2091f0ac9` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.0-beta.1/kubernetes-client-linux-amd64.tar.gz) | `d13f3bede2beb1d7fbca7f01a2c0775938d9127073b0fa1cecba4fd152947eae` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.0-beta.1/kubernetes-client-linux-arm64.tar.gz) | `8820b18ae1c3bdcb8c93b5641e9322aa8dba25ec42362aa86ecbe6ae690a9809` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.6.0-beta.1/kubernetes-client-linux-arm.tar.gz) | `d928f7e772a74cf715cf382d66ba757394afcf02a03727edfe43305f279fdb87` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.0-beta.1/kubernetes-client-linux-ppc64le.tar.gz) | `56ccc3a9def527278cd41ba1ce5b0528238ef7b7b5886d6ebc944b11e2f5228c` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.0-beta.1/kubernetes-client-linux-s390x.tar.gz) | `4923b9617b5306b321e47450bbfe701242b46b2d27800d82a7289fbabe7a107d` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.6.0-beta.1/kubernetes-client-windows-386.tar.gz) | `598703591fa2be13cc47930088117fc12731431b679f8ca2a5717430bb45fb93` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.6.0-beta.1/kubernetes-client-windows-amd64.tar.gz) | `9e839346effcbe9c469519002967069c8d109282aaceb72e02f25cf606a691b2` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.0-beta.1/kubernetes-server-linux-amd64.tar.gz) | `726b9e4ead829ebd293fe6674ab334f72aa163b1544963febb9bc35d1fb26e6f` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.0-beta.1/kubernetes-server-linux-arm64.tar.gz) | `975d02629619d441f60442ca07c42721e103e9e5bbcc2eea302b7c936303d26b` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.6.0-beta.1/kubernetes-server-linux-arm.tar.gz) | `98223dd80f34eed3cdb30fb57df1da96630db9c0f04aae6a685e22a29c16398d` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.0-beta.1/kubernetes-server-linux-ppc64le.tar.gz) | `a73715b7db73d6d0ad0b78b01829fe9f22566b557eebe2c1a960a81693b0c8b5` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.0-beta.1/kubernetes-server-linux-s390x.tar.gz) | `d3cb54e9193c773ea9998106c75bb3f0af705477fb844bcc8f82c845c44bb00d` + +## Changelog since v1.6.0-alpha.3 + +### Action Required + +* The --dns-provider argument of 'kubefed init' is now mandatory and does not default to `google-clouddns`. To initialize a Federation control plane with Google Cloud DNS, use the following invocation: 'kubefed init --dns-provider=google-clouddns' ([#42092](https://github.com/kubernetes/kubernetes/pull/42092), [@marun](https://github.com/marun)) +* Change taints/tolerations to api fields ([#38957](https://github.com/kubernetes/kubernetes/pull/38957), [@aveshagarwal](https://github.com/aveshagarwal)) + +### Other notable changes + +* kubeadm: Rename some flags for beta UI and fixup some logic ([#42064](https://github.com/kubernetes/kubernetes/pull/42064), [@luxas](https://github.com/luxas)) +* StorageClassName attribute has been added to PersistentVolume and PersistentVolumeClaim objects and should be used instead of annotation `volume.beta.kubernetes.io/storage-class`. The beta annotation is still working in this release, however it will be removed in a future release. ([#42128](https://github.com/kubernetes/kubernetes/pull/42128), [@jsafrane](https://github.com/jsafrane)) +* Remove Azure kube-up as the Azure community has focused efforts elsewhere. ([#41672](https://github.com/kubernetes/kubernetes/pull/41672), [@mikedanese](https://github.com/mikedanese)) +* Fluentd-gcp containers spawned by DaemonSet are now configured using ConfigMap ([#42126](https://github.com/kubernetes/kubernetes/pull/42126), [@Crassirostris](https://github.com/Crassirostris)) +* Modified kubemark startup scripts to restore master on reboot ([#41980](https://github.com/kubernetes/kubernetes/pull/41980), [@shyamjvs](https://github.com/shyamjvs)) +* Added new Api `PodPreset` to enable defining cross-cutting injection of Volumes and Environment into Pods. ([#41931](https://github.com/kubernetes/kubernetes/pull/41931), [@jessfraz](https://github.com/jessfraz)) +* AWS cloud provider: allow to run the master with a different AWS account or even on a different cloud provider than the nodes. ([#39996](https://github.com/kubernetes/kubernetes/pull/39996), [@scheeles](https://github.com/scheeles)) +* Update defaultbackend image to 1.3 ([#42212](https://github.com/kubernetes/kubernetes/pull/42212), [@timstclair](https://github.com/timstclair)) +* Allow the Horizontal Pod Autoscaler controller to talk to the metrics API and custom metrics API as standard APIs. ([#41824](https://github.com/kubernetes/kubernetes/pull/41824), [@DirectXMan12](https://github.com/DirectXMan12)) +* Implement support for mount options in PVs ([#41906](https://github.com/kubernetes/kubernetes/pull/41906), [@gnufied](https://github.com/gnufied)) +* Introduce apps/v1beta1.Deployments resource with modified defaults compared to extensions/v1beta1.Deployments. ([#39683](https://github.com/kubernetes/kubernetes/pull/39683), [@soltysh](https://github.com/soltysh)) +* Add DNS suffix search list support in Windows kube-proxy. ([#41618](https://github.com/kubernetes/kubernetes/pull/41618), [@JiangtianLi](https://github.com/JiangtianLi)) +* `--experimental-nvidia-gpus` flag is **replaced** by `Accelerators` alpha feature gate along with support for multiple Nvidia GPUs. ([#42116](https://github.com/kubernetes/kubernetes/pull/42116), [@vishh](https://github.com/vishh)) + * To use GPUs, pass `Accelerators=true` as part of `--feature-gates` flag. + * Works only with Docker runtime. +* Clean up the kube-proxy container image by removing unnecessary packages and files. ([#42090](https://github.com/kubernetes/kubernetes/pull/42090), [@timstclair](https://github.com/timstclair)) +* AWS: Support shared tag `kubernetes.io/cluster/<clusterid>` ([#41695](https://github.com/kubernetes/kubernetes/pull/41695), [@justinsb](https://github.com/justinsb)) +* Insecure access to the API Server at localhost:8080 will be turned off in v1.6 when using kubeadm ([#42066](https://github.com/kubernetes/kubernetes/pull/42066), [@luxas](https://github.com/luxas)) +* AWS: Do not consider master instance zones for dynamic volume creation ([#41702](https://github.com/kubernetes/kubernetes/pull/41702), [@justinsb](https://github.com/justinsb)) +* Added foreground garbage collection: the owner object will not be deleted until all its dependents are deleted by the garbage collector. Please checkout the [user doc](https://kubernetes.io/docs/concepts/abstractions/controllers/garbage-collection/) for details. ([#38676](https://github.com/kubernetes/kubernetes/pull/38676), [@caesarxuchao](https://github.com/caesarxuchao)) + * deleteOptions.orphanDependents is going to be deprecated in 1.7. Please use deleteOptions.propagationPolicy instead. +* force unlock rbd image if the image is not used ([#41597](https://github.com/kubernetes/kubernetes/pull/41597), [@rootfs](https://github.com/rootfs)) +* The kubernetes-master, kubernetes-worker and kubeapi-load-balancer charms have gained an nrpe-external-master relation, allowing the integration of their monitoring in an external Nagios server. ([#41923](https://github.com/kubernetes/kubernetes/pull/41923), [@Cynerva](https://github.com/Cynerva)) +* make kubectl describe pod show tolerationSeconds ([#42162](https://github.com/kubernetes/kubernetes/pull/42162), [@kevin-wangzefeng](https://github.com/kevin-wangzefeng)) +* Completed pods should not be hidden when requested by name via `kubectl get`. ([#42216](https://github.com/kubernetes/kubernetes/pull/42216), [@smarterclayton](https://github.com/smarterclayton)) +* [Federation][Kubefed] Flag cleanup ([#41335](https://github.com/kubernetes/kubernetes/pull/41335), [@irfanurrehman](https://github.com/irfanurrehman)) +* Add the support to the scheduler for spreading pods of StatefulSets. ([#41708](https://github.com/kubernetes/kubernetes/pull/41708), [@bsalamat](https://github.com/bsalamat)) +* Portworx Volume Plugin added enabling [Portworx](http://www.portworx.com) to be used as a storage provider for Kubernetes clusters. Portworx pools your servers capacity and turns your servers or cloud instances into converged, highly available compute and storage nodes. ([#39535](https://github.com/kubernetes/kubernetes/pull/39535), [@adityadani](https://github.com/adityadani)) +* Remove support for trusty in GCE kube-up. ([#41670](https://github.com/kubernetes/kubernetes/pull/41670), [@mikedanese](https://github.com/mikedanese)) +* Import a natural sorting library and use it in the sorting printer. ([#40746](https://github.com/kubernetes/kubernetes/pull/40746), [@matthyx](https://github.com/matthyx)) +* Parameter keys in a StorageClass `parameters` map may not use the `kubernetes.io` or `k8s.io` namespaces. ([#41837](https://github.com/kubernetes/kubernetes/pull/41837), [@liggitt](https://github.com/liggitt)) +* Make DaemonSet respect critical pods annotation when scheduling. ([#42028](https://github.com/kubernetes/kubernetes/pull/42028), [@janetkuo](https://github.com/janetkuo)) +* New Kubelet flag `--enforce-node-allocatable` with a default value of `pods` is added which will make kubelet create a top level cgroup for all pods to enforce Node Allocatable. Optionally, `system-reserved` & `kube-reserved` values can also be specified separated by comma to enforce node allocatable on cgroups specified via `--system-reserved-cgroup` & `--kube-reserved-cgroup` respectively. Note the default value of the latter flags are "". ([#41234](https://github.com/kubernetes/kubernetes/pull/41234), [@vishh](https://github.com/vishh)) + * This feature requires a **Node Drain** prior to upgrade failing which pods will be restarted if possible or terminated if they have a `RestartNever` policy. +* Deployment of AWS Kubernetes clusters using the in-tree bash deployment (i.e. cluster/kube-up.sh or get-kube.sh) is obsolete. v1.5.x will be the last release to support cluster/kube-up.sh with AWS. For a list of viable alternatives, see: http://kubernetes.io/docs/getting-started-guides/aws/ ([#42196](https://github.com/kubernetes/kubernetes/pull/42196), [@zmerlynn](https://github.com/zmerlynn)) +* kubectl logs allows getting logs directly from deployment, job and statefulset ([#40927](https://github.com/kubernetes/kubernetes/pull/40927), [@soltysh](https://github.com/soltysh)) +* make kubectl taint command respect effect NoExecute ([#42120](https://github.com/kubernetes/kubernetes/pull/42120), [@kevin-wangzefeng](https://github.com/kevin-wangzefeng)) +* Flex volume plugin is updated to support attach/detach interfaces. It broke backward compatibility. Please update your drivers and implement the new callouts. ([#41804](https://github.com/kubernetes/kubernetes/pull/41804), [@chakri-nelluri](https://github.com/chakri-nelluri)) +* Implement the update feature for DaemonSet. ([#41116](https://github.com/kubernetes/kubernetes/pull/41116), [@lukaszo](https://github.com/lukaszo)) +* [Federation] Create configmap for the cluster kube-dns when cluster joins and remove when it unjoins ([#39338](https://github.com/kubernetes/kubernetes/pull/39338), [@irfanurrehman](https://github.com/irfanurrehman)) +* New GKE certificates controller. ([#41160](https://github.com/kubernetes/kubernetes/pull/41160), [@pipejakob](https://github.com/pipejakob)) +* Juju: Fix shebangs in charm actions to use python3 ([#42058](https://github.com/kubernetes/kubernetes/pull/42058), [@Cynerva](https://github.com/Cynerva)) +* Support kubectl apply set-last-applied command to update the applied-applied-configuration annotation ([#41694](https://github.com/kubernetes/kubernetes/pull/41694), [@shiywang](https://github.com/shiywang)) +* On GCI by default logrotate is disabled for application containers in favor of rotation mechanism provided by docker logging driver. ([#40634](https://github.com/kubernetes/kubernetes/pull/40634), [@Crassirostris](https://github.com/Crassirostris)) +* Cleanup fluentd-gcp image: rebase on debian-base, switch to upstream packages, remove fluent-ui & rails ([#41998](https://github.com/kubernetes/kubernetes/pull/41998), [@timstclair](https://github.com/timstclair)) +* Updating apiserver to return http status code 202 for a delete request when the resource is not immediately deleted because of user requesting cascading deletion using DeleteOptions.OrphanDependents=false. ([#41165](https://github.com/kubernetes/kubernetes/pull/41165), [@nikhiljindal](https://github.com/nikhiljindal)) +* [Federation][kubefed] Support configuring dns-provider ([#40528](https://github.com/kubernetes/kubernetes/pull/40528), [@shashidharatd](https://github.com/shashidharatd)) +* Added support to minimize sending verbose node information to scheduler extender by sending only node names and expecting extenders to cache the rest of the node information ([#41119](https://github.com/kubernetes/kubernetes/pull/41119), [@sarat-k](https://github.com/sarat-k)) +* Guaranteed admission for Critical Pods ([#40952](https://github.com/kubernetes/kubernetes/pull/40952), [@dashpole](https://github.com/dashpole)) +* Switch to the `node-role.kubernetes.io/master` label for marking and tainting the master node in kubeadm ([#41835](https://github.com/kubernetes/kubernetes/pull/41835), [@luxas](https://github.com/luxas)) +* Allow drain --force to remove pods whose managing resource is deleted. ([#41864](https://github.com/kubernetes/kubernetes/pull/41864), [@marun](https://github.com/marun)) +* add kubectl can-i to see if you can perform an action ([#41077](https://github.com/kubernetes/kubernetes/pull/41077), [@deads2k](https://github.com/deads2k)) +* enable DefaultTolerationSeconds admission controller by default ([#41815](https://github.com/kubernetes/kubernetes/pull/41815), [@kevin-wangzefeng](https://github.com/kevin-wangzefeng)) +* Make DaemonSets survive taint-based evictions when nodes turn unreachable/notReady. ([#41896](https://github.com/kubernetes/kubernetes/pull/41896), [@kevin-wangzefeng](https://github.com/kevin-wangzefeng)) +* Add configurable limits to CronJob resource to specify how many successful and failed jobs are preserved. ([#40932](https://github.com/kubernetes/kubernetes/pull/40932), [@peay](https://github.com/peay)) +* Deprecate outofdisk-transition-frequency and low-diskspace-threshold-mb flags ([#41941](https://github.com/kubernetes/kubernetes/pull/41941), [@dashpole](https://github.com/dashpole)) +* Add OWNERS for sample-apiserver in staging ([#42094](https://github.com/kubernetes/kubernetes/pull/42094), [@sttts](https://github.com/sttts)) +* Update gcr.io/google-containers/rescheduler to v0.2.2, which uses busybox as a base image instead of ubuntu. ([#41911](https://github.com/kubernetes/kubernetes/pull/41911), [@ixdy](https://github.com/ixdy)) +* Add storage.k8s.io/v1 API ([#40088](https://github.com/kubernetes/kubernetes/pull/40088), [@jsafrane](https://github.com/jsafrane)) +* Juju - K8s master charm now properly keeps distributed master files in sync for an HA control plane. ([#41351](https://github.com/kubernetes/kubernetes/pull/41351), [@chuckbutler](https://github.com/chuckbutler)) +* Fix zsh completion: unknown file attribute error ([#38104](https://github.com/kubernetes/kubernetes/pull/38104), [@elipapa](https://github.com/elipapa)) +* kubelet config should ignore file start with dots ([#39196](https://github.com/kubernetes/kubernetes/pull/39196), [@resouer](https://github.com/resouer)) +* Add an alpha feature that makes NodeController set Taints instead of deleting Pods from not Ready Nodes. ([#41133](https://github.com/kubernetes/kubernetes/pull/41133), [@gmarek](https://github.com/gmarek)) +* Base etcd-empty-dir-cleanup on busybox, run as nobody, and update to etcdctl 3.0.14 ([#41674](https://github.com/kubernetes/kubernetes/pull/41674), [@ixdy](https://github.com/ixdy)) +* Fix zone placement heuristics so that multiple mounts in a StatefulSet pod are created in the same zone ([#40910](https://github.com/kubernetes/kubernetes/pull/40910), [@justinsb](https://github.com/justinsb)) +* Flag --use-kubernetes-version for kubeadm init renamed to --kubernetes-version ([#41820](https://github.com/kubernetes/kubernetes/pull/41820), [@kad](https://github.com/kad)) +* `kube-dns` now runs using a separate `system:serviceaccount:kube-system:kube-dns` service account which is automatically bound to the correct RBAC permissions. ([#38816](https://github.com/kubernetes/kubernetes/pull/38816), [@deads2k](https://github.com/deads2k)) +* [Kubemark] Fixed hollow-npd container command to log to file ([#41858](https://github.com/kubernetes/kubernetes/pull/41858), [@shyamjvs](https://github.com/shyamjvs)) +* kubeadm: Remove the --cloud-provider flag for beta init UX ([#41710](https://github.com/kubernetes/kubernetes/pull/41710), [@luxas](https://github.com/luxas)) +* The CertificateSigningRequest API added the `extra` field to persist all information about the requesting user. This mirrors the fields in the SubjectAccessReview API used to check authorization. ([#41755](https://github.com/kubernetes/kubernetes/pull/41755), [@liggitt](https://github.com/liggitt)) +* Upgrade golang versions to 1.7.5 ([#41771](https://github.com/kubernetes/kubernetes/pull/41771), [@cblecker](https://github.com/cblecker)) +* Added a new secret type "bootstrap.kubernetes.io/token" for dynamically creating TLS bootstrapping bearer tokens. ([#41281](https://github.com/kubernetes/kubernetes/pull/41281), [@ericchiang](https://github.com/ericchiang)) +* Remove unnecessary metrics (http/process/go) from being exposed by etcd-version-monitor ([#41807](https://github.com/kubernetes/kubernetes/pull/41807), [@shyamjvs](https://github.com/shyamjvs)) +* Added `kubectl create clusterrole` command. ([#41538](https://github.com/kubernetes/kubernetes/pull/41538), [@xingzhou](https://github.com/xingzhou)) +* Support new kubectl apply view-last-applied command for viewing the last configuration file applied ([#41146](https://github.com/kubernetes/kubernetes/pull/41146), [@shiywang](https://github.com/shiywang)) +* Bump GCI to gci-stable-56-9000-84-2 ([#41819](https://github.com/kubernetes/kubernetes/pull/41819), [@dchen1107](https://github.com/dchen1107)) +* list-resources: don't fail if the grep fails to match any resources ([#41933](https://github.com/kubernetes/kubernetes/pull/41933), [@ixdy](https://github.com/ixdy)) +* client-go no longer imports GCP OAuth2 and OpenID Connect packages by default. ([#41532](https://github.com/kubernetes/kubernetes/pull/41532), [@ericchiang](https://github.com/ericchiang)) +* Each pod has its own associated cgroup by default. ([#41349](https://github.com/kubernetes/kubernetes/pull/41349), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* Whitelist kubemark in node_ssh_supported_providers for log dump ([#41800](https://github.com/kubernetes/kubernetes/pull/41800), [@shyamjvs](https://github.com/shyamjvs)) +* Support KUBE_MAX_PD_VOLS on Azure ([#41398](https://github.com/kubernetes/kubernetes/pull/41398), [@codablock](https://github.com/codablock)) +* Projected volume plugin ([#37237](https://github.com/kubernetes/kubernetes/pull/37237), [@jpeeler](https://github.com/jpeeler)) +* `--output-version` is ignored for all commands except `kubectl convert`. This is consistent with the generic nature of `kubectl` CRUD commands and the previous removal of `--api-version`. Specific versions can be specified in the resource field: `resource.version.group`, `jobs.v1.batch`. ([#41576](https://github.com/kubernetes/kubernetes/pull/41576), [@deads2k](https://github.com/deads2k)) +* Added bool type support for jsonpath. ([#39063](https://github.com/kubernetes/kubernetes/pull/39063), [@xingzhou](https://github.com/xingzhou)) +* Nodes can now report two additional address types in their status: InternalDNS and ExternalDNS. The apiserver can use `--kubelet-preferred-address-types` to give priority to the type of address it uses to reach nodes. ([#34259](https://github.com/kubernetes/kubernetes/pull/34259), [@liggitt](https://github.com/liggitt)) +* Clients now use the `?watch=true` parameter to make watch API calls, instead of the `/watch/` path prefix ([#41722](https://github.com/kubernetes/kubernetes/pull/41722), [@liggitt](https://github.com/liggitt)) +* ResourceQuota ability to support default limited resources ([#36765](https://github.com/kubernetes/kubernetes/pull/36765), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* Fix kubemark default e2e test suite's name ([#41751](https://github.com/kubernetes/kubernetes/pull/41751), [@shyamjvs](https://github.com/shyamjvs)) +* federation aws: add logging of route53 calls ([#39964](https://github.com/kubernetes/kubernetes/pull/39964), [@justinsb](https://github.com/justinsb)) +* Fix ConfigMap for Windows Containers. ([#39373](https://github.com/kubernetes/kubernetes/pull/39373), [@jbhurat](https://github.com/jbhurat)) +* add defaultTolerationSeconds admission controller ([#41414](https://github.com/kubernetes/kubernetes/pull/41414), [@kevin-wangzefeng](https://github.com/kevin-wangzefeng)) +* Node Problem Detector is beta now. New features added: journald support, standalone mode and arbitrary system log monitoring. ([#40206](https://github.com/kubernetes/kubernetes/pull/40206), [@Random-Liu](https://github.com/Random-Liu)) +* Fix the output of health-mointor.sh ([#41525](https://github.com/kubernetes/kubernetes/pull/41525), [@yujuhong](https://github.com/yujuhong)) +* kubectl describe no longer prints the last-applied-configuration annotation for secrets. ([#34664](https://github.com/kubernetes/kubernetes/pull/34664), [@ymqytw](https://github.com/ymqytw)) +* Report node not ready on failed PLEG health check ([#41569](https://github.com/kubernetes/kubernetes/pull/41569), [@yujuhong](https://github.com/yujuhong)) +* Delay Deletion of a Pod until volumes are cleaned up ([#41456](https://github.com/kubernetes/kubernetes/pull/41456), [@dashpole](https://github.com/dashpole)) +* Alpha version of dynamic volume provisioning is removed in this release. Annotation ([#40000](https://github.com/kubernetes/kubernetes/pull/40000), [@jsafrane](https://github.com/jsafrane)) + * "volume.alpha.kubernetes.io/storage-class" does not have any special meaning. A default storage class + * and DefaultStorageClass admission plugin can be used to preserve similar behavior of Kubernetes cluster, + * see https://kubernetes.io/docs/user-guide/persistent-volumes/#class-1 for details. +* An `automountServiceAccountToken *bool` field was added to ServiceAccount and PodSpec objects. If set to `false` on a pod spec, no service account token is automounted in the pod. If set to `false` on a service account, no service account token is automounted for that service account unless explicitly overridden in the pod spec. ([#37953](https://github.com/kubernetes/kubernetes/pull/37953), [@liggitt](https://github.com/liggitt)) +* Bump addon-manager version to v6.4-alpha.1 in kubemark ([#41506](https://github.com/kubernetes/kubernetes/pull/41506), [@shyamjvs](https://github.com/shyamjvs)) +* Do not daemonize `salt-minion` for the openstack-heat provider. ([#40722](https://github.com/kubernetes/kubernetes/pull/40722), [@micmro](https://github.com/micmro)) +* Move private key parsing from serviceaccount/jwt.go to client-go/util/cert ([#40907](https://github.com/kubernetes/kubernetes/pull/40907), [@cblecker](https://github.com/cblecker)) +* Added configurable etcd initial-cluster-state to kube-up script. ([#41332](https://github.com/kubernetes/kubernetes/pull/41332), [@jszczepkowski](https://github.com/jszczepkowski)) + + + +# v1.6.0-alpha.3 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/master/examples) + +## Downloads for v1.6.0-alpha.3 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.6.0-alpha.3/kubernetes.tar.gz) | `41b5e9edd973cbb8e68eb5d8d758c4f0afa11dfbd65df49e1c361206706a974c` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.6.0-alpha.3/kubernetes-src.tar.gz) | `ec13e22322c85752918c23b0b498ba02087a1227b8fdc169f19acdf128f907c4` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.6.0-alpha.3/kubernetes-client-darwin-386.tar.gz) | `5a631b7604a69ef13c27b43e6df10f8bf14ff9170440fb07d0c46bc88a5a1eac` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.6.0-alpha.3/kubernetes-client-darwin-amd64.tar.gz) | `cfba71e38a924b783fcdbc0b1a342671d52af3588a8211e35048e9c071ed03b2` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.6.0-alpha.3/kubernetes-client-linux-386.tar.gz) | `ceeee264b12959cb2b314efa9df4c165ea1598b8824ec652eb3994096f4ec07f` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.0-alpha.3/kubernetes-client-linux-amd64.tar.gz) | `1bd3a4b64ab1535780f18b3e7a56dd1301a8ea8d66869ee704f66985c1fca9b4` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.0-alpha.3/kubernetes-client-linux-arm64.tar.gz) | `d1615b3223c6e83422ed8409fc8d0a7a6069982d3413a482e12966b953520fe0` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.6.0-alpha.3/kubernetes-client-linux-arm.tar.gz) | `19133867e2d104db3e01212dbc4a702a315310a10e86076b6b80a16b94cf7954` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.0-alpha.3/kubernetes-client-linux-ppc64le.tar.gz) | `0f89e17eb881c7db39195bc94874e3ec54866d2f57eef1540b5d843bedbe4326` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.0-alpha.3/kubernetes-client-linux-s390x.tar.gz) | `3ed06cb89ffec011e4248c14d9e1c88c815b7363d1fdba217ed17e900f29960b` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.6.0-alpha.3/kubernetes-client-windows-386.tar.gz) | `87927cbe26cefa296e2752075d018a58826bc7fa141c4cbe56116a254a3470cc` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.6.0-alpha.3/kubernetes-client-windows-amd64.tar.gz) | `e97e7dafbf670140d3c4879a6738b970ac77d917861df3eea0c502238dd297b0` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.0-alpha.3/kubernetes-server-linux-amd64.tar.gz) | `3aa82b838be450ce8dedbebfda45c453864c15aae6363ae5f1c0b0d285ffad2a` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.0-alpha.3/kubernetes-server-linux-arm64.tar.gz) | `0bdeac3524ab7ef366f3bb75e2fbff3db156dcba2b862e8b2de393e4ec4377c9` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.6.0-alpha.3/kubernetes-server-linux-arm.tar.gz) | `1f37886aba4027ec682afe5f02a4d66a6645af2476f2954933c1b437ec66dafa` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.0-alpha.3/kubernetes-server-linux-ppc64le.tar.gz) | `eb81d3cdd703790d5c96e24917183dc123aeabbe9a291c2dd86c68d21d9fd213` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.0-alpha.3/kubernetes-server-linux-s390x.tar.gz) | `a50a57c689583f97fd4ff7af766bf7ae79c9fd97e46720bc41f385f2c51e1f99` + +## Changelog since v1.6.0-alpha.2 + +### Other notable changes + +* Fix AWS device allocator to only use valid device names ([#41455](https://github.com/kubernetes/kubernetes/pull/41455), [@gnufied](https://github.com/gnufied)) +* [Federation][Kubefed] Bug fix relating kubeconfig path in kubefed init ([#41410](https://github.com/kubernetes/kubernetes/pull/41410), [@irfanurrehman](https://github.com/irfanurrehman)) +* The apiserver audit log (`/var/log/kube-apiserver-audit.log`) will be sent through fluentd if enabled. ([#41360](https://github.com/kubernetes/kubernetes/pull/41360), [@enisoc](https://github.com/enisoc)) +* Bump GCE ContainerVM to container-vm-v20170214 to address CVE-2016-9962. ([#41449](https://github.com/kubernetes/kubernetes/pull/41449), [@zmerlynn](https://github.com/zmerlynn)) +* Fixed issues [#39202](https://github.com/kubernetes/kubernetes/pull/39202), [#41041](https://github.com/kubernetes/kubernetes/pull/41041) and [#40941](https://github.com/kubernetes/kubernetes/pull/40941) that caused the iSCSI connections to be prematurely closed when deleting a pod with an iSCSI persistent volume attached and that prevented the use of newly created LUNs on targets with preestablished connections. ([#41196](https://github.com/kubernetes/kubernetes/pull/41196), [@CristianPop](https://github.com/CristianPop)) +* The kube-apiserver [basic audit log](https://kubernetes.io/docs/admin/audit/) can be enabled in GCE by exporting the environment variable `ENABLE_APISERVER_BASIC_AUDIT=true` before running `cluster/kube-up.sh`. This will log to `/var/log/kube-apiserver-audit.log` and use the same `logrotate` settings as `/var/log/kube-apiserver.log`. ([#41211](https://github.com/kubernetes/kubernetes/pull/41211), [@enisoc](https://github.com/enisoc)) +* On kube-up.sh clusters on GCE, kube-scheduler now contacts the API on the secured port. ([#41285](https://github.com/kubernetes/kubernetes/pull/41285), [@liggitt](https://github.com/liggitt)) +* Default RBAC ClusterRole and ClusterRoleBinding objects are automatically updated at server start to add missing permissions and subjects (extra permissions and subjects are left in place). To prevent autoupdating a particular role or rolebinding, annotate it with `rbac.authorization.kubernetes.io/autoupdate=false`. ([#41155](https://github.com/kubernetes/kubernetes/pull/41155), [@liggitt](https://github.com/liggitt)) +* Make EnableCRI default to true ([#41378](https://github.com/kubernetes/kubernetes/pull/41378), [@yujuhong](https://github.com/yujuhong)) +* `kubectl edit` now edits objects exactly as they were retrieved from the API. This allows using `kubectl edit` with third-party resources and extension API servers. Because client-side conversion is no longer done, the `--output-version` option is deprecated for `kubectl edit`. To edit using a particular API version, fully-qualify the resource, version, and group used to fetch the object (for example, `job.v1.batch/myjob`) ([#41304](https://github.com/kubernetes/kubernetes/pull/41304), [@liggitt](https://github.com/liggitt)) +* We change the default attach_detach_controller sync period to 1 minute to reduce the query frequency through cloud provider to check whether volumes are attached or not. ([#41363](https://github.com/kubernetes/kubernetes/pull/41363), [@jingxu97](https://github.com/jingxu97)) +* RBAC `v1beta1` RoleBinding/ClusterRoleBinding subjects changed `apiVersion` to `apiGroup` to fully-qualify a subject. ServiceAccount subjects default to an apiGroup of `""`, User and Group subjects default to an apiGroup of `"rbac.authorization.k8s.io"`. ([#41184](https://github.com/kubernetes/kubernetes/pull/41184), [@liggitt](https://github.com/liggitt)) +* Add support for finalizers in federated configmaps (deletes configmaps from underlying clusters). ([#40464](https://github.com/kubernetes/kubernetes/pull/40464), [@csbell](https://github.com/csbell)) +* Make DaemonSet controller respect node taints and pod tolerations. ([#41172](https://github.com/kubernetes/kubernetes/pull/41172), [@janetkuo](https://github.com/janetkuo)) +* Added kubectl create role command ([#39852](https://github.com/kubernetes/kubernetes/pull/39852), [@xingzhou](https://github.com/xingzhou)) +* If `experimentalCriticalPodAnnotation` feature gate is set to true, fluentd pods will not be evicted by the kubelet. ([#41035](https://github.com/kubernetes/kubernetes/pull/41035), [@vishh](https://github.com/vishh)) + + + +# v1.6.0-alpha.2 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/master/examples) + +## Downloads for v1.6.0-alpha.2 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.6.0-alpha.2/kubernetes.tar.gz) | `d1a5c7bc435c0f58dca9eab54e8155b6e4797d4b5d6b0cb8feab968dd3132165` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.6.0-alpha.2/kubernetes-src.tar.gz) | `8d09b973f3debfe3d10b0ad392e56141446bc0d04aac60df6d761189997d97ed` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.6.0-alpha.2/kubernetes-client-darwin-386.tar.gz) | `b1a7d002768fff8282f8873fde6a0ed215d20fd72197d8e583c024b7cbbe3eb8` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.6.0-alpha.2/kubernetes-client-darwin-amd64.tar.gz) | `b0f872bbefdc1ecc9585dfdeb9c7e094f7a16ebbe4db11c64c70d1ef7f93e361` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.6.0-alpha.2/kubernetes-client-linux-386.tar.gz) | `53be6adde2d13058d03d0f283ca166bb495cc49cd2e36339696dc46f85f78c8f` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.0-alpha.2/kubernetes-client-linux-amd64.tar.gz) | `6436463d51ed54b50023cd725b054fd2b039e391095d8a618e91979fc55d4ee0` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.0-alpha.2/kubernetes-client-linux-arm64.tar.gz) | `d6638c8950a9e03ed64c3f3e1ad82166642c02aeb8f7fb2079db1f137170a145` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.6.0-alpha.2/kubernetes-client-linux-arm.tar.gz) | `05d0e466a27fc9a5b6535cbd7683e08739cd37aa2c6213c000fdaa305e4eb888` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.0-alpha.2/kubernetes-client-linux-ppc64le.tar.gz) | `38971be682cbf1f194eeb9ad683272a58042f4f91992db6fc34720de28d88dd6` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.0-alpha.2/kubernetes-client-linux-s390x.tar.gz) | `774a002482d6b62338550b20d90b914a08481965ed1b78cd348535d90f88f344` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.6.0-alpha.2/kubernetes-client-windows-386.tar.gz) | `690ab995ac27c90c811578677fb8688d43198499bfc451a2f908ad7a76474ee8` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.6.0-alpha.2/kubernetes-client-windows-amd64.tar.gz) | `757fe9e2083e2da706b52c96da34548aa72bbbbff50bb261c1198c80b36189c3` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.0-alpha.2/kubernetes-server-linux-amd64.tar.gz) | `5aa3161a1030ddb02985171d4343a99d14ad6e09e130549b20fc96797588ff1e` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.0-alpha.2/kubernetes-server-linux-arm64.tar.gz) | `babce8c402c8e88310ba82315f758e981d4cfe20dcbf3047e55b279d5d4f3a33` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.6.0-alpha.2/kubernetes-server-linux-arm.tar.gz) | `4b1d4c4ba95d86481d32daf09e769f7f9e4e0d71e11d39a5a4e205804b023172` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.0-alpha.2/kubernetes-server-linux-ppc64le.tar.gz) | `070423e62a0dff7ef17e29a63ac2eda5a46b6e1badf67214c07970b83610bf6c` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.0-alpha.2/kubernetes-server-linux-s390x.tar.gz) | `3a826fef775819a4f03e7db91684db6edfdaaad3e3eb366c4321bdc5ec0b0f25` + +## Changelog since v1.6.0-alpha.1 + +### Other notable changes + +* Align the hyperkube image to support running binaries at /usr/local/bin/ like the other server images ([#41017](https://github.com/kubernetes/kubernetes/pull/41017), [@luxas](https://github.com/luxas)) +* Native support for token based bootstrap flow. This includes signing a well known ConfigMap in the `kube-public` namespace and cleaning out expired tokens. ([#36101](https://github.com/kubernetes/kubernetes/pull/36101), [@jbeda](https://github.com/jbeda)) +* Reverts to looking up the current VM in vSphere using the machine's UUID, either obtained via sysfs or via the `vm-uuid` parameter in the cloud configuration file. ([#40892](https://github.com/kubernetes/kubernetes/pull/40892), [@robdaemon](https://github.com/robdaemon)) +* This PR adds a manager to NodeController that is responsible for removing Pods from Nodes tainted with NoExecute Taints. This feature is beta (as the rest of taints) and enabled by default. It's gated by controller-manager enable-taint-manager flag. ([#40355](https://github.com/kubernetes/kubernetes/pull/40355), [@gmarek](https://github.com/gmarek)) +* The authentication.k8s.io API group was promoted to v1 ([#41058](https://github.com/kubernetes/kubernetes/pull/41058), [@liggitt](https://github.com/liggitt)) +* Fixes issue [#38418](https://github.com/kubernetes/kubernetes/pull/38418) which, under circumstance, could cause StatefulSet to deadlock. ([#40838](https://github.com/kubernetes/kubernetes/pull/40838), [@kow3ns](https://github.com/kow3ns)) + * Mediates issue [#36859](https://github.com/kubernetes/kubernetes/pull/36859). StatefulSet only acts on Pods whose identity matches the StatefulSet, providing a partial mediation for overlapping controllers. +* Introduces an new alpha version of the Horizontal Pod Autoscaler including expanded support for specifying metrics. ([#36033](https://github.com/kubernetes/kubernetes/pull/36033), [@DirectXMan12](https://github.com/DirectXMan12)) +* Set all node conditions to Unknown when node is unreachable ([#36592](https://github.com/kubernetes/kubernetes/pull/36592), [@andrewsykim](https://github.com/andrewsykim)) +* [Federation] Add override flags options to kubefed init ([#40917](https://github.com/kubernetes/kubernetes/pull/40917), [@irfanurrehman](https://github.com/irfanurrehman)) +* Fix for detach volume when node is not present/ powered off ([#40118](https://github.com/kubernetes/kubernetes/pull/40118), [@BaluDontu](https://github.com/BaluDontu)) +* Bump up GLBC version from 0.9.0-beta to 0.9.1 ([#41037](https://github.com/kubernetes/kubernetes/pull/41037), [@bprashanth](https://github.com/bprashanth)) +* The deprecated flags --config, --auth-path, --resource-container, and --system-container were removed. ([#40048](https://github.com/kubernetes/kubernetes/pull/40048), [@mtaufen](https://github.com/mtaufen)) +* Add `kubectl attach` support for multiple types ([#40365](https://github.com/kubernetes/kubernetes/pull/40365), [@shiywang](https://github.com/shiywang)) +* [Kubelet] Delay deletion of pod from the API server until volumes are deleted ([#41095](https://github.com/kubernetes/kubernetes/pull/41095), [@dashpole](https://github.com/dashpole)) +* remove the create-external-load-balancer flag in cmd/expose.go ([#38183](https://github.com/kubernetes/kubernetes/pull/38183), [@tianshapjq](https://github.com/tianshapjq)) +* The authorization.k8s.io API group was promoted to v1 ([#40709](https://github.com/kubernetes/kubernetes/pull/40709), [@liggitt](https://github.com/liggitt)) +* Bump GCI to gci-beta-56-9000-80-0 ([#41027](https://github.com/kubernetes/kubernetes/pull/41027), [@dchen1107](https://github.com/dchen1107)) +* [Federation][kubefed] Add option to expose federation apiserver on nodeport service ([#40516](https://github.com/kubernetes/kubernetes/pull/40516), [@shashidharatd](https://github.com/shashidharatd)) +* Rename --experiemental-cgroups-per-qos to --cgroups-per-qos ([#39972](https://github.com/kubernetes/kubernetes/pull/39972), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* PV E2E: provide each spec with a fresh nfs host ([#40879](https://github.com/kubernetes/kubernetes/pull/40879), [@copejon](https://github.com/copejon)) +* Remove the temporary fix for pre-1.0 mirror pods ([#40877](https://github.com/kubernetes/kubernetes/pull/40877), [@yujuhong](https://github.com/yujuhong)) +* fix --save-config in create subcommand ([#40289](https://github.com/kubernetes/kubernetes/pull/40289), [@xilabao](https://github.com/xilabao)) +* We should mention the caveats of in-place upgrade in release note. ([#40727](https://github.com/kubernetes/kubernetes/pull/40727), [@Random-Liu](https://github.com/Random-Liu)) +* The SubjectAccessReview API passes subresource and resource name information to the authorizer to answer authorization queries. ([#40935](https://github.com/kubernetes/kubernetes/pull/40935), [@liggitt](https://github.com/liggitt)) +* When feature gate "ExperimentalCriticalPodAnnotation" is set, Kubelet will avoid evicting pods in "kube-system" namespace that contains a special annotation - `scheduler.alpha.kubernetes.io/critical-pod` ([#40655](https://github.com/kubernetes/kubernetes/pull/40655), [@vishh](https://github.com/vishh)) + * This feature should be used in conjunction with the rescheduler to guarantee availability for critical system pods - https://kubernetes.io/docs/admin/rescheduler/ +* make tolerations respect wildcard key ([#39914](https://github.com/kubernetes/kubernetes/pull/39914), [@kevin-wangzefeng](https://github.com/kevin-wangzefeng)) +* [Federation][kubefed] Add option to disable persistence storage for etcd ([#40862](https://github.com/kubernetes/kubernetes/pull/40862), [@shashidharatd](https://github.com/shashidharatd)) +* Init containers have graduated to GA and now appear as a field. The beta annotation value will still be respected and overrides the field value. ([#38382](https://github.com/kubernetes/kubernetes/pull/38382), [@hodovska](https://github.com/hodovska)) +* apply falls back to generic 3-way JSON merge patch if no go struct is registered for the target GVK ([#40666](https://github.com/kubernetes/kubernetes/pull/40666), [@ymqytw](https://github.com/ymqytw)) +* HorizontalPodAutoscaler is no longer supported in extensions/v1beta1 version. Use autoscaling/v1 instead. ([#35782](https://github.com/kubernetes/kubernetes/pull/35782), [@piosz](https://github.com/piosz)) +* Port forwarding can forward over websockets or SPDY. ([#33684](https://github.com/kubernetes/kubernetes/pull/33684), [@fraenkel](https://github.com/fraenkel)) +* Improve kubectl describe node output by adding closing paren ([#39217](https://github.com/kubernetes/kubernetes/pull/39217), [@luksa](https://github.com/luksa)) +* Bump GCE ContainerVM to container-vm-v20170201 to address CVE-2016-9962. ([#40828](https://github.com/kubernetes/kubernetes/pull/40828), [@zmerlynn](https://github.com/zmerlynn)) +* Use full package path for definition name in OpenAPI spec ([#40124](https://github.com/kubernetes/kubernetes/pull/40124), [@mbohlool](https://github.com/mbohlool)) +* kubectl apply now supports explicitly clearing values not present in the config by setting them to null ([#40630](https://github.com/kubernetes/kubernetes/pull/40630), [@liggitt](https://github.com/liggitt)) +* Fixed an issue where 'kubectl get --sort-by=' would return an error when the specified field were not present in at least one of the returned objects, even that being a valid field in the object model. ([#40541](https://github.com/kubernetes/kubernetes/pull/40541), [@fabianofranz](https://github.com/fabianofranz)) +* Add initial french translations for kubectl ([#40645](https://github.com/kubernetes/kubernetes/pull/40645), [@brendandburns](https://github.com/brendandburns)) +* OpenStack-Heat will now look for an image named "CentOS-7-x86_64-GenericCloud-1604". To restore the previous behavior set OPENSTACK_IMAGE_NAME="CentOS7" ([#40368](https://github.com/kubernetes/kubernetes/pull/40368), [@sc68cal](https://github.com/sc68cal)) +* Preventing nil pointer reference in client_config ([#40508](https://github.com/kubernetes/kubernetes/pull/40508), [@vjsamuel](https://github.com/vjsamuel)) +* The bash AWS deployment via kube-up.sh has been deprecated. See http://kubernetes.io/docs/getting-started-guides/aws/ for alternatives. ([#38772](https://github.com/kubernetes/kubernetes/pull/38772), [@zmerlynn](https://github.com/zmerlynn)) +* Fix failing load balancers in Azure ([#40405](https://github.com/kubernetes/kubernetes/pull/40405), [@codablock](https://github.com/codablock)) +* kubefed init creates a service account for federation controller manager in the federation-system namespace and binds that service account to the federation-system:federation-controller-manager role that has read and list access on secrets in the federation-system namespace. ([#40392](https://github.com/kubernetes/kubernetes/pull/40392), [@madhusudancs](https://github.com/madhusudancs)) +* Fixed an SELinux issue in kubeadm on Docker 1.12+ by moving etcd SELinux options from container to pod. ([#40682](https://github.com/kubernetes/kubernetes/pull/40682), [@dgoodwin](https://github.com/dgoodwin)) +* Juju kubernetes-master charm: improve status messages ([#40691](https://github.com/kubernetes/kubernetes/pull/40691), [@Cynerva](https://github.com/Cynerva)) + + + +# v1.6.0-alpha.1 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/master/examples) + +## Downloads for v1.6.0-alpha.1 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.6.0-alpha.1/kubernetes.tar.gz) | `abda73bc2a27ae16c66a5aea9e96cd59486ed8cf994afc55da35a3cea2edc1db` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.6.0-alpha.1/kubernetes-src.tar.gz) | `b429579ba83f9a3fa80e72ceb65b046659b17f16a0b7f70105e7096a441f32b9` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.6.0-alpha.1/kubernetes-client-darwin-386.tar.gz) | `d5b8adee6169515324f4f420e65e9d4e14cca3402f58ec99660a1947fd79d3ea` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.6.0-alpha.1/kubernetes-client-darwin-amd64.tar.gz) | `6232a7e46b2cbd1e30a1f44c9b424448c5def11f5132c742bf62bac8a4f26fa2` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.6.0-alpha.1/kubernetes-client-linux-386.tar.gz) | `2974ed14b76885947c95b3c86fb8585aa08ccefe8cc11cd202dcc3cb8fcc0d1a` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.0-alpha.1/kubernetes-client-linux-amd64.tar.gz) | `3bcb40f4aa3a295ec23fe42a5e17b081ef8de174b7dfa03cb89c27a00ac16f5a` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.0-alpha.1/kubernetes-client-linux-arm64.tar.gz) | `f9a55bcb6af2a415d24d69ae919c56968f6b02369675fd7def63acbde6534430` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.6.0-alpha.1/kubernetes-client-linux-arm.tar.gz) | `b0bd7070eab2f19b9bc1840fb4da5307c7ce274f2e28f76f94c714aa08f087bf` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.0-alpha.1/kubernetes-client-linux-ppc64le.tar.gz) | `39f38972f93f64542ae325d9c937c9d527968bc0830fdd38dd38dc246b6f0c56` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.0-alpha.1/kubernetes-client-linux-s390x.tar.gz) | `032e21fe0000333f36e29ddf24e207cfd6c92cb9a6d69cc0123c31aacd12338c` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.6.0-alpha.1/kubernetes-client-windows-386.tar.gz) | `84b7d58012760111067ec0907070cc2f6d4c95893e771533a9b335cc8d8c72b7` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.6.0-alpha.1/kubernetes-client-windows-amd64.tar.gz) | `e9ce76f48a4cf58b261aec38f076ed3b61c444c55c123f30099c1d1763d6191f` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.6.0-alpha.1/kubernetes-server-linux-amd64.tar.gz) | `fafa4b93a522b9e73b6c31e42d32dc5eb3fccb5ca1548425da03726b48a19175` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.6.0-alpha.1/kubernetes-server-linux-arm64.tar.gz) | `f00f4874785d1c9cba4fd262e8086aa693027649da44b0eec69e96951e013913` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.6.0-alpha.1/kubernetes-server-linux-arm.tar.gz) | `e843a6357e0a2e441277e6b32d8d64a6b6fe367c3d223edec781c21d8b379ac6` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.6.0-alpha.1/kubernetes-server-linux-ppc64le.tar.gz) | `12b73f7cc4928543eee09af91d632bcf5c4ed56c44d48d62d0087c7fcbaa3e02` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.6.0-alpha.1/kubernetes-server-linux-s390x.tar.gz) | `aad15f260d166c2b295921468837efe4a51cb7a04bcaccb3faecc9b5979861e5` + +## Changelog since v1.5.0 + +### Action Required + +* Promote certificates.k8s.io to beta and enable it by default. Users using the alpha certificates API should delete v1alpha1 CSRs from the API before upgrading and recreate them as v1beta1 CSR after upgrading. ([#39772](https://github.com/kubernetes/kubernetes/pull/39772), [@mikedanese](https://github.com/mikedanese)) +* Switch default etcd version to 3.0.14. ([#36229](https://github.com/kubernetes/kubernetes/pull/36229), [@wojtek-t](https://github.com/wojtek-t)) + * Switch default storage backend flag in apiserver to `etcd3` mode. +* RBAC's special handling of the user `*` in RoleBinding and ClusterRoleBinding objects is deprecated and will be removed in v1beta1. To match all users, explicitly bind to the group `system:authenticated` and/or `system:unauthenticated`. Existing v1alpha1 bindings to the user `*` will be automatically converted to the group `system:authenticated`. ([#38981](https://github.com/kubernetes/kubernetes/pull/38981), [@liggitt](https://github.com/liggitt)) +* The 'endpoints.beta.kubernetes.io/hostnames-map' annotation is no longer supported. Users can use the 'Endpoints.subsets[].addresses[].hostname' field instead. ([#39284](https://github.com/kubernetes/kubernetes/pull/39284), [@bowei](https://github.com/bowei)) +* `federation/deploy/deploy.sh` was an interim solution introduced in Kubernetes v1.4 to simplify the federation control plane deployment experience. Now that we have `kubefed`, we are deprecating `deploy.sh` scripts. ([#38902](https://github.com/kubernetes/kubernetes/pull/38902), [@madhusudancs](https://github.com/madhusudancs)) +* Cluster federation servers have changed the location in etcd where federated services are stored, so existing federated services must be deleted and recreated. Before upgrading, export all federated services from the federation server and delete the services. After upgrading the cluster, recreate the federated services from the exported data. ([#37770](https://github.com/kubernetes/kubernetes/pull/37770), [@enj](https://github.com/enj)) +* etcd2: watching from 0 returns all initial states as ADDED events ([#38079](https://github.com/kubernetes/kubernetes/pull/38079), [@hongchaodeng](https://github.com/hongchaodeng)) + +### Other notable changes + +* kube-up.sh on GCE now includes the bootstrap admin in the super-user group, and ensures the auth token file is correct on upgrades ([#39537](https://github.com/kubernetes/kubernetes/pull/39537), [@liggitt](https://github.com/liggitt)) +* genericapiserver: cut off more dependencies – episode 3 ([#40426](https://github.com/kubernetes/kubernetes/pull/40426), [@sttts](https://github.com/sttts)) +* Adding vmdk file extension for vmDiskPath in vsphere DeleteVolume ([#40538](https://github.com/kubernetes/kubernetes/pull/40538), [@divyenpatel](https://github.com/divyenpatel)) +* Remove outdated net.experimental.kubernetes.io/proxy-mode and net.beta.kubernetes.io/proxy-mode annotations from kube-proxy. ([#40585](https://github.com/kubernetes/kubernetes/pull/40585), [@cblecker](https://github.com/cblecker)) +* Improve the ARM builds and make hyperkube on ARM working again by upgrading the Go version for ARM to go1.8beta2 ([#38926](https://github.com/kubernetes/kubernetes/pull/38926), [@luxas](https://github.com/luxas)) +* Prevent hotloops on error conditions, which could fill up the disk faster than log rotation can free space. ([#40497](https://github.com/kubernetes/kubernetes/pull/40497), [@lavalamp](https://github.com/lavalamp)) +* DaemonSet controller actively kills failed pods (to recreate them) ([#40330](https://github.com/kubernetes/kubernetes/pull/40330), [@janetkuo](https://github.com/janetkuo)) +* forgiveness alpha version api definition ([#39469](https://github.com/kubernetes/kubernetes/pull/39469), [@kevin-wangzefeng](https://github.com/kevin-wangzefeng)) +* Bump up glbc version to 0.9.0-beta.1 ([#40565](https://github.com/kubernetes/kubernetes/pull/40565), [@bprashanth](https://github.com/bprashanth)) +* Improve formatting of EventSource in kubectl get and kubectl describe ([#40073](https://github.com/kubernetes/kubernetes/pull/40073), [@matthyx](https://github.com/matthyx)) +* CRI: use more gogoprotobuf plugins ([#40397](https://github.com/kubernetes/kubernetes/pull/40397), [@yujuhong](https://github.com/yujuhong)) +* Adds `shortNames` to the `APIResource` from discovery which is a list of recommended shortNames for clients like `kubectl`. ([#40312](https://github.com/kubernetes/kubernetes/pull/40312), [@p0lyn0mial](https://github.com/p0lyn0mial)) +* Use existing ABAC policy file when upgrading GCE cluster ([#40172](https://github.com/kubernetes/kubernetes/pull/40172), [@liggitt](https://github.com/liggitt)) +* Added support for creating HA clusters for centos using kube-up.sh. ([#39462](https://github.com/kubernetes/kubernetes/pull/39462), [@Shawyeok](https://github.com/Shawyeok)) +* azure: fix Azure Container Registry integration ([#40142](https://github.com/kubernetes/kubernetes/pull/40142), [@colemickens](https://github.com/colemickens)) +* - Splits Juju Charm layers into master/worker roles ([#40324](https://github.com/kubernetes/kubernetes/pull/40324), [@chuckbutler](https://github.com/chuckbutler)) + * - Adds support for 1.5.x series of Kubernetes + * - Introduces a tactic for keeping templates in sync with upstream eliminating template drift + * - Adds CNI support to the Juju Charms + * - Adds durable storage support to the Juju Charms + * - Introduces an e2e Charm layer for repeatable testing efforts and validation of clusters +* genericapiserver: more dependency cutoffs ([#40216](https://github.com/kubernetes/kubernetes/pull/40216), [@sttts](https://github.com/sttts)) +* AWS: trust region if found from AWS metadata ([#38880](https://github.com/kubernetes/kubernetes/pull/38880), [@justinsb](https://github.com/justinsb)) +* Volumes and environment variables populated from ConfigMap and Secret objects can now tolerate the named source object or specific keys being missing, by adding `optional: true` to the volume or environment variable source specifications. ([#39981](https://github.com/kubernetes/kubernetes/pull/39981), [@fraenkel](https://github.com/fraenkel)) +* kubectl create now accepts the label selector flag for filtering objects to create ([#40057](https://github.com/kubernetes/kubernetes/pull/40057), [@MrHohn](https://github.com/MrHohn)) +* A new field `terminationMessagePolicy` has been added to containers that allows a user to request `FallbackToLogsOnError`, which will read from the container's logs to populate the termination message if the user does not write to the termination message log file. The termination message file is now properly readable for end users and has a maximum size (4k bytes) to prevent abuse. Each pod may have up to 12k bytes of termination messages before the contents of each will be truncated. ([#39341](https://github.com/kubernetes/kubernetes/pull/39341), [@smarterclayton](https://github.com/smarterclayton)) +* Add a special purpose tool for editing individual fields in a ConfigMap with kubectl ([#38445](https://github.com/kubernetes/kubernetes/pull/38445), [@brendandburns](https://github.com/brendandburns)) +* [Federation] Expose autoscaling apis through federation api server ([#38976](https://github.com/kubernetes/kubernetes/pull/38976), [@irfanurrehman](https://github.com/irfanurrehman)) +* Powershell script to start kubelet and kube-proxy ([#36250](https://github.com/kubernetes/kubernetes/pull/36250), [@jbhurat](https://github.com/jbhurat)) +* Reduce time needed to attach Azure disks ([#40066](https://github.com/kubernetes/kubernetes/pull/40066), [@codablock](https://github.com/codablock)) +* fixing Cassandra shutdown example to avoid data corruption ([#39199](https://github.com/kubernetes/kubernetes/pull/39199), [@deimosfr](https://github.com/deimosfr)) +* kubeadm: add optional self-hosted deployment for apiserver, controller-manager and scheduler. ([#40075](https://github.com/kubernetes/kubernetes/pull/40075), [@pires](https://github.com/pires)) +* kubelet tears down pod volumes on pod termination rather than pod deletion ([#37228](https://github.com/kubernetes/kubernetes/pull/37228), [@sjenning](https://github.com/sjenning)) +* The default client certificate generated by kube-up now contains the superuser `system:masters` group ([#39966](https://github.com/kubernetes/kubernetes/pull/39966), [@liggitt](https://github.com/liggitt)) +* CRI: upgrade protobuf to v3 ([#39158](https://github.com/kubernetes/kubernetes/pull/39158), [@feiskyer](https://github.com/feiskyer)) +* Add SIGCHLD handler to pause container ([#36853](https://github.com/kubernetes/kubernetes/pull/36853), [@verb](https://github.com/verb)) +* Populate environment variables from a secrets. ([#39446](https://github.com/kubernetes/kubernetes/pull/39446), [@fraenkel](https://github.com/fraenkel)) +* fluentd config for GKE clusters updated: detect exceptions in container log streams and forward them as one log entry. ([#39656](https://github.com/kubernetes/kubernetes/pull/39656), [@thomasschickinger](https://github.com/thomasschickinger)) +* Made multi-scheduler graduated to Beta and then v1. ([#38871](https://github.com/kubernetes/kubernetes/pull/38871), [@k82cn](https://github.com/k82cn)) +* Fixed forming resolver search line for pods: exclude duplicates, obey libc limitations, logging and eventing appropriately. ([#29666](https://github.com/kubernetes/kubernetes/pull/29666), [@vefimova](https://github.com/vefimova)) +* Add authorization mode to kubeadm ([#39846](https://github.com/kubernetes/kubernetes/pull/39846), [@andrewrynhard](https://github.com/andrewrynhard)) +* Update dependencies: aws-sdk-go to 1.6.10; also cadvisor ([#40095](https://github.com/kubernetes/kubernetes/pull/40095), [@dashpole](https://github.com/dashpole)) +* Fixes a bug in the OpenStack-Heat kubernetes provider, in the handling of differences between the Identity v2 and Identity v3 APIs ([#40105](https://github.com/kubernetes/kubernetes/pull/40105), [@sc68cal](https://github.com/sc68cal)) +* Update GCE ContainerVM deployment to container-vm-v20170117 to pick up CVE fixes in base image. ([#40094](https://github.com/kubernetes/kubernetes/pull/40094), [@zmerlynn](https://github.com/zmerlynn)) +* AWS: Remove duplicate calls to DescribeInstance during volume operations ([#39842](https://github.com/kubernetes/kubernetes/pull/39842), [@gnufied](https://github.com/gnufied)) +* The `attributeRestrictions` field has been removed from the PolicyRule type in the rbac.authorization.k8s.io/v1alpha1 API. The field was not used by the RBAC authorizer. ([#39625](https://github.com/kubernetes/kubernetes/pull/39625), [@deads2k](https://github.com/deads2k)) +* Enable lazy inode table and journal initialization for ext3 and ext4 ([#38865](https://github.com/kubernetes/kubernetes/pull/38865), [@codablock](https://github.com/codablock)) +* azure disk: restrict name length for Azure specifications ([#40030](https://github.com/kubernetes/kubernetes/pull/40030), [@colemickens](https://github.com/colemickens)) +* Follow redirects for streaming requests (exec/attach/port-forward) in the apiserver by default (alpha -> beta). ([#40039](https://github.com/kubernetes/kubernetes/pull/40039), [@timstclair](https://github.com/timstclair)) +* Use kube-dns:1.11.0 ([#39925](https://github.com/kubernetes/kubernetes/pull/39925), [@sadlil](https://github.com/sadlil)) +* Anonymous authentication is now automatically disabled if the API server is started with the AlwaysAllow authorizer. ([#38706](https://github.com/kubernetes/kubernetes/pull/38706), [@deads2k](https://github.com/deads2k)) +* genericapiserver: cut off kube pkg/version dependency ([#39943](https://github.com/kubernetes/kubernetes/pull/39943), [@sttts](https://github.com/sttts)) +* genericapiserver: cut off pkg/serviceaccount dependency ([#39945](https://github.com/kubernetes/kubernetes/pull/39945), [@sttts](https://github.com/sttts)) +* Move pkg/api/rest into genericapiserver ([#39948](https://github.com/kubernetes/kubernetes/pull/39948), [@sttts](https://github.com/sttts)) +* genericapiserver: cut off pkg/apis/extensions and pkg/storage dependencies ([#39946](https://github.com/kubernetes/kubernetes/pull/39946), [@sttts](https://github.com/sttts)) +* genericapiserver: cut off certificates api dependency ([#39947](https://github.com/kubernetes/kubernetes/pull/39947), [@sttts](https://github.com/sttts)) +* Admission control support for versioned configuration files ([#39109](https://github.com/kubernetes/kubernetes/pull/39109), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* Fix issue around merging lists of primitives when using PATCH or kubectl apply. ([#38665](https://github.com/kubernetes/kubernetes/pull/38665), [@ymqytw](https://github.com/ymqytw)) +* Fixes API compatibility issue with empty lists incorrectly returning a null `items` field instead of an empty array. ([#39834](https://github.com/kubernetes/kubernetes/pull/39834), [@liggitt](https://github.com/liggitt)) +* [scheduling] Moved pod affinity and anti-affinity from annotations to api fields [#25319](https://github.com/kubernetes/kubernetes/pull/25319) ([#39478](https://github.com/kubernetes/kubernetes/pull/39478), [@rrati](https://github.com/rrati)) +* PodSecurityPolicy resource is now enabled by default in the extensions API group. ([#39743](https://github.com/kubernetes/kubernetes/pull/39743), [@pweil-](https://github.com/pweil-)) +* add --controllers to controller manager ([#39740](https://github.com/kubernetes/kubernetes/pull/39740), [@deads2k](https://github.com/deads2k)) +* proxy/iptables: don't sync proxy rules if services map didn't change ([#38996](https://github.com/kubernetes/kubernetes/pull/38996), [@dcbw](https://github.com/dcbw)) +* Update amd64 kube-proxy base image to debian-iptables-amd64:v5 ([#39725](https://github.com/kubernetes/kubernetes/pull/39725), [@ixdy](https://github.com/ixdy)) +* Update dashboard version to v1.5.1 ([#39662](https://github.com/kubernetes/kubernetes/pull/39662), [@rf232](https://github.com/rf232)) +* Fix kubectl get -f <file> -o <nondefault printer> so it prints all items in the file ([#39038](https://github.com/kubernetes/kubernetes/pull/39038), [@ncdc](https://github.com/ncdc)) +* Scheduler treats StatefulSet pods as belonging to a single equivalence class. ([#39718](https://github.com/kubernetes/kubernetes/pull/39718), [@foxish](https://github.com/foxish)) +* --basic-auth-file supports optionally specifying groups in the fourth column of the file ([#39651](https://github.com/kubernetes/kubernetes/pull/39651), [@liggitt](https://github.com/liggitt)) +* To create or update an RBAC RoleBinding or ClusterRoleBinding object, a user must: ([#39383](https://github.com/kubernetes/kubernetes/pull/39383), [@liggitt](https://github.com/liggitt)) + * Be authorized to make the create or update API request + * Be allowed to bind the referenced role, either by already having all of the permissions contained in the referenced role, or by having the `bind` permission on the referenced role. +* Fixes an HPA-related panic due to division-by-zero. ([#39694](https://github.com/kubernetes/kubernetes/pull/39694), [@DirectXMan12](https://github.com/DirectXMan12)) +* federation: Adding support for DeleteOptions.OrphanDependents for federated services. Setting it to false while deleting a federated service also deletes the corresponding services from all registered clusters. ([#36390](https://github.com/kubernetes/kubernetes/pull/36390), [@nikhiljindal](https://github.com/nikhiljindal)) +* Update kube-proxy image to be based off of Debian 8.6 base image. ([#39695](https://github.com/kubernetes/kubernetes/pull/39695), [@ixdy](https://github.com/ixdy)) +* Update FitError as a message component into the PodConditionUpdater. ([#39491](https://github.com/kubernetes/kubernetes/pull/39491), [@jayunit100](https://github.com/jayunit100)) +* rename kubernetes-discovery to kube-aggregator ([#39619](https://github.com/kubernetes/kubernetes/pull/39619), [@deads2k](https://github.com/deads2k)) +* Allow missing keys in templates by default ([#39486](https://github.com/kubernetes/kubernetes/pull/39486), [@ncdc](https://github.com/ncdc)) +* Caching added to the OIDC client auth plugin to fix races and reduce the time kubectl commands using this plugin take by several seconds. ([#38167](https://github.com/kubernetes/kubernetes/pull/38167), [@ericchiang](https://github.com/ericchiang)) +* AWS: recognize eu-west-2 region ([#38746](https://github.com/kubernetes/kubernetes/pull/38746), [@justinsb](https://github.com/justinsb)) +* Provide kubernetes-controller-manager flags to control volume attach/detach reconciler sync. The duration of the syncs can be controlled, and the syncs can be shut off as well. ([#39551](https://github.com/kubernetes/kubernetes/pull/39551), [@chrislovecnm](https://github.com/chrislovecnm)) +* Generate OpenAPI definition for inlined types ([#39466](https://github.com/kubernetes/kubernetes/pull/39466), [@mbohlool](https://github.com/mbohlool)) +* ShortcutExpander has been extended in a way that it will examine a ha… ([#38835](https://github.com/kubernetes/kubernetes/pull/38835), [@p0lyn0mial](https://github.com/p0lyn0mial)) +* fixes nil dereference when doing a volume type check on persistent volumes ([#39493](https://github.com/kubernetes/kubernetes/pull/39493), [@sjenning](https://github.com/sjenning)) +* Fix issue with PodDisruptionBudgets in which `minAvailable` specified as a percentage did not work with StatefulSet Pods. ([#39454](https://github.com/kubernetes/kubernetes/pull/39454), [@foxish](https://github.com/foxish)) +* fix issue with kubectl proxy so that it will proxy an empty path - e.g. http://localhost:8001 ([#39226](https://github.com/kubernetes/kubernetes/pull/39226), [@luksa](https://github.com/luksa)) +* Check if pathExists before performing Unmount ([#39311](https://github.com/kubernetes/kubernetes/pull/39311), [@rkouj](https://github.com/rkouj)) +* Adding kubectl tests for federation ([#38844](https://github.com/kubernetes/kubernetes/pull/38844), [@nikhiljindal](https://github.com/nikhiljindal)) +* Fix comment and optimize code ([#38084](https://github.com/kubernetes/kubernetes/pull/38084), [@tanshanshan](https://github.com/tanshanshan)) +* When using OIDC authentication and specifying --oidc-username-claim=email, an `"email_verified":true` claim must be returned from the identity provider. ([#36087](https://github.com/kubernetes/kubernetes/pull/36087), [@ericchiang](https://github.com/ericchiang)) +* Allow pods to define multiple environment variables from a whole ConfigMap ([#36245](https://github.com/kubernetes/kubernetes/pull/36245), [@fraenkel](https://github.com/fraenkel)) +* Refactor the certificate and kubeconfig code in the kubeadm binary into two phases ([#39280](https://github.com/kubernetes/kubernetes/pull/39280), [@luxas](https://github.com/luxas)) +* Added support for printing in all supported `--output` formats to `kubectl create ...` and `kubectl apply ...` ([#38112](https://github.com/kubernetes/kubernetes/pull/38112), [@juanvallejo](https://github.com/juanvallejo)) +* genericapiserver: extract CA cert from server cert and SNI cert chains ([#39022](https://github.com/kubernetes/kubernetes/pull/39022), [@sttts](https://github.com/sttts)) +* Endpoints, that tolerate unready Pods, are now listing Pods in state Terminating as well ([#37093](https://github.com/kubernetes/kubernetes/pull/37093), [@simonswine](https://github.com/simonswine)) +* DaemonSet ObservedGeneration ([#39157](https://github.com/kubernetes/kubernetes/pull/39157), [@lukaszo](https://github.com/lukaszo)) +* The `--reconcile-cidr` kubelet flag was removed since it had been deprecated since v1.5 ([#39322](https://github.com/kubernetes/kubernetes/pull/39322), [@luxas](https://github.com/luxas)) +* Add ready replicas in Deployments ([#37959](https://github.com/kubernetes/kubernetes/pull/37959), [@kargakis](https://github.com/kargakis)) +* Remove all MAINTAINER statements in Dockerfiles in the codebase as they are deprecated by docker ([#38927](https://github.com/kubernetes/kubernetes/pull/38927), [@luxas](https://github.com/luxas)) +* Remove the deprecated vsphere kube-up. ([#39140](https://github.com/kubernetes/kubernetes/pull/39140), [@kerneltime](https://github.com/kerneltime)) +* Kubectl top now also accepts short forms for "node" and "pod" ("no", "po") ([#39218](https://github.com/kubernetes/kubernetes/pull/39218), [@luksa](https://github.com/luksa)) +* Remove 'exec' network plugin - use CNI instead ([#39254](https://github.com/kubernetes/kubernetes/pull/39254), [@freehan](https://github.com/freehan)) +* Add three more columns to `kubectl get deploy -o wide` output. ([#39240](https://github.com/kubernetes/kubernetes/pull/39240), [@xingzhou](https://github.com/xingzhou)) +* Add path exist check in getPodVolumePathListFromDisk ([#38909](https://github.com/kubernetes/kubernetes/pull/38909), [@jingxu97](https://github.com/jingxu97)) +* Begin paths for internationalization in kubectl ([#36802](https://github.com/kubernetes/kubernetes/pull/36802), [@brendandburns](https://github.com/brendandburns)) +* Fixes an issue where commas were not accepted in --from-literal flags when creating secrets. Passing multiple values separated by a comma in a single --from-literal flag is no longer supported. Please use multiple --from-literal flags to provide multiple values. ([#35191](https://github.com/kubernetes/kubernetes/pull/35191), [@SamiHiltunen](https://github.com/SamiHiltunen)) +* Support loading UTF16 files if a byte-order-mark is present ([#39008](https://github.com/kubernetes/kubernetes/pull/39008), [@brendandburns](https://github.com/brendandburns)) +* Fix fsGroup to vSphere ([#38655](https://github.com/kubernetes/kubernetes/pull/38655), [@abrarshivani](https://github.com/abrarshivani)) +* ReplicaSet has onwer ref of the Deployment that created it ([#35676](https://github.com/kubernetes/kubernetes/pull/35676), [@krmayankk](https://github.com/krmayankk)) +* Don't evict static pods ([#39059](https://github.com/kubernetes/kubernetes/pull/39059), [@bprashanth](https://github.com/bprashanth)) +* Fixed a bug where the --server, --token, and --certificate-authority flags were not overriding the related in-cluster configs when provided in a `kubectl` call inside a cluster. ([#39006](https://github.com/kubernetes/kubernetes/pull/39006), [@fabianofranz](https://github.com/fabianofranz)) +* Make fluentd pods critical ([#39146](https://github.com/kubernetes/kubernetes/pull/39146), [@Crassirostris](https://github.com/Crassirostris)) +* assign -998 as the oom_score_adj for critical pods (e.g. kube-proxy) ([#39114](https://github.com/kubernetes/kubernetes/pull/39114), [@dchen1107](https://github.com/dchen1107)) +* delete continue in monitorNodeStatus ([#38798](https://github.com/kubernetes/kubernetes/pull/38798), [@NickrenREN](https://github.com/NickrenREN)) +* add create rolebinding ([#38991](https://github.com/kubernetes/kubernetes/pull/38991), [@deads2k](https://github.com/deads2k)) +* Add new command "kubectl set selector" ([#38966](https://github.com/kubernetes/kubernetes/pull/38966), [@kargakis](https://github.com/kargakis)) +* Federation: Add `batch/jobs` API objects to federation-apiserver ([#35943](https://github.com/kubernetes/kubernetes/pull/35943), [@jianhuiz](https://github.com/jianhuiz)) +* ABAC policies using `"user":"*"` or `"group":"*"` to match all users or groups will only match authenticated requests. To match unauthenticated requests, ABAC policies must explicitly specify `"group":"system:unauthenticated"` ([#38968](https://github.com/kubernetes/kubernetes/pull/38968), [@liggitt](https://github.com/liggitt)) +* To add local registry to libvirt_coreos ([#36751](https://github.com/kubernetes/kubernetes/pull/36751), [@sdminonne](https://github.com/sdminonne)) +* Add a KUBERNETES_NODE_* section to build kubelet/kube-proxy for windows ([#38919](https://github.com/kubernetes/kubernetes/pull/38919), [@brendandburns](https://github.com/brendandburns)) +* Added kubeadm commands to manage bootstrap tokens and the duration they are valid for. ([#35805](https://github.com/kubernetes/kubernetes/pull/35805), [@dgoodwin](https://github.com/dgoodwin)) +* AWS: Recognize ca-central-1 region ([#38410](https://github.com/kubernetes/kubernetes/pull/38410), [@justinsb](https://github.com/justinsb)) +* Unmount operation should not fail if volume is already unmounted ([#38547](https://github.com/kubernetes/kubernetes/pull/38547), [@rkouj](https://github.com/rkouj)) +* Changed default scsi controller type in vSphere Cloud Provider ([#38426](https://github.com/kubernetes/kubernetes/pull/38426), [@abrarshivani](https://github.com/abrarshivani)) +* Move non-generic apiserver code out of the generic packages ([#38191](https://github.com/kubernetes/kubernetes/pull/38191), [@sttts](https://github.com/sttts)) +* Remove extensions/v1beta1 Jobs resource, and job/v1beta1 generator. ([#38614](https://github.com/kubernetes/kubernetes/pull/38614), [@soltysh](https://github.com/soltysh)) +* Admit critical pods in the kubelet ([#38836](https://github.com/kubernetes/kubernetes/pull/38836), [@bprashanth](https://github.com/bprashanth)) +* Use daemonset in docker registry add on ([#35582](https://github.com/kubernetes/kubernetes/pull/35582), [@surajssd](https://github.com/surajssd)) +* Node affinity has moved from annotations to api fields in the pod spec. Node affinity that is defined in the annotations will be ignored. ([#37299](https://github.com/kubernetes/kubernetes/pull/37299), [@rrati](https://github.com/rrati)) +* Since `kubernetes.tar.gz` no longer includes client or server binaries, `cluster/kube-{up,down,push}.sh` now automatically download released binaries if they are missing. ([#38730](https://github.com/kubernetes/kubernetes/pull/38730), [@ixdy](https://github.com/ixdy)) +* genericapiserver: turn APIContainer.SecretRoutes into a real ServeMux ([#38826](https://github.com/kubernetes/kubernetes/pull/38826), [@sttts](https://github.com/sttts)) +* Migrated fluentd addon to daemon set ([#32088](https://github.com/kubernetes/kubernetes/pull/32088), [@piosz](https://github.com/piosz)) +* AWS: Add sequential allocator for device names. ([#38818](https://github.com/kubernetes/kubernetes/pull/38818), [@jsafrane](https://github.com/jsafrane)) +* Add 'X-Content-Type-Options: nosniff" to some error messages ([#37190](https://github.com/kubernetes/kubernetes/pull/37190), [@brendandburns](https://github.com/brendandburns)) +* Display pod node selectors with kubectl describe. ([#36396](https://github.com/kubernetes/kubernetes/pull/36396), [@aveshagarwal](https://github.com/aveshagarwal)) +* The main repository does not keep multiple releases of clientsets anymore. Please find previous releases at https://github.com/kubernetes/client-go ([#38154](https://github.com/kubernetes/kubernetes/pull/38154), [@caesarxuchao](https://github.com/caesarxuchao)) +* Remove a release-note on multiple OpenAPI specs ([#38732](https://github.com/kubernetes/kubernetes/pull/38732), [@mbohlool](https://github.com/mbohlool)) +* genericapiserver: unify swagger and openapi in config ([#38690](https://github.com/kubernetes/kubernetes/pull/38690), [@sttts](https://github.com/sttts)) +* fix connection upgrades through kuberentes-discovery ([#38724](https://github.com/kubernetes/kubernetes/pull/38724), [@deads2k](https://github.com/deads2k)) +* Fixes bug in resolving client-requested API versions ([#38533](https://github.com/kubernetes/kubernetes/pull/38533), [@DirectXMan12](https://github.com/DirectXMan12)) +* apiserver(s): Replace glog.Fatals with fmt.Errorfs ([#38175](https://github.com/kubernetes/kubernetes/pull/38175), [@sttts](https://github.com/sttts)) +* Remove Azure Subnet RouteTable check ([#38334](https://github.com/kubernetes/kubernetes/pull/38334), [@mogthesprog](https://github.com/mogthesprog)) +* Ensure the GCI metadata files do not have newline at the end ([#38727](https://github.com/kubernetes/kubernetes/pull/38727), [@Amey-D](https://github.com/Amey-D)) +* Significantly speed-up make ([#38700](https://github.com/kubernetes/kubernetes/pull/38700), [@sttts](https://github.com/sttts)) +* add QoS pod status field ([#37968](https://github.com/kubernetes/kubernetes/pull/37968), [@sjenning](https://github.com/sjenning)) +* Fixed validation of multizone cluster for GCE ([#38695](https://github.com/kubernetes/kubernetes/pull/38695), [@jszczepkowski](https://github.com/jszczepkowski)) +* Fixed detection of master during creation of multizone nodes cluster by kube-up. ([#38617](https://github.com/kubernetes/kubernetes/pull/38617), [@jszczepkowski](https://github.com/jszczepkowski)) +* Update CHANGELOG.md to warn about anon auth flag ([#38675](https://github.com/kubernetes/kubernetes/pull/38675), [@erictune](https://github.com/erictune)) +* Fixes NotAuthenticated errors that appear in the kubelet and kube-controller-manager due to never logging in to vSphere ([#36169](https://github.com/kubernetes/kubernetes/pull/36169), [@robdaemon](https://github.com/robdaemon)) +* Fix an issue where AWS tear-down leaks an DHCP Option Set. ([#38645](https://github.com/kubernetes/kubernetes/pull/38645), [@zmerlynn](https://github.com/zmerlynn)) +* Issue a warning when using `kubectl apply` on a resource lacking the `LastAppliedConfig` annotation ([#36672](https://github.com/kubernetes/kubernetes/pull/36672), [@ymqytw](https://github.com/ymqytw)) +* Re-add /healthz/ping handler in genericapiserver ([#38603](https://github.com/kubernetes/kubernetes/pull/38603), [@sttts](https://github.com/sttts)) +* Fail kubelet if runtime is unresponsive for 30 seconds ([#38527](https://github.com/kubernetes/kubernetes/pull/38527), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* Add support for Azure Container Registry, update Azure dependencies ([#37783](https://github.com/kubernetes/kubernetes/pull/37783), [@brendandburns](https://github.com/brendandburns)) +* Fix panic in vSphere cloud provider ([#38423](https://github.com/kubernetes/kubernetes/pull/38423), [@BaluDontu](https://github.com/BaluDontu)) +* fix broken cluster/centos and enhance the style ([#34002](https://github.com/kubernetes/kubernetes/pull/34002), [@xiaoping378](https://github.com/xiaoping378)) +* Ability to quota storage by storage class ([#34554](https://github.com/kubernetes/kubernetes/pull/34554), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* [Part 2] Adding s390x cross-compilation support for gcr.io images in this repo ([#36050](https://github.com/kubernetes/kubernetes/pull/36050), [@gajju26](https://github.com/gajju26)) +* kubectl run --rm no longer prints "pod xxx deleted" ([#38429](https://github.com/kubernetes/kubernetes/pull/38429), [@duglin](https://github.com/duglin)) +* Bump GCE debian image to container-vm-v20161208 ([release notes](https://cloud.google.com/compute/docs/containers/container_vms#changelog)) ([#38432](https://github.com/kubernetes/kubernetes/pull/38432), [@timstclair](https://github.com/timstclair)) +* Kubelet: Add image cache. ([#38375](https://github.com/kubernetes/kubernetes/pull/38375), [@Random-Liu](https://github.com/Random-Liu)) +* Allow a selector when retrieving logs ([#32752](https://github.com/kubernetes/kubernetes/pull/32752), [@fraenkel](https://github.com/fraenkel)) +* Fix unmountDevice issue caused by shared mount in GCI ([#38411](https://github.com/kubernetes/kubernetes/pull/38411), [@jingxu97](https://github.com/jingxu97)) +* [Federation] Implement dry run support in kubefed init ([#36447](https://github.com/kubernetes/kubernetes/pull/36447), [@irfanurrehman](https://github.com/irfanurrehman)) +* Fix space issue in volumePath with vSphere Cloud Provider ([#38338](https://github.com/kubernetes/kubernetes/pull/38338), [@BaluDontu](https://github.com/BaluDontu)) +* [Federation] Make federation etcd PVC size configurable ([#36310](https://github.com/kubernetes/kubernetes/pull/36310), [@irfanurrehman](https://github.com/irfanurrehman)) +* Allow no ports when exposing headless service ([#32811](https://github.com/kubernetes/kubernetes/pull/32811), [@fraenkel](https://github.com/fraenkel)) +* Wait for the port to be ready before starting ([#38260](https://github.com/kubernetes/kubernetes/pull/38260), [@fraenkel](https://github.com/fraenkel)) +* Add Version to the resource printer for 'get nodes' ([#37943](https://github.com/kubernetes/kubernetes/pull/37943), [@ailusazh](https://github.com/ailusazh)) +* contribute deis/registry-proxy as a replacement for kube-registry-proxy ([#35797](https://github.com/kubernetes/kubernetes/pull/35797), [@bacongobbler](https://github.com/bacongobbler)) +* [Part 1] Add support for cross-compiling s390x binaries ([#37092](https://github.com/kubernetes/kubernetes/pull/37092), [@gajju26](https://github.com/gajju26)) +* kernel memcg notification enabled via experimental flag ([#38258](https://github.com/kubernetes/kubernetes/pull/38258), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* fix permissions when using fsGroup ([#37009](https://github.com/kubernetes/kubernetes/pull/37009), [@sjenning](https://github.com/sjenning)) +* Pipe get options to storage ([#37693](https://github.com/kubernetes/kubernetes/pull/37693), [@wojtek-t](https://github.com/wojtek-t)) +* add a configuration for kubelet to register as a node with taints ([#31647](https://github.com/kubernetes/kubernetes/pull/31647), [@mikedanese](https://github.com/mikedanese)) +* Remove genericapiserver.Options.MasterServiceNamespace ([#38186](https://github.com/kubernetes/kubernetes/pull/38186), [@sttts](https://github.com/sttts)) +* The --long-running-request-regexp flag to kube-apiserver is deprecated and will be removed in a future release. Long-running requests are now detected based on specific verbs (watch, proxy) or subresources (proxy, portforward, log, exec, attach). ([#38119](https://github.com/kubernetes/kubernetes/pull/38119), [@liggitt](https://github.com/liggitt)) +* Better compat with very old iptables (e.g. CentOS 6) ([#37594](https://github.com/kubernetes/kubernetes/pull/37594), [@thockin](https://github.com/thockin)) +* Fix GCI mounter issue ([#38124](https://github.com/kubernetes/kubernetes/pull/38124), [@jingxu97](https://github.com/jingxu97)) +* Kubelet will no longer set hairpin mode on every interface on the machine when an error occurs in setting up hairpin for a specific interface. ([#36990](https://github.com/kubernetes/kubernetes/pull/36990), [@bboreham](https://github.com/bboreham)) +* fix mesos unit tests ([#38196](https://github.com/kubernetes/kubernetes/pull/38196), [@deads2k](https://github.com/deads2k)) +* Add `--controllers` flag to federation controller manager for enable/disable federation ingress controller ([#36643](https://github.com/kubernetes/kubernetes/pull/36643), [@kzwang](https://github.com/kzwang)) +* Allow backendpools in Azure Load Balancers which are not owned by cloud provider ([#36882](https://github.com/kubernetes/kubernetes/pull/36882), [@codablock](https://github.com/codablock)) +* remove rbac super user ([#38121](https://github.com/kubernetes/kubernetes/pull/38121), [@deads2k](https://github.com/deads2k)) +* API server have two separate limits for read-only and mutating inflight requests. ([#36064](https://github.com/kubernetes/kubernetes/pull/36064), [@gmarek](https://github.com/gmarek)) +* check the value of min and max in kubectl ([#37789](https://github.com/kubernetes/kubernetes/pull/37789), [@yarntime](https://github.com/yarntime)) +* The glusterfs dynamic volume provisioner will now choose a unique GID for new persistent volumes from a range that can be configured in the storage class with the "gidMin" and "gidMax" parameters. The default range is 2000 - 2147483647 (max int32). ([#37886](https://github.com/kubernetes/kubernetes/pull/37886), [@obnoxxx](https://github.com/obnoxxx)) +* Add kubectl create poddisruptionbudget command ([#36646](https://github.com/kubernetes/kubernetes/pull/36646), [@kargakis](https://github.com/kargakis)) +* Set kernel.softlockup_panic =1 based on the flag. ([#38001](https://github.com/kubernetes/kubernetes/pull/38001), [@dchen1107](https://github.com/dchen1107)) +* portfordwardtester: avoid data loss during send+close+exit ([#37103](https://github.com/kubernetes/kubernetes/pull/37103), [@sttts](https://github.com/sttts)) +* Enable containerized mounter only for nfs and glusterfs types ([#37990](https://github.com/kubernetes/kubernetes/pull/37990), [@jingxu97](https://github.com/jingxu97)) +* Add flag to enable contention profiling in scheduler. ([#37357](https://github.com/kubernetes/kubernetes/pull/37357), [@gmarek](https://github.com/gmarek)) +* Add kubernetes-anywhere as a new e2e deployment option ([#37019](https://github.com/kubernetes/kubernetes/pull/37019), [@pipejakob](https://github.com/pipejakob)) +* add create clusterrolebinding command ([#37098](https://github.com/kubernetes/kubernetes/pull/37098), [@deads2k](https://github.com/deads2k)) +* kubectl create service externalname ([#34789](https://github.com/kubernetes/kubernetes/pull/34789), [@AdoHe](https://github.com/AdoHe)) +* Fix logic error in graceful deletion ([#37721](https://github.com/kubernetes/kubernetes/pull/37721), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* Exit with error if <version number or publication> is not the final parameter. ([#37723](https://github.com/kubernetes/kubernetes/pull/37723), [@mtaufen](https://github.com/mtaufen)) +* Fix Service Update on LoadBalancerSourceRanges Field ([#37720](https://github.com/kubernetes/kubernetes/pull/37720), [@freehan](https://github.com/freehan)) +* Bug fix. Incoming UDP packets not reach newly deployed services ([#32561](https://github.com/kubernetes/kubernetes/pull/32561), [@zreigz](https://github.com/zreigz)) +* GCI: Remove /var/lib/docker/network ([#37593](https://github.com/kubernetes/kubernetes/pull/37593), [@yujuhong](https://github.com/yujuhong)) +* configure local-up-cluster.sh to handle auth proxies ([#36838](https://github.com/kubernetes/kubernetes/pull/36838), [@deads2k](https://github.com/deads2k)) +* Add `clusterid`, an optional parameter to storageclass. ([#36437](https://github.com/kubernetes/kubernetes/pull/36437), [@humblec](https://github.com/humblec)) +* local-up-cluster: avoid sudo for control plane ([#37443](https://github.com/kubernetes/kubernetes/pull/37443), [@sttts](https://github.com/sttts)) +* Add error message when trying to use clusterrole with namespace in kubectl ([#36424](https://github.com/kubernetes/kubernetes/pull/36424), [@xilabao](https://github.com/xilabao)) +* `kube-up.sh`/`kube-down.sh` no longer force update gcloud for provider=gce|gke. ([#36292](https://github.com/kubernetes/kubernetes/pull/36292), [@jlowdermilk](https://github.com/jlowdermilk)) +* Fix issue when attempting to unmount a wrong vSphere volume ([#37413](https://github.com/kubernetes/kubernetes/pull/37413), [@BaluDontu](https://github.com/BaluDontu)) +* Fix the equality checks for numeric values in cluster/gce/util.sh. ([#37638](https://github.com/kubernetes/kubernetes/pull/37638), [@roberthbailey](https://github.com/roberthbailey)) +* kubelet: don't reject pods without adding them to the pod manager ([#37661](https://github.com/kubernetes/kubernetes/pull/37661), [@yujuhong](https://github.com/yujuhong)) +* Modify GCI mounter to enable NFSv3 ([#37582](https://github.com/kubernetes/kubernetes/pull/37582), [@jingxu97](https://github.com/jingxu97)) +* Fix photon controller plugin to construct with correct PdID ([#37167](https://github.com/kubernetes/kubernetes/pull/37167), [@luomiao](https://github.com/luomiao)) +* Collect logs for dead kubelets too ([#37671](https://github.com/kubernetes/kubernetes/pull/37671), [@mtaufen](https://github.com/mtaufen)) +* Set Dashboard UI version to v1.5.0 ([#37684](https://github.com/kubernetes/kubernetes/pull/37684), [@rf232](https://github.com/rf232)) +* When deleting an object with `--grace-period=0`, the client will begin a graceful deletion and wait until the resource is fully deleted. To force deletion, use the `--force` flag. ([#37263](https://github.com/kubernetes/kubernetes/pull/37263), [@smarterclayton](https://github.com/smarterclayton)) +* federation service controller: stop deleting services from underlying clusters when federated service is deleted. ([#37353](https://github.com/kubernetes/kubernetes/pull/37353), [@nikhiljindal](https://github.com/nikhiljindal)) +* Fix nil pointer dereference in test framework ([#37583](https://github.com/kubernetes/kubernetes/pull/37583), [@mtaufen](https://github.com/mtaufen)) +* Kubernetes now automatically installs a StorageClass object when deployed on ([#31617](https://github.com/kubernetes/kubernetes/pull/31617), [@jsafrane](https://github.com/jsafrane)) + * AWS, Google Compute Engine, Google Container Engine, and OpenStack using + * the default kube-up.sh scripts. This StorageClass is marked as default so that + * a PersistentVolumeClaim without a StorageClass annotation now results in + * automatic provisioning of storage (GCE PersistentDisk on Google Cloud, AWS + * EBS on AWS, and Cinder on OpenStack). In previous versions of Kubernetes + * a PersistentVolumeClaim without a StorageClass annotation on these cloud + * platforms would be satisfied by manually-created PersistentVolume objects. + * Administrators can choose to disable this behavior by deleting the automatically + * installed StorageClass API object. Alternatively, administrators may choose to + * keep the automatically installed StorageClass and only disable the defaulting + * behavior by removing the "is-default-class" annotation from the StorageClass + * API object. +* Fix TestServiceAlloc flakes ([#37487](https://github.com/kubernetes/kubernetes/pull/37487), [@wojtek-t](https://github.com/wojtek-t)) +* Use gsed on the Mac ([#37562](https://github.com/kubernetes/kubernetes/pull/37562), [@roberthbailey](https://github.com/roberthbailey)) +* Try self-repair scheduler cache or panic ([#37379](https://github.com/kubernetes/kubernetes/pull/37379), [@wojtek-t](https://github.com/wojtek-t)) +* Fluentd/Elastisearch add-on: correctly parse and index kubernetes labels ([#36857](https://github.com/kubernetes/kubernetes/pull/36857), [@Shrugs](https://github.com/Shrugs)) +* Mention overflows when mistakenly call function FromInt ([#36487](https://github.com/kubernetes/kubernetes/pull/36487), [@xialonglee](https://github.com/xialonglee)) +* Update doc for kubectl apply ([#37397](https://github.com/kubernetes/kubernetes/pull/37397), [@ymqytw](https://github.com/ymqytw)) +* Removes shorthand flag -w from kubectl apply ([#37345](https://github.com/kubernetes/kubernetes/pull/37345), [@MrHohn](https://github.com/MrHohn)) +* Curating Owners: pkg/api ([#36525](https://github.com/kubernetes/kubernetes/pull/36525), [@apelisse](https://github.com/apelisse)) +* Reduce verbosity of volume reconciler when attaching volumes ([#36900](https://github.com/kubernetes/kubernetes/pull/36900), [@codablock](https://github.com/codablock)) +* Federated Ingress Proposal ([#29793](https://github.com/kubernetes/kubernetes/pull/29793), [@quinton-hoole](https://github.com/quinton-hoole)) + +Please see the [Releases Page](https://github.com/kubernetes/kubernetes/releases) for older releases. + +Release notes of older releases can be found in: +- [CHANGELOG-1.2.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.2.md) +- [CHANGELOG-1.3.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.3.md) +- [CHANGELOG-1.4.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.4.md) +- [CHANGELOG-1.5.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.5.md) + +[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/CHANGELOG.md?pixel)]() diff --git a/vendor/k8s.io/kubernetes/CHANGELOG.md b/vendor/k8s.io/kubernetes/CHANGELOG.md new file mode 100644 index 000000000..ae82fff0e --- /dev/null +++ b/vendor/k8s.io/kubernetes/CHANGELOG.md @@ -0,0 +1,3479 @@ +<!-- BEGIN MUNGE: GENERATED_TOC --> +- [v1.7.6](#v176) + - [Downloads for v1.7.6](#downloads-for-v176) + - [Client Binaries](#client-binaries) + - [Server Binaries](#server-binaries) + - [Node Binaries](#node-binaries) + - [Changelog since v1.7.5](#changelog-since-v175) + - [Other notable changes](#other-notable-changes) +- [v1.8.0-beta.1](#v180-beta1) + - [Downloads for v1.8.0-beta.1](#downloads-for-v180-beta1) + - [Client Binaries](#client-binaries-1) + - [Server Binaries](#server-binaries-1) + - [Node Binaries](#node-binaries-1) + - [Changelog since v1.8.0-alpha.3](#changelog-since-v180-alpha3) + - [Action Required](#action-required) + - [Other notable changes](#other-notable-changes-1) +- [v1.7.5](#v175) + - [Downloads for v1.7.5](#downloads-for-v175) + - [Client Binaries](#client-binaries-2) + - [Server Binaries](#server-binaries-2) + - [Node Binaries](#node-binaries-2) + - [Changelog since v1.7.4](#changelog-since-v174) + - [Other notable changes](#other-notable-changes-2) +- [v1.8.0-alpha.3](#v180-alpha3) + - [Downloads for v1.8.0-alpha.3](#downloads-for-v180-alpha3) + - [Client Binaries](#client-binaries-3) + - [Server Binaries](#server-binaries-3) + - [Node Binaries](#node-binaries-3) + - [Changelog since v1.8.0-alpha.2](#changelog-since-v180-alpha2) + - [Action Required](#action-required-1) + - [Other notable changes](#other-notable-changes-3) +- [v1.7.4](#v174) + - [Downloads for v1.7.4](#downloads-for-v174) + - [Client Binaries](#client-binaries-4) + - [Server Binaries](#server-binaries-4) + - [Node Binaries](#node-binaries-4) + - [Changelog since v1.7.3](#changelog-since-v173) + - [Other notable changes](#other-notable-changes-4) +- [v1.7.3](#v173) + - [Downloads for v1.7.3](#downloads-for-v173) + - [Client Binaries](#client-binaries-5) + - [Server Binaries](#server-binaries-5) + - [Node Binaries](#node-binaries-5) + - [Changelog since v1.7.2](#changelog-since-v172) + - [Other notable changes](#other-notable-changes-5) +- [v1.7.2](#v172) + - [Downloads for v1.7.2](#downloads-for-v172) + - [Client Binaries](#client-binaries-6) + - [Server Binaries](#server-binaries-6) + - [Node Binaries](#node-binaries-6) + - [Changelog since v1.7.1](#changelog-since-v171) + - [Other notable changes](#other-notable-changes-6) +- [v1.7.1](#v171) + - [Downloads for v1.7.1](#downloads-for-v171) + - [Client Binaries](#client-binaries-7) + - [Server Binaries](#server-binaries-7) + - [Node Binaries](#node-binaries-7) + - [Changelog since v1.7.0](#changelog-since-v170) + - [Other notable changes](#other-notable-changes-7) +- [v1.8.0-alpha.2](#v180-alpha2) + - [Downloads for v1.8.0-alpha.2](#downloads-for-v180-alpha2) + - [Client Binaries](#client-binaries-8) + - [Server Binaries](#server-binaries-8) + - [Node Binaries](#node-binaries-8) + - [Changelog since v1.7.0](#changelog-since-v170-1) + - [Action Required](#action-required-2) + - [Other notable changes](#other-notable-changes-8) +- [v1.7.0](#v170) + - [Downloads for v1.7.0](#downloads-for-v170) + - [Client Binaries](#client-binaries-9) + - [Server Binaries](#server-binaries-9) + - [Node Binaries](#node-binaries-9) + - [**Major Themes**](#major-themes) + - [**Action Required Before Upgrading**](#action-required-before-upgrading) + - [Network](#network) + - [Storage](#storage) + - [API Machinery](#api-machinery) + - [Controller Manager](#controller-manager) + - [kubectl (CLI)](#kubectl-cli) + - [kubeadm](#kubeadm) + - [Cloud Providers](#cloud-providers) + - [**Known Issues**](#known-issues) + - [**Deprecations**](#deprecations) + - [Cluster provisioning scripts](#cluster-provisioning-scripts) + - [Client libraries](#client-libraries) + - [DaemonSet](#daemonset) + - [kube-proxy](#kube-proxy) + - [Namespace](#namespace) + - [Scheduling](#scheduling) + - [**Notable Features**](#notable-features) + - [Kubefed](#kubefed) + - [**Kubernetes API**](#kubernetes-api) + - [User Provided Extensions](#user-provided-extensions) + - [**Application Deployment**](#application-deployment) + - [StatefulSet](#statefulset) + - [DaemonSet](#daemonset-1) + - [Deployments](#deployments) + - [PodDisruptionBudget](#poddisruptionbudget) + - [**Security**](#security) + - [Admission Control](#admission-control) + - [TLS Bootstrapping](#tls-bootstrapping) + - [Audit Logging](#audit-logging) + - [Encryption at Rest](#encryption-at-rest) + - [Node Authorization](#node-authorization) + - [**Application Autoscaling**](#application-autoscaling) + - [Horizontal Pod Autoscaler](#horizontal-pod-autoscaler) + - [**Cluster Lifecycle**](#cluster-lifecycle) + - [kubeadm](#kubeadm-1) + - [Cloud Provider Support](#cloud-provider-support) + - [**Cluster Federation**](#cluster-federation) + - [Placement Policy](#placement-policy) + - [Cluster Selection](#cluster-selection) + - [**Instrumentation**](#instrumentation) + - [Core Metrics API](#core-metrics-api) + - [**Internationalization**](#internationalization) + - [**kubectl (CLI)**](#kubectl-cli-1) + - [**Networking**](#networking) + - [Network Policy](#network-policy) + - [Load Balancing](#load-balancing) + - [**Node Components**](#node-components) + - [Container Runtime Interface](#container-runtime-interface) + - [**Scheduling**](#scheduling-1) + - [Scheduler Extender](#scheduler-extender) + - [**Storage**](#storage-1) + - [Local Storage](#local-storage) + - [Volume Plugins](#volume-plugins) + - [Metrics](#metrics) + - [**Other notable changes**](#other-notable-changes-9) + - [Admission plugin](#admission-plugin) + - [API Machinery](#api-machinery-1) + - [Application autoscaling](#application-autoscaling-1) + - [Application Deployment](#application-deployment-1) + - [Cluster Autoscaling](#cluster-autoscaling) + - [Cloud Provider Enhancement](#cloud-provider-enhancement) + - [Cluster Provisioning](#cluster-provisioning) + - [Cluster federation](#cluster-federation-1) + - [Credential provider](#credential-provider) + - [Information for Kubernetes clients (openapi, swagger, client-go)](#information-for-kubernetes-clients-openapi-swagger-client-go) + - [Instrumentation](#instrumentation-1) + - [Internal storage layer](#internal-storage-layer) + - [Kubernetes Dashboard](#kubernetes-dashboard) + - [kube-dns](#kube-dns) + - [kube-proxy](#kube-proxy-1) + - [kube-scheduler](#kube-scheduler) + - [Storage](#storage-2) + - [Networking](#networking-1) + - [Node controller](#node-controller) + - [Node Components](#node-components-1) + - [Scheduling](#scheduling-2) + - [Security](#security-1) + - [Scalability](#scalability) + - [**External Dependency Version Information**](#external-dependency-version-information) + - [Previous Releases Included in v1.7.0](#previous-releases-included-in-v170) +- [v1.7.0-rc.1](#v170-rc1) + - [Downloads for v1.7.0-rc.1](#downloads-for-v170-rc1) + - [Client Binaries](#client-binaries-10) + - [Server Binaries](#server-binaries-10) + - [Node Binaries](#node-binaries-10) + - [Changelog since v1.7.0-beta.2](#changelog-since-v170-beta2) + - [Action Required](#action-required-3) + - [Other notable changes](#other-notable-changes-10) +- [v1.8.0-alpha.1](#v180-alpha1) + - [Downloads for v1.8.0-alpha.1](#downloads-for-v180-alpha1) + - [Client Binaries](#client-binaries-11) + - [Server Binaries](#server-binaries-11) + - [Node Binaries](#node-binaries-11) + - [Changelog since v1.7.0-alpha.4](#changelog-since-v170-alpha4) + - [Action Required](#action-required-4) + - [Other notable changes](#other-notable-changes-11) +- [v1.7.0-beta.2](#v170-beta2) + - [Downloads for v1.7.0-beta.2](#downloads-for-v170-beta2) + - [Client Binaries](#client-binaries-12) + - [Server Binaries](#server-binaries-12) + - [Node Binaries](#node-binaries-12) + - [Changelog since v1.7.0-beta.1](#changelog-since-v170-beta1) + - [Action Required](#action-required-5) + - [Other notable changes](#other-notable-changes-12) +- [v1.7.0-beta.1](#v170-beta1) + - [Downloads for v1.7.0-beta.1](#downloads-for-v170-beta1) + - [Client Binaries](#client-binaries-13) + - [Server Binaries](#server-binaries-13) + - [Node Binaries](#node-binaries-13) + - [Changelog since v1.7.0-alpha.4](#changelog-since-v170-alpha4-1) + - [Action Required](#action-required-6) + - [Other notable changes](#other-notable-changes-13) +- [v1.7.0-alpha.4](#v170-alpha4) + - [Downloads for v1.7.0-alpha.4](#downloads-for-v170-alpha4) + - [Client Binaries](#client-binaries-14) + - [Server Binaries](#server-binaries-14) + - [Node Binaries](#node-binaries-14) + - [Changelog since v1.7.0-alpha.3](#changelog-since-v170-alpha3) + - [Action Required](#action-required-7) + - [Other notable changes](#other-notable-changes-14) +- [v1.7.0-alpha.3](#v170-alpha3) + - [Downloads for v1.7.0-alpha.3](#downloads-for-v170-alpha3) + - [Client Binaries](#client-binaries-15) + - [Server Binaries](#server-binaries-15) + - [Node Binaries](#node-binaries-15) + - [Changelog since v1.7.0-alpha.2](#changelog-since-v170-alpha2) + - [Action Required](#action-required-8) + - [Other notable changes](#other-notable-changes-15) +- [v1.7.0-alpha.2](#v170-alpha2) + - [Downloads for v1.7.0-alpha.2](#downloads-for-v170-alpha2) + - [Client Binaries](#client-binaries-16) + - [Server Binaries](#server-binaries-16) + - [Changelog since v1.7.0-alpha.1](#changelog-since-v170-alpha1) + - [Action Required](#action-required-9) + - [Other notable changes](#other-notable-changes-16) +- [v1.7.0-alpha.1](#v170-alpha1) + - [Downloads for v1.7.0-alpha.1](#downloads-for-v170-alpha1) + - [Client Binaries](#client-binaries-17) + - [Server Binaries](#server-binaries-17) + - [Changelog since v1.6.0](#changelog-since-v160) + - [Other notable changes](#other-notable-changes-17) +<!-- END MUNGE: GENERATED_TOC --> + +<!-- NEW RELEASE NOTES ENTRY --> + + +# v1.7.6 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.7/examples) + +## Downloads for v1.7.6 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.7.6/kubernetes.tar.gz) | `6d2462aed79097845129e05375fdf16b724c32d47579d30a9b563a8d360d3ae3` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.7.6/kubernetes-src.tar.gz) | `ee66724a04900f4b90bc6eccbd6487095d888a90cf7cfdc0f5b5e9425ae95e47` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.7.6/kubernetes-client-darwin-386.tar.gz) | `fc5ee8d608cc551693839ac79c1330b7a688930a8f16b0d313128844d598e4d3` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.7.6/kubernetes-client-darwin-amd64.tar.gz) | `0e9dad45f6dd4ef06d9aef7151ba02612300ddebf7fb4b7e64174408590e340e` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.7.6/kubernetes-client-linux-386.tar.gz) | `74fc57544bd2b109fb620f0f8f1e821a66e83082700a49cfc38e5b2c1d7221a6` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.6/kubernetes-client-linux-amd64.tar.gz) | `0d46a9c297d193bc193487aa1734141be764a0078759748ec800f92bd183de5f` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.6/kubernetes-client-linux-arm64.tar.gz) | `ef9dbbd93e4ad02e02297466b631e779f5fd96f2a449a5f628b239068e615a22` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.7.6/kubernetes-client-linux-arm.tar.gz) | `25637797aed9d4904e8209d5085ade93df12a9fbcf6c09499e3a20cba6876122` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.6/kubernetes-client-linux-ppc64le.tar.gz) | `9a9cc9e747fd56330c87b68508c9cb6cedbe988a7682e70f6410a0d1c6bc9256` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.6/kubernetes-client-linux-s390x.tar.gz) | `8cdaaf06618b5e936ad90bdae608ea0e9f352b91197002031b3802fbdeda6aa3` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.7.6/kubernetes-client-windows-386.tar.gz) | `e1e74224d151d0317eba54ac02bdac21e86416af475b27a068e9f72749b10481` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.7.6/kubernetes-client-windows-amd64.tar.gz) | `37d9a7c0fbf3ff1e47d51a986f939c4f257bf265916c5f1b2e809b8161f48953` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.6/kubernetes-server-linux-amd64.tar.gz) | `302c3c48f9c2def14fd4503f5caf3c66e8abefd478e735ec7a270b3ba313f93c` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.6/kubernetes-server-linux-arm64.tar.gz) | `04a28285cc98e57dee3d41987adb4e08e049b9c0d493ed3ae1b7017c2d4aaa66` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.7.6/kubernetes-server-linux-arm.tar.gz) | `caf808442d09784dea5b18d89a39cbfe318257bd5efa03ab81b4393a5aa3e370` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.6/kubernetes-server-linux-ppc64le.tar.gz) | `b156c17df4a4c2badd1c7e580652ffe6d816c1134ebb22e1ca1fa7ef1b8326df` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.6/kubernetes-server-linux-s390x.tar.gz) | `1a4fedd1ec94429b5ea8ef894b04940e248f872fab272f28fddff5951e4ee571` + +### Node Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.6/kubernetes-node-linux-amd64.tar.gz) | `8d798ef84c933c9aa4ba144277ebe571879b2237239827565327be2c97726bbc` +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.6/kubernetes-node-linux-arm64.tar.gz) | `ca0976faf03812a415da6a0dc244a65222a3f8d81b3da929530988a36ce0dc1a` +[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.7.6/kubernetes-node-linux-arm.tar.gz) | `92fd22d0bb51d32e24490a0ec12c48e28b5c5a19826c10f5e9061d06620ca12f` +[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.6/kubernetes-node-linux-ppc64le.tar.gz) | `1b39b2a89a5522a9f1d23b90a51070a13bede72a66c3b6b217289fa4fadbc0d6` +[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.6/kubernetes-node-linux-s390x.tar.gz) | `fda8c1ed4ebd406a6c19d0a982ba6705f0533e6c1db96e2bd121392deb4018ed` +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.7.6/kubernetes-node-windows-amd64.tar.gz) | `325caebf0f5d9dc79259f9609014e80385753d3ad1fff7fb276b19d2f272ef3b` + +## Changelog since v1.7.5 + +### Other notable changes + +* [fluentd-gcp addon] Fluentd will trim lines exceeding 100KB instead of dropping them. ([#52289](https://github.com/kubernetes/kubernetes/pull/52289), [@crassirostris](https://github.com/crassirostris)) +* Cluster Autoscaler 0.6.2 ([#52359](https://github.com/kubernetes/kubernetes/pull/52359), [@mwielgus](https://github.com/mwielgus)) +* Add --request-timeout to kube-apiserver to make global request timeout configurable. ([#51415](https://github.com/kubernetes/kubernetes/pull/51415), [@jpbetz](https://github.com/jpbetz)) +* Fix credentials providers for docker sandbox image. ([#51870](https://github.com/kubernetes/kubernetes/pull/51870), [@feiskyer](https://github.com/feiskyer)) +* Fix security holes in GCE metadata proxy. ([#51302](https://github.com/kubernetes/kubernetes/pull/51302), [@ihmccreery](https://github.com/ihmccreery)) +* Fixed an issue looking up cronjobs when they existed in more than one API version ([#52227](https://github.com/kubernetes/kubernetes/pull/52227), [@liggitt](https://github.com/liggitt)) +* Fixes an issue with upgrade requests made via pod/service/node proxy subresources sending a non-absolute HTTP request-uri to backends ([#52065](https://github.com/kubernetes/kubernetes/pull/52065), [@liggitt](https://github.com/liggitt)) +* Fix a kube-controller-manager crash which can result when `--concurrent-resource-quota-syncs` is >1 and pods exist in the system containing certain alpha/beta annotation keys. ([#52092](https://github.com/kubernetes/kubernetes/pull/52092), [@ironcladlou](https://github.com/ironcladlou)) +* Make logdump support kubemark and support gke with 'use_custom_instance_list' ([#51834](https://github.com/kubernetes/kubernetes/pull/51834), [@shyamjvs](https://github.com/shyamjvs)) +* Fixes an issue with APIService auto-registration affecting rolling HA apiserver restarts that add or remove API groups being served. ([#51921](https://github.com/kubernetes/kubernetes/pull/51921), [@liggitt](https://github.com/liggitt)) +* In GCE with COS, increase TasksMax for Docker service to raise cap on number of threads/processes used by containers. ([#51986](https://github.com/kubernetes/kubernetes/pull/51986), [@yujuhong](https://github.com/yujuhong)) +* Fix providerID update validation ([#51761](https://github.com/kubernetes/kubernetes/pull/51761), [@karataliu](https://github.com/karataliu)) +* Automated cherry pick of [#50381](https://github.com/kubernetes/kubernetes/pull/50381) to release-1.7 ([#51871](https://github.com/kubernetes/kubernetes/pull/51871), [@feiskyer](https://github.com/feiskyer)) +* The `emptyDir.sizeLimit` field is now correctly omitted from API requests and responses when unset. ([#50163](https://github.com/kubernetes/kubernetes/pull/50163), [@jingxu97](https://github.com/jingxu97)) +* Calico has been updated to v2.5, RBAC added, and is now automatically scaled when GCE clusters are resized. ([#51237](https://github.com/kubernetes/kubernetes/pull/51237), [@gunjan5](https://github.com/gunjan5)) + + + +# v1.8.0-beta.1 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.8/examples) + +## Downloads for v1.8.0-beta.1 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.8.0-beta.1/kubernetes.tar.gz) | `261e5ad47a718bcbb65c163f8e1130097e2d077541d6a68f3270de4e7256d796` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.8.0-beta.1/kubernetes-src.tar.gz) | `e414e75cd1c72ca1fd202f6f0042ba1884b87bc6809bc2493ea2654c3d965656` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.8.0-beta.1/kubernetes-client-darwin-386.tar.gz) | `b7745121e8d7074170f1ce8ded0fbc78b84abe8f8371933e97b76ba5551f26d8` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.8.0-beta.1/kubernetes-client-darwin-amd64.tar.gz) | `4cc45a3a5dbd2ca666ea6dc2a973a17929c1427f5c3296224eade50d8df10b9e` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.8.0-beta.1/kubernetes-client-linux-386.tar.gz) | `a1dce30675b33e2c18a1343ee15556c9c65e85ee3c2b88f3cac414d95514a902` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.8.0-beta.1/kubernetes-client-linux-amd64.tar.gz) | `7fa5bbdc4af80a7ce00c5939896e8e93e962a66d195a95878f1e1fe4a06a5272` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.8.0-beta.1/kubernetes-client-linux-arm64.tar.gz) | `7d54528f892d3247e22093861c48407e7dc001304bb168cf8c882227d96fd6b2` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.8.0-beta.1/kubernetes-client-linux-arm.tar.gz) | `17c074ae407b012b4bb2c88975c182df0317fefea98700fdadee12c70d114498` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.8.0-beta.1/kubernetes-client-linux-ppc64le.tar.gz) | `074801a87eedd2e93bdeb894822a70aa371983aafce86f66ed473a1a3bf4628b` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.8.0-beta.1/kubernetes-client-linux-s390x.tar.gz) | `2eb743f160b970a183b3ec81fc50108df2352b8a0c31951babb26e2c28fc8360` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.8.0-beta.1/kubernetes-client-windows-386.tar.gz) | `21e5686253052773d7e4baa08fd4ce56c861ad01d49d87df0eb80f56801e7cc4` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.8.0-beta.1/kubernetes-client-windows-amd64.tar.gz) | `07d2446c917cf749b38fa2bcaa2bd64af743df2ba19ad4b480c07be166f9ab16` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.8.0-beta.1/kubernetes-server-linux-amd64.tar.gz) | `811eb1645f8691e5cf7f75ae8ab26e90cf0b36a69254f73c0ed4ba91f4c0db99` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.8.0-beta.1/kubernetes-server-linux-arm64.tar.gz) | `e05c53ce80354d2776aa6832e074730aa35521f64ebf03a6c5a7753e7f2df8a3` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.8.0-beta.1/kubernetes-server-linux-arm.tar.gz) | `57bc90e040faefa6af23b8637e8221a06282041ec9a16c2a630cc655d3c170df` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.8.0-beta.1/kubernetes-server-linux-ppc64le.tar.gz) | `4feb30aef4f79954907fdec34d4b7d2985917abd8e35b34a9440a468889cb240` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.8.0-beta.1/kubernetes-server-linux-s390x.tar.gz) | `85c0aaff6e832f711fb572582f10d9fe172c4d0680ac7589d1ec6e54742c436c` + +### Node Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.8.0-beta.1/kubernetes-node-linux-amd64.tar.gz) | `5809dce1c13d05c7c85bddc4d31804b30c55fe70209c9d89b137598c25db863e` +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.8.0-beta.1/kubernetes-node-linux-arm64.tar.gz) | `d70c9d99f4b155b755728029036f68d79cff1648cfd3de257e3f2ce29bc07a31` +[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.8.0-beta.1/kubernetes-node-linux-arm.tar.gz) | `efa29832aea28817466e25b55375574f314848c806d76fa0e4874f835399e9f0` +[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.8.0-beta.1/kubernetes-node-linux-ppc64le.tar.gz) | `991507d4cd2014e776d63ae7a14b3bbbbf49597211d4fa1751701f21fbf44417` +[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.8.0-beta.1/kubernetes-node-linux-s390x.tar.gz) | `4e1bd8e4465b2761632093a1235b788cc649af74d42dec297a97de8a0f764e46` +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.8.0-beta.1/kubernetes-node-windows-amd64.tar.gz) | `4f80d4c269c6f05fb30c8c682f1cdbe46f3f0e86ac7ca4b84a1ab0a835bfb24a` + +## Changelog since v1.8.0-alpha.3 + +### Action Required + +* The OwnerReferencesPermissionEnforcement admission plugin now requires `update` permission on the `finalizers` subresource of the referenced owner in order to set `blockOwnerDeletion` on an owner reference. ([#49133](https://github.com/kubernetes/kubernetes/pull/49133), [@deads2k](https://github.com/deads2k)) +* The deprecated alpha and beta initContainer annotations are no longer supported. Init containers must be specified using the initContainers field in the pod spec. ([#51816](https://github.com/kubernetes/kubernetes/pull/51816), [@liggitt](https://github.com/liggitt)) +* Action required: validation rule on metadata.initializers.pending[x].name is tightened. The initializer name needs to contain at least three segments separated by dots. If you create objects with pending initializers, (i.e., not relying on apiserver adding pending initializers according to initializerconfiguration), you need to update the initializer name in existing objects and in configuration files to comply to the new validation rule. ([#51283](https://github.com/kubernetes/kubernetes/pull/51283), [@caesarxuchao](https://github.com/caesarxuchao)) +* Audit policy supports matching subresources and resource names, but the top level resource no longer matches the subresouce. For example "pods" no longer matches requests to the logs subresource of pods. Use "pods/logs" to match subresources. ([#48836](https://github.com/kubernetes/kubernetes/pull/48836), [@ericchiang](https://github.com/ericchiang)) +* Protobuf serialization does not distinguish between `[]` and `null`. ([#45294](https://github.com/kubernetes/kubernetes/pull/45294), [@liggitt](https://github.com/liggitt)) + * API fields previously capable of storing and returning either `[]` and `null` via JSON API requests (for example, the Endpoints `subsets` field) can now store only `null` when created using the protobuf content-type or stored in etcd using protobuf serialization (the default in 1.6+). JSON API clients should tolerate `null` values for such fields, and treat `null` and `[]` as equivalent in meaning unless specifically documented otherwise for a particular field. + +### Other notable changes + +* Fixes an issue with upgrade requests made via pod/service/node proxy subresources sending a non-absolute HTTP request-uri to backends ([#52065](https://github.com/kubernetes/kubernetes/pull/52065), [@liggitt](https://github.com/liggitt)) +* kubeadm: add `kubeadm phase addons` command ([#51171](https://github.com/kubernetes/kubernetes/pull/51171), [@andrewrynhard](https://github.com/andrewrynhard)) +* v2 of the autoscaling API group, including improvements to the HorizontalPodAutoscaler, has moved from alpha1 to beta1. ([#50708](https://github.com/kubernetes/kubernetes/pull/50708), [@DirectXMan12](https://github.com/DirectXMan12)) +* Fixed a bug where some alpha features were enabled by default. ([#51839](https://github.com/kubernetes/kubernetes/pull/51839), [@jennybuckley](https://github.com/jennybuckley)) +* Implement StatsProvider interface using CRI stats ([#51557](https://github.com/kubernetes/kubernetes/pull/51557), [@yguo0905](https://github.com/yguo0905)) +* set AdvancedAuditing feature gate to true by default ([#51943](https://github.com/kubernetes/kubernetes/pull/51943), [@CaoShuFeng](https://github.com/CaoShuFeng)) +* Migrate the metrics/v1alpha1 API to metrics/v1beta1. The HorizontalPodAutoscaler ([#51653](https://github.com/kubernetes/kubernetes/pull/51653), [@DirectXMan12](https://github.com/DirectXMan12)) + * controller REST client now uses that version. For v1beta1, the API is now known as + * resource-metrics.metrics.k8s.io. +* In GCE with COS, increase TasksMax for Docker service to raise cap on number of threads/processes used by containers. ([#51986](https://github.com/kubernetes/kubernetes/pull/51986), [@yujuhong](https://github.com/yujuhong)) +* Fixes an issue with APIService auto-registration affecting rolling HA apiserver restarts that add or remove API groups being served. ([#51921](https://github.com/kubernetes/kubernetes/pull/51921), [@liggitt](https://github.com/liggitt)) +* Sharing a PID namespace between containers in a pod is disabled by default in 1.8. To enable for a node, use the --docker-disable-shared-pid=false kubelet flag. Note that PID namespace sharing requires docker >= 1.13.1. ([#51634](https://github.com/kubernetes/kubernetes/pull/51634), [@verb](https://github.com/verb)) +* Build test targets for all server platforms ([#51873](https://github.com/kubernetes/kubernetes/pull/51873), [@luxas](https://github.com/luxas)) +* Add EgressRule to NetworkPolicy ([#51351](https://github.com/kubernetes/kubernetes/pull/51351), [@cmluciano](https://github.com/cmluciano)) +* Allow DNS resolution of service name for COS using containerized mounter. It fixed the issue with DNS resolution of NFS and Gluster services. ([#51645](https://github.com/kubernetes/kubernetes/pull/51645), [@jingxu97](https://github.com/jingxu97)) +* Fix journalctl leak on kubelet restart ([#51751](https://github.com/kubernetes/kubernetes/pull/51751), [@dashpole](https://github.com/dashpole)) + * Fix container memory rss + * Add hugepages monitoring support + * Fix incorrect CPU usage metrics with 4.7 kernel + * Add tmpfs monitoring support +* Support for Huge pages in empty_dir volume plugin ([#50072](https://github.com/kubernetes/kubernetes/pull/50072), [@squall0gd](https://github.com/squall0gd)) + * [Huge pages](https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt) can now be used with empty dir volume plugin. +* Alpha support for pre-allocated hugepages ([#50859](https://github.com/kubernetes/kubernetes/pull/50859), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* add support for client-side spam filtering of events ([#47367](https://github.com/kubernetes/kubernetes/pull/47367), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* Provide a way to omit Event stages in audit policy ([#49280](https://github.com/kubernetes/kubernetes/pull/49280), [@CaoShuFeng](https://github.com/CaoShuFeng)) +* Introduced Metrics Server ([#51792](https://github.com/kubernetes/kubernetes/pull/51792), [@piosz](https://github.com/piosz)) +* Implement Controller for growing persistent volumes ([#49727](https://github.com/kubernetes/kubernetes/pull/49727), [@gnufied](https://github.com/gnufied)) +* Kubernetes 1.8 supports docker version 1.11.x, 1.12.x and 1.13.x. And also supports overlay2. ([#51845](https://github.com/kubernetes/kubernetes/pull/51845), [@Random-Liu](https://github.com/Random-Liu)) +* The Deployment, DaemonSet, and ReplicaSet kinds in the extensions/v1beta1 group version are now deprecated, as are the Deployment, StatefulSet, and ControllerRevision kinds in apps/v1beta1. As they will not be removed until after a GA version becomes available, you may continue to use these kinds in existing code. However, all new code should be developed against the apps/v1beta2 group version. ([#51828](https://github.com/kubernetes/kubernetes/pull/51828), [@kow3ns](https://github.com/kow3ns)) +* kubeadm: Detect kubelet readiness and error out if the kubelet is unhealthy ([#51369](https://github.com/kubernetes/kubernetes/pull/51369), [@luxas](https://github.com/luxas)) +* Fix providerID update validation ([#51761](https://github.com/kubernetes/kubernetes/pull/51761), [@karataliu](https://github.com/karataliu)) +* Calico has been updated to v2.5, RBAC added, and is now automatically scaled when GCE clusters are resized. ([#51237](https://github.com/kubernetes/kubernetes/pull/51237), [@gunjan5](https://github.com/gunjan5)) +* Add backoff policy and failed pod limit for a job ([#51153](https://github.com/kubernetes/kubernetes/pull/51153), [@clamoriniere1A](https://github.com/clamoriniere1A)) +* Adds a new alpha EventRateLimit admission control that is used to limit the number of event queries that are accepted by the API Server. ([#50925](https://github.com/kubernetes/kubernetes/pull/50925), [@staebler](https://github.com/staebler)) +* The OpenID Connect authenticator can now use a custom prefix, or omit the default prefix, for username and groups claims through the --oidc-username-prefix and --oidc-groups-prefix flags. For example, the authenticator can map a user with the username "jane" to "google:jane" by supplying the "google:" username prefix. ([#50875](https://github.com/kubernetes/kubernetes/pull/50875), [@ericchiang](https://github.com/ericchiang)) +* Implemented `kubeadm upgrade plan` for checking whether you can upgrade your cluster to a newer version ([#48899](https://github.com/kubernetes/kubernetes/pull/48899), [@luxas](https://github.com/luxas)) + * Implemented `kubeadm upgrade apply` for upgrading your cluster from one version to an other +* Switch to audit.k8s.io/v1beta1 in audit. ([#51719](https://github.com/kubernetes/kubernetes/pull/51719), [@soltysh](https://github.com/soltysh)) +* update QEMU version to v2.9.1 ([#50597](https://github.com/kubernetes/kubernetes/pull/50597), [@dixudx](https://github.com/dixudx)) +* controllers backoff better in face of quota denial ([#49142](https://github.com/kubernetes/kubernetes/pull/49142), [@joelsmith](https://github.com/joelsmith)) +* The event table output under `kubectl describe` has been simplified to show only the most essential info. ([#51748](https://github.com/kubernetes/kubernetes/pull/51748), [@smarterclayton](https://github.com/smarterclayton)) +* Use arm32v7|arm64v8 images instead of the deprecated armhf|aarch64 image organizations ([#50602](https://github.com/kubernetes/kubernetes/pull/50602), [@dixudx](https://github.com/dixudx)) +* audit newest impersonated user info in the ResponseStarted, ResponseComplete audit stage ([#48184](https://github.com/kubernetes/kubernetes/pull/48184), [@CaoShuFeng](https://github.com/CaoShuFeng)) +* Fixed bug in AWS provider to handle multiple IPs when using more than 1 network interface per ec2 instance. ([#50112](https://github.com/kubernetes/kubernetes/pull/50112), [@jlz27](https://github.com/jlz27)) +* Add flag "--include-uninitialized" to kubectl annotate, apply, edit-last-applied, delete, describe, edit, get, label, set. "--include-uninitialized=true" makes kubectl commands apply to uninitialized objects, which by default are ignored if the names of the objects are not provided. "--all" also makes kubectl commands apply to uninitialized objects. Please see the [initializer](https://kubernetes.io/docs/admin/extensible-admission-controllers/) doc for more details. ([#50497](https://github.com/kubernetes/kubernetes/pull/50497), [@dixudx](https://github.com/dixudx)) +* GCE: Service object now supports "Network Tiers" as an Alpha feature via annotations. ([#51301](https://github.com/kubernetes/kubernetes/pull/51301), [@yujuhong](https://github.com/yujuhong)) +* When using kube-up.sh on GCE, user could set env `ENABLE_POD_PRIORITY=true` to enable pod priority feature gate. ([#51069](https://github.com/kubernetes/kubernetes/pull/51069), [@MrHohn](https://github.com/MrHohn)) +* The names generated for ControllerRevision and ReplicaSet are consistent with the GenerateName functionality of the API Server and will not contain "bad words". ([#51538](https://github.com/kubernetes/kubernetes/pull/51538), [@kow3ns](https://github.com/kow3ns)) +* PersistentVolumeClaim metrics like "volume_stats_inodes" and "volume_stats_capacity_bytes" are now reported via kubelet prometheus ([#51553](https://github.com/kubernetes/kubernetes/pull/51553), [@wongma7](https://github.com/wongma7)) +* When using IP aliases, use a secondary range rather than subnetwork to reserve cluster IPs. ([#51690](https://github.com/kubernetes/kubernetes/pull/51690), [@bowei](https://github.com/bowei)) +* IPAM controller unifies handling of node pod CIDR range allocation. ([#51374](https://github.com/kubernetes/kubernetes/pull/51374), [@bowei](https://github.com/bowei)) + * It is intended to supersede the logic that is currently in range_allocator + * and cloud_cidr_allocator. (ALPHA FEATURE) + * Note: for this change, the other allocators still exist and are the default. + * It supports two modes: + * CIDR range allocations done within the cluster that are then propagated out to the cloud provider. + * Cloud provider managed IPAM that is then reflected into the cluster. +* Alpha list paging implementation ([#48921](https://github.com/kubernetes/kubernetes/pull/48921), [@smarterclayton](https://github.com/smarterclayton)) +* add reconcile command to kubectl auth ([#51636](https://github.com/kubernetes/kubernetes/pull/51636), [@deads2k](https://github.com/deads2k)) +* Advanced audit allows logging failed login attempts ([#51119](https://github.com/kubernetes/kubernetes/pull/51119), [@soltysh](https://github.com/soltysh)) +* kubeadm: Add support for using an external CA whose key is never stored in the cluster ([#50832](https://github.com/kubernetes/kubernetes/pull/50832), [@nckturner](https://github.com/nckturner)) +* the custom metrics API (custom.metrics.k8s.io) has moved from v1alpha1 to v1beta1 ([#50920](https://github.com/kubernetes/kubernetes/pull/50920), [@DirectXMan12](https://github.com/DirectXMan12)) +* Add backoff policy and failed pod limit for a job ([#48075](https://github.com/kubernetes/kubernetes/pull/48075), [@clamoriniere1A](https://github.com/clamoriniere1A)) +* Performs validation (when applying for example) against OpenAPI schema rather than Swagger 1.0. ([#51364](https://github.com/kubernetes/kubernetes/pull/51364), [@apelisse](https://github.com/apelisse)) +* Make all e2e tests lookup image to use from a centralized place. In that centralized place, add support for multiple platforms. ([#49457](https://github.com/kubernetes/kubernetes/pull/49457), [@mkumatag](https://github.com/mkumatag)) +* kubelet has alpha support for mount propagation. It is disabled by default and it is there for testing only. This feature may be redesigned or even removed in a future release. ([#46444](https://github.com/kubernetes/kubernetes/pull/46444), [@jsafrane](https://github.com/jsafrane)) +* Add selfsubjectrulesreview API for allowing users to query which permissions they have in a given namespace. ([#48051](https://github.com/kubernetes/kubernetes/pull/48051), [@xilabao](https://github.com/xilabao)) +* Kubelet re-binds /var/lib/kubelet directory with rshared mount propagation during startup if it is not shared yet. ([#45724](https://github.com/kubernetes/kubernetes/pull/45724), [@jsafrane](https://github.com/jsafrane)) +* Deviceplugin jiayingz ([#51209](https://github.com/kubernetes/kubernetes/pull/51209), [@jiayingz](https://github.com/jiayingz)) +* Make logdump support kubemark and support gke with 'use_custom_instance_list' ([#51834](https://github.com/kubernetes/kubernetes/pull/51834), [@shyamjvs](https://github.com/shyamjvs)) +* add apps/v1beta2 conversion test ([#49645](https://github.com/kubernetes/kubernetes/pull/49645), [@dixudx](https://github.com/dixudx)) +* Fixed an issue ([#47800](https://github.com/kubernetes/kubernetes/pull/47800)) where `kubectl logs -f` failed with `unexpected stream type ""`. ([#50381](https://github.com/kubernetes/kubernetes/pull/50381), [@sczizzo](https://github.com/sczizzo)) +* GCE: Internal load balancer IPs are now reserved during service sync to prevent losing the address to another service. ([#51055](https://github.com/kubernetes/kubernetes/pull/51055), [@nicksardo](https://github.com/nicksardo)) +* Switch JSON marshal/unmarshal to json-iterator library. Performance should be close to previous with no generated code. ([#48287](https://github.com/kubernetes/kubernetes/pull/48287), [@thockin](https://github.com/thockin)) +* Adds optional group and version information to the discovery interface, so that if an endpoint uses non-default values, the proper value of "kind" can be determined. Scale is a common example. ([#49971](https://github.com/kubernetes/kubernetes/pull/49971), [@deads2k](https://github.com/deads2k)) +* [#43077](https://github.com/kubernetes/kubernetes/pull/43077) introduced a condition where DaemonSet controller did not respect the TerminationGracePeriodSeconds of the Pods it created. This is now corrected. ([#51279](https://github.com/kubernetes/kubernetes/pull/51279), [@kow3ns](https://github.com/kow3ns)) +* Add a persistent volume label controller to the cloud-controller-manager ([#44680](https://github.com/kubernetes/kubernetes/pull/44680), [@rrati](https://github.com/rrati)) +* Tainted nodes by conditions as following: ([#49257](https://github.com/kubernetes/kubernetes/pull/49257), [@k82cn](https://github.com/k82cn)) + * 'node.kubernetes.io/network-unavailable=:NoSchedule' if NetworkUnavailable is true + * 'node.kubernetes.io/disk-pressure=:NoSchedule' if DiskPressure is true + * 'node.kubernetes.io/memory-pressure=:NoSchedule' if MemoryPressure is true + * 'node.kubernetes.io/out-of-disk=:NoSchedule' if OutOfDisk is true +* rbd: default image format to v2 instead of deprecated v1 ([#51574](https://github.com/kubernetes/kubernetes/pull/51574), [@dillaman](https://github.com/dillaman)) +* Surface reasonable error when client detects connection closed. ([#51381](https://github.com/kubernetes/kubernetes/pull/51381), [@mengqiy](https://github.com/mengqiy)) +* Allow PSP's to specify a whitelist of allowed paths for host volume ([#50212](https://github.com/kubernetes/kubernetes/pull/50212), [@jhorwit2](https://github.com/jhorwit2)) +* For Deployment, ReplicaSet, and DaemonSet, selectors are now immutable when updating via the new `apps/v1beta2` API. For backward compatibility, selectors can still be changed when updating via `apps/v1beta1` or `extensions/v1beta1`. ([#50719](https://github.com/kubernetes/kubernetes/pull/50719), [@crimsonfaith91](https://github.com/crimsonfaith91)) +* Allows kubectl to use http caching mechanism for the OpenAPI schema. The cache directory can be configured through `--cache-dir` command line flag to kubectl. If set to empty string, caching will be disabled. ([#50404](https://github.com/kubernetes/kubernetes/pull/50404), [@apelisse](https://github.com/apelisse)) +* Pod log attempts are now reported in apiserver prometheus metrics with verb `CONNECT` since they can run for very long periods of time. ([#50123](https://github.com/kubernetes/kubernetes/pull/50123), [@WIZARD-CXY](https://github.com/WIZARD-CXY)) +* The `emptyDir.sizeLimit` field is now correctly omitted from API requests and responses when unset. ([#50163](https://github.com/kubernetes/kubernetes/pull/50163), [@jingxu97](https://github.com/jingxu97)) +* Promote CronJobs to batch/v1beta1. ([#51465](https://github.com/kubernetes/kubernetes/pull/51465), [@soltysh](https://github.com/soltysh)) +* Add local ephemeral storage support to LimitRange ([#50757](https://github.com/kubernetes/kubernetes/pull/50757), [@NickrenREN](https://github.com/NickrenREN)) +* Add mount options field to StorageClass. The options listed there are automatically added to PVs provisioned using the class. ([#51228](https://github.com/kubernetes/kubernetes/pull/51228), [@wongma7](https://github.com/wongma7)) +* Implement IPVS-based in-cluster service load balancing ([#46580](https://github.com/kubernetes/kubernetes/pull/46580), [@dujun1990](https://github.com/dujun1990)) +* Release the kubelet client certificate rotation as beta. ([#51045](https://github.com/kubernetes/kubernetes/pull/51045), [@jcbsmpsn](https://github.com/jcbsmpsn)) +* Adds --append-hash flag to kubectl create configmap/secret, which will append a short hash of the configmap/secret contents to the name during creation. ([#49961](https://github.com/kubernetes/kubernetes/pull/49961), [@mtaufen](https://github.com/mtaufen)) +* Add validation for CustomResources via JSON Schema. ([#47263](https://github.com/kubernetes/kubernetes/pull/47263), [@nikhita](https://github.com/nikhita)) +* enqueue a sync task to wake up jobcontroller to check job ActiveDeadlineSeconds in time ([#48454](https://github.com/kubernetes/kubernetes/pull/48454), [@weiwei04](https://github.com/weiwei04)) +* Remove previous local ephemeral storage resource names: "ResourceStorageOverlay" and "ResourceStorageScratch" ([#51425](https://github.com/kubernetes/kubernetes/pull/51425), [@NickrenREN](https://github.com/NickrenREN)) +* Add `retainKeys` to patchStrategy for v1 Volumes and extentions/v1beta1 DeploymentStrategy. ([#50296](https://github.com/kubernetes/kubernetes/pull/50296), [@mengqiy](https://github.com/mengqiy)) +* Add mount options field to PersistentVolume spec ([#50919](https://github.com/kubernetes/kubernetes/pull/50919), [@wongma7](https://github.com/wongma7)) +* Use of the alpha initializers feature now requires enabling the `Initializers` feature gate. This feature gate is auto-enabled if the `Initialzers` admission plugin is enabled. ([#51436](https://github.com/kubernetes/kubernetes/pull/51436), [@liggitt](https://github.com/liggitt)) +* Fix inconsistent Prometheus cAdvisor metrics ([#51473](https://github.com/kubernetes/kubernetes/pull/51473), [@bboreham](https://github.com/bboreham)) +* Add local ephemeral storage to downward API ([#50435](https://github.com/kubernetes/kubernetes/pull/50435), [@NickrenREN](https://github.com/NickrenREN)) +* kubectl zsh autocompletion will work with compinit ([#50561](https://github.com/kubernetes/kubernetes/pull/50561), [@cblecker](https://github.com/cblecker)) +* When using kube-up.sh on GCE, user could set env `KUBE_PROXY_DAEMONSET=true` to run kube-proxy as a DaemonSet. kube-proxy is run as static pods by default. ([#50705](https://github.com/kubernetes/kubernetes/pull/50705), [@MrHohn](https://github.com/MrHohn)) +* Add --request-timeout to kube-apiserver to make global request timeout configurable. ([#51415](https://github.com/kubernetes/kubernetes/pull/51415), [@jpbetz](https://github.com/jpbetz)) +* Deprecate auto detecting cloud providers in kubelet. Auto detecting cloud providers go against the initiative for out-of-tree cloud providers as we'll now depend on cAdvisor integrations with cloud providers instead of the core repo. In the near future, `--cloud-provider` for kubelet will either be an empty string or `external`. ([#51312](https://github.com/kubernetes/kubernetes/pull/51312), [@andrewsykim](https://github.com/andrewsykim)) +* Add local ephemeral storage support to Quota ([#49610](https://github.com/kubernetes/kubernetes/pull/49610), [@NickrenREN](https://github.com/NickrenREN)) +* Kubelet updates default labels if those are deprecated ([#47044](https://github.com/kubernetes/kubernetes/pull/47044), [@mrIncompetent](https://github.com/mrIncompetent)) +* Add error count and time-taken metrics for storage operations such as mount and attach, per-volume-plugin. ([#50036](https://github.com/kubernetes/kubernetes/pull/50036), [@wongma7](https://github.com/wongma7)) +* A new predicates, named 'CheckNodeCondition', was added to replace node condition filter. 'NetworkUnavailable', 'OutOfDisk' and 'NotReady' maybe reported as a reason when failed to schedule pods. ([#51117](https://github.com/kubernetes/kubernetes/pull/51117), [@k82cn](https://github.com/k82cn)) +* Add support for configurable groups for bootstrap token authentication. ([#50933](https://github.com/kubernetes/kubernetes/pull/50933), [@mattmoyer](https://github.com/mattmoyer)) +* Fix forbidden message format ([#49006](https://github.com/kubernetes/kubernetes/pull/49006), [@CaoShuFeng](https://github.com/CaoShuFeng)) +* make volumesInUse sorted in node status updates ([#49849](https://github.com/kubernetes/kubernetes/pull/49849), [@dixudx](https://github.com/dixudx)) +* Adds `InstanceExists` and `InstanceExistsByProviderID` to cloud provider interface for the cloud controller manager ([#51087](https://github.com/kubernetes/kubernetes/pull/51087), [@prydie](https://github.com/prydie)) +* Dynamic Flexvolume plugin discovery. Flexvolume plugins can now be discovered on the fly rather than only at system initialization time. ([#50031](https://github.com/kubernetes/kubernetes/pull/50031), [@verult](https://github.com/verult)) +* add fieldSelector spec.schedulerName ([#50582](https://github.com/kubernetes/kubernetes/pull/50582), [@dixudx](https://github.com/dixudx)) +* Change eviction manager to manage one single local ephemeral storage resource ([#50889](https://github.com/kubernetes/kubernetes/pull/50889), [@NickrenREN](https://github.com/NickrenREN)) +* Cloud Controller Manager now sets Node.Spec.ProviderID ([#50730](https://github.com/kubernetes/kubernetes/pull/50730), [@andrewsykim](https://github.com/andrewsykim)) +* Paramaterize session affinity timeout seconds in service API for Client IP based session affinity. ([#49850](https://github.com/kubernetes/kubernetes/pull/49850), [@m1093782566](https://github.com/m1093782566)) +* Changing scheduling part of the alpha feature 'LocalStorageCapacityIsolation' to manage one single local ephemeral storage resource ([#50819](https://github.com/kubernetes/kubernetes/pull/50819), [@NickrenREN](https://github.com/NickrenREN)) +* set --audit-log-format default to json ([#50971](https://github.com/kubernetes/kubernetes/pull/50971), [@CaoShuFeng](https://github.com/CaoShuFeng)) +* kubeadm: Implement a `--dry-run` mode and flag for `kubeadm` ([#51122](https://github.com/kubernetes/kubernetes/pull/51122), [@luxas](https://github.com/luxas)) +* kubectl rollout `history`, `status`, and `undo` subcommands now support StatefulSets. ([#49674](https://github.com/kubernetes/kubernetes/pull/49674), [@crimsonfaith91](https://github.com/crimsonfaith91)) +* Add IPBlock to Network Policy ([#50033](https://github.com/kubernetes/kubernetes/pull/50033), [@cmluciano](https://github.com/cmluciano)) +* Adding Italian translation for kubectl ([#50155](https://github.com/kubernetes/kubernetes/pull/50155), [@lucab85](https://github.com/lucab85)) +* Simplify capabilities handling in FlexVolume. ([#51169](https://github.com/kubernetes/kubernetes/pull/51169), [@MikaelCluseau](https://github.com/MikaelCluseau)) +* NONE ([#50669](https://github.com/kubernetes/kubernetes/pull/50669), [@jiulongzaitian](https://github.com/jiulongzaitian)) +* cloudprovider.Zones should support external cloud providers ([#50858](https://github.com/kubernetes/kubernetes/pull/50858), [@andrewsykim](https://github.com/andrewsykim)) +* Finalizers are now honored on custom resources, and on other resources even when garbage collection is disabled via the apiserver flag `--enable-garbage-collector=false` ([#51148](https://github.com/kubernetes/kubernetes/pull/51148), [@ironcladlou](https://github.com/ironcladlou)) +* Renamed the API server flag `--experimental-bootstrap-token-auth` to `--enable-bootstrap-token-auth`. The old value is accepted with a warning in 1.8 and will be removed in 1.9. ([#51198](https://github.com/kubernetes/kubernetes/pull/51198), [@mattmoyer](https://github.com/mattmoyer)) +* Azure file persistent volumes can use a new `secretNamespace` field to reference a secret in a different namespace than the one containing their bound persistent volume claim. The azure file persistent volume provisioner honors a corresponding `secretNamespace` storage class parameter to determine where to place secrets containing the storage account key. ([#47660](https://github.com/kubernetes/kubernetes/pull/47660), [@rootfs](https://github.com/rootfs)) +* Bumped gRPC version to 1.3.0 ([#51154](https://github.com/kubernetes/kubernetes/pull/51154), [@RenaudWasTaken](https://github.com/RenaudWasTaken)) +* Delete load balancers if the UIDs for services don't match. ([#50539](https://github.com/kubernetes/kubernetes/pull/50539), [@brendandburns](https://github.com/brendandburns)) +* Show events when describing service accounts ([#51035](https://github.com/kubernetes/kubernetes/pull/51035), [@mrogers950](https://github.com/mrogers950)) +* implement proposal 34058: hostPath volume type ([#46597](https://github.com/kubernetes/kubernetes/pull/46597), [@dixudx](https://github.com/dixudx)) +* HostAlias is now supported for both non-HostNetwork Pods and HostNetwork Pods. ([#50646](https://github.com/kubernetes/kubernetes/pull/50646), [@rickypai](https://github.com/rickypai)) +* CRDs support metadata.generation and implement spec/status split ([#50764](https://github.com/kubernetes/kubernetes/pull/50764), [@nikhita](https://github.com/nikhita)) +* Allow attach of volumes to multiple nodes for vSphere ([#51066](https://github.com/kubernetes/kubernetes/pull/51066), [@BaluDontu](https://github.com/BaluDontu)) + + + +# v1.7.5 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.7/examples) + +## Downloads for v1.7.5 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.7.5/kubernetes.tar.gz) | `bc96c1ec02da6a82f90bc04064d2c4d6463a4d9dd37e5882a23f8c74bdf1b20b` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.7.5/kubernetes-src.tar.gz) | `e06ebc6b73b6b38aeb55891b9e5c0bbd26e755e05674d70866cdc41f749f62a5` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.7.5/kubernetes-client-darwin-386.tar.gz) | `2c1c40c161e5ccae6df0dc5846a9a8bd55ebcd5b55012e09c01ec00bc81f4a81` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.7.5/kubernetes-client-darwin-amd64.tar.gz) | `6e749df53f9b4f5e2c1a94c360e06e9d4c4c0bf34c0dd2a02476d476e8da3f68` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.7.5/kubernetes-client-linux-386.tar.gz) | `d0edb7229ec27c4354589a1045766d8e12605be5c2ab82cef3e30d324ba66095` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.5/kubernetes-client-linux-amd64.tar.gz) | `e246dc357be1ccaad1c5f79d4696abdc31a90bd8eae642e5bacd1e7d820517ad` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.5/kubernetes-client-linux-arm64.tar.gz) | `bf94c70e00cb3c451a3b024e64fd5933098850fe3414e8b72d42244cbd478a2e` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.7.5/kubernetes-client-linux-arm.tar.gz) | `17d4af2b552377ee580230c0f0ea0de8469e682c01cd0ebde8f50c52cd02bed3` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.5/kubernetes-client-linux-ppc64le.tar.gz) | `bfa32c4b1d70474dd5fccd588bd4e836c6d330b1d6d04de3ceeb3acc4f65a21b` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.5/kubernetes-client-linux-s390x.tar.gz) | `c2a3822d358b24c909b8965a25ac759f510bab3f60b6117cf522dccabc724cb0` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.7.5/kubernetes-client-windows-386.tar.gz) | `b70b3de5a33eb7762aa371b1b7e426a0cafc1d468bb33dff2db20997d244bd37` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.7.5/kubernetes-client-windows-amd64.tar.gz) | `7f995b5a4f9338b9aa62508ac71ccd615f0ef577841d603f9e9ea6683be688b0` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.5/kubernetes-server-linux-amd64.tar.gz) | `7482c12dae75fb195f2f3afa92f62c354cafb97bee5703c4fdaa617d27c7cf68` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.5/kubernetes-server-linux-arm64.tar.gz) | `0be475479062f113fcc41d91215c21409c6e4c000e96ffc0246e4597b6737a29` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.7.5/kubernetes-server-linux-arm.tar.gz) | `07527fbe49a2f12eae25ccd49e8a95deae7f5a8c8bae2014e5dc2561e4a04fdb` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.5/kubernetes-server-linux-ppc64le.tar.gz) | `fed7ee43ba5db918d277e26da9ca556254fa365445d51cb33a3e304d1e3841e9` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.5/kubernetes-server-linux-s390x.tar.gz) | `47b548cc2c6e224c49fe286da3db61c0cf1905239df2869b88b9b8607edbbd73` + +### Node Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.5/kubernetes-node-linux-amd64.tar.gz) | `f5dd62f21d2cc516768b55d191bc20fc20901b9fa2e1165eef2adcca4821e23d` +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.5/kubernetes-node-linux-arm64.tar.gz) | `8ee0d5f417651f2ce9ab5e504bbd47fbfe0f15d6e3923a1356b2def4f1012b66` +[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.7.5/kubernetes-node-linux-arm.tar.gz) | `40882a5c505fee370eb69e890b8974d3bb9c896307795d81bf7dff52797e4eeb` +[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.5/kubernetes-node-linux-ppc64le.tar.gz) | `597bd33af9f03874fabc0778de3df057f13364630d590cc4443e4c858ffbe7f3` +[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.5/kubernetes-node-linux-s390x.tar.gz) | `dd57a82a5d71d03a97cebf901bf9cc5273b935218f4fc1c3f1471b93842a4414` +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.7.5/kubernetes-node-windows-amd64.tar.gz) | `d95511742d26c375b5a705b85b498b200c8e081fec365c4b60df18def49d151c` + +## Changelog since v1.7.4 + +### Other notable changes + +* Bumped Heapster version to 1.4.2 - more details https://github.com/kubernetes/heapster/releases/tag/v1.4.2. ([#51620](https://github.com/kubernetes/kubernetes/pull/51620), [@piosz](https://github.com/piosz)) +* Fix for Pod stuck in ContainerCreating with error "Volume is not yet attached according to node". ([#50806](https://github.com/kubernetes/kubernetes/pull/50806), [@verult](https://github.com/verult)) +* Fixed controller manager crash by making it tolerant to discovery errors.([#49767](https://github.com/kubernetes/kubernetes/pull/49767), [@deads2k](https://github.com/deads2k)) +* Finalizers are now honored on custom resources, and on other resources even when garbage collection is disabled via the apiserver flag `--enable-garbage-collector=false` ([#51469](https://github.com/kubernetes/kubernetes/pull/51469), [@ironcladlou](https://github.com/ironcladlou)) +* Allow attach of volumes to multiple nodes for vSphere ([#51066](https://github.com/kubernetes/kubernetes/pull/51066), [@BaluDontu](https://github.com/BaluDontu)) +* vSphere: Fix attach volume failing on the first try. ([#51217](https://github.com/kubernetes/kubernetes/pull/51217), [@BaluDontu](https://github.com/BaluDontu)) +* azure: support retrieving access tokens via managed identity extension ([#48854](https://github.com/kubernetes/kubernetes/pull/48854), [@colemickens](https://github.com/colemickens)) +* Fixed a bug in strategic merge patch that caused kubectl apply to error out under some conditions ([#50862](https://github.com/kubernetes/kubernetes/pull/50862), [@guoshimin](https://github.com/guoshimin)) +* It is now posible to use flexVolumes to bind mount directories and files. ([#50596](https://github.com/kubernetes/kubernetes/pull/50596), [@adelton](https://github.com/adelton)) +* StatefulSet: Fix "forbidden pod updates" error on Pods created prior to upgrading to 1.7. ([#48327](https://github.com/kubernetes/kubernetes/pull/48327)) ([#51149](https://github.com/kubernetes/kubernetes/pull/51149), [@kow3ns](https://github.com/kow3ns)) +* Fixed regression in initial kubectl exec terminal dimensions ([#51127](https://github.com/kubernetes/kubernetes/pull/51127), [@chen-anders](https://github.com/chen-anders)) +* Enforcement of fsGroup; enable ScaleIO multiple-instance volume mapping; default PVC capacity; alignment of PVC, PV, and volume names for dynamic provisioning ([#48999](https://github.com/kubernetes/kubernetes/pull/48999), [@vladimirvivien](https://github.com/vladimirvivien)) + + + +# v1.8.0-alpha.3 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/master/examples) + +## Downloads for v1.8.0-alpha.3 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.8.0-alpha.3/kubernetes.tar.gz) | `c99042c4826352b724dc02c8d92c01c49e1ad1663d2c55e0bce931fe4d76c1e3` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.8.0-alpha.3/kubernetes-src.tar.gz) | `3ee0cd3594bd5b326f042044d87e120fe335bd8e722635220dd5741485ab3493` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.8.0-alpha.3/kubernetes-client-darwin-386.tar.gz) | `c716e167383d118373d7b10425bb8db6033675e4520591017c688575f28a596d` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.8.0-alpha.3/kubernetes-client-darwin-amd64.tar.gz) | `dfe87cad00600049c841c8fd96c49088d4f7cdd34e5a903ef8048f75718f2d21` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.8.0-alpha.3/kubernetes-client-linux-386.tar.gz) | `97242dffee822cbf4e3e373acf05e9dc2f40176b18f4532a60264ecf92738356` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.8.0-alpha.3/kubernetes-client-linux-amd64.tar.gz) | `42e25e810333b00434217bae0aece145f82d0c7043faea83ff62bed079bae651` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.8.0-alpha.3/kubernetes-client-linux-arm64.tar.gz) | `7f9683c90dc894ee8cd7ad30ec58d0d49068d35478a71b315d2b7805ec28e14a` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.8.0-alpha.3/kubernetes-client-linux-arm.tar.gz) | `76347a154128e97cdd81674045b28035d89d509b35dda051f2cbc58c9b67fed4` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.8.0-alpha.3/kubernetes-client-linux-ppc64le.tar.gz) | `c991cbbf0afa6eccd005b6e5ea28b0b20ecbc79ab7d64e32c24e03fcf05b48ff` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.8.0-alpha.3/kubernetes-client-linux-s390x.tar.gz) | `94c2c29e8fd20d2a5c4f96098bd5c7d879a78e872f59c3c58ca1c775a57ddefb` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.8.0-alpha.3/kubernetes-client-windows-386.tar.gz) | `bc98fd5dc01c6e6117c2c78d65884190bf99fd1fec0904e2af05e6dbf503ccc8` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.8.0-alpha.3/kubernetes-client-windows-amd64.tar.gz) | `e32b56dbc69045b5b2821a2e3eb3c3b4a18cf4c11afd44e0c7c9c0e67bb38d02` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.8.0-alpha.3/kubernetes-server-linux-amd64.tar.gz) | `5446addff583b0dc977b91375f3c399242f7996e1f66f52b9e14c015add3bf13` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.8.0-alpha.3/kubernetes-server-linux-arm64.tar.gz) | `91e3cffed119b5105f6a6f74f583113384a26c746b459029c12babf45f680119` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.8.0-alpha.3/kubernetes-server-linux-arm.tar.gz) | `d4cb93787651193ef4fdd1d10a4822101586b2994d6b0e04d064687df8729910` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.8.0-alpha.3/kubernetes-server-linux-ppc64le.tar.gz) | `916e7f63a4e0c67d9f106fdda6eb24efcc94356b05cd9eb288e45fac9ff79fe8` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.8.0-alpha.3/kubernetes-server-linux-s390x.tar.gz) | `15b999b08f5fe0d8252f8a1c7e936b9e06f2b01132010b3cece547ab00b45282` + +### Node Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.8.0-alpha.3/kubernetes-node-linux-amd64.tar.gz) | `9120f6a06053ed91566d378a26ae455f521ab46911f257d64f629d93d143b369` +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.8.0-alpha.3/kubernetes-node-linux-arm64.tar.gz) | `30af817f5de0ecb8a95ec898fba5b97e6b4f224927e1cf7efaf2d5479b23c116` +[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.8.0-alpha.3/kubernetes-node-linux-arm.tar.gz) | `8b0913e461d8ac821c2104a1f0b4efe3151f0d8e8598e0945e60b4ba7ac2d1a0` +[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.8.0-alpha.3/kubernetes-node-linux-ppc64le.tar.gz) | `a78a3a837c0fbf6e092b312472c89ef0f3872c268b0a5e1e344e725a88c0717d` +[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.8.0-alpha.3/kubernetes-node-linux-s390x.tar.gz) | `a0a38c5830fc1b7996c5befc24502991fc8a095f82cf81ddd0a301163143a2c5` +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.8.0-alpha.3/kubernetes-node-windows-amd64.tar.gz) | `8af4253fe2c582843de329d12d84dbdc5f9f823f68ee08a42809864efc7c368d` + +## Changelog since v1.8.0-alpha.2 + +### Action Required + +* Remove deprecated kubectl command aliases `apiversions, clusterinfo, resize, rollingupdate, run-container, update` ([#49935](https://github.com/kubernetes/kubernetes/pull/49935), [@xiangpengzhao](https://github.com/xiangpengzhao)) +* The following deprecated flags have been removed from `kube-controller-manager`: `replication-controller-lookup-cache-size`, `replicaset-lookup-cache-size`, and `daemonset-lookup-cache-size`. Make sure you no longer attempt to set them. ([#50678](https://github.com/kubernetes/kubernetes/pull/50678), [@xiangpengzhao](https://github.com/xiangpengzhao)) +* Beta annotations `service.beta.kubernetes.io/external-traffic` and `service.beta.kubernetes.io/healthcheck-nodeport` have been removed. Please use fields `service.spec.externalTrafficPolicy` and `service.spec.healthCheckNodePort` instead. ([#50224](https://github.com/kubernetes/kubernetes/pull/50224), [@xiangpengzhao](https://github.com/xiangpengzhao)) +* A cluster using the AWS cloud provider will need to label existing nodes and resources with a ClusterID or the kube-controller-manager will not start. To run without a ClusterID pass --allow-untagged-cloud=true to the kube-controller-manager on startup. ([#49215](https://github.com/kubernetes/kubernetes/pull/49215), [@rrati](https://github.com/rrati)) +* RBAC: the `system:node` role is no longer automatically granted to the `system:nodes` group in new clusters. It is recommended that nodes be authorized using the `Node` authorization mode instead. Installations that wish to continue giving all members of the `system:nodes` group the `system:node` role (which grants broad read access, including all secrets and configmaps) must create an installation-specific `ClusterRoleBinding`. ([#49638](https://github.com/kubernetes/kubernetes/pull/49638), [@liggitt](https://github.com/liggitt)) +* StatefulSet: The deprecated `pod.alpha.kubernetes.io/initialized` annotation for interrupting StatefulSet Pod management is now ignored. If you were setting it to `true` or leaving it unset, no action is required. However, if you were setting it to `false`, be aware that previously-dormant StatefulSets may become active after upgrading. ([#49251](https://github.com/kubernetes/kubernetes/pull/49251), [@enisoc](https://github.com/enisoc)) +* add some more deprecation warnings to cluster ([#49148](https://github.com/kubernetes/kubernetes/pull/49148), [@mikedanese](https://github.com/mikedanese)) +* The --insecure-allow-any-token flag has been removed from kube-apiserver. Users of the flag should use impersonation headers instead for debugging. ([#49045](https://github.com/kubernetes/kubernetes/pull/49045), [@ericchiang](https://github.com/ericchiang)) +* Restored cAdvisor prometheus metrics to the main port -- a regression that existed in v1.7.0-v1.7.2 ([#49079](https://github.com/kubernetes/kubernetes/pull/49079), [@smarterclayton](https://github.com/smarterclayton)) + * cAdvisor metrics can now be scraped from `/metrics/cadvisor` on the kubelet ports. + * Note that you have to update your scraping jobs to get kubelet-only metrics from `/metrics` and `container_*` metrics from `/metrics/cadvisor` +* Change the default kubeadm bootstrap token TTL from infinite to 24 hours. This is a breaking change. If you require the old behavior, use `kubeadm init --token-ttl 0` / `kubeadm token create --ttl 0`. ([#48783](https://github.com/kubernetes/kubernetes/pull/48783), [@mattmoyer](https://github.com/mattmoyer)) + +### Other notable changes + +* /release-note Remove duplicate command example from `kubectl port-forward --help` ([#50229](https://github.com/kubernetes/kubernetes/pull/50229), [@tcharding](https://github.com/tcharding)) +* Adds a new `kubeadm config` command that lets users tell `kubeadm upgrade` what kubeadm configuration to use and lets users view the current state. ([#50980](https://github.com/kubernetes/kubernetes/pull/50980), [@luxas](https://github.com/luxas)) +* Kubectl uses openapi for validation. If OpenAPI is not available on the server, it defaults back to the old Swagger. ([#50546](https://github.com/kubernetes/kubernetes/pull/50546), [@apelisse](https://github.com/apelisse)) +* kubectl show node role if defined ([#50438](https://github.com/kubernetes/kubernetes/pull/50438), [@dixudx](https://github.com/dixudx)) +* iSCSI volume plugin: iSCSI initiatorname support ([#48789](https://github.com/kubernetes/kubernetes/pull/48789), [@mtanino](https://github.com/mtanino)) +* On AttachDetachController node status update, do not retry when node doesn't exist but keep the node entry in cache. ([#50806](https://github.com/kubernetes/kubernetes/pull/50806), [@verult](https://github.com/verult)) +* Prevent unneeded endpoint updates ([#50934](https://github.com/kubernetes/kubernetes/pull/50934), [@joelsmith](https://github.com/joelsmith)) +* Affinity in annotations alpha feature is no longer supported in 1.8. Anyone upgrading from 1.7 with AffinityInAnnotation feature enabled must ensure pods (specifically with pod anti-affinity PreferredDuringSchedulingIgnoredDuringExecution) with empty TopologyKey fields must be removed before upgrading to 1.8. ([#49976](https://github.com/kubernetes/kubernetes/pull/49976), [@aveshagarwal](https://github.com/aveshagarwal)) +* NONE ([#50871](https://github.com/kubernetes/kubernetes/pull/50871), [@liyinan926](https://github.com/liyinan926)) +* - kubeadm now supports "ci/latest-1.8" or "ci-cross/latest-1.8" and similar labels. ([#49119](https://github.com/kubernetes/kubernetes/pull/49119), [@kad](https://github.com/kad)) +* kubeadm: Adds dry-run support for kubeadm using the `--dry-run` option ([#50631](https://github.com/kubernetes/kubernetes/pull/50631), [@luxas](https://github.com/luxas)) +* Change GCE installs (kube-up.sh) to use GCI/COS for node OS, by default. ([#46512](https://github.com/kubernetes/kubernetes/pull/46512), [@thockin](https://github.com/thockin)) +* Use CollisionCount for collision avoidance when creating ControllerRevisions in StatefulSet controller ([#50490](https://github.com/kubernetes/kubernetes/pull/50490), [@liyinan926](https://github.com/liyinan926)) +* AWS: Arbitrarily choose first (lexicographically) subnet in AZ ([#50255](https://github.com/kubernetes/kubernetes/pull/50255), [@mattlandis](https://github.com/mattlandis)) +* Change CollisionCount from int64 to int32 across controllers ([#50575](https://github.com/kubernetes/kubernetes/pull/50575), [@dixudx](https://github.com/dixudx)) +* fix GPU resource validation that incorrectly allows zero limits ([#50218](https://github.com/kubernetes/kubernetes/pull/50218), [@dixudx](https://github.com/dixudx)) +* The `kubernetes.io/created-by` annotation is now deprecated and will be removed in v1.9. Use [ControllerRef](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md) instead to determine which controller, if any, owns an object. ([#50536](https://github.com/kubernetes/kubernetes/pull/50536), [@crimsonfaith91](https://github.com/crimsonfaith91)) +* Disable Docker's health check until we officially support it ([#50796](https://github.com/kubernetes/kubernetes/pull/50796), [@yguo0905](https://github.com/yguo0905)) +* Add ControllerRevision to apps/v1beta2 ([#50698](https://github.com/kubernetes/kubernetes/pull/50698), [@liyinan926](https://github.com/liyinan926)) +* StorageClass has a new field to configure reclaim policy of dynamically provisioned PVs. ([#47987](https://github.com/kubernetes/kubernetes/pull/47987), [@wongma7](https://github.com/wongma7)) +* Rerun init containers when the pod needs to be restarted ([#47599](https://github.com/kubernetes/kubernetes/pull/47599), [@yujuhong](https://github.com/yujuhong)) +* Resources outside the `*kubernetes.io` namespace are integers and cannot be over-committed. ([#48922](https://github.com/kubernetes/kubernetes/pull/48922), [@ConnorDoyle](https://github.com/ConnorDoyle)) +* apps/v1beta2 is enabled by default. DaemonSet, Deployment, ReplicaSet, and StatefulSet have been moved to this group version. ([#50643](https://github.com/kubernetes/kubernetes/pull/50643), [@kow3ns](https://github.com/kow3ns)) +* TLS cert storage for self-hosted clusters is now configurable. You can store them as secrets (alpha) or as usual host mounts. ([#50762](https://github.com/kubernetes/kubernetes/pull/50762), [@jamiehannaford](https://github.com/jamiehannaford)) +* Remove deprecated command 'kubectl stop' ([#46927](https://github.com/kubernetes/kubernetes/pull/46927), [@shiywang](https://github.com/shiywang)) +* Add new Prometheus metric that monitors the remaining lifetime of certificates used to authenticate requests to the API server. ([#50387](https://github.com/kubernetes/kubernetes/pull/50387), [@jcbsmpsn](https://github.com/jcbsmpsn)) +* Upgrade advanced audit to version v1beta1 ([#49115](https://github.com/kubernetes/kubernetes/pull/49115), [@CaoShuFeng](https://github.com/CaoShuFeng)) +* Cluster Autoscaler - fixes issues with taints and updates kube-proxy cpu request. ([#50514](https://github.com/kubernetes/kubernetes/pull/50514), [@mwielgus](https://github.com/mwielgus)) +* fluentd-elasticsearch addon: change the fluentd base image to fix crashes on systems with non-standard systemd installation ([#50679](https://github.com/kubernetes/kubernetes/pull/50679), [@aknuds1](https://github.com/aknuds1)) +* advanced audit: shutdown batching audit webhook gracefully ([#50577](https://github.com/kubernetes/kubernetes/pull/50577), [@crassirostris](https://github.com/crassirostris)) +* Add Priority admission controller for monitoring and resolving PriorityClasses. ([#49322](https://github.com/kubernetes/kubernetes/pull/49322), [@bsalamat](https://github.com/bsalamat)) +* apiservers: add synchronous shutdown mechanism on SIGTERM+INT ([#50439](https://github.com/kubernetes/kubernetes/pull/50439), [@sttts](https://github.com/sttts)) +* Fix kubernetes-worker charm hook failure when applying labels ([#50633](https://github.com/kubernetes/kubernetes/pull/50633), [@Cynerva](https://github.com/Cynerva)) +* kubeadm: Implementing the controlplane phase ([#50302](https://github.com/kubernetes/kubernetes/pull/50302), [@fabriziopandini](https://github.com/fabriziopandini)) +* Refactor addons into multiple packages ([#50214](https://github.com/kubernetes/kubernetes/pull/50214), [@andrewrynhard](https://github.com/andrewrynhard)) +* Kubelet now manages `/etc/hosts` file for both hostNetwork Pods and non-hostNetwork Pods. ([#49140](https://github.com/kubernetes/kubernetes/pull/49140), [@rickypai](https://github.com/rickypai)) +* After 1.8, admission controller will add 'MemoryPressure' toleration to Guaranteed and Burstable pods. ([#50180](https://github.com/kubernetes/kubernetes/pull/50180), [@k82cn](https://github.com/k82cn)) +* A new predicates, named 'CheckNodeCondition', was added to replace node condition filter. 'NetworkUnavailable', 'OutOfDisk' and 'NotReady' maybe reported as a reason when failed to schedule pods. ([#50362](https://github.com/kubernetes/kubernetes/pull/50362), [@k82cn](https://github.com/k82cn)) +* fix apps DeploymentSpec conversion issue ([#49719](https://github.com/kubernetes/kubernetes/pull/49719), [@dixudx](https://github.com/dixudx)) +* fluentd-gcp addon: Fix a bug in the event-exporter, when repeated events were not sent to Stackdriver. ([#50511](https://github.com/kubernetes/kubernetes/pull/50511), [@crassirostris](https://github.com/crassirostris)) +* not allowing "kubectl edit <resource>" when you got an empty list ([#50205](https://github.com/kubernetes/kubernetes/pull/50205), [@dixudx](https://github.com/dixudx)) +* NONE ([#49025](https://github.com/kubernetes/kubernetes/pull/49025), [@danwinship](https://github.com/danwinship)) +* fixes kubefed's ability to create RBAC roles in version-skewed clusters ([#50537](https://github.com/kubernetes/kubernetes/pull/50537), [@liggitt](https://github.com/liggitt)) +* API server authentication now caches successful bearer token authentication results for a few seconds. ([#50258](https://github.com/kubernetes/kubernetes/pull/50258), [@liggitt](https://github.com/liggitt)) +* Added field CollisionCount to StatefulSetStatus in both apps/v1beta1 and apps/v1beta2 ([#49983](https://github.com/kubernetes/kubernetes/pull/49983), [@liyinan926](https://github.com/liyinan926)) +* FC volume plugin: Support WWID for volume identifier ([#48741](https://github.com/kubernetes/kubernetes/pull/48741), [@mtanino](https://github.com/mtanino)) +* kubeadm: added enhanced TLS validation for token-based discovery in `kubeadm join` using a new `--discovery-token-ca-cert-hash` flag. ([#49520](https://github.com/kubernetes/kubernetes/pull/49520), [@mattmoyer](https://github.com/mattmoyer)) +* federation: Support for leader-election among federation controller-manager instances introduced. ([#46090](https://github.com/kubernetes/kubernetes/pull/46090), [@shashidharatd](https://github.com/shashidharatd)) +* New get-kube.sh option: KUBERNETES_SKIP_RELEASE_VALIDATION ([#50391](https://github.com/kubernetes/kubernetes/pull/50391), [@pipejakob](https://github.com/pipejakob)) +* Azure: Allow VNet to be in a separate Resource Group. ([#49725](https://github.com/kubernetes/kubernetes/pull/49725), [@sylr](https://github.com/sylr)) +* fix bug when azure cloud provider configuration file is not specified ([#49283](https://github.com/kubernetes/kubernetes/pull/49283), [@dixudx](https://github.com/dixudx)) +* The `rbac.authorization.k8s.io/v1beta1` API has been promoted to `rbac.authorization.k8s.io/v1` with no changes. ([#49642](https://github.com/kubernetes/kubernetes/pull/49642), [@liggitt](https://github.com/liggitt)) + * The `rbac.authorization.k8s.io/v1alpha1` version is deprecated and will be removed in a future release. +* Fix an issue where if a CSR is not approved initially by the SAR approver is not retried. ([#49788](https://github.com/kubernetes/kubernetes/pull/49788), [@mikedanese](https://github.com/mikedanese)) +* The v1.Service.PublishNotReadyAddresses field is added to notify DNS addons to publish the notReadyAddresses of Enpdoints. The "service.alpha.kubernetes.io/tolerate-unready-endpoints" annotation has been deprecated and will be removed when clients have sufficient time to consume the field. ([#49061](https://github.com/kubernetes/kubernetes/pull/49061), [@kow3ns](https://github.com/kow3ns)) +* vSphere cloud provider: vSphere cloud provider code refactoring ([#49164](https://github.com/kubernetes/kubernetes/pull/49164), [@BaluDontu](https://github.com/BaluDontu)) +* `cluster/gke` has been removed. GKE end-to-end testing should be done using `kubetest --deployment=gke` ([#50338](https://github.com/kubernetes/kubernetes/pull/50338), [@zmerlynn](https://github.com/zmerlynn)) +* kubeadm: Upload configuration used at 'kubeadm init' time to ConfigMap for easier upgrades ([#50320](https://github.com/kubernetes/kubernetes/pull/50320), [@luxas](https://github.com/luxas)) +* Adds (alpha feature) the ability to dynamically configure Kubelets by enabling the DynamicKubeletConfig feature gate, posting a ConfigMap to the API server, and setting the spec.configSource field on Node objects. See the proposal at https://github.com/kubernetes/community/blob/master/contributors/design-proposals/dynamic-kubelet-configuration.md for details. ([#46254](https://github.com/kubernetes/kubernetes/pull/46254), [@mtaufen](https://github.com/mtaufen)) +* Remove deprecated ScheduledJobs endpoints, use CronJobs instead. ([#49930](https://github.com/kubernetes/kubernetes/pull/49930), [@soltysh](https://github.com/soltysh)) +* [Federation] Make the hpa scale time window configurable ([#49583](https://github.com/kubernetes/kubernetes/pull/49583), [@irfanurrehman](https://github.com/irfanurrehman)) +* fuse daemons for GlusterFS and CephFS are now run in their own systemd scope when Kubernetes runs on a system with systemd. ([#49640](https://github.com/kubernetes/kubernetes/pull/49640), [@jsafrane](https://github.com/jsafrane)) +* `kubectl proxy` will now correctly handle the `exec`, `attach`, and `portforward` commands. You must pass `--disable-filter` to the command in order to allow these endpoints. ([#49534](https://github.com/kubernetes/kubernetes/pull/49534), [@smarterclayton](https://github.com/smarterclayton)) +* Copy annotations from a StatefulSet's metadata to the ControllerRevisions it owns ([#50263](https://github.com/kubernetes/kubernetes/pull/50263), [@liyinan926](https://github.com/liyinan926)) +* Make rolling update the default update strategy for v1beta2.DaemonSet and v1beta2.StatefulSet ([#50175](https://github.com/kubernetes/kubernetes/pull/50175), [@foxish](https://github.com/foxish)) +* Deprecate Deployment .spec.rollbackTo field ([#49340](https://github.com/kubernetes/kubernetes/pull/49340), [@janetkuo](https://github.com/janetkuo)) +* Collect metrics from Heapster in Stackdriver mode. ([#50290](https://github.com/kubernetes/kubernetes/pull/50290), [@piosz](https://github.com/piosz)) +* N/A ([#50179](https://github.com/kubernetes/kubernetes/pull/50179), [@k82cn](https://github.com/k82cn)) +* [Federation] HPA controller ([#45993](https://github.com/kubernetes/kubernetes/pull/45993), [@irfanurrehman](https://github.com/irfanurrehman)) +* Relax restrictions on environment variable names. ([#48986](https://github.com/kubernetes/kubernetes/pull/48986), [@timoreimann](https://github.com/timoreimann)) +* The node condition 'NodeInodePressure' was removed, as kubelet did not report it. ([#50124](https://github.com/kubernetes/kubernetes/pull/50124), [@k82cn](https://github.com/k82cn)) +* Fix premature return ([#49834](https://github.com/kubernetes/kubernetes/pull/49834), [@guoshimin](https://github.com/guoshimin)) +* StatefulSet uses scale subresource when scaling in accord with ReplicationController, ReplicaSet, and Deployment implementations. ([#49168](https://github.com/kubernetes/kubernetes/pull/49168), [@crimsonfaith91](https://github.com/crimsonfaith91)) +* Feature gates now determine whether a cluster is self-hosted. For more information, see the FeatureGates configuration flag. ([#50241](https://github.com/kubernetes/kubernetes/pull/50241), [@jamiehannaford](https://github.com/jamiehannaford)) +* Updates Cinder AttachDisk operation to be more reliable by delegating Detaches to volume manager. ([#50042](https://github.com/kubernetes/kubernetes/pull/50042), [@jingxu97](https://github.com/jingxu97)) +* add fieldSelector podIP ([#50091](https://github.com/kubernetes/kubernetes/pull/50091), [@dixudx](https://github.com/dixudx)) +* Return Audit-Id http response header for trouble shooting ([#49377](https://github.com/kubernetes/kubernetes/pull/49377), [@CaoShuFeng](https://github.com/CaoShuFeng)) +* Status objects for 404 API errors will have the correct APIVersion ([#49868](https://github.com/kubernetes/kubernetes/pull/49868), [@shiywang](https://github.com/shiywang)) +* Fix incorrect retry logic in scheduler ([#50106](https://github.com/kubernetes/kubernetes/pull/50106), [@julia-stripe](https://github.com/julia-stripe)) +* Enforce explicit references to API group client interfaces in clientsets to avoid ambiguity. ([#49370](https://github.com/kubernetes/kubernetes/pull/49370), [@sttts](https://github.com/sttts)) +* update dashboard image version ([#49855](https://github.com/kubernetes/kubernetes/pull/49855), [@zouyee](https://github.com/zouyee)) +* kubeadm: Implementing the kubeconfig phase fully ([#49419](https://github.com/kubernetes/kubernetes/pull/49419), [@fabriziopandini](https://github.com/fabriziopandini)) +* fixes a bug around using the Global config ElbSecurityGroup where Kuberentes would modify the passed in Security Group. ([#49805](https://github.com/kubernetes/kubernetes/pull/49805), [@nbutton23](https://github.com/nbutton23)) +* Fluentd DaemonSet in the fluentd-elasticsearch addon is configured via ConfigMap and includes journald plugin ([#50082](https://github.com/kubernetes/kubernetes/pull/50082), [@crassirostris](https://github.com/crassirostris)) + * Elasticsearch StatefulSet in the fluentd-elasticsearch addon uses local storage instead of PVC by default +* Add possibility to use multiple floatingip pools in openstack loadbalancer ([#49697](https://github.com/kubernetes/kubernetes/pull/49697), [@zetaab](https://github.com/zetaab)) +* The 504 timeout error was returning a JSON error body that indicated it was a 500. The body contents now correctly report a 500 error. ([#49678](https://github.com/kubernetes/kubernetes/pull/49678), [@smarterclayton](https://github.com/smarterclayton)) +* add examples for kubectl run --labels ([#49862](https://github.com/kubernetes/kubernetes/pull/49862), [@dixudx](https://github.com/dixudx)) +* Kubelet will by default fail with swap enabled from now on. The experimental flag "--experimental-fail-swap-on" has been deprecated, please set the new "--fail-swap-on" flag to false if you wish to run with /proc/swaps on. ([#47181](https://github.com/kubernetes/kubernetes/pull/47181), [@dims](https://github.com/dims)) +* Fix bug in scheduler that caused initially unschedulable pods to stuck in Pending state forever. ([#50028](https://github.com/kubernetes/kubernetes/pull/50028), [@julia-stripe](https://github.com/julia-stripe)) +* GCE: Bump GLBC version to 0.9.6 ([#50096](https://github.com/kubernetes/kubernetes/pull/50096), [@nicksardo](https://github.com/nicksardo)) +* Remove 0,1,3 from rand.String, to avoid 'bad words' ([#50070](https://github.com/kubernetes/kubernetes/pull/50070), [@dixudx](https://github.com/dixudx)) +* Fix data race during addition of new CRD ([#50098](https://github.com/kubernetes/kubernetes/pull/50098), [@nikhita](https://github.com/nikhita)) +* Do not try to run preStopHook when the gracePeriod is 0 ([#49449](https://github.com/kubernetes/kubernetes/pull/49449), [@dhilipkumars](https://github.com/dhilipkumars)) +* The SubjectAccessReview API in the authorization.k8s.io API group now allows providing the user uid. ([#49677](https://github.com/kubernetes/kubernetes/pull/49677), [@dims](https://github.com/dims)) +* Increase default value of apps/v1beta2 DeploymentSpec.RevisionHistoryLimit to 10 ([#49924](https://github.com/kubernetes/kubernetes/pull/49924), [@dixudx](https://github.com/dixudx)) +* Upgrade Elasticsearch/Kibana to 5.5.1 in fluentd-elasticsearch addon ([#48722](https://github.com/kubernetes/kubernetes/pull/48722), [@aknuds1](https://github.com/aknuds1)) + * Switch to basing our image of Elasticsearch in fluentd-elasticsearch addon off the official one + * Switch to the official image of Kibana in fluentd-elasticsearch addon + * Use StatefulSet for Elasticsearch instead of ReplicationController, with persistent volume claims + * Require authenticating towards Elasticsearch, as Elasticsearch 5.5 by default requires basic authentication +* Rebase hyperkube image on debian-hyperkube-base, based on debian-base. ([#48365](https://github.com/kubernetes/kubernetes/pull/48365), [@ixdy](https://github.com/ixdy)) +* change apps/v1beta2 StatefulSet observedGeneration (optional field) from a pointer to an int for consistency ([#49607](https://github.com/kubernetes/kubernetes/pull/49607), [@dixudx](https://github.com/dixudx)) +* After a kubelet rotates its client cert, it now closes its connections to the API server to force a handshake using the new cert. Previously, the kubelet could keep its existing connection open, even if the cert used for that connection was expired and rejected by the API server. ([#49899](https://github.com/kubernetes/kubernetes/pull/49899), [@ericchiang](https://github.com/ericchiang)) +* Improve our Instance Metadata coverage in Azure. ([#49237](https://github.com/kubernetes/kubernetes/pull/49237), [@brendandburns](https://github.com/brendandburns)) +* Add etcd connectivity endpoint to healthz ([#49412](https://github.com/kubernetes/kubernetes/pull/49412), [@bjhaid](https://github.com/bjhaid)) +* kube-proxy will emit "FailedToStartNodeHealthcheck" event when fails to start healthz server. ([#49267](https://github.com/kubernetes/kubernetes/pull/49267), [@MrHohn](https://github.com/MrHohn)) +* Fixed a bug in the API server watch cache, which could cause a missing watch event immediately after cache initialization. ([#49992](https://github.com/kubernetes/kubernetes/pull/49992), [@liggitt](https://github.com/liggitt)) +* Enforcement of fsGroup; enable ScaleIO multiple-instance volume mapping; default PVC capacity; alignment of PVC, PV, and volume names for dynamic provisioning ([#48999](https://github.com/kubernetes/kubernetes/pull/48999), [@vladimirvivien](https://github.com/vladimirvivien)) +* In GCE, add measures to prevent corruption of known_tokens.csv. ([#49897](https://github.com/kubernetes/kubernetes/pull/49897), [@mikedanese](https://github.com/mikedanese)) +* kubeadm: Fix join preflight check false negative ([#49825](https://github.com/kubernetes/kubernetes/pull/49825), [@erhudy](https://github.com/erhudy)) +* route_controller will emit "FailedToCreateRoute" event when fails to create route. ([#49821](https://github.com/kubernetes/kubernetes/pull/49821), [@MrHohn](https://github.com/MrHohn)) +* Fix incorrect parsing of io_priority in Portworx volume StorageClass and add support for new paramters. ([#49526](https://github.com/kubernetes/kubernetes/pull/49526), [@harsh-px](https://github.com/harsh-px)) +* The API Server now automatically creates RBAC ClusterRoles for CSR approving. ([#49284](https://github.com/kubernetes/kubernetes/pull/49284), [@luxas](https://github.com/luxas)) + * Each deployment method should bind users/groups to the ClusterRoles if they are using this feature. +* Adds AllowPrivilegeEscalation to control whether a process can gain more privileges than its parent process ([#47019](https://github.com/kubernetes/kubernetes/pull/47019), [@jessfraz](https://github.com/jessfraz)) +* `hack/local-up-cluster.sh` now enables the Node authorizer by default. Authorization modes can be overridden with the `AUTHORIZATION_MODE` environment variable, and the `ENABLE_RBAC` environment variable is no longer used. ([#49812](https://github.com/kubernetes/kubernetes/pull/49812), [@liggitt](https://github.com/liggitt)) +* rename stop.go file to delete.go to avoid confusion ([#49533](https://github.com/kubernetes/kubernetes/pull/49533), [@dixudx](https://github.com/dixudx)) +* Adding option to set the federation api server port if nodeport is set ([#46283](https://github.com/kubernetes/kubernetes/pull/46283), [@ktsakalozos](https://github.com/ktsakalozos)) +* The garbage collector now supports custom APIs added via CustomResourceDefinition or aggregated apiservers. Note that the garbage collector controller refreshes periodically, so there is a latency between when the API is added and when the garbage collector starts to manage it. ([#47665](https://github.com/kubernetes/kubernetes/pull/47665), [@ironcladlou](https://github.com/ironcladlou)) +* set the juju master charm state to blocked if the services appear to be failing ([#49717](https://github.com/kubernetes/kubernetes/pull/49717), [@wwwtyro](https://github.com/wwwtyro)) +* keep-terminated-pod-volumes flag on kubelet is deprecated. ([#47539](https://github.com/kubernetes/kubernetes/pull/47539), [@gnufied](https://github.com/gnufied)) +* kubectl describe podsecuritypolicy describes all fields. ([#45813](https://github.com/kubernetes/kubernetes/pull/45813), [@xilabao](https://github.com/xilabao)) +* Added flag support to kubectl plugins ([#47267](https://github.com/kubernetes/kubernetes/pull/47267), [@fabianofranz](https://github.com/fabianofranz)) +* Adding metrics support to local volume ([#49598](https://github.com/kubernetes/kubernetes/pull/49598), [@sbezverk](https://github.com/sbezverk)) +* Bug fix: Parsing of `--requestheader-group-headers` in requests should be case-insensitive. ([#49219](https://github.com/kubernetes/kubernetes/pull/49219), [@jmillikin-stripe](https://github.com/jmillikin-stripe)) +* Fix instance metadata service URL. ([#49081](https://github.com/kubernetes/kubernetes/pull/49081), [@brendandburns](https://github.com/brendandburns)) +* Add a new API object apps/v1beta2.ReplicaSet ([#49238](https://github.com/kubernetes/kubernetes/pull/49238), [@janetkuo](https://github.com/janetkuo)) +* fix pdb validation bug on PodDisruptionBudgetSpec ([#48706](https://github.com/kubernetes/kubernetes/pull/48706), [@dixudx](https://github.com/dixudx)) +* Revert deprecation of vCenter port in vSphere Cloud Provider. ([#49689](https://github.com/kubernetes/kubernetes/pull/49689), [@divyenpatel](https://github.com/divyenpatel)) +* Rev version of Calico's Typha daemon used in add-on to v0.2.3 to pull in bug-fixes. ([#48469](https://github.com/kubernetes/kubernetes/pull/48469), [@fasaxc](https://github.com/fasaxc)) +* set default adminid for rbd deleter if unset ([#49271](https://github.com/kubernetes/kubernetes/pull/49271), [@dixudx](https://github.com/dixudx)) +* Adding type apps/v1beta2.DaemonSet ([#49071](https://github.com/kubernetes/kubernetes/pull/49071), [@foxish](https://github.com/foxish)) +* Fix nil value issue when creating json patch for merge ([#49259](https://github.com/kubernetes/kubernetes/pull/49259), [@dixudx](https://github.com/dixudx)) +* Adds metrics for checking reflector health. ([#48224](https://github.com/kubernetes/kubernetes/pull/48224), [@deads2k](https://github.com/deads2k)) +* remove deads2k from volume reviewer ([#49566](https://github.com/kubernetes/kubernetes/pull/49566), [@deads2k](https://github.com/deads2k)) +* Unify genclient tags and add more fine control on verbs generated ([#49192](https://github.com/kubernetes/kubernetes/pull/49192), [@mfojtik](https://github.com/mfojtik)) +* kubeadm: Fixes a small bug where `--config` and `--skip-*` flags couldn't be passed at the same time in validation. ([#49498](https://github.com/kubernetes/kubernetes/pull/49498), [@luxas](https://github.com/luxas)) +* Remove depreciated flags: --low-diskspace-threshold-mb and --outofdisk-transition-frequency, which are replaced by --eviction-hard ([#48846](https://github.com/kubernetes/kubernetes/pull/48846), [@dashpole](https://github.com/dashpole)) +* Fixed OpenAPI Description and Nickname of API objects with subresources ([#49357](https://github.com/kubernetes/kubernetes/pull/49357), [@mbohlool](https://github.com/mbohlool)) +* set RBD default values as constant vars ([#49274](https://github.com/kubernetes/kubernetes/pull/49274), [@dixudx](https://github.com/dixudx)) +* Fix a bug with binding mount directories and files using flexVolumes ([#49118](https://github.com/kubernetes/kubernetes/pull/49118), [@adelton](https://github.com/adelton)) +* PodPreset is not injected if conflict occurs while applying PodPresets to a Pod. ([#47864](https://github.com/kubernetes/kubernetes/pull/47864), [@droot](https://github.com/droot)) +* `kubectl drain` no longer spins trying to delete pods that do not exist ([#49444](https://github.com/kubernetes/kubernetes/pull/49444), [@eparis](https://github.com/eparis)) +* Support specifying of FSType in StorageClass ([#45345](https://github.com/kubernetes/kubernetes/pull/45345), [@codablock](https://github.com/codablock)) +* The NodeRestriction admission plugin now allows a node to evict pods bound to itself ([#48707](https://github.com/kubernetes/kubernetes/pull/48707), [@danielfm](https://github.com/danielfm)) +* more robust stat handling from ceph df output in the kubernetes-master charm create-rbd-pv action ([#49394](https://github.com/kubernetes/kubernetes/pull/49394), [@wwwtyro](https://github.com/wwwtyro)) +* added cronjobs.batch to all, so kubectl get all returns them. ([#49326](https://github.com/kubernetes/kubernetes/pull/49326), [@deads2k](https://github.com/deads2k)) +* Update status to show failing services. ([#49296](https://github.com/kubernetes/kubernetes/pull/49296), [@ktsakalozos](https://github.com/ktsakalozos)) +* Fixes [#49418](https://github.com/kubernetes/kubernetes/pull/49418) where kube-controller-manager can panic on volume.CanSupport methods and enter a crash loop. ([#49420](https://github.com/kubernetes/kubernetes/pull/49420), [@gnufied](https://github.com/gnufied)) +* Add a new API version apps/v1beta2 ([#48746](https://github.com/kubernetes/kubernetes/pull/48746), [@janetkuo](https://github.com/janetkuo)) +* Websocket requests to aggregated APIs now perform TLS verification using the service DNS name instead of the backend server's IP address, consistent with non-websocket requests. ([#49353](https://github.com/kubernetes/kubernetes/pull/49353), [@liggitt](https://github.com/liggitt)) +* kubeadm: Don't set a specific `spc_t` SELinux label on the etcd Static Pod as that is more privs than etcd needs and due to that `spc_t` isn't compatible with some OSes. ([#49328](https://github.com/kubernetes/kubernetes/pull/49328), [@euank](https://github.com/euank)) +* GCE Cloud Provider: New created LoadBalancer type Service will have health checks for nodes by default if all nodes have version >= v1.7.2. ([#49330](https://github.com/kubernetes/kubernetes/pull/49330), [@MrHohn](https://github.com/MrHohn)) +* hack/local-up-cluster.sh now enables RBAC authorization by default ([#49323](https://github.com/kubernetes/kubernetes/pull/49323), [@mtanino](https://github.com/mtanino)) +* Use port 20256 for node-problem-detector in standalone mode. ([#49316](https://github.com/kubernetes/kubernetes/pull/49316), [@ajitak](https://github.com/ajitak)) +* Fixed unmounting of vSphere volumes when kubelet runs in a container. ([#49111](https://github.com/kubernetes/kubernetes/pull/49111), [@jsafrane](https://github.com/jsafrane)) +* use informers for quota evaluation of core resources where possible ([#49230](https://github.com/kubernetes/kubernetes/pull/49230), [@deads2k](https://github.com/deads2k)) +* additional backoff in azure cloudprovider ([#48967](https://github.com/kubernetes/kubernetes/pull/48967), [@jackfrancis](https://github.com/jackfrancis)) +* allow impersonate serviceaccount in cli ([#48253](https://github.com/kubernetes/kubernetes/pull/48253), [@CaoShuFeng](https://github.com/CaoShuFeng)) +* Add PriorityClass API object under new "scheduling" API group ([#48377](https://github.com/kubernetes/kubernetes/pull/48377), [@bsalamat](https://github.com/bsalamat)) +* None ([#45319](https://github.com/kubernetes/kubernetes/pull/45319), [@ericchiang](https://github.com/ericchiang)) +* Added golint check for pkg/kubelet. ([#47316](https://github.com/kubernetes/kubernetes/pull/47316), [@k82cn](https://github.com/k82cn)) +* azure: acr: support MSI with preview ACR with AAD auth ([#48981](https://github.com/kubernetes/kubernetes/pull/48981), [@colemickens](https://github.com/colemickens)) +* Set default CIDR to /16 for Juju deployments ([#49182](https://github.com/kubernetes/kubernetes/pull/49182), [@ktsakalozos](https://github.com/ktsakalozos)) +* Fix pod preset to ignore input pod namespace in favor of request namespace ([#49120](https://github.com/kubernetes/kubernetes/pull/49120), [@jpeeler](https://github.com/jpeeler)) +* None ([#48983](https://github.com/kubernetes/kubernetes/pull/48983), [@k82cn](https://github.com/k82cn)) +* Previously a deleted bootstrapping token secret would be considered valid until it was reaped. Now it is invalid as soon as the deletionTimestamp is set. ([#49057](https://github.com/kubernetes/kubernetes/pull/49057), [@ericchiang](https://github.com/ericchiang)) +* Set default snap channel on charms to 1.7 stable ([#48874](https://github.com/kubernetes/kubernetes/pull/48874), [@ktsakalozos](https://github.com/ktsakalozos)) +* prevent unsetting of nonexistent previous port in kubeapi-load-balancer charm ([#49033](https://github.com/kubernetes/kubernetes/pull/49033), [@wwwtyro](https://github.com/wwwtyro)) +* kubeadm: Make kube-proxy tolerate the external cloud provider taint so that an external cloud provider can be easily used on top of kubeadm ([#49017](https://github.com/kubernetes/kubernetes/pull/49017), [@luxas](https://github.com/luxas)) +* Fix Pods using Portworx volumes getting stuck in ContainerCreating phase. ([#48898](https://github.com/kubernetes/kubernetes/pull/48898), [@harsh-px](https://github.com/harsh-px)) +* hpa: Prevent scaling below MinReplicas if desiredReplicas is zero ([#48997](https://github.com/kubernetes/kubernetes/pull/48997), [@johanneswuerbach](https://github.com/johanneswuerbach)) +* Kubelet CRI: move seccomp from annotations to security context. ([#46332](https://github.com/kubernetes/kubernetes/pull/46332), [@feiskyer](https://github.com/feiskyer)) +* Never prevent deletion of resources as part of namespace lifecycle ([#48733](https://github.com/kubernetes/kubernetes/pull/48733), [@liggitt](https://github.com/liggitt)) +* The generic RESTClient type (`k8s.io/client-go/rest`) no longer exposes `LabelSelectorParam` or `FieldSelectorParam` methods - use `VersionedParams` with `metav1.ListOptions` instead. The `UintParam` method has been removed. The `timeout` parameter will no longer cause an error when using `Param()`. ([#48991](https://github.com/kubernetes/kubernetes/pull/48991), [@smarterclayton](https://github.com/smarterclayton)) +* Support completion for kubectl config delete-cluster ([#48381](https://github.com/kubernetes/kubernetes/pull/48381), [@superbrothers](https://github.com/superbrothers)) +* Could get the patch from kubectl edit command ([#46091](https://github.com/kubernetes/kubernetes/pull/46091), [@xilabao](https://github.com/xilabao)) +* Added scheduler integration test owners. ([#46930](https://github.com/kubernetes/kubernetes/pull/46930), [@k82cn](https://github.com/k82cn)) +* `kubectl run` learned how to set a service account name in the generated pod spec with the `--serviceaccount` flag. ([#46318](https://github.com/kubernetes/kubernetes/pull/46318), [@liggitt](https://github.com/liggitt)) +* Fix share name generation in azure file provisioner. ([#48326](https://github.com/kubernetes/kubernetes/pull/48326), [@karataliu](https://github.com/karataliu)) +* Fixed a bug where a jsonpath filter would return an error if one of the items being evaluated did not contain all of the nested elements in the filter query. ([#47846](https://github.com/kubernetes/kubernetes/pull/47846), [@ncdc](https://github.com/ncdc)) +* Uses the port config option in the kubeapi-load-balancer charm. ([#48958](https://github.com/kubernetes/kubernetes/pull/48958), [@wwwtyro](https://github.com/wwwtyro)) +* azure: support retrieving access tokens via managed identity extension ([#48854](https://github.com/kubernetes/kubernetes/pull/48854), [@colemickens](https://github.com/colemickens)) +* Add a runtime warning about the kubeadm default token TTL changes. ([#48838](https://github.com/kubernetes/kubernetes/pull/48838), [@mattmoyer](https://github.com/mattmoyer)) +* Azure PD (Managed/Blob) ([#46360](https://github.com/kubernetes/kubernetes/pull/46360), [@khenidak](https://github.com/khenidak)) +* Redirect all examples README to the the kubernetes/examples repo ([#46362](https://github.com/kubernetes/kubernetes/pull/46362), [@sebgoa](https://github.com/sebgoa)) +* Fix a regression that broke the `--config` flag for `kubeadm init`. ([#48915](https://github.com/kubernetes/kubernetes/pull/48915), [@mattmoyer](https://github.com/mattmoyer)) +* Fluentd-gcp DaemonSet exposes different set of metrics. ([#48812](https://github.com/kubernetes/kubernetes/pull/48812), [@crassirostris](https://github.com/crassirostris)) +* MountPath should be absolute ([#48815](https://github.com/kubernetes/kubernetes/pull/48815), [@dixudx](https://github.com/dixudx)) +* Updated comments of func in testapi. ([#48407](https://github.com/kubernetes/kubernetes/pull/48407), [@k82cn](https://github.com/k82cn)) +* Fix service controller crash loop when Service with GCP LoadBalancer uses static IP ([#48848](https://github.com/kubernetes/kubernetes/pull/48848), [@nicksardo](https://github.com/nicksardo)) ([#48849](https://github.com/kubernetes/kubernetes/pull/48849), [@nicksardo](https://github.com/nicksardo)) +* Fix pods failing to start when subPath is a dangling symlink from kubelet point of view, which can happen if it is running inside a container ([#48555](https://github.com/kubernetes/kubernetes/pull/48555), [@redbaron](https://github.com/redbaron)) +* Add initial support for the Azure instance metadata service. ([#48243](https://github.com/kubernetes/kubernetes/pull/48243), [@brendandburns](https://github.com/brendandburns)) +* Added new flag to `kubeadm init`: --node-name, that lets you specify the name of the Node object that will be created ([#48594](https://github.com/kubernetes/kubernetes/pull/48594), [@GheRivero](https://github.com/GheRivero)) +* Added pod evictors for new zone. ([#47952](https://github.com/kubernetes/kubernetes/pull/47952), [@k82cn](https://github.com/k82cn)) +* kube-up and kubemark will default to using cos (GCI) images for nodes. ([#48279](https://github.com/kubernetes/kubernetes/pull/48279), [@abgworrall](https://github.com/abgworrall)) + * The previous default was container-vm (CVM, "debian"), which is deprecated. + * If you need to explicitly use container-vm for some reason, you should set + * KUBE_NODE_OS_DISTRIBUTION=debian +* kubectl: Fix bug that showed terminated/evicted pods even without `--show-all`. ([#48786](https://github.com/kubernetes/kubernetes/pull/48786), [@janetkuo](https://github.com/janetkuo)) +* Fixed GlusterFS volumes taking too long to time out ([#48709](https://github.com/kubernetes/kubernetes/pull/48709), [@jsafrane](https://github.com/jsafrane)) + + + +# v1.7.4 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.7/examples) + +## Downloads for v1.7.4 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.7.4/kubernetes.tar.gz) | `dfc4521a81cdcb6a644757247f7b5311ed371d767053e0b28ac1c6a58a890bd2` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.7.4/kubernetes-src.tar.gz) | `d9e0e091b202c2ca155d31ed88b616a4cb759bc14d84b637271b55d6b0774bd1` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.7.4/kubernetes-client-darwin-386.tar.gz) | `e87bb880f89766c0642eadfca387d91b82845da4c26eb4b213665b82d9060641` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.7.4/kubernetes-client-darwin-amd64.tar.gz) | `a913d8f2578449e926c822a5e96b3c7185fd0c97589d45f4f9224940f3f2e4c9` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.7.4/kubernetes-client-linux-386.tar.gz) | `03ed586c6c2c1e5fbdf3e75627b2d981b5e54fe1f4090a23759e34f1cfe6e7d0` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.4/kubernetes-client-linux-amd64.tar.gz) | `19eef604019d4562e9b1107ad8d1d3886512ba240a9eb82f8d6b4332b2cd5e7d` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.4/kubernetes-client-linux-arm64.tar.gz) | `9c60f289d55674b3af26bc219b4478aa2d46f6cbf7743493c14ad49099a17794` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.7.4/kubernetes-client-linux-arm.tar.gz) | `6fb2260f8a5ac18b5f16cfcf34579c675ee2222b54508d0abd36624acb24f314` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.4/kubernetes-client-linux-ppc64le.tar.gz) | `e5fe4b73cbd4e5662e77b1ca72e959f692fde39459bd1e9711814d877dabf137` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.4/kubernetes-client-linux-s390x.tar.gz) | `2ed3545580731b838f732cc0b8f805e0aa03478bf2913fd3ae3230042edea2c3` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.7.4/kubernetes-client-windows-386.tar.gz) | `5b1c79aea5e5174e0d135a15dd3a33cdbdb2c465f08af1878c5fc38aaf28ba7b` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.7.4/kubernetes-client-windows-amd64.tar.gz) | `07ca92b2f7659ecc8f5c93a707767fe6de099c20d5a81451f652968a326ec063` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.4/kubernetes-server-linux-amd64.tar.gz) | `09c420fdb9b912c172b19638d67b27bc7994e2608185051f412804fa55790076` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.4/kubernetes-server-linux-arm64.tar.gz) | `49d0a383fced290223b3727011904283e16183f0356f7d952f587eef9dbef4a8` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.7.4/kubernetes-server-linux-arm.tar.gz) | `74442000ff61b10b12f783594cb15b6a1db3dd0d879fe8c0863e8b5ec7de7de4` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.4/kubernetes-server-linux-ppc64le.tar.gz) | `809cf588ca15ab57ca4570aa7939fb08b7dc7e038a0475098f9f4ba5ced9e4c7` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.4/kubernetes-server-linux-s390x.tar.gz) | `33961f57ece65872976065614055b41a0bb3237152bb86ae40b9fa6a0089ab2f` + +### Node Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.4/kubernetes-node-linux-amd64.tar.gz) | `59e0643c46f9ad5b401b9bb8aa067d1263f0b22f06f16008b5c7518ee905324e` +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.4/kubernetes-node-linux-arm64.tar.gz) | `216523d47ec6b451308708eda53ef5fe05f59c3c1c912955094be798dfe8f7bb` +[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.7.4/kubernetes-node-linux-arm.tar.gz) | `13ccad18701f67930991128c39efecea3ba873e21cecc81d79a5563c11f16ad2` +[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.4/kubernetes-node-linux-ppc64le.tar.gz) | `a6b644f842e84b3dc6059fae19dffe4da1d3dbc8e6464f264664169634f89a02` +[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.4/kubernetes-node-linux-s390x.tar.gz) | `b753f1bf1b26a62bc26def4b6b49dacdd16389d2d57ca2c384f449727daacc1d` +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.7.4/kubernetes-node-windows-amd64.tar.gz) | `1fabda88ff9cbfcae406707c8584efc75600b2484317a0f22d56a0c44ca32184` + +## Changelog since v1.7.3 + +### Other notable changes + +* Azure: Allow VNet to be in a separate Resource Group. ([#49725](https://github.com/kubernetes/kubernetes/pull/49725), [@sylr](https://github.com/sylr)) +* Fix an issue where if a CSR is not approved initially by the SAR approver is not retried. ([#49788](https://github.com/kubernetes/kubernetes/pull/49788), [@mikedanese](https://github.com/mikedanese)) +* Cluster Autoscaler - fixes issues with taints and updates kube-proxy cpu request. ([#50514](https://github.com/kubernetes/kubernetes/pull/50514), [@mwielgus](https://github.com/mwielgus)) +* Bumped Heapster version to 1.4.1: ([#50642](https://github.com/kubernetes/kubernetes/pull/50642), [@piosz](https://github.com/piosz)) + * - handle gracefully problem when kubelet reports duplicated stats for the same container (see [#47853](https://github.com/kubernetes/kubernetes/pull/47853)) on Heapster side + * - fixed bugs and improved performance in Stackdriver Sink +* fluentd-gcp addon: Fix a bug in the event-exporter, when repeated events were not sent to Stackdriver. ([#50511](https://github.com/kubernetes/kubernetes/pull/50511), [@crassirostris](https://github.com/crassirostris)) +* Collect metrics from Heapster in Stackdriver mode. ([#50517](https://github.com/kubernetes/kubernetes/pull/50517), [@piosz](https://github.com/piosz)) +* fixes a bug around using the Global config ElbSecurityGroup where Kuberentes would modify the passed in Security Group. ([#49805](https://github.com/kubernetes/kubernetes/pull/49805), [@nbutton23](https://github.com/nbutton23)) +* Updates Cinder AttachDisk operation to be more reliable by delegating Detaches to volume manager. ([#50042](https://github.com/kubernetes/kubernetes/pull/50042), [@jingxu97](https://github.com/jingxu97)) +* fixes kubefed's ability to create RBAC roles in version-skewed clusters ([#50537](https://github.com/kubernetes/kubernetes/pull/50537), [@liggitt](https://github.com/liggitt)) +* Fix data race during addition of new CRD ([#50098](https://github.com/kubernetes/kubernetes/pull/50098), [@nikhita](https://github.com/nikhita)) +* Fix bug in scheduler that caused initially unschedulable pods to stuck in Pending state forever. ([#50028](https://github.com/kubernetes/kubernetes/pull/50028), [@julia-stripe](https://github.com/julia-stripe)) +* Fix incorrect retry logic in scheduler ([#50106](https://github.com/kubernetes/kubernetes/pull/50106), [@julia-stripe](https://github.com/julia-stripe)) +* GCE: Bump GLBC version to 0.9.6 ([#50096](https://github.com/kubernetes/kubernetes/pull/50096), [@nicksardo](https://github.com/nicksardo)) +* The NodeRestriction admission plugin now allows a node to evict pods bound to itself ([#48707](https://github.com/kubernetes/kubernetes/pull/48707), [@danielfm](https://github.com/danielfm)) +* Fixed a bug in the API server watch cache, which could cause a missing watch event immediately after cache initialization. ([#49992](https://github.com/kubernetes/kubernetes/pull/49992), [@liggitt](https://github.com/liggitt)) + + + +# v1.7.3 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.7/examples) + +## Downloads for v1.7.3 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.7.3/kubernetes.tar.gz) | `8afa3919b6bff47ada1c298837881ef7eed9516694d54517ac2a59b0bbe7308c` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.7.3/kubernetes-src.tar.gz) | `54f77cb2d392de742580fc5fb9ca5acf29adfb4620f4dcb09050d7dfbbd260d7` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.7.3/kubernetes-client-darwin-386.tar.gz) | `9a62ebc7b25847ce3201e01df6a845139e1de6ea4e9cc02ef4c713d33c5a9916` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.7.3/kubernetes-client-darwin-amd64.tar.gz) | `b786b39e89908ed567a17dac6e554cf5580f0ad817334ad2bd447a8f8b5bde95` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.7.3/kubernetes-client-linux-386.tar.gz) | `aed5d3ccaf9fafb52775234d27168674f9b536ce72cb56e51376761f2f77c653` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.3/kubernetes-client-linux-amd64.tar.gz) | `8d66c7912914ac9add514e660fdc8c963b748a7c588c43a14533157a9f0e1c92` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.3/kubernetes-client-linux-arm64.tar.gz) | `7b65dd3d72712e419679685dfe6324274b080415eb556a2dca95bcb61cbf8882` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.7.3/kubernetes-client-linux-arm.tar.gz) | `42843f265bcf56a801942cee378f235b94eea1b8ac431315a9db0fb7d78736ad` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.3/kubernetes-client-linux-ppc64le.tar.gz) | `c2976c26f9f4842f59cf0d5e8a79913f688b57843b825bfdd300ca4d8b4e7f1f` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.3/kubernetes-client-linux-s390x.tar.gz) | `7f019b5a32e927422136be0672e0dd97bcf496e7c25935a3e3d68474c2bd543d` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.7.3/kubernetes-client-windows-386.tar.gz) | `2d4d26928f31342081337bc9b8508067b3a29c9f673a6f67186e04c447d274c1` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.7.3/kubernetes-client-windows-amd64.tar.gz) | `90423aaa71fdd813ac58ceb25e670bd8b53a417e6ac34e67ad2cacc7f5a4c579` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.3/kubernetes-server-linux-amd64.tar.gz) | `f4ae8d6655eedc1bed14c6d7da74156cb1f43a01a554f6399a177e3acb385bf1` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.3/kubernetes-server-linux-arm64.tar.gz) | `4a2ab8183f944f7e952b929008a4f39297897b7d411b233e7f952a8a755eb65c` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.7.3/kubernetes-server-linux-arm.tar.gz) | `fde4d9f8a2e360d8cabfa7d56ed1b2ec25a09ce1ab8db3d2e5e673f098586488` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.3/kubernetes-server-linux-ppc64le.tar.gz) | `7d012b8393c06bd2418b1173fb306879e6fd11437f874b92bffcdba5ef4fb14a` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.3/kubernetes-server-linux-s390x.tar.gz) | `364b2c768bca178844de0752b5c0e4d3ee37cfc98ca4b8deac71e71aded84d5a` + +### Node Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.3/kubernetes-node-linux-amd64.tar.gz) | `29b7a0649f0fed7f4e892d4c5ecbe7dfc57d3631e29c90dfafd305b19e324e57` +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.3/kubernetes-node-linux-arm64.tar.gz) | `6c8f2d8651bddd625e336a16546b923cd18a8a8f01df6d236db46b914b9edbe0` +[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.7.3/kubernetes-node-linux-arm.tar.gz) | `1ad3c378ad56f7233b4e75cdb3fb1ba52cde1f7695a536b2ccbefc614f56208f` +[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.3/kubernetes-node-linux-ppc64le.tar.gz) | `32860144cf02a62b29bd2a8fcaa155ccf3f004352e363d398ff1eccf90ebaae7` +[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.3/kubernetes-node-linux-s390x.tar.gz) | `eb34c895267d91324841abc0cc17788def37bfee297f3067cbee6f088f6c6b39` +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.7.3/kubernetes-node-windows-amd64.tar.gz) | `de2efc1cf0979bade8db64c342bbcec021d5dd271b2e5232c9d282104afb4368` + +## Changelog since v1.7.2 + +### Other notable changes + +* fix pdb validation bug on PodDisruptionBudgetSpec ([#48706](https://github.com/kubernetes/kubernetes/pull/48706), [@dixudx](https://github.com/dixudx)) +* kubeadm: Fix join preflight check false negative ([#49825](https://github.com/kubernetes/kubernetes/pull/49825), [@erhudy](https://github.com/erhudy)) +* Revert deprecation of vCenter port in vSphere Cloud Provider. ([#49689](https://github.com/kubernetes/kubernetes/pull/49689), [@divyenpatel](https://github.com/divyenpatel)) +* Fluentd-gcp DaemonSet exposes different set of metrics. ([#48812](https://github.com/kubernetes/kubernetes/pull/48812), [@crassirostris](https://github.com/crassirostris)) +* Fixed OpenAPI Description and Nickname of API objects with subresources ([#49357](https://github.com/kubernetes/kubernetes/pull/49357), [@mbohlool](https://github.com/mbohlool)) +* Websocket requests to aggregated APIs now perform TLS verification using the service DNS name instead of the backend server's IP address, consistent with non-websocket requests. ([#49353](https://github.com/kubernetes/kubernetes/pull/49353), [@liggitt](https://github.com/liggitt)) +* kubeadm: Fixes a small bug where `--config` and `--skip-*` flags couldn't be passed at the same time in validation. ([#49498](https://github.com/kubernetes/kubernetes/pull/49498), [@luxas](https://github.com/luxas)) +* kubeadm: Don't set a specific `spc_t` SELinux label on the etcd Static Pod as that is more privs than etcd needs and due to that `spc_t` isn't compatible with some OSes. ([#49328](https://github.com/kubernetes/kubernetes/pull/49328), [@euank](https://github.com/euank)) +* Websocket requests to aggregated APIs now perform TLS verification using the service DNS name instead of the backend server's IP address, consistent with non-websocket requests. ([#49353](https://github.com/kubernetes/kubernetes/pull/49353), [@liggitt](https://github.com/liggitt)) +* `kubectl drain` no longer spins trying to delete pods that do not exist ([#49444](https://github.com/kubernetes/kubernetes/pull/49444), [@eparis](https://github.com/eparis)) +* Fixes [#49418](https://github.com/kubernetes/kubernetes/pull/49418) where kube-controller-manager can panic on volume.CanSupport methods and enter a crash loop. ([#49420](https://github.com/kubernetes/kubernetes/pull/49420), [@gnufied](https://github.com/gnufied)) +* Fix Cinder to support http status 300 in pagination ([#47602](https://github.com/kubernetes/kubernetes/pull/47602), [@rootfs](https://github.com/rootfs)) +* Automated cherry pick of [#49079](https://github.com/kubernetes/kubernetes/pull/49079) upstream release 1.7 ([#49254](https://github.com/kubernetes/kubernetes/pull/49254), [@feiskyer](https://github.com/feiskyer)) +* Fixed GlusterFS volumes taking too long to time out ([#48709](https://github.com/kubernetes/kubernetes/pull/48709), [@jsafrane](https://github.com/jsafrane)) +* The IP address and port for kube-proxy metrics server is now configurable via flag `--metrics-bind-address` ([#48625](https://github.com/kubernetes/kubernetes/pull/48625), [@mrhohn](https://github.com/mrhohn)) + * Special notice for kube-proxy in 1.7+ (including 1.7.0): + * Healthz server (/healthz) will be served on 0.0.0.0:10256 by default. + * Metrics server (/metrics and /proxyMode) will be served on 127.0.0.1:10249 by default. + * Metrics server will continue serving /healthz. + + +# v1.7.2 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.7/examples) + +## Downloads for v1.7.2 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.7.2/kubernetes.tar.gz) | `35281f3552ec4bdf0c219bb7d25b22033648a81e3726594d25500418653eb2f0` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.7.2/kubernetes-src.tar.gz) | `450ab45c9d69b12ca9d658247ace8fc67fa02a658fbb474f2a7deae85ebff223` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.7.2/kubernetes-client-darwin-386.tar.gz) | `9fc3629c9eee02008cda0a1045d8a80d6c4ede057e989bdb9c187630c8977438` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.7.2/kubernetes-client-darwin-amd64.tar.gz) | `c163afbf8effd3f1ae041fbcf147f49c478656665158503ddabfb8f64f764bdc` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.7.2/kubernetes-client-linux-386.tar.gz) | `8ec8a0f40a8c7726b2610a30dd4bfa2aef736147a9771234651c1e005e832519` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.2/kubernetes-client-linux-amd64.tar.gz) | `9c2363710d61a12a28df2d8a4688543b785156369973d33144ab1f2c1d5c7b53` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.2/kubernetes-client-linux-arm64.tar.gz) | `320e89b12fd59863ad64bb49f0a208aba98064f5ead0fe43945f7c5b3fc260e9` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.7.2/kubernetes-client-linux-arm.tar.gz) | `08566e8f7d200d4d23c59947a66b2737122bffd897e8079f056b76d39156167c` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.2/kubernetes-client-linux-ppc64le.tar.gz) | `681842ae5f8364be1a0dcdb0703958e450ec9c46eb7bf875a86bc3d6b21a9bb0` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.2/kubernetes-client-linux-s390x.tar.gz) | `a779720a07fa22bdaf0e28d93e6a946f479ce408ec25644a3b45aeb03cd04cc8` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.7.2/kubernetes-client-windows-386.tar.gz) | `3fe1e082176e09aba62b6414f5fb4ea8d43880ab04766535ae68e6500c868764` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.7.2/kubernetes-client-windows-amd64.tar.gz) | `1ddbdc59bd97b044b63a46da175a5e5298b8947cc49511e3b378d0298736c66d` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.2/kubernetes-server-linux-amd64.tar.gz) | `b281a1b0ff2f0f38e88642d492e184aa087a985baf54bcaae588948e675d96a3` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.2/kubernetes-server-linux-arm64.tar.gz) | `2b87266d43f7e38e8d7328b923ee75adba0fc64a2299851a8e915b9321f66e3d` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.7.2/kubernetes-server-linux-arm.tar.gz) | `3f00de82ba4d623fbec8f05fc9b249435671a2f6f976654ea5f1f839dca1f804` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.2/kubernetes-server-linux-ppc64le.tar.gz) | `4b70ff24a6bf9c3d9f58c51fe60a279ac3ce8d996708a4bf58295fa740168b27` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.2/kubernetes-server-linux-s390x.tar.gz) | `83da55f793bbd040f7282cb155ce219bf1039195f53762098633c44a6971b759` + +### Node Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.2/kubernetes-node-linux-amd64.tar.gz) | `ecee3f66f62ff87a1718ee7279b720f411fba1b4439255664364e3c5968207b5` +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.2/kubernetes-node-linux-arm64.tar.gz) | `d03252370caa631afd5710e5d40ff35b1e0764bc19a911f3e3f6c9c300b2e354` +[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.7.2/kubernetes-node-linux-arm.tar.gz) | `e1885e36ca699c7ed75a2212d7e8be4482c544ea80e0a229b32703e3efd16ddc` +[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.2/kubernetes-node-linux-ppc64le.tar.gz) | `6a3fdc63c1fbcd66440dba4f8252a26959cb42ac92298d12c447c7f3d8d7cc29` +[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.2/kubernetes-node-linux-s390x.tar.gz) | `8b2eabb3cee1b990c75835a80ce3429d2a2a7bae7e90916f64efda131da70eaa` +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.7.2/kubernetes-node-windows-amd64.tar.gz) | `8f563627db05d6f12a2034bb01961b012dcadcec17d3bc399d05b6837340d3b3` + +## Changelog since v1.7.1 + +### Other notable changes + +* Use port 20256 for node-problem-detector in standalone mode. ([#49316](https://github.com/kubernetes/kubernetes/pull/49316), [@ajitak](https://github.com/ajitak)) +* GCE Cloud Provider: New created LoadBalancer type Service will have health checks for nodes by default if all nodes have version >= v1.7.2. ([#49330](https://github.com/kubernetes/kubernetes/pull/49330), [@MrHohn](https://github.com/MrHohn)) +* Azure PD (Managed/Blob) ([#46360](https://github.com/kubernetes/kubernetes/pull/46360), [@khenidak](https://github.com/khenidak)) +* Fix Pods using Portworx volumes getting stuck in ContainerCreating phase. ([#48898](https://github.com/kubernetes/kubernetes/pull/48898), [@harsh-px](https://github.com/harsh-px)) +* kubeadm: Make kube-proxy tolerate the external cloud provider taint so that an external cloud provider can be easily used on top of kubeadm ([#49017](https://github.com/kubernetes/kubernetes/pull/49017), [@luxas](https://github.com/luxas)) +* Fix pods failing to start when subPath is a dangling symlink from kubelet point of view, which can happen if it is running inside a container ([#48555](https://github.com/kubernetes/kubernetes/pull/48555), [@redbaron](https://github.com/redbaron)) +* Never prevent deletion of resources as part of namespace lifecycle ([#48733](https://github.com/kubernetes/kubernetes/pull/48733), [@liggitt](https://github.com/liggitt)) +* kubectl: Fix bug that showed terminated/evicted pods even without `--show-all`. ([#48786](https://github.com/kubernetes/kubernetes/pull/48786), [@janetkuo](https://github.com/janetkuo)) +* Add a runtime warning about the kubeadm default token TTL changes. ([#48838](https://github.com/kubernetes/kubernetes/pull/48838), [@mattmoyer](https://github.com/mattmoyer)) +* Local storage teardown fix ([#48402](https://github.com/kubernetes/kubernetes/pull/48402), [@ianchakeres](https://github.com/ianchakeres)) +* Fix udp service blackhole problem when number of backends changes from 0 to non-0 ([#48524](https://github.com/kubernetes/kubernetes/pull/48524), [@freehan](https://github.com/freehan)) +* hpa: Prevent scaling below MinReplicas if desiredReplicas is zero ([#48997](https://github.com/kubernetes/kubernetes/pull/48997), [@johanneswuerbach](https://github.com/johanneswuerbach)) +* kubeadm: Fix a bug where `kubeadm join` would wait 5 seconds without doing anything. Now `kubeadm join` executes the tasks immediately. ([#48737](https://github.com/kubernetes/kubernetes/pull/48737), [@mattmoyer](https://github.com/mattmoyer)) +* Fix a regression that broke the `--config` flag for `kubeadm init`. ([#48915](https://github.com/kubernetes/kubernetes/pull/48915), [@mattmoyer](https://github.com/mattmoyer)) +* Fix service controller crash loop when Service with GCP LoadBalancer uses static IP ([#48848](https://github.com/kubernetes/kubernetes/pull/48848), [@nicksardo](https://github.com/nicksardo)) ([#48849](https://github.com/kubernetes/kubernetes/pull/48849), [@nicksardo](https://github.com/nicksardo)) + + + +# v1.7.1 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.7/examples) + +## Downloads for v1.7.1 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.7.1/kubernetes.tar.gz) | `76bddfd19a50f92136456af5bbc3a9d4239260c0c40dccfe704156286a93127c` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.7.1/kubernetes-src.tar.gz) | `159100f6506c4d59d640a3b0fc7691c4a5023b346d7c3911c5cbbedce2ad8184` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.7.1/kubernetes-client-darwin-386.tar.gz) | `340ceb858bff489fa7ae15c6b526c4316d9c7b6ca354f68ff187c8b5eff08f45` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.7.1/kubernetes-client-darwin-amd64.tar.gz) | `1f1db50d57750115abd6e6e060c914292af7a6e2933a48ccf28ebbe8942c7826` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.7.1/kubernetes-client-linux-386.tar.gz) | `5eac1c92aee40cd2ef14248639d39d7cee910f077dd006a868c510116852fbba` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.1/kubernetes-client-linux-amd64.tar.gz) | `6b807520a69b8432baaa89304e8d1ff286d07af20e2a3712b8b2e38d61dbb445` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.1/kubernetes-client-linux-arm64.tar.gz) | `a91e0ea4381f659f60380b5b9d6f8114e13337f90a32bcb4a72b8168caef2e00` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.7.1/kubernetes-client-linux-arm.tar.gz) | `6e0e2e557d4e3df18e967e6025a36205aae5b8979dcbb33df6d6e44d9224809a` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.1/kubernetes-client-linux-ppc64le.tar.gz) | `22264e96ceaa2d853120be7dcbdc70a9938915cd10eaf5a2c75f4fb2dd12a2eb` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.1/kubernetes-client-linux-s390x.tar.gz) | `9b5ac9a66df99a2a8abdc908ef3cd933010facf4c08e96597e041fc359a62aa9` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.7.1/kubernetes-client-windows-386.tar.gz) | `bd3f99ead21f6c6c34dba7ef5c2d2308ef6770bcb255f286d9d5edbf33f5ccff` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.7.1/kubernetes-client-windows-amd64.tar.gz) | `e2578ca743bf03b367c473c32657cbed4cf27a12545841058f8bb873fb70e872` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.1/kubernetes-server-linux-amd64.tar.gz) | `467201c89d473bdec82a67c9b24453a2037eef1a1ed552f0dc55310355d21ea3` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.1/kubernetes-server-linux-arm64.tar.gz) | `1c1c5cad62423655b1e79bc831de5765cbe683aeef4efe9a823d2597334e19c1` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.7.1/kubernetes-server-linux-arm.tar.gz) | `17eee900df8ac9bbdd047b2f7d7cb2684820f71cb700dcb305e986acbddf66eb` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.1/kubernetes-server-linux-ppc64le.tar.gz) | `b1ae5f6d728cfe61b38acbc081e66ddf77ecc38ebdfdb42bfdd53e51fcd3aa2b` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.1/kubernetes-server-linux-s390x.tar.gz) | `20a273b20b10233fc2632d8a65e0b123fc87166e1f50171e7ede76c59f3118cd` + +### Node Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.1/kubernetes-node-linux-amd64.tar.gz) | `da0e6d5d6532ef7dba6e5db59e5bc142a52a0314bbb2c70e1fa8e73fe07d0e31` +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.1/kubernetes-node-linux-arm64.tar.gz) | `939b6f779257671a141ecb243bc01e9a5dfb1cd05808820044d915049c3f591a` +[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.7.1/kubernetes-node-linux-arm.tar.gz) | `512fddbbb7353d6dd02e51e79e05101ab857c09e4a4970404258c783ab094c95` +[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.1/kubernetes-node-linux-ppc64le.tar.gz) | `795150d92ef93aa53be2db245b9f88cc40fe0fd27045835a23c8eee830c419ba` +[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.1/kubernetes-node-linux-s390x.tar.gz) | `58c9b1ef8f8b30fd7061ac87e60b7be9eb79b5bd50c2eef1564838768e7b1d02` +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.7.1/kubernetes-node-windows-amd64.tar.gz) | `eae772609aa50d6a1f4f7cf6df5df2f56cbd438b9034f9be622bc0cfe1d13072` + +## Changelog since v1.7.0 + +### Other notable changes + +* Added new flag to `kubeadm init`: --node-name, that lets you specify the name of the Node object that will be created ([#48594](https://github.com/kubernetes/kubernetes/pull/48594), [@GheRivero](https://github.com/GheRivero)) +* Added new flag to `kubeadm join`: --node-name, that lets you specify the name of the Node object that's gonna be created ([#48538](https://github.com/kubernetes/kubernetes/pull/48538), [@GheRivero](https://github.com/GheRivero)) +* Fixes issue where you could not mount NFS or glusterFS volumes using hostnames on GCI/GKE with COS images. ([#42376](https://github.com/kubernetes/kubernetes/pull/42376), [@jingxu97](https://github.com/jingxu97)) +* Reduce amount of noise in Stackdriver Logging, generated by the event-exporter component in the fluentd-gcp addon. ([#48712](https://github.com/kubernetes/kubernetes/pull/48712), [@crassirostris](https://github.com/crassirostris)) +* Add generic NoSchedule toleration to fluentd in gcp config. ([#48182](https://github.com/kubernetes/kubernetes/pull/48182), [@gmarek](https://github.com/gmarek)) +* RBAC role and role-binding reconciliation now ensures namespaces exist when reconciling on startup. ([#48480](https://github.com/kubernetes/kubernetes/pull/48480), [@liggitt](https://github.com/liggitt)) +* Support NoSchedule taints correctly in DaemonSet controller. ([#48189](https://github.com/kubernetes/kubernetes/pull/48189), [@mikedanese](https://github.com/mikedanese)) +* kubeadm: Expose only the cluster-info ConfigMap in the kube-public ns ([#48050](https://github.com/kubernetes/kubernetes/pull/48050), [@luxas](https://github.com/luxas)) + + + +# v1.8.0-alpha.2 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/master/examples) + +## Downloads for v1.8.0-alpha.2 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.8.0-alpha.2/kubernetes.tar.gz) | `26d8079fa6b2d82682db809827d260bbab8e6d0f45e457260b8c5ce640432426` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.8.0-alpha.2/kubernetes-src.tar.gz) | `141e5c1bf66b69f3c22870b2ab6159abc3b38c12cc20f41c8193044e16df3205` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.8.0-alpha.2/kubernetes-client-darwin-386.tar.gz) | `6ca63da27ca0c1efa04d079d90eba7e6f01a6e9581317892538be6a97ee64d95` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.8.0-alpha.2/kubernetes-client-darwin-amd64.tar.gz) | `0bfbd97f7fb7ce5e1228134d8ca40168553d179bfa44cbd5e925a6543fb3bbf5` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.8.0-alpha.2/kubernetes-client-linux-386.tar.gz) | `29d395cc61c91c602e32412e51d4eae333942e6b9da235270768d11c040733c3` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.8.0-alpha.2/kubernetes-client-linux-amd64.tar.gz) | `b1172bbb1d80ba29612d4de08dc4942b40b0f7d580dbb8ed4423c221f78920fe` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.8.0-alpha.2/kubernetes-client-linux-arm64.tar.gz) | `994621c4a9d0644e3e8a4f12f563588036412bb72f0104b888f7a2605d3a8015` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.8.0-alpha.2/kubernetes-client-linux-arm.tar.gz) | `1e0dd9e4e9730a8cd54d8eb7036d5d7307bd930a91d0fcb105601b2d03fda15d` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.8.0-alpha.2/kubernetes-client-linux-ppc64le.tar.gz) | `bdcf58f419b42d83ce8adb350388c962b8934782294f9715b617cdbdf201cc36` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.8.0-alpha.2/kubernetes-client-linux-s390x.tar.gz) | `5c58217cffb34043fae951222bfd429165c68439f590c8fb8e33e54fe1cab0de` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.8.0-alpha.2/kubernetes-client-windows-386.tar.gz) | `f78ec125f734433c9fc75a9d35dc7bdfa6d145f1cc071ff2e3a5435beef3368f` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.8.0-alpha.2/kubernetes-client-windows-amd64.tar.gz) | `78dca9aadc140e2868b0a3d1a77b5058e22f24710f9c7956d755b473b575bb9d` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.8.0-alpha.2/kubernetes-server-linux-amd64.tar.gz) | `802bb71cf19147857a50e842a00d50641f78fec5c5791a524639f7af70f9e1d4` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.8.0-alpha.2/kubernetes-server-linux-arm64.tar.gz) | `b8f15c32320188981d5e75c474d4e826e45f59083eb66304151da112fb3052b1` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.8.0-alpha.2/kubernetes-server-linux-arm.tar.gz) | `8f800befc32d8402a581c47254db921d54caa31c50513c257b251435756918f1` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.8.0-alpha.2/kubernetes-server-linux-ppc64le.tar.gz) | `a406bd0aaa92633dbb43216312971164b0230ea01c77679d12b9ffc873956d0d` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.8.0-alpha.2/kubernetes-server-linux-s390x.tar.gz) | `8e038b4ccdfc89a08204927c8097a51bd9e786a97c2f9d73fca763ebee6c2373` + +### Node Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.8.0-alpha.2/kubernetes-node-linux-amd64.tar.gz) | `1a9725cfb55991680fc75cb862d8a74d76f453be9e9f8ad043d62d5911ab50b9` +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.8.0-alpha.2/kubernetes-node-linux-arm64.tar.gz) | `44fbdd86048bea2cb3d2d6ec1b6cb2c4ae19cb32f6df28e15392cd7f028a4350` +[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.8.0-alpha.2/kubernetes-node-linux-arm.tar.gz) | `76d9d36aa182fb93aab7a01f22f7a008ad2906a6224b4c009074100676403337` +[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.8.0-alpha.2/kubernetes-node-linux-ppc64le.tar.gz) | `07327ce6fe78bbae3d34b185b54ea0204bf875df488f0293ee1271599189160d` +[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.8.0-alpha.2/kubernetes-node-linux-s390x.tar.gz) | `e84a8c638834c435f82560b86f1a14ec861a8fc967a7cd7055ab86526ce744d0` +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.8.0-alpha.2/kubernetes-node-windows-amd64.tar.gz) | `f0f69dc70751e3be2d564aa272f7fe67e86e91c7de3034776b98faddef51a73d` + +## Changelog since v1.7.0 + +### Action Required + +* The deprecated ThirdPartyResource (TPR) API has been removed. To avoid losing your TPR data, you must [migrate to CustomResourceDefinition](https://kubernetes.io/docs/tasks/access-kubernetes-api/migrate-third-party-resource/) before upgrading. ([#48353](https://github.com/kubernetes/kubernetes/pull/48353), [@deads2k](https://github.com/deads2k)) + +### Other notable changes + +* Removed scheduler dependencies to testapi. ([#48405](https://github.com/kubernetes/kubernetes/pull/48405), [@k82cn](https://github.com/k82cn)) +* kubeadm: Fix a bug where `kubeadm join` would wait 5 seconds without doing anything. Now `kubeadm join` executes the tasks immediately. ([#48737](https://github.com/kubernetes/kubernetes/pull/48737), [@mattmoyer](https://github.com/mattmoyer)) +* Reduce amount of noise in Stackdriver Logging, generated by the event-exporter component in the fluentd-gcp addon. ([#48712](https://github.com/kubernetes/kubernetes/pull/48712), [@crassirostris](https://github.com/crassirostris)) +* To allow the userspace proxy to work correctly on multi-interface hosts when using the non-default-route interface, you may now set the `bindAddress` configuration option to an IP address assigned to a network interface. The proxy will use that IP address for any required NAT operations instead of the IP address of the interface which has the default route. ([#48613](https://github.com/kubernetes/kubernetes/pull/48613), [@dcbw](https://github.com/dcbw)) +* Move Mesos Cloud Provider out of Kubernetes Repo ([#47232](https://github.com/kubernetes/kubernetes/pull/47232), [@gyliu513](https://github.com/gyliu513)) +* - kubeadm now can accept versions like "1.6.4" where previously it strictly required "v1.6.4" ([#48507](https://github.com/kubernetes/kubernetes/pull/48507), [@kad](https://github.com/kad)) +* kubeadm: Implementing the certificates phase fully ([#48196](https://github.com/kubernetes/kubernetes/pull/48196), [@fabriziopandini](https://github.com/fabriziopandini)) +* Added case on 'terminated-but-not-yet-deleted' for Admit. ([#48322](https://github.com/kubernetes/kubernetes/pull/48322), [@k82cn](https://github.com/k82cn)) +* `kubectl run --env` no longer supports CSV parsing. To provide multiple env vars, use the `--env` flag multiple times instead of having env vars separated by commas. E.g. `--env ONE=1 --env TWO=2` instead of `--env ONE=1,TWO=2`. ([#47460](https://github.com/kubernetes/kubernetes/pull/47460), [@mengqiy](https://github.com/mengqiy)) +* Local storage teardown fix ([#48402](https://github.com/kubernetes/kubernetes/pull/48402), [@ianchakeres](https://github.com/ianchakeres)) +* support json output for log backend of advanced audit ([#48605](https://github.com/kubernetes/kubernetes/pull/48605), [@CaoShuFeng](https://github.com/CaoShuFeng)) +* Requests with the query parameter `?watch=` are treated by the API server as a request to watch, but authorization and metrics were not correctly identifying those as watch requests, instead grouping them as list calls. ([#48583](https://github.com/kubernetes/kubernetes/pull/48583), [@smarterclayton](https://github.com/smarterclayton)) +* As part of the NetworkPolicy "v1" changes, it is also now ([#47123](https://github.com/kubernetes/kubernetes/pull/47123), [@danwinship](https://github.com/danwinship)) + * possible to update the spec field of an existing + * NetworkPolicy. (Previously you had to delete and recreate a + * NetworkPolicy if you wanted to change it.) +* Fix udp service blackhole problem when number of backends changes from 0 to non-0 ([#48524](https://github.com/kubernetes/kubernetes/pull/48524), [@freehan](https://github.com/freehan)) +* kubeadm: Make self-hosting work by using DaemonSets and split it out to a phase that can be invoked via the CLI ([#47435](https://github.com/kubernetes/kubernetes/pull/47435), [@luxas](https://github.com/luxas)) +* Added new flag to `kubeadm join`: --node-name, that lets you specify the name of the Node object that's gonna be created ([#48538](https://github.com/kubernetes/kubernetes/pull/48538), [@GheRivero](https://github.com/GheRivero)) +* Fix Audit-ID header key ([#48492](https://github.com/kubernetes/kubernetes/pull/48492), [@CaoShuFeng](https://github.com/CaoShuFeng)) +* Checked container spec when killing container. ([#48194](https://github.com/kubernetes/kubernetes/pull/48194), [@k82cn](https://github.com/k82cn)) +* Fix kubectl describe for pods with controllerRef ([#45467](https://github.com/kubernetes/kubernetes/pull/45467), [@ddysher](https://github.com/ddysher)) +* Skip errors when unregistering juju kubernetes-workers ([#48144](https://github.com/kubernetes/kubernetes/pull/48144), [@ktsakalozos](https://github.com/ktsakalozos)) +* Configures the Juju Charm code to run kube-proxy with conntrack-max-per-core set to 0 when in an lxc as a workaround for issues when mounting /sys/module/nf_conntrack/parameters/hashsize ([#48450](https://github.com/kubernetes/kubernetes/pull/48450), [@wwwtyro](https://github.com/wwwtyro)) +* Group and order imported packages. ([#48399](https://github.com/kubernetes/kubernetes/pull/48399), [@k82cn](https://github.com/k82cn)) +* RBAC role and role-binding reconciliation now ensures namespaces exist when reconciling on startup. ([#48480](https://github.com/kubernetes/kubernetes/pull/48480), [@liggitt](https://github.com/liggitt)) +* Fix charms leaving services running after remove-unit ([#48446](https://github.com/kubernetes/kubernetes/pull/48446), [@Cynerva](https://github.com/Cynerva)) +* Added helper funcs to schedulercache.Resource. ([#46926](https://github.com/kubernetes/kubernetes/pull/46926), [@k82cn](https://github.com/k82cn)) +* When performing a GET then PUT, the kube-apiserver must write the canonical representation of the object to etcd if the current value does not match. That allows external agents to migrate content in etcd from one API version to another, across different storage types, or across varying encryption levels. This fixes a bug introduced in 1.5 where we unintentionally stopped writing the newest data. ([#48394](https://github.com/kubernetes/kubernetes/pull/48394), [@smarterclayton](https://github.com/smarterclayton)) +* Fixed kubernetes charms not restarting services after snap upgrades ([#48440](https://github.com/kubernetes/kubernetes/pull/48440), [@Cynerva](https://github.com/Cynerva)) +* Fix: namespace-create have kubectl in path ([#48439](https://github.com/kubernetes/kubernetes/pull/48439), [@ktsakalozos](https://github.com/ktsakalozos)) +* add validate for advanced audit policy ([#47784](https://github.com/kubernetes/kubernetes/pull/47784), [@CaoShuFeng](https://github.com/CaoShuFeng)) +* Support NoSchedule taints correctly in DaemonSet controller. ([#48189](https://github.com/kubernetes/kubernetes/pull/48189), [@mikedanese](https://github.com/mikedanese)) +* Adds configuration option for Swift object store container name to OpenStack Heat provider. ([#48281](https://github.com/kubernetes/kubernetes/pull/48281), [@hogepodge](https://github.com/hogepodge)) +* Allow the system:heapster ClusterRole read access to deployments ([#48357](https://github.com/kubernetes/kubernetes/pull/48357), [@faraazkhan](https://github.com/faraazkhan)) +* Ensure get_password is accessing a file that exists. ([#48351](https://github.com/kubernetes/kubernetes/pull/48351), [@ktsakalozos](https://github.com/ktsakalozos)) +* GZip openapi schema if accepted by client ([#48151](https://github.com/kubernetes/kubernetes/pull/48151), [@apelisse](https://github.com/apelisse)) +* Fixes issue where you could not mount NFS or glusterFS volumes using hostnames on GCI/GKE with COS images. ([#42376](https://github.com/kubernetes/kubernetes/pull/42376), [@jingxu97](https://github.com/jingxu97)) +* Previously a deleted service account token secret would be considered valid until it was reaped. Now it is invalid as soon as the deletionTimestamp is set. ([#48343](https://github.com/kubernetes/kubernetes/pull/48343), [@deads2k](https://github.com/deads2k)) +* Securing the cluster created by Juju ([#47835](https://github.com/kubernetes/kubernetes/pull/47835), [@ktsakalozos](https://github.com/ktsakalozos)) +* addon-resizer flapping behavior was removed. ([#46850](https://github.com/kubernetes/kubernetes/pull/46850), [@x13n](https://github.com/x13n)) +* Change default `httpGet` probe `User-Agent` to `kube-probe/<version major.minor>` if none specified, overriding the default Go `User-Agent`. ([#47729](https://github.com/kubernetes/kubernetes/pull/47729), [@paultyng](https://github.com/paultyng)) +* Registries backed by the generic Store's `Update` implementation support delete-on-update, which allows resources to be automatically deleted during an update provided: ([#48065](https://github.com/kubernetes/kubernetes/pull/48065), [@ironcladlou](https://github.com/ironcladlou)) + * Garbage collection is enabled for the Store + * The resource being updated has no finalizers + * The resource being updated has a non-nil DeletionGracePeriodSeconds equal to 0 + * With this fix, Custom Resource instances now also support delete-on-update behavior under the same circumstances. +* Fixes an edge case where "kubectl apply view-last-applied" would emit garbage if the data contained Go format codes. ([#45611](https://github.com/kubernetes/kubernetes/pull/45611), [@atombender](https://github.com/atombender)) +* Bumped Heapster to v1.4.0. ([#48205](https://github.com/kubernetes/kubernetes/pull/48205), [@piosz](https://github.com/piosz)) + * More details about the release https://github.com/kubernetes/heapster/releases/tag/v1.4.0 +* In GCE and in a "private master" setup, do not set the network-plugin provider to CNI by default if a network policy provider is given. ([#48004](https://github.com/kubernetes/kubernetes/pull/48004), [@dnardo](https://github.com/dnardo)) +* Add generic NoSchedule toleration to fluentd in gcp config. ([#48182](https://github.com/kubernetes/kubernetes/pull/48182), [@gmarek](https://github.com/gmarek)) +* kubeadm: Expose only the cluster-info ConfigMap in the kube-public ns ([#48050](https://github.com/kubernetes/kubernetes/pull/48050), [@luxas](https://github.com/luxas)) +* Fixes kubelet race condition in container manager. ([#48123](https://github.com/kubernetes/kubernetes/pull/48123), [@msau42](https://github.com/msau42)) +* Bump GCE ContainerVM to container-vm-v20170627 ([#48159](https://github.com/kubernetes/kubernetes/pull/48159), [@zmerlynn](https://github.com/zmerlynn)) +* Add PriorityClassName and Priority fields to PodSpec. ([#45610](https://github.com/kubernetes/kubernetes/pull/45610), [@bsalamat](https://github.com/bsalamat)) +* Add a failsafe for etcd not returning a connection string ([#48054](https://github.com/kubernetes/kubernetes/pull/48054), [@ktsakalozos](https://github.com/ktsakalozos)) +* Fix fluentd-gcp configuration to facilitate JSON parsing ([#48139](https://github.com/kubernetes/kubernetes/pull/48139), [@crassirostris](https://github.com/crassirostris)) +* Setting env var ENABLE_BIG_CLUSTER_SUBNETS=true will allow kube-up.sh to start clusters bigger that 4095 Nodes on GCE. ([#47513](https://github.com/kubernetes/kubernetes/pull/47513), [@gmarek](https://github.com/gmarek)) +* When determining the default external host of the kube apiserver, any configured cloud provider is now consulted ([#47038](https://github.com/kubernetes/kubernetes/pull/47038), [@yastij](https://github.com/yastij)) +* Updated comments for functions. ([#47242](https://github.com/kubernetes/kubernetes/pull/47242), [@k82cn](https://github.com/k82cn)) +* Fix setting juju worker labels during deployment ([#47178](https://github.com/kubernetes/kubernetes/pull/47178), [@ktsakalozos](https://github.com/ktsakalozos)) +* `kubefed init` correctly checks for RBAC API enablement. ([#48077](https://github.com/kubernetes/kubernetes/pull/48077), [@liggitt](https://github.com/liggitt)) +* The garbage collector now cascades deletion properly when deleting an object with propagationPolicy="background". This resolves issue [[#44046](https://github.com/kubernetes/kubernetes/pull/44046)](https://github.com/kubernetes/kubernetes/issues/44046), so that when a deployment is deleted with propagationPolicy="background", the garbage collector ensures dependent pods are deleted as well. ([#44058](https://github.com/kubernetes/kubernetes/pull/44058), [@caesarxuchao](https://github.com/caesarxuchao)) +* Fix restart action on juju kubernetes-master ([#47170](https://github.com/kubernetes/kubernetes/pull/47170), [@ktsakalozos](https://github.com/ktsakalozos)) +* e2e: bump kubelet's resurce usage limit ([#47971](https://github.com/kubernetes/kubernetes/pull/47971), [@yujuhong](https://github.com/yujuhong)) +* Cluster Autoscaler 0.6 ([#48074](https://github.com/kubernetes/kubernetes/pull/48074), [@mwielgus](https://github.com/mwielgus)) +* Checked whether balanced Pods were created. ([#47488](https://github.com/kubernetes/kubernetes/pull/47488), [@k82cn](https://github.com/k82cn)) +* Update protobuf time serialization for a one second granularity ([#47975](https://github.com/kubernetes/kubernetes/pull/47975), [@deads2k](https://github.com/deads2k)) +* Bumped Heapster to v1.4.0-beta.0 ([#47961](https://github.com/kubernetes/kubernetes/pull/47961), [@piosz](https://github.com/piosz)) +* `kubectl api-versions` now always fetches information about enabled API groups and versions instead of using the local cache. ([#48016](https://github.com/kubernetes/kubernetes/pull/48016), [@liggitt](https://github.com/liggitt)) +* Removes alpha feature gate for affinity annotations. ([#47869](https://github.com/kubernetes/kubernetes/pull/47869), [@timothysc](https://github.com/timothysc)) +* Websocket requests may now authenticate to the API server by passing a bearer token in a websocket subprotocol of the form `base64url.bearer.authorization.k8s.io.<base64url-encoded-bearer-token>` ([#47740](https://github.com/kubernetes/kubernetes/pull/47740), [@liggitt](https://github.com/liggitt)) +* Update cadvisor to v0.26.1 ([#47940](https://github.com/kubernetes/kubernetes/pull/47940), [@Random-Liu](https://github.com/Random-Liu)) +* Bump up npd version to v0.4.1 ([#47892](https://github.com/kubernetes/kubernetes/pull/47892), [@ajitak](https://github.com/ajitak)) +* Allow StorageClass Ceph RBD to specify image format and image features. ([#45805](https://github.com/kubernetes/kubernetes/pull/45805), [@weiwei04](https://github.com/weiwei04)) +* Removed mesos related labels. ([#46824](https://github.com/kubernetes/kubernetes/pull/46824), [@k82cn](https://github.com/k82cn)) +* Add RBAC support to fluentd-elasticsearch cluster addon ([#46203](https://github.com/kubernetes/kubernetes/pull/46203), [@simt2](https://github.com/simt2)) +* Avoid redundant copying of tars during kube-up for gce if the same file already exists ([#46792](https://github.com/kubernetes/kubernetes/pull/46792), [@ianchakeres](https://github.com/ianchakeres)) +* container runtime version has been added to the output of `kubectl get nodes -o=wide` as `CONTAINER-RUNTIME` ([#46646](https://github.com/kubernetes/kubernetes/pull/46646), [@rickypai](https://github.com/rickypai)) +* cAdvisor binds only to the interface that kubelet is running on instead of all interfaces. ([#47195](https://github.com/kubernetes/kubernetes/pull/47195), [@dims](https://github.com/dims)) +* The schema of the API that are served by the kube-apiserver, together with a small amount of generated code, are moved to k8s.io/api (https://github.com/kubernetes/api). ([#44784](https://github.com/kubernetes/kubernetes/pull/44784), [@caesarxuchao](https://github.com/caesarxuchao)) + + + +# v1.7.0 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.7/examples) + +## Downloads for v1.7.0 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.7.0/kubernetes.tar.gz) | `947f1dd9a9b6b427faac84067a30c86e83e6391eb42f09ddcc50a8694765c31a` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.7.0/kubernetes-src.tar.gz) | `d3d8b0bfc31164dd703b38d8484cfed7981cacd1e496731880afa87f8bf39aac` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.7.0/kubernetes-client-darwin-386.tar.gz) | `da298e24318e57ac8a558c390117bd7e9e596b3bdf1c5960979898fefe6c5c88` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.7.0/kubernetes-client-darwin-amd64.tar.gz) | `c22f72e1592731155db5b05d0d660f1d7314288cb020f7980e2a109d9e7ba0e5` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.7.0/kubernetes-client-linux-386.tar.gz) | `fc8e90e96360c3a2c8ec56903ab5acde1dffa4d641e1ee27b804ee6d8e824cf6` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.0/kubernetes-client-linux-amd64.tar.gz) | `8b3ed03f8a4b3a1ec124abde01632ee6dcec9daf9376f0288fd7500b5173981c` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.0/kubernetes-client-linux-arm64.tar.gz) | `8930c74dab9ada31e6994f0dc3fb22d41a602a2880b6b17112718ce73eac0574` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.7.0/kubernetes-client-linux-arm.tar.gz) | `20a6f4645cab3c0aef72f849ae90b2691605fd3f670ce36cc8aa11aef31c6edb` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.0/kubernetes-client-linux-ppc64le.tar.gz) | `509e214d55e8df1906894cbdc166e791761a3b82a52bcea0de65ceca3143c8b5` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.0/kubernetes-client-linux-s390x.tar.gz) | `fd39f47b691fc608f2ea3fed35408dd4c0b1d198605ec17363b0987b123a4702` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.7.0/kubernetes-client-windows-386.tar.gz) | `d9b72cfeefee0cd2db5f6a388bdb9da1e33514498f4d88be1b04282db5bfbd3d` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.7.0/kubernetes-client-windows-amd64.tar.gz) | `c536952bd29a7ae12c8fa148d592cc3c353dea4d0079e8497edaf8a759a16006` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.0/kubernetes-server-linux-amd64.tar.gz) | `175fc9360d4f26b5f60b467798d851061f01d0ca555c254ef44a8a9822cf7560` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.0/kubernetes-server-linux-arm64.tar.gz) | `f1e039e0e2923d1ea02fd76453aa51715ca83c5c26ca1a761ace2c717b79154f` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.7.0/kubernetes-server-linux-arm.tar.gz) | `48dc95e5230d7a44b64b379f9cf2e1ec72b7c4c7c62f4f3e92a73076ad6376db` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.0/kubernetes-server-linux-ppc64le.tar.gz) | `dc079cd18333c201cfd0f5b0e93e602d020a9e665d8c13968170a2cd89eebeb4` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.0/kubernetes-server-linux-s390x.tar.gz) | `fe6674e7d69aeffd522e543e957897e2cb943e82d5ccd368ccb9009e1128273f` + +### Node Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.0/kubernetes-node-linux-amd64.tar.gz) | `6c6cece62bad5bfeaf4a4b14e93c9ba99c96dc82b7855a2214cdf37a65251de8` +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.0/kubernetes-node-linux-arm64.tar.gz) | `dd75dc044fb1f337b60cb4b27c9bbdca4742d8bc0a1d03d13553a1b8fc593e98` +[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.7.0/kubernetes-node-linux-arm.tar.gz) | `c5d832c93c24d77414a880d8b7c4fac9a7443305e8e5c704f637ff023ff56f94` +[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.0/kubernetes-node-linux-ppc64le.tar.gz) | `649813a257353c5b85605869e33aeeb0c070e64e6fee18bc9c6e70472aa05677` +[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.0/kubernetes-node-linux-s390x.tar.gz) | `5ca0a7e9e90b2de7aff7bbdc84f662140ce847ea46cdb78802ce75459e0cc043` +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.7.0/kubernetes-node-windows-amd64.tar.gz) | `4b84b0025aff1d4406f3e5cd5fa86940f594e3ec6e1d12d3ce1eea5f5b3fc55d` + +## **Major Themes** + +Kubernetes 1.7 is a milestone release that adds security, stateful application, and extensibility features motivated by widespread production use of Kubernetes. + +Security enhancements in this release include encrypted secrets (alpha), network policy for pod-to-pod communication, the node authorizer to limit Kubelet access to API resources, and Kubelet client / server TLS certificate rotation (alpha). + +Major features for stateful applications include automated updates to StatefulSets, enhanced updates for DaemonSets, a burst mode for faster StatefulSets scaling, and (alpha) support for local storage. + +Extensibility features include API aggregation (beta), CustomResourceDefinitions (beta) in favor of ThirdPartyResources, support for extensible admission controllers (alpha), pluggable cloud providers (alpha), and container runtime interface (CRI) enhancements. + +## **Action Required Before Upgrading** + +### Network + +* NetworkPolicy has been promoted from extensions/v1beta1 to the new networking.k8s.io/v1 API group. The structure remains unchanged from the v1beta1 API. The net.beta.kubernetes.io/network-policy annotation on Namespaces (used to opt in to isolation) has been removed. Instead, isolation is now determined on a per-pod basis. A NetworkPolicy may target a pod for isolation by including the pod in its spec.podSelector. Targeted Pods accept the traffic specified in the respective NetworkPolicy (and nothing else). Pods not targeted by any NetworkPolicy accept all traffic by default. ([#39164](https://github.com/kubernetes/kubernetes/pull/39164), [@danwinship](https://github.com/danwinship)) + + **Action Required:** When upgrading to Kubernetes 1.7 (and a [network plugin](https://kubernetes.io/docs/tasks/administer-cluster/declare-network-policy/) that supports the new NetworkPolicy v1 semantics), you should consider the following. + + The v1beta1 API used an annotation on Namespaces to activate the DefaultDeny policy for an entire Namespace. To activate default deny in the v1 API, you can create a NetworkPolicy that matches all Pods but does not allow any traffic: + + ```yaml + kind: NetworkPolicy + apiVersion: networking.k8s.io/v1 + metadata: + name: default-deny + spec: + podSelector: + ``` + + This will ensure that Pods that aren't matched by any other NetworkPolicy will continue to be fully-isolated, as they were in v1beta1. + + In Namespaces that previously did not have the "DefaultDeny" annotation, you should delete any existing NetworkPolicy objects. These had no effect in the v1beta1 API, but with v1 semantics they might cause some traffic to be unintentionally blocked. + + +### Storage + +* Alpha volume provisioning is removed and default storage class should be used instead. ([#44090](https://github.com/kubernetes/kubernetes/pull/44090), [@NickrenREN](https://github.com/NickrenREN)) + +* Portworx volume driver no longer has to run on the master. ([#45518](https://github.com/kubernetes/kubernetes/pull/45518), [@harsh-px](https://github.com/harsh-px)) + +* Default behavior in Cinder storageclass is changed. If availability is not specified, the zone is chosen by algorithm. It makes possible to spread stateful pods across many zones. ([#44798](https://github.com/kubernetes/kubernetes/pull/44798), [@zetaab](https://github.com/zetaab)) + +* PodSpecs containing parent directory references such as `..` (for example, `../bar`) in hostPath volume path or in volumeMount subpaths must be changed to the simple absolute path. Backsteps `..` are no longer allowed.([#47290](https://github.com/kubernetes/kubernetes/pull/47290), [@jhorwit2](https://github.com/jhorwit2)). + + +### API Machinery + +* The Namespace API object no longer supports the deletecollection operation. ([#46407](https://github.com/kubernetes/kubernetes/pull/46407), [@liggitt](https://github.com/liggitt)) + +* The following alpha API groups were unintentionally enabled by default in previous releases, and will no longer be enabled by default in v1.8: ([#47690](https://github.com/kubernetes/kubernetes/pull/47690), [@caesarxuchao](https://github.com/caesarxuchao)) + + * rbac.authorization.k8s.io/v1alpha1 + + * settings.k8s.io/v1alpha1 + + * If you wish to continue using them in v1.8, please enable them explicitly using the `--runtime-config` flag on the apiserver (for example, `--runtime-config="rbac.authorization.k8s.io/v1alpha1,settings.k8s.io/v1alpha1"`) + +* `cluster/update-storage-objects.sh` now supports updating StorageClasses in etcd to storage.k8s.io/v1. You must do this prior to upgrading to 1.8. ([#46116](https://github.com/kubernetes/kubernetes/pull/46116), [@ncdc](https://github.com/ncdc)) + + +### Controller Manager + +* kube-controller-manager has dropped support for the `--insecure-experimental-approve-all-kubelet-csrs-for-group` flag. It is accepted in 1.7, but ignored. Instead, the csrapproving controller uses authorization checks to determine whether to approve certificate signing requests: ([#45619](https://github.com/kubernetes/kubernetes/pull/45619), [@mikedanese](https://github.com/mikedanese)) + + * Before upgrading, users must ensure their controller manager will enable the csrapproving controller, create an RBAC ClusterRole and ClusterRoleBinding to approve CSRs for the same group, then upgrade. Example roles to enable the equivalent behavior can be found in the [TLS bootstrapping](https://kubernetes.io/docs/admin/kubelet-tls-bootstrapping/) documentation. + + +### kubectl (CLI) +* `kubectl create role` and `kubectl create clusterrole` invocations must be updated to specify multiple resource names as repeated `--resource-name` arguments instead of comma-separated arguments to a single `--resource-name` argument. E.g. `--resource-name=x,y` must become `--resource-name x --resource-name y` ([#44950](https://github.com/kubernetes/kubernetes/pull/44950), [@xilabao](https://github.com/xilabao)) + +* `kubectl create rolebinding` and `kubectl create clusterrolebinding` invocations must be updated to specify multiple subjects as repeated `--user`, `--group`, or `--serviceaccount` arguments instead of comma-separated arguments to a single `--user`, `--group`, or `--serviceaccount`. E.g. `--user=x,y` must become `--user x --user y` ([#43903](https://github.com/kubernetes/kubernetes/pull/43903), [@xilabao](https://github.com/xilabao)) + + +### kubeadm + +* kubeadm: Modifications to cluster-internal resources installed by kubeadm will be overwritten when upgrading from v1.6 to v1.7. ([#47081](https://github.com/kubernetes/kubernetes/pull/47081), [@luxas](https://github.com/luxas)) + +* kubeadm deb/rpm packages: cAdvisor doesn't listen on `0.0.0.0:4194` without authentication/authorization because of the possible information leakage. The cAdvisor API can still be accessed via `https://{node-ip}:10250/stats/`, though. ([kubernetes/release#356](https://github.com/kubernetes/release/pull/356), [@luxas](https://github.com/luxas)) + + +### Cloud Providers + +* Azure: Container permissions for provisioned volumes have changed to private. If you have existing Azure volumes that were created by Kubernetes v1.6.0-v1.6.5, you should change the permissions on them manually. ([#47605](https://github.com/kubernetes/kubernetes/pull/47605), [@brendandburns](https://github.com/brendandburns)) + +* GKE/GCE: New and upgraded 1.7 GCE/GKE clusters no longer have an RBAC ClusterRoleBinding that grants the cluster-admin ClusterRole to the default service account in the kube-system Namespace. ([#46750](https://github.com/kubernetes/kubernetes/pull/46750), [@cjcullen](https://github.com/cjcullen)). If this permission is still desired, run the following command to explicitly grant it, either before or after upgrading to 1.7: + ``` + kubectl create clusterrolebinding kube-system-default --serviceaccount=kube-system:default --clusterrole=cluster-admin + ``` + +## **Known Issues** + +Populated via [v1.7.x known issues / FAQ accumulator](https://github.com/kubernetes/kubernetes/issues/46733) + +* The kube-apiserver discovery APIs (for example, `/apis`) return information about the API groups being served, and can change dynamically. +During server startup, prior to the server reporting healthy (via `/healthz`), not all API groups may be reported. +Wait for the server to report healthy (via `/healthz`) before depending on the information provided by the discovery APIs. +Additionally, since the information returned from the discovery APIs may change dynamically, a cache of the results should not be considered authoritative. +ETag support is planned in a future version to facilitate client caching. +([#47977](https://github.com/kubernetes/kubernetes/pull/47977), [#44957](https://github.com/kubernetes/kubernetes/pull/44957)) + +* The DaemonSet controller will evict running Pods that do not tolerate the NoSchedule taint if the taint is added to a Node. There is an open PR ([#48189](https://github.com/kubernetes/kubernetes/pull/48189)) to resolve this issue, but as this issue also exists in 1.6, and as we do not wish to risk release stability by merging it directly prior to a release without sufficient testing, we have decided to defer merging the PR until the next point release for each minor version ([#48190](https://github.com/kubernetes/kubernetes/pull/48190)). + +* Protobuf serialization does not distinguish between `[]` and `null`. +API fields previously capable of storing and returning either `[]` and `null` via JSON API requests (for example, the Endpoints `subsets` field) +can now store only `null` when created using the protobuf content-type or stored in etcd using protobuf serialization (the default in 1.6). +JSON API clients should tolerate `null` values for such fields, and treat `null` and `[]` as equivalent in meaning unless specifically documented otherwise for a particular field. ([#44593](https://github.com/kubernetes/kubernetes/pull/44593)) + +* Local volume source paths that are directories and not mount points fail to unmount. A fix is in process ([#48331](https://github.com/kubernetes/kubernetes/issues/48331)). + +* Services of type LoadBalancer (on GCE/GKE) that have static IP addresses will cause the Service Controller to panic and thereby causing the kube-controller-manager to crash loop. +([#48848](https://github.com/kubernetes/kubernetes/issues/48848)) + +## **Deprecations** + +### Cluster provisioning scripts +* cluster/ubuntu: Removed due to [deprecation](https://github.com/kubernetes/kubernetes/tree/master/cluster#cluster-configuration) and lack of maintenance. ([#44344](https://github.com/kubernetes/kubernetes/pull/44344), [@mikedanese](https://github.com/mikedanese)) + +* cluster/aws: Removed due to [deprecation](https://github.com/kubernetes/kubernetes/pull/38772) and lack of maintenance. ([#42196](https://github.com/kubernetes/kubernetes/pull/42196), [@zmerlynn](https://github.com/zmerlynn)) + + +### Client libraries +* Swagger 1.2 spec (`/swaggerapi/*`) is deprecated. Please use OpenAPI instead. + +### DaemonSet +* DaemonSet’s spec.templateGeneration has been deprecated. ([#45924](https://github.com/kubernetes/kubernetes/pull/45924), [@janetkuo](https://github.com/janetkuo)) + +### kube-proxy +* In 1.7, the kube-proxy component has been converted to use a configuration file. The old flags still work in 1.7, but they are being deprecated and will be removed in a future release. Cluster administrators are advised to switch to using the configuration file, but no action is strictly necessary in 1.7. ([#34727](https://github.com/kubernetes/kubernetes/pull/34727), [@ncdc](https://github.com/ncdc)) + +### Namespace +* The Namespace API object no longer supports the deletecollection operation. ([#46407](https://github.com/kubernetes/kubernetes/pull/46407), [@liggitt](https://github.com/liggitt)) + + +### Scheduling +* If you are using `AffinityInAnnotations=true` in `--feature-gates`, then the 1.7 release is your last opportunity to convert from specifying affinity/anti-affinity using the scheduler.alpha.kubernetes.io/affinity annotation on Pods, to using the Affinity field of PodSpec. Support for the alpha version of node and pod affinity (which uses the scheduler.alpha.kubernetes.io/affinity annotations on Pods) is going away **in Kubernetes 1.8** (not this release, but the next release). If you have not enabled AffinityInAnnotations=true in `--feature-gates`, then this change does not affect you. + +## **Notable Features** + +Features for this release were tracked via the use of the [kubernetes/features](https://github.com/kubernetes/features) issues repo. Each Feature issue is owned by a Special Interest Group from [kubernetes/community](https://github.com/kubernetes/community) + +## Kubefed + +* Deprecate the `--secret-name` flag from `kubefed join`, instead generating the secret name arbitrarily. ([#42513](https://github.com/kubernetes/kubernetes/pull/42513), [@perotinus](https://github.com/perotinus)) + + +### **Kubernetes API** +#### User Provided Extensions +* [beta] ThirdPartyResource is deprecated. Please migrate to the successor, CustomResourceDefinition. For more information, see [Custom Resources](https://kubernetes.io/docs/concepts/api-extension/custom-resources/) and [Migrate a ThirdPartyResource to CustomResourceDefinition](https://kubernetes.io/docs/tasks/access-kubernetes-api/migrate-third-party-resource/). + +* [beta] User-provided apiservers can be aggregated (served along with) the rest of the Kubernetes API. See [Extending the Kubernetes API with the aggregation layer](https://kubernetes.io/docs/concepts/api-extension/apiserver-aggregation/), [Configure the aggregation layer](https://kubernetes.io/docs/tasks/access-kubernetes-api/configure-aggregation-layer/), and [Setup an extension API server](https://kubernetes.io/docs/tasks/access-kubernetes-api/setup-extension-api-server/). + +* [alpha] Adding admissionregistration API group which enables dynamic registration of initializers and external admission webhooks. ([#46294](https://github.com/kubernetes/kubernetes/pull/46294), [@caesarxuchao](https://github.com/caesarxuchao)) + + +### **Application Deployment** +#### StatefulSet +* [beta] StatefulSet supports [RollingUpdate](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#rolling-updates) and [OnDelete](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#on-delete) update strategies. + +* [alpha] StatefulSet authors should be able to relax the [ordering](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#orderedready-pod-management) and [parallelism](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#parallel-pod-management) policies for software that can safely support rapid, out-of-order changes. + +#### DaemonSet +* [beta] DaemonSet supports history and rollback. See [Performing a Rollback on a DaemonSet](https://kubernetes.io/docs/tasks/manage-daemon/rollback-daemon-set/). + +#### Deployments +* [beta] Deployments uses a hashing collision avoidance mechanism that ensures new rollouts will not block on hashing collisions anymore. ([kubernetes/features#287](https://github.com/kubernetes/features/issues/287)) + +#### PodDisruptionBudget +* [beta] PodDisruptionBudget has a new field MaxUnavailable, which allows users to specify the maximum number of disruptions that can be tolerated during eviction. For more information, see [Pod Disruptions](https://kubernetes.io/docs/concepts/workloads/pods/disruptions/) and [Specifying a Disruption Budget for your Application](https://kubernetes.io/docs/tasks/run-application/configure-pdb/). +* PodDisruptionBudget now uses [ControllerRef](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md) to make the right decisions about Pod eviction even if the built in application controllers have overlapping selectors. + +### **Security** +#### Admission Control +* [alpha] Add [extensible external admission control](https://kubernetes.io/docs/admin/extensible-admission-controllers/). + +#### TLS Bootstrapping +* [alpha] Rotation of the server TLS certificate on the kubelet. See [TLS bootstrapping - approval controller](https://kubernetes.io/docs/admin/kubelet-tls-bootstrapping/#approval-controller). + +* [alpha] Rotation of the client TLS certificate on the kubelet. See [TLS bootstrapping - kubelet configuration](https://kubernetes.io/docs/admin/kubelet-tls-bootstrapping/#kubelet-configuration). + +* [beta] [Kubelet TLS Bootstrap](https://kubernetes.io/docs/admin/kubelet-tls-bootstrapping/#kubelet-configuration) + +#### Audit Logging +* [alpha] Advanced Auditing enhances the Kubernetes API [audit logging](https://kubernetes.io/docs/tasks/debug-application-cluster/audit/#audit-logs) capabilities through a customizable policy, pluggable audit backends, and richer audit data. + +#### Encryption at Rest +* [alpha] Encrypt secrets stored in etcd. For more information, see [Securing a Cluster](https://kubernetes.io/docs/tasks/administer-cluster/securing-a-cluster/) and [Encrypting data at rest](https://kubernetes.io/docs/tasks/administer-cluster/encrypt-data/). + +#### Node Authorization +* [beta] A new Node authorization mode and NodeRestriction admission plugin, when used in combination, limit nodes' access to specific APIs, so that they may only modify their own Node API object, only modify Pod objects bound to themselves, and only retrieve secrets and configmaps referenced by pods bound to themselves. See [Using Node Authorization](https://kubernetes.io/docs/admin/authorization/node/) for more information. + + +### **Application Autoscaling** +#### Horizontal Pod Autoscaler +* [alpha] [HPA Status Conditions](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/#appendix-horizontal-pod-autoscaler-status-conditions). + + +### **Cluster Lifecycle** +#### kubeadm +* [alpha] Manual [upgrades for kubeadm from v1.6 to v1.7](https://kubernetes.io/docs/tasks/administer-cluster/kubeadm-upgrade-1-7/). Automated upgrades ([kubernetes/features#296](https://github.com/kubernetes/features/issues/296)) are targeted for v1.8. + +#### Cloud Provider Support +* [alpha] Improved support for out-of-tree and out-of-process cloud providers, a.k.a pluggable cloud providers. See [Build and Run cloud-controller-manager](https://kubernetes.io/docs/tasks/administer-cluster/running-cloud-controller) documentation. + + +### **Cluster Federation** +#### Placement Policy +* [alpha] The federation-apiserver now supports a SchedulingPolicy admission controller that enables policy-based control over placement of federated resources. For more information, see [Set up placement policies in Federation](https://kubernetes.io/docs/tasks/federation/set-up-placement-policies-federation/). + +#### Cluster Selection +* [alpha] Federation [ClusterSelector annotation](https://kubernetes.io/docs/tasks/administer-federation/cluster/#clusterselector-annotation) to direct objects to federated clusters with matching labels. + + +### **Instrumentation** +#### Core Metrics API +* [alpha] Introduces a lightweight monitoring component for serving the core resource metrics API used by the Horizontal Pod Autoscaler and other components ([kubernetes/features#271](https://github.com/kubernetes/features/issues/271)) + + +### **Internationalization** + +* Add Traditional Chinese translation for kubectl ([#46559](https://github.com/kubernetes/kubernetes/pull/46559), [@warmchang](https://github.com/warmchang)) + +* Add Japanese translation for kubectl ([#46756](https://github.com/kubernetes/kubernetes/pull/46756), [@girikuncoro](https://github.com/girikuncoro)) + +* Add Simplified Chinese translation for kubectl ([#45573](https://github.com/kubernetes/kubernetes/pull/45573), [@shiywang](https://github.com/shiywang)) + +### **kubectl (CLI)** +* Features + + * `kubectl logs` supports specifying a container name when using label selectors ([#44282](https://github.com/kubernetes/kubernetes/pull/44282), [@derekwaynecarr](https://github.com/derekwaynecarr)) + + * `kubectl rollout` supports undo and history for DaemonSet ([#46144](https://github.com/kubernetes/kubernetes/pull/46144), [@janetkuo](https://github.com/janetkuo)) + + * `kubectl rollout` supports status and history for StatefulSet ([#46669](https://github.com/kubernetes/kubernetes/pull/46669), [@kow3ns](https://github.com/kow3ns)). + + * Implement `kubectl get controllerrevisions` ([#46655](https://github.com/kubernetes/kubernetes/pull/46655), [@janetkuo](https://github.com/janetkuo)) + + * `kubectl create clusterrole` supports `--non-resource-url` ([#45809](https://github.com/kubernetes/kubernetes/pull/45809), [@CaoShuFeng](https://github.com/CaoShuFeng)) + + * `kubectl logs` and `kubectl attach` support specifying a wait timeout with `--pod-running-timeout` ([#41813](https://github.com/kubernetes/kubernetes/pull/41813), [@shiywang](https://github.com/shiywang)) + + * New commands + + * Add `kubectl config rename-context` ([#46114](https://github.com/kubernetes/kubernetes/pull/46114), [@arthur0](https://github.com/arthur0)) + + * Add `kubectl apply edit-last-applied` subcommand ([#42256](https://github.com/kubernetes/kubernetes/pull/42256), [@shiywang](https://github.com/shiywang)) + + * Strategic Merge Patch + + * Reference docs now display the patch type and patch merge key used by `kubectl apply` to merge and identify unique elements in arrays. + + * `kubectl edit` and `kubectl apply` will keep the ordering of elements in merged lists ([#45980](https://github.com/kubernetes/kubernetes/pull/45980), [@mengqiy](https://github.com/mengqiy)) + + * New patch directive (retainKeys) to specifying clearing fields missing from the request ([#44597](https://github.com/kubernetes/kubernetes/pull/44597), [@mengqiy](https://github.com/mengqiy)) + + * Open API now includes strategic merge patch tags (previously only in go struct tags) ([#44121](https://github.com/kubernetes/kubernetes/pull/44121), [@mbohlool](https://github.com/mbohlool)) + + * Plugins + + * Introduces the ability to extend kubectl by adding third-party plugins. Developer preview, please refer to the documentation for instructions about how to use it. ([#37499](https://github.com/kubernetes/kubernetes/pull/37499), [@fabianofranz](https://github.com/fabianofranz)) + + * Added support for a hierarchy of kubectl plugins (a tree of plugins as children of other plugins). ([#45981](https://github.com/kubernetes/kubernetes/pull/45981), [@fabianofranz](https://github.com/fabianofranz)) + + * Added exported env vars to kubectl plugins so that plugin developers have access to global flags, namespace, the plugin descriptor and the full path to the caller binary. + + * Enhancement + + * `kubectl auth can-i` now supports non-resource URLs ([#46432](https://github.com/kubernetes/kubernetes/pull/46432), [@CaoShuFeng](https://github.com/CaoShuFeng)) + + * `kubectl set selector` and `kubectl set subject` no longer print "running in local/dry-run mode..." at the top. The output can now be piped and interpretted as yaml or json ([#46507](https://github.com/kubernetes/kubernetes/pull/46507), [@bboreham](https://github.com/bboreham)) + + * When using an in-cluster client with an empty configuration, the `--namespace` flag is now honored ([#46299](https://github.com/kubernetes/kubernetes/pull/46299), [@ncdc](https://github.com/ncdc)) + + * The help message for missingResourceError is now generic ([#45582](https://github.com/kubernetes/kubernetes/pull/45582), [@CaoShuFeng](https://github.com/CaoShuFeng)) + + * `kubectl taint node` now supports label selectors ([#44740](https://github.com/kubernetes/kubernetes/pull/44740), [@ravisantoshgudimetla](https://github.com/ravisantoshgudimetla)) + + * `kubectl proxy --www` now logs a warning when the dir is invalid ([#44952](https://github.com/kubernetes/kubernetes/pull/44952), [@CaoShuFeng](https://github.com/CaoShuFeng)) + + * `kubectl taint` output has been enhanced with the operation ([#43171](https://github.com/kubernetes/kubernetes/pull/43171), [@ravisantoshgudimetla](https://github.com/ravisantoshgudimetla)) + + * kubectl `--user` and `--cluster` now support completion ([#44251](https://github.com/kubernetes/kubernetes/pull/44251), [@superbrothers](https://github.com/superbrothers)) + + * `kubectl config use-context` now supports completion ([#42336](https://github.com/kubernetes/kubernetes/pull/42336), [@superbrothers](https://github.com/superbrothers)) + + * `kubectl version` now supports `--output` ([#39858](https://github.com/kubernetes/kubernetes/pull/39858), [@alejandroEsc](https://github.com/alejandroEsc)) + + * `kubectl create configmap` has a new option `--from-env-file` that populates a configmap from file which follows a key=val format for each line. ([#38882](https://github.com/kubernetes/kubernetes/pull/38882), [@fraenkel](https://github.com/fraenkel)) + + * `kubectl create secret` has a new option `--from-env-file` that populates a configmap from file which follows a key=val format for each line. + + * Printing/describe + + * Print conditions of RC/RS in `kubectl describe` command. ([#44710](https://github.com/kubernetes/kubernetes/pull/44710), [@xiangpengzhao](https://github.com/xiangpengzhao)) + + * Improved output on `kubectl get` and `kubectl describe` for generic objects. ([#44222](https://github.com/kubernetes/kubernetes/pull/44222), [@fabianofranz](https://github.com/fabianofranz)) + + * In `kubectl describe`, find controllers with ControllerRef, instead of showing the original creator. ([#42849](https://github.com/kubernetes/kubernetes/pull/42849), [@janetkuo](https://github.com/janetkuo)) + + * `kubectl version` has new flag --output (=json or yaml) allowing result of the command to be parsed in either json format or yaml. ([#39858](https://github.com/kubernetes/kubernetes/pull/39858), [@alejandroEsc](https://github.com/alejandroEsc)) + + + * Bug fixes + + * Fix some false negatives in detection of meaningful conflicts during strategic merge patch with maps and lists. ([#43469](https://github.com/kubernetes/kubernetes/pull/43469), [@enisoc](https://github.com/enisoc)) + + * Fix false positive "meaningful conflict" detection for strategic merge patch with integer values. ([#44788](https://github.com/kubernetes/kubernetes/pull/44788), [@enisoc](https://github.com/enisoc)) + + * Restored the ability of kubectl running inside a pod to consume resource files specifying a different namespace than the one the pod is running in. ([#44862](https://github.com/kubernetes/kubernetes/pull/44862), [@liggitt](https://github.com/liggitt)) + + * Kubectl commands run inside a pod using a kubeconfig file now use the namespace specified in the kubeconfig file, instead of using the pod namespace. If no kubeconfig file is used, or the kubeconfig does not specify a namespace, the pod namespace is still used as a fallback. ([#44570](https://github.com/kubernetes/kubernetes/pull/44570), [@liggitt](https://github.com/liggitt)) + + * Fixed `kubectl cluster-info` dump to support multi-container pod. ([#44088](https://github.com/kubernetes/kubernetes/pull/44088), [@xingzhou](https://github.com/xingzhou)) + + * Kubectl will print a warning when deleting the current context ([#42538](https://github.com/kubernetes/kubernetes/pull/42538), [@adohe](https://github.com/adohe)) + + * Fix VolumeClaims/capacity in `kubectl describe statefulsets` output. ([#47573](https://github.com/kubernetes/kubernetes/pull/47573), [@k82cn](https://github.com/k82cn)) + + * Fixed the output of kubectl taint node command with minor improvements. ([#43171](https://github.com/kubernetes/kubernetes/pull/43171), [@ravisantoshgudimetla](https://github.com/ravisantoshgudimetla)) + + +### **Networking** +#### Network Policy +* [stable] [NetworkPolicy](https://kubernetes.io/docs/concepts/services-networking/network-policies/) promoted to GA. + * Additionally adds short name "netpol" for networkpolicies ([#42241](https://github.com/kubernetes/kubernetes/pull/42241), [@xiangpengzhao](https://github.com/xiangpengzhao)) + + +#### Load Balancing +* [stable] Source IP Preservation - change Cloud load-balancer strategy to health-checks and respond to health check only on nodes that host pods for the service. See [Create an External Load Balancer - Preserving the client source IP](https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip). + Two annotations have been promoted to API fields: + + * Service.Spec.ExternalTrafficPolicy was 'service.beta.kubernetes.io/external-traffic' annotation. + + * Service.Spec.HealthCheckNodePort was 'service.beta.kubernetes.io/healthcheck-nodeport' annotation. + +### **Node Components** +#### Container Runtime Interface +* [alpha] CRI validation testing, which provides a test framework and a suite of tests to validate that the CRI server implementation meets all the requirements. This allows the CRI runtime developers to verify that their runtime conforms to CRI, without needing to set up Kubernetes components or run Kubernetes end-to-end tests. ([docs](https://github.com/kubernetes/community/blob/master/contributors/devel/cri-validation.md) and [release notes](https://github.com/kubernetes-incubator/cri-tools/releases/tag/v0.1)) ([kubernetes/features#292](https://github.com/kubernetes/features/issues/292)) + +* [alpha] Adds support of container metrics in CRI ([docs PR](https://github.com/kubernetes/community/pull/742)) ([kubernetes/features#290](https://github.com/kubernetes/features/issues/290)) + +* [alpha] Integration with [containerd] (https://github.com/containerd/containerd) , which supports basic pod lifecycle and image management. ([docs](https://github.com/kubernetes-incubator/cri-containerd/blob/master/README.md) and [release notes](https://github.com/kubernetes-incubator/cri-containerd/releases/tag/v0.1.0)) ([kubernetes/features#286](https://github.com/kubernetes/features/issues/286)) + +* [GA] The Docker-CRI implementation is GA. The legacy, non-CRI Docker integration has been completely removed. + +* [beta] [CRI-O](https://github.com/kubernetes-incubator/cri-o) v1.0.0-alpha.0. It has passed all e2e tests. ([release notes](https://github.com/kubernetes-incubator/cri-o/releases/tag/v1.0.0-alpha.0)) + +* [beta] [Frakti](https://github.com/kubernetes/frakti) v1.0. It has passed all node conformance tests. ([release notes](https://github.com/kubernetes/frakti/releases/tag/v1.0)) + + + +### **Scheduling** +#### Scheduler Extender +* [alpha] Support for delegating pod binding to a scheduler extender ([kubernetes/features#270](https://github.com/kubernetes/features/issues/270)) + +### **Storage** +#### Local Storage +* [alpha] This feature adds capacity isolation support for local storage at node, container, and volume levels. See updated [Reserve Compute Resources for System Daemons](https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/) documentation. + +* [alpha] Make locally attached (non-network attached) storage available as a persistent volume source. For more information, see [Storage Volumes - local](https://kubernetes.io/docs/concepts/storage/volumes/#local). + +#### Volume Plugins +* [stable] Volume plugin for StorageOS provides highly-available cluster-wide persistent volumes from local or attached node storage. See [Persistent Volumes - StorageOS](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#storageos) and [Storage Volumes - StorageOS](https://kubernetes.io/docs/concepts/storage/volumes/#storageos). + +#### Metrics +* [stable] Add support for cloudprovider metrics for storage API calls. See [Controller manager metrics](https://kubernetes.io/docs/concepts/cluster-administration/controller-metrics/) for more information. + +### **Other notable changes** + +#### Admission plugin +* OwnerReferencesPermissionEnforcement admission plugin ignores pods/status. ([#45747](https://github.com/kubernetes/kubernetes/pull/45747), [@derekwaynecarr](https://github.com/derekwaynecarr)) + + +* Ignored mirror pods in PodPreset admission plugin. ([#45958](https://github.com/kubernetes/kubernetes/pull/45958), [@k82cn](https://github.com/k82cn)) + +#### API Machinery +* The protobuf serialization of API objects has been updated to store maps in a predictable order to ensure that the representation of that object does not change when saved into etcd. This prevents the same object from being seen as being modified, even when no values have changed. ([#47701](https://github.com/kubernetes/kubernetes/pull/47701), [@smarterclayton](https://github.com/smarterclayton)) + +* API resource discovery now includes the singularName used to refer to the resource. ([#43312](https://github.com/kubernetes/kubernetes/pull/43312), [@deads2k](https://github.com/deads2k)) + +* Enhance the garbage collection admission plugin so that a user who doesn't have delete permission of the owning object cannot modify the blockOwnerDeletion field of existing ownerReferences, or add new ownerReferences with blockOwnerDeletion=true ([#43876](https://github.com/kubernetes/kubernetes/pull/43876), [@caesarxuchao](https://github.com/caesarxuchao)) + +* Exec and portforward actions over SPDY now properly handle redirects sent by the Kubelet ([#44451](https://github.com/kubernetes/kubernetes/pull/44451), [@ncdc](https://github.com/ncdc)) + +* The proxy subresource APIs for nodes, services, and pods now support the HTTP PATCH method. ([#44929](https://github.com/kubernetes/kubernetes/pull/44929), [@liggitt](https://github.com/liggitt)) + +* The Categories []string field on discovered API resources represents the list of group aliases (e.g. "all") that each resource belongs to. ([#43338](https://github.com/kubernetes/kubernetes/pull/43338), [@fabianofranz](https://github.com/fabianofranz)) + +* [alpha] The Kubernetes API supports retrieving tabular output for API resources via a new mime-type application/json;as=Table;v=v1alpha1;g=meta.k8s.io. The returned object (if the server supports it) will be of type meta.k8s.io/v1alpha1 with Table, and contain column and row information related to the resource. Each row will contain information about the resource - by default it will be the object metadata, but callers can add the ?includeObject=Object query parameter and receive the full object. In the future kubectl will use this to retrieve the results of `kubectl get`. ([#40848](https://github.com/kubernetes/kubernetes/pull/40848), [@smarterclayton](https://github.com/smarterclayton)) + +* The behavior of some watch calls to the server when filtering on fields was incorrect. If watching objects with a filter, when an update was made that no longer matched the filter a DELETE event was correctly sent. However, the object that was returned by that delete was not the (correct) version before the update, but instead, the newer version. That meant the new object was not matched by the filter. This was a regression from behavior between cached watches on the server side and uncached watches, and thus broke downstream API clients. ([#46223](https://github.com/kubernetes/kubernetes/pull/46223), [@smarterclayton](https://github.com/smarterclayton)) + +* OpenAPI spec is now available in protobuf binary and gzip format (with ETag support) ([#45836](https://github.com/kubernetes/kubernetes/pull/45836), [@mbohlool](https://github.com/mbohlool)) + +* Updating apiserver to return UID of the deleted resource. Clients can use this UID to verify that the resource was deleted or waiting for finalizers. ([#45600](https://github.com/kubernetes/kubernetes/pull/45600), [@nikhiljindal](https://github.com/nikhiljindal)) + +* Fix incorrect conflict errors applying strategic merge patches to resources. ([#43871](https://github.com/kubernetes/kubernetes/pull/43871), [@liggitt](https://github.com/liggitt)) + +* Fix init container status reporting when active deadline is exceeded. ([#46305](https://github.com/kubernetes/kubernetes/pull/46305), [@sjenning](https://github.com/sjenning)) + +* Moved qos to api.helpers. ([#44906](https://github.com/kubernetes/kubernetes/pull/44906), [@k82cn](https://github.com/k82cn)) + +* Fix issue with the resource quota controller causing add quota to be resynced at the wrong ([#45685](https://github.com/kubernetes/kubernetes/pull/45685), [@derekwaynecarr](https://github.com/derekwaynecarr)) + +* Added Group/Version/Kind and Action extension to OpenAPI Operations ([#44787](https://github.com/kubernetes/kubernetes/pull/44787), [@mbohlool](https://github.com/mbohlool)) + +* Make clear that meta.KindToResource is only a guess ([#45272](https://github.com/kubernetes/kubernetes/pull/45272), [@sttts](https://github.com/sttts)) + +* Add APIService conditions ([#43301](https://github.com/kubernetes/kubernetes/pull/43301), [@deads2k](https://github.com/deads2k)) + +* Create and push a docker image for the cloud-controller-manager ([#45154](https://github.com/kubernetes/kubernetes/pull/45154), [@luxas](https://github.com/luxas)) + +* Deprecated Binding objects in 1.7. ([#47041](https://github.com/kubernetes/kubernetes/pull/47041), [@k82cn](https://github.com/k82cn)) + +* Adds the Categories []string field to API resources, which represents the list of group aliases (e.g. "all") that every resource belongs to. ([#43338](https://github.com/kubernetes/kubernetes/pull/43338), [@fabianofranz](https://github.com/fabianofranz)) + +* `--service-account-lookup` now defaults to true, requiring the Secret API object containing the token to exist in order for a service account token to be valid. This enables service account tokens to be revoked by deleting the Secret object containing the token. ([#44071](https://github.com/kubernetes/kubernetes/pull/44071), [@liggitt](https://github.com/liggitt)) + +* API Registration is now in beta. ([#45247](https://github.com/kubernetes/kubernetes/pull/45247), [@mbohlool](https://github.com/mbohlool)) + +* The Kubernetes API server now exits if it encounters a networking failure (e.g. the networking interface hosting its address goes away) to allow a process manager (systemd/kubelet/etc) to react to the problem. Previously the server would log the failure and try again to bind to its configured address:port. ([#42272](https://github.com/kubernetes/kubernetes/pull/42272), [@marun](https://github.com/marun)) + +* The Prometheus metrics for the kube-apiserver for tracking incoming API requests and latencies now return the subresource label for correctly attributing the type of API call. ([#46354](https://github.com/kubernetes/kubernetes/pull/46354), [@smarterclayton](https://github.com/smarterclayton)) + +* kube-apiserver now drops unneeded path information if an older version of Windows kubectl sends it. ([#44421](https://github.com/kubernetes/kubernetes/pull/44421), [@mml](https://github.com/mml)) + + +#### Application autoscaling +* Make "upscale forbidden window" and "downscale forbidden window" duration configurable in arguments of kube-controller-manager. ([#42101](https://github.com/kubernetes/kubernetes/pull/42101), [@Dmitry1987](https://github.com/Dmitry1987)) + +#### Application Deployment +* StatefulSetStatus now tracks replicas, readyReplicas, currentReplicas, and updatedReplicas. The semantics of replicas is now consistent with DaemonSet and ReplicaSet, and readyReplicas has the semantics that replicas did prior to 1.7 ([#46669](https://github.com/kubernetes/kubernetes/pull/46669), [@kow3ns](https://github.com/kow3ns)). + +* ControllerRevision type has been added for StatefulSet and DaemonSet history. Clients should not depend on the stability of this type as it may change, as necessary, in future releases to support StatefulSet and DaemonSet update and rollback. We enable this type as we do with beta features, because StatefulSet update and DaemonSet update are enabled. ([#45867](https://github.com/kubernetes/kubernetes/pull/45867), [@kow3ns](https://github.com/kow3ns)) + +* PodDisruptionBudget now uses ControllerRef to decide which controller owns a given Pod, so it doesn't get confused by controllers with overlapping selectors. ([#45003](https://github.com/kubernetes/kubernetes/pull/45003), [@krmayankk](https://github.com/krmayankk)) + +* Deployments are updated to use (1) a more stable hashing algorithm (fnv) than the previous one (adler) and (2) a hashing collision avoidance mechanism that will ensure new rollouts will not block on hashing collisions anymore. ([#44774](https://github.com/kubernetes/kubernetes/pull/44774), [@kargakis](https://github.com/kargakis))([kubernetes/features#287](https://github.com/kubernetes/features/issues/287)) + +* Deployments and DaemonSets rollouts are considered complete when all of the desired replicas are updated and available. This change affects `kubectl rollout status` and Deployment condition. ([#44672](https://github.com/kubernetes/kubernetes/pull/44672), [@kargakis](https://github.com/kargakis)) + +* Job controller now respects ControllerRef to avoid fighting over Pods. ([#42176](https://github.com/kubernetes/kubernetes/pull/42176), [@enisoc](https://github.com/enisoc)) + +* CronJob controller now respects ControllerRef to avoid fighting with other controllers. ([#42177](https://github.com/kubernetes/kubernetes/pull/42177), [@enisoc](https://github.com/enisoc)) + +#### Cluster Autoscaling +* Cluster Autoscaler 0.6. More information available [here](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/README.md). + +* cluster-autoscaler: Fix duplicate writing of logs. ([#45017](https://github.com/kubernetes/kubernetes/pull/45017), [@MaciekPytel](https://github.com/MaciekPytel)) + + +#### Cloud Provider Enhancement + +* AWS: + + * New 'service.beta.kubernetes.io/aws-load-balancer-extra-security-groups' Service annotation to specify extra Security Groups to be added to ELB created by AWS cloudprovider ([#45268](https://github.com/kubernetes/kubernetes/pull/45268), [@redbaron](https://github.com/redbaron)) + + * Clean up blackhole routes when using kubenet ([#47572](https://github.com/kubernetes/kubernetes/pull/47572), [@justinsb](https://github.com/justinsb)) + + * Maintain a cache of all instances, to fix problem with > 200 nodes with ELBs ([#47410](https://github.com/kubernetes/kubernetes/pull/47410), [@justinsb](https://github.com/justinsb)) + + * Avoid spurious ELB listener recreation - ignore case when matching protocol ([#47391](https://github.com/kubernetes/kubernetes/pull/47391), [@justinsb](https://github.com/justinsb)) + + * Allow configuration of a single security group for ELBs ([#45500](https://github.com/kubernetes/kubernetes/pull/45500), [@nbutton23](https://github.com/nbutton23)) + + * Remove check that forces loadBalancerSourceRanges to be 0.0.0.0/0. ([#38636](https://github.com/kubernetes/kubernetes/pull/38636), [@dhawal55](https://github.com/dhawal55)) + + * Allow setting KubernetesClusterID or KubernetesClusterTag in combination with VPC. ([#42512](https://github.com/kubernetes/kubernetes/pull/42512), [@scheeles](https://github.com/scheeles)) + + * Start recording cloud provider metrics for AWS ([#43477](https://github.com/kubernetes/kubernetes/pull/43477), [@gnufied](https://github.com/gnufied)) + + * AWS: Batch DescribeInstance calls with nodeNames to 150 limit, to stay within AWS filter limits. ([#47516](https://github.com/kubernetes/kubernetes/pull/47516), [@gnufied](https://github.com/gnufied)) + + * AWS: Process disk attachments even with duplicate NodeNames ([#47406](https://github.com/kubernetes/kubernetes/pull/47406), [@justinsb](https://github.com/justinsb)) + + * Allow configuration of a single security group for ELBs ([#45500](https://github.com/kubernetes/kubernetes/pull/45500), [@nbutton23](https://github.com/nbutton23)) + + * Fix support running the master with a different AWS account or even on a different cloud provider than the nodes. ([#44235](https://github.com/kubernetes/kubernetes/pull/44235), [@mrIncompetent](https://github.com/mrIncompetent)) + + * Support node port health check ([#43585](https://github.com/kubernetes/kubernetes/pull/43585), [@foolusion](https://github.com/foolusion)) + + * Support for ELB tagging by users ([#45932](https://github.com/kubernetes/kubernetes/pull/45932), [@lpabon](https://github.com/lpabon)) + +* Azure: + + * Add support for UDP ports ([#45523](https://github.com/kubernetes/kubernetes/pull/45523), [@colemickens](https://github.com/colemickens)) + + * Fix support for multiple loadBalancerSourceRanges ([#45523](https://github.com/kubernetes/kubernetes/pull/45523), [@colemickens](https://github.com/colemickens)) + + * Support the Service spec's sessionAffinity ([#45523](https://github.com/kubernetes/kubernetes/pull/45523), [@colemickens](https://github.com/colemickens)) + + * Added exponential backoff to Azure cloudprovider ([#46660](https://github.com/kubernetes/kubernetes/pull/46660), [@jackfrancis](https://github.com/jackfrancis)) + + * Add support for bring-your-own ip address for Services on Azure ([#42034](https://github.com/kubernetes/kubernetes/pull/42034), [@brendandburns](https://github.com/brendandburns)) + + * Add support for Azure internal load balancer ([#43510](https://github.com/kubernetes/kubernetes/pull/43510), [@karataliu](https://github.com/karataliu)) + + * Client poll duration is now 5 seconds ([#43699](https://github.com/kubernetes/kubernetes/pull/43699), [@colemickens](https://github.com/colemickens)) + + * Azure plugin for client auth ([#43987](https://github.com/kubernetes/kubernetes/pull/43987), [@cosmincojocar](https://github.com/cosmincojocar)) + + +* GCP: + + * Bump GLBC version to 0.9.5 - fixes [loss of manually modified GCLB health check settings](https://github.com/kubernetes/kubernetes/issues/47559) upon upgrade from pre-1.6.4 to either 1.6.4 or 1.6.5. ([#47567](https://github.com/kubernetes/kubernetes/pull/47567), [@nicksardo](https://github.com/nicksardo)) + + * [beta] Support creation of GCP Internal Load Balancers from Service objects ([#46663](https://github.com/kubernetes/kubernetes/pull/46663), [@nicksardo](https://github.com/nicksardo)) + + * GCE installs will now avoid IP masquerade for all RFC-1918 IP blocks, rather than just 10.0.0.0/8. This means that clusters can be created in 192.168.0.0./16 and 172.16.0.0/12 while preserving the container IPs (which would be lost before). ([#46473](https://github.com/kubernetes/kubernetes/pull/46473), [@thockin](https://github.com/thockin)) + + * The Calico version included in kube-up for GCE has been updated to v2.2. ([#38169](https://github.com/kubernetes/kubernetes/pull/38169), [@caseydavenport](https://github.com/caseydavenport)) + + * ip-masq-agent is now on by default for GCE ([#47794](https://github.com/kubernetes/kubernetes/pull/47794), [@dnardo](https://github.com/dnardo)) + + * Add ip-masq-agent addon to the addons folder which is used in GCE if `--non-masquerade-cidr` is set to 0/0 ([#46038](https://github.com/kubernetes/kubernetes/pull/46038), [@dnardo](https://github.com/dnardo)) + + * Enable kubelet csr bootstrap in GCE/GKE ([#40760](https://github.com/kubernetes/kubernetes/pull/40760), [@mikedanese](https://github.com/mikedanese)) + + * Adds support for allocation of pod IPs via IP aliases. ([#42147](https://github.com/kubernetes/kubernetes/pull/42147), [@bowei](https://github.com/bowei)) + + * gce kube-up: The Node authorization mode and NodeRestriction admission controller are now enabled ([#46796](https://github.com/kubernetes/kubernetes/pull/46796), [@mikedanese](https://github.com/mikedanese)) + + * Tokens retrieved from Google Cloud with application default credentials will not be cached if the client fails authorization ([#46694](https://github.com/kubernetes/kubernetes/pull/46694), [@matt-tyler](https://github.com/matt-tyler)) + + * Add metrics to all major gce operations {latency, errors} ([#44510](https://github.com/kubernetes/kubernetes/pull/44510), [@bowei](https://github.com/bowei)) + + * The new metrics are: + + * cloudprovider_gce_api_request_duration_seconds{request, region, zone} + + * cloudprovider_gce_api_request_errors{request, region, zone} + + * request is the specific function that is used. + + * region is the target region (Will be "<n/a>" if not applicable) + + * zone is the target zone (Will be "<n/a>" if not applicable) + + * Note: this fixes some issues with the previous implementation of metrics for disks: + + * Time duration tracked was of the initial API call, not the entire operation. + + * Metrics label tuple would have resulted in many independent histograms stored, one for each disk. (Did not aggregate well). + + * Fluentd now tolerates all NoExecute Taints when run in gcp configuration. ([#45715](https://github.com/kubernetes/kubernetes/pull/45715), [@gmarek](https://github.com/gmarek)) + + * Taints support in gce/salt startup scripts. ([#47632](https://github.com/kubernetes/kubernetes/pull/47632), [@mwielgus](https://github.com/mwielgus)) + + * GCE installs will now avoid IP masquerade for all RFC-1918 IP blocks, rather than just 10.0.0.0/8. This means that clusters can ([#46473](https://github.com/kubernetes/kubernetes/pull/46473), [@thockin](https://github.com/thockin)) be created in 192.168.0.0./16 and 172.16.0.0/12 while preserving the container IPs (which would be lost before). + + * Support running Ubuntu image on GCE node ([#44744](https://github.com/kubernetes/kubernetes/pull/44744), [@yguo0905](https://github.com/yguo0905)) + + * The gce metadata server can now be hidden behind a proxy, hiding the kubelet's token. ([#45565](https://github.com/kubernetes/kubernetes/pull/45565), [@Q-Lee](https://github.com/Q-Lee)) + +* OpenStack: + + * Fix issue during LB creation where ports were incorrectly assigned to a floating IP ([#44387](https://github.com/kubernetes/kubernetes/pull/44387), [@jamiehannaford](https://github.com/jamiehannaford)) + + * Openstack cinder v1/v2/auto API support ([#40423](https://github.com/kubernetes/kubernetes/pull/40423), [@mkutsevol](https://github.com/mkutsevol)) + + * OpenStack clusters can now specify whether worker nodes are assigned a floating IP ([#42638](https://github.com/kubernetes/kubernetes/pull/42638), [@jamiehannaford](https://github.com/jamiehannaford)) + + +* vSphere: + + * Fix volume detach on node failure. ([#45569](https://github.com/kubernetes/kubernetes/pull/45569), [@divyenpatel](https://github.com/divyenpatel)) + + * Report same Node IP as both internal and external. ([#45201](https://github.com/kubernetes/kubernetes/pull/45201), [@abrarshivani](https://github.com/abrarshivani)) + + * Filter out IPV6 node addresses. ([#45181](https://github.com/kubernetes/kubernetes/pull/45181), [@BaluDontu](https://github.com/BaluDontu)) + + * Fix fetching of VM UUID on Ubuntu 16.04 and Fedora. ([#45311](https://github.com/kubernetes/kubernetes/pull/45311), [@divyenpatel](https://github.com/divyenpatel)) + + +#### Cluster Provisioning +* Juju: + + * Add Kubernetes 1.6 support to Juju charms ([#44500](https://github.com/kubernetes/kubernetes/pull/44500), [@Cynerva](https://github.com/Cynerva)) + + * Add metric collection to charms for autoscaling + + * Update kubernetes-e2e charm to fail when test suite fails + + * Update Juju charms to use snaps + + * Add registry action to the kubernetes-worker charm + + * Add support for kube-proxy cluster-cidr option to kubernetes-worker charm + + * Fix kubernetes-master charm starting services before TLS certs are saved + + * Fix kubernetes-worker charm failures in LXD + + * Fix stop hook failure on kubernetes-worker charm + + * Fix handling of juju kubernetes-worker.restart-needed state + + * Fix nagios checks in charms + + * Enable GPU mode if GPU hardware detected ([#43467](https://github.com/kubernetes/kubernetes/pull/43467), [@tvansteenburgh](https://github.com/tvansteenburgh)) + + * Fix ceph-secret type to kubernetes.io/rbd in kubernetes-master charm ([#44635](https://github.com/kubernetes/kubernetes/pull/44635), [@Cynerva](https://github.com/Cynerva)) + + * Disallows installation of upstream docker from PPA in the Juju kubernetes-worker charm. ([#44681](https://github.com/kubernetes/kubernetes/pull/44681), [@wwwtyro](https://github.com/wwwtyro)) + + * Resolves juju vsphere hostname bug showing only a single node in a scaled node-pool. ([#44780](https://github.com/kubernetes/kubernetes/pull/44780), [@chuckbutler](https://github.com/chuckbutler)) + + * Fixes a bug in the kubernetes-worker Juju charm code that attempted to give kube-proxy more than one api endpoint. ([#44677](https://github.com/kubernetes/kubernetes/pull/44677), [@wwwtyro](https://github.com/wwwtyro)) + + * Added CIFS PV support for Juju Charms ([#45117](https://github.com/kubernetes/kubernetes/pull/45117), [@chuckbutler](https://github.com/chuckbutler)) + + * Fixes juju kubernetes master: 1. Get certs from a dead leader. 2. Append tokens. ([#43620](https://github.com/kubernetes/kubernetes/pull/43620), [@ktsakalozos](https://github.com/ktsakalozos)) + + * kubernetes-master juju charm properly detects etcd-scale events and reconfigures appropriately. ([#44967](https://github.com/kubernetes/kubernetes/pull/44967), [@chuckbutler](https://github.com/chuckbutler)) + + * Use correct option name in the kubernetes-worker layer registry action ([#44921](https://github.com/kubernetes/kubernetes/pull/44921), [@jacekn](https://github.com/jacekn)) + + * Send dns details only after cdk-addons are configured ([#44945](https://github.com/kubernetes/kubernetes/pull/44945), [@ktsakalozos](https://github.com/ktsakalozos)) + + * Added support to the pause action in the kubernetes-worker charm for new flag `--delete-local-data` ([#44931](https://github.com/kubernetes/kubernetes/pull/44931), [@chuckbutler](https://github.com/chuckbutler)) + + * Add namespace-{list, create, delete} actions to the kubernetes-master layer ([#44277](https://github.com/kubernetes/kubernetes/pull/44277), [@jacekn](https://github.com/jacekn)) + + * Using http2 in kubeapi-load-balancer to fix `kubectl exec` uses ([#43625](https://github.com/kubernetes/kubernetes/pull/43625), [@mbruzek](https://github.com/mbruzek)) + + + * Don't append :443 to registry domain in the kubernetes-worker layer registry action ([#45550](https://github.com/kubernetes/kubernetes/pull/45550), [@jacekn](https://github.com/jacekn)) + +* kubeadm + + * Enable the Node Authorizer/Admission plugin in v1.7 ([#46879](https://github.com/kubernetes/kubernetes/pull/46879), [@luxas](https://github.com/luxas)) + + * Users can now pass extra parameters to etcd in a kubeadm cluster ([#42246](https://github.com/kubernetes/kubernetes/pull/42246), [@jamiehannaford](https://github.com/jamiehannaford)) + + * Make kubeadm use the new CSR approver in v1.7 ([#46864](https://github.com/kubernetes/kubernetes/pull/46864), [@luxas](https://github.com/luxas)) + + * Allow enabling multiple authorization modes at the same time ([#42557](https://github.com/kubernetes/kubernetes/pull/42557), [@xilabao](https://github.com/xilabao)) + + * add proxy client-certs to kube-apiserver to allow it to proxy aggregated api servers ([#43715](https://github.com/kubernetes/kubernetes/pull/43715), [@deads2k](https://github.com/deads2k))* CentOS provider + +* hyperkube + + * The hyperkube image has been slimmed down and no longer includes addon manifests and other various scripts. These were introduced for the now removed docker-multinode setup system. ([#44555](https://github.com/kubernetes/kubernetes/pull/44555), [@luxas](https://github.com/luxas)) + +* Support secure etcd cluster for centos provider. ([#42994](https://github.com/kubernetes/kubernetes/pull/42994), [@Shawyeok](https://github.com/Shawyeok)) + +* Update to kube-addon-manager:v6.4-beta.2: kubectl v1.6.4 and refreshed base images ([#47389](https://github.com/kubernetes/kubernetes/pull/47389), [@ixdy](https://github.com/ixdy)) + +* Remove Initializers from admission-control in kubernetes-master charm for pre-1.7 ([#46987](https://github.com/kubernetes/kubernetes/pull/46987), [@Cynerva](https://github.com/Cynerva)) + +* Added state guards to the idle_status messaging in the kubernetes-master charm to make deployment faster on initial deployment. ([#47183](https://github.com/kubernetes/kubernetes/pull/47183), [@chuckbutler](https://github.com/chuckbutler)) + +#### Cluster federation +* Features: + + * Adds annotations to all Federation objects created by kubefed. ([#42683](https://github.com/kubernetes/kubernetes/pull/42683), [@perotinus](https://github.com/perotinus)) + + * Mechanism of adding `federation domain maps` to kube-dns deployment via `--federations` flag is superseded by adding/updating `federations` key in `kube-system/kube-dns` configmap. If user is using kubefed tool to join cluster federation, adding federation domain maps to kube-dns is already taken care by `kubefed join` and does not need further action. + + * Prints out status updates when running `kubefed init` ([#41849](https://github.com/kubernetes/kubernetes/pull/41849), [@perotinus](https://github.com/perotinus)) + + * `kubefed init` now supports overriding the default etcd image name with the `--etcd-image` parameter. ([#46247](https://github.com/kubernetes/kubernetes/pull/46247), [@marun](https://github.com/marun)) + + * kubefed will now configure NodeInternalIP as the federation API server endpoint when NodeExternalIP is unavailable for federation API servers exposed as NodePort services ([#46960](https://github.com/kubernetes/kubernetes/pull/46960), [@lukaszo](https://github.com/lukaszo)) + + * Automate configuring nameserver in cluster-dns for CoreDNS provider ([#42895](https://github.com/kubernetes/kubernetes/pull/42895), [@shashidharatd](https://github.com/shashidharatd)) + + * A new controller for managing DNS records is introduced which can be optionally disabled to enable third party components to manage DNS records for federated services. ([#45034](https://github.com/kubernetes/kubernetes/pull/45034), [@shashidharatd](https://github.com/shashidharatd)) + + * Remove the `--secret-name` flag from `kubefed join`, instead generating the secret name arbitrarily. ([#42513](https://github.com/kubernetes/kubernetes/pull/42513), [@perotinus](https://github.com/perotinus)) + + * Use StorageClassName for etcd pvc ([#46323](https://github.com/kubernetes/kubernetes/pull/46323), [@marun](https://github.com/marun)) + +* Bug fixes: + + * Allow disabling federation controllers through override args ([#44209](https://github.com/kubernetes/kubernetes/pull/44209), [@irfanurrehman](https://github.com/irfanurrehman)) + + * Kubefed: Use service accounts instead of the user's credentials when accessing joined clusters' API servers. ([#42042](https://github.com/kubernetes/kubernetes/pull/42042), [@perotinus](https://github.com/perotinus)) + + * Avoid panic if route53 fields are nil ([#44380](https://github.com/kubernetes/kubernetes/pull/44380), [@justinsb](https://github.com/justinsb)) + + +#### Credential provider +* add rancher credential provider ([#40160](https://github.com/kubernetes/kubernetes/pull/40160), [@wlan0](https://github.com/wlan0)) + +#### Information for Kubernetes clients (openapi, swagger, client-go) +* Features: + + * Add Host field to TCPSocketAction ([#42902](https://github.com/kubernetes/kubernetes/pull/42902), [@louyihua](https://github.com/louyihua)) + + * Add the ability to lock on ConfigMaps to support HA for self hosted components ([#42666](https://github.com/kubernetes/kubernetes/pull/42666), [@timothysc](https://github.com/timothysc)) + + * validateClusterInfo: use clientcmdapi.NewCluster() ([#44221](https://github.com/kubernetes/kubernetes/pull/44221), [@ncdc](https://github.com/ncdc)) + + * OpenAPI spec is now available in protobuf binary and gzip format (with ETag support) ([#45836](https://github.com/kubernetes/kubernetes/pull/45836), [@mbohlool](https://github.com/mbohlool)) + + * HostAliases is now parsed with hostAliases json keys to be in line with the feature's name. ([#47512](https://github.com/kubernetes/kubernetes/pull/47512), [@rickypai](https://github.com/rickypai)) + + * Add redirect support to SpdyRoundTripper ([#44451](https://github.com/kubernetes/kubernetes/pull/44451), [@ncdc](https://github.com/ncdc)) + + * Duplicate recurring Events now include the latest event's Message string ([#46034](https://github.com/kubernetes/kubernetes/pull/46034), [@kensimon](https://github.com/kensimon)) + +* Bug fixes: + + * Fix serialization of EnforceNodeAllocatable ([#44606](https://github.com/kubernetes/kubernetes/pull/44606), [@ivan4th](https://github.com/ivan4th)) + + * Use OS-specific libs when computing client User-Agent in kubectl, etc. ([#44423](https://github.com/kubernetes/kubernetes/pull/44423), [@monopole](https://github.com/monopole)) + + +#### Instrumentation +* Bumped Heapster to v1.4.0. More details about the release https://github.com/kubernetes/heapster/releases/tag/v1.4.0 + +* Fluentd manifest pod is no longer created on non-registered master when creating clusters using kube-up.sh. ([#44721](https://github.com/kubernetes/kubernetes/pull/44721), [@piosz](https://github.com/piosz)) + +* Stackdriver cluster logging now deploys a new component to export Kubernetes events. ([#46700](https://github.com/kubernetes/kubernetes/pull/46700), [@crassirostris](https://github.com/crassirostris)) + +* Stackdriver Logging deployment exposes metrics on node port 31337 when enabled. ([#47402](https://github.com/kubernetes/kubernetes/pull/47402), [@crassirostris](https://github.com/crassirostris)) + +* Upgrade Elasticsearch Addon to v5.4.0 ([#45589](https://github.com/kubernetes/kubernetes/pull/45589), [@it-svit](https://github.com/it-svit)) + +#### Internal storage layer +* prevent pods/status from touching ownerreferences ([#45826](https://github.com/kubernetes/kubernetes/pull/45826), [@deads2k](https://github.com/deads2k)) + +* Ensure that autoscaling/v1 is the preferred version for API discovery when autoscaling/v2alpha1 is enabled. ([#45741](https://github.com/kubernetes/kubernetes/pull/45741), [@DirectXMan12](https://github.com/DirectXMan12)) + +* The proxy subresource APIs for nodes, services, and pods now support the HTTP PATCH method. ([#44929](https://github.com/kubernetes/kubernetes/pull/44929), [@liggitt](https://github.com/liggitt)) + +* Fluentd now tolerates all NoExecute Taints when run in gcp configuration. ([#45715](https://github.com/kubernetes/kubernetes/pull/45715), [@gmarek](https://github.com/gmarek)) + + +#### Kubernetes Dashboard + +* Increase Dashboard's memory requests and limits ([#44712](https://github.com/kubernetes/kubernetes/pull/44712), [@maciaszczykm](https://github.com/maciaszczykm)) + +* Update Dashboard version to 1.6.1 ([#45953](https://github.com/kubernetes/kubernetes/pull/45953), [@maciaszczykm](https://github.com/maciaszczykm)) + + +#### kube-dns +* Updates kube-dns to 1.14.2 ([#45684](https://github.com/kubernetes/kubernetes/pull/45684), [@bowei](https://github.com/bowei)) + + * Support kube-master-url flag without kubeconfig + + * Fix concurrent R/Ws in dns.go + + * Fix confusing logging when initialize server + + * Fix printf in cmd/kube-dns/app/server.go + + * Fix version on startup and `--version` flag + + * Support specifying port number for nameserver in stubDomains + +#### kube-proxy +* Features: + + * ratelimit runs of iptables by sync-period flags ([#46266](https://github.com/kubernetes/kubernetes/pull/46266), [@thockin](https://github.com/thockin)) + + * Log warning when invalid dir passed to `kubectl proxy --www` ([#44952](https://github.com/kubernetes/kubernetes/pull/44952), [@CaoShuFeng](https://github.com/CaoShuFeng)) + + * Add `--write-config-to` flag to kube-proxy to allow users to write the default configuration settings to a file. ([#45908](https://github.com/kubernetes/kubernetes/pull/45908), [@ncdc](https://github.com/ncdc)) + + * When switching from the service.beta.kubernetes.io/external-traffic annotation to the new ([#46716](https://github.com/kubernetes/kubernetes/pull/46716), [@thockin](https://github.com/thockin)) externalTrafficPolicy field, the values chnag as follows: * "OnlyLocal" becomes "Local" * "Global" becomes "Cluster". + + +* Bug fixes: + + * Fix corner-case with OnlyLocal Service healthchecks. ([#44313](https://github.com/kubernetes/kubernetes/pull/44313), [@thockin](https://github.com/thockin)) + + * Fix DNS suffix search list support in Windows kube-proxy. ([#45642](https://github.com/kubernetes/kubernetes/pull/45642), [@JiangtianLi](https://github.com/JiangtianLi)) + +#### kube-scheduler +* Scheduler can receive its policy configuration from a ConfigMap ([#43892](https://github.com/kubernetes/kubernetes/pull/43892), [@bsalamat](https://github.com/bsalamat)) + +* Aggregated used ports at the NodeInfo level for PodFitsHostPorts predicate. ([#42524](https://github.com/kubernetes/kubernetes/pull/42524), [@k82cn](https://github.com/k82cn)) + +* leader election lock based on scheduler name ([#42961](https://github.com/kubernetes/kubernetes/pull/42961), [@wanghaoran1988](https://github.com/wanghaoran1988)) + + +#### Storage + +* Features + + * The options passed to a Flexvolume plugin's mount command now contains the pod name (kubernetes.io/pod.name), namespace (kubernetes.io/pod.namespace), uid (kubernetes.io/pod.uid), and service account name (kubernetes.io/serviceAccount.name). ([#39488](https://github.com/kubernetes/kubernetes/pull/39488), [@liggitt](https://github.com/liggitt)) + + * GCE and AWS dynamic provisioners extension: admins can configure zone(s) in which a persistent volume shall be created. ([#38505](https://github.com/kubernetes/kubernetes/pull/38505), [@pospispa](https://github.com/pospispa)) + + * Implement API usage metrics for GCE storage. ([#40338](https://github.com/kubernetes/kubernetes/pull/40338), [@gnufied](https://github.com/gnufied)) + + * Add support for emitting metrics from openstack cloudprovider about storage operations. ([#46008](https://github.com/kubernetes/kubernetes/pull/46008), [@NickrenREN](https://github.com/NickrenREN)) + + * vSphere cloud provider: vSphere storage policy support for dynamic volume provisioning. ([#46176](https://github.com/kubernetes/kubernetes/pull/46176), [@BaluDontu](https://github.com/BaluDontu)) + + * Support StorageClass in Azure file volume ([#42170](https://github.com/kubernetes/kubernetes/pull/42170), [@rootfs](https://github.com/rootfs)) + + * Start recording cloud provider metrics for AWS ([#43477](https://github.com/kubernetes/kubernetes/pull/43477), [@gnufied](https://github.com/gnufied)) + + * Support iSCSI CHAP authentication ([#43396](https://github.com/kubernetes/kubernetes/pull/43396), [@rootfs](https://github.com/rootfs)) + + * Openstack cinder v1/v2/auto API support ([#40423](https://github.com/kubernetes/kubernetes/pull/40423), [@mkutsevol](https://github.com/mkutsevol)](https://github.com/kubernetes/kubernetes/pull/41498), [@mikebryant](https://github.com/mikebryant)) + + * Alpha feature: allows users to set storage limit to isolate EmptyDir volumes. It enforces the limit by evicting pods that exceed their storage limits ([#45686](https://github.com/kubernetes/kubernetes/pull/45686), [@jingxu97](https://github.com/jingxu97)) + +* Bug fixes + + * Fixes issue with Flexvolume, introduced in 1.6.0, where drivers without an attacher would fail (node indefinitely waiting for attach). A driver API addition is introduced: drivers that don't implement attach should return attach: false on init. ([#47503](https://github.com/kubernetes/kubernetes/pull/47503), [@chakri-nelluri](https://github.com/chakri-nelluri)) + + * Fix dynamic provisioning of PVs with inaccurate AccessModes by refusing to provision when PVCs ask for AccessModes that can't be satisfied by the PVs' underlying volume plugin. ([#47274](https://github.com/kubernetes/kubernetes/pull/47274), [@wongma7](https://github.com/wongma7)) + + * Fix pods failing to start if they specify a file as a volume subPath to mount. ([#45623](https://github.com/kubernetes/kubernetes/pull/45623), [@wongma7](https://github.com/wongma7)) + + * Fix erroneous FailedSync and FailedMount events being periodically and indefinitely posted on Pods after kubelet is restarted. ([#44781](https://github.com/kubernetes/kubernetes/pull/44781), [@wongma7](https://github.com/wongma7)) + + * Fix AWS EBS volumes not getting detached from node if routine to verify volumes are attached runs while the node is down ([#46463](https://github.com/kubernetes/kubernetes/pull/46463), [@wongma7](https://github.com/wongma7)) + + * Improves performance of Cinder volume attach/detach operations. ([#41785](https://github.com/kubernetes/kubernetes/pull/41785), [@jamiehannaford](https://github.com/jamiehannaford)) + + * Fix iSCSI iSER mounting. ([#47281](https://github.com/kubernetes/kubernetes/pull/47281), [@mtanino](https://github.com/mtanino)) + + * iscsi storage plugin: Fix dangling session when using multiple target portal addresses. ([#46239](https://github.com/kubernetes/kubernetes/pull/46239), [@mtanino](https://github.com/mtanino)) + + + * Fix log spam due to unnecessary status update when node is deleted. ([#45923](https://github.com/kubernetes/kubernetes/pull/45923), [@verult](https://github.com/verult)) + + * Don't try to attach volume to new node if it is already attached to another node and the volume does not support multi-attach. ([#45346](https://github.com/kubernetes/kubernetes/pull/45346), [@codablock](https://github.com/codablock)) + + * detach the volume when pod is terminated ([#45286](https://github.com/kubernetes/kubernetes/pull/45286), [@gnufied](https://github.com/gnufied)) + + * Roll up volume error messages in the kubelet sync loop. ([#44938](https://github.com/kubernetes/kubernetes/pull/44938), [@jayunit100](https://github.com/jayunit100)) + + * Catch error when failed to make directory in NFS volume plugin ([#38801](https://github.com/kubernetes/kubernetes/pull/38801), [@nak3](https://github.com/nak3)) + + + +#### Networking + +* DNS and name resolution + + * Updates kube-dns to 1.14.2 ([#45684](https://github.com/kubernetes/kubernetes/pull/45684), [@bowei](https://github.com/bowei)) + + * Support kube-master-url flag without kubeconfig + + * Fix concurrent R/Ws in dns.go + + * Fix confusing logging when initializing server + + * Support specifying port number for nameserver in stubDomains + + * A new field hostAliases has been added to pod.spec to support adding entries to a Pod's /etc/hosts file. ([#44641](https://github.com/kubernetes/kubernetes/pull/44641), [@rickypai](https://github.com/rickypai)) + + * Fix DNS suffix search list support in Windows kube-proxy. ([#45642](https://github.com/kubernetes/kubernetes/pull/45642), [@JiangtianLi](https://github.com/JiangtianLi)) + +* Kube-proxy + + * ratelimit runs of iptables by sync-period flags ([#46266](https://github.com/kubernetes/kubernetes/pull/46266), [@thockin](https://github.com/thockin)) + + * Fix corner-case with OnlyLocal Service healthchecks. ([#44313](https://github.com/kubernetes/kubernetes/pull/44313), [@thockin](https://github.com/thockin)) + +* Exclude nodes labeled as master from LoadBalancer / NodePort; restores documented behaviour. ([#44745](https://github.com/kubernetes/kubernetes/pull/44745), [@justinsb](https://github.com/justinsb)) + +* Adds support for CNI ConfigLists, which permit plugin chaining. ([#42202](https://github.com/kubernetes/kubernetes/pull/42202), [@squeed](https://github.com/squeed)) + +* Fix node selection logic on initial LB creation ([#45773](https://github.com/kubernetes/kubernetes/pull/45773), [@justinsb](https://github.com/justinsb)) + +* When switching from the service.beta.kubernetes.io/external-traffic annotation to the new externalTrafficPolicy field, the values change as follows: * "OnlyLocal" becomes "Local" * "Global" becomes "Cluster". ([#46716](https://github.com/kubernetes/kubernetes/pull/46716), [@thockin](https://github.com/thockin)) + +* servicecontroller: Fix node selection logic on initial LB creation ([#45773](https://github.com/kubernetes/kubernetes/pull/45773), [@justinsb](https://github.com/justinsb)) + +* fixed HostAlias in PodSpec to allow foo.bar hostnames instead of just foo DNS labels. ([#46809](https://github.com/kubernetes/kubernetes/pull/46809), [@rickypai](https://github.com/rickypai)) + + +#### Node controller +* Bug fixes: + + * Fix [transition between NotReady and Unreachable taints](https://github.com/kubernetes/kubernetes/issues/43444). ([#44042](https://github.com/kubernetes/kubernetes/pull/44042), [@gmarek](https://github.com/gmarek)) + + +#### Node Components + +* Features + + * Removes the deprecated kubelet flag `--babysit-daemons` ([#44230](https://github.com/kubernetes/kubernetes/pull/44230), [@mtaufen](https://github.com/mtaufen)) + + * make dockershim.sock configurable ([#43914](https://github.com/kubernetes/kubernetes/pull/43914), [@ncdc](https://github.com/ncdc)) + + * Support running Ubuntu image on GCE node ([#44744](https://github.com/kubernetes/kubernetes/pull/44744), [@yguo0905](https://github.com/yguo0905)) + + * Kubernetes now shares a single PID namespace among all containers in a pod when running with docker >= 1.13.1. This means processes can now signal processes in other containers in a pod, but it also means that the `kubectl exec {pod} kill 1` pattern will cause the Pod to be restarted rather than a single container. ([#45236](https://github.com/kubernetes/kubernetes/pull/45236), [@verb](https://github.com/verb)) + + * A new field hostAliases has been added to the pod spec to support [adding entries to a Pod's /etc/hosts file](https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/). ([#44641](https://github.com/kubernetes/kubernetes/pull/44641), [@rickypai](https://github.com/rickypai)) + + * With `--feature-gates=RotateKubeletClientCertificate=true` set, the Kubelet will ([#41912](https://github.com/kubernetes/kubernetes/pull/41912), [@jcbsmpsn](https://github.com/jcbsmpsn)) + + * request a client certificate from the API server during the boot cycle and pause + + * waiting for the request to be satisfied. It will continually refresh the certificate + + * Create clusters with GPUs in GCE by specifying `type=<gpu-type>,count=<gpu-count>` to NODE_ACCELERATORS environment variable. ([#45130](https://github.com/kubernetes/kubernetes/pull/45130), [@vishh](https://github.com/vishh)) + + * List of available GPUs - [https://cloud.google.com/compute/docs/gpus/#introduction](https://cloud.google.com/compute/docs/gpus/#introduction) + + * Disk Pressure triggers the deletion of terminated containers on the node. ([#45896](https://github.com/kubernetes/kubernetes/pull/45896), [@dashpole](https://github.com/dashpole)) + + * Support status.hostIP in downward API ([#42717](https://github.com/kubernetes/kubernetes/pull/42717), [@andrewsykim](https://github.com/andrewsykim)) + + * Upgrade Node Problem Detector to v0.4.1. New features added: + + * Add /dev/kmsg support for kernel log parsing. ([#112](https://github.com/kubernetes/node-problem-detector/pull/112), [@euank](https://github.com/euank)) + + * Add ABRT support. ([#105](https://github.com/kubernetes/node-problem-detector/pull/105), [@juliusmilan](https://github.com/juliusmilan)) + + * Add a docker image corruption problem detection in the default docker monitor config. ([#117](https://github.com/kubernetes/node-problem-detector/pull/117), [@ajitak](https://github.com/ajitak)) + + * Upgrade CAdvisor to v0.26.1. New features added: + + * Add Docker overlay2 storage driver support. + + * Add ZFS support. + + * Add UDP metrics (collection disabled by default). + + * Roll up volume error messages in the kubelet sync loop. ([#44938](https://github.com/kubernetes/kubernetes/pull/44938), [@jayunit100](https://github.com/jayunit100)) + + * Allow pods to opt out of PodPreset mutation via an annotation on the pod. ([#44965](https://github.com/kubernetes/kubernetes/pull/44965), [@jpeeler](https://github.com/jpeeler)) + + * Add generic Toleration for NoExecute Taints to NodeProblemDetector, so that NPD can be scheduled to nodes with NoExecute taints by default. ([#45883](https://github.com/kubernetes/kubernetes/pull/45883), [@gmarek](https://github.com/gmarek)) + + * Prevent kubelet from setting allocatable < 0 for a resource upon initial creation. ([#46516](https://github.com/kubernetes/kubernetes/pull/46516), [@derekwaynecarr](https://github.com/derekwaynecarr)) + +* Bug fixes + + * Changed Kubelet default image-gc-high-threshold to 85% to resolve a conflict with default settings in docker that prevented image garbage collection from resolving low disk space situations when using devicemapper storage. ([#40432](https://github.com/kubernetes/kubernetes/pull/40432), [@sjenning](https://github.com/sjenning)) + + * Mark all static pods on the Master node as critical to prevent preemption ([#47356](https://github.com/kubernetes/kubernetes/pull/47356), [@dashpole](https://github.com/dashpole)) + + * Restrict active deadline seconds max allowed value to be maximum uint32 to avoid overflow ([#46640](https://github.com/kubernetes/kubernetes/pull/46640), [@derekwaynecarr](https://github.com/derekwaynecarr)) + + * Fix a bug with cAdvisorPort in the KubeletConfiguration that prevented setting it to 0, which is in fact a valid option, as noted in issue [#11710](https://github.com/kubernetes/kubernetes/pull/11710). ([#46876](https://github.com/kubernetes/kubernetes/pull/46876), [@mtaufen](https://github.com/mtaufen)) + + * Fix a bug where container cannot run as root when SecurityContext.RunAsNonRoot is false. ([#47009](https://github.com/kubernetes/kubernetes/pull/47009), [@yujuhong](https://github.com/yujuhong)) + + * Fix the Kubelet PLEG update timestamp to better reflect the health of the component when the container runtime request hangs. ([#45496](https://github.com/kubernetes/kubernetes/pull/45496), [@andyxning](https://github.com/andyxning)) + + * Avoid failing sync loop health check on container runtime errors ([#47124](https://github.com/kubernetes/kubernetes/pull/47124), [@andyxning](https://github.com/andyxning)) + + * Fix a bug where Kubelet does not ignore pod manifest files starting with dots ([#45111](https://github.com/kubernetes/kubernetes/pull/45111), [@dwradcliffe](https://github.com/dwradcliffe)) + + * Fix kubelet reset liveness probe failure count across pod restart boundaries ([#46371](https://github.com/kubernetes/kubernetes/pull/46371), [@sjenning](https://github.com/sjenning)) + + * Fix log spam due to unnecessary status update when node is deleted. ([#45923](https://github.com/kubernetes/kubernetes/pull/45923), [@verult](https://github.com/verult)) + + * Fix kubelet event recording for selected events. ([#46246](https://github.com/kubernetes/kubernetes/pull/46246), [@derekwaynecarr](https://github.com/derekwaynecarr)) + + * Fix image garbage collector attempting to remove in-use images. ([#46121](https://github.com/kubernetes/kubernetes/pull/46121), [@Random-Liu](https://github.com/Random-Liu)) + + * Detach the volume when pod is terminated ([#45286](https://github.com/kubernetes/kubernetes/pull/45286), [@gnufied](https://github.com/gnufied)) + + * CRI: Fix StopContainer timeout ([#44970](https://github.com/kubernetes/kubernetes/pull/44970), [@Random-Liu](https://github.com/Random-Liu)) + + * CRI: Fix kubelet failing to start when using rkt. ([#44569](https://github.com/kubernetes/kubernetes/pull/44569), [@yujuhong](https://github.com/yujuhong)) + + * CRI: `kubectl logs -f` now stops following when container stops, as it did pre-CRI. ([#44406](https://github.com/kubernetes/kubernetes/pull/44406), [@Random-Liu](https://github.com/Random-Liu)) + + * Fixes a bug where pods were evicted even after images are successfully deleted. ([#44986](https://github.com/kubernetes/kubernetes/pull/44986), [@dashpole](https://github.com/dashpole)) + + * When creating a container using envFrom, ([#42083](https://github.com/kubernetes/kubernetes/pull/42083), [@fraenkel](https://github.com/fraenkel) + * validate the name of the ConfigMap in a ConfigMapRef + * validate the name of the Secret in a SecretRef + + * Fix the bug where StartedAt time is not reported for exited containers. ([#45977](https://github.com/kubernetes/kubernetes/pull/45977), [@yujuhong](https://github.com/yujuhong)) + +* Changes/deprecations + + * Marks the Kubelet's `--master-service-namespace` flag deprecated ([#44250](https://github.com/kubernetes/kubernetes/pull/44250), [@mtaufen](https://github.com/mtaufen)) + + * Remove PodSandboxStatus.Linux.Namespaces.Network from CRI since it is not used/needed. ([#45166](https://github.com/kubernetes/kubernetes/pull/45166), [@feiskyer](https://github.com/feiskyer)) + + * Remove the `--enable-cri` flag. CRI is now the default, and the only way to integrate with Kubelet for the container runtimes.([#45194](https://github.com/kubernetes/kubernetes/pull/45194), [@yujuhong](https://github.com/yujuhong)) + + * CRI has been moved to package pkg/kubelet/apis/cri/v1alpha1/runtime as part of Kubelet API path cleanup. ([#47113](https://github.com/kubernetes/kubernetes/pull/47113), [@feiskyer](https://github.com/feiskyer)) + + +#### Scheduling + +* The fix makes scheduling go routine waiting for cache (e.g. Pod) to be synced. ([#45453](https://github.com/kubernetes/kubernetes/pull/45453), [@k82cn](https://github.com/k82cn)) + +* Move hardPodAffinitySymmetricWeight to scheduler policy config ([#44159](https://github.com/kubernetes/kubernetes/pull/44159), [@wanghaoran1988](https://github.com/wanghaoran1988)) + +* Align Extender's validation with prioritizers. ([#45091](https://github.com/kubernetes/kubernetes/pull/45091), [@k82cn](https://github.com/k82cn)) + +* Removed old scheduler constructor. ([#45472](https://github.com/kubernetes/kubernetes/pull/45472), [@k82cn](https://github.com/k82cn)) + +* Fixes the overflow for priorityconfig- valid range {1, 9223372036854775806}. ([#45122](https://github.com/kubernetes/kubernetes/pull/45122), [@ravisantoshgudimetla](https://github.com/ravisantoshgudimetla)) + + +#### Security +* Features: + + * Permission to use a PodSecurityPolicy can now be granted within a single namespace by allowing the use verb on the podsecuritypolicies resource within the namespace. ([#42360](https://github.com/kubernetes/kubernetes/pull/42360), [@liggitt](https://github.com/liggitt)) + + * Break the 'certificatesigningrequests' controller into a 'csrapprover' controller and 'csrsigner' controller. ([#45514](https://github.com/kubernetes/kubernetes/pull/45514), [@mikedanese](https://github.com/mikedanese)) + + * `kubectl auth can-i` now supports non-resource URLs ([#46432](https://github.com/kubernetes/kubernetes/pull/46432), [@CaoShuFeng](https://github.com/CaoShuFeng)) + + * Promote kubelet tls bootstrap to beta. Add a non-experimental flag to use it and deprecate the old flag. ([#46799](https://github.com/kubernetes/kubernetes/pull/46799), [@mikedanese](https://github.com/mikedanese)) + + * Add the alpha.image-policy.k8s.io/failed-open=true annotation when the image policy webhook encounters an error and fails open. ([#46264](https://github.com/kubernetes/kubernetes/pull/46264), [@Q-Lee](https://github.com/Q-Lee)) + + * Add an AEAD encrypting transformer for storing secrets encrypted at rest ([#41939](https://github.com/kubernetes/kubernetes/pull/41939), [@smarterclayton](https://github.com/smarterclayton)) + + * Add secretbox and AES-CBC encryption modes to at rest encryption. AES-CBC is considered superior to AES-GCM because it is resistant to nonce-reuse attacks, and secretbox uses Poly1305 and XSalsa20. ([#46916](https://github.com/kubernetes/kubernetes/pull/46916), [@smarterclayton](https://github.com/smarterclayton)) + +* Bug fixes: + + * Make gcp auth provider not to override the Auth header if it's already exits ([#45575](https://github.com/kubernetes/kubernetes/pull/45575), [@wanghaoran1988](https://github.com/wanghaoran1988)) + + * The oidc client plugin has reduce round trips and fix scopes requested ([#45317](https://github.com/kubernetes/kubernetes/pull/45317), [@ericchiang](https://github.com/ericchiang)) + + * API requests using impersonation now include the system:authenticated group in the impersonated user automatically. ([#44076](https://github.com/kubernetes/kubernetes/pull/44076), [@liggitt](https://github.com/liggitt)) + + * RBAC role and rolebinding auto-reconciliation is now performed only when the RBAC authorization mode is enabled. ([#43813](https://github.com/kubernetes/kubernetes/pull/43813), [@liggitt](https://github.com/liggitt)) + + * PodSecurityPolicy now recognizes pods that specify runAsNonRoot: false in their security context and does not overwrite the specified value ([#47073](https://github.com/kubernetes/kubernetes/pull/47073), [@Q-Lee](https://github.com/Q-Lee)) + + * Tokens retrieved from Google Cloud with application default credentials will not be cached if the client fails authorization ([#46694](https://github.com/kubernetes/kubernetes/pull/46694), [@matt-tyler](https://github.com/matt-tyler)) + + * Update kube-dns, metadata-proxy, and fluentd-gcp, event-exporter, prometheus-to-sd, and ip-masq-agent addons with new base images containing fixes for CVE-2016-4448, CVE-2016-9841, CVE-2016-9843, CVE-2017-1000366, CVE-2017-2616, and CVE-2017-9526. ([#47877](https://github.com/kubernetes/kubernetes/pull/47877), [@ixdy](https://github.com/ixdy)) + + * Fixed an issue mounting the wrong secret into pods as a service account token. ([#44102](https://github.com/kubernetes/kubernetes/pull/44102), [@ncdc](https://github.com/ncdc)) + +#### Scalability + +* The HorizontalPodAutoscaler controller will now only send updates when it has new status information, reducing the number of writes caused by the controller. ([#47078](https://github.com/kubernetes/kubernetes/pull/47078), [@DirectXMan12](https://github.com/DirectXMan12)) + + +## **External Dependency Version Information** + +Continuous integration builds have used the following versions of external dependencies, however, this is not a strong recommendation and users should consult an appropriate installation or upgrade guide before deciding what versions of etcd, docker or rkt to use. + +* Docker versions 1.10.3, 1.11.2, 1.12.6 have been validated + + * Docker version 1.12.6 known issues + + * overlay2 driver not fully supported + + * live-restore not fully supported + + * no shared pid namespace support + + * Docker version 1.11.2 known issues + + * Kernel crash with Aufs storage driver on Debian Jessie ([#27885](https://github.com/kubernetes/kubernetes/pull/27885)) which can be identified by the [node problem detector](https://kubernetes.io/docs/tasks/debug-application-cluster/monitor-node-health/) + + * Leaked File descriptors ([#275](https://github.com/docker/containerd/issues/275)) + + * Additional memory overhead per container ([#21737](https://github.com/kubernetes/kubernetes/pull/21737)) + + * Docker 1.10.3 contains [backports provided by RedHat](https://github.com/docker/docker/compare/v1.10.3...runcom:docker-1.10.3-stable) for known issues + +* For issues with Docker 1.13.X please see the [1.13.X tracking issue](https://github.com/kubernetes/kubernetes/issues/42926) + +* rkt version 1.23.0+ + + * known issues with the rkt runtime are [listed in the Getting Started Guide](https://kubernetes.io/docs/getting-started-guides/rkt/notes/) + +* etcd version 3.0.17 + +* Go version: 1.8.3. [Link to announcement](https://groups.google.com/d/msg/kubernetes-dev/0XRRz6UhhTM/YODWVnuDBQAJ) + + * Kubernetes can only be compiled with Go 1.8. Support for all other versions is dropped. + + +### Previous Releases Included in v1.7.0 +- [v1.7.0-rc.1](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md#v170-rc1) +- [v1.7.0-beta.2](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md#v170-beta2) +- [v1.7.0-beta.1](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md#v170-beta1) +- [v1.7.0-alpha.4](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md#v170-alpha4) +- [v1.7.0-alpha.3](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md#v170-alpha3) +- [v1.7.0-alpha.2](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md#v170-alpha2) +- [v1.7.0-alpha.1](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md#v170-alpha1) + + + +# v1.7.0-rc.1 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.7/examples) + +## Downloads for v1.7.0-rc.1 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.7.0-rc.1/kubernetes.tar.gz) | `9da0e04de83e14f87540b5b58f415b5cdb78e552e07dc35985ddb1b7f618a2f2` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.7.0-rc.1/kubernetes-src.tar.gz) | `f4e6cfd0d859d7880d14d1052919a9eb79c26e1cd4105330dda8b05f073cab40` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.7.0-rc.1/kubernetes-client-darwin-386.tar.gz) | `5f161559ce91321577c09f03edf6d3416f1964056644c8725394d9c23089b052` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.7.0-rc.1/kubernetes-client-darwin-amd64.tar.gz) | `c54b07d2b0240e2be57ff6bf95794bf826a082a7b4e8316c9ec45e92539d6252` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.7.0-rc.1/kubernetes-client-linux-386.tar.gz) | `d61874a51678dee6cb1e5514e703b7070c27fb728e8b18533a5233fcca2e30fd` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.0-rc.1/kubernetes-client-linux-amd64.tar.gz) | `4004cec39c637fa7a2e3d309d941f3e73e0a16a3511c5e46cbb2fa6bb27d89e5` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.0-rc.1/kubernetes-client-linux-arm64.tar.gz) | `88c37ea21d7a2c464be6fee29db4f295d738028871127197253923cec00cf179` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.7.0-rc.1/kubernetes-client-linux-arm.tar.gz) | `0e5e5f52fe93a78003c6cac171a6aae8cb1f2f761e325d509558df84aba57b32` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.0-rc.1/kubernetes-client-linux-ppc64le.tar.gz) | `d4586a64f239654a53faf1a6c18fc5d5c99bb95df593bf92b5e9fac0daba71e2` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.0-rc.1/kubernetes-client-linux-s390x.tar.gz) | `728097218b051df26b90863779588517183fa4e1f55dee414aff188e4a50e7df` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.7.0-rc.1/kubernetes-client-windows-386.tar.gz) | `d949bd6977a707b46609ee740f3a16592e7676a6dc81ad495d9f511cb4d2cb98` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.7.0-rc.1/kubernetes-client-windows-amd64.tar.gz) | `b787198e3320ef4094112f44e0442f062c04ce2137c14bbec10f5df9fbb3f404` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.0-rc.1/kubernetes-server-linux-amd64.tar.gz) | `e5eaa8951d021621b160d41bc1350dcf64178c46a0e6e656be78a5e5b267dc5d` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.0-rc.1/kubernetes-server-linux-arm64.tar.gz) | `08b694b46bf7b5906408a331a9ccfb9143114d414d64fcca8a6daf6ec79c282b` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.7.0-rc.1/kubernetes-server-linux-arm.tar.gz) | `ca980d1669e22cc3846fc2bdf77e6bdc1c49820327128db0d0388c4def77bc16` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.0-rc.1/kubernetes-server-linux-ppc64le.tar.gz) | `c656106048696bd2c4b66a3f8e348b37634abf48a9dc1f4eb941e01da9597b26` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.0-rc.1/kubernetes-server-linux-s390x.tar.gz) | `7888ed82b33b0002a488224ffa7a93e865e1d2b01e4ccc44b8d04ff4be5fef71` + +### Node Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.0-rc.1/kubernetes-node-linux-amd64.tar.gz) | `26c74018b048e2ec0d2df61216bda77bdf29c23f34dac6d7b8a55a56f0f95927` +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.0-rc.1/kubernetes-node-linux-arm64.tar.gz) | `e5c6d38556f840067b0eea4ca862c5c79a89ff47063dccecf1c0fdc2c25a9a9b` +[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.7.0-rc.1/kubernetes-node-linux-arm.tar.gz) | `4cf1d7843ede557bd629970d1bc21a936b76bf9138fc96224e538c5a61f6e203` +[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.0-rc.1/kubernetes-node-linux-ppc64le.tar.gz) | `e7a870c53af210cc00f0854e2ffad8ee06b20c4028f256d60d04f31a630291d1` +[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.0-rc.1/kubernetes-node-linux-s390x.tar.gz) | `78865fe4029a39744865e0acb4dd15f6f22de8264f7c65a65df52891c3b91967` +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.7.0-rc.1/kubernetes-node-windows-amd64.tar.gz) | `8b632e7c79e750e7102d02120508f0394d3f11a2c36b42d2c5f96ec4f0f1f1ed` + +## Changelog since v1.7.0-beta.2 + +### Action Required + +* The following alpha API groups were unintentionally enabled by default in previous releases, and will no longer be enabled by default in v1.8: ([#47690](https://github.com/kubernetes/kubernetes/pull/47690), [@caesarxuchao](https://github.com/caesarxuchao)) + * rbac.authorization.k8s.io/v1alpha1 + * settings.k8s.io/v1alpha1 + * If you wish to continue using them in v1.8, please enable them explicitly using the `--runtime-config` flag of the apiserver (for example, `--runtime-config="rbac.authorization.k8s.io/v1alpha1,settings.k8s.io/v1alpha1"`) +* Paths containing backsteps (for example, "../bar") are no longer allowed in hostPath volume paths, or in volumeMount subpaths ([#47290](https://github.com/kubernetes/kubernetes/pull/47290), [@jhorwit2](https://github.com/jhorwit2)) +* Azure: Change container permissions to private for provisioned volumes. If you have existing Azure volumes that were created by Kubernetes v1.6.0-v1.6.5, you should change the permissions on them manually. ([#47605](https://github.com/kubernetes/kubernetes/pull/47605), [@brendandburns](https://github.com/brendandburns)) + +### Other notable changes + +* Update kube-dns, metadata-proxy, and fluentd-gcp, event-exporter, prometheus-to-sd, and ip-masq-agent addons with new base images containing fixes for CVE-2016-4448, CVE-2016-9841, CVE-2016-9843, CVE-2017-1000366, CVE-2017-2616, and CVE-2017-9526. ([#47877](https://github.com/kubernetes/kubernetes/pull/47877), [@ixdy](https://github.com/ixdy)) +* Bump the memory request/limit for ip-masq-daemon. ([#47887](https://github.com/kubernetes/kubernetes/pull/47887), [@dnardo](https://github.com/dnardo)) +* HostAliases is now parsed with `hostAliases` json keys to be in line with the feature's name. ([#47512](https://github.com/kubernetes/kubernetes/pull/47512), [@rickypai](https://github.com/rickypai)) +* Fixes issue w/Flex volume, introduced in 1.6.0, where drivers without an attacher would fail (node indefinitely waiting for attach). Drivers that don't implement attach should return `attach: false` on `init`. ([#47503](https://github.com/kubernetes/kubernetes/pull/47503), [@chakri-nelluri](https://github.com/chakri-nelluri)) +* Tokens retrieved from Google Cloud with application default credentials will not be cached if the client fails authorization ([#46694](https://github.com/kubernetes/kubernetes/pull/46694), [@matt-tyler](https://github.com/matt-tyler)) +* ip-masq-agent is now the default for GCE ([#47794](https://github.com/kubernetes/kubernetes/pull/47794), [@dnardo](https://github.com/dnardo)) +* Taints support in gce/salt startup scripts. ([#47632](https://github.com/kubernetes/kubernetes/pull/47632), [@mwielgus](https://github.com/mwielgus)) +* Fix VolumeClaims/capacity in "kubectl describe statefulsets" output. ([#47573](https://github.com/kubernetes/kubernetes/pull/47573), [@k82cn](https://github.com/k82cn)) +* New 'service.beta.kubernetes.io/aws-load-balancer-extra-security-groups' Service annotation to specify extra Security Groups to be added to ELB created by AWS cloudprovider ([#45268](https://github.com/kubernetes/kubernetes/pull/45268), [@redbaron](https://github.com/redbaron)) +* AWS: clean up blackhole routes when using kubenet ([#47572](https://github.com/kubernetes/kubernetes/pull/47572), [@justinsb](https://github.com/justinsb)) +* The protobuf serialization of API objects has been updated to store maps in a predictable order to ensure that the representation of that object does not change when saved into etcd. This prevents the same object from being seen as being modified, even when no values have changed. ([#47701](https://github.com/kubernetes/kubernetes/pull/47701), [@smarterclayton](https://github.com/smarterclayton)) +* Mark Static pods on the Master as critical ([#47356](https://github.com/kubernetes/kubernetes/pull/47356), [@dashpole](https://github.com/dashpole)) +* kubectl logs with label selector supports specifying a container name ([#44282](https://github.com/kubernetes/kubernetes/pull/44282), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* Adds an approval work flow to the the certificate approver that will approve certificate signing requests from kubelets that meet all the criteria of kubelet server certificates. ([#46884](https://github.com/kubernetes/kubernetes/pull/46884), [@jcbsmpsn](https://github.com/jcbsmpsn)) +* AWS: Maintain a cache of all instances, to fix problem with > 200 nodes with ELBs ([#47410](https://github.com/kubernetes/kubernetes/pull/47410), [@justinsb](https://github.com/justinsb)) +* Bump GLBC version to 0.9.5 - fixes [loss of manually modified GCLB health check settings](https://github.com/kubernetes/kubernetes/issues/47559) upon upgrade from pre-1.6.4 to either 1.6.4 or 1.6.5. ([#47567](https://github.com/kubernetes/kubernetes/pull/47567), [@nicksardo](https://github.com/nicksardo)) +* Update cluster-proportional-autoscaler, metadata-proxy, and fluentd-gcp addons with fixes for CVE-2016-4448, CVE-2016-8859, CVE-2016-9841, CVE-2016-9843, and CVE-2017-9526. ([#47545](https://github.com/kubernetes/kubernetes/pull/47545), [@ixdy](https://github.com/ixdy)) +* AWS: Batch DescribeInstance calls with nodeNames to 150 limit, to stay within AWS filter limits. ([#47516](https://github.com/kubernetes/kubernetes/pull/47516), [@gnufied](https://github.com/gnufied)) + + + +# v1.8.0-alpha.1 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/master/examples) + +## Downloads for v1.8.0-alpha.1 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.8.0-alpha.1/kubernetes.tar.gz) | `47088d4a0b79ce75a90e73b1dd7f864fc17fe5ff5cea553a072c7a277a70a104` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.8.0-alpha.1/kubernetes-src.tar.gz) | `ec2cb19b55e24c7b9728437fb9e39a442c07b68eaea636b2f6bb340e4b9696dc` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.8.0-alpha.1/kubernetes-client-darwin-386.tar.gz) | `c2fb538ce73f0ed74bd343485cd8873efcff580e4d948ea4bf2732f1b059e463` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.8.0-alpha.1/kubernetes-client-darwin-amd64.tar.gz) | `01a1cb673fbb764e47edaea07c1d3fdddd99bbd7b025f9b2498f38c99d5be4b2` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.8.0-alpha.1/kubernetes-client-linux-386.tar.gz) | `5bebebf12fb39db8be10f9758a92ce385013d07e629741421b09da88bd9fc0f1` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.8.0-alpha.1/kubernetes-client-linux-amd64.tar.gz) | `b02ae110b3694562b195189c3cb8eca21095153d0cb5552360053304dee425f1` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.8.0-alpha.1/kubernetes-client-linux-arm64.tar.gz) | `e6220b9e62856ad8345cb845c1365b3f177ee22d6f9718f11a1f373d7a70fd21` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.8.0-alpha.1/kubernetes-client-linux-arm.tar.gz) | `e35c62a3781841898c91724af136fbb35fd99cf15ca5ec947c1a4bc2f6e4a73d` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.8.0-alpha.1/kubernetes-client-linux-ppc64le.tar.gz) | `7b02c25a764bd367e9931006def88d3fc03cf9e846cce2e77cfbc95f0e206433` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.8.0-alpha.1/kubernetes-client-linux-s390x.tar.gz) | `ab6ba1bf43dd28c776a8cc5cae44413c45a7405f2996c277aba5ee3f6f73e305` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.8.0-alpha.1/kubernetes-client-windows-386.tar.gz) | `eb1516db15807111ef03547b0104dcb89a310481ef8f867a65f3c57f20f56e30` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.8.0-alpha.1/kubernetes-client-windows-amd64.tar.gz) | `525e599a2846fe166a5f1eb14483edee9d6b866aa096e16896f6544afad31768` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.8.0-alpha.1/kubernetes-server-linux-amd64.tar.gz) | `bb0a37bb1fefa735ec1eb651fec60c22b180c9bca1bd5e0317e1bcdbf4aa0819` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.8.0-alpha.1/kubernetes-server-linux-arm64.tar.gz) | `68fd804bd1f4d944a25112a67ef8b1cbae55051b110134850715b6f51f93f40c` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.8.0-alpha.1/kubernetes-server-linux-arm.tar.gz) | `822161bee3e8b3b64bb7cea297264729b3cc6d6a008c86f16b4aef16cde5b0de` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.8.0-alpha.1/kubernetes-server-linux-ppc64le.tar.gz) | `9354336df2694427e3d6bc9b0b1fe286f3f9a7f6ef8f239bd6319b4af1c02162` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.8.0-alpha.1/kubernetes-server-linux-s390x.tar.gz) | `d4a87e3713f190a4cc7db1f43a6105c3c95e1eb8de45ae269b9bd1ecd52296ce` + +### Node Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.8.0-alpha.1/kubernetes-node-linux-amd64.tar.gz) | `dc7c5865041008fcfdad050380fb33c23a361f7a1f4fbce78b164e2906a1b7f9` +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.8.0-alpha.1/kubernetes-node-linux-arm64.tar.gz) | `d572cec5ec679e5543e9ee5e2529a51bb8d5ca5f3773e4218c5491a0bd77b7a4` +[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.8.0-alpha.1/kubernetes-node-linux-arm.tar.gz) | `4b0fae35ed01ca66fb0f82ea2ea7f804378f592d0c15425dc3934f4b7b6f19a8` +[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.8.0-alpha.1/kubernetes-node-linux-ppc64le.tar.gz) | `d5684a2d1a640e7b0fdf82a3faa0edef2b20e50a83ff6baea461699b0d74b583` +[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.8.0-alpha.1/kubernetes-node-linux-s390x.tar.gz) | `bb444cc79035044cfb58cbe3d7bccd7998522dcf6d993441cf29fd03c249897c` +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.8.0-alpha.1/kubernetes-node-windows-amd64.tar.gz) | `9b54e823c504601193b5ae2d37cb1d297ae9b5acfa1497b6f530a835071a7b6d` + +## Changelog since v1.7.0-alpha.4 + +### Action Required + +* The following alpha API groups were unintentionally enabled by default in previous releases, and will no longer be enabled by default in v1.8: ([#47690](https://github.com/kubernetes/kubernetes/pull/47690), [@caesarxuchao](https://github.com/caesarxuchao)) + * rbac.authorization.k8s.io/v1alpha1 + * settings.k8s.io/v1alpha1 + * If you wish to continue using them in v1.8, please enable them explicitly using the `--runtime-config` flag of the apiserver (for example, `--runtime-config="rbac.authorization.k8s.io/v1alpha1,settings.k8s.io/v1alpha1"`) +* Paths containing backsteps (for example, "../bar") are no longer allowed in hostPath volume paths, or in volumeMount subpaths ([#47290](https://github.com/kubernetes/kubernetes/pull/47290), [@jhorwit2](https://github.com/jhorwit2)) +* Azure: Change container permissions to private for provisioned volumes. If you have existing Azure volumes that were created by Kubernetes v1.6.0-v1.6.5, you should change the permissions on them manually. ([#47605](https://github.com/kubernetes/kubernetes/pull/47605), [@brendandburns](https://github.com/brendandburns)) +* New and upgraded 1.7 GCE/GKE clusters no longer have an RBAC ClusterRoleBinding that grants the `cluster-admin` ClusterRole to the `default` service account in the `kube-system` namespace. ([#46750](https://github.com/kubernetes/kubernetes/pull/46750), [@cjcullen](https://github.com/cjcullen)) + * If this permission is still desired, run the following command to explicitly grant it, either before or after upgrading to 1.7: + * kubectl create clusterrolebinding kube-system-default --serviceaccount=kube-system:default --clusterrole=cluster-admin +* kube-apiserver: a new authorization mode (`--authorization-mode=Node`) authorizes nodes to access secrets, configmaps, persistent volume claims and persistent volumes related to their pods. ([#46076](https://github.com/kubernetes/kubernetes/pull/46076), [@liggitt](https://github.com/liggitt)) + * Nodes must use client credentials that place them in the `system:nodes` group with a username of `system:node:<nodeName>` in order to be authorized by the node authorizer (the credentials obtained by the kubelet via TLS bootstrapping satisfy these requirements) + * When used in combination with the `RBAC` authorization mode (`--authorization-mode=Node,RBAC`), the `system:node` role is no longer automatically granted to the `system:nodes` group. +* kube-controller-manager has dropped support for the `--insecure-experimental-approve-all-kubelet-csrs-for-group` flag. Instead, the `csrapproving` controller uses authorization checks to determine whether to approve certificate signing requests: ([#45619](https://github.com/kubernetes/kubernetes/pull/45619), [@mikedanese](https://github.com/mikedanese)) + * requests for a TLS client certificate for any node are approved if the CSR creator has `create` permission on the `certificatesigningrequests` resource and `nodeclient` subresource in the `certificates.k8s.io` API group + * requests from a node for a TLS client certificate for itself are approved if the CSR creator has `create` permission on the `certificatesigningrequests` resource and the `selfnodeclient` subresource in the `certificates.k8s.io` API group + * requests from a node for a TLS serving certificate for itself are approved if the CSR creator has `create` permission on the `certificatesigningrequests` resource and the `selfnodeserver` subresource in the `certificates.k8s.io` API group +* Support updating storageclasses in etcd to storage.k8s.io/v1. You must do this prior to upgrading to 1.8. ([#46116](https://github.com/kubernetes/kubernetes/pull/46116), [@ncdc](https://github.com/ncdc)) +* The namespace API object no longer supports the deletecollection operation. ([#46407](https://github.com/kubernetes/kubernetes/pull/46407), [@liggitt](https://github.com/liggitt)) +* NetworkPolicy has been moved from `extensions/v1beta1` to the new ([#39164](https://github.com/kubernetes/kubernetes/pull/39164), [@danwinship](https://github.com/danwinship)) + `networking.k8s.io/v1` API group. The structure remains unchanged from + the beta1 API. + The `net.beta.kubernetes.io/network-policy` annotation on Namespaces + to opt in to isolation has been removed. Instead, isolation is now + determined at a per-pod level, with pods being isolated if there is + any NetworkPolicy whose spec.podSelector targets them. Pods that are + targeted by NetworkPolicies accept traffic that is accepted by any of + the NetworkPolicies (and nothing else), and pods that are not targeted + by any NetworkPolicy accept all traffic by default. + Action Required: + When upgrading to Kubernetes 1.7 (and a network plugin that supports + the new NetworkPolicy v1 semantics), to ensure full behavioral + compatibility with v1beta1: + 1. In Namespaces that previously had the "DefaultDeny" annotation, + you can create equivalent v1 semantics by creating a + NetworkPolicy that matches all pods but does not allow any + traffic: + + ```yaml + kind: NetworkPolicy + apiVersion: networking.k8s.io/v1 + metadata: + name: default-deny + spec: + podSelector: + ``` + + This will ensure that pods that aren't matched by any other + NetworkPolicy will continue to be fully-isolated, as they were + before. + 2. In Namespaces that previously did not have the "DefaultDeny" + annotation, you should delete any existing NetworkPolicy + objects. These would have had no effect before, but with v1 + semantics they might cause some traffic to be blocked that you + didn't intend to be blocked. + +### Other notable changes + +* kubectl logs with label selector supports specifying a container name ([#44282](https://github.com/kubernetes/kubernetes/pull/44282), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* Adds an approval work flow to the the certificate approver that will approve certificate signing requests from kubelets that meet all the criteria of kubelet server certificates. ([#46884](https://github.com/kubernetes/kubernetes/pull/46884), [@jcbsmpsn](https://github.com/jcbsmpsn)) +* AWS: Maintain a cache of all instances, to fix problem with > 200 nodes with ELBs ([#47410](https://github.com/kubernetes/kubernetes/pull/47410), [@justinsb](https://github.com/justinsb)) +* Bump GLBC version to 0.9.5 - fixes [loss of manually modified GCLB health check settings](https://github.com/kubernetes/kubernetes/issues/47559) upon upgrade from pre-1.6.4 to either 1.6.4 or 1.6.5. ([#47567](https://github.com/kubernetes/kubernetes/pull/47567), [@nicksardo](https://github.com/nicksardo)) +* Update cluster-proportional-autoscaler, metadata-proxy, and fluentd-gcp addons with fixes for CVE-2016-4448, CVE-2016-8859, CVE-2016-9841, CVE-2016-9843, and CVE-2017-9526. ([#47545](https://github.com/kubernetes/kubernetes/pull/47545), [@ixdy](https://github.com/ixdy)) +* AWS: Batch DescribeInstance calls with nodeNames to 150 limit, to stay within AWS filter limits. ([#47516](https://github.com/kubernetes/kubernetes/pull/47516), [@gnufied](https://github.com/gnufied)) +* AWS: Process disk attachments even with duplicate NodeNames ([#47406](https://github.com/kubernetes/kubernetes/pull/47406), [@justinsb](https://github.com/justinsb)) +* kubefed will now configure NodeInternalIP as the federation API server endpoint when NodeExternalIP is unavailable for federation API servers exposed as NodePort services ([#46960](https://github.com/kubernetes/kubernetes/pull/46960), [@lukaszo](https://github.com/lukaszo)) +* PodSecurityPolicy now recognizes pods that specify `runAsNonRoot: false` in their security context and does not overwrite the specified value ([#47073](https://github.com/kubernetes/kubernetes/pull/47073), [@Q-Lee](https://github.com/Q-Lee)) +* Bump GLBC version to 0.9.4 ([#47468](https://github.com/kubernetes/kubernetes/pull/47468), [@nicksardo](https://github.com/nicksardo)) +* Stackdriver Logging deployment exposes metrics on node port 31337 when enabled. ([#47402](https://github.com/kubernetes/kubernetes/pull/47402), [@crassirostris](https://github.com/crassirostris)) +* Update to kube-addon-manager:v6.4-beta.2: kubectl v1.6.4 and refreshed base images ([#47389](https://github.com/kubernetes/kubernetes/pull/47389), [@ixdy](https://github.com/ixdy)) +* Enable iptables -w in kubeadm selfhosted ([#46372](https://github.com/kubernetes/kubernetes/pull/46372), [@cmluciano](https://github.com/cmluciano)) +* Azure plugin for client auth ([#43987](https://github.com/kubernetes/kubernetes/pull/43987), [@cosmincojocar](https://github.com/cosmincojocar)) +* Fix dynamic provisioning of PVs with inaccurate AccessModes by refusing to provision when PVCs ask for AccessModes that can't be satisfied by the PVs' underlying volume plugin ([#47274](https://github.com/kubernetes/kubernetes/pull/47274), [@wongma7](https://github.com/wongma7)) +* AWS: Avoid spurious ELB listener recreation - ignore case when matching protocol ([#47391](https://github.com/kubernetes/kubernetes/pull/47391), [@justinsb](https://github.com/justinsb)) +* gce kube-up: The `Node` authorization mode and `NodeRestriction` admission controller are now enabled ([#46796](https://github.com/kubernetes/kubernetes/pull/46796), [@mikedanese](https://github.com/mikedanese)) +* update gophercloud/gophercloud dependency for reauthentication fixes ([#45545](https://github.com/kubernetes/kubernetes/pull/45545), [@stuart-warren](https://github.com/stuart-warren)) +* fix sync loop health check with separating runtime errors ([#47124](https://github.com/kubernetes/kubernetes/pull/47124), [@andyxning](https://github.com/andyxning)) +* servicecontroller: Fix node selection logic on initial LB creation ([#45773](https://github.com/kubernetes/kubernetes/pull/45773), [@justinsb](https://github.com/justinsb)) +* Fix iSCSI iSER mounting. ([#47281](https://github.com/kubernetes/kubernetes/pull/47281), [@mtanino](https://github.com/mtanino)) +* StorageOS Volume Driver ([#42156](https://github.com/kubernetes/kubernetes/pull/42156), [@croomes](https://github.com/croomes)) + * [StorageOS](http://www.storageos.com) can be used as a storage provider for Kubernetes. With StorageOS, capacity from local or attached storage is pooled across the cluster, providing converged infrastructure for cloud-native applications. +* CRI has been moved to package `pkg/kubelet/apis/cri/v1alpha1/runtime`. ([#47113](https://github.com/kubernetes/kubernetes/pull/47113), [@feiskyer](https://github.com/feiskyer)) +* Make gcp auth provider not to override the Auth header if it's already exits ([#45575](https://github.com/kubernetes/kubernetes/pull/45575), [@wanghaoran1988](https://github.com/wanghaoran1988)) +* Allow pods to opt out of PodPreset mutation via an annotation on the pod. ([#44965](https://github.com/kubernetes/kubernetes/pull/44965), [@jpeeler](https://github.com/jpeeler)) +* Add Traditional Chinese translation for kubectl ([#46559](https://github.com/kubernetes/kubernetes/pull/46559), [@warmchang](https://github.com/warmchang)) +* Remove Initializers from admission-control in kubernetes-master charm for pre-1.7 ([#46987](https://github.com/kubernetes/kubernetes/pull/46987), [@Cynerva](https://github.com/Cynerva)) +* Added state guards to the idle_status messaging in the kubernetes-master charm to make deployment faster on initial deployment. ([#47183](https://github.com/kubernetes/kubernetes/pull/47183), [@chuckbutler](https://github.com/chuckbutler)) +* Bump up Node Problem Detector version to v0.4.0, which added support of parsing log from /dev/kmsg and ABRT. ([#46743](https://github.com/kubernetes/kubernetes/pull/46743), [@Random-Liu](https://github.com/Random-Liu)) +* kubeadm: Enable the Node Authorizer/Admission plugin in v1.7 ([#46879](https://github.com/kubernetes/kubernetes/pull/46879), [@luxas](https://github.com/luxas)) +* Deprecated Binding objects in 1.7. ([#47041](https://github.com/kubernetes/kubernetes/pull/47041), [@k82cn](https://github.com/k82cn)) +* Add secretbox and AES-CBC encryption modes to at rest encryption. AES-CBC is considered superior to AES-GCM because it is resistant to nonce-reuse attacks, and secretbox uses Poly1305 and XSalsa20. ([#46916](https://github.com/kubernetes/kubernetes/pull/46916), [@smarterclayton](https://github.com/smarterclayton)) +* The HorizontalPodAutoscaler controller will now only send updates when it has new status information, reducing the number of writes caused by the controller. ([#47078](https://github.com/kubernetes/kubernetes/pull/47078), [@DirectXMan12](https://github.com/DirectXMan12)) +* gpusInUse info error when kubelet restarts ([#46087](https://github.com/kubernetes/kubernetes/pull/46087), [@tianshapjq](https://github.com/tianshapjq)) +* kubeadm: Modifications to cluster-internal resources installed by kubeadm will be overwritten when upgrading from v1.6 to v1.7. ([#47081](https://github.com/kubernetes/kubernetes/pull/47081), [@luxas](https://github.com/luxas)) +* Added exponential backoff to Azure cloudprovider ([#46660](https://github.com/kubernetes/kubernetes/pull/46660), [@jackfrancis](https://github.com/jackfrancis)) +* fixed HostAlias in PodSpec to allow `foo.bar` hostnames instead of just `foo` DNS labels. ([#46809](https://github.com/kubernetes/kubernetes/pull/46809), [@rickypai](https://github.com/rickypai)) +* Implements rolling update for StatefulSets. Updates can be performed using the RollingUpdate, Paritioned, or OnDelete strategies. OnDelete implements the manual behavior from 1.6. status now tracks ([#46669](https://github.com/kubernetes/kubernetes/pull/46669), [@kow3ns](https://github.com/kow3ns)) + * replicas, readyReplicas, currentReplicas, and updatedReplicas. The semantics of replicas is now consistent with DaemonSet and ReplicaSet, and readyReplicas has the semantics that replicas did prior to this release. +* Add Japanese translation for kubectl ([#46756](https://github.com/kubernetes/kubernetes/pull/46756), [@girikuncoro](https://github.com/girikuncoro)) +* federation: Add admission controller for policy-based placement ([#44786](https://github.com/kubernetes/kubernetes/pull/44786), [@tsandall](https://github.com/tsandall)) +* Get command uses OpenAPI schema to enhance display for a resource if run with flag 'use-openapi-print-columns'. ([#46235](https://github.com/kubernetes/kubernetes/pull/46235), [@droot](https://github.com/droot)) + * An example command: + * kubectl get pods --use-openapi-print-columns +* add gzip compression to GET and LIST requests ([#45666](https://github.com/kubernetes/kubernetes/pull/45666), [@ilackarms](https://github.com/ilackarms)) +* Fix the bug where container cannot run as root when SecurityContext.RunAsNonRoot is false. ([#47009](https://github.com/kubernetes/kubernetes/pull/47009), [@yujuhong](https://github.com/yujuhong)) +* Fixes a bug with cAdvisorPort in the KubeletConfiguration that prevented setting it to 0, which is in fact a valid option, as noted in issue [#11710](https://github.com/kubernetes/kubernetes/pull/11710). ([#46876](https://github.com/kubernetes/kubernetes/pull/46876), [@mtaufen](https://github.com/mtaufen)) +* Stackdriver cluster logging now deploys a new component to export Kubernetes events. ([#46700](https://github.com/kubernetes/kubernetes/pull/46700), [@crassirostris](https://github.com/crassirostris)) +* Alpha feature: allows users to set storage limit to isolate EmptyDir volumes. It enforces the limit by evicting pods that exceed their storage limits ([#45686](https://github.com/kubernetes/kubernetes/pull/45686), [@jingxu97](https://github.com/jingxu97)) +* Adds the `Categories []string` field to API resources, which represents the list of group aliases (e.g. "all") that every resource belongs to. ([#43338](https://github.com/kubernetes/kubernetes/pull/43338), [@fabianofranz](https://github.com/fabianofranz)) +* Promote kubelet tls bootstrap to beta. Add a non-experimental flag to use it and deprecate the old flag. ([#46799](https://github.com/kubernetes/kubernetes/pull/46799), [@mikedanese](https://github.com/mikedanese)) +* Fix disk partition discovery for brtfs ([#46816](https://github.com/kubernetes/kubernetes/pull/46816), [@dashpole](https://github.com/dashpole)) + * Add ZFS support + * Add overlay2 storage driver support +* Support creation of GCP Internal Load Balancers from Service objects ([#46663](https://github.com/kubernetes/kubernetes/pull/46663), [@nicksardo](https://github.com/nicksardo)) +* Introduces status conditions to the HorizontalPodAutoscaler in autoscaling/v2alpha1, indicating the current status of a given HorizontalPodAutoscaler, and why it is or is not scaling. ([#46550](https://github.com/kubernetes/kubernetes/pull/46550), [@DirectXMan12](https://github.com/DirectXMan12)) +* Support OpenAPI spec aggregation for kube-aggregator ([#46734](https://github.com/kubernetes/kubernetes/pull/46734), [@mbohlool](https://github.com/mbohlool)) +* Implement kubectl rollout undo and history for DaemonSet ([#46144](https://github.com/kubernetes/kubernetes/pull/46144), [@janetkuo](https://github.com/janetkuo)) +* Respect PDBs during node upgrades and add test coverage to the ServiceTest upgrade test. ([#45748](https://github.com/kubernetes/kubernetes/pull/45748), [@mml](https://github.com/mml)) +* Disk Pressure triggers the deletion of terminated containers on the node. ([#45896](https://github.com/kubernetes/kubernetes/pull/45896), [@dashpole](https://github.com/dashpole)) +* Add the `alpha.image-policy.k8s.io/failed-open=true` annotation when the image policy webhook encounters an error and fails open. ([#46264](https://github.com/kubernetes/kubernetes/pull/46264), [@Q-Lee](https://github.com/Q-Lee)) +* Enable kubelet csr bootstrap in GCE/GKE ([#40760](https://github.com/kubernetes/kubernetes/pull/40760), [@mikedanese](https://github.com/mikedanese)) +* Implement Daemonset history ([#45924](https://github.com/kubernetes/kubernetes/pull/45924), [@janetkuo](https://github.com/janetkuo)) +* When switching from the `service.beta.kubernetes.io/external-traffic` annotation to the new ([#46716](https://github.com/kubernetes/kubernetes/pull/46716), [@thockin](https://github.com/thockin)) + * `externalTrafficPolicy` field, the values chnag as follows: + * "OnlyLocal" becomes "Local" + * "Global" becomes "Cluster". +* Fix kubelet reset liveness probe failure count across pod restart boundaries ([#46371](https://github.com/kubernetes/kubernetes/pull/46371), [@sjenning](https://github.com/sjenning)) +* The gce metadata server can be hidden behind a proxy, hiding the kubelet's token. ([#45565](https://github.com/kubernetes/kubernetes/pull/45565), [@Q-Lee](https://github.com/Q-Lee)) +* AWS: Allow configuration of a single security group for ELBs ([#45500](https://github.com/kubernetes/kubernetes/pull/45500), [@nbutton23](https://github.com/nbutton23)) +* Allow remote admission controllers to be dynamically added and removed by administrators. External admission controllers make an HTTP POST containing details of the requested action which the service can approve or reject. ([#46388](https://github.com/kubernetes/kubernetes/pull/46388), [@lavalamp](https://github.com/lavalamp)) +* iscsi storage plugin: Fix dangling session when using multiple target portal addresses. ([#46239](https://github.com/kubernetes/kubernetes/pull/46239), [@mtanino](https://github.com/mtanino)) +* Duplicate recurring Events now include the latest event's Message string ([#46034](https://github.com/kubernetes/kubernetes/pull/46034), [@kensimon](https://github.com/kensimon)) +* With --feature-gates=RotateKubeletClientCertificate=true set, the kubelet will ([#41912](https://github.com/kubernetes/kubernetes/pull/41912), [@jcbsmpsn](https://github.com/jcbsmpsn)) + * request a client certificate from the API server during the boot cycle and pause + * waiting for the request to be satisfied. It will continually refresh the certificate + * as the certificates expiration approaches. +* The Kubernetes API supports retrieving tabular output for API resources via a new mime-type `application/json;as=Table;v=v1alpha1;g=meta.k8s.io`. The returned object (if the server supports it) will be of type `meta.k8s.io/v1alpha1` with `Table`, and contain column and row information related to the resource. Each row will contain information about the resource - by default it will be the object metadata, but callers can add the `?includeObject=Object` query parameter and receive the full object. In the future kubectl will use this to retrieve the results of `kubectl get`. ([#40848](https://github.com/kubernetes/kubernetes/pull/40848), [@smarterclayton](https://github.com/smarterclayton)) +* This change add nonResourceURL to kubectl auth cani ([#46432](https://github.com/kubernetes/kubernetes/pull/46432), [@CaoShuFeng](https://github.com/CaoShuFeng)) +* Webhook added to the API server which omits structured audit log events. ([#45919](https://github.com/kubernetes/kubernetes/pull/45919), [@ericchiang](https://github.com/ericchiang)) +* By default, --low-diskspace-threshold-mb is not set, and --eviction-hard includes "nodefs.available<10%,nodefs.inodesFree<5%" ([#46448](https://github.com/kubernetes/kubernetes/pull/46448), [@dashpole](https://github.com/dashpole)) +* kubectl edit and kubectl apply will keep the ordering of elements in merged lists ([#45980](https://github.com/kubernetes/kubernetes/pull/45980), [@mengqiy](https://github.com/mengqiy)) +* [Federation][kubefed]: Use StorageClassName for etcd pvc ([#46323](https://github.com/kubernetes/kubernetes/pull/46323), [@marun](https://github.com/marun)) +* Restrict active deadline seconds max allowed value to be maximum uint32 ([#46640](https://github.com/kubernetes/kubernetes/pull/46640), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* Implement kubectl get controllerrevisions ([#46655](https://github.com/kubernetes/kubernetes/pull/46655), [@janetkuo](https://github.com/janetkuo)) +* Local storage plugin ([#44897](https://github.com/kubernetes/kubernetes/pull/44897), [@msau42](https://github.com/msau42)) +* With `--feature-gates=RotateKubeletServerCertificate=true` set, the kubelet will ([#45059](https://github.com/kubernetes/kubernetes/pull/45059), [@jcbsmpsn](https://github.com/jcbsmpsn)) + * request a server certificate from the API server during the boot cycle and pause + * waiting for the request to be satisfied. It will continually refresh the certificate as + * the certificates expiration approaches. +* Allow PSP's to specify a whitelist of allowed paths for host volume based on path prefixes ([#43946](https://github.com/kubernetes/kubernetes/pull/43946), [@jhorwit2](https://github.com/jhorwit2)) +* Add `kubectl config rename-context` ([#46114](https://github.com/kubernetes/kubernetes/pull/46114), [@arthur0](https://github.com/arthur0)) +* Fix AWS EBS volumes not getting detached from node if routine to verify volumes are attached runs while the node is down ([#46463](https://github.com/kubernetes/kubernetes/pull/46463), [@wongma7](https://github.com/wongma7)) +* Move hardPodAffinitySymmetricWeight to scheduler policy config ([#44159](https://github.com/kubernetes/kubernetes/pull/44159), [@wanghaoran1988](https://github.com/wanghaoran1988)) +* AWS: support node port health check ([#43585](https://github.com/kubernetes/kubernetes/pull/43585), [@foolusion](https://github.com/foolusion)) +* Add generic Toleration for NoExecute Taints to NodeProblemDetector ([#45883](https://github.com/kubernetes/kubernetes/pull/45883), [@gmarek](https://github.com/gmarek)) +* support replaceKeys patch strategy and directive for strategic merge patch ([#44597](https://github.com/kubernetes/kubernetes/pull/44597), [@mengqiy](https://github.com/mengqiy)) +* Augment CRI to support retrieving container stats from the runtime. ([#45614](https://github.com/kubernetes/kubernetes/pull/45614), [@yujuhong](https://github.com/yujuhong)) +* Prevent kubelet from setting allocatable < 0 for a resource upon initial creation. ([#46516](https://github.com/kubernetes/kubernetes/pull/46516), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* add --non-resource-url to kubectl create clusterrole ([#45809](https://github.com/kubernetes/kubernetes/pull/45809), [@CaoShuFeng](https://github.com/CaoShuFeng)) +* Add `kubectl apply edit-last-applied` subcommand ([#42256](https://github.com/kubernetes/kubernetes/pull/42256), [@shiywang](https://github.com/shiywang)) +* Adding admissionregistration API group which enables dynamic registration of initializers and external admission webhooks. It is an alpha feature. ([#46294](https://github.com/kubernetes/kubernetes/pull/46294), [@caesarxuchao](https://github.com/caesarxuchao)) +* Fix log spam due to unnecessary status update when node is deleted. ([#45923](https://github.com/kubernetes/kubernetes/pull/45923), [@verult](https://github.com/verult)) +* GCE installs will now avoid IP masquerade for all RFC-1918 IP blocks, rather than just 10.0.0.0/8. This means that clusters can ([#46473](https://github.com/kubernetes/kubernetes/pull/46473), [@thockin](https://github.com/thockin)) + * be created in 192.168.0.0./16 and 172.16.0.0/12 while preserving the container IPs (which would be lost before). +* `set selector` and `set subject` no longer print "running in local/dry-run mode..." at the top, so their output can be piped as valid yaml or json ([#46507](https://github.com/kubernetes/kubernetes/pull/46507), [@bboreham](https://github.com/bboreham)) +* ControllerRevision type added for StatefulSet and DaemonSet history. ([#45867](https://github.com/kubernetes/kubernetes/pull/45867), [@kow3ns](https://github.com/kow3ns)) +* Bump Go version to 1.8.3 ([#46429](https://github.com/kubernetes/kubernetes/pull/46429), [@wojtek-t](https://github.com/wojtek-t)) +* Upgrade Elasticsearch Addon to v5.4.0 ([#45589](https://github.com/kubernetes/kubernetes/pull/45589), [@it-svit](https://github.com/it-svit)) +* PodDisruptionBudget now uses ControllerRef to decide which controller owns a given Pod, so it doesn't get confused by controllers with overlapping selectors. ([#45003](https://github.com/kubernetes/kubernetes/pull/45003), [@krmayankk](https://github.com/krmayankk)) +* aws: Support for ELB tagging by users ([#45932](https://github.com/kubernetes/kubernetes/pull/45932), [@lpabon](https://github.com/lpabon)) +* Portworx volume driver no longer has to run on the master. ([#45518](https://github.com/kubernetes/kubernetes/pull/45518), [@harsh-px](https://github.com/harsh-px)) +* kube-proxy: ratelimit runs of iptables by sync-period flags ([#46266](https://github.com/kubernetes/kubernetes/pull/46266), [@thockin](https://github.com/thockin)) +* Deployments are updated to use (1) a more stable hashing algorithm (fnv) than the previous one (adler) and (2) a hashing collision avoidance mechanism that will ensure new rollouts will not block on hashing collisions anymore. ([#44774](https://github.com/kubernetes/kubernetes/pull/44774), [@kargakis](https://github.com/kargakis)) +* The Prometheus metrics for the kube-apiserver for tracking incoming API requests and latencies now return the `subresource` label for correctly attributing the type of API call. ([#46354](https://github.com/kubernetes/kubernetes/pull/46354), [@smarterclayton](https://github.com/smarterclayton)) +* Add Simplified Chinese translation for kubectl ([#45573](https://github.com/kubernetes/kubernetes/pull/45573), [@shiywang](https://github.com/shiywang)) +* The --namespace flag is now honored for in-cluster clients that have an empty configuration. ([#46299](https://github.com/kubernetes/kubernetes/pull/46299), [@ncdc](https://github.com/ncdc)) +* Fix init container status reporting when active deadline is exceeded. ([#46305](https://github.com/kubernetes/kubernetes/pull/46305), [@sjenning](https://github.com/sjenning)) +* Improves performance of Cinder volume attach/detach operations ([#41785](https://github.com/kubernetes/kubernetes/pull/41785), [@jamiehannaford](https://github.com/jamiehannaford)) +* GCE and AWS dynamic provisioners extension: admins can configure zone(s) in which a persistent volume shall be created. ([#38505](https://github.com/kubernetes/kubernetes/pull/38505), [@pospispa](https://github.com/pospispa)) +* Break the 'certificatesigningrequests' controller into a 'csrapprover' controller and 'csrsigner' controller. ([#45514](https://github.com/kubernetes/kubernetes/pull/45514), [@mikedanese](https://github.com/mikedanese)) +* Modifies kubefed to create and the federation controller manager to use credentials associated with a service account rather than the user's credentials. ([#42042](https://github.com/kubernetes/kubernetes/pull/42042), [@perotinus](https://github.com/perotinus)) +* Adds a MaxUnavailable field to PodDisruptionBudget ([#45587](https://github.com/kubernetes/kubernetes/pull/45587), [@foxish](https://github.com/foxish)) +* The behavior of some watch calls to the server when filtering on fields was incorrect. If watching objects with a filter, when an update was made that no longer matched the filter a DELETE event was correctly sent. However, the object that was returned by that delete was not the (correct) version before the update, but instead, the newer version. That meant the new object was not matched by the filter. This was a regression from behavior between cached watches on the server side and uncached watches, and thus broke downstream API clients. ([#46223](https://github.com/kubernetes/kubernetes/pull/46223), [@smarterclayton](https://github.com/smarterclayton)) +* vSphere cloud provider: vSphere Storage policy Support for dynamic volume provisioning ([#46176](https://github.com/kubernetes/kubernetes/pull/46176), [@BaluDontu](https://github.com/BaluDontu)) +* Add support for emitting metrics from openstack cloudprovider about storage operations. ([#46008](https://github.com/kubernetes/kubernetes/pull/46008), [@NickrenREN](https://github.com/NickrenREN)) +* 'kubefed init' now supports overriding the default etcd image name with the --etcd-image parameter. ([#46247](https://github.com/kubernetes/kubernetes/pull/46247), [@marun](https://github.com/marun)) +* remove the elasticsearch template ([#45952](https://github.com/kubernetes/kubernetes/pull/45952), [@harryge00](https://github.com/harryge00)) +* Adds the `CustomResourceDefinition` (crd) types to the `kube-apiserver`. These are the successors to `ThirdPartyResource`. See https://github.com/kubernetes/community/blob/master/contributors/design-proposals/thirdpartyresources.md for more details. ([#46055](https://github.com/kubernetes/kubernetes/pull/46055), [@deads2k](https://github.com/deads2k)) +* StatefulSets now include an alpha scaling feature accessible by setting the `spec.podManagementPolicy` field to `Parallel`. The controller will not wait for pods to be ready before adding the other pods, and will replace deleted pods as needed. Since parallel scaling creates pods out of order, you cannot depend on predictable membership changes within your set. ([#44899](https://github.com/kubernetes/kubernetes/pull/44899), [@smarterclayton](https://github.com/smarterclayton)) +* fix kubelet event recording for selected events. ([#46246](https://github.com/kubernetes/kubernetes/pull/46246), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* Moved qos to api.helpers. ([#44906](https://github.com/kubernetes/kubernetes/pull/44906), [@k82cn](https://github.com/k82cn)) +* Kubelet PLEG updates the relist timestamp only after successfully relisting. ([#45496](https://github.com/kubernetes/kubernetes/pull/45496), [@andyxning](https://github.com/andyxning)) +* OpenAPI spec is now available in protobuf binary and gzip format (with ETag support) ([#45836](https://github.com/kubernetes/kubernetes/pull/45836), [@mbohlool](https://github.com/mbohlool)) +* Added support to a hierarchy of kubectl plugins (a tree of plugins as children of other plugins). ([#45981](https://github.com/kubernetes/kubernetes/pull/45981), [@fabianofranz](https://github.com/fabianofranz)) + * Added exported env vars to kubectl plugins so that plugin developers have access to global flags, namespace, the plugin descriptor and the full path to the caller binary. +* Ignored mirror pods in PodPreset admission plugin. ([#45958](https://github.com/kubernetes/kubernetes/pull/45958), [@k82cn](https://github.com/k82cn)) +* Don't try to attach volume to new node if it is already attached to another node and the volume does not support multi-attach. ([#45346](https://github.com/kubernetes/kubernetes/pull/45346), [@codablock](https://github.com/codablock)) +* The Calico version included in kube-up for GCE has been updated to v2.2. ([#38169](https://github.com/kubernetes/kubernetes/pull/38169), [@caseydavenport](https://github.com/caseydavenport)) +* Kubelet: Fix image garbage collector attempting to remove in-use images. ([#46121](https://github.com/kubernetes/kubernetes/pull/46121), [@Random-Liu](https://github.com/Random-Liu)) +* Add ip-masq-agent addon to the addons folder which is used in GCE if --non-masquerade-cidr is set to 0/0 ([#46038](https://github.com/kubernetes/kubernetes/pull/46038), [@dnardo](https://github.com/dnardo)) +* Fix serialization of EnforceNodeAllocatable ([#44606](https://github.com/kubernetes/kubernetes/pull/44606), [@ivan4th](https://github.com/ivan4th)) +* Add --write-config-to flag to kube-proxy to allow users to write the default configuration settings to a file. ([#45908](https://github.com/kubernetes/kubernetes/pull/45908), [@ncdc](https://github.com/ncdc)) +* The `NodeRestriction` admission plugin limits the `Node` and `Pod` objects a kubelet can modify. In order to be limited by this admission plugin, kubelets must use credentials in the `system:nodes` group, with a username in the form `system:node:<nodeName>`. Such kubelets will only be allowed to modify their own `Node` API object, and only modify `Pod` API objects that are bound to their node. ([#45929](https://github.com/kubernetes/kubernetes/pull/45929), [@liggitt](https://github.com/liggitt)) +* vSphere cloud provider: Report same Node IP as both internal and external. ([#45201](https://github.com/kubernetes/kubernetes/pull/45201), [@abrarshivani](https://github.com/abrarshivani)) +* The options passed to a flexvolume plugin's mount command now contains the pod name (`kubernetes.io/pod.name`), namespace (`kubernetes.io/pod.namespace`), uid (`kubernetes.io/pod.uid`), and service account name (`kubernetes.io/serviceAccount.name`). ([#39488](https://github.com/kubernetes/kubernetes/pull/39488), [@liggitt](https://github.com/liggitt)) + + + +# v1.7.0-beta.2 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.7/examples) + +## Downloads for v1.7.0-beta.2 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.7.0-beta.2/kubernetes.tar.gz) | `40814fcc343ee49df6a999165486714b5e970d90a368332c8e233a5741306a4c` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.7.0-beta.2/kubernetes-src.tar.gz) | `864561a13af5869722276eb0f2d7c0c3bb8946c4ea23551b6a8a68027737cf1b` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.7.0-beta.2/kubernetes-client-darwin-386.tar.gz) | `f4802f28767b55b0b29251485482e4db06dc15b257d9e9c8917d47a8531ebc20` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.7.0-beta.2/kubernetes-client-darwin-amd64.tar.gz) | `0a9bb88dec66390e428f499046b35a9e3fbb253d1357006821240f3854fd391e` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.7.0-beta.2/kubernetes-client-linux-386.tar.gz) | `fbf5c1c9b0d9bfa987936539c8635d809becf2ab447187f6e908ad3d5acebdc5` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.0-beta.2/kubernetes-client-linux-amd64.tar.gz) | `6b56b70519093c87a6a86543bcd137d8bea7b8ae172fdaa2914793baf47883eb` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.0-beta.2/kubernetes-client-linux-arm64.tar.gz) | `ff075b68d0dbbfd04788772d39299f16ee4c1a0f8ff175ed697afca206574707` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.7.0-beta.2/kubernetes-client-linux-arm.tar.gz) | `81fec317664151ae318eca49436c9273e106ec869267b453c377544446d865e8` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.0-beta.2/kubernetes-client-linux-ppc64le.tar.gz) | `91ee08c0209b767a576164eb6b44450f12ef29dedbca78b3daa447c6516b42fb` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.0-beta.2/kubernetes-client-linux-s390x.tar.gz) | `28868e4bdd72861c87dd6bce4218fe56e578dd5998cab2da56bde0335904a26b` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.7.0-beta.2/kubernetes-client-windows-386.tar.gz) | `779e7d864d762af4b039e511e14362426d8e60491a02f5ef571092aac9bc2b22` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.7.0-beta.2/kubernetes-client-windows-amd64.tar.gz) | `d35a306cb041026625335a330b4edffa8babec8e0b2d90b170ab8f318af87ff6` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.0-beta.2/kubernetes-server-linux-amd64.tar.gz) | `27f71259e3a7e819a6f5ffcf8ad63827f09e928173402e85690ec6943ef3a2fe` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.0-beta.2/kubernetes-server-linux-arm64.tar.gz) | `c9e331c452902293ea00e89ea1944d144c9200b97f033b56f469636c8c7b718d` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.7.0-beta.2/kubernetes-server-linux-arm.tar.gz) | `bf3e1b45982ef0a25483bd212553570fa3a1cda49f9a097a9796400fbb70e810` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.0-beta.2/kubernetes-server-linux-ppc64le.tar.gz) | `90da52c556b0634241d2da84347537c49b16bfcb0d226afb4213f4ea5a9b80ec` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.0-beta.2/kubernetes-server-linux-s390x.tar.gz) | `0c4243bae5310764508dba649d8440afbbd11fde2cac3ce651872a9f22694d45` + +### Node Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.0-beta.2/kubernetes-node-linux-amd64.tar.gz) | `d6c9d9642c31150b68b8da5143384bd4eee0617e16833d9bbafff94f25a76161` +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.0-beta.2/kubernetes-node-linux-arm64.tar.gz) | `b91b52b5708539710817a9378295ca4c19afbb75016aa2908c00678709d641ec` +[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.7.0-beta.2/kubernetes-node-linux-arm.tar.gz) | `3b3421abb90985773745a68159df338eb12c47645434a56c3806dd48e92cb023` +[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.0-beta.2/kubernetes-node-linux-ppc64le.tar.gz) | `a6b843af1284252636cf31a9523ff825c23dee5d57da24bf970031c846242ce5` +[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.0-beta.2/kubernetes-node-linux-s390x.tar.gz) | `43830c0509e9477534661292fc3f4a100250adbee316028c5e869644d75aa478` +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.7.0-beta.2/kubernetes-node-windows-amd64.tar.gz) | `0ea1ee0dfc483248b3d20177bf023375289214ba153a6466a68764cf02931b52` + +## Changelog since v1.7.0-beta.1 + +### Action Required + +* New and upgraded 1.7 GCE/GKE clusters no longer have an RBAC ClusterRoleBinding that grants the `cluster-admin` ClusterRole to the `default` service account in the `kube-system` namespace. ([#46750](https://github.com/kubernetes/kubernetes/pull/46750), [@cjcullen](https://github.com/cjcullen)) + * If this permission is still desired, run the following command to explicitly grant it, either before or after upgrading to 1.7: + * kubectl create clusterrolebinding kube-system-default --serviceaccount=kube-system:default --clusterrole=cluster-admin + +### Other notable changes + +* AWS: Process disk attachments even with duplicate NodeNames ([#47406](https://github.com/kubernetes/kubernetes/pull/47406), [@justinsb](https://github.com/justinsb)) +* kubefed will now configure NodeInternalIP as the federation API server endpoint when NodeExternalIP is unavailable for federation API servers exposed as NodePort services ([#46960](https://github.com/kubernetes/kubernetes/pull/46960), [@lukaszo](https://github.com/lukaszo)) +* PodSecurityPolicy now recognizes pods that specify `runAsNonRoot: false` in their security context and does not overwrite the specified value ([#47073](https://github.com/kubernetes/kubernetes/pull/47073), [@Q-Lee](https://github.com/Q-Lee)) +* Bump GLBC version to 0.9.4 ([#47468](https://github.com/kubernetes/kubernetes/pull/47468), [@nicksardo](https://github.com/nicksardo)) +* Stackdriver Logging deployment exposes metrics on node port 31337 when enabled. ([#47402](https://github.com/kubernetes/kubernetes/pull/47402), [@crassirostris](https://github.com/crassirostris)) +* Update to kube-addon-manager:v6.4-beta.2: kubectl v1.6.4 and refreshed base images ([#47389](https://github.com/kubernetes/kubernetes/pull/47389), [@ixdy](https://github.com/ixdy)) +* Enable iptables -w in kubeadm selfhosted ([#46372](https://github.com/kubernetes/kubernetes/pull/46372), [@cmluciano](https://github.com/cmluciano)) +* Azure plugin for client auth ([#43987](https://github.com/kubernetes/kubernetes/pull/43987), [@cosmincojocar](https://github.com/cosmincojocar)) +* Fix dynamic provisioning of PVs with inaccurate AccessModes by refusing to provision when PVCs ask for AccessModes that can't be satisfied by the PVs' underlying volume plugin ([#47274](https://github.com/kubernetes/kubernetes/pull/47274), [@wongma7](https://github.com/wongma7)) +* AWS: Avoid spurious ELB listener recreation - ignore case when matching protocol ([#47391](https://github.com/kubernetes/kubernetes/pull/47391), [@justinsb](https://github.com/justinsb)) +* gce kube-up: The `Node` authorization mode and `NodeRestriction` admission controller are now enabled ([#46796](https://github.com/kubernetes/kubernetes/pull/46796), [@mikedanese](https://github.com/mikedanese)) +* update gophercloud/gophercloud dependency for reauthentication fixes ([#45545](https://github.com/kubernetes/kubernetes/pull/45545), [@stuart-warren](https://github.com/stuart-warren)) +* fix sync loop health check with separating runtime errors ([#47124](https://github.com/kubernetes/kubernetes/pull/47124), [@andyxning](https://github.com/andyxning)) +* servicecontroller: Fix node selection logic on initial LB creation ([#45773](https://github.com/kubernetes/kubernetes/pull/45773), [@justinsb](https://github.com/justinsb)) +* Fix iSCSI iSER mounting. ([#47281](https://github.com/kubernetes/kubernetes/pull/47281), [@mtanino](https://github.com/mtanino)) +* StorageOS Volume Driver ([#42156](https://github.com/kubernetes/kubernetes/pull/42156), [@croomes](https://github.com/croomes)) + * [StorageOS](http://www.storageos.com) can be used as a storage provider for Kubernetes. With StorageOS, capacity from local or attached storage is pooled across the cluster, providing converged infrastructure for cloud-native applications. +* CRI has been moved to package `pkg/kubelet/apis/cri/v1alpha1/runtime`. ([#47113](https://github.com/kubernetes/kubernetes/pull/47113), [@feiskyer](https://github.com/feiskyer)) +* Make gcp auth provider not to override the Auth header if it's already exits ([#45575](https://github.com/kubernetes/kubernetes/pull/45575), [@wanghaoran1988](https://github.com/wanghaoran1988)) +* Allow pods to opt out of PodPreset mutation via an annotation on the pod. ([#44965](https://github.com/kubernetes/kubernetes/pull/44965), [@jpeeler](https://github.com/jpeeler)) +* Add Traditional Chinese translation for kubectl ([#46559](https://github.com/kubernetes/kubernetes/pull/46559), [@warmchang](https://github.com/warmchang)) +* Remove Initializers from admission-control in kubernetes-master charm for pre-1.7 ([#46987](https://github.com/kubernetes/kubernetes/pull/46987), [@Cynerva](https://github.com/Cynerva)) +* Added state guards to the idle_status messaging in the kubernetes-master charm to make deployment faster on initial deployment. ([#47183](https://github.com/kubernetes/kubernetes/pull/47183), [@chuckbutler](https://github.com/chuckbutler)) +* Bump up Node Problem Detector version to v0.4.0, which added support of parsing log from /dev/kmsg and ABRT. ([#46743](https://github.com/kubernetes/kubernetes/pull/46743), [@Random-Liu](https://github.com/Random-Liu)) +* kubeadm: Enable the Node Authorizer/Admission plugin in v1.7 ([#46879](https://github.com/kubernetes/kubernetes/pull/46879), [@luxas](https://github.com/luxas)) +* Deprecated Binding objects in 1.7. ([#47041](https://github.com/kubernetes/kubernetes/pull/47041), [@k82cn](https://github.com/k82cn)) +* Add secretbox and AES-CBC encryption modes to at rest encryption. AES-CBC is considered superior to AES-GCM because it is resistant to nonce-reuse attacks, and secretbox uses Poly1305 and XSalsa20. ([#46916](https://github.com/kubernetes/kubernetes/pull/46916), [@smarterclayton](https://github.com/smarterclayton)) +* The HorizontalPodAutoscaler controller will now only send updates when it has new status information, reducing the number of writes caused by the controller. ([#47078](https://github.com/kubernetes/kubernetes/pull/47078), [@DirectXMan12](https://github.com/DirectXMan12)) +* gpusInUse info error when kubelet restarts ([#46087](https://github.com/kubernetes/kubernetes/pull/46087), [@tianshapjq](https://github.com/tianshapjq)) +* kubeadm: Modifications to cluster-internal resources installed by kubeadm will be overwritten when upgrading from v1.6 to v1.7. ([#47081](https://github.com/kubernetes/kubernetes/pull/47081), [@luxas](https://github.com/luxas)) + + + +# v1.7.0-beta.1 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.7/examples) + +## Downloads for v1.7.0-beta.1 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.7.0-beta.1/kubernetes.tar.gz) | `e2fe83b443544dbb17c5ce481b6b3dcc9e62fbc573b5e270939282a31a910543` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.7.0-beta.1/kubernetes-src.tar.gz) | `321df2749cf4687ec62549bc532eb9e17f159c26f4748732746bce1a4d41e77f` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.7.0-beta.1/kubernetes-client-darwin-386.tar.gz) | `308cc980ee14aca49235569302e188dac08879f9236ed405884dada3b4984f44` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.7.0-beta.1/kubernetes-client-darwin-amd64.tar.gz) | `791bc498c2bfd858497d7257500954088bec19dbfeb9809e7c09983fba04f2a6` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.7.0-beta.1/kubernetes-client-linux-386.tar.gz) | `d9ecac5521cedcc6a94d6b07a57f58f15bb25e43bd766911d2f16cf491a985ac` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.0-beta.1/kubernetes-client-linux-amd64.tar.gz) | `33e800a541a1ce7a89e26dcfaa3650c06cf7239ae22272da944fb0d1288380e1` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.0-beta.1/kubernetes-client-linux-arm64.tar.gz) | `8b245f239ebbede700adac1380f63a71025b8e1f7010e97665c77a0af84effaf` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.7.0-beta.1/kubernetes-client-linux-arm.tar.gz) | `730aeeda02e500cc9300c7a555d4e0a1221b7cf182e95e6a9fbe16d90bbbc762` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.0-beta.1/kubernetes-client-linux-ppc64le.tar.gz) | `7c97431547f40e9dece33e602993c19eab53306e64d16bf44c5e881ba52e5ab4` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.0-beta.1/kubernetes-client-linux-s390x.tar.gz) | `8e95fcc59d9741d67789a8e6370a545c273206f7ff07e19154fe8f0126754571` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.7.0-beta.1/kubernetes-client-windows-386.tar.gz) | `8bcd3ed7b6081e2a68e5a68cca71632104fef57e96ec5c16191028d113d7e54b` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.7.0-beta.1/kubernetes-client-windows-amd64.tar.gz) | `1b32e418255f0c6b122b7aba5df9798d37c44c594ac36915ef081076d7464d52` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.0-beta.1/kubernetes-server-linux-amd64.tar.gz) | `2df51991734490871a6d6933ad15e785d543ecae2b06563fc92eb97a019f7eea` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.0-beta.1/kubernetes-server-linux-arm64.tar.gz) | `8c97a97249d644fffbdcd87867e516f1029a3609979379ac4c6ea077f5b5b9b7` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.7.0-beta.1/kubernetes-server-linux-arm.tar.gz) | `8e98741d19bd4a51ad275ca6bf793e0c305b75f2ac6569fb553b6cb62daa943e` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.0-beta.1/kubernetes-server-linux-ppc64le.tar.gz) | `71398347d2aae5345431f4e4c2bedcbdf5c3f406952ce254ef0ae9e4f55355a1` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.0-beta.1/kubernetes-server-linux-s390x.tar.gz) | `1f4fcbc1a70692a57accdab420ad2411acd4672f546473e977ef1c09357418bb` + +### Node Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.0-beta.1/kubernetes-node-linux-amd64.tar.gz) | `b84d291bc3e35912b4da067b3bf328dded87f875dc479b994408a161867c80e5` +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.0-beta.1/kubernetes-node-linux-arm64.tar.gz) | `2d306f1e757c49f9358791d7b0176e29f1aa32b6e6d70369b0e40c11a18b2df0` +[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.7.0-beta.1/kubernetes-node-linux-arm.tar.gz) | `3957988bd800514a67ee1cf9e21f99f7e0797810ef3c22fd1604f0b6d1d6dad4` +[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.0-beta.1/kubernetes-node-linux-ppc64le.tar.gz) | `f7b3c9c01a25e6afd31dafaeed1eb926f6aae741c0f0967cca2c12492e509fd0` +[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.0-beta.1/kubernetes-node-linux-s390x.tar.gz) | `de7db84acd32cd7d5b3ac0957cded289335e187539e5495899e05b4043974892` +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.7.0-beta.1/kubernetes-node-windows-amd64.tar.gz) | `efbafcae12ee121cf3a507bba8e36ac43d23d8262dc1a575b85e546ff81030fb` + +## Changelog since v1.7.0-alpha.4 + +### Action Required + +* kube-apiserver: a new authorization mode (`--authorization-mode=Node`) authorizes nodes to access secrets, configmaps, persistent volume claims and persistent volumes related to their pods. ([#46076](https://github.com/kubernetes/kubernetes/pull/46076), [@liggitt](https://github.com/liggitt)) + * Nodes must use client credentials that place them in the `system:nodes` group with a username of `system:node:<nodeName>` in order to be authorized by the node authorizer (the credentials obtained by the kubelet via TLS bootstrapping satisfy these requirements) + * When used in combination with the `RBAC` authorization mode (`--authorization-mode=Node,RBAC`), the `system:node` role is no longer automatically granted to the `system:nodes` group. +* kube-controller-manager has dropped support for the `--insecure-experimental-approve-all-kubelet-csrs-for-group` flag. Instead, the `csrapproving` controller uses authorization checks to determine whether to approve certificate signing requests: ([#45619](https://github.com/kubernetes/kubernetes/pull/45619), [@mikedanese](https://github.com/mikedanese)) + * requests for a TLS client certificate for any node are approved if the CSR creator has `create` permission on the `certificatesigningrequests` resource and `nodeclient` subresource in the `certificates.k8s.io` API group + * requests from a node for a TLS client certificate for itself are approved if the CSR creator has `create` permission on the `certificatesigningrequests` resource and the `selfnodeclient` subresource in the `certificates.k8s.io` API group + * requests from a node for a TLS serving certificate for itself are approved if the CSR creator has `create` permission on the `certificatesigningrequests` resource and the `selfnodeserver` subresource in the `certificates.k8s.io` API group +* Support updating storageclasses in etcd to storage.k8s.io/v1. You must do this prior to upgrading to 1.8. ([#46116](https://github.com/kubernetes/kubernetes/pull/46116), [@ncdc](https://github.com/ncdc)) +* The namespace API object no longer supports the deletecollection operation. ([#46407](https://github.com/kubernetes/kubernetes/pull/46407), [@liggitt](https://github.com/liggitt)) +* NetworkPolicy has been moved from `extensions/v1beta1` to the new ([#39164](https://github.com/kubernetes/kubernetes/pull/39164), [@danwinship](https://github.com/danwinship)) + `networking.k8s.io/v1` API group. The structure remains unchanged from + the beta1 API. + The `net.beta.kubernetes.io/network-policy` annotation on Namespaces + to opt in to isolation has been removed. Instead, isolation is now + determined at a per-pod level, with pods being isolated if there is + any NetworkPolicy whose spec.podSelector targets them. Pods that are + targeted by NetworkPolicies accept traffic that is accepted by any of + the NetworkPolicies (and nothing else), and pods that are not targeted + by any NetworkPolicy accept all traffic by default. + Action Required: + When upgrading to Kubernetes 1.7 (and a network plugin that supports + the new NetworkPolicy v1 semantics), to ensure full behavioral + compatibility with v1beta1: + 1. In Namespaces that previously had the "DefaultDeny" annotation, + you can create equivalent v1 semantics by creating a + NetworkPolicy that matches all pods but does not allow any + traffic: + + ```yaml + kind: NetworkPolicy + apiVersion: networking.k8s.io/v1 + metadata: + name: default-deny + spec: + podSelector: + ``` + + This will ensure that pods that aren't matched by any other + NetworkPolicy will continue to be fully-isolated, as they were + before. + 2. In Namespaces that previously did not have the "DefaultDeny" + annotation, you should delete any existing NetworkPolicy + objects. These would have had no effect before, but with v1 + semantics they might cause some traffic to be blocked that you + didn't intend to be blocked. + +### Other notable changes + +* Added exponential backoff to Azure cloudprovider ([#46660](https://github.com/kubernetes/kubernetes/pull/46660), [@jackfrancis](https://github.com/jackfrancis)) +* fixed HostAlias in PodSpec to allow `foo.bar` hostnames instead of just `foo` DNS labels. ([#46809](https://github.com/kubernetes/kubernetes/pull/46809), [@rickypai](https://github.com/rickypai)) +* Implements rolling update for StatefulSets. Updates can be performed using the RollingUpdate, Paritioned, or OnDelete strategies. OnDelete implements the manual behavior from 1.6. status now tracks ([#46669](https://github.com/kubernetes/kubernetes/pull/46669), [@kow3ns](https://github.com/kow3ns)) + * replicas, readyReplicas, currentReplicas, and updatedReplicas. The semantics of replicas is now consistent with DaemonSet and ReplicaSet, and readyReplicas has the semantics that replicas did prior to this release. +* Add Japanese translation for kubectl ([#46756](https://github.com/kubernetes/kubernetes/pull/46756), [@girikuncoro](https://github.com/girikuncoro)) +* federation: Add admission controller for policy-based placement ([#44786](https://github.com/kubernetes/kubernetes/pull/44786), [@tsandall](https://github.com/tsandall)) +* Get command uses OpenAPI schema to enhance display for a resource if run with flag 'use-openapi-print-columns'. ([#46235](https://github.com/kubernetes/kubernetes/pull/46235), [@droot](https://github.com/droot)) + * An example command: + * kubectl get pods --use-openapi-print-columns +* add gzip compression to GET and LIST requests ([#45666](https://github.com/kubernetes/kubernetes/pull/45666), [@ilackarms](https://github.com/ilackarms)) +* Fix the bug where container cannot run as root when SecurityContext.RunAsNonRoot is false. ([#47009](https://github.com/kubernetes/kubernetes/pull/47009), [@yujuhong](https://github.com/yujuhong)) +* Fixes a bug with cAdvisorPort in the KubeletConfiguration that prevented setting it to 0, which is in fact a valid option, as noted in issue [#11710](https://github.com/kubernetes/kubernetes/pull/11710). ([#46876](https://github.com/kubernetes/kubernetes/pull/46876), [@mtaufen](https://github.com/mtaufen)) +* Stackdriver cluster logging now deploys a new component to export Kubernetes events. ([#46700](https://github.com/kubernetes/kubernetes/pull/46700), [@crassirostris](https://github.com/crassirostris)) +* Alpha feature: allows users to set storage limit to isolate EmptyDir volumes. It enforces the limit by evicting pods that exceed their storage limits ([#45686](https://github.com/kubernetes/kubernetes/pull/45686), [@jingxu97](https://github.com/jingxu97)) +* Adds the `Categories []string` field to API resources, which represents the list of group aliases (e.g. "all") that every resource belongs to. ([#43338](https://github.com/kubernetes/kubernetes/pull/43338), [@fabianofranz](https://github.com/fabianofranz)) +* Promote kubelet tls bootstrap to beta. Add a non-experimental flag to use it and deprecate the old flag. ([#46799](https://github.com/kubernetes/kubernetes/pull/46799), [@mikedanese](https://github.com/mikedanese)) +* Fix disk partition discovery for brtfs ([#46816](https://github.com/kubernetes/kubernetes/pull/46816), [@dashpole](https://github.com/dashpole)) + * Add ZFS support + * Add overlay2 storage driver support +* Support creation of GCP Internal Load Balancers from Service objects ([#46663](https://github.com/kubernetes/kubernetes/pull/46663), [@nicksardo](https://github.com/nicksardo)) +* Introduces status conditions to the HorizontalPodAutoscaler in autoscaling/v2alpha1, indicating the current status of a given HorizontalPodAutoscaler, and why it is or is not scaling. ([#46550](https://github.com/kubernetes/kubernetes/pull/46550), [@DirectXMan12](https://github.com/DirectXMan12)) +* Support OpenAPI spec aggregation for kube-aggregator ([#46734](https://github.com/kubernetes/kubernetes/pull/46734), [@mbohlool](https://github.com/mbohlool)) +* Implement kubectl rollout undo and history for DaemonSet ([#46144](https://github.com/kubernetes/kubernetes/pull/46144), [@janetkuo](https://github.com/janetkuo)) +* Respect PDBs during node upgrades and add test coverage to the ServiceTest upgrade test. ([#45748](https://github.com/kubernetes/kubernetes/pull/45748), [@mml](https://github.com/mml)) +* Disk Pressure triggers the deletion of terminated containers on the node. ([#45896](https://github.com/kubernetes/kubernetes/pull/45896), [@dashpole](https://github.com/dashpole)) +* Add the `alpha.image-policy.k8s.io/failed-open=true` annotation when the image policy webhook encounters an error and fails open. ([#46264](https://github.com/kubernetes/kubernetes/pull/46264), [@Q-Lee](https://github.com/Q-Lee)) +* Enable kubelet csr bootstrap in GCE/GKE ([#40760](https://github.com/kubernetes/kubernetes/pull/40760), [@mikedanese](https://github.com/mikedanese)) +* Implement Daemonset history ([#45924](https://github.com/kubernetes/kubernetes/pull/45924), [@janetkuo](https://github.com/janetkuo)) +* When switching from the `service.beta.kubernetes.io/external-traffic` annotation to the new ([#46716](https://github.com/kubernetes/kubernetes/pull/46716), [@thockin](https://github.com/thockin)) + * `externalTrafficPolicy` field, the values chnag as follows: + * "OnlyLocal" becomes "Local" + * "Global" becomes "Cluster". +* Fix kubelet reset liveness probe failure count across pod restart boundaries ([#46371](https://github.com/kubernetes/kubernetes/pull/46371), [@sjenning](https://github.com/sjenning)) +* The gce metadata server can be hidden behind a proxy, hiding the kubelet's token. ([#45565](https://github.com/kubernetes/kubernetes/pull/45565), [@Q-Lee](https://github.com/Q-Lee)) +* AWS: Allow configuration of a single security group for ELBs ([#45500](https://github.com/kubernetes/kubernetes/pull/45500), [@nbutton23](https://github.com/nbutton23)) +* Allow remote admission controllers to be dynamically added and removed by administrators. External admission controllers make an HTTP POST containing details of the requested action which the service can approve or reject. ([#46388](https://github.com/kubernetes/kubernetes/pull/46388), [@lavalamp](https://github.com/lavalamp)) +* iscsi storage plugin: Fix dangling session when using multiple target portal addresses. ([#46239](https://github.com/kubernetes/kubernetes/pull/46239), [@mtanino](https://github.com/mtanino)) +* Duplicate recurring Events now include the latest event's Message string ([#46034](https://github.com/kubernetes/kubernetes/pull/46034), [@kensimon](https://github.com/kensimon)) +* With --feature-gates=RotateKubeletClientCertificate=true set, the kubelet will ([#41912](https://github.com/kubernetes/kubernetes/pull/41912), [@jcbsmpsn](https://github.com/jcbsmpsn)) + * request a client certificate from the API server during the boot cycle and pause + * waiting for the request to be satisfied. It will continually refresh the certificate + * as the certificates expiration approaches. +* The Kubernetes API supports retrieving tabular output for API resources via a new mime-type `application/json;as=Table;v=v1alpha1;g=meta.k8s.io`. The returned object (if the server supports it) will be of type `meta.k8s.io/v1alpha1` with `Table`, and contain column and row information related to the resource. Each row will contain information about the resource - by default it will be the object metadata, but callers can add the `?includeObject=Object` query parameter and receive the full object. In the future kubectl will use this to retrieve the results of `kubectl get`. ([#40848](https://github.com/kubernetes/kubernetes/pull/40848), [@smarterclayton](https://github.com/smarterclayton)) +* This change add nonResourceURL to kubectl auth cani ([#46432](https://github.com/kubernetes/kubernetes/pull/46432), [@CaoShuFeng](https://github.com/CaoShuFeng)) +* Webhook added to the API server which omits structured audit log events. ([#45919](https://github.com/kubernetes/kubernetes/pull/45919), [@ericchiang](https://github.com/ericchiang)) +* By default, --low-diskspace-threshold-mb is not set, and --eviction-hard includes "nodefs.available<10%,nodefs.inodesFree<5%" ([#46448](https://github.com/kubernetes/kubernetes/pull/46448), [@dashpole](https://github.com/dashpole)) +* kubectl edit and kubectl apply will keep the ordering of elements in merged lists ([#45980](https://github.com/kubernetes/kubernetes/pull/45980), [@mengqiy](https://github.com/mengqiy)) +* [Federation][kubefed]: Use StorageClassName for etcd pvc ([#46323](https://github.com/kubernetes/kubernetes/pull/46323), [@marun](https://github.com/marun)) +* Restrict active deadline seconds max allowed value to be maximum uint32 ([#46640](https://github.com/kubernetes/kubernetes/pull/46640), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* Implement kubectl get controllerrevisions ([#46655](https://github.com/kubernetes/kubernetes/pull/46655), [@janetkuo](https://github.com/janetkuo)) +* Local storage plugin ([#44897](https://github.com/kubernetes/kubernetes/pull/44897), [@msau42](https://github.com/msau42)) +* With `--feature-gates=RotateKubeletServerCertificate=true` set, the kubelet will ([#45059](https://github.com/kubernetes/kubernetes/pull/45059), [@jcbsmpsn](https://github.com/jcbsmpsn)) + * request a server certificate from the API server during the boot cycle and pause + * waiting for the request to be satisfied. It will continually refresh the certificate as + * the certificates expiration approaches. +* Allow PSP's to specify a whitelist of allowed paths for host volume based on path prefixes ([#43946](https://github.com/kubernetes/kubernetes/pull/43946), [@jhorwit2](https://github.com/jhorwit2)) +* Add `kubectl config rename-context` ([#46114](https://github.com/kubernetes/kubernetes/pull/46114), [@arthur0](https://github.com/arthur0)) +* Fix AWS EBS volumes not getting detached from node if routine to verify volumes are attached runs while the node is down ([#46463](https://github.com/kubernetes/kubernetes/pull/46463), [@wongma7](https://github.com/wongma7)) +* Move hardPodAffinitySymmetricWeight to scheduler policy config ([#44159](https://github.com/kubernetes/kubernetes/pull/44159), [@wanghaoran1988](https://github.com/wanghaoran1988)) +* AWS: support node port health check ([#43585](https://github.com/kubernetes/kubernetes/pull/43585), [@foolusion](https://github.com/foolusion)) +* Add generic Toleration for NoExecute Taints to NodeProblemDetector ([#45883](https://github.com/kubernetes/kubernetes/pull/45883), [@gmarek](https://github.com/gmarek)) +* support replaceKeys patch strategy and directive for strategic merge patch ([#44597](https://github.com/kubernetes/kubernetes/pull/44597), [@mengqiy](https://github.com/mengqiy)) +* Augment CRI to support retrieving container stats from the runtime. ([#45614](https://github.com/kubernetes/kubernetes/pull/45614), [@yujuhong](https://github.com/yujuhong)) +* Prevent kubelet from setting allocatable < 0 for a resource upon initial creation. ([#46516](https://github.com/kubernetes/kubernetes/pull/46516), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* add --non-resource-url to kubectl create clusterrole ([#45809](https://github.com/kubernetes/kubernetes/pull/45809), [@CaoShuFeng](https://github.com/CaoShuFeng)) +* Add `kubectl apply edit-last-applied` subcommand ([#42256](https://github.com/kubernetes/kubernetes/pull/42256), [@shiywang](https://github.com/shiywang)) +* Adding admissionregistration API group which enables dynamic registration of initializers and external admission webhooks. It is an alpha feature. ([#46294](https://github.com/kubernetes/kubernetes/pull/46294), [@caesarxuchao](https://github.com/caesarxuchao)) +* Fix log spam due to unnecessary status update when node is deleted. ([#45923](https://github.com/kubernetes/kubernetes/pull/45923), [@verult](https://github.com/verult)) +* GCE installs will now avoid IP masquerade for all RFC-1918 IP blocks, rather than just 10.0.0.0/8. This means that clusters can ([#46473](https://github.com/kubernetes/kubernetes/pull/46473), [@thockin](https://github.com/thockin)) + * be created in 192.168.0.0./16 and 172.16.0.0/12 while preserving the container IPs (which would be lost before). +* `set selector` and `set subject` no longer print "running in local/dry-run mode..." at the top, so their output can be piped as valid yaml or json ([#46507](https://github.com/kubernetes/kubernetes/pull/46507), [@bboreham](https://github.com/bboreham)) +* ControllerRevision type added for StatefulSet and DaemonSet history. ([#45867](https://github.com/kubernetes/kubernetes/pull/45867), [@kow3ns](https://github.com/kow3ns)) +* Bump Go version to 1.8.3 ([#46429](https://github.com/kubernetes/kubernetes/pull/46429), [@wojtek-t](https://github.com/wojtek-t)) +* Upgrade Elasticsearch Addon to v5.4.0 ([#45589](https://github.com/kubernetes/kubernetes/pull/45589), [@it-svit](https://github.com/it-svit)) +* PodDisruptionBudget now uses ControllerRef to decide which controller owns a given Pod, so it doesn't get confused by controllers with overlapping selectors. ([#45003](https://github.com/kubernetes/kubernetes/pull/45003), [@krmayankk](https://github.com/krmayankk)) +* aws: Support for ELB tagging by users ([#45932](https://github.com/kubernetes/kubernetes/pull/45932), [@lpabon](https://github.com/lpabon)) +* Portworx volume driver no longer has to run on the master. ([#45518](https://github.com/kubernetes/kubernetes/pull/45518), [@harsh-px](https://github.com/harsh-px)) +* kube-proxy: ratelimit runs of iptables by sync-period flags ([#46266](https://github.com/kubernetes/kubernetes/pull/46266), [@thockin](https://github.com/thockin)) +* Deployments are updated to use (1) a more stable hashing algorithm (fnv) than the previous one (adler) and (2) a hashing collision avoidance mechanism that will ensure new rollouts will not block on hashing collisions anymore. ([#44774](https://github.com/kubernetes/kubernetes/pull/44774), [@kargakis](https://github.com/kargakis)) +* The Prometheus metrics for the kube-apiserver for tracking incoming API requests and latencies now return the `subresource` label for correctly attributing the type of API call. ([#46354](https://github.com/kubernetes/kubernetes/pull/46354), [@smarterclayton](https://github.com/smarterclayton)) +* Add Simplified Chinese translation for kubectl ([#45573](https://github.com/kubernetes/kubernetes/pull/45573), [@shiywang](https://github.com/shiywang)) +* The --namespace flag is now honored for in-cluster clients that have an empty configuration. ([#46299](https://github.com/kubernetes/kubernetes/pull/46299), [@ncdc](https://github.com/ncdc)) +* Fix init container status reporting when active deadline is exceeded. ([#46305](https://github.com/kubernetes/kubernetes/pull/46305), [@sjenning](https://github.com/sjenning)) +* Improves performance of Cinder volume attach/detach operations ([#41785](https://github.com/kubernetes/kubernetes/pull/41785), [@jamiehannaford](https://github.com/jamiehannaford)) +* GCE and AWS dynamic provisioners extension: admins can configure zone(s) in which a persistent volume shall be created. ([#38505](https://github.com/kubernetes/kubernetes/pull/38505), [@pospispa](https://github.com/pospispa)) +* Break the 'certificatesigningrequests' controller into a 'csrapprover' controller and 'csrsigner' controller. ([#45514](https://github.com/kubernetes/kubernetes/pull/45514), [@mikedanese](https://github.com/mikedanese)) +* Modifies kubefed to create and the federation controller manager to use credentials associated with a service account rather than the user's credentials. ([#42042](https://github.com/kubernetes/kubernetes/pull/42042), [@perotinus](https://github.com/perotinus)) +* Adds a MaxUnavailable field to PodDisruptionBudget ([#45587](https://github.com/kubernetes/kubernetes/pull/45587), [@foxish](https://github.com/foxish)) +* The behavior of some watch calls to the server when filtering on fields was incorrect. If watching objects with a filter, when an update was made that no longer matched the filter a DELETE event was correctly sent. However, the object that was returned by that delete was not the (correct) version before the update, but instead, the newer version. That meant the new object was not matched by the filter. This was a regression from behavior between cached watches on the server side and uncached watches, and thus broke downstream API clients. ([#46223](https://github.com/kubernetes/kubernetes/pull/46223), [@smarterclayton](https://github.com/smarterclayton)) +* vSphere cloud provider: vSphere Storage policy Support for dynamic volume provisioning ([#46176](https://github.com/kubernetes/kubernetes/pull/46176), [@BaluDontu](https://github.com/BaluDontu)) +* Add support for emitting metrics from openstack cloudprovider about storage operations. ([#46008](https://github.com/kubernetes/kubernetes/pull/46008), [@NickrenREN](https://github.com/NickrenREN)) +* 'kubefed init' now supports overriding the default etcd image name with the --etcd-image parameter. ([#46247](https://github.com/kubernetes/kubernetes/pull/46247), [@marun](https://github.com/marun)) +* remove the elasticsearch template ([#45952](https://github.com/kubernetes/kubernetes/pull/45952), [@harryge00](https://github.com/harryge00)) +* Adds the `CustomResourceDefinition` (crd) types to the `kube-apiserver`. These are the successors to `ThirdPartyResource`. See https://github.com/kubernetes/community/blob/master/contributors/design-proposals/thirdpartyresources.md for more details. ([#46055](https://github.com/kubernetes/kubernetes/pull/46055), [@deads2k](https://github.com/deads2k)) +* StatefulSets now include an alpha scaling feature accessible by setting the `spec.podManagementPolicy` field to `Parallel`. The controller will not wait for pods to be ready before adding the other pods, and will replace deleted pods as needed. Since parallel scaling creates pods out of order, you cannot depend on predictable membership changes within your set. ([#44899](https://github.com/kubernetes/kubernetes/pull/44899), [@smarterclayton](https://github.com/smarterclayton)) +* fix kubelet event recording for selected events. ([#46246](https://github.com/kubernetes/kubernetes/pull/46246), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* Moved qos to api.helpers. ([#44906](https://github.com/kubernetes/kubernetes/pull/44906), [@k82cn](https://github.com/k82cn)) +* Kubelet PLEG updates the relist timestamp only after successfully relisting. ([#45496](https://github.com/kubernetes/kubernetes/pull/45496), [@andyxning](https://github.com/andyxning)) +* OpenAPI spec is now available in protobuf binary and gzip format (with ETag support) ([#45836](https://github.com/kubernetes/kubernetes/pull/45836), [@mbohlool](https://github.com/mbohlool)) +* Added support to a hierarchy of kubectl plugins (a tree of plugins as children of other plugins). ([#45981](https://github.com/kubernetes/kubernetes/pull/45981), [@fabianofranz](https://github.com/fabianofranz)) + * Added exported env vars to kubectl plugins so that plugin developers have access to global flags, namespace, the plugin descriptor and the full path to the caller binary. +* Ignored mirror pods in PodPreset admission plugin. ([#45958](https://github.com/kubernetes/kubernetes/pull/45958), [@k82cn](https://github.com/k82cn)) +* Don't try to attach volume to new node if it is already attached to another node and the volume does not support multi-attach. ([#45346](https://github.com/kubernetes/kubernetes/pull/45346), [@codablock](https://github.com/codablock)) +* The Calico version included in kube-up for GCE has been updated to v2.2. ([#38169](https://github.com/kubernetes/kubernetes/pull/38169), [@caseydavenport](https://github.com/caseydavenport)) +* Kubelet: Fix image garbage collector attempting to remove in-use images. ([#46121](https://github.com/kubernetes/kubernetes/pull/46121), [@Random-Liu](https://github.com/Random-Liu)) +* Add ip-masq-agent addon to the addons folder which is used in GCE if --non-masquerade-cidr is set to 0/0 ([#46038](https://github.com/kubernetes/kubernetes/pull/46038), [@dnardo](https://github.com/dnardo)) +* Fix serialization of EnforceNodeAllocatable ([#44606](https://github.com/kubernetes/kubernetes/pull/44606), [@ivan4th](https://github.com/ivan4th)) +* Add --write-config-to flag to kube-proxy to allow users to write the default configuration settings to a file. ([#45908](https://github.com/kubernetes/kubernetes/pull/45908), [@ncdc](https://github.com/ncdc)) +* The `NodeRestriction` admission plugin limits the `Node` and `Pod` objects a kubelet can modify. In order to be limited by this admission plugin, kubelets must use credentials in the `system:nodes` group, with a username in the form `system:node:<nodeName>`. Such kubelets will only be allowed to modify their own `Node` API object, and only modify `Pod` API objects that are bound to their node. ([#45929](https://github.com/kubernetes/kubernetes/pull/45929), [@liggitt](https://github.com/liggitt)) +* vSphere cloud provider: Report same Node IP as both internal and external. ([#45201](https://github.com/kubernetes/kubernetes/pull/45201), [@abrarshivani](https://github.com/abrarshivani)) +* The options passed to a flexvolume plugin's mount command now contains the pod name (`kubernetes.io/pod.name`), namespace (`kubernetes.io/pod.namespace`), uid (`kubernetes.io/pod.uid`), and service account name (`kubernetes.io/serviceAccount.name`). ([#39488](https://github.com/kubernetes/kubernetes/pull/39488), [@liggitt](https://github.com/liggitt)) + + + +# v1.7.0-alpha.4 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/master/examples) + +## Downloads for v1.7.0-alpha.4 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.7.0-alpha.4/kubernetes.tar.gz) | `14ef2ce3c9348dce7e83aeb167be324da93b90dbb8016f2aecb097c982abf790` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.7.0-alpha.4/kubernetes-src.tar.gz) | `faef422988e805a3970985eabff03ed88cfb95ad0d2223abe03011145016e5d0` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.7.0-alpha.4/kubernetes-client-darwin-386.tar.gz) | `077dc5637f42a35c316a5e1c3a38e09625971894a186dd7b1e60408c9a0ac4b8` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.7.0-alpha.4/kubernetes-client-darwin-amd64.tar.gz) | `8e43eb7d1969e82eeb17973e4f09e9fe44ff3430cd2c35170d72a631c460deeb` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.7.0-alpha.4/kubernetes-client-linux-386.tar.gz) | `6ddfdbcb25243901c965b1e009e26a90b1fd08d6483906e1235ef380f6f93c97` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.0-alpha.4/kubernetes-client-linux-amd64.tar.gz) | `3e7cdd8e0e4d67ff2a0ee2548a4c48a433f84a25384ee9d22c06f4eb2e6db6d7` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.0-alpha.4/kubernetes-client-linux-arm64.tar.gz) | `3970c88d2c36fcb43a64d4e889a3eb2cc298e893f6084b9a3c902879d777487d` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.7.0-alpha.4/kubernetes-client-linux-arm.tar.gz) | `156909c55feb06036afff72aa180bd20c14758690cd04c7d8867f49c968e6372` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.0-alpha.4/kubernetes-client-linux-ppc64le.tar.gz) | `601fe881a131ce7868fdecfb1439da94ab5a1f1d3700efe4b8319617ceb23d4e` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.0-alpha.4/kubernetes-client-linux-s390x.tar.gz) | `2ed3e74e6a972d9ed5b2206fa5e811663497082384f488eada9901e9a99929c7` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.7.0-alpha.4/kubernetes-client-windows-386.tar.gz) | `1aba520fe0bf620f0e77f697194dfd5e336e4a97e2af01f8b94b0f03dbb6299c` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.7.0-alpha.4/kubernetes-client-windows-amd64.tar.gz) | `aaf4a42549ea1113915649e636612ea738ead383140d92944c80f3c0d5df8161` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.0-alpha.4/kubernetes-server-linux-amd64.tar.gz) | `1389c798e7805ec26826c0d3b17ab0d4bd51e0db21cf2f5d4bda5e2b530a6bf1` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.0-alpha.4/kubernetes-server-linux-arm64.tar.gz) | `ccb99da4b069e63695b3b1d8add9a173e21a0bcaf03d031014460092ec726fb4` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.7.0-alpha.4/kubernetes-server-linux-arm.tar.gz) | `6eb3fe27e5017ed834a309cba21342a8c1443486a75ec87611fa66649dd5926a` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.0-alpha.4/kubernetes-server-linux-ppc64le.tar.gz) | `9b5030b0205ccccfd08b832eec917853fee8bcd34b04033ba35f17698be4a32f` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.0-alpha.4/kubernetes-server-linux-s390x.tar.gz) | `36b692c221005b52c2a243ddfc16e41a7b157e10fee8662bcd8270280b3f0927` + +### Node Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.0-alpha.4/kubernetes-node-linux-amd64.tar.gz) | `bba76ad441716f938df0fd8c23c48588d1f80603e39dcca1a29c8b3bbe8c1658` +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.0-alpha.4/kubernetes-node-linux-arm64.tar.gz) | `e3e729847a13fd41ee7f969aabb14d3a0f6f8523f6f079f77a618bf5d781fb9c` +[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.7.0-alpha.4/kubernetes-node-linux-arm.tar.gz) | `520f98f244dd35bb0d96072003548f8b3aacc1e7beb31b5bc527416f07af9d32` +[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.0-alpha.4/kubernetes-node-linux-ppc64le.tar.gz) | `686490ba55ea8c7569b3b506f898315c8b1b243de23733e0cd537e2db8e067cb` +[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.0-alpha.4/kubernetes-node-linux-s390x.tar.gz) | `a36bb76b390007b271868987739c550c8ac4e856f218f67f2fd780309a2a522e` +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.7.0-alpha.4/kubernetes-node-windows-amd64.tar.gz) | `e78c5a32584d96ec177e38b445c053e40c358e0549b925981c118f4c23578261` + +## Changelog since v1.7.0-alpha.3 + +### Action Required + +* `kubectl create role` and `kubectl create clusterrole` no longer allow specifying multiple resource names as comma-separated arguments. Use repeated `--resource-name` arguments to specify multiple resource names. ([#44950](https://github.com/kubernetes/kubernetes/pull/44950), [@xilabao](https://github.com/xilabao)) + +### Other notable changes + +* avoid concrete examples for missingResourceError ([#45582](https://github.com/kubernetes/kubernetes/pull/45582), [@CaoShuFeng](https://github.com/CaoShuFeng)) +* Fix DNS suffix search list support in Windows kube-proxy. ([#45642](https://github.com/kubernetes/kubernetes/pull/45642), [@JiangtianLi](https://github.com/JiangtianLi)) +* Fix the bug where StartedAt time is not reported for exited containers. ([#45977](https://github.com/kubernetes/kubernetes/pull/45977), [@yujuhong](https://github.com/yujuhong)) +* Update Dashboard version to 1.6.1 ([#45953](https://github.com/kubernetes/kubernetes/pull/45953), [@maciaszczykm](https://github.com/maciaszczykm)) +* Examples: fixed cassandra mirror detection that assumes an FTP site will always be presented ([#45965](https://github.com/kubernetes/kubernetes/pull/45965), [@pompomJuice](https://github.com/pompomJuice)) +* Removes the deprecated kubelet flag --babysit-daemons ([#44230](https://github.com/kubernetes/kubernetes/pull/44230), [@mtaufen](https://github.com/mtaufen)) +* [Federation] Automate configuring nameserver in cluster-dns for CoreDNS provider ([#42895](https://github.com/kubernetes/kubernetes/pull/42895), [@shashidharatd](https://github.com/shashidharatd)) +* Add an AEAD encrypting transformer for storing secrets encrypted at rest ([#41939](https://github.com/kubernetes/kubernetes/pull/41939), [@smarterclayton](https://github.com/smarterclayton)) +* Update Minio example ([#45444](https://github.com/kubernetes/kubernetes/pull/45444), [@NitishT](https://github.com/NitishT)) +* [Federation] Segregate DNS related code to separate controller ([#45034](https://github.com/kubernetes/kubernetes/pull/45034), [@shashidharatd](https://github.com/shashidharatd)) +* API Registration is now in beta. ([#45247](https://github.com/kubernetes/kubernetes/pull/45247), [@mbohlool](https://github.com/mbohlool)) +* Allow kcm and scheduler to lock on ConfigMaps. ([#45739](https://github.com/kubernetes/kubernetes/pull/45739), [@timothysc](https://github.com/timothysc)) +* kubelet config should actually ignore files starting with dots ([#45111](https://github.com/kubernetes/kubernetes/pull/45111), [@dwradcliffe](https://github.com/dwradcliffe)) +* Fix lint failures on kubernetes-e2e charm ([#45832](https://github.com/kubernetes/kubernetes/pull/45832), [@Cynerva](https://github.com/Cynerva)) +* Mirror pods must now indicate the nodeName they are bound to on creation. The mirror pod annotation is now treated as immutable and cannot be added to an existing pod, removed from a pod, or modified. ([#45775](https://github.com/kubernetes/kubernetes/pull/45775), [@liggitt](https://github.com/liggitt)) +* Updating apiserver to return UID of the deleted resource. Clients can use this UID to verify that the resource was deleted or waiting for finalizers. ([#45600](https://github.com/kubernetes/kubernetes/pull/45600), [@nikhiljindal](https://github.com/nikhiljindal)) +* OwnerReferencesPermissionEnforcement admission plugin ignores pods/status. ([#45747](https://github.com/kubernetes/kubernetes/pull/45747), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* prevent pods/status from touching ownerreferences ([#45826](https://github.com/kubernetes/kubernetes/pull/45826), [@deads2k](https://github.com/deads2k)) +* Fix lint errors in juju kubernetes master and e2e charms ([#45494](https://github.com/kubernetes/kubernetes/pull/45494), [@ktsakalozos](https://github.com/ktsakalozos)) +* Ensure that autoscaling/v1 is the preferred version for API discovery when autoscaling/v2alpha1 is enabled. ([#45741](https://github.com/kubernetes/kubernetes/pull/45741), [@DirectXMan12](https://github.com/DirectXMan12)) +* Promotes Source IP preservation for Virtual IPs to GA. ([#41162](https://github.com/kubernetes/kubernetes/pull/41162), [@MrHohn](https://github.com/MrHohn)) + * Two api fields are defined correspondingly: + * - Service.Spec.ExternalTrafficPolicy <- 'service.beta.kubernetes.io/external-traffic' annotation. + * - Service.Spec.HealthCheckNodePort <- 'service.beta.kubernetes.io/healthcheck-nodeport' annotation. +* Fix pods failing to start if they specify a file as a volume subPath to mount. ([#45623](https://github.com/kubernetes/kubernetes/pull/45623), [@wongma7](https://github.com/wongma7)) +* the resource quota controller was not adding quota to be resynced at proper interval ([#45685](https://github.com/kubernetes/kubernetes/pull/45685), [@derekwaynecarr](https://github.com/derekwaynecarr)) +* Marks the Kubelet's --master-service-namespace flag deprecated ([#44250](https://github.com/kubernetes/kubernetes/pull/44250), [@mtaufen](https://github.com/mtaufen)) +* fluentd will tolerate all NoExecute Taints when run in gcp configuration. ([#45715](https://github.com/kubernetes/kubernetes/pull/45715), [@gmarek](https://github.com/gmarek)) +* Added Group/Version/Kind and Action extension to OpenAPI Operations ([#44787](https://github.com/kubernetes/kubernetes/pull/44787), [@mbohlool](https://github.com/mbohlool)) +* Updates kube-dns to 1.14.2 ([#45684](https://github.com/kubernetes/kubernetes/pull/45684), [@bowei](https://github.com/bowei)) + * - Support kube-master-url flag without kubeconfig + * - Fix concurrent R/Ws in dns.go + * - Fix confusing logging when initialize server + * - Fix printf in cmd/kube-dns/app/server.go + * - Fix version on startup and --version flag + * - Support specifying port number for nameserver in stubDomains +* detach the volume when pod is terminated ([#45286](https://github.com/kubernetes/kubernetes/pull/45286), [@gnufied](https://github.com/gnufied)) +* Don't append :443 to registry domain in the kubernetes-worker layer registry action ([#45550](https://github.com/kubernetes/kubernetes/pull/45550), [@jacekn](https://github.com/jacekn)) +* vSphere cloud provider: Fix volume detach on node failure. ([#45569](https://github.com/kubernetes/kubernetes/pull/45569), [@divyenpatel](https://github.com/divyenpatel)) +* Remove the deprecated `--enable-cri` flag. CRI is now the default, ([#45194](https://github.com/kubernetes/kubernetes/pull/45194), [@yujuhong](https://github.com/yujuhong)) + * and the only way to integrate with kubelet for the container runtimes. +* AWS: Remove check that forces loadBalancerSourceRanges to be 0.0.0.0/0. ([#38636](https://github.com/kubernetes/kubernetes/pull/38636), [@dhawal55](https://github.com/dhawal55)) +* Fix erroneous FailedSync and FailedMount events being periodically and indefinitely posted on Pods after kubelet is restarted ([#44781](https://github.com/kubernetes/kubernetes/pull/44781), [@wongma7](https://github.com/wongma7)) +* Kubernetes now shares a single PID namespace among all containers in a pod when running with docker >= 1.13.1. This means processes can now signal processes in other containers in a pod, but it also means that the `kubectl exec {pod} kill 1` pattern will cause the pod to be restarted rather than a single container. ([#45236](https://github.com/kubernetes/kubernetes/pull/45236), [@verb](https://github.com/verb)) +* azure: add support for UDP ports ([#45523](https://github.com/kubernetes/kubernetes/pull/45523), [@colemickens](https://github.com/colemickens)) + * azure: fix support for multiple `loadBalancerSourceRanges` + * azure: support the Service spec's `sessionAffinity` +* The fix makes scheduling go routine waiting for cache (e.g. Pod) to be synced. ([#45453](https://github.com/kubernetes/kubernetes/pull/45453), [@k82cn](https://github.com/k82cn)) +* vSphere cloud provider: Filter out IPV6 node addresses. ([#45181](https://github.com/kubernetes/kubernetes/pull/45181), [@BaluDontu](https://github.com/BaluDontu)) +* Default behaviour in cinder storageclass is changed. If availability is not specified, the zone is chosen by algorithm. It makes possible to spread stateful pods across many zones. ([#44798](https://github.com/kubernetes/kubernetes/pull/44798), [@zetaab](https://github.com/zetaab)) +* A small clean up to remove unnecessary functions. ([#45018](https://github.com/kubernetes/kubernetes/pull/45018), [@ravisantoshgudimetla](https://github.com/ravisantoshgudimetla)) +* Removed old scheduler constructor. ([#45472](https://github.com/kubernetes/kubernetes/pull/45472), [@k82cn](https://github.com/k82cn)) +* vSphere cloud provider: Fix fetching of VM UUID on Ubuntu 16.04 and Fedora. ([#45311](https://github.com/kubernetes/kubernetes/pull/45311), [@divyenpatel](https://github.com/divyenpatel)) +* This fixes the overflow for priorityconfig- valid range {1, 9223372036854775806}. ([#45122](https://github.com/kubernetes/kubernetes/pull/45122), [@ravisantoshgudimetla](https://github.com/ravisantoshgudimetla)) +* Bump cluster autoscaler to v0.5.4, which fixes scale down issues with pods ignoring SIGTERM. ([#45483](https://github.com/kubernetes/kubernetes/pull/45483), [@mwielgus](https://github.com/mwielgus)) +* Create clusters with GPUs in GKE by specifying "type=<gpu-type>,count=<gpu-count>" to NODE_ACCELERATORS env var. ([#45130](https://github.com/kubernetes/kubernetes/pull/45130), [@vishh](https://github.com/vishh)) + * List of available GPUs - https://cloud.google.com/compute/docs/gpus/#introduction +* Remove deprecated node address type `NodeLegacyHostIP`. ([#44830](https://github.com/kubernetes/kubernetes/pull/44830), [@NickrenREN](https://github.com/NickrenREN)) +* UIDs and GIDs now use apimachinery types ([#44714](https://github.com/kubernetes/kubernetes/pull/44714), [@jamiehannaford](https://github.com/jamiehannaford)) +* Enable basic auth username rotation for GCI ([#44590](https://github.com/kubernetes/kubernetes/pull/44590), [@ihmccreery](https://github.com/ihmccreery)) +* Kubectl taint node based on label selector ([#44740](https://github.com/kubernetes/kubernetes/pull/44740), [@ravisantoshgudimetla](https://github.com/ravisantoshgudimetla)) +* Scheduler perf modular extensions. ([#44770](https://github.com/kubernetes/kubernetes/pull/44770), [@ravisantoshgudimetla](https://github.com/ravisantoshgudimetla)) + + + +# v1.7.0-alpha.3 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/master/examples) + +## Downloads for v1.7.0-alpha.3 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.7.0-alpha.3/kubernetes.tar.gz) | `03437cacddd91bb7dc21960c960d673ceb99b53040860638aa1d1fbde6d59fb5` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.7.0-alpha.3/kubernetes-src.tar.gz) | `190441318abddb44cfcbaec2f1b91d1a76167b91165ce5ae0d1a99c1130a2a36` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.7.0-alpha.3/kubernetes-client-darwin-386.tar.gz) | `1c3dcc57e014b15395a140eeeb285e38cf5510939b4113d053006d57d8e13087` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.7.0-alpha.3/kubernetes-client-darwin-amd64.tar.gz) | `c33d893f67d8ac90834c36284ef88c529c43662c7179e2a9e4b17671c057400b` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.7.0-alpha.3/kubernetes-client-linux-386.tar.gz) | `5f3e44b8450db4f93a7ea1f366259c6333007a4536cb242212837bb241c3bbef` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.0-alpha.3/kubernetes-client-linux-amd64.tar.gz) | `85ac41dd849f3f9e033d4e123f79c4bd5d7b43bdd877d57dfc8fd2cadcef94be` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.0-alpha.3/kubernetes-client-linux-arm64.tar.gz) | `f693032dde194de67900fe8cc5252959d70992b89a24ea43e11e9949835df5db` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.7.0-alpha.3/kubernetes-client-linux-arm.tar.gz) | `22fa2d2a77310acac1b08a7091929b03977afb2e4a246b054d38b3da15b84e33` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.0-alpha.3/kubernetes-client-linux-ppc64le.tar.gz) | `8717e6042a79f6a79f4527370adb1bbc903b0b9930c6aeee0174687b7443f9d4` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.0-alpha.3/kubernetes-client-linux-s390x.tar.gz) | `161c1da92b681decfb9800854bf3b9ff0110ba75c11008a784b891f3a57b032d` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.7.0-alpha.3/kubernetes-client-windows-386.tar.gz) | `19f5898a1fdef8c4caf27c6c2b79b0e085127b1d209f57361bce52ca8080842d` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.7.0-alpha.3/kubernetes-client-windows-amd64.tar.gz) | `ff79c61efa87af3eeb7357740a495997d223d256b2e54c139572154e113dc247` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.0-alpha.3/kubernetes-server-linux-amd64.tar.gz) | `13677b0400758f0d74087768be7abf3fd7bd927f0b874b8d6becc11394cdec2c` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.0-alpha.3/kubernetes-server-linux-arm64.tar.gz) | `0a2df3a6ebe157aa8a7e89bd8805dbad3623e122cc0f3614bfcb4ad528bd6ab1` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.7.0-alpha.3/kubernetes-server-linux-arm.tar.gz) | `76611e01de80c07ec954c91612a550063b9efc0c223e5dd638d71f4a3f3d9430` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.0-alpha.3/kubernetes-server-linux-ppc64le.tar.gz) | `2fe29a5871afe693f020e9642e6bc664c497e71598b70673d4f2c4523f57e28b` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.0-alpha.3/kubernetes-server-linux-s390x.tar.gz) | `33a1eb93a5d7004987de38ef54e888f0593e31cf9250be3e25118a1d1b474c07` + +### Node Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.0-alpha.3/kubernetes-node-linux-amd64.tar.gz) | `de369ca9e5207fb67b26788b41cee1c75935baae348fedc1adf9dbae8c066e7d` +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.0-alpha.3/kubernetes-node-linux-arm64.tar.gz) | `21839fe6c2a3fd3c165dea6ddbacdec008cdd154c9704866d13ac4dfb14ad7ae` +[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.7.0-alpha.3/kubernetes-node-linux-arm.tar.gz) | `2326a074f7c9ba205d996f4f42b8f511c33d909aefd3ea329cc579c4c14b5300` +[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.0-alpha.3/kubernetes-node-linux-ppc64le.tar.gz) | `58a3aeb5d55d040fd3133dbaa26eb966057ed2b35a5e0522ce8c1ebf4e9b2364` +[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.0-alpha.3/kubernetes-node-linux-s390x.tar.gz) | `2c231a8357d891012574b522ee7fa5e25c6b62b6d888d9bbbb195950cbe18536` +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.7.0-alpha.3/kubernetes-node-windows-amd64.tar.gz) | `870bb1ab53a3f2bb5a3c068b425cd6330e71c86dc2ab899c79f733b63ddb51c5` + +## Changelog since v1.7.0-alpha.2 + +### Action Required + +* Refactor kube-proxy configuration ([#34727](https://github.com/kubernetes/kubernetes/pull/34727), [@ncdc](https://github.com/ncdc)) + +### Other notable changes + +* kubeadm: Fix invalid assign statement so it is possible to register the master kubelet with other initial Taints ([#45376](https://github.com/kubernetes/kubernetes/pull/45376), [@luxas](https://github.com/luxas)) +* Use Docker API Version instead of docker version ([#44068](https://github.com/kubernetes/kubernetes/pull/44068), [@mkumatag](https://github.com/mkumatag)) +* bump(golang.org/x/oauth2): a6bd8cefa1811bd24b86f8902872e4e8225f74c4 ([#45056](https://github.com/kubernetes/kubernetes/pull/45056), [@ericchiang](https://github.com/ericchiang)) +* apimachinery: make explicit that meta.KindToResource is only a guess ([#45272](https://github.com/kubernetes/kubernetes/pull/45272), [@sttts](https://github.com/sttts)) +* Remove PodSandboxStatus.Linux.Namespaces.Network from CRI. ([#45166](https://github.com/kubernetes/kubernetes/pull/45166), [@feiskyer](https://github.com/feiskyer)) +* Fixed misspelled http URL in the cluster-dns example ([#45246](https://github.com/kubernetes/kubernetes/pull/45246), [@psiwczak](https://github.com/psiwczak)) +* separate discovery from the apiserver ([#43003](https://github.com/kubernetes/kubernetes/pull/43003), [@deads2k](https://github.com/deads2k)) +* Remove the `--secret-name` flag from `kubefed join`, instead generating the secret name arbitrarily. ([#42513](https://github.com/kubernetes/kubernetes/pull/42513), [@perotinus](https://github.com/perotinus)) +* Added InterPodAffinity unit test case with Namespace. ([#45152](https://github.com/kubernetes/kubernetes/pull/45152), [@k82cn](https://github.com/k82cn)) +* Use munged semantic version for side-loaded docker tag ([#44981](https://github.com/kubernetes/kubernetes/pull/44981), [@ixdy](https://github.com/ixdy)) +* Increase Dashboard's memory requests and limits ([#44712](https://github.com/kubernetes/kubernetes/pull/44712), [@maciaszczykm](https://github.com/maciaszczykm)) +* PodSpec's `HostAliases` now write entries into the Kubernetes-managed hosts file. ([#45148](https://github.com/kubernetes/kubernetes/pull/45148), [@rickypai](https://github.com/rickypai)) +* Create and push a docker image for the cloud-controller-manager ([#45154](https://github.com/kubernetes/kubernetes/pull/45154), [@luxas](https://github.com/luxas)) +* Align Extender's validation with prioritizers. ([#45091](https://github.com/kubernetes/kubernetes/pull/45091), [@k82cn](https://github.com/k82cn)) +* Retry calls we report config changes quickly. ([#44959](https://github.com/kubernetes/kubernetes/pull/44959), [@ktsakalozos](https://github.com/ktsakalozos)) +* A new field `hostAliases` has been added to `pod.spec` to support adding entries to a Pod's /etc/hosts file. ([#44641](https://github.com/kubernetes/kubernetes/pull/44641), [@rickypai](https://github.com/rickypai)) +* Added CIFS PV support for Juju Charms ([#45117](https://github.com/kubernetes/kubernetes/pull/45117), [@chuckbutler](https://github.com/chuckbutler)) +* Some container runtimes share a process (PID) namespace for all containers in a pod. This will become the default for Docker in a future release of Kubernetes. You can preview this functionality if running with the CRI and Docker 1.13.1 by enabling the --experimental-docker-enable-shared-pid kubelet flag. ([#41583](https://github.com/kubernetes/kubernetes/pull/41583), [@verb](https://github.com/verb)) +* add APIService conditions ([#43301](https://github.com/kubernetes/kubernetes/pull/43301), [@deads2k](https://github.com/deads2k)) +* Log warning when invalid dir passed to kubectl proxy --www ([#44952](https://github.com/kubernetes/kubernetes/pull/44952), [@CaoShuFeng](https://github.com/CaoShuFeng)) +* Roll up volume error messages in the kubelet sync loop. ([#44938](https://github.com/kubernetes/kubernetes/pull/44938), [@jayunit100](https://github.com/jayunit100)) +* Introduces the ability to extend kubectl by adding third-party plugins. Developer preview, please refer to the documentation for instructions about how to use it. ([#37499](https://github.com/kubernetes/kubernetes/pull/37499), [@fabianofranz](https://github.com/fabianofranz)) +* Fixes juju kubernetes master: 1. Get certs from a dead leader. 2. Append tokens. ([#43620](https://github.com/kubernetes/kubernetes/pull/43620), [@ktsakalozos](https://github.com/ktsakalozos)) +* Use correct option name in the kubernetes-worker layer registry action ([#44921](https://github.com/kubernetes/kubernetes/pull/44921), [@jacekn](https://github.com/jacekn)) +* Start recording cloud provider metrics for AWS ([#43477](https://github.com/kubernetes/kubernetes/pull/43477), [@gnufied](https://github.com/gnufied)) +* Bump GLBC version to 0.9.3 ([#45055](https://github.com/kubernetes/kubernetes/pull/45055), [@nicksardo](https://github.com/nicksardo)) +* Add metrics to all major gce operations {latency, errors} ([#44510](https://github.com/kubernetes/kubernetes/pull/44510), [@bowei](https://github.com/bowei)) + * The new metrics are: + * cloudprovider_gce_api_request_duration_seconds{request, region, zone} + * cloudprovider_gce_api_request_errors{request, region, zone} + + * `request` is the specific function that is used. + * `region` is the target region (Will be "<n/a>" if not applicable) + * `zone` is the target zone (Will be "<n/a>" if not applicable) + * Note: this fixes some issues with the previous implementation of + * metrics for disks: + * - Time duration tracked was of the initial API call, not the entire + * operation. + * - Metrics label tuple would have resulted in many independent + * histograms stored, one for each disk. (Did not aggregate well). +* Update kubernetes-e2e charm to use snaps ([#45044](https://github.com/kubernetes/kubernetes/pull/45044), [@Cynerva](https://github.com/Cynerva)) +* Log the error (if any) in e2e metrics gathering step ([#45039](https://github.com/kubernetes/kubernetes/pull/45039), [@shyamjvs](https://github.com/shyamjvs)) +* The proxy subresource APIs for nodes, services, and pods now support the HTTP PATCH method. ([#44929](https://github.com/kubernetes/kubernetes/pull/44929), [@liggitt](https://github.com/liggitt)) +* cluster-autoscaler: Fix duplicate writing of logs. ([#45017](https://github.com/kubernetes/kubernetes/pull/45017), [@MaciekPytel](https://github.com/MaciekPytel)) +* CRI: Fix StopContainer timeout ([#44970](https://github.com/kubernetes/kubernetes/pull/44970), [@Random-Liu](https://github.com/Random-Liu)) +* Fixes a bug where pods were evicted even after images are successfully deleted. ([#44986](https://github.com/kubernetes/kubernetes/pull/44986), [@dashpole](https://github.com/dashpole)) +* Fix some false negatives in detection of meaningful conflicts during strategic merge patch with maps and lists. ([#43469](https://github.com/kubernetes/kubernetes/pull/43469), [@enisoc](https://github.com/enisoc)) +* kubernetes-master juju charm properly detects etcd-scale events and reconfigures appropriately. ([#44967](https://github.com/kubernetes/kubernetes/pull/44967), [@chuckbutler](https://github.com/chuckbutler)) +* Add redirect support to SpdyRoundTripper ([#44451](https://github.com/kubernetes/kubernetes/pull/44451), [@ncdc](https://github.com/ncdc)) +* Support running Ubuntu image on GCE node ([#44744](https://github.com/kubernetes/kubernetes/pull/44744), [@yguo0905](https://github.com/yguo0905)) +* Send dns details only after cdk-addons are configured ([#44945](https://github.com/kubernetes/kubernetes/pull/44945), [@ktsakalozos](https://github.com/ktsakalozos)) +* Added support to the pause action in the kubernetes-worker charm for new flag --delete-local-data ([#44931](https://github.com/kubernetes/kubernetes/pull/44931), [@chuckbutler](https://github.com/chuckbutler)) +* Upgrade go version to v1.8 ([#41636](https://github.com/kubernetes/kubernetes/pull/41636), [@luxas](https://github.com/luxas)) +* Add namespace-{list, create, delete} actions to the kubernetes-master layer ([#44277](https://github.com/kubernetes/kubernetes/pull/44277), [@jacekn](https://github.com/jacekn)) +* Fix problems with scaling up the cluster when unschedulable pods have some persistent volume claims. ([#44860](https://github.com/kubernetes/kubernetes/pull/44860), [@mwielgus](https://github.com/mwielgus)) +* Feature/hpa upscale downscale delay configurable ([#42101](https://github.com/kubernetes/kubernetes/pull/42101), [@Dmitry1987](https://github.com/Dmitry1987)) +* Add short name "netpol" for networkpolicies ([#42241](https://github.com/kubernetes/kubernetes/pull/42241), [@xiangpengzhao](https://github.com/xiangpengzhao)) +* Restored the ability of kubectl running inside a pod to consume resource files specifying a different namespace than the one the pod is running in. ([#44862](https://github.com/kubernetes/kubernetes/pull/44862), [@liggitt](https://github.com/liggitt)) +* e2e: handle nil ReplicaSet in checkDeploymentRevision ([#44859](https://github.com/kubernetes/kubernetes/pull/44859), [@sttts](https://github.com/sttts)) +* Fix false positive "meaningful conflict" detection for strategic merge patch with integer values. ([#44788](https://github.com/kubernetes/kubernetes/pull/44788), [@enisoc](https://github.com/enisoc)) +* Documented NodePort networking for CDK. ([#44863](https://github.com/kubernetes/kubernetes/pull/44863), [@chuckbutler](https://github.com/chuckbutler)) +* Deployments and DaemonSets are now considered complete once all of the new pods are up and running - affects `kubectl rollout status` (and ProgressDeadlineSeconds for Deployments) ([#44672](https://github.com/kubernetes/kubernetes/pull/44672), [@kargakis](https://github.com/kargakis)) +* Exclude nodes labeled as master from LoadBalancer / NodePort; restores documented behaviour. ([#44745](https://github.com/kubernetes/kubernetes/pull/44745), [@justinsb](https://github.com/justinsb)) +* Fixes issue during LB creation where ports where incorrectly assigned to a floating IP ([#44387](https://github.com/kubernetes/kubernetes/pull/44387), [@jamiehannaford](https://github.com/jamiehannaford)) +* Remove redis-proxy.yaml sample, as the image is nowhere to be found. ([#44801](https://github.com/kubernetes/kubernetes/pull/44801), [@klausenbusk](https://github.com/klausenbusk)) +* Resolves juju vsphere hostname bug showing only a single node in a scaled node-pool. ([#44780](https://github.com/kubernetes/kubernetes/pull/44780), [@chuckbutler](https://github.com/chuckbutler)) +* kubectl commands run inside a pod using a kubeconfig file now use the namespace specified in the kubeconfig file, instead of using the pod namespace. If no kubeconfig file is used, or the kubeconfig does not specify a namespace, the pod namespace is still used as a fallback. ([#44570](https://github.com/kubernetes/kubernetes/pull/44570), [@liggitt](https://github.com/liggitt)) +* This adds support for CNI ConfigLists, which permit plugin chaining. ([#42202](https://github.com/kubernetes/kubernetes/pull/42202), [@squeed](https://github.com/squeed)) +* API requests using impersonation now include the `system:authenticated` group in the impersonated user automatically. ([#44076](https://github.com/kubernetes/kubernetes/pull/44076), [@liggitt](https://github.com/liggitt)) +* Print conditions of RC/RS in 'kubectl describe' command. ([#44710](https://github.com/kubernetes/kubernetes/pull/44710), [@xiangpengzhao](https://github.com/xiangpengzhao)) +* cinder: Add support for the KVM virtio-scsi driver ([#41498](https://github.com/kubernetes/kubernetes/pull/41498), [@mikebryant](https://github.com/mikebryant)) +* Disallows installation of upstream docker from PPA in the Juju kubernetes-worker charm. ([#44681](https://github.com/kubernetes/kubernetes/pull/44681), [@wwwtyro](https://github.com/wwwtyro)) +* Fluentd manifest pod is no longer created on non-registered master when creating clusters using kube-up.sh. ([#44721](https://github.com/kubernetes/kubernetes/pull/44721), [@piosz](https://github.com/piosz)) +* Job controller now respects ControllerRef to avoid fighting over Pods. ([#42176](https://github.com/kubernetes/kubernetes/pull/42176), [@enisoc](https://github.com/enisoc)) +* CronJob controller now respects ControllerRef to avoid fighting with other controllers. ([#42177](https://github.com/kubernetes/kubernetes/pull/42177), [@enisoc](https://github.com/enisoc)) +* The hyperkube image has been slimmed down and no longer includes addon manifests and other various scripts. These were introduced for the now removed docker-multinode setup system. ([#44555](https://github.com/kubernetes/kubernetes/pull/44555), [@luxas](https://github.com/luxas)) +* Refactoring reorganize taints function in kubectl to expose operations ([#43171](https://github.com/kubernetes/kubernetes/pull/43171), [@ravisantoshgudimetla](https://github.com/ravisantoshgudimetla)) +* The Kubernetes API server now exits if it encounters a networking failure (e.g. the networking interface hosting its address goes away) to allow a process manager (systemd/kubelet/etc) to react to the problem. Previously the server would log the failure and try again to bind to its configured address:port. ([#42272](https://github.com/kubernetes/kubernetes/pull/42272), [@marun](https://github.com/marun)) +* Fixes a bug in the kubernetes-worker Juju charm code that attempted to give kube-proxy more than one api endpoint. ([#44677](https://github.com/kubernetes/kubernetes/pull/44677), [@wwwtyro](https://github.com/wwwtyro)) +* Fixes a missing comma in a list of strings. ([#44678](https://github.com/kubernetes/kubernetes/pull/44678), [@wwwtyro](https://github.com/wwwtyro)) +* Fix ceph-secret type to kubernetes.io/rbd in kubernetes-master charm ([#44635](https://github.com/kubernetes/kubernetes/pull/44635), [@Cynerva](https://github.com/Cynerva)) + + + +# v1.7.0-alpha.2 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/master/examples) + +## Downloads for v1.7.0-alpha.2 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.7.0-alpha.2/kubernetes.tar.gz) | `d60465c07b8aa4b5bc8e3de98769d72d22985489e5cdfd1a3165e36c755d6c3b` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.7.0-alpha.2/kubernetes-src.tar.gz) | `b0b388571225e37a5b9bca6624a92e69273af907cdb300a6d0ac6a0d0d364bd4` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.7.0-alpha.2/kubernetes-client-darwin-386.tar.gz) | `55b04bc43c45bd93cf30174036ad64109ca1070ab3b331882e956f483dac2b6a` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.7.0-alpha.2/kubernetes-client-darwin-amd64.tar.gz) | `d61c055ca90aacb6feb10f45feaaf11f188052598cfef79f4930358bb37e09ad` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.7.0-alpha.2/kubernetes-client-linux-386.tar.gz) | `e10ce9339ee6158759675bfb002409fa7f70c701aa5a8a5ac97abc56742561b7` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.0-alpha.2/kubernetes-client-linux-amd64.tar.gz) | `b9cb60ba71dfa144ed1e6f2116afd078782372d427912838c56f3b77a74afda0` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.0-alpha.2/kubernetes-client-linux-arm64.tar.gz) | `bc0446c484dba91d8f1e32c0175b81dca5c6ff0ac9f5dd3f69cff529afb83aff` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.7.0-alpha.2/kubernetes-client-linux-arm.tar.gz) | `f794765ca98a2c0611fda32756250eff743c25b66cd4d973fc5720a55771c1c6` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.0-alpha.2/kubernetes-client-linux-ppc64le.tar.gz) | `216cb6e96ba6af5ae259c069576fcd873c48a8a4e8918f5e08ac13427fbefd57` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.0-alpha.2/kubernetes-client-linux-s390x.tar.gz) | `fb7903d028744fdfe3119ade6b2ee71532e3d69a82bd5834206fe84e50821253` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.7.0-alpha.2/kubernetes-client-windows-386.tar.gz) | `6bdfbd12361f814c86f268dcc807314f322efe9390ca2d91087e617814e91684` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.7.0-alpha.2/kubernetes-client-windows-amd64.tar.gz) | `fd26fc5f0e967b9f6ab18bc28893f2037712891179ddb67b035434c94612f7e3` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.0-alpha.2/kubernetes-server-linux-amd64.tar.gz) | `e14c0748789f6a1c3840ab05d0ad5b796a0f03722ee923f8208740f702c0bc19` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.0-alpha.2/kubernetes-server-linux-arm64.tar.gz) | `270e0a6fcc0a2f38c8c6e8929a4a593535014bde88f69479a52c5b625bca435c` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.7.0-alpha.2/kubernetes-server-linux-arm.tar.gz) | `0bd58c2f8d8b6e8110354ccd71eb97eb873aca7b074ce9f83dab4f62a696e964` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.0-alpha.2/kubernetes-server-linux-ppc64le.tar.gz) | `57a4a5dcdb573fb6dc08dbd53d0f196c66d245fa2159a92bf8da0d29128e486d` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.0-alpha.2/kubernetes-server-linux-s390x.tar.gz) | `404c8dcc300281f5588e6f4dd15e3c41f858c6597e37a817913112d545a7f736` + +## Changelog since v1.7.0-alpha.1 + +### Action Required + +* `kubectl create rolebinding` and `kubectl create clusterrolebinding` no longer allow specifying multiple subjects as comma-separated arguments. Use repeated `--user`, `--group`, or `--serviceaccount` arguments to specify multiple subjects. ([#43903](https://github.com/kubernetes/kubernetes/pull/43903), [@xilabao](https://github.com/xilabao)) + +### Other notable changes + +* Add support for Azure internal load balancer ([#43510](https://github.com/kubernetes/kubernetes/pull/43510), [@karataliu](https://github.com/karataliu)) +* Improved output on 'kubectl get' and 'kubectl describe' for generic objects. ([#44222](https://github.com/kubernetes/kubernetes/pull/44222), [@fabianofranz](https://github.com/fabianofranz)) +* Add Kubernetes 1.6 support to Juju charms ([#44500](https://github.com/kubernetes/kubernetes/pull/44500), [@Cynerva](https://github.com/Cynerva)) + * Add metric collection to charms for autoscaling + * Update kubernetes-e2e charm to fail when test suite fails + * Update Juju charms to use snaps + * Add registry action to the kubernetes-worker charm + * Add support for kube-proxy cluster-cidr option to kubernetes-worker charm + * Fix kubernetes-master charm starting services before TLS certs are saved + * Fix kubernetes-worker charm failures in LXD + * Fix stop hook failure on kubernetes-worker charm + * Fix handling of juju kubernetes-worker.restart-needed state + * Fix nagios checks in charms +* Users can now specify listen and advertise URLs for etcd in a kubeadm cluster ([#42246](https://github.com/kubernetes/kubernetes/pull/42246), [@jamiehannaford](https://github.com/jamiehannaford)) +* Fixed `kubectl cluster-info dump` to support multi-container pod. ([#44088](https://github.com/kubernetes/kubernetes/pull/44088), [@xingzhou](https://github.com/xingzhou)) +* Prints out status updates when running `kubefed init` ([#41849](https://github.com/kubernetes/kubernetes/pull/41849), [@perotinus](https://github.com/perotinus)) +* CRI: Fix kubelet failing to start when using rkt. ([#44569](https://github.com/kubernetes/kubernetes/pull/44569), [@yujuhong](https://github.com/yujuhong)) +* Remove deprecatedPublicIPs field ([#44519](https://github.com/kubernetes/kubernetes/pull/44519), [@thockin](https://github.com/thockin)) +* Remove deprecated ubuntu kube-up deployment. ([#44344](https://github.com/kubernetes/kubernetes/pull/44344), [@mikedanese](https://github.com/mikedanese)) +* Use OS-specific libs when computing client User-Agent in kubectl, etc. ([#44423](https://github.com/kubernetes/kubernetes/pull/44423), [@monopole](https://github.com/monopole)) +* kube-apiserver now drops unneeded path information if an older version of Windows kubectl sends it. ([#44421](https://github.com/kubernetes/kubernetes/pull/44421), [@mml](https://github.com/mml)) +* Extending the gc admission plugin so that a user who doesn't have delete permission of the *owner* cannot modify blockOwnerDeletion field of existing ownerReferences, or add new ownerReference with blockOwnerDeletion=true ([#43876](https://github.com/kubernetes/kubernetes/pull/43876), [@caesarxuchao](https://github.com/caesarxuchao)) +* kube-apiserver: --service-account-lookup now defaults to true, requiring the Secret API object containing the token to exist in order for a service account token to be valid. This enables service account tokens to be revoked by deleting the Secret object containing the token. ([#44071](https://github.com/kubernetes/kubernetes/pull/44071), [@liggitt](https://github.com/liggitt)) +* CRI: `kubectl logs -f` now stops following when container stops, as it did pre-CRI. ([#44406](https://github.com/kubernetes/kubernetes/pull/44406), [@Random-Liu](https://github.com/Random-Liu)) +* Add completion support for --namespace and --cluster to kubectl ([#44251](https://github.com/kubernetes/kubernetes/pull/44251), [@superbrothers](https://github.com/superbrothers)) +* dnsprovider: avoid panic if route53 fields are nil ([#44380](https://github.com/kubernetes/kubernetes/pull/44380), [@justinsb](https://github.com/justinsb)) +* In 'kubectl describe', find controllers with ControllerRef, instead of showing the original creator. ([#42849](https://github.com/kubernetes/kubernetes/pull/42849), [@janetkuo](https://github.com/janetkuo)) +* Heat cluster operations now support environments that have multiple Swift URLs ([#41561](https://github.com/kubernetes/kubernetes/pull/41561), [@jamiehannaford](https://github.com/jamiehannaford)) +* Adds support for allocation of pod IPs via IP aliases. ([#42147](https://github.com/kubernetes/kubernetes/pull/42147), [@bowei](https://github.com/bowei)) +* alpha volume provisioning is removed and default storage class should be used instead. ([#44090](https://github.com/kubernetes/kubernetes/pull/44090), [@NickrenREN](https://github.com/NickrenREN)) +* validateClusterInfo: use clientcmdapi.NewCluster() ([#44221](https://github.com/kubernetes/kubernetes/pull/44221), [@ncdc](https://github.com/ncdc)) +* Fix corner-case with OnlyLocal Service healthchecks. ([#44313](https://github.com/kubernetes/kubernetes/pull/44313), [@thockin](https://github.com/thockin)) +* Adds annotations to all Federation objects created by kubefed. ([#42683](https://github.com/kubernetes/kubernetes/pull/42683), [@perotinus](https://github.com/perotinus)) +* [Federation][Kubefed] Bug fix to enable disabling federation controllers through override args ([#44209](https://github.com/kubernetes/kubernetes/pull/44209), [@irfanurrehman](https://github.com/irfanurrehman)) +* [Federation] Remove deprecated federation-apiserver-kubeconfig secret ([#44287](https://github.com/kubernetes/kubernetes/pull/44287), [@shashidharatd](https://github.com/shashidharatd)) +* Scheduler can receive its policy configuration from a ConfigMap ([#43892](https://github.com/kubernetes/kubernetes/pull/43892), [@bsalamat](https://github.com/bsalamat)) +* AWS cloud provider: fix support running the master with a different AWS account or even on a different cloud provider than the nodes. ([#44235](https://github.com/kubernetes/kubernetes/pull/44235), [@mrIncompetent](https://github.com/mrIncompetent)) +* add rancher credential provider ([#40160](https://github.com/kubernetes/kubernetes/pull/40160), [@wlan0](https://github.com/wlan0)) +* Support generating Open API extensions for strategic merge patch tags in go struct tags ([#44121](https://github.com/kubernetes/kubernetes/pull/44121), [@mbohlool](https://github.com/mbohlool)) +* Use go1.8.1 for arm and ppc64le ([#44216](https://github.com/kubernetes/kubernetes/pull/44216), [@mkumatag](https://github.com/mkumatag)) +* Aggregated used ports at the NodeInfo level for `PodFitsHostPorts` predicate. ([#42524](https://github.com/kubernetes/kubernetes/pull/42524), [@k82cn](https://github.com/k82cn)) +* Catch error when failed to make directory in NFS volume plugin ([#38801](https://github.com/kubernetes/kubernetes/pull/38801), [@nak3](https://github.com/nak3)) +* Support iSCSI CHAP authentication ([#43396](https://github.com/kubernetes/kubernetes/pull/43396), [@rootfs](https://github.com/rootfs)) +* Support context completion for kubectl config use-context ([#42336](https://github.com/kubernetes/kubernetes/pull/42336), [@superbrothers](https://github.com/superbrothers)) +* print warning when delete current context ([#42538](https://github.com/kubernetes/kubernetes/pull/42538), [@adohe](https://github.com/adohe)) +* Add node e2e tests for hostPid ([#44119](https://github.com/kubernetes/kubernetes/pull/44119), [@feiskyer](https://github.com/feiskyer)) +* kubeadm: Make `kubeadm reset` tolerant of a disabled docker service. ([#43951](https://github.com/kubernetes/kubernetes/pull/43951), [@luxas](https://github.com/luxas)) +* kubelet: make dockershim.sock configurable ([#43914](https://github.com/kubernetes/kubernetes/pull/43914), [@ncdc](https://github.com/ncdc)) +* Fix [broken service accounts when using dedicated service account key](https://github.com/kubernetes/kubernetes/issues/44285). ([#44169](https://github.com/kubernetes/kubernetes/pull/44169), [@mikedanese](https://github.com/mikedanese)) +* Fix incorrect conflict errors applying strategic merge patches to resources. ([#43871](https://github.com/kubernetes/kubernetes/pull/43871), [@liggitt](https://github.com/liggitt)) +* Fix [transition between NotReady and Unreachable taints](https://github.com/kubernetes/kubernetes/issues/43444). ([#44042](https://github.com/kubernetes/kubernetes/pull/44042), [@gmarek](https://github.com/gmarek)) +* leader election lock based on scheduler name ([#42961](https://github.com/kubernetes/kubernetes/pull/42961), [@wanghaoran1988](https://github.com/wanghaoran1988)) +* [Federation] Remove FEDERATIONS_DOMAIN_MAP references ([#43137](https://github.com/kubernetes/kubernetes/pull/43137), [@shashidharatd](https://github.com/shashidharatd)) +* Fix for [federation failing to propagate cascading deletion](https://github.com/kubernetes/kubernetes/issues/44304). ([#44108](https://github.com/kubernetes/kubernetes/pull/44108), [@csbell](https://github.com/csbell)) +* Fix bug with service nodeports that have no backends not being rejected, when they should be. This is not a regression vs v1.5 - it's a fix that didn't quite fix hard enough. ([#43972](https://github.com/kubernetes/kubernetes/pull/43972), [@thockin](https://github.com/thockin)) +* Fix for [failure to delete federation controllers with finalizers](https://github.com/kubernetes/kubernetes/issues/43828). ([#44084](https://github.com/kubernetes/kubernetes/pull/44084), [@nikhiljindal](https://github.com/nikhiljindal)) +* Fix container hostPid settings. ([#44097](https://github.com/kubernetes/kubernetes/pull/44097), [@feiskyer](https://github.com/feiskyer)) +* Fixed an issue mounting the wrong secret into pods as a service account token. ([#44102](https://github.com/kubernetes/kubernetes/pull/44102), [@ncdc](https://github.com/ncdc)) + + + +# v1.7.0-alpha.1 + +[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/master/examples) + +## Downloads for v1.7.0-alpha.1 + + +filename | sha256 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.7.0-alpha.1/kubernetes.tar.gz) | `a8430f678ae5abb16909183bb6472d49084b26c2990854dac73f55be69941435` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.7.0-alpha.1/kubernetes-src.tar.gz) | `09792d0b31c3c0f085f54a62c0d151029026cee3c57ac8c3456751ef2243967f` + +### Client Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.7.0-alpha.1/kubernetes-client-darwin-386.tar.gz) | `115543a5ec55f9039136e0ecfd90d6510b146075d13987fad9c03db3761fbac6` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.7.0-alpha.1/kubernetes-client-darwin-amd64.tar.gz) | `91b7cc89386041125af2ecafd3c6e73197f0b7af3ec817d9aed4822e1543eee9` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.7.0-alpha.1/kubernetes-client-linux-386.tar.gz) | `7a77bfec2873907ad1f955e33414a9afa029d37d90849bf652e7bab1f2c668ed` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.0-alpha.1/kubernetes-client-linux-amd64.tar.gz) | `674d1a839869ac308f3a273ab41be42dab8b52e96526effdbd268255ab6ad4c1` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.0-alpha.1/kubernetes-client-linux-arm64.tar.gz) | `4b0164b0474987df5829dcd88c0cdf2d16dbcba30a03cd0ad5ca860d6b4a2f3f` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.7.0-alpha.1/kubernetes-client-linux-arm.tar.gz) | `cb5a941c3e61465eab544c7b23acd4be6969d74ac23bd9370aa3f9dfc24f2b42` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.0-alpha.1/kubernetes-client-linux-ppc64le.tar.gz) | `d583aff4c86de142b5e6e23cd5c8eb9617fea6574acede9fa2420169405429c6` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.0-alpha.1/kubernetes-client-linux-s390x.tar.gz) | `ab14c4806b4e9c7a41993924467969886e1288216d80d2d077a2c35f26fc8cc5` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.7.0-alpha.1/kubernetes-client-windows-386.tar.gz) | `0af3f9d1193d9ea49bb4e1cb46142b846b70ceb49ab47ad6fc2497a0dc88395d` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.7.0-alpha.1/kubernetes-client-windows-amd64.tar.gz) | `12a9dffda6ba8916149b681f49af506790be97275fe6fc16552ac765aef20a99` + +### Server Binaries + +filename | sha256 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.0-alpha.1/kubernetes-server-linux-amd64.tar.gz) | `d6b4c285a89172692e4ba82b777cc9df5b2f5061caa0a9cef6add246a848eeb9` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.0-alpha.1/kubernetes-server-linux-arm64.tar.gz) | `e73fb04d4ff692f19de09cfc3cfa17014e23df4150b26c20c3329f688c164358` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.7.0-alpha.1/kubernetes-server-linux-arm.tar.gz) | `98763b72ba6652abfd5b671981506f8c35ab522d34af34636e5095413769eeb5` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.0-alpha.1/kubernetes-server-linux-ppc64le.tar.gz) | `b39dbb0dc96dcdf1ec4cbd5788e00e46c0d11efb42c6dbdec64758aa8aa9d8e5` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.0-alpha.1/kubernetes-server-linux-s390x.tar.gz) | `c0171e2f22c4e51f25185e71387301ad2c0ade90139fe96dec1c2f999de71716` + +## Changelog since v1.6.0 + +### Other notable changes + +* Juju: Enable GPU mode if GPU hardware detected ([#43467](https://github.com/kubernetes/kubernetes/pull/43467), [@tvansteenburgh](https://github.com/tvansteenburgh)) +* Check the error before parsing the apiversion ([#44047](https://github.com/kubernetes/kubernetes/pull/44047), [@yujuhong](https://github.com/yujuhong)) +* get-kube-local.sh checks pods with option "--namespace=kube-system" ([#42518](https://github.com/kubernetes/kubernetes/pull/42518), [@mtanino](https://github.com/mtanino)) +* Using http2 in kubeapi-load-balancer to fix kubectl exec uses ([#43625](https://github.com/kubernetes/kubernetes/pull/43625), [@mbruzek](https://github.com/mbruzek)) +* Support status.hostIP in downward API ([#42717](https://github.com/kubernetes/kubernetes/pull/42717), [@andrewsykim](https://github.com/andrewsykim)) +* AWS cloud provider: allow to set KubernetesClusterID or KubernetesClusterTag in combination with VPC. ([#42512](https://github.com/kubernetes/kubernetes/pull/42512), [@scheeles](https://github.com/scheeles)) +* changed kubelet default image-gc-high-threshold to 85% to resolve a conflict with default settings in docker that prevented image garbage collection from resolving low disk space situations when using devicemapper storage. ([#40432](https://github.com/kubernetes/kubernetes/pull/40432), [@sjenning](https://github.com/sjenning)) +* When creating a container using envFrom, ([#42083](https://github.com/kubernetes/kubernetes/pull/42083), [@fraenkel](https://github.com/fraenkel)) + * 1. validate the name of the ConfigMap in a ConfigMapRef + * 2. validate the name of the Secret in a SecretRef +* RBAC role and rolebinding auto-reconciliation is now performed only when the RBAC authorization mode is enabled. ([#43813](https://github.com/kubernetes/kubernetes/pull/43813), [@liggitt](https://github.com/liggitt)) +* Permission to use a PodSecurityPolicy can now be granted within a single namespace by allowing the `use` verb on the `podsecuritypolicies` resource within the namespace. ([#42360](https://github.com/kubernetes/kubernetes/pull/42360), [@liggitt](https://github.com/liggitt)) +* Enable audit log in local cluster ([#42379](https://github.com/kubernetes/kubernetes/pull/42379), [@xilabao](https://github.com/xilabao)) +* Fix a deadlock in kubeadm master initialization. ([#43835](https://github.com/kubernetes/kubernetes/pull/43835), [@mikedanese](https://github.com/mikedanese)) +* Implement API usage metrics for gce storage ([#40338](https://github.com/kubernetes/kubernetes/pull/40338), [@gnufied](https://github.com/gnufied)) +* kubeadm: clean up exited containers and network checkpoints ([#43836](https://github.com/kubernetes/kubernetes/pull/43836), [@yujuhong](https://github.com/yujuhong)) +* ActiveDeadlineSeconds is validated in workload controllers now, make sure it's not set anywhere (it shouldn't be set by default and having it set means your controller will restart the Pods at some point) ([#38741](https://github.com/kubernetes/kubernetes/pull/38741), [@sandflee](https://github.com/sandflee)) +* azure: all clients poll duration is now 5 seconds ([#43699](https://github.com/kubernetes/kubernetes/pull/43699), [@colemickens](https://github.com/colemickens)) +* addressing issue [#39427](https://github.com/kubernetes/kubernetes/pull/39427) adding a flag --output to 'kubectl version' ([#39858](https://github.com/kubernetes/kubernetes/pull/39858), [@alejandroEsc](https://github.com/alejandroEsc)) +* Support secure etcd cluster for centos provider. ([#42994](https://github.com/kubernetes/kubernetes/pull/42994), [@Shawyeok](https://github.com/Shawyeok)) +* Use Cluster Autoscaler 0.5.1, which fixes an issue in Cluster Autoscaler 0.5 where the cluster may be scaled up unnecessarily. Also the status of Cluster Autoscaler is now exposed in kube-system/cluster-autoscaler-status config map. ([#43745](https://github.com/kubernetes/kubernetes/pull/43745), [@mwielgus](https://github.com/mwielgus)) +* Use ProviderID to address nodes in the cloudprovider ([#42604](https://github.com/kubernetes/kubernetes/pull/42604), [@wlan0](https://github.com/wlan0)) +* Openstack cinder v1/v2/auto API support ([#40423](https://github.com/kubernetes/kubernetes/pull/40423), [@mkutsevol](https://github.com/mkutsevol)) +* API resource discovery now includes the `singularName` used to refer to the resource. ([#43312](https://github.com/kubernetes/kubernetes/pull/43312), [@deads2k](https://github.com/deads2k)) +* Add the ability to lock on ConfigMaps to support HA for self hosted components ([#42666](https://github.com/kubernetes/kubernetes/pull/42666), [@timothysc](https://github.com/timothysc)) +* OpenStack clusters can now specify whether worker nodes are assigned a floating IP ([#42638](https://github.com/kubernetes/kubernetes/pull/42638), [@jamiehannaford](https://github.com/jamiehannaford)) +* Add Host field to TCPSocketAction ([#42902](https://github.com/kubernetes/kubernetes/pull/42902), [@louyihua](https://github.com/louyihua)) +* Support StorageClass in Azure file volume ([#42170](https://github.com/kubernetes/kubernetes/pull/42170), [@rootfs](https://github.com/rootfs)) +* Be able to specify the timeout to wait for pod for kubectl logs/attach ([#41813](https://github.com/kubernetes/kubernetes/pull/41813), [@shiywang](https://github.com/shiywang)) +* Add support for bring-your-own ip address for Services on Azure ([#42034](https://github.com/kubernetes/kubernetes/pull/42034), [@brendandburns](https://github.com/brendandburns)) +* 1. create configmap has a new option --from-env-file that populates a configmap from file which follows a key=val format for each line. ([#38882](https://github.com/kubernetes/kubernetes/pull/38882), [@fraenkel](https://github.com/fraenkel)) + * 2. create secret has a new option --from-env-file that populates a configmap from file which follows a key=val format for each line. +* update the signing key for percona debian and ubuntu packages ([#41186](https://github.com/kubernetes/kubernetes/pull/41186), [@dixudx](https://github.com/dixudx)) +* release-note-none ([#41139](https://github.com/kubernetes/kubernetes/pull/41139), [@juanvallejo](https://github.com/juanvallejo)) +* fc: Drop multipath.conf snippet ([#36698](https://github.com/kubernetes/kubernetes/pull/36698), [@fabiand](https://github.com/fabiand)) + +Please see the [Releases Page](https://github.com/kubernetes/kubernetes/releases) for older releases. + +Release notes of older releases can be found in: +- [CHANGELOG-1.2.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.2.md) +- [CHANGELOG-1.3.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.3.md) +- [CHANGELOG-1.4.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.4.md) +- [CHANGELOG-1.5.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.5.md) +- [CHANGELOG-1.6.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.6.md) + +[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/CHANGELOG.md?pixel)]() diff --git a/vendor/k8s.io/kubernetes/CONTRIBUTING.md b/vendor/k8s.io/kubernetes/CONTRIBUTING.md new file mode 100644 index 000000000..470f556ad --- /dev/null +++ b/vendor/k8s.io/kubernetes/CONTRIBUTING.md @@ -0,0 +1,9 @@ +# Contributing + +Information about contributing to the +[kubernetes code repo](README.md) lives in the +[kubernetes community repo](https://github.com/kubernetes/community) +(it's a big topic). + + +[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/CONTRIBUTING.md?pixel)]() diff --git a/vendor/k8s.io/kubernetes/Makefile b/vendor/k8s.io/kubernetes/Makefile new file mode 120000 index 000000000..613e083f0 --- /dev/null +++ b/vendor/k8s.io/kubernetes/Makefile @@ -0,0 +1 @@ +build/root/Makefile \ No newline at end of file diff --git a/vendor/k8s.io/kubernetes/Makefile.generated_files b/vendor/k8s.io/kubernetes/Makefile.generated_files new file mode 120000 index 000000000..31d7e4ec6 --- /dev/null +++ b/vendor/k8s.io/kubernetes/Makefile.generated_files @@ -0,0 +1 @@ +build/root/Makefile.generated_files \ No newline at end of file diff --git a/vendor/k8s.io/kubernetes/OWNERS b/vendor/k8s.io/kubernetes/OWNERS new file mode 100644 index 000000000..ec80d280a --- /dev/null +++ b/vendor/k8s.io/kubernetes/OWNERS @@ -0,0 +1,17 @@ +reviewers: + - brendandburns + - dchen1107 + - jbeda + - lavalamp + - smarterclayton + - thockin +approvers: + - bgrant0607 + - brendandburns + - dchen1107 + - jbeda + - monopole # To move code per kubernetes/community#598 + - lavalamp + - smarterclayton + - thockin + - wojtek-t diff --git a/vendor/k8s.io/kubernetes/OWNERS_ALIASES b/vendor/k8s.io/kubernetes/OWNERS_ALIASES new file mode 100644 index 000000000..b1c60a7e8 --- /dev/null +++ b/vendor/k8s.io/kubernetes/OWNERS_ALIASES @@ -0,0 +1,177 @@ +aliases: + sig-scheduling-maintainers: + - bsalamat + - davidopp + - k82cn + - timothysc + - wojtek-t + sig-scheduling: + - bsalamat + - davidopp + - jayunit100 + - k82cn + - resouer + - timothysc + - wojtek-t + sig-cli-maintainers: + - adohe + - brendandburns + - deads2k + - fabianofranz + - janetkuo + - liggitt + - pwittrock + - smarterclayton + sig-cli: + - adohe + - deads2k + - derekwaynecarr + - dims + - dshulyak + - eparis + - ericchiang + - fabianofranz + - ghodss + - mengqiy + - rootfs + - shiywang + - smarterclayton + - soltysh + - sttts + sig-testing-reviewers: + - fejta + - ixdy + - rmmh + - spiffxp + - spxtr + sig-testing-approvers: + - fejta + - ixdy + - rmmh + - spiffxp + - spxtr + sig-node-reviewers: + - Random-Liu + - dashpole + - dchen1107 + - derekwaynecarr + - dims + - feiskyer + - mtaufen + - ncdc + - pmorie + - resouer + - sjpotter + - tallclair + - tmrts + - vishh + - yifan-gu + - yujuhong + sig-network-approvers: + - bowei + - caseydavenport + - danwinship + - dcbw + - dnardo + - freehan + - mrhohn + - nicksardo + - thockin + sig-network-reviewers: + - bowei + - caseydavenport + - danwinship + - dcbw + - dnardo + - freehan + - mrhohn + - nicksardo + - thockin + sig-apps-reviewers: + - enisoc + - erictune + - foxish + - janetkuo + - kow3ns + - lukaszo + - mfojtik + - smarterclayton + - soltysh + - tnozicka + sig-apps-api-approvers: + - erictune + - smarterclayton + milestone-maintainers: + - lavalamp + - deads2k + - michelleN + - mattfarina + - prydonius + - bgrant0607 + - jdumars + - ericchiang + - liggitt + - deads2k + - mwielgus + - directxman12 + - justinsb + - kris-nova + - chrislovecnm + - mfburnett + - slack + - colemickens + - foxish + - fabianofranz + - pwittrock + - AdoHe + - lukemarsden + - jbeda + - roberthbailey + - zehicle + - jdumars + - grodrigues3 + - Phillels + - devin-donnelly + - jaredbhatti + - csbell + - quinton-hoole + - piosz + - fabxc + - thockin + - dcbw + - caseydavenport + - dchen1107 + - derekwaynecarr + - zen + - marcoceppi + - dghubble + - idvoretskyi + - xsgordon + - apsinha + - idvoretskyi + - calebamiles + - pwittrock + - calebamiles + - wojtek-t + - countspongebob + - jbeda + - davidopp + - timothysc + - pmorie + - arschles + - vaikas-google + - duglin + - saad-ali + - childsb + - spiffxp + - fejta + - timothysc + - danielromlein + - floreks + - michmike + - abgworrall + - krzyzacy + - steveperry-53 + - radhikpac + - jpbetz + diff --git a/vendor/k8s.io/kubernetes/README.md b/vendor/k8s.io/kubernetes/README.md new file mode 100644 index 000000000..a86767b3c --- /dev/null +++ b/vendor/k8s.io/kubernetes/README.md @@ -0,0 +1,86 @@ +# Kubernetes + +[![Submit Queue Widget]][Submit Queue] [![GoDoc Widget]][GoDoc] + +<img src="https://github.com/kubernetes/kubernetes/raw/master/logo/logo.png" width="100"> + +---- + +Kubernetes is an open source system for managing [containerized applications] +across multiple hosts, providing basic mechanisms for deployment, maintenance, +and scaling of applications. + +Kubernetes builds upon a decade and a half of experience at Google running +production workloads at scale using a system called [Borg], +combined with best-of-breed ideas and practices from the community. + +Kubernetes is hosted by the Cloud Native Computing Foundation ([CNCF]). +If you are a company that wants to help shape the evolution of +technologies that are container-packaged, dynamically-scheduled +and microservices-oriented, consider joining the CNCF. +For details about who's involved and how Kubernetes plays a role, +read the CNCF [announcement]. + +---- + +## To start using Kubernetes + +See our documentation on [kubernetes.io]. + +Try our [interactive tutorial]. + +Take a free course on [Scalable Microservices with Kubernetes]. + +## To start developing Kubernetes + +The [community repository] hosts all information about +building Kubernetes from source, how to contribute code +and documentation, who to contact about what, etc. + +If you want to build Kubernetes right away there are two options: + +##### You have a working [Go environment]. + +``` +$ go get -d k8s.io/kubernetes +$ cd $GOPATH/src/k8s.io/kubernetes +$ make +``` + +##### You have a working [Docker environment]. + +``` +$ git clone https://github.com/kubernetes/kubernetes +$ cd kubernetes +$ make quick-release +``` + +If you are less impatient, head over to the [developer's documentation]. + +## Support + +If you need support, start with the [troubleshooting guide] +and work your way through the process that we've outlined. + +That said, if you have questions, reach out to us +[one way or another][communication]. + +[announcement]: https://cncf.io/news/announcement/2015/07/new-cloud-native-computing-foundation-drive-alignment-among-container +[Borg]: https://research.google.com/pubs/pub43438.html +[CNCF]: https://www.cncf.io/about +[communication]: https://github.com/kubernetes/community/blob/master/communication.md +[community repository]: https://github.com/kubernetes/community +[containerized applications]: https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/ +[developer's documentation]: https://github.com/kubernetes/community/tree/master/contributors/devel +[Docker environment]: https://docs.docker.com/engine +[Go environment]: https://golang.org/doc/install +[GoDoc]: https://godoc.org/k8s.io/kubernetes +[GoDoc Widget]: https://godoc.org/k8s.io/kubernetes?status.svg +[interactive tutorial]: http://kubernetes.io/docs/tutorials/kubernetes-basics +[kubernetes.io]: http://kubernetes.io +[Scalable Microservices with Kubernetes]: https://www.udacity.com/course/scalable-microservices-with-kubernetes--ud615 +[Submit Queue]: http://submit-queue.k8s.io/#/ci +[Submit Queue Widget]: http://submit-queue.k8s.io/health.svg?v=1 +[troubleshooting guide]: https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/ + +[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/README.md?pixel)]() diff --git a/vendor/k8s.io/kubernetes/SUPPORT.md b/vendor/k8s.io/kubernetes/SUPPORT.md new file mode 100644 index 000000000..9ae470a29 --- /dev/null +++ b/vendor/k8s.io/kubernetes/SUPPORT.md @@ -0,0 +1,39 @@ +## Support for deploying and using Kubernetes + +Welcome to Kubernetes! We use GitHub for tracking bugs and feature requests. +This isn't the right place to get support for using Kubernetes, but the following +resources are available below, thanks for understanding. + +### Stack Overflow + +The Kubernetes Community is active on Stack Overflow, you can post your questions there: + +* [Kubernetes on Stack Overflow](http://stackoverflow.com/questions/tagged/kubernetes) + + * Here are some tips for [about how to ask good questions](http://stackoverflow.com/help/how-to-ask). + * Don't forget to check to see [what's on topic](http://stackoverflow.com/help/on-topic). + +### Documentation + +* [User Documentation](https://kubernetes.io/docs/) +* [Troubleshooting Guide](https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/) + + +### Real-time Chat + +* [Slack](https://kubernetes.slack.com) ([registration](http://slack.k8s.io)): +The `#kubernetes-users` and `#kubernetes-novice` channels are usual places where +people offer support. + +* Also check out the +[Slack Archive](http://kubernetes.slackarchive.io/) of past conversations. + +### Mailing Lists/Groups + +* [Kubernetes-users group](https://groups.google.com/forum/#!forum/kubernetes-users) + + + +<!--- +Derived from https://github.com/kubernetes/community/blob/master/contributors/devel/on-call-user-support.md +--> diff --git a/vendor/k8s.io/kubernetes/Vagrantfile b/vendor/k8s.io/kubernetes/Vagrantfile new file mode 100644 index 000000000..532211d0f --- /dev/null +++ b/vendor/k8s.io/kubernetes/Vagrantfile @@ -0,0 +1,325 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! +VAGRANTFILE_API_VERSION = "2" + +# Require a recent version of vagrant otherwise some have reported errors setting host names on boxes +Vagrant.require_version ">= 1.7.4" + +if ARGV.first == "up" && ENV['USING_KUBE_SCRIPTS'] != 'true' + raise Vagrant::Errors::VagrantError.new, <<END +Calling 'vagrant up' directly is not supported. Instead, please run the following: + + export KUBERNETES_PROVIDER=vagrant + export VAGRANT_DEFAULT_PROVIDER=providername + ./cluster/kube-up.sh +END +end + +# The number of nodes to provision +$num_node = (ENV['NUM_NODES'] || 1).to_i + +# ip configuration +$master_ip = ENV['MASTER_IP'] +$node_ip_base = ENV['NODE_IP_BASE'] || "" +$node_ips = $num_node.times.collect { |n| $node_ip_base + "#{n+3}" } + +# Determine the OS platform to use +$kube_os = ENV['KUBERNETES_OS'] || "fedora" + +# Determine whether vagrant should use nfs to sync folders +$use_nfs = ENV['KUBERNETES_VAGRANT_USE_NFS'] == 'true' +# Determine whether vagrant should use rsync to sync folders +$use_rsync = ENV['KUBERNETES_VAGRANT_USE_RSYNC'] == 'true' + +# To override the vagrant provider, use (e.g.): +# KUBERNETES_PROVIDER=vagrant VAGRANT_DEFAULT_PROVIDER=... .../cluster/kube-up.sh +# To override the box, use (e.g.): +# KUBERNETES_PROVIDER=vagrant KUBERNETES_BOX_NAME=... .../cluster/kube-up.sh +# You can specify a box version: +# KUBERNETES_PROVIDER=vagrant KUBERNETES_BOX_NAME=... KUBERNETES_BOX_VERSION=... .../cluster/kube-up.sh +# You can specify a box location: +# KUBERNETES_PROVIDER=vagrant KUBERNETES_BOX_NAME=... KUBERNETES_BOX_URL=... .../cluster/kube-up.sh +# KUBERNETES_BOX_URL and KUBERNETES_BOX_VERSION will be ignored unless +# KUBERNETES_BOX_NAME is set + +# Default OS platform to provider/box information +$kube_provider_boxes = { + :parallels => { + 'fedora' => { + # :box_url and :box_version are optional (and mutually exclusive); + # if :box_url is omitted the box will be retrieved by :box_name (and + # :box_version if provided) from + # http://atlas.hashicorp.com/boxes/search (formerly + # http://vagrantcloud.com/); this allows you override :box_name with + # your own value so long as you provide :box_url; for example, the + # "official" name of this box is "rickard-von-essen/ + # opscode_fedora-20", but by providing the URL and our own name, we + # make it appear as yet another provider under the "kube-fedora22" + # box + :box_name => 'kube-fedora23', + :box_url => 'https://opscode-vm-bento.s3.amazonaws.com/vagrant/parallels/opscode_fedora-23_chef-provisionerless.box' + } + }, + :virtualbox => { + 'fedora' => { + :box_name => 'kube-fedora23', + :box_url => 'https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_fedora-23_chef-provisionerless.box' + } + }, + :libvirt => { + 'fedora' => { + :box_name => 'kube-fedora23', + :box_url => 'https://dl.fedoraproject.org/pub/fedora/linux/releases/23/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-23-20151030.x86_64.vagrant-libvirt.box' + } + }, + :vmware_desktop => { + 'fedora' => { + :box_name => 'kube-fedora23', + :box_url => 'https://opscode-vm-bento.s3.amazonaws.com/vagrant/vmware/opscode_fedora-23_chef-provisionerless.box' + } + }, + :vsphere => { + 'fedora' => { + :box_name => 'vsphere-dummy', + :box_url => 'https://github.com/deromka/vagrant-vsphere/blob/master/vsphere-dummy.box?raw=true' + } + } +} + +# Give access to all physical cpu cores +# Previously cargo-culted from here: +# http://www.stefanwrobel.com/how-to-make-vagrant-performance-not-suck +# Rewritten to actually determine the number of hardware cores instead of assuming +# that the host has hyperthreading enabled. +host = RbConfig::CONFIG['host_os'] +if host =~ /darwin/ + $vm_cpus = `sysctl -n hw.physicalcpu`.to_i +elsif host =~ /linux/ + #This should work on most processors, however it will fail on ones without the core id field. + #So far i have only seen this on a raspberry pi. which you probably don't want to run vagrant on anyhow... + #But just in case we'll default to the result of nproc if we get 0 just to be safe. + $vm_cpus = `cat /proc/cpuinfo | grep 'core id' | sort -u | wc -l`.to_i + if $vm_cpus < 1 + $vm_cpus = `nproc`.to_i + end +else # sorry Windows folks, I can't help you + $vm_cpus = 2 +end + +# Give VM 1024MB of RAM by default +# In Fedora VM, tmpfs device is mapped to /tmp. tmpfs is given 50% of RAM allocation. +# When doing Salt provisioning, we copy approximately 200MB of content in /tmp before anything else happens. +# This causes problems if anything else was in /tmp or the other directories that are bound to tmpfs device (i.e /run, etc.) +$vm_master_mem = (ENV['KUBERNETES_MASTER_MEMORY'] || ENV['KUBERNETES_MEMORY'] || 1280).to_i +$vm_node_mem = (ENV['KUBERNETES_NODE_MEMORY'] || ENV['KUBERNETES_MEMORY'] || 2048).to_i + +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| + if Vagrant.has_plugin?("vagrant-proxyconf") + $http_proxy = ENV['KUBERNETES_HTTP_PROXY'] || "" + $https_proxy = ENV['KUBERNETES_HTTPS_PROXY'] || "" + $no_proxy = ENV['KUBERNETES_NO_PROXY'] || "127.0.0.1" + config.proxy.http = $http_proxy + config.proxy.https = $https_proxy + config.proxy.no_proxy = $no_proxy + end + + # this corrects a bug in 1.8.5 where an invalid SSH key is inserted. + if Vagrant::VERSION == "1.8.5" + config.ssh.insert_key = false + end + + def setvmboxandurl(config, provider) + if ENV['KUBERNETES_BOX_NAME'] then + config.vm.box = ENV['KUBERNETES_BOX_NAME'] + + if ENV['KUBERNETES_BOX_URL'] then + config.vm.box_url = ENV['KUBERNETES_BOX_URL'] + end + + if ENV['KUBERNETES_BOX_VERSION'] then + config.vm.box_version = ENV['KUBERNETES_BOX_VERSION'] + end + else + config.vm.box = $kube_provider_boxes[provider][$kube_os][:box_name] + + if $kube_provider_boxes[provider][$kube_os][:box_url] then + config.vm.box_url = $kube_provider_boxes[provider][$kube_os][:box_url] + end + + if $kube_provider_boxes[provider][$kube_os][:box_version] then + config.vm.box_version = $kube_provider_boxes[provider][$kube_os][:box_version] + end + end + end + + def customize_vm(config, vm_mem) + + if $use_nfs then + config.vm.synced_folder ".", "/vagrant", nfs: true + elsif $use_rsync then + opts = {} + if ENV['KUBERNETES_VAGRANT_RSYNC_ARGS'] then + opts[:rsync__args] = ENV['KUBERNETES_VAGRANT_RSYNC_ARGS'].split(" ") + end + if ENV['KUBERNETES_VAGRANT_RSYNC_EXCLUDE'] then + opts[:rsync__exclude] = ENV['KUBERNETES_VAGRANT_RSYNC_EXCLUDE'].split(" ") + end + config.vm.synced_folder ".", "/vagrant", opts + end + + # Try VMWare Fusion first (see + # https://docs.vagrantup.com/v2/providers/basic_usage.html) + config.vm.provider :vmware_fusion do |v, override| + setvmboxandurl(override, :vmware_desktop) + v.vmx['memsize'] = vm_mem + v.vmx['numvcpus'] = $vm_cpus + end + + # configure libvirt provider + config.vm.provider :libvirt do |v, override| + setvmboxandurl(override, :libvirt) + v.memory = vm_mem + v.cpus = $vm_cpus + v.nested = true + v.volume_cache = 'none' + end + + # Then try VMWare Workstation + config.vm.provider :vmware_workstation do |v, override| + setvmboxandurl(override, :vmware_desktop) + v.vmx['memsize'] = vm_mem + v.vmx['numvcpus'] = $vm_cpus + end + + # Then try Parallels + config.vm.provider :parallels do |v, override| + setvmboxandurl(override, :parallels) + v.memory = vm_mem # v.customize ['set', :id, '--memsize', vm_mem] + v.cpus = $vm_cpus # v.customize ['set', :id, '--cpus', $vm_cpus] + + # Don't attempt to update the Parallels tools on the image (this can + # be done manually if necessary) + v.update_guest_tools = false # v.customize ['set', :id, '--tools-autoupdate', 'off'] + + # Set up Parallels folder sharing to behave like VirtualBox (i.e., + # mount the current directory as /vagrant and that's it) + v.customize ['set', :id, '--shf-guest', 'off'] + v.customize ['set', :id, '--shf-guest-automount', 'off'] + v.customize ['set', :id, '--shf-host', 'on'] + + # Synchronize VM clocks to host clock (Avoid certificate invalid issue) + v.customize ['set', :id, '--time-sync', 'on'] + + # Remove all auto-mounted "shared folders"; the result seems to + # persist between runs (i.e., vagrant halt && vagrant up) + override.vm.provision :shell, :inline => (%q{ + set -ex + if [ -d /media/psf ]; then + for i in /media/psf/*; do + if [ -d "${i}" ]; then + umount "${i}" || true + rmdir -v "${i}" + fi + done + rmdir -v /media/psf + fi + exit + }).strip + end + + # Then try vsphere + config.vm.provider :vsphere do |vsphere, override| + setvmboxandurl(override, :vsphere) + + #config.vm.hostname = ENV['MASTER_NAME'] + + config.ssh.username = ENV['MASTER_USER'] + config.ssh.password = ENV['MASTER_PASSWD'] + + config.ssh.pty = true + config.ssh.insert_key = true + #config.ssh.private_key_path = '~/.ssh/id_rsa_vsphere' + + # Don't attempt to update the tools on the image (this can + # be done manually if necessary) + # vsphere.update_guest_tools = false # v.customize ['set', :id, '--tools-autoupdate', 'off'] + + # The vSphere host we're going to connect to + vsphere.host = ENV['VAGRANT_VSPHERE_URL'] + + # The ESX host for the new VM + vsphere.compute_resource_name = ENV['VAGRANT_VSPHERE_RESOURCE_POOL'] + + # The resource pool for the new VM + #vsphere.resource_pool_name = 'Comp' + + # path to folder where new VM should be created, if not specified template's parent folder will be used + vsphere.vm_base_path = ENV['VAGRANT_VSPHERE_BASE_PATH'] + + # The template we're going to clone + vsphere.template_name = ENV['VAGRANT_VSPHERE_TEMPLATE_NAME'] + + # The name of the new machine + #vsphere.name = ENV['MASTER_NAME'] + + # vSphere login + vsphere.user = ENV['VAGRANT_VSPHERE_USERNAME'] + + # vSphere password + vsphere.password = ENV['VAGRANT_VSPHERE_PASSWORD'] + + # cpu count + vsphere.cpu_count = $vm_cpus + + # memory in MB + vsphere.memory_mb = vm_mem + + # If you don't have SSL configured correctly, set this to 'true' + vsphere.insecure = ENV['VAGRANT_VSPHERE_INSECURE'] + end + + + # Don't attempt to update Virtualbox Guest Additions (requires gcc) + if Vagrant.has_plugin?("vagrant-vbguest") then + config.vbguest.auto_update = false + end + # Finally, fall back to VirtualBox + config.vm.provider :virtualbox do |v, override| + setvmboxandurl(override, :virtualbox) + v.memory = vm_mem # v.customize ["modifyvm", :id, "--memory", vm_mem] + v.cpus = $vm_cpus # v.customize ["modifyvm", :id, "--cpus", $vm_cpus] + + # Use faster paravirtualized networking + v.customize ["modifyvm", :id, "--nictype1", "virtio"] + v.customize ["modifyvm", :id, "--nictype2", "virtio"] + end + end + + # Kubernetes master + config.vm.define "master" do |c| + customize_vm c, $vm_master_mem + if ENV['KUBE_TEMP'] then + script = "#{ENV['KUBE_TEMP']}/master-start.sh" + c.vm.provision "shell", run: "always", path: script + end + c.vm.network "private_network", ip: "#{$master_ip}" + end + + # Kubernetes node + $num_node.times do |n| + node_vm_name = "node-#{n+1}" + + config.vm.define node_vm_name do |node| + customize_vm node, $vm_node_mem + + node_ip = $node_ips[n] + if ENV['KUBE_TEMP'] then + script = "#{ENV['KUBE_TEMP']}/node-start-#{n}.sh" + node.vm.provision "shell", run: "always", path: script + end + node.vm.network "private_network", ip: "#{node_ip}" + end + end +end diff --git a/vendor/k8s.io/kubernetes/WORKSPACE b/vendor/k8s.io/kubernetes/WORKSPACE new file mode 120000 index 000000000..7e8131a54 --- /dev/null +++ b/vendor/k8s.io/kubernetes/WORKSPACE @@ -0,0 +1 @@ +build/root/WORKSPACE \ No newline at end of file diff --git a/vendor/k8s.io/kubernetes/code-of-conduct.md b/vendor/k8s.io/kubernetes/code-of-conduct.md new file mode 100644 index 000000000..622d4c1d1 --- /dev/null +++ b/vendor/k8s.io/kubernetes/code-of-conduct.md @@ -0,0 +1,5 @@ +## Kubernetes Community Code of Conduct + +Kubernetes follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). + +[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/code-of-conduct.md?pixel)]() diff --git a/vendor/k8s.io/kubernetes/labels.yaml b/vendor/k8s.io/kubernetes/labels.yaml new file mode 100644 index 000000000..a3c8fd807 --- /dev/null +++ b/vendor/k8s.io/kubernetes/labels.yaml @@ -0,0 +1,370 @@ +# Scanned and autogenerated by https://github.com/tonglil/labeler +--- +repo: kubernetes/kubernetes +labels: +- name: approved + color: 0ffa16 +- name: approved-for-milestone + color: fef2c0 +- name: area/admin + color: 0052cc +- name: area/admission-control + color: 0052cc +- name: area/api + color: 0052cc +- name: area/apiserver + color: 0052cc +- name: area/app-lifecycle + color: 0052cc +- name: area/batch + color: 0052cc +- name: area/build-release + color: 0052cc +- name: area/cadvisor + color: 0052cc +- name: area/client-libraries + color: 0052cc +- name: area/cloudprovider + color: 0052cc +- name: area/configmap-api + color: 0052cc +- name: area/controller-manager + color: 0052cc +- name: area/declarative-configuration + color: 0052cc +- name: area/dns + color: 0052cc +- name: area/docker + color: 0052cc +- name: area/downward-api + color: 0052cc +- name: area/ecosystem + color: 0052cc +- name: area/etcd + color: 0052cc +- name: area/example + color: 0052cc +- name: area/example/cassandra + color: 0052cc +- name: area/extensibility + color: 0052cc +- name: area/HA + color: 0052cc +- name: area/hw-accelerators + color: 0052cc +- name: area/images-registry + color: 0052cc +- name: area/ingress + color: 0052cc +- name: area/introspection + color: 0052cc +- name: area/ipv6 + color: 0052cc +- name: area/isolation + color: 0052cc +- name: area/kube-proxy + color: 0052cc +- name: area/kubeadm + color: 0052cc +- name: area/kubectl + color: 0052cc +- name: area/kubelet + color: 0052cc +- name: area/kubelet-api + color: 0052cc +- name: area/logging + color: 0052cc +- name: area/monitoring + color: 0052cc +- name: area/node-e2e + color: 0052cc +- name: area/node-lifecycle + color: 0052cc +- name: area/nodecontroller + color: 0052cc +- name: area/os/coreos + color: d4c5f9 +- name: area/os/fedora + color: d4c5f9 +- name: area/os/gci + color: d4c5f9 +- name: area/os/ubuntu + color: d4c5f9 +- name: area/platform/aws + color: d4c5f9 +- name: area/platform/azure + color: d4c5f9 +- name: area/platform/gce + color: d4c5f9 +- name: area/platform/gke + color: d4c5f9 +- name: area/platform/mesos + color: d4c5f9 +- name: area/platform/vagrant + color: d4c5f9 +- name: area/platform/vsphere + color: d4c5f9 +- name: area/release-infra + color: 0052cc +- name: area/reliability + color: 0052cc +- name: area/rkt + color: 0052cc +- name: area/secret-api + color: 0052cc +- name: area/security + color: d93f0b +- name: area/stateful-apps + color: 0052cc +- name: area/swagger + color: 0052cc +- name: area/system-requirement + color: 0052cc +- name: area/teardown + color: 0052cc +- name: area/test + color: 0052cc +- name: area/test-infra + color: 0052cc +- name: area/third-party-resource + color: 0052cc +- name: area/ui + color: 0052cc +- name: area/upgrade + color: 0052cc +- name: area/usability + color: 0052cc +- name: area/workload-api/cronjob + color: 0052cc +- name: area/workload-api/daemonset + color: 0052cc +- name: area/workload-api/deployment + color: 0052cc +- name: area/workload-api/job + color: 0052cc +- name: area/workload-api/replicaset + color: 0052cc +- name: beta-blocker + color: d93f0b +- name: cherrypick-approved + color: fef2c0 +- name: cherrypick-candidate + color: fef2c0 +- name: 'cla: human-approved' + color: bfe5bf +- name: 'cla: no' + color: e11d21 +- name: 'cla: yes' + color: bfe5bf +- name: 'cncf-cla: no' + color: e11d21 +- name: 'cncf-cla: yes' + color: bfe5bf +- name: do-not-merge + color: e11d21 +- name: do-not-merge/work-in-progress + color: e11d21 +- name: do-not-merge/hold + color: e11d21 +- name: do-not-merge/cherry-pick-not-approved + color: e11d21 +- name: do-not-merge/release-note-label-needed + color: e11d21 +- name: do-not-merge/blocked-paths + color: e11d21 +- name: flake-has-meta + color: fbca04 +- name: for-new-contributors + color: 006b75 +- name: help-wanted + color: 006b75 +- name: keep-open + color: fbca04 +- name: kind/api-change + color: c7def8 +- name: kind/bug + color: e11d21 +- name: kind/cleanup + color: c7def8 +- name: kind/design + color: c7def8 +- name: kind/documentation + color: c7def8 +- name: kind/enhancement + color: c7def8 +- name: kind/feature + color: c7def8 +- name: kind/flake + color: f7c6c7 +- name: kind/friction + color: c7def8 +- name: kind/mesos-flake + color: f7c6c7 +- name: kind/new-api + color: c7def8 +- name: kind/old-docs + color: c7def8 +- name: kind/postmortem + color: bfe5bf +- name: kind/support + color: eb6420 +- name: kind/technical-debt + color: c7def8 +- name: kind/upgrade-test-failure + color: fbca04 +- name: lgtm + color: 15dd18 +- name: milestone-labels-complete + color: 77bb00 +- name: milestone-labels-incomplete + color: e11d21 +- name: needs-ok-to-merge + color: ededed +- name: needs-ok-to-test + color: b60205 +- name: needs-rebase + color: BDBDBD +- name: needs-sig + color: ededed +- name: non-release-blocker + color: 0e8a16 +- name: ok-to-merge + color: fbca04 +- name: priority/awaiting-more-evidence + color: fef2c0 +- name: priority/backlog + color: fbca04 +- name: priority/critical-urgent + color: e11d21 +- name: priority/failing-test + color: e11d21 +- name: priority/important-longterm + color: eb6420 +- name: priority/important-soon + color: eb6420 +- name: priority/P0 + color: ff0000 +- name: priority/P1 + color: ededed +- name: priority/P2 + color: ededed +- name: priority/P3 + color: ededed +- name: queue/blocks-others + color: ffaa00 +- name: queue/critical-fix + color: ffaa00 +- name: queue/fix + color: ffaa00 +- name: queue/multiple-rebases + color: ffaa00 +- name: release-blocker + color: d93f0b +- name: release-note + color: c2e0c6 +- name: release-note-action-required + color: c2e0c6 +- name: release-note-label-needed + color: db5a64 +- name: release-note-none + color: c2e0c6 +- name: requires-release-czar-attention + color: d93f0b +- name: retest-not-required + color: eb6420 +- name: retest-not-required-docs-only + color: fbca04 +- name: sig/api-machinery + color: d2b48c +- name: sig/apps + color: d2b48c +- name: sig/architecture + color: d2b48c +- name: sig/auth + color: d2b48c +- name: sig/autoscaling + color: d2b48c +- name: sig/aws + color: d2b48c +- name: sig/azure + color: d2b48c +- name: sig/big-data + color: d2b48c +- name: sig/cli + color: d2b48c +- name: sig/cluster-lifecycle + color: d2b48c +- name: sig/cluster-ops + color: d2b48c +- name: sig/contributor-experience + color: d2b48c +- name: sig/docs + color: d2b48c +- name: sig/federation + color: d2b48c +- name: sig/instrumentation + color: d2b48c +- name: sig/network + color: d2b48c +- name: sig/node + color: d2b48c +- name: sig/onprem + color: d2b48c +- name: sig/openstack + color: d2b48c +- name: sig/release + color: d2b48c +- name: sig/rktnetes + color: d2b48c +- name: sig/scalability + color: d2b48c +- name: sig/scheduling + color: d2b48c +- name: sig/service-catalog + color: d2b48c +- name: sig/storage + color: d2b48c +- name: sig/testing + color: d2b48c +- name: sig/ui + color: d2b48c +- name: sig/windows + color: d2b48c +- name: size/L + color: ee9900 +- name: size/M + color: eebb00 +- name: size/S + color: 77bb00 +- name: size/XL + color: ee5500 +- name: size/XS + color: "009900" +- name: size/XXL + color: ee0000 +- name: stale + color: "795548" +- name: status/in-progress + color: fef2c0 +- name: status/in-review + color: fef2c0 +- name: team/api (deprecated - do not use) + color: ededed +- name: team/cluster (deprecated - do not use) + color: ededed +- name: team/control-plane (deprecated - do not use) + color: ededed +- name: team/gke + color: d2b48c +- name: team/huawei + color: d2b48c +- name: team/mesosphere + color: d2b48c +- name: team/redhat + color: d2b48c +- name: team/test-infra + color: ededed +- name: team/ux (deprecated - do not use) + color: ededed +- name: triaged + color: d455d0 diff --git a/vendor/k8s.io/kubernetes/pkg/BUILD b/vendor/k8s.io/kubernetes/pkg/BUILD new file mode 100644 index 000000000..da105e0cf --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/BUILD @@ -0,0 +1,93 @@ +package(default_visibility = ["//visibility:public"]) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [ + ":package-srcs", + "//pkg/api:all-srcs", + "//pkg/apimachinery/tests:all-srcs", + "//pkg/apis/abac:all-srcs", + "//pkg/apis/admission:all-srcs", + "//pkg/apis/admissionregistration:all-srcs", + "//pkg/apis/apps:all-srcs", + "//pkg/apis/authentication:all-srcs", + "//pkg/apis/authorization:all-srcs", + "//pkg/apis/autoscaling:all-srcs", + "//pkg/apis/batch:all-srcs", + "//pkg/apis/certificates:all-srcs", + "//pkg/apis/componentconfig:all-srcs", + "//pkg/apis/extensions:all-srcs", + "//pkg/apis/imagepolicy:all-srcs", + "//pkg/apis/meta/v1:all-srcs", + "//pkg/apis/networking:all-srcs", + "//pkg/apis/policy:all-srcs", + "//pkg/apis/rbac:all-srcs", + "//pkg/apis/scheduling:all-srcs", + "//pkg/apis/settings:all-srcs", + "//pkg/apis/storage:all-srcs", + "//pkg/auth/authorizer/abac:all-srcs", + "//pkg/auth/nodeidentifier:all-srcs", + "//pkg/bootstrap/api:all-srcs", + "//pkg/capabilities:all-srcs", + "//pkg/client/chaosclient:all-srcs", + "//pkg/client/clientset_generated/internalclientset:all-srcs", + "//pkg/client/conditions:all-srcs", + "//pkg/client/informers/informers_generated/internalversion:all-srcs", + "//pkg/client/leaderelectionconfig:all-srcs", + "//pkg/client/listers/admissionregistration/internalversion:all-srcs", + "//pkg/client/listers/apps/internalversion:all-srcs", + "//pkg/client/listers/authentication/internalversion:all-srcs", + "//pkg/client/listers/authorization/internalversion:all-srcs", + "//pkg/client/listers/autoscaling/internalversion:all-srcs", + "//pkg/client/listers/batch/internalversion:all-srcs", + "//pkg/client/listers/certificates/internalversion:all-srcs", + "//pkg/client/listers/core/internalversion:all-srcs", + "//pkg/client/listers/extensions/internalversion:all-srcs", + "//pkg/client/listers/imagepolicy/internalversion:all-srcs", + "//pkg/client/listers/networking/internalversion:all-srcs", + "//pkg/client/listers/policy/internalversion:all-srcs", + "//pkg/client/listers/rbac/internalversion:all-srcs", + "//pkg/client/listers/scheduling/internalversion:all-srcs", + "//pkg/client/listers/settings/internalversion:all-srcs", + "//pkg/client/listers/storage/internalversion:all-srcs", + "//pkg/client/metrics:all-srcs", + "//pkg/client/testdata:all-srcs", + "//pkg/client/tests:all-srcs", + "//pkg/client/unversioned:all-srcs", + "//pkg/cloudprovider:all-srcs", + "//pkg/controller:all-srcs", + "//pkg/credentialprovider:all-srcs", + "//pkg/features:all-srcs", + "//pkg/fieldpath:all-srcs", + "//pkg/generated:all-srcs", + "//pkg/hyperkube:all-srcs", + "//pkg/kubeapiserver:all-srcs", + "//pkg/kubectl:all-srcs", + "//pkg/kubelet:all-srcs", + "//pkg/kubemark:all-srcs", + "//pkg/master:all-srcs", + "//pkg/printers:all-srcs", + "//pkg/probe:all-srcs", + "//pkg/proxy:all-srcs", + "//pkg/quota:all-srcs", + "//pkg/registry:all-srcs", + "//pkg/routes:all-srcs", + "//pkg/security:all-srcs", + "//pkg/securitycontext:all-srcs", + "//pkg/serviceaccount:all-srcs", + "//pkg/ssh:all-srcs", + "//pkg/util:all-srcs", + "//pkg/version:all-srcs", + "//pkg/volume:all-srcs", + "//pkg/watch/json:all-srcs", + "//pkg/watch/versioned:all-srcs", + ], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/kubernetes/pkg/OWNERS b/vendor/k8s.io/kubernetes/pkg/OWNERS new file mode 100644 index 000000000..1b48f8414 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/OWNERS @@ -0,0 +1,12 @@ +reviewers: + - brendandburns + - dchen1107 + - lavalamp + - smarterclayton + - thockin +approvers: + - brendandburns + - dchen1107 + - lavalamp + - smarterclayton + - thockin diff --git a/vendor/k8s.io/kubernetes/pkg/api/conversion_test.go b/vendor/k8s.io/kubernetes/pkg/api/conversion_test.go new file mode 100644 index 000000000..b4c79696c --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/api/conversion_test.go @@ -0,0 +1,117 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package api_test + +import ( + "io/ioutil" + "math/rand" + "testing" + + apiequality "k8s.io/apimachinery/pkg/api/equality" + "k8s.io/apimachinery/pkg/api/testing/fuzzer" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/diff" + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/testapi" + kapitesting "k8s.io/kubernetes/pkg/api/testing" +) + +func BenchmarkPodConversion(b *testing.B) { + apiObjectFuzzer := fuzzer.FuzzerFor(kapitesting.FuzzerFuncs, rand.NewSource(benchmarkSeed), api.Codecs) + items := make([]api.Pod, 4) + for i := range items { + apiObjectFuzzer.Fuzz(&items[i]) + items[i].Spec.InitContainers = nil + items[i].Status.InitContainerStatuses = nil + } + + // add a fixed item + items = append(items, benchmarkPod) + width := len(items) + + scheme := api.Scheme + for i := 0; i < b.N; i++ { + pod := &items[i%width] + versionedObj, err := scheme.UnsafeConvertToVersion(pod, api.Registry.GroupOrDie(api.GroupName).GroupVersion) + if err != nil { + b.Fatalf("Conversion error: %v", err) + } + if _, err = scheme.UnsafeConvertToVersion(versionedObj, testapi.Default.InternalGroupVersion()); err != nil { + b.Fatalf("Conversion error: %v", err) + } + } +} + +func BenchmarkNodeConversion(b *testing.B) { + data, err := ioutil.ReadFile("node_example.json") + if err != nil { + b.Fatalf("Unexpected error while reading file: %v", err) + } + var node api.Node + if err := runtime.DecodeInto(testapi.Default.Codec(), data, &node); err != nil { + b.Fatalf("Unexpected error decoding node: %v", err) + } + + scheme := api.Scheme + var result *api.Node + b.ResetTimer() + for i := 0; i < b.N; i++ { + versionedObj, err := scheme.UnsafeConvertToVersion(&node, api.Registry.GroupOrDie(api.GroupName).GroupVersion) + if err != nil { + b.Fatalf("Conversion error: %v", err) + } + obj, err := scheme.UnsafeConvertToVersion(versionedObj, testapi.Default.InternalGroupVersion()) + if err != nil { + b.Fatalf("Conversion error: %v", err) + } + result = obj.(*api.Node) + } + b.StopTimer() + if !apiequality.Semantic.DeepDerivative(node, *result) { + b.Fatalf("Incorrect conversion: %s", diff.ObjectDiff(node, *result)) + } +} + +func BenchmarkReplicationControllerConversion(b *testing.B) { + data, err := ioutil.ReadFile("replication_controller_example.json") + if err != nil { + b.Fatalf("Unexpected error while reading file: %v", err) + } + var replicationController api.ReplicationController + if err := runtime.DecodeInto(testapi.Default.Codec(), data, &replicationController); err != nil { + b.Fatalf("Unexpected error decoding node: %v", err) + } + + scheme := api.Scheme + var result *api.ReplicationController + b.ResetTimer() + for i := 0; i < b.N; i++ { + versionedObj, err := scheme.UnsafeConvertToVersion(&replicationController, api.Registry.GroupOrDie(api.GroupName).GroupVersion) + if err != nil { + b.Fatalf("Conversion error: %v", err) + } + obj, err := scheme.UnsafeConvertToVersion(versionedObj, testapi.Default.InternalGroupVersion()) + if err != nil { + b.Fatalf("Conversion error: %v", err) + } + result = obj.(*api.ReplicationController) + } + b.StopTimer() + if !apiequality.Semantic.DeepDerivative(replicationController, *result) { + b.Fatalf("Incorrect conversion: expected %v, got %v", replicationController, *result) + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/api/copy_test.go b/vendor/k8s.io/kubernetes/pkg/api/copy_test.go new file mode 100644 index 000000000..1ca0df20c --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/api/copy_test.go @@ -0,0 +1,87 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package api_test + +import ( + "bytes" + "math/rand" + "reflect" + "testing" + + "github.com/google/gofuzz" + + "k8s.io/apimachinery/pkg/api/testing/fuzzer" + "k8s.io/apimachinery/pkg/api/testing/roundtrip" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/diff" + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/testapi" + kapitesting "k8s.io/kubernetes/pkg/api/testing" +) + +func TestDeepCopyApiObjects(t *testing.T) { + for i := 0; i < *roundtrip.FuzzIters; i++ { + for _, version := range []schema.GroupVersion{testapi.Default.InternalGroupVersion(), api.Registry.GroupOrDie(api.GroupName).GroupVersion} { + f := fuzzer.FuzzerFor(kapitesting.FuzzerFuncs, rand.NewSource(rand.Int63()), api.Codecs) + for kind := range api.Scheme.KnownTypes(version) { + doDeepCopyTest(t, version.WithKind(kind), f) + } + } + } +} + +func doDeepCopyTest(t *testing.T, kind schema.GroupVersionKind, f *fuzz.Fuzzer) { + item, err := api.Scheme.New(kind) + if err != nil { + t.Fatalf("Could not create a %v: %s", kind, err) + } + f.Fuzz(item) + itemCopy := item.DeepCopyObject() + if !reflect.DeepEqual(item, itemCopy) { + t.Errorf("\nexpected: %#v\n\ngot: %#v\n\ndiff: %v", item, itemCopy, diff.ObjectReflectDiff(item, itemCopy)) + } + + prefuzzData := &bytes.Buffer{} + if err := api.Codecs.LegacyCodec(kind.GroupVersion()).Encode(item, prefuzzData); err != nil { + t.Errorf("Could not encode a %v: %s", kind, err) + return + } + + // Refuzz the copy, which should have no effect on the original + f.Fuzz(itemCopy) + + postfuzzData := &bytes.Buffer{} + if err := api.Codecs.LegacyCodec(kind.GroupVersion()).Encode(item, postfuzzData); err != nil { + t.Errorf("Could not encode a %v: %s", kind, err) + return + } + + if bytes.Compare(prefuzzData.Bytes(), postfuzzData.Bytes()) != 0 { + t.Log(diff.StringDiff(prefuzzData.String(), postfuzzData.String())) + t.Errorf("Fuzzing copy modified original of %#v", kind) + return + } +} + +func TestDeepCopySingleType(t *testing.T) { + for i := 0; i < *roundtrip.FuzzIters; i++ { + for _, version := range []schema.GroupVersion{testapi.Default.InternalGroupVersion(), api.Registry.GroupOrDie(api.GroupName).GroupVersion} { + f := fuzzer.FuzzerFor(kapitesting.FuzzerFuncs, rand.NewSource(rand.Int63()), api.Codecs) + doDeepCopyTest(t, version.WithKind("Pod"), f) + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/api/deep_copy_test.go b/vendor/k8s.io/kubernetes/pkg/api/deep_copy_test.go new file mode 100644 index 000000000..d88b6bb5e --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/api/deep_copy_test.go @@ -0,0 +1,177 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package api_test + +import ( + "io/ioutil" + "testing" + "time" + + apiequality "k8s.io/apimachinery/pkg/api/equality" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/testapi" +) + +func parseTimeOrDie(ts string) metav1.Time { + t, err := time.Parse(time.RFC3339, ts) + if err != nil { + panic(err) + } + return metav1.Time{Time: t} +} + +var benchmarkPod api.Pod = api.Pod{ + TypeMeta: metav1.TypeMeta{ + Kind: "Pod", + APIVersion: "v1", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "etcd-server-e2e-test-wojtekt-master", + Namespace: "default", + SelfLink: "/api/v1/namespaces/default/pods/etcd-server-e2e-test-wojtekt-master", + UID: types.UID("a671734a-e8e5-11e4-8fde-42010af09327"), + ResourceVersion: "22", + CreationTimestamp: parseTimeOrDie("2015-04-22T11:49:36Z"), + }, + Spec: api.PodSpec{ + Volumes: []api.Volume{ + { + Name: "varetcd", + VolumeSource: api.VolumeSource{ + HostPath: &api.HostPathVolumeSource{ + Path: "/mnt/master-pd/var/etcd", + }, + }, + }, + }, + Containers: []api.Container{ + { + Name: "etcd-container", + Image: "gcr.io/google_containers/etcd:2.0.9", + Command: []string{ + "/usr/local/bin/etcd", + "--addr", + "127.0.0.1:2379", + "--bind-addr", + "127.0.0.1:2379", + "--data-dir", + "/var/etcd/data", + }, + Ports: []api.ContainerPort{ + { + Name: "serverport", + HostPort: 2380, + ContainerPort: 2380, + Protocol: "TCP", + }, + { + Name: "clientport", + HostPort: 2379, + ContainerPort: 2379, + Protocol: "TCP", + }, + }, + VolumeMounts: []api.VolumeMount{ + { + Name: "varetcd", + MountPath: "/var/etcd", + }, + }, + TerminationMessagePath: "/dev/termination-log", + ImagePullPolicy: api.PullIfNotPresent, + }, + }, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + NodeName: "e2e-test-wojtekt-master", + }, + Status: api.PodStatus{ + Phase: api.PodRunning, + Conditions: []api.PodCondition{ + { + Type: api.PodReady, + Status: api.ConditionTrue, + }, + }, + ContainerStatuses: []api.ContainerStatus{ + { + Name: "etcd-container", + State: api.ContainerState{ + Running: &api.ContainerStateRunning{ + StartedAt: parseTimeOrDie("2015-04-22T11:49:32Z"), + }, + }, + Ready: true, + RestartCount: 0, + Image: "gcr.io/google_containers/etcd:2.0.9", + ImageID: "docker://b6b9a86dc06aa1361357ca1b105feba961f6a4145adca6c54e142c0be0fe87b0", + ContainerID: "docker://3cbbf818f1addfc252957b4504f56ef2907a313fe6afc47fc75373674255d46d", + }, + }, + }, +} + +func BenchmarkPodCopy(b *testing.B) { + var result *api.Pod + for i := 0; i < b.N; i++ { + result = benchmarkPod.DeepCopy() + } + if !apiequality.Semantic.DeepEqual(benchmarkPod, *result) { + b.Fatalf("Incorrect copy: expected %v, got %v", benchmarkPod, *result) + } +} + +func BenchmarkNodeCopy(b *testing.B) { + data, err := ioutil.ReadFile("node_example.json") + if err != nil { + b.Fatalf("Unexpected error while reading file: %v", err) + } + var node api.Node + if err := runtime.DecodeInto(testapi.Default.Codec(), data, &node); err != nil { + b.Fatalf("Unexpected error decoding node: %v", err) + } + + var result *api.Node + for i := 0; i < b.N; i++ { + result = node.DeepCopy() + } + if !apiequality.Semantic.DeepEqual(node, *result) { + b.Fatalf("Incorrect copy: expected %v, got %v", node, *result) + } +} + +func BenchmarkReplicationControllerCopy(b *testing.B) { + data, err := ioutil.ReadFile("replication_controller_example.json") + if err != nil { + b.Fatalf("Unexpected error while reading file: %v", err) + } + var replicationController api.ReplicationController + if err := runtime.DecodeInto(testapi.Default.Codec(), data, &replicationController); err != nil { + b.Fatalf("Unexpected error decoding node: %v", err) + } + + var result *api.ReplicationController + for i := 0; i < b.N; i++ { + result = replicationController.DeepCopy() + } + if !apiequality.Semantic.DeepEqual(replicationController, *result) { + b.Fatalf("Incorrect copy: expected %v, got %v", replicationController, *result) + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/api/defaulting_test.go b/vendor/k8s.io/kubernetes/pkg/api/defaulting_test.go new file mode 100644 index 000000000..8a637727d --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/api/defaulting_test.go @@ -0,0 +1,223 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package api_test + +import ( + "math/rand" + "reflect" + "sort" + "testing" + + fuzz "github.com/google/gofuzz" + + apiv1 "k8s.io/api/core/v1" + extensionsv1beta1 "k8s.io/api/extensions/v1beta1" + roundtrip "k8s.io/apimachinery/pkg/api/testing/roundtrip" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/diff" + "k8s.io/kubernetes/pkg/api" +) + +type orderedGroupVersionKinds []schema.GroupVersionKind + +func (o orderedGroupVersionKinds) Len() int { return len(o) } +func (o orderedGroupVersionKinds) Swap(i, j int) { o[i], o[j] = o[j], o[i] } +func (o orderedGroupVersionKinds) Less(i, j int) bool { + return o[i].String() < o[j].String() +} + +// TODO: add a reflexive test that verifies that all SetDefaults functions are registered +func TestDefaulting(t *testing.T) { + // these are the known types with defaulters - you must add to this list if you add a top level defaulter + typesWithDefaulting := map[schema.GroupVersionKind]struct{}{ + {Group: "", Version: "v1", Kind: "ConfigMap"}: {}, + {Group: "", Version: "v1", Kind: "ConfigMapList"}: {}, + {Group: "", Version: "v1", Kind: "Endpoints"}: {}, + {Group: "", Version: "v1", Kind: "EndpointsList"}: {}, + {Group: "", Version: "v1", Kind: "Namespace"}: {}, + {Group: "", Version: "v1", Kind: "NamespaceList"}: {}, + {Group: "", Version: "v1", Kind: "Node"}: {}, + {Group: "", Version: "v1", Kind: "NodeList"}: {}, + {Group: "", Version: "v1", Kind: "PersistentVolume"}: {}, + {Group: "", Version: "v1", Kind: "PersistentVolumeList"}: {}, + {Group: "", Version: "v1", Kind: "PersistentVolumeClaim"}: {}, + {Group: "", Version: "v1", Kind: "PersistentVolumeClaimList"}: {}, + {Group: "", Version: "v1", Kind: "PodAttachOptions"}: {}, + {Group: "", Version: "v1", Kind: "PodExecOptions"}: {}, + {Group: "", Version: "v1", Kind: "Pod"}: {}, + {Group: "", Version: "v1", Kind: "PodList"}: {}, + {Group: "", Version: "v1", Kind: "PodTemplate"}: {}, + {Group: "", Version: "v1", Kind: "PodTemplateList"}: {}, + {Group: "", Version: "v1", Kind: "ReplicationController"}: {}, + {Group: "", Version: "v1", Kind: "ReplicationControllerList"}: {}, + {Group: "", Version: "v1", Kind: "Secret"}: {}, + {Group: "", Version: "v1", Kind: "SecretList"}: {}, + {Group: "", Version: "v1", Kind: "Service"}: {}, + {Group: "", Version: "v1", Kind: "ServiceList"}: {}, + {Group: "apps", Version: "v1beta1", Kind: "StatefulSet"}: {}, + {Group: "apps", Version: "v1beta1", Kind: "StatefulSetList"}: {}, + {Group: "apps", Version: "v1beta2", Kind: "StatefulSet"}: {}, + {Group: "apps", Version: "v1beta2", Kind: "StatefulSetList"}: {}, + {Group: "autoscaling", Version: "v1", Kind: "HorizontalPodAutoscaler"}: {}, + {Group: "autoscaling", Version: "v1", Kind: "HorizontalPodAutoscalerList"}: {}, + {Group: "autoscaling", Version: "v2beta1", Kind: "HorizontalPodAutoscaler"}: {}, + {Group: "autoscaling", Version: "v2beta1", Kind: "HorizontalPodAutoscalerList"}: {}, + {Group: "batch", Version: "v1", Kind: "Job"}: {}, + {Group: "batch", Version: "v1", Kind: "JobList"}: {}, + {Group: "batch", Version: "v1beta1", Kind: "CronJob"}: {}, + {Group: "batch", Version: "v1beta1", Kind: "CronJobList"}: {}, + {Group: "batch", Version: "v1beta1", Kind: "JobTemplate"}: {}, + {Group: "batch", Version: "v2alpha1", Kind: "CronJob"}: {}, + {Group: "batch", Version: "v2alpha1", Kind: "CronJobList"}: {}, + {Group: "batch", Version: "v2alpha1", Kind: "JobTemplate"}: {}, + {Group: "certificates.k8s.io", Version: "v1beta1", Kind: "CertificateSigningRequest"}: {}, + {Group: "certificates.k8s.io", Version: "v1beta1", Kind: "CertificateSigningRequestList"}: {}, + {Group: "componentconfig", Version: "v1alpha1", Kind: "KubeProxyConfiguration"}: {}, + {Group: "componentconfig", Version: "v1alpha1", Kind: "KubeSchedulerConfiguration"}: {}, + {Group: "componentconfig", Version: "v1alpha1", Kind: "KubeletConfiguration"}: {}, + {Group: "kubeadm.k8s.io", Version: "v1alpha1", Kind: "MasterConfiguration"}: {}, + // This object contains only int fields which currently breaks the defaulting test because + // it's pretty stupid. Once we add non integer fields, we should uncomment this. + // {Group: "kubeadm.k8s.io", Version: "v1alpha1", Kind: "NodeConfiguration"}: {}, + {Group: "extensions", Version: "v1beta1", Kind: "DaemonSet"}: {}, + {Group: "extensions", Version: "v1beta1", Kind: "DaemonSetList"}: {}, + {Group: "apps", Version: "v1beta2", Kind: "DaemonSet"}: {}, + {Group: "apps", Version: "v1beta2", Kind: "DaemonSetList"}: {}, + {Group: "extensions", Version: "v1beta1", Kind: "Deployment"}: {}, + {Group: "extensions", Version: "v1beta1", Kind: "DeploymentList"}: {}, + {Group: "apps", Version: "v1beta1", Kind: "Deployment"}: {}, + {Group: "apps", Version: "v1beta1", Kind: "DeploymentList"}: {}, + {Group: "apps", Version: "v1beta2", Kind: "Deployment"}: {}, + {Group: "apps", Version: "v1beta2", Kind: "DeploymentList"}: {}, + {Group: "apps", Version: "v1beta2", Kind: "ReplicaSet"}: {}, + {Group: "apps", Version: "v1beta2", Kind: "ReplicaSetList"}: {}, + {Group: "extensions", Version: "v1beta1", Kind: "ReplicaSet"}: {}, + {Group: "extensions", Version: "v1beta1", Kind: "ReplicaSetList"}: {}, + {Group: "extensions", Version: "v1beta1", Kind: "NetworkPolicy"}: {}, + {Group: "extensions", Version: "v1beta1", Kind: "NetworkPolicyList"}: {}, + {Group: "rbac.authorization.k8s.io", Version: "v1alpha1", Kind: "ClusterRoleBinding"}: {}, + {Group: "rbac.authorization.k8s.io", Version: "v1alpha1", Kind: "ClusterRoleBindingList"}: {}, + {Group: "rbac.authorization.k8s.io", Version: "v1alpha1", Kind: "RoleBinding"}: {}, + {Group: "rbac.authorization.k8s.io", Version: "v1alpha1", Kind: "RoleBindingList"}: {}, + {Group: "rbac.authorization.k8s.io", Version: "v1beta1", Kind: "ClusterRoleBinding"}: {}, + {Group: "rbac.authorization.k8s.io", Version: "v1beta1", Kind: "ClusterRoleBindingList"}: {}, + {Group: "rbac.authorization.k8s.io", Version: "v1beta1", Kind: "RoleBinding"}: {}, + {Group: "rbac.authorization.k8s.io", Version: "v1beta1", Kind: "RoleBindingList"}: {}, + {Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "ClusterRoleBinding"}: {}, + {Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "ClusterRoleBindingList"}: {}, + {Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "RoleBinding"}: {}, + {Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "RoleBindingList"}: {}, + {Group: "settings.k8s.io", Version: "v1alpha1", Kind: "PodPreset"}: {}, + {Group: "settings.k8s.io", Version: "v1alpha1", Kind: "PodPresetList"}: {}, + {Group: "admissionregistration.k8s.io", Version: "v1alpha1", Kind: "ExternalAdmissionHookConfiguration"}: {}, + {Group: "admissionregistration.k8s.io", Version: "v1alpha1", Kind: "ExternalAdmissionHookConfigurationList"}: {}, + {Group: "networking.k8s.io", Version: "v1", Kind: "NetworkPolicy"}: {}, + {Group: "networking.k8s.io", Version: "v1", Kind: "NetworkPolicyList"}: {}, + {Group: "storage.k8s.io", Version: "v1beta1", Kind: "StorageClass"}: {}, + {Group: "storage.k8s.io", Version: "v1beta1", Kind: "StorageClassList"}: {}, + {Group: "storage.k8s.io", Version: "v1", Kind: "StorageClass"}: {}, + {Group: "storage.k8s.io", Version: "v1", Kind: "StorageClassList"}: {}, + } + + f := fuzz.New().NilChance(.5).NumElements(1, 1).RandSource(rand.NewSource(1)) + f.Funcs( + func(s *runtime.RawExtension, c fuzz.Continue) {}, + func(s *metav1.LabelSelector, c fuzz.Continue) { + c.FuzzNoCustom(s) + s.MatchExpressions = nil // need to fuzz this specially + }, + func(s *apiv1.ListOptions, c fuzz.Continue) { + c.FuzzNoCustom(s) + s.LabelSelector = "" // need to fuzz requirement strings specially + s.FieldSelector = "" // need to fuzz requirement strings specially + }, + func(s *extensionsv1beta1.ScaleStatus, c fuzz.Continue) { + c.FuzzNoCustom(s) + s.TargetSelector = "" // need to fuzz requirement strings specially + }, + ) + + scheme := api.Scheme + var testTypes orderedGroupVersionKinds + for gvk := range scheme.AllKnownTypes() { + if gvk.Version == runtime.APIVersionInternal { + continue + } + testTypes = append(testTypes, gvk) + } + sort.Sort(testTypes) + + for _, gvk := range testTypes { + _, expectedChanged := typesWithDefaulting[gvk] + iter := 0 + changedOnce := false + for { + if iter > *roundtrip.FuzzIters { + if !expectedChanged || changedOnce { + break + } + if iter > 300 { + t.Errorf("expected %s to trigger defaulting due to fuzzing", gvk) + break + } + // if we expected defaulting, continue looping until the fuzzer gives us one + // at worst, we will timeout + } + iter++ + + src, err := scheme.New(gvk) + if err != nil { + t.Fatal(err) + } + f.Fuzz(src) + + src.GetObjectKind().SetGroupVersionKind(schema.GroupVersionKind{}) + + original := src.DeepCopyObject() + + // get internal + withDefaults := src.DeepCopyObject() + scheme.Default(withDefaults.(runtime.Object)) + + if !reflect.DeepEqual(original, withDefaults) { + changedOnce = true + if !expectedChanged { + t.Errorf("{Group: \"%s\", Version: \"%s\", Kind: \"%s\"} did not expect defaults to be set - update expected or check defaulter registering: %s", gvk.Group, gvk.Version, gvk.Kind, diff.ObjectReflectDiff(original, withDefaults)) + } + } + } + } +} + +func BenchmarkPodDefaulting(b *testing.B) { + f := fuzz.New().NilChance(.5).NumElements(1, 1).RandSource(rand.NewSource(1)) + items := make([]apiv1.Pod, 100) + for i := range items { + f.Fuzz(&items[i]) + } + + scheme := api.Scheme + b.ResetTimer() + for i := 0; i < b.N; i++ { + pod := &items[i%len(items)] + + scheme.Default(pod) + } + b.StopTimer() +} diff --git a/vendor/k8s.io/kubernetes/pkg/api/doc.go b/vendor/k8s.io/kubernetes/pkg/api/doc.go index 1507a8823..283a83e40 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/api/doc.go @@ -21,4 +21,4 @@ limitations under the License. // The contract presented to clients is located in the versioned packages, // which are sub-directories. The first one is "v1". Those packages // describe how a particular version is serialized to storage/network. -package api +package api // import "k8s.io/kubernetes/pkg/api" diff --git a/vendor/k8s.io/kubernetes/pkg/api/helper/helpers_test.go b/vendor/k8s.io/kubernetes/pkg/api/helper/helpers_test.go new file mode 100644 index 000000000..7631b8bba --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/api/helper/helpers_test.go @@ -0,0 +1,490 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package helper + +import ( + "reflect" + "testing" + + "k8s.io/apimachinery/pkg/api/resource" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/kubernetes/pkg/api" +) + +func TestSemantic(t *testing.T) { + table := []struct { + a, b interface{} + shouldEqual bool + }{ + {resource.MustParse("0"), resource.Quantity{}, true}, + {resource.Quantity{}, resource.MustParse("0"), true}, + {resource.Quantity{}, resource.MustParse("1m"), false}, + { + resource.NewQuantity(5, resource.BinarySI), + resource.NewQuantity(5, resource.DecimalSI), + true, + }, + {resource.MustParse("2m"), resource.MustParse("1m"), false}, + } + + for index, item := range table { + if e, a := item.shouldEqual, Semantic.DeepEqual(item.a, item.b); e != a { + t.Errorf("case[%d], expected %v, got %v.", index, e, a) + } + } +} + +func TestIsStandardResource(t *testing.T) { + testCases := []struct { + input string + output bool + }{ + {"cpu", true}, + {"memory", true}, + {"disk", false}, + {"blah", false}, + {"x.y.z", false}, + {"hugepages-2Mi", true}, + } + for i, tc := range testCases { + if IsStandardResourceName(tc.input) != tc.output { + t.Errorf("case[%d], input: %s, expected: %t, got: %t", i, tc.input, tc.output, !tc.output) + } + } +} + +func TestIsStandardContainerResource(t *testing.T) { + testCases := []struct { + input string + output bool + }{ + {"cpu", true}, + {"memory", true}, + {"disk", false}, + {"hugepages-2Mi", true}, + } + for i, tc := range testCases { + if IsStandardContainerResourceName(tc.input) != tc.output { + t.Errorf("case[%d], input: %s, expected: %t, got: %t", i, tc.input, tc.output, !tc.output) + } + } +} + +func TestAddToNodeAddresses(t *testing.T) { + testCases := []struct { + existing []api.NodeAddress + toAdd []api.NodeAddress + expected []api.NodeAddress + }{ + { + existing: []api.NodeAddress{}, + toAdd: []api.NodeAddress{}, + expected: []api.NodeAddress{}, + }, + { + existing: []api.NodeAddress{}, + toAdd: []api.NodeAddress{ + {Type: api.NodeExternalIP, Address: "1.1.1.1"}, + {Type: api.NodeHostName, Address: "localhost"}, + }, + expected: []api.NodeAddress{ + {Type: api.NodeExternalIP, Address: "1.1.1.1"}, + {Type: api.NodeHostName, Address: "localhost"}, + }, + }, + { + existing: []api.NodeAddress{}, + toAdd: []api.NodeAddress{ + {Type: api.NodeExternalIP, Address: "1.1.1.1"}, + {Type: api.NodeExternalIP, Address: "1.1.1.1"}, + }, + expected: []api.NodeAddress{ + {Type: api.NodeExternalIP, Address: "1.1.1.1"}, + }, + }, + { + existing: []api.NodeAddress{ + {Type: api.NodeExternalIP, Address: "1.1.1.1"}, + {Type: api.NodeInternalIP, Address: "10.1.1.1"}, + }, + toAdd: []api.NodeAddress{ + {Type: api.NodeExternalIP, Address: "1.1.1.1"}, + {Type: api.NodeHostName, Address: "localhost"}, + }, + expected: []api.NodeAddress{ + {Type: api.NodeExternalIP, Address: "1.1.1.1"}, + {Type: api.NodeInternalIP, Address: "10.1.1.1"}, + {Type: api.NodeHostName, Address: "localhost"}, + }, + }, + } + + for i, tc := range testCases { + AddToNodeAddresses(&tc.existing, tc.toAdd...) + if !Semantic.DeepEqual(tc.expected, tc.existing) { + t.Errorf("case[%d], expected: %v, got: %v", i, tc.expected, tc.existing) + } + } +} + +func TestGetAccessModesFromString(t *testing.T) { + modes := GetAccessModesFromString("ROX") + if !containsAccessMode(modes, api.ReadOnlyMany) { + t.Errorf("Expected mode %s, but got %+v", api.ReadOnlyMany, modes) + } + + modes = GetAccessModesFromString("ROX,RWX") + if !containsAccessMode(modes, api.ReadOnlyMany) { + t.Errorf("Expected mode %s, but got %+v", api.ReadOnlyMany, modes) + } + if !containsAccessMode(modes, api.ReadWriteMany) { + t.Errorf("Expected mode %s, but got %+v", api.ReadWriteMany, modes) + } + + modes = GetAccessModesFromString("RWO,ROX,RWX") + if !containsAccessMode(modes, api.ReadOnlyMany) { + t.Errorf("Expected mode %s, but got %+v", api.ReadOnlyMany, modes) + } + if !containsAccessMode(modes, api.ReadWriteMany) { + t.Errorf("Expected mode %s, but got %+v", api.ReadWriteMany, modes) + } +} + +func TestRemoveDuplicateAccessModes(t *testing.T) { + modes := []api.PersistentVolumeAccessMode{ + api.ReadWriteOnce, api.ReadOnlyMany, api.ReadOnlyMany, api.ReadOnlyMany, + } + modes = removeDuplicateAccessModes(modes) + if len(modes) != 2 { + t.Errorf("Expected 2 distinct modes in set but found %v", len(modes)) + } +} + +func TestNodeSelectorRequirementsAsSelector(t *testing.T) { + matchExpressions := []api.NodeSelectorRequirement{{ + Key: "foo", + Operator: api.NodeSelectorOpIn, + Values: []string{"bar", "baz"}, + }} + mustParse := func(s string) labels.Selector { + out, e := labels.Parse(s) + if e != nil { + panic(e) + } + return out + } + tc := []struct { + in []api.NodeSelectorRequirement + out labels.Selector + expectErr bool + }{ + {in: nil, out: labels.Nothing()}, + {in: []api.NodeSelectorRequirement{}, out: labels.Nothing()}, + { + in: matchExpressions, + out: mustParse("foo in (baz,bar)"), + }, + { + in: []api.NodeSelectorRequirement{{ + Key: "foo", + Operator: api.NodeSelectorOpExists, + Values: []string{"bar", "baz"}, + }}, + expectErr: true, + }, + { + in: []api.NodeSelectorRequirement{{ + Key: "foo", + Operator: api.NodeSelectorOpGt, + Values: []string{"1"}, + }}, + out: mustParse("foo>1"), + }, + { + in: []api.NodeSelectorRequirement{{ + Key: "bar", + Operator: api.NodeSelectorOpLt, + Values: []string{"7"}, + }}, + out: mustParse("bar<7"), + }, + } + + for i, tc := range tc { + out, err := NodeSelectorRequirementsAsSelector(tc.in) + if err == nil && tc.expectErr { + t.Errorf("[%v]expected error but got none.", i) + } + if err != nil && !tc.expectErr { + t.Errorf("[%v]did not expect error but got: %v", i, err) + } + if !reflect.DeepEqual(out, tc.out) { + t.Errorf("[%v]expected:\n\t%+v\nbut got:\n\t%+v", i, tc.out, out) + } + } +} + +func TestSysctlsFromPodAnnotation(t *testing.T) { + type Test struct { + annotation string + expectValue []api.Sysctl + expectErr bool + } + for i, test := range []Test{ + { + annotation: "", + expectValue: nil, + }, + { + annotation: "foo.bar", + expectErr: true, + }, + { + annotation: "=123", + expectErr: true, + }, + { + annotation: "foo.bar=", + expectValue: []api.Sysctl{{Name: "foo.bar", Value: ""}}, + }, + { + annotation: "foo.bar=42", + expectValue: []api.Sysctl{{Name: "foo.bar", Value: "42"}}, + }, + { + annotation: "foo.bar=42,", + expectErr: true, + }, + { + annotation: "foo.bar=42,abc.def=1", + expectValue: []api.Sysctl{{Name: "foo.bar", Value: "42"}, {Name: "abc.def", Value: "1"}}, + }, + } { + sysctls, err := SysctlsFromPodAnnotation(test.annotation) + if test.expectErr && err == nil { + t.Errorf("[%v]expected error but got none", i) + } else if !test.expectErr && err != nil { + t.Errorf("[%v]did not expect error but got: %v", i, err) + } else if !reflect.DeepEqual(sysctls, test.expectValue) { + t.Errorf("[%v]expect value %v but got %v", i, test.expectValue, sysctls) + } + } +} + +// TODO: remove when alpha support for topology constraints is removed +func TestGetNodeAffinityFromAnnotations(t *testing.T) { + testCases := []struct { + annotations map[string]string + expectErr bool + }{ + { + annotations: nil, + expectErr: false, + }, + { + annotations: map[string]string{}, + expectErr: false, + }, + { + annotations: map[string]string{ + api.AlphaStorageNodeAffinityAnnotation: `{ + "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [ + { "matchExpressions": [ + { "key": "test-key1", + "operator": "In", + "values": ["test-value1", "test-value2"] + }, + { "key": "test-key2", + "operator": "In", + "values": ["test-value1", "test-value2"] + } + ]} + ]} + }`, + }, + expectErr: false, + }, + { + annotations: map[string]string{ + api.AlphaStorageNodeAffinityAnnotation: `[{ + "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [ + { "matchExpressions": [ + { "key": "test-key1", + "operator": "In", + "values": ["test-value1", "test-value2"] + }, + { "key": "test-key2", + "operator": "In", + "values": ["test-value1", "test-value2"] + } + ]} + ]} + }]`, + }, + expectErr: true, + }, + { + annotations: map[string]string{ + api.AlphaStorageNodeAffinityAnnotation: `{ + "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": + "matchExpressions": [ + { "key": "test-key1", + "operator": "In", + "values": ["test-value1", "test-value2"] + }, + { "key": "test-key2", + "operator": "In", + "values": ["test-value1", "test-value2"] + } + ]} + } + }`, + }, + expectErr: true, + }, + } + + for i, tc := range testCases { + _, err := GetStorageNodeAffinityFromAnnotation(tc.annotations) + if err == nil && tc.expectErr { + t.Errorf("[%v]expected error but got none.", i) + } + if err != nil && !tc.expectErr { + t.Errorf("[%v]did not expect error but got: %v", i, err) + } + } +} + +func TestIsHugePageResourceName(t *testing.T) { + testCases := []struct { + name api.ResourceName + result bool + }{ + { + name: api.ResourceName("hugepages-2Mi"), + result: true, + }, + { + name: api.ResourceName("hugepages-1Gi"), + result: true, + }, + { + name: api.ResourceName("cpu"), + result: false, + }, + { + name: api.ResourceName("memory"), + result: false, + }, + } + for _, testCase := range testCases { + if testCase.result != IsHugePageResourceName(testCase.name) { + t.Errorf("resource: %v expected result: %v", testCase.name, testCase.result) + } + } +} + +func TestHugePageResourceName(t *testing.T) { + testCases := []struct { + pageSize resource.Quantity + name api.ResourceName + }{ + { + pageSize: resource.MustParse("2Mi"), + name: api.ResourceName("hugepages-2Mi"), + }, + { + pageSize: resource.MustParse("1Gi"), + name: api.ResourceName("hugepages-1Gi"), + }, + { + // verify we do not regress our canonical representation + pageSize: *resource.NewQuantity(int64(2097152), resource.BinarySI), + name: api.ResourceName("hugepages-2Mi"), + }, + } + for _, testCase := range testCases { + if result := HugePageResourceName(testCase.pageSize); result != testCase.name { + t.Errorf("pageSize: %v, expected: %v, but got: %v", testCase.pageSize.String(), testCase.name, result.String()) + } + } +} + +func TestHugePageSizeFromResourceName(t *testing.T) { + testCases := []struct { + name api.ResourceName + expectErr bool + pageSize resource.Quantity + }{ + { + name: api.ResourceName("hugepages-2Mi"), + pageSize: resource.MustParse("2Mi"), + expectErr: false, + }, + { + name: api.ResourceName("hugepages-1Gi"), + pageSize: resource.MustParse("1Gi"), + expectErr: false, + }, + { + name: api.ResourceName("hugepages-bad"), + expectErr: true, + }, + } + for _, testCase := range testCases { + value, err := HugePageSizeFromResourceName(testCase.name) + if testCase.expectErr && err == nil { + t.Errorf("Expected an error for %v", testCase.name) + } else if !testCase.expectErr && err != nil { + t.Errorf("Unexpected error for %v, got %v", testCase.name, err) + } else if testCase.pageSize.Value() != value.Value() { + t.Errorf("Unexpected pageSize for resource %v got %v", testCase.name, value.String()) + } + } +} + +func TestIsOvercommitAllowed(t *testing.T) { + testCases := []struct { + name api.ResourceName + allowed bool + }{ + { + name: api.ResourceCPU, + allowed: true, + }, + { + name: api.ResourceMemory, + allowed: true, + }, + { + name: api.ResourceNvidiaGPU, + allowed: false, + }, + { + name: HugePageResourceName(resource.MustParse("2Mi")), + allowed: false, + }, + } + for _, testCase := range testCases { + if testCase.allowed != IsOvercommitAllowed(testCase.name) { + t.Errorf("Unexpected result for %v", testCase.name) + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/api/install/install_test.go b/vendor/k8s.io/kubernetes/pkg/api/install/install_test.go new file mode 100644 index 000000000..d0a2b0b30 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/api/install/install_test.go @@ -0,0 +1,139 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package install + +import ( + "encoding/json" + "reflect" + "testing" + + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + internal "k8s.io/kubernetes/pkg/api" +) + +func TestResourceVersioner(t *testing.T) { + g, err := internal.Registry.Group(v1.GroupName) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + intf, err := g.DefaultInterfacesFor(v1.SchemeGroupVersion) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + accessor := intf.MetadataAccessor + + pod := internal.Pod{ObjectMeta: metav1.ObjectMeta{ResourceVersion: "10"}} + version, err := accessor.ResourceVersion(&pod) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if version != "10" { + t.Errorf("unexpected version %v", version) + } + + podList := internal.PodList{ListMeta: metav1.ListMeta{ResourceVersion: "10"}} + version, err = accessor.ResourceVersion(&podList) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if version != "10" { + t.Errorf("unexpected version %v", version) + } +} + +func TestCodec(t *testing.T) { + pod := internal.Pod{} + // We do want to use package registered rather than testapi here, because we + // want to test if the package install and package registered work as expected. + data, err := runtime.Encode(internal.Codecs.LegacyCodec(internal.Registry.GroupOrDie(internal.GroupName).GroupVersion), &pod) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + other := internal.Pod{} + if err := json.Unmarshal(data, &other); err != nil { + t.Fatalf("unexpected error: %v", err) + } + if other.APIVersion != internal.Registry.GroupOrDie(internal.GroupName).GroupVersion.Version || other.Kind != "Pod" { + t.Errorf("unexpected unmarshalled object %#v", other) + } +} + +func TestInterfacesFor(t *testing.T) { + if _, err := internal.Registry.GroupOrDie(internal.GroupName).InterfacesFor(internal.SchemeGroupVersion); err == nil { + t.Fatalf("unexpected non-error: %v", err) + } + for i, version := range internal.Registry.GroupOrDie(internal.GroupName).GroupVersions { + if vi, err := internal.Registry.GroupOrDie(internal.GroupName).InterfacesFor(version); err != nil || vi == nil { + t.Fatalf("%d: unexpected result: %v", i, err) + } + } +} + +func TestRESTMapper(t *testing.T) { + gv := schema.GroupVersion{Group: "", Version: "v1"} + rcGVK := gv.WithKind("ReplicationController") + podTemplateGVK := gv.WithKind("PodTemplate") + + if gvk, err := internal.Registry.RESTMapper().KindFor(internal.SchemeGroupVersion.WithResource("replicationcontrollers")); err != nil || gvk != rcGVK { + t.Errorf("unexpected version mapping: %v %v", gvk, err) + } + + if m, err := internal.Registry.GroupOrDie(internal.GroupName).RESTMapper.RESTMapping(podTemplateGVK.GroupKind(), ""); err != nil || m.GroupVersionKind != podTemplateGVK || m.Resource != "podtemplates" { + t.Errorf("unexpected version mapping: %#v %v", m, err) + } + + for _, version := range internal.Registry.GroupOrDie(internal.GroupName).GroupVersions { + mapping, err := internal.Registry.GroupOrDie(internal.GroupName).RESTMapper.RESTMapping(rcGVK.GroupKind(), version.Version) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + if mapping.Resource != "replicationControllers" && mapping.Resource != "replicationcontrollers" { + t.Errorf("incorrect resource name: %#v", mapping) + } + if mapping.GroupVersionKind.GroupVersion() != version { + t.Errorf("incorrect version: %v", mapping) + } + + interfaces, _ := internal.Registry.GroupOrDie(internal.GroupName).InterfacesFor(version) + if mapping.ObjectConvertor != interfaces.ObjectConvertor { + t.Errorf("unexpected: %#v, expected: %#v", mapping, interfaces) + } + + rc := &internal.ReplicationController{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} + name, err := mapping.MetadataAccessor.Name(rc) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if name != "foo" { + t.Errorf("unable to retrieve object meta with: %v", mapping.MetadataAccessor) + } + } +} + +func TestUnversioned(t *testing.T) { + for _, obj := range []runtime.Object{ + &metav1.Status{}, + } { + if unversioned, ok := internal.Scheme.IsUnversioned(obj); !unversioned || !ok { + t.Errorf("%v is expected to be unversioned", reflect.TypeOf(obj)) + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/api/meta_test.go b/vendor/k8s.io/kubernetes/pkg/api/meta_test.go new file mode 100644 index 000000000..f97758188 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/api/meta_test.go @@ -0,0 +1,103 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package api_test + +import ( + "reflect" + "testing" + + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/kubernetes/pkg/api" +) + +var _ metav1.Object = &metav1.ObjectMeta{} + +func TestAccessorImplementations(t *testing.T) { + for _, gv := range api.Registry.EnabledVersions() { + internalGV := schema.GroupVersion{Group: gv.Group, Version: runtime.APIVersionInternal} + for _, gv := range []schema.GroupVersion{gv, internalGV} { + for kind, knownType := range api.Scheme.KnownTypes(gv) { + value := reflect.New(knownType) + obj := value.Interface() + if _, ok := obj.(runtime.Object); !ok { + t.Errorf("%v (%v) does not implement runtime.Object", gv.WithKind(kind), knownType) + } + lm, isLM := obj.(meta.ListMetaAccessor) + om, isOM := obj.(metav1.ObjectMetaAccessor) + switch { + case isLM && isOM: + t.Errorf("%v (%v) implements ListMetaAccessor and ObjectMetaAccessor", gv.WithKind(kind), knownType) + continue + case isLM: + m := lm.GetListMeta() + if m == nil { + t.Errorf("%v (%v) returns nil ListMeta", gv.WithKind(kind), knownType) + continue + } + m.SetResourceVersion("102030") + if m.GetResourceVersion() != "102030" { + t.Errorf("%v (%v) did not preserve resource version", gv.WithKind(kind), knownType) + continue + } + m.SetSelfLink("102030") + if m.GetSelfLink() != "102030" { + t.Errorf("%v (%v) did not preserve self link", gv.WithKind(kind), knownType) + continue + } + case isOM: + m := om.GetObjectMeta() + if m == nil { + t.Errorf("%v (%v) returns nil ObjectMeta", gv.WithKind(kind), knownType) + continue + } + m.SetResourceVersion("102030") + if m.GetResourceVersion() != "102030" { + t.Errorf("%v (%v) did not preserve resource version", gv.WithKind(kind), knownType) + continue + } + m.SetSelfLink("102030") + if m.GetSelfLink() != "102030" { + t.Errorf("%v (%v) did not preserve self link", gv.WithKind(kind), knownType) + continue + } + labels := map[string]string{"a": "b"} + m.SetLabels(labels) + if !reflect.DeepEqual(m.GetLabels(), labels) { + t.Errorf("%v (%v) did not preserve labels", gv.WithKind(kind), knownType) + continue + } + default: + if _, ok := obj.(metav1.ListMetaAccessor); ok { + continue + } + if _, ok := value.Elem().Type().FieldByName("ObjectMeta"); ok { + t.Errorf("%v (%v) has ObjectMeta but does not implement ObjectMetaAccessor", gv.WithKind(kind), knownType) + continue + } + if _, ok := value.Elem().Type().FieldByName("ListMeta"); ok { + t.Errorf("%v (%v) has ListMeta but does not implement ListMetaAccessor", gv.WithKind(kind), knownType) + continue + } + t.Logf("%v (%v) does not implement ListMetaAccessor or ObjectMetaAccessor", gv.WithKind(kind), knownType) + } + } + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/api/serialization_proto_test.go b/vendor/k8s.io/kubernetes/pkg/api/serialization_proto_test.go new file mode 100644 index 000000000..b33d7eaeb --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/api/serialization_proto_test.go @@ -0,0 +1,217 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package api_test + +import ( + "bytes" + "encoding/hex" + "fmt" + "math/rand" + "reflect" + "testing" + + "github.com/gogo/protobuf/proto" + "k8s.io/api/core/v1" + apiequality "k8s.io/apimachinery/pkg/api/equality" + "k8s.io/apimachinery/pkg/api/testing/fuzzer" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer/protobuf" + "k8s.io/apimachinery/pkg/util/diff" + "k8s.io/kubernetes/pkg/api" + kapitesting "k8s.io/kubernetes/pkg/api/testing" + _ "k8s.io/kubernetes/pkg/apis/extensions" + _ "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" +) + +func TestUniversalDeserializer(t *testing.T) { + expected := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "test"}} + d := api.Codecs.UniversalDeserializer() + for _, mediaType := range []string{"application/json", "application/yaml", "application/vnd.kubernetes.protobuf"} { + info, ok := runtime.SerializerInfoForMediaType(api.Codecs.SupportedMediaTypes(), mediaType) + if !ok { + t.Fatal(mediaType) + } + buf := &bytes.Buffer{} + if err := info.Serializer.Encode(expected, buf); err != nil { + t.Fatalf("%s: %v", mediaType, err) + } + obj, _, err := d.Decode(buf.Bytes(), &schema.GroupVersionKind{Kind: "Pod", Version: "v1"}, nil) + if err != nil { + t.Fatalf("%s: %v", mediaType, err) + } + if !apiequality.Semantic.DeepEqual(expected, obj) { + t.Fatalf("%s: %#v", mediaType, obj) + } + } +} + +func TestAllFieldsHaveTags(t *testing.T) { + for gvk, obj := range api.Scheme.AllKnownTypes() { + if gvk.Version == runtime.APIVersionInternal { + // internal versions are not serialized to protobuf + continue + } + if gvk.Group == "componentconfig" { + // component config is not serialized to protobuf + continue + } + if err := fieldsHaveProtobufTags(obj); err != nil { + t.Errorf("type %s as gvk %v is missing tags: %v", obj, gvk, err) + } + } +} + +func fieldsHaveProtobufTags(obj reflect.Type) error { + switch obj.Kind() { + case reflect.Slice, reflect.Map, reflect.Ptr, reflect.Array: + return fieldsHaveProtobufTags(obj.Elem()) + case reflect.Struct: + for i := 0; i < obj.NumField(); i++ { + f := obj.Field(i) + if f.Name == "TypeMeta" && f.Type.Name() == "TypeMeta" { + // TypeMeta is not included in external protobuf because we use an envelope type with TypeMeta + continue + } + if len(f.Tag.Get("json")) > 0 && len(f.Tag.Get("protobuf")) == 0 { + return fmt.Errorf("field %s in %s has a 'json' tag but no protobuf tag", f.Name, obj) + } + } + } + return nil +} + +func TestProtobufRoundTrip(t *testing.T) { + obj := &v1.Pod{} + fuzzer.FuzzerFor(kapitesting.FuzzerFuncs, rand.NewSource(benchmarkSeed), api.Codecs).Fuzz(obj) + // InitContainers are turned into annotations by conversion. + obj.Spec.InitContainers = nil + obj.Status.InitContainerStatuses = nil + data, err := obj.Marshal() + if err != nil { + t.Fatal(err) + } + out := &v1.Pod{} + if err := out.Unmarshal(data); err != nil { + t.Fatal(err) + } + if !apiequality.Semantic.Equalities.DeepEqual(out, obj) { + t.Logf("marshal\n%s", hex.Dump(data)) + t.Fatalf("Unmarshal is unequal\n%s", diff.ObjectGoPrintDiff(out, obj)) + } +} + +// BenchmarkEncodeCodec measures the cost of performing a codec encode, which includes +// reflection (to clear APIVersion and Kind) +func BenchmarkEncodeCodecProtobuf(b *testing.B) { + items := benchmarkItems(b) + width := len(items) + s := protobuf.NewSerializer(nil, nil, "application/arbitrary.content.type") + b.ResetTimer() + for i := 0; i < b.N; i++ { + if _, err := runtime.Encode(s, &items[i%width]); err != nil { + b.Fatal(err) + } + } + b.StopTimer() +} + +// BenchmarkEncodeCodecFromInternalProtobuf measures the cost of performing a codec encode, +// including conversions and any type setting. This is a "full" encode. +func BenchmarkEncodeCodecFromInternalProtobuf(b *testing.B) { + items := benchmarkItems(b) + width := len(items) + encodable := make([]api.Pod, width) + for i := range items { + if err := api.Scheme.Convert(&items[i], &encodable[i], nil); err != nil { + b.Fatal(err) + } + } + s := protobuf.NewSerializer(nil, nil, "application/arbitrary.content.type") + codec := api.Codecs.EncoderForVersion(s, v1.SchemeGroupVersion) + b.ResetTimer() + for i := 0; i < b.N; i++ { + if _, err := runtime.Encode(codec, &encodable[i%width]); err != nil { + b.Fatal(err) + } + } + b.StopTimer() +} + +func BenchmarkEncodeProtobufGeneratedMarshal(b *testing.B) { + items := benchmarkItems(b) + width := len(items) + b.ResetTimer() + for i := 0; i < b.N; i++ { + if _, err := items[i%width].Marshal(); err != nil { + b.Fatal(err) + } + } + b.StopTimer() +} + +// BenchmarkDecodeCodecToInternalProtobuf measures the cost of performing a codec decode, +// including conversions and any type setting. This is a "full" decode. +func BenchmarkDecodeCodecToInternalProtobuf(b *testing.B) { + items := benchmarkItems(b) + width := len(items) + s := protobuf.NewSerializer(api.Scheme, api.Scheme, "application/arbitrary.content.type") + encoder := api.Codecs.EncoderForVersion(s, v1.SchemeGroupVersion) + var encoded [][]byte + for i := range items { + data, err := runtime.Encode(encoder, &items[i]) + if err != nil { + b.Fatal(err) + } + encoded = append(encoded, data) + } + + decoder := api.Codecs.DecoderToVersion(s, api.SchemeGroupVersion) + b.ResetTimer() + for i := 0; i < b.N; i++ { + if _, err := runtime.Decode(decoder, encoded[i%width]); err != nil { + b.Fatal(err) + } + } + b.StopTimer() +} + +// BenchmarkDecodeJSON provides a baseline for regular JSON decode performance +func BenchmarkDecodeIntoProtobuf(b *testing.B) { + items := benchmarkItems(b) + width := len(items) + encoded := make([][]byte, width) + for i := range items { + data, err := (&items[i]).Marshal() + if err != nil { + b.Fatal(err) + } + encoded[i] = data + validate := &v1.Pod{} + if err := proto.Unmarshal(data, validate); err != nil { + b.Fatalf("Failed to unmarshal %d: %v\n%#v", i, err, items[i]) + } + } + + for i := 0; i < b.N; i++ { + obj := v1.Pod{} + if err := proto.Unmarshal(encoded[i%width], &obj); err != nil { + b.Fatal(err) + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/api/serialization_test.go b/vendor/k8s.io/kubernetes/pkg/api/serialization_test.go new file mode 100644 index 000000000..609805a8a --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/api/serialization_test.go @@ -0,0 +1,561 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package api_test + +import ( + "bytes" + "encoding/hex" + "encoding/json" + "io/ioutil" + "math/rand" + "reflect" + "strings" + "testing" + + "github.com/golang/protobuf/proto" + jsoniter "github.com/json-iterator/go" + + "k8s.io/api/core/v1" + "k8s.io/api/extensions/v1beta1" + apiequality "k8s.io/apimachinery/pkg/api/equality" + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/api/testing/fuzzer" + "k8s.io/apimachinery/pkg/api/testing/roundtrip" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer/streaming" + "k8s.io/apimachinery/pkg/util/diff" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/testapi" + kapitesting "k8s.io/kubernetes/pkg/api/testing" + k8s_api_v1 "k8s.io/kubernetes/pkg/api/v1" + "k8s.io/kubernetes/pkg/apis/extensions" + k8s_v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" +) + +// fuzzInternalObject fuzzes an arbitrary runtime object using the appropriate +// fuzzer registered with the apitesting package. +func fuzzInternalObject(t *testing.T, forVersion schema.GroupVersion, item runtime.Object, seed int64) runtime.Object { + fuzzer.FuzzerFor(kapitesting.FuzzerFuncs, rand.NewSource(seed), api.Codecs).Fuzz(item) + + j, err := meta.TypeAccessor(item) + if err != nil { + t.Fatalf("Unexpected error %v for %#v", err, item) + } + j.SetKind("") + j.SetAPIVersion("") + + return item +} + +// dataAsString returns the given byte array as a string; handles detecting +// protocol buffers. +func dataAsString(data []byte) string { + dataString := string(data) + if !strings.HasPrefix(dataString, "{") { + dataString = "\n" + hex.Dump(data) + proto.NewBuffer(make([]byte, 0, 1024)).DebugPrint("decoded object", data) + } + return dataString +} + +func Convert_v1beta1_ReplicaSet_to_api_ReplicationController(in *v1beta1.ReplicaSet, out *api.ReplicationController, s conversion.Scope) error { + intermediate1 := &extensions.ReplicaSet{} + if err := k8s_v1beta1.Convert_v1beta1_ReplicaSet_To_extensions_ReplicaSet(in, intermediate1, s); err != nil { + return err + } + + intermediate2 := &v1.ReplicationController{} + if err := k8s_api_v1.Convert_extensions_ReplicaSet_to_v1_ReplicationController(intermediate1, intermediate2, s); err != nil { + return err + } + + return k8s_api_v1.Convert_v1_ReplicationController_To_api_ReplicationController(intermediate2, out, s) +} + +func TestSetControllerConversion(t *testing.T) { + if err := api.Scheme.AddConversionFuncs(Convert_v1beta1_ReplicaSet_to_api_ReplicationController); err != nil { + t.Fatal(err) + } + + rs := &extensions.ReplicaSet{} + rc := &api.ReplicationController{} + + extGroup := testapi.Extensions + defaultGroup := testapi.Default + + fuzzInternalObject(t, extGroup.InternalGroupVersion(), rs, rand.Int63()) + + t.Logf("rs._internal.extensions -> rs.v1beta1.extensions") + data, err := runtime.Encode(extGroup.Codec(), rs) + if err != nil { + t.Fatalf("unexpected encoding error: %v", err) + } + + decoder := api.Codecs.DecoderToVersion( + api.Codecs.UniversalDeserializer(), + runtime.NewMultiGroupVersioner( + *defaultGroup.GroupVersion(), + schema.GroupKind{Group: defaultGroup.GroupVersion().Group}, + schema.GroupKind{Group: extGroup.GroupVersion().Group}, + ), + ) + + t.Logf("rs.v1beta1.extensions -> rc._internal") + if err := runtime.DecodeInto(decoder, data, rc); err != nil { + t.Fatalf("unexpected decoding error: %v", err) + } + + t.Logf("rc._internal -> rc.v1") + data, err = runtime.Encode(defaultGroup.Codec(), rc) + if err != nil { + t.Fatalf("unexpected encoding error: %v", err) + } + + t.Logf("rc.v1 -> rs._internal.extensions") + if err := runtime.DecodeInto(decoder, data, rs); err != nil { + t.Fatalf("unexpected decoding error: %v", err) + } +} + +// TestSpecificKind round-trips a single specific kind and is intended to help +// debug issues that arise while adding a new API type. +func TestSpecificKind(t *testing.T) { + // Uncomment the following line to enable logging of which conversions + // api.Scheme.Log(t) + internalGVK := schema.GroupVersionKind{Group: "extensions", Version: runtime.APIVersionInternal, Kind: "DaemonSet"} + + seed := rand.Int63() + fuzzer := fuzzer.FuzzerFor(kapitesting.FuzzerFuncs, rand.NewSource(seed), api.Codecs) + + roundtrip.RoundTripSpecificKind(t, internalGVK, api.Scheme, api.Codecs, fuzzer, nil) +} + +var nonRoundTrippableTypes = sets.NewString( + "ExportOptions", + "GetOptions", + // WatchEvent does not include kind and version and can only be deserialized + // implicitly (if the caller expects the specific object). The watch call defines + // the schema by content type, rather than via kind/version included in each + // object. + "WatchEvent", + // ListOptions is now part of the meta group + "ListOptions", + // Delete options is only read in metav1 + "DeleteOptions", +) + +var commonKinds = []string{"Status", "ListOptions", "DeleteOptions", "ExportOptions"} + +// TestCommonKindsRegistered verifies that all group/versions registered with +// the testapi package have the common kinds. +func TestCommonKindsRegistered(t *testing.T) { + for _, kind := range commonKinds { + for _, group := range testapi.Groups { + gv := group.GroupVersion() + gvk := gv.WithKind(kind) + obj, err := api.Scheme.New(gvk) + if err != nil { + t.Error(err) + } + defaults := gv.WithKind("") + var got *schema.GroupVersionKind + if obj, got, err = api.Codecs.LegacyCodec().Decode([]byte(`{"kind":"`+kind+`"}`), &defaults, obj); err != nil || gvk != *got { + t.Errorf("expected %v: %v %v", gvk, got, err) + } + data, err := runtime.Encode(api.Codecs.LegacyCodec(*gv), obj) + if err != nil { + t.Errorf("expected %v: %v\n%s", gvk, err, string(data)) + continue + } + if !bytes.Contains(data, []byte(`"kind":"`+kind+`","apiVersion":"`+gv.String()+`"`)) { + if kind != "Status" { + t.Errorf("expected %v: %v\n%s", gvk, err, string(data)) + continue + } + // TODO: this is wrong, but legacy clients expect it + if !bytes.Contains(data, []byte(`"kind":"`+kind+`","apiVersion":"v1"`)) { + t.Errorf("expected %v: %v\n%s", gvk, err, string(data)) + continue + } + } + } + } +} + +// TestRoundTripTypes applies the round-trip test to all round-trippable Kinds +// in all of the API groups registered for test in the testapi package. +func TestRoundTripTypes(t *testing.T) { + seed := rand.Int63() + fuzzer := fuzzer.FuzzerFor(kapitesting.FuzzerFuncs, rand.NewSource(seed), api.Codecs) + + nonRoundTrippableTypes := map[schema.GroupVersionKind]bool{ + {Group: "componentconfig", Version: runtime.APIVersionInternal, Kind: "KubeProxyConfiguration"}: true, + {Group: "componentconfig", Version: runtime.APIVersionInternal, Kind: "KubeSchedulerConfiguration"}: true, + } + + roundtrip.RoundTripTypes(t, api.Scheme, api.Codecs, fuzzer, nonRoundTrippableTypes) +} + +// TestEncodePtr tests that a pointer to a golang type can be encoded and +// decoded without information loss or mutation. +func TestEncodePtr(t *testing.T) { + grace := int64(30) + pod := &api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{"name": "foo"}, + }, + Spec: api.PodSpec{ + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + + TerminationGracePeriodSeconds: &grace, + + SecurityContext: &api.PodSecurityContext{}, + SchedulerName: api.DefaultSchedulerName, + }, + } + obj := runtime.Object(pod) + data, err := runtime.Encode(testapi.Default.Codec(), obj) + obj2, err2 := runtime.Decode(testapi.Default.Codec(), data) + if err != nil || err2 != nil { + t.Fatalf("Failure: '%v' '%v'", err, err2) + } + if _, ok := obj2.(*api.Pod); !ok { + t.Fatalf("Got wrong type") + } + if !apiequality.Semantic.DeepEqual(obj2, pod) { + t.Errorf("\nExpected:\n\n %#v,\n\nGot:\n\n %#vDiff: %v\n\n", pod, obj2, diff.ObjectDiff(obj2, pod)) + } +} + +// TestBadJSONRejection establishes that a JSON object without a kind or with +// an unknown kind will not be decoded without error. +func TestBadJSONRejection(t *testing.T) { + badJSONMissingKind := []byte(`{ }`) + if _, err := runtime.Decode(testapi.Default.Codec(), badJSONMissingKind); err == nil { + t.Errorf("Did not reject despite lack of kind field: %s", badJSONMissingKind) + } + badJSONUnknownType := []byte(`{"kind": "bar"}`) + if _, err1 := runtime.Decode(testapi.Default.Codec(), badJSONUnknownType); err1 == nil { + t.Errorf("Did not reject despite use of unknown type: %s", badJSONUnknownType) + } + /*badJSONKindMismatch := []byte(`{"kind": "Pod"}`) + if err2 := DecodeInto(badJSONKindMismatch, &Node{}); err2 == nil { + t.Errorf("Kind is set but doesn't match the object type: %s", badJSONKindMismatch) + }*/ +} + +// TestUnversionedTypes establishes that the default codec can encode and +// decode unversioned objects. +func TestUnversionedTypes(t *testing.T) { + testcases := []runtime.Object{ + &metav1.Status{Status: "Failure", Message: "something went wrong"}, + &metav1.APIVersions{Versions: []string{"A", "B", "C"}}, + &metav1.APIGroupList{Groups: []metav1.APIGroup{{Name: "mygroup"}}}, + &metav1.APIGroup{Name: "mygroup"}, + &metav1.APIResourceList{GroupVersion: "mygroup/myversion"}, + } + + for _, obj := range testcases { + // Make sure the unversioned codec can encode + unversionedJSON, err := runtime.Encode(testapi.Default.Codec(), obj) + if err != nil { + t.Errorf("%v: unexpected error: %v", obj, err) + continue + } + + // Make sure the versioned codec under test can decode + versionDecodedObject, err := runtime.Decode(testapi.Default.Codec(), unversionedJSON) + if err != nil { + t.Errorf("%v: unexpected error: %v", obj, err) + continue + } + // Make sure it decodes correctly + if !reflect.DeepEqual(obj, versionDecodedObject) { + t.Errorf("%v: expected %#v, got %#v", obj, obj, versionDecodedObject) + continue + } + } +} + +// TestObjectWatchFraming establishes that a watch event can be encoded and +// decoded correctly through each of the supported RFC2046 media types. +func TestObjectWatchFraming(t *testing.T) { + f := fuzzer.FuzzerFor(kapitesting.FuzzerFuncs, rand.NewSource(benchmarkSeed), api.Codecs) + secret := &api.Secret{} + f.Fuzz(secret) + secret.Data["binary"] = []byte{0x00, 0x10, 0x30, 0x55, 0xff, 0x00} + secret.Data["utf8"] = []byte("a string with \u0345 characters") + secret.Data["long"] = bytes.Repeat([]byte{0x01, 0x02, 0x03, 0x00}, 1000) + converted, _ := api.Scheme.ConvertToVersion(secret, v1.SchemeGroupVersion) + v1secret := converted.(*v1.Secret) + for _, info := range api.Codecs.SupportedMediaTypes() { + if info.StreamSerializer == nil { + continue + } + s := info.StreamSerializer + framer := s.Framer + embedded := info.Serializer + if embedded == nil { + t.Errorf("no embedded serializer for %s", info.MediaType) + continue + } + innerDecode := api.Codecs.DecoderToVersion(embedded, api.SchemeGroupVersion) + + // write a single object through the framer and back out + obj := &bytes.Buffer{} + if err := s.Encode(v1secret, obj); err != nil { + t.Fatal(err) + } + out := &bytes.Buffer{} + w := framer.NewFrameWriter(out) + if n, err := w.Write(obj.Bytes()); err != nil || n != len(obj.Bytes()) { + t.Fatal(err) + } + sr := streaming.NewDecoder(framer.NewFrameReader(ioutil.NopCloser(out)), s) + resultSecret := &v1.Secret{} + res, _, err := sr.Decode(nil, resultSecret) + if err != nil { + t.Fatalf("%v:\n%s", err, hex.Dump(obj.Bytes())) + } + resultSecret.Kind = "Secret" + resultSecret.APIVersion = "v1" + if !apiequality.Semantic.DeepEqual(v1secret, res) { + t.Fatalf("objects did not match: %s", diff.ObjectGoPrintDiff(v1secret, res)) + } + + // write a watch event through the frame writer and read it back in + // via the frame reader for this media type + obj = &bytes.Buffer{} + if err := embedded.Encode(v1secret, obj); err != nil { + t.Fatal(err) + } + event := &metav1.WatchEvent{Type: string(watch.Added)} + event.Object.Raw = obj.Bytes() + obj = &bytes.Buffer{} + if err := s.Encode(event, obj); err != nil { + t.Fatal(err) + } + out = &bytes.Buffer{} + w = framer.NewFrameWriter(out) + if n, err := w.Write(obj.Bytes()); err != nil || n != len(obj.Bytes()) { + t.Fatal(err) + } + sr = streaming.NewDecoder(framer.NewFrameReader(ioutil.NopCloser(out)), s) + outEvent := &metav1.WatchEvent{} + res, _, err = sr.Decode(nil, outEvent) + if err != nil || outEvent.Type != string(watch.Added) { + t.Fatalf("%v: %#v", err, outEvent) + } + if outEvent.Object.Object == nil && outEvent.Object.Raw != nil { + outEvent.Object.Object, err = runtime.Decode(innerDecode, outEvent.Object.Raw) + if err != nil { + t.Fatalf("%v:\n%s", err, hex.Dump(outEvent.Object.Raw)) + } + } + + if !apiequality.Semantic.DeepEqual(secret, outEvent.Object.Object) { + t.Fatalf("%s: did not match after frame decoding: %s", info.MediaType, diff.ObjectGoPrintDiff(secret, outEvent.Object.Object)) + } + } +} + +const benchmarkSeed = 100 + +func benchmarkItems(b *testing.B) []v1.Pod { + apiObjectFuzzer := fuzzer.FuzzerFor(kapitesting.FuzzerFuncs, rand.NewSource(benchmarkSeed), api.Codecs) + items := make([]v1.Pod, 10) + for i := range items { + var pod api.Pod + apiObjectFuzzer.Fuzz(&pod) + pod.Spec.InitContainers, pod.Status.InitContainerStatuses = nil, nil + out, err := api.Scheme.ConvertToVersion(&pod, v1.SchemeGroupVersion) + if err != nil { + panic(err) + } + items[i] = *out.(*v1.Pod) + } + return items +} + +// BenchmarkEncodeCodec measures the cost of performing a codec encode, which includes +// reflection (to clear APIVersion and Kind) +func BenchmarkEncodeCodec(b *testing.B) { + items := benchmarkItems(b) + width := len(items) + b.ResetTimer() + for i := 0; i < b.N; i++ { + if _, err := runtime.Encode(testapi.Default.Codec(), &items[i%width]); err != nil { + b.Fatal(err) + } + } + b.StopTimer() +} + +// BenchmarkEncodeCodecFromInternal measures the cost of performing a codec encode, +// including conversions. +func BenchmarkEncodeCodecFromInternal(b *testing.B) { + items := benchmarkItems(b) + width := len(items) + encodable := make([]api.Pod, width) + for i := range items { + if err := api.Scheme.Convert(&items[i], &encodable[i], nil); err != nil { + b.Fatal(err) + } + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + if _, err := runtime.Encode(testapi.Default.Codec(), &encodable[i%width]); err != nil { + b.Fatal(err) + } + } + b.StopTimer() +} + +// BenchmarkEncodeJSONMarshal provides a baseline for regular JSON encode performance +func BenchmarkEncodeJSONMarshal(b *testing.B) { + items := benchmarkItems(b) + width := len(items) + b.ResetTimer() + for i := 0; i < b.N; i++ { + if _, err := json.Marshal(&items[i%width]); err != nil { + b.Fatal(err) + } + } + b.StopTimer() +} + +func BenchmarkDecodeCodec(b *testing.B) { + codec := testapi.Default.Codec() + items := benchmarkItems(b) + width := len(items) + encoded := make([][]byte, width) + for i := range items { + data, err := runtime.Encode(codec, &items[i]) + if err != nil { + b.Fatal(err) + } + encoded[i] = data + } + + b.ResetTimer() + for i := 0; i < b.N; i++ { + if _, err := runtime.Decode(codec, encoded[i%width]); err != nil { + b.Fatal(err) + } + } + b.StopTimer() +} + +func BenchmarkDecodeIntoExternalCodec(b *testing.B) { + codec := testapi.Default.Codec() + items := benchmarkItems(b) + width := len(items) + encoded := make([][]byte, width) + for i := range items { + data, err := runtime.Encode(codec, &items[i]) + if err != nil { + b.Fatal(err) + } + encoded[i] = data + } + + b.ResetTimer() + for i := 0; i < b.N; i++ { + obj := v1.Pod{} + if err := runtime.DecodeInto(codec, encoded[i%width], &obj); err != nil { + b.Fatal(err) + } + } + b.StopTimer() +} + +func BenchmarkDecodeIntoInternalCodec(b *testing.B) { + codec := testapi.Default.Codec() + items := benchmarkItems(b) + width := len(items) + encoded := make([][]byte, width) + for i := range items { + data, err := runtime.Encode(codec, &items[i]) + if err != nil { + b.Fatal(err) + } + encoded[i] = data + } + + b.ResetTimer() + for i := 0; i < b.N; i++ { + obj := api.Pod{} + if err := runtime.DecodeInto(codec, encoded[i%width], &obj); err != nil { + b.Fatal(err) + } + } + b.StopTimer() +} + +// BenchmarkDecodeJSON provides a baseline for regular JSON decode performance +func BenchmarkDecodeIntoJSON(b *testing.B) { + codec := testapi.Default.Codec() + items := benchmarkItems(b) + width := len(items) + encoded := make([][]byte, width) + for i := range items { + data, err := runtime.Encode(codec, &items[i]) + if err != nil { + b.Fatal(err) + } + encoded[i] = data + } + + b.ResetTimer() + for i := 0; i < b.N; i++ { + obj := v1.Pod{} + if err := json.Unmarshal(encoded[i%width], &obj); err != nil { + b.Fatal(err) + } + } + b.StopTimer() +} + +// BenchmarkDecodeJSON provides a baseline for JSON decode performance +func BenchmarkDecodeIntoJSONCodecGen(b *testing.B) { + kcodec := testapi.Default.Codec() + items := benchmarkItems(b) + width := len(items) + encoded := make([][]byte, width) + for i := range items { + data, err := runtime.Encode(kcodec, &items[i]) + if err != nil { + b.Fatal(err) + } + encoded[i] = data + } + + b.ResetTimer() + for i := 0; i < b.N; i++ { + obj := v1.Pod{} + if err := jsoniter.ConfigFastest.Unmarshal(encoded[i%width], &obj); err != nil { + b.Fatal(err) + } + } + b.StopTimer() +} diff --git a/vendor/k8s.io/kubernetes/pkg/api/service/util_test.go b/vendor/k8s.io/kubernetes/pkg/api/service/util_test.go new file mode 100644 index 000000000..c3eb0d1fb --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/api/service/util_test.go @@ -0,0 +1,216 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package service + +import ( + "strings" + "testing" + + "k8s.io/kubernetes/pkg/api" + netsets "k8s.io/kubernetes/pkg/util/net/sets" +) + +func TestGetLoadBalancerSourceRanges(t *testing.T) { + checkError := func(v string) { + annotations := make(map[string]string) + annotations[api.AnnotationLoadBalancerSourceRangesKey] = v + svc := api.Service{} + svc.Annotations = annotations + _, err := GetLoadBalancerSourceRanges(&svc) + if err == nil { + t.Errorf("Expected error parsing: %q", v) + } + svc = api.Service{} + svc.Spec.LoadBalancerSourceRanges = strings.Split(v, ",") + _, err = GetLoadBalancerSourceRanges(&svc) + if err == nil { + t.Errorf("Expected error parsing: %q", v) + } + } + checkError("10.0.0.1/33") + checkError("foo.bar") + checkError("10.0.0.1/32,*") + checkError("10.0.0.1/32,") + checkError("10.0.0.1/32, ") + checkError("10.0.0.1") + + checkOK := func(v string) netsets.IPNet { + annotations := make(map[string]string) + annotations[api.AnnotationLoadBalancerSourceRangesKey] = v + svc := api.Service{} + svc.Annotations = annotations + cidrs, err := GetLoadBalancerSourceRanges(&svc) + if err != nil { + t.Errorf("Unexpected error parsing: %q", v) + } + svc = api.Service{} + svc.Spec.LoadBalancerSourceRanges = strings.Split(v, ",") + cidrs, err = GetLoadBalancerSourceRanges(&svc) + if err != nil { + t.Errorf("Unexpected error parsing: %q", v) + } + return cidrs + } + cidrs := checkOK("192.168.0.1/32") + if len(cidrs) != 1 { + t.Errorf("Expected exactly one CIDR: %v", cidrs.StringSlice()) + } + cidrs = checkOK("192.168.0.1/32,192.168.0.1/32") + if len(cidrs) != 1 { + t.Errorf("Expected exactly one CIDR (after de-dup): %v", cidrs.StringSlice()) + } + cidrs = checkOK("192.168.0.1/32,192.168.0.2/32") + if len(cidrs) != 2 { + t.Errorf("Expected two CIDRs: %v", cidrs.StringSlice()) + } + cidrs = checkOK(" 192.168.0.1/32 , 192.168.0.2/32 ") + if len(cidrs) != 2 { + t.Errorf("Expected two CIDRs: %v", cidrs.StringSlice()) + } + // check LoadBalancerSourceRanges not specified + svc := api.Service{} + cidrs, err := GetLoadBalancerSourceRanges(&svc) + if err != nil { + t.Errorf("Unexpected error: %v", err) + } + if len(cidrs) != 1 { + t.Errorf("Expected exactly one CIDR: %v", cidrs.StringSlice()) + } + if !IsAllowAll(cidrs) { + t.Errorf("Expected default to be allow-all: %v", cidrs.StringSlice()) + } + // check SourceRanges annotation is empty + annotations := make(map[string]string) + annotations[api.AnnotationLoadBalancerSourceRangesKey] = "" + svc = api.Service{} + svc.Annotations = annotations + cidrs, err = GetLoadBalancerSourceRanges(&svc) + if err != nil { + t.Errorf("Unexpected error: %v", err) + } + if len(cidrs) != 1 { + t.Errorf("Expected exactly one CIDR: %v", cidrs.StringSlice()) + } + if !IsAllowAll(cidrs) { + t.Errorf("Expected default to be allow-all: %v", cidrs.StringSlice()) + } +} + +func TestAllowAll(t *testing.T) { + checkAllowAll := func(allowAll bool, cidrs ...string) { + ipnets, err := netsets.ParseIPNets(cidrs...) + if err != nil { + t.Errorf("Unexpected error parsing cidrs: %v", cidrs) + } + if allowAll != IsAllowAll(ipnets) { + t.Errorf("IsAllowAll did not return expected value for %v", cidrs) + } + } + checkAllowAll(false, "10.0.0.1/32") + checkAllowAll(false, "10.0.0.1/32", "10.0.0.2/32") + checkAllowAll(false, "10.0.0.1/32", "10.0.0.1/32") + + checkAllowAll(true, "0.0.0.0/0") + checkAllowAll(true, "192.168.0.0/0") + checkAllowAll(true, "192.168.0.1/32", "0.0.0.0/0") +} + +func TestRequestsOnlyLocalTraffic(t *testing.T) { + checkRequestsOnlyLocalTraffic := func(requestsOnlyLocalTraffic bool, service *api.Service) { + res := RequestsOnlyLocalTraffic(service) + if res != requestsOnlyLocalTraffic { + t.Errorf("Expected requests OnlyLocal traffic = %v, got %v", + requestsOnlyLocalTraffic, res) + } + } + + checkRequestsOnlyLocalTraffic(false, &api.Service{}) + checkRequestsOnlyLocalTraffic(false, &api.Service{ + Spec: api.ServiceSpec{ + Type: api.ServiceTypeClusterIP, + }, + }) + checkRequestsOnlyLocalTraffic(false, &api.Service{ + Spec: api.ServiceSpec{ + Type: api.ServiceTypeNodePort, + }, + }) + checkRequestsOnlyLocalTraffic(false, &api.Service{ + Spec: api.ServiceSpec{ + Type: api.ServiceTypeNodePort, + ExternalTrafficPolicy: api.ServiceExternalTrafficPolicyTypeCluster, + }, + }) + checkRequestsOnlyLocalTraffic(true, &api.Service{ + Spec: api.ServiceSpec{ + Type: api.ServiceTypeNodePort, + ExternalTrafficPolicy: api.ServiceExternalTrafficPolicyTypeLocal, + }, + }) + checkRequestsOnlyLocalTraffic(false, &api.Service{ + Spec: api.ServiceSpec{ + Type: api.ServiceTypeLoadBalancer, + ExternalTrafficPolicy: api.ServiceExternalTrafficPolicyTypeCluster, + }, + }) + checkRequestsOnlyLocalTraffic(true, &api.Service{ + Spec: api.ServiceSpec{ + Type: api.ServiceTypeLoadBalancer, + ExternalTrafficPolicy: api.ServiceExternalTrafficPolicyTypeLocal, + }, + }) +} + +func TestNeedsHealthCheck(t *testing.T) { + checkNeedsHealthCheck := func(needsHealthCheck bool, service *api.Service) { + res := NeedsHealthCheck(service) + if res != needsHealthCheck { + t.Errorf("Expected needs health check = %v, got %v", + needsHealthCheck, res) + } + } + + checkNeedsHealthCheck(false, &api.Service{ + Spec: api.ServiceSpec{ + Type: api.ServiceTypeClusterIP, + }, + }) + checkNeedsHealthCheck(false, &api.Service{ + Spec: api.ServiceSpec{ + Type: api.ServiceTypeNodePort, + ExternalTrafficPolicy: api.ServiceExternalTrafficPolicyTypeCluster, + }, + }) + checkNeedsHealthCheck(false, &api.Service{ + Spec: api.ServiceSpec{ + Type: api.ServiceTypeNodePort, + ExternalTrafficPolicy: api.ServiceExternalTrafficPolicyTypeLocal, + }, + }) + checkNeedsHealthCheck(false, &api.Service{ + Spec: api.ServiceSpec{ + Type: api.ServiceTypeLoadBalancer, + ExternalTrafficPolicy: api.ServiceExternalTrafficPolicyTypeCluster, + }, + }) + checkNeedsHealthCheck(true, &api.Service{ + Spec: api.ServiceSpec{ + Type: api.ServiceTypeLoadBalancer, + ExternalTrafficPolicy: api.ServiceExternalTrafficPolicyTypeLocal, + }, + }) +} diff --git a/vendor/k8s.io/kubernetes/pkg/api/taint_test.go b/vendor/k8s.io/kubernetes/pkg/api/taint_test.go new file mode 100644 index 000000000..a52582b35 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/api/taint_test.go @@ -0,0 +1,120 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package api + +import "testing" + +func TestTaintToString(t *testing.T) { + testCases := []struct { + taint *Taint + expectedString string + }{ + { + taint: &Taint{ + Key: "foo", + Value: "bar", + Effect: TaintEffectNoSchedule, + }, + expectedString: "foo=bar:NoSchedule", + }, + { + taint: &Taint{ + Key: "foo", + Effect: TaintEffectNoSchedule, + }, + expectedString: "foo:NoSchedule", + }, + } + + for i, tc := range testCases { + if tc.expectedString != tc.taint.ToString() { + t.Errorf("[%v] expected taint %v converted to %s, got %s", i, tc.taint, tc.expectedString, tc.taint.ToString()) + } + } +} + +func TestMatchTaint(t *testing.T) { + testCases := []struct { + description string + taint *Taint + taintToMatch Taint + expectMatch bool + }{ + { + description: "two taints with the same key,value,effect should match", + taint: &Taint{ + Key: "foo", + Value: "bar", + Effect: TaintEffectNoSchedule, + }, + taintToMatch: Taint{ + Key: "foo", + Value: "bar", + Effect: TaintEffectNoSchedule, + }, + expectMatch: true, + }, + { + description: "two taints with the same key,effect but different value should match", + taint: &Taint{ + Key: "foo", + Value: "bar", + Effect: TaintEffectNoSchedule, + }, + taintToMatch: Taint{ + Key: "foo", + Value: "different-value", + Effect: TaintEffectNoSchedule, + }, + expectMatch: true, + }, + { + description: "two taints with the different key cannot match", + taint: &Taint{ + Key: "foo", + Value: "bar", + Effect: TaintEffectNoSchedule, + }, + taintToMatch: Taint{ + Key: "different-key", + Value: "bar", + Effect: TaintEffectNoSchedule, + }, + expectMatch: false, + }, + { + description: "two taints with the different effect cannot match", + taint: &Taint{ + Key: "foo", + Value: "bar", + Effect: TaintEffectNoSchedule, + }, + taintToMatch: Taint{ + Key: "foo", + Value: "bar", + Effect: TaintEffectPreferNoSchedule, + }, + expectMatch: false, + }, + } + + for _, tc := range testCases { + if tc.expectMatch != tc.taint.MatchTaint(tc.taintToMatch) { + t.Errorf("[%s] expect taint %s match taint %s", tc.description, tc.taint.ToString(), tc.taintToMatch.ToString()) + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/api/unstructured_test.go b/vendor/k8s.io/kubernetes/pkg/api/unstructured_test.go new file mode 100644 index 000000000..9616d822a --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/api/unstructured_test.go @@ -0,0 +1,174 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package api_test + +import ( + "math/rand" + "reflect" + "testing" + + "github.com/google/gofuzz" + + "k8s.io/api/core/v1" + apiequality "k8s.io/apimachinery/pkg/api/equality" + "k8s.io/apimachinery/pkg/api/testing/fuzzer" + "k8s.io/apimachinery/pkg/conversion/unstructured" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/diff" + "k8s.io/apimachinery/pkg/util/json" + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/testapi" + kapitesting "k8s.io/kubernetes/pkg/api/testing" +) + +func doRoundTrip(t *testing.T, group testapi.TestGroup, kind string) { + // We do fuzzing on the internal version of the object, and only then + // convert to the external version. This is because custom fuzzing + // function are only supported for internal objects. + internalObj, err := api.Scheme.New(group.InternalGroupVersion().WithKind(kind)) + if err != nil { + t.Fatalf("Couldn't create internal object %v: %v", kind, err) + } + seed := rand.Int63() + fuzzer.FuzzerFor(kapitesting.FuzzerFuncs, rand.NewSource(seed), api.Codecs). + // We are explicitly overwriting custom fuzzing functions, to ensure + // that InitContainers and their statuses are not generated. This is + // because in thise test we are simply doing json operations, in which + // those disappear. + Funcs( + func(s *api.PodSpec, c fuzz.Continue) { + c.FuzzNoCustom(s) + s.InitContainers = nil + }, + func(s *api.PodStatus, c fuzz.Continue) { + c.FuzzNoCustom(s) + s.InitContainerStatuses = nil + }, + ).Fuzz(internalObj) + + item, err := api.Scheme.New(group.GroupVersion().WithKind(kind)) + if err != nil { + t.Fatalf("Couldn't create external object %v: %v", kind, err) + } + if err := api.Scheme.Convert(internalObj, item, nil); err != nil { + t.Fatalf("Conversion for %v failed: %v", kind, err) + } + + data, err := json.Marshal(item) + if err != nil { + t.Errorf("Error when marshaling object: %v", err) + return + } + unstr := make(map[string]interface{}) + err = json.Unmarshal(data, &unstr) + if err != nil { + t.Errorf("Error when unmarshaling to unstructured: %v", err) + return + } + + data, err = json.Marshal(unstr) + if err != nil { + t.Errorf("Error when marshaling unstructured: %v", err) + return + } + unmarshalledObj := reflect.New(reflect.TypeOf(item).Elem()).Interface() + err = json.Unmarshal(data, &unmarshalledObj) + if err != nil { + t.Errorf("Error when unmarshaling to object: %v", err) + return + } + if !apiequality.Semantic.DeepEqual(item, unmarshalledObj) { + t.Errorf("Object changed during JSON operations, diff: %v", diff.ObjectReflectDiff(item, unmarshalledObj)) + return + } + + newUnstr, err := unstructured.DefaultConverter.ToUnstructured(item) + if err != nil { + t.Errorf("ToUnstructured failed: %v", err) + return + } + + newObj := reflect.New(reflect.TypeOf(item).Elem()).Interface().(runtime.Object) + err = unstructured.DefaultConverter.FromUnstructured(newUnstr, newObj) + if err != nil { + t.Errorf("FromUnstructured failed: %v", err) + return + } + + if !apiequality.Semantic.DeepEqual(item, newObj) { + t.Errorf("Object changed, diff: %v", diff.ObjectReflectDiff(item, newObj)) + } +} + +func TestRoundTrip(t *testing.T) { + for groupKey, group := range testapi.Groups { + for kind := range group.ExternalTypes() { + if nonRoundTrippableTypes.Has(kind) { + continue + } + t.Logf("Testing: %v in %v", kind, groupKey) + for i := 0; i < 50; i++ { + doRoundTrip(t, group, kind) + if t.Failed() { + break + } + } + } + } +} + +func BenchmarkToFromUnstructured(b *testing.B) { + items := benchmarkItems(b) + size := len(items) + b.ResetTimer() + for i := 0; i < b.N; i++ { + unstr, err := unstructured.DefaultConverter.ToUnstructured(&items[i%size]) + if err != nil { + b.Fatalf("unexpected error: %v", err) + } + obj := v1.Pod{} + if err := unstructured.DefaultConverter.FromUnstructured(unstr, &obj); err != nil { + b.Fatalf("unexpected error: %v", err) + } + } + b.StopTimer() +} + +func BenchmarkToFromUnstructuredViaJSON(b *testing.B) { + items := benchmarkItems(b) + size := len(items) + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := json.Marshal(&items[i%size]) + if err != nil { + b.Fatalf("unexpected error: %v", err) + } + unstr := map[string]interface{}{} + if err := json.Unmarshal(data, &unstr); err != nil { + b.Fatalf("unexpected error: %v", err) + } + data, err = json.Marshal(unstr) + if err != nil { + b.Fatalf("unexpected error: %v", err) + } + obj := v1.Pod{} + if err := json.Unmarshal(data, &obj); err != nil { + b.Fatalf("unexpected error: %v", err) + } + } + b.StopTimer() +} diff --git a/vendor/k8s.io/kubernetes/pkg/api/util/group_version_test.go b/vendor/k8s.io/kubernetes/pkg/api/util/group_version_test.go new file mode 100644 index 000000000..5975305a2 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/api/util/group_version_test.go @@ -0,0 +1,93 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package util + +import "testing" + +func TestGetVersion(t *testing.T) { + testCases := []struct { + groupVersion string + output string + }{ + { + "v1", + "v1", + }, + { + "extensions/v1beta1", + "v1beta1", + }, + } + for _, test := range testCases { + actual := GetVersion(test.groupVersion) + if test.output != actual { + t.Errorf("expect version: %s, got: %s\n", test.output, actual) + } + } +} + +func TestGetGroup(t *testing.T) { + testCases := []struct { + groupVersion string + output string + }{ + { + "v1", + "", + }, + { + "extensions/v1beta1", + "extensions", + }, + } + for _, test := range testCases { + actual := GetGroup(test.groupVersion) + if test.output != actual { + t.Errorf("expect version: %s, got: %s\n", test.output, actual) + } + } +} + +func TestGetGroupVersion(t *testing.T) { + testCases := []struct { + group string + version string + output string + }{ + { + "", + "v1", + "v1", + }, + { + "extensions", + "", + "extensions/", + }, + { + "extensions", + "v1beta1", + "extensions/v1beta1", + }, + } + for _, test := range testCases { + actual := GetGroupVersion(test.group, test.version) + if test.output != actual { + t.Errorf("expect version: %s, got: %s\n", test.output, actual) + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/backward_compatibility_test.go b/vendor/k8s.io/kubernetes/pkg/api/v1/backward_compatibility_test.go new file mode 100644 index 000000000..83c7107f9 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/api/v1/backward_compatibility_test.go @@ -0,0 +1,169 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1_test + +import ( + "testing" + + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/validation/field" + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/testing/compat" + "k8s.io/kubernetes/pkg/api/validation" + + _ "k8s.io/kubernetes/pkg/api/install" +) + +func TestCompatibility_v1_PodSecurityContext(t *testing.T) { + cases := []struct { + name string + input string + expectedKeys map[string]string + absentKeys []string + }{ + { + name: "hostNetwork = true", + input: ` +{ + "kind":"Pod", + "apiVersion":"v1", + "metadata":{"name":"my-pod-name", "namespace":"my-pod-namespace"}, + "spec": { + "hostNetwork": true, + "containers":[{ + "name":"a", + "image":"my-container-image" + }] + } +} +`, + expectedKeys: map[string]string{ + "spec.hostNetwork": "true", + }, + }, + { + name: "hostNetwork = false", + input: ` +{ + "kind":"Pod", + "apiVersion":"v1", + "metadata":{"name":"my-pod-name", "namespace":"my-pod-namespace"}, + "spec": { + "hostNetwork": false, + "containers":[{ + "name":"a", + "image":"my-container-image" + }] + } +} +`, + absentKeys: []string{ + "spec.hostNetwork", + }, + }, + { + name: "hostIPC = true", + input: ` +{ + "kind":"Pod", + "apiVersion":"v1", + "metadata":{"name":"my-pod-name", "namespace":"my-pod-namespace"}, + "spec": { + "hostIPC": true, + "containers":[{ + "name":"a", + "image":"my-container-image" + }] + } +} +`, + expectedKeys: map[string]string{ + "spec.hostIPC": "true", + }, + }, + { + name: "hostIPC = false", + input: ` +{ + "kind":"Pod", + "apiVersion":"v1", + "metadata":{"name":"my-pod-name", "namespace":"my-pod-namespace"}, + "spec": { + "hostIPC": false, + "containers":[{ + "name":"a", + "image":"my-container-image" + }] + } +} +`, + absentKeys: []string{ + "spec.hostIPC", + }, + }, + { + name: "hostPID = true", + input: ` +{ + "kind":"Pod", + "apiVersion":"v1", + "metadata":{"name":"my-pod-name", "namespace":"my-pod-namespace"}, + "spec": { + "hostPID": true, + "containers":[{ + "name":"a", + "image":"my-container-image" + }] + } +} +`, + expectedKeys: map[string]string{ + "spec.hostPID": "true", + }, + }, + { + name: "hostPID = false", + input: ` +{ + "kind":"Pod", + "apiVersion":"v1", + "metadata":{"name":"my-pod-name", "namespace":"my-pod-namespace"}, + "spec": { + "hostPID": false, + "containers":[{ + "name":"a", + "image":"my-container-image" + }] + } +} +`, + absentKeys: []string{ + "spec.hostPID", + }, + }, + } + + validator := func(obj runtime.Object) field.ErrorList { + return validation.ValidatePodSpec(&(obj.(*api.Pod).Spec), field.NewPath("spec")) + } + + for _, tc := range cases { + t.Logf("Testing 1.0.0 backward compatibility for %v", tc.name) + compat.TestCompatibility(t, v1.SchemeGroupVersion, []byte(tc.input), validator, tc.expectedKeys, tc.absentKeys) + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/conversion_test.go b/vendor/k8s.io/kubernetes/pkg/api/v1/conversion_test.go new file mode 100644 index 000000000..f9401a61c --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/api/v1/conversion_test.go @@ -0,0 +1,224 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1_test + +import ( + "net/url" + "reflect" + "testing" + "time" + + "k8s.io/api/core/v1" + apiequality "k8s.io/apimachinery/pkg/api/equality" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/diff" + "k8s.io/kubernetes/pkg/api" + k8s_api_v1 "k8s.io/kubernetes/pkg/api/v1" +) + +func TestPodLogOptions(t *testing.T) { + sinceSeconds := int64(1) + sinceTime := metav1.NewTime(time.Date(2000, 1, 1, 12, 34, 56, 0, time.UTC).Local()) + tailLines := int64(2) + limitBytes := int64(3) + + versionedLogOptions := &v1.PodLogOptions{ + Container: "mycontainer", + Follow: true, + Previous: true, + SinceSeconds: &sinceSeconds, + SinceTime: &sinceTime, + Timestamps: true, + TailLines: &tailLines, + LimitBytes: &limitBytes, + } + unversionedLogOptions := &api.PodLogOptions{ + Container: "mycontainer", + Follow: true, + Previous: true, + SinceSeconds: &sinceSeconds, + SinceTime: &sinceTime, + Timestamps: true, + TailLines: &tailLines, + LimitBytes: &limitBytes, + } + expectedParameters := url.Values{ + "container": {"mycontainer"}, + "follow": {"true"}, + "previous": {"true"}, + "sinceSeconds": {"1"}, + "sinceTime": {"2000-01-01T12:34:56Z"}, + "timestamps": {"true"}, + "tailLines": {"2"}, + "limitBytes": {"3"}, + } + + codec := runtime.NewParameterCodec(api.Scheme) + + // unversioned -> query params + { + actualParameters, err := codec.EncodeParameters(unversionedLogOptions, v1.SchemeGroupVersion) + if err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(actualParameters, expectedParameters) { + t.Fatalf("Expected\n%#v\ngot\n%#v", expectedParameters, actualParameters) + } + } + + // versioned -> query params + { + actualParameters, err := codec.EncodeParameters(versionedLogOptions, v1.SchemeGroupVersion) + if err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(actualParameters, expectedParameters) { + t.Fatalf("Expected\n%#v\ngot\n%#v", expectedParameters, actualParameters) + } + } + + // query params -> versioned + { + convertedLogOptions := &v1.PodLogOptions{} + err := codec.DecodeParameters(expectedParameters, v1.SchemeGroupVersion, convertedLogOptions) + if err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(convertedLogOptions, versionedLogOptions) { + t.Fatalf("Unexpected deserialization:\n%s", diff.ObjectGoPrintSideBySide(versionedLogOptions, convertedLogOptions)) + } + } + + // query params -> unversioned + { + convertedLogOptions := &api.PodLogOptions{} + err := codec.DecodeParameters(expectedParameters, v1.SchemeGroupVersion, convertedLogOptions) + if err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(convertedLogOptions, unversionedLogOptions) { + t.Fatalf("Unexpected deserialization:\n%s", diff.ObjectGoPrintSideBySide(unversionedLogOptions, convertedLogOptions)) + } + } +} + +// TestPodSpecConversion tests that v1.ServiceAccount is an alias for +// ServiceAccountName. +func TestPodSpecConversion(t *testing.T) { + name, other := "foo", "bar" + + // Test internal -> v1. Should have both alias (DeprecatedServiceAccount) + // and new field (ServiceAccountName). + i := &api.PodSpec{ + ServiceAccountName: name, + } + v := v1.PodSpec{} + if err := api.Scheme.Convert(i, &v, nil); err != nil { + t.Fatalf("unexpected error: %v", err) + } + if v.ServiceAccountName != name { + t.Fatalf("want v1.ServiceAccountName %q, got %q", name, v.ServiceAccountName) + } + if v.DeprecatedServiceAccount != name { + t.Fatalf("want v1.DeprecatedServiceAccount %q, got %q", name, v.DeprecatedServiceAccount) + } + + // Test v1 -> internal. Either DeprecatedServiceAccount, ServiceAccountName, + // or both should translate to ServiceAccountName. ServiceAccountName wins + // if both are set. + testCases := []*v1.PodSpec{ + // New + {ServiceAccountName: name}, + // Alias + {DeprecatedServiceAccount: name}, + // Both: same + {ServiceAccountName: name, DeprecatedServiceAccount: name}, + // Both: different + {ServiceAccountName: name, DeprecatedServiceAccount: other}, + } + for k, v := range testCases { + got := api.PodSpec{} + err := api.Scheme.Convert(v, &got, nil) + if err != nil { + t.Fatalf("unexpected error for case %d: %v", k, err) + } + if got.ServiceAccountName != name { + t.Fatalf("want api.ServiceAccountName %q, got %q", name, got.ServiceAccountName) + } + } +} + +func TestResourceListConversion(t *testing.T) { + bigMilliQuantity := resource.NewQuantity(resource.MaxMilliValue, resource.DecimalSI) + bigMilliQuantity.Add(resource.MustParse("12345m")) + + tests := []struct { + input v1.ResourceList + expected api.ResourceList + }{ + { // No changes necessary. + input: v1.ResourceList{ + v1.ResourceMemory: resource.MustParse("30M"), + v1.ResourceCPU: resource.MustParse("100m"), + v1.ResourceStorage: resource.MustParse("1G"), + }, + expected: api.ResourceList{ + api.ResourceMemory: resource.MustParse("30M"), + api.ResourceCPU: resource.MustParse("100m"), + api.ResourceStorage: resource.MustParse("1G"), + }, + }, + { // Nano-scale values should be rounded up to milli-scale. + input: v1.ResourceList{ + v1.ResourceCPU: resource.MustParse("3.000023m"), + v1.ResourceMemory: resource.MustParse("500.000050m"), + }, + expected: api.ResourceList{ + api.ResourceCPU: resource.MustParse("4m"), + api.ResourceMemory: resource.MustParse("501m"), + }, + }, + { // Large values should still be accurate. + input: v1.ResourceList{ + v1.ResourceCPU: *bigMilliQuantity.Copy(), + v1.ResourceStorage: *bigMilliQuantity.Copy(), + }, + expected: api.ResourceList{ + api.ResourceCPU: *bigMilliQuantity.Copy(), + api.ResourceStorage: *bigMilliQuantity.Copy(), + }, + }, + } + + for i, test := range tests { + output := api.ResourceList{} + + // defaulting is a separate step from conversion that is applied when reading from the API or from etcd. + // perform that step explicitly. + k8s_api_v1.SetDefaults_ResourceList(&test.input) + + err := api.Scheme.Convert(&test.input, &output, nil) + if err != nil { + t.Fatalf("unexpected error for case %d: %v", i, err) + } + if !apiequality.Semantic.DeepEqual(test.expected, output) { + t.Errorf("unexpected conversion for case %d: Expected\n%+v;\nGot\n%+v", i, test.expected, output) + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/defaults_test.go b/vendor/k8s.io/kubernetes/pkg/api/v1/defaults_test.go new file mode 100644 index 000000000..01fa05266 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/api/v1/defaults_test.go @@ -0,0 +1,1334 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1_test + +import ( + "fmt" + "reflect" + "testing" + + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/intstr" + "k8s.io/kubernetes/pkg/api" + k8s_api_v1 "k8s.io/kubernetes/pkg/api/v1" +) + +func roundTrip(t *testing.T, obj runtime.Object) runtime.Object { + codec := api.Codecs.LegacyCodec(v1.SchemeGroupVersion) + data, err := runtime.Encode(codec, obj) + if err != nil { + t.Errorf("%v\n %#v", err, obj) + return nil + } + obj2, err := runtime.Decode(codec, data) + if err != nil { + t.Errorf("%v\nData: %s\nSource: %#v", err, string(data), obj) + return nil + } + obj3 := reflect.New(reflect.TypeOf(obj).Elem()).Interface().(runtime.Object) + err = api.Scheme.Convert(obj2, obj3, nil) + if err != nil { + t.Errorf("%v\nSource: %#v", err, obj2) + return nil + } + return obj3 +} + +func TestSetDefaultReplicationController(t *testing.T) { + tests := []struct { + rc *v1.ReplicationController + expectLabels bool + expectSelector bool + }{ + { + rc: &v1.ReplicationController{ + Spec: v1.ReplicationControllerSpec{ + Template: &v1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "foo": "bar", + }, + }, + }, + }, + }, + expectLabels: true, + expectSelector: true, + }, + { + rc: &v1.ReplicationController{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "bar": "foo", + }, + }, + Spec: v1.ReplicationControllerSpec{ + Template: &v1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "foo": "bar", + }, + }, + }, + }, + }, + expectLabels: false, + expectSelector: true, + }, + { + rc: &v1.ReplicationController{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "bar": "foo", + }, + }, + Spec: v1.ReplicationControllerSpec{ + Selector: map[string]string{ + "some": "other", + }, + Template: &v1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "foo": "bar", + }, + }, + }, + }, + }, + expectLabels: false, + expectSelector: false, + }, + { + rc: &v1.ReplicationController{ + Spec: v1.ReplicationControllerSpec{ + Selector: map[string]string{ + "some": "other", + }, + Template: &v1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "foo": "bar", + }, + }, + }, + }, + }, + expectLabels: true, + expectSelector: false, + }, + } + + for _, test := range tests { + rc := test.rc + obj2 := roundTrip(t, runtime.Object(rc)) + rc2, ok := obj2.(*v1.ReplicationController) + if !ok { + t.Errorf("unexpected object: %v", rc2) + t.FailNow() + } + if test.expectSelector != reflect.DeepEqual(rc2.Spec.Selector, rc2.Spec.Template.Labels) { + if test.expectSelector { + t.Errorf("expected: %v, got: %v", rc2.Spec.Template.Labels, rc2.Spec.Selector) + } else { + t.Errorf("unexpected equality: %v", rc.Spec.Selector) + } + } + if test.expectLabels != reflect.DeepEqual(rc2.Labels, rc2.Spec.Template.Labels) { + if test.expectLabels { + t.Errorf("expected: %v, got: %v", rc2.Spec.Template.Labels, rc2.Labels) + } else { + t.Errorf("unexpected equality: %v", rc.Labels) + } + } + } +} + +func newInt(val int32) *int32 { + p := new(int32) + *p = val + return p +} + +func TestSetDefaultReplicationControllerReplicas(t *testing.T) { + tests := []struct { + rc v1.ReplicationController + expectReplicas int32 + }{ + { + rc: v1.ReplicationController{ + Spec: v1.ReplicationControllerSpec{ + Template: &v1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "foo": "bar", + }, + }, + }, + }, + }, + expectReplicas: 1, + }, + { + rc: v1.ReplicationController{ + Spec: v1.ReplicationControllerSpec{ + Replicas: newInt(0), + Template: &v1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "foo": "bar", + }, + }, + }, + }, + }, + expectReplicas: 0, + }, + { + rc: v1.ReplicationController{ + Spec: v1.ReplicationControllerSpec{ + Replicas: newInt(3), + Template: &v1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "foo": "bar", + }, + }, + }, + }, + }, + expectReplicas: 3, + }, + } + + for _, test := range tests { + rc := &test.rc + obj2 := roundTrip(t, runtime.Object(rc)) + rc2, ok := obj2.(*v1.ReplicationController) + if !ok { + t.Errorf("unexpected object: %v", rc2) + t.FailNow() + } + if rc2.Spec.Replicas == nil { + t.Errorf("unexpected nil Replicas") + } else if test.expectReplicas != *rc2.Spec.Replicas { + t.Errorf("expected: %d replicas, got: %d", test.expectReplicas, *rc2.Spec.Replicas) + } + } +} + +type InitContainerValidator func(got, expected *v1.Container) error + +func TestSetDefaultReplicationControllerInitContainers(t *testing.T) { + assertEnvFieldRef := func(got, expected *v1.Container) error { + if len(got.Env) != len(expected.Env) { + return fmt.Errorf("different number of env: got <%v>, expected <%v>", len(got.Env), len(expected.Env)) + } + + for j := range got.Env { + ge := &got.Env[j] + ee := &expected.Env[j] + + if ge.Name != ee.Name { + return fmt.Errorf("different name of env: got <%v>, expected <%v>", ge.Name, ee.Name) + } + + if ge.ValueFrom.FieldRef.APIVersion != ee.ValueFrom.FieldRef.APIVersion { + return fmt.Errorf("different api version of FieldRef <%v>: got <%v>, expected <%v>", + ge.Name, ge.ValueFrom.FieldRef.APIVersion, ee.ValueFrom.FieldRef.APIVersion) + } + } + return nil + } + + assertImagePullPolicy := func(got, expected *v1.Container) error { + if got.ImagePullPolicy != expected.ImagePullPolicy { + return fmt.Errorf("different image pull poicy: got <%v>, expected <%v>", got.ImagePullPolicy, expected.ImagePullPolicy) + } + return nil + } + + assertContainerPort := func(got, expected *v1.Container) error { + if len(got.Ports) != len(expected.Ports) { + return fmt.Errorf("different number of ports: got <%v>, expected <%v>", len(got.Ports), len(expected.Ports)) + } + + for i := range got.Ports { + gp := &got.Ports[i] + ep := &expected.Ports[i] + + if gp.Name != ep.Name { + return fmt.Errorf("different name of port: got <%v>, expected <%v>", gp.Name, ep.Name) + } + + if gp.Protocol != ep.Protocol { + return fmt.Errorf("different port protocol <%v>: got <%v>, expected <%v>", gp.Name, gp.Protocol, ep.Protocol) + } + } + + return nil + } + + assertResource := func(got, expected *v1.Container) error { + if len(got.Resources.Limits) != len(expected.Resources.Limits) { + return fmt.Errorf("different number of resources.Limits: got <%v>, expected <%v>", len(got.Resources.Limits), (expected.Resources.Limits)) + } + + for k, v := range got.Resources.Limits { + if ev, found := expected.Resources.Limits[v1.ResourceName(k)]; !found { + return fmt.Errorf("failed to find resource <%v> in expected resources.Limits.", k) + } else { + if ev.Value() != v.Value() { + return fmt.Errorf("different resource.Limits: got <%v>, expected <%v>.", v.Value(), ev.Value()) + } + } + } + + if len(got.Resources.Requests) != len(expected.Resources.Requests) { + return fmt.Errorf("different number of resources.Requests: got <%v>, expected <%v>", len(got.Resources.Requests), (expected.Resources.Requests)) + } + + for k, v := range got.Resources.Requests { + if ev, found := expected.Resources.Requests[v1.ResourceName(k)]; !found { + return fmt.Errorf("failed to find resource <%v> in expected resources.Requests.", k) + } else { + if ev.Value() != v.Value() { + return fmt.Errorf("different resource.Requests: got <%v>, expected <%v>.", v.Value(), ev.Value()) + } + } + } + + return nil + } + + assertProb := func(got, expected *v1.Container) error { + // Assert LivenessProbe + if got.LivenessProbe.Handler.HTTPGet.Path != expected.LivenessProbe.Handler.HTTPGet.Path || + got.LivenessProbe.Handler.HTTPGet.Scheme != expected.LivenessProbe.Handler.HTTPGet.Scheme || + got.LivenessProbe.FailureThreshold != expected.LivenessProbe.FailureThreshold || + got.LivenessProbe.SuccessThreshold != expected.LivenessProbe.SuccessThreshold || + got.LivenessProbe.PeriodSeconds != expected.LivenessProbe.PeriodSeconds || + got.LivenessProbe.TimeoutSeconds != expected.LivenessProbe.TimeoutSeconds { + return fmt.Errorf("different LivenessProbe: got <%v>, expected <%v>", got.LivenessProbe, expected.LivenessProbe) + } + + // Assert ReadinessProbe + if got.ReadinessProbe.Handler.HTTPGet.Path != expected.ReadinessProbe.Handler.HTTPGet.Path || + got.ReadinessProbe.Handler.HTTPGet.Scheme != expected.ReadinessProbe.Handler.HTTPGet.Scheme || + got.ReadinessProbe.FailureThreshold != expected.ReadinessProbe.FailureThreshold || + got.ReadinessProbe.SuccessThreshold != expected.ReadinessProbe.SuccessThreshold || + got.ReadinessProbe.PeriodSeconds != expected.ReadinessProbe.PeriodSeconds || + got.ReadinessProbe.TimeoutSeconds != expected.ReadinessProbe.TimeoutSeconds { + return fmt.Errorf("different ReadinessProbe: got <%v>, expected <%v>", got.ReadinessProbe, expected.ReadinessProbe) + } + + return nil + } + + assertLifeCycle := func(got, expected *v1.Container) error { + if got.Lifecycle.PostStart.HTTPGet.Path != expected.Lifecycle.PostStart.HTTPGet.Path || + got.Lifecycle.PostStart.HTTPGet.Scheme != expected.Lifecycle.PostStart.HTTPGet.Scheme { + return fmt.Errorf("different LifeCycle: got <%v>, expected <%v>", got.Lifecycle, expected.Lifecycle) + } + + return nil + } + + cpu, _ := resource.ParseQuantity("100m") + mem, _ := resource.ParseQuantity("100Mi") + + tests := []struct { + name string + rc v1.ReplicationController + expected []v1.Container + validators []InitContainerValidator + }{ + { + name: "imagePullIPolicy", + rc: v1.ReplicationController{ + Spec: v1.ReplicationControllerSpec{ + Template: &v1.PodTemplateSpec{ + Spec: v1.PodSpec{ + InitContainers: []v1.Container{ + { + Name: "install", + Image: "busybox", + }, + }, + }, + }, + }, + }, + expected: []v1.Container{ + { + ImagePullPolicy: v1.PullAlways, + }, + }, + validators: []InitContainerValidator{assertImagePullPolicy}, + }, + { + name: "FieldRef", + rc: v1.ReplicationController{ + Spec: v1.ReplicationControllerSpec{ + Template: &v1.PodTemplateSpec{ + Spec: v1.PodSpec{ + InitContainers: []v1.Container{ + { + Name: "fun", + Image: "alpine", + Env: []v1.EnvVar{ + { + Name: "MY_POD_IP", + ValueFrom: &v1.EnvVarSource{ + FieldRef: &v1.ObjectFieldSelector{ + APIVersion: "", + FieldPath: "status.podIP", + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + expected: []v1.Container{ + { + Env: []v1.EnvVar{ + { + Name: "MY_POD_IP", + ValueFrom: &v1.EnvVarSource{ + FieldRef: &v1.ObjectFieldSelector{ + APIVersion: "v1", + FieldPath: "status.podIP", + }, + }, + }, + }, + }, + }, + validators: []InitContainerValidator{assertEnvFieldRef}, + }, + { + name: "ContainerPort", + rc: v1.ReplicationController{ + Spec: v1.ReplicationControllerSpec{ + Template: &v1.PodTemplateSpec{ + Spec: v1.PodSpec{ + InitContainers: []v1.Container{ + { + Name: "fun", + Image: "alpine", + Ports: []v1.ContainerPort{ + { + Name: "default", + }, + }, + }, + }, + }, + }, + }, + }, + expected: []v1.Container{ + { + Ports: []v1.ContainerPort{ + { + Name: "default", + Protocol: v1.ProtocolTCP, + }, + }, + }, + }, + validators: []InitContainerValidator{assertContainerPort}, + }, + { + name: "Resources", + rc: v1.ReplicationController{ + Spec: v1.ReplicationControllerSpec{ + Template: &v1.PodTemplateSpec{ + Spec: v1.PodSpec{ + InitContainers: []v1.Container{ + { + Name: "fun", + Image: "alpine", + Resources: v1.ResourceRequirements{ + Limits: v1.ResourceList{ + v1.ResourceCPU: resource.MustParse("100m"), + v1.ResourceMemory: resource.MustParse("100Mi"), + }, + Requests: v1.ResourceList{ + v1.ResourceCPU: resource.MustParse("100m"), + v1.ResourceMemory: resource.MustParse("100Mi"), + }, + }, + }, + }, + }, + }, + }, + }, + expected: []v1.Container{ + { + Resources: v1.ResourceRequirements{ + Limits: v1.ResourceList{ + v1.ResourceCPU: cpu, + v1.ResourceMemory: mem, + }, + Requests: v1.ResourceList{ + v1.ResourceCPU: cpu, + v1.ResourceMemory: mem, + }, + }, + }, + }, + validators: []InitContainerValidator{assertResource}, + }, + { + name: "Probe", + rc: v1.ReplicationController{ + Spec: v1.ReplicationControllerSpec{ + Template: &v1.PodTemplateSpec{ + Spec: v1.PodSpec{ + InitContainers: []v1.Container{ + { + Name: "fun", + Image: "alpine", + LivenessProbe: &v1.Probe{ + Handler: v1.Handler{ + HTTPGet: &v1.HTTPGetAction{ + Host: "localhost", + }, + }, + }, + ReadinessProbe: &v1.Probe{ + Handler: v1.Handler{ + HTTPGet: &v1.HTTPGetAction{ + Host: "localhost", + }, + }, + }, + }, + }, + }, + }, + }, + }, + expected: []v1.Container{ + { + LivenessProbe: &v1.Probe{ + Handler: v1.Handler{ + HTTPGet: &v1.HTTPGetAction{ + Path: "/", + Scheme: v1.URISchemeHTTP, + }, + }, + TimeoutSeconds: 1, + PeriodSeconds: 10, + SuccessThreshold: 1, + FailureThreshold: 3, + }, + ReadinessProbe: &v1.Probe{ + Handler: v1.Handler{ + HTTPGet: &v1.HTTPGetAction{ + Path: "/", + Scheme: v1.URISchemeHTTP, + }, + }, + TimeoutSeconds: 1, + PeriodSeconds: 10, + SuccessThreshold: 1, + FailureThreshold: 3, + }, + }, + }, + validators: []InitContainerValidator{assertProb}, + }, + { + name: "LifeCycle", + rc: v1.ReplicationController{ + Spec: v1.ReplicationControllerSpec{ + Template: &v1.PodTemplateSpec{ + Spec: v1.PodSpec{ + InitContainers: []v1.Container{ + { + Name: "fun", + Image: "alpine", + Ports: []v1.ContainerPort{ + { + Name: "default", + }, + }, + Lifecycle: &v1.Lifecycle{ + PostStart: &v1.Handler{ + HTTPGet: &v1.HTTPGetAction{ + Host: "localhost", + }, + }, + PreStop: &v1.Handler{ + HTTPGet: &v1.HTTPGetAction{ + Host: "localhost", + }, + }, + }, + }, + }, + }, + }, + }, + }, + expected: []v1.Container{ + { + Lifecycle: &v1.Lifecycle{ + PostStart: &v1.Handler{ + HTTPGet: &v1.HTTPGetAction{ + Path: "/", + Scheme: v1.URISchemeHTTP, + }, + }, + PreStop: &v1.Handler{ + HTTPGet: &v1.HTTPGetAction{ + Path: "/", + Scheme: v1.URISchemeHTTP, + }, + }, + }, + }, + }, + validators: []InitContainerValidator{assertLifeCycle}, + }, + } + + assertInitContainers := func(got, expected []v1.Container, validators []InitContainerValidator) error { + if len(got) != len(expected) { + return fmt.Errorf("different number of init container: got <%d>, expected <%d>", + len(got), len(expected)) + } + + for i := range got { + g := &got[i] + e := &expected[i] + + for _, validator := range validators { + if err := validator(g, e); err != nil { + return err + } + } + } + + return nil + } + + for _, test := range tests { + rc := &test.rc + obj2 := roundTrip(t, runtime.Object(rc)) + rc2, ok := obj2.(*v1.ReplicationController) + if !ok { + t.Errorf("unexpected object: %v", rc2) + t.FailNow() + } + + if err := assertInitContainers(rc2.Spec.Template.Spec.InitContainers, test.expected, test.validators); err != nil { + t.Errorf("test %v failed: %v", test.name, err) + } + } +} + +func TestSetDefaultService(t *testing.T) { + svc := &v1.Service{} + obj2 := roundTrip(t, runtime.Object(svc)) + svc2 := obj2.(*v1.Service) + if svc2.Spec.SessionAffinity != v1.ServiceAffinityNone { + t.Errorf("Expected default session affinity type:%s, got: %s", v1.ServiceAffinityNone, svc2.Spec.SessionAffinity) + } + if svc2.Spec.SessionAffinityConfig != nil { + t.Errorf("Expected empty session affinity config when session affinity type: %s, got: %v", v1.ServiceAffinityNone, svc2.Spec.SessionAffinityConfig) + } + if svc2.Spec.Type != v1.ServiceTypeClusterIP { + t.Errorf("Expected default type:%s, got: %s", v1.ServiceTypeClusterIP, svc2.Spec.Type) + } +} + +func TestSetDefaultServiceSessionAffinityConfig(t *testing.T) { + testCases := map[string]v1.Service{ + "SessionAffinityConfig is empty": { + Spec: v1.ServiceSpec{ + SessionAffinity: v1.ServiceAffinityClientIP, + SessionAffinityConfig: nil, + }, + }, + "ClientIP is empty": { + Spec: v1.ServiceSpec{ + SessionAffinity: v1.ServiceAffinityClientIP, + SessionAffinityConfig: &v1.SessionAffinityConfig{ + ClientIP: nil, + }, + }, + }, + "TimeoutSeconds is empty": { + Spec: v1.ServiceSpec{ + SessionAffinity: v1.ServiceAffinityClientIP, + SessionAffinityConfig: &v1.SessionAffinityConfig{ + ClientIP: &v1.ClientIPConfig{ + TimeoutSeconds: nil, + }, + }, + }, + }, + } + for name, test := range testCases { + obj2 := roundTrip(t, runtime.Object(&test)) + svc2 := obj2.(*v1.Service) + if svc2.Spec.SessionAffinityConfig == nil || svc2.Spec.SessionAffinityConfig.ClientIP == nil || svc2.Spec.SessionAffinityConfig.ClientIP.TimeoutSeconds == nil { + t.Fatalf("Case: %s, unexpected empty SessionAffinityConfig/ClientIP/TimeoutSeconds when session affinity type: %s, got: %v", name, v1.ServiceAffinityClientIP, svc2.Spec.SessionAffinityConfig) + } + if *svc2.Spec.SessionAffinityConfig.ClientIP.TimeoutSeconds != v1.DefaultClientIPServiceAffinitySeconds { + t.Errorf("Case: %s, default TimeoutSeconds should be %d when session affinity type: %s, got: %d", name, v1.DefaultClientIPServiceAffinitySeconds, v1.ServiceAffinityClientIP, *svc2.Spec.SessionAffinityConfig.ClientIP.TimeoutSeconds) + } + } +} + +func TestSetDefaultSecretVolumeSource(t *testing.T) { + s := v1.PodSpec{} + s.Volumes = []v1.Volume{ + { + VolumeSource: v1.VolumeSource{ + Secret: &v1.SecretVolumeSource{}, + }, + }, + } + pod := &v1.Pod{ + Spec: s, + } + output := roundTrip(t, runtime.Object(pod)) + pod2 := output.(*v1.Pod) + defaultMode := pod2.Spec.Volumes[0].VolumeSource.Secret.DefaultMode + expectedMode := v1.SecretVolumeSourceDefaultMode + + if defaultMode == nil || *defaultMode != expectedMode { + t.Errorf("Expected secret DefaultMode %v, got %v", expectedMode, defaultMode) + } +} + +func TestSetDefaultConfigMapVolumeSource(t *testing.T) { + s := v1.PodSpec{} + s.Volumes = []v1.Volume{ + { + VolumeSource: v1.VolumeSource{ + ConfigMap: &v1.ConfigMapVolumeSource{}, + }, + }, + } + pod := &v1.Pod{ + Spec: s, + } + output := roundTrip(t, runtime.Object(pod)) + pod2 := output.(*v1.Pod) + defaultMode := pod2.Spec.Volumes[0].VolumeSource.ConfigMap.DefaultMode + expectedMode := v1.ConfigMapVolumeSourceDefaultMode + + if defaultMode == nil || *defaultMode != expectedMode { + t.Errorf("Expected v1.ConfigMap DefaultMode %v, got %v", expectedMode, defaultMode) + } +} + +func TestSetDefaultDownwardAPIVolumeSource(t *testing.T) { + s := v1.PodSpec{} + s.Volumes = []v1.Volume{ + { + VolumeSource: v1.VolumeSource{ + DownwardAPI: &v1.DownwardAPIVolumeSource{}, + }, + }, + } + pod := &v1.Pod{ + Spec: s, + } + output := roundTrip(t, runtime.Object(pod)) + pod2 := output.(*v1.Pod) + defaultMode := pod2.Spec.Volumes[0].VolumeSource.DownwardAPI.DefaultMode + expectedMode := v1.DownwardAPIVolumeSourceDefaultMode + + if defaultMode == nil || *defaultMode != expectedMode { + t.Errorf("Expected DownwardAPI DefaultMode %v, got %v", expectedMode, defaultMode) + } +} + +func TestSetDefaultProjectedVolumeSource(t *testing.T) { + s := v1.PodSpec{} + s.Volumes = []v1.Volume{ + { + VolumeSource: v1.VolumeSource{ + Projected: &v1.ProjectedVolumeSource{}, + }, + }, + } + pod := &v1.Pod{ + Spec: s, + } + output := roundTrip(t, runtime.Object(pod)) + pod2 := output.(*v1.Pod) + defaultMode := pod2.Spec.Volumes[0].VolumeSource.Projected.DefaultMode + expectedMode := v1.ProjectedVolumeSourceDefaultMode + + if defaultMode == nil || *defaultMode != expectedMode { + t.Errorf("Expected v1.ProjectedVolumeSource DefaultMode %v, got %v", expectedMode, defaultMode) + } +} + +func TestSetDefaultSecret(t *testing.T) { + s := &v1.Secret{} + obj2 := roundTrip(t, runtime.Object(s)) + s2 := obj2.(*v1.Secret) + + if s2.Type != v1.SecretTypeOpaque { + t.Errorf("Expected secret type %v, got %v", v1.SecretTypeOpaque, s2.Type) + } +} + +func TestSetDefaultPersistentVolume(t *testing.T) { + pv := &v1.PersistentVolume{} + obj2 := roundTrip(t, runtime.Object(pv)) + pv2 := obj2.(*v1.PersistentVolume) + + if pv2.Status.Phase != v1.VolumePending { + t.Errorf("Expected volume phase %v, got %v", v1.VolumePending, pv2.Status.Phase) + } + if pv2.Spec.PersistentVolumeReclaimPolicy != v1.PersistentVolumeReclaimRetain { + t.Errorf("Expected pv reclaim policy %v, got %v", v1.PersistentVolumeReclaimRetain, pv2.Spec.PersistentVolumeReclaimPolicy) + } +} + +func TestSetDefaultPersistentVolumeClaim(t *testing.T) { + pvc := &v1.PersistentVolumeClaim{} + obj2 := roundTrip(t, runtime.Object(pvc)) + pvc2 := obj2.(*v1.PersistentVolumeClaim) + + if pvc2.Status.Phase != v1.ClaimPending { + t.Errorf("Expected claim phase %v, got %v", v1.ClaimPending, pvc2.Status.Phase) + } +} + +func TestSetDefaulEndpointsProtocol(t *testing.T) { + in := &v1.Endpoints{Subsets: []v1.EndpointSubset{ + {Ports: []v1.EndpointPort{{}, {Protocol: "UDP"}, {}}}, + }} + obj := roundTrip(t, runtime.Object(in)) + out := obj.(*v1.Endpoints) + + for i := range out.Subsets { + for j := range out.Subsets[i].Ports { + if in.Subsets[i].Ports[j].Protocol == "" { + if out.Subsets[i].Ports[j].Protocol != v1.ProtocolTCP { + t.Errorf("Expected protocol %s, got %s", v1.ProtocolTCP, out.Subsets[i].Ports[j].Protocol) + } + } else { + if out.Subsets[i].Ports[j].Protocol != in.Subsets[i].Ports[j].Protocol { + t.Errorf("Expected protocol %s, got %s", in.Subsets[i].Ports[j].Protocol, out.Subsets[i].Ports[j].Protocol) + } + } + } + } +} + +func TestSetDefaulServiceTargetPort(t *testing.T) { + in := &v1.Service{Spec: v1.ServiceSpec{Ports: []v1.ServicePort{{Port: 1234}}}} + obj := roundTrip(t, runtime.Object(in)) + out := obj.(*v1.Service) + if out.Spec.Ports[0].TargetPort != intstr.FromInt(1234) { + t.Errorf("Expected TargetPort to be defaulted, got %v", out.Spec.Ports[0].TargetPort) + } + + in = &v1.Service{Spec: v1.ServiceSpec{Ports: []v1.ServicePort{{Port: 1234, TargetPort: intstr.FromInt(5678)}}}} + obj = roundTrip(t, runtime.Object(in)) + out = obj.(*v1.Service) + if out.Spec.Ports[0].TargetPort != intstr.FromInt(5678) { + t.Errorf("Expected TargetPort to be unchanged, got %v", out.Spec.Ports[0].TargetPort) + } +} + +func TestSetDefaultServicePort(t *testing.T) { + // Unchanged if set. + in := &v1.Service{Spec: v1.ServiceSpec{ + Ports: []v1.ServicePort{ + {Protocol: "UDP", Port: 9376, TargetPort: intstr.FromString("p")}, + {Protocol: "UDP", Port: 8675, TargetPort: intstr.FromInt(309)}, + }, + }} + out := roundTrip(t, runtime.Object(in)).(*v1.Service) + if out.Spec.Ports[0].Protocol != v1.ProtocolUDP { + t.Errorf("Expected protocol %s, got %s", v1.ProtocolUDP, out.Spec.Ports[0].Protocol) + } + if out.Spec.Ports[0].TargetPort != intstr.FromString("p") { + t.Errorf("Expected port %v, got %v", in.Spec.Ports[0].Port, out.Spec.Ports[0].TargetPort) + } + if out.Spec.Ports[1].Protocol != v1.ProtocolUDP { + t.Errorf("Expected protocol %s, got %s", v1.ProtocolUDP, out.Spec.Ports[1].Protocol) + } + if out.Spec.Ports[1].TargetPort != intstr.FromInt(309) { + t.Errorf("Expected port %v, got %v", in.Spec.Ports[1].Port, out.Spec.Ports[1].TargetPort) + } + + // Defaulted. + in = &v1.Service{Spec: v1.ServiceSpec{ + Ports: []v1.ServicePort{ + {Protocol: "", Port: 9376, TargetPort: intstr.FromString("")}, + {Protocol: "", Port: 8675, TargetPort: intstr.FromInt(0)}, + }, + }} + out = roundTrip(t, runtime.Object(in)).(*v1.Service) + if out.Spec.Ports[0].Protocol != v1.ProtocolTCP { + t.Errorf("Expected protocol %s, got %s", v1.ProtocolTCP, out.Spec.Ports[0].Protocol) + } + if out.Spec.Ports[0].TargetPort != intstr.FromInt(int(in.Spec.Ports[0].Port)) { + t.Errorf("Expected port %v, got %v", in.Spec.Ports[0].Port, out.Spec.Ports[0].TargetPort) + } + if out.Spec.Ports[1].Protocol != v1.ProtocolTCP { + t.Errorf("Expected protocol %s, got %s", v1.ProtocolTCP, out.Spec.Ports[1].Protocol) + } + if out.Spec.Ports[1].TargetPort != intstr.FromInt(int(in.Spec.Ports[1].Port)) { + t.Errorf("Expected port %v, got %v", in.Spec.Ports[1].Port, out.Spec.Ports[1].TargetPort) + } +} + +func TestSetDefaulServiceExternalTraffic(t *testing.T) { + in := &v1.Service{} + obj := roundTrip(t, runtime.Object(in)) + out := obj.(*v1.Service) + if out.Spec.ExternalTrafficPolicy != "" { + t.Errorf("Expected ExternalTrafficPolicy to be empty, got %v", out.Spec.ExternalTrafficPolicy) + } + + in = &v1.Service{Spec: v1.ServiceSpec{Type: v1.ServiceTypeNodePort}} + obj = roundTrip(t, runtime.Object(in)) + out = obj.(*v1.Service) + if out.Spec.ExternalTrafficPolicy != v1.ServiceExternalTrafficPolicyTypeCluster { + t.Errorf("Expected ExternalTrafficPolicy to be %v, got %v", v1.ServiceExternalTrafficPolicyTypeCluster, out.Spec.ExternalTrafficPolicy) + } + + in = &v1.Service{Spec: v1.ServiceSpec{Type: v1.ServiceTypeLoadBalancer}} + obj = roundTrip(t, runtime.Object(in)) + out = obj.(*v1.Service) + if out.Spec.ExternalTrafficPolicy != v1.ServiceExternalTrafficPolicyTypeCluster { + t.Errorf("Expected ExternalTrafficPolicy to be %v, got %v", v1.ServiceExternalTrafficPolicyTypeCluster, out.Spec.ExternalTrafficPolicy) + } +} + +func TestSetDefaultNamespace(t *testing.T) { + s := &v1.Namespace{} + obj2 := roundTrip(t, runtime.Object(s)) + s2 := obj2.(*v1.Namespace) + + if s2.Status.Phase != v1.NamespaceActive { + t.Errorf("Expected phase %v, got %v", v1.NamespaceActive, s2.Status.Phase) + } +} + +func TestSetDefaultPodSpecHostNetwork(t *testing.T) { + portNum := int32(8080) + s := v1.PodSpec{} + s.HostNetwork = true + s.Containers = []v1.Container{ + { + Ports: []v1.ContainerPort{ + { + ContainerPort: portNum, + }, + }, + }, + } + s.InitContainers = []v1.Container{ + { + Ports: []v1.ContainerPort{ + { + ContainerPort: portNum, + }, + }, + }, + } + pod := &v1.Pod{ + Spec: s, + } + obj2 := roundTrip(t, runtime.Object(pod)) + pod2 := obj2.(*v1.Pod) + s2 := pod2.Spec + + hostPortNum := s2.Containers[0].Ports[0].HostPort + if hostPortNum != portNum { + t.Errorf("Expected container port to be defaulted, was made %d instead of %d", hostPortNum, portNum) + } + + hostPortNum = s2.InitContainers[0].Ports[0].HostPort + if hostPortNum != portNum { + t.Errorf("Expected container port to be defaulted, was made %d instead of %d", hostPortNum, portNum) + } +} + +func TestSetDefaultNodeExternalID(t *testing.T) { + name := "node0" + n := &v1.Node{} + n.Name = name + obj2 := roundTrip(t, runtime.Object(n)) + n2 := obj2.(*v1.Node) + if n2.Spec.ExternalID != name { + t.Errorf("Expected default External ID: %s, got: %s", name, n2.Spec.ExternalID) + } + if n2.Spec.ProviderID != "" { + t.Errorf("Expected empty default Cloud Provider ID, got: %s", n2.Spec.ProviderID) + } +} + +func TestSetDefaultNodeStatusAllocatable(t *testing.T) { + capacity := v1.ResourceList{ + v1.ResourceCPU: resource.MustParse("1000m"), + v1.ResourceMemory: resource.MustParse("10G"), + } + allocatable := v1.ResourceList{ + v1.ResourceCPU: resource.MustParse("500m"), + v1.ResourceMemory: resource.MustParse("5G"), + } + tests := []struct { + capacity v1.ResourceList + allocatable v1.ResourceList + expectedAllocatable v1.ResourceList + }{{ // Everything set, no defaulting. + capacity: capacity, + allocatable: allocatable, + expectedAllocatable: allocatable, + }, { // Allocatable set, no defaulting. + capacity: nil, + allocatable: allocatable, + expectedAllocatable: allocatable, + }, { // Capacity set, allocatable defaults to capacity. + capacity: capacity, + allocatable: nil, + expectedAllocatable: capacity, + }, { // Nothing set, allocatable "defaults" to capacity. + capacity: nil, + allocatable: nil, + expectedAllocatable: nil, + }} + + copyResourceList := func(rl v1.ResourceList) v1.ResourceList { + if rl == nil { + return nil + } + copy := make(v1.ResourceList, len(rl)) + for k, v := range rl { + copy[k] = *v.Copy() + } + return copy + } + + resourceListsEqual := func(a v1.ResourceList, b v1.ResourceList) bool { + if len(a) != len(b) { + return false + } + for k, v := range a { + vb, found := b[k] + if !found { + return false + } + if v.Cmp(vb) != 0 { + return false + } + } + return true + } + + for i, testcase := range tests { + node := v1.Node{ + Status: v1.NodeStatus{ + Capacity: copyResourceList(testcase.capacity), + Allocatable: copyResourceList(testcase.allocatable), + }, + } + node2 := roundTrip(t, runtime.Object(&node)).(*v1.Node) + actual := node2.Status.Allocatable + expected := testcase.expectedAllocatable + if !resourceListsEqual(expected, actual) { + t.Errorf("[%d] Expected v1.NodeStatus.Allocatable: %+v; Got: %+v", i, expected, actual) + } + } +} + +func TestSetDefaultObjectFieldSelectorAPIVersion(t *testing.T) { + s := v1.PodSpec{ + Containers: []v1.Container{ + { + Env: []v1.EnvVar{ + { + ValueFrom: &v1.EnvVarSource{ + FieldRef: &v1.ObjectFieldSelector{}, + }, + }, + }, + }, + }, + } + pod := &v1.Pod{ + Spec: s, + } + obj2 := roundTrip(t, runtime.Object(pod)) + pod2 := obj2.(*v1.Pod) + s2 := pod2.Spec + + apiVersion := s2.Containers[0].Env[0].ValueFrom.FieldRef.APIVersion + if apiVersion != "v1" { + t.Errorf("Expected default APIVersion v1, got: %v", apiVersion) + } +} + +func TestSetMinimumScalePod(t *testing.T) { + // verify we default if limits are specified (and that request=0 is preserved) + s := v1.PodSpec{} + s.Containers = []v1.Container{ + { + Resources: v1.ResourceRequirements{ + Requests: v1.ResourceList{ + v1.ResourceMemory: resource.MustParse("1n"), + }, + Limits: v1.ResourceList{ + v1.ResourceCPU: resource.MustParse("2n"), + }, + }, + }, + } + s.InitContainers = []v1.Container{ + { + Resources: v1.ResourceRequirements{ + Requests: v1.ResourceList{ + v1.ResourceMemory: resource.MustParse("1n"), + }, + Limits: v1.ResourceList{ + v1.ResourceCPU: resource.MustParse("2n"), + }, + }, + }, + } + pod := &v1.Pod{ + Spec: s, + } + k8s_api_v1.SetObjectDefaults_Pod(pod) + + if expect := resource.MustParse("1m"); expect.Cmp(pod.Spec.Containers[0].Resources.Requests[v1.ResourceMemory]) != 0 { + t.Errorf("did not round resources: %#v", pod.Spec.Containers[0].Resources) + } + if expect := resource.MustParse("1m"); expect.Cmp(pod.Spec.InitContainers[0].Resources.Requests[v1.ResourceMemory]) != 0 { + t.Errorf("did not round resources: %#v", pod.Spec.InitContainers[0].Resources) + } +} + +func TestSetDefaultRequestsPod(t *testing.T) { + // verify we default if limits are specified (and that request=0 is preserved) + s := v1.PodSpec{} + s.Containers = []v1.Container{ + { + Resources: v1.ResourceRequirements{ + Requests: v1.ResourceList{ + v1.ResourceMemory: resource.MustParse("0"), + }, + Limits: v1.ResourceList{ + v1.ResourceCPU: resource.MustParse("100m"), + v1.ResourceMemory: resource.MustParse("1Gi"), + }, + }, + }, + } + s.InitContainers = []v1.Container{ + { + Resources: v1.ResourceRequirements{ + Requests: v1.ResourceList{ + v1.ResourceMemory: resource.MustParse("0"), + }, + Limits: v1.ResourceList{ + v1.ResourceCPU: resource.MustParse("100m"), + v1.ResourceMemory: resource.MustParse("1Gi"), + }, + }, + }, + } + pod := &v1.Pod{ + Spec: s, + } + output := roundTrip(t, runtime.Object(pod)) + pod2 := output.(*v1.Pod) + defaultRequest := pod2.Spec.Containers[0].Resources.Requests + if requestValue := defaultRequest[v1.ResourceCPU]; requestValue.String() != "100m" { + t.Errorf("Expected request cpu: %s, got: %s", "100m", requestValue.String()) + } + if requestValue := defaultRequest[v1.ResourceMemory]; requestValue.String() != "0" { + t.Errorf("Expected request memory: %s, got: %s", "0", requestValue.String()) + } + defaultRequest = pod2.Spec.InitContainers[0].Resources.Requests + if requestValue := defaultRequest[v1.ResourceCPU]; requestValue.String() != "100m" { + t.Errorf("Expected request cpu: %s, got: %s", "100m", requestValue.String()) + } + if requestValue := defaultRequest[v1.ResourceMemory]; requestValue.String() != "0" { + t.Errorf("Expected request memory: %s, got: %s", "0", requestValue.String()) + } + + // verify we do nothing if no limits are specified + s = v1.PodSpec{} + s.Containers = []v1.Container{{}} + s.InitContainers = []v1.Container{{}} + pod = &v1.Pod{ + Spec: s, + } + output = roundTrip(t, runtime.Object(pod)) + pod2 = output.(*v1.Pod) + defaultRequest = pod2.Spec.Containers[0].Resources.Requests + if requestValue := defaultRequest[v1.ResourceCPU]; requestValue.String() != "0" { + t.Errorf("Expected 0 request value, got: %s", requestValue.String()) + } + defaultRequest = pod2.Spec.InitContainers[0].Resources.Requests + if requestValue := defaultRequest[v1.ResourceCPU]; requestValue.String() != "0" { + t.Errorf("Expected 0 request value, got: %s", requestValue.String()) + } +} + +func TestDefaultRequestIsNotSetForReplicationController(t *testing.T) { + s := v1.PodSpec{} + s.Containers = []v1.Container{ + { + Resources: v1.ResourceRequirements{ + Limits: v1.ResourceList{ + v1.ResourceCPU: resource.MustParse("100m"), + }, + }, + }, + } + rc := &v1.ReplicationController{ + Spec: v1.ReplicationControllerSpec{ + Replicas: newInt(3), + Template: &v1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "foo": "bar", + }, + }, + Spec: s, + }, + }, + } + output := roundTrip(t, runtime.Object(rc)) + rc2 := output.(*v1.ReplicationController) + defaultRequest := rc2.Spec.Template.Spec.Containers[0].Resources.Requests + requestValue := defaultRequest[v1.ResourceCPU] + if requestValue.String() != "0" { + t.Errorf("Expected 0 request value, got: %s", requestValue.String()) + } +} + +func TestSetDefaultLimitRangeItem(t *testing.T) { + limitRange := &v1.LimitRange{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-defaults", + }, + Spec: v1.LimitRangeSpec{ + Limits: []v1.LimitRangeItem{{ + Type: v1.LimitTypeContainer, + Max: v1.ResourceList{ + v1.ResourceCPU: resource.MustParse("100m"), + }, + Min: v1.ResourceList{ + v1.ResourceMemory: resource.MustParse("100Mi"), + }, + Default: v1.ResourceList{}, + DefaultRequest: v1.ResourceList{}, + }}, + }, + } + + output := roundTrip(t, runtime.Object(limitRange)) + limitRange2 := output.(*v1.LimitRange) + defaultLimit := limitRange2.Spec.Limits[0].Default + defaultRequest := limitRange2.Spec.Limits[0].DefaultRequest + + // verify that default cpu was set to the max + defaultValue := defaultLimit[v1.ResourceCPU] + if defaultValue.String() != "100m" { + t.Errorf("Expected default cpu: %s, got: %s", "100m", defaultValue.String()) + } + // verify that default request was set to the limit + requestValue := defaultRequest[v1.ResourceCPU] + if requestValue.String() != "100m" { + t.Errorf("Expected request cpu: %s, got: %s", "100m", requestValue.String()) + } + // verify that if a min is provided, it will be the default if no limit is specified + requestMinValue := defaultRequest[v1.ResourceMemory] + if requestMinValue.String() != "100Mi" { + t.Errorf("Expected request memory: %s, got: %s", "100Mi", requestMinValue.String()) + } +} + +func TestSetDefaultProbe(t *testing.T) { + originalProbe := v1.Probe{} + expectedProbe := v1.Probe{ + InitialDelaySeconds: 0, + TimeoutSeconds: 1, + PeriodSeconds: 10, + SuccessThreshold: 1, + FailureThreshold: 3, + } + + pod := &v1.Pod{ + Spec: v1.PodSpec{ + Containers: []v1.Container{{LivenessProbe: &originalProbe}}, + }, + } + + output := roundTrip(t, runtime.Object(pod)).(*v1.Pod) + actualProbe := *output.Spec.Containers[0].LivenessProbe + if actualProbe != expectedProbe { + t.Errorf("Expected probe: %+v\ngot: %+v\n", expectedProbe, actualProbe) + } +} + +func TestSetDefaultSchedulerName(t *testing.T) { + pod := &v1.Pod{} + + output := roundTrip(t, runtime.Object(pod)).(*v1.Pod) + if output.Spec.SchedulerName != v1.DefaultSchedulerName { + t.Errorf("Expected scheduler name: %+v\ngot: %+v\n", v1.DefaultSchedulerName, output.Spec.SchedulerName) + } +} + +func TestSetDefaultHostPathVolumeSource(t *testing.T) { + s := v1.PodSpec{} + s.Volumes = []v1.Volume{ + { + VolumeSource: v1.VolumeSource{ + HostPath: &v1.HostPathVolumeSource{Path: "foo"}, + }, + }, + } + pod := &v1.Pod{ + Spec: s, + } + output := roundTrip(t, runtime.Object(pod)) + pod2 := output.(*v1.Pod) + defaultType := pod2.Spec.Volumes[0].VolumeSource.HostPath.Type + expectedType := v1.HostPathUnset + + if defaultType == nil || *defaultType != expectedType { + t.Errorf("Expected v1.HostPathVolumeSource default type %v, got %v", expectedType, defaultType) + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/doc.go b/vendor/k8s.io/kubernetes/pkg/api/v1/doc.go index 09b5d461d..0f1e0d495 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/v1/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/api/v1/doc.go @@ -20,4 +20,4 @@ limitations under the License. // +k8s:defaulter-gen-input=../../../vendor/k8s.io/api/core/v1 // Package v1 is the v1 version of the API. -package v1 +package v1 // import "k8s.io/kubernetes/pkg/api/v1" diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/helper/helpers_test.go b/vendor/k8s.io/kubernetes/pkg/api/v1/helper/helpers_test.go new file mode 100644 index 000000000..3b8e5f878 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/api/v1/helper/helpers_test.go @@ -0,0 +1,590 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package helper + +import ( + "fmt" + "reflect" + "testing" + + "k8s.io/api/core/v1" + apiequality "k8s.io/apimachinery/pkg/api/equality" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" +) + +func TestIsOpaqueIntResourceName(t *testing.T) { // resourceName input with the correct OpaqueIntResourceName prefix ("pod.alpha.kubernetes.io/opaque-int-resource-") should pass + testCases := []struct { + resourceName v1.ResourceName + expectVal bool + }{ + { + resourceName: "pod.alpha.kubernetes.io/opaque-int-resource-foo", + expectVal: true, // resourceName should pass because the resourceName has the correct prefix. + }, + { + resourceName: "foo", + expectVal: false, // resourceName should fail because the resourceName has the wrong prefix. + }, + { + resourceName: "", + expectVal: false, // resourceName should fail, empty resourceName. + }, + } + + for _, tc := range testCases { + tc := tc + t.Run(fmt.Sprintf("resourceName input=%s, expected value=%v", tc.resourceName, tc.expectVal), func(t *testing.T) { + t.Parallel() + v := IsOpaqueIntResourceName(tc.resourceName) + if v != tc.expectVal { + t.Errorf("Got %v but expected %v", v, tc.expectVal) + } + }) + } +} + +func TestOpaqueIntResourceName(t *testing.T) { // each output should have the correct appended prefix ("pod.alpha.kubernetes.io/opaque-int-resource-") for opaque counted resources. + testCases := []struct { + name string + expectVal v1.ResourceName + }{ + { + name: "foo", + expectVal: "pod.alpha.kubernetes.io/opaque-int-resource-foo", // append prefix to input string foo + }, + { + name: "", + expectVal: "pod.alpha.kubernetes.io/opaque-int-resource-", // append prefix to input empty string + }, + } + + for _, tc := range testCases { + tc := tc + t.Run(fmt.Sprintf("name input=%s, expected value=%s", tc.name, tc.expectVal), func(t *testing.T) { + t.Parallel() + v := OpaqueIntResourceName(tc.name) + if v != tc.expectVal { + t.Errorf("Got %v but expected %v", v, tc.expectVal) + } + }) + } +} + +func TestAddToNodeAddresses(t *testing.T) { + testCases := []struct { + existing []v1.NodeAddress + toAdd []v1.NodeAddress + expected []v1.NodeAddress + }{ + { + existing: []v1.NodeAddress{}, + toAdd: []v1.NodeAddress{}, + expected: []v1.NodeAddress{}, + }, + { + existing: []v1.NodeAddress{}, + toAdd: []v1.NodeAddress{ + {Type: v1.NodeExternalIP, Address: "1.1.1.1"}, + {Type: v1.NodeHostName, Address: "localhost"}, + }, + expected: []v1.NodeAddress{ + {Type: v1.NodeExternalIP, Address: "1.1.1.1"}, + {Type: v1.NodeHostName, Address: "localhost"}, + }, + }, + { + existing: []v1.NodeAddress{}, + toAdd: []v1.NodeAddress{ + {Type: v1.NodeExternalIP, Address: "1.1.1.1"}, + {Type: v1.NodeExternalIP, Address: "1.1.1.1"}, + }, + expected: []v1.NodeAddress{ + {Type: v1.NodeExternalIP, Address: "1.1.1.1"}, + }, + }, + { + existing: []v1.NodeAddress{ + {Type: v1.NodeExternalIP, Address: "1.1.1.1"}, + {Type: v1.NodeInternalIP, Address: "10.1.1.1"}, + }, + toAdd: []v1.NodeAddress{ + {Type: v1.NodeExternalIP, Address: "1.1.1.1"}, + {Type: v1.NodeHostName, Address: "localhost"}, + }, + expected: []v1.NodeAddress{ + {Type: v1.NodeExternalIP, Address: "1.1.1.1"}, + {Type: v1.NodeInternalIP, Address: "10.1.1.1"}, + {Type: v1.NodeHostName, Address: "localhost"}, + }, + }, + } + + for i, tc := range testCases { + AddToNodeAddresses(&tc.existing, tc.toAdd...) + if !apiequality.Semantic.DeepEqual(tc.expected, tc.existing) { + t.Errorf("case[%d], expected: %v, got: %v", i, tc.expected, tc.existing) + } + } +} + +func TestGetAccessModesFromString(t *testing.T) { + modes := GetAccessModesFromString("ROX") + if !containsAccessMode(modes, v1.ReadOnlyMany) { + t.Errorf("Expected mode %s, but got %+v", v1.ReadOnlyMany, modes) + } + + modes = GetAccessModesFromString("ROX,RWX") + if !containsAccessMode(modes, v1.ReadOnlyMany) { + t.Errorf("Expected mode %s, but got %+v", v1.ReadOnlyMany, modes) + } + if !containsAccessMode(modes, v1.ReadWriteMany) { + t.Errorf("Expected mode %s, but got %+v", v1.ReadWriteMany, modes) + } + + modes = GetAccessModesFromString("RWO,ROX,RWX") + if !containsAccessMode(modes, v1.ReadOnlyMany) { + t.Errorf("Expected mode %s, but got %+v", v1.ReadOnlyMany, modes) + } + if !containsAccessMode(modes, v1.ReadWriteMany) { + t.Errorf("Expected mode %s, but got %+v", v1.ReadWriteMany, modes) + } +} + +func TestRemoveDuplicateAccessModes(t *testing.T) { + modes := []v1.PersistentVolumeAccessMode{ + v1.ReadWriteOnce, v1.ReadOnlyMany, v1.ReadOnlyMany, v1.ReadOnlyMany, + } + modes = removeDuplicateAccessModes(modes) + if len(modes) != 2 { + t.Errorf("Expected 2 distinct modes in set but found %v", len(modes)) + } +} + +func TestNodeSelectorRequirementsAsSelector(t *testing.T) { + matchExpressions := []v1.NodeSelectorRequirement{{ + Key: "foo", + Operator: v1.NodeSelectorOpIn, + Values: []string{"bar", "baz"}, + }} + mustParse := func(s string) labels.Selector { + out, e := labels.Parse(s) + if e != nil { + panic(e) + } + return out + } + tc := []struct { + in []v1.NodeSelectorRequirement + out labels.Selector + expectErr bool + }{ + {in: nil, out: labels.Nothing()}, + {in: []v1.NodeSelectorRequirement{}, out: labels.Nothing()}, + { + in: matchExpressions, + out: mustParse("foo in (baz,bar)"), + }, + { + in: []v1.NodeSelectorRequirement{{ + Key: "foo", + Operator: v1.NodeSelectorOpExists, + Values: []string{"bar", "baz"}, + }}, + expectErr: true, + }, + { + in: []v1.NodeSelectorRequirement{{ + Key: "foo", + Operator: v1.NodeSelectorOpGt, + Values: []string{"1"}, + }}, + out: mustParse("foo>1"), + }, + { + in: []v1.NodeSelectorRequirement{{ + Key: "bar", + Operator: v1.NodeSelectorOpLt, + Values: []string{"7"}, + }}, + out: mustParse("bar<7"), + }, + } + + for i, tc := range tc { + out, err := NodeSelectorRequirementsAsSelector(tc.in) + if err == nil && tc.expectErr { + t.Errorf("[%v]expected error but got none.", i) + } + if err != nil && !tc.expectErr { + t.Errorf("[%v]did not expect error but got: %v", i, err) + } + if !reflect.DeepEqual(out, tc.out) { + t.Errorf("[%v]expected:\n\t%+v\nbut got:\n\t%+v", i, tc.out, out) + } + } +} + +func TestTolerationsTolerateTaintsWithFilter(t *testing.T) { + testCases := []struct { + description string + tolerations []v1.Toleration + taints []v1.Taint + applyFilter taintsFilterFunc + expectTolerated bool + }{ + { + description: "empty tolerations tolerate empty taints", + tolerations: []v1.Toleration{}, + taints: []v1.Taint{}, + applyFilter: func(t *v1.Taint) bool { return true }, + expectTolerated: true, + }, + { + description: "non-empty tolerations tolerate empty taints", + tolerations: []v1.Toleration{ + { + Key: "foo", + Operator: "Exists", + Effect: v1.TaintEffectNoSchedule, + }, + }, + taints: []v1.Taint{}, + applyFilter: func(t *v1.Taint) bool { return true }, + expectTolerated: true, + }, + { + description: "tolerations match all taints, expect tolerated", + tolerations: []v1.Toleration{ + { + Key: "foo", + Operator: "Exists", + Effect: v1.TaintEffectNoSchedule, + }, + }, + taints: []v1.Taint{ + { + Key: "foo", + Effect: v1.TaintEffectNoSchedule, + }, + }, + applyFilter: func(t *v1.Taint) bool { return true }, + expectTolerated: true, + }, + { + description: "tolerations don't match taints, but no taints apply to the filter, expect tolerated", + tolerations: []v1.Toleration{ + { + Key: "foo", + Operator: "Exists", + Effect: v1.TaintEffectNoSchedule, + }, + }, + taints: []v1.Taint{ + { + Key: "bar", + Effect: v1.TaintEffectNoSchedule, + }, + }, + applyFilter: func(t *v1.Taint) bool { return false }, + expectTolerated: true, + }, + { + description: "no filterFunc indicated, means all taints apply to the filter, tolerations don't match taints, expect untolerated", + tolerations: []v1.Toleration{ + { + Key: "foo", + Operator: "Exists", + Effect: v1.TaintEffectNoSchedule, + }, + }, + taints: []v1.Taint{ + { + Key: "bar", + Effect: v1.TaintEffectNoSchedule, + }, + }, + applyFilter: nil, + expectTolerated: false, + }, + { + description: "tolerations match taints, expect tolerated", + tolerations: []v1.Toleration{ + { + Key: "foo", + Operator: "Exists", + Effect: v1.TaintEffectNoExecute, + }, + }, + taints: []v1.Taint{ + { + Key: "foo", + Effect: v1.TaintEffectNoExecute, + }, + { + Key: "bar", + Effect: v1.TaintEffectNoSchedule, + }, + }, + applyFilter: func(t *v1.Taint) bool { return t.Effect == v1.TaintEffectNoExecute }, + expectTolerated: true, + }, + } + + for _, tc := range testCases { + if tc.expectTolerated != TolerationsTolerateTaintsWithFilter(tc.tolerations, tc.taints, tc.applyFilter) { + filteredTaints := []v1.Taint{} + for _, taint := range tc.taints { + if tc.applyFilter != nil && !tc.applyFilter(&taint) { + continue + } + filteredTaints = append(filteredTaints, taint) + } + t.Errorf("[%s] expect tolerations %+v tolerate filtered taints %+v in taints %+v", tc.description, tc.tolerations, filteredTaints, tc.taints) + } + } +} + +func TestGetAvoidPodsFromNode(t *testing.T) { + controllerFlag := true + testCases := []struct { + node *v1.Node + expectValue v1.AvoidPods + expectErr bool + }{ + { + node: &v1.Node{}, + expectValue: v1.AvoidPods{}, + expectErr: false, + }, + { + node: &v1.Node{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + v1.PreferAvoidPodsAnnotationKey: ` + { + "preferAvoidPods": [ + { + "podSignature": { + "podController": { + "apiVersion": "v1", + "kind": "ReplicationController", + "name": "foo", + "uid": "abcdef123456", + "controller": true + } + }, + "reason": "some reason", + "message": "some message" + } + ] + }`, + }, + }, + }, + expectValue: v1.AvoidPods{ + PreferAvoidPods: []v1.PreferAvoidPodsEntry{ + { + PodSignature: v1.PodSignature{ + PodController: &metav1.OwnerReference{ + APIVersion: "v1", + Kind: "ReplicationController", + Name: "foo", + UID: "abcdef123456", + Controller: &controllerFlag, + }, + }, + Reason: "some reason", + Message: "some message", + }, + }, + }, + expectErr: false, + }, + { + node: &v1.Node{ + // Missing end symbol of "podController" and "podSignature" + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + v1.PreferAvoidPodsAnnotationKey: ` + { + "preferAvoidPods": [ + { + "podSignature": { + "podController": { + "kind": "ReplicationController", + "apiVersion": "v1" + "reason": "some reason", + "message": "some message" + } + ] + }`, + }, + }, + }, + expectValue: v1.AvoidPods{}, + expectErr: true, + }, + } + + for i, tc := range testCases { + v, err := GetAvoidPodsFromNodeAnnotations(tc.node.Annotations) + if err == nil && tc.expectErr { + t.Errorf("[%v]expected error but got none.", i) + } + if err != nil && !tc.expectErr { + t.Errorf("[%v]did not expect error but got: %v", i, err) + } + if !reflect.DeepEqual(tc.expectValue, v) { + t.Errorf("[%v]expect value %v but got %v with %v", i, tc.expectValue, v, v.PreferAvoidPods[0].PodSignature.PodController.Controller) + } + } +} + +func TestSysctlsFromPodAnnotation(t *testing.T) { + type Test struct { + annotation string + expectValue []v1.Sysctl + expectErr bool + } + for i, test := range []Test{ + { + annotation: "", + expectValue: nil, + }, + { + annotation: "foo.bar", + expectErr: true, + }, + { + annotation: "=123", + expectErr: true, + }, + { + annotation: "foo.bar=", + expectValue: []v1.Sysctl{{Name: "foo.bar", Value: ""}}, + }, + { + annotation: "foo.bar=42", + expectValue: []v1.Sysctl{{Name: "foo.bar", Value: "42"}}, + }, + { + annotation: "foo.bar=42,", + expectErr: true, + }, + { + annotation: "foo.bar=42,abc.def=1", + expectValue: []v1.Sysctl{{Name: "foo.bar", Value: "42"}, {Name: "abc.def", Value: "1"}}, + }, + } { + sysctls, err := SysctlsFromPodAnnotation(test.annotation) + if test.expectErr && err == nil { + t.Errorf("[%v]expected error but got none", i) + } else if !test.expectErr && err != nil { + t.Errorf("[%v]did not expect error but got: %v", i, err) + } else if !reflect.DeepEqual(sysctls, test.expectValue) { + t.Errorf("[%v]expect value %v but got %v", i, test.expectValue, sysctls) + } + } +} + +// TODO: remove when alpha support for topology constraints is removed +func TestGetNodeAffinityFromAnnotations(t *testing.T) { + testCases := []struct { + annotations map[string]string + expectErr bool + }{ + { + annotations: nil, + expectErr: false, + }, + { + annotations: map[string]string{}, + expectErr: false, + }, + { + annotations: map[string]string{ + v1.AlphaStorageNodeAffinityAnnotation: `{ + "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [ + { "matchExpressions": [ + { "key": "test-key1", + "operator": "In", + "values": ["test-value1", "test-value2"] + }, + { "key": "test-key2", + "operator": "In", + "values": ["test-value1", "test-value2"] + } + ]} + ]} + }`, + }, + expectErr: false, + }, + { + annotations: map[string]string{ + v1.AlphaStorageNodeAffinityAnnotation: `[{ + "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [ + { "matchExpressions": [ + { "key": "test-key1", + "operator": "In", + "values": ["test-value1", "test-value2"] + }, + { "key": "test-key2", + "operator": "In", + "values": ["test-value1", "test-value2"] + } + ]} + ]} + }]`, + }, + expectErr: true, + }, + { + annotations: map[string]string{ + v1.AlphaStorageNodeAffinityAnnotation: `{ + "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": + "matchExpressions": [ + { "key": "test-key1", + "operator": "In", + "values": ["test-value1", "test-value2"] + }, + { "key": "test-key2", + "operator": "In", + "values": ["test-value1", "test-value2"] + } + ]} + } + }`, + }, + expectErr: true, + }, + } + + for i, tc := range testCases { + _, err := GetStorageNodeAffinityFromAnnotation(tc.annotations) + if err == nil && tc.expectErr { + t.Errorf("[%v]expected error but got none.", i) + } + if err != nil && !tc.expectErr { + t.Errorf("[%v]did not expect error but got: %v", i, err) + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/pod/util_test.go b/vendor/k8s.io/kubernetes/pkg/api/v1/pod/util_test.go new file mode 100644 index 000000000..e97942442 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/api/v1/pod/util_test.go @@ -0,0 +1,406 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package pod + +import ( + "reflect" + "strings" + "testing" + "time" + + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/intstr" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/util/validation/field" +) + +func TestFindPort(t *testing.T) { + testCases := []struct { + name string + containers []v1.Container + port intstr.IntOrString + expected int + pass bool + }{{ + name: "valid int, no ports", + containers: []v1.Container{{}}, + port: intstr.FromInt(93), + expected: 93, + pass: true, + }, { + name: "valid int, with ports", + containers: []v1.Container{{Ports: []v1.ContainerPort{{ + Name: "", + ContainerPort: 11, + Protocol: "TCP", + }, { + Name: "p", + ContainerPort: 22, + Protocol: "TCP", + }}}}, + port: intstr.FromInt(93), + expected: 93, + pass: true, + }, { + name: "valid str, no ports", + containers: []v1.Container{{}}, + port: intstr.FromString("p"), + expected: 0, + pass: false, + }, { + name: "valid str, one ctr with ports", + containers: []v1.Container{{Ports: []v1.ContainerPort{{ + Name: "", + ContainerPort: 11, + Protocol: "UDP", + }, { + Name: "p", + ContainerPort: 22, + Protocol: "TCP", + }, { + Name: "q", + ContainerPort: 33, + Protocol: "TCP", + }}}}, + port: intstr.FromString("q"), + expected: 33, + pass: true, + }, { + name: "valid str, two ctr with ports", + containers: []v1.Container{{}, {Ports: []v1.ContainerPort{{ + Name: "", + ContainerPort: 11, + Protocol: "UDP", + }, { + Name: "p", + ContainerPort: 22, + Protocol: "TCP", + }, { + Name: "q", + ContainerPort: 33, + Protocol: "TCP", + }}}}, + port: intstr.FromString("q"), + expected: 33, + pass: true, + }, { + name: "valid str, two ctr with same port", + containers: []v1.Container{{}, {Ports: []v1.ContainerPort{{ + Name: "", + ContainerPort: 11, + Protocol: "UDP", + }, { + Name: "p", + ContainerPort: 22, + Protocol: "TCP", + }, { + Name: "q", + ContainerPort: 22, + Protocol: "TCP", + }}}}, + port: intstr.FromString("q"), + expected: 22, + pass: true, + }, { + name: "valid str, invalid protocol", + containers: []v1.Container{{}, {Ports: []v1.ContainerPort{{ + Name: "a", + ContainerPort: 11, + Protocol: "snmp", + }, + }}}, + port: intstr.FromString("a"), + expected: 0, + pass: false, + }, { + name: "valid hostPort", + containers: []v1.Container{{}, {Ports: []v1.ContainerPort{{ + Name: "a", + ContainerPort: 11, + HostPort: 81, + Protocol: "TCP", + }, + }}}, + port: intstr.FromString("a"), + expected: 11, + pass: true, + }, + { + name: "invalid hostPort", + containers: []v1.Container{{}, {Ports: []v1.ContainerPort{{ + Name: "a", + ContainerPort: 11, + HostPort: -1, + Protocol: "TCP", + }, + }}}, + port: intstr.FromString("a"), + expected: 11, + pass: true, + //this should fail but passes. + }, + { + name: "invalid ContainerPort", + containers: []v1.Container{{}, {Ports: []v1.ContainerPort{{ + Name: "a", + ContainerPort: -1, + Protocol: "TCP", + }, + }}}, + port: intstr.FromString("a"), + expected: -1, + pass: true, + //this should fail but passes + }, + { + name: "HostIP Address", + containers: []v1.Container{{}, {Ports: []v1.ContainerPort{{ + Name: "a", + ContainerPort: 11, + HostIP: "192.168.1.1", + Protocol: "TCP", + }, + }}}, + port: intstr.FromString("a"), + expected: 11, + pass: true, + }, + } + + for _, tc := range testCases { + port, err := FindPort(&v1.Pod{Spec: v1.PodSpec{Containers: tc.containers}}, + &v1.ServicePort{Protocol: "TCP", TargetPort: tc.port}) + if err != nil && tc.pass { + t.Errorf("unexpected error for %s: %v", tc.name, err) + } + if err == nil && !tc.pass { + t.Errorf("unexpected non-error for %s: %d", tc.name, port) + } + if port != tc.expected { + t.Errorf("wrong result for %s: expected %d, got %d", tc.name, tc.expected, port) + } + } +} + +func TestPodSecrets(t *testing.T) { + // Stub containing all possible secret references in a pod. + // The names of the referenced secrets match struct paths detected by reflection. + pod := &v1.Pod{ + Spec: v1.PodSpec{ + Containers: []v1.Container{{ + EnvFrom: []v1.EnvFromSource{{ + SecretRef: &v1.SecretEnvSource{ + LocalObjectReference: v1.LocalObjectReference{ + Name: "Spec.Containers[*].EnvFrom[*].SecretRef"}}}}, + Env: []v1.EnvVar{{ + ValueFrom: &v1.EnvVarSource{ + SecretKeyRef: &v1.SecretKeySelector{ + LocalObjectReference: v1.LocalObjectReference{ + Name: "Spec.Containers[*].Env[*].ValueFrom.SecretKeyRef"}}}}}}}, + ImagePullSecrets: []v1.LocalObjectReference{{ + Name: "Spec.ImagePullSecrets"}}, + InitContainers: []v1.Container{{ + EnvFrom: []v1.EnvFromSource{{ + SecretRef: &v1.SecretEnvSource{ + LocalObjectReference: v1.LocalObjectReference{ + Name: "Spec.InitContainers[*].EnvFrom[*].SecretRef"}}}}, + Env: []v1.EnvVar{{ + ValueFrom: &v1.EnvVarSource{ + SecretKeyRef: &v1.SecretKeySelector{ + LocalObjectReference: v1.LocalObjectReference{ + Name: "Spec.InitContainers[*].Env[*].ValueFrom.SecretKeyRef"}}}}}}}, + Volumes: []v1.Volume{{ + VolumeSource: v1.VolumeSource{ + AzureFile: &v1.AzureFileVolumeSource{ + SecretName: "Spec.Volumes[*].VolumeSource.AzureFile.SecretName"}}}, { + VolumeSource: v1.VolumeSource{ + CephFS: &v1.CephFSVolumeSource{ + SecretRef: &v1.LocalObjectReference{ + Name: "Spec.Volumes[*].VolumeSource.CephFS.SecretRef"}}}}, { + VolumeSource: v1.VolumeSource{ + FlexVolume: &v1.FlexVolumeSource{ + SecretRef: &v1.LocalObjectReference{ + Name: "Spec.Volumes[*].VolumeSource.FlexVolume.SecretRef"}}}}, { + VolumeSource: v1.VolumeSource{ + Projected: &v1.ProjectedVolumeSource{ + Sources: []v1.VolumeProjection{{ + Secret: &v1.SecretProjection{ + LocalObjectReference: v1.LocalObjectReference{ + Name: "Spec.Volumes[*].VolumeSource.Projected.Sources[*].Secret"}}}}}}}, { + VolumeSource: v1.VolumeSource{ + RBD: &v1.RBDVolumeSource{ + SecretRef: &v1.LocalObjectReference{ + Name: "Spec.Volumes[*].VolumeSource.RBD.SecretRef"}}}}, { + VolumeSource: v1.VolumeSource{ + Secret: &v1.SecretVolumeSource{ + SecretName: "Spec.Volumes[*].VolumeSource.Secret.SecretName"}}}, { + VolumeSource: v1.VolumeSource{ + Secret: &v1.SecretVolumeSource{ + SecretName: "Spec.Volumes[*].VolumeSource.Secret"}}}, { + VolumeSource: v1.VolumeSource{ + ScaleIO: &v1.ScaleIOVolumeSource{ + SecretRef: &v1.LocalObjectReference{ + Name: "Spec.Volumes[*].VolumeSource.ScaleIO.SecretRef"}}}}, { + VolumeSource: v1.VolumeSource{ + ISCSI: &v1.ISCSIVolumeSource{ + SecretRef: &v1.LocalObjectReference{ + Name: "Spec.Volumes[*].VolumeSource.ISCSI.SecretRef"}}}}, { + VolumeSource: v1.VolumeSource{ + StorageOS: &v1.StorageOSVolumeSource{ + SecretRef: &v1.LocalObjectReference{ + Name: "Spec.Volumes[*].VolumeSource.StorageOS.SecretRef"}}}}}, + }, + } + extractedNames := sets.NewString() + VisitPodSecretNames(pod, func(name string) bool { + extractedNames.Insert(name) + return true + }) + + // excludedSecretPaths holds struct paths to fields with "secret" in the name that are not actually references to secret API objects + excludedSecretPaths := sets.NewString( + "Spec.Volumes[*].VolumeSource.CephFS.SecretFile", + ) + // expectedSecretPaths holds struct paths to fields with "secret" in the name that are references to secret API objects. + // every path here should be represented as an example in the Pod stub above, with the secret name set to the path. + expectedSecretPaths := sets.NewString( + "Spec.Containers[*].EnvFrom[*].SecretRef", + "Spec.Containers[*].Env[*].ValueFrom.SecretKeyRef", + "Spec.ImagePullSecrets", + "Spec.InitContainers[*].EnvFrom[*].SecretRef", + "Spec.InitContainers[*].Env[*].ValueFrom.SecretKeyRef", + "Spec.Volumes[*].VolumeSource.AzureFile.SecretName", + "Spec.Volumes[*].VolumeSource.CephFS.SecretRef", + "Spec.Volumes[*].VolumeSource.FlexVolume.SecretRef", + "Spec.Volumes[*].VolumeSource.Projected.Sources[*].Secret", + "Spec.Volumes[*].VolumeSource.RBD.SecretRef", + "Spec.Volumes[*].VolumeSource.Secret", + "Spec.Volumes[*].VolumeSource.Secret.SecretName", + "Spec.Volumes[*].VolumeSource.ScaleIO.SecretRef", + "Spec.Volumes[*].VolumeSource.ISCSI.SecretRef", + "Spec.Volumes[*].VolumeSource.StorageOS.SecretRef", + ) + secretPaths := collectSecretPaths(t, nil, "", reflect.TypeOf(&v1.Pod{})) + secretPaths = secretPaths.Difference(excludedSecretPaths) + if missingPaths := expectedSecretPaths.Difference(secretPaths); len(missingPaths) > 0 { + t.Logf("Missing expected secret paths:\n%s", strings.Join(missingPaths.List(), "\n")) + t.Error("Missing expected secret paths. Verify VisitPodSecretNames() is correctly finding the missing paths, then correct expectedSecretPaths") + } + if extraPaths := secretPaths.Difference(expectedSecretPaths); len(extraPaths) > 0 { + t.Logf("Extra secret paths:\n%s", strings.Join(extraPaths.List(), "\n")) + t.Error("Extra fields with 'secret' in the name found. Verify VisitPodSecretNames() is including these fields if appropriate, then correct expectedSecretPaths") + } + + if missingNames := expectedSecretPaths.Difference(extractedNames); len(missingNames) > 0 { + t.Logf("Missing expected secret names:\n%s", strings.Join(missingNames.List(), "\n")) + t.Error("Missing expected secret names. Verify the pod stub above includes these references, then verify VisitPodSecretNames() is correctly finding the missing names") + } + if extraNames := extractedNames.Difference(expectedSecretPaths); len(extraNames) > 0 { + t.Logf("Extra secret names:\n%s", strings.Join(extraNames.List(), "\n")) + t.Error("Extra secret names extracted. Verify VisitPodSecretNames() is correctly extracting secret names") + } +} + +// collectSecretPaths traverses the object, computing all the struct paths that lead to fields with "secret" in the name. +func collectSecretPaths(t *testing.T, path *field.Path, name string, tp reflect.Type) sets.String { + secretPaths := sets.NewString() + + if tp.Kind() == reflect.Ptr { + secretPaths.Insert(collectSecretPaths(t, path, name, tp.Elem()).List()...) + return secretPaths + } + + if strings.Contains(strings.ToLower(name), "secret") { + secretPaths.Insert(path.String()) + } + + switch tp.Kind() { + case reflect.Ptr: + secretPaths.Insert(collectSecretPaths(t, path, name, tp.Elem()).List()...) + case reflect.Struct: + for i := 0; i < tp.NumField(); i++ { + field := tp.Field(i) + secretPaths.Insert(collectSecretPaths(t, path.Child(field.Name), field.Name, field.Type).List()...) + } + case reflect.Interface: + t.Errorf("cannot find secret fields in interface{} field %s", path.String()) + case reflect.Map: + secretPaths.Insert(collectSecretPaths(t, path.Key("*"), "", tp.Elem()).List()...) + case reflect.Slice: + secretPaths.Insert(collectSecretPaths(t, path.Key("*"), "", tp.Elem()).List()...) + default: + // all primitive types + } + + return secretPaths +} + +func newPod(now metav1.Time, ready bool, beforeSec int) *v1.Pod { + conditionStatus := v1.ConditionFalse + if ready { + conditionStatus = v1.ConditionTrue + } + return &v1.Pod{ + Status: v1.PodStatus{ + Conditions: []v1.PodCondition{ + { + Type: v1.PodReady, + LastTransitionTime: metav1.NewTime(now.Time.Add(-1 * time.Duration(beforeSec) * time.Second)), + Status: conditionStatus, + }, + }, + }, + } +} + +func TestIsPodAvailable(t *testing.T) { + now := metav1.Now() + tests := []struct { + pod *v1.Pod + minReadySeconds int32 + expected bool + }{ + { + pod: newPod(now, false, 0), + minReadySeconds: 0, + expected: false, + }, + { + pod: newPod(now, true, 0), + minReadySeconds: 1, + expected: false, + }, + { + pod: newPod(now, true, 0), + minReadySeconds: 0, + expected: true, + }, + { + pod: newPod(now, true, 51), + minReadySeconds: 50, + expected: true, + }, + } + + for i, test := range tests { + isAvailable := IsPodAvailable(test.pod, test.minReadySeconds, now) + if isAvailable != test.expected { + t.Errorf("[tc #%d] expected available pod: %t, got: %t", i, test.expected, isAvailable) + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/service/util.go b/vendor/k8s.io/kubernetes/pkg/api/v1/service/util.go deleted file mode 100644 index 4cb453cf3..000000000 --- a/vendor/k8s.io/kubernetes/pkg/api/v1/service/util.go +++ /dev/null @@ -1,97 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package service - -import ( - "fmt" - "strings" - - "k8s.io/api/core/v1" - netsets "k8s.io/kubernetes/pkg/util/net/sets" -) - -const ( - defaultLoadBalancerSourceRanges = "0.0.0.0/0" -) - -// IsAllowAll checks whether the netsets.IPNet allows traffic from 0.0.0.0/0 -func IsAllowAll(ipnets netsets.IPNet) bool { - for _, s := range ipnets.StringSlice() { - if s == "0.0.0.0/0" { - return true - } - } - return false -} - -// GetLoadBalancerSourceRanges first try to parse and verify LoadBalancerSourceRanges field from a service. -// If the field is not specified, turn to parse and verify the AnnotationLoadBalancerSourceRangesKey annotation from a service, -// extracting the source ranges to allow, and if not present returns a default (allow-all) value. -func GetLoadBalancerSourceRanges(service *v1.Service) (netsets.IPNet, error) { - var ipnets netsets.IPNet - var err error - // if SourceRange field is specified, ignore sourceRange annotation - if len(service.Spec.LoadBalancerSourceRanges) > 0 { - specs := service.Spec.LoadBalancerSourceRanges - ipnets, err = netsets.ParseIPNets(specs...) - - if err != nil { - return nil, fmt.Errorf("service.Spec.LoadBalancerSourceRanges: %v is not valid. Expecting a list of IP ranges. For example, 10.0.0.0/24. Error msg: %v", specs, err) - } - } else { - val := service.Annotations[v1.AnnotationLoadBalancerSourceRangesKey] - val = strings.TrimSpace(val) - if val == "" { - val = defaultLoadBalancerSourceRanges - } - specs := strings.Split(val, ",") - ipnets, err = netsets.ParseIPNets(specs...) - if err != nil { - return nil, fmt.Errorf("%s: %s is not valid. Expecting a comma-separated list of source IP ranges. For example, 10.0.0.0/24,192.168.2.0/24", v1.AnnotationLoadBalancerSourceRangesKey, val) - } - } - return ipnets, nil -} - -// RequestsOnlyLocalTraffic checks if service requests OnlyLocal traffic. -func RequestsOnlyLocalTraffic(service *v1.Service) bool { - if service.Spec.Type != v1.ServiceTypeLoadBalancer && - service.Spec.Type != v1.ServiceTypeNodePort { - return false - } - return service.Spec.ExternalTrafficPolicy == v1.ServiceExternalTrafficPolicyTypeLocal -} - -// NeedsHealthCheck checks if service needs health check. -func NeedsHealthCheck(service *v1.Service) bool { - if service.Spec.Type != v1.ServiceTypeLoadBalancer { - return false - } - return RequestsOnlyLocalTraffic(service) -} - -// GetServiceHealthCheckPathPort returns the path and nodePort programmed into the Cloud LB Health Check -func GetServiceHealthCheckPathPort(service *v1.Service) (string, int32) { - if !NeedsHealthCheck(service) { - return "", 0 - } - port := service.Spec.HealthCheckNodePort - if port == 0 { - return "", 0 - } - return "/healthz", port -} diff --git a/vendor/k8s.io/kubernetes/pkg/api/validation/doc.go b/vendor/k8s.io/kubernetes/pkg/api/validation/doc.go index f17a15cf9..30f541de3 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/validation/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/api/validation/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package validation has functions for validating the correctness of api // objects and explaining what is wrong with them when they aren't valid. -package validation +package validation // import "k8s.io/kubernetes/pkg/api/validation" diff --git a/vendor/k8s.io/kubernetes/pkg/api/validation/events_test.go b/vendor/k8s.io/kubernetes/pkg/api/validation/events_test.go new file mode 100644 index 000000000..0df784f6d --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/api/validation/events_test.go @@ -0,0 +1,221 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package validation + +import ( + "testing" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/kubernetes/pkg/api" +) + +func TestValidateEvent(t *testing.T) { + table := []struct { + *api.Event + valid bool + }{ + { + &api.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test1", + Namespace: "foo", + }, + InvolvedObject: api.ObjectReference{ + Namespace: "bar", + Kind: "Pod", + }, + }, + false, + }, { + &api.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test2", + Namespace: "aoeu-_-aoeu", + }, + InvolvedObject: api.ObjectReference{ + Namespace: "aoeu-_-aoeu", + Kind: "Pod", + }, + }, + false, + }, { + &api.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test3", + Namespace: metav1.NamespaceDefault, + }, + InvolvedObject: api.ObjectReference{ + APIVersion: "v1", + Kind: "Node", + }, + }, + true, + }, { + &api.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test4", + Namespace: metav1.NamespaceDefault, + }, + InvolvedObject: api.ObjectReference{ + APIVersion: "v1", + Kind: "Namespace", + }, + }, + true, + }, { + &api.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test5", + Namespace: metav1.NamespaceDefault, + }, + InvolvedObject: api.ObjectReference{ + APIVersion: "extensions/v1beta1", + Kind: "NoKind", + Namespace: metav1.NamespaceDefault, + }, + }, + true, + }, { + &api.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test6", + Namespace: metav1.NamespaceDefault, + }, + InvolvedObject: api.ObjectReference{ + APIVersion: "extensions/v1beta1", + Kind: "Job", + Namespace: "foo", + }, + }, + false, + }, { + &api.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test7", + Namespace: metav1.NamespaceDefault, + }, + InvolvedObject: api.ObjectReference{ + APIVersion: "extensions/v1beta1", + Kind: "Job", + Namespace: metav1.NamespaceDefault, + }, + }, + true, + }, { + &api.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test8", + Namespace: metav1.NamespaceDefault, + }, + InvolvedObject: api.ObjectReference{ + APIVersion: "other/v1beta1", + Kind: "Job", + Namespace: "foo", + }, + }, + false, + }, { + &api.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test9", + Namespace: "foo", + }, + InvolvedObject: api.ObjectReference{ + APIVersion: "other/v1beta1", + Kind: "Job", + Namespace: "foo", + }, + }, + true, + }, { + &api.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test10", + Namespace: metav1.NamespaceDefault, + }, + InvolvedObject: api.ObjectReference{ + APIVersion: "extensions", + Kind: "Job", + Namespace: "foo", + }, + }, + false, + }, { + &api.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test11", + Namespace: "foo", + }, + InvolvedObject: api.ObjectReference{ + // must register in v1beta1 to be true + APIVersion: "extensions/v1beta1", + Kind: "Job", + Namespace: "foo", + }, + }, + true, + }, + { + &api.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test12", + Namespace: "foo", + }, + InvolvedObject: api.ObjectReference{ + APIVersion: "other/v1beta1", + Kind: "FooBar", + Namespace: "bar", + }, + }, + false, + }, + { + &api.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test13", + Namespace: "", + }, + InvolvedObject: api.ObjectReference{ + APIVersion: "other/v1beta1", + Kind: "FooBar", + Namespace: "bar", + }, + }, + false, + }, + { + &api.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test14", + Namespace: "foo", + }, + InvolvedObject: api.ObjectReference{ + APIVersion: "other/v1beta1", + Kind: "FooBar", + Namespace: "", + }, + }, + false, + }, + } + + for _, item := range table { + if e, a := item.valid, len(ValidateEvent(item.Event)) == 0; e != a { + t.Errorf("%v: expected %v, got %v", item.Event.Name, e, a) + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/api/validation/validation_test.go b/vendor/k8s.io/kubernetes/pkg/api/validation/validation_test.go new file mode 100644 index 000000000..1df78dc1d --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/api/validation/validation_test.go @@ -0,0 +1,11120 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package validation + +import ( + "math" + "reflect" + "strings" + "testing" + + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/intstr" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/util/validation" + "k8s.io/apimachinery/pkg/util/validation/field" + utilfeature "k8s.io/apiserver/pkg/util/feature" + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/helper" + _ "k8s.io/kubernetes/pkg/api/testapi" + "k8s.io/kubernetes/pkg/capabilities" + "k8s.io/kubernetes/pkg/security/apparmor" +) + +const ( + dnsLabelErrMsg = "a DNS-1123 label must consist of" + dnsSubdomainLabelErrMsg = "a DNS-1123 subdomain" + envVarNameErrMsg = "a valid environment variable name must consist of" +) + +func newHostPathType(pathType string) *api.HostPathType { + hostPathType := new(api.HostPathType) + *hostPathType = api.HostPathType(pathType) + return hostPathType +} + +func testVolume(name string, namespace string, spec api.PersistentVolumeSpec) *api.PersistentVolume { + objMeta := metav1.ObjectMeta{Name: name} + if namespace != "" { + objMeta.Namespace = namespace + } + + return &api.PersistentVolume{ + ObjectMeta: objMeta, + Spec: spec, + } +} + +func testVolumeWithNodeAffinity(t *testing.T, name string, namespace string, affinity *api.NodeAffinity, spec api.PersistentVolumeSpec) *api.PersistentVolume { + objMeta := metav1.ObjectMeta{Name: name} + if namespace != "" { + objMeta.Namespace = namespace + } + + objMeta.Annotations = map[string]string{} + err := helper.StorageNodeAffinityToAlphaAnnotation(objMeta.Annotations, affinity) + if err != nil { + t.Fatalf("Failed to get node affinity annotation: %v", err) + } + + return &api.PersistentVolume{ + ObjectMeta: objMeta, + Spec: spec, + } +} + +func TestValidatePersistentVolumes(t *testing.T) { + scenarios := map[string]struct { + isExpectedFailure bool + volume *api.PersistentVolume + }{ + "good-volume": { + isExpectedFailure: false, + volume: testVolume("foo", "", api.PersistentVolumeSpec{ + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + AccessModes: []api.PersistentVolumeAccessMode{api.ReadWriteOnce}, + PersistentVolumeSource: api.PersistentVolumeSource{ + HostPath: &api.HostPathVolumeSource{ + Path: "/foo", + Type: newHostPathType(string(api.HostPathDirectory)), + }, + }, + StorageClassName: "valid", + }), + }, + "good-volume-with-retain-policy": { + isExpectedFailure: false, + volume: testVolume("foo", "", api.PersistentVolumeSpec{ + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + AccessModes: []api.PersistentVolumeAccessMode{api.ReadWriteOnce}, + PersistentVolumeSource: api.PersistentVolumeSource{ + HostPath: &api.HostPathVolumeSource{ + Path: "/foo", + Type: newHostPathType(string(api.HostPathDirectory)), + }, + }, + PersistentVolumeReclaimPolicy: api.PersistentVolumeReclaimRetain, + }), + }, + "invalid-accessmode": { + isExpectedFailure: true, + volume: testVolume("foo", "", api.PersistentVolumeSpec{ + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + AccessModes: []api.PersistentVolumeAccessMode{"fakemode"}, + PersistentVolumeSource: api.PersistentVolumeSource{ + HostPath: &api.HostPathVolumeSource{ + Path: "/foo", + Type: newHostPathType(string(api.HostPathDirectory)), + }, + }, + }), + }, + "invalid-reclaimpolicy": { + isExpectedFailure: true, + volume: testVolume("foo", "", api.PersistentVolumeSpec{ + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + AccessModes: []api.PersistentVolumeAccessMode{api.ReadWriteOnce}, + PersistentVolumeSource: api.PersistentVolumeSource{ + HostPath: &api.HostPathVolumeSource{ + Path: "/foo", + Type: newHostPathType(string(api.HostPathDirectory)), + }, + }, + PersistentVolumeReclaimPolicy: "fakeReclaimPolicy", + }), + }, + "unexpected-namespace": { + isExpectedFailure: true, + volume: testVolume("foo", "unexpected-namespace", api.PersistentVolumeSpec{ + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + AccessModes: []api.PersistentVolumeAccessMode{api.ReadWriteOnce}, + PersistentVolumeSource: api.PersistentVolumeSource{ + HostPath: &api.HostPathVolumeSource{ + Path: "/foo", + Type: newHostPathType(string(api.HostPathDirectory)), + }, + }, + }), + }, + "bad-name": { + isExpectedFailure: true, + volume: testVolume("123*Bad(Name", "unexpected-namespace", api.PersistentVolumeSpec{ + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + AccessModes: []api.PersistentVolumeAccessMode{api.ReadWriteOnce}, + PersistentVolumeSource: api.PersistentVolumeSource{ + HostPath: &api.HostPathVolumeSource{ + Path: "/foo", + Type: newHostPathType(string(api.HostPathDirectory)), + }, + }, + }), + }, + "missing-name": { + isExpectedFailure: true, + volume: testVolume("", "", api.PersistentVolumeSpec{ + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + AccessModes: []api.PersistentVolumeAccessMode{api.ReadWriteOnce}, + }), + }, + "missing-capacity": { + isExpectedFailure: true, + volume: testVolume("foo", "", api.PersistentVolumeSpec{}), + }, + "missing-accessmodes": { + isExpectedFailure: true, + volume: testVolume("goodname", "missing-accessmodes", api.PersistentVolumeSpec{ + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + PersistentVolumeSource: api.PersistentVolumeSource{ + HostPath: &api.HostPathVolumeSource{ + Path: "/foo", + Type: newHostPathType(string(api.HostPathDirectory)), + }, + }, + }), + }, + "too-many-sources": { + isExpectedFailure: true, + volume: testVolume("", "", api.PersistentVolumeSpec{ + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("5G"), + }, + PersistentVolumeSource: api.PersistentVolumeSource{ + HostPath: &api.HostPathVolumeSource{ + Path: "/foo", + Type: newHostPathType(string(api.HostPathDirectory)), + }, + GCEPersistentDisk: &api.GCEPersistentDiskVolumeSource{PDName: "foo", FSType: "ext4"}, + }, + }), + }, + "host mount of / with recycle reclaim policy": { + isExpectedFailure: true, + volume: testVolume("bad-recycle-do-not-want", "", api.PersistentVolumeSpec{ + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + AccessModes: []api.PersistentVolumeAccessMode{api.ReadWriteOnce}, + PersistentVolumeSource: api.PersistentVolumeSource{ + HostPath: &api.HostPathVolumeSource{ + Path: "/", + Type: newHostPathType(string(api.HostPathDirectory)), + }, + }, + PersistentVolumeReclaimPolicy: api.PersistentVolumeReclaimRecycle, + }), + }, + "host mount of / with recycle reclaim policy 2": { + isExpectedFailure: true, + volume: testVolume("bad-recycle-do-not-want", "", api.PersistentVolumeSpec{ + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + AccessModes: []api.PersistentVolumeAccessMode{api.ReadWriteOnce}, + PersistentVolumeSource: api.PersistentVolumeSource{ + HostPath: &api.HostPathVolumeSource{ + Path: "/a/..", + Type: newHostPathType(string(api.HostPathDirectory)), + }, + }, + PersistentVolumeReclaimPolicy: api.PersistentVolumeReclaimRecycle, + }), + }, + "invalid-storage-class-name": { + isExpectedFailure: true, + volume: testVolume("invalid-storage-class-name", "", api.PersistentVolumeSpec{ + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + AccessModes: []api.PersistentVolumeAccessMode{api.ReadWriteOnce}, + PersistentVolumeSource: api.PersistentVolumeSource{ + HostPath: &api.HostPathVolumeSource{ + Path: "/foo", + Type: newHostPathType(string(api.HostPathDirectory)), + }, + }, + StorageClassName: "-invalid-", + }), + }, + // LocalVolume alpha feature disabled + // TODO: remove when no longer alpha + "alpha disabled valid local volume": { + isExpectedFailure: true, + volume: testVolumeWithNodeAffinity( + t, + "valid-local-volume", + "", + &api.NodeAffinity{ + RequiredDuringSchedulingIgnoredDuringExecution: &api.NodeSelector{ + NodeSelectorTerms: []api.NodeSelectorTerm{ + { + MatchExpressions: []api.NodeSelectorRequirement{ + { + Key: "test-label-key", + Operator: api.NodeSelectorOpIn, + Values: []string{"test-label-value"}, + }, + }, + }, + }, + }, + }, + api.PersistentVolumeSpec{ + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + AccessModes: []api.PersistentVolumeAccessMode{api.ReadWriteOnce}, + PersistentVolumeSource: api.PersistentVolumeSource{ + Local: &api.LocalVolumeSource{ + Path: "/foo", + }, + }, + StorageClassName: "test-storage-class", + }), + }, + "bad-hostpath-volume-backsteps": { + isExpectedFailure: true, + volume: testVolume("foo", "", api.PersistentVolumeSpec{ + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + AccessModes: []api.PersistentVolumeAccessMode{api.ReadWriteOnce}, + PersistentVolumeSource: api.PersistentVolumeSource{ + HostPath: &api.HostPathVolumeSource{ + Path: "/foo/..", + Type: newHostPathType(string(api.HostPathDirectory)), + }, + }, + StorageClassName: "backstep-hostpath", + }), + }, + "bad-local-volume-backsteps": { + isExpectedFailure: true, + volume: testVolume("foo", "", api.PersistentVolumeSpec{ + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + AccessModes: []api.PersistentVolumeAccessMode{api.ReadWriteOnce}, + PersistentVolumeSource: api.PersistentVolumeSource{ + Local: &api.LocalVolumeSource{ + Path: "/foo/..", + }, + }, + StorageClassName: "backstep-local", + }), + }, + } + + for name, scenario := range scenarios { + errs := ValidatePersistentVolume(scenario.volume) + if len(errs) == 0 && scenario.isExpectedFailure { + t.Errorf("Unexpected success for scenario: %s", name) + } + if len(errs) > 0 && !scenario.isExpectedFailure { + t.Errorf("Unexpected failure for scenario: %s - %+v", name, errs) + } + } + +} + +func TestValidateLocalVolumes(t *testing.T) { + scenarios := map[string]struct { + isExpectedFailure bool + volume *api.PersistentVolume + }{ + "valid local volume": { + isExpectedFailure: false, + volume: testVolumeWithNodeAffinity( + t, + "valid-local-volume", + "", + &api.NodeAffinity{ + RequiredDuringSchedulingIgnoredDuringExecution: &api.NodeSelector{ + NodeSelectorTerms: []api.NodeSelectorTerm{ + { + MatchExpressions: []api.NodeSelectorRequirement{ + { + Key: "test-label-key", + Operator: api.NodeSelectorOpIn, + Values: []string{"test-label-value"}, + }, + }, + }, + }, + }, + }, + api.PersistentVolumeSpec{ + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + AccessModes: []api.PersistentVolumeAccessMode{api.ReadWriteOnce}, + PersistentVolumeSource: api.PersistentVolumeSource{ + Local: &api.LocalVolumeSource{ + Path: "/foo", + }, + }, + StorageClassName: "test-storage-class", + }), + }, + "invalid local volume nil annotations": { + isExpectedFailure: true, + volume: testVolume( + "invalid-local-volume-nil-annotations", + "", + api.PersistentVolumeSpec{ + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + AccessModes: []api.PersistentVolumeAccessMode{api.ReadWriteOnce}, + PersistentVolumeSource: api.PersistentVolumeSource{ + Local: &api.LocalVolumeSource{ + Path: "/foo", + }, + }, + StorageClassName: "test-storage-class", + }), + }, + "invalid local volume empty affinity": { + isExpectedFailure: true, + volume: testVolumeWithNodeAffinity( + t, + "invalid-local-volume-empty-affinity", + "", + &api.NodeAffinity{}, + api.PersistentVolumeSpec{ + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + AccessModes: []api.PersistentVolumeAccessMode{api.ReadWriteOnce}, + PersistentVolumeSource: api.PersistentVolumeSource{ + Local: &api.LocalVolumeSource{ + Path: "/foo", + }, + }, + StorageClassName: "test-storage-class", + }), + }, + "invalid local volume preferred affinity": { + isExpectedFailure: true, + volume: testVolumeWithNodeAffinity( + t, + "invalid-local-volume-preferred-affinity", + "", + &api.NodeAffinity{ + RequiredDuringSchedulingIgnoredDuringExecution: &api.NodeSelector{ + NodeSelectorTerms: []api.NodeSelectorTerm{ + { + MatchExpressions: []api.NodeSelectorRequirement{ + { + Key: "test-label-key", + Operator: api.NodeSelectorOpIn, + Values: []string{"test-label-value"}, + }, + }, + }, + }, + }, + PreferredDuringSchedulingIgnoredDuringExecution: []api.PreferredSchedulingTerm{ + { + Weight: 10, + Preference: api.NodeSelectorTerm{ + MatchExpressions: []api.NodeSelectorRequirement{ + { + Key: "test-label-key", + Operator: api.NodeSelectorOpIn, + Values: []string{"test-label-value"}, + }, + }, + }, + }, + }, + }, + api.PersistentVolumeSpec{ + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + AccessModes: []api.PersistentVolumeAccessMode{api.ReadWriteOnce}, + PersistentVolumeSource: api.PersistentVolumeSource{ + Local: &api.LocalVolumeSource{ + Path: "/foo", + }, + }, + StorageClassName: "test-storage-class", + }), + }, + "invalid local volume empty path": { + isExpectedFailure: true, + volume: testVolumeWithNodeAffinity( + t, + "invalid-local-volume-empty-path", + "", + &api.NodeAffinity{ + RequiredDuringSchedulingIgnoredDuringExecution: &api.NodeSelector{ + NodeSelectorTerms: []api.NodeSelectorTerm{ + { + MatchExpressions: []api.NodeSelectorRequirement{ + { + Key: "test-label-key", + Operator: api.NodeSelectorOpIn, + Values: []string{"test-label-value"}, + }, + }, + }, + }, + }, + }, + api.PersistentVolumeSpec{ + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + AccessModes: []api.PersistentVolumeAccessMode{api.ReadWriteOnce}, + PersistentVolumeSource: api.PersistentVolumeSource{ + Local: &api.LocalVolumeSource{}, + }, + StorageClassName: "test-storage-class", + }), + }, + } + + err := utilfeature.DefaultFeatureGate.Set("PersistentLocalVolumes=true") + if err != nil { + t.Errorf("Failed to enable feature gate for LocalPersistentVolumes: %v", err) + return + } + for name, scenario := range scenarios { + errs := ValidatePersistentVolume(scenario.volume) + if len(errs) == 0 && scenario.isExpectedFailure { + t.Errorf("Unexpected success for scenario: %s", name) + } + if len(errs) > 0 && !scenario.isExpectedFailure { + t.Errorf("Unexpected failure for scenario: %s - %+v", name, errs) + } + } +} + +func testVolumeClaim(name string, namespace string, spec api.PersistentVolumeClaimSpec) *api.PersistentVolumeClaim { + return &api.PersistentVolumeClaim{ + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace}, + Spec: spec, + } +} + +func testVolumeClaimWithStatus( + name, namespace string, + spec api.PersistentVolumeClaimSpec, + status api.PersistentVolumeClaimStatus) *api.PersistentVolumeClaim { + return &api.PersistentVolumeClaim{ + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace}, + Spec: spec, + Status: status, + } +} + +func testVolumeClaimStorageClass(name string, namespace string, annval string, spec api.PersistentVolumeClaimSpec) *api.PersistentVolumeClaim { + annotations := map[string]string{ + v1.BetaStorageClassAnnotation: annval, + } + + return &api.PersistentVolumeClaim{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: namespace, + Annotations: annotations, + }, + Spec: spec, + } +} + +func testVolumeClaimAnnotation(name string, namespace string, ann string, annval string, spec api.PersistentVolumeClaimSpec) *api.PersistentVolumeClaim { + annotations := map[string]string{ + ann: annval, + } + + return &api.PersistentVolumeClaim{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: namespace, + Annotations: annotations, + }, + Spec: spec, + } +} + +func TestValidatePersistentVolumeClaim(t *testing.T) { + invalidClassName := "-invalid-" + validClassName := "valid" + scenarios := map[string]struct { + isExpectedFailure bool + claim *api.PersistentVolumeClaim + }{ + "good-claim": { + isExpectedFailure: false, + claim: testVolumeClaim("foo", "ns", api.PersistentVolumeClaimSpec{ + Selector: &metav1.LabelSelector{ + MatchExpressions: []metav1.LabelSelectorRequirement{ + { + Key: "key2", + Operator: "Exists", + }, + }, + }, + AccessModes: []api.PersistentVolumeAccessMode{ + api.ReadWriteOnce, + api.ReadOnlyMany, + }, + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + }, + StorageClassName: &validClassName, + }), + }, + "invalid-label-selector": { + isExpectedFailure: true, + claim: testVolumeClaim("foo", "ns", api.PersistentVolumeClaimSpec{ + Selector: &metav1.LabelSelector{ + MatchExpressions: []metav1.LabelSelectorRequirement{ + { + Key: "key2", + Operator: "InvalidOp", + Values: []string{"value1", "value2"}, + }, + }, + }, + AccessModes: []api.PersistentVolumeAccessMode{ + api.ReadWriteOnce, + api.ReadOnlyMany, + }, + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + }, + }), + }, + "invalid-accessmode": { + isExpectedFailure: true, + claim: testVolumeClaim("foo", "ns", api.PersistentVolumeClaimSpec{ + AccessModes: []api.PersistentVolumeAccessMode{"fakemode"}, + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + }, + }), + }, + "missing-namespace": { + isExpectedFailure: true, + claim: testVolumeClaim("foo", "", api.PersistentVolumeClaimSpec{ + AccessModes: []api.PersistentVolumeAccessMode{ + api.ReadWriteOnce, + api.ReadOnlyMany, + }, + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + }, + }), + }, + "no-access-modes": { + isExpectedFailure: true, + claim: testVolumeClaim("foo", "ns", api.PersistentVolumeClaimSpec{ + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + }, + }), + }, + "no-resource-requests": { + isExpectedFailure: true, + claim: testVolumeClaim("foo", "ns", api.PersistentVolumeClaimSpec{ + AccessModes: []api.PersistentVolumeAccessMode{ + api.ReadWriteOnce, + }, + }), + }, + "invalid-resource-requests": { + isExpectedFailure: true, + claim: testVolumeClaim("foo", "ns", api.PersistentVolumeClaimSpec{ + AccessModes: []api.PersistentVolumeAccessMode{ + api.ReadWriteOnce, + }, + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName(api.ResourceMemory): resource.MustParse("10G"), + }, + }, + }), + }, + "negative-storage-request": { + isExpectedFailure: true, + claim: testVolumeClaim("foo", "ns", api.PersistentVolumeClaimSpec{ + Selector: &metav1.LabelSelector{ + MatchExpressions: []metav1.LabelSelectorRequirement{ + { + Key: "key2", + Operator: "Exists", + }, + }, + }, + AccessModes: []api.PersistentVolumeAccessMode{ + api.ReadWriteOnce, + api.ReadOnlyMany, + }, + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("-10G"), + }, + }, + }), + }, + "invalid-storage-class-name": { + isExpectedFailure: true, + claim: testVolumeClaim("foo", "ns", api.PersistentVolumeClaimSpec{ + Selector: &metav1.LabelSelector{ + MatchExpressions: []metav1.LabelSelectorRequirement{ + { + Key: "key2", + Operator: "Exists", + }, + }, + }, + AccessModes: []api.PersistentVolumeAccessMode{ + api.ReadWriteOnce, + api.ReadOnlyMany, + }, + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + }, + StorageClassName: &invalidClassName, + }), + }, + } + + for name, scenario := range scenarios { + errs := ValidatePersistentVolumeClaim(scenario.claim) + if len(errs) == 0 && scenario.isExpectedFailure { + t.Errorf("Unexpected success for scenario: %s", name) + } + if len(errs) > 0 && !scenario.isExpectedFailure { + t.Errorf("Unexpected failure for scenario: %s - %+v", name, errs) + } + } +} + +func TestValidatePersistentVolumeClaimUpdate(t *testing.T) { + validClaim := testVolumeClaimWithStatus("foo", "ns", api.PersistentVolumeClaimSpec{ + AccessModes: []api.PersistentVolumeAccessMode{ + api.ReadWriteOnce, + api.ReadOnlyMany, + }, + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + }, + }, api.PersistentVolumeClaimStatus{ + Phase: api.ClaimBound, + }) + + validClaimStorageClass := testVolumeClaimStorageClass("foo", "ns", "fast", api.PersistentVolumeClaimSpec{ + AccessModes: []api.PersistentVolumeAccessMode{ + api.ReadOnlyMany, + }, + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + }, + }) + validClaimAnnotation := testVolumeClaimAnnotation("foo", "ns", "description", "foo-description", api.PersistentVolumeClaimSpec{ + AccessModes: []api.PersistentVolumeAccessMode{ + api.ReadOnlyMany, + }, + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + }, + }) + validUpdateClaim := testVolumeClaim("foo", "ns", api.PersistentVolumeClaimSpec{ + AccessModes: []api.PersistentVolumeAccessMode{ + api.ReadWriteOnce, + api.ReadOnlyMany, + }, + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + }, + VolumeName: "volume", + }) + invalidUpdateClaimResources := testVolumeClaim("foo", "ns", api.PersistentVolumeClaimSpec{ + AccessModes: []api.PersistentVolumeAccessMode{ + api.ReadWriteOnce, + api.ReadOnlyMany, + }, + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("20G"), + }, + }, + VolumeName: "volume", + }) + invalidUpdateClaimAccessModes := testVolumeClaim("foo", "ns", api.PersistentVolumeClaimSpec{ + AccessModes: []api.PersistentVolumeAccessMode{ + api.ReadWriteOnce, + }, + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + }, + VolumeName: "volume", + }) + invalidUpdateClaimStorageClass := testVolumeClaimStorageClass("foo", "ns", "fast2", api.PersistentVolumeClaimSpec{ + AccessModes: []api.PersistentVolumeAccessMode{ + api.ReadOnlyMany, + }, + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + }, + VolumeName: "volume", + }) + validUpdateClaimMutableAnnotation := testVolumeClaimAnnotation("foo", "ns", "description", "updated-or-added-foo-description", api.PersistentVolumeClaimSpec{ + AccessModes: []api.PersistentVolumeAccessMode{ + api.ReadOnlyMany, + }, + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + }, + VolumeName: "volume", + }) + validAddClaimAnnotation := testVolumeClaimAnnotation("foo", "ns", "description", "updated-or-added-foo-description", api.PersistentVolumeClaimSpec{ + AccessModes: []api.PersistentVolumeAccessMode{ + api.ReadWriteOnce, + api.ReadOnlyMany, + }, + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + }, + VolumeName: "volume", + }) + validSizeUpdate := testVolumeClaimWithStatus("foo", "ns", api.PersistentVolumeClaimSpec{ + AccessModes: []api.PersistentVolumeAccessMode{ + api.ReadWriteOnce, + api.ReadOnlyMany, + }, + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("15G"), + }, + }, + }, api.PersistentVolumeClaimStatus{ + Phase: api.ClaimBound, + }) + + invalidSizeUpdate := testVolumeClaimWithStatus("foo", "ns", api.PersistentVolumeClaimSpec{ + AccessModes: []api.PersistentVolumeAccessMode{ + api.ReadWriteOnce, + api.ReadOnlyMany, + }, + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("5G"), + }, + }, + }, api.PersistentVolumeClaimStatus{ + Phase: api.ClaimBound, + }) + + unboundSizeUpdate := testVolumeClaimWithStatus("foo", "ns", api.PersistentVolumeClaimSpec{ + AccessModes: []api.PersistentVolumeAccessMode{ + api.ReadWriteOnce, + api.ReadOnlyMany, + }, + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("12G"), + }, + }, + }, api.PersistentVolumeClaimStatus{ + Phase: api.ClaimPending, + }) + + scenarios := map[string]struct { + isExpectedFailure bool + oldClaim *api.PersistentVolumeClaim + newClaim *api.PersistentVolumeClaim + enableResize bool + }{ + "valid-update-volumeName-only": { + isExpectedFailure: false, + oldClaim: validClaim, + newClaim: validUpdateClaim, + enableResize: false, + }, + "valid-no-op-update": { + isExpectedFailure: false, + oldClaim: validUpdateClaim, + newClaim: validUpdateClaim, + enableResize: false, + }, + "invalid-update-change-resources-on-bound-claim": { + isExpectedFailure: true, + oldClaim: validUpdateClaim, + newClaim: invalidUpdateClaimResources, + enableResize: false, + }, + "invalid-update-change-access-modes-on-bound-claim": { + isExpectedFailure: true, + oldClaim: validUpdateClaim, + newClaim: invalidUpdateClaimAccessModes, + enableResize: false, + }, + "invalid-update-change-storage-class-annotation-after-creation": { + isExpectedFailure: true, + oldClaim: validClaimStorageClass, + newClaim: invalidUpdateClaimStorageClass, + enableResize: false, + }, + "valid-update-mutable-annotation": { + isExpectedFailure: false, + oldClaim: validClaimAnnotation, + newClaim: validUpdateClaimMutableAnnotation, + enableResize: false, + }, + "valid-update-add-annotation": { + isExpectedFailure: false, + oldClaim: validClaim, + newClaim: validAddClaimAnnotation, + enableResize: false, + }, + "valid-size-update-resize-disabled": { + isExpectedFailure: true, + oldClaim: validClaim, + newClaim: validSizeUpdate, + enableResize: false, + }, + "valid-size-update-resize-enabled": { + isExpectedFailure: false, + oldClaim: validClaim, + newClaim: validSizeUpdate, + enableResize: true, + }, + "invalid-size-update-resize-enabled": { + isExpectedFailure: true, + oldClaim: validClaim, + newClaim: invalidSizeUpdate, + enableResize: true, + }, + "unbound-size-update-resize-enabled": { + isExpectedFailure: true, + oldClaim: validClaim, + newClaim: unboundSizeUpdate, + enableResize: true, + }, + } + + for name, scenario := range scenarios { + // ensure we have a resource version specified for updates + togglePVExpandFeature(scenario.enableResize, t) + scenario.oldClaim.ResourceVersion = "1" + scenario.newClaim.ResourceVersion = "1" + errs := ValidatePersistentVolumeClaimUpdate(scenario.newClaim, scenario.oldClaim) + if len(errs) == 0 && scenario.isExpectedFailure { + t.Errorf("Unexpected success for scenario: %s", name) + } + if len(errs) > 0 && !scenario.isExpectedFailure { + t.Errorf("Unexpected failure for scenario: %s - %+v", name, errs) + } + } +} + +func togglePVExpandFeature(toggleFlag bool, t *testing.T) { + if toggleFlag { + // Enable alpha feature LocalStorageCapacityIsolation + err := utilfeature.DefaultFeatureGate.Set("ExpandPersistentVolumes=true") + if err != nil { + t.Errorf("Failed to enable feature gate for ExpandPersistentVolumes: %v", err) + return + } + } else { + err := utilfeature.DefaultFeatureGate.Set("ExpandPersistentVolumes=false") + if err != nil { + t.Errorf("Failed to disable feature gate for ExpandPersistentVolumes: %v", err) + return + } + } +} + +func TestValidateKeyToPath(t *testing.T) { + testCases := []struct { + kp api.KeyToPath + ok bool + errtype field.ErrorType + }{ + { + kp: api.KeyToPath{Key: "k", Path: "p"}, + ok: true, + }, + { + kp: api.KeyToPath{Key: "k", Path: "p/p/p/p"}, + ok: true, + }, + { + kp: api.KeyToPath{Key: "k", Path: "p/..p/p../p..p"}, + ok: true, + }, + { + kp: api.KeyToPath{Key: "k", Path: "p", Mode: newInt32(0644)}, + ok: true, + }, + { + kp: api.KeyToPath{Key: "", Path: "p"}, + ok: false, + errtype: field.ErrorTypeRequired, + }, + { + kp: api.KeyToPath{Key: "k", Path: ""}, + ok: false, + errtype: field.ErrorTypeRequired, + }, + { + kp: api.KeyToPath{Key: "k", Path: "..p"}, + ok: false, + errtype: field.ErrorTypeInvalid, + }, + { + kp: api.KeyToPath{Key: "k", Path: "../p"}, + ok: false, + errtype: field.ErrorTypeInvalid, + }, + { + kp: api.KeyToPath{Key: "k", Path: "p/../p"}, + ok: false, + errtype: field.ErrorTypeInvalid, + }, + { + kp: api.KeyToPath{Key: "k", Path: "p/.."}, + ok: false, + errtype: field.ErrorTypeInvalid, + }, + { + kp: api.KeyToPath{Key: "k", Path: "p", Mode: newInt32(01000)}, + ok: false, + errtype: field.ErrorTypeInvalid, + }, + { + kp: api.KeyToPath{Key: "k", Path: "p", Mode: newInt32(-1)}, + ok: false, + errtype: field.ErrorTypeInvalid, + }, + } + + for i, tc := range testCases { + errs := validateKeyToPath(&tc.kp, field.NewPath("field")) + if tc.ok && len(errs) > 0 { + t.Errorf("[%d] unexpected errors: %v", i, errs) + } else if !tc.ok && len(errs) == 0 { + t.Errorf("[%d] expected error type %v", i, tc.errtype) + } else if len(errs) > 1 { + t.Errorf("[%d] expected only one error, got %d", i, len(errs)) + } else if !tc.ok { + if errs[0].Type != tc.errtype { + t.Errorf("[%d] expected error type %v, got %v", i, tc.errtype, errs[0].Type) + } + } + } +} + +func TestValidateNFSVolumeSource(t *testing.T) { + testCases := []struct { + name string + nfs *api.NFSVolumeSource + errtype field.ErrorType + errfield string + errdetail string + }{ + { + name: "missing server", + nfs: &api.NFSVolumeSource{Server: "", Path: "/tmp"}, + errtype: field.ErrorTypeRequired, + errfield: "server", + }, + { + name: "missing path", + nfs: &api.NFSVolumeSource{Server: "my-server", Path: ""}, + errtype: field.ErrorTypeRequired, + errfield: "path", + }, + { + name: "abs path", + nfs: &api.NFSVolumeSource{Server: "my-server", Path: "tmp"}, + errtype: field.ErrorTypeInvalid, + errfield: "path", + errdetail: "must be an absolute path", + }, + } + + for i, tc := range testCases { + errs := validateNFSVolumeSource(tc.nfs, field.NewPath("field")) + + if len(errs) > 0 && tc.errtype == "" { + t.Errorf("[%d: %q] unexpected error(s): %v", i, tc.name, errs) + } else if len(errs) == 0 && tc.errtype != "" { + t.Errorf("[%d: %q] expected error type %v", i, tc.name, tc.errtype) + } else if len(errs) >= 1 { + if errs[0].Type != tc.errtype { + t.Errorf("[%d: %q] expected error type %v, got %v", i, tc.name, tc.errtype, errs[0].Type) + } else if !strings.HasSuffix(errs[0].Field, "."+tc.errfield) { + t.Errorf("[%d: %q] expected error on field %q, got %q", i, tc.name, tc.errfield, errs[0].Field) + } else if !strings.Contains(errs[0].Detail, tc.errdetail) { + t.Errorf("[%d: %q] expected error detail %q, got %q", i, tc.name, tc.errdetail, errs[0].Detail) + } + } + } +} + +func TestValidateGlusterfs(t *testing.T) { + testCases := []struct { + name string + gfs *api.GlusterfsVolumeSource + errtype field.ErrorType + errfield string + }{ + { + name: "missing endpointname", + gfs: &api.GlusterfsVolumeSource{EndpointsName: "", Path: "/tmp"}, + errtype: field.ErrorTypeRequired, + errfield: "endpoints", + }, + { + name: "missing path", + gfs: &api.GlusterfsVolumeSource{EndpointsName: "my-endpoint", Path: ""}, + errtype: field.ErrorTypeRequired, + errfield: "path", + }, + { + name: "missing endpintname and path", + gfs: &api.GlusterfsVolumeSource{EndpointsName: "", Path: ""}, + errtype: field.ErrorTypeRequired, + errfield: "endpoints", + }, + } + + for i, tc := range testCases { + errs := validateGlusterfsVolumeSource(tc.gfs, field.NewPath("field")) + + if len(errs) > 0 && tc.errtype == "" { + t.Errorf("[%d: %q] unexpected error(s): %v", i, tc.name, errs) + } else if len(errs) == 0 && tc.errtype != "" { + t.Errorf("[%d: %q] expected error type %v", i, tc.name, tc.errtype) + } else if len(errs) >= 1 { + if errs[0].Type != tc.errtype { + t.Errorf("[%d: %q] expected error type %v, got %v", i, tc.name, tc.errtype, errs[0].Type) + } else if !strings.HasSuffix(errs[0].Field, "."+tc.errfield) { + t.Errorf("[%d: %q] expected error on field %q, got %q", i, tc.name, tc.errfield, errs[0].Field) + } + } + } +} + +// helper +func newInt32(val int) *int32 { + p := new(int32) + *p = int32(val) + return p +} + +// This test is a little too top-to-bottom. Ideally we would test each volume +// type on its own, but we want to also make sure that the logic works through +// the one-of wrapper, so we just do it all in one place. +func TestValidateVolumes(t *testing.T) { + validInitiatorName := "iqn.2015-02.example.com:init" + invalidInitiatorName := "2015-02.example.com:init" + testCases := []struct { + name string + vol api.Volume + errtype field.ErrorType + errfield string + errdetail string + }{ + // EmptyDir and basic volume names + { + name: "valid alpha name", + vol: api.Volume{ + Name: "empty", + VolumeSource: api.VolumeSource{ + EmptyDir: &api.EmptyDirVolumeSource{}, + }, + }, + }, + { + name: "valid num name", + vol: api.Volume{ + Name: "123", + VolumeSource: api.VolumeSource{ + EmptyDir: &api.EmptyDirVolumeSource{}, + }, + }, + }, + { + name: "valid alphanum name", + vol: api.Volume{ + Name: "empty-123", + VolumeSource: api.VolumeSource{ + EmptyDir: &api.EmptyDirVolumeSource{}, + }, + }, + }, + { + name: "valid numalpha name", + vol: api.Volume{ + Name: "123-empty", + VolumeSource: api.VolumeSource{ + EmptyDir: &api.EmptyDirVolumeSource{}, + }, + }, + }, + { + name: "zero-length name", + vol: api.Volume{ + Name: "", + VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}, + }, + errtype: field.ErrorTypeRequired, + errfield: "name", + }, + { + name: "name > 63 characters", + vol: api.Volume{ + Name: strings.Repeat("a", 64), + VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}, + }, + errtype: field.ErrorTypeInvalid, + errfield: "name", + errdetail: "must be no more than", + }, + { + name: "name not a DNS label", + vol: api.Volume{ + Name: "a.b.c", + VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}, + }, + errtype: field.ErrorTypeInvalid, + errfield: "name", + errdetail: dnsLabelErrMsg, + }, + // More than one source field specified. + { + name: "more than one source", + vol: api.Volume{ + Name: "dups", + VolumeSource: api.VolumeSource{ + EmptyDir: &api.EmptyDirVolumeSource{}, + HostPath: &api.HostPathVolumeSource{ + Path: "/mnt/path", + Type: newHostPathType(string(api.HostPathDirectory)), + }, + }, + }, + errtype: field.ErrorTypeForbidden, + errfield: "hostPath", + errdetail: "may not specify more than 1 volume", + }, + // HostPath Default + { + name: "default HostPath", + vol: api.Volume{ + Name: "hostpath", + VolumeSource: api.VolumeSource{ + HostPath: &api.HostPathVolumeSource{ + Path: "/mnt/path", + Type: newHostPathType(string(api.HostPathDirectory)), + }, + }, + }, + }, + // HostPath Supported + { + name: "valid HostPath", + vol: api.Volume{ + Name: "hostpath", + VolumeSource: api.VolumeSource{ + HostPath: &api.HostPathVolumeSource{ + Path: "/mnt/path", + Type: newHostPathType(string(api.HostPathSocket)), + }, + }, + }, + }, + // HostPath Invalid + { + name: "invalid HostPath", + vol: api.Volume{ + Name: "hostpath", + VolumeSource: api.VolumeSource{ + HostPath: &api.HostPathVolumeSource{ + Path: "/mnt/path", + Type: newHostPathType("invalid"), + }, + }, + }, + errtype: field.ErrorTypeNotSupported, + errfield: "type", + }, + { + name: "invalid HostPath backsteps", + vol: api.Volume{ + Name: "hostpath", + VolumeSource: api.VolumeSource{ + HostPath: &api.HostPathVolumeSource{ + Path: "/mnt/path/..", + Type: newHostPathType(string(api.HostPathDirectory)), + }, + }, + }, + errtype: field.ErrorTypeInvalid, + errfield: "path", + errdetail: "must not contain '..'", + }, + // GcePersistentDisk + { + name: "valid GcePersistentDisk", + vol: api.Volume{ + Name: "gce-pd", + VolumeSource: api.VolumeSource{ + GCEPersistentDisk: &api.GCEPersistentDiskVolumeSource{ + PDName: "my-PD", + FSType: "ext4", + Partition: 1, + ReadOnly: false, + }, + }, + }, + }, + // AWSElasticBlockStore + { + name: "valid AWSElasticBlockStore", + vol: api.Volume{ + Name: "aws-ebs", + VolumeSource: api.VolumeSource{ + AWSElasticBlockStore: &api.AWSElasticBlockStoreVolumeSource{ + VolumeID: "my-PD", + FSType: "ext4", + Partition: 1, + ReadOnly: false, + }, + }, + }, + }, + // GitRepo + { + name: "valid GitRepo", + vol: api.Volume{ + Name: "git-repo", + VolumeSource: api.VolumeSource{ + GitRepo: &api.GitRepoVolumeSource{ + Repository: "my-repo", + Revision: "hashstring", + Directory: "target", + }, + }, + }, + }, + { + name: "valid GitRepo in .", + vol: api.Volume{ + Name: "git-repo-dot", + VolumeSource: api.VolumeSource{ + GitRepo: &api.GitRepoVolumeSource{ + Repository: "my-repo", + Directory: ".", + }, + }, + }, + }, + { + name: "valid GitRepo with .. in name", + vol: api.Volume{ + Name: "git-repo-dot-dot-foo", + VolumeSource: api.VolumeSource{ + GitRepo: &api.GitRepoVolumeSource{ + Repository: "my-repo", + Directory: "..foo", + }, + }, + }, + }, + { + name: "GitRepo starts with ../", + vol: api.Volume{ + Name: "gitrepo", + VolumeSource: api.VolumeSource{ + GitRepo: &api.GitRepoVolumeSource{ + Repository: "foo", + Directory: "../dots/bar", + }, + }, + }, + errtype: field.ErrorTypeInvalid, + errfield: "gitRepo.directory", + errdetail: `must not contain '..'`, + }, + { + name: "GitRepo contains ..", + vol: api.Volume{ + Name: "gitrepo", + VolumeSource: api.VolumeSource{ + GitRepo: &api.GitRepoVolumeSource{ + Repository: "foo", + Directory: "dots/../bar", + }, + }, + }, + errtype: field.ErrorTypeInvalid, + errfield: "gitRepo.directory", + errdetail: `must not contain '..'`, + }, + { + name: "GitRepo absolute target", + vol: api.Volume{ + Name: "gitrepo", + VolumeSource: api.VolumeSource{ + GitRepo: &api.GitRepoVolumeSource{ + Repository: "foo", + Directory: "/abstarget", + }, + }, + }, + errtype: field.ErrorTypeInvalid, + errfield: "gitRepo.directory", + }, + // ISCSI + { + name: "valid ISCSI", + vol: api.Volume{ + Name: "iscsi", + VolumeSource: api.VolumeSource{ + ISCSI: &api.ISCSIVolumeSource{ + TargetPortal: "127.0.0.1", + IQN: "iqn.2015-02.example.com:test", + Lun: 1, + FSType: "ext4", + ReadOnly: false, + }, + }, + }, + }, + { + name: "valid IQN: eui format", + vol: api.Volume{ + Name: "iscsi", + VolumeSource: api.VolumeSource{ + ISCSI: &api.ISCSIVolumeSource{ + TargetPortal: "127.0.0.1", + IQN: "eui.0123456789ABCDEF", + Lun: 1, + FSType: "ext4", + ReadOnly: false, + }, + }, + }, + }, + { + name: "valid IQN: naa format", + vol: api.Volume{ + Name: "iscsi", + VolumeSource: api.VolumeSource{ + ISCSI: &api.ISCSIVolumeSource{ + TargetPortal: "127.0.0.1", + IQN: "naa.62004567BA64678D0123456789ABCDEF", + Lun: 1, + FSType: "ext4", + ReadOnly: false, + }, + }, + }, + }, + { + name: "empty portal", + vol: api.Volume{ + Name: "iscsi", + VolumeSource: api.VolumeSource{ + ISCSI: &api.ISCSIVolumeSource{ + TargetPortal: "", + IQN: "iqn.2015-02.example.com:test", + Lun: 1, + FSType: "ext4", + ReadOnly: false, + }, + }, + }, + errtype: field.ErrorTypeRequired, + errfield: "iscsi.targetPortal", + }, + { + name: "empty iqn", + vol: api.Volume{ + Name: "iscsi", + VolumeSource: api.VolumeSource{ + ISCSI: &api.ISCSIVolumeSource{ + TargetPortal: "127.0.0.1", + IQN: "", + Lun: 1, + FSType: "ext4", + ReadOnly: false, + }, + }, + }, + errtype: field.ErrorTypeRequired, + errfield: "iscsi.iqn", + }, + { + name: "invalid IQN: iqn format", + vol: api.Volume{ + Name: "iscsi", + VolumeSource: api.VolumeSource{ + ISCSI: &api.ISCSIVolumeSource{ + TargetPortal: "127.0.0.1", + IQN: "iqn.2015-02.example.com:test;ls;", + Lun: 1, + FSType: "ext4", + ReadOnly: false, + }, + }, + }, + errtype: field.ErrorTypeInvalid, + errfield: "iscsi.iqn", + }, + { + name: "invalid IQN: eui format", + vol: api.Volume{ + Name: "iscsi", + VolumeSource: api.VolumeSource{ + ISCSI: &api.ISCSIVolumeSource{ + TargetPortal: "127.0.0.1", + IQN: "eui.0123456789ABCDEFGHIJ", + Lun: 1, + FSType: "ext4", + ReadOnly: false, + }, + }, + }, + errtype: field.ErrorTypeInvalid, + errfield: "iscsi.iqn", + }, + { + name: "invalid IQN: naa format", + vol: api.Volume{ + Name: "iscsi", + VolumeSource: api.VolumeSource{ + ISCSI: &api.ISCSIVolumeSource{ + TargetPortal: "127.0.0.1", + IQN: "naa.62004567BA_4-78D.123456789ABCDEF", + Lun: 1, + FSType: "ext4", + ReadOnly: false, + }, + }, + }, + errtype: field.ErrorTypeInvalid, + errfield: "iscsi.iqn", + }, + { + name: "valid initiatorName", + vol: api.Volume{ + Name: "iscsi", + VolumeSource: api.VolumeSource{ + ISCSI: &api.ISCSIVolumeSource{ + TargetPortal: "127.0.0.1", + IQN: "iqn.2015-02.example.com:test", + Lun: 1, + InitiatorName: &validInitiatorName, + FSType: "ext4", + ReadOnly: false, + }, + }, + }, + }, + { + name: "invalid initiatorName", + vol: api.Volume{ + Name: "iscsi", + VolumeSource: api.VolumeSource{ + ISCSI: &api.ISCSIVolumeSource{ + TargetPortal: "127.0.0.1", + IQN: "iqn.2015-02.example.com:test", + Lun: 1, + InitiatorName: &invalidInitiatorName, + FSType: "ext4", + ReadOnly: false, + }, + }, + }, + errtype: field.ErrorTypeInvalid, + errfield: "iscsi.initiatorname", + }, + { + name: "empty secret", + vol: api.Volume{ + Name: "iscsi", + VolumeSource: api.VolumeSource{ + ISCSI: &api.ISCSIVolumeSource{ + TargetPortal: "127.0.0.1", + IQN: "iqn.2015-02.example.com:test", + Lun: 1, + FSType: "ext4", + ReadOnly: false, + DiscoveryCHAPAuth: true, + }, + }, + }, + errtype: field.ErrorTypeRequired, + errfield: "iscsi.secretRef", + }, + { + name: "empty secret", + vol: api.Volume{ + Name: "iscsi", + VolumeSource: api.VolumeSource{ + ISCSI: &api.ISCSIVolumeSource{ + TargetPortal: "127.0.0.1", + IQN: "iqn.2015-02.example.com:test", + Lun: 1, + FSType: "ext4", + ReadOnly: false, + SessionCHAPAuth: true, + }, + }, + }, + errtype: field.ErrorTypeRequired, + errfield: "iscsi.secretRef", + }, + // Secret + { + name: "valid Secret", + vol: api.Volume{ + Name: "secret", + VolumeSource: api.VolumeSource{ + Secret: &api.SecretVolumeSource{ + SecretName: "my-secret", + }, + }, + }, + }, + { + name: "valid Secret with defaultMode", + vol: api.Volume{ + Name: "secret", + VolumeSource: api.VolumeSource{ + Secret: &api.SecretVolumeSource{ + SecretName: "my-secret", + DefaultMode: newInt32(0644), + }, + }, + }, + }, + { + name: "valid Secret with projection and mode", + vol: api.Volume{ + Name: "secret", + VolumeSource: api.VolumeSource{ + Secret: &api.SecretVolumeSource{ + SecretName: "my-secret", + Items: []api.KeyToPath{{ + Key: "key", + Path: "filename", + Mode: newInt32(0644), + }}, + }, + }, + }, + }, + { + name: "valid Secret with subdir projection", + vol: api.Volume{ + Name: "secret", + VolumeSource: api.VolumeSource{ + Secret: &api.SecretVolumeSource{ + SecretName: "my-secret", + Items: []api.KeyToPath{{ + Key: "key", + Path: "dir/filename", + }}, + }, + }, + }, + }, + { + name: "secret with missing path", + vol: api.Volume{ + Name: "secret", + VolumeSource: api.VolumeSource{ + Secret: &api.SecretVolumeSource{ + SecretName: "s", + Items: []api.KeyToPath{{Key: "key", Path: ""}}, + }, + }, + }, + errtype: field.ErrorTypeRequired, + errfield: "secret.items[0].path", + }, + { + name: "secret with leading ..", + vol: api.Volume{ + Name: "secret", + VolumeSource: api.VolumeSource{ + Secret: &api.SecretVolumeSource{ + SecretName: "s", + Items: []api.KeyToPath{{Key: "key", Path: "../foo"}}, + }, + }, + }, + errtype: field.ErrorTypeInvalid, + errfield: "secret.items[0].path", + }, + { + name: "secret with .. inside", + vol: api.Volume{ + Name: "secret", + VolumeSource: api.VolumeSource{ + Secret: &api.SecretVolumeSource{ + SecretName: "s", + Items: []api.KeyToPath{{Key: "key", Path: "foo/../bar"}}, + }, + }, + }, + errtype: field.ErrorTypeInvalid, + errfield: "secret.items[0].path", + }, + { + name: "secret with invalid positive defaultMode", + vol: api.Volume{ + Name: "secret", + VolumeSource: api.VolumeSource{ + Secret: &api.SecretVolumeSource{ + SecretName: "s", + DefaultMode: newInt32(01000), + }, + }, + }, + errtype: field.ErrorTypeInvalid, + errfield: "secret.defaultMode", + }, + { + name: "secret with invalid negative defaultMode", + vol: api.Volume{ + Name: "secret", + VolumeSource: api.VolumeSource{ + Secret: &api.SecretVolumeSource{ + SecretName: "s", + DefaultMode: newInt32(-1), + }, + }, + }, + errtype: field.ErrorTypeInvalid, + errfield: "secret.defaultMode", + }, + // ConfigMap + { + name: "valid ConfigMap", + vol: api.Volume{ + Name: "cfgmap", + VolumeSource: api.VolumeSource{ + ConfigMap: &api.ConfigMapVolumeSource{ + LocalObjectReference: api.LocalObjectReference{ + Name: "my-cfgmap", + }, + }, + }, + }, + }, + { + name: "valid ConfigMap with defaultMode", + vol: api.Volume{ + Name: "cfgmap", + VolumeSource: api.VolumeSource{ + ConfigMap: &api.ConfigMapVolumeSource{ + LocalObjectReference: api.LocalObjectReference{ + Name: "my-cfgmap", + }, + DefaultMode: newInt32(0644), + }, + }, + }, + }, + { + name: "valid ConfigMap with projection and mode", + vol: api.Volume{ + Name: "cfgmap", + VolumeSource: api.VolumeSource{ + ConfigMap: &api.ConfigMapVolumeSource{ + LocalObjectReference: api.LocalObjectReference{ + Name: "my-cfgmap"}, + Items: []api.KeyToPath{{ + Key: "key", + Path: "filename", + Mode: newInt32(0644), + }}, + }, + }, + }, + }, + { + name: "valid ConfigMap with subdir projection", + vol: api.Volume{ + Name: "cfgmap", + VolumeSource: api.VolumeSource{ + ConfigMap: &api.ConfigMapVolumeSource{ + LocalObjectReference: api.LocalObjectReference{ + Name: "my-cfgmap"}, + Items: []api.KeyToPath{{ + Key: "key", + Path: "dir/filename", + }}, + }, + }, + }, + }, + { + name: "configmap with missing path", + vol: api.Volume{ + Name: "cfgmap", + VolumeSource: api.VolumeSource{ + ConfigMap: &api.ConfigMapVolumeSource{ + LocalObjectReference: api.LocalObjectReference{Name: "c"}, + Items: []api.KeyToPath{{Key: "key", Path: ""}}, + }, + }, + }, + errtype: field.ErrorTypeRequired, + errfield: "configMap.items[0].path", + }, + { + name: "configmap with leading ..", + vol: api.Volume{ + Name: "cfgmap", + VolumeSource: api.VolumeSource{ + ConfigMap: &api.ConfigMapVolumeSource{ + LocalObjectReference: api.LocalObjectReference{Name: "c"}, + Items: []api.KeyToPath{{Key: "key", Path: "../foo"}}, + }, + }, + }, + errtype: field.ErrorTypeInvalid, + errfield: "configMap.items[0].path", + }, + { + name: "configmap with .. inside", + vol: api.Volume{ + Name: "cfgmap", + VolumeSource: api.VolumeSource{ + ConfigMap: &api.ConfigMapVolumeSource{ + LocalObjectReference: api.LocalObjectReference{Name: "c"}, + Items: []api.KeyToPath{{Key: "key", Path: "foo/../bar"}}, + }, + }, + }, + errtype: field.ErrorTypeInvalid, + errfield: "configMap.items[0].path", + }, + { + name: "configmap with invalid positive defaultMode", + vol: api.Volume{ + Name: "cfgmap", + VolumeSource: api.VolumeSource{ + ConfigMap: &api.ConfigMapVolumeSource{ + LocalObjectReference: api.LocalObjectReference{Name: "c"}, + DefaultMode: newInt32(01000), + }, + }, + }, + errtype: field.ErrorTypeInvalid, + errfield: "configMap.defaultMode", + }, + { + name: "configmap with invalid negative defaultMode", + vol: api.Volume{ + Name: "cfgmap", + VolumeSource: api.VolumeSource{ + ConfigMap: &api.ConfigMapVolumeSource{ + LocalObjectReference: api.LocalObjectReference{Name: "c"}, + DefaultMode: newInt32(-1), + }, + }, + }, + errtype: field.ErrorTypeInvalid, + errfield: "configMap.defaultMode", + }, + // Glusterfs + { + name: "valid Glusterfs", + vol: api.Volume{ + Name: "glusterfs", + VolumeSource: api.VolumeSource{ + Glusterfs: &api.GlusterfsVolumeSource{ + EndpointsName: "host1", + Path: "path", + ReadOnly: false, + }, + }, + }, + }, + { + name: "empty hosts", + vol: api.Volume{ + Name: "glusterfs", + VolumeSource: api.VolumeSource{ + Glusterfs: &api.GlusterfsVolumeSource{ + EndpointsName: "", + Path: "path", + ReadOnly: false, + }, + }, + }, + errtype: field.ErrorTypeRequired, + errfield: "glusterfs.endpoints", + }, + { + name: "empty path", + vol: api.Volume{ + Name: "glusterfs", + VolumeSource: api.VolumeSource{ + Glusterfs: &api.GlusterfsVolumeSource{ + EndpointsName: "host", + Path: "", + ReadOnly: false, + }, + }, + }, + errtype: field.ErrorTypeRequired, + errfield: "glusterfs.path", + }, + // Flocker + { + name: "valid Flocker -- datasetUUID", + vol: api.Volume{ + Name: "flocker", + VolumeSource: api.VolumeSource{ + Flocker: &api.FlockerVolumeSource{ + DatasetUUID: "d846b09d-223d-43df-ab5b-d6db2206a0e4", + }, + }, + }, + }, + { + name: "valid Flocker -- datasetName", + vol: api.Volume{ + Name: "flocker", + VolumeSource: api.VolumeSource{ + Flocker: &api.FlockerVolumeSource{ + DatasetName: "datasetName", + }, + }, + }, + }, + { + name: "both empty", + vol: api.Volume{ + Name: "flocker", + VolumeSource: api.VolumeSource{ + Flocker: &api.FlockerVolumeSource{ + DatasetName: "", + }, + }, + }, + errtype: field.ErrorTypeRequired, + errfield: "flocker", + }, + { + name: "both specified", + vol: api.Volume{ + Name: "flocker", + VolumeSource: api.VolumeSource{ + Flocker: &api.FlockerVolumeSource{ + DatasetName: "datasetName", + DatasetUUID: "d846b09d-223d-43df-ab5b-d6db2206a0e4", + }, + }, + }, + errtype: field.ErrorTypeInvalid, + errfield: "flocker", + }, + { + name: "slash in flocker datasetName", + vol: api.Volume{ + Name: "flocker", + VolumeSource: api.VolumeSource{ + Flocker: &api.FlockerVolumeSource{ + DatasetName: "foo/bar", + }, + }, + }, + errtype: field.ErrorTypeInvalid, + errfield: "flocker.datasetName", + errdetail: "must not contain '/'", + }, + // RBD + { + name: "valid RBD", + vol: api.Volume{ + Name: "rbd", + VolumeSource: api.VolumeSource{ + RBD: &api.RBDVolumeSource{ + CephMonitors: []string{"foo"}, + RBDImage: "bar", + FSType: "ext4", + }, + }, + }, + }, + { + name: "empty rbd monitors", + vol: api.Volume{ + Name: "rbd", + VolumeSource: api.VolumeSource{ + RBD: &api.RBDVolumeSource{ + CephMonitors: []string{}, + RBDImage: "bar", + FSType: "ext4", + }, + }, + }, + errtype: field.ErrorTypeRequired, + errfield: "rbd.monitors", + }, + { + name: "empty image", + vol: api.Volume{ + Name: "rbd", + VolumeSource: api.VolumeSource{ + RBD: &api.RBDVolumeSource{ + CephMonitors: []string{"foo"}, + RBDImage: "", + FSType: "ext4", + }, + }, + }, + errtype: field.ErrorTypeRequired, + errfield: "rbd.image", + }, + // Cinder + { + name: "valid Cinder", + vol: api.Volume{ + Name: "cinder", + VolumeSource: api.VolumeSource{ + Cinder: &api.CinderVolumeSource{ + VolumeID: "29ea5088-4f60-4757-962e-dba678767887", + FSType: "ext4", + ReadOnly: false, + }, + }, + }, + }, + // CephFS + { + name: "valid CephFS", + vol: api.Volume{ + Name: "cephfs", + VolumeSource: api.VolumeSource{ + CephFS: &api.CephFSVolumeSource{ + Monitors: []string{"foo"}, + }, + }, + }, + }, + { + name: "empty cephfs monitors", + vol: api.Volume{ + Name: "cephfs", + VolumeSource: api.VolumeSource{ + CephFS: &api.CephFSVolumeSource{ + Monitors: []string{}, + }, + }, + }, + errtype: field.ErrorTypeRequired, + errfield: "cephfs.monitors", + }, + // DownwardAPI + { + name: "valid DownwardAPI", + vol: api.Volume{ + Name: "downwardapi", + VolumeSource: api.VolumeSource{ + DownwardAPI: &api.DownwardAPIVolumeSource{ + Items: []api.DownwardAPIVolumeFile{ + { + Path: "labels", + FieldRef: &api.ObjectFieldSelector{ + APIVersion: "v1", + FieldPath: "metadata.labels", + }, + }, + { + Path: "annotations", + FieldRef: &api.ObjectFieldSelector{ + APIVersion: "v1", + FieldPath: "metadata.annotations", + }, + }, + { + Path: "namespace", + FieldRef: &api.ObjectFieldSelector{ + APIVersion: "v1", + FieldPath: "metadata.namespace", + }, + }, + { + Path: "name", + FieldRef: &api.ObjectFieldSelector{ + APIVersion: "v1", + FieldPath: "metadata.name", + }, + }, + { + Path: "path/with/subdirs", + FieldRef: &api.ObjectFieldSelector{ + APIVersion: "v1", + FieldPath: "metadata.labels", + }, + }, + { + Path: "path/./withdot", + FieldRef: &api.ObjectFieldSelector{ + APIVersion: "v1", + FieldPath: "metadata.labels", + }, + }, + { + Path: "path/with/embedded..dotdot", + FieldRef: &api.ObjectFieldSelector{ + APIVersion: "v1", + FieldPath: "metadata.labels", + }, + }, + { + Path: "path/with/leading/..dotdot", + FieldRef: &api.ObjectFieldSelector{ + APIVersion: "v1", + FieldPath: "metadata.labels", + }, + }, + { + Path: "cpu_limit", + ResourceFieldRef: &api.ResourceFieldSelector{ + ContainerName: "test-container", + Resource: "limits.cpu", + }, + }, + { + Path: "cpu_request", + ResourceFieldRef: &api.ResourceFieldSelector{ + ContainerName: "test-container", + Resource: "requests.cpu", + }, + }, + { + Path: "memory_limit", + ResourceFieldRef: &api.ResourceFieldSelector{ + ContainerName: "test-container", + Resource: "limits.memory", + }, + }, + { + Path: "memory_request", + ResourceFieldRef: &api.ResourceFieldSelector{ + ContainerName: "test-container", + Resource: "requests.memory", + }, + }, + }, + }, + }, + }, + }, + { + name: "downapi valid defaultMode", + vol: api.Volume{ + Name: "downapi", + VolumeSource: api.VolumeSource{ + DownwardAPI: &api.DownwardAPIVolumeSource{ + DefaultMode: newInt32(0644), + }, + }, + }, + }, + { + name: "downapi valid item mode", + vol: api.Volume{ + Name: "downapi", + VolumeSource: api.VolumeSource{ + DownwardAPI: &api.DownwardAPIVolumeSource{ + Items: []api.DownwardAPIVolumeFile{{ + Mode: newInt32(0644), + Path: "path", + FieldRef: &api.ObjectFieldSelector{ + APIVersion: "v1", + FieldPath: "metadata.labels", + }, + }}, + }, + }, + }, + }, + { + name: "downapi invalid positive item mode", + vol: api.Volume{ + Name: "downapi", + VolumeSource: api.VolumeSource{ + DownwardAPI: &api.DownwardAPIVolumeSource{ + Items: []api.DownwardAPIVolumeFile{{ + Mode: newInt32(01000), + Path: "path", + FieldRef: &api.ObjectFieldSelector{ + APIVersion: "v1", + FieldPath: "metadata.labels", + }, + }}, + }, + }, + }, + errtype: field.ErrorTypeInvalid, + errfield: "downwardAPI.mode", + }, + { + name: "downapi invalid negative item mode", + vol: api.Volume{ + Name: "downapi", + VolumeSource: api.VolumeSource{ + DownwardAPI: &api.DownwardAPIVolumeSource{ + Items: []api.DownwardAPIVolumeFile{{ + Mode: newInt32(-1), + Path: "path", + FieldRef: &api.ObjectFieldSelector{ + APIVersion: "v1", + FieldPath: "metadata.labels", + }, + }}, + }, + }, + }, + errtype: field.ErrorTypeInvalid, + errfield: "downwardAPI.mode", + }, + { + name: "downapi empty metatada path", + vol: api.Volume{ + Name: "downapi", + VolumeSource: api.VolumeSource{ + DownwardAPI: &api.DownwardAPIVolumeSource{ + Items: []api.DownwardAPIVolumeFile{{ + Path: "", + FieldRef: &api.ObjectFieldSelector{ + APIVersion: "v1", + FieldPath: "metadata.labels", + }, + }}, + }, + }, + }, + errtype: field.ErrorTypeRequired, + errfield: "downwardAPI.path", + }, + { + name: "downapi absolute path", + vol: api.Volume{ + Name: "downapi", + VolumeSource: api.VolumeSource{ + DownwardAPI: &api.DownwardAPIVolumeSource{ + Items: []api.DownwardAPIVolumeFile{{ + Path: "/absolutepath", + FieldRef: &api.ObjectFieldSelector{ + APIVersion: "v1", + FieldPath: "metadata.labels", + }, + }}, + }, + }, + }, + errtype: field.ErrorTypeInvalid, + errfield: "downwardAPI.path", + }, + { + name: "downapi dot dot path", + vol: api.Volume{ + Name: "downapi", + VolumeSource: api.VolumeSource{ + DownwardAPI: &api.DownwardAPIVolumeSource{ + Items: []api.DownwardAPIVolumeFile{{ + Path: "../../passwd", + FieldRef: &api.ObjectFieldSelector{ + APIVersion: "v1", + FieldPath: "metadata.labels", + }, + }}, + }, + }, + }, + errtype: field.ErrorTypeInvalid, + errfield: "downwardAPI.path", + errdetail: `must not contain '..'`, + }, + { + name: "downapi dot dot file name", + vol: api.Volume{ + Name: "downapi", + VolumeSource: api.VolumeSource{ + DownwardAPI: &api.DownwardAPIVolumeSource{ + Items: []api.DownwardAPIVolumeFile{{ + Path: "..badFileName", + FieldRef: &api.ObjectFieldSelector{ + APIVersion: "v1", + FieldPath: "metadata.labels", + }, + }}, + }, + }, + }, + errtype: field.ErrorTypeInvalid, + errfield: "downwardAPI.path", + errdetail: `must not start with '..'`, + }, + { + name: "downapi dot dot first level dirent", + vol: api.Volume{ + Name: "downapi", + VolumeSource: api.VolumeSource{ + DownwardAPI: &api.DownwardAPIVolumeSource{ + Items: []api.DownwardAPIVolumeFile{{ + Path: "..badDirName/goodFileName", + FieldRef: &api.ObjectFieldSelector{ + APIVersion: "v1", + FieldPath: "metadata.labels", + }, + }}, + }, + }, + }, + errtype: field.ErrorTypeInvalid, + errfield: "downwardAPI.path", + errdetail: `must not start with '..'`, + }, + { + name: "downapi fieldRef and ResourceFieldRef together", + vol: api.Volume{ + Name: "downapi", + VolumeSource: api.VolumeSource{ + DownwardAPI: &api.DownwardAPIVolumeSource{ + Items: []api.DownwardAPIVolumeFile{{ + Path: "test", + FieldRef: &api.ObjectFieldSelector{ + APIVersion: "v1", + FieldPath: "metadata.labels", + }, + ResourceFieldRef: &api.ResourceFieldSelector{ + ContainerName: "test-container", + Resource: "requests.memory", + }, + }}, + }, + }, + }, + errtype: field.ErrorTypeInvalid, + errfield: "downwardAPI", + errdetail: "fieldRef and resourceFieldRef can not be specified simultaneously", + }, + { + name: "downapi invalid positive defaultMode", + vol: api.Volume{ + Name: "downapi", + VolumeSource: api.VolumeSource{ + DownwardAPI: &api.DownwardAPIVolumeSource{ + DefaultMode: newInt32(01000), + }, + }, + }, + errtype: field.ErrorTypeInvalid, + errfield: "downwardAPI.defaultMode", + }, + { + name: "downapi invalid negative defaultMode", + vol: api.Volume{ + Name: "downapi", + VolumeSource: api.VolumeSource{ + DownwardAPI: &api.DownwardAPIVolumeSource{ + DefaultMode: newInt32(-1), + }, + }, + }, + errtype: field.ErrorTypeInvalid, + errfield: "downwardAPI.defaultMode", + }, + // FC + { + name: "FC valid targetWWNs and lun", + vol: api.Volume{ + Name: "fc", + VolumeSource: api.VolumeSource{ + FC: &api.FCVolumeSource{ + TargetWWNs: []string{"some_wwn"}, + Lun: newInt32(1), + FSType: "ext4", + ReadOnly: false, + }, + }, + }, + }, + { + name: "FC valid wwids", + vol: api.Volume{ + Name: "fc", + VolumeSource: api.VolumeSource{ + FC: &api.FCVolumeSource{ + WWIDs: []string{"some_wwid"}, + FSType: "ext4", + ReadOnly: false, + }, + }, + }, + }, + { + name: "FC empty targetWWNs and wwids", + vol: api.Volume{ + Name: "fc", + VolumeSource: api.VolumeSource{ + FC: &api.FCVolumeSource{ + TargetWWNs: []string{}, + Lun: newInt32(1), + WWIDs: []string{}, + FSType: "ext4", + ReadOnly: false, + }, + }, + }, + errtype: field.ErrorTypeRequired, + errfield: "fc.targetWWNs", + errdetail: "must specify either targetWWNs or wwids", + }, + { + name: "FC invalid: both targetWWNs and wwids simultaneously", + vol: api.Volume{ + Name: "fc", + VolumeSource: api.VolumeSource{ + FC: &api.FCVolumeSource{ + TargetWWNs: []string{"some_wwn"}, + Lun: newInt32(1), + WWIDs: []string{"some_wwid"}, + FSType: "ext4", + ReadOnly: false, + }, + }, + }, + errtype: field.ErrorTypeInvalid, + errfield: "fc.targetWWNs", + errdetail: "targetWWNs and wwids can not be specified simultaneously", + }, + { + name: "FC valid targetWWNs and empty lun", + vol: api.Volume{ + Name: "fc", + VolumeSource: api.VolumeSource{ + FC: &api.FCVolumeSource{ + TargetWWNs: []string{"wwn"}, + Lun: nil, + FSType: "ext4", + ReadOnly: false, + }, + }, + }, + errtype: field.ErrorTypeRequired, + errfield: "fc.lun", + errdetail: "lun is required if targetWWNs is specified", + }, + { + name: "FC valid targetWWNs and invalid lun", + vol: api.Volume{ + Name: "fc", + VolumeSource: api.VolumeSource{ + FC: &api.FCVolumeSource{ + TargetWWNs: []string{"wwn"}, + Lun: newInt32(256), + FSType: "ext4", + ReadOnly: false, + }, + }, + }, + errtype: field.ErrorTypeInvalid, + errfield: "fc.lun", + errdetail: validation.InclusiveRangeError(0, 255), + }, + // FlexVolume + { + name: "valid FlexVolume", + vol: api.Volume{ + Name: "flex-volume", + VolumeSource: api.VolumeSource{ + FlexVolume: &api.FlexVolumeSource{ + Driver: "kubernetes.io/blue", + FSType: "ext4", + }, + }, + }, + }, + // AzureFile + { + name: "valid AzureFile", + vol: api.Volume{ + Name: "azure-file", + VolumeSource: api.VolumeSource{ + AzureFile: &api.AzureFileVolumeSource{ + SecretName: "key", + ShareName: "share", + ReadOnly: false, + }, + }, + }, + }, + { + name: "AzureFile empty secret", + vol: api.Volume{ + Name: "azure-file", + VolumeSource: api.VolumeSource{ + AzureFile: &api.AzureFileVolumeSource{ + SecretName: "", + ShareName: "share", + ReadOnly: false, + }, + }, + }, + errtype: field.ErrorTypeRequired, + errfield: "azureFile.secretName", + }, + { + name: "AzureFile empty share", + vol: api.Volume{ + Name: "azure-file", + VolumeSource: api.VolumeSource{ + AzureFile: &api.AzureFileVolumeSource{ + SecretName: "name", + ShareName: "", + ReadOnly: false, + }, + }, + }, + errtype: field.ErrorTypeRequired, + errfield: "azureFile.shareName", + }, + // Quobyte + { + name: "valid Quobyte", + vol: api.Volume{ + Name: "quobyte", + VolumeSource: api.VolumeSource{ + Quobyte: &api.QuobyteVolumeSource{ + Registry: "registry:7861", + Volume: "volume", + ReadOnly: false, + User: "root", + Group: "root", + }, + }, + }, + }, + { + name: "empty registry quobyte", + vol: api.Volume{ + Name: "quobyte", + VolumeSource: api.VolumeSource{ + Quobyte: &api.QuobyteVolumeSource{ + Volume: "/test", + }, + }, + }, + errtype: field.ErrorTypeRequired, + errfield: "quobyte.registry", + }, + { + name: "wrong format registry quobyte", + vol: api.Volume{ + Name: "quobyte", + VolumeSource: api.VolumeSource{ + Quobyte: &api.QuobyteVolumeSource{ + Registry: "registry7861", + Volume: "/test", + }, + }, + }, + errtype: field.ErrorTypeInvalid, + errfield: "quobyte.registry", + }, + { + name: "wrong format multiple registries quobyte", + vol: api.Volume{ + Name: "quobyte", + VolumeSource: api.VolumeSource{ + Quobyte: &api.QuobyteVolumeSource{ + Registry: "registry:7861,reg2", + Volume: "/test", + }, + }, + }, + errtype: field.ErrorTypeInvalid, + errfield: "quobyte.registry", + }, + { + name: "empty volume quobyte", + vol: api.Volume{ + Name: "quobyte", + VolumeSource: api.VolumeSource{ + Quobyte: &api.QuobyteVolumeSource{ + Registry: "registry:7861", + }, + }, + }, + errtype: field.ErrorTypeRequired, + errfield: "quobyte.volume", + }, + // AzureDisk + { + name: "valid AzureDisk", + vol: api.Volume{ + Name: "azure-disk", + VolumeSource: api.VolumeSource{ + AzureDisk: &api.AzureDiskVolumeSource{ + DiskName: "foo", + DataDiskURI: "https://blob/vhds/bar.vhd", + }, + }, + }, + }, + { + name: "AzureDisk empty disk name", + vol: api.Volume{ + Name: "azure-disk", + VolumeSource: api.VolumeSource{ + AzureDisk: &api.AzureDiskVolumeSource{ + DiskName: "", + DataDiskURI: "https://blob/vhds/bar.vhd", + }, + }, + }, + errtype: field.ErrorTypeRequired, + errfield: "azureDisk.diskName", + }, + { + name: "AzureDisk empty disk uri", + vol: api.Volume{ + Name: "azure-disk", + VolumeSource: api.VolumeSource{ + AzureDisk: &api.AzureDiskVolumeSource{ + DiskName: "foo", + DataDiskURI: "", + }, + }, + }, + errtype: field.ErrorTypeRequired, + errfield: "azureDisk.diskURI", + }, + // ScaleIO + { + name: "valid scaleio volume", + vol: api.Volume{ + Name: "scaleio-volume", + VolumeSource: api.VolumeSource{ + ScaleIO: &api.ScaleIOVolumeSource{ + Gateway: "http://abcd/efg", + System: "test-system", + VolumeName: "test-vol-1", + }, + }, + }, + }, + { + name: "ScaleIO with empty name", + vol: api.Volume{ + Name: "scaleio-volume", + VolumeSource: api.VolumeSource{ + ScaleIO: &api.ScaleIOVolumeSource{ + Gateway: "http://abcd/efg", + System: "test-system", + VolumeName: "", + }, + }, + }, + errtype: field.ErrorTypeRequired, + errfield: "scaleIO.volumeName", + }, + { + name: "ScaleIO with empty gateway", + vol: api.Volume{ + Name: "scaleio-volume", + VolumeSource: api.VolumeSource{ + ScaleIO: &api.ScaleIOVolumeSource{ + Gateway: "", + System: "test-system", + VolumeName: "test-vol-1", + }, + }, + }, + errtype: field.ErrorTypeRequired, + errfield: "scaleIO.gateway", + }, + { + name: "ScaleIO with empty system", + vol: api.Volume{ + Name: "scaleio-volume", + VolumeSource: api.VolumeSource{ + ScaleIO: &api.ScaleIOVolumeSource{ + Gateway: "http://agc/efg/gateway", + System: "", + VolumeName: "test-vol-1", + }, + }, + }, + errtype: field.ErrorTypeRequired, + errfield: "scaleIO.system", + }, + } + + for i, tc := range testCases { + names, errs := ValidateVolumes([]api.Volume{tc.vol}, field.NewPath("field")) + if len(errs) > 0 && tc.errtype == "" { + t.Errorf("[%d: %q] unexpected error(s): %v", i, tc.name, errs) + } else if len(errs) > 1 { + t.Errorf("[%d: %q] expected 1 error, got %d: %v", i, tc.name, len(errs), errs) + } else if len(errs) == 0 && tc.errtype != "" { + t.Errorf("[%d: %q] expected error type %v", i, tc.name, tc.errtype) + } else if len(errs) == 1 { + if errs[0].Type != tc.errtype { + t.Errorf("[%d: %q] expected error type %v, got %v", i, tc.name, tc.errtype, errs[0].Type) + } else if !strings.HasSuffix(errs[0].Field, "."+tc.errfield) { + t.Errorf("[%d: %q] expected error on field %q, got %q", i, tc.name, tc.errfield, errs[0].Field) + } else if !strings.Contains(errs[0].Detail, tc.errdetail) { + t.Errorf("[%d: %q] expected error detail %q, got %q", i, tc.name, tc.errdetail, errs[0].Detail) + } + } else { + if len(names) != 1 || !names.Has(tc.vol.Name) { + t.Errorf("[%d: %q] wrong names result: %v", i, tc.name, names) + } + } + } + + dupsCase := []api.Volume{ + {Name: "abc", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}, + {Name: "abc", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}, + } + _, errs := ValidateVolumes(dupsCase, field.NewPath("field")) + if len(errs) == 0 { + t.Errorf("expected error") + } else if len(errs) != 1 { + t.Errorf("expected 1 error, got %d: %v", len(errs), errs) + } else if errs[0].Type != field.ErrorTypeDuplicate { + t.Errorf("expected error type %v, got %v", field.ErrorTypeDuplicate, errs[0].Type) + } + + // Validate HugePages medium type for EmptyDir when HugePages feature is enabled/disabled + hugePagesCase := api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{Medium: api.StorageMediumHugePages}} + + // Enable alpha feature HugePages + err := utilfeature.DefaultFeatureGate.Set("HugePages=true") + if err != nil { + t.Errorf("Failed to enable feature gate for HugePages: %v", err) + } + if errs := validateVolumeSource(&hugePagesCase, field.NewPath("field").Index(0), "working"); len(errs) != 0 { + t.Errorf("Unexpected error when HugePages feature is enabled.") + } + + // Disable alpha feature HugePages + err = utilfeature.DefaultFeatureGate.Set("HugePages=false") + if err != nil { + t.Errorf("Failed to disable feature gate for HugePages: %v", err) + } + if errs := validateVolumeSource(&hugePagesCase, field.NewPath("field").Index(0), "failing"); len(errs) == 0 { + t.Errorf("Expected error when HugePages feature is disabled got nothing.") + } + +} + +func TestAlphaHugePagesIsolation(t *testing.T) { + successCases := []api.Pod{ + { // Basic fields. + ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: "ns"}, + Spec: api.PodSpec{ + Containers: []api.Container{ + { + Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File", + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName("hugepages-2Mi"): resource.MustParse("1Gi"), + }, + Limits: api.ResourceList{ + api.ResourceName("hugepages-2Mi"): resource.MustParse("1Gi"), + }, + }, + }, + }, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + }, + } + failureCases := []api.Pod{ + { // Basic fields. + ObjectMeta: metav1.ObjectMeta{Name: "hugepages-shared", Namespace: "ns"}, + Spec: api.PodSpec{ + Containers: []api.Container{ + { + Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File", + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName("hugepages-2Mi"): resource.MustParse("1Gi"), + }, + Limits: api.ResourceList{ + api.ResourceName("hugepages-2Mi"): resource.MustParse("2Gi"), + }, + }, + }, + }, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + }, + { // Basic fields. + ObjectMeta: metav1.ObjectMeta{Name: "hugepages-multiple", Namespace: "ns"}, + Spec: api.PodSpec{ + Containers: []api.Container{ + { + Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File", + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName("hugepages-2Mi"): resource.MustParse("1Gi"), + api.ResourceName("hugepages-1Gi"): resource.MustParse("2Gi"), + }, + Limits: api.ResourceList{ + api.ResourceName("hugepages-2Mi"): resource.MustParse("1Gi"), + api.ResourceName("hugepages-1Gi"): resource.MustParse("2Gi"), + }, + }, + }, + }, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + }, + } + // Enable alpha feature HugePages + err := utilfeature.DefaultFeatureGate.Set("HugePages=true") + if err != nil { + t.Errorf("Failed to enable feature gate for HugePages: %v", err) + return + } + for i := range successCases { + pod := &successCases[i] + if errs := ValidatePod(pod); len(errs) != 0 { + t.Errorf("Unexpected error for case[%d], err: %v", i, errs) + } + } + for i := range failureCases { + pod := &failureCases[i] + if errs := ValidatePod(pod); len(errs) == 0 { + t.Errorf("Expected error for case[%d], pod: %v", i, pod.Name) + } + } + // Disable alpha feature HugePages + err = utilfeature.DefaultFeatureGate.Set("HugePages=false") + if err != nil { + t.Errorf("Failed to disable feature gate for HugePages: %v", err) + return + } + // Disable alpha feature HugePages and ensure all success cases fail + for i := range successCases { + pod := &successCases[i] + if errs := ValidatePod(pod); len(errs) == 0 { + t.Errorf("Expected error for case[%d], pod: %v", i, pod.Name) + } + } +} + +func TestAlphaLocalStorageCapacityIsolation(t *testing.T) { + + testCases := []api.VolumeSource{ + {EmptyDir: &api.EmptyDirVolumeSource{SizeLimit: resource.NewQuantity(int64(5), resource.BinarySI)}}, + } + // Enable alpha feature LocalStorageCapacityIsolation + err := utilfeature.DefaultFeatureGate.Set("LocalStorageCapacityIsolation=true") + if err != nil { + t.Errorf("Failed to enable feature gate for LocalStorageCapacityIsolation: %v", err) + return + } + for _, tc := range testCases { + if errs := validateVolumeSource(&tc, field.NewPath("spec"), "tmpvol"); len(errs) != 0 { + t.Errorf("expected success: %v", errs) + } + } + // Disable alpha feature LocalStorageCapacityIsolation + err = utilfeature.DefaultFeatureGate.Set("LocalStorageCapacityIsolation=false") + if err != nil { + t.Errorf("Failed to disable feature gate for LocalStorageCapacityIsolation: %v", err) + return + } + for _, tc := range testCases { + if errs := validateVolumeSource(&tc, field.NewPath("spec"), "tmpvol"); len(errs) == 0 { + t.Errorf("expected failure: %v", errs) + } + } + + containerLimitCase := api.ResourceRequirements{ + Limits: api.ResourceList{ + api.ResourceEphemeralStorage: *resource.NewMilliQuantity( + int64(40000), + resource.BinarySI), + }, + } + // Enable alpha feature LocalStorageCapacityIsolation + err = utilfeature.DefaultFeatureGate.Set("LocalStorageCapacityIsolation=true") + if err != nil { + t.Errorf("Failed to enable feature gate for LocalStorageCapacityIsolation: %v", err) + return + } + if errs := ValidateResourceRequirements(&containerLimitCase, field.NewPath("resources")); len(errs) != 0 { + t.Errorf("expected success: %v", errs) + } + // Disable alpha feature LocalStorageCapacityIsolation + err = utilfeature.DefaultFeatureGate.Set("LocalStorageCapacityIsolation=false") + if err != nil { + t.Errorf("Failed to disable feature gate for LocalStorageCapacityIsolation: %v", err) + return + } + if errs := ValidateResourceRequirements(&containerLimitCase, field.NewPath("resources")); len(errs) == 0 { + t.Errorf("expected failure: %v", errs) + } + +} + +func TestValidateResourceQuotaWithAlphaLocalStorageCapacityIsolation(t *testing.T) { + spec := api.ResourceQuotaSpec{ + Hard: api.ResourceList{ + api.ResourceCPU: resource.MustParse("100"), + api.ResourceMemory: resource.MustParse("10000"), + api.ResourceRequestsCPU: resource.MustParse("100"), + api.ResourceRequestsMemory: resource.MustParse("10000"), + api.ResourceLimitsCPU: resource.MustParse("100"), + api.ResourceLimitsMemory: resource.MustParse("10000"), + api.ResourcePods: resource.MustParse("10"), + api.ResourceServices: resource.MustParse("0"), + api.ResourceReplicationControllers: resource.MustParse("10"), + api.ResourceQuotas: resource.MustParse("10"), + api.ResourceConfigMaps: resource.MustParse("10"), + api.ResourceSecrets: resource.MustParse("10"), + api.ResourceEphemeralStorage: resource.MustParse("10000"), + api.ResourceRequestsEphemeralStorage: resource.MustParse("10000"), + api.ResourceLimitsEphemeralStorage: resource.MustParse("10000"), + }, + } + resourceQuota := &api.ResourceQuota{ + ObjectMeta: metav1.ObjectMeta{ + Name: "abc", + Namespace: "foo", + }, + Spec: spec, + } + + // Enable alpha feature LocalStorageCapacityIsolation + err := utilfeature.DefaultFeatureGate.Set("LocalStorageCapacityIsolation=true") + if err != nil { + t.Errorf("Failed to enable feature gate for LocalStorageCapacityIsolation: %v", err) + return + } + if errs := ValidateResourceQuota(resourceQuota); len(errs) != 0 { + t.Errorf("expected success: %v", errs) + } + + // Disable alpha feature LocalStorageCapacityIsolation + err = utilfeature.DefaultFeatureGate.Set("LocalStorageCapacityIsolation=false") + if err != nil { + t.Errorf("Failed to disable feature gate for LocalStorageCapacityIsolation: %v", err) + return + } + errs := ValidateResourceQuota(resourceQuota) + if len(errs) == 0 { + t.Errorf("expected failure for %s", resourceQuota.Name) + } + expectedErrMes := "ResourceEphemeralStorage field disabled by feature-gate for ResourceQuota" + for i := range errs { + if !strings.Contains(errs[i].Detail, expectedErrMes) { + t.Errorf("[%s]: expected error detail either empty or %s, got %s", resourceQuota.Name, expectedErrMes, errs[i].Detail) + } + } +} + +func TestValidatePorts(t *testing.T) { + successCase := []api.ContainerPort{ + {Name: "abc", ContainerPort: 80, HostPort: 80, Protocol: "TCP"}, + {Name: "easy", ContainerPort: 82, Protocol: "TCP"}, + {Name: "as", ContainerPort: 83, Protocol: "UDP"}, + {Name: "do-re-me", ContainerPort: 84, Protocol: "UDP"}, + {ContainerPort: 85, Protocol: "TCP"}, + } + if errs := validateContainerPorts(successCase, field.NewPath("field")); len(errs) != 0 { + t.Errorf("expected success: %v", errs) + } + + nonCanonicalCase := []api.ContainerPort{ + {ContainerPort: 80, Protocol: "TCP"}, + } + if errs := validateContainerPorts(nonCanonicalCase, field.NewPath("field")); len(errs) != 0 { + t.Errorf("expected success: %v", errs) + } + + errorCases := map[string]struct { + P []api.ContainerPort + T field.ErrorType + F string + D string + }{ + "name > 15 characters": { + []api.ContainerPort{{Name: strings.Repeat("a", 16), ContainerPort: 80, Protocol: "TCP"}}, + field.ErrorTypeInvalid, + "name", "15", + }, + "name contains invalid characters": { + []api.ContainerPort{{Name: "a.b.c", ContainerPort: 80, Protocol: "TCP"}}, + field.ErrorTypeInvalid, + "name", "alpha-numeric", + }, + "name is a number": { + []api.ContainerPort{{Name: "80", ContainerPort: 80, Protocol: "TCP"}}, + field.ErrorTypeInvalid, + "name", "at least one letter", + }, + "name not unique": { + []api.ContainerPort{ + {Name: "abc", ContainerPort: 80, Protocol: "TCP"}, + {Name: "abc", ContainerPort: 81, Protocol: "TCP"}, + }, + field.ErrorTypeDuplicate, + "[1].name", "", + }, + "zero container port": { + []api.ContainerPort{{ContainerPort: 0, Protocol: "TCP"}}, + field.ErrorTypeRequired, + "containerPort", "", + }, + "invalid container port": { + []api.ContainerPort{{ContainerPort: 65536, Protocol: "TCP"}}, + field.ErrorTypeInvalid, + "containerPort", "between", + }, + "invalid host port": { + []api.ContainerPort{{ContainerPort: 80, HostPort: 65536, Protocol: "TCP"}}, + field.ErrorTypeInvalid, + "hostPort", "between", + }, + "invalid protocol case": { + []api.ContainerPort{{ContainerPort: 80, Protocol: "tcp"}}, + field.ErrorTypeNotSupported, + "protocol", "supported values: TCP, UDP", + }, + "invalid protocol": { + []api.ContainerPort{{ContainerPort: 80, Protocol: "ICMP"}}, + field.ErrorTypeNotSupported, + "protocol", "supported values: TCP, UDP", + }, + "protocol required": { + []api.ContainerPort{{Name: "abc", ContainerPort: 80}}, + field.ErrorTypeRequired, + "protocol", "", + }, + } + for k, v := range errorCases { + errs := validateContainerPorts(v.P, field.NewPath("field")) + if len(errs) == 0 { + t.Errorf("expected failure for %s", k) + } + for i := range errs { + if errs[i].Type != v.T { + t.Errorf("%s: expected error to have type %q: %q", k, v.T, errs[i].Type) + } + if !strings.Contains(errs[i].Field, v.F) { + t.Errorf("%s: expected error field %q: %q", k, v.F, errs[i].Field) + } + if !strings.Contains(errs[i].Detail, v.D) { + t.Errorf("%s: expected error detail %q, got %q", k, v.D, errs[i].Detail) + } + } + } +} + +func TestLocalStorageEnvWithFeatureGate(t *testing.T) { + testCases := []api.EnvVar{ + { + Name: "ephemeral-storage-limits", + ValueFrom: &api.EnvVarSource{ + ResourceFieldRef: &api.ResourceFieldSelector{ + ContainerName: "test-container", + Resource: "limits.ephemeral-storage", + }, + }, + }, + { + Name: "ephemeral-storage-requests", + ValueFrom: &api.EnvVarSource{ + ResourceFieldRef: &api.ResourceFieldSelector{ + ContainerName: "test-container", + Resource: "requests.ephemeral-storage", + }, + }, + }, + } + // Enable alpha feature LocalStorageCapacityIsolation + err := utilfeature.DefaultFeatureGate.Set("LocalStorageCapacityIsolation=true") + if err != nil { + t.Errorf("Failed to enable feature gate for LocalStorageCapacityIsolation: %v", err) + return + } + for _, testCase := range testCases { + if errs := validateEnvVarValueFrom(testCase, field.NewPath("field")); len(errs) != 0 { + t.Errorf("expected success, got: %v", errs) + } + } + + // Disable alpha feature LocalStorageCapacityIsolation + err = utilfeature.DefaultFeatureGate.Set("LocalStorageCapacityIsolation=false") + if err != nil { + t.Errorf("Failed to disable feature gate for LocalStorageCapacityIsolation: %v", err) + return + } + for _, testCase := range testCases { + if errs := validateEnvVarValueFrom(testCase, field.NewPath("field")); len(errs) == 0 { + t.Errorf("expected failure for %v", testCase.Name) + } + } +} + +func TestValidateEnv(t *testing.T) { + successCase := []api.EnvVar{ + {Name: "abc", Value: "value"}, + {Name: "ABC", Value: "value"}, + {Name: "AbC_123", Value: "value"}, + {Name: "abc", Value: ""}, + {Name: "a.b.c", Value: "value"}, + {Name: "a-b-c", Value: "value"}, + { + Name: "abc", + ValueFrom: &api.EnvVarSource{ + FieldRef: &api.ObjectFieldSelector{ + APIVersion: api.Registry.GroupOrDie(api.GroupName).GroupVersion.String(), + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "abc", + ValueFrom: &api.EnvVarSource{ + FieldRef: &api.ObjectFieldSelector{ + APIVersion: api.Registry.GroupOrDie(api.GroupName).GroupVersion.String(), + FieldPath: "metadata.namespace", + }, + }, + }, + { + Name: "abc", + ValueFrom: &api.EnvVarSource{ + FieldRef: &api.ObjectFieldSelector{ + APIVersion: api.Registry.GroupOrDie(api.GroupName).GroupVersion.String(), + FieldPath: "metadata.uid", + }, + }, + }, + { + Name: "abc", + ValueFrom: &api.EnvVarSource{ + FieldRef: &api.ObjectFieldSelector{ + APIVersion: api.Registry.GroupOrDie(api.GroupName).GroupVersion.String(), + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "abc", + ValueFrom: &api.EnvVarSource{ + FieldRef: &api.ObjectFieldSelector{ + APIVersion: api.Registry.GroupOrDie(api.GroupName).GroupVersion.String(), + FieldPath: "spec.serviceAccountName", + }, + }, + }, + { + Name: "abc", + ValueFrom: &api.EnvVarSource{ + FieldRef: &api.ObjectFieldSelector{ + APIVersion: api.Registry.GroupOrDie(api.GroupName).GroupVersion.String(), + FieldPath: "status.hostIP", + }, + }, + }, + { + Name: "abc", + ValueFrom: &api.EnvVarSource{ + FieldRef: &api.ObjectFieldSelector{ + APIVersion: api.Registry.GroupOrDie(api.GroupName).GroupVersion.String(), + FieldPath: "status.podIP", + }, + }, + }, + { + Name: "secret_value", + ValueFrom: &api.EnvVarSource{ + SecretKeyRef: &api.SecretKeySelector{ + LocalObjectReference: api.LocalObjectReference{ + Name: "some-secret", + }, + Key: "secret-key", + }, + }, + }, + { + Name: "ENV_VAR_1", + ValueFrom: &api.EnvVarSource{ + ConfigMapKeyRef: &api.ConfigMapKeySelector{ + LocalObjectReference: api.LocalObjectReference{ + Name: "some-config-map", + }, + Key: "some-key", + }, + }, + }, + } + if errs := ValidateEnv(successCase, field.NewPath("field")); len(errs) != 0 { + t.Errorf("expected success, got: %v", errs) + } + + errorCases := []struct { + name string + envs []api.EnvVar + expectedError string + }{ + { + name: "zero-length name", + envs: []api.EnvVar{{Name: ""}}, + expectedError: "[0].name: Required value", + }, + { + name: "illegal character", + envs: []api.EnvVar{{Name: "a!b"}}, + expectedError: `[0].name: Invalid value: "a!b": ` + envVarNameErrMsg, + }, + { + name: "dot only", + envs: []api.EnvVar{{Name: "."}}, + expectedError: `[0].name: Invalid value: ".": must not be`, + }, + { + name: "double dots only", + envs: []api.EnvVar{{Name: ".."}}, + expectedError: `[0].name: Invalid value: "..": must not be`, + }, + { + name: "leading double dots", + envs: []api.EnvVar{{Name: "..abc"}}, + expectedError: `[0].name: Invalid value: "..abc": must not start with`, + }, + { + name: "value and valueFrom specified", + envs: []api.EnvVar{{ + Name: "abc", + Value: "foo", + ValueFrom: &api.EnvVarSource{ + FieldRef: &api.ObjectFieldSelector{ + APIVersion: api.Registry.GroupOrDie(api.GroupName).GroupVersion.String(), + FieldPath: "metadata.name", + }, + }, + }}, + expectedError: "[0].valueFrom: Invalid value: \"\": may not be specified when `value` is not empty", + }, + { + name: "valueFrom without a source", + envs: []api.EnvVar{{ + Name: "abc", + ValueFrom: &api.EnvVarSource{}, + }}, + expectedError: "[0].valueFrom: Invalid value: \"\": must specify one of: `fieldRef`, `resourceFieldRef`, `configMapKeyRef` or `secretKeyRef`", + }, + { + name: "valueFrom.fieldRef and valueFrom.secretKeyRef specified", + envs: []api.EnvVar{{ + Name: "abc", + ValueFrom: &api.EnvVarSource{ + FieldRef: &api.ObjectFieldSelector{ + APIVersion: api.Registry.GroupOrDie(api.GroupName).GroupVersion.String(), + FieldPath: "metadata.name", + }, + SecretKeyRef: &api.SecretKeySelector{ + LocalObjectReference: api.LocalObjectReference{ + Name: "a-secret", + }, + Key: "a-key", + }, + }, + }}, + expectedError: "[0].valueFrom: Invalid value: \"\": may not have more than one field specified at a time", + }, + { + name: "valueFrom.fieldRef and valueFrom.configMapKeyRef set", + envs: []api.EnvVar{{ + Name: "some_var_name", + ValueFrom: &api.EnvVarSource{ + FieldRef: &api.ObjectFieldSelector{ + APIVersion: api.Registry.GroupOrDie(api.GroupName).GroupVersion.String(), + FieldPath: "metadata.name", + }, + ConfigMapKeyRef: &api.ConfigMapKeySelector{ + LocalObjectReference: api.LocalObjectReference{ + Name: "some-config-map", + }, + Key: "some-key", + }, + }, + }}, + expectedError: `[0].valueFrom: Invalid value: "": may not have more than one field specified at a time`, + }, + { + name: "valueFrom.fieldRef and valueFrom.secretKeyRef specified", + envs: []api.EnvVar{{ + Name: "abc", + ValueFrom: &api.EnvVarSource{ + FieldRef: &api.ObjectFieldSelector{ + APIVersion: api.Registry.GroupOrDie(api.GroupName).GroupVersion.String(), + FieldPath: "metadata.name", + }, + SecretKeyRef: &api.SecretKeySelector{ + LocalObjectReference: api.LocalObjectReference{ + Name: "a-secret", + }, + Key: "a-key", + }, + ConfigMapKeyRef: &api.ConfigMapKeySelector{ + LocalObjectReference: api.LocalObjectReference{ + Name: "some-config-map", + }, + Key: "some-key", + }, + }, + }}, + expectedError: `[0].valueFrom: Invalid value: "": may not have more than one field specified at a time`, + }, + { + name: "valueFrom.secretKeyRef.name invalid", + envs: []api.EnvVar{{ + Name: "abc", + ValueFrom: &api.EnvVarSource{ + SecretKeyRef: &api.SecretKeySelector{ + LocalObjectReference: api.LocalObjectReference{ + Name: "$%^&*#", + }, + Key: "a-key", + }, + }, + }}, + }, + { + name: "valueFrom.configMapKeyRef.name invalid", + envs: []api.EnvVar{{ + Name: "abc", + ValueFrom: &api.EnvVarSource{ + ConfigMapKeyRef: &api.ConfigMapKeySelector{ + LocalObjectReference: api.LocalObjectReference{ + Name: "$%^&*#", + }, + Key: "some-key", + }, + }, + }}, + }, + { + name: "missing FieldPath on ObjectFieldSelector", + envs: []api.EnvVar{{ + Name: "abc", + ValueFrom: &api.EnvVarSource{ + FieldRef: &api.ObjectFieldSelector{ + APIVersion: api.Registry.GroupOrDie(api.GroupName).GroupVersion.String(), + }, + }, + }}, + expectedError: `[0].valueFrom.fieldRef.fieldPath: Required value`, + }, + { + name: "missing APIVersion on ObjectFieldSelector", + envs: []api.EnvVar{{ + Name: "abc", + ValueFrom: &api.EnvVarSource{ + FieldRef: &api.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }}, + expectedError: `[0].valueFrom.fieldRef.apiVersion: Required value`, + }, + { + name: "invalid fieldPath", + envs: []api.EnvVar{{ + Name: "abc", + ValueFrom: &api.EnvVarSource{ + FieldRef: &api.ObjectFieldSelector{ + FieldPath: "metadata.whoops", + APIVersion: api.Registry.GroupOrDie(api.GroupName).GroupVersion.String(), + }, + }, + }}, + expectedError: `[0].valueFrom.fieldRef.fieldPath: Invalid value: "metadata.whoops": error converting fieldPath`, + }, + { + name: "invalid fieldPath labels", + envs: []api.EnvVar{{ + Name: "labels", + ValueFrom: &api.EnvVarSource{ + FieldRef: &api.ObjectFieldSelector{ + FieldPath: "metadata.labels", + APIVersion: "v1", + }, + }, + }}, + expectedError: `[0].valueFrom.fieldRef.fieldPath: Unsupported value: "metadata.labels": supported values: metadata.name, metadata.namespace, metadata.uid, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP`, + }, + { + name: "invalid fieldPath annotations", + envs: []api.EnvVar{{ + Name: "abc", + ValueFrom: &api.EnvVarSource{ + FieldRef: &api.ObjectFieldSelector{ + FieldPath: "metadata.annotations", + APIVersion: "v1", + }, + }, + }}, + expectedError: `[0].valueFrom.fieldRef.fieldPath: Unsupported value: "metadata.annotations": supported values: metadata.name, metadata.namespace, metadata.uid, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP`, + }, + { + name: "unsupported fieldPath", + envs: []api.EnvVar{{ + Name: "abc", + ValueFrom: &api.EnvVarSource{ + FieldRef: &api.ObjectFieldSelector{ + FieldPath: "status.phase", + APIVersion: api.Registry.GroupOrDie(api.GroupName).GroupVersion.String(), + }, + }, + }}, + expectedError: `valueFrom.fieldRef.fieldPath: Unsupported value: "status.phase": supported values: metadata.name, metadata.namespace, metadata.uid, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP`, + }, + } + for _, tc := range errorCases { + if errs := ValidateEnv(tc.envs, field.NewPath("field")); len(errs) == 0 { + t.Errorf("expected failure for %s", tc.name) + } else { + for i := range errs { + str := errs[i].Error() + if str != "" && !strings.Contains(str, tc.expectedError) { + t.Errorf("%s: expected error detail either empty or %q, got %q", tc.name, tc.expectedError, str) + } + } + } + } +} + +func TestValidateEnvFrom(t *testing.T) { + successCase := []api.EnvFromSource{ + { + ConfigMapRef: &api.ConfigMapEnvSource{ + LocalObjectReference: api.LocalObjectReference{Name: "abc"}, + }, + }, + { + Prefix: "pre_", + ConfigMapRef: &api.ConfigMapEnvSource{ + LocalObjectReference: api.LocalObjectReference{Name: "abc"}, + }, + }, + { + Prefix: "a.b", + ConfigMapRef: &api.ConfigMapEnvSource{ + LocalObjectReference: api.LocalObjectReference{Name: "abc"}, + }, + }, + { + SecretRef: &api.SecretEnvSource{ + LocalObjectReference: api.LocalObjectReference{Name: "abc"}, + }, + }, + { + Prefix: "pre_", + SecretRef: &api.SecretEnvSource{ + LocalObjectReference: api.LocalObjectReference{Name: "abc"}, + }, + }, + { + Prefix: "a.b", + SecretRef: &api.SecretEnvSource{ + LocalObjectReference: api.LocalObjectReference{Name: "abc"}, + }, + }, + } + if errs := ValidateEnvFrom(successCase, field.NewPath("field")); len(errs) != 0 { + t.Errorf("expected success: %v", errs) + } + + errorCases := []struct { + name string + envs []api.EnvFromSource + expectedError string + }{ + { + name: "zero-length name", + envs: []api.EnvFromSource{ + { + ConfigMapRef: &api.ConfigMapEnvSource{ + LocalObjectReference: api.LocalObjectReference{Name: ""}}, + }, + }, + expectedError: "field[0].configMapRef.name: Required value", + }, + { + name: "invalid name", + envs: []api.EnvFromSource{ + { + ConfigMapRef: &api.ConfigMapEnvSource{ + LocalObjectReference: api.LocalObjectReference{Name: "$"}}, + }, + }, + expectedError: "field[0].configMapRef.name: Invalid value", + }, + { + name: "invalid prefix", + envs: []api.EnvFromSource{ + { + Prefix: "a!b", + ConfigMapRef: &api.ConfigMapEnvSource{ + LocalObjectReference: api.LocalObjectReference{Name: "abc"}}, + }, + }, + expectedError: `field[0].prefix: Invalid value: "a!b": ` + envVarNameErrMsg, + }, + { + name: "zero-length name", + envs: []api.EnvFromSource{ + { + SecretRef: &api.SecretEnvSource{ + LocalObjectReference: api.LocalObjectReference{Name: ""}}, + }, + }, + expectedError: "field[0].secretRef.name: Required value", + }, + { + name: "invalid name", + envs: []api.EnvFromSource{ + { + SecretRef: &api.SecretEnvSource{ + LocalObjectReference: api.LocalObjectReference{Name: "&"}}, + }, + }, + expectedError: "field[0].secretRef.name: Invalid value", + }, + { + name: "invalid prefix", + envs: []api.EnvFromSource{ + { + Prefix: "a!b", + SecretRef: &api.SecretEnvSource{ + LocalObjectReference: api.LocalObjectReference{Name: "abc"}}, + }, + }, + expectedError: `field[0].prefix: Invalid value: "a!b": ` + envVarNameErrMsg, + }, + { + name: "no refs", + envs: []api.EnvFromSource{ + {}, + }, + expectedError: "field: Invalid value: \"\": must specify one of: `configMapRef` or `secretRef`", + }, + { + name: "multiple refs", + envs: []api.EnvFromSource{ + { + SecretRef: &api.SecretEnvSource{ + LocalObjectReference: api.LocalObjectReference{Name: "abc"}}, + ConfigMapRef: &api.ConfigMapEnvSource{ + LocalObjectReference: api.LocalObjectReference{Name: "abc"}}, + }, + }, + expectedError: "field: Invalid value: \"\": may not have more than one field specified at a time", + }, + { + name: "invalid secret ref name", + envs: []api.EnvFromSource{ + { + SecretRef: &api.SecretEnvSource{ + LocalObjectReference: api.LocalObjectReference{Name: "$%^&*#"}}, + }, + }, + expectedError: "field[0].secretRef.name: Invalid value: \"$%^&*#\": " + dnsSubdomainLabelErrMsg, + }, + { + name: "invalid config ref name", + envs: []api.EnvFromSource{ + { + ConfigMapRef: &api.ConfigMapEnvSource{ + LocalObjectReference: api.LocalObjectReference{Name: "$%^&*#"}}, + }, + }, + expectedError: "field[0].configMapRef.name: Invalid value: \"$%^&*#\": " + dnsSubdomainLabelErrMsg, + }, + } + for _, tc := range errorCases { + if errs := ValidateEnvFrom(tc.envs, field.NewPath("field")); len(errs) == 0 { + t.Errorf("expected failure for %s", tc.name) + } else { + for i := range errs { + str := errs[i].Error() + if str != "" && !strings.Contains(str, tc.expectedError) { + t.Errorf("%s: expected error detail either empty or %q, got %q", tc.name, tc.expectedError, str) + } + } + } + } +} + +func TestValidateVolumeMounts(t *testing.T) { + volumes := sets.NewString("abc", "123", "abc-123") + container := api.Container{ + SecurityContext: nil, + } + propagation := api.MountPropagationBidirectional + + successCase := []api.VolumeMount{ + {Name: "abc", MountPath: "/foo"}, + {Name: "123", MountPath: "/bar"}, + {Name: "abc-123", MountPath: "/baz"}, + {Name: "abc-123", MountPath: "/baa", SubPath: ""}, + {Name: "abc-123", MountPath: "/bab", SubPath: "baz"}, + {Name: "abc-123", MountPath: "/bac", SubPath: ".baz"}, + {Name: "abc-123", MountPath: "/bad", SubPath: "..baz"}, + } + if errs := ValidateVolumeMounts(successCase, volumes, &container, field.NewPath("field")); len(errs) != 0 { + t.Errorf("expected success: %v", errs) + } + + errorCases := map[string][]api.VolumeMount{ + "empty name": {{Name: "", MountPath: "/foo"}}, + "name not found": {{Name: "", MountPath: "/foo"}}, + "empty mountpath": {{Name: "abc", MountPath: ""}}, + "relative mountpath": {{Name: "abc", MountPath: "bar"}}, + "mountpath collision": {{Name: "foo", MountPath: "/path/a"}, {Name: "bar", MountPath: "/path/a"}}, + "absolute subpath": {{Name: "abc", MountPath: "/bar", SubPath: "/baz"}}, + "subpath in ..": {{Name: "abc", MountPath: "/bar", SubPath: "../baz"}}, + "subpath contains ..": {{Name: "abc", MountPath: "/bar", SubPath: "baz/../bat"}}, + "subpath ends in ..": {{Name: "abc", MountPath: "/bar", SubPath: "./.."}}, + "disabled MountPropagation feature gate": {{Name: "abc", MountPath: "/bar", MountPropagation: &propagation}}, + } + for k, v := range errorCases { + if errs := ValidateVolumeMounts(v, volumes, &container, field.NewPath("field")); len(errs) == 0 { + t.Errorf("expected failure for %s", k) + } + } +} + +func TestValidateMountPropagation(t *testing.T) { + bTrue := true + bFalse := false + privilegedContainer := &api.Container{ + SecurityContext: &api.SecurityContext{ + Privileged: &bTrue, + }, + } + nonPrivilegedContainer := &api.Container{ + SecurityContext: &api.SecurityContext{ + Privileged: &bFalse, + }, + } + defaultContainer := &api.Container{} + + propagationBidirectional := api.MountPropagationBidirectional + propagationHostToContainer := api.MountPropagationHostToContainer + propagationInvalid := api.MountPropagationMode("invalid") + + tests := []struct { + mount api.VolumeMount + container *api.Container + expectError bool + }{ + { + // implicitly non-privileged container + no propagation + api.VolumeMount{Name: "foo", MountPath: "/foo"}, + defaultContainer, + false, + }, + { + // implicitly non-privileged container + HostToContainer + api.VolumeMount{Name: "foo", MountPath: "/foo", MountPropagation: &propagationHostToContainer}, + defaultContainer, + false, + }, + { + // error: implicitly non-privileged container + Bidirectional + api.VolumeMount{Name: "foo", MountPath: "/foo", MountPropagation: &propagationBidirectional}, + defaultContainer, + true, + }, + { + // explicitly non-privileged container + no propagation + api.VolumeMount{Name: "foo", MountPath: "/foo"}, + nonPrivilegedContainer, + false, + }, + { + // explicitly non-privileged container + HostToContainer + api.VolumeMount{Name: "foo", MountPath: "/foo", MountPropagation: &propagationHostToContainer}, + nonPrivilegedContainer, + false, + }, + { + // explicitly non-privileged container + HostToContainer + api.VolumeMount{Name: "foo", MountPath: "/foo", MountPropagation: &propagationBidirectional}, + nonPrivilegedContainer, + true, + }, + { + // privileged container + no propagation + api.VolumeMount{Name: "foo", MountPath: "/foo"}, + privilegedContainer, + false, + }, + { + // privileged container + HostToContainer + api.VolumeMount{Name: "foo", MountPath: "/foo", MountPropagation: &propagationHostToContainer}, + privilegedContainer, + false, + }, + { + // privileged container + Bidirectional + api.VolumeMount{Name: "foo", MountPath: "/foo", MountPropagation: &propagationBidirectional}, + privilegedContainer, + false, + }, + { + // error: privileged container + invalid mount propagation + api.VolumeMount{Name: "foo", MountPath: "/foo", MountPropagation: &propagationInvalid}, + privilegedContainer, + true, + }, + { + // no container + Bidirectional + api.VolumeMount{Name: "foo", MountPath: "/foo", MountPropagation: &propagationBidirectional}, + nil, + false, + }, + } + + // Enable MountPropagation for this test + priorityEnabled := utilfeature.DefaultFeatureGate.Enabled("MountPropagation") + defer func() { + var err error + // restoring the old value + if priorityEnabled { + err = utilfeature.DefaultFeatureGate.Set("MountPropagation=true") + } else { + err = utilfeature.DefaultFeatureGate.Set("MountPropagation=false") + } + if err != nil { + t.Errorf("Failed to restore feature gate for MountPropagation: %v", err) + } + }() + err := utilfeature.DefaultFeatureGate.Set("MountPropagation=true") + if err != nil { + t.Errorf("Failed to enable feature gate for MountPropagation: %v", err) + return + } + + for i, test := range tests { + volumes := sets.NewString("foo") + errs := ValidateVolumeMounts([]api.VolumeMount{test.mount}, volumes, test.container, field.NewPath("field")) + if test.expectError && len(errs) == 0 { + t.Errorf("test %d expected error, got none", i) + } + if !test.expectError && len(errs) != 0 { + t.Errorf("test %d expected success, got error: %v", i, errs) + } + } + +} + +func TestValidateProbe(t *testing.T) { + handler := api.Handler{Exec: &api.ExecAction{Command: []string{"echo"}}} + // These fields must be positive. + positiveFields := [...]string{"InitialDelaySeconds", "TimeoutSeconds", "PeriodSeconds", "SuccessThreshold", "FailureThreshold"} + successCases := []*api.Probe{nil} + for _, field := range positiveFields { + probe := &api.Probe{Handler: handler} + reflect.ValueOf(probe).Elem().FieldByName(field).SetInt(10) + successCases = append(successCases, probe) + } + + for _, p := range successCases { + if errs := validateProbe(p, field.NewPath("field")); len(errs) != 0 { + t.Errorf("expected success: %v", errs) + } + } + + errorCases := []*api.Probe{{TimeoutSeconds: 10, InitialDelaySeconds: 10}} + for _, field := range positiveFields { + probe := &api.Probe{Handler: handler} + reflect.ValueOf(probe).Elem().FieldByName(field).SetInt(-10) + errorCases = append(errorCases, probe) + } + for _, p := range errorCases { + if errs := validateProbe(p, field.NewPath("field")); len(errs) == 0 { + t.Errorf("expected failure for %v", p) + } + } +} + +func TestValidateHandler(t *testing.T) { + successCases := []api.Handler{ + {Exec: &api.ExecAction{Command: []string{"echo"}}}, + {HTTPGet: &api.HTTPGetAction{Path: "/", Port: intstr.FromInt(1), Host: "", Scheme: "HTTP"}}, + {HTTPGet: &api.HTTPGetAction{Path: "/foo", Port: intstr.FromInt(65535), Host: "host", Scheme: "HTTP"}}, + {HTTPGet: &api.HTTPGetAction{Path: "/", Port: intstr.FromString("port"), Host: "", Scheme: "HTTP"}}, + {HTTPGet: &api.HTTPGetAction{Path: "/", Port: intstr.FromString("port"), Host: "", Scheme: "HTTP", HTTPHeaders: []api.HTTPHeader{{Name: "Host", Value: "foo.example.com"}}}}, + {HTTPGet: &api.HTTPGetAction{Path: "/", Port: intstr.FromString("port"), Host: "", Scheme: "HTTP", HTTPHeaders: []api.HTTPHeader{{Name: "X-Forwarded-For", Value: "1.2.3.4"}, {Name: "X-Forwarded-For", Value: "5.6.7.8"}}}}, + } + for _, h := range successCases { + if errs := validateHandler(&h, field.NewPath("field")); len(errs) != 0 { + t.Errorf("expected success: %v", errs) + } + } + + errorCases := []api.Handler{ + {}, + {Exec: &api.ExecAction{Command: []string{}}}, + {HTTPGet: &api.HTTPGetAction{Path: "", Port: intstr.FromInt(0), Host: ""}}, + {HTTPGet: &api.HTTPGetAction{Path: "/foo", Port: intstr.FromInt(65536), Host: "host"}}, + {HTTPGet: &api.HTTPGetAction{Path: "", Port: intstr.FromString(""), Host: ""}}, + {HTTPGet: &api.HTTPGetAction{Path: "/", Port: intstr.FromString("port"), Host: "", Scheme: "HTTP", HTTPHeaders: []api.HTTPHeader{{Name: "Host:", Value: "foo.example.com"}}}}, + {HTTPGet: &api.HTTPGetAction{Path: "/", Port: intstr.FromString("port"), Host: "", Scheme: "HTTP", HTTPHeaders: []api.HTTPHeader{{Name: "X_Forwarded_For", Value: "foo.example.com"}}}}, + } + for _, h := range errorCases { + if errs := validateHandler(&h, field.NewPath("field")); len(errs) == 0 { + t.Errorf("expected failure for %#v", h) + } + } +} + +func TestValidatePullPolicy(t *testing.T) { + type T struct { + Container api.Container + ExpectedPolicy api.PullPolicy + } + testCases := map[string]T{ + "NotPresent1": { + api.Container{Name: "abc", Image: "image:latest", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}, + api.PullIfNotPresent, + }, + "NotPresent2": { + api.Container{Name: "abc1", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}, + api.PullIfNotPresent, + }, + "Always1": { + api.Container{Name: "123", Image: "image:latest", ImagePullPolicy: "Always"}, + api.PullAlways, + }, + "Always2": { + api.Container{Name: "1234", Image: "image", ImagePullPolicy: "Always"}, + api.PullAlways, + }, + "Never1": { + api.Container{Name: "abc-123", Image: "image:latest", ImagePullPolicy: "Never"}, + api.PullNever, + }, + "Never2": { + api.Container{Name: "abc-1234", Image: "image", ImagePullPolicy: "Never"}, + api.PullNever, + }, + } + for k, v := range testCases { + ctr := &v.Container + errs := validatePullPolicy(ctr.ImagePullPolicy, field.NewPath("field")) + if len(errs) != 0 { + t.Errorf("case[%s] expected success, got %#v", k, errs) + } + if ctr.ImagePullPolicy != v.ExpectedPolicy { + t.Errorf("case[%s] expected policy %v, got %v", k, v.ExpectedPolicy, ctr.ImagePullPolicy) + } + } +} + +func getResourceLimits(cpu, memory string) api.ResourceList { + res := api.ResourceList{} + res[api.ResourceCPU] = resource.MustParse(cpu) + res[api.ResourceMemory] = resource.MustParse(memory) + return res +} + +func TestValidateContainers(t *testing.T) { + volumes := sets.String{} + capabilities.SetForTests(capabilities.Capabilities{ + AllowPrivileged: true, + }) + + successCase := []api.Container{ + {Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}, + // backwards compatibility to ensure containers in pod template spec do not check for this + {Name: "def", Image: " ", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}, + {Name: "ghi", Image: " some ", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}, + {Name: "123", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}, + {Name: "abc-123", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}, + { + Name: "life-123", + Image: "image", + Lifecycle: &api.Lifecycle{ + PreStop: &api.Handler{ + Exec: &api.ExecAction{Command: []string{"ls", "-l"}}, + }, + }, + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", + }, + { + Name: "resources-test", + Image: "image", + Resources: api.ResourceRequirements{ + Limits: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("10"), + api.ResourceName(api.ResourceMemory): resource.MustParse("10G"), + api.ResourceName("my.org/resource"): resource.MustParse("10"), + }, + }, + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", + }, + { + Name: "resources-test-with-gpu-with-request", + Image: "image", + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("10"), + api.ResourceName(api.ResourceMemory): resource.MustParse("10G"), + api.ResourceName(api.ResourceNvidiaGPU): resource.MustParse("1"), + }, + Limits: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("10"), + api.ResourceName(api.ResourceMemory): resource.MustParse("10G"), + api.ResourceName(api.ResourceNvidiaGPU): resource.MustParse("1"), + }, + }, + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", + }, + { + Name: "resources-test-with-gpu-without-request", + Image: "image", + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("10"), + api.ResourceName(api.ResourceMemory): resource.MustParse("10G"), + }, + Limits: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("10"), + api.ResourceName(api.ResourceMemory): resource.MustParse("10G"), + api.ResourceName(api.ResourceNvidiaGPU): resource.MustParse("1"), + }, + }, + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", + }, + { + Name: "resources-request-limit-simple", + Image: "image", + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("8"), + }, + Limits: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("10"), + }, + }, + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", + }, + { + Name: "resources-request-limit-edge", + Image: "image", + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("10"), + api.ResourceName(api.ResourceMemory): resource.MustParse("10G"), + api.ResourceName("my.org/resource"): resource.MustParse("10"), + }, + Limits: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("10"), + api.ResourceName(api.ResourceMemory): resource.MustParse("10G"), + api.ResourceName("my.org/resource"): resource.MustParse("10"), + }, + }, + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", + }, + { + Name: "resources-request-limit-partials", + Image: "image", + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("9.5"), + api.ResourceName(api.ResourceMemory): resource.MustParse("10G"), + }, + Limits: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("10"), + api.ResourceName("my.org/resource"): resource.MustParse("10"), + }, + }, + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", + }, + { + Name: "resources-request", + Image: "image", + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("9.5"), + api.ResourceName(api.ResourceMemory): resource.MustParse("10G"), + }, + }, + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", + }, + { + Name: "same-host-port-different-protocol", + Image: "image", + Ports: []api.ContainerPort{ + {ContainerPort: 80, HostPort: 80, Protocol: "TCP"}, + {ContainerPort: 80, HostPort: 80, Protocol: "UDP"}, + }, + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", + }, + { + Name: "fallback-to-logs-termination-message", + Image: "image", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "FallbackToLogsOnError", + }, + { + Name: "file-termination-message", + Image: "image", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", + }, + { + Name: "env-from-source", + Image: "image", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", + EnvFrom: []api.EnvFromSource{ + { + ConfigMapRef: &api.ConfigMapEnvSource{ + LocalObjectReference: api.LocalObjectReference{ + Name: "test", + }, + }, + }, + }, + }, + {Name: "abc-1234", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File", SecurityContext: fakeValidSecurityContext(true)}, + } + if errs := validateContainers(successCase, volumes, field.NewPath("field")); len(errs) != 0 { + t.Errorf("expected success: %v", errs) + } + + capabilities.SetForTests(capabilities.Capabilities{ + AllowPrivileged: false, + }) + errorCases := map[string][]api.Container{ + "zero-length name": {{Name: "", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + "zero-length-image": {{Name: "abc", Image: "", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + "name > 63 characters": {{Name: strings.Repeat("a", 64), Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + "name not a DNS label": {{Name: "a.b.c", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + "name not unique": { + {Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}, + {Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}, + }, + "zero-length image": {{Name: "abc", Image: "", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + "host port not unique": { + {Name: "abc", Image: "image", Ports: []api.ContainerPort{{ContainerPort: 80, HostPort: 80, Protocol: "TCP"}}, + ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}, + {Name: "def", Image: "image", Ports: []api.ContainerPort{{ContainerPort: 81, HostPort: 80, Protocol: "TCP"}}, + ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}, + }, + "invalid env var name": { + {Name: "abc", Image: "image", Env: []api.EnvVar{{Name: "ev!1"}}, ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}, + }, + "unknown volume name": { + {Name: "abc", Image: "image", VolumeMounts: []api.VolumeMount{{Name: "anything", MountPath: "/foo"}}, + ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}, + }, + "invalid lifecycle, no exec command.": { + { + Name: "life-123", + Image: "image", + Lifecycle: &api.Lifecycle{ + PreStop: &api.Handler{ + Exec: &api.ExecAction{}, + }, + }, + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", + }, + }, + "invalid lifecycle, no http path.": { + { + Name: "life-123", + Image: "image", + Lifecycle: &api.Lifecycle{ + PreStop: &api.Handler{ + HTTPGet: &api.HTTPGetAction{}, + }, + }, + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", + }, + }, + "invalid lifecycle, no tcp socket port.": { + { + Name: "life-123", + Image: "image", + Lifecycle: &api.Lifecycle{ + PreStop: &api.Handler{ + TCPSocket: &api.TCPSocketAction{}, + }, + }, + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", + }, + }, + "invalid lifecycle, zero tcp socket port.": { + { + Name: "life-123", + Image: "image", + Lifecycle: &api.Lifecycle{ + PreStop: &api.Handler{ + TCPSocket: &api.TCPSocketAction{ + Port: intstr.FromInt(0), + }, + }, + }, + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", + }, + }, + "invalid lifecycle, no action.": { + { + Name: "life-123", + Image: "image", + Lifecycle: &api.Lifecycle{ + PreStop: &api.Handler{}, + }, + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", + }, + }, + "invalid liveness probe, no tcp socket port.": { + { + Name: "life-123", + Image: "image", + LivenessProbe: &api.Probe{ + Handler: api.Handler{ + TCPSocket: &api.TCPSocketAction{}, + }, + }, + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", + }, + }, + "invalid liveness probe, no action.": { + { + Name: "life-123", + Image: "image", + LivenessProbe: &api.Probe{ + Handler: api.Handler{}, + }, + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", + }, + }, + "invalid message termination policy": { + { + Name: "life-123", + Image: "image", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "Unknown", + }, + }, + "empty message termination policy": { + { + Name: "life-123", + Image: "image", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "", + }, + }, + "privilege disabled": { + {Name: "abc", Image: "image", SecurityContext: fakeValidSecurityContext(true)}, + }, + "invalid compute resource": { + { + Name: "abc-123", + Image: "image", + Resources: api.ResourceRequirements{ + Limits: api.ResourceList{ + "disk": resource.MustParse("10G"), + }, + }, + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", + }, + }, + "Resource CPU invalid": { + { + Name: "abc-123", + Image: "image", + Resources: api.ResourceRequirements{ + Limits: getResourceLimits("-10", "0"), + }, + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", + }, + }, + "Resource Requests CPU invalid": { + { + Name: "abc-123", + Image: "image", + Resources: api.ResourceRequirements{ + Requests: getResourceLimits("-10", "0"), + }, + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", + }, + }, + "Resource Memory invalid": { + { + Name: "abc-123", + Image: "image", + Resources: api.ResourceRequirements{ + Limits: getResourceLimits("0", "-10"), + }, + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", + }, + }, + "Resource GPU limit must match request": { + { + Name: "gpu-resource-request-limit", + Image: "image", + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("10"), + api.ResourceName(api.ResourceMemory): resource.MustParse("10G"), + api.ResourceName(api.ResourceNvidiaGPU): resource.MustParse("0"), + }, + Limits: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("10"), + api.ResourceName(api.ResourceMemory): resource.MustParse("10G"), + api.ResourceName(api.ResourceNvidiaGPU): resource.MustParse("1"), + }, + }, + TerminationMessagePolicy: "File", + ImagePullPolicy: "IfNotPresent", + }, + }, + "Resource GPU invalid setting only request": { + { + Name: "gpu-resource-request-limit", + Image: "image", + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("10"), + api.ResourceName(api.ResourceMemory): resource.MustParse("10G"), + api.ResourceName(api.ResourceNvidiaGPU): resource.MustParse("1"), + }, + }, + TerminationMessagePolicy: "File", + ImagePullPolicy: "IfNotPresent", + }, + }, + "Request limit simple invalid": { + { + Name: "abc-123", + Image: "image", + Resources: api.ResourceRequirements{ + Limits: getResourceLimits("5", "3"), + Requests: getResourceLimits("6", "3"), + }, + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", + }, + }, + "Request limit multiple invalid": { + { + Name: "abc-123", + Image: "image", + Resources: api.ResourceRequirements{ + Limits: getResourceLimits("5", "3"), + Requests: getResourceLimits("6", "4"), + }, + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", + }, + }, + "Invalid env from": { + { + Name: "env-from-source", + Image: "image", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", + EnvFrom: []api.EnvFromSource{ + { + ConfigMapRef: &api.ConfigMapEnvSource{ + LocalObjectReference: api.LocalObjectReference{ + Name: "$%^&*#", + }, + }, + }, + }, + }, + }, + } + for k, v := range errorCases { + if errs := validateContainers(v, volumes, field.NewPath("field")); len(errs) == 0 { + t.Errorf("expected failure for %s", k) + } + } +} + +func TestValidateRestartPolicy(t *testing.T) { + successCases := []api.RestartPolicy{ + api.RestartPolicyAlways, + api.RestartPolicyOnFailure, + api.RestartPolicyNever, + } + for _, policy := range successCases { + if errs := validateRestartPolicy(&policy, field.NewPath("field")); len(errs) != 0 { + t.Errorf("expected success: %v", errs) + } + } + + errorCases := []api.RestartPolicy{"", "newpolicy"} + + for k, policy := range errorCases { + if errs := validateRestartPolicy(&policy, field.NewPath("field")); len(errs) == 0 { + t.Errorf("expected failure for %d", k) + } + } +} + +func TestValidateDNSPolicy(t *testing.T) { + successCases := []api.DNSPolicy{api.DNSClusterFirst, api.DNSDefault, api.DNSPolicy(api.DNSClusterFirst)} + for _, policy := range successCases { + if errs := validateDNSPolicy(&policy, field.NewPath("field")); len(errs) != 0 { + t.Errorf("expected success: %v", errs) + } + } + + errorCases := []api.DNSPolicy{api.DNSPolicy("invalid")} + for _, policy := range errorCases { + if errs := validateDNSPolicy(&policy, field.NewPath("field")); len(errs) == 0 { + t.Errorf("expected failure for %v", policy) + } + } +} + +func TestValidatePodSpec(t *testing.T) { + activeDeadlineSeconds := int64(30) + activeDeadlineSecondsMax := int64(math.MaxInt32) + + minUserID := int64(0) + maxUserID := int64(2147483647) + minGroupID := int64(0) + maxGroupID := int64(2147483647) + + priorityEnabled := utilfeature.DefaultFeatureGate.Enabled("PodPriority") + defer func() { + var err error + // restoring the old value + if priorityEnabled { + err = utilfeature.DefaultFeatureGate.Set("PodPriority=true") + } else { + err = utilfeature.DefaultFeatureGate.Set("PodPriority=false") + } + if err != nil { + t.Errorf("Failed to restore feature gate for PodPriority: %v", err) + } + }() + err := utilfeature.DefaultFeatureGate.Set("PodPriority=true") + if err != nil { + t.Errorf("Failed to enable feature gate for PodPriority: %v", err) + return + } + successCases := []api.PodSpec{ + { // Populate basic fields, leave defaults for most. + Volumes: []api.Volume{{Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + { // Populate all fields. + Volumes: []api.Volume{ + {Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}, + }, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + InitContainers: []api.Container{{Name: "ictr", Image: "iimage", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + RestartPolicy: api.RestartPolicyAlways, + NodeSelector: map[string]string{ + "key": "value", + }, + NodeName: "foobar", + DNSPolicy: api.DNSClusterFirst, + ActiveDeadlineSeconds: &activeDeadlineSeconds, + ServiceAccountName: "acct", + }, + { // Populate all fields with larger active deadline. + Volumes: []api.Volume{ + {Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}, + }, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + InitContainers: []api.Container{{Name: "ictr", Image: "iimage", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + RestartPolicy: api.RestartPolicyAlways, + NodeSelector: map[string]string{ + "key": "value", + }, + NodeName: "foobar", + DNSPolicy: api.DNSClusterFirst, + ActiveDeadlineSeconds: &activeDeadlineSecondsMax, + ServiceAccountName: "acct", + }, + { // Populate HostNetwork. + Containers: []api.Container{ + {Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File", + Ports: []api.ContainerPort{ + {HostPort: 8080, ContainerPort: 8080, Protocol: "TCP"}}, + }, + }, + SecurityContext: &api.PodSecurityContext{ + HostNetwork: true, + }, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + { // Populate RunAsUser SupplementalGroups FSGroup with minID 0 + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + SecurityContext: &api.PodSecurityContext{ + SupplementalGroups: []int64{minGroupID}, + RunAsUser: &minUserID, + FSGroup: &minGroupID, + }, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + { // Populate RunAsUser SupplementalGroups FSGroup with maxID 2147483647 + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + SecurityContext: &api.PodSecurityContext{ + SupplementalGroups: []int64{maxGroupID}, + RunAsUser: &maxUserID, + FSGroup: &maxGroupID, + }, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + { // Populate HostIPC. + SecurityContext: &api.PodSecurityContext{ + HostIPC: true, + }, + Volumes: []api.Volume{{Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + { // Populate HostPID. + SecurityContext: &api.PodSecurityContext{ + HostPID: true, + }, + Volumes: []api.Volume{{Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + { // Populate Affinity. + Volumes: []api.Volume{{Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + { // Populate HostAliases. + HostAliases: []api.HostAlias{{IP: "12.34.56.78", Hostnames: []string{"host1", "host2"}}}, + Volumes: []api.Volume{{Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + { // Populate HostAliases with `foo.bar` hostnames. + HostAliases: []api.HostAlias{{IP: "12.34.56.78", Hostnames: []string{"host1.foo", "host2.bar"}}}, + Volumes: []api.Volume{{Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + { // Populate HostAliases with HostNetwork. + HostAliases: []api.HostAlias{{IP: "12.34.56.78", Hostnames: []string{"host1.foo", "host2.bar"}}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + SecurityContext: &api.PodSecurityContext{ + HostNetwork: true, + }, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + { // Populate PriorityClassName. + Volumes: []api.Volume{{Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + PriorityClassName: "valid-name", + }, + } + for i := range successCases { + if errs := ValidatePodSpec(&successCases[i], field.NewPath("field")); len(errs) != 0 { + t.Errorf("expected success: %v", errs) + } + } + + activeDeadlineSeconds = int64(0) + activeDeadlineSecondsTooLarge := int64(math.MaxInt32 + 1) + + minUserID = int64(-1) + maxUserID = int64(2147483648) + minGroupID = int64(-1) + maxGroupID = int64(2147483648) + + failureCases := map[string]api.PodSpec{ + "bad volume": { + Volumes: []api.Volume{{}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + }, + "no containers": { + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + "bad container": { + Containers: []api.Container{{}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + "bad init container": { + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + InitContainers: []api.Container{{}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + "bad DNS policy": { + DNSPolicy: api.DNSPolicy("invalid"), + RestartPolicy: api.RestartPolicyAlways, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + }, + "bad service account name": { + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + ServiceAccountName: "invalidName", + }, + "bad restart policy": { + RestartPolicy: "UnknowPolicy", + DNSPolicy: api.DNSClusterFirst, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + }, + "with hostNetwork hostPort not equal to containerPort": { + Containers: []api.Container{ + {Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", Ports: []api.ContainerPort{ + {HostPort: 8080, ContainerPort: 2600, Protocol: "TCP"}}, + }, + }, + SecurityContext: &api.PodSecurityContext{ + HostNetwork: true, + }, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + "with hostAliases with invalid IP": { + SecurityContext: &api.PodSecurityContext{ + HostNetwork: false, + }, + HostAliases: []api.HostAlias{{IP: "999.999.999.999", Hostnames: []string{"host1", "host2"}}}, + }, + "with hostAliases with invalid hostname": { + SecurityContext: &api.PodSecurityContext{ + HostNetwork: false, + }, + HostAliases: []api.HostAlias{{IP: "12.34.56.78", Hostnames: []string{"@#$^#@#$"}}}, + }, + "bad supplementalGroups large than math.MaxInt32": { + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + SecurityContext: &api.PodSecurityContext{ + HostNetwork: false, + SupplementalGroups: []int64{maxGroupID, 1234}, + }, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + "bad supplementalGroups less than 0": { + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + SecurityContext: &api.PodSecurityContext{ + HostNetwork: false, + SupplementalGroups: []int64{minGroupID, 1234}, + }, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + "bad runAsUser large than math.MaxInt32": { + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + SecurityContext: &api.PodSecurityContext{ + HostNetwork: false, + RunAsUser: &maxUserID, + }, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + "bad runAsUser less than 0": { + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + SecurityContext: &api.PodSecurityContext{ + HostNetwork: false, + RunAsUser: &minUserID, + }, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + "bad fsGroup large than math.MaxInt32": { + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + SecurityContext: &api.PodSecurityContext{ + HostNetwork: false, + FSGroup: &maxGroupID, + }, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + "bad fsGroup less than 0": { + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + SecurityContext: &api.PodSecurityContext{ + HostNetwork: false, + FSGroup: &minGroupID, + }, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + "bad-active-deadline-seconds": { + Volumes: []api.Volume{ + {Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}, + }, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + RestartPolicy: api.RestartPolicyAlways, + NodeSelector: map[string]string{ + "key": "value", + }, + NodeName: "foobar", + DNSPolicy: api.DNSClusterFirst, + ActiveDeadlineSeconds: &activeDeadlineSeconds, + }, + "active-deadline-seconds-too-large": { + Volumes: []api.Volume{ + {Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}, + }, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + RestartPolicy: api.RestartPolicyAlways, + NodeSelector: map[string]string{ + "key": "value", + }, + NodeName: "foobar", + DNSPolicy: api.DNSClusterFirst, + ActiveDeadlineSeconds: &activeDeadlineSecondsTooLarge, + }, + "bad nodeName": { + NodeName: "node name", + Volumes: []api.Volume{{Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + "bad PriorityClassName": { + Volumes: []api.Volume{{Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + PriorityClassName: "InvalidName", + }, + "with privileged and allowPrivilegeEscalation false": { + Containers: []api.Container{ + { + Name: "ctr", + Image: "image", + ImagePullPolicy: "IfNotPresent", + Ports: []api.ContainerPort{ + {HostPort: 8080, ContainerPort: 2600, Protocol: "TCP"}}, + SecurityContext: &api.SecurityContext{ + Privileged: boolPtr(true), + AllowPrivilegeEscalation: boolPtr(false), + }, + }, + }, + }, + "with CAP_SYS_ADMIN and allowPrivilegeEscalation false": { + Containers: []api.Container{ + { + Name: "ctr", + Image: "image", + ImagePullPolicy: "IfNotPresent", + Ports: []api.ContainerPort{ + {HostPort: 8080, ContainerPort: 2600, Protocol: "TCP"}}, + SecurityContext: &api.SecurityContext{ + Capabilities: &api.Capabilities{ + Add: []api.Capability{"CAP_SYS_ADMIN"}, + }, + AllowPrivilegeEscalation: boolPtr(false), + }, + }, + }, + }, + } + for k, v := range failureCases { + if errs := ValidatePodSpec(&v, field.NewPath("field")); len(errs) == 0 { + t.Errorf("expected failure for %q", k) + } + } + + err = utilfeature.DefaultFeatureGate.Set("PodPriority=false") + if err != nil { + t.Errorf("Failed to disable feature gate for PodPriority: %v", err) + return + } + priority := int32(100) + featuregatedCases := map[string]api.PodSpec{ + "set PriorityClassName": { + Volumes: []api.Volume{{Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + PriorityClassName: "valid-name", + }, + "set Priority": { + Volumes: []api.Volume{{Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + Priority: &priority, + }, + } + for k, v := range featuregatedCases { + if errs := ValidatePodSpec(&v, field.NewPath("field")); len(errs) == 0 { + t.Errorf("expected failure due to gated feature: %q", k) + } + } +} + +func extendPodSpecwithTolerations(in api.PodSpec, tolerations []api.Toleration) api.PodSpec { + var out api.PodSpec + out.Containers = in.Containers + out.RestartPolicy = in.RestartPolicy + out.DNSPolicy = in.DNSPolicy + out.Tolerations = tolerations + return out +} + +func TestValidatePod(t *testing.T) { + validPodSpec := func(affinity *api.Affinity) api.PodSpec { + spec := api.PodSpec{ + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + } + if affinity != nil { + spec.Affinity = affinity + } + return spec + } + + successCases := []api.Pod{ + { // Basic fields. + ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: "ns"}, + Spec: api.PodSpec{ + Volumes: []api.Volume{{Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + }, + { // Just about everything. + ObjectMeta: metav1.ObjectMeta{Name: "abc.123.do-re-mi", Namespace: "ns"}, + Spec: api.PodSpec{ + Volumes: []api.Volume{ + {Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}, + }, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + NodeSelector: map[string]string{ + "key": "value", + }, + NodeName: "foobar", + }, + }, + { // Serialized node affinity requirements. + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + }, + Spec: validPodSpec( + // TODO: Uncomment and move this block and move inside NodeAffinity once + // RequiredDuringSchedulingRequiredDuringExecution is implemented + // RequiredDuringSchedulingRequiredDuringExecution: &api.NodeSelector{ + // NodeSelectorTerms: []api.NodeSelectorTerm{ + // { + // MatchExpressions: []api.NodeSelectorRequirement{ + // { + // Key: "key1", + // Operator: api.NodeSelectorOpExists + // }, + // }, + // }, + // }, + // }, + &api.Affinity{ + NodeAffinity: &api.NodeAffinity{ + RequiredDuringSchedulingIgnoredDuringExecution: &api.NodeSelector{ + NodeSelectorTerms: []api.NodeSelectorTerm{ + { + MatchExpressions: []api.NodeSelectorRequirement{ + { + Key: "key2", + Operator: api.NodeSelectorOpIn, + Values: []string{"value1", "value2"}, + }, + }, + }, + }, + }, + PreferredDuringSchedulingIgnoredDuringExecution: []api.PreferredSchedulingTerm{ + { + Weight: 10, + Preference: api.NodeSelectorTerm{ + MatchExpressions: []api.NodeSelectorRequirement{ + { + Key: "foo", + Operator: api.NodeSelectorOpIn, + Values: []string{"bar"}, + }, + }, + }, + }, + }, + }, + }, + ), + }, + { // Serialized pod affinity in affinity requirements in annotations. + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + // TODO: Uncomment and move this block into Annotations map once + // RequiredDuringSchedulingRequiredDuringExecution is implemented + // "requiredDuringSchedulingRequiredDuringExecution": [{ + // "labelSelector": { + // "matchExpressions": [{ + // "key": "key2", + // "operator": "In", + // "values": ["value1", "value2"] + // }] + // }, + // "namespaces":["ns"], + // "topologyKey": "zone" + // }] + }, + Spec: validPodSpec(&api.Affinity{ + PodAffinity: &api.PodAffinity{ + RequiredDuringSchedulingIgnoredDuringExecution: []api.PodAffinityTerm{ + { + LabelSelector: &metav1.LabelSelector{ + MatchExpressions: []metav1.LabelSelectorRequirement{ + { + Key: "key2", + Operator: metav1.LabelSelectorOpIn, + Values: []string{"value1", "value2"}, + }, + }, + }, + TopologyKey: "zone", + Namespaces: []string{"ns"}, + }, + }, + PreferredDuringSchedulingIgnoredDuringExecution: []api.WeightedPodAffinityTerm{ + { + Weight: 10, + PodAffinityTerm: api.PodAffinityTerm{ + LabelSelector: &metav1.LabelSelector{ + MatchExpressions: []metav1.LabelSelectorRequirement{ + { + Key: "key2", + Operator: metav1.LabelSelectorOpNotIn, + Values: []string{"value1", "value2"}, + }, + }, + }, + Namespaces: []string{"ns"}, + TopologyKey: "region", + }, + }, + }, + }, + }), + }, + { // Serialized pod anti affinity with different Label Operators in affinity requirements in annotations. + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + // TODO: Uncomment and move this block into Annotations map once + // RequiredDuringSchedulingRequiredDuringExecution is implemented + // "requiredDuringSchedulingRequiredDuringExecution": [{ + // "labelSelector": { + // "matchExpressions": [{ + // "key": "key2", + // "operator": "In", + // "values": ["value1", "value2"] + // }] + // }, + // "namespaces":["ns"], + // "topologyKey": "zone" + // }] + }, + Spec: validPodSpec(&api.Affinity{ + PodAntiAffinity: &api.PodAntiAffinity{ + RequiredDuringSchedulingIgnoredDuringExecution: []api.PodAffinityTerm{ + { + LabelSelector: &metav1.LabelSelector{ + MatchExpressions: []metav1.LabelSelectorRequirement{ + { + Key: "key2", + Operator: metav1.LabelSelectorOpExists, + }, + }, + }, + TopologyKey: "zone", + Namespaces: []string{"ns"}, + }, + }, + PreferredDuringSchedulingIgnoredDuringExecution: []api.WeightedPodAffinityTerm{ + { + Weight: 10, + PodAffinityTerm: api.PodAffinityTerm{ + LabelSelector: &metav1.LabelSelector{ + MatchExpressions: []metav1.LabelSelectorRequirement{ + { + Key: "key2", + Operator: metav1.LabelSelectorOpDoesNotExist, + }, + }, + }, + Namespaces: []string{"ns"}, + TopologyKey: "region", + }, + }, + }, + }, + }), + }, + { // populate forgiveness tolerations with exists operator in annotations. + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + }, + Spec: extendPodSpecwithTolerations(validPodSpec(nil), []api.Toleration{{Key: "foo", Operator: "Exists", Value: "", Effect: "NoExecute", TolerationSeconds: &[]int64{60}[0]}}), + }, + { // populate forgiveness tolerations with equal operator in annotations. + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + }, + Spec: extendPodSpecwithTolerations(validPodSpec(nil), []api.Toleration{{Key: "foo", Operator: "Equal", Value: "bar", Effect: "NoExecute", TolerationSeconds: &[]int64{60}[0]}}), + }, + { // populate tolerations equal operator in annotations. + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + }, + Spec: extendPodSpecwithTolerations(validPodSpec(nil), []api.Toleration{{Key: "foo", Operator: "Equal", Value: "bar", Effect: "NoSchedule"}}), + }, + { // populate tolerations exists operator in annotations. + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + }, + Spec: validPodSpec(nil), + }, + { // empty key with Exists operator is OK for toleration, empty toleration key means match all taint keys. + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + }, + Spec: extendPodSpecwithTolerations(validPodSpec(nil), []api.Toleration{{Operator: "Exists", Effect: "NoSchedule"}}), + }, + { // empty operator is OK for toleration, defaults to Equal. + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + }, + Spec: extendPodSpecwithTolerations(validPodSpec(nil), []api.Toleration{{Key: "foo", Value: "bar", Effect: "NoSchedule"}}), + }, + { // empty effect is OK for toleration, empty toleration effect means match all taint effects. + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + }, + Spec: extendPodSpecwithTolerations(validPodSpec(nil), []api.Toleration{{Key: "foo", Operator: "Equal", Value: "bar"}}), + }, + { // negative tolerationSeconds is OK for toleration. + ObjectMeta: metav1.ObjectMeta{ + Name: "pod-forgiveness-invalid", + Namespace: "ns", + }, + Spec: extendPodSpecwithTolerations(validPodSpec(nil), []api.Toleration{{Key: "node.alpha.kubernetes.io/notReady", Operator: "Exists", Effect: "NoExecute", TolerationSeconds: &[]int64{-2}[0]}}), + }, + { // docker default seccomp profile + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + Annotations: map[string]string{ + api.SeccompPodAnnotationKey: "docker/default", + }, + }, + Spec: validPodSpec(nil), + }, + { // unconfined seccomp profile + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + Annotations: map[string]string{ + api.SeccompPodAnnotationKey: "unconfined", + }, + }, + Spec: validPodSpec(nil), + }, + { // localhost seccomp profile + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + Annotations: map[string]string{ + api.SeccompPodAnnotationKey: "localhost/foo", + }, + }, + Spec: validPodSpec(nil), + }, + { // localhost seccomp profile for a container + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + Annotations: map[string]string{ + api.SeccompContainerAnnotationKeyPrefix + "foo": "localhost/foo", + }, + }, + Spec: validPodSpec(nil), + }, + { // default AppArmor profile for a container + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + Annotations: map[string]string{ + apparmor.ContainerAnnotationKeyPrefix + "ctr": apparmor.ProfileRuntimeDefault, + }, + }, + Spec: validPodSpec(nil), + }, + { // default AppArmor profile for an init container + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + Annotations: map[string]string{ + apparmor.ContainerAnnotationKeyPrefix + "init-ctr": apparmor.ProfileRuntimeDefault, + }, + }, + Spec: api.PodSpec{ + InitContainers: []api.Container{{Name: "init-ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + }, + { // localhost AppArmor profile for a container + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + Annotations: map[string]string{ + apparmor.ContainerAnnotationKeyPrefix + "ctr": apparmor.ProfileNamePrefix + "foo", + }, + }, + Spec: validPodSpec(nil), + }, + { // syntactically valid sysctls + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + Annotations: map[string]string{ + api.SysctlsPodAnnotationKey: "kernel.shmmni=32768,kernel.shmmax=1000000000", + api.UnsafeSysctlsPodAnnotationKey: "knet.ipv4.route.min_pmtu=1000", + }, + }, + Spec: validPodSpec(nil), + }, + { // valid opaque integer resources for init container + ObjectMeta: metav1.ObjectMeta{Name: "valid-opaque-int", Namespace: "ns"}, + Spec: api.PodSpec{ + InitContainers: []api.Container{ + { + Name: "valid-opaque-int", + Image: "image", + ImagePullPolicy: "IfNotPresent", + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + helper.OpaqueIntResourceName("A"): resource.MustParse("10"), + }, + Limits: api.ResourceList{ + helper.OpaqueIntResourceName("A"): resource.MustParse("20"), + }, + }, + TerminationMessagePolicy: "File", + }, + }, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + }, + { // valid opaque integer resources for regular container + ObjectMeta: metav1.ObjectMeta{Name: "valid-opaque-int", Namespace: "ns"}, + Spec: api.PodSpec{ + InitContainers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + Containers: []api.Container{ + { + Name: "valid-opaque-int", + Image: "image", + ImagePullPolicy: "IfNotPresent", + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + helper.OpaqueIntResourceName("A"): resource.MustParse("10"), + }, + Limits: api.ResourceList{ + helper.OpaqueIntResourceName("A"): resource.MustParse("20"), + }, + }, + TerminationMessagePolicy: "File", + }, + }, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + }, + } + for _, pod := range successCases { + if errs := ValidatePod(&pod); len(errs) != 0 { + t.Errorf("expected success: %v", errs) + } + } + + errorCases := map[string]struct { + spec api.Pod + expectedError string + }{ + "bad name": { + expectedError: "metadata.name", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: "ns"}, + Spec: api.PodSpec{ + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + }, + }, + }, + "image whitespace": { + expectedError: "spec.containers[0].image", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "ns"}, + Spec: api.PodSpec{ + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + Containers: []api.Container{{Name: "ctr", Image: " ", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + }, + }, + }, + "image leading and trailing whitespace": { + expectedError: "spec.containers[0].image", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "ns"}, + Spec: api.PodSpec{ + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + Containers: []api.Container{{Name: "ctr", Image: " something ", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + }, + }, + }, + "bad namespace": { + expectedError: "metadata.namespace", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: ""}, + Spec: api.PodSpec{ + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + }, + }, + }, + "bad spec": { + expectedError: "spec.containers[0].name", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "ns"}, + Spec: api.PodSpec{ + Containers: []api.Container{{}}, + }, + }, + }, + "bad label": { + expectedError: "NoUppercaseOrSpecialCharsLike=Equals", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "abc", + Namespace: "ns", + Labels: map[string]string{ + "NoUppercaseOrSpecialCharsLike=Equals": "bar", + }, + }, + Spec: api.PodSpec{ + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + }, + }, + }, + "invalid node selector requirement in node affinity, operator can't be null": { + expectedError: "spec.affinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[0].matchExpressions[0].operator", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + }, + Spec: validPodSpec(&api.Affinity{ + NodeAffinity: &api.NodeAffinity{ + RequiredDuringSchedulingIgnoredDuringExecution: &api.NodeSelector{ + NodeSelectorTerms: []api.NodeSelectorTerm{ + { + MatchExpressions: []api.NodeSelectorRequirement{ + { + Key: "key1", + }, + }, + }, + }, + }, + }, + }), + }, + }, + "invalid preferredSchedulingTerm in node affinity, weight should be in range 1-100": { + expectedError: "must be in the range 1-100", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + }, + Spec: validPodSpec(&api.Affinity{ + NodeAffinity: &api.NodeAffinity{ + PreferredDuringSchedulingIgnoredDuringExecution: []api.PreferredSchedulingTerm{ + { + Weight: 199, + Preference: api.NodeSelectorTerm{ + MatchExpressions: []api.NodeSelectorRequirement{ + { + Key: "foo", + Operator: api.NodeSelectorOpIn, + Values: []string{"bar"}, + }, + }, + }, + }, + }, + }, + }), + }, + }, + "invalid requiredDuringSchedulingIgnoredDuringExecution node selector, nodeSelectorTerms must have at least one term": { + expectedError: "spec.affinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + }, + Spec: validPodSpec(&api.Affinity{ + NodeAffinity: &api.NodeAffinity{ + RequiredDuringSchedulingIgnoredDuringExecution: &api.NodeSelector{ + NodeSelectorTerms: []api.NodeSelectorTerm{}, + }, + }, + }), + }, + }, + "invalid requiredDuringSchedulingIgnoredDuringExecution node selector term, matchExpressions must have at least one node selector requirement": { + expectedError: "spec.affinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[0].matchExpressions", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + }, + Spec: validPodSpec(&api.Affinity{ + NodeAffinity: &api.NodeAffinity{ + RequiredDuringSchedulingIgnoredDuringExecution: &api.NodeSelector{ + NodeSelectorTerms: []api.NodeSelectorTerm{ + { + MatchExpressions: []api.NodeSelectorRequirement{}, + }, + }, + }, + }, + }), + }, + }, + "invalid weight in preferredDuringSchedulingIgnoredDuringExecution in pod affinity annotations, weight should be in range 1-100": { + expectedError: "must be in the range 1-100", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + }, + Spec: validPodSpec(&api.Affinity{ + PodAffinity: &api.PodAffinity{ + PreferredDuringSchedulingIgnoredDuringExecution: []api.WeightedPodAffinityTerm{ + { + Weight: 109, + PodAffinityTerm: api.PodAffinityTerm{ + LabelSelector: &metav1.LabelSelector{ + MatchExpressions: []metav1.LabelSelectorRequirement{ + { + Key: "key2", + Operator: metav1.LabelSelectorOpNotIn, + Values: []string{"value1", "value2"}, + }, + }, + }, + Namespaces: []string{"ns"}, + TopologyKey: "region", + }, + }, + }, + }, + }), + }, + }, + "invalid labelSelector in preferredDuringSchedulingIgnoredDuringExecution in podaffinity annotations, values should be empty if the operator is Exists": { + expectedError: "spec.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[0].podAffinityTerm.matchExpressions.matchExpressions[0].values", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + }, + Spec: validPodSpec(&api.Affinity{ + PodAntiAffinity: &api.PodAntiAffinity{ + PreferredDuringSchedulingIgnoredDuringExecution: []api.WeightedPodAffinityTerm{ + { + Weight: 10, + PodAffinityTerm: api.PodAffinityTerm{ + LabelSelector: &metav1.LabelSelector{ + MatchExpressions: []metav1.LabelSelectorRequirement{ + { + Key: "key2", + Operator: metav1.LabelSelectorOpExists, + Values: []string{"value1", "value2"}, + }, + }, + }, + Namespaces: []string{"ns"}, + TopologyKey: "region", + }, + }, + }, + }, + }), + }, + }, + "invalid name space in preferredDuringSchedulingIgnoredDuringExecution in podaffinity annotations, name space shouldbe valid": { + expectedError: "spec.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[0].podAffinityTerm.namespace", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + }, + Spec: validPodSpec(&api.Affinity{ + PodAffinity: &api.PodAffinity{ + PreferredDuringSchedulingIgnoredDuringExecution: []api.WeightedPodAffinityTerm{ + { + Weight: 10, + PodAffinityTerm: api.PodAffinityTerm{ + LabelSelector: &metav1.LabelSelector{ + MatchExpressions: []metav1.LabelSelectorRequirement{ + { + Key: "key2", + Operator: metav1.LabelSelectorOpExists, + }, + }, + }, + Namespaces: []string{"INVALID_NAMESPACE"}, + TopologyKey: "region", + }, + }, + }, + }, + }), + }, + }, + "invalid hard pod affinity, empty topologyKey is not allowed for hard pod affinity": { + expectedError: "can not be empty", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + }, + Spec: validPodSpec(&api.Affinity{ + PodAffinity: &api.PodAffinity{ + RequiredDuringSchedulingIgnoredDuringExecution: []api.PodAffinityTerm{ + { + LabelSelector: &metav1.LabelSelector{ + MatchExpressions: []metav1.LabelSelectorRequirement{ + { + Key: "key2", + Operator: metav1.LabelSelectorOpIn, + Values: []string{"value1", "value2"}, + }, + }, + }, + Namespaces: []string{"ns"}, + }, + }, + }, + }), + }, + }, + "invalid hard pod anti-affinity, empty topologyKey is not allowed for hard pod anti-affinity": { + expectedError: "can not be empty", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + }, + Spec: validPodSpec(&api.Affinity{ + PodAntiAffinity: &api.PodAntiAffinity{ + RequiredDuringSchedulingIgnoredDuringExecution: []api.PodAffinityTerm{ + { + LabelSelector: &metav1.LabelSelector{ + MatchExpressions: []metav1.LabelSelectorRequirement{ + { + Key: "key2", + Operator: metav1.LabelSelectorOpIn, + Values: []string{"value1", "value2"}, + }, + }, + }, + Namespaces: []string{"ns"}, + }, + }, + }, + }), + }, + }, + "invalid soft pod affinity, empty topologyKey is not allowed for soft pod affinity": { + expectedError: "can not be empty", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + }, + Spec: validPodSpec(&api.Affinity{ + PodAffinity: &api.PodAffinity{ + PreferredDuringSchedulingIgnoredDuringExecution: []api.WeightedPodAffinityTerm{ + { + Weight: 10, + PodAffinityTerm: api.PodAffinityTerm{ + LabelSelector: &metav1.LabelSelector{ + MatchExpressions: []metav1.LabelSelectorRequirement{ + { + Key: "key2", + Operator: metav1.LabelSelectorOpNotIn, + Values: []string{"value1", "value2"}, + }, + }, + }, + Namespaces: []string{"ns"}, + }, + }, + }, + }, + }), + }, + }, + "invalid soft pod anti-affinity, empty topologyKey is not allowed for soft pod anti-affinity": { + expectedError: "can not be empty", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + }, + Spec: validPodSpec(&api.Affinity{ + PodAntiAffinity: &api.PodAntiAffinity{ + PreferredDuringSchedulingIgnoredDuringExecution: []api.WeightedPodAffinityTerm{ + { + Weight: 10, + PodAffinityTerm: api.PodAffinityTerm{ + LabelSelector: &metav1.LabelSelector{ + MatchExpressions: []metav1.LabelSelectorRequirement{ + { + Key: "key2", + Operator: metav1.LabelSelectorOpNotIn, + Values: []string{"value1", "value2"}, + }, + }, + }, + Namespaces: []string{"ns"}, + }, + }, + }, + }, + }), + }, + }, + "invalid toleration key": { + expectedError: "spec.tolerations[0].key", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + }, + Spec: extendPodSpecwithTolerations(validPodSpec(nil), []api.Toleration{{Key: "nospecialchars^=@", Operator: "Equal", Value: "bar", Effect: "NoSchedule"}}), + }, + }, + "invalid toleration operator": { + expectedError: "spec.tolerations[0].operator", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + }, + Spec: extendPodSpecwithTolerations(validPodSpec(nil), []api.Toleration{{Key: "foo", Operator: "In", Value: "bar", Effect: "NoSchedule"}}), + }, + }, + "value must be empty when `operator` is 'Exists'": { + expectedError: "spec.tolerations[0].operator", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + }, + Spec: extendPodSpecwithTolerations(validPodSpec(nil), []api.Toleration{{Key: "foo", Operator: "Exists", Value: "bar", Effect: "NoSchedule"}}), + }, + }, + + "operator must be 'Exists' when `key` is empty": { + expectedError: "spec.tolerations[0].operator", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + }, + Spec: extendPodSpecwithTolerations(validPodSpec(nil), []api.Toleration{{Operator: "Equal", Value: "bar", Effect: "NoSchedule"}}), + }, + }, + "effect must be 'NoExecute' when `TolerationSeconds` is set": { + expectedError: "spec.tolerations[0].effect", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "pod-forgiveness-invalid", + Namespace: "ns", + }, + Spec: extendPodSpecwithTolerations(validPodSpec(nil), []api.Toleration{{Key: "node.alpha.kubernetes.io/notReady", Operator: "Exists", Effect: "NoSchedule", TolerationSeconds: &[]int64{20}[0]}}), + }, + }, + "must be a valid pod seccomp profile": { + expectedError: "must be a valid seccomp profile", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + Annotations: map[string]string{ + api.SeccompPodAnnotationKey: "foo", + }, + }, + Spec: validPodSpec(nil), + }, + }, + "must be a valid container seccomp profile": { + expectedError: "must be a valid seccomp profile", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + Annotations: map[string]string{ + api.SeccompContainerAnnotationKeyPrefix + "foo": "foo", + }, + }, + Spec: validPodSpec(nil), + }, + }, + "must be a non-empty container name in seccomp annotation": { + expectedError: "name part must be non-empty", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + Annotations: map[string]string{ + api.SeccompContainerAnnotationKeyPrefix: "foo", + }, + }, + Spec: validPodSpec(nil), + }, + }, + "must be a non-empty container profile in seccomp annotation": { + expectedError: "must be a valid seccomp profile", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + Annotations: map[string]string{ + api.SeccompContainerAnnotationKeyPrefix + "foo": "", + }, + }, + Spec: validPodSpec(nil), + }, + }, + "must be a relative path in a node-local seccomp profile annotation": { + expectedError: "must be a relative path", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + Annotations: map[string]string{ + api.SeccompPodAnnotationKey: "localhost//foo", + }, + }, + Spec: validPodSpec(nil), + }, + }, + "must not start with '../'": { + expectedError: "must not contain '..'", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + Annotations: map[string]string{ + api.SeccompPodAnnotationKey: "localhost/../foo", + }, + }, + Spec: validPodSpec(nil), + }, + }, + "AppArmor profile must apply to a container": { + expectedError: "metadata.annotations[container.apparmor.security.beta.kubernetes.io/fake-ctr]", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + Annotations: map[string]string{ + apparmor.ContainerAnnotationKeyPrefix + "ctr": apparmor.ProfileRuntimeDefault, + apparmor.ContainerAnnotationKeyPrefix + "init-ctr": apparmor.ProfileRuntimeDefault, + apparmor.ContainerAnnotationKeyPrefix + "fake-ctr": apparmor.ProfileRuntimeDefault, + }, + }, + Spec: api.PodSpec{ + InitContainers: []api.Container{{Name: "init-ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + }, + }, + "AppArmor profile format must be valid": { + expectedError: "invalid AppArmor profile name", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + Annotations: map[string]string{ + apparmor.ContainerAnnotationKeyPrefix + "ctr": "bad-name", + }, + }, + Spec: validPodSpec(nil), + }, + }, + "only default AppArmor profile may start with runtime/": { + expectedError: "invalid AppArmor profile name", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + Annotations: map[string]string{ + apparmor.ContainerAnnotationKeyPrefix + "ctr": "runtime/foo", + }, + }, + Spec: validPodSpec(nil), + }, + }, + "invalid sysctl annotation": { + expectedError: "metadata.annotations[security.alpha.kubernetes.io/sysctls]", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + Annotations: map[string]string{ + api.SysctlsPodAnnotationKey: "foo:", + }, + }, + Spec: validPodSpec(nil), + }, + }, + "invalid comma-separated sysctl annotation": { + expectedError: "not of the format sysctl_name=value", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + Annotations: map[string]string{ + api.SysctlsPodAnnotationKey: "kernel.msgmax,", + }, + }, + Spec: validPodSpec(nil), + }, + }, + "invalid unsafe sysctl annotation": { + expectedError: "metadata.annotations[security.alpha.kubernetes.io/sysctls]", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + Annotations: map[string]string{ + api.SysctlsPodAnnotationKey: "foo:", + }, + }, + Spec: validPodSpec(nil), + }, + }, + "intersecting safe sysctls and unsafe sysctls annotations": { + expectedError: "can not be safe and unsafe", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + Annotations: map[string]string{ + api.SysctlsPodAnnotationKey: "kernel.shmmax=10000000", + api.UnsafeSysctlsPodAnnotationKey: "kernel.shmmax=10000000", + }, + }, + Spec: validPodSpec(nil), + }, + }, + "invalid opaque integer resource requirement: request must be <= limit": { + expectedError: "must be less than or equal to pod.alpha.kubernetes.io/opaque-int-resource-A", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: "ns"}, + Spec: api.PodSpec{ + Containers: []api.Container{ + { + Name: "invalid", + Image: "image", + ImagePullPolicy: "IfNotPresent", + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + helper.OpaqueIntResourceName("A"): resource.MustParse("2"), + }, + Limits: api.ResourceList{ + helper.OpaqueIntResourceName("A"): resource.MustParse("1"), + }, + }, + }, + }, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + }, + }, + "invalid fractional opaque integer resource in container request": { + expectedError: "must be an integer", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: "ns"}, + Spec: api.PodSpec{ + Containers: []api.Container{ + { + Name: "invalid", + Image: "image", + ImagePullPolicy: "IfNotPresent", + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + helper.OpaqueIntResourceName("A"): resource.MustParse("500m"), + }, + }, + }, + }, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + }, + }, + "invalid fractional opaque integer resource in init container request": { + expectedError: "must be an integer", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: "ns"}, + Spec: api.PodSpec{ + InitContainers: []api.Container{ + { + Name: "invalid", + Image: "image", + ImagePullPolicy: "IfNotPresent", + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + helper.OpaqueIntResourceName("A"): resource.MustParse("500m"), + }, + }, + }, + }, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + }, + }, + "invalid fractional opaque integer resource in container limit": { + expectedError: "must be an integer", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: "ns"}, + Spec: api.PodSpec{ + Containers: []api.Container{ + { + Name: "invalid", + Image: "image", + ImagePullPolicy: "IfNotPresent", + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + helper.OpaqueIntResourceName("A"): resource.MustParse("5"), + }, + Limits: api.ResourceList{ + helper.OpaqueIntResourceName("A"): resource.MustParse("2.5"), + }, + }, + }, + }, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + }, + }, + "invalid fractional opaque integer resource in init container limit": { + expectedError: "must be an integer", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: "ns"}, + Spec: api.PodSpec{ + InitContainers: []api.Container{ + { + Name: "invalid", + Image: "image", + ImagePullPolicy: "IfNotPresent", + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + helper.OpaqueIntResourceName("A"): resource.MustParse("5"), + }, + Limits: api.ResourceList{ + helper.OpaqueIntResourceName("A"): resource.MustParse("2.5"), + }, + }, + }, + }, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + }, + }, + "mirror-pod present without nodeName": { + expectedError: "mirror", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: "ns", Annotations: map[string]string{api.MirrorPodAnnotationKey: ""}}, + Spec: api.PodSpec{ + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + }, + }, + "mirror-pod populated without nodeName": { + expectedError: "mirror", + spec: api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: "ns", Annotations: map[string]string{api.MirrorPodAnnotationKey: "foo"}}, + Spec: api.PodSpec{ + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + }, + }, + } + for k, v := range errorCases { + if errs := ValidatePod(&v.spec); len(errs) == 0 { + t.Errorf("expected failure for %q", k) + } else if v.expectedError == "" { + t.Errorf("missing expectedError for %q, got %q", k, errs.ToAggregate().Error()) + } else if actualError := errs.ToAggregate().Error(); !strings.Contains(actualError, v.expectedError) { + t.Errorf("expected error for %q to contain %q, got %q", k, v.expectedError, actualError) + } + } +} + +func TestValidatePodUpdate(t *testing.T) { + var ( + activeDeadlineSecondsZero = int64(0) + activeDeadlineSecondsNegative = int64(-30) + activeDeadlineSecondsPositive = int64(30) + activeDeadlineSecondsLarger = int64(31) + + now = metav1.Now() + grace = int64(30) + grace2 = int64(31) + ) + + tests := []struct { + new api.Pod + old api.Pod + err string + test string + }{ + {api.Pod{}, api.Pod{}, "", "nothing"}, + { + api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, + }, + api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, + }, + "metadata.name", + "ids", + }, + { + api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Labels: map[string]string{ + "foo": "bar", + }, + }, + }, + api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Labels: map[string]string{ + "bar": "foo", + }, + }, + }, + "", + "labels", + }, + { + api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Annotations: map[string]string{ + "foo": "bar", + }, + }, + }, + api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Annotations: map[string]string{ + "bar": "foo", + }, + }, + }, + "", + "annotations", + }, + { + api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Spec: api.PodSpec{ + Containers: []api.Container{ + { + Image: "foo:V1", + }, + }, + }, + }, + api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, + Spec: api.PodSpec{ + Containers: []api.Container{ + { + Image: "foo:V2", + }, + { + Image: "bar:V2", + }, + }, + }, + }, + "may not add or remove containers", + "less containers", + }, + { + api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Spec: api.PodSpec{ + Containers: []api.Container{ + { + Image: "foo:V1", + }, + { + Image: "bar:V2", + }, + }, + }, + }, + api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, + Spec: api.PodSpec{ + Containers: []api.Container{ + { + Image: "foo:V2", + }, + }, + }, + }, + "may not add or remove containers", + "more containers", + }, + { + api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Spec: api.PodSpec{ + InitContainers: []api.Container{ + { + Image: "foo:V1", + }, + }, + }, + }, + api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, + Spec: api.PodSpec{ + InitContainers: []api.Container{ + { + Image: "foo:V2", + }, + { + Image: "bar:V2", + }, + }, + }, + }, + "may not add or remove containers", + "more init containers", + }, + { + api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, + Spec: api.PodSpec{Containers: []api.Container{{Image: "foo:V1"}}}, + }, + api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "foo", DeletionTimestamp: &now}, + Spec: api.PodSpec{Containers: []api.Container{{Image: "foo:V1"}}}, + }, + "", + "deletion timestamp removed", + }, + { + api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "foo", DeletionTimestamp: &now}, + Spec: api.PodSpec{Containers: []api.Container{{Image: "foo:V1"}}}, + }, + api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, + Spec: api.PodSpec{Containers: []api.Container{{Image: "foo:V1"}}}, + }, + "metadata.deletionTimestamp", + "deletion timestamp added", + }, + { + api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "foo", DeletionTimestamp: &now, DeletionGracePeriodSeconds: &grace}, + Spec: api.PodSpec{Containers: []api.Container{{Image: "foo:V1"}}}, + }, + api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "foo", DeletionTimestamp: &now, DeletionGracePeriodSeconds: &grace2}, + Spec: api.PodSpec{Containers: []api.Container{{Image: "foo:V1"}}}, + }, + "metadata.deletionGracePeriodSeconds", + "deletion grace period seconds changed", + }, + { + api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, + Spec: api.PodSpec{ + Containers: []api.Container{ + { + Image: "foo:V1", + }, + }, + }, + }, + api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, + Spec: api.PodSpec{ + Containers: []api.Container{ + { + Image: "foo:V2", + }, + }, + }, + }, + "", + "image change", + }, + { + api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, + Spec: api.PodSpec{ + InitContainers: []api.Container{ + { + Image: "foo:V1", + }, + }, + }, + }, + api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, + Spec: api.PodSpec{ + InitContainers: []api.Container{ + { + Image: "foo:V2", + }, + }, + }, + }, + "", + "init container image change", + }, + { + api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, + Spec: api.PodSpec{ + Containers: []api.Container{ + {}, + }, + }, + }, + api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, + Spec: api.PodSpec{ + Containers: []api.Container{ + { + Image: "foo:V2", + }, + }, + }, + }, + "spec.containers[0].image", + "image change to empty", + }, + { + api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, + Spec: api.PodSpec{ + InitContainers: []api.Container{ + {}, + }, + }, + }, + api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, + Spec: api.PodSpec{ + InitContainers: []api.Container{ + { + Image: "foo:V2", + }, + }, + }, + }, + "spec.initContainers[0].image", + "init container image change to empty", + }, + { + api.Pod{ + Spec: api.PodSpec{}, + }, + api.Pod{ + Spec: api.PodSpec{}, + }, + "", + "activeDeadlineSeconds no change, nil", + }, + { + api.Pod{ + Spec: api.PodSpec{ + ActiveDeadlineSeconds: &activeDeadlineSecondsPositive, + }, + }, + api.Pod{ + Spec: api.PodSpec{ + ActiveDeadlineSeconds: &activeDeadlineSecondsPositive, + }, + }, + "", + "activeDeadlineSeconds no change, set", + }, + { + api.Pod{ + Spec: api.PodSpec{ + ActiveDeadlineSeconds: &activeDeadlineSecondsPositive, + }, + }, + api.Pod{}, + "", + "activeDeadlineSeconds change to positive from nil", + }, + { + api.Pod{ + Spec: api.PodSpec{ + ActiveDeadlineSeconds: &activeDeadlineSecondsPositive, + }, + }, + api.Pod{ + Spec: api.PodSpec{ + ActiveDeadlineSeconds: &activeDeadlineSecondsLarger, + }, + }, + "", + "activeDeadlineSeconds change to smaller positive", + }, + { + api.Pod{ + Spec: api.PodSpec{ + ActiveDeadlineSeconds: &activeDeadlineSecondsLarger, + }, + }, + api.Pod{ + Spec: api.PodSpec{ + ActiveDeadlineSeconds: &activeDeadlineSecondsPositive, + }, + }, + "spec.activeDeadlineSeconds", + "activeDeadlineSeconds change to larger positive", + }, + + { + api.Pod{ + Spec: api.PodSpec{ + ActiveDeadlineSeconds: &activeDeadlineSecondsNegative, + }, + }, + api.Pod{}, + "spec.activeDeadlineSeconds", + "activeDeadlineSeconds change to negative from nil", + }, + { + api.Pod{ + Spec: api.PodSpec{ + ActiveDeadlineSeconds: &activeDeadlineSecondsNegative, + }, + }, + api.Pod{ + Spec: api.PodSpec{ + ActiveDeadlineSeconds: &activeDeadlineSecondsPositive, + }, + }, + "spec.activeDeadlineSeconds", + "activeDeadlineSeconds change to negative from positive", + }, + { + api.Pod{ + Spec: api.PodSpec{ + ActiveDeadlineSeconds: &activeDeadlineSecondsZero, + }, + }, + api.Pod{ + Spec: api.PodSpec{ + ActiveDeadlineSeconds: &activeDeadlineSecondsPositive, + }, + }, + "", + "activeDeadlineSeconds change to zero from positive", + }, + { + api.Pod{ + Spec: api.PodSpec{ + ActiveDeadlineSeconds: &activeDeadlineSecondsZero, + }, + }, + api.Pod{}, + "", + "activeDeadlineSeconds change to zero from nil", + }, + { + api.Pod{}, + api.Pod{ + Spec: api.PodSpec{ + ActiveDeadlineSeconds: &activeDeadlineSecondsPositive, + }, + }, + "spec.activeDeadlineSeconds", + "activeDeadlineSeconds change to nil from positive", + }, + { + api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, + Spec: api.PodSpec{ + Containers: []api.Container{ + { + Image: "foo:V1", + Resources: api.ResourceRequirements{ + Limits: getResourceLimits("100m", "0"), + }, + }, + }, + }, + }, + api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, + Spec: api.PodSpec{ + Containers: []api.Container{ + { + Image: "foo:V2", + Resources: api.ResourceRequirements{ + Limits: getResourceLimits("1000m", "0"), + }, + }, + }, + }, + }, + "spec: Forbidden: pod updates may not change fields", + "cpu change", + }, + { + api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, + Spec: api.PodSpec{ + Containers: []api.Container{ + { + Image: "foo:V1", + Ports: []api.ContainerPort{ + {HostPort: 8080, ContainerPort: 80}, + }, + }, + }, + }, + }, + api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, + Spec: api.PodSpec{ + Containers: []api.Container{ + { + Image: "foo:V2", + Ports: []api.ContainerPort{ + {HostPort: 8000, ContainerPort: 80}, + }, + }, + }, + }, + }, + "spec: Forbidden: pod updates may not change fields", + "port change", + }, + { + api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Labels: map[string]string{ + "foo": "bar", + }, + }, + }, + api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Labels: map[string]string{ + "Bar": "foo", + }, + }, + }, + "", + "bad label change", + }, + { + api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Spec: api.PodSpec{ + NodeName: "node1", + Tolerations: []api.Toleration{{Key: "key1", Value: "value2"}}, + }, + }, + api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Spec: api.PodSpec{ + NodeName: "node1", + Tolerations: []api.Toleration{{Key: "key1", Value: "value1"}}, + }, + }, + "spec.tolerations: Forbidden", + "existing toleration value modified in pod spec updates", + }, + { + api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Spec: api.PodSpec{ + NodeName: "node1", + Tolerations: []api.Toleration{{Key: "key1", Value: "value2", Operator: "Equal", Effect: "NoExecute", TolerationSeconds: nil}}, + }, + }, + api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Spec: api.PodSpec{ + NodeName: "node1", + Tolerations: []api.Toleration{{Key: "key1", Value: "value1", Operator: "Equal", Effect: "NoExecute", TolerationSeconds: &[]int64{10}[0]}}, + }, + }, + "spec.tolerations: Forbidden", + "existing toleration value modified in pod spec updates with modified tolerationSeconds", + }, + { + api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Spec: api.PodSpec{ + NodeName: "node1", + Tolerations: []api.Toleration{{Key: "key1", Value: "value1", Operator: "Equal", Effect: "NoExecute", TolerationSeconds: &[]int64{10}[0]}}, + }, + }, + api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Spec: api.PodSpec{ + NodeName: "node1", + Tolerations: []api.Toleration{{Key: "key1", Value: "value1", Operator: "Equal", Effect: "NoExecute", TolerationSeconds: &[]int64{20}[0]}}, + }}, + "", + "modified tolerationSeconds in existing toleration value in pod spec updates", + }, + { + api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Spec: api.PodSpec{ + Tolerations: []api.Toleration{{Key: "key1", Value: "value2"}}, + }, + }, + api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Spec: api.PodSpec{ + NodeName: "", + Tolerations: []api.Toleration{{Key: "key1", Value: "value1"}}, + }, + }, + "spec.tolerations: Forbidden", + "toleration modified in updates to an unscheduled pod", + }, + { + api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Spec: api.PodSpec{ + NodeName: "node1", + Tolerations: []api.Toleration{{Key: "key1", Value: "value1"}}, + }, + }, + api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Spec: api.PodSpec{ + NodeName: "node1", + Tolerations: []api.Toleration{{Key: "key1", Value: "value1"}}, + }, + }, + "", + "tolerations unmodified in updates to a scheduled pod", + }, + { + api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Spec: api.PodSpec{ + NodeName: "node1", + Tolerations: []api.Toleration{ + {Key: "key1", Value: "value1", Operator: "Equal", Effect: "NoExecute", TolerationSeconds: &[]int64{20}[0]}, + {Key: "key2", Value: "value2", Operator: "Equal", Effect: "NoExecute", TolerationSeconds: &[]int64{30}[0]}, + }, + }}, + api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Spec: api.PodSpec{ + NodeName: "node1", + Tolerations: []api.Toleration{{Key: "key1", Value: "value1", Operator: "Equal", Effect: "NoExecute", TolerationSeconds: &[]int64{10}[0]}}, + }, + }, + "", + "added valid new toleration to existing tolerations in pod spec updates", + }, + { + api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ + NodeName: "node1", + Tolerations: []api.Toleration{ + {Key: "key1", Value: "value1", Operator: "Equal", Effect: "NoExecute", TolerationSeconds: &[]int64{20}[0]}, + {Key: "key2", Value: "value2", Operator: "Equal", Effect: "NoSchedule", TolerationSeconds: &[]int64{30}[0]}, + }, + }}, + api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Spec: api.PodSpec{ + NodeName: "node1", Tolerations: []api.Toleration{{Key: "key1", Value: "value1", Operator: "Equal", Effect: "NoExecute", TolerationSeconds: &[]int64{10}[0]}}, + }}, + "spec.tolerations[1].effect", + "added invalid new toleration to existing tolerations in pod spec updates", + }, + { + api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{NodeName: "foo"}}, + api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, + "spec: Forbidden: pod updates may not change fields", + "removed nodeName from pod spec", + }, + { + api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", Annotations: map[string]string{api.MirrorPodAnnotationKey: ""}}, Spec: api.PodSpec{NodeName: "foo"}}, + api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{NodeName: "foo"}}, + "metadata.annotations[kubernetes.io/config.mirror]", + "added mirror pod annotation", + }, + { + api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{NodeName: "foo"}}, + api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", Annotations: map[string]string{api.MirrorPodAnnotationKey: ""}}, Spec: api.PodSpec{NodeName: "foo"}}, + "metadata.annotations[kubernetes.io/config.mirror]", + "removed mirror pod annotation", + }, + { + api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", Annotations: map[string]string{api.MirrorPodAnnotationKey: "foo"}}, Spec: api.PodSpec{NodeName: "foo"}}, + api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", Annotations: map[string]string{api.MirrorPodAnnotationKey: "bar"}}, Spec: api.PodSpec{NodeName: "foo"}}, + "metadata.annotations[kubernetes.io/config.mirror]", + "changed mirror pod annotation", + }, + { + api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Spec: api.PodSpec{ + NodeName: "node1", + PriorityClassName: "bar-priority", + }, + }, + api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Spec: api.PodSpec{ + NodeName: "node1", + PriorityClassName: "foo-priority", + }, + }, + "spec: Forbidden: pod updates", + "changed priority class name", + }, + { + api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Spec: api.PodSpec{ + NodeName: "node1", + PriorityClassName: "", + }, + }, + api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Spec: api.PodSpec{ + NodeName: "node1", + PriorityClassName: "foo-priority", + }, + }, + "spec: Forbidden: pod updates", + "removed priority class name", + }, + } + + for _, test := range tests { + test.new.ObjectMeta.ResourceVersion = "1" + test.old.ObjectMeta.ResourceVersion = "1" + errs := ValidatePodUpdate(&test.new, &test.old) + if test.err == "" { + if len(errs) != 0 { + t.Errorf("unexpected invalid: %s (%+v)\nA: %+v\nB: %+v", test.test, errs, test.new, test.old) + } + } else { + if len(errs) == 0 { + t.Errorf("unexpected valid: %s\nA: %+v\nB: %+v", test.test, test.new, test.old) + } else if actualErr := errs.ToAggregate().Error(); !strings.Contains(actualErr, test.err) { + t.Errorf("unexpected error message: %s\nExpected error: %s\nActual error: %s", test.test, test.err, actualErr) + } + } + } +} + +func makeValidService() api.Service { + return api.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: "valid", + Namespace: "valid", + Labels: map[string]string{}, + Annotations: map[string]string{}, + ResourceVersion: "1", + }, + Spec: api.ServiceSpec{ + Selector: map[string]string{"key": "val"}, + SessionAffinity: "None", + Type: api.ServiceTypeClusterIP, + Ports: []api.ServicePort{{Name: "p", Protocol: "TCP", Port: 8675, TargetPort: intstr.FromInt(8675)}}, + }, + } +} + +func TestValidateService(t *testing.T) { + testCases := []struct { + name string + tweakSvc func(svc *api.Service) // given a basic valid service, each test case can customize it + numErrs int + }{ + { + name: "missing namespace", + tweakSvc: func(s *api.Service) { + s.Namespace = "" + }, + numErrs: 1, + }, + { + name: "invalid namespace", + tweakSvc: func(s *api.Service) { + s.Namespace = "-123" + }, + numErrs: 1, + }, + { + name: "missing name", + tweakSvc: func(s *api.Service) { + s.Name = "" + }, + numErrs: 1, + }, + { + name: "invalid name", + tweakSvc: func(s *api.Service) { + s.Name = "-123" + }, + numErrs: 1, + }, + { + name: "too long name", + tweakSvc: func(s *api.Service) { + s.Name = strings.Repeat("a", 64) + }, + numErrs: 1, + }, + { + name: "invalid generateName", + tweakSvc: func(s *api.Service) { + s.GenerateName = "-123" + }, + numErrs: 1, + }, + { + name: "too long generateName", + tweakSvc: func(s *api.Service) { + s.GenerateName = strings.Repeat("a", 64) + }, + numErrs: 1, + }, + { + name: "invalid label", + tweakSvc: func(s *api.Service) { + s.Labels["NoUppercaseOrSpecialCharsLike=Equals"] = "bar" + }, + numErrs: 1, + }, + { + name: "invalid annotation", + tweakSvc: func(s *api.Service) { + s.Annotations["NoSpecialCharsLike=Equals"] = "bar" + }, + numErrs: 1, + }, + { + name: "nil selector", + tweakSvc: func(s *api.Service) { + s.Spec.Selector = nil + }, + numErrs: 0, + }, + { + name: "invalid selector", + tweakSvc: func(s *api.Service) { + s.Spec.Selector["NoSpecialCharsLike=Equals"] = "bar" + }, + numErrs: 1, + }, + { + name: "missing session affinity", + tweakSvc: func(s *api.Service) { + s.Spec.SessionAffinity = "" + }, + numErrs: 1, + }, + { + name: "missing type", + tweakSvc: func(s *api.Service) { + s.Spec.Type = "" + }, + numErrs: 1, + }, + { + name: "missing ports", + tweakSvc: func(s *api.Service) { + s.Spec.Ports = nil + }, + numErrs: 1, + }, + { + name: "missing ports but headless", + tweakSvc: func(s *api.Service) { + s.Spec.Ports = nil + s.Spec.ClusterIP = api.ClusterIPNone + }, + numErrs: 0, + }, + { + name: "empty port[0] name", + tweakSvc: func(s *api.Service) { + s.Spec.Ports[0].Name = "" + }, + numErrs: 0, + }, + { + name: "empty port[1] name", + tweakSvc: func(s *api.Service) { + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "", Protocol: "TCP", Port: 12345, TargetPort: intstr.FromInt(12345)}) + }, + numErrs: 1, + }, + { + name: "empty multi-port port[0] name", + tweakSvc: func(s *api.Service) { + s.Spec.Ports[0].Name = "" + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "p", Protocol: "TCP", Port: 12345, TargetPort: intstr.FromInt(12345)}) + }, + numErrs: 1, + }, + { + name: "invalid port name", + tweakSvc: func(s *api.Service) { + s.Spec.Ports[0].Name = "INVALID" + }, + numErrs: 1, + }, + { + name: "missing protocol", + tweakSvc: func(s *api.Service) { + s.Spec.Ports[0].Protocol = "" + }, + numErrs: 1, + }, + { + name: "invalid protocol", + tweakSvc: func(s *api.Service) { + s.Spec.Ports[0].Protocol = "INVALID" + }, + numErrs: 1, + }, + { + name: "invalid cluster ip", + tweakSvc: func(s *api.Service) { + s.Spec.ClusterIP = "invalid" + }, + numErrs: 1, + }, + { + name: "missing port", + tweakSvc: func(s *api.Service) { + s.Spec.Ports[0].Port = 0 + }, + numErrs: 1, + }, + { + name: "invalid port", + tweakSvc: func(s *api.Service) { + s.Spec.Ports[0].Port = 65536 + }, + numErrs: 1, + }, + { + name: "invalid TargetPort int", + tweakSvc: func(s *api.Service) { + s.Spec.Ports[0].TargetPort = intstr.FromInt(65536) + }, + numErrs: 1, + }, + { + name: "valid port headless", + tweakSvc: func(s *api.Service) { + s.Spec.Ports[0].Port = 11722 + s.Spec.Ports[0].TargetPort = intstr.FromInt(11722) + s.Spec.ClusterIP = api.ClusterIPNone + }, + numErrs: 0, + }, + { + name: "invalid port headless 1", + tweakSvc: func(s *api.Service) { + s.Spec.Ports[0].Port = 11722 + s.Spec.Ports[0].TargetPort = intstr.FromInt(11721) + s.Spec.ClusterIP = api.ClusterIPNone + }, + // in the v1 API, targetPorts on headless services were tolerated. + // once we have version-specific validation, we can reject this on newer API versions, but until then, we have to tolerate it for compatibility. + // numErrs: 1, + numErrs: 0, + }, + { + name: "invalid port headless 2", + tweakSvc: func(s *api.Service) { + s.Spec.Ports[0].Port = 11722 + s.Spec.Ports[0].TargetPort = intstr.FromString("target") + s.Spec.ClusterIP = api.ClusterIPNone + }, + // in the v1 API, targetPorts on headless services were tolerated. + // once we have version-specific validation, we can reject this on newer API versions, but until then, we have to tolerate it for compatibility. + // numErrs: 1, + numErrs: 0, + }, + { + name: "invalid publicIPs localhost", + tweakSvc: func(s *api.Service) { + s.Spec.ExternalIPs = []string{"127.0.0.1"} + }, + numErrs: 1, + }, + { + name: "invalid publicIPs unspecified", + tweakSvc: func(s *api.Service) { + s.Spec.ExternalIPs = []string{"0.0.0.0"} + }, + numErrs: 1, + }, + { + name: "invalid publicIPs loopback", + tweakSvc: func(s *api.Service) { + s.Spec.ExternalIPs = []string{"127.0.0.1"} + }, + numErrs: 1, + }, + { + name: "invalid publicIPs host", + tweakSvc: func(s *api.Service) { + s.Spec.ExternalIPs = []string{"myhost.mydomain"} + }, + numErrs: 1, + }, + { + name: "dup port name", + tweakSvc: func(s *api.Service) { + s.Spec.Ports[0].Name = "p" + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "p", Port: 12345, Protocol: "TCP", TargetPort: intstr.FromInt(12345)}) + }, + numErrs: 1, + }, + { + name: "valid load balancer protocol UDP 1", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeLoadBalancer + s.Spec.Ports[0].Protocol = "UDP" + }, + numErrs: 0, + }, + { + name: "valid load balancer protocol UDP 2", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeLoadBalancer + s.Spec.Ports[0] = api.ServicePort{Name: "q", Port: 12345, Protocol: "UDP", TargetPort: intstr.FromInt(12345)} + }, + numErrs: 0, + }, + { + name: "invalid load balancer with mix protocol", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeLoadBalancer + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "q", Port: 12345, Protocol: "UDP", TargetPort: intstr.FromInt(12345)}) + }, + numErrs: 1, + }, + { + name: "valid 1", + tweakSvc: func(s *api.Service) { + // do nothing + }, + numErrs: 0, + }, + { + name: "valid 2", + tweakSvc: func(s *api.Service) { + s.Spec.Ports[0].Protocol = "UDP" + s.Spec.Ports[0].TargetPort = intstr.FromInt(12345) + }, + numErrs: 0, + }, + { + name: "valid 3", + tweakSvc: func(s *api.Service) { + s.Spec.Ports[0].TargetPort = intstr.FromString("http") + }, + numErrs: 0, + }, + { + name: "valid cluster ip - none ", + tweakSvc: func(s *api.Service) { + s.Spec.ClusterIP = "None" + }, + numErrs: 0, + }, + { + name: "valid cluster ip - empty", + tweakSvc: func(s *api.Service) { + s.Spec.ClusterIP = "" + s.Spec.Ports[0].TargetPort = intstr.FromString("http") + }, + numErrs: 0, + }, + { + name: "valid type - cluster", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeClusterIP + }, + numErrs: 0, + }, + { + name: "valid type - loadbalancer", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeLoadBalancer + }, + numErrs: 0, + }, + { + name: "valid type loadbalancer 2 ports", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeLoadBalancer + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "q", Port: 12345, Protocol: "TCP", TargetPort: intstr.FromInt(12345)}) + }, + numErrs: 0, + }, + { + name: "valid external load balancer 2 ports", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeLoadBalancer + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "q", Port: 12345, Protocol: "TCP", TargetPort: intstr.FromInt(12345)}) + }, + numErrs: 0, + }, + { + name: "duplicate nodeports", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeNodePort + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "q", Port: 1, Protocol: "TCP", NodePort: 1, TargetPort: intstr.FromInt(1)}) + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "r", Port: 2, Protocol: "TCP", NodePort: 1, TargetPort: intstr.FromInt(2)}) + }, + numErrs: 1, + }, + { + name: "duplicate nodeports (different protocols)", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeNodePort + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "q", Port: 1, Protocol: "TCP", NodePort: 1, TargetPort: intstr.FromInt(1)}) + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "r", Port: 2, Protocol: "UDP", NodePort: 1, TargetPort: intstr.FromInt(2)}) + }, + numErrs: 0, + }, + { + name: "invalid duplicate ports (with same protocol)", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeClusterIP + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "q", Port: 12345, Protocol: "TCP", TargetPort: intstr.FromInt(8080)}) + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "r", Port: 12345, Protocol: "TCP", TargetPort: intstr.FromInt(80)}) + }, + numErrs: 1, + }, + { + name: "valid duplicate ports (with different protocols)", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeClusterIP + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "q", Port: 12345, Protocol: "TCP", TargetPort: intstr.FromInt(8080)}) + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "r", Port: 12345, Protocol: "UDP", TargetPort: intstr.FromInt(80)}) + }, + numErrs: 0, + }, + { + name: "invalid duplicate targetports (number with same protocol)", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeClusterIP + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "q", Port: 1, Protocol: "TCP", TargetPort: intstr.FromInt(8080)}) + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "r", Port: 2, Protocol: "TCP", TargetPort: intstr.FromInt(8080)}) + }, + numErrs: 1, + }, + { + name: "invalid duplicate targetports (name with same protocol)", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeClusterIP + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "q", Port: 1, Protocol: "TCP", TargetPort: intstr.FromString("http")}) + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "r", Port: 2, Protocol: "TCP", TargetPort: intstr.FromString("http")}) + }, + numErrs: 1, + }, + { + name: "valid duplicate targetports (number with different protocols)", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeClusterIP + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "q", Port: 1, Protocol: "TCP", TargetPort: intstr.FromInt(8080)}) + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "r", Port: 2, Protocol: "UDP", TargetPort: intstr.FromInt(8080)}) + }, + numErrs: 0, + }, + { + name: "valid duplicate targetports (name with different protocols)", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeClusterIP + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "q", Port: 1, Protocol: "TCP", TargetPort: intstr.FromString("http")}) + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "r", Port: 2, Protocol: "UDP", TargetPort: intstr.FromString("http")}) + }, + numErrs: 0, + }, + { + name: "valid type - cluster", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeClusterIP + }, + numErrs: 0, + }, + { + name: "valid type - nodeport", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeNodePort + }, + numErrs: 0, + }, + { + name: "valid type - loadbalancer", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeLoadBalancer + }, + numErrs: 0, + }, + { + name: "valid type loadbalancer 2 ports", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeLoadBalancer + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "q", Port: 12345, Protocol: "TCP", TargetPort: intstr.FromInt(12345)}) + }, + numErrs: 0, + }, + { + name: "valid type loadbalancer with NodePort", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeLoadBalancer + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "q", Port: 12345, Protocol: "TCP", NodePort: 12345, TargetPort: intstr.FromInt(12345)}) + }, + numErrs: 0, + }, + { + name: "valid type=NodePort service with NodePort", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeNodePort + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "q", Port: 12345, Protocol: "TCP", NodePort: 12345, TargetPort: intstr.FromInt(12345)}) + }, + numErrs: 0, + }, + { + name: "valid type=NodePort service without NodePort", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeNodePort + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "q", Port: 12345, Protocol: "TCP", TargetPort: intstr.FromInt(12345)}) + }, + numErrs: 0, + }, + { + name: "valid cluster service without NodePort", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeClusterIP + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "q", Port: 12345, Protocol: "TCP", TargetPort: intstr.FromInt(12345)}) + }, + numErrs: 0, + }, + { + name: "invalid cluster service with NodePort", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeClusterIP + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "q", Port: 12345, Protocol: "TCP", NodePort: 12345, TargetPort: intstr.FromInt(12345)}) + }, + numErrs: 1, + }, + { + name: "invalid public service with duplicate NodePort", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeNodePort + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "p1", Port: 1, Protocol: "TCP", NodePort: 1, TargetPort: intstr.FromInt(1)}) + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "p2", Port: 2, Protocol: "TCP", NodePort: 1, TargetPort: intstr.FromInt(2)}) + }, + numErrs: 1, + }, + { + name: "valid type=LoadBalancer", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeLoadBalancer + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "q", Port: 12345, Protocol: "TCP", TargetPort: intstr.FromInt(12345)}) + }, + numErrs: 0, + }, + { + // For now we open firewalls, and its insecure if we open 10250, remove this + // when we have better protections in place. + name: "invalid port type=LoadBalancer", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeLoadBalancer + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "kubelet", Port: 10250, Protocol: "TCP", TargetPort: intstr.FromInt(12345)}) + }, + numErrs: 1, + }, + { + name: "valid LoadBalancer source range annotation", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeLoadBalancer + s.Annotations[api.AnnotationLoadBalancerSourceRangesKey] = "1.2.3.4/8, 5.6.7.8/16" + }, + numErrs: 0, + }, + { + name: "empty LoadBalancer source range annotation", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeLoadBalancer + s.Annotations[api.AnnotationLoadBalancerSourceRangesKey] = "" + }, + numErrs: 0, + }, + { + name: "invalid LoadBalancer source range annotation (hostname)", + tweakSvc: func(s *api.Service) { + s.Annotations[api.AnnotationLoadBalancerSourceRangesKey] = "foo.bar" + }, + numErrs: 2, + }, + { + name: "invalid LoadBalancer source range annotation (invalid CIDR)", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeLoadBalancer + s.Annotations[api.AnnotationLoadBalancerSourceRangesKey] = "1.2.3.4/33" + }, + numErrs: 1, + }, + { + name: "invalid source range for non LoadBalancer type service", + tweakSvc: func(s *api.Service) { + s.Spec.LoadBalancerSourceRanges = []string{"1.2.3.4/8", "5.6.7.8/16"} + }, + numErrs: 1, + }, + { + name: "valid LoadBalancer source range", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeLoadBalancer + s.Spec.LoadBalancerSourceRanges = []string{"1.2.3.4/8", "5.6.7.8/16"} + }, + numErrs: 0, + }, + { + name: "empty LoadBalancer source range", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeLoadBalancer + s.Spec.LoadBalancerSourceRanges = []string{" "} + }, + numErrs: 1, + }, + { + name: "invalid LoadBalancer source range", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeLoadBalancer + s.Spec.LoadBalancerSourceRanges = []string{"foo.bar"} + }, + numErrs: 1, + }, + { + name: "valid ExternalName", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeExternalName + s.Spec.ClusterIP = "" + s.Spec.ExternalName = "foo.bar.example.com" + }, + numErrs: 0, + }, + { + name: "invalid ExternalName clusterIP (valid IP)", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeExternalName + s.Spec.ClusterIP = "1.2.3.4" + s.Spec.ExternalName = "foo.bar.example.com" + }, + numErrs: 1, + }, + { + name: "invalid ExternalName clusterIP (None)", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeExternalName + s.Spec.ClusterIP = "None" + s.Spec.ExternalName = "foo.bar.example.com" + }, + numErrs: 1, + }, + { + name: "invalid ExternalName (not a DNS name)", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeExternalName + s.Spec.ClusterIP = "" + s.Spec.ExternalName = "-123" + }, + numErrs: 1, + }, + { + name: "LoadBalancer type cannot have None ClusterIP", + tweakSvc: func(s *api.Service) { + s.Spec.ClusterIP = "None" + s.Spec.Type = api.ServiceTypeLoadBalancer + }, + numErrs: 1, + }, + { + name: "invalid node port with clusterIP None", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeNodePort + s.Spec.Ports = append(s.Spec.Ports, api.ServicePort{Name: "q", Port: 1, Protocol: "TCP", NodePort: 1, TargetPort: intstr.FromInt(1)}) + s.Spec.ClusterIP = "None" + }, + numErrs: 1, + }, + // ESIPP section begins. + { + name: "invalid externalTraffic field", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeLoadBalancer + s.Spec.ExternalTrafficPolicy = "invalid" + }, + numErrs: 1, + }, + { + name: "nagative healthCheckNodePort field", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeLoadBalancer + s.Spec.ExternalTrafficPolicy = api.ServiceExternalTrafficPolicyTypeLocal + s.Spec.HealthCheckNodePort = -1 + }, + numErrs: 1, + }, + { + name: "nagative healthCheckNodePort field", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeLoadBalancer + s.Spec.ExternalTrafficPolicy = api.ServiceExternalTrafficPolicyTypeLocal + s.Spec.HealthCheckNodePort = 31100 + }, + numErrs: 0, + }, + // ESIPP section ends. + { + name: "invalid timeoutSeconds field", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeClusterIP + s.Spec.SessionAffinity = api.ServiceAffinityClientIP + s.Spec.SessionAffinityConfig = &api.SessionAffinityConfig{ + ClientIP: &api.ClientIPConfig{ + TimeoutSeconds: newInt32(-1), + }, + } + }, + numErrs: 1, + }, + { + name: "sessionAffinityConfig can't be set when session affinity is None", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeLoadBalancer + s.Spec.SessionAffinity = api.ServiceAffinityNone + s.Spec.SessionAffinityConfig = &api.SessionAffinityConfig{ + ClientIP: &api.ClientIPConfig{ + TimeoutSeconds: newInt32(90), + }, + } + }, + numErrs: 1, + }, + } + + for _, tc := range testCases { + svc := makeValidService() + tc.tweakSvc(&svc) + errs := ValidateService(&svc) + if len(errs) != tc.numErrs { + t.Errorf("Unexpected error list for case %q: %v", tc.name, errs.ToAggregate()) + } + } +} + +func TestValidateServiceExternalTrafficFieldsCombination(t *testing.T) { + testCases := []struct { + name string + tweakSvc func(svc *api.Service) // Given a basic valid service, each test case can customize it. + numErrs int + }{ + { + name: "valid loadBalancer service with externalTrafficPolicy and healthCheckNodePort set", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeLoadBalancer + s.Spec.ExternalTrafficPolicy = api.ServiceExternalTrafficPolicyTypeLocal + s.Spec.HealthCheckNodePort = 34567 + }, + numErrs: 0, + }, + { + name: "valid nodePort service with externalTrafficPolicy set", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeNodePort + s.Spec.ExternalTrafficPolicy = api.ServiceExternalTrafficPolicyTypeLocal + }, + numErrs: 0, + }, + { + name: "valid clusterIP service with none of externalTrafficPolicy and healthCheckNodePort set", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeClusterIP + }, + numErrs: 0, + }, + { + name: "cannot set healthCheckNodePort field on loadBalancer service with externalTrafficPolicy!=Local", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeLoadBalancer + s.Spec.ExternalTrafficPolicy = api.ServiceExternalTrafficPolicyTypeCluster + s.Spec.HealthCheckNodePort = 34567 + }, + numErrs: 1, + }, + { + name: "cannot set healthCheckNodePort field on nodePort service", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeNodePort + s.Spec.ExternalTrafficPolicy = api.ServiceExternalTrafficPolicyTypeLocal + s.Spec.HealthCheckNodePort = 34567 + }, + numErrs: 1, + }, + { + name: "cannot set externalTrafficPolicy or healthCheckNodePort fields on clusterIP service", + tweakSvc: func(s *api.Service) { + s.Spec.Type = api.ServiceTypeClusterIP + s.Spec.ExternalTrafficPolicy = api.ServiceExternalTrafficPolicyTypeLocal + s.Spec.HealthCheckNodePort = 34567 + }, + numErrs: 2, + }, + } + + for _, tc := range testCases { + svc := makeValidService() + tc.tweakSvc(&svc) + errs := ValidateServiceExternalTrafficFieldsCombination(&svc) + if len(errs) != tc.numErrs { + t.Errorf("Unexpected error list for case %q: %v", tc.name, errs.ToAggregate()) + } + } +} + +func TestValidateReplicationControllerStatus(t *testing.T) { + tests := []struct { + name string + + replicas int32 + fullyLabeledReplicas int32 + readyReplicas int32 + availableReplicas int32 + observedGeneration int64 + + expectedErr bool + }{ + { + name: "valid status", + replicas: 3, + fullyLabeledReplicas: 3, + readyReplicas: 2, + availableReplicas: 1, + observedGeneration: 2, + expectedErr: false, + }, + { + name: "invalid replicas", + replicas: -1, + fullyLabeledReplicas: 3, + readyReplicas: 2, + availableReplicas: 1, + observedGeneration: 2, + expectedErr: true, + }, + { + name: "invalid fullyLabeledReplicas", + replicas: 3, + fullyLabeledReplicas: -1, + readyReplicas: 2, + availableReplicas: 1, + observedGeneration: 2, + expectedErr: true, + }, + { + name: "invalid readyReplicas", + replicas: 3, + fullyLabeledReplicas: 3, + readyReplicas: -1, + availableReplicas: 1, + observedGeneration: 2, + expectedErr: true, + }, + { + name: "invalid availableReplicas", + replicas: 3, + fullyLabeledReplicas: 3, + readyReplicas: 3, + availableReplicas: -1, + observedGeneration: 2, + expectedErr: true, + }, + { + name: "invalid observedGeneration", + replicas: 3, + fullyLabeledReplicas: 3, + readyReplicas: 3, + availableReplicas: 3, + observedGeneration: -1, + expectedErr: true, + }, + { + name: "fullyLabeledReplicas greater than replicas", + replicas: 3, + fullyLabeledReplicas: 4, + readyReplicas: 3, + availableReplicas: 3, + observedGeneration: 1, + expectedErr: true, + }, + { + name: "readyReplicas greater than replicas", + replicas: 3, + fullyLabeledReplicas: 3, + readyReplicas: 4, + availableReplicas: 3, + observedGeneration: 1, + expectedErr: true, + }, + { + name: "availableReplicas greater than replicas", + replicas: 3, + fullyLabeledReplicas: 3, + readyReplicas: 3, + availableReplicas: 4, + observedGeneration: 1, + expectedErr: true, + }, + { + name: "availableReplicas greater than readyReplicas", + replicas: 3, + fullyLabeledReplicas: 3, + readyReplicas: 2, + availableReplicas: 3, + observedGeneration: 1, + expectedErr: true, + }, + } + + for _, test := range tests { + status := api.ReplicationControllerStatus{ + Replicas: test.replicas, + FullyLabeledReplicas: test.fullyLabeledReplicas, + ReadyReplicas: test.readyReplicas, + AvailableReplicas: test.availableReplicas, + ObservedGeneration: test.observedGeneration, + } + + if hasErr := len(ValidateReplicationControllerStatus(status, field.NewPath("status"))) > 0; hasErr != test.expectedErr { + t.Errorf("%s: expected error: %t, got error: %t", test.name, test.expectedErr, hasErr) + } + } +} + +func TestValidateReplicationControllerStatusUpdate(t *testing.T) { + validSelector := map[string]string{"a": "b"} + validPodTemplate := api.PodTemplate{ + Template: api.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: validSelector, + }, + Spec: api.PodSpec{ + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + }, + }, + } + type rcUpdateTest struct { + old api.ReplicationController + update api.ReplicationController + } + successCases := []rcUpdateTest{ + { + old: api.ReplicationController{ + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, + Spec: api.ReplicationControllerSpec{ + Selector: validSelector, + Template: &validPodTemplate.Template, + }, + Status: api.ReplicationControllerStatus{ + Replicas: 2, + }, + }, + update: api.ReplicationController{ + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, + Spec: api.ReplicationControllerSpec{ + Replicas: 3, + Selector: validSelector, + Template: &validPodTemplate.Template, + }, + Status: api.ReplicationControllerStatus{ + Replicas: 4, + }, + }, + }, + } + for _, successCase := range successCases { + successCase.old.ObjectMeta.ResourceVersion = "1" + successCase.update.ObjectMeta.ResourceVersion = "1" + if errs := ValidateReplicationControllerStatusUpdate(&successCase.update, &successCase.old); len(errs) != 0 { + t.Errorf("expected success: %v", errs) + } + } + errorCases := map[string]rcUpdateTest{ + "negative replicas": { + old: api.ReplicationController{ + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault}, + Spec: api.ReplicationControllerSpec{ + Selector: validSelector, + Template: &validPodTemplate.Template, + }, + Status: api.ReplicationControllerStatus{ + Replicas: 3, + }, + }, + update: api.ReplicationController{ + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, + Spec: api.ReplicationControllerSpec{ + Replicas: 2, + Selector: validSelector, + Template: &validPodTemplate.Template, + }, + Status: api.ReplicationControllerStatus{ + Replicas: -3, + }, + }, + }, + } + for testName, errorCase := range errorCases { + if errs := ValidateReplicationControllerStatusUpdate(&errorCase.update, &errorCase.old); len(errs) == 0 { + t.Errorf("expected failure: %s", testName) + } + } + +} + +func TestValidateReplicationControllerUpdate(t *testing.T) { + validSelector := map[string]string{"a": "b"} + validPodTemplate := api.PodTemplate{ + Template: api.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: validSelector, + }, + Spec: api.PodSpec{ + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + }, + }, + } + readWriteVolumePodTemplate := api.PodTemplate{ + Template: api.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: validSelector, + }, + Spec: api.PodSpec{ + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + Volumes: []api.Volume{{Name: "gcepd", VolumeSource: api.VolumeSource{GCEPersistentDisk: &api.GCEPersistentDiskVolumeSource{PDName: "my-PD", FSType: "ext4", Partition: 1, ReadOnly: false}}}}, + }, + }, + } + invalidSelector := map[string]string{"NoUppercaseOrSpecialCharsLike=Equals": "b"} + invalidPodTemplate := api.PodTemplate{ + Template: api.PodTemplateSpec{ + Spec: api.PodSpec{ + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + ObjectMeta: metav1.ObjectMeta{ + Labels: invalidSelector, + }, + }, + } + type rcUpdateTest struct { + old api.ReplicationController + update api.ReplicationController + } + successCases := []rcUpdateTest{ + { + old: api.ReplicationController{ + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, + Spec: api.ReplicationControllerSpec{ + Selector: validSelector, + Template: &validPodTemplate.Template, + }, + }, + update: api.ReplicationController{ + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, + Spec: api.ReplicationControllerSpec{ + Replicas: 3, + Selector: validSelector, + Template: &validPodTemplate.Template, + }, + }, + }, + { + old: api.ReplicationController{ + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, + Spec: api.ReplicationControllerSpec{ + Selector: validSelector, + Template: &validPodTemplate.Template, + }, + }, + update: api.ReplicationController{ + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, + Spec: api.ReplicationControllerSpec{ + Replicas: 1, + Selector: validSelector, + Template: &readWriteVolumePodTemplate.Template, + }, + }, + }, + } + for _, successCase := range successCases { + successCase.old.ObjectMeta.ResourceVersion = "1" + successCase.update.ObjectMeta.ResourceVersion = "1" + if errs := ValidateReplicationControllerUpdate(&successCase.update, &successCase.old); len(errs) != 0 { + t.Errorf("expected success: %v", errs) + } + } + errorCases := map[string]rcUpdateTest{ + "more than one read/write": { + old: api.ReplicationController{ + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault}, + Spec: api.ReplicationControllerSpec{ + Selector: validSelector, + Template: &validPodTemplate.Template, + }, + }, + update: api.ReplicationController{ + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, + Spec: api.ReplicationControllerSpec{ + Replicas: 2, + Selector: validSelector, + Template: &readWriteVolumePodTemplate.Template, + }, + }, + }, + "invalid selector": { + old: api.ReplicationController{ + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault}, + Spec: api.ReplicationControllerSpec{ + Selector: validSelector, + Template: &validPodTemplate.Template, + }, + }, + update: api.ReplicationController{ + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, + Spec: api.ReplicationControllerSpec{ + Replicas: 2, + Selector: invalidSelector, + Template: &validPodTemplate.Template, + }, + }, + }, + "invalid pod": { + old: api.ReplicationController{ + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault}, + Spec: api.ReplicationControllerSpec{ + Selector: validSelector, + Template: &validPodTemplate.Template, + }, + }, + update: api.ReplicationController{ + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, + Spec: api.ReplicationControllerSpec{ + Replicas: 2, + Selector: validSelector, + Template: &invalidPodTemplate.Template, + }, + }, + }, + "negative replicas": { + old: api.ReplicationController{ + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, + Spec: api.ReplicationControllerSpec{ + Selector: validSelector, + Template: &validPodTemplate.Template, + }, + }, + update: api.ReplicationController{ + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, + Spec: api.ReplicationControllerSpec{ + Replicas: -1, + Selector: validSelector, + Template: &validPodTemplate.Template, + }, + }, + }, + } + for testName, errorCase := range errorCases { + if errs := ValidateReplicationControllerUpdate(&errorCase.update, &errorCase.old); len(errs) == 0 { + t.Errorf("expected failure: %s", testName) + } + } +} + +func TestValidateReplicationController(t *testing.T) { + validSelector := map[string]string{"a": "b"} + validPodTemplate := api.PodTemplate{ + Template: api.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: validSelector, + }, + Spec: api.PodSpec{ + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + }, + }, + } + readWriteVolumePodTemplate := api.PodTemplate{ + Template: api.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: validSelector, + }, + Spec: api.PodSpec{ + Volumes: []api.Volume{{Name: "gcepd", VolumeSource: api.VolumeSource{GCEPersistentDisk: &api.GCEPersistentDiskVolumeSource{PDName: "my-PD", FSType: "ext4", Partition: 1, ReadOnly: false}}}}, + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + }, + }, + } + invalidSelector := map[string]string{"NoUppercaseOrSpecialCharsLike=Equals": "b"} + invalidPodTemplate := api.PodTemplate{ + Template: api.PodTemplateSpec{ + Spec: api.PodSpec{ + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + }, + ObjectMeta: metav1.ObjectMeta{ + Labels: invalidSelector, + }, + }, + } + successCases := []api.ReplicationController{ + { + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, + Spec: api.ReplicationControllerSpec{ + Selector: validSelector, + Template: &validPodTemplate.Template, + }, + }, + { + ObjectMeta: metav1.ObjectMeta{Name: "abc-123", Namespace: metav1.NamespaceDefault}, + Spec: api.ReplicationControllerSpec{ + Selector: validSelector, + Template: &validPodTemplate.Template, + }, + }, + { + ObjectMeta: metav1.ObjectMeta{Name: "abc-123", Namespace: metav1.NamespaceDefault}, + Spec: api.ReplicationControllerSpec{ + Replicas: 1, + Selector: validSelector, + Template: &readWriteVolumePodTemplate.Template, + }, + }, + } + for _, successCase := range successCases { + if errs := ValidateReplicationController(&successCase); len(errs) != 0 { + t.Errorf("expected success: %v", errs) + } + } + + errorCases := map[string]api.ReplicationController{ + "zero-length ID": { + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault}, + Spec: api.ReplicationControllerSpec{ + Selector: validSelector, + Template: &validPodTemplate.Template, + }, + }, + "missing-namespace": { + ObjectMeta: metav1.ObjectMeta{Name: "abc-123"}, + Spec: api.ReplicationControllerSpec{ + Selector: validSelector, + Template: &validPodTemplate.Template, + }, + }, + "empty selector": { + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, + Spec: api.ReplicationControllerSpec{ + Template: &validPodTemplate.Template, + }, + }, + "selector_doesnt_match": { + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, + Spec: api.ReplicationControllerSpec{ + Selector: map[string]string{"foo": "bar"}, + Template: &validPodTemplate.Template, + }, + }, + "invalid manifest": { + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, + Spec: api.ReplicationControllerSpec{ + Selector: validSelector, + }, + }, + "read-write persistent disk with > 1 pod": { + ObjectMeta: metav1.ObjectMeta{Name: "abc"}, + Spec: api.ReplicationControllerSpec{ + Replicas: 2, + Selector: validSelector, + Template: &readWriteVolumePodTemplate.Template, + }, + }, + "negative_replicas": { + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, + Spec: api.ReplicationControllerSpec{ + Replicas: -1, + Selector: validSelector, + }, + }, + "invalid_label": { + ObjectMeta: metav1.ObjectMeta{ + Name: "abc-123", + Namespace: metav1.NamespaceDefault, + Labels: map[string]string{ + "NoUppercaseOrSpecialCharsLike=Equals": "bar", + }, + }, + Spec: api.ReplicationControllerSpec{ + Selector: validSelector, + Template: &validPodTemplate.Template, + }, + }, + "invalid_label 2": { + ObjectMeta: metav1.ObjectMeta{ + Name: "abc-123", + Namespace: metav1.NamespaceDefault, + Labels: map[string]string{ + "NoUppercaseOrSpecialCharsLike=Equals": "bar", + }, + }, + Spec: api.ReplicationControllerSpec{ + Template: &invalidPodTemplate.Template, + }, + }, + "invalid_annotation": { + ObjectMeta: metav1.ObjectMeta{ + Name: "abc-123", + Namespace: metav1.NamespaceDefault, + Annotations: map[string]string{ + "NoUppercaseOrSpecialCharsLike=Equals": "bar", + }, + }, + Spec: api.ReplicationControllerSpec{ + Selector: validSelector, + Template: &validPodTemplate.Template, + }, + }, + "invalid restart policy 1": { + ObjectMeta: metav1.ObjectMeta{ + Name: "abc-123", + Namespace: metav1.NamespaceDefault, + }, + Spec: api.ReplicationControllerSpec{ + Selector: validSelector, + Template: &api.PodTemplateSpec{ + Spec: api.PodSpec{ + RestartPolicy: api.RestartPolicyOnFailure, + DNSPolicy: api.DNSClusterFirst, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + }, + ObjectMeta: metav1.ObjectMeta{ + Labels: validSelector, + }, + }, + }, + }, + "invalid restart policy 2": { + ObjectMeta: metav1.ObjectMeta{ + Name: "abc-123", + Namespace: metav1.NamespaceDefault, + }, + Spec: api.ReplicationControllerSpec{ + Selector: validSelector, + Template: &api.PodTemplateSpec{ + Spec: api.PodSpec{ + RestartPolicy: api.RestartPolicyNever, + DNSPolicy: api.DNSClusterFirst, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + }, + ObjectMeta: metav1.ObjectMeta{ + Labels: validSelector, + }, + }, + }, + }, + } + for k, v := range errorCases { + errs := ValidateReplicationController(&v) + if len(errs) == 0 { + t.Errorf("expected failure for %s", k) + } + for i := range errs { + field := errs[i].Field + if !strings.HasPrefix(field, "spec.template.") && + field != "metadata.name" && + field != "metadata.namespace" && + field != "spec.selector" && + field != "spec.template" && + field != "GCEPersistentDisk.ReadOnly" && + field != "spec.replicas" && + field != "spec.template.labels" && + field != "metadata.annotations" && + field != "metadata.labels" && + field != "status.replicas" { + t.Errorf("%s: missing prefix for: %v", k, errs[i]) + } + } + } +} + +func TestValidateNode(t *testing.T) { + validSelector := map[string]string{"a": "b"} + invalidSelector := map[string]string{"NoUppercaseOrSpecialCharsLike=Equals": "b"} + successCases := []api.Node{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: "abc", + Labels: validSelector, + }, + Status: api.NodeStatus{ + Addresses: []api.NodeAddress{ + {Type: api.NodeExternalIP, Address: "something"}, + }, + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("10"), + api.ResourceName(api.ResourceMemory): resource.MustParse("10G"), + api.ResourceName("my.org/gpu"): resource.MustParse("10"), + api.ResourceName("hugepages-2Mi"): resource.MustParse("10Gi"), + api.ResourceName("hugepages-1Gi"): resource.MustParse("0"), + }, + }, + Spec: api.NodeSpec{ + ExternalID: "external", + }, + }, + { + ObjectMeta: metav1.ObjectMeta{ + Name: "abc", + }, + Status: api.NodeStatus{ + Addresses: []api.NodeAddress{ + {Type: api.NodeExternalIP, Address: "something"}, + }, + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("10"), + api.ResourceName(api.ResourceMemory): resource.MustParse("0"), + }, + }, + Spec: api.NodeSpec{ + ExternalID: "external", + }, + }, + { + ObjectMeta: metav1.ObjectMeta{ + Name: "dedicated-node1", + }, + Status: api.NodeStatus{ + Addresses: []api.NodeAddress{ + {Type: api.NodeExternalIP, Address: "something"}, + }, + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("10"), + api.ResourceName(api.ResourceMemory): resource.MustParse("0"), + }, + }, + Spec: api.NodeSpec{ + ExternalID: "external", + // Add a valid taint to a node + Taints: []api.Taint{{Key: "GPU", Value: "true", Effect: "NoSchedule"}}, + }, + }, + { + ObjectMeta: metav1.ObjectMeta{ + Name: "abc", + Annotations: map[string]string{ + api.PreferAvoidPodsAnnotationKey: ` + { + "preferAvoidPods": [ + { + "podSignature": { + "podController": { + "apiVersion": "v1", + "kind": "ReplicationController", + "name": "foo", + "uid": "abcdef123456", + "controller": true + } + }, + "reason": "some reason", + "message": "some message" + } + ] + }`, + }, + }, + Status: api.NodeStatus{ + Addresses: []api.NodeAddress{ + {Type: api.NodeExternalIP, Address: "something"}, + }, + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("10"), + api.ResourceName(api.ResourceMemory): resource.MustParse("0"), + }, + }, + Spec: api.NodeSpec{ + ExternalID: "external", + }, + }, + } + for _, successCase := range successCases { + if errs := ValidateNode(&successCase); len(errs) != 0 { + t.Errorf("expected success: %v", errs) + } + } + + errorCases := map[string]api.Node{ + "zero-length Name": { + ObjectMeta: metav1.ObjectMeta{ + Name: "", + Labels: validSelector, + }, + Status: api.NodeStatus{ + Addresses: []api.NodeAddress{}, + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("10"), + api.ResourceName(api.ResourceMemory): resource.MustParse("10G"), + }, + }, + Spec: api.NodeSpec{ + ExternalID: "external", + }, + }, + "invalid-labels": { + ObjectMeta: metav1.ObjectMeta{ + Name: "abc-123", + Labels: invalidSelector, + }, + Status: api.NodeStatus{ + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("10"), + api.ResourceName(api.ResourceMemory): resource.MustParse("10G"), + }, + }, + Spec: api.NodeSpec{ + ExternalID: "external", + }, + }, + "missing-external-id": { + ObjectMeta: metav1.ObjectMeta{ + Name: "abc-123", + Labels: validSelector, + }, + Status: api.NodeStatus{ + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("10"), + api.ResourceName(api.ResourceMemory): resource.MustParse("10G"), + }, + }, + }, + "missing-taint-key": { + ObjectMeta: metav1.ObjectMeta{ + Name: "dedicated-node1", + }, + Spec: api.NodeSpec{ + ExternalID: "external", + // Add a taint with an empty key to a node + Taints: []api.Taint{{Key: "", Value: "special-user-1", Effect: "NoSchedule"}}, + }, + }, + "bad-taint-key": { + ObjectMeta: metav1.ObjectMeta{ + Name: "dedicated-node1", + }, + Spec: api.NodeSpec{ + ExternalID: "external", + // Add a taint with an invalid key to a node + Taints: []api.Taint{{Key: "NoUppercaseOrSpecialCharsLike=Equals", Value: "special-user-1", Effect: "NoSchedule"}}, + }, + }, + "bad-taint-value": { + ObjectMeta: metav1.ObjectMeta{ + Name: "dedicated-node2", + }, + Status: api.NodeStatus{ + Addresses: []api.NodeAddress{ + {Type: api.NodeExternalIP, Address: "something"}, + }, + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("10"), + api.ResourceName(api.ResourceMemory): resource.MustParse("0"), + }, + }, + Spec: api.NodeSpec{ + ExternalID: "external", + // Add a taint with a bad value to a node + Taints: []api.Taint{{Key: "dedicated", Value: "some\\bad\\value", Effect: "NoSchedule"}}, + }, + }, + "missing-taint-effect": { + ObjectMeta: metav1.ObjectMeta{ + Name: "dedicated-node3", + }, + Status: api.NodeStatus{ + Addresses: []api.NodeAddress{ + {Type: api.NodeExternalIP, Address: "something"}, + }, + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("10"), + api.ResourceName(api.ResourceMemory): resource.MustParse("0"), + }, + }, + Spec: api.NodeSpec{ + ExternalID: "external", + // Add a taint with an empty effect to a node + Taints: []api.Taint{{Key: "dedicated", Value: "special-user-3", Effect: ""}}, + }, + }, + "invalid-taint-effect": { + ObjectMeta: metav1.ObjectMeta{ + Name: "dedicated-node3", + }, + Status: api.NodeStatus{ + Addresses: []api.NodeAddress{ + {Type: api.NodeExternalIP, Address: "something"}, + }, + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("10"), + api.ResourceName(api.ResourceMemory): resource.MustParse("0"), + }, + }, + Spec: api.NodeSpec{ + ExternalID: "external", + // Add a taint with NoExecute effect to a node + Taints: []api.Taint{{Key: "dedicated", Value: "special-user-3", Effect: "NoScheduleNoAdmit"}}, + }, + }, + "duplicated-taints-with-same-key-effect": { + ObjectMeta: metav1.ObjectMeta{ + Name: "dedicated-node1", + }, + Spec: api.NodeSpec{ + ExternalID: "external", + // Add two taints to the node with the same key and effect; should be rejected. + Taints: []api.Taint{ + {Key: "dedicated", Value: "special-user-1", Effect: "NoSchedule"}, + {Key: "dedicated", Value: "special-user-2", Effect: "NoSchedule"}, + }, + }, + }, + "missing-podSignature": { + ObjectMeta: metav1.ObjectMeta{ + Name: "abc-123", + Annotations: map[string]string{ + api.PreferAvoidPodsAnnotationKey: ` + { + "preferAvoidPods": [ + { + "reason": "some reason", + "message": "some message" + } + ] + }`, + }, + }, + Status: api.NodeStatus{ + Addresses: []api.NodeAddress{}, + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("10"), + api.ResourceName(api.ResourceMemory): resource.MustParse("0"), + }, + }, + Spec: api.NodeSpec{ + ExternalID: "external", + }, + }, + "invalid-podController": { + ObjectMeta: metav1.ObjectMeta{ + Name: "abc-123", + Annotations: map[string]string{ + api.PreferAvoidPodsAnnotationKey: ` + { + "preferAvoidPods": [ + { + "podSignature": { + "podController": { + "apiVersion": "v1", + "kind": "ReplicationController", + "name": "foo", + "uid": "abcdef123456", + "controller": false + } + }, + "reason": "some reason", + "message": "some message" + } + ] + }`, + }, + }, + Status: api.NodeStatus{ + Addresses: []api.NodeAddress{}, + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("10"), + api.ResourceName(api.ResourceMemory): resource.MustParse("0"), + }, + }, + Spec: api.NodeSpec{ + ExternalID: "external", + }, + }, + "multiple-pre-allocated-hugepages": { + ObjectMeta: metav1.ObjectMeta{ + Name: "abc", + Labels: validSelector, + }, + Status: api.NodeStatus{ + Addresses: []api.NodeAddress{ + {Type: api.NodeExternalIP, Address: "something"}, + }, + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("10"), + api.ResourceName(api.ResourceMemory): resource.MustParse("10G"), + api.ResourceName("my.org/gpu"): resource.MustParse("10"), + api.ResourceName("hugepages-2Mi"): resource.MustParse("10Gi"), + api.ResourceName("hugepages-1Gi"): resource.MustParse("10Gi"), + }, + }, + Spec: api.NodeSpec{ + ExternalID: "external", + }, + }, + } + for k, v := range errorCases { + errs := ValidateNode(&v) + if len(errs) == 0 { + t.Errorf("expected failure for %s", k) + } + for i := range errs { + field := errs[i].Field + expectedFields := map[string]bool{ + "metadata.name": true, + "metadata.labels": true, + "metadata.annotations": true, + "metadata.namespace": true, + "spec.externalID": true, + "spec.taints[0].key": true, + "spec.taints[0].value": true, + "spec.taints[0].effect": true, + "metadata.annotations.scheduler.alpha.kubernetes.io/preferAvoidPods[0].PodSignature": true, + "metadata.annotations.scheduler.alpha.kubernetes.io/preferAvoidPods[0].PodSignature.PodController.Controller": true, + } + if val, ok := expectedFields[field]; ok { + if !val { + t.Errorf("%s: missing prefix for: %v", k, errs[i]) + } + } + } + } +} + +func TestValidateNodeUpdate(t *testing.T) { + tests := []struct { + oldNode api.Node + node api.Node + valid bool + }{ + {api.Node{}, api.Node{}, true}, + {api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo"}}, + api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "bar"}, + }, false}, + {api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Labels: map[string]string{"foo": "bar"}, + }, + }, api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Labels: map[string]string{"foo": "baz"}, + }, + }, true}, + {api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + }, api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Labels: map[string]string{"foo": "baz"}, + }, + }, true}, + {api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Labels: map[string]string{"bar": "foo"}, + }, + }, api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Labels: map[string]string{"foo": "baz"}, + }, + }, true}, + {api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Spec: api.NodeSpec{ + PodCIDR: "", + }, + }, api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Spec: api.NodeSpec{ + PodCIDR: "192.168.0.0/16", + }, + }, true}, + {api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Spec: api.NodeSpec{ + PodCIDR: "192.123.0.0/16", + }, + }, api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Spec: api.NodeSpec{ + PodCIDR: "192.168.0.0/16", + }, + }, false}, + {api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Status: api.NodeStatus{ + Capacity: api.ResourceList{ + api.ResourceCPU: resource.MustParse("10000"), + api.ResourceMemory: resource.MustParse("100"), + }, + }, + }, api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Status: api.NodeStatus{ + Capacity: api.ResourceList{ + api.ResourceCPU: resource.MustParse("100"), + api.ResourceMemory: resource.MustParse("10000"), + }, + }, + }, true}, + {api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Labels: map[string]string{"bar": "foo"}, + }, + Status: api.NodeStatus{ + Capacity: api.ResourceList{ + api.ResourceCPU: resource.MustParse("10000"), + api.ResourceMemory: resource.MustParse("100"), + }, + }, + }, api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Labels: map[string]string{"bar": "fooobaz"}, + }, + Status: api.NodeStatus{ + Capacity: api.ResourceList{ + api.ResourceCPU: resource.MustParse("100"), + api.ResourceMemory: resource.MustParse("10000"), + }, + }, + }, true}, + {api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Labels: map[string]string{"bar": "foo"}, + }, + Status: api.NodeStatus{ + Addresses: []api.NodeAddress{ + {Type: api.NodeExternalIP, Address: "1.2.3.4"}, + }, + }, + }, api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Labels: map[string]string{"bar": "fooobaz"}, + }, + }, true}, + {api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Labels: map[string]string{"foo": "baz"}, + }, + }, api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Labels: map[string]string{"Foo": "baz"}, + }, + }, true}, + {api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Spec: api.NodeSpec{ + Unschedulable: false, + }, + }, api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Spec: api.NodeSpec{ + Unschedulable: true, + }, + }, true}, + {api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Spec: api.NodeSpec{ + Unschedulable: false, + }, + }, api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Status: api.NodeStatus{ + Addresses: []api.NodeAddress{ + {Type: api.NodeExternalIP, Address: "1.1.1.1"}, + {Type: api.NodeExternalIP, Address: "1.1.1.1"}, + }, + }, + }, false}, + {api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Spec: api.NodeSpec{ + Unschedulable: false, + }, + }, api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + Status: api.NodeStatus{ + Addresses: []api.NodeAddress{ + {Type: api.NodeExternalIP, Address: "1.1.1.1"}, + {Type: api.NodeInternalIP, Address: "10.1.1.1"}, + }, + }, + }, true}, + {api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + }, api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Annotations: map[string]string{ + api.PreferAvoidPodsAnnotationKey: ` + { + "preferAvoidPods": [ + { + "podSignature": { + "podController": { + "apiVersion": "v1", + "kind": "ReplicationController", + "name": "foo", + "uid": "abcdef123456", + "controller": true + } + }, + "reason": "some reason", + "message": "some message" + } + ] + }`, + }, + }, + Spec: api.NodeSpec{ + Unschedulable: false, + }, + }, true}, + {api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + }, api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Annotations: map[string]string{ + api.PreferAvoidPodsAnnotationKey: ` + { + "preferAvoidPods": [ + { + "reason": "some reason", + "message": "some message" + } + ] + }`, + }, + }, + }, false}, + {api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + }, + }, api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Annotations: map[string]string{ + api.PreferAvoidPodsAnnotationKey: ` + { + "preferAvoidPods": [ + { + "podSignature": { + "podController": { + "apiVersion": "v1", + "kind": "ReplicationController", + "name": "foo", + "uid": "abcdef123456", + "controller": false + } + }, + "reason": "some reason", + "message": "some message" + } + ] + }`, + }, + }, + }, false}, + {api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "valid-opaque-int-resources", + }, + }, api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "valid-opaque-int-resources", + }, + Status: api.NodeStatus{ + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("10"), + api.ResourceName(api.ResourceMemory): resource.MustParse("10G"), + helper.OpaqueIntResourceName("A"): resource.MustParse("5"), + helper.OpaqueIntResourceName("B"): resource.MustParse("10"), + }, + }, + }, true}, + {api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "invalid-fractional-opaque-int-capacity", + }, + }, api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "invalid-fractional-opaque-int-capacity", + }, + Status: api.NodeStatus{ + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("10"), + api.ResourceName(api.ResourceMemory): resource.MustParse("10G"), + helper.OpaqueIntResourceName("A"): resource.MustParse("500m"), + }, + }, + }, false}, + {api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "invalid-fractional-opaque-int-allocatable", + }, + }, api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "invalid-fractional-opaque-int-allocatable", + }, + Status: api.NodeStatus{ + Capacity: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("10"), + api.ResourceName(api.ResourceMemory): resource.MustParse("10G"), + helper.OpaqueIntResourceName("A"): resource.MustParse("5"), + }, + Allocatable: api.ResourceList{ + api.ResourceName(api.ResourceCPU): resource.MustParse("10"), + api.ResourceName(api.ResourceMemory): resource.MustParse("10G"), + helper.OpaqueIntResourceName("A"): resource.MustParse("4.5"), + }, + }, + }, false}, + {api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "update-provider-id-when-not-set", + }, + }, api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "update-provider-id-when-not-set", + }, + Spec: api.NodeSpec{ + ProviderID: "provider:///new", + }, + }, true}, + {api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "update-provider-id-when-set", + }, + Spec: api.NodeSpec{ + ProviderID: "provider:///old", + }, + }, api.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "update-provider-id-when-set", + }, + Spec: api.NodeSpec{ + ProviderID: "provider:///new", + }, + }, false}, + } + for i, test := range tests { + test.oldNode.ObjectMeta.ResourceVersion = "1" + test.node.ObjectMeta.ResourceVersion = "1" + errs := ValidateNodeUpdate(&test.node, &test.oldNode) + if test.valid && len(errs) > 0 { + t.Errorf("%d: Unexpected error: %v", i, errs) + t.Logf("%#v vs %#v", test.oldNode.ObjectMeta, test.node.ObjectMeta) + } + if !test.valid && len(errs) == 0 { + t.Errorf("%d: Unexpected non-error", i) + } + } +} + +func TestValidateServiceUpdate(t *testing.T) { + testCases := []struct { + name string + tweakSvc func(oldSvc, newSvc *api.Service) // given basic valid services, each test case can customize them + numErrs int + }{ + { + name: "no change", + tweakSvc: func(oldSvc, newSvc *api.Service) { + // do nothing + }, + numErrs: 0, + }, + { + name: "change name", + tweakSvc: func(oldSvc, newSvc *api.Service) { + newSvc.Name += "2" + }, + numErrs: 1, + }, + { + name: "change namespace", + tweakSvc: func(oldSvc, newSvc *api.Service) { + newSvc.Namespace += "2" + }, + numErrs: 1, + }, + { + name: "change label valid", + tweakSvc: func(oldSvc, newSvc *api.Service) { + newSvc.Labels["key"] = "other-value" + }, + numErrs: 0, + }, + { + name: "add label", + tweakSvc: func(oldSvc, newSvc *api.Service) { + newSvc.Labels["key2"] = "value2" + }, + numErrs: 0, + }, + { + name: "change cluster IP", + tweakSvc: func(oldSvc, newSvc *api.Service) { + oldSvc.Spec.ClusterIP = "1.2.3.4" + newSvc.Spec.ClusterIP = "8.6.7.5" + }, + numErrs: 1, + }, + { + name: "remove cluster IP", + tweakSvc: func(oldSvc, newSvc *api.Service) { + oldSvc.Spec.ClusterIP = "1.2.3.4" + newSvc.Spec.ClusterIP = "" + }, + numErrs: 1, + }, + { + name: "change affinity", + tweakSvc: func(oldSvc, newSvc *api.Service) { + newSvc.Spec.SessionAffinity = "ClientIP" + newSvc.Spec.SessionAffinityConfig = &api.SessionAffinityConfig{ + ClientIP: &api.ClientIPConfig{ + TimeoutSeconds: newInt32(90), + }, + } + }, + numErrs: 0, + }, + { + name: "remove affinity", + tweakSvc: func(oldSvc, newSvc *api.Service) { + newSvc.Spec.SessionAffinity = "" + }, + numErrs: 1, + }, + { + name: "change type", + tweakSvc: func(oldSvc, newSvc *api.Service) { + newSvc.Spec.Type = api.ServiceTypeLoadBalancer + }, + numErrs: 0, + }, + { + name: "remove type", + tweakSvc: func(oldSvc, newSvc *api.Service) { + newSvc.Spec.Type = "" + }, + numErrs: 1, + }, + { + name: "change type -> nodeport", + tweakSvc: func(oldSvc, newSvc *api.Service) { + newSvc.Spec.Type = api.ServiceTypeNodePort + }, + numErrs: 0, + }, + { + name: "add loadBalancerSourceRanges", + tweakSvc: func(oldSvc, newSvc *api.Service) { + oldSvc.Spec.Type = api.ServiceTypeLoadBalancer + newSvc.Spec.Type = api.ServiceTypeLoadBalancer + newSvc.Spec.LoadBalancerSourceRanges = []string{"10.0.0.0/8"} + }, + numErrs: 0, + }, + { + name: "update loadBalancerSourceRanges", + tweakSvc: func(oldSvc, newSvc *api.Service) { + oldSvc.Spec.Type = api.ServiceTypeLoadBalancer + oldSvc.Spec.LoadBalancerSourceRanges = []string{"10.0.0.0/8"} + newSvc.Spec.Type = api.ServiceTypeLoadBalancer + newSvc.Spec.LoadBalancerSourceRanges = []string{"10.100.0.0/16"} + }, + numErrs: 0, + }, + { + name: "LoadBalancer type cannot have None ClusterIP", + tweakSvc: func(oldSvc, newSvc *api.Service) { + newSvc.Spec.ClusterIP = "None" + newSvc.Spec.Type = api.ServiceTypeLoadBalancer + }, + numErrs: 1, + }, + { + name: "`None` ClusterIP cannot be changed", + tweakSvc: func(oldSvc, newSvc *api.Service) { + oldSvc.Spec.ClusterIP = "None" + newSvc.Spec.ClusterIP = "1.2.3.4" + }, + numErrs: 1, + }, + { + name: "`None` ClusterIP cannot be removed", + tweakSvc: func(oldSvc, newSvc *api.Service) { + oldSvc.Spec.ClusterIP = "None" + newSvc.Spec.ClusterIP = "" + }, + numErrs: 1, + }, + { + name: "Service with ClusterIP type cannot change its set ClusterIP", + tweakSvc: func(oldSvc, newSvc *api.Service) { + oldSvc.Spec.Type = api.ServiceTypeClusterIP + newSvc.Spec.Type = api.ServiceTypeClusterIP + + oldSvc.Spec.ClusterIP = "1.2.3.4" + newSvc.Spec.ClusterIP = "1.2.3.5" + }, + numErrs: 1, + }, + { + name: "Service with ClusterIP type can change its empty ClusterIP", + tweakSvc: func(oldSvc, newSvc *api.Service) { + oldSvc.Spec.Type = api.ServiceTypeClusterIP + newSvc.Spec.Type = api.ServiceTypeClusterIP + + oldSvc.Spec.ClusterIP = "" + newSvc.Spec.ClusterIP = "1.2.3.5" + }, + numErrs: 0, + }, + { + name: "Service with ClusterIP type cannot change its set ClusterIP when changing type to NodePort", + tweakSvc: func(oldSvc, newSvc *api.Service) { + oldSvc.Spec.Type = api.ServiceTypeClusterIP + newSvc.Spec.Type = api.ServiceTypeNodePort + + oldSvc.Spec.ClusterIP = "1.2.3.4" + newSvc.Spec.ClusterIP = "1.2.3.5" + }, + numErrs: 1, + }, + { + name: "Service with ClusterIP type can change its empty ClusterIP when changing type to NodePort", + tweakSvc: func(oldSvc, newSvc *api.Service) { + oldSvc.Spec.Type = api.ServiceTypeClusterIP + newSvc.Spec.Type = api.ServiceTypeNodePort + + oldSvc.Spec.ClusterIP = "" + newSvc.Spec.ClusterIP = "1.2.3.5" + }, + numErrs: 0, + }, + { + name: "Service with ClusterIP type cannot change its ClusterIP when changing type to LoadBalancer", + tweakSvc: func(oldSvc, newSvc *api.Service) { + oldSvc.Spec.Type = api.ServiceTypeClusterIP + newSvc.Spec.Type = api.ServiceTypeLoadBalancer + + oldSvc.Spec.ClusterIP = "1.2.3.4" + newSvc.Spec.ClusterIP = "1.2.3.5" + }, + numErrs: 1, + }, + { + name: "Service with ClusterIP type can change its empty ClusterIP when changing type to LoadBalancer", + tweakSvc: func(oldSvc, newSvc *api.Service) { + oldSvc.Spec.Type = api.ServiceTypeClusterIP + newSvc.Spec.Type = api.ServiceTypeLoadBalancer + + oldSvc.Spec.ClusterIP = "" + newSvc.Spec.ClusterIP = "1.2.3.5" + }, + numErrs: 0, + }, + { + name: "Service with NodePort type cannot change its set ClusterIP", + tweakSvc: func(oldSvc, newSvc *api.Service) { + oldSvc.Spec.Type = api.ServiceTypeNodePort + newSvc.Spec.Type = api.ServiceTypeNodePort + + oldSvc.Spec.ClusterIP = "1.2.3.4" + newSvc.Spec.ClusterIP = "1.2.3.5" + }, + numErrs: 1, + }, + { + name: "Service with NodePort type can change its empty ClusterIP", + tweakSvc: func(oldSvc, newSvc *api.Service) { + oldSvc.Spec.Type = api.ServiceTypeNodePort + newSvc.Spec.Type = api.ServiceTypeNodePort + + oldSvc.Spec.ClusterIP = "" + newSvc.Spec.ClusterIP = "1.2.3.5" + }, + numErrs: 0, + }, + { + name: "Service with NodePort type cannot change its set ClusterIP when changing type to ClusterIP", + tweakSvc: func(oldSvc, newSvc *api.Service) { + oldSvc.Spec.Type = api.ServiceTypeNodePort + newSvc.Spec.Type = api.ServiceTypeClusterIP + + oldSvc.Spec.ClusterIP = "1.2.3.4" + newSvc.Spec.ClusterIP = "1.2.3.5" + }, + numErrs: 1, + }, + { + name: "Service with NodePort type can change its empty ClusterIP when changing type to ClusterIP", + tweakSvc: func(oldSvc, newSvc *api.Service) { + oldSvc.Spec.Type = api.ServiceTypeNodePort + newSvc.Spec.Type = api.ServiceTypeClusterIP + + oldSvc.Spec.ClusterIP = "" + newSvc.Spec.ClusterIP = "1.2.3.5" + }, + numErrs: 0, + }, + { + name: "Service with NodePort type cannot change its set ClusterIP when changing type to LoadBalancer", + tweakSvc: func(oldSvc, newSvc *api.Service) { + oldSvc.Spec.Type = api.ServiceTypeNodePort + newSvc.Spec.Type = api.ServiceTypeLoadBalancer + + oldSvc.Spec.ClusterIP = "1.2.3.4" + newSvc.Spec.ClusterIP = "1.2.3.5" + }, + numErrs: 1, + }, + { + name: "Service with NodePort type can change its empty ClusterIP when changing type to LoadBalancer", + tweakSvc: func(oldSvc, newSvc *api.Service) { + oldSvc.Spec.Type = api.ServiceTypeNodePort + newSvc.Spec.Type = api.ServiceTypeLoadBalancer + + oldSvc.Spec.ClusterIP = "" + newSvc.Spec.ClusterIP = "1.2.3.5" + }, + numErrs: 0, + }, + { + name: "Service with LoadBalancer type cannot change its set ClusterIP", + tweakSvc: func(oldSvc, newSvc *api.Service) { + oldSvc.Spec.Type = api.ServiceTypeLoadBalancer + newSvc.Spec.Type = api.ServiceTypeLoadBalancer + + oldSvc.Spec.ClusterIP = "1.2.3.4" + newSvc.Spec.ClusterIP = "1.2.3.5" + }, + numErrs: 1, + }, + { + name: "Service with LoadBalancer type can change its empty ClusterIP", + tweakSvc: func(oldSvc, newSvc *api.Service) { + oldSvc.Spec.Type = api.ServiceTypeLoadBalancer + newSvc.Spec.Type = api.ServiceTypeLoadBalancer + + oldSvc.Spec.ClusterIP = "" + newSvc.Spec.ClusterIP = "1.2.3.5" + }, + numErrs: 0, + }, + { + name: "Service with LoadBalancer type cannot change its set ClusterIP when changing type to ClusterIP", + tweakSvc: func(oldSvc, newSvc *api.Service) { + oldSvc.Spec.Type = api.ServiceTypeLoadBalancer + newSvc.Spec.Type = api.ServiceTypeClusterIP + + oldSvc.Spec.ClusterIP = "1.2.3.4" + newSvc.Spec.ClusterIP = "1.2.3.5" + }, + numErrs: 1, + }, + { + name: "Service with LoadBalancer type can change its empty ClusterIP when changing type to ClusterIP", + tweakSvc: func(oldSvc, newSvc *api.Service) { + oldSvc.Spec.Type = api.ServiceTypeLoadBalancer + newSvc.Spec.Type = api.ServiceTypeClusterIP + + oldSvc.Spec.ClusterIP = "" + newSvc.Spec.ClusterIP = "1.2.3.5" + }, + numErrs: 0, + }, + { + name: "Service with LoadBalancer type cannot change its set ClusterIP when changing type to NodePort", + tweakSvc: func(oldSvc, newSvc *api.Service) { + oldSvc.Spec.Type = api.ServiceTypeLoadBalancer + newSvc.Spec.Type = api.ServiceTypeNodePort + + oldSvc.Spec.ClusterIP = "1.2.3.4" + newSvc.Spec.ClusterIP = "1.2.3.5" + }, + numErrs: 1, + }, + { + name: "Service with LoadBalancer type can change its empty ClusterIP when changing type to NodePort", + tweakSvc: func(oldSvc, newSvc *api.Service) { + oldSvc.Spec.Type = api.ServiceTypeLoadBalancer + newSvc.Spec.Type = api.ServiceTypeNodePort + + oldSvc.Spec.ClusterIP = "" + newSvc.Spec.ClusterIP = "1.2.3.5" + }, + numErrs: 0, + }, + { + name: "Service with ExternalName type can change its empty ClusterIP when changing type to ClusterIP", + tweakSvc: func(oldSvc, newSvc *api.Service) { + oldSvc.Spec.Type = api.ServiceTypeExternalName + newSvc.Spec.Type = api.ServiceTypeClusterIP + + oldSvc.Spec.ClusterIP = "" + newSvc.Spec.ClusterIP = "1.2.3.5" + }, + numErrs: 0, + }, + { + name: "Service with ExternalName type can change its set ClusterIP when changing type to ClusterIP", + tweakSvc: func(oldSvc, newSvc *api.Service) { + oldSvc.Spec.Type = api.ServiceTypeExternalName + newSvc.Spec.Type = api.ServiceTypeClusterIP + + oldSvc.Spec.ClusterIP = "1.2.3.4" + newSvc.Spec.ClusterIP = "1.2.3.5" + }, + numErrs: 0, + }, + { + name: "invalid node port with clusterIP None", + tweakSvc: func(oldSvc, newSvc *api.Service) { + oldSvc.Spec.Type = api.ServiceTypeNodePort + newSvc.Spec.Type = api.ServiceTypeNodePort + + oldSvc.Spec.Ports = append(oldSvc.Spec.Ports, api.ServicePort{Name: "q", Port: 1, Protocol: "TCP", NodePort: 1, TargetPort: intstr.FromInt(1)}) + newSvc.Spec.Ports = append(newSvc.Spec.Ports, api.ServicePort{Name: "q", Port: 1, Protocol: "TCP", NodePort: 1, TargetPort: intstr.FromInt(1)}) + + oldSvc.Spec.ClusterIP = "" + newSvc.Spec.ClusterIP = "None" + }, + numErrs: 1, + }, + } + + for _, tc := range testCases { + oldSvc := makeValidService() + newSvc := makeValidService() + tc.tweakSvc(&oldSvc, &newSvc) + errs := ValidateServiceUpdate(&newSvc, &oldSvc) + if len(errs) != tc.numErrs { + t.Errorf("Unexpected error list for case %q: %v", tc.name, errs.ToAggregate()) + } + } +} + +func TestValidateResourceNames(t *testing.T) { + table := []struct { + input string + success bool + expect string + }{ + {"memory", true, ""}, + {"cpu", true, ""}, + {"storage", true, ""}, + {"requests.cpu", true, ""}, + {"requests.memory", true, ""}, + {"requests.storage", true, ""}, + {"limits.cpu", true, ""}, + {"limits.memory", true, ""}, + {"network", false, ""}, + {"disk", false, ""}, + {"", false, ""}, + {".", false, ""}, + {"..", false, ""}, + {"my.favorite.app.co/12345", true, ""}, + {"my.favorite.app.co/_12345", false, ""}, + {"my.favorite.app.co/12345_", false, ""}, + {"kubernetes.io/..", false, ""}, + {"kubernetes.io/" + strings.Repeat("a", 63), true, ""}, + {"kubernetes.io/" + strings.Repeat("a", 64), false, ""}, + {"kubernetes.io//", false, ""}, + {"kubernetes.io", false, ""}, + {"kubernetes.io/will/not/work/", false, ""}, + } + for k, item := range table { + err := validateResourceName(item.input, field.NewPath("field")) + if len(err) != 0 && item.success { + t.Errorf("expected no failure for input %q", item.input) + } else if len(err) == 0 && !item.success { + t.Errorf("expected failure for input %q", item.input) + for i := range err { + detail := err[i].Detail + if detail != "" && !strings.Contains(detail, item.expect) { + t.Errorf("%d: expected error detail either empty or %s, got %s", k, item.expect, detail) + } + } + } + } +} + +func getResourceList(cpu, memory string) api.ResourceList { + res := api.ResourceList{} + if cpu != "" { + res[api.ResourceCPU] = resource.MustParse(cpu) + } + if memory != "" { + res[api.ResourceMemory] = resource.MustParse(memory) + } + return res +} + +func getStorageResourceList(storage string) api.ResourceList { + res := api.ResourceList{} + if storage != "" { + res[api.ResourceStorage] = resource.MustParse(storage) + } + return res +} + +func getLocalStorageResourceList(ephemeralStorage string) api.ResourceList { + res := api.ResourceList{} + if ephemeralStorage != "" { + res[api.ResourceEphemeralStorage] = resource.MustParse(ephemeralStorage) + } + return res +} + +func TestValidateLimitRangeForLocalStorage(t *testing.T) { + testCases := []struct { + name string + spec api.LimitRangeSpec + }{ + { + name: "all-fields-valid", + spec: api.LimitRangeSpec{ + Limits: []api.LimitRangeItem{ + { + Type: api.LimitTypePod, + Max: getLocalStorageResourceList("10000Mi"), + Min: getLocalStorageResourceList("100Mi"), + MaxLimitRequestRatio: getLocalStorageResourceList(""), + }, + { + Type: api.LimitTypeContainer, + Max: getLocalStorageResourceList("10000Mi"), + Min: getLocalStorageResourceList("100Mi"), + Default: getLocalStorageResourceList("500Mi"), + DefaultRequest: getLocalStorageResourceList("200Mi"), + MaxLimitRequestRatio: getLocalStorageResourceList(""), + }, + }, + }, + }, + } + + // Enable alpha feature LocalStorageCapacityIsolation + err := utilfeature.DefaultFeatureGate.Set("LocalStorageCapacityIsolation=true") + if err != nil { + t.Errorf("Failed to enable feature gate for LocalStorageCapacityIsolation: %v", err) + return + } + + for _, testCase := range testCases { + limitRange := &api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: testCase.name, Namespace: "foo"}, Spec: testCase.spec} + if errs := ValidateLimitRange(limitRange); len(errs) != 0 { + t.Errorf("Case %v, unexpected error: %v", testCase.name, errs) + } + } + + // Disable alpha feature LocalStorageCapacityIsolation + err = utilfeature.DefaultFeatureGate.Set("LocalStorageCapacityIsolation=false") + if err != nil { + t.Errorf("Failed to disable feature gate for LocalStorageCapacityIsolation: %v", err) + return + } + for _, testCase := range testCases { + limitRange := &api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: testCase.name, Namespace: "foo"}, Spec: testCase.spec} + if errs := ValidateLimitRange(limitRange); len(errs) == 0 { + t.Errorf("Case %v, expected feature gate unable error but actually no error", testCase.name) + } + } + +} + +func TestValidateLimitRange(t *testing.T) { + successCases := []struct { + name string + spec api.LimitRangeSpec + }{ + { + name: "all-fields-valid", + spec: api.LimitRangeSpec{ + Limits: []api.LimitRangeItem{ + { + Type: api.LimitTypePod, + Max: getResourceList("100m", "10000Mi"), + Min: getResourceList("5m", "100Mi"), + MaxLimitRequestRatio: getResourceList("10", ""), + }, + { + Type: api.LimitTypeContainer, + Max: getResourceList("100m", "10000Mi"), + Min: getResourceList("5m", "100Mi"), + Default: getResourceList("50m", "500Mi"), + DefaultRequest: getResourceList("10m", "200Mi"), + MaxLimitRequestRatio: getResourceList("10", ""), + }, + { + Type: api.LimitTypePersistentVolumeClaim, + Max: getStorageResourceList("10Gi"), + Min: getStorageResourceList("5Gi"), + }, + }, + }, + }, + { + name: "pvc-min-only", + spec: api.LimitRangeSpec{ + Limits: []api.LimitRangeItem{ + { + Type: api.LimitTypePersistentVolumeClaim, + Min: getStorageResourceList("5Gi"), + }, + }, + }, + }, + { + name: "pvc-max-only", + spec: api.LimitRangeSpec{ + Limits: []api.LimitRangeItem{ + { + Type: api.LimitTypePersistentVolumeClaim, + Max: getStorageResourceList("10Gi"), + }, + }, + }, + }, + { + name: "all-fields-valid-big-numbers", + spec: api.LimitRangeSpec{ + Limits: []api.LimitRangeItem{ + { + Type: api.LimitTypeContainer, + Max: getResourceList("100m", "10000T"), + Min: getResourceList("5m", "100Mi"), + Default: getResourceList("50m", "500Mi"), + DefaultRequest: getResourceList("10m", "200Mi"), + MaxLimitRequestRatio: getResourceList("10", ""), + }, + }, + }, + }, + { + name: "thirdparty-fields-all-valid-standard-container-resources", + spec: api.LimitRangeSpec{ + Limits: []api.LimitRangeItem{ + { + Type: "thirdparty.com/foo", + Max: getResourceList("100m", "10000T"), + Min: getResourceList("5m", "100Mi"), + Default: getResourceList("50m", "500Mi"), + DefaultRequest: getResourceList("10m", "200Mi"), + MaxLimitRequestRatio: getResourceList("10", ""), + }, + }, + }, + }, + { + name: "thirdparty-fields-all-valid-storage-resources", + spec: api.LimitRangeSpec{ + Limits: []api.LimitRangeItem{ + { + Type: "thirdparty.com/foo", + Max: getStorageResourceList("10000T"), + Min: getStorageResourceList("100Mi"), + Default: getStorageResourceList("500Mi"), + DefaultRequest: getStorageResourceList("200Mi"), + MaxLimitRequestRatio: getStorageResourceList(""), + }, + }, + }, + }, + } + + for _, successCase := range successCases { + limitRange := &api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: successCase.name, Namespace: "foo"}, Spec: successCase.spec} + if errs := ValidateLimitRange(limitRange); len(errs) != 0 { + t.Errorf("Case %v, unexpected error: %v", successCase.name, errs) + } + } + + errorCases := map[string]struct { + R api.LimitRange + D string + }{ + "zero-length-name": { + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: "foo"}, Spec: api.LimitRangeSpec{}}, + "name or generateName is required", + }, + "zero-length-namespace": { + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: ""}, Spec: api.LimitRangeSpec{}}, + "", + }, + "invalid-name": { + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "^Invalid", Namespace: "foo"}, Spec: api.LimitRangeSpec{}}, + dnsSubdomainLabelErrMsg, + }, + "invalid-namespace": { + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "^Invalid"}, Spec: api.LimitRangeSpec{}}, + dnsLabelErrMsg, + }, + "duplicate-limit-type": { + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + Limits: []api.LimitRangeItem{ + { + Type: api.LimitTypePod, + Max: getResourceList("100m", "10000m"), + Min: getResourceList("0m", "100m"), + }, + { + Type: api.LimitTypePod, + Min: getResourceList("0m", "100m"), + }, + }, + }}, + "", + }, + "default-limit-type-pod": { + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + Limits: []api.LimitRangeItem{ + { + Type: api.LimitTypePod, + Max: getResourceList("100m", "10000m"), + Min: getResourceList("0m", "100m"), + Default: getResourceList("10m", "100m"), + }, + }, + }}, + "may not be specified when `type` is 'Pod'", + }, + "default-request-limit-type-pod": { + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + Limits: []api.LimitRangeItem{ + { + Type: api.LimitTypePod, + Max: getResourceList("100m", "10000m"), + Min: getResourceList("0m", "100m"), + DefaultRequest: getResourceList("10m", "100m"), + }, + }, + }}, + "may not be specified when `type` is 'Pod'", + }, + "min value 100m is greater than max value 10m": { + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + Limits: []api.LimitRangeItem{ + { + Type: api.LimitTypePod, + Max: getResourceList("10m", ""), + Min: getResourceList("100m", ""), + }, + }, + }}, + "min value 100m is greater than max value 10m", + }, + "invalid spec default outside range": { + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + Limits: []api.LimitRangeItem{ + { + Type: api.LimitTypeContainer, + Max: getResourceList("1", ""), + Min: getResourceList("100m", ""), + Default: getResourceList("2000m", ""), + }, + }, + }}, + "default value 2 is greater than max value 1", + }, + "invalid spec default request outside range": { + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + Limits: []api.LimitRangeItem{ + { + Type: api.LimitTypeContainer, + Max: getResourceList("1", ""), + Min: getResourceList("100m", ""), + DefaultRequest: getResourceList("2000m", ""), + }, + }, + }}, + "default request value 2 is greater than max value 1", + }, + "invalid spec default request more than default": { + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + Limits: []api.LimitRangeItem{ + { + Type: api.LimitTypeContainer, + Max: getResourceList("2", ""), + Min: getResourceList("100m", ""), + Default: getResourceList("500m", ""), + DefaultRequest: getResourceList("800m", ""), + }, + }, + }}, + "default request value 800m is greater than default limit value 500m", + }, + "invalid spec maxLimitRequestRatio less than 1": { + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + Limits: []api.LimitRangeItem{ + { + Type: api.LimitTypePod, + MaxLimitRequestRatio: getResourceList("800m", ""), + }, + }, + }}, + "ratio 800m is less than 1", + }, + "invalid spec maxLimitRequestRatio greater than max/min": { + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + Limits: []api.LimitRangeItem{ + { + Type: api.LimitTypeContainer, + Max: getResourceList("", "2Gi"), + Min: getResourceList("", "512Mi"), + MaxLimitRequestRatio: getResourceList("", "10"), + }, + }, + }}, + "ratio 10 is greater than max/min = 4.000000", + }, + "invalid non standard limit type": { + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + Limits: []api.LimitRangeItem{ + { + Type: "foo", + Max: getStorageResourceList("10000T"), + Min: getStorageResourceList("100Mi"), + Default: getStorageResourceList("500Mi"), + DefaultRequest: getStorageResourceList("200Mi"), + MaxLimitRequestRatio: getStorageResourceList(""), + }, + }, + }}, + "must be a standard limit type or fully qualified", + }, + "min and max values missing, one required": { + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + Limits: []api.LimitRangeItem{ + { + Type: api.LimitTypePersistentVolumeClaim, + }, + }, + }}, + "either minimum or maximum storage value is required, but neither was provided", + }, + "invalid min greater than max": { + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + Limits: []api.LimitRangeItem{ + { + Type: api.LimitTypePersistentVolumeClaim, + Min: getStorageResourceList("10Gi"), + Max: getStorageResourceList("1Gi"), + }, + }, + }}, + "min value 10Gi is greater than max value 1Gi", + }, + } + + for k, v := range errorCases { + errs := ValidateLimitRange(&v.R) + if len(errs) == 0 { + t.Errorf("expected failure for %s", k) + } + for i := range errs { + detail := errs[i].Detail + if !strings.Contains(detail, v.D) { + t.Errorf("[%s]: expected error detail either empty or %q, got %q", k, v.D, detail) + } + } + } + +} + +func TestValidatePersistentVolumeClaimStatusUpdate(t *testing.T) { + validClaim := testVolumeClaim("foo", "ns", api.PersistentVolumeClaimSpec{ + AccessModes: []api.PersistentVolumeAccessMode{ + api.ReadWriteOnce, + api.ReadOnlyMany, + }, + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + }, + }) + validConditionUpdate := testVolumeClaimWithStatus("foo", "ns", api.PersistentVolumeClaimSpec{ + AccessModes: []api.PersistentVolumeAccessMode{ + api.ReadWriteOnce, + api.ReadOnlyMany, + }, + Resources: api.ResourceRequirements{ + Requests: api.ResourceList{ + api.ResourceName(api.ResourceStorage): resource.MustParse("10G"), + }, + }, + }, api.PersistentVolumeClaimStatus{ + Phase: api.ClaimPending, + Conditions: []api.PersistentVolumeClaimCondition{ + {Type: api.PersistentVolumeClaimResizing, Status: api.ConditionTrue}, + }, + }) + scenarios := map[string]struct { + isExpectedFailure bool + oldClaim *api.PersistentVolumeClaim + newClaim *api.PersistentVolumeClaim + enableResize bool + }{ + "condition-update-with-disabled-feature-gate": { + isExpectedFailure: true, + oldClaim: validClaim, + newClaim: validConditionUpdate, + enableResize: false, + }, + "condition-update-with-enabled-feature-gate": { + isExpectedFailure: false, + oldClaim: validClaim, + newClaim: validConditionUpdate, + enableResize: true, + }, + } + for name, scenario := range scenarios { + // ensure we have a resource version specified for updates + togglePVExpandFeature(scenario.enableResize, t) + scenario.oldClaim.ResourceVersion = "1" + scenario.newClaim.ResourceVersion = "1" + errs := ValidatePersistentVolumeClaimStatusUpdate(scenario.newClaim, scenario.oldClaim) + if len(errs) == 0 && scenario.isExpectedFailure { + t.Errorf("Unexpected success for scenario: %s", name) + } + if len(errs) > 0 && !scenario.isExpectedFailure { + t.Errorf("Unexpected failure for scenario: %s - %+v", name, errs) + } + } +} + +func TestValidateResourceQuota(t *testing.T) { + spec := api.ResourceQuotaSpec{ + Hard: api.ResourceList{ + api.ResourceCPU: resource.MustParse("100"), + api.ResourceMemory: resource.MustParse("10000"), + api.ResourceRequestsCPU: resource.MustParse("100"), + api.ResourceRequestsMemory: resource.MustParse("10000"), + api.ResourceLimitsCPU: resource.MustParse("100"), + api.ResourceLimitsMemory: resource.MustParse("10000"), + api.ResourcePods: resource.MustParse("10"), + api.ResourceServices: resource.MustParse("0"), + api.ResourceReplicationControllers: resource.MustParse("10"), + api.ResourceQuotas: resource.MustParse("10"), + api.ResourceConfigMaps: resource.MustParse("10"), + api.ResourceSecrets: resource.MustParse("10"), + }, + } + + terminatingSpec := api.ResourceQuotaSpec{ + Hard: api.ResourceList{ + api.ResourceCPU: resource.MustParse("100"), + api.ResourceLimitsCPU: resource.MustParse("200"), + }, + Scopes: []api.ResourceQuotaScope{api.ResourceQuotaScopeTerminating}, + } + + nonTerminatingSpec := api.ResourceQuotaSpec{ + Hard: api.ResourceList{ + api.ResourceCPU: resource.MustParse("100"), + }, + Scopes: []api.ResourceQuotaScope{api.ResourceQuotaScopeNotTerminating}, + } + + bestEffortSpec := api.ResourceQuotaSpec{ + Hard: api.ResourceList{ + api.ResourcePods: resource.MustParse("100"), + }, + Scopes: []api.ResourceQuotaScope{api.ResourceQuotaScopeBestEffort}, + } + + nonBestEffortSpec := api.ResourceQuotaSpec{ + Hard: api.ResourceList{ + api.ResourceCPU: resource.MustParse("100"), + }, + Scopes: []api.ResourceQuotaScope{api.ResourceQuotaScopeNotBestEffort}, + } + + // storage is not yet supported as a quota tracked resource + invalidQuotaResourceSpec := api.ResourceQuotaSpec{ + Hard: api.ResourceList{ + api.ResourceStorage: resource.MustParse("10"), + }, + } + + negativeSpec := api.ResourceQuotaSpec{ + Hard: api.ResourceList{ + api.ResourceCPU: resource.MustParse("-100"), + api.ResourceMemory: resource.MustParse("-10000"), + api.ResourcePods: resource.MustParse("-10"), + api.ResourceServices: resource.MustParse("-10"), + api.ResourceReplicationControllers: resource.MustParse("-10"), + api.ResourceQuotas: resource.MustParse("-10"), + api.ResourceConfigMaps: resource.MustParse("-10"), + api.ResourceSecrets: resource.MustParse("-10"), + }, + } + + fractionalComputeSpec := api.ResourceQuotaSpec{ + Hard: api.ResourceList{ + api.ResourceCPU: resource.MustParse("100m"), + }, + } + + fractionalPodSpec := api.ResourceQuotaSpec{ + Hard: api.ResourceList{ + api.ResourcePods: resource.MustParse(".1"), + api.ResourceServices: resource.MustParse(".5"), + api.ResourceReplicationControllers: resource.MustParse("1.25"), + api.ResourceQuotas: resource.MustParse("2.5"), + }, + } + + invalidTerminatingScopePairsSpec := api.ResourceQuotaSpec{ + Hard: api.ResourceList{ + api.ResourceCPU: resource.MustParse("100"), + }, + Scopes: []api.ResourceQuotaScope{api.ResourceQuotaScopeTerminating, api.ResourceQuotaScopeNotTerminating}, + } + + invalidBestEffortScopePairsSpec := api.ResourceQuotaSpec{ + Hard: api.ResourceList{ + api.ResourcePods: resource.MustParse("100"), + }, + Scopes: []api.ResourceQuotaScope{api.ResourceQuotaScopeBestEffort, api.ResourceQuotaScopeNotBestEffort}, + } + + invalidScopeNameSpec := api.ResourceQuotaSpec{ + Hard: api.ResourceList{ + api.ResourceCPU: resource.MustParse("100"), + }, + Scopes: []api.ResourceQuotaScope{api.ResourceQuotaScope("foo")}, + } + + successCases := []api.ResourceQuota{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: "abc", + Namespace: "foo", + }, + Spec: spec, + }, + { + ObjectMeta: metav1.ObjectMeta{ + Name: "abc", + Namespace: "foo", + }, + Spec: fractionalComputeSpec, + }, + { + ObjectMeta: metav1.ObjectMeta{ + Name: "abc", + Namespace: "foo", + }, + Spec: terminatingSpec, + }, + { + ObjectMeta: metav1.ObjectMeta{ + Name: "abc", + Namespace: "foo", + }, + Spec: nonTerminatingSpec, + }, + { + ObjectMeta: metav1.ObjectMeta{ + Name: "abc", + Namespace: "foo", + }, + Spec: bestEffortSpec, + }, + { + ObjectMeta: metav1.ObjectMeta{ + Name: "abc", + Namespace: "foo", + }, + Spec: nonBestEffortSpec, + }, + } + + for _, successCase := range successCases { + if errs := ValidateResourceQuota(&successCase); len(errs) != 0 { + t.Errorf("expected success: %v", errs) + } + } + + errorCases := map[string]struct { + R api.ResourceQuota + D string + }{ + "zero-length Name": { + api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: "foo"}, Spec: spec}, + "name or generateName is required", + }, + "zero-length Namespace": { + api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: ""}, Spec: spec}, + "", + }, + "invalid Name": { + api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Name: "^Invalid", Namespace: "foo"}, Spec: spec}, + dnsSubdomainLabelErrMsg, + }, + "invalid Namespace": { + api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "^Invalid"}, Spec: spec}, + dnsLabelErrMsg, + }, + "negative-limits": { + api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: negativeSpec}, + isNegativeErrorMsg, + }, + "fractional-api-resource": { + api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: fractionalPodSpec}, + isNotIntegerErrorMsg, + }, + "invalid-quota-resource": { + api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: invalidQuotaResourceSpec}, + isInvalidQuotaResource, + }, + "invalid-quota-terminating-pair": { + api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: invalidTerminatingScopePairsSpec}, + "conflicting scopes", + }, + "invalid-quota-besteffort-pair": { + api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: invalidBestEffortScopePairsSpec}, + "conflicting scopes", + }, + "invalid-quota-scope-name": { + api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: invalidScopeNameSpec}, + "unsupported scope", + }, + } + for k, v := range errorCases { + errs := ValidateResourceQuota(&v.R) + if len(errs) == 0 { + t.Errorf("expected failure for %s", k) + } + for i := range errs { + if !strings.Contains(errs[i].Detail, v.D) { + t.Errorf("[%s]: expected error detail either empty or %s, got %s", k, v.D, errs[i].Detail) + } + } + } +} + +func TestValidateNamespace(t *testing.T) { + validLabels := map[string]string{"a": "b"} + invalidLabels := map[string]string{"NoUppercaseOrSpecialCharsLike=Equals": "b"} + successCases := []api.Namespace{ + { + ObjectMeta: metav1.ObjectMeta{Name: "abc", Labels: validLabels}, + }, + { + ObjectMeta: metav1.ObjectMeta{Name: "abc-123"}, + Spec: api.NamespaceSpec{ + Finalizers: []api.FinalizerName{"example.com/something", "example.com/other"}, + }, + }, + } + for _, successCase := range successCases { + if errs := ValidateNamespace(&successCase); len(errs) != 0 { + t.Errorf("expected success: %v", errs) + } + } + errorCases := map[string]struct { + R api.Namespace + D string + }{ + "zero-length name": { + api.Namespace{ObjectMeta: metav1.ObjectMeta{Name: ""}}, + "", + }, + "defined-namespace": { + api.Namespace{ObjectMeta: metav1.ObjectMeta{Name: "abc-123", Namespace: "makesnosense"}}, + "", + }, + "invalid-labels": { + api.Namespace{ObjectMeta: metav1.ObjectMeta{Name: "abc", Labels: invalidLabels}}, + "", + }, + } + for k, v := range errorCases { + errs := ValidateNamespace(&v.R) + if len(errs) == 0 { + t.Errorf("expected failure for %s", k) + } + } +} + +func TestValidateNamespaceFinalizeUpdate(t *testing.T) { + tests := []struct { + oldNamespace api.Namespace + namespace api.Namespace + valid bool + }{ + {api.Namespace{}, api.Namespace{}, true}, + {api.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo"}}, + api.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo"}, + Spec: api.NamespaceSpec{ + Finalizers: []api.FinalizerName{"Foo"}, + }, + }, false}, + {api.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo"}, + Spec: api.NamespaceSpec{ + Finalizers: []api.FinalizerName{"foo.com/bar"}, + }, + }, + api.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo"}, + Spec: api.NamespaceSpec{ + Finalizers: []api.FinalizerName{"foo.com/bar", "what.com/bar"}, + }, + }, true}, + {api.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "fooemptyfinalizer"}, + Spec: api.NamespaceSpec{ + Finalizers: []api.FinalizerName{"foo.com/bar"}, + }, + }, + api.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "fooemptyfinalizer"}, + Spec: api.NamespaceSpec{ + Finalizers: []api.FinalizerName{"", "foo.com/bar", "what.com/bar"}, + }, + }, false}, + } + for i, test := range tests { + test.namespace.ObjectMeta.ResourceVersion = "1" + test.oldNamespace.ObjectMeta.ResourceVersion = "1" + errs := ValidateNamespaceFinalizeUpdate(&test.namespace, &test.oldNamespace) + if test.valid && len(errs) > 0 { + t.Errorf("%d: Unexpected error: %v", i, errs) + t.Logf("%#v vs %#v", test.oldNamespace, test.namespace) + } + if !test.valid && len(errs) == 0 { + t.Errorf("%d: Unexpected non-error", i) + } + } +} + +func TestValidateNamespaceStatusUpdate(t *testing.T) { + now := metav1.Now() + + tests := []struct { + oldNamespace api.Namespace + namespace api.Namespace + valid bool + }{ + {api.Namespace{}, api.Namespace{ + Status: api.NamespaceStatus{ + Phase: api.NamespaceActive, + }, + }, true}, + // Cannot set deletionTimestamp via status update + {api.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo"}}, + api.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + DeletionTimestamp: &now}, + Status: api.NamespaceStatus{ + Phase: api.NamespaceTerminating, + }, + }, false}, + // Can update phase via status update + {api.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + DeletionTimestamp: &now}}, + api.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + DeletionTimestamp: &now}, + Status: api.NamespaceStatus{ + Phase: api.NamespaceTerminating, + }, + }, true}, + {api.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo"}}, + api.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo"}, + Status: api.NamespaceStatus{ + Phase: api.NamespaceTerminating, + }, + }, false}, + {api.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo"}}, + api.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "bar"}, + Status: api.NamespaceStatus{ + Phase: api.NamespaceTerminating, + }, + }, false}, + } + for i, test := range tests { + test.namespace.ObjectMeta.ResourceVersion = "1" + test.oldNamespace.ObjectMeta.ResourceVersion = "1" + errs := ValidateNamespaceStatusUpdate(&test.namespace, &test.oldNamespace) + if test.valid && len(errs) > 0 { + t.Errorf("%d: Unexpected error: %v", i, errs) + t.Logf("%#v vs %#v", test.oldNamespace.ObjectMeta, test.namespace.ObjectMeta) + } + if !test.valid && len(errs) == 0 { + t.Errorf("%d: Unexpected non-error", i) + } + } +} + +func TestValidateNamespaceUpdate(t *testing.T) { + tests := []struct { + oldNamespace api.Namespace + namespace api.Namespace + valid bool + }{ + {api.Namespace{}, api.Namespace{}, true}, + {api.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo1"}}, + api.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "bar1"}, + }, false}, + {api.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo2", + Labels: map[string]string{"foo": "bar"}, + }, + }, api.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo2", + Labels: map[string]string{"foo": "baz"}, + }, + }, true}, + {api.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo3", + }, + }, api.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo3", + Labels: map[string]string{"foo": "baz"}, + }, + }, true}, + {api.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo4", + Labels: map[string]string{"bar": "foo"}, + }, + }, api.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo4", + Labels: map[string]string{"foo": "baz"}, + }, + }, true}, + {api.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo5", + Labels: map[string]string{"foo": "baz"}, + }, + }, api.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo5", + Labels: map[string]string{"Foo": "baz"}, + }, + }, true}, + {api.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo6", + Labels: map[string]string{"foo": "baz"}, + }, + }, api.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo6", + Labels: map[string]string{"Foo": "baz"}, + }, + Spec: api.NamespaceSpec{ + Finalizers: []api.FinalizerName{"kubernetes"}, + }, + Status: api.NamespaceStatus{ + Phase: api.NamespaceTerminating, + }, + }, true}, + } + for i, test := range tests { + test.namespace.ObjectMeta.ResourceVersion = "1" + test.oldNamespace.ObjectMeta.ResourceVersion = "1" + errs := ValidateNamespaceUpdate(&test.namespace, &test.oldNamespace) + if test.valid && len(errs) > 0 { + t.Errorf("%d: Unexpected error: %v", i, errs) + t.Logf("%#v vs %#v", test.oldNamespace.ObjectMeta, test.namespace.ObjectMeta) + } + if !test.valid && len(errs) == 0 { + t.Errorf("%d: Unexpected non-error", i) + } + } +} + +func TestValidateSecret(t *testing.T) { + // Opaque secret validation + validSecret := func() api.Secret { + return api.Secret{ + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, + Data: map[string][]byte{ + "data-1": []byte("bar"), + }, + } + } + + var ( + emptyName = validSecret() + invalidName = validSecret() + emptyNs = validSecret() + invalidNs = validSecret() + overMaxSize = validSecret() + invalidKey = validSecret() + leadingDotKey = validSecret() + dotKey = validSecret() + doubleDotKey = validSecret() + ) + + emptyName.Name = "" + invalidName.Name = "NoUppercaseOrSpecialCharsLike=Equals" + emptyNs.Namespace = "" + invalidNs.Namespace = "NoUppercaseOrSpecialCharsLike=Equals" + overMaxSize.Data = map[string][]byte{ + "over": make([]byte, api.MaxSecretSize+1), + } + invalidKey.Data["a*b"] = []byte("whoops") + leadingDotKey.Data[".key"] = []byte("bar") + dotKey.Data["."] = []byte("bar") + doubleDotKey.Data[".."] = []byte("bar") + + // kubernetes.io/service-account-token secret validation + validServiceAccountTokenSecret := func() api.Secret { + return api.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Namespace: "bar", + Annotations: map[string]string{ + api.ServiceAccountNameKey: "foo", + }, + }, + Type: api.SecretTypeServiceAccountToken, + Data: map[string][]byte{ + "data-1": []byte("bar"), + }, + } + } + + var ( + emptyTokenAnnotation = validServiceAccountTokenSecret() + missingTokenAnnotation = validServiceAccountTokenSecret() + missingTokenAnnotations = validServiceAccountTokenSecret() + ) + emptyTokenAnnotation.Annotations[api.ServiceAccountNameKey] = "" + delete(missingTokenAnnotation.Annotations, api.ServiceAccountNameKey) + missingTokenAnnotations.Annotations = nil + + tests := map[string]struct { + secret api.Secret + valid bool + }{ + "valid": {validSecret(), true}, + "empty name": {emptyName, false}, + "invalid name": {invalidName, false}, + "empty namespace": {emptyNs, false}, + "invalid namespace": {invalidNs, false}, + "over max size": {overMaxSize, false}, + "invalid key": {invalidKey, false}, + "valid service-account-token secret": {validServiceAccountTokenSecret(), true}, + "empty service-account-token annotation": {emptyTokenAnnotation, false}, + "missing service-account-token annotation": {missingTokenAnnotation, false}, + "missing service-account-token annotations": {missingTokenAnnotations, false}, + "leading dot key": {leadingDotKey, true}, + "dot key": {dotKey, false}, + "double dot key": {doubleDotKey, false}, + } + + for name, tc := range tests { + errs := ValidateSecret(&tc.secret) + if tc.valid && len(errs) > 0 { + t.Errorf("%v: Unexpected error: %v", name, errs) + } + if !tc.valid && len(errs) == 0 { + t.Errorf("%v: Unexpected non-error", name) + } + } +} + +func TestValidateDockerConfigSecret(t *testing.T) { + validDockerSecret := func() api.Secret { + return api.Secret{ + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, + Type: api.SecretTypeDockercfg, + Data: map[string][]byte{ + api.DockerConfigKey: []byte(`{"https://index.docker.io/v1/": {"auth": "Y2x1ZWRyb29sZXIwMDAxOnBhc3N3b3Jk","email": "fake@example.com"}}`), + }, + } + } + validDockerSecret2 := func() api.Secret { + return api.Secret{ + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, + Type: api.SecretTypeDockerConfigJson, + Data: map[string][]byte{ + api.DockerConfigJsonKey: []byte(`{"auths":{"https://index.docker.io/v1/": {"auth": "Y2x1ZWRyb29sZXIwMDAxOnBhc3N3b3Jk","email": "fake@example.com"}}}`), + }, + } + } + + var ( + missingDockerConfigKey = validDockerSecret() + emptyDockerConfigKey = validDockerSecret() + invalidDockerConfigKey = validDockerSecret() + missingDockerConfigKey2 = validDockerSecret2() + emptyDockerConfigKey2 = validDockerSecret2() + invalidDockerConfigKey2 = validDockerSecret2() + ) + + delete(missingDockerConfigKey.Data, api.DockerConfigKey) + emptyDockerConfigKey.Data[api.DockerConfigKey] = []byte("") + invalidDockerConfigKey.Data[api.DockerConfigKey] = []byte("bad") + delete(missingDockerConfigKey2.Data, api.DockerConfigJsonKey) + emptyDockerConfigKey2.Data[api.DockerConfigJsonKey] = []byte("") + invalidDockerConfigKey2.Data[api.DockerConfigJsonKey] = []byte("bad") + + tests := map[string]struct { + secret api.Secret + valid bool + }{ + "valid dockercfg": {validDockerSecret(), true}, + "missing dockercfg": {missingDockerConfigKey, false}, + "empty dockercfg": {emptyDockerConfigKey, false}, + "invalid dockercfg": {invalidDockerConfigKey, false}, + "valid config.json": {validDockerSecret2(), true}, + "missing config.json": {missingDockerConfigKey2, false}, + "empty config.json": {emptyDockerConfigKey2, false}, + "invalid config.json": {invalidDockerConfigKey2, false}, + } + + for name, tc := range tests { + errs := ValidateSecret(&tc.secret) + if tc.valid && len(errs) > 0 { + t.Errorf("%v: Unexpected error: %v", name, errs) + } + if !tc.valid && len(errs) == 0 { + t.Errorf("%v: Unexpected non-error", name) + } + } +} + +func TestValidateBasicAuthSecret(t *testing.T) { + validBasicAuthSecret := func() api.Secret { + return api.Secret{ + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, + Type: api.SecretTypeBasicAuth, + Data: map[string][]byte{ + api.BasicAuthUsernameKey: []byte("username"), + api.BasicAuthPasswordKey: []byte("password"), + }, + } + } + + var ( + missingBasicAuthUsernamePasswordKeys = validBasicAuthSecret() + ) + + delete(missingBasicAuthUsernamePasswordKeys.Data, api.BasicAuthUsernameKey) + delete(missingBasicAuthUsernamePasswordKeys.Data, api.BasicAuthPasswordKey) + + tests := map[string]struct { + secret api.Secret + valid bool + }{ + "valid": {validBasicAuthSecret(), true}, + "missing username and password": {missingBasicAuthUsernamePasswordKeys, false}, + } + + for name, tc := range tests { + errs := ValidateSecret(&tc.secret) + if tc.valid && len(errs) > 0 { + t.Errorf("%v: Unexpected error: %v", name, errs) + } + if !tc.valid && len(errs) == 0 { + t.Errorf("%v: Unexpected non-error", name) + } + } +} + +func TestValidateSSHAuthSecret(t *testing.T) { + validSSHAuthSecret := func() api.Secret { + return api.Secret{ + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, + Type: api.SecretTypeSSHAuth, + Data: map[string][]byte{ + api.SSHAuthPrivateKey: []byte("foo-bar-baz"), + }, + } + } + + missingSSHAuthPrivateKey := validSSHAuthSecret() + + delete(missingSSHAuthPrivateKey.Data, api.SSHAuthPrivateKey) + + tests := map[string]struct { + secret api.Secret + valid bool + }{ + "valid": {validSSHAuthSecret(), true}, + "missing private key": {missingSSHAuthPrivateKey, false}, + } + + for name, tc := range tests { + errs := ValidateSecret(&tc.secret) + if tc.valid && len(errs) > 0 { + t.Errorf("%v: Unexpected error: %v", name, errs) + } + if !tc.valid && len(errs) == 0 { + t.Errorf("%v: Unexpected non-error", name) + } + } +} + +func TestValidateEndpoints(t *testing.T) { + successCases := map[string]api.Endpoints{ + "simple endpoint": { + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + Subsets: []api.EndpointSubset{ + { + Addresses: []api.EndpointAddress{{IP: "10.10.1.1"}, {IP: "10.10.2.2"}}, + Ports: []api.EndpointPort{{Name: "a", Port: 8675, Protocol: "TCP"}, {Name: "b", Port: 309, Protocol: "TCP"}}, + }, + { + Addresses: []api.EndpointAddress{{IP: "10.10.3.3"}}, + Ports: []api.EndpointPort{{Name: "a", Port: 93, Protocol: "TCP"}, {Name: "b", Port: 76, Protocol: "TCP"}}, + }, + }, + }, + "empty subsets": { + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + }, + "no name required for singleton port": { + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + Subsets: []api.EndpointSubset{ + { + Addresses: []api.EndpointAddress{{IP: "10.10.1.1"}}, + Ports: []api.EndpointPort{{Port: 8675, Protocol: "TCP"}}, + }, + }, + }, + "empty ports": { + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + Subsets: []api.EndpointSubset{ + { + Addresses: []api.EndpointAddress{{IP: "10.10.3.3"}}, + }, + }, + }, + } + + for k, v := range successCases { + if errs := ValidateEndpoints(&v); len(errs) != 0 { + t.Errorf("Expected success for %s, got %v", k, errs) + } + } + + errorCases := map[string]struct { + endpoints api.Endpoints + errorType field.ErrorType + errorDetail string + }{ + "missing namespace": { + endpoints: api.Endpoints{ObjectMeta: metav1.ObjectMeta{Name: "mysvc"}}, + errorType: "FieldValueRequired", + }, + "missing name": { + endpoints: api.Endpoints{ObjectMeta: metav1.ObjectMeta{Namespace: "namespace"}}, + errorType: "FieldValueRequired", + }, + "invalid namespace": { + endpoints: api.Endpoints{ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "no@#invalid.;chars\"allowed"}}, + errorType: "FieldValueInvalid", + errorDetail: dnsLabelErrMsg, + }, + "invalid name": { + endpoints: api.Endpoints{ObjectMeta: metav1.ObjectMeta{Name: "-_Invliad^&Characters", Namespace: "namespace"}}, + errorType: "FieldValueInvalid", + errorDetail: dnsSubdomainLabelErrMsg, + }, + "empty addresses": { + endpoints: api.Endpoints{ + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + Subsets: []api.EndpointSubset{ + { + Ports: []api.EndpointPort{{Name: "a", Port: 93, Protocol: "TCP"}}, + }, + }, + }, + errorType: "FieldValueRequired", + }, + "invalid IP": { + endpoints: api.Endpoints{ + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + Subsets: []api.EndpointSubset{ + { + Addresses: []api.EndpointAddress{{IP: "[2001:0db8:85a3:0042:1000:8a2e:0370:7334]"}}, + Ports: []api.EndpointPort{{Name: "a", Port: 93, Protocol: "TCP"}}, + }, + }, + }, + errorType: "FieldValueInvalid", + errorDetail: "must be a valid IP address", + }, + "Multiple ports, one without name": { + endpoints: api.Endpoints{ + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + Subsets: []api.EndpointSubset{ + { + Addresses: []api.EndpointAddress{{IP: "10.10.1.1"}}, + Ports: []api.EndpointPort{{Port: 8675, Protocol: "TCP"}, {Name: "b", Port: 309, Protocol: "TCP"}}, + }, + }, + }, + errorType: "FieldValueRequired", + }, + "Invalid port number": { + endpoints: api.Endpoints{ + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + Subsets: []api.EndpointSubset{ + { + Addresses: []api.EndpointAddress{{IP: "10.10.1.1"}}, + Ports: []api.EndpointPort{{Name: "a", Port: 66000, Protocol: "TCP"}}, + }, + }, + }, + errorType: "FieldValueInvalid", + errorDetail: "between", + }, + "Invalid protocol": { + endpoints: api.Endpoints{ + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + Subsets: []api.EndpointSubset{ + { + Addresses: []api.EndpointAddress{{IP: "10.10.1.1"}}, + Ports: []api.EndpointPort{{Name: "a", Port: 93, Protocol: "Protocol"}}, + }, + }, + }, + errorType: "FieldValueNotSupported", + }, + "Address missing IP": { + endpoints: api.Endpoints{ + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + Subsets: []api.EndpointSubset{ + { + Addresses: []api.EndpointAddress{{}}, + Ports: []api.EndpointPort{{Name: "a", Port: 93, Protocol: "TCP"}}, + }, + }, + }, + errorType: "FieldValueInvalid", + errorDetail: "must be a valid IP address", + }, + "Port missing number": { + endpoints: api.Endpoints{ + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + Subsets: []api.EndpointSubset{ + { + Addresses: []api.EndpointAddress{{IP: "10.10.1.1"}}, + Ports: []api.EndpointPort{{Name: "a", Protocol: "TCP"}}, + }, + }, + }, + errorType: "FieldValueInvalid", + errorDetail: "between", + }, + "Port missing protocol": { + endpoints: api.Endpoints{ + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + Subsets: []api.EndpointSubset{ + { + Addresses: []api.EndpointAddress{{IP: "10.10.1.1"}}, + Ports: []api.EndpointPort{{Name: "a", Port: 93}}, + }, + }, + }, + errorType: "FieldValueRequired", + }, + "Address is loopback": { + endpoints: api.Endpoints{ + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + Subsets: []api.EndpointSubset{ + { + Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, + Ports: []api.EndpointPort{{Name: "p", Port: 93, Protocol: "TCP"}}, + }, + }, + }, + errorType: "FieldValueInvalid", + errorDetail: "loopback", + }, + "Address is link-local": { + endpoints: api.Endpoints{ + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + Subsets: []api.EndpointSubset{ + { + Addresses: []api.EndpointAddress{{IP: "169.254.169.254"}}, + Ports: []api.EndpointPort{{Name: "p", Port: 93, Protocol: "TCP"}}, + }, + }, + }, + errorType: "FieldValueInvalid", + errorDetail: "link-local", + }, + "Address is link-local multicast": { + endpoints: api.Endpoints{ + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + Subsets: []api.EndpointSubset{ + { + Addresses: []api.EndpointAddress{{IP: "224.0.0.1"}}, + Ports: []api.EndpointPort{{Name: "p", Port: 93, Protocol: "TCP"}}, + }, + }, + }, + errorType: "FieldValueInvalid", + errorDetail: "link-local multicast", + }, + } + + for k, v := range errorCases { + if errs := ValidateEndpoints(&v.endpoints); len(errs) == 0 || errs[0].Type != v.errorType || !strings.Contains(errs[0].Detail, v.errorDetail) { + t.Errorf("[%s] Expected error type %s with detail %q, got %v", k, v.errorType, v.errorDetail, errs) + } + } +} + +func TestValidateTLSSecret(t *testing.T) { + successCases := map[string]api.Secret{ + "empty certificate chain": { + ObjectMeta: metav1.ObjectMeta{Name: "tls-cert", Namespace: "namespace"}, + Data: map[string][]byte{ + api.TLSCertKey: []byte("public key"), + api.TLSPrivateKeyKey: []byte("private key"), + }, + }, + } + for k, v := range successCases { + if errs := ValidateSecret(&v); len(errs) != 0 { + t.Errorf("Expected success for %s, got %v", k, errs) + } + } + errorCases := map[string]struct { + secrets api.Secret + errorType field.ErrorType + errorDetail string + }{ + "missing public key": { + secrets: api.Secret{ + ObjectMeta: metav1.ObjectMeta{Name: "tls-cert"}, + Data: map[string][]byte{ + api.TLSCertKey: []byte("public key"), + }, + }, + errorType: "FieldValueRequired", + }, + "missing private key": { + secrets: api.Secret{ + ObjectMeta: metav1.ObjectMeta{Name: "tls-cert"}, + Data: map[string][]byte{ + api.TLSCertKey: []byte("public key"), + }, + }, + errorType: "FieldValueRequired", + }, + } + for k, v := range errorCases { + if errs := ValidateSecret(&v.secrets); len(errs) == 0 || errs[0].Type != v.errorType || !strings.Contains(errs[0].Detail, v.errorDetail) { + t.Errorf("[%s] Expected error type %s with detail %q, got %v", k, v.errorType, v.errorDetail, errs) + } + } +} + +func TestValidateSecurityContext(t *testing.T) { + priv := false + runAsUser := int64(1) + fullValidSC := func() *api.SecurityContext { + return &api.SecurityContext{ + Privileged: &priv, + Capabilities: &api.Capabilities{ + Add: []api.Capability{"foo"}, + Drop: []api.Capability{"bar"}, + }, + SELinuxOptions: &api.SELinuxOptions{ + User: "user", + Role: "role", + Type: "type", + Level: "level", + }, + RunAsUser: &runAsUser, + } + } + + //setup data + allSettings := fullValidSC() + noCaps := fullValidSC() + noCaps.Capabilities = nil + + noSELinux := fullValidSC() + noSELinux.SELinuxOptions = nil + + noPrivRequest := fullValidSC() + noPrivRequest.Privileged = nil + + noRunAsUser := fullValidSC() + noRunAsUser.RunAsUser = nil + + successCases := map[string]struct { + sc *api.SecurityContext + }{ + "all settings": {allSettings}, + "no capabilities": {noCaps}, + "no selinux": {noSELinux}, + "no priv request": {noPrivRequest}, + "no run as user": {noRunAsUser}, + } + for k, v := range successCases { + if errs := ValidateSecurityContext(v.sc, field.NewPath("field")); len(errs) != 0 { + t.Errorf("[%s] Expected success, got %v", k, errs) + } + } + + privRequestWithGlobalDeny := fullValidSC() + requestPrivileged := true + privRequestWithGlobalDeny.Privileged = &requestPrivileged + + negativeRunAsUser := fullValidSC() + negativeUser := int64(-1) + negativeRunAsUser.RunAsUser = &negativeUser + + errorCases := map[string]struct { + sc *api.SecurityContext + errorType field.ErrorType + errorDetail string + }{ + "request privileged when capabilities forbids": { + sc: privRequestWithGlobalDeny, + errorType: "FieldValueForbidden", + errorDetail: "disallowed by cluster policy", + }, + "negative RunAsUser": { + sc: negativeRunAsUser, + errorType: "FieldValueInvalid", + errorDetail: isNegativeErrorMsg, + }, + } + for k, v := range errorCases { + if errs := ValidateSecurityContext(v.sc, field.NewPath("field")); len(errs) == 0 || errs[0].Type != v.errorType || !strings.Contains(errs[0].Detail, v.errorDetail) { + t.Errorf("[%s] Expected error type %q with detail %q, got %v", k, v.errorType, v.errorDetail, errs) + } + } +} + +func fakeValidSecurityContext(priv bool) *api.SecurityContext { + return &api.SecurityContext{ + Privileged: &priv, + } +} + +func TestValidPodLogOptions(t *testing.T) { + now := metav1.Now() + negative := int64(-1) + zero := int64(0) + positive := int64(1) + tests := []struct { + opt api.PodLogOptions + errs int + }{ + {api.PodLogOptions{}, 0}, + {api.PodLogOptions{Previous: true}, 0}, + {api.PodLogOptions{Follow: true}, 0}, + {api.PodLogOptions{TailLines: &zero}, 0}, + {api.PodLogOptions{TailLines: &negative}, 1}, + {api.PodLogOptions{TailLines: &positive}, 0}, + {api.PodLogOptions{LimitBytes: &zero}, 1}, + {api.PodLogOptions{LimitBytes: &negative}, 1}, + {api.PodLogOptions{LimitBytes: &positive}, 0}, + {api.PodLogOptions{SinceSeconds: &negative}, 1}, + {api.PodLogOptions{SinceSeconds: &positive}, 0}, + {api.PodLogOptions{SinceSeconds: &zero}, 1}, + {api.PodLogOptions{SinceTime: &now}, 0}, + } + for i, test := range tests { + errs := ValidatePodLogOptions(&test.opt) + if test.errs != len(errs) { + t.Errorf("%d: Unexpected errors: %v", i, errs) + } + } +} + +func TestValidateConfigMap(t *testing.T) { + newConfigMap := func(name, namespace string, data map[string]string) api.ConfigMap { + return api.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: namespace, + }, + Data: data, + } + } + + var ( + validConfigMap = newConfigMap("validname", "validns", map[string]string{"key": "value"}) + maxKeyLength = newConfigMap("validname", "validns", map[string]string{strings.Repeat("a", 253): "value"}) + + emptyName = newConfigMap("", "validns", nil) + invalidName = newConfigMap("NoUppercaseOrSpecialCharsLike=Equals", "validns", nil) + emptyNs = newConfigMap("validname", "", nil) + invalidNs = newConfigMap("validname", "NoUppercaseOrSpecialCharsLike=Equals", nil) + invalidKey = newConfigMap("validname", "validns", map[string]string{"a*b": "value"}) + leadingDotKey = newConfigMap("validname", "validns", map[string]string{".ab": "value"}) + dotKey = newConfigMap("validname", "validns", map[string]string{".": "value"}) + doubleDotKey = newConfigMap("validname", "validns", map[string]string{"..": "value"}) + overMaxKeyLength = newConfigMap("validname", "validns", map[string]string{strings.Repeat("a", 254): "value"}) + overMaxSize = newConfigMap("validname", "validns", map[string]string{"key": strings.Repeat("a", api.MaxSecretSize+1)}) + ) + + tests := map[string]struct { + cfg api.ConfigMap + isValid bool + }{ + "valid": {validConfigMap, true}, + "max key length": {maxKeyLength, true}, + "leading dot key": {leadingDotKey, true}, + "empty name": {emptyName, false}, + "invalid name": {invalidName, false}, + "invalid key": {invalidKey, false}, + "empty namespace": {emptyNs, false}, + "invalid namespace": {invalidNs, false}, + "dot key": {dotKey, false}, + "double dot key": {doubleDotKey, false}, + "over max key length": {overMaxKeyLength, false}, + "over max size": {overMaxSize, false}, + } + + for name, tc := range tests { + errs := ValidateConfigMap(&tc.cfg) + if tc.isValid && len(errs) > 0 { + t.Errorf("%v: unexpected error: %v", name, errs) + } + if !tc.isValid && len(errs) == 0 { + t.Errorf("%v: unexpected non-error", name) + } + } +} + +func TestValidateConfigMapUpdate(t *testing.T) { + newConfigMap := func(version, name, namespace string, data map[string]string) api.ConfigMap { + return api.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: namespace, + ResourceVersion: version, + }, + Data: data, + } + } + + var ( + validConfigMap = newConfigMap("1", "validname", "validns", map[string]string{"key": "value"}) + noVersion = newConfigMap("", "validname", "validns", map[string]string{"key": "value"}) + ) + + cases := []struct { + name string + newCfg api.ConfigMap + oldCfg api.ConfigMap + isValid bool + }{ + { + name: "valid", + newCfg: validConfigMap, + oldCfg: validConfigMap, + isValid: true, + }, + { + name: "invalid", + newCfg: noVersion, + oldCfg: validConfigMap, + isValid: false, + }, + } + + for _, tc := range cases { + errs := ValidateConfigMapUpdate(&tc.newCfg, &tc.oldCfg) + if tc.isValid && len(errs) > 0 { + t.Errorf("%v: unexpected error: %v", tc.name, errs) + } + if !tc.isValid && len(errs) == 0 { + t.Errorf("%v: unexpected non-error", tc.name) + } + } +} + +func TestValidateHasLabel(t *testing.T) { + successCase := metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + Labels: map[string]string{ + "other": "blah", + "foo": "bar", + }, + } + if errs := ValidateHasLabel(successCase, field.NewPath("field"), "foo", "bar"); len(errs) != 0 { + t.Errorf("expected success: %v", errs) + } + + missingCase := metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + Labels: map[string]string{ + "other": "blah", + }, + } + if errs := ValidateHasLabel(missingCase, field.NewPath("field"), "foo", "bar"); len(errs) == 0 { + t.Errorf("expected failure") + } + + wrongValueCase := metav1.ObjectMeta{ + Name: "123", + Namespace: "ns", + Labels: map[string]string{ + "other": "blah", + "foo": "notbar", + }, + } + if errs := ValidateHasLabel(wrongValueCase, field.NewPath("field"), "foo", "bar"); len(errs) == 0 { + t.Errorf("expected failure") + } +} + +func TestIsValidSysctlName(t *testing.T) { + valid := []string{ + "a.b.c.d", + "a", + "a_b", + "a-b", + "abc", + "abc.def", + } + invalid := []string{ + "", + "*", + "ä", + "a_", + "_", + "__", + "_a", + "_a._b", + "-", + ".", + "a.", + ".a", + "a.b.", + "a*.b", + "a*b", + "*a", + "a.*", + "*", + "abc*", + "a.abc*", + "a.b.*", + "Abc", + func(n int) string { + x := make([]byte, n) + for i := range x { + x[i] = byte('a') + } + return string(x) + }(256), + } + for _, s := range valid { + if !IsValidSysctlName(s) { + t.Errorf("%q expected to be a valid sysctl name", s) + } + } + for _, s := range invalid { + if IsValidSysctlName(s) { + t.Errorf("%q expected to be an invalid sysctl name", s) + } + } +} + +func TestValidateSysctls(t *testing.T) { + valid := []string{ + "net.foo.bar", + "kernel.shmmax", + } + invalid := []string{ + "i..nvalid", + "_invalid", + } + + sysctls := make([]api.Sysctl, len(valid)) + for i, sysctl := range valid { + sysctls[i].Name = sysctl + } + errs := validateSysctls(sysctls, field.NewPath("foo")) + if len(errs) != 0 { + t.Errorf("unexpected validation errors: %v", errs) + } + + sysctls = make([]api.Sysctl, len(invalid)) + for i, sysctl := range invalid { + sysctls[i].Name = sysctl + } + errs = validateSysctls(sysctls, field.NewPath("foo")) + if len(errs) != 2 { + t.Errorf("expected 2 validation errors. Got: %v", errs) + } else { + if got, expected := errs[0].Error(), "foo"; !strings.Contains(got, expected) { + t.Errorf("unexpected errors: expected=%q, got=%q", expected, got) + } + if got, expected := errs[1].Error(), "foo"; !strings.Contains(got, expected) { + t.Errorf("unexpected errors: expected=%q, got=%q", expected, got) + } + } +} + +func newNodeNameEndpoint(nodeName string) *api.Endpoints { + ep := &api.Endpoints{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Namespace: metav1.NamespaceDefault, + ResourceVersion: "1", + }, + Subsets: []api.EndpointSubset{ + { + NotReadyAddresses: []api.EndpointAddress{}, + Ports: []api.EndpointPort{{Name: "https", Port: 443, Protocol: "TCP"}}, + Addresses: []api.EndpointAddress{ + { + IP: "8.8.8.8", + Hostname: "zookeeper1", + NodeName: &nodeName}}}}} + return ep +} + +func TestEndpointAddressNodeNameUpdateRestrictions(t *testing.T) { + oldEndpoint := newNodeNameEndpoint("kubernetes-node-setup-by-backend") + updatedEndpoint := newNodeNameEndpoint("kubernetes-changed-nodename") + // Check that NodeName cannot be changed during update (if already set) + errList := ValidateEndpoints(updatedEndpoint) + errList = append(errList, ValidateEndpointsUpdate(updatedEndpoint, oldEndpoint)...) + if len(errList) == 0 { + t.Error("Endpoint should not allow changing of Subset.Addresses.NodeName on update") + } +} + +func TestEndpointAddressNodeNameInvalidDNSSubdomain(t *testing.T) { + // Check NodeName DNS validation + endpoint := newNodeNameEndpoint("illegal*.nodename") + errList := ValidateEndpoints(endpoint) + if len(errList) == 0 { + t.Error("Endpoint should reject invalid NodeName") + } +} + +func TestEndpointAddressNodeNameCanBeAnIPAddress(t *testing.T) { + endpoint := newNodeNameEndpoint("10.10.1.1") + errList := ValidateEndpoints(endpoint) + if len(errList) != 0 { + t.Error("Endpoint should accept a NodeName that is an IP address") + } +} + +func TestValidateFlexVolumeSource(t *testing.T) { + testcases := map[string]struct { + source *api.FlexVolumeSource + expectedErrs map[string]string + }{ + "valid": { + source: &api.FlexVolumeSource{Driver: "foo"}, + expectedErrs: map[string]string{}, + }, + "valid with options": { + source: &api.FlexVolumeSource{Driver: "foo", Options: map[string]string{"foo": "bar"}}, + expectedErrs: map[string]string{}, + }, + "no driver": { + source: &api.FlexVolumeSource{Driver: ""}, + expectedErrs: map[string]string{"driver": "Required value"}, + }, + "reserved option keys": { + source: &api.FlexVolumeSource{ + Driver: "foo", + Options: map[string]string{ + // valid options + "myns.io": "A", + "myns.io/bar": "A", + "myns.io/kubernetes.io": "A", + + // invalid options + "KUBERNETES.IO": "A", + "kubernetes.io": "A", + "kubernetes.io/": "A", + "kubernetes.io/foo": "A", + + "alpha.kubernetes.io": "A", + "alpha.kubernetes.io/": "A", + "alpha.kubernetes.io/foo": "A", + + "k8s.io": "A", + "k8s.io/": "A", + "k8s.io/foo": "A", + + "alpha.k8s.io": "A", + "alpha.k8s.io/": "A", + "alpha.k8s.io/foo": "A", + }, + }, + expectedErrs: map[string]string{ + "options[KUBERNETES.IO]": "reserved", + "options[kubernetes.io]": "reserved", + "options[kubernetes.io/]": "reserved", + "options[kubernetes.io/foo]": "reserved", + "options[alpha.kubernetes.io]": "reserved", + "options[alpha.kubernetes.io/]": "reserved", + "options[alpha.kubernetes.io/foo]": "reserved", + "options[k8s.io]": "reserved", + "options[k8s.io/]": "reserved", + "options[k8s.io/foo]": "reserved", + "options[alpha.k8s.io]": "reserved", + "options[alpha.k8s.io/]": "reserved", + "options[alpha.k8s.io/foo]": "reserved", + }, + }, + } + + for k, tc := range testcases { + errs := validateFlexVolumeSource(tc.source, nil) + for _, err := range errs { + expectedErr, ok := tc.expectedErrs[err.Field] + if !ok { + t.Errorf("%s: unexpected err on field %s: %v", k, err.Field, err) + continue + } + if !strings.Contains(err.Error(), expectedErr) { + t.Errorf("%s: expected err on field %s to contain '%s', was %v", k, err.Field, expectedErr, err.Error()) + continue + } + } + if len(errs) != len(tc.expectedErrs) { + t.Errorf("%s: expected errs %#v, got %#v", k, tc.expectedErrs, errs) + continue + } + } +} + +func TestValidateOrSetClientIPAffinityConfig(t *testing.T) { + successCases := map[string]*api.SessionAffinityConfig{ + "non-empty config, valid timeout: 1": { + ClientIP: &api.ClientIPConfig{ + TimeoutSeconds: newInt32(1), + }, + }, + "non-empty config, valid timeout: api.MaxClientIPServiceAffinitySeconds-1": { + ClientIP: &api.ClientIPConfig{ + TimeoutSeconds: newInt32(int(api.MaxClientIPServiceAffinitySeconds - 1)), + }, + }, + "non-empty config, valid timeout: api.MaxClientIPServiceAffinitySeconds": { + ClientIP: &api.ClientIPConfig{ + TimeoutSeconds: newInt32(int(api.MaxClientIPServiceAffinitySeconds)), + }, + }, + } + + for name, test := range successCases { + if errs := validateClientIPAffinityConfig(test, field.NewPath("field")); len(errs) != 0 { + t.Errorf("case: %s, expected success: %v", name, errs) + } + } + + errorCases := map[string]*api.SessionAffinityConfig{ + "empty session affinity config": nil, + "empty client IP config": { + ClientIP: nil, + }, + "empty timeoutSeconds": { + ClientIP: &api.ClientIPConfig{ + TimeoutSeconds: nil, + }, + }, + "non-empty config, invalid timeout: api.MaxClientIPServiceAffinitySeconds+1": { + ClientIP: &api.ClientIPConfig{ + TimeoutSeconds: newInt32(int(api.MaxClientIPServiceAffinitySeconds + 1)), + }, + }, + "non-empty config, invalid timeout: -1": { + ClientIP: &api.ClientIPConfig{ + TimeoutSeconds: newInt32(-1), + }, + }, + "non-empty config, invalid timeout: 0": { + ClientIP: &api.ClientIPConfig{ + TimeoutSeconds: newInt32(0), + }, + }, + } + + for name, test := range errorCases { + if errs := validateClientIPAffinityConfig(test, field.NewPath("field")); len(errs) == 0 { + t.Errorf("case: %v, expected failures: %v", name, errs) + } + } +} + +func boolPtr(b bool) *bool { + return &b +} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/OWNERS b/vendor/k8s.io/kubernetes/pkg/apis/OWNERS new file mode 100644 index 000000000..c8cd82a72 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/apis/OWNERS @@ -0,0 +1,45 @@ +approvers: +- erictune +- lavalamp +- smarterclayton +- thockin +- liggitt +# - bgrant0607 # manual escalations only +reviewers: +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- yujuhong +- brendandburns +- derekwaynecarr +- caesarxuchao +- vishh +- mikedanese +- liggitt +- nikhiljindal +- gmarek +- erictune +- pmorie +- sttts +- dchen1107 +- saad-ali +- luxas +- janetkuo +- justinsb +- pwittrock +- ncdc +- tallclair +- yifan-gu +- eparis +- mwielgus +- timothysc +- feiskyer +- soltysh +- piosz +- dims +- errordeveloper +- madhusudancs +- krousey +- rootfs +- jszczepkowski diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/doc.go index 2bbb71d05..fbce8ee70 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/extensions/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/doc.go @@ -16,4 +16,4 @@ limitations under the License. // +k8s:deepcopy-gen=package,register -package extensions +package extensions // import "k8s.io/kubernetes/pkg/apis/extensions" diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/helpers_test.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/helpers_test.go new file mode 100644 index 000000000..29ae139ec --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/helpers_test.go @@ -0,0 +1,62 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package extensions + +import ( + "reflect" + "testing" +) + +func TestPodAnnotationsFromSysctls(t *testing.T) { + type Test struct { + sysctls []string + expectedValue string + } + for _, test := range []Test{ + {sysctls: []string{"a.b"}, expectedValue: "a.b"}, + {sysctls: []string{"a.b", "c.d"}, expectedValue: "a.b,c.d"}, + {sysctls: []string{"a.b", "a.b"}, expectedValue: "a.b,a.b"}, + {sysctls: []string{}, expectedValue: ""}, + {sysctls: nil, expectedValue: ""}, + } { + a := PodAnnotationsFromSysctls(test.sysctls) + if a != test.expectedValue { + t.Errorf("wrong value for %v: got=%q wanted=%q", test.sysctls, a, test.expectedValue) + } + } +} + +func TestSysctlsFromPodSecurityPolicyAnnotation(t *testing.T) { + type Test struct { + expectedValue []string + annotation string + } + for _, test := range []Test{ + {annotation: "a.b", expectedValue: []string{"a.b"}}, + {annotation: "a.b,c.d", expectedValue: []string{"a.b", "c.d"}}, + {annotation: "a.b,a.b", expectedValue: []string{"a.b", "a.b"}}, + {annotation: "", expectedValue: []string{}}, + } { + sysctls, err := SysctlsFromPodSecurityPolicyAnnotation(test.annotation) + if err != nil { + t.Errorf("error for %q: %v", test.annotation, err) + } + if !reflect.DeepEqual(sysctls, test.expectedValue) { + t.Errorf("wrong value for %q: got=%v wanted=%v", test.annotation, sysctls, test.expectedValue) + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/networking/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/networking/doc.go index 83c0401bf..b583051ca 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/networking/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/networking/doc.go @@ -16,4 +16,4 @@ limitations under the License. // +k8s:deepcopy-gen=package,register // +groupName=networking.k8s.io -package networking +package networking // import "k8s.io/kubernetes/pkg/apis/networking" diff --git a/vendor/k8s.io/kubernetes/pkg/capabilities/capabilities_test.go b/vendor/k8s.io/kubernetes/pkg/capabilities/capabilities_test.go new file mode 100644 index 000000000..ea4434d06 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/capabilities/capabilities_test.go @@ -0,0 +1,50 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package capabilities + +import ( + "reflect" + "testing" +) + +func TestGet(t *testing.T) { + defaultCap := Capabilities{ + AllowPrivileged: false, + PrivilegedSources: PrivilegedSources{ + HostNetworkSources: []string{}, + HostPIDSources: []string{}, + HostIPCSources: []string{}, + }, + } + + res := Get() + if !reflect.DeepEqual(defaultCap, res) { + t.Fatalf("expected Capabilities: %#v, got a non-default: %#v", defaultCap, res) + } + + cap := Capabilities{ + PrivilegedSources: PrivilegedSources{ + HostNetworkSources: []string{"A", "B"}, + }, + } + SetForTests(cap) + + res = Get() + if !reflect.DeepEqual(cap, res) { + t.Fatalf("expected Capabilities: %#v , got a different: %#v", cap, res) + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/capabilities/doc.go b/vendor/k8s.io/kubernetes/pkg/capabilities/doc.go index e2042a881..bbdc89d50 100644 --- a/vendor/k8s.io/kubernetes/pkg/capabilities/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/capabilities/doc.go @@ -15,4 +15,4 @@ limitations under the License. */ // package capabilities manages system level capabilities -package capabilities +package capabilities // import "k8s.io/kubernetes/pkg/capabilities" diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/doc.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/doc.go index 7192394c3..41f8ae860 100644 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/cloudprovider/doc.go @@ -15,4 +15,4 @@ limitations under the License. */ // Package cloudprovider supplies interfaces and implementations for cloud service providers. -package cloudprovider +package cloudprovider // import "k8s.io/kubernetes/pkg/cloudprovider" diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/BUILD b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/BUILD deleted file mode 100644 index 401f5934d..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/BUILD +++ /dev/null @@ -1,127 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "gce.go", - "gce_address_manager.go", - "gce_addresses.go", - "gce_addresses_fakes.go", - "gce_alpha.go", - "gce_annotations.go", - "gce_backendservice.go", - "gce_cert.go", - "gce_clusterid.go", - "gce_clusters.go", - "gce_disks.go", - "gce_firewall.go", - "gce_forwardingrule.go", - "gce_forwardingrule_fakes.go", - "gce_healthchecks.go", - "gce_instancegroup.go", - "gce_instances.go", - "gce_interfaces.go", - "gce_loadbalancer.go", - "gce_loadbalancer_external.go", - "gce_loadbalancer_internal.go", - "gce_loadbalancer_naming.go", - "gce_op.go", - "gce_routes.go", - "gce_targetpool.go", - "gce_targetproxy.go", - "gce_urlmap.go", - "gce_util.go", - "gce_zones.go", - "kms.go", - "metrics.go", - "token_source.go", - ], - deps = [ - "//pkg/api/v1/service:go_default_library", - "//pkg/cloudprovider:go_default_library", - "//pkg/controller:go_default_library", - "//pkg/kubelet/apis:go_default_library", - "//pkg/master/ports:go_default_library", - "//pkg/util/net/sets:go_default_library", - "//pkg/util/version:go_default_library", - "//pkg/volume:go_default_library", - "//pkg/volume/util:go_default_library", - "//vendor/cloud.google.com/go/compute/metadata:go_default_library", - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", - "//vendor/golang.org/x/oauth2:go_default_library", - "//vendor/golang.org/x/oauth2/google:go_default_library", - "//vendor/google.golang.org/api/cloudkms/v1:go_default_library", - "//vendor/google.golang.org/api/compute/v0.alpha:go_default_library", - "//vendor/google.golang.org/api/compute/v0.beta:go_default_library", - "//vendor/google.golang.org/api/compute/v1:go_default_library", - "//vendor/google.golang.org/api/container/v1:go_default_library", - "//vendor/google.golang.org/api/googleapi:go_default_library", - "//vendor/gopkg.in/gcfg.v1:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/apiserver/pkg/server/options/encryptionconfig:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/value/encrypt/envelope:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/k8s.io/client-go/tools/record:go_default_library", - "//vendor/k8s.io/client-go/util/flowcontrol:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "gce_address_manager_test.go", - "gce_annotations_test.go", - "gce_disks_test.go", - "gce_healthchecks_test.go", - "gce_loadbalancer_external_test.go", - "gce_test.go", - "metrics_test.go", - ], - library = ":go_default_library", - deps = [ - "//pkg/cloudprovider:go_default_library", - "//pkg/kubelet/apis:go_default_library", - "//vendor/github.com/stretchr/testify/assert:go_default_library", - "//vendor/github.com/stretchr/testify/require:go_default_library", - "//vendor/golang.org/x/oauth2/google:go_default_library", - "//vendor/google.golang.org/api/compute/v0.alpha:go_default_library", - "//vendor/google.golang.org/api/compute/v0.beta:go_default_library", - "//vendor/google.golang.org/api/compute/v1:go_default_library", - "//vendor/google.golang.org/api/googleapi:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/OWNERS b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/OWNERS deleted file mode 100644 index 2941ce492..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/OWNERS +++ /dev/null @@ -1,8 +0,0 @@ -approvers: -- saad-ali -- jingxu97 -- bowei -- freehan -- nicksardo -- mrhohn -- dnardo diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce.go deleted file mode 100644 index 711792915..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce.go +++ /dev/null @@ -1,1149 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "fmt" - "io" - "net/http" - "regexp" - "strconv" - "strings" - "sync" - "time" - - gcfg "gopkg.in/gcfg.v1" - - "cloud.google.com/go/compute/metadata" - - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/apiserver/pkg/server/options/encryptionconfig" - "k8s.io/apiserver/pkg/storage/value/encrypt/envelope" - clientset "k8s.io/client-go/kubernetes" - "k8s.io/client-go/kubernetes/scheme" - v1core "k8s.io/client-go/kubernetes/typed/core/v1" - "k8s.io/client-go/tools/record" - "k8s.io/client-go/util/flowcontrol" - "k8s.io/kubernetes/pkg/cloudprovider" - "k8s.io/kubernetes/pkg/controller" - - "github.com/golang/glog" - "golang.org/x/oauth2" - "golang.org/x/oauth2/google" - cloudkms "google.golang.org/api/cloudkms/v1" - computealpha "google.golang.org/api/compute/v0.alpha" - computebeta "google.golang.org/api/compute/v0.beta" - compute "google.golang.org/api/compute/v1" - container "google.golang.org/api/container/v1" -) - -const ( - ProviderName = "gce" - - k8sNodeRouteTag = "k8s-node-route" - - // AffinityTypeNone - no session affinity. - gceAffinityTypeNone = "NONE" - // AffinityTypeClientIP - affinity based on Client IP. - gceAffinityTypeClientIP = "CLIENT_IP" - // AffinityTypeClientIPProto - affinity based on Client IP and port. - gceAffinityTypeClientIPProto = "CLIENT_IP_PROTO" - - operationPollInterval = 3 * time.Second - // Creating Route in very large clusters, may take more than half an hour. - operationPollTimeoutDuration = time.Hour - - // Each page can have 500 results, but we cap how many pages - // are iterated through to prevent infinite loops if the API - // were to continuously return a nextPageToken. - maxPages = 25 - - maxTargetPoolCreateInstances = 200 - - // HTTP Load Balancer parameters - // Configure 2 second period for external health checks. - gceHcCheckIntervalSeconds = int64(2) - gceHcTimeoutSeconds = int64(1) - // Start sending requests as soon as a pod is found on the node. - gceHcHealthyThreshold = int64(1) - // Defaults to 5 * 2 = 10 seconds before the LB will steer traffic away - gceHcUnhealthyThreshold = int64(5) - - gceComputeAPIEndpoint = "https://www.googleapis.com/compute/v1/" - gceComputeAPIEndpointAlpha = "https://www.googleapis.com/compute/alpha/" -) - -// gceObject is an abstraction of all GCE API object in go client -type gceObject interface { - MarshalJSON() ([]byte, error) -} - -// GCECloud is an implementation of Interface, LoadBalancer and Instances for Google Compute Engine. -type GCECloud struct { - // ClusterID contains functionality for getting (and initializing) the ingress-uid. Call GCECloud.Initialize() - // for the cloudprovider to start watching the configmap. - ClusterID ClusterID - - service *compute.Service - serviceBeta *computebeta.Service - serviceAlpha *computealpha.Service - containerService *container.Service - cloudkmsService *cloudkms.Service - client clientset.Interface - clientBuilder controller.ControllerClientBuilder - eventBroadcaster record.EventBroadcaster - eventRecorder record.EventRecorder - projectID string - region string - localZone string // The zone in which we are running - managedZones []string // List of zones we are spanning (for multi-AZ clusters, primarily when running on master) - networkURL string - subnetworkURL string - secondaryRangeName string - networkProjectID string - onXPN bool - nodeTags []string // List of tags to use on firewall rules for load balancers - lastComputedNodeTags []string // List of node tags calculated in GetHostTags() - lastKnownNodeNames sets.String // List of hostnames used to calculate lastComputedHostTags in GetHostTags(names) - computeNodeTagLock sync.Mutex // Lock for computing and setting node tags - nodeInstancePrefix string // If non-"", an advisory prefix for all nodes in the cluster - useMetadataServer bool - operationPollRateLimiter flowcontrol.RateLimiter - manager ServiceManager - // sharedResourceLock is used to serialize GCE operations that may mutate shared state to - // prevent inconsistencies. For example, load balancers manipulation methods will take the - // lock to prevent shared resources from being prematurely deleted while the operation is - // in progress. - sharedResourceLock sync.Mutex - // AlphaFeatureGate gates gce alpha features in GCECloud instance. - // Related wrapper functions that interacts with gce alpha api should examine whether - // the corresponding api is enabled. - // If not enabled, it should return error. - AlphaFeatureGate *AlphaFeatureGate -} - -type ServiceManager interface { - // Creates a new persistent disk on GCE with the given disk spec. - CreateDisk( - name string, - sizeGb int64, - tagsStr string, - diskType string, - zone string) (gceObject, error) - - // Creates a new regional persistent disk on GCE with the given disk spec. - CreateRegionalDisk( - name string, - sizeGb int64, - tagsStr string, - diskType string, - zones sets.String) (gceObject, error) - - // Deletes the persistent disk from GCE with the given diskName. - DeleteDisk(zone string, disk string) (gceObject, error) - - // Deletes the regional persistent disk from GCE with the given diskName. - DeleteRegionalDisk(diskName string) (gceObject, error) - - // Attach a persistent disk on GCE with the given disk spec to the specified instance. - AttachDisk( - disk *GCEDisk, - readWrite string, - instanceZone string, - instanceName string) (gceObject, error) - - // Detach a persistent disk on GCE with the given disk spec from the specified instance. - DetachDisk( - instanceZone string, - instanceName string, - devicePath string) (gceObject, error) - - // Gets the persistent disk from GCE with the given diskName. - GetDisk(zone string, diskName string) (*GCEDisk, error) - - // Gets the regional persistent disk from GCE with the given diskName. - GetRegionalDisk(diskName string) (*GCEDisk, error) - - // Waits until GCE reports the given operation in the given zone as done. - WaitForZoneOp(op gceObject, zone string, mc *metricContext) error - - // Waits until GCE reports the given operation in the given region is done. - WaitForRegionalOp(op gceObject, mc *metricContext) error -} - -type GCEServiceManager struct { - gce *GCECloud -} - -type ConfigGlobal struct { - TokenURL string `gcfg:"token-url"` - TokenBody string `gcfg:"token-body"` - // ProjectID and NetworkProjectID can either be the numeric or string-based - // unique identifier that starts with [a-z]. - ProjectID string `gcfg:"project-id"` - // NetworkProjectID refers to the project which owns the network being used. - NetworkProjectID string `gcfg:"network-project-id"` - NetworkName string `gcfg:"network-name"` - SubnetworkName string `gcfg:"subnetwork-name"` - // SecondaryRangeName is the name of the secondary range to allocate IP - // aliases. The secondary range must be present on the subnetwork the - // cluster is attached to. - SecondaryRangeName string `gcfg:"secondary-range-name"` - NodeTags []string `gcfg:"node-tags"` - NodeInstancePrefix string `gcfg:"node-instance-prefix"` - Multizone bool `gcfg:"multizone"` - // ApiEndpoint is the GCE compute API endpoint to use. If this is blank, - // then the default endpoint is used. - ApiEndpoint string `gcfg:"api-endpoint"` - // LocalZone specifies the GCE zone that gce cloud client instance is - // located in (i.e. where the controller will be running). If this is - // blank, then the local zone will be discovered via the metadata server. - LocalZone string `gcfg:"local-zone"` - // Possible values: List of api names separated by comma. Default to none. - // For example: MyFeatureFlag - AlphaFeatures []string `gcfg:"alpha-features"` -} - -// ConfigFile is the struct used to parse the /etc/gce.conf configuration file. -type ConfigFile struct { - Global ConfigGlobal `gcfg:"global"` -} - -// CloudConfig includes all the necessary configuration for creating GCECloud -type CloudConfig struct { - ApiEndpoint string - ProjectID string - NetworkProjectID string - Region string - Zone string - ManagedZones []string - NetworkName string - NetworkURL string - SubnetworkName string - SubnetworkURL string - SecondaryRangeName string - NodeTags []string - NodeInstancePrefix string - TokenSource oauth2.TokenSource - UseMetadataServer bool - AlphaFeatureGate *AlphaFeatureGate -} - -// kmsPluginRegisterOnce prevents the cloudprovider from registering its KMS plugin -// more than once in the KMS plugin registry. -var kmsPluginRegisterOnce sync.Once - -func init() { - cloudprovider.RegisterCloudProvider( - ProviderName, - func(config io.Reader) (cloudprovider.Interface, error) { - return newGCECloud(config) - }) -} - -// Raw access to the underlying GCE service, probably should only be used for e2e tests -func (g *GCECloud) GetComputeService() *compute.Service { - return g.service -} - -// Raw access to the cloudkmsService of GCE cloud. Required for encryption of etcd using Google KMS. -func (g *GCECloud) GetKMSService() *cloudkms.Service { - return g.cloudkmsService -} - -// newGCECloud creates a new instance of GCECloud. -func newGCECloud(config io.Reader) (gceCloud *GCECloud, err error) { - var cloudConfig *CloudConfig - var configFile *ConfigFile - - if config != nil { - configFile, err = readConfig(config) - if err != nil { - return nil, err - } - glog.Infof("Using GCE provider config %+v", configFile) - } - - cloudConfig, err = generateCloudConfig(configFile) - if err != nil { - return nil, err - } - return CreateGCECloud(cloudConfig) - -} - -func readConfig(reader io.Reader) (*ConfigFile, error) { - cfg := &ConfigFile{} - if err := gcfg.FatalOnly(gcfg.ReadInto(cfg, reader)); err != nil { - glog.Errorf("Couldn't read config: %v", err) - return nil, err - } - return cfg, nil -} - -func generateCloudConfig(configFile *ConfigFile) (cloudConfig *CloudConfig, err error) { - cloudConfig = &CloudConfig{} - // By default, fetch token from GCE metadata server - cloudConfig.TokenSource = google.ComputeTokenSource("") - cloudConfig.UseMetadataServer = true - - if configFile != nil { - if configFile.Global.ApiEndpoint != "" { - cloudConfig.ApiEndpoint = configFile.Global.ApiEndpoint - } - - if configFile.Global.TokenURL != "" { - // if tokenURL is nil, set tokenSource to nil. This will force the OAuth client to fall - // back to use DefaultTokenSource. This allows running gceCloud remotely. - if configFile.Global.TokenURL == "nil" { - cloudConfig.TokenSource = nil - } else { - cloudConfig.TokenSource = NewAltTokenSource(configFile.Global.TokenURL, configFile.Global.TokenBody) - } - } - - cloudConfig.NodeTags = configFile.Global.NodeTags - cloudConfig.NodeInstancePrefix = configFile.Global.NodeInstancePrefix - - alphaFeatureGate, err := NewAlphaFeatureGate(configFile.Global.AlphaFeatures) - if err != nil { - glog.Errorf("Encountered error for creating alpha feature gate: %v", err) - } - cloudConfig.AlphaFeatureGate = alphaFeatureGate - } - - // retrieve projectID and zone - if configFile == nil || configFile.Global.ProjectID == "" || configFile.Global.LocalZone == "" { - cloudConfig.ProjectID, cloudConfig.Zone, err = getProjectAndZone() - if err != nil { - return nil, err - } - } - - if configFile != nil { - if configFile.Global.ProjectID != "" { - cloudConfig.ProjectID = configFile.Global.ProjectID - } - if configFile.Global.LocalZone != "" { - cloudConfig.Zone = configFile.Global.LocalZone - } - if configFile.Global.NetworkProjectID != "" { - cloudConfig.NetworkProjectID = configFile.Global.NetworkProjectID - } - } - - // retrieve region - cloudConfig.Region, err = GetGCERegion(cloudConfig.Zone) - if err != nil { - return nil, err - } - - // generate managedZones - cloudConfig.ManagedZones = []string{cloudConfig.Zone} - if configFile != nil && configFile.Global.Multizone { - cloudConfig.ManagedZones = nil // Use all zones in region - } - - // Determine if network parameter is URL or Name - if configFile != nil && configFile.Global.NetworkName != "" { - if strings.Contains(configFile.Global.NetworkName, "/") { - cloudConfig.NetworkURL = configFile.Global.NetworkName - } else { - cloudConfig.NetworkName = configFile.Global.NetworkName - } - } else { - cloudConfig.NetworkName, err = getNetworkNameViaMetadata() - if err != nil { - return nil, err - } - } - - // Determine if subnetwork parameter is URL or Name - // If cluster is on a GCP network of mode=custom, then `SubnetName` must be specified in config file. - if configFile != nil && configFile.Global.SubnetworkName != "" { - if strings.Contains(configFile.Global.SubnetworkName, "/") { - cloudConfig.SubnetworkURL = configFile.Global.SubnetworkName - } else { - cloudConfig.SubnetworkName = configFile.Global.SubnetworkName - } - } - - if configFile != nil { - cloudConfig.SecondaryRangeName = configFile.Global.SecondaryRangeName - } - - return cloudConfig, err -} - -// CreateGCECloud creates a GCECloud object using the specified parameters. -// If no networkUrl is specified, loads networkName via rest call. -// If no tokenSource is specified, uses oauth2.DefaultTokenSource. -// If managedZones is nil / empty all zones in the region will be managed. -func CreateGCECloud(config *CloudConfig) (*GCECloud, error) { - // Use ProjectID for NetworkProjectID, if it wasn't explicitly set. - if config.NetworkProjectID == "" { - config.NetworkProjectID = config.ProjectID - } - - client, err := newOauthClient(config.TokenSource) - if err != nil { - return nil, err - } - service, err := compute.New(client) - if err != nil { - return nil, err - } - - client, err = newOauthClient(config.TokenSource) - if err != nil { - return nil, err - } - serviceBeta, err := computebeta.New(client) - if err != nil { - return nil, err - } - - client, err = newOauthClient(config.TokenSource) - if err != nil { - return nil, err - } - serviceAlpha, err := computealpha.New(client) - if err != nil { - return nil, err - } - - // Expect override api endpoint to always be v1 api and follows the same pattern as prod. - // Generate alpha and beta api endpoints based on override v1 api endpoint. - // For example, - // staging API endpoint: https://www.googleapis.com/compute/staging_v1/ - if config.ApiEndpoint != "" { - service.BasePath = fmt.Sprintf("%sprojects/", config.ApiEndpoint) - serviceBeta.BasePath = fmt.Sprintf("%sprojects/", strings.Replace(config.ApiEndpoint, "v1", "beta", -1)) - serviceAlpha.BasePath = fmt.Sprintf("%sprojects/", strings.Replace(config.ApiEndpoint, "v1", "alpha", -1)) - } - - containerService, err := container.New(client) - if err != nil { - return nil, err - } - - cloudkmsService, err := cloudkms.New(client) - if err != nil { - return nil, err - } - - // ProjectID and.NetworkProjectID may be project number or name. - projID, netProjID := tryConvertToProjectNames(config.ProjectID, config.NetworkProjectID, service) - - onXPN := projID != netProjID - - var networkURL string - var subnetURL string - - if config.NetworkName == "" && config.NetworkURL == "" { - // TODO: Stop using this call and return an error. - // This function returns the first network in a list of networks for a project. The project - // should be set via configuration instead of randomly taking the first. - networkName, err := getNetworkNameViaAPICall(service, config.NetworkProjectID) - if err != nil { - return nil, err - } - networkURL = gceNetworkURL(config.ApiEndpoint, netProjID, networkName) - } else if config.NetworkURL != "" { - networkURL = config.NetworkURL - } else { - networkURL = gceNetworkURL(config.ApiEndpoint, netProjID, config.NetworkName) - } - - if config.SubnetworkURL != "" { - subnetURL = config.SubnetworkURL - } else if config.SubnetworkName != "" { - subnetURL = gceSubnetworkURL(config.ApiEndpoint, netProjID, config.Region, config.SubnetworkName) - } - - if len(config.ManagedZones) == 0 { - config.ManagedZones, err = getZonesForRegion(service, config.ProjectID, config.Region) - if err != nil { - return nil, err - } - } - if len(config.ManagedZones) != 1 { - glog.Infof("managing multiple zones: %v", config.ManagedZones) - } - - operationPollRateLimiter := flowcontrol.NewTokenBucketRateLimiter(10, 100) // 10 qps, 100 bucket size. - - gce := &GCECloud{ - service: service, - serviceAlpha: serviceAlpha, - serviceBeta: serviceBeta, - containerService: containerService, - cloudkmsService: cloudkmsService, - projectID: projID, - networkProjectID: netProjID, - onXPN: onXPN, - region: config.Region, - localZone: config.Zone, - managedZones: config.ManagedZones, - networkURL: networkURL, - subnetworkURL: subnetURL, - secondaryRangeName: config.SecondaryRangeName, - nodeTags: config.NodeTags, - nodeInstancePrefix: config.NodeInstancePrefix, - useMetadataServer: config.UseMetadataServer, - operationPollRateLimiter: operationPollRateLimiter, - AlphaFeatureGate: config.AlphaFeatureGate, - } - - gce.manager = &GCEServiceManager{gce} - - // Registering the KMS plugin only the first time. - kmsPluginRegisterOnce.Do(func() { - // Register the Google Cloud KMS based service in the KMS plugin registry. - encryptionconfig.KMSPluginRegistry.Register(KMSServiceName, func(config io.Reader) (envelope.Service, error) { - return gce.getGCPCloudKMSService(config) - }) - }) - - return gce, nil -} - -func tryConvertToProjectNames(configProject, configNetworkProject string, service *compute.Service) (projID, netProjID string) { - projID = configProject - if isProjectNumber(projID) { - projName, err := getProjectID(service, projID) - if err != nil { - glog.Warningf("Failed to retrieve project %v while trying to retrieve its name. err %v", projID, err) - } else { - projID = projName - } - } - - netProjID = projID - if configNetworkProject != configProject { - netProjID = configNetworkProject - } - if isProjectNumber(netProjID) { - netProjName, err := getProjectID(service, netProjID) - if err != nil { - glog.Warningf("Failed to retrieve network project %v while trying to retrieve its name. err %v", netProjID, err) - } else { - netProjID = netProjName - } - } - - return projID, netProjID -} - -// Initialize takes in a clientBuilder and spawns a goroutine for watching the clusterid configmap. -// This must be called before utilizing the funcs of gce.ClusterID -func (gce *GCECloud) Initialize(clientBuilder controller.ControllerClientBuilder) { - gce.clientBuilder = clientBuilder - gce.client = clientBuilder.ClientOrDie("cloud-provider") - - if gce.OnXPN() { - gce.eventBroadcaster = record.NewBroadcaster() - gce.eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: v1core.New(gce.client.Core().RESTClient()).Events("")}) - gce.eventRecorder = gce.eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "gce-cloudprovider"}) - } - - go gce.watchClusterID() -} - -// LoadBalancer returns an implementation of LoadBalancer for Google Compute Engine. -func (gce *GCECloud) LoadBalancer() (cloudprovider.LoadBalancer, bool) { - return gce, true -} - -// Instances returns an implementation of Instances for Google Compute Engine. -func (gce *GCECloud) Instances() (cloudprovider.Instances, bool) { - return gce, true -} - -// Zones returns an implementation of Zones for Google Compute Engine. -func (gce *GCECloud) Zones() (cloudprovider.Zones, bool) { - return gce, true -} - -func (gce *GCECloud) Clusters() (cloudprovider.Clusters, bool) { - return gce, true -} - -// Routes returns an implementation of Routes for Google Compute Engine. -func (gce *GCECloud) Routes() (cloudprovider.Routes, bool) { - return gce, true -} - -// ProviderName returns the cloud provider ID. -func (gce *GCECloud) ProviderName() string { - return ProviderName -} - -// ProjectID returns the ProjectID corresponding to the project this cloud is in. -func (g *GCECloud) ProjectID() string { - return g.projectID -} - -// NetworkProjectID returns the ProjectID corresponding to the project this cluster's network is in. -func (g *GCECloud) NetworkProjectID() string { - return g.networkProjectID -} - -// Region returns the region -func (gce *GCECloud) Region() string { - return gce.region -} - -// OnXPN returns true if the cluster is running on a cross project network (XPN) -func (gce *GCECloud) OnXPN() bool { - return gce.onXPN -} - -// NetworkURL returns the network url -func (gce *GCECloud) NetworkURL() string { - return gce.networkURL -} - -// SubnetworkURL returns the subnetwork url -func (gce *GCECloud) SubnetworkURL() string { - return gce.subnetworkURL -} - -// Known-useless DNS search path. -var uselessDNSSearchRE = regexp.MustCompile(`^[0-9]+.google.internal.$`) - -// ScrubDNS filters DNS settings for pods. -func (gce *GCECloud) ScrubDNS(nameservers, searches []string) (nsOut, srchOut []string) { - // GCE has too many search paths by default. Filter the ones we know are useless. - for _, s := range searches { - if !uselessDNSSearchRE.MatchString(s) { - srchOut = append(srchOut, s) - } - } - return nameservers, srchOut -} - -// HasClusterID returns true if the cluster has a clusterID -func (gce *GCECloud) HasClusterID() bool { - return true -} - -// Project IDs cannot have a digit for the first characeter. If the id contains a digit, -// then it must be a project number. -func isProjectNumber(idOrNumber string) bool { - _, err := strconv.ParseUint(idOrNumber, 10, 64) - return err == nil -} - -// GCECloud implements cloudprovider.Interface. -var _ cloudprovider.Interface = (*GCECloud)(nil) - -func gceNetworkURL(apiEndpoint, project, network string) string { - if apiEndpoint == "" { - apiEndpoint = gceComputeAPIEndpoint - } - return apiEndpoint + strings.Join([]string{"projects", project, "global", "networks", network}, "/") -} - -func gceSubnetworkURL(apiEndpoint, project, region, subnetwork string) string { - if apiEndpoint == "" { - apiEndpoint = gceComputeAPIEndpoint - } - return apiEndpoint + strings.Join([]string{"projects", project, "regions", region, "subnetworks", subnetwork}, "/") -} - -// getProjectIDInURL parses typical full resource URLS and shorter URLS -// https://www.googleapis.com/compute/v1/projects/myproject/global/networks/mycustom -// projects/myproject/global/networks/mycustom -// All return "myproject" -func getProjectIDInURL(urlStr string) (string, error) { - fields := strings.Split(urlStr, "/") - for i, v := range fields { - if v == "projects" && i < len(fields)-1 { - return fields[i+1], nil - } - } - return "", fmt.Errorf("could not find project field in url: %v", urlStr) -} - -func getNetworkNameViaMetadata() (string, error) { - result, err := metadata.Get("instance/network-interfaces/0/network") - if err != nil { - return "", err - } - parts := strings.Split(result, "/") - if len(parts) != 4 { - return "", fmt.Errorf("unexpected response: %s", result) - } - return parts[3], nil -} - -func getNetworkNameViaAPICall(svc *compute.Service, projectID string) (string, error) { - // TODO: use PageToken to list all not just the first 500 - networkList, err := svc.Networks.List(projectID).Do() - if err != nil { - return "", err - } - - if networkList == nil || len(networkList.Items) <= 0 { - return "", fmt.Errorf("GCE Network List call returned no networks for project %q", projectID) - } - - return networkList.Items[0].Name, nil -} - -// getProjectID returns the project's string ID given a project number or string -func getProjectID(svc *compute.Service, projectNumberOrID string) (string, error) { - proj, err := svc.Projects.Get(projectNumberOrID).Do() - if err != nil { - return "", err - } - - return proj.Name, nil -} - -func getZonesForRegion(svc *compute.Service, projectID, region string) ([]string, error) { - // TODO: use PageToken to list all not just the first 500 - listCall := svc.Zones.List(projectID) - - // Filtering by region doesn't seem to work - // (tested in https://cloud.google.com/compute/docs/reference/latest/zones/list) - // listCall = listCall.Filter("region eq " + region) - - res, err := listCall.Do() - if err != nil { - return nil, fmt.Errorf("unexpected response listing zones: %v", err) - } - zones := []string{} - for _, zone := range res.Items { - regionName := lastComponent(zone.Region) - if regionName == region { - zones = append(zones, zone.Name) - } - } - return zones, nil -} - -func newOauthClient(tokenSource oauth2.TokenSource) (*http.Client, error) { - if tokenSource == nil { - var err error - tokenSource, err = google.DefaultTokenSource( - oauth2.NoContext, - compute.CloudPlatformScope, - compute.ComputeScope) - glog.Infof("Using DefaultTokenSource %#v", tokenSource) - if err != nil { - return nil, err - } - } else { - glog.Infof("Using existing Token Source %#v", tokenSource) - } - - if err := wait.PollImmediate(5*time.Second, 30*time.Second, func() (bool, error) { - if _, err := tokenSource.Token(); err != nil { - glog.Errorf("error fetching initial token: %v", err) - return false, nil - } - return true, nil - }); err != nil { - return nil, err - } - - return oauth2.NewClient(oauth2.NoContext, tokenSource), nil -} - -func (manager *GCEServiceManager) CreateDisk( - name string, - sizeGb int64, - tagsStr string, - diskType string, - zone string) (gceObject, error) { - diskTypeURI, err := manager.getDiskTypeURI( - manager.gce.region /* diskRegion */, singleZone{zone}, diskType) - if err != nil { - return nil, err - } - - if manager.gce.AlphaFeatureGate.Enabled(GCEDiskAlphaFeatureGate) { - diskToCreateAlpha := &computealpha.Disk{ - Name: name, - SizeGb: sizeGb, - Description: tagsStr, - Type: diskTypeURI, - } - - return manager.gce.serviceAlpha.Disks.Insert( - manager.gce.projectID, zone, diskToCreateAlpha).Do() - } - - diskToCreateV1 := &compute.Disk{ - Name: name, - SizeGb: sizeGb, - Description: tagsStr, - Type: diskTypeURI, - } - return manager.gce.service.Disks.Insert( - manager.gce.projectID, zone, diskToCreateV1).Do() -} - -func (manager *GCEServiceManager) CreateRegionalDisk( - name string, - sizeGb int64, - tagsStr string, - diskType string, - replicaZones sets.String) (gceObject, error) { - diskTypeURI, err := manager.getDiskTypeURI( - manager.gce.region /* diskRegion */, multiZone{replicaZones}, diskType) - if err != nil { - return nil, err - } - fullyQualifiedReplicaZones := []string{} - for _, replicaZone := range replicaZones.UnsortedList() { - fullyQualifiedReplicaZones = append( - fullyQualifiedReplicaZones, manager.getReplicaZoneURI(replicaZone)) - } - if manager.gce.AlphaFeatureGate.Enabled(GCEDiskAlphaFeatureGate) { - diskToCreateAlpha := &computealpha.Disk{ - Name: name, - SizeGb: sizeGb, - Description: tagsStr, - Type: diskTypeURI, - ReplicaZones: fullyQualifiedReplicaZones, - } - return manager.gce.serviceAlpha.RegionDisks.Insert( - manager.gce.projectID, manager.gce.region, diskToCreateAlpha).Do() - } - - return nil, fmt.Errorf("The regional PD feature is only available via the GCE Alpha API. Enable \"GCEDiskAlphaAPI\" in the list of \"alpha-features\" in \"gce.conf\" to use the feature.") -} - -func (manager *GCEServiceManager) AttachDisk( - disk *GCEDisk, - readWrite string, - instanceZone string, - instanceName string) (gceObject, error) { - source, err := manager.getDiskSourceURI(disk) - if err != nil { - return nil, err - } - - if manager.gce.AlphaFeatureGate.Enabled(GCEDiskAlphaFeatureGate) { - attachedDiskAlpha := &computealpha.AttachedDisk{ - DeviceName: disk.Name, - Kind: disk.Kind, - Mode: readWrite, - Source: source, - Type: diskTypePersistent, - } - return manager.gce.serviceAlpha.Instances.AttachDisk( - manager.gce.projectID, instanceZone, instanceName, attachedDiskAlpha).Do() - } - - attachedDiskV1 := &compute.AttachedDisk{ - DeviceName: disk.Name, - Kind: disk.Kind, - Mode: readWrite, - Source: source, - Type: disk.Type, - } - return manager.gce.service.Instances.AttachDisk( - manager.gce.projectID, instanceZone, instanceName, attachedDiskV1).Do() -} - -func (manager *GCEServiceManager) DetachDisk( - instanceZone string, - instanceName string, - devicePath string) (gceObject, error) { - if manager.gce.AlphaFeatureGate.Enabled(GCEDiskAlphaFeatureGate) { - manager.gce.serviceAlpha.Instances.DetachDisk( - manager.gce.projectID, instanceZone, instanceName, devicePath).Do() - } - - return manager.gce.service.Instances.DetachDisk( - manager.gce.projectID, instanceZone, instanceName, devicePath).Do() -} - -func (manager *GCEServiceManager) GetDisk( - zone string, - diskName string) (*GCEDisk, error) { - if zone == "" { - return nil, fmt.Errorf("Can not fetch disk %q. Zone is empty.", diskName) - } - - if diskName == "" { - return nil, fmt.Errorf("Can not fetch disk. Zone is specified (%q). But disk name is empty.", zone) - } - - if manager.gce.AlphaFeatureGate.Enabled(GCEDiskAlphaFeatureGate) { - diskAlpha, err := manager.gce.serviceAlpha.Disks.Get( - manager.gce.projectID, zone, diskName).Do() - if err != nil { - return nil, err - } - - var zoneInfo zoneType - if len(diskAlpha.ReplicaZones) > 1 { - zones := sets.NewString() - for _, zoneURI := range diskAlpha.ReplicaZones { - zones.Insert(lastComponent(zoneURI)) - } - zoneInfo = multiZone{zones} - } else { - zoneInfo = singleZone{lastComponent(diskAlpha.Zone)} - if diskAlpha.Zone == "" { - zoneInfo = singleZone{lastComponent(zone)} - } - } - - region := strings.TrimSpace(lastComponent(diskAlpha.Region)) - if region == "" { - region, err = manager.getRegionFromZone(zoneInfo) - if err != nil { - return nil, fmt.Errorf("failed to extract region from zone for %q/%q err=%v", zone, diskName, err) - } - } - - return &GCEDisk{ - ZoneInfo: zoneInfo, - Region: region, - Name: diskAlpha.Name, - Kind: diskAlpha.Kind, - Type: diskAlpha.Type, - }, nil - } - - diskStable, err := manager.gce.service.Disks.Get( - manager.gce.projectID, zone, diskName).Do() - if err != nil { - return nil, err - } - - zoneInfo := singleZone{strings.TrimSpace(lastComponent(diskStable.Zone))} - if zoneInfo.zone == "" { - zoneInfo = singleZone{zone} - } - - region, err := manager.getRegionFromZone(zoneInfo) - if err != nil { - return nil, fmt.Errorf("failed to extract region from zone for %q/%q err=%v", zone, diskName, err) - } - - return &GCEDisk{ - ZoneInfo: zoneInfo, - Region: region, - Name: diskStable.Name, - Kind: diskStable.Kind, - Type: diskStable.Type, - }, nil -} - -func (manager *GCEServiceManager) GetRegionalDisk( - diskName string) (*GCEDisk, error) { - - if manager.gce.AlphaFeatureGate.Enabled(GCEDiskAlphaFeatureGate) { - diskAlpha, err := manager.gce.serviceAlpha.RegionDisks.Get( - manager.gce.projectID, manager.gce.region, diskName).Do() - if err != nil { - return nil, err - } - - zones := sets.NewString() - for _, zoneURI := range diskAlpha.ReplicaZones { - zones.Insert(lastComponent(zoneURI)) - } - - return &GCEDisk{ - ZoneInfo: multiZone{zones}, - Region: lastComponent(diskAlpha.Region), - Name: diskAlpha.Name, - Kind: diskAlpha.Kind, - Type: diskAlpha.Type, - }, nil - } - - return nil, fmt.Errorf("The regional PD feature is only available via the GCE Alpha API. Enable \"GCEDiskAlphaAPI\" in the list of \"alpha-features\" in \"gce.conf\" to use the feature.") -} - -func (manager *GCEServiceManager) DeleteDisk( - zone string, - diskName string) (gceObject, error) { - - if manager.gce.AlphaFeatureGate.Enabled(GCEDiskAlphaFeatureGate) { - return manager.gce.serviceAlpha.Disks.Delete( - manager.gce.projectID, zone, diskName).Do() - } - - return manager.gce.service.Disks.Delete( - manager.gce.projectID, zone, diskName).Do() -} - -func (manager *GCEServiceManager) DeleteRegionalDisk( - diskName string) (gceObject, error) { - if manager.gce.AlphaFeatureGate.Enabled(GCEDiskAlphaFeatureGate) { - return manager.gce.serviceAlpha.RegionDisks.Delete( - manager.gce.projectID, manager.gce.region, diskName).Do() - } - - return nil, fmt.Errorf("DeleteRegionalDisk is a regional PD feature and is only available via the GCE Alpha API. Enable \"GCEDiskAlphaAPI\" in the list of \"alpha-features\" in \"gce.conf\" to use the feature.") -} - -func (manager *GCEServiceManager) WaitForZoneOp( - op gceObject, zone string, mc *metricContext) error { - return manager.gce.waitForZoneOp(op, zone, mc) -} - -func (manager *GCEServiceManager) WaitForRegionalOp( - op gceObject, mc *metricContext) error { - return manager.gce.waitForRegionOp(op, manager.gce.region, mc) -} - -func (manager *GCEServiceManager) getDiskSourceURI(disk *GCEDisk) (string, error) { - getProjectsAPIEndpoint := manager.getProjectsAPIEndpoint() - if manager.gce.AlphaFeatureGate.Enabled(GCEDiskAlphaFeatureGate) { - getProjectsAPIEndpoint = manager.getProjectsAPIEndpointAlpha() - } - - switch zoneInfo := disk.ZoneInfo.(type) { - case singleZone: - if zoneInfo.zone == "" || disk.Region == "" { - // Unexpected, but sanity-check - return "", fmt.Errorf("PD does not have zone/region information: %#v", disk) - } - - return getProjectsAPIEndpoint + fmt.Sprintf( - diskSourceURITemplateSingleZone, - manager.gce.projectID, - zoneInfo.zone, - disk.Name), nil - case multiZone: - if zoneInfo.replicaZones == nil || zoneInfo.replicaZones.Len() <= 0 { - // Unexpected, but sanity-check - return "", fmt.Errorf("PD is regional but does not have any replicaZones specified: %v", disk) - } - return getProjectsAPIEndpoint + fmt.Sprintf( - diskSourceURITemplateRegional, - manager.gce.projectID, - disk.Region, - disk.Name), nil - case nil: - // Unexpected, but sanity-check - return "", fmt.Errorf("PD did not have ZoneInfo: %v", disk) - default: - // Unexpected, but sanity-check - return "", fmt.Errorf("disk.ZoneInfo has unexpected type %T", zoneInfo) - } -} - -func (manager *GCEServiceManager) getDiskTypeURI( - diskRegion string, diskZoneInfo zoneType, diskType string) (string, error) { - getProjectsAPIEndpoint := manager.getProjectsAPIEndpoint() - if manager.gce.AlphaFeatureGate.Enabled(GCEDiskAlphaFeatureGate) { - getProjectsAPIEndpoint = manager.getProjectsAPIEndpointAlpha() - } - - switch zoneInfo := diskZoneInfo.(type) { - case singleZone: - if zoneInfo.zone == "" { - return "", fmt.Errorf("zone is empty: %v", zoneInfo) - } - - return getProjectsAPIEndpoint + fmt.Sprintf( - diskTypeURITemplateSingleZone, - manager.gce.projectID, - zoneInfo.zone, - diskType), nil - case multiZone: - if zoneInfo.replicaZones == nil || zoneInfo.replicaZones.Len() <= 0 { - return "", fmt.Errorf("zoneInfo is regional but does not have any replicaZones specified: %v", zoneInfo) - } - return getProjectsAPIEndpoint + fmt.Sprintf( - diskTypeURITemplateRegional, - manager.gce.projectID, - diskRegion, - diskType), nil - case nil: - return "", fmt.Errorf("zoneInfo nil") - default: - return "", fmt.Errorf("zoneInfo has unexpected type %T", zoneInfo) - } -} - -func (manager *GCEServiceManager) getReplicaZoneURI(zone string) string { - getProjectsAPIEndpoint := manager.getProjectsAPIEndpoint() - if manager.gce.AlphaFeatureGate.Enabled(GCEDiskAlphaFeatureGate) { - getProjectsAPIEndpoint = manager.getProjectsAPIEndpointAlpha() - } - - return getProjectsAPIEndpoint + fmt.Sprintf( - replicaZoneURITemplateSingleZone, - manager.gce.projectID, - zone) -} - -func (manager *GCEServiceManager) getProjectsAPIEndpoint() string { - projectsApiEndpoint := gceComputeAPIEndpoint + "projects/" - if manager.gce.service != nil { - projectsApiEndpoint = manager.gce.service.BasePath - } - - return projectsApiEndpoint -} - -func (manager *GCEServiceManager) getProjectsAPIEndpointAlpha() string { - projectsApiEndpoint := gceComputeAPIEndpointAlpha + "projects/" - if manager.gce.service != nil { - projectsApiEndpoint = manager.gce.serviceAlpha.BasePath - } - - return projectsApiEndpoint -} - -func (manager *GCEServiceManager) getRegionFromZone(zoneInfo zoneType) (string, error) { - var zone string - switch zoneInfo := zoneInfo.(type) { - case singleZone: - if zoneInfo.zone == "" { - // Unexpected, but sanity-check - return "", fmt.Errorf("PD is single zone, but zone is not specified: %#v", zoneInfo) - } - - zone = zoneInfo.zone - case multiZone: - if zoneInfo.replicaZones == nil || zoneInfo.replicaZones.Len() <= 0 { - // Unexpected, but sanity-check - return "", fmt.Errorf("PD is regional but does not have any replicaZones specified: %v", zoneInfo) - } - - zone = zoneInfo.replicaZones.UnsortedList()[0] - case nil: - // Unexpected, but sanity-check - return "", fmt.Errorf("zoneInfo is nil") - default: - // Unexpected, but sanity-check - return "", fmt.Errorf("zoneInfo has unexpected type %T", zoneInfo) - } - - region, err := GetGCERegion(zone) - if err != nil { - glog.Warningf("failed to parse GCE region from zone %q: %v", zone, err) - region = manager.gce.region - } - - return region, nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_address_manager.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_address_manager.go deleted file mode 100644 index 004148f24..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_address_manager.go +++ /dev/null @@ -1,198 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "fmt" - "net/http" - - computebeta "google.golang.org/api/compute/v0.beta" - - "github.com/golang/glog" -) - -type addressManager struct { - logPrefix string - svc CloudAddressService - name string - serviceName string - targetIP string - addressType lbScheme - region string - subnetURL string - tryRelease bool -} - -func newAddressManager(svc CloudAddressService, serviceName, region, subnetURL, name, targetIP string, addressType lbScheme) *addressManager { - return &addressManager{ - svc: svc, - logPrefix: fmt.Sprintf("AddressManager(%q)", name), - region: region, - serviceName: serviceName, - name: name, - targetIP: targetIP, - addressType: addressType, - tryRelease: true, - subnetURL: subnetURL, - } -} - -// HoldAddress will ensure that the IP is reserved with an address - either owned by the controller -// or by a user. If the address is not the addressManager.name, then it's assumed to be a user's address. -// The string returned is the reserved IP address. -func (am *addressManager) HoldAddress() (string, error) { - // HoldAddress starts with retrieving the address that we use for this load balancer (by name). - // Retrieving an address by IP will indicate if the IP is reserved and if reserved by the user - // or the controller, but won't tell us the current state of the controller's IP. The address - // could be reserving another address; therefore, it would need to be deleted. In the normal - // case of using a controller address, retrieving the address by name results in the fewest API - // calls since it indicates whether a Delete is necessary before Reserve. - glog.V(4).Infof("%v: attempting hold of IP %q Type %q", am.logPrefix, am.targetIP, am.addressType) - // Get the address in case it was orphaned earlier - addr, err := am.svc.GetBetaRegionAddress(am.name, am.region) - if err != nil && !isNotFound(err) { - return "", err - } - - if addr != nil { - // If address exists, check if the address had the expected attributes. - validationError := am.validateAddress(addr) - if validationError == nil { - glog.V(4).Infof("%v: address %q already reserves IP %q Type %q. No further action required.", am.logPrefix, addr.Name, addr.Address, addr.AddressType) - return addr.Address, nil - } - - glog.V(2).Infof("%v: deleting existing address because %v", am.logPrefix, validationError) - err := am.svc.DeleteRegionAddress(addr.Name, am.region) - if err != nil { - if isNotFound(err) { - glog.V(4).Infof("%v: address %q was not found. Ignoring.", am.logPrefix, addr.Name) - } else { - return "", err - } - } else { - glog.V(4).Infof("%v: successfully deleted previous address %q", am.logPrefix, addr.Name) - } - } - - return am.ensureAddressReservation() -} - -// ReleaseAddress will release the address if it's owned by the controller. -func (am *addressManager) ReleaseAddress() error { - if !am.tryRelease { - glog.V(4).Infof("%v: not attempting release of address %q.", am.logPrefix, am.targetIP) - return nil - } - - glog.V(4).Infof("%v: releasing address %q named %q", am.logPrefix, am.targetIP, am.name) - // Controller only ever tries to unreserve the address named with the load balancer's name. - err := am.svc.DeleteRegionAddress(am.name, am.region) - if err != nil { - if isNotFound(err) { - glog.Warningf("%v: address %q was not found. Ignoring.", am.logPrefix, am.name) - return nil - } - - return err - } - - glog.V(4).Infof("%v: successfully released IP %q named %q", am.logPrefix, am.targetIP, am.name) - return nil -} - -func (am *addressManager) ensureAddressReservation() (string, error) { - // Try reserving the IP with controller-owned address name - // If am.targetIP is an empty string, a new IP will be created. - newAddr := &computebeta.Address{ - Name: am.name, - Description: fmt.Sprintf(`{"kubernetes.io/service-name":"%s"}`, am.serviceName), - Address: am.targetIP, - AddressType: string(am.addressType), - Subnetwork: am.subnetURL, - } - - reserveErr := am.svc.ReserveBetaRegionAddress(newAddr, am.region) - if reserveErr == nil { - if newAddr.Address != "" { - glog.V(4).Infof("%v: successfully reserved IP %q with name %q", am.logPrefix, newAddr.Address, newAddr.Name) - return newAddr.Address, nil - } - - addr, err := am.svc.GetRegionAddress(newAddr.Name, am.region) - if err != nil { - return "", err - } - - glog.V(4).Infof("%v: successfully created address %q which reserved IP %q", am.logPrefix, addr.Name, addr.Address) - return addr.Address, nil - } else if !isHTTPErrorCode(reserveErr, http.StatusConflict) && !isHTTPErrorCode(reserveErr, http.StatusBadRequest) { - // If the IP is already reserved: - // by an internal address: a StatusConflict is returned - // by an external address: a BadRequest is returned - return "", reserveErr - } - - // If the target IP was empty, we cannot try to find which IP caused a conflict. - // If the name was already used, then the next sync will attempt deletion of that address. - if am.targetIP == "" { - return "", fmt.Errorf("failed to reserve address %q with no specific IP, err: %v", am.name, reserveErr) - } - - // Reserving the address failed due to a conflict or bad request. The address manager just checked that no address - // exists with the name, so it may belong to the user. - addr, err := am.svc.GetBetaRegionAddressByIP(am.region, am.targetIP) - if err != nil { - return "", fmt.Errorf("failed to get address by IP %q after reservation attempt, err: %q, reservation err: %q", am.targetIP, err, reserveErr) - } - - // Check that the address attributes are as required. - if err := am.validateAddress(addr); err != nil { - return "", err - } - - if am.isManagedAddress(addr) { - // The address with this name is checked at the beginning of 'HoldAddress()', but for some reason - // it was re-created by this point. May be possible that two controllers are running. - glog.Warning("%v: address %q unexpectedly existed with IP %q.", am.logPrefix, addr.Name, am.targetIP) - } else { - // If the retrieved address is not named with the loadbalancer name, then the controller does not own it, but will allow use of it. - glog.V(4).Infof("%v: address %q was already reserved with name: %q, description: %q", am.logPrefix, am.targetIP, addr.Name, addr.Description) - am.tryRelease = false - } - - return addr.Address, nil -} - -func (am *addressManager) validateAddress(addr *computebeta.Address) error { - if am.targetIP != "" && am.targetIP != addr.Address { - return fmt.Errorf("address %q does not have the expected IP %q, actual: %q", addr.Name, am.targetIP, addr.Address) - } - if addr.AddressType != string(am.addressType) { - return fmt.Errorf("address %q does not have the expected address type %q, actual: %q", addr.Name, am.addressType, addr.AddressType) - } - - return nil -} - -func (am *addressManager) isManagedAddress(addr *computebeta.Address) bool { - return addr.Name == am.name -} - -func ensureAddressDeleted(svc CloudAddressService, name, region string) error { - return ignoreNotFound(svc.DeleteRegionAddress(name, region)) -} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_addresses.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_addresses.go deleted file mode 100644 index 254c08a3b..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_addresses.go +++ /dev/null @@ -1,190 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "fmt" - - "github.com/golang/glog" - - computealpha "google.golang.org/api/compute/v0.alpha" - computebeta "google.golang.org/api/compute/v0.beta" - compute "google.golang.org/api/compute/v1" -) - -func newAddressMetricContext(request, region string) *metricContext { - return newAddressMetricContextWithVersion(request, region, computeV1Version) -} - -func newAddressMetricContextWithVersion(request, region, version string) *metricContext { - return newGenericMetricContext("address", request, region, unusedMetricLabel, version) -} - -// ReserveGlobalAddress creates a global address. -// Caller is allocated a random IP if they do not specify an ipAddress. If an -// ipAddress is specified, it must belong to the current project, eg: an -// ephemeral IP associated with a global forwarding rule. -func (gce *GCECloud) ReserveGlobalAddress(addr *compute.Address) error { - mc := newAddressMetricContext("reserve", "") - op, err := gce.service.GlobalAddresses.Insert(gce.projectID, addr).Do() - if err != nil { - return mc.Observe(err) - } - return gce.waitForGlobalOp(op, mc) -} - -// DeleteGlobalAddress deletes a global address by name. -func (gce *GCECloud) DeleteGlobalAddress(name string) error { - mc := newAddressMetricContext("delete", "") - op, err := gce.service.GlobalAddresses.Delete(gce.projectID, name).Do() - if err != nil { - return mc.Observe(err) - } - return gce.waitForGlobalOp(op, mc) -} - -// GetGlobalAddress returns the global address by name. -func (gce *GCECloud) GetGlobalAddress(name string) (*compute.Address, error) { - mc := newAddressMetricContext("get", "") - v, err := gce.service.GlobalAddresses.Get(gce.projectID, name).Do() - return v, mc.Observe(err) -} - -// ReserveRegionAddress creates a region address -func (gce *GCECloud) ReserveRegionAddress(addr *compute.Address, region string) error { - mc := newAddressMetricContext("reserve", region) - op, err := gce.service.Addresses.Insert(gce.projectID, region, addr).Do() - if err != nil { - return mc.Observe(err) - } - return gce.waitForRegionOp(op, region, mc) -} - -// ReserveAlphaRegionAddress creates an Alpha, regional address. -func (gce *GCECloud) ReserveAlphaRegionAddress(addr *computealpha.Address, region string) error { - mc := newAddressMetricContextWithVersion("reserve", region, computeAlphaVersion) - op, err := gce.serviceAlpha.Addresses.Insert(gce.projectID, region, addr).Do() - if err != nil { - return mc.Observe(err) - } - return gce.waitForRegionOp(op, region, mc) -} - -// ReserveBetaRegionAddress creates a beta region address -func (gce *GCECloud) ReserveBetaRegionAddress(addr *computebeta.Address, region string) error { - mc := newAddressMetricContextWithVersion("reserve", region, computeBetaVersion) - op, err := gce.serviceBeta.Addresses.Insert(gce.projectID, region, addr).Do() - if err != nil { - return mc.Observe(err) - } - return gce.waitForRegionOp(op, region, mc) -} - -// DeleteRegionAddress deletes a region address by name. -func (gce *GCECloud) DeleteRegionAddress(name, region string) error { - mc := newAddressMetricContext("delete", region) - op, err := gce.service.Addresses.Delete(gce.projectID, region, name).Do() - if err != nil { - return mc.Observe(err) - } - return gce.waitForRegionOp(op, region, mc) -} - -// GetRegionAddress returns the region address by name -func (gce *GCECloud) GetRegionAddress(name, region string) (*compute.Address, error) { - mc := newAddressMetricContext("get", region) - v, err := gce.service.Addresses.Get(gce.projectID, region, name).Do() - return v, mc.Observe(err) -} - -// GetAlphaRegionAddress returns the Alpha, regional address by name. -func (gce *GCECloud) GetAlphaRegionAddress(name, region string) (*computealpha.Address, error) { - mc := newAddressMetricContextWithVersion("get", region, computeAlphaVersion) - v, err := gce.serviceAlpha.Addresses.Get(gce.projectID, region, name).Do() - return v, mc.Observe(err) -} - -// GetBetaRegionAddress returns the beta region address by name -func (gce *GCECloud) GetBetaRegionAddress(name, region string) (*computebeta.Address, error) { - mc := newAddressMetricContextWithVersion("get", region, computeBetaVersion) - v, err := gce.serviceBeta.Addresses.Get(gce.projectID, region, name).Do() - return v, mc.Observe(err) -} - -// GetRegionAddressByIP returns the regional address matching the given IP address. -func (gce *GCECloud) GetRegionAddressByIP(region, ipAddress string) (*compute.Address, error) { - mc := newAddressMetricContext("list", region) - addrs, err := gce.service.Addresses.List(gce.projectID, region).Filter("address eq " + ipAddress).Do() - // Record the metrics for the call. - mc.Observe(err) - if err != nil { - return nil, err - } - - if len(addrs.Items) > 1 { - // We don't expect more than one match. - addrsToPrint := []compute.Address{} - for _, addr := range addrs.Items { - addrsToPrint = append(addrsToPrint, *addr) - } - glog.Errorf("More than one addresses matching the IP %q: %+v", ipAddress, addrsToPrint) - } - for _, addr := range addrs.Items { - if addr.Address == ipAddress { - return addr, nil - } - } - return nil, makeGoogleAPINotFoundError(fmt.Sprintf("Address with IP %q was not found in region %q", ipAddress, region)) -} - -// GetBetaRegionAddressByIP returns the beta regional address matching the given IP address. -func (gce *GCECloud) GetBetaRegionAddressByIP(region, ipAddress string) (*computebeta.Address, error) { - mc := newAddressMetricContext("list", region) - addrs, err := gce.serviceBeta.Addresses.List(gce.projectID, region).Filter("address eq " + ipAddress).Do() - // Record the metrics for the call. - mc.Observe(err) - if err != nil { - return nil, err - } - - if len(addrs.Items) > 1 { - // We don't expect more than one match. - addrsToPrint := []computebeta.Address{} - for _, addr := range addrs.Items { - addrsToPrint = append(addrsToPrint, *addr) - } - glog.Errorf("More than one addresses matching the IP %q: %+v", ipAddress, addrsToPrint) - } - for _, addr := range addrs.Items { - if addr.Address == ipAddress { - return addr, nil - } - } - return nil, makeGoogleAPINotFoundError(fmt.Sprintf("Address with IP %q was not found in region %q", ipAddress, region)) -} - -// TODO(#51665): retire this function once Network Tiers becomes Beta in GCP. -func (gce *GCECloud) getNetworkTierFromAddress(name, region string) (string, error) { - if !gce.AlphaFeatureGate.Enabled(AlphaFeatureNetworkTiers) { - return NetworkTierDefault.ToGCEValue(), nil - } - addr, err := gce.GetAlphaRegionAddress(name, region) - if err != nil { - return handleAlphaNetworkTierGetError(err) - } - return addr.NetworkTier, nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_addresses_fakes.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_addresses_fakes.go deleted file mode 100644 index 1fd8e91a8..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_addresses_fakes.go +++ /dev/null @@ -1,237 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "bytes" - "encoding/json" - "fmt" - "net/http" - - computealpha "google.golang.org/api/compute/v0.alpha" - computebeta "google.golang.org/api/compute/v0.beta" - compute "google.golang.org/api/compute/v1" -) - -// test - -type FakeCloudAddressService struct { - count int - // reservedAddrs tracks usage of IP addresses - // Key is the IP address as a string - reservedAddrs map[string]bool - // addrsByRegionAndName - // Outer key is for region string; inner key is for address name. - addrsByRegionAndName map[string]map[string]*computealpha.Address -} - -// FakeCloudAddressService Implements CloudAddressService -var _ CloudAddressService = &FakeCloudAddressService{} - -func NewFakeCloudAddressService() *FakeCloudAddressService { - return &FakeCloudAddressService{ - reservedAddrs: make(map[string]bool), - addrsByRegionAndName: make(map[string]map[string]*computealpha.Address), - } -} - -// SetRegionalAddresses sets the addresses of ther region. This is used for -// setting the test environment. -func (cas *FakeCloudAddressService) SetRegionalAddresses(region string, addrs []*computealpha.Address) { - // Reset addresses in the region. - cas.addrsByRegionAndName[region] = make(map[string]*computealpha.Address) - - for _, addr := range addrs { - cas.reservedAddrs[addr.Address] = true - cas.addrsByRegionAndName[region][addr.Name] = addr - } -} - -func (cas *FakeCloudAddressService) ReserveAlphaRegionAddress(addr *computealpha.Address, region string) error { - if addr.Address == "" { - addr.Address = fmt.Sprintf("1.2.3.%d", cas.count) - cas.count++ - } - - if addr.AddressType == "" { - addr.AddressType = string(schemeExternal) - } - - if cas.reservedAddrs[addr.Address] { - msg := "IP in use" - // When the IP is already in use, this call returns an error code based - // on the type (internal vs external) of the address. This is to be - // consistent with actual GCE API. - switch lbScheme(addr.AddressType) { - case schemeExternal: - return makeGoogleAPIError(http.StatusBadRequest, msg) - default: - return makeGoogleAPIError(http.StatusConflict, msg) - } - } - - if _, exists := cas.addrsByRegionAndName[region]; !exists { - cas.addrsByRegionAndName[region] = make(map[string]*computealpha.Address) - } - - if _, exists := cas.addrsByRegionAndName[region][addr.Name]; exists { - return makeGoogleAPIError(http.StatusConflict, "name in use") - } - - cas.addrsByRegionAndName[region][addr.Name] = addr - cas.reservedAddrs[addr.Address] = true - return nil -} - -func (cas *FakeCloudAddressService) ReserveBetaRegionAddress(addr *computebeta.Address, region string) error { - alphaAddr := convertToAlphaAddress(addr) - return cas.ReserveAlphaRegionAddress(alphaAddr, region) -} - -func (cas *FakeCloudAddressService) ReserveRegionAddress(addr *compute.Address, region string) error { - alphaAddr := convertToAlphaAddress(addr) - return cas.ReserveAlphaRegionAddress(alphaAddr, region) -} - -func (cas *FakeCloudAddressService) GetAlphaRegionAddress(name, region string) (*computealpha.Address, error) { - if _, exists := cas.addrsByRegionAndName[region]; !exists { - return nil, makeGoogleAPINotFoundError("") - } - - if addr, exists := cas.addrsByRegionAndName[region][name]; !exists { - return nil, makeGoogleAPINotFoundError("") - } else { - return addr, nil - } -} - -func (cas *FakeCloudAddressService) GetBetaRegionAddress(name, region string) (*computebeta.Address, error) { - addr, err := cas.GetAlphaRegionAddress(name, region) - if addr != nil { - return convertToBetaAddress(addr), err - } - return nil, err -} - -func (cas *FakeCloudAddressService) GetRegionAddress(name, region string) (*compute.Address, error) { - addr, err := cas.GetAlphaRegionAddress(name, region) - if addr != nil { - return convertToV1Address(addr), err - } - return nil, err -} - -func (cas *FakeCloudAddressService) DeleteRegionAddress(name, region string) error { - if _, exists := cas.addrsByRegionAndName[region]; !exists { - return makeGoogleAPINotFoundError("") - } - - addr, exists := cas.addrsByRegionAndName[region][name] - if !exists { - return makeGoogleAPINotFoundError("") - } - - delete(cas.reservedAddrs, addr.Address) - delete(cas.addrsByRegionAndName[region], name) - return nil -} - -func (cas *FakeCloudAddressService) GetAlphaRegionAddressByIP(region, ipAddress string) (*computealpha.Address, error) { - if _, exists := cas.addrsByRegionAndName[region]; !exists { - return nil, makeGoogleAPINotFoundError("") - } - - for _, addr := range cas.addrsByRegionAndName[region] { - if addr.Address == ipAddress { - return addr, nil - } - } - return nil, makeGoogleAPINotFoundError("") -} - -func (cas *FakeCloudAddressService) GetBetaRegionAddressByIP(name, region string) (*computebeta.Address, error) { - addr, err := cas.GetAlphaRegionAddressByIP(name, region) - if addr != nil { - return convertToBetaAddress(addr), nil - } - return nil, err -} - -func (cas *FakeCloudAddressService) GetRegionAddressByIP(name, region string) (*compute.Address, error) { - addr, err := cas.GetAlphaRegionAddressByIP(name, region) - if addr != nil { - return convertToV1Address(addr), nil - } - return nil, err -} - -func (cas *FakeCloudAddressService) getNetworkTierFromAddress(name, region string) (string, error) { - addr, err := cas.GetAlphaRegionAddress(name, region) - if err != nil { - return "", err - } - return addr.NetworkTier, nil -} - -func convertToV1Address(object gceObject) *compute.Address { - enc, err := object.MarshalJSON() - if err != nil { - panic(fmt.Sprintf("Failed to encode to json: %v", err)) - } - var addr compute.Address - if err := json.Unmarshal(enc, &addr); err != nil { - panic(fmt.Sprintf("Failed to convert GCE apiObject %v to v1 address: %v", object, err)) - } - return &addr -} - -func convertToAlphaAddress(object gceObject) *computealpha.Address { - enc, err := object.MarshalJSON() - if err != nil { - panic(fmt.Sprintf("Failed to encode to json: %v", err)) - } - var addr computealpha.Address - if err := json.Unmarshal(enc, &addr); err != nil { - panic(fmt.Sprintf("Failed to convert GCE apiObject %v to alpha address: %v", object, err)) - } - // Set the default values for the Alpha fields. - addr.NetworkTier = NetworkTierDefault.ToGCEValue() - return &addr -} - -func convertToBetaAddress(object gceObject) *computebeta.Address { - enc, err := object.MarshalJSON() - if err != nil { - panic(fmt.Sprintf("Failed to encode to json: %v", err)) - } - var addr computebeta.Address - if err := json.Unmarshal(enc, &addr); err != nil { - panic(fmt.Sprintf("Failed to convert GCE apiObject %v to beta address: %v", object, err)) - } - return &addr -} - -func (cas *FakeCloudAddressService) String() string { - var b bytes.Buffer - for region, regAddresses := range cas.addrsByRegionAndName { - b.WriteString(fmt.Sprintf("%v:\n", region)) - for name, addr := range regAddresses { - b.WriteString(fmt.Sprintf(" %v: %v\n", name, addr.Address)) - } - } - return b.String() -} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_alpha.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_alpha.go deleted file mode 100644 index 292504f7d..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_alpha.go +++ /dev/null @@ -1,60 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "fmt" - - utilerrors "k8s.io/apimachinery/pkg/util/errors" -) - -const ( - // alpha: v1.8 (for Services) - // - // Allows Services backed by a GCP load balancer to choose what network - // tier to use. Currently supports "Standard" and "Premium" (default). - AlphaFeatureNetworkTiers = "NetworkTiers" - - GCEDiskAlphaFeatureGate = "DiskAlphaAPI" -) - -// All known alpha features -var knownAlphaFeatures = map[string]bool{ - AlphaFeatureNetworkTiers: true, - GCEDiskAlphaFeatureGate: true, -} - -type AlphaFeatureGate struct { - features map[string]bool -} - -func (af *AlphaFeatureGate) Enabled(key string) bool { - return af.features[key] -} - -func NewAlphaFeatureGate(features []string) (*AlphaFeatureGate, error) { - errList := []error{} - featureMap := make(map[string]bool) - for _, name := range features { - if _, ok := knownAlphaFeatures[name]; !ok { - errList = append(errList, fmt.Errorf("alpha feature %q is not supported.", name)) - } else { - featureMap[name] = true - } - } - return &AlphaFeatureGate{featureMap}, utilerrors.NewAggregate(errList) -} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_annotations.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_annotations.go deleted file mode 100644 index 37671aeb2..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_annotations.go +++ /dev/null @@ -1,134 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "fmt" - "strings" - - "github.com/golang/glog" - - "k8s.io/api/core/v1" -) - -type LoadBalancerType string -type NetworkTier string - -const ( - // ServiceAnnotationLoadBalancerType is annotated on a service with type LoadBalancer - // dictates what specific kind of GCP LB should be assembled. - // Currently, only "internal" is supported. - ServiceAnnotationLoadBalancerType = "cloud.google.com/load-balancer-type" - - LBTypeInternal LoadBalancerType = "Internal" - // Deprecating the lowercase spelling of Internal. - deprecatedTypeInternalLowerCase LoadBalancerType = "internal" - - // ServiceAnnotationInternalBackendShare is annotated on a service with "true" when users - // want to share GCP Backend Services for a set of internal load balancers. - // ALPHA feature - this may be removed in a future release. - ServiceAnnotationILBBackendShare = "alpha.cloud.google.com/load-balancer-backend-share" - // This annotation did not correctly specify "alpha", so both annotations will be checked. - deprecatedServiceAnnotationILBBackendShare = "cloud.google.com/load-balancer-backend-share" - - // NetworkTierAnnotationKey is annotated on a Service object to indicate which - // network tier a GCP LB should use. The valid values are "Standard" and - // "Premium" (default). - NetworkTierAnnotationKey = "cloud.google.com/network-tier" - NetworkTierAnnotationStandard = "Standard" - NetworkTierAnnotationPremium = "Premium" - - NetworkTierStandard NetworkTier = NetworkTierAnnotationStandard - NetworkTierPremium NetworkTier = NetworkTierAnnotationPremium - NetworkTierDefault NetworkTier = NetworkTierPremium -) - -// GetLoadBalancerAnnotationType returns the type of GCP load balancer which should be assembled. -func GetLoadBalancerAnnotationType(service *v1.Service) (LoadBalancerType, bool) { - v := LoadBalancerType("") - if service.Spec.Type != v1.ServiceTypeLoadBalancer { - return v, false - } - - l, ok := service.Annotations[ServiceAnnotationLoadBalancerType] - v = LoadBalancerType(l) - if !ok { - return v, false - } - - switch v { - case LBTypeInternal, deprecatedTypeInternalLowerCase: - return LBTypeInternal, true - default: - return v, false - } -} - -// GetLoadBalancerAnnotationBackendShare returns whether this service's backend service should be -// shared with other load balancers. Health checks and the healthcheck firewall will be shared regardless. -func GetLoadBalancerAnnotationBackendShare(service *v1.Service) bool { - if l, exists := service.Annotations[ServiceAnnotationILBBackendShare]; exists && l == "true" { - return true - } - - // Check for deprecated annotation key - if l, exists := service.Annotations[deprecatedServiceAnnotationILBBackendShare]; exists && l == "true" { - glog.Warningf("Annotation %q is deprecated and replaced with an alpha-specific key: %q", deprecatedServiceAnnotationILBBackendShare, ServiceAnnotationILBBackendShare) - return true - } - - return false -} - -// GetServiceNetworkTier returns the network tier of GCP load balancer -// which should be assembled, and an error if the specified tier is not -// supported. -func GetServiceNetworkTier(service *v1.Service) (NetworkTier, error) { - l, ok := service.Annotations[NetworkTierAnnotationKey] - if !ok { - return NetworkTierDefault, nil - } - - v := NetworkTier(l) - switch v { - case NetworkTierStandard: - fallthrough - case NetworkTierPremium: - return v, nil - default: - return NetworkTierDefault, fmt.Errorf("unsupported network tier: %q", v) - } -} - -// ToGCEValue converts NetworkTier to a string that we can populate the -// NetworkTier field of GCE objects. -func (n NetworkTier) ToGCEValue() string { - return strings.ToUpper(string(n)) -} - -// NetworkTierGCEValueToType converts the value of the NetworkTier field of a -// GCE object to the NetworkTier type. -func NetworkTierGCEValueToType(s string) NetworkTier { - switch s { - case "STANDARD": - return NetworkTierStandard - case "PREMIUM": - return NetworkTierPremium - default: - return NetworkTier(s) - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_backendservice.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_backendservice.go deleted file mode 100644 index 7bf3d73e0..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_backendservice.go +++ /dev/null @@ -1,149 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "net/http" - - compute "google.golang.org/api/compute/v1" -) - -func newBackendServiceMetricContext(request, region string) *metricContext { - return newGenericMetricContext("backendservice", request, region, unusedMetricLabel, computeV1Version) -} - -// GetGlobalBackendService retrieves a backend by name. -func (gce *GCECloud) GetGlobalBackendService(name string) (*compute.BackendService, error) { - mc := newBackendServiceMetricContext("get", "") - v, err := gce.service.BackendServices.Get(gce.projectID, name).Do() - return v, mc.Observe(err) -} - -// UpdateGlobalBackendService applies the given BackendService as an update to an existing service. -func (gce *GCECloud) UpdateGlobalBackendService(bg *compute.BackendService) error { - mc := newBackendServiceMetricContext("update", "") - op, err := gce.service.BackendServices.Update(gce.projectID, bg.Name, bg).Do() - if err != nil { - return mc.Observe(err) - } - - return gce.waitForGlobalOp(op, mc) -} - -// DeleteGlobalBackendService deletes the given BackendService by name. -func (gce *GCECloud) DeleteGlobalBackendService(name string) error { - mc := newBackendServiceMetricContext("delete", "") - op, err := gce.service.BackendServices.Delete(gce.projectID, name).Do() - if err != nil { - if isHTTPErrorCode(err, http.StatusNotFound) { - return nil - } - return mc.Observe(err) - } - - return gce.waitForGlobalOp(op, mc) -} - -// CreateGlobalBackendService creates the given BackendService. -func (gce *GCECloud) CreateGlobalBackendService(bg *compute.BackendService) error { - mc := newBackendServiceMetricContext("create", "") - op, err := gce.service.BackendServices.Insert(gce.projectID, bg).Do() - if err != nil { - return mc.Observe(err) - } - - return gce.waitForGlobalOp(op, mc) -} - -// ListGlobalBackendServices lists all backend services in the project. -func (gce *GCECloud) ListGlobalBackendServices() (*compute.BackendServiceList, error) { - mc := newBackendServiceMetricContext("list", "") - // TODO: use PageToken to list all not just the first 500 - v, err := gce.service.BackendServices.List(gce.projectID).Do() - return v, mc.Observe(err) -} - -// GetGlobalBackendServiceHealth returns the health of the BackendService identified by the given -// name, in the given instanceGroup. The instanceGroupLink is the fully -// qualified self link of an instance group. -func (gce *GCECloud) GetGlobalBackendServiceHealth(name string, instanceGroupLink string) (*compute.BackendServiceGroupHealth, error) { - mc := newBackendServiceMetricContext("get_health", "") - groupRef := &compute.ResourceGroupReference{Group: instanceGroupLink} - v, err := gce.service.BackendServices.GetHealth(gce.projectID, name, groupRef).Do() - return v, mc.Observe(err) -} - -// GetRegionBackendService retrieves a backend by name. -func (gce *GCECloud) GetRegionBackendService(name, region string) (*compute.BackendService, error) { - mc := newBackendServiceMetricContext("get", region) - v, err := gce.service.RegionBackendServices.Get(gce.projectID, region, name).Do() - return v, mc.Observe(err) -} - -// UpdateRegionBackendService applies the given BackendService as an update to an existing service. -func (gce *GCECloud) UpdateRegionBackendService(bg *compute.BackendService, region string) error { - mc := newBackendServiceMetricContext("update", region) - op, err := gce.service.RegionBackendServices.Update(gce.projectID, region, bg.Name, bg).Do() - if err != nil { - return mc.Observe(err) - } - - return gce.waitForRegionOp(op, region, mc) -} - -// DeleteRegionBackendService deletes the given BackendService by name. -func (gce *GCECloud) DeleteRegionBackendService(name, region string) error { - mc := newBackendServiceMetricContext("delete", region) - op, err := gce.service.RegionBackendServices.Delete(gce.projectID, region, name).Do() - if err != nil { - if isHTTPErrorCode(err, http.StatusNotFound) { - return nil - } - return mc.Observe(err) - } - - return gce.waitForRegionOp(op, region, mc) -} - -// CreateRegionBackendService creates the given BackendService. -func (gce *GCECloud) CreateRegionBackendService(bg *compute.BackendService, region string) error { - mc := newBackendServiceMetricContext("create", region) - op, err := gce.service.RegionBackendServices.Insert(gce.projectID, region, bg).Do() - if err != nil { - return mc.Observe(err) - } - - return gce.waitForRegionOp(op, region, mc) -} - -// ListRegionBackendServices lists all backend services in the project. -func (gce *GCECloud) ListRegionBackendServices(region string) (*compute.BackendServiceList, error) { - mc := newBackendServiceMetricContext("list", region) - // TODO: use PageToken to list all not just the first 500 - v, err := gce.service.RegionBackendServices.List(gce.projectID, region).Do() - return v, mc.Observe(err) -} - -// GetRegionalBackendServiceHealth returns the health of the BackendService identified by the given -// name, in the given instanceGroup. The instanceGroupLink is the fully -// qualified self link of an instance group. -func (gce *GCECloud) GetRegionalBackendServiceHealth(name, region string, instanceGroupLink string) (*compute.BackendServiceGroupHealth, error) { - mc := newBackendServiceMetricContext("get_health", region) - groupRef := &compute.ResourceGroupReference{Group: instanceGroupLink} - v, err := gce.service.RegionBackendServices.GetHealth(gce.projectID, region, name, groupRef).Do() - return v, mc.Observe(err) -} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_cert.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_cert.go deleted file mode 100644 index e981fe717..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_cert.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "net/http" - - compute "google.golang.org/api/compute/v1" -) - -func newCertMetricContext(request string) *metricContext { - return newGenericMetricContext("cert", request, unusedMetricLabel, unusedMetricLabel, computeV1Version) -} - -// GetSslCertificate returns the SslCertificate by name. -func (gce *GCECloud) GetSslCertificate(name string) (*compute.SslCertificate, error) { - mc := newCertMetricContext("get") - v, err := gce.service.SslCertificates.Get(gce.projectID, name).Do() - return v, mc.Observe(err) -} - -// CreateSslCertificate creates and returns a SslCertificate. -func (gce *GCECloud) CreateSslCertificate(sslCerts *compute.SslCertificate) (*compute.SslCertificate, error) { - mc := newCertMetricContext("create") - op, err := gce.service.SslCertificates.Insert(gce.projectID, sslCerts).Do() - - if err != nil { - return nil, mc.Observe(err) - } - - if err = gce.waitForGlobalOp(op, mc); err != nil { - return nil, mc.Observe(err) - } - - return gce.GetSslCertificate(sslCerts.Name) -} - -// DeleteSslCertificate deletes the SslCertificate by name. -func (gce *GCECloud) DeleteSslCertificate(name string) error { - mc := newCertMetricContext("delete") - op, err := gce.service.SslCertificates.Delete(gce.projectID, name).Do() - - if err != nil { - if isHTTPErrorCode(err, http.StatusNotFound) { - return nil - } - - return mc.Observe(err) - } - - return gce.waitForGlobalOp(op, mc) -} - -// ListSslCertificates lists all SslCertificates in the project. -func (gce *GCECloud) ListSslCertificates() (*compute.SslCertificateList, error) { - mc := newCertMetricContext("list") - // TODO: use PageToken to list all not just the first 500 - v, err := gce.service.SslCertificates.List(gce.projectID).Do() - return v, mc.Observe(err) -} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_clusterid.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_clusterid.go deleted file mode 100644 index 6f1b667c8..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_clusterid.go +++ /dev/null @@ -1,258 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "crypto/rand" - "encoding/hex" - "errors" - "fmt" - "reflect" - "sync" - "time" - - "github.com/golang/glog" - "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/fields" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/watch" - clientset "k8s.io/client-go/kubernetes" - "k8s.io/client-go/tools/cache" -) - -const ( - // Key used to persist UIDs to configmaps. - UIDConfigMapName = "ingress-uid" - // Namespace which contains the above config map - UIDNamespace = metav1.NamespaceSystem - // Data keys for the specific ids - UIDCluster = "uid" - UIDProvider = "provider-uid" - UIDLengthBytes = 8 - // Frequency of the updateFunc event handler being called - // This does not actually query the apiserver for current state - the local cache value is used. - updateFuncFrequency = 10 * time.Minute -) - -type ClusterID struct { - idLock sync.RWMutex - client clientset.Interface - cfgMapKey string - store cache.Store - providerID *string - clusterID *string -} - -// Continually watches for changes to the cluster id config map -func (gce *GCECloud) watchClusterID() { - gce.ClusterID = ClusterID{ - cfgMapKey: fmt.Sprintf("%v/%v", UIDNamespace, UIDConfigMapName), - client: gce.client, - } - - mapEventHandler := cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { - m, ok := obj.(*v1.ConfigMap) - if !ok || m == nil { - glog.Errorf("Expected v1.ConfigMap, item=%+v, typeIsOk=%v", obj, ok) - return - } - if m.Namespace != UIDNamespace || - m.Name != UIDConfigMapName { - return - } - - glog.V(4).Infof("Observed new configmap for clusteriD: %v, %v; setting local values", m.Name, m.Data) - gce.ClusterID.update(m) - }, - UpdateFunc: func(old, cur interface{}) { - m, ok := cur.(*v1.ConfigMap) - if !ok || m == nil { - glog.Errorf("Expected v1.ConfigMap, item=%+v, typeIsOk=%v", cur, ok) - return - } - - if m.Namespace != UIDNamespace || - m.Name != UIDConfigMapName { - return - } - - if reflect.DeepEqual(old, cur) { - return - } - - glog.V(4).Infof("Observed updated configmap for clusteriD %v, %v; setting local values", m.Name, m.Data) - gce.ClusterID.update(m) - }, - } - - listerWatcher := cache.NewListWatchFromClient(gce.ClusterID.client.Core().RESTClient(), "configmaps", UIDNamespace, fields.Everything()) - var controller cache.Controller - gce.ClusterID.store, controller = cache.NewInformer(newSingleObjectListerWatcher(listerWatcher, UIDConfigMapName), &v1.ConfigMap{}, updateFuncFrequency, mapEventHandler) - - controller.Run(nil) -} - -// GetID returns the id which is unique to this cluster -// if federated, return the provider id (unique to the cluster) -// if not federated, return the cluster id -func (ci *ClusterID) GetID() (string, error) { - if err := ci.getOrInitialize(); err != nil { - return "", err - } - - ci.idLock.RLock() - defer ci.idLock.RUnlock() - if ci.clusterID == nil { - return "", errors.New("Could not retrieve cluster id") - } - - // If provider ID is set, (Federation is enabled) use this field - if ci.providerID != nil { - return *ci.providerID, nil - } - - // providerID is not set, use the cluster id - return *ci.clusterID, nil -} - -// GetFederationId returns the id which could represent the entire Federation -// or just the cluster if not federated. -func (ci *ClusterID) GetFederationId() (string, bool, error) { - if err := ci.getOrInitialize(); err != nil { - return "", false, err - } - - ci.idLock.RLock() - defer ci.idLock.RUnlock() - if ci.clusterID == nil { - return "", false, errors.New("Could not retrieve cluster id") - } - - // If provider ID is not set, return false - if ci.providerID == nil || *ci.clusterID == *ci.providerID { - return "", false, nil - } - - return *ci.clusterID, true, nil -} - -// getOrInitialize either grabs the configmaps current value or defines the value -// and sets the configmap. This is for the case of the user calling GetClusterID() -// before the watch has begun. -func (ci *ClusterID) getOrInitialize() error { - if ci.store == nil { - return errors.New("GCECloud.ClusterID is not ready. Call Initialize() before using.") - } - - if ci.clusterID != nil { - return nil - } - - exists, err := ci.getConfigMap() - if err != nil { - return err - } else if exists { - return nil - } - - // The configmap does not exist - let's try creating one. - newId, err := makeUID() - if err != nil { - return err - } - - glog.V(4).Infof("Creating clusteriD: %v", newId) - cfg := &v1.ConfigMap{ - ObjectMeta: metav1.ObjectMeta{ - Name: UIDConfigMapName, - Namespace: UIDNamespace, - }, - } - cfg.Data = map[string]string{ - UIDCluster: newId, - UIDProvider: newId, - } - - if _, err := ci.client.Core().ConfigMaps(UIDNamespace).Create(cfg); err != nil { - glog.Errorf("GCE cloud provider failed to create %v config map to store cluster id: %v", ci.cfgMapKey, err) - return err - } - - glog.V(2).Infof("Created a config map containing clusteriD: %v", newId) - ci.update(cfg) - return nil -} - -func (ci *ClusterID) getConfigMap() (bool, error) { - item, exists, err := ci.store.GetByKey(ci.cfgMapKey) - if err != nil { - return false, err - } - if !exists { - return false, nil - } - - m, ok := item.(*v1.ConfigMap) - if !ok || m == nil { - err = fmt.Errorf("Expected v1.ConfigMap, item=%+v, typeIsOk=%v", item, ok) - glog.Error(err) - return false, err - } - ci.update(m) - return true, nil -} - -func (ci *ClusterID) update(m *v1.ConfigMap) { - ci.idLock.Lock() - defer ci.idLock.Unlock() - if clusterID, exists := m.Data[UIDCluster]; exists { - ci.clusterID = &clusterID - } - if provId, exists := m.Data[UIDProvider]; exists { - ci.providerID = &provId - } -} - -func makeUID() (string, error) { - b := make([]byte, UIDLengthBytes) - _, err := rand.Read(b) - if err != nil { - return "", err - } - return hex.EncodeToString(b), nil -} - -func newSingleObjectListerWatcher(lw cache.ListerWatcher, objectName string) *singleObjListerWatcher { - return &singleObjListerWatcher{lw: lw, objectName: objectName} -} - -type singleObjListerWatcher struct { - lw cache.ListerWatcher - objectName string -} - -func (sow *singleObjListerWatcher) List(options metav1.ListOptions) (runtime.Object, error) { - options.FieldSelector = "metadata.name=" + sow.objectName - return sow.lw.List(options) -} - -func (sow *singleObjListerWatcher) Watch(options metav1.ListOptions) (watch.Interface, error) { - options.FieldSelector = "metadata.name=" + sow.objectName - return sow.lw.Watch(options) -} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_clusters.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_clusters.go deleted file mode 100644 index dad330ca5..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_clusters.go +++ /dev/null @@ -1,55 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -func newClustersMetricContext(request, zone string) *metricContext { - return newGenericMetricContext("clusters", request, unusedMetricLabel, zone, computeV1Version) -} - -func (gce *GCECloud) ListClusters() ([]string, error) { - allClusters := []string{} - - for _, zone := range gce.managedZones { - clusters, err := gce.listClustersInZone(zone) - if err != nil { - return nil, err - } - // TODO: Scoping? Do we need to qualify the cluster name? - allClusters = append(allClusters, clusters...) - } - - return allClusters, nil -} - -func (gce *GCECloud) Master(clusterName string) (string, error) { - return "k8s-" + clusterName + "-master.internal", nil -} - -func (gce *GCECloud) listClustersInZone(zone string) ([]string, error) { - mc := newClustersMetricContext("list_zone", zone) - // TODO: use PageToken to list all not just the first 500 - list, err := gce.containerService.Projects.Zones.Clusters.List(gce.projectID, zone).Do() - if err != nil { - return nil, mc.Observe(err) - } - - result := []string{} - for _, cluster := range list.Clusters { - result = append(result, cluster.Name) - } - return result, mc.Observe(nil) -} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_disks.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_disks.go deleted file mode 100644 index ac7f6ee39..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_disks.go +++ /dev/null @@ -1,629 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "encoding/json" - "fmt" - "net/http" - "strings" - - "k8s.io/api/core/v1" - - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/kubernetes/pkg/cloudprovider" - kubeletapis "k8s.io/kubernetes/pkg/kubelet/apis" - "k8s.io/kubernetes/pkg/volume" - volumeutil "k8s.io/kubernetes/pkg/volume/util" - - "github.com/golang/glog" - "google.golang.org/api/googleapi" -) - -type DiskType string - -const ( - DiskTypeSSD = "pd-ssd" - DiskTypeStandard = "pd-standard" - - diskTypeDefault = DiskTypeStandard - diskTypeURITemplateSingleZone = "%s/zones/%s/diskTypes/%s" // {gce.projectID}/zones/{disk.Zone}/diskTypes/{disk.Type}" - diskTypeURITemplateRegional = "%s/regions/%s/diskTypes/%s" // {gce.projectID}/regions/{disk.Region}/diskTypes/{disk.Type}" - diskTypePersistent = "PERSISTENT" - - diskSourceURITemplateSingleZone = "%s/zones/%s/disks/%s" // {gce.projectID}/zones/{disk.Zone}/disks/{disk.Name}" - diskSourceURITemplateRegional = "%s/regions/%s/disks/%s" //{gce.projectID}/regions/{disk.Region}/disks/repd" - - replicaZoneURITemplateSingleZone = "%s/zones/%s" // {gce.projectID}/zones/{disk.Zone} -) - -// Disks is interface for manipulation with GCE PDs. -type Disks interface { - // AttachDisk attaches given disk to the node with the specified NodeName. - // Current instance is used when instanceID is empty string. - AttachDisk(diskName string, nodeName types.NodeName, readOnly bool) error - - // DetachDisk detaches given disk to the node with the specified NodeName. - // Current instance is used when nodeName is empty string. - DetachDisk(devicePath string, nodeName types.NodeName) error - - // DiskIsAttached checks if a disk is attached to the node with the specified NodeName. - DiskIsAttached(diskName string, nodeName types.NodeName) (bool, error) - - // DisksAreAttached is a batch function to check if a list of disks are attached - // to the node with the specified NodeName. - DisksAreAttached(diskNames []string, nodeName types.NodeName) (map[string]bool, error) - - // CreateDisk creates a new PD with given properties. Tags are serialized - // as JSON into Description field. - CreateDisk(name string, diskType string, zone string, sizeGb int64, tags map[string]string) error - - // CreateRegionalDisk creates a new Regional Persistent Disk, with the - // specified properties, replicated to the specified zones. Tags are - // serialized as JSON into Description field. - CreateRegionalDisk(name string, diskType string, replicaZones sets.String, sizeGb int64, tags map[string]string) error - - // DeleteDisk deletes PD. - DeleteDisk(diskToDelete string) error - - // GetAutoLabelsForPD returns labels to apply to PersistentVolume - // representing this PD, namely failure domain and zone. - // zone can be provided to specify the zone for the PD, - // if empty all managed zones will be searched. - GetAutoLabelsForPD(name string, zone string) (map[string]string, error) -} - -// GCECloud implements Disks. -var _ Disks = (*GCECloud)(nil) - -// GCECloud implements PVLabeler. -var _ cloudprovider.PVLabeler = (*GCECloud)(nil) - -type GCEDisk struct { - ZoneInfo zoneType - Region string - Name string - Kind string - Type string -} - -type zoneType interface { - isZoneType() -} - -type multiZone struct { - replicaZones sets.String -} - -type singleZone struct { - zone string -} - -func (m multiZone) isZoneType() {} -func (s singleZone) isZoneType() {} - -func newDiskMetricContextZonal(request, region, zone string) *metricContext { - return newGenericMetricContext("disk", request, region, zone, computeV1Version) -} - -func newDiskMetricContextRegional(request, region string) *metricContext { - return newGenericMetricContext("disk", request, region, unusedMetricLabel, computeV1Version) -} - -func (gce *GCECloud) GetLabelsForVolume(pv *v1.PersistentVolume) (map[string]string, error) { - // Ignore any volumes that are being provisioned - if pv.Spec.GCEPersistentDisk.PDName == volume.ProvisionedVolumeName { - return nil, nil - } - - // If the zone is already labeled, honor the hint - zone := pv.Labels[kubeletapis.LabelZoneFailureDomain] - - labels, err := gce.GetAutoLabelsForPD(pv.Spec.GCEPersistentDisk.PDName, zone) - if err != nil { - return nil, err - } - - return labels, nil -} - -func (gce *GCECloud) AttachDisk(diskName string, nodeName types.NodeName, readOnly bool) error { - instanceName := mapNodeNameToInstanceName(nodeName) - instance, err := gce.getInstanceByName(instanceName) - if err != nil { - return fmt.Errorf("error getting instance %q", instanceName) - } - - // Try fetching as regional PD - var disk *GCEDisk - var mc *metricContext - if gce.AlphaFeatureGate.Enabled(GCEDiskAlphaFeatureGate) { - disk, err = gce.getRegionalDiskByName(diskName) - if err != nil { - glog.V(5).Infof("Could not find regional PD named %q to Attach. Will look for a zonal PD", diskName) - err = nil - } else { - mc = newDiskMetricContextRegional("attach", gce.region) - } - } - - if disk == nil { - disk, err = gce.getDiskByName(diskName, instance.Zone) - if err != nil { - return err - } - mc = newDiskMetricContextZonal("attach", gce.region, instance.Zone) - } - - readWrite := "READ_WRITE" - if readOnly { - readWrite = "READ_ONLY" - } - - attachOp, err := gce.manager.AttachDisk( - disk, readWrite, instance.Zone, instance.Name) - - if err != nil { - return mc.Observe(err) - } - - return gce.manager.WaitForZoneOp(attachOp, instance.Zone, mc) -} - -func (gce *GCECloud) DetachDisk(devicePath string, nodeName types.NodeName) error { - instanceName := mapNodeNameToInstanceName(nodeName) - inst, err := gce.getInstanceByName(instanceName) - if err != nil { - if err == cloudprovider.InstanceNotFound { - // If instance no longer exists, safe to assume volume is not attached. - glog.Warningf( - "Instance %q does not exist. DetachDisk will assume PD %q is not attached to it.", - instanceName, - devicePath) - return nil - } - - return fmt.Errorf("error getting instance %q", instanceName) - } - - mc := newDiskMetricContextZonal("detach", gce.region, inst.Zone) - detachOp, err := gce.manager.DetachDisk(inst.Zone, inst.Name, devicePath) - if err != nil { - return mc.Observe(err) - } - - return gce.manager.WaitForZoneOp(detachOp, inst.Zone, mc) -} - -func (gce *GCECloud) DiskIsAttached(diskName string, nodeName types.NodeName) (bool, error) { - instanceName := mapNodeNameToInstanceName(nodeName) - instance, err := gce.getInstanceByName(instanceName) - if err != nil { - if err == cloudprovider.InstanceNotFound { - // If instance no longer exists, safe to assume volume is not attached. - glog.Warningf( - "Instance %q does not exist. DiskIsAttached will assume PD %q is not attached to it.", - instanceName, - diskName) - return false, nil - } - - return false, err - } - - for _, disk := range instance.Disks { - if disk.DeviceName == diskName { - // Disk is still attached to node - return true, nil - } - } - - return false, nil -} - -func (gce *GCECloud) DisksAreAttached(diskNames []string, nodeName types.NodeName) (map[string]bool, error) { - attached := make(map[string]bool) - for _, diskName := range diskNames { - attached[diskName] = false - } - instanceName := mapNodeNameToInstanceName(nodeName) - instance, err := gce.getInstanceByName(instanceName) - if err != nil { - if err == cloudprovider.InstanceNotFound { - // If instance no longer exists, safe to assume volume is not attached. - glog.Warningf( - "Instance %q does not exist. DisksAreAttached will assume PD %v are not attached to it.", - instanceName, - diskNames) - return attached, nil - } - - return attached, err - } - - for _, instanceDisk := range instance.Disks { - for _, diskName := range diskNames { - if instanceDisk.DeviceName == diskName { - // Disk is still attached to node - attached[diskName] = true - } - } - } - - return attached, nil -} - -// CreateDisk creates a new Persistent Disk, with the specified name & -// size, in the specified zone. It stores specified tags encoded in -// JSON in Description field. -func (gce *GCECloud) CreateDisk( - name string, diskType string, zone string, sizeGb int64, tags map[string]string) error { - - // Do not allow creation of PDs in zones that are not managed. Such PDs - // then cannot be deleted by DeleteDisk. - if isManaged := gce.verifyZoneIsManaged(zone); !isManaged { - return fmt.Errorf("kubernetes does not manage zone %q", zone) - } - - tagsStr, err := gce.encodeDiskTags(tags) - if err != nil { - return err - } - - diskType, err = getDiskType(diskType) - if err != nil { - return err - } - - mc := newDiskMetricContextZonal("create", gce.region, zone) - - createOp, err := gce.manager.CreateDisk( - name, sizeGb, tagsStr, diskType, zone) - - if isGCEError(err, "alreadyExists") { - glog.Warningf("GCE PD %q already exists, reusing", name) - return nil - } else if err != nil { - return mc.Observe(err) - } - - err = gce.manager.WaitForZoneOp(createOp, zone, mc) - if isGCEError(err, "alreadyExists") { - glog.Warningf("GCE PD %q already exists, reusing", name) - return nil - } - return err -} - -// CreateRegionalDisk creates a new Regional Persistent Disk, with the specified -// name & size, replicated to the specified zones. It stores specified tags -// encoded in JSON in Description field. -func (gce *GCECloud) CreateRegionalDisk( - name string, diskType string, replicaZones sets.String, sizeGb int64, tags map[string]string) error { - - // Do not allow creation of PDs in zones that are not managed. Such PDs - // then cannot be deleted by DeleteDisk. - unmanagedZones := []string{} - for _, zone := range replicaZones.UnsortedList() { - if isManaged := gce.verifyZoneIsManaged(zone); !isManaged { - unmanagedZones = append(unmanagedZones, zone) - } - } - - if len(unmanagedZones) > 0 { - return fmt.Errorf("kubernetes does not manage specified zones: %q. Managed Zones: %q", unmanagedZones, gce.managedZones) - } - - tagsStr, err := gce.encodeDiskTags(tags) - if err != nil { - return err - } - - diskType, err = getDiskType(diskType) - if err != nil { - return err - } - - mc := newDiskMetricContextRegional("create", gce.region) - - createOp, err := gce.manager.CreateRegionalDisk( - name, sizeGb, tagsStr, diskType, replicaZones) - - if isGCEError(err, "alreadyExists") { - glog.Warningf("GCE PD %q already exists, reusing", name) - return nil - } else if err != nil { - return mc.Observe(err) - } - - err = gce.manager.WaitForRegionalOp(createOp, mc) - if isGCEError(err, "alreadyExists") { - glog.Warningf("GCE PD %q already exists, reusing", name) - return nil - } - return err -} - -func (gce *GCECloud) verifyZoneIsManaged(zone string) bool { - for _, managedZone := range gce.managedZones { - if zone == managedZone { - return true - } - } - - return false -} - -func getDiskType(diskType string) (string, error) { - switch diskType { - case DiskTypeSSD, DiskTypeStandard: - return diskType, nil - case "": - return diskTypeDefault, nil - default: - return "", fmt.Errorf("invalid GCE disk type %q", diskType) - } -} - -func (gce *GCECloud) DeleteDisk(diskToDelete string) error { - err := gce.doDeleteDisk(diskToDelete) - if isGCEError(err, "resourceInUseByAnotherResource") { - return volume.NewDeletedVolumeInUseError(err.Error()) - } - - if err == cloudprovider.DiskNotFound { - return nil - } - return err -} - -// Builds the labels that should be automatically added to a PersistentVolume backed by a GCE PD -// Specifically, this builds FailureDomain (zone) and Region labels. -// The PersistentVolumeLabel admission controller calls this and adds the labels when a PV is created. -// If zone is specified, the volume will only be found in the specified zone, -// otherwise all managed zones will be searched. -func (gce *GCECloud) GetAutoLabelsForPD(name string, zone string) (map[string]string, error) { - var disk *GCEDisk - var err error - if zone == "" { - // For regional PDs this is fine, but for zonal PDs we would like as far - // as possible to avoid this case, because GCE doesn't guarantee that - // volumes are uniquely named per region, just per zone. However, - // creation of GCE PDs was originally done only by name, so we have to - // continue to support that. - // However, wherever possible the zone should be passed (and it is - // passed for most cases that we can control, e.g. dynamic volume - // provisioning). - disk, err = gce.GetDiskByNameUnknownZone(name) - if err != nil { - return nil, err - } - } else { - // We could assume the disks exists; we have all the information we need - // However it is more consistent to ensure the disk exists, - // and in future we may gather addition information (e.g. disk type, IOPS etc) - zoneSet, err := volumeutil.LabelZonesToSet(zone) - if err != nil { - glog.Warningf("Failed to parse zone field: %q. Will use raw field.", zone) - } - - if len(zoneSet) > 1 { - // Regional PD - disk, err = gce.getRegionalDiskByName(name) - if err != nil { - return nil, err - } - } else { - // Zonal PD - disk, err = gce.getDiskByName(name, zone) - if err != nil { - return nil, err - } - } - } - - labels := make(map[string]string) - switch zoneInfo := disk.ZoneInfo.(type) { - case singleZone: - if zoneInfo.zone == "" || disk.Region == "" { - // Unexpected, but sanity-check - return nil, fmt.Errorf("PD did not have zone/region information: %v", disk) - } - labels[kubeletapis.LabelZoneFailureDomain] = zoneInfo.zone - labels[kubeletapis.LabelZoneRegion] = disk.Region - case multiZone: - if zoneInfo.replicaZones == nil || zoneInfo.replicaZones.Len() <= 0 { - // Unexpected, but sanity-check - return nil, fmt.Errorf("PD is regional but does not have any replicaZones specified: %v", disk) - } - labels[kubeletapis.LabelZoneFailureDomain] = - volumeutil.ZonesSetToLabelValue(zoneInfo.replicaZones) - labels[kubeletapis.LabelZoneRegion] = disk.Region - case nil: - // Unexpected, but sanity-check - return nil, fmt.Errorf("PD did not have ZoneInfo: %v", disk) - default: - // Unexpected, but sanity-check - return nil, fmt.Errorf("disk.ZoneInfo has unexpected type %T", zoneInfo) - } - - return labels, nil -} - -// Returns a GCEDisk for the disk, if it is found in the specified zone. -// If not found, returns (nil, nil) -func (gce *GCECloud) findDiskByName(diskName string, zone string) (*GCEDisk, error) { - mc := newDiskMetricContextZonal("get", gce.region, zone) - disk, err := gce.manager.GetDisk(zone, diskName) - if err == nil { - return disk, mc.Observe(nil) - } - if !isHTTPErrorCode(err, http.StatusNotFound) { - return nil, mc.Observe(err) - } - return nil, mc.Observe(nil) -} - -// Like findDiskByName, but returns an error if the disk is not found -func (gce *GCECloud) getDiskByName(diskName string, zone string) (*GCEDisk, error) { - disk, err := gce.findDiskByName(diskName, zone) - if disk == nil && err == nil { - return nil, fmt.Errorf("GCE persistent disk not found: diskName=%q zone=%q", diskName, zone) - } - return disk, err -} - -// Returns a GCEDisk for the regional disk, if it is found. -// If not found, returns (nil, nil) -func (gce *GCECloud) findRegionalDiskByName(diskName string) (*GCEDisk, error) { - mc := newDiskMetricContextRegional("get", gce.region) - disk, err := gce.manager.GetRegionalDisk(diskName) - if err == nil { - return disk, mc.Observe(nil) - } - if !isHTTPErrorCode(err, http.StatusNotFound) { - return nil, mc.Observe(err) - } - return nil, mc.Observe(nil) -} - -// Like findRegionalDiskByName, but returns an error if the disk is not found -func (gce *GCECloud) getRegionalDiskByName(diskName string) (*GCEDisk, error) { - disk, err := gce.findRegionalDiskByName(diskName) - if disk == nil && err == nil { - return nil, fmt.Errorf("GCE regional persistent disk not found: diskName=%q", diskName) - } - return disk, err -} - -// Scans all managed zones to return the GCE PD -// Prefer getDiskByName, if the zone can be established -// Return cloudprovider.DiskNotFound if the given disk cannot be found in any zone -func (gce *GCECloud) GetDiskByNameUnknownZone(diskName string) (*GCEDisk, error) { - if gce.AlphaFeatureGate.Enabled(GCEDiskAlphaFeatureGate) { - regionalDisk, err := gce.getRegionalDiskByName(diskName) - if err == nil { - return regionalDisk, err - } - } - - // Note: this is the gotcha right now with GCE PD support: - // disk names are not unique per-region. - // (I can create two volumes with name "myvol" in e.g. us-central1-b & us-central1-f) - // For now, this is simply undefined behvaiour. - // - // In future, we will have to require users to qualify their disk - // "us-central1-a/mydisk". We could do this for them as part of - // admission control, but that might be a little weird (values changing - // on create) - - var found *GCEDisk - for _, zone := range gce.managedZones { - disk, err := gce.findDiskByName(diskName, zone) - if err != nil { - return nil, err - } - // findDiskByName returns (nil,nil) if the disk doesn't exist, so we can't - // assume that a disk was found unless disk is non-nil. - if disk == nil { - continue - } - if found != nil { - switch zoneInfo := disk.ZoneInfo.(type) { - case multiZone: - if zoneInfo.replicaZones.Has(zone) { - glog.Warningf("GCE PD name (%q) was found in multiple zones (%q), but ok because it is a RegionalDisk.", - diskName, zoneInfo.replicaZones) - continue - } - return nil, fmt.Errorf("GCE PD name was found in multiple zones: %q", diskName) - default: - return nil, fmt.Errorf("GCE PD name was found in multiple zones: %q", diskName) - } - } - found = disk - } - if found != nil { - return found, nil - } - glog.Warningf("GCE persistent disk %q not found in managed zones (%s)", - diskName, strings.Join(gce.managedZones, ",")) - - return nil, cloudprovider.DiskNotFound -} - -// encodeDiskTags encodes requested volume tags into JSON string, as GCE does -// not support tags on GCE PDs and we use Description field as fallback. -func (gce *GCECloud) encodeDiskTags(tags map[string]string) (string, error) { - if len(tags) == 0 { - // No tags -> empty JSON - return "", nil - } - - enc, err := json.Marshal(tags) - if err != nil { - return "", err - } - return string(enc), nil -} - -func (gce *GCECloud) doDeleteDisk(diskToDelete string) error { - disk, err := gce.GetDiskByNameUnknownZone(diskToDelete) - if err != nil { - return err - } - - var mc *metricContext - - switch zoneInfo := disk.ZoneInfo.(type) { - case singleZone: - mc = newDiskMetricContextZonal("delete", disk.Region, zoneInfo.zone) - deleteOp, err := gce.manager.DeleteDisk(zoneInfo.zone, disk.Name) - if err != nil { - return mc.Observe(err) - } - return gce.manager.WaitForZoneOp(deleteOp, zoneInfo.zone, mc) - case multiZone: - mc = newDiskMetricContextRegional("delete", disk.Region) - deleteOp, err := gce.manager.DeleteRegionalDisk(disk.Name) - if err != nil { - return mc.Observe(err) - } - return gce.manager.WaitForRegionalOp(deleteOp, mc) - case nil: - return fmt.Errorf("PD has nil ZoneInfo: %v", disk) - default: - return fmt.Errorf("disk.ZoneInfo has unexpected type %T", zoneInfo) - } -} - -// isGCEError returns true if given error is a googleapi.Error with given -// reason (e.g. "resourceInUseByAnotherResource") -func isGCEError(err error, reason string) bool { - apiErr, ok := err.(*googleapi.Error) - if !ok { - return false - } - - for _, e := range apiErr.Errors { - if e.Reason == reason { - return true - } - } - return false -} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_firewall.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_firewall.go deleted file mode 100644 index 2e5297275..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_firewall.go +++ /dev/null @@ -1,64 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - compute "google.golang.org/api/compute/v1" -) - -func newFirewallMetricContext(request string) *metricContext { - return newGenericMetricContext("firewall", request, unusedMetricLabel, unusedMetricLabel, computeV1Version) -} - -// GetFirewall returns the Firewall by name. -func (gce *GCECloud) GetFirewall(name string) (*compute.Firewall, error) { - mc := newFirewallMetricContext("get") - v, err := gce.service.Firewalls.Get(gce.NetworkProjectID(), name).Do() - return v, mc.Observe(err) -} - -// CreateFirewall creates the passed firewall -func (gce *GCECloud) CreateFirewall(f *compute.Firewall) error { - mc := newFirewallMetricContext("create") - op, err := gce.service.Firewalls.Insert(gce.NetworkProjectID(), f).Do() - if err != nil { - return mc.Observe(err) - } - - return gce.waitForGlobalOpInProject(op, gce.NetworkProjectID(), mc) -} - -// DeleteFirewall deletes the given firewall rule. -func (gce *GCECloud) DeleteFirewall(name string) error { - mc := newFirewallMetricContext("delete") - op, err := gce.service.Firewalls.Delete(gce.NetworkProjectID(), name).Do() - if err != nil { - return mc.Observe(err) - } - return gce.waitForGlobalOpInProject(op, gce.NetworkProjectID(), mc) -} - -// UpdateFirewall applies the given firewall as an update to an existing service. -func (gce *GCECloud) UpdateFirewall(f *compute.Firewall) error { - mc := newFirewallMetricContext("update") - op, err := gce.service.Firewalls.Update(gce.NetworkProjectID(), f.Name, f).Do() - if err != nil { - return mc.Observe(err) - } - - return gce.waitForGlobalOpInProject(op, gce.NetworkProjectID(), mc) -} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_forwardingrule.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_forwardingrule.go deleted file mode 100644 index f674b2057..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_forwardingrule.go +++ /dev/null @@ -1,155 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - computealpha "google.golang.org/api/compute/v0.alpha" - compute "google.golang.org/api/compute/v1" -) - -func newForwardingRuleMetricContext(request, region string) *metricContext { - return newForwardingRuleMetricContextWithVersion(request, region, computeV1Version) -} -func newForwardingRuleMetricContextWithVersion(request, region, version string) *metricContext { - return newGenericMetricContext("forwardingrule", request, region, unusedMetricLabel, version) -} - -// CreateGlobalForwardingRule creates the passed GlobalForwardingRule -func (gce *GCECloud) CreateGlobalForwardingRule(rule *compute.ForwardingRule) error { - mc := newForwardingRuleMetricContext("create", "") - op, err := gce.service.GlobalForwardingRules.Insert(gce.projectID, rule).Do() - if err != nil { - return mc.Observe(err) - } - return gce.waitForGlobalOp(op, mc) -} - -// SetProxyForGlobalForwardingRule links the given TargetHttp(s)Proxy with the given GlobalForwardingRule. -// targetProxyLink is the SelfLink of a TargetHttp(s)Proxy. -func (gce *GCECloud) SetProxyForGlobalForwardingRule(forwardingRuleName, targetProxyLink string) error { - mc := newForwardingRuleMetricContext("set_proxy", "") - op, err := gce.service.GlobalForwardingRules.SetTarget( - gce.projectID, forwardingRuleName, &compute.TargetReference{Target: targetProxyLink}).Do() - if err != nil { - return mc.Observe(err) - } - - return gce.waitForGlobalOp(op, mc) -} - -// DeleteGlobalForwardingRule deletes the GlobalForwardingRule by name. -func (gce *GCECloud) DeleteGlobalForwardingRule(name string) error { - mc := newForwardingRuleMetricContext("delete", "") - op, err := gce.service.GlobalForwardingRules.Delete(gce.projectID, name).Do() - if err != nil { - return mc.Observe(err) - } - - return gce.waitForGlobalOp(op, mc) -} - -// GetGlobalForwardingRule returns the GlobalForwardingRule by name. -func (gce *GCECloud) GetGlobalForwardingRule(name string) (*compute.ForwardingRule, error) { - mc := newForwardingRuleMetricContext("get", "") - v, err := gce.service.GlobalForwardingRules.Get(gce.projectID, name).Do() - return v, mc.Observe(err) -} - -// ListGlobalForwardingRules lists all GlobalForwardingRules in the project. -func (gce *GCECloud) ListGlobalForwardingRules() (*compute.ForwardingRuleList, error) { - mc := newForwardingRuleMetricContext("list", "") - // TODO: use PageToken to list all not just the first 500 - v, err := gce.service.GlobalForwardingRules.List(gce.projectID).Do() - return v, mc.Observe(err) -} - -// GetRegionForwardingRule returns the RegionalForwardingRule by name & region. -func (gce *GCECloud) GetRegionForwardingRule(name, region string) (*compute.ForwardingRule, error) { - mc := newForwardingRuleMetricContext("get", region) - v, err := gce.service.ForwardingRules.Get(gce.projectID, region, name).Do() - return v, mc.Observe(err) -} - -// GetAlphaRegionForwardingRule returns the Alpha forwarding rule by name & region. -func (gce *GCECloud) GetAlphaRegionForwardingRule(name, region string) (*computealpha.ForwardingRule, error) { - mc := newForwardingRuleMetricContextWithVersion("get", region, computeAlphaVersion) - v, err := gce.serviceAlpha.ForwardingRules.Get(gce.projectID, region, name).Do() - return v, mc.Observe(err) -} - -// ListRegionForwardingRules lists all RegionalForwardingRules in the project & region. -func (gce *GCECloud) ListRegionForwardingRules(region string) (*compute.ForwardingRuleList, error) { - mc := newForwardingRuleMetricContext("list", region) - // TODO: use PageToken to list all not just the first 500 - v, err := gce.service.ForwardingRules.List(gce.projectID, region).Do() - return v, mc.Observe(err) -} - -// ListRegionForwardingRules lists all RegionalForwardingRules in the project & region. -func (gce *GCECloud) ListAlphaRegionForwardingRules(region string) (*computealpha.ForwardingRuleList, error) { - mc := newForwardingRuleMetricContextWithVersion("list", region, computeAlphaVersion) - // TODO: use PageToken to list all not just the first 500 - v, err := gce.serviceAlpha.ForwardingRules.List(gce.projectID, region).Do() - return v, mc.Observe(err) -} - -// CreateRegionForwardingRule creates and returns a -// RegionalForwardingRule that points to the given BackendService -func (gce *GCECloud) CreateRegionForwardingRule(rule *compute.ForwardingRule, region string) error { - mc := newForwardingRuleMetricContext("create", region) - op, err := gce.service.ForwardingRules.Insert(gce.projectID, region, rule).Do() - if err != nil { - return mc.Observe(err) - } - - return gce.waitForRegionOp(op, region, mc) -} - -// CreateAlphaRegionForwardingRule creates and returns an Alpha -// forwarding fule in the given region. -func (gce *GCECloud) CreateAlphaRegionForwardingRule(rule *computealpha.ForwardingRule, region string) error { - mc := newForwardingRuleMetricContextWithVersion("create", region, computeAlphaVersion) - op, err := gce.serviceAlpha.ForwardingRules.Insert(gce.projectID, region, rule).Do() - if err != nil { - return mc.Observe(err) - } - - return gce.waitForRegionOp(op, region, mc) -} - -// DeleteRegionForwardingRule deletes the RegionalForwardingRule by name & region. -func (gce *GCECloud) DeleteRegionForwardingRule(name, region string) error { - mc := newForwardingRuleMetricContext("delete", region) - op, err := gce.service.ForwardingRules.Delete(gce.projectID, region, name).Do() - if err != nil { - return mc.Observe(err) - } - - return gce.waitForRegionOp(op, region, mc) -} - -// TODO(#51665): retire this function once Network Tiers becomes Beta in GCP. -func (gce *GCECloud) getNetworkTierFromForwardingRule(name, region string) (string, error) { - if !gce.AlphaFeatureGate.Enabled(AlphaFeatureNetworkTiers) { - return NetworkTierDefault.ToGCEValue(), nil - } - fwdRule, err := gce.GetAlphaRegionForwardingRule(name, region) - if err != nil { - return handleAlphaNetworkTierGetError(err) - } - return fwdRule.NetworkTier, nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_forwardingrule_fakes.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_forwardingrule_fakes.go deleted file mode 100644 index 780012791..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_forwardingrule_fakes.go +++ /dev/null @@ -1,138 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "encoding/json" - "fmt" - "net/http" - - computealpha "google.golang.org/api/compute/v0.alpha" - compute "google.golang.org/api/compute/v1" - "google.golang.org/api/googleapi" -) - -type FakeCloudForwardingRuleService struct { - // fwdRulesByRegionAndName - // Outer key is for region string; inner key is for fwdRuleess name. - fwdRulesByRegionAndName map[string]map[string]*computealpha.ForwardingRule -} - -// FakeCloudForwardingRuleService Implements CloudForwardingRuleService -var _ CloudForwardingRuleService = &FakeCloudForwardingRuleService{} - -func NewFakeCloudForwardingRuleService() *FakeCloudForwardingRuleService { - return &FakeCloudForwardingRuleService{ - fwdRulesByRegionAndName: make(map[string]map[string]*computealpha.ForwardingRule), - } -} - -// SetRegionalForwardingRulees sets the fwdRuleesses of ther region. This is used for -// setting the test environment. -func (f *FakeCloudForwardingRuleService) SetRegionalForwardingRulees(region string, fwdRules []*computealpha.ForwardingRule) { - // Reset fwdRuleesses in the region. - f.fwdRulesByRegionAndName[region] = make(map[string]*computealpha.ForwardingRule) - - for _, fwdRule := range fwdRules { - f.fwdRulesByRegionAndName[region][fwdRule.Name] = fwdRule - } -} - -func (f *FakeCloudForwardingRuleService) CreateAlphaRegionForwardingRule(fwdRule *computealpha.ForwardingRule, region string) error { - if _, exists := f.fwdRulesByRegionAndName[region]; !exists { - f.fwdRulesByRegionAndName[region] = make(map[string]*computealpha.ForwardingRule) - } - - if _, exists := f.fwdRulesByRegionAndName[region][fwdRule.Name]; exists { - return &googleapi.Error{Code: http.StatusConflict} - } - - f.fwdRulesByRegionAndName[region][fwdRule.Name] = fwdRule - return nil -} - -func (f *FakeCloudForwardingRuleService) CreateRegionForwardingRule(fwdRule *compute.ForwardingRule, region string) error { - alphafwdRule := convertToAlphaForwardingRule(fwdRule) - return f.CreateAlphaRegionForwardingRule(alphafwdRule, region) -} - -func (f *FakeCloudForwardingRuleService) DeleteRegionForwardingRule(name, region string) error { - if _, exists := f.fwdRulesByRegionAndName[region]; !exists { - return makeGoogleAPINotFoundError("") - } - - if _, exists := f.fwdRulesByRegionAndName[region][name]; !exists { - return makeGoogleAPINotFoundError("") - } - delete(f.fwdRulesByRegionAndName[region], name) - return nil -} - -func (f *FakeCloudForwardingRuleService) GetAlphaRegionForwardingRule(name, region string) (*computealpha.ForwardingRule, error) { - if _, exists := f.fwdRulesByRegionAndName[region]; !exists { - return nil, makeGoogleAPINotFoundError("") - } - - if fwdRule, exists := f.fwdRulesByRegionAndName[region][name]; !exists { - return nil, makeGoogleAPINotFoundError("") - } else { - return fwdRule, nil - } -} - -func (f *FakeCloudForwardingRuleService) GetRegionForwardingRule(name, region string) (*compute.ForwardingRule, error) { - fwdRule, err := f.GetAlphaRegionForwardingRule(name, region) - if fwdRule != nil { - return convertToV1ForwardingRule(fwdRule), err - } - return nil, err -} - -func (f *FakeCloudForwardingRuleService) getNetworkTierFromForwardingRule(name, region string) (string, error) { - fwdRule, err := f.GetAlphaRegionForwardingRule(name, region) - if err != nil { - return "", err - } - return fwdRule.NetworkTier, nil -} - -func convertToV1ForwardingRule(object gceObject) *compute.ForwardingRule { - enc, err := object.MarshalJSON() - if err != nil { - panic(fmt.Sprintf("Failed to encode to json: %v", err)) - } - var fwdRule compute.ForwardingRule - if err := json.Unmarshal(enc, &fwdRule); err != nil { - panic(fmt.Sprintf("Failed to convert GCE apiObject %v to v1 fwdRuleess: %v", object, err)) - } - return &fwdRule -} - -func convertToAlphaForwardingRule(object gceObject) *computealpha.ForwardingRule { - enc, err := object.MarshalJSON() - if err != nil { - panic(fmt.Sprintf("Failed to encode to json: %v", err)) - } - var fwdRule computealpha.ForwardingRule - if err := json.Unmarshal(enc, &fwdRule); err != nil { - panic(fmt.Sprintf("Failed to convert GCE apiObject %v to alpha fwdRuleess: %v", object, err)) - } - // Set the default values for the Alpha fields. - fwdRule.NetworkTier = NetworkTierDefault.ToGCEValue() - - return &fwdRule -} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_healthchecks.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_healthchecks.go deleted file mode 100644 index 85f077f00..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_healthchecks.go +++ /dev/null @@ -1,231 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "k8s.io/api/core/v1" - "k8s.io/kubernetes/pkg/master/ports" - utilversion "k8s.io/kubernetes/pkg/util/version" - - "github.com/golang/glog" - compute "google.golang.org/api/compute/v1" -) - -const ( - nodesHealthCheckPath = "/healthz" - lbNodesHealthCheckPort = ports.ProxyHealthzPort -) - -var ( - minNodesHealthCheckVersion *utilversion.Version -) - -func init() { - if v, err := utilversion.ParseGeneric("1.7.2"); err != nil { - glog.Fatalf("Failed to parse version for minNodesHealthCheckVersion: %v", err) - } else { - minNodesHealthCheckVersion = v - } -} - -func newHealthcheckMetricContext(request string) *metricContext { - return newGenericMetricContext("healthcheck", request, unusedMetricLabel, unusedMetricLabel, computeV1Version) -} - -// GetHttpHealthCheck returns the given HttpHealthCheck by name. -func (gce *GCECloud) GetHttpHealthCheck(name string) (*compute.HttpHealthCheck, error) { - mc := newHealthcheckMetricContext("get_legacy") - v, err := gce.service.HttpHealthChecks.Get(gce.projectID, name).Do() - return v, mc.Observe(err) -} - -// UpdateHttpHealthCheck applies the given HttpHealthCheck as an update. -func (gce *GCECloud) UpdateHttpHealthCheck(hc *compute.HttpHealthCheck) error { - mc := newHealthcheckMetricContext("update_legacy") - op, err := gce.service.HttpHealthChecks.Update(gce.projectID, hc.Name, hc).Do() - if err != nil { - return mc.Observe(err) - } - - return gce.waitForGlobalOp(op, mc) -} - -// DeleteHttpHealthCheck deletes the given HttpHealthCheck by name. -func (gce *GCECloud) DeleteHttpHealthCheck(name string) error { - mc := newHealthcheckMetricContext("delete_legacy") - op, err := gce.service.HttpHealthChecks.Delete(gce.projectID, name).Do() - if err != nil { - return mc.Observe(err) - } - - return gce.waitForGlobalOp(op, mc) -} - -// CreateHttpHealthCheck creates the given HttpHealthCheck. -func (gce *GCECloud) CreateHttpHealthCheck(hc *compute.HttpHealthCheck) error { - mc := newHealthcheckMetricContext("create_legacy") - op, err := gce.service.HttpHealthChecks.Insert(gce.projectID, hc).Do() - if err != nil { - return mc.Observe(err) - } - - return gce.waitForGlobalOp(op, mc) -} - -// ListHttpHealthChecks lists all HttpHealthChecks in the project. -func (gce *GCECloud) ListHttpHealthChecks() (*compute.HttpHealthCheckList, error) { - mc := newHealthcheckMetricContext("list_legacy") - // TODO: use PageToken to list all not just the first 500 - v, err := gce.service.HttpHealthChecks.List(gce.projectID).Do() - return v, mc.Observe(err) -} - -// Legacy HTTPS Health Checks - -// GetHttpsHealthCheck returns the given HttpsHealthCheck by name. -func (gce *GCECloud) GetHttpsHealthCheck(name string) (*compute.HttpsHealthCheck, error) { - mc := newHealthcheckMetricContext("get_legacy") - v, err := gce.service.HttpsHealthChecks.Get(gce.projectID, name).Do() - mc.Observe(err) - return v, err -} - -// UpdateHttpsHealthCheck applies the given HttpsHealthCheck as an update. -func (gce *GCECloud) UpdateHttpsHealthCheck(hc *compute.HttpsHealthCheck) error { - mc := newHealthcheckMetricContext("update_legacy") - op, err := gce.service.HttpsHealthChecks.Update(gce.projectID, hc.Name, hc).Do() - if err != nil { - mc.Observe(err) - return err - } - - return gce.waitForGlobalOp(op, mc) -} - -// DeleteHttpsHealthCheck deletes the given HttpsHealthCheck by name. -func (gce *GCECloud) DeleteHttpsHealthCheck(name string) error { - mc := newHealthcheckMetricContext("delete_legacy") - op, err := gce.service.HttpsHealthChecks.Delete(gce.projectID, name).Do() - if err != nil { - return mc.Observe(err) - } - - return gce.waitForGlobalOp(op, mc) -} - -// CreateHttpsHealthCheck creates the given HttpsHealthCheck. -func (gce *GCECloud) CreateHttpsHealthCheck(hc *compute.HttpsHealthCheck) error { - mc := newHealthcheckMetricContext("create_legacy") - op, err := gce.service.HttpsHealthChecks.Insert(gce.projectID, hc).Do() - if err != nil { - return mc.Observe(err) - } - - return gce.waitForGlobalOp(op, mc) -} - -// ListHttpsHealthChecks lists all HttpsHealthChecks in the project. -func (gce *GCECloud) ListHttpsHealthChecks() (*compute.HttpsHealthCheckList, error) { - mc := newHealthcheckMetricContext("list_legacy") - // TODO: use PageToken to list all not just the first 500 - v, err := gce.service.HttpsHealthChecks.List(gce.projectID).Do() - return v, mc.Observe(err) -} - -// Generic HealthCheck - -// GetHealthCheck returns the given HealthCheck by name. -func (gce *GCECloud) GetHealthCheck(name string) (*compute.HealthCheck, error) { - mc := newHealthcheckMetricContext("get") - v, err := gce.service.HealthChecks.Get(gce.projectID, name).Do() - return v, mc.Observe(err) -} - -// UpdateHealthCheck applies the given HealthCheck as an update. -func (gce *GCECloud) UpdateHealthCheck(hc *compute.HealthCheck) error { - mc := newHealthcheckMetricContext("update") - op, err := gce.service.HealthChecks.Update(gce.projectID, hc.Name, hc).Do() - if err != nil { - return mc.Observe(err) - } - - return gce.waitForGlobalOp(op, mc) -} - -// DeleteHealthCheck deletes the given HealthCheck by name. -func (gce *GCECloud) DeleteHealthCheck(name string) error { - mc := newHealthcheckMetricContext("delete") - op, err := gce.service.HealthChecks.Delete(gce.projectID, name).Do() - if err != nil { - return mc.Observe(err) - } - - return gce.waitForGlobalOp(op, mc) -} - -// CreateHealthCheck creates the given HealthCheck. -func (gce *GCECloud) CreateHealthCheck(hc *compute.HealthCheck) error { - mc := newHealthcheckMetricContext("create") - op, err := gce.service.HealthChecks.Insert(gce.projectID, hc).Do() - if err != nil { - return mc.Observe(err) - } - - return gce.waitForGlobalOp(op, mc) -} - -// ListHealthChecks lists all HealthCheck in the project. -func (gce *GCECloud) ListHealthChecks() (*compute.HealthCheckList, error) { - mc := newHealthcheckMetricContext("list") - // TODO: use PageToken to list all not just the first 500 - v, err := gce.service.HealthChecks.List(gce.projectID).Do() - return v, mc.Observe(err) -} - -// GetNodesHealthCheckPort returns the health check port used by the GCE load -// balancers (l4) for performing health checks on nodes. -func GetNodesHealthCheckPort() int32 { - return lbNodesHealthCheckPort -} - -// GetNodesHealthCheckPath returns the health check path used by the GCE load -// balancers (l4) for performing health checks on nodes. -func GetNodesHealthCheckPath() string { - return nodesHealthCheckPath -} - -// isAtLeastMinNodesHealthCheckVersion checks if a version is higher than -// `minNodesHealthCheckVersion`. -func isAtLeastMinNodesHealthCheckVersion(vstring string) bool { - version, err := utilversion.ParseGeneric(vstring) - if err != nil { - glog.Errorf("vstring (%s) is not a valid version string: %v", vstring, err) - return false - } - return version.AtLeast(minNodesHealthCheckVersion) -} - -// supportsNodesHealthCheck returns false if anyone of the nodes has version -// lower than `minNodesHealthCheckVersion`. -func supportsNodesHealthCheck(nodes []*v1.Node) bool { - for _, node := range nodes { - if !isAtLeastMinNodesHealthCheckVersion(node.Status.NodeInfo.KubeProxyVersion) { - return false - } - } - return true -} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_instancegroup.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_instancegroup.go deleted file mode 100644 index 67083224b..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_instancegroup.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import compute "google.golang.org/api/compute/v1" - -func newInstanceGroupMetricContext(request string, zone string) *metricContext { - return newGenericMetricContext("instancegroup", request, unusedMetricLabel, zone, computeV1Version) -} - -// CreateInstanceGroup creates an instance group with the given -// instances. It is the callers responsibility to add named ports. -func (gce *GCECloud) CreateInstanceGroup(ig *compute.InstanceGroup, zone string) error { - mc := newInstanceGroupMetricContext("create", zone) - op, err := gce.service.InstanceGroups.Insert(gce.projectID, zone, ig).Do() - if err != nil { - return mc.Observe(err) - } - - return gce.waitForZoneOp(op, zone, mc) -} - -// DeleteInstanceGroup deletes an instance group. -func (gce *GCECloud) DeleteInstanceGroup(name string, zone string) error { - mc := newInstanceGroupMetricContext("delete", zone) - op, err := gce.service.InstanceGroups.Delete( - gce.projectID, zone, name).Do() - if err != nil { - return mc.Observe(err) - } - - return gce.waitForZoneOp(op, zone, mc) -} - -// ListInstanceGroups lists all InstanceGroups in the project and -// zone. -func (gce *GCECloud) ListInstanceGroups(zone string) (*compute.InstanceGroupList, error) { - mc := newInstanceGroupMetricContext("list", zone) - // TODO: use PageToken to list all not just the first 500 - v, err := gce.service.InstanceGroups.List(gce.projectID, zone).Do() - return v, mc.Observe(err) -} - -// ListInstancesInInstanceGroup lists all the instances in a given -// instance group and state. -func (gce *GCECloud) ListInstancesInInstanceGroup(name string, zone string, state string) (*compute.InstanceGroupsListInstances, error) { - mc := newInstanceGroupMetricContext("list_instances", zone) - // TODO: use PageToken to list all not just the first 500 - v, err := gce.service.InstanceGroups.ListInstances( - gce.projectID, zone, name, - &compute.InstanceGroupsListInstancesRequest{InstanceState: state}).Do() - return v, mc.Observe(err) -} - -// AddInstancesToInstanceGroup adds the given instances to the given -// instance group. -func (gce *GCECloud) AddInstancesToInstanceGroup(name string, zone string, instanceRefs []*compute.InstanceReference) error { - mc := newInstanceGroupMetricContext("add_instances", zone) - if len(instanceRefs) == 0 { - return nil - } - - op, err := gce.service.InstanceGroups.AddInstances( - gce.projectID, zone, name, - &compute.InstanceGroupsAddInstancesRequest{ - Instances: instanceRefs, - }).Do() - if err != nil { - return mc.Observe(err) - } - - return gce.waitForZoneOp(op, zone, mc) -} - -// RemoveInstancesFromInstanceGroup removes the given instances from -// the instance group. -func (gce *GCECloud) RemoveInstancesFromInstanceGroup(name string, zone string, instanceRefs []*compute.InstanceReference) error { - mc := newInstanceGroupMetricContext("remove_instances", zone) - if len(instanceRefs) == 0 { - return nil - } - - op, err := gce.service.InstanceGroups.RemoveInstances( - gce.projectID, zone, name, - &compute.InstanceGroupsRemoveInstancesRequest{ - Instances: instanceRefs, - }).Do() - if err != nil { - return mc.Observe(err) - } - - return gce.waitForZoneOp(op, zone, mc) -} - -// SetNamedPortsOfInstanceGroup sets the list of named ports on a given instance group -func (gce *GCECloud) SetNamedPortsOfInstanceGroup(igName, zone string, namedPorts []*compute.NamedPort) error { - mc := newInstanceGroupMetricContext("set_namedports", zone) - op, err := gce.service.InstanceGroups.SetNamedPorts( - gce.projectID, zone, igName, - &compute.InstanceGroupsSetNamedPortsRequest{NamedPorts: namedPorts}).Do() - if err != nil { - return mc.Observe(err) - } - - return gce.waitForZoneOp(op, zone, mc) -} - -// GetInstanceGroup returns an instance group by name. -func (gce *GCECloud) GetInstanceGroup(name string, zone string) (*compute.InstanceGroup, error) { - mc := newInstanceGroupMetricContext("get", zone) - v, err := gce.service.InstanceGroups.Get(gce.projectID, zone, name).Do() - return v, mc.Observe(err) -} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_instances.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_instances.go deleted file mode 100644 index c6e31dee6..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_instances.go +++ /dev/null @@ -1,635 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "errors" - "fmt" - "net" - "net/http" - "strconv" - "strings" - "time" - - "cloud.google.com/go/compute/metadata" - "github.com/golang/glog" - computealpha "google.golang.org/api/compute/v0.alpha" - computebeta "google.golang.org/api/compute/v0.beta" - compute "google.golang.org/api/compute/v1" - - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/kubernetes/pkg/cloudprovider" - kubeletapis "k8s.io/kubernetes/pkg/kubelet/apis" -) - -const ( - defaultZone = "" -) - -func newInstancesMetricContext(request, zone string) *metricContext { - return newGenericMetricContext("instances", request, unusedMetricLabel, zone, computeV1Version) -} - -func splitNodesByZone(nodes []*v1.Node) map[string][]*v1.Node { - zones := make(map[string][]*v1.Node) - for _, n := range nodes { - z := getZone(n) - if z != defaultZone { - zones[z] = append(zones[z], n) - } - } - return zones -} - -func getZone(n *v1.Node) string { - zone, ok := n.Labels[kubeletapis.LabelZoneFailureDomain] - if !ok { - return defaultZone - } - return zone -} - -// ToInstanceReferences returns instance references by links -func (gce *GCECloud) ToInstanceReferences(zone string, instanceNames []string) (refs []*compute.InstanceReference) { - for _, ins := range instanceNames { - instanceLink := makeHostURL(gce.service.BasePath, gce.projectID, zone, ins) - refs = append(refs, &compute.InstanceReference{Instance: instanceLink}) - } - return refs -} - -// NodeAddresses is an implementation of Instances.NodeAddresses. -func (gce *GCECloud) NodeAddresses(_ types.NodeName) ([]v1.NodeAddress, error) { - internalIP, err := metadata.Get("instance/network-interfaces/0/ip") - if err != nil { - return nil, fmt.Errorf("couldn't get internal IP: %v", err) - } - externalIP, err := metadata.Get("instance/network-interfaces/0/access-configs/0/external-ip") - if err != nil { - return nil, fmt.Errorf("couldn't get external IP: %v", err) - } - return []v1.NodeAddress{ - {Type: v1.NodeInternalIP, Address: internalIP}, - {Type: v1.NodeExternalIP, Address: externalIP}, - }, nil -} - -// This method will not be called from the node that is requesting this ID. -// i.e. metadata service and other local methods cannot be used here -func (gce *GCECloud) NodeAddressesByProviderID(providerID string) ([]v1.NodeAddress, error) { - project, zone, name, err := splitProviderID(providerID) - if err != nil { - return []v1.NodeAddress{}, err - } - - instance, err := gce.service.Instances.Get(project, zone, canonicalizeInstanceName(name)).Do() - if err != nil { - return []v1.NodeAddress{}, fmt.Errorf("error while querying for providerID %q: %v", providerID, err) - } - - if len(instance.NetworkInterfaces) < 1 { - return []v1.NodeAddress{}, fmt.Errorf("could not find network interfaces for providerID %q", providerID) - } - networkInterface := instance.NetworkInterfaces[0] - - nodeAddresses := []v1.NodeAddress{{Type: v1.NodeInternalIP, Address: networkInterface.NetworkIP}} - for _, config := range networkInterface.AccessConfigs { - nodeAddresses = append(nodeAddresses, v1.NodeAddress{Type: v1.NodeExternalIP, Address: config.NatIP}) - } - - return nodeAddresses, nil -} - -// InstanceTypeByProviderID returns the cloudprovider instance type of the node -// with the specified unique providerID This method will not be called from the -// node that is requesting this ID. i.e. metadata service and other local -// methods cannot be used here -func (gce *GCECloud) InstanceTypeByProviderID(providerID string) (string, error) { - project, zone, name, err := splitProviderID(providerID) - if err != nil { - return "", err - } - instance, err := gce.getInstanceFromProjectInZoneByName(project, zone, name) - if err != nil { - return "", err - } - return instance.Type, nil -} - -// ExternalID returns the cloud provider ID of the node with the specified NodeName (deprecated). -func (gce *GCECloud) ExternalID(nodeName types.NodeName) (string, error) { - instanceName := mapNodeNameToInstanceName(nodeName) - if gce.useMetadataServer { - // Use metadata, if possible, to fetch ID. See issue #12000 - if gce.isCurrentInstance(instanceName) { - externalInstanceID, err := getCurrentExternalIDViaMetadata() - if err == nil { - return externalInstanceID, nil - } - } - } - - // Fallback to GCE API call if metadata server fails to retrieve ID - inst, err := gce.getInstanceByName(instanceName) - if err != nil { - return "", err - } - return strconv.FormatUint(inst.ID, 10), nil -} - -// InstanceExistsByProviderID returns true if the instance with the given provider id still exists and is running. -// If false is returned with no error, the instance will be immediately deleted by the cloud controller manager. -func (gce *GCECloud) InstanceExistsByProviderID(providerID string) (bool, error) { - return false, errors.New("unimplemented") -} - -// InstanceID returns the cloud provider ID of the node with the specified NodeName. -func (gce *GCECloud) InstanceID(nodeName types.NodeName) (string, error) { - instanceName := mapNodeNameToInstanceName(nodeName) - if gce.useMetadataServer { - // Use metadata, if possible, to fetch ID. See issue #12000 - if gce.isCurrentInstance(instanceName) { - projectID, zone, err := getProjectAndZone() - if err == nil { - return projectID + "/" + zone + "/" + canonicalizeInstanceName(instanceName), nil - } - } - } - instance, err := gce.getInstanceByName(instanceName) - if err != nil { - return "", err - } - return gce.projectID + "/" + instance.Zone + "/" + instance.Name, nil -} - -// InstanceType returns the type of the specified node with the specified NodeName. -func (gce *GCECloud) InstanceType(nodeName types.NodeName) (string, error) { - instanceName := mapNodeNameToInstanceName(nodeName) - if gce.useMetadataServer { - // Use metadata, if possible, to fetch ID. See issue #12000 - if gce.isCurrentInstance(instanceName) { - mType, err := getCurrentMachineTypeViaMetadata() - if err == nil { - return mType, nil - } - } - } - instance, err := gce.getInstanceByName(instanceName) - if err != nil { - return "", err - } - return instance.Type, nil -} - -func (gce *GCECloud) AddSSHKeyToAllInstances(user string, keyData []byte) error { - return wait.Poll(2*time.Second, 30*time.Second, func() (bool, error) { - project, err := gce.service.Projects.Get(gce.projectID).Do() - if err != nil { - glog.Errorf("Could not get project: %v", err) - return false, nil - } - keyString := fmt.Sprintf("%s:%s %s@%s", user, strings.TrimSpace(string(keyData)), user, user) - found := false - for _, item := range project.CommonInstanceMetadata.Items { - if item.Key == "sshKeys" { - if strings.Contains(*item.Value, keyString) { - // We've already added the key - glog.Info("SSHKey already in project metadata") - return true, nil - } - value := *item.Value + "\n" + keyString - item.Value = &value - found = true - break - } - } - if !found { - // This is super unlikely, so log. - glog.Infof("Failed to find sshKeys metadata, creating a new item") - project.CommonInstanceMetadata.Items = append(project.CommonInstanceMetadata.Items, - &compute.MetadataItems{ - Key: "sshKeys", - Value: &keyString, - }) - } - - mc := newInstancesMetricContext("add_ssh_key", "") - op, err := gce.service.Projects.SetCommonInstanceMetadata( - gce.projectID, project.CommonInstanceMetadata).Do() - - if err != nil { - glog.Errorf("Could not Set Metadata: %v", err) - mc.Observe(err) - return false, nil - } - - if err := gce.waitForGlobalOp(op, mc); err != nil { - glog.Errorf("Could not Set Metadata: %v", err) - return false, nil - } - - glog.Infof("Successfully added sshKey to project metadata") - return true, nil - }) -} - -// GetAllZones returns all the zones in which nodes are running -func (gce *GCECloud) GetAllZones() (sets.String, error) { - // Fast-path for non-multizone - if len(gce.managedZones) == 1 { - return sets.NewString(gce.managedZones...), nil - } - - // TODO: Caching, but this is currently only called when we are creating a volume, - // which is a relatively infrequent operation, and this is only # zones API calls - zones := sets.NewString() - - // TODO: Parallelize, although O(zones) so not too bad (N <= 3 typically) - for _, zone := range gce.managedZones { - mc := newInstancesMetricContext("list", zone) - // We only retrieve one page in each zone - we only care about existence - listCall := gce.service.Instances.List(gce.projectID, zone) - - // No filter: We assume that a zone is either used or unused - // We could only consider running nodes (like we do in List above), - // but probably if instances are starting we still want to consider them. - // I think we should wait until we have a reason to make the - // call one way or the other; we generally can't guarantee correct - // volume spreading if the set of zones is changing - // (and volume spreading is currently only a heuristic). - // Long term we want to replace GetAllZones (which primarily supports volume - // spreading) with a scheduler policy that is able to see the global state of - // volumes and the health of zones. - - // Just a minimal set of fields - we only care about existence - listCall = listCall.Fields("items(name)") - res, err := listCall.Do() - if err != nil { - return nil, mc.Observe(err) - } - mc.Observe(nil) - - if len(res.Items) != 0 { - zones.Insert(zone) - } - } - - return zones, nil -} - -// Implementation of Instances.CurrentNodeName -func (gce *GCECloud) CurrentNodeName(hostname string) (types.NodeName, error) { - return types.NodeName(hostname), nil -} - -// AliasRanges returns a list of CIDR ranges that are assigned to the -// `node` for allocation to pods. Returns a list of the form -// "<ip>/<netmask>". -func (gce *GCECloud) AliasRanges(nodeName types.NodeName) (cidrs []string, err error) { - var instance *gceInstance - instance, err = gce.getInstanceByName(mapNodeNameToInstanceName(nodeName)) - if err != nil { - return - } - - var res *computebeta.Instance - res, err = gce.serviceBeta.Instances.Get( - gce.projectID, instance.Zone, instance.Name).Do() - if err != nil { - return - } - - for _, networkInterface := range res.NetworkInterfaces { - for _, aliasIpRange := range networkInterface.AliasIpRanges { - cidrs = append(cidrs, aliasIpRange.IpCidrRange) - } - } - return -} - -// AddAliasToInstance adds an alias to the given instance from the named -// secondary range. -func (gce *GCECloud) AddAliasToInstance(nodeName types.NodeName, alias *net.IPNet) error { - - v1instance, err := gce.getInstanceByName(mapNodeNameToInstanceName(nodeName)) - if err != nil { - return err - } - instance, err := gce.serviceAlpha.Instances.Get(gce.projectID, v1instance.Zone, v1instance.Name).Do() - if err != nil { - return err - } - - switch len(instance.NetworkInterfaces) { - case 0: - return fmt.Errorf("Instance %q has no network interfaces", nodeName) - case 1: - default: - glog.Warningf("Instance %q has more than one network interface, using only the first (%v)", - nodeName, instance.NetworkInterfaces) - } - - iface := instance.NetworkInterfaces[0] - iface.AliasIpRanges = append(iface.AliasIpRanges, &computealpha.AliasIpRange{ - IpCidrRange: alias.String(), - SubnetworkRangeName: gce.secondaryRangeName, - }) - - mc := newInstancesMetricContext("addalias", v1instance.Zone) - op, err := gce.serviceAlpha.Instances.UpdateNetworkInterface( - gce.projectID, instance.Zone, instance.Name, iface.Name, iface).Do() - if err != nil { - return mc.Observe(err) - } - return gce.waitForZoneOp(op, v1instance.Zone, mc) -} - -// Gets the named instances, returning cloudprovider.InstanceNotFound if any instance is not found -func (gce *GCECloud) getInstancesByNames(names []string) ([]*gceInstance, error) { - instances := make(map[string]*gceInstance) - remaining := len(names) - - nodeInstancePrefix := gce.nodeInstancePrefix - for _, name := range names { - name = canonicalizeInstanceName(name) - if !strings.HasPrefix(name, gce.nodeInstancePrefix) { - glog.Warningf("instance '%s' does not conform to prefix '%s', removing filter", name, gce.nodeInstancePrefix) - nodeInstancePrefix = "" - } - instances[name] = nil - } - - for _, zone := range gce.managedZones { - if remaining == 0 { - break - } - - pageToken := "" - page := 0 - for ; page == 0 || (pageToken != "" && page < maxPages); page++ { - listCall := gce.service.Instances.List(gce.projectID, zone) - - if nodeInstancePrefix != "" { - // Add the filter for hosts - listCall = listCall.Filter("name eq " + nodeInstancePrefix + ".*") - } - - // TODO(zmerlynn): Internal bug 29524655 - // listCall = listCall.Fields("items(name,id,disks,machineType)") - if pageToken != "" { - listCall.PageToken(pageToken) - } - - res, err := listCall.Do() - if err != nil { - return nil, err - } - pageToken = res.NextPageToken - for _, i := range res.Items { - name := i.Name - if _, ok := instances[name]; !ok { - continue - } - - instance := &gceInstance{ - Zone: zone, - Name: name, - ID: i.Id, - Disks: i.Disks, - Type: lastComponent(i.MachineType), - } - instances[name] = instance - remaining-- - } - } - if page >= maxPages { - glog.Errorf("getInstancesByNames exceeded maxPages=%d for Instances.List: truncating.", maxPages) - } - } - - instanceArray := make([]*gceInstance, len(names)) - for i, name := range names { - name = canonicalizeInstanceName(name) - instance := instances[name] - if instance == nil { - glog.Errorf("Failed to retrieve instance: %q", name) - return nil, cloudprovider.InstanceNotFound - } - instanceArray[i] = instances[name] - } - - return instanceArray, nil -} - -// Gets the named instance, returning cloudprovider.InstanceNotFound if the instance is not found -func (gce *GCECloud) getInstanceByName(name string) (*gceInstance, error) { - // Avoid changing behaviour when not managing multiple zones - for _, zone := range gce.managedZones { - instance, err := gce.getInstanceFromProjectInZoneByName(gce.projectID, zone, name) - if err != nil { - if isHTTPErrorCode(err, http.StatusNotFound) { - continue - } - return nil, err - } - return instance, nil - } - - return nil, cloudprovider.InstanceNotFound -} - -func (gce *GCECloud) getInstanceFromProjectInZoneByName(project, zone, name string) (*gceInstance, error) { - name = canonicalizeInstanceName(name) - mc := newInstancesMetricContext("get", zone) - res, err := gce.service.Instances.Get(project, zone, name).Do() - mc.Observe(err) - if err != nil { - glog.Errorf("getInstanceFromProjectInZoneByName: failed to get instance %s; err: %v", name, err) - return nil, err - } - - return &gceInstance{ - Zone: lastComponent(res.Zone), - Name: res.Name, - ID: res.Id, - Disks: res.Disks, - Type: lastComponent(res.MachineType), - }, nil -} - -func getInstanceIDViaMetadata() (string, error) { - result, err := metadata.Get("instance/hostname") - if err != nil { - return "", err - } - parts := strings.Split(result, ".") - if len(parts) == 0 { - return "", fmt.Errorf("unexpected response: %s", result) - } - return parts[0], nil -} - -func getCurrentExternalIDViaMetadata() (string, error) { - externalID, err := metadata.Get("instance/id") - if err != nil { - return "", fmt.Errorf("couldn't get external ID: %v", err) - } - return externalID, nil -} - -func getCurrentMachineTypeViaMetadata() (string, error) { - mType, err := metadata.Get("instance/machine-type") - if err != nil { - return "", fmt.Errorf("couldn't get machine type: %v", err) - } - parts := strings.Split(mType, "/") - if len(parts) != 4 { - return "", fmt.Errorf("unexpected response for machine type: %s", mType) - } - - return parts[3], nil -} - -// isCurrentInstance uses metadata server to check if specified -// instanceID matches current machine's instanceID -func (gce *GCECloud) isCurrentInstance(instanceID string) bool { - currentInstanceID, err := getInstanceIDViaMetadata() - if err != nil { - // Log and swallow error - glog.Errorf("Failed to fetch instanceID via Metadata: %v", err) - return false - } - - return currentInstanceID == canonicalizeInstanceName(instanceID) -} - -// ComputeHostTags grabs all tags from all instances being added to the pool. -// * The longest tag that is a prefix of the instance name is used -// * If any instance has no matching prefix tag, return error -// Invoking this method to get host tags is risky since it depends on the format -// of the host names in the cluster. Only use it as a fallback if gce.nodeTags -// is unspecified -func (gce *GCECloud) computeHostTags(hosts []*gceInstance) ([]string, error) { - // TODO: We could store the tags in gceInstance, so we could have already fetched it - hostNamesByZone := make(map[string]map[string]bool) // map of zones -> map of names -> bool (for easy lookup) - nodeInstancePrefix := gce.nodeInstancePrefix - for _, host := range hosts { - if !strings.HasPrefix(host.Name, gce.nodeInstancePrefix) { - glog.Warningf("instance '%s' does not conform to prefix '%s', ignoring filter", host, gce.nodeInstancePrefix) - nodeInstancePrefix = "" - } - - z, ok := hostNamesByZone[host.Zone] - if !ok { - z = make(map[string]bool) - hostNamesByZone[host.Zone] = z - } - z[host.Name] = true - } - - tags := sets.NewString() - - for zone, hostNames := range hostNamesByZone { - pageToken := "" - page := 0 - for ; page == 0 || (pageToken != "" && page < maxPages); page++ { - listCall := gce.service.Instances.List(gce.projectID, zone) - - if nodeInstancePrefix != "" { - // Add the filter for hosts - listCall = listCall.Filter("name eq " + nodeInstancePrefix + ".*") - } - - // Add the fields we want - // TODO(zmerlynn): Internal bug 29524655 - // listCall = listCall.Fields("items(name,tags)") - - if pageToken != "" { - listCall = listCall.PageToken(pageToken) - } - - res, err := listCall.Do() - if err != nil { - return nil, err - } - pageToken = res.NextPageToken - for _, instance := range res.Items { - if !hostNames[instance.Name] { - continue - } - - longest_tag := "" - for _, tag := range instance.Tags.Items { - if strings.HasPrefix(instance.Name, tag) && len(tag) > len(longest_tag) { - longest_tag = tag - } - } - if len(longest_tag) > 0 { - tags.Insert(longest_tag) - } else { - return nil, fmt.Errorf("Could not find any tag that is a prefix of instance name for instance %s", instance.Name) - } - } - } - if page >= maxPages { - glog.Errorf("computeHostTags exceeded maxPages=%d for Instances.List: truncating.", maxPages) - } - } - if len(tags) == 0 { - return nil, fmt.Errorf("No instances found") - } - return tags.List(), nil -} - -// GetNodeTags will first try returning the list of tags specified in GCE cloud Configuration. -// If they weren't provided, it'll compute the host tags with the given hostnames. If the list -// of hostnames has not changed, a cached set of nodetags are returned. -func (gce *GCECloud) GetNodeTags(nodeNames []string) ([]string, error) { - // If nodeTags were specified through configuration, use them - if len(gce.nodeTags) > 0 { - return gce.nodeTags, nil - } - - gce.computeNodeTagLock.Lock() - defer gce.computeNodeTagLock.Unlock() - - // Early return if hosts have not changed - hosts := sets.NewString(nodeNames...) - if hosts.Equal(gce.lastKnownNodeNames) { - return gce.lastComputedNodeTags, nil - } - - // Get GCE instance data by hostname - instances, err := gce.getInstancesByNames(nodeNames) - if err != nil { - return nil, err - } - - // Determine list of host tags - tags, err := gce.computeHostTags(instances) - if err != nil { - return nil, err - } - - // Save the list of tags - gce.lastKnownNodeNames = hosts - gce.lastComputedNodeTags = tags - return tags, nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_interfaces.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_interfaces.go deleted file mode 100644 index 43e1ccab9..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_interfaces.go +++ /dev/null @@ -1,61 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - computealpha "google.golang.org/api/compute/v0.alpha" - computebeta "google.golang.org/api/compute/v0.beta" - compute "google.golang.org/api/compute/v1" -) - -// These interfaces are added for testability. - -// CloudAddressService is an interface for managing addresses -type CloudAddressService interface { - ReserveRegionAddress(address *compute.Address, region string) error - GetRegionAddress(name string, region string) (*compute.Address, error) - GetRegionAddressByIP(region, ipAddress string) (*compute.Address, error) - DeleteRegionAddress(name, region string) error - // TODO: Mock Global endpoints - - // Alpha API. - GetAlphaRegionAddress(name, region string) (*computealpha.Address, error) - ReserveAlphaRegionAddress(addr *computealpha.Address, region string) error - - // Beta API - ReserveBetaRegionAddress(address *computebeta.Address, region string) error - GetBetaRegionAddress(name string, region string) (*computebeta.Address, error) - GetBetaRegionAddressByIP(region, ipAddress string) (*computebeta.Address, error) - - // TODO(#51665): Remove this once the Network Tiers becomes Alpha in GCP. - getNetworkTierFromAddress(name, region string) (string, error) -} - -// CloudForwardingRuleService is an interface for managing forwarding rules. -// TODO: Expand the interface to include more methods. -type CloudForwardingRuleService interface { - GetRegionForwardingRule(name, region string) (*compute.ForwardingRule, error) - CreateRegionForwardingRule(rule *compute.ForwardingRule, region string) error - DeleteRegionForwardingRule(name, region string) error - - // Alpha API. - GetAlphaRegionForwardingRule(name, region string) (*computealpha.ForwardingRule, error) - CreateAlphaRegionForwardingRule(rule *computealpha.ForwardingRule, region string) error - - // Needed for the Alpha "Network Tiers" feature. - getNetworkTierFromForwardingRule(name, region string) (string, error) -} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_loadbalancer.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_loadbalancer.go deleted file mode 100644 index 1811c7fec..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_loadbalancer.go +++ /dev/null @@ -1,204 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "flag" - "fmt" - "net" - "strings" - - "github.com/golang/glog" - - "k8s.io/api/core/v1" - "k8s.io/kubernetes/pkg/cloudprovider" - netsets "k8s.io/kubernetes/pkg/util/net/sets" -) - -type cidrs struct { - ipn netsets.IPNet - isSet bool -} - -var ( - lbSrcRngsFlag cidrs -) - -func newLoadBalancerMetricContext(request, region string) *metricContext { - return newGenericMetricContext("loadbalancer", request, region, unusedMetricLabel, computeV1Version) -} - -type lbScheme string - -const ( - schemeExternal lbScheme = "EXTERNAL" - schemeInternal lbScheme = "INTERNAL" -) - -func init() { - var err error - // LB L7 proxies and all L3/4/7 health checkers have client addresses within these known CIDRs. - lbSrcRngsFlag.ipn, err = netsets.ParseIPNets([]string{"130.211.0.0/22", "35.191.0.0/16", "209.85.152.0/22", "209.85.204.0/22"}...) - if err != nil { - panic("Incorrect default GCE L7 source ranges") - } - - flag.Var(&lbSrcRngsFlag, "cloud-provider-gce-lb-src-cidrs", "CIDRS opened in GCE firewall for LB traffic proxy & health checks") -} - -// String is the method to format the flag's value, part of the flag.Value interface. -func (c *cidrs) String() string { - return strings.Join(c.ipn.StringSlice(), ",") -} - -// Set supports a value of CSV or the flag repeated multiple times -func (c *cidrs) Set(value string) error { - // On first Set(), clear the original defaults - if !c.isSet { - c.isSet = true - c.ipn = make(netsets.IPNet) - } else { - return fmt.Errorf("GCE LB CIDRS have already been set") - } - - for _, cidr := range strings.Split(value, ",") { - _, ipnet, err := net.ParseCIDR(cidr) - if err != nil { - return err - } - - c.ipn.Insert(ipnet) - } - return nil -} - -// LoadBalancerSrcRanges contains the ranges of ips used by the GCE load balancers (l4 & L7) -// for proxying client requests and performing health checks. -func LoadBalancerSrcRanges() []string { - return lbSrcRngsFlag.ipn.StringSlice() -} - -// GetLoadBalancer is an implementation of LoadBalancer.GetLoadBalancer -func (gce *GCECloud) GetLoadBalancer(clusterName string, svc *v1.Service) (*v1.LoadBalancerStatus, bool, error) { - loadBalancerName := cloudprovider.GetLoadBalancerName(svc) - fwd, err := gce.GetRegionForwardingRule(loadBalancerName, gce.region) - if err == nil { - status := &v1.LoadBalancerStatus{} - status.Ingress = []v1.LoadBalancerIngress{{IP: fwd.IPAddress}} - - return status, true, nil - } - return nil, false, ignoreNotFound(err) -} - -// EnsureLoadBalancer is an implementation of LoadBalancer.EnsureLoadBalancer. -func (gce *GCECloud) EnsureLoadBalancer(clusterName string, svc *v1.Service, nodes []*v1.Node) (*v1.LoadBalancerStatus, error) { - loadBalancerName := cloudprovider.GetLoadBalancerName(svc) - desiredScheme := getSvcScheme(svc) - clusterID, err := gce.ClusterID.GetID() - if err != nil { - return nil, err - } - - glog.V(4).Infof("EnsureLoadBalancer(%v, %v, %v, %v, %v): ensure %v loadbalancer", clusterName, svc.Namespace, svc.Name, loadBalancerName, gce.region, desiredScheme) - - existingFwdRule, err := gce.GetRegionForwardingRule(loadBalancerName, gce.region) - if err != nil && !isNotFound(err) { - return nil, err - } - - if existingFwdRule != nil { - existingScheme := lbScheme(strings.ToUpper(existingFwdRule.LoadBalancingScheme)) - - // If the loadbalancer type changes between INTERNAL and EXTERNAL, the old load balancer should be deleted. - if existingScheme != desiredScheme { - glog.V(4).Infof("EnsureLoadBalancer(%v, %v, %v, %v, %v): deleting existing %v loadbalancer", clusterName, svc.Namespace, svc.Name, loadBalancerName, gce.region, existingScheme) - switch existingScheme { - case schemeInternal: - err = gce.ensureInternalLoadBalancerDeleted(clusterName, clusterID, svc) - default: - err = gce.ensureExternalLoadBalancerDeleted(clusterName, clusterID, svc) - } - glog.V(4).Infof("EnsureLoadBalancer(%v, %v, %v, %v, %v): done deleting existing %v loadbalancer. err: %v", clusterName, svc.Namespace, svc.Name, loadBalancerName, gce.region, existingScheme, err) - if err != nil { - return nil, err - } - - // Assume the ensureDeleted function successfully deleted the forwarding rule. - existingFwdRule = nil - } - } - - var status *v1.LoadBalancerStatus - switch desiredScheme { - case schemeInternal: - status, err = gce.ensureInternalLoadBalancer(clusterName, clusterID, svc, existingFwdRule, nodes) - default: - status, err = gce.ensureExternalLoadBalancer(clusterName, clusterID, svc, existingFwdRule, nodes) - } - glog.V(4).Infof("EnsureLoadBalancer(%v, %v, %v, %v, %v): done ensuring loadbalancer. err: %v", clusterName, svc.Namespace, svc.Name, loadBalancerName, gce.region, err) - return status, err -} - -// UpdateLoadBalancer is an implementation of LoadBalancer.UpdateLoadBalancer. -func (gce *GCECloud) UpdateLoadBalancer(clusterName string, svc *v1.Service, nodes []*v1.Node) error { - loadBalancerName := cloudprovider.GetLoadBalancerName(svc) - scheme := getSvcScheme(svc) - clusterID, err := gce.ClusterID.GetID() - if err != nil { - return err - } - - glog.V(4).Infof("UpdateLoadBalancer(%v, %v, %v, %v, %v): updating with %d nodes", clusterName, svc.Namespace, svc.Name, loadBalancerName, gce.region, len(nodes)) - - switch scheme { - case schemeInternal: - err = gce.updateInternalLoadBalancer(clusterName, clusterID, svc, nodes) - default: - err = gce.updateExternalLoadBalancer(clusterName, svc, nodes) - } - glog.V(4).Infof("UpdateLoadBalancer(%v, %v, %v, %v, %v): done updating. err: %v", clusterName, svc.Namespace, svc.Name, loadBalancerName, gce.region, err) - return err -} - -// EnsureLoadBalancerDeleted is an implementation of LoadBalancer.EnsureLoadBalancerDeleted. -func (gce *GCECloud) EnsureLoadBalancerDeleted(clusterName string, svc *v1.Service) error { - loadBalancerName := cloudprovider.GetLoadBalancerName(svc) - scheme := getSvcScheme(svc) - clusterID, err := gce.ClusterID.GetID() - if err != nil { - return err - } - - glog.V(4).Infof("EnsureLoadBalancerDeleted(%v, %v, %v, %v, %v): deleting loadbalancer", clusterName, svc.Namespace, svc.Name, loadBalancerName, gce.region) - - switch scheme { - case schemeInternal: - err = gce.ensureInternalLoadBalancerDeleted(clusterName, clusterID, svc) - default: - err = gce.ensureExternalLoadBalancerDeleted(clusterName, clusterID, svc) - } - glog.V(4).Infof("EnsureLoadBalancerDeleted(%v, %v, %v, %v, %v): done deleting loadbalancer. err: %v", clusterName, svc.Namespace, svc.Name, loadBalancerName, gce.region, err) - return err -} - -func getSvcScheme(svc *v1.Service) lbScheme { - if typ, ok := GetLoadBalancerAnnotationType(svc); ok && typ == LBTypeInternal { - return schemeInternal - } - return schemeExternal -} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_loadbalancer_external.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_loadbalancer_external.go deleted file mode 100644 index 0d07647c7..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_loadbalancer_external.go +++ /dev/null @@ -1,1067 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "fmt" - "net/http" - "strconv" - "strings" - - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/types" - utilerrors "k8s.io/apimachinery/pkg/util/errors" - "k8s.io/apimachinery/pkg/util/sets" - apiservice "k8s.io/kubernetes/pkg/api/v1/service" - "k8s.io/kubernetes/pkg/cloudprovider" - netsets "k8s.io/kubernetes/pkg/util/net/sets" - - "github.com/golang/glog" - computealpha "google.golang.org/api/compute/v0.alpha" - compute "google.golang.org/api/compute/v1" -) - -// ensureExternalLoadBalancer is the external implementation of LoadBalancer.EnsureLoadBalancer. -// Our load balancers in GCE consist of four separate GCE resources - a static -// IP address, a firewall rule, a target pool, and a forwarding rule. This -// function has to manage all of them. -// -// Due to an interesting series of design decisions, this handles both creating -// new load balancers and updating existing load balancers, recognizing when -// each is needed. -func (gce *GCECloud) ensureExternalLoadBalancer(clusterName, clusterID string, apiService *v1.Service, existingFwdRule *compute.ForwardingRule, nodes []*v1.Node) (*v1.LoadBalancerStatus, error) { - if len(nodes) == 0 { - return nil, fmt.Errorf("Cannot EnsureLoadBalancer() with no hosts") - } - - hostNames := nodeNames(nodes) - supportsNodesHealthCheck := supportsNodesHealthCheck(nodes) - hosts, err := gce.getInstancesByNames(hostNames) - if err != nil { - return nil, err - } - - loadBalancerName := cloudprovider.GetLoadBalancerName(apiService) - requestedIP := apiService.Spec.LoadBalancerIP - ports := apiService.Spec.Ports - portStr := []string{} - for _, p := range apiService.Spec.Ports { - portStr = append(portStr, fmt.Sprintf("%s/%d", p.Protocol, p.Port)) - } - - affinityType := apiService.Spec.SessionAffinity - - serviceName := types.NamespacedName{Namespace: apiService.Namespace, Name: apiService.Name} - glog.V(2).Infof("EnsureLoadBalancer(%v, %v, %v, %v, %v, %v, %v)", - loadBalancerName, gce.region, requestedIP, portStr, hostNames, serviceName, apiService.Annotations) - - lbRefStr := fmt.Sprintf("%v(%v)", loadBalancerName, serviceName) - // Check the current and the desired network tiers. If they do not match, - // tear down the existing resources with the wrong tier. - netTier, err := gce.getServiceNetworkTier(apiService) - if err != nil { - glog.Errorf("EnsureLoadBalancer(%s): failed to get the desired network tier: %v", lbRefStr, err) - return nil, err - } - glog.V(4).Infof("EnsureLoadBalancer(%s): desired network tier %q ", lbRefStr, netTier) - if gce.AlphaFeatureGate.Enabled(AlphaFeatureNetworkTiers) { - gce.deleteWrongNetworkTieredResources(loadBalancerName, lbRefStr, netTier) - } - - // Check if the forwarding rule exists, and if so, what its IP is. - fwdRuleExists, fwdRuleNeedsUpdate, fwdRuleIP, err := gce.forwardingRuleNeedsUpdate(loadBalancerName, gce.region, requestedIP, ports) - if err != nil { - return nil, err - } - if !fwdRuleExists { - glog.V(2).Infof("Forwarding rule %v for Service %v/%v doesn't exist", - loadBalancerName, apiService.Namespace, apiService.Name) - } - - // Make sure we know which IP address will be used and have properly reserved - // it as static before moving forward with the rest of our operations. - // - // We use static IP addresses when updating a load balancer to ensure that we - // can replace the load balancer's other components without changing the - // address its service is reachable on. We do it this way rather than always - // keeping the static IP around even though this is more complicated because - // it makes it less likely that we'll run into quota issues. Only 7 static - // IP addresses are allowed per region by default. - // - // We could let an IP be allocated for us when the forwarding rule is created, - // but we need the IP to set up the firewall rule, and we want to keep the - // forwarding rule creation as the last thing that needs to be done in this - // function in order to maintain the invariant that "if the forwarding rule - // exists, the LB has been fully created". - ipAddressToUse := "" - - // Through this process we try to keep track of whether it is safe to - // release the IP that was allocated. If the user specifically asked for - // an IP, we assume they are managing it themselves. Otherwise, we will - // release the IP in case of early-terminating failure or upon successful - // creating of the LB. - // TODO(#36535): boil this logic down into a set of component functions - // and key the flag values off of errors returned. - isUserOwnedIP := false // if this is set, we never release the IP - isSafeToReleaseIP := false - defer func() { - if isUserOwnedIP { - return - } - if isSafeToReleaseIP { - if err := gce.DeleteRegionAddress(loadBalancerName, gce.region); err != nil && !isNotFound(err) { - glog.Errorf("Failed to release static IP %s for load balancer (%v(%v), %v): %v", ipAddressToUse, loadBalancerName, serviceName, gce.region, err) - } else if isNotFound(err) { - glog.V(2).Infof("EnsureLoadBalancer(%v(%v)): address %s is not reserved.", loadBalancerName, serviceName, ipAddressToUse) - } else { - glog.V(2).Infof("EnsureLoadBalancer(%v(%v)): released static IP %s", loadBalancerName, serviceName, ipAddressToUse) - } - } else { - glog.Warningf("orphaning static IP %s during update of load balancer (%v(%v), %v): %v", ipAddressToUse, loadBalancerName, serviceName, gce.region, err) - } - }() - - if requestedIP != "" { - // If user requests a specific IP address, verify first. No mutation to - // the GCE resources will be performed in the verification process. - isUserOwnedIP, err = verifyUserRequestedIP(gce, gce.region, requestedIP, fwdRuleIP, lbRefStr, netTier) - if err != nil { - return nil, err - } - ipAddressToUse = requestedIP - } - - if !isUserOwnedIP { - // If we are not using the user-owned IP, either promote the - // emphemeral IP used by the fwd rule, or create a new static IP. - ipAddr, existed, err := ensureStaticIP(gce, loadBalancerName, serviceName.String(), gce.region, fwdRuleIP, netTier) - if err != nil { - return nil, fmt.Errorf("failed to ensure a static IP for the LB: %v", err) - } - glog.V(4).Infof("EnsureLoadBalancer(%s): ensured IP address %s (tier: %s)", lbRefStr, ipAddr, netTier) - // If the IP was not owned by the user, but it already existed, it - // could indicate that the previous update cycle failed. We can use - // this IP and try to run through the process again, but we should - // not release the IP unless it is explicitly flagged as OK. - isSafeToReleaseIP = !existed - ipAddressToUse = ipAddr - } - - // Deal with the firewall next. The reason we do this here rather than last - // is because the forwarding rule is used as the indicator that the load - // balancer is fully created - it's what getLoadBalancer checks for. - // Check if user specified the allow source range - sourceRanges, err := apiservice.GetLoadBalancerSourceRanges(apiService) - if err != nil { - return nil, err - } - - firewallExists, firewallNeedsUpdate, err := gce.firewallNeedsUpdate(loadBalancerName, serviceName.String(), gce.region, ipAddressToUse, ports, sourceRanges) - if err != nil { - return nil, err - } - - if firewallNeedsUpdate { - desc := makeFirewallDescription(serviceName.String(), ipAddressToUse) - // Unlike forwarding rules and target pools, firewalls can be updated - // without needing to be deleted and recreated. - if firewallExists { - glog.Infof("EnsureLoadBalancer(%v(%v)): updating firewall", loadBalancerName, serviceName) - if err := gce.updateFirewall(apiService, makeFirewallName(loadBalancerName), gce.region, desc, sourceRanges, ports, hosts); err != nil { - return nil, err - } - glog.Infof("EnsureLoadBalancer(%v(%v)): updated firewall", loadBalancerName, serviceName) - } else { - glog.Infof("EnsureLoadBalancer(%v(%v)): creating firewall", loadBalancerName, serviceName) - if err := gce.createFirewall(apiService, makeFirewallName(loadBalancerName), gce.region, desc, sourceRanges, ports, hosts); err != nil { - return nil, err - } - glog.Infof("EnsureLoadBalancer(%v(%v)): created firewall", loadBalancerName, serviceName) - } - } - - tpExists, tpNeedsUpdate, err := gce.targetPoolNeedsUpdate(loadBalancerName, gce.region, affinityType) - if err != nil { - return nil, err - } - if !tpExists { - glog.Infof("Target pool %v for Service %v/%v doesn't exist", loadBalancerName, apiService.Namespace, apiService.Name) - } - - // Check which health check needs to create and which health check needs to delete. - // Health check management is coupled with target pool operation to prevent leaking. - var hcToCreate, hcToDelete *compute.HttpHealthCheck - hcLocalTrafficExisting, err := gce.GetHttpHealthCheck(loadBalancerName) - if err != nil && !isHTTPErrorCode(err, http.StatusNotFound) { - return nil, fmt.Errorf("error checking HTTP health check %s: %v", loadBalancerName, err) - } - if path, healthCheckNodePort := apiservice.GetServiceHealthCheckPathPort(apiService); path != "" { - glog.V(4).Infof("service %v (%v) needs local traffic health checks on: %d%s)", apiService.Name, loadBalancerName, healthCheckNodePort, path) - if hcLocalTrafficExisting == nil { - // This logic exists to detect a transition for non-OnlyLocal to OnlyLocal service - // turn on the tpNeedsUpdate flag to delete/recreate fwdrule/tpool updating the - // target pool to use local traffic health check. - glog.V(2).Infof("Updating from nodes health checks to local traffic health checks for service %v LB %v", apiService.Name, loadBalancerName) - if supportsNodesHealthCheck { - hcToDelete = makeHttpHealthCheck(makeNodesHealthCheckName(clusterID), GetNodesHealthCheckPath(), GetNodesHealthCheckPort()) - } - tpNeedsUpdate = true - } - hcToCreate = makeHttpHealthCheck(loadBalancerName, path, healthCheckNodePort) - } else { - glog.V(4).Infof("Service %v needs nodes health checks.", apiService.Name) - if hcLocalTrafficExisting != nil { - // This logic exists to detect a transition from OnlyLocal to non-OnlyLocal service - // and turn on the tpNeedsUpdate flag to delete/recreate fwdrule/tpool updating the - // target pool to use nodes health check. - glog.V(2).Infof("Updating from local traffic health checks to nodes health checks for service %v LB %v", apiService.Name, loadBalancerName) - hcToDelete = hcLocalTrafficExisting - tpNeedsUpdate = true - } - if supportsNodesHealthCheck { - hcToCreate = makeHttpHealthCheck(makeNodesHealthCheckName(clusterID), GetNodesHealthCheckPath(), GetNodesHealthCheckPort()) - } - } - // Now we get to some slightly more interesting logic. - // First, neither target pools nor forwarding rules can be updated in place - - // they have to be deleted and recreated. - // Second, forwarding rules are layered on top of target pools in that you - // can't delete a target pool that's currently in use by a forwarding rule. - // Thus, we have to tear down the forwarding rule if either it or the target - // pool needs to be updated. - if fwdRuleExists && (fwdRuleNeedsUpdate || tpNeedsUpdate) { - // Begin critical section. If we have to delete the forwarding rule, - // and something should fail before we recreate it, don't release the - // IP. That way we can come back to it later. - isSafeToReleaseIP = false - if err := gce.DeleteRegionForwardingRule(loadBalancerName, gce.region); err != nil && !isNotFound(err) { - return nil, fmt.Errorf("failed to delete existing forwarding rule %s for load balancer update: %v", loadBalancerName, err) - } - glog.Infof("EnsureLoadBalancer(%v(%v)): deleted forwarding rule", loadBalancerName, serviceName) - } - if tpExists && tpNeedsUpdate { - // Pass healthchecks to DeleteExternalTargetPoolAndChecks to cleanup health checks after cleaning up the target pool itself. - var hcNames []string - if hcToDelete != nil { - hcNames = append(hcNames, hcToDelete.Name) - } - if err := gce.DeleteExternalTargetPoolAndChecks(apiService, loadBalancerName, gce.region, clusterID, hcNames...); err != nil { - return nil, fmt.Errorf("failed to delete existing target pool %s for load balancer update: %v", loadBalancerName, err) - } - glog.Infof("EnsureLoadBalancer(%v(%v)): deleted target pool", loadBalancerName, serviceName) - } - - // Once we've deleted the resources (if necessary), build them back up (or for - // the first time if they're new). - if tpNeedsUpdate { - createInstances := hosts - if len(hosts) > maxTargetPoolCreateInstances { - createInstances = createInstances[:maxTargetPoolCreateInstances] - } - // Pass healthchecks to createTargetPool which needs them as health check links in the target pool - if err := gce.createTargetPool(apiService, loadBalancerName, serviceName.String(), ipAddressToUse, gce.region, clusterID, createInstances, affinityType, hcToCreate); err != nil { - return nil, fmt.Errorf("failed to create target pool %s: %v", loadBalancerName, err) - } - if hcToCreate != nil { - glog.Infof("EnsureLoadBalancer(%v(%v)): created health checks %v for target pool", loadBalancerName, serviceName, hcToCreate.Name) - } - if len(hosts) <= maxTargetPoolCreateInstances { - glog.Infof("EnsureLoadBalancer(%v(%v)): created target pool", loadBalancerName, serviceName) - } else { - glog.Infof("EnsureLoadBalancer(%v(%v)): created initial target pool (now updating with %d hosts)", loadBalancerName, serviceName, len(hosts)-maxTargetPoolCreateInstances) - - created := sets.NewString() - for _, host := range createInstances { - created.Insert(host.makeComparableHostPath()) - } - if err := gce.updateTargetPool(loadBalancerName, created, hosts); err != nil { - return nil, fmt.Errorf("failed to update target pool %s: %v", loadBalancerName, err) - } - glog.Infof("EnsureLoadBalancer(%v(%v)): updated target pool (with %d hosts)", loadBalancerName, serviceName, len(hosts)-maxTargetPoolCreateInstances) - } - } - if tpNeedsUpdate || fwdRuleNeedsUpdate { - glog.Infof("EnsureLoadBalancer(%v(%v)): creating forwarding rule, IP %s (tier: %s)", loadBalancerName, serviceName, ipAddressToUse, netTier) - if err := createForwardingRule(gce, loadBalancerName, serviceName.String(), gce.region, ipAddressToUse, gce.targetPoolURL(loadBalancerName), ports, netTier); err != nil { - return nil, fmt.Errorf("failed to create forwarding rule %s: %v", loadBalancerName, err) - } - // End critical section. It is safe to release the static IP (which - // just demotes it to ephemeral) now that it is attached. In the case - // of a user-requested IP, the "is user-owned" flag will be set, - // preventing it from actually being released. - isSafeToReleaseIP = true - glog.Infof("EnsureLoadBalancer(%v(%v)): created forwarding rule, IP %s", loadBalancerName, serviceName, ipAddressToUse) - } - - status := &v1.LoadBalancerStatus{} - status.Ingress = []v1.LoadBalancerIngress{{IP: ipAddressToUse}} - - return status, nil -} - -// updateExternalLoadBalancer is the external implementation of LoadBalancer.UpdateLoadBalancer. -func (gce *GCECloud) updateExternalLoadBalancer(clusterName string, service *v1.Service, nodes []*v1.Node) error { - hosts, err := gce.getInstancesByNames(nodeNames(nodes)) - if err != nil { - return err - } - - loadBalancerName := cloudprovider.GetLoadBalancerName(service) - pool, err := gce.service.TargetPools.Get(gce.projectID, gce.region, loadBalancerName).Do() - if err != nil { - return err - } - existing := sets.NewString() - for _, instance := range pool.Instances { - existing.Insert(hostURLToComparablePath(instance)) - } - - return gce.updateTargetPool(loadBalancerName, existing, hosts) -} - -// ensureExternalLoadBalancerDeleted is the external implementation of LoadBalancer.EnsureLoadBalancerDeleted -func (gce *GCECloud) ensureExternalLoadBalancerDeleted(clusterName, clusterID string, service *v1.Service) error { - loadBalancerName := cloudprovider.GetLoadBalancerName(service) - - var hcNames []string - if path, _ := apiservice.GetServiceHealthCheckPathPort(service); path != "" { - hcToDelete, err := gce.GetHttpHealthCheck(loadBalancerName) - if err != nil && !isHTTPErrorCode(err, http.StatusNotFound) { - glog.Infof("Failed to retrieve health check %v:%v", loadBalancerName, err) - return err - } - hcNames = append(hcNames, hcToDelete.Name) - } else { - // EnsureLoadBalancerDeleted() could be triggered by changing service from - // LoadBalancer type to others. In this case we have no idea whether it was - // using local traffic health check or nodes health check. Attempt to delete - // both to prevent leaking. - hcNames = append(hcNames, loadBalancerName) - hcNames = append(hcNames, makeNodesHealthCheckName(clusterID)) - } - - errs := utilerrors.AggregateGoroutines( - func() error { - fwName := makeFirewallName(loadBalancerName) - err := ignoreNotFound(gce.DeleteFirewall(fwName)) - if isForbidden(err) && gce.OnXPN() { - glog.V(4).Infof("ensureExternalLoadBalancerDeleted(%v): do not have permission to delete firewall rule (on XPN). Raising event.", loadBalancerName) - gce.raiseFirewallChangeNeededEvent(service, FirewallToGCloudDeleteCmd(fwName, gce.NetworkProjectID())) - return nil - } - return err - }, - // Even though we don't hold on to static IPs for load balancers, it's - // possible that EnsureLoadBalancer left one around in a failed - // creation/update attempt, so make sure we clean it up here just in case. - func() error { return ignoreNotFound(gce.DeleteRegionAddress(loadBalancerName, gce.region)) }, - func() error { - // The forwarding rule must be deleted before either the target pool can, - // unfortunately, so we have to do these two serially. - if err := ignoreNotFound(gce.DeleteRegionForwardingRule(loadBalancerName, gce.region)); err != nil { - return err - } - if err := gce.DeleteExternalTargetPoolAndChecks(service, loadBalancerName, gce.region, clusterID, hcNames...); err != nil { - return err - } - return nil - }, - ) - if errs != nil { - return utilerrors.Flatten(errs) - } - return nil -} - -func (gce *GCECloud) DeleteExternalTargetPoolAndChecks(service *v1.Service, name, region, clusterID string, hcNames ...string) error { - if err := gce.DeleteTargetPool(name, region); err != nil && isHTTPErrorCode(err, http.StatusNotFound) { - glog.Infof("Target pool %s already deleted. Continuing to delete other resources.", name) - } else if err != nil { - glog.Warningf("Failed to delete target pool %s, got error %s.", name, err.Error()) - return err - } - - // Deletion of health checks is allowed only after the TargetPool reference is deleted - for _, hcName := range hcNames { - if err := func() error { - // Check whether it is nodes health check, which has different name from the load-balancer. - isNodesHealthCheck := hcName != name - if isNodesHealthCheck { - // Lock to prevent deleting necessary nodes health check before it gets attached - // to target pool. - gce.sharedResourceLock.Lock() - defer gce.sharedResourceLock.Unlock() - } - glog.Infof("Deleting health check %v", hcName) - if err := gce.DeleteHttpHealthCheck(hcName); err != nil { - // Delete nodes health checks will fail if any other target pool is using it. - if isInUsedByError(err) { - glog.V(4).Infof("Health check %v is in used: %v.", hcName, err) - return nil - } else if !isHTTPErrorCode(err, http.StatusNotFound) { - glog.Warningf("Failed to delete health check %v: %v", hcName, err) - return err - } - // StatusNotFound could happen when: - // - This is the first attempt but we pass in a healthcheck that is already deleted - // to prevent leaking. - // - This is the first attempt but user manually deleted the heathcheck. - // - This is a retry and in previous round we failed to delete the healthcheck firewall - // after deleted the healthcheck. - // We continue to delete the healthcheck firewall to prevent leaking. - glog.V(4).Infof("Health check %v is already deleted.", hcName) - } - // If health check is deleted without error, it means no load-balancer is using it. - // So we should delete the health check firewall as well. - fwName := MakeHealthCheckFirewallName(clusterID, hcName, isNodesHealthCheck) - glog.Infof("Deleting firewall %v.", fwName) - if err := ignoreNotFound(gce.DeleteFirewall(fwName)); err != nil { - if isForbidden(err) && gce.OnXPN() { - glog.V(4).Infof("DeleteExternalTargetPoolAndChecks(%v): do not have permission to delete firewall rule (on XPN). Raising event.", hcName) - gce.raiseFirewallChangeNeededEvent(service, FirewallToGCloudDeleteCmd(fwName, gce.NetworkProjectID())) - return nil - } - return err - } - return nil - }(); err != nil { - return err - } - } - - return nil -} - -// verifyUserRequestedIP checks the user-provided IP to see whether it meets -// all the expected attributes for the load balancer, and returns an error if -// the verification failed. It also returns a boolean to indicate whether the -// IP address is considered owned by the user (i.e., not managed by the -// controller. -func verifyUserRequestedIP(s CloudAddressService, region, requestedIP, fwdRuleIP, lbRef string, desiredNetTier NetworkTier) (isUserOwnedIP bool, err error) { - if requestedIP == "" { - return false, nil - } - // If a specific IP address has been requested, we have to respect the - // user's request and use that IP. If the forwarding rule was already using - // a different IP, it will be harmlessly abandoned because it was only an - // ephemeral IP (or it was a different static IP owned by the user, in which - // case we shouldn't delete it anyway). - existingAddress, err := s.GetRegionAddressByIP(region, requestedIP) - if err != nil && !isNotFound(err) { - glog.Errorf("verifyUserRequestedIP: failed to check whether the requested IP %q for LB %s exists: %v", requestedIP, lbRef, err) - return false, err - } - if err == nil { - // The requested IP is a static IP, owned and managed by the user. - - // Check if the network tier of the static IP matches the desired - // network tier. - netTierStr, err := s.getNetworkTierFromAddress(existingAddress.Name, region) - if err != nil { - return false, fmt.Errorf("failed to check the network tier of the IP %q: %v", requestedIP, err) - } - netTier := NetworkTierGCEValueToType(netTierStr) - if netTier != desiredNetTier { - glog.Errorf("verifyUserRequestedIP: requested static IP %q (name: %s) for LB %s has network tier %s, need %s.", requestedIP, existingAddress.Name, lbRef, netTier, desiredNetTier) - return false, fmt.Errorf("requrested IP %q belongs to the %s network tier; expected %s", requestedIP, netTier, desiredNetTier) - } - glog.V(4).Infof("verifyUserRequestedIP: the requested static IP %q (name: %s, tier: %s) for LB %s exists.", requestedIP, existingAddress.Name, netTier, lbRef) - return true, nil - } - if requestedIP == fwdRuleIP { - // The requested IP is not a static IP, but is currently assigned - // to this forwarding rule, so we can just use it. - glog.V(4).Infof("verifyUserRequestedIP: the requested IP %q is not static, but is currently in use by for LB %s", requestedIP, lbRef) - return false, nil - } - // The requested IP is not static and it is not assigned to the - // current forwarding rule. It might be attached to a different - // rule or it might not be part of this project at all. Either - // way, we can't use it. - glog.Errorf("verifyUserRequestedIP: requested IP %q for LB %s is neither static nor assigned to the LB", requestedIP, lbRef) - return false, fmt.Errorf("requested ip %q is neither static nor assigned to the LB", requestedIP) -} - -func (gce *GCECloud) createTargetPool(svc *v1.Service, name, serviceName, ipAddress, region, clusterID string, hosts []*gceInstance, affinityType v1.ServiceAffinity, hc *compute.HttpHealthCheck) error { - // health check management is coupled with targetPools to prevent leaks. A - // target pool is the only thing that requires a health check, so we delete - // associated checks on teardown, and ensure checks on setup. - hcLinks := []string{} - if hc != nil { - // Check whether it is nodes health check, which has different name from the load-balancer. - isNodesHealthCheck := hc.Name != name - if isNodesHealthCheck { - // Lock to prevent necessary nodes health check / firewall gets deleted. - gce.sharedResourceLock.Lock() - defer gce.sharedResourceLock.Unlock() - } - - if err := gce.ensureHttpHealthCheckFirewall(svc, serviceName, ipAddress, region, clusterID, hosts, hc.Name, int32(hc.Port), isNodesHealthCheck); err != nil { - return err - } - var err error - hcRequestPath, hcPort := hc.RequestPath, hc.Port - if hc, err = gce.ensureHttpHealthCheck(hc.Name, hc.RequestPath, int32(hc.Port)); err != nil || hc == nil { - return fmt.Errorf("Failed to ensure health check for %v port %d path %v: %v", name, hcPort, hcRequestPath, err) - } - hcLinks = append(hcLinks, hc.SelfLink) - } - - var instances []string - for _, host := range hosts { - instances = append(instances, makeHostURL(gce.service.BasePath, gce.projectID, host.Zone, host.Name)) - } - glog.Infof("Creating targetpool %v with %d healthchecks", name, len(hcLinks)) - pool := &compute.TargetPool{ - Name: name, - Description: fmt.Sprintf(`{"kubernetes.io/service-name":"%s"}`, serviceName), - Instances: instances, - SessionAffinity: translateAffinityType(affinityType), - HealthChecks: hcLinks, - } - - if err := gce.CreateTargetPool(pool, region); err != nil && !isHTTPErrorCode(err, http.StatusConflict) { - return err - } - return nil -} - -func (gce *GCECloud) updateTargetPool(loadBalancerName string, existing sets.String, hosts []*gceInstance) error { - var toAdd []*compute.InstanceReference - var toRemove []*compute.InstanceReference - for _, host := range hosts { - link := host.makeComparableHostPath() - if !existing.Has(link) { - toAdd = append(toAdd, &compute.InstanceReference{Instance: link}) - } - existing.Delete(link) - } - for link := range existing { - toRemove = append(toRemove, &compute.InstanceReference{Instance: link}) - } - - if len(toAdd) > 0 { - if err := gce.AddInstancesToTargetPool(loadBalancerName, gce.region, toAdd); err != nil { - return err - } - } - - if len(toRemove) > 0 { - if err := gce.RemoveInstancesFromTargetPool(loadBalancerName, gce.region, toRemove); err != nil { - return err - } - } - - // Try to verify that the correct number of nodes are now in the target pool. - // We've been bitten by a bug here before (#11327) where all nodes were - // accidentally removed and want to make similar problems easier to notice. - updatedPool, err := gce.GetTargetPool(loadBalancerName, gce.region) - if err != nil { - return err - } - if len(updatedPool.Instances) != len(hosts) { - glog.Errorf("Unexpected number of instances (%d) in target pool %s after updating (expected %d). Instances in updated pool: %s", - len(updatedPool.Instances), loadBalancerName, len(hosts), strings.Join(updatedPool.Instances, ",")) - return fmt.Errorf("Unexpected number of instances (%d) in target pool %s after update (expected %d)", len(updatedPool.Instances), loadBalancerName, len(hosts)) - } - return nil -} - -func (gce *GCECloud) targetPoolURL(name string) string { - return gce.service.BasePath + strings.Join([]string{gce.projectID, "regions", gce.region, "targetPools", name}, "/") -} - -func makeHttpHealthCheck(name, path string, port int32) *compute.HttpHealthCheck { - return &compute.HttpHealthCheck{ - Name: name, - Port: int64(port), - RequestPath: path, - Host: "", - Description: makeHealthCheckDescription(name), - CheckIntervalSec: gceHcCheckIntervalSeconds, - TimeoutSec: gceHcTimeoutSeconds, - HealthyThreshold: gceHcHealthyThreshold, - UnhealthyThreshold: gceHcUnhealthyThreshold, - } -} - -func (gce *GCECloud) ensureHttpHealthCheck(name, path string, port int32) (hc *compute.HttpHealthCheck, err error) { - newHC := makeHttpHealthCheck(name, path, port) - hc, err = gce.GetHttpHealthCheck(name) - if hc == nil || err != nil && isHTTPErrorCode(err, http.StatusNotFound) { - glog.Infof("Did not find health check %v, creating port %v path %v", name, port, path) - if err = gce.CreateHttpHealthCheck(newHC); err != nil { - return nil, err - } - hc, err = gce.GetHttpHealthCheck(name) - if err != nil { - glog.Errorf("Failed to get http health check %v", err) - return nil, err - } - glog.Infof("Created HTTP health check %v healthCheckNodePort: %d", name, port) - return hc, nil - } - // Validate health check fields - glog.V(4).Infof("Checking http health check params %s", name) - drift := hc.Port != int64(port) || hc.RequestPath != path || hc.Description != makeHealthCheckDescription(name) - drift = drift || hc.CheckIntervalSec != gceHcCheckIntervalSeconds || hc.TimeoutSec != gceHcTimeoutSeconds - drift = drift || hc.UnhealthyThreshold != gceHcUnhealthyThreshold || hc.HealthyThreshold != gceHcHealthyThreshold - if drift { - glog.Warningf("Health check %v exists but parameters have drifted - updating...", name) - if err := gce.UpdateHttpHealthCheck(newHC); err != nil { - glog.Warningf("Failed to reconcile http health check %v parameters", name) - return nil, err - } - glog.V(4).Infof("Corrected health check %v parameters successful", name) - } - return hc, nil -} - -// Passing nil for requested IP is perfectly fine - it just means that no specific -// IP is being requested. -// Returns whether the forwarding rule exists, whether it needs to be updated, -// what its IP address is (if it exists), and any error we encountered. -func (gce *GCECloud) forwardingRuleNeedsUpdate(name, region string, loadBalancerIP string, ports []v1.ServicePort) (exists bool, needsUpdate bool, ipAddress string, err error) { - fwd, err := gce.service.ForwardingRules.Get(gce.projectID, region, name).Do() - if err != nil { - if isHTTPErrorCode(err, http.StatusNotFound) { - return false, true, "", nil - } - // Err on the side of caution in case of errors. Caller should notice the error and retry. - // We never want to end up recreating resources because gce api flaked. - return true, false, "", fmt.Errorf("error getting load balancer's forwarding rule: %v", err) - } - // If the user asks for a specific static ip through the Service spec, - // check that we're actually using it. - // TODO: we report loadbalancer IP through status, so we want to verify if - // that matches the forwarding rule as well. - if loadBalancerIP != "" && loadBalancerIP != fwd.IPAddress { - glog.Infof("LoadBalancer ip for forwarding rule %v was expected to be %v, but was actually %v", fwd.Name, fwd.IPAddress, loadBalancerIP) - return true, true, fwd.IPAddress, nil - } - portRange, err := loadBalancerPortRange(ports) - if err != nil { - // Err on the side of caution in case of errors. Caller should notice the error and retry. - // We never want to end up recreating resources because gce api flaked. - return true, false, "", err - } - if portRange != fwd.PortRange { - glog.Infof("LoadBalancer port range for forwarding rule %v was expected to be %v, but was actually %v", fwd.Name, fwd.PortRange, portRange) - return true, true, fwd.IPAddress, nil - } - // The service controller verified all the protocols match on the ports, just check the first one - if string(ports[0].Protocol) != fwd.IPProtocol { - glog.Infof("LoadBalancer protocol for forwarding rule %v was expected to be %v, but was actually %v", fwd.Name, fwd.IPProtocol, string(ports[0].Protocol)) - return true, true, fwd.IPAddress, nil - } - - return true, false, fwd.IPAddress, nil -} - -// Doesn't check whether the hosts have changed, since host updating is handled -// separately. -func (gce *GCECloud) targetPoolNeedsUpdate(name, region string, affinityType v1.ServiceAffinity) (exists bool, needsUpdate bool, err error) { - tp, err := gce.service.TargetPools.Get(gce.projectID, region, name).Do() - if err != nil { - if isHTTPErrorCode(err, http.StatusNotFound) { - return false, true, nil - } - // Err on the side of caution in case of errors. Caller should notice the error and retry. - // We never want to end up recreating resources because gce api flaked. - return true, false, fmt.Errorf("error getting load balancer's target pool: %v", err) - } - // TODO: If the user modifies their Service's session affinity, it *should* - // reflect in the associated target pool. However, currently not setting the - // session affinity on a target pool defaults it to the empty string while - // not setting in on a Service defaults it to None. There is a lack of - // documentation around the default setting for the target pool, so if we - // find it's the undocumented empty string, don't blindly recreate the - // target pool (which results in downtime). Fix this when we have formally - // defined the defaults on either side. - if tp.SessionAffinity != "" && translateAffinityType(affinityType) != tp.SessionAffinity { - glog.Infof("LoadBalancer target pool %v changed affinity from %v to %v", name, tp.SessionAffinity, affinityType) - return true, true, nil - } - return true, false, nil -} - -func (h *gceInstance) makeComparableHostPath() string { - return fmt.Sprintf("/zones/%s/instances/%s", h.Zone, h.Name) -} - -func nodeNames(nodes []*v1.Node) []string { - ret := make([]string, len(nodes)) - for i, node := range nodes { - ret[i] = node.Name - } - return ret -} - -func makeHostURL(projectsApiEndpoint, projectID, zone, host string) string { - host = canonicalizeInstanceName(host) - return projectsApiEndpoint + strings.Join([]string{projectID, "zones", zone, "instances", host}, "/") -} - -func hostURLToComparablePath(hostURL string) string { - idx := strings.Index(hostURL, "/zones/") - if idx < 0 { - return "" - } - return hostURL[idx:] -} - -func loadBalancerPortRange(ports []v1.ServicePort) (string, error) { - if len(ports) == 0 { - return "", fmt.Errorf("no ports specified for GCE load balancer") - } - - // The service controller verified all the protocols match on the ports, just check and use the first one - if ports[0].Protocol != v1.ProtocolTCP && ports[0].Protocol != v1.ProtocolUDP { - return "", fmt.Errorf("Invalid protocol %s, only TCP and UDP are supported", string(ports[0].Protocol)) - } - - minPort := int32(65536) - maxPort := int32(0) - for i := range ports { - if ports[i].Port < minPort { - minPort = ports[i].Port - } - if ports[i].Port > maxPort { - maxPort = ports[i].Port - } - } - return fmt.Sprintf("%d-%d", minPort, maxPort), nil -} - -// translate from what K8s supports to what the cloud provider supports for session affinity. -func translateAffinityType(affinityType v1.ServiceAffinity) string { - switch affinityType { - case v1.ServiceAffinityClientIP: - return gceAffinityTypeClientIP - case v1.ServiceAffinityNone: - return gceAffinityTypeNone - default: - glog.Errorf("Unexpected affinity type: %v", affinityType) - return gceAffinityTypeNone - } -} - -func (gce *GCECloud) firewallNeedsUpdate(name, serviceName, region, ipAddress string, ports []v1.ServicePort, sourceRanges netsets.IPNet) (exists bool, needsUpdate bool, err error) { - fw, err := gce.service.Firewalls.Get(gce.NetworkProjectID(), makeFirewallName(name)).Do() - if err != nil { - if isHTTPErrorCode(err, http.StatusNotFound) { - return false, true, nil - } - return false, false, fmt.Errorf("error getting load balancer's firewall: %v", err) - } - if fw.Description != makeFirewallDescription(serviceName, ipAddress) { - return true, true, nil - } - if len(fw.Allowed) != 1 || (fw.Allowed[0].IPProtocol != "tcp" && fw.Allowed[0].IPProtocol != "udp") { - return true, true, nil - } - // Make sure the allowed ports match. - allowedPorts := make([]string, len(ports)) - for ix := range ports { - allowedPorts[ix] = strconv.Itoa(int(ports[ix].Port)) - } - if !equalStringSets(allowedPorts, fw.Allowed[0].Ports) { - return true, true, nil - } - // The service controller already verified that the protocol matches on all ports, no need to check. - - actualSourceRanges, err := netsets.ParseIPNets(fw.SourceRanges...) - if err != nil { - // This really shouldn't happen... GCE has returned something unexpected - glog.Warningf("Error parsing firewall SourceRanges: %v", fw.SourceRanges) - // We don't return the error, because we can hopefully recover from this by reconfiguring the firewall - return true, true, nil - } - - if !sourceRanges.Equal(actualSourceRanges) { - return true, true, nil - } - return true, false, nil -} - -func (gce *GCECloud) ensureHttpHealthCheckFirewall(svc *v1.Service, serviceName, ipAddress, region, clusterID string, hosts []*gceInstance, hcName string, hcPort int32, isNodesHealthCheck bool) error { - // Prepare the firewall params for creating / checking. - desc := fmt.Sprintf(`{"kubernetes.io/cluster-id":"%s"}`, clusterID) - if !isNodesHealthCheck { - desc = makeFirewallDescription(serviceName, ipAddress) - } - sourceRanges := lbSrcRngsFlag.ipn - ports := []v1.ServicePort{{Protocol: "tcp", Port: hcPort}} - - fwName := MakeHealthCheckFirewallName(clusterID, hcName, isNodesHealthCheck) - fw, err := gce.service.Firewalls.Get(gce.NetworkProjectID(), fwName).Do() - if err != nil { - if !isHTTPErrorCode(err, http.StatusNotFound) { - return fmt.Errorf("error getting firewall for health checks: %v", err) - } - glog.Infof("Creating firewall %v for health checks.", fwName) - if err := gce.createFirewall(svc, fwName, region, desc, sourceRanges, ports, hosts); err != nil { - return err - } - glog.Infof("Created firewall %v for health checks.", fwName) - return nil - } - // Validate firewall fields. - if fw.Description != desc || - len(fw.Allowed) != 1 || - fw.Allowed[0].IPProtocol != string(ports[0].Protocol) || - !equalStringSets(fw.Allowed[0].Ports, []string{strconv.Itoa(int(ports[0].Port))}) || - !equalStringSets(fw.SourceRanges, sourceRanges.StringSlice()) { - glog.Warningf("Firewall %v exists but parameters have drifted - updating...", fwName) - if err := gce.updateFirewall(svc, fwName, region, desc, sourceRanges, ports, hosts); err != nil { - glog.Warningf("Failed to reconcile firewall %v parameters.", fwName) - return err - } - glog.V(4).Infof("Corrected firewall %v parameters successful", fwName) - } - return nil -} - -func createForwardingRule(s CloudForwardingRuleService, name, serviceName, region, ipAddress, target string, ports []v1.ServicePort, netTier NetworkTier) error { - portRange, err := loadBalancerPortRange(ports) - if err != nil { - return err - } - desc := makeServiceDescription(serviceName) - ipProtocol := string(ports[0].Protocol) - - switch netTier { - case NetworkTierPremium: - rule := &compute.ForwardingRule{ - Name: name, - Description: desc, - IPAddress: ipAddress, - IPProtocol: ipProtocol, - PortRange: portRange, - Target: target, - } - err = s.CreateRegionForwardingRule(rule, region) - default: - rule := &computealpha.ForwardingRule{ - Name: name, - Description: desc, - IPAddress: ipAddress, - IPProtocol: ipProtocol, - PortRange: portRange, - Target: target, - NetworkTier: netTier.ToGCEValue(), - } - err = s.CreateAlphaRegionForwardingRule(rule, region) - } - - if err != nil && !isHTTPErrorCode(err, http.StatusConflict) { - return err - } - - return nil -} - -func (gce *GCECloud) createFirewall(svc *v1.Service, name, region, desc string, sourceRanges netsets.IPNet, ports []v1.ServicePort, hosts []*gceInstance) error { - firewall, err := gce.firewallObject(name, region, desc, sourceRanges, ports, hosts) - if err != nil { - return err - } - if err = gce.CreateFirewall(firewall); err != nil { - if isHTTPErrorCode(err, http.StatusConflict) { - return nil - } else if isForbidden(err) && gce.OnXPN() { - glog.V(4).Infof("createFirewall(%v): do not have permission to create firewall rule (on XPN). Raising event.", firewall.Name) - gce.raiseFirewallChangeNeededEvent(svc, FirewallToGCloudCreateCmd(firewall, gce.NetworkProjectID())) - return nil - } - return err - } - return nil -} - -func (gce *GCECloud) updateFirewall(svc *v1.Service, name, region, desc string, sourceRanges netsets.IPNet, ports []v1.ServicePort, hosts []*gceInstance) error { - firewall, err := gce.firewallObject(name, region, desc, sourceRanges, ports, hosts) - if err != nil { - return err - } - - if err = gce.UpdateFirewall(firewall); err != nil { - if isHTTPErrorCode(err, http.StatusConflict) { - return nil - } else if isForbidden(err) && gce.OnXPN() { - glog.V(4).Infof("updateFirewall(%v): do not have permission to update firewall rule (on XPN). Raising event.", firewall.Name) - gce.raiseFirewallChangeNeededEvent(svc, FirewallToGCloudUpdateCmd(firewall, gce.NetworkProjectID())) - return nil - } - return err - } - return nil -} - -func (gce *GCECloud) firewallObject(name, region, desc string, sourceRanges netsets.IPNet, ports []v1.ServicePort, hosts []*gceInstance) (*compute.Firewall, error) { - allowedPorts := make([]string, len(ports)) - for ix := range ports { - allowedPorts[ix] = strconv.Itoa(int(ports[ix].Port)) - } - // If the node tags to be used for this cluster have been predefined in the - // provider config, just use them. Otherwise, invoke computeHostTags method to get the tags. - hostTags := gce.nodeTags - if len(hostTags) == 0 { - var err error - if hostTags, err = gce.computeHostTags(hosts); err != nil { - return nil, fmt.Errorf("No node tags supplied and also failed to parse the given lists of hosts for tags. Abort creating firewall rule.") - } - } - - firewall := &compute.Firewall{ - Name: name, - Description: desc, - Network: gce.networkURL, - SourceRanges: sourceRanges.StringSlice(), - TargetTags: hostTags, - Allowed: []*compute.FirewallAllowed{ - { - // TODO: Make this more generic. Currently this method is only - // used to create firewall rules for loadbalancers, which have - // exactly one protocol, so we can never end up with a list of - // mixed TCP and UDP ports. It should be possible to use a - // single firewall rule for both a TCP and UDP lb. - IPProtocol: strings.ToLower(string(ports[0].Protocol)), - Ports: allowedPorts, - }, - }, - } - return firewall, nil -} - -func ensureStaticIP(s CloudAddressService, name, serviceName, region, existingIP string, netTier NetworkTier) (ipAddress string, existing bool, err error) { - // If the address doesn't exist, this will create it. - // If the existingIP exists but is ephemeral, this will promote it to static. - // If the address already exists, this will harmlessly return a StatusConflict - // and we'll grab the IP before returning. - existed := false - desc := makeServiceDescription(serviceName) - - var creationErr error - switch netTier { - case NetworkTierPremium: - addressObj := &compute.Address{ - Name: name, - Description: desc, - } - if existingIP != "" { - addressObj.Address = existingIP - } - creationErr = s.ReserveRegionAddress(addressObj, region) - default: - addressObj := &computealpha.Address{ - Name: name, - Description: desc, - NetworkTier: netTier.ToGCEValue(), - } - if existingIP != "" { - addressObj.Address = existingIP - } - creationErr = s.ReserveAlphaRegionAddress(addressObj, region) - } - - if creationErr != nil { - // GCE returns StatusConflict if the name conflicts; it returns - // StatusBadRequest if the IP conflicts. - if !isHTTPErrorCode(creationErr, http.StatusConflict) && !isHTTPErrorCode(creationErr, http.StatusBadRequest) { - return "", false, fmt.Errorf("error creating gce static IP address: %v", creationErr) - } - existed = true - } - - addr, err := s.GetRegionAddress(name, region) - if err != nil { - return "", false, fmt.Errorf("error getting static IP address: %v", err) - } - - return addr.Address, existed, nil -} - -func (gce *GCECloud) getServiceNetworkTier(svc *v1.Service) (NetworkTier, error) { - if !gce.AlphaFeatureGate.Enabled(AlphaFeatureNetworkTiers) { - return NetworkTierDefault, nil - } - tier, err := GetServiceNetworkTier(svc) - if err != nil { - // Returns an error if the annotation is invalid. - return NetworkTier(""), err - } - return tier, nil -} - -func (gce *GCECloud) deleteWrongNetworkTieredResources(lbName, lbRef string, desiredNetTier NetworkTier) error { - logPrefix := fmt.Sprintf("deleteWrongNetworkTieredResources:(%s)", lbRef) - if err := deleteFWDRuleWithWrongTier(gce, gce.region, lbName, logPrefix, desiredNetTier); err != nil { - return err - } - if err := deleteAddressWithWrongTier(gce, gce.region, lbName, logPrefix, desiredNetTier); err != nil { - return err - } - return nil -} - -// deleteFWDRuleWithWrongTier checks the network tier of existing forwarding -// rule and delete the rule if the tier does not matched the desired tier. -func deleteFWDRuleWithWrongTier(s CloudForwardingRuleService, region, name, logPrefix string, desiredNetTier NetworkTier) error { - tierStr, err := s.getNetworkTierFromForwardingRule(name, region) - if isNotFound(err) { - return nil - } else if err != nil { - return err - } - existingTier := NetworkTierGCEValueToType(tierStr) - if existingTier == desiredNetTier { - return nil - } - glog.V(2).Infof("%s: Network tiers do not match; existing forwarding rule: %q, desired: %q. Deleting the forwarding rule", - logPrefix, existingTier, desiredNetTier) - err = s.DeleteRegionForwardingRule(name, region) - return ignoreNotFound(err) -} - -// deleteAddressWithWrongTier checks the network tier of existing address -// and delete the address if the tier does not matched the desired tier. -func deleteAddressWithWrongTier(s CloudAddressService, region, name, logPrefix string, desiredNetTier NetworkTier) error { - // We only check the IP address matching the reserved name that the - // controller assigned to the LB. We make the assumption that an address of - // such name is owned by the controller and is safe to release. Whether an - // IP is owned by the user is not clearly defined in the current code, and - // this assumption may not match some of the existing logic in the code. - // However, this is okay since network tiering is still Alpha and will be - // properly gated. - // TODO(#51665): Re-evaluate the "ownership" of the IP address to ensure - // we don't release IP unintentionally. - tierStr, err := s.getNetworkTierFromAddress(name, region) - if isNotFound(err) { - return nil - } else if err != nil { - return err - } - existingTier := NetworkTierGCEValueToType(tierStr) - if existingTier == desiredNetTier { - return nil - } - glog.V(2).Infof("%s: Network tiers do not match; existing address: %q, desired: %q. Deleting the address", - logPrefix, existingTier, desiredNetTier) - err = s.DeleteRegionAddress(name, region) - return ignoreNotFound(err) -} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_loadbalancer_internal.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_loadbalancer_internal.go deleted file mode 100644 index 31d770c84..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_loadbalancer_internal.go +++ /dev/null @@ -1,698 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "fmt" - "strconv" - "strings" - - "github.com/golang/glog" - compute "google.golang.org/api/compute/v1" - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/sets" - v1_service "k8s.io/kubernetes/pkg/api/v1/service" - "k8s.io/kubernetes/pkg/cloudprovider" -) - -const ( - allInstances = "ALL" -) - -func (gce *GCECloud) ensureInternalLoadBalancer(clusterName, clusterID string, svc *v1.Service, existingFwdRule *compute.ForwardingRule, nodes []*v1.Node) (*v1.LoadBalancerStatus, error) { - nm := types.NamespacedName{Name: svc.Name, Namespace: svc.Namespace} - ports, protocol := getPortsAndProtocol(svc.Spec.Ports) - scheme := schemeInternal - loadBalancerName := cloudprovider.GetLoadBalancerName(svc) - sharedBackend := shareBackendService(svc) - backendServiceName := makeBackendServiceName(loadBalancerName, clusterID, sharedBackend, scheme, protocol, svc.Spec.SessionAffinity) - backendServiceLink := gce.getBackendServiceLink(backendServiceName) - - // Ensure instance groups exist and nodes are assigned to groups - igName := makeInstanceGroupName(clusterID) - igLinks, err := gce.ensureInternalInstanceGroups(igName, nodes) - if err != nil { - return nil, err - } - - // Get existing backend service (if exists) - var existingBackendService *compute.BackendService - if existingFwdRule != nil && existingFwdRule.BackendService != "" { - existingBSName := getNameFromLink(existingFwdRule.BackendService) - if existingBackendService, err = gce.GetRegionBackendService(existingBSName, gce.region); err != nil && !isNotFound(err) { - return nil, err - } - } - - // Lock the sharedResourceLock to prevent any deletions of shared resources while assembling shared resources here - gce.sharedResourceLock.Lock() - defer gce.sharedResourceLock.Unlock() - - // Ensure health check exists before creating the backend service. The health check is shared - // if externalTrafficPolicy=Cluster. - sharedHealthCheck := !v1_service.RequestsOnlyLocalTraffic(svc) - hcName := makeHealthCheckName(loadBalancerName, clusterID, sharedHealthCheck) - hcPath, hcPort := GetNodesHealthCheckPath(), GetNodesHealthCheckPort() - if !sharedHealthCheck { - // Service requires a special health check, retrieve the OnlyLocal port & path - hcPath, hcPort = v1_service.GetServiceHealthCheckPathPort(svc) - } - hc, err := gce.ensureInternalHealthCheck(hcName, nm, sharedHealthCheck, hcPath, hcPort) - if err != nil { - return nil, err - } - - // Determine IP which will be used for this LB. If no forwarding rule has been established - // or specified in the Service spec, then requestedIP = "". - requestedIP := determineRequestedIP(svc, existingFwdRule) - addrMgr := newAddressManager(gce, nm.String(), gce.Region(), gce.getInternalSubnetURL(), loadBalancerName, requestedIP, schemeInternal) - ipToUse, err := addrMgr.HoldAddress() - if err != nil { - return nil, err - } - glog.V(2).Infof("ensureInternalLoadBalancer(%v): reserved IP %q for the forwarding rule", loadBalancerName, ipToUse) - - // Ensure firewall rules if necessary - if err = gce.ensureInternalFirewalls(loadBalancerName, ipToUse, clusterID, nm, svc, strconv.Itoa(int(hcPort)), sharedHealthCheck, nodes); err != nil { - return nil, err - } - - expectedFwdRule := &compute.ForwardingRule{ - Name: loadBalancerName, - Description: fmt.Sprintf(`{"kubernetes.io/service-name":"%s"}`, nm.String()), - IPAddress: ipToUse, - BackendService: backendServiceLink, - Ports: ports, - IPProtocol: string(protocol), - LoadBalancingScheme: string(scheme), - } - - // Specify subnetwork if network type is manual - if len(gce.subnetworkURL) > 0 { - expectedFwdRule.Subnetwork = gce.subnetworkURL - } else { - expectedFwdRule.Network = gce.networkURL - } - - fwdRuleDeleted := false - if existingFwdRule != nil && !fwdRuleEqual(existingFwdRule, expectedFwdRule) { - glog.V(2).Infof("ensureInternalLoadBalancer(%v): deleting existing forwarding rule with IP address %v", loadBalancerName, existingFwdRule.IPAddress) - if err = gce.DeleteRegionForwardingRule(loadBalancerName, gce.region); err != nil && !isNotFound(err) { - return nil, err - } - fwdRuleDeleted = true - } - - bsDescription := makeBackendServiceDescription(nm, sharedBackend) - err = gce.ensureInternalBackendService(backendServiceName, bsDescription, svc.Spec.SessionAffinity, scheme, protocol, igLinks, hc.SelfLink) - if err != nil { - return nil, err - } - - // If we previously deleted the forwarding rule or it never existed, finally create it. - if fwdRuleDeleted || existingFwdRule == nil { - glog.V(2).Infof("ensureInternalLoadBalancer(%v): creating forwarding rule", loadBalancerName) - if err = gce.CreateRegionForwardingRule(expectedFwdRule, gce.region); err != nil { - return nil, err - } - glog.V(2).Infof("ensureInternalLoadBalancer(%v): created forwarding rule", loadBalancerName) - } - - // Delete the previous internal load balancer resources if necessary - if existingBackendService != nil { - gce.clearPreviousInternalResources(svc, loadBalancerName, existingBackendService, backendServiceName, hcName) - } - - // Now that the controller knows the forwarding rule exists, we can release the address. - if err := addrMgr.ReleaseAddress(); err != nil { - glog.Errorf("ensureInternalLoadBalancer: failed to release address reservation, possibly causing an orphan: %v", err) - } - - status := &v1.LoadBalancerStatus{} - status.Ingress = []v1.LoadBalancerIngress{{IP: ipToUse}} - return status, nil -} - -func (gce *GCECloud) clearPreviousInternalResources(svc *v1.Service, loadBalancerName string, existingBackendService *compute.BackendService, expectedBSName, expectedHCName string) { - // If a new backend service was created, delete the old one. - if existingBackendService.Name != expectedBSName { - glog.V(2).Infof("clearPreviousInternalResources(%v): expected backend service %q does not match previous %q - deleting backend service", loadBalancerName, expectedBSName, existingBackendService.Name) - if err := gce.teardownInternalBackendService(existingBackendService.Name); err != nil && !isNotFound(err) { - glog.Warningf("clearPreviousInternalResources: could not delete old backend service: %v, err: %v", existingBackendService.Name, err) - } - } - - // If a new health check was created, delete the old one. - if len(existingBackendService.HealthChecks) == 1 { - existingHCName := getNameFromLink(existingBackendService.HealthChecks[0]) - if existingHCName != expectedHCName { - glog.V(2).Infof("clearPreviousInternalResources(%v): expected health check %q does not match previous %q - deleting health check", loadBalancerName, expectedHCName, existingHCName) - if err := gce.teardownInternalHealthCheckAndFirewall(svc, existingHCName); err != nil { - glog.Warningf("clearPreviousInternalResources: could not delete existing healthcheck: %v, err: %v", existingHCName, err) - } - } - } else if len(existingBackendService.HealthChecks) > 1 { - glog.Warningf("clearPreviousInternalResources(%v): more than one health check on the backend service %v, %v", loadBalancerName, existingBackendService.Name, existingBackendService.HealthChecks) - } -} - -// updateInternalLoadBalancer is called when the list of nodes has changed. Therefore, only the instance groups -// and possibly the backend service need to be updated. -func (gce *GCECloud) updateInternalLoadBalancer(clusterName, clusterID string, svc *v1.Service, nodes []*v1.Node) error { - gce.sharedResourceLock.Lock() - defer gce.sharedResourceLock.Unlock() - - igName := makeInstanceGroupName(clusterID) - igLinks, err := gce.ensureInternalInstanceGroups(igName, nodes) - if err != nil { - return err - } - - // Generate the backend service name - _, protocol := getPortsAndProtocol(svc.Spec.Ports) - scheme := schemeInternal - loadBalancerName := cloudprovider.GetLoadBalancerName(svc) - backendServiceName := makeBackendServiceName(loadBalancerName, clusterID, shareBackendService(svc), scheme, protocol, svc.Spec.SessionAffinity) - // Ensure the backend service has the proper backend/instance-group links - return gce.ensureInternalBackendServiceGroups(backendServiceName, igLinks) -} - -func (gce *GCECloud) ensureInternalLoadBalancerDeleted(clusterName, clusterID string, svc *v1.Service) error { - loadBalancerName := cloudprovider.GetLoadBalancerName(svc) - _, protocol := getPortsAndProtocol(svc.Spec.Ports) - scheme := schemeInternal - sharedBackend := shareBackendService(svc) - sharedHealthCheck := !v1_service.RequestsOnlyLocalTraffic(svc) - - gce.sharedResourceLock.Lock() - defer gce.sharedResourceLock.Unlock() - - glog.V(2).Infof("ensureInternalLoadBalancerDeleted(%v): attempting delete of region internal address", loadBalancerName) - ensureAddressDeleted(gce, loadBalancerName, gce.region) - - glog.V(2).Infof("ensureInternalLoadBalancerDeleted(%v): deleting region internal forwarding rule", loadBalancerName) - if err := gce.DeleteRegionForwardingRule(loadBalancerName, gce.region); err != nil && !isNotFound(err) { - return err - } - - backendServiceName := makeBackendServiceName(loadBalancerName, clusterID, sharedBackend, scheme, protocol, svc.Spec.SessionAffinity) - glog.V(2).Infof("ensureInternalLoadBalancerDeleted(%v): deleting region backend service %v", loadBalancerName, backendServiceName) - if err := gce.teardownInternalBackendService(backendServiceName); err != nil { - return err - } - - glog.V(2).Infof("ensureInternalLoadBalancerDeleted(%v): deleting firewall for traffic", loadBalancerName) - if err := gce.DeleteFirewall(loadBalancerName); err != nil { - if isForbidden(err) && gce.OnXPN() { - glog.V(2).Infof("ensureInternalLoadBalancerDeleted(%v): could not delete traffic firewall on XPN cluster. Raising event.", loadBalancerName) - gce.raiseFirewallChangeNeededEvent(svc, FirewallToGCloudDeleteCmd(loadBalancerName, gce.NetworkProjectID())) - } else { - return err - } - } - - hcName := makeHealthCheckName(loadBalancerName, clusterID, sharedHealthCheck) - glog.V(2).Infof("ensureInternalLoadBalancerDeleted(%v): deleting health check %v and its firewall", loadBalancerName, hcName) - if err := gce.teardownInternalHealthCheckAndFirewall(svc, hcName); err != nil { - return err - } - - // Try deleting instance groups - expect ResourceInuse error if needed by other LBs - igName := makeInstanceGroupName(clusterID) - if err := gce.ensureInternalInstanceGroupsDeleted(igName); err != nil && !isInUsedByError(err) { - return err - } - - return nil -} - -func (gce *GCECloud) teardownInternalBackendService(bsName string) error { - if err := gce.DeleteRegionBackendService(bsName, gce.region); err != nil { - if isNotFound(err) { - glog.V(2).Infof("teardownInternalBackendService(%v): backend service already deleted. err: %v", bsName, err) - return nil - } else if isInUsedByError(err) { - glog.V(2).Infof("teardownInternalBackendService(%v): backend service in use.", bsName) - return nil - } else { - return fmt.Errorf("failed to delete backend service: %v, err: %v", bsName, err) - } - } - glog.V(2).Infof("teardownInternalBackendService(%v): backend service deleted", bsName) - return nil -} - -func (gce *GCECloud) teardownInternalHealthCheckAndFirewall(svc *v1.Service, hcName string) error { - if err := gce.DeleteHealthCheck(hcName); err != nil { - if isNotFound(err) { - glog.V(2).Infof("teardownInternalHealthCheckAndFirewall(%v): health check does not exist.", hcName) - // Purposely do not early return - double check the firewall does not exist - } else if isInUsedByError(err) { - glog.V(2).Infof("teardownInternalHealthCheckAndFirewall(%v): health check in use.", hcName) - return nil - } else { - return fmt.Errorf("failed to delete health check: %v, err: %v", hcName, err) - } - } - glog.V(2).Infof("teardownInternalHealthCheckAndFirewall(%v): health check deleted", hcName) - - hcFirewallName := makeHealthCheckFirewallNameFromHC(hcName) - if err := gce.DeleteFirewall(hcFirewallName); err != nil && !isNotFound(err) { - if isForbidden(err) && gce.OnXPN() { - glog.V(2).Infof("teardownInternalHealthCheckAndFirewall(%v): could not delete health check traffic firewall on XPN cluster. Raising Event.", hcName) - gce.raiseFirewallChangeNeededEvent(svc, FirewallToGCloudDeleteCmd(hcFirewallName, gce.NetworkProjectID())) - return nil - } - - return fmt.Errorf("failed to delete health check firewall: %v, err: %v", hcFirewallName, err) - } - glog.V(2).Infof("teardownInternalHealthCheckAndFirewall(%v): health check firewall deleted", hcFirewallName) - return nil -} - -func (gce *GCECloud) ensureInternalFirewall(svc *v1.Service, fwName, fwDesc string, sourceRanges []string, ports []string, protocol v1.Protocol, nodes []*v1.Node) error { - glog.V(2).Infof("ensureInternalFirewall(%v): checking existing firewall", fwName) - targetTags, err := gce.GetNodeTags(nodeNames(nodes)) - if err != nil { - return err - } - - existingFirewall, err := gce.GetFirewall(fwName) - if err != nil && !isNotFound(err) { - return err - } - - expectedFirewall := &compute.Firewall{ - Name: fwName, - Description: fwDesc, - Network: gce.networkURL, - SourceRanges: sourceRanges, - TargetTags: targetTags, - Allowed: []*compute.FirewallAllowed{ - { - IPProtocol: strings.ToLower(string(protocol)), - Ports: ports, - }, - }, - } - - if existingFirewall == nil { - glog.V(2).Infof("ensureInternalFirewall(%v): creating firewall", fwName) - err = gce.CreateFirewall(expectedFirewall) - if err != nil && isForbidden(err) && gce.OnXPN() { - glog.V(2).Infof("ensureInternalFirewall(%v): do not have permission to create firewall rule (on XPN). Raising event.", fwName) - gce.raiseFirewallChangeNeededEvent(svc, FirewallToGCloudCreateCmd(expectedFirewall, gce.NetworkProjectID())) - return nil - } - return err - } - - if firewallRuleEqual(expectedFirewall, existingFirewall) { - return nil - } - - glog.V(2).Infof("ensureInternalFirewall(%v): updating firewall", fwName) - err = gce.UpdateFirewall(expectedFirewall) - if err != nil && isForbidden(err) && gce.OnXPN() { - glog.V(2).Infof("ensureInternalFirewall(%v): do not have permission to update firewall rule (on XPN). Raising event.", fwName) - gce.raiseFirewallChangeNeededEvent(svc, FirewallToGCloudUpdateCmd(expectedFirewall, gce.NetworkProjectID())) - return nil - } - return err -} - -func (gce *GCECloud) ensureInternalFirewalls(loadBalancerName, ipAddress, clusterID string, nm types.NamespacedName, svc *v1.Service, healthCheckPort string, sharedHealthCheck bool, nodes []*v1.Node) error { - // First firewall is for ingress traffic - fwDesc := makeFirewallDescription(nm.String(), ipAddress) - ports, protocol := getPortsAndProtocol(svc.Spec.Ports) - sourceRanges, err := v1_service.GetLoadBalancerSourceRanges(svc) - if err != nil { - return err - } - err = gce.ensureInternalFirewall(svc, loadBalancerName, fwDesc, sourceRanges.StringSlice(), ports, protocol, nodes) - if err != nil { - return err - } - - // Second firewall is for health checking nodes / services - fwHCName := makeHealthCheckFirewallName(loadBalancerName, clusterID, sharedHealthCheck) - hcSrcRanges := LoadBalancerSrcRanges() - return gce.ensureInternalFirewall(svc, fwHCName, "", hcSrcRanges, []string{healthCheckPort}, v1.ProtocolTCP, nodes) -} - -func (gce *GCECloud) ensureInternalHealthCheck(name string, svcName types.NamespacedName, shared bool, path string, port int32) (*compute.HealthCheck, error) { - glog.V(2).Infof("ensureInternalHealthCheck(%v, %v, %v): checking existing health check", name, path, port) - expectedHC := newInternalLBHealthCheck(name, svcName, shared, path, port) - - hc, err := gce.GetHealthCheck(name) - if err != nil && !isNotFound(err) { - return nil, err - } - - if hc == nil { - glog.V(2).Infof("ensureInternalHealthCheck: did not find health check %v, creating one with port %v path %v", name, port, path) - if err = gce.CreateHealthCheck(expectedHC); err != nil { - return nil, err - } - hc, err = gce.GetHealthCheck(name) - if err != nil { - glog.Errorf("Failed to get http health check %v", err) - return nil, err - } - glog.V(2).Infof("ensureInternalHealthCheck: created health check %v", name) - return hc, nil - } - - if healthChecksEqual(expectedHC, hc) { - return hc, nil - } - - glog.V(2).Infof("ensureInternalHealthCheck: health check %v exists but parameters have drifted - updating...", name) - if err := gce.UpdateHealthCheck(expectedHC); err != nil { - glog.Warningf("Failed to reconcile http health check %v parameters", name) - return nil, err - } - glog.V(2).Infof("ensureInternalHealthCheck: corrected health check %v parameters successful", name) - return hc, nil -} - -func (gce *GCECloud) ensureInternalInstanceGroup(name, zone string, nodes []*v1.Node) (string, error) { - glog.V(2).Infof("ensureInternalInstanceGroup(%v, %v): checking group that it contains %v nodes", name, zone, len(nodes)) - ig, err := gce.GetInstanceGroup(name, zone) - if err != nil && !isNotFound(err) { - return "", err - } - - kubeNodes := sets.NewString() - for _, n := range nodes { - kubeNodes.Insert(n.Name) - } - - gceNodes := sets.NewString() - if ig == nil { - glog.V(2).Infof("ensureInternalInstanceGroup(%v, %v): creating instance group", name, zone) - newIG := &compute.InstanceGroup{Name: name} - if err = gce.CreateInstanceGroup(newIG, zone); err != nil { - return "", err - } - - ig, err = gce.GetInstanceGroup(name, zone) - if err != nil { - return "", err - } - } else { - instances, err := gce.ListInstancesInInstanceGroup(name, zone, allInstances) - if err != nil { - return "", err - } - - for _, ins := range instances.Items { - parts := strings.Split(ins.Instance, "/") - gceNodes.Insert(parts[len(parts)-1]) - } - } - - removeNodes := gceNodes.Difference(kubeNodes).List() - addNodes := kubeNodes.Difference(gceNodes).List() - - if len(removeNodes) != 0 { - glog.V(2).Infof("ensureInternalInstanceGroup(%v, %v): removing nodes: %v", name, zone, removeNodes) - instanceRefs := gce.ToInstanceReferences(zone, removeNodes) - // Possible we'll receive 404's here if the instance was deleted before getting to this point. - if err = gce.RemoveInstancesFromInstanceGroup(name, zone, instanceRefs); err != nil && !isNotFound(err) { - return "", err - } - } - - if len(addNodes) != 0 { - glog.V(2).Infof("ensureInternalInstanceGroup(%v, %v): adding nodes: %v", name, zone, addNodes) - instanceRefs := gce.ToInstanceReferences(zone, addNodes) - if err = gce.AddInstancesToInstanceGroup(name, zone, instanceRefs); err != nil { - return "", err - } - } - - return ig.SelfLink, nil -} - -// ensureInternalInstanceGroups generates an unmanaged instance group for every zone -// where a K8s node exists. It also ensures that each node belongs to an instance group -func (gce *GCECloud) ensureInternalInstanceGroups(name string, nodes []*v1.Node) ([]string, error) { - zonedNodes := splitNodesByZone(nodes) - glog.V(2).Infof("ensureInternalInstanceGroups(%v): %d nodes over %d zones in region %v", name, len(nodes), len(zonedNodes), gce.region) - var igLinks []string - for zone, nodes := range zonedNodes { - igLink, err := gce.ensureInternalInstanceGroup(name, zone, nodes) - if err != nil { - return []string{}, err - } - igLinks = append(igLinks, igLink) - } - - return igLinks, nil -} - -func (gce *GCECloud) ensureInternalInstanceGroupsDeleted(name string) error { - // List of nodes isn't available here - fetch all zones in region and try deleting this cluster's ig - zones, err := gce.ListZonesInRegion(gce.region) - if err != nil { - return err - } - - glog.V(2).Infof("ensureInternalInstanceGroupsDeleted(%v): attempting delete instance group in all %d zones", name, len(zones)) - for _, z := range zones { - if err := gce.DeleteInstanceGroup(name, z.Name); err != nil && !isNotFoundOrInUse(err) { - return err - } - } - return nil -} - -func (gce *GCECloud) ensureInternalBackendService(name, description string, affinityType v1.ServiceAffinity, scheme lbScheme, protocol v1.Protocol, igLinks []string, hcLink string) error { - glog.V(2).Infof("ensureInternalBackendService(%v, %v, %v): checking existing backend service with %d groups", name, scheme, protocol, len(igLinks)) - bs, err := gce.GetRegionBackendService(name, gce.region) - if err != nil && !isNotFound(err) { - return err - } - - backends := backendsFromGroupLinks(igLinks) - expectedBS := &compute.BackendService{ - Name: name, - Protocol: string(protocol), - Description: description, - HealthChecks: []string{hcLink}, - Backends: backends, - SessionAffinity: translateAffinityType(affinityType), - LoadBalancingScheme: string(scheme), - } - - // Create backend service if none was found - if bs == nil { - glog.V(2).Infof("ensureInternalBackendService: creating backend service %v", name) - err := gce.CreateRegionBackendService(expectedBS, gce.region) - if err != nil { - return err - } - glog.V(2).Infof("ensureInternalBackendService: created backend service %v successfully", name) - return nil - } - // Check existing backend service - existingIGLinks := sets.NewString() - for _, be := range bs.Backends { - existingIGLinks.Insert(be.Group) - } - - if backendSvcEqual(expectedBS, bs) { - return nil - } - - glog.V(2).Infof("ensureInternalBackendService: updating backend service %v", name) - // Set fingerprint for optimistic locking - expectedBS.Fingerprint = bs.Fingerprint - if err := gce.UpdateRegionBackendService(expectedBS, gce.region); err != nil { - return err - } - glog.V(2).Infof("ensureInternalBackendService: updated backend service %v successfully", name) - return nil -} - -// ensureInternalBackendServiceGroups updates backend services if their list of backend instance groups is incorrect. -func (gce *GCECloud) ensureInternalBackendServiceGroups(name string, igLinks []string) error { - glog.V(2).Infof("ensureInternalBackendServiceGroups(%v): checking existing backend service's groups", name) - bs, err := gce.GetRegionBackendService(name, gce.region) - if err != nil { - return err - } - - backends := backendsFromGroupLinks(igLinks) - if backendsListEqual(bs.Backends, backends) { - return nil - } - - glog.V(2).Infof("ensureInternalBackendServiceGroups: updating backend service %v", name) - if err := gce.UpdateRegionBackendService(bs, gce.region); err != nil { - return err - } - glog.V(2).Infof("ensureInternalBackendServiceGroups: updated backend service %v successfully", name) - return nil -} - -func shareBackendService(svc *v1.Service) bool { - return GetLoadBalancerAnnotationBackendShare(svc) && !v1_service.RequestsOnlyLocalTraffic(svc) -} - -func backendsFromGroupLinks(igLinks []string) []*compute.Backend { - var backends []*compute.Backend - for _, igLink := range igLinks { - backends = append(backends, &compute.Backend{ - Group: igLink, - }) - } - return backends -} - -func newInternalLBHealthCheck(name string, svcName types.NamespacedName, shared bool, path string, port int32) *compute.HealthCheck { - httpSettings := compute.HTTPHealthCheck{ - Port: int64(port), - RequestPath: path, - } - desc := "" - if !shared { - desc = makeHealthCheckDescription(svcName.String()) - } - return &compute.HealthCheck{ - Name: name, - CheckIntervalSec: gceHcCheckIntervalSeconds, - TimeoutSec: gceHcTimeoutSeconds, - HealthyThreshold: gceHcHealthyThreshold, - UnhealthyThreshold: gceHcUnhealthyThreshold, - HttpHealthCheck: &httpSettings, - Type: "HTTP", - Description: desc, - } -} - -func firewallRuleEqual(a, b *compute.Firewall) bool { - return a.Description == b.Description && - len(a.Allowed) == 1 && len(a.Allowed) == len(b.Allowed) && - a.Allowed[0].IPProtocol == b.Allowed[0].IPProtocol && - equalStringSets(a.Allowed[0].Ports, b.Allowed[0].Ports) && - equalStringSets(a.SourceRanges, b.SourceRanges) && - equalStringSets(a.TargetTags, b.TargetTags) -} - -func healthChecksEqual(a, b *compute.HealthCheck) bool { - return a.HttpHealthCheck != nil && b.HttpHealthCheck != nil && - a.HttpHealthCheck.Port == b.HttpHealthCheck.Port && - a.HttpHealthCheck.RequestPath == b.HttpHealthCheck.RequestPath && - a.Description == b.Description && - a.CheckIntervalSec == b.CheckIntervalSec && - a.TimeoutSec == b.TimeoutSec && - a.UnhealthyThreshold == b.UnhealthyThreshold && - a.HealthyThreshold == b.HealthyThreshold -} - -// backendsListEqual asserts that backend lists are equal by instance group link only -func backendsListEqual(a, b []*compute.Backend) bool { - if len(a) != len(b) { - return false - } - if len(a) == 0 { - return true - } - - aSet := sets.NewString() - for _, v := range a { - aSet.Insert(v.Group) - } - bSet := sets.NewString() - for _, v := range b { - bSet.Insert(v.Group) - } - - return aSet.Equal(bSet) -} - -func backendSvcEqual(a, b *compute.BackendService) bool { - return a.Protocol == b.Protocol && - a.Description == b.Description && - a.SessionAffinity == b.SessionAffinity && - a.LoadBalancingScheme == b.LoadBalancingScheme && - equalStringSets(a.HealthChecks, b.HealthChecks) && - backendsListEqual(a.Backends, b.Backends) -} - -func fwdRuleEqual(a, b *compute.ForwardingRule) bool { - return (a.IPAddress == "" || b.IPAddress == "" || a.IPAddress == b.IPAddress) && - a.IPProtocol == b.IPProtocol && - a.LoadBalancingScheme == b.LoadBalancingScheme && - equalStringSets(a.Ports, b.Ports) && - a.BackendService == b.BackendService -} - -func getPortsAndProtocol(svcPorts []v1.ServicePort) (ports []string, protocol v1.Protocol) { - if len(svcPorts) == 0 { - return []string{}, v1.ProtocolUDP - } - - // GCP doesn't support multiple protocols for a single load balancer - protocol = svcPorts[0].Protocol - for _, p := range svcPorts { - ports = append(ports, strconv.Itoa(int(p.Port))) - } - return ports, protocol -} - -func (gce *GCECloud) getBackendServiceLink(name string) string { - return gce.service.BasePath + strings.Join([]string{gce.projectID, "regions", gce.region, "backendServices", name}, "/") -} - -// getInternalSubnetURL first attempts to return the configured SubnetURL. -// If subnetwork-name was not specified, then a best-effort generation is made. -// Note subnet names might not be the network name for some auto networks. -func (gce *GCECloud) getInternalSubnetURL() string { - if gce.SubnetworkURL() != "" { - return gce.SubnetworkURL() - } - - networkName := getNameFromLink(gce.NetworkURL()) - v := gceSubnetworkURL("", gce.NetworkProjectID(), gce.Region(), networkName) - glog.Warningf("Generating subnetwork URL based off network since subnet name/URL was not configured: %q", v) - return v -} - -func getNameFromLink(link string) string { - if link == "" { - return "" - } - - fields := strings.Split(link, "/") - return fields[len(fields)-1] -} - -func determineRequestedIP(svc *v1.Service, fwdRule *compute.ForwardingRule) string { - if svc.Spec.LoadBalancerIP != "" { - return svc.Spec.LoadBalancerIP - } - - if fwdRule != nil { - return fwdRule.IPAddress - } - - return "" -} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_loadbalancer_naming.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_loadbalancer_naming.go deleted file mode 100644 index 73169b21d..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_loadbalancer_naming.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "crypto/sha1" - "encoding/hex" - "fmt" - "strings" - - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/types" -) - -// Internal Load Balancer - -// Instance groups remain legacy named to stay consistent with ingress -func makeInstanceGroupName(clusterID string) string { - return fmt.Sprintf("k8s-ig--%s", clusterID) -} - -func makeBackendServiceName(loadBalancerName, clusterID string, shared bool, scheme lbScheme, protocol v1.Protocol, svcAffinity v1.ServiceAffinity) string { - if shared { - hash := sha1.New() - - // For every non-nil option, hash its value. Currently, only service affinity is relevant. - hash.Write([]byte(string(svcAffinity))) - - hashed := hex.EncodeToString(hash.Sum(nil)) - hashed = hashed[:16] - - // k8s- 4 - // {clusterid}- 17 - // {scheme}- 9 (internal/external) - // {protocol}- 4 (tcp/udp) - // nmv1- 5 (naming convention version) - // {suffix} 16 (hash of settings) - // ----------------- - // 55 characters used - return fmt.Sprintf("k8s-%s-%s-%s-nmv1-%s", clusterID, strings.ToLower(string(scheme)), strings.ToLower(string(protocol)), hashed) - } - return loadBalancerName -} - -func makeHealthCheckName(loadBalancerName, clusterID string, shared bool) string { - if shared { - return fmt.Sprintf("k8s-%s-node", clusterID) - } - - return loadBalancerName -} - -func makeHealthCheckFirewallNameFromHC(healthCheckName string) string { - return healthCheckName + "-hc" -} - -func makeHealthCheckFirewallName(loadBalancerName, clusterID string, shared bool) string { - if shared { - return fmt.Sprintf("k8s-%s-node-hc", clusterID) - } - return loadBalancerName + "-hc" -} - -func makeBackendServiceDescription(nm types.NamespacedName, shared bool) string { - if shared { - return "" - } - return fmt.Sprintf(`{"kubernetes.io/service-name":"%s"}`, nm.String()) -} - -// External Load Balancer - -// makeServiceDescription is used to generate descriptions for forwarding rules and addresses. -func makeServiceDescription(serviceName string) string { - return fmt.Sprintf(`{"kubernetes.io/service-name":"%s"}`, serviceName) -} - -// makeNodesHealthCheckName returns name of the health check resource used by -// the GCE load balancers (l4) for performing health checks on nodes. -func makeNodesHealthCheckName(clusterID string) string { - return fmt.Sprintf("k8s-%v-node", clusterID) -} - -func makeHealthCheckDescription(serviceName string) string { - return fmt.Sprintf(`{"kubernetes.io/service-name":"%s"}`, serviceName) -} - -// MakeHealthCheckFirewallName returns the firewall name used by the GCE load -// balancers (l4) for performing health checks. -func MakeHealthCheckFirewallName(clusterID, hcName string, isNodesHealthCheck bool) string { - if isNodesHealthCheck { - return makeNodesHealthCheckName(clusterID) + "-http-hc" - } - return "k8s-" + hcName + "-http-hc" -} - -func makeFirewallName(name string) string { - return fmt.Sprintf("k8s-fw-%s", name) -} - -func makeFirewallDescription(serviceName, ipAddress string) string { - return fmt.Sprintf(`{"kubernetes.io/service-name":"%s", "kubernetes.io/service-ip":"%s"}`, - serviceName, ipAddress) -} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_op.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_op.go deleted file mode 100644 index b354d79ce..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_op.go +++ /dev/null @@ -1,180 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "encoding/json" - "fmt" - "time" - - "k8s.io/apimachinery/pkg/util/wait" - - "github.com/golang/glog" - computealpha "google.golang.org/api/compute/v0.alpha" - computebeta "google.golang.org/api/compute/v0.beta" - computev1 "google.golang.org/api/compute/v1" - "google.golang.org/api/googleapi" -) - -func (gce *GCECloud) waitForOp(op *computev1.Operation, getOperation func(operationName string) (*computev1.Operation, error), mc *metricContext) error { - if op == nil { - return mc.Observe(fmt.Errorf("operation must not be nil")) - } - - if opIsDone(op) { - return getErrorFromOp(op) - } - - opStart := time.Now() - opName := op.Name - - return wait.Poll(operationPollInterval, operationPollTimeoutDuration, func() (bool, error) { - start := time.Now() - gce.operationPollRateLimiter.Accept() - duration := time.Now().Sub(start) - if duration > 5*time.Second { - glog.V(2).Infof("pollOperation: throttled %v for %v", duration, opName) - } - pollOp, err := getOperation(opName) - if err != nil { - glog.Warningf("GCE poll operation %s failed: pollOp: [%v] err: [%v] getErrorFromOp: [%v]", - opName, pollOp, err, getErrorFromOp(pollOp)) - } - - done := opIsDone(pollOp) - if done { - duration := time.Now().Sub(opStart) - if duration > 1*time.Minute { - // Log the JSON. It's cleaner than the %v structure. - enc, err := pollOp.MarshalJSON() - if err != nil { - glog.Warningf("waitForOperation: long operation (%v): %v (failed to encode to JSON: %v)", - duration, pollOp, err) - } else { - glog.V(2).Infof("waitForOperation: long operation (%v): %v", - duration, string(enc)) - } - } - } - - return done, mc.Observe(getErrorFromOp(pollOp)) - }) -} - -func opIsDone(op *computev1.Operation) bool { - return op != nil && op.Status == "DONE" -} - -func getErrorFromOp(op *computev1.Operation) error { - if op != nil && op.Error != nil && len(op.Error.Errors) > 0 { - err := &googleapi.Error{ - Code: int(op.HttpErrorStatusCode), - Message: op.Error.Errors[0].Message, - } - glog.Errorf("GCE operation failed: %v", err) - return err - } - - return nil -} - -func (gce *GCECloud) waitForGlobalOp(op gceObject, mc *metricContext) error { - return gce.waitForGlobalOpInProject(op, gce.ProjectID(), mc) -} - -func (gce *GCECloud) waitForRegionOp(op gceObject, region string, mc *metricContext) error { - return gce.waitForRegionOpInProject(op, gce.ProjectID(), region, mc) -} - -func (gce *GCECloud) waitForZoneOp(op gceObject, zone string, mc *metricContext) error { - return gce.waitForZoneOpInProject(op, gce.ProjectID(), zone, mc) -} - -func (gce *GCECloud) waitForGlobalOpInProject(op gceObject, projectID string, mc *metricContext) error { - switch v := op.(type) { - case *computealpha.Operation: - return gce.waitForOp(convertToV1Operation(op), func(operationName string) (*computev1.Operation, error) { - op, err := gce.serviceAlpha.GlobalOperations.Get(projectID, operationName).Do() - return convertToV1Operation(op), err - }, mc) - case *computebeta.Operation: - return gce.waitForOp(convertToV1Operation(op), func(operationName string) (*computev1.Operation, error) { - op, err := gce.serviceBeta.GlobalOperations.Get(projectID, operationName).Do() - return convertToV1Operation(op), err - }, mc) - case *computev1.Operation: - return gce.waitForOp(op.(*computev1.Operation), func(operationName string) (*computev1.Operation, error) { - return gce.service.GlobalOperations.Get(projectID, operationName).Do() - }, mc) - default: - return fmt.Errorf("unexpected type: %T", v) - } -} - -func (gce *GCECloud) waitForRegionOpInProject(op gceObject, projectID, region string, mc *metricContext) error { - switch v := op.(type) { - case *computealpha.Operation: - return gce.waitForOp(convertToV1Operation(op), func(operationName string) (*computev1.Operation, error) { - op, err := gce.serviceAlpha.RegionOperations.Get(projectID, region, operationName).Do() - return convertToV1Operation(op), err - }, mc) - case *computebeta.Operation: - return gce.waitForOp(convertToV1Operation(op), func(operationName string) (*computev1.Operation, error) { - op, err := gce.serviceBeta.RegionOperations.Get(projectID, region, operationName).Do() - return convertToV1Operation(op), err - }, mc) - case *computev1.Operation: - return gce.waitForOp(op.(*computev1.Operation), func(operationName string) (*computev1.Operation, error) { - return gce.service.RegionOperations.Get(projectID, region, operationName).Do() - }, mc) - default: - return fmt.Errorf("unexpected type: %T", v) - } -} - -func (gce *GCECloud) waitForZoneOpInProject(op gceObject, projectID, zone string, mc *metricContext) error { - switch v := op.(type) { - case *computealpha.Operation: - return gce.waitForOp(convertToV1Operation(op), func(operationName string) (*computev1.Operation, error) { - op, err := gce.serviceAlpha.ZoneOperations.Get(projectID, zone, operationName).Do() - return convertToV1Operation(op), err - }, mc) - case *computebeta.Operation: - return gce.waitForOp(convertToV1Operation(op), func(operationName string) (*computev1.Operation, error) { - op, err := gce.serviceBeta.ZoneOperations.Get(projectID, zone, operationName).Do() - return convertToV1Operation(op), err - }, mc) - case *computev1.Operation: - return gce.waitForOp(op.(*computev1.Operation), func(operationName string) (*computev1.Operation, error) { - return gce.service.ZoneOperations.Get(projectID, zone, operationName).Do() - }, mc) - default: - return fmt.Errorf("unexpected type: %T", v) - } -} - -func convertToV1Operation(object gceObject) *computev1.Operation { - enc, err := object.MarshalJSON() - if err != nil { - panic(fmt.Sprintf("Failed to encode to json: %v", err)) - } - var op computev1.Operation - if err := json.Unmarshal(enc, &op); err != nil { - panic(fmt.Sprintf("Failed to convert GCE apiObject %v to v1 operation: %v", object, err)) - } - return &op -} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_routes.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_routes.go deleted file mode 100644 index 87184aef1..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_routes.go +++ /dev/null @@ -1,116 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "fmt" - "net/http" - "path" - - "k8s.io/apimachinery/pkg/types" - "k8s.io/kubernetes/pkg/cloudprovider" - - "github.com/golang/glog" - compute "google.golang.org/api/compute/v1" -) - -func newRoutesMetricContext(request string) *metricContext { - return newGenericMetricContext("routes", request, unusedMetricLabel, unusedMetricLabel, computeV1Version) -} - -func (gce *GCECloud) ListRoutes(clusterName string) ([]*cloudprovider.Route, error) { - var routes []*cloudprovider.Route - pageToken := "" - page := 0 - for ; page == 0 || (pageToken != "" && page < maxPages); page++ { - mc := newRoutesMetricContext("list_page") - listCall := gce.service.Routes.List(gce.NetworkProjectID()) - - prefix := truncateClusterName(clusterName) - // Filter for routes starting with clustername AND belonging to the - // relevant gcp network AND having description = "k8s-node-route". - filter := "(name eq " + prefix + "-.*) " - filter = filter + "(network eq " + gce.NetworkURL() + ") " - filter = filter + "(description eq " + k8sNodeRouteTag + ")" - listCall = listCall.Filter(filter) - if pageToken != "" { - listCall = listCall.PageToken(pageToken) - } - res, err := listCall.Do() - mc.Observe(err) - if err != nil { - glog.Errorf("Error getting routes from GCE: %v", err) - return nil, err - } - pageToken = res.NextPageToken - for _, r := range res.Items { - target := path.Base(r.NextHopInstance) - // TODO: Should we lastComponent(target) this? - targetNodeName := types.NodeName(target) // NodeName == Instance Name on GCE - routes = append(routes, &cloudprovider.Route{Name: r.Name, TargetNode: targetNodeName, DestinationCIDR: r.DestRange}) - } - } - if page >= maxPages { - glog.Errorf("ListRoutes exceeded maxPages=%d for Routes.List; truncating.", maxPages) - } - return routes, nil -} - -func (gce *GCECloud) CreateRoute(clusterName string, nameHint string, route *cloudprovider.Route) error { - routeName := truncateClusterName(clusterName) + "-" + nameHint - - instanceName := mapNodeNameToInstanceName(route.TargetNode) - targetInstance, err := gce.getInstanceByName(instanceName) - if err != nil { - return err - } - - mc := newRoutesMetricContext("create") - insertOp, err := gce.service.Routes.Insert(gce.NetworkProjectID(), &compute.Route{ - Name: routeName, - DestRange: route.DestinationCIDR, - NextHopInstance: fmt.Sprintf("zones/%s/instances/%s", targetInstance.Zone, targetInstance.Name), - Network: gce.NetworkURL(), - Priority: 1000, - Description: k8sNodeRouteTag, - }).Do() - if err != nil { - if isHTTPErrorCode(err, http.StatusConflict) { - glog.Infof("Route %v already exists.", routeName) - return nil - } else { - return mc.Observe(err) - } - } - return gce.waitForGlobalOpInProject(insertOp, gce.NetworkProjectID(), mc) -} - -func (gce *GCECloud) DeleteRoute(clusterName string, route *cloudprovider.Route) error { - mc := newRoutesMetricContext("delete") - deleteOp, err := gce.service.Routes.Delete(gce.NetworkProjectID(), route.Name).Do() - if err != nil { - return mc.Observe(err) - } - return gce.waitForGlobalOpInProject(deleteOp, gce.NetworkProjectID(), mc) -} - -func truncateClusterName(clusterName string) string { - if len(clusterName) > 26 { - return clusterName[:26] - } - return clusterName -} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_targetpool.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_targetpool.go deleted file mode 100644 index 0efe15adf..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_targetpool.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import compute "google.golang.org/api/compute/v1" - -func newTargetPoolMetricContext(request, region string) *metricContext { - return newGenericMetricContext("targetpool", request, region, unusedMetricLabel, computeV1Version) -} - -// GetTargetPool returns the TargetPool by name. -func (gce *GCECloud) GetTargetPool(name, region string) (*compute.TargetPool, error) { - mc := newTargetPoolMetricContext("get", region) - v, err := gce.service.TargetPools.Get(gce.projectID, region, name).Do() - return v, mc.Observe(err) -} - -// CreateTargetPool creates the passed TargetPool -func (gce *GCECloud) CreateTargetPool(tp *compute.TargetPool, region string) error { - mc := newTargetPoolMetricContext("create", region) - op, err := gce.service.TargetPools.Insert(gce.projectID, region, tp).Do() - if err != nil { - return mc.Observe(err) - } - - return gce.waitForRegionOp(op, region, mc) -} - -// DeleteTargetPool deletes TargetPool by name. -func (gce *GCECloud) DeleteTargetPool(name, region string) error { - mc := newTargetPoolMetricContext("delete", region) - op, err := gce.service.TargetPools.Delete(gce.projectID, region, name).Do() - if err != nil { - return mc.Observe(err) - } - return gce.waitForRegionOp(op, region, mc) -} - -// AddInstancesToTargetPool adds instances by link to the TargetPool -func (gce *GCECloud) AddInstancesToTargetPool(name, region string, instanceRefs []*compute.InstanceReference) error { - add := &compute.TargetPoolsAddInstanceRequest{Instances: instanceRefs} - mc := newTargetPoolMetricContext("add_instances", region) - op, err := gce.service.TargetPools.AddInstance(gce.projectID, region, name, add).Do() - if err != nil { - return mc.Observe(err) - } - return gce.waitForRegionOp(op, region, mc) -} - -// RemoveInstancesToTargetPool removes instances by link to the TargetPool -func (gce *GCECloud) RemoveInstancesFromTargetPool(name, region string, instanceRefs []*compute.InstanceReference) error { - remove := &compute.TargetPoolsRemoveInstanceRequest{Instances: instanceRefs} - mc := newTargetPoolMetricContext("remove_instances", region) - op, err := gce.service.TargetPools.RemoveInstance(gce.projectID, region, name, remove).Do() - if err != nil { - return mc.Observe(err) - } - return gce.waitForRegionOp(op, region, mc) -} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_targetproxy.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_targetproxy.go deleted file mode 100644 index b92206cfc..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_targetproxy.go +++ /dev/null @@ -1,138 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "net/http" - - compute "google.golang.org/api/compute/v1" -) - -func newTargetProxyMetricContext(request string) *metricContext { - return newGenericMetricContext("targetproxy", request, unusedMetricLabel, unusedMetricLabel, computeV1Version) -} - -// GetTargetHttpProxy returns the UrlMap by name. -func (gce *GCECloud) GetTargetHttpProxy(name string) (*compute.TargetHttpProxy, error) { - mc := newTargetProxyMetricContext("get") - v, err := gce.service.TargetHttpProxies.Get(gce.projectID, name).Do() - return v, mc.Observe(err) -} - -// CreateTargetHttpProxy creates a TargetHttpProxy -func (gce *GCECloud) CreateTargetHttpProxy(proxy *compute.TargetHttpProxy) error { - mc := newTargetProxyMetricContext("create") - op, err := gce.service.TargetHttpProxies.Insert(gce.projectID, proxy).Do() - if err != nil { - return mc.Observe(err) - } - return gce.waitForGlobalOp(op, mc) -} - -// SetUrlMapForTargetHttpProxy sets the given UrlMap for the given TargetHttpProxy. -func (gce *GCECloud) SetUrlMapForTargetHttpProxy(proxy *compute.TargetHttpProxy, urlMap *compute.UrlMap) error { - mc := newTargetProxyMetricContext("set_url_map") - op, err := gce.service.TargetHttpProxies.SetUrlMap( - gce.projectID, proxy.Name, &compute.UrlMapReference{UrlMap: urlMap.SelfLink}).Do() - if err != nil { - return mc.Observe(err) - } - return gce.waitForGlobalOp(op, mc) -} - -// DeleteTargetHttpProxy deletes the TargetHttpProxy by name. -func (gce *GCECloud) DeleteTargetHttpProxy(name string) error { - mc := newTargetProxyMetricContext("delete") - op, err := gce.service.TargetHttpProxies.Delete(gce.projectID, name).Do() - if err != nil { - if isHTTPErrorCode(err, http.StatusNotFound) { - return nil - } - return mc.Observe(err) - } - return gce.waitForGlobalOp(op, mc) -} - -// ListTargetHttpProxies lists all TargetHttpProxies in the project. -func (gce *GCECloud) ListTargetHttpProxies() (*compute.TargetHttpProxyList, error) { - mc := newTargetProxyMetricContext("list") - // TODO: use PageToken to list all not just the first 500 - v, err := gce.service.TargetHttpProxies.List(gce.projectID).Do() - return v, mc.Observe(err) -} - -// TargetHttpsProxy management - -// GetTargetHttpsProxy returns the UrlMap by name. -func (gce *GCECloud) GetTargetHttpsProxy(name string) (*compute.TargetHttpsProxy, error) { - mc := newTargetProxyMetricContext("get") - v, err := gce.service.TargetHttpsProxies.Get(gce.projectID, name).Do() - return v, mc.Observe(err) -} - -// CreateTargetHttpsProxy creates a TargetHttpsProxy -func (gce *GCECloud) CreateTargetHttpsProxy(proxy *compute.TargetHttpsProxy) error { - mc := newTargetProxyMetricContext("create") - op, err := gce.service.TargetHttpsProxies.Insert(gce.projectID, proxy).Do() - if err != nil { - return mc.Observe(err) - } - return gce.waitForGlobalOp(op, mc) -} - -// SetUrlMapForTargetHttpsProxy sets the given UrlMap for the given TargetHttpsProxy. -func (gce *GCECloud) SetUrlMapForTargetHttpsProxy(proxy *compute.TargetHttpsProxy, urlMap *compute.UrlMap) error { - mc := newTargetProxyMetricContext("set_url_map") - op, err := gce.service.TargetHttpsProxies.SetUrlMap( - gce.projectID, proxy.Name, &compute.UrlMapReference{UrlMap: urlMap.SelfLink}).Do() - if err != nil { - return mc.Observe(err) - } - return gce.waitForGlobalOp(op, mc) -} - -// SetSslCertificateForTargetHttpsProxy sets the given SslCertificate for the given TargetHttpsProxy. -func (gce *GCECloud) SetSslCertificateForTargetHttpsProxy(proxy *compute.TargetHttpsProxy, sslCert *compute.SslCertificate) error { - mc := newTargetProxyMetricContext("set_ssl_cert") - op, err := gce.service.TargetHttpsProxies.SetSslCertificates( - gce.projectID, proxy.Name, &compute.TargetHttpsProxiesSetSslCertificatesRequest{SslCertificates: []string{sslCert.SelfLink}}).Do() - if err != nil { - return mc.Observe(err) - } - return gce.waitForGlobalOp(op, mc) -} - -// DeleteTargetHttpsProxy deletes the TargetHttpsProxy by name. -func (gce *GCECloud) DeleteTargetHttpsProxy(name string) error { - mc := newTargetProxyMetricContext("delete") - op, err := gce.service.TargetHttpsProxies.Delete(gce.projectID, name).Do() - if err != nil { - if isHTTPErrorCode(err, http.StatusNotFound) { - return nil - } - return mc.Observe(err) - } - return gce.waitForGlobalOp(op, mc) -} - -// ListTargetHttpsProxies lists all TargetHttpsProxies in the project. -func (gce *GCECloud) ListTargetHttpsProxies() (*compute.TargetHttpsProxyList, error) { - mc := newTargetProxyMetricContext("list") - // TODO: use PageToken to list all not just the first 500 - v, err := gce.service.TargetHttpsProxies.List(gce.projectID).Do() - return v, mc.Observe(err) -} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_urlmap.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_urlmap.go deleted file mode 100644 index 60184ac43..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_urlmap.go +++ /dev/null @@ -1,75 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "net/http" - - compute "google.golang.org/api/compute/v1" -) - -func newUrlMapMetricContext(request string) *metricContext { - return newGenericMetricContext("urlmap", request, unusedMetricLabel, unusedMetricLabel, computeV1Version) -} - -// GetUrlMap returns the UrlMap by name. -func (gce *GCECloud) GetUrlMap(name string) (*compute.UrlMap, error) { - mc := newUrlMapMetricContext("get") - v, err := gce.service.UrlMaps.Get(gce.projectID, name).Do() - return v, mc.Observe(err) -} - -// CreateUrlMap creates a url map -func (gce *GCECloud) CreateUrlMap(urlMap *compute.UrlMap) error { - mc := newUrlMapMetricContext("create") - op, err := gce.service.UrlMaps.Insert(gce.projectID, urlMap).Do() - if err != nil { - return mc.Observe(err) - } - return gce.waitForGlobalOp(op, mc) -} - -// UpdateUrlMap applies the given UrlMap as an update -func (gce *GCECloud) UpdateUrlMap(urlMap *compute.UrlMap) error { - mc := newUrlMapMetricContext("update") - op, err := gce.service.UrlMaps.Update(gce.projectID, urlMap.Name, urlMap).Do() - if err != nil { - return mc.Observe(err) - } - return gce.waitForGlobalOp(op, mc) -} - -// DeleteUrlMap deletes a url map by name. -func (gce *GCECloud) DeleteUrlMap(name string) error { - mc := newUrlMapMetricContext("delete") - op, err := gce.service.UrlMaps.Delete(gce.projectID, name).Do() - if err != nil { - if isHTTPErrorCode(err, http.StatusNotFound) { - return nil - } - return mc.Observe(err) - } - return gce.waitForGlobalOp(op, mc) -} - -// ListUrlMaps lists all UrlMaps in the project. -func (gce *GCECloud) ListUrlMaps() (*compute.UrlMapList, error) { - mc := newUrlMapMetricContext("list") - // TODO: use PageToken to list all not just the first 500 - v, err := gce.service.UrlMaps.List(gce.projectID).Do() - return v, mc.Observe(err) -} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_util.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_util.go deleted file mode 100644 index 484a67e0b..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_util.go +++ /dev/null @@ -1,213 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "errors" - "fmt" - "net/http" - "regexp" - "strings" - - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/sets" - - "cloud.google.com/go/compute/metadata" - compute "google.golang.org/api/compute/v1" - "google.golang.org/api/googleapi" -) - -type gceInstance struct { - Zone string - Name string - ID uint64 - Disks []*compute.AttachedDisk - Type string -} - -var providerIdRE = regexp.MustCompile(`^` + ProviderName + `://([^/]+)/([^/]+)/([^/]+)$`) - -func getProjectAndZone() (string, string, error) { - result, err := metadata.Get("instance/zone") - if err != nil { - return "", "", err - } - parts := strings.Split(result, "/") - if len(parts) != 4 { - return "", "", fmt.Errorf("unexpected response: %s", result) - } - zone := parts[3] - projectID, err := metadata.ProjectID() - if err != nil { - return "", "", err - } - return projectID, zone, nil -} - -func (gce *GCECloud) raiseFirewallChangeNeededEvent(svc *v1.Service, cmd string) { - msg := fmt.Sprintf("Firewall change required by network admin: `%v`", cmd) - if gce.eventRecorder != nil && svc != nil { - gce.eventRecorder.Event(svc, v1.EventTypeNormal, "LoadBalancerManualChange", msg) - } -} - -// FirewallToGCloudCreateCmd generates a gcloud command to create a firewall with specified params -func FirewallToGCloudCreateCmd(fw *compute.Firewall, projectID string) string { - args := firewallToGcloudArgs(fw, projectID) - return fmt.Sprintf("gcloud compute firewall-rules create %v --network %v %v", fw.Name, getNameFromLink(fw.Network), args) -} - -// FirewallToGCloudCreateCmd generates a gcloud command to update a firewall to specified params -func FirewallToGCloudUpdateCmd(fw *compute.Firewall, projectID string) string { - args := firewallToGcloudArgs(fw, projectID) - return fmt.Sprintf("gcloud compute firewall-rules update %v %v", fw.Name, args) -} - -// FirewallToGCloudCreateCmd generates a gcloud command to delete a firewall to specified params -func FirewallToGCloudDeleteCmd(fwName, projectID string) string { - return fmt.Sprintf("gcloud compute firewall-rules delete %v --project %v", fwName, projectID) -} - -func firewallToGcloudArgs(fw *compute.Firewall, projectID string) string { - var allPorts []string - for _, a := range fw.Allowed { - for _, p := range a.Ports { - allPorts = append(allPorts, fmt.Sprintf("%v:%v", a.IPProtocol, p)) - } - } - allow := strings.Join(allPorts, ",") - srcRngs := strings.Join(fw.SourceRanges, ",") - targets := strings.Join(fw.TargetTags, ",") - return fmt.Sprintf("--description %q --allow %v --source-ranges %v --target-tags %v --project %v", fw.Description, allow, srcRngs, targets, projectID) -} - -// Take a GCE instance 'hostname' and break it down to something that can be fed -// to the GCE API client library. Basically this means reducing 'kubernetes- -// node-2.c.my-proj.internal' to 'kubernetes-node-2' if necessary. -func canonicalizeInstanceName(name string) string { - ix := strings.Index(name, ".") - if ix != -1 { - name = name[:ix] - } - return name -} - -// Returns the last component of a URL, i.e. anything after the last slash -// If there is no slash, returns the whole string -func lastComponent(s string) string { - lastSlash := strings.LastIndex(s, "/") - if lastSlash != -1 { - s = s[lastSlash+1:] - } - return s -} - -// mapNodeNameToInstanceName maps a k8s NodeName to a GCE Instance Name -// This is a simple string cast. -func mapNodeNameToInstanceName(nodeName types.NodeName) string { - return string(nodeName) -} - -// mapInstanceToNodeName maps a GCE Instance to a k8s NodeName -func mapInstanceToNodeName(instance *compute.Instance) types.NodeName { - return types.NodeName(instance.Name) -} - -// GetGCERegion returns region of the gce zone. Zone names -// are of the form: ${region-name}-${ix}. -// For example, "us-central1-b" has a region of "us-central1". -// So we look for the last '-' and trim to just before that. -func GetGCERegion(zone string) (string, error) { - ix := strings.LastIndex(zone, "-") - if ix == -1 { - return "", fmt.Errorf("unexpected zone: %s", zone) - } - return zone[:ix], nil -} - -func isHTTPErrorCode(err error, code int) bool { - apiErr, ok := err.(*googleapi.Error) - return ok && apiErr.Code == code -} - -func isInUsedByError(err error) bool { - apiErr, ok := err.(*googleapi.Error) - if !ok || apiErr.Code != http.StatusBadRequest { - return false - } - return strings.Contains(apiErr.Message, "being used by") -} - -// splitProviderID splits a provider's id into core components. -// A providerID is build out of '${ProviderName}://${project-id}/${zone}/${instance-name}' -// See cloudprovider.GetInstanceProviderID. -func splitProviderID(providerID string) (project, zone, instance string, err error) { - matches := providerIdRE.FindStringSubmatch(providerID) - if len(matches) != 4 { - return "", "", "", errors.New("error splitting providerID") - } - return matches[1], matches[2], matches[3], nil -} - -func equalStringSets(x, y []string) bool { - if len(x) != len(y) { - return false - } - xString := sets.NewString(x...) - yString := sets.NewString(y...) - return xString.Equal(yString) -} - -func isNotFound(err error) bool { - return isHTTPErrorCode(err, http.StatusNotFound) -} - -func ignoreNotFound(err error) error { - if err == nil || isNotFound(err) { - return nil - } - return err -} - -func isNotFoundOrInUse(err error) bool { - return isNotFound(err) || isInUsedByError(err) -} - -func isForbidden(err error) bool { - return isHTTPErrorCode(err, http.StatusForbidden) -} - -func makeGoogleAPINotFoundError(message string) error { - return &googleapi.Error{Code: http.StatusNotFound, Message: message} -} - -func makeGoogleAPIError(code int, message string) error { - return &googleapi.Error{Code: code, Message: message} -} - -// TODO(#51665): Remove this once Network Tiers becomes Beta in GCP. -func handleAlphaNetworkTierGetError(err error) (string, error) { - if isForbidden(err) { - // Network tier is still an Alpha feature in GCP, and not every project - // is whitelisted to access the API. If we cannot access the API, just - // assume the tier is premium. - return NetworkTierDefault.ToGCEValue(), nil - } - // Can't get the network tier, just return an error. - return "", err -} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_zones.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_zones.go deleted file mode 100644 index 26ccc3774..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce_zones.go +++ /dev/null @@ -1,85 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "fmt" - "strings" - - compute "google.golang.org/api/compute/v1" - - "k8s.io/apimachinery/pkg/types" - "k8s.io/kubernetes/pkg/cloudprovider" -) - -func newZonesMetricContext(request, region string) *metricContext { - return newGenericMetricContext("zones", request, region, unusedMetricLabel, computeV1Version) -} - -// GetZone creates a cloudprovider.Zone of the current zone and region -func (gce *GCECloud) GetZone() (cloudprovider.Zone, error) { - return cloudprovider.Zone{ - FailureDomain: gce.localZone, - Region: gce.region, - }, nil -} - -// GetZoneByProviderID implements Zones.GetZoneByProviderID -// This is particularly useful in external cloud providers where the kubelet -// does not initialize node data. -func (gce *GCECloud) GetZoneByProviderID(providerID string) (cloudprovider.Zone, error) { - _, zone, _, err := splitProviderID(providerID) - if err != nil { - return cloudprovider.Zone{}, err - } - region, err := GetGCERegion(zone) - if err != nil { - return cloudprovider.Zone{}, err - } - return cloudprovider.Zone{FailureDomain: zone, Region: region}, nil -} - -// GetZoneByNodeName implements Zones.GetZoneByNodeName -// This is particularly useful in external cloud providers where the kubelet -// does not initialize node data. -func (gce *GCECloud) GetZoneByNodeName(nodeName types.NodeName) (cloudprovider.Zone, error) { - instanceName := mapNodeNameToInstanceName(nodeName) - instance, err := gce.getInstanceByName(instanceName) - if err != nil { - return cloudprovider.Zone{}, err - } - region, err := GetGCERegion(instance.Zone) - if err != nil { - return cloudprovider.Zone{}, err - } - return cloudprovider.Zone{FailureDomain: instance.Zone, Region: region}, nil -} - -// ListZonesInRegion returns all zones in a GCP region -func (gce *GCECloud) ListZonesInRegion(region string) ([]*compute.Zone, error) { - mc := newZonesMetricContext("list", region) - filter := fmt.Sprintf("region eq %v", gce.getRegionLink(region)) - list, err := gce.service.Zones.List(gce.projectID).Filter(filter).Do() - if err != nil { - return nil, mc.Observe(err) - } - return list.Items, mc.Observe(err) -} - -func (gce *GCECloud) getRegionLink(region string) string { - return gce.service.BasePath + strings.Join([]string{gce.projectID, "regions", region}, "/") -} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/kms.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/kms.go deleted file mode 100644 index fbe62f523..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/kms.go +++ /dev/null @@ -1,167 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "encoding/base64" - "fmt" - "io" - - "github.com/golang/glog" - cloudkms "google.golang.org/api/cloudkms/v1" - "google.golang.org/api/googleapi" - gcfg "gopkg.in/gcfg.v1" - "k8s.io/apiserver/pkg/storage/value/encrypt/envelope" -) - -const ( - // KMSServiceName is the name of the cloudkms provider registered by this cloud. - KMSServiceName = "gcp-cloudkms" - - defaultGKMSKeyRing = "google-container-engine" - defaultGKMSKeyRingLocation = "global" -) - -// gkmsConfig contains the GCE specific KMS configuration for setting up a KMS connection. -type gkmsConfig struct { - Global struct { - // location is the KMS location of the KeyRing to be used for encryption. - // It can be found by checking the available KeyRings in the IAM UI. - // This is not the same as the GCP location of the project. - // +optional - Location string `gcfg:"kms-location"` - // keyRing is the keyRing of the hosted key to be used. The default value is "google-kubernetes". - // +optional - KeyRing string `gcfg:"kms-keyring"` - // cryptoKey is the name of the key to be used for encryption of Data-Encryption-Keys. - CryptoKey string `gcfg:"kms-cryptokey"` - } -} - -// readGCPCloudKMSConfig parses and returns the configuration parameters for Google Cloud KMS. -func readGCPCloudKMSConfig(reader io.Reader) (*gkmsConfig, error) { - cfg := &gkmsConfig{} - if err := gcfg.FatalOnly(gcfg.ReadInto(cfg, reader)); err != nil { - glog.Errorf("Couldn't read Google Cloud KMS config: %v", err) - return nil, err - } - return cfg, nil -} - -// gkmsService provides Encrypt and Decrypt methods which allow cryptographic operations -// using Google Cloud KMS service. -type gkmsService struct { - parentName string - cloudkmsService *cloudkms.Service -} - -// getGCPCloudKMSService provides a Google Cloud KMS based implementation of envelope.Service. -func (gce *GCECloud) getGCPCloudKMSService(config io.Reader) (envelope.Service, error) { - kmsConfig, err := readGCPCloudKMSConfig(config) - if err != nil { - return nil, err - } - - // Hosting on GCE/GKE with Google KMS encryption provider - cloudkmsService := gce.GetKMSService() - - // Set defaults for location and keyRing. - location := kmsConfig.Global.Location - if len(location) == 0 { - location = defaultGKMSKeyRingLocation - } - keyRing := kmsConfig.Global.KeyRing - if len(keyRing) == 0 { - keyRing = defaultGKMSKeyRing - } - - cryptoKey := kmsConfig.Global.CryptoKey - if len(cryptoKey) == 0 { - return nil, fmt.Errorf("missing cryptoKey for cloudprovided KMS: " + KMSServiceName) - } - - parentName := fmt.Sprintf("projects/%s/locations/%s", gce.projectID, location) - - // Create the keyRing if it does not exist yet - _, err = cloudkmsService.Projects.Locations.KeyRings.Create(parentName, - &cloudkms.KeyRing{}).KeyRingId(keyRing).Do() - if err != nil && unrecoverableCreationError(err) { - return nil, err - } - parentName = parentName + "/keyRings/" + keyRing - - // Create the cryptoKey if it does not exist yet - _, err = cloudkmsService.Projects.Locations.KeyRings.CryptoKeys.Create(parentName, - &cloudkms.CryptoKey{ - Purpose: "ENCRYPT_DECRYPT", - }).CryptoKeyId(cryptoKey).Do() - if err != nil && unrecoverableCreationError(err) { - return nil, err - } - parentName = parentName + "/cryptoKeys/" + cryptoKey - - service := &gkmsService{ - parentName: parentName, - cloudkmsService: cloudkmsService, - } - - // Sanity check before startup. For non-GCP clusters, the user's account may not have permissions to create - // the key. We need to verify the existence of the key before apiserver startup. - _, err = service.Encrypt([]byte("test")) - if err != nil { - return nil, fmt.Errorf("failed to encrypt data using Google cloudkms, using key %s. Ensure that the keyRing and cryptoKey exist. Got error: %v", parentName, err) - } - - return service, nil -} - -// Decrypt decrypts a base64 representation of encrypted bytes. -func (t *gkmsService) Decrypt(data string) ([]byte, error) { - resp, err := t.cloudkmsService.Projects.Locations.KeyRings.CryptoKeys. - Decrypt(t.parentName, &cloudkms.DecryptRequest{ - Ciphertext: data, - }).Do() - if err != nil { - return nil, err - } - return base64.StdEncoding.DecodeString(resp.Plaintext) -} - -// Encrypt encrypts bytes, and returns base64 representation of the ciphertext. -func (t *gkmsService) Encrypt(data []byte) (string, error) { - resp, err := t.cloudkmsService.Projects.Locations.KeyRings.CryptoKeys. - Encrypt(t.parentName, &cloudkms.EncryptRequest{ - Plaintext: base64.StdEncoding.EncodeToString(data), - }).Do() - if err != nil { - return "", err - } - return resp.Ciphertext, nil -} - -// unrecoverableCreationError decides if Kubernetes should ignore the encountered Google KMS -// error. Only to be used for errors seen while creating a KeyRing or CryptoKey. -func unrecoverableCreationError(err error) bool { - apiError, isAPIError := err.(*googleapi.Error) - // 409 means the object exists. - // 403 means we do not have permission to create the object, the user must do it. - // Else, it is an unrecoverable error. - if !isAPIError || (apiError.Code != 409 && apiError.Code != 403) { - return true - } - return false -} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/metrics.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/metrics.go deleted file mode 100644 index 649bd11b1..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/metrics.go +++ /dev/null @@ -1,99 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "time" - - "github.com/prometheus/client_golang/prometheus" -) - -const ( - // Version strings for recording metrics. - computeV1Version = "v1" - computeAlphaVersion = "alpha" - computeBetaVersion = "beta" -) - -type apiCallMetrics struct { - latency *prometheus.HistogramVec - errors *prometheus.CounterVec -} - -var ( - metricLabels = []string{ - "request", // API function that is begin invoked. - "region", // region (optional). - "zone", // zone (optional). - "version", // API version. - } - - apiMetrics = registerAPIMetrics(metricLabels...) -) - -type metricContext struct { - start time.Time - // The cardinalities of attributes and metricLabels (defined above) must - // match, or prometheus will panic. - attributes []string -} - -// Value for an unused label in the metric dimension. -const unusedMetricLabel = "<n/a>" - -// Observe the result of a API call. -func (mc *metricContext) Observe(err error) error { - apiMetrics.latency.WithLabelValues(mc.attributes...).Observe( - time.Since(mc.start).Seconds()) - if err != nil { - apiMetrics.errors.WithLabelValues(mc.attributes...).Inc() - } - - return err -} - -func newGenericMetricContext(prefix, request, region, zone, version string) *metricContext { - return &metricContext{ - start: time.Now(), - attributes: []string{prefix + "_" + request, region, zone, version}, - } -} - -// registerApiMetrics adds metrics definitions for a category of API calls. -func registerAPIMetrics(attributes ...string) *apiCallMetrics { - metrics := &apiCallMetrics{ - latency: prometheus.NewHistogramVec( - prometheus.HistogramOpts{ - Name: "cloudprovider_gce_api_request_duration_seconds", - Help: "Latency of a GCE API call", - }, - attributes, - ), - errors: prometheus.NewCounterVec( - prometheus.CounterOpts{ - Name: "cloudprovider_gce_api_request_errors", - Help: "Number of errors for an API call", - }, - attributes, - ), - } - - prometheus.MustRegister(metrics.latency) - prometheus.MustRegister(metrics.errors) - - return metrics -} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/token_source.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/token_source.go deleted file mode 100644 index 2f4bb0911..000000000 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/token_source.go +++ /dev/null @@ -1,112 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "encoding/json" - "net/http" - "strings" - "time" - - "k8s.io/client-go/util/flowcontrol" - - "github.com/prometheus/client_golang/prometheus" - "golang.org/x/oauth2" - "golang.org/x/oauth2/google" - "google.golang.org/api/googleapi" -) - -const ( - // Max QPS to allow through to the token URL. - tokenURLQPS = .05 // back off to once every 20 seconds when failing - // Maximum burst of requests to token URL before limiting. - tokenURLBurst = 3 -) - -var ( - getTokenCounter = prometheus.NewCounter( - prometheus.CounterOpts{ - Name: "get_token_count", - Help: "Counter of total Token() requests to the alternate token source", - }, - ) - getTokenFailCounter = prometheus.NewCounter( - prometheus.CounterOpts{ - Name: "get_token_fail_count", - Help: "Counter of failed Token() requests to the alternate token source", - }, - ) -) - -func init() { - prometheus.MustRegister(getTokenCounter) - prometheus.MustRegister(getTokenFailCounter) -} - -type AltTokenSource struct { - oauthClient *http.Client - tokenURL string - tokenBody string - throttle flowcontrol.RateLimiter -} - -func (a *AltTokenSource) Token() (*oauth2.Token, error) { - a.throttle.Accept() - getTokenCounter.Inc() - t, err := a.token() - if err != nil { - getTokenFailCounter.Inc() - } - return t, err -} - -func (a *AltTokenSource) token() (*oauth2.Token, error) { - req, err := http.NewRequest("POST", a.tokenURL, strings.NewReader(a.tokenBody)) - if err != nil { - return nil, err - } - res, err := a.oauthClient.Do(req) - if err != nil { - return nil, err - } - defer res.Body.Close() - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - var tok struct { - AccessToken string `json:"accessToken"` - ExpireTime time.Time `json:"expireTime"` - } - if err := json.NewDecoder(res.Body).Decode(&tok); err != nil { - return nil, err - } - return &oauth2.Token{ - AccessToken: tok.AccessToken, - Expiry: tok.ExpireTime, - }, nil -} - -func NewAltTokenSource(tokenURL, tokenBody string) oauth2.TokenSource { - client := oauth2.NewClient(oauth2.NoContext, google.ComputeTokenSource("")) - a := &AltTokenSource{ - oauthClient: client, - tokenURL: tokenURL, - tokenBody: tokenBody, - throttle: flowcontrol.NewTokenBucketRateLimiter(tokenURLQPS, tokenURLBurst), - } - return oauth2.ReuseTokenSource(nil, a) -} diff --git a/vendor/k8s.io/kubernetes/pkg/controller/controller_ref_manager_test.go b/vendor/k8s.io/kubernetes/pkg/controller/controller_ref_manager_test.go new file mode 100644 index 000000000..4e6acb7cf --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/controller_ref_manager_test.go @@ -0,0 +1,181 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package controller + +import ( + "reflect" + "testing" + + "k8s.io/api/core/v1" + "k8s.io/api/extensions/v1beta1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" +) + +var ( + productionLabel = map[string]string{"type": "production"} + testLabel = map[string]string{"type": "testing"} + productionLabelSelector = labels.Set{"type": "production"}.AsSelector() + testLabelSelector = labels.Set{"type": "testing"}.AsSelector() + controllerUID = "123" +) + +func newPod(podName string, label map[string]string, owner metav1.Object) *v1.Pod { + pod := &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: podName, + Labels: label, + Namespace: metav1.NamespaceDefault, + }, + Spec: v1.PodSpec{ + Containers: []v1.Container{ + { + Image: "foo/bar", + }, + }, + }, + } + if owner != nil { + pod.OwnerReferences = []metav1.OwnerReference{*metav1.NewControllerRef(owner, v1beta1.SchemeGroupVersion.WithKind("Fake"))} + } + return pod +} + +func TestClaimPods(t *testing.T) { + controllerKind := schema.GroupVersionKind{} + type test struct { + name string + manager *PodControllerRefManager + pods []*v1.Pod + filters []func(*v1.Pod) bool + claimed []*v1.Pod + released []*v1.Pod + } + var tests = []test{ + { + name: "Claim pods with correct label", + manager: NewPodControllerRefManager(&FakePodControl{}, + &v1.ReplicationController{}, + productionLabelSelector, + controllerKind, + func() error { return nil }), + pods: []*v1.Pod{newPod("pod1", productionLabel, nil), newPod("pod2", testLabel, nil)}, + claimed: []*v1.Pod{newPod("pod1", productionLabel, nil)}, + }, + func() test { + controller := v1.ReplicationController{} + controller.UID = types.UID(controllerUID) + now := metav1.Now() + controller.DeletionTimestamp = &now + return test{ + name: "Controller marked for deletion can not claim pods", + manager: NewPodControllerRefManager(&FakePodControl{}, + &controller, + productionLabelSelector, + controllerKind, + func() error { return nil }), + pods: []*v1.Pod{newPod("pod1", productionLabel, nil), newPod("pod2", productionLabel, nil)}, + claimed: nil, + } + }(), + func() test { + controller := v1.ReplicationController{} + controller.UID = types.UID(controllerUID) + now := metav1.Now() + controller.DeletionTimestamp = &now + return test{ + name: "Controller marked for deletion can not claim new pods", + manager: NewPodControllerRefManager(&FakePodControl{}, + &controller, + productionLabelSelector, + controllerKind, + func() error { return nil }), + pods: []*v1.Pod{newPod("pod1", productionLabel, &controller), newPod("pod2", productionLabel, nil)}, + claimed: []*v1.Pod{newPod("pod1", productionLabel, &controller)}, + } + }(), + func() test { + controller := v1.ReplicationController{} + controller2 := v1.ReplicationController{} + controller.UID = types.UID(controllerUID) + controller2.UID = types.UID("AAAAA") + return test{ + name: "Controller can not claim pods owned by another controller", + manager: NewPodControllerRefManager(&FakePodControl{}, + &controller, + productionLabelSelector, + controllerKind, + func() error { return nil }), + pods: []*v1.Pod{newPod("pod1", productionLabel, &controller), newPod("pod2", productionLabel, &controller2)}, + claimed: []*v1.Pod{newPod("pod1", productionLabel, &controller)}, + } + }(), + func() test { + controller := v1.ReplicationController{} + controller.UID = types.UID(controllerUID) + return test{ + name: "Controller releases claimed pods when selector doesn't match", + manager: NewPodControllerRefManager(&FakePodControl{}, + &controller, + productionLabelSelector, + controllerKind, + func() error { return nil }), + pods: []*v1.Pod{newPod("pod1", productionLabel, &controller), newPod("pod2", testLabel, &controller)}, + claimed: []*v1.Pod{newPod("pod1", productionLabel, &controller)}, + } + }(), + func() test { + controller := v1.ReplicationController{} + controller.UID = types.UID(controllerUID) + podToDelete1 := newPod("pod1", productionLabel, &controller) + podToDelete2 := newPod("pod2", productionLabel, nil) + now := metav1.Now() + podToDelete1.DeletionTimestamp = &now + podToDelete2.DeletionTimestamp = &now + + return test{ + name: "Controller does not claim orphaned pods marked for deletion", + manager: NewPodControllerRefManager(&FakePodControl{}, + &controller, + productionLabelSelector, + controllerKind, + func() error { return nil }), + pods: []*v1.Pod{podToDelete1, podToDelete2}, + claimed: []*v1.Pod{podToDelete1}, + } + }(), + } + for _, test := range tests { + claimed, err := test.manager.ClaimPods(test.pods) + if err != nil { + t.Errorf("Test case `%s`, unexpected error: %v", test.name, err) + } else if !reflect.DeepEqual(test.claimed, claimed) { + t.Errorf("Test case `%s`, claimed wrong pods. Expected %v, got %v", test.name, podToStringSlice(test.claimed), podToStringSlice(claimed)) + } + + } +} + +func podToStringSlice(pods []*v1.Pod) []string { + var names []string + for _, pod := range pods { + names = append(names, pod.Name) + } + return names +} diff --git a/vendor/k8s.io/kubernetes/pkg/controller/controller_utils_test.go b/vendor/k8s.io/kubernetes/pkg/controller/controller_utils_test.go new file mode 100644 index 000000000..a72359585 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/controller_utils_test.go @@ -0,0 +1,842 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package controller + +import ( + "encoding/json" + "fmt" + "math" + "math/rand" + "net/http/httptest" + "reflect" + "sort" + "sync" + "testing" + "time" + + "k8s.io/api/core/v1" + extensions "k8s.io/api/extensions/v1beta1" + apiequality "k8s.io/apimachinery/pkg/api/equality" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/clock" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/util/uuid" + clientset "k8s.io/client-go/kubernetes" + "k8s.io/client-go/kubernetes/fake" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/tools/cache" + "k8s.io/client-go/tools/record" + utiltesting "k8s.io/client-go/util/testing" + "k8s.io/kubernetes/pkg/api" + _ "k8s.io/kubernetes/pkg/api/install" + "k8s.io/kubernetes/pkg/api/testapi" + "k8s.io/kubernetes/pkg/controller/testutil" + "k8s.io/kubernetes/pkg/securitycontext" +) + +// NewFakeControllerExpectationsLookup creates a fake store for PodExpectations. +func NewFakeControllerExpectationsLookup(ttl time.Duration) (*ControllerExpectations, *clock.FakeClock) { + fakeTime := time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC) + fakeClock := clock.NewFakeClock(fakeTime) + ttlPolicy := &cache.TTLPolicy{Ttl: ttl, Clock: fakeClock} + ttlStore := cache.NewFakeExpirationStore( + ExpKeyFunc, nil, ttlPolicy, fakeClock) + return &ControllerExpectations{ttlStore}, fakeClock +} + +func newReplicationController(replicas int) *v1.ReplicationController { + rc := &v1.ReplicationController{ + TypeMeta: metav1.TypeMeta{APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String()}, + ObjectMeta: metav1.ObjectMeta{ + UID: uuid.NewUUID(), + Name: "foobar", + Namespace: metav1.NamespaceDefault, + ResourceVersion: "18", + }, + Spec: v1.ReplicationControllerSpec{ + Replicas: func() *int32 { i := int32(replicas); return &i }(), + Selector: map[string]string{"foo": "bar"}, + Template: &v1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "name": "foo", + "type": "production", + }, + }, + Spec: v1.PodSpec{ + Containers: []v1.Container{ + { + Image: "foo/bar", + TerminationMessagePath: v1.TerminationMessagePathDefault, + ImagePullPolicy: v1.PullIfNotPresent, + SecurityContext: securitycontext.ValidSecurityContextWithContainerDefaults(), + }, + }, + RestartPolicy: v1.RestartPolicyAlways, + DNSPolicy: v1.DNSDefault, + NodeSelector: map[string]string{ + "baz": "blah", + }, + }, + }, + }, + } + return rc +} + +// create count pods with the given phase for the given rc (same selectors and namespace), and add them to the store. +func newPodList(store cache.Store, count int, status v1.PodPhase, rc *v1.ReplicationController) *v1.PodList { + pods := []v1.Pod{} + for i := 0; i < count; i++ { + newPod := v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: fmt.Sprintf("pod%d", i), + Labels: rc.Spec.Selector, + Namespace: rc.Namespace, + }, + Status: v1.PodStatus{Phase: status}, + } + if store != nil { + store.Add(&newPod) + } + pods = append(pods, newPod) + } + return &v1.PodList{ + Items: pods, + } +} + +func newReplicaSet(name string, replicas int) *extensions.ReplicaSet { + return &extensions.ReplicaSet{ + TypeMeta: metav1.TypeMeta{APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String()}, + ObjectMeta: metav1.ObjectMeta{ + UID: uuid.NewUUID(), + Name: name, + Namespace: metav1.NamespaceDefault, + ResourceVersion: "18", + }, + Spec: extensions.ReplicaSetSpec{ + Replicas: func() *int32 { i := int32(replicas); return &i }(), + Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, + Template: v1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "name": "foo", + "type": "production", + }, + }, + Spec: v1.PodSpec{ + Containers: []v1.Container{ + { + Image: "foo/bar", + TerminationMessagePath: v1.TerminationMessagePathDefault, + ImagePullPolicy: v1.PullIfNotPresent, + SecurityContext: securitycontext.ValidSecurityContextWithContainerDefaults(), + }, + }, + RestartPolicy: v1.RestartPolicyAlways, + DNSPolicy: v1.DNSDefault, + NodeSelector: map[string]string{ + "baz": "blah", + }, + }, + }, + }, + } +} + +func TestControllerExpectations(t *testing.T) { + ttl := 30 * time.Second + e, fakeClock := NewFakeControllerExpectationsLookup(ttl) + // In practice we can't really have add and delete expectations since we only either create or + // delete replicas in one rc pass, and the rc goes to sleep soon after until the expectations are + // either fulfilled or timeout. + adds, dels := 10, 30 + rc := newReplicationController(1) + + // RC fires off adds and deletes at apiserver, then sets expectations + rcKey, err := KeyFunc(rc) + if err != nil { + t.Errorf("Couldn't get key for object %#v: %v", rc, err) + } + e.SetExpectations(rcKey, adds, dels) + var wg sync.WaitGroup + for i := 0; i < adds+1; i++ { + wg.Add(1) + go func() { + // In prod this can happen either because of a failed create by the rc + // or after having observed a create via informer + e.CreationObserved(rcKey) + wg.Done() + }() + } + wg.Wait() + + // There are still delete expectations + if e.SatisfiedExpectations(rcKey) { + t.Errorf("Rc will sync before expectations are met") + } + for i := 0; i < dels+1; i++ { + wg.Add(1) + go func() { + e.DeletionObserved(rcKey) + wg.Done() + }() + } + wg.Wait() + + // Expectations have been surpassed + if podExp, exists, err := e.GetExpectations(rcKey); err == nil && exists { + add, del := podExp.GetExpectations() + if add != -1 || del != -1 { + t.Errorf("Unexpected pod expectations %#v", podExp) + } + } else { + t.Errorf("Could not get expectations for rc, exists %v and err %v", exists, err) + } + if !e.SatisfiedExpectations(rcKey) { + t.Errorf("Expectations are met but the rc will not sync") + } + + // Next round of rc sync, old expectations are cleared + e.SetExpectations(rcKey, 1, 2) + if podExp, exists, err := e.GetExpectations(rcKey); err == nil && exists { + add, del := podExp.GetExpectations() + if add != 1 || del != 2 { + t.Errorf("Unexpected pod expectations %#v", podExp) + } + } else { + t.Errorf("Could not get expectations for rc, exists %v and err %v", exists, err) + } + + // Expectations have expired because of ttl + fakeClock.Step(ttl + 1) + if !e.SatisfiedExpectations(rcKey) { + t.Errorf("Expectations should have expired but didn't") + } +} + +func TestUIDExpectations(t *testing.T) { + uidExp := NewUIDTrackingControllerExpectations(NewControllerExpectations()) + rcList := []*v1.ReplicationController{ + newReplicationController(2), + newReplicationController(1), + newReplicationController(0), + newReplicationController(5), + } + rcToPods := map[string][]string{} + rcKeys := []string{} + for i := range rcList { + rc := rcList[i] + rcName := fmt.Sprintf("rc-%v", i) + rc.Name = rcName + rc.Spec.Selector[rcName] = rcName + podList := newPodList(nil, 5, v1.PodRunning, rc) + rcKey, err := KeyFunc(rc) + if err != nil { + t.Fatalf("Couldn't get key for object %#v: %v", rc, err) + } + rcKeys = append(rcKeys, rcKey) + rcPodNames := []string{} + for i := range podList.Items { + p := &podList.Items[i] + p.Name = fmt.Sprintf("%v-%v", p.Name, rc.Name) + rcPodNames = append(rcPodNames, PodKey(p)) + } + rcToPods[rcKey] = rcPodNames + uidExp.ExpectDeletions(rcKey, rcPodNames) + } + for i := range rcKeys { + j := rand.Intn(i + 1) + rcKeys[i], rcKeys[j] = rcKeys[j], rcKeys[i] + } + for _, rcKey := range rcKeys { + if uidExp.SatisfiedExpectations(rcKey) { + t.Errorf("Controller %v satisfied expectations before deletion", rcKey) + } + for _, p := range rcToPods[rcKey] { + uidExp.DeletionObserved(rcKey, p) + } + if !uidExp.SatisfiedExpectations(rcKey) { + t.Errorf("Controller %v didn't satisfy expectations after deletion", rcKey) + } + uidExp.DeleteExpectations(rcKey) + if uidExp.GetUIDs(rcKey) != nil { + t.Errorf("Failed to delete uid expectations for %v", rcKey) + } + } +} + +func TestCreatePods(t *testing.T) { + ns := metav1.NamespaceDefault + body := runtime.EncodeOrDie(testapi.Default.Codec(), &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "empty_pod"}}) + fakeHandler := utiltesting.FakeHandler{ + StatusCode: 200, + ResponseBody: string(body), + } + testServer := httptest.NewServer(&fakeHandler) + defer testServer.Close() + clientset := clientset.NewForConfigOrDie(&restclient.Config{Host: testServer.URL, ContentConfig: restclient.ContentConfig{GroupVersion: &api.Registry.GroupOrDie(v1.GroupName).GroupVersion}}) + + podControl := RealPodControl{ + KubeClient: clientset, + Recorder: &record.FakeRecorder{}, + } + + controllerSpec := newReplicationController(1) + + // Make sure createReplica sends a POST to the apiserver with a pod from the controllers pod template + if err := podControl.CreatePods(ns, controllerSpec.Spec.Template, controllerSpec); err != nil { + t.Fatalf("unexpected error: %v", err) + } + + expectedPod := v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Labels: controllerSpec.Spec.Template.Labels, + GenerateName: fmt.Sprintf("%s-", controllerSpec.Name), + }, + Spec: controllerSpec.Spec.Template.Spec, + } + fakeHandler.ValidateRequest(t, testapi.Default.ResourcePath("pods", metav1.NamespaceDefault, ""), "POST", nil) + var actualPod = &v1.Pod{} + err := json.Unmarshal([]byte(fakeHandler.RequestBody), actualPod) + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + if !apiequality.Semantic.DeepDerivative(&expectedPod, actualPod) { + t.Logf("Body: %s", fakeHandler.RequestBody) + t.Errorf("Unexpected mismatch. Expected\n %#v,\n Got:\n %#v", &expectedPod, actualPod) + } +} + +func TestActivePodFiltering(t *testing.T) { + // This rc is not needed by the test, only the newPodList to give the pods labels/a namespace. + rc := newReplicationController(0) + podList := newPodList(nil, 5, v1.PodRunning, rc) + podList.Items[0].Status.Phase = v1.PodSucceeded + podList.Items[1].Status.Phase = v1.PodFailed + expectedNames := sets.NewString() + for _, pod := range podList.Items[2:] { + expectedNames.Insert(pod.Name) + } + + var podPointers []*v1.Pod + for i := range podList.Items { + podPointers = append(podPointers, &podList.Items[i]) + } + got := FilterActivePods(podPointers) + gotNames := sets.NewString() + for _, pod := range got { + gotNames.Insert(pod.Name) + } + if expectedNames.Difference(gotNames).Len() != 0 || gotNames.Difference(expectedNames).Len() != 0 { + t.Errorf("expected %v, got %v", expectedNames.List(), gotNames.List()) + } +} + +func TestSortingActivePods(t *testing.T) { + numPods := 9 + // This rc is not needed by the test, only the newPodList to give the pods labels/a namespace. + rc := newReplicationController(0) + podList := newPodList(nil, numPods, v1.PodRunning, rc) + + pods := make([]*v1.Pod, len(podList.Items)) + for i := range podList.Items { + pods[i] = &podList.Items[i] + } + // pods[0] is not scheduled yet. + pods[0].Spec.NodeName = "" + pods[0].Status.Phase = v1.PodPending + // pods[1] is scheduled but pending. + pods[1].Spec.NodeName = "bar" + pods[1].Status.Phase = v1.PodPending + // pods[2] is unknown. + pods[2].Spec.NodeName = "foo" + pods[2].Status.Phase = v1.PodUnknown + // pods[3] is running but not ready. + pods[3].Spec.NodeName = "foo" + pods[3].Status.Phase = v1.PodRunning + // pods[4] is running and ready but without LastTransitionTime. + now := metav1.Now() + pods[4].Spec.NodeName = "foo" + pods[4].Status.Phase = v1.PodRunning + pods[4].Status.Conditions = []v1.PodCondition{{Type: v1.PodReady, Status: v1.ConditionTrue}} + pods[4].Status.ContainerStatuses = []v1.ContainerStatus{{RestartCount: 3}, {RestartCount: 0}} + // pods[5] is running and ready and with LastTransitionTime. + pods[5].Spec.NodeName = "foo" + pods[5].Status.Phase = v1.PodRunning + pods[5].Status.Conditions = []v1.PodCondition{{Type: v1.PodReady, Status: v1.ConditionTrue, LastTransitionTime: now}} + pods[5].Status.ContainerStatuses = []v1.ContainerStatus{{RestartCount: 3}, {RestartCount: 0}} + // pods[6] is running ready for a longer time than pods[5]. + then := metav1.Time{Time: now.AddDate(0, -1, 0)} + pods[6].Spec.NodeName = "foo" + pods[6].Status.Phase = v1.PodRunning + pods[6].Status.Conditions = []v1.PodCondition{{Type: v1.PodReady, Status: v1.ConditionTrue, LastTransitionTime: then}} + pods[6].Status.ContainerStatuses = []v1.ContainerStatus{{RestartCount: 3}, {RestartCount: 0}} + // pods[7] has lower container restart count than pods[6]. + pods[7].Spec.NodeName = "foo" + pods[7].Status.Phase = v1.PodRunning + pods[7].Status.Conditions = []v1.PodCondition{{Type: v1.PodReady, Status: v1.ConditionTrue, LastTransitionTime: then}} + pods[7].Status.ContainerStatuses = []v1.ContainerStatus{{RestartCount: 2}, {RestartCount: 1}} + pods[7].CreationTimestamp = now + // pods[8] is older than pods[7]. + pods[8].Spec.NodeName = "foo" + pods[8].Status.Phase = v1.PodRunning + pods[8].Status.Conditions = []v1.PodCondition{{Type: v1.PodReady, Status: v1.ConditionTrue, LastTransitionTime: then}} + pods[8].Status.ContainerStatuses = []v1.ContainerStatus{{RestartCount: 2}, {RestartCount: 1}} + pods[8].CreationTimestamp = then + + getOrder := func(pods []*v1.Pod) []string { + names := make([]string, len(pods)) + for i := range pods { + names[i] = pods[i].Name + } + return names + } + + expected := getOrder(pods) + + for i := 0; i < 20; i++ { + idx := rand.Perm(numPods) + randomizedPods := make([]*v1.Pod, numPods) + for j := 0; j < numPods; j++ { + randomizedPods[j] = pods[idx[j]] + } + sort.Sort(ActivePods(randomizedPods)) + actual := getOrder(randomizedPods) + + if !reflect.DeepEqual(actual, expected) { + t.Errorf("expected %v, got %v", expected, actual) + } + } +} + +func TestActiveReplicaSetsFiltering(t *testing.T) { + var replicaSets []*extensions.ReplicaSet + replicaSets = append(replicaSets, newReplicaSet("zero", 0)) + replicaSets = append(replicaSets, nil) + replicaSets = append(replicaSets, newReplicaSet("foo", 1)) + replicaSets = append(replicaSets, newReplicaSet("bar", 2)) + expectedNames := sets.NewString() + for _, rs := range replicaSets[2:] { + expectedNames.Insert(rs.Name) + } + + got := FilterActiveReplicaSets(replicaSets) + gotNames := sets.NewString() + for _, rs := range got { + gotNames.Insert(rs.Name) + } + + if expectedNames.Difference(gotNames).Len() != 0 || gotNames.Difference(expectedNames).Len() != 0 { + t.Errorf("expected %v, got %v", expectedNames.List(), gotNames.List()) + } +} + +func int64P(num int64) *int64 { + return &num +} + +func TestComputeHash(t *testing.T) { + collisionCount := int32(1) + otherCollisionCount := int32(2) + maxCollisionCount := int32(math.MaxInt32) + tests := []struct { + name string + template *v1.PodTemplateSpec + collisionCount *int32 + otherCollisionCount *int32 + }{ + { + name: "simple", + template: &v1.PodTemplateSpec{}, + collisionCount: &collisionCount, + otherCollisionCount: &otherCollisionCount, + }, + { + name: "using math.MaxInt64", + template: &v1.PodTemplateSpec{}, + collisionCount: nil, + otherCollisionCount: &maxCollisionCount, + }, + } + + for _, test := range tests { + hash := ComputeHash(test.template, test.collisionCount) + otherHash := ComputeHash(test.template, test.otherCollisionCount) + + if hash == otherHash { + t.Errorf("expected different hashes but got the same: %d", hash) + } + } +} + +func TestRemoveTaintOffNode(t *testing.T) { + tests := []struct { + name string + nodeHandler *testutil.FakeNodeHandler + nodeName string + taintsToRemove []*v1.Taint + expectedTaints []v1.Taint + requestCount int + }{ + { + name: "remove one taint from node", + nodeHandler: &testutil.FakeNodeHandler{ + Existing: []*v1.Node{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: "node1", + }, + Spec: v1.NodeSpec{ + Taints: []v1.Taint{ + {Key: "key1", Value: "value1", Effect: "NoSchedule"}, + {Key: "key2", Value: "value2", Effect: "NoExecute"}, + }, + }, + }, + }, + Clientset: fake.NewSimpleClientset(&v1.PodList{Items: []v1.Pod{*testutil.NewPod("pod0", "node0")}}), + }, + nodeName: "node1", + taintsToRemove: []*v1.Taint{ + {Key: "key2", Value: "value2", Effect: "NoExecute"}, + }, + expectedTaints: []v1.Taint{ + {Key: "key1", Value: "value1", Effect: "NoSchedule"}, + }, + requestCount: 4, + }, + { + name: "remove multiple taints from node", + nodeHandler: &testutil.FakeNodeHandler{ + Existing: []*v1.Node{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: "node1", + }, + Spec: v1.NodeSpec{ + Taints: []v1.Taint{ + {Key: "key1", Value: "value1", Effect: "NoSchedule"}, + {Key: "key2", Value: "value2", Effect: "NoExecute"}, + {Key: "key3", Value: "value3", Effect: "NoSchedule"}, + {Key: "key4", Value: "value4", Effect: "NoExecute"}, + }, + }, + }, + }, + Clientset: fake.NewSimpleClientset(&v1.PodList{Items: []v1.Pod{*testutil.NewPod("pod0", "node0")}}), + }, + nodeName: "node1", + taintsToRemove: []*v1.Taint{ + {Key: "key2", Value: "value2", Effect: "NoExecute"}, + {Key: "key3", Value: "value3", Effect: "NoSchedule"}, + }, + expectedTaints: []v1.Taint{ + {Key: "key1", Value: "value1", Effect: "NoSchedule"}, + {Key: "key4", Value: "value4", Effect: "NoExecute"}, + }, + requestCount: 4, + }, + { + name: "remove no-exist taints from node", + nodeHandler: &testutil.FakeNodeHandler{ + Existing: []*v1.Node{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: "node1", + }, + Spec: v1.NodeSpec{ + Taints: []v1.Taint{ + {Key: "key1", Value: "value1", Effect: "NoSchedule"}, + {Key: "key2", Value: "value2", Effect: "NoExecute"}, + }, + }, + }, + }, + Clientset: fake.NewSimpleClientset(&v1.PodList{Items: []v1.Pod{*testutil.NewPod("pod0", "node0")}}), + }, + nodeName: "node1", + taintsToRemove: []*v1.Taint{ + {Key: "key3", Value: "value3", Effect: "NoSchedule"}, + }, + expectedTaints: []v1.Taint{ + {Key: "key1", Value: "value1", Effect: "NoSchedule"}, + {Key: "key2", Value: "value2", Effect: "NoExecute"}, + }, + requestCount: 2, + }, + { + name: "remove taint from node without taints", + nodeHandler: &testutil.FakeNodeHandler{ + Existing: []*v1.Node{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: "node1", + }, + }, + }, + Clientset: fake.NewSimpleClientset(&v1.PodList{Items: []v1.Pod{*testutil.NewPod("pod0", "node0")}}), + }, + nodeName: "node1", + taintsToRemove: []*v1.Taint{ + {Key: "key3", Value: "value3", Effect: "NoSchedule"}, + }, + expectedTaints: nil, + requestCount: 2, + }, + { + name: "remove empty taint list from node without taints", + nodeHandler: &testutil.FakeNodeHandler{ + Existing: []*v1.Node{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: "node1", + }, + }, + }, + Clientset: fake.NewSimpleClientset(&v1.PodList{Items: []v1.Pod{*testutil.NewPod("pod0", "node0")}}), + }, + nodeName: "node1", + taintsToRemove: []*v1.Taint{}, + expectedTaints: nil, + requestCount: 2, + }, + { + name: "remove empty taint list from node", + nodeHandler: &testutil.FakeNodeHandler{ + Existing: []*v1.Node{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: "node1", + }, + Spec: v1.NodeSpec{ + Taints: []v1.Taint{ + {Key: "key1", Value: "value1", Effect: "NoSchedule"}, + {Key: "key2", Value: "value2", Effect: "NoExecute"}, + }, + }, + }, + }, + Clientset: fake.NewSimpleClientset(&v1.PodList{Items: []v1.Pod{*testutil.NewPod("pod0", "node0")}}), + }, + nodeName: "node1", + taintsToRemove: []*v1.Taint{}, + expectedTaints: []v1.Taint{ + {Key: "key1", Value: "value1", Effect: "NoSchedule"}, + {Key: "key2", Value: "value2", Effect: "NoExecute"}, + }, + requestCount: 2, + }, + } + for _, test := range tests { + node, _ := test.nodeHandler.Get(test.nodeName, metav1.GetOptions{}) + if err := RemoveTaintOffNode(test.nodeHandler, test.nodeName, node, test.taintsToRemove...); err != nil { + t.Errorf("%s: RemoveTaintOffNode() error = %v", test.name, err) + } + + node, _ = test.nodeHandler.Get(test.nodeName, metav1.GetOptions{}) + if !reflect.DeepEqual(node.Spec.Taints, test.expectedTaints) { + t.Errorf("%s: failed to remove taint off node: expected %+v, got %+v", + test.name, test.expectedTaints, node.Spec.Taints) + } + + if test.nodeHandler.RequestCount != test.requestCount { + t.Errorf("%s: unexpected request count: expected %+v, got %+v", + test.name, test.requestCount, test.nodeHandler.RequestCount) + } + } +} + +func TestAddOrUpdateTaintOnNode(t *testing.T) { + tests := []struct { + name string + nodeHandler *testutil.FakeNodeHandler + nodeName string + taintsToAdd []*v1.Taint + expectedTaints []v1.Taint + requestCount int + }{ + { + name: "add one taint on node", + nodeHandler: &testutil.FakeNodeHandler{ + Existing: []*v1.Node{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: "node1", + }, + Spec: v1.NodeSpec{ + Taints: []v1.Taint{ + {Key: "key1", Value: "value1", Effect: "NoSchedule"}, + }, + }, + }, + }, + Clientset: fake.NewSimpleClientset(&v1.PodList{Items: []v1.Pod{*testutil.NewPod("pod0", "node0")}}), + }, + nodeName: "node1", + taintsToAdd: []*v1.Taint{ + {Key: "key2", Value: "value2", Effect: "NoExecute"}, + }, + expectedTaints: []v1.Taint{ + {Key: "key1", Value: "value1", Effect: "NoSchedule"}, + {Key: "key2", Value: "value2", Effect: "NoExecute"}, + }, + requestCount: 3, + }, + { + name: "add multiple taints to node", + nodeHandler: &testutil.FakeNodeHandler{ + Existing: []*v1.Node{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: "node1", + }, + Spec: v1.NodeSpec{ + Taints: []v1.Taint{ + {Key: "key1", Value: "value1", Effect: "NoSchedule"}, + {Key: "key2", Value: "value2", Effect: "NoExecute"}, + }, + }, + }, + }, + Clientset: fake.NewSimpleClientset(&v1.PodList{Items: []v1.Pod{*testutil.NewPod("pod0", "node0")}}), + }, + nodeName: "node1", + taintsToAdd: []*v1.Taint{ + {Key: "key3", Value: "value3", Effect: "NoSchedule"}, + {Key: "key4", Value: "value4", Effect: "NoExecute"}, + }, + expectedTaints: []v1.Taint{ + {Key: "key1", Value: "value1", Effect: "NoSchedule"}, + {Key: "key2", Value: "value2", Effect: "NoExecute"}, + {Key: "key3", Value: "value3", Effect: "NoSchedule"}, + {Key: "key4", Value: "value4", Effect: "NoExecute"}, + }, + requestCount: 3, + }, + { + name: "add exist taints to node", + nodeHandler: &testutil.FakeNodeHandler{ + Existing: []*v1.Node{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: "node1", + }, + Spec: v1.NodeSpec{ + Taints: []v1.Taint{ + {Key: "key1", Value: "value1", Effect: "NoSchedule"}, + {Key: "key2", Value: "value2", Effect: "NoExecute"}, + }, + }, + }, + }, + Clientset: fake.NewSimpleClientset(&v1.PodList{Items: []v1.Pod{*testutil.NewPod("pod0", "node0")}}), + }, + nodeName: "node1", + taintsToAdd: []*v1.Taint{ + {Key: "key2", Value: "value2", Effect: "NoExecute"}, + }, + expectedTaints: []v1.Taint{ + {Key: "key1", Value: "value1", Effect: "NoSchedule"}, + {Key: "key2", Value: "value2", Effect: "NoExecute"}, + }, + requestCount: 2, + }, + { + name: "add taint to node without taints", + nodeHandler: &testutil.FakeNodeHandler{ + Existing: []*v1.Node{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: "node1", + }, + }, + }, + Clientset: fake.NewSimpleClientset(&v1.PodList{Items: []v1.Pod{*testutil.NewPod("pod0", "node0")}}), + }, + nodeName: "node1", + taintsToAdd: []*v1.Taint{ + {Key: "key3", Value: "value3", Effect: "NoSchedule"}, + }, + expectedTaints: []v1.Taint{ + {Key: "key3", Value: "value3", Effect: "NoSchedule"}, + }, + requestCount: 3, + }, + { + name: "add empty taint list to node without taints", + nodeHandler: &testutil.FakeNodeHandler{ + Existing: []*v1.Node{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: "node1", + }, + }, + }, + Clientset: fake.NewSimpleClientset(&v1.PodList{Items: []v1.Pod{*testutil.NewPod("pod0", "node0")}}), + }, + nodeName: "node1", + taintsToAdd: []*v1.Taint{}, + expectedTaints: nil, + requestCount: 1, + }, + { + name: "add empty taint list to node", + nodeHandler: &testutil.FakeNodeHandler{ + Existing: []*v1.Node{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: "node1", + }, + Spec: v1.NodeSpec{ + Taints: []v1.Taint{ + {Key: "key1", Value: "value1", Effect: "NoSchedule"}, + {Key: "key2", Value: "value2", Effect: "NoExecute"}, + }, + }, + }, + }, + Clientset: fake.NewSimpleClientset(&v1.PodList{Items: []v1.Pod{*testutil.NewPod("pod0", "node0")}}), + }, + nodeName: "node1", + taintsToAdd: []*v1.Taint{}, + expectedTaints: []v1.Taint{ + {Key: "key1", Value: "value1", Effect: "NoSchedule"}, + {Key: "key2", Value: "value2", Effect: "NoExecute"}, + }, + requestCount: 1, + }, + } + for _, test := range tests { + if err := AddOrUpdateTaintOnNode(test.nodeHandler, test.nodeName, test.taintsToAdd...); err != nil { + t.Errorf("%s: AddOrUpdateTaintOnNode() error = %v", test.name, err) + } + + node, _ := test.nodeHandler.Get(test.nodeName, metav1.GetOptions{}) + if !reflect.DeepEqual(node.Spec.Taints, test.expectedTaints) { + t.Errorf("%s: failed to add taint to node: expected %+v, got %+v", + test.name, test.expectedTaints, node.Spec.Taints) + } + + if test.nodeHandler.RequestCount != test.requestCount { + t.Errorf("%s: unexpected request count: expected %+v, got %+v", + test.name, test.requestCount, test.nodeHandler.RequestCount) + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/controller/doc.go b/vendor/k8s.io/kubernetes/pkg/controller/doc.go index ded390582..3c5c943da 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package controller contains code for controllers (like the replication // controller). -package controller +package controller // import "k8s.io/kubernetes/pkg/controller" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/BUILD new file mode 100644 index 000000000..5b2ad4410 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/BUILD @@ -0,0 +1,293 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", + "go_test", +) + +go_library( + name = "go_default_library", + srcs = [ + "active_deadline.go", + "doc.go", + "kubelet.go", + "kubelet_getters.go", + "kubelet_network.go", + "kubelet_node_status.go", + "kubelet_pods.go", + "kubelet_resources.go", + "kubelet_volumes.go", + "networks.go", + "oom_watcher.go", + "pod_container_deletor.go", + "pod_workers.go", + "reason_cache.go", + "runonce.go", + "runtime.go", + "util.go", + "volume_host.go", + ], + deps = [ + "//cmd/kubelet/app/options:go_default_library", + "//pkg/api:go_default_library", + "//pkg/api/v1:go_default_library", + "//pkg/api/v1/helper:go_default_library", + "//pkg/api/v1/helper/qos:go_default_library", + "//pkg/api/v1/pod:go_default_library", + "//pkg/api/v1/resource:go_default_library", + "//pkg/api/v1/validation:go_default_library", + "//pkg/capabilities:go_default_library", + "//pkg/cloudprovider:go_default_library", + "//pkg/features:go_default_library", + "//pkg/fieldpath:go_default_library", + "//pkg/kubelet/apis:go_default_library", + "//pkg/kubelet/apis/cri:go_default_library", + "//pkg/kubelet/apis/cri/v1alpha1/runtime:go_default_library", + "//pkg/kubelet/apis/kubeletconfig:go_default_library", + "//pkg/kubelet/apis/kubeletconfig/v1alpha1:go_default_library", + "//pkg/kubelet/cadvisor:go_default_library", + "//pkg/kubelet/certificate:go_default_library", + "//pkg/kubelet/cm:go_default_library", + "//pkg/kubelet/config:go_default_library", + "//pkg/kubelet/configmap:go_default_library", + "//pkg/kubelet/container:go_default_library", + "//pkg/kubelet/dockershim:go_default_library", + "//pkg/kubelet/dockershim/libdocker:go_default_library", + "//pkg/kubelet/dockershim/remote:go_default_library", + "//pkg/kubelet/envvars:go_default_library", + "//pkg/kubelet/events:go_default_library", + "//pkg/kubelet/eviction:go_default_library", + "//pkg/kubelet/gpu:go_default_library", + "//pkg/kubelet/gpu/nvidia:go_default_library", + "//pkg/kubelet/images:go_default_library", + "//pkg/kubelet/kubeletconfig:go_default_library", + "//pkg/kubelet/kuberuntime:go_default_library", + "//pkg/kubelet/lifecycle:go_default_library", + "//pkg/kubelet/metrics:go_default_library", + "//pkg/kubelet/network:go_default_library", + "//pkg/kubelet/pleg:go_default_library", + "//pkg/kubelet/pod:go_default_library", + "//pkg/kubelet/preemption:go_default_library", + "//pkg/kubelet/prober:go_default_library", + "//pkg/kubelet/prober/results:go_default_library", + "//pkg/kubelet/remote:go_default_library", + "//pkg/kubelet/rkt:go_default_library", + "//pkg/kubelet/secret:go_default_library", + "//pkg/kubelet/server:go_default_library", + "//pkg/kubelet/server/portforward:go_default_library", + "//pkg/kubelet/server/remotecommand:go_default_library", + "//pkg/kubelet/server/stats:go_default_library", + "//pkg/kubelet/server/streaming:go_default_library", + "//pkg/kubelet/stats:go_default_library", + "//pkg/kubelet/status:go_default_library", + "//pkg/kubelet/sysctl:go_default_library", + "//pkg/kubelet/types:go_default_library", + "//pkg/kubelet/util:go_default_library", + "//pkg/kubelet/util/format:go_default_library", + "//pkg/kubelet/util/queue:go_default_library", + "//pkg/kubelet/util/sliceutils:go_default_library", + "//pkg/kubelet/volumemanager:go_default_library", + "//pkg/security/apparmor:go_default_library", + "//pkg/securitycontext:go_default_library", + "//pkg/util/dbus:go_default_library", + "//pkg/util/file:go_default_library", + "//pkg/util/io:go_default_library", + "//pkg/util/iptables:go_default_library", + "//pkg/util/mount:go_default_library", + "//pkg/util/node:go_default_library", + "//pkg/util/oom:go_default_library", + "//pkg/util/removeall:go_default_library", + "//pkg/version:go_default_library", + "//pkg/volume:go_default_library", + "//pkg/volume/util:go_default_library", + "//pkg/volume/util/types:go_default_library", + "//pkg/volume/util/volumehelper:go_default_library", + "//pkg/volume/validation:go_default_library", + "//plugin/pkg/scheduler/algorithm:go_default_library", + "//plugin/pkg/scheduler/algorithm/predicates:go_default_library", + "//third_party/forked/golang/expansion:go_default_library", + "//vendor/github.com/golang/glog:go_default_library", + "//vendor/github.com/golang/groupcache/lru:go_default_library", + "//vendor/github.com/google/cadvisor/events:go_default_library", + "//vendor/github.com/google/cadvisor/info/v1:go_default_library", + "//vendor/github.com/google/cadvisor/info/v2:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/clock:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/net:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/validation:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", + "//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library", + "//vendor/k8s.io/client-go/kubernetes:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", + "//vendor/k8s.io/client-go/listers/core/v1:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + "//vendor/k8s.io/client-go/tools/record:go_default_library", + "//vendor/k8s.io/client-go/tools/remotecommand:go_default_library", + "//vendor/k8s.io/client-go/util/flowcontrol:go_default_library", + "//vendor/k8s.io/client-go/util/integer:go_default_library", + "//vendor/k8s.io/utils/exec:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "active_deadline_test.go", + "kubelet_getters_test.go", + "kubelet_network_test.go", + "kubelet_node_status_test.go", + "kubelet_pods_test.go", + "kubelet_resources_test.go", + "kubelet_test.go", + "kubelet_volumes_test.go", + "networks_test.go", + "oom_watcher_test.go", + "pod_container_deletor_test.go", + "pod_workers_test.go", + "reason_cache_test.go", + "runonce_test.go", + ] + select({ + "@io_bazel_rules_go//go/platform:windows_amd64": [ + "kubelet_pods_windows_test.go", + ], + "//conditions:default": [], + }), + library = ":go_default_library", + deps = [ + "//pkg/api:go_default_library", + "//pkg/api/install:go_default_library", + "//pkg/capabilities:go_default_library", + "//pkg/cloudprovider/providers/fake:go_default_library", + "//pkg/kubelet/apis:go_default_library", + "//pkg/kubelet/apis/cri/v1alpha1/runtime:go_default_library", + "//pkg/kubelet/apis/kubeletconfig:go_default_library", + "//pkg/kubelet/cadvisor/testing:go_default_library", + "//pkg/kubelet/cm:go_default_library", + "//pkg/kubelet/config:go_default_library", + "//pkg/kubelet/configmap:go_default_library", + "//pkg/kubelet/container:go_default_library", + "//pkg/kubelet/container/testing:go_default_library", + "//pkg/kubelet/eviction:go_default_library", + "//pkg/kubelet/gpu:go_default_library", + "//pkg/kubelet/images:go_default_library", + "//pkg/kubelet/lifecycle:go_default_library", + "//pkg/kubelet/network:go_default_library", + "//pkg/kubelet/network/testing:go_default_library", + "//pkg/kubelet/pleg:go_default_library", + "//pkg/kubelet/pod:go_default_library", + "//pkg/kubelet/pod/testing:go_default_library", + "//pkg/kubelet/prober/results:go_default_library", + "//pkg/kubelet/prober/testing:go_default_library", + "//pkg/kubelet/secret:go_default_library", + "//pkg/kubelet/server/portforward:go_default_library", + "//pkg/kubelet/server/remotecommand:go_default_library", + "//pkg/kubelet/server/stats:go_default_library", + "//pkg/kubelet/stats:go_default_library", + "//pkg/kubelet/status:go_default_library", + "//pkg/kubelet/status/testing:go_default_library", + "//pkg/kubelet/types:go_default_library", + "//pkg/kubelet/util/queue:go_default_library", + "//pkg/kubelet/util/sliceutils:go_default_library", + "//pkg/kubelet/volumemanager:go_default_library", + "//pkg/util/mount:go_default_library", + "//pkg/version:go_default_library", + "//pkg/volume:go_default_library", + "//pkg/volume/host_path:go_default_library", + "//pkg/volume/testing:go_default_library", + "//pkg/volume/util/volumehelper:go_default_library", + "//vendor/github.com/google/cadvisor/info/v1:go_default_library", + "//vendor/github.com/google/cadvisor/info/v2:go_default_library", + "//vendor/github.com/stretchr/testify/assert:go_default_library", + "//vendor/github.com/stretchr/testify/require:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/clock:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/diff:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/rand:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/strategicpatch:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/uuid:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", + "//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/fake:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + "//vendor/k8s.io/client-go/testing:go_default_library", + "//vendor/k8s.io/client-go/tools/record:go_default_library", + "//vendor/k8s.io/client-go/util/flowcontrol:go_default_library", + "//vendor/k8s.io/client-go/util/testing:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [ + ":package-srcs", + "//pkg/kubelet/apis:all-srcs", + "//pkg/kubelet/cadvisor:all-srcs", + "//pkg/kubelet/certificate:all-srcs", + "//pkg/kubelet/client:all-srcs", + "//pkg/kubelet/cm:all-srcs", + "//pkg/kubelet/config:all-srcs", + "//pkg/kubelet/configmap:all-srcs", + "//pkg/kubelet/container:all-srcs", + "//pkg/kubelet/custommetrics:all-srcs", + "//pkg/kubelet/deviceplugin:all-srcs", + "//pkg/kubelet/dockershim:all-srcs", + "//pkg/kubelet/envvars:all-srcs", + "//pkg/kubelet/events:all-srcs", + "//pkg/kubelet/eviction:all-srcs", + "//pkg/kubelet/gpu:all-srcs", + "//pkg/kubelet/images:all-srcs", + "//pkg/kubelet/kubeletconfig:all-srcs", + "//pkg/kubelet/kuberuntime:all-srcs", + "//pkg/kubelet/leaky:all-srcs", + "//pkg/kubelet/lifecycle:all-srcs", + "//pkg/kubelet/metrics:all-srcs", + "//pkg/kubelet/network:all-srcs", + "//pkg/kubelet/pleg:all-srcs", + "//pkg/kubelet/pod:all-srcs", + "//pkg/kubelet/preemption:all-srcs", + "//pkg/kubelet/prober:all-srcs", + "//pkg/kubelet/qos:all-srcs", + "//pkg/kubelet/remote:all-srcs", + "//pkg/kubelet/rkt:all-srcs", + "//pkg/kubelet/rktshim:all-srcs", + "//pkg/kubelet/secret:all-srcs", + "//pkg/kubelet/server:all-srcs", + "//pkg/kubelet/stats:all-srcs", + "//pkg/kubelet/status:all-srcs", + "//pkg/kubelet/sysctl:all-srcs", + "//pkg/kubelet/types:all-srcs", + "//pkg/kubelet/util:all-srcs", + "//pkg/kubelet/volumemanager:all-srcs", + ], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/OWNERS b/vendor/k8s.io/kubernetes/pkg/kubelet/OWNERS new file mode 100644 index 000000000..82e510eaa --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/OWNERS @@ -0,0 +1,9 @@ +approvers: +- Random-Liu +- dchen1107 +- derekwaynecarr +- tallclair +- vishh +- yujuhong +reviewers: +- sig-node-reviewers diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/active_deadline.go b/vendor/k8s.io/kubernetes/pkg/kubelet/active_deadline.go new file mode 100644 index 000000000..f14024b98 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/active_deadline.go @@ -0,0 +1,98 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "fmt" + "time" + + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/util/clock" + "k8s.io/client-go/tools/record" + "k8s.io/kubernetes/pkg/kubelet/lifecycle" + "k8s.io/kubernetes/pkg/kubelet/status" +) + +const ( + reason = "DeadlineExceeded" + message = "Pod was active on the node longer than the specified deadline" +) + +// activeDeadlineHandler knows how to enforce active deadlines on pods. +type activeDeadlineHandler struct { + // the clock to use for deadline enforcement + clock clock.Clock + // the provider of pod status + podStatusProvider status.PodStatusProvider + // the recorder to dispatch events when we identify a pod has exceeded active deadline + recorder record.EventRecorder +} + +// newActiveDeadlineHandler returns an active deadline handler that can enforce pod active deadline +func newActiveDeadlineHandler( + podStatusProvider status.PodStatusProvider, + recorder record.EventRecorder, + clock clock.Clock, +) (*activeDeadlineHandler, error) { + + // check for all required fields + if clock == nil || podStatusProvider == nil || recorder == nil { + return nil, fmt.Errorf("Required arguments must not be nil: %v, %v, %v", clock, podStatusProvider, recorder) + } + return &activeDeadlineHandler{ + clock: clock, + podStatusProvider: podStatusProvider, + recorder: recorder, + }, nil +} + +// ShouldSync returns true if the pod is past its active deadline. +func (m *activeDeadlineHandler) ShouldSync(pod *v1.Pod) bool { + return m.pastActiveDeadline(pod) +} + +// ShouldEvict returns true if the pod is past its active deadline. +// It dispatches an event that the pod should be evicted if it is past its deadline. +func (m *activeDeadlineHandler) ShouldEvict(pod *v1.Pod) lifecycle.ShouldEvictResponse { + if !m.pastActiveDeadline(pod) { + return lifecycle.ShouldEvictResponse{Evict: false} + } + m.recorder.Eventf(pod, v1.EventTypeNormal, reason, message) + return lifecycle.ShouldEvictResponse{Evict: true, Reason: reason, Message: message} +} + +// pastActiveDeadline returns true if the pod has been active for more than its ActiveDeadlineSeconds +func (m *activeDeadlineHandler) pastActiveDeadline(pod *v1.Pod) bool { + // no active deadline was specified + if pod.Spec.ActiveDeadlineSeconds == nil { + return false + } + // get the latest status to determine if it was started + podStatus, ok := m.podStatusProvider.GetPodStatus(pod.UID) + if !ok { + podStatus = pod.Status + } + // we have no start time so just return + if podStatus.StartTime.IsZero() { + return false + } + // determine if the deadline was exceeded + start := podStatus.StartTime.Time + duration := m.clock.Since(start) + allowedDuration := time.Duration(*pod.Spec.ActiveDeadlineSeconds) * time.Second + return duration >= allowedDuration +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/active_deadline_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/active_deadline_test.go new file mode 100644 index 000000000..32fbd6c33 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/active_deadline_test.go @@ -0,0 +1,95 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "testing" + "time" + + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/clock" + "k8s.io/client-go/tools/record" +) + +// mockPodStatusProvider returns the status on the specified pod +type mockPodStatusProvider struct { + pods []*v1.Pod +} + +// GetPodStatus returns the status on the associated pod with matching uid (if found) +func (m *mockPodStatusProvider) GetPodStatus(uid types.UID) (v1.PodStatus, bool) { + for _, pod := range m.pods { + if pod.UID == uid { + return pod.Status, true + } + } + return v1.PodStatus{}, false +} + +// TestActiveDeadlineHandler verifies the active deadline handler functions as expected. +func TestActiveDeadlineHandler(t *testing.T) { + pods := newTestPods(4) + fakeClock := clock.NewFakeClock(time.Now()) + podStatusProvider := &mockPodStatusProvider{pods: pods} + fakeRecorder := &record.FakeRecorder{} + handler, err := newActiveDeadlineHandler(podStatusProvider, fakeRecorder, fakeClock) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + now := metav1.Now() + startTime := metav1.NewTime(now.Time.Add(-1 * time.Minute)) + + // this pod has exceeded its active deadline + exceededActiveDeadlineSeconds := int64(30) + pods[0].Status.StartTime = &startTime + pods[0].Spec.ActiveDeadlineSeconds = &exceededActiveDeadlineSeconds + + // this pod has not exceeded its active deadline + notYetActiveDeadlineSeconds := int64(120) + pods[1].Status.StartTime = &startTime + pods[1].Spec.ActiveDeadlineSeconds = ¬YetActiveDeadlineSeconds + + // this pod has no deadline + pods[2].Status.StartTime = &startTime + pods[2].Spec.ActiveDeadlineSeconds = nil + + testCases := []struct { + pod *v1.Pod + expected bool + }{{pods[0], true}, {pods[1], false}, {pods[2], false}, {pods[3], false}} + + for i, testCase := range testCases { + if actual := handler.ShouldSync(testCase.pod); actual != testCase.expected { + t.Errorf("[%d] ShouldSync expected %#v, got %#v", i, testCase.expected, actual) + } + actual := handler.ShouldEvict(testCase.pod) + if actual.Evict != testCase.expected { + t.Errorf("[%d] ShouldEvict.Evict expected %#v, got %#v", i, testCase.expected, actual.Evict) + } + if testCase.expected { + if actual.Reason != reason { + t.Errorf("[%d] ShouldEvict.Reason expected %#v, got %#v", i, message, actual.Reason) + } + if actual.Message != message { + t.Errorf("[%d] ShouldEvict.Message expected %#v, got %#v", i, message, actual.Message) + } + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/BUILD new file mode 100644 index 000000000..0a869ef11 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/BUILD @@ -0,0 +1,29 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", +) + +go_library( + name = "go_default_library", + srcs = ["services.go"], + deps = ["//pkg/kubelet/apis/cri/v1alpha1/runtime:go_default_library"], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [ + ":package-srcs", + "//pkg/kubelet/apis/cri/testing:all-srcs", + "//pkg/kubelet/apis/cri/v1alpha1/runtime:all-srcs", + ], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/services.go b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/services.go new file mode 100644 index 000000000..9c8ba0899 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/services.go @@ -0,0 +1,115 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cri + +import ( + "time" + + runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime" +) + +// RuntimeVersioner contains methods for runtime name, version and API version. +type RuntimeVersioner interface { + // Version returns the runtime name, runtime version and runtime API version + Version(apiVersion string) (*runtimeapi.VersionResponse, error) +} + +// ContainerManager contains methods to manipulate containers managed by a +// container runtime. The methods are thread-safe. +type ContainerManager interface { + // CreateContainer creates a new container in specified PodSandbox. + CreateContainer(podSandboxID string, config *runtimeapi.ContainerConfig, sandboxConfig *runtimeapi.PodSandboxConfig) (string, error) + // StartContainer starts the container. + StartContainer(containerID string) error + // StopContainer stops a running container with a grace period (i.e., timeout). + StopContainer(containerID string, timeout int64) error + // RemoveContainer removes the container. + RemoveContainer(containerID string) error + // ListContainers lists all containers by filters. + ListContainers(filter *runtimeapi.ContainerFilter) ([]*runtimeapi.Container, error) + // ContainerStatus returns the status of the container. + ContainerStatus(containerID string) (*runtimeapi.ContainerStatus, error) + // UpdateContainerResources updates the cgroup resources for the container. + UpdateContainerResources(containerID string, resources *runtimeapi.LinuxContainerResources) error + // ExecSync executes a command in the container, and returns the stdout output. + // If command exits with a non-zero exit code, an error is returned. + ExecSync(containerID string, cmd []string, timeout time.Duration) (stdout []byte, stderr []byte, err error) + // Exec prepares a streaming endpoint to execute a command in the container, and returns the address. + Exec(*runtimeapi.ExecRequest) (*runtimeapi.ExecResponse, error) + // Attach prepares a streaming endpoint to attach to a running container, and returns the address. + Attach(req *runtimeapi.AttachRequest) (*runtimeapi.AttachResponse, error) +} + +// PodSandboxManager contains methods for operating on PodSandboxes. The methods +// are thread-safe. +type PodSandboxManager interface { + // RunPodSandbox creates and starts a pod-level sandbox. Runtimes should ensure + // the sandbox is in ready state. + RunPodSandbox(config *runtimeapi.PodSandboxConfig) (string, error) + // StopPodSandbox stops the sandbox. If there are any running containers in the + // sandbox, they should be force terminated. + StopPodSandbox(podSandboxID string) error + // RemovePodSandbox removes the sandbox. If there are running containers in the + // sandbox, they should be forcibly removed. + RemovePodSandbox(podSandboxID string) error + // PodSandboxStatus returns the Status of the PodSandbox. + PodSandboxStatus(podSandboxID string) (*runtimeapi.PodSandboxStatus, error) + // ListPodSandbox returns a list of Sandbox. + ListPodSandbox(filter *runtimeapi.PodSandboxFilter) ([]*runtimeapi.PodSandbox, error) + // PortForward prepares a streaming endpoint to forward ports from a PodSandbox, and returns the address. + PortForward(*runtimeapi.PortForwardRequest) (*runtimeapi.PortForwardResponse, error) +} + +// ContainerStatsManager contains methods for retriving the container +// statistics. +type ContainerStatsManager interface { + // ContainerStats returns stats of the container. If the container does not + // exist, the call returns an error. + ContainerStats(containerID string) (*runtimeapi.ContainerStats, error) + // ListContainerStats returns stats of all running containers. + ListContainerStats(filter *runtimeapi.ContainerStatsFilter) ([]*runtimeapi.ContainerStats, error) +} + +// RuntimeService interface should be implemented by a container runtime. +// The methods should be thread-safe. +type RuntimeService interface { + RuntimeVersioner + ContainerManager + PodSandboxManager + ContainerStatsManager + + // UpdateRuntimeConfig updates runtime configuration if specified + UpdateRuntimeConfig(runtimeConfig *runtimeapi.RuntimeConfig) error + // Status returns the status of the runtime. + Status() (*runtimeapi.RuntimeStatus, error) +} + +// ImageManagerService interface should be implemented by a container image +// manager. +// The methods should be thread-safe. +type ImageManagerService interface { + // ListImages lists the existing images. + ListImages(filter *runtimeapi.ImageFilter) ([]*runtimeapi.Image, error) + // ImageStatus returns the status of the image. + ImageStatus(image *runtimeapi.ImageSpec) (*runtimeapi.Image, error) + // PullImage pulls an image with the authentication config. + PullImage(image *runtimeapi.ImageSpec, auth *runtimeapi.AuthConfig) (string, error) + // RemoveImage removes the image. + RemoveImage(image *runtimeapi.ImageSpec) error + // ImageFsInfo returns information of the filesystem that is used to store images. + ImageFsInfo() ([]*runtimeapi.FilesystemUsage, error) +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime/BUILD new file mode 100644 index 000000000..c39b090d1 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime/BUILD @@ -0,0 +1,40 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", +) + +go_library( + name = "go_default_library", + srcs = [ + "api.pb.go", + "constants.go", + ], + deps = [ + "//vendor/github.com/gogo/protobuf/gogoproto:go_default_library", + "//vendor/github.com/gogo/protobuf/proto:go_default_library", + "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", + "//vendor/golang.org/x/net/context:go_default_library", + "//vendor/google.golang.org/grpc:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], +) + +filegroup( + name = "go_default_library_protos", + srcs = ["api.proto"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime/api.pb.go b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime/api.pb.go new file mode 100644 index 000000000..4571e1f42 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime/api.pb.go @@ -0,0 +1,24840 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by protoc-gen-gogo. +// source: api.proto +// DO NOT EDIT! + +/* + Package runtime is a generated protocol buffer package. + + It is generated from these files: + api.proto + + It has these top-level messages: + VersionRequest + VersionResponse + DNSConfig + PortMapping + Mount + NamespaceOption + Int64Value + LinuxSandboxSecurityContext + LinuxPodSandboxConfig + PodSandboxMetadata + PodSandboxConfig + RunPodSandboxRequest + RunPodSandboxResponse + StopPodSandboxRequest + StopPodSandboxResponse + RemovePodSandboxRequest + RemovePodSandboxResponse + PodSandboxStatusRequest + PodSandboxNetworkStatus + Namespace + LinuxPodSandboxStatus + PodSandboxStatus + PodSandboxStatusResponse + PodSandboxStateValue + PodSandboxFilter + ListPodSandboxRequest + PodSandbox + ListPodSandboxResponse + ImageSpec + KeyValue + LinuxContainerResources + SELinuxOption + Capability + LinuxContainerSecurityContext + LinuxContainerConfig + ContainerMetadata + Device + ContainerConfig + CreateContainerRequest + CreateContainerResponse + StartContainerRequest + StartContainerResponse + StopContainerRequest + StopContainerResponse + RemoveContainerRequest + RemoveContainerResponse + ContainerStateValue + ContainerFilter + ListContainersRequest + Container + ListContainersResponse + ContainerStatusRequest + ContainerStatus + ContainerStatusResponse + UpdateContainerResourcesRequest + UpdateContainerResourcesResponse + ExecSyncRequest + ExecSyncResponse + ExecRequest + ExecResponse + AttachRequest + AttachResponse + PortForwardRequest + PortForwardResponse + ImageFilter + ListImagesRequest + Image + ListImagesResponse + ImageStatusRequest + ImageStatusResponse + AuthConfig + PullImageRequest + PullImageResponse + RemoveImageRequest + RemoveImageResponse + NetworkConfig + RuntimeConfig + UpdateRuntimeConfigRequest + UpdateRuntimeConfigResponse + RuntimeCondition + RuntimeStatus + StatusRequest + StatusResponse + ImageFsInfoRequest + UInt64Value + StorageIdentifier + FilesystemUsage + ImageFsInfoResponse + ContainerStatsRequest + ContainerStatsResponse + ListContainerStatsRequest + ContainerStatsFilter + ListContainerStatsResponse + ContainerAttributes + ContainerStats + CpuUsage + MemoryUsage +*/ +package runtime + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Protocol int32 + +const ( + Protocol_TCP Protocol = 0 + Protocol_UDP Protocol = 1 +) + +var Protocol_name = map[int32]string{ + 0: "TCP", + 1: "UDP", +} +var Protocol_value = map[string]int32{ + "TCP": 0, + "UDP": 1, +} + +func (x Protocol) String() string { + return proto.EnumName(Protocol_name, int32(x)) +} +func (Protocol) EnumDescriptor() ([]byte, []int) { return fileDescriptorApi, []int{0} } + +type MountPropagation int32 + +const ( + // No mount propagation ("private" in Linux terminology). + MountPropagation_PROPAGATION_PRIVATE MountPropagation = 0 + // Mounts get propagated from the host to the container ("rslave" in Linux). + MountPropagation_PROPAGATION_HOST_TO_CONTAINER MountPropagation = 1 + // Mounts get propagated from the host to the container and from the + // container to the host ("rshared" in Linux). + MountPropagation_PROPAGATION_BIDIRECTIONAL MountPropagation = 2 +) + +var MountPropagation_name = map[int32]string{ + 0: "PROPAGATION_PRIVATE", + 1: "PROPAGATION_HOST_TO_CONTAINER", + 2: "PROPAGATION_BIDIRECTIONAL", +} +var MountPropagation_value = map[string]int32{ + "PROPAGATION_PRIVATE": 0, + "PROPAGATION_HOST_TO_CONTAINER": 1, + "PROPAGATION_BIDIRECTIONAL": 2, +} + +func (x MountPropagation) String() string { + return proto.EnumName(MountPropagation_name, int32(x)) +} +func (MountPropagation) EnumDescriptor() ([]byte, []int) { return fileDescriptorApi, []int{1} } + +type PodSandboxState int32 + +const ( + PodSandboxState_SANDBOX_READY PodSandboxState = 0 + PodSandboxState_SANDBOX_NOTREADY PodSandboxState = 1 +) + +var PodSandboxState_name = map[int32]string{ + 0: "SANDBOX_READY", + 1: "SANDBOX_NOTREADY", +} +var PodSandboxState_value = map[string]int32{ + "SANDBOX_READY": 0, + "SANDBOX_NOTREADY": 1, +} + +func (x PodSandboxState) String() string { + return proto.EnumName(PodSandboxState_name, int32(x)) +} +func (PodSandboxState) EnumDescriptor() ([]byte, []int) { return fileDescriptorApi, []int{2} } + +type ContainerState int32 + +const ( + ContainerState_CONTAINER_CREATED ContainerState = 0 + ContainerState_CONTAINER_RUNNING ContainerState = 1 + ContainerState_CONTAINER_EXITED ContainerState = 2 + ContainerState_CONTAINER_UNKNOWN ContainerState = 3 +) + +var ContainerState_name = map[int32]string{ + 0: "CONTAINER_CREATED", + 1: "CONTAINER_RUNNING", + 2: "CONTAINER_EXITED", + 3: "CONTAINER_UNKNOWN", +} +var ContainerState_value = map[string]int32{ + "CONTAINER_CREATED": 0, + "CONTAINER_RUNNING": 1, + "CONTAINER_EXITED": 2, + "CONTAINER_UNKNOWN": 3, +} + +func (x ContainerState) String() string { + return proto.EnumName(ContainerState_name, int32(x)) +} +func (ContainerState) EnumDescriptor() ([]byte, []int) { return fileDescriptorApi, []int{3} } + +type VersionRequest struct { + // Version of the kubelet runtime API. + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` +} + +func (m *VersionRequest) Reset() { *m = VersionRequest{} } +func (*VersionRequest) ProtoMessage() {} +func (*VersionRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{0} } + +func (m *VersionRequest) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +type VersionResponse struct { + // Version of the kubelet runtime API. + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // Name of the container runtime. + RuntimeName string `protobuf:"bytes,2,opt,name=runtime_name,json=runtimeName,proto3" json:"runtime_name,omitempty"` + // Version of the container runtime. The string must be + // semver-compatible. + RuntimeVersion string `protobuf:"bytes,3,opt,name=runtime_version,json=runtimeVersion,proto3" json:"runtime_version,omitempty"` + // API version of the container runtime. The string must be + // semver-compatible. + RuntimeApiVersion string `protobuf:"bytes,4,opt,name=runtime_api_version,json=runtimeApiVersion,proto3" json:"runtime_api_version,omitempty"` +} + +func (m *VersionResponse) Reset() { *m = VersionResponse{} } +func (*VersionResponse) ProtoMessage() {} +func (*VersionResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{1} } + +func (m *VersionResponse) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (m *VersionResponse) GetRuntimeName() string { + if m != nil { + return m.RuntimeName + } + return "" +} + +func (m *VersionResponse) GetRuntimeVersion() string { + if m != nil { + return m.RuntimeVersion + } + return "" +} + +func (m *VersionResponse) GetRuntimeApiVersion() string { + if m != nil { + return m.RuntimeApiVersion + } + return "" +} + +// DNSConfig specifies the DNS servers and search domains of a sandbox. +type DNSConfig struct { + // List of DNS servers of the cluster. + Servers []string `protobuf:"bytes,1,rep,name=servers" json:"servers,omitempty"` + // List of DNS search domains of the cluster. + Searches []string `protobuf:"bytes,2,rep,name=searches" json:"searches,omitempty"` + // List of DNS options. See https://linux.die.net/man/5/resolv.conf + // for all available options. + Options []string `protobuf:"bytes,3,rep,name=options" json:"options,omitempty"` +} + +func (m *DNSConfig) Reset() { *m = DNSConfig{} } +func (*DNSConfig) ProtoMessage() {} +func (*DNSConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{2} } + +func (m *DNSConfig) GetServers() []string { + if m != nil { + return m.Servers + } + return nil +} + +func (m *DNSConfig) GetSearches() []string { + if m != nil { + return m.Searches + } + return nil +} + +func (m *DNSConfig) GetOptions() []string { + if m != nil { + return m.Options + } + return nil +} + +// PortMapping specifies the port mapping configurations of a sandbox. +type PortMapping struct { + // Protocol of the port mapping. + Protocol Protocol `protobuf:"varint,1,opt,name=protocol,proto3,enum=runtime.Protocol" json:"protocol,omitempty"` + // Port number within the container. Default: 0 (not specified). + ContainerPort int32 `protobuf:"varint,2,opt,name=container_port,json=containerPort,proto3" json:"container_port,omitempty"` + // Port number on the host. Default: 0 (not specified). + HostPort int32 `protobuf:"varint,3,opt,name=host_port,json=hostPort,proto3" json:"host_port,omitempty"` + // Host IP. + HostIp string `protobuf:"bytes,4,opt,name=host_ip,json=hostIp,proto3" json:"host_ip,omitempty"` +} + +func (m *PortMapping) Reset() { *m = PortMapping{} } +func (*PortMapping) ProtoMessage() {} +func (*PortMapping) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{3} } + +func (m *PortMapping) GetProtocol() Protocol { + if m != nil { + return m.Protocol + } + return Protocol_TCP +} + +func (m *PortMapping) GetContainerPort() int32 { + if m != nil { + return m.ContainerPort + } + return 0 +} + +func (m *PortMapping) GetHostPort() int32 { + if m != nil { + return m.HostPort + } + return 0 +} + +func (m *PortMapping) GetHostIp() string { + if m != nil { + return m.HostIp + } + return "" +} + +// Mount specifies a host volume to mount into a container. +type Mount struct { + // Path of the mount within the container. + ContainerPath string `protobuf:"bytes,1,opt,name=container_path,json=containerPath,proto3" json:"container_path,omitempty"` + // Path of the mount on the host. + HostPath string `protobuf:"bytes,2,opt,name=host_path,json=hostPath,proto3" json:"host_path,omitempty"` + // If set, the mount is read-only. + Readonly bool `protobuf:"varint,3,opt,name=readonly,proto3" json:"readonly,omitempty"` + // If set, the mount needs SELinux relabeling. + SelinuxRelabel bool `protobuf:"varint,4,opt,name=selinux_relabel,json=selinuxRelabel,proto3" json:"selinux_relabel,omitempty"` + // Requested propagation mode. + Propagation MountPropagation `protobuf:"varint,5,opt,name=propagation,proto3,enum=runtime.MountPropagation" json:"propagation,omitempty"` +} + +func (m *Mount) Reset() { *m = Mount{} } +func (*Mount) ProtoMessage() {} +func (*Mount) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{4} } + +func (m *Mount) GetContainerPath() string { + if m != nil { + return m.ContainerPath + } + return "" +} + +func (m *Mount) GetHostPath() string { + if m != nil { + return m.HostPath + } + return "" +} + +func (m *Mount) GetReadonly() bool { + if m != nil { + return m.Readonly + } + return false +} + +func (m *Mount) GetSelinuxRelabel() bool { + if m != nil { + return m.SelinuxRelabel + } + return false +} + +func (m *Mount) GetPropagation() MountPropagation { + if m != nil { + return m.Propagation + } + return MountPropagation_PROPAGATION_PRIVATE +} + +// NamespaceOption provides options for Linux namespaces. +type NamespaceOption struct { + // If set, use the host's network namespace. + HostNetwork bool `protobuf:"varint,1,opt,name=host_network,json=hostNetwork,proto3" json:"host_network,omitempty"` + // If set, use the host's PID namespace. + HostPid bool `protobuf:"varint,2,opt,name=host_pid,json=hostPid,proto3" json:"host_pid,omitempty"` + // If set, use the host's IPC namespace. + HostIpc bool `protobuf:"varint,3,opt,name=host_ipc,json=hostIpc,proto3" json:"host_ipc,omitempty"` +} + +func (m *NamespaceOption) Reset() { *m = NamespaceOption{} } +func (*NamespaceOption) ProtoMessage() {} +func (*NamespaceOption) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{5} } + +func (m *NamespaceOption) GetHostNetwork() bool { + if m != nil { + return m.HostNetwork + } + return false +} + +func (m *NamespaceOption) GetHostPid() bool { + if m != nil { + return m.HostPid + } + return false +} + +func (m *NamespaceOption) GetHostIpc() bool { + if m != nil { + return m.HostIpc + } + return false +} + +// Int64Value is the wrapper of int64. +type Int64Value struct { + // The value. + Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *Int64Value) Reset() { *m = Int64Value{} } +func (*Int64Value) ProtoMessage() {} +func (*Int64Value) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{6} } + +func (m *Int64Value) GetValue() int64 { + if m != nil { + return m.Value + } + return 0 +} + +// LinuxSandboxSecurityContext holds linux security configuration that will be +// applied to a sandbox. Note that: +// 1) It does not apply to containers in the pods. +// 2) It may not be applicable to a PodSandbox which does not contain any running +// process. +type LinuxSandboxSecurityContext struct { + // Configurations for the sandbox's namespaces. + // This will be used only if the PodSandbox uses namespace for isolation. + NamespaceOptions *NamespaceOption `protobuf:"bytes,1,opt,name=namespace_options,json=namespaceOptions" json:"namespace_options,omitempty"` + // Optional SELinux context to be applied. + SelinuxOptions *SELinuxOption `protobuf:"bytes,2,opt,name=selinux_options,json=selinuxOptions" json:"selinux_options,omitempty"` + // UID to run sandbox processes as, when applicable. + RunAsUser *Int64Value `protobuf:"bytes,3,opt,name=run_as_user,json=runAsUser" json:"run_as_user,omitempty"` + // If set, the root filesystem of the sandbox is read-only. + ReadonlyRootfs bool `protobuf:"varint,4,opt,name=readonly_rootfs,json=readonlyRootfs,proto3" json:"readonly_rootfs,omitempty"` + // List of groups applied to the first process run in the sandbox, in + // addition to the sandbox's primary GID. + SupplementalGroups []int64 `protobuf:"varint,5,rep,packed,name=supplemental_groups,json=supplementalGroups" json:"supplemental_groups,omitempty"` + // Indicates whether the sandbox will be asked to run a privileged + // container. If a privileged container is to be executed within it, this + // MUST be true. + // This allows a sandbox to take additional security precautions if no + // privileged containers are expected to be run. + Privileged bool `protobuf:"varint,6,opt,name=privileged,proto3" json:"privileged,omitempty"` + // Seccomp profile for the sandbox, candidate values are: + // * docker/default: the default profile for the docker container runtime + // * unconfined: unconfined profile, ie, no seccomp sandboxing + // * localhost/<full-path-to-profile>: the profile installed on the node. + // <full-path-to-profile> is the full path of the profile. + // Default: "", which is identical with unconfined. + SeccompProfilePath string `protobuf:"bytes,7,opt,name=seccomp_profile_path,json=seccompProfilePath,proto3" json:"seccomp_profile_path,omitempty"` +} + +func (m *LinuxSandboxSecurityContext) Reset() { *m = LinuxSandboxSecurityContext{} } +func (*LinuxSandboxSecurityContext) ProtoMessage() {} +func (*LinuxSandboxSecurityContext) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{7} } + +func (m *LinuxSandboxSecurityContext) GetNamespaceOptions() *NamespaceOption { + if m != nil { + return m.NamespaceOptions + } + return nil +} + +func (m *LinuxSandboxSecurityContext) GetSelinuxOptions() *SELinuxOption { + if m != nil { + return m.SelinuxOptions + } + return nil +} + +func (m *LinuxSandboxSecurityContext) GetRunAsUser() *Int64Value { + if m != nil { + return m.RunAsUser + } + return nil +} + +func (m *LinuxSandboxSecurityContext) GetReadonlyRootfs() bool { + if m != nil { + return m.ReadonlyRootfs + } + return false +} + +func (m *LinuxSandboxSecurityContext) GetSupplementalGroups() []int64 { + if m != nil { + return m.SupplementalGroups + } + return nil +} + +func (m *LinuxSandboxSecurityContext) GetPrivileged() bool { + if m != nil { + return m.Privileged + } + return false +} + +func (m *LinuxSandboxSecurityContext) GetSeccompProfilePath() string { + if m != nil { + return m.SeccompProfilePath + } + return "" +} + +// LinuxPodSandboxConfig holds platform-specific configurations for Linux +// host platforms and Linux-based containers. +type LinuxPodSandboxConfig struct { + // Parent cgroup of the PodSandbox. + // The cgroupfs style syntax will be used, but the container runtime can + // convert it to systemd semantics if needed. + CgroupParent string `protobuf:"bytes,1,opt,name=cgroup_parent,json=cgroupParent,proto3" json:"cgroup_parent,omitempty"` + // LinuxSandboxSecurityContext holds sandbox security attributes. + SecurityContext *LinuxSandboxSecurityContext `protobuf:"bytes,2,opt,name=security_context,json=securityContext" json:"security_context,omitempty"` + // Sysctls holds linux sysctls config for the sandbox. + Sysctls map[string]string `protobuf:"bytes,3,rep,name=sysctls" json:"sysctls,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *LinuxPodSandboxConfig) Reset() { *m = LinuxPodSandboxConfig{} } +func (*LinuxPodSandboxConfig) ProtoMessage() {} +func (*LinuxPodSandboxConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{8} } + +func (m *LinuxPodSandboxConfig) GetCgroupParent() string { + if m != nil { + return m.CgroupParent + } + return "" +} + +func (m *LinuxPodSandboxConfig) GetSecurityContext() *LinuxSandboxSecurityContext { + if m != nil { + return m.SecurityContext + } + return nil +} + +func (m *LinuxPodSandboxConfig) GetSysctls() map[string]string { + if m != nil { + return m.Sysctls + } + return nil +} + +// PodSandboxMetadata holds all necessary information for building the sandbox name. +// The container runtime is encouraged to expose the metadata associated with the +// PodSandbox in its user interface for better user experience. For example, +// the runtime can construct a unique PodSandboxName based on the metadata. +type PodSandboxMetadata struct { + // Pod name of the sandbox. Same as the pod name in the PodSpec. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Pod UID of the sandbox. Same as the pod UID in the PodSpec. + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` + // Pod namespace of the sandbox. Same as the pod namespace in the PodSpec. + Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` + // Attempt number of creating the sandbox. Default: 0. + Attempt uint32 `protobuf:"varint,4,opt,name=attempt,proto3" json:"attempt,omitempty"` +} + +func (m *PodSandboxMetadata) Reset() { *m = PodSandboxMetadata{} } +func (*PodSandboxMetadata) ProtoMessage() {} +func (*PodSandboxMetadata) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{9} } + +func (m *PodSandboxMetadata) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *PodSandboxMetadata) GetUid() string { + if m != nil { + return m.Uid + } + return "" +} + +func (m *PodSandboxMetadata) GetNamespace() string { + if m != nil { + return m.Namespace + } + return "" +} + +func (m *PodSandboxMetadata) GetAttempt() uint32 { + if m != nil { + return m.Attempt + } + return 0 +} + +// PodSandboxConfig holds all the required and optional fields for creating a +// sandbox. +type PodSandboxConfig struct { + // Metadata of the sandbox. This information will uniquely identify the + // sandbox, and the runtime should leverage this to ensure correct + // operation. The runtime may also use this information to improve UX, such + // as by constructing a readable name. + Metadata *PodSandboxMetadata `protobuf:"bytes,1,opt,name=metadata" json:"metadata,omitempty"` + // Hostname of the sandbox. + Hostname string `protobuf:"bytes,2,opt,name=hostname,proto3" json:"hostname,omitempty"` + // Path to the directory on the host in which container log files are + // stored. + // By default the log of a container going into the LogDirectory will be + // hooked up to STDOUT and STDERR. However, the LogDirectory may contain + // binary log files with structured logging data from the individual + // containers. For example, the files might be newline separated JSON + // structured logs, systemd-journald journal files, gRPC trace files, etc. + // E.g., + // PodSandboxConfig.LogDirectory = `/var/log/pods/<podUID>/` + // ContainerConfig.LogPath = `containerName_Instance#.log` + // + // WARNING: Log management and how kubelet should interface with the + // container logs are under active discussion in + // https://issues.k8s.io/24677. There *may* be future change of direction + // for logging as the discussion carries on. + LogDirectory string `protobuf:"bytes,3,opt,name=log_directory,json=logDirectory,proto3" json:"log_directory,omitempty"` + // DNS config for the sandbox. + DnsConfig *DNSConfig `protobuf:"bytes,4,opt,name=dns_config,json=dnsConfig" json:"dns_config,omitempty"` + // Port mappings for the sandbox. + PortMappings []*PortMapping `protobuf:"bytes,5,rep,name=port_mappings,json=portMappings" json:"port_mappings,omitempty"` + // Key-value pairs that may be used to scope and select individual resources. + Labels map[string]string `protobuf:"bytes,6,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Unstructured key-value map that may be set by the kubelet to store and + // retrieve arbitrary metadata. This will include any annotations set on a + // pod through the Kubernetes API. + // + // Annotations MUST NOT be altered by the runtime; the annotations stored + // here MUST be returned in the PodSandboxStatus associated with the pod + // this PodSandboxConfig creates. + // + // In general, in order to preserve a well-defined interface between the + // kubelet and the container runtime, annotations SHOULD NOT influence + // runtime behaviour. + // + // Annotations can also be useful for runtime authors to experiment with + // new features that are opaque to the Kubernetes APIs (both user-facing + // and the CRI). Whenever possible, however, runtime authors SHOULD + // consider proposing new typed fields for any new features instead. + Annotations map[string]string `protobuf:"bytes,7,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Optional configurations specific to Linux hosts. + Linux *LinuxPodSandboxConfig `protobuf:"bytes,8,opt,name=linux" json:"linux,omitempty"` +} + +func (m *PodSandboxConfig) Reset() { *m = PodSandboxConfig{} } +func (*PodSandboxConfig) ProtoMessage() {} +func (*PodSandboxConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{10} } + +func (m *PodSandboxConfig) GetMetadata() *PodSandboxMetadata { + if m != nil { + return m.Metadata + } + return nil +} + +func (m *PodSandboxConfig) GetHostname() string { + if m != nil { + return m.Hostname + } + return "" +} + +func (m *PodSandboxConfig) GetLogDirectory() string { + if m != nil { + return m.LogDirectory + } + return "" +} + +func (m *PodSandboxConfig) GetDnsConfig() *DNSConfig { + if m != nil { + return m.DnsConfig + } + return nil +} + +func (m *PodSandboxConfig) GetPortMappings() []*PortMapping { + if m != nil { + return m.PortMappings + } + return nil +} + +func (m *PodSandboxConfig) GetLabels() map[string]string { + if m != nil { + return m.Labels + } + return nil +} + +func (m *PodSandboxConfig) GetAnnotations() map[string]string { + if m != nil { + return m.Annotations + } + return nil +} + +func (m *PodSandboxConfig) GetLinux() *LinuxPodSandboxConfig { + if m != nil { + return m.Linux + } + return nil +} + +type RunPodSandboxRequest struct { + // Configuration for creating a PodSandbox. + Config *PodSandboxConfig `protobuf:"bytes,1,opt,name=config" json:"config,omitempty"` +} + +func (m *RunPodSandboxRequest) Reset() { *m = RunPodSandboxRequest{} } +func (*RunPodSandboxRequest) ProtoMessage() {} +func (*RunPodSandboxRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{11} } + +func (m *RunPodSandboxRequest) GetConfig() *PodSandboxConfig { + if m != nil { + return m.Config + } + return nil +} + +type RunPodSandboxResponse struct { + // ID of the PodSandbox to run. + PodSandboxId string `protobuf:"bytes,1,opt,name=pod_sandbox_id,json=podSandboxId,proto3" json:"pod_sandbox_id,omitempty"` +} + +func (m *RunPodSandboxResponse) Reset() { *m = RunPodSandboxResponse{} } +func (*RunPodSandboxResponse) ProtoMessage() {} +func (*RunPodSandboxResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{12} } + +func (m *RunPodSandboxResponse) GetPodSandboxId() string { + if m != nil { + return m.PodSandboxId + } + return "" +} + +type StopPodSandboxRequest struct { + // ID of the PodSandbox to stop. + PodSandboxId string `protobuf:"bytes,1,opt,name=pod_sandbox_id,json=podSandboxId,proto3" json:"pod_sandbox_id,omitempty"` +} + +func (m *StopPodSandboxRequest) Reset() { *m = StopPodSandboxRequest{} } +func (*StopPodSandboxRequest) ProtoMessage() {} +func (*StopPodSandboxRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{13} } + +func (m *StopPodSandboxRequest) GetPodSandboxId() string { + if m != nil { + return m.PodSandboxId + } + return "" +} + +type StopPodSandboxResponse struct { +} + +func (m *StopPodSandboxResponse) Reset() { *m = StopPodSandboxResponse{} } +func (*StopPodSandboxResponse) ProtoMessage() {} +func (*StopPodSandboxResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{14} } + +type RemovePodSandboxRequest struct { + // ID of the PodSandbox to remove. + PodSandboxId string `protobuf:"bytes,1,opt,name=pod_sandbox_id,json=podSandboxId,proto3" json:"pod_sandbox_id,omitempty"` +} + +func (m *RemovePodSandboxRequest) Reset() { *m = RemovePodSandboxRequest{} } +func (*RemovePodSandboxRequest) ProtoMessage() {} +func (*RemovePodSandboxRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{15} } + +func (m *RemovePodSandboxRequest) GetPodSandboxId() string { + if m != nil { + return m.PodSandboxId + } + return "" +} + +type RemovePodSandboxResponse struct { +} + +func (m *RemovePodSandboxResponse) Reset() { *m = RemovePodSandboxResponse{} } +func (*RemovePodSandboxResponse) ProtoMessage() {} +func (*RemovePodSandboxResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{16} } + +type PodSandboxStatusRequest struct { + // ID of the PodSandbox for which to retrieve status. + PodSandboxId string `protobuf:"bytes,1,opt,name=pod_sandbox_id,json=podSandboxId,proto3" json:"pod_sandbox_id,omitempty"` +} + +func (m *PodSandboxStatusRequest) Reset() { *m = PodSandboxStatusRequest{} } +func (*PodSandboxStatusRequest) ProtoMessage() {} +func (*PodSandboxStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{17} } + +func (m *PodSandboxStatusRequest) GetPodSandboxId() string { + if m != nil { + return m.PodSandboxId + } + return "" +} + +// PodSandboxNetworkStatus is the status of the network for a PodSandbox. +type PodSandboxNetworkStatus struct { + // IP address of the PodSandbox. + Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` +} + +func (m *PodSandboxNetworkStatus) Reset() { *m = PodSandboxNetworkStatus{} } +func (*PodSandboxNetworkStatus) ProtoMessage() {} +func (*PodSandboxNetworkStatus) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{18} } + +func (m *PodSandboxNetworkStatus) GetIp() string { + if m != nil { + return m.Ip + } + return "" +} + +// Namespace contains paths to the namespaces. +type Namespace struct { + // Namespace options for Linux namespaces. + Options *NamespaceOption `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"` +} + +func (m *Namespace) Reset() { *m = Namespace{} } +func (*Namespace) ProtoMessage() {} +func (*Namespace) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{19} } + +func (m *Namespace) GetOptions() *NamespaceOption { + if m != nil { + return m.Options + } + return nil +} + +// LinuxSandboxStatus contains status specific to Linux sandboxes. +type LinuxPodSandboxStatus struct { + // Paths to the sandbox's namespaces. + Namespaces *Namespace `protobuf:"bytes,1,opt,name=namespaces" json:"namespaces,omitempty"` +} + +func (m *LinuxPodSandboxStatus) Reset() { *m = LinuxPodSandboxStatus{} } +func (*LinuxPodSandboxStatus) ProtoMessage() {} +func (*LinuxPodSandboxStatus) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{20} } + +func (m *LinuxPodSandboxStatus) GetNamespaces() *Namespace { + if m != nil { + return m.Namespaces + } + return nil +} + +// PodSandboxStatus contains the status of the PodSandbox. +type PodSandboxStatus struct { + // ID of the sandbox. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Metadata of the sandbox. + Metadata *PodSandboxMetadata `protobuf:"bytes,2,opt,name=metadata" json:"metadata,omitempty"` + // State of the sandbox. + State PodSandboxState `protobuf:"varint,3,opt,name=state,proto3,enum=runtime.PodSandboxState" json:"state,omitempty"` + // Creation timestamp of the sandbox in nanoseconds. Must be > 0. + CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + // Network contains network status if network is handled by the runtime. + Network *PodSandboxNetworkStatus `protobuf:"bytes,5,opt,name=network" json:"network,omitempty"` + // Linux-specific status to a pod sandbox. + Linux *LinuxPodSandboxStatus `protobuf:"bytes,6,opt,name=linux" json:"linux,omitempty"` + // Labels are key-value pairs that may be used to scope and select individual resources. + Labels map[string]string `protobuf:"bytes,7,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Unstructured key-value map holding arbitrary metadata. + // Annotations MUST NOT be altered by the runtime; the value of this field + // MUST be identical to that of the corresponding PodSandboxConfig used to + // instantiate the pod sandbox this status represents. + Annotations map[string]string `protobuf:"bytes,8,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *PodSandboxStatus) Reset() { *m = PodSandboxStatus{} } +func (*PodSandboxStatus) ProtoMessage() {} +func (*PodSandboxStatus) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{21} } + +func (m *PodSandboxStatus) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *PodSandboxStatus) GetMetadata() *PodSandboxMetadata { + if m != nil { + return m.Metadata + } + return nil +} + +func (m *PodSandboxStatus) GetState() PodSandboxState { + if m != nil { + return m.State + } + return PodSandboxState_SANDBOX_READY +} + +func (m *PodSandboxStatus) GetCreatedAt() int64 { + if m != nil { + return m.CreatedAt + } + return 0 +} + +func (m *PodSandboxStatus) GetNetwork() *PodSandboxNetworkStatus { + if m != nil { + return m.Network + } + return nil +} + +func (m *PodSandboxStatus) GetLinux() *LinuxPodSandboxStatus { + if m != nil { + return m.Linux + } + return nil +} + +func (m *PodSandboxStatus) GetLabels() map[string]string { + if m != nil { + return m.Labels + } + return nil +} + +func (m *PodSandboxStatus) GetAnnotations() map[string]string { + if m != nil { + return m.Annotations + } + return nil +} + +type PodSandboxStatusResponse struct { + // Status of the PodSandbox. + Status *PodSandboxStatus `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"` +} + +func (m *PodSandboxStatusResponse) Reset() { *m = PodSandboxStatusResponse{} } +func (*PodSandboxStatusResponse) ProtoMessage() {} +func (*PodSandboxStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{22} } + +func (m *PodSandboxStatusResponse) GetStatus() *PodSandboxStatus { + if m != nil { + return m.Status + } + return nil +} + +// PodSandboxStateValue is the wrapper of PodSandboxState. +type PodSandboxStateValue struct { + // State of the sandbox. + State PodSandboxState `protobuf:"varint,1,opt,name=state,proto3,enum=runtime.PodSandboxState" json:"state,omitempty"` +} + +func (m *PodSandboxStateValue) Reset() { *m = PodSandboxStateValue{} } +func (*PodSandboxStateValue) ProtoMessage() {} +func (*PodSandboxStateValue) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{23} } + +func (m *PodSandboxStateValue) GetState() PodSandboxState { + if m != nil { + return m.State + } + return PodSandboxState_SANDBOX_READY +} + +// PodSandboxFilter is used to filter a list of PodSandboxes. +// All those fields are combined with 'AND' +type PodSandboxFilter struct { + // ID of the sandbox. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // State of the sandbox. + State *PodSandboxStateValue `protobuf:"bytes,2,opt,name=state" json:"state,omitempty"` + // LabelSelector to select matches. + // Only api.MatchLabels is supported for now and the requirements + // are ANDed. MatchExpressions is not supported yet. + LabelSelector map[string]string `protobuf:"bytes,3,rep,name=label_selector,json=labelSelector" json:"label_selector,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *PodSandboxFilter) Reset() { *m = PodSandboxFilter{} } +func (*PodSandboxFilter) ProtoMessage() {} +func (*PodSandboxFilter) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{24} } + +func (m *PodSandboxFilter) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *PodSandboxFilter) GetState() *PodSandboxStateValue { + if m != nil { + return m.State + } + return nil +} + +func (m *PodSandboxFilter) GetLabelSelector() map[string]string { + if m != nil { + return m.LabelSelector + } + return nil +} + +type ListPodSandboxRequest struct { + // PodSandboxFilter to filter a list of PodSandboxes. + Filter *PodSandboxFilter `protobuf:"bytes,1,opt,name=filter" json:"filter,omitempty"` +} + +func (m *ListPodSandboxRequest) Reset() { *m = ListPodSandboxRequest{} } +func (*ListPodSandboxRequest) ProtoMessage() {} +func (*ListPodSandboxRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{25} } + +func (m *ListPodSandboxRequest) GetFilter() *PodSandboxFilter { + if m != nil { + return m.Filter + } + return nil +} + +// PodSandbox contains minimal information about a sandbox. +type PodSandbox struct { + // ID of the PodSandbox. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Metadata of the PodSandbox. + Metadata *PodSandboxMetadata `protobuf:"bytes,2,opt,name=metadata" json:"metadata,omitempty"` + // State of the PodSandbox. + State PodSandboxState `protobuf:"varint,3,opt,name=state,proto3,enum=runtime.PodSandboxState" json:"state,omitempty"` + // Creation timestamps of the PodSandbox in nanoseconds. Must be > 0. + CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + // Labels of the PodSandbox. + Labels map[string]string `protobuf:"bytes,5,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Unstructured key-value map holding arbitrary metadata. + // Annotations MUST NOT be altered by the runtime; the value of this field + // MUST be identical to that of the corresponding PodSandboxConfig used to + // instantiate this PodSandbox. + Annotations map[string]string `protobuf:"bytes,6,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *PodSandbox) Reset() { *m = PodSandbox{} } +func (*PodSandbox) ProtoMessage() {} +func (*PodSandbox) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{26} } + +func (m *PodSandbox) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *PodSandbox) GetMetadata() *PodSandboxMetadata { + if m != nil { + return m.Metadata + } + return nil +} + +func (m *PodSandbox) GetState() PodSandboxState { + if m != nil { + return m.State + } + return PodSandboxState_SANDBOX_READY +} + +func (m *PodSandbox) GetCreatedAt() int64 { + if m != nil { + return m.CreatedAt + } + return 0 +} + +func (m *PodSandbox) GetLabels() map[string]string { + if m != nil { + return m.Labels + } + return nil +} + +func (m *PodSandbox) GetAnnotations() map[string]string { + if m != nil { + return m.Annotations + } + return nil +} + +type ListPodSandboxResponse struct { + // List of PodSandboxes. + Items []*PodSandbox `protobuf:"bytes,1,rep,name=items" json:"items,omitempty"` +} + +func (m *ListPodSandboxResponse) Reset() { *m = ListPodSandboxResponse{} } +func (*ListPodSandboxResponse) ProtoMessage() {} +func (*ListPodSandboxResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{27} } + +func (m *ListPodSandboxResponse) GetItems() []*PodSandbox { + if m != nil { + return m.Items + } + return nil +} + +// ImageSpec is an internal representation of an image. Currently, it wraps the +// value of a Container's Image field (e.g. imageID or imageDigest), but in the +// future it will include more detailed information about the different image types. +type ImageSpec struct { + Image string `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"` +} + +func (m *ImageSpec) Reset() { *m = ImageSpec{} } +func (*ImageSpec) ProtoMessage() {} +func (*ImageSpec) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{28} } + +func (m *ImageSpec) GetImage() string { + if m != nil { + return m.Image + } + return "" +} + +type KeyValue struct { + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *KeyValue) Reset() { *m = KeyValue{} } +func (*KeyValue) ProtoMessage() {} +func (*KeyValue) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{29} } + +func (m *KeyValue) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +func (m *KeyValue) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +// LinuxContainerResources specifies Linux specific configuration for +// resources. +// TODO: Consider using Resources from opencontainers/runtime-spec/specs-go +// directly. +type LinuxContainerResources struct { + // CPU CFS (Completely Fair Scheduler) period. Default: 0 (not specified). + CpuPeriod int64 `protobuf:"varint,1,opt,name=cpu_period,json=cpuPeriod,proto3" json:"cpu_period,omitempty"` + // CPU CFS (Completely Fair Scheduler) quota. Default: 0 (not specified). + CpuQuota int64 `protobuf:"varint,2,opt,name=cpu_quota,json=cpuQuota,proto3" json:"cpu_quota,omitempty"` + // CPU shares (relative weight vs. other containers). Default: 0 (not specified). + CpuShares int64 `protobuf:"varint,3,opt,name=cpu_shares,json=cpuShares,proto3" json:"cpu_shares,omitempty"` + // Memory limit in bytes. Default: 0 (not specified). + MemoryLimitInBytes int64 `protobuf:"varint,4,opt,name=memory_limit_in_bytes,json=memoryLimitInBytes,proto3" json:"memory_limit_in_bytes,omitempty"` + // OOMScoreAdj adjusts the oom-killer score. Default: 0 (not specified). + OomScoreAdj int64 `protobuf:"varint,5,opt,name=oom_score_adj,json=oomScoreAdj,proto3" json:"oom_score_adj,omitempty"` + // CpusetCpus constrains the allowed set of logical CPUs. Default: "" (not specified). + CpusetCpus string `protobuf:"bytes,6,opt,name=cpuset_cpus,json=cpusetCpus,proto3" json:"cpuset_cpus,omitempty"` + // CpusetMems constrains the allowed set of memory nodes. Default: "" (not specified). + CpusetMems string `protobuf:"bytes,7,opt,name=cpuset_mems,json=cpusetMems,proto3" json:"cpuset_mems,omitempty"` +} + +func (m *LinuxContainerResources) Reset() { *m = LinuxContainerResources{} } +func (*LinuxContainerResources) ProtoMessage() {} +func (*LinuxContainerResources) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{30} } + +func (m *LinuxContainerResources) GetCpuPeriod() int64 { + if m != nil { + return m.CpuPeriod + } + return 0 +} + +func (m *LinuxContainerResources) GetCpuQuota() int64 { + if m != nil { + return m.CpuQuota + } + return 0 +} + +func (m *LinuxContainerResources) GetCpuShares() int64 { + if m != nil { + return m.CpuShares + } + return 0 +} + +func (m *LinuxContainerResources) GetMemoryLimitInBytes() int64 { + if m != nil { + return m.MemoryLimitInBytes + } + return 0 +} + +func (m *LinuxContainerResources) GetOomScoreAdj() int64 { + if m != nil { + return m.OomScoreAdj + } + return 0 +} + +func (m *LinuxContainerResources) GetCpusetCpus() string { + if m != nil { + return m.CpusetCpus + } + return "" +} + +func (m *LinuxContainerResources) GetCpusetMems() string { + if m != nil { + return m.CpusetMems + } + return "" +} + +// SELinuxOption are the labels to be applied to the container. +type SELinuxOption struct { + User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` + Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` + Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` + Level string `protobuf:"bytes,4,opt,name=level,proto3" json:"level,omitempty"` +} + +func (m *SELinuxOption) Reset() { *m = SELinuxOption{} } +func (*SELinuxOption) ProtoMessage() {} +func (*SELinuxOption) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{31} } + +func (m *SELinuxOption) GetUser() string { + if m != nil { + return m.User + } + return "" +} + +func (m *SELinuxOption) GetRole() string { + if m != nil { + return m.Role + } + return "" +} + +func (m *SELinuxOption) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *SELinuxOption) GetLevel() string { + if m != nil { + return m.Level + } + return "" +} + +// Capability contains the container capabilities to add or drop +type Capability struct { + // List of capabilities to add. + AddCapabilities []string `protobuf:"bytes,1,rep,name=add_capabilities,json=addCapabilities" json:"add_capabilities,omitempty"` + // List of capabilities to drop. + DropCapabilities []string `protobuf:"bytes,2,rep,name=drop_capabilities,json=dropCapabilities" json:"drop_capabilities,omitempty"` +} + +func (m *Capability) Reset() { *m = Capability{} } +func (*Capability) ProtoMessage() {} +func (*Capability) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{32} } + +func (m *Capability) GetAddCapabilities() []string { + if m != nil { + return m.AddCapabilities + } + return nil +} + +func (m *Capability) GetDropCapabilities() []string { + if m != nil { + return m.DropCapabilities + } + return nil +} + +// LinuxContainerSecurityContext holds linux security configuration that will be applied to a container. +type LinuxContainerSecurityContext struct { + // Capabilities to add or drop. + Capabilities *Capability `protobuf:"bytes,1,opt,name=capabilities" json:"capabilities,omitempty"` + // If set, run container in privileged mode. + // Privileged mode is incompatible with the following options. If + // privileged is set, the following features MAY have no effect: + // 1. capabilities + // 2. selinux_options + // 4. seccomp + // 5. apparmor + // + // Privileged mode implies the following specific options are applied: + // 1. All capabilities are added. + // 2. Sensitive paths, such as kernel module paths within sysfs, are not masked. + // 3. Any sysfs and procfs mounts are mounted RW. + // 4. Apparmor confinement is not applied. + // 5. Seccomp restrictions are not applied. + // 6. The device cgroup does not restrict access to any devices. + // 7. All devices from the host's /dev are available within the container. + // 8. SELinux restrictions are not applied (e.g. label=disabled). + Privileged bool `protobuf:"varint,2,opt,name=privileged,proto3" json:"privileged,omitempty"` + // Configurations for the container's namespaces. + // Only used if the container uses namespace for isolation. + NamespaceOptions *NamespaceOption `protobuf:"bytes,3,opt,name=namespace_options,json=namespaceOptions" json:"namespace_options,omitempty"` + // SELinux context to be optionally applied. + SelinuxOptions *SELinuxOption `protobuf:"bytes,4,opt,name=selinux_options,json=selinuxOptions" json:"selinux_options,omitempty"` + // UID to run the container process as. Only one of run_as_user and + // run_as_username can be specified at a time. + RunAsUser *Int64Value `protobuf:"bytes,5,opt,name=run_as_user,json=runAsUser" json:"run_as_user,omitempty"` + // User name to run the container process as. If specified, the user MUST + // exist in the container image (i.e. in the /etc/passwd inside the image), + // and be resolved there by the runtime; otherwise, the runtime MUST error. + RunAsUsername string `protobuf:"bytes,6,opt,name=run_as_username,json=runAsUsername,proto3" json:"run_as_username,omitempty"` + // If set, the root filesystem of the container is read-only. + ReadonlyRootfs bool `protobuf:"varint,7,opt,name=readonly_rootfs,json=readonlyRootfs,proto3" json:"readonly_rootfs,omitempty"` + // List of groups applied to the first process run in the container, in + // addition to the container's primary GID. + SupplementalGroups []int64 `protobuf:"varint,8,rep,packed,name=supplemental_groups,json=supplementalGroups" json:"supplemental_groups,omitempty"` + // AppArmor profile for the container, candidate values are: + // * runtime/default: equivalent to not specifying a profile. + // * localhost/<profile_name>: profile loaded on the node + // (localhost) by name. The possible profile names are detailed at + // http://wiki.apparmor.net/index.php/AppArmor_Core_Policy_Reference + ApparmorProfile string `protobuf:"bytes,9,opt,name=apparmor_profile,json=apparmorProfile,proto3" json:"apparmor_profile,omitempty"` + // Seccomp profile for the container, candidate values are: + // * docker/default: the default profile for the docker container runtime + // * unconfined: unconfined profile, ie, no seccomp sandboxing + // * localhost/<full-path-to-profile>: the profile installed on the node. + // <full-path-to-profile> is the full path of the profile. + // Default: "", which is identical with unconfined. + SeccompProfilePath string `protobuf:"bytes,10,opt,name=seccomp_profile_path,json=seccompProfilePath,proto3" json:"seccomp_profile_path,omitempty"` + // no_new_privs defines if the flag for no_new_privs should be set on the + // container. + NoNewPrivs bool `protobuf:"varint,11,opt,name=no_new_privs,json=noNewPrivs,proto3" json:"no_new_privs,omitempty"` +} + +func (m *LinuxContainerSecurityContext) Reset() { *m = LinuxContainerSecurityContext{} } +func (*LinuxContainerSecurityContext) ProtoMessage() {} +func (*LinuxContainerSecurityContext) Descriptor() ([]byte, []int) { + return fileDescriptorApi, []int{33} +} + +func (m *LinuxContainerSecurityContext) GetCapabilities() *Capability { + if m != nil { + return m.Capabilities + } + return nil +} + +func (m *LinuxContainerSecurityContext) GetPrivileged() bool { + if m != nil { + return m.Privileged + } + return false +} + +func (m *LinuxContainerSecurityContext) GetNamespaceOptions() *NamespaceOption { + if m != nil { + return m.NamespaceOptions + } + return nil +} + +func (m *LinuxContainerSecurityContext) GetSelinuxOptions() *SELinuxOption { + if m != nil { + return m.SelinuxOptions + } + return nil +} + +func (m *LinuxContainerSecurityContext) GetRunAsUser() *Int64Value { + if m != nil { + return m.RunAsUser + } + return nil +} + +func (m *LinuxContainerSecurityContext) GetRunAsUsername() string { + if m != nil { + return m.RunAsUsername + } + return "" +} + +func (m *LinuxContainerSecurityContext) GetReadonlyRootfs() bool { + if m != nil { + return m.ReadonlyRootfs + } + return false +} + +func (m *LinuxContainerSecurityContext) GetSupplementalGroups() []int64 { + if m != nil { + return m.SupplementalGroups + } + return nil +} + +func (m *LinuxContainerSecurityContext) GetApparmorProfile() string { + if m != nil { + return m.ApparmorProfile + } + return "" +} + +func (m *LinuxContainerSecurityContext) GetSeccompProfilePath() string { + if m != nil { + return m.SeccompProfilePath + } + return "" +} + +func (m *LinuxContainerSecurityContext) GetNoNewPrivs() bool { + if m != nil { + return m.NoNewPrivs + } + return false +} + +// LinuxContainerConfig contains platform-specific configuration for +// Linux-based containers. +type LinuxContainerConfig struct { + // Resources specification for the container. + Resources *LinuxContainerResources `protobuf:"bytes,1,opt,name=resources" json:"resources,omitempty"` + // LinuxContainerSecurityContext configuration for the container. + SecurityContext *LinuxContainerSecurityContext `protobuf:"bytes,2,opt,name=security_context,json=securityContext" json:"security_context,omitempty"` +} + +func (m *LinuxContainerConfig) Reset() { *m = LinuxContainerConfig{} } +func (*LinuxContainerConfig) ProtoMessage() {} +func (*LinuxContainerConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{34} } + +func (m *LinuxContainerConfig) GetResources() *LinuxContainerResources { + if m != nil { + return m.Resources + } + return nil +} + +func (m *LinuxContainerConfig) GetSecurityContext() *LinuxContainerSecurityContext { + if m != nil { + return m.SecurityContext + } + return nil +} + +// ContainerMetadata holds all necessary information for building the container +// name. The container runtime is encouraged to expose the metadata in its user +// interface for better user experience. E.g., runtime can construct a unique +// container name based on the metadata. Note that (name, attempt) is unique +// within a sandbox for the entire lifetime of the sandbox. +type ContainerMetadata struct { + // Name of the container. Same as the container name in the PodSpec. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Attempt number of creating the container. Default: 0. + Attempt uint32 `protobuf:"varint,2,opt,name=attempt,proto3" json:"attempt,omitempty"` +} + +func (m *ContainerMetadata) Reset() { *m = ContainerMetadata{} } +func (*ContainerMetadata) ProtoMessage() {} +func (*ContainerMetadata) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{35} } + +func (m *ContainerMetadata) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *ContainerMetadata) GetAttempt() uint32 { + if m != nil { + return m.Attempt + } + return 0 +} + +// Device specifies a host device to mount into a container. +type Device struct { + // Path of the device within the container. + ContainerPath string `protobuf:"bytes,1,opt,name=container_path,json=containerPath,proto3" json:"container_path,omitempty"` + // Path of the device on the host. + HostPath string `protobuf:"bytes,2,opt,name=host_path,json=hostPath,proto3" json:"host_path,omitempty"` + // Cgroups permissions of the device, candidates are one or more of + // * r - allows container to read from the specified device. + // * w - allows container to write to the specified device. + // * m - allows container to create device files that do not yet exist. + Permissions string `protobuf:"bytes,3,opt,name=permissions,proto3" json:"permissions,omitempty"` +} + +func (m *Device) Reset() { *m = Device{} } +func (*Device) ProtoMessage() {} +func (*Device) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{36} } + +func (m *Device) GetContainerPath() string { + if m != nil { + return m.ContainerPath + } + return "" +} + +func (m *Device) GetHostPath() string { + if m != nil { + return m.HostPath + } + return "" +} + +func (m *Device) GetPermissions() string { + if m != nil { + return m.Permissions + } + return "" +} + +// ContainerConfig holds all the required and optional fields for creating a +// container. +type ContainerConfig struct { + // Metadata of the container. This information will uniquely identify the + // container, and the runtime should leverage this to ensure correct + // operation. The runtime may also use this information to improve UX, such + // as by constructing a readable name. + Metadata *ContainerMetadata `protobuf:"bytes,1,opt,name=metadata" json:"metadata,omitempty"` + // Image to use. + Image *ImageSpec `protobuf:"bytes,2,opt,name=image" json:"image,omitempty"` + // Command to execute (i.e., entrypoint for docker) + Command []string `protobuf:"bytes,3,rep,name=command" json:"command,omitempty"` + // Args for the Command (i.e., command for docker) + Args []string `protobuf:"bytes,4,rep,name=args" json:"args,omitempty"` + // Current working directory of the command. + WorkingDir string `protobuf:"bytes,5,opt,name=working_dir,json=workingDir,proto3" json:"working_dir,omitempty"` + // List of environment variable to set in the container. + Envs []*KeyValue `protobuf:"bytes,6,rep,name=envs" json:"envs,omitempty"` + // Mounts for the container. + Mounts []*Mount `protobuf:"bytes,7,rep,name=mounts" json:"mounts,omitempty"` + // Devices for the container. + Devices []*Device `protobuf:"bytes,8,rep,name=devices" json:"devices,omitempty"` + // Key-value pairs that may be used to scope and select individual resources. + // Label keys are of the form: + // label-key ::= prefixed-name | name + // prefixed-name ::= prefix '/' name + // prefix ::= DNS_SUBDOMAIN + // name ::= DNS_LABEL + Labels map[string]string `protobuf:"bytes,9,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Unstructured key-value map that may be used by the kubelet to store and + // retrieve arbitrary metadata. + // + // Annotations MUST NOT be altered by the runtime; the annotations stored + // here MUST be returned in the ContainerStatus associated with the container + // this ContainerConfig creates. + // + // In general, in order to preserve a well-defined interface between the + // kubelet and the container runtime, annotations SHOULD NOT influence + // runtime behaviour. + Annotations map[string]string `protobuf:"bytes,10,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Path relative to PodSandboxConfig.LogDirectory for container to store + // the log (STDOUT and STDERR) on the host. + // E.g., + // PodSandboxConfig.LogDirectory = `/var/log/pods/<podUID>/` + // ContainerConfig.LogPath = `containerName_Instance#.log` + // + // WARNING: Log management and how kubelet should interface with the + // container logs are under active discussion in + // https://issues.k8s.io/24677. There *may* be future change of direction + // for logging as the discussion carries on. + LogPath string `protobuf:"bytes,11,opt,name=log_path,json=logPath,proto3" json:"log_path,omitempty"` + // Variables for interactive containers, these have very specialized + // use-cases (e.g. debugging). + // TODO: Determine if we need to continue supporting these fields that are + // part of Kubernetes's Container Spec. + Stdin bool `protobuf:"varint,12,opt,name=stdin,proto3" json:"stdin,omitempty"` + StdinOnce bool `protobuf:"varint,13,opt,name=stdin_once,json=stdinOnce,proto3" json:"stdin_once,omitempty"` + Tty bool `protobuf:"varint,14,opt,name=tty,proto3" json:"tty,omitempty"` + // Configuration specific to Linux containers. + Linux *LinuxContainerConfig `protobuf:"bytes,15,opt,name=linux" json:"linux,omitempty"` +} + +func (m *ContainerConfig) Reset() { *m = ContainerConfig{} } +func (*ContainerConfig) ProtoMessage() {} +func (*ContainerConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{37} } + +func (m *ContainerConfig) GetMetadata() *ContainerMetadata { + if m != nil { + return m.Metadata + } + return nil +} + +func (m *ContainerConfig) GetImage() *ImageSpec { + if m != nil { + return m.Image + } + return nil +} + +func (m *ContainerConfig) GetCommand() []string { + if m != nil { + return m.Command + } + return nil +} + +func (m *ContainerConfig) GetArgs() []string { + if m != nil { + return m.Args + } + return nil +} + +func (m *ContainerConfig) GetWorkingDir() string { + if m != nil { + return m.WorkingDir + } + return "" +} + +func (m *ContainerConfig) GetEnvs() []*KeyValue { + if m != nil { + return m.Envs + } + return nil +} + +func (m *ContainerConfig) GetMounts() []*Mount { + if m != nil { + return m.Mounts + } + return nil +} + +func (m *ContainerConfig) GetDevices() []*Device { + if m != nil { + return m.Devices + } + return nil +} + +func (m *ContainerConfig) GetLabels() map[string]string { + if m != nil { + return m.Labels + } + return nil +} + +func (m *ContainerConfig) GetAnnotations() map[string]string { + if m != nil { + return m.Annotations + } + return nil +} + +func (m *ContainerConfig) GetLogPath() string { + if m != nil { + return m.LogPath + } + return "" +} + +func (m *ContainerConfig) GetStdin() bool { + if m != nil { + return m.Stdin + } + return false +} + +func (m *ContainerConfig) GetStdinOnce() bool { + if m != nil { + return m.StdinOnce + } + return false +} + +func (m *ContainerConfig) GetTty() bool { + if m != nil { + return m.Tty + } + return false +} + +func (m *ContainerConfig) GetLinux() *LinuxContainerConfig { + if m != nil { + return m.Linux + } + return nil +} + +type CreateContainerRequest struct { + // ID of the PodSandbox in which the container should be created. + PodSandboxId string `protobuf:"bytes,1,opt,name=pod_sandbox_id,json=podSandboxId,proto3" json:"pod_sandbox_id,omitempty"` + // Config of the container. + Config *ContainerConfig `protobuf:"bytes,2,opt,name=config" json:"config,omitempty"` + // Config of the PodSandbox. This is the same config that was passed + // to RunPodSandboxRequest to create the PodSandbox. It is passed again + // here just for easy reference. The PodSandboxConfig is immutable and + // remains the same throughout the lifetime of the pod. + SandboxConfig *PodSandboxConfig `protobuf:"bytes,3,opt,name=sandbox_config,json=sandboxConfig" json:"sandbox_config,omitempty"` +} + +func (m *CreateContainerRequest) Reset() { *m = CreateContainerRequest{} } +func (*CreateContainerRequest) ProtoMessage() {} +func (*CreateContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{38} } + +func (m *CreateContainerRequest) GetPodSandboxId() string { + if m != nil { + return m.PodSandboxId + } + return "" +} + +func (m *CreateContainerRequest) GetConfig() *ContainerConfig { + if m != nil { + return m.Config + } + return nil +} + +func (m *CreateContainerRequest) GetSandboxConfig() *PodSandboxConfig { + if m != nil { + return m.SandboxConfig + } + return nil +} + +type CreateContainerResponse struct { + // ID of the created container. + ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` +} + +func (m *CreateContainerResponse) Reset() { *m = CreateContainerResponse{} } +func (*CreateContainerResponse) ProtoMessage() {} +func (*CreateContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{39} } + +func (m *CreateContainerResponse) GetContainerId() string { + if m != nil { + return m.ContainerId + } + return "" +} + +type StartContainerRequest struct { + // ID of the container to start. + ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` +} + +func (m *StartContainerRequest) Reset() { *m = StartContainerRequest{} } +func (*StartContainerRequest) ProtoMessage() {} +func (*StartContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{40} } + +func (m *StartContainerRequest) GetContainerId() string { + if m != nil { + return m.ContainerId + } + return "" +} + +type StartContainerResponse struct { +} + +func (m *StartContainerResponse) Reset() { *m = StartContainerResponse{} } +func (*StartContainerResponse) ProtoMessage() {} +func (*StartContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{41} } + +type StopContainerRequest struct { + // ID of the container to stop. + ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` + // Timeout in seconds to wait for the container to stop before forcibly + // terminating it. Default: 0 (forcibly terminate the container immediately) + Timeout int64 `protobuf:"varint,2,opt,name=timeout,proto3" json:"timeout,omitempty"` +} + +func (m *StopContainerRequest) Reset() { *m = StopContainerRequest{} } +func (*StopContainerRequest) ProtoMessage() {} +func (*StopContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{42} } + +func (m *StopContainerRequest) GetContainerId() string { + if m != nil { + return m.ContainerId + } + return "" +} + +func (m *StopContainerRequest) GetTimeout() int64 { + if m != nil { + return m.Timeout + } + return 0 +} + +type StopContainerResponse struct { +} + +func (m *StopContainerResponse) Reset() { *m = StopContainerResponse{} } +func (*StopContainerResponse) ProtoMessage() {} +func (*StopContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{43} } + +type RemoveContainerRequest struct { + // ID of the container to remove. + ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` +} + +func (m *RemoveContainerRequest) Reset() { *m = RemoveContainerRequest{} } +func (*RemoveContainerRequest) ProtoMessage() {} +func (*RemoveContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{44} } + +func (m *RemoveContainerRequest) GetContainerId() string { + if m != nil { + return m.ContainerId + } + return "" +} + +type RemoveContainerResponse struct { +} + +func (m *RemoveContainerResponse) Reset() { *m = RemoveContainerResponse{} } +func (*RemoveContainerResponse) ProtoMessage() {} +func (*RemoveContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{45} } + +// ContainerStateValue is the wrapper of ContainerState. +type ContainerStateValue struct { + // State of the container. + State ContainerState `protobuf:"varint,1,opt,name=state,proto3,enum=runtime.ContainerState" json:"state,omitempty"` +} + +func (m *ContainerStateValue) Reset() { *m = ContainerStateValue{} } +func (*ContainerStateValue) ProtoMessage() {} +func (*ContainerStateValue) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{46} } + +func (m *ContainerStateValue) GetState() ContainerState { + if m != nil { + return m.State + } + return ContainerState_CONTAINER_CREATED +} + +// ContainerFilter is used to filter containers. +// All those fields are combined with 'AND' +type ContainerFilter struct { + // ID of the container. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // State of the container. + State *ContainerStateValue `protobuf:"bytes,2,opt,name=state" json:"state,omitempty"` + // ID of the PodSandbox. + PodSandboxId string `protobuf:"bytes,3,opt,name=pod_sandbox_id,json=podSandboxId,proto3" json:"pod_sandbox_id,omitempty"` + // LabelSelector to select matches. + // Only api.MatchLabels is supported for now and the requirements + // are ANDed. MatchExpressions is not supported yet. + LabelSelector map[string]string `protobuf:"bytes,4,rep,name=label_selector,json=labelSelector" json:"label_selector,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *ContainerFilter) Reset() { *m = ContainerFilter{} } +func (*ContainerFilter) ProtoMessage() {} +func (*ContainerFilter) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{47} } + +func (m *ContainerFilter) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *ContainerFilter) GetState() *ContainerStateValue { + if m != nil { + return m.State + } + return nil +} + +func (m *ContainerFilter) GetPodSandboxId() string { + if m != nil { + return m.PodSandboxId + } + return "" +} + +func (m *ContainerFilter) GetLabelSelector() map[string]string { + if m != nil { + return m.LabelSelector + } + return nil +} + +type ListContainersRequest struct { + Filter *ContainerFilter `protobuf:"bytes,1,opt,name=filter" json:"filter,omitempty"` +} + +func (m *ListContainersRequest) Reset() { *m = ListContainersRequest{} } +func (*ListContainersRequest) ProtoMessage() {} +func (*ListContainersRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{48} } + +func (m *ListContainersRequest) GetFilter() *ContainerFilter { + if m != nil { + return m.Filter + } + return nil +} + +// Container provides the runtime information for a container, such as ID, hash, +// state of the container. +type Container struct { + // ID of the container, used by the container runtime to identify + // a container. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // ID of the sandbox to which this container belongs. + PodSandboxId string `protobuf:"bytes,2,opt,name=pod_sandbox_id,json=podSandboxId,proto3" json:"pod_sandbox_id,omitempty"` + // Metadata of the container. + Metadata *ContainerMetadata `protobuf:"bytes,3,opt,name=metadata" json:"metadata,omitempty"` + // Spec of the image. + Image *ImageSpec `protobuf:"bytes,4,opt,name=image" json:"image,omitempty"` + // Reference to the image in use. For most runtimes, this should be an + // image ID. + ImageRef string `protobuf:"bytes,5,opt,name=image_ref,json=imageRef,proto3" json:"image_ref,omitempty"` + // State of the container. + State ContainerState `protobuf:"varint,6,opt,name=state,proto3,enum=runtime.ContainerState" json:"state,omitempty"` + // Creation time of the container in nanoseconds. + CreatedAt int64 `protobuf:"varint,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + // Key-value pairs that may be used to scope and select individual resources. + Labels map[string]string `protobuf:"bytes,8,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Unstructured key-value map holding arbitrary metadata. + // Annotations MUST NOT be altered by the runtime; the value of this field + // MUST be identical to that of the corresponding ContainerConfig used to + // instantiate this Container. + Annotations map[string]string `protobuf:"bytes,9,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *Container) Reset() { *m = Container{} } +func (*Container) ProtoMessage() {} +func (*Container) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{49} } + +func (m *Container) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *Container) GetPodSandboxId() string { + if m != nil { + return m.PodSandboxId + } + return "" +} + +func (m *Container) GetMetadata() *ContainerMetadata { + if m != nil { + return m.Metadata + } + return nil +} + +func (m *Container) GetImage() *ImageSpec { + if m != nil { + return m.Image + } + return nil +} + +func (m *Container) GetImageRef() string { + if m != nil { + return m.ImageRef + } + return "" +} + +func (m *Container) GetState() ContainerState { + if m != nil { + return m.State + } + return ContainerState_CONTAINER_CREATED +} + +func (m *Container) GetCreatedAt() int64 { + if m != nil { + return m.CreatedAt + } + return 0 +} + +func (m *Container) GetLabels() map[string]string { + if m != nil { + return m.Labels + } + return nil +} + +func (m *Container) GetAnnotations() map[string]string { + if m != nil { + return m.Annotations + } + return nil +} + +type ListContainersResponse struct { + // List of containers. + Containers []*Container `protobuf:"bytes,1,rep,name=containers" json:"containers,omitempty"` +} + +func (m *ListContainersResponse) Reset() { *m = ListContainersResponse{} } +func (*ListContainersResponse) ProtoMessage() {} +func (*ListContainersResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{50} } + +func (m *ListContainersResponse) GetContainers() []*Container { + if m != nil { + return m.Containers + } + return nil +} + +type ContainerStatusRequest struct { + // ID of the container for which to retrieve status. + ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` +} + +func (m *ContainerStatusRequest) Reset() { *m = ContainerStatusRequest{} } +func (*ContainerStatusRequest) ProtoMessage() {} +func (*ContainerStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{51} } + +func (m *ContainerStatusRequest) GetContainerId() string { + if m != nil { + return m.ContainerId + } + return "" +} + +// ContainerStatus represents the status of a container. +type ContainerStatus struct { + // ID of the container. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Metadata of the container. + Metadata *ContainerMetadata `protobuf:"bytes,2,opt,name=metadata" json:"metadata,omitempty"` + // Status of the container. + State ContainerState `protobuf:"varint,3,opt,name=state,proto3,enum=runtime.ContainerState" json:"state,omitempty"` + // Creation time of the container in nanoseconds. + CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + // Start time of the container in nanoseconds. Default: 0 (not specified). + StartedAt int64 `protobuf:"varint,5,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` + // Finish time of the container in nanoseconds. Default: 0 (not specified). + FinishedAt int64 `protobuf:"varint,6,opt,name=finished_at,json=finishedAt,proto3" json:"finished_at,omitempty"` + // Exit code of the container. Only required when finished_at != 0. Default: 0. + ExitCode int32 `protobuf:"varint,7,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"` + // Spec of the image. + Image *ImageSpec `protobuf:"bytes,8,opt,name=image" json:"image,omitempty"` + // Reference to the image in use. For most runtimes, this should be an + // image ID + ImageRef string `protobuf:"bytes,9,opt,name=image_ref,json=imageRef,proto3" json:"image_ref,omitempty"` + // Brief CamelCase string explaining why container is in its current state. + Reason string `protobuf:"bytes,10,opt,name=reason,proto3" json:"reason,omitempty"` + // Human-readable message indicating details about why container is in its + // current state. + Message string `protobuf:"bytes,11,opt,name=message,proto3" json:"message,omitempty"` + // Key-value pairs that may be used to scope and select individual resources. + Labels map[string]string `protobuf:"bytes,12,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Unstructured key-value map holding arbitrary metadata. + // Annotations MUST NOT be altered by the runtime; the value of this field + // MUST be identical to that of the corresponding ContainerConfig used to + // instantiate the Container this status represents. + Annotations map[string]string `protobuf:"bytes,13,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Mounts for the container. + Mounts []*Mount `protobuf:"bytes,14,rep,name=mounts" json:"mounts,omitempty"` + // Log path of container. + LogPath string `protobuf:"bytes,15,opt,name=log_path,json=logPath,proto3" json:"log_path,omitempty"` +} + +func (m *ContainerStatus) Reset() { *m = ContainerStatus{} } +func (*ContainerStatus) ProtoMessage() {} +func (*ContainerStatus) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{52} } + +func (m *ContainerStatus) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *ContainerStatus) GetMetadata() *ContainerMetadata { + if m != nil { + return m.Metadata + } + return nil +} + +func (m *ContainerStatus) GetState() ContainerState { + if m != nil { + return m.State + } + return ContainerState_CONTAINER_CREATED +} + +func (m *ContainerStatus) GetCreatedAt() int64 { + if m != nil { + return m.CreatedAt + } + return 0 +} + +func (m *ContainerStatus) GetStartedAt() int64 { + if m != nil { + return m.StartedAt + } + return 0 +} + +func (m *ContainerStatus) GetFinishedAt() int64 { + if m != nil { + return m.FinishedAt + } + return 0 +} + +func (m *ContainerStatus) GetExitCode() int32 { + if m != nil { + return m.ExitCode + } + return 0 +} + +func (m *ContainerStatus) GetImage() *ImageSpec { + if m != nil { + return m.Image + } + return nil +} + +func (m *ContainerStatus) GetImageRef() string { + if m != nil { + return m.ImageRef + } + return "" +} + +func (m *ContainerStatus) GetReason() string { + if m != nil { + return m.Reason + } + return "" +} + +func (m *ContainerStatus) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + +func (m *ContainerStatus) GetLabels() map[string]string { + if m != nil { + return m.Labels + } + return nil +} + +func (m *ContainerStatus) GetAnnotations() map[string]string { + if m != nil { + return m.Annotations + } + return nil +} + +func (m *ContainerStatus) GetMounts() []*Mount { + if m != nil { + return m.Mounts + } + return nil +} + +func (m *ContainerStatus) GetLogPath() string { + if m != nil { + return m.LogPath + } + return "" +} + +type ContainerStatusResponse struct { + // Status of the container. + Status *ContainerStatus `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"` +} + +func (m *ContainerStatusResponse) Reset() { *m = ContainerStatusResponse{} } +func (*ContainerStatusResponse) ProtoMessage() {} +func (*ContainerStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{53} } + +func (m *ContainerStatusResponse) GetStatus() *ContainerStatus { + if m != nil { + return m.Status + } + return nil +} + +type UpdateContainerResourcesRequest struct { + // ID of the container to update. + ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` + // Resource configuration specific to Linux containers. + Linux *LinuxContainerResources `protobuf:"bytes,2,opt,name=linux" json:"linux,omitempty"` +} + +func (m *UpdateContainerResourcesRequest) Reset() { *m = UpdateContainerResourcesRequest{} } +func (*UpdateContainerResourcesRequest) ProtoMessage() {} +func (*UpdateContainerResourcesRequest) Descriptor() ([]byte, []int) { + return fileDescriptorApi, []int{54} +} + +func (m *UpdateContainerResourcesRequest) GetContainerId() string { + if m != nil { + return m.ContainerId + } + return "" +} + +func (m *UpdateContainerResourcesRequest) GetLinux() *LinuxContainerResources { + if m != nil { + return m.Linux + } + return nil +} + +type UpdateContainerResourcesResponse struct { +} + +func (m *UpdateContainerResourcesResponse) Reset() { *m = UpdateContainerResourcesResponse{} } +func (*UpdateContainerResourcesResponse) ProtoMessage() {} +func (*UpdateContainerResourcesResponse) Descriptor() ([]byte, []int) { + return fileDescriptorApi, []int{55} +} + +type ExecSyncRequest struct { + // ID of the container. + ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` + // Command to execute. + Cmd []string `protobuf:"bytes,2,rep,name=cmd" json:"cmd,omitempty"` + // Timeout in seconds to stop the command. Default: 0 (run forever). + Timeout int64 `protobuf:"varint,3,opt,name=timeout,proto3" json:"timeout,omitempty"` +} + +func (m *ExecSyncRequest) Reset() { *m = ExecSyncRequest{} } +func (*ExecSyncRequest) ProtoMessage() {} +func (*ExecSyncRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{56} } + +func (m *ExecSyncRequest) GetContainerId() string { + if m != nil { + return m.ContainerId + } + return "" +} + +func (m *ExecSyncRequest) GetCmd() []string { + if m != nil { + return m.Cmd + } + return nil +} + +func (m *ExecSyncRequest) GetTimeout() int64 { + if m != nil { + return m.Timeout + } + return 0 +} + +type ExecSyncResponse struct { + // Captured command stdout output. + Stdout []byte `protobuf:"bytes,1,opt,name=stdout,proto3" json:"stdout,omitempty"` + // Captured command stderr output. + Stderr []byte `protobuf:"bytes,2,opt,name=stderr,proto3" json:"stderr,omitempty"` + // Exit code the command finished with. Default: 0 (success). + ExitCode int32 `protobuf:"varint,3,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"` +} + +func (m *ExecSyncResponse) Reset() { *m = ExecSyncResponse{} } +func (*ExecSyncResponse) ProtoMessage() {} +func (*ExecSyncResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{57} } + +func (m *ExecSyncResponse) GetStdout() []byte { + if m != nil { + return m.Stdout + } + return nil +} + +func (m *ExecSyncResponse) GetStderr() []byte { + if m != nil { + return m.Stderr + } + return nil +} + +func (m *ExecSyncResponse) GetExitCode() int32 { + if m != nil { + return m.ExitCode + } + return 0 +} + +type ExecRequest struct { + // ID of the container in which to execute the command. + ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` + // Command to execute. + Cmd []string `protobuf:"bytes,2,rep,name=cmd" json:"cmd,omitempty"` + // Whether to exec the command in a TTY. + Tty bool `protobuf:"varint,3,opt,name=tty,proto3" json:"tty,omitempty"` + // Whether to stream stdin. + Stdin bool `protobuf:"varint,4,opt,name=stdin,proto3" json:"stdin,omitempty"` +} + +func (m *ExecRequest) Reset() { *m = ExecRequest{} } +func (*ExecRequest) ProtoMessage() {} +func (*ExecRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{58} } + +func (m *ExecRequest) GetContainerId() string { + if m != nil { + return m.ContainerId + } + return "" +} + +func (m *ExecRequest) GetCmd() []string { + if m != nil { + return m.Cmd + } + return nil +} + +func (m *ExecRequest) GetTty() bool { + if m != nil { + return m.Tty + } + return false +} + +func (m *ExecRequest) GetStdin() bool { + if m != nil { + return m.Stdin + } + return false +} + +type ExecResponse struct { + // Fully qualified URL of the exec streaming server. + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` +} + +func (m *ExecResponse) Reset() { *m = ExecResponse{} } +func (*ExecResponse) ProtoMessage() {} +func (*ExecResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{59} } + +func (m *ExecResponse) GetUrl() string { + if m != nil { + return m.Url + } + return "" +} + +type AttachRequest struct { + // ID of the container to which to attach. + ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` + // Whether to stream stdin. + Stdin bool `protobuf:"varint,2,opt,name=stdin,proto3" json:"stdin,omitempty"` + // Whether the process being attached is running in a TTY. + // This must match the TTY setting in the ContainerConfig. + Tty bool `protobuf:"varint,3,opt,name=tty,proto3" json:"tty,omitempty"` +} + +func (m *AttachRequest) Reset() { *m = AttachRequest{} } +func (*AttachRequest) ProtoMessage() {} +func (*AttachRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{60} } + +func (m *AttachRequest) GetContainerId() string { + if m != nil { + return m.ContainerId + } + return "" +} + +func (m *AttachRequest) GetStdin() bool { + if m != nil { + return m.Stdin + } + return false +} + +func (m *AttachRequest) GetTty() bool { + if m != nil { + return m.Tty + } + return false +} + +type AttachResponse struct { + // Fully qualified URL of the attach streaming server. + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` +} + +func (m *AttachResponse) Reset() { *m = AttachResponse{} } +func (*AttachResponse) ProtoMessage() {} +func (*AttachResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{61} } + +func (m *AttachResponse) GetUrl() string { + if m != nil { + return m.Url + } + return "" +} + +type PortForwardRequest struct { + // ID of the container to which to forward the port. + PodSandboxId string `protobuf:"bytes,1,opt,name=pod_sandbox_id,json=podSandboxId,proto3" json:"pod_sandbox_id,omitempty"` + // Port to forward. + Port []int32 `protobuf:"varint,2,rep,packed,name=port" json:"port,omitempty"` +} + +func (m *PortForwardRequest) Reset() { *m = PortForwardRequest{} } +func (*PortForwardRequest) ProtoMessage() {} +func (*PortForwardRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{62} } + +func (m *PortForwardRequest) GetPodSandboxId() string { + if m != nil { + return m.PodSandboxId + } + return "" +} + +func (m *PortForwardRequest) GetPort() []int32 { + if m != nil { + return m.Port + } + return nil +} + +type PortForwardResponse struct { + // Fully qualified URL of the port-forward streaming server. + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` +} + +func (m *PortForwardResponse) Reset() { *m = PortForwardResponse{} } +func (*PortForwardResponse) ProtoMessage() {} +func (*PortForwardResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{63} } + +func (m *PortForwardResponse) GetUrl() string { + if m != nil { + return m.Url + } + return "" +} + +type ImageFilter struct { + // Spec of the image. + Image *ImageSpec `protobuf:"bytes,1,opt,name=image" json:"image,omitempty"` +} + +func (m *ImageFilter) Reset() { *m = ImageFilter{} } +func (*ImageFilter) ProtoMessage() {} +func (*ImageFilter) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{64} } + +func (m *ImageFilter) GetImage() *ImageSpec { + if m != nil { + return m.Image + } + return nil +} + +type ListImagesRequest struct { + // Filter to list images. + Filter *ImageFilter `protobuf:"bytes,1,opt,name=filter" json:"filter,omitempty"` +} + +func (m *ListImagesRequest) Reset() { *m = ListImagesRequest{} } +func (*ListImagesRequest) ProtoMessage() {} +func (*ListImagesRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{65} } + +func (m *ListImagesRequest) GetFilter() *ImageFilter { + if m != nil { + return m.Filter + } + return nil +} + +// Basic information about a container image. +type Image struct { + // ID of the image. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Other names by which this image is known. + RepoTags []string `protobuf:"bytes,2,rep,name=repo_tags,json=repoTags" json:"repo_tags,omitempty"` + // Digests by which this image is known. + RepoDigests []string `protobuf:"bytes,3,rep,name=repo_digests,json=repoDigests" json:"repo_digests,omitempty"` + // Size of the image in bytes. Must be > 0. + Size_ uint64 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"` + // UID that will run the command(s). This is used as a default if no user is + // specified when creating the container. UID and the following user name + // are mutually exclusive. + Uid *Int64Value `protobuf:"bytes,5,opt,name=uid" json:"uid,omitempty"` + // User name that will run the command(s). This is used if UID is not set + // and no user is specified when creating container. + Username string `protobuf:"bytes,6,opt,name=username,proto3" json:"username,omitempty"` +} + +func (m *Image) Reset() { *m = Image{} } +func (*Image) ProtoMessage() {} +func (*Image) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{66} } + +func (m *Image) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *Image) GetRepoTags() []string { + if m != nil { + return m.RepoTags + } + return nil +} + +func (m *Image) GetRepoDigests() []string { + if m != nil { + return m.RepoDigests + } + return nil +} + +func (m *Image) GetSize_() uint64 { + if m != nil { + return m.Size_ + } + return 0 +} + +func (m *Image) GetUid() *Int64Value { + if m != nil { + return m.Uid + } + return nil +} + +func (m *Image) GetUsername() string { + if m != nil { + return m.Username + } + return "" +} + +type ListImagesResponse struct { + // List of images. + Images []*Image `protobuf:"bytes,1,rep,name=images" json:"images,omitempty"` +} + +func (m *ListImagesResponse) Reset() { *m = ListImagesResponse{} } +func (*ListImagesResponse) ProtoMessage() {} +func (*ListImagesResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{67} } + +func (m *ListImagesResponse) GetImages() []*Image { + if m != nil { + return m.Images + } + return nil +} + +type ImageStatusRequest struct { + // Spec of the image. + Image *ImageSpec `protobuf:"bytes,1,opt,name=image" json:"image,omitempty"` +} + +func (m *ImageStatusRequest) Reset() { *m = ImageStatusRequest{} } +func (*ImageStatusRequest) ProtoMessage() {} +func (*ImageStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{68} } + +func (m *ImageStatusRequest) GetImage() *ImageSpec { + if m != nil { + return m.Image + } + return nil +} + +type ImageStatusResponse struct { + // Status of the image. + Image *Image `protobuf:"bytes,1,opt,name=image" json:"image,omitempty"` +} + +func (m *ImageStatusResponse) Reset() { *m = ImageStatusResponse{} } +func (*ImageStatusResponse) ProtoMessage() {} +func (*ImageStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{69} } + +func (m *ImageStatusResponse) GetImage() *Image { + if m != nil { + return m.Image + } + return nil +} + +// AuthConfig contains authorization information for connecting to a registry. +type AuthConfig struct { + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` + Auth string `protobuf:"bytes,3,opt,name=auth,proto3" json:"auth,omitempty"` + ServerAddress string `protobuf:"bytes,4,opt,name=server_address,json=serverAddress,proto3" json:"server_address,omitempty"` + // IdentityToken is used to authenticate the user and get + // an access token for the registry. + IdentityToken string `protobuf:"bytes,5,opt,name=identity_token,json=identityToken,proto3" json:"identity_token,omitempty"` + // RegistryToken is a bearer token to be sent to a registry + RegistryToken string `protobuf:"bytes,6,opt,name=registry_token,json=registryToken,proto3" json:"registry_token,omitempty"` +} + +func (m *AuthConfig) Reset() { *m = AuthConfig{} } +func (*AuthConfig) ProtoMessage() {} +func (*AuthConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{70} } + +func (m *AuthConfig) GetUsername() string { + if m != nil { + return m.Username + } + return "" +} + +func (m *AuthConfig) GetPassword() string { + if m != nil { + return m.Password + } + return "" +} + +func (m *AuthConfig) GetAuth() string { + if m != nil { + return m.Auth + } + return "" +} + +func (m *AuthConfig) GetServerAddress() string { + if m != nil { + return m.ServerAddress + } + return "" +} + +func (m *AuthConfig) GetIdentityToken() string { + if m != nil { + return m.IdentityToken + } + return "" +} + +func (m *AuthConfig) GetRegistryToken() string { + if m != nil { + return m.RegistryToken + } + return "" +} + +type PullImageRequest struct { + // Spec of the image. + Image *ImageSpec `protobuf:"bytes,1,opt,name=image" json:"image,omitempty"` + // Authentication configuration for pulling the image. + Auth *AuthConfig `protobuf:"bytes,2,opt,name=auth" json:"auth,omitempty"` + // Config of the PodSandbox, which is used to pull image in PodSandbox context. + SandboxConfig *PodSandboxConfig `protobuf:"bytes,3,opt,name=sandbox_config,json=sandboxConfig" json:"sandbox_config,omitempty"` +} + +func (m *PullImageRequest) Reset() { *m = PullImageRequest{} } +func (*PullImageRequest) ProtoMessage() {} +func (*PullImageRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{71} } + +func (m *PullImageRequest) GetImage() *ImageSpec { + if m != nil { + return m.Image + } + return nil +} + +func (m *PullImageRequest) GetAuth() *AuthConfig { + if m != nil { + return m.Auth + } + return nil +} + +func (m *PullImageRequest) GetSandboxConfig() *PodSandboxConfig { + if m != nil { + return m.SandboxConfig + } + return nil +} + +type PullImageResponse struct { + // Reference to the image in use. For most runtimes, this should be an + // image ID or digest. + ImageRef string `protobuf:"bytes,1,opt,name=image_ref,json=imageRef,proto3" json:"image_ref,omitempty"` +} + +func (m *PullImageResponse) Reset() { *m = PullImageResponse{} } +func (*PullImageResponse) ProtoMessage() {} +func (*PullImageResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{72} } + +func (m *PullImageResponse) GetImageRef() string { + if m != nil { + return m.ImageRef + } + return "" +} + +type RemoveImageRequest struct { + // Spec of the image to remove. + Image *ImageSpec `protobuf:"bytes,1,opt,name=image" json:"image,omitempty"` +} + +func (m *RemoveImageRequest) Reset() { *m = RemoveImageRequest{} } +func (*RemoveImageRequest) ProtoMessage() {} +func (*RemoveImageRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{73} } + +func (m *RemoveImageRequest) GetImage() *ImageSpec { + if m != nil { + return m.Image + } + return nil +} + +type RemoveImageResponse struct { +} + +func (m *RemoveImageResponse) Reset() { *m = RemoveImageResponse{} } +func (*RemoveImageResponse) ProtoMessage() {} +func (*RemoveImageResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{74} } + +type NetworkConfig struct { + // CIDR to use for pod IP addresses. + PodCidr string `protobuf:"bytes,1,opt,name=pod_cidr,json=podCidr,proto3" json:"pod_cidr,omitempty"` +} + +func (m *NetworkConfig) Reset() { *m = NetworkConfig{} } +func (*NetworkConfig) ProtoMessage() {} +func (*NetworkConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{75} } + +func (m *NetworkConfig) GetPodCidr() string { + if m != nil { + return m.PodCidr + } + return "" +} + +type RuntimeConfig struct { + NetworkConfig *NetworkConfig `protobuf:"bytes,1,opt,name=network_config,json=networkConfig" json:"network_config,omitempty"` +} + +func (m *RuntimeConfig) Reset() { *m = RuntimeConfig{} } +func (*RuntimeConfig) ProtoMessage() {} +func (*RuntimeConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{76} } + +func (m *RuntimeConfig) GetNetworkConfig() *NetworkConfig { + if m != nil { + return m.NetworkConfig + } + return nil +} + +type UpdateRuntimeConfigRequest struct { + RuntimeConfig *RuntimeConfig `protobuf:"bytes,1,opt,name=runtime_config,json=runtimeConfig" json:"runtime_config,omitempty"` +} + +func (m *UpdateRuntimeConfigRequest) Reset() { *m = UpdateRuntimeConfigRequest{} } +func (*UpdateRuntimeConfigRequest) ProtoMessage() {} +func (*UpdateRuntimeConfigRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{77} } + +func (m *UpdateRuntimeConfigRequest) GetRuntimeConfig() *RuntimeConfig { + if m != nil { + return m.RuntimeConfig + } + return nil +} + +type UpdateRuntimeConfigResponse struct { +} + +func (m *UpdateRuntimeConfigResponse) Reset() { *m = UpdateRuntimeConfigResponse{} } +func (*UpdateRuntimeConfigResponse) ProtoMessage() {} +func (*UpdateRuntimeConfigResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{78} } + +// RuntimeCondition contains condition information for the runtime. +// There are 2 kinds of runtime conditions: +// 1. Required conditions: Conditions are required for kubelet to work +// properly. If any required condition is unmet, the node will be not ready. +// The required conditions include: +// * RuntimeReady: RuntimeReady means the runtime is up and ready to accept +// basic containers e.g. container only needs host network. +// * NetworkReady: NetworkReady means the runtime network is up and ready to +// accept containers which require container network. +// 2. Optional conditions: Conditions are informative to the user, but kubelet +// will not rely on. Since condition type is an arbitrary string, all conditions +// not required are optional. These conditions will be exposed to users to help +// them understand the status of the system. +type RuntimeCondition struct { + // Type of runtime condition. + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + // Status of the condition, one of true/false. Default: false. + Status bool `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"` + // Brief CamelCase string containing reason for the condition's last transition. + Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"` + // Human-readable message indicating details about last transition. + Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"` +} + +func (m *RuntimeCondition) Reset() { *m = RuntimeCondition{} } +func (*RuntimeCondition) ProtoMessage() {} +func (*RuntimeCondition) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{79} } + +func (m *RuntimeCondition) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *RuntimeCondition) GetStatus() bool { + if m != nil { + return m.Status + } + return false +} + +func (m *RuntimeCondition) GetReason() string { + if m != nil { + return m.Reason + } + return "" +} + +func (m *RuntimeCondition) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + +// RuntimeStatus is information about the current status of the runtime. +type RuntimeStatus struct { + // List of current observed runtime conditions. + Conditions []*RuntimeCondition `protobuf:"bytes,1,rep,name=conditions" json:"conditions,omitempty"` +} + +func (m *RuntimeStatus) Reset() { *m = RuntimeStatus{} } +func (*RuntimeStatus) ProtoMessage() {} +func (*RuntimeStatus) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{80} } + +func (m *RuntimeStatus) GetConditions() []*RuntimeCondition { + if m != nil { + return m.Conditions + } + return nil +} + +type StatusRequest struct { +} + +func (m *StatusRequest) Reset() { *m = StatusRequest{} } +func (*StatusRequest) ProtoMessage() {} +func (*StatusRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{81} } + +type StatusResponse struct { + // Status of the Runtime. + Status *RuntimeStatus `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"` +} + +func (m *StatusResponse) Reset() { *m = StatusResponse{} } +func (*StatusResponse) ProtoMessage() {} +func (*StatusResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{82} } + +func (m *StatusResponse) GetStatus() *RuntimeStatus { + if m != nil { + return m.Status + } + return nil +} + +type ImageFsInfoRequest struct { +} + +func (m *ImageFsInfoRequest) Reset() { *m = ImageFsInfoRequest{} } +func (*ImageFsInfoRequest) ProtoMessage() {} +func (*ImageFsInfoRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{83} } + +// UInt64Value is the wrapper of uint64. +type UInt64Value struct { + // The value. + Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *UInt64Value) Reset() { *m = UInt64Value{} } +func (*UInt64Value) ProtoMessage() {} +func (*UInt64Value) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{84} } + +func (m *UInt64Value) GetValue() uint64 { + if m != nil { + return m.Value + } + return 0 +} + +// StorageIdentifier uniquely identify the storage.. +type StorageIdentifier struct { + // UUID of the device. + Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` +} + +func (m *StorageIdentifier) Reset() { *m = StorageIdentifier{} } +func (*StorageIdentifier) ProtoMessage() {} +func (*StorageIdentifier) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{85} } + +func (m *StorageIdentifier) GetUuid() string { + if m != nil { + return m.Uuid + } + return "" +} + +// FilesystemUsage provides the filesystem usage information. +type FilesystemUsage struct { + // Timestamp in nanoseconds at which the information were collected. Must be > 0. + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // The underlying storage of the filesystem. + StorageId *StorageIdentifier `protobuf:"bytes,2,opt,name=storage_id,json=storageId" json:"storage_id,omitempty"` + // UsedBytes represents the bytes used for images on the filesystem. + // This may differ from the total bytes used on the filesystem and may not + // equal CapacityBytes - AvailableBytes. + UsedBytes *UInt64Value `protobuf:"bytes,3,opt,name=used_bytes,json=usedBytes" json:"used_bytes,omitempty"` + // InodesUsed represents the inodes used by the images. + // This may not equal InodesCapacity - InodesAvailable because the underlying + // filesystem may also be used for purposes other than storing images. + InodesUsed *UInt64Value `protobuf:"bytes,4,opt,name=inodes_used,json=inodesUsed" json:"inodes_used,omitempty"` +} + +func (m *FilesystemUsage) Reset() { *m = FilesystemUsage{} } +func (*FilesystemUsage) ProtoMessage() {} +func (*FilesystemUsage) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{86} } + +func (m *FilesystemUsage) GetTimestamp() int64 { + if m != nil { + return m.Timestamp + } + return 0 +} + +func (m *FilesystemUsage) GetStorageId() *StorageIdentifier { + if m != nil { + return m.StorageId + } + return nil +} + +func (m *FilesystemUsage) GetUsedBytes() *UInt64Value { + if m != nil { + return m.UsedBytes + } + return nil +} + +func (m *FilesystemUsage) GetInodesUsed() *UInt64Value { + if m != nil { + return m.InodesUsed + } + return nil +} + +type ImageFsInfoResponse struct { + // Information of image filesystem(s). + ImageFilesystems []*FilesystemUsage `protobuf:"bytes,1,rep,name=image_filesystems,json=imageFilesystems" json:"image_filesystems,omitempty"` +} + +func (m *ImageFsInfoResponse) Reset() { *m = ImageFsInfoResponse{} } +func (*ImageFsInfoResponse) ProtoMessage() {} +func (*ImageFsInfoResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{87} } + +func (m *ImageFsInfoResponse) GetImageFilesystems() []*FilesystemUsage { + if m != nil { + return m.ImageFilesystems + } + return nil +} + +type ContainerStatsRequest struct { + // ID of the container for which to retrieve stats. + ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` +} + +func (m *ContainerStatsRequest) Reset() { *m = ContainerStatsRequest{} } +func (*ContainerStatsRequest) ProtoMessage() {} +func (*ContainerStatsRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{88} } + +func (m *ContainerStatsRequest) GetContainerId() string { + if m != nil { + return m.ContainerId + } + return "" +} + +type ContainerStatsResponse struct { + // Stats of the container. + Stats *ContainerStats `protobuf:"bytes,1,opt,name=stats" json:"stats,omitempty"` +} + +func (m *ContainerStatsResponse) Reset() { *m = ContainerStatsResponse{} } +func (*ContainerStatsResponse) ProtoMessage() {} +func (*ContainerStatsResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{89} } + +func (m *ContainerStatsResponse) GetStats() *ContainerStats { + if m != nil { + return m.Stats + } + return nil +} + +type ListContainerStatsRequest struct { + // Filter for the list request. + Filter *ContainerStatsFilter `protobuf:"bytes,1,opt,name=filter" json:"filter,omitempty"` +} + +func (m *ListContainerStatsRequest) Reset() { *m = ListContainerStatsRequest{} } +func (*ListContainerStatsRequest) ProtoMessage() {} +func (*ListContainerStatsRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{90} } + +func (m *ListContainerStatsRequest) GetFilter() *ContainerStatsFilter { + if m != nil { + return m.Filter + } + return nil +} + +// ContainerStatsFilter is used to filter containers. +// All those fields are combined with 'AND' +type ContainerStatsFilter struct { + // ID of the container. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // ID of the PodSandbox. + PodSandboxId string `protobuf:"bytes,2,opt,name=pod_sandbox_id,json=podSandboxId,proto3" json:"pod_sandbox_id,omitempty"` + // LabelSelector to select matches. + // Only api.MatchLabels is supported for now and the requirements + // are ANDed. MatchExpressions is not supported yet. + LabelSelector map[string]string `protobuf:"bytes,3,rep,name=label_selector,json=labelSelector" json:"label_selector,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *ContainerStatsFilter) Reset() { *m = ContainerStatsFilter{} } +func (*ContainerStatsFilter) ProtoMessage() {} +func (*ContainerStatsFilter) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{91} } + +func (m *ContainerStatsFilter) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *ContainerStatsFilter) GetPodSandboxId() string { + if m != nil { + return m.PodSandboxId + } + return "" +} + +func (m *ContainerStatsFilter) GetLabelSelector() map[string]string { + if m != nil { + return m.LabelSelector + } + return nil +} + +type ListContainerStatsResponse struct { + // Stats of the container. + Stats []*ContainerStats `protobuf:"bytes,1,rep,name=stats" json:"stats,omitempty"` +} + +func (m *ListContainerStatsResponse) Reset() { *m = ListContainerStatsResponse{} } +func (*ListContainerStatsResponse) ProtoMessage() {} +func (*ListContainerStatsResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{92} } + +func (m *ListContainerStatsResponse) GetStats() []*ContainerStats { + if m != nil { + return m.Stats + } + return nil +} + +// ContainerAttributes provides basic information of the container. +type ContainerAttributes struct { + // ID of the container. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Metadata of the container. + Metadata *ContainerMetadata `protobuf:"bytes,2,opt,name=metadata" json:"metadata,omitempty"` + // Key-value pairs that may be used to scope and select individual resources. + Labels map[string]string `protobuf:"bytes,3,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Unstructured key-value map holding arbitrary metadata. + // Annotations MUST NOT be altered by the runtime; the value of this field + // MUST be identical to that of the corresponding ContainerConfig used to + // instantiate the Container this status represents. + Annotations map[string]string `protobuf:"bytes,4,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *ContainerAttributes) Reset() { *m = ContainerAttributes{} } +func (*ContainerAttributes) ProtoMessage() {} +func (*ContainerAttributes) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{93} } + +func (m *ContainerAttributes) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *ContainerAttributes) GetMetadata() *ContainerMetadata { + if m != nil { + return m.Metadata + } + return nil +} + +func (m *ContainerAttributes) GetLabels() map[string]string { + if m != nil { + return m.Labels + } + return nil +} + +func (m *ContainerAttributes) GetAnnotations() map[string]string { + if m != nil { + return m.Annotations + } + return nil +} + +// ContainerStats provides the resource usage statistics for a container. +type ContainerStats struct { + // Information of the container. + Attributes *ContainerAttributes `protobuf:"bytes,1,opt,name=attributes" json:"attributes,omitempty"` + // CPU usage gathered from the container. + Cpu *CpuUsage `protobuf:"bytes,2,opt,name=cpu" json:"cpu,omitempty"` + // Memory usage gathered from the container. + Memory *MemoryUsage `protobuf:"bytes,3,opt,name=memory" json:"memory,omitempty"` + // Usage of the writeable layer. + WritableLayer *FilesystemUsage `protobuf:"bytes,4,opt,name=writable_layer,json=writableLayer" json:"writable_layer,omitempty"` +} + +func (m *ContainerStats) Reset() { *m = ContainerStats{} } +func (*ContainerStats) ProtoMessage() {} +func (*ContainerStats) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{94} } + +func (m *ContainerStats) GetAttributes() *ContainerAttributes { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *ContainerStats) GetCpu() *CpuUsage { + if m != nil { + return m.Cpu + } + return nil +} + +func (m *ContainerStats) GetMemory() *MemoryUsage { + if m != nil { + return m.Memory + } + return nil +} + +func (m *ContainerStats) GetWritableLayer() *FilesystemUsage { + if m != nil { + return m.WritableLayer + } + return nil +} + +// CpuUsage provides the CPU usage information. +type CpuUsage struct { + // Timestamp in nanoseconds at which the information were collected. Must be > 0. + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // Cumulative CPU usage (sum across all cores) since object creation. + UsageCoreNanoSeconds *UInt64Value `protobuf:"bytes,2,opt,name=usage_core_nano_seconds,json=usageCoreNanoSeconds" json:"usage_core_nano_seconds,omitempty"` +} + +func (m *CpuUsage) Reset() { *m = CpuUsage{} } +func (*CpuUsage) ProtoMessage() {} +func (*CpuUsage) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{95} } + +func (m *CpuUsage) GetTimestamp() int64 { + if m != nil { + return m.Timestamp + } + return 0 +} + +func (m *CpuUsage) GetUsageCoreNanoSeconds() *UInt64Value { + if m != nil { + return m.UsageCoreNanoSeconds + } + return nil +} + +// MemoryUsage provides the memory usage information. +type MemoryUsage struct { + // Timestamp in nanoseconds at which the information were collected. Must be > 0. + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // The amount of working set memory in bytes. + WorkingSetBytes *UInt64Value `protobuf:"bytes,2,opt,name=working_set_bytes,json=workingSetBytes" json:"working_set_bytes,omitempty"` +} + +func (m *MemoryUsage) Reset() { *m = MemoryUsage{} } +func (*MemoryUsage) ProtoMessage() {} +func (*MemoryUsage) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{96} } + +func (m *MemoryUsage) GetTimestamp() int64 { + if m != nil { + return m.Timestamp + } + return 0 +} + +func (m *MemoryUsage) GetWorkingSetBytes() *UInt64Value { + if m != nil { + return m.WorkingSetBytes + } + return nil +} + +func init() { + proto.RegisterType((*VersionRequest)(nil), "runtime.VersionRequest") + proto.RegisterType((*VersionResponse)(nil), "runtime.VersionResponse") + proto.RegisterType((*DNSConfig)(nil), "runtime.DNSConfig") + proto.RegisterType((*PortMapping)(nil), "runtime.PortMapping") + proto.RegisterType((*Mount)(nil), "runtime.Mount") + proto.RegisterType((*NamespaceOption)(nil), "runtime.NamespaceOption") + proto.RegisterType((*Int64Value)(nil), "runtime.Int64Value") + proto.RegisterType((*LinuxSandboxSecurityContext)(nil), "runtime.LinuxSandboxSecurityContext") + proto.RegisterType((*LinuxPodSandboxConfig)(nil), "runtime.LinuxPodSandboxConfig") + proto.RegisterType((*PodSandboxMetadata)(nil), "runtime.PodSandboxMetadata") + proto.RegisterType((*PodSandboxConfig)(nil), "runtime.PodSandboxConfig") + proto.RegisterType((*RunPodSandboxRequest)(nil), "runtime.RunPodSandboxRequest") + proto.RegisterType((*RunPodSandboxResponse)(nil), "runtime.RunPodSandboxResponse") + proto.RegisterType((*StopPodSandboxRequest)(nil), "runtime.StopPodSandboxRequest") + proto.RegisterType((*StopPodSandboxResponse)(nil), "runtime.StopPodSandboxResponse") + proto.RegisterType((*RemovePodSandboxRequest)(nil), "runtime.RemovePodSandboxRequest") + proto.RegisterType((*RemovePodSandboxResponse)(nil), "runtime.RemovePodSandboxResponse") + proto.RegisterType((*PodSandboxStatusRequest)(nil), "runtime.PodSandboxStatusRequest") + proto.RegisterType((*PodSandboxNetworkStatus)(nil), "runtime.PodSandboxNetworkStatus") + proto.RegisterType((*Namespace)(nil), "runtime.Namespace") + proto.RegisterType((*LinuxPodSandboxStatus)(nil), "runtime.LinuxPodSandboxStatus") + proto.RegisterType((*PodSandboxStatus)(nil), "runtime.PodSandboxStatus") + proto.RegisterType((*PodSandboxStatusResponse)(nil), "runtime.PodSandboxStatusResponse") + proto.RegisterType((*PodSandboxStateValue)(nil), "runtime.PodSandboxStateValue") + proto.RegisterType((*PodSandboxFilter)(nil), "runtime.PodSandboxFilter") + proto.RegisterType((*ListPodSandboxRequest)(nil), "runtime.ListPodSandboxRequest") + proto.RegisterType((*PodSandbox)(nil), "runtime.PodSandbox") + proto.RegisterType((*ListPodSandboxResponse)(nil), "runtime.ListPodSandboxResponse") + proto.RegisterType((*ImageSpec)(nil), "runtime.ImageSpec") + proto.RegisterType((*KeyValue)(nil), "runtime.KeyValue") + proto.RegisterType((*LinuxContainerResources)(nil), "runtime.LinuxContainerResources") + proto.RegisterType((*SELinuxOption)(nil), "runtime.SELinuxOption") + proto.RegisterType((*Capability)(nil), "runtime.Capability") + proto.RegisterType((*LinuxContainerSecurityContext)(nil), "runtime.LinuxContainerSecurityContext") + proto.RegisterType((*LinuxContainerConfig)(nil), "runtime.LinuxContainerConfig") + proto.RegisterType((*ContainerMetadata)(nil), "runtime.ContainerMetadata") + proto.RegisterType((*Device)(nil), "runtime.Device") + proto.RegisterType((*ContainerConfig)(nil), "runtime.ContainerConfig") + proto.RegisterType((*CreateContainerRequest)(nil), "runtime.CreateContainerRequest") + proto.RegisterType((*CreateContainerResponse)(nil), "runtime.CreateContainerResponse") + proto.RegisterType((*StartContainerRequest)(nil), "runtime.StartContainerRequest") + proto.RegisterType((*StartContainerResponse)(nil), "runtime.StartContainerResponse") + proto.RegisterType((*StopContainerRequest)(nil), "runtime.StopContainerRequest") + proto.RegisterType((*StopContainerResponse)(nil), "runtime.StopContainerResponse") + proto.RegisterType((*RemoveContainerRequest)(nil), "runtime.RemoveContainerRequest") + proto.RegisterType((*RemoveContainerResponse)(nil), "runtime.RemoveContainerResponse") + proto.RegisterType((*ContainerStateValue)(nil), "runtime.ContainerStateValue") + proto.RegisterType((*ContainerFilter)(nil), "runtime.ContainerFilter") + proto.RegisterType((*ListContainersRequest)(nil), "runtime.ListContainersRequest") + proto.RegisterType((*Container)(nil), "runtime.Container") + proto.RegisterType((*ListContainersResponse)(nil), "runtime.ListContainersResponse") + proto.RegisterType((*ContainerStatusRequest)(nil), "runtime.ContainerStatusRequest") + proto.RegisterType((*ContainerStatus)(nil), "runtime.ContainerStatus") + proto.RegisterType((*ContainerStatusResponse)(nil), "runtime.ContainerStatusResponse") + proto.RegisterType((*UpdateContainerResourcesRequest)(nil), "runtime.UpdateContainerResourcesRequest") + proto.RegisterType((*UpdateContainerResourcesResponse)(nil), "runtime.UpdateContainerResourcesResponse") + proto.RegisterType((*ExecSyncRequest)(nil), "runtime.ExecSyncRequest") + proto.RegisterType((*ExecSyncResponse)(nil), "runtime.ExecSyncResponse") + proto.RegisterType((*ExecRequest)(nil), "runtime.ExecRequest") + proto.RegisterType((*ExecResponse)(nil), "runtime.ExecResponse") + proto.RegisterType((*AttachRequest)(nil), "runtime.AttachRequest") + proto.RegisterType((*AttachResponse)(nil), "runtime.AttachResponse") + proto.RegisterType((*PortForwardRequest)(nil), "runtime.PortForwardRequest") + proto.RegisterType((*PortForwardResponse)(nil), "runtime.PortForwardResponse") + proto.RegisterType((*ImageFilter)(nil), "runtime.ImageFilter") + proto.RegisterType((*ListImagesRequest)(nil), "runtime.ListImagesRequest") + proto.RegisterType((*Image)(nil), "runtime.Image") + proto.RegisterType((*ListImagesResponse)(nil), "runtime.ListImagesResponse") + proto.RegisterType((*ImageStatusRequest)(nil), "runtime.ImageStatusRequest") + proto.RegisterType((*ImageStatusResponse)(nil), "runtime.ImageStatusResponse") + proto.RegisterType((*AuthConfig)(nil), "runtime.AuthConfig") + proto.RegisterType((*PullImageRequest)(nil), "runtime.PullImageRequest") + proto.RegisterType((*PullImageResponse)(nil), "runtime.PullImageResponse") + proto.RegisterType((*RemoveImageRequest)(nil), "runtime.RemoveImageRequest") + proto.RegisterType((*RemoveImageResponse)(nil), "runtime.RemoveImageResponse") + proto.RegisterType((*NetworkConfig)(nil), "runtime.NetworkConfig") + proto.RegisterType((*RuntimeConfig)(nil), "runtime.RuntimeConfig") + proto.RegisterType((*UpdateRuntimeConfigRequest)(nil), "runtime.UpdateRuntimeConfigRequest") + proto.RegisterType((*UpdateRuntimeConfigResponse)(nil), "runtime.UpdateRuntimeConfigResponse") + proto.RegisterType((*RuntimeCondition)(nil), "runtime.RuntimeCondition") + proto.RegisterType((*RuntimeStatus)(nil), "runtime.RuntimeStatus") + proto.RegisterType((*StatusRequest)(nil), "runtime.StatusRequest") + proto.RegisterType((*StatusResponse)(nil), "runtime.StatusResponse") + proto.RegisterType((*ImageFsInfoRequest)(nil), "runtime.ImageFsInfoRequest") + proto.RegisterType((*UInt64Value)(nil), "runtime.UInt64Value") + proto.RegisterType((*StorageIdentifier)(nil), "runtime.StorageIdentifier") + proto.RegisterType((*FilesystemUsage)(nil), "runtime.FilesystemUsage") + proto.RegisterType((*ImageFsInfoResponse)(nil), "runtime.ImageFsInfoResponse") + proto.RegisterType((*ContainerStatsRequest)(nil), "runtime.ContainerStatsRequest") + proto.RegisterType((*ContainerStatsResponse)(nil), "runtime.ContainerStatsResponse") + proto.RegisterType((*ListContainerStatsRequest)(nil), "runtime.ListContainerStatsRequest") + proto.RegisterType((*ContainerStatsFilter)(nil), "runtime.ContainerStatsFilter") + proto.RegisterType((*ListContainerStatsResponse)(nil), "runtime.ListContainerStatsResponse") + proto.RegisterType((*ContainerAttributes)(nil), "runtime.ContainerAttributes") + proto.RegisterType((*ContainerStats)(nil), "runtime.ContainerStats") + proto.RegisterType((*CpuUsage)(nil), "runtime.CpuUsage") + proto.RegisterType((*MemoryUsage)(nil), "runtime.MemoryUsage") + proto.RegisterEnum("runtime.Protocol", Protocol_name, Protocol_value) + proto.RegisterEnum("runtime.MountPropagation", MountPropagation_name, MountPropagation_value) + proto.RegisterEnum("runtime.PodSandboxState", PodSandboxState_name, PodSandboxState_value) + proto.RegisterEnum("runtime.ContainerState", ContainerState_name, ContainerState_value) +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// Client API for RuntimeService service + +type RuntimeServiceClient interface { + // Version returns the runtime name, runtime version, and runtime API version. + Version(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*VersionResponse, error) + // RunPodSandbox creates and starts a pod-level sandbox. Runtimes must ensure + // the sandbox is in the ready state on success. + RunPodSandbox(ctx context.Context, in *RunPodSandboxRequest, opts ...grpc.CallOption) (*RunPodSandboxResponse, error) + // StopPodSandbox stops any running process that is part of the sandbox and + // reclaims network resources (e.g., IP addresses) allocated to the sandbox. + // If there are any running containers in the sandbox, they must be forcibly + // terminated. + // This call is idempotent, and must not return an error if all relevant + // resources have already been reclaimed. kubelet will call StopPodSandbox + // at least once before calling RemovePodSandbox. It will also attempt to + // reclaim resources eagerly, as soon as a sandbox is not needed. Hence, + // multiple StopPodSandbox calls are expected. + StopPodSandbox(ctx context.Context, in *StopPodSandboxRequest, opts ...grpc.CallOption) (*StopPodSandboxResponse, error) + // RemovePodSandbox removes the sandbox. If there are any running containers + // in the sandbox, they must be forcibly terminated and removed. + // This call is idempotent, and must not return an error if the sandbox has + // already been removed. + RemovePodSandbox(ctx context.Context, in *RemovePodSandboxRequest, opts ...grpc.CallOption) (*RemovePodSandboxResponse, error) + // PodSandboxStatus returns the status of the PodSandbox. If the PodSandbox is not + // present, returns an error. + PodSandboxStatus(ctx context.Context, in *PodSandboxStatusRequest, opts ...grpc.CallOption) (*PodSandboxStatusResponse, error) + // ListPodSandbox returns a list of PodSandboxes. + ListPodSandbox(ctx context.Context, in *ListPodSandboxRequest, opts ...grpc.CallOption) (*ListPodSandboxResponse, error) + // CreateContainer creates a new container in specified PodSandbox + CreateContainer(ctx context.Context, in *CreateContainerRequest, opts ...grpc.CallOption) (*CreateContainerResponse, error) + // StartContainer starts the container. + StartContainer(ctx context.Context, in *StartContainerRequest, opts ...grpc.CallOption) (*StartContainerResponse, error) + // StopContainer stops a running container with a grace period (i.e., timeout). + // This call is idempotent, and must not return an error if the container has + // already been stopped. + // TODO: what must the runtime do after the grace period is reached? + StopContainer(ctx context.Context, in *StopContainerRequest, opts ...grpc.CallOption) (*StopContainerResponse, error) + // RemoveContainer removes the container. If the container is running, the + // container must be forcibly removed. + // This call is idempotent, and must not return an error if the container has + // already been removed. + RemoveContainer(ctx context.Context, in *RemoveContainerRequest, opts ...grpc.CallOption) (*RemoveContainerResponse, error) + // ListContainers lists all containers by filters. + ListContainers(ctx context.Context, in *ListContainersRequest, opts ...grpc.CallOption) (*ListContainersResponse, error) + // ContainerStatus returns status of the container. If the container is not + // present, returns an error. + ContainerStatus(ctx context.Context, in *ContainerStatusRequest, opts ...grpc.CallOption) (*ContainerStatusResponse, error) + // UpdateContainerResources updates ContainerConfig of the container. + UpdateContainerResources(ctx context.Context, in *UpdateContainerResourcesRequest, opts ...grpc.CallOption) (*UpdateContainerResourcesResponse, error) + // ExecSync runs a command in a container synchronously. + ExecSync(ctx context.Context, in *ExecSyncRequest, opts ...grpc.CallOption) (*ExecSyncResponse, error) + // Exec prepares a streaming endpoint to execute a command in the container. + Exec(ctx context.Context, in *ExecRequest, opts ...grpc.CallOption) (*ExecResponse, error) + // Attach prepares a streaming endpoint to attach to a running container. + Attach(ctx context.Context, in *AttachRequest, opts ...grpc.CallOption) (*AttachResponse, error) + // PortForward prepares a streaming endpoint to forward ports from a PodSandbox. + PortForward(ctx context.Context, in *PortForwardRequest, opts ...grpc.CallOption) (*PortForwardResponse, error) + // ContainerStats returns stats of the container. If the container does not + // exist, the call returns an error. + ContainerStats(ctx context.Context, in *ContainerStatsRequest, opts ...grpc.CallOption) (*ContainerStatsResponse, error) + // ListContainerStats returns stats of all running containers. + ListContainerStats(ctx context.Context, in *ListContainerStatsRequest, opts ...grpc.CallOption) (*ListContainerStatsResponse, error) + // UpdateRuntimeConfig updates the runtime configuration based on the given request. + UpdateRuntimeConfig(ctx context.Context, in *UpdateRuntimeConfigRequest, opts ...grpc.CallOption) (*UpdateRuntimeConfigResponse, error) + // Status returns the status of the runtime. + Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) +} + +type runtimeServiceClient struct { + cc *grpc.ClientConn +} + +func NewRuntimeServiceClient(cc *grpc.ClientConn) RuntimeServiceClient { + return &runtimeServiceClient{cc} +} + +func (c *runtimeServiceClient) Version(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*VersionResponse, error) { + out := new(VersionResponse) + err := grpc.Invoke(ctx, "/runtime.RuntimeService/Version", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runtimeServiceClient) RunPodSandbox(ctx context.Context, in *RunPodSandboxRequest, opts ...grpc.CallOption) (*RunPodSandboxResponse, error) { + out := new(RunPodSandboxResponse) + err := grpc.Invoke(ctx, "/runtime.RuntimeService/RunPodSandbox", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runtimeServiceClient) StopPodSandbox(ctx context.Context, in *StopPodSandboxRequest, opts ...grpc.CallOption) (*StopPodSandboxResponse, error) { + out := new(StopPodSandboxResponse) + err := grpc.Invoke(ctx, "/runtime.RuntimeService/StopPodSandbox", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runtimeServiceClient) RemovePodSandbox(ctx context.Context, in *RemovePodSandboxRequest, opts ...grpc.CallOption) (*RemovePodSandboxResponse, error) { + out := new(RemovePodSandboxResponse) + err := grpc.Invoke(ctx, "/runtime.RuntimeService/RemovePodSandbox", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runtimeServiceClient) PodSandboxStatus(ctx context.Context, in *PodSandboxStatusRequest, opts ...grpc.CallOption) (*PodSandboxStatusResponse, error) { + out := new(PodSandboxStatusResponse) + err := grpc.Invoke(ctx, "/runtime.RuntimeService/PodSandboxStatus", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runtimeServiceClient) ListPodSandbox(ctx context.Context, in *ListPodSandboxRequest, opts ...grpc.CallOption) (*ListPodSandboxResponse, error) { + out := new(ListPodSandboxResponse) + err := grpc.Invoke(ctx, "/runtime.RuntimeService/ListPodSandbox", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runtimeServiceClient) CreateContainer(ctx context.Context, in *CreateContainerRequest, opts ...grpc.CallOption) (*CreateContainerResponse, error) { + out := new(CreateContainerResponse) + err := grpc.Invoke(ctx, "/runtime.RuntimeService/CreateContainer", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runtimeServiceClient) StartContainer(ctx context.Context, in *StartContainerRequest, opts ...grpc.CallOption) (*StartContainerResponse, error) { + out := new(StartContainerResponse) + err := grpc.Invoke(ctx, "/runtime.RuntimeService/StartContainer", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runtimeServiceClient) StopContainer(ctx context.Context, in *StopContainerRequest, opts ...grpc.CallOption) (*StopContainerResponse, error) { + out := new(StopContainerResponse) + err := grpc.Invoke(ctx, "/runtime.RuntimeService/StopContainer", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runtimeServiceClient) RemoveContainer(ctx context.Context, in *RemoveContainerRequest, opts ...grpc.CallOption) (*RemoveContainerResponse, error) { + out := new(RemoveContainerResponse) + err := grpc.Invoke(ctx, "/runtime.RuntimeService/RemoveContainer", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runtimeServiceClient) ListContainers(ctx context.Context, in *ListContainersRequest, opts ...grpc.CallOption) (*ListContainersResponse, error) { + out := new(ListContainersResponse) + err := grpc.Invoke(ctx, "/runtime.RuntimeService/ListContainers", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runtimeServiceClient) ContainerStatus(ctx context.Context, in *ContainerStatusRequest, opts ...grpc.CallOption) (*ContainerStatusResponse, error) { + out := new(ContainerStatusResponse) + err := grpc.Invoke(ctx, "/runtime.RuntimeService/ContainerStatus", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runtimeServiceClient) UpdateContainerResources(ctx context.Context, in *UpdateContainerResourcesRequest, opts ...grpc.CallOption) (*UpdateContainerResourcesResponse, error) { + out := new(UpdateContainerResourcesResponse) + err := grpc.Invoke(ctx, "/runtime.RuntimeService/UpdateContainerResources", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runtimeServiceClient) ExecSync(ctx context.Context, in *ExecSyncRequest, opts ...grpc.CallOption) (*ExecSyncResponse, error) { + out := new(ExecSyncResponse) + err := grpc.Invoke(ctx, "/runtime.RuntimeService/ExecSync", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runtimeServiceClient) Exec(ctx context.Context, in *ExecRequest, opts ...grpc.CallOption) (*ExecResponse, error) { + out := new(ExecResponse) + err := grpc.Invoke(ctx, "/runtime.RuntimeService/Exec", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runtimeServiceClient) Attach(ctx context.Context, in *AttachRequest, opts ...grpc.CallOption) (*AttachResponse, error) { + out := new(AttachResponse) + err := grpc.Invoke(ctx, "/runtime.RuntimeService/Attach", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runtimeServiceClient) PortForward(ctx context.Context, in *PortForwardRequest, opts ...grpc.CallOption) (*PortForwardResponse, error) { + out := new(PortForwardResponse) + err := grpc.Invoke(ctx, "/runtime.RuntimeService/PortForward", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runtimeServiceClient) ContainerStats(ctx context.Context, in *ContainerStatsRequest, opts ...grpc.CallOption) (*ContainerStatsResponse, error) { + out := new(ContainerStatsResponse) + err := grpc.Invoke(ctx, "/runtime.RuntimeService/ContainerStats", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runtimeServiceClient) ListContainerStats(ctx context.Context, in *ListContainerStatsRequest, opts ...grpc.CallOption) (*ListContainerStatsResponse, error) { + out := new(ListContainerStatsResponse) + err := grpc.Invoke(ctx, "/runtime.RuntimeService/ListContainerStats", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runtimeServiceClient) UpdateRuntimeConfig(ctx context.Context, in *UpdateRuntimeConfigRequest, opts ...grpc.CallOption) (*UpdateRuntimeConfigResponse, error) { + out := new(UpdateRuntimeConfigResponse) + err := grpc.Invoke(ctx, "/runtime.RuntimeService/UpdateRuntimeConfig", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runtimeServiceClient) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) { + out := new(StatusResponse) + err := grpc.Invoke(ctx, "/runtime.RuntimeService/Status", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for RuntimeService service + +type RuntimeServiceServer interface { + // Version returns the runtime name, runtime version, and runtime API version. + Version(context.Context, *VersionRequest) (*VersionResponse, error) + // RunPodSandbox creates and starts a pod-level sandbox. Runtimes must ensure + // the sandbox is in the ready state on success. + RunPodSandbox(context.Context, *RunPodSandboxRequest) (*RunPodSandboxResponse, error) + // StopPodSandbox stops any running process that is part of the sandbox and + // reclaims network resources (e.g., IP addresses) allocated to the sandbox. + // If there are any running containers in the sandbox, they must be forcibly + // terminated. + // This call is idempotent, and must not return an error if all relevant + // resources have already been reclaimed. kubelet will call StopPodSandbox + // at least once before calling RemovePodSandbox. It will also attempt to + // reclaim resources eagerly, as soon as a sandbox is not needed. Hence, + // multiple StopPodSandbox calls are expected. + StopPodSandbox(context.Context, *StopPodSandboxRequest) (*StopPodSandboxResponse, error) + // RemovePodSandbox removes the sandbox. If there are any running containers + // in the sandbox, they must be forcibly terminated and removed. + // This call is idempotent, and must not return an error if the sandbox has + // already been removed. + RemovePodSandbox(context.Context, *RemovePodSandboxRequest) (*RemovePodSandboxResponse, error) + // PodSandboxStatus returns the status of the PodSandbox. If the PodSandbox is not + // present, returns an error. + PodSandboxStatus(context.Context, *PodSandboxStatusRequest) (*PodSandboxStatusResponse, error) + // ListPodSandbox returns a list of PodSandboxes. + ListPodSandbox(context.Context, *ListPodSandboxRequest) (*ListPodSandboxResponse, error) + // CreateContainer creates a new container in specified PodSandbox + CreateContainer(context.Context, *CreateContainerRequest) (*CreateContainerResponse, error) + // StartContainer starts the container. + StartContainer(context.Context, *StartContainerRequest) (*StartContainerResponse, error) + // StopContainer stops a running container with a grace period (i.e., timeout). + // This call is idempotent, and must not return an error if the container has + // already been stopped. + // TODO: what must the runtime do after the grace period is reached? + StopContainer(context.Context, *StopContainerRequest) (*StopContainerResponse, error) + // RemoveContainer removes the container. If the container is running, the + // container must be forcibly removed. + // This call is idempotent, and must not return an error if the container has + // already been removed. + RemoveContainer(context.Context, *RemoveContainerRequest) (*RemoveContainerResponse, error) + // ListContainers lists all containers by filters. + ListContainers(context.Context, *ListContainersRequest) (*ListContainersResponse, error) + // ContainerStatus returns status of the container. If the container is not + // present, returns an error. + ContainerStatus(context.Context, *ContainerStatusRequest) (*ContainerStatusResponse, error) + // UpdateContainerResources updates ContainerConfig of the container. + UpdateContainerResources(context.Context, *UpdateContainerResourcesRequest) (*UpdateContainerResourcesResponse, error) + // ExecSync runs a command in a container synchronously. + ExecSync(context.Context, *ExecSyncRequest) (*ExecSyncResponse, error) + // Exec prepares a streaming endpoint to execute a command in the container. + Exec(context.Context, *ExecRequest) (*ExecResponse, error) + // Attach prepares a streaming endpoint to attach to a running container. + Attach(context.Context, *AttachRequest) (*AttachResponse, error) + // PortForward prepares a streaming endpoint to forward ports from a PodSandbox. + PortForward(context.Context, *PortForwardRequest) (*PortForwardResponse, error) + // ContainerStats returns stats of the container. If the container does not + // exist, the call returns an error. + ContainerStats(context.Context, *ContainerStatsRequest) (*ContainerStatsResponse, error) + // ListContainerStats returns stats of all running containers. + ListContainerStats(context.Context, *ListContainerStatsRequest) (*ListContainerStatsResponse, error) + // UpdateRuntimeConfig updates the runtime configuration based on the given request. + UpdateRuntimeConfig(context.Context, *UpdateRuntimeConfigRequest) (*UpdateRuntimeConfigResponse, error) + // Status returns the status of the runtime. + Status(context.Context, *StatusRequest) (*StatusResponse, error) +} + +func RegisterRuntimeServiceServer(s *grpc.Server, srv RuntimeServiceServer) { + s.RegisterService(&_RuntimeService_serviceDesc, srv) +} + +func _RuntimeService_Version_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeServiceServer).Version(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/runtime.RuntimeService/Version", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeServiceServer).Version(ctx, req.(*VersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RuntimeService_RunPodSandbox_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RunPodSandboxRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeServiceServer).RunPodSandbox(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/runtime.RuntimeService/RunPodSandbox", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeServiceServer).RunPodSandbox(ctx, req.(*RunPodSandboxRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RuntimeService_StopPodSandbox_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StopPodSandboxRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeServiceServer).StopPodSandbox(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/runtime.RuntimeService/StopPodSandbox", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeServiceServer).StopPodSandbox(ctx, req.(*StopPodSandboxRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RuntimeService_RemovePodSandbox_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemovePodSandboxRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeServiceServer).RemovePodSandbox(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/runtime.RuntimeService/RemovePodSandbox", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeServiceServer).RemovePodSandbox(ctx, req.(*RemovePodSandboxRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RuntimeService_PodSandboxStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PodSandboxStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeServiceServer).PodSandboxStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/runtime.RuntimeService/PodSandboxStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeServiceServer).PodSandboxStatus(ctx, req.(*PodSandboxStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RuntimeService_ListPodSandbox_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPodSandboxRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeServiceServer).ListPodSandbox(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/runtime.RuntimeService/ListPodSandbox", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeServiceServer).ListPodSandbox(ctx, req.(*ListPodSandboxRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RuntimeService_CreateContainer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateContainerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeServiceServer).CreateContainer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/runtime.RuntimeService/CreateContainer", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeServiceServer).CreateContainer(ctx, req.(*CreateContainerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RuntimeService_StartContainer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StartContainerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeServiceServer).StartContainer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/runtime.RuntimeService/StartContainer", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeServiceServer).StartContainer(ctx, req.(*StartContainerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RuntimeService_StopContainer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StopContainerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeServiceServer).StopContainer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/runtime.RuntimeService/StopContainer", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeServiceServer).StopContainer(ctx, req.(*StopContainerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RuntimeService_RemoveContainer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemoveContainerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeServiceServer).RemoveContainer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/runtime.RuntimeService/RemoveContainer", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeServiceServer).RemoveContainer(ctx, req.(*RemoveContainerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RuntimeService_ListContainers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListContainersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeServiceServer).ListContainers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/runtime.RuntimeService/ListContainers", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeServiceServer).ListContainers(ctx, req.(*ListContainersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RuntimeService_ContainerStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ContainerStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeServiceServer).ContainerStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/runtime.RuntimeService/ContainerStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeServiceServer).ContainerStatus(ctx, req.(*ContainerStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RuntimeService_UpdateContainerResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateContainerResourcesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeServiceServer).UpdateContainerResources(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/runtime.RuntimeService/UpdateContainerResources", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeServiceServer).UpdateContainerResources(ctx, req.(*UpdateContainerResourcesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RuntimeService_ExecSync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExecSyncRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeServiceServer).ExecSync(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/runtime.RuntimeService/ExecSync", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeServiceServer).ExecSync(ctx, req.(*ExecSyncRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RuntimeService_Exec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExecRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeServiceServer).Exec(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/runtime.RuntimeService/Exec", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeServiceServer).Exec(ctx, req.(*ExecRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RuntimeService_Attach_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AttachRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeServiceServer).Attach(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/runtime.RuntimeService/Attach", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeServiceServer).Attach(ctx, req.(*AttachRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RuntimeService_PortForward_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PortForwardRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeServiceServer).PortForward(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/runtime.RuntimeService/PortForward", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeServiceServer).PortForward(ctx, req.(*PortForwardRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RuntimeService_ContainerStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ContainerStatsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeServiceServer).ContainerStats(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/runtime.RuntimeService/ContainerStats", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeServiceServer).ContainerStats(ctx, req.(*ContainerStatsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RuntimeService_ListContainerStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListContainerStatsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeServiceServer).ListContainerStats(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/runtime.RuntimeService/ListContainerStats", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeServiceServer).ListContainerStats(ctx, req.(*ListContainerStatsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RuntimeService_UpdateRuntimeConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateRuntimeConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeServiceServer).UpdateRuntimeConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/runtime.RuntimeService/UpdateRuntimeConfig", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeServiceServer).UpdateRuntimeConfig(ctx, req.(*UpdateRuntimeConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RuntimeService_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeServiceServer).Status(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/runtime.RuntimeService/Status", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeServiceServer).Status(ctx, req.(*StatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _RuntimeService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "runtime.RuntimeService", + HandlerType: (*RuntimeServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Version", + Handler: _RuntimeService_Version_Handler, + }, + { + MethodName: "RunPodSandbox", + Handler: _RuntimeService_RunPodSandbox_Handler, + }, + { + MethodName: "StopPodSandbox", + Handler: _RuntimeService_StopPodSandbox_Handler, + }, + { + MethodName: "RemovePodSandbox", + Handler: _RuntimeService_RemovePodSandbox_Handler, + }, + { + MethodName: "PodSandboxStatus", + Handler: _RuntimeService_PodSandboxStatus_Handler, + }, + { + MethodName: "ListPodSandbox", + Handler: _RuntimeService_ListPodSandbox_Handler, + }, + { + MethodName: "CreateContainer", + Handler: _RuntimeService_CreateContainer_Handler, + }, + { + MethodName: "StartContainer", + Handler: _RuntimeService_StartContainer_Handler, + }, + { + MethodName: "StopContainer", + Handler: _RuntimeService_StopContainer_Handler, + }, + { + MethodName: "RemoveContainer", + Handler: _RuntimeService_RemoveContainer_Handler, + }, + { + MethodName: "ListContainers", + Handler: _RuntimeService_ListContainers_Handler, + }, + { + MethodName: "ContainerStatus", + Handler: _RuntimeService_ContainerStatus_Handler, + }, + { + MethodName: "UpdateContainerResources", + Handler: _RuntimeService_UpdateContainerResources_Handler, + }, + { + MethodName: "ExecSync", + Handler: _RuntimeService_ExecSync_Handler, + }, + { + MethodName: "Exec", + Handler: _RuntimeService_Exec_Handler, + }, + { + MethodName: "Attach", + Handler: _RuntimeService_Attach_Handler, + }, + { + MethodName: "PortForward", + Handler: _RuntimeService_PortForward_Handler, + }, + { + MethodName: "ContainerStats", + Handler: _RuntimeService_ContainerStats_Handler, + }, + { + MethodName: "ListContainerStats", + Handler: _RuntimeService_ListContainerStats_Handler, + }, + { + MethodName: "UpdateRuntimeConfig", + Handler: _RuntimeService_UpdateRuntimeConfig_Handler, + }, + { + MethodName: "Status", + Handler: _RuntimeService_Status_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "api.proto", +} + +// Client API for ImageService service + +type ImageServiceClient interface { + // ListImages lists existing images. + ListImages(ctx context.Context, in *ListImagesRequest, opts ...grpc.CallOption) (*ListImagesResponse, error) + // ImageStatus returns the status of the image. If the image is not + // present, returns a response with ImageStatusResponse.Image set to + // nil. + ImageStatus(ctx context.Context, in *ImageStatusRequest, opts ...grpc.CallOption) (*ImageStatusResponse, error) + // PullImage pulls an image with authentication config. + PullImage(ctx context.Context, in *PullImageRequest, opts ...grpc.CallOption) (*PullImageResponse, error) + // RemoveImage removes the image. + // This call is idempotent, and must not return an error if the image has + // already been removed. + RemoveImage(ctx context.Context, in *RemoveImageRequest, opts ...grpc.CallOption) (*RemoveImageResponse, error) + // ImageFSInfo returns information of the filesystem that is used to store images. + ImageFsInfo(ctx context.Context, in *ImageFsInfoRequest, opts ...grpc.CallOption) (*ImageFsInfoResponse, error) +} + +type imageServiceClient struct { + cc *grpc.ClientConn +} + +func NewImageServiceClient(cc *grpc.ClientConn) ImageServiceClient { + return &imageServiceClient{cc} +} + +func (c *imageServiceClient) ListImages(ctx context.Context, in *ListImagesRequest, opts ...grpc.CallOption) (*ListImagesResponse, error) { + out := new(ListImagesResponse) + err := grpc.Invoke(ctx, "/runtime.ImageService/ListImages", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *imageServiceClient) ImageStatus(ctx context.Context, in *ImageStatusRequest, opts ...grpc.CallOption) (*ImageStatusResponse, error) { + out := new(ImageStatusResponse) + err := grpc.Invoke(ctx, "/runtime.ImageService/ImageStatus", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *imageServiceClient) PullImage(ctx context.Context, in *PullImageRequest, opts ...grpc.CallOption) (*PullImageResponse, error) { + out := new(PullImageResponse) + err := grpc.Invoke(ctx, "/runtime.ImageService/PullImage", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *imageServiceClient) RemoveImage(ctx context.Context, in *RemoveImageRequest, opts ...grpc.CallOption) (*RemoveImageResponse, error) { + out := new(RemoveImageResponse) + err := grpc.Invoke(ctx, "/runtime.ImageService/RemoveImage", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *imageServiceClient) ImageFsInfo(ctx context.Context, in *ImageFsInfoRequest, opts ...grpc.CallOption) (*ImageFsInfoResponse, error) { + out := new(ImageFsInfoResponse) + err := grpc.Invoke(ctx, "/runtime.ImageService/ImageFsInfo", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for ImageService service + +type ImageServiceServer interface { + // ListImages lists existing images. + ListImages(context.Context, *ListImagesRequest) (*ListImagesResponse, error) + // ImageStatus returns the status of the image. If the image is not + // present, returns a response with ImageStatusResponse.Image set to + // nil. + ImageStatus(context.Context, *ImageStatusRequest) (*ImageStatusResponse, error) + // PullImage pulls an image with authentication config. + PullImage(context.Context, *PullImageRequest) (*PullImageResponse, error) + // RemoveImage removes the image. + // This call is idempotent, and must not return an error if the image has + // already been removed. + RemoveImage(context.Context, *RemoveImageRequest) (*RemoveImageResponse, error) + // ImageFSInfo returns information of the filesystem that is used to store images. + ImageFsInfo(context.Context, *ImageFsInfoRequest) (*ImageFsInfoResponse, error) +} + +func RegisterImageServiceServer(s *grpc.Server, srv ImageServiceServer) { + s.RegisterService(&_ImageService_serviceDesc, srv) +} + +func _ImageService_ListImages_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListImagesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ImageServiceServer).ListImages(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/runtime.ImageService/ListImages", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ImageServiceServer).ListImages(ctx, req.(*ListImagesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ImageService_ImageStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ImageStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ImageServiceServer).ImageStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/runtime.ImageService/ImageStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ImageServiceServer).ImageStatus(ctx, req.(*ImageStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ImageService_PullImage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PullImageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ImageServiceServer).PullImage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/runtime.ImageService/PullImage", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ImageServiceServer).PullImage(ctx, req.(*PullImageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ImageService_RemoveImage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemoveImageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ImageServiceServer).RemoveImage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/runtime.ImageService/RemoveImage", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ImageServiceServer).RemoveImage(ctx, req.(*RemoveImageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ImageService_ImageFsInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ImageFsInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ImageServiceServer).ImageFsInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/runtime.ImageService/ImageFsInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ImageServiceServer).ImageFsInfo(ctx, req.(*ImageFsInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _ImageService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "runtime.ImageService", + HandlerType: (*ImageServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListImages", + Handler: _ImageService_ListImages_Handler, + }, + { + MethodName: "ImageStatus", + Handler: _ImageService_ImageStatus_Handler, + }, + { + MethodName: "PullImage", + Handler: _ImageService_PullImage_Handler, + }, + { + MethodName: "RemoveImage", + Handler: _ImageService_RemoveImage_Handler, + }, + { + MethodName: "ImageFsInfo", + Handler: _ImageService_ImageFsInfo_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "api.proto", +} + +func (m *VersionRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VersionRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Version) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Version))) + i += copy(dAtA[i:], m.Version) + } + return i, nil +} + +func (m *VersionResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VersionResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Version) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Version))) + i += copy(dAtA[i:], m.Version) + } + if len(m.RuntimeName) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.RuntimeName))) + i += copy(dAtA[i:], m.RuntimeName) + } + if len(m.RuntimeVersion) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.RuntimeVersion))) + i += copy(dAtA[i:], m.RuntimeVersion) + } + if len(m.RuntimeApiVersion) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.RuntimeApiVersion))) + i += copy(dAtA[i:], m.RuntimeApiVersion) + } + return i, nil +} + +func (m *DNSConfig) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DNSConfig) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Servers) > 0 { + for _, s := range m.Servers { + dAtA[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if len(m.Searches) > 0 { + for _, s := range m.Searches { + dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if len(m.Options) > 0 { + for _, s := range m.Options { + dAtA[i] = 0x1a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + return i, nil +} + +func (m *PortMapping) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PortMapping) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Protocol != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Protocol)) + } + if m.ContainerPort != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.ContainerPort)) + } + if m.HostPort != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.HostPort)) + } + if len(m.HostIp) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.HostIp))) + i += copy(dAtA[i:], m.HostIp) + } + return i, nil +} + +func (m *Mount) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Mount) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ContainerPath) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerPath))) + i += copy(dAtA[i:], m.ContainerPath) + } + if len(m.HostPath) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.HostPath))) + i += copy(dAtA[i:], m.HostPath) + } + if m.Readonly { + dAtA[i] = 0x18 + i++ + if m.Readonly { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.SelinuxRelabel { + dAtA[i] = 0x20 + i++ + if m.SelinuxRelabel { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Propagation != 0 { + dAtA[i] = 0x28 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Propagation)) + } + return i, nil +} + +func (m *NamespaceOption) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NamespaceOption) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.HostNetwork { + dAtA[i] = 0x8 + i++ + if m.HostNetwork { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.HostPid { + dAtA[i] = 0x10 + i++ + if m.HostPid { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.HostIpc { + dAtA[i] = 0x18 + i++ + if m.HostIpc { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *Int64Value) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Int64Value) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Value != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Value)) + } + return i, nil +} + +func (m *LinuxSandboxSecurityContext) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LinuxSandboxSecurityContext) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NamespaceOptions != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(m.NamespaceOptions.Size())) + n1, err := m.NamespaceOptions.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if m.SelinuxOptions != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.SelinuxOptions.Size())) + n2, err := m.SelinuxOptions.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if m.RunAsUser != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintApi(dAtA, i, uint64(m.RunAsUser.Size())) + n3, err := m.RunAsUser.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if m.ReadonlyRootfs { + dAtA[i] = 0x20 + i++ + if m.ReadonlyRootfs { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if len(m.SupplementalGroups) > 0 { + dAtA5 := make([]byte, len(m.SupplementalGroups)*10) + var j4 int + for _, num1 := range m.SupplementalGroups { + num := uint64(num1) + for num >= 1<<7 { + dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j4++ + } + dAtA5[j4] = uint8(num) + j4++ + } + dAtA[i] = 0x2a + i++ + i = encodeVarintApi(dAtA, i, uint64(j4)) + i += copy(dAtA[i:], dAtA5[:j4]) + } + if m.Privileged { + dAtA[i] = 0x30 + i++ + if m.Privileged { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if len(m.SeccompProfilePath) > 0 { + dAtA[i] = 0x3a + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.SeccompProfilePath))) + i += copy(dAtA[i:], m.SeccompProfilePath) + } + return i, nil +} + +func (m *LinuxPodSandboxConfig) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LinuxPodSandboxConfig) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.CgroupParent) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.CgroupParent))) + i += copy(dAtA[i:], m.CgroupParent) + } + if m.SecurityContext != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.SecurityContext.Size())) + n6, err := m.SecurityContext.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + } + if len(m.Sysctls) > 0 { + for k := range m.Sysctls { + dAtA[i] = 0x1a + i++ + v := m.Sysctls[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + return i, nil +} + +func (m *PodSandboxMetadata) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PodSandboxMetadata) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if len(m.Uid) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Uid))) + i += copy(dAtA[i:], m.Uid) + } + if len(m.Namespace) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Namespace))) + i += copy(dAtA[i:], m.Namespace) + } + if m.Attempt != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Attempt)) + } + return i, nil +} + +func (m *PodSandboxConfig) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PodSandboxConfig) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Metadata != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Metadata.Size())) + n7, err := m.Metadata.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + } + if len(m.Hostname) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Hostname))) + i += copy(dAtA[i:], m.Hostname) + } + if len(m.LogDirectory) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.LogDirectory))) + i += copy(dAtA[i:], m.LogDirectory) + } + if m.DnsConfig != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.DnsConfig.Size())) + n8, err := m.DnsConfig.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n8 + } + if len(m.PortMappings) > 0 { + for _, msg := range m.PortMappings { + dAtA[i] = 0x2a + i++ + i = encodeVarintApi(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Labels) > 0 { + for k := range m.Labels { + dAtA[i] = 0x32 + i++ + v := m.Labels[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.Annotations) > 0 { + for k := range m.Annotations { + dAtA[i] = 0x3a + i++ + v := m.Annotations[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if m.Linux != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Linux.Size())) + n9, err := m.Linux.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n9 + } + return i, nil +} + +func (m *RunPodSandboxRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RunPodSandboxRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Config != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Config.Size())) + n10, err := m.Config.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n10 + } + return i, nil +} + +func (m *RunPodSandboxResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RunPodSandboxResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.PodSandboxId) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.PodSandboxId))) + i += copy(dAtA[i:], m.PodSandboxId) + } + return i, nil +} + +func (m *StopPodSandboxRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StopPodSandboxRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.PodSandboxId) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.PodSandboxId))) + i += copy(dAtA[i:], m.PodSandboxId) + } + return i, nil +} + +func (m *StopPodSandboxResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StopPodSandboxResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *RemovePodSandboxRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RemovePodSandboxRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.PodSandboxId) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.PodSandboxId))) + i += copy(dAtA[i:], m.PodSandboxId) + } + return i, nil +} + +func (m *RemovePodSandboxResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RemovePodSandboxResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *PodSandboxStatusRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PodSandboxStatusRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.PodSandboxId) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.PodSandboxId))) + i += copy(dAtA[i:], m.PodSandboxId) + } + return i, nil +} + +func (m *PodSandboxNetworkStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PodSandboxNetworkStatus) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Ip) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Ip))) + i += copy(dAtA[i:], m.Ip) + } + return i, nil +} + +func (m *Namespace) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Namespace) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Options != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Options.Size())) + n11, err := m.Options.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n11 + } + return i, nil +} + +func (m *LinuxPodSandboxStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LinuxPodSandboxStatus) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Namespaces != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Namespaces.Size())) + n12, err := m.Namespaces.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n12 + } + return i, nil +} + +func (m *PodSandboxStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PodSandboxStatus) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + if m.Metadata != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Metadata.Size())) + n13, err := m.Metadata.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n13 + } + if m.State != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.State)) + } + if m.CreatedAt != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.CreatedAt)) + } + if m.Network != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Network.Size())) + n14, err := m.Network.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n14 + } + if m.Linux != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Linux.Size())) + n15, err := m.Linux.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n15 + } + if len(m.Labels) > 0 { + for k := range m.Labels { + dAtA[i] = 0x3a + i++ + v := m.Labels[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.Annotations) > 0 { + for k := range m.Annotations { + dAtA[i] = 0x42 + i++ + v := m.Annotations[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + return i, nil +} + +func (m *PodSandboxStatusResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PodSandboxStatusResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Status != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Status.Size())) + n16, err := m.Status.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n16 + } + return i, nil +} + +func (m *PodSandboxStateValue) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PodSandboxStateValue) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.State != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.State)) + } + return i, nil +} + +func (m *PodSandboxFilter) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PodSandboxFilter) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + if m.State != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.State.Size())) + n17, err := m.State.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n17 + } + if len(m.LabelSelector) > 0 { + for k := range m.LabelSelector { + dAtA[i] = 0x1a + i++ + v := m.LabelSelector[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + return i, nil +} + +func (m *ListPodSandboxRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListPodSandboxRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Filter != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Filter.Size())) + n18, err := m.Filter.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n18 + } + return i, nil +} + +func (m *PodSandbox) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PodSandbox) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + if m.Metadata != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Metadata.Size())) + n19, err := m.Metadata.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n19 + } + if m.State != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.State)) + } + if m.CreatedAt != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.CreatedAt)) + } + if len(m.Labels) > 0 { + for k := range m.Labels { + dAtA[i] = 0x2a + i++ + v := m.Labels[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.Annotations) > 0 { + for k := range m.Annotations { + dAtA[i] = 0x32 + i++ + v := m.Annotations[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + return i, nil +} + +func (m *ListPodSandboxResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListPodSandboxResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for _, msg := range m.Items { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ImageSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ImageSpec) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Image) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Image))) + i += copy(dAtA[i:], m.Image) + } + return i, nil +} + +func (m *KeyValue) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *KeyValue) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Key) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Key))) + i += copy(dAtA[i:], m.Key) + } + if len(m.Value) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Value))) + i += copy(dAtA[i:], m.Value) + } + return i, nil +} + +func (m *LinuxContainerResources) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LinuxContainerResources) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.CpuPeriod != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.CpuPeriod)) + } + if m.CpuQuota != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.CpuQuota)) + } + if m.CpuShares != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.CpuShares)) + } + if m.MemoryLimitInBytes != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.MemoryLimitInBytes)) + } + if m.OomScoreAdj != 0 { + dAtA[i] = 0x28 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.OomScoreAdj)) + } + if len(m.CpusetCpus) > 0 { + dAtA[i] = 0x32 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.CpusetCpus))) + i += copy(dAtA[i:], m.CpusetCpus) + } + if len(m.CpusetMems) > 0 { + dAtA[i] = 0x3a + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.CpusetMems))) + i += copy(dAtA[i:], m.CpusetMems) + } + return i, nil +} + +func (m *SELinuxOption) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SELinuxOption) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.User) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.User))) + i += copy(dAtA[i:], m.User) + } + if len(m.Role) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Role))) + i += copy(dAtA[i:], m.Role) + } + if len(m.Type) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Type))) + i += copy(dAtA[i:], m.Type) + } + if len(m.Level) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Level))) + i += copy(dAtA[i:], m.Level) + } + return i, nil +} + +func (m *Capability) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Capability) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.AddCapabilities) > 0 { + for _, s := range m.AddCapabilities { + dAtA[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if len(m.DropCapabilities) > 0 { + for _, s := range m.DropCapabilities { + dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + return i, nil +} + +func (m *LinuxContainerSecurityContext) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LinuxContainerSecurityContext) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Capabilities != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Capabilities.Size())) + n20, err := m.Capabilities.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n20 + } + if m.Privileged { + dAtA[i] = 0x10 + i++ + if m.Privileged { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.NamespaceOptions != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintApi(dAtA, i, uint64(m.NamespaceOptions.Size())) + n21, err := m.NamespaceOptions.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n21 + } + if m.SelinuxOptions != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.SelinuxOptions.Size())) + n22, err := m.SelinuxOptions.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n22 + } + if m.RunAsUser != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintApi(dAtA, i, uint64(m.RunAsUser.Size())) + n23, err := m.RunAsUser.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n23 + } + if len(m.RunAsUsername) > 0 { + dAtA[i] = 0x32 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.RunAsUsername))) + i += copy(dAtA[i:], m.RunAsUsername) + } + if m.ReadonlyRootfs { + dAtA[i] = 0x38 + i++ + if m.ReadonlyRootfs { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if len(m.SupplementalGroups) > 0 { + dAtA25 := make([]byte, len(m.SupplementalGroups)*10) + var j24 int + for _, num1 := range m.SupplementalGroups { + num := uint64(num1) + for num >= 1<<7 { + dAtA25[j24] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j24++ + } + dAtA25[j24] = uint8(num) + j24++ + } + dAtA[i] = 0x42 + i++ + i = encodeVarintApi(dAtA, i, uint64(j24)) + i += copy(dAtA[i:], dAtA25[:j24]) + } + if len(m.ApparmorProfile) > 0 { + dAtA[i] = 0x4a + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.ApparmorProfile))) + i += copy(dAtA[i:], m.ApparmorProfile) + } + if len(m.SeccompProfilePath) > 0 { + dAtA[i] = 0x52 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.SeccompProfilePath))) + i += copy(dAtA[i:], m.SeccompProfilePath) + } + if m.NoNewPrivs { + dAtA[i] = 0x58 + i++ + if m.NoNewPrivs { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *LinuxContainerConfig) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LinuxContainerConfig) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Resources != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Resources.Size())) + n26, err := m.Resources.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n26 + } + if m.SecurityContext != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.SecurityContext.Size())) + n27, err := m.SecurityContext.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n27 + } + return i, nil +} + +func (m *ContainerMetadata) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContainerMetadata) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if m.Attempt != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Attempt)) + } + return i, nil +} + +func (m *Device) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Device) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ContainerPath) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerPath))) + i += copy(dAtA[i:], m.ContainerPath) + } + if len(m.HostPath) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.HostPath))) + i += copy(dAtA[i:], m.HostPath) + } + if len(m.Permissions) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Permissions))) + i += copy(dAtA[i:], m.Permissions) + } + return i, nil +} + +func (m *ContainerConfig) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContainerConfig) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Metadata != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Metadata.Size())) + n28, err := m.Metadata.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n28 + } + if m.Image != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Image.Size())) + n29, err := m.Image.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n29 + } + if len(m.Command) > 0 { + for _, s := range m.Command { + dAtA[i] = 0x1a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if len(m.Args) > 0 { + for _, s := range m.Args { + dAtA[i] = 0x22 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if len(m.WorkingDir) > 0 { + dAtA[i] = 0x2a + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.WorkingDir))) + i += copy(dAtA[i:], m.WorkingDir) + } + if len(m.Envs) > 0 { + for _, msg := range m.Envs { + dAtA[i] = 0x32 + i++ + i = encodeVarintApi(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Mounts) > 0 { + for _, msg := range m.Mounts { + dAtA[i] = 0x3a + i++ + i = encodeVarintApi(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Devices) > 0 { + for _, msg := range m.Devices { + dAtA[i] = 0x42 + i++ + i = encodeVarintApi(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Labels) > 0 { + for k := range m.Labels { + dAtA[i] = 0x4a + i++ + v := m.Labels[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.Annotations) > 0 { + for k := range m.Annotations { + dAtA[i] = 0x52 + i++ + v := m.Annotations[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.LogPath) > 0 { + dAtA[i] = 0x5a + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.LogPath))) + i += copy(dAtA[i:], m.LogPath) + } + if m.Stdin { + dAtA[i] = 0x60 + i++ + if m.Stdin { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.StdinOnce { + dAtA[i] = 0x68 + i++ + if m.StdinOnce { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Tty { + dAtA[i] = 0x70 + i++ + if m.Tty { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Linux != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Linux.Size())) + n30, err := m.Linux.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n30 + } + return i, nil +} + +func (m *CreateContainerRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CreateContainerRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.PodSandboxId) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.PodSandboxId))) + i += copy(dAtA[i:], m.PodSandboxId) + } + if m.Config != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Config.Size())) + n31, err := m.Config.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n31 + } + if m.SandboxConfig != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintApi(dAtA, i, uint64(m.SandboxConfig.Size())) + n32, err := m.SandboxConfig.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n32 + } + return i, nil +} + +func (m *CreateContainerResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CreateContainerResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ContainerId) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerId))) + i += copy(dAtA[i:], m.ContainerId) + } + return i, nil +} + +func (m *StartContainerRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StartContainerRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ContainerId) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerId))) + i += copy(dAtA[i:], m.ContainerId) + } + return i, nil +} + +func (m *StartContainerResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StartContainerResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *StopContainerRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StopContainerRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ContainerId) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerId))) + i += copy(dAtA[i:], m.ContainerId) + } + if m.Timeout != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Timeout)) + } + return i, nil +} + +func (m *StopContainerResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StopContainerResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *RemoveContainerRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RemoveContainerRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ContainerId) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerId))) + i += copy(dAtA[i:], m.ContainerId) + } + return i, nil +} + +func (m *RemoveContainerResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RemoveContainerResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *ContainerStateValue) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContainerStateValue) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.State != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.State)) + } + return i, nil +} + +func (m *ContainerFilter) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContainerFilter) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + if m.State != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.State.Size())) + n33, err := m.State.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n33 + } + if len(m.PodSandboxId) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.PodSandboxId))) + i += copy(dAtA[i:], m.PodSandboxId) + } + if len(m.LabelSelector) > 0 { + for k := range m.LabelSelector { + dAtA[i] = 0x22 + i++ + v := m.LabelSelector[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + return i, nil +} + +func (m *ListContainersRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListContainersRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Filter != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Filter.Size())) + n34, err := m.Filter.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n34 + } + return i, nil +} + +func (m *Container) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Container) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + if len(m.PodSandboxId) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.PodSandboxId))) + i += copy(dAtA[i:], m.PodSandboxId) + } + if m.Metadata != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Metadata.Size())) + n35, err := m.Metadata.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n35 + } + if m.Image != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Image.Size())) + n36, err := m.Image.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n36 + } + if len(m.ImageRef) > 0 { + dAtA[i] = 0x2a + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.ImageRef))) + i += copy(dAtA[i:], m.ImageRef) + } + if m.State != 0 { + dAtA[i] = 0x30 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.State)) + } + if m.CreatedAt != 0 { + dAtA[i] = 0x38 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.CreatedAt)) + } + if len(m.Labels) > 0 { + for k := range m.Labels { + dAtA[i] = 0x42 + i++ + v := m.Labels[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.Annotations) > 0 { + for k := range m.Annotations { + dAtA[i] = 0x4a + i++ + v := m.Annotations[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + return i, nil +} + +func (m *ListContainersResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListContainersResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Containers) > 0 { + for _, msg := range m.Containers { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ContainerStatusRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContainerStatusRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ContainerId) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerId))) + i += copy(dAtA[i:], m.ContainerId) + } + return i, nil +} + +func (m *ContainerStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContainerStatus) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + if m.Metadata != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Metadata.Size())) + n37, err := m.Metadata.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n37 + } + if m.State != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.State)) + } + if m.CreatedAt != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.CreatedAt)) + } + if m.StartedAt != 0 { + dAtA[i] = 0x28 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.StartedAt)) + } + if m.FinishedAt != 0 { + dAtA[i] = 0x30 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.FinishedAt)) + } + if m.ExitCode != 0 { + dAtA[i] = 0x38 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.ExitCode)) + } + if m.Image != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Image.Size())) + n38, err := m.Image.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n38 + } + if len(m.ImageRef) > 0 { + dAtA[i] = 0x4a + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.ImageRef))) + i += copy(dAtA[i:], m.ImageRef) + } + if len(m.Reason) > 0 { + dAtA[i] = 0x52 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Reason))) + i += copy(dAtA[i:], m.Reason) + } + if len(m.Message) > 0 { + dAtA[i] = 0x5a + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Message))) + i += copy(dAtA[i:], m.Message) + } + if len(m.Labels) > 0 { + for k := range m.Labels { + dAtA[i] = 0x62 + i++ + v := m.Labels[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.Annotations) > 0 { + for k := range m.Annotations { + dAtA[i] = 0x6a + i++ + v := m.Annotations[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.Mounts) > 0 { + for _, msg := range m.Mounts { + dAtA[i] = 0x72 + i++ + i = encodeVarintApi(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.LogPath) > 0 { + dAtA[i] = 0x7a + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.LogPath))) + i += copy(dAtA[i:], m.LogPath) + } + return i, nil +} + +func (m *ContainerStatusResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContainerStatusResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Status != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Status.Size())) + n39, err := m.Status.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n39 + } + return i, nil +} + +func (m *UpdateContainerResourcesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UpdateContainerResourcesRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ContainerId) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerId))) + i += copy(dAtA[i:], m.ContainerId) + } + if m.Linux != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Linux.Size())) + n40, err := m.Linux.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n40 + } + return i, nil +} + +func (m *UpdateContainerResourcesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UpdateContainerResourcesResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *ExecSyncRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExecSyncRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ContainerId) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerId))) + i += copy(dAtA[i:], m.ContainerId) + } + if len(m.Cmd) > 0 { + for _, s := range m.Cmd { + dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if m.Timeout != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Timeout)) + } + return i, nil +} + +func (m *ExecSyncResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExecSyncResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Stdout) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Stdout))) + i += copy(dAtA[i:], m.Stdout) + } + if len(m.Stderr) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Stderr))) + i += copy(dAtA[i:], m.Stderr) + } + if m.ExitCode != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.ExitCode)) + } + return i, nil +} + +func (m *ExecRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExecRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ContainerId) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerId))) + i += copy(dAtA[i:], m.ContainerId) + } + if len(m.Cmd) > 0 { + for _, s := range m.Cmd { + dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if m.Tty { + dAtA[i] = 0x18 + i++ + if m.Tty { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Stdin { + dAtA[i] = 0x20 + i++ + if m.Stdin { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *ExecResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExecResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Url) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Url))) + i += copy(dAtA[i:], m.Url) + } + return i, nil +} + +func (m *AttachRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AttachRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ContainerId) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerId))) + i += copy(dAtA[i:], m.ContainerId) + } + if m.Stdin { + dAtA[i] = 0x10 + i++ + if m.Stdin { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Tty { + dAtA[i] = 0x18 + i++ + if m.Tty { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *AttachResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AttachResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Url) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Url))) + i += copy(dAtA[i:], m.Url) + } + return i, nil +} + +func (m *PortForwardRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PortForwardRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.PodSandboxId) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.PodSandboxId))) + i += copy(dAtA[i:], m.PodSandboxId) + } + if len(m.Port) > 0 { + dAtA42 := make([]byte, len(m.Port)*10) + var j41 int + for _, num1 := range m.Port { + num := uint64(num1) + for num >= 1<<7 { + dAtA42[j41] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j41++ + } + dAtA42[j41] = uint8(num) + j41++ + } + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(j41)) + i += copy(dAtA[i:], dAtA42[:j41]) + } + return i, nil +} + +func (m *PortForwardResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PortForwardResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Url) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Url))) + i += copy(dAtA[i:], m.Url) + } + return i, nil +} + +func (m *ImageFilter) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ImageFilter) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Image != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Image.Size())) + n43, err := m.Image.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n43 + } + return i, nil +} + +func (m *ListImagesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListImagesRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Filter != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Filter.Size())) + n44, err := m.Filter.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n44 + } + return i, nil +} + +func (m *Image) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Image) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + if len(m.RepoTags) > 0 { + for _, s := range m.RepoTags { + dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if len(m.RepoDigests) > 0 { + for _, s := range m.RepoDigests { + dAtA[i] = 0x1a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if m.Size_ != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Size_)) + } + if m.Uid != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Uid.Size())) + n45, err := m.Uid.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n45 + } + if len(m.Username) > 0 { + dAtA[i] = 0x32 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Username))) + i += copy(dAtA[i:], m.Username) + } + return i, nil +} + +func (m *ListImagesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListImagesResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Images) > 0 { + for _, msg := range m.Images { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ImageStatusRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ImageStatusRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Image != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Image.Size())) + n46, err := m.Image.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n46 + } + return i, nil +} + +func (m *ImageStatusResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ImageStatusResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Image != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Image.Size())) + n47, err := m.Image.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n47 + } + return i, nil +} + +func (m *AuthConfig) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AuthConfig) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Username) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Username))) + i += copy(dAtA[i:], m.Username) + } + if len(m.Password) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Password))) + i += copy(dAtA[i:], m.Password) + } + if len(m.Auth) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Auth))) + i += copy(dAtA[i:], m.Auth) + } + if len(m.ServerAddress) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.ServerAddress))) + i += copy(dAtA[i:], m.ServerAddress) + } + if len(m.IdentityToken) > 0 { + dAtA[i] = 0x2a + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.IdentityToken))) + i += copy(dAtA[i:], m.IdentityToken) + } + if len(m.RegistryToken) > 0 { + dAtA[i] = 0x32 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.RegistryToken))) + i += copy(dAtA[i:], m.RegistryToken) + } + return i, nil +} + +func (m *PullImageRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PullImageRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Image != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Image.Size())) + n48, err := m.Image.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n48 + } + if m.Auth != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Auth.Size())) + n49, err := m.Auth.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n49 + } + if m.SandboxConfig != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintApi(dAtA, i, uint64(m.SandboxConfig.Size())) + n50, err := m.SandboxConfig.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n50 + } + return i, nil +} + +func (m *PullImageResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PullImageResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ImageRef) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.ImageRef))) + i += copy(dAtA[i:], m.ImageRef) + } + return i, nil +} + +func (m *RemoveImageRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RemoveImageRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Image != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Image.Size())) + n51, err := m.Image.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n51 + } + return i, nil +} + +func (m *RemoveImageResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RemoveImageResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *NetworkConfig) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NetworkConfig) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.PodCidr) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.PodCidr))) + i += copy(dAtA[i:], m.PodCidr) + } + return i, nil +} + +func (m *RuntimeConfig) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RuntimeConfig) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NetworkConfig != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(m.NetworkConfig.Size())) + n52, err := m.NetworkConfig.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n52 + } + return i, nil +} + +func (m *UpdateRuntimeConfigRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UpdateRuntimeConfigRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.RuntimeConfig != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(m.RuntimeConfig.Size())) + n53, err := m.RuntimeConfig.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n53 + } + return i, nil +} + +func (m *UpdateRuntimeConfigResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UpdateRuntimeConfigResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *RuntimeCondition) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RuntimeCondition) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Type) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Type))) + i += copy(dAtA[i:], m.Type) + } + if m.Status { + dAtA[i] = 0x10 + i++ + if m.Status { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if len(m.Reason) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Reason))) + i += copy(dAtA[i:], m.Reason) + } + if len(m.Message) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Message))) + i += copy(dAtA[i:], m.Message) + } + return i, nil +} + +func (m *RuntimeStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RuntimeStatus) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Conditions) > 0 { + for _, msg := range m.Conditions { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *StatusRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StatusRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *StatusResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StatusResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Status != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Status.Size())) + n54, err := m.Status.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n54 + } + return i, nil +} + +func (m *ImageFsInfoRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ImageFsInfoRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *UInt64Value) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UInt64Value) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Value != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Value)) + } + return i, nil +} + +func (m *StorageIdentifier) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StorageIdentifier) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Uuid) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Uuid))) + i += copy(dAtA[i:], m.Uuid) + } + return i, nil +} + +func (m *FilesystemUsage) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FilesystemUsage) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Timestamp != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Timestamp)) + } + if m.StorageId != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.StorageId.Size())) + n55, err := m.StorageId.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n55 + } + if m.UsedBytes != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintApi(dAtA, i, uint64(m.UsedBytes.Size())) + n56, err := m.UsedBytes.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n56 + } + if m.InodesUsed != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.InodesUsed.Size())) + n57, err := m.InodesUsed.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n57 + } + return i, nil +} + +func (m *ImageFsInfoResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ImageFsInfoResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ImageFilesystems) > 0 { + for _, msg := range m.ImageFilesystems { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ContainerStatsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContainerStatsRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ContainerId) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerId))) + i += copy(dAtA[i:], m.ContainerId) + } + return i, nil +} + +func (m *ContainerStatsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContainerStatsResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Stats != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Stats.Size())) + n58, err := m.Stats.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n58 + } + return i, nil +} + +func (m *ListContainerStatsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListContainerStatsRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Filter != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Filter.Size())) + n59, err := m.Filter.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n59 + } + return i, nil +} + +func (m *ContainerStatsFilter) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContainerStatsFilter) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + if len(m.PodSandboxId) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.PodSandboxId))) + i += copy(dAtA[i:], m.PodSandboxId) + } + if len(m.LabelSelector) > 0 { + for k := range m.LabelSelector { + dAtA[i] = 0x1a + i++ + v := m.LabelSelector[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + return i, nil +} + +func (m *ListContainerStatsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListContainerStatsResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Stats) > 0 { + for _, msg := range m.Stats { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ContainerAttributes) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContainerAttributes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + if m.Metadata != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Metadata.Size())) + n60, err := m.Metadata.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n60 + } + if len(m.Labels) > 0 { + for k := range m.Labels { + dAtA[i] = 0x1a + i++ + v := m.Labels[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.Annotations) > 0 { + for k := range m.Annotations { + dAtA[i] = 0x22 + i++ + v := m.Annotations[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + return i, nil +} + +func (m *ContainerStats) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContainerStats) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Attributes != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Attributes.Size())) + n61, err := m.Attributes.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n61 + } + if m.Cpu != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Cpu.Size())) + n62, err := m.Cpu.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n62 + } + if m.Memory != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Memory.Size())) + n63, err := m.Memory.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n63 + } + if m.WritableLayer != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.WritableLayer.Size())) + n64, err := m.WritableLayer.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n64 + } + return i, nil +} + +func (m *CpuUsage) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CpuUsage) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Timestamp != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Timestamp)) + } + if m.UsageCoreNanoSeconds != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.UsageCoreNanoSeconds.Size())) + n65, err := m.UsageCoreNanoSeconds.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n65 + } + return i, nil +} + +func (m *MemoryUsage) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MemoryUsage) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Timestamp != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Timestamp)) + } + if m.WorkingSetBytes != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.WorkingSetBytes.Size())) + n66, err := m.WorkingSetBytes.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n66 + } + return i, nil +} + +func encodeFixed64Api(dAtA []byte, offset int, v uint64) int { + dAtA[offset] = uint8(v) + dAtA[offset+1] = uint8(v >> 8) + dAtA[offset+2] = uint8(v >> 16) + dAtA[offset+3] = uint8(v >> 24) + dAtA[offset+4] = uint8(v >> 32) + dAtA[offset+5] = uint8(v >> 40) + dAtA[offset+6] = uint8(v >> 48) + dAtA[offset+7] = uint8(v >> 56) + return offset + 8 +} +func encodeFixed32Api(dAtA []byte, offset int, v uint32) int { + dAtA[offset] = uint8(v) + dAtA[offset+1] = uint8(v >> 8) + dAtA[offset+2] = uint8(v >> 16) + dAtA[offset+3] = uint8(v >> 24) + return offset + 4 +} +func encodeVarintApi(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *VersionRequest) Size() (n int) { + var l int + _ = l + l = len(m.Version) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *VersionResponse) Size() (n int) { + var l int + _ = l + l = len(m.Version) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.RuntimeName) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.RuntimeVersion) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.RuntimeApiVersion) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *DNSConfig) Size() (n int) { + var l int + _ = l + if len(m.Servers) > 0 { + for _, s := range m.Servers { + l = len(s) + n += 1 + l + sovApi(uint64(l)) + } + } + if len(m.Searches) > 0 { + for _, s := range m.Searches { + l = len(s) + n += 1 + l + sovApi(uint64(l)) + } + } + if len(m.Options) > 0 { + for _, s := range m.Options { + l = len(s) + n += 1 + l + sovApi(uint64(l)) + } + } + return n +} + +func (m *PortMapping) Size() (n int) { + var l int + _ = l + if m.Protocol != 0 { + n += 1 + sovApi(uint64(m.Protocol)) + } + if m.ContainerPort != 0 { + n += 1 + sovApi(uint64(m.ContainerPort)) + } + if m.HostPort != 0 { + n += 1 + sovApi(uint64(m.HostPort)) + } + l = len(m.HostIp) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *Mount) Size() (n int) { + var l int + _ = l + l = len(m.ContainerPath) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.HostPath) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.Readonly { + n += 2 + } + if m.SelinuxRelabel { + n += 2 + } + if m.Propagation != 0 { + n += 1 + sovApi(uint64(m.Propagation)) + } + return n +} + +func (m *NamespaceOption) Size() (n int) { + var l int + _ = l + if m.HostNetwork { + n += 2 + } + if m.HostPid { + n += 2 + } + if m.HostIpc { + n += 2 + } + return n +} + +func (m *Int64Value) Size() (n int) { + var l int + _ = l + if m.Value != 0 { + n += 1 + sovApi(uint64(m.Value)) + } + return n +} + +func (m *LinuxSandboxSecurityContext) Size() (n int) { + var l int + _ = l + if m.NamespaceOptions != nil { + l = m.NamespaceOptions.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.SelinuxOptions != nil { + l = m.SelinuxOptions.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.RunAsUser != nil { + l = m.RunAsUser.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.ReadonlyRootfs { + n += 2 + } + if len(m.SupplementalGroups) > 0 { + l = 0 + for _, e := range m.SupplementalGroups { + l += sovApi(uint64(e)) + } + n += 1 + sovApi(uint64(l)) + l + } + if m.Privileged { + n += 2 + } + l = len(m.SeccompProfilePath) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *LinuxPodSandboxConfig) Size() (n int) { + var l int + _ = l + l = len(m.CgroupParent) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.SecurityContext != nil { + l = m.SecurityContext.Size() + n += 1 + l + sovApi(uint64(l)) + } + if len(m.Sysctls) > 0 { + for k, v := range m.Sysctls { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + return n +} + +func (m *PodSandboxMetadata) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Uid) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.Attempt != 0 { + n += 1 + sovApi(uint64(m.Attempt)) + } + return n +} + +func (m *PodSandboxConfig) Size() (n int) { + var l int + _ = l + if m.Metadata != nil { + l = m.Metadata.Size() + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Hostname) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.LogDirectory) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.DnsConfig != nil { + l = m.DnsConfig.Size() + n += 1 + l + sovApi(uint64(l)) + } + if len(m.PortMappings) > 0 { + for _, e := range m.PortMappings { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + if m.Linux != nil { + l = m.Linux.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *RunPodSandboxRequest) Size() (n int) { + var l int + _ = l + if m.Config != nil { + l = m.Config.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *RunPodSandboxResponse) Size() (n int) { + var l int + _ = l + l = len(m.PodSandboxId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *StopPodSandboxRequest) Size() (n int) { + var l int + _ = l + l = len(m.PodSandboxId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *StopPodSandboxResponse) Size() (n int) { + var l int + _ = l + return n +} + +func (m *RemovePodSandboxRequest) Size() (n int) { + var l int + _ = l + l = len(m.PodSandboxId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *RemovePodSandboxResponse) Size() (n int) { + var l int + _ = l + return n +} + +func (m *PodSandboxStatusRequest) Size() (n int) { + var l int + _ = l + l = len(m.PodSandboxId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *PodSandboxNetworkStatus) Size() (n int) { + var l int + _ = l + l = len(m.Ip) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *Namespace) Size() (n int) { + var l int + _ = l + if m.Options != nil { + l = m.Options.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *LinuxPodSandboxStatus) Size() (n int) { + var l int + _ = l + if m.Namespaces != nil { + l = m.Namespaces.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *PodSandboxStatus) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.Metadata != nil { + l = m.Metadata.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.State != 0 { + n += 1 + sovApi(uint64(m.State)) + } + if m.CreatedAt != 0 { + n += 1 + sovApi(uint64(m.CreatedAt)) + } + if m.Network != nil { + l = m.Network.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.Linux != nil { + l = m.Linux.Size() + n += 1 + l + sovApi(uint64(l)) + } + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + return n +} + +func (m *PodSandboxStatusResponse) Size() (n int) { + var l int + _ = l + if m.Status != nil { + l = m.Status.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *PodSandboxStateValue) Size() (n int) { + var l int + _ = l + if m.State != 0 { + n += 1 + sovApi(uint64(m.State)) + } + return n +} + +func (m *PodSandboxFilter) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.State != nil { + l = m.State.Size() + n += 1 + l + sovApi(uint64(l)) + } + if len(m.LabelSelector) > 0 { + for k, v := range m.LabelSelector { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + return n +} + +func (m *ListPodSandboxRequest) Size() (n int) { + var l int + _ = l + if m.Filter != nil { + l = m.Filter.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *PodSandbox) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.Metadata != nil { + l = m.Metadata.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.State != 0 { + n += 1 + sovApi(uint64(m.State)) + } + if m.CreatedAt != 0 { + n += 1 + sovApi(uint64(m.CreatedAt)) + } + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + return n +} + +func (m *ListPodSandboxResponse) Size() (n int) { + var l int + _ = l + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + return n +} + +func (m *ImageSpec) Size() (n int) { + var l int + _ = l + l = len(m.Image) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *KeyValue) Size() (n int) { + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *LinuxContainerResources) Size() (n int) { + var l int + _ = l + if m.CpuPeriod != 0 { + n += 1 + sovApi(uint64(m.CpuPeriod)) + } + if m.CpuQuota != 0 { + n += 1 + sovApi(uint64(m.CpuQuota)) + } + if m.CpuShares != 0 { + n += 1 + sovApi(uint64(m.CpuShares)) + } + if m.MemoryLimitInBytes != 0 { + n += 1 + sovApi(uint64(m.MemoryLimitInBytes)) + } + if m.OomScoreAdj != 0 { + n += 1 + sovApi(uint64(m.OomScoreAdj)) + } + l = len(m.CpusetCpus) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.CpusetMems) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *SELinuxOption) Size() (n int) { + var l int + _ = l + l = len(m.User) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Role) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Type) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Level) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *Capability) Size() (n int) { + var l int + _ = l + if len(m.AddCapabilities) > 0 { + for _, s := range m.AddCapabilities { + l = len(s) + n += 1 + l + sovApi(uint64(l)) + } + } + if len(m.DropCapabilities) > 0 { + for _, s := range m.DropCapabilities { + l = len(s) + n += 1 + l + sovApi(uint64(l)) + } + } + return n +} + +func (m *LinuxContainerSecurityContext) Size() (n int) { + var l int + _ = l + if m.Capabilities != nil { + l = m.Capabilities.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.Privileged { + n += 2 + } + if m.NamespaceOptions != nil { + l = m.NamespaceOptions.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.SelinuxOptions != nil { + l = m.SelinuxOptions.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.RunAsUser != nil { + l = m.RunAsUser.Size() + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.RunAsUsername) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.ReadonlyRootfs { + n += 2 + } + if len(m.SupplementalGroups) > 0 { + l = 0 + for _, e := range m.SupplementalGroups { + l += sovApi(uint64(e)) + } + n += 1 + sovApi(uint64(l)) + l + } + l = len(m.ApparmorProfile) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.SeccompProfilePath) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.NoNewPrivs { + n += 2 + } + return n +} + +func (m *LinuxContainerConfig) Size() (n int) { + var l int + _ = l + if m.Resources != nil { + l = m.Resources.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.SecurityContext != nil { + l = m.SecurityContext.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *ContainerMetadata) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.Attempt != 0 { + n += 1 + sovApi(uint64(m.Attempt)) + } + return n +} + +func (m *Device) Size() (n int) { + var l int + _ = l + l = len(m.ContainerPath) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.HostPath) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Permissions) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *ContainerConfig) Size() (n int) { + var l int + _ = l + if m.Metadata != nil { + l = m.Metadata.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.Image != nil { + l = m.Image.Size() + n += 1 + l + sovApi(uint64(l)) + } + if len(m.Command) > 0 { + for _, s := range m.Command { + l = len(s) + n += 1 + l + sovApi(uint64(l)) + } + } + if len(m.Args) > 0 { + for _, s := range m.Args { + l = len(s) + n += 1 + l + sovApi(uint64(l)) + } + } + l = len(m.WorkingDir) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if len(m.Envs) > 0 { + for _, e := range m.Envs { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + if len(m.Mounts) > 0 { + for _, e := range m.Mounts { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + if len(m.Devices) > 0 { + for _, e := range m.Devices { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + l = len(m.LogPath) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.Stdin { + n += 2 + } + if m.StdinOnce { + n += 2 + } + if m.Tty { + n += 2 + } + if m.Linux != nil { + l = m.Linux.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *CreateContainerRequest) Size() (n int) { + var l int + _ = l + l = len(m.PodSandboxId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.Config != nil { + l = m.Config.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.SandboxConfig != nil { + l = m.SandboxConfig.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *CreateContainerResponse) Size() (n int) { + var l int + _ = l + l = len(m.ContainerId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *StartContainerRequest) Size() (n int) { + var l int + _ = l + l = len(m.ContainerId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *StartContainerResponse) Size() (n int) { + var l int + _ = l + return n +} + +func (m *StopContainerRequest) Size() (n int) { + var l int + _ = l + l = len(m.ContainerId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.Timeout != 0 { + n += 1 + sovApi(uint64(m.Timeout)) + } + return n +} + +func (m *StopContainerResponse) Size() (n int) { + var l int + _ = l + return n +} + +func (m *RemoveContainerRequest) Size() (n int) { + var l int + _ = l + l = len(m.ContainerId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *RemoveContainerResponse) Size() (n int) { + var l int + _ = l + return n +} + +func (m *ContainerStateValue) Size() (n int) { + var l int + _ = l + if m.State != 0 { + n += 1 + sovApi(uint64(m.State)) + } + return n +} + +func (m *ContainerFilter) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.State != nil { + l = m.State.Size() + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.PodSandboxId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if len(m.LabelSelector) > 0 { + for k, v := range m.LabelSelector { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + return n +} + +func (m *ListContainersRequest) Size() (n int) { + var l int + _ = l + if m.Filter != nil { + l = m.Filter.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *Container) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.PodSandboxId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.Metadata != nil { + l = m.Metadata.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.Image != nil { + l = m.Image.Size() + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.ImageRef) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.State != 0 { + n += 1 + sovApi(uint64(m.State)) + } + if m.CreatedAt != 0 { + n += 1 + sovApi(uint64(m.CreatedAt)) + } + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + return n +} + +func (m *ListContainersResponse) Size() (n int) { + var l int + _ = l + if len(m.Containers) > 0 { + for _, e := range m.Containers { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + return n +} + +func (m *ContainerStatusRequest) Size() (n int) { + var l int + _ = l + l = len(m.ContainerId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *ContainerStatus) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.Metadata != nil { + l = m.Metadata.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.State != 0 { + n += 1 + sovApi(uint64(m.State)) + } + if m.CreatedAt != 0 { + n += 1 + sovApi(uint64(m.CreatedAt)) + } + if m.StartedAt != 0 { + n += 1 + sovApi(uint64(m.StartedAt)) + } + if m.FinishedAt != 0 { + n += 1 + sovApi(uint64(m.FinishedAt)) + } + if m.ExitCode != 0 { + n += 1 + sovApi(uint64(m.ExitCode)) + } + if m.Image != nil { + l = m.Image.Size() + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.ImageRef) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Reason) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Message) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + if len(m.Mounts) > 0 { + for _, e := range m.Mounts { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + l = len(m.LogPath) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *ContainerStatusResponse) Size() (n int) { + var l int + _ = l + if m.Status != nil { + l = m.Status.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *UpdateContainerResourcesRequest) Size() (n int) { + var l int + _ = l + l = len(m.ContainerId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.Linux != nil { + l = m.Linux.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *UpdateContainerResourcesResponse) Size() (n int) { + var l int + _ = l + return n +} + +func (m *ExecSyncRequest) Size() (n int) { + var l int + _ = l + l = len(m.ContainerId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if len(m.Cmd) > 0 { + for _, s := range m.Cmd { + l = len(s) + n += 1 + l + sovApi(uint64(l)) + } + } + if m.Timeout != 0 { + n += 1 + sovApi(uint64(m.Timeout)) + } + return n +} + +func (m *ExecSyncResponse) Size() (n int) { + var l int + _ = l + l = len(m.Stdout) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Stderr) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.ExitCode != 0 { + n += 1 + sovApi(uint64(m.ExitCode)) + } + return n +} + +func (m *ExecRequest) Size() (n int) { + var l int + _ = l + l = len(m.ContainerId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if len(m.Cmd) > 0 { + for _, s := range m.Cmd { + l = len(s) + n += 1 + l + sovApi(uint64(l)) + } + } + if m.Tty { + n += 2 + } + if m.Stdin { + n += 2 + } + return n +} + +func (m *ExecResponse) Size() (n int) { + var l int + _ = l + l = len(m.Url) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *AttachRequest) Size() (n int) { + var l int + _ = l + l = len(m.ContainerId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.Stdin { + n += 2 + } + if m.Tty { + n += 2 + } + return n +} + +func (m *AttachResponse) Size() (n int) { + var l int + _ = l + l = len(m.Url) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *PortForwardRequest) Size() (n int) { + var l int + _ = l + l = len(m.PodSandboxId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if len(m.Port) > 0 { + l = 0 + for _, e := range m.Port { + l += sovApi(uint64(e)) + } + n += 1 + sovApi(uint64(l)) + l + } + return n +} + +func (m *PortForwardResponse) Size() (n int) { + var l int + _ = l + l = len(m.Url) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *ImageFilter) Size() (n int) { + var l int + _ = l + if m.Image != nil { + l = m.Image.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *ListImagesRequest) Size() (n int) { + var l int + _ = l + if m.Filter != nil { + l = m.Filter.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *Image) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if len(m.RepoTags) > 0 { + for _, s := range m.RepoTags { + l = len(s) + n += 1 + l + sovApi(uint64(l)) + } + } + if len(m.RepoDigests) > 0 { + for _, s := range m.RepoDigests { + l = len(s) + n += 1 + l + sovApi(uint64(l)) + } + } + if m.Size_ != 0 { + n += 1 + sovApi(uint64(m.Size_)) + } + if m.Uid != nil { + l = m.Uid.Size() + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Username) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *ListImagesResponse) Size() (n int) { + var l int + _ = l + if len(m.Images) > 0 { + for _, e := range m.Images { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + return n +} + +func (m *ImageStatusRequest) Size() (n int) { + var l int + _ = l + if m.Image != nil { + l = m.Image.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *ImageStatusResponse) Size() (n int) { + var l int + _ = l + if m.Image != nil { + l = m.Image.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *AuthConfig) Size() (n int) { + var l int + _ = l + l = len(m.Username) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Password) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Auth) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.ServerAddress) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.IdentityToken) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.RegistryToken) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *PullImageRequest) Size() (n int) { + var l int + _ = l + if m.Image != nil { + l = m.Image.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.Auth != nil { + l = m.Auth.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.SandboxConfig != nil { + l = m.SandboxConfig.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *PullImageResponse) Size() (n int) { + var l int + _ = l + l = len(m.ImageRef) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *RemoveImageRequest) Size() (n int) { + var l int + _ = l + if m.Image != nil { + l = m.Image.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *RemoveImageResponse) Size() (n int) { + var l int + _ = l + return n +} + +func (m *NetworkConfig) Size() (n int) { + var l int + _ = l + l = len(m.PodCidr) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *RuntimeConfig) Size() (n int) { + var l int + _ = l + if m.NetworkConfig != nil { + l = m.NetworkConfig.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *UpdateRuntimeConfigRequest) Size() (n int) { + var l int + _ = l + if m.RuntimeConfig != nil { + l = m.RuntimeConfig.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *UpdateRuntimeConfigResponse) Size() (n int) { + var l int + _ = l + return n +} + +func (m *RuntimeCondition) Size() (n int) { + var l int + _ = l + l = len(m.Type) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.Status { + n += 2 + } + l = len(m.Reason) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Message) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *RuntimeStatus) Size() (n int) { + var l int + _ = l + if len(m.Conditions) > 0 { + for _, e := range m.Conditions { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + return n +} + +func (m *StatusRequest) Size() (n int) { + var l int + _ = l + return n +} + +func (m *StatusResponse) Size() (n int) { + var l int + _ = l + if m.Status != nil { + l = m.Status.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *ImageFsInfoRequest) Size() (n int) { + var l int + _ = l + return n +} + +func (m *UInt64Value) Size() (n int) { + var l int + _ = l + if m.Value != 0 { + n += 1 + sovApi(uint64(m.Value)) + } + return n +} + +func (m *StorageIdentifier) Size() (n int) { + var l int + _ = l + l = len(m.Uuid) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *FilesystemUsage) Size() (n int) { + var l int + _ = l + if m.Timestamp != 0 { + n += 1 + sovApi(uint64(m.Timestamp)) + } + if m.StorageId != nil { + l = m.StorageId.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.UsedBytes != nil { + l = m.UsedBytes.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.InodesUsed != nil { + l = m.InodesUsed.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *ImageFsInfoResponse) Size() (n int) { + var l int + _ = l + if len(m.ImageFilesystems) > 0 { + for _, e := range m.ImageFilesystems { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + return n +} + +func (m *ContainerStatsRequest) Size() (n int) { + var l int + _ = l + l = len(m.ContainerId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *ContainerStatsResponse) Size() (n int) { + var l int + _ = l + if m.Stats != nil { + l = m.Stats.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *ListContainerStatsRequest) Size() (n int) { + var l int + _ = l + if m.Filter != nil { + l = m.Filter.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *ContainerStatsFilter) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.PodSandboxId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if len(m.LabelSelector) > 0 { + for k, v := range m.LabelSelector { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + return n +} + +func (m *ListContainerStatsResponse) Size() (n int) { + var l int + _ = l + if len(m.Stats) > 0 { + for _, e := range m.Stats { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + return n +} + +func (m *ContainerAttributes) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.Metadata != nil { + l = m.Metadata.Size() + n += 1 + l + sovApi(uint64(l)) + } + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + return n +} + +func (m *ContainerStats) Size() (n int) { + var l int + _ = l + if m.Attributes != nil { + l = m.Attributes.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.Cpu != nil { + l = m.Cpu.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.Memory != nil { + l = m.Memory.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.WritableLayer != nil { + l = m.WritableLayer.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *CpuUsage) Size() (n int) { + var l int + _ = l + if m.Timestamp != 0 { + n += 1 + sovApi(uint64(m.Timestamp)) + } + if m.UsageCoreNanoSeconds != nil { + l = m.UsageCoreNanoSeconds.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *MemoryUsage) Size() (n int) { + var l int + _ = l + if m.Timestamp != 0 { + n += 1 + sovApi(uint64(m.Timestamp)) + } + if m.WorkingSetBytes != nil { + l = m.WorkingSetBytes.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func sovApi(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozApi(x uint64) (n int) { + return sovApi(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *VersionRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&VersionRequest{`, + `Version:` + fmt.Sprintf("%v", this.Version) + `,`, + `}`, + }, "") + return s +} +func (this *VersionResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&VersionResponse{`, + `Version:` + fmt.Sprintf("%v", this.Version) + `,`, + `RuntimeName:` + fmt.Sprintf("%v", this.RuntimeName) + `,`, + `RuntimeVersion:` + fmt.Sprintf("%v", this.RuntimeVersion) + `,`, + `RuntimeApiVersion:` + fmt.Sprintf("%v", this.RuntimeApiVersion) + `,`, + `}`, + }, "") + return s +} +func (this *DNSConfig) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DNSConfig{`, + `Servers:` + fmt.Sprintf("%v", this.Servers) + `,`, + `Searches:` + fmt.Sprintf("%v", this.Searches) + `,`, + `Options:` + fmt.Sprintf("%v", this.Options) + `,`, + `}`, + }, "") + return s +} +func (this *PortMapping) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PortMapping{`, + `Protocol:` + fmt.Sprintf("%v", this.Protocol) + `,`, + `ContainerPort:` + fmt.Sprintf("%v", this.ContainerPort) + `,`, + `HostPort:` + fmt.Sprintf("%v", this.HostPort) + `,`, + `HostIp:` + fmt.Sprintf("%v", this.HostIp) + `,`, + `}`, + }, "") + return s +} +func (this *Mount) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Mount{`, + `ContainerPath:` + fmt.Sprintf("%v", this.ContainerPath) + `,`, + `HostPath:` + fmt.Sprintf("%v", this.HostPath) + `,`, + `Readonly:` + fmt.Sprintf("%v", this.Readonly) + `,`, + `SelinuxRelabel:` + fmt.Sprintf("%v", this.SelinuxRelabel) + `,`, + `Propagation:` + fmt.Sprintf("%v", this.Propagation) + `,`, + `}`, + }, "") + return s +} +func (this *NamespaceOption) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NamespaceOption{`, + `HostNetwork:` + fmt.Sprintf("%v", this.HostNetwork) + `,`, + `HostPid:` + fmt.Sprintf("%v", this.HostPid) + `,`, + `HostIpc:` + fmt.Sprintf("%v", this.HostIpc) + `,`, + `}`, + }, "") + return s +} +func (this *Int64Value) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Int64Value{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `}`, + }, "") + return s +} +func (this *LinuxSandboxSecurityContext) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&LinuxSandboxSecurityContext{`, + `NamespaceOptions:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceOptions), "NamespaceOption", "NamespaceOption", 1) + `,`, + `SelinuxOptions:` + strings.Replace(fmt.Sprintf("%v", this.SelinuxOptions), "SELinuxOption", "SELinuxOption", 1) + `,`, + `RunAsUser:` + strings.Replace(fmt.Sprintf("%v", this.RunAsUser), "Int64Value", "Int64Value", 1) + `,`, + `ReadonlyRootfs:` + fmt.Sprintf("%v", this.ReadonlyRootfs) + `,`, + `SupplementalGroups:` + fmt.Sprintf("%v", this.SupplementalGroups) + `,`, + `Privileged:` + fmt.Sprintf("%v", this.Privileged) + `,`, + `SeccompProfilePath:` + fmt.Sprintf("%v", this.SeccompProfilePath) + `,`, + `}`, + }, "") + return s +} +func (this *LinuxPodSandboxConfig) String() string { + if this == nil { + return "nil" + } + keysForSysctls := make([]string, 0, len(this.Sysctls)) + for k := range this.Sysctls { + keysForSysctls = append(keysForSysctls, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForSysctls) + mapStringForSysctls := "map[string]string{" + for _, k := range keysForSysctls { + mapStringForSysctls += fmt.Sprintf("%v: %v,", k, this.Sysctls[k]) + } + mapStringForSysctls += "}" + s := strings.Join([]string{`&LinuxPodSandboxConfig{`, + `CgroupParent:` + fmt.Sprintf("%v", this.CgroupParent) + `,`, + `SecurityContext:` + strings.Replace(fmt.Sprintf("%v", this.SecurityContext), "LinuxSandboxSecurityContext", "LinuxSandboxSecurityContext", 1) + `,`, + `Sysctls:` + mapStringForSysctls + `,`, + `}`, + }, "") + return s +} +func (this *PodSandboxMetadata) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PodSandboxMetadata{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Uid:` + fmt.Sprintf("%v", this.Uid) + `,`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `Attempt:` + fmt.Sprintf("%v", this.Attempt) + `,`, + `}`, + }, "") + return s +} +func (this *PodSandboxConfig) String() string { + if this == nil { + return "nil" + } + keysForLabels := make([]string, 0, len(this.Labels)) + for k := range this.Labels { + keysForLabels = append(keysForLabels, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + mapStringForLabels := "map[string]string{" + for _, k := range keysForLabels { + mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + } + mapStringForLabels += "}" + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + s := strings.Join([]string{`&PodSandboxConfig{`, + `Metadata:` + strings.Replace(fmt.Sprintf("%v", this.Metadata), "PodSandboxMetadata", "PodSandboxMetadata", 1) + `,`, + `Hostname:` + fmt.Sprintf("%v", this.Hostname) + `,`, + `LogDirectory:` + fmt.Sprintf("%v", this.LogDirectory) + `,`, + `DnsConfig:` + strings.Replace(fmt.Sprintf("%v", this.DnsConfig), "DNSConfig", "DNSConfig", 1) + `,`, + `PortMappings:` + strings.Replace(fmt.Sprintf("%v", this.PortMappings), "PortMapping", "PortMapping", 1) + `,`, + `Labels:` + mapStringForLabels + `,`, + `Annotations:` + mapStringForAnnotations + `,`, + `Linux:` + strings.Replace(fmt.Sprintf("%v", this.Linux), "LinuxPodSandboxConfig", "LinuxPodSandboxConfig", 1) + `,`, + `}`, + }, "") + return s +} +func (this *RunPodSandboxRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RunPodSandboxRequest{`, + `Config:` + strings.Replace(fmt.Sprintf("%v", this.Config), "PodSandboxConfig", "PodSandboxConfig", 1) + `,`, + `}`, + }, "") + return s +} +func (this *RunPodSandboxResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RunPodSandboxResponse{`, + `PodSandboxId:` + fmt.Sprintf("%v", this.PodSandboxId) + `,`, + `}`, + }, "") + return s +} +func (this *StopPodSandboxRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StopPodSandboxRequest{`, + `PodSandboxId:` + fmt.Sprintf("%v", this.PodSandboxId) + `,`, + `}`, + }, "") + return s +} +func (this *StopPodSandboxResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StopPodSandboxResponse{`, + `}`, + }, "") + return s +} +func (this *RemovePodSandboxRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RemovePodSandboxRequest{`, + `PodSandboxId:` + fmt.Sprintf("%v", this.PodSandboxId) + `,`, + `}`, + }, "") + return s +} +func (this *RemovePodSandboxResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RemovePodSandboxResponse{`, + `}`, + }, "") + return s +} +func (this *PodSandboxStatusRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PodSandboxStatusRequest{`, + `PodSandboxId:` + fmt.Sprintf("%v", this.PodSandboxId) + `,`, + `}`, + }, "") + return s +} +func (this *PodSandboxNetworkStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PodSandboxNetworkStatus{`, + `Ip:` + fmt.Sprintf("%v", this.Ip) + `,`, + `}`, + }, "") + return s +} +func (this *Namespace) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Namespace{`, + `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "NamespaceOption", "NamespaceOption", 1) + `,`, + `}`, + }, "") + return s +} +func (this *LinuxPodSandboxStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&LinuxPodSandboxStatus{`, + `Namespaces:` + strings.Replace(fmt.Sprintf("%v", this.Namespaces), "Namespace", "Namespace", 1) + `,`, + `}`, + }, "") + return s +} +func (this *PodSandboxStatus) String() string { + if this == nil { + return "nil" + } + keysForLabels := make([]string, 0, len(this.Labels)) + for k := range this.Labels { + keysForLabels = append(keysForLabels, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + mapStringForLabels := "map[string]string{" + for _, k := range keysForLabels { + mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + } + mapStringForLabels += "}" + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + s := strings.Join([]string{`&PodSandboxStatus{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Metadata:` + strings.Replace(fmt.Sprintf("%v", this.Metadata), "PodSandboxMetadata", "PodSandboxMetadata", 1) + `,`, + `State:` + fmt.Sprintf("%v", this.State) + `,`, + `CreatedAt:` + fmt.Sprintf("%v", this.CreatedAt) + `,`, + `Network:` + strings.Replace(fmt.Sprintf("%v", this.Network), "PodSandboxNetworkStatus", "PodSandboxNetworkStatus", 1) + `,`, + `Linux:` + strings.Replace(fmt.Sprintf("%v", this.Linux), "LinuxPodSandboxStatus", "LinuxPodSandboxStatus", 1) + `,`, + `Labels:` + mapStringForLabels + `,`, + `Annotations:` + mapStringForAnnotations + `,`, + `}`, + }, "") + return s +} +func (this *PodSandboxStatusResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PodSandboxStatusResponse{`, + `Status:` + strings.Replace(fmt.Sprintf("%v", this.Status), "PodSandboxStatus", "PodSandboxStatus", 1) + `,`, + `}`, + }, "") + return s +} +func (this *PodSandboxStateValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PodSandboxStateValue{`, + `State:` + fmt.Sprintf("%v", this.State) + `,`, + `}`, + }, "") + return s +} +func (this *PodSandboxFilter) String() string { + if this == nil { + return "nil" + } + keysForLabelSelector := make([]string, 0, len(this.LabelSelector)) + for k := range this.LabelSelector { + keysForLabelSelector = append(keysForLabelSelector, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabelSelector) + mapStringForLabelSelector := "map[string]string{" + for _, k := range keysForLabelSelector { + mapStringForLabelSelector += fmt.Sprintf("%v: %v,", k, this.LabelSelector[k]) + } + mapStringForLabelSelector += "}" + s := strings.Join([]string{`&PodSandboxFilter{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `State:` + strings.Replace(fmt.Sprintf("%v", this.State), "PodSandboxStateValue", "PodSandboxStateValue", 1) + `,`, + `LabelSelector:` + mapStringForLabelSelector + `,`, + `}`, + }, "") + return s +} +func (this *ListPodSandboxRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ListPodSandboxRequest{`, + `Filter:` + strings.Replace(fmt.Sprintf("%v", this.Filter), "PodSandboxFilter", "PodSandboxFilter", 1) + `,`, + `}`, + }, "") + return s +} +func (this *PodSandbox) String() string { + if this == nil { + return "nil" + } + keysForLabels := make([]string, 0, len(this.Labels)) + for k := range this.Labels { + keysForLabels = append(keysForLabels, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + mapStringForLabels := "map[string]string{" + for _, k := range keysForLabels { + mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + } + mapStringForLabels += "}" + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + s := strings.Join([]string{`&PodSandbox{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Metadata:` + strings.Replace(fmt.Sprintf("%v", this.Metadata), "PodSandboxMetadata", "PodSandboxMetadata", 1) + `,`, + `State:` + fmt.Sprintf("%v", this.State) + `,`, + `CreatedAt:` + fmt.Sprintf("%v", this.CreatedAt) + `,`, + `Labels:` + mapStringForLabels + `,`, + `Annotations:` + mapStringForAnnotations + `,`, + `}`, + }, "") + return s +} +func (this *ListPodSandboxResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ListPodSandboxResponse{`, + `Items:` + strings.Replace(fmt.Sprintf("%v", this.Items), "PodSandbox", "PodSandbox", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ImageSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ImageSpec{`, + `Image:` + fmt.Sprintf("%v", this.Image) + `,`, + `}`, + }, "") + return s +} +func (this *KeyValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&KeyValue{`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `}`, + }, "") + return s +} +func (this *LinuxContainerResources) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&LinuxContainerResources{`, + `CpuPeriod:` + fmt.Sprintf("%v", this.CpuPeriod) + `,`, + `CpuQuota:` + fmt.Sprintf("%v", this.CpuQuota) + `,`, + `CpuShares:` + fmt.Sprintf("%v", this.CpuShares) + `,`, + `MemoryLimitInBytes:` + fmt.Sprintf("%v", this.MemoryLimitInBytes) + `,`, + `OomScoreAdj:` + fmt.Sprintf("%v", this.OomScoreAdj) + `,`, + `CpusetCpus:` + fmt.Sprintf("%v", this.CpusetCpus) + `,`, + `CpusetMems:` + fmt.Sprintf("%v", this.CpusetMems) + `,`, + `}`, + }, "") + return s +} +func (this *SELinuxOption) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SELinuxOption{`, + `User:` + fmt.Sprintf("%v", this.User) + `,`, + `Role:` + fmt.Sprintf("%v", this.Role) + `,`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Level:` + fmt.Sprintf("%v", this.Level) + `,`, + `}`, + }, "") + return s +} +func (this *Capability) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Capability{`, + `AddCapabilities:` + fmt.Sprintf("%v", this.AddCapabilities) + `,`, + `DropCapabilities:` + fmt.Sprintf("%v", this.DropCapabilities) + `,`, + `}`, + }, "") + return s +} +func (this *LinuxContainerSecurityContext) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&LinuxContainerSecurityContext{`, + `Capabilities:` + strings.Replace(fmt.Sprintf("%v", this.Capabilities), "Capability", "Capability", 1) + `,`, + `Privileged:` + fmt.Sprintf("%v", this.Privileged) + `,`, + `NamespaceOptions:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceOptions), "NamespaceOption", "NamespaceOption", 1) + `,`, + `SelinuxOptions:` + strings.Replace(fmt.Sprintf("%v", this.SelinuxOptions), "SELinuxOption", "SELinuxOption", 1) + `,`, + `RunAsUser:` + strings.Replace(fmt.Sprintf("%v", this.RunAsUser), "Int64Value", "Int64Value", 1) + `,`, + `RunAsUsername:` + fmt.Sprintf("%v", this.RunAsUsername) + `,`, + `ReadonlyRootfs:` + fmt.Sprintf("%v", this.ReadonlyRootfs) + `,`, + `SupplementalGroups:` + fmt.Sprintf("%v", this.SupplementalGroups) + `,`, + `ApparmorProfile:` + fmt.Sprintf("%v", this.ApparmorProfile) + `,`, + `SeccompProfilePath:` + fmt.Sprintf("%v", this.SeccompProfilePath) + `,`, + `NoNewPrivs:` + fmt.Sprintf("%v", this.NoNewPrivs) + `,`, + `}`, + }, "") + return s +} +func (this *LinuxContainerConfig) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&LinuxContainerConfig{`, + `Resources:` + strings.Replace(fmt.Sprintf("%v", this.Resources), "LinuxContainerResources", "LinuxContainerResources", 1) + `,`, + `SecurityContext:` + strings.Replace(fmt.Sprintf("%v", this.SecurityContext), "LinuxContainerSecurityContext", "LinuxContainerSecurityContext", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ContainerMetadata) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainerMetadata{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Attempt:` + fmt.Sprintf("%v", this.Attempt) + `,`, + `}`, + }, "") + return s +} +func (this *Device) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Device{`, + `ContainerPath:` + fmt.Sprintf("%v", this.ContainerPath) + `,`, + `HostPath:` + fmt.Sprintf("%v", this.HostPath) + `,`, + `Permissions:` + fmt.Sprintf("%v", this.Permissions) + `,`, + `}`, + }, "") + return s +} +func (this *ContainerConfig) String() string { + if this == nil { + return "nil" + } + keysForLabels := make([]string, 0, len(this.Labels)) + for k := range this.Labels { + keysForLabels = append(keysForLabels, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + mapStringForLabels := "map[string]string{" + for _, k := range keysForLabels { + mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + } + mapStringForLabels += "}" + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + s := strings.Join([]string{`&ContainerConfig{`, + `Metadata:` + strings.Replace(fmt.Sprintf("%v", this.Metadata), "ContainerMetadata", "ContainerMetadata", 1) + `,`, + `Image:` + strings.Replace(fmt.Sprintf("%v", this.Image), "ImageSpec", "ImageSpec", 1) + `,`, + `Command:` + fmt.Sprintf("%v", this.Command) + `,`, + `Args:` + fmt.Sprintf("%v", this.Args) + `,`, + `WorkingDir:` + fmt.Sprintf("%v", this.WorkingDir) + `,`, + `Envs:` + strings.Replace(fmt.Sprintf("%v", this.Envs), "KeyValue", "KeyValue", 1) + `,`, + `Mounts:` + strings.Replace(fmt.Sprintf("%v", this.Mounts), "Mount", "Mount", 1) + `,`, + `Devices:` + strings.Replace(fmt.Sprintf("%v", this.Devices), "Device", "Device", 1) + `,`, + `Labels:` + mapStringForLabels + `,`, + `Annotations:` + mapStringForAnnotations + `,`, + `LogPath:` + fmt.Sprintf("%v", this.LogPath) + `,`, + `Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`, + `StdinOnce:` + fmt.Sprintf("%v", this.StdinOnce) + `,`, + `Tty:` + fmt.Sprintf("%v", this.Tty) + `,`, + `Linux:` + strings.Replace(fmt.Sprintf("%v", this.Linux), "LinuxContainerConfig", "LinuxContainerConfig", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CreateContainerRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CreateContainerRequest{`, + `PodSandboxId:` + fmt.Sprintf("%v", this.PodSandboxId) + `,`, + `Config:` + strings.Replace(fmt.Sprintf("%v", this.Config), "ContainerConfig", "ContainerConfig", 1) + `,`, + `SandboxConfig:` + strings.Replace(fmt.Sprintf("%v", this.SandboxConfig), "PodSandboxConfig", "PodSandboxConfig", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CreateContainerResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CreateContainerResponse{`, + `ContainerId:` + fmt.Sprintf("%v", this.ContainerId) + `,`, + `}`, + }, "") + return s +} +func (this *StartContainerRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StartContainerRequest{`, + `ContainerId:` + fmt.Sprintf("%v", this.ContainerId) + `,`, + `}`, + }, "") + return s +} +func (this *StartContainerResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StartContainerResponse{`, + `}`, + }, "") + return s +} +func (this *StopContainerRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StopContainerRequest{`, + `ContainerId:` + fmt.Sprintf("%v", this.ContainerId) + `,`, + `Timeout:` + fmt.Sprintf("%v", this.Timeout) + `,`, + `}`, + }, "") + return s +} +func (this *StopContainerResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StopContainerResponse{`, + `}`, + }, "") + return s +} +func (this *RemoveContainerRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RemoveContainerRequest{`, + `ContainerId:` + fmt.Sprintf("%v", this.ContainerId) + `,`, + `}`, + }, "") + return s +} +func (this *RemoveContainerResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RemoveContainerResponse{`, + `}`, + }, "") + return s +} +func (this *ContainerStateValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainerStateValue{`, + `State:` + fmt.Sprintf("%v", this.State) + `,`, + `}`, + }, "") + return s +} +func (this *ContainerFilter) String() string { + if this == nil { + return "nil" + } + keysForLabelSelector := make([]string, 0, len(this.LabelSelector)) + for k := range this.LabelSelector { + keysForLabelSelector = append(keysForLabelSelector, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabelSelector) + mapStringForLabelSelector := "map[string]string{" + for _, k := range keysForLabelSelector { + mapStringForLabelSelector += fmt.Sprintf("%v: %v,", k, this.LabelSelector[k]) + } + mapStringForLabelSelector += "}" + s := strings.Join([]string{`&ContainerFilter{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `State:` + strings.Replace(fmt.Sprintf("%v", this.State), "ContainerStateValue", "ContainerStateValue", 1) + `,`, + `PodSandboxId:` + fmt.Sprintf("%v", this.PodSandboxId) + `,`, + `LabelSelector:` + mapStringForLabelSelector + `,`, + `}`, + }, "") + return s +} +func (this *ListContainersRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ListContainersRequest{`, + `Filter:` + strings.Replace(fmt.Sprintf("%v", this.Filter), "ContainerFilter", "ContainerFilter", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Container) String() string { + if this == nil { + return "nil" + } + keysForLabels := make([]string, 0, len(this.Labels)) + for k := range this.Labels { + keysForLabels = append(keysForLabels, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + mapStringForLabels := "map[string]string{" + for _, k := range keysForLabels { + mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + } + mapStringForLabels += "}" + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + s := strings.Join([]string{`&Container{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `PodSandboxId:` + fmt.Sprintf("%v", this.PodSandboxId) + `,`, + `Metadata:` + strings.Replace(fmt.Sprintf("%v", this.Metadata), "ContainerMetadata", "ContainerMetadata", 1) + `,`, + `Image:` + strings.Replace(fmt.Sprintf("%v", this.Image), "ImageSpec", "ImageSpec", 1) + `,`, + `ImageRef:` + fmt.Sprintf("%v", this.ImageRef) + `,`, + `State:` + fmt.Sprintf("%v", this.State) + `,`, + `CreatedAt:` + fmt.Sprintf("%v", this.CreatedAt) + `,`, + `Labels:` + mapStringForLabels + `,`, + `Annotations:` + mapStringForAnnotations + `,`, + `}`, + }, "") + return s +} +func (this *ListContainersResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ListContainersResponse{`, + `Containers:` + strings.Replace(fmt.Sprintf("%v", this.Containers), "Container", "Container", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ContainerStatusRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainerStatusRequest{`, + `ContainerId:` + fmt.Sprintf("%v", this.ContainerId) + `,`, + `}`, + }, "") + return s +} +func (this *ContainerStatus) String() string { + if this == nil { + return "nil" + } + keysForLabels := make([]string, 0, len(this.Labels)) + for k := range this.Labels { + keysForLabels = append(keysForLabels, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + mapStringForLabels := "map[string]string{" + for _, k := range keysForLabels { + mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + } + mapStringForLabels += "}" + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + s := strings.Join([]string{`&ContainerStatus{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Metadata:` + strings.Replace(fmt.Sprintf("%v", this.Metadata), "ContainerMetadata", "ContainerMetadata", 1) + `,`, + `State:` + fmt.Sprintf("%v", this.State) + `,`, + `CreatedAt:` + fmt.Sprintf("%v", this.CreatedAt) + `,`, + `StartedAt:` + fmt.Sprintf("%v", this.StartedAt) + `,`, + `FinishedAt:` + fmt.Sprintf("%v", this.FinishedAt) + `,`, + `ExitCode:` + fmt.Sprintf("%v", this.ExitCode) + `,`, + `Image:` + strings.Replace(fmt.Sprintf("%v", this.Image), "ImageSpec", "ImageSpec", 1) + `,`, + `ImageRef:` + fmt.Sprintf("%v", this.ImageRef) + `,`, + `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, + `Message:` + fmt.Sprintf("%v", this.Message) + `,`, + `Labels:` + mapStringForLabels + `,`, + `Annotations:` + mapStringForAnnotations + `,`, + `Mounts:` + strings.Replace(fmt.Sprintf("%v", this.Mounts), "Mount", "Mount", 1) + `,`, + `LogPath:` + fmt.Sprintf("%v", this.LogPath) + `,`, + `}`, + }, "") + return s +} +func (this *ContainerStatusResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainerStatusResponse{`, + `Status:` + strings.Replace(fmt.Sprintf("%v", this.Status), "ContainerStatus", "ContainerStatus", 1) + `,`, + `}`, + }, "") + return s +} +func (this *UpdateContainerResourcesRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UpdateContainerResourcesRequest{`, + `ContainerId:` + fmt.Sprintf("%v", this.ContainerId) + `,`, + `Linux:` + strings.Replace(fmt.Sprintf("%v", this.Linux), "LinuxContainerResources", "LinuxContainerResources", 1) + `,`, + `}`, + }, "") + return s +} +func (this *UpdateContainerResourcesResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UpdateContainerResourcesResponse{`, + `}`, + }, "") + return s +} +func (this *ExecSyncRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ExecSyncRequest{`, + `ContainerId:` + fmt.Sprintf("%v", this.ContainerId) + `,`, + `Cmd:` + fmt.Sprintf("%v", this.Cmd) + `,`, + `Timeout:` + fmt.Sprintf("%v", this.Timeout) + `,`, + `}`, + }, "") + return s +} +func (this *ExecSyncResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ExecSyncResponse{`, + `Stdout:` + fmt.Sprintf("%v", this.Stdout) + `,`, + `Stderr:` + fmt.Sprintf("%v", this.Stderr) + `,`, + `ExitCode:` + fmt.Sprintf("%v", this.ExitCode) + `,`, + `}`, + }, "") + return s +} +func (this *ExecRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ExecRequest{`, + `ContainerId:` + fmt.Sprintf("%v", this.ContainerId) + `,`, + `Cmd:` + fmt.Sprintf("%v", this.Cmd) + `,`, + `Tty:` + fmt.Sprintf("%v", this.Tty) + `,`, + `Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`, + `}`, + }, "") + return s +} +func (this *ExecResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ExecResponse{`, + `Url:` + fmt.Sprintf("%v", this.Url) + `,`, + `}`, + }, "") + return s +} +func (this *AttachRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AttachRequest{`, + `ContainerId:` + fmt.Sprintf("%v", this.ContainerId) + `,`, + `Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`, + `Tty:` + fmt.Sprintf("%v", this.Tty) + `,`, + `}`, + }, "") + return s +} +func (this *AttachResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AttachResponse{`, + `Url:` + fmt.Sprintf("%v", this.Url) + `,`, + `}`, + }, "") + return s +} +func (this *PortForwardRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PortForwardRequest{`, + `PodSandboxId:` + fmt.Sprintf("%v", this.PodSandboxId) + `,`, + `Port:` + fmt.Sprintf("%v", this.Port) + `,`, + `}`, + }, "") + return s +} +func (this *PortForwardResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PortForwardResponse{`, + `Url:` + fmt.Sprintf("%v", this.Url) + `,`, + `}`, + }, "") + return s +} +func (this *ImageFilter) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ImageFilter{`, + `Image:` + strings.Replace(fmt.Sprintf("%v", this.Image), "ImageSpec", "ImageSpec", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ListImagesRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ListImagesRequest{`, + `Filter:` + strings.Replace(fmt.Sprintf("%v", this.Filter), "ImageFilter", "ImageFilter", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Image) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Image{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `RepoTags:` + fmt.Sprintf("%v", this.RepoTags) + `,`, + `RepoDigests:` + fmt.Sprintf("%v", this.RepoDigests) + `,`, + `Size_:` + fmt.Sprintf("%v", this.Size_) + `,`, + `Uid:` + strings.Replace(fmt.Sprintf("%v", this.Uid), "Int64Value", "Int64Value", 1) + `,`, + `Username:` + fmt.Sprintf("%v", this.Username) + `,`, + `}`, + }, "") + return s +} +func (this *ListImagesResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ListImagesResponse{`, + `Images:` + strings.Replace(fmt.Sprintf("%v", this.Images), "Image", "Image", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ImageStatusRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ImageStatusRequest{`, + `Image:` + strings.Replace(fmt.Sprintf("%v", this.Image), "ImageSpec", "ImageSpec", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ImageStatusResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ImageStatusResponse{`, + `Image:` + strings.Replace(fmt.Sprintf("%v", this.Image), "Image", "Image", 1) + `,`, + `}`, + }, "") + return s +} +func (this *AuthConfig) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AuthConfig{`, + `Username:` + fmt.Sprintf("%v", this.Username) + `,`, + `Password:` + fmt.Sprintf("%v", this.Password) + `,`, + `Auth:` + fmt.Sprintf("%v", this.Auth) + `,`, + `ServerAddress:` + fmt.Sprintf("%v", this.ServerAddress) + `,`, + `IdentityToken:` + fmt.Sprintf("%v", this.IdentityToken) + `,`, + `RegistryToken:` + fmt.Sprintf("%v", this.RegistryToken) + `,`, + `}`, + }, "") + return s +} +func (this *PullImageRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PullImageRequest{`, + `Image:` + strings.Replace(fmt.Sprintf("%v", this.Image), "ImageSpec", "ImageSpec", 1) + `,`, + `Auth:` + strings.Replace(fmt.Sprintf("%v", this.Auth), "AuthConfig", "AuthConfig", 1) + `,`, + `SandboxConfig:` + strings.Replace(fmt.Sprintf("%v", this.SandboxConfig), "PodSandboxConfig", "PodSandboxConfig", 1) + `,`, + `}`, + }, "") + return s +} +func (this *PullImageResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PullImageResponse{`, + `ImageRef:` + fmt.Sprintf("%v", this.ImageRef) + `,`, + `}`, + }, "") + return s +} +func (this *RemoveImageRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RemoveImageRequest{`, + `Image:` + strings.Replace(fmt.Sprintf("%v", this.Image), "ImageSpec", "ImageSpec", 1) + `,`, + `}`, + }, "") + return s +} +func (this *RemoveImageResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RemoveImageResponse{`, + `}`, + }, "") + return s +} +func (this *NetworkConfig) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NetworkConfig{`, + `PodCidr:` + fmt.Sprintf("%v", this.PodCidr) + `,`, + `}`, + }, "") + return s +} +func (this *RuntimeConfig) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RuntimeConfig{`, + `NetworkConfig:` + strings.Replace(fmt.Sprintf("%v", this.NetworkConfig), "NetworkConfig", "NetworkConfig", 1) + `,`, + `}`, + }, "") + return s +} +func (this *UpdateRuntimeConfigRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UpdateRuntimeConfigRequest{`, + `RuntimeConfig:` + strings.Replace(fmt.Sprintf("%v", this.RuntimeConfig), "RuntimeConfig", "RuntimeConfig", 1) + `,`, + `}`, + }, "") + return s +} +func (this *UpdateRuntimeConfigResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UpdateRuntimeConfigResponse{`, + `}`, + }, "") + return s +} +func (this *RuntimeCondition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RuntimeCondition{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Status:` + fmt.Sprintf("%v", this.Status) + `,`, + `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, + `Message:` + fmt.Sprintf("%v", this.Message) + `,`, + `}`, + }, "") + return s +} +func (this *RuntimeStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RuntimeStatus{`, + `Conditions:` + strings.Replace(fmt.Sprintf("%v", this.Conditions), "RuntimeCondition", "RuntimeCondition", 1) + `,`, + `}`, + }, "") + return s +} +func (this *StatusRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StatusRequest{`, + `}`, + }, "") + return s +} +func (this *StatusResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StatusResponse{`, + `Status:` + strings.Replace(fmt.Sprintf("%v", this.Status), "RuntimeStatus", "RuntimeStatus", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ImageFsInfoRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ImageFsInfoRequest{`, + `}`, + }, "") + return s +} +func (this *UInt64Value) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UInt64Value{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `}`, + }, "") + return s +} +func (this *StorageIdentifier) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StorageIdentifier{`, + `Uuid:` + fmt.Sprintf("%v", this.Uuid) + `,`, + `}`, + }, "") + return s +} +func (this *FilesystemUsage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FilesystemUsage{`, + `Timestamp:` + fmt.Sprintf("%v", this.Timestamp) + `,`, + `StorageId:` + strings.Replace(fmt.Sprintf("%v", this.StorageId), "StorageIdentifier", "StorageIdentifier", 1) + `,`, + `UsedBytes:` + strings.Replace(fmt.Sprintf("%v", this.UsedBytes), "UInt64Value", "UInt64Value", 1) + `,`, + `InodesUsed:` + strings.Replace(fmt.Sprintf("%v", this.InodesUsed), "UInt64Value", "UInt64Value", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ImageFsInfoResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ImageFsInfoResponse{`, + `ImageFilesystems:` + strings.Replace(fmt.Sprintf("%v", this.ImageFilesystems), "FilesystemUsage", "FilesystemUsage", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ContainerStatsRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainerStatsRequest{`, + `ContainerId:` + fmt.Sprintf("%v", this.ContainerId) + `,`, + `}`, + }, "") + return s +} +func (this *ContainerStatsResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainerStatsResponse{`, + `Stats:` + strings.Replace(fmt.Sprintf("%v", this.Stats), "ContainerStats", "ContainerStats", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ListContainerStatsRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ListContainerStatsRequest{`, + `Filter:` + strings.Replace(fmt.Sprintf("%v", this.Filter), "ContainerStatsFilter", "ContainerStatsFilter", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ContainerStatsFilter) String() string { + if this == nil { + return "nil" + } + keysForLabelSelector := make([]string, 0, len(this.LabelSelector)) + for k := range this.LabelSelector { + keysForLabelSelector = append(keysForLabelSelector, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabelSelector) + mapStringForLabelSelector := "map[string]string{" + for _, k := range keysForLabelSelector { + mapStringForLabelSelector += fmt.Sprintf("%v: %v,", k, this.LabelSelector[k]) + } + mapStringForLabelSelector += "}" + s := strings.Join([]string{`&ContainerStatsFilter{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `PodSandboxId:` + fmt.Sprintf("%v", this.PodSandboxId) + `,`, + `LabelSelector:` + mapStringForLabelSelector + `,`, + `}`, + }, "") + return s +} +func (this *ListContainerStatsResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ListContainerStatsResponse{`, + `Stats:` + strings.Replace(fmt.Sprintf("%v", this.Stats), "ContainerStats", "ContainerStats", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ContainerAttributes) String() string { + if this == nil { + return "nil" + } + keysForLabels := make([]string, 0, len(this.Labels)) + for k := range this.Labels { + keysForLabels = append(keysForLabels, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + mapStringForLabels := "map[string]string{" + for _, k := range keysForLabels { + mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + } + mapStringForLabels += "}" + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + s := strings.Join([]string{`&ContainerAttributes{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Metadata:` + strings.Replace(fmt.Sprintf("%v", this.Metadata), "ContainerMetadata", "ContainerMetadata", 1) + `,`, + `Labels:` + mapStringForLabels + `,`, + `Annotations:` + mapStringForAnnotations + `,`, + `}`, + }, "") + return s +} +func (this *ContainerStats) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainerStats{`, + `Attributes:` + strings.Replace(fmt.Sprintf("%v", this.Attributes), "ContainerAttributes", "ContainerAttributes", 1) + `,`, + `Cpu:` + strings.Replace(fmt.Sprintf("%v", this.Cpu), "CpuUsage", "CpuUsage", 1) + `,`, + `Memory:` + strings.Replace(fmt.Sprintf("%v", this.Memory), "MemoryUsage", "MemoryUsage", 1) + `,`, + `WritableLayer:` + strings.Replace(fmt.Sprintf("%v", this.WritableLayer), "FilesystemUsage", "FilesystemUsage", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CpuUsage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CpuUsage{`, + `Timestamp:` + fmt.Sprintf("%v", this.Timestamp) + `,`, + `UsageCoreNanoSeconds:` + strings.Replace(fmt.Sprintf("%v", this.UsageCoreNanoSeconds), "UInt64Value", "UInt64Value", 1) + `,`, + `}`, + }, "") + return s +} +func (this *MemoryUsage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MemoryUsage{`, + `Timestamp:` + fmt.Sprintf("%v", this.Timestamp) + `,`, + `WorkingSetBytes:` + strings.Replace(fmt.Sprintf("%v", this.WorkingSetBytes), "UInt64Value", "UInt64Value", 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringApi(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *VersionRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VersionRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VersionRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VersionResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VersionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VersionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RuntimeName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RuntimeName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RuntimeVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RuntimeVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RuntimeApiVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RuntimeApiVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DNSConfig) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DNSConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DNSConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Servers", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Servers = append(m.Servers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Searches", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Searches = append(m.Searches, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Options = append(m.Options, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PortMapping) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PortMapping: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PortMapping: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) + } + m.Protocol = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Protocol |= (Protocol(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerPort", wireType) + } + m.ContainerPort = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ContainerPort |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HostPort", wireType) + } + m.HostPort = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HostPort |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HostIp", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HostIp = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Mount) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Mount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Mount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContainerPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HostPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HostPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Readonly", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Readonly = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SelinuxRelabel", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.SelinuxRelabel = bool(v != 0) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Propagation", wireType) + } + m.Propagation = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Propagation |= (MountPropagation(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NamespaceOption) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NamespaceOption: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NamespaceOption: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HostNetwork", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.HostNetwork = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HostPid", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.HostPid = bool(v != 0) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HostIpc", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.HostIpc = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Int64Value) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Int64Value: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Int64Value: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + m.Value = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Value |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LinuxSandboxSecurityContext) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LinuxSandboxSecurityContext: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LinuxSandboxSecurityContext: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NamespaceOptions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NamespaceOptions == nil { + m.NamespaceOptions = &NamespaceOption{} + } + if err := m.NamespaceOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SelinuxOptions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SelinuxOptions == nil { + m.SelinuxOptions = &SELinuxOption{} + } + if err := m.SelinuxOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RunAsUser", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RunAsUser == nil { + m.RunAsUser = &Int64Value{} + } + if err := m.RunAsUser.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadonlyRootfs", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ReadonlyRootfs = bool(v != 0) + case 5: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.SupplementalGroups = append(m.SupplementalGroups, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.SupplementalGroups = append(m.SupplementalGroups, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field SupplementalGroups", wireType) + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Privileged", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Privileged = bool(v != 0) + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SeccompProfilePath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SeccompProfilePath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LinuxPodSandboxConfig) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LinuxPodSandboxConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LinuxPodSandboxConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CgroupParent", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CgroupParent = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SecurityContext", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SecurityContext == nil { + m.SecurityContext = &LinuxSandboxSecurityContext{} + } + if err := m.SecurityContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sysctls", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.Sysctls == nil { + m.Sysctls = make(map[string]string) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + m.Sysctls[mapkey] = mapvalue + } else { + var mapvalue string + m.Sysctls[mapkey] = mapvalue + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodSandboxMetadata) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodSandboxMetadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodSandboxMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Uid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Attempt", wireType) + } + m.Attempt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Attempt |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodSandboxConfig) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodSandboxConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodSandboxConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Metadata == nil { + m.Metadata = &PodSandboxMetadata{} + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hostname = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LogDirectory", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LogDirectory = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DnsConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DnsConfig == nil { + m.DnsConfig = &DNSConfig{} + } + if err := m.DnsConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortMappings", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PortMappings = append(m.PortMappings, &PortMapping{}) + if err := m.PortMappings[len(m.PortMappings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.Labels == nil { + m.Labels = make(map[string]string) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + m.Labels[mapkey] = mapvalue + } else { + var mapvalue string + m.Labels[mapkey] = mapvalue + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.Annotations == nil { + m.Annotations = make(map[string]string) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + m.Annotations[mapkey] = mapvalue + } else { + var mapvalue string + m.Annotations[mapkey] = mapvalue + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Linux", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Linux == nil { + m.Linux = &LinuxPodSandboxConfig{} + } + if err := m.Linux.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RunPodSandboxRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RunPodSandboxRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RunPodSandboxRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Config == nil { + m.Config = &PodSandboxConfig{} + } + if err := m.Config.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RunPodSandboxResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RunPodSandboxResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RunPodSandboxResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodSandboxId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodSandboxId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StopPodSandboxRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StopPodSandboxRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StopPodSandboxRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodSandboxId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodSandboxId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StopPodSandboxResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StopPodSandboxResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StopPodSandboxResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RemovePodSandboxRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RemovePodSandboxRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RemovePodSandboxRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodSandboxId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodSandboxId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RemovePodSandboxResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RemovePodSandboxResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RemovePodSandboxResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodSandboxStatusRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodSandboxStatusRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodSandboxStatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodSandboxId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodSandboxId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodSandboxNetworkStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodSandboxNetworkStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodSandboxNetworkStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ip", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ip = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Namespace) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Namespace: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Namespace: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Options == nil { + m.Options = &NamespaceOption{} + } + if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LinuxPodSandboxStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LinuxPodSandboxStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LinuxPodSandboxStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespaces", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Namespaces == nil { + m.Namespaces = &Namespace{} + } + if err := m.Namespaces.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodSandboxStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodSandboxStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodSandboxStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Metadata == nil { + m.Metadata = &PodSandboxMetadata{} + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= (PodSandboxState(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + } + m.CreatedAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CreatedAt |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Network == nil { + m.Network = &PodSandboxNetworkStatus{} + } + if err := m.Network.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Linux", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Linux == nil { + m.Linux = &LinuxPodSandboxStatus{} + } + if err := m.Linux.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.Labels == nil { + m.Labels = make(map[string]string) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + m.Labels[mapkey] = mapvalue + } else { + var mapvalue string + m.Labels[mapkey] = mapvalue + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.Annotations == nil { + m.Annotations = make(map[string]string) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + m.Annotations[mapkey] = mapvalue + } else { + var mapvalue string + m.Annotations[mapkey] = mapvalue + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodSandboxStatusResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodSandboxStatusResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodSandboxStatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Status == nil { + m.Status = &PodSandboxStatus{} + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodSandboxStateValue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodSandboxStateValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodSandboxStateValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= (PodSandboxState(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodSandboxFilter) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodSandboxFilter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodSandboxFilter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.State == nil { + m.State = &PodSandboxStateValue{} + } + if err := m.State.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LabelSelector", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.LabelSelector == nil { + m.LabelSelector = make(map[string]string) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + m.LabelSelector[mapkey] = mapvalue + } else { + var mapvalue string + m.LabelSelector[mapkey] = mapvalue + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListPodSandboxRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListPodSandboxRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListPodSandboxRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Filter == nil { + m.Filter = &PodSandboxFilter{} + } + if err := m.Filter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodSandbox) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodSandbox: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodSandbox: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Metadata == nil { + m.Metadata = &PodSandboxMetadata{} + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= (PodSandboxState(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + } + m.CreatedAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CreatedAt |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.Labels == nil { + m.Labels = make(map[string]string) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + m.Labels[mapkey] = mapvalue + } else { + var mapvalue string + m.Labels[mapkey] = mapvalue + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.Annotations == nil { + m.Annotations = make(map[string]string) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + m.Annotations[mapkey] = mapvalue + } else { + var mapvalue string + m.Annotations[mapkey] = mapvalue + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListPodSandboxResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListPodSandboxResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListPodSandboxResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, &PodSandbox{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImageSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImageSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImageSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Image = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *KeyValue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: KeyValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: KeyValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LinuxContainerResources) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LinuxContainerResources: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LinuxContainerResources: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CpuPeriod", wireType) + } + m.CpuPeriod = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CpuPeriod |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CpuQuota", wireType) + } + m.CpuQuota = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CpuQuota |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CpuShares", wireType) + } + m.CpuShares = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CpuShares |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemoryLimitInBytes", wireType) + } + m.MemoryLimitInBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MemoryLimitInBytes |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OomScoreAdj", wireType) + } + m.OomScoreAdj = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OomScoreAdj |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CpusetCpus", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CpusetCpus = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CpusetMems", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CpusetMems = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SELinuxOption) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SELinuxOption: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SELinuxOption: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.User = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Role = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Level = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Capability) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Capability: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Capability: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AddCapabilities", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AddCapabilities = append(m.AddCapabilities, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DropCapabilities", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DropCapabilities = append(m.DropCapabilities, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LinuxContainerSecurityContext) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LinuxContainerSecurityContext: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LinuxContainerSecurityContext: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Capabilities", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Capabilities == nil { + m.Capabilities = &Capability{} + } + if err := m.Capabilities.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Privileged", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Privileged = bool(v != 0) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NamespaceOptions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NamespaceOptions == nil { + m.NamespaceOptions = &NamespaceOption{} + } + if err := m.NamespaceOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SelinuxOptions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SelinuxOptions == nil { + m.SelinuxOptions = &SELinuxOption{} + } + if err := m.SelinuxOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RunAsUser", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RunAsUser == nil { + m.RunAsUser = &Int64Value{} + } + if err := m.RunAsUser.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RunAsUsername", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RunAsUsername = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadonlyRootfs", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ReadonlyRootfs = bool(v != 0) + case 8: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.SupplementalGroups = append(m.SupplementalGroups, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.SupplementalGroups = append(m.SupplementalGroups, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field SupplementalGroups", wireType) + } + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ApparmorProfile", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ApparmorProfile = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SeccompProfilePath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SeccompProfilePath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NoNewPrivs", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.NoNewPrivs = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LinuxContainerConfig) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LinuxContainerConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LinuxContainerConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Resources == nil { + m.Resources = &LinuxContainerResources{} + } + if err := m.Resources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SecurityContext", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SecurityContext == nil { + m.SecurityContext = &LinuxContainerSecurityContext{} + } + if err := m.SecurityContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainerMetadata) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContainerMetadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainerMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Attempt", wireType) + } + m.Attempt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Attempt |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Device) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Device: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Device: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContainerPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HostPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HostPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Permissions = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainerConfig) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContainerConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainerConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Metadata == nil { + m.Metadata = &ContainerMetadata{} + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Image == nil { + m.Image = &ImageSpec{} + } + if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Command = append(m.Command, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Args", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Args = append(m.Args, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WorkingDir", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.WorkingDir = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Envs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Envs = append(m.Envs, &KeyValue{}) + if err := m.Envs[len(m.Envs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mounts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Mounts = append(m.Mounts, &Mount{}) + if err := m.Mounts[len(m.Mounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Devices = append(m.Devices, &Device{}) + if err := m.Devices[len(m.Devices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.Labels == nil { + m.Labels = make(map[string]string) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + m.Labels[mapkey] = mapvalue + } else { + var mapvalue string + m.Labels[mapkey] = mapvalue + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.Annotations == nil { + m.Annotations = make(map[string]string) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + m.Annotations[mapkey] = mapvalue + } else { + var mapvalue string + m.Annotations[mapkey] = mapvalue + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LogPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LogPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Stdin = bool(v != 0) + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StdinOnce", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.StdinOnce = bool(v != 0) + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Tty", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Tty = bool(v != 0) + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Linux", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Linux == nil { + m.Linux = &LinuxContainerConfig{} + } + if err := m.Linux.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CreateContainerRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CreateContainerRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateContainerRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodSandboxId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodSandboxId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Config == nil { + m.Config = &ContainerConfig{} + } + if err := m.Config.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SandboxConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SandboxConfig == nil { + m.SandboxConfig = &PodSandboxConfig{} + } + if err := m.SandboxConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CreateContainerResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CreateContainerResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateContainerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContainerId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StartContainerRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StartContainerRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StartContainerRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContainerId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StartContainerResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StartContainerResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StartContainerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StopContainerRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StopContainerRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StopContainerRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContainerId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) + } + m.Timeout = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timeout |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StopContainerResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StopContainerResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StopContainerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RemoveContainerRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RemoveContainerRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RemoveContainerRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContainerId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RemoveContainerResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RemoveContainerResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RemoveContainerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainerStateValue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContainerStateValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainerStateValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= (ContainerState(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainerFilter) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContainerFilter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainerFilter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.State == nil { + m.State = &ContainerStateValue{} + } + if err := m.State.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodSandboxId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodSandboxId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LabelSelector", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.LabelSelector == nil { + m.LabelSelector = make(map[string]string) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + m.LabelSelector[mapkey] = mapvalue + } else { + var mapvalue string + m.LabelSelector[mapkey] = mapvalue + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListContainersRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListContainersRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListContainersRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Filter == nil { + m.Filter = &ContainerFilter{} + } + if err := m.Filter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Container) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Container: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Container: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodSandboxId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodSandboxId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Metadata == nil { + m.Metadata = &ContainerMetadata{} + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Image == nil { + m.Image = &ImageSpec{} + } + if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ImageRef", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ImageRef = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= (ContainerState(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + } + m.CreatedAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CreatedAt |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.Labels == nil { + m.Labels = make(map[string]string) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + m.Labels[mapkey] = mapvalue + } else { + var mapvalue string + m.Labels[mapkey] = mapvalue + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.Annotations == nil { + m.Annotations = make(map[string]string) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + m.Annotations[mapkey] = mapvalue + } else { + var mapvalue string + m.Annotations[mapkey] = mapvalue + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListContainersResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListContainersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListContainersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Containers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Containers = append(m.Containers, &Container{}) + if err := m.Containers[len(m.Containers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainerStatusRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContainerStatusRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainerStatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContainerId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainerStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContainerStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainerStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Metadata == nil { + m.Metadata = &ContainerMetadata{} + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= (ContainerState(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + } + m.CreatedAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CreatedAt |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) + } + m.StartedAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StartedAt |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FinishedAt", wireType) + } + m.FinishedAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FinishedAt |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExitCode", wireType) + } + m.ExitCode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExitCode |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Image == nil { + m.Image = &ImageSpec{} + } + if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ImageRef", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ImageRef = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.Labels == nil { + m.Labels = make(map[string]string) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + m.Labels[mapkey] = mapvalue + } else { + var mapvalue string + m.Labels[mapkey] = mapvalue + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.Annotations == nil { + m.Annotations = make(map[string]string) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + m.Annotations[mapkey] = mapvalue + } else { + var mapvalue string + m.Annotations[mapkey] = mapvalue + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mounts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Mounts = append(m.Mounts, &Mount{}) + if err := m.Mounts[len(m.Mounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LogPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LogPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainerStatusResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContainerStatusResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainerStatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Status == nil { + m.Status = &ContainerStatus{} + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UpdateContainerResourcesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UpdateContainerResourcesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateContainerResourcesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContainerId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Linux", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Linux == nil { + m.Linux = &LinuxContainerResources{} + } + if err := m.Linux.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UpdateContainerResourcesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UpdateContainerResourcesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateContainerResourcesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExecSyncRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExecSyncRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExecSyncRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContainerId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cmd", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cmd = append(m.Cmd, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) + } + m.Timeout = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timeout |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExecSyncResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExecSyncResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExecSyncResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Stdout", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Stdout = append(m.Stdout[:0], dAtA[iNdEx:postIndex]...) + if m.Stdout == nil { + m.Stdout = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Stderr", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Stderr = append(m.Stderr[:0], dAtA[iNdEx:postIndex]...) + if m.Stderr == nil { + m.Stderr = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExitCode", wireType) + } + m.ExitCode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExitCode |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExecRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExecRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExecRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContainerId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cmd", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cmd = append(m.Cmd, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Tty", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Tty = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Stdin = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExecResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExecResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExecResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Url = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AttachRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AttachRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AttachRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContainerId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Stdin = bool(v != 0) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Tty", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Tty = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AttachResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AttachResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AttachResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Url = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PortForwardRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PortForwardRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PortForwardRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodSandboxId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodSandboxId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Port = append(m.Port, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Port = append(m.Port, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PortForwardResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PortForwardResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PortForwardResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Url = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImageFilter) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImageFilter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImageFilter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Image == nil { + m.Image = &ImageSpec{} + } + if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListImagesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListImagesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListImagesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Filter == nil { + m.Filter = &ImageFilter{} + } + if err := m.Filter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Image) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Image: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Image: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepoTags", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RepoTags = append(m.RepoTags, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepoDigests", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RepoDigests = append(m.RepoDigests, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType) + } + m.Size_ = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Size_ |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uid", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uid == nil { + m.Uid = &Int64Value{} + } + if err := m.Uid.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Username = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListImagesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListImagesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListImagesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Images", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Images = append(m.Images, &Image{}) + if err := m.Images[len(m.Images)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImageStatusRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImageStatusRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImageStatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Image == nil { + m.Image = &ImageSpec{} + } + if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImageStatusResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImageStatusResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImageStatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Image == nil { + m.Image = &Image{} + } + if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AuthConfig) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AuthConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AuthConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Username = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Password = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Auth", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Auth = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ServerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IdentityToken", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IdentityToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RegistryToken", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RegistryToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PullImageRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PullImageRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PullImageRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Image == nil { + m.Image = &ImageSpec{} + } + if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Auth", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Auth == nil { + m.Auth = &AuthConfig{} + } + if err := m.Auth.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SandboxConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SandboxConfig == nil { + m.SandboxConfig = &PodSandboxConfig{} + } + if err := m.SandboxConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PullImageResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PullImageResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PullImageResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ImageRef", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ImageRef = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RemoveImageRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RemoveImageRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RemoveImageRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Image == nil { + m.Image = &ImageSpec{} + } + if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RemoveImageResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RemoveImageResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RemoveImageResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NetworkConfig) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NetworkConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NetworkConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodCidr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodCidr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RuntimeConfig) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RuntimeConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RuntimeConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NetworkConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NetworkConfig == nil { + m.NetworkConfig = &NetworkConfig{} + } + if err := m.NetworkConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UpdateRuntimeConfigRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UpdateRuntimeConfigRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateRuntimeConfigRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RuntimeConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RuntimeConfig == nil { + m.RuntimeConfig = &RuntimeConfig{} + } + if err := m.RuntimeConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UpdateRuntimeConfigResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UpdateRuntimeConfigResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateRuntimeConfigResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RuntimeCondition) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RuntimeCondition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RuntimeCondition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Status = bool(v != 0) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RuntimeStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RuntimeStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RuntimeStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Conditions = append(m.Conditions, &RuntimeCondition{}) + if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StatusRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StatusRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StatusResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StatusResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Status == nil { + m.Status = &RuntimeStatus{} + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImageFsInfoRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImageFsInfoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImageFsInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UInt64Value) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UInt64Value: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UInt64Value: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + m.Value = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Value |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StorageIdentifier) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StorageIdentifier: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StorageIdentifier: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uuid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Uuid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FilesystemUsage) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FilesystemUsage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FilesystemUsage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + m.Timestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timestamp |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StorageId == nil { + m.StorageId = &StorageIdentifier{} + } + if err := m.StorageId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UsedBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.UsedBytes == nil { + m.UsedBytes = &UInt64Value{} + } + if err := m.UsedBytes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InodesUsed", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.InodesUsed == nil { + m.InodesUsed = &UInt64Value{} + } + if err := m.InodesUsed.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImageFsInfoResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImageFsInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImageFsInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ImageFilesystems", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ImageFilesystems = append(m.ImageFilesystems, &FilesystemUsage{}) + if err := m.ImageFilesystems[len(m.ImageFilesystems)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainerStatsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContainerStatsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainerStatsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContainerId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainerStatsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContainerStatsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainerStatsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Stats", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Stats == nil { + m.Stats = &ContainerStats{} + } + if err := m.Stats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListContainerStatsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListContainerStatsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListContainerStatsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Filter == nil { + m.Filter = &ContainerStatsFilter{} + } + if err := m.Filter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainerStatsFilter) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContainerStatsFilter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainerStatsFilter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodSandboxId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodSandboxId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LabelSelector", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.LabelSelector == nil { + m.LabelSelector = make(map[string]string) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + m.LabelSelector[mapkey] = mapvalue + } else { + var mapvalue string + m.LabelSelector[mapkey] = mapvalue + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListContainerStatsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListContainerStatsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListContainerStatsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Stats", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Stats = append(m.Stats, &ContainerStats{}) + if err := m.Stats[len(m.Stats)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainerAttributes) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContainerAttributes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainerAttributes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Metadata == nil { + m.Metadata = &ContainerMetadata{} + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.Labels == nil { + m.Labels = make(map[string]string) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + m.Labels[mapkey] = mapvalue + } else { + var mapvalue string + m.Labels[mapkey] = mapvalue + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.Annotations == nil { + m.Annotations = make(map[string]string) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + m.Annotations[mapkey] = mapvalue + } else { + var mapvalue string + m.Annotations[mapkey] = mapvalue + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainerStats) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContainerStats: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainerStats: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Attributes == nil { + m.Attributes = &ContainerAttributes{} + } + if err := m.Attributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cpu", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Cpu == nil { + m.Cpu = &CpuUsage{} + } + if err := m.Cpu.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Memory", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Memory == nil { + m.Memory = &MemoryUsage{} + } + if err := m.Memory.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WritableLayer", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.WritableLayer == nil { + m.WritableLayer = &FilesystemUsage{} + } + if err := m.WritableLayer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CpuUsage) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CpuUsage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CpuUsage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + m.Timestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timestamp |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UsageCoreNanoSeconds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.UsageCoreNanoSeconds == nil { + m.UsageCoreNanoSeconds = &UInt64Value{} + } + if err := m.UsageCoreNanoSeconds.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MemoryUsage) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MemoryUsage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MemoryUsage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + m.Timestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timestamp |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WorkingSetBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.WorkingSetBytes == nil { + m.WorkingSetBytes = &UInt64Value{} + } + if err := m.WorkingSetBytes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipApi(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowApi + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowApi + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowApi + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthApi + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowApi + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipApi(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowApi = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("api.proto", fileDescriptorApi) } + +var fileDescriptorApi = []byte{ + // 4276 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x3b, 0x4d, 0x6f, 0x1b, 0x49, + 0x76, 0x22, 0xa9, 0x0f, 0xf2, 0x51, 0xa4, 0xa8, 0x92, 0x2c, 0x51, 0xb4, 0x2d, 0xcb, 0xed, 0xf1, + 0x8c, 0xed, 0x5d, 0x7b, 0x3c, 0x9a, 0x1d, 0x4f, 0xc6, 0xf3, 0x65, 0x8e, 0x24, 0x3b, 0x1a, 0xdb, + 0x94, 0xb6, 0x29, 0xcd, 0xee, 0x66, 0x03, 0x74, 0x5a, 0xec, 0x12, 0xd5, 0x33, 0x64, 0x77, 0x4f, + 0x77, 0xb5, 0x6d, 0x05, 0x39, 0x24, 0x97, 0x20, 0x97, 0x00, 0x9b, 0x63, 0x6e, 0x39, 0x04, 0x58, + 0xe4, 0x92, 0x43, 0x0e, 0x41, 0x7e, 0x41, 0xb0, 0x97, 0x05, 0x02, 0x04, 0x08, 0x92, 0x5b, 0xd6, + 0x39, 0xe4, 0x10, 0x20, 0xbf, 0x61, 0x51, 0x5f, 0xdd, 0xd5, 0x5f, 0xb4, 0xe4, 0x19, 0xec, 0xfa, + 0xc4, 0xae, 0x57, 0xaf, 0x5e, 0xbd, 0x7a, 0xef, 0xd5, 0xab, 0xf7, 0x5e, 0x15, 0xa1, 0x66, 0x7a, + 0xf6, 0x1d, 0xcf, 0x77, 0x89, 0x8b, 0xe6, 0xfc, 0xd0, 0x21, 0xf6, 0x18, 0x77, 0x6e, 0x0f, 0x6d, + 0x72, 0x12, 0x1e, 0xdd, 0x19, 0xb8, 0xe3, 0x77, 0x87, 0xee, 0xd0, 0x7d, 0x97, 0xf5, 0x1f, 0x85, + 0xc7, 0xac, 0xc5, 0x1a, 0xec, 0x8b, 0x8f, 0xd3, 0x6e, 0x41, 0xf3, 0x2b, 0xec, 0x07, 0xb6, 0xeb, + 0xe8, 0xf8, 0xdb, 0x10, 0x07, 0x04, 0xb5, 0x61, 0xee, 0x19, 0x87, 0xb4, 0x4b, 0x1b, 0xa5, 0x1b, + 0x35, 0x5d, 0x36, 0xb5, 0x5f, 0x96, 0x60, 0x21, 0x42, 0x0e, 0x3c, 0xd7, 0x09, 0x70, 0x31, 0x36, + 0xba, 0x0a, 0xf3, 0x82, 0x27, 0xc3, 0x31, 0xc7, 0xb8, 0x5d, 0x66, 0xdd, 0x75, 0x01, 0xeb, 0x99, + 0x63, 0x8c, 0xde, 0x81, 0x05, 0x89, 0x22, 0x89, 0x54, 0x18, 0x56, 0x53, 0x80, 0xc5, 0x6c, 0xe8, + 0x0e, 0x2c, 0x49, 0x44, 0xd3, 0xb3, 0x23, 0xe4, 0x69, 0x86, 0xbc, 0x28, 0xba, 0xba, 0x9e, 0x2d, + 0xf0, 0xb5, 0x9f, 0x43, 0x6d, 0xbb, 0xd7, 0xdf, 0x72, 0x9d, 0x63, 0x7b, 0x48, 0x59, 0x0c, 0xb0, + 0x4f, 0xc7, 0xb4, 0x4b, 0x1b, 0x15, 0xca, 0xa2, 0x68, 0xa2, 0x0e, 0x54, 0x03, 0x6c, 0xfa, 0x83, + 0x13, 0x1c, 0xb4, 0xcb, 0xac, 0x2b, 0x6a, 0xd3, 0x51, 0xae, 0x47, 0x6c, 0xd7, 0x09, 0xda, 0x15, + 0x3e, 0x4a, 0x34, 0xb5, 0xbf, 0x2d, 0x41, 0x7d, 0xdf, 0xf5, 0xc9, 0x53, 0xd3, 0xf3, 0x6c, 0x67, + 0x88, 0x6e, 0x43, 0x95, 0xc9, 0x72, 0xe0, 0x8e, 0x98, 0x0c, 0x9a, 0x9b, 0x8b, 0x77, 0x04, 0x4b, + 0x77, 0xf6, 0x45, 0x87, 0x1e, 0xa1, 0xa0, 0xeb, 0xd0, 0x1c, 0xb8, 0x0e, 0x31, 0x6d, 0x07, 0xfb, + 0x86, 0xe7, 0xfa, 0x84, 0x49, 0x66, 0x46, 0x6f, 0x44, 0x50, 0x4a, 0x1c, 0x5d, 0x84, 0xda, 0x89, + 0x1b, 0x10, 0x8e, 0x51, 0x61, 0x18, 0x55, 0x0a, 0x60, 0x9d, 0xab, 0x30, 0xc7, 0x3a, 0x6d, 0x4f, + 0xc8, 0x60, 0x96, 0x36, 0x77, 0x3d, 0xed, 0xd7, 0x25, 0x98, 0x79, 0xea, 0x86, 0x0e, 0x49, 0x4d, + 0x63, 0x92, 0x13, 0xa1, 0x1f, 0x65, 0x1a, 0x93, 0x9c, 0xc4, 0xd3, 0x50, 0x0c, 0xae, 0x22, 0x3e, + 0x0d, 0xed, 0xec, 0x40, 0xd5, 0xc7, 0xa6, 0xe5, 0x3a, 0xa3, 0x53, 0xc6, 0x42, 0x55, 0x8f, 0xda, + 0x54, 0x77, 0x01, 0x1e, 0xd9, 0x4e, 0xf8, 0xc2, 0xf0, 0xf1, 0xc8, 0x3c, 0xc2, 0x23, 0xc6, 0x4a, + 0x55, 0x6f, 0x0a, 0xb0, 0xce, 0xa1, 0xe8, 0x63, 0xa8, 0x7b, 0xbe, 0xeb, 0x99, 0x43, 0x93, 0x8a, + 0xaf, 0x3d, 0xc3, 0x24, 0xb4, 0x16, 0x49, 0x88, 0x71, 0xbb, 0x1f, 0x23, 0xe8, 0x2a, 0xb6, 0xf6, + 0x35, 0x2c, 0x50, 0x4b, 0x09, 0x3c, 0x73, 0x80, 0xf7, 0x98, 0xfc, 0xa9, 0x5d, 0x31, 0x8e, 0x1d, + 0x4c, 0x9e, 0xbb, 0xfe, 0x37, 0x6c, 0x59, 0x55, 0xbd, 0x4e, 0x61, 0x3d, 0x0e, 0x42, 0x6b, 0x50, + 0xe5, 0x8b, 0xb2, 0x2d, 0xb6, 0xa6, 0xaa, 0xce, 0xc4, 0xb5, 0x6f, 0x5b, 0x51, 0x97, 0xed, 0x0d, + 0xc4, 0x92, 0xe6, 0xb8, 0xe8, 0x06, 0x9a, 0x06, 0xb0, 0xeb, 0x90, 0x7b, 0x3f, 0xfa, 0xca, 0x1c, + 0x85, 0x18, 0x2d, 0xc3, 0xcc, 0x33, 0xfa, 0xc1, 0xe8, 0x57, 0x74, 0xde, 0xd0, 0xfe, 0xb2, 0x02, + 0x17, 0x9f, 0xd0, 0xd5, 0xf5, 0x4d, 0xc7, 0x3a, 0x72, 0x5f, 0xf4, 0xf1, 0x20, 0xf4, 0x6d, 0x72, + 0xba, 0xe5, 0x3a, 0x04, 0xbf, 0x20, 0x68, 0x07, 0x16, 0x1d, 0xc9, 0xaf, 0x21, 0xed, 0x87, 0x52, + 0xa8, 0x6f, 0xb6, 0xa3, 0x25, 0xa7, 0x56, 0xa4, 0xb7, 0x9c, 0x24, 0x20, 0x40, 0x9f, 0xc7, 0xc2, + 0x95, 0x44, 0xca, 0x8c, 0xc8, 0x4a, 0x44, 0xa4, 0xbf, 0xc3, 0xf8, 0x10, 0x24, 0xa4, 0xd0, 0x25, + 0x81, 0xf7, 0x81, 0x6e, 0x34, 0xc3, 0x0c, 0x8c, 0x30, 0xc0, 0x3e, 0x5b, 0x69, 0x7d, 0x73, 0x29, + 0x1a, 0x1c, 0xaf, 0x53, 0xaf, 0xf9, 0xa1, 0xd3, 0x0d, 0x0e, 0x03, 0xec, 0xb3, 0xed, 0x28, 0xd4, + 0x6b, 0xf8, 0xae, 0x4b, 0x8e, 0x03, 0xa9, 0x52, 0x09, 0xd6, 0x19, 0x14, 0xbd, 0x0b, 0x4b, 0x41, + 0xe8, 0x79, 0x23, 0x3c, 0xc6, 0x0e, 0x31, 0x47, 0xc6, 0xd0, 0x77, 0x43, 0x2f, 0x68, 0xcf, 0x6c, + 0x54, 0x6e, 0x54, 0x74, 0xa4, 0x76, 0x3d, 0x62, 0x3d, 0x68, 0x1d, 0xc0, 0xf3, 0xed, 0x67, 0xf6, + 0x08, 0x0f, 0xb1, 0xd5, 0x9e, 0x65, 0x44, 0x15, 0x08, 0xba, 0x0b, 0xcb, 0x01, 0x1e, 0x0c, 0xdc, + 0xb1, 0x67, 0x78, 0xbe, 0x7b, 0x6c, 0x8f, 0x30, 0x37, 0xc8, 0x39, 0x66, 0x90, 0x48, 0xf4, 0xed, + 0xf3, 0x2e, 0x6a, 0x9a, 0xda, 0x2f, 0xca, 0x70, 0x81, 0x09, 0x60, 0xdf, 0xb5, 0x84, 0x2e, 0xc4, + 0x76, 0xbf, 0x06, 0x8d, 0x01, 0x63, 0xc8, 0xf0, 0x4c, 0x1f, 0x3b, 0x44, 0xd8, 0xfd, 0x3c, 0x07, + 0xee, 0x33, 0x18, 0xda, 0x83, 0x56, 0x20, 0x54, 0x67, 0x0c, 0xb8, 0xee, 0x84, 0x84, 0xdf, 0x8a, + 0x84, 0x34, 0x41, 0xcf, 0xfa, 0x42, 0x90, 0x51, 0xfc, 0x5c, 0x70, 0x1a, 0x0c, 0xc8, 0x88, 0xbb, + 0x8b, 0xfa, 0xe6, 0x0f, 0x92, 0x74, 0xd2, 0x6c, 0xde, 0xe9, 0x73, 0xec, 0x1d, 0x87, 0xf8, 0xa7, + 0xba, 0x1c, 0xdb, 0xb9, 0x0f, 0xf3, 0x6a, 0x07, 0x6a, 0x41, 0xe5, 0x1b, 0x7c, 0x2a, 0x96, 0x40, + 0x3f, 0x63, 0xbb, 0xe4, 0x9b, 0x95, 0x37, 0xee, 0x97, 0xff, 0xa0, 0xa4, 0xf9, 0x80, 0xe2, 0x59, + 0x9e, 0x62, 0x62, 0x5a, 0x26, 0x31, 0x11, 0x82, 0x69, 0xe6, 0x7e, 0x39, 0x09, 0xf6, 0x4d, 0xa9, + 0x86, 0x62, 0x6b, 0xd4, 0x74, 0xfa, 0x89, 0x2e, 0x41, 0x2d, 0x32, 0x42, 0xe1, 0x83, 0x63, 0x00, + 0xf5, 0x85, 0x26, 0x21, 0x78, 0xec, 0x11, 0x66, 0x10, 0x0d, 0x5d, 0x36, 0xb5, 0x7f, 0x99, 0x86, + 0x56, 0x46, 0x03, 0x1f, 0x42, 0x75, 0x2c, 0xa6, 0x17, 0xb6, 0x7f, 0x31, 0x76, 0x88, 0x19, 0x0e, + 0xf5, 0x08, 0x99, 0xfa, 0x1b, 0xba, 0x19, 0x95, 0xe3, 0x22, 0x6a, 0x53, 0xb5, 0x8e, 0xdc, 0xa1, + 0x61, 0xd9, 0x3e, 0x1e, 0x10, 0xd7, 0x3f, 0x15, 0x5c, 0xce, 0x8f, 0xdc, 0xe1, 0xb6, 0x84, 0xa1, + 0xf7, 0x00, 0x2c, 0x27, 0xa0, 0x1a, 0x3d, 0xb6, 0x87, 0x8c, 0xd7, 0xfa, 0x26, 0x8a, 0xe6, 0x8e, + 0x8e, 0x04, 0xbd, 0x66, 0x39, 0x81, 0x60, 0xf6, 0x23, 0x68, 0x50, 0x17, 0x6b, 0x8c, 0xb9, 0x37, + 0xe7, 0x56, 0x5c, 0xdf, 0x5c, 0x56, 0x38, 0x8e, 0x5c, 0xbd, 0x3e, 0xef, 0xc5, 0x8d, 0x00, 0x7d, + 0x0a, 0xb3, 0xcc, 0xc5, 0x05, 0xed, 0x59, 0x36, 0xe6, 0x7a, 0xce, 0x2a, 0x85, 0xb6, 0x9f, 0x30, + 0x3c, 0xae, 0x6c, 0x31, 0x08, 0x3d, 0x81, 0xba, 0xe9, 0x38, 0x2e, 0x31, 0xf9, 0x06, 0x9f, 0x63, + 0x34, 0x6e, 0x15, 0xd3, 0xe8, 0xc6, 0xc8, 0x9c, 0x90, 0x3a, 0x1c, 0xfd, 0x08, 0x66, 0x98, 0x07, + 0x68, 0x57, 0xd9, 0xaa, 0xd7, 0x27, 0x9b, 0x9f, 0xce, 0x91, 0x3b, 0x1f, 0x41, 0x5d, 0x61, 0xed, + 0x3c, 0xe6, 0xd6, 0xf9, 0x0c, 0x5a, 0x69, 0x8e, 0xce, 0x65, 0xae, 0xbb, 0xb0, 0xac, 0x87, 0x4e, + 0xcc, 0x98, 0x8c, 0x3f, 0xde, 0x83, 0x59, 0xa1, 0x3f, 0x6e, 0x3b, 0x6b, 0x85, 0x12, 0xd1, 0x05, + 0xa2, 0xf6, 0x29, 0x5c, 0x48, 0x91, 0x12, 0xd1, 0xc9, 0x5b, 0xd0, 0xf4, 0x5c, 0xcb, 0x08, 0x38, + 0xd8, 0xb0, 0x2d, 0xe9, 0x0c, 0xbc, 0x08, 0x77, 0xd7, 0xa2, 0xc3, 0xfb, 0xc4, 0xf5, 0xb2, 0xac, + 0x9c, 0x6d, 0x78, 0x1b, 0x56, 0xd2, 0xc3, 0xf9, 0xf4, 0xda, 0xe7, 0xb0, 0xaa, 0xe3, 0xb1, 0xfb, + 0x0c, 0xbf, 0x2e, 0xe9, 0x0e, 0xb4, 0xb3, 0x04, 0x62, 0xe2, 0x31, 0xb4, 0x4f, 0x4c, 0x12, 0x06, + 0xe7, 0x23, 0x7e, 0x53, 0x25, 0x20, 0x8e, 0x4e, 0x4e, 0x07, 0x35, 0xa1, 0x6c, 0x7b, 0x62, 0x50, + 0xd9, 0xf6, 0xb4, 0xcf, 0xa1, 0x16, 0x1d, 0x5a, 0x68, 0x33, 0x8e, 0x8c, 0xca, 0xaf, 0x38, 0xd9, + 0xa2, 0x98, 0xe9, 0x71, 0xc6, 0x5b, 0x8b, 0x99, 0x36, 0x01, 0x22, 0x3f, 0x23, 0x4f, 0x4a, 0x94, + 0xa5, 0xa7, 0x2b, 0x58, 0xda, 0xdf, 0x27, 0x9c, 0x8e, 0xc2, 0xb2, 0x15, 0xb1, 0x6c, 0x25, 0x9c, + 0x50, 0xf9, 0x3c, 0x4e, 0xe8, 0x0e, 0xcc, 0x04, 0xc4, 0x24, 0xdc, 0x0d, 0x36, 0x95, 0xc5, 0x25, + 0xa7, 0xc4, 0x3a, 0x47, 0x43, 0x97, 0x01, 0x06, 0x3e, 0x36, 0x09, 0xb6, 0x0c, 0x93, 0xfb, 0xc7, + 0x8a, 0x5e, 0x13, 0x90, 0x2e, 0x41, 0xf7, 0x61, 0x4e, 0x46, 0x2a, 0x33, 0x8c, 0x8d, 0x8d, 0x1c, + 0x82, 0x09, 0xe9, 0xeb, 0x72, 0x40, 0xbc, 0xa7, 0x67, 0x27, 0xef, 0x69, 0x31, 0x8e, 0x23, 0x2b, + 0x6e, 0x69, 0xae, 0xd0, 0x2d, 0xf1, 0x11, 0x67, 0x71, 0x4b, 0xd5, 0x42, 0xb7, 0x24, 0x68, 0x4c, + 0x74, 0x4b, 0xbf, 0x4f, 0x07, 0xf3, 0x14, 0xda, 0xd9, 0x0d, 0x22, 0x1c, 0xc3, 0x7b, 0x30, 0x1b, + 0x30, 0xc8, 0x04, 0x27, 0x23, 0x86, 0x08, 0x44, 0xed, 0x21, 0x2c, 0xa7, 0x2c, 0x80, 0x07, 0x8a, + 0x91, 0xbd, 0x94, 0xce, 0x64, 0x2f, 0xda, 0xff, 0x97, 0x54, 0xeb, 0x7d, 0x68, 0x8f, 0x08, 0xf6, + 0x33, 0xd6, 0xfb, 0xbe, 0x24, 0xca, 0x4d, 0xf7, 0x72, 0x11, 0x51, 0x1e, 0xc3, 0x09, 0x4b, 0xec, + 0x43, 0x93, 0xe9, 0xd0, 0x08, 0xf0, 0x88, 0x1d, 0x88, 0x22, 0x14, 0xf9, 0x61, 0xce, 0x68, 0x3e, + 0x2f, 0x37, 0x80, 0xbe, 0x40, 0xe7, 0xea, 0x6b, 0x8c, 0x54, 0x58, 0xe7, 0x01, 0xa0, 0x2c, 0xd2, + 0xb9, 0xf4, 0xf0, 0x25, 0xdd, 0xfb, 0x34, 0x71, 0xc9, 0xf1, 0xf4, 0xc7, 0x8c, 0x8d, 0x09, 0x4a, + 0xe0, 0x7c, 0xea, 0x02, 0x51, 0xfb, 0xbb, 0x0a, 0x40, 0xdc, 0xf9, 0xc6, 0x6e, 0xfa, 0x0f, 0xa3, + 0x2d, 0xc8, 0xa3, 0x89, 0x2b, 0x39, 0xf4, 0x72, 0x37, 0xdf, 0xc3, 0xe4, 0xe6, 0xe3, 0x71, 0xc5, + 0x5b, 0x79, 0xa3, 0xdf, 0xd8, 0x6d, 0xb7, 0x05, 0x2b, 0x69, 0x75, 0x8b, 0x4d, 0x77, 0x13, 0x66, + 0x6c, 0x82, 0xc7, 0x3c, 0x0d, 0x57, 0xd3, 0x11, 0x05, 0x97, 0x63, 0x68, 0x57, 0xa1, 0xb6, 0x3b, + 0x36, 0x87, 0xb8, 0xef, 0xe1, 0x01, 0x9d, 0xcb, 0xa6, 0x0d, 0x31, 0x3f, 0x6f, 0x68, 0x9b, 0x50, + 0x7d, 0x8c, 0x4f, 0xf9, 0x1e, 0x3c, 0x23, 0x7f, 0xda, 0x5f, 0x97, 0x61, 0x95, 0xf9, 0xce, 0x2d, + 0x99, 0x04, 0xeb, 0x38, 0x70, 0x43, 0x7f, 0x80, 0x03, 0xa6, 0x52, 0x2f, 0x34, 0x3c, 0xec, 0xdb, + 0xae, 0x25, 0xb2, 0xbe, 0xda, 0xc0, 0x0b, 0xf7, 0x19, 0x80, 0x26, 0xca, 0xb4, 0xfb, 0xdb, 0xd0, + 0x15, 0xb6, 0x55, 0xd1, 0xab, 0x03, 0x2f, 0xfc, 0x31, 0x6d, 0xcb, 0xb1, 0xc1, 0x89, 0xe9, 0xe3, + 0x80, 0xd9, 0x10, 0x1f, 0xdb, 0x67, 0x00, 0xf4, 0x1e, 0x5c, 0x18, 0xe3, 0xb1, 0xeb, 0x9f, 0x1a, + 0x23, 0x7b, 0x6c, 0x13, 0xc3, 0x76, 0x8c, 0xa3, 0x53, 0x82, 0x03, 0x61, 0x38, 0x88, 0x77, 0x3e, + 0xa1, 0x7d, 0xbb, 0xce, 0x17, 0xb4, 0x07, 0x69, 0xd0, 0x70, 0xdd, 0xb1, 0x11, 0x0c, 0x5c, 0x1f, + 0x1b, 0xa6, 0xf5, 0x35, 0x3b, 0x3c, 0x2a, 0x7a, 0xdd, 0x75, 0xc7, 0x7d, 0x0a, 0xeb, 0x5a, 0x5f, + 0xa3, 0x2b, 0x50, 0x1f, 0x78, 0x61, 0x80, 0x89, 0x41, 0x7f, 0xd8, 0x21, 0x51, 0xd3, 0x81, 0x83, + 0xb6, 0xbc, 0x30, 0x50, 0x10, 0xc6, 0x54, 0xec, 0x73, 0x2a, 0xc2, 0x53, 0x2a, 0x66, 0x13, 0x1a, + 0x89, 0x3c, 0x92, 0x66, 0x0b, 0x2c, 0x61, 0x14, 0xd9, 0x02, 0xfd, 0xa6, 0x30, 0xdf, 0x1d, 0x49, + 0x49, 0xb2, 0x6f, 0x0a, 0x23, 0xa7, 0x9e, 0x4c, 0x15, 0xd8, 0x37, 0x15, 0xf9, 0x08, 0x3f, 0x13, + 0x75, 0x80, 0x9a, 0xce, 0x1b, 0x9a, 0x05, 0xb0, 0x65, 0x7a, 0xe6, 0x91, 0x3d, 0xb2, 0xc9, 0x29, + 0xba, 0x09, 0x2d, 0xd3, 0xb2, 0x8c, 0x81, 0x84, 0xd8, 0x58, 0x16, 0x65, 0x16, 0x4c, 0xcb, 0xda, + 0x52, 0xc0, 0xe8, 0x07, 0xb0, 0x68, 0xf9, 0xae, 0x97, 0xc4, 0xe5, 0x55, 0x9a, 0x16, 0xed, 0x50, + 0x91, 0xb5, 0x7f, 0x9e, 0x86, 0xcb, 0x49, 0xc5, 0xa6, 0x33, 0xf3, 0x0f, 0x61, 0x3e, 0x35, 0x6b, + 0x32, 0x25, 0x8e, 0x99, 0xd4, 0x13, 0x88, 0xa9, 0xdc, 0xb5, 0x9c, 0xc9, 0x5d, 0x73, 0x53, 0xfe, + 0xca, 0xf7, 0x91, 0xf2, 0x4f, 0x7f, 0x97, 0x94, 0x7f, 0xe6, 0x4c, 0x29, 0xff, 0xdb, 0xac, 0x02, + 0x27, 0x07, 0xb1, 0xc4, 0x8b, 0x9b, 0x51, 0x23, 0xc2, 0x71, 0x64, 0xa5, 0x2e, 0x55, 0x1a, 0x98, + 0x3b, 0x4f, 0x69, 0xa0, 0x5a, 0x58, 0x1a, 0xa0, 0x16, 0xe1, 0x79, 0xa6, 0x3f, 0x76, 0x7d, 0x99, + 0xfb, 0xb7, 0x6b, 0x8c, 0x85, 0x05, 0x09, 0x17, 0x79, 0x7f, 0x61, 0x95, 0x00, 0x8a, 0xaa, 0x04, + 0x68, 0x03, 0xe6, 0x1d, 0xd7, 0x70, 0xf0, 0x73, 0x83, 0x2a, 0x2c, 0x68, 0xd7, 0xb9, 0xf6, 0x1c, + 0xb7, 0x87, 0x9f, 0xef, 0x53, 0x88, 0xf6, 0x0f, 0x25, 0x58, 0x4e, 0x1a, 0x8e, 0xc8, 0x0b, 0x3f, + 0x83, 0x9a, 0x2f, 0x7d, 0x83, 0x30, 0x96, 0x8d, 0x64, 0xfc, 0x95, 0xf5, 0x21, 0x7a, 0x3c, 0x04, + 0xfd, 0xb8, 0xb0, 0xc2, 0xf0, 0x76, 0x01, 0x99, 0x57, 0xd5, 0x18, 0xb4, 0x2e, 0x2c, 0x46, 0xc8, + 0x13, 0xf3, 0x7b, 0x25, 0x5f, 0x2f, 0x27, 0xf3, 0x75, 0x07, 0x66, 0xb7, 0xf1, 0x33, 0x7b, 0x80, + 0xbf, 0x97, 0xfa, 0xe0, 0x06, 0xd4, 0x3d, 0xec, 0x8f, 0xed, 0x20, 0x88, 0x8c, 0xbe, 0xa6, 0xab, + 0x20, 0xed, 0xbf, 0x66, 0x60, 0x21, 0x2d, 0xd9, 0x7b, 0x99, 0xf2, 0x40, 0x27, 0xde, 0x85, 0xe9, + 0xf5, 0x29, 0x67, 0xf4, 0x0d, 0x79, 0x0c, 0x94, 0x53, 0x59, 0x42, 0x74, 0x52, 0x88, 0xa3, 0x81, + 0xae, 0x7f, 0xe0, 0x8e, 0xc7, 0xa6, 0x63, 0xc9, 0xda, 0xad, 0x68, 0x52, 0x69, 0x99, 0xfe, 0x90, + 0x6e, 0x2d, 0x0a, 0x66, 0xdf, 0xd4, 0x4b, 0xd2, 0x68, 0xdb, 0x76, 0x58, 0x75, 0x81, 0x6d, 0x9c, + 0x9a, 0x0e, 0x02, 0xb4, 0x6d, 0xfb, 0xe8, 0x3a, 0x4c, 0x63, 0xe7, 0x99, 0x3c, 0x8d, 0xe3, 0xe2, + 0xae, 0x3c, 0x7e, 0x74, 0xd6, 0x8d, 0xde, 0x86, 0xd9, 0xb1, 0x1b, 0x3a, 0x44, 0xc6, 0xdd, 0xcd, + 0x64, 0x8d, 0x53, 0x17, 0xbd, 0xe8, 0x26, 0xcc, 0x59, 0x4c, 0x07, 0x32, 0xb8, 0x5e, 0x88, 0x2b, + 0x14, 0x0c, 0xae, 0xcb, 0x7e, 0xf4, 0x49, 0x14, 0x47, 0xd4, 0x52, 0x91, 0x40, 0x4a, 0xa8, 0xb9, + 0xc1, 0xc4, 0xe3, 0x64, 0x30, 0x01, 0x8c, 0xc4, 0xcd, 0x42, 0x12, 0x93, 0xeb, 0x0b, 0x6b, 0x50, + 0x1d, 0xb9, 0x43, 0x6e, 0x07, 0x75, 0x5e, 0xe9, 0x1f, 0xb9, 0x43, 0x66, 0x06, 0xcb, 0x34, 0x78, + 0xb2, 0x6c, 0xa7, 0x3d, 0xcf, 0xb6, 0x17, 0x6f, 0xd0, 0x33, 0x91, 0x7d, 0x18, 0xae, 0x33, 0xc0, + 0xed, 0x06, 0xeb, 0xaa, 0x31, 0xc8, 0x9e, 0x33, 0x60, 0x47, 0x36, 0x21, 0xa7, 0xed, 0x26, 0x83, + 0xd3, 0x4f, 0x1a, 0xf3, 0xf2, 0x6c, 0x67, 0x21, 0x15, 0xf3, 0xe6, 0xed, 0xcf, 0x37, 0xa0, 0x80, + 0xf1, 0x4f, 0x25, 0x58, 0xd9, 0x62, 0x21, 0x9f, 0xe2, 0x09, 0xce, 0x91, 0x80, 0xa3, 0xbb, 0x51, + 0xa5, 0x23, 0x9d, 0x47, 0xa7, 0x17, 0x2b, 0xf0, 0xd0, 0x03, 0x68, 0x4a, 0x9a, 0x62, 0x64, 0xe5, + 0x55, 0x35, 0x92, 0x46, 0xa0, 0x36, 0xb5, 0x4f, 0x60, 0x35, 0xc3, 0xb3, 0x08, 0xcf, 0xae, 0xc2, + 0x7c, 0xec, 0x11, 0x22, 0x96, 0xeb, 0x11, 0x6c, 0xd7, 0xd2, 0xee, 0xc3, 0x85, 0x3e, 0x31, 0x7d, + 0x92, 0x59, 0xf0, 0x19, 0xc6, 0xb2, 0x32, 0x49, 0x72, 0xac, 0xa8, 0x64, 0xf4, 0x61, 0xb9, 0x4f, + 0x5c, 0xef, 0x35, 0x88, 0xd2, 0x9d, 0x4e, 0x97, 0xed, 0x86, 0x44, 0xc4, 0x64, 0xb2, 0xa9, 0xad, + 0xf2, 0xa2, 0x4e, 0x76, 0xb6, 0x8f, 0x61, 0x85, 0xd7, 0x54, 0x5e, 0x67, 0x11, 0x6b, 0xb2, 0xa2, + 0x93, 0xa5, 0xbb, 0x0d, 0x4b, 0xb1, 0x2b, 0x8f, 0xd3, 0xc3, 0xdb, 0xc9, 0xf4, 0x70, 0x35, 0xab, + 0xe3, 0x44, 0x76, 0xf8, 0x37, 0x65, 0xc5, 0x61, 0x16, 0x24, 0x87, 0x9b, 0xc9, 0xe4, 0xf0, 0x52, + 0x01, 0xc9, 0x44, 0x6e, 0x98, 0xb5, 0xc8, 0x4a, 0x8e, 0x45, 0xea, 0x99, 0x0c, 0x72, 0x3a, 0x55, + 0xcc, 0x4e, 0xf1, 0xf6, 0x3b, 0x49, 0x20, 0x77, 0x79, 0x02, 0x19, 0x4d, 0x1d, 0xd5, 0xb9, 0xee, + 0xa6, 0x12, 0xc8, 0x76, 0x11, 0x9b, 0x51, 0xfe, 0xf8, 0x57, 0xd3, 0x50, 0x8b, 0xfa, 0x32, 0x82, + 0xcd, 0x0a, 0xa9, 0x9c, 0x23, 0x24, 0xf5, 0xfc, 0xaa, 0xbc, 0xce, 0xf9, 0x35, 0xfd, 0xaa, 0xf3, + 0xeb, 0x22, 0xd4, 0xd8, 0x87, 0xe1, 0xe3, 0x63, 0x71, 0x1e, 0x55, 0x19, 0x40, 0xc7, 0xc7, 0xb1, + 0x41, 0xcd, 0x9e, 0xc5, 0xa0, 0x52, 0x99, 0xea, 0x5c, 0x3a, 0x53, 0xbd, 0x17, 0x9d, 0x30, 0xfc, + 0x2c, 0x5a, 0xcf, 0x92, 0xcb, 0x3d, 0x5b, 0x76, 0x92, 0x67, 0x0b, 0x3f, 0x9e, 0xae, 0xe5, 0x0c, + 0x7e, 0x63, 0xf3, 0xd4, 0x27, 0x3c, 0x4f, 0x55, 0xad, 0x4a, 0x38, 0xc2, 0x4d, 0x80, 0x68, 0xcf, + 0xcb, 0x64, 0x15, 0x65, 0x97, 0xa6, 0x2b, 0x58, 0xd4, 0xab, 0x24, 0xe4, 0x1f, 0x17, 0x63, 0xcf, + 0xe0, 0x55, 0xfe, 0x55, 0x8d, 0x92, 0x0a, 0xea, 0x99, 0xf7, 0x32, 0xa5, 0x8d, 0xb3, 0x59, 0xdd, + 0xed, 0x64, 0x65, 0xe3, 0x7c, 0xe6, 0x92, 0x29, 0x6c, 0xb0, 0x43, 0xdd, 0xf4, 0x45, 0x37, 0xcf, + 0x49, 0x6b, 0x02, 0xd2, 0x25, 0x34, 0x94, 0x3a, 0xb6, 0x1d, 0x3b, 0x38, 0xe1, 0xfd, 0xb3, 0xac, + 0x1f, 0x24, 0xa8, 0xcb, 0x6e, 0xb5, 0xf1, 0x0b, 0x9b, 0x18, 0x03, 0xd7, 0xc2, 0xcc, 0x18, 0x67, + 0xf4, 0x2a, 0x05, 0x6c, 0xb9, 0x16, 0x8e, 0x37, 0x48, 0xf5, 0x5c, 0x1b, 0xa4, 0x96, 0xda, 0x20, + 0x2b, 0x30, 0xeb, 0x63, 0x33, 0x70, 0x1d, 0x91, 0x18, 0x88, 0x16, 0x3d, 0x2b, 0xc6, 0x38, 0x08, + 0xe8, 0x04, 0x22, 0x80, 0x11, 0x4d, 0x25, 0xcc, 0x9a, 0x2f, 0x0a, 0xb3, 0x26, 0x14, 0x4c, 0x53, + 0x61, 0x56, 0xa3, 0x28, 0xcc, 0x3a, 0x4b, 0xbd, 0x54, 0x09, 0x22, 0x9b, 0x13, 0x83, 0x48, 0x35, + 0x1c, 0x5b, 0x48, 0x84, 0x63, 0xbf, 0xcf, 0x3d, 0xf5, 0x18, 0x56, 0x33, 0xbb, 0x40, 0x6c, 0xaa, + 0xbb, 0xa9, 0x8a, 0x6b, 0xbb, 0x48, 0x40, 0x51, 0xc1, 0xf5, 0xcf, 0xe0, 0xca, 0xa1, 0x67, 0xa5, + 0x42, 0x15, 0x91, 0x68, 0x9d, 0x3d, 0x42, 0xb8, 0x27, 0xa3, 0xca, 0xf2, 0x19, 0x73, 0x38, 0x8e, + 0xae, 0x69, 0xb0, 0x51, 0x3c, 0xbb, 0x38, 0xf2, 0xff, 0x04, 0x16, 0x76, 0x5e, 0xe0, 0x41, 0xff, + 0xd4, 0x19, 0x9c, 0x83, 0xa3, 0x16, 0x54, 0x06, 0x63, 0x4b, 0x94, 0x32, 0xe8, 0xa7, 0x1a, 0xc5, + 0x54, 0x92, 0x51, 0x8c, 0x01, 0xad, 0x78, 0x06, 0x21, 0xc9, 0x15, 0x2a, 0x49, 0x8b, 0x22, 0x53, + 0xe2, 0xf3, 0xba, 0x68, 0x09, 0x38, 0xf6, 0x7d, 0xb6, 0x54, 0x0e, 0xc7, 0xbe, 0x9f, 0xdc, 0x73, + 0x95, 0xe4, 0x9e, 0xd3, 0xbe, 0x86, 0x3a, 0x9d, 0xe0, 0x3b, 0xb1, 0x2f, 0x42, 0xf9, 0x4a, 0x1c, + 0xca, 0x47, 0x19, 0xc1, 0xb4, 0x92, 0x11, 0x68, 0x1b, 0x30, 0xcf, 0xe7, 0x12, 0x0b, 0x69, 0x41, + 0x25, 0xf4, 0x47, 0xd2, 0xb2, 0x42, 0x7f, 0xa4, 0xfd, 0x11, 0x34, 0xba, 0x84, 0x98, 0x83, 0x93, + 0x73, 0xf0, 0x13, 0xcd, 0x55, 0x56, 0xb3, 0x8f, 0x0c, 0x4f, 0x9a, 0x06, 0x4d, 0x49, 0xbb, 0x70, + 0xfe, 0x1e, 0xa0, 0x7d, 0xd7, 0x27, 0x0f, 0x5d, 0xff, 0xb9, 0xe9, 0x5b, 0xe7, 0x8b, 0xe6, 0x11, + 0x4c, 0x8b, 0xd7, 0x3c, 0x95, 0x1b, 0x33, 0x3a, 0xfb, 0xd6, 0xde, 0x81, 0xa5, 0x04, 0xbd, 0xc2, + 0x89, 0x3f, 0x84, 0x3a, 0x73, 0x72, 0x22, 0xe2, 0xbb, 0xa1, 0x56, 0x3c, 0x27, 0x79, 0x42, 0xad, + 0x0b, 0x8b, 0xf4, 0x14, 0x63, 0xf0, 0x68, 0x5b, 0xfc, 0x30, 0x15, 0x17, 0x2d, 0x27, 0xc7, 0xa7, + 0x62, 0xa2, 0x7f, 0x2c, 0xc1, 0x0c, 0x83, 0x67, 0xce, 0x9c, 0x8b, 0x50, 0xf3, 0xb1, 0xe7, 0x1a, + 0xc4, 0x1c, 0x46, 0x0f, 0xa4, 0x28, 0xe0, 0xc0, 0x1c, 0x06, 0xec, 0x7d, 0x17, 0xed, 0xb4, 0xec, + 0x21, 0x0e, 0x88, 0x7c, 0x25, 0x55, 0xa7, 0xb0, 0x6d, 0x0e, 0xa2, 0x22, 0x09, 0xec, 0x3f, 0xe5, + 0x01, 0xcf, 0xb4, 0xce, 0xbe, 0xd1, 0x75, 0xfe, 0xf6, 0x60, 0x42, 0x79, 0x8a, 0x3d, 0x48, 0xe8, + 0x40, 0x35, 0x55, 0x91, 0x8a, 0xda, 0xda, 0x27, 0x80, 0xd4, 0x35, 0x0b, 0xa1, 0xbe, 0x0d, 0xb3, + 0x4c, 0x24, 0xf2, 0xc4, 0x6e, 0x26, 0x17, 0xad, 0x8b, 0x5e, 0xed, 0x33, 0x40, 0x5c, 0x8a, 0x89, + 0x53, 0xfa, 0xec, 0x12, 0xff, 0x18, 0x96, 0x12, 0xe3, 0xa3, 0xab, 0xe6, 0x04, 0x81, 0xf4, 0xec, + 0x62, 0xf0, 0xaf, 0x4b, 0x00, 0xdd, 0x90, 0x9c, 0x88, 0x52, 0x88, 0xba, 0xca, 0x52, 0x72, 0x95, + 0xb4, 0xcf, 0x33, 0x83, 0xe0, 0xb9, 0xeb, 0xcb, 0x30, 0x34, 0x6a, 0xb3, 0x32, 0x46, 0x48, 0x4e, + 0x64, 0xf9, 0x95, 0x7e, 0xa3, 0xeb, 0xd0, 0xe4, 0xef, 0xda, 0x0c, 0xd3, 0xb2, 0x7c, 0x1c, 0x04, + 0xa2, 0x0e, 0xdb, 0xe0, 0xd0, 0x2e, 0x07, 0x52, 0x34, 0xdb, 0xc2, 0x0e, 0xb1, 0xc9, 0xa9, 0x41, + 0xdc, 0x6f, 0xb0, 0x23, 0x02, 0xcc, 0x86, 0x84, 0x1e, 0x50, 0x20, 0x45, 0xf3, 0xf1, 0xd0, 0x0e, + 0x88, 0x2f, 0xd1, 0x64, 0x5d, 0x50, 0x40, 0x19, 0x9a, 0xf6, 0xcb, 0x12, 0xb4, 0xf6, 0xc3, 0xd1, + 0x88, 0x2f, 0xf2, 0xbc, 0xb2, 0x44, 0xef, 0x88, 0x75, 0x94, 0x53, 0xd6, 0x10, 0x8b, 0x48, 0x2c, + 0xee, 0xbb, 0x27, 0xbe, 0x77, 0x61, 0x51, 0x61, 0x54, 0x28, 0x2d, 0x11, 0x47, 0x94, 0x92, 0x71, + 0x04, 0x35, 0x14, 0x9e, 0xeb, 0xbd, 0xde, 0xe2, 0xb4, 0x0b, 0xb0, 0x94, 0x18, 0x2f, 0x0e, 0x8d, + 0x5b, 0xd0, 0x10, 0xd7, 0xbd, 0xc2, 0x08, 0xd6, 0xa0, 0x4a, 0xdd, 0xcb, 0xc0, 0xb6, 0x64, 0xdd, + 0x7d, 0xce, 0x73, 0xad, 0x2d, 0xdb, 0xf2, 0xb5, 0x1e, 0x34, 0x74, 0x4e, 0x5e, 0xe0, 0x7e, 0x0a, + 0x4d, 0x71, 0x39, 0x6c, 0x24, 0x1e, 0x49, 0xc4, 0x45, 0xe2, 0x04, 0x6d, 0xbd, 0xe1, 0xa8, 0x4d, + 0xed, 0xe7, 0xd0, 0xe1, 0x87, 0x5a, 0x82, 0xaa, 0x5c, 0xda, 0xa7, 0x20, 0xdf, 0x5d, 0x16, 0x11, + 0x4f, 0x0e, 0x6b, 0xf8, 0x6a, 0x53, 0xbb, 0x0c, 0x17, 0x73, 0x89, 0x8b, 0x75, 0x7b, 0xd0, 0x8a, + 0x3b, 0x2c, 0x5b, 0x5e, 0x37, 0xb0, 0x6b, 0x84, 0x92, 0x72, 0x8d, 0xb0, 0x12, 0x05, 0x0a, 0xdc, + 0xa1, 0x8b, 0x96, 0x12, 0xd6, 0x55, 0x8a, 0xc2, 0xba, 0xe9, 0x44, 0x58, 0xa7, 0x7d, 0x19, 0x49, + 0x4f, 0xc4, 0xd4, 0x1f, 0xb1, 0xc0, 0x9e, 0xcf, 0x2d, 0xdd, 0xc4, 0x5a, 0xce, 0xe2, 0x38, 0x86, + 0xae, 0x20, 0x6b, 0x0b, 0xd0, 0x48, 0x38, 0x0c, 0xed, 0x01, 0x34, 0x53, 0x1e, 0xe0, 0x4e, 0x2a, + 0xc2, 0xc9, 0x88, 0x2d, 0x15, 0xdf, 0x2c, 0x0b, 0x47, 0xf4, 0x30, 0xd8, 0x75, 0x8e, 0x5d, 0x49, + 0xf7, 0x1a, 0xd4, 0x0f, 0x8b, 0x9e, 0x21, 0x4e, 0xcb, 0x7b, 0xac, 0x77, 0x60, 0xb1, 0x4f, 0x5c, + 0xdf, 0x1c, 0xe2, 0x5d, 0xb6, 0x6b, 0x8f, 0x6d, 0x7e, 0x4f, 0x13, 0x86, 0x91, 0xff, 0x66, 0xdf, + 0xda, 0x7f, 0x94, 0x60, 0xe1, 0xa1, 0x3d, 0xc2, 0xc1, 0x69, 0x40, 0xf0, 0xf8, 0x90, 0x45, 0xbb, + 0x97, 0xa0, 0x46, 0xb9, 0x09, 0x88, 0x39, 0xf6, 0xe4, 0x3d, 0x57, 0x04, 0xa0, 0x32, 0x0a, 0x38, + 0x69, 0x99, 0xff, 0xaa, 0x99, 0x46, 0x66, 0x56, 0x1a, 0xfd, 0x0b, 0x10, 0x7a, 0x1f, 0x20, 0x0c, + 0xb0, 0x25, 0xee, 0xb6, 0x2a, 0xa9, 0xa3, 0xe7, 0x50, 0xbd, 0x81, 0xa0, 0x78, 0xfc, 0xa2, 0xeb, + 0x03, 0xa8, 0xdb, 0x8e, 0x6b, 0x61, 0x76, 0x03, 0x61, 0x89, 0xdc, 0x38, 0x7f, 0x14, 0x70, 0xc4, + 0xc3, 0x00, 0x5b, 0xda, 0x1f, 0x0b, 0x2f, 0x2c, 0x85, 0x27, 0x74, 0xb0, 0x03, 0x8b, 0x7c, 0x43, + 0x1f, 0x47, 0x8b, 0x96, 0x8a, 0x8e, 0x03, 0xce, 0x94, 0x40, 0xf4, 0x96, 0x2d, 0x4e, 0x45, 0x39, + 0x42, 0xbb, 0x0f, 0x17, 0x12, 0x51, 0xe9, 0x79, 0x92, 0xb9, 0x47, 0xa9, 0x4c, 0x30, 0x36, 0x10, + 0x91, 0x8a, 0x49, 0xfb, 0x28, 0x48, 0xc5, 0x02, 0x9e, 0x8a, 0x05, 0x9a, 0x0e, 0x6b, 0x89, 0x04, + 0x35, 0xc1, 0xc8, 0x07, 0xa9, 0x23, 0xfe, 0x72, 0x01, 0xb1, 0xd4, 0x59, 0xff, 0xbf, 0x25, 0x58, + 0xce, 0x43, 0x78, 0xcd, 0x52, 0xc8, 0x4f, 0x0a, 0x5e, 0x1c, 0xdc, 0x9d, 0xc8, 0xcd, 0xef, 0xa4, + 0x68, 0xf4, 0x18, 0x3a, 0x79, 0xd2, 0xcb, 0xaa, 0xa2, 0x72, 0x06, 0x55, 0xfc, 0x5f, 0x59, 0x29, + 0xee, 0x75, 0x09, 0xf1, 0xed, 0xa3, 0x90, 0x1a, 0xef, 0xf7, 0x95, 0xa4, 0x3f, 0x88, 0x12, 0x50, + 0x2e, 0xbf, 0x1b, 0xd9, 0x51, 0xf1, 0xac, 0xb9, 0x49, 0xe8, 0x5e, 0x32, 0x09, 0xe5, 0x65, 0xbb, + 0xdb, 0x13, 0xc9, 0xbc, 0xb1, 0x95, 0x99, 0x97, 0x25, 0x68, 0x26, 0xf5, 0x80, 0x3e, 0x01, 0x30, + 0x23, 0xce, 0x85, 0xc9, 0x5f, 0x9a, 0xb4, 0x3a, 0x5d, 0xc1, 0x47, 0xd7, 0xa0, 0x32, 0xf0, 0x42, + 0xa1, 0x91, 0xf8, 0xfe, 0x66, 0xcb, 0x0b, 0xb9, 0x03, 0xa0, 0xbd, 0x34, 0x68, 0xe6, 0xf7, 0xf0, + 0x19, 0xcf, 0xf5, 0x94, 0x81, 0x39, 0xaa, 0xc0, 0x41, 0x9f, 0x43, 0xf3, 0xb9, 0x6f, 0x13, 0xf3, + 0x68, 0x84, 0x8d, 0x91, 0x79, 0x8a, 0x7d, 0xe1, 0xb9, 0x8a, 0xbd, 0x4c, 0x43, 0xe2, 0x3f, 0xa1, + 0xe8, 0x5a, 0x08, 0x55, 0x39, 0xff, 0x2b, 0x3c, 0xf2, 0x63, 0x58, 0x0d, 0x29, 0x9a, 0xc1, 0xde, + 0x02, 0x38, 0xa6, 0xe3, 0x1a, 0x01, 0xa6, 0x47, 0x93, 0x7c, 0x7f, 0x97, 0xef, 0x2d, 0x97, 0xd9, + 0xa0, 0x2d, 0xd7, 0xc7, 0x3d, 0xd3, 0x71, 0xfb, 0x7c, 0x84, 0x36, 0x86, 0xba, 0xb2, 0x9c, 0x57, + 0xcc, 0xfc, 0x00, 0x16, 0xe5, 0xcd, 0x58, 0x80, 0x89, 0xf0, 0xeb, 0x93, 0xe6, 0x5c, 0x10, 0xe8, + 0x7d, 0x4c, 0x98, 0x77, 0xbf, 0x75, 0x09, 0xaa, 0xf2, 0x2f, 0x10, 0x68, 0x0e, 0x2a, 0x07, 0x5b, + 0xfb, 0xad, 0x29, 0xfa, 0x71, 0xb8, 0xbd, 0xdf, 0x2a, 0xdd, 0x1a, 0x43, 0x2b, 0xfd, 0xfc, 0x1f, + 0xad, 0xc2, 0xd2, 0xbe, 0xbe, 0xb7, 0xdf, 0x7d, 0xd4, 0x3d, 0xd8, 0xdd, 0xeb, 0x19, 0xfb, 0xfa, + 0xee, 0x57, 0xdd, 0x83, 0x9d, 0xd6, 0x14, 0xba, 0x0a, 0x97, 0xd5, 0x8e, 0x3f, 0xdc, 0xeb, 0x1f, + 0x18, 0x07, 0x7b, 0xc6, 0xd6, 0x5e, 0xef, 0xa0, 0xbb, 0xdb, 0xdb, 0xd1, 0x5b, 0x25, 0x74, 0x19, + 0xd6, 0x54, 0x94, 0x2f, 0x76, 0xb7, 0x77, 0xf5, 0x9d, 0x2d, 0xfa, 0xdd, 0x7d, 0xd2, 0x2a, 0xdf, + 0xba, 0x0f, 0x0b, 0xa9, 0xe7, 0x3c, 0x68, 0x11, 0x1a, 0xfd, 0x6e, 0x6f, 0xfb, 0x8b, 0xbd, 0x9f, + 0x1a, 0xfa, 0x4e, 0x77, 0xfb, 0x67, 0xad, 0x29, 0xb4, 0x0c, 0x2d, 0x09, 0xea, 0xed, 0x1d, 0x70, + 0x68, 0xe9, 0xd6, 0x37, 0x29, 0x93, 0xc4, 0xe8, 0x02, 0x2c, 0x46, 0x73, 0x1b, 0x5b, 0xfa, 0x4e, + 0xf7, 0x60, 0x67, 0xbb, 0x35, 0x95, 0x04, 0xeb, 0x87, 0xbd, 0xde, 0x6e, 0xef, 0x51, 0xab, 0x44, + 0xa9, 0xc6, 0xe0, 0x9d, 0x9f, 0xee, 0x52, 0xe4, 0x72, 0x12, 0xf9, 0xb0, 0xf7, 0xb8, 0xb7, 0xf7, + 0x93, 0x5e, 0xab, 0xb2, 0xf9, 0xef, 0x0d, 0x68, 0xca, 0x98, 0x01, 0xfb, 0xec, 0xba, 0xf6, 0x33, + 0x98, 0x93, 0x7f, 0x86, 0x89, 0x9d, 0x55, 0xf2, 0x9f, 0x3b, 0x9d, 0x76, 0xb6, 0x43, 0xc4, 0x5e, + 0x53, 0x68, 0x9f, 0xc5, 0x42, 0xca, 0xd3, 0xa9, 0xcb, 0x6a, 0x74, 0x92, 0x79, 0x9b, 0xd5, 0x59, + 0x2f, 0xea, 0x8e, 0x28, 0xf6, 0x69, 0x00, 0xa4, 0x3e, 0x7b, 0x45, 0xeb, 0x6a, 0x98, 0x90, 0x7d, + 0x4e, 0xdb, 0xb9, 0x52, 0xd8, 0x1f, 0x11, 0xfd, 0x19, 0xb4, 0xd2, 0x0f, 0x5e, 0x51, 0x5c, 0xb2, + 0x29, 0x78, 0x4c, 0xdb, 0xb9, 0x3a, 0x01, 0x43, 0x25, 0x9d, 0x79, 0x34, 0xba, 0x51, 0xfc, 0xec, + 0x2f, 0x43, 0xba, 0xe8, 0x2d, 0x21, 0x17, 0x45, 0xf2, 0xc9, 0x13, 0x52, 0x9f, 0x6a, 0xe6, 0x3c, + 0x7d, 0x53, 0x44, 0x91, 0xff, 0x56, 0x4a, 0x9b, 0x42, 0x5f, 0xc1, 0x42, 0xea, 0xa6, 0x0e, 0xc5, + 0xa3, 0xf2, 0xef, 0x1d, 0x3b, 0x1b, 0xc5, 0x08, 0x49, 0xbd, 0xa9, 0xf7, 0x70, 0x09, 0xbd, 0xe5, + 0x5c, 0xee, 0x25, 0xf4, 0x96, 0x7b, 0x81, 0xc7, 0xcc, 0x2b, 0x71, 0xdb, 0xa6, 0x98, 0x57, 0xde, + 0xd5, 0x5e, 0x67, 0xbd, 0xa8, 0x5b, 0x5d, 0x7e, 0xea, 0xa6, 0x4d, 0x59, 0x7e, 0xfe, 0x05, 0x5e, + 0x67, 0xa3, 0x18, 0x21, 0xad, 0xab, 0xb8, 0xec, 0x9f, 0xd2, 0x55, 0xe6, 0x96, 0x29, 0xa5, 0xab, + 0xec, 0x7d, 0x81, 0xd0, 0x55, 0xaa, 0x7e, 0x7f, 0xa5, 0xb0, 0xbe, 0x99, 0xd5, 0x55, 0x7e, 0xc9, + 0x54, 0x9b, 0x42, 0xdf, 0x42, 0xbb, 0xa8, 0x08, 0x89, 0xe2, 0x18, 0xe1, 0x15, 0x55, 0xd2, 0xce, + 0xcd, 0x33, 0x60, 0x46, 0x53, 0x76, 0xa1, 0x2a, 0x2b, 0x8e, 0x28, 0x76, 0x28, 0xa9, 0x32, 0x67, + 0x67, 0x2d, 0xa7, 0x27, 0x22, 0xf1, 0x01, 0x4c, 0x53, 0x28, 0x5a, 0x4e, 0x20, 0xc9, 0xa1, 0x17, + 0x52, 0xd0, 0x68, 0xd8, 0xc7, 0x30, 0xcb, 0x0b, 0x74, 0x28, 0xce, 0x9c, 0x12, 0xd5, 0xc0, 0xce, + 0x6a, 0x06, 0x1e, 0x0d, 0xfe, 0x92, 0xff, 0x27, 0x4f, 0x54, 0xda, 0xd0, 0xc5, 0xc4, 0xdf, 0x37, + 0x92, 0xf5, 0xbc, 0xce, 0xa5, 0xfc, 0x4e, 0xd5, 0x44, 0x52, 0xe1, 0xc7, 0x7a, 0x51, 0x7c, 0x98, + 0x31, 0x91, 0xfc, 0x78, 0x53, 0x9b, 0x42, 0x06, 0x2f, 0x5a, 0xa5, 0x08, 0x6b, 0xf9, 0xb6, 0x95, + 0x20, 0x7e, 0x6d, 0x22, 0x4e, 0x34, 0xc1, 0x11, 0x2c, 0xe5, 0xa4, 0xdf, 0xe8, 0x5a, 0x4a, 0xf9, + 0x79, 0x99, 0x7f, 0xe7, 0xad, 0xc9, 0x48, 0xaa, 0x8a, 0x84, 0x79, 0xaf, 0xa8, 0x3e, 0x41, 0xb1, + 0xea, 0xd5, 0x0c, 0x5c, 0x0e, 0xde, 0xfc, 0x8b, 0x0a, 0xcc, 0xf3, 0x22, 0x89, 0x38, 0xd3, 0x1e, + 0x01, 0xc4, 0x75, 0x3c, 0xd4, 0x49, 0x2c, 0x33, 0x51, 0xd0, 0xec, 0x5c, 0xcc, 0xed, 0x53, 0x95, + 0xaf, 0x94, 0xe4, 0x14, 0xe5, 0x67, 0x0b, 0x7d, 0x8a, 0xf2, 0x73, 0xaa, 0x78, 0xda, 0x14, 0xda, + 0x86, 0x5a, 0x54, 0x27, 0x42, 0x4a, 0x79, 0x29, 0x55, 0xe4, 0xea, 0x74, 0xf2, 0xba, 0x54, 0x8e, + 0x94, 0xda, 0x8f, 0xc2, 0x51, 0xb6, 0xa2, 0xa4, 0x70, 0x94, 0x57, 0x2e, 0x8a, 0x57, 0xc7, 0x53, + 0xdd, 0xf4, 0xea, 0x12, 0xd5, 0x83, 0xf4, 0xea, 0x92, 0xd9, 0xb1, 0x36, 0xf5, 0xc5, 0xa5, 0x5f, + 0xfd, 0x66, 0xbd, 0xf4, 0x9f, 0xbf, 0x59, 0x9f, 0xfa, 0xf3, 0x97, 0xeb, 0xa5, 0x5f, 0xbd, 0x5c, + 0x2f, 0xfd, 0xdb, 0xcb, 0xf5, 0xd2, 0x7f, 0xbf, 0x5c, 0x2f, 0xfd, 0xe2, 0x7f, 0xd6, 0xa7, 0x8e, + 0x66, 0xd9, 0x9f, 0x54, 0xdf, 0xff, 0x6d, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfc, 0xa9, 0xc0, 0x61, + 0x58, 0x3c, 0x00, 0x00, +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime/api.proto b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime/api.proto new file mode 100644 index 000000000..3e9fccd0a --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime/api.proto @@ -0,0 +1,1105 @@ +// To regenerate api.pb.go run hack/update-generated-runtime.sh +syntax = 'proto3'; + +package runtime; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.stringer_all) = true; +option (gogoproto.goproto_getters_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.goproto_unrecognized_all) = false; + +// Runtime service defines the public APIs for remote container runtimes +service RuntimeService { + // Version returns the runtime name, runtime version, and runtime API version. + rpc Version(VersionRequest) returns (VersionResponse) {} + + // RunPodSandbox creates and starts a pod-level sandbox. Runtimes must ensure + // the sandbox is in the ready state on success. + rpc RunPodSandbox(RunPodSandboxRequest) returns (RunPodSandboxResponse) {} + // StopPodSandbox stops any running process that is part of the sandbox and + // reclaims network resources (e.g., IP addresses) allocated to the sandbox. + // If there are any running containers in the sandbox, they must be forcibly + // terminated. + // This call is idempotent, and must not return an error if all relevant + // resources have already been reclaimed. kubelet will call StopPodSandbox + // at least once before calling RemovePodSandbox. It will also attempt to + // reclaim resources eagerly, as soon as a sandbox is not needed. Hence, + // multiple StopPodSandbox calls are expected. + rpc StopPodSandbox(StopPodSandboxRequest) returns (StopPodSandboxResponse) {} + // RemovePodSandbox removes the sandbox. If there are any running containers + // in the sandbox, they must be forcibly terminated and removed. + // This call is idempotent, and must not return an error if the sandbox has + // already been removed. + rpc RemovePodSandbox(RemovePodSandboxRequest) returns (RemovePodSandboxResponse) {} + // PodSandboxStatus returns the status of the PodSandbox. If the PodSandbox is not + // present, returns an error. + rpc PodSandboxStatus(PodSandboxStatusRequest) returns (PodSandboxStatusResponse) {} + // ListPodSandbox returns a list of PodSandboxes. + rpc ListPodSandbox(ListPodSandboxRequest) returns (ListPodSandboxResponse) {} + + // CreateContainer creates a new container in specified PodSandbox + rpc CreateContainer(CreateContainerRequest) returns (CreateContainerResponse) {} + // StartContainer starts the container. + rpc StartContainer(StartContainerRequest) returns (StartContainerResponse) {} + // StopContainer stops a running container with a grace period (i.e., timeout). + // This call is idempotent, and must not return an error if the container has + // already been stopped. + // TODO: what must the runtime do after the grace period is reached? + rpc StopContainer(StopContainerRequest) returns (StopContainerResponse) {} + // RemoveContainer removes the container. If the container is running, the + // container must be forcibly removed. + // This call is idempotent, and must not return an error if the container has + // already been removed. + rpc RemoveContainer(RemoveContainerRequest) returns (RemoveContainerResponse) {} + // ListContainers lists all containers by filters. + rpc ListContainers(ListContainersRequest) returns (ListContainersResponse) {} + // ContainerStatus returns status of the container. If the container is not + // present, returns an error. + rpc ContainerStatus(ContainerStatusRequest) returns (ContainerStatusResponse) {} + // UpdateContainerResources updates ContainerConfig of the container. + rpc UpdateContainerResources(UpdateContainerResourcesRequest) returns (UpdateContainerResourcesResponse) {} + + // ExecSync runs a command in a container synchronously. + rpc ExecSync(ExecSyncRequest) returns (ExecSyncResponse) {} + // Exec prepares a streaming endpoint to execute a command in the container. + rpc Exec(ExecRequest) returns (ExecResponse) {} + // Attach prepares a streaming endpoint to attach to a running container. + rpc Attach(AttachRequest) returns (AttachResponse) {} + // PortForward prepares a streaming endpoint to forward ports from a PodSandbox. + rpc PortForward(PortForwardRequest) returns (PortForwardResponse) {} + + // ContainerStats returns stats of the container. If the container does not + // exist, the call returns an error. + rpc ContainerStats(ContainerStatsRequest) returns (ContainerStatsResponse) {} + // ListContainerStats returns stats of all running containers. + rpc ListContainerStats(ListContainerStatsRequest) returns (ListContainerStatsResponse) {} + + // UpdateRuntimeConfig updates the runtime configuration based on the given request. + rpc UpdateRuntimeConfig(UpdateRuntimeConfigRequest) returns (UpdateRuntimeConfigResponse) {} + + // Status returns the status of the runtime. + rpc Status(StatusRequest) returns (StatusResponse) {} +} + +// ImageService defines the public APIs for managing images. +service ImageService { + // ListImages lists existing images. + rpc ListImages(ListImagesRequest) returns (ListImagesResponse) {} + // ImageStatus returns the status of the image. If the image is not + // present, returns a response with ImageStatusResponse.Image set to + // nil. + rpc ImageStatus(ImageStatusRequest) returns (ImageStatusResponse) {} + // PullImage pulls an image with authentication config. + rpc PullImage(PullImageRequest) returns (PullImageResponse) {} + // RemoveImage removes the image. + // This call is idempotent, and must not return an error if the image has + // already been removed. + rpc RemoveImage(RemoveImageRequest) returns (RemoveImageResponse) {} + // ImageFSInfo returns information of the filesystem that is used to store images. + rpc ImageFsInfo(ImageFsInfoRequest) returns (ImageFsInfoResponse) {} +} + +message VersionRequest { + // Version of the kubelet runtime API. + string version = 1; +} + +message VersionResponse { + // Version of the kubelet runtime API. + string version = 1; + // Name of the container runtime. + string runtime_name = 2; + // Version of the container runtime. The string must be + // semver-compatible. + string runtime_version = 3; + // API version of the container runtime. The string must be + // semver-compatible. + string runtime_api_version = 4; +} + +// DNSConfig specifies the DNS servers and search domains of a sandbox. +message DNSConfig { + // List of DNS servers of the cluster. + repeated string servers = 1; + // List of DNS search domains of the cluster. + repeated string searches = 2; + // List of DNS options. See https://linux.die.net/man/5/resolv.conf + // for all available options. + repeated string options = 3; +} + +enum Protocol { + TCP = 0; + UDP = 1; +} + +// PortMapping specifies the port mapping configurations of a sandbox. +message PortMapping { + // Protocol of the port mapping. + Protocol protocol = 1; + // Port number within the container. Default: 0 (not specified). + int32 container_port = 2; + // Port number on the host. Default: 0 (not specified). + int32 host_port = 3; + // Host IP. + string host_ip = 4; +} + +enum MountPropagation { + // No mount propagation ("private" in Linux terminology). + PROPAGATION_PRIVATE = 0; + // Mounts get propagated from the host to the container ("rslave" in Linux). + PROPAGATION_HOST_TO_CONTAINER = 1; + // Mounts get propagated from the host to the container and from the + // container to the host ("rshared" in Linux). + PROPAGATION_BIDIRECTIONAL = 2; +} + +// Mount specifies a host volume to mount into a container. +message Mount { + // Path of the mount within the container. + string container_path = 1; + // Path of the mount on the host. + string host_path = 2; + // If set, the mount is read-only. + bool readonly = 3; + // If set, the mount needs SELinux relabeling. + bool selinux_relabel = 4; + // Requested propagation mode. + MountPropagation propagation = 5; +} + +// NamespaceOption provides options for Linux namespaces. +message NamespaceOption { + // If set, use the host's network namespace. + bool host_network = 1; + // If set, use the host's PID namespace. + bool host_pid = 2; + // If set, use the host's IPC namespace. + bool host_ipc = 3; +} + +// Int64Value is the wrapper of int64. +message Int64Value { + // The value. + int64 value = 1; +} + +// LinuxSandboxSecurityContext holds linux security configuration that will be +// applied to a sandbox. Note that: +// 1) It does not apply to containers in the pods. +// 2) It may not be applicable to a PodSandbox which does not contain any running +// process. +message LinuxSandboxSecurityContext { + // Configurations for the sandbox's namespaces. + // This will be used only if the PodSandbox uses namespace for isolation. + NamespaceOption namespace_options = 1; + // Optional SELinux context to be applied. + SELinuxOption selinux_options = 2; + // UID to run sandbox processes as, when applicable. + Int64Value run_as_user = 3; + // If set, the root filesystem of the sandbox is read-only. + bool readonly_rootfs = 4; + // List of groups applied to the first process run in the sandbox, in + // addition to the sandbox's primary GID. + repeated int64 supplemental_groups = 5; + // Indicates whether the sandbox will be asked to run a privileged + // container. If a privileged container is to be executed within it, this + // MUST be true. + // This allows a sandbox to take additional security precautions if no + // privileged containers are expected to be run. + bool privileged = 6; + // Seccomp profile for the sandbox, candidate values are: + // * docker/default: the default profile for the docker container runtime + // * unconfined: unconfined profile, ie, no seccomp sandboxing + // * localhost/<full-path-to-profile>: the profile installed on the node. + // <full-path-to-profile> is the full path of the profile. + // Default: "", which is identical with unconfined. + string seccomp_profile_path = 7; +} + +// LinuxPodSandboxConfig holds platform-specific configurations for Linux +// host platforms and Linux-based containers. +message LinuxPodSandboxConfig { + // Parent cgroup of the PodSandbox. + // The cgroupfs style syntax will be used, but the container runtime can + // convert it to systemd semantics if needed. + string cgroup_parent = 1; + // LinuxSandboxSecurityContext holds sandbox security attributes. + LinuxSandboxSecurityContext security_context = 2; + // Sysctls holds linux sysctls config for the sandbox. + map<string, string> sysctls = 3; +} + +// PodSandboxMetadata holds all necessary information for building the sandbox name. +// The container runtime is encouraged to expose the metadata associated with the +// PodSandbox in its user interface for better user experience. For example, +// the runtime can construct a unique PodSandboxName based on the metadata. +message PodSandboxMetadata { + // Pod name of the sandbox. Same as the pod name in the PodSpec. + string name = 1; + // Pod UID of the sandbox. Same as the pod UID in the PodSpec. + string uid = 2; + // Pod namespace of the sandbox. Same as the pod namespace in the PodSpec. + string namespace = 3; + // Attempt number of creating the sandbox. Default: 0. + uint32 attempt = 4; +} + +// PodSandboxConfig holds all the required and optional fields for creating a +// sandbox. +message PodSandboxConfig { + // Metadata of the sandbox. This information will uniquely identify the + // sandbox, and the runtime should leverage this to ensure correct + // operation. The runtime may also use this information to improve UX, such + // as by constructing a readable name. + PodSandboxMetadata metadata = 1; + // Hostname of the sandbox. + string hostname = 2; + // Path to the directory on the host in which container log files are + // stored. + // By default the log of a container going into the LogDirectory will be + // hooked up to STDOUT and STDERR. However, the LogDirectory may contain + // binary log files with structured logging data from the individual + // containers. For example, the files might be newline separated JSON + // structured logs, systemd-journald journal files, gRPC trace files, etc. + // E.g., + // PodSandboxConfig.LogDirectory = `/var/log/pods/<podUID>/` + // ContainerConfig.LogPath = `containerName_Instance#.log` + // + // WARNING: Log management and how kubelet should interface with the + // container logs are under active discussion in + // https://issues.k8s.io/24677. There *may* be future change of direction + // for logging as the discussion carries on. + string log_directory = 3; + // DNS config for the sandbox. + DNSConfig dns_config = 4; + // Port mappings for the sandbox. + repeated PortMapping port_mappings = 5; + // Key-value pairs that may be used to scope and select individual resources. + map<string, string> labels = 6; + // Unstructured key-value map that may be set by the kubelet to store and + // retrieve arbitrary metadata. This will include any annotations set on a + // pod through the Kubernetes API. + // + // Annotations MUST NOT be altered by the runtime; the annotations stored + // here MUST be returned in the PodSandboxStatus associated with the pod + // this PodSandboxConfig creates. + // + // In general, in order to preserve a well-defined interface between the + // kubelet and the container runtime, annotations SHOULD NOT influence + // runtime behaviour. + // + // Annotations can also be useful for runtime authors to experiment with + // new features that are opaque to the Kubernetes APIs (both user-facing + // and the CRI). Whenever possible, however, runtime authors SHOULD + // consider proposing new typed fields for any new features instead. + map<string, string> annotations = 7; + // Optional configurations specific to Linux hosts. + LinuxPodSandboxConfig linux = 8; +} + +message RunPodSandboxRequest { + // Configuration for creating a PodSandbox. + PodSandboxConfig config = 1; +} + +message RunPodSandboxResponse { + // ID of the PodSandbox to run. + string pod_sandbox_id = 1; +} + +message StopPodSandboxRequest { + // ID of the PodSandbox to stop. + string pod_sandbox_id = 1; +} + +message StopPodSandboxResponse {} + +message RemovePodSandboxRequest { + // ID of the PodSandbox to remove. + string pod_sandbox_id = 1; +} + +message RemovePodSandboxResponse {} + +message PodSandboxStatusRequest { + // ID of the PodSandbox for which to retrieve status. + string pod_sandbox_id = 1; +} + +// PodSandboxNetworkStatus is the status of the network for a PodSandbox. +message PodSandboxNetworkStatus { + // IP address of the PodSandbox. + string ip = 1; +} + +// Namespace contains paths to the namespaces. +message Namespace { + // Namespace options for Linux namespaces. + NamespaceOption options = 2; +} + +// LinuxSandboxStatus contains status specific to Linux sandboxes. +message LinuxPodSandboxStatus { + // Paths to the sandbox's namespaces. + Namespace namespaces = 1; +} + +enum PodSandboxState { + SANDBOX_READY = 0; + SANDBOX_NOTREADY = 1; +} + +// PodSandboxStatus contains the status of the PodSandbox. +message PodSandboxStatus { + // ID of the sandbox. + string id = 1; + // Metadata of the sandbox. + PodSandboxMetadata metadata = 2; + // State of the sandbox. + PodSandboxState state = 3; + // Creation timestamp of the sandbox in nanoseconds. Must be > 0. + int64 created_at = 4; + // Network contains network status if network is handled by the runtime. + PodSandboxNetworkStatus network = 5; + // Linux-specific status to a pod sandbox. + LinuxPodSandboxStatus linux = 6; + // Labels are key-value pairs that may be used to scope and select individual resources. + map<string, string> labels = 7; + // Unstructured key-value map holding arbitrary metadata. + // Annotations MUST NOT be altered by the runtime; the value of this field + // MUST be identical to that of the corresponding PodSandboxConfig used to + // instantiate the pod sandbox this status represents. + map<string, string> annotations = 8; +} + +message PodSandboxStatusResponse { + // Status of the PodSandbox. + PodSandboxStatus status = 1; +} + +// PodSandboxStateValue is the wrapper of PodSandboxState. +message PodSandboxStateValue { + // State of the sandbox. + PodSandboxState state = 1; +} + +// PodSandboxFilter is used to filter a list of PodSandboxes. +// All those fields are combined with 'AND' +message PodSandboxFilter { + // ID of the sandbox. + string id = 1; + // State of the sandbox. + PodSandboxStateValue state = 2; + // LabelSelector to select matches. + // Only api.MatchLabels is supported for now and the requirements + // are ANDed. MatchExpressions is not supported yet. + map<string, string> label_selector = 3; +} + +message ListPodSandboxRequest { + // PodSandboxFilter to filter a list of PodSandboxes. + PodSandboxFilter filter = 1; +} + + +// PodSandbox contains minimal information about a sandbox. +message PodSandbox { + // ID of the PodSandbox. + string id = 1; + // Metadata of the PodSandbox. + PodSandboxMetadata metadata = 2; + // State of the PodSandbox. + PodSandboxState state = 3; + // Creation timestamps of the PodSandbox in nanoseconds. Must be > 0. + int64 created_at = 4; + // Labels of the PodSandbox. + map<string, string> labels = 5; + // Unstructured key-value map holding arbitrary metadata. + // Annotations MUST NOT be altered by the runtime; the value of this field + // MUST be identical to that of the corresponding PodSandboxConfig used to + // instantiate this PodSandbox. + map<string, string> annotations = 6; +} + +message ListPodSandboxResponse { + // List of PodSandboxes. + repeated PodSandbox items = 1; +} + +// ImageSpec is an internal representation of an image. Currently, it wraps the +// value of a Container's Image field (e.g. imageID or imageDigest), but in the +// future it will include more detailed information about the different image types. +message ImageSpec { + string image = 1; +} + +message KeyValue { + string key = 1; + string value = 2; +} + +// LinuxContainerResources specifies Linux specific configuration for +// resources. +// TODO: Consider using Resources from opencontainers/runtime-spec/specs-go +// directly. +message LinuxContainerResources { + // CPU CFS (Completely Fair Scheduler) period. Default: 0 (not specified). + int64 cpu_period = 1; + // CPU CFS (Completely Fair Scheduler) quota. Default: 0 (not specified). + int64 cpu_quota = 2; + // CPU shares (relative weight vs. other containers). Default: 0 (not specified). + int64 cpu_shares = 3; + // Memory limit in bytes. Default: 0 (not specified). + int64 memory_limit_in_bytes = 4; + // OOMScoreAdj adjusts the oom-killer score. Default: 0 (not specified). + int64 oom_score_adj = 5; + // CpusetCpus constrains the allowed set of logical CPUs. Default: "" (not specified). + string cpuset_cpus = 6; + // CpusetMems constrains the allowed set of memory nodes. Default: "" (not specified). + string cpuset_mems = 7; +} + +// SELinuxOption are the labels to be applied to the container. +message SELinuxOption { + string user = 1; + string role = 2; + string type = 3; + string level = 4; +} + +// Capability contains the container capabilities to add or drop +message Capability { + // List of capabilities to add. + repeated string add_capabilities = 1; + // List of capabilities to drop. + repeated string drop_capabilities = 2; +} + +// LinuxContainerSecurityContext holds linux security configuration that will be applied to a container. +message LinuxContainerSecurityContext { + // Capabilities to add or drop. + Capability capabilities = 1; + // If set, run container in privileged mode. + // Privileged mode is incompatible with the following options. If + // privileged is set, the following features MAY have no effect: + // 1. capabilities + // 2. selinux_options + // 4. seccomp + // 5. apparmor + // + // Privileged mode implies the following specific options are applied: + // 1. All capabilities are added. + // 2. Sensitive paths, such as kernel module paths within sysfs, are not masked. + // 3. Any sysfs and procfs mounts are mounted RW. + // 4. Apparmor confinement is not applied. + // 5. Seccomp restrictions are not applied. + // 6. The device cgroup does not restrict access to any devices. + // 7. All devices from the host's /dev are available within the container. + // 8. SELinux restrictions are not applied (e.g. label=disabled). + bool privileged = 2; + // Configurations for the container's namespaces. + // Only used if the container uses namespace for isolation. + NamespaceOption namespace_options = 3; + // SELinux context to be optionally applied. + SELinuxOption selinux_options = 4; + // UID to run the container process as. Only one of run_as_user and + // run_as_username can be specified at a time. + Int64Value run_as_user = 5; + // User name to run the container process as. If specified, the user MUST + // exist in the container image (i.e. in the /etc/passwd inside the image), + // and be resolved there by the runtime; otherwise, the runtime MUST error. + string run_as_username = 6; + // If set, the root filesystem of the container is read-only. + bool readonly_rootfs = 7; + // List of groups applied to the first process run in the container, in + // addition to the container's primary GID. + repeated int64 supplemental_groups = 8; + // AppArmor profile for the container, candidate values are: + // * runtime/default: equivalent to not specifying a profile. + // * localhost/<profile_name>: profile loaded on the node + // (localhost) by name. The possible profile names are detailed at + // http://wiki.apparmor.net/index.php/AppArmor_Core_Policy_Reference + string apparmor_profile = 9; + // Seccomp profile for the container, candidate values are: + // * docker/default: the default profile for the docker container runtime + // * unconfined: unconfined profile, ie, no seccomp sandboxing + // * localhost/<full-path-to-profile>: the profile installed on the node. + // <full-path-to-profile> is the full path of the profile. + // Default: "", which is identical with unconfined. + string seccomp_profile_path = 10; + // no_new_privs defines if the flag for no_new_privs should be set on the + // container. + bool no_new_privs = 11; +} + +// LinuxContainerConfig contains platform-specific configuration for +// Linux-based containers. +message LinuxContainerConfig { + // Resources specification for the container. + LinuxContainerResources resources = 1; + // LinuxContainerSecurityContext configuration for the container. + LinuxContainerSecurityContext security_context = 2; +} + +// ContainerMetadata holds all necessary information for building the container +// name. The container runtime is encouraged to expose the metadata in its user +// interface for better user experience. E.g., runtime can construct a unique +// container name based on the metadata. Note that (name, attempt) is unique +// within a sandbox for the entire lifetime of the sandbox. +message ContainerMetadata { + // Name of the container. Same as the container name in the PodSpec. + string name = 1; + // Attempt number of creating the container. Default: 0. + uint32 attempt = 2; +} + +// Device specifies a host device to mount into a container. +message Device { + // Path of the device within the container. + string container_path = 1; + // Path of the device on the host. + string host_path = 2; + // Cgroups permissions of the device, candidates are one or more of + // * r - allows container to read from the specified device. + // * w - allows container to write to the specified device. + // * m - allows container to create device files that do not yet exist. + string permissions = 3; +} + +// ContainerConfig holds all the required and optional fields for creating a +// container. +message ContainerConfig { + // Metadata of the container. This information will uniquely identify the + // container, and the runtime should leverage this to ensure correct + // operation. The runtime may also use this information to improve UX, such + // as by constructing a readable name. + ContainerMetadata metadata = 1 ; + // Image to use. + ImageSpec image = 2; + // Command to execute (i.e., entrypoint for docker) + repeated string command = 3; + // Args for the Command (i.e., command for docker) + repeated string args = 4; + // Current working directory of the command. + string working_dir = 5; + // List of environment variable to set in the container. + repeated KeyValue envs = 6; + // Mounts for the container. + repeated Mount mounts = 7; + // Devices for the container. + repeated Device devices = 8; + // Key-value pairs that may be used to scope and select individual resources. + // Label keys are of the form: + // label-key ::= prefixed-name | name + // prefixed-name ::= prefix '/' name + // prefix ::= DNS_SUBDOMAIN + // name ::= DNS_LABEL + map<string, string> labels = 9; + // Unstructured key-value map that may be used by the kubelet to store and + // retrieve arbitrary metadata. + // + // Annotations MUST NOT be altered by the runtime; the annotations stored + // here MUST be returned in the ContainerStatus associated with the container + // this ContainerConfig creates. + // + // In general, in order to preserve a well-defined interface between the + // kubelet and the container runtime, annotations SHOULD NOT influence + // runtime behaviour. + map<string, string> annotations = 10; + // Path relative to PodSandboxConfig.LogDirectory for container to store + // the log (STDOUT and STDERR) on the host. + // E.g., + // PodSandboxConfig.LogDirectory = `/var/log/pods/<podUID>/` + // ContainerConfig.LogPath = `containerName_Instance#.log` + // + // WARNING: Log management and how kubelet should interface with the + // container logs are under active discussion in + // https://issues.k8s.io/24677. There *may* be future change of direction + // for logging as the discussion carries on. + string log_path = 11; + + // Variables for interactive containers, these have very specialized + // use-cases (e.g. debugging). + // TODO: Determine if we need to continue supporting these fields that are + // part of Kubernetes's Container Spec. + bool stdin = 12; + bool stdin_once = 13; + bool tty = 14; + + // Configuration specific to Linux containers. + LinuxContainerConfig linux = 15; +} + +message CreateContainerRequest { + // ID of the PodSandbox in which the container should be created. + string pod_sandbox_id = 1; + // Config of the container. + ContainerConfig config = 2; + // Config of the PodSandbox. This is the same config that was passed + // to RunPodSandboxRequest to create the PodSandbox. It is passed again + // here just for easy reference. The PodSandboxConfig is immutable and + // remains the same throughout the lifetime of the pod. + PodSandboxConfig sandbox_config = 3; +} + +message CreateContainerResponse { + // ID of the created container. + string container_id = 1; +} + +message StartContainerRequest { + // ID of the container to start. + string container_id = 1; +} + +message StartContainerResponse {} + +message StopContainerRequest { + // ID of the container to stop. + string container_id = 1; + // Timeout in seconds to wait for the container to stop before forcibly + // terminating it. Default: 0 (forcibly terminate the container immediately) + int64 timeout = 2; +} + +message StopContainerResponse {} + +message RemoveContainerRequest { + // ID of the container to remove. + string container_id = 1; +} + +message RemoveContainerResponse {} + +enum ContainerState { + CONTAINER_CREATED = 0; + CONTAINER_RUNNING = 1; + CONTAINER_EXITED = 2; + CONTAINER_UNKNOWN = 3; +} + +// ContainerStateValue is the wrapper of ContainerState. +message ContainerStateValue { + // State of the container. + ContainerState state = 1; +} + +// ContainerFilter is used to filter containers. +// All those fields are combined with 'AND' +message ContainerFilter { + // ID of the container. + string id = 1; + // State of the container. + ContainerStateValue state = 2; + // ID of the PodSandbox. + string pod_sandbox_id = 3; + // LabelSelector to select matches. + // Only api.MatchLabels is supported for now and the requirements + // are ANDed. MatchExpressions is not supported yet. + map<string, string> label_selector = 4; +} + +message ListContainersRequest { + ContainerFilter filter = 1; +} + +// Container provides the runtime information for a container, such as ID, hash, +// state of the container. +message Container { + // ID of the container, used by the container runtime to identify + // a container. + string id = 1; + // ID of the sandbox to which this container belongs. + string pod_sandbox_id = 2; + // Metadata of the container. + ContainerMetadata metadata = 3; + // Spec of the image. + ImageSpec image = 4; + // Reference to the image in use. For most runtimes, this should be an + // image ID. + string image_ref = 5; + // State of the container. + ContainerState state = 6; + // Creation time of the container in nanoseconds. + int64 created_at = 7; + // Key-value pairs that may be used to scope and select individual resources. + map<string, string> labels = 8; + // Unstructured key-value map holding arbitrary metadata. + // Annotations MUST NOT be altered by the runtime; the value of this field + // MUST be identical to that of the corresponding ContainerConfig used to + // instantiate this Container. + map<string, string> annotations = 9; +} + +message ListContainersResponse { + // List of containers. + repeated Container containers = 1; +} + +message ContainerStatusRequest { + // ID of the container for which to retrieve status. + string container_id = 1; +} + +// ContainerStatus represents the status of a container. +message ContainerStatus { + // ID of the container. + string id = 1; + // Metadata of the container. + ContainerMetadata metadata = 2; + // Status of the container. + ContainerState state = 3; + // Creation time of the container in nanoseconds. + int64 created_at = 4; + // Start time of the container in nanoseconds. Default: 0 (not specified). + int64 started_at = 5; + // Finish time of the container in nanoseconds. Default: 0 (not specified). + int64 finished_at = 6; + // Exit code of the container. Only required when finished_at != 0. Default: 0. + int32 exit_code = 7; + // Spec of the image. + ImageSpec image = 8; + // Reference to the image in use. For most runtimes, this should be an + // image ID + string image_ref = 9; + // Brief CamelCase string explaining why container is in its current state. + string reason = 10; + // Human-readable message indicating details about why container is in its + // current state. + string message = 11; + // Key-value pairs that may be used to scope and select individual resources. + map<string,string> labels = 12; + // Unstructured key-value map holding arbitrary metadata. + // Annotations MUST NOT be altered by the runtime; the value of this field + // MUST be identical to that of the corresponding ContainerConfig used to + // instantiate the Container this status represents. + map<string,string> annotations = 13; + // Mounts for the container. + repeated Mount mounts = 14; + // Log path of container. + string log_path = 15; +} + +message ContainerStatusResponse { + // Status of the container. + ContainerStatus status = 1; +} + +message UpdateContainerResourcesRequest { + // ID of the container to update. + string container_id = 1; + // Resource configuration specific to Linux containers. + LinuxContainerResources linux = 2; +} + +message UpdateContainerResourcesResponse {} + +message ExecSyncRequest { + // ID of the container. + string container_id = 1; + // Command to execute. + repeated string cmd = 2; + // Timeout in seconds to stop the command. Default: 0 (run forever). + int64 timeout = 3; +} + +message ExecSyncResponse { + // Captured command stdout output. + bytes stdout = 1; + // Captured command stderr output. + bytes stderr = 2; + // Exit code the command finished with. Default: 0 (success). + int32 exit_code = 3; +} + +message ExecRequest { + // ID of the container in which to execute the command. + string container_id = 1; + // Command to execute. + repeated string cmd = 2; + // Whether to exec the command in a TTY. + bool tty = 3; + // Whether to stream stdin. + bool stdin = 4; +} + +message ExecResponse { + // Fully qualified URL of the exec streaming server. + string url = 1; +} + +message AttachRequest { + // ID of the container to which to attach. + string container_id = 1; + // Whether to stream stdin. + bool stdin = 2; + // Whether the process being attached is running in a TTY. + // This must match the TTY setting in the ContainerConfig. + bool tty = 3; +} + +message AttachResponse { + // Fully qualified URL of the attach streaming server. + string url = 1; +} + +message PortForwardRequest { + // ID of the container to which to forward the port. + string pod_sandbox_id = 1; + // Port to forward. + repeated int32 port = 2; +} + +message PortForwardResponse { + // Fully qualified URL of the port-forward streaming server. + string url = 1; +} + +message ImageFilter { + // Spec of the image. + ImageSpec image = 1; +} + +message ListImagesRequest { + // Filter to list images. + ImageFilter filter = 1; +} + +// Basic information about a container image. +message Image { + // ID of the image. + string id = 1; + // Other names by which this image is known. + repeated string repo_tags = 2; + // Digests by which this image is known. + repeated string repo_digests = 3; + // Size of the image in bytes. Must be > 0. + uint64 size = 4; + // UID that will run the command(s). This is used as a default if no user is + // specified when creating the container. UID and the following user name + // are mutually exclusive. + Int64Value uid = 5; + // User name that will run the command(s). This is used if UID is not set + // and no user is specified when creating container. + string username = 6; +} + +message ListImagesResponse { + // List of images. + repeated Image images = 1; +} + +message ImageStatusRequest { + // Spec of the image. + ImageSpec image = 1; +} + +message ImageStatusResponse { + // Status of the image. + Image image = 1; +} + +// AuthConfig contains authorization information for connecting to a registry. +message AuthConfig { + string username = 1; + string password = 2; + string auth = 3; + string server_address = 4; + // IdentityToken is used to authenticate the user and get + // an access token for the registry. + string identity_token = 5; + // RegistryToken is a bearer token to be sent to a registry + string registry_token = 6; +} + +message PullImageRequest { + // Spec of the image. + ImageSpec image = 1; + // Authentication configuration for pulling the image. + AuthConfig auth = 2; + // Config of the PodSandbox, which is used to pull image in PodSandbox context. + PodSandboxConfig sandbox_config = 3; +} + +message PullImageResponse { + // Reference to the image in use. For most runtimes, this should be an + // image ID or digest. + string image_ref = 1; +} + +message RemoveImageRequest { + // Spec of the image to remove. + ImageSpec image = 1; +} + +message RemoveImageResponse {} + +message NetworkConfig { + // CIDR to use for pod IP addresses. + string pod_cidr = 1; +} + +message RuntimeConfig { + NetworkConfig network_config = 1; +} + +message UpdateRuntimeConfigRequest { + RuntimeConfig runtime_config = 1; +} + +message UpdateRuntimeConfigResponse {} + +// RuntimeCondition contains condition information for the runtime. +// There are 2 kinds of runtime conditions: +// 1. Required conditions: Conditions are required for kubelet to work +// properly. If any required condition is unmet, the node will be not ready. +// The required conditions include: +// * RuntimeReady: RuntimeReady means the runtime is up and ready to accept +// basic containers e.g. container only needs host network. +// * NetworkReady: NetworkReady means the runtime network is up and ready to +// accept containers which require container network. +// 2. Optional conditions: Conditions are informative to the user, but kubelet +// will not rely on. Since condition type is an arbitrary string, all conditions +// not required are optional. These conditions will be exposed to users to help +// them understand the status of the system. +message RuntimeCondition { + // Type of runtime condition. + string type = 1; + // Status of the condition, one of true/false. Default: false. + bool status = 2; + // Brief CamelCase string containing reason for the condition's last transition. + string reason = 3; + // Human-readable message indicating details about last transition. + string message = 4; +} + +// RuntimeStatus is information about the current status of the runtime. +message RuntimeStatus { + // List of current observed runtime conditions. + repeated RuntimeCondition conditions = 1; +} + +message StatusRequest {} + +message StatusResponse { + // Status of the Runtime. + RuntimeStatus status = 1; +} + +message ImageFsInfoRequest {} + +// UInt64Value is the wrapper of uint64. +message UInt64Value { + // The value. + uint64 value = 1; +} + +// StorageIdentifier uniquely identify the storage.. +message StorageIdentifier{ + // UUID of the device. + string uuid = 1; +} + +// FilesystemUsage provides the filesystem usage information. +message FilesystemUsage { + // Timestamp in nanoseconds at which the information were collected. Must be > 0. + int64 timestamp = 1; + // The underlying storage of the filesystem. + StorageIdentifier storage_id = 2; + // UsedBytes represents the bytes used for images on the filesystem. + // This may differ from the total bytes used on the filesystem and may not + // equal CapacityBytes - AvailableBytes. + UInt64Value used_bytes = 3; + // InodesUsed represents the inodes used by the images. + // This may not equal InodesCapacity - InodesAvailable because the underlying + // filesystem may also be used for purposes other than storing images. + UInt64Value inodes_used = 4; +} + +message ImageFsInfoResponse { + // Information of image filesystem(s). + repeated FilesystemUsage image_filesystems = 1; +} + +message ContainerStatsRequest{ + // ID of the container for which to retrieve stats. + string container_id = 1; +} + +message ContainerStatsResponse { + // Stats of the container. + ContainerStats stats = 1; +} + +message ListContainerStatsRequest{ + // Filter for the list request. + ContainerStatsFilter filter = 1; +} + +// ContainerStatsFilter is used to filter containers. +// All those fields are combined with 'AND' +message ContainerStatsFilter { + // ID of the container. + string id = 1; + // ID of the PodSandbox. + string pod_sandbox_id = 2; + // LabelSelector to select matches. + // Only api.MatchLabels is supported for now and the requirements + // are ANDed. MatchExpressions is not supported yet. + map<string, string> label_selector = 3; +} + +message ListContainerStatsResponse { + // Stats of the container. + repeated ContainerStats stats = 1; +} + +// ContainerAttributes provides basic information of the container. +message ContainerAttributes { + // ID of the container. + string id = 1; + // Metadata of the container. + ContainerMetadata metadata = 2; + // Key-value pairs that may be used to scope and select individual resources. + map<string,string> labels = 3; + // Unstructured key-value map holding arbitrary metadata. + // Annotations MUST NOT be altered by the runtime; the value of this field + // MUST be identical to that of the corresponding ContainerConfig used to + // instantiate the Container this status represents. + map<string,string> annotations = 4; +} + +// ContainerStats provides the resource usage statistics for a container. +message ContainerStats { + // Information of the container. + ContainerAttributes attributes = 1; + // CPU usage gathered from the container. + CpuUsage cpu = 2; + // Memory usage gathered from the container. + MemoryUsage memory = 3; + // Usage of the writeable layer. + FilesystemUsage writable_layer = 4; +} + +// CpuUsage provides the CPU usage information. +message CpuUsage { + // Timestamp in nanoseconds at which the information were collected. Must be > 0. + int64 timestamp = 1; + // Cumulative CPU usage (sum across all cores) since object creation. + UInt64Value usage_core_nano_seconds = 2; +} + +// MemoryUsage provides the memory usage information. +message MemoryUsage { + // Timestamp in nanoseconds at which the information were collected. Must be > 0. + int64 timestamp = 1; + // The amount of working set memory in bytes. + UInt64Value working_set_bytes = 2; +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime/constants.go b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime/constants.go new file mode 100644 index 000000000..27c42c5c5 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime/constants.go @@ -0,0 +1,27 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package runtime + +// This file contains all constants defined in CRI. + +// Required runtime condition type. +const ( + // RuntimeReady means the runtime is up and ready to accept basic containers. + RuntimeReady = "RuntimeReady" + // NetworkReady means the runtime network is up and ready to accept containers which require network. + NetworkReady = "NetworkReady" +) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/container/BUILD new file mode 100644 index 000000000..78c840846 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/BUILD @@ -0,0 +1,95 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "cache.go", + "container_gc.go", + "container_reference_manager.go", + "helpers.go", + "os.go", + "pty_unsupported.go", + "ref.go", + "resize.go", + "runtime.go", + "runtime_cache.go", + "runtime_cache_fake.go", + "sync_result.go", + ] + select({ + "@io_bazel_rules_go//go/platform:linux_amd64": [ + "pty_linux.go", + ], + "//conditions:default": [], + }), + visibility = ["//visibility:public"], + deps = [ + "//pkg/api:go_default_library", + "//pkg/kubelet/apis/cri/v1alpha1/runtime:go_default_library", + "//pkg/kubelet/util/format:go_default_library", + "//pkg/kubelet/util/ioutils:go_default_library", + "//pkg/util/hash:go_default_library", + "//pkg/volume:go_default_library", + "//third_party/forked/golang/expansion:go_default_library", + "//vendor/github.com/golang/glog:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", + "//vendor/k8s.io/client-go/tools/record:go_default_library", + "//vendor/k8s.io/client-go/tools/reference:go_default_library", + "//vendor/k8s.io/client-go/tools/remotecommand:go_default_library", + "//vendor/k8s.io/client-go/util/flowcontrol:go_default_library", + ] + select({ + "@io_bazel_rules_go//go/platform:linux_amd64": [ + "//vendor/github.com/kr/pty:go_default_library", + ], + "//conditions:default": [], + }), +) + +go_test( + name = "go_default_test", + srcs = [ + "cache_test.go", + "helpers_test.go", + "ref_test.go", + "sync_result_test.go", + ], + library = ":go_default_library", + deps = [ + "//pkg/api:go_default_library", + "//pkg/api/install:go_default_library", + "//vendor/github.com/stretchr/testify/assert:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + ], +) + +go_test( + name = "go_default_xtest", + srcs = ["runtime_cache_test.go"], + deps = [ + ":go_default_library", + "//pkg/kubelet/container/testing:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [ + ":package-srcs", + "//pkg/kubelet/container/testing:all-srcs", + ], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/cache.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/cache.go new file mode 100644 index 000000000..82852a9d9 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/cache.go @@ -0,0 +1,199 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package container + +import ( + "sync" + "time" + + "k8s.io/apimachinery/pkg/types" +) + +// Cache stores the PodStatus for the pods. It represents *all* the visible +// pods/containers in the container runtime. All cache entries are at least as +// new or newer than the global timestamp (set by UpdateTime()), while +// individual entries may be slightly newer than the global timestamp. If a pod +// has no states known by the runtime, Cache returns an empty PodStatus object +// with ID populated. +// +// Cache provides two methods to retrive the PodStatus: the non-blocking Get() +// and the blocking GetNewerThan() method. The component responsible for +// populating the cache is expected to call Delete() to explicitly free the +// cache entries. +type Cache interface { + Get(types.UID) (*PodStatus, error) + Set(types.UID, *PodStatus, error, time.Time) + // GetNewerThan is a blocking call that only returns the status + // when it is newer than the given time. + GetNewerThan(types.UID, time.Time) (*PodStatus, error) + Delete(types.UID) + UpdateTime(time.Time) +} + +type data struct { + // Status of the pod. + status *PodStatus + // Error got when trying to inspect the pod. + err error + // Time when the data was last modified. + modified time.Time +} + +type subRecord struct { + time time.Time + ch chan *data +} + +// cache implements Cache. +type cache struct { + // Lock which guards all internal data structures. + lock sync.RWMutex + // Map that stores the pod statuses. + pods map[types.UID]*data + // A global timestamp represents how fresh the cached data is. All + // cache content is at the least newer than this timestamp. Note that the + // timestamp is nil after initialization, and will only become non-nil when + // it is ready to serve the cached statuses. + timestamp *time.Time + // Map that stores the subscriber records. + subscribers map[types.UID][]*subRecord +} + +// NewCache creates a pod cache. +func NewCache() Cache { + return &cache{pods: map[types.UID]*data{}, subscribers: map[types.UID][]*subRecord{}} +} + +// Get returns the PodStatus for the pod; callers are expected not to +// modify the objects returned. +func (c *cache) Get(id types.UID) (*PodStatus, error) { + c.lock.RLock() + defer c.lock.RUnlock() + d := c.get(id) + return d.status, d.err +} + +func (c *cache) GetNewerThan(id types.UID, minTime time.Time) (*PodStatus, error) { + ch := c.subscribe(id, minTime) + d := <-ch + return d.status, d.err +} + +// Set sets the PodStatus for the pod. +func (c *cache) Set(id types.UID, status *PodStatus, err error, timestamp time.Time) { + c.lock.Lock() + defer c.lock.Unlock() + defer c.notify(id, timestamp) + c.pods[id] = &data{status: status, err: err, modified: timestamp} +} + +// Delete removes the entry of the pod. +func (c *cache) Delete(id types.UID) { + c.lock.Lock() + defer c.lock.Unlock() + delete(c.pods, id) +} + +// UpdateTime modifies the global timestamp of the cache and notify +// subscribers if needed. +func (c *cache) UpdateTime(timestamp time.Time) { + c.lock.Lock() + defer c.lock.Unlock() + c.timestamp = ×tamp + // Notify all the subscribers if the condition is met. + for id := range c.subscribers { + c.notify(id, *c.timestamp) + } +} + +func makeDefaultData(id types.UID) *data { + return &data{status: &PodStatus{ID: id}, err: nil} +} + +func (c *cache) get(id types.UID) *data { + d, ok := c.pods[id] + if !ok { + // Cache should store *all* pod/container information known by the + // container runtime. A cache miss indicates that there are no states + // regarding the pod last time we queried the container runtime. + // What this *really* means is that there are no visible pod/containers + // associated with this pod. Simply return an default (mostly empty) + // PodStatus to reflect this. + return makeDefaultData(id) + } + return d +} + +// getIfNewerThan returns the data it is newer than the given time. +// Otherwise, it returns nil. The caller should acquire the lock. +func (c *cache) getIfNewerThan(id types.UID, minTime time.Time) *data { + d, ok := c.pods[id] + globalTimestampIsNewer := (c.timestamp != nil && c.timestamp.After(minTime)) + if !ok && globalTimestampIsNewer { + // Status is not cached, but the global timestamp is newer than + // minTime, return the default status. + return makeDefaultData(id) + } + if ok && (d.modified.After(minTime) || globalTimestampIsNewer) { + // Status is cached, return status if either of the following is true. + // * status was modified after minTime + // * the global timestamp of the cache is newer than minTime. + return d + } + // The pod status is not ready. + return nil +} + +// notify sends notifications for pod with the given id, if the requirements +// are met. Note that the caller should acquire the lock. +func (c *cache) notify(id types.UID, timestamp time.Time) { + list, ok := c.subscribers[id] + if !ok { + // No one to notify. + return + } + newList := []*subRecord{} + for i, r := range list { + if timestamp.Before(r.time) { + // Doesn't meet the time requirement; keep the record. + newList = append(newList, list[i]) + continue + } + r.ch <- c.get(id) + close(r.ch) + } + if len(newList) == 0 { + delete(c.subscribers, id) + } else { + c.subscribers[id] = newList + } +} + +func (c *cache) subscribe(id types.UID, timestamp time.Time) chan *data { + ch := make(chan *data, 1) + c.lock.Lock() + defer c.lock.Unlock() + d := c.getIfNewerThan(id, timestamp) + if d != nil { + // If the cache entry is ready, send the data and return immediately. + ch <- d + return ch + } + // Add the subscription record. + c.subscribers[id] = append(c.subscribers[id], &subRecord{time: timestamp, ch: ch}) + return ch +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/cache_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/cache_test.go new file mode 100644 index 000000000..b1dc1bd23 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/cache_test.go @@ -0,0 +1,210 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package container + +import ( + "fmt" + "strconv" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "k8s.io/apimachinery/pkg/types" +) + +func newTestCache() *cache { + c := NewCache() + return c.(*cache) +} + +func TestCacheNotInitialized(t *testing.T) { + cache := newTestCache() + // If the global timestamp is not set, always return nil. + d := cache.getIfNewerThan(types.UID("1234"), time.Time{}) + assert.True(t, d == nil, "should return nil since cache is not initialized") +} + +func getTestPodIDAndStatus(numContainers int) (types.UID, *PodStatus) { + id := types.UID(strconv.FormatInt(time.Now().UnixNano(), 10)) + name := fmt.Sprintf("cache-foo-%s", string(id)) + namespace := "ns" + var status *PodStatus + if numContainers > 0 { + status = &PodStatus{ID: id, Name: name, Namespace: namespace} + } else { + status = &PodStatus{ID: id} + } + for i := 0; i < numContainers; i++ { + status.ContainerStatuses = append(status.ContainerStatuses, &ContainerStatus{Name: string(i)}) + } + return id, status +} + +func TestGetIfNewerThanWhenPodExists(t *testing.T) { + cache := newTestCache() + timestamp := time.Now() + + cases := []struct { + cacheTime time.Time + modified time.Time + expected bool + }{ + { + // Both the global cache timestamp and the modified time are newer + // than the timestamp. + cacheTime: timestamp.Add(time.Second), + modified: timestamp, + expected: true, + }, + { + // Global cache timestamp is newer, but the pod entry modified + // time is older than the given timestamp. This means that the + // entry is up-to-date even though it hasn't changed for a while. + cacheTime: timestamp.Add(time.Second), + modified: timestamp.Add(-time.Second * 10), + expected: true, + }, + { + // Global cache timestamp is older, but the pod entry modified + // time is newer than the given timestamp. This means that the + // entry is up-to-date but the rest of the cache are still being + // updated. + cacheTime: timestamp.Add(-time.Second), + modified: timestamp.Add(time.Second * 3), + expected: true, + }, + { + // Both the global cache timestamp and the modified time are older + // than the given timestamp. + cacheTime: timestamp.Add(-time.Second), + modified: timestamp.Add(-time.Second), + expected: false, + }, + } + for i, c := range cases { + podID, status := getTestPodIDAndStatus(2) + cache.UpdateTime(c.cacheTime) + cache.Set(podID, status, nil, c.modified) + d := cache.getIfNewerThan(podID, timestamp) + assert.Equal(t, c.expected, d != nil, "test[%d]", i) + } +} + +func TestGetPodNewerThanWhenPodDoesNotExist(t *testing.T) { + cache := newTestCache() + cacheTime := time.Now() + cache.UpdateTime(cacheTime) + podID := types.UID("1234") + + cases := []struct { + timestamp time.Time + expected bool + }{ + { + timestamp: cacheTime.Add(-time.Second), + expected: true, + }, + { + timestamp: cacheTime.Add(time.Second), + expected: false, + }, + } + for i, c := range cases { + d := cache.getIfNewerThan(podID, c.timestamp) + assert.Equal(t, c.expected, d != nil, "test[%d]", i) + } +} + +func TestCacheSetAndGet(t *testing.T) { + cache := NewCache() + cases := []struct { + numContainers int + error error + }{ + {numContainers: 3, error: nil}, + {numContainers: 2, error: fmt.Errorf("unable to get status")}, + {numContainers: 0, error: nil}, + } + for i, c := range cases { + podID, status := getTestPodIDAndStatus(c.numContainers) + cache.Set(podID, status, c.error, time.Time{}) + // Read back the status and error stored in cache and make sure they + // match the original ones. + actualStatus, actualErr := cache.Get(podID) + assert.Equal(t, status, actualStatus, "test[%d]", i) + assert.Equal(t, c.error, actualErr, "test[%d]", i) + } +} + +func TestCacheGetPodDoesNotExist(t *testing.T) { + cache := NewCache() + podID, status := getTestPodIDAndStatus(0) + // If the pod does not exist in cache, cache should return an status + // object with id filled. + actualStatus, actualErr := cache.Get(podID) + assert.Equal(t, status, actualStatus) + assert.Equal(t, nil, actualErr) +} + +func TestDelete(t *testing.T) { + cache := &cache{pods: map[types.UID]*data{}} + // Write a new pod status into the cache. + podID, status := getTestPodIDAndStatus(3) + cache.Set(podID, status, nil, time.Time{}) + actualStatus, actualErr := cache.Get(podID) + assert.Equal(t, status, actualStatus) + assert.Equal(t, nil, actualErr) + // Delete the pod from cache, and verify that we get an empty status. + cache.Delete(podID) + expectedStatus := &PodStatus{ID: podID} + actualStatus, actualErr = cache.Get(podID) + assert.Equal(t, expectedStatus, actualStatus) + assert.Equal(t, nil, actualErr) +} + +func verifyNotification(t *testing.T, ch chan *data, expectNotification bool) { + if expectNotification { + assert.True(t, len(ch) > 0, "Did not receive notification") + } else { + assert.True(t, len(ch) < 1, "Should not have triggered the notification") + } + // Drain the channel. + for i := 0; i < len(ch); i++ { + <-ch + } +} + +func TestRegisterNotification(t *testing.T) { + cache := newTestCache() + cacheTime := time.Now() + cache.UpdateTime(cacheTime) + + podID, status := getTestPodIDAndStatus(1) + ch := cache.subscribe(podID, cacheTime.Add(time.Second)) + verifyNotification(t, ch, false) + cache.Set(podID, status, nil, cacheTime.Add(time.Second)) + // The Set operation should've triggered the notification. + verifyNotification(t, ch, true) + + podID, _ = getTestPodIDAndStatus(1) + + ch = cache.subscribe(podID, cacheTime.Add(time.Second)) + verifyNotification(t, ch, false) + cache.UpdateTime(cacheTime.Add(time.Second * 2)) + // The advance of cache timestamp should've triggered the notification. + verifyNotification(t, ch, true) +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/container_gc.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/container_gc.go new file mode 100644 index 000000000..be2fac4b9 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/container_gc.go @@ -0,0 +1,84 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package container + +import ( + "fmt" + "time" +) + +// Specified a policy for garbage collecting containers. +type ContainerGCPolicy struct { + // Minimum age at which a container can be garbage collected, zero for no limit. + MinAge time.Duration + + // Max number of dead containers any single pod (UID, container name) pair is + // allowed to have, less than zero for no limit. + MaxPerPodContainer int + + // Max number of total dead containers, less than zero for no limit. + MaxContainers int +} + +// Manages garbage collection of dead containers. +// +// Implementation is thread-compatible. +type ContainerGC interface { + // Garbage collect containers. + GarbageCollect() error + // Deletes all unused containers, including containers belonging to pods that are terminated but not deleted + DeleteAllUnusedContainers() error +} + +// SourcesReadyProvider knows how to determine if configuration sources are ready +type SourcesReadyProvider interface { + // AllReady returns true if the currently configured sources have all been seen. + AllReady() bool +} + +// TODO(vmarmol): Preferentially remove pod infra containers. +type realContainerGC struct { + // Container runtime + runtime Runtime + + // Policy for garbage collection. + policy ContainerGCPolicy + + // sourcesReadyProvider provides the readyness of kubelet configuration sources. + sourcesReadyProvider SourcesReadyProvider +} + +// New ContainerGC instance with the specified policy. +func NewContainerGC(runtime Runtime, policy ContainerGCPolicy, sourcesReadyProvider SourcesReadyProvider) (ContainerGC, error) { + if policy.MinAge < 0 { + return nil, fmt.Errorf("invalid minimum garbage collection age: %v", policy.MinAge) + } + + return &realContainerGC{ + runtime: runtime, + policy: policy, + sourcesReadyProvider: sourcesReadyProvider, + }, nil +} + +func (cgc *realContainerGC) GarbageCollect() error { + return cgc.runtime.GarbageCollect(cgc.policy, cgc.sourcesReadyProvider.AllReady(), false) +} + +func (cgc *realContainerGC) DeleteAllUnusedContainers() error { + return cgc.runtime.GarbageCollect(cgc.policy, cgc.sourcesReadyProvider.AllReady(), true) +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/container_reference_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/container_reference_manager.go new file mode 100644 index 000000000..d41d05a93 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/container_reference_manager.go @@ -0,0 +1,60 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package container + +import ( + "sync" + + "k8s.io/api/core/v1" +) + +// RefManager manages the references for the containers. +// The references are used for reporting events such as creation, +// failure, etc. This manager is thread-safe, no locks are necessary +// for the caller. +type RefManager struct { + sync.RWMutex + containerIDToRef map[ContainerID]*v1.ObjectReference +} + +// NewRefManager creates and returns a container reference manager +// with empty contents. +func NewRefManager() *RefManager { + return &RefManager{containerIDToRef: make(map[ContainerID]*v1.ObjectReference)} +} + +// SetRef stores a reference to a pod's container, associating it with the given container ID. +func (c *RefManager) SetRef(id ContainerID, ref *v1.ObjectReference) { + c.Lock() + defer c.Unlock() + c.containerIDToRef[id] = ref +} + +// ClearRef forgets the given container id and its associated container reference. +func (c *RefManager) ClearRef(id ContainerID) { + c.Lock() + defer c.Unlock() + delete(c.containerIDToRef, id) +} + +// GetRef returns the container reference of the given ID, or (nil, false) if none is stored. +func (c *RefManager) GetRef(id ContainerID) (ref *v1.ObjectReference, ok bool) { + c.RLock() + defer c.RUnlock() + ref, ok = c.containerIDToRef[id] + return ref, ok +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/helpers.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/helpers.go new file mode 100644 index 000000000..e242398ff --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/helpers.go @@ -0,0 +1,359 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package container + +import ( + "bytes" + "fmt" + "hash/adler32" + "hash/fnv" + "strings" + "time" + + "github.com/golang/glog" + + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/tools/record" + runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime" + "k8s.io/kubernetes/pkg/kubelet/util/format" + "k8s.io/kubernetes/pkg/kubelet/util/ioutils" + hashutil "k8s.io/kubernetes/pkg/util/hash" + "k8s.io/kubernetes/third_party/forked/golang/expansion" +) + +// HandlerRunner runs a lifecycle handler for a container. +type HandlerRunner interface { + Run(containerID ContainerID, pod *v1.Pod, container *v1.Container, handler *v1.Handler) (string, error) +} + +// RuntimeHelper wraps kubelet to make container runtime +// able to get necessary informations like the RunContainerOptions, DNS settings, Host IP. +type RuntimeHelper interface { + GenerateRunContainerOptions(pod *v1.Pod, container *v1.Container, podIP string) (contOpts *RunContainerOptions, useClusterFirstPolicy bool, err error) + GetClusterDNS(pod *v1.Pod) (dnsServers []string, dnsSearches []string, useClusterFirstPolicy bool, err error) + // GetPodCgroupParent returns the the CgroupName identifer, and its literal cgroupfs form on the host + // of a pod. + GetPodCgroupParent(pod *v1.Pod) string + GetPodDir(podUID types.UID) string + GeneratePodHostNameAndDomain(pod *v1.Pod) (hostname string, hostDomain string, err error) + // GetExtraSupplementalGroupsForPod returns a list of the extra + // supplemental groups for the Pod. These extra supplemental groups come + // from annotations on persistent volumes that the pod depends on. + GetExtraSupplementalGroupsForPod(pod *v1.Pod) []int64 +} + +// ShouldContainerBeRestarted checks whether a container needs to be restarted. +// TODO(yifan): Think about how to refactor this. +func ShouldContainerBeRestarted(container *v1.Container, pod *v1.Pod, podStatus *PodStatus) bool { + // Get latest container status. + status := podStatus.FindContainerStatusByName(container.Name) + // If the container was never started before, we should start it. + // NOTE(random-liu): If all historical containers were GC'd, we'll also return true here. + if status == nil { + return true + } + // Check whether container is running + if status.State == ContainerStateRunning { + return false + } + // Always restart container in the unknown, or in the created state. + if status.State == ContainerStateUnknown || status.State == ContainerStateCreated { + return true + } + // Check RestartPolicy for dead container + if pod.Spec.RestartPolicy == v1.RestartPolicyNever { + glog.V(4).Infof("Already ran container %q of pod %q, do nothing", container.Name, format.Pod(pod)) + return false + } + if pod.Spec.RestartPolicy == v1.RestartPolicyOnFailure { + // Check the exit code. + if status.ExitCode == 0 { + glog.V(4).Infof("Already successfully ran container %q of pod %q, do nothing", container.Name, format.Pod(pod)) + return false + } + } + return true +} + +// HashContainer returns the hash of the container. It is used to compare +// the running container with its desired spec. +func HashContainer(container *v1.Container) uint64 { + hash := fnv.New32a() + hashutil.DeepHashObject(hash, *container) + return uint64(hash.Sum32()) +} + +// HashContainerLegacy returns the hash of the container. It is used to compare +// the running container with its desired spec. +// This is used by rktnetes and dockershim (for handling <=1.5 containers). +// TODO: Remove this function when kubernetes version is >=1.8 AND rktnetes +// update its hash function. +func HashContainerLegacy(container *v1.Container) uint64 { + hash := adler32.New() + hashutil.DeepHashObject(hash, *container) + return uint64(hash.Sum32()) +} + +// EnvVarsToMap constructs a map of environment name to value from a slice +// of env vars. +func EnvVarsToMap(envs []EnvVar) map[string]string { + result := map[string]string{} + for _, env := range envs { + result[env.Name] = env.Value + } + return result +} + +// V1EnvVarsToMap constructs a map of environment name to value from a slice +// of env vars. +func V1EnvVarsToMap(envs []v1.EnvVar) map[string]string { + result := map[string]string{} + for _, env := range envs { + result[env.Name] = env.Value + } + + return result +} + +// ExpandContainerCommandOnlyStatic substitutes only static environment variable values from the +// container environment definitions. This does *not* include valueFrom substitutions. +// TODO: callers should use ExpandContainerCommandAndArgs with a fully resolved list of environment. +func ExpandContainerCommandOnlyStatic(containerCommand []string, envs []v1.EnvVar) (command []string) { + mapping := expansion.MappingFuncFor(V1EnvVarsToMap(envs)) + if len(containerCommand) != 0 { + for _, cmd := range containerCommand { + command = append(command, expansion.Expand(cmd, mapping)) + } + } + return command +} + +func ExpandContainerCommandAndArgs(container *v1.Container, envs []EnvVar) (command []string, args []string) { + mapping := expansion.MappingFuncFor(EnvVarsToMap(envs)) + + if len(container.Command) != 0 { + for _, cmd := range container.Command { + command = append(command, expansion.Expand(cmd, mapping)) + } + } + + if len(container.Args) != 0 { + for _, arg := range container.Args { + args = append(args, expansion.Expand(arg, mapping)) + } + } + + return command, args +} + +// Create an event recorder to record object's event except implicitly required container's, like infra container. +func FilterEventRecorder(recorder record.EventRecorder) record.EventRecorder { + return &innerEventRecorder{ + recorder: recorder, + } +} + +type innerEventRecorder struct { + recorder record.EventRecorder +} + +func (irecorder *innerEventRecorder) shouldRecordEvent(object runtime.Object) (*v1.ObjectReference, bool) { + if object == nil { + return nil, false + } + if ref, ok := object.(*v1.ObjectReference); ok { + if !strings.HasPrefix(ref.FieldPath, ImplicitContainerPrefix) { + return ref, true + } + } + return nil, false +} + +func (irecorder *innerEventRecorder) Event(object runtime.Object, eventtype, reason, message string) { + if ref, ok := irecorder.shouldRecordEvent(object); ok { + irecorder.recorder.Event(ref, eventtype, reason, message) + } +} + +func (irecorder *innerEventRecorder) Eventf(object runtime.Object, eventtype, reason, messageFmt string, args ...interface{}) { + if ref, ok := irecorder.shouldRecordEvent(object); ok { + irecorder.recorder.Eventf(ref, eventtype, reason, messageFmt, args...) + } + +} + +func (irecorder *innerEventRecorder) PastEventf(object runtime.Object, timestamp metav1.Time, eventtype, reason, messageFmt string, args ...interface{}) { + if ref, ok := irecorder.shouldRecordEvent(object); ok { + irecorder.recorder.PastEventf(ref, timestamp, eventtype, reason, messageFmt, args...) + } +} + +// Pod must not be nil. +func IsHostNetworkPod(pod *v1.Pod) bool { + return pod.Spec.HostNetwork +} + +// TODO(random-liu): Convert PodStatus to running Pod, should be deprecated soon +func ConvertPodStatusToRunningPod(runtimeName string, podStatus *PodStatus) Pod { + runningPod := Pod{ + ID: podStatus.ID, + Name: podStatus.Name, + Namespace: podStatus.Namespace, + } + for _, containerStatus := range podStatus.ContainerStatuses { + if containerStatus.State != ContainerStateRunning { + continue + } + container := &Container{ + ID: containerStatus.ID, + Name: containerStatus.Name, + Image: containerStatus.Image, + ImageID: containerStatus.ImageID, + Hash: containerStatus.Hash, + State: containerStatus.State, + } + runningPod.Containers = append(runningPod.Containers, container) + } + + // Populate sandboxes in kubecontainer.Pod + for _, sandbox := range podStatus.SandboxStatuses { + runningPod.Sandboxes = append(runningPod.Sandboxes, &Container{ + ID: ContainerID{Type: runtimeName, ID: sandbox.Id}, + State: SandboxToContainerState(sandbox.State), + }) + } + return runningPod +} + +// SandboxToContainerState converts runtimeapi.PodSandboxState to +// kubecontainer.ContainerState. +// This is only needed because we need to return sandboxes as if they were +// kubecontainer.Containers to avoid substantial changes to PLEG. +// TODO: Remove this once it becomes obsolete. +func SandboxToContainerState(state runtimeapi.PodSandboxState) ContainerState { + switch state { + case runtimeapi.PodSandboxState_SANDBOX_READY: + return ContainerStateRunning + case runtimeapi.PodSandboxState_SANDBOX_NOTREADY: + return ContainerStateExited + } + return ContainerStateUnknown +} + +// FormatPod returns a string representing a pod in a human readable format, +// with pod UID as part of the string. +func FormatPod(pod *Pod) string { + // Use underscore as the delimiter because it is not allowed in pod name + // (DNS subdomain format), while allowed in the container name format. + return fmt.Sprintf("%s_%s(%s)", pod.Name, pod.Namespace, pod.ID) +} + +type containerCommandRunnerWrapper struct { + DirectStreamingRuntime +} + +var _ ContainerCommandRunner = &containerCommandRunnerWrapper{} + +func DirectStreamingRunner(runtime DirectStreamingRuntime) ContainerCommandRunner { + return &containerCommandRunnerWrapper{runtime} +} + +func (r *containerCommandRunnerWrapper) RunInContainer(id ContainerID, cmd []string, timeout time.Duration) ([]byte, error) { + var buffer bytes.Buffer + output := ioutils.WriteCloserWrapper(&buffer) + err := r.ExecInContainer(id, cmd, nil, output, output, false, nil, timeout) + // Even if err is non-nil, there still may be output (e.g. the exec wrote to stdout or stderr but + // the command returned a nonzero exit code). Therefore, always return the output along with the + // error. + return buffer.Bytes(), err +} + +// GetContainerSpec gets the container spec by containerName. +func GetContainerSpec(pod *v1.Pod, containerName string) *v1.Container { + for i, c := range pod.Spec.Containers { + if containerName == c.Name { + return &pod.Spec.Containers[i] + } + } + for i, c := range pod.Spec.InitContainers { + if containerName == c.Name { + return &pod.Spec.InitContainers[i] + } + } + return nil +} + +// HasPrivilegedContainer returns true if any of the containers in the pod are privileged. +func HasPrivilegedContainer(pod *v1.Pod) bool { + for _, c := range pod.Spec.Containers { + if c.SecurityContext != nil && + c.SecurityContext.Privileged != nil && + *c.SecurityContext.Privileged { + return true + } + } + return false +} + +// MakeCapabilities creates string slices from Capability slices +func MakeCapabilities(capAdd []v1.Capability, capDrop []v1.Capability) ([]string, []string) { + var ( + addCaps []string + dropCaps []string + ) + for _, cap := range capAdd { + addCaps = append(addCaps, string(cap)) + } + for _, cap := range capDrop { + dropCaps = append(dropCaps, string(cap)) + } + return addCaps, dropCaps +} + +// MakePortMappings creates internal port mapping from api port mapping. +func MakePortMappings(container *v1.Container) (ports []PortMapping) { + names := make(map[string]struct{}) + for _, p := range container.Ports { + pm := PortMapping{ + HostPort: int(p.HostPort), + ContainerPort: int(p.ContainerPort), + Protocol: p.Protocol, + HostIP: p.HostIP, + } + + // We need to create some default port name if it's not specified, since + // this is necessary for rkt. + // http://issue.k8s.io/7710 + if p.Name == "" { + pm.Name = fmt.Sprintf("%s-%s:%d", container.Name, p.Protocol, p.ContainerPort) + } else { + pm.Name = fmt.Sprintf("%s-%s", container.Name, p.Name) + } + + // Protect against exposing the same protocol-port more than once in a container. + if _, ok := names[pm.Name]; ok { + glog.Warningf("Port name conflicted, %q is defined more than once", pm.Name) + continue + } + ports = append(ports, pm) + names[pm.Name] = struct{}{} + } + return +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/helpers_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/helpers_test.go new file mode 100644 index 000000000..f907e83e8 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/helpers_test.go @@ -0,0 +1,308 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package container + +import ( + "reflect" + "testing" + + "github.com/stretchr/testify/assert" + + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +func TestEnvVarsToMap(t *testing.T) { + vars := []EnvVar{ + { + Name: "foo", + Value: "bar", + }, + { + Name: "zoo", + Value: "baz", + }, + } + + varMap := EnvVarsToMap(vars) + + if e, a := len(vars), len(varMap); e != a { + t.Errorf("Unexpected map length; expected: %d, got %d", e, a) + } + + if a := varMap["foo"]; a != "bar" { + t.Errorf("Unexpected value of key 'foo': %v", a) + } + + if a := varMap["zoo"]; a != "baz" { + t.Errorf("Unexpected value of key 'zoo': %v", a) + } +} + +func TestExpandCommandAndArgs(t *testing.T) { + cases := []struct { + name string + container *v1.Container + envs []EnvVar + expectedCommand []string + expectedArgs []string + }{ + { + name: "none", + container: &v1.Container{}, + }, + { + name: "command expanded", + container: &v1.Container{ + Command: []string{"foo", "$(VAR_TEST)", "$(VAR_TEST2)"}, + }, + envs: []EnvVar{ + { + Name: "VAR_TEST", + Value: "zoo", + }, + { + Name: "VAR_TEST2", + Value: "boo", + }, + }, + expectedCommand: []string{"foo", "zoo", "boo"}, + }, + { + name: "args expanded", + container: &v1.Container{ + Args: []string{"zap", "$(VAR_TEST)", "$(VAR_TEST2)"}, + }, + envs: []EnvVar{ + { + Name: "VAR_TEST", + Value: "hap", + }, + { + Name: "VAR_TEST2", + Value: "trap", + }, + }, + expectedArgs: []string{"zap", "hap", "trap"}, + }, + { + name: "both expanded", + container: &v1.Container{ + Command: []string{"$(VAR_TEST2)--$(VAR_TEST)", "foo", "$(VAR_TEST3)"}, + Args: []string{"foo", "$(VAR_TEST)", "$(VAR_TEST2)"}, + }, + envs: []EnvVar{ + { + Name: "VAR_TEST", + Value: "zoo", + }, + { + Name: "VAR_TEST2", + Value: "boo", + }, + { + Name: "VAR_TEST3", + Value: "roo", + }, + }, + expectedCommand: []string{"boo--zoo", "foo", "roo"}, + expectedArgs: []string{"foo", "zoo", "boo"}, + }, + } + + for _, tc := range cases { + actualCommand, actualArgs := ExpandContainerCommandAndArgs(tc.container, tc.envs) + + if e, a := tc.expectedCommand, actualCommand; !reflect.DeepEqual(e, a) { + t.Errorf("%v: unexpected command; expected %v, got %v", tc.name, e, a) + } + + if e, a := tc.expectedArgs, actualArgs; !reflect.DeepEqual(e, a) { + t.Errorf("%v: unexpected args; expected %v, got %v", tc.name, e, a) + } + + } +} + +func TestShouldContainerBeRestarted(t *testing.T) { + pod := &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + UID: "12345678", + Name: "foo", + Namespace: "new", + }, + Spec: v1.PodSpec{ + Containers: []v1.Container{ + {Name: "no-history"}, + {Name: "alive"}, + {Name: "succeed"}, + {Name: "failed"}, + {Name: "unknown"}, + }, + }, + } + podStatus := &PodStatus{ + ID: pod.UID, + Name: pod.Name, + Namespace: pod.Namespace, + ContainerStatuses: []*ContainerStatus{ + { + Name: "alive", + State: ContainerStateRunning, + }, + { + Name: "succeed", + State: ContainerStateExited, + ExitCode: 0, + }, + { + Name: "failed", + State: ContainerStateExited, + ExitCode: 1, + }, + { + Name: "alive", + State: ContainerStateExited, + ExitCode: 2, + }, + { + Name: "unknown", + State: ContainerStateUnknown, + }, + { + Name: "failed", + State: ContainerStateExited, + ExitCode: 3, + }, + }, + } + policies := []v1.RestartPolicy{ + v1.RestartPolicyNever, + v1.RestartPolicyOnFailure, + v1.RestartPolicyAlways, + } + expected := map[string][]bool{ + "no-history": {true, true, true}, + "alive": {false, false, false}, + "succeed": {false, false, true}, + "failed": {false, true, true}, + "unknown": {true, true, true}, + } + for _, c := range pod.Spec.Containers { + for i, policy := range policies { + pod.Spec.RestartPolicy = policy + e := expected[c.Name][i] + r := ShouldContainerBeRestarted(&c, pod, podStatus) + if r != e { + t.Errorf("Restart for container %q with restart policy %q expected %t, got %t", + c.Name, policy, e, r) + } + } + } +} + +func TestHasPrivilegedContainer(t *testing.T) { + newBoolPtr := func(b bool) *bool { + return &b + } + tests := map[string]struct { + securityContext *v1.SecurityContext + expected bool + }{ + "nil security context": { + securityContext: nil, + expected: false, + }, + "nil privileged": { + securityContext: &v1.SecurityContext{}, + expected: false, + }, + "false privileged": { + securityContext: &v1.SecurityContext{Privileged: newBoolPtr(false)}, + expected: false, + }, + "true privileged": { + securityContext: &v1.SecurityContext{Privileged: newBoolPtr(true)}, + expected: true, + }, + } + + for k, v := range tests { + pod := &v1.Pod{ + Spec: v1.PodSpec{ + Containers: []v1.Container{ + {SecurityContext: v.securityContext}, + }, + }, + } + actual := HasPrivilegedContainer(pod) + if actual != v.expected { + t.Errorf("%s expected %t but got %t", k, v.expected, actual) + } + } +} + +func TestMakePortMappings(t *testing.T) { + port := func(name string, protocol v1.Protocol, containerPort, hostPort int32, ip string) v1.ContainerPort { + return v1.ContainerPort{ + Name: name, + Protocol: protocol, + ContainerPort: containerPort, + HostPort: hostPort, + HostIP: ip, + } + } + portMapping := func(name string, protocol v1.Protocol, containerPort, hostPort int, ip string) PortMapping { + return PortMapping{ + Name: name, + Protocol: protocol, + ContainerPort: containerPort, + HostPort: hostPort, + HostIP: ip, + } + } + + tests := []struct { + container *v1.Container + expectedPortMappings []PortMapping + }{ + { + &v1.Container{ + Name: "fooContainer", + Ports: []v1.ContainerPort{ + port("", v1.ProtocolTCP, 80, 8080, "127.0.0.1"), + port("", v1.ProtocolTCP, 443, 4343, "192.168.0.1"), + port("foo", v1.ProtocolUDP, 555, 5555, ""), + // Duplicated, should be ignored. + port("foo", v1.ProtocolUDP, 888, 8888, ""), + // Duplicated, should be ignored. + port("", v1.ProtocolTCP, 80, 8888, ""), + }, + }, + []PortMapping{ + portMapping("fooContainer-TCP:80", v1.ProtocolTCP, 80, 8080, "127.0.0.1"), + portMapping("fooContainer-TCP:443", v1.ProtocolTCP, 443, 4343, "192.168.0.1"), + portMapping("fooContainer-foo", v1.ProtocolUDP, 555, 5555, ""), + }, + }, + } + + for i, tt := range tests { + actual := MakePortMappings(tt.container) + assert.Equal(t, tt.expectedPortMappings, actual, "[%d]", i) + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/os.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/os.go new file mode 100644 index 000000000..6126063b3 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/os.go @@ -0,0 +1,107 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package container + +import ( + "io/ioutil" + "os" + "path/filepath" + "time" +) + +// OSInterface collects system level operations that need to be mocked out +// during tests. +type OSInterface interface { + MkdirAll(path string, perm os.FileMode) error + Symlink(oldname string, newname string) error + Stat(path string) (os.FileInfo, error) + Remove(path string) error + RemoveAll(path string) error + Create(path string) (*os.File, error) + Chmod(path string, perm os.FileMode) error + Hostname() (name string, err error) + Chtimes(path string, atime time.Time, mtime time.Time) error + Pipe() (r *os.File, w *os.File, err error) + ReadDir(dirname string) ([]os.FileInfo, error) + Glob(pattern string) ([]string, error) +} + +// RealOS is used to dispatch the real system level operations. +type RealOS struct{} + +// MkDir will will call os.Mkdir to create a directory. +func (RealOS) MkdirAll(path string, perm os.FileMode) error { + return os.MkdirAll(path, perm) +} + +// Symlink will call os.Symlink to create a symbolic link. +func (RealOS) Symlink(oldname string, newname string) error { + return os.Symlink(oldname, newname) +} + +// Stat will call os.Stat to get the FileInfo for a given path +func (RealOS) Stat(path string) (os.FileInfo, error) { + return os.Stat(path) +} + +// Remove will call os.Remove to remove the path. +func (RealOS) Remove(path string) error { + return os.Remove(path) +} + +// RemoveAll will call os.RemoveAll to remove the path and its children. +func (RealOS) RemoveAll(path string) error { + return os.RemoveAll(path) +} + +// Create will call os.Create to create and return a file +// at path. +func (RealOS) Create(path string) (*os.File, error) { + return os.Create(path) +} + +// Chmod will change the permissions on the specified path or return +// an error. +func (RealOS) Chmod(path string, perm os.FileMode) error { + return os.Chmod(path, perm) +} + +// Hostname will call os.Hostname to return the hostname. +func (RealOS) Hostname() (name string, err error) { + return os.Hostname() +} + +// Chtimes will call os.Chtimes to change the atime and mtime of the path +func (RealOS) Chtimes(path string, atime time.Time, mtime time.Time) error { + return os.Chtimes(path, atime, mtime) +} + +// Pipe will call os.Pipe to return a connected pair of pipe. +func (RealOS) Pipe() (r *os.File, w *os.File, err error) { + return os.Pipe() +} + +// ReadDir will call ioutil.ReadDir to return the files under the directory. +func (RealOS) ReadDir(dirname string) ([]os.FileInfo, error) { + return ioutil.ReadDir(dirname) +} + +// Glob will call filepath.Glob to return the names of all files matching +// pattern. +func (RealOS) Glob(pattern string) ([]string, error) { + return filepath.Glob(pattern) +} diff --git a/core/pkg/strings/string.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/pty_linux.go similarity index 73% rename from core/pkg/strings/string.go rename to vendor/k8s.io/kubernetes/pkg/kubelet/container/pty_linux.go index f866e6a46..40906ce99 100644 --- a/core/pkg/strings/string.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/pty_linux.go @@ -1,3 +1,5 @@ +// +build linux + /* Copyright 2015 The Kubernetes Authors. @@ -14,14 +16,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -package strings +package container -// StringInSlice check whether string a is a member of slice. -func StringInSlice(a string, slice []string) bool { - for _, b := range slice { - if b == a { - return true - } - } - return false +import ( + "os" + "os/exec" + + "github.com/kr/pty" +) + +func StartPty(c *exec.Cmd) (*os.File, error) { + return pty.Start(c) } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/pty_unsupported.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/pty_unsupported.go new file mode 100644 index 000000000..24ea2f787 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/pty_unsupported.go @@ -0,0 +1,28 @@ +// +build !linux + +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package container + +import ( + "os" + "os/exec" +) + +func StartPty(c *exec.Cmd) (pty *os.File, err error) { + return nil, nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/ref.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/ref.go new file mode 100644 index 000000000..b15f7702e --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/ref.go @@ -0,0 +1,73 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package container + +import ( + "fmt" + + "k8s.io/api/core/v1" + ref "k8s.io/client-go/tools/reference" + "k8s.io/kubernetes/pkg/api" +) + +var ImplicitContainerPrefix string = "implicitly required container " + +// GenerateContainerRef returns an *v1.ObjectReference which references the given container +// within the given pod. Returns an error if the reference can't be constructed or the +// container doesn't actually belong to the pod. +// +// This function will return an error if the provided Pod does not have a selfLink, +// but we expect selfLink to be populated at all call sites for the function. +func GenerateContainerRef(pod *v1.Pod, container *v1.Container) (*v1.ObjectReference, error) { + fieldPath, err := fieldPath(pod, container) + if err != nil { + // TODO: figure out intelligent way to refer to containers that we implicitly + // start (like the pod infra container). This is not a good way, ugh. + fieldPath = ImplicitContainerPrefix + container.Name + } + ref, err := ref.GetPartialReference(api.Scheme, pod, fieldPath) + if err != nil { + return nil, err + } + return ref, nil +} + +// fieldPath returns a fieldPath locating container within pod. +// Returns an error if the container isn't part of the pod. +func fieldPath(pod *v1.Pod, container *v1.Container) (string, error) { + for i := range pod.Spec.Containers { + here := &pod.Spec.Containers[i] + if here.Name == container.Name { + if here.Name == "" { + return fmt.Sprintf("spec.containers[%d]", i), nil + } else { + return fmt.Sprintf("spec.containers{%s}", here.Name), nil + } + } + } + for i := range pod.Spec.InitContainers { + here := &pod.Spec.InitContainers[i] + if here.Name == container.Name { + if here.Name == "" { + return fmt.Sprintf("spec.initContainers[%d]", i), nil + } else { + return fmt.Sprintf("spec.initContainers{%s}", here.Name), nil + } + } + } + return "", fmt.Errorf("container %#v not found in pod %#v", container, pod) +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/ref_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/ref_test.go new file mode 100644 index 000000000..b25e740de --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/ref_test.go @@ -0,0 +1,213 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package container + +import ( + "testing" + + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/kubernetes/pkg/api" + _ "k8s.io/kubernetes/pkg/api/install" +) + +func TestFieldPath(t *testing.T) { + pod := &v1.Pod{Spec: v1.PodSpec{Containers: []v1.Container{ + {Name: "foo"}, + {Name: "bar"}, + {Name: ""}, + {Name: "baz"}, + }}} + table := map[string]struct { + pod *v1.Pod + container *v1.Container + path string + success bool + }{ + "basic": {pod, &v1.Container{Name: "foo"}, "spec.containers{foo}", true}, + "basic2": {pod, &v1.Container{Name: "baz"}, "spec.containers{baz}", true}, + "emptyName": {pod, &v1.Container{Name: ""}, "spec.containers[2]", true}, + "basicSamePointer": {pod, &pod.Spec.Containers[0], "spec.containers{foo}", true}, + "missing": {pod, &v1.Container{Name: "qux"}, "", false}, + } + + for name, item := range table { + res, err := fieldPath(item.pod, item.container) + if item.success == false { + if err == nil { + t.Errorf("%v: unexpected non-error", name) + } + continue + } + if err != nil { + t.Errorf("%v: unexpected error: %v", name, err) + continue + } + if e, a := item.path, res; e != a { + t.Errorf("%v: wanted %v, got %v", name, e, a) + } + } +} + +func TestGenerateContainerRef(t *testing.T) { + var ( + okPod = v1.Pod{ + TypeMeta: metav1.TypeMeta{ + Kind: "Pod", + APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "ok", + Namespace: "test-ns", + UID: "bar", + ResourceVersion: "42", + SelfLink: "/api/" + api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String() + "/pods/foo", + }, + Spec: v1.PodSpec{ + Containers: []v1.Container{ + { + Name: "by-name", + }, + {}, + }, + }, + } + noSelfLinkPod = okPod + defaultedSelfLinkPod = okPod + ) + noSelfLinkPod.Kind = "" + noSelfLinkPod.APIVersion = "" + noSelfLinkPod.ObjectMeta.SelfLink = "" + defaultedSelfLinkPod.ObjectMeta.SelfLink = "/api/" + api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String() + "/pods/ok" + + cases := []struct { + name string + pod *v1.Pod + container *v1.Container + expected *v1.ObjectReference + success bool + }{ + { + name: "by-name", + pod: &okPod, + container: &v1.Container{ + Name: "by-name", + }, + expected: &v1.ObjectReference{ + Kind: "Pod", + APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), + Name: "ok", + Namespace: "test-ns", + UID: "bar", + ResourceVersion: "42", + FieldPath: ".spec.containers{by-name}", + }, + success: true, + }, + { + name: "no-name", + pod: &okPod, + container: &v1.Container{}, + expected: &v1.ObjectReference{ + Kind: "Pod", + APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), + Name: "ok", + Namespace: "test-ns", + UID: "bar", + ResourceVersion: "42", + FieldPath: ".spec.containers[1]", + }, + success: true, + }, + { + name: "no-selflink", + pod: &noSelfLinkPod, + container: &v1.Container{}, + expected: nil, + success: false, + }, + { + name: "defaulted-selflink", + pod: &defaultedSelfLinkPod, + container: &v1.Container{ + Name: "by-name", + }, + expected: &v1.ObjectReference{ + Kind: "Pod", + APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), + Name: "ok", + Namespace: "test-ns", + UID: "bar", + ResourceVersion: "42", + FieldPath: ".spec.containers{by-name}", + }, + success: true, + }, + { + name: "implicitly-required", + pod: &okPod, + container: &v1.Container{ + Name: "net", + }, + expected: &v1.ObjectReference{ + Kind: "Pod", + APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), + Name: "ok", + Namespace: "test-ns", + UID: "bar", + ResourceVersion: "42", + FieldPath: "implicitly required container net", + }, + success: true, + }, + } + + for _, tc := range cases { + actual, err := GenerateContainerRef(tc.pod, tc.container) + if err != nil { + if tc.success { + t.Errorf("%v: unexpected error: %v", tc.name, err) + } + + continue + } + + if !tc.success { + t.Errorf("%v: unexpected success", tc.name) + continue + } + + if e, a := tc.expected.Kind, actual.Kind; e != a { + t.Errorf("%v: kind: expected %v, got %v", tc.name, e, a) + } + if e, a := tc.expected.APIVersion, actual.APIVersion; e != a { + t.Errorf("%v: apiVersion: expected %v, got %v", tc.name, e, a) + } + if e, a := tc.expected.Name, actual.Name; e != a { + t.Errorf("%v: name: expected %v, got %v", tc.name, e, a) + } + if e, a := tc.expected.Namespace, actual.Namespace; e != a { + t.Errorf("%v: namespace: expected %v, got %v", tc.name, e, a) + } + if e, a := tc.expected.UID, actual.UID; e != a { + t.Errorf("%v: uid: expected %v, got %v", tc.name, e, a) + } + if e, a := tc.expected.ResourceVersion, actual.ResourceVersion; e != a { + t.Errorf("%v: kind: expected %v, got %v", tc.name, e, a) + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/resize.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/resize.go new file mode 100644 index 000000000..d7b75eede --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/resize.go @@ -0,0 +1,46 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package container + +import ( + "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/client-go/tools/remotecommand" +) + +// handleResizing spawns a goroutine that processes the resize channel, calling resizeFunc for each +// remotecommand.TerminalSize received from the channel. The resize channel must be closed elsewhere to stop the +// goroutine. +func HandleResizing(resize <-chan remotecommand.TerminalSize, resizeFunc func(size remotecommand.TerminalSize)) { + if resize == nil { + return + } + + go func() { + defer runtime.HandleCrash() + + for { + size, ok := <-resize + if !ok { + return + } + if size.Height < 1 || size.Width < 1 { + continue + } + resizeFunc(size) + } + }() +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime.go new file mode 100644 index 000000000..3e9644c24 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime.go @@ -0,0 +1,648 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package container + +import ( + "fmt" + "io" + "net/url" + "reflect" + "strings" + "time" + + "github.com/golang/glog" + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/tools/remotecommand" + "k8s.io/client-go/util/flowcontrol" + runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime" + "k8s.io/kubernetes/pkg/volume" +) + +type Version interface { + // Compare compares two versions of the runtime. On success it returns -1 + // if the version is less than the other, 1 if it is greater than the other, + // or 0 if they are equal. + Compare(other string) (int, error) + // String returns a string that represents the version. + String() string +} + +// ImageSpec is an internal representation of an image. Currently, it wraps the +// value of a Container's Image field, but in the future it will include more detailed +// information about the different image types. +type ImageSpec struct { + Image string +} + +// ImageStats contains statistics about all the images currently available. +type ImageStats struct { + // Total amount of storage consumed by existing images. + TotalStorageBytes uint64 +} + +// Runtime interface defines the interfaces that should be implemented +// by a container runtime. +// Thread safety is required from implementations of this interface. +type Runtime interface { + // Type returns the type of the container runtime. + Type() string + + // Version returns the version information of the container runtime. + Version() (Version, error) + + // APIVersion returns the cached API version information of the container + // runtime. Implementation is expected to update this cache periodically. + // This may be different from the runtime engine's version. + // TODO(random-liu): We should fold this into Version() + APIVersion() (Version, error) + // Status returns the status of the runtime. An error is returned if the Status + // function itself fails, nil otherwise. + Status() (*RuntimeStatus, error) + // GetPods returns a list of containers grouped by pods. The boolean parameter + // specifies whether the runtime returns all containers including those already + // exited and dead containers (used for garbage collection). + GetPods(all bool) ([]*Pod, error) + // GarbageCollect removes dead containers using the specified container gc policy + // If allSourcesReady is not true, it means that kubelet doesn't have the + // complete list of pods from all avialble sources (e.g., apiserver, http, + // file). In this case, garbage collector should refrain itself from aggressive + // behavior such as removing all containers of unrecognized pods (yet). + // If evictNonDeletedPods is set to true, containers and sandboxes belonging to pods + // that are terminated, but not deleted will be evicted. Otherwise, only deleted pods will be GC'd. + // TODO: Revisit this method and make it cleaner. + GarbageCollect(gcPolicy ContainerGCPolicy, allSourcesReady bool, evictNonDeletedPods bool) error + // Syncs the running pod into the desired pod. + SyncPod(pod *v1.Pod, apiPodStatus v1.PodStatus, podStatus *PodStatus, pullSecrets []v1.Secret, backOff *flowcontrol.Backoff) PodSyncResult + // KillPod kills all the containers of a pod. Pod may be nil, running pod must not be. + // TODO(random-liu): Return PodSyncResult in KillPod. + // gracePeriodOverride if specified allows the caller to override the pod default grace period. + // only hard kill paths are allowed to specify a gracePeriodOverride in the kubelet in order to not corrupt user data. + // it is useful when doing SIGKILL for hard eviction scenarios, or max grace period during soft eviction scenarios. + KillPod(pod *v1.Pod, runningPod Pod, gracePeriodOverride *int64) error + // GetPodStatus retrieves the status of the pod, including the + // information of all containers in the pod that are visble in Runtime. + GetPodStatus(uid types.UID, name, namespace string) (*PodStatus, error) + // Returns the filesystem path of the pod's network namespace; if the + // runtime does not handle namespace creation itself, or cannot return + // the network namespace path, it should return an error. + // TODO: Change ContainerID to a Pod ID since the namespace is shared + // by all containers in the pod. + GetNetNS(containerID ContainerID) (string, error) + // Returns the container ID that represents the Pod, as passed to network + // plugins. For example, if the runtime uses an infra container, returns + // the infra container's ContainerID. + // TODO: Change ContainerID to a Pod ID, see GetNetNS() + GetPodContainerID(*Pod) (ContainerID, error) + // TODO(vmarmol): Unify pod and containerID args. + // GetContainerLogs returns logs of a specific container. By + // default, it returns a snapshot of the container log. Set 'follow' to true to + // stream the log. Set 'follow' to false and specify the number of lines (e.g. + // "100" or "all") to tail the log. + GetContainerLogs(pod *v1.Pod, containerID ContainerID, logOptions *v1.PodLogOptions, stdout, stderr io.Writer) (err error) + // Delete a container. If the container is still running, an error is returned. + DeleteContainer(containerID ContainerID) error + // ImageService provides methods to image-related methods. + ImageService + // UpdatePodCIDR sends a new podCIDR to the runtime. + // This method just proxies a new runtimeConfig with the updated + // CIDR value down to the runtime shim. + UpdatePodCIDR(podCIDR string) error +} + +// DirectStreamingRuntime is the interface implemented by runtimes for which the streaming calls +// (exec/attach/port-forward) should be served directly by the Kubelet. +type DirectStreamingRuntime interface { + // Runs the command in the container of the specified pod using nsenter. + // Attaches the processes stdin, stdout, and stderr. Optionally uses a + // tty. + ExecInContainer(containerID ContainerID, cmd []string, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize, timeout time.Duration) error + // Forward the specified port from the specified pod to the stream. + PortForward(pod *Pod, port int32, stream io.ReadWriteCloser) error + // ContainerAttach encapsulates the attaching to containers for testability + ContainerAttacher +} + +// IndirectStreamingRuntime is the interface implemented by runtimes that handle the serving of the +// streaming calls (exec/attach/port-forward) themselves. In this case, Kubelet should redirect to +// the runtime server. +type IndirectStreamingRuntime interface { + GetExec(id ContainerID, cmd []string, stdin, stdout, stderr, tty bool) (*url.URL, error) + GetAttach(id ContainerID, stdin, stdout, stderr, tty bool) (*url.URL, error) + GetPortForward(podName, podNamespace string, podUID types.UID, ports []int32) (*url.URL, error) +} + +type ImageService interface { + // PullImage pulls an image from the network to local storage using the supplied + // secrets if necessary. It returns a reference (digest or ID) to the pulled image. + PullImage(image ImageSpec, pullSecrets []v1.Secret) (string, error) + // GetImageRef gets the reference (digest or ID) of the image which has already been in + // the local storage. It returns ("", nil) if the image isn't in the local storage. + GetImageRef(image ImageSpec) (string, error) + // Gets all images currently on the machine. + ListImages() ([]Image, error) + // Removes the specified image. + RemoveImage(image ImageSpec) error + // Returns Image statistics. + ImageStats() (*ImageStats, error) +} + +type ContainerAttacher interface { + AttachContainer(id ContainerID, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize) (err error) +} + +type ContainerCommandRunner interface { + // RunInContainer synchronously executes the command in the container, and returns the output. + // If the command completes with a non-0 exit code, a pkg/util/exec.ExitError will be returned. + RunInContainer(id ContainerID, cmd []string, timeout time.Duration) ([]byte, error) +} + +// Pod is a group of containers. +type Pod struct { + // The ID of the pod, which can be used to retrieve a particular pod + // from the pod list returned by GetPods(). + ID types.UID + // The name and namespace of the pod, which is readable by human. + Name string + Namespace string + // List of containers that belongs to this pod. It may contain only + // running containers, or mixed with dead ones (when GetPods(true)). + Containers []*Container + // List of sandboxes associated with this pod. The sandboxes are converted + // to Container temporariliy to avoid substantial changes to other + // components. This is only populated by kuberuntime. + // TODO: use the runtimeApi.PodSandbox type directly. + Sandboxes []*Container +} + +// PodPair contains both runtime#Pod and api#Pod +type PodPair struct { + // APIPod is the v1.Pod + APIPod *v1.Pod + // RunningPod is the pod defined in pkg/kubelet/container/runtime#Pod + RunningPod *Pod +} + +// ContainerID is a type that identifies a container. +type ContainerID struct { + // The type of the container runtime. e.g. 'docker', 'rkt'. + Type string + // The identification of the container, this is comsumable by + // the underlying container runtime. (Note that the container + // runtime interface still takes the whole struct as input). + ID string +} + +func BuildContainerID(typ, ID string) ContainerID { + return ContainerID{Type: typ, ID: ID} +} + +// Convenience method for creating a ContainerID from an ID string. +func ParseContainerID(containerID string) ContainerID { + var id ContainerID + if err := id.ParseString(containerID); err != nil { + glog.Error(err) + } + return id +} + +func (c *ContainerID) ParseString(data string) error { + // Trim the quotes and split the type and ID. + parts := strings.Split(strings.Trim(data, "\""), "://") + if len(parts) != 2 { + return fmt.Errorf("invalid container ID: %q", data) + } + c.Type, c.ID = parts[0], parts[1] + return nil +} + +func (c *ContainerID) String() string { + return fmt.Sprintf("%s://%s", c.Type, c.ID) +} + +func (c *ContainerID) IsEmpty() bool { + return *c == ContainerID{} +} + +func (c *ContainerID) MarshalJSON() ([]byte, error) { + return []byte(fmt.Sprintf("%q", c.String())), nil +} + +func (c *ContainerID) UnmarshalJSON(data []byte) error { + return c.ParseString(string(data)) +} + +// DockerID is an ID of docker container. It is a type to make it clear when we're working with docker container Ids +type DockerID string + +func (id DockerID) ContainerID() ContainerID { + return ContainerID{ + Type: "docker", + ID: string(id), + } +} + +type ContainerState string + +const ( + ContainerStateCreated ContainerState = "created" + ContainerStateRunning ContainerState = "running" + ContainerStateExited ContainerState = "exited" + // This unknown encompasses all the states that we currently don't care. + ContainerStateUnknown ContainerState = "unknown" +) + +// Container provides the runtime information for a container, such as ID, hash, +// state of the container. +type Container struct { + // The ID of the container, used by the container runtime to identify + // a container. + ID ContainerID + // The name of the container, which should be the same as specified by + // v1.Container. + Name string + // The image name of the container, this also includes the tag of the image, + // the expected form is "NAME:TAG". + Image string + // The id of the image used by the container. + ImageID string + // Hash of the container, used for comparison. Optional for containers + // not managed by kubelet. + Hash uint64 + // State is the state of the container. + State ContainerState +} + +// PodStatus represents the status of the pod and its containers. +// v1.PodStatus can be derived from examining PodStatus and v1.Pod. +type PodStatus struct { + // ID of the pod. + ID types.UID + // Name of the pod. + Name string + // Namspace of the pod. + Namespace string + // IP of the pod. + IP string + // Status of containers in the pod. + ContainerStatuses []*ContainerStatus + // Status of the pod sandbox. + // Only for kuberuntime now, other runtime may keep it nil. + SandboxStatuses []*runtimeapi.PodSandboxStatus +} + +// ContainerStatus represents the status of a container. +type ContainerStatus struct { + // ID of the container. + ID ContainerID + // Name of the container. + Name string + // Status of the container. + State ContainerState + // Creation time of the container. + CreatedAt time.Time + // Start time of the container. + StartedAt time.Time + // Finish time of the container. + FinishedAt time.Time + // Exit code of the container. + ExitCode int + // Name of the image, this also includes the tag of the image, + // the expected form is "NAME:TAG". + Image string + // ID of the image. + ImageID string + // Hash of the container, used for comparison. + Hash uint64 + // Number of times that the container has been restarted. + RestartCount int + // A string explains why container is in such a status. + Reason string + // Message written by the container before exiting (stored in + // TerminationMessagePath). + Message string +} + +// FindContainerStatusByName returns container status in the pod status with the given name. +// When there are multiple containers' statuses with the same name, the first match will be returned. +func (podStatus *PodStatus) FindContainerStatusByName(containerName string) *ContainerStatus { + for _, containerStatus := range podStatus.ContainerStatuses { + if containerStatus.Name == containerName { + return containerStatus + } + } + return nil +} + +// Get container status of all the running containers in a pod +func (podStatus *PodStatus) GetRunningContainerStatuses() []*ContainerStatus { + runningContainerStatuses := []*ContainerStatus{} + for _, containerStatus := range podStatus.ContainerStatuses { + if containerStatus.State == ContainerStateRunning { + runningContainerStatuses = append(runningContainerStatuses, containerStatus) + } + } + return runningContainerStatuses +} + +// Basic information about a container image. +type Image struct { + // ID of the image. + ID string + // Other names by which this image is known. + RepoTags []string + // Digests by which this image is known. + RepoDigests []string + // The size of the image in bytes. + Size int64 +} + +type EnvVar struct { + Name string + Value string +} + +type Mount struct { + // Name of the volume mount. + // TODO(yifan): Remove this field, as this is not representing the unique name of the mount, + // but the volume name only. + Name string + // Path of the mount within the container. + ContainerPath string + // Path of the mount on the host. + HostPath string + // Whether the mount is read-only. + ReadOnly bool + // Whether the mount needs SELinux relabeling + SELinuxRelabel bool + // Requested propagation mode + Propagation runtimeapi.MountPropagation +} + +type PortMapping struct { + // Name of the port mapping + Name string + // Protocol of the port mapping. + Protocol v1.Protocol + // The port number within the container. + ContainerPort int + // The port number on the host. + HostPort int + // The host IP. + HostIP string +} + +type DeviceInfo struct { + // Path on host for mapping + PathOnHost string + // Path in Container to map + PathInContainer string + // Cgroup permissions + Permissions string +} + +// RunContainerOptions specify the options which are necessary for running containers +type RunContainerOptions struct { + // The environment variables list. + Envs []EnvVar + // The mounts for the containers. + Mounts []Mount + // The host devices mapped into the containers. + Devices []DeviceInfo + // The port mappings for the containers. + PortMappings []PortMapping + // If the container has specified the TerminationMessagePath, then + // this directory will be used to create and mount the log file to + // container.TerminationMessagePath + PodContainerDir string + // The list of DNS servers for the container to use. + DNS []string + // The list of DNS search domains. + DNSSearch []string + // The parent cgroup to pass to Docker + CgroupParent string + // The type of container rootfs + ReadOnly bool + // hostname for pod containers + Hostname string + // EnableHostUserNamespace sets userns=host when users request host namespaces (pid, ipc, net), + // are using non-namespaced capabilities (mknod, sys_time, sys_module), the pod contains a privileged container, + // or using host path volumes. + // This should only be enabled when the container runtime is performing user remapping AND if the + // experimental behavior is desired. + EnableHostUserNamespace bool +} + +// VolumeInfo contains information about the volume. +type VolumeInfo struct { + // Mounter is the volume's mounter + Mounter volume.Mounter + // SELinuxLabeled indicates whether this volume has had the + // pod's SELinux label applied to it or not + SELinuxLabeled bool +} + +type VolumeMap map[string]VolumeInfo + +// RuntimeConditionType is the types of required runtime conditions. +type RuntimeConditionType string + +const ( + // RuntimeReady means the runtime is up and ready to accept basic containers. + RuntimeReady RuntimeConditionType = "RuntimeReady" + // NetworkReady means the runtime network is up and ready to accept containers which require network. + NetworkReady RuntimeConditionType = "NetworkReady" +) + +// RuntimeStatus contains the status of the runtime. +type RuntimeStatus struct { + // Conditions is an array of current observed runtime conditions. + Conditions []RuntimeCondition +} + +// GetRuntimeCondition gets a specified runtime condition from the runtime status. +func (r *RuntimeStatus) GetRuntimeCondition(t RuntimeConditionType) *RuntimeCondition { + for i := range r.Conditions { + c := &r.Conditions[i] + if c.Type == t { + return c + } + } + return nil +} + +// String formats the runtime status into human readable string. +func (s *RuntimeStatus) String() string { + var ss []string + for _, c := range s.Conditions { + ss = append(ss, c.String()) + } + return fmt.Sprintf("Runtime Conditions: %s", strings.Join(ss, ", ")) +} + +// RuntimeCondition contains condition information for the runtime. +type RuntimeCondition struct { + // Type of runtime condition. + Type RuntimeConditionType + // Status of the condition, one of true/false. + Status bool + // Reason is brief reason for the condition's last transition. + Reason string + // Message is human readable message indicating details about last transition. + Message string +} + +// String formats the runtime condition into human readable string. +func (c *RuntimeCondition) String() string { + return fmt.Sprintf("%s=%t reason:%s message:%s", c.Type, c.Status, c.Reason, c.Message) +} + +type Pods []*Pod + +// FindPodByID finds and returns a pod in the pod list by UID. It will return an empty pod +// if not found. +func (p Pods) FindPodByID(podUID types.UID) Pod { + for i := range p { + if p[i].ID == podUID { + return *p[i] + } + } + return Pod{} +} + +// FindPodByFullName finds and returns a pod in the pod list by the full name. +// It will return an empty pod if not found. +func (p Pods) FindPodByFullName(podFullName string) Pod { + for i := range p { + if BuildPodFullName(p[i].Name, p[i].Namespace) == podFullName { + return *p[i] + } + } + return Pod{} +} + +// FindPod combines FindPodByID and FindPodByFullName, it finds and returns a pod in the +// pod list either by the full name or the pod ID. It will return an empty pod +// if not found. +func (p Pods) FindPod(podFullName string, podUID types.UID) Pod { + if len(podFullName) > 0 { + return p.FindPodByFullName(podFullName) + } + return p.FindPodByID(podUID) +} + +// FindContainerByName returns a container in the pod with the given name. +// When there are multiple containers with the same name, the first match will +// be returned. +func (p *Pod) FindContainerByName(containerName string) *Container { + for _, c := range p.Containers { + if c.Name == containerName { + return c + } + } + return nil +} + +func (p *Pod) FindContainerByID(id ContainerID) *Container { + for _, c := range p.Containers { + if c.ID == id { + return c + } + } + return nil +} + +func (p *Pod) FindSandboxByID(id ContainerID) *Container { + for _, c := range p.Sandboxes { + if c.ID == id { + return c + } + } + return nil +} + +// ToAPIPod converts Pod to v1.Pod. Note that if a field in v1.Pod has no +// corresponding field in Pod, the field would not be populated. +func (p *Pod) ToAPIPod() *v1.Pod { + var pod v1.Pod + pod.UID = p.ID + pod.Name = p.Name + pod.Namespace = p.Namespace + + for _, c := range p.Containers { + var container v1.Container + container.Name = c.Name + container.Image = c.Image + pod.Spec.Containers = append(pod.Spec.Containers, container) + } + return &pod +} + +// IsEmpty returns true if the pod is empty. +func (p *Pod) IsEmpty() bool { + return reflect.DeepEqual(p, &Pod{}) +} + +// GetPodFullName returns a name that uniquely identifies a pod. +func GetPodFullName(pod *v1.Pod) string { + // Use underscore as the delimiter because it is not allowed in pod name + // (DNS subdomain format), while allowed in the container name format. + return pod.Name + "_" + pod.Namespace +} + +// Build the pod full name from pod name and namespace. +func BuildPodFullName(name, namespace string) string { + return name + "_" + namespace +} + +// Parse the pod full name. +func ParsePodFullName(podFullName string) (string, string, error) { + parts := strings.Split(podFullName, "_") + if len(parts) != 2 || parts[0] == "" || parts[1] == "" { + return "", "", fmt.Errorf("failed to parse the pod full name %q", podFullName) + } + return parts[0], parts[1], nil +} + +// Option is a functional option type for Runtime, useful for +// completely optional settings. +type Option func(Runtime) + +// Sort the container statuses by creation time. +type SortContainerStatusesByCreationTime []*ContainerStatus + +func (s SortContainerStatusesByCreationTime) Len() int { return len(s) } +func (s SortContainerStatusesByCreationTime) Swap(i, j int) { s[i], s[j] = s[j], s[i] } +func (s SortContainerStatusesByCreationTime) Less(i, j int) bool { + return s[i].CreatedAt.Before(s[j].CreatedAt) +} + +const ( + // MaxPodTerminationMessageLogLength is the maximum bytes any one pod may have written + // as termination message output across all containers. Containers will be evenly truncated + // until output is below this limit. + MaxPodTerminationMessageLogLength = 1024 * 12 + // MaxContainerTerminationMessageLength is the upper bound any one container may write to + // its termination message path. Contents above this length will be truncated. + MaxContainerTerminationMessageLength = 1024 * 4 + // MaxContainerTerminationMessageLogLength is the maximum bytes any one container will + // have written to its termination message when the message is read from the logs. + MaxContainerTerminationMessageLogLength = 1024 * 2 + // MaxContainerTerminationMessageLogLines is the maximum number of previous lines of + // log output that the termination message can contain. + MaxContainerTerminationMessageLogLines = 80 +) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime_cache.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime_cache.go new file mode 100644 index 000000000..d15852f88 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime_cache.go @@ -0,0 +1,96 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package container + +import ( + "sync" + "time" +) + +var ( + // TODO(yifan): Maybe set the them as parameters for NewCache(). + defaultCachePeriod = time.Second * 2 +) + +type RuntimeCache interface { + GetPods() ([]*Pod, error) + ForceUpdateIfOlder(time.Time) error +} + +type podsGetter interface { + GetPods(bool) ([]*Pod, error) +} + +// NewRuntimeCache creates a container runtime cache. +func NewRuntimeCache(getter podsGetter) (RuntimeCache, error) { + return &runtimeCache{ + getter: getter, + }, nil +} + +// runtimeCache caches a list of pods. It records a timestamp (cacheTime) right +// before updating the pods, so the timestamp is at most as new as the pods +// (and can be slightly older). The timestamp always moves forward. Callers are +// expected not to modify the pods returned from GetPods. +type runtimeCache struct { + sync.Mutex + // The underlying container runtime used to update the cache. + getter podsGetter + // Last time when cache was updated. + cacheTime time.Time + // The content of the cache. + pods []*Pod +} + +// GetPods returns the cached pods if they are not outdated; otherwise, it +// retrieves the latest pods and return them. +func (r *runtimeCache) GetPods() ([]*Pod, error) { + r.Lock() + defer r.Unlock() + if time.Since(r.cacheTime) > defaultCachePeriod { + if err := r.updateCache(); err != nil { + return nil, err + } + } + return r.pods, nil +} + +func (r *runtimeCache) ForceUpdateIfOlder(minExpectedCacheTime time.Time) error { + r.Lock() + defer r.Unlock() + if r.cacheTime.Before(minExpectedCacheTime) { + return r.updateCache() + } + return nil +} + +func (r *runtimeCache) updateCache() error { + pods, timestamp, err := r.getPodsWithTimestamp() + if err != nil { + return err + } + r.pods, r.cacheTime = pods, timestamp + return nil +} + +// getPodsWithTimestamp records a timestamp and retrieves pods from the getter. +func (r *runtimeCache) getPodsWithTimestamp() ([]*Pod, time.Time, error) { + // Always record the timestamp before getting the pods to avoid stale pods. + timestamp := time.Now() + pods, err := r.getter.GetPods(false) + return pods, timestamp, err +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime_cache_fake.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime_cache_fake.go new file mode 100644 index 000000000..59a6288d5 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime_cache_fake.go @@ -0,0 +1,45 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package container + +// TestRunTimeCache embeds runtimeCache with some additional methods for testing. +// It must be declared in the container package to have visibility to runtimeCache. +// It cannot be in a "..._test.go" file in order for runtime_cache_test.go to have cross-package visibility to it. +// (cross-package declarations in test files cannot be used from dot imports if this package is vendored) +type TestRuntimeCache struct { + runtimeCache +} + +func (r *TestRuntimeCache) UpdateCacheWithLock() error { + r.Lock() + defer r.Unlock() + return r.updateCache() +} + +func (r *TestRuntimeCache) GetCachedPods() []*Pod { + r.Lock() + defer r.Unlock() + return r.pods +} + +func NewTestRuntimeCache(getter podsGetter) *TestRuntimeCache { + return &TestRuntimeCache{ + runtimeCache: runtimeCache{ + getter: getter, + }, + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime_cache_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime_cache_test.go new file mode 100644 index 000000000..4fc4da8bf --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime_cache_test.go @@ -0,0 +1,74 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package container_test + +import ( + "reflect" + "testing" + "time" + + . "k8s.io/kubernetes/pkg/kubelet/container" + ctest "k8s.io/kubernetes/pkg/kubelet/container/testing" +) + +func comparePods(t *testing.T, expected []*ctest.FakePod, actual []*Pod) { + if len(expected) != len(actual) { + t.Errorf("expected %d pods, got %d instead", len(expected), len(actual)) + } + for i := range expected { + if !reflect.DeepEqual(expected[i].Pod, actual[i]) { + t.Errorf("expected %#v, got %#v", expected[i].Pod, actual[i]) + } + } +} + +func TestGetPods(t *testing.T) { + runtime := &ctest.FakeRuntime{} + expected := []*ctest.FakePod{{Pod: &Pod{ID: "1111"}}, {Pod: &Pod{ID: "2222"}}, {Pod: &Pod{ID: "3333"}}} + runtime.PodList = expected + cache := NewTestRuntimeCache(runtime) + actual, err := cache.GetPods() + if err != nil { + t.Errorf("unexpected error %v", err) + } + + comparePods(t, expected, actual) +} + +func TestForceUpdateIfOlder(t *testing.T) { + runtime := &ctest.FakeRuntime{} + cache := NewTestRuntimeCache(runtime) + + // Cache old pods. + oldpods := []*ctest.FakePod{{Pod: &Pod{ID: "1111"}}} + runtime.PodList = oldpods + cache.UpdateCacheWithLock() + + // Update the runtime to new pods. + newpods := []*ctest.FakePod{{Pod: &Pod{ID: "1111"}}, {Pod: &Pod{ID: "2222"}}, {Pod: &Pod{ID: "3333"}}} + runtime.PodList = newpods + + // An older timestamp should not force an update. + cache.ForceUpdateIfOlder(time.Now().Add(-20 * time.Minute)) + actual := cache.GetCachedPods() + comparePods(t, oldpods, actual) + + // A newer timestamp should force an update. + cache.ForceUpdateIfOlder(time.Now().Add(20 * time.Second)) + actual = cache.GetCachedPods() + comparePods(t, newpods, actual) +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/sync_result.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/sync_result.go new file mode 100644 index 000000000..0d4563303 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/sync_result.go @@ -0,0 +1,128 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package container + +import ( + "errors" + "fmt" + + utilerrors "k8s.io/apimachinery/pkg/util/errors" +) + +// TODO(random-liu): We need to better organize runtime errors for introspection. + +// Container Terminated and Kubelet is backing off the restart +var ErrCrashLoopBackOff = errors.New("CrashLoopBackOff") + +var ( + // ErrContainerNotFound returned when a container in the given pod with the + // given container name was not found, amongst those managed by the kubelet. + ErrContainerNotFound = errors.New("no matching container") +) + +var ( + ErrRunContainer = errors.New("RunContainerError") + ErrKillContainer = errors.New("KillContainerError") + ErrVerifyNonRoot = errors.New("VerifyNonRootError") + ErrRunInitContainer = errors.New("RunInitContainerError") + ErrCreatePodSandbox = errors.New("CreatePodSandboxError") + ErrConfigPodSandbox = errors.New("ConfigPodSandboxError") + ErrKillPodSandbox = errors.New("KillPodSandboxError") +) + +var ( + ErrSetupNetwork = errors.New("SetupNetworkError") + ErrTeardownNetwork = errors.New("TeardownNetworkError") +) + +// SyncAction indicates different kind of actions in SyncPod() and KillPod(). Now there are only actions +// about start/kill container and setup/teardown network. +type SyncAction string + +const ( + StartContainer SyncAction = "StartContainer" + KillContainer SyncAction = "KillContainer" + SetupNetwork SyncAction = "SetupNetwork" + TeardownNetwork SyncAction = "TeardownNetwork" + InitContainer SyncAction = "InitContainer" + CreatePodSandbox SyncAction = "CreatePodSandbox" + ConfigPodSandbox SyncAction = "ConfigPodSandbox" + KillPodSandbox SyncAction = "KillPodSandbox" +) + +// SyncResult is the result of sync action. +type SyncResult struct { + // The associated action of the result + Action SyncAction + // The target of the action, now the target can only be: + // * Container: Target should be container name + // * Network: Target is useless now, we just set it as pod full name now + Target interface{} + // Brief error reason + Error error + // Human readable error reason + Message string +} + +// NewSyncResult generates new SyncResult with specific Action and Target +func NewSyncResult(action SyncAction, target interface{}) *SyncResult { + return &SyncResult{Action: action, Target: target} +} + +// Fail fails the SyncResult with specific error and message +func (r *SyncResult) Fail(err error, msg string) { + r.Error, r.Message = err, msg +} + +// PodSyncResult is the summary result of SyncPod() and KillPod() +type PodSyncResult struct { + // Result of different sync actions + SyncResults []*SyncResult + // Error encountered in SyncPod() and KillPod() that is not already included in SyncResults + SyncError error +} + +// AddSyncResult adds multiple SyncResult to current PodSyncResult +func (p *PodSyncResult) AddSyncResult(result ...*SyncResult) { + p.SyncResults = append(p.SyncResults, result...) +} + +// AddPodSyncResult merges a PodSyncResult to current one +func (p *PodSyncResult) AddPodSyncResult(result PodSyncResult) { + p.AddSyncResult(result.SyncResults...) + p.SyncError = result.SyncError +} + +// Fail fails the PodSyncResult with an error occurred in SyncPod() and KillPod() itself +func (p *PodSyncResult) Fail(err error) { + p.SyncError = err +} + +// Error returns an error summarizing all the errors in PodSyncResult +func (p *PodSyncResult) Error() error { + errlist := []error{} + if p.SyncError != nil { + errlist = append(errlist, fmt.Errorf("failed to SyncPod: %v\n", p.SyncError)) + } + for _, result := range p.SyncResults { + if result.Error != nil { + errlist = append(errlist, fmt.Errorf("failed to %q for %q with %v: %q\n", result.Action, result.Target, + result.Error, result.Message)) + } + } + return utilerrors.NewAggregate(errlist) +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/sync_result_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/sync_result_test.go new file mode 100644 index 000000000..56f191d3d --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/sync_result_test.go @@ -0,0 +1,68 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package container + +import ( + "errors" + "testing" +) + +func TestPodSyncResult(t *testing.T) { + okResults := []*SyncResult{ + NewSyncResult(StartContainer, "container_0"), + NewSyncResult(SetupNetwork, "pod"), + } + errResults := []*SyncResult{ + NewSyncResult(KillContainer, "container_1"), + NewSyncResult(TeardownNetwork, "pod"), + } + errResults[0].Fail(errors.New("error_0"), "message_0") + errResults[1].Fail(errors.New("error_1"), "message_1") + + // If the PodSyncResult doesn't contain error result, it should not be error + result := PodSyncResult{} + result.AddSyncResult(okResults...) + if result.Error() != nil { + t.Errorf("PodSyncResult should not be error: %v", result) + } + + // If the PodSyncResult contains error result, it should be error + result = PodSyncResult{} + result.AddSyncResult(okResults...) + result.AddSyncResult(errResults...) + if result.Error() == nil { + t.Errorf("PodSyncResult should be error: %q", result) + } + + // If the PodSyncResult is failed, it should be error + result = PodSyncResult{} + result.AddSyncResult(okResults...) + result.Fail(errors.New("error")) + if result.Error() == nil { + t.Errorf("PodSyncResult should be error: %q", result) + } + + // If the PodSyncResult is added an error PodSyncResult, it should be error + errResult := PodSyncResult{} + errResult.AddSyncResult(errResults...) + result = PodSyncResult{} + result.AddSyncResult(okResults...) + result.AddPodSyncResult(errResult) + if result.Error() == nil { + t.Errorf("PodSyncResult should be error: %q", result) + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/doc.go b/vendor/k8s.io/kubernetes/pkg/kubelet/doc.go new file mode 100644 index 000000000..ce5bb18b2 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package kubelet is the package that contains the libraries that drive the Kubelet binary. +// The kubelet is responsible for node level pod management. It runs on each worker in the cluster. +package kubelet // import "k8s.io/kubernetes/pkg/kubelet" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet.go new file mode 100644 index 000000000..ef7831ac6 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet.go @@ -0,0 +1,2224 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "crypto/tls" + "fmt" + "io/ioutil" + "net" + "net/http" + "net/url" + "os" + "path" + "path/filepath" + goruntime "runtime" + "sort" + "strings" + "sync" + "sync/atomic" + "time" + + "github.com/golang/glog" + + clientgoclientset "k8s.io/client-go/kubernetes" + + cadvisorapi "github.com/google/cadvisor/info/v1" + cadvisorapiv2 "github.com/google/cadvisor/info/v2" + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/clock" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/util/wait" + utilfeature "k8s.io/apiserver/pkg/util/feature" + clientset "k8s.io/client-go/kubernetes" + v1core "k8s.io/client-go/kubernetes/typed/core/v1" + corelisters "k8s.io/client-go/listers/core/v1" + "k8s.io/client-go/tools/cache" + "k8s.io/client-go/tools/record" + "k8s.io/client-go/util/flowcontrol" + "k8s.io/client-go/util/integer" + "k8s.io/kubernetes/cmd/kubelet/app/options" + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/cloudprovider" + "k8s.io/kubernetes/pkg/features" + internalapi "k8s.io/kubernetes/pkg/kubelet/apis/cri" + kubeletconfiginternal "k8s.io/kubernetes/pkg/kubelet/apis/kubeletconfig" + kubeletconfigv1alpha1 "k8s.io/kubernetes/pkg/kubelet/apis/kubeletconfig/v1alpha1" + "k8s.io/kubernetes/pkg/kubelet/cadvisor" + "k8s.io/kubernetes/pkg/kubelet/certificate" + "k8s.io/kubernetes/pkg/kubelet/cm" + "k8s.io/kubernetes/pkg/kubelet/config" + "k8s.io/kubernetes/pkg/kubelet/configmap" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + "k8s.io/kubernetes/pkg/kubelet/dockershim" + "k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker" + dockerremote "k8s.io/kubernetes/pkg/kubelet/dockershim/remote" + "k8s.io/kubernetes/pkg/kubelet/events" + "k8s.io/kubernetes/pkg/kubelet/eviction" + "k8s.io/kubernetes/pkg/kubelet/gpu" + "k8s.io/kubernetes/pkg/kubelet/gpu/nvidia" + "k8s.io/kubernetes/pkg/kubelet/images" + "k8s.io/kubernetes/pkg/kubelet/kubeletconfig" + "k8s.io/kubernetes/pkg/kubelet/kuberuntime" + "k8s.io/kubernetes/pkg/kubelet/lifecycle" + "k8s.io/kubernetes/pkg/kubelet/metrics" + "k8s.io/kubernetes/pkg/kubelet/network" + "k8s.io/kubernetes/pkg/kubelet/pleg" + kubepod "k8s.io/kubernetes/pkg/kubelet/pod" + "k8s.io/kubernetes/pkg/kubelet/preemption" + "k8s.io/kubernetes/pkg/kubelet/prober" + proberesults "k8s.io/kubernetes/pkg/kubelet/prober/results" + "k8s.io/kubernetes/pkg/kubelet/remote" + "k8s.io/kubernetes/pkg/kubelet/rkt" + "k8s.io/kubernetes/pkg/kubelet/secret" + "k8s.io/kubernetes/pkg/kubelet/server" + serverstats "k8s.io/kubernetes/pkg/kubelet/server/stats" + "k8s.io/kubernetes/pkg/kubelet/server/streaming" + "k8s.io/kubernetes/pkg/kubelet/stats" + "k8s.io/kubernetes/pkg/kubelet/status" + "k8s.io/kubernetes/pkg/kubelet/sysctl" + kubetypes "k8s.io/kubernetes/pkg/kubelet/types" + "k8s.io/kubernetes/pkg/kubelet/util/format" + "k8s.io/kubernetes/pkg/kubelet/util/queue" + "k8s.io/kubernetes/pkg/kubelet/util/sliceutils" + "k8s.io/kubernetes/pkg/kubelet/volumemanager" + "k8s.io/kubernetes/pkg/security/apparmor" + utildbus "k8s.io/kubernetes/pkg/util/dbus" + kubeio "k8s.io/kubernetes/pkg/util/io" + utilipt "k8s.io/kubernetes/pkg/util/iptables" + "k8s.io/kubernetes/pkg/util/mount" + nodeutil "k8s.io/kubernetes/pkg/util/node" + "k8s.io/kubernetes/pkg/util/oom" + "k8s.io/kubernetes/pkg/volume" + "k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/predicates" + utilexec "k8s.io/utils/exec" +) + +const ( + // Max amount of time to wait for the container runtime to come up. + maxWaitForContainerRuntime = 30 * time.Second + + // nodeStatusUpdateRetry specifies how many times kubelet retries when posting node status failed. + nodeStatusUpdateRetry = 5 + + // ContainerLogsDir is the location of container logs. + ContainerLogsDir = "/var/log/containers" + + // MaxContainerBackOff is the max backoff period, exported for the e2e test + MaxContainerBackOff = 300 * time.Second + + // Capacity of the channel for storing pods to kill. A small number should + // suffice because a goroutine is dedicated to check the channel and does + // not block on anything else. + podKillingChannelCapacity = 50 + + // Period for performing global cleanup tasks. + housekeepingPeriod = time.Second * 2 + + // Period for performing eviction monitoring. + // TODO ensure this is in sync with internal cadvisor housekeeping. + evictionMonitoringPeriod = time.Second * 10 + + // The path in containers' filesystems where the hosts file is mounted. + etcHostsPath = "/etc/hosts" + + // Capacity of the channel for receiving pod lifecycle events. This number + // is a bit arbitrary and may be adjusted in the future. + plegChannelCapacity = 1000 + + // Generic PLEG relies on relisting for discovering container events. + // A longer period means that kubelet will take longer to detect container + // changes and to update pod status. On the other hand, a shorter period + // will cause more frequent relisting (e.g., container runtime operations), + // leading to higher cpu usage. + // Note that even though we set the period to 1s, the relisting itself can + // take more than 1s to finish if the container runtime responds slowly + // and/or when there are many container changes in one cycle. + plegRelistPeriod = time.Second * 1 + + // backOffPeriod is the period to back off when pod syncing results in an + // error. It is also used as the base period for the exponential backoff + // container restarts and image pulls. + backOffPeriod = time.Second * 10 + + // ContainerGCPeriod is the period for performing container garbage collection. + ContainerGCPeriod = time.Minute + // ImageGCPeriod is the period for performing image garbage collection. + ImageGCPeriod = 5 * time.Minute + + // Minimum number of dead containers to keep in a pod + minDeadContainerInPod = 1 +) + +// SyncHandler is an interface implemented by Kubelet, for testability +type SyncHandler interface { + HandlePodAdditions(pods []*v1.Pod) + HandlePodUpdates(pods []*v1.Pod) + HandlePodRemoves(pods []*v1.Pod) + HandlePodReconcile(pods []*v1.Pod) + HandlePodSyncs(pods []*v1.Pod) + HandlePodCleanups() error +} + +// Option is a functional option type for Kubelet +type Option func(*Kubelet) + +// Bootstrap is a bootstrapping interface for kubelet, targets the initialization protocol +type Bootstrap interface { + GetConfiguration() kubeletconfiginternal.KubeletConfiguration + BirthCry() + StartGarbageCollection() + ListenAndServe(address net.IP, port uint, tlsOptions *server.TLSOptions, auth server.AuthInterface, enableDebuggingHandlers, enableContentionProfiling bool) + ListenAndServeReadOnly(address net.IP, port uint) + Run(<-chan kubetypes.PodUpdate) + RunOnce(<-chan kubetypes.PodUpdate) ([]RunPodResult, error) +} + +// Builder creates and initializes a Kubelet instance +type Builder func(kubeCfg *kubeletconfiginternal.KubeletConfiguration, + kubeDeps *Dependencies, + crOptions *options.ContainerRuntimeOptions, + hostnameOverride, + nodeIP, + providerID, + cloudProvider, + certDirectory, + rootDirectory string) (Bootstrap, error) + +// Dependencies is a bin for things we might consider "injected dependencies" -- objects constructed +// at runtime that are necessary for running the Kubelet. This is a temporary solution for grouping +// these objects while we figure out a more comprehensive dependency injection story for the Kubelet. +type Dependencies struct { + // TODO(mtaufen): KubeletBuilder: + // Mesos currently uses this as a hook to let them make their own call to + // let them wrap the KubeletBootstrap that CreateAndInitKubelet returns with + // their own KubeletBootstrap. It's a useful hook. I need to think about what + // a nice home for it would be. There seems to be a trend, between this and + // the Options fields below, of providing hooks where you can add extra functionality + // to the Kubelet for your solution. Maybe we should centralize these sorts of things? + Builder Builder + + // TODO(mtaufen): ContainerRuntimeOptions and Options: + // Arrays of functions that can do arbitrary things to the Kubelet and the Runtime + // seem like a difficult path to trace when it's time to debug something. + // I'm leaving these fields here for now, but there is likely an easier-to-follow + // way to support their intended use cases. E.g. ContainerRuntimeOptions + // is used by Mesos to set an environment variable in containers which has + // some connection to their container GC. It seems that Mesos intends to use + // Options to add additional node conditions that are updated as part of the + // Kubelet lifecycle (see https://github.com/kubernetes/kubernetes/pull/21521). + // We should think about providing more explicit ways of doing these things. + ContainerRuntimeOptions []kubecontainer.Option + Options []Option + + // Injected Dependencies + Auth server.AuthInterface + CAdvisorInterface cadvisor.Interface + Cloud cloudprovider.Interface + ContainerManager cm.ContainerManager + DockerClient libdocker.Interface + EventClient v1core.EventsGetter + HeartbeatClient v1core.CoreV1Interface + KubeClient clientset.Interface + ExternalKubeClient clientgoclientset.Interface + Mounter mount.Interface + NetworkPlugins []network.NetworkPlugin + OOMAdjuster *oom.OOMAdjuster + OSInterface kubecontainer.OSInterface + PodConfig *config.PodConfig + Recorder record.EventRecorder + Writer kubeio.Writer + VolumePlugins []volume.VolumePlugin + DynamicPluginProber volume.DynamicPluginProber + TLSOptions *server.TLSOptions + KubeletConfigController *kubeletconfig.Controller +} + +// makePodSourceConfig creates a config.PodConfig from the given +// KubeletConfiguration or returns an error. +func makePodSourceConfig(kubeCfg *kubeletconfiginternal.KubeletConfiguration, kubeDeps *Dependencies, nodeName types.NodeName) (*config.PodConfig, error) { + manifestURLHeader := make(http.Header) + if kubeCfg.ManifestURLHeader != "" { + pieces := strings.Split(kubeCfg.ManifestURLHeader, ":") + if len(pieces) != 2 { + return nil, fmt.Errorf("manifest-url-header must have a single ':' key-value separator, got %q", kubeCfg.ManifestURLHeader) + } + manifestURLHeader.Set(pieces[0], pieces[1]) + } + + // source of all configuration + cfg := config.NewPodConfig(config.PodConfigNotificationIncremental, kubeDeps.Recorder) + + // define file config source + if kubeCfg.PodManifestPath != "" { + glog.Infof("Adding manifest file: %v", kubeCfg.PodManifestPath) + config.NewSourceFile(kubeCfg.PodManifestPath, nodeName, kubeCfg.FileCheckFrequency.Duration, cfg.Channel(kubetypes.FileSource)) + } + + // define url config source + if kubeCfg.ManifestURL != "" { + glog.Infof("Adding manifest url %q with HTTP header %v", kubeCfg.ManifestURL, manifestURLHeader) + config.NewSourceURL(kubeCfg.ManifestURL, manifestURLHeader, nodeName, kubeCfg.HTTPCheckFrequency.Duration, cfg.Channel(kubetypes.HTTPSource)) + } + if kubeDeps.KubeClient != nil { + glog.Infof("Watching apiserver") + config.NewSourceApiserver(kubeDeps.KubeClient, nodeName, cfg.Channel(kubetypes.ApiserverSource)) + } + return cfg, nil +} + +func getRuntimeAndImageServices(config *kubeletconfiginternal.KubeletConfiguration) (internalapi.RuntimeService, internalapi.ImageManagerService, error) { + rs, err := remote.NewRemoteRuntimeService(config.RemoteRuntimeEndpoint, config.RuntimeRequestTimeout.Duration) + if err != nil { + return nil, nil, err + } + is, err := remote.NewRemoteImageService(config.RemoteImageEndpoint, config.RuntimeRequestTimeout.Duration) + if err != nil { + return nil, nil, err + } + return rs, is, err +} + +// NewMainKubelet instantiates a new Kubelet object along with all the required internal modules. +// No initialization of Kubelet and its modules should happen here. +func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, + kubeDeps *Dependencies, + crOptions *options.ContainerRuntimeOptions, + hostnameOverride, + nodeIP, + providerID, + cloudProvider, + certDirectory, + rootDirectory string) (*Kubelet, error) { + if rootDirectory == "" { + return nil, fmt.Errorf("invalid root directory %q", rootDirectory) + } + if kubeCfg.SyncFrequency.Duration <= 0 { + return nil, fmt.Errorf("invalid sync frequency %d", kubeCfg.SyncFrequency.Duration) + } + + if kubeCfg.MakeIPTablesUtilChains { + if kubeCfg.IPTablesMasqueradeBit > 31 || kubeCfg.IPTablesMasqueradeBit < 0 { + return nil, fmt.Errorf("iptables-masquerade-bit is not valid. Must be within [0, 31]") + } + if kubeCfg.IPTablesDropBit > 31 || kubeCfg.IPTablesDropBit < 0 { + return nil, fmt.Errorf("iptables-drop-bit is not valid. Must be within [0, 31]") + } + if kubeCfg.IPTablesDropBit == kubeCfg.IPTablesMasqueradeBit { + return nil, fmt.Errorf("iptables-masquerade-bit and iptables-drop-bit must be different") + } + } + + hostname := nodeutil.GetHostname(hostnameOverride) + // Query the cloud provider for our node name, default to hostname + nodeName := types.NodeName(hostname) + cloudIPs := []net.IP{} + cloudNames := []string{} + if kubeDeps.Cloud != nil { + var err error + instances, ok := kubeDeps.Cloud.Instances() + if !ok { + return nil, fmt.Errorf("failed to get instances from cloud provider") + } + + nodeName, err = instances.CurrentNodeName(hostname) + if err != nil { + return nil, fmt.Errorf("error fetching current instance name from cloud provider: %v", err) + } + + glog.V(2).Infof("cloud provider determined current node name to be %s", nodeName) + + if utilfeature.DefaultFeatureGate.Enabled(features.RotateKubeletServerCertificate) { + nodeAddresses, err := instances.NodeAddresses(nodeName) + if err != nil { + return nil, fmt.Errorf("failed to get the addresses of the current instance from the cloud provider: %v", err) + } + for _, nodeAddress := range nodeAddresses { + switch nodeAddress.Type { + case v1.NodeExternalIP, v1.NodeInternalIP: + ip := net.ParseIP(nodeAddress.Address) + if ip != nil && !ip.IsLoopback() { + cloudIPs = append(cloudIPs, ip) + } + case v1.NodeExternalDNS, v1.NodeInternalDNS, v1.NodeHostName: + cloudNames = append(cloudNames, nodeAddress.Address) + } + } + } + + } + + if kubeDeps.PodConfig == nil { + var err error + kubeDeps.PodConfig, err = makePodSourceConfig(kubeCfg, kubeDeps, nodeName) + if err != nil { + return nil, err + } + } + + containerGCPolicy := kubecontainer.ContainerGCPolicy{ + MinAge: kubeCfg.MinimumGCAge.Duration, + MaxPerPodContainer: int(kubeCfg.MaxPerPodContainerCount), + MaxContainers: int(kubeCfg.MaxContainerCount), + } + + daemonEndpoints := &v1.NodeDaemonEndpoints{ + KubeletEndpoint: v1.DaemonEndpoint{Port: kubeCfg.Port}, + } + + imageGCPolicy := images.ImageGCPolicy{ + MinAge: kubeCfg.ImageMinimumGCAge.Duration, + HighThresholdPercent: int(kubeCfg.ImageGCHighThresholdPercent), + LowThresholdPercent: int(kubeCfg.ImageGCLowThresholdPercent), + } + + enforceNodeAllocatable := kubeCfg.EnforceNodeAllocatable + if kubeCfg.ExperimentalNodeAllocatableIgnoreEvictionThreshold { + // Do not provide kubeCfg.EnforceNodeAllocatable to eviction threshold parsing if we are not enforcing Evictions + enforceNodeAllocatable = []string{} + } + thresholds, err := eviction.ParseThresholdConfig(enforceNodeAllocatable, kubeCfg.EvictionHard, kubeCfg.EvictionSoft, kubeCfg.EvictionSoftGracePeriod, kubeCfg.EvictionMinimumReclaim) + if err != nil { + return nil, err + } + evictionConfig := eviction.Config{ + PressureTransitionPeriod: kubeCfg.EvictionPressureTransitionPeriod.Duration, + MaxPodGracePeriodSeconds: int64(kubeCfg.EvictionMaxPodGracePeriod), + Thresholds: thresholds, + KernelMemcgNotification: kubeCfg.ExperimentalKernelMemcgNotification, + } + + serviceIndexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) + if kubeDeps.KubeClient != nil { + serviceLW := cache.NewListWatchFromClient(kubeDeps.KubeClient.Core().RESTClient(), "services", metav1.NamespaceAll, fields.Everything()) + r := cache.NewReflector(serviceLW, &v1.Service{}, serviceIndexer, 0) + go r.Run(wait.NeverStop) + } + serviceLister := corelisters.NewServiceLister(serviceIndexer) + + nodeIndexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{}) + if kubeDeps.KubeClient != nil { + fieldSelector := fields.Set{api.ObjectNameField: string(nodeName)}.AsSelector() + nodeLW := cache.NewListWatchFromClient(kubeDeps.KubeClient.Core().RESTClient(), "nodes", metav1.NamespaceAll, fieldSelector) + r := cache.NewReflector(nodeLW, &v1.Node{}, nodeIndexer, 0) + go r.Run(wait.NeverStop) + } + nodeInfo := &predicates.CachedNodeInfo{NodeLister: corelisters.NewNodeLister(nodeIndexer)} + + // TODO: get the real node object of ourself, + // and use the real node name and UID. + // TODO: what is namespace for node? + nodeRef := &v1.ObjectReference{ + Kind: "Node", + Name: string(nodeName), + UID: types.UID(nodeName), + Namespace: "", + } + + containerRefManager := kubecontainer.NewRefManager() + + oomWatcher := NewOOMWatcher(kubeDeps.CAdvisorInterface, kubeDeps.Recorder) + + clusterDNS := make([]net.IP, 0, len(kubeCfg.ClusterDNS)) + for _, ipEntry := range kubeCfg.ClusterDNS { + ip := net.ParseIP(ipEntry) + if ip == nil { + glog.Warningf("Invalid clusterDNS ip '%q'", ipEntry) + } else { + clusterDNS = append(clusterDNS, ip) + } + } + httpClient := &http.Client{} + + klet := &Kubelet{ + hostname: hostname, + nodeName: nodeName, + kubeClient: kubeDeps.KubeClient, + heartbeatClient: kubeDeps.HeartbeatClient, + rootDirectory: rootDirectory, + resyncInterval: kubeCfg.SyncFrequency.Duration, + sourcesReady: config.NewSourcesReady(kubeDeps.PodConfig.SeenAllSources), + registerNode: kubeCfg.RegisterNode, + registerSchedulable: kubeCfg.RegisterSchedulable, + clusterDomain: kubeCfg.ClusterDomain, + clusterDNS: clusterDNS, + serviceLister: serviceLister, + nodeInfo: nodeInfo, + masterServiceNamespace: kubeCfg.MasterServiceNamespace, + streamingConnectionIdleTimeout: kubeCfg.StreamingConnectionIdleTimeout.Duration, + recorder: kubeDeps.Recorder, + cadvisor: kubeDeps.CAdvisorInterface, + cloud: kubeDeps.Cloud, + autoDetectCloudProvider: (kubeletconfigv1alpha1.AutoDetectCloudProvider == cloudProvider), + externalCloudProvider: cloudprovider.IsExternal(cloudProvider), + providerID: providerID, + nodeRef: nodeRef, + nodeLabels: kubeCfg.NodeLabels, + nodeStatusUpdateFrequency: kubeCfg.NodeStatusUpdateFrequency.Duration, + os: kubeDeps.OSInterface, + oomWatcher: oomWatcher, + cgroupsPerQOS: kubeCfg.CgroupsPerQOS, + cgroupRoot: kubeCfg.CgroupRoot, + mounter: kubeDeps.Mounter, + writer: kubeDeps.Writer, + maxPods: int(kubeCfg.MaxPods), + podsPerCore: int(kubeCfg.PodsPerCore), + syncLoopMonitor: atomic.Value{}, + resolverConfig: kubeCfg.ResolverConfig, + daemonEndpoints: daemonEndpoints, + containerManager: kubeDeps.ContainerManager, + nodeIP: net.ParseIP(nodeIP), + clock: clock.RealClock{}, + enableControllerAttachDetach: kubeCfg.EnableControllerAttachDetach, + iptClient: utilipt.New(utilexec.New(), utildbus.New(), utilipt.ProtocolIpv4), + makeIPTablesUtilChains: kubeCfg.MakeIPTablesUtilChains, + iptablesMasqueradeBit: int(kubeCfg.IPTablesMasqueradeBit), + iptablesDropBit: int(kubeCfg.IPTablesDropBit), + experimentalHostUserNamespaceDefaulting: utilfeature.DefaultFeatureGate.Enabled(features.ExperimentalHostUserNamespaceDefaultingGate), + } + + secretManager := secret.NewCachingSecretManager( + kubeDeps.KubeClient, secret.GetObjectTTLFromNodeFunc(klet.GetNode)) + klet.secretManager = secretManager + + configMapManager := configmap.NewCachingConfigMapManager( + kubeDeps.KubeClient, configmap.GetObjectTTLFromNodeFunc(klet.GetNode)) + klet.configMapManager = configMapManager + + if klet.experimentalHostUserNamespaceDefaulting { + glog.Infof("Experimental host user namespace defaulting is enabled.") + } + + hairpinMode, err := effectiveHairpinMode(kubeletconfiginternal.HairpinMode(kubeCfg.HairpinMode), kubeCfg.ContainerRuntime, crOptions.NetworkPluginName) + if err != nil { + // This is a non-recoverable error. Returning it up the callstack will just + // lead to retries of the same failure, so just fail hard. + glog.Fatalf("Invalid hairpin mode: %v", err) + } + glog.Infof("Hairpin mode set to %q", hairpinMode) + + // TODO(#36485) Remove this workaround once we fix the init-container issue. + // Touch iptables lock file, which will be shared among all processes accessing + // the iptables. + f, err := os.OpenFile(utilipt.LockfilePath16x, os.O_CREATE, 0600) + if err != nil { + glog.Warningf("Failed to open iptables lock file: %v", err) + } else if err = f.Close(); err != nil { + glog.Warningf("Failed to close iptables lock file: %v", err) + } + + plug, err := network.InitNetworkPlugin(kubeDeps.NetworkPlugins, crOptions.NetworkPluginName, &criNetworkHost{&networkHost{klet}, &network.NoopPortMappingGetter{}}, hairpinMode, kubeCfg.NonMasqueradeCIDR, int(crOptions.NetworkPluginMTU)) + if err != nil { + return nil, err + } + klet.networkPlugin = plug + + machineInfo, err := klet.GetCachedMachineInfo() + if err != nil { + return nil, err + } + + imageBackOff := flowcontrol.NewBackOff(backOffPeriod, MaxContainerBackOff) + + klet.livenessManager = proberesults.NewManager() + + klet.podCache = kubecontainer.NewCache() + // podManager is also responsible for keeping secretManager and configMapManager contents up-to-date. + klet.podManager = kubepod.NewBasicPodManager(kubepod.NewBasicMirrorClient(klet.kubeClient), secretManager, configMapManager) + + if kubeCfg.RemoteRuntimeEndpoint != "" { + // kubeCfg.RemoteImageEndpoint is same as kubeCfg.RemoteRuntimeEndpoint if not explicitly specified + if kubeCfg.RemoteImageEndpoint == "" { + kubeCfg.RemoteImageEndpoint = kubeCfg.RemoteRuntimeEndpoint + } + } + + // TODO: These need to become arguments to a standalone docker shim. + binDir := crOptions.CNIBinDir + if binDir == "" { + binDir = crOptions.NetworkPluginDir + } + pluginSettings := dockershim.NetworkPluginSettings{ + HairpinMode: hairpinMode, + NonMasqueradeCIDR: kubeCfg.NonMasqueradeCIDR, + PluginName: crOptions.NetworkPluginName, + PluginConfDir: crOptions.CNIConfDir, + PluginBinDir: binDir, + MTU: int(crOptions.NetworkPluginMTU), + } + + klet.resourceAnalyzer = serverstats.NewResourceAnalyzer(klet, kubeCfg.VolumeStatsAggPeriod.Duration) + + // Remote runtime shim just cannot talk back to kubelet, so it doesn't + // support bandwidth shaping or hostports till #35457. To enable legacy + // features, replace with networkHost. + var nl *NoOpLegacyHost + pluginSettings.LegacyRuntimeHost = nl + + // rktnetes cannot be run with CRI. + if kubeCfg.ContainerRuntime != kubetypes.RktContainerRuntime { + // kubelet defers to the runtime shim to setup networking. Setting + // this to nil will prevent it from trying to invoke the plugin. + // It's easier to always probe and initialize plugins till cri + // becomes the default. + klet.networkPlugin = nil + + switch kubeCfg.ContainerRuntime { + case kubetypes.DockerContainerRuntime: + // Create and start the CRI shim running as a grpc server. + streamingConfig := getStreamingConfig(kubeCfg, kubeDeps) + ds, err := dockershim.NewDockerService(kubeDeps.DockerClient, crOptions.PodSandboxImage, streamingConfig, + &pluginSettings, kubeCfg.RuntimeCgroups, kubeCfg.CgroupDriver, crOptions.DockerExecHandlerName, + crOptions.DockershimRootDirectory, crOptions.DockerDisableSharedPID) + if err != nil { + return nil, err + } + if err := ds.Start(); err != nil { + return nil, err + } + // For now, the CRI shim redirects the streaming requests to the + // kubelet, which handles the requests using DockerService.. + klet.criHandler = ds + + // The unix socket for kubelet <-> dockershim communication. + glog.V(5).Infof("RemoteRuntimeEndpoint: %q, RemoteImageEndpoint: %q", + kubeCfg.RemoteRuntimeEndpoint, + kubeCfg.RemoteImageEndpoint) + glog.V(2).Infof("Starting the GRPC server for the docker CRI shim.") + server := dockerremote.NewDockerServer(kubeCfg.RemoteRuntimeEndpoint, ds) + if err := server.Start(); err != nil { + return nil, err + } + + // Create dockerLegacyService when the logging driver is not supported. + supported, err := dockershim.IsCRISupportedLogDriver(kubeDeps.DockerClient) + if err != nil { + return nil, err + } + if !supported { + klet.dockerLegacyService = dockershim.NewDockerLegacyService(kubeDeps.DockerClient) + } + case kubetypes.RemoteContainerRuntime: + // No-op. + break + default: + return nil, fmt.Errorf("unsupported CRI runtime: %q", kubeCfg.ContainerRuntime) + } + runtimeService, imageService, err := getRuntimeAndImageServices(kubeCfg) + if err != nil { + return nil, err + } + klet.runtimeService = runtimeService + runtime, err := kuberuntime.NewKubeGenericRuntimeManager( + kubecontainer.FilterEventRecorder(kubeDeps.Recorder), + klet.livenessManager, + kubeCfg.SeccompProfileRoot, + containerRefManager, + machineInfo, + klet, + kubeDeps.OSInterface, + klet, + httpClient, + imageBackOff, + kubeCfg.SerializeImagePulls, + float32(kubeCfg.RegistryPullQPS), + int(kubeCfg.RegistryBurst), + kubeCfg.CPUCFSQuota, + runtimeService, + imageService, + kubeDeps.ContainerManager.InternalContainerLifecycle(), + ) + if err != nil { + return nil, err + } + klet.containerRuntime = runtime + klet.runner = runtime + + // CRI integrations should get container metrics via CRI. Docker + // uses the built-in cadvisor to gather such metrics on Linux for + // historical reasons. + // cri-o relies on cadvisor as a temporary workaround. The code should + // be removed. Related issue: + // https://github.com/kubernetes/kubernetes/issues/51798 + if (kubeCfg.ContainerRuntime == kubetypes.DockerContainerRuntime && + goruntime.GOOS == "linux") || kubeCfg.RemoteRuntimeEndpoint == "/var/run/crio.sock" { + klet.StatsProvider = stats.NewCadvisorStatsProvider( + klet.cadvisor, + klet.resourceAnalyzer, + klet.podManager, + klet.runtimeCache, + klet.containerRuntime) + } else { + klet.StatsProvider = stats.NewCRIStatsProvider( + klet.cadvisor, + klet.resourceAnalyzer, + klet.podManager, + klet.runtimeCache, + runtimeService, + imageService) + } + } else { + // rkt uses the legacy, non-CRI, integration. Configure it the old way. + // TODO: Include hairpin mode settings in rkt? + conf := &rkt.Config{ + Path: crOptions.RktPath, + Stage1Image: crOptions.RktStage1Image, + InsecureOptions: "image,ondisk", + } + runtime, err := rkt.New( + crOptions.RktAPIEndpoint, + conf, + klet, + kubeDeps.Recorder, + containerRefManager, + klet, + klet.livenessManager, + httpClient, + klet.networkPlugin, + hairpinMode == kubeletconfiginternal.HairpinVeth, + utilexec.New(), + kubecontainer.RealOS{}, + imageBackOff, + kubeCfg.SerializeImagePulls, + float32(kubeCfg.RegistryPullQPS), + int(kubeCfg.RegistryBurst), + kubeCfg.RuntimeRequestTimeout.Duration, + ) + if err != nil { + return nil, err + } + klet.containerRuntime = runtime + klet.runner = kubecontainer.DirectStreamingRunner(runtime) + klet.StatsProvider = stats.NewCadvisorStatsProvider( + klet.cadvisor, + klet.resourceAnalyzer, + klet.podManager, + klet.runtimeCache, + klet.containerRuntime) + } + + klet.pleg = pleg.NewGenericPLEG(klet.containerRuntime, plegChannelCapacity, plegRelistPeriod, klet.podCache, clock.RealClock{}) + klet.runtimeState = newRuntimeState(maxWaitForContainerRuntime) + klet.runtimeState.addHealthCheck("PLEG", klet.pleg.Healthy) + klet.updatePodCIDR(kubeCfg.PodCIDR) + + // setup containerGC + containerGC, err := kubecontainer.NewContainerGC(klet.containerRuntime, containerGCPolicy, klet.sourcesReady) + if err != nil { + return nil, err + } + klet.containerGC = containerGC + klet.containerDeletor = newPodContainerDeletor(klet.containerRuntime, integer.IntMax(containerGCPolicy.MaxPerPodContainer, minDeadContainerInPod)) + + // setup imageManager + imageManager, err := images.NewImageGCManager(klet.containerRuntime, kubeDeps.CAdvisorInterface, kubeDeps.Recorder, nodeRef, imageGCPolicy) + if err != nil { + return nil, fmt.Errorf("failed to initialize image manager: %v", err) + } + klet.imageManager = imageManager + + klet.statusManager = status.NewManager(klet.kubeClient, klet.podManager, klet) + + if utilfeature.DefaultFeatureGate.Enabled(features.RotateKubeletServerCertificate) && kubeDeps.TLSOptions != nil { + var ips []net.IP + cfgAddress := net.ParseIP(kubeCfg.Address) + if cfgAddress == nil || cfgAddress.IsUnspecified() { + localIPs, err := allLocalIPsWithoutLoopback() + if err != nil { + return nil, err + } + ips = localIPs + } else { + ips = []net.IP{cfgAddress} + } + + ips = append(ips, cloudIPs...) + names := append([]string{klet.GetHostname(), hostnameOverride}, cloudNames...) + klet.serverCertificateManager, err = certificate.NewKubeletServerCertificateManager(klet.kubeClient, kubeCfg, klet.nodeName, ips, names, certDirectory) + if err != nil { + return nil, fmt.Errorf("failed to initialize certificate manager: %v", err) + } + kubeDeps.TLSOptions.Config.GetCertificate = func(*tls.ClientHelloInfo) (*tls.Certificate, error) { + cert := klet.serverCertificateManager.Current() + if cert == nil { + return nil, fmt.Errorf("no certificate available") + } + return cert, nil + } + } + + klet.probeManager = prober.NewManager( + klet.statusManager, + klet.livenessManager, + klet.runner, + containerRefManager, + kubeDeps.Recorder) + + klet.volumePluginMgr, err = + NewInitializedVolumePluginMgr(klet, secretManager, configMapManager, kubeDeps.VolumePlugins, kubeDeps.DynamicPluginProber) + if err != nil { + return nil, err + } + + // If the experimentalMounterPathFlag is set, we do not want to + // check node capabilities since the mount path is not the default + if len(kubeCfg.ExperimentalMounterPath) != 0 { + kubeCfg.ExperimentalCheckNodeCapabilitiesBeforeMount = false + // Replace the nameserver in containerized-mounter's rootfs/etc/resolve.conf with kubelet.ClusterDNS + // so that service name could be resolved + klet.setupDNSinContainerizedMounter(kubeCfg.ExperimentalMounterPath) + } + + // setup volumeManager + klet.volumeManager = volumemanager.NewVolumeManager( + kubeCfg.EnableControllerAttachDetach, + nodeName, + klet.podManager, + klet.statusManager, + klet.kubeClient, + klet.volumePluginMgr, + klet.containerRuntime, + kubeDeps.Mounter, + klet.getPodsDir(), + kubeDeps.Recorder, + kubeCfg.ExperimentalCheckNodeCapabilitiesBeforeMount, + kubeCfg.KeepTerminatedPodVolumes) + + runtimeCache, err := kubecontainer.NewRuntimeCache(klet.containerRuntime) + if err != nil { + return nil, err + } + klet.runtimeCache = runtimeCache + klet.reasonCache = NewReasonCache() + klet.workQueue = queue.NewBasicWorkQueue(klet.clock) + klet.podWorkers = newPodWorkers(klet.syncPod, kubeDeps.Recorder, klet.workQueue, klet.resyncInterval, backOffPeriod, klet.podCache) + + klet.backOff = flowcontrol.NewBackOff(backOffPeriod, MaxContainerBackOff) + klet.podKillingCh = make(chan *kubecontainer.PodPair, podKillingChannelCapacity) + klet.setNodeStatusFuncs = klet.defaultNodeStatusFuncs() + + // setup eviction manager + evictionManager, evictionAdmitHandler := eviction.NewManager(klet.resourceAnalyzer, evictionConfig, killPodNow(klet.podWorkers, kubeDeps.Recorder), klet.imageManager, klet.containerGC, kubeDeps.Recorder, nodeRef, klet.clock) + + klet.evictionManager = evictionManager + klet.admitHandlers.AddPodAdmitHandler(evictionAdmitHandler) + + // add sysctl admission + runtimeSupport, err := sysctl.NewRuntimeAdmitHandler(klet.containerRuntime) + if err != nil { + return nil, err + } + safeWhitelist, err := sysctl.NewWhitelist(sysctl.SafeSysctlWhitelist(), v1.SysctlsPodAnnotationKey) + if err != nil { + return nil, err + } + // Safe, whitelisted sysctls can always be used as unsafe sysctls in the spec + // Hence, we concatenate those two lists. + safeAndUnsafeSysctls := append(sysctl.SafeSysctlWhitelist(), kubeCfg.AllowedUnsafeSysctls...) + unsafeWhitelist, err := sysctl.NewWhitelist(safeAndUnsafeSysctls, v1.UnsafeSysctlsPodAnnotationKey) + if err != nil { + return nil, err + } + klet.admitHandlers.AddPodAdmitHandler(runtimeSupport) + klet.admitHandlers.AddPodAdmitHandler(safeWhitelist) + klet.admitHandlers.AddPodAdmitHandler(unsafeWhitelist) + + // enable active deadline handler + activeDeadlineHandler, err := newActiveDeadlineHandler(klet.statusManager, kubeDeps.Recorder, klet.clock) + if err != nil { + return nil, err + } + klet.AddPodSyncLoopHandler(activeDeadlineHandler) + klet.AddPodSyncHandler(activeDeadlineHandler) + + criticalPodAdmissionHandler := preemption.NewCriticalPodAdmissionHandler(klet.GetActivePods, killPodNow(klet.podWorkers, kubeDeps.Recorder), kubeDeps.Recorder) + klet.admitHandlers.AddPodAdmitHandler(lifecycle.NewPredicateAdmitHandler(klet.getNodeAnyWay, criticalPodAdmissionHandler)) + // apply functional Option's + for _, opt := range kubeDeps.Options { + opt(klet) + } + + klet.appArmorValidator = apparmor.NewValidator(kubeCfg.ContainerRuntime) + klet.softAdmitHandlers.AddPodAdmitHandler(lifecycle.NewAppArmorAdmitHandler(klet.appArmorValidator)) + klet.softAdmitHandlers.AddPodAdmitHandler(lifecycle.NewNoNewPrivsAdmitHandler(klet.containerRuntime)) + if utilfeature.DefaultFeatureGate.Enabled(features.Accelerators) { + if kubeCfg.ContainerRuntime == kubetypes.DockerContainerRuntime { + if klet.gpuManager, err = nvidia.NewNvidiaGPUManager(klet, kubeDeps.DockerClient); err != nil { + return nil, err + } + } else { + glog.Errorf("Accelerators feature is supported with docker runtime only. Disabling this feature internally.") + } + } + // Set GPU manager to a stub implementation if it is not enabled or cannot be supported. + if klet.gpuManager == nil { + klet.gpuManager = gpu.NewGPUManagerStub() + } + // Finally, put the most recent version of the config on the Kubelet, so + // people can see how it was configured. + klet.kubeletConfiguration = *kubeCfg + return klet, nil +} + +type serviceLister interface { + List(labels.Selector) ([]*v1.Service, error) +} + +// Kubelet is the main kubelet implementation. +type Kubelet struct { + kubeletConfiguration kubeletconfiginternal.KubeletConfiguration + + hostname string + nodeName types.NodeName + runtimeCache kubecontainer.RuntimeCache + kubeClient clientset.Interface + heartbeatClient v1core.CoreV1Interface + iptClient utilipt.Interface + rootDirectory string + + // podWorkers handle syncing Pods in response to events. + podWorkers PodWorkers + + // resyncInterval is the interval between periodic full reconciliations of + // pods on this node. + resyncInterval time.Duration + + // sourcesReady records the sources seen by the kubelet, it is thread-safe. + sourcesReady config.SourcesReady + + // podManager is a facade that abstracts away the various sources of pods + // this Kubelet services. + podManager kubepod.Manager + + // Needed to observe and respond to situations that could impact node stability + evictionManager eviction.Manager + + // Optional, defaults to /logs/ from /var/log + logServer http.Handler + // Optional, defaults to simple Docker implementation + runner kubecontainer.ContainerCommandRunner + + // cAdvisor used for container information. + cadvisor cadvisor.Interface + + // Set to true to have the node register itself with the apiserver. + registerNode bool + // Set to true to have the node register itself as schedulable. + registerSchedulable bool + // for internal book keeping; access only from within registerWithApiserver + registrationCompleted bool + + // If non-empty, use this for container DNS search. + clusterDomain string + + // If non-nil, use this for container DNS server. + clusterDNS []net.IP + + // masterServiceNamespace is the namespace that the master service is exposed in. + masterServiceNamespace string + // serviceLister knows how to list services + serviceLister serviceLister + // nodeInfo knows how to get information about the node for this kubelet. + nodeInfo predicates.NodeInfo + + // a list of node labels to register + nodeLabels map[string]string + + // Last timestamp when runtime responded on ping. + // Mutex is used to protect this value. + runtimeState *runtimeState + + // Volume plugins. + volumePluginMgr *volume.VolumePluginMgr + + // Network plugin. + networkPlugin network.NetworkPlugin + + // Handles container probing. + probeManager prober.Manager + // Manages container health check results. + livenessManager proberesults.Manager + + // How long to keep idle streaming command execution/port forwarding + // connections open before terminating them + streamingConnectionIdleTimeout time.Duration + + // The EventRecorder to use + recorder record.EventRecorder + + // Policy for handling garbage collection of dead containers. + containerGC kubecontainer.ContainerGC + + // Manager for image garbage collection. + imageManager images.ImageGCManager + + // Secret manager. + secretManager secret.Manager + + // ConfigMap manager. + configMapManager configmap.Manager + + // Cached MachineInfo returned by cadvisor. + machineInfo *cadvisorapi.MachineInfo + + //Cached RootFsInfo returned by cadvisor + rootfsInfo *cadvisorapiv2.FsInfo + + // Handles certificate rotations. + serverCertificateManager certificate.Manager + + // Syncs pods statuses with apiserver; also used as a cache of statuses. + statusManager status.Manager + + // VolumeManager runs a set of asynchronous loops that figure out which + // volumes need to be attached/mounted/unmounted/detached based on the pods + // scheduled on this node and makes it so. + volumeManager volumemanager.VolumeManager + + // Cloud provider interface. + cloud cloudprovider.Interface + // DEPRECATED: auto detecting cloud providers goes against the initiative + // for out-of-tree cloud providers as we'll now depend on cAdvisor integrations + // with cloud providers instead of in the core repo. + // More details here: https://github.com/kubernetes/kubernetes/issues/50986 + autoDetectCloudProvider bool + // Indicates that the node initialization happens in an external cloud controller + externalCloudProvider bool + // Reference to this node. + nodeRef *v1.ObjectReference + + // Container runtime. + containerRuntime kubecontainer.Runtime + + // Container runtime service (needed by container runtime Start()). + // TODO(CD): try to make this available without holding a reference in this + // struct. For example, by adding a getter to generic runtime. + runtimeService internalapi.RuntimeService + + // reasonCache caches the failure reason of the last creation of all containers, which is + // used for generating ContainerStatus. + reasonCache *ReasonCache + + // nodeStatusUpdateFrequency specifies how often kubelet posts node status to master. + // Note: be cautious when changing the constant, it must work with nodeMonitorGracePeriod + // in nodecontroller. There are several constraints: + // 1. nodeMonitorGracePeriod must be N times more than nodeStatusUpdateFrequency, where + // N means number of retries allowed for kubelet to post node status. It is pointless + // to make nodeMonitorGracePeriod be less than nodeStatusUpdateFrequency, since there + // will only be fresh values from Kubelet at an interval of nodeStatusUpdateFrequency. + // The constant must be less than podEvictionTimeout. + // 2. nodeStatusUpdateFrequency needs to be large enough for kubelet to generate node + // status. Kubelet may fail to update node status reliably if the value is too small, + // as it takes time to gather all necessary node information. + nodeStatusUpdateFrequency time.Duration + + // Generates pod events. + pleg pleg.PodLifecycleEventGenerator + + // Store kubecontainer.PodStatus for all pods. + podCache kubecontainer.Cache + + // os is a facade for various syscalls that need to be mocked during testing. + os kubecontainer.OSInterface + + // Watcher of out of memory events. + oomWatcher OOMWatcher + + // Monitor resource usage + resourceAnalyzer serverstats.ResourceAnalyzer + + // Whether or not we should have the QOS cgroup hierarchy for resource management + cgroupsPerQOS bool + + // If non-empty, pass this to the container runtime as the root cgroup. + cgroupRoot string + + // Mounter to use for volumes. + mounter mount.Interface + + // Writer interface to use for volumes. + writer kubeio.Writer + + // Manager of non-Runtime containers. + containerManager cm.ContainerManager + + // Maximum Number of Pods which can be run by this Kubelet + maxPods int + + // Monitor Kubelet's sync loop + syncLoopMonitor atomic.Value + + // Container restart Backoff + backOff *flowcontrol.Backoff + + // Channel for sending pods to kill. + podKillingCh chan *kubecontainer.PodPair + + // The configuration file used as the base to generate the container's + // DNS resolver configuration file. This can be used in conjunction with + // clusterDomain and clusterDNS. + resolverConfig string + + // Information about the ports which are opened by daemons on Node running this Kubelet server. + daemonEndpoints *v1.NodeDaemonEndpoints + + // A queue used to trigger pod workers. + workQueue queue.WorkQueue + + // oneTimeInitializer is used to initialize modules that are dependent on the runtime to be up. + oneTimeInitializer sync.Once + + // If non-nil, use this IP address for the node + nodeIP net.IP + + // If non-nil, this is a unique identifier for the node in an external database, eg. cloudprovider + providerID string + + // clock is an interface that provides time related functionality in a way that makes it + // easy to test the code. + clock clock.Clock + + // handlers called during the tryUpdateNodeStatus cycle + setNodeStatusFuncs []func(*v1.Node) error + + // TODO: think about moving this to be centralized in PodWorkers in follow-on. + // the list of handlers to call during pod admission. + admitHandlers lifecycle.PodAdmitHandlers + + // softAdmithandlers are applied to the pod after it is admitted by the Kubelet, but before it is + // run. A pod rejected by a softAdmitHandler will be left in a Pending state indefinitely. If a + // rejected pod should not be recreated, or the scheduler is not aware of the rejection rule, the + // admission rule should be applied by a softAdmitHandler. + softAdmitHandlers lifecycle.PodAdmitHandlers + + // the list of handlers to call during pod sync loop. + lifecycle.PodSyncLoopHandlers + + // the list of handlers to call during pod sync. + lifecycle.PodSyncHandlers + + // the number of allowed pods per core + podsPerCore int + + // enableControllerAttachDetach indicates the Attach/Detach controller + // should manage attachment/detachment of volumes scheduled to this node, + // and disable kubelet from executing any attach/detach operations + enableControllerAttachDetach bool + + // trigger deleting containers in a pod + containerDeletor *podContainerDeletor + + // config iptables util rules + makeIPTablesUtilChains bool + + // The bit of the fwmark space to mark packets for SNAT. + iptablesMasqueradeBit int + + // The bit of the fwmark space to mark packets for dropping. + iptablesDropBit int + + // The AppArmor validator for checking whether AppArmor is supported. + appArmorValidator apparmor.Validator + + // The handler serving CRI streaming calls (exec/attach/port-forward). + criHandler http.Handler + + // experimentalHostUserNamespaceDefaulting sets userns=true when users request host namespaces (pid, ipc, net), + // are using non-namespaced capabilities (mknod, sys_time, sys_module), the pod contains a privileged container, + // or using host path volumes. + // This should only be enabled when the container runtime is performing user remapping AND if the + // experimental behavior is desired. + experimentalHostUserNamespaceDefaulting bool + + // GPU Manager + gpuManager gpu.GPUManager + + // dockerLegacyService contains some legacy methods for backward compatibility. + // It should be set only when docker is using non json-file logging driver. + dockerLegacyService dockershim.DockerLegacyService + + // StatsProvider provides the node and the container stats. + *stats.StatsProvider +} + +func allLocalIPsWithoutLoopback() ([]net.IP, error) { + interfaces, err := net.Interfaces() + if err != nil { + return nil, fmt.Errorf("could not list network interfaces: %v", err) + } + var ips []net.IP + for _, i := range interfaces { + addresses, err := i.Addrs() + if err != nil { + return nil, fmt.Errorf("could not list the addresses for network interface %v: %v", i, err) + } + for _, address := range addresses { + switch v := address.(type) { + case *net.IPNet: + if !v.IP.IsLoopback() { + ips = append(ips, v.IP) + } + } + } + } + return ips, nil +} + +// setupDataDirs creates: +// 1. the root directory +// 2. the pods directory +// 3. the plugins directory +func (kl *Kubelet) setupDataDirs() error { + kl.rootDirectory = path.Clean(kl.rootDirectory) + if err := os.MkdirAll(kl.getRootDir(), 0750); err != nil { + return fmt.Errorf("error creating root directory: %v", err) + } + if err := kl.mounter.MakeRShared(kl.getRootDir()); err != nil { + return fmt.Errorf("error configuring root directory: %v", err) + } + if err := os.MkdirAll(kl.getPodsDir(), 0750); err != nil { + return fmt.Errorf("error creating pods directory: %v", err) + } + if err := os.MkdirAll(kl.getPluginsDir(), 0750); err != nil { + return fmt.Errorf("error creating plugins directory: %v", err) + } + return nil +} + +// StartGarbageCollection starts garbage collection threads. +func (kl *Kubelet) StartGarbageCollection() { + loggedContainerGCFailure := false + go wait.Until(func() { + if err := kl.containerGC.GarbageCollect(); err != nil { + glog.Errorf("Container garbage collection failed: %v", err) + kl.recorder.Eventf(kl.nodeRef, v1.EventTypeWarning, events.ContainerGCFailed, err.Error()) + loggedContainerGCFailure = true + } else { + var vLevel glog.Level = 4 + if loggedContainerGCFailure { + vLevel = 1 + loggedContainerGCFailure = false + } + + glog.V(vLevel).Infof("Container garbage collection succeeded") + } + }, ContainerGCPeriod, wait.NeverStop) + + prevImageGCFailed := false + go wait.Until(func() { + if err := kl.imageManager.GarbageCollect(); err != nil { + if prevImageGCFailed { + glog.Errorf("Image garbage collection failed multiple times in a row: %v", err) + // Only create an event for repeated failures + kl.recorder.Eventf(kl.nodeRef, v1.EventTypeWarning, events.ImageGCFailed, err.Error()) + } else { + glog.Errorf("Image garbage collection failed once. Stats initialization may not have completed yet: %v", err) + } + prevImageGCFailed = true + } else { + var vLevel glog.Level = 4 + if prevImageGCFailed { + vLevel = 1 + prevImageGCFailed = false + } + + glog.V(vLevel).Infof("Image garbage collection succeeded") + } + }, ImageGCPeriod, wait.NeverStop) +} + +// initializeModules will initialize internal modules that do not require the container runtime to be up. +// Note that the modules here must not depend on modules that are not initialized here. +func (kl *Kubelet) initializeModules() error { + // Prometheus metrics. + metrics.Register(kl.runtimeCache) + + // Setup filesystem directories. + if err := kl.setupDataDirs(); err != nil { + return err + } + + // If the container logs directory does not exist, create it. + if _, err := os.Stat(ContainerLogsDir); err != nil { + if err := kl.os.MkdirAll(ContainerLogsDir, 0755); err != nil { + glog.Errorf("Failed to create directory %q: %v", ContainerLogsDir, err) + } + } + + // Start the image manager. + kl.imageManager.Start() + + // Start the certificate manager. + if utilfeature.DefaultFeatureGate.Enabled(features.RotateKubeletServerCertificate) { + kl.serverCertificateManager.Start() + } + + // Start container manager. + node, err := kl.getNodeAnyWay() + if err != nil { + return fmt.Errorf("Kubelet failed to get node info: %v", err) + } + + if err := kl.containerManager.Start(node, kl.GetActivePods, kl.statusManager, kl.runtimeService); err != nil { + return fmt.Errorf("Failed to start ContainerManager %v", err) + } + + // Start out of memory watcher. + if err := kl.oomWatcher.Start(kl.nodeRef); err != nil { + return fmt.Errorf("Failed to start OOM watcher %v", err) + } + + // Initialize GPUs + if err := kl.gpuManager.Start(); err != nil { + glog.Errorf("Failed to start gpuManager %v", err) + } + + // Start resource analyzer + kl.resourceAnalyzer.Start() + + return nil +} + +// initializeRuntimeDependentModules will initialize internal modules that require the container runtime to be up. +func (kl *Kubelet) initializeRuntimeDependentModules() { + if err := kl.cadvisor.Start(); err != nil { + // Fail kubelet and rely on the babysitter to retry starting kubelet. + // TODO(random-liu): Add backoff logic in the babysitter + glog.Fatalf("Failed to start cAdvisor %v", err) + } + // eviction manager must start after cadvisor because it needs to know if the container runtime has a dedicated imagefs + kl.evictionManager.Start(kl.cadvisor, kl.GetActivePods, kl.podResourcesAreReclaimed, kl.containerManager, evictionMonitoringPeriod) +} + +// Run starts the kubelet reacting to config updates +func (kl *Kubelet) Run(updates <-chan kubetypes.PodUpdate) { + if kl.logServer == nil { + kl.logServer = http.StripPrefix("/logs/", http.FileServer(http.Dir("/var/log/"))) + } + if kl.kubeClient == nil { + glog.Warning("No api server defined - no node status update will be sent.") + } + + if err := kl.initializeModules(); err != nil { + kl.recorder.Eventf(kl.nodeRef, v1.EventTypeWarning, events.KubeletSetupFailed, err.Error()) + glog.Error(err) + kl.runtimeState.setInitError(err) + } + + // Start volume manager + go kl.volumeManager.Run(kl.sourcesReady, wait.NeverStop) + + if kl.kubeClient != nil { + // Start syncing node status immediately, this may set up things the runtime needs to run. + go wait.Until(kl.syncNodeStatus, kl.nodeStatusUpdateFrequency, wait.NeverStop) + } + go wait.Until(kl.syncNetworkStatus, 30*time.Second, wait.NeverStop) + go wait.Until(kl.updateRuntimeUp, 5*time.Second, wait.NeverStop) + + // Start loop to sync iptables util rules + if kl.makeIPTablesUtilChains { + go wait.Until(kl.syncNetworkUtil, 1*time.Minute, wait.NeverStop) + } + + // Start a goroutine responsible for killing pods (that are not properly + // handled by pod workers). + go wait.Until(kl.podKiller, 1*time.Second, wait.NeverStop) + + // Start gorouting responsible for checking limits in resolv.conf + if kl.resolverConfig != "" { + go wait.Until(func() { kl.checkLimitsForResolvConf() }, 30*time.Second, wait.NeverStop) + } + + // Start component sync loops. + kl.statusManager.Start() + kl.probeManager.Start() + + // Start the pod lifecycle event generator. + kl.pleg.Start() + kl.syncLoop(updates, kl) +} + +// GetKubeClient returns the Kubernetes client. +// TODO: This is currently only required by network plugins. Replace +// with more specific methods. +func (kl *Kubelet) GetKubeClient() clientset.Interface { + return kl.kubeClient +} + +// GetClusterDNS returns a list of the DNS servers and a list of the DNS search +// domains of the cluster. +func (kl *Kubelet) GetClusterDNS(pod *v1.Pod) ([]string, []string, bool, error) { + var hostDNS, hostSearch []string + // Get host DNS settings + if kl.resolverConfig != "" { + f, err := os.Open(kl.resolverConfig) + if err != nil { + return nil, nil, false, err + } + defer f.Close() + + hostDNS, hostSearch, err = kl.parseResolvConf(f) + if err != nil { + return nil, nil, false, err + } + } + useClusterFirstPolicy := ((pod.Spec.DNSPolicy == v1.DNSClusterFirst && !kubecontainer.IsHostNetworkPod(pod)) || pod.Spec.DNSPolicy == v1.DNSClusterFirstWithHostNet) + if useClusterFirstPolicy && len(kl.clusterDNS) == 0 { + // clusterDNS is not known. + // pod with ClusterDNSFirst Policy cannot be created + kl.recorder.Eventf(pod, v1.EventTypeWarning, "MissingClusterDNS", "kubelet does not have ClusterDNS IP configured and cannot create Pod using %q policy. Falling back to DNSDefault policy.", pod.Spec.DNSPolicy) + log := fmt.Sprintf("kubelet does not have ClusterDNS IP configured and cannot create Pod using %q policy. pod: %q. Falling back to DNSDefault policy.", pod.Spec.DNSPolicy, format.Pod(pod)) + kl.recorder.Eventf(kl.nodeRef, v1.EventTypeWarning, "MissingClusterDNS", log) + + // fallback to DNSDefault + useClusterFirstPolicy = false + } + + if !useClusterFirstPolicy { + // When the kubelet --resolv-conf flag is set to the empty string, use + // DNS settings that override the docker default (which is to use + // /etc/resolv.conf) and effectively disable DNS lookups. According to + // the bind documentation, the behavior of the DNS client library when + // "nameservers" are not specified is to "use the nameserver on the + // local machine". A nameserver setting of localhost is equivalent to + // this documented behavior. + if kl.resolverConfig == "" { + hostDNS = []string{"127.0.0.1"} + hostSearch = []string{"."} + } else { + hostSearch = kl.formDNSSearchForDNSDefault(hostSearch, pod) + } + return hostDNS, hostSearch, useClusterFirstPolicy, nil + } + + // for a pod with DNSClusterFirst policy, the cluster DNS server is the only nameserver configured for + // the pod. The cluster DNS server itself will forward queries to other nameservers that is configured to use, + // in case the cluster DNS server cannot resolve the DNS query itself + dns := make([]string, len(kl.clusterDNS)) + for i, ip := range kl.clusterDNS { + dns[i] = ip.String() + } + dnsSearch := kl.formDNSSearch(hostSearch, pod) + + return dns, dnsSearch, useClusterFirstPolicy, nil +} + +// syncPod is the transaction script for the sync of a single pod. +// +// Arguments: +// +// o - the SyncPodOptions for this invocation +// +// The workflow is: +// * If the pod is being created, record pod worker start latency +// * Call generateAPIPodStatus to prepare an v1.PodStatus for the pod +// * If the pod is being seen as running for the first time, record pod +// start latency +// * Update the status of the pod in the status manager +// * Kill the pod if it should not be running +// * Create a mirror pod if the pod is a static pod, and does not +// already have a mirror pod +// * Create the data directories for the pod if they do not exist +// * Wait for volumes to attach/mount +// * Fetch the pull secrets for the pod +// * Call the container runtime's SyncPod callback +// * Update the traffic shaping for the pod's ingress and egress limits +// +// If any step of this workflow errors, the error is returned, and is repeated +// on the next syncPod call. +func (kl *Kubelet) syncPod(o syncPodOptions) error { + // pull out the required options + pod := o.pod + mirrorPod := o.mirrorPod + podStatus := o.podStatus + updateType := o.updateType + + // if we want to kill a pod, do it now! + if updateType == kubetypes.SyncPodKill { + killPodOptions := o.killPodOptions + if killPodOptions == nil || killPodOptions.PodStatusFunc == nil { + return fmt.Errorf("kill pod options are required if update type is kill") + } + apiPodStatus := killPodOptions.PodStatusFunc(pod, podStatus) + kl.statusManager.SetPodStatus(pod, apiPodStatus) + // we kill the pod with the specified grace period since this is a termination + if err := kl.killPod(pod, nil, podStatus, killPodOptions.PodTerminationGracePeriodSecondsOverride); err != nil { + // there was an error killing the pod, so we return that error directly + utilruntime.HandleError(err) + return err + } + return nil + } + + // Latency measurements for the main workflow are relative to the + // first time the pod was seen by the API server. + var firstSeenTime time.Time + if firstSeenTimeStr, ok := pod.Annotations[kubetypes.ConfigFirstSeenAnnotationKey]; ok { + firstSeenTime = kubetypes.ConvertToTimestamp(firstSeenTimeStr).Get() + } + + // Record pod worker start latency if being created + // TODO: make pod workers record their own latencies + if updateType == kubetypes.SyncPodCreate { + if !firstSeenTime.IsZero() { + // This is the first time we are syncing the pod. Record the latency + // since kubelet first saw the pod if firstSeenTime is set. + metrics.PodWorkerStartLatency.Observe(metrics.SinceInMicroseconds(firstSeenTime)) + } else { + glog.V(3).Infof("First seen time not recorded for pod %q", pod.UID) + } + } + + // Generate final API pod status with pod and status manager status + apiPodStatus := kl.generateAPIPodStatus(pod, podStatus) + // The pod IP may be changed in generateAPIPodStatus if the pod is using host network. (See #24576) + // TODO(random-liu): After writing pod spec into container labels, check whether pod is using host network, and + // set pod IP to hostIP directly in runtime.GetPodStatus + podStatus.IP = apiPodStatus.PodIP + + // Record the time it takes for the pod to become running. + existingStatus, ok := kl.statusManager.GetPodStatus(pod.UID) + if !ok || existingStatus.Phase == v1.PodPending && apiPodStatus.Phase == v1.PodRunning && + !firstSeenTime.IsZero() { + metrics.PodStartLatency.Observe(metrics.SinceInMicroseconds(firstSeenTime)) + } + + runnable := kl.canRunPod(pod) + if !runnable.Admit { + // Pod is not runnable; update the Pod and Container statuses to why. + apiPodStatus.Reason = runnable.Reason + apiPodStatus.Message = runnable.Message + // Waiting containers are not creating. + const waitingReason = "Blocked" + for _, cs := range apiPodStatus.InitContainerStatuses { + if cs.State.Waiting != nil { + cs.State.Waiting.Reason = waitingReason + } + } + for _, cs := range apiPodStatus.ContainerStatuses { + if cs.State.Waiting != nil { + cs.State.Waiting.Reason = waitingReason + } + } + } + + // Update status in the status manager + kl.statusManager.SetPodStatus(pod, apiPodStatus) + + // Kill pod if it should not be running + if !runnable.Admit || pod.DeletionTimestamp != nil || apiPodStatus.Phase == v1.PodFailed { + var syncErr error + if err := kl.killPod(pod, nil, podStatus, nil); err != nil { + syncErr = fmt.Errorf("error killing pod: %v", err) + utilruntime.HandleError(syncErr) + } else { + if !runnable.Admit { + // There was no error killing the pod, but the pod cannot be run. + // Return an error to signal that the sync loop should back off. + syncErr = fmt.Errorf("pod cannot be run: %s", runnable.Message) + } + } + return syncErr + } + + // If the network plugin is not ready, only start the pod if it uses the host network + if rs := kl.runtimeState.networkErrors(); len(rs) != 0 && !kubecontainer.IsHostNetworkPod(pod) { + return fmt.Errorf("network is not ready: %v", rs) + } + + // Create Cgroups for the pod and apply resource parameters + // to them if cgroups-per-qos flag is enabled. + pcm := kl.containerManager.NewPodContainerManager() + // If pod has already been terminated then we need not create + // or update the pod's cgroup + if !kl.podIsTerminated(pod) { + // When the kubelet is restarted with the cgroups-per-qos + // flag enabled, all the pod's running containers + // should be killed intermittently and brought back up + // under the qos cgroup hierarchy. + // Check if this is the pod's first sync + firstSync := true + for _, containerStatus := range apiPodStatus.ContainerStatuses { + if containerStatus.State.Running != nil { + firstSync = false + break + } + } + // Don't kill containers in pod if pod's cgroups already + // exists or the pod is running for the first time + podKilled := false + if !pcm.Exists(pod) && !firstSync { + if err := kl.killPod(pod, nil, podStatus, nil); err == nil { + podKilled = true + } + } + // Create and Update pod's Cgroups + // Don't create cgroups for run once pod if it was killed above + // The current policy is not to restart the run once pods when + // the kubelet is restarted with the new flag as run once pods are + // expected to run only once and if the kubelet is restarted then + // they are not expected to run again. + // We don't create and apply updates to cgroup if its a run once pod and was killed above + if !(podKilled && pod.Spec.RestartPolicy == v1.RestartPolicyNever) { + if !pcm.Exists(pod) { + if err := kl.containerManager.UpdateQOSCgroups(); err != nil { + glog.V(2).Infof("Failed to update QoS cgroups while syncing pod: %v", err) + } + if err := pcm.EnsureExists(pod); err != nil { + return fmt.Errorf("failed to ensure that the pod: %v cgroups exist and are correctly applied: %v", pod.UID, err) + } + } + } + } + + // Create Mirror Pod for Static Pod if it doesn't already exist + if kubepod.IsStaticPod(pod) { + podFullName := kubecontainer.GetPodFullName(pod) + deleted := false + if mirrorPod != nil { + if mirrorPod.DeletionTimestamp != nil || !kl.podManager.IsMirrorPodOf(mirrorPod, pod) { + // The mirror pod is semantically different from the static pod. Remove + // it. The mirror pod will get recreated later. + glog.Warningf("Deleting mirror pod %q because it is outdated", format.Pod(mirrorPod)) + if err := kl.podManager.DeleteMirrorPod(podFullName); err != nil { + glog.Errorf("Failed deleting mirror pod %q: %v", format.Pod(mirrorPod), err) + } else { + deleted = true + } + } + } + if mirrorPod == nil || deleted { + glog.V(3).Infof("Creating a mirror pod for static pod %q", format.Pod(pod)) + if err := kl.podManager.CreateMirrorPod(pod); err != nil { + glog.Errorf("Failed creating a mirror pod for %q: %v", format.Pod(pod), err) + } + } + } + + // Make data directories for the pod + if err := kl.makePodDataDirs(pod); err != nil { + glog.Errorf("Unable to make pod data directories for pod %q: %v", format.Pod(pod), err) + return err + } + + // Volume manager will not mount volumes for terminated pods + if !kl.podIsTerminated(pod) { + // Wait for volumes to attach/mount + if err := kl.volumeManager.WaitForAttachAndMount(pod); err != nil { + kl.recorder.Eventf(pod, v1.EventTypeWarning, events.FailedMountVolume, "Unable to mount volumes for pod %q: %v", format.Pod(pod), err) + glog.Errorf("Unable to mount volumes for pod %q: %v; skipping pod", format.Pod(pod), err) + return err + } + } + + // Fetch the pull secrets for the pod + pullSecrets := kl.getPullSecretsForPod(pod) + + // Call the container runtime's SyncPod callback + result := kl.containerRuntime.SyncPod(pod, apiPodStatus, podStatus, pullSecrets, kl.backOff) + kl.reasonCache.Update(pod.UID, result) + if err := result.Error(); err != nil { + return err + } + + return nil +} + +// Get pods which should be resynchronized. Currently, the following pod should be resynchronized: +// * pod whose work is ready. +// * internal modules that request sync of a pod. +func (kl *Kubelet) getPodsToSync() []*v1.Pod { + allPods := kl.podManager.GetPods() + podUIDs := kl.workQueue.GetWork() + podUIDSet := sets.NewString() + for _, podUID := range podUIDs { + podUIDSet.Insert(string(podUID)) + } + var podsToSync []*v1.Pod + for _, pod := range allPods { + if podUIDSet.Has(string(pod.UID)) { + // The work of the pod is ready + podsToSync = append(podsToSync, pod) + continue + } + for _, podSyncLoopHandler := range kl.PodSyncLoopHandlers { + if podSyncLoopHandler.ShouldSync(pod) { + podsToSync = append(podsToSync, pod) + break + } + } + } + return podsToSync +} + +// deletePod deletes the pod from the internal state of the kubelet by: +// 1. stopping the associated pod worker asynchronously +// 2. signaling to kill the pod by sending on the podKillingCh channel +// +// deletePod returns an error if not all sources are ready or the pod is not +// found in the runtime cache. +func (kl *Kubelet) deletePod(pod *v1.Pod) error { + if pod == nil { + return fmt.Errorf("deletePod does not allow nil pod") + } + if !kl.sourcesReady.AllReady() { + // If the sources aren't ready, skip deletion, as we may accidentally delete pods + // for sources that haven't reported yet. + return fmt.Errorf("skipping delete because sources aren't ready yet") + } + kl.podWorkers.ForgetWorker(pod.UID) + + // Runtime cache may not have been updated to with the pod, but it's okay + // because the periodic cleanup routine will attempt to delete again later. + runningPods, err := kl.runtimeCache.GetPods() + if err != nil { + return fmt.Errorf("error listing containers: %v", err) + } + runningPod := kubecontainer.Pods(runningPods).FindPod("", pod.UID) + if runningPod.IsEmpty() { + return fmt.Errorf("pod not found") + } + podPair := kubecontainer.PodPair{APIPod: pod, RunningPod: &runningPod} + + kl.podKillingCh <- &podPair + // TODO: delete the mirror pod here? + + // We leave the volume/directory cleanup to the periodic cleanup routine. + return nil +} + +// rejectPod records an event about the pod with the given reason and message, +// and updates the pod to the failed phase in the status manage. +func (kl *Kubelet) rejectPod(pod *v1.Pod, reason, message string) { + kl.recorder.Eventf(pod, v1.EventTypeWarning, reason, message) + kl.statusManager.SetPodStatus(pod, v1.PodStatus{ + Phase: v1.PodFailed, + Reason: reason, + Message: "Pod " + message}) +} + +// canAdmitPod determines if a pod can be admitted, and gives a reason if it +// cannot. "pod" is new pod, while "pods" are all admitted pods +// The function returns a boolean value indicating whether the pod +// can be admitted, a brief single-word reason and a message explaining why +// the pod cannot be admitted. +func (kl *Kubelet) canAdmitPod(pods []*v1.Pod, pod *v1.Pod) (bool, string, string) { + // the kubelet will invoke each pod admit handler in sequence + // if any handler rejects, the pod is rejected. + // TODO: move out of disk check into a pod admitter + // TODO: out of resource eviction should have a pod admitter call-out + attrs := &lifecycle.PodAdmitAttributes{Pod: pod, OtherPods: pods} + for _, podAdmitHandler := range kl.admitHandlers { + if result := podAdmitHandler.Admit(attrs); !result.Admit { + return false, result.Reason, result.Message + } + } + + return true, "", "" +} + +func (kl *Kubelet) canRunPod(pod *v1.Pod) lifecycle.PodAdmitResult { + attrs := &lifecycle.PodAdmitAttributes{Pod: pod} + // Get "OtherPods". Rejected pods are failed, so only include admitted pods that are alive. + attrs.OtherPods = kl.filterOutTerminatedPods(kl.podManager.GetPods()) + + for _, handler := range kl.softAdmitHandlers { + if result := handler.Admit(attrs); !result.Admit { + return result + } + } + + // TODO: Refactor as a soft admit handler. + if err := canRunPod(pod); err != nil { + return lifecycle.PodAdmitResult{ + Admit: false, + Reason: "Forbidden", + Message: err.Error(), + } + } + + return lifecycle.PodAdmitResult{Admit: true} +} + +// syncLoop is the main loop for processing changes. It watches for changes from +// three channels (file, apiserver, and http) and creates a union of them. For +// any new change seen, will run a sync against desired state and running state. If +// no changes are seen to the configuration, will synchronize the last known desired +// state every sync-frequency seconds. Never returns. +func (kl *Kubelet) syncLoop(updates <-chan kubetypes.PodUpdate, handler SyncHandler) { + glog.Info("Starting kubelet main sync loop.") + // The resyncTicker wakes up kubelet to checks if there are any pod workers + // that need to be sync'd. A one-second period is sufficient because the + // sync interval is defaulted to 10s. + syncTicker := time.NewTicker(time.Second) + defer syncTicker.Stop() + housekeepingTicker := time.NewTicker(housekeepingPeriod) + defer housekeepingTicker.Stop() + plegCh := kl.pleg.Watch() + for { + if rs := kl.runtimeState.runtimeErrors(); len(rs) != 0 { + glog.Infof("skipping pod synchronization - %v", rs) + time.Sleep(5 * time.Second) + continue + } + + kl.syncLoopMonitor.Store(kl.clock.Now()) + if !kl.syncLoopIteration(updates, handler, syncTicker.C, housekeepingTicker.C, plegCh) { + break + } + kl.syncLoopMonitor.Store(kl.clock.Now()) + } +} + +// syncLoopIteration reads from various channels and dispatches pods to the +// given handler. +// +// Arguments: +// 1. configCh: a channel to read config events from +// 2. handler: the SyncHandler to dispatch pods to +// 3. syncCh: a channel to read periodic sync events from +// 4. houseKeepingCh: a channel to read housekeeping events from +// 5. plegCh: a channel to read PLEG updates from +// +// Events are also read from the kubelet liveness manager's update channel. +// +// The workflow is to read from one of the channels, handle that event, and +// update the timestamp in the sync loop monitor. +// +// Here is an appropriate place to note that despite the syntactical +// similarity to the switch statement, the case statements in a select are +// evaluated in a pseudorandom order if there are multiple channels ready to +// read from when the select is evaluated. In other words, case statements +// are evaluated in random order, and you can not assume that the case +// statements evaluate in order if multiple channels have events. +// +// With that in mind, in truly no particular order, the different channels +// are handled as follows: +// +// * configCh: dispatch the pods for the config change to the appropriate +// handler callback for the event type +// * plegCh: update the runtime cache; sync pod +// * syncCh: sync all pods waiting for sync +// * houseKeepingCh: trigger cleanup of pods +// * liveness manager: sync pods that have failed or in which one or more +// containers have failed liveness checks +func (kl *Kubelet) syncLoopIteration(configCh <-chan kubetypes.PodUpdate, handler SyncHandler, + syncCh <-chan time.Time, housekeepingCh <-chan time.Time, plegCh <-chan *pleg.PodLifecycleEvent) bool { + select { + case u, open := <-configCh: + // Update from a config source; dispatch it to the right handler + // callback. + if !open { + glog.Errorf("Update channel is closed. Exiting the sync loop.") + return false + } + + switch u.Op { + case kubetypes.ADD: + glog.V(2).Infof("SyncLoop (ADD, %q): %q", u.Source, format.Pods(u.Pods)) + // After restarting, kubelet will get all existing pods through + // ADD as if they are new pods. These pods will then go through the + // admission process and *may* be rejected. This can be resolved + // once we have checkpointing. + handler.HandlePodAdditions(u.Pods) + case kubetypes.UPDATE: + glog.V(2).Infof("SyncLoop (UPDATE, %q): %q", u.Source, format.PodsWithDeletiontimestamps(u.Pods)) + handler.HandlePodUpdates(u.Pods) + case kubetypes.REMOVE: + glog.V(2).Infof("SyncLoop (REMOVE, %q): %q", u.Source, format.Pods(u.Pods)) + handler.HandlePodRemoves(u.Pods) + case kubetypes.RECONCILE: + glog.V(4).Infof("SyncLoop (RECONCILE, %q): %q", u.Source, format.Pods(u.Pods)) + handler.HandlePodReconcile(u.Pods) + case kubetypes.DELETE: + glog.V(2).Infof("SyncLoop (DELETE, %q): %q", u.Source, format.Pods(u.Pods)) + // DELETE is treated as a UPDATE because of graceful deletion. + handler.HandlePodUpdates(u.Pods) + case kubetypes.SET: + // TODO: Do we want to support this? + glog.Errorf("Kubelet does not support snapshot update") + } + + // Mark the source ready after receiving at least one update from the + // source. Once all the sources are marked ready, various cleanup + // routines will start reclaiming resources. It is important that this + // takes place only after kubelet calls the update handler to process + // the update to ensure the internal pod cache is up-to-date. + kl.sourcesReady.AddSource(u.Source) + case e := <-plegCh: + if isSyncPodWorthy(e) { + // PLEG event for a pod; sync it. + if pod, ok := kl.podManager.GetPodByUID(e.ID); ok { + glog.V(2).Infof("SyncLoop (PLEG): %q, event: %#v", format.Pod(pod), e) + handler.HandlePodSyncs([]*v1.Pod{pod}) + } else { + // If the pod no longer exists, ignore the event. + glog.V(4).Infof("SyncLoop (PLEG): ignore irrelevant event: %#v", e) + } + } + + if e.Type == pleg.ContainerDied { + if containerID, ok := e.Data.(string); ok { + kl.cleanUpContainersInPod(e.ID, containerID) + } + } + case <-syncCh: + // Sync pods waiting for sync + podsToSync := kl.getPodsToSync() + if len(podsToSync) == 0 { + break + } + glog.V(4).Infof("SyncLoop (SYNC): %d pods; %s", len(podsToSync), format.Pods(podsToSync)) + kl.HandlePodSyncs(podsToSync) + case update := <-kl.livenessManager.Updates(): + if update.Result == proberesults.Failure { + // The liveness manager detected a failure; sync the pod. + + // We should not use the pod from livenessManager, because it is never updated after + // initialization. + pod, ok := kl.podManager.GetPodByUID(update.PodUID) + if !ok { + // If the pod no longer exists, ignore the update. + glog.V(4).Infof("SyncLoop (container unhealthy): ignore irrelevant update: %#v", update) + break + } + glog.V(1).Infof("SyncLoop (container unhealthy): %q", format.Pod(pod)) + handler.HandlePodSyncs([]*v1.Pod{pod}) + } + case <-housekeepingCh: + if !kl.sourcesReady.AllReady() { + // If the sources aren't ready or volume manager has not yet synced the states, + // skip housekeeping, as we may accidentally delete pods from unready sources. + glog.V(4).Infof("SyncLoop (housekeeping, skipped): sources aren't ready yet.") + } else { + glog.V(4).Infof("SyncLoop (housekeeping)") + if err := handler.HandlePodCleanups(); err != nil { + glog.Errorf("Failed cleaning pods: %v", err) + } + } + } + return true +} + +// dispatchWork starts the asynchronous sync of the pod in a pod worker. +// If the pod is terminated, dispatchWork +func (kl *Kubelet) dispatchWork(pod *v1.Pod, syncType kubetypes.SyncPodType, mirrorPod *v1.Pod, start time.Time) { + if kl.podIsTerminated(pod) { + if pod.DeletionTimestamp != nil { + // If the pod is in a terminated state, there is no pod worker to + // handle the work item. Check if the DeletionTimestamp has been + // set, and force a status update to trigger a pod deletion request + // to the apiserver. + kl.statusManager.TerminatePod(pod) + } + return + } + // Run the sync in an async worker. + kl.podWorkers.UpdatePod(&UpdatePodOptions{ + Pod: pod, + MirrorPod: mirrorPod, + UpdateType: syncType, + OnCompleteFunc: func(err error) { + if err != nil { + metrics.PodWorkerLatency.WithLabelValues(syncType.String()).Observe(metrics.SinceInMicroseconds(start)) + } + }, + }) + // Note the number of containers for new pods. + if syncType == kubetypes.SyncPodCreate { + metrics.ContainersPerPodCount.Observe(float64(len(pod.Spec.Containers))) + } +} + +// TODO: handle mirror pods in a separate component (issue #17251) +func (kl *Kubelet) handleMirrorPod(mirrorPod *v1.Pod, start time.Time) { + // Mirror pod ADD/UPDATE/DELETE operations are considered an UPDATE to the + // corresponding static pod. Send update to the pod worker if the static + // pod exists. + if pod, ok := kl.podManager.GetPodByMirrorPod(mirrorPod); ok { + kl.dispatchWork(pod, kubetypes.SyncPodUpdate, mirrorPod, start) + } +} + +// HandlePodAdditions is the callback in SyncHandler for pods being added from +// a config source. +func (kl *Kubelet) HandlePodAdditions(pods []*v1.Pod) { + start := kl.clock.Now() + sort.Sort(sliceutils.PodsByCreationTime(pods)) + for _, pod := range pods { + existingPods := kl.podManager.GetPods() + // Always add the pod to the pod manager. Kubelet relies on the pod + // manager as the source of truth for the desired state. If a pod does + // not exist in the pod manager, it means that it has been deleted in + // the apiserver and no action (other than cleanup) is required. + kl.podManager.AddPod(pod) + + if kubepod.IsMirrorPod(pod) { + kl.handleMirrorPod(pod, start) + continue + } + + if !kl.podIsTerminated(pod) { + // Only go through the admission process if the pod is not + // terminated. + + // We failed pods that we rejected, so activePods include all admitted + // pods that are alive. + activePods := kl.filterOutTerminatedPods(existingPods) + + // Check if we can admit the pod; if not, reject it. + if ok, reason, message := kl.canAdmitPod(activePods, pod); !ok { + kl.rejectPod(pod, reason, message) + continue + } + } + mirrorPod, _ := kl.podManager.GetMirrorPodByPod(pod) + kl.dispatchWork(pod, kubetypes.SyncPodCreate, mirrorPod, start) + kl.probeManager.AddPod(pod) + } +} + +// HandlePodUpdates is the callback in the SyncHandler interface for pods +// being updated from a config source. +func (kl *Kubelet) HandlePodUpdates(pods []*v1.Pod) { + start := kl.clock.Now() + for _, pod := range pods { + kl.podManager.UpdatePod(pod) + if kubepod.IsMirrorPod(pod) { + kl.handleMirrorPod(pod, start) + continue + } + // TODO: Evaluate if we need to validate and reject updates. + + mirrorPod, _ := kl.podManager.GetMirrorPodByPod(pod) + kl.dispatchWork(pod, kubetypes.SyncPodUpdate, mirrorPod, start) + } +} + +// HandlePodRemoves is the callback in the SyncHandler interface for pods +// being removed from a config source. +func (kl *Kubelet) HandlePodRemoves(pods []*v1.Pod) { + start := kl.clock.Now() + for _, pod := range pods { + kl.podManager.DeletePod(pod) + if kubepod.IsMirrorPod(pod) { + kl.handleMirrorPod(pod, start) + continue + } + // Deletion is allowed to fail because the periodic cleanup routine + // will trigger deletion again. + if err := kl.deletePod(pod); err != nil { + glog.V(2).Infof("Failed to delete pod %q, err: %v", format.Pod(pod), err) + } + kl.probeManager.RemovePod(pod) + } +} + +// HandlePodReconcile is the callback in the SyncHandler interface for pods +// that should be reconciled. +func (kl *Kubelet) HandlePodReconcile(pods []*v1.Pod) { + for _, pod := range pods { + // Update the pod in pod manager, status manager will do periodically reconcile according + // to the pod manager. + kl.podManager.UpdatePod(pod) + + // After an evicted pod is synced, all dead containers in the pod can be removed. + if eviction.PodIsEvicted(pod.Status) { + if podStatus, err := kl.podCache.Get(pod.UID); err == nil { + kl.containerDeletor.deleteContainersInPod("", podStatus, true) + } + } + } +} + +// HandlePodSyncs is the callback in the syncHandler interface for pods +// that should be dispatched to pod workers for sync. +func (kl *Kubelet) HandlePodSyncs(pods []*v1.Pod) { + start := kl.clock.Now() + for _, pod := range pods { + mirrorPod, _ := kl.podManager.GetMirrorPodByPod(pod) + kl.dispatchWork(pod, kubetypes.SyncPodSync, mirrorPod, start) + } +} + +// LatestLoopEntryTime returns the last time in the sync loop monitor. +func (kl *Kubelet) LatestLoopEntryTime() time.Time { + val := kl.syncLoopMonitor.Load() + if val == nil { + return time.Time{} + } + return val.(time.Time) +} + +// updateRuntimeUp calls the container runtime status callback, initializing +// the runtime dependent modules when the container runtime first comes up, +// and returns an error if the status check fails. If the status check is OK, +// update the container runtime uptime in the kubelet runtimeState. +func (kl *Kubelet) updateRuntimeUp() { + s, err := kl.containerRuntime.Status() + if err != nil { + glog.Errorf("Container runtime sanity check failed: %v", err) + return + } + // rkt uses the legacy, non-CRI integration. Don't check the runtime + // conditions for it. + if kl.kubeletConfiguration.ContainerRuntime != kubetypes.RktContainerRuntime { + if s == nil { + glog.Errorf("Container runtime status is nil") + return + } + // Periodically log the whole runtime status for debugging. + // TODO(random-liu): Consider to send node event when optional + // condition is unmet. + glog.V(4).Infof("Container runtime status: %v", s) + networkReady := s.GetRuntimeCondition(kubecontainer.NetworkReady) + if networkReady == nil || !networkReady.Status { + glog.Errorf("Container runtime network not ready: %v", networkReady) + kl.runtimeState.setNetworkState(fmt.Errorf("runtime network not ready: %v", networkReady)) + } else { + // Set nil if the container runtime network is ready. + kl.runtimeState.setNetworkState(nil) + } + // TODO(random-liu): Add runtime error in runtimeState, and update it + // when runtime is not ready, so that the information in RuntimeReady + // condition will be propagated to NodeReady condition. + runtimeReady := s.GetRuntimeCondition(kubecontainer.RuntimeReady) + // If RuntimeReady is not set or is false, report an error. + if runtimeReady == nil || !runtimeReady.Status { + glog.Errorf("Container runtime not ready: %v", runtimeReady) + return + } + } + kl.oneTimeInitializer.Do(kl.initializeRuntimeDependentModules) + kl.runtimeState.setRuntimeSync(kl.clock.Now()) +} + +// updateCloudProviderFromMachineInfo updates the node's provider ID field +// from the given cadvisor machine info. +func (kl *Kubelet) updateCloudProviderFromMachineInfo(node *v1.Node, info *cadvisorapi.MachineInfo) { + if info.CloudProvider != cadvisorapi.UnknownProvider && + info.CloudProvider != cadvisorapi.Baremetal { + // The cloud providers from pkg/cloudprovider/providers/* that update ProviderID + // will use the format of cloudprovider://project/availability_zone/instance_name + // here we only have the cloudprovider and the instance name so we leave project + // and availability zone empty for compatibility. + node.Spec.ProviderID = strings.ToLower(string(info.CloudProvider)) + + ":////" + string(info.InstanceID) + } +} + +// GetConfiguration returns the KubeletConfiguration used to configure the kubelet. +func (kl *Kubelet) GetConfiguration() kubeletconfiginternal.KubeletConfiguration { + return kl.kubeletConfiguration +} + +// BirthCry sends an event that the kubelet has started up. +func (kl *Kubelet) BirthCry() { + // Make an event that kubelet restarted. + kl.recorder.Eventf(kl.nodeRef, v1.EventTypeNormal, events.StartingKubelet, "Starting kubelet.") +} + +// StreamingConnectionIdleTimeout returns the timeout for streaming connections to the HTTP server. +func (kl *Kubelet) StreamingConnectionIdleTimeout() time.Duration { + return kl.streamingConnectionIdleTimeout +} + +// ResyncInterval returns the interval used for periodic syncs. +func (kl *Kubelet) ResyncInterval() time.Duration { + return kl.resyncInterval +} + +// ListenAndServe runs the kubelet HTTP server. +func (kl *Kubelet) ListenAndServe(address net.IP, port uint, tlsOptions *server.TLSOptions, auth server.AuthInterface, enableDebuggingHandlers, enableContentionProfiling bool) { + server.ListenAndServeKubeletServer(kl, kl.resourceAnalyzer, address, port, tlsOptions, auth, enableDebuggingHandlers, enableContentionProfiling, kl.containerRuntime, kl.criHandler) +} + +// ListenAndServeReadOnly runs the kubelet HTTP server in read-only mode. +func (kl *Kubelet) ListenAndServeReadOnly(address net.IP, port uint) { + server.ListenAndServeKubeletReadOnlyServer(kl, kl.resourceAnalyzer, address, port, kl.containerRuntime) +} + +// Delete the eligible dead container instances in a pod. Depending on the configuration, the latest dead containers may be kept around. +func (kl *Kubelet) cleanUpContainersInPod(podID types.UID, exitedContainerID string) { + if podStatus, err := kl.podCache.Get(podID); err == nil { + removeAll := false + if syncedPod, ok := kl.podManager.GetPodByUID(podID); ok { + // When an evicted pod has already synced, all containers can be removed. + removeAll = eviction.PodIsEvicted(syncedPod.Status) + } + kl.containerDeletor.deleteContainersInPod(exitedContainerID, podStatus, removeAll) + } +} + +// Replace the nameserver in containerized-mounter's rootfs/etc/resolve.conf with kubelet.ClusterDNS +func (kl *Kubelet) setupDNSinContainerizedMounter(mounterPath string) { + resolvePath := filepath.Join(strings.TrimSuffix(mounterPath, "/mounter"), "rootfs", "etc", "resolv.conf") + dnsString := "" + for _, dns := range kl.clusterDNS { + dnsString = dnsString + fmt.Sprintf("nameserver %s\n", dns) + } + if kl.resolverConfig != "" { + f, err := os.Open(kl.resolverConfig) + defer f.Close() + if err != nil { + glog.Error("Could not open resolverConf file") + } else { + _, hostSearch, err := kl.parseResolvConf(f) + if err != nil { + glog.Errorf("Error for parsing the reslov.conf file: %v", err) + } else { + dnsString = dnsString + "search" + for _, search := range hostSearch { + dnsString = dnsString + fmt.Sprintf(" %s", search) + } + dnsString = dnsString + "\n" + } + } + } + if err := ioutil.WriteFile(resolvePath, []byte(dnsString), 0600); err != nil { + glog.Errorf("Could not write dns nameserver in file %s, with error %v", resolvePath, err) + } +} + +// isSyncPodWorthy filters out events that are not worthy of pod syncing +func isSyncPodWorthy(event *pleg.PodLifecycleEvent) bool { + // ContatnerRemoved doesn't affect pod state + return event.Type != pleg.ContainerRemoved +} + +// Gets the streaming server configuration to use with in-process CRI shims. +func getStreamingConfig(kubeCfg *kubeletconfiginternal.KubeletConfiguration, kubeDeps *Dependencies) *streaming.Config { + config := &streaming.Config{ + // Use a relative redirect (no scheme or host). + BaseURL: &url.URL{ + Path: "/cri/", + }, + StreamIdleTimeout: kubeCfg.StreamingConnectionIdleTimeout.Duration, + StreamCreationTimeout: streaming.DefaultConfig.StreamCreationTimeout, + SupportedRemoteCommandProtocols: streaming.DefaultConfig.SupportedRemoteCommandProtocols, + SupportedPortForwardProtocols: streaming.DefaultConfig.SupportedPortForwardProtocols, + } + if kubeDeps.TLSOptions != nil { + config.TLSConfig = kubeDeps.TLSOptions.Config + } + return config +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_getters.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_getters.go new file mode 100644 index 000000000..773722950 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_getters.go @@ -0,0 +1,260 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "fmt" + "io/ioutil" + "net" + "path/filepath" + + "github.com/golang/glog" + cadvisorapiv1 "github.com/google/cadvisor/info/v1" + + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/kubernetes/cmd/kubelet/app/options" + "k8s.io/kubernetes/pkg/kubelet/cm" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + utilfile "k8s.io/kubernetes/pkg/util/file" + utilnode "k8s.io/kubernetes/pkg/util/node" + volumeutil "k8s.io/kubernetes/pkg/volume/util" +) + +// getRootDir returns the full path to the directory under which kubelet can +// store data. These functions are useful to pass interfaces to other modules +// that may need to know where to write data without getting a whole kubelet +// instance. +func (kl *Kubelet) getRootDir() string { + return kl.rootDirectory +} + +// getPodsDir returns the full path to the directory under which pod +// directories are created. +func (kl *Kubelet) getPodsDir() string { + return filepath.Join(kl.getRootDir(), options.DefaultKubeletPodsDirName) +} + +// getPluginsDir returns the full path to the directory under which plugin +// directories are created. Plugins can use these directories for data that +// they need to persist. Plugins should create subdirectories under this named +// after their own names. +func (kl *Kubelet) getPluginsDir() string { + return filepath.Join(kl.getRootDir(), options.DefaultKubeletPluginsDirName) +} + +// getPluginDir returns a data directory name for a given plugin name. +// Plugins can use these directories to store data that they need to persist. +// For per-pod plugin data, see getPodPluginDir. +func (kl *Kubelet) getPluginDir(pluginName string) string { + return filepath.Join(kl.getPluginsDir(), pluginName) +} + +// GetPodDir returns the full path to the per-pod data directory for the +// specified pod. This directory may not exist if the pod does not exist. +func (kl *Kubelet) GetPodDir(podUID types.UID) string { + return kl.getPodDir(podUID) +} + +// getPodDir returns the full path to the per-pod directory for the pod with +// the given UID. +func (kl *Kubelet) getPodDir(podUID types.UID) string { + return filepath.Join(kl.getPodsDir(), string(podUID)) +} + +// getPodVolumesDir returns the full path to the per-pod data directory under +// which volumes are created for the specified pod. This directory may not +// exist if the pod does not exist. +func (kl *Kubelet) getPodVolumesDir(podUID types.UID) string { + return filepath.Join(kl.getPodDir(podUID), options.DefaultKubeletVolumesDirName) +} + +// getPodVolumeDir returns the full path to the directory which represents the +// named volume under the named plugin for specified pod. This directory may not +// exist if the pod does not exist. +func (kl *Kubelet) getPodVolumeDir(podUID types.UID, pluginName string, volumeName string) string { + return filepath.Join(kl.getPodVolumesDir(podUID), pluginName, volumeName) +} + +// getPodPluginsDir returns the full path to the per-pod data directory under +// which plugins may store data for the specified pod. This directory may not +// exist if the pod does not exist. +func (kl *Kubelet) getPodPluginsDir(podUID types.UID) string { + return filepath.Join(kl.getPodDir(podUID), options.DefaultKubeletPluginsDirName) +} + +// getPodPluginDir returns a data directory name for a given plugin name for a +// given pod UID. Plugins can use these directories to store data that they +// need to persist. For non-per-pod plugin data, see getPluginDir. +func (kl *Kubelet) getPodPluginDir(podUID types.UID, pluginName string) string { + return filepath.Join(kl.getPodPluginsDir(podUID), pluginName) +} + +// getPodContainerDir returns the full path to the per-pod data directory under +// which container data is held for the specified pod. This directory may not +// exist if the pod or container does not exist. +func (kl *Kubelet) getPodContainerDir(podUID types.UID, ctrName string) string { + return filepath.Join(kl.getPodDir(podUID), options.DefaultKubeletContainersDirName, ctrName) +} + +// GetPods returns all pods bound to the kubelet and their spec, and the mirror +// pods. +func (kl *Kubelet) GetPods() []*v1.Pod { + return kl.podManager.GetPods() +} + +// GetRunningPods returns all pods running on kubelet from looking at the +// container runtime cache. This function converts kubecontainer.Pod to +// v1.Pod, so only the fields that exist in both kubecontainer.Pod and +// v1.Pod are considered meaningful. +func (kl *Kubelet) GetRunningPods() ([]*v1.Pod, error) { + pods, err := kl.runtimeCache.GetPods() + if err != nil { + return nil, err + } + + apiPods := make([]*v1.Pod, 0, len(pods)) + for _, pod := range pods { + apiPods = append(apiPods, pod.ToAPIPod()) + } + return apiPods, nil +} + +// GetPodByFullName gets the pod with the given 'full' name, which +// incorporates the namespace as well as whether the pod was found. +func (kl *Kubelet) GetPodByFullName(podFullName string) (*v1.Pod, bool) { + return kl.podManager.GetPodByFullName(podFullName) +} + +// GetPodByName provides the first pod that matches namespace and name, as well +// as whether the pod was found. +func (kl *Kubelet) GetPodByName(namespace, name string) (*v1.Pod, bool) { + return kl.podManager.GetPodByName(namespace, name) +} + +// GetHostname Returns the hostname as the kubelet sees it. +func (kl *Kubelet) GetHostname() string { + return kl.hostname +} + +// GetRuntime returns the current Runtime implementation in use by the kubelet. This func +// is exported to simplify integration with third party kubelet extensions (e.g. kubernetes-mesos). +func (kl *Kubelet) GetRuntime() kubecontainer.Runtime { + return kl.containerRuntime +} + +// GetNode returns the node info for the configured node name of this Kubelet. +func (kl *Kubelet) GetNode() (*v1.Node, error) { + if kl.kubeClient == nil { + return kl.initialNode() + } + return kl.nodeInfo.GetNodeInfo(string(kl.nodeName)) +} + +// getNodeAnyWay() must return a *v1.Node which is required by RunGeneralPredicates(). +// The *v1.Node is obtained as follows: +// Return kubelet's nodeInfo for this node, except on error or if in standalone mode, +// in which case return a manufactured nodeInfo representing a node with no pods, +// zero capacity, and the default labels. +func (kl *Kubelet) getNodeAnyWay() (*v1.Node, error) { + if kl.kubeClient != nil { + if n, err := kl.nodeInfo.GetNodeInfo(string(kl.nodeName)); err == nil { + return n, nil + } + } + return kl.initialNode() +} + +// GetNodeConfig returns the container manager node config. +func (kl *Kubelet) GetNodeConfig() cm.NodeConfig { + return kl.containerManager.GetNodeConfig() +} + +// GetHostIP returns host IP or nil in case of error. +func (kl *Kubelet) GetHostIP() (net.IP, error) { + node, err := kl.GetNode() + if err != nil { + return nil, fmt.Errorf("cannot get node: %v", err) + } + return utilnode.GetNodeHostIP(node) +} + +// getHostIPAnyway attempts to return the host IP from kubelet's nodeInfo, or +// the initialNode. +func (kl *Kubelet) getHostIPAnyWay() (net.IP, error) { + node, err := kl.getNodeAnyWay() + if err != nil { + return nil, err + } + return utilnode.GetNodeHostIP(node) +} + +// GetExtraSupplementalGroupsForPod returns a list of the extra +// supplemental groups for the Pod. These extra supplemental groups come +// from annotations on persistent volumes that the pod depends on. +func (kl *Kubelet) GetExtraSupplementalGroupsForPod(pod *v1.Pod) []int64 { + return kl.volumeManager.GetExtraSupplementalGroupsForPod(pod) +} + +// getPodVolumePathListFromDisk returns a list of the volume paths by reading the +// volume directories for the given pod from the disk. +func (kl *Kubelet) getPodVolumePathListFromDisk(podUID types.UID) ([]string, error) { + volumes := []string{} + podVolDir := kl.getPodVolumesDir(podUID) + + if pathExists, pathErr := volumeutil.PathExists(podVolDir); pathErr != nil { + return volumes, fmt.Errorf("Error checking if path %q exists: %v", podVolDir, pathErr) + } else if !pathExists { + glog.Warningf("Warning: path %q does not exist: %q", podVolDir) + return volumes, nil + } + + volumePluginDirs, err := ioutil.ReadDir(podVolDir) + if err != nil { + glog.Errorf("Could not read directory %s: %v", podVolDir, err) + return volumes, err + } + for _, volumePluginDir := range volumePluginDirs { + volumePluginName := volumePluginDir.Name() + volumePluginPath := filepath.Join(podVolDir, volumePluginName) + volumeDirs, err := utilfile.ReadDirNoStat(volumePluginPath) + if err != nil { + return volumes, fmt.Errorf("Could not read directory %s: %v", volumePluginPath, err) + } + for _, volumeDir := range volumeDirs { + volumes = append(volumes, filepath.Join(volumePluginPath, volumeDir)) + } + } + return volumes, nil +} + +// GetVersionInfo returns information about the version of cAdvisor in use. +func (kl *Kubelet) GetVersionInfo() (*cadvisorapiv1.VersionInfo, error) { + return kl.cadvisor.VersionInfo() +} + +// GetCachedMachineInfo assumes that the machine info can't change without a reboot +func (kl *Kubelet) GetCachedMachineInfo() (*cadvisorapiv1.MachineInfo, error) { + if kl.machineInfo == nil { + info, err := kl.cadvisor.MachineInfo() + if err != nil { + return nil, err + } + kl.machineInfo = info + } + return kl.machineInfo, nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_getters_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_getters_test.go new file mode 100644 index 000000000..8eb04e36a --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_getters_test.go @@ -0,0 +1,69 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "path/filepath" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestKubeletDirs(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + root := kubelet.rootDirectory + + var exp, got string + + got = kubelet.getPodsDir() + exp = filepath.Join(root, "pods") + assert.Equal(t, exp, got) + + got = kubelet.getPluginsDir() + exp = filepath.Join(root, "plugins") + assert.Equal(t, exp, got) + + got = kubelet.getPluginDir("foobar") + exp = filepath.Join(root, "plugins/foobar") + assert.Equal(t, exp, got) + + got = kubelet.getPodDir("abc123") + exp = filepath.Join(root, "pods/abc123") + assert.Equal(t, exp, got) + + got = kubelet.getPodVolumesDir("abc123") + exp = filepath.Join(root, "pods/abc123/volumes") + assert.Equal(t, exp, got) + + got = kubelet.getPodVolumeDir("abc123", "plugin", "foobar") + exp = filepath.Join(root, "pods/abc123/volumes/plugin/foobar") + assert.Equal(t, exp, got) + + got = kubelet.getPodPluginsDir("abc123") + exp = filepath.Join(root, "pods/abc123/plugins") + assert.Equal(t, exp, got) + + got = kubelet.getPodPluginDir("abc123", "foobar") + exp = filepath.Join(root, "pods/abc123/plugins/foobar") + assert.Equal(t, exp, got) + + got = kubelet.getPodContainerDir("abc123", "def456") + exp = filepath.Join(root, "pods/abc123/containers/def456") + assert.Equal(t, exp, got) +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network.go new file mode 100644 index 000000000..e8f0edab7 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network.go @@ -0,0 +1,363 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "fmt" + "io" + "io/ioutil" + "os" + "strings" + + "github.com/golang/glog" + "k8s.io/api/core/v1" + "k8s.io/kubernetes/pkg/kubelet/apis/kubeletconfig" + "k8s.io/kubernetes/pkg/kubelet/network" + kubetypes "k8s.io/kubernetes/pkg/kubelet/types" + utiliptables "k8s.io/kubernetes/pkg/util/iptables" +) + +const ( + // KubeMarkMasqChain is the mark-for-masquerade chain + // TODO: clean up this logic in kube-proxy + KubeMarkMasqChain utiliptables.Chain = "KUBE-MARK-MASQ" + + // KubeMarkDropChain is the mark-for-drop chain + KubeMarkDropChain utiliptables.Chain = "KUBE-MARK-DROP" + + // KubePostroutingChain is kubernetes postrouting rules + KubePostroutingChain utiliptables.Chain = "KUBE-POSTROUTING" + + // KubeFirewallChain is kubernetes firewall rules + KubeFirewallChain utiliptables.Chain = "KUBE-FIREWALL" +) + +// effectiveHairpinMode determines the effective hairpin mode given the +// configured mode, container runtime, and whether cbr0 should be configured. +func effectiveHairpinMode(hairpinMode kubeletconfig.HairpinMode, containerRuntime string, networkPlugin string) (kubeletconfig.HairpinMode, error) { + // The hairpin mode setting doesn't matter if: + // - We're not using a bridge network. This is hard to check because we might + // be using a plugin. + // - It's set to hairpin-veth for a container runtime that doesn't know how + // to set the hairpin flag on the veth's of containers. Currently the + // docker runtime is the only one that understands this. + // - It's set to "none". + if hairpinMode == kubeletconfig.PromiscuousBridge || hairpinMode == kubeletconfig.HairpinVeth { + // Only on docker. + if containerRuntime != kubetypes.DockerContainerRuntime { + glog.Warningf("Hairpin mode set to %q but container runtime is %q, ignoring", hairpinMode, containerRuntime) + return kubeletconfig.HairpinNone, nil + } + if hairpinMode == kubeletconfig.PromiscuousBridge && networkPlugin != "kubenet" { + // This is not a valid combination, since promiscuous-bridge only works on kubenet. Users might be using the + // default values (from before the hairpin-mode flag existed) and we + // should keep the old behavior. + glog.Warningf("Hairpin mode set to %q but kubenet is not enabled, falling back to %q", hairpinMode, kubeletconfig.HairpinVeth) + return kubeletconfig.HairpinVeth, nil + } + } else if hairpinMode != kubeletconfig.HairpinNone { + return "", fmt.Errorf("unknown value: %q", hairpinMode) + } + return hairpinMode, nil +} + +// providerRequiresNetworkingConfiguration returns whether the cloud provider +// requires special networking configuration. +func (kl *Kubelet) providerRequiresNetworkingConfiguration() bool { + // TODO: We should have a mechanism to say whether native cloud provider + // is used or whether we are using overlay networking. We should return + // true for cloud providers if they implement Routes() interface and + // we are not using overlay networking. + if kl.cloud == nil || kl.cloud.ProviderName() != "gce" { + return false + } + _, supported := kl.cloud.Routes() + return supported +} + +func omitDuplicates(kl *Kubelet, pod *v1.Pod, combinedSearch []string) []string { + uniqueDomains := map[string]bool{} + + for _, dnsDomain := range combinedSearch { + if _, exists := uniqueDomains[dnsDomain]; !exists { + combinedSearch[len(uniqueDomains)] = dnsDomain + uniqueDomains[dnsDomain] = true + } + } + return combinedSearch[:len(uniqueDomains)] +} + +func formDNSSearchFitsLimits(kl *Kubelet, pod *v1.Pod, composedSearch []string) []string { + // resolver file Search line current limitations + resolvSearchLineDNSDomainsLimit := 6 + resolvSearchLineLenLimit := 255 + limitsExceeded := false + + if len(composedSearch) > resolvSearchLineDNSDomainsLimit { + composedSearch = composedSearch[:resolvSearchLineDNSDomainsLimit] + limitsExceeded = true + } + + if resolvSearchhLineStrLen := len(strings.Join(composedSearch, " ")); resolvSearchhLineStrLen > resolvSearchLineLenLimit { + cutDomainsNum := 0 + cutDoaminsLen := 0 + for i := len(composedSearch) - 1; i >= 0; i-- { + cutDoaminsLen += len(composedSearch[i]) + 1 + cutDomainsNum++ + + if (resolvSearchhLineStrLen - cutDoaminsLen) <= resolvSearchLineLenLimit { + break + } + } + + composedSearch = composedSearch[:(len(composedSearch) - cutDomainsNum)] + limitsExceeded = true + } + + if limitsExceeded { + log := fmt.Sprintf("Search Line limits were exceeded, some dns names have been omitted, the applied search line is: %s", strings.Join(composedSearch, " ")) + kl.recorder.Event(pod, v1.EventTypeWarning, "DNSSearchForming", log) + glog.Error(log) + } + return composedSearch +} + +func (kl *Kubelet) formDNSSearchForDNSDefault(hostSearch []string, pod *v1.Pod) []string { + return formDNSSearchFitsLimits(kl, pod, hostSearch) +} + +func (kl *Kubelet) formDNSSearch(hostSearch []string, pod *v1.Pod) []string { + if kl.clusterDomain == "" { + formDNSSearchFitsLimits(kl, pod, hostSearch) + return hostSearch + } + + nsSvcDomain := fmt.Sprintf("%s.svc.%s", pod.Namespace, kl.clusterDomain) + svcDomain := fmt.Sprintf("svc.%s", kl.clusterDomain) + dnsSearch := []string{nsSvcDomain, svcDomain, kl.clusterDomain} + + combinedSearch := append(dnsSearch, hostSearch...) + + combinedSearch = omitDuplicates(kl, pod, combinedSearch) + return formDNSSearchFitsLimits(kl, pod, combinedSearch) +} + +func (kl *Kubelet) checkLimitsForResolvConf() { + // resolver file Search line current limitations + resolvSearchLineDNSDomainsLimit := 6 + resolvSearchLineLenLimit := 255 + + f, err := os.Open(kl.resolverConfig) + if err != nil { + kl.recorder.Event(kl.nodeRef, v1.EventTypeWarning, "checkLimitsForResolvConf", err.Error()) + glog.Error("checkLimitsForResolvConf: " + err.Error()) + return + } + defer f.Close() + + _, hostSearch, err := kl.parseResolvConf(f) + if err != nil { + kl.recorder.Event(kl.nodeRef, v1.EventTypeWarning, "checkLimitsForResolvConf", err.Error()) + glog.Error("checkLimitsForResolvConf: " + err.Error()) + return + } + + domainCntLimit := resolvSearchLineDNSDomainsLimit + + if kl.clusterDomain != "" { + domainCntLimit -= 3 + } + + if len(hostSearch) > domainCntLimit { + log := fmt.Sprintf("Resolv.conf file '%s' contains search line consisting of more than %d domains!", kl.resolverConfig, domainCntLimit) + kl.recorder.Event(kl.nodeRef, v1.EventTypeWarning, "checkLimitsForResolvConf", log) + glog.Error("checkLimitsForResolvConf: " + log) + return + } + + if len(strings.Join(hostSearch, " ")) > resolvSearchLineLenLimit { + log := fmt.Sprintf("Resolv.conf file '%s' contains search line which length is more than allowed %d chars!", kl.resolverConfig, resolvSearchLineLenLimit) + kl.recorder.Event(kl.nodeRef, v1.EventTypeWarning, "checkLimitsForResolvConf", log) + glog.Error("checkLimitsForResolvConf: " + log) + return + } + + return +} + +// parseResolveConf reads a resolv.conf file from the given reader, and parses +// it into nameservers and searches, possibly returning an error. +// TODO: move to utility package +func (kl *Kubelet) parseResolvConf(reader io.Reader) (nameservers []string, searches []string, err error) { + file, err := ioutil.ReadAll(reader) + if err != nil { + return nil, nil, err + } + + // Lines of the form "nameserver 1.2.3.4" accumulate. + nameservers = []string{} + + // Lines of the form "search example.com" overrule - last one wins. + searches = []string{} + + lines := strings.Split(string(file), "\n") + for l := range lines { + trimmed := strings.TrimSpace(lines[l]) + if strings.HasPrefix(trimmed, "#") { + continue + } + fields := strings.Fields(trimmed) + if len(fields) == 0 { + continue + } + if fields[0] == "nameserver" && len(fields) >= 2 { + nameservers = append(nameservers, fields[1]) + } + if fields[0] == "search" { + searches = fields[1:] + } + } + + // There used to be code here to scrub DNS for each cloud, but doesn't + // make sense anymore since cloudproviders are being factored out. + // contact @thockin or @wlan0 for more information + + return nameservers, searches, nil +} + +// syncNetworkStatus updates the network state +func (kl *Kubelet) syncNetworkStatus() { + // For cri integration, network state will be updated in updateRuntimeUp, + // we'll get runtime network status through cri directly. + // TODO: Remove this once we completely switch to cri integration. + if kl.networkPlugin != nil { + kl.runtimeState.setNetworkState(kl.networkPlugin.Status()) + } +} + +// updatePodCIDR updates the pod CIDR in the runtime state if it is different +// from the current CIDR. +func (kl *Kubelet) updatePodCIDR(cidr string) { + podCIDR := kl.runtimeState.podCIDR() + + if podCIDR == cidr { + return + } + + // kubelet -> network plugin + // cri runtime shims are responsible for their own network plugins + if kl.networkPlugin != nil { + details := make(map[string]interface{}) + details[network.NET_PLUGIN_EVENT_POD_CIDR_CHANGE_DETAIL_CIDR] = cidr + kl.networkPlugin.Event(network.NET_PLUGIN_EVENT_POD_CIDR_CHANGE, details) + } + + // kubelet -> generic runtime -> runtime shim -> network plugin + // docker/rkt non-cri implementations have a passthrough UpdatePodCIDR + if err := kl.GetRuntime().UpdatePodCIDR(cidr); err != nil { + glog.Errorf("Failed to update pod CIDR: %v", err) + return + } + + glog.Infof("Setting Pod CIDR: %v -> %v", podCIDR, cidr) + kl.runtimeState.setPodCIDR(cidr) +} + +// syncNetworkUtil ensures the network utility are present on host. +// Network util includes: +// 1. In nat table, KUBE-MARK-DROP rule to mark connections for dropping +// Marked connection will be drop on INPUT/OUTPUT Chain in filter table +// 2. In nat table, KUBE-MARK-MASQ rule to mark connections for SNAT +// Marked connection will get SNAT on POSTROUTING Chain in nat table +func (kl *Kubelet) syncNetworkUtil() { + if kl.iptablesMasqueradeBit < 0 || kl.iptablesMasqueradeBit > 31 { + glog.Errorf("invalid iptables-masquerade-bit %v not in [0, 31]", kl.iptablesMasqueradeBit) + return + } + + if kl.iptablesDropBit < 0 || kl.iptablesDropBit > 31 { + glog.Errorf("invalid iptables-drop-bit %v not in [0, 31]", kl.iptablesDropBit) + return + } + + if kl.iptablesDropBit == kl.iptablesMasqueradeBit { + glog.Errorf("iptables-masquerade-bit %v and iptables-drop-bit %v must be different", kl.iptablesMasqueradeBit, kl.iptablesDropBit) + return + } + + // Setup KUBE-MARK-DROP rules + dropMark := getIPTablesMark(kl.iptablesDropBit) + if _, err := kl.iptClient.EnsureChain(utiliptables.TableNAT, KubeMarkDropChain); err != nil { + glog.Errorf("Failed to ensure that %s chain %s exists: %v", utiliptables.TableNAT, KubeMarkDropChain, err) + return + } + if _, err := kl.iptClient.EnsureRule(utiliptables.Append, utiliptables.TableNAT, KubeMarkDropChain, "-j", "MARK", "--set-xmark", dropMark); err != nil { + glog.Errorf("Failed to ensure marking rule for %v: %v", KubeMarkDropChain, err) + return + } + if _, err := kl.iptClient.EnsureChain(utiliptables.TableFilter, KubeFirewallChain); err != nil { + glog.Errorf("Failed to ensure that %s chain %s exists: %v", utiliptables.TableFilter, KubeFirewallChain, err) + return + } + if _, err := kl.iptClient.EnsureRule(utiliptables.Append, utiliptables.TableFilter, KubeFirewallChain, + "-m", "comment", "--comment", "kubernetes firewall for dropping marked packets", + "-m", "mark", "--mark", dropMark, + "-j", "DROP"); err != nil { + glog.Errorf("Failed to ensure rule to drop packet marked by %v in %v chain %v: %v", KubeMarkDropChain, utiliptables.TableFilter, KubeFirewallChain, err) + return + } + if _, err := kl.iptClient.EnsureRule(utiliptables.Prepend, utiliptables.TableFilter, utiliptables.ChainOutput, "-j", string(KubeFirewallChain)); err != nil { + glog.Errorf("Failed to ensure that %s chain %s jumps to %s: %v", utiliptables.TableFilter, utiliptables.ChainOutput, KubeFirewallChain, err) + return + } + if _, err := kl.iptClient.EnsureRule(utiliptables.Prepend, utiliptables.TableFilter, utiliptables.ChainInput, "-j", string(KubeFirewallChain)); err != nil { + glog.Errorf("Failed to ensure that %s chain %s jumps to %s: %v", utiliptables.TableFilter, utiliptables.ChainInput, KubeFirewallChain, err) + return + } + + // Setup KUBE-MARK-MASQ rules + masqueradeMark := getIPTablesMark(kl.iptablesMasqueradeBit) + if _, err := kl.iptClient.EnsureChain(utiliptables.TableNAT, KubeMarkMasqChain); err != nil { + glog.Errorf("Failed to ensure that %s chain %s exists: %v", utiliptables.TableNAT, KubeMarkMasqChain, err) + return + } + if _, err := kl.iptClient.EnsureChain(utiliptables.TableNAT, KubePostroutingChain); err != nil { + glog.Errorf("Failed to ensure that %s chain %s exists: %v", utiliptables.TableNAT, KubePostroutingChain, err) + return + } + if _, err := kl.iptClient.EnsureRule(utiliptables.Append, utiliptables.TableNAT, KubeMarkMasqChain, "-j", "MARK", "--set-xmark", masqueradeMark); err != nil { + glog.Errorf("Failed to ensure marking rule for %v: %v", KubeMarkMasqChain, err) + return + } + if _, err := kl.iptClient.EnsureRule(utiliptables.Prepend, utiliptables.TableNAT, utiliptables.ChainPostrouting, + "-m", "comment", "--comment", "kubernetes postrouting rules", "-j", string(KubePostroutingChain)); err != nil { + glog.Errorf("Failed to ensure that %s chain %s jumps to %s: %v", utiliptables.TableNAT, utiliptables.ChainPostrouting, KubePostroutingChain, err) + return + } + if _, err := kl.iptClient.EnsureRule(utiliptables.Append, utiliptables.TableNAT, KubePostroutingChain, + "-m", "comment", "--comment", "kubernetes service traffic requiring SNAT", + "-m", "mark", "--mark", masqueradeMark, "-j", "MASQUERADE"); err != nil { + glog.Errorf("Failed to ensure SNAT rule for packets marked by %v in %v chain %v: %v", KubeMarkMasqChain, utiliptables.TableNAT, KubePostroutingChain, err) + return + } +} + +// getIPTablesMark returns the fwmark given the bit +func getIPTablesMark(bit int) string { + value := 1 << uint(bit) + return fmt.Sprintf("%#08x/%#08x", value, value) +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network_test.go new file mode 100644 index 000000000..227a139e8 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network_test.go @@ -0,0 +1,199 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "fmt" + "net" + "strings" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "k8s.io/api/core/v1" + "k8s.io/client-go/tools/record" +) + +func TestNodeIPParam(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + tests := []struct { + nodeIP string + success bool + testName string + }{ + { + nodeIP: "", + success: true, + testName: "IP not set", + }, + { + nodeIP: "127.0.0.1", + success: false, + testName: "loopback address", + }, + { + nodeIP: "FE80::0202:B3FF:FE1E:8329", + success: false, + testName: "IPv6 address", + }, + { + nodeIP: "1.2.3.4", + success: false, + testName: "IPv4 address that doesn't belong to host", + }, + } + for _, test := range tests { + kubelet.nodeIP = net.ParseIP(test.nodeIP) + err := kubelet.validateNodeIP() + if test.success { + assert.NoError(t, err, "test %s", test.testName) + } else { + assert.Error(t, err, fmt.Sprintf("test %s", test.testName)) + } + } +} + +func TestParseResolvConf(t *testing.T) { + testCases := []struct { + data string + nameservers []string + searches []string + }{ + {"", []string{}, []string{}}, + {" ", []string{}, []string{}}, + {"\n", []string{}, []string{}}, + {"\t\n\t", []string{}, []string{}}, + {"#comment\n", []string{}, []string{}}, + {" #comment\n", []string{}, []string{}}, + {"#comment\n#comment", []string{}, []string{}}, + {"#comment\nnameserver", []string{}, []string{}}, + {"#comment\nnameserver\nsearch", []string{}, []string{}}, + {"nameserver 1.2.3.4", []string{"1.2.3.4"}, []string{}}, + {" nameserver 1.2.3.4", []string{"1.2.3.4"}, []string{}}, + {"\tnameserver 1.2.3.4", []string{"1.2.3.4"}, []string{}}, + {"nameserver\t1.2.3.4", []string{"1.2.3.4"}, []string{}}, + {"nameserver \t 1.2.3.4", []string{"1.2.3.4"}, []string{}}, + {"nameserver 1.2.3.4\nnameserver 5.6.7.8", []string{"1.2.3.4", "5.6.7.8"}, []string{}}, + {"nameserver 1.2.3.4 #comment", []string{"1.2.3.4"}, []string{}}, + {"search foo", []string{}, []string{"foo"}}, + {"search foo bar", []string{}, []string{"foo", "bar"}}, + {"search foo bar bat\n", []string{}, []string{"foo", "bar", "bat"}}, + {"search foo\nsearch bar", []string{}, []string{"bar"}}, + {"nameserver 1.2.3.4\nsearch foo bar", []string{"1.2.3.4"}, []string{"foo", "bar"}}, + {"nameserver 1.2.3.4\nsearch foo\nnameserver 5.6.7.8\nsearch bar", []string{"1.2.3.4", "5.6.7.8"}, []string{"bar"}}, + {"#comment\nnameserver 1.2.3.4\n#comment\nsearch foo\ncomment", []string{"1.2.3.4"}, []string{"foo"}}, + } + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + for i, tc := range testCases { + ns, srch, err := kubelet.parseResolvConf(strings.NewReader(tc.data)) + require.NoError(t, err) + assert.EqualValues(t, tc.nameservers, ns, "test case [%d]: name servers", i) + assert.EqualValues(t, tc.searches, srch, "test case [%d] searches", i) + } +} + +func TestComposeDNSSearch(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + + recorder := record.NewFakeRecorder(20) + kubelet.recorder = recorder + + pod := podWithUIDNameNs("", "test_pod", "testNS") + kubelet.clusterDomain = "TEST" + + testCases := []struct { + dnsNames []string + hostNames []string + resultSearch []string + events []string + }{ + { + []string{"testNS.svc.TEST", "svc.TEST", "TEST"}, + []string{}, + []string{"testNS.svc.TEST", "svc.TEST", "TEST"}, + []string{}, + }, + + { + []string{"testNS.svc.TEST", "svc.TEST", "TEST"}, + []string{"AAA", "svc.TEST", "BBB", "TEST"}, + []string{"testNS.svc.TEST", "svc.TEST", "TEST", "AAA", "BBB"}, + []string{}, + }, + + { + []string{"testNS.svc.TEST", "svc.TEST", "TEST"}, + []string{"AAA", strings.Repeat("B", 256), "BBB"}, + []string{"testNS.svc.TEST", "svc.TEST", "TEST", "AAA"}, + []string{"Search Line limits were exceeded, some dns names have been omitted, the applied search line is: testNS.svc.TEST svc.TEST TEST AAA"}, + }, + + { + []string{"testNS.svc.TEST", "svc.TEST", "TEST"}, + []string{"AAA", "TEST", "BBB", "TEST", "CCC", "DDD"}, + []string{"testNS.svc.TEST", "svc.TEST", "TEST", "AAA", "BBB", "CCC"}, + []string{ + "Search Line limits were exceeded, some dns names have been omitted, the applied search line is: testNS.svc.TEST svc.TEST TEST AAA BBB CCC", + }, + }, + } + + fetchEvent := func(recorder *record.FakeRecorder) string { + select { + case event := <-recorder.Events: + return event + default: + return "No more events!" + } + } + + for i, tc := range testCases { + dnsSearch := kubelet.formDNSSearch(tc.hostNames, pod) + assert.EqualValues(t, tc.resultSearch, dnsSearch, "test [%d]", i) + for _, expectedEvent := range tc.events { + expected := fmt.Sprintf("%s %s %s", v1.EventTypeWarning, "DNSSearchForming", expectedEvent) + event := fetchEvent(recorder) + assert.Equal(t, expected, event, "test [%d]", i) + } + } +} + +func TestGetIPTablesMark(t *testing.T) { + tests := []struct { + bit int + expect string + }{ + { + 14, + "0x00004000/0x00004000", + }, + { + 15, + "0x00008000/0x00008000", + }, + } + for _, tc := range tests { + res := getIPTablesMark(tc.bit) + assert.Equal(t, tc.expect, res, "input %d", tc.bit) + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status.go new file mode 100644 index 000000000..f0e219a87 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status.go @@ -0,0 +1,1036 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "fmt" + "math" + "net" + goruntime "runtime" + "sort" + "strings" + "time" + + "github.com/golang/glog" + "k8s.io/api/core/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/types" + utilnet "k8s.io/apimachinery/pkg/util/net" + utilfeature "k8s.io/apiserver/pkg/util/feature" + k8s_api_v1 "k8s.io/kubernetes/pkg/api/v1" + v1helper "k8s.io/kubernetes/pkg/api/v1/helper" + "k8s.io/kubernetes/pkg/cloudprovider" + "k8s.io/kubernetes/pkg/features" + kubeletapis "k8s.io/kubernetes/pkg/kubelet/apis" + "k8s.io/kubernetes/pkg/kubelet/cadvisor" + "k8s.io/kubernetes/pkg/kubelet/events" + "k8s.io/kubernetes/pkg/kubelet/util" + "k8s.io/kubernetes/pkg/kubelet/util/sliceutils" + nodeutil "k8s.io/kubernetes/pkg/util/node" + "k8s.io/kubernetes/pkg/version" + "k8s.io/kubernetes/pkg/volume/util/volumehelper" + "k8s.io/kubernetes/plugin/pkg/scheduler/algorithm" +) + +const ( + // maxImagesInNodeStatus is the number of max images we store in image status. + maxImagesInNodeStatus = 50 + + // maxNamesPerImageInNodeStatus is max number of names per image stored in + // the node status. + maxNamesPerImageInNodeStatus = 5 +) + +// registerWithAPIServer registers the node with the cluster master. It is safe +// to call multiple times, but not concurrently (kl.registrationCompleted is +// not locked). +func (kl *Kubelet) registerWithAPIServer() { + if kl.registrationCompleted { + return + } + step := 100 * time.Millisecond + + for { + time.Sleep(step) + step = step * 2 + if step >= 7*time.Second { + step = 7 * time.Second + } + + node, err := kl.initialNode() + if err != nil { + glog.Errorf("Unable to construct v1.Node object for kubelet: %v", err) + continue + } + + glog.Infof("Attempting to register node %s", node.Name) + registered := kl.tryRegisterWithAPIServer(node) + if registered { + glog.Infof("Successfully registered node %s", node.Name) + kl.registrationCompleted = true + return + } + } +} + +// tryRegisterWithAPIServer makes an attempt to register the given node with +// the API server, returning a boolean indicating whether the attempt was +// successful. If a node with the same name already exists, it reconciles the +// value of the annotation for controller-managed attach-detach of attachable +// persistent volumes for the node. If a node of the same name exists but has +// a different externalID value, it attempts to delete that node so that a +// later attempt can recreate it. +func (kl *Kubelet) tryRegisterWithAPIServer(node *v1.Node) bool { + _, err := kl.kubeClient.Core().Nodes().Create(node) + if err == nil { + return true + } + + if !apierrors.IsAlreadyExists(err) { + glog.Errorf("Unable to register node %q with API server: %v", kl.nodeName, err) + return false + } + + existingNode, err := kl.kubeClient.Core().Nodes().Get(string(kl.nodeName), metav1.GetOptions{}) + if err != nil { + glog.Errorf("Unable to register node %q with API server: error getting existing node: %v", kl.nodeName, err) + return false + } + if existingNode == nil { + glog.Errorf("Unable to register node %q with API server: no node instance returned", kl.nodeName) + return false + } + + clonedNode, err := conversion.NewCloner().DeepCopy(existingNode) + if err != nil { + glog.Errorf("Unable to clone %q node object %#v: %v", kl.nodeName, existingNode, err) + return false + } + + originalNode, ok := clonedNode.(*v1.Node) + if !ok || originalNode == nil { + glog.Errorf("Unable to cast %q node object %#v to v1.Node", kl.nodeName, clonedNode) + return false + } + + if existingNode.Spec.ExternalID == node.Spec.ExternalID { + glog.Infof("Node %s was previously registered", kl.nodeName) + + // Edge case: the node was previously registered; reconcile + // the value of the controller-managed attach-detach + // annotation. + requiresUpdate := kl.reconcileCMADAnnotationWithExistingNode(node, existingNode) + requiresUpdate = kl.updateDefaultLabels(node, existingNode) || requiresUpdate + if requiresUpdate { + if _, err := nodeutil.PatchNodeStatus(kl.kubeClient.CoreV1(), types.NodeName(kl.nodeName), + originalNode, existingNode); err != nil { + glog.Errorf("Unable to reconcile node %q with API server: error updating node: %v", kl.nodeName, err) + return false + } + } + + return true + } + + glog.Errorf( + "Previously node %q had externalID %q; now it is %q; will delete and recreate.", + kl.nodeName, node.Spec.ExternalID, existingNode.Spec.ExternalID, + ) + if err := kl.kubeClient.Core().Nodes().Delete(node.Name, nil); err != nil { + glog.Errorf("Unable to register node %q with API server: error deleting old node: %v", kl.nodeName, err) + } else { + glog.Infof("Deleted old node object %q", kl.nodeName) + } + + return false +} + +// updateDefaultLabels will set the default labels on the node +func (kl *Kubelet) updateDefaultLabels(initialNode, existingNode *v1.Node) bool { + defaultLabels := []string{ + kubeletapis.LabelHostname, + kubeletapis.LabelZoneFailureDomain, + kubeletapis.LabelZoneRegion, + kubeletapis.LabelInstanceType, + kubeletapis.LabelOS, + kubeletapis.LabelArch, + } + + var needsUpdate bool = false + //Set default labels but make sure to not set labels with empty values + for _, label := range defaultLabels { + if existingNode.Labels[label] != initialNode.Labels[label] { + existingNode.Labels[label] = initialNode.Labels[label] + needsUpdate = true + } + + if existingNode.Labels[label] == "" { + delete(existingNode.Labels, label) + } + } + + return needsUpdate +} + +// reconcileCMADAnnotationWithExistingNode reconciles the controller-managed +// attach-detach annotation on a new node and the existing node, returning +// whether the existing node must be updated. +func (kl *Kubelet) reconcileCMADAnnotationWithExistingNode(node, existingNode *v1.Node) bool { + var ( + existingCMAAnnotation = existingNode.Annotations[volumehelper.ControllerManagedAttachAnnotation] + newCMAAnnotation, newSet = node.Annotations[volumehelper.ControllerManagedAttachAnnotation] + ) + + if newCMAAnnotation == existingCMAAnnotation { + return false + } + + // If the just-constructed node and the existing node do + // not have the same value, update the existing node with + // the correct value of the annotation. + if !newSet { + glog.Info("Controller attach-detach setting changed to false; updating existing Node") + delete(existingNode.Annotations, volumehelper.ControllerManagedAttachAnnotation) + } else { + glog.Info("Controller attach-detach setting changed to true; updating existing Node") + if existingNode.Annotations == nil { + existingNode.Annotations = make(map[string]string) + } + existingNode.Annotations[volumehelper.ControllerManagedAttachAnnotation] = newCMAAnnotation + } + + return true +} + +// initialNode constructs the initial v1.Node for this Kubelet, incorporating node +// labels, information from the cloud provider, and Kubelet configuration. +func (kl *Kubelet) initialNode() (*v1.Node, error) { + node := &v1.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: string(kl.nodeName), + Labels: map[string]string{ + kubeletapis.LabelHostname: kl.hostname, + kubeletapis.LabelOS: goruntime.GOOS, + kubeletapis.LabelArch: goruntime.GOARCH, + }, + }, + Spec: v1.NodeSpec{ + Unschedulable: !kl.registerSchedulable, + }, + } + nodeTaints := make([]v1.Taint, 0) + if len(kl.kubeletConfiguration.RegisterWithTaints) > 0 { + taints := make([]v1.Taint, len(kl.kubeletConfiguration.RegisterWithTaints)) + for i := range kl.kubeletConfiguration.RegisterWithTaints { + if err := k8s_api_v1.Convert_api_Taint_To_v1_Taint(&kl.kubeletConfiguration.RegisterWithTaints[i], &taints[i], nil); err != nil { + return nil, err + } + } + nodeTaints = append(nodeTaints, taints...) + } + if kl.externalCloudProvider { + taint := v1.Taint{ + Key: algorithm.TaintExternalCloudProvider, + Value: "true", + Effect: v1.TaintEffectNoSchedule, + } + + nodeTaints = append(nodeTaints, taint) + } + if len(nodeTaints) > 0 { + node.Spec.Taints = nodeTaints + } + // Initially, set NodeNetworkUnavailable to true. + if kl.providerRequiresNetworkingConfiguration() { + node.Status.Conditions = append(node.Status.Conditions, v1.NodeCondition{ + Type: v1.NodeNetworkUnavailable, + Status: v1.ConditionTrue, + Reason: "NoRouteCreated", + Message: "Node created without a route", + LastTransitionTime: metav1.NewTime(kl.clock.Now()), + }) + } + + if kl.enableControllerAttachDetach { + if node.Annotations == nil { + node.Annotations = make(map[string]string) + } + + glog.Infof("Setting node annotation to enable volume controller attach/detach") + node.Annotations[volumehelper.ControllerManagedAttachAnnotation] = "true" + } else { + glog.Infof("Controller attach/detach is disabled for this node; Kubelet will attach and detach volumes") + } + + if kl.kubeletConfiguration.KeepTerminatedPodVolumes { + if node.Annotations == nil { + node.Annotations = make(map[string]string) + } + glog.Infof("Setting node annotation to keep pod volumes of terminated pods attached to the node") + node.Annotations[volumehelper.KeepTerminatedPodVolumesAnnotation] = "true" + } + + // @question: should this be place after the call to the cloud provider? which also applies labels + for k, v := range kl.nodeLabels { + if cv, found := node.ObjectMeta.Labels[k]; found { + glog.Warningf("the node label %s=%s will overwrite default setting %s", k, v, cv) + } + node.ObjectMeta.Labels[k] = v + } + + if kl.providerID != "" { + node.Spec.ProviderID = kl.providerID + } + + if kl.cloud != nil { + instances, ok := kl.cloud.Instances() + if !ok { + return nil, fmt.Errorf("failed to get instances from cloud provider") + } + + // TODO(roberthbailey): Can we do this without having credentials to talk + // to the cloud provider? + // TODO: ExternalID is deprecated, we'll have to drop this code + externalID, err := instances.ExternalID(kl.nodeName) + if err != nil { + return nil, fmt.Errorf("failed to get external ID from cloud provider: %v", err) + } + node.Spec.ExternalID = externalID + + // TODO: We can't assume that the node has credentials to talk to the + // cloudprovider from arbitrary nodes. At most, we should talk to a + // local metadata server here. + if node.Spec.ProviderID == "" { + node.Spec.ProviderID, err = cloudprovider.GetInstanceProviderID(kl.cloud, kl.nodeName) + if err != nil { + return nil, err + } + } + + instanceType, err := instances.InstanceType(kl.nodeName) + if err != nil { + return nil, err + } + if instanceType != "" { + glog.Infof("Adding node label from cloud provider: %s=%s", kubeletapis.LabelInstanceType, instanceType) + node.ObjectMeta.Labels[kubeletapis.LabelInstanceType] = instanceType + } + // If the cloud has zone information, label the node with the zone information + zones, ok := kl.cloud.Zones() + if ok { + zone, err := zones.GetZone() + if err != nil { + return nil, fmt.Errorf("failed to get zone from cloud provider: %v", err) + } + if zone.FailureDomain != "" { + glog.Infof("Adding node label from cloud provider: %s=%s", kubeletapis.LabelZoneFailureDomain, zone.FailureDomain) + node.ObjectMeta.Labels[kubeletapis.LabelZoneFailureDomain] = zone.FailureDomain + } + if zone.Region != "" { + glog.Infof("Adding node label from cloud provider: %s=%s", kubeletapis.LabelZoneRegion, zone.Region) + node.ObjectMeta.Labels[kubeletapis.LabelZoneRegion] = zone.Region + } + } + } else { + node.Spec.ExternalID = kl.hostname + if kl.autoDetectCloudProvider { + // If no cloud provider is defined - use the one detected by cadvisor + info, err := kl.GetCachedMachineInfo() + if err == nil { + kl.updateCloudProviderFromMachineInfo(node, info) + } + } + } + kl.setNodeStatus(node) + + return node, nil +} + +// syncNodeStatus should be called periodically from a goroutine. +// It synchronizes node status to master, registering the kubelet first if +// necessary. +func (kl *Kubelet) syncNodeStatus() { + if kl.kubeClient == nil || kl.heartbeatClient == nil { + return + } + if kl.registerNode { + // This will exit immediately if it doesn't need to do anything. + kl.registerWithAPIServer() + } + if err := kl.updateNodeStatus(); err != nil { + glog.Errorf("Unable to update node status: %v", err) + } +} + +// updateNodeStatus updates node status to master with retries. +func (kl *Kubelet) updateNodeStatus() error { + for i := 0; i < nodeStatusUpdateRetry; i++ { + if err := kl.tryUpdateNodeStatus(i); err != nil { + glog.Errorf("Error updating node status, will retry: %v", err) + } else { + return nil + } + } + return fmt.Errorf("update node status exceeds retry count") +} + +// tryUpdateNodeStatus tries to update node status to master. If ReconcileCBR0 +// is set, this function will also confirm that cbr0 is configured correctly. +func (kl *Kubelet) tryUpdateNodeStatus(tryNumber int) error { + // In large clusters, GET and PUT operations on Node objects coming + // from here are the majority of load on apiserver and etcd. + // To reduce the load on etcd, we are serving GET operations from + // apiserver cache (the data might be slightly delayed but it doesn't + // seem to cause more conflict - the delays are pretty small). + // If it result in a conflict, all retries are served directly from etcd. + opts := metav1.GetOptions{} + if tryNumber == 0 { + util.FromApiserverCache(&opts) + } + node, err := kl.heartbeatClient.Nodes().Get(string(kl.nodeName), opts) + if err != nil { + return fmt.Errorf("error getting node %q: %v", kl.nodeName, err) + } + + clonedNode, err := conversion.NewCloner().DeepCopy(node) + if err != nil { + return fmt.Errorf("error clone node %q: %v", kl.nodeName, err) + } + + originalNode, ok := clonedNode.(*v1.Node) + if !ok || originalNode == nil { + return fmt.Errorf("failed to cast %q node object %#v to v1.Node", kl.nodeName, clonedNode) + } + + kl.updatePodCIDR(node.Spec.PodCIDR) + + kl.setNodeStatus(node) + // Patch the current status on the API server + updatedNode, err := nodeutil.PatchNodeStatus(kl.heartbeatClient, types.NodeName(kl.nodeName), originalNode, node) + if err != nil { + return err + } + // If update finishes successfully, mark the volumeInUse as reportedInUse to indicate + // those volumes are already updated in the node's status + kl.volumeManager.MarkVolumesAsReportedInUse(updatedNode.Status.VolumesInUse) + return nil +} + +// recordNodeStatusEvent records an event of the given type with the given +// message for the node. +func (kl *Kubelet) recordNodeStatusEvent(eventType, event string) { + glog.V(2).Infof("Recording %s event message for node %s", event, kl.nodeName) + // TODO: This requires a transaction, either both node status is updated + // and event is recorded or neither should happen, see issue #6055. + kl.recorder.Eventf(kl.nodeRef, eventType, event, "Node %s status is now: %s", kl.nodeName, event) +} + +// Set IP and hostname addresses for the node. +func (kl *Kubelet) setNodeAddress(node *v1.Node) error { + if kl.nodeIP != nil { + if err := kl.validateNodeIP(); err != nil { + return fmt.Errorf("failed to validate nodeIP: %v", err) + } + glog.V(2).Infof("Using node IP: %q", kl.nodeIP.String()) + } + + if kl.externalCloudProvider { + // We rely on the external cloud provider to supply the addresses. + return nil + } + if kl.cloud != nil { + instances, ok := kl.cloud.Instances() + if !ok { + return fmt.Errorf("failed to get instances from cloud provider") + } + // TODO(roberthbailey): Can we do this without having credentials to talk + // to the cloud provider? + // TODO(justinsb): We can if CurrentNodeName() was actually CurrentNode() and returned an interface + // TODO: If IP addresses couldn't be fetched from the cloud provider, should kubelet fallback on the other methods for getting the IP below? + nodeAddresses, err := instances.NodeAddresses(kl.nodeName) + if err != nil { + return fmt.Errorf("failed to get node address from cloud provider: %v", err) + } + if kl.nodeIP != nil { + enforcedNodeAddresses := []v1.NodeAddress{} + for _, nodeAddress := range nodeAddresses { + if nodeAddress.Address == kl.nodeIP.String() { + enforcedNodeAddresses = append(enforcedNodeAddresses, v1.NodeAddress{Type: nodeAddress.Type, Address: nodeAddress.Address}) + } + } + if len(enforcedNodeAddresses) > 0 { + enforcedNodeAddresses = append(enforcedNodeAddresses, v1.NodeAddress{Type: v1.NodeHostName, Address: kl.GetHostname()}) + node.Status.Addresses = enforcedNodeAddresses + return nil + } + return fmt.Errorf("failed to get node address from cloud provider that matches ip: %v", kl.nodeIP) + } + + // Only add a NodeHostName address if the cloudprovider did not specify one + // (we assume the cloudprovider knows best) + var addressNodeHostName *v1.NodeAddress + for i := range nodeAddresses { + if nodeAddresses[i].Type == v1.NodeHostName { + addressNodeHostName = &nodeAddresses[i] + break + } + } + if addressNodeHostName == nil { + hostnameAddress := v1.NodeAddress{Type: v1.NodeHostName, Address: kl.GetHostname()} + nodeAddresses = append(nodeAddresses, hostnameAddress) + } else { + glog.V(2).Infof("Using Node Hostname from cloudprovider: %q", addressNodeHostName.Address) + } + node.Status.Addresses = nodeAddresses + } else { + var ipAddr net.IP + var err error + + // 1) Use nodeIP if set + // 2) If the user has specified an IP to HostnameOverride, use it + // 3) Lookup the IP from node name by DNS and use the first non-loopback ipv4 address + // 4) Try to get the IP from the network interface used as default gateway + if kl.nodeIP != nil { + ipAddr = kl.nodeIP + node.ObjectMeta.Annotations[kubeletapis.AnnotationProvidedIPAddr] = kl.nodeIP.String() + } else if addr := net.ParseIP(kl.hostname); addr != nil { + ipAddr = addr + } else { + var addrs []net.IP + addrs, err = net.LookupIP(node.Name) + for _, addr := range addrs { + if !addr.IsLoopback() && addr.To4() != nil { + ipAddr = addr + break + } + } + + if ipAddr == nil { + ipAddr, err = utilnet.ChooseHostInterface() + } + } + + if ipAddr == nil { + // We tried everything we could, but the IP address wasn't fetchable; error out + return fmt.Errorf("can't get ip address of node %s. error: %v", node.Name, err) + } + node.Status.Addresses = []v1.NodeAddress{ + {Type: v1.NodeInternalIP, Address: ipAddr.String()}, + {Type: v1.NodeHostName, Address: kl.GetHostname()}, + } + } + return nil +} + +func (kl *Kubelet) setNodeStatusMachineInfo(node *v1.Node) { + // Note: avoid blindly overwriting the capacity in case opaque + // resources are being advertised. + if node.Status.Capacity == nil { + node.Status.Capacity = v1.ResourceList{} + } + + // populate GPU capacity. + gpuCapacity := kl.gpuManager.Capacity() + if gpuCapacity != nil { + for k, v := range gpuCapacity { + node.Status.Capacity[k] = v + } + } + + // TODO: Post NotReady if we cannot get MachineInfo from cAdvisor. This needs to start + // cAdvisor locally, e.g. for test-cmd.sh, and in integration test. + info, err := kl.GetCachedMachineInfo() + if err != nil { + // TODO(roberthbailey): This is required for test-cmd.sh to pass. + // See if the test should be updated instead. + node.Status.Capacity[v1.ResourceCPU] = *resource.NewMilliQuantity(0, resource.DecimalSI) + node.Status.Capacity[v1.ResourceMemory] = resource.MustParse("0Gi") + node.Status.Capacity[v1.ResourcePods] = *resource.NewQuantity(int64(kl.maxPods), resource.DecimalSI) + glog.Errorf("Error getting machine info: %v", err) + } else { + node.Status.NodeInfo.MachineID = info.MachineID + node.Status.NodeInfo.SystemUUID = info.SystemUUID + + for rName, rCap := range cadvisor.CapacityFromMachineInfo(info) { + node.Status.Capacity[rName] = rCap + } + + if kl.podsPerCore > 0 { + node.Status.Capacity[v1.ResourcePods] = *resource.NewQuantity( + int64(math.Min(float64(info.NumCores*kl.podsPerCore), float64(kl.maxPods))), resource.DecimalSI) + } else { + node.Status.Capacity[v1.ResourcePods] = *resource.NewQuantity( + int64(kl.maxPods), resource.DecimalSI) + } + + if node.Status.NodeInfo.BootID != "" && + node.Status.NodeInfo.BootID != info.BootID { + // TODO: This requires a transaction, either both node status is updated + // and event is recorded or neither should happen, see issue #6055. + kl.recorder.Eventf(kl.nodeRef, v1.EventTypeWarning, events.NodeRebooted, + "Node %s has been rebooted, boot id: %s", kl.nodeName, info.BootID) + } + node.Status.NodeInfo.BootID = info.BootID + + if utilfeature.DefaultFeatureGate.Enabled(features.LocalStorageCapacityIsolation) { + // TODO: all the node resources should use GetCapacity instead of deriving the + // capacity for every node status request + initialCapacity := kl.containerManager.GetCapacity() + if initialCapacity != nil { + node.Status.Capacity[v1.ResourceEphemeralStorage] = initialCapacity[v1.ResourceEphemeralStorage] + } + } + + currentCapacity := kl.containerManager.GetCapacity() + if currentCapacity != nil { + for k, v := range currentCapacity { + if v1helper.IsExtendedResourceName(k) { + glog.V(2).Infof("Update capacity for %s to %d", k, v.Value()) + node.Status.Capacity[k] = v + } + } + // Remove stale extended resources. + for k := range node.Status.Capacity { + if v1helper.IsExtendedResourceName(k) { + if _, ok := currentCapacity[k]; !ok { + glog.V(2).Infof("delete capacity for %s", k) + delete(node.Status.Capacity, k) + } + } + } + } + } + + // Set Allocatable. + if node.Status.Allocatable == nil { + node.Status.Allocatable = make(v1.ResourceList) + } + // Remove extended resources from allocatable that are no longer + // present in capacity. + for k := range node.Status.Allocatable { + _, found := node.Status.Capacity[k] + if !found && v1helper.IsExtendedResourceName(k) { + delete(node.Status.Allocatable, k) + } + } + allocatableReservation := kl.containerManager.GetNodeAllocatableReservation() + for k, v := range node.Status.Capacity { + value := *(v.Copy()) + if res, exists := allocatableReservation[k]; exists { + value.Sub(res) + } + if value.Sign() < 0 { + // Negative Allocatable resources don't make sense. + value.Set(0) + } + node.Status.Allocatable[k] = value + } + // for every huge page reservation, we need to remove it from allocatable memory + for k, v := range node.Status.Capacity { + if v1helper.IsHugePageResourceName(k) { + allocatableMemory := node.Status.Allocatable[v1.ResourceMemory] + value := *(v.Copy()) + allocatableMemory.Sub(value) + if allocatableMemory.Sign() < 0 { + // Negative Allocatable resources don't make sense. + allocatableMemory.Set(0) + } + node.Status.Allocatable[v1.ResourceMemory] = allocatableMemory + } + } +} + +// Set versioninfo for the node. +func (kl *Kubelet) setNodeStatusVersionInfo(node *v1.Node) { + verinfo, err := kl.cadvisor.VersionInfo() + if err != nil { + glog.Errorf("Error getting version info: %v", err) + return + } + + node.Status.NodeInfo.KernelVersion = verinfo.KernelVersion + node.Status.NodeInfo.OSImage = verinfo.ContainerOsVersion + + runtimeVersion := "Unknown" + if runtimeVer, err := kl.containerRuntime.Version(); err == nil { + runtimeVersion = runtimeVer.String() + } + node.Status.NodeInfo.ContainerRuntimeVersion = fmt.Sprintf("%s://%s", kl.containerRuntime.Type(), runtimeVersion) + + node.Status.NodeInfo.KubeletVersion = version.Get().String() + // TODO: kube-proxy might be different version from kubelet in the future + node.Status.NodeInfo.KubeProxyVersion = version.Get().String() +} + +// Set daemonEndpoints for the node. +func (kl *Kubelet) setNodeStatusDaemonEndpoints(node *v1.Node) { + node.Status.DaemonEndpoints = *kl.daemonEndpoints +} + +// Set images list for the node +func (kl *Kubelet) setNodeStatusImages(node *v1.Node) { + // Update image list of this node + var imagesOnNode []v1.ContainerImage + containerImages, err := kl.imageManager.GetImageList() + if err != nil { + glog.Errorf("Error getting image list: %v", err) + node.Status.Images = imagesOnNode + return + } + // sort the images from max to min, and only set top N images into the node status. + sort.Sort(sliceutils.ByImageSize(containerImages)) + if maxImagesInNodeStatus < len(containerImages) { + containerImages = containerImages[0:maxImagesInNodeStatus] + } + + for _, image := range containerImages { + names := append(image.RepoDigests, image.RepoTags...) + // Report up to maxNamesPerImageInNodeStatus names per image. + if len(names) > maxNamesPerImageInNodeStatus { + names = names[0:maxNamesPerImageInNodeStatus] + } + imagesOnNode = append(imagesOnNode, v1.ContainerImage{ + Names: names, + SizeBytes: image.Size, + }) + } + + node.Status.Images = imagesOnNode +} + +// Set the GOOS and GOARCH for this node +func (kl *Kubelet) setNodeStatusGoRuntime(node *v1.Node) { + node.Status.NodeInfo.OperatingSystem = goruntime.GOOS + node.Status.NodeInfo.Architecture = goruntime.GOARCH +} + +// Set status for the node. +func (kl *Kubelet) setNodeStatusInfo(node *v1.Node) { + kl.setNodeStatusMachineInfo(node) + kl.setNodeStatusVersionInfo(node) + kl.setNodeStatusDaemonEndpoints(node) + kl.setNodeStatusImages(node) + kl.setNodeStatusGoRuntime(node) +} + +// Set Ready condition for the node. +func (kl *Kubelet) setNodeReadyCondition(node *v1.Node) { + // NOTE(aaronlevy): NodeReady condition needs to be the last in the list of node conditions. + // This is due to an issue with version skewed kubelet and master components. + // ref: https://github.com/kubernetes/kubernetes/issues/16961 + currentTime := metav1.NewTime(kl.clock.Now()) + var newNodeReadyCondition v1.NodeCondition + rs := append(kl.runtimeState.runtimeErrors(), kl.runtimeState.networkErrors()...) + if len(rs) == 0 { + newNodeReadyCondition = v1.NodeCondition{ + Type: v1.NodeReady, + Status: v1.ConditionTrue, + Reason: "KubeletReady", + Message: "kubelet is posting ready status", + LastHeartbeatTime: currentTime, + } + } else { + newNodeReadyCondition = v1.NodeCondition{ + Type: v1.NodeReady, + Status: v1.ConditionFalse, + Reason: "KubeletNotReady", + Message: strings.Join(rs, ","), + LastHeartbeatTime: currentTime, + } + } + + // Append AppArmor status if it's enabled. + // TODO(tallclair): This is a temporary message until node feature reporting is added. + if newNodeReadyCondition.Status == v1.ConditionTrue && + kl.appArmorValidator != nil && kl.appArmorValidator.ValidateHost() == nil { + newNodeReadyCondition.Message = fmt.Sprintf("%s. AppArmor enabled", newNodeReadyCondition.Message) + } + + // Record any soft requirements that were not met in the container manager. + status := kl.containerManager.Status() + if status.SoftRequirements != nil { + newNodeReadyCondition.Message = fmt.Sprintf("%s. WARNING: %s", newNodeReadyCondition.Message, status.SoftRequirements.Error()) + } + + readyConditionUpdated := false + needToRecordEvent := false + for i := range node.Status.Conditions { + if node.Status.Conditions[i].Type == v1.NodeReady { + if node.Status.Conditions[i].Status == newNodeReadyCondition.Status { + newNodeReadyCondition.LastTransitionTime = node.Status.Conditions[i].LastTransitionTime + } else { + newNodeReadyCondition.LastTransitionTime = currentTime + needToRecordEvent = true + } + node.Status.Conditions[i] = newNodeReadyCondition + readyConditionUpdated = true + break + } + } + if !readyConditionUpdated { + newNodeReadyCondition.LastTransitionTime = currentTime + node.Status.Conditions = append(node.Status.Conditions, newNodeReadyCondition) + } + if needToRecordEvent { + if newNodeReadyCondition.Status == v1.ConditionTrue { + kl.recordNodeStatusEvent(v1.EventTypeNormal, events.NodeReady) + } else { + kl.recordNodeStatusEvent(v1.EventTypeNormal, events.NodeNotReady) + glog.Infof("Node became not ready: %+v", newNodeReadyCondition) + } + } +} + +// setNodeMemoryPressureCondition for the node. +// TODO: this needs to move somewhere centralized... +func (kl *Kubelet) setNodeMemoryPressureCondition(node *v1.Node) { + currentTime := metav1.NewTime(kl.clock.Now()) + var condition *v1.NodeCondition + + // Check if NodeMemoryPressure condition already exists and if it does, just pick it up for update. + for i := range node.Status.Conditions { + if node.Status.Conditions[i].Type == v1.NodeMemoryPressure { + condition = &node.Status.Conditions[i] + } + } + + newCondition := false + // If the NodeMemoryPressure condition doesn't exist, create one + if condition == nil { + condition = &v1.NodeCondition{ + Type: v1.NodeMemoryPressure, + Status: v1.ConditionUnknown, + } + // cannot be appended to node.Status.Conditions here because it gets + // copied to the slice. So if we append to the slice here none of the + // updates we make below are reflected in the slice. + newCondition = true + } + + // Update the heartbeat time + condition.LastHeartbeatTime = currentTime + + // Note: The conditions below take care of the case when a new NodeMemoryPressure condition is + // created and as well as the case when the condition already exists. When a new condition + // is created its status is set to v1.ConditionUnknown which matches either + // condition.Status != v1.ConditionTrue or + // condition.Status != v1.ConditionFalse in the conditions below depending on whether + // the kubelet is under memory pressure or not. + if kl.evictionManager.IsUnderMemoryPressure() { + if condition.Status != v1.ConditionTrue { + condition.Status = v1.ConditionTrue + condition.Reason = "KubeletHasInsufficientMemory" + condition.Message = "kubelet has insufficient memory available" + condition.LastTransitionTime = currentTime + kl.recordNodeStatusEvent(v1.EventTypeNormal, "NodeHasInsufficientMemory") + } + } else if condition.Status != v1.ConditionFalse { + condition.Status = v1.ConditionFalse + condition.Reason = "KubeletHasSufficientMemory" + condition.Message = "kubelet has sufficient memory available" + condition.LastTransitionTime = currentTime + kl.recordNodeStatusEvent(v1.EventTypeNormal, "NodeHasSufficientMemory") + } + + if newCondition { + node.Status.Conditions = append(node.Status.Conditions, *condition) + } +} + +// setNodeDiskPressureCondition for the node. +// TODO: this needs to move somewhere centralized... +func (kl *Kubelet) setNodeDiskPressureCondition(node *v1.Node) { + currentTime := metav1.NewTime(kl.clock.Now()) + var condition *v1.NodeCondition + + // Check if NodeDiskPressure condition already exists and if it does, just pick it up for update. + for i := range node.Status.Conditions { + if node.Status.Conditions[i].Type == v1.NodeDiskPressure { + condition = &node.Status.Conditions[i] + } + } + + newCondition := false + // If the NodeDiskPressure condition doesn't exist, create one + if condition == nil { + condition = &v1.NodeCondition{ + Type: v1.NodeDiskPressure, + Status: v1.ConditionUnknown, + } + // cannot be appended to node.Status.Conditions here because it gets + // copied to the slice. So if we append to the slice here none of the + // updates we make below are reflected in the slice. + newCondition = true + } + + // Update the heartbeat time + condition.LastHeartbeatTime = currentTime + + // Note: The conditions below take care of the case when a new NodeDiskPressure condition is + // created and as well as the case when the condition already exists. When a new condition + // is created its status is set to v1.ConditionUnknown which matches either + // condition.Status != v1.ConditionTrue or + // condition.Status != v1.ConditionFalse in the conditions below depending on whether + // the kubelet is under disk pressure or not. + if kl.evictionManager.IsUnderDiskPressure() { + if condition.Status != v1.ConditionTrue { + condition.Status = v1.ConditionTrue + condition.Reason = "KubeletHasDiskPressure" + condition.Message = "kubelet has disk pressure" + condition.LastTransitionTime = currentTime + kl.recordNodeStatusEvent(v1.EventTypeNormal, "NodeHasDiskPressure") + } + } else if condition.Status != v1.ConditionFalse { + condition.Status = v1.ConditionFalse + condition.Reason = "KubeletHasNoDiskPressure" + condition.Message = "kubelet has no disk pressure" + condition.LastTransitionTime = currentTime + kl.recordNodeStatusEvent(v1.EventTypeNormal, "NodeHasNoDiskPressure") + } + + if newCondition { + node.Status.Conditions = append(node.Status.Conditions, *condition) + } +} + +// Set OODCondition for the node. +func (kl *Kubelet) setNodeOODCondition(node *v1.Node) { + currentTime := metav1.NewTime(kl.clock.Now()) + var nodeOODCondition *v1.NodeCondition + + // Check if NodeOutOfDisk condition already exists and if it does, just pick it up for update. + for i := range node.Status.Conditions { + if node.Status.Conditions[i].Type == v1.NodeOutOfDisk { + nodeOODCondition = &node.Status.Conditions[i] + } + } + + newOODCondition := nodeOODCondition == nil + if newOODCondition { + nodeOODCondition = &v1.NodeCondition{} + } + if nodeOODCondition.Status != v1.ConditionFalse { + nodeOODCondition.Type = v1.NodeOutOfDisk + nodeOODCondition.Status = v1.ConditionFalse + nodeOODCondition.Reason = "KubeletHasSufficientDisk" + nodeOODCondition.Message = "kubelet has sufficient disk space available" + nodeOODCondition.LastTransitionTime = currentTime + kl.recordNodeStatusEvent(v1.EventTypeNormal, "NodeHasSufficientDisk") + } + + // Update the heartbeat time irrespective of all the conditions. + nodeOODCondition.LastHeartbeatTime = currentTime + + if newOODCondition { + node.Status.Conditions = append(node.Status.Conditions, *nodeOODCondition) + } +} + +// Maintains Node.Spec.Unschedulable value from previous run of tryUpdateNodeStatus() +// TODO: why is this a package var? +var oldNodeUnschedulable bool + +// record if node schedulable change. +func (kl *Kubelet) recordNodeSchedulableEvent(node *v1.Node) { + if oldNodeUnschedulable != node.Spec.Unschedulable { + if node.Spec.Unschedulable { + kl.recordNodeStatusEvent(v1.EventTypeNormal, events.NodeNotSchedulable) + } else { + kl.recordNodeStatusEvent(v1.EventTypeNormal, events.NodeSchedulable) + } + oldNodeUnschedulable = node.Spec.Unschedulable + } +} + +// Update VolumesInUse field in Node Status only after states are synced up at least once +// in volume reconciler. +func (kl *Kubelet) setNodeVolumesInUseStatus(node *v1.Node) { + // Make sure to only update node status after reconciler starts syncing up states + if kl.volumeManager.ReconcilerStatesHasBeenSynced() { + node.Status.VolumesInUse = kl.volumeManager.GetVolumesInUse() + } +} + +// setNodeStatus fills in the Status fields of the given Node, overwriting +// any fields that are currently set. +// TODO(madhusudancs): Simplify the logic for setting node conditions and +// refactor the node status condition code out to a different file. +func (kl *Kubelet) setNodeStatus(node *v1.Node) { + for _, f := range kl.setNodeStatusFuncs { + if err := f(node); err != nil { + glog.Warningf("Failed to set some node status fields: %s", err) + } + } +} + +// defaultNodeStatusFuncs is a factory that generates the default set of +// setNodeStatus funcs +func (kl *Kubelet) defaultNodeStatusFuncs() []func(*v1.Node) error { + // initial set of node status update handlers, can be modified by Option's + withoutError := func(f func(*v1.Node)) func(*v1.Node) error { + return func(n *v1.Node) error { + f(n) + return nil + } + } + return []func(*v1.Node) error{ + kl.setNodeAddress, + withoutError(kl.setNodeStatusInfo), + withoutError(kl.setNodeOODCondition), + withoutError(kl.setNodeMemoryPressureCondition), + withoutError(kl.setNodeDiskPressureCondition), + withoutError(kl.setNodeReadyCondition), + withoutError(kl.setNodeVolumesInUseStatus), + withoutError(kl.recordNodeSchedulableEvent), + } +} + +// Validate given node IP belongs to the current host +func (kl *Kubelet) validateNodeIP() error { + if kl.nodeIP == nil { + return nil + } + + // Honor IP limitations set in setNodeStatus() + if kl.nodeIP.IsLoopback() { + return fmt.Errorf("nodeIP can't be loopback address") + } + if kl.nodeIP.To4() == nil { + return fmt.Errorf("nodeIP must be IPv4 address") + } + + addrs, err := net.InterfaceAddrs() + if err != nil { + return err + } + for _, addr := range addrs { + var ip net.IP + switch v := addr.(type) { + case *net.IPNet: + ip = v.IP + case *net.IPAddr: + ip = v.IP + } + if ip != nil && ip.Equal(kl.nodeIP) { + return nil + } + } + return fmt.Errorf("Node IP: %q not found in the host's network interfaces", kl.nodeIP.String()) +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status_test.go new file mode 100644 index 000000000..9721f3bef --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status_test.go @@ -0,0 +1,1282 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "encoding/json" + "fmt" + "net" + goruntime "runtime" + "sort" + "strconv" + "sync/atomic" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + cadvisorapi "github.com/google/cadvisor/info/v1" + cadvisorapiv2 "github.com/google/cadvisor/info/v2" + "k8s.io/api/core/v1" + apiequality "k8s.io/apimachinery/pkg/api/equality" + apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/diff" + "k8s.io/apimachinery/pkg/util/rand" + "k8s.io/apimachinery/pkg/util/strategicpatch" + "k8s.io/apimachinery/pkg/util/uuid" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/kubernetes/fake" + v1core "k8s.io/client-go/kubernetes/typed/core/v1" + "k8s.io/client-go/rest" + core "k8s.io/client-go/testing" + fakecloud "k8s.io/kubernetes/pkg/cloudprovider/providers/fake" + kubeletapis "k8s.io/kubernetes/pkg/kubelet/apis" + "k8s.io/kubernetes/pkg/kubelet/cm" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + "k8s.io/kubernetes/pkg/kubelet/util/sliceutils" + "k8s.io/kubernetes/pkg/version" + "k8s.io/kubernetes/pkg/volume/util/volumehelper" +) + +const ( + maxImageTagsForTest = 20 +) + +// generateTestingImageList generate randomly generated image list and corresponding expectedImageList. +func generateTestingImageList(count int) ([]kubecontainer.Image, []v1.ContainerImage) { + // imageList is randomly generated image list + var imageList []kubecontainer.Image + for ; count > 0; count-- { + imageItem := kubecontainer.Image{ + ID: string(uuid.NewUUID()), + RepoTags: generateImageTags(), + Size: rand.Int63nRange(minImgSize, maxImgSize+1), + } + imageList = append(imageList, imageItem) + } + + // expectedImageList is generated by imageList according to size and maxImagesInNodeStatus + // 1. sort the imageList by size + sort.Sort(sliceutils.ByImageSize(imageList)) + // 2. convert sorted imageList to v1.ContainerImage list + var expectedImageList []v1.ContainerImage + for _, kubeImage := range imageList { + apiImage := v1.ContainerImage{ + Names: kubeImage.RepoTags[0:maxNamesPerImageInNodeStatus], + SizeBytes: kubeImage.Size, + } + + expectedImageList = append(expectedImageList, apiImage) + } + // 3. only returns the top maxImagesInNodeStatus images in expectedImageList + return imageList, expectedImageList[0:maxImagesInNodeStatus] +} + +func generateImageTags() []string { + var tagList []string + // Generate > maxNamesPerImageInNodeStatus tags so that the test can verify + // that kubelet report up to maxNamesPerImageInNodeStatus tags. + count := rand.IntnRange(maxNamesPerImageInNodeStatus+1, maxImageTagsForTest+1) + for ; count > 0; count-- { + tagList = append(tagList, "gcr.io/google_containers:v"+strconv.Itoa(count)) + } + return tagList +} + +func applyNodeStatusPatch(originalNode *v1.Node, patch []byte) (*v1.Node, error) { + original, err := json.Marshal(originalNode) + if err != nil { + return nil, fmt.Errorf("failed to marshal original node %#v: %v", originalNode, err) + } + updated, err := strategicpatch.StrategicMergePatch(original, patch, v1.Node{}) + if err != nil { + return nil, fmt.Errorf("failed to apply strategic merge patch %q on node %#v: %v", + patch, originalNode, err) + } + updatedNode := &v1.Node{} + if err := json.Unmarshal(updated, updatedNode); err != nil { + return nil, fmt.Errorf("failed to unmarshal updated node %q: %v", updated, err) + } + return updatedNode, nil +} + +type localCM struct { + cm.ContainerManager + allocatable v1.ResourceList + capacity v1.ResourceList +} + +func (lcm *localCM) GetNodeAllocatableReservation() v1.ResourceList { + return lcm.allocatable +} + +func (lcm *localCM) GetCapacity() v1.ResourceList { + return lcm.capacity +} + +func TestNodeStatusWithCloudProviderNodeIP(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + kubelet.kubeClient = nil // ensure only the heartbeat client is used + kubelet.hostname = testKubeletHostname + + existingNode := v1.Node{ + ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname, Annotations: make(map[string]string)}, + Spec: v1.NodeSpec{}, + } + + // TODO : is it possible to mock kubelet.validateNodeIP() to avoid relying on the host interface addresses ? + addrs, err := net.InterfaceAddrs() + assert.NoError(t, err) + for _, addr := range addrs { + var ip net.IP + switch v := addr.(type) { + case *net.IPNet: + ip = v.IP + case *net.IPAddr: + ip = v.IP + } + if ip != nil && !ip.IsLoopback() && ip.To4() != nil { + kubelet.nodeIP = ip + break + } + } + assert.NotNil(t, kubelet.nodeIP) + + fakeCloud := &fakecloud.FakeCloud{ + Addresses: []v1.NodeAddress{ + { + Type: v1.NodeExternalIP, + Address: "132.143.154.163", + }, + { + Type: v1.NodeExternalIP, + Address: kubelet.nodeIP.String(), + }, + { + Type: v1.NodeInternalIP, + Address: "132.143.154.164", + }, + { + Type: v1.NodeInternalIP, + Address: kubelet.nodeIP.String(), + }, + { + Type: v1.NodeInternalIP, + Address: "132.143.154.165", + }, + { + Type: v1.NodeHostName, + Address: testKubeletHostname, + }, + }, + Err: nil, + } + kubelet.cloud = fakeCloud + + kubelet.setNodeAddress(&existingNode) + + expectedAddresses := []v1.NodeAddress{ + { + Type: v1.NodeExternalIP, + Address: kubelet.nodeIP.String(), + }, + { + Type: v1.NodeInternalIP, + Address: kubelet.nodeIP.String(), + }, + { + Type: v1.NodeHostName, + Address: testKubeletHostname, + }, + } + assert.True(t, apiequality.Semantic.DeepEqual(expectedAddresses, existingNode.Status.Addresses), "%s", diff.ObjectDiff(expectedAddresses, existingNode.Status.Addresses)) +} + +func TestUpdateNewNodeStatus(t *testing.T) { + // generate one more than maxImagesInNodeStatus in inputImageList + inputImageList, expectedImageList := generateTestingImageList(maxImagesInNodeStatus + 1) + testKubelet := newTestKubeletWithImageList( + t, inputImageList, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + kubelet.kubeClient = nil // ensure only the heartbeat client is used + kubelet.containerManager = &localCM{ + ContainerManager: cm.NewStubContainerManager(), + allocatable: v1.ResourceList{ + v1.ResourceCPU: *resource.NewMilliQuantity(200, resource.DecimalSI), + v1.ResourceMemory: *resource.NewQuantity(100E6, resource.BinarySI), + }, + capacity: v1.ResourceList{ + v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI), + v1.ResourceMemory: *resource.NewQuantity(10E9, resource.BinarySI), + }, + } + kubeClient := testKubelet.fakeKubeClient + existingNode := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}} + kubeClient.ReactionChain = fake.NewSimpleClientset(&v1.NodeList{Items: []v1.Node{existingNode}}).ReactionChain + machineInfo := &cadvisorapi.MachineInfo{ + MachineID: "123", + SystemUUID: "abc", + BootID: "1b3", + NumCores: 2, + MemoryCapacity: 10E9, // 10G + } + mockCadvisor := testKubelet.fakeCadvisor + mockCadvisor.On("Start").Return(nil) + mockCadvisor.On("MachineInfo").Return(machineInfo, nil) + versionInfo := &cadvisorapi.VersionInfo{ + KernelVersion: "3.16.0-0.bpo.4-amd64", + ContainerOsVersion: "Debian GNU/Linux 7 (wheezy)", + } + mockCadvisor.On("VersionInfo").Return(versionInfo, nil) + + expectedNode := &v1.Node{ + ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, + Spec: v1.NodeSpec{}, + Status: v1.NodeStatus{ + Conditions: []v1.NodeCondition{ + { + Type: v1.NodeOutOfDisk, + Status: v1.ConditionFalse, + Reason: "KubeletHasSufficientDisk", + Message: fmt.Sprintf("kubelet has sufficient disk space available"), + LastHeartbeatTime: metav1.Time{}, + LastTransitionTime: metav1.Time{}, + }, + { + Type: v1.NodeMemoryPressure, + Status: v1.ConditionFalse, + Reason: "KubeletHasSufficientMemory", + Message: fmt.Sprintf("kubelet has sufficient memory available"), + LastHeartbeatTime: metav1.Time{}, + LastTransitionTime: metav1.Time{}, + }, + { + Type: v1.NodeDiskPressure, + Status: v1.ConditionFalse, + Reason: "KubeletHasNoDiskPressure", + Message: fmt.Sprintf("kubelet has no disk pressure"), + LastHeartbeatTime: metav1.Time{}, + LastTransitionTime: metav1.Time{}, + }, + { + Type: v1.NodeReady, + Status: v1.ConditionTrue, + Reason: "KubeletReady", + Message: fmt.Sprintf("kubelet is posting ready status"), + LastHeartbeatTime: metav1.Time{}, + LastTransitionTime: metav1.Time{}, + }, + }, + NodeInfo: v1.NodeSystemInfo{ + MachineID: "123", + SystemUUID: "abc", + BootID: "1b3", + KernelVersion: "3.16.0-0.bpo.4-amd64", + OSImage: "Debian GNU/Linux 7 (wheezy)", + OperatingSystem: goruntime.GOOS, + Architecture: goruntime.GOARCH, + ContainerRuntimeVersion: "test://1.5.0", + KubeletVersion: version.Get().String(), + KubeProxyVersion: version.Get().String(), + }, + Capacity: v1.ResourceList{ + v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI), + v1.ResourceMemory: *resource.NewQuantity(10E9, resource.BinarySI), + v1.ResourcePods: *resource.NewQuantity(0, resource.DecimalSI), + }, + Allocatable: v1.ResourceList{ + v1.ResourceCPU: *resource.NewMilliQuantity(1800, resource.DecimalSI), + v1.ResourceMemory: *resource.NewQuantity(9900E6, resource.BinarySI), + v1.ResourcePods: *resource.NewQuantity(0, resource.DecimalSI), + }, + Addresses: []v1.NodeAddress{ + {Type: v1.NodeInternalIP, Address: "127.0.0.1"}, + {Type: v1.NodeHostName, Address: testKubeletHostname}, + }, + Images: expectedImageList, + }, + } + + kubelet.updateRuntimeUp() + assert.NoError(t, kubelet.updateNodeStatus()) + actions := kubeClient.Actions() + require.Len(t, actions, 2) + require.True(t, actions[1].Matches("patch", "nodes")) + require.Equal(t, actions[1].GetSubresource(), "status") + + updatedNode, err := applyNodeStatusPatch(&existingNode, actions[1].(core.PatchActionImpl).GetPatch()) + assert.NoError(t, err) + for i, cond := range updatedNode.Status.Conditions { + assert.False(t, cond.LastHeartbeatTime.IsZero(), "LastHeartbeatTime for %v condition is zero", cond.Type) + assert.False(t, cond.LastTransitionTime.IsZero(), "LastTransitionTime for %v condition is zero", cond.Type) + updatedNode.Status.Conditions[i].LastHeartbeatTime = metav1.Time{} + updatedNode.Status.Conditions[i].LastTransitionTime = metav1.Time{} + } + + // Version skew workaround. See: https://github.com/kubernetes/kubernetes/issues/16961 + assert.Equal(t, v1.NodeReady, updatedNode.Status.Conditions[len(updatedNode.Status.Conditions)-1].Type, "NotReady should be last") + assert.Len(t, updatedNode.Status.Images, maxImagesInNodeStatus) + assert.True(t, apiequality.Semantic.DeepEqual(expectedNode, updatedNode), "%s", diff.ObjectDiff(expectedNode, updatedNode)) +} + +func TestUpdateExistingNodeStatus(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + kubelet.kubeClient = nil // ensure only the heartbeat client is used + kubelet.containerManager = &localCM{ + ContainerManager: cm.NewStubContainerManager(), + allocatable: v1.ResourceList{ + v1.ResourceCPU: *resource.NewMilliQuantity(200, resource.DecimalSI), + v1.ResourceMemory: *resource.NewQuantity(100E6, resource.BinarySI), + }, + capacity: v1.ResourceList{ + v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI), + v1.ResourceMemory: *resource.NewQuantity(20E9, resource.BinarySI), + }, + } + + kubeClient := testKubelet.fakeKubeClient + existingNode := v1.Node{ + ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, + Spec: v1.NodeSpec{}, + Status: v1.NodeStatus{ + Conditions: []v1.NodeCondition{ + { + Type: v1.NodeOutOfDisk, + Status: v1.ConditionFalse, + Reason: "KubeletHasSufficientDisk", + Message: fmt.Sprintf("kubelet has sufficient disk space available"), + LastHeartbeatTime: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), + LastTransitionTime: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), + }, + { + Type: v1.NodeMemoryPressure, + Status: v1.ConditionFalse, + Reason: "KubeletHasSufficientMemory", + Message: fmt.Sprintf("kubelet has sufficient memory available"), + LastHeartbeatTime: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), + LastTransitionTime: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), + }, + { + Type: v1.NodeDiskPressure, + Status: v1.ConditionFalse, + Reason: "KubeletHasSufficientDisk", + Message: fmt.Sprintf("kubelet has sufficient disk space available"), + LastHeartbeatTime: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), + LastTransitionTime: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), + }, + { + Type: v1.NodeReady, + Status: v1.ConditionTrue, + Reason: "KubeletReady", + Message: fmt.Sprintf("kubelet is posting ready status"), + LastHeartbeatTime: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), + LastTransitionTime: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), + }, + }, + Capacity: v1.ResourceList{ + v1.ResourceCPU: *resource.NewMilliQuantity(3000, resource.DecimalSI), + v1.ResourceMemory: *resource.NewQuantity(20E9, resource.BinarySI), + v1.ResourcePods: *resource.NewQuantity(0, resource.DecimalSI), + }, + Allocatable: v1.ResourceList{ + v1.ResourceCPU: *resource.NewMilliQuantity(2800, resource.DecimalSI), + v1.ResourceMemory: *resource.NewQuantity(19900E6, resource.BinarySI), + v1.ResourcePods: *resource.NewQuantity(0, resource.DecimalSI), + }, + }, + } + kubeClient.ReactionChain = fake.NewSimpleClientset(&v1.NodeList{Items: []v1.Node{existingNode}}).ReactionChain + mockCadvisor := testKubelet.fakeCadvisor + mockCadvisor.On("Start").Return(nil) + machineInfo := &cadvisorapi.MachineInfo{ + MachineID: "123", + SystemUUID: "abc", + BootID: "1b3", + NumCores: 2, + MemoryCapacity: 20E9, + } + mockCadvisor.On("MachineInfo").Return(machineInfo, nil) + versionInfo := &cadvisorapi.VersionInfo{ + KernelVersion: "3.16.0-0.bpo.4-amd64", + ContainerOsVersion: "Debian GNU/Linux 7 (wheezy)", + } + mockCadvisor.On("VersionInfo").Return(versionInfo, nil) + + expectedNode := &v1.Node{ + ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, + Spec: v1.NodeSpec{}, + Status: v1.NodeStatus{ + Conditions: []v1.NodeCondition{ + { + Type: v1.NodeOutOfDisk, + Status: v1.ConditionFalse, + Reason: "KubeletHasSufficientDisk", + Message: fmt.Sprintf("kubelet has sufficient disk space available"), + LastHeartbeatTime: metav1.Time{}, + LastTransitionTime: metav1.Time{}, + }, + { + Type: v1.NodeMemoryPressure, + Status: v1.ConditionFalse, + Reason: "KubeletHasSufficientMemory", + Message: fmt.Sprintf("kubelet has sufficient memory available"), + LastHeartbeatTime: metav1.Time{}, + LastTransitionTime: metav1.Time{}, + }, + { + Type: v1.NodeDiskPressure, + Status: v1.ConditionFalse, + Reason: "KubeletHasSufficientDisk", + Message: fmt.Sprintf("kubelet has sufficient disk space available"), + LastHeartbeatTime: metav1.Time{}, + LastTransitionTime: metav1.Time{}, + }, + { + Type: v1.NodeReady, + Status: v1.ConditionTrue, + Reason: "KubeletReady", + Message: fmt.Sprintf("kubelet is posting ready status"), + LastHeartbeatTime: metav1.Time{}, // placeholder + LastTransitionTime: metav1.Time{}, // placeholder + }, + }, + NodeInfo: v1.NodeSystemInfo{ + MachineID: "123", + SystemUUID: "abc", + BootID: "1b3", + KernelVersion: "3.16.0-0.bpo.4-amd64", + OSImage: "Debian GNU/Linux 7 (wheezy)", + OperatingSystem: goruntime.GOOS, + Architecture: goruntime.GOARCH, + ContainerRuntimeVersion: "test://1.5.0", + KubeletVersion: version.Get().String(), + KubeProxyVersion: version.Get().String(), + }, + Capacity: v1.ResourceList{ + v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI), + v1.ResourceMemory: *resource.NewQuantity(20E9, resource.BinarySI), + v1.ResourcePods: *resource.NewQuantity(0, resource.DecimalSI), + }, + Allocatable: v1.ResourceList{ + v1.ResourceCPU: *resource.NewMilliQuantity(1800, resource.DecimalSI), + v1.ResourceMemory: *resource.NewQuantity(19900E6, resource.BinarySI), + v1.ResourcePods: *resource.NewQuantity(0, resource.DecimalSI), + }, + Addresses: []v1.NodeAddress{ + {Type: v1.NodeInternalIP, Address: "127.0.0.1"}, + {Type: v1.NodeHostName, Address: testKubeletHostname}, + }, + // images will be sorted from max to min in node status. + Images: []v1.ContainerImage{ + { + Names: []string{"gcr.io/google_containers:v3", "gcr.io/google_containers:v4"}, + SizeBytes: 456, + }, + { + Names: []string{"gcr.io/google_containers:v1", "gcr.io/google_containers:v2"}, + SizeBytes: 123, + }, + }, + }, + } + + kubelet.updateRuntimeUp() + assert.NoError(t, kubelet.updateNodeStatus()) + + actions := kubeClient.Actions() + assert.Len(t, actions, 2) + + assert.IsType(t, core.PatchActionImpl{}, actions[1]) + patchAction := actions[1].(core.PatchActionImpl) + + updatedNode, err := applyNodeStatusPatch(&existingNode, patchAction.GetPatch()) + require.NoError(t, err) + + for i, cond := range updatedNode.Status.Conditions { + old := metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC).Time + // Expect LastHearbeat to be updated to Now, while LastTransitionTime to be the same. + assert.NotEqual(t, old, cond.LastHeartbeatTime.Rfc3339Copy().UTC(), "LastHeartbeatTime for condition %v", cond.Type) + assert.EqualValues(t, old, cond.LastTransitionTime.Rfc3339Copy().UTC(), "LastTransitionTime for condition %v", cond.Type) + + updatedNode.Status.Conditions[i].LastHeartbeatTime = metav1.Time{} + updatedNode.Status.Conditions[i].LastTransitionTime = metav1.Time{} + } + + // Version skew workaround. See: https://github.com/kubernetes/kubernetes/issues/16961 + assert.Equal(t, v1.NodeReady, updatedNode.Status.Conditions[len(updatedNode.Status.Conditions)-1].Type, + "NodeReady should be the last condition") + assert.True(t, apiequality.Semantic.DeepEqual(expectedNode, updatedNode), "%s", diff.ObjectDiff(expectedNode, updatedNode)) +} + +func TestUpdateExistingNodeStatusTimeout(t *testing.T) { + attempts := int64(0) + + // set up a listener that hangs connections + ln, err := net.Listen("tcp", "127.0.0.1:0") + assert.NoError(t, err) + defer ln.Close() + go func() { + // accept connections and just let them hang + for { + _, err := ln.Accept() + if err != nil { + t.Log(err) + return + } + t.Log("accepted connection") + atomic.AddInt64(&attempts, 1) + } + }() + + config := &rest.Config{ + Host: "http://" + ln.Addr().String(), + QPS: -1, + Timeout: time.Second, + } + assert.NoError(t, err) + + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + kubelet.kubeClient = nil // ensure only the heartbeat client is used + kubelet.heartbeatClient, err = v1core.NewForConfig(config) + kubelet.containerManager = &localCM{ + ContainerManager: cm.NewStubContainerManager(), + allocatable: v1.ResourceList{ + v1.ResourceCPU: *resource.NewMilliQuantity(200, resource.DecimalSI), + v1.ResourceMemory: *resource.NewQuantity(100E6, resource.BinarySI), + }, + capacity: v1.ResourceList{ + v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI), + v1.ResourceMemory: *resource.NewQuantity(20E9, resource.BinarySI), + }, + } + + // should return an error, but not hang + assert.Error(t, kubelet.updateNodeStatus()) + + // should have attempted multiple times + if actualAttempts := atomic.LoadInt64(&attempts); actualAttempts != nodeStatusUpdateRetry { + t.Errorf("Expected %d attempts, got %d", nodeStatusUpdateRetry, actualAttempts) + } +} + +func TestUpdateNodeStatusWithRuntimeStateError(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + kubelet.kubeClient = nil // ensure only the heartbeat client is used + kubelet.containerManager = &localCM{ + ContainerManager: cm.NewStubContainerManager(), + allocatable: v1.ResourceList{ + v1.ResourceCPU: *resource.NewMilliQuantity(200, resource.DecimalSI), + v1.ResourceMemory: *resource.NewQuantity(100E6, resource.BinarySI), + }, + capacity: v1.ResourceList{ + v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI), + v1.ResourceMemory: *resource.NewQuantity(10E9, resource.BinarySI), + }, + } + + clock := testKubelet.fakeClock + kubeClient := testKubelet.fakeKubeClient + existingNode := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}} + kubeClient.ReactionChain = fake.NewSimpleClientset(&v1.NodeList{Items: []v1.Node{existingNode}}).ReactionChain + mockCadvisor := testKubelet.fakeCadvisor + mockCadvisor.On("Start").Return(nil) + machineInfo := &cadvisorapi.MachineInfo{ + MachineID: "123", + SystemUUID: "abc", + BootID: "1b3", + NumCores: 2, + MemoryCapacity: 10E9, + } + mockCadvisor.On("MachineInfo").Return(machineInfo, nil) + versionInfo := &cadvisorapi.VersionInfo{ + KernelVersion: "3.16.0-0.bpo.4-amd64", + ContainerOsVersion: "Debian GNU/Linux 7 (wheezy)", + } + mockCadvisor.On("VersionInfo").Return(versionInfo, nil) + + expectedNode := &v1.Node{ + ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, + Spec: v1.NodeSpec{}, + Status: v1.NodeStatus{ + Conditions: []v1.NodeCondition{ + { + Type: v1.NodeOutOfDisk, + Status: v1.ConditionFalse, + Reason: "KubeletHasSufficientDisk", + Message: fmt.Sprintf("kubelet has sufficient disk space available"), + LastHeartbeatTime: metav1.Time{}, + LastTransitionTime: metav1.Time{}, + }, + { + Type: v1.NodeMemoryPressure, + Status: v1.ConditionFalse, + Reason: "KubeletHasSufficientMemory", + Message: fmt.Sprintf("kubelet has sufficient memory available"), + LastHeartbeatTime: metav1.Time{}, + LastTransitionTime: metav1.Time{}, + }, + { + Type: v1.NodeDiskPressure, + Status: v1.ConditionFalse, + Reason: "KubeletHasNoDiskPressure", + Message: fmt.Sprintf("kubelet has no disk pressure"), + LastHeartbeatTime: metav1.Time{}, + LastTransitionTime: metav1.Time{}, + }, + {}, //placeholder + }, + NodeInfo: v1.NodeSystemInfo{ + MachineID: "123", + SystemUUID: "abc", + BootID: "1b3", + KernelVersion: "3.16.0-0.bpo.4-amd64", + OSImage: "Debian GNU/Linux 7 (wheezy)", + OperatingSystem: goruntime.GOOS, + Architecture: goruntime.GOARCH, + ContainerRuntimeVersion: "test://1.5.0", + KubeletVersion: version.Get().String(), + KubeProxyVersion: version.Get().String(), + }, + Capacity: v1.ResourceList{ + v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI), + v1.ResourceMemory: *resource.NewQuantity(10E9, resource.BinarySI), + v1.ResourcePods: *resource.NewQuantity(0, resource.DecimalSI), + }, + Allocatable: v1.ResourceList{ + v1.ResourceCPU: *resource.NewMilliQuantity(1800, resource.DecimalSI), + v1.ResourceMemory: *resource.NewQuantity(9900E6, resource.BinarySI), + v1.ResourcePods: *resource.NewQuantity(0, resource.DecimalSI), + }, + Addresses: []v1.NodeAddress{ + {Type: v1.NodeInternalIP, Address: "127.0.0.1"}, + {Type: v1.NodeHostName, Address: testKubeletHostname}, + }, + Images: []v1.ContainerImage{ + { + Names: []string{"gcr.io/google_containers:v3", "gcr.io/google_containers:v4"}, + SizeBytes: 456, + }, + { + Names: []string{"gcr.io/google_containers:v1", "gcr.io/google_containers:v2"}, + SizeBytes: 123, + }, + }, + }, + } + + checkNodeStatus := func(status v1.ConditionStatus, reason string) { + kubeClient.ClearActions() + assert.NoError(t, kubelet.updateNodeStatus()) + actions := kubeClient.Actions() + require.Len(t, actions, 2) + require.True(t, actions[1].Matches("patch", "nodes")) + require.Equal(t, actions[1].GetSubresource(), "status") + + updatedNode, err := applyNodeStatusPatch(&existingNode, actions[1].(core.PatchActionImpl).GetPatch()) + require.NoError(t, err, "can't apply node status patch") + + for i, cond := range updatedNode.Status.Conditions { + assert.False(t, cond.LastHeartbeatTime.IsZero(), "LastHeartbeatTime for %v condition is zero", cond.Type) + assert.False(t, cond.LastTransitionTime.IsZero(), "LastTransitionTime for %v condition is zero", cond.Type) + updatedNode.Status.Conditions[i].LastHeartbeatTime = metav1.Time{} + updatedNode.Status.Conditions[i].LastTransitionTime = metav1.Time{} + } + + // Version skew workaround. See: https://github.com/kubernetes/kubernetes/issues/16961 + lastIndex := len(updatedNode.Status.Conditions) - 1 + + assert.Equal(t, v1.NodeReady, updatedNode.Status.Conditions[lastIndex].Type, "NodeReady should be the last condition") + assert.NotEmpty(t, updatedNode.Status.Conditions[lastIndex].Message) + + updatedNode.Status.Conditions[lastIndex].Message = "" + expectedNode.Status.Conditions[lastIndex] = v1.NodeCondition{ + Type: v1.NodeReady, + Status: status, + Reason: reason, + LastHeartbeatTime: metav1.Time{}, + LastTransitionTime: metav1.Time{}, + } + assert.True(t, apiequality.Semantic.DeepEqual(expectedNode, updatedNode), "%s", diff.ObjectDiff(expectedNode, updatedNode)) + } + + // TODO(random-liu): Refactor the unit test to be table driven test. + // Should report kubelet not ready if the runtime check is out of date + clock.SetTime(time.Now().Add(-maxWaitForContainerRuntime)) + kubelet.updateRuntimeUp() + checkNodeStatus(v1.ConditionFalse, "KubeletNotReady") + + // Should report kubelet ready if the runtime check is updated + clock.SetTime(time.Now()) + kubelet.updateRuntimeUp() + checkNodeStatus(v1.ConditionTrue, "KubeletReady") + + // Should report kubelet not ready if the runtime check is out of date + clock.SetTime(time.Now().Add(-maxWaitForContainerRuntime)) + kubelet.updateRuntimeUp() + checkNodeStatus(v1.ConditionFalse, "KubeletNotReady") + + // Should report kubelet not ready if the runtime check failed + fakeRuntime := testKubelet.fakeRuntime + // Inject error into fake runtime status check, node should be NotReady + fakeRuntime.StatusErr = fmt.Errorf("injected runtime status error") + clock.SetTime(time.Now()) + kubelet.updateRuntimeUp() + checkNodeStatus(v1.ConditionFalse, "KubeletNotReady") + + fakeRuntime.StatusErr = nil + + // Should report node not ready if runtime status is nil. + fakeRuntime.RuntimeStatus = nil + kubelet.updateRuntimeUp() + checkNodeStatus(v1.ConditionFalse, "KubeletNotReady") + + // Should report node not ready if runtime status is empty. + fakeRuntime.RuntimeStatus = &kubecontainer.RuntimeStatus{} + kubelet.updateRuntimeUp() + checkNodeStatus(v1.ConditionFalse, "KubeletNotReady") + + // Should report node not ready if RuntimeReady is false. + fakeRuntime.RuntimeStatus = &kubecontainer.RuntimeStatus{ + Conditions: []kubecontainer.RuntimeCondition{ + {Type: kubecontainer.RuntimeReady, Status: false}, + {Type: kubecontainer.NetworkReady, Status: true}, + }, + } + kubelet.updateRuntimeUp() + checkNodeStatus(v1.ConditionFalse, "KubeletNotReady") + + // Should report node ready if RuntimeReady is true. + fakeRuntime.RuntimeStatus = &kubecontainer.RuntimeStatus{ + Conditions: []kubecontainer.RuntimeCondition{ + {Type: kubecontainer.RuntimeReady, Status: true}, + {Type: kubecontainer.NetworkReady, Status: true}, + }, + } + kubelet.updateRuntimeUp() + checkNodeStatus(v1.ConditionTrue, "KubeletReady") + + // Should report node not ready if NetworkReady is false. + fakeRuntime.RuntimeStatus = &kubecontainer.RuntimeStatus{ + Conditions: []kubecontainer.RuntimeCondition{ + {Type: kubecontainer.RuntimeReady, Status: true}, + {Type: kubecontainer.NetworkReady, Status: false}, + }, + } + kubelet.updateRuntimeUp() + checkNodeStatus(v1.ConditionFalse, "KubeletNotReady") +} + +func TestUpdateNodeStatusError(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + kubelet.kubeClient = nil // ensure only the heartbeat client is used + // No matching node for the kubelet + testKubelet.fakeKubeClient.ReactionChain = fake.NewSimpleClientset(&v1.NodeList{Items: []v1.Node{}}).ReactionChain + assert.Error(t, kubelet.updateNodeStatus()) + assert.Len(t, testKubelet.fakeKubeClient.Actions(), nodeStatusUpdateRetry) +} + +func TestRegisterWithApiServer(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + kubeClient := testKubelet.fakeKubeClient + kubeClient.AddReactor("create", "nodes", func(action core.Action) (bool, runtime.Object, error) { + // Return an error on create. + return true, &v1.Node{}, &apierrors.StatusError{ + ErrStatus: metav1.Status{Reason: metav1.StatusReasonAlreadyExists}, + } + }) + kubeClient.AddReactor("get", "nodes", func(action core.Action) (bool, runtime.Object, error) { + // Return an existing (matching) node on get. + return true, &v1.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: testKubeletHostname, + Labels: map[string]string{ + kubeletapis.LabelHostname: testKubeletHostname, + kubeletapis.LabelOS: goruntime.GOOS, + kubeletapis.LabelArch: goruntime.GOARCH, + }, + }, + Spec: v1.NodeSpec{ExternalID: testKubeletHostname}, + }, nil + }) + kubeClient.AddReactor("*", "*", func(action core.Action) (bool, runtime.Object, error) { + return true, nil, fmt.Errorf("no reaction implemented for %s", action) + }) + machineInfo := &cadvisorapi.MachineInfo{ + MachineID: "123", + SystemUUID: "abc", + BootID: "1b3", + NumCores: 2, + MemoryCapacity: 1024, + } + mockCadvisor := testKubelet.fakeCadvisor + mockCadvisor.On("MachineInfo").Return(machineInfo, nil) + versionInfo := &cadvisorapi.VersionInfo{ + KernelVersion: "3.16.0-0.bpo.4-amd64", + ContainerOsVersion: "Debian GNU/Linux 7 (wheezy)", + DockerVersion: "1.5.0", + } + mockCadvisor.On("VersionInfo").Return(versionInfo, nil) + mockCadvisor.On("ImagesFsInfo").Return(cadvisorapiv2.FsInfo{ + Usage: 400, + Capacity: 1000, + Available: 600, + }, nil) + mockCadvisor.On("RootFsInfo").Return(cadvisorapiv2.FsInfo{ + Usage: 9, + Capacity: 10, + }, nil) + + done := make(chan struct{}) + go func() { + kubelet.registerWithAPIServer() + done <- struct{}{} + }() + select { + case <-time.After(wait.ForeverTestTimeout): + assert.Fail(t, "timed out waiting for registration") + case <-done: + return + } +} + +func TestTryRegisterWithApiServer(t *testing.T) { + alreadyExists := &apierrors.StatusError{ + ErrStatus: metav1.Status{Reason: metav1.StatusReasonAlreadyExists}, + } + + conflict := &apierrors.StatusError{ + ErrStatus: metav1.Status{Reason: metav1.StatusReasonConflict}, + } + + newNode := func(cmad bool, externalID string) *v1.Node { + node := &v1.Node{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + kubeletapis.LabelHostname: testKubeletHostname, + kubeletapis.LabelOS: goruntime.GOOS, + kubeletapis.LabelArch: goruntime.GOARCH, + }, + }, + Spec: v1.NodeSpec{ + ExternalID: externalID, + }, + } + + if cmad { + node.Annotations = make(map[string]string) + node.Annotations[volumehelper.ControllerManagedAttachAnnotation] = "true" + } + + return node + } + + cases := []struct { + name string + newNode *v1.Node + existingNode *v1.Node + createError error + getError error + patchError error + deleteError error + expectedResult bool + expectedActions int + testSavedNode bool + savedNodeIndex int + savedNodeCMAD bool + }{ + { + name: "success case - new node", + newNode: &v1.Node{}, + expectedResult: true, + expectedActions: 1, + }, + { + name: "success case - existing node - no change in CMAD", + newNode: newNode(true, "a"), + createError: alreadyExists, + existingNode: newNode(true, "a"), + expectedResult: true, + expectedActions: 2, + }, + { + name: "success case - existing node - CMAD disabled", + newNode: newNode(false, "a"), + createError: alreadyExists, + existingNode: newNode(true, "a"), + expectedResult: true, + expectedActions: 3, + testSavedNode: true, + savedNodeIndex: 2, + savedNodeCMAD: false, + }, + { + name: "success case - existing node - CMAD enabled", + newNode: newNode(true, "a"), + createError: alreadyExists, + existingNode: newNode(false, "a"), + expectedResult: true, + expectedActions: 3, + testSavedNode: true, + savedNodeIndex: 2, + savedNodeCMAD: true, + }, + { + name: "success case - external ID changed", + newNode: newNode(false, "b"), + createError: alreadyExists, + existingNode: newNode(false, "a"), + expectedResult: false, + expectedActions: 3, + }, + { + name: "create failed", + newNode: newNode(false, "b"), + createError: conflict, + expectedResult: false, + expectedActions: 1, + }, + { + name: "get existing node failed", + newNode: newNode(false, "a"), + createError: alreadyExists, + getError: conflict, + expectedResult: false, + expectedActions: 2, + }, + { + name: "update existing node failed", + newNode: newNode(false, "a"), + createError: alreadyExists, + existingNode: newNode(true, "a"), + patchError: conflict, + expectedResult: false, + expectedActions: 3, + }, + { + name: "delete existing node failed", + newNode: newNode(false, "b"), + createError: alreadyExists, + existingNode: newNode(false, "a"), + deleteError: conflict, + expectedResult: false, + expectedActions: 3, + }, + } + + notImplemented := func(action core.Action) (bool, runtime.Object, error) { + return true, nil, fmt.Errorf("no reaction implemented for %s", action) + } + + for _, tc := range cases { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled is a don't-care for this test */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + kubeClient := testKubelet.fakeKubeClient + + kubeClient.AddReactor("create", "nodes", func(action core.Action) (bool, runtime.Object, error) { + return true, nil, tc.createError + }) + kubeClient.AddReactor("get", "nodes", func(action core.Action) (bool, runtime.Object, error) { + // Return an existing (matching) node on get. + return true, tc.existingNode, tc.getError + }) + kubeClient.AddReactor("patch", "nodes", func(action core.Action) (bool, runtime.Object, error) { + if action.GetSubresource() == "status" { + return true, nil, tc.patchError + } + return notImplemented(action) + }) + kubeClient.AddReactor("delete", "nodes", func(action core.Action) (bool, runtime.Object, error) { + return true, nil, tc.deleteError + }) + kubeClient.AddReactor("*", "*", func(action core.Action) (bool, runtime.Object, error) { + return notImplemented(action) + }) + + result := kubelet.tryRegisterWithAPIServer(tc.newNode) + require.Equal(t, tc.expectedResult, result, "test [%s]", tc.name) + + actions := kubeClient.Actions() + assert.Len(t, actions, tc.expectedActions, "test [%s]", tc.name) + + if tc.testSavedNode { + var savedNode *v1.Node + + t.Logf("actions: %v: %+v", len(actions), actions) + action := actions[tc.savedNodeIndex] + if action.GetVerb() == "create" { + createAction := action.(core.CreateAction) + obj := createAction.GetObject() + require.IsType(t, &v1.Node{}, obj) + savedNode = obj.(*v1.Node) + } else if action.GetVerb() == "patch" { + patchAction := action.(core.PatchActionImpl) + var err error + savedNode, err = applyNodeStatusPatch(tc.existingNode, patchAction.GetPatch()) + require.NoError(t, err) + } + + actualCMAD, _ := strconv.ParseBool(savedNode.Annotations[volumehelper.ControllerManagedAttachAnnotation]) + assert.Equal(t, tc.savedNodeCMAD, actualCMAD, "test [%s]", tc.name) + } + } +} + +func TestUpdateNewNodeStatusTooLargeReservation(t *testing.T) { + // generate one more than maxImagesInNodeStatus in inputImageList + inputImageList, _ := generateTestingImageList(maxImagesInNodeStatus + 1) + testKubelet := newTestKubeletWithImageList( + t, inputImageList, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + kubelet.kubeClient = nil // ensure only the heartbeat client is used + kubelet.containerManager = &localCM{ + ContainerManager: cm.NewStubContainerManager(), + allocatable: v1.ResourceList{ + v1.ResourceCPU: *resource.NewMilliQuantity(40000, resource.DecimalSI), + }, + capacity: v1.ResourceList{ + v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI), + v1.ResourceMemory: *resource.NewQuantity(10E9, resource.BinarySI), + }, + } + kubeClient := testKubelet.fakeKubeClient + existingNode := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}} + kubeClient.ReactionChain = fake.NewSimpleClientset(&v1.NodeList{Items: []v1.Node{existingNode}}).ReactionChain + machineInfo := &cadvisorapi.MachineInfo{ + MachineID: "123", + SystemUUID: "abc", + BootID: "1b3", + NumCores: 2, + MemoryCapacity: 10E9, // 10G + } + mockCadvisor := testKubelet.fakeCadvisor + mockCadvisor.On("Start").Return(nil) + mockCadvisor.On("MachineInfo").Return(machineInfo, nil) + versionInfo := &cadvisorapi.VersionInfo{ + KernelVersion: "3.16.0-0.bpo.4-amd64", + ContainerOsVersion: "Debian GNU/Linux 7 (wheezy)", + } + mockCadvisor.On("VersionInfo").Return(versionInfo, nil) + + expectedNode := &v1.Node{ + ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, + Spec: v1.NodeSpec{}, + Status: v1.NodeStatus{ + Capacity: v1.ResourceList{ + v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI), + v1.ResourceMemory: *resource.NewQuantity(10E9, resource.BinarySI), + v1.ResourcePods: *resource.NewQuantity(0, resource.DecimalSI), + }, + Allocatable: v1.ResourceList{ + v1.ResourceCPU: *resource.NewMilliQuantity(0, resource.DecimalSI), + v1.ResourceMemory: *resource.NewQuantity(10E9, resource.BinarySI), + v1.ResourcePods: *resource.NewQuantity(0, resource.DecimalSI), + }, + }, + } + + kubelet.updateRuntimeUp() + assert.NoError(t, kubelet.updateNodeStatus()) + actions := kubeClient.Actions() + require.Len(t, actions, 2) + require.True(t, actions[1].Matches("patch", "nodes")) + require.Equal(t, actions[1].GetSubresource(), "status") + + updatedNode, err := applyNodeStatusPatch(&existingNode, actions[1].(core.PatchActionImpl).GetPatch()) + assert.NoError(t, err) + assert.True(t, apiequality.Semantic.DeepEqual(expectedNode.Status.Allocatable, updatedNode.Status.Allocatable), "%s", diff.ObjectDiff(expectedNode.Status.Allocatable, updatedNode.Status.Allocatable)) +} + +func TestUpdateDefaultLabels(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + testKubelet.kubelet.kubeClient = nil // ensure only the heartbeat client is used + + cases := []struct { + name string + initialNode *v1.Node + existingNode *v1.Node + needsUpdate bool + finalLabels map[string]string + }{ + { + name: "make sure default labels exist", + initialNode: &v1.Node{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + kubeletapis.LabelHostname: "new-hostname", + kubeletapis.LabelZoneFailureDomain: "new-zone-failure-domain", + kubeletapis.LabelZoneRegion: "new-zone-region", + kubeletapis.LabelInstanceType: "new-instance-type", + kubeletapis.LabelOS: "new-os", + kubeletapis.LabelArch: "new-arch", + }, + }, + }, + existingNode: &v1.Node{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{}, + }, + }, + needsUpdate: true, + finalLabels: map[string]string{ + kubeletapis.LabelHostname: "new-hostname", + kubeletapis.LabelZoneFailureDomain: "new-zone-failure-domain", + kubeletapis.LabelZoneRegion: "new-zone-region", + kubeletapis.LabelInstanceType: "new-instance-type", + kubeletapis.LabelOS: "new-os", + kubeletapis.LabelArch: "new-arch", + }, + }, + { + name: "make sure default labels are up to date", + initialNode: &v1.Node{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + kubeletapis.LabelHostname: "new-hostname", + kubeletapis.LabelZoneFailureDomain: "new-zone-failure-domain", + kubeletapis.LabelZoneRegion: "new-zone-region", + kubeletapis.LabelInstanceType: "new-instance-type", + kubeletapis.LabelOS: "new-os", + kubeletapis.LabelArch: "new-arch", + }, + }, + }, + existingNode: &v1.Node{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + kubeletapis.LabelHostname: "old-hostname", + kubeletapis.LabelZoneFailureDomain: "old-zone-failure-domain", + kubeletapis.LabelZoneRegion: "old-zone-region", + kubeletapis.LabelInstanceType: "old-instance-type", + kubeletapis.LabelOS: "old-os", + kubeletapis.LabelArch: "old-arch", + }, + }, + }, + needsUpdate: true, + finalLabels: map[string]string{ + kubeletapis.LabelHostname: "new-hostname", + kubeletapis.LabelZoneFailureDomain: "new-zone-failure-domain", + kubeletapis.LabelZoneRegion: "new-zone-region", + kubeletapis.LabelInstanceType: "new-instance-type", + kubeletapis.LabelOS: "new-os", + kubeletapis.LabelArch: "new-arch", + }, + }, + { + name: "make sure existing labels do not get deleted", + initialNode: &v1.Node{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + kubeletapis.LabelHostname: "new-hostname", + kubeletapis.LabelZoneFailureDomain: "new-zone-failure-domain", + kubeletapis.LabelZoneRegion: "new-zone-region", + kubeletapis.LabelInstanceType: "new-instance-type", + kubeletapis.LabelOS: "new-os", + kubeletapis.LabelArch: "new-arch", + }, + }, + }, + existingNode: &v1.Node{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + kubeletapis.LabelHostname: "new-hostname", + kubeletapis.LabelZoneFailureDomain: "new-zone-failure-domain", + kubeletapis.LabelZoneRegion: "new-zone-region", + kubeletapis.LabelInstanceType: "new-instance-type", + kubeletapis.LabelOS: "new-os", + kubeletapis.LabelArch: "new-arch", + "please-persist": "foo", + }, + }, + }, + needsUpdate: false, + finalLabels: map[string]string{ + kubeletapis.LabelHostname: "new-hostname", + kubeletapis.LabelZoneFailureDomain: "new-zone-failure-domain", + kubeletapis.LabelZoneRegion: "new-zone-region", + kubeletapis.LabelInstanceType: "new-instance-type", + kubeletapis.LabelOS: "new-os", + kubeletapis.LabelArch: "new-arch", + "please-persist": "foo", + }, + }, + { + name: "no update needed", + initialNode: &v1.Node{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + kubeletapis.LabelHostname: "new-hostname", + kubeletapis.LabelZoneFailureDomain: "new-zone-failure-domain", + kubeletapis.LabelZoneRegion: "new-zone-region", + kubeletapis.LabelInstanceType: "new-instance-type", + kubeletapis.LabelOS: "new-os", + kubeletapis.LabelArch: "new-arch", + }, + }, + }, + existingNode: &v1.Node{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + kubeletapis.LabelHostname: "new-hostname", + kubeletapis.LabelZoneFailureDomain: "new-zone-failure-domain", + kubeletapis.LabelZoneRegion: "new-zone-region", + kubeletapis.LabelInstanceType: "new-instance-type", + kubeletapis.LabelOS: "new-os", + kubeletapis.LabelArch: "new-arch", + }, + }, + }, + needsUpdate: false, + finalLabels: map[string]string{ + kubeletapis.LabelHostname: "new-hostname", + kubeletapis.LabelZoneFailureDomain: "new-zone-failure-domain", + kubeletapis.LabelZoneRegion: "new-zone-region", + kubeletapis.LabelInstanceType: "new-instance-type", + kubeletapis.LabelOS: "new-os", + kubeletapis.LabelArch: "new-arch", + }, + }, + } + + for _, tc := range cases { + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + + needsUpdate := kubelet.updateDefaultLabels(tc.initialNode, tc.existingNode) + assert.Equal(t, tc.needsUpdate, needsUpdate, tc.name) + assert.Equal(t, tc.finalLabels, tc.existingNode.Labels, tc.name) + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods.go new file mode 100644 index 000000000..9406669bf --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods.go @@ -0,0 +1,1783 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "bytes" + "fmt" + "io" + "io/ioutil" + "net/http" + "net/url" + "os" + "path" + "path/filepath" + "runtime" + "sort" + "strings" + "sync" + "time" + + "github.com/golang/glog" + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/sets" + utilvalidation "k8s.io/apimachinery/pkg/util/validation" + "k8s.io/apimachinery/pkg/util/validation/field" + utilfeature "k8s.io/apiserver/pkg/util/feature" + "k8s.io/client-go/tools/remotecommand" + "k8s.io/kubernetes/pkg/api" + v1helper "k8s.io/kubernetes/pkg/api/v1/helper" + v1qos "k8s.io/kubernetes/pkg/api/v1/helper/qos" + podutil "k8s.io/kubernetes/pkg/api/v1/pod" + "k8s.io/kubernetes/pkg/api/v1/resource" + "k8s.io/kubernetes/pkg/api/v1/validation" + "k8s.io/kubernetes/pkg/features" + "k8s.io/kubernetes/pkg/fieldpath" + runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime" + "k8s.io/kubernetes/pkg/kubelet/cm" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + "k8s.io/kubernetes/pkg/kubelet/envvars" + "k8s.io/kubernetes/pkg/kubelet/eviction" + "k8s.io/kubernetes/pkg/kubelet/images" + "k8s.io/kubernetes/pkg/kubelet/server/portforward" + remotecommandserver "k8s.io/kubernetes/pkg/kubelet/server/remotecommand" + "k8s.io/kubernetes/pkg/kubelet/status" + kubetypes "k8s.io/kubernetes/pkg/kubelet/types" + "k8s.io/kubernetes/pkg/kubelet/util/format" + utilfile "k8s.io/kubernetes/pkg/util/file" + "k8s.io/kubernetes/pkg/volume" + "k8s.io/kubernetes/pkg/volume/util/volumehelper" + volumevalidation "k8s.io/kubernetes/pkg/volume/validation" + "k8s.io/kubernetes/third_party/forked/golang/expansion" +) + +// Get a list of pods that have data directories. +func (kl *Kubelet) listPodsFromDisk() ([]types.UID, error) { + podInfos, err := ioutil.ReadDir(kl.getPodsDir()) + if err != nil { + return nil, err + } + pods := []types.UID{} + for i := range podInfos { + if podInfos[i].IsDir() { + pods = append(pods, types.UID(podInfos[i].Name())) + } + } + return pods, nil +} + +// GetActivePods returns non-terminal pods +func (kl *Kubelet) GetActivePods() []*v1.Pod { + allPods := kl.podManager.GetPods() + activePods := kl.filterOutTerminatedPods(allPods) + return activePods +} + +// makeDevices determines the devices for the given container. +// Experimental. +func (kl *Kubelet) makeDevices(pod *v1.Pod, container *v1.Container) ([]kubecontainer.DeviceInfo, error) { + if container.Resources.Limits.NvidiaGPU().IsZero() { + return nil, nil + } + + nvidiaGPUPaths, err := kl.gpuManager.AllocateGPU(pod, container) + if err != nil { + return nil, err + } + var devices []kubecontainer.DeviceInfo + for _, path := range nvidiaGPUPaths { + // Devices have to be mapped one to one because of nvidia CUDA library requirements. + devices = append(devices, kubecontainer.DeviceInfo{PathOnHost: path, PathInContainer: path, Permissions: "mrw"}) + } + + return devices, nil +} + +// makeMounts determines the mount points for the given container. +func makeMounts(pod *v1.Pod, podDir string, container *v1.Container, hostName, hostDomain, podIP string, podVolumes kubecontainer.VolumeMap) ([]kubecontainer.Mount, error) { + // Kubernetes only mounts on /etc/hosts if: + // - container is not an infrastructure (pause) container + // - container is not already mounting on /etc/hosts + // - OS is not Windows + // Kubernetes will not mount /etc/hosts if: + // - when the Pod sandbox is being created, its IP is still unknown. Hence, PodIP will not have been set. + mountEtcHostsFile := len(podIP) > 0 && runtime.GOOS != "windows" + glog.V(3).Infof("container: %v/%v/%v podIP: %q creating hosts mount: %v", pod.Namespace, pod.Name, container.Name, podIP, mountEtcHostsFile) + mounts := []kubecontainer.Mount{} + for _, mount := range container.VolumeMounts { + // do not mount /etc/hosts if container is already mounting on the path + mountEtcHostsFile = mountEtcHostsFile && (mount.MountPath != etcHostsPath) + vol, ok := podVolumes[mount.Name] + if !ok || vol.Mounter == nil { + glog.Warningf("Mount cannot be satisfied for container %q, because the volume is missing or the volume mounter is nil: %q", container.Name, mount) + continue + } + + relabelVolume := false + // If the volume supports SELinux and it has not been + // relabeled already and it is not a read-only volume, + // relabel it and mark it as labeled + if vol.Mounter.GetAttributes().Managed && vol.Mounter.GetAttributes().SupportsSELinux && !vol.SELinuxLabeled { + vol.SELinuxLabeled = true + relabelVolume = true + } + hostPath, err := volume.GetPath(vol.Mounter) + if err != nil { + return nil, err + } + if mount.SubPath != "" { + if filepath.IsAbs(mount.SubPath) { + return nil, fmt.Errorf("error SubPath `%s` must not be an absolute path", mount.SubPath) + } + + err = volumevalidation.ValidatePathNoBacksteps(mount.SubPath) + if err != nil { + return nil, fmt.Errorf("unable to provision SubPath `%s`: %v", mount.SubPath, err) + } + + fileinfo, err := os.Lstat(hostPath) + if err != nil { + return nil, err + } + perm := fileinfo.Mode() + + hostPath = filepath.Join(hostPath, mount.SubPath) + + if subPathExists, err := utilfile.FileOrSymlinkExists(hostPath); err != nil { + glog.Errorf("Could not determine if subPath %s exists; will not attempt to change its permissions", hostPath) + } else if !subPathExists { + // Create the sub path now because if it's auto-created later when referenced, it may have an + // incorrect ownership and mode. For example, the sub path directory must have at least g+rwx + // when the pod specifies an fsGroup, and if the directory is not created here, Docker will + // later auto-create it with the incorrect mode 0750 + if err := os.MkdirAll(hostPath, perm); err != nil { + glog.Errorf("failed to mkdir:%s", hostPath) + return nil, err + } + + // chmod the sub path because umask may have prevented us from making the sub path with the same + // permissions as the mounter path + if err := os.Chmod(hostPath, perm); err != nil { + return nil, err + } + } + } + + // Docker Volume Mounts fail on Windows if it is not of the form C:/ + containerPath := mount.MountPath + if runtime.GOOS == "windows" { + if (strings.HasPrefix(hostPath, "/") || strings.HasPrefix(hostPath, "\\")) && !strings.Contains(hostPath, ":") { + hostPath = "c:" + hostPath + } + if (strings.HasPrefix(containerPath, "/") || strings.HasPrefix(containerPath, "\\")) && !strings.Contains(containerPath, ":") { + containerPath = "c:" + containerPath + } + } + + propagation, err := translateMountPropagation(mount.MountPropagation) + if err != nil { + return nil, err + } + glog.V(5).Infof("Pod %q container %q mount %q has propagation %q", format.Pod(pod), container.Name, mount.Name, propagation) + + mounts = append(mounts, kubecontainer.Mount{ + Name: mount.Name, + ContainerPath: containerPath, + HostPath: hostPath, + ReadOnly: mount.ReadOnly, + SELinuxRelabel: relabelVolume, + Propagation: propagation, + }) + } + if mountEtcHostsFile { + hostAliases := pod.Spec.HostAliases + hostsMount, err := makeHostsMount(podDir, podIP, hostName, hostDomain, hostAliases, pod.Spec.HostNetwork) + if err != nil { + return nil, err + } + mounts = append(mounts, *hostsMount) + } + return mounts, nil +} + +// translateMountPropagation transforms v1.MountPropagationMode to +// runtimeapi.MountPropagation. +func translateMountPropagation(mountMode *v1.MountPropagationMode) (runtimeapi.MountPropagation, error) { + if !utilfeature.DefaultFeatureGate.Enabled(features.MountPropagation) { + // mount propagation is disabled, use private as in the old versions + return runtimeapi.MountPropagation_PROPAGATION_PRIVATE, nil + } + switch { + case mountMode == nil: + // HostToContainer is the default + return runtimeapi.MountPropagation_PROPAGATION_HOST_TO_CONTAINER, nil + case *mountMode == v1.MountPropagationHostToContainer: + return runtimeapi.MountPropagation_PROPAGATION_HOST_TO_CONTAINER, nil + case *mountMode == v1.MountPropagationBidirectional: + return runtimeapi.MountPropagation_PROPAGATION_BIDIRECTIONAL, nil + default: + return 0, fmt.Errorf("invalid MountPropagation mode: %q", mountMode) + } +} + +// makeHostsMount makes the mountpoint for the hosts file that the containers +// in a pod are injected with. +func makeHostsMount(podDir, podIP, hostName, hostDomainName string, hostAliases []v1.HostAlias, useHostNetwork bool) (*kubecontainer.Mount, error) { + hostsFilePath := path.Join(podDir, "etc-hosts") + if err := ensureHostsFile(hostsFilePath, podIP, hostName, hostDomainName, hostAliases, useHostNetwork); err != nil { + return nil, err + } + return &kubecontainer.Mount{ + Name: "k8s-managed-etc-hosts", + ContainerPath: etcHostsPath, + HostPath: hostsFilePath, + ReadOnly: false, + SELinuxRelabel: true, + }, nil +} + +// ensureHostsFile ensures that the given host file has an up-to-date ip, host +// name, and domain name. +func ensureHostsFile(fileName, hostIP, hostName, hostDomainName string, hostAliases []v1.HostAlias, useHostNetwork bool) error { + var hostsFileContent []byte + var err error + + if useHostNetwork { + // if Pod is using host network, read hosts file from the node's filesystem. + // `etcHostsPath` references the location of the hosts file on the node. + // `/etc/hosts` for *nix systems. + hostsFileContent, err = nodeHostsFileContent(etcHostsPath, hostAliases) + if err != nil { + return err + } + } else { + // if Pod is not using host network, create a managed hosts file with Pod IP and other information. + hostsFileContent = managedHostsFileContent(hostIP, hostName, hostDomainName, hostAliases) + } + + return ioutil.WriteFile(fileName, hostsFileContent, 0644) +} + +// nodeHostsFileContent reads the content of node's hosts file. +func nodeHostsFileContent(hostsFilePath string, hostAliases []v1.HostAlias) ([]byte, error) { + hostsFileContent, err := ioutil.ReadFile(hostsFilePath) + if err != nil { + return nil, err + } + hostsFileContent = append(hostsFileContent, hostsEntriesFromHostAliases(hostAliases)...) + return hostsFileContent, nil +} + +// managedHostsFileContent generates the content of the managed etc hosts based on Pod IP and other +// information. +func managedHostsFileContent(hostIP, hostName, hostDomainName string, hostAliases []v1.HostAlias) []byte { + var buffer bytes.Buffer + buffer.WriteString("# Kubernetes-managed hosts file.\n") + buffer.WriteString("127.0.0.1\tlocalhost\n") // ipv4 localhost + buffer.WriteString("::1\tlocalhost ip6-localhost ip6-loopback\n") // ipv6 localhost + buffer.WriteString("fe00::0\tip6-localnet\n") + buffer.WriteString("fe00::0\tip6-mcastprefix\n") + buffer.WriteString("fe00::1\tip6-allnodes\n") + buffer.WriteString("fe00::2\tip6-allrouters\n") + if len(hostDomainName) > 0 { + buffer.WriteString(fmt.Sprintf("%s\t%s.%s\t%s\n", hostIP, hostName, hostDomainName, hostName)) + } else { + buffer.WriteString(fmt.Sprintf("%s\t%s\n", hostIP, hostName)) + } + hostsFileContent := buffer.Bytes() + hostsFileContent = append(hostsFileContent, hostsEntriesFromHostAliases(hostAliases)...) + return hostsFileContent +} + +func hostsEntriesFromHostAliases(hostAliases []v1.HostAlias) []byte { + if len(hostAliases) == 0 { + return []byte{} + } + + var buffer bytes.Buffer + buffer.WriteString("\n") + buffer.WriteString("# Entries added by HostAliases.\n") + // write each IP/hostname pair as an entry into hosts file + for _, hostAlias := range hostAliases { + for _, hostname := range hostAlias.Hostnames { + buffer.WriteString(fmt.Sprintf("%s\t%s\n", hostAlias.IP, hostname)) + } + } + return buffer.Bytes() +} + +// truncatePodHostnameIfNeeded truncates the pod hostname if it's longer than 63 chars. +func truncatePodHostnameIfNeeded(podName, hostname string) (string, error) { + // Cap hostname at 63 chars (specification is 64bytes which is 63 chars and the null terminating char). + const hostnameMaxLen = 63 + if len(hostname) <= hostnameMaxLen { + return hostname, nil + } + truncated := hostname[:hostnameMaxLen] + glog.Errorf("hostname for pod:%q was longer than %d. Truncated hostname to :%q", podName, hostnameMaxLen, truncated) + // hostname should not end with '-' or '.' + truncated = strings.TrimRight(truncated, "-.") + if len(truncated) == 0 { + // This should never happen. + return "", fmt.Errorf("hostname for pod %q was invalid: %q", podName, hostname) + } + return truncated, nil +} + +// GeneratePodHostNameAndDomain creates a hostname and domain name for a pod, +// given that pod's spec and annotations or returns an error. +func (kl *Kubelet) GeneratePodHostNameAndDomain(pod *v1.Pod) (string, string, error) { + // TODO(vmarmol): Handle better. + clusterDomain := kl.clusterDomain + + hostname := pod.Name + if len(pod.Spec.Hostname) > 0 { + if msgs := utilvalidation.IsDNS1123Label(pod.Spec.Hostname); len(msgs) != 0 { + return "", "", fmt.Errorf("Pod Hostname %q is not a valid DNS label: %s", pod.Spec.Hostname, strings.Join(msgs, ";")) + } + hostname = pod.Spec.Hostname + } + + hostname, err := truncatePodHostnameIfNeeded(pod.Name, hostname) + if err != nil { + return "", "", err + } + + hostDomain := "" + if len(pod.Spec.Subdomain) > 0 { + if msgs := utilvalidation.IsDNS1123Label(pod.Spec.Subdomain); len(msgs) != 0 { + return "", "", fmt.Errorf("Pod Subdomain %q is not a valid DNS label: %s", pod.Spec.Subdomain, strings.Join(msgs, ";")) + } + hostDomain = fmt.Sprintf("%s.%s.svc.%s", pod.Spec.Subdomain, pod.Namespace, clusterDomain) + } + + return hostname, hostDomain, nil +} + +// GetPodCgroupParent gets pod cgroup parent from container manager. +func (kl *Kubelet) GetPodCgroupParent(pod *v1.Pod) string { + pcm := kl.containerManager.NewPodContainerManager() + _, cgroupParent := pcm.GetPodContainerName(pod) + return cgroupParent +} + +// GenerateRunContainerOptions generates the RunContainerOptions, which can be used by +// the container runtime to set parameters for launching a container. +func (kl *Kubelet) GenerateRunContainerOptions(pod *v1.Pod, container *v1.Container, podIP string) (*kubecontainer.RunContainerOptions, bool, error) { + useClusterFirstPolicy := false + opts, err := kl.containerManager.GetResources(pod, container, kl.GetActivePods()) + if err != nil { + return nil, false, err + } + + cgroupParent := kl.GetPodCgroupParent(pod) + opts.CgroupParent = cgroupParent + hostname, hostDomainName, err := kl.GeneratePodHostNameAndDomain(pod) + if err != nil { + return nil, false, err + } + opts.Hostname = hostname + podName := volumehelper.GetUniquePodName(pod) + volumes := kl.volumeManager.GetMountedVolumesForPod(podName) + + opts.PortMappings = kubecontainer.MakePortMappings(container) + // TODO(random-liu): Move following convert functions into pkg/kubelet/container + devices, err := kl.makeDevices(pod, container) + if err != nil { + return nil, false, err + } + opts.Devices = append(opts.Devices, devices...) + + mounts, err := makeMounts(pod, kl.getPodDir(pod.UID), container, hostname, hostDomainName, podIP, volumes) + if err != nil { + return nil, false, err + } + opts.Mounts = append(opts.Mounts, mounts...) + + envs, err := kl.makeEnvironmentVariables(pod, container, podIP) + if err != nil { + return nil, false, err + } + opts.Envs = append(opts.Envs, envs...) + + // Disabling adding TerminationMessagePath on Windows as these files would be mounted as docker volume and + // Docker for Windows has a bug where only directories can be mounted + if len(container.TerminationMessagePath) != 0 && runtime.GOOS != "windows" { + p := kl.getPodContainerDir(pod.UID, container.Name) + if err := os.MkdirAll(p, 0750); err != nil { + glog.Errorf("Error on creating %q: %v", p, err) + } else { + opts.PodContainerDir = p + } + } + + opts.DNS, opts.DNSSearch, useClusterFirstPolicy, err = kl.GetClusterDNS(pod) + if err != nil { + return nil, false, err + } + + // only do this check if the experimental behavior is enabled, otherwise allow it to default to false + if kl.experimentalHostUserNamespaceDefaulting { + opts.EnableHostUserNamespace = kl.enableHostUserNamespace(pod) + } + + return opts, useClusterFirstPolicy, nil +} + +var masterServices = sets.NewString("kubernetes") + +// getServiceEnvVarMap makes a map[string]string of env vars for services a +// pod in namespace ns should see. +func (kl *Kubelet) getServiceEnvVarMap(ns string) (map[string]string, error) { + var ( + serviceMap = make(map[string]*v1.Service) + m = make(map[string]string) + ) + + // Get all service resources from the master (via a cache), + // and populate them into service environment variables. + if kl.serviceLister == nil { + // Kubelets without masters (e.g. plain GCE ContainerVM) don't set env vars. + return m, nil + } + services, err := kl.serviceLister.List(labels.Everything()) + if err != nil { + return m, fmt.Errorf("failed to list services when setting up env vars") + } + + // project the services in namespace ns onto the master services + for i := range services { + service := services[i] + // ignore services where ClusterIP is "None" or empty + if !v1helper.IsServiceIPSet(service) { + continue + } + serviceName := service.Name + + switch service.Namespace { + // for the case whether the master service namespace is the namespace the pod + // is in, the pod should receive all the services in the namespace. + // + // ordering of the case clauses below enforces this + case ns: + serviceMap[serviceName] = service + case kl.masterServiceNamespace: + if masterServices.Has(serviceName) { + if _, exists := serviceMap[serviceName]; !exists { + serviceMap[serviceName] = service + } + } + } + } + + mappedServices := []*v1.Service{} + for key := range serviceMap { + mappedServices = append(mappedServices, serviceMap[key]) + } + + for _, e := range envvars.FromServices(mappedServices) { + m[e.Name] = e.Value + } + return m, nil +} + +// Make the environment variables for a pod in the given namespace. +func (kl *Kubelet) makeEnvironmentVariables(pod *v1.Pod, container *v1.Container, podIP string) ([]kubecontainer.EnvVar, error) { + var result []kubecontainer.EnvVar + // Note: These are added to the docker Config, but are not included in the checksum computed + // by kubecontainer.HashContainer(...). That way, we can still determine whether an + // v1.Container is already running by its hash. (We don't want to restart a container just + // because some service changed.) + // + // Note that there is a race between Kubelet seeing the pod and kubelet seeing the service. + // To avoid this users can: (1) wait between starting a service and starting; or (2) detect + // missing service env var and exit and be restarted; or (3) use DNS instead of env vars + // and keep trying to resolve the DNS name of the service (recommended). + serviceEnv, err := kl.getServiceEnvVarMap(pod.Namespace) + if err != nil { + return result, err + } + + var ( + configMaps = make(map[string]*v1.ConfigMap) + secrets = make(map[string]*v1.Secret) + tmpEnv = make(map[string]string) + ) + + // Env will override EnvFrom variables. + // Process EnvFrom first then allow Env to replace existing values. + for _, envFrom := range container.EnvFrom { + switch { + case envFrom.ConfigMapRef != nil: + cm := envFrom.ConfigMapRef + name := cm.Name + configMap, ok := configMaps[name] + if !ok { + if kl.kubeClient == nil { + return result, fmt.Errorf("Couldn't get configMap %v/%v, no kubeClient defined", pod.Namespace, name) + } + optional := cm.Optional != nil && *cm.Optional + configMap, err = kl.configMapManager.GetConfigMap(pod.Namespace, name) + if err != nil { + if errors.IsNotFound(err) && optional { + // ignore error when marked optional + continue + } + return result, err + } + configMaps[name] = configMap + } + + invalidKeys := []string{} + for k, v := range configMap.Data { + if len(envFrom.Prefix) > 0 { + k = envFrom.Prefix + k + } + if errMsgs := utilvalidation.IsEnvVarName(k); len(errMsgs) != 0 { + invalidKeys = append(invalidKeys, k) + continue + } + tmpEnv[k] = v + } + if len(invalidKeys) > 0 { + sort.Strings(invalidKeys) + kl.recorder.Eventf(pod, v1.EventTypeWarning, "InvalidEnvironmentVariableNames", "Keys [%s] from the EnvFrom configMap %s/%s were skipped since they are considered invalid environment variable names.", strings.Join(invalidKeys, ", "), pod.Namespace, name) + } + case envFrom.SecretRef != nil: + s := envFrom.SecretRef + name := s.Name + secret, ok := secrets[name] + if !ok { + if kl.kubeClient == nil { + return result, fmt.Errorf("Couldn't get secret %v/%v, no kubeClient defined", pod.Namespace, name) + } + optional := s.Optional != nil && *s.Optional + secret, err = kl.secretManager.GetSecret(pod.Namespace, name) + if err != nil { + if errors.IsNotFound(err) && optional { + // ignore error when marked optional + continue + } + return result, err + } + secrets[name] = secret + } + + invalidKeys := []string{} + for k, v := range secret.Data { + if len(envFrom.Prefix) > 0 { + k = envFrom.Prefix + k + } + if errMsgs := utilvalidation.IsEnvVarName(k); len(errMsgs) != 0 { + invalidKeys = append(invalidKeys, k) + continue + } + tmpEnv[k] = string(v) + } + if len(invalidKeys) > 0 { + sort.Strings(invalidKeys) + kl.recorder.Eventf(pod, v1.EventTypeWarning, "InvalidEnvironmentVariableNames", "Keys [%s] from the EnvFrom secret %s/%s were skipped since they are considered invalid environment variable names.", strings.Join(invalidKeys, ", "), pod.Namespace, name) + } + } + } + + // Determine the final values of variables: + // + // 1. Determine the final value of each variable: + // a. If the variable's Value is set, expand the `$(var)` references to other + // variables in the .Value field; the sources of variables are the declared + // variables of the container and the service environment variables + // b. If a source is defined for an environment variable, resolve the source + // 2. Create the container's environment in the order variables are declared + // 3. Add remaining service environment vars + var ( + mappingFunc = expansion.MappingFuncFor(tmpEnv, serviceEnv) + ) + for _, envVar := range container.Env { + runtimeVal := envVar.Value + if runtimeVal != "" { + // Step 1a: expand variable references + runtimeVal = expansion.Expand(runtimeVal, mappingFunc) + } else if envVar.ValueFrom != nil { + // Step 1b: resolve alternate env var sources + switch { + case envVar.ValueFrom.FieldRef != nil: + runtimeVal, err = kl.podFieldSelectorRuntimeValue(envVar.ValueFrom.FieldRef, pod, podIP) + if err != nil { + return result, err + } + case envVar.ValueFrom.ResourceFieldRef != nil: + defaultedPod, defaultedContainer, err := kl.defaultPodLimitsForDownwardAPI(pod, container) + if err != nil { + return result, err + } + runtimeVal, err = containerResourceRuntimeValue(envVar.ValueFrom.ResourceFieldRef, defaultedPod, defaultedContainer) + if err != nil { + return result, err + } + case envVar.ValueFrom.ConfigMapKeyRef != nil: + cm := envVar.ValueFrom.ConfigMapKeyRef + name := cm.Name + key := cm.Key + optional := cm.Optional != nil && *cm.Optional + configMap, ok := configMaps[name] + if !ok { + if kl.kubeClient == nil { + return result, fmt.Errorf("Couldn't get configMap %v/%v, no kubeClient defined", pod.Namespace, name) + } + configMap, err = kl.configMapManager.GetConfigMap(pod.Namespace, name) + if err != nil { + if errors.IsNotFound(err) && optional { + // ignore error when marked optional + continue + } + return result, err + } + configMaps[name] = configMap + } + runtimeVal, ok = configMap.Data[key] + if !ok { + if optional { + continue + } + return result, fmt.Errorf("Couldn't find key %v in ConfigMap %v/%v", key, pod.Namespace, name) + } + case envVar.ValueFrom.SecretKeyRef != nil: + s := envVar.ValueFrom.SecretKeyRef + name := s.Name + key := s.Key + optional := s.Optional != nil && *s.Optional + secret, ok := secrets[name] + if !ok { + if kl.kubeClient == nil { + return result, fmt.Errorf("Couldn't get secret %v/%v, no kubeClient defined", pod.Namespace, name) + } + secret, err = kl.secretManager.GetSecret(pod.Namespace, name) + if err != nil { + if errors.IsNotFound(err) && optional { + // ignore error when marked optional + continue + } + return result, err + } + secrets[name] = secret + } + runtimeValBytes, ok := secret.Data[key] + if !ok { + if optional { + continue + } + return result, fmt.Errorf("Couldn't find key %v in Secret %v/%v", key, pod.Namespace, name) + } + runtimeVal = string(runtimeValBytes) + } + } + // Accesses apiserver+Pods. + // So, the master may set service env vars, or kubelet may. In case both are doing + // it, we delete the key from the kubelet-generated ones so we don't have duplicate + // env vars. + // TODO: remove this next line once all platforms use apiserver+Pods. + delete(serviceEnv, envVar.Name) + + tmpEnv[envVar.Name] = runtimeVal + } + + // Append the env vars + for k, v := range tmpEnv { + result = append(result, kubecontainer.EnvVar{Name: k, Value: v}) + } + + // Append remaining service env vars. + for k, v := range serviceEnv { + // Accesses apiserver+Pods. + // So, the master may set service env vars, or kubelet may. In case both are doing + // it, we skip the key from the kubelet-generated ones so we don't have duplicate + // env vars. + // TODO: remove this next line once all platforms use apiserver+Pods. + if _, present := tmpEnv[k]; !present { + result = append(result, kubecontainer.EnvVar{Name: k, Value: v}) + } + } + return result, nil +} + +// podFieldSelectorRuntimeValue returns the runtime value of the given +// selector for a pod. +func (kl *Kubelet) podFieldSelectorRuntimeValue(fs *v1.ObjectFieldSelector, pod *v1.Pod, podIP string) (string, error) { + internalFieldPath, _, err := api.Scheme.ConvertFieldLabel(fs.APIVersion, "Pod", fs.FieldPath, "") + if err != nil { + return "", err + } + switch internalFieldPath { + case "spec.nodeName": + return pod.Spec.NodeName, nil + case "spec.serviceAccountName": + return pod.Spec.ServiceAccountName, nil + case "status.hostIP": + hostIP, err := kl.getHostIPAnyWay() + if err != nil { + return "", err + } + return hostIP.String(), nil + case "status.podIP": + return podIP, nil + } + return fieldpath.ExtractFieldPathAsString(pod, internalFieldPath) +} + +// containerResourceRuntimeValue returns the value of the provided container resource +func containerResourceRuntimeValue(fs *v1.ResourceFieldSelector, pod *v1.Pod, container *v1.Container) (string, error) { + containerName := fs.ContainerName + if len(containerName) == 0 { + return resource.ExtractContainerResourceValue(fs, container) + } + return resource.ExtractResourceValueByContainerName(fs, pod, containerName) +} + +// One of the following arguments must be non-nil: runningPod, status. +// TODO: Modify containerRuntime.KillPod() to accept the right arguments. +func (kl *Kubelet) killPod(pod *v1.Pod, runningPod *kubecontainer.Pod, status *kubecontainer.PodStatus, gracePeriodOverride *int64) error { + var p kubecontainer.Pod + if runningPod != nil { + p = *runningPod + } else if status != nil { + p = kubecontainer.ConvertPodStatusToRunningPod(kl.GetRuntime().Type(), status) + } else { + return fmt.Errorf("one of the two arguments must be non-nil: runningPod, status") + } + + // Call the container runtime KillPod method which stops all running containers of the pod + if err := kl.containerRuntime.KillPod(pod, p, gracePeriodOverride); err != nil { + return err + } + if err := kl.containerManager.UpdateQOSCgroups(); err != nil { + glog.V(2).Infof("Failed to update QoS cgroups while killing pod: %v", err) + } + return nil +} + +// makePodDataDirs creates the dirs for the pod datas. +func (kl *Kubelet) makePodDataDirs(pod *v1.Pod) error { + uid := pod.UID + if err := os.MkdirAll(kl.getPodDir(uid), 0750); err != nil && !os.IsExist(err) { + return err + } + if err := os.MkdirAll(kl.getPodVolumesDir(uid), 0750); err != nil && !os.IsExist(err) { + return err + } + if err := os.MkdirAll(kl.getPodPluginsDir(uid), 0750); err != nil && !os.IsExist(err) { + return err + } + return nil +} + +// getPullSecretsForPod inspects the Pod and retrieves the referenced pull +// secrets. +func (kl *Kubelet) getPullSecretsForPod(pod *v1.Pod) []v1.Secret { + pullSecrets := []v1.Secret{} + + for _, secretRef := range pod.Spec.ImagePullSecrets { + secret, err := kl.secretManager.GetSecret(pod.Namespace, secretRef.Name) + if err != nil { + glog.Warningf("Unable to retrieve pull secret %s/%s for %s/%s due to %v. The image pull may not succeed.", pod.Namespace, secretRef.Name, pod.Namespace, pod.Name, err) + continue + } + + pullSecrets = append(pullSecrets, *secret) + } + + return pullSecrets +} + +// podIsTerminated returns true if pod is in the terminated state ("Failed" or "Succeeded"). +func (kl *Kubelet) podIsTerminated(pod *v1.Pod) bool { + // Check the cached pod status which was set after the last sync. + status, ok := kl.statusManager.GetPodStatus(pod.UID) + if !ok { + // If there is no cached status, use the status from the + // apiserver. This is useful if kubelet has recently been + // restarted. + status = pod.Status + } + return status.Phase == v1.PodFailed || status.Phase == v1.PodSucceeded || (pod.DeletionTimestamp != nil && notRunning(status.ContainerStatuses)) +} + +// IsPodDeleted returns true if the pod is deleted. For the pod to be deleted, either: +// 1. The pod object is deleted +// 2. The pod's status is evicted +// 3. The pod's deletion timestamp is set, and containers are not running +func (kl *Kubelet) IsPodDeleted(uid types.UID) bool { + pod, podFound := kl.podManager.GetPodByUID(uid) + if !podFound { + return true + } + status, statusFound := kl.statusManager.GetPodStatus(pod.UID) + if !statusFound { + status = pod.Status + } + return eviction.PodIsEvicted(status) || (pod.DeletionTimestamp != nil && notRunning(status.ContainerStatuses)) +} + +// PodResourcesAreReclaimed returns true if all required node-level resources that a pod was consuming have +// been reclaimed by the kubelet. Reclaiming resources is a prerequisite to deleting a pod from the API server. +func (kl *Kubelet) PodResourcesAreReclaimed(pod *v1.Pod, status v1.PodStatus) bool { + if !notRunning(status.ContainerStatuses) { + // We shouldnt delete pods that still have running containers + glog.V(3).Infof("Pod %q is terminated, but some containers are still running", format.Pod(pod)) + return false + } + // pod's containers should be deleted + runtimeStatus, err := kl.podCache.Get(pod.UID) + if err != nil { + glog.V(3).Infof("Pod %q is terminated, Error getting runtimeStatus from the podCache: %s", format.Pod(pod), err) + return false + } + if len(runtimeStatus.ContainerStatuses) > 0 { + glog.V(3).Infof("Pod %q is terminated, but some containers have not been cleaned up: %+v", format.Pod(pod), runtimeStatus.ContainerStatuses) + return false + } + if kl.podVolumesExist(pod.UID) && !kl.kubeletConfiguration.KeepTerminatedPodVolumes { + // We shouldnt delete pods whose volumes have not been cleaned up if we are not keeping terminated pod volumes + glog.V(3).Infof("Pod %q is terminated, but some volumes have not been cleaned up", format.Pod(pod)) + return false + } + if kl.kubeletConfiguration.CgroupsPerQOS { + pcm := kl.containerManager.NewPodContainerManager() + if pcm.Exists(pod) { + glog.V(3).Infof("Pod %q is terminated, but pod cgroup sandbox has not been cleaned up", format.Pod(pod)) + return false + } + } + return true +} + +// podResourcesAreReclaimed simply calls PodResourcesAreReclaimed with the most up-to-date status. +func (kl *Kubelet) podResourcesAreReclaimed(pod *v1.Pod) bool { + status, ok := kl.statusManager.GetPodStatus(pod.UID) + if !ok { + status = pod.Status + } + return kl.PodResourcesAreReclaimed(pod, status) +} + +// notRunning returns true if every status is terminated or waiting, or the status list +// is empty. +func notRunning(statuses []v1.ContainerStatus) bool { + for _, status := range statuses { + if status.State.Terminated == nil && status.State.Waiting == nil { + return false + } + } + return true +} + +// filterOutTerminatedPods returns the given pods which the status manager +// does not consider failed or succeeded. +func (kl *Kubelet) filterOutTerminatedPods(pods []*v1.Pod) []*v1.Pod { + var filteredPods []*v1.Pod + for _, p := range pods { + if kl.podIsTerminated(p) { + continue + } + filteredPods = append(filteredPods, p) + } + return filteredPods +} + +// removeOrphanedPodStatuses removes obsolete entries in podStatus where +// the pod is no longer considered bound to this node. +func (kl *Kubelet) removeOrphanedPodStatuses(pods []*v1.Pod, mirrorPods []*v1.Pod) { + podUIDs := make(map[types.UID]bool) + for _, pod := range pods { + podUIDs[pod.UID] = true + } + for _, pod := range mirrorPods { + podUIDs[pod.UID] = true + } + kl.statusManager.RemoveOrphanedStatuses(podUIDs) +} + +// HandlePodCleanups performs a series of cleanup work, including terminating +// pod workers, killing unwanted pods, and removing orphaned volumes/pod +// directories. +// NOTE: This function is executed by the main sync loop, so it +// should not contain any blocking calls. +func (kl *Kubelet) HandlePodCleanups() error { + // The kubelet lacks checkpointing, so we need to introspect the set of pods + // in the cgroup tree prior to inspecting the set of pods in our pod manager. + // this ensures our view of the cgroup tree does not mistakenly observe pods + // that are added after the fact... + var ( + cgroupPods map[types.UID]cm.CgroupName + err error + ) + if kl.cgroupsPerQOS { + pcm := kl.containerManager.NewPodContainerManager() + cgroupPods, err = pcm.GetAllPodsFromCgroups() + if err != nil { + return fmt.Errorf("failed to get list of pods that still exist on cgroup mounts: %v", err) + } + } + + allPods, mirrorPods := kl.podManager.GetPodsAndMirrorPods() + // Pod phase progresses monotonically. Once a pod has reached a final state, + // it should never leave regardless of the restart policy. The statuses + // of such pods should not be changed, and there is no need to sync them. + // TODO: the logic here does not handle two cases: + // 1. If the containers were removed immediately after they died, kubelet + // may fail to generate correct statuses, let alone filtering correctly. + // 2. If kubelet restarted before writing the terminated status for a pod + // to the apiserver, it could still restart the terminated pod (even + // though the pod was not considered terminated by the apiserver). + // These two conditions could be alleviated by checkpointing kubelet. + activePods := kl.filterOutTerminatedPods(allPods) + + desiredPods := make(map[types.UID]empty) + for _, pod := range activePods { + desiredPods[pod.UID] = empty{} + } + // Stop the workers for no-longer existing pods. + // TODO: is here the best place to forget pod workers? + kl.podWorkers.ForgetNonExistingPodWorkers(desiredPods) + kl.probeManager.CleanupPods(activePods) + + runningPods, err := kl.runtimeCache.GetPods() + if err != nil { + glog.Errorf("Error listing containers: %#v", err) + return err + } + for _, pod := range runningPods { + if _, found := desiredPods[pod.ID]; !found { + kl.podKillingCh <- &kubecontainer.PodPair{APIPod: nil, RunningPod: pod} + } + } + + kl.removeOrphanedPodStatuses(allPods, mirrorPods) + // Note that we just killed the unwanted pods. This may not have reflected + // in the cache. We need to bypass the cache to get the latest set of + // running pods to clean up the volumes. + // TODO: Evaluate the performance impact of bypassing the runtime cache. + runningPods, err = kl.containerRuntime.GetPods(false) + if err != nil { + glog.Errorf("Error listing containers: %#v", err) + return err + } + + // Remove any orphaned volumes. + // Note that we pass all pods (including terminated pods) to the function, + // so that we don't remove volumes associated with terminated but not yet + // deleted pods. + err = kl.cleanupOrphanedPodDirs(allPods, runningPods) + if err != nil { + // We want all cleanup tasks to be run even if one of them failed. So + // we just log an error here and continue other cleanup tasks. + // This also applies to the other clean up tasks. + glog.Errorf("Failed cleaning up orphaned pod directories: %v", err) + } + + // Remove any orphaned mirror pods. + kl.podManager.DeleteOrphanedMirrorPods() + + // Remove any cgroups in the hierarchy for pods that are no longer running. + if kl.cgroupsPerQOS { + kl.cleanupOrphanedPodCgroups(cgroupPods, activePods) + } + + kl.backOff.GC() + return nil +} + +// podKiller launches a goroutine to kill a pod received from the channel if +// another goroutine isn't already in action. +func (kl *Kubelet) podKiller() { + killing := sets.NewString() + // guard for the killing set + lock := sync.Mutex{} + for { + select { + case podPair, ok := <-kl.podKillingCh: + if !ok { + return + } + + runningPod := podPair.RunningPod + apiPod := podPair.APIPod + + lock.Lock() + exists := killing.Has(string(runningPod.ID)) + if !exists { + killing.Insert(string(runningPod.ID)) + } + lock.Unlock() + + if !exists { + go func(apiPod *v1.Pod, runningPod *kubecontainer.Pod) { + glog.V(2).Infof("Killing unwanted pod %q", runningPod.Name) + err := kl.killPod(apiPod, runningPod, nil, nil) + if err != nil { + glog.Errorf("Failed killing the pod %q: %v", runningPod.Name, err) + } + lock.Lock() + killing.Delete(string(runningPod.ID)) + lock.Unlock() + }(apiPod, runningPod) + } + } + } +} + +// hasHostPortConflicts detects pods with conflicted host ports. +func hasHostPortConflicts(pods []*v1.Pod) bool { + ports := sets.String{} + for _, pod := range pods { + if errs := validation.AccumulateUniqueHostPorts(pod.Spec.Containers, &ports, field.NewPath("spec", "containers")); len(errs) > 0 { + glog.Errorf("Pod %q: HostPort is already allocated, ignoring: %v", format.Pod(pod), errs) + return true + } + if errs := validation.AccumulateUniqueHostPorts(pod.Spec.InitContainers, &ports, field.NewPath("spec", "initContainers")); len(errs) > 0 { + glog.Errorf("Pod %q: HostPort is already allocated, ignoring: %v", format.Pod(pod), errs) + return true + } + } + return false +} + +// validateContainerLogStatus returns the container ID for the desired container to retrieve logs for, based on the state +// of the container. The previous flag will only return the logs for the last terminated container, otherwise, the current +// running container is preferred over a previous termination. If info about the container is not available then a specific +// error is returned to the end user. +func (kl *Kubelet) validateContainerLogStatus(podName string, podStatus *v1.PodStatus, containerName string, previous bool) (containerID kubecontainer.ContainerID, err error) { + var cID string + + cStatus, found := podutil.GetContainerStatus(podStatus.ContainerStatuses, containerName) + // if not found, check the init containers + if !found { + cStatus, found = podutil.GetContainerStatus(podStatus.InitContainerStatuses, containerName) + } + if !found { + return kubecontainer.ContainerID{}, fmt.Errorf("container %q in pod %q is not available", containerName, podName) + } + lastState := cStatus.LastTerminationState + waiting, running, terminated := cStatus.State.Waiting, cStatus.State.Running, cStatus.State.Terminated + + switch { + case previous: + if lastState.Terminated == nil { + return kubecontainer.ContainerID{}, fmt.Errorf("previous terminated container %q in pod %q not found", containerName, podName) + } + cID = lastState.Terminated.ContainerID + + case running != nil: + cID = cStatus.ContainerID + + case terminated != nil: + cID = terminated.ContainerID + + case lastState.Terminated != nil: + cID = lastState.Terminated.ContainerID + + case waiting != nil: + // output some info for the most common pending failures + switch reason := waiting.Reason; reason { + case images.ErrImagePull.Error(): + return kubecontainer.ContainerID{}, fmt.Errorf("container %q in pod %q is waiting to start: image can't be pulled", containerName, podName) + case images.ErrImagePullBackOff.Error(): + return kubecontainer.ContainerID{}, fmt.Errorf("container %q in pod %q is waiting to start: trying and failing to pull image", containerName, podName) + default: + return kubecontainer.ContainerID{}, fmt.Errorf("container %q in pod %q is waiting to start: %v", containerName, podName, reason) + } + default: + // unrecognized state + return kubecontainer.ContainerID{}, fmt.Errorf("container %q in pod %q is waiting to start - no logs yet", containerName, podName) + } + + return kubecontainer.ParseContainerID(cID), nil +} + +// GetKubeletContainerLogs returns logs from the container +// TODO: this method is returning logs of random container attempts, when it should be returning the most recent attempt +// or all of them. +func (kl *Kubelet) GetKubeletContainerLogs(podFullName, containerName string, logOptions *v1.PodLogOptions, stdout, stderr io.Writer) error { + // Pod workers periodically write status to statusManager. If status is not + // cached there, something is wrong (or kubelet just restarted and hasn't + // caught up yet). Just assume the pod is not ready yet. + name, namespace, err := kubecontainer.ParsePodFullName(podFullName) + if err != nil { + return fmt.Errorf("unable to parse pod full name %q: %v", podFullName, err) + } + + pod, ok := kl.GetPodByName(namespace, name) + if !ok { + return fmt.Errorf("pod %q cannot be found - no logs available", name) + } + + podUID := pod.UID + if mirrorPod, ok := kl.podManager.GetMirrorPodByPod(pod); ok { + podUID = mirrorPod.UID + } + podStatus, found := kl.statusManager.GetPodStatus(podUID) + if !found { + // If there is no cached status, use the status from the + // apiserver. This is useful if kubelet has recently been + // restarted. + podStatus = pod.Status + } + + // TODO: Consolidate the logic here with kuberuntime.GetContainerLogs, here we convert container name to containerID, + // but inside kuberuntime we convert container id back to container name and restart count. + // TODO: After separate container log lifecycle management, we should get log based on the existing log files + // instead of container status. + containerID, err := kl.validateContainerLogStatus(pod.Name, &podStatus, containerName, logOptions.Previous) + if err != nil { + return err + } + + // Do a zero-byte write to stdout before handing off to the container runtime. + // This ensures at least one Write call is made to the writer when copying starts, + // even if we then block waiting for log output from the container. + if _, err := stdout.Write([]byte{}); err != nil { + return err + } + + if kl.dockerLegacyService != nil { + // dockerLegacyService should only be non-nil when we actually need it, so + // inject it into the runtimeService. + // TODO(random-liu): Remove this hack after deprecating unsupported log driver. + return kl.dockerLegacyService.GetContainerLogs(pod, containerID, logOptions, stdout, stderr) + } + return kl.containerRuntime.GetContainerLogs(pod, containerID, logOptions, stdout, stderr) +} + +// GetPhase returns the phase of a pod given its container info. +// This func is exported to simplify integration with 3rd party kubelet +// integrations like kubernetes-mesos. +func GetPhase(spec *v1.PodSpec, info []v1.ContainerStatus) v1.PodPhase { + initialized := 0 + pendingInitialization := 0 + failedInitialization := 0 + for _, container := range spec.InitContainers { + containerStatus, ok := podutil.GetContainerStatus(info, container.Name) + if !ok { + pendingInitialization++ + continue + } + + switch { + case containerStatus.State.Running != nil: + pendingInitialization++ + case containerStatus.State.Terminated != nil: + if containerStatus.State.Terminated.ExitCode == 0 { + initialized++ + } else { + failedInitialization++ + } + case containerStatus.State.Waiting != nil: + if containerStatus.LastTerminationState.Terminated != nil { + if containerStatus.LastTerminationState.Terminated.ExitCode == 0 { + initialized++ + } else { + failedInitialization++ + } + } else { + pendingInitialization++ + } + default: + pendingInitialization++ + } + } + + unknown := 0 + running := 0 + waiting := 0 + stopped := 0 + failed := 0 + succeeded := 0 + for _, container := range spec.Containers { + containerStatus, ok := podutil.GetContainerStatus(info, container.Name) + if !ok { + unknown++ + continue + } + + switch { + case containerStatus.State.Running != nil: + running++ + case containerStatus.State.Terminated != nil: + stopped++ + if containerStatus.State.Terminated.ExitCode == 0 { + succeeded++ + } else { + failed++ + } + case containerStatus.State.Waiting != nil: + if containerStatus.LastTerminationState.Terminated != nil { + stopped++ + } else { + waiting++ + } + default: + unknown++ + } + } + + if failedInitialization > 0 && spec.RestartPolicy == v1.RestartPolicyNever { + return v1.PodFailed + } + + switch { + case pendingInitialization > 0: + fallthrough + case waiting > 0: + glog.V(5).Infof("pod waiting > 0, pending") + // One or more containers has not been started + return v1.PodPending + case running > 0 && unknown == 0: + // All containers have been started, and at least + // one container is running + return v1.PodRunning + case running == 0 && stopped > 0 && unknown == 0: + // All containers are terminated + if spec.RestartPolicy == v1.RestartPolicyAlways { + // All containers are in the process of restarting + return v1.PodRunning + } + if stopped == succeeded { + // RestartPolicy is not Always, and all + // containers are terminated in success + return v1.PodSucceeded + } + if spec.RestartPolicy == v1.RestartPolicyNever { + // RestartPolicy is Never, and all containers are + // terminated with at least one in failure + return v1.PodFailed + } + // RestartPolicy is OnFailure, and at least one in failure + // and in the process of restarting + return v1.PodRunning + default: + glog.V(5).Infof("pod default case, pending") + return v1.PodPending + } +} + +// generateAPIPodStatus creates the final API pod status for a pod, given the +// internal pod status. +func (kl *Kubelet) generateAPIPodStatus(pod *v1.Pod, podStatus *kubecontainer.PodStatus) v1.PodStatus { + glog.V(3).Infof("Generating status for %q", format.Pod(pod)) + + // check if an internal module has requested the pod is evicted. + for _, podSyncHandler := range kl.PodSyncHandlers { + if result := podSyncHandler.ShouldEvict(pod); result.Evict { + return v1.PodStatus{ + Phase: v1.PodFailed, + Reason: result.Reason, + Message: result.Message, + } + } + } + + s := kl.convertStatusToAPIStatus(pod, podStatus) + + // Assume info is ready to process + spec := &pod.Spec + allStatus := append(append([]v1.ContainerStatus{}, s.ContainerStatuses...), s.InitContainerStatuses...) + s.Phase = GetPhase(spec, allStatus) + kl.probeManager.UpdatePodStatus(pod.UID, s) + s.Conditions = append(s.Conditions, status.GeneratePodInitializedCondition(spec, s.InitContainerStatuses, s.Phase)) + s.Conditions = append(s.Conditions, status.GeneratePodReadyCondition(spec, s.ContainerStatuses, s.Phase)) + // s (the PodStatus we are creating) will not have a PodScheduled condition yet, because converStatusToAPIStatus() + // does not create one. If the existing PodStatus has a PodScheduled condition, then copy it into s and make sure + // it is set to true. If the existing PodStatus does not have a PodScheduled condition, then create one that is set to true. + if _, oldPodScheduled := podutil.GetPodCondition(&pod.Status, v1.PodScheduled); oldPodScheduled != nil { + s.Conditions = append(s.Conditions, *oldPodScheduled) + } + podutil.UpdatePodCondition(&pod.Status, &v1.PodCondition{ + Type: v1.PodScheduled, + Status: v1.ConditionTrue, + }) + + if kl.kubeClient != nil { + hostIP, err := kl.getHostIPAnyWay() + if err != nil { + glog.V(4).Infof("Cannot get host IP: %v", err) + } else { + s.HostIP = hostIP.String() + if kubecontainer.IsHostNetworkPod(pod) && s.PodIP == "" { + s.PodIP = hostIP.String() + } + } + } + + return *s +} + +// convertStatusToAPIStatus creates an api PodStatus for the given pod from +// the given internal pod status. It is purely transformative and does not +// alter the kubelet state at all. +func (kl *Kubelet) convertStatusToAPIStatus(pod *v1.Pod, podStatus *kubecontainer.PodStatus) *v1.PodStatus { + var apiPodStatus v1.PodStatus + apiPodStatus.PodIP = podStatus.IP + // set status for Pods created on versions of kube older than 1.6 + apiPodStatus.QOSClass = v1qos.GetPodQOS(pod) + + apiPodStatus.ContainerStatuses = kl.convertToAPIContainerStatuses( + pod, podStatus, + pod.Status.ContainerStatuses, + pod.Spec.Containers, + len(pod.Spec.InitContainers) > 0, + false, + ) + apiPodStatus.InitContainerStatuses = kl.convertToAPIContainerStatuses( + pod, podStatus, + pod.Status.InitContainerStatuses, + pod.Spec.InitContainers, + len(pod.Spec.InitContainers) > 0, + true, + ) + + return &apiPodStatus +} + +// convertToAPIContainerStatuses converts the given internal container +// statuses into API container statuses. +func (kl *Kubelet) convertToAPIContainerStatuses(pod *v1.Pod, podStatus *kubecontainer.PodStatus, previousStatus []v1.ContainerStatus, containers []v1.Container, hasInitContainers, isInitContainer bool) []v1.ContainerStatus { + convertContainerStatus := func(cs *kubecontainer.ContainerStatus) *v1.ContainerStatus { + cid := cs.ID.String() + status := &v1.ContainerStatus{ + Name: cs.Name, + RestartCount: int32(cs.RestartCount), + Image: cs.Image, + ImageID: cs.ImageID, + ContainerID: cid, + } + switch cs.State { + case kubecontainer.ContainerStateRunning: + status.State.Running = &v1.ContainerStateRunning{StartedAt: metav1.NewTime(cs.StartedAt)} + case kubecontainer.ContainerStateCreated: + // Treat containers in the "created" state as if they are exited. + // The pod workers are supposed start all containers it creates in + // one sync (syncPod) iteration. There should not be any normal + // "created" containers when the pod worker generates the status at + // the beginning of a sync iteration. + fallthrough + case kubecontainer.ContainerStateExited: + status.State.Terminated = &v1.ContainerStateTerminated{ + ExitCode: int32(cs.ExitCode), + Reason: cs.Reason, + Message: cs.Message, + StartedAt: metav1.NewTime(cs.StartedAt), + FinishedAt: metav1.NewTime(cs.FinishedAt), + ContainerID: cid, + } + default: + status.State.Waiting = &v1.ContainerStateWaiting{} + } + return status + } + + // Fetch old containers statuses from old pod status. + oldStatuses := make(map[string]v1.ContainerStatus, len(containers)) + for _, status := range previousStatus { + oldStatuses[status.Name] = status + } + + // Set all container statuses to default waiting state + statuses := make(map[string]*v1.ContainerStatus, len(containers)) + defaultWaitingState := v1.ContainerState{Waiting: &v1.ContainerStateWaiting{Reason: "ContainerCreating"}} + if hasInitContainers { + defaultWaitingState = v1.ContainerState{Waiting: &v1.ContainerStateWaiting{Reason: "PodInitializing"}} + } + + for _, container := range containers { + status := &v1.ContainerStatus{ + Name: container.Name, + Image: container.Image, + State: defaultWaitingState, + } + oldStatus, found := oldStatuses[container.Name] + if found { + if isInitContainer && oldStatus.State.Terminated != nil { + // Do not update status on terminated init containers as + // they be removed at any time. + status = &oldStatus + } else { + // Apply some values from the old statuses as the default values. + status.RestartCount = oldStatus.RestartCount + status.LastTerminationState = oldStatus.LastTerminationState + } + } + statuses[container.Name] = status + } + + // Make the latest container status comes first. + sort.Sort(sort.Reverse(kubecontainer.SortContainerStatusesByCreationTime(podStatus.ContainerStatuses))) + // Set container statuses according to the statuses seen in pod status + containerSeen := map[string]int{} + for _, cStatus := range podStatus.ContainerStatuses { + cName := cStatus.Name + if _, ok := statuses[cName]; !ok { + // This would also ignore the infra container. + continue + } + if containerSeen[cName] >= 2 { + continue + } + status := convertContainerStatus(cStatus) + if containerSeen[cName] == 0 { + statuses[cName] = status + } else { + statuses[cName].LastTerminationState = status.State + } + containerSeen[cName] = containerSeen[cName] + 1 + } + + // Handle the containers failed to be started, which should be in Waiting state. + for _, container := range containers { + if isInitContainer { + // If the init container is terminated with exit code 0, it won't be restarted. + // TODO(random-liu): Handle this in a cleaner way. + s := podStatus.FindContainerStatusByName(container.Name) + if s != nil && s.State == kubecontainer.ContainerStateExited && s.ExitCode == 0 { + continue + } + } + // If a container should be restarted in next syncpod, it is *Waiting*. + if !kubecontainer.ShouldContainerBeRestarted(&container, pod, podStatus) { + continue + } + status := statuses[container.Name] + reason, ok := kl.reasonCache.Get(pod.UID, container.Name) + if !ok { + // In fact, we could also apply Waiting state here, but it is less informative, + // and the container will be restarted soon, so we prefer the original state here. + // Note that with the current implementation of ShouldContainerBeRestarted the original state here + // could be: + // * Waiting: There is no associated historical container and start failure reason record. + // * Terminated: The container is terminated. + continue + } + if status.State.Terminated != nil { + status.LastTerminationState = status.State + } + status.State = v1.ContainerState{ + Waiting: &v1.ContainerStateWaiting{ + Reason: reason.Err.Error(), + Message: reason.Message, + }, + } + statuses[container.Name] = status + } + + var containerStatuses []v1.ContainerStatus + for _, status := range statuses { + containerStatuses = append(containerStatuses, *status) + } + + // Sort the container statuses since clients of this interface expect the list + // of containers in a pod has a deterministic order. + if isInitContainer { + kubetypes.SortInitContainerStatuses(pod, containerStatuses) + } else { + sort.Sort(kubetypes.SortedContainerStatuses(containerStatuses)) + } + return containerStatuses +} + +// ServeLogs returns logs of current machine. +func (kl *Kubelet) ServeLogs(w http.ResponseWriter, req *http.Request) { + // TODO: whitelist logs we are willing to serve + kl.logServer.ServeHTTP(w, req) +} + +// findContainer finds and returns the container with the given pod ID, full name, and container name. +// It returns nil if not found. +func (kl *Kubelet) findContainer(podFullName string, podUID types.UID, containerName string) (*kubecontainer.Container, error) { + pods, err := kl.containerRuntime.GetPods(false) + if err != nil { + return nil, err + } + // Resolve and type convert back again. + // We need the static pod UID but the kubecontainer API works with types.UID. + podUID = types.UID(kl.podManager.TranslatePodUID(podUID)) + pod := kubecontainer.Pods(pods).FindPod(podFullName, podUID) + return pod.FindContainerByName(containerName), nil +} + +// RunInContainer runs a command in a container, returns the combined stdout, stderr as an array of bytes +func (kl *Kubelet) RunInContainer(podFullName string, podUID types.UID, containerName string, cmd []string) ([]byte, error) { + container, err := kl.findContainer(podFullName, podUID, containerName) + if err != nil { + return nil, err + } + if container == nil { + return nil, fmt.Errorf("container not found (%q)", containerName) + } + // TODO(tallclair): Pass a proper timeout value. + return kl.runner.RunInContainer(container.ID, cmd, 0) +} + +// ExecInContainer executes a command in a container, connecting the supplied +// stdin/stdout/stderr to the command's IO streams. +func (kl *Kubelet) ExecInContainer(podFullName string, podUID types.UID, containerName string, cmd []string, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize, timeout time.Duration) error { + streamingRuntime, ok := kl.containerRuntime.(kubecontainer.DirectStreamingRuntime) + if !ok { + return fmt.Errorf("streaming methods not supported by runtime") + } + + container, err := kl.findContainer(podFullName, podUID, containerName) + if err != nil { + return err + } + if container == nil { + return fmt.Errorf("container not found (%q)", containerName) + } + return streamingRuntime.ExecInContainer(container.ID, cmd, stdin, stdout, stderr, tty, resize, timeout) +} + +// AttachContainer uses the container runtime to attach the given streams to +// the given container. +func (kl *Kubelet) AttachContainer(podFullName string, podUID types.UID, containerName string, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize) error { + streamingRuntime, ok := kl.containerRuntime.(kubecontainer.DirectStreamingRuntime) + if !ok { + return fmt.Errorf("streaming methods not supported by runtime") + } + + container, err := kl.findContainer(podFullName, podUID, containerName) + if err != nil { + return err + } + if container == nil { + return fmt.Errorf("container not found (%q)", containerName) + } + return streamingRuntime.AttachContainer(container.ID, stdin, stdout, stderr, tty, resize) +} + +// PortForward connects to the pod's port and copies data between the port +// and the stream. +func (kl *Kubelet) PortForward(podFullName string, podUID types.UID, port int32, stream io.ReadWriteCloser) error { + streamingRuntime, ok := kl.containerRuntime.(kubecontainer.DirectStreamingRuntime) + if !ok { + return fmt.Errorf("streaming methods not supported by runtime") + } + + pods, err := kl.containerRuntime.GetPods(false) + if err != nil { + return err + } + // Resolve and type convert back again. + // We need the static pod UID but the kubecontainer API works with types.UID. + podUID = types.UID(kl.podManager.TranslatePodUID(podUID)) + pod := kubecontainer.Pods(pods).FindPod(podFullName, podUID) + if pod.IsEmpty() { + return fmt.Errorf("pod not found (%q)", podFullName) + } + return streamingRuntime.PortForward(&pod, port, stream) +} + +// GetExec gets the URL the exec will be served from, or nil if the Kubelet will serve it. +func (kl *Kubelet) GetExec(podFullName string, podUID types.UID, containerName string, cmd []string, streamOpts remotecommandserver.Options) (*url.URL, error) { + switch streamingRuntime := kl.containerRuntime.(type) { + case kubecontainer.DirectStreamingRuntime: + // Kubelet will serve the exec directly. + return nil, nil + case kubecontainer.IndirectStreamingRuntime: + container, err := kl.findContainer(podFullName, podUID, containerName) + if err != nil { + return nil, err + } + if container == nil { + return nil, fmt.Errorf("container not found (%q)", containerName) + } + return streamingRuntime.GetExec(container.ID, cmd, streamOpts.Stdin, streamOpts.Stdout, streamOpts.Stderr, streamOpts.TTY) + default: + return nil, fmt.Errorf("container runtime does not support exec") + } +} + +// GetAttach gets the URL the attach will be served from, or nil if the Kubelet will serve it. +func (kl *Kubelet) GetAttach(podFullName string, podUID types.UID, containerName string, streamOpts remotecommandserver.Options) (*url.URL, error) { + switch streamingRuntime := kl.containerRuntime.(type) { + case kubecontainer.DirectStreamingRuntime: + // Kubelet will serve the attach directly. + return nil, nil + case kubecontainer.IndirectStreamingRuntime: + container, err := kl.findContainer(podFullName, podUID, containerName) + if err != nil { + return nil, err + } + if container == nil { + return nil, fmt.Errorf("container %s not found in pod %s", containerName, podFullName) + } + + // The TTY setting for attach must match the TTY setting in the initial container configuration, + // since whether the process is running in a TTY cannot be changed after it has started. We + // need the api.Pod to get the TTY status. + pod, found := kl.GetPodByFullName(podFullName) + if !found || (string(podUID) != "" && pod.UID != podUID) { + return nil, fmt.Errorf("pod %s not found", podFullName) + } + containerSpec := kubecontainer.GetContainerSpec(pod, containerName) + if containerSpec == nil { + return nil, fmt.Errorf("container %s not found in pod %s", containerName, podFullName) + } + tty := containerSpec.TTY + + return streamingRuntime.GetAttach(container.ID, streamOpts.Stdin, streamOpts.Stdout, streamOpts.Stderr, tty) + default: + return nil, fmt.Errorf("container runtime does not support attach") + } +} + +// GetPortForward gets the URL the port-forward will be served from, or nil if the Kubelet will serve it. +func (kl *Kubelet) GetPortForward(podName, podNamespace string, podUID types.UID, portForwardOpts portforward.V4Options) (*url.URL, error) { + switch streamingRuntime := kl.containerRuntime.(type) { + case kubecontainer.DirectStreamingRuntime: + // Kubelet will serve the attach directly. + return nil, nil + case kubecontainer.IndirectStreamingRuntime: + pods, err := kl.containerRuntime.GetPods(false) + if err != nil { + return nil, err + } + // Resolve and type convert back again. + // We need the static pod UID but the kubecontainer API works with types.UID. + podUID = types.UID(kl.podManager.TranslatePodUID(podUID)) + podFullName := kubecontainer.BuildPodFullName(podName, podNamespace) + pod := kubecontainer.Pods(pods).FindPod(podFullName, podUID) + if pod.IsEmpty() { + return nil, fmt.Errorf("pod not found (%q)", podFullName) + } + + return streamingRuntime.GetPortForward(podName, podNamespace, podUID, portForwardOpts.Ports) + default: + return nil, fmt.Errorf("container runtime does not support port-forward") + } +} + +// cleanupOrphanedPodCgroups removes cgroups that should no longer exist. +// it reconciles the cached state of cgroupPods with the specified list of runningPods +func (kl *Kubelet) cleanupOrphanedPodCgroups(cgroupPods map[types.UID]cm.CgroupName, activePods []*v1.Pod) { + // Add all running pods to the set that we want to preserve + podSet := sets.NewString() + for _, pod := range activePods { + podSet.Insert(string(pod.UID)) + } + pcm := kl.containerManager.NewPodContainerManager() + + // Iterate over all the found pods to verify if they should be running + for uid, val := range cgroupPods { + // if the pod is in the running set, its not a candidate for cleanup + if podSet.Has(string(uid)) { + continue + } + + // If volumes have not been unmounted/detached, do not delete the cgroup + // so any memory backed volumes don't have their charges propagated to the + // parent croup. If the volumes still exist, reduce the cpu shares for any + // process in the cgroup to the minimum value while we wait. if the kubelet + // is configured to keep terminated volumes, we will delete the cgroup and not block. + if podVolumesExist := kl.podVolumesExist(uid); podVolumesExist && !kl.kubeletConfiguration.KeepTerminatedPodVolumes { + glog.V(3).Infof("Orphaned pod %q found, but volumes not yet removed. Reducing cpu to minimum", uid) + if err := pcm.ReduceCPULimits(val); err != nil { + glog.Warningf("Failed to reduce cpu time for pod %q pending volume cleanup due to %v", uid, err) + } + continue + } + glog.V(3).Infof("Orphaned pod %q found, removing pod cgroups", uid) + // Destroy all cgroups of pod that should not be running, + // by first killing all the attached processes to these cgroups. + // We ignore errors thrown by the method, as the housekeeping loop would + // again try to delete these unwanted pod cgroups + go pcm.Destroy(val) + } +} + +// enableHostUserNamespace determines if the host user namespace should be used by the container runtime. +// Returns true if the pod is using a host pid, pic, or network namespace, the pod is using a non-namespaced +// capability, the pod contains a privileged container, or the pod has a host path volume. +// +// NOTE: when if a container shares any namespace with another container it must also share the user namespace +// or it will not have the correct capabilities in the namespace. This means that host user namespace +// is enabled per pod, not per container. +func (kl *Kubelet) enableHostUserNamespace(pod *v1.Pod) bool { + if kubecontainer.HasPrivilegedContainer(pod) || hasHostNamespace(pod) || + hasHostVolume(pod) || hasNonNamespacedCapability(pod) || kl.hasHostMountPVC(pod) { + return true + } + return false +} + +// hasNonNamespacedCapability returns true if MKNOD, SYS_TIME, or SYS_MODULE is requested for any container. +func hasNonNamespacedCapability(pod *v1.Pod) bool { + for _, c := range pod.Spec.Containers { + if c.SecurityContext != nil && c.SecurityContext.Capabilities != nil { + for _, cap := range c.SecurityContext.Capabilities.Add { + if cap == "MKNOD" || cap == "SYS_TIME" || cap == "SYS_MODULE" { + return true + } + } + } + } + + return false +} + +// hasHostVolume returns true if the pod spec has a HostPath volume. +func hasHostVolume(pod *v1.Pod) bool { + for _, v := range pod.Spec.Volumes { + if v.HostPath != nil { + return true + } + } + return false +} + +// hasHostNamespace returns true if hostIPC, hostNetwork, or hostPID are set to true. +func hasHostNamespace(pod *v1.Pod) bool { + if pod.Spec.SecurityContext == nil { + return false + } + return pod.Spec.HostIPC || pod.Spec.HostNetwork || pod.Spec.HostPID +} + +// hasHostMountPVC returns true if a PVC is referencing a HostPath volume. +func (kl *Kubelet) hasHostMountPVC(pod *v1.Pod) bool { + for _, volume := range pod.Spec.Volumes { + if volume.PersistentVolumeClaim != nil { + pvc, err := kl.kubeClient.Core().PersistentVolumeClaims(pod.Namespace).Get(volume.PersistentVolumeClaim.ClaimName, metav1.GetOptions{}) + if err != nil { + glog.Warningf("unable to retrieve pvc %s:%s - %v", pod.Namespace, volume.PersistentVolumeClaim.ClaimName, err) + continue + } + if pvc != nil { + referencedVolume, err := kl.kubeClient.Core().PersistentVolumes().Get(pvc.Spec.VolumeName, metav1.GetOptions{}) + if err != nil { + glog.Warningf("unable to retrieve pv %s - %v", pvc.Spec.VolumeName, err) + continue + } + if referencedVolume != nil && referencedVolume.Spec.HostPath != nil { + return true + } + } + } + } + return false +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods_test.go new file mode 100644 index 000000000..497e6666a --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods_test.go @@ -0,0 +1,2387 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "bytes" + "errors" + "fmt" + "io/ioutil" + "net" + "os" + "path/filepath" + "sort" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "k8s.io/api/core/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" + utilfeature "k8s.io/apiserver/pkg/util/feature" + core "k8s.io/client-go/testing" + "k8s.io/client-go/tools/record" + "k8s.io/kubernetes/pkg/api" + // TODO: remove this import if + // api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String() is changed + // to "v1"? + _ "k8s.io/kubernetes/pkg/api/install" + runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + containertest "k8s.io/kubernetes/pkg/kubelet/container/testing" + "k8s.io/kubernetes/pkg/kubelet/server/portforward" + "k8s.io/kubernetes/pkg/kubelet/server/remotecommand" +) + +func TestMakeMounts(t *testing.T) { + bTrue := true + propagationHostToContainer := v1.MountPropagationHostToContainer + propagationBidirectional := v1.MountPropagationBidirectional + + testCases := map[string]struct { + container v1.Container + podVolumes kubecontainer.VolumeMap + expectErr bool + expectedErrMsg string + expectedMounts []kubecontainer.Mount + }{ + "valid mounts in unprivileged container": { + podVolumes: kubecontainer.VolumeMap{ + "disk": kubecontainer.VolumeInfo{Mounter: &stubVolume{path: "/mnt/disk"}}, + "disk4": kubecontainer.VolumeInfo{Mounter: &stubVolume{path: "/mnt/host"}}, + "disk5": kubecontainer.VolumeInfo{Mounter: &stubVolume{path: "/var/lib/kubelet/podID/volumes/empty/disk5"}}, + }, + container: v1.Container{ + Name: "container1", + VolumeMounts: []v1.VolumeMount{ + { + MountPath: "/etc/hosts", + Name: "disk", + ReadOnly: false, + MountPropagation: &propagationHostToContainer, + }, + { + MountPath: "/mnt/path3", + Name: "disk", + ReadOnly: true, + }, + { + MountPath: "/mnt/path4", + Name: "disk4", + ReadOnly: false, + }, + { + MountPath: "/mnt/path5", + Name: "disk5", + ReadOnly: false, + }, + }, + }, + expectedMounts: []kubecontainer.Mount{ + { + Name: "disk", + ContainerPath: "/etc/hosts", + HostPath: "/mnt/disk", + ReadOnly: false, + SELinuxRelabel: false, + Propagation: runtimeapi.MountPropagation_PROPAGATION_HOST_TO_CONTAINER, + }, + { + Name: "disk", + ContainerPath: "/mnt/path3", + HostPath: "/mnt/disk", + ReadOnly: true, + SELinuxRelabel: false, + Propagation: runtimeapi.MountPropagation_PROPAGATION_HOST_TO_CONTAINER, + }, + { + Name: "disk4", + ContainerPath: "/mnt/path4", + HostPath: "/mnt/host", + ReadOnly: false, + SELinuxRelabel: false, + Propagation: runtimeapi.MountPropagation_PROPAGATION_HOST_TO_CONTAINER, + }, + { + Name: "disk5", + ContainerPath: "/mnt/path5", + HostPath: "/var/lib/kubelet/podID/volumes/empty/disk5", + ReadOnly: false, + SELinuxRelabel: false, + Propagation: runtimeapi.MountPropagation_PROPAGATION_HOST_TO_CONTAINER, + }, + }, + expectErr: false, + }, + "valid mounts in privileged container": { + podVolumes: kubecontainer.VolumeMap{ + "disk": kubecontainer.VolumeInfo{Mounter: &stubVolume{path: "/mnt/disk"}}, + "disk4": kubecontainer.VolumeInfo{Mounter: &stubVolume{path: "/mnt/host"}}, + "disk5": kubecontainer.VolumeInfo{Mounter: &stubVolume{path: "/var/lib/kubelet/podID/volumes/empty/disk5"}}, + }, + container: v1.Container{ + Name: "container1", + VolumeMounts: []v1.VolumeMount{ + { + MountPath: "/etc/hosts", + Name: "disk", + ReadOnly: false, + MountPropagation: &propagationBidirectional, + }, + { + MountPath: "/mnt/path3", + Name: "disk", + ReadOnly: true, + MountPropagation: &propagationHostToContainer, + }, + { + MountPath: "/mnt/path4", + Name: "disk4", + ReadOnly: false, + }, + }, + SecurityContext: &v1.SecurityContext{ + Privileged: &bTrue, + }, + }, + expectedMounts: []kubecontainer.Mount{ + { + Name: "disk", + ContainerPath: "/etc/hosts", + HostPath: "/mnt/disk", + ReadOnly: false, + SELinuxRelabel: false, + Propagation: runtimeapi.MountPropagation_PROPAGATION_BIDIRECTIONAL, + }, + { + Name: "disk", + ContainerPath: "/mnt/path3", + HostPath: "/mnt/disk", + ReadOnly: true, + SELinuxRelabel: false, + Propagation: runtimeapi.MountPropagation_PROPAGATION_HOST_TO_CONTAINER, + }, + { + Name: "disk4", + ContainerPath: "/mnt/path4", + HostPath: "/mnt/host", + ReadOnly: false, + SELinuxRelabel: false, + Propagation: runtimeapi.MountPropagation_PROPAGATION_HOST_TO_CONTAINER, + }, + }, + expectErr: false, + }, + "invalid absolute SubPath": { + podVolumes: kubecontainer.VolumeMap{ + "disk": kubecontainer.VolumeInfo{Mounter: &stubVolume{path: "/mnt/disk"}}, + }, + container: v1.Container{ + VolumeMounts: []v1.VolumeMount{ + { + MountPath: "/mnt/path3", + SubPath: "/must/not/be/absolute", + Name: "disk", + ReadOnly: true, + }, + }, + }, + expectErr: true, + expectedErrMsg: "error SubPath `/must/not/be/absolute` must not be an absolute path", + }, + "invalid SubPath with backsteps": { + podVolumes: kubecontainer.VolumeMap{ + "disk": kubecontainer.VolumeInfo{Mounter: &stubVolume{path: "/mnt/disk"}}, + }, + container: v1.Container{ + VolumeMounts: []v1.VolumeMount{ + { + MountPath: "/mnt/path3", + SubPath: "no/backsteps/../allowed", + Name: "disk", + ReadOnly: true, + }, + }, + }, + expectErr: true, + expectedErrMsg: "unable to provision SubPath `no/backsteps/../allowed`: must not contain '..'", + }, + } + + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + pod := v1.Pod{ + Spec: v1.PodSpec{ + HostNetwork: true, + }, + } + // test makeMounts with enabled mount propagation + err := utilfeature.DefaultFeatureGate.Set("MountPropagation=true") + if err != nil { + t.Errorf("Failed to enable feature gate for MountPropagation: %v", err) + return + } + + mounts, err := makeMounts(&pod, "/pod", &tc.container, "fakepodname", "", "", tc.podVolumes) + + // validate only the error if we expect an error + if tc.expectErr { + if err == nil || err.Error() != tc.expectedErrMsg { + t.Fatalf("expected error message `%s` but got `%v`", tc.expectedErrMsg, err) + } + return + } + + // otherwise validate the mounts + if err != nil { + t.Fatal(err) + } + + assert.Equal(t, tc.expectedMounts, mounts, "mounts of container %+v", tc.container) + + // test makeMounts with disabled mount propagation + err = utilfeature.DefaultFeatureGate.Set("MountPropagation=false") + if err != nil { + t.Errorf("Failed to enable feature gate for MountPropagation: %v", err) + return + } + mounts, err = makeMounts(&pod, "/pod", &tc.container, "fakepodname", "", "", tc.podVolumes) + if !tc.expectErr { + expectedPrivateMounts := []kubecontainer.Mount{} + for _, mount := range tc.expectedMounts { + // all mounts are expected to be private when mount + // propagation is disabled + mount.Propagation = runtimeapi.MountPropagation_PROPAGATION_PRIVATE + expectedPrivateMounts = append(expectedPrivateMounts, mount) + } + assert.Equal(t, expectedPrivateMounts, mounts, "mounts of container %+v", tc.container) + } + }) + } +} + +func TestNodeHostsFileContent(t *testing.T) { + testCases := []struct { + hostsFileName string + hostAliases []v1.HostAlias + rawHostsFileContent string + expectedHostsFileContent string + }{ + { + "hosts_test_file1", + []v1.HostAlias{}, + `# hosts file for testing. +127.0.0.1 localhost +::1 localhost ip6-localhost ip6-loopback +fe00::0 ip6-localnet +fe00::0 ip6-mcastprefix +fe00::1 ip6-allnodes +fe00::2 ip6-allrouters +123.45.67.89 some.domain +`, + `# hosts file for testing. +127.0.0.1 localhost +::1 localhost ip6-localhost ip6-loopback +fe00::0 ip6-localnet +fe00::0 ip6-mcastprefix +fe00::1 ip6-allnodes +fe00::2 ip6-allrouters +123.45.67.89 some.domain +`, + }, + { + "hosts_test_file2", + []v1.HostAlias{}, + `# another hosts file for testing. +127.0.0.1 localhost +::1 localhost ip6-localhost ip6-loopback +fe00::0 ip6-localnet +fe00::0 ip6-mcastprefix +fe00::1 ip6-allnodes +fe00::2 ip6-allrouters +12.34.56.78 another.domain +`, + `# another hosts file for testing. +127.0.0.1 localhost +::1 localhost ip6-localhost ip6-loopback +fe00::0 ip6-localnet +fe00::0 ip6-mcastprefix +fe00::1 ip6-allnodes +fe00::2 ip6-allrouters +12.34.56.78 another.domain +`, + }, + { + "hosts_test_file1_with_host_aliases", + []v1.HostAlias{ + {IP: "123.45.67.89", Hostnames: []string{"foo", "bar", "baz"}}, + }, + `# hosts file for testing. +127.0.0.1 localhost +::1 localhost ip6-localhost ip6-loopback +fe00::0 ip6-localnet +fe00::0 ip6-mcastprefix +fe00::1 ip6-allnodes +fe00::2 ip6-allrouters +123.45.67.89 some.domain +`, + `# hosts file for testing. +127.0.0.1 localhost +::1 localhost ip6-localhost ip6-loopback +fe00::0 ip6-localnet +fe00::0 ip6-mcastprefix +fe00::1 ip6-allnodes +fe00::2 ip6-allrouters +123.45.67.89 some.domain + +# Entries added by HostAliases. +123.45.67.89 foo +123.45.67.89 bar +123.45.67.89 baz +`, + }, + { + "hosts_test_file2_with_host_aliases", + []v1.HostAlias{ + {IP: "123.45.67.89", Hostnames: []string{"foo", "bar", "baz"}}, + {IP: "456.78.90.123", Hostnames: []string{"park", "doo", "boo"}}, + }, + `# another hosts file for testing. +127.0.0.1 localhost +::1 localhost ip6-localhost ip6-loopback +fe00::0 ip6-localnet +fe00::0 ip6-mcastprefix +fe00::1 ip6-allnodes +fe00::2 ip6-allrouters +12.34.56.78 another.domain +`, + `# another hosts file for testing. +127.0.0.1 localhost +::1 localhost ip6-localhost ip6-loopback +fe00::0 ip6-localnet +fe00::0 ip6-mcastprefix +fe00::1 ip6-allnodes +fe00::2 ip6-allrouters +12.34.56.78 another.domain + +# Entries added by HostAliases. +123.45.67.89 foo +123.45.67.89 bar +123.45.67.89 baz +456.78.90.123 park +456.78.90.123 doo +456.78.90.123 boo +`, + }, + } + + for _, testCase := range testCases { + tmpdir, err := writeHostsFile(testCase.hostsFileName, testCase.rawHostsFileContent) + require.NoError(t, err, "could not create a temp hosts file") + defer os.RemoveAll(tmpdir) + + actualContent, fileReadErr := nodeHostsFileContent(filepath.Join(tmpdir, testCase.hostsFileName), testCase.hostAliases) + require.NoError(t, fileReadErr, "could not create read hosts file") + assert.Equal(t, testCase.expectedHostsFileContent, string(actualContent), "hosts file content not expected") + } +} + +// writeHostsFile will write a hosts file into a temporary dir, and return that dir. +// Caller is responsible for deleting the dir and its contents. +func writeHostsFile(filename string, cfg string) (string, error) { + tmpdir, err := ioutil.TempDir("", "kubelet=kubelet_pods_test.go=") + if err != nil { + return "", err + } + return tmpdir, ioutil.WriteFile(filepath.Join(tmpdir, filename), []byte(cfg), 0644) +} + +func TestManagedHostsFileContent(t *testing.T) { + testCases := []struct { + hostIP string + hostName string + hostDomainName string + hostAliases []v1.HostAlias + expectedContent string + }{ + { + "123.45.67.89", + "podFoo", + "", + []v1.HostAlias{}, + `# Kubernetes-managed hosts file. +127.0.0.1 localhost +::1 localhost ip6-localhost ip6-loopback +fe00::0 ip6-localnet +fe00::0 ip6-mcastprefix +fe00::1 ip6-allnodes +fe00::2 ip6-allrouters +123.45.67.89 podFoo +`, + }, + { + "203.0.113.1", + "podFoo", + "domainFoo", + []v1.HostAlias{}, + `# Kubernetes-managed hosts file. +127.0.0.1 localhost +::1 localhost ip6-localhost ip6-loopback +fe00::0 ip6-localnet +fe00::0 ip6-mcastprefix +fe00::1 ip6-allnodes +fe00::2 ip6-allrouters +203.0.113.1 podFoo.domainFoo podFoo +`, + }, + { + "203.0.113.1", + "podFoo", + "domainFoo", + []v1.HostAlias{ + {IP: "123.45.67.89", Hostnames: []string{"foo", "bar", "baz"}}, + }, + `# Kubernetes-managed hosts file. +127.0.0.1 localhost +::1 localhost ip6-localhost ip6-loopback +fe00::0 ip6-localnet +fe00::0 ip6-mcastprefix +fe00::1 ip6-allnodes +fe00::2 ip6-allrouters +203.0.113.1 podFoo.domainFoo podFoo + +# Entries added by HostAliases. +123.45.67.89 foo +123.45.67.89 bar +123.45.67.89 baz +`, + }, + { + "203.0.113.1", + "podFoo", + "domainFoo", + []v1.HostAlias{ + {IP: "123.45.67.89", Hostnames: []string{"foo", "bar", "baz"}}, + {IP: "456.78.90.123", Hostnames: []string{"park", "doo", "boo"}}, + }, + `# Kubernetes-managed hosts file. +127.0.0.1 localhost +::1 localhost ip6-localhost ip6-loopback +fe00::0 ip6-localnet +fe00::0 ip6-mcastprefix +fe00::1 ip6-allnodes +fe00::2 ip6-allrouters +203.0.113.1 podFoo.domainFoo podFoo + +# Entries added by HostAliases. +123.45.67.89 foo +123.45.67.89 bar +123.45.67.89 baz +456.78.90.123 park +456.78.90.123 doo +456.78.90.123 boo +`, + }, + } + + for _, testCase := range testCases { + actualContent := managedHostsFileContent(testCase.hostIP, testCase.hostName, testCase.hostDomainName, testCase.hostAliases) + assert.Equal(t, testCase.expectedContent, string(actualContent), "hosts file content not expected") + } +} + +func TestRunInContainerNoSuchPod(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + fakeRuntime := testKubelet.fakeRuntime + fakeRuntime.PodList = []*containertest.FakePod{} + + podName := "podFoo" + podNamespace := "nsFoo" + containerName := "containerFoo" + output, err := kubelet.RunInContainer( + kubecontainer.GetPodFullName(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: podName, Namespace: podNamespace}}), + "", + containerName, + []string{"ls"}) + assert.Error(t, err) + assert.Nil(t, output, "output should be nil") +} + +func TestRunInContainer(t *testing.T) { + for _, testError := range []error{nil, errors.New("bar")} { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + fakeRuntime := testKubelet.fakeRuntime + fakeCommandRunner := containertest.FakeContainerCommandRunner{ + Err: testError, + Stdout: "foo", + } + kubelet.runner = &fakeCommandRunner + + containerID := kubecontainer.ContainerID{Type: "test", ID: "abc1234"} + fakeRuntime.PodList = []*containertest.FakePod{ + {Pod: &kubecontainer.Pod{ + ID: "12345678", + Name: "podFoo", + Namespace: "nsFoo", + Containers: []*kubecontainer.Container{ + {Name: "containerFoo", + ID: containerID, + }, + }, + }}, + } + cmd := []string{"ls"} + actualOutput, err := kubelet.RunInContainer("podFoo_nsFoo", "", "containerFoo", cmd) + assert.Equal(t, containerID, fakeCommandRunner.ContainerID, "(testError=%v) ID", testError) + assert.Equal(t, cmd, fakeCommandRunner.Cmd, "(testError=%v) command", testError) + // this isn't 100% foolproof as a bug in a real ContainerCommandRunner where it fails to copy to stdout/stderr wouldn't be caught by this test + assert.Equal(t, "foo", string(actualOutput), "(testError=%v) output", testError) + assert.Equal(t, err, testError, "(testError=%v) err", testError) + } +} + +func TestGenerateRunContainerOptions_DNSConfigurationParams(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + + clusterNS := "203.0.113.1" + kubelet.clusterDomain = "kubernetes.io" + kubelet.clusterDNS = []net.IP{net.ParseIP(clusterNS)} + + pods := newTestPods(4) + pods[0].Spec.DNSPolicy = v1.DNSClusterFirstWithHostNet + pods[1].Spec.DNSPolicy = v1.DNSClusterFirst + pods[2].Spec.DNSPolicy = v1.DNSClusterFirst + pods[2].Spec.HostNetwork = false + pods[3].Spec.DNSPolicy = v1.DNSDefault + + options := make([]*kubecontainer.RunContainerOptions, 4) + for i, pod := range pods { + var err error + options[i], _, err = kubelet.GenerateRunContainerOptions(pod, &v1.Container{}, "") + if err != nil { + t.Fatalf("failed to generate container options: %v", err) + } + } + if len(options[0].DNS) != 1 || options[0].DNS[0] != clusterNS { + t.Errorf("expected nameserver %s, got %+v", clusterNS, options[0].DNS) + } + if len(options[0].DNSSearch) == 0 || options[0].DNSSearch[0] != ".svc."+kubelet.clusterDomain { + t.Errorf("expected search %s, got %+v", ".svc."+kubelet.clusterDomain, options[0].DNSSearch) + } + if len(options[1].DNS) != 1 || options[1].DNS[0] != "127.0.0.1" { + t.Errorf("expected nameserver 127.0.0.1, got %+v", options[1].DNS) + } + if len(options[1].DNSSearch) != 1 || options[1].DNSSearch[0] != "." { + t.Errorf("expected search \".\", got %+v", options[1].DNSSearch) + } + if len(options[2].DNS) != 1 || options[2].DNS[0] != clusterNS { + t.Errorf("expected nameserver %s, got %+v", clusterNS, options[2].DNS) + } + if len(options[2].DNSSearch) == 0 || options[2].DNSSearch[0] != ".svc."+kubelet.clusterDomain { + t.Errorf("expected search %s, got %+v", ".svc."+kubelet.clusterDomain, options[2].DNSSearch) + } + if len(options[3].DNS) != 1 || options[3].DNS[0] != "127.0.0.1" { + t.Errorf("expected nameserver 127.0.0.1, got %+v", options[3].DNS) + } + if len(options[3].DNSSearch) != 1 || options[3].DNSSearch[0] != "." { + t.Errorf("expected search \".\", got %+v", options[3].DNSSearch) + } + + kubelet.resolverConfig = "/etc/resolv.conf" + for i, pod := range pods { + var err error + options[i], _, err = kubelet.GenerateRunContainerOptions(pod, &v1.Container{}, "") + if err != nil { + t.Fatalf("failed to generate container options: %v", err) + } + } + t.Logf("nameservers %+v", options[1].DNS) + if len(options[0].DNS) != 1 { + t.Errorf("expected cluster nameserver only, got %+v", options[0].DNS) + } else if options[0].DNS[0] != clusterNS { + t.Errorf("expected nameserver %s, got %v", clusterNS, options[0].DNS[0]) + } + expLength := len(options[1].DNSSearch) + 3 + if expLength > 6 { + expLength = 6 + } + if len(options[0].DNSSearch) != expLength { + t.Errorf("expected prepend of cluster domain, got %+v", options[0].DNSSearch) + } else if options[0].DNSSearch[0] != ".svc."+kubelet.clusterDomain { + t.Errorf("expected domain %s, got %s", ".svc."+kubelet.clusterDomain, options[0].DNSSearch) + } + if len(options[2].DNS) != 1 { + t.Errorf("expected cluster nameserver only, got %+v", options[2].DNS) + } else if options[2].DNS[0] != clusterNS { + t.Errorf("expected nameserver %s, got %v", clusterNS, options[2].DNS[0]) + } + if len(options[2].DNSSearch) != expLength { + t.Errorf("expected prepend of cluster domain, got %+v", options[2].DNSSearch) + } else if options[2].DNSSearch[0] != ".svc."+kubelet.clusterDomain { + t.Errorf("expected domain %s, got %s", ".svc."+kubelet.clusterDomain, options[0].DNSSearch) + } +} + +type testServiceLister struct { + services []*v1.Service +} + +func (ls testServiceLister) List(labels.Selector) ([]*v1.Service, error) { + return ls.services, nil +} + +type envs []kubecontainer.EnvVar + +func (e envs) Len() int { + return len(e) +} + +func (e envs) Swap(i, j int) { e[i], e[j] = e[j], e[i] } + +func (e envs) Less(i, j int) bool { return e[i].Name < e[j].Name } + +func buildService(name, namespace, clusterIP, protocol string, port int) *v1.Service { + return &v1.Service{ + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace}, + Spec: v1.ServiceSpec{ + Ports: []v1.ServicePort{{ + Protocol: v1.Protocol(protocol), + Port: int32(port), + }}, + ClusterIP: clusterIP, + }, + } +} + +func TestMakeEnvironmentVariables(t *testing.T) { + trueVal := true + services := []*v1.Service{ + buildService("kubernetes", metav1.NamespaceDefault, "1.2.3.1", "TCP", 8081), + buildService("test", "test1", "1.2.3.3", "TCP", 8083), + buildService("kubernetes", "test2", "1.2.3.4", "TCP", 8084), + buildService("test", "test2", "1.2.3.5", "TCP", 8085), + buildService("test", "test2", "None", "TCP", 8085), + buildService("test", "test2", "", "TCP", 8085), + buildService("kubernetes", "kubernetes", "1.2.3.6", "TCP", 8086), + buildService("not-special", "kubernetes", "1.2.3.8", "TCP", 8088), + buildService("not-special", "kubernetes", "None", "TCP", 8088), + buildService("not-special", "kubernetes", "", "TCP", 8088), + } + + testCases := []struct { + name string // the name of the test case + ns string // the namespace to generate environment for + container *v1.Container // the container to use + masterServiceNs string // the namespace to read master service info from + nilLister bool // whether the lister should be nil + configMap *v1.ConfigMap // an optional ConfigMap to pull from + secret *v1.Secret // an optional Secret to pull from + expectedEnvs []kubecontainer.EnvVar // a set of expected environment vars + expectedError bool // does the test fail + expectedEvent string // does the test emit an event + }{ + { + name: "api server = Y, kubelet = Y", + ns: "test1", + container: &v1.Container{ + Env: []v1.EnvVar{ + {Name: "FOO", Value: "BAR"}, + {Name: "TEST_SERVICE_HOST", Value: "1.2.3.3"}, + {Name: "TEST_SERVICE_PORT", Value: "8083"}, + {Name: "TEST_PORT", Value: "tcp://1.2.3.3:8083"}, + {Name: "TEST_PORT_8083_TCP", Value: "tcp://1.2.3.3:8083"}, + {Name: "TEST_PORT_8083_TCP_PROTO", Value: "tcp"}, + {Name: "TEST_PORT_8083_TCP_PORT", Value: "8083"}, + {Name: "TEST_PORT_8083_TCP_ADDR", Value: "1.2.3.3"}, + }, + }, + masterServiceNs: metav1.NamespaceDefault, + nilLister: false, + expectedEnvs: []kubecontainer.EnvVar{ + {Name: "FOO", Value: "BAR"}, + {Name: "TEST_SERVICE_HOST", Value: "1.2.3.3"}, + {Name: "TEST_SERVICE_PORT", Value: "8083"}, + {Name: "TEST_PORT", Value: "tcp://1.2.3.3:8083"}, + {Name: "TEST_PORT_8083_TCP", Value: "tcp://1.2.3.3:8083"}, + {Name: "TEST_PORT_8083_TCP_PROTO", Value: "tcp"}, + {Name: "TEST_PORT_8083_TCP_PORT", Value: "8083"}, + {Name: "TEST_PORT_8083_TCP_ADDR", Value: "1.2.3.3"}, + {Name: "KUBERNETES_SERVICE_PORT", Value: "8081"}, + {Name: "KUBERNETES_SERVICE_HOST", Value: "1.2.3.1"}, + {Name: "KUBERNETES_PORT", Value: "tcp://1.2.3.1:8081"}, + {Name: "KUBERNETES_PORT_8081_TCP", Value: "tcp://1.2.3.1:8081"}, + {Name: "KUBERNETES_PORT_8081_TCP_PROTO", Value: "tcp"}, + {Name: "KUBERNETES_PORT_8081_TCP_PORT", Value: "8081"}, + {Name: "KUBERNETES_PORT_8081_TCP_ADDR", Value: "1.2.3.1"}, + }, + }, + { + name: "api server = Y, kubelet = N", + ns: "test1", + container: &v1.Container{ + Env: []v1.EnvVar{ + {Name: "FOO", Value: "BAR"}, + {Name: "TEST_SERVICE_HOST", Value: "1.2.3.3"}, + {Name: "TEST_SERVICE_PORT", Value: "8083"}, + {Name: "TEST_PORT", Value: "tcp://1.2.3.3:8083"}, + {Name: "TEST_PORT_8083_TCP", Value: "tcp://1.2.3.3:8083"}, + {Name: "TEST_PORT_8083_TCP_PROTO", Value: "tcp"}, + {Name: "TEST_PORT_8083_TCP_PORT", Value: "8083"}, + {Name: "TEST_PORT_8083_TCP_ADDR", Value: "1.2.3.3"}, + }, + }, + masterServiceNs: metav1.NamespaceDefault, + nilLister: true, + expectedEnvs: []kubecontainer.EnvVar{ + {Name: "FOO", Value: "BAR"}, + {Name: "TEST_SERVICE_HOST", Value: "1.2.3.3"}, + {Name: "TEST_SERVICE_PORT", Value: "8083"}, + {Name: "TEST_PORT", Value: "tcp://1.2.3.3:8083"}, + {Name: "TEST_PORT_8083_TCP", Value: "tcp://1.2.3.3:8083"}, + {Name: "TEST_PORT_8083_TCP_PROTO", Value: "tcp"}, + {Name: "TEST_PORT_8083_TCP_PORT", Value: "8083"}, + {Name: "TEST_PORT_8083_TCP_ADDR", Value: "1.2.3.3"}, + }, + }, + { + name: "api server = N; kubelet = Y", + ns: "test1", + container: &v1.Container{ + Env: []v1.EnvVar{ + {Name: "FOO", Value: "BAZ"}, + }, + }, + masterServiceNs: metav1.NamespaceDefault, + nilLister: false, + expectedEnvs: []kubecontainer.EnvVar{ + {Name: "FOO", Value: "BAZ"}, + {Name: "TEST_SERVICE_HOST", Value: "1.2.3.3"}, + {Name: "TEST_SERVICE_PORT", Value: "8083"}, + {Name: "TEST_PORT", Value: "tcp://1.2.3.3:8083"}, + {Name: "TEST_PORT_8083_TCP", Value: "tcp://1.2.3.3:8083"}, + {Name: "TEST_PORT_8083_TCP_PROTO", Value: "tcp"}, + {Name: "TEST_PORT_8083_TCP_PORT", Value: "8083"}, + {Name: "TEST_PORT_8083_TCP_ADDR", Value: "1.2.3.3"}, + {Name: "KUBERNETES_SERVICE_HOST", Value: "1.2.3.1"}, + {Name: "KUBERNETES_SERVICE_PORT", Value: "8081"}, + {Name: "KUBERNETES_PORT", Value: "tcp://1.2.3.1:8081"}, + {Name: "KUBERNETES_PORT_8081_TCP", Value: "tcp://1.2.3.1:8081"}, + {Name: "KUBERNETES_PORT_8081_TCP_PROTO", Value: "tcp"}, + {Name: "KUBERNETES_PORT_8081_TCP_PORT", Value: "8081"}, + {Name: "KUBERNETES_PORT_8081_TCP_ADDR", Value: "1.2.3.1"}, + }, + }, + { + name: "master service in pod ns", + ns: "test2", + container: &v1.Container{ + Env: []v1.EnvVar{ + {Name: "FOO", Value: "ZAP"}, + }, + }, + masterServiceNs: "kubernetes", + nilLister: false, + expectedEnvs: []kubecontainer.EnvVar{ + {Name: "FOO", Value: "ZAP"}, + {Name: "TEST_SERVICE_HOST", Value: "1.2.3.5"}, + {Name: "TEST_SERVICE_PORT", Value: "8085"}, + {Name: "TEST_PORT", Value: "tcp://1.2.3.5:8085"}, + {Name: "TEST_PORT_8085_TCP", Value: "tcp://1.2.3.5:8085"}, + {Name: "TEST_PORT_8085_TCP_PROTO", Value: "tcp"}, + {Name: "TEST_PORT_8085_TCP_PORT", Value: "8085"}, + {Name: "TEST_PORT_8085_TCP_ADDR", Value: "1.2.3.5"}, + {Name: "KUBERNETES_SERVICE_HOST", Value: "1.2.3.4"}, + {Name: "KUBERNETES_SERVICE_PORT", Value: "8084"}, + {Name: "KUBERNETES_PORT", Value: "tcp://1.2.3.4:8084"}, + {Name: "KUBERNETES_PORT_8084_TCP", Value: "tcp://1.2.3.4:8084"}, + {Name: "KUBERNETES_PORT_8084_TCP_PROTO", Value: "tcp"}, + {Name: "KUBERNETES_PORT_8084_TCP_PORT", Value: "8084"}, + {Name: "KUBERNETES_PORT_8084_TCP_ADDR", Value: "1.2.3.4"}, + }, + }, + { + name: "pod in master service ns", + ns: "kubernetes", + container: &v1.Container{}, + masterServiceNs: "kubernetes", + nilLister: false, + expectedEnvs: []kubecontainer.EnvVar{ + {Name: "NOT_SPECIAL_SERVICE_HOST", Value: "1.2.3.8"}, + {Name: "NOT_SPECIAL_SERVICE_PORT", Value: "8088"}, + {Name: "NOT_SPECIAL_PORT", Value: "tcp://1.2.3.8:8088"}, + {Name: "NOT_SPECIAL_PORT_8088_TCP", Value: "tcp://1.2.3.8:8088"}, + {Name: "NOT_SPECIAL_PORT_8088_TCP_PROTO", Value: "tcp"}, + {Name: "NOT_SPECIAL_PORT_8088_TCP_PORT", Value: "8088"}, + {Name: "NOT_SPECIAL_PORT_8088_TCP_ADDR", Value: "1.2.3.8"}, + {Name: "KUBERNETES_SERVICE_HOST", Value: "1.2.3.6"}, + {Name: "KUBERNETES_SERVICE_PORT", Value: "8086"}, + {Name: "KUBERNETES_PORT", Value: "tcp://1.2.3.6:8086"}, + {Name: "KUBERNETES_PORT_8086_TCP", Value: "tcp://1.2.3.6:8086"}, + {Name: "KUBERNETES_PORT_8086_TCP_PROTO", Value: "tcp"}, + {Name: "KUBERNETES_PORT_8086_TCP_PORT", Value: "8086"}, + {Name: "KUBERNETES_PORT_8086_TCP_ADDR", Value: "1.2.3.6"}, + }, + }, + { + name: "downward api pod", + ns: "downward-api", + container: &v1.Container{ + Env: []v1.EnvVar{ + { + Name: "POD_NAME", + ValueFrom: &v1.EnvVarSource{ + FieldRef: &v1.ObjectFieldSelector{ + APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "POD_NAMESPACE", + ValueFrom: &v1.EnvVarSource{ + FieldRef: &v1.ObjectFieldSelector{ + APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), + FieldPath: "metadata.namespace", + }, + }, + }, + { + Name: "POD_NODE_NAME", + ValueFrom: &v1.EnvVarSource{ + FieldRef: &v1.ObjectFieldSelector{ + APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "POD_SERVICE_ACCOUNT_NAME", + ValueFrom: &v1.EnvVarSource{ + FieldRef: &v1.ObjectFieldSelector{ + APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), + FieldPath: "spec.serviceAccountName", + }, + }, + }, + { + Name: "POD_IP", + ValueFrom: &v1.EnvVarSource{ + FieldRef: &v1.ObjectFieldSelector{ + APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), + FieldPath: "status.podIP", + }, + }, + }, + { + Name: "HOST_IP", + ValueFrom: &v1.EnvVarSource{ + FieldRef: &v1.ObjectFieldSelector{ + APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), + FieldPath: "status.hostIP", + }, + }, + }, + }, + }, + masterServiceNs: "nothing", + nilLister: true, + expectedEnvs: []kubecontainer.EnvVar{ + {Name: "POD_NAME", Value: "dapi-test-pod-name"}, + {Name: "POD_NAMESPACE", Value: "downward-api"}, + {Name: "POD_NODE_NAME", Value: "node-name"}, + {Name: "POD_SERVICE_ACCOUNT_NAME", Value: "special"}, + {Name: "POD_IP", Value: "1.2.3.4"}, + {Name: "HOST_IP", Value: testKubeletHostIP}, + }, + }, + { + name: "env expansion", + ns: "test1", + container: &v1.Container{ + Env: []v1.EnvVar{ + { + Name: "TEST_LITERAL", + Value: "test-test-test", + }, + { + Name: "POD_NAME", + ValueFrom: &v1.EnvVarSource{ + FieldRef: &v1.ObjectFieldSelector{ + APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OUT_OF_ORDER_TEST", + Value: "$(OUT_OF_ORDER_TARGET)", + }, + { + Name: "OUT_OF_ORDER_TARGET", + Value: "FOO", + }, + { + Name: "EMPTY_VAR", + }, + { + Name: "EMPTY_TEST", + Value: "foo-$(EMPTY_VAR)", + }, + { + Name: "POD_NAME_TEST2", + Value: "test2-$(POD_NAME)", + }, + { + Name: "POD_NAME_TEST3", + Value: "$(POD_NAME_TEST2)-3", + }, + { + Name: "LITERAL_TEST", + Value: "literal-$(TEST_LITERAL)", + }, + { + Name: "SERVICE_VAR_TEST", + Value: "$(TEST_SERVICE_HOST):$(TEST_SERVICE_PORT)", + }, + { + Name: "TEST_UNDEFINED", + Value: "$(UNDEFINED_VAR)", + }, + }, + }, + masterServiceNs: "nothing", + nilLister: false, + expectedEnvs: []kubecontainer.EnvVar{ + { + Name: "TEST_LITERAL", + Value: "test-test-test", + }, + { + Name: "POD_NAME", + Value: "dapi-test-pod-name", + }, + { + Name: "POD_NAME_TEST2", + Value: "test2-dapi-test-pod-name", + }, + { + Name: "POD_NAME_TEST3", + Value: "test2-dapi-test-pod-name-3", + }, + { + Name: "LITERAL_TEST", + Value: "literal-test-test-test", + }, + { + Name: "TEST_SERVICE_HOST", + Value: "1.2.3.3", + }, + { + Name: "TEST_SERVICE_PORT", + Value: "8083", + }, + { + Name: "TEST_PORT", + Value: "tcp://1.2.3.3:8083", + }, + { + Name: "TEST_PORT_8083_TCP", + Value: "tcp://1.2.3.3:8083", + }, + { + Name: "TEST_PORT_8083_TCP_PROTO", + Value: "tcp", + }, + { + Name: "TEST_PORT_8083_TCP_PORT", + Value: "8083", + }, + { + Name: "TEST_PORT_8083_TCP_ADDR", + Value: "1.2.3.3", + }, + { + Name: "SERVICE_VAR_TEST", + Value: "1.2.3.3:8083", + }, + { + Name: "OUT_OF_ORDER_TEST", + Value: "$(OUT_OF_ORDER_TARGET)", + }, + { + Name: "OUT_OF_ORDER_TARGET", + Value: "FOO", + }, + { + Name: "TEST_UNDEFINED", + Value: "$(UNDEFINED_VAR)", + }, + { + Name: "EMPTY_VAR", + }, + { + Name: "EMPTY_TEST", + Value: "foo-", + }, + }, + }, + { + name: "configmapkeyref_missing_optional", + ns: "test", + container: &v1.Container{ + Env: []v1.EnvVar{ + { + Name: "POD_NAME", + ValueFrom: &v1.EnvVarSource{ + ConfigMapKeyRef: &v1.ConfigMapKeySelector{ + LocalObjectReference: v1.LocalObjectReference{Name: "missing-config-map"}, + Key: "key", + Optional: &trueVal, + }, + }, + }, + }, + }, + masterServiceNs: "nothing", + expectedEnvs: nil, + }, + { + name: "configmapkeyref_missing_key_optional", + ns: "test", + container: &v1.Container{ + Env: []v1.EnvVar{ + { + Name: "POD_NAME", + ValueFrom: &v1.EnvVarSource{ + ConfigMapKeyRef: &v1.ConfigMapKeySelector{ + LocalObjectReference: v1.LocalObjectReference{Name: "test-config-map"}, + Key: "key", + Optional: &trueVal, + }, + }, + }, + }, + }, + masterServiceNs: "nothing", + nilLister: true, + configMap: &v1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "test1", + Name: "test-configmap", + }, + Data: map[string]string{ + "a": "b", + }, + }, + expectedEnvs: nil, + }, + { + name: "secretkeyref_missing_optional", + ns: "test", + container: &v1.Container{ + Env: []v1.EnvVar{ + { + Name: "POD_NAME", + ValueFrom: &v1.EnvVarSource{ + SecretKeyRef: &v1.SecretKeySelector{ + LocalObjectReference: v1.LocalObjectReference{Name: "missing-secret"}, + Key: "key", + Optional: &trueVal, + }, + }, + }, + }, + }, + masterServiceNs: "nothing", + expectedEnvs: nil, + }, + { + name: "secretkeyref_missing_key_optional", + ns: "test", + container: &v1.Container{ + Env: []v1.EnvVar{ + { + Name: "POD_NAME", + ValueFrom: &v1.EnvVarSource{ + SecretKeyRef: &v1.SecretKeySelector{ + LocalObjectReference: v1.LocalObjectReference{Name: "test-secret"}, + Key: "key", + Optional: &trueVal, + }, + }, + }, + }, + }, + masterServiceNs: "nothing", + nilLister: true, + secret: &v1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "test1", + Name: "test-secret", + }, + Data: map[string][]byte{ + "a": []byte("b"), + }, + }, + expectedEnvs: nil, + }, + { + name: "configmap", + ns: "test1", + container: &v1.Container{ + EnvFrom: []v1.EnvFromSource{ + { + ConfigMapRef: &v1.ConfigMapEnvSource{LocalObjectReference: v1.LocalObjectReference{Name: "test-config-map"}}, + }, + { + Prefix: "p_", + ConfigMapRef: &v1.ConfigMapEnvSource{LocalObjectReference: v1.LocalObjectReference{Name: "test-config-map"}}, + }, + }, + Env: []v1.EnvVar{ + { + Name: "TEST_LITERAL", + Value: "test-test-test", + }, + { + Name: "EXPANSION_TEST", + Value: "$(REPLACE_ME)", + }, + { + Name: "DUPE_TEST", + Value: "ENV_VAR", + }, + }, + }, + masterServiceNs: "nothing", + nilLister: false, + configMap: &v1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "test1", + Name: "test-configmap", + }, + Data: map[string]string{ + "REPLACE_ME": "FROM_CONFIG_MAP", + "DUPE_TEST": "CONFIG_MAP", + }, + }, + expectedEnvs: []kubecontainer.EnvVar{ + { + Name: "TEST_LITERAL", + Value: "test-test-test", + }, + { + Name: "TEST_SERVICE_HOST", + Value: "1.2.3.3", + }, + { + Name: "TEST_SERVICE_PORT", + Value: "8083", + }, + { + Name: "TEST_PORT", + Value: "tcp://1.2.3.3:8083", + }, + { + Name: "TEST_PORT_8083_TCP", + Value: "tcp://1.2.3.3:8083", + }, + { + Name: "TEST_PORT_8083_TCP_PROTO", + Value: "tcp", + }, + { + Name: "TEST_PORT_8083_TCP_PORT", + Value: "8083", + }, + { + Name: "TEST_PORT_8083_TCP_ADDR", + Value: "1.2.3.3", + }, + { + Name: "REPLACE_ME", + Value: "FROM_CONFIG_MAP", + }, + { + Name: "EXPANSION_TEST", + Value: "FROM_CONFIG_MAP", + }, + { + Name: "DUPE_TEST", + Value: "ENV_VAR", + }, + { + Name: "p_REPLACE_ME", + Value: "FROM_CONFIG_MAP", + }, + { + Name: "p_DUPE_TEST", + Value: "CONFIG_MAP", + }, + }, + }, + { + name: "configmap_missing", + ns: "test1", + container: &v1.Container{ + EnvFrom: []v1.EnvFromSource{ + {ConfigMapRef: &v1.ConfigMapEnvSource{LocalObjectReference: v1.LocalObjectReference{Name: "test-config-map"}}}, + }, + }, + masterServiceNs: "nothing", + expectedError: true, + }, + { + name: "configmap_missing_optional", + ns: "test", + container: &v1.Container{ + EnvFrom: []v1.EnvFromSource{ + {ConfigMapRef: &v1.ConfigMapEnvSource{ + Optional: &trueVal, + LocalObjectReference: v1.LocalObjectReference{Name: "missing-config-map"}}}, + }, + }, + masterServiceNs: "nothing", + expectedEnvs: nil, + }, + { + name: "configmap_invalid_keys", + ns: "test", + container: &v1.Container{ + EnvFrom: []v1.EnvFromSource{ + {ConfigMapRef: &v1.ConfigMapEnvSource{LocalObjectReference: v1.LocalObjectReference{Name: "test-config-map"}}}, + }, + }, + masterServiceNs: "nothing", + configMap: &v1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "test1", + Name: "test-configmap", + }, + Data: map[string]string{ + "1234": "abc", + "1z": "abc", + "key": "value", + }, + }, + expectedEnvs: []kubecontainer.EnvVar{ + { + Name: "key", + Value: "value", + }, + }, + expectedEvent: "Warning InvalidEnvironmentVariableNames Keys [1234, 1z] from the EnvFrom configMap test/test-config-map were skipped since they are considered invalid environment variable names.", + }, + { + name: "configmap_invalid_keys_valid", + ns: "test", + container: &v1.Container{ + EnvFrom: []v1.EnvFromSource{ + { + Prefix: "p_", + ConfigMapRef: &v1.ConfigMapEnvSource{LocalObjectReference: v1.LocalObjectReference{Name: "test-config-map"}}, + }, + }, + }, + masterServiceNs: "", + configMap: &v1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "test1", + Name: "test-configmap", + }, + Data: map[string]string{ + "1234": "abc", + }, + }, + expectedEnvs: []kubecontainer.EnvVar{ + { + Name: "p_1234", + Value: "abc", + }, + }, + }, + { + name: "secret", + ns: "test1", + container: &v1.Container{ + EnvFrom: []v1.EnvFromSource{ + { + SecretRef: &v1.SecretEnvSource{LocalObjectReference: v1.LocalObjectReference{Name: "test-secret"}}, + }, + { + Prefix: "p_", + SecretRef: &v1.SecretEnvSource{LocalObjectReference: v1.LocalObjectReference{Name: "test-secret"}}, + }, + }, + Env: []v1.EnvVar{ + { + Name: "TEST_LITERAL", + Value: "test-test-test", + }, + { + Name: "EXPANSION_TEST", + Value: "$(REPLACE_ME)", + }, + { + Name: "DUPE_TEST", + Value: "ENV_VAR", + }, + }, + }, + masterServiceNs: "nothing", + nilLister: false, + secret: &v1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "test1", + Name: "test-secret", + }, + Data: map[string][]byte{ + "REPLACE_ME": []byte("FROM_SECRET"), + "DUPE_TEST": []byte("SECRET"), + }, + }, + expectedEnvs: []kubecontainer.EnvVar{ + { + Name: "TEST_LITERAL", + Value: "test-test-test", + }, + { + Name: "TEST_SERVICE_HOST", + Value: "1.2.3.3", + }, + { + Name: "TEST_SERVICE_PORT", + Value: "8083", + }, + { + Name: "TEST_PORT", + Value: "tcp://1.2.3.3:8083", + }, + { + Name: "TEST_PORT_8083_TCP", + Value: "tcp://1.2.3.3:8083", + }, + { + Name: "TEST_PORT_8083_TCP_PROTO", + Value: "tcp", + }, + { + Name: "TEST_PORT_8083_TCP_PORT", + Value: "8083", + }, + { + Name: "TEST_PORT_8083_TCP_ADDR", + Value: "1.2.3.3", + }, + { + Name: "REPLACE_ME", + Value: "FROM_SECRET", + }, + { + Name: "EXPANSION_TEST", + Value: "FROM_SECRET", + }, + { + Name: "DUPE_TEST", + Value: "ENV_VAR", + }, + { + Name: "p_REPLACE_ME", + Value: "FROM_SECRET", + }, + { + Name: "p_DUPE_TEST", + Value: "SECRET", + }, + }, + }, + { + name: "secret_missing", + ns: "test1", + container: &v1.Container{ + EnvFrom: []v1.EnvFromSource{ + {SecretRef: &v1.SecretEnvSource{LocalObjectReference: v1.LocalObjectReference{Name: "test-secret"}}}, + }, + }, + masterServiceNs: "nothing", + expectedError: true, + }, + { + name: "secret_missing_optional", + ns: "test", + container: &v1.Container{ + EnvFrom: []v1.EnvFromSource{ + {SecretRef: &v1.SecretEnvSource{ + LocalObjectReference: v1.LocalObjectReference{Name: "missing-secret"}, + Optional: &trueVal}}, + }, + }, + masterServiceNs: "nothing", + expectedEnvs: nil, + }, + { + name: "secret_invalid_keys", + ns: "test", + container: &v1.Container{ + EnvFrom: []v1.EnvFromSource{ + {SecretRef: &v1.SecretEnvSource{LocalObjectReference: v1.LocalObjectReference{Name: "test-secret"}}}, + }, + }, + masterServiceNs: "nothing", + secret: &v1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "test1", + Name: "test-secret", + }, + Data: map[string][]byte{ + "1234": []byte("abc"), + "1z": []byte("abc"), + "key.1": []byte("value"), + }, + }, + expectedEnvs: []kubecontainer.EnvVar{ + { + Name: "key.1", + Value: "value", + }, + }, + expectedEvent: "Warning InvalidEnvironmentVariableNames Keys [1234, 1z] from the EnvFrom secret test/test-secret were skipped since they are considered invalid environment variable names.", + }, + { + name: "secret_invalid_keys_valid", + ns: "test", + container: &v1.Container{ + EnvFrom: []v1.EnvFromSource{ + { + Prefix: "p_", + SecretRef: &v1.SecretEnvSource{LocalObjectReference: v1.LocalObjectReference{Name: "test-secret"}}, + }, + }, + }, + masterServiceNs: "", + secret: &v1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "test1", + Name: "test-secret", + }, + Data: map[string][]byte{ + "1234.name": []byte("abc"), + }, + }, + expectedEnvs: []kubecontainer.EnvVar{ + { + Name: "p_1234.name", + Value: "abc", + }, + }, + }, + } + + for _, tc := range testCases { + fakeRecorder := record.NewFakeRecorder(1) + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + testKubelet.kubelet.recorder = fakeRecorder + defer testKubelet.Cleanup() + kl := testKubelet.kubelet + kl.masterServiceNamespace = tc.masterServiceNs + if tc.nilLister { + kl.serviceLister = nil + } else { + kl.serviceLister = testServiceLister{services} + } + + testKubelet.fakeKubeClient.AddReactor("get", "configmaps", func(action core.Action) (bool, runtime.Object, error) { + var err error + if tc.configMap == nil { + err = apierrors.NewNotFound(action.GetResource().GroupResource(), "configmap-name") + } + return true, tc.configMap, err + }) + testKubelet.fakeKubeClient.AddReactor("get", "secrets", func(action core.Action) (bool, runtime.Object, error) { + var err error + if tc.secret == nil { + err = apierrors.NewNotFound(action.GetResource().GroupResource(), "secret-name") + } + return true, tc.secret, err + }) + + testKubelet.fakeKubeClient.AddReactor("get", "secrets", func(action core.Action) (bool, runtime.Object, error) { + var err error + if tc.secret == nil { + err = errors.New("no secret defined") + } + return true, tc.secret, err + }) + + testPod := &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: tc.ns, + Name: "dapi-test-pod-name", + }, + Spec: v1.PodSpec{ + ServiceAccountName: "special", + NodeName: "node-name", + }, + } + podIP := "1.2.3.4" + + result, err := kl.makeEnvironmentVariables(testPod, tc.container, podIP) + select { + case e := <-fakeRecorder.Events: + assert.Equal(t, tc.expectedEvent, e) + default: + assert.Equal(t, "", tc.expectedEvent) + } + if tc.expectedError { + assert.Error(t, err, tc.name) + } else { + assert.NoError(t, err, "[%s]", tc.name) + + sort.Sort(envs(result)) + sort.Sort(envs(tc.expectedEnvs)) + assert.Equal(t, tc.expectedEnvs, result, "[%s] env entries", tc.name) + } + } +} + +func waitingState(cName string) v1.ContainerStatus { + return v1.ContainerStatus{ + Name: cName, + State: v1.ContainerState{ + Waiting: &v1.ContainerStateWaiting{}, + }, + } +} +func waitingStateWithLastTermination(cName string) v1.ContainerStatus { + return v1.ContainerStatus{ + Name: cName, + State: v1.ContainerState{ + Waiting: &v1.ContainerStateWaiting{}, + }, + LastTerminationState: v1.ContainerState{ + Terminated: &v1.ContainerStateTerminated{ + ExitCode: 0, + }, + }, + } +} +func runningState(cName string) v1.ContainerStatus { + return v1.ContainerStatus{ + Name: cName, + State: v1.ContainerState{ + Running: &v1.ContainerStateRunning{}, + }, + } +} +func stoppedState(cName string) v1.ContainerStatus { + return v1.ContainerStatus{ + Name: cName, + State: v1.ContainerState{ + Terminated: &v1.ContainerStateTerminated{}, + }, + } +} +func succeededState(cName string) v1.ContainerStatus { + return v1.ContainerStatus{ + Name: cName, + State: v1.ContainerState{ + Terminated: &v1.ContainerStateTerminated{ + ExitCode: 0, + }, + }, + } +} +func failedState(cName string) v1.ContainerStatus { + return v1.ContainerStatus{ + Name: cName, + State: v1.ContainerState{ + Terminated: &v1.ContainerStateTerminated{ + ExitCode: -1, + }, + }, + } +} + +func TestPodPhaseWithRestartAlways(t *testing.T) { + desiredState := v1.PodSpec{ + NodeName: "machine", + Containers: []v1.Container{ + {Name: "containerA"}, + {Name: "containerB"}, + }, + RestartPolicy: v1.RestartPolicyAlways, + } + + tests := []struct { + pod *v1.Pod + status v1.PodPhase + test string + }{ + {&v1.Pod{Spec: desiredState, Status: v1.PodStatus{}}, v1.PodPending, "waiting"}, + { + &v1.Pod{ + Spec: desiredState, + Status: v1.PodStatus{ + ContainerStatuses: []v1.ContainerStatus{ + runningState("containerA"), + runningState("containerB"), + }, + }, + }, + v1.PodRunning, + "all running", + }, + { + &v1.Pod{ + Spec: desiredState, + Status: v1.PodStatus{ + ContainerStatuses: []v1.ContainerStatus{ + stoppedState("containerA"), + stoppedState("containerB"), + }, + }, + }, + v1.PodRunning, + "all stopped with restart always", + }, + { + &v1.Pod{ + Spec: desiredState, + Status: v1.PodStatus{ + ContainerStatuses: []v1.ContainerStatus{ + runningState("containerA"), + stoppedState("containerB"), + }, + }, + }, + v1.PodRunning, + "mixed state #1 with restart always", + }, + { + &v1.Pod{ + Spec: desiredState, + Status: v1.PodStatus{ + ContainerStatuses: []v1.ContainerStatus{ + runningState("containerA"), + }, + }, + }, + v1.PodPending, + "mixed state #2 with restart always", + }, + { + &v1.Pod{ + Spec: desiredState, + Status: v1.PodStatus{ + ContainerStatuses: []v1.ContainerStatus{ + runningState("containerA"), + waitingState("containerB"), + }, + }, + }, + v1.PodPending, + "mixed state #3 with restart always", + }, + { + &v1.Pod{ + Spec: desiredState, + Status: v1.PodStatus{ + ContainerStatuses: []v1.ContainerStatus{ + runningState("containerA"), + waitingStateWithLastTermination("containerB"), + }, + }, + }, + v1.PodRunning, + "backoff crashloop container with restart always", + }, + } + for _, test := range tests { + status := GetPhase(&test.pod.Spec, test.pod.Status.ContainerStatuses) + assert.Equal(t, test.status, status, "[test %s]", test.test) + } +} + +func TestPodPhaseWithRestartNever(t *testing.T) { + desiredState := v1.PodSpec{ + NodeName: "machine", + Containers: []v1.Container{ + {Name: "containerA"}, + {Name: "containerB"}, + }, + RestartPolicy: v1.RestartPolicyNever, + } + + tests := []struct { + pod *v1.Pod + status v1.PodPhase + test string + }{ + {&v1.Pod{Spec: desiredState, Status: v1.PodStatus{}}, v1.PodPending, "waiting"}, + { + &v1.Pod{ + Spec: desiredState, + Status: v1.PodStatus{ + ContainerStatuses: []v1.ContainerStatus{ + runningState("containerA"), + runningState("containerB"), + }, + }, + }, + v1.PodRunning, + "all running with restart never", + }, + { + &v1.Pod{ + Spec: desiredState, + Status: v1.PodStatus{ + ContainerStatuses: []v1.ContainerStatus{ + succeededState("containerA"), + succeededState("containerB"), + }, + }, + }, + v1.PodSucceeded, + "all succeeded with restart never", + }, + { + &v1.Pod{ + Spec: desiredState, + Status: v1.PodStatus{ + ContainerStatuses: []v1.ContainerStatus{ + failedState("containerA"), + failedState("containerB"), + }, + }, + }, + v1.PodFailed, + "all failed with restart never", + }, + { + &v1.Pod{ + Spec: desiredState, + Status: v1.PodStatus{ + ContainerStatuses: []v1.ContainerStatus{ + runningState("containerA"), + succeededState("containerB"), + }, + }, + }, + v1.PodRunning, + "mixed state #1 with restart never", + }, + { + &v1.Pod{ + Spec: desiredState, + Status: v1.PodStatus{ + ContainerStatuses: []v1.ContainerStatus{ + runningState("containerA"), + }, + }, + }, + v1.PodPending, + "mixed state #2 with restart never", + }, + { + &v1.Pod{ + Spec: desiredState, + Status: v1.PodStatus{ + ContainerStatuses: []v1.ContainerStatus{ + runningState("containerA"), + waitingState("containerB"), + }, + }, + }, + v1.PodPending, + "mixed state #3 with restart never", + }, + } + for _, test := range tests { + status := GetPhase(&test.pod.Spec, test.pod.Status.ContainerStatuses) + assert.Equal(t, test.status, status, "[test %s]", test.test) + } +} + +func TestPodPhaseWithRestartOnFailure(t *testing.T) { + desiredState := v1.PodSpec{ + NodeName: "machine", + Containers: []v1.Container{ + {Name: "containerA"}, + {Name: "containerB"}, + }, + RestartPolicy: v1.RestartPolicyOnFailure, + } + + tests := []struct { + pod *v1.Pod + status v1.PodPhase + test string + }{ + {&v1.Pod{Spec: desiredState, Status: v1.PodStatus{}}, v1.PodPending, "waiting"}, + { + &v1.Pod{ + Spec: desiredState, + Status: v1.PodStatus{ + ContainerStatuses: []v1.ContainerStatus{ + runningState("containerA"), + runningState("containerB"), + }, + }, + }, + v1.PodRunning, + "all running with restart onfailure", + }, + { + &v1.Pod{ + Spec: desiredState, + Status: v1.PodStatus{ + ContainerStatuses: []v1.ContainerStatus{ + succeededState("containerA"), + succeededState("containerB"), + }, + }, + }, + v1.PodSucceeded, + "all succeeded with restart onfailure", + }, + { + &v1.Pod{ + Spec: desiredState, + Status: v1.PodStatus{ + ContainerStatuses: []v1.ContainerStatus{ + failedState("containerA"), + failedState("containerB"), + }, + }, + }, + v1.PodRunning, + "all failed with restart never", + }, + { + &v1.Pod{ + Spec: desiredState, + Status: v1.PodStatus{ + ContainerStatuses: []v1.ContainerStatus{ + runningState("containerA"), + succeededState("containerB"), + }, + }, + }, + v1.PodRunning, + "mixed state #1 with restart onfailure", + }, + { + &v1.Pod{ + Spec: desiredState, + Status: v1.PodStatus{ + ContainerStatuses: []v1.ContainerStatus{ + runningState("containerA"), + }, + }, + }, + v1.PodPending, + "mixed state #2 with restart onfailure", + }, + { + &v1.Pod{ + Spec: desiredState, + Status: v1.PodStatus{ + ContainerStatuses: []v1.ContainerStatus{ + runningState("containerA"), + waitingState("containerB"), + }, + }, + }, + v1.PodPending, + "mixed state #3 with restart onfailure", + }, + { + &v1.Pod{ + Spec: desiredState, + Status: v1.PodStatus{ + ContainerStatuses: []v1.ContainerStatus{ + runningState("containerA"), + waitingStateWithLastTermination("containerB"), + }, + }, + }, + v1.PodRunning, + "backoff crashloop container with restart onfailure", + }, + } + for _, test := range tests { + status := GetPhase(&test.pod.Spec, test.pod.Status.ContainerStatuses) + assert.Equal(t, test.status, status, "[test %s]", test.test) + } +} + +type fakeReadWriteCloser struct{} + +func (f *fakeReadWriteCloser) Write(data []byte) (int, error) { + return 0, nil +} + +func (f *fakeReadWriteCloser) Read(data []byte) (int, error) { + return 0, nil +} + +func (f *fakeReadWriteCloser) Close() error { + return nil +} + +func TestExec(t *testing.T) { + const ( + podName = "podFoo" + podNamespace = "nsFoo" + podUID types.UID = "12345678" + containerID = "containerFoo" + tty = true + ) + var ( + podFullName = kubecontainer.GetPodFullName(podWithUIDNameNs(podUID, podName, podNamespace)) + command = []string{"ls"} + stdin = &bytes.Buffer{} + stdout = &fakeReadWriteCloser{} + stderr = &fakeReadWriteCloser{} + ) + + testcases := []struct { + description string + podFullName string + container string + expectError bool + }{{ + description: "success case", + podFullName: podFullName, + container: containerID, + }, { + description: "no such pod", + podFullName: "bar" + podFullName, + container: containerID, + expectError: true, + }, { + description: "no such container", + podFullName: podFullName, + container: "containerBar", + expectError: true, + }} + + for _, tc := range testcases { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + testKubelet.fakeRuntime.PodList = []*containertest.FakePod{ + {Pod: &kubecontainer.Pod{ + ID: podUID, + Name: podName, + Namespace: podNamespace, + Containers: []*kubecontainer.Container{ + {Name: containerID, + ID: kubecontainer.ContainerID{Type: "test", ID: containerID}, + }, + }, + }}, + } + + { // No streaming case + description := "no streaming - " + tc.description + redirect, err := kubelet.GetExec(tc.podFullName, podUID, tc.container, command, remotecommand.Options{}) + assert.Error(t, err, description) + assert.Nil(t, redirect, description) + + err = kubelet.ExecInContainer(tc.podFullName, podUID, tc.container, command, stdin, stdout, stderr, tty, nil, 0) + assert.Error(t, err, description) + } + { // Direct streaming case + description := "direct streaming - " + tc.description + fakeRuntime := &containertest.FakeDirectStreamingRuntime{FakeRuntime: testKubelet.fakeRuntime} + kubelet.containerRuntime = fakeRuntime + + redirect, err := kubelet.GetExec(tc.podFullName, podUID, tc.container, command, remotecommand.Options{}) + assert.NoError(t, err, description) + assert.Nil(t, redirect, description) + + err = kubelet.ExecInContainer(tc.podFullName, podUID, tc.container, command, stdin, stdout, stderr, tty, nil, 0) + if tc.expectError { + assert.Error(t, err, description) + } else { + assert.NoError(t, err, description) + assert.Equal(t, fakeRuntime.Args.ContainerID.ID, containerID, description+": ID") + assert.Equal(t, fakeRuntime.Args.Cmd, command, description+": Command") + assert.Equal(t, fakeRuntime.Args.Stdin, stdin, description+": Stdin") + assert.Equal(t, fakeRuntime.Args.Stdout, stdout, description+": Stdout") + assert.Equal(t, fakeRuntime.Args.Stderr, stderr, description+": Stderr") + assert.Equal(t, fakeRuntime.Args.TTY, tty, description+": TTY") + } + } + { // Indirect streaming case + description := "indirect streaming - " + tc.description + fakeRuntime := &containertest.FakeIndirectStreamingRuntime{FakeRuntime: testKubelet.fakeRuntime} + kubelet.containerRuntime = fakeRuntime + + redirect, err := kubelet.GetExec(tc.podFullName, podUID, tc.container, command, remotecommand.Options{}) + if tc.expectError { + assert.Error(t, err, description) + } else { + assert.NoError(t, err, description) + assert.Equal(t, containertest.FakeHost, redirect.Host, description+": redirect") + } + + err = kubelet.ExecInContainer(tc.podFullName, podUID, tc.container, command, stdin, stdout, stderr, tty, nil, 0) + assert.Error(t, err, description) + } + } +} + +func TestPortForward(t *testing.T) { + const ( + podName = "podFoo" + podNamespace = "nsFoo" + podUID types.UID = "12345678" + port int32 = 5000 + ) + var ( + stream = &fakeReadWriteCloser{} + ) + + testcases := []struct { + description string + podName string + expectError bool + }{{ + description: "success case", + podName: podName, + }, { + description: "no such pod", + podName: "bar", + expectError: true, + }} + + for _, tc := range testcases { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + testKubelet.fakeRuntime.PodList = []*containertest.FakePod{ + {Pod: &kubecontainer.Pod{ + ID: podUID, + Name: podName, + Namespace: podNamespace, + Containers: []*kubecontainer.Container{ + {Name: "foo", + ID: kubecontainer.ContainerID{Type: "test", ID: "foo"}, + }, + }, + }}, + } + + podFullName := kubecontainer.GetPodFullName(podWithUIDNameNs(podUID, tc.podName, podNamespace)) + { // No streaming case + description := "no streaming - " + tc.description + redirect, err := kubelet.GetPortForward(tc.podName, podNamespace, podUID, portforward.V4Options{}) + assert.Error(t, err, description) + assert.Nil(t, redirect, description) + + err = kubelet.PortForward(podFullName, podUID, port, stream) + assert.Error(t, err, description) + } + { // Direct streaming case + description := "direct streaming - " + tc.description + fakeRuntime := &containertest.FakeDirectStreamingRuntime{FakeRuntime: testKubelet.fakeRuntime} + kubelet.containerRuntime = fakeRuntime + + redirect, err := kubelet.GetPortForward(tc.podName, podNamespace, podUID, portforward.V4Options{}) + assert.NoError(t, err, description) + assert.Nil(t, redirect, description) + + err = kubelet.PortForward(podFullName, podUID, port, stream) + if tc.expectError { + assert.Error(t, err, description) + } else { + assert.NoError(t, err, description) + require.Equal(t, fakeRuntime.Args.Pod.ID, podUID, description+": Pod UID") + require.Equal(t, fakeRuntime.Args.Port, port, description+": Port") + require.Equal(t, fakeRuntime.Args.Stream, stream, description+": stream") + } + } + { // Indirect streaming case + description := "indirect streaming - " + tc.description + fakeRuntime := &containertest.FakeIndirectStreamingRuntime{FakeRuntime: testKubelet.fakeRuntime} + kubelet.containerRuntime = fakeRuntime + + redirect, err := kubelet.GetPortForward(tc.podName, podNamespace, podUID, portforward.V4Options{}) + if tc.expectError { + assert.Error(t, err, description) + } else { + assert.NoError(t, err, description) + assert.Equal(t, containertest.FakeHost, redirect.Host, description+": redirect") + } + + err = kubelet.PortForward(podFullName, podUID, port, stream) + assert.Error(t, err, description) + } + } +} + +// Tests that identify the host port conflicts are detected correctly. +func TestGetHostPortConflicts(t *testing.T) { + pods := []*v1.Pod{ + {Spec: v1.PodSpec{Containers: []v1.Container{{Ports: []v1.ContainerPort{{HostPort: 80}}}}}}, + {Spec: v1.PodSpec{Containers: []v1.Container{{Ports: []v1.ContainerPort{{HostPort: 81}}}}}}, + {Spec: v1.PodSpec{Containers: []v1.Container{{Ports: []v1.ContainerPort{{HostPort: 82}}}}}}, + {Spec: v1.PodSpec{Containers: []v1.Container{{Ports: []v1.ContainerPort{{HostPort: 83}}}}}}, + } + // Pods should not cause any conflict. + assert.False(t, hasHostPortConflicts(pods), "Should not have port conflicts") + + expected := &v1.Pod{ + Spec: v1.PodSpec{Containers: []v1.Container{{Ports: []v1.ContainerPort{{HostPort: 81}}}}}, + } + // The new pod should cause conflict and be reported. + pods = append(pods, expected) + assert.True(t, hasHostPortConflicts(pods), "Should have port conflicts") +} + +func TestHasHostMountPVC(t *testing.T) { + tests := map[string]struct { + pvError error + pvcError error + expected bool + podHasPVC bool + pvcIsHostPath bool + }{ + "no pvc": {podHasPVC: false, expected: false}, + "error fetching pvc": { + podHasPVC: true, + pvcError: fmt.Errorf("foo"), + expected: false, + }, + "error fetching pv": { + podHasPVC: true, + pvError: fmt.Errorf("foo"), + expected: false, + }, + "host path pvc": { + podHasPVC: true, + pvcIsHostPath: true, + expected: true, + }, + "non host path pvc": { + podHasPVC: true, + pvcIsHostPath: false, + expected: false, + }, + } + + for k, v := range tests { + testKubelet := newTestKubelet(t, false) + defer testKubelet.Cleanup() + pod := &v1.Pod{ + Spec: v1.PodSpec{}, + } + + volumeToReturn := &v1.PersistentVolume{ + Spec: v1.PersistentVolumeSpec{}, + } + + if v.podHasPVC { + pod.Spec.Volumes = []v1.Volume{ + { + VolumeSource: v1.VolumeSource{ + PersistentVolumeClaim: &v1.PersistentVolumeClaimVolumeSource{}, + }, + }, + } + + if v.pvcIsHostPath { + volumeToReturn.Spec.PersistentVolumeSource = v1.PersistentVolumeSource{ + HostPath: &v1.HostPathVolumeSource{}, + } + } + + } + + testKubelet.fakeKubeClient.AddReactor("get", "persistentvolumeclaims", func(action core.Action) (bool, runtime.Object, error) { + return true, &v1.PersistentVolumeClaim{ + Spec: v1.PersistentVolumeClaimSpec{ + VolumeName: "foo", + }, + }, v.pvcError + }) + testKubelet.fakeKubeClient.AddReactor("get", "persistentvolumes", func(action core.Action) (bool, runtime.Object, error) { + return true, volumeToReturn, v.pvError + }) + + actual := testKubelet.kubelet.hasHostMountPVC(pod) + if actual != v.expected { + t.Errorf("%s expected %t but got %t", k, v.expected, actual) + } + + } +} + +func TestHasNonNamespacedCapability(t *testing.T) { + createPodWithCap := func(caps []v1.Capability) *v1.Pod { + pod := &v1.Pod{ + Spec: v1.PodSpec{ + Containers: []v1.Container{{}}, + }, + } + + if len(caps) > 0 { + pod.Spec.Containers[0].SecurityContext = &v1.SecurityContext{ + Capabilities: &v1.Capabilities{ + Add: caps, + }, + } + } + return pod + } + + nilCaps := createPodWithCap([]v1.Capability{v1.Capability("foo")}) + nilCaps.Spec.Containers[0].SecurityContext = nil + + tests := map[string]struct { + pod *v1.Pod + expected bool + }{ + "nil security contxt": {createPodWithCap(nil), false}, + "nil caps": {nilCaps, false}, + "namespaced cap": {createPodWithCap([]v1.Capability{v1.Capability("foo")}), false}, + "non-namespaced cap MKNOD": {createPodWithCap([]v1.Capability{v1.Capability("MKNOD")}), true}, + "non-namespaced cap SYS_TIME": {createPodWithCap([]v1.Capability{v1.Capability("SYS_TIME")}), true}, + "non-namespaced cap SYS_MODULE": {createPodWithCap([]v1.Capability{v1.Capability("SYS_MODULE")}), true}, + } + + for k, v := range tests { + actual := hasNonNamespacedCapability(v.pod) + if actual != v.expected { + t.Errorf("%s failed, expected %t but got %t", k, v.expected, actual) + } + } +} + +func TestHasHostVolume(t *testing.T) { + pod := &v1.Pod{ + Spec: v1.PodSpec{ + Volumes: []v1.Volume{ + { + VolumeSource: v1.VolumeSource{ + HostPath: &v1.HostPathVolumeSource{}, + }, + }, + }, + }, + } + + result := hasHostVolume(pod) + if !result { + t.Errorf("expected host volume to enable host user namespace") + } + + pod.Spec.Volumes[0].VolumeSource.HostPath = nil + result = hasHostVolume(pod) + if result { + t.Errorf("expected nil host volume to not enable host user namespace") + } +} + +func TestHasHostNamespace(t *testing.T) { + tests := map[string]struct { + ps v1.PodSpec + expected bool + }{ + "nil psc": { + ps: v1.PodSpec{}, + expected: false}, + + "host pid true": { + ps: v1.PodSpec{ + HostPID: true, + SecurityContext: &v1.PodSecurityContext{}, + }, + expected: true, + }, + "host ipc true": { + ps: v1.PodSpec{ + HostIPC: true, + SecurityContext: &v1.PodSecurityContext{}, + }, + expected: true, + }, + "host net true": { + ps: v1.PodSpec{ + HostNetwork: true, + SecurityContext: &v1.PodSecurityContext{}, + }, + expected: true, + }, + "no host ns": { + ps: v1.PodSpec{ + SecurityContext: &v1.PodSecurityContext{}, + }, + expected: false, + }, + } + + for k, v := range tests { + pod := &v1.Pod{ + Spec: v.ps, + } + actual := hasHostNamespace(pod) + if actual != v.expected { + t.Errorf("%s failed, expected %t but got %t", k, v.expected, actual) + } + } +} + +func TestTruncatePodHostname(t *testing.T) { + for c, test := range map[string]struct { + input string + output string + }{ + "valid hostname": { + input: "test.pod.hostname", + output: "test.pod.hostname", + }, + "too long hostname": { + input: "1234567.1234567.1234567.1234567.1234567.1234567.1234567.1234567.1234567.", // 8*9=72 chars + output: "1234567.1234567.1234567.1234567.1234567.1234567.1234567.1234567", //8*8-1=63 chars + }, + "hostname end with .": { + input: "1234567.1234567.1234567.1234567.1234567.1234567.1234567.123456.1234567.", // 8*9-1=71 chars + output: "1234567.1234567.1234567.1234567.1234567.1234567.1234567.123456", //8*8-2=62 chars + }, + "hostname end with -": { + input: "1234567.1234567.1234567.1234567.1234567.1234567.1234567.123456-1234567.", // 8*9-1=71 chars + output: "1234567.1234567.1234567.1234567.1234567.1234567.1234567.123456", //8*8-2=62 chars + }, + } { + t.Logf("TestCase: %q", c) + output, err := truncatePodHostnameIfNeeded("test-pod", test.input) + assert.NoError(t, err) + assert.Equal(t, test.output, output) + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods_windows_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods_windows_test.go new file mode 100644 index 000000000..1bc4227fc --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods_windows_test.go @@ -0,0 +1,100 @@ +// +build windows + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "k8s.io/api/core/v1" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" +) + +func TestMakeMountsWindows(t *testing.T) { + container := v1.Container{ + VolumeMounts: []v1.VolumeMount{ + { + MountPath: "c:/etc/hosts", + Name: "disk", + ReadOnly: false, + }, + { + MountPath: "c:/mnt/path3", + Name: "disk", + ReadOnly: true, + }, + { + MountPath: "c:/mnt/path4", + Name: "disk4", + ReadOnly: false, + }, + { + MountPath: "c:/mnt/path5", + Name: "disk5", + ReadOnly: false, + }, + }, + } + + podVolumes := kubecontainer.VolumeMap{ + "disk": kubecontainer.VolumeInfo{Mounter: &stubVolume{path: "c:/mnt/disk"}}, + "disk4": kubecontainer.VolumeInfo{Mounter: &stubVolume{path: "c:/mnt/host"}}, + "disk5": kubecontainer.VolumeInfo{Mounter: &stubVolume{path: "c:/var/lib/kubelet/podID/volumes/empty/disk5"}}, + } + + pod := v1.Pod{ + Spec: v1.PodSpec{ + HostNetwork: true, + }, + } + + mounts, _ := makeMounts(&pod, "/pod", &container, "fakepodname", "", "", podVolumes) + + expectedMounts := []kubecontainer.Mount{ + { + Name: "disk", + ContainerPath: "c:/etc/hosts", + HostPath: "c:/mnt/disk", + ReadOnly: false, + SELinuxRelabel: false, + }, + { + Name: "disk", + ContainerPath: "c:/mnt/path3", + HostPath: "c:/mnt/disk", + ReadOnly: true, + SELinuxRelabel: false, + }, + { + Name: "disk4", + ContainerPath: "c:/mnt/path4", + HostPath: "c:/mnt/host", + ReadOnly: false, + SELinuxRelabel: false, + }, + { + Name: "disk5", + ContainerPath: "c:/mnt/path5", + HostPath: "c:/var/lib/kubelet/podID/volumes/empty/disk5", + ReadOnly: false, + SELinuxRelabel: false, + }, + } + assert.Equal(t, expectedMounts, mounts, "mounts of container %+v", container) +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_resources.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_resources.go new file mode 100644 index 000000000..15e4d9ac2 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_resources.go @@ -0,0 +1,72 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "fmt" + + "github.com/golang/glog" + + "k8s.io/api/core/v1" + "k8s.io/client-go/kubernetes/scheme" + "k8s.io/kubernetes/pkg/api/v1/resource" +) + +// defaultPodLimitsForDownwardAPI copies the input pod, and optional container, +// and applies default resource limits. it returns a copy of the input pod, +// and a copy of the input container (if specified) with default limits +// applied. if a container has no limit specified, it will default the limit to +// the node allocatable. +// TODO: if/when we have pod level resources, we need to update this function +// to use those limits instead of node allocatable. +func (kl *Kubelet) defaultPodLimitsForDownwardAPI(pod *v1.Pod, container *v1.Container) (*v1.Pod, *v1.Container, error) { + if pod == nil { + return nil, nil, fmt.Errorf("invalid input, pod cannot be nil") + } + + node, err := kl.getNodeAnyWay() + if err != nil { + return nil, nil, fmt.Errorf("failed to find node object, expected a node") + } + allocatable := node.Status.Allocatable + glog.Infof("allocatable: %v", allocatable) + podCopy, err := scheme.Scheme.Copy(pod) + if err != nil { + return nil, nil, fmt.Errorf("failed to perform a deep copy of pod object: %v", err) + } + outputPod, ok := podCopy.(*v1.Pod) + if !ok { + return nil, nil, fmt.Errorf("unexpected type returned from deep copy of pod object") + } + for idx := range outputPod.Spec.Containers { + resource.MergeContainerResourceLimits(&outputPod.Spec.Containers[idx], allocatable) + } + + var outputContainer *v1.Container + if container != nil { + containerCopy, err := scheme.Scheme.DeepCopy(container) + if err != nil { + return nil, nil, fmt.Errorf("failed to perform a deep copy of container object: %v", err) + } + outputContainer, ok = containerCopy.(*v1.Container) + if !ok { + return nil, nil, fmt.Errorf("unexpected type returned from deep copy of container object") + } + resource.MergeContainerResourceLimits(outputContainer, allocatable) + } + return outputPod, outputContainer, nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_resources_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_resources_test.go new file mode 100644 index 000000000..c5833b256 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_resources_test.go @@ -0,0 +1,111 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + cadvisorapi "github.com/google/cadvisor/info/v1" + cadvisorapiv2 "github.com/google/cadvisor/info/v2" + "k8s.io/api/core/v1" + apiequality "k8s.io/apimachinery/pkg/api/equality" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +func TestPodResourceLimitsDefaulting(t *testing.T) { + cpuCores := resource.MustParse("10") + memoryCapacity := resource.MustParse("10Gi") + tk := newTestKubelet(t, true) + defer tk.Cleanup() + tk.fakeCadvisor.On("VersionInfo").Return(&cadvisorapi.VersionInfo{}, nil) + tk.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{ + NumCores: int(cpuCores.Value()), + MemoryCapacity: uint64(memoryCapacity.Value()), + }, nil) + tk.fakeCadvisor.On("ImagesFsInfo").Return(cadvisorapiv2.FsInfo{}, nil) + tk.fakeCadvisor.On("RootFsInfo").Return(cadvisorapiv2.FsInfo{}, nil) + tk.kubelet.nodeInfo = &testNodeInfo{ + nodes: []*v1.Node{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: string(tk.kubelet.nodeName), + }, + Status: v1.NodeStatus{ + Allocatable: v1.ResourceList{ + v1.ResourceCPU: resource.MustParse("6"), + v1.ResourceMemory: resource.MustParse("4Gi"), + }, + }, + }, + }, + } + cases := []struct { + pod *v1.Pod + expected *v1.Pod + }{ + { + pod: getPod("0", "0"), + expected: getPod("6", "4Gi"), + }, + { + pod: getPod("1", "0"), + expected: getPod("1", "4Gi"), + }, + { + pod: getPod("", ""), + expected: getPod("6", "4Gi"), + }, + { + pod: getPod("0", "1Mi"), + expected: getPod("6", "1Mi"), + }, + } + as := assert.New(t) + for idx, tc := range cases { + actual, _, err := tk.kubelet.defaultPodLimitsForDownwardAPI(tc.pod, nil) + as.Nil(err, "failed to default pod limits: %v", err) + if !apiequality.Semantic.DeepEqual(tc.expected, actual) { + as.Fail("test case [%d] failed. Expected: %+v, Got: %+v", idx, tc.expected, actual) + } + } +} + +func getPod(cpuLimit, memoryLimit string) *v1.Pod { + resources := v1.ResourceRequirements{} + if cpuLimit != "" || memoryLimit != "" { + resources.Limits = make(v1.ResourceList) + } + if cpuLimit != "" { + resources.Limits[v1.ResourceCPU] = resource.MustParse(cpuLimit) + } + if memoryLimit != "" { + resources.Limits[v1.ResourceMemory] = resource.MustParse(memoryLimit) + } + return &v1.Pod{ + Spec: v1.PodSpec{ + Containers: []v1.Container{ + { + Name: "foo", + Resources: resources, + }, + }, + }, + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_test.go new file mode 100644 index 000000000..771e938b6 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_test.go @@ -0,0 +1,2060 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "fmt" + "io/ioutil" + "os" + "sort" + "testing" + "time" + + cadvisorapi "github.com/google/cadvisor/info/v1" + cadvisorapiv2 "github.com/google/cadvisor/info/v2" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/clock" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/kubernetes/fake" + "k8s.io/client-go/tools/record" + "k8s.io/client-go/util/flowcontrol" + "k8s.io/kubernetes/pkg/capabilities" + "k8s.io/kubernetes/pkg/kubelet/apis/kubeletconfig" + cadvisortest "k8s.io/kubernetes/pkg/kubelet/cadvisor/testing" + "k8s.io/kubernetes/pkg/kubelet/cm" + "k8s.io/kubernetes/pkg/kubelet/config" + "k8s.io/kubernetes/pkg/kubelet/configmap" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + containertest "k8s.io/kubernetes/pkg/kubelet/container/testing" + "k8s.io/kubernetes/pkg/kubelet/eviction" + "k8s.io/kubernetes/pkg/kubelet/gpu" + "k8s.io/kubernetes/pkg/kubelet/images" + "k8s.io/kubernetes/pkg/kubelet/lifecycle" + "k8s.io/kubernetes/pkg/kubelet/network" + nettest "k8s.io/kubernetes/pkg/kubelet/network/testing" + "k8s.io/kubernetes/pkg/kubelet/pleg" + kubepod "k8s.io/kubernetes/pkg/kubelet/pod" + podtest "k8s.io/kubernetes/pkg/kubelet/pod/testing" + proberesults "k8s.io/kubernetes/pkg/kubelet/prober/results" + probetest "k8s.io/kubernetes/pkg/kubelet/prober/testing" + "k8s.io/kubernetes/pkg/kubelet/secret" + serverstats "k8s.io/kubernetes/pkg/kubelet/server/stats" + "k8s.io/kubernetes/pkg/kubelet/stats" + "k8s.io/kubernetes/pkg/kubelet/status" + statustest "k8s.io/kubernetes/pkg/kubelet/status/testing" + kubetypes "k8s.io/kubernetes/pkg/kubelet/types" + "k8s.io/kubernetes/pkg/kubelet/util/queue" + kubeletvolume "k8s.io/kubernetes/pkg/kubelet/volumemanager" + "k8s.io/kubernetes/pkg/util/mount" + "k8s.io/kubernetes/pkg/volume" + _ "k8s.io/kubernetes/pkg/volume/host_path" + volumetest "k8s.io/kubernetes/pkg/volume/testing" + "k8s.io/kubernetes/pkg/volume/util/volumehelper" +) + +func init() { + utilruntime.ReallyCrash = true +} + +const ( + testKubeletHostname = "127.0.0.1" + testKubeletHostIP = "127.0.0.1" + + // TODO(harry) any global place for these two? + // Reasonable size range of all container images. 90%ile of images on dockerhub drops into this range. + minImgSize int64 = 23 * 1024 * 1024 + maxImgSize int64 = 1000 * 1024 * 1024 +) + +// fakeImageGCManager is a fake image gc manager for testing. It will return image +// list from fake runtime directly instead of caching it. +type fakeImageGCManager struct { + fakeImageService kubecontainer.ImageService + images.ImageGCManager +} + +func (f *fakeImageGCManager) GetImageList() ([]kubecontainer.Image, error) { + return f.fakeImageService.ListImages() +} + +type TestKubelet struct { + kubelet *Kubelet + fakeRuntime *containertest.FakeRuntime + fakeCadvisor *cadvisortest.Mock + fakeKubeClient *fake.Clientset + fakeMirrorClient *podtest.FakeMirrorClient + fakeClock *clock.FakeClock + mounter mount.Interface + volumePlugin *volumetest.FakeVolumePlugin +} + +func (tk *TestKubelet) Cleanup() { + if tk.kubelet != nil { + os.RemoveAll(tk.kubelet.rootDirectory) + } +} + +func (tk *TestKubelet) chainMock() { + tk.fakeCadvisor.On("ImagesFsInfo").Return(cadvisorapiv2.FsInfo{}, nil) + tk.fakeCadvisor.On("RootFsInfo").Return(cadvisorapiv2.FsInfo{}, nil) +} + +// newTestKubelet returns test kubelet with two images. +func newTestKubelet(t *testing.T, controllerAttachDetachEnabled bool) *TestKubelet { + imageList := []kubecontainer.Image{ + { + ID: "abc", + RepoTags: []string{"gcr.io/google_containers:v1", "gcr.io/google_containers:v2"}, + Size: 123, + }, + { + ID: "efg", + RepoTags: []string{"gcr.io/google_containers:v3", "gcr.io/google_containers:v4"}, + Size: 456, + }, + } + return newTestKubeletWithImageList(t, imageList, controllerAttachDetachEnabled) +} + +func newTestKubeletWithImageList( + t *testing.T, + imageList []kubecontainer.Image, + controllerAttachDetachEnabled bool) *TestKubelet { + fakeRuntime := &containertest.FakeRuntime{} + fakeRuntime.RuntimeType = "test" + fakeRuntime.VersionInfo = "1.5.0" + fakeRuntime.ImageList = imageList + // Set ready conditions by default. + fakeRuntime.RuntimeStatus = &kubecontainer.RuntimeStatus{ + Conditions: []kubecontainer.RuntimeCondition{ + {Type: "RuntimeReady", Status: true}, + {Type: "NetworkReady", Status: true}, + }, + } + + fakeRecorder := &record.FakeRecorder{} + fakeKubeClient := &fake.Clientset{} + kubelet := &Kubelet{} + kubelet.recorder = fakeRecorder + kubelet.kubeClient = fakeKubeClient + kubelet.heartbeatClient = fakeKubeClient.CoreV1() + kubelet.os = &containertest.FakeOS{} + kubelet.mounter = &mount.FakeMounter{} + + kubelet.hostname = testKubeletHostname + kubelet.nodeName = types.NodeName(testKubeletHostname) + kubelet.runtimeState = newRuntimeState(maxWaitForContainerRuntime) + kubelet.runtimeState.setNetworkState(nil) + kubelet.networkPlugin, _ = network.InitNetworkPlugin([]network.NetworkPlugin{}, "", nettest.NewFakeHost(nil), kubeletconfig.HairpinNone, "", 1440) + if tempDir, err := ioutil.TempDir("/tmp", "kubelet_test."); err != nil { + t.Fatalf("can't make a temp rootdir: %v", err) + } else { + kubelet.rootDirectory = tempDir + } + if err := os.MkdirAll(kubelet.rootDirectory, 0750); err != nil { + t.Fatalf("can't mkdir(%q): %v", kubelet.rootDirectory, err) + } + kubelet.sourcesReady = config.NewSourcesReady(func(_ sets.String) bool { return true }) + kubelet.masterServiceNamespace = metav1.NamespaceDefault + kubelet.serviceLister = testServiceLister{} + kubelet.nodeInfo = testNodeInfo{ + nodes: []*v1.Node{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: string(kubelet.nodeName), + }, + Status: v1.NodeStatus{ + Conditions: []v1.NodeCondition{ + { + Type: v1.NodeReady, + Status: v1.ConditionTrue, + Reason: "Ready", + Message: "Node ready", + }, + }, + Addresses: []v1.NodeAddress{ + { + Type: v1.NodeInternalIP, + Address: testKubeletHostIP, + }, + }, + }, + }, + }, + } + kubelet.recorder = fakeRecorder + if err := kubelet.setupDataDirs(); err != nil { + t.Fatalf("can't initialize kubelet data dirs: %v", err) + } + kubelet.daemonEndpoints = &v1.NodeDaemonEndpoints{} + + mockCadvisor := &cadvisortest.Mock{} + kubelet.cadvisor = mockCadvisor + + fakeMirrorClient := podtest.NewFakeMirrorClient() + secretManager := secret.NewSimpleSecretManager(kubelet.kubeClient) + kubelet.secretManager = secretManager + configMapManager := configmap.NewSimpleConfigMapManager(kubelet.kubeClient) + kubelet.configMapManager = configMapManager + kubelet.podManager = kubepod.NewBasicPodManager(fakeMirrorClient, kubelet.secretManager, kubelet.configMapManager) + kubelet.statusManager = status.NewManager(fakeKubeClient, kubelet.podManager, &statustest.FakePodDeletionSafetyProvider{}) + + kubelet.containerRuntime = fakeRuntime + kubelet.runtimeCache = containertest.NewFakeRuntimeCache(kubelet.containerRuntime) + kubelet.reasonCache = NewReasonCache() + kubelet.podCache = containertest.NewFakeCache(kubelet.containerRuntime) + kubelet.podWorkers = &fakePodWorkers{ + syncPodFn: kubelet.syncPod, + cache: kubelet.podCache, + t: t, + } + + kubelet.probeManager = probetest.FakeManager{} + kubelet.livenessManager = proberesults.NewManager() + + kubelet.containerManager = cm.NewStubContainerManager() + fakeNodeRef := &v1.ObjectReference{ + Kind: "Node", + Name: testKubeletHostname, + UID: types.UID(testKubeletHostname), + Namespace: "", + } + fakeImageGCPolicy := images.ImageGCPolicy{ + HighThresholdPercent: 90, + LowThresholdPercent: 80, + } + imageGCManager, err := images.NewImageGCManager(fakeRuntime, mockCadvisor, fakeRecorder, fakeNodeRef, fakeImageGCPolicy) + assert.NoError(t, err) + kubelet.imageManager = &fakeImageGCManager{ + fakeImageService: fakeRuntime, + ImageGCManager: imageGCManager, + } + fakeClock := clock.NewFakeClock(time.Now()) + kubelet.backOff = flowcontrol.NewBackOff(time.Second, time.Minute) + kubelet.backOff.Clock = fakeClock + kubelet.podKillingCh = make(chan *kubecontainer.PodPair, 20) + kubelet.resyncInterval = 10 * time.Second + kubelet.workQueue = queue.NewBasicWorkQueue(fakeClock) + // Relist period does not affect the tests. + kubelet.pleg = pleg.NewGenericPLEG(fakeRuntime, 100, time.Hour, nil, clock.RealClock{}) + kubelet.clock = fakeClock + kubelet.setNodeStatusFuncs = kubelet.defaultNodeStatusFuncs() + + // TODO: Factor out "StatsProvider" from Kubelet so we don't have a cyclic dependency + volumeStatsAggPeriod := time.Second * 10 + kubelet.resourceAnalyzer = serverstats.NewResourceAnalyzer(kubelet, volumeStatsAggPeriod) + nodeRef := &v1.ObjectReference{ + Kind: "Node", + Name: string(kubelet.nodeName), + UID: types.UID(kubelet.nodeName), + Namespace: "", + } + // setup eviction manager + evictionManager, evictionAdmitHandler := eviction.NewManager(kubelet.resourceAnalyzer, eviction.Config{}, killPodNow(kubelet.podWorkers, fakeRecorder), kubelet.imageManager, kubelet.containerGC, fakeRecorder, nodeRef, kubelet.clock) + + kubelet.evictionManager = evictionManager + kubelet.admitHandlers.AddPodAdmitHandler(evictionAdmitHandler) + // Add this as cleanup predicate pod admitter + kubelet.admitHandlers.AddPodAdmitHandler(lifecycle.NewPredicateAdmitHandler(kubelet.getNodeAnyWay, lifecycle.NewAdmissionFailureHandlerStub())) + + plug := &volumetest.FakeVolumePlugin{PluginName: "fake", Host: nil} + var prober volume.DynamicPluginProber = nil // TODO (#51147) inject mock + kubelet.volumePluginMgr, err = + NewInitializedVolumePluginMgr(kubelet, kubelet.secretManager, kubelet.configMapManager, []volume.VolumePlugin{plug}, prober) + require.NoError(t, err, "Failed to initialize VolumePluginMgr") + + kubelet.mounter = &mount.FakeMounter{} + kubelet.volumeManager = kubeletvolume.NewVolumeManager( + controllerAttachDetachEnabled, + kubelet.nodeName, + kubelet.podManager, + kubelet.statusManager, + fakeKubeClient, + kubelet.volumePluginMgr, + fakeRuntime, + kubelet.mounter, + kubelet.getPodsDir(), + kubelet.recorder, + false, /* experimentalCheckNodeCapabilitiesBeforeMount*/ + false /* keepTerminatedPodVolumes */) + + // enable active deadline handler + activeDeadlineHandler, err := newActiveDeadlineHandler(kubelet.statusManager, kubelet.recorder, kubelet.clock) + require.NoError(t, err, "Can't initialize active deadline handler") + + kubelet.AddPodSyncLoopHandler(activeDeadlineHandler) + kubelet.AddPodSyncHandler(activeDeadlineHandler) + kubelet.gpuManager = gpu.NewGPUManagerStub() + kubelet.StatsProvider = stats.NewCadvisorStatsProvider( + kubelet.cadvisor, + kubelet.resourceAnalyzer, + kubelet.podManager, + kubelet.runtimeCache, + fakeRuntime) + return &TestKubelet{kubelet, fakeRuntime, mockCadvisor, fakeKubeClient, fakeMirrorClient, fakeClock, nil, plug} +} + +func newTestPods(count int) []*v1.Pod { + pods := make([]*v1.Pod, count) + for i := 0; i < count; i++ { + pods[i] = &v1.Pod{ + Spec: v1.PodSpec{ + HostNetwork: true, + }, + ObjectMeta: metav1.ObjectMeta{ + UID: types.UID(10000 + i), + Name: fmt.Sprintf("pod%d", i), + }, + } + } + return pods +} + +var emptyPodUIDs map[types.UID]kubetypes.SyncPodType + +func TestSyncLoopAbort(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + kubelet.runtimeState.setRuntimeSync(time.Now()) + // The syncLoop waits on time.After(resyncInterval), set it really big so that we don't race for + // the channel close + kubelet.resyncInterval = time.Second * 30 + + ch := make(chan kubetypes.PodUpdate) + close(ch) + + // sanity check (also prevent this test from hanging in the next step) + ok := kubelet.syncLoopIteration(ch, kubelet, make(chan time.Time), make(chan time.Time), make(chan *pleg.PodLifecycleEvent, 1)) + require.False(t, ok, "Expected syncLoopIteration to return !ok since update chan was closed") + + // this should terminate immediately; if it hangs then the syncLoopIteration isn't aborting properly + kubelet.syncLoop(ch, kubelet) +} + +func TestSyncPodsStartPod(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + fakeRuntime := testKubelet.fakeRuntime + pods := []*v1.Pod{ + podWithUIDNameNsSpec("12345678", "foo", "new", v1.PodSpec{ + Containers: []v1.Container{ + {Name: "bar"}, + }, + }), + } + kubelet.podManager.SetPods(pods) + kubelet.HandlePodSyncs(pods) + fakeRuntime.AssertStartedPods([]string{string(pods[0].UID)}) +} + +func TestSyncPodsDeletesWhenSourcesAreReady(t *testing.T) { + ready := false + + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + fakeRuntime := testKubelet.fakeRuntime + kubelet := testKubelet.kubelet + kubelet.sourcesReady = config.NewSourcesReady(func(_ sets.String) bool { return ready }) + + fakeRuntime.PodList = []*containertest.FakePod{ + {Pod: &kubecontainer.Pod{ + ID: "12345678", + Name: "foo", + Namespace: "new", + Containers: []*kubecontainer.Container{ + {Name: "bar"}, + }, + }}, + } + kubelet.HandlePodCleanups() + // Sources are not ready yet. Don't remove any pods. + fakeRuntime.AssertKilledPods([]string{}) + + ready = true + kubelet.HandlePodCleanups() + + // Sources are ready. Remove unwanted pods. + fakeRuntime.AssertKilledPods([]string{"12345678"}) +} + +type testNodeLister struct { + nodes []*v1.Node +} + +type testNodeInfo struct { + nodes []*v1.Node +} + +func (ls testNodeInfo) GetNodeInfo(id string) (*v1.Node, error) { + for _, node := range ls.nodes { + if node.Name == id { + return node, nil + } + } + return nil, fmt.Errorf("Node with name: %s does not exist", id) +} + +func (ls testNodeLister) List(selector labels.Selector) ([]*v1.Node, error) { + return ls.nodes, nil +} + +func checkPodStatus(t *testing.T, kl *Kubelet, pod *v1.Pod, phase v1.PodPhase) { + status, found := kl.statusManager.GetPodStatus(pod.UID) + require.True(t, found, "Status of pod %q is not found in the status map", pod.UID) + require.Equal(t, phase, status.Phase) +} + +// Tests that we handle port conflicts correctly by setting the failed status in status map. +func TestHandlePortConflicts(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + testKubelet.chainMock() + kl := testKubelet.kubelet + + kl.nodeInfo = testNodeInfo{nodes: []*v1.Node{ + { + ObjectMeta: metav1.ObjectMeta{Name: string(kl.nodeName)}, + Status: v1.NodeStatus{ + Allocatable: v1.ResourceList{ + v1.ResourcePods: *resource.NewQuantity(110, resource.DecimalSI), + }, + }, + }, + }} + + spec := v1.PodSpec{NodeName: string(kl.nodeName), Containers: []v1.Container{{Ports: []v1.ContainerPort{{HostPort: 80}}}}} + pods := []*v1.Pod{ + podWithUIDNameNsSpec("123456789", "newpod", "foo", spec), + podWithUIDNameNsSpec("987654321", "oldpod", "foo", spec), + } + // Make sure the Pods are in the reverse order of creation time. + pods[1].CreationTimestamp = metav1.NewTime(time.Now()) + pods[0].CreationTimestamp = metav1.NewTime(time.Now().Add(1 * time.Second)) + // The newer pod should be rejected. + notfittingPod := pods[0] + fittingPod := pods[1] + + kl.HandlePodAdditions(pods) + + // Check pod status stored in the status map. + checkPodStatus(t, kl, notfittingPod, v1.PodFailed) + checkPodStatus(t, kl, fittingPod, v1.PodPending) +} + +// Tests that we handle host name conflicts correctly by setting the failed status in status map. +func TestHandleHostNameConflicts(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + testKubelet.chainMock() + kl := testKubelet.kubelet + + kl.nodeInfo = testNodeInfo{nodes: []*v1.Node{ + { + ObjectMeta: metav1.ObjectMeta{Name: "127.0.0.1"}, + Status: v1.NodeStatus{ + Allocatable: v1.ResourceList{ + v1.ResourcePods: *resource.NewQuantity(110, resource.DecimalSI), + }, + }, + }, + }} + + // default NodeName in test is 127.0.0.1 + pods := []*v1.Pod{ + podWithUIDNameNsSpec("123456789", "notfittingpod", "foo", v1.PodSpec{NodeName: "127.0.0.2"}), + podWithUIDNameNsSpec("987654321", "fittingpod", "foo", v1.PodSpec{NodeName: "127.0.0.1"}), + } + + notfittingPod := pods[0] + fittingPod := pods[1] + + kl.HandlePodAdditions(pods) + + // Check pod status stored in the status map. + checkPodStatus(t, kl, notfittingPod, v1.PodFailed) + checkPodStatus(t, kl, fittingPod, v1.PodPending) +} + +// Tests that we handle not matching labels selector correctly by setting the failed status in status map. +func TestHandleNodeSelector(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + testKubelet.chainMock() + kl := testKubelet.kubelet + nodes := []*v1.Node{ + { + ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname, Labels: map[string]string{"key": "B"}}, + Status: v1.NodeStatus{ + Allocatable: v1.ResourceList{ + v1.ResourcePods: *resource.NewQuantity(110, resource.DecimalSI), + }, + }, + }, + } + kl.nodeInfo = testNodeInfo{nodes: nodes} + pods := []*v1.Pod{ + podWithUIDNameNsSpec("123456789", "podA", "foo", v1.PodSpec{NodeSelector: map[string]string{"key": "A"}}), + podWithUIDNameNsSpec("987654321", "podB", "foo", v1.PodSpec{NodeSelector: map[string]string{"key": "B"}}), + } + // The first pod should be rejected. + notfittingPod := pods[0] + fittingPod := pods[1] + + kl.HandlePodAdditions(pods) + + // Check pod status stored in the status map. + checkPodStatus(t, kl, notfittingPod, v1.PodFailed) + checkPodStatus(t, kl, fittingPod, v1.PodPending) +} + +// Tests that we handle exceeded resources correctly by setting the failed status in status map. +func TestHandleMemExceeded(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + testKubelet.chainMock() + kl := testKubelet.kubelet + nodes := []*v1.Node{ + {ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, + Status: v1.NodeStatus{Capacity: v1.ResourceList{}, Allocatable: v1.ResourceList{ + v1.ResourceCPU: *resource.NewMilliQuantity(10, resource.DecimalSI), + v1.ResourceMemory: *resource.NewQuantity(100, resource.BinarySI), + v1.ResourcePods: *resource.NewQuantity(40, resource.DecimalSI), + }}}, + } + kl.nodeInfo = testNodeInfo{nodes: nodes} + + spec := v1.PodSpec{NodeName: string(kl.nodeName), + Containers: []v1.Container{{Resources: v1.ResourceRequirements{ + Requests: v1.ResourceList{ + v1.ResourceMemory: resource.MustParse("90"), + }, + }}}, + } + pods := []*v1.Pod{ + podWithUIDNameNsSpec("123456789", "newpod", "foo", spec), + podWithUIDNameNsSpec("987654321", "oldpod", "foo", spec), + } + // Make sure the Pods are in the reverse order of creation time. + pods[1].CreationTimestamp = metav1.NewTime(time.Now()) + pods[0].CreationTimestamp = metav1.NewTime(time.Now().Add(1 * time.Second)) + // The newer pod should be rejected. + notfittingPod := pods[0] + fittingPod := pods[1] + + kl.HandlePodAdditions(pods) + + // Check pod status stored in the status map. + checkPodStatus(t, kl, notfittingPod, v1.PodFailed) + checkPodStatus(t, kl, fittingPod, v1.PodPending) +} + +// TODO(filipg): This test should be removed once StatusSyncer can do garbage collection without external signal. +func TestPurgingObsoleteStatusMapEntries(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + testKubelet.chainMock() + versionInfo := &cadvisorapi.VersionInfo{ + KernelVersion: "3.16.0-0.bpo.4-amd64", + ContainerOsVersion: "Debian GNU/Linux 7 (wheezy)", + DockerVersion: "1.5.0", + } + testKubelet.fakeCadvisor.On("VersionInfo").Return(versionInfo, nil) + + kl := testKubelet.kubelet + pods := []*v1.Pod{ + {ObjectMeta: metav1.ObjectMeta{Name: "pod1", UID: "1234"}, Spec: v1.PodSpec{Containers: []v1.Container{{Ports: []v1.ContainerPort{{HostPort: 80}}}}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "pod2", UID: "4567"}, Spec: v1.PodSpec{Containers: []v1.Container{{Ports: []v1.ContainerPort{{HostPort: 80}}}}}}, + } + podToTest := pods[1] + // Run once to populate the status map. + kl.HandlePodAdditions(pods) + if _, found := kl.statusManager.GetPodStatus(podToTest.UID); !found { + t.Fatalf("expected to have status cached for pod2") + } + // Sync with empty pods so that the entry in status map will be removed. + kl.podManager.SetPods([]*v1.Pod{}) + kl.HandlePodCleanups() + if _, found := kl.statusManager.GetPodStatus(podToTest.UID); found { + t.Fatalf("expected to not have status cached for pod2") + } +} + +func TestValidateContainerLogStatus(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + containerName := "x" + testCases := []struct { + statuses []v1.ContainerStatus + success bool // whether getting logs for the container should succeed. + pSuccess bool // whether getting logs for the previous container should succeed. + }{ + { + statuses: []v1.ContainerStatus{ + { + Name: containerName, + State: v1.ContainerState{ + Running: &v1.ContainerStateRunning{}, + }, + LastTerminationState: v1.ContainerState{ + Terminated: &v1.ContainerStateTerminated{}, + }, + }, + }, + success: true, + pSuccess: true, + }, + { + statuses: []v1.ContainerStatus{ + { + Name: containerName, + State: v1.ContainerState{ + Running: &v1.ContainerStateRunning{}, + }, + }, + }, + success: true, + pSuccess: false, + }, + { + statuses: []v1.ContainerStatus{ + { + Name: containerName, + State: v1.ContainerState{ + Terminated: &v1.ContainerStateTerminated{}, + }, + }, + }, + success: true, + pSuccess: false, + }, + { + statuses: []v1.ContainerStatus{ + { + Name: containerName, + State: v1.ContainerState{ + Waiting: &v1.ContainerStateWaiting{}, + }, + }, + }, + success: false, + pSuccess: false, + }, + { + statuses: []v1.ContainerStatus{ + { + Name: containerName, + State: v1.ContainerState{Waiting: &v1.ContainerStateWaiting{Reason: "ErrImagePull"}}, + }, + }, + success: false, + pSuccess: false, + }, + { + statuses: []v1.ContainerStatus{ + { + Name: containerName, + State: v1.ContainerState{Waiting: &v1.ContainerStateWaiting{Reason: "ErrImagePullBackOff"}}, + }, + }, + success: false, + pSuccess: false, + }, + } + + for i, tc := range testCases { + // Access the log of the most recent container + previous := false + podStatus := &v1.PodStatus{ContainerStatuses: tc.statuses} + _, err := kubelet.validateContainerLogStatus("podName", podStatus, containerName, previous) + if !tc.success { + assert.Error(t, err, fmt.Sprintf("[case %d] error", i)) + } else { + assert.NoError(t, err, "[case %d] error", i) + } + // Access the log of the previous, terminated container + previous = true + _, err = kubelet.validateContainerLogStatus("podName", podStatus, containerName, previous) + if !tc.pSuccess { + assert.Error(t, err, fmt.Sprintf("[case %d] error", i)) + } else { + assert.NoError(t, err, "[case %d] error", i) + } + // Access the log of a container that's not in the pod + _, err = kubelet.validateContainerLogStatus("podName", podStatus, "blah", false) + assert.Error(t, err, fmt.Sprintf("[case %d] invalid container name should cause an error", i)) + } +} + +func TestCreateMirrorPod(t *testing.T) { + for _, updateType := range []kubetypes.SyncPodType{kubetypes.SyncPodCreate, kubetypes.SyncPodUpdate} { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + testKubelet.chainMock() + + kl := testKubelet.kubelet + manager := testKubelet.fakeMirrorClient + pod := podWithUIDNameNs("12345678", "bar", "foo") + pod.Annotations[kubetypes.ConfigSourceAnnotationKey] = "file" + pods := []*v1.Pod{pod} + kl.podManager.SetPods(pods) + err := kl.syncPod(syncPodOptions{ + pod: pod, + podStatus: &kubecontainer.PodStatus{}, + updateType: updateType, + }) + assert.NoError(t, err) + podFullName := kubecontainer.GetPodFullName(pod) + assert.True(t, manager.HasPod(podFullName), "Expected mirror pod %q to be created", podFullName) + assert.Equal(t, 1, manager.NumOfPods(), "Expected only 1 mirror pod %q, got %+v", podFullName, manager.GetPods()) + } +} + +func TestDeleteOutdatedMirrorPod(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + testKubelet.chainMock() + + kl := testKubelet.kubelet + manager := testKubelet.fakeMirrorClient + pod := podWithUIDNameNsSpec("12345678", "foo", "ns", v1.PodSpec{ + Containers: []v1.Container{ + {Name: "1234", Image: "foo"}, + }, + }) + pod.Annotations[kubetypes.ConfigSourceAnnotationKey] = "file" + + // Mirror pod has an outdated spec. + mirrorPod := podWithUIDNameNsSpec("11111111", "foo", "ns", v1.PodSpec{ + Containers: []v1.Container{ + {Name: "1234", Image: "bar"}, + }, + }) + mirrorPod.Annotations[kubetypes.ConfigSourceAnnotationKey] = "api" + mirrorPod.Annotations[kubetypes.ConfigMirrorAnnotationKey] = "mirror" + + pods := []*v1.Pod{pod, mirrorPod} + kl.podManager.SetPods(pods) + err := kl.syncPod(syncPodOptions{ + pod: pod, + mirrorPod: mirrorPod, + podStatus: &kubecontainer.PodStatus{}, + updateType: kubetypes.SyncPodUpdate, + }) + assert.NoError(t, err) + name := kubecontainer.GetPodFullName(pod) + creates, deletes := manager.GetCounts(name) + if creates != 1 || deletes != 1 { + t.Errorf("expected 1 creation and 1 deletion of %q, got %d, %d", name, creates, deletes) + } +} + +func TestDeleteOrphanedMirrorPods(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + testKubelet.chainMock() + + kl := testKubelet.kubelet + manager := testKubelet.fakeMirrorClient + orphanPods := []*v1.Pod{ + { + ObjectMeta: metav1.ObjectMeta{ + UID: "12345678", + Name: "pod1", + Namespace: "ns", + Annotations: map[string]string{ + kubetypes.ConfigSourceAnnotationKey: "api", + kubetypes.ConfigMirrorAnnotationKey: "mirror", + }, + }, + }, + { + ObjectMeta: metav1.ObjectMeta{ + UID: "12345679", + Name: "pod2", + Namespace: "ns", + Annotations: map[string]string{ + kubetypes.ConfigSourceAnnotationKey: "api", + kubetypes.ConfigMirrorAnnotationKey: "mirror", + }, + }, + }, + } + + kl.podManager.SetPods(orphanPods) + // Sync with an empty pod list to delete all mirror pods. + kl.HandlePodCleanups() + assert.Len(t, manager.GetPods(), 0, "Expected 0 mirror pods") + for _, pod := range orphanPods { + name := kubecontainer.GetPodFullName(pod) + creates, deletes := manager.GetCounts(name) + if creates != 0 || deletes != 1 { + t.Errorf("expected 0 creation and one deletion of %q, got %d, %d", name, creates, deletes) + } + } +} + +func TestGetContainerInfoForMirrorPods(t *testing.T) { + // pods contain one static and one mirror pod with the same name but + // different UIDs. + pods := []*v1.Pod{ + { + ObjectMeta: metav1.ObjectMeta{ + UID: "1234", + Name: "qux", + Namespace: "ns", + Annotations: map[string]string{ + kubetypes.ConfigSourceAnnotationKey: "file", + }, + }, + Spec: v1.PodSpec{ + Containers: []v1.Container{ + {Name: "foo"}, + }, + }, + }, + { + ObjectMeta: metav1.ObjectMeta{ + UID: "5678", + Name: "qux", + Namespace: "ns", + Annotations: map[string]string{ + kubetypes.ConfigSourceAnnotationKey: "api", + kubetypes.ConfigMirrorAnnotationKey: "mirror", + }, + }, + Spec: v1.PodSpec{ + Containers: []v1.Container{ + {Name: "foo"}, + }, + }, + }, + } + + containerID := "ab2cdf" + containerPath := fmt.Sprintf("/docker/%v", containerID) + containerInfo := cadvisorapi.ContainerInfo{ + ContainerReference: cadvisorapi.ContainerReference{ + Name: containerPath, + }, + } + + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + fakeRuntime := testKubelet.fakeRuntime + mockCadvisor := testKubelet.fakeCadvisor + cadvisorReq := &cadvisorapi.ContainerInfoRequest{} + mockCadvisor.On("DockerContainer", containerID, cadvisorReq).Return(containerInfo, nil) + kubelet := testKubelet.kubelet + + fakeRuntime.PodList = []*containertest.FakePod{ + {Pod: &kubecontainer.Pod{ + ID: "1234", + Name: "qux", + Namespace: "ns", + Containers: []*kubecontainer.Container{ + { + Name: "foo", + ID: kubecontainer.ContainerID{Type: "test", ID: containerID}, + }, + }, + }}, + } + + kubelet.podManager.SetPods(pods) + // Use the mirror pod UID to retrieve the stats. + stats, err := kubelet.GetContainerInfo("qux_ns", "5678", "foo", cadvisorReq) + assert.NoError(t, err) + require.NotNil(t, stats) + mockCadvisor.AssertExpectations(t) +} + +func TestHostNetworkAllowed(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + testKubelet.chainMock() + + kubelet := testKubelet.kubelet + + capabilities.SetForTests(capabilities.Capabilities{ + PrivilegedSources: capabilities.PrivilegedSources{ + HostNetworkSources: []string{kubetypes.ApiserverSource, kubetypes.FileSource}, + }, + }) + pod := podWithUIDNameNsSpec("12345678", "foo", "new", v1.PodSpec{ + Containers: []v1.Container{ + {Name: "foo"}, + }, + HostNetwork: true, + }) + pod.Annotations[kubetypes.ConfigSourceAnnotationKey] = kubetypes.FileSource + + kubelet.podManager.SetPods([]*v1.Pod{pod}) + err := kubelet.syncPod(syncPodOptions{ + pod: pod, + podStatus: &kubecontainer.PodStatus{}, + updateType: kubetypes.SyncPodUpdate, + }) + assert.NoError(t, err, "expected pod infra creation to succeed") +} + +func TestHostNetworkDisallowed(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + testKubelet.chainMock() + + kubelet := testKubelet.kubelet + + capabilities.SetForTests(capabilities.Capabilities{ + PrivilegedSources: capabilities.PrivilegedSources{ + HostNetworkSources: []string{}, + }, + }) + pod := podWithUIDNameNsSpec("12345678", "foo", "new", v1.PodSpec{ + Containers: []v1.Container{ + {Name: "foo"}, + }, + HostNetwork: true, + }) + pod.Annotations[kubetypes.ConfigSourceAnnotationKey] = kubetypes.FileSource + + err := kubelet.syncPod(syncPodOptions{ + pod: pod, + podStatus: &kubecontainer.PodStatus{}, + updateType: kubetypes.SyncPodUpdate, + }) + assert.Error(t, err, "expected pod infra creation to fail") +} + +func TestHostPIDAllowed(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + testKubelet.chainMock() + + kubelet := testKubelet.kubelet + + capabilities.SetForTests(capabilities.Capabilities{ + PrivilegedSources: capabilities.PrivilegedSources{ + HostPIDSources: []string{kubetypes.ApiserverSource, kubetypes.FileSource}, + }, + }) + pod := podWithUIDNameNsSpec("12345678", "foo", "new", v1.PodSpec{ + Containers: []v1.Container{ + {Name: "foo"}, + }, + HostPID: true, + }) + pod.Annotations[kubetypes.ConfigSourceAnnotationKey] = kubetypes.FileSource + + kubelet.podManager.SetPods([]*v1.Pod{pod}) + err := kubelet.syncPod(syncPodOptions{ + pod: pod, + podStatus: &kubecontainer.PodStatus{}, + updateType: kubetypes.SyncPodUpdate, + }) + assert.NoError(t, err, "expected pod infra creation to succeed") +} + +func TestHostPIDDisallowed(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + testKubelet.chainMock() + + kubelet := testKubelet.kubelet + + capabilities.SetForTests(capabilities.Capabilities{ + PrivilegedSources: capabilities.PrivilegedSources{ + HostPIDSources: []string{}, + }, + }) + pod := podWithUIDNameNsSpec("12345678", "foo", "new", v1.PodSpec{ + Containers: []v1.Container{ + {Name: "foo"}, + }, + HostPID: true, + }) + pod.Annotations[kubetypes.ConfigSourceAnnotationKey] = kubetypes.FileSource + + err := kubelet.syncPod(syncPodOptions{ + pod: pod, + podStatus: &kubecontainer.PodStatus{}, + updateType: kubetypes.SyncPodUpdate, + }) + assert.Error(t, err, "expected pod infra creation to fail") +} + +func TestHostIPCAllowed(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + testKubelet.chainMock() + + kubelet := testKubelet.kubelet + + capabilities.SetForTests(capabilities.Capabilities{ + PrivilegedSources: capabilities.PrivilegedSources{ + HostIPCSources: []string{kubetypes.ApiserverSource, kubetypes.FileSource}, + }, + }) + pod := podWithUIDNameNsSpec("12345678", "foo", "new", v1.PodSpec{ + Containers: []v1.Container{ + {Name: "foo"}, + }, + HostIPC: true, + }) + pod.Annotations[kubetypes.ConfigSourceAnnotationKey] = kubetypes.FileSource + + kubelet.podManager.SetPods([]*v1.Pod{pod}) + err := kubelet.syncPod(syncPodOptions{ + pod: pod, + podStatus: &kubecontainer.PodStatus{}, + updateType: kubetypes.SyncPodUpdate, + }) + assert.NoError(t, err, "expected pod infra creation to succeed") +} + +func TestHostIPCDisallowed(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + testKubelet.chainMock() + + kubelet := testKubelet.kubelet + + capabilities.SetForTests(capabilities.Capabilities{ + PrivilegedSources: capabilities.PrivilegedSources{ + HostIPCSources: []string{}, + }, + }) + pod := podWithUIDNameNsSpec("12345678", "foo", "new", v1.PodSpec{ + Containers: []v1.Container{ + {Name: "foo"}, + }, + HostIPC: true, + }) + pod.Annotations[kubetypes.ConfigSourceAnnotationKey] = kubetypes.FileSource + + err := kubelet.syncPod(syncPodOptions{ + pod: pod, + podStatus: &kubecontainer.PodStatus{}, + updateType: kubetypes.SyncPodUpdate, + }) + assert.Error(t, err, "expected pod infra creation to fail") +} + +func TestPrivilegeContainerAllowed(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + testKubelet.chainMock() + + kubelet := testKubelet.kubelet + + capabilities.SetForTests(capabilities.Capabilities{ + AllowPrivileged: true, + }) + privileged := true + pod := podWithUIDNameNsSpec("12345678", "foo", "new", v1.PodSpec{ + Containers: []v1.Container{ + {Name: "foo", SecurityContext: &v1.SecurityContext{Privileged: &privileged}}, + }, + }) + + kubelet.podManager.SetPods([]*v1.Pod{pod}) + err := kubelet.syncPod(syncPodOptions{ + pod: pod, + podStatus: &kubecontainer.PodStatus{}, + updateType: kubetypes.SyncPodUpdate, + }) + assert.NoError(t, err, "expected pod infra creation to succeed") +} + +func TestPrivilegedContainerDisallowed(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + testKubelet.chainMock() + kubelet := testKubelet.kubelet + + capabilities.SetForTests(capabilities.Capabilities{ + AllowPrivileged: false, + }) + privileged := true + pod := podWithUIDNameNsSpec("12345678", "foo", "new", v1.PodSpec{ + Containers: []v1.Container{ + {Name: "foo", SecurityContext: &v1.SecurityContext{Privileged: &privileged}}, + }, + }) + + err := kubelet.syncPod(syncPodOptions{ + pod: pod, + podStatus: &kubecontainer.PodStatus{}, + updateType: kubetypes.SyncPodUpdate, + }) + assert.Error(t, err, "expected pod infra creation to fail") +} + +func TestNetworkErrorsWithoutHostNetwork(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + testKubelet.chainMock() + kubelet := testKubelet.kubelet + + kubelet.runtimeState.setNetworkState(fmt.Errorf("simulated network error")) + capabilities.SetForTests(capabilities.Capabilities{ + PrivilegedSources: capabilities.PrivilegedSources{ + HostNetworkSources: []string{kubetypes.ApiserverSource, kubetypes.FileSource}, + }, + }) + + pod := podWithUIDNameNsSpec("12345678", "hostnetwork", "new", v1.PodSpec{ + HostNetwork: false, + + Containers: []v1.Container{ + {Name: "foo"}, + }, + }) + + kubelet.podManager.SetPods([]*v1.Pod{pod}) + err := kubelet.syncPod(syncPodOptions{ + pod: pod, + podStatus: &kubecontainer.PodStatus{}, + updateType: kubetypes.SyncPodUpdate, + }) + assert.Error(t, err, "expected pod with hostNetwork=false to fail when network in error") + + pod.Annotations[kubetypes.ConfigSourceAnnotationKey] = kubetypes.FileSource + pod.Spec.HostNetwork = true + err = kubelet.syncPod(syncPodOptions{ + pod: pod, + podStatus: &kubecontainer.PodStatus{}, + updateType: kubetypes.SyncPodUpdate, + }) + assert.NoError(t, err, "expected pod with hostNetwork=true to succeed when network in error") +} + +func TestFilterOutTerminatedPods(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + pods := newTestPods(5) + now := metav1.NewTime(time.Now()) + pods[0].Status.Phase = v1.PodFailed + pods[1].Status.Phase = v1.PodSucceeded + // The pod is terminating, should not filter out. + pods[2].Status.Phase = v1.PodRunning + pods[2].DeletionTimestamp = &now + pods[2].Status.ContainerStatuses = []v1.ContainerStatus{ + {State: v1.ContainerState{ + Running: &v1.ContainerStateRunning{ + StartedAt: now, + }, + }}, + } + pods[3].Status.Phase = v1.PodPending + pods[4].Status.Phase = v1.PodRunning + + expected := []*v1.Pod{pods[2], pods[3], pods[4]} + kubelet.podManager.SetPods(pods) + actual := kubelet.filterOutTerminatedPods(pods) + assert.Equal(t, expected, actual) +} + +func TestSyncPodsSetStatusToFailedForPodsThatRunTooLong(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + fakeRuntime := testKubelet.fakeRuntime + testKubelet.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil) + kubelet := testKubelet.kubelet + + now := metav1.Now() + startTime := metav1.NewTime(now.Time.Add(-1 * time.Minute)) + exceededActiveDeadlineSeconds := int64(30) + + pods := []*v1.Pod{ + { + ObjectMeta: metav1.ObjectMeta{ + UID: "12345678", + Name: "bar", + Namespace: "new", + }, + Spec: v1.PodSpec{ + Containers: []v1.Container{ + {Name: "foo"}, + }, + ActiveDeadlineSeconds: &exceededActiveDeadlineSeconds, + }, + Status: v1.PodStatus{ + StartTime: &startTime, + }, + }, + } + + fakeRuntime.PodList = []*containertest.FakePod{ + {Pod: &kubecontainer.Pod{ + ID: "12345678", + Name: "bar", + Namespace: "new", + Containers: []*kubecontainer.Container{ + {Name: "foo"}, + }, + }}, + } + + // Let the pod worker sets the status to fail after this sync. + kubelet.HandlePodUpdates(pods) + status, found := kubelet.statusManager.GetPodStatus(pods[0].UID) + assert.True(t, found, "expected to found status for pod %q", pods[0].UID) + assert.Equal(t, v1.PodFailed, status.Phase) +} + +func TestSyncPodsDoesNotSetPodsThatDidNotRunTooLongToFailed(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + fakeRuntime := testKubelet.fakeRuntime + testKubelet.chainMock() + + kubelet := testKubelet.kubelet + + now := metav1.Now() + startTime := metav1.NewTime(now.Time.Add(-1 * time.Minute)) + exceededActiveDeadlineSeconds := int64(300) + + pods := []*v1.Pod{ + { + ObjectMeta: metav1.ObjectMeta{ + UID: "12345678", + Name: "bar", + Namespace: "new", + }, + Spec: v1.PodSpec{ + Containers: []v1.Container{ + {Name: "foo"}, + }, + ActiveDeadlineSeconds: &exceededActiveDeadlineSeconds, + }, + Status: v1.PodStatus{ + StartTime: &startTime, + }, + }, + } + + fakeRuntime.PodList = []*containertest.FakePod{ + {Pod: &kubecontainer.Pod{ + ID: "12345678", + Name: "bar", + Namespace: "new", + Containers: []*kubecontainer.Container{ + {Name: "foo"}, + }, + }}, + } + + kubelet.podManager.SetPods(pods) + kubelet.HandlePodUpdates(pods) + status, found := kubelet.statusManager.GetPodStatus(pods[0].UID) + assert.True(t, found, "expected to found status for pod %q", pods[0].UID) + assert.NotEqual(t, v1.PodFailed, status.Phase) +} + +func podWithUIDNameNs(uid types.UID, name, namespace string) *v1.Pod { + return &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + UID: uid, + Name: name, + Namespace: namespace, + Annotations: map[string]string{}, + }, + } +} + +func podWithUIDNameNsSpec(uid types.UID, name, namespace string, spec v1.PodSpec) *v1.Pod { + pod := podWithUIDNameNs(uid, name, namespace) + pod.Spec = spec + return pod +} + +func TestDeletePodDirsForDeletedPods(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + testKubelet.chainMock() + kl := testKubelet.kubelet + pods := []*v1.Pod{ + podWithUIDNameNs("12345678", "pod1", "ns"), + podWithUIDNameNs("12345679", "pod2", "ns"), + } + + kl.podManager.SetPods(pods) + // Sync to create pod directories. + kl.HandlePodSyncs(kl.podManager.GetPods()) + for i := range pods { + assert.True(t, dirExists(kl.getPodDir(pods[i].UID)), "Expected directory to exist for pod %d", i) + } + + // Pod 1 has been deleted and no longer exists. + kl.podManager.SetPods([]*v1.Pod{pods[0]}) + kl.HandlePodCleanups() + assert.True(t, dirExists(kl.getPodDir(pods[0].UID)), "Expected directory to exist for pod 0") + assert.False(t, dirExists(kl.getPodDir(pods[1].UID)), "Expected directory to be deleted for pod 1") +} + +func syncAndVerifyPodDir(t *testing.T, testKubelet *TestKubelet, pods []*v1.Pod, podsToCheck []*v1.Pod, shouldExist bool) { + kl := testKubelet.kubelet + + kl.podManager.SetPods(pods) + kl.HandlePodSyncs(pods) + kl.HandlePodCleanups() + for i, pod := range podsToCheck { + exist := dirExists(kl.getPodDir(pod.UID)) + assert.Equal(t, shouldExist, exist, "directory of pod %d", i) + } +} + +func TestDoesNotDeletePodDirsForTerminatedPods(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + testKubelet.chainMock() + kl := testKubelet.kubelet + pods := []*v1.Pod{ + podWithUIDNameNs("12345678", "pod1", "ns"), + podWithUIDNameNs("12345679", "pod2", "ns"), + podWithUIDNameNs("12345680", "pod3", "ns"), + } + + syncAndVerifyPodDir(t, testKubelet, pods, pods, true) + // Pod 1 failed, and pod 2 succeeded. None of the pod directories should be + // deleted. + kl.statusManager.SetPodStatus(pods[1], v1.PodStatus{Phase: v1.PodFailed}) + kl.statusManager.SetPodStatus(pods[2], v1.PodStatus{Phase: v1.PodSucceeded}) + syncAndVerifyPodDir(t, testKubelet, pods, pods, true) +} + +func TestDoesNotDeletePodDirsIfContainerIsRunning(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + testKubelet.chainMock() + runningPod := &kubecontainer.Pod{ + ID: "12345678", + Name: "pod1", + Namespace: "ns", + } + apiPod := podWithUIDNameNs(runningPod.ID, runningPod.Name, runningPod.Namespace) + + // Sync once to create pod directory; confirm that the pod directory has + // already been created. + pods := []*v1.Pod{apiPod} + syncAndVerifyPodDir(t, testKubelet, pods, []*v1.Pod{apiPod}, true) + + // Pretend the pod is deleted from apiserver, but is still active on the node. + // The pod directory should not be removed. + pods = []*v1.Pod{} + testKubelet.fakeRuntime.PodList = []*containertest.FakePod{{runningPod, ""}} + syncAndVerifyPodDir(t, testKubelet, pods, []*v1.Pod{apiPod}, true) + + // The pod is deleted and also not active on the node. The pod directory + // should be removed. + pods = []*v1.Pod{} + testKubelet.fakeRuntime.PodList = []*containertest.FakePod{} + syncAndVerifyPodDir(t, testKubelet, pods, []*v1.Pod{apiPod}, false) +} + +func TestGetPodsToSync(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + clock := testKubelet.fakeClock + pods := newTestPods(5) + + exceededActiveDeadlineSeconds := int64(30) + notYetActiveDeadlineSeconds := int64(120) + startTime := metav1.NewTime(clock.Now()) + pods[0].Status.StartTime = &startTime + pods[0].Spec.ActiveDeadlineSeconds = &exceededActiveDeadlineSeconds + pods[1].Status.StartTime = &startTime + pods[1].Spec.ActiveDeadlineSeconds = ¬YetActiveDeadlineSeconds + pods[2].Status.StartTime = &startTime + pods[2].Spec.ActiveDeadlineSeconds = &exceededActiveDeadlineSeconds + + kubelet.podManager.SetPods(pods) + kubelet.workQueue.Enqueue(pods[2].UID, 0) + kubelet.workQueue.Enqueue(pods[3].UID, 30*time.Second) + kubelet.workQueue.Enqueue(pods[4].UID, 2*time.Minute) + + clock.Step(1 * time.Minute) + + expected := []*v1.Pod{pods[2], pods[3], pods[0]} + podsToSync := kubelet.getPodsToSync() + sort.Sort(podsByUID(expected)) + sort.Sort(podsByUID(podsToSync)) + assert.Equal(t, expected, podsToSync) +} + +func TestGenerateAPIPodStatusWithSortedContainers(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + testKubelet.chainMock() + kubelet := testKubelet.kubelet + numContainers := 10 + expectedOrder := []string{} + cStatuses := []*kubecontainer.ContainerStatus{} + specContainerList := []v1.Container{} + for i := 0; i < numContainers; i++ { + id := fmt.Sprintf("%v", i) + containerName := fmt.Sprintf("%vcontainer", id) + expectedOrder = append(expectedOrder, containerName) + cStatus := &kubecontainer.ContainerStatus{ + ID: kubecontainer.BuildContainerID("test", id), + Name: containerName, + } + // Rearrange container statuses + if i%2 == 0 { + cStatuses = append(cStatuses, cStatus) + } else { + cStatuses = append([]*kubecontainer.ContainerStatus{cStatus}, cStatuses...) + } + specContainerList = append(specContainerList, v1.Container{Name: containerName}) + } + pod := podWithUIDNameNs("uid1", "foo", "test") + pod.Spec = v1.PodSpec{ + Containers: specContainerList, + } + + status := &kubecontainer.PodStatus{ + ID: pod.UID, + Name: pod.Name, + Namespace: pod.Namespace, + ContainerStatuses: cStatuses, + } + for i := 0; i < 5; i++ { + apiStatus := kubelet.generateAPIPodStatus(pod, status) + for i, c := range apiStatus.ContainerStatuses { + if expectedOrder[i] != c.Name { + t.Fatalf("Container status not sorted, expected %v at index %d, but found %v", expectedOrder[i], i, c.Name) + } + } + } +} + +func verifyContainerStatuses(t *testing.T, statuses []v1.ContainerStatus, state, lastTerminationState map[string]v1.ContainerState, message string) { + for _, s := range statuses { + assert.Equal(t, s.State, state[s.Name], "%s: state", message) + assert.Equal(t, s.LastTerminationState, lastTerminationState[s.Name], "%s: last terminated state", message) + } +} + +// Test generateAPIPodStatus with different reason cache and old api pod status. +func TestGenerateAPIPodStatusWithReasonCache(t *testing.T) { + // The following waiting reason and message are generated in convertStatusToAPIStatus() + startWaitingReason := "ContainerCreating" + initWaitingReason := "PodInitializing" + testTimestamp := time.Unix(123456789, 987654321) + testErrorReason := fmt.Errorf("test-error") + emptyContainerID := (&kubecontainer.ContainerID{}).String() + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + testKubelet.chainMock() + kubelet := testKubelet.kubelet + pod := podWithUIDNameNs("12345678", "foo", "new") + pod.Spec = v1.PodSpec{RestartPolicy: v1.RestartPolicyOnFailure} + + podStatus := &kubecontainer.PodStatus{ + ID: pod.UID, + Name: pod.Name, + Namespace: pod.Namespace, + } + tests := []struct { + containers []v1.Container + statuses []*kubecontainer.ContainerStatus + reasons map[string]error + oldStatuses []v1.ContainerStatus + expectedState map[string]v1.ContainerState + // Only set expectedInitState when it is different from expectedState + expectedInitState map[string]v1.ContainerState + expectedLastTerminationState map[string]v1.ContainerState + }{ + // For container with no historical record, State should be Waiting, LastTerminationState should be retrieved from + // old status from apiserver. + { + containers: []v1.Container{{Name: "without-old-record"}, {Name: "with-old-record"}}, + statuses: []*kubecontainer.ContainerStatus{}, + reasons: map[string]error{}, + oldStatuses: []v1.ContainerStatus{{ + Name: "with-old-record", + LastTerminationState: v1.ContainerState{Terminated: &v1.ContainerStateTerminated{}}, + }}, + expectedState: map[string]v1.ContainerState{ + "without-old-record": {Waiting: &v1.ContainerStateWaiting{ + Reason: startWaitingReason, + }}, + "with-old-record": {Waiting: &v1.ContainerStateWaiting{ + Reason: startWaitingReason, + }}, + }, + expectedInitState: map[string]v1.ContainerState{ + "without-old-record": {Waiting: &v1.ContainerStateWaiting{ + Reason: initWaitingReason, + }}, + "with-old-record": {Waiting: &v1.ContainerStateWaiting{ + Reason: initWaitingReason, + }}, + }, + expectedLastTerminationState: map[string]v1.ContainerState{ + "with-old-record": {Terminated: &v1.ContainerStateTerminated{}}, + }, + }, + // For running container, State should be Running, LastTerminationState should be retrieved from latest terminated status. + { + containers: []v1.Container{{Name: "running"}}, + statuses: []*kubecontainer.ContainerStatus{ + { + Name: "running", + State: kubecontainer.ContainerStateRunning, + StartedAt: testTimestamp, + }, + { + Name: "running", + State: kubecontainer.ContainerStateExited, + ExitCode: 1, + }, + }, + reasons: map[string]error{}, + oldStatuses: []v1.ContainerStatus{}, + expectedState: map[string]v1.ContainerState{ + "running": {Running: &v1.ContainerStateRunning{ + StartedAt: metav1.NewTime(testTimestamp), + }}, + }, + expectedLastTerminationState: map[string]v1.ContainerState{ + "running": {Terminated: &v1.ContainerStateTerminated{ + ExitCode: 1, + ContainerID: emptyContainerID, + }}, + }, + }, + // For terminated container: + // * If there is no recent start error record, State should be Terminated, LastTerminationState should be retrieved from + // second latest terminated status; + // * If there is recent start error record, State should be Waiting, LastTerminationState should be retrieved from latest + // terminated status; + // * If ExitCode = 0, restart policy is RestartPolicyOnFailure, the container shouldn't be restarted. No matter there is + // recent start error or not, State should be Terminated, LastTerminationState should be retrieved from second latest + // terminated status. + { + containers: []v1.Container{{Name: "without-reason"}, {Name: "with-reason"}}, + statuses: []*kubecontainer.ContainerStatus{ + { + Name: "without-reason", + State: kubecontainer.ContainerStateExited, + ExitCode: 1, + }, + { + Name: "with-reason", + State: kubecontainer.ContainerStateExited, + ExitCode: 2, + }, + { + Name: "without-reason", + State: kubecontainer.ContainerStateExited, + ExitCode: 3, + }, + { + Name: "with-reason", + State: kubecontainer.ContainerStateExited, + ExitCode: 4, + }, + { + Name: "succeed", + State: kubecontainer.ContainerStateExited, + ExitCode: 0, + }, + { + Name: "succeed", + State: kubecontainer.ContainerStateExited, + ExitCode: 5, + }, + }, + reasons: map[string]error{"with-reason": testErrorReason, "succeed": testErrorReason}, + oldStatuses: []v1.ContainerStatus{}, + expectedState: map[string]v1.ContainerState{ + "without-reason": {Terminated: &v1.ContainerStateTerminated{ + ExitCode: 1, + ContainerID: emptyContainerID, + }}, + "with-reason": {Waiting: &v1.ContainerStateWaiting{Reason: testErrorReason.Error()}}, + "succeed": {Terminated: &v1.ContainerStateTerminated{ + ExitCode: 0, + ContainerID: emptyContainerID, + }}, + }, + expectedLastTerminationState: map[string]v1.ContainerState{ + "without-reason": {Terminated: &v1.ContainerStateTerminated{ + ExitCode: 3, + ContainerID: emptyContainerID, + }}, + "with-reason": {Terminated: &v1.ContainerStateTerminated{ + ExitCode: 2, + ContainerID: emptyContainerID, + }}, + "succeed": {Terminated: &v1.ContainerStateTerminated{ + ExitCode: 5, + ContainerID: emptyContainerID, + }}, + }, + }, + } + + for i, test := range tests { + kubelet.reasonCache = NewReasonCache() + for n, e := range test.reasons { + kubelet.reasonCache.add(pod.UID, n, e, "") + } + pod.Spec.Containers = test.containers + pod.Status.ContainerStatuses = test.oldStatuses + podStatus.ContainerStatuses = test.statuses + apiStatus := kubelet.generateAPIPodStatus(pod, podStatus) + verifyContainerStatuses(t, apiStatus.ContainerStatuses, test.expectedState, test.expectedLastTerminationState, fmt.Sprintf("case %d", i)) + } + + // Everything should be the same for init containers + for i, test := range tests { + kubelet.reasonCache = NewReasonCache() + for n, e := range test.reasons { + kubelet.reasonCache.add(pod.UID, n, e, "") + } + pod.Spec.InitContainers = test.containers + pod.Status.InitContainerStatuses = test.oldStatuses + podStatus.ContainerStatuses = test.statuses + apiStatus := kubelet.generateAPIPodStatus(pod, podStatus) + expectedState := test.expectedState + if test.expectedInitState != nil { + expectedState = test.expectedInitState + } + verifyContainerStatuses(t, apiStatus.InitContainerStatuses, expectedState, test.expectedLastTerminationState, fmt.Sprintf("case %d", i)) + } +} + +// Test generateAPIPodStatus with different restart policies. +func TestGenerateAPIPodStatusWithDifferentRestartPolicies(t *testing.T) { + testErrorReason := fmt.Errorf("test-error") + emptyContainerID := (&kubecontainer.ContainerID{}).String() + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + testKubelet.chainMock() + kubelet := testKubelet.kubelet + pod := podWithUIDNameNs("12345678", "foo", "new") + containers := []v1.Container{{Name: "succeed"}, {Name: "failed"}} + podStatus := &kubecontainer.PodStatus{ + ID: pod.UID, + Name: pod.Name, + Namespace: pod.Namespace, + ContainerStatuses: []*kubecontainer.ContainerStatus{ + { + Name: "succeed", + State: kubecontainer.ContainerStateExited, + ExitCode: 0, + }, + { + Name: "failed", + State: kubecontainer.ContainerStateExited, + ExitCode: 1, + }, + { + Name: "succeed", + State: kubecontainer.ContainerStateExited, + ExitCode: 2, + }, + { + Name: "failed", + State: kubecontainer.ContainerStateExited, + ExitCode: 3, + }, + }, + } + kubelet.reasonCache.add(pod.UID, "succeed", testErrorReason, "") + kubelet.reasonCache.add(pod.UID, "failed", testErrorReason, "") + for c, test := range []struct { + restartPolicy v1.RestartPolicy + expectedState map[string]v1.ContainerState + expectedLastTerminationState map[string]v1.ContainerState + // Only set expectedInitState when it is different from expectedState + expectedInitState map[string]v1.ContainerState + // Only set expectedInitLastTerminationState when it is different from expectedLastTerminationState + expectedInitLastTerminationState map[string]v1.ContainerState + }{ + { + restartPolicy: v1.RestartPolicyNever, + expectedState: map[string]v1.ContainerState{ + "succeed": {Terminated: &v1.ContainerStateTerminated{ + ExitCode: 0, + ContainerID: emptyContainerID, + }}, + "failed": {Terminated: &v1.ContainerStateTerminated{ + ExitCode: 1, + ContainerID: emptyContainerID, + }}, + }, + expectedLastTerminationState: map[string]v1.ContainerState{ + "succeed": {Terminated: &v1.ContainerStateTerminated{ + ExitCode: 2, + ContainerID: emptyContainerID, + }}, + "failed": {Terminated: &v1.ContainerStateTerminated{ + ExitCode: 3, + ContainerID: emptyContainerID, + }}, + }, + }, + { + restartPolicy: v1.RestartPolicyOnFailure, + expectedState: map[string]v1.ContainerState{ + "succeed": {Terminated: &v1.ContainerStateTerminated{ + ExitCode: 0, + ContainerID: emptyContainerID, + }}, + "failed": {Waiting: &v1.ContainerStateWaiting{Reason: testErrorReason.Error()}}, + }, + expectedLastTerminationState: map[string]v1.ContainerState{ + "succeed": {Terminated: &v1.ContainerStateTerminated{ + ExitCode: 2, + ContainerID: emptyContainerID, + }}, + "failed": {Terminated: &v1.ContainerStateTerminated{ + ExitCode: 1, + ContainerID: emptyContainerID, + }}, + }, + }, + { + restartPolicy: v1.RestartPolicyAlways, + expectedState: map[string]v1.ContainerState{ + "succeed": {Waiting: &v1.ContainerStateWaiting{Reason: testErrorReason.Error()}}, + "failed": {Waiting: &v1.ContainerStateWaiting{Reason: testErrorReason.Error()}}, + }, + expectedLastTerminationState: map[string]v1.ContainerState{ + "succeed": {Terminated: &v1.ContainerStateTerminated{ + ExitCode: 0, + ContainerID: emptyContainerID, + }}, + "failed": {Terminated: &v1.ContainerStateTerminated{ + ExitCode: 1, + ContainerID: emptyContainerID, + }}, + }, + // If the init container is terminated with exit code 0, it won't be restarted even when the + // restart policy is RestartAlways. + expectedInitState: map[string]v1.ContainerState{ + "succeed": {Terminated: &v1.ContainerStateTerminated{ + ExitCode: 0, + ContainerID: emptyContainerID, + }}, + "failed": {Waiting: &v1.ContainerStateWaiting{Reason: testErrorReason.Error()}}, + }, + expectedInitLastTerminationState: map[string]v1.ContainerState{ + "succeed": {Terminated: &v1.ContainerStateTerminated{ + ExitCode: 2, + ContainerID: emptyContainerID, + }}, + "failed": {Terminated: &v1.ContainerStateTerminated{ + ExitCode: 1, + ContainerID: emptyContainerID, + }}, + }, + }, + } { + pod.Spec.RestartPolicy = test.restartPolicy + // Test normal containers + pod.Spec.Containers = containers + apiStatus := kubelet.generateAPIPodStatus(pod, podStatus) + expectedState, expectedLastTerminationState := test.expectedState, test.expectedLastTerminationState + verifyContainerStatuses(t, apiStatus.ContainerStatuses, expectedState, expectedLastTerminationState, fmt.Sprintf("case %d", c)) + pod.Spec.Containers = nil + + // Test init containers + pod.Spec.InitContainers = containers + apiStatus = kubelet.generateAPIPodStatus(pod, podStatus) + if test.expectedInitState != nil { + expectedState = test.expectedInitState + } + if test.expectedInitLastTerminationState != nil { + expectedLastTerminationState = test.expectedInitLastTerminationState + } + verifyContainerStatuses(t, apiStatus.InitContainerStatuses, expectedState, expectedLastTerminationState, fmt.Sprintf("case %d", c)) + pod.Spec.InitContainers = nil + } +} + +// testPodAdmitHandler is a lifecycle.PodAdmitHandler for testing. +type testPodAdmitHandler struct { + // list of pods to reject. + podsToReject []*v1.Pod +} + +// Admit rejects all pods in the podsToReject list with a matching UID. +func (a *testPodAdmitHandler) Admit(attrs *lifecycle.PodAdmitAttributes) lifecycle.PodAdmitResult { + for _, podToReject := range a.podsToReject { + if podToReject.UID == attrs.Pod.UID { + return lifecycle.PodAdmitResult{Admit: false, Reason: "Rejected", Message: "Pod is rejected"} + } + } + return lifecycle.PodAdmitResult{Admit: true} +} + +// Test verifies that the kubelet invokes an admission handler during HandlePodAdditions. +func TestHandlePodAdditionsInvokesPodAdmitHandlers(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + testKubelet.chainMock() + kl := testKubelet.kubelet + kl.nodeInfo = testNodeInfo{nodes: []*v1.Node{ + { + ObjectMeta: metav1.ObjectMeta{Name: string(kl.nodeName)}, + Status: v1.NodeStatus{ + Allocatable: v1.ResourceList{ + v1.ResourcePods: *resource.NewQuantity(110, resource.DecimalSI), + }, + }, + }, + }} + + pods := []*v1.Pod{ + { + ObjectMeta: metav1.ObjectMeta{ + UID: "123456789", + Name: "podA", + Namespace: "foo", + }, + }, + { + ObjectMeta: metav1.ObjectMeta{ + UID: "987654321", + Name: "podB", + Namespace: "foo", + }, + }, + } + podToReject := pods[0] + podToAdmit := pods[1] + podsToReject := []*v1.Pod{podToReject} + + kl.admitHandlers.AddPodAdmitHandler(&testPodAdmitHandler{podsToReject: podsToReject}) + + kl.HandlePodAdditions(pods) + + // Check pod status stored in the status map. + checkPodStatus(t, kl, podToReject, v1.PodFailed) + checkPodStatus(t, kl, podToAdmit, v1.PodPending) +} + +// testPodSyncLoopHandler is a lifecycle.PodSyncLoopHandler that is used for testing. +type testPodSyncLoopHandler struct { + // list of pods to sync + podsToSync []*v1.Pod +} + +// ShouldSync evaluates if the pod should be synced from the kubelet. +func (a *testPodSyncLoopHandler) ShouldSync(pod *v1.Pod) bool { + for _, podToSync := range a.podsToSync { + if podToSync.UID == pod.UID { + return true + } + } + return false +} + +// TestGetPodsToSyncInvokesPodSyncLoopHandlers ensures that the get pods to sync routine invokes the handler. +func TestGetPodsToSyncInvokesPodSyncLoopHandlers(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + pods := newTestPods(5) + expected := []*v1.Pod{pods[0]} + kubelet.AddPodSyncLoopHandler(&testPodSyncLoopHandler{expected}) + kubelet.podManager.SetPods(pods) + + podsToSync := kubelet.getPodsToSync() + sort.Sort(podsByUID(expected)) + sort.Sort(podsByUID(podsToSync)) + assert.Equal(t, expected, podsToSync) +} + +// testPodSyncHandler is a lifecycle.PodSyncHandler that is used for testing. +type testPodSyncHandler struct { + // list of pods to evict. + podsToEvict []*v1.Pod + // the reason for the eviction + reason string + // the message for the eviction + message string +} + +// ShouldEvict evaluates if the pod should be evicted from the kubelet. +func (a *testPodSyncHandler) ShouldEvict(pod *v1.Pod) lifecycle.ShouldEvictResponse { + for _, podToEvict := range a.podsToEvict { + if podToEvict.UID == pod.UID { + return lifecycle.ShouldEvictResponse{Evict: true, Reason: a.reason, Message: a.message} + } + } + return lifecycle.ShouldEvictResponse{Evict: false} +} + +// TestGenerateAPIPodStatusInvokesPodSyncHandlers invokes the handlers and reports the proper status +func TestGenerateAPIPodStatusInvokesPodSyncHandlers(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + pod := newTestPods(1)[0] + podsToEvict := []*v1.Pod{pod} + kubelet.AddPodSyncHandler(&testPodSyncHandler{podsToEvict, "Evicted", "because"}) + status := &kubecontainer.PodStatus{ + ID: pod.UID, + Name: pod.Name, + Namespace: pod.Namespace, + } + apiStatus := kubelet.generateAPIPodStatus(pod, status) + require.Equal(t, v1.PodFailed, apiStatus.Phase) + require.Equal(t, "Evicted", apiStatus.Reason) + require.Equal(t, "because", apiStatus.Message) +} + +func TestSyncPodKillPod(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kl := testKubelet.kubelet + pod := &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + UID: "12345678", + Name: "bar", + Namespace: "foo", + }, + } + pods := []*v1.Pod{pod} + kl.podManager.SetPods(pods) + gracePeriodOverride := int64(0) + err := kl.syncPod(syncPodOptions{ + pod: pod, + podStatus: &kubecontainer.PodStatus{}, + updateType: kubetypes.SyncPodKill, + killPodOptions: &KillPodOptions{ + PodStatusFunc: func(p *v1.Pod, podStatus *kubecontainer.PodStatus) v1.PodStatus { + return v1.PodStatus{ + Phase: v1.PodFailed, + Reason: "reason", + Message: "message", + } + }, + PodTerminationGracePeriodSecondsOverride: &gracePeriodOverride, + }, + }) + require.NoError(t, err) + + // Check pod status stored in the status map. + checkPodStatus(t, kl, pod, v1.PodFailed) +} + +func waitForVolumeUnmount( + volumeManager kubeletvolume.VolumeManager, + pod *v1.Pod) error { + var podVolumes kubecontainer.VolumeMap + err := retryWithExponentialBackOff( + time.Duration(50*time.Millisecond), + func() (bool, error) { + // Verify volumes detached + podVolumes = volumeManager.GetMountedVolumesForPod( + volumehelper.GetUniquePodName(pod)) + + if len(podVolumes) != 0 { + return false, nil + } + + return true, nil + }, + ) + + if err != nil { + return fmt.Errorf( + "Expected volumes to be unmounted. But some volumes are still mounted: %#v", podVolumes) + } + + return nil +} + +func waitForVolumeDetach( + volumeName v1.UniqueVolumeName, + volumeManager kubeletvolume.VolumeManager) error { + attachedVolumes := []v1.UniqueVolumeName{} + err := retryWithExponentialBackOff( + time.Duration(50*time.Millisecond), + func() (bool, error) { + // Verify volumes detached + volumeAttached := volumeManager.VolumeIsAttached(volumeName) + return !volumeAttached, nil + }, + ) + + if err != nil { + return fmt.Errorf( + "Expected volumes to be detached. But some volumes are still attached: %#v", attachedVolumes) + } + + return nil +} + +func retryWithExponentialBackOff(initialDuration time.Duration, fn wait.ConditionFunc) error { + backoff := wait.Backoff{ + Duration: initialDuration, + Factor: 3, + Jitter: 0, + Steps: 6, + } + return wait.ExponentialBackoff(backoff, fn) +} + +func simulateVolumeInUseUpdate( + volumeName v1.UniqueVolumeName, + stopCh <-chan struct{}, + volumeManager kubeletvolume.VolumeManager) { + ticker := time.NewTicker(100 * time.Millisecond) + defer ticker.Stop() + for { + select { + case <-ticker.C: + volumeManager.MarkVolumesAsReportedInUse( + []v1.UniqueVolumeName{volumeName}) + case <-stopCh: + return + } + } +} + +func runVolumeManager(kubelet *Kubelet) chan struct{} { + stopCh := make(chan struct{}) + go kubelet.volumeManager.Run(kubelet.sourcesReady, stopCh) + return stopCh +} + +// Sort pods by UID. +type podsByUID []*v1.Pod + +func (p podsByUID) Len() int { return len(p) } +func (p podsByUID) Swap(i, j int) { p[i], p[j] = p[j], p[i] } +func (p podsByUID) Less(i, j int) bool { return p[i].UID < p[j].UID } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_volumes.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_volumes.go new file mode 100644 index 000000000..6620cc07e --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_volumes.go @@ -0,0 +1,138 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "fmt" + + "github.com/golang/glog" + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/types" + utilerrors "k8s.io/apimachinery/pkg/util/errors" + "k8s.io/apimachinery/pkg/util/sets" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + "k8s.io/kubernetes/pkg/util/removeall" + "k8s.io/kubernetes/pkg/volume" + volumetypes "k8s.io/kubernetes/pkg/volume/util/types" +) + +// ListVolumesForPod returns a map of the mounted volumes for the given pod. +// The key in the map is the OuterVolumeSpecName (i.e. pod.Spec.Volumes[x].Name) +func (kl *Kubelet) ListVolumesForPod(podUID types.UID) (map[string]volume.Volume, bool) { + volumesToReturn := make(map[string]volume.Volume) + podVolumes := kl.volumeManager.GetMountedVolumesForPod( + volumetypes.UniquePodName(podUID)) + for outerVolumeSpecName, volume := range podVolumes { + // TODO: volume.Mounter could be nil if volume object is recovered + // from reconciler's sync state process. PR 33616 will fix this problem + // to create Mounter object when recovering volume state. + if volume.Mounter == nil { + continue + } + volumesToReturn[outerVolumeSpecName] = volume.Mounter + } + + return volumesToReturn, len(volumesToReturn) > 0 +} + +// podVolumesExist checks with the volume manager and returns true any of the +// pods for the specified volume are mounted. +func (kl *Kubelet) podVolumesExist(podUID types.UID) bool { + if mountedVolumes := + kl.volumeManager.GetMountedVolumesForPod( + volumetypes.UniquePodName(podUID)); len(mountedVolumes) > 0 { + return true + } + + return false +} + +// newVolumeMounterFromPlugins attempts to find a plugin by volume spec, pod +// and volume options and then creates a Mounter. +// Returns a valid mounter or an error. +func (kl *Kubelet) newVolumeMounterFromPlugins(spec *volume.Spec, pod *v1.Pod, opts volume.VolumeOptions) (volume.Mounter, error) { + plugin, err := kl.volumePluginMgr.FindPluginBySpec(spec) + if err != nil { + return nil, fmt.Errorf("can't use volume plugins for %s: %v", spec.Name(), err) + } + opts.Containerized = kl.kubeletConfiguration.Containerized + physicalMounter, err := plugin.NewMounter(spec, pod, opts) + if err != nil { + return nil, fmt.Errorf("failed to instantiate mounter for volume: %s using plugin: %s with a root cause: %v", spec.Name(), plugin.GetPluginName(), err) + } + glog.V(10).Infof("Using volume plugin %q to mount %s", plugin.GetPluginName(), spec.Name()) + return physicalMounter, nil +} + +// cleanupOrphanedPodDirs removes the volumes of pods that should not be +// running and that have no containers running. Note that we roll up logs here since it runs in the main loop. +func (kl *Kubelet) cleanupOrphanedPodDirs(pods []*v1.Pod, runningPods []*kubecontainer.Pod) error { + allPods := sets.NewString() + for _, pod := range pods { + allPods.Insert(string(pod.UID)) + } + for _, pod := range runningPods { + allPods.Insert(string(pod.ID)) + } + + found, err := kl.listPodsFromDisk() + if err != nil { + return err + } + + orphanRemovalErrors := []error{} + orphanVolumeErrors := []error{} + + for _, uid := range found { + if allPods.Has(string(uid)) { + continue + } + // If volumes have not been unmounted/detached, do not delete directory. + // Doing so may result in corruption of data. + if podVolumesExist := kl.podVolumesExist(uid); podVolumesExist { + glog.V(3).Infof("Orphaned pod %q found, but volumes are not cleaned up", uid) + continue + } + // If there are still volume directories, do not delete directory + volumePaths, err := kl.getPodVolumePathListFromDisk(uid) + if err != nil { + orphanVolumeErrors = append(orphanVolumeErrors, fmt.Errorf("Orphaned pod %q found, but error %v occurred during reading volume dir from disk", uid, err)) + continue + } + if len(volumePaths) > 0 { + orphanVolumeErrors = append(orphanVolumeErrors, fmt.Errorf("Orphaned pod %q found, but volume paths are still present on disk", uid)) + continue + } + glog.V(3).Infof("Orphaned pod %q found, removing", uid) + if err := removeall.RemoveAllOneFilesystem(kl.mounter, kl.getPodDir(uid)); err != nil { + glog.Errorf("Failed to remove orphaned pod %q dir; err: %v", uid, err) + orphanRemovalErrors = append(orphanRemovalErrors, err) + } + } + + logSpew := func(errs []error) { + if len(errs) > 0 { + glog.Errorf("%v : There were a total of %v errors similar to this. Turn up verbosity to see them.", errs[0], len(errs)) + for _, err := range errs { + glog.V(5).Infof("Orphan pod: %v", err) + } + } + } + logSpew(orphanVolumeErrors) + logSpew(orphanRemovalErrors) + return utilerrors.NewAggregate(orphanRemovalErrors) +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_volumes_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_volumes_test.go new file mode 100644 index 000000000..393d31aad --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_volumes_test.go @@ -0,0 +1,462 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" + core "k8s.io/client-go/testing" + "k8s.io/kubernetes/pkg/volume" + volumetest "k8s.io/kubernetes/pkg/volume/testing" + "k8s.io/kubernetes/pkg/volume/util/volumehelper" +) + +func TestListVolumesForPod(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + + pod := podWithUIDNameNsSpec("12345678", "foo", "test", v1.PodSpec{ + Volumes: []v1.Volume{ + { + Name: "vol1", + VolumeSource: v1.VolumeSource{ + GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{ + PDName: "fake-device1", + }, + }, + }, + { + Name: "vol2", + VolumeSource: v1.VolumeSource{ + GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{ + PDName: "fake-device2", + }, + }, + }, + }, + }) + + stopCh := runVolumeManager(kubelet) + defer func() { + close(stopCh) + }() + + kubelet.podManager.SetPods([]*v1.Pod{pod}) + err := kubelet.volumeManager.WaitForAttachAndMount(pod) + assert.NoError(t, err) + + podName := volumehelper.GetUniquePodName(pod) + + volumesToReturn, volumeExsit := kubelet.ListVolumesForPod(types.UID(podName)) + assert.True(t, volumeExsit, "expected to find volumes for pod %q", podName) + + outerVolumeSpecName1 := "vol1" + assert.NotNil(t, volumesToReturn[outerVolumeSpecName1], "key %s", outerVolumeSpecName1) + + outerVolumeSpecName2 := "vol2" + assert.NotNil(t, volumesToReturn[outerVolumeSpecName2], "key %s", outerVolumeSpecName2) + +} + +func TestPodVolumesExist(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + + pods := []*v1.Pod{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: "pod1", + UID: "pod1uid", + }, + Spec: v1.PodSpec{ + Volumes: []v1.Volume{ + { + Name: "vol1", + VolumeSource: v1.VolumeSource{ + GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{ + PDName: "fake-device1", + }, + }, + }, + }, + }, + }, + { + ObjectMeta: metav1.ObjectMeta{ + Name: "pod2", + UID: "pod2uid", + }, + Spec: v1.PodSpec{ + Volumes: []v1.Volume{ + { + Name: "vol2", + VolumeSource: v1.VolumeSource{ + GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{ + PDName: "fake-device2", + }, + }, + }, + }, + }, + }, + { + ObjectMeta: metav1.ObjectMeta{ + Name: "pod3", + UID: "pod3uid", + }, + Spec: v1.PodSpec{ + Volumes: []v1.Volume{ + { + Name: "vol3", + VolumeSource: v1.VolumeSource{ + GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{ + PDName: "fake-device3", + }, + }, + }, + }, + }, + }, + } + + stopCh := runVolumeManager(kubelet) + defer func() { + close(stopCh) + }() + + kubelet.podManager.SetPods(pods) + for _, pod := range pods { + err := kubelet.volumeManager.WaitForAttachAndMount(pod) + assert.NoError(t, err) + } + + for _, pod := range pods { + podVolumesExist := kubelet.podVolumesExist(pod.UID) + assert.True(t, podVolumesExist, "pod %q", pod.UID) + } +} + +func TestVolumeAttachAndMountControllerDisabled(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + + pod := podWithUIDNameNsSpec("12345678", "foo", "test", v1.PodSpec{ + Volumes: []v1.Volume{ + { + Name: "vol1", + VolumeSource: v1.VolumeSource{ + GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{ + PDName: "fake-device", + }, + }, + }, + }, + }) + + stopCh := runVolumeManager(kubelet) + defer func() { + close(stopCh) + }() + + kubelet.podManager.SetPods([]*v1.Pod{pod}) + err := kubelet.volumeManager.WaitForAttachAndMount(pod) + assert.NoError(t, err) + + podVolumes := kubelet.volumeManager.GetMountedVolumesForPod( + volumehelper.GetUniquePodName(pod)) + + expectedPodVolumes := []string{"vol1"} + assert.Len(t, podVolumes, len(expectedPodVolumes), "Volumes for pod %+v", pod) + for _, name := range expectedPodVolumes { + assert.Contains(t, podVolumes, name, "Volumes for pod %+v", pod) + } + assert.True(t, testKubelet.volumePlugin.GetNewAttacherCallCount() >= 1, "Expected plugin NewAttacher to be called at least once") + assert.NoError(t, volumetest.VerifyWaitForAttachCallCount( + 1 /* expectedWaitForAttachCallCount */, testKubelet.volumePlugin)) + assert.NoError(t, volumetest.VerifyAttachCallCount( + 1 /* expectedAttachCallCount */, testKubelet.volumePlugin)) + assert.NoError(t, volumetest.VerifyMountDeviceCallCount( + 1 /* expectedMountDeviceCallCount */, testKubelet.volumePlugin)) + assert.NoError(t, volumetest.VerifySetUpCallCount( + 1 /* expectedSetUpCallCount */, testKubelet.volumePlugin)) +} + +func TestVolumeUnmountAndDetachControllerDisabled(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + + pod := podWithUIDNameNsSpec("12345678", "foo", "test", v1.PodSpec{ + Volumes: []v1.Volume{ + { + Name: "vol1", + VolumeSource: v1.VolumeSource{ + GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{ + PDName: "fake-device", + }, + }, + }, + }, + }) + + stopCh := runVolumeManager(kubelet) + defer func() { + close(stopCh) + }() + + // Add pod + kubelet.podManager.SetPods([]*v1.Pod{pod}) + + // Verify volumes attached + err := kubelet.volumeManager.WaitForAttachAndMount(pod) + assert.NoError(t, err) + + podVolumes := kubelet.volumeManager.GetMountedVolumesForPod( + volumehelper.GetUniquePodName(pod)) + + expectedPodVolumes := []string{"vol1"} + assert.Len(t, podVolumes, len(expectedPodVolumes), "Volumes for pod %+v", pod) + for _, name := range expectedPodVolumes { + assert.Contains(t, podVolumes, name, "Volumes for pod %+v", pod) + } + + assert.True(t, testKubelet.volumePlugin.GetNewAttacherCallCount() >= 1, "Expected plugin NewAttacher to be called at least once") + assert.NoError(t, volumetest.VerifyWaitForAttachCallCount( + 1 /* expectedWaitForAttachCallCount */, testKubelet.volumePlugin)) + assert.NoError(t, volumetest.VerifyAttachCallCount( + 1 /* expectedAttachCallCount */, testKubelet.volumePlugin)) + assert.NoError(t, volumetest.VerifyMountDeviceCallCount( + 1 /* expectedMountDeviceCallCount */, testKubelet.volumePlugin)) + assert.NoError(t, volumetest.VerifySetUpCallCount( + 1 /* expectedSetUpCallCount */, testKubelet.volumePlugin)) + + // Remove pod + kubelet.podManager.SetPods([]*v1.Pod{}) + + assert.NoError(t, waitForVolumeUnmount(kubelet.volumeManager, pod)) + + // Verify volumes unmounted + podVolumes = kubelet.volumeManager.GetMountedVolumesForPod( + volumehelper.GetUniquePodName(pod)) + + assert.Len(t, podVolumes, 0, + "Expected volumes to be unmounted and detached. But some volumes are still mounted: %#v", podVolumes) + + assert.NoError(t, volumetest.VerifyTearDownCallCount( + 1 /* expectedTearDownCallCount */, testKubelet.volumePlugin)) + + // Verify volumes detached and no longer reported as in use + assert.NoError(t, waitForVolumeDetach(v1.UniqueVolumeName("fake/vol1"), kubelet.volumeManager)) + assert.True(t, testKubelet.volumePlugin.GetNewAttacherCallCount() >= 1, "Expected plugin NewAttacher to be called at least once") + assert.NoError(t, volumetest.VerifyDetachCallCount( + 1 /* expectedDetachCallCount */, testKubelet.volumePlugin)) +} + +func TestVolumeAttachAndMountControllerEnabled(t *testing.T) { + testKubelet := newTestKubelet(t, true /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + kubeClient := testKubelet.fakeKubeClient + kubeClient.AddReactor("get", "nodes", + func(action core.Action) (bool, runtime.Object, error) { + return true, &v1.Node{ + ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, + Status: v1.NodeStatus{ + VolumesAttached: []v1.AttachedVolume{ + { + Name: "fake/vol1", + DevicePath: "fake/path", + }, + }}, + Spec: v1.NodeSpec{ExternalID: testKubeletHostname}, + }, nil + }) + kubeClient.AddReactor("*", "*", func(action core.Action) (bool, runtime.Object, error) { + return true, nil, fmt.Errorf("no reaction implemented for %s", action) + }) + + pod := podWithUIDNameNsSpec("12345678", "foo", "test", v1.PodSpec{ + Volumes: []v1.Volume{ + { + Name: "vol1", + VolumeSource: v1.VolumeSource{ + GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{ + PDName: "fake-device", + }, + }, + }, + }, + }) + + stopCh := runVolumeManager(kubelet) + defer func() { + close(stopCh) + }() + + kubelet.podManager.SetPods([]*v1.Pod{pod}) + + // Fake node status update + go simulateVolumeInUseUpdate( + v1.UniqueVolumeName("fake/vol1"), + stopCh, + kubelet.volumeManager) + + assert.NoError(t, kubelet.volumeManager.WaitForAttachAndMount(pod)) + + podVolumes := kubelet.volumeManager.GetMountedVolumesForPod( + volumehelper.GetUniquePodName(pod)) + + expectedPodVolumes := []string{"vol1"} + assert.Len(t, podVolumes, len(expectedPodVolumes), "Volumes for pod %+v", pod) + for _, name := range expectedPodVolumes { + assert.Contains(t, podVolumes, name, "Volumes for pod %+v", pod) + } + assert.True(t, testKubelet.volumePlugin.GetNewAttacherCallCount() >= 1, "Expected plugin NewAttacher to be called at least once") + assert.NoError(t, volumetest.VerifyWaitForAttachCallCount( + 1 /* expectedWaitForAttachCallCount */, testKubelet.volumePlugin)) + assert.NoError(t, volumetest.VerifyZeroAttachCalls(testKubelet.volumePlugin)) + assert.NoError(t, volumetest.VerifyMountDeviceCallCount( + 1 /* expectedMountDeviceCallCount */, testKubelet.volumePlugin)) + assert.NoError(t, volumetest.VerifySetUpCallCount( + 1 /* expectedSetUpCallCount */, testKubelet.volumePlugin)) +} + +func TestVolumeUnmountAndDetachControllerEnabled(t *testing.T) { + testKubelet := newTestKubelet(t, true /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + kubeClient := testKubelet.fakeKubeClient + kubeClient.AddReactor("get", "nodes", + func(action core.Action) (bool, runtime.Object, error) { + return true, &v1.Node{ + ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, + Status: v1.NodeStatus{ + VolumesAttached: []v1.AttachedVolume{ + { + Name: "fake/vol1", + DevicePath: "fake/path", + }, + }}, + Spec: v1.NodeSpec{ExternalID: testKubeletHostname}, + }, nil + }) + kubeClient.AddReactor("*", "*", func(action core.Action) (bool, runtime.Object, error) { + return true, nil, fmt.Errorf("no reaction implemented for %s", action) + }) + + pod := podWithUIDNameNsSpec("12345678", "foo", "test", v1.PodSpec{ + Volumes: []v1.Volume{ + { + Name: "vol1", + VolumeSource: v1.VolumeSource{ + GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{ + PDName: "fake-device", + }, + }, + }, + }, + }) + + stopCh := runVolumeManager(kubelet) + defer func() { + close(stopCh) + }() + + // Add pod + kubelet.podManager.SetPods([]*v1.Pod{pod}) + + // Fake node status update + go simulateVolumeInUseUpdate( + v1.UniqueVolumeName("fake/vol1"), + stopCh, + kubelet.volumeManager) + + // Verify volumes attached + assert.NoError(t, kubelet.volumeManager.WaitForAttachAndMount(pod)) + + podVolumes := kubelet.volumeManager.GetMountedVolumesForPod( + volumehelper.GetUniquePodName(pod)) + + expectedPodVolumes := []string{"vol1"} + assert.Len(t, podVolumes, len(expectedPodVolumes), "Volumes for pod %+v", pod) + for _, name := range expectedPodVolumes { + assert.Contains(t, podVolumes, name, "Volumes for pod %+v", pod) + } + + assert.True(t, testKubelet.volumePlugin.GetNewAttacherCallCount() >= 1, "Expected plugin NewAttacher to be called at least once") + assert.NoError(t, volumetest.VerifyWaitForAttachCallCount( + 1 /* expectedWaitForAttachCallCount */, testKubelet.volumePlugin)) + assert.NoError(t, volumetest.VerifyZeroAttachCalls(testKubelet.volumePlugin)) + assert.NoError(t, volumetest.VerifyMountDeviceCallCount( + 1 /* expectedMountDeviceCallCount */, testKubelet.volumePlugin)) + assert.NoError(t, volumetest.VerifySetUpCallCount( + 1 /* expectedSetUpCallCount */, testKubelet.volumePlugin)) + + // Remove pod + kubelet.podManager.SetPods([]*v1.Pod{}) + + assert.NoError(t, waitForVolumeUnmount(kubelet.volumeManager, pod)) + + // Verify volumes unmounted + podVolumes = kubelet.volumeManager.GetMountedVolumesForPod( + volumehelper.GetUniquePodName(pod)) + + assert.Len(t, podVolumes, 0, + "Expected volumes to be unmounted and detached. But some volumes are still mounted: %#v", podVolumes) + + assert.NoError(t, volumetest.VerifyTearDownCallCount( + 1 /* expectedTearDownCallCount */, testKubelet.volumePlugin)) + + // Verify volumes detached and no longer reported as in use + assert.NoError(t, waitForVolumeDetach(v1.UniqueVolumeName("fake/vol1"), kubelet.volumeManager)) + assert.True(t, testKubelet.volumePlugin.GetNewAttacherCallCount() >= 1, "Expected plugin NewAttacher to be called at least once") + assert.NoError(t, volumetest.VerifyZeroDetachCallCount(testKubelet.volumePlugin)) +} + +type stubVolume struct { + path string + volume.MetricsNil +} + +func (f *stubVolume) GetPath() string { + return f.path +} + +func (f *stubVolume) GetAttributes() volume.Attributes { + return volume.Attributes{} +} + +func (f *stubVolume) CanMount() error { + return nil +} + +func (f *stubVolume) SetUp(fsGroup *int64) error { + return nil +} + +func (f *stubVolume) SetUpAt(dir string, fsGroup *int64) error { + return nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/networks.go b/vendor/k8s.io/kubernetes/pkg/kubelet/networks.go new file mode 100644 index 000000000..84bcdb8fa --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/networks.go @@ -0,0 +1,95 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "k8s.io/api/core/v1" + clientset "k8s.io/client-go/kubernetes" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + "k8s.io/kubernetes/pkg/kubelet/network" +) + +// This just exports required functions from kubelet proper, for use by network +// plugins. +// TODO(#35457): get rid of this backchannel to the kubelet. The scope of +// the back channel is restricted to host-ports/testing, and restricted +// to kubenet. No other network plugin wrapper needs it. Other plugins +// only require a way to access namespace information, which they can do +// directly through the methods implemented by criNetworkHost. +type networkHost struct { + kubelet *Kubelet +} + +func (nh *networkHost) GetPodByName(name, namespace string) (*v1.Pod, bool) { + return nh.kubelet.GetPodByName(name, namespace) +} + +func (nh *networkHost) GetKubeClient() clientset.Interface { + return nh.kubelet.kubeClient +} + +func (nh *networkHost) GetRuntime() kubecontainer.Runtime { + return nh.kubelet.GetRuntime() +} + +func (nh *networkHost) SupportsLegacyFeatures() bool { + return true +} + +// criNetworkHost implements the part of network.Host required by the +// cri (NamespaceGetter). It leechs off networkHost for all other +// methods, because networkHost is slated for deletion. +type criNetworkHost struct { + *networkHost + // criNetworkHost currently support legacy features. Hence no need to support PortMappingGetter + *network.NoopPortMappingGetter +} + +// GetNetNS returns the network namespace of the given containerID. +// This method satisfies the network.NamespaceGetter interface for +// networkHost. It's only meant to be used from network plugins +// that are directly invoked by the kubelet (aka: legacy, pre-cri). +// Any network plugin invoked by a cri must implement NamespaceGetter +// to talk directly to the runtime instead. +func (c *criNetworkHost) GetNetNS(containerID string) (string, error) { + return c.kubelet.GetRuntime().GetNetNS(kubecontainer.ContainerID{Type: "", ID: containerID}) +} + +// NoOpLegacyHost implements the network.LegacyHost interface for the remote +// runtime shim by just returning empties. It doesn't support legacy features +// like host port and bandwidth shaping. +type NoOpLegacyHost struct{} + +// GetPodByName always returns "nil, true" for 'NoOpLegacyHost' +func (n *NoOpLegacyHost) GetPodByName(namespace, name string) (*v1.Pod, bool) { + return nil, true +} + +// GetKubeClient always returns "nil" for 'NoOpLegacyHost' +func (n *NoOpLegacyHost) GetKubeClient() clientset.Interface { + return nil +} + +// GetRuntime always returns "nil" for 'NoOpLegacyHost' +func (n *NoOpLegacyHost) GetRuntime() kubecontainer.Runtime { + return nil +} + +// SupportsLegacyFeatures always returns "false" for 'NoOpLegacyHost' +func (n *NoOpLegacyHost) SupportsLegacyFeatures() bool { + return false +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/networks_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/networks_test.go new file mode 100644 index 000000000..6c7c68f8a --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/networks_test.go @@ -0,0 +1,91 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "testing" +) + +func TestNetworkHostGetsPodNotFound(t *testing.T) { + testKubelet := newTestKubelet(t, true) + defer testKubelet.Cleanup() + nh := networkHost{testKubelet.kubelet} + + actualPod, _ := nh.GetPodByName("", "") + if actualPod != nil { + t.Fatalf("Was expected nil, received %v instead", actualPod) + } +} + +func TestNetworkHostGetsKubeClient(t *testing.T) { + testKubelet := newTestKubelet(t, true) + defer testKubelet.Cleanup() + nh := networkHost{testKubelet.kubelet} + + if nh.GetKubeClient() != testKubelet.fakeKubeClient { + t.Fatalf("NetworkHost client does not match testKubelet's client") + } +} + +func TestNetworkHostGetsRuntime(t *testing.T) { + testKubelet := newTestKubelet(t, true) + defer testKubelet.Cleanup() + nh := networkHost{testKubelet.kubelet} + + if nh.GetRuntime() != testKubelet.fakeRuntime { + t.Fatalf("NetworkHost runtime does not match testKubelet's runtime") + } +} + +func TestNetworkHostSupportsLegacyFeatures(t *testing.T) { + testKubelet := newTestKubelet(t, true) + defer testKubelet.Cleanup() + nh := networkHost{testKubelet.kubelet} + + if nh.SupportsLegacyFeatures() == false { + t.Fatalf("SupportsLegacyFeatures should not be false") + } +} + +func TestNoOpHostGetsName(t *testing.T) { + nh := NoOpLegacyHost{} + pod, err := nh.GetPodByName("", "") + if pod != nil && err != true { + t.Fatalf("noOpLegacyHost getpodbyname expected to be nil and true") + } +} + +func TestNoOpHostGetsKubeClient(t *testing.T) { + nh := NoOpLegacyHost{} + if nh.GetKubeClient() != nil { + t.Fatalf("noOpLegacyHost client expected to be nil") + } +} + +func TestNoOpHostGetsRuntime(t *testing.T) { + nh := NoOpLegacyHost{} + if nh.GetRuntime() != nil { + t.Fatalf("noOpLegacyHost runtime expected to be nil") + } +} + +func TestNoOpHostSupportsLegacyFeatures(t *testing.T) { + nh := NoOpLegacyHost{} + if nh.SupportsLegacyFeatures() != false { + t.Fatalf("noOpLegacyHost legacy features expected to be false") + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/oom_watcher.go b/vendor/k8s.io/kubernetes/pkg/kubelet/oom_watcher.go new file mode 100644 index 000000000..448082b05 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/oom_watcher.go @@ -0,0 +1,74 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "github.com/golang/glog" + "github.com/google/cadvisor/events" + cadvisorapi "github.com/google/cadvisor/info/v1" + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/client-go/tools/record" + "k8s.io/kubernetes/pkg/kubelet/cadvisor" +) + +// OOMWatcher defines the interface of OOM watchers. +type OOMWatcher interface { + Start(ref *v1.ObjectReference) error +} + +type realOOMWatcher struct { + cadvisor cadvisor.Interface + recorder record.EventRecorder +} + +// NewOOMWatcher creates and initializes a OOMWatcher based on parameters. +func NewOOMWatcher(cadvisor cadvisor.Interface, recorder record.EventRecorder) OOMWatcher { + return &realOOMWatcher{ + cadvisor: cadvisor, + recorder: recorder, + } +} + +const systemOOMEvent = "SystemOOM" + +// Watches cadvisor for system oom's and records an event for every system oom encountered. +func (ow *realOOMWatcher) Start(ref *v1.ObjectReference) error { + request := events.Request{ + EventType: map[cadvisorapi.EventType]bool{ + cadvisorapi.EventOom: true, + }, + ContainerName: "/", + IncludeSubcontainers: false, + } + eventChannel, err := ow.cadvisor.WatchEvents(&request) + if err != nil { + return err + } + + go func() { + defer runtime.HandleCrash() + + for event := range eventChannel.GetChannel() { + glog.V(2).Infof("Got sys oom event from cadvisor: %v", event) + ow.recorder.PastEventf(ref, metav1.Time{Time: event.Timestamp}, v1.EventTypeWarning, systemOOMEvent, "System OOM encountered") + } + glog.Errorf("Unexpectedly stopped receiving OOM notifications from cAdvisor") + }() + return nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/oom_watcher_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/oom_watcher_test.go new file mode 100644 index 000000000..6fd0287e5 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/oom_watcher_test.go @@ -0,0 +1,38 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "k8s.io/api/core/v1" + "k8s.io/client-go/tools/record" + cadvisortest "k8s.io/kubernetes/pkg/kubelet/cadvisor/testing" +) + +func TestBasic(t *testing.T) { + fakeRecorder := &record.FakeRecorder{} + mockCadvisor := &cadvisortest.Fake{} + node := &v1.ObjectReference{} + oomWatcher := NewOOMWatcher(mockCadvisor, fakeRecorder) + assert.NoError(t, oomWatcher.Start(node)) + + // TODO: Improve this test once cadvisor exports events.EventChannel as an interface + // and thereby allow using a mock version of cadvisor. +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pod_container_deletor.go b/vendor/k8s.io/kubernetes/pkg/kubelet/pod_container_deletor.go new file mode 100644 index 000000000..caf00b05c --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pod_container_deletor.go @@ -0,0 +1,113 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "sort" + + "github.com/golang/glog" + "k8s.io/apimachinery/pkg/util/wait" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" +) + +const ( + // The limit on the number of buffered container deletion requests + // This number is a bit arbitrary and may be adjusted in the future. + containerDeletorBufferLimit = 50 +) + +type containerStatusbyCreatedList []*kubecontainer.ContainerStatus + +type podContainerDeletor struct { + worker chan<- kubecontainer.ContainerID + containersToKeep int +} + +func (a containerStatusbyCreatedList) Len() int { return len(a) } +func (a containerStatusbyCreatedList) Swap(i, j int) { a[i], a[j] = a[j], a[i] } +func (a containerStatusbyCreatedList) Less(i, j int) bool { return a[i].CreatedAt.After(a[j].CreatedAt) } + +func newPodContainerDeletor(runtime kubecontainer.Runtime, containersToKeep int) *podContainerDeletor { + buffer := make(chan kubecontainer.ContainerID, containerDeletorBufferLimit) + go wait.Until(func() { + for { + select { + case id := <-buffer: + runtime.DeleteContainer(id) + } + } + }, 0, wait.NeverStop) + + return &podContainerDeletor{ + worker: buffer, + containersToKeep: containersToKeep, + } +} + +// getContainersToDeleteInPod returns the exited containers in a pod whose name matches the name inferred from filterContainerId (if not empty), ordered by the creation time from the latest to the earliest. +// If filterContainerID is empty, all dead containers in the pod are returned. +func getContainersToDeleteInPod(filterContainerID string, podStatus *kubecontainer.PodStatus, containersToKeep int) containerStatusbyCreatedList { + matchedContainer := func(filterContainerId string, podStatus *kubecontainer.PodStatus) *kubecontainer.ContainerStatus { + if filterContainerId == "" { + return nil + } + for _, containerStatus := range podStatus.ContainerStatuses { + if containerStatus.ID.ID == filterContainerId { + return containerStatus + } + } + return nil + }(filterContainerID, podStatus) + + if filterContainerID != "" && matchedContainer == nil { + glog.Warningf("Container %q not found in pod's containers", filterContainerID) + return containerStatusbyCreatedList{} + } + + // Find the exited containers whose name matches the name of the container with id being filterContainerId + var candidates containerStatusbyCreatedList + for _, containerStatus := range podStatus.ContainerStatuses { + if containerStatus.State != kubecontainer.ContainerStateExited { + continue + } + if matchedContainer == nil || matchedContainer.Name == containerStatus.Name { + candidates = append(candidates, containerStatus) + } + } + + if len(candidates) <= containersToKeep { + return containerStatusbyCreatedList{} + } + sort.Sort(candidates) + return candidates[containersToKeep:] +} + +// deleteContainersInPod issues container deletion requests for containers selected by getContainersToDeleteInPod. +func (p *podContainerDeletor) deleteContainersInPod(filterContainerID string, podStatus *kubecontainer.PodStatus, removeAll bool) { + containersToKeep := p.containersToKeep + if removeAll { + containersToKeep = 0 + } + + for _, candidate := range getContainersToDeleteInPod(filterContainerID, podStatus, containersToKeep) { + select { + case p.worker <- candidate.ID: + default: + glog.Warningf("Failed to issue the request to remove container %v", candidate.ID) + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pod_container_deletor_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/pod_container_deletor_test.go new file mode 100644 index 000000000..196a66607 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pod_container_deletor_test.go @@ -0,0 +1,203 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "reflect" + "testing" + "time" + + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" +) + +func TestGetContainersToDeleteInPodWithFilter(t *testing.T) { + pod := kubecontainer.PodStatus{ + ContainerStatuses: []*kubecontainer.ContainerStatus{ + { + ID: kubecontainer.ContainerID{Type: "test", ID: "1"}, + Name: "foo", + CreatedAt: time.Now(), + State: kubecontainer.ContainerStateExited, + }, + { + ID: kubecontainer.ContainerID{Type: "test", ID: "2"}, + Name: "bar", + CreatedAt: time.Now().Add(time.Second), + State: kubecontainer.ContainerStateExited, + }, + { + ID: kubecontainer.ContainerID{Type: "test", ID: "3"}, + Name: "bar", + CreatedAt: time.Now().Add(2 * time.Second), + State: kubecontainer.ContainerStateExited, + }, + { + ID: kubecontainer.ContainerID{Type: "test", ID: "4"}, + Name: "bar", + CreatedAt: time.Now().Add(3 * time.Second), + State: kubecontainer.ContainerStateExited, + }, + { + ID: kubecontainer.ContainerID{Type: "test", ID: "5"}, + Name: "bar", + CreatedAt: time.Now().Add(4 * time.Second), + State: kubecontainer.ContainerStateRunning, + }, + }, + } + + testCases := []struct { + containersToKeep int + expectedContainersToDelete containerStatusbyCreatedList + }{ + { + 0, + []*kubecontainer.ContainerStatus{pod.ContainerStatuses[3], pod.ContainerStatuses[2], pod.ContainerStatuses[1]}, + }, + { + 1, + []*kubecontainer.ContainerStatus{pod.ContainerStatuses[2], pod.ContainerStatuses[1]}, + }, + { + 2, + []*kubecontainer.ContainerStatus{pod.ContainerStatuses[1]}, + }, + } + + for _, test := range testCases { + candidates := getContainersToDeleteInPod("4", &pod, test.containersToKeep) + if !reflect.DeepEqual(candidates, test.expectedContainersToDelete) { + t.Errorf("expected %v got %v", test.expectedContainersToDelete, candidates) + } + } +} + +func TestGetContainersToDeleteInPod(t *testing.T) { + pod := kubecontainer.PodStatus{ + ContainerStatuses: []*kubecontainer.ContainerStatus{ + { + ID: kubecontainer.ContainerID{Type: "test", ID: "1"}, + Name: "foo", + CreatedAt: time.Now(), + State: kubecontainer.ContainerStateExited, + }, + { + ID: kubecontainer.ContainerID{Type: "test", ID: "2"}, + Name: "bar", + CreatedAt: time.Now().Add(time.Second), + State: kubecontainer.ContainerStateExited, + }, + { + ID: kubecontainer.ContainerID{Type: "test", ID: "3"}, + Name: "bar", + CreatedAt: time.Now().Add(2 * time.Second), + State: kubecontainer.ContainerStateExited, + }, + { + ID: kubecontainer.ContainerID{Type: "test", ID: "4"}, + Name: "bar", + CreatedAt: time.Now().Add(3 * time.Second), + State: kubecontainer.ContainerStateExited, + }, + { + ID: kubecontainer.ContainerID{Type: "test", ID: "5"}, + Name: "bar", + CreatedAt: time.Now().Add(4 * time.Second), + State: kubecontainer.ContainerStateRunning, + }, + }, + } + + testCases := []struct { + containersToKeep int + expectedContainersToDelete containerStatusbyCreatedList + }{ + { + 0, + []*kubecontainer.ContainerStatus{pod.ContainerStatuses[3], pod.ContainerStatuses[2], pod.ContainerStatuses[1], pod.ContainerStatuses[0]}, + }, + { + 1, + []*kubecontainer.ContainerStatus{pod.ContainerStatuses[2], pod.ContainerStatuses[1], pod.ContainerStatuses[0]}, + }, + { + 2, + []*kubecontainer.ContainerStatus{pod.ContainerStatuses[1], pod.ContainerStatuses[0]}, + }, + } + + for _, test := range testCases { + candidates := getContainersToDeleteInPod("", &pod, test.containersToKeep) + if !reflect.DeepEqual(candidates, test.expectedContainersToDelete) { + t.Errorf("expected %v got %v", test.expectedContainersToDelete, candidates) + } + } +} + +func TestGetContainersToDeleteInPodWithNoMatch(t *testing.T) { + pod := kubecontainer.PodStatus{ + ContainerStatuses: []*kubecontainer.ContainerStatus{ + { + ID: kubecontainer.ContainerID{Type: "test", ID: "1"}, + Name: "foo", + CreatedAt: time.Now(), + State: kubecontainer.ContainerStateExited, + }, + { + ID: kubecontainer.ContainerID{Type: "test", ID: "2"}, + Name: "bar", + CreatedAt: time.Now().Add(time.Second), + State: kubecontainer.ContainerStateExited, + }, + { + ID: kubecontainer.ContainerID{Type: "test", ID: "3"}, + Name: "bar", + CreatedAt: time.Now().Add(2 * time.Second), + State: kubecontainer.ContainerStateExited, + }, + { + ID: kubecontainer.ContainerID{Type: "test", ID: "4"}, + Name: "bar", + CreatedAt: time.Now().Add(3 * time.Second), + State: kubecontainer.ContainerStateExited, + }, + { + ID: kubecontainer.ContainerID{Type: "test", ID: "5"}, + Name: "bar", + CreatedAt: time.Now().Add(4 * time.Second), + State: kubecontainer.ContainerStateRunning, + }, + }, + } + + testCases := []struct { + filterID string + expectedContainersToDelete containerStatusbyCreatedList + }{ + { + "abc", + []*kubecontainer.ContainerStatus{}, + }, + } + + for _, test := range testCases { + candidates := getContainersToDeleteInPod(test.filterID, &pod, len(pod.ContainerStatuses)) + if !reflect.DeepEqual(candidates, test.expectedContainersToDelete) { + t.Errorf("expected %v got %v", test.expectedContainersToDelete, candidates) + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pod_workers.go b/vendor/k8s.io/kubernetes/pkg/kubelet/pod_workers.go new file mode 100644 index 000000000..91f48be89 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pod_workers.go @@ -0,0 +1,336 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "fmt" + "sync" + "time" + + "github.com/golang/glog" + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/tools/record" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + "k8s.io/kubernetes/pkg/kubelet/events" + "k8s.io/kubernetes/pkg/kubelet/eviction" + kubetypes "k8s.io/kubernetes/pkg/kubelet/types" + "k8s.io/kubernetes/pkg/kubelet/util/format" + "k8s.io/kubernetes/pkg/kubelet/util/queue" +) + +// OnCompleteFunc is a function that is invoked when an operation completes. +// If err is non-nil, the operation did not complete successfully. +type OnCompleteFunc func(err error) + +// PodStatusFunc is a function that is invoked to generate a pod status. +type PodStatusFunc func(pod *v1.Pod, podStatus *kubecontainer.PodStatus) v1.PodStatus + +// KillPodOptions are options when performing a pod update whose update type is kill. +type KillPodOptions struct { + // PodStatusFunc is the function to invoke to set pod status in response to a kill request. + PodStatusFunc PodStatusFunc + // PodTerminationGracePeriodSecondsOverride is optional override to use if a pod is being killed as part of kill operation. + PodTerminationGracePeriodSecondsOverride *int64 +} + +// UpdatePodOptions is an options struct to pass to a UpdatePod operation. +type UpdatePodOptions struct { + // pod to update + Pod *v1.Pod + // the mirror pod for the pod to update, if it is a static pod + MirrorPod *v1.Pod + // the type of update (create, update, sync, kill) + UpdateType kubetypes.SyncPodType + // optional callback function when operation completes + // this callback is not guaranteed to be completed since a pod worker may + // drop update requests if it was fulfilling a previous request. this is + // only guaranteed to be invoked in response to a kill pod request which is + // always delivered. + OnCompleteFunc OnCompleteFunc + // if update type is kill, use the specified options to kill the pod. + KillPodOptions *KillPodOptions +} + +// PodWorkers is an abstract interface for testability. +type PodWorkers interface { + UpdatePod(options *UpdatePodOptions) + ForgetNonExistingPodWorkers(desiredPods map[types.UID]empty) + ForgetWorker(uid types.UID) +} + +// syncPodOptions provides the arguments to a SyncPod operation. +type syncPodOptions struct { + // the mirror pod for the pod to sync, if it is a static pod + mirrorPod *v1.Pod + // pod to sync + pod *v1.Pod + // the type of update (create, update, sync) + updateType kubetypes.SyncPodType + // the current status + podStatus *kubecontainer.PodStatus + // if update type is kill, use the specified options to kill the pod. + killPodOptions *KillPodOptions +} + +// the function to invoke to perform a sync. +type syncPodFnType func(options syncPodOptions) error + +const ( + // jitter factor for resyncInterval + workerResyncIntervalJitterFactor = 0.5 + + // jitter factor for backOffPeriod + workerBackOffPeriodJitterFactor = 0.5 +) + +type podWorkers struct { + // Protects all per worker fields. + podLock sync.Mutex + + // Tracks all running per-pod goroutines - per-pod goroutine will be + // processing updates received through its corresponding channel. + podUpdates map[types.UID]chan UpdatePodOptions + // Track the current state of per-pod goroutines. + // Currently all update request for a given pod coming when another + // update of this pod is being processed are ignored. + isWorking map[types.UID]bool + // Tracks the last undelivered work item for this pod - a work item is + // undelivered if it comes in while the worker is working. + lastUndeliveredWorkUpdate map[types.UID]UpdatePodOptions + + workQueue queue.WorkQueue + + // This function is run to sync the desired stated of pod. + // NOTE: This function has to be thread-safe - it can be called for + // different pods at the same time. + syncPodFn syncPodFnType + + // The EventRecorder to use + recorder record.EventRecorder + + // backOffPeriod is the duration to back off when there is a sync error. + backOffPeriod time.Duration + + // resyncInterval is the duration to wait until the next sync. + resyncInterval time.Duration + + // podCache stores kubecontainer.PodStatus for all pods. + podCache kubecontainer.Cache +} + +func newPodWorkers(syncPodFn syncPodFnType, recorder record.EventRecorder, workQueue queue.WorkQueue, + resyncInterval, backOffPeriod time.Duration, podCache kubecontainer.Cache) *podWorkers { + return &podWorkers{ + podUpdates: map[types.UID]chan UpdatePodOptions{}, + isWorking: map[types.UID]bool{}, + lastUndeliveredWorkUpdate: map[types.UID]UpdatePodOptions{}, + syncPodFn: syncPodFn, + recorder: recorder, + workQueue: workQueue, + resyncInterval: resyncInterval, + backOffPeriod: backOffPeriod, + podCache: podCache, + } +} + +func (p *podWorkers) managePodLoop(podUpdates <-chan UpdatePodOptions) { + var lastSyncTime time.Time + for update := range podUpdates { + err := func() error { + podUID := update.Pod.UID + // This is a blocking call that would return only if the cache + // has an entry for the pod that is newer than minRuntimeCache + // Time. This ensures the worker doesn't start syncing until + // after the cache is at least newer than the finished time of + // the previous sync. + status, err := p.podCache.GetNewerThan(podUID, lastSyncTime) + if err != nil { + return err + } + err = p.syncPodFn(syncPodOptions{ + mirrorPod: update.MirrorPod, + pod: update.Pod, + podStatus: status, + killPodOptions: update.KillPodOptions, + updateType: update.UpdateType, + }) + lastSyncTime = time.Now() + return err + }() + // notify the call-back function if the operation succeeded or not + if update.OnCompleteFunc != nil { + update.OnCompleteFunc(err) + } + if err != nil { + glog.Errorf("Error syncing pod %s (%q), skipping: %v", update.Pod.UID, format.Pod(update.Pod), err) + // if we failed sync, we throw more specific events for why it happened. + // as a result, i question the value of this event. + // TODO: determine if we can remove this in a future release. + // do not include descriptive text that can vary on why it failed so in a pathological + // scenario, kubelet does not create enough discrete events that miss default aggregation + // window. + p.recorder.Eventf(update.Pod, v1.EventTypeWarning, events.FailedSync, "Error syncing pod") + } + p.wrapUp(update.Pod.UID, err) + } +} + +// Apply the new setting to the specified pod. +// If the options provide an OnCompleteFunc, the function is invoked if the update is accepted. +// Update requests are ignored if a kill pod request is pending. +func (p *podWorkers) UpdatePod(options *UpdatePodOptions) { + pod := options.Pod + uid := pod.UID + var podUpdates chan UpdatePodOptions + var exists bool + + p.podLock.Lock() + defer p.podLock.Unlock() + if podUpdates, exists = p.podUpdates[uid]; !exists { + // We need to have a buffer here, because checkForUpdates() method that + // puts an update into channel is called from the same goroutine where + // the channel is consumed. However, it is guaranteed that in such case + // the channel is empty, so buffer of size 1 is enough. + podUpdates = make(chan UpdatePodOptions, 1) + p.podUpdates[uid] = podUpdates + + // Creating a new pod worker either means this is a new pod, or that the + // kubelet just restarted. In either case the kubelet is willing to believe + // the status of the pod for the first pod worker sync. See corresponding + // comment in syncPod. + go func() { + defer runtime.HandleCrash() + p.managePodLoop(podUpdates) + }() + } + if !p.isWorking[pod.UID] { + p.isWorking[pod.UID] = true + podUpdates <- *options + } else { + // if a request to kill a pod is pending, we do not let anything overwrite that request. + update, found := p.lastUndeliveredWorkUpdate[pod.UID] + if !found || update.UpdateType != kubetypes.SyncPodKill { + p.lastUndeliveredWorkUpdate[pod.UID] = *options + } + } +} + +func (p *podWorkers) removeWorker(uid types.UID) { + if ch, ok := p.podUpdates[uid]; ok { + close(ch) + delete(p.podUpdates, uid) + // If there is an undelivered work update for this pod we need to remove it + // since per-pod goroutine won't be able to put it to the already closed + // channel when it finish processing the current work update. + if _, cached := p.lastUndeliveredWorkUpdate[uid]; cached { + delete(p.lastUndeliveredWorkUpdate, uid) + } + } +} +func (p *podWorkers) ForgetWorker(uid types.UID) { + p.podLock.Lock() + defer p.podLock.Unlock() + p.removeWorker(uid) +} + +func (p *podWorkers) ForgetNonExistingPodWorkers(desiredPods map[types.UID]empty) { + p.podLock.Lock() + defer p.podLock.Unlock() + for key := range p.podUpdates { + if _, exists := desiredPods[key]; !exists { + p.removeWorker(key) + } + } +} + +func (p *podWorkers) wrapUp(uid types.UID, syncErr error) { + // Requeue the last update if the last sync returned error. + switch { + case syncErr == nil: + // No error; requeue at the regular resync interval. + p.workQueue.Enqueue(uid, wait.Jitter(p.resyncInterval, workerResyncIntervalJitterFactor)) + default: + // Error occurred during the sync; back off and then retry. + p.workQueue.Enqueue(uid, wait.Jitter(p.backOffPeriod, workerBackOffPeriodJitterFactor)) + } + p.checkForUpdates(uid) +} + +func (p *podWorkers) checkForUpdates(uid types.UID) { + p.podLock.Lock() + defer p.podLock.Unlock() + if workUpdate, exists := p.lastUndeliveredWorkUpdate[uid]; exists { + p.podUpdates[uid] <- workUpdate + delete(p.lastUndeliveredWorkUpdate, uid) + } else { + p.isWorking[uid] = false + } +} + +// killPodNow returns a KillPodFunc that can be used to kill a pod. +// It is intended to be injected into other modules that need to kill a pod. +func killPodNow(podWorkers PodWorkers, recorder record.EventRecorder) eviction.KillPodFunc { + return func(pod *v1.Pod, status v1.PodStatus, gracePeriodOverride *int64) error { + // determine the grace period to use when killing the pod + gracePeriod := int64(0) + if gracePeriodOverride != nil { + gracePeriod = *gracePeriodOverride + } else if pod.Spec.TerminationGracePeriodSeconds != nil { + gracePeriod = *pod.Spec.TerminationGracePeriodSeconds + } + + // we timeout and return an error if we don't get a callback within a reasonable time. + // the default timeout is relative to the grace period (we settle on 10s to wait for kubelet->runtime traffic to complete in sigkill) + timeout := int64(gracePeriod + (gracePeriod / 2)) + minTimeout := int64(10) + if timeout < minTimeout { + timeout = minTimeout + } + timeoutDuration := time.Duration(timeout) * time.Second + + // open a channel we block against until we get a result + type response struct { + err error + } + ch := make(chan response) + podWorkers.UpdatePod(&UpdatePodOptions{ + Pod: pod, + UpdateType: kubetypes.SyncPodKill, + OnCompleteFunc: func(err error) { + ch <- response{err: err} + }, + KillPodOptions: &KillPodOptions{ + PodStatusFunc: func(p *v1.Pod, podStatus *kubecontainer.PodStatus) v1.PodStatus { + return status + }, + PodTerminationGracePeriodSecondsOverride: gracePeriodOverride, + }, + }) + + // wait for either a response, or a timeout + select { + case r := <-ch: + return r.err + case <-time.After(timeoutDuration): + recorder.Eventf(pod, v1.EventTypeWarning, events.ExceededGracePeriod, "Container runtime did not kill the pod within specified grace period.") + return fmt.Errorf("timeout waiting to kill pod") + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pod_workers_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/pod_workers_test.go new file mode 100644 index 000000000..a3b073b77 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pod_workers_test.go @@ -0,0 +1,355 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "reflect" + "sync" + "testing" + "time" + + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/clock" + "k8s.io/client-go/tools/record" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + containertest "k8s.io/kubernetes/pkg/kubelet/container/testing" + kubetypes "k8s.io/kubernetes/pkg/kubelet/types" + "k8s.io/kubernetes/pkg/kubelet/util/queue" +) + +// fakePodWorkers runs sync pod function in serial, so we can have +// deterministic behaviour in testing. +type fakePodWorkers struct { + syncPodFn syncPodFnType + cache kubecontainer.Cache + t TestingInterface +} + +func (f *fakePodWorkers) UpdatePod(options *UpdatePodOptions) { + status, err := f.cache.Get(options.Pod.UID) + if err != nil { + f.t.Errorf("Unexpected error: %v", err) + } + if err := f.syncPodFn(syncPodOptions{ + mirrorPod: options.MirrorPod, + pod: options.Pod, + podStatus: status, + updateType: options.UpdateType, + killPodOptions: options.KillPodOptions, + }); err != nil { + f.t.Errorf("Unexpected error: %v", err) + } +} + +func (f *fakePodWorkers) ForgetNonExistingPodWorkers(desiredPods map[types.UID]empty) {} + +func (f *fakePodWorkers) ForgetWorker(uid types.UID) {} + +type TestingInterface interface { + Errorf(format string, args ...interface{}) +} + +func newPod(uid, name string) *v1.Pod { + return &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + UID: types.UID(uid), + Name: name, + }, + } +} + +// syncPodRecord is a record of a sync pod call +type syncPodRecord struct { + name string + updateType kubetypes.SyncPodType +} + +func createPodWorkers() (*podWorkers, map[types.UID][]syncPodRecord) { + lock := sync.Mutex{} + processed := make(map[types.UID][]syncPodRecord) + fakeRecorder := &record.FakeRecorder{} + fakeRuntime := &containertest.FakeRuntime{} + fakeCache := containertest.NewFakeCache(fakeRuntime) + podWorkers := newPodWorkers( + func(options syncPodOptions) error { + func() { + lock.Lock() + defer lock.Unlock() + pod := options.pod + processed[pod.UID] = append(processed[pod.UID], syncPodRecord{ + name: pod.Name, + updateType: options.updateType, + }) + }() + return nil + }, + fakeRecorder, + queue.NewBasicWorkQueue(&clock.RealClock{}), + time.Second, + time.Second, + fakeCache, + ) + return podWorkers, processed +} + +func drainWorkers(podWorkers *podWorkers, numPods int) { + for { + stillWorking := false + podWorkers.podLock.Lock() + for i := 0; i < numPods; i++ { + if podWorkers.isWorking[types.UID(string(i))] { + stillWorking = true + } + } + podWorkers.podLock.Unlock() + if !stillWorking { + break + } + time.Sleep(50 * time.Millisecond) + } +} + +func TestUpdatePod(t *testing.T) { + podWorkers, processed := createPodWorkers() + + // Check whether all pod updates will be processed. + numPods := 20 + for i := 0; i < numPods; i++ { + for j := i; j < numPods; j++ { + podWorkers.UpdatePod(&UpdatePodOptions{ + Pod: newPod(string(j), string(i)), + UpdateType: kubetypes.SyncPodCreate, + }) + } + } + drainWorkers(podWorkers, numPods) + + if len(processed) != numPods { + t.Errorf("Not all pods processed: %v", len(processed)) + return + } + for i := 0; i < numPods; i++ { + uid := types.UID(i) + if len(processed[uid]) < 1 || len(processed[uid]) > i+1 { + t.Errorf("Pod %v processed %v times", i, len(processed[uid])) + continue + } + + first := 0 + last := len(processed[uid]) - 1 + if processed[uid][first].name != string(0) { + t.Errorf("Pod %v: incorrect order %v, %v", i, first, processed[uid][first]) + + } + if processed[uid][last].name != string(i) { + t.Errorf("Pod %v: incorrect order %v, %v", i, last, processed[uid][last]) + } + } +} + +func TestUpdatePodDoesNotForgetSyncPodKill(t *testing.T) { + podWorkers, processed := createPodWorkers() + numPods := 20 + for i := 0; i < numPods; i++ { + pod := newPod(string(i), string(i)) + podWorkers.UpdatePod(&UpdatePodOptions{ + Pod: pod, + UpdateType: kubetypes.SyncPodCreate, + }) + podWorkers.UpdatePod(&UpdatePodOptions{ + Pod: pod, + UpdateType: kubetypes.SyncPodKill, + }) + podWorkers.UpdatePod(&UpdatePodOptions{ + Pod: pod, + UpdateType: kubetypes.SyncPodUpdate, + }) + } + drainWorkers(podWorkers, numPods) + if len(processed) != numPods { + t.Errorf("Not all pods processed: %v", len(processed)) + return + } + for i := 0; i < numPods; i++ { + uid := types.UID(i) + // each pod should be processed two times (create, kill, but not update) + syncPodRecords := processed[uid] + if len(syncPodRecords) < 2 { + t.Errorf("Pod %v processed %v times, but expected at least 2", i, len(syncPodRecords)) + continue + } + if syncPodRecords[0].updateType != kubetypes.SyncPodCreate { + t.Errorf("Pod %v event was %v, but expected %v", i, syncPodRecords[0].updateType, kubetypes.SyncPodCreate) + } + if syncPodRecords[1].updateType != kubetypes.SyncPodKill { + t.Errorf("Pod %v event was %v, but expected %v", i, syncPodRecords[1].updateType, kubetypes.SyncPodKill) + } + } +} + +func TestForgetNonExistingPodWorkers(t *testing.T) { + podWorkers, _ := createPodWorkers() + + numPods := 20 + for i := 0; i < numPods; i++ { + podWorkers.UpdatePod(&UpdatePodOptions{ + Pod: newPod(string(i), "name"), + UpdateType: kubetypes.SyncPodUpdate, + }) + } + drainWorkers(podWorkers, numPods) + + if len(podWorkers.podUpdates) != numPods { + t.Errorf("Incorrect number of open channels %v", len(podWorkers.podUpdates)) + } + + desiredPods := map[types.UID]empty{} + desiredPods[types.UID(2)] = empty{} + desiredPods[types.UID(14)] = empty{} + podWorkers.ForgetNonExistingPodWorkers(desiredPods) + if len(podWorkers.podUpdates) != 2 { + t.Errorf("Incorrect number of open channels %v", len(podWorkers.podUpdates)) + } + if _, exists := podWorkers.podUpdates[types.UID(2)]; !exists { + t.Errorf("No updates channel for pod 2") + } + if _, exists := podWorkers.podUpdates[types.UID(14)]; !exists { + t.Errorf("No updates channel for pod 14") + } + + podWorkers.ForgetNonExistingPodWorkers(map[types.UID]empty{}) + if len(podWorkers.podUpdates) != 0 { + t.Errorf("Incorrect number of open channels %v", len(podWorkers.podUpdates)) + } +} + +type simpleFakeKubelet struct { + pod *v1.Pod + mirrorPod *v1.Pod + podStatus *kubecontainer.PodStatus + wg sync.WaitGroup +} + +func (kl *simpleFakeKubelet) syncPod(options syncPodOptions) error { + kl.pod, kl.mirrorPod, kl.podStatus = options.pod, options.mirrorPod, options.podStatus + return nil +} + +func (kl *simpleFakeKubelet) syncPodWithWaitGroup(options syncPodOptions) error { + kl.pod, kl.mirrorPod, kl.podStatus = options.pod, options.mirrorPod, options.podStatus + kl.wg.Done() + return nil +} + +// byContainerName sort the containers in a running pod by their names. +type byContainerName kubecontainer.Pod + +func (b byContainerName) Len() int { return len(b.Containers) } + +func (b byContainerName) Swap(i, j int) { + b.Containers[i], b.Containers[j] = b.Containers[j], b.Containers[i] +} + +func (b byContainerName) Less(i, j int) bool { + return b.Containers[i].Name < b.Containers[j].Name +} + +// TestFakePodWorkers verifies that the fakePodWorkers behaves the same way as the real podWorkers +// for their invocation of the syncPodFn. +func TestFakePodWorkers(t *testing.T) { + fakeRecorder := &record.FakeRecorder{} + fakeRuntime := &containertest.FakeRuntime{} + fakeCache := containertest.NewFakeCache(fakeRuntime) + + kubeletForRealWorkers := &simpleFakeKubelet{} + kubeletForFakeWorkers := &simpleFakeKubelet{} + + realPodWorkers := newPodWorkers(kubeletForRealWorkers.syncPodWithWaitGroup, fakeRecorder, queue.NewBasicWorkQueue(&clock.RealClock{}), time.Second, time.Second, fakeCache) + fakePodWorkers := &fakePodWorkers{kubeletForFakeWorkers.syncPod, fakeCache, t} + + tests := []struct { + pod *v1.Pod + mirrorPod *v1.Pod + }{ + { + &v1.Pod{}, + &v1.Pod{}, + }, + { + podWithUIDNameNs("12345678", "foo", "new"), + podWithUIDNameNs("12345678", "fooMirror", "new"), + }, + { + podWithUIDNameNs("98765", "bar", "new"), + podWithUIDNameNs("98765", "barMirror", "new"), + }, + } + + for i, tt := range tests { + kubeletForRealWorkers.wg.Add(1) + realPodWorkers.UpdatePod(&UpdatePodOptions{ + Pod: tt.pod, + MirrorPod: tt.mirrorPod, + UpdateType: kubetypes.SyncPodUpdate, + }) + fakePodWorkers.UpdatePod(&UpdatePodOptions{ + Pod: tt.pod, + MirrorPod: tt.mirrorPod, + UpdateType: kubetypes.SyncPodUpdate, + }) + + kubeletForRealWorkers.wg.Wait() + + if !reflect.DeepEqual(kubeletForRealWorkers.pod, kubeletForFakeWorkers.pod) { + t.Errorf("%d: Expected: %#v, Actual: %#v", i, kubeletForRealWorkers.pod, kubeletForFakeWorkers.pod) + } + + if !reflect.DeepEqual(kubeletForRealWorkers.mirrorPod, kubeletForFakeWorkers.mirrorPod) { + t.Errorf("%d: Expected: %#v, Actual: %#v", i, kubeletForRealWorkers.mirrorPod, kubeletForFakeWorkers.mirrorPod) + } + + if !reflect.DeepEqual(kubeletForRealWorkers.podStatus, kubeletForFakeWorkers.podStatus) { + t.Errorf("%d: Expected: %#v, Actual: %#v", i, kubeletForRealWorkers.podStatus, kubeletForFakeWorkers.podStatus) + } + } +} + +// TestKillPodNowFunc tests the blocking kill pod function works with pod workers as expected. +func TestKillPodNowFunc(t *testing.T) { + fakeRecorder := &record.FakeRecorder{} + podWorkers, processed := createPodWorkers() + killPodFunc := killPodNow(podWorkers, fakeRecorder) + pod := newPod("test", "test") + gracePeriodOverride := int64(0) + err := killPodFunc(pod, v1.PodStatus{Phase: v1.PodFailed, Reason: "reason", Message: "message"}, &gracePeriodOverride) + if err != nil { + t.Errorf("Unexpected error: %v", err) + } + if len(processed) != 1 { + t.Errorf("len(processed) expected: %v, actual: %v", 1, len(processed)) + return + } + syncPodRecords := processed[pod.UID] + if len(syncPodRecords) != 1 { + t.Errorf("Pod processed %v times, but expected %v", len(syncPodRecords), 1) + } + if syncPodRecords[0].updateType != kubetypes.SyncPodKill { + t.Errorf("Pod update type was %v, but expected %v", syncPodRecords[0].updateType, kubetypes.SyncPodKill) + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/reason_cache.go b/vendor/k8s.io/kubernetes/pkg/kubelet/reason_cache.go new file mode 100644 index 000000000..4c42ab8a7 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/reason_cache.go @@ -0,0 +1,105 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "fmt" + "sync" + + "github.com/golang/groupcache/lru" + "k8s.io/apimachinery/pkg/types" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" +) + +// ReasonCache stores the failure reason of the latest container start +// in a string, keyed by <pod_UID>_<container_name>. The goal is to +// propagate this reason to the container status. This endeavor is +// "best-effort" for two reasons: +// 1. The cache is not persisted. +// 2. We use an LRU cache to avoid extra garbage collection work. This +// means that some entries may be recycled before a pod has been +// deleted. +// TODO(random-liu): Use more reliable cache which could collect garbage of failed pod. +// TODO(random-liu): Move reason cache to somewhere better. +type ReasonCache struct { + lock sync.Mutex + cache *lru.Cache +} + +// Reason is the cached item in ReasonCache +type reasonItem struct { + Err error + Message string +} + +// maxReasonCacheEntries is the cache entry number in lru cache. 1000 is a proper number +// for our 100 pods per node target. If we support more pods per node in the future, we +// may want to increase the number. +const maxReasonCacheEntries = 1000 + +// NewReasonCache creates an instance of 'ReasonCache'. +func NewReasonCache() *ReasonCache { + return &ReasonCache{cache: lru.New(maxReasonCacheEntries)} +} + +func (c *ReasonCache) composeKey(uid types.UID, name string) string { + return fmt.Sprintf("%s_%s", uid, name) +} + +// add adds error reason into the cache +func (c *ReasonCache) add(uid types.UID, name string, reason error, message string) { + c.lock.Lock() + defer c.lock.Unlock() + c.cache.Add(c.composeKey(uid, name), reasonItem{reason, message}) +} + +// Update updates the reason cache with the SyncPodResult. Only SyncResult with +// StartContainer action will change the cache. +func (c *ReasonCache) Update(uid types.UID, result kubecontainer.PodSyncResult) { + for _, r := range result.SyncResults { + if r.Action != kubecontainer.StartContainer { + continue + } + name := r.Target.(string) + if r.Error != nil { + c.add(uid, name, r.Error, r.Message) + } else { + c.Remove(uid, name) + } + } +} + +// Remove removes error reason from the cache +func (c *ReasonCache) Remove(uid types.UID, name string) { + c.lock.Lock() + defer c.lock.Unlock() + c.cache.Remove(c.composeKey(uid, name)) +} + +// Get gets error reason from the cache. The return values are error reason, error message and +// whether an error reason is found in the cache. If no error reason is found, empty string will +// be returned for error reason and error message. +func (c *ReasonCache) Get(uid types.UID, name string) (*reasonItem, bool) { + c.lock.Lock() + defer c.lock.Unlock() + value, ok := c.cache.Get(c.composeKey(uid, name)) + if !ok { + return nil, false + } + info := value.(reasonItem) + return &info, true +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/reason_cache_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/reason_cache_test.go new file mode 100644 index 000000000..53f2b70b7 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/reason_cache_test.go @@ -0,0 +1,69 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "testing" + + "k8s.io/apimachinery/pkg/types" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" +) + +func TestReasonCache(t *testing.T) { + // Create test sync result + syncResult := kubecontainer.PodSyncResult{} + results := []*kubecontainer.SyncResult{ + // reason cache should be set for SyncResult with StartContainer action and error + kubecontainer.NewSyncResult(kubecontainer.StartContainer, "container_1"), + // reason cache should not be set for SyncResult with StartContainer action but without error + kubecontainer.NewSyncResult(kubecontainer.StartContainer, "container_2"), + // reason cache should not be set for SyncResult with other actions + kubecontainer.NewSyncResult(kubecontainer.KillContainer, "container_3"), + } + results[0].Fail(kubecontainer.ErrRunContainer, "message_1") + results[2].Fail(kubecontainer.ErrKillContainer, "message_3") + syncResult.AddSyncResult(results...) + uid := types.UID("pod_1") + + reasonCache := NewReasonCache() + reasonCache.Update(uid, syncResult) + assertReasonInfo(t, reasonCache, uid, results[0], true) + assertReasonInfo(t, reasonCache, uid, results[1], false) + assertReasonInfo(t, reasonCache, uid, results[2], false) + + reasonCache.Remove(uid, results[0].Target.(string)) + assertReasonInfo(t, reasonCache, uid, results[0], false) +} + +func assertReasonInfo(t *testing.T, cache *ReasonCache, uid types.UID, result *kubecontainer.SyncResult, found bool) { + name := result.Target.(string) + actualReason, ok := cache.Get(uid, name) + if ok && !found { + t.Fatalf("unexpected cache hit: %v, %q", actualReason.Err, actualReason.Message) + } + if !ok && found { + t.Fatalf("corresponding reason info not found") + } + if !found { + return + } + reason := result.Error + message := result.Message + if actualReason.Err != reason || actualReason.Message != message { + t.Errorf("expected %v %q, got %v %q", reason, message, actualReason.Err, actualReason.Message) + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/runonce.go b/vendor/k8s.io/kubernetes/pkg/kubelet/runonce.go new file mode 100644 index 000000000..82a73d512 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/runonce.go @@ -0,0 +1,158 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "fmt" + "os" + "time" + + "github.com/golang/glog" + "k8s.io/api/core/v1" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + kubetypes "k8s.io/kubernetes/pkg/kubelet/types" + "k8s.io/kubernetes/pkg/kubelet/util/format" +) + +const ( + runOnceManifestDelay = 1 * time.Second + runOnceMaxRetries = 10 + runOnceRetryDelay = 1 * time.Second + runOnceRetryDelayBackoff = 2 +) + +// RunPodResult defines the running results of a Pod. +type RunPodResult struct { + Pod *v1.Pod + Err error +} + +// RunOnce polls from one configuration update and run the associated pods. +func (kl *Kubelet) RunOnce(updates <-chan kubetypes.PodUpdate) ([]RunPodResult, error) { + // Setup filesystem directories. + if err := kl.setupDataDirs(); err != nil { + return nil, err + } + + // If the container logs directory does not exist, create it. + if _, err := os.Stat(ContainerLogsDir); err != nil { + if err := kl.os.MkdirAll(ContainerLogsDir, 0755); err != nil { + glog.Errorf("Failed to create directory %q: %v", ContainerLogsDir, err) + } + } + + select { + case u := <-updates: + glog.Infof("processing manifest with %d pods", len(u.Pods)) + result, err := kl.runOnce(u.Pods, runOnceRetryDelay) + glog.Infof("finished processing %d pods", len(u.Pods)) + return result, err + case <-time.After(runOnceManifestDelay): + return nil, fmt.Errorf("no pod manifest update after %v", runOnceManifestDelay) + } +} + +// runOnce runs a given set of pods and returns their status. +func (kl *Kubelet) runOnce(pods []*v1.Pod, retryDelay time.Duration) (results []RunPodResult, err error) { + ch := make(chan RunPodResult) + admitted := []*v1.Pod{} + for _, pod := range pods { + // Check if we can admit the pod. + if ok, reason, message := kl.canAdmitPod(admitted, pod); !ok { + kl.rejectPod(pod, reason, message) + results = append(results, RunPodResult{pod, nil}) + continue + } + + admitted = append(admitted, pod) + go func(pod *v1.Pod) { + err := kl.runPod(pod, retryDelay) + ch <- RunPodResult{pod, err} + }(pod) + } + + glog.Infof("Waiting for %d pods", len(admitted)) + failedPods := []string{} + for i := 0; i < len(admitted); i++ { + res := <-ch + results = append(results, res) + if res.Err != nil { + // TODO(proppy): report which containers failed the pod. + glog.Infof("failed to start pod %q: %v", format.Pod(res.Pod), res.Err) + failedPods = append(failedPods, format.Pod(res.Pod)) + } else { + glog.Infof("started pod %q", format.Pod(res.Pod)) + } + } + if len(failedPods) > 0 { + return results, fmt.Errorf("error running pods: %v", failedPods) + } + glog.Infof("%d pods started", len(pods)) + return results, err +} + +// runPod runs a single pod and wait until all containers are running. +func (kl *Kubelet) runPod(pod *v1.Pod, retryDelay time.Duration) error { + delay := retryDelay + retry := 0 + for { + status, err := kl.containerRuntime.GetPodStatus(pod.UID, pod.Name, pod.Namespace) + if err != nil { + return fmt.Errorf("Unable to get status for pod %q: %v", format.Pod(pod), err) + } + + if kl.isPodRunning(pod, status) { + glog.Infof("pod %q containers running", format.Pod(pod)) + return nil + } + glog.Infof("pod %q containers not running: syncing", format.Pod(pod)) + + glog.Infof("Creating a mirror pod for static pod %q", format.Pod(pod)) + if err := kl.podManager.CreateMirrorPod(pod); err != nil { + glog.Errorf("Failed creating a mirror pod %q: %v", format.Pod(pod), err) + } + mirrorPod, _ := kl.podManager.GetMirrorPodByPod(pod) + if err = kl.syncPod(syncPodOptions{ + pod: pod, + mirrorPod: mirrorPod, + podStatus: status, + updateType: kubetypes.SyncPodUpdate, + }); err != nil { + return fmt.Errorf("error syncing pod %q: %v", format.Pod(pod), err) + } + if retry >= runOnceMaxRetries { + return fmt.Errorf("timeout error: pod %q containers not running after %d retries", format.Pod(pod), runOnceMaxRetries) + } + // TODO(proppy): health checking would be better than waiting + checking the state at the next iteration. + glog.Infof("pod %q containers synced, waiting for %v", format.Pod(pod), delay) + time.Sleep(delay) + retry++ + delay *= runOnceRetryDelayBackoff + } +} + +// isPodRunning returns true if all containers of a manifest are running. +func (kl *Kubelet) isPodRunning(pod *v1.Pod, status *kubecontainer.PodStatus) bool { + for _, c := range pod.Spec.Containers { + cs := status.FindContainerStatusByName(c.Name) + if cs == nil || cs.State != kubecontainer.ContainerStateRunning { + glog.Infof("Container %q for pod %q not running", c.Name, format.Pod(pod)) + return false + } + } + return true +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/runonce_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/runonce_test.go new file mode 100644 index 000000000..c9f01a744 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/runonce_test.go @@ -0,0 +1,175 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "os" + "testing" + "time" + + cadvisorapi "github.com/google/cadvisor/info/v1" + cadvisorapiv2 "github.com/google/cadvisor/info/v2" + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/clock" + "k8s.io/client-go/kubernetes/fake" + "k8s.io/client-go/tools/record" + utiltesting "k8s.io/client-go/util/testing" + "k8s.io/kubernetes/pkg/kubelet/apis/kubeletconfig" + cadvisortest "k8s.io/kubernetes/pkg/kubelet/cadvisor/testing" + "k8s.io/kubernetes/pkg/kubelet/cm" + "k8s.io/kubernetes/pkg/kubelet/configmap" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + containertest "k8s.io/kubernetes/pkg/kubelet/container/testing" + "k8s.io/kubernetes/pkg/kubelet/eviction" + "k8s.io/kubernetes/pkg/kubelet/network" + nettest "k8s.io/kubernetes/pkg/kubelet/network/testing" + kubepod "k8s.io/kubernetes/pkg/kubelet/pod" + podtest "k8s.io/kubernetes/pkg/kubelet/pod/testing" + "k8s.io/kubernetes/pkg/kubelet/secret" + "k8s.io/kubernetes/pkg/kubelet/server/stats" + "k8s.io/kubernetes/pkg/kubelet/status" + statustest "k8s.io/kubernetes/pkg/kubelet/status/testing" + "k8s.io/kubernetes/pkg/kubelet/volumemanager" + "k8s.io/kubernetes/pkg/util/mount" + "k8s.io/kubernetes/pkg/volume" + volumetest "k8s.io/kubernetes/pkg/volume/testing" +) + +func TestRunOnce(t *testing.T) { + cadvisor := &cadvisortest.Mock{} + cadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil) + cadvisor.On("ImagesFsInfo").Return(cadvisorapiv2.FsInfo{ + Usage: 400, + Capacity: 1000, + Available: 600, + }, nil) + cadvisor.On("RootFsInfo").Return(cadvisorapiv2.FsInfo{ + Usage: 9, + Capacity: 10, + }, nil) + fakeSecretManager := secret.NewFakeManager() + fakeConfigMapManager := configmap.NewFakeManager() + podManager := kubepod.NewBasicPodManager( + podtest.NewFakeMirrorClient(), fakeSecretManager, fakeConfigMapManager) + fakeRuntime := &containertest.FakeRuntime{} + basePath, err := utiltesting.MkTmpdir("kubelet") + if err != nil { + t.Fatalf("can't make a temp rootdir %v", err) + } + defer os.RemoveAll(basePath) + kb := &Kubelet{ + rootDirectory: basePath, + recorder: &record.FakeRecorder{}, + cadvisor: cadvisor, + nodeInfo: testNodeInfo{}, + statusManager: status.NewManager(nil, podManager, &statustest.FakePodDeletionSafetyProvider{}), + podManager: podManager, + os: &containertest.FakeOS{}, + containerRuntime: fakeRuntime, + reasonCache: NewReasonCache(), + clock: clock.RealClock{}, + kubeClient: &fake.Clientset{}, + hostname: testKubeletHostname, + nodeName: testKubeletHostname, + runtimeState: newRuntimeState(time.Second), + } + kb.containerManager = cm.NewStubContainerManager() + + plug := &volumetest.FakeVolumePlugin{PluginName: "fake", Host: nil} + kb.volumePluginMgr, err = + NewInitializedVolumePluginMgr(kb, fakeSecretManager, fakeConfigMapManager, []volume.VolumePlugin{plug}, nil /* prober */) + if err != nil { + t.Fatalf("failed to initialize VolumePluginMgr: %v", err) + } + kb.volumeManager = volumemanager.NewVolumeManager( + true, + kb.nodeName, + kb.podManager, + kb.statusManager, + kb.kubeClient, + kb.volumePluginMgr, + fakeRuntime, + kb.mounter, + kb.getPodsDir(), + kb.recorder, + false, /* experimentalCheckNodeCapabilitiesBeforeMount */ + false /* keepTerminatedPodVolumes */) + + kb.networkPlugin, _ = network.InitNetworkPlugin([]network.NetworkPlugin{}, "", nettest.NewFakeHost(nil), kubeletconfig.HairpinNone, "", network.UseDefaultMTU) + // TODO: Factor out "StatsProvider" from Kubelet so we don't have a cyclic dependency + volumeStatsAggPeriod := time.Second * 10 + kb.resourceAnalyzer = stats.NewResourceAnalyzer(kb, volumeStatsAggPeriod) + nodeRef := &v1.ObjectReference{ + Kind: "Node", + Name: string(kb.nodeName), + UID: types.UID(kb.nodeName), + Namespace: "", + } + fakeKillPodFunc := func(pod *v1.Pod, podStatus v1.PodStatus, gracePeriodOverride *int64) error { + return nil + } + evictionManager, evictionAdmitHandler := eviction.NewManager(kb.resourceAnalyzer, eviction.Config{}, fakeKillPodFunc, nil, nil, kb.recorder, nodeRef, kb.clock) + + kb.evictionManager = evictionManager + kb.admitHandlers.AddPodAdmitHandler(evictionAdmitHandler) + kb.mounter = &mount.FakeMounter{} + if err := kb.setupDataDirs(); err != nil { + t.Errorf("Failed to init data dirs: %v", err) + } + + pods := []*v1.Pod{ + { + ObjectMeta: metav1.ObjectMeta{ + UID: "12345678", + Name: "foo", + Namespace: "new", + }, + Spec: v1.PodSpec{ + Containers: []v1.Container{ + {Name: "bar"}, + }, + }, + }, + } + podManager.SetPods(pods) + // The original test here is totally meaningless, because fakeruntime will always return an empty podStatus. While + // the original logic of isPodRunning happens to return true when podstatus is empty, so the test can always pass. + // Now the logic in isPodRunning is changed, to let the test pass, we set the podstatus directly in fake runtime. + // This is also a meaningless test, because the isPodRunning will also always return true after setting this. However, + // because runonce is never used in kubernetes now, we should deprioritize the cleanup work. + // TODO(random-liu) Fix the test, make it meaningful. + fakeRuntime.PodStatus = kubecontainer.PodStatus{ + ContainerStatuses: []*kubecontainer.ContainerStatus{ + { + Name: "bar", + State: kubecontainer.ContainerStateRunning, + }, + }, + } + results, err := kb.runOnce(pods, time.Millisecond) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if results[0].Err != nil { + t.Errorf("unexpected run pod error: %v", results[0].Err) + } + if results[0].Pod.Name != "foo" { + t.Errorf("unexpected pod: %q", results[0].Pod.Name) + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/runtime.go b/vendor/k8s.io/kubernetes/pkg/kubelet/runtime.go new file mode 100644 index 000000000..445b4cf4e --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/runtime.go @@ -0,0 +1,128 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "fmt" + "sync" + "time" +) + +type runtimeState struct { + sync.RWMutex + lastBaseRuntimeSync time.Time + baseRuntimeSyncThreshold time.Duration + networkError error + internalError error + cidr string + initError error + healthChecks []*healthCheck +} + +// A health check function should be efficient and not rely on external +// components (e.g., container runtime). +type healthCheckFnType func() (bool, error) + +type healthCheck struct { + name string + fn healthCheckFnType +} + +func (s *runtimeState) addHealthCheck(name string, f healthCheckFnType) { + s.Lock() + defer s.Unlock() + s.healthChecks = append(s.healthChecks, &healthCheck{name: name, fn: f}) +} + +func (s *runtimeState) setRuntimeSync(t time.Time) { + s.Lock() + defer s.Unlock() + s.lastBaseRuntimeSync = t +} + +func (s *runtimeState) setInternalError(err error) { + s.Lock() + defer s.Unlock() + s.internalError = err +} + +func (s *runtimeState) setNetworkState(err error) { + s.Lock() + defer s.Unlock() + s.networkError = err +} + +func (s *runtimeState) setPodCIDR(cidr string) { + s.Lock() + defer s.Unlock() + s.cidr = cidr +} + +func (s *runtimeState) podCIDR() string { + s.RLock() + defer s.RUnlock() + return s.cidr +} + +func (s *runtimeState) setInitError(err error) { + s.Lock() + defer s.Unlock() + s.initError = err +} + +func (s *runtimeState) runtimeErrors() []string { + s.RLock() + defer s.RUnlock() + var ret []string + if s.initError != nil { + ret = append(ret, s.initError.Error()) + } + if !s.lastBaseRuntimeSync.Add(s.baseRuntimeSyncThreshold).After(time.Now()) { + ret = append(ret, "container runtime is down") + } + if s.internalError != nil { + ret = append(ret, s.internalError.Error()) + } + for _, hc := range s.healthChecks { + if ok, err := hc.fn(); !ok { + ret = append(ret, fmt.Sprintf("%s is not healthy: %v", hc.name, err)) + } + } + + return ret +} + +func (s *runtimeState) networkErrors() []string { + s.RLock() + defer s.RUnlock() + var ret []string + if s.networkError != nil { + ret = append(ret, s.networkError.Error()) + } + return ret +} + +func newRuntimeState( + runtimeSyncThreshold time.Duration, +) *runtimeState { + return &runtimeState{ + lastBaseRuntimeSync: time.Time{}, + baseRuntimeSyncThreshold: runtimeSyncThreshold, + networkError: fmt.Errorf("network state unknown"), + internalError: nil, + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/types/doc.go b/vendor/k8s.io/kubernetes/pkg/kubelet/types/doc.go index 0d9efe50f..88e345636 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/types/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/types/doc.go @@ -15,4 +15,4 @@ limitations under the License. */ // Common types in the Kubelet. -package types +package types // import "k8s.io/kubernetes/pkg/kubelet/types" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/types/labels_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/types/labels_test.go new file mode 100644 index 000000000..8c17caaa5 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/types/labels_test.go @@ -0,0 +1,119 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package types + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestGetContainerName(t *testing.T) { + var cases = []struct { + labels map[string]string + containerName string + }{ + { + labels: map[string]string{ + "io.kubernetes.container.name": "c1", + }, + containerName: "c1", + }, + { + labels: map[string]string{ + "io.kubernetes.container.name": "c2", + }, + containerName: "c2", + }, + } + for _, data := range cases { + containerName := GetContainerName(data.labels) + assert.Equal(t, data.containerName, containerName) + } +} + +func TestGetPodName(t *testing.T) { + var cases = []struct { + labels map[string]string + podName string + }{ + { + labels: map[string]string{ + "io.kubernetes.pod.name": "p1", + }, + podName: "p1", + }, + { + labels: map[string]string{ + "io.kubernetes.pod.name": "p2", + }, + podName: "p2", + }, + } + for _, data := range cases { + podName := GetPodName(data.labels) + assert.Equal(t, data.podName, podName) + } +} + +func TestGetPodUID(t *testing.T) { + var cases = []struct { + labels map[string]string + podUID string + }{ + { + labels: map[string]string{ + "io.kubernetes.pod.uid": "uid1", + }, + podUID: "uid1", + }, + { + labels: map[string]string{ + "io.kubernetes.pod.uid": "uid2", + }, + podUID: "uid2", + }, + } + for _, data := range cases { + podUID := GetPodUID(data.labels) + assert.Equal(t, data.podUID, podUID) + } +} + +func TestGetPodNamespace(t *testing.T) { + var cases = []struct { + labels map[string]string + podNamespace string + }{ + { + labels: map[string]string{ + "io.kubernetes.pod.namespace": "ns1", + }, + podNamespace: "ns1", + }, + { + labels: map[string]string{ + "io.kubernetes.pod.namespace": "ns2", + }, + podNamespace: "ns2", + }, + } + for _, data := range cases { + podNamespace := GetPodNamespace(data.labels) + assert.Equal(t, data.podNamespace, podNamespace) + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/types/pod_update_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/types/pod_update_test.go new file mode 100644 index 000000000..46d27829f --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/types/pod_update_test.go @@ -0,0 +1,178 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package types + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +func TestGetValidatedSources(t *testing.T) { + // Empty. + sources, err := GetValidatedSources([]string{""}) + require.NoError(t, err) + require.Len(t, sources, 0) + + // Success. + sources, err = GetValidatedSources([]string{FileSource, ApiserverSource}) + require.NoError(t, err) + require.Len(t, sources, 2) + + // All. + sources, err = GetValidatedSources([]string{AllSource}) + require.NoError(t, err) + require.Len(t, sources, 3) + + // Unknown source. + sources, err = GetValidatedSources([]string{"taco"}) + require.Error(t, err) +} + +func TestGetPodSource(t *testing.T) { + cases := []struct { + pod v1.Pod + expected string + errExpected bool + }{ + { + pod: v1.Pod{}, + expected: "", + errExpected: true, + }, + { + pod: v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + "kubernetes.io/config.source": "host-ipc-sources", + }, + }, + }, + expected: "host-ipc-sources", + errExpected: false, + }, + } + for i, data := range cases { + source, err := GetPodSource(&data.pod) + if data.errExpected { + assert.Error(t, err) + } else { + assert.NoError(t, err) + } + assert.Equal(t, data.expected, source, "test[%d]", i) + t.Logf("Test case [%d]", i) + } +} + +func TestString(t *testing.T) { + cases := []struct { + sp SyncPodType + expected string + }{ + { + sp: SyncPodCreate, + expected: "create", + }, + { + sp: SyncPodUpdate, + expected: "update", + }, + { + sp: SyncPodSync, + expected: "sync", + }, + { + sp: SyncPodKill, + expected: "kill", + }, + { + sp: 50, + expected: "unknown", + }, + } + for i, data := range cases { + syncPodString := data.sp.String() + assert.Equal(t, data.expected, syncPodString, "test[%d]", i) + t.Logf("Test case [%d]", i) + } +} + +func TestIsCriticalPod(t *testing.T) { + cases := []struct { + pod v1.Pod + expected bool + }{ + { + pod: v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "pod1", + Namespace: "ns", + Annotations: map[string]string{ + "scheduler.alpha.kubernetes.io/critical-pod": "", + }, + }, + }, + expected: false, + }, + { + pod: v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "pod2", + Namespace: "ns", + Annotations: map[string]string{ + "scheduler.alpha.kubernetes.io/critical-pod": "abc", + }, + }, + }, + expected: false, + }, + { + pod: v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "pod3", + Namespace: "kube-system", + Annotations: map[string]string{ + "scheduler.alpha.kubernetes.io/critical-pod": "abc", + }, + }, + }, + expected: false, + }, + { + pod: v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "pod3", + Namespace: "kube-system", + Annotations: map[string]string{ + "scheduler.alpha.kubernetes.io/critical-pod": "", + }, + }, + }, + expected: true, + }, + } + for i, data := range cases { + actual := IsCriticalPod(&data.pod) + if actual != data.expected { + t.Errorf("IsCriticalPod result wrong:\nexpected: %v\nactual: %v for test[%d] with Annotations: %v", + data.expected, actual, i, data.pod.Annotations) + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/types/types_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/types/types_test.go new file mode 100644 index 000000000..179100a85 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/types/types_test.go @@ -0,0 +1,138 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package types + +import ( + "reflect" + "testing" + + "github.com/stretchr/testify/assert" + "k8s.io/api/core/v1" +) + +func TestConvertToTimestamp(t *testing.T) { + timestamp := "2017-02-17T15:34:49.830882016+08:00" + convertedTimeStamp := ConvertToTimestamp(timestamp).GetString() + assert.Equal(t, timestamp, convertedTimeStamp) +} + +func TestLen(t *testing.T) { + var cases = []struct { + statuses SortedContainerStatuses + expected int + }{ + { + statuses: SortedContainerStatuses{{Name: "first"}}, + expected: 1, + }, + { + statuses: SortedContainerStatuses{{Name: "first"}, {Name: "second"}}, + expected: 2, + }, + } + for _, data := range cases { + assert.Equal(t, data.expected, data.statuses.Len()) + } +} + +func TestSwap(t *testing.T) { + var cases = []struct { + statuses SortedContainerStatuses + expected SortedContainerStatuses + }{ + { + statuses: SortedContainerStatuses{{Name: "first"}, {Name: "second"}}, + expected: SortedContainerStatuses{{Name: "second"}, {Name: "first"}}, + }, + } + for _, data := range cases { + data.statuses.Swap(0, 1) + if !reflect.DeepEqual(data.statuses, data.expected) { + t.Errorf( + "failed Swap:\n\texpected: %v\n\t actual: %v", + data.expected, + data.statuses, + ) + } + } +} + +func TestLess(t *testing.T) { + var cases = []struct { + statuses SortedContainerStatuses + expected bool + }{ + { + statuses: SortedContainerStatuses{{Name: "first"}, {Name: "second"}}, + expected: true, + }, + { + statuses: SortedContainerStatuses{{Name: "second"}, {Name: "first"}}, + expected: false, + }, + } + for _, data := range cases { + actual := data.statuses.Less(0, 1) + if actual != data.expected { + t.Errorf( + "failed Less:\n\texpected: %t\n\t actual: %t", + data.expected, + actual, + ) + } + } +} + +func TestSortInitContainerStatuses(t *testing.T) { + pod := v1.Pod{ + Spec: v1.PodSpec{}, + } + var cases = []struct { + containers []v1.Container + statuses []v1.ContainerStatus + sortedStatuses []v1.ContainerStatus + }{ + { + containers: []v1.Container{{Name: "first"}, {Name: "second"}, {Name: "third"}, {Name: "fourth"}}, + statuses: []v1.ContainerStatus{{Name: "first"}, {Name: "second"}, {Name: "third"}, {Name: "fourth"}}, + sortedStatuses: []v1.ContainerStatus{{Name: "first"}, {Name: "second"}, {Name: "third"}, {Name: "fourth"}}, + }, + { + containers: []v1.Container{{Name: "first"}, {Name: "second"}, {Name: "third"}, {Name: "fourth"}}, + statuses: []v1.ContainerStatus{{Name: "second"}, {Name: "first"}, {Name: "fourth"}, {Name: "third"}}, + sortedStatuses: []v1.ContainerStatus{{Name: "first"}, {Name: "second"}, {Name: "third"}, {Name: "fourth"}}, + }, + { + containers: []v1.Container{{Name: "first"}, {Name: "second"}, {Name: "third"}, {Name: "fourth"}}, + statuses: []v1.ContainerStatus{{Name: "fourth"}, {Name: "first"}}, + sortedStatuses: []v1.ContainerStatus{{Name: "first"}, {Name: "fourth"}}, + }, + { + containers: []v1.Container{{Name: "first"}, {Name: "second"}, {Name: "third"}, {Name: "fourth"}}, + statuses: []v1.ContainerStatus{{Name: "first"}, {Name: "third"}}, + sortedStatuses: []v1.ContainerStatus{{Name: "first"}, {Name: "third"}}, + }, + } + for _, data := range cases { + pod.Spec.InitContainers = data.containers + SortInitContainerStatuses(&pod, data.statuses) + if !reflect.DeepEqual(data.statuses, data.sortedStatuses) { + t.Errorf("SortInitContainerStatuses result wrong:\nContainers order: %v\nExpected order: %v\nReturne order: %v", + data.containers, data.sortedStatuses, data.statuses) + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util.go b/vendor/k8s.io/kubernetes/pkg/kubelet/util.go new file mode 100644 index 000000000..3047c2fa6 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util.go @@ -0,0 +1,129 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "fmt" + "os" + + "k8s.io/api/core/v1" + "k8s.io/kubernetes/pkg/capabilities" + kubetypes "k8s.io/kubernetes/pkg/kubelet/types" + "k8s.io/kubernetes/pkg/securitycontext" +) + +// Check whether we have the capabilities to run the specified pod. +func canRunPod(pod *v1.Pod) error { + if !capabilities.Get().AllowPrivileged { + for _, container := range pod.Spec.Containers { + if securitycontext.HasPrivilegedRequest(&container) { + return fmt.Errorf("pod with UID %q specified privileged container, but is disallowed", pod.UID) + } + } + for _, container := range pod.Spec.InitContainers { + if securitycontext.HasPrivilegedRequest(&container) { + return fmt.Errorf("pod with UID %q specified privileged init container, but is disallowed", pod.UID) + } + } + } + + if pod.Spec.HostNetwork { + allowed, err := allowHostNetwork(pod) + if err != nil { + return err + } + if !allowed { + return fmt.Errorf("pod with UID %q specified host networking, but is disallowed", pod.UID) + } + } + + if pod.Spec.HostPID { + allowed, err := allowHostPID(pod) + if err != nil { + return err + } + if !allowed { + return fmt.Errorf("pod with UID %q specified host PID, but is disallowed", pod.UID) + } + } + + if pod.Spec.HostIPC { + allowed, err := allowHostIPC(pod) + if err != nil { + return err + } + if !allowed { + return fmt.Errorf("pod with UID %q specified host ipc, but is disallowed", pod.UID) + } + } + + return nil +} + +// Determined whether the specified pod is allowed to use host networking +func allowHostNetwork(pod *v1.Pod) (bool, error) { + podSource, err := kubetypes.GetPodSource(pod) + if err != nil { + return false, err + } + for _, source := range capabilities.Get().PrivilegedSources.HostNetworkSources { + if source == podSource { + return true, nil + } + } + return false, nil +} + +// Determined whether the specified pod is allowed to use host PID +func allowHostPID(pod *v1.Pod) (bool, error) { + podSource, err := kubetypes.GetPodSource(pod) + if err != nil { + return false, err + } + for _, source := range capabilities.Get().PrivilegedSources.HostPIDSources { + if source == podSource { + return true, nil + } + } + return false, nil +} + +// Determined whether the specified pod is allowed to use host ipc +func allowHostIPC(pod *v1.Pod) (bool, error) { + podSource, err := kubetypes.GetPodSource(pod) + if err != nil { + return false, err + } + for _, source := range capabilities.Get().PrivilegedSources.HostIPCSources { + if source == podSource { + return true, nil + } + } + return false, nil +} + +// dirExists returns true if the path exists and represents a directory. +func dirExists(path string) bool { + s, err := os.Stat(path) + if err != nil { + return false + } + return s.IsDir() +} + +// empty is a placeholder type used to implement a set +type empty struct{} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/util/BUILD new file mode 100644 index 000000000..740d2e782 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/BUILD @@ -0,0 +1,61 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", + "go_test", +) + +go_test( + name = "go_default_test", + srcs = ["util_test.go"], + library = ":go_default_library", + deps = ["//vendor/github.com/stretchr/testify/assert:go_default_library"], +) + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "util.go", + "util_unsupported.go", + ] + select({ + "@io_bazel_rules_go//go/platform:linux_amd64": [ + "util_unix.go", + ], + "@io_bazel_rules_go//go/platform:windows_amd64": [ + "util_windows.go", + ], + "//conditions:default": [], + }), + deps = [ + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + ] + select({ + "@io_bazel_rules_go//go/platform:linux_amd64": [ + "//vendor/github.com/golang/glog:go_default_library", + "//vendor/golang.org/x/sys/unix:go_default_library", + ], + "//conditions:default": [], + }), +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [ + ":package-srcs", + "//pkg/kubelet/util/cache:all-srcs", + "//pkg/kubelet/util/csr:all-srcs", + "//pkg/kubelet/util/format:all-srcs", + "//pkg/kubelet/util/ioutils:all-srcs", + "//pkg/kubelet/util/queue:all-srcs", + "//pkg/kubelet/util/sliceutils:all-srcs", + ], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/doc.go b/vendor/k8s.io/kubernetes/pkg/kubelet/util/doc.go similarity index 77% rename from vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/doc.go rename to vendor/k8s.io/kubernetes/pkg/kubelet/util/doc.go index 25c79b9ec..ac0d4097b 100644 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,5 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package gce is an implementation of Interface, LoadBalancer -// and Instances for Google Compute Engine. -package gce +// Utility functions. +package util // import "k8s.io/kubernetes/pkg/kubelet/util" diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/service/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/util/format/BUILD similarity index 72% rename from vendor/k8s.io/kubernetes/pkg/api/v1/service/BUILD rename to vendor/k8s.io/kubernetes/pkg/kubelet/util/format/BUILD index 190e84512..a560f2cfe 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/v1/service/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/format/BUILD @@ -8,20 +8,23 @@ load( go_library( name = "go_default_library", - srcs = ["util.go"], + srcs = [ + "pod.go", + "resources.go", + ], deps = [ - "//pkg/util/net/sets:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", ], ) go_test( name = "go_default_test", - srcs = ["util_test.go"], + srcs = ["resources_test.go"], library = ":go_default_library", deps = [ - "//pkg/util/net/sets:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/format/pod.go b/vendor/k8s.io/kubernetes/pkg/kubelet/util/format/pod.go new file mode 100644 index 000000000..c2931ad57 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/format/pod.go @@ -0,0 +1,72 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package format + +import ( + "fmt" + "strings" + "time" + + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/types" +) + +type podHandler func(*v1.Pod) string + +// Pod returns a string representing a pod in a consistent human readable format, +// with pod UID as part of the string. +func Pod(pod *v1.Pod) string { + return PodDesc(pod.Name, pod.Namespace, pod.UID) +} + +// PodDesc returns a string representing a pod in a consistent human readable format, +// with pod UID as part of the string. +func PodDesc(podName, podNamespace string, podUID types.UID) string { + // Use underscore as the delimiter because it is not allowed in pod name + // (DNS subdomain format), while allowed in the container name format. + return fmt.Sprintf("%s_%s(%s)", podName, podNamespace, podUID) +} + +// PodWithDeletionTimestamp is the same as Pod. In addition, it prints the +// deletion timestamp of the pod if it's not nil. +func PodWithDeletionTimestamp(pod *v1.Pod) string { + var deletionTimestamp string + if pod.DeletionTimestamp != nil { + deletionTimestamp = ":DeletionTimestamp=" + pod.DeletionTimestamp.UTC().Format(time.RFC3339) + } + return Pod(pod) + deletionTimestamp +} + +// Pods returns a string representating a list of pods in a human +// readable format. +func Pods(pods []*v1.Pod) string { + return aggregatePods(pods, Pod) +} + +// PodsWithDeletiontimestamps is the same as Pods. In addition, it prints the +// deletion timestamps of the pods if they are not nil. +func PodsWithDeletiontimestamps(pods []*v1.Pod) string { + return aggregatePods(pods, PodWithDeletionTimestamp) +} + +func aggregatePods(pods []*v1.Pod, handler podHandler) string { + podStrings := make([]string, 0, len(pods)) + for _, pod := range pods { + podStrings = append(podStrings, handler(pod)) + } + return fmt.Sprintf(strings.Join(podStrings, ", ")) +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/format/resources.go b/vendor/k8s.io/kubernetes/pkg/kubelet/util/format/resources.go new file mode 100644 index 000000000..2a64c5b72 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/format/resources.go @@ -0,0 +1,36 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package format + +import ( + "fmt" + "sort" + "strings" + + "k8s.io/api/core/v1" +) + +// ResourceList returns a string representation of a resource list in a human readable format. +func ResourceList(resources v1.ResourceList) string { + resourceStrings := make([]string, 0, len(resources)) + for key, value := range resources { + resourceStrings = append(resourceStrings, fmt.Sprintf("%v=%v", key, value.String())) + } + // sort the results for consistent log output + sort.Strings(resourceStrings) + return strings.Join(resourceStrings, ",") +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/format/resources_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/util/format/resources_test.go new file mode 100644 index 000000000..7507daeb0 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/format/resources_test.go @@ -0,0 +1,35 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package format + +import ( + "testing" + + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" +) + +func TestResourceList(t *testing.T) { + resourceList := v1.ResourceList{} + resourceList[v1.ResourceCPU] = resource.MustParse("100m") + resourceList[v1.ResourceMemory] = resource.MustParse("5Gi") + actual := ResourceList(resourceList) + expected := "cpu=100m,memory=5Gi" + if actual != expected { + t.Errorf("Unexpected result, actual: %v, expected: %v", actual, expected) + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/ioutils/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/util/ioutils/BUILD new file mode 100644 index 000000000..52deb7510 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/ioutils/BUILD @@ -0,0 +1,24 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", +) + +go_library( + name = "go_default_library", + srcs = ["ioutils.go"], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/ioutils/ioutils.go b/vendor/k8s.io/kubernetes/pkg/kubelet/util/ioutils/ioutils.go new file mode 100644 index 000000000..42f1998c7 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/ioutils/ioutils.go @@ -0,0 +1,37 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package ioutils + +import "io" + +// writeCloserWrapper represents a WriteCloser whose closer operation is noop. +type writeCloserWrapper struct { + Writer io.Writer +} + +func (w *writeCloserWrapper) Write(buf []byte) (int, error) { + return w.Writer.Write(buf) +} + +func (w *writeCloserWrapper) Close() error { + return nil +} + +// WriteCloserWrapper returns a writeCloserWrapper. +func WriteCloserWrapper(w io.Writer) io.WriteCloser { + return &writeCloserWrapper{w} +} diff --git a/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/util/sliceutils/BUILD similarity index 59% rename from vendor/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/BUILD rename to vendor/k8s.io/kubernetes/pkg/kubelet/util/sliceutils/BUILD index 3d45be121..1d6438571 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/sliceutils/BUILD @@ -8,20 +8,10 @@ load( go_library( name = "go_default_library", - srcs = ["envelope.go"], + srcs = ["sliceutils.go"], deps = [ - "//vendor/github.com/hashicorp/golang-lru:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/value:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["envelope_test.go"], - library = ":go_default_library", - deps = [ - "//vendor/k8s.io/apiserver/pkg/storage/value:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/value/encrypt/aes:go_default_library", + "//pkg/kubelet/container:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", ], ) @@ -37,3 +27,14 @@ filegroup( srcs = [":package-srcs"], tags = ["automanaged"], ) + +go_test( + name = "go_default_test", + srcs = ["sliceutils_test.go"], + library = ":go_default_library", + deps = [ + "//pkg/kubelet/container:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + ], +) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/sliceutils/sliceutils.go b/vendor/k8s.io/kubernetes/pkg/kubelet/util/sliceutils/sliceutils.go new file mode 100644 index 000000000..ff9fb5603 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/sliceutils/sliceutils.go @@ -0,0 +1,58 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package sliceutils + +import ( + "k8s.io/api/core/v1" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" +) + +func StringInSlice(s string, list []string) bool { + for _, v := range list { + if v == s { + return true + } + } + + return false +} + +// PodsByCreationTime makes an array of pods sortable by their creation +// timestamps in ascending order. +type PodsByCreationTime []*v1.Pod + +func (s PodsByCreationTime) Len() int { + return len(s) +} + +func (s PodsByCreationTime) Swap(i, j int) { + s[i], s[j] = s[j], s[i] +} + +func (s PodsByCreationTime) Less(i, j int) bool { + return s[i].CreationTimestamp.Before(&s[j].CreationTimestamp) +} + +// ByImageSize makes an array of images sortable by their size in descending +// order. +type ByImageSize []kubecontainer.Image + +func (a ByImageSize) Less(i, j int) bool { + return a[i].Size > a[j].Size +} +func (a ByImageSize) Len() int { return len(a) } +func (a ByImageSize) Swap(i, j int) { a[i], a[j] = a[j], a[i] } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/sliceutils/sliceutils_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/util/sliceutils/sliceutils_test.go new file mode 100644 index 000000000..bf56bde23 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/sliceutils/sliceutils_test.go @@ -0,0 +1,222 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package sliceutils + +import ( + "testing" + + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + "time" +) + +func TestStringInSlice(t *testing.T) { + fooTests := []struct { + s string + list []string + er bool + }{ + {"first", []string{"first", "second"}, true}, + {"FIRST", []string{"first", "second"}, false}, + {"third", []string{"first", "second"}, false}, + {"first", nil, false}, + + {"", []string{"first", "second"}, false}, + {"", []string{"first", "second", ""}, true}, + {"", nil, false}, + } + + for _, fooTest := range fooTests { + r := StringInSlice(fooTest.s, fooTest.list) + if r != fooTest.er { + t.Errorf("returned %t but expected %t for s=%s & list=%s", r, fooTest.er, fooTest.s, fooTest.list) + } + } +} + +func buildPodsByCreationTime() PodsByCreationTime { + return []*v1.Pod{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: "foo1", + Namespace: v1.NamespaceDefault, + CreationTimestamp: metav1.Time{ + Time: time.Now(), + }, + }, + }, + { + ObjectMeta: metav1.ObjectMeta{ + Name: "foo2", + Namespace: v1.NamespaceDefault, + CreationTimestamp: metav1.Time{ + Time: time.Now().Add(time.Hour * 1), + }, + }, + }, + { + ObjectMeta: metav1.ObjectMeta{ + Name: "foo3", + Namespace: v1.NamespaceDefault, + CreationTimestamp: metav1.Time{ + Time: time.Now().Add(time.Hour * 2), + }, + }, + }, + } +} + +func TestPodsByCreationTimeLen(t *testing.T) { + fooTests := []struct { + pods PodsByCreationTime + el int + }{ + {[]*v1.Pod{}, 0}, + {buildPodsByCreationTime(), 3}, + {[]*v1.Pod{nil, {}}, 2}, + {nil, 0}, + } + + for _, fooTest := range fooTests { + r := fooTest.pods.Len() + if r != fooTest.el { + t.Errorf("returned %d but expected %d for the len of PodsByCreationTime=%s", r, fooTest.el, fooTest.pods) + } + } +} + +func TestPodsByCreationTimeSwap(t *testing.T) { + fooTests := []struct { + pods PodsByCreationTime + i int + j int + }{ + {buildPodsByCreationTime(), 0, 1}, + {buildPodsByCreationTime(), 2, 1}, + } + + for _, fooTest := range fooTests { + fooi := fooTest.pods[fooTest.i] + fooj := fooTest.pods[fooTest.j] + fooTest.pods.Swap(fooTest.i, fooTest.j) + if fooi.GetName() != fooTest.pods[fooTest.j].GetName() || fooj.GetName() != fooTest.pods[fooTest.i].GetName() { + t.Errorf("failed to swap for %v", fooTest) + } + } +} + +func TestPodsByCreationTimeLess(t *testing.T) { + fooTests := []struct { + pods PodsByCreationTime + i int + j int + er bool + }{ + // ascending order + {buildPodsByCreationTime(), 0, 2, true}, + {buildPodsByCreationTime(), 1, 0, false}, + } + + for _, fooTest := range fooTests { + r := fooTest.pods.Less(fooTest.i, fooTest.j) + if r != fooTest.er { + t.Errorf("returned %t but expected %t for the foo=%s", r, fooTest.er, fooTest.pods) + } + } +} + +func buildByImageSize() ByImageSize { + return []kubecontainer.Image{ + { + ID: "1", + RepoTags: []string{"foo-tag11", "foo-tag12"}, + RepoDigests: []string{"foo-rd11", "foo-rd12"}, + Size: 1, + }, + { + ID: "2", + RepoTags: []string{"foo-tag21", "foo-tag22"}, + RepoDigests: []string{"foo-rd21", "foo-rd22"}, + Size: 2, + }, + { + ID: "3", + RepoTags: []string{"foo-tag31", "foo-tag32"}, + RepoDigests: []string{"foo-rd31", "foo-rd32"}, + Size: 3, + }, + } +} + +func TestByImageSizeLen(t *testing.T) { + fooTests := []struct { + images ByImageSize + el int + }{ + {[]kubecontainer.Image{}, 0}, + {buildByImageSize(), 3}, + {nil, 0}, + } + + for _, fooTest := range fooTests { + r := fooTest.images.Len() + if r != fooTest.el { + t.Errorf("returned %d but expected %d for the len of ByImageSize=%v", r, fooTest.el, fooTest.images) + } + } +} + +func TestByImageSizeSwap(t *testing.T) { + fooTests := []struct { + images ByImageSize + i int + j int + }{ + {buildByImageSize(), 0, 1}, + {buildByImageSize(), 2, 1}, + } + + for _, fooTest := range fooTests { + fooi := fooTest.images[fooTest.i] + fooj := fooTest.images[fooTest.j] + fooTest.images.Swap(fooTest.i, fooTest.j) + if fooi.ID != fooTest.images[fooTest.j].ID || fooj.ID != fooTest.images[fooTest.i].ID { + t.Errorf("failed to swap for %v", fooTest) + } + } +} + +func TestByImageSizeLess(t *testing.T) { + fooTests := []struct { + images ByImageSize + i int + j int + er bool + }{ + // descending order + {buildByImageSize(), 0, 2, false}, + {buildByImageSize(), 1, 0, true}, + } + + for _, fooTest := range fooTests { + r := fooTest.images.Less(fooTest.i, fooTest.j) + if r != fooTest.er { + t.Errorf("returned %t but expected %t for the foo=%v", r, fooTest.er, fooTest.images) + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/util.go b/vendor/k8s.io/kubernetes/pkg/kubelet/util/util.go new file mode 100644 index 000000000..eb7cf1427 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/util.go @@ -0,0 +1,47 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package util + +import ( + "fmt" + "net/url" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// FromApiserverCache modifies <opts> so that the GET request will +// be served from apiserver cache instead of from etcd. +func FromApiserverCache(opts *metav1.GetOptions) { + opts.ResourceVersion = "0" +} + +func parseEndpoint(endpoint string) (string, string, error) { + u, err := url.Parse(endpoint) + if err != nil { + return "", "", err + } + + if u.Scheme == "tcp" { + return "tcp", u.Host, nil + } else if u.Scheme == "unix" { + return "unix", u.Path, nil + } else if u.Scheme == "" { + return "", "", fmt.Errorf("Using %q as endpoint is deprecated, please consider using full url format", endpoint) + } else { + return u.Scheme, "", fmt.Errorf("protocol %q not supported", u.Scheme) + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/util_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/util/util_test.go new file mode 100644 index 000000000..f2853b3c3 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/util_test.go @@ -0,0 +1,64 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package util + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestParseEndpoint(t *testing.T) { + tests := []struct { + endpoint string + expectError bool + expectedProtocol string + expectedAddr string + }{ + { + endpoint: "unix:///tmp/s1.sock", + expectedProtocol: "unix", + expectedAddr: "/tmp/s1.sock", + }, + { + endpoint: "tcp://localhost:15880", + expectedProtocol: "tcp", + expectedAddr: "localhost:15880", + }, + { + endpoint: "tcp1://abc", + expectedProtocol: "tcp1", + expectError: true, + }, + { + endpoint: "a b c", + expectError: true, + }, + } + + for _, test := range tests { + protocol, addr, err := parseEndpoint(test.endpoint) + assert.Equal(t, test.expectedProtocol, protocol) + if test.expectError { + assert.NotNil(t, err, "Expect error during parsing %q", test.endpoint) + continue + } + assert.Nil(t, err, "Expect no error during parsing %q", test.endpoint) + assert.Equal(t, test.expectedAddr, addr) + } + +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/util_unix.go b/vendor/k8s.io/kubernetes/pkg/kubelet/util/util_unix.go new file mode 100644 index 000000000..c0c707599 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/util_unix.go @@ -0,0 +1,79 @@ +// +build freebsd linux + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package util + +import ( + "fmt" + "net" + "os" + "time" + + "github.com/golang/glog" + "golang.org/x/sys/unix" +) + +const ( + // unixProtocol is the network protocol of unix socket. + unixProtocol = "unix" +) + +func CreateListener(endpoint string) (net.Listener, error) { + protocol, addr, err := parseEndpointWithFallbackProtocol(endpoint, unixProtocol) + if err != nil { + return nil, err + } + if protocol != unixProtocol { + return nil, fmt.Errorf("only support unix socket endpoint") + } + + // Unlink to cleanup the previous socket file. + err = unix.Unlink(addr) + if err != nil && !os.IsNotExist(err) { + return nil, fmt.Errorf("failed to unlink socket file %q: %v", addr, err) + } + + return net.Listen(protocol, addr) +} + +func GetAddressAndDialer(endpoint string) (string, func(addr string, timeout time.Duration) (net.Conn, error), error) { + protocol, addr, err := parseEndpointWithFallbackProtocol(endpoint, unixProtocol) + if err != nil { + return "", nil, err + } + if protocol != unixProtocol { + return "", nil, fmt.Errorf("only support unix socket endpoint") + } + + return addr, dial, nil +} + +func dial(addr string, timeout time.Duration) (net.Conn, error) { + return net.DialTimeout(unixProtocol, addr, timeout) +} + +func parseEndpointWithFallbackProtocol(endpoint string, fallbackProtocol string) (protocol string, addr string, err error) { + if protocol, addr, err = parseEndpoint(endpoint); err != nil && protocol == "" { + fallbackEndpoint := fallbackProtocol + "://" + endpoint + protocol, addr, err = parseEndpoint(fallbackEndpoint) + if err == nil { + glog.Warningf("Using %q as endpoint is deprecated, please consider using full url format %q.", endpoint, fallbackEndpoint) + } + } + return +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/util_unsupported.go b/vendor/k8s.io/kubernetes/pkg/kubelet/util/util_unsupported.go new file mode 100644 index 000000000..ffc4d642d --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/util_unsupported.go @@ -0,0 +1,33 @@ +// +build !freebsd,!linux,!windows + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package util + +import ( + "fmt" + "net" + "time" +) + +func CreateListener(endpoint string) (net.Listener, error) { + return nil, fmt.Errorf("CreateListener is unsupported in this build") +} + +func GetAddressAndDialer(endpoint string) (string, func(addr string, timeout time.Duration) (net.Conn, error), error) { + return "", nil, fmt.Errorf("GetAddressAndDialer is unsupported in this build") +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/util_windows.go b/vendor/k8s.io/kubernetes/pkg/kubelet/util/util_windows.go new file mode 100644 index 000000000..108f4eb91 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/util_windows.go @@ -0,0 +1,57 @@ +// +build windows + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package util + +import ( + "fmt" + "net" + "time" +) + +const ( + tcpProtocol = "tcp" +) + +func CreateListener(endpoint string) (net.Listener, error) { + protocol, addr, err := parseEndpoint(endpoint) + if err != nil { + return nil, err + } + if protocol != tcpProtocol { + return nil, fmt.Errorf("only support tcp endpoint") + } + + return net.Listen(protocol, addr) +} + +func GetAddressAndDialer(endpoint string) (string, func(addr string, timeout time.Duration) (net.Conn, error), error) { + protocol, addr, err := parseEndpoint(endpoint) + if err != nil { + return "", nil, err + } + if protocol != tcpProtocol { + return "", nil, fmt.Errorf("only support tcp endpoint") + } + + return addr, dial, nil +} + +func dial(addr string, timeout time.Duration) (net.Conn, error) { + return net.DialTimeout(tcpProtocol, addr, timeout) +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/volume_host.go b/vendor/k8s.io/kubernetes/pkg/kubelet/volume_host.go new file mode 100644 index 000000000..26323b7d8 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/volume_host.go @@ -0,0 +1,163 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "fmt" + "net" + + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/types" + clientset "k8s.io/client-go/kubernetes" + "k8s.io/kubernetes/pkg/cloudprovider" + "k8s.io/kubernetes/pkg/kubelet/configmap" + "k8s.io/kubernetes/pkg/kubelet/secret" + "k8s.io/kubernetes/pkg/util/io" + "k8s.io/kubernetes/pkg/util/mount" + "k8s.io/kubernetes/pkg/volume" +) + +// NewInitializedVolumePluginMgr returns a new instance of +// volume.VolumePluginMgr initialized with kubelets implementation of the +// volume.VolumeHost interface. +// +// kubelet - used by VolumeHost methods to expose kubelet specific parameters +// plugins - used to initialize volumePluginMgr +func NewInitializedVolumePluginMgr( + kubelet *Kubelet, + secretManager secret.Manager, + configMapManager configmap.Manager, + plugins []volume.VolumePlugin, + prober volume.DynamicPluginProber) (*volume.VolumePluginMgr, error) { + kvh := &kubeletVolumeHost{ + kubelet: kubelet, + volumePluginMgr: volume.VolumePluginMgr{}, + secretManager: secretManager, + configMapManager: configMapManager, + } + + if err := kvh.volumePluginMgr.InitPlugins(plugins, prober, kvh); err != nil { + return nil, fmt.Errorf( + "Could not initialize volume plugins for KubeletVolumePluginMgr: %v", + err) + } + + return &kvh.volumePluginMgr, nil +} + +// Compile-time check to ensure kubeletVolumeHost implements the VolumeHost interface +var _ volume.VolumeHost = &kubeletVolumeHost{} + +func (kvh *kubeletVolumeHost) GetPluginDir(pluginName string) string { + return kvh.kubelet.getPluginDir(pluginName) +} + +type kubeletVolumeHost struct { + kubelet *Kubelet + volumePluginMgr volume.VolumePluginMgr + secretManager secret.Manager + configMapManager configmap.Manager +} + +func (kvh *kubeletVolumeHost) GetPodVolumeDir(podUID types.UID, pluginName string, volumeName string) string { + return kvh.kubelet.getPodVolumeDir(podUID, pluginName, volumeName) +} + +func (kvh *kubeletVolumeHost) GetPodPluginDir(podUID types.UID, pluginName string) string { + return kvh.kubelet.getPodPluginDir(podUID, pluginName) +} + +func (kvh *kubeletVolumeHost) GetKubeClient() clientset.Interface { + return kvh.kubelet.kubeClient +} + +func (kvh *kubeletVolumeHost) NewWrapperMounter( + volName string, + spec volume.Spec, + pod *v1.Pod, + opts volume.VolumeOptions) (volume.Mounter, error) { + // The name of wrapper volume is set to "wrapped_{wrapped_volume_name}" + wrapperVolumeName := "wrapped_" + volName + if spec.Volume != nil { + spec.Volume.Name = wrapperVolumeName + } + + return kvh.kubelet.newVolumeMounterFromPlugins(&spec, pod, opts) +} + +func (kvh *kubeletVolumeHost) NewWrapperUnmounter(volName string, spec volume.Spec, podUID types.UID) (volume.Unmounter, error) { + // The name of wrapper volume is set to "wrapped_{wrapped_volume_name}" + wrapperVolumeName := "wrapped_" + volName + if spec.Volume != nil { + spec.Volume.Name = wrapperVolumeName + } + + plugin, err := kvh.kubelet.volumePluginMgr.FindPluginBySpec(&spec) + if err != nil { + return nil, err + } + + return plugin.NewUnmounter(spec.Name(), podUID) +} + +func (kvh *kubeletVolumeHost) GetCloudProvider() cloudprovider.Interface { + return kvh.kubelet.cloud +} + +func (kvh *kubeletVolumeHost) GetMounter(pluginName string) mount.Interface { + return kvh.kubelet.mounter +} + +func (kvh *kubeletVolumeHost) GetWriter() io.Writer { + return kvh.kubelet.writer +} + +func (kvh *kubeletVolumeHost) GetHostName() string { + return kvh.kubelet.hostname +} + +func (kvh *kubeletVolumeHost) GetHostIP() (net.IP, error) { + return kvh.kubelet.GetHostIP() +} + +func (kvh *kubeletVolumeHost) GetNodeAllocatable() (v1.ResourceList, error) { + node, err := kvh.kubelet.getNodeAnyWay() + if err != nil { + return nil, fmt.Errorf("error retrieving node: %v", err) + } + return node.Status.Allocatable, nil +} + +func (kvh *kubeletVolumeHost) GetSecretFunc() func(namespace, name string) (*v1.Secret, error) { + return kvh.secretManager.GetSecret +} + +func (kvh *kubeletVolumeHost) GetConfigMapFunc() func(namespace, name string) (*v1.ConfigMap, error) { + return kvh.configMapManager.GetConfigMap +} + +func (kvh *kubeletVolumeHost) GetNodeLabels() (map[string]string, error) { + node, err := kvh.kubelet.GetNode() + if err != nil { + return nil, fmt.Errorf("error retrieving node: %v", err) + } + return node.Labels, nil +} + +func (kvh *kubeletVolumeHost) GetExec(pluginName string) mount.Exec { + return mount.NewOsExec() +} diff --git a/vendor/k8s.io/kubernetes/pkg/master/ports/ports.go b/vendor/k8s.io/kubernetes/pkg/master/ports/ports.go deleted file mode 100644 index 14508cc27..000000000 --- a/vendor/k8s.io/kubernetes/pkg/master/ports/ports.go +++ /dev/null @@ -1,44 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package ports - -const ( - // ProxyStatusPort is the default port for the proxy metrics server. - // May be overridden by a flag at startup. - ProxyStatusPort = 10249 - // KubeletPort is the default port for the kubelet server on each host machine. - // May be overridden by a flag at startup. - KubeletPort = 10250 - // SchedulerPort is the default port for the scheduler status server. - // May be overridden by a flag at startup. - SchedulerPort = 10251 - // ControllerManagerPort is the default port for the controller manager status server. - // May be overridden by a flag at startup. - ControllerManagerPort = 10252 - // CloudControllerManagerPort is the default port for the cloud controller manager server. - // This value may be overriden by a flag at startup. - CloudControllerManagerPort = 10253 - // KubeletReadOnlyPort exposes basic read-only services from the kubelet. - // May be overridden by a flag at startup. - // This is necessary for heapster to collect monitoring stats from the kubelet - // until heapster can transition to using the SSL endpoint. - // TODO(roberthbailey): Remove this once we have a better solution for heapster. - KubeletReadOnlyPort = 10255 - // ProxyHealthzPort is the default port for the proxy healthz server. - // May be overridden by a flag at startup. - ProxyHealthzPort = 10256 -) diff --git a/vendor/k8s.io/kubernetes/pkg/security/BUILD b/vendor/k8s.io/kubernetes/pkg/security/BUILD new file mode 100644 index 000000000..0017dc79e --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/security/BUILD @@ -0,0 +1,28 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", +) + +go_library( + name = "go_default_library", + srcs = ["doc.go"], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [ + ":package-srcs", + "//pkg/security/apparmor:all-srcs", + "//pkg/security/podsecuritypolicy:all-srcs", + ], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/kubernetes/pkg/security/apparmor/validate_test.go b/vendor/k8s.io/kubernetes/pkg/security/apparmor/validate_test.go new file mode 100644 index 000000000..93513e430 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/security/apparmor/validate_test.go @@ -0,0 +1,197 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package apparmor + +import ( + "errors" + "fmt" + "testing" + + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/stretchr/testify/assert" +) + +func TestGetAppArmorFS(t *testing.T) { + // This test only passes on systems running AppArmor with the default configuration. + // The test should be manually run if modifying the getAppArmorFS function. + t.Skip() + + const expectedPath = "/sys/kernel/security/apparmor" + actualPath, err := getAppArmorFS() + assert.NoError(t, err) + assert.Equal(t, expectedPath, actualPath) +} + +func TestValidateHost(t *testing.T) { + // This test only passes on systems running AppArmor with the default configuration. + // The test should be manually run if modifying the getAppArmorFS function. + t.Skip() + + assert.NoError(t, validateHost("docker")) + assert.Error(t, validateHost("rkt")) +} + +func TestValidateProfile(t *testing.T) { + loadedProfiles := map[string]bool{ + "docker-default": true, + "foo-bar": true, + "baz": true, + "/usr/sbin/ntpd": true, + "/usr/lib/connman/scripts/dhclient-script": true, + "/usr/lib/NetworkManager/nm-dhcp-client.action": true, + "/usr/bin/evince-previewer//sanitized_helper": true, + } + tests := []struct { + profile string + expectValid bool + }{ + {"", true}, + {ProfileRuntimeDefault, true}, + {"baz", false}, // Missing local prefix. + {ProfileNamePrefix + "/usr/sbin/ntpd", true}, + {ProfileNamePrefix + "foo-bar", true}, + {ProfileNamePrefix + "unloaded", false}, // Not loaded. + {ProfileNamePrefix + "", false}, + } + + for _, test := range tests { + err := validateProfile(test.profile, loadedProfiles) + if test.expectValid { + assert.NoError(t, err, "Profile %s should be valid", test.profile) + } else { + assert.Error(t, err, fmt.Sprintf("Profile %s should not be valid", test.profile)) + } + } +} + +func TestValidateBadHost(t *testing.T) { + hostErr := errors.New("expected host error") + v := &validator{ + validateHostErr: hostErr, + } + + tests := []struct { + profile string + expectValid bool + }{ + {"", true}, + {ProfileRuntimeDefault, false}, + {ProfileNamePrefix + "docker-default", false}, + } + + for _, test := range tests { + err := v.Validate(getPodWithProfile(test.profile)) + if test.expectValid { + assert.NoError(t, err, "Pod with profile %q should be valid", test.profile) + } else { + assert.Equal(t, hostErr, err, "Pod with profile %q should trigger a host validation error", test.profile) + } + } +} + +func TestValidateValidHost(t *testing.T) { + v := &validator{ + appArmorFS: "./testdata/", + } + + tests := []struct { + profile string + expectValid bool + }{ + {"", true}, + {ProfileRuntimeDefault, true}, + {ProfileNamePrefix + "docker-default", true}, + {ProfileNamePrefix + "foo-container", true}, + {ProfileNamePrefix + "/usr/sbin/ntpd", true}, + {"docker-default", false}, + {ProfileNamePrefix + "foo", false}, + {ProfileNamePrefix + "", false}, + } + + for _, test := range tests { + err := v.Validate(getPodWithProfile(test.profile)) + if test.expectValid { + assert.NoError(t, err, "Pod with profile %q should be valid", test.profile) + } else { + assert.Error(t, err, fmt.Sprintf("Pod with profile %q should trigger a validation error", test.profile)) + } + } + + // Test multi-container pod. + pod := &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + ContainerAnnotationKeyPrefix + "init": ProfileNamePrefix + "foo-container", + ContainerAnnotationKeyPrefix + "test1": ProfileRuntimeDefault, + ContainerAnnotationKeyPrefix + "test2": ProfileNamePrefix + "docker-default", + }, + }, + Spec: v1.PodSpec{ + InitContainers: []v1.Container{ + {Name: "init"}, + }, + Containers: []v1.Container{ + {Name: "test1"}, + {Name: "test2"}, + {Name: "no-profile"}, + }, + }, + } + assert.NoError(t, v.Validate(pod), "Multi-container pod should validate") + for k, val := range pod.Annotations { + pod.Annotations[k] = val + "-bad" + assert.Error(t, v.Validate(pod), fmt.Sprintf("Multi-container pod with invalid profile %s:%s", k, pod.Annotations[k])) + pod.Annotations[k] = val // Restore. + } +} + +func TestParseProfileName(t *testing.T) { + tests := []struct{ line, expected string }{ + {"foo://bar/baz (kill)", "foo://bar/baz"}, + {"foo-bar (enforce)", "foo-bar"}, + {"/usr/foo/bar/baz (complain)", "/usr/foo/bar/baz"}, + } + for _, test := range tests { + name := parseProfileName(test.line) + assert.Equal(t, test.expected, name, "Parsing %s", test.line) + } +} + +func getPodWithProfile(profile string) *v1.Pod { + annotations := map[string]string{ + ContainerAnnotationKeyPrefix + "test": profile, + } + if profile == "" { + annotations = map[string]string{ + "foo": "bar", + } + } + return &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: annotations, + }, + Spec: v1.PodSpec{ + Containers: []v1.Container{ + { + Name: "test", + }, + }, + }, + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/util/version/doc.go b/vendor/k8s.io/kubernetes/pkg/security/doc.go similarity index 82% rename from vendor/k8s.io/kubernetes/pkg/util/version/doc.go rename to vendor/k8s.io/kubernetes/pkg/security/doc.go index da88813da..57bed3a17 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/version/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/security/doc.go @@ -14,5 +14,5 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package version provides utilities for version number comparisons -package version +// Package security contains security apis and implementations. +package security // import "k8s.io/kubernetes/pkg/security" diff --git a/vendor/k8s.io/kubernetes/pkg/serviceaccount/jwt_test.go b/vendor/k8s.io/kubernetes/pkg/serviceaccount/jwt_test.go new file mode 100644 index 000000000..076f4ade9 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/serviceaccount/jwt_test.go @@ -0,0 +1,322 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package serviceaccount_test + +import ( + "reflect" + "testing" + + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apiserverserviceaccount "k8s.io/apiserver/pkg/authentication/serviceaccount" + clientset "k8s.io/client-go/kubernetes" + "k8s.io/client-go/kubernetes/fake" + certutil "k8s.io/client-go/util/cert" + serviceaccountcontroller "k8s.io/kubernetes/pkg/controller/serviceaccount" + "k8s.io/kubernetes/pkg/serviceaccount" +) + +const otherPublicKey = `-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArXz0QkIG1B5Bj2/W69GH +rsm5e+RC3kE+VTgocge0atqlLBek35tRqLgUi3AcIrBZ/0YctMSWDVcRt5fkhWwe +Lqjj6qvAyNyOkrkBi1NFDpJBjYJtuKHgRhNxXbOzTSNpdSKXTfOkzqv56MwHOP25 +yP/NNAODUtr92D5ySI5QX8RbXW+uDn+ixul286PBW/BCrE4tuS88dA0tYJPf8LCu +sqQOwlXYH/rNUg4Pyl9xxhR5DIJR0OzNNfChjw60zieRIt2LfM83fXhwk8IxRGkc +gPZm7ZsipmfbZK2Tkhnpsa4QxDg7zHJPMsB5kxRXW0cQipXcC3baDyN9KBApNXa0 +PwIDAQAB +-----END PUBLIC KEY-----` + +const rsaPublicKey = `-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA249XwEo9k4tM8fMxV7zx +OhcrP+WvXn917koM5Qr2ZXs4vo26e4ytdlrV0bQ9SlcLpQVSYjIxNfhTZdDt+ecI +zshKuv1gKIxbbLQMOuK1eA/4HALyEkFgmS/tleLJrhc65tKPMGD+pKQ/xhmzRuCG +51RoiMgbQxaCyYxGfNLpLAZK9L0Tctv9a0mJmGIYnIOQM4kC1A1I1n3EsXMWmeJU +j7OTh/AjjCnMnkgvKT2tpKxYQ59PgDgU8Ssc7RDSmSkLxnrv+OrN80j6xrw0OjEi +B4Ycr0PqfzZcvy8efTtFQ/Jnc4Bp1zUtFXt7+QeevePtQ2EcyELXE0i63T1CujRM +WwIDAQAB +-----END PUBLIC KEY----- +` + +const rsaPrivateKey = `-----BEGIN RSA PRIVATE KEY----- +MIIEowIBAAKCAQEA249XwEo9k4tM8fMxV7zxOhcrP+WvXn917koM5Qr2ZXs4vo26 +e4ytdlrV0bQ9SlcLpQVSYjIxNfhTZdDt+ecIzshKuv1gKIxbbLQMOuK1eA/4HALy +EkFgmS/tleLJrhc65tKPMGD+pKQ/xhmzRuCG51RoiMgbQxaCyYxGfNLpLAZK9L0T +ctv9a0mJmGIYnIOQM4kC1A1I1n3EsXMWmeJUj7OTh/AjjCnMnkgvKT2tpKxYQ59P +gDgU8Ssc7RDSmSkLxnrv+OrN80j6xrw0OjEiB4Ycr0PqfzZcvy8efTtFQ/Jnc4Bp +1zUtFXt7+QeevePtQ2EcyELXE0i63T1CujRMWwIDAQABAoIBAHJx8GqyCBDNbqk7 +e7/hI9iE1S10Wwol5GH2RWxqX28cYMKq+8aE2LI1vPiXO89xOgelk4DN6urX6xjK +ZBF8RRIMQy/e/O2F4+3wl+Nl4vOXV1u6iVXMsD6JRg137mqJf1Fr9elg1bsaRofL +Q7CxPoB8dhS+Qb+hj0DhlqhgA9zG345CQCAds0ZYAZe8fP7bkwrLqZpMn7Dz9WVm +++YgYYKjuE95kPuup/LtWfA9rJyE/Fws8/jGvRSpVn1XglMLSMKhLd27sE8ZUSV0 +2KUzbfRGE0+AnRULRrjpYaPu0XQ2JjdNvtkjBnv27RB89W9Gklxq821eH1Y8got8 +FZodjxECgYEA93pz7AQZ2xDs67d1XLCzpX84GxKzttirmyj3OIlxgzVHjEMsvw8v +sjFiBU5xEEQDosrBdSknnlJqyiq1YwWG/WDckr13d8G2RQWoySN7JVmTQfXcLoTu +YGRiiTuoEi3ab3ZqrgGrFgX7T/cHuasbYvzCvhM2b4VIR3aSxU2DTUMCgYEA4x7J +T/ErP6GkU5nKstu/mIXwNzayEO1BJvPYsy7i7EsxTm3xe/b8/6cYOz5fvJLGH5mT +Q8YvuLqBcMwZardrYcwokD55UvNLOyfADDFZ6l3WntIqbA640Ok2g1X4U8J09xIq +ZLIWK1yWbbvi4QCeN5hvWq47e8sIj5QHjIIjRwkCgYEAyNqjltxFN9zmzPDa2d24 +EAvOt3pYTYBQ1t9KtqImdL0bUqV6fZ6PsWoPCgt+DBuHb+prVPGP7Bkr/uTmznU/ ++AlTO+12NsYLbr2HHagkXE31DEXE7CSLa8RNjN/UKtz4Ohq7vnowJvG35FCz/mb3 +FUHbtHTXa2+bGBUOTf/5Hw0CgYBxw0r9EwUhw1qnUYJ5op7OzFAtp+T7m4ul8kCa +SCL8TxGsgl+SQ34opE775dtYfoBk9a0RJqVit3D8yg71KFjOTNAIqHJm/Vyyjc+h +i9rJDSXiuczsAVfLtPVMRfS0J9QkqeG4PIfkQmVLI/CZ2ZBmsqEcX+eFs4ZfPLun +Qsxe2QKBgGuPilIbLeIBDIaPiUI0FwU8v2j8CEQBYvoQn34c95hVQsig/o5z7zlo +UsO0wlTngXKlWdOcCs1kqEhTLrstf48djDxAYAxkw40nzeJOt7q52ib/fvf4/UBy +X024wzbiw1q07jFCyfQmODzURAx1VNT7QVUMdz/N8vy47/H40AZJ +-----END RSA PRIVATE KEY----- +` + +// openssl ecparam -name prime256v1 -genkey -out ecdsa256params.pem +const ecdsaPrivateKeyWithParams = `-----BEGIN EC PARAMETERS----- +BggqhkjOPQMBBw== +-----END EC PARAMETERS----- +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIJ9LWDj3ZWe9CksPV7mZjD2dYXG9icfzxadCRwd3vr1toAoGCCqGSM49 +AwEHoUQDQgAEaLNEpzbaaNTCkKjBVj7sxpfJ1ifJQGNvcck4nrzcwFRuujwVDDJh +95iIGwKCQeSg+yhdN6Q/p2XaxNIZlYmUhg== +-----END EC PRIVATE KEY----- +` + +// openssl ecparam -name prime256v1 -genkey -noout -out ecdsa256.pem +const ecdsaPrivateKey = `-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIEZmTmUhuanLjPA2CLquXivuwBDHTt5XYwgIr/kA1LtRoAoGCCqGSM49 +AwEHoUQDQgAEH6cuzP8XuD5wal6wf9M6xDljTOPLX2i8uIp/C/ASqiIGUeeKQtX0 +/IR3qCXyThP/dbCiHrF3v1cuhBOHY8CLVg== +-----END EC PRIVATE KEY-----` + +// openssl ec -in ecdsa256.pem -pubout -out ecdsa256pub.pem +const ecdsaPublicKey = `-----BEGIN PUBLIC KEY----- +MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEH6cuzP8XuD5wal6wf9M6xDljTOPL +X2i8uIp/C/ASqiIGUeeKQtX0/IR3qCXyThP/dbCiHrF3v1cuhBOHY8CLVg== +-----END PUBLIC KEY-----` + +func getPrivateKey(data string) interface{} { + key, _ := certutil.ParsePrivateKeyPEM([]byte(data)) + return key +} + +func getPublicKey(data string) interface{} { + keys, _ := certutil.ParsePublicKeysPEM([]byte(data)) + return keys[0] +} +func TestTokenGenerateAndValidate(t *testing.T) { + expectedUserName := "system:serviceaccount:test:my-service-account" + expectedUserUID := "12345" + + // Related API objects + serviceAccount := &v1.ServiceAccount{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-service-account", + UID: "12345", + Namespace: "test", + }, + } + rsaSecret := &v1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-rsa-secret", + Namespace: "test", + }, + } + ecdsaSecret := &v1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-ecdsa-secret", + Namespace: "test", + }, + } + + // Generate the RSA token + rsaGenerator := serviceaccount.JWTTokenGenerator(getPrivateKey(rsaPrivateKey)) + rsaToken, err := rsaGenerator.GenerateToken(*serviceAccount, *rsaSecret) + if err != nil { + t.Fatalf("error generating token: %v", err) + } + if len(rsaToken) == 0 { + t.Fatalf("no token generated") + } + rsaSecret.Data = map[string][]byte{ + "token": []byte(rsaToken), + } + + // Generate the ECDSA token + ecdsaGenerator := serviceaccount.JWTTokenGenerator(getPrivateKey(ecdsaPrivateKey)) + ecdsaToken, err := ecdsaGenerator.GenerateToken(*serviceAccount, *ecdsaSecret) + if err != nil { + t.Fatalf("error generating token: %v", err) + } + if len(ecdsaToken) == 0 { + t.Fatalf("no token generated") + } + ecdsaSecret.Data = map[string][]byte{ + "token": []byte(ecdsaToken), + } + + testCases := map[string]struct { + Client clientset.Interface + Keys []interface{} + Token string + + ExpectedErr bool + ExpectedOK bool + ExpectedUserName string + ExpectedUserUID string + ExpectedGroups []string + }{ + "no keys": { + Token: rsaToken, + Client: nil, + Keys: []interface{}{}, + ExpectedErr: false, + ExpectedOK: false, + }, + "invalid keys (rsa)": { + Token: rsaToken, + Client: nil, + Keys: []interface{}{getPublicKey(otherPublicKey), getPublicKey(ecdsaPublicKey)}, + ExpectedErr: true, + ExpectedOK: false, + }, + "invalid keys (ecdsa)": { + Token: ecdsaToken, + Client: nil, + Keys: []interface{}{getPublicKey(otherPublicKey), getPublicKey(rsaPublicKey)}, + ExpectedErr: true, + ExpectedOK: false, + }, + "valid key (rsa)": { + Token: rsaToken, + Client: nil, + Keys: []interface{}{getPublicKey(rsaPublicKey)}, + ExpectedErr: false, + ExpectedOK: true, + ExpectedUserName: expectedUserName, + ExpectedUserUID: expectedUserUID, + ExpectedGroups: []string{"system:serviceaccounts", "system:serviceaccounts:test"}, + }, + "valid key (ecdsa)": { + Token: ecdsaToken, + Client: nil, + Keys: []interface{}{getPublicKey(ecdsaPublicKey)}, + ExpectedErr: false, + ExpectedOK: true, + ExpectedUserName: expectedUserName, + ExpectedUserUID: expectedUserUID, + ExpectedGroups: []string{"system:serviceaccounts", "system:serviceaccounts:test"}, + }, + "rotated keys (rsa)": { + Token: rsaToken, + Client: nil, + Keys: []interface{}{getPublicKey(otherPublicKey), getPublicKey(ecdsaPublicKey), getPublicKey(rsaPublicKey)}, + ExpectedErr: false, + ExpectedOK: true, + ExpectedUserName: expectedUserName, + ExpectedUserUID: expectedUserUID, + ExpectedGroups: []string{"system:serviceaccounts", "system:serviceaccounts:test"}, + }, + "rotated keys (ecdsa)": { + Token: ecdsaToken, + Client: nil, + Keys: []interface{}{getPublicKey(otherPublicKey), getPublicKey(rsaPublicKey), getPublicKey(ecdsaPublicKey)}, + ExpectedErr: false, + ExpectedOK: true, + ExpectedUserName: expectedUserName, + ExpectedUserUID: expectedUserUID, + ExpectedGroups: []string{"system:serviceaccounts", "system:serviceaccounts:test"}, + }, + "valid lookup": { + Token: rsaToken, + Client: fake.NewSimpleClientset(serviceAccount, rsaSecret, ecdsaSecret), + Keys: []interface{}{getPublicKey(rsaPublicKey)}, + ExpectedErr: false, + ExpectedOK: true, + ExpectedUserName: expectedUserName, + ExpectedUserUID: expectedUserUID, + ExpectedGroups: []string{"system:serviceaccounts", "system:serviceaccounts:test"}, + }, + "invalid secret lookup": { + Token: rsaToken, + Client: fake.NewSimpleClientset(serviceAccount), + Keys: []interface{}{getPublicKey(rsaPublicKey)}, + ExpectedErr: true, + ExpectedOK: false, + }, + "invalid serviceaccount lookup": { + Token: rsaToken, + Client: fake.NewSimpleClientset(rsaSecret, ecdsaSecret), + Keys: []interface{}{getPublicKey(rsaPublicKey)}, + ExpectedErr: true, + ExpectedOK: false, + }, + } + + for k, tc := range testCases { + getter := serviceaccountcontroller.NewGetterFromClient(tc.Client) + authenticator := serviceaccount.JWTTokenAuthenticator(tc.Keys, tc.Client != nil, getter) + + // An invalid, non-JWT token should always fail + if _, ok, err := authenticator.AuthenticateToken("invalid token"); err != nil || ok { + t.Errorf("%s: Expected err=nil, ok=false for non-JWT token", k) + continue + } + + user, ok, err := authenticator.AuthenticateToken(tc.Token) + if (err != nil) != tc.ExpectedErr { + t.Errorf("%s: Expected error=%v, got %v", k, tc.ExpectedErr, err) + continue + } + + if ok != tc.ExpectedOK { + t.Errorf("%s: Expected ok=%v, got %v", k, tc.ExpectedOK, ok) + continue + } + + if err != nil || !ok { + continue + } + + if user.GetName() != tc.ExpectedUserName { + t.Errorf("%s: Expected username=%v, got %v", k, tc.ExpectedUserName, user.GetName()) + continue + } + if user.GetUID() != tc.ExpectedUserUID { + t.Errorf("%s: Expected userUID=%v, got %v", k, tc.ExpectedUserUID, user.GetUID()) + continue + } + if !reflect.DeepEqual(user.GetGroups(), tc.ExpectedGroups) { + t.Errorf("%s: Expected groups=%v, got %v", k, tc.ExpectedGroups, user.GetGroups()) + continue + } + } +} + +func TestMakeSplitUsername(t *testing.T) { + username := apiserverserviceaccount.MakeUsername("ns", "name") + ns, name, err := apiserverserviceaccount.SplitUsername(username) + if err != nil { + t.Errorf("Unexpected error %v", err) + } + if ns != "ns" || name != "name" { + t.Errorf("Expected ns/name, got %s/%s", ns, name) + } + + invalid := []string{"test", "system:serviceaccount", "system:serviceaccount:", "system:serviceaccount:ns", "system:serviceaccount:ns:name:extra"} + for _, n := range invalid { + _, _, err := apiserverserviceaccount.SplitUsername("test") + if err == nil { + t.Errorf("Expected error for %s", n) + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/util/BUILD b/vendor/k8s.io/kubernetes/pkg/util/BUILD new file mode 100644 index 000000000..88bd34633 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/util/BUILD @@ -0,0 +1,71 @@ +package(default_visibility = ["//visibility:public"]) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [ + ":package-srcs", + "//pkg/util/async:all-srcs", + "//pkg/util/bandwidth:all-srcs", + "//pkg/util/config:all-srcs", + "//pkg/util/configz:all-srcs", + "//pkg/util/dbus:all-srcs", + "//pkg/util/ebtables:all-srcs", + "//pkg/util/env:all-srcs", + "//pkg/util/file:all-srcs", + "//pkg/util/filesystem:all-srcs", + "//pkg/util/flock:all-srcs", + "//pkg/util/goroutinemap:all-srcs", + "//pkg/util/hash:all-srcs", + "//pkg/util/initsystem:all-srcs", + "//pkg/util/interrupt:all-srcs", + "//pkg/util/io:all-srcs", + "//pkg/util/ipconfig:all-srcs", + "//pkg/util/iptables:all-srcs", + "//pkg/util/ipvs:all-srcs", + "//pkg/util/keymutex:all-srcs", + "//pkg/util/labels:all-srcs", + "//pkg/util/limitwriter:all-srcs", + "//pkg/util/maps:all-srcs", + "//pkg/util/metrics:all-srcs", + "//pkg/util/mount:all-srcs", + "//pkg/util/net:all-srcs", + "//pkg/util/netsh:all-srcs", + "//pkg/util/node:all-srcs", + "//pkg/util/oom:all-srcs", + "//pkg/util/parsers:all-srcs", + "//pkg/util/pointer:all-srcs", + "//pkg/util/procfs:all-srcs", + "//pkg/util/reflector/prometheus:all-srcs", + "//pkg/util/removeall:all-srcs", + "//pkg/util/resourcecontainer:all-srcs", + "//pkg/util/rlimit:all-srcs", + "//pkg/util/selinux:all-srcs", + "//pkg/util/slice:all-srcs", + "//pkg/util/strings:all-srcs", + "//pkg/util/sysctl:all-srcs", + "//pkg/util/system:all-srcs", + "//pkg/util/tail:all-srcs", + "//pkg/util/taints:all-srcs", + "//pkg/util/template:all-srcs", + "//pkg/util/term:all-srcs", + "//pkg/util/threading:all-srcs", + "//pkg/util/tolerations:all-srcs", + "//pkg/util/version:all-srcs", + "//pkg/util/workqueue/prometheus:all-srcs", + ], + tags = ["automanaged"], +) + +sh_test( + name = "verify-util-pkg", + size = "small", + srcs = ["verify-util-pkg.sh"], + data = glob(["*.go"]), +) diff --git a/vendor/k8s.io/kubernetes/pkg/util/hash/hash_test.go b/vendor/k8s.io/kubernetes/pkg/util/hash/hash_test.go new file mode 100644 index 000000000..abce506a5 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/util/hash/hash_test.go @@ -0,0 +1,147 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package hash + +import ( + "fmt" + "hash/adler32" + "testing" + + "github.com/davecgh/go-spew/spew" +) + +type A struct { + x int + y string +} + +type B struct { + x []int + y map[string]bool +} + +type C struct { + x int + y string +} + +func (c C) String() string { + return fmt.Sprintf("%d:%s", c.x, c.y) +} + +func TestDeepHashObject(t *testing.T) { + successCases := []func() interface{}{ + func() interface{} { return 8675309 }, + func() interface{} { return "Jenny, I got your number" }, + func() interface{} { return []string{"eight", "six", "seven"} }, + func() interface{} { return [...]int{5, 3, 0, 9} }, + func() interface{} { return map[int]string{8: "8", 6: "6", 7: "7"} }, + func() interface{} { return map[string]int{"5": 5, "3": 3, "0": 0, "9": 9} }, + func() interface{} { return A{867, "5309"} }, + func() interface{} { return &A{867, "5309"} }, + func() interface{} { + return B{[]int{8, 6, 7}, map[string]bool{"5": true, "3": true, "0": true, "9": true}} + }, + func() interface{} { return map[A]bool{{8675309, "Jenny"}: true, {9765683, "!Jenny"}: false} }, + func() interface{} { return map[C]bool{{8675309, "Jenny"}: true, {9765683, "!Jenny"}: false} }, + func() interface{} { return map[*A]bool{{8675309, "Jenny"}: true, {9765683, "!Jenny"}: false} }, + func() interface{} { return map[*C]bool{{8675309, "Jenny"}: true, {9765683, "!Jenny"}: false} }, + } + + for _, tc := range successCases { + hasher1 := adler32.New() + DeepHashObject(hasher1, tc()) + hash1 := hasher1.Sum32() + DeepHashObject(hasher1, tc()) + hash2 := hasher1.Sum32() + if hash1 != hash2 { + t.Fatalf("hash of the same object (%q) produced different results: %d vs %d", toString(tc()), hash1, hash2) + } + for i := 0; i < 100; i++ { + hasher2 := adler32.New() + + DeepHashObject(hasher1, tc()) + hash1a := hasher1.Sum32() + DeepHashObject(hasher2, tc()) + hash2a := hasher2.Sum32() + + if hash1a != hash1 { + t.Errorf("repeated hash of the same object (%q) produced different results: %d vs %d", toString(tc()), hash1, hash1a) + } + if hash2a != hash2 { + t.Errorf("repeated hash of the same object (%q) produced different results: %d vs %d", toString(tc()), hash2, hash2a) + } + if hash1a != hash2a { + t.Errorf("hash of the same object produced (%q) different results: %d vs %d", toString(tc()), hash1a, hash2a) + } + } + } +} + +func toString(obj interface{}) string { + return spew.Sprintf("%#v", obj) +} + +type wheel struct { + radius uint32 +} + +type unicycle struct { + primaryWheel *wheel + licencePlateID string + tags map[string]string +} + +func TestDeepObjectPointer(t *testing.T) { + // Arrange + wheel1 := wheel{radius: 17} + wheel2 := wheel{radius: 22} + wheel3 := wheel{radius: 17} + + myUni1 := unicycle{licencePlateID: "blah", primaryWheel: &wheel1, tags: map[string]string{"color": "blue", "name": "john"}} + myUni2 := unicycle{licencePlateID: "blah", primaryWheel: &wheel2, tags: map[string]string{"color": "blue", "name": "john"}} + myUni3 := unicycle{licencePlateID: "blah", primaryWheel: &wheel3, tags: map[string]string{"color": "blue", "name": "john"}} + + // Run it more than once to verify determinism of hasher. + for i := 0; i < 100; i++ { + hasher1 := adler32.New() + hasher2 := adler32.New() + hasher3 := adler32.New() + // Act + DeepHashObject(hasher1, myUni1) + hash1 := hasher1.Sum32() + DeepHashObject(hasher1, myUni1) + hash1a := hasher1.Sum32() + DeepHashObject(hasher2, myUni2) + hash2 := hasher2.Sum32() + DeepHashObject(hasher3, myUni3) + hash3 := hasher3.Sum32() + + // Assert + if hash1 != hash1a { + t.Errorf("repeated hash of the same object produced different results: %d vs %d", hash1, hash1a) + } + + if hash1 == hash2 { + t.Errorf("hash1 (%d) and hash2(%d) must be different because they have different values for wheel size", hash1, hash2) + } + + if hash1 != hash3 { + t.Errorf("hash1 (%d) and hash3(%d) must be the same because although they point to different objects, they have the same values for wheel size", hash1, hash3) + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/util/mount/doc.go b/vendor/k8s.io/kubernetes/pkg/util/mount/doc.go index 0e225e0a1..15179e53f 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/mount/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/util/mount/doc.go @@ -15,4 +15,4 @@ limitations under the License. */ // Package mount defines an interface to mounting filesystems. -package mount +package mount // import "k8s.io/kubernetes/pkg/util/mount" diff --git a/vendor/k8s.io/kubernetes/pkg/util/mount/mount_linux_test.go b/vendor/k8s.io/kubernetes/pkg/util/mount/mount_linux_test.go new file mode 100644 index 000000000..6d5d6e961 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/util/mount/mount_linux_test.go @@ -0,0 +1,324 @@ +// +build linux + +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package mount + +import ( + "io/ioutil" + "os" + "path/filepath" + "reflect" + "testing" +) + +func TestReadProcMountsFrom(t *testing.T) { + successCase := + `/dev/0 /path/to/0 type0 flags 0 0 +/dev/1 /path/to/1 type1 flags 1 1 +/dev/2 /path/to/2 type2 flags,1,2=3 2 2 +` + // NOTE: readProcMountsFrom has been updated to using fnv.New32a() + mounts, err := parseProcMounts([]byte(successCase)) + if err != nil { + t.Errorf("expected success, got %v", err) + } + if len(mounts) != 3 { + t.Fatalf("expected 3 mounts, got %d", len(mounts)) + } + mp := MountPoint{"/dev/0", "/path/to/0", "type0", []string{"flags"}, 0, 0} + if !mountPointsEqual(&mounts[0], &mp) { + t.Errorf("got unexpected MountPoint[0]: %#v", mounts[0]) + } + mp = MountPoint{"/dev/1", "/path/to/1", "type1", []string{"flags"}, 1, 1} + if !mountPointsEqual(&mounts[1], &mp) { + t.Errorf("got unexpected MountPoint[1]: %#v", mounts[1]) + } + mp = MountPoint{"/dev/2", "/path/to/2", "type2", []string{"flags", "1", "2=3"}, 2, 2} + if !mountPointsEqual(&mounts[2], &mp) { + t.Errorf("got unexpected MountPoint[2]: %#v", mounts[2]) + } + + errorCases := []string{ + "/dev/0 /path/to/mount\n", + "/dev/1 /path/to/mount type flags a 0\n", + "/dev/2 /path/to/mount type flags 0 b\n", + } + for _, ec := range errorCases { + _, err := parseProcMounts([]byte(ec)) + if err == nil { + t.Errorf("expected error") + } + } +} + +func mountPointsEqual(a, b *MountPoint) bool { + if a.Device != b.Device || a.Path != b.Path || a.Type != b.Type || !reflect.DeepEqual(a.Opts, b.Opts) || a.Pass != b.Pass || a.Freq != b.Freq { + return false + } + return true +} + +func TestGetMountRefs(t *testing.T) { + fm := &FakeMounter{ + MountPoints: []MountPoint{ + {Device: "/dev/sdb", Path: "/var/lib/kubelet/plugins/kubernetes.io/gce-pd/mounts/gce-pd"}, + {Device: "/dev/sdb", Path: "/var/lib/kubelet/pods/some-pod/volumes/kubernetes.io~gce-pd/gce-pd-in-pod"}, + {Device: "/dev/sdc", Path: "/var/lib/kubelet/plugins/kubernetes.io/gce-pd/mounts/gce-pd2"}, + {Device: "/dev/sdc", Path: "/var/lib/kubelet/pods/some-pod/volumes/kubernetes.io~gce-pd/gce-pd2-in-pod1"}, + {Device: "/dev/sdc", Path: "/var/lib/kubelet/pods/some-pod/volumes/kubernetes.io~gce-pd/gce-pd2-in-pod2"}, + }, + } + + tests := []struct { + mountPath string + expectedRefs []string + }{ + { + "/var/lib/kubelet/pods/some-pod/volumes/kubernetes.io~gce-pd/gce-pd-in-pod", + []string{ + "/var/lib/kubelet/plugins/kubernetes.io/gce-pd/mounts/gce-pd", + }, + }, + { + "/var/lib/kubelet/pods/some-pod/volumes/kubernetes.io~gce-pd/gce-pd2-in-pod1", + []string{ + "/var/lib/kubelet/pods/some-pod/volumes/kubernetes.io~gce-pd/gce-pd2-in-pod2", + "/var/lib/kubelet/plugins/kubernetes.io/gce-pd/mounts/gce-pd2", + }, + }, + } + + for i, test := range tests { + if refs, err := GetMountRefs(fm, test.mountPath); err != nil || !setEquivalent(test.expectedRefs, refs) { + t.Errorf("%d. getMountRefs(%q) = %v, %v; expected %v, nil", i, test.mountPath, refs, err, test.expectedRefs) + } + } +} + +func setEquivalent(set1, set2 []string) bool { + map1 := make(map[string]bool) + map2 := make(map[string]bool) + for _, s := range set1 { + map1[s] = true + } + for _, s := range set2 { + map2[s] = true + } + + for s := range map1 { + if !map2[s] { + return false + } + } + for s := range map2 { + if !map1[s] { + return false + } + } + return true +} + +func TestGetDeviceNameFromMount(t *testing.T) { + fm := &FakeMounter{ + MountPoints: []MountPoint{ + {Device: "/dev/disk/by-path/prefix-lun-1", + Path: "/mnt/111"}, + {Device: "/dev/disk/by-path/prefix-lun-1", + Path: "/mnt/222"}, + }, + } + + tests := []struct { + mountPath string + expectedDevice string + expectedRefs int + }{ + { + "/mnt/222", + "/dev/disk/by-path/prefix-lun-1", + 2, + }, + } + + for i, test := range tests { + if device, refs, err := GetDeviceNameFromMount(fm, test.mountPath); err != nil || test.expectedRefs != refs || test.expectedDevice != device { + t.Errorf("%d. GetDeviceNameFromMount(%s) = (%s, %d), %v; expected (%s,%d), nil", i, test.mountPath, device, refs, err, test.expectedDevice, test.expectedRefs) + } + } +} + +func TestGetMountRefsByDev(t *testing.T) { + fm := &FakeMounter{ + MountPoints: []MountPoint{ + {Device: "/dev/sdb", Path: "/var/lib/kubelet/plugins/kubernetes.io/gce-pd/mounts/gce-pd"}, + {Device: "/dev/sdb", Path: "/var/lib/kubelet/pods/some-pod/volumes/kubernetes.io~gce-pd/gce-pd-in-pod"}, + {Device: "/dev/sdc", Path: "/var/lib/kubelet/plugins/kubernetes.io/gce-pd/mounts/gce-pd2"}, + {Device: "/dev/sdc", Path: "/var/lib/kubelet/pods/some-pod/volumes/kubernetes.io~gce-pd/gce-pd2-in-pod1"}, + {Device: "/dev/sdc", Path: "/var/lib/kubelet/pods/some-pod/volumes/kubernetes.io~gce-pd/gce-pd2-in-pod2"}, + }, + } + + tests := []struct { + mountPath string + expectedRefs []string + }{ + { + "/var/lib/kubelet/plugins/kubernetes.io/gce-pd/mounts/gce-pd", + []string{ + "/var/lib/kubelet/pods/some-pod/volumes/kubernetes.io~gce-pd/gce-pd-in-pod", + }, + }, + { + "/var/lib/kubelet/plugins/kubernetes.io/gce-pd/mounts/gce-pd2", + []string{ + "/var/lib/kubelet/pods/some-pod/volumes/kubernetes.io~gce-pd/gce-pd2-in-pod1", + "/var/lib/kubelet/pods/some-pod/volumes/kubernetes.io~gce-pd/gce-pd2-in-pod2", + }, + }, + } + + for i, test := range tests { + + if refs, err := GetMountRefsByDev(fm, test.mountPath); err != nil || !setEquivalent(test.expectedRefs, refs) { + t.Errorf("%d. getMountRefsByDev(%q) = %v, %v; expected %v, nil", i, test.mountPath, refs, err, test.expectedRefs) + } + } +} + +func writeFile(content string) (string, string, error) { + tempDir, err := ioutil.TempDir("", "mounter_shared_test") + if err != nil { + return "", "", err + } + filename := filepath.Join(tempDir, "mountinfo") + err = ioutil.WriteFile(filename, []byte(content), 0600) + if err != nil { + os.RemoveAll(tempDir) + return "", "", err + } + return tempDir, filename, nil +} + +func TestIsSharedSuccess(t *testing.T) { + successMountInfo := + `62 0 253:0 / / rw,relatime shared:1 - ext4 /dev/mapper/ssd-root rw,seclabel,data=ordered +76 62 8:1 / /boot rw,relatime shared:29 - ext4 /dev/sda1 rw,seclabel,data=ordered +78 62 0:41 / /tmp rw,nosuid,nodev shared:30 - tmpfs tmpfs rw,seclabel +80 62 0:42 / /var/lib/nfs/rpc_pipefs rw,relatime shared:31 - rpc_pipefs sunrpc rw +82 62 0:43 / /var/lib/foo rw,relatime shared:32 - tmpfs tmpfs rw +83 63 0:44 / /var/lib/bar rw,relatime - tmpfs tmpfs rw +227 62 253:0 /var/lib/docker/devicemapper /var/lib/docker/devicemapper rw,relatime - ext4 /dev/mapper/ssd-root rw,seclabel,data=ordered +224 62 253:0 /var/lib/docker/devicemapper/test/shared /var/lib/docker/devicemapper/test/shared rw,relatime master:1 shared:44 - ext4 /dev/mapper/ssd-root rw,seclabel,data=ordered +` + tempDir, filename, err := writeFile(successMountInfo) + if err != nil { + t.Fatalf("cannot create temporary file: %v", err) + } + defer os.RemoveAll(tempDir) + + tests := []struct { + name string + path string + expectedResult bool + }{ + { + // /var/lib/kubelet is a directory on mount '/' that is shared + // This is the most common case. + "shared", + "/var/lib/kubelet", + true, + }, + { + // 8a2a... is a directory on mount /var/lib/docker/devicemapper + // that is private. + "private", + "/var/lib/docker/devicemapper/mnt/8a2a5c19eefb06d6f851dfcb240f8c113427f5b49b19658b5c60168e88267693/", + false, + }, + { + // 'directory' is a directory on mount + // /var/lib/docker/devicemapper/test/shared that is shared, but one + // of its parent is private. + "nested-shared", + "/var/lib/docker/devicemapper/test/shared/my/test/directory", + true, + }, + { + // /var/lib/foo is a mount point and it's shared + "shared-mount", + "/var/lib/foo", + true, + }, + { + // /var/lib/bar is a mount point and it's private + "private-mount", + "/var/lib/bar", + false, + }, + } + for _, test := range tests { + ret, err := isShared(test.path, filename) + if err != nil { + t.Errorf("test %s got unexpected error: %v", test.name, err) + } + if ret != test.expectedResult { + t.Errorf("test %s expected %v, got %v", test.name, test.expectedResult, ret) + } + } +} + +func TestIsSharedFailure(t *testing.T) { + errorTests := []struct { + name string + content string + }{ + { + // the first line is too short + name: "too-short-line", + content: `62 0 253:0 / / rw,relatime +76 62 8:1 / /boot rw,relatime shared:29 - ext4 /dev/sda1 rw,seclabel,data=ordered +78 62 0:41 / /tmp rw,nosuid,nodev shared:30 - tmpfs tmpfs rw,seclabel +80 62 0:42 / /var/lib/nfs/rpc_pipefs rw,relatime shared:31 - rpc_pipefs sunrpc rw +227 62 253:0 /var/lib/docker/devicemapper /var/lib/docker/devicemapper rw,relatime - ext4 /dev/mapper/ssd-root rw,seclabel,data=ordered +224 62 253:0 /var/lib/docker/devicemapper/test/shared /var/lib/docker/devicemapper/test/shared rw,relatime master:1 shared:44 - ext4 /dev/mapper/ssd-root rw,seclabel,data=ordered +`, + }, + { + // there is no root mount + name: "no-root-mount", + content: `76 62 8:1 / /boot rw,relatime shared:29 - ext4 /dev/sda1 rw,seclabel,data=ordered +78 62 0:41 / /tmp rw,nosuid,nodev shared:30 - tmpfs tmpfs rw,seclabel +80 62 0:42 / /var/lib/nfs/rpc_pipefs rw,relatime shared:31 - rpc_pipefs sunrpc rw +227 62 253:0 /var/lib/docker/devicemapper /var/lib/docker/devicemapper rw,relatime - ext4 /dev/mapper/ssd-root rw,seclabel,data=ordered +224 62 253:0 /var/lib/docker/devicemapper/test/shared /var/lib/docker/devicemapper/test/shared rw,relatime master:1 shared:44 - ext4 /dev/mapper/ssd-root rw,seclabel,data=ordered +`, + }, + } + for _, test := range errorTests { + tempDir, filename, err := writeFile(test.content) + if err != nil { + t.Fatalf("cannot create temporary file: %v", err) + } + defer os.RemoveAll(tempDir) + + _, err = isShared("/", filename) + if err == nil { + t.Errorf("test %q: expected error, got none", test.name) + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/util/mount/mount_windows_test.go b/vendor/k8s.io/kubernetes/pkg/util/mount/mount_windows_test.go new file mode 100644 index 000000000..6be0fc43e --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/util/mount/mount_windows_test.go @@ -0,0 +1,71 @@ +// +build windows + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package mount + +import ( + "testing" +) + +func TestGetAvailableDriveLetter(t *testing.T) { + if _, err := getAvailableDriveLetter(); err != nil { + t.Errorf("getAvailableDriveLetter test failed : %v", err) + } +} + +func TestNormalizeWindowsPath(t *testing.T) { + path := `/var/lib/kubelet/pods/146f8428-83e7-11e7-8dd4-000d3a31dac4/volumes/kubernetes.io~azure-disk` + normalizedPath := normalizeWindowsPath(path) + if normalizedPath != `c:\var\lib\kubelet\pods\146f8428-83e7-11e7-8dd4-000d3a31dac4\volumes\kubernetes.io~azure-disk` { + t.Errorf("normizeWindowsPath test failed, normalizedPath : %q", normalizedPath) + } + + path = `/var/lib/kubelet/pods/146f8428-83e7-11e7-8dd4-000d3a31dac4\volumes\kubernetes.io~azure-disk` + normalizedPath = normalizeWindowsPath(path) + if normalizedPath != `c:\var\lib\kubelet\pods\146f8428-83e7-11e7-8dd4-000d3a31dac4\volumes\kubernetes.io~azure-disk` { + t.Errorf("normizeWindowsPath test failed, normalizedPath : %q", normalizedPath) + } + + path = `/` + normalizedPath = normalizeWindowsPath(path) + if normalizedPath != `c:\` { + t.Errorf("normizeWindowsPath test failed, normalizedPath : %q", normalizedPath) + } +} + +func TestValidateDiskNumber(t *testing.T) { + diskNum := "0" + if err := ValidateDiskNumber(diskNum); err != nil { + t.Errorf("TestValidateDiskNumber test failed, disk number : %s", diskNum) + } + + diskNum = "99" + if err := ValidateDiskNumber(diskNum); err != nil { + t.Errorf("TestValidateDiskNumber test failed, disk number : %s", diskNum) + } + + diskNum = "ab" + if err := ValidateDiskNumber(diskNum); err == nil { + t.Errorf("TestValidateDiskNumber test failed, disk number : %s", diskNum) + } + + diskNum = "100" + if err := ValidateDiskNumber(diskNum); err == nil { + t.Errorf("TestValidateDiskNumber test failed, disk number : %s", diskNum) + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/util/mount/nsenter_mount_test.go b/vendor/k8s.io/kubernetes/pkg/util/mount/nsenter_mount_test.go new file mode 100644 index 000000000..946c0feb2 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/util/mount/nsenter_mount_test.go @@ -0,0 +1,67 @@ +// +build linux + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package mount + +import "testing" + +func TestParseFindMnt(t *testing.T) { + tests := []struct { + input string + target string + expectError bool + }{ + { + // standard mount name, e.g. for AWS + "/var/lib/kubelet/plugins/kubernetes.io/aws-ebs/mounts/aws/us-east-1d/vol-020f82b0759f72389 ext4\n", + "/var/lib/kubelet/plugins/kubernetes.io/aws-ebs/mounts/aws/us-east-1d/vol-020f82b0759f72389", + false, + }, + { + // mount name with space, e.g. vSphere + "/var/lib/kubelet/plugins/kubernetes.io/vsphere-volume/mounts/[datastore1] kubevols/kubernetes-dynamic-pvc-4aacaa9b-6ba5-11e7-8f64-0050569f1b82.vmdk ext2\n", + "/var/lib/kubelet/plugins/kubernetes.io/vsphere-volume/mounts/[datastore1] kubevols/kubernetes-dynamic-pvc-4aacaa9b-6ba5-11e7-8f64-0050569f1b82.vmdk", + false, + }, + { + // hypotetic mount with several spaces + "/var/lib/kubelet/plugins/kubernetes.io/vsphere-volume/mounts/[ d a t a s t o r e 1 ] kubevols/kubernetes-dynamic-pvc-4aacaa9b-6ba5-11e7-8f64-0050569f1b82.vmdk ext2\n", + "/var/lib/kubelet/plugins/kubernetes.io/vsphere-volume/mounts/[ d a t a s t o r e 1 ] kubevols/kubernetes-dynamic-pvc-4aacaa9b-6ba5-11e7-8f64-0050569f1b82.vmdk", + false, + }, + { + // invalid output - no filesystem type + "/var/lib/kubelet/plugins/kubernetes.io/vsphere-volume/mounts/blabla", + "", + true, + }, + } + + for i, test := range tests { + target, err := parseFindMnt(test.input) + if test.expectError && err == nil { + t.Errorf("test %d expected error, got nil", i) + } + if !test.expectError && err != nil { + t.Errorf("test %d returned error: %s", i, err) + } + if target != test.target { + t.Errorf("test %d expected %q, got %q", i, test.target, target) + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/util/mount/safe_format_and_mount_test.go b/vendor/k8s.io/kubernetes/pkg/util/mount/safe_format_and_mount_test.go new file mode 100644 index 000000000..72b768f3b --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/util/mount/safe_format_and_mount_test.go @@ -0,0 +1,234 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package mount + +import ( + "fmt" + "runtime" + "testing" + + fakeexec "k8s.io/utils/exec/testing" +) + +type ErrorMounter struct { + *FakeMounter + errIndex int + err []error +} + +func (mounter *ErrorMounter) Mount(source string, target string, fstype string, options []string) error { + i := mounter.errIndex + mounter.errIndex++ + if mounter.err != nil && mounter.err[i] != nil { + return mounter.err[i] + } + return mounter.FakeMounter.Mount(source, target, fstype, options) +} + +type ExecArgs struct { + command string + args []string + output string + err error +} + +func TestSafeFormatAndMount(t *testing.T) { + if runtime.GOOS == "darwin" || runtime.GOOS == "windows" { + t.Skipf("not supported on GOOS=%s", runtime.GOOS) + } + tests := []struct { + description string + fstype string + mountOptions []string + execScripts []ExecArgs + mountErrs []error + expectedError error + }{ + { + description: "Test a read only mount", + fstype: "ext4", + mountOptions: []string{"ro"}, + }, + { + description: "Test a normal mount", + fstype: "ext4", + execScripts: []ExecArgs{ + {"fsck", []string{"-a", "/dev/foo"}, "", nil}, + }, + }, + { + description: "Test 'fsck' fails with exit status 4", + fstype: "ext4", + execScripts: []ExecArgs{ + {"fsck", []string{"-a", "/dev/foo"}, "", &fakeexec.FakeExitError{Status: 4}}, + }, + expectedError: fmt.Errorf("'fsck' found errors on device /dev/foo but could not correct them: ."), + }, + { + description: "Test 'fsck' fails with exit status 1 (errors found and corrected)", + fstype: "ext4", + execScripts: []ExecArgs{ + {"fsck", []string{"-a", "/dev/foo"}, "", &fakeexec.FakeExitError{Status: 1}}, + }, + }, + { + description: "Test 'fsck' fails with exit status other than 1 and 4 (likely unformatted device)", + fstype: "ext4", + execScripts: []ExecArgs{ + {"fsck", []string{"-a", "/dev/foo"}, "", &fakeexec.FakeExitError{Status: 8}}, + }, + }, + { + description: "Test that 'lsblk' is called and fails", + fstype: "ext4", + mountErrs: []error{fmt.Errorf("unknown filesystem type '(null)'")}, + execScripts: []ExecArgs{ + {"fsck", []string{"-a", "/dev/foo"}, "", nil}, + {"lsblk", []string{"-n", "-o", "FSTYPE", "/dev/foo"}, "ext4\n", nil}, + }, + expectedError: fmt.Errorf("unknown filesystem type '(null)'"), + }, + { + description: "Test that 'lsblk' is called and confirms unformatted disk, format fails", + fstype: "ext4", + mountErrs: []error{fmt.Errorf("unknown filesystem type '(null)'")}, + execScripts: []ExecArgs{ + {"fsck", []string{"-a", "/dev/foo"}, "", nil}, + {"lsblk", []string{"-n", "-o", "FSTYPE", "/dev/foo"}, "\n", nil}, + {"mkfs.ext4", []string{"-F", "/dev/foo"}, "", fmt.Errorf("formatting failed")}, + }, + expectedError: fmt.Errorf("formatting failed"), + }, + { + description: "Test that 'lsblk' is called and confirms unformatted disk, format passes, second mount fails", + fstype: "ext4", + mountErrs: []error{fmt.Errorf("unknown filesystem type '(null)'"), fmt.Errorf("Still cannot mount")}, + execScripts: []ExecArgs{ + {"fsck", []string{"-a", "/dev/foo"}, "", nil}, + {"lsblk", []string{"-n", "-o", "FSTYPE", "/dev/foo"}, "\n", nil}, + {"mkfs.ext4", []string{"-F", "/dev/foo"}, "", nil}, + }, + expectedError: fmt.Errorf("Still cannot mount"), + }, + { + description: "Test that 'lsblk' is called and confirms unformatted disk, format passes, second mount passes", + fstype: "ext4", + mountErrs: []error{fmt.Errorf("unknown filesystem type '(null)'"), nil}, + execScripts: []ExecArgs{ + {"fsck", []string{"-a", "/dev/foo"}, "", nil}, + {"lsblk", []string{"-n", "-o", "FSTYPE", "/dev/foo"}, "\n", nil}, + {"mkfs.ext4", []string{"-F", "/dev/foo"}, "", nil}, + }, + expectedError: nil, + }, + { + description: "Test that 'lsblk' is called and confirms unformatted disk, format passes, second mount passes with ext3", + fstype: "ext3", + mountErrs: []error{fmt.Errorf("unknown filesystem type '(null)'"), nil}, + execScripts: []ExecArgs{ + {"fsck", []string{"-a", "/dev/foo"}, "", nil}, + {"lsblk", []string{"-n", "-o", "FSTYPE", "/dev/foo"}, "\n", nil}, + {"mkfs.ext3", []string{"-F", "/dev/foo"}, "", nil}, + }, + expectedError: nil, + }, + { + description: "test that none ext4 fs does not get called with ext4 options.", + fstype: "xfs", + mountErrs: []error{fmt.Errorf("unknown filesystem type '(null)'"), nil}, + execScripts: []ExecArgs{ + {"fsck", []string{"-a", "/dev/foo"}, "", nil}, + {"lsblk", []string{"-n", "-o", "FSTYPE", "/dev/foo"}, "\n", nil}, + {"mkfs.xfs", []string{"/dev/foo"}, "", nil}, + }, + expectedError: nil, + }, + { + description: "Test that 'lsblk' is called and reports ext4 partition", + fstype: "ext3", + mountErrs: []error{fmt.Errorf("unknown filesystem type '(null)'")}, + execScripts: []ExecArgs{ + {"fsck", []string{"-a", "/dev/foo"}, "", nil}, + {"lsblk", []string{"-n", "-o", "FSTYPE", "/dev/foo"}, "\next4\n", nil}, + }, + expectedError: fmt.Errorf("failed to mount the volume as \"ext3\", it already contains unknown data, probably partitions. Mount error: unknown filesystem type '(null)'"), + }, + { + description: "Test that 'lsblk' is called and reports empty partition", + fstype: "ext3", + mountErrs: []error{fmt.Errorf("unknown filesystem type '(null)'")}, + execScripts: []ExecArgs{ + {"fsck", []string{"-a", "/dev/foo"}, "", nil}, + {"lsblk", []string{"-n", "-o", "FSTYPE", "/dev/foo"}, "\n\n", nil}, + }, + expectedError: fmt.Errorf("failed to mount the volume as \"ext3\", it already contains unknown data, probably partitions. Mount error: unknown filesystem type '(null)'"), + }, + } + + for _, test := range tests { + execCallCount := 0 + execCallback := func(cmd string, args ...string) ([]byte, error) { + if len(test.execScripts) <= execCallCount { + t.Errorf("Unexpected command: %s %v", cmd, args) + return nil, nil + } + script := test.execScripts[execCallCount] + execCallCount++ + if script.command != cmd { + t.Errorf("Unexpected command %s. Expecting %s", cmd, script.command) + } + for j := range args { + if args[j] != script.args[j] { + t.Errorf("Unexpected args %v. Expecting %v", args, script.args) + } + } + return []byte(script.output), script.err + } + + fakeMounter := ErrorMounter{&FakeMounter{}, 0, test.mountErrs} + fakeExec := NewFakeExec(execCallback) + mounter := SafeFormatAndMount{ + Interface: &fakeMounter, + Exec: fakeExec, + } + + device := "/dev/foo" + dest := "/mnt/bar" + err := mounter.FormatAndMount(device, dest, test.fstype, test.mountOptions) + if test.expectedError == nil { + if err != nil { + t.Errorf("test \"%s\" unexpected non-error: %v", test.description, err) + } + + // Check that something was mounted on the directory + isNotMountPoint, err := fakeMounter.IsLikelyNotMountPoint(dest) + if err != nil || isNotMountPoint { + t.Errorf("test \"%s\" the directory was not mounted", test.description) + } + + //check that the correct device was mounted + mountedDevice, _, err := GetDeviceNameFromMount(fakeMounter.FakeMounter, dest) + if err != nil || mountedDevice != device { + t.Errorf("test \"%s\" the correct device was not mounted", test.description) + } + } else { + if err == nil || test.expectedError.Error() != err.Error() { + t.Errorf("test \"%s\" unexpected error: \n [%v]. \nExpecting [%v]", test.description, err, test.expectedError) + } + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/util/net/BUILD b/vendor/k8s.io/kubernetes/pkg/util/net/BUILD new file mode 100644 index 000000000..d52a77822 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/util/net/BUILD @@ -0,0 +1,17 @@ +package(default_visibility = ["//visibility:public"]) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [ + ":package-srcs", + "//pkg/util/net/sets:all-srcs", + ], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/kubernetes/pkg/util/net/sets/ipnet_test.go b/vendor/k8s.io/kubernetes/pkg/util/net/sets/ipnet_test.go new file mode 100644 index 000000000..524bd685b --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/util/net/sets/ipnet_test.go @@ -0,0 +1,155 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package sets + +import ( + "net" + "reflect" + "sort" + "testing" +) + +func parseIPNet(s string) *net.IPNet { + _, net, err := net.ParseCIDR(s) + if err != nil { + panic(err) + } + return net +} + +func TestIPNets(t *testing.T) { + s := IPNet{} + s2 := IPNet{} + if len(s) != 0 { + t.Errorf("Expected len=0: %d", len(s)) + } + a := parseIPNet("1.0.0.0/8") + b := parseIPNet("2.0.0.0/8") + c := parseIPNet("3.0.0.0/8") + d := parseIPNet("4.0.0.0/8") + + s.Insert(a, b) + if len(s) != 2 { + t.Errorf("Expected len=2: %d", len(s)) + } + s.Insert(c) + if s.Has(d) { + t.Errorf("Unexpected contents: %#v", s) + } + if !s.Has(a) { + t.Errorf("Missing contents: %#v", s) + } + s.Delete(a) + if s.Has(a) { + t.Errorf("Unexpected contents: %#v", s) + } + s.Insert(a) + if s.HasAll(a, b, d) { + t.Errorf("Unexpected contents: %#v", s) + } + if !s.HasAll(a, b) { + t.Errorf("Missing contents: %#v", s) + } + s2.Insert(a, b, d) + if s.IsSuperset(s2) { + t.Errorf("Unexpected contents: %#v", s) + } + s2.Delete(d) + if !s.IsSuperset(s2) { + t.Errorf("Missing contents: %#v", s) + } +} + +func TestIPNetSetDeleteMultiples(t *testing.T) { + s := IPNet{} + a := parseIPNet("1.0.0.0/8") + b := parseIPNet("2.0.0.0/8") + c := parseIPNet("3.0.0.0/8") + + s.Insert(a, b, c) + if len(s) != 3 { + t.Errorf("Expected len=3: %d", len(s)) + } + + s.Delete(a, c) + if len(s) != 1 { + t.Errorf("Expected len=1: %d", len(s)) + } + if s.Has(a) { + t.Errorf("Unexpected contents: %#v", s) + } + if s.Has(c) { + t.Errorf("Unexpected contents: %#v", s) + } + if !s.Has(b) { + t.Errorf("Missing contents: %#v", s) + } +} + +func TestNewIPSet(t *testing.T) { + s, err := ParseIPNets("1.0.0.0/8", "2.0.0.0/8", "3.0.0.0/8") + if err != nil { + t.Errorf("error parsing IPNets: %v", err) + } + if len(s) != 3 { + t.Errorf("Expected len=3: %d", len(s)) + } + a := parseIPNet("1.0.0.0/8") + b := parseIPNet("2.0.0.0/8") + c := parseIPNet("3.0.0.0/8") + + if !s.Has(a) || !s.Has(b) || !s.Has(c) { + t.Errorf("Unexpected contents: %#v", s) + } +} + +func TestIPNetSetDifference(t *testing.T) { + l, err := ParseIPNets("1.0.0.0/8", "2.0.0.0/8", "3.0.0.0/8") + if err != nil { + t.Errorf("error parsing IPNets: %v", err) + } + r, err := ParseIPNets("1.0.0.0/8", "2.0.0.0/8", "4.0.0.0/8", "5.0.0.0/8") + if err != nil { + t.Errorf("error parsing IPNets: %v", err) + } + c := l.Difference(r) + d := r.Difference(l) + if len(c) != 1 { + t.Errorf("Expected len=1: %d", len(c)) + } + if !c.Has(parseIPNet("3.0.0.0/8")) { + t.Errorf("Unexpected contents: %#v", c) + } + if len(d) != 2 { + t.Errorf("Expected len=2: %d", len(d)) + } + if !d.Has(parseIPNet("4.0.0.0/8")) || !d.Has(parseIPNet("5.0.0.0/8")) { + t.Errorf("Unexpected contents: %#v", d) + } +} + +func TestIPNetSetList(t *testing.T) { + s, err := ParseIPNets("3.0.0.0/8", "1.0.0.0/8", "2.0.0.0/8") + if err != nil { + t.Errorf("error parsing IPNets: %v", err) + } + l := s.StringSlice() + sort.Strings(l) + if !reflect.DeepEqual(l, []string{"1.0.0.0/8", "2.0.0.0/8", "3.0.0.0/8"}) { + t.Errorf("List gave unexpected result: %#v", l) + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/util/parsers/parsers_test.go b/vendor/k8s.io/kubernetes/pkg/util/parsers/parsers_test.go new file mode 100644 index 000000000..c3e004fbd --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/util/parsers/parsers_test.go @@ -0,0 +1,51 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package parsers + +import ( + "testing" +) + +// Based on Docker test case removed in: +// https://github.com/docker/docker/commit/4352da7803d182a6013a5238ce20a7c749db979a +func TestParseImageName(t *testing.T) { + testCases := []struct { + Input string + Repo string + Tag string + Digest string + }{ + {Input: "root", Repo: "docker.io/library/root", Tag: "latest"}, + {Input: "root:tag", Repo: "docker.io/library/root", Tag: "tag"}, + {Input: "root@sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", Repo: "docker.io/library/root", Digest: "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"}, + {Input: "user/repo", Repo: "docker.io/user/repo", Tag: "latest"}, + {Input: "user/repo:tag", Repo: "docker.io/user/repo", Tag: "tag"}, + {Input: "user/repo@sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", Repo: "docker.io/user/repo", Digest: "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"}, + {Input: "url:5000/repo", Repo: "url:5000/repo", Tag: "latest"}, + {Input: "url:5000/repo:tag", Repo: "url:5000/repo", Tag: "tag"}, + {Input: "url:5000/repo@sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", Repo: "url:5000/repo", Digest: "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"}, + } + for _, testCase := range testCases { + repo, tag, digest, err := ParseImageName(testCase.Input) + if err != nil { + t.Errorf("ParseImageName(%s) failed: %v", testCase.Input, err) + } else if repo != testCase.Repo || tag != testCase.Tag || digest != testCase.Digest { + t.Errorf("Expected repo: %q, tag: %q and digest: %q, got %q, %q and %q", testCase.Repo, testCase.Tag, testCase.Digest, + repo, tag, digest) + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/util/pointer/pointer_test.go b/vendor/k8s.io/kubernetes/pkg/util/pointer/pointer_test.go new file mode 100644 index 000000000..59a6bd5d1 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/util/pointer/pointer_test.go @@ -0,0 +1,66 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package pointer + +import ( + "testing" +) + +func TestAllPtrFieldsNil(t *testing.T) { + testCases := []struct { + obj interface{} + expected bool + }{ + {struct{}{}, true}, + {struct{ Foo int }{12345}, true}, + {&struct{ Foo int }{12345}, true}, + {struct{ Foo *int }{nil}, true}, + {&struct{ Foo *int }{nil}, true}, + {struct { + Foo int + Bar *int + }{12345, nil}, true}, + {&struct { + Foo int + Bar *int + }{12345, nil}, true}, + {struct { + Foo *int + Bar *int + }{nil, nil}, true}, + {&struct { + Foo *int + Bar *int + }{nil, nil}, true}, + {struct{ Foo *int }{new(int)}, false}, + {&struct{ Foo *int }{new(int)}, false}, + {struct { + Foo *int + Bar *int + }{nil, new(int)}, false}, + {&struct { + Foo *int + Bar *int + }{nil, new(int)}, false}, + {(*struct{})(nil), true}, + } + for i, tc := range testCases { + if AllPtrFieldsNil(tc.obj) != tc.expected { + t.Errorf("case[%d]: expected %t, got %t", i, tc.expected, !tc.expected) + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/util/taints/taints_test.go b/vendor/k8s.io/kubernetes/pkg/util/taints/taints_test.go new file mode 100644 index 000000000..e27e6ad37 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/util/taints/taints_test.go @@ -0,0 +1,113 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package taints + +import ( + "reflect" + "strings" + "testing" + + "k8s.io/api/core/v1" + "k8s.io/kubernetes/pkg/api" + + "github.com/spf13/pflag" +) + +func TestTaintsVar(t *testing.T) { + cases := []struct { + f string + err bool + t []api.Taint + }{ + { + f: "", + t: []api.Taint(nil), + }, + { + f: "--t=foo=bar:NoSchedule", + t: []api.Taint{{Key: "foo", Value: "bar", Effect: "NoSchedule"}}, + }, + { + f: "--t=foo=bar:NoSchedule,bing=bang:PreferNoSchedule", + t: []api.Taint{ + {Key: "foo", Value: "bar", Effect: api.TaintEffectNoSchedule}, + {Key: "bing", Value: "bang", Effect: api.TaintEffectPreferNoSchedule}, + }, + }, + { + f: "--t=dedicated-for=user1:NoExecute", + t: []api.Taint{{Key: "dedicated-for", Value: "user1", Effect: "NoExecute"}}, + }, + } + + for i, c := range cases { + args := append([]string{"test"}, strings.Fields(c.f)...) + cli := pflag.NewFlagSet("test", pflag.ContinueOnError) + var taints []api.Taint + cli.Var(NewTaintsVar(&taints), "t", "bar") + + err := cli.Parse(args) + if err == nil && c.err { + t.Errorf("[%v] expected error", i) + continue + } + if err != nil && !c.err { + t.Errorf("[%v] unexpected error: %v", i, err) + continue + } + if !reflect.DeepEqual(c.t, taints) { + t.Errorf("[%v] unexpected taints:\n\texpected:\n\t\t%#v\n\tgot:\n\t\t%#v", i, c.t, taints) + } + } + +} + +func TestAddOrUpdateTaint(t *testing.T) { + node := &v1.Node{} + + taint := &v1.Taint{ + Key: "foo", + Value: "bar", + Effect: v1.TaintEffectNoSchedule, + } + + checkResult := func(testCaseName string, newNode *v1.Node, expectedTaint *v1.Taint, result, expectedResult bool, err error) { + if err != nil { + t.Errorf("[%s] should not raise error but got %v", testCaseName, err) + } + if result != expectedResult { + t.Errorf("[%s] should return %t, but got: %t", testCaseName, expectedResult, result) + } + if len(newNode.Spec.Taints) != 1 || !reflect.DeepEqual(newNode.Spec.Taints[0], *expectedTaint) { + t.Errorf("[%s] node should only have one taint: %v, but got: %v", testCaseName, *expectedTaint, newNode.Spec.Taints) + } + } + + // Add a new Taint. + newNode, result, err := AddOrUpdateTaint(node, taint) + checkResult("Add New Taint", newNode, taint, result, true, err) + + // Update a Taint. + taint.Value = "bar_1" + newNode, result, err = AddOrUpdateTaint(node, taint) + checkResult("Update Taint", newNode, taint, result, true, err) + + // Add a duplicate Taint. + node = newNode + newNode, result, err = AddOrUpdateTaint(node, taint) + checkResult("Add Duplicate Taint", newNode, taint, result, false, err) +} diff --git a/vendor/k8s.io/kubernetes/pkg/util/verify-util-pkg.sh b/vendor/k8s.io/kubernetes/pkg/util/verify-util-pkg.sh new file mode 100755 index 000000000..755924a09 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/util/verify-util-pkg.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +# Copyright 2017 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# verify-util-pkg.sh checks whether *.go except doc.go in pkg/util have been moved into +# sub-pkgs, see issue #15634. + +set -o errexit +set -o nounset +set -o pipefail + +BASH_DIR=$(dirname "${BASH_SOURCE}") + +find_go_files() { + find . -maxdepth 1 -not \( \ + \( \ + -wholename './doc.go' \ + \) -prune \ + \) -name '*.go' +} + +ret=0 + +pushd "${BASH_DIR}" > /dev/null + for path in `find_go_files`; do + file=$(basename $path) + echo "Found pkg/util/${file}, but should be moved into util sub-pkgs." 1>&2 + ret=1 + done +popd > /dev/null + +if [[ ${ret} > 0 ]]; then + exit ${ret} +fi + +echo "Util Package Verified." diff --git a/vendor/k8s.io/kubernetes/pkg/util/version/version.go b/vendor/k8s.io/kubernetes/pkg/util/version/version.go deleted file mode 100644 index e8cd0cecf..000000000 --- a/vendor/k8s.io/kubernetes/pkg/util/version/version.go +++ /dev/null @@ -1,264 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package version - -import ( - "bytes" - "fmt" - "regexp" - "strconv" - "strings" -) - -// Version is an opqaue representation of a version number -type Version struct { - components []uint - semver bool - preRelease string - buildMetadata string -} - -var ( - // versionMatchRE splits a version string into numeric and "extra" parts - versionMatchRE = regexp.MustCompile(`^\s*v?([0-9]+(?:\.[0-9]+)*)(.*)*$`) - // extraMatchRE splits the "extra" part of versionMatchRE into semver pre-release and build metadata; it does not validate the "no leading zeroes" constraint for pre-release - extraMatchRE = regexp.MustCompile(`^(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?\s*$`) -) - -func parse(str string, semver bool) (*Version, error) { - parts := versionMatchRE.FindStringSubmatch(str) - if parts == nil { - return nil, fmt.Errorf("could not parse %q as version", str) - } - numbers, extra := parts[1], parts[2] - - components := strings.Split(numbers, ".") - if (semver && len(components) != 3) || (!semver && len(components) < 2) { - return nil, fmt.Errorf("illegal version string %q", str) - } - - v := &Version{ - components: make([]uint, len(components)), - semver: semver, - } - for i, comp := range components { - if (i == 0 || semver) && strings.HasPrefix(comp, "0") && comp != "0" { - return nil, fmt.Errorf("illegal zero-prefixed version component %q in %q", comp, str) - } - num, err := strconv.ParseUint(comp, 10, 0) - if err != nil { - return nil, fmt.Errorf("illegal non-numeric version component %q in %q: %v", comp, str, err) - } - v.components[i] = uint(num) - } - - if semver && extra != "" { - extraParts := extraMatchRE.FindStringSubmatch(extra) - if extraParts == nil { - return nil, fmt.Errorf("could not parse pre-release/metadata (%s) in version %q", extra, str) - } - v.preRelease, v.buildMetadata = extraParts[1], extraParts[2] - - for _, comp := range strings.Split(v.preRelease, ".") { - if _, err := strconv.ParseUint(comp, 10, 0); err == nil { - if strings.HasPrefix(comp, "0") && comp != "0" { - return nil, fmt.Errorf("illegal zero-prefixed version component %q in %q", comp, str) - } - } - } - } - - return v, nil -} - -// ParseGeneric parses a "generic" version string. The version string must consist of two -// or more dot-separated numeric fields (the first of which can't have leading zeroes), -// followed by arbitrary uninterpreted data (which need not be separated from the final -// numeric field by punctuation). For convenience, leading and trailing whitespace is -// ignored, and the version can be preceded by the letter "v". See also ParseSemantic. -func ParseGeneric(str string) (*Version, error) { - return parse(str, false) -} - -// MustParseGeneric is like ParseGeneric except that it panics on error -func MustParseGeneric(str string) *Version { - v, err := ParseGeneric(str) - if err != nil { - panic(err) - } - return v -} - -// ParseSemantic parses a version string that exactly obeys the syntax and semantics of -// the "Semantic Versioning" specification (http://semver.org/) (although it ignores -// leading and trailing whitespace, and allows the version to be preceded by "v"). For -// version strings that are not guaranteed to obey the Semantic Versioning syntax, use -// ParseGeneric. -func ParseSemantic(str string) (*Version, error) { - return parse(str, true) -} - -// MustParseSemantic is like ParseSemantic except that it panics on error -func MustParseSemantic(str string) *Version { - v, err := ParseSemantic(str) - if err != nil { - panic(err) - } - return v -} - -// Major returns the major release number -func (v *Version) Major() uint { - return v.components[0] -} - -// Minor returns the minor release number -func (v *Version) Minor() uint { - return v.components[1] -} - -// Patch returns the patch release number if v is a Semantic Version, or 0 -func (v *Version) Patch() uint { - if len(v.components) < 3 { - return 0 - } - return v.components[2] -} - -// BuildMetadata returns the build metadata, if v is a Semantic Version, or "" -func (v *Version) BuildMetadata() string { - return v.buildMetadata -} - -// PreRelease returns the prerelease metadata, if v is a Semantic Version, or "" -func (v *Version) PreRelease() string { - return v.preRelease -} - -// Components returns the version number components -func (v *Version) Components() []uint { - return v.components -} - -// String converts a Version back to a string; note that for versions parsed with -// ParseGeneric, this will not include the trailing uninterpreted portion of the version -// number. -func (v *Version) String() string { - var buffer bytes.Buffer - - for i, comp := range v.components { - if i > 0 { - buffer.WriteString(".") - } - buffer.WriteString(fmt.Sprintf("%d", comp)) - } - if v.preRelease != "" { - buffer.WriteString("-") - buffer.WriteString(v.preRelease) - } - if v.buildMetadata != "" { - buffer.WriteString("+") - buffer.WriteString(v.buildMetadata) - } - - return buffer.String() -} - -// compareInternal returns -1 if v is less than other, 1 if it is greater than other, or 0 -// if they are equal -func (v *Version) compareInternal(other *Version) int { - for i := range v.components { - switch { - case i >= len(other.components): - if v.components[i] != 0 { - return 1 - } - case other.components[i] < v.components[i]: - return 1 - case other.components[i] > v.components[i]: - return -1 - } - } - - if !v.semver || !other.semver { - return 0 - } - - switch { - case v.preRelease == "" && other.preRelease != "": - return 1 - case v.preRelease != "" && other.preRelease == "": - return -1 - case v.preRelease == other.preRelease: // includes case where both are "" - return 0 - } - - vPR := strings.Split(v.preRelease, ".") - oPR := strings.Split(other.preRelease, ".") - for i := range vPR { - if i >= len(oPR) { - return 1 - } - vNum, err := strconv.ParseUint(vPR[i], 10, 0) - if err == nil { - oNum, err := strconv.ParseUint(oPR[i], 10, 0) - if err == nil { - switch { - case oNum < vNum: - return 1 - case oNum > vNum: - return -1 - default: - continue - } - } - } - if oPR[i] < vPR[i] { - return 1 - } else if oPR[i] > vPR[i] { - return -1 - } - } - - return 0 -} - -// AtLeast tests if a version is at least equal to a given minimum version. If both -// Versions are Semantic Versions, this will use the Semantic Version comparison -// algorithm. Otherwise, it will compare only the numeric components, with non-present -// components being considered "0" (ie, "1.4" is equal to "1.4.0"). -func (v *Version) AtLeast(min *Version) bool { - return v.compareInternal(min) != -1 -} - -// LessThan tests if a version is less than a given version. (It is exactly the opposite -// of AtLeast, for situations where asking "is v too old?" makes more sense than asking -// "is v new enough?".) -func (v *Version) LessThan(other *Version) bool { - return v.compareInternal(other) == -1 -} - -// Compare compares v against a version string (which will be parsed as either Semantic -// or non-Semantic depending on v). On success it returns -1 if v is less than other, 1 if -// it is greater than other, or 0 if they are equal. -func (v *Version) Compare(other string) (int, error) { - ov, err := parse(other, v.semver) - if err != nil { - return 0, err - } - return v.compareInternal(ov), nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/volume/doc.go b/vendor/k8s.io/kubernetes/pkg/volume/doc.go index df39f3291..c98a5a153 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package volume includes internal representations of external volume types // as well as utility methods required to mount/unmount volumes to kubelets. -package volume +package volume // import "k8s.io/kubernetes/pkg/volume" diff --git a/vendor/k8s.io/kubernetes/pkg/volume/metrics_du_test.go b/vendor/k8s.io/kubernetes/pkg/volume/metrics_du_test.go new file mode 100644 index 000000000..3bee08bf1 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/volume/metrics_du_test.go @@ -0,0 +1,112 @@ +// +build linux + +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package volume_test + +import ( + "io/ioutil" + "os" + "path/filepath" + "testing" + + "golang.org/x/sys/unix" + utiltesting "k8s.io/client-go/util/testing" + . "k8s.io/kubernetes/pkg/volume" + volumetest "k8s.io/kubernetes/pkg/volume/testing" +) + +func getExpectedBlockSize(path string) int64 { + statfs := &unix.Statfs_t{} + err := unix.Statfs(path, statfs) + if err != nil { + return 0 + } + + return int64(statfs.Bsize) +} + +// TestMetricsDuGetCapacity tests that MetricsDu can read disk usage +// for path +func TestMetricsDuGetCapacity(t *testing.T) { + tmpDir, err := utiltesting.MkTmpdir("metrics_du_test") + if err != nil { + t.Fatalf("Can't make a tmp dir: %v", err) + } + defer os.RemoveAll(tmpDir) + metrics := NewMetricsDu(tmpDir) + + expectedEmptyDirUsage, err := volumetest.FindEmptyDirectoryUsageOnTmpfs() + if err != nil { + t.Errorf("Unexpected error finding expected empty directory usage on tmpfs: %v", err) + } + + actual, err := metrics.GetMetrics() + if err != nil { + t.Errorf("Unexpected error when calling GetMetrics %v", err) + } + if e, a := expectedEmptyDirUsage.Value(), actual.Used.Value(); e != a { + t.Errorf("Unexpected value for empty directory; expected %v, got %v", e, a) + } + + // TODO(pwittroc): Figure out a way to test these values for correctness, maybe by formatting and mounting a file + // as a filesystem + if a := actual.Capacity.Value(); a <= 0 { + t.Errorf("Expected Capacity %d to be greater than 0.", a) + } + if a := actual.Available.Value(); a <= 0 { + t.Errorf("Expected Available %d to be greater than 0.", a) + } + + // Write a file and expect Used to increase + ioutil.WriteFile(filepath.Join(tmpDir, "f1"), []byte("Hello World"), os.ModeTemporary) + actual, err = metrics.GetMetrics() + if err != nil { + t.Errorf("Unexpected error when calling GetMetrics %v", err) + } + if e, a := (expectedEmptyDirUsage.Value() + getExpectedBlockSize(filepath.Join(tmpDir, "f1"))), actual.Used.Value(); e != a { + t.Errorf("Unexpected Used for directory with file. Expected %v, got %d.", e, a) + } +} + +// TestMetricsDuRequireInit tests that if MetricsDu is not initialized with a path, GetMetrics +// returns an error +func TestMetricsDuRequirePath(t *testing.T) { + metrics := NewMetricsDu("") + actual, err := metrics.GetMetrics() + expected := &Metrics{} + if !volumetest.MetricsEqualIgnoreTimestamp(actual, expected) { + t.Errorf("Expected empty Metrics from uninitialized MetricsDu, actual %v", *actual) + } + if err == nil { + t.Errorf("Expected error when calling GetMetrics on uninitialized MetricsDu, actual nil") + } +} + +// TestMetricsDuRealDirectory tests that if MetricsDu is initialized to a non-existent path, GetMetrics +// returns an error +func TestMetricsDuRequireRealDirectory(t *testing.T) { + metrics := NewMetricsDu("/not/a/real/directory") + actual, err := metrics.GetMetrics() + expected := &Metrics{} + if !volumetest.MetricsEqualIgnoreTimestamp(actual, expected) { + t.Errorf("Expected empty Metrics from incorrectly initialized MetricsDu, actual %v", *actual) + } + if err == nil { + t.Errorf("Expected error when calling GetMetrics on incorrectly initialized MetricsDu, actual nil") + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/volume/metrics_nil_test.go b/vendor/k8s.io/kubernetes/pkg/volume/metrics_nil_test.go new file mode 100644 index 000000000..e6a25d1ff --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/volume/metrics_nil_test.go @@ -0,0 +1,33 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package volume + +import ( + "testing" +) + +func TestMetricsNilGetCapacity(t *testing.T) { + metrics := &MetricsNil{} + actual, err := metrics.GetMetrics() + expected := &Metrics{} + if *actual != *expected { + t.Errorf("Expected empty Metrics, actual %v", *actual) + } + if err == nil { + t.Errorf("Expected error when calling GetMetrics, actual nil") + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/volume/metrics_statfs_test.go b/vendor/k8s.io/kubernetes/pkg/volume/metrics_statfs_test.go new file mode 100644 index 000000000..751991e6f --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/volume/metrics_statfs_test.go @@ -0,0 +1,67 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package volume_test + +import ( + "os" + "testing" + + utiltesting "k8s.io/client-go/util/testing" + . "k8s.io/kubernetes/pkg/volume" + volumetest "k8s.io/kubernetes/pkg/volume/testing" +) + +func TestGetMetricsStatFS(t *testing.T) { + metrics := NewMetricsStatFS("") + actual, err := metrics.GetMetrics() + expected := &Metrics{} + if !volumetest.MetricsEqualIgnoreTimestamp(actual, expected) { + t.Errorf("Expected empty Metrics from uninitialized MetricsStatFS, actual %v", *actual) + } + if err == nil { + t.Errorf("Expected error when calling GetMetrics on uninitialized MetricsStatFS, actual nil") + } + + metrics = NewMetricsStatFS("/not/a/real/directory") + actual, err = metrics.GetMetrics() + if !volumetest.MetricsEqualIgnoreTimestamp(actual, expected) { + t.Errorf("Expected empty Metrics from incorrectly initialized MetricsStatFS, actual %v", *actual) + } + if err == nil { + t.Errorf("Expected error when calling GetMetrics on incorrectly initialized MetricsStatFS, actual nil") + } + + tmpDir, err := utiltesting.MkTmpdir("metric_statfs_test") + if err != nil { + t.Fatalf("Can't make a tmp dir: %v", err) + } + defer os.RemoveAll(tmpDir) + + metrics = NewMetricsStatFS(tmpDir) + actual, err = metrics.GetMetrics() + if err != nil { + t.Errorf("Unexpected error when calling GetMetrics %v", err) + } + + if a := actual.Capacity.Value(); a <= 0 { + t.Errorf("Expected Capacity %d to be greater than 0.", a) + } + if a := actual.Available.Value(); a <= 0 { + t.Errorf("Expected Available %d to be greater than 0.", a) + } + +} diff --git a/vendor/k8s.io/kubernetes/pkg/volume/plugins_test.go b/vendor/k8s.io/kubernetes/pkg/volume/plugins_test.go new file mode 100644 index 000000000..b8d74a26f --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/volume/plugins_test.go @@ -0,0 +1,165 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package volume + +import ( + "testing" + + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" +) + +func TestSpecSourceConverters(t *testing.T) { + v := &v1.Volume{ + Name: "foo", + VolumeSource: v1.VolumeSource{EmptyDir: &v1.EmptyDirVolumeSource{}}, + } + + converted := NewSpecFromVolume(v) + if converted.Volume.EmptyDir == nil { + t.Errorf("Unexpected nil EmptyDir: %#v", converted) + } + if v.Name != converted.Name() { + t.Errorf("Expected %v but got %v", v.Name, converted.Name()) + } + + pv := &v1.PersistentVolume{ + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, + Spec: v1.PersistentVolumeSpec{ + PersistentVolumeSource: v1.PersistentVolumeSource{AWSElasticBlockStore: &v1.AWSElasticBlockStoreVolumeSource{}}, + }, + } + + converted = NewSpecFromPersistentVolume(pv, false) + if converted.PersistentVolume.Spec.AWSElasticBlockStore == nil { + t.Errorf("Unexpected nil AWSElasticBlockStore: %#v", converted) + } + if pv.Name != converted.Name() { + t.Errorf("Expected %v but got %v", pv.Name, converted.Name()) + } +} + +type testPlugins struct { +} + +func (plugin *testPlugins) Init(host VolumeHost) error { + return nil +} + +func (plugin *testPlugins) GetPluginName() string { + return "testPlugin" +} + +func (plugin *testPlugins) GetVolumeName(spec *Spec) (string, error) { + return "", nil +} + +func (plugin *testPlugins) CanSupport(spec *Spec) bool { + return true +} + +func (plugin *testPlugins) RequiresRemount() bool { + return false +} + +func (plugin *testPlugins) SupportsMountOption() bool { + return false +} + +func (plugin *testPlugins) SupportsBulkVolumeVerification() bool { + return false +} + +func (plugin *testPlugins) NewMounter(spec *Spec, podRef *v1.Pod, opts VolumeOptions) (Mounter, error) { + return nil, nil +} + +func (plugin *testPlugins) NewUnmounter(name string, podUID types.UID) (Unmounter, error) { + return nil, nil +} + +func (plugin *testPlugins) ConstructVolumeSpec(volumeName, mountPath string) (*Spec, error) { + return nil, nil +} + +func newTestPlugin() []VolumePlugin { + return []VolumePlugin{&testPlugins{}} +} + +func TestVolumePluginMgrFunc(t *testing.T) { + vpm := VolumePluginMgr{} + var prober DynamicPluginProber = nil // TODO (#51147) inject mock + vpm.InitPlugins(newTestPlugin(), prober, nil) + + plug, err := vpm.FindPluginByName("testPlugin") + if err != nil { + t.Errorf("Can't find the plugin by name") + } + if plug.GetPluginName() != "testPlugin" { + t.Errorf("Wrong name: %s", plug.GetPluginName()) + } + + plug, err = vpm.FindPluginBySpec(nil) + if err == nil { + t.Errorf("Should return error if volume spec is nil") + } + + volumeSpec := &Spec{} + plug, err = vpm.FindPluginBySpec(volumeSpec) + if err != nil { + t.Errorf("Should return test plugin if volume spec is not nil") + } +} + +func Test_ValidatePodTemplate(t *testing.T) { + pod := &v1.Pod{ + Spec: v1.PodSpec{ + Volumes: []v1.Volume{ + { + Name: "vol", + VolumeSource: v1.VolumeSource{}, + }, + }, + }, + } + var want error + if got := ValidateRecyclerPodTemplate(pod); got != want { + t.Errorf("isPodTemplateValid(%v) returned (%v), want (%v)", pod.String(), got.Error(), want) + } + + // Check that the default recycle pod template is valid + pod = NewPersistentVolumeRecyclerPodTemplate() + want = nil + if got := ValidateRecyclerPodTemplate(pod); got != want { + t.Errorf("isPodTemplateValid(%v) returned (%v), want (%v)", pod.String(), got.Error(), want) + } + + pod = &v1.Pod{ + Spec: v1.PodSpec{ + Containers: []v1.Container{ + { + Name: "pv-recycler", + }, + }, + }, + } + // want = an error + if got := ValidateRecyclerPodTemplate(pod); got == nil { + t.Errorf("isPodTemplateValid(%v) returned (%v), want (%v)", pod.String(), got, "Error: pod specification does not contain any volume(s).") + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/atomic_writer_test.go b/vendor/k8s.io/kubernetes/pkg/volume/util/atomic_writer_test.go new file mode 100644 index 000000000..f535e1494 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/atomic_writer_test.go @@ -0,0 +1,785 @@ +// +build linux + +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package util + +import ( + "encoding/base64" + "io/ioutil" + "os" + "path" + "path/filepath" + "reflect" + "strings" + "testing" + + "k8s.io/apimachinery/pkg/util/sets" + utiltesting "k8s.io/client-go/util/testing" +) + +func TestNewAtomicWriter(t *testing.T) { + targetDir, err := utiltesting.MkTmpdir("atomic-write") + if err != nil { + t.Fatalf("unexpected error creating tmp dir: %v", err) + } + defer os.RemoveAll(targetDir) + + _, err = NewAtomicWriter(targetDir, "-test-") + if err != nil { + t.Fatalf("unexpected error creating writer for existing target dir: %v", err) + } + + nonExistentDir, err := utiltesting.MkTmpdir("atomic-write") + if err != nil { + t.Fatalf("unexpected error creating tmp dir: %v", err) + } + err = os.Remove(nonExistentDir) + if err != nil { + t.Fatalf("unexpected error ensuring dir %v does not exist: %v", nonExistentDir, err) + } + + _, err = NewAtomicWriter(nonExistentDir, "-test-") + if err == nil { + t.Fatalf("unexpected success creating writer for nonexistent target dir: %v", err) + } +} + +func TestValidatePath(t *testing.T) { + maxPath := strings.Repeat("a", maxPathLength+1) + maxFile := strings.Repeat("a", maxFileNameLength+1) + + cases := []struct { + name string + path string + valid bool + }{ + { + name: "valid 1", + path: "i/am/well/behaved.txt", + valid: true, + }, + { + name: "valid 2", + path: "keepyourheaddownandfollowtherules.txt", + valid: true, + }, + { + name: "max path length", + path: maxPath, + valid: false, + }, + { + name: "max file length", + path: maxFile, + valid: false, + }, + { + name: "absolute failure", + path: "/dev/null", + valid: false, + }, + { + name: "reserved path", + path: "..sneaky.txt", + valid: false, + }, + { + name: "contains doubledot 1", + path: "hello/there/../../../../../../etc/passwd", + valid: false, + }, + { + name: "contains doubledot 2", + path: "hello/../etc/somethingbad", + valid: false, + }, + { + name: "empty", + path: "", + valid: false, + }, + } + + for _, tc := range cases { + err := validatePath(tc.path) + if tc.valid && err != nil { + t.Errorf("%v: unexpected failure: %v", tc.name, err) + continue + } + + if !tc.valid && err == nil { + t.Errorf("%v: unexpected success", tc.name) + } + } +} + +func TestPathsToRemove(t *testing.T) { + cases := []struct { + name string + payload1 map[string]FileProjection + payload2 map[string]FileProjection + expected sets.String + }{ + { + name: "simple", + payload1: map[string]FileProjection{ + "foo.txt": {Mode: 0644, Data: []byte("foo")}, + "bar.txt": {Mode: 0644, Data: []byte("bar")}, + }, + payload2: map[string]FileProjection{ + "foo.txt": {Mode: 0644, Data: []byte("foo")}, + }, + expected: sets.NewString("bar.txt"), + }, + { + name: "simple 2", + payload1: map[string]FileProjection{ + "foo.txt": {Mode: 0644, Data: []byte("foo")}, + "zip/bar.txt": {Mode: 0644, Data: []byte("zip/b}ar")}, + }, + payload2: map[string]FileProjection{ + "foo.txt": {Mode: 0644, Data: []byte("foo")}, + }, + expected: sets.NewString("zip/bar.txt", "zip"), + }, + { + name: "subdirs 1", + payload1: map[string]FileProjection{ + "foo.txt": {Mode: 0644, Data: []byte("foo")}, + "zip/zap/bar.txt": {Mode: 0644, Data: []byte("zip/bar")}, + }, + payload2: map[string]FileProjection{ + "foo.txt": {Mode: 0644, Data: []byte("foo")}, + }, + expected: sets.NewString("zip/zap/bar.txt", "zip", "zip/zap"), + }, + { + name: "subdirs 2", + payload1: map[string]FileProjection{ + "foo.txt": {Mode: 0644, Data: []byte("foo")}, + "zip/1/2/3/4/bar.txt": {Mode: 0644, Data: []byte("zip/b}ar")}, + }, + payload2: map[string]FileProjection{ + "foo.txt": {Mode: 0644, Data: []byte("foo")}, + }, + expected: sets.NewString("zip/1/2/3/4/bar.txt", "zip", "zip/1", "zip/1/2", "zip/1/2/3", "zip/1/2/3/4"), + }, + { + name: "subdirs 3", + payload1: map[string]FileProjection{ + "foo.txt": {Mode: 0644, Data: []byte("foo")}, + "zip/1/2/3/4/bar.txt": {Mode: 0644, Data: []byte("zip/b}ar")}, + "zap/a/b/c/bar.txt": {Mode: 0644, Data: []byte("zap/bar")}, + }, + payload2: map[string]FileProjection{ + "foo.txt": {Mode: 0644, Data: []byte("foo")}, + }, + expected: sets.NewString("zip/1/2/3/4/bar.txt", "zip", "zip/1", "zip/1/2", "zip/1/2/3", "zip/1/2/3/4", "zap", "zap/a", "zap/a/b", "zap/a/b/c", "zap/a/b/c/bar.txt"), + }, + { + name: "subdirs 4", + payload1: map[string]FileProjection{ + "foo.txt": {Mode: 0644, Data: []byte("foo")}, + "zap/1/2/3/4/bar.txt": {Mode: 0644, Data: []byte("zip/bar")}, + "zap/1/2/c/bar.txt": {Mode: 0644, Data: []byte("zap/bar")}, + "zap/1/2/magic.txt": {Mode: 0644, Data: []byte("indigo")}, + }, + payload2: map[string]FileProjection{ + "foo.txt": {Mode: 0644, Data: []byte("foo")}, + "zap/1/2/magic.txt": {Mode: 0644, Data: []byte("indigo")}, + }, + expected: sets.NewString("zap/1/2/3/4/bar.txt", "zap/1/2/3", "zap/1/2/3/4", "zap/1/2/3/4/bar.txt", "zap/1/2/c", "zap/1/2/c/bar.txt"), + }, + { + name: "subdirs 5", + payload1: map[string]FileProjection{ + "foo.txt": {Mode: 0644, Data: []byte("foo")}, + "zap/1/2/3/4/bar.txt": {Mode: 0644, Data: []byte("zip/bar")}, + "zap/1/2/c/bar.txt": {Mode: 0644, Data: []byte("zap/bar")}, + }, + payload2: map[string]FileProjection{ + "foo.txt": {Mode: 0644, Data: []byte("foo")}, + "zap/1/2/magic.txt": {Mode: 0644, Data: []byte("indigo")}, + }, + expected: sets.NewString("zap/1/2/3/4/bar.txt", "zap/1/2/3", "zap/1/2/3/4", "zap/1/2/3/4/bar.txt", "zap/1/2/c", "zap/1/2/c/bar.txt"), + }, + } + + for _, tc := range cases { + targetDir, err := utiltesting.MkTmpdir("atomic-write") + if err != nil { + t.Errorf("%v: unexpected error creating tmp dir: %v", tc.name, err) + continue + } + defer os.RemoveAll(targetDir) + + writer := &AtomicWriter{targetDir: targetDir, logContext: "-test-"} + err = writer.Write(tc.payload1) + if err != nil { + t.Errorf("%v: unexpected error writing: %v", tc.name, err) + continue + } + + actual, err := writer.pathsToRemove(tc.payload2) + if err != nil { + t.Errorf("%v: unexpected error determining paths to remove: %v", tc.name, err) + continue + } + + if e, a := tc.expected, actual; !e.Equal(a) { + t.Errorf("%v: unexpected paths to remove:\nexpected: %v\n got: %v", tc.name, e, a) + } + } +} + +func TestWriteOnce(t *testing.T) { + // $1 if you can tell me what this binary is + encodedMysteryBinary := `f0VMRgIBAQAAAAAAAAAAAAIAPgABAAAAeABAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAAOAAB +AAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAfQAAAAAAAAB9AAAAAAAAAAAA +IAAAAAAAsDyZDwU=` + + mysteryBinaryBytes := make([]byte, base64.StdEncoding.DecodedLen(len(encodedMysteryBinary))) + numBytes, err := base64.StdEncoding.Decode(mysteryBinaryBytes, []byte(encodedMysteryBinary)) + if err != nil { + t.Fatalf("Unexpected error decoding binary payload: %v", err) + } + + if numBytes != 125 { + t.Fatalf("Unexpected decoded binary size: expected 125, got %v", numBytes) + } + + cases := []struct { + name string + payload map[string]FileProjection + success bool + }{ + { + name: "invalid payload 1", + payload: map[string]FileProjection{ + "foo": {Mode: 0644, Data: []byte("foo")}, + "..bar": {Mode: 0644, Data: []byte("bar")}, + "binary.bin": {Mode: 0644, Data: mysteryBinaryBytes}, + }, + success: false, + }, + { + name: "invalid payload 2", + payload: map[string]FileProjection{ + "foo/../bar": {Mode: 0644, Data: []byte("foo")}, + }, + success: false, + }, + { + name: "basic 1", + payload: map[string]FileProjection{ + "foo": {Mode: 0644, Data: []byte("foo")}, + "bar": {Mode: 0644, Data: []byte("bar")}, + }, + success: true, + }, + { + name: "basic 2", + payload: map[string]FileProjection{ + "binary.bin": {Mode: 0644, Data: mysteryBinaryBytes}, + ".binary.bin": {Mode: 0644, Data: mysteryBinaryBytes}, + }, + success: true, + }, + { + name: "basic mode 1", + payload: map[string]FileProjection{ + "foo": {Mode: 0777, Data: []byte("foo")}, + "bar": {Mode: 0400, Data: []byte("bar")}, + }, + success: true, + }, + { + name: "dotfiles", + payload: map[string]FileProjection{ + "foo": {Mode: 0644, Data: []byte("foo")}, + "bar": {Mode: 0644, Data: []byte("bar")}, + ".dotfile": {Mode: 0644, Data: []byte("dotfile")}, + ".dotfile.file": {Mode: 0644, Data: []byte("dotfile.file")}, + }, + success: true, + }, + { + name: "dotfiles mode", + payload: map[string]FileProjection{ + "foo": {Mode: 0407, Data: []byte("foo")}, + "bar": {Mode: 0440, Data: []byte("bar")}, + ".dotfile": {Mode: 0777, Data: []byte("dotfile")}, + ".dotfile.file": {Mode: 0666, Data: []byte("dotfile.file")}, + }, + success: true, + }, + { + name: "subdirectories 1", + payload: map[string]FileProjection{ + "foo/bar.txt": {Mode: 0644, Data: []byte("foo/bar")}, + "bar/zab.txt": {Mode: 0644, Data: []byte("bar/zab.txt")}, + }, + success: true, + }, + { + name: "subdirectories mode 1", + payload: map[string]FileProjection{ + "foo/bar.txt": {Mode: 0400, Data: []byte("foo/bar")}, + "bar/zab.txt": {Mode: 0644, Data: []byte("bar/zab.txt")}, + }, + success: true, + }, + { + name: "subdirectories 2", + payload: map[string]FileProjection{ + "foo//bar.txt": {Mode: 0644, Data: []byte("foo//bar")}, + "bar///bar/zab.txt": {Mode: 0644, Data: []byte("bar/../bar/zab.txt")}, + }, + success: true, + }, + { + name: "subdirectories 3", + payload: map[string]FileProjection{ + "foo/bar.txt": {Mode: 0644, Data: []byte("foo/bar")}, + "bar/zab.txt": {Mode: 0644, Data: []byte("bar/zab.txt")}, + "foo/blaz/bar.txt": {Mode: 0644, Data: []byte("foo/blaz/bar")}, + "bar/zib/zab.txt": {Mode: 0644, Data: []byte("bar/zib/zab.txt")}, + }, + success: true, + }, + { + name: "kitchen sink", + payload: map[string]FileProjection{ + "foo.log": {Mode: 0644, Data: []byte("foo")}, + "bar.zap": {Mode: 0644, Data: []byte("bar")}, + ".dotfile": {Mode: 0644, Data: []byte("dotfile")}, + "foo/bar.txt": {Mode: 0644, Data: []byte("foo/bar")}, + "bar/zab.txt": {Mode: 0644, Data: []byte("bar/zab.txt")}, + "foo/blaz/bar.txt": {Mode: 0644, Data: []byte("foo/blaz/bar")}, + "bar/zib/zab.txt": {Mode: 0400, Data: []byte("bar/zib/zab.txt")}, + "1/2/3/4/5/6/7/8/9/10/.dotfile.lib": {Mode: 0777, Data: []byte("1-2-3-dotfile")}, + }, + success: true, + }, + } + + for _, tc := range cases { + targetDir, err := utiltesting.MkTmpdir("atomic-write") + if err != nil { + t.Errorf("%v: unexpected error creating tmp dir: %v", tc.name, err) + continue + } + defer os.RemoveAll(targetDir) + + writer := &AtomicWriter{targetDir: targetDir, logContext: "-test-"} + err = writer.Write(tc.payload) + if err != nil && tc.success { + t.Errorf("%v: unexpected error writing payload: %v", tc.name, err) + continue + } else if err == nil && !tc.success { + t.Errorf("%v: unexpected success", tc.name) + continue + } else if err != nil { + continue + } + + checkVolumeContents(targetDir, tc.name, tc.payload, t) + } +} + +func TestUpdate(t *testing.T) { + cases := []struct { + name string + first map[string]FileProjection + next map[string]FileProjection + shouldWrite bool + }{ + { + name: "update", + first: map[string]FileProjection{ + "foo": {Mode: 0644, Data: []byte("foo")}, + "bar": {Mode: 0644, Data: []byte("bar")}, + }, + next: map[string]FileProjection{ + "foo": {Mode: 0644, Data: []byte("foo2")}, + "bar": {Mode: 0640, Data: []byte("bar2")}, + }, + shouldWrite: true, + }, + { + name: "no update", + first: map[string]FileProjection{ + "foo": {Mode: 0644, Data: []byte("foo")}, + "bar": {Mode: 0644, Data: []byte("bar")}, + }, + next: map[string]FileProjection{ + "foo": {Mode: 0644, Data: []byte("foo")}, + "bar": {Mode: 0644, Data: []byte("bar")}, + }, + shouldWrite: false, + }, + { + name: "no update 2", + first: map[string]FileProjection{ + "foo/bar.txt": {Mode: 0644, Data: []byte("foo")}, + "bar/zab.txt": {Mode: 0644, Data: []byte("bar")}, + }, + next: map[string]FileProjection{ + "foo/bar.txt": {Mode: 0644, Data: []byte("foo")}, + "bar/zab.txt": {Mode: 0644, Data: []byte("bar")}, + }, + shouldWrite: false, + }, + { + name: "add 1", + first: map[string]FileProjection{ + "foo/bar.txt": {Mode: 0644, Data: []byte("foo")}, + "bar/zab.txt": {Mode: 0644, Data: []byte("bar")}, + }, + next: map[string]FileProjection{ + "foo/bar.txt": {Mode: 0644, Data: []byte("foo")}, + "bar/zab.txt": {Mode: 0644, Data: []byte("bar")}, + "blu/zip.txt": {Mode: 0644, Data: []byte("zip")}, + }, + shouldWrite: true, + }, + { + name: "add 2", + first: map[string]FileProjection{ + "foo/bar.txt": {Mode: 0644, Data: []byte("foo")}, + "bar/zab.txt": {Mode: 0644, Data: []byte("bar")}, + }, + next: map[string]FileProjection{ + "foo/bar.txt": {Mode: 0644, Data: []byte("foo")}, + "bar/zab.txt": {Mode: 0644, Data: []byte("bar")}, + "blu/two/2/3/4/5/zip.txt": {Mode: 0644, Data: []byte("zip")}, + }, + shouldWrite: true, + }, + { + name: "add 3", + first: map[string]FileProjection{ + "foo/bar.txt": {Mode: 0644, Data: []byte("foo")}, + "bar/zab.txt": {Mode: 0644, Data: []byte("bar")}, + }, + next: map[string]FileProjection{ + "foo/bar.txt": {Mode: 0644, Data: []byte("foo")}, + "bar/zab.txt": {Mode: 0644, Data: []byte("bar")}, + "bar/2/3/4/5/zip.txt": {Mode: 0644, Data: []byte("zip")}, + }, + shouldWrite: true, + }, + { + name: "delete 1", + first: map[string]FileProjection{ + "foo/bar.txt": {Mode: 0644, Data: []byte("foo")}, + "bar/zab.txt": {Mode: 0644, Data: []byte("bar")}, + }, + next: map[string]FileProjection{ + "foo/bar.txt": {Mode: 0644, Data: []byte("foo")}, + }, + shouldWrite: true, + }, + { + name: "delete 2", + first: map[string]FileProjection{ + "foo/bar.txt": {Mode: 0644, Data: []byte("foo")}, + "bar/1/2/3/zab.txt": {Mode: 0644, Data: []byte("bar")}, + }, + next: map[string]FileProjection{ + "foo/bar.txt": {Mode: 0644, Data: []byte("foo")}, + }, + shouldWrite: true, + }, + { + name: "delete 3", + first: map[string]FileProjection{ + "foo/bar.txt": {Mode: 0644, Data: []byte("foo")}, + "bar/1/2/sip.txt": {Mode: 0644, Data: []byte("sip")}, + "bar/1/2/3/zab.txt": {Mode: 0644, Data: []byte("bar")}, + }, + next: map[string]FileProjection{ + "foo/bar.txt": {Mode: 0644, Data: []byte("foo")}, + "bar/1/2/sip.txt": {Mode: 0644, Data: []byte("sip")}, + }, + shouldWrite: true, + }, + { + name: "delete 4", + first: map[string]FileProjection{ + "foo/bar.txt": {Mode: 0644, Data: []byte("foo")}, + "bar/1/2/sip.txt": {Mode: 0644, Data: []byte("sip")}, + "bar/1/2/3/4/5/6zab.txt": {Mode: 0644, Data: []byte("bar")}, + }, + next: map[string]FileProjection{ + "foo/bar.txt": {Mode: 0644, Data: []byte("foo")}, + "bar/1/2/sip.txt": {Mode: 0644, Data: []byte("sip")}, + }, + shouldWrite: true, + }, + { + name: "delete all", + first: map[string]FileProjection{ + "foo/bar.txt": {Mode: 0644, Data: []byte("foo")}, + "bar/1/2/sip.txt": {Mode: 0644, Data: []byte("sip")}, + "bar/1/2/3/4/5/6zab.txt": {Mode: 0644, Data: []byte("bar")}, + }, + next: map[string]FileProjection{}, + shouldWrite: true, + }, + { + name: "add and delete 1", + first: map[string]FileProjection{ + "foo/bar.txt": {Mode: 0644, Data: []byte("foo")}, + }, + next: map[string]FileProjection{ + "bar/baz.txt": {Mode: 0644, Data: []byte("baz")}, + }, + shouldWrite: true, + }, + } + + for _, tc := range cases { + targetDir, err := utiltesting.MkTmpdir("atomic-write") + if err != nil { + t.Errorf("%v: unexpected error creating tmp dir: %v", tc.name, err) + continue + } + defer os.RemoveAll(targetDir) + + writer := &AtomicWriter{targetDir: targetDir, logContext: "-test-"} + + err = writer.Write(tc.first) + if err != nil { + t.Errorf("%v: unexpected error writing: %v", tc.name, err) + continue + } + + checkVolumeContents(targetDir, tc.name, tc.first, t) + if !tc.shouldWrite { + continue + } + + err = writer.Write(tc.next) + if err != nil { + if tc.shouldWrite { + t.Errorf("%v: unexpected error writing: %v", tc.name, err) + continue + } + } else if !tc.shouldWrite { + t.Errorf("%v: unexpected success", tc.name) + continue + } + + checkVolumeContents(targetDir, tc.name, tc.next, t) + } +} + +func TestMultipleUpdates(t *testing.T) { + cases := []struct { + name string + payloads []map[string]FileProjection + }{ + { + name: "update 1", + payloads: []map[string]FileProjection{ + { + "foo": {Mode: 0644, Data: []byte("foo")}, + "bar": {Mode: 0644, Data: []byte("bar")}, + }, + { + "foo": {Mode: 0400, Data: []byte("foo2")}, + "bar": {Mode: 0400, Data: []byte("bar2")}, + }, + { + "foo": {Mode: 0600, Data: []byte("foo3")}, + "bar": {Mode: 0600, Data: []byte("bar3")}, + }, + }, + }, + { + name: "update 2", + payloads: []map[string]FileProjection{ + { + "foo/bar.txt": {Mode: 0644, Data: []byte("foo/bar")}, + "bar/zab.txt": {Mode: 0644, Data: []byte("bar/zab.txt")}, + }, + { + "foo/bar.txt": {Mode: 0644, Data: []byte("foo/bar2")}, + "bar/zab.txt": {Mode: 0400, Data: []byte("bar/zab.txt2")}, + }, + }, + }, + { + name: "clear sentinel", + payloads: []map[string]FileProjection{ + { + "foo": {Mode: 0644, Data: []byte("foo")}, + "bar": {Mode: 0644, Data: []byte("bar")}, + }, + { + "foo": {Mode: 0644, Data: []byte("foo2")}, + "bar": {Mode: 0644, Data: []byte("bar2")}, + }, + { + "foo": {Mode: 0644, Data: []byte("foo3")}, + "bar": {Mode: 0644, Data: []byte("bar3")}, + }, + { + "foo": {Mode: 0644, Data: []byte("foo4")}, + "bar": {Mode: 0644, Data: []byte("bar4")}, + }, + }, + }, + { + name: "subdirectories 2", + payloads: []map[string]FileProjection{ + { + "foo/bar.txt": {Mode: 0644, Data: []byte("foo/bar")}, + "bar/zab.txt": {Mode: 0644, Data: []byte("bar/zab.txt")}, + "foo/blaz/bar.txt": {Mode: 0644, Data: []byte("foo/blaz/bar")}, + "bar/zib/zab.txt": {Mode: 0644, Data: []byte("bar/zib/zab.txt")}, + }, + { + "foo/bar.txt": {Mode: 0644, Data: []byte("foo/bar2")}, + "bar/zab.txt": {Mode: 0644, Data: []byte("bar/zab.txt2")}, + "foo/blaz/bar.txt": {Mode: 0644, Data: []byte("foo/blaz/bar2")}, + "bar/zib/zab.txt": {Mode: 0644, Data: []byte("bar/zib/zab.txt2")}, + }, + }, + }, + { + name: "add 1", + payloads: []map[string]FileProjection{ + { + "foo/bar.txt": {Mode: 0644, Data: []byte("foo/bar")}, + "bar//zab.txt": {Mode: 0644, Data: []byte("bar/zab.txt")}, + "foo/blaz/bar.txt": {Mode: 0644, Data: []byte("foo/blaz/bar")}, + "bar/zib////zib/zab.txt": {Mode: 0644, Data: []byte("bar/zib/zab.txt")}, + }, + { + "foo/bar.txt": {Mode: 0644, Data: []byte("foo/bar2")}, + "bar/zab.txt": {Mode: 0644, Data: []byte("bar/zab.txt2")}, + "foo/blaz/bar.txt": {Mode: 0644, Data: []byte("foo/blaz/bar2")}, + "bar/zib/zab.txt": {Mode: 0644, Data: []byte("bar/zib/zab.txt2")}, + "add/new/keys.txt": {Mode: 0644, Data: []byte("addNewKeys")}, + }, + }, + }, + { + name: "add 2", + payloads: []map[string]FileProjection{ + { + "foo/bar.txt": {Mode: 0644, Data: []byte("foo/bar2")}, + "bar/zab.txt": {Mode: 0644, Data: []byte("bar/zab.txt2")}, + "foo/blaz/bar.txt": {Mode: 0644, Data: []byte("foo/blaz/bar2")}, + "bar/zib/zab.txt": {Mode: 0644, Data: []byte("bar/zib/zab.txt2")}, + "add/new/keys.txt": {Mode: 0644, Data: []byte("addNewKeys")}, + }, + { + "foo/bar.txt": {Mode: 0644, Data: []byte("foo/bar2")}, + "bar/zab.txt": {Mode: 0644, Data: []byte("bar/zab.txt2")}, + "foo/blaz/bar.txt": {Mode: 0644, Data: []byte("foo/blaz/bar2")}, + "bar/zib/zab.txt": {Mode: 0644, Data: []byte("bar/zib/zab.txt2")}, + "add/new/keys.txt": {Mode: 0644, Data: []byte("addNewKeys")}, + "add/new/keys2.txt": {Mode: 0644, Data: []byte("addNewKeys2")}, + "add/new/keys3.txt": {Mode: 0644, Data: []byte("addNewKeys3")}, + }, + }, + }, + { + name: "remove 1", + payloads: []map[string]FileProjection{ + { + "foo/bar.txt": {Mode: 0644, Data: []byte("foo/bar")}, + "bar//zab.txt": {Mode: 0644, Data: []byte("bar/zab.txt")}, + "foo/blaz/bar.txt": {Mode: 0644, Data: []byte("foo/blaz/bar")}, + "zip/zap/zup/fop.txt": {Mode: 0644, Data: []byte("zip/zap/zup/fop.txt")}, + }, + { + "foo/bar.txt": {Mode: 0644, Data: []byte("foo/bar2")}, + "bar/zab.txt": {Mode: 0644, Data: []byte("bar/zab.txt2")}, + }, + { + "foo/bar.txt": {Mode: 0644, Data: []byte("foo/bar")}, + }, + }, + }, + } + + for _, tc := range cases { + targetDir, err := utiltesting.MkTmpdir("atomic-write") + if err != nil { + t.Errorf("%v: unexpected error creating tmp dir: %v", tc.name, err) + continue + } + defer os.RemoveAll(targetDir) + + writer := &AtomicWriter{targetDir: targetDir, logContext: "-test-"} + + for _, payload := range tc.payloads { + writer.Write(payload) + + checkVolumeContents(targetDir, tc.name, payload, t) + } + } +} + +func checkVolumeContents(targetDir, tcName string, payload map[string]FileProjection, t *testing.T) { + // use filepath.Walk to reconstruct the payload, then deep equal + observedPayload := make(map[string]FileProjection) + visitor := func(path string, info os.FileInfo, err error) error { + if info.Mode().IsRegular() || info.IsDir() { + return nil + } + + relativePath := strings.TrimPrefix(path, targetDir) + relativePath = strings.TrimPrefix(relativePath, "/") + if strings.HasPrefix(relativePath, "..") { + return nil + } + + content, err := ioutil.ReadFile(path) + if err != nil { + return err + } + fileInfo, err := os.Stat(path) + if err != nil { + return err + } + mode := int32(fileInfo.Mode()) + + observedPayload[relativePath] = FileProjection{Data: content, Mode: mode} + + return nil + } + + err := filepath.Walk(targetDir, visitor) + if err != nil { + t.Errorf("%v: unexpected error walking directory: %v", tcName, err) + } + + cleanPathPayload := make(map[string]FileProjection, len(payload)) + for k, v := range payload { + cleanPathPayload[path.Clean(k)] = v + } + + if !reflect.DeepEqual(cleanPathPayload, observedPayload) { + t.Errorf("%v: payload and observed payload do not match.", tcName) + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/device_util_linux_test.go b/vendor/k8s.io/kubernetes/pkg/volume/util/device_util_linux_test.go new file mode 100644 index 000000000..94ac9b5a4 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/device_util_linux_test.go @@ -0,0 +1,142 @@ +// +build linux + +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package util + +import ( + "errors" + "os" + "testing" + "time" +) + +type mockOsIOHandler struct{} + +func (handler *mockOsIOHandler) ReadDir(dirname string) ([]os.FileInfo, error) { + switch dirname { + case "/sys/block/dm-2/slaves/": + f := &fakeFileInfo{ + name: "sda", + } + return []os.FileInfo{f}, nil + case "/sys/block/": + f1 := &fakeFileInfo{ + name: "sda", + } + f2 := &fakeFileInfo{ + name: "dm-1", + } + return []os.FileInfo{f1, f2}, nil + } + return nil, nil +} + +func (handler *mockOsIOHandler) Lstat(name string) (os.FileInfo, error) { + links := map[string]string{ + "/sys/block/dm-1/slaves/sda": "sda", + "/dev/sda": "sda", + } + if dev, ok := links[name]; ok { + return &fakeFileInfo{name: dev}, nil + } + return nil, errors.New("Not Implemented for Mock") +} + +func (handler *mockOsIOHandler) EvalSymlinks(path string) (string, error) { + links := map[string]string{ + "/returns/a/dev": "/dev/sde", + "/returns/non/dev": "/sys/block", + "/dev/disk/by-path/127.0.0.1:3260-eui.02004567A425678D-lun-0": "/dev/sda", + "/dev/dm-2": "/dev/dm-2", + "/dev/dm-3": "/dev/dm-3", + "/dev/sde": "/dev/sde", + } + return links[path], nil +} + +func (handler *mockOsIOHandler) WriteFile(filename string, data []byte, perm os.FileMode) error { + return errors.New("Not Implemented for Mock") +} + +type fakeFileInfo struct { + name string +} + +func (fi *fakeFileInfo) Name() string { + return fi.name +} + +func (fi *fakeFileInfo) Size() int64 { + return 0 +} + +func (fi *fakeFileInfo) Mode() os.FileMode { + return 777 +} + +func (fi *fakeFileInfo) ModTime() time.Time { + return time.Now() +} +func (fi *fakeFileInfo) IsDir() bool { + return false +} + +func (fi *fakeFileInfo) Sys() interface{} { + return nil +} + +func TestFindMultipathDeviceForDevice(t *testing.T) { + mockDeviceUtil := NewDeviceHandler(&mockOsIOHandler{}) + dev := mockDeviceUtil.FindMultipathDeviceForDevice("/dev/disk/by-path/127.0.0.1:3260-eui.02004567A425678D-lun-0") + if dev != "/dev/dm-1" { + t.Fatalf("mpio device not found dm-1 expected got [%s]", dev) + } + dev = mockDeviceUtil.FindMultipathDeviceForDevice("/dev/disk/by-path/empty") + if dev != "" { + t.Fatalf("mpio device not found '' expected got [%s]", dev) + } +} + +func TestFindDeviceForPath(t *testing.T) { + io := &mockOsIOHandler{} + + disk, err := findDeviceForPath("/dev/sde", io) + if err != nil { + t.Fatalf("error finding device for path /dev/sde:%v", err) + } + if disk != "sde" { + t.Fatalf("disk [%s] didn't match expected sde", disk) + } + disk, err = findDeviceForPath("/returns/a/dev", io) + if err != nil { + t.Fatalf("error finding device for path /returns/a/dev:%v", err) + } + if disk != "sde" { + t.Fatalf("disk [%s] didn't match expected sde", disk) + } + _, err = findDeviceForPath("/returns/non/dev", io) + if err == nil { + t.Fatalf("link is to incorrect dev") + } + + _, err = findDeviceForPath("/path/doesnt/exist", &osIOHandler{}) + if err == nil { + t.Fatalf("path shouldn't exist but still doesn't give an error") + } + +} diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/doc.go b/vendor/k8s.io/kubernetes/pkg/volume/util/doc.go index 82c976e7d..620add69d 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/doc.go @@ -15,4 +15,4 @@ limitations under the License. */ // Contains utility code for use by volume plugins. -package util +package util // import "k8s.io/kubernetes/pkg/volume/util" diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/util_test.go b/vendor/k8s.io/kubernetes/pkg/volume/util/util_test.go new file mode 100644 index 000000000..480e57627 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/util_test.go @@ -0,0 +1,265 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package util + +import ( + "io/ioutil" + "os" + "testing" + + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/sets" + // util.go uses api.Codecs.LegacyCodec so import this package to do some + // resource initialization. + _ "k8s.io/kubernetes/pkg/api/install" + "k8s.io/kubernetes/pkg/api/v1/helper" +) + +var nodeLabels map[string]string = map[string]string{ + "test-key1": "test-value1", + "test-key2": "test-value2", +} + +func TestCheckNodeAffinity(t *testing.T) { + type affinityTest struct { + name string + expectSuccess bool + pv *v1.PersistentVolume + } + + cases := []affinityTest{ + { + name: "valid-no-constraints", + expectSuccess: true, + pv: testVolumeWithNodeAffinity(t, &v1.NodeAffinity{}), + }, + { + name: "valid-constraints", + expectSuccess: true, + pv: testVolumeWithNodeAffinity(t, &v1.NodeAffinity{ + RequiredDuringSchedulingIgnoredDuringExecution: &v1.NodeSelector{ + NodeSelectorTerms: []v1.NodeSelectorTerm{ + { + MatchExpressions: []v1.NodeSelectorRequirement{ + { + Key: "test-key1", + Operator: v1.NodeSelectorOpIn, + Values: []string{"test-value1", "test-value3"}, + }, + { + Key: "test-key2", + Operator: v1.NodeSelectorOpIn, + Values: []string{"test-value0", "test-value2"}, + }, + }, + }, + }, + }, + }), + }, + { + name: "invalid-key", + expectSuccess: false, + pv: testVolumeWithNodeAffinity(t, &v1.NodeAffinity{ + RequiredDuringSchedulingIgnoredDuringExecution: &v1.NodeSelector{ + NodeSelectorTerms: []v1.NodeSelectorTerm{ + { + MatchExpressions: []v1.NodeSelectorRequirement{ + { + Key: "test-key1", + Operator: v1.NodeSelectorOpIn, + Values: []string{"test-value1", "test-value3"}, + }, + { + Key: "test-key3", + Operator: v1.NodeSelectorOpIn, + Values: []string{"test-value0", "test-value2"}, + }, + }, + }, + }, + }, + }), + }, + { + name: "invalid-values", + expectSuccess: false, + pv: testVolumeWithNodeAffinity(t, &v1.NodeAffinity{ + RequiredDuringSchedulingIgnoredDuringExecution: &v1.NodeSelector{ + NodeSelectorTerms: []v1.NodeSelectorTerm{ + { + MatchExpressions: []v1.NodeSelectorRequirement{ + { + Key: "test-key1", + Operator: v1.NodeSelectorOpIn, + Values: []string{"test-value3", "test-value4"}, + }, + { + Key: "test-key2", + Operator: v1.NodeSelectorOpIn, + Values: []string{"test-value0", "test-value2"}, + }, + }, + }, + }, + }, + }), + }, + } + + for _, c := range cases { + err := CheckNodeAffinity(c.pv, nodeLabels) + + if err != nil && c.expectSuccess { + t.Errorf("CheckTopology %v returned error: %v", c.name, err) + } + if err == nil && !c.expectSuccess { + t.Errorf("CheckTopology %v returned success, expected error", c.name) + } + } +} + +func testVolumeWithNodeAffinity(t *testing.T, affinity *v1.NodeAffinity) *v1.PersistentVolume { + objMeta := metav1.ObjectMeta{Name: "test-constraints"} + objMeta.Annotations = map[string]string{} + err := helper.StorageNodeAffinityToAlphaAnnotation(objMeta.Annotations, affinity) + if err != nil { + t.Fatalf("Failed to get node affinity annotation: %v", err) + } + + return &v1.PersistentVolume{ + ObjectMeta: objMeta, + } +} + +func TestLoadPodFromFile(t *testing.T) { + tests := []struct { + name string + content string + expectError bool + }{ + { + "yaml", + ` +apiVersion: v1 +kind: Pod +metadata: + name: testpod +spec: + containers: + - image: gcr.io/google_containers/busybox +`, + false, + }, + + { + "json", + ` +{ + "apiVersion": "v1", + "kind": "Pod", + "metadata": { + "name": "testpod" + }, + "spec": { + "containers": [ + { + "image": "gcr.io/google_containers/busybox" + } + ] + } +}`, + false, + }, + + { + "invalid pod", + ` +apiVersion: v1 +kind: Pod +metadata: + name: testpod +spec: + - image: gcr.io/google_containers/busybox +`, + true, + }, + } + + for _, test := range tests { + tempFile, err := ioutil.TempFile("", "podfile") + defer os.Remove(tempFile.Name()) + if err != nil { + t.Fatalf("cannot create temporary file: %v", err) + } + if _, err = tempFile.Write([]byte(test.content)); err != nil { + t.Fatalf("cannot save temporary file: %v", err) + } + if err = tempFile.Close(); err != nil { + t.Fatalf("cannot close temporary file: %v", err) + } + + pod, err := LoadPodFromFile(tempFile.Name()) + if test.expectError { + if err == nil { + t.Errorf("test %q expected error, got nil", test.name) + } + } else { + // no error expected + if err != nil { + t.Errorf("error loading pod %q: %v", test.name, err) + } + if pod == nil { + t.Errorf("test %q expected pod, got nil", test.name) + } + } + } +} +func TestZonesToSet(t *testing.T) { + functionUnderTest := "ZonesToSet" + // First part: want an error + sliceOfZones := []string{"", ",", "us-east-1a, , us-east-1d", ", us-west-1b", "us-west-2b,"} + for _, zones := range sliceOfZones { + if got, err := ZonesToSet(zones); err == nil { + t.Errorf("%v(%v) returned (%v), want (%v)", functionUnderTest, zones, got, "an error") + } + } + + // Second part: want no error + tests := []struct { + zones string + want sets.String + }{ + { + zones: "us-east-1a", + want: sets.String{"us-east-1a": sets.Empty{}}, + }, + { + zones: "us-east-1a, us-west-2a", + want: sets.String{ + "us-east-1a": sets.Empty{}, + "us-west-2a": sets.Empty{}, + }, + }, + } + for _, tt := range tests { + if got, err := ZonesToSet(tt.zones); err != nil || !got.Equal(tt.want) { + t.Errorf("%v(%v) returned (%v), want (%v)", functionUnderTest, tt.zones, got, tt.want) + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util_test.go b/vendor/k8s.io/kubernetes/pkg/volume/util_test.go new file mode 100644 index 000000000..6eeb00a75 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/volume/util_test.go @@ -0,0 +1,888 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package volume + +import ( + "fmt" + "hash/fnv" + "reflect" + "strings" + "testing" + + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/util/slice" +) + +type testcase struct { + // Input of the test + name string + existingPod *v1.Pod + createPod *v1.Pod + // eventSequence is list of events that are simulated during recycling. It + // can be either event generated by a recycler pod or a state change of + // the pod. (see newPodEvent and newEvent below). + eventSequence []watch.Event + + // Expected output. + // expectedEvents is list of events that were sent to the volume that was + // recycled. + expectedEvents []mockEvent + expectedError string +} + +func newPodEvent(eventtype watch.EventType, name string, phase v1.PodPhase, message string) watch.Event { + return watch.Event{ + Type: eventtype, + Object: newPod(name, phase, message), + } +} + +func newEvent(eventtype, message string) watch.Event { + return watch.Event{ + Type: watch.Added, + Object: &v1.Event{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: metav1.NamespaceDefault, + }, + Reason: "MockEvent", + Message: message, + Type: eventtype, + }, + } +} + +func newPod(name string, phase v1.PodPhase, message string) *v1.Pod { + return &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: metav1.NamespaceDefault, + Name: name, + }, + Status: v1.PodStatus{ + Phase: phase, + Message: message, + }, + } +} + +func TestRecyclerPod(t *testing.T) { + tests := []testcase{ + { + // Test recycler success with some events + name: "RecyclerSuccess", + createPod: newPod("podRecyclerSuccess", v1.PodPending, ""), + eventSequence: []watch.Event{ + // Pod gets Running and Succeeded + newPodEvent(watch.Added, "podRecyclerSuccess", v1.PodPending, ""), + newEvent(v1.EventTypeNormal, "Successfully assigned recycler-for-podRecyclerSuccess to 127.0.0.1"), + newEvent(v1.EventTypeNormal, "pulling image \"gcr.io/google_containers/busybox\""), + newEvent(v1.EventTypeNormal, "Successfully pulled image \"gcr.io/google_containers/busybox\""), + newEvent(v1.EventTypeNormal, "Created container with docker id 83d929aeac82"), + newEvent(v1.EventTypeNormal, "Started container with docker id 83d929aeac82"), + newPodEvent(watch.Modified, "podRecyclerSuccess", v1.PodRunning, ""), + newPodEvent(watch.Modified, "podRecyclerSuccess", v1.PodSucceeded, ""), + }, + expectedEvents: []mockEvent{ + {v1.EventTypeNormal, "Successfully assigned recycler-for-podRecyclerSuccess to 127.0.0.1"}, + {v1.EventTypeNormal, "pulling image \"gcr.io/google_containers/busybox\""}, + {v1.EventTypeNormal, "Successfully pulled image \"gcr.io/google_containers/busybox\""}, + {v1.EventTypeNormal, "Created container with docker id 83d929aeac82"}, + {v1.EventTypeNormal, "Started container with docker id 83d929aeac82"}, + }, + expectedError: "", + }, + { + // Test recycler failure with some events + name: "RecyclerFailure", + createPod: newPod("podRecyclerFailure", v1.PodPending, ""), + eventSequence: []watch.Event{ + // Pod gets Running and Succeeded + newPodEvent(watch.Added, "podRecyclerFailure", v1.PodPending, ""), + newEvent(v1.EventTypeNormal, "Successfully assigned recycler-for-podRecyclerFailure to 127.0.0.1"), + newEvent(v1.EventTypeWarning, "Unable to mount volumes for pod \"recycler-for-podRecyclerFailure_default(3c9809e5-347c-11e6-a79b-3c970e965218)\": timeout expired waiting for volumes to attach/mount"), + newEvent(v1.EventTypeWarning, "Error syncing pod, skipping: timeout expired waiting for volumes to attach/mount for pod \"default\"/\"recycler-for-podRecyclerFailure\". list of unattached/unmounted"), + newPodEvent(watch.Modified, "podRecyclerFailure", v1.PodRunning, ""), + newPodEvent(watch.Modified, "podRecyclerFailure", v1.PodFailed, "Pod was active on the node longer than specified deadline"), + }, + expectedEvents: []mockEvent{ + {v1.EventTypeNormal, "Successfully assigned recycler-for-podRecyclerFailure to 127.0.0.1"}, + {v1.EventTypeWarning, "Unable to mount volumes for pod \"recycler-for-podRecyclerFailure_default(3c9809e5-347c-11e6-a79b-3c970e965218)\": timeout expired waiting for volumes to attach/mount"}, + {v1.EventTypeWarning, "Error syncing pod, skipping: timeout expired waiting for volumes to attach/mount for pod \"default\"/\"recycler-for-podRecyclerFailure\". list of unattached/unmounted"}, + }, + expectedError: "Pod was active on the node longer than specified deadline", + }, + { + // Recycler pod gets deleted + name: "RecyclerDeleted", + createPod: newPod("podRecyclerDeleted", v1.PodPending, ""), + eventSequence: []watch.Event{ + // Pod gets Running and Succeeded + newPodEvent(watch.Added, "podRecyclerDeleted", v1.PodPending, ""), + newEvent(v1.EventTypeNormal, "Successfully assigned recycler-for-podRecyclerDeleted to 127.0.0.1"), + newPodEvent(watch.Deleted, "podRecyclerDeleted", v1.PodPending, ""), + }, + expectedEvents: []mockEvent{ + {v1.EventTypeNormal, "Successfully assigned recycler-for-podRecyclerDeleted to 127.0.0.1"}, + }, + expectedError: "recycler pod was deleted", + }, + { + // Another recycler pod is already running + name: "RecyclerRunning", + existingPod: newPod("podOldRecycler", v1.PodRunning, ""), + createPod: newPod("podNewRecycler", v1.PodFailed, "mock message"), + eventSequence: []watch.Event{ + // Old pod succeeds + newPodEvent(watch.Modified, "podOldRecycler", v1.PodSucceeded, ""), + }, + // No error = old pod succeeded. If the new pod was used, there + // would be error with "mock message". + expectedError: "", + }, + { + // Another recycler pod is already running and fails + name: "FailedRecyclerRunning", + existingPod: newPod("podOldRecycler", v1.PodRunning, ""), + createPod: newPod("podNewRecycler", v1.PodFailed, "mock message"), + eventSequence: []watch.Event{ + // Old pod failure + newPodEvent(watch.Modified, "podOldRecycler", v1.PodFailed, "Pod was active on the node longer than specified deadline"), + }, + // If the new pod was used, there would be error with "mock message". + expectedError: "Pod was active on the node longer than specified deadline", + }, + } + + for _, test := range tests { + t.Logf("Test %q", test.name) + client := &mockRecyclerClient{ + events: test.eventSequence, + pod: test.existingPod, + } + err := internalRecycleVolumeByWatchingPodUntilCompletion(test.createPod.Name, test.createPod, client) + receivedError := "" + if err != nil { + receivedError = err.Error() + } + if receivedError != test.expectedError { + t.Errorf("Test %q failed, expected error %q, got %q", test.name, test.expectedError, receivedError) + continue + } + if !client.deletedCalled { + t.Errorf("Test %q failed, expected deferred client.Delete to be called on recycler pod", test.name) + continue + } + for i, expectedEvent := range test.expectedEvents { + if len(client.receivedEvents) <= i { + t.Errorf("Test %q failed, expected event %d: %q not received", test.name, i, expectedEvent.message) + continue + } + receivedEvent := client.receivedEvents[i] + if expectedEvent.eventtype != receivedEvent.eventtype { + t.Errorf("Test %q failed, event %d does not match: expected eventtype %q, got %q", test.name, i, expectedEvent.eventtype, receivedEvent.eventtype) + } + if expectedEvent.message != receivedEvent.message { + t.Errorf("Test %q failed, event %d does not match: expected message %q, got %q", test.name, i, expectedEvent.message, receivedEvent.message) + } + } + for i := len(test.expectedEvents); i < len(client.receivedEvents); i++ { + t.Errorf("Test %q failed, unexpected event received: %s, %q", test.name, client.receivedEvents[i].eventtype, client.receivedEvents[i].message) + } + } +} + +type mockRecyclerClient struct { + pod *v1.Pod + deletedCalled bool + receivedEvents []mockEvent + events []watch.Event +} + +type mockEvent struct { + eventtype, message string +} + +func (c *mockRecyclerClient) CreatePod(pod *v1.Pod) (*v1.Pod, error) { + if c.pod == nil { + c.pod = pod + return c.pod, nil + } + // Simulate "already exists" error + return nil, errors.NewAlreadyExists(api.Resource("pods"), pod.Name) +} + +func (c *mockRecyclerClient) GetPod(name, namespace string) (*v1.Pod, error) { + if c.pod != nil { + return c.pod, nil + } else { + return nil, fmt.Errorf("pod does not exist") + } +} + +func (c *mockRecyclerClient) DeletePod(name, namespace string) error { + c.deletedCalled = true + return nil +} + +func (c *mockRecyclerClient) WatchPod(name, namespace string, stopChannel chan struct{}) (<-chan watch.Event, error) { + eventCh := make(chan watch.Event, 0) + go func() { + for _, e := range c.events { + eventCh <- e + } + }() + return eventCh, nil +} + +func (c *mockRecyclerClient) Event(eventtype, message string) { + c.receivedEvents = append(c.receivedEvents, mockEvent{eventtype, message}) +} + +func TestCalculateTimeoutForVolume(t *testing.T) { + pv := &v1.PersistentVolume{ + Spec: v1.PersistentVolumeSpec{ + Capacity: v1.ResourceList{ + v1.ResourceName(v1.ResourceStorage): resource.MustParse("500M"), + }, + }, + } + + timeout := CalculateTimeoutForVolume(50, 30, pv) + if timeout != 50 { + t.Errorf("Expected 50 for timeout but got %v", timeout) + } + + pv.Spec.Capacity[v1.ResourceStorage] = resource.MustParse("2Gi") + timeout = CalculateTimeoutForVolume(50, 30, pv) + if timeout != 60 { + t.Errorf("Expected 60 for timeout but got %v", timeout) + } + + pv.Spec.Capacity[v1.ResourceStorage] = resource.MustParse("150Gi") + timeout = CalculateTimeoutForVolume(50, 30, pv) + if timeout != 4500 { + t.Errorf("Expected 4500 for timeout but got %v", timeout) + } +} + +func TestGenerateVolumeName(t *testing.T) { + + // Normal operation, no truncate + v1 := GenerateVolumeName("kubernetes", "pv-cinder-abcde", 255) + if v1 != "kubernetes-dynamic-pv-cinder-abcde" { + t.Errorf("Expected kubernetes-dynamic-pv-cinder-abcde, got %s", v1) + } + + // Truncate trailing "6789-dynamic" + prefix := strings.Repeat("0123456789", 9) // 90 characters prefix + 8 chars. of "-dynamic" + v2 := GenerateVolumeName(prefix, "pv-cinder-abcde", 100) + expect := prefix[:84] + "-pv-cinder-abcde" + if v2 != expect { + t.Errorf("Expected %s, got %s", expect, v2) + } + + // Truncate really long cluster name + prefix = strings.Repeat("0123456789", 1000) // 10000 characters prefix + v3 := GenerateVolumeName(prefix, "pv-cinder-abcde", 100) + if v3 != expect { + t.Errorf("Expected %s, got %s", expect, v3) + } +} + +func TestMountOptionFromSpec(t *testing.T) { + scenarios := map[string]struct { + volume *Spec + expectedMountList []string + systemOptions []string + }{ + "volume-with-mount-options": { + volume: createVolumeSpecWithMountOption("good-mount-opts", "ro,nfsvers=3", v1.PersistentVolumeSpec{ + PersistentVolumeSource: v1.PersistentVolumeSource{ + NFS: &v1.NFSVolumeSource{Server: "localhost", Path: "/srv", ReadOnly: false}, + }, + }), + expectedMountList: []string{"ro", "nfsvers=3"}, + systemOptions: nil, + }, + "volume-with-bad-mount-options": { + volume: createVolumeSpecWithMountOption("good-mount-opts", "", v1.PersistentVolumeSpec{ + PersistentVolumeSource: v1.PersistentVolumeSource{ + NFS: &v1.NFSVolumeSource{Server: "localhost", Path: "/srv", ReadOnly: false}, + }, + }), + expectedMountList: []string{}, + systemOptions: nil, + }, + "vol-with-sys-opts": { + volume: createVolumeSpecWithMountOption("good-mount-opts", "ro,nfsvers=3", v1.PersistentVolumeSpec{ + PersistentVolumeSource: v1.PersistentVolumeSource{ + NFS: &v1.NFSVolumeSource{Server: "localhost", Path: "/srv", ReadOnly: false}, + }, + }), + expectedMountList: []string{"ro", "nfsvers=3", "fsid=100", "hard"}, + systemOptions: []string{"fsid=100", "hard"}, + }, + "vol-with-sys-opts-with-dup": { + volume: createVolumeSpecWithMountOption("good-mount-opts", "ro,nfsvers=3", v1.PersistentVolumeSpec{ + PersistentVolumeSource: v1.PersistentVolumeSource{ + NFS: &v1.NFSVolumeSource{Server: "localhost", Path: "/srv", ReadOnly: false}, + }, + }), + expectedMountList: []string{"ro", "nfsvers=3", "fsid=100"}, + systemOptions: []string{"fsid=100", "ro"}, + }, + } + + for name, scenario := range scenarios { + mountOptions := MountOptionFromSpec(scenario.volume, scenario.systemOptions...) + if !reflect.DeepEqual(slice.SortStrings(mountOptions), slice.SortStrings(scenario.expectedMountList)) { + t.Errorf("for %s expected mount options : %v got %v", name, scenario.expectedMountList, mountOptions) + } + } +} + +func createVolumeSpecWithMountOption(name string, mountOptions string, spec v1.PersistentVolumeSpec) *Spec { + annotations := map[string]string{ + v1.MountOptionAnnotation: mountOptions, + } + objMeta := metav1.ObjectMeta{ + Name: name, + Annotations: annotations, + } + + pv := &v1.PersistentVolume{ + ObjectMeta: objMeta, + Spec: spec, + } + return &Spec{PersistentVolume: pv} +} + +func checkFnv32(t *testing.T, s string, expected int) { + h := fnv.New32() + h.Write([]byte(s)) + h.Sum32() + + if int(h.Sum32()) != expected { + t.Fatalf("hash of %q was %v, expected %v", s, h.Sum32(), expected) + } +} + +func TestChooseZoneForVolume(t *testing.T) { + checkFnv32(t, "henley", 1180403676) + // 1180403676 mod 3 == 0, so the offset from "henley" is 0, which makes it easier to verify this by inspection + + // A few others + checkFnv32(t, "henley-", 2652299129) + checkFnv32(t, "henley-a", 1459735322) + checkFnv32(t, "", 2166136261) + + tests := []struct { + Zones sets.String + VolumeName string + Expected string + }{ + // Test for PVC names that don't have a dash + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "henley", + Expected: "a", // hash("henley") == 0 + }, + // Tests for PVC names that end in - number, but don't look like statefulset PVCs + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "henley-0", + Expected: "a", // hash("henley") == 0 + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "henley-1", + Expected: "b", // hash("henley") + 1 == 1 + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "henley-2", + Expected: "c", // hash("henley") + 2 == 2 + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "henley-3", + Expected: "a", // hash("henley") + 3 == 3 === 0 mod 3 + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "henley-4", + Expected: "b", // hash("henley") + 4 == 4 === 1 mod 3 + }, + // Tests for PVC names that are edge cases + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "henley-", + Expected: "c", // hash("henley-") = 2652299129 === 2 mod 3 + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "henley-a", + Expected: "c", // hash("henley-a") = 1459735322 === 2 mod 3 + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium--1", + Expected: "c", // hash("") + 1 == 2166136261 + 1 === 2 mod 3 + }, + // Tests for PVC names for simple StatefulSet cases + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-henley-1", + Expected: "b", // hash("henley") + 1 == 1 + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "loud-henley-1", + Expected: "b", // hash("henley") + 1 == 1 + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "quiet-henley-2", + Expected: "c", // hash("henley") + 2 == 2 + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-henley-2", + Expected: "c", // hash("henley") + 2 == 2 + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-henley-3", + Expected: "a", // hash("henley") + 3 == 3 === 0 mod 3 + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-henley-4", + Expected: "b", // hash("henley") + 4 == 4 === 1 mod 3 + }, + // Tests for statefulsets (or claims) with dashes in the names + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-alpha-henley-2", + Expected: "c", // hash("henley") + 2 == 2 + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-beta-henley-3", + Expected: "a", // hash("henley") + 3 == 3 === 0 mod 3 + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-gamma-henley-4", + Expected: "b", // hash("henley") + 4 == 4 === 1 mod 3 + }, + // Tests for statefulsets name ending in - + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-henley--2", + Expected: "a", // hash("") + 2 == 0 mod 3 + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-henley--3", + Expected: "b", // hash("") + 3 == 1 mod 3 + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-henley--4", + Expected: "c", // hash("") + 4 == 2 mod 3 + }, + } + + for _, test := range tests { + actual := ChooseZoneForVolume(test.Zones, test.VolumeName) + + if actual != test.Expected { + t.Errorf("Test %v failed, expected zone %q, actual %q", test, test.Expected, actual) + } + } +} + +func TestChooseZonesForVolume(t *testing.T) { + checkFnv32(t, "henley", 1180403676) + // 1180403676 mod 3 == 0, so the offset from "henley" is 0, which makes it easier to verify this by inspection + + // A few others + checkFnv32(t, "henley-", 2652299129) + checkFnv32(t, "henley-a", 1459735322) + checkFnv32(t, "", 2166136261) + + tests := []struct { + Zones sets.String + VolumeName string + NumZones uint32 + Expected sets.String + }{ + // Test for PVC names that don't have a dash + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "henley", + NumZones: 1, + Expected: sets.NewString("a" /* hash("henley") == 0 */), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "henley", + NumZones: 2, + Expected: sets.NewString("a" /* hash("henley") == 0 */, "b"), + }, + // Tests for PVC names that end in - number, but don't look like statefulset PVCs + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "henley-0", + NumZones: 1, + Expected: sets.NewString("a" /* hash("henley") == 0 */), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "henley-0", + NumZones: 2, + Expected: sets.NewString("a" /* hash("henley") == 0 */, "b"), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "henley-1", + NumZones: 1, + Expected: sets.NewString("b" /* hash("henley") + 1 == 1 */), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "henley-1", + NumZones: 2, + Expected: sets.NewString("c" /* hash("henley") + 1 + 1(startingIndex) == 2 */, "a"), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "henley-2", + NumZones: 1, + Expected: sets.NewString("c" /* hash("henley") + 2 == 2 */), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "henley-2", + NumZones: 2, + Expected: sets.NewString("b" /* hash("henley") + 2 + 2(startingIndex) == 4 */, "c"), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "henley-3", + NumZones: 1, + Expected: sets.NewString("a" /* hash("henley") + 3 == 3 === 0 mod 3 */), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "henley-3", + NumZones: 2, + Expected: sets.NewString("a" /* hash("henley") + 3 + 3(startingIndex) == 6 */, "b"), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "henley-4", + NumZones: 1, + Expected: sets.NewString("b" /* hash("henley") + 4 == 4 === 1 mod 3 */), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "henley-4", + NumZones: 2, + Expected: sets.NewString("c" /* hash("henley") + 4 + 4(startingIndex) == 8 */, "a"), + }, + // Tests for PVC names that are edge cases + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "henley-", + NumZones: 1, + Expected: sets.NewString("c" /* hash("henley-") = 2652299129 === 2 mod 3 */), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "henley-", + NumZones: 2, + Expected: sets.NewString("c" /* hash("henley-") = 2652299129 === 2 mod 3 = 2 */, "a"), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "henley-a", + NumZones: 1, + Expected: sets.NewString("c" /* hash("henley-a") = 1459735322 === 2 mod 3 */), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "henley-a", + NumZones: 2, + Expected: sets.NewString("c" /* hash("henley-a") = 1459735322 === 2 mod 3 = 2 */, "a"), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium--1", + NumZones: 1, + Expected: sets.NewString("c" /* hash("") + 1 == 2166136261 + 1 === 2 mod 3 */), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium--1", + NumZones: 2, + Expected: sets.NewString("a" /* hash("") + 1 + 1(startingIndex) == 2166136261 + 1 + 1 === 3 mod 3 = 0 */, "b"), + }, + // Tests for PVC names for simple StatefulSet cases + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-henley-1", + NumZones: 1, + Expected: sets.NewString("b" /* hash("henley") + 1 == 1 */), + }, + // Tests for PVC names for simple StatefulSet cases + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-henley-1", + NumZones: 2, + Expected: sets.NewString("c" /* hash("henley") + 1 + 1(startingIndex) == 2 */, "a"), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "loud-henley-1", + NumZones: 1, + Expected: sets.NewString("b" /* hash("henley") + 1 == 1 */), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "loud-henley-1", + NumZones: 2, + Expected: sets.NewString("c" /* hash("henley") + 1 + 1(startingIndex) == 2 */, "a"), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "quiet-henley-2", + NumZones: 1, + Expected: sets.NewString("c" /* hash("henley") + 2 == 2 */), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "quiet-henley-2", + NumZones: 2, + Expected: sets.NewString("b" /* hash("henley") + 2 + 2(startingIndex) == 4 */, "c"), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-henley-2", + NumZones: 1, + Expected: sets.NewString("c" /* hash("henley") + 2 == 2 */), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-henley-2", + NumZones: 2, + Expected: sets.NewString("b" /* hash("henley") + 2 + 2(startingIndex) == 4 */, "c"), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-henley-3", + NumZones: 1, + Expected: sets.NewString("a" /* hash("henley") + 3 == 3 === 0 mod 3 */), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-henley-3", + NumZones: 2, + Expected: sets.NewString("a" /* hash("henley") + 3 + 3(startingIndex) == 6 === 6 mod 3 = 0 */, "b"), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-henley-4", + NumZones: 1, + Expected: sets.NewString("b" /* hash("henley") + 4 == 4 === 1 mod 3 */), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-henley-4", + NumZones: 2, + Expected: sets.NewString("c" /* hash("henley") + 4 + 4(startingIndex) == 8 === 2 mod 3 */, "a"), + }, + // Tests for statefulsets (or claims) with dashes in the names + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-alpha-henley-2", + NumZones: 1, + Expected: sets.NewString("c" /* hash("henley") + 2 == 2 */), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-alpha-henley-2", + NumZones: 2, + Expected: sets.NewString("b" /* hash("henley") + 2 + 2(startingIndex) == 4 */, "c"), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-beta-henley-3", + NumZones: 1, + Expected: sets.NewString("a" /* hash("henley") + 3 == 3 === 0 mod 3 */), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-beta-henley-3", + NumZones: 2, + Expected: sets.NewString("a" /* hash("henley") + 3 + 3(startingIndex) == 6 === 0 mod 3 */, "b"), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-gamma-henley-4", + NumZones: 1, + Expected: sets.NewString("b" /* hash("henley") + 4 == 4 === 1 mod 3 */), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-gamma-henley-4", + NumZones: 2, + Expected: sets.NewString("c" /* hash("henley") + 4 + 4(startingIndex) == 8 === 2 mod 3 */, "a"), + }, + // Tests for statefulsets name ending in - + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-henley--2", + NumZones: 1, + Expected: sets.NewString("a" /* hash("") + 2 == 0 mod 3 */), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-henley--2", + NumZones: 2, + Expected: sets.NewString("c" /* hash("") + 2 + 2(startingIndex) == 2 mod 3 */, "a"), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-henley--3", + NumZones: 1, + Expected: sets.NewString("b" /* hash("") + 3 == 1 mod 3 */), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-henley--3", + NumZones: 2, + Expected: sets.NewString("b" /* hash("") + 3 + 3(startingIndex) == 1 mod 3 */, "c"), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-henley--4", + NumZones: 1, + Expected: sets.NewString("c" /* hash("") + 4 == 2 mod 3 */), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-henley--4", + NumZones: 2, + Expected: sets.NewString("a" /* hash("") + 4 + 4(startingIndex) == 0 mod 3 */, "b"), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-henley--4", + NumZones: 3, + Expected: sets.NewString("c" /* hash("") + 4 == 2 mod 3 */, "a", "b"), + }, + { + Zones: sets.NewString("a", "b", "c"), + VolumeName: "medium-henley--4", + NumZones: 4, + Expected: sets.NewString("c" /* hash("") + 4 + 9(startingIndex) == 2 mod 3 */, "a", "b", "c"), + }, + { + Zones: sets.NewString("a", "b", "c", "d", "e", "f", "g", "h", "i"), + VolumeName: "henley-0", + NumZones: 2, + Expected: sets.NewString("a" /* hash("henley") == 0 */, "b"), + }, + { + Zones: sets.NewString("a", "b", "c", "d", "e", "f", "g", "h", "i"), + VolumeName: "henley-1", + NumZones: 2, + Expected: sets.NewString("c" /* hash("henley") == 0 + 2 */, "d"), + }, + { + Zones: sets.NewString("a", "b", "c", "d", "e", "f", "g", "h", "i"), + VolumeName: "henley-2", + NumZones: 2, + Expected: sets.NewString("e" /* hash("henley") == 0 + 2 + 2(startingIndex) */, "f"), + }, + { + Zones: sets.NewString("a", "b", "c", "d", "e", "f", "g", "h", "i"), + VolumeName: "henley-3", + NumZones: 2, + Expected: sets.NewString("g" /* hash("henley") == 0 + 2 + 4(startingIndex) */, "h"), + }, + { + Zones: sets.NewString("a", "b", "c", "d", "e", "f", "g", "h", "i"), + VolumeName: "henley-0", + NumZones: 3, + Expected: sets.NewString("a" /* hash("henley") == 0 */, "b", "c"), + }, + { + Zones: sets.NewString("a", "b", "c", "d", "e", "f", "g", "h", "i"), + VolumeName: "henley-1", + NumZones: 3, + Expected: sets.NewString("d" /* hash("henley") == 0 + 1 + 2(startingIndex) */, "e", "f"), + }, + { + Zones: sets.NewString("a", "b", "c", "d", "e", "f", "g", "h", "i"), + VolumeName: "henley-2", + NumZones: 3, + Expected: sets.NewString("g" /* hash("henley") == 0 + 2 + 4(startingIndex) */, "h", "i"), + }, + { + Zones: sets.NewString("a", "b", "c", "d", "e", "f", "g", "h", "i"), + VolumeName: "henley-3", + NumZones: 3, + Expected: sets.NewString("a" /* hash("henley") == 0 + 3 + 6(startingIndex) */, "b", "c"), + }, + } + + for _, test := range tests { + actual := ChooseZonesForVolume(test.Zones, test.VolumeName, test.NumZones) + + if !actual.Equal(test.Expected) { + t.Errorf("Test %v failed, expected zone %#v, actual %#v", test, test.Expected, actual) + } + } +} + +func TestValidateZone(t *testing.T) { + functionUnderTest := "ValidateZone" + + // First part: want an error + errCases := []string{"", " "} + for _, errCase := range errCases { + if got := ValidateZone(errCase); got == nil { + t.Errorf("%v(%v) returned (%v), want (%v)", functionUnderTest, errCase, got, "an error") + } + } + + // Second part: want no error + succCases := []string{" us-east-1a "} + for _, succCase := range succCases { + if got := ValidateZone(succCase); got != nil { + t.Errorf("%v(%v) returned (%v), want (%v)", functionUnderTest, succCase, got, nil) + } + } +} diff --git a/vendor/k8s.io/kubernetes/third_party/BUILD b/vendor/k8s.io/kubernetes/third_party/BUILD new file mode 100644 index 000000000..a100a2ca1 --- /dev/null +++ b/vendor/k8s.io/kubernetes/third_party/BUILD @@ -0,0 +1,27 @@ +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [ + ":package-srcs", + "//third_party/forked/etcd221/pkg/fileutil:all-srcs", + "//third_party/forked/etcd221/wal:all-srcs", + "//third_party/forked/etcd237/pkg/fileutil:all-srcs", + "//third_party/forked/etcd237/wal:all-srcs", + "//third_party/forked/golang/expansion:all-srcs", + "//third_party/forked/golang/reflect:all-srcs", + "//third_party/forked/golang/template:all-srcs", + "//third_party/forked/gonum/graph:all-srcs", + "//third_party/htpasswd:all-srcs", + ], + tags = ["automanaged"], +) diff --git a/vendor/google.golang.org/api/LICENSE b/vendor/k8s.io/kubernetes/third_party/forked/golang/LICENSE similarity index 96% rename from vendor/google.golang.org/api/LICENSE rename to vendor/k8s.io/kubernetes/third_party/forked/golang/LICENSE index 263aa7a0c..744875676 100644 --- a/vendor/google.golang.org/api/LICENSE +++ b/vendor/k8s.io/kubernetes/third_party/forked/golang/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2011 Google Inc. All rights reserved. +Copyright (c) 2012 The Go Authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are diff --git a/vendor/k8s.io/kubernetes/third_party/forked/golang/PATENTS b/vendor/k8s.io/kubernetes/third_party/forked/golang/PATENTS new file mode 100644 index 000000000..733099041 --- /dev/null +++ b/vendor/k8s.io/kubernetes/third_party/forked/golang/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/vendor/k8s.io/kubernetes/pkg/util/version/BUILD b/vendor/k8s.io/kubernetes/third_party/forked/golang/expansion/BUILD similarity index 79% rename from vendor/k8s.io/kubernetes/pkg/util/version/BUILD rename to vendor/k8s.io/kubernetes/third_party/forked/golang/expansion/BUILD index ae2668b46..98c97738e 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/version/BUILD +++ b/vendor/k8s.io/kubernetes/third_party/forked/golang/expansion/BUILD @@ -1,5 +1,7 @@ package(default_visibility = ["//visibility:public"]) +licenses(["notice"]) + load( "@io_bazel_rules_go//go:def.bzl", "go_library", @@ -8,16 +10,14 @@ load( go_library( name = "go_default_library", - srcs = [ - "doc.go", - "version.go", - ], + srcs = ["expand.go"], ) go_test( name = "go_default_test", - srcs = ["version_test.go"], + srcs = ["expand_test.go"], library = ":go_default_library", + deps = ["//pkg/api:go_default_library"], ) filegroup( diff --git a/vendor/k8s.io/kubernetes/third_party/forked/golang/expansion/expand.go b/vendor/k8s.io/kubernetes/third_party/forked/golang/expansion/expand.go new file mode 100644 index 000000000..6bf0ea8ce --- /dev/null +++ b/vendor/k8s.io/kubernetes/third_party/forked/golang/expansion/expand.go @@ -0,0 +1,102 @@ +package expansion + +import ( + "bytes" +) + +const ( + operator = '$' + referenceOpener = '(' + referenceCloser = ')' +) + +// syntaxWrap returns the input string wrapped by the expansion syntax. +func syntaxWrap(input string) string { + return string(operator) + string(referenceOpener) + input + string(referenceCloser) +} + +// MappingFuncFor returns a mapping function for use with Expand that +// implements the expansion semantics defined in the expansion spec; it +// returns the input string wrapped in the expansion syntax if no mapping +// for the input is found. +func MappingFuncFor(context ...map[string]string) func(string) string { + return func(input string) string { + for _, vars := range context { + val, ok := vars[input] + if ok { + return val + } + } + + return syntaxWrap(input) + } +} + +// Expand replaces variable references in the input string according to +// the expansion spec using the given mapping function to resolve the +// values of variables. +func Expand(input string, mapping func(string) string) string { + var buf bytes.Buffer + checkpoint := 0 + for cursor := 0; cursor < len(input); cursor++ { + if input[cursor] == operator && cursor+1 < len(input) { + // Copy the portion of the input string since the last + // checkpoint into the buffer + buf.WriteString(input[checkpoint:cursor]) + + // Attempt to read the variable name as defined by the + // syntax from the input string + read, isVar, advance := tryReadVariableName(input[cursor+1:]) + + if isVar { + // We were able to read a variable name correctly; + // apply the mapping to the variable name and copy the + // bytes into the buffer + buf.WriteString(mapping(read)) + } else { + // Not a variable name; copy the read bytes into the buffer + buf.WriteString(read) + } + + // Advance the cursor in the input string to account for + // bytes consumed to read the variable name expression + cursor += advance + + // Advance the checkpoint in the input string + checkpoint = cursor + 1 + } + } + + // Return the buffer and any remaining unwritten bytes in the + // input string. + return buf.String() + input[checkpoint:] +} + +// tryReadVariableName attempts to read a variable name from the input +// string and returns the content read from the input, whether that content +// represents a variable name to perform mapping on, and the number of bytes +// consumed in the input string. +// +// The input string is assumed not to contain the initial operator. +func tryReadVariableName(input string) (string, bool, int) { + switch input[0] { + case operator: + // Escaped operator; return it. + return input[0:1], false, 1 + case referenceOpener: + // Scan to expression closer + for i := 1; i < len(input); i++ { + if input[i] == referenceCloser { + return input[1:i], true, i + 1 + } + } + + // Incomplete reference; return it. + return string(operator) + string(referenceOpener), false, 1 + default: + // Not the beginning of an expression, ie, an operator + // that doesn't begin an expression. Return the operator + // and the first rune in the string. + return (string(operator) + string(input[0])), false, 1 + } +} diff --git a/vendor/k8s.io/kubernetes/third_party/forked/golang/expansion/expand_test.go b/vendor/k8s.io/kubernetes/third_party/forked/golang/expansion/expand_test.go new file mode 100644 index 000000000..f5a628b17 --- /dev/null +++ b/vendor/k8s.io/kubernetes/third_party/forked/golang/expansion/expand_test.go @@ -0,0 +1,285 @@ +package expansion + +import ( + "testing" + + "k8s.io/kubernetes/pkg/api" +) + +func TestMapReference(t *testing.T) { + envs := []api.EnvVar{ + { + Name: "FOO", + Value: "bar", + }, + { + Name: "ZOO", + Value: "$(FOO)-1", + }, + { + Name: "BLU", + Value: "$(ZOO)-2", + }, + } + + declaredEnv := map[string]string{ + "FOO": "bar", + "ZOO": "$(FOO)-1", + "BLU": "$(ZOO)-2", + } + + serviceEnv := map[string]string{} + + mapping := MappingFuncFor(declaredEnv, serviceEnv) + + for _, env := range envs { + declaredEnv[env.Name] = Expand(env.Value, mapping) + } + + expectedEnv := map[string]string{ + "FOO": "bar", + "ZOO": "bar-1", + "BLU": "bar-1-2", + } + + for k, v := range expectedEnv { + if e, a := v, declaredEnv[k]; e != a { + t.Errorf("Expected %v, got %v", e, a) + } else { + delete(declaredEnv, k) + } + } + + if len(declaredEnv) != 0 { + t.Errorf("Unexpected keys in declared env: %v", declaredEnv) + } +} + +func TestMapping(t *testing.T) { + context := map[string]string{ + "VAR_A": "A", + "VAR_B": "B", + "VAR_C": "C", + "VAR_REF": "$(VAR_A)", + "VAR_EMPTY": "", + } + mapping := MappingFuncFor(context) + + doExpansionTest(t, mapping) +} + +func TestMappingDual(t *testing.T) { + context := map[string]string{ + "VAR_A": "A", + "VAR_EMPTY": "", + } + context2 := map[string]string{ + "VAR_B": "B", + "VAR_C": "C", + "VAR_REF": "$(VAR_A)", + } + mapping := MappingFuncFor(context, context2) + + doExpansionTest(t, mapping) +} + +func doExpansionTest(t *testing.T, mapping func(string) string) { + cases := []struct { + name string + input string + expected string + }{ + { + name: "whole string", + input: "$(VAR_A)", + expected: "A", + }, + { + name: "repeat", + input: "$(VAR_A)-$(VAR_A)", + expected: "A-A", + }, + { + name: "beginning", + input: "$(VAR_A)-1", + expected: "A-1", + }, + { + name: "middle", + input: "___$(VAR_B)___", + expected: "___B___", + }, + { + name: "end", + input: "___$(VAR_C)", + expected: "___C", + }, + { + name: "compound", + input: "$(VAR_A)_$(VAR_B)_$(VAR_C)", + expected: "A_B_C", + }, + { + name: "escape & expand", + input: "$$(VAR_B)_$(VAR_A)", + expected: "$(VAR_B)_A", + }, + { + name: "compound escape", + input: "$$(VAR_A)_$$(VAR_B)", + expected: "$(VAR_A)_$(VAR_B)", + }, + { + name: "mixed in escapes", + input: "f000-$$VAR_A", + expected: "f000-$VAR_A", + }, + { + name: "backslash escape ignored", + input: "foo\\$(VAR_C)bar", + expected: "foo\\Cbar", + }, + { + name: "backslash escape ignored", + input: "foo\\\\$(VAR_C)bar", + expected: "foo\\\\Cbar", + }, + { + name: "lots of backslashes", + input: "foo\\\\\\\\$(VAR_A)bar", + expected: "foo\\\\\\\\Abar", + }, + { + name: "nested var references", + input: "$(VAR_A$(VAR_B))", + expected: "$(VAR_A$(VAR_B))", + }, + { + name: "nested var references second type", + input: "$(VAR_A$(VAR_B)", + expected: "$(VAR_A$(VAR_B)", + }, + { + name: "value is a reference", + input: "$(VAR_REF)", + expected: "$(VAR_A)", + }, + { + name: "value is a reference x 2", + input: "%%$(VAR_REF)--$(VAR_REF)%%", + expected: "%%$(VAR_A)--$(VAR_A)%%", + }, + { + name: "empty var", + input: "foo$(VAR_EMPTY)bar", + expected: "foobar", + }, + { + name: "unterminated expression", + input: "foo$(VAR_Awhoops!", + expected: "foo$(VAR_Awhoops!", + }, + { + name: "expression without operator", + input: "f00__(VAR_A)__", + expected: "f00__(VAR_A)__", + }, + { + name: "shell special vars pass through", + input: "$?_boo_$!", + expected: "$?_boo_$!", + }, + { + name: "bare operators are ignored", + input: "$VAR_A", + expected: "$VAR_A", + }, + { + name: "undefined vars are passed through", + input: "$(VAR_DNE)", + expected: "$(VAR_DNE)", + }, + { + name: "multiple (even) operators, var undefined", + input: "$$$$$$(BIG_MONEY)", + expected: "$$$(BIG_MONEY)", + }, + { + name: "multiple (even) operators, var defined", + input: "$$$$$$(VAR_A)", + expected: "$$$(VAR_A)", + }, + { + name: "multiple (odd) operators, var undefined", + input: "$$$$$$$(GOOD_ODDS)", + expected: "$$$$(GOOD_ODDS)", + }, + { + name: "multiple (odd) operators, var defined", + input: "$$$$$$$(VAR_A)", + expected: "$$$A", + }, + { + name: "missing open expression", + input: "$VAR_A)", + expected: "$VAR_A)", + }, + { + name: "shell syntax ignored", + input: "${VAR_A}", + expected: "${VAR_A}", + }, + { + name: "trailing incomplete expression not consumed", + input: "$(VAR_B)_______$(A", + expected: "B_______$(A", + }, + { + name: "trailing incomplete expression, no content, is not consumed", + input: "$(VAR_C)_______$(", + expected: "C_______$(", + }, + { + name: "operator at end of input string is preserved", + input: "$(VAR_A)foobarzab$", + expected: "Afoobarzab$", + }, + { + name: "shell escaped incomplete expr", + input: "foo-\\$(VAR_A", + expected: "foo-\\$(VAR_A", + }, + { + name: "lots of $( in middle", + input: "--$($($($($--", + expected: "--$($($($($--", + }, + { + name: "lots of $( in beginning", + input: "$($($($($--foo$(", + expected: "$($($($($--foo$(", + }, + { + name: "lots of $( at end", + input: "foo0--$($($($(", + expected: "foo0--$($($($(", + }, + { + name: "escaped operators in variable names are not escaped", + input: "$(foo$$var)", + expected: "$(foo$$var)", + }, + { + name: "newline not expanded", + input: "\n", + expected: "\n", + }, + } + + for _, tc := range cases { + expanded := Expand(tc.input, mapping) + if e, a := tc.expected, expanded; e != a { + t.Errorf("%v: expected %q, got %q", tc.name, e, a) + } + } +} diff --git a/vendor/k8s.io/utils/.travis.yml b/vendor/k8s.io/utils/.travis.yml new file mode 100644 index 000000000..0ad3234f4 --- /dev/null +++ b/vendor/k8s.io/utils/.travis.yml @@ -0,0 +1,10 @@ +language: go +go: + - 1.6.x + - 1.7.x + - 1.8.x +go_import_path: k8s.io/utils +script: + - diff -u <(echo -n) <(gofmt -d .) + - go tool vet . + - go test -v -race ./... diff --git a/vendor/k8s.io/utils/HOWTOMOVE.md b/vendor/k8s.io/utils/HOWTOMOVE.md new file mode 100644 index 000000000..49028998f --- /dev/null +++ b/vendor/k8s.io/utils/HOWTOMOVE.md @@ -0,0 +1,31 @@ +# How to move a utility pkg from other kubernetes repos + +It has 2 steps to move a pkg from other Kubernetes repos to `k8s.io/utils` repo: +- copy the pkg to `k8s.io/utils` repo +- update the import paths and `vendor/` in the repos that refer this pkg + +## Copy the pkg to `k8s.io/utils` repo + +Copying should preserve all the git history associated with it. +[Here](http://gbayer.com/development/moving-files-from-one-git-repository-to-another-preserving-history/) is a working approach. +Note: You may need to use `--allow-unrelated-histories` if you get error when running `git pull` following the post above. + +Then, you may need to restructure the package to make sure it has the following structure. + + . + ├── doc.go # Description for this package + ├── <utilname1>.go # utility go file + ├── <utilname>_test.go # go unit tests + └── testing # All the testing framework + └── fake_<utilname>.go # Testing framework go file + +[#5](https://github.com/kubernetes/utils/pull/5) is an example for this step. + +## Update the repos that refer the pkg + +You should update the import paths. +Then follow [this doc](https://github.com/kubernetes/community/blob/master/contributors/devel/godep.md) to update `vendor/` and `Godeps/`. + +You may want to run `make bazel-test` to make sure all new references work. + +[kubernetes/kubernetes#49234](https://github.com/kubernetes/kubernetes/pull/49234) is an example for this step. diff --git a/vendor/k8s.io/utils/README.md b/vendor/k8s.io/utils/README.md new file mode 100644 index 000000000..2504649ef --- /dev/null +++ b/vendor/k8s.io/utils/README.md @@ -0,0 +1,51 @@ +# Utils + +[![Build Status]](https://travis-ci.org/kubernetes/utils) + +A set of Go libraries that provide low-level, +kubernetes-independent packages supplementing the [Go +standard libs]. + +## Purpose + +As Kubernetes grows and spins functionality out of its +[core] and into cooperating repositories like +[apiserver], [kubectl], [kubeadm], etc., the need +arises for leaf repositories to house shared code and +avoid cycles in repository relationships. + +This repository is intended to hold shared utilities +with no Kubernetes dependence that may be of interest +to any Go project. See these [instructions for moving] +an existing package to this repository. + + +## Criteria for adding code here + +- Used by multiple Kubernetes repositories. + +- Full unit test coverage. + +- Go tools compliant (`go get`, `go test`, etc.). + +- Complex enough to be worth vendoring, rather than copying. + +- Stable, or backward compatible, API. + +- _No dependence on any Kubernetes repository_. + +## Libraries + +- [Exec](/exec) provides an interface for `os/exec`. It makes it easier + to mock and replace in tests, especially with + the [FakeExec](exec/testing/fake_exec.go) struct. + +[Build Status]: https://travis-ci.org/kubernetes/utils.svg?branch=master +[Go standard libs]: https://golang.org/pkg/#stdlib +[api]: https://github.com/kubernetes/api +[apiserver]: https://github.com/kubernetes/apiserver +[core]: https://github.com/kubernetes/kubernetes +[ingress]: https://github.com/kubernetes/ingress +[kubeadm]: https://github.com/kubernetes/kubeadm +[kubectl]: https://github.com/kubernetes/kubectl +[instructions for moving]: ./HOWTOMOVE.md diff --git a/vendor/k8s.io/utils/code-of-conduct.md b/vendor/k8s.io/utils/code-of-conduct.md new file mode 100644 index 000000000..622d4c1d1 --- /dev/null +++ b/vendor/k8s.io/utils/code-of-conduct.md @@ -0,0 +1,5 @@ +## Kubernetes Community Code of Conduct + +Kubernetes follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). + +[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/code-of-conduct.md?pixel)]() diff --git a/vendor/k8s.io/utils/exec/doc.go b/vendor/k8s.io/utils/exec/doc.go index 7dc1e5171..cbb44bdb5 100644 --- a/vendor/k8s.io/utils/exec/doc.go +++ b/vendor/k8s.io/utils/exec/doc.go @@ -15,4 +15,4 @@ limitations under the License. */ // Package exec provides an injectable interface and implementations for running commands. -package exec +package exec // import "k8s.io/utils/exec" diff --git a/vendor/k8s.io/utils/exec/exec_test.go b/vendor/k8s.io/utils/exec/exec_test.go new file mode 100644 index 000000000..bd9158790 --- /dev/null +++ b/vendor/k8s.io/utils/exec/exec_test.go @@ -0,0 +1,103 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package exec + +import ( + osexec "os/exec" + "testing" +) + +func TestExecutorNoArgs(t *testing.T) { + ex := New() + + cmd := ex.Command("true") + out, err := cmd.CombinedOutput() + if err != nil { + t.Errorf("expected success, got %v", err) + } + if len(out) != 0 { + t.Errorf("expected no output, got %q", string(out)) + } + + cmd = ex.Command("false") + out, err = cmd.CombinedOutput() + if err == nil { + t.Errorf("expected failure, got nil error") + } + if len(out) != 0 { + t.Errorf("expected no output, got %q", string(out)) + } + ee, ok := err.(ExitError) + if !ok { + t.Errorf("expected an ExitError, got %+v", err) + } + if ee.Exited() { + if code := ee.ExitStatus(); code != 1 { + t.Errorf("expected exit status 1, got %d", code) + } + } + + cmd = ex.Command("/does/not/exist") + out, err = cmd.CombinedOutput() + if err == nil { + t.Errorf("expected failure, got nil error") + } + if ee, ok := err.(ExitError); ok { + t.Errorf("expected non-ExitError, got %+v", ee) + } +} + +func TestExecutorWithArgs(t *testing.T) { + ex := New() + + cmd := ex.Command("echo", "stdout") + out, err := cmd.CombinedOutput() + if err != nil { + t.Errorf("expected success, got %+v", err) + } + if string(out) != "stdout\n" { + t.Errorf("unexpected output: %q", string(out)) + } + + cmd = ex.Command("/bin/sh", "-c", "echo stderr > /dev/stderr") + out, err = cmd.CombinedOutput() + if err != nil { + t.Errorf("expected success, got %+v", err) + } + if string(out) != "stderr\n" { + t.Errorf("unexpected output: %q", string(out)) + } +} + +func TestLookPath(t *testing.T) { + ex := New() + + shExpected, _ := osexec.LookPath("sh") + sh, _ := ex.LookPath("sh") + if sh != shExpected { + t.Errorf("unexpected result for LookPath: got %s, expected %s", sh, shExpected) + } +} + +func TestExecutableNotFound(t *testing.T) { + exec := New() + cmd := exec.Command("fake_executable_name") + _, err := cmd.CombinedOutput() + if err != ErrExecutableNotFound { + t.Errorf("Expected error ErrExecutableNotFound but got %v", err) + } +} diff --git a/controllers/nginx/pkg/version/version.go b/version/version.go similarity index 100% rename from controllers/nginx/pkg/version/version.go rename to version/version.go